diff --git a/CMakeLists.txt b/CMakeLists.txt index 861e5959b1c..16c2f6d68bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,10 +129,6 @@ else() add_definitions(-D_WINKD_=1) endif() - if(USE_PSEH3) - add_definitions(-D_USE_PSEH3=1) - endif() - # Version Options add_definitions(-DWINVER=0x502 -D_WIN32_IE=0x600 @@ -233,6 +229,7 @@ else() add_subdirectory(modules) add_subdirectory(ntoskrnl) add_subdirectory(subsystems) + add_subdirectory(tools/wpp) add_subdirectory(win32ss) # Create {bootcd, livecd, bootcdregtest}.lst diff --git a/CREDITS b/CREDITS index 51567871763..9267cf0b68c 100644 --- a/CREDITS +++ b/CREDITS @@ -2,6 +2,7 @@ ReactOS is available thanks to the work of: Aleksey Bragin Alex Ionescu +Amine Khaldi Andrew Greenwood Andrew Munger Arindam Das @@ -38,7 +39,7 @@ Jason Weiler Jean Michault Jeffrey Morlan Jim Noeth -Johannes Anderwald +Johannes Anderwald Jonathan Wilson Jurgen van Gael KJK::Hyperion diff --git a/base/applications/cacls/lang/bg-BG.rc b/base/applications/cacls/lang/bg-BG.rc index 486feb734da..15cfd0f064a 100644 --- a/base/applications/cacls/lang/bg-BG.rc +++ b/base/applications/cacls/lang/bg-BG.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Показва или изменя списъците за достъп (ACL или СзД) до файловете\n\n\ diff --git a/base/applications/cacls/lang/ca-ES.rc b/base/applications/cacls/lang/ca-ES.rc index db385d0ab1d..b2296061c65 100644 --- a/base/applications/cacls/lang/ca-ES.rc +++ b/base/applications/cacls/lang/ca-ES.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_CATALAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Mostra o modifica la llista de control d'accés (ACLs) dels fitxers\n\n\ diff --git a/base/applications/cacls/lang/cs-CZ.rc b/base/applications/cacls/lang/cs-CZ.rc index 00b3967f1f5..8a356bd0afb 100644 --- a/base/applications/cacls/lang/cs-CZ.rc +++ b/base/applications/cacls/lang/cs-CZ.rc @@ -6,7 +6,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Zobrazí nebo změní seznamy řízení přístupu (ACL) k souborům\n\n\ diff --git a/base/applications/cacls/lang/da-DK.rc b/base/applications/cacls/lang/da-DK.rc index bf9ad4e5a4b..b9e156a6653 100644 --- a/base/applications/cacls/lang/da-DK.rc +++ b/base/applications/cacls/lang/da-DK.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_DANISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Ændringer fil-ACL'er (Access Control List) eller viser dem.\n\n\ diff --git a/base/applications/cacls/lang/de-DE.rc b/base/applications/cacls/lang/de-DE.rc index c3feb90bff2..c82422227ad 100644 --- a/base/applications/cacls/lang/de-DE.rc +++ b/base/applications/cacls/lang/de-DE.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Ändert Datei-ACLs (Access Control List) oder zeigt sie an.\n\n\ diff --git a/base/applications/cacls/lang/el-GR.rc b/base/applications/cacls/lang/el-GR.rc index 22f8701f47c..8bb8bce7046 100644 --- a/base/applications/cacls/lang/el-GR.rc +++ b/base/applications/cacls/lang/el-GR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Εμφανίζει ή τροποποιεί τις access control lists (ACLs) των αρχείων\n\n\ diff --git a/base/applications/cacls/lang/en-US.rc b/base/applications/cacls/lang/en-US.rc index cbb9b7bc67f..aed793f028b 100644 --- a/base/applications/cacls/lang/en-US.rc +++ b/base/applications/cacls/lang/en-US.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Displays or modifies access control lists (ACLs) of files\n\n\ diff --git a/base/applications/cacls/lang/es-ES.rc b/base/applications/cacls/lang/es-ES.rc index 1cc8fd08b2d..7ccb69cca1a 100644 --- a/base/applications/cacls/lang/es-ES.rc +++ b/base/applications/cacls/lang/es-ES.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Muestra o modifica la lista de control de accesos (ACLs) de los archivos\n\n\ diff --git a/base/applications/cacls/lang/fr-FR.rc b/base/applications/cacls/lang/fr-FR.rc index b3de320022d..7296e6d4ef4 100644 --- a/base/applications/cacls/lang/fr-FR.rc +++ b/base/applications/cacls/lang/fr-FR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Affiche ou change la liste des contrôles d'accès (ACLs) de fichiers\n\n\ diff --git a/base/applications/cacls/lang/id-ID.rc b/base/applications/cacls/lang/id-ID.rc index f73916fea61..c2fe50c0cf4 100644 --- a/base/applications/cacls/lang/id-ID.rc +++ b/base/applications/cacls/lang/id-ID.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Menampilkan atau memodifikasi daftar kontrol akses (ACL) file\n\n\ diff --git a/base/applications/cacls/lang/it-IT.rc b/base/applications/cacls/lang/it-IT.rc index b9993fd286b..0f9c7d4b1b7 100644 --- a/base/applications/cacls/lang/it-IT.rc +++ b/base/applications/cacls/lang/it-IT.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Visualizza o modifica le liste di controllo di accesso ai file.\n\ diff --git a/base/applications/cacls/lang/ja-JP.rc b/base/applications/cacls/lang/ja-JP.rc index edc48166f0b..9d5100f51f2 100644 --- a/base/applications/cacls/lang/ja-JP.rc +++ b/base/applications/cacls/lang/ja-JP.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "ファイルのアクセス制御リスト(ACL) を表示または変更します。\n\n\ diff --git a/base/applications/cacls/lang/ko-KR.rc b/base/applications/cacls/lang/ko-KR.rc index 2f8211a456c..51f5c230180 100644 --- a/base/applications/cacls/lang/ko-KR.rc +++ b/base/applications/cacls/lang/ko-KR.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "액세스 컨트롤 리스트(ACLs)보기, 수정\n\n\ diff --git a/base/applications/cacls/lang/nl-NL.rc b/base/applications/cacls/lang/nl-NL.rc index fdad4b65a4b..f89cb9b6a18 100644 --- a/base/applications/cacls/lang/nl-NL.rc +++ b/base/applications/cacls/lang/nl-NL.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "ACL's (Access Control Lists, toegangslijsten) van bestanden weergeven\nof bewerken\n\nCACLS bestandsnaam [/T] [/E] [/C] [/G gebr:toeg] [/R gebruiker [...]]\n\ diff --git a/base/applications/cacls/lang/no-NO.rc b/base/applications/cacls/lang/no-NO.rc index 55d1a64e452..1e0cc0650a6 100644 --- a/base/applications/cacls/lang/no-NO.rc +++ b/base/applications/cacls/lang/no-NO.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Viser eller endrer tilgang kontroll lister (ACL) av filer\n\n\ diff --git a/base/applications/cacls/lang/pl-PL.rc b/base/applications/cacls/lang/pl-PL.rc index 7fce3d586f8..ed5387e3135 100644 --- a/base/applications/cacls/lang/pl-PL.rc +++ b/base/applications/cacls/lang/pl-PL.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Pokaż lub modyfikuj listę kontroli dostępu (Access Control List) plików\n\n\ diff --git a/base/applications/cacls/lang/pt-BR.rc b/base/applications/cacls/lang/pt-BR.rc index 4ab0502e620..9f6d9c7b46d 100644 --- a/base/applications/cacls/lang/pt-BR.rc +++ b/base/applications/cacls/lang/pt-BR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Exibe ou modifica as listas de controle de acesso (ACLs) de arquivos\n\n\ diff --git a/base/applications/cacls/lang/ro-RO.rc b/base/applications/cacls/lang/ro-RO.rc index 6ce6bc1e845..06eba3648b1 100644 --- a/base/applications/cacls/lang/ro-RO.rc +++ b/base/applications/cacls/lang/ro-RO.rc @@ -7,7 +7,7 @@ */ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Afișează sau modifică lista de control acces (ACL) pentru fișiere\n\n\ diff --git a/base/applications/cacls/lang/ru-RU.rc b/base/applications/cacls/lang/ru-RU.rc index c15aa532d9d..c5b334d777f 100644 --- a/base/applications/cacls/lang/ru-RU.rc +++ b/base/applications/cacls/lang/ru-RU.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Отображает или изменяет списки доступа (ACLs) к файлам\n\n\ diff --git a/base/applications/cacls/lang/sk-SK.rc b/base/applications/cacls/lang/sk-SK.rc index 79e038ea71e..4cec608d7ed 100644 --- a/base/applications/cacls/lang/sk-SK.rc +++ b/base/applications/cacls/lang/sk-SK.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Zobrazí alebo zmení zoznamy prístupových práv (Access Control List) súborov.\n\n\ diff --git a/base/applications/cacls/lang/sv-SE.rc b/base/applications/cacls/lang/sv-SE.rc index e84cd92e6ad..433464275e1 100644 --- a/base/applications/cacls/lang/sv-SE.rc +++ b/base/applications/cacls/lang/sv-SE.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Visar eller ändrar rättighets-kontroll-listor (ACL) av filer\n\n\ diff --git a/base/applications/cacls/lang/uk-UA.rc b/base/applications/cacls/lang/uk-UA.rc index 7c447c378a2..720ca311d6c 100644 --- a/base/applications/cacls/lang/uk-UA.rc +++ b/base/applications/cacls/lang/uk-UA.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Відображає чи модифікує списки доступу (ACLs) до файлів\n\n\ diff --git a/base/applications/cacls/lang/zh-CN.rc b/base/applications/cacls/lang/zh-CN.rc index b33b6fdc897..b1a38269719 100644 --- a/base/applications/cacls/lang/zh-CN.rc +++ b/base/applications/cacls/lang/zh-CN.rc @@ -21,7 +21,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "显示或者修改文件的访问控制表\n\n\ diff --git a/base/applications/cacls/lang/zh-TW.rc b/base/applications/cacls/lang/zh-TW.rc index 965448695aa..9b395613362 100644 --- a/base/applications/cacls/lang/zh-TW.rc +++ b/base/applications/cacls/lang/zh-TW.rc @@ -21,7 +21,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "顯示或者修改文件的訪問控制表\n\n\ diff --git a/base/applications/calc/lang/bg-BG.rc b/base/applications/calc/lang/bg-BG.rc index 8fc04784f0a..6216c64da7f 100644 --- a/base/applications/calc/lang/bg-BG.rc +++ b/base/applications/calc/lang/bg-BG.rc @@ -308,7 +308,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "За ReactOS Calc" FONT 8, "MS Shell Dlg" @@ -327,7 +327,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Статистическа кутия" FONT 8, "MS Shell Dlg" @@ -344,7 +344,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "&Обработка" BEGIN @@ -376,7 +376,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "&Обработка" BEGIN @@ -409,7 +409,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "&Обработка" BEGIN @@ -434,7 +434,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "ReactOS Calc is free software released under GNU GPL license.\r\n\r\nYou can get a copy of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nYou can also get a translation of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Грешка" @@ -442,7 +442,7 @@ BEGIN END // types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "Ъгъл" IDS_CONV_AREA "Площ" @@ -460,7 +460,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "Градуси" IDS_ANGLE_GRADIANS "Гради" @@ -468,7 +468,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "Акри" IDS_AREA_ACRES_BRAZIL "Акри (бразилски)" @@ -507,7 +507,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Километри/литър" IDS_CONSUMPTION_L_PER_100_KM "Литри/100 километра" @@ -516,7 +516,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Австрийски шилинг" IDS_CURRENCY_BELGIAN_FRANC "Белгийски франк" @@ -539,7 +539,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "15-градусови калории" IDS_ENERGY_BTUS "Британски топлинни единици" @@ -556,7 +556,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "Ангстрьоми" IDS_LENGTH_ASTRONOMICAL_UNITS "Астрономическа единица" @@ -608,7 +608,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "Британски топлинни единици в минута" IDS_POWER_FPS_PER_MINUTE "Стъпки-фунтове в минута" @@ -619,7 +619,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "Атмосфери" IDS_PRESSURE_BARS "Барове" @@ -631,7 +631,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "Целзий" IDS_TEMPERATURE_FAHRENHEIT "Фаренхайт" @@ -640,7 +640,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "Дни" IDS_TIME_HOURS "Часи" @@ -654,7 +654,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "Сантиметри/час" IDS_VELOCITY_FEET_HOUR "Стъпки/час" @@ -667,7 +667,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "Бъчви (барели) (ОК)" IDS_VOLUME_BARRELS_OIL "Петролни бъчви" @@ -706,7 +706,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Baht" IDS_WEIGHT_CARATS "Карати" diff --git a/base/applications/calc/lang/cs-CZ.rc b/base/applications/calc/lang/cs-CZ.rc index 99fa2e50bfe..71afb757a3a 100644 --- a/base/applications/calc/lang/cs-CZ.rc +++ b/base/applications/calc/lang/cs-CZ.rc @@ -49,7 +49,7 @@ BEGIN BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "(",IDC_BUTTON_LEFTPAR,64,60,24,18,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "exp",IDC_BUTTON_EXP,64,83,24,18,BS_CENTER | BS_VCENTER | + PUSHBUTTON "exp",IDC_BUTTON_EXP,64,80,24,18,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "x^y",IDC_BUTTON_XeY,64,100,24,18,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP @@ -156,7 +156,7 @@ BEGIN BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "CE",IDC_BUTTON_CE,222,38,43,18,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "Zpět",IDC_BUTTON_BACK,182,40,40,17,BS_CENTER | + PUSHBUTTON "Zpět",IDC_BUTTON_BACK,177,38,43,18,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP RTEXT "",IDC_TEXT_OUTPUT,5,1,305,14,SS_CENTERIMAGE, WS_EX_CLIENTEDGE @@ -308,7 +308,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "O ReactOS Kalkulačce" FONT 8, "MS Shell Dlg" @@ -327,7 +327,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Statistické výpočty" FONT 8, "MS Shell Dlg" @@ -344,7 +344,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "Úpravy" BEGIN @@ -376,7 +376,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "Úpravy" BEGIN @@ -409,7 +409,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "Úpravy" BEGIN @@ -434,7 +434,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "ReactOS kalkulačka je svobodný software vydaný pod licencí GNU GPL.\r\n\r\nZde najdete znění GNU GPL licence:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nZde také najdete překlad GNU GPL licence:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Chyba" @@ -442,7 +442,7 @@ BEGIN END // types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "Úhel" IDS_CONV_AREA "Plocha" @@ -460,7 +460,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "Stupně" IDS_ANGLE_GRADIANS "Grady" @@ -468,7 +468,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "Akry" IDS_AREA_ACRES_BRAZIL "Akry (Brazílie)" @@ -507,7 +507,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Kilometry/litr" IDS_CONSUMPTION_L_PER_100_KM "Litry/100 kilometrů" @@ -516,7 +516,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Rakouský šilink" IDS_CURRENCY_BELGIAN_FRANC "Belgický frank" @@ -539,7 +539,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "15 °C kalorie" IDS_ENERGY_BTUS "Britské termální jednotky" @@ -556,7 +556,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "Angströmy" IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomické jednotky" @@ -608,7 +608,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "Britské termální jednotky za minutu" IDS_POWER_FPS_PER_MINUTE "Foot-Pounds za minutu" @@ -619,7 +619,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "Atmosféry" IDS_PRESSURE_BARS "Bary" @@ -631,7 +631,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "Celsia" IDS_TEMPERATURE_FAHRENHEIT "Fahrenheita" @@ -640,7 +640,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "Dny" IDS_TIME_HOURS "Hodiny" @@ -654,7 +654,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "Centimetry za hodinu" IDS_VELOCITY_FEET_HOUR "Stopy za hodinu" @@ -667,7 +667,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "Barely (UK)" IDS_VOLUME_BARRELS_OIL "Barely ropy" @@ -706,7 +706,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Baht" IDS_WEIGHT_CARATS "Karáty" diff --git a/base/applications/calc/lang/de-DE.rc b/base/applications/calc/lang/de-DE.rc index 5bfb74ea7a6..da4e81824c2 100644 --- a/base/applications/calc/lang/de-DE.rc +++ b/base/applications/calc/lang/de-DE.rc @@ -303,7 +303,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Über ReactOS Rechner" FONT 8, "MS Shell Dlg" @@ -322,7 +322,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Statistikbox" FONT 8, "MS Shell Dlg" @@ -339,7 +339,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "Bearbeiten" BEGIN @@ -371,7 +371,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "Bearbeiten" BEGIN @@ -404,7 +404,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "Bearbeiten" BEGIN @@ -429,7 +429,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "ReactOS Rechner ist freie Software, herausgegeben unter der GNU GPL Lizenz.\r\n\r\nSie können hier eine Kopie der GNU GPL Lizenz erhalten:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nSie können hier auch eine Übersetzung der GNU GPL Lizenz erhalten:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Fehler" @@ -437,7 +437,7 @@ BEGIN END // Konversionstypen -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "Winkel" IDS_CONV_AREA "Fläche" @@ -455,7 +455,7 @@ BEGIN END // WINKELTYPEN -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "Grad" IDS_ANGLE_GRADIANS "Gon" @@ -463,7 +463,7 @@ BEGIN END // FLÄCHENTYPEN -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "Acre" IDS_AREA_ACRES_BRAZIL "Acre (Brasilien)" @@ -502,7 +502,7 @@ BEGIN END // VERBRAUCHSTYPEN -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Kilometer/Liter" IDS_CONSUMPTION_L_PER_100_KM "Liter/100 Kilometer" @@ -511,7 +511,7 @@ BEGIN END // WÄHRUNGSTYPEN -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Österreichische Schilling" IDS_CURRENCY_BELGIAN_FRANC "Belgische Franc" @@ -534,7 +534,7 @@ BEGIN END // ENERGIETYPEN -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "15 °C Kalorien" IDS_ENERGY_BTUS "British thermal unit" @@ -551,7 +551,7 @@ BEGIN END // LÄNGENTYPEN -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "Angströms" IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomische Einheiten" @@ -603,7 +603,7 @@ BEGIN END // ARBEITSTYPEN -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "BTU pro Minute" IDS_POWER_FPS_PER_MINUTE "Foot-Pound pro Minute" @@ -614,7 +614,7 @@ BEGIN END // DRUCKTYPEN -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "Atmosphären" IDS_PRESSURE_BARS "Bar" @@ -626,7 +626,7 @@ BEGIN END // TEMPERATURTYPEN -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "Celsius" IDS_TEMPERATURE_FAHRENHEIT "Fahrenheit" @@ -635,7 +635,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "Tagen" IDS_TIME_HOURS "Stunden" @@ -649,7 +649,7 @@ BEGIN END // GESCHWINDIGKEITSTYPEN -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "Zentimeter/Sekunde" IDS_VELOCITY_FEET_HOUR "Fuß/Stunde" @@ -662,7 +662,7 @@ BEGIN END // VOLUMENEINHEITEN -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "Barrel (UK)" IDS_VOLUME_BARRELS_OIL "Barrel Öl" @@ -701,7 +701,7 @@ BEGIN END // GEWICHTSEIHEITEN -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Baht" IDS_WEIGHT_CARATS "Karat" diff --git a/base/applications/calc/lang/el-GR.rc b/base/applications/calc/lang/el-GR.rc index 77cbea1a793..2736f46be96 100644 --- a/base/applications/calc/lang/el-GR.rc +++ b/base/applications/calc/lang/el-GR.rc @@ -303,7 +303,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Σχετικά..." FONT 8, "MS Shell Dlg" @@ -322,7 +322,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Statistics box" FONT 8, "MS Shell Dlg" @@ -339,7 +339,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "Επεξεργασία" BEGIN @@ -371,7 +371,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "Επεξεργασία" BEGIN @@ -404,7 +404,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "Επεξεργασία" BEGIN @@ -429,7 +429,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "ReactOS Calc is free software released under GNU GPL license.\r\n\r\nYou can get a copy of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nYou can also get a translation of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Σφάλμα" @@ -437,7 +437,7 @@ BEGIN END // Types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "Γωνία" IDS_CONV_AREA "Εμβαδό" @@ -455,7 +455,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "Βαθμοί" IDS_ANGLE_GRADIANS "Ακτίνια" @@ -463,7 +463,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "Acres" IDS_AREA_ACRES_BRAZIL "Acres (Brazil)" @@ -502,7 +502,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Kilometer/liter" IDS_CONSUMPTION_L_PER_100_KM "Liters/100 kilometers" @@ -511,7 +511,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Austrian schilling" IDS_CURRENCY_BELGIAN_FRANC "Βέλγικο φράγκο" @@ -534,7 +534,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "15 °C calories" IDS_ENERGY_BTUS "British Thermal Units" @@ -551,7 +551,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "Angstroms" IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomical units" @@ -603,7 +603,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "British Thermal Units per minute" IDS_POWER_FPS_PER_MINUTE "Foot-Pounds per minute" @@ -614,7 +614,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "Ατμόσφαιρες" IDS_PRESSURE_BARS "Bars" @@ -626,7 +626,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "Κελσίου" IDS_TEMPERATURE_FAHRENHEIT "Φαρενάιτ" @@ -635,7 +635,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "Μέρες" IDS_TIME_HOURS "Ώρες" @@ -649,7 +649,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "Εκατοστά/ώρα" IDS_VELOCITY_FEET_HOUR "Πόδια/ώρα" @@ -662,7 +662,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "Barrels (UK)" IDS_VOLUME_BARRELS_OIL "Barrels oil" @@ -701,7 +701,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Baht" IDS_WEIGHT_CARATS "Carats" diff --git a/base/applications/calc/lang/en-US.rc b/base/applications/calc/lang/en-US.rc index 3618c7a55c6..d599453b469 100644 --- a/base/applications/calc/lang/en-US.rc +++ b/base/applications/calc/lang/en-US.rc @@ -303,7 +303,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "About ReactOS Calc" FONT 8, "MS Shell Dlg" @@ -322,7 +322,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Statistics box" FONT 8, "MS Shell Dlg" @@ -339,7 +339,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "Edit" BEGIN @@ -371,7 +371,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "Edit" BEGIN @@ -404,7 +404,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "Edit" BEGIN @@ -429,7 +429,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "ReactOS Calc is free software released under GNU GPL license.\r\n\r\nYou can get a copy of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nYou can also get a translation of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Error" @@ -437,7 +437,7 @@ BEGIN END // Types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "Angle" IDS_CONV_AREA "Area" @@ -455,7 +455,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "Degrees" IDS_ANGLE_GRADIANS "Gradians" @@ -463,7 +463,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "Acres" IDS_AREA_ACRES_BRAZIL "Acres (Brazil)" @@ -502,7 +502,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Kilometer/liter" IDS_CONSUMPTION_L_PER_100_KM "Liters/100 kilometers" @@ -511,7 +511,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Austrian schilling" IDS_CURRENCY_BELGIAN_FRANC "Belgian franc" @@ -534,7 +534,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "15 °C calories" IDS_ENERGY_BTUS "British Thermal Units" @@ -551,7 +551,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "Ångströms" IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomical units" @@ -603,7 +603,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "British Thermal Units per minute" IDS_POWER_FPS_PER_MINUTE "Foot-Pounds per minute" @@ -614,7 +614,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "Atmospheres" IDS_PRESSURE_BARS "Bars" @@ -626,7 +626,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "Celsius" IDS_TEMPERATURE_FAHRENHEIT "Fahrenheit" @@ -635,7 +635,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "Days" IDS_TIME_HOURS "Hours" @@ -649,7 +649,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "Centimeters/hour" IDS_VELOCITY_FEET_HOUR "Feet/hour" @@ -662,7 +662,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "Barrels (UK)" IDS_VOLUME_BARRELS_OIL "Barrels oil" @@ -701,7 +701,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Baht" IDS_WEIGHT_CARATS "Carats" diff --git a/base/applications/calc/lang/es-ES.rc b/base/applications/calc/lang/es-ES.rc index b7ca6bbf457..3be2c4fdccc 100644 --- a/base/applications/calc/lang/es-ES.rc +++ b/base/applications/calc/lang/es-ES.rc @@ -308,7 +308,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Acerca de Calculadora ReactOS" FONT 8, "MS Shell Dlg" @@ -327,7 +327,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Cuadro de estadísticas" FONT 8, "MS Shell Dlg" @@ -344,7 +344,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "Edición" BEGIN @@ -376,7 +376,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "Edición" BEGIN @@ -409,7 +409,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "Edición" BEGIN @@ -434,7 +434,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "Calculadora ReactOS es software gratuito realizado bajo licencia GNU GPL.\r\n\r\nPuedes coger una copia de la licencia GNU GPL aquí:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nPuedes también coger una traducción de la licencia GNU GPL aquí:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Error" @@ -442,7 +442,7 @@ BEGIN END // Types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "Ángulo" IDS_CONV_AREA "Área" @@ -460,7 +460,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "Grados sexagesimales" IDS_ANGLE_GRADIANS "Grados centesimales" @@ -468,7 +468,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "Acres" IDS_AREA_ACRES_BRAZIL "Acres (Brasil)" @@ -507,7 +507,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Kilometros/litro" IDS_CONSUMPTION_L_PER_100_KM "Litros/100 kilometros" @@ -516,7 +516,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Schilling Austriaco" IDS_CURRENCY_BELGIAN_FRANC "Franco Belga" @@ -539,7 +539,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "15 °C calorías" IDS_ENERGY_BTUS "BTU" @@ -556,7 +556,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "Ångströms" IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomical units" @@ -608,7 +608,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "BTU/Minuto" IDS_POWER_FPS_PER_MINUTE "Ft·Lbs/Minuto" @@ -619,7 +619,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "Atmósferas" IDS_PRESSURE_BARS "Bares" @@ -631,7 +631,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "Celsius" IDS_TEMPERATURE_FAHRENHEIT "Fahrenheit" @@ -640,7 +640,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "Días" IDS_TIME_HOURS "Horas" @@ -654,7 +654,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "Centímetros/segundo" IDS_VELOCITY_FEET_HOUR "Pies/hora" @@ -667,7 +667,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "Barriles (UK)" IDS_VOLUME_BARRELS_OIL "Barriles de petroleo" @@ -706,7 +706,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Baht" IDS_WEIGHT_CARATS "Quilates" diff --git a/base/applications/calc/lang/fr-FR.rc b/base/applications/calc/lang/fr-FR.rc index aa63db25bb7..8d207aa9850 100644 --- a/base/applications/calc/lang/fr-FR.rc +++ b/base/applications/calc/lang/fr-FR.rc @@ -303,7 +303,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "À propos de la Calculatrice ReactOS" FONT 8, "MS Shell Dlg" @@ -322,7 +322,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Statistiques" FONT 8, "MS Shell Dlg" @@ -339,7 +339,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "Édition" BEGIN @@ -371,7 +371,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "Édition" BEGIN @@ -404,7 +404,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "Édition" BEGIN @@ -429,7 +429,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "Calculatrice ReactOS est un logiciel libre distribué sous licence GNU GPL.\r\n\r\nVous pouvez obtenir une copie de la licence GNU GPL ici:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nVous pouvez aussi obtenir une traduction de la licence GNU GPL ici:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Erreur" @@ -437,7 +437,7 @@ BEGIN END // types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "Angle" IDS_CONV_AREA "Superficie" @@ -455,7 +455,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "Degrés" IDS_ANGLE_GRADIANS "Grades" @@ -463,7 +463,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "Acres" IDS_AREA_ACRES_BRAZIL "Acres (Brazil)" @@ -502,7 +502,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Kilomètre/litre" IDS_CONSUMPTION_L_PER_100_KM "Litres/100 kilomètres" @@ -511,7 +511,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Schilling autrichien" IDS_CURRENCY_BELGIAN_FRANC "Franc belge" @@ -534,7 +534,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "15 °C calories" IDS_ENERGY_BTUS "British Thermal Units" @@ -551,7 +551,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "Angström" IDS_LENGTH_ASTRONOMICAL_UNITS "Unités astronomiques" @@ -603,7 +603,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "British Thermal Units par minute" IDS_POWER_FPS_PER_MINUTE "Pied-livres par minute" @@ -614,7 +614,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "Atmosphères" IDS_PRESSURE_BARS "Bars" @@ -626,7 +626,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "Celsius" IDS_TEMPERATURE_FAHRENHEIT "Fahrenheit" @@ -635,7 +635,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "Jours" IDS_TIME_HOURS "Heures" @@ -649,7 +649,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "Centimètres/seconde" IDS_VELOCITY_FEET_HOUR "Pieds/heure" @@ -662,7 +662,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "Baril (UK)" IDS_VOLUME_BARRELS_OIL "Baril de pétrole" @@ -701,7 +701,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Baht" IDS_WEIGHT_CARATS "Carats" diff --git a/base/applications/calc/lang/he-IL.rc b/base/applications/calc/lang/he-IL.rc index b4ff3fd2b2d..481281a1a60 100644 --- a/base/applications/calc/lang/he-IL.rc +++ b/base/applications/calc/lang/he-IL.rc @@ -303,7 +303,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "אודות המחשבון ReactOS" FONT 8, "MS Shell Dlg" @@ -322,7 +322,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "תיבת סטטיסטיקה" FONT 8, "MS Shell Dlg" @@ -339,7 +339,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "עריכה" BEGIN @@ -371,7 +371,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "עריכה" BEGIN @@ -404,7 +404,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "עריכה" BEGIN @@ -429,7 +429,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "ReactOS Calc is free software released under GNU GPL license.\r\n\r\nYou can get a copy of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nYou can also get a translation of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "שגיאה" @@ -437,7 +437,7 @@ BEGIN END // Types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "זוית" IDS_CONV_AREA "שטח" @@ -455,7 +455,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "מעלות" IDS_ANGLE_GRADIANS "Gradians" @@ -463,7 +463,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "דונמים" IDS_AREA_ACRES_BRAZIL "דונמים (ברזיל)" @@ -502,7 +502,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "קילומטר/ליטר" IDS_CONSUMPTION_L_PER_100_KM "ליטרים/קילומטרים" @@ -511,7 +511,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "שילינג אוסטרי" IDS_CURRENCY_BELGIAN_FRANC "פרנק בלגי" @@ -534,7 +534,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "15 °C קלוריות" IDS_ENERGY_BTUS "British Thermal Units" @@ -551,7 +551,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "Ångströms" IDS_LENGTH_ASTRONOMICAL_UNITS "יחידות אסטרונומיות" @@ -603,7 +603,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "British Thermal Units per minute" IDS_POWER_FPS_PER_MINUTE "Foot-Pounds per minute" @@ -614,7 +614,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "אטמוספירות" IDS_PRESSURE_BARS "בר" @@ -626,7 +626,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "צלזיוס" IDS_TEMPERATURE_FAHRENHEIT "פרנהייט" @@ -635,7 +635,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "ימים" IDS_TIME_HOURS "שעות" @@ -649,7 +649,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "סנטימטר/שעה" IDS_VELOCITY_FEET_HOUR "רגל/שעה" @@ -662,7 +662,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "חביות (בריטניה)" IDS_VOLUME_BARRELS_OIL "חביות נפט" @@ -701,7 +701,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Baht" IDS_WEIGHT_CARATS "Carats" diff --git a/base/applications/calc/lang/hu-HU.rc b/base/applications/calc/lang/hu-HU.rc index 3eceaf3ae79..fd21bf74aac 100644 --- a/base/applications/calc/lang/hu-HU.rc +++ b/base/applications/calc/lang/hu-HU.rc @@ -311,7 +311,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "A ReactOS Számológépről" FONT 8, "MS Shell Dlg" @@ -330,7 +330,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Statisztika" FONT 8, "MS Shell Dlg" @@ -347,7 +347,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "&Szerkesztés" BEGIN @@ -379,7 +379,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "&Szerkesztés" BEGIN @@ -412,7 +412,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "&Szerkesztés" BEGIN @@ -437,7 +437,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "A ReactOS Számológép a GNU GPL licenc alatt kiadott szabad szoftver.\r\n\r\nA GNU GPL licenc egy másolatát innen szerezheted be:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nValamint a GNU GPL licenc fordítását innen szerezheted be:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Hiba" @@ -445,7 +445,7 @@ BEGIN END // Types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "Szög" IDS_CONV_AREA "Terület" @@ -463,7 +463,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "Fok" IDS_ANGLE_GRADIANS "Gradián" @@ -471,7 +471,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "Acre" IDS_AREA_ACRES_BRAZIL "Acre (Brazília)" @@ -510,7 +510,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Kilométer/liter" IDS_CONSUMPTION_L_PER_100_KM "Liter/100 kilométer" @@ -519,7 +519,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Osztrák schilling" IDS_CURRENCY_BELGIAN_FRANC "Belga frank" @@ -542,7 +542,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "15 °C kalória" IDS_ENERGY_BTUS "Brit hőegység" @@ -559,7 +559,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "Ångström" IDS_LENGTH_ASTRONOMICAL_UNITS "Csillagászati egység" @@ -611,7 +611,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "Brit hőegység per perc" IDS_POWER_FPS_PER_MINUTE "Láb-font per perc" @@ -622,7 +622,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "Atmoszféra" IDS_PRESSURE_BARS "Bar" @@ -634,7 +634,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "Celsius" IDS_TEMPERATURE_FAHRENHEIT "Fahrenheit" @@ -643,7 +643,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "Nap" IDS_TIME_HOURS "Óra" @@ -657,7 +657,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "Centiméter/óra" IDS_VELOCITY_FEET_HOUR "Láb/óra" @@ -670,7 +670,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "Hordó (Egyesült Királyság)" IDS_VOLUME_BARRELS_OIL "Olajhordó" @@ -709,7 +709,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Baht" IDS_WEIGHT_CARATS "Karát" diff --git a/base/applications/calc/lang/it-IT.rc b/base/applications/calc/lang/it-IT.rc index ce223f94160..7d45d5ab1b2 100644 --- a/base/applications/calc/lang/it-IT.rc +++ b/base/applications/calc/lang/it-IT.rc @@ -303,7 +303,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Informazioni su ReactOS Calc" FONT 8, "MS Shell Dlg" @@ -322,7 +322,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Finestra di statistica" FONT 8, "MS Shell Dlg" @@ -339,7 +339,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "Modifica" BEGIN @@ -371,7 +371,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "Modifica" BEGIN @@ -404,7 +404,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "Modifica" BEGIN @@ -429,7 +429,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "ReactOS Calc e` software libero rilasciato sotto licenza GNU GPL.\r\n\r\nE` possibile ottenere una copia del testo della licenza GNU GPL all'indirizzo:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nE` possibile ottenere una traduzione del testo della licenza GNU GPL all'indirizzo:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Errore" @@ -437,7 +437,7 @@ BEGIN END // Categorie per le conversioni -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "Angoli" IDS_CONV_AREA "Area" @@ -455,7 +455,7 @@ BEGIN END // Tipi di angoli -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "Sessagesimali" IDS_ANGLE_GRADIANS "Centesimali (Gradienti)" @@ -463,7 +463,7 @@ BEGIN END // Tipi di aree -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "Acri" IDS_AREA_ACRES_BRAZIL "Acri (Brasile)" @@ -502,7 +502,7 @@ BEGIN END // Tipi di consumi -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Chilometri/litro" IDS_CONSUMPTION_L_PER_100_KM "Litri/100 chilometri" @@ -511,7 +511,7 @@ BEGIN END // Tipi di valute -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Scellino austriaco" IDS_CURRENCY_BELGIAN_FRANC "Franco belga" @@ -534,7 +534,7 @@ BEGIN END // Tipi di energie -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "15 ^C calorie" IDS_ENERGY_BTUS "British Thermal Units" @@ -551,7 +551,7 @@ BEGIN END // Tipi di lunghezze -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "Angstrom" IDS_LENGTH_ASTRONOMICAL_UNITS "Unità astronomiche" @@ -603,7 +603,7 @@ BEGIN END // Tipi di potenze -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "BTU al minuto" IDS_POWER_FPS_PER_MINUTE "Libbra per piede al minuto" @@ -614,7 +614,7 @@ BEGIN END // Tipi di pressione -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "Atmosfere" IDS_PRESSURE_BARS "Bar" @@ -626,7 +626,7 @@ BEGIN END // Tipi di temperature -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "Centigradi" IDS_TEMPERATURE_FAHRENHEIT "Fahrenheit" @@ -635,7 +635,7 @@ BEGIN END // Tipi di tempi -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "Giorni" IDS_TIME_HOURS "Ore" @@ -649,7 +649,7 @@ BEGIN END // Tipi di velocità -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "Centimetri/ora" IDS_VELOCITY_FEET_HOUR "Piedi/ora" @@ -662,7 +662,7 @@ BEGIN END // Tipi di volume -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "Barili (GB)" IDS_VOLUME_BARRELS_OIL "Barili petrolio" @@ -701,7 +701,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Baht" IDS_WEIGHT_CARATS "Carati" diff --git a/base/applications/calc/lang/ja-JP.rc b/base/applications/calc/lang/ja-JP.rc index f76f7db2f76..b3b1ca0d407 100644 --- a/base/applications/calc/lang/ja-JP.rc +++ b/base/applications/calc/lang/ja-JP.rc @@ -303,7 +303,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS 電卓について" FONT 9, "MS UI Gothic" @@ -322,7 +322,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Statistics box" FONT 9, "MS UI Gothic" @@ -339,7 +339,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "編集(&E)" BEGIN @@ -371,7 +371,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "編集(&E)" BEGIN @@ -404,7 +404,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "編集(&E)" BEGIN @@ -429,7 +429,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "ReactOS 電卓はGNU GPLライセンスの元で提供されるフリーソフトウェアです。\r\n\r\nこちらでGNU GPLライセンスのコピーを得ることができます:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nこちらでGNU GPLライセンスの翻訳を得ることができます:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "エラー" @@ -437,7 +437,7 @@ BEGIN END // Types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "角度" IDS_CONV_AREA "面積" @@ -455,7 +455,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "Degrees" IDS_ANGLE_GRADIANS "Gradians" @@ -463,7 +463,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "エーカー" IDS_AREA_ACRES_BRAZIL "エーカー (ブラジル)" @@ -502,7 +502,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "キロメートル/リットル" IDS_CONSUMPTION_L_PER_100_KM "リットル/100キロメートル" @@ -511,7 +511,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "オーストリア シリング" IDS_CURRENCY_BELGIAN_FRANC "ベルギー フラン" @@ -534,7 +534,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "15℃カロリー" IDS_ENERGY_BTUS "英国熱単位" @@ -551,7 +551,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "オングストローム" IDS_LENGTH_ASTRONOMICAL_UNITS "天文単位" @@ -603,7 +603,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "英国熱単位/分" IDS_POWER_FPS_PER_MINUTE "フートポンド/分" @@ -614,7 +614,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "気圧" IDS_PRESSURE_BARS "Bars" @@ -626,7 +626,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "摂氏" IDS_TEMPERATURE_FAHRENHEIT "華氏" @@ -635,7 +635,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "日数" IDS_TIME_HOURS "時間" @@ -649,7 +649,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "センチメートル/時" IDS_VELOCITY_FEET_HOUR "フィート/時" @@ -662,7 +662,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "バレル (英国)" IDS_VOLUME_BARRELS_OIL "石油バレル" @@ -701,7 +701,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Baht" IDS_WEIGHT_CARATS "カラット" diff --git a/base/applications/calc/lang/ko-KR.rc b/base/applications/calc/lang/ko-KR.rc index 91416575505..3a7c0eaf2b3 100644 --- a/base/applications/calc/lang/ko-KR.rc +++ b/base/applications/calc/lang/ko-KR.rc @@ -307,7 +307,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS 계산기 정보" FONT 8, "MS Shell Dlg" @@ -326,7 +326,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Statistics box" FONT 8, "MS Shell Dlg" @@ -343,7 +343,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "편집" BEGIN @@ -375,7 +375,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "편집" BEGIN @@ -408,7 +408,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "편집" BEGIN @@ -433,7 +433,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "ReactOS Calc is free software released under GNU GPL license.\r\n\r\nYou can get a copy of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nYou can also get a translation of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "에러" @@ -441,7 +441,7 @@ BEGIN END // Types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "각도" IDS_CONV_AREA "Area" @@ -459,7 +459,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "Degrees" IDS_ANGLE_GRADIANS "Gradians" @@ -467,7 +467,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "Acres" IDS_AREA_ACRES_BRAZIL "Acres (Brazil)" @@ -506,7 +506,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Kilometer/liter" IDS_CONSUMPTION_L_PER_100_KM "Liters/100 kilometers" @@ -515,7 +515,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Austrian schilling" IDS_CURRENCY_BELGIAN_FRANC "Belgian franc" @@ -538,7 +538,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "15 °C calories" IDS_ENERGY_BTUS "British Thermal Units" @@ -555,7 +555,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "옹스트롬" IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomical units" @@ -607,7 +607,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "British Thermal Units per minute" IDS_POWER_FPS_PER_MINUTE "Foot-Pounds per minute" @@ -618,7 +618,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "Atmospheres" IDS_PRESSURE_BARS "Bars" @@ -630,7 +630,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "Celsius" IDS_TEMPERATURE_FAHRENHEIT "Fahrenheit" @@ -639,7 +639,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "Days" IDS_TIME_HOURS "Hours" @@ -653,7 +653,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "Centimeters/hour" IDS_VELOCITY_FEET_HOUR "Feet/hour" @@ -666,7 +666,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "Barrels (UK)" IDS_VOLUME_BARRELS_OIL "Barrels oil" @@ -705,7 +705,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Baht" IDS_WEIGHT_CARATS "Carats" diff --git a/base/applications/calc/lang/nl-NL.rc b/base/applications/calc/lang/nl-NL.rc index 2ce9c4bb0c2..7d58d504a90 100644 --- a/base/applications/calc/lang/nl-NL.rc +++ b/base/applications/calc/lang/nl-NL.rc @@ -303,7 +303,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Over ReactOS Rekenmachine" FONT 8, "MS Shell Dlg" @@ -322,7 +322,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Statistiek-venster" FONT 8, "MS Shell Dlg" @@ -339,7 +339,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "Bewerken" BEGIN @@ -371,7 +371,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "Edit" BEGIN @@ -404,7 +404,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "Edit" BEGIN @@ -429,7 +429,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "De ReactOS Rekenmachine is free software gepubliceerd onder de GNU GPL licentie.\r\n\r\nU kan een kopie van GNU GPL licentie hier bezichtigen:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nU kan ook een vertaling van de GNU GPL licentie hier bezichtigen:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Fout" @@ -437,7 +437,7 @@ BEGIN END // Types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "Hoek" IDS_CONV_AREA "Oppervlakte" @@ -455,7 +455,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "Graden" IDS_ANGLE_GRADIANS "Gradiënten" @@ -463,7 +463,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "Acres" IDS_AREA_ACRES_BRAZIL "Acres (Brazil)" @@ -502,7 +502,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Kilometers/liter" IDS_CONSUMPTION_L_PER_100_KM "Liters/100 kilometer" @@ -511,7 +511,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Oostenrijkse schilling" IDS_CURRENCY_BELGIAN_FRANC "Belgische franc" @@ -534,7 +534,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "15 °C calorieën" IDS_ENERGY_BTUS "British thermal units" @@ -551,7 +551,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "Angstroms" IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomical units" @@ -603,7 +603,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "British Thermal Units per minuut" IDS_POWER_FPS_PER_MINUTE "Foot-Pounds per minuut" @@ -614,7 +614,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "Atmosfeer" IDS_PRESSURE_BARS "Bars" @@ -626,7 +626,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "Celsius" IDS_TEMPERATURE_FAHRENHEIT "Fahrenheit" @@ -635,7 +635,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "Dagen" IDS_TIME_HOURS "Uren" @@ -649,7 +649,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "Centimeters/uur" IDS_VELOCITY_FEET_HOUR "Feet/uur" @@ -662,7 +662,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "Barrels (UK)" IDS_VOLUME_BARRELS_OIL "Barrels oil" @@ -701,7 +701,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Baht" IDS_WEIGHT_CARATS "Karaat" diff --git a/base/applications/calc/lang/no-NO.rc b/base/applications/calc/lang/no-NO.rc index 48fd56f910f..95d62c54102 100644 --- a/base/applications/calc/lang/no-NO.rc +++ b/base/applications/calc/lang/no-NO.rc @@ -303,7 +303,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Om ReactOS Kalkulator" FONT 8, "MS Shell Dlg" @@ -322,7 +322,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "statistikk boks" FONT 8, "MS Shell Dlg" @@ -339,7 +339,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "Rediger" BEGIN @@ -371,7 +371,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "Rediger" BEGIN @@ -404,7 +404,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "Rediger" BEGIN @@ -429,7 +429,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "ReactOS Kalkulator er gratis programvare utgitt under GNU GPL lisensen.\r\n\r\nDu kan få en kopi av GNU GPL lisensen her:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nDu kan også få en oversettelse av GNU GPL lisensen her:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Feil" @@ -437,7 +437,7 @@ BEGIN END // Types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "Vinkel" IDS_CONV_AREA "Område" @@ -455,7 +455,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "Grader" IDS_ANGLE_GRADIANS "Gradianer" @@ -463,7 +463,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "Acres" IDS_AREA_ACRES_BRAZIL "Acres (Brasil)" @@ -502,7 +502,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Kilometer/liter" IDS_CONSUMPTION_L_PER_100_KM "Liter/100 kilometer" @@ -511,7 +511,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Østerriksk schilling" IDS_CURRENCY_BELGIAN_FRANC "Belgisk franc" @@ -534,7 +534,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "15 °C calories" IDS_ENERGY_BTUS "Britisk varme-enhet" @@ -551,7 +551,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "Angstroms" IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomical units" @@ -603,7 +603,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "Britisk varme-enhet per minutt" IDS_POWER_FPS_PER_MINUTE "Fot-pund per minutt" @@ -614,7 +614,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "Atmosfæretrykk" IDS_PRESSURE_BARS "Bars" @@ -626,7 +626,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "Celsius" IDS_TEMPERATURE_FAHRENHEIT "Fahrenheit" @@ -635,7 +635,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "**" IDS_TIME_HOURS "**" @@ -649,7 +649,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "Centimeter/timer" IDS_VELOCITY_FEET_HOUR "Fot/timer" @@ -662,7 +662,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "Barrels (UK)" IDS_VOLUME_BARRELS_OIL "Barrels oil" @@ -701,7 +701,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Baht" IDS_WEIGHT_CARATS "Carats" diff --git a/base/applications/calc/lang/pl-PL.rc b/base/applications/calc/lang/pl-PL.rc index 527316efa35..7d051f51f39 100644 --- a/base/applications/calc/lang/pl-PL.rc +++ b/base/applications/calc/lang/pl-PL.rc @@ -312,7 +312,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "O Kalkulatorze ReactOS" FONT 8, "MS Shell Dlg" @@ -331,7 +331,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Statystyka" FONT 8, "MS Shell Dlg" @@ -348,7 +348,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "Edycja" BEGIN @@ -380,7 +380,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "Edycja" BEGIN @@ -413,7 +413,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "Edycja" BEGIN @@ -438,7 +438,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "Kalkulator ReactOS jest darmowym programem, publikowanym zgodnie z licencją GNU GPL.\r\n\r\nMożesz otrzymać kopię licencji GNU GPL tutaj:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nTłumaczenie licencji GNU GPL znajdziesz tutaj:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Błąd" @@ -446,7 +446,7 @@ BEGIN END // Types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "Kąt" IDS_CONV_AREA "Powierzchnia" @@ -464,7 +464,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "Stopnie" IDS_ANGLE_GRADIANS "Gradiany" @@ -472,7 +472,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "Akry" IDS_AREA_ACRES_BRAZIL "Akry (Brazylia)" @@ -511,7 +511,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Kilometry/litr" IDS_CONSUMPTION_L_PER_100_KM "Litry/100 kilometrów" @@ -520,7 +520,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Austriacki szyling" IDS_CURRENCY_BELGIAN_FRANC "Belgijski frank" @@ -543,7 +543,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "15 °C kalorie" IDS_ENERGY_BTUS "British Thermal Unit" @@ -560,7 +560,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "Angsztremy" IDS_LENGTH_ASTRONOMICAL_UNITS "Jednostki Astronomiczne" @@ -612,7 +612,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "BTU na minutę" IDS_POWER_FPS_PER_MINUTE "Stopo-funty na minutę" @@ -623,7 +623,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "Atmosfery" IDS_PRESSURE_BARS "Bary" @@ -635,7 +635,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "Celsiusza" IDS_TEMPERATURE_FAHRENHEIT "Fahrenheita" @@ -644,7 +644,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "Dni" IDS_TIME_HOURS "Godziny" @@ -658,7 +658,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "Centymetry/sekundę" IDS_VELOCITY_FEET_HOUR "Stopy/godzinę" @@ -671,7 +671,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "Baryłki (UK)" IDS_VOLUME_BARRELS_OIL "Baryłki" @@ -710,7 +710,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Bahty" IDS_WEIGHT_CARATS "Karaty" diff --git a/base/applications/calc/lang/pt-BR.rc b/base/applications/calc/lang/pt-BR.rc index 87a12833259..955500e5e8f 100644 --- a/base/applications/calc/lang/pt-BR.rc +++ b/base/applications/calc/lang/pt-BR.rc @@ -305,7 +305,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Sobre Calc ReactOS" FONT 8, "MS Shell Dlg" @@ -324,7 +324,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Caixa de estatísticas" FONT 8, "MS Shell Dlg" @@ -341,7 +341,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "Editar" BEGIN @@ -373,7 +373,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "Editar" BEGIN @@ -406,7 +406,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "Editar" BEGIN @@ -431,7 +431,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "Calculadora ReactOS é um software livre lançado sobre a licença GNU GPL.\r\nVocê pode adquirir uma cópia da licença GNU GPL no endereço abaixo:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nVocê também pode adquirir uma tradução da licença GNU GPL no endereço abaixo:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Erro" @@ -439,7 +439,7 @@ BEGIN END // Types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "Ângulo" IDS_CONV_AREA "Área" @@ -457,7 +457,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "Graus" IDS_ANGLE_GRADIANS "Grados" @@ -465,7 +465,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "Acres" IDS_AREA_ACRES_BRAZIL "Acres (Brasil)" @@ -504,7 +504,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Quilômetros/litro" IDS_CONSUMPTION_L_PER_100_KM "Litros/100 quilômetros" @@ -513,7 +513,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Xelim austríaco" IDS_CURRENCY_BELGIAN_FRANC "Franco belga" @@ -536,7 +536,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "15 °C calorias" IDS_ENERGY_BTUS "British Thermal Unit" @@ -553,7 +553,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "Ångström" IDS_LENGTH_ASTRONOMICAL_UNITS "Unidade astronômica" @@ -605,7 +605,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "British Thermal Units por minuto" IDS_POWER_FPS_PER_MINUTE "Foot-Pounds por minuto" @@ -616,7 +616,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "Atmosferas" IDS_PRESSURE_BARS "Bars" @@ -628,7 +628,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "Celsius" IDS_TEMPERATURE_FAHRENHEIT "Fahrenheit" @@ -637,7 +637,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "Dias" IDS_TIME_HOURS "Horas" @@ -651,7 +651,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "Centímetros/hora" IDS_VELOCITY_FEET_HOUR "Pés/hora" @@ -664,7 +664,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "Barris (UK)" IDS_VOLUME_BARRELS_OIL "Barris de petróleo" @@ -703,7 +703,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Baht" IDS_WEIGHT_CARATS "Quilate" diff --git a/base/applications/calc/lang/ro-RO.rc b/base/applications/calc/lang/ro-RO.rc index 8c850640851..f6bb78a119e 100644 --- a/base/applications/calc/lang/ro-RO.rc +++ b/base/applications/calc/lang/ro-RO.rc @@ -304,7 +304,7 @@ BEGIN DEFPUSHBUTTON "", IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Despre Minicalculator" FONT 8, "MS Shell Dlg" @@ -325,7 +325,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Statistici" FONT 8, "MS Shell Dlg" @@ -342,7 +342,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "&Editare" BEGIN @@ -374,7 +374,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "&Editare" BEGIN @@ -407,7 +407,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "&Editare" BEGIN @@ -432,7 +432,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "Această aplicație este publică; fiind permisă modificarea și/sau (re)distribuția sa în termenii Licenței Publice Generale GNU publicată de Free Software Foundation; sau versiunea 2 a Licenței, sau (la alegere) a oricărei versiuni ulterioare.\r\n\r\nAceastă aplicație este distribuită doar în speranța de a fi utilă, FĂRĂ însă NICI O GARANȚIE; nici măcar cu garanția implicită a VANDABILITĂȚII sau a UTILITĂȚII ÎNTR-UN SCOP ANUME. Pentru mai multe detalii consultați Licența Publică Generală GNU.\r\n\r\nPuteți vedea această licență aici:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nDe asemenea puteți consulta traduceri neoficiale ale acestei licențe aici:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Eroare" @@ -440,7 +440,7 @@ BEGIN END // Types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "Unghi" IDS_CONV_AREA "Suprafață" @@ -458,7 +458,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "Grade" IDS_ANGLE_GRADIANS "Gradiani" @@ -466,7 +466,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "Acri" IDS_AREA_ACRES_BRAZIL "Acri (Brazilia)" @@ -505,7 +505,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Kilometri/litru" IDS_CONSUMPTION_L_PER_100_KM "Litri/100 kilometri" @@ -514,7 +514,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Șiling autriac" IDS_CURRENCY_BELGIAN_FRANC "Franc belgian" @@ -537,7 +537,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "Calorii 15 °C" IDS_ENERGY_BTUS "Unități termale britanice" @@ -554,7 +554,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "Ångströms" IDS_LENGTH_ASTRONOMICAL_UNITS "Unități astronomice" @@ -606,7 +606,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "Unități termice britanice pe minut" IDS_POWER_FPS_PER_MINUTE "Picior-livre pe minut" @@ -617,7 +617,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "Atmosfere" IDS_PRESSURE_BARS "Bari" @@ -629,7 +629,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "Celsius" IDS_TEMPERATURE_FAHRENHEIT "Fahrenheit" @@ -638,7 +638,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "Zile" IDS_TIME_HOURS "Ore" @@ -652,7 +652,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "Centimetri/oră" IDS_VELOCITY_FEET_HOUR "Picioare/oră" @@ -665,7 +665,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "Barili (Marea Britanie)" IDS_VOLUME_BARRELS_OIL "Barili de petrol" @@ -704,7 +704,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Baht" IDS_WEIGHT_CARATS "Carate" diff --git a/base/applications/calc/lang/ru-RU.rc b/base/applications/calc/lang/ru-RU.rc index d1218979e3a..d5a518c540e 100644 --- a/base/applications/calc/lang/ru-RU.rc +++ b/base/applications/calc/lang/ru-RU.rc @@ -303,7 +303,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "О программе" FONT 8, "MS Shell Dlg" @@ -322,7 +322,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Статистика" FONT 8, "MS Shell Dlg" @@ -339,7 +339,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "Правка" BEGIN @@ -371,7 +371,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "Правка" BEGIN @@ -404,7 +404,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "Правка" BEGIN @@ -429,7 +429,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "Калькулятор ReactOS - свободное программное обеспечение, распространяющееся по лицензии GNU GPL.\r\n\r\nВы можете получить копию лицензии GNU GPL здесь:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nОзнакомиться c переводом лицензии GNU GPL можно здесь:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Ошибка" @@ -437,7 +437,7 @@ BEGIN END // types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "Угол" IDS_CONV_AREA "Площадь" @@ -455,7 +455,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "градус" IDS_ANGLE_GRADIANS "град" @@ -463,7 +463,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "акр" IDS_AREA_ACRES_BRAZIL "акр (бразильский)" @@ -502,7 +502,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "километр/литр" IDS_CONSUMPTION_L_PER_100_KM "литров/100 километров" @@ -511,7 +511,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Австралийский шиллинг" IDS_CURRENCY_BELGIAN_FRANC "Бельгийский франк" @@ -534,7 +534,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "калория пятнадцатиградусная" IDS_ENERGY_BTUS "британская тепловая единица" @@ -551,7 +551,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "ангстрем" IDS_LENGTH_ASTRONOMICAL_UNITS "астрономическая еденица" @@ -603,7 +603,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "британская тепловая единица в минуту" IDS_POWER_FPS_PER_MINUTE "футофунт в минуту" @@ -614,7 +614,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "атмосфера (физическая)" IDS_PRESSURE_BARS "бар" @@ -626,7 +626,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "градус (по шкале Цельсия)" IDS_TEMPERATURE_FAHRENHEIT "градус (по шкале Фаренгейта)" @@ -635,7 +635,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "день" IDS_TIME_HOURS "час" @@ -649,7 +649,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "сантиметр в час" IDS_VELOCITY_FEET_HOUR "фут в час" @@ -662,7 +662,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "баррель (британский)" IDS_VOLUME_BARRELS_OIL "баррель нефтяной" @@ -701,7 +701,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "бат" IDS_WEIGHT_CARATS "карат" diff --git a/base/applications/calc/lang/sk-SK.rc b/base/applications/calc/lang/sk-SK.rc index aa1da09d004..e44ef9f0735 100644 --- a/base/applications/calc/lang/sk-SK.rc +++ b/base/applications/calc/lang/sk-SK.rc @@ -311,7 +311,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Čo je kalkulačka systému ReactOS" FONT 8, "MS Shell Dlg" @@ -330,7 +330,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Štatistika" FONT 8, "MS Shell Dlg" @@ -347,7 +347,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "Úpravy" BEGIN @@ -379,7 +379,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "Úpravy" BEGIN @@ -412,7 +412,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "Úpravy" BEGIN @@ -437,7 +437,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "Kalkulačka systému ReactOS je voľný softvér vydaný pod licenciou GNU GPL.\r\n\r\nKópiu licencie GNU GPL môžete získať tu:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nRovnako môžete získať preklad licencie GNU GPL tu:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Chyba" @@ -445,7 +445,7 @@ BEGIN END // Types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "Uhol" IDS_CONV_AREA "Plocha" @@ -463,7 +463,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "Stupne" IDS_ANGLE_GRADIANS "Grady" @@ -471,7 +471,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "Akre" IDS_AREA_ACRES_BRAZIL "Akre (Brazília)" @@ -510,7 +510,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Kilometer/liter" IDS_CONSUMPTION_L_PER_100_KM "Litre/100 kilometerov" @@ -519,7 +519,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Rakúsky šiling" IDS_CURRENCY_BELGIAN_FRANC "Belgický frank" @@ -542,7 +542,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "15 °C calories" IDS_ENERGY_BTUS "Britské termálne jednotky" @@ -559,7 +559,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "Angstroms" IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomical units" @@ -611,7 +611,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "Britské termálne jednotky za minútu" IDS_POWER_FPS_PER_MINUTE "Foot-Pounds za minútu" @@ -622,7 +622,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "Atmosféry" IDS_PRESSURE_BARS "Bary" @@ -634,7 +634,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "Celsius" IDS_TEMPERATURE_FAHRENHEIT "Fahrenheit" @@ -643,7 +643,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "Dni" IDS_TIME_HOURS "Hodiny" @@ -657,7 +657,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "Centimetre/hodinu" IDS_VELOCITY_FEET_HOUR "Stopy/hodinu" @@ -670,7 +670,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "Barely (UK)" IDS_VOLUME_BARRELS_OIL "Barely ropy" //oleja? @@ -709,7 +709,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Baht" IDS_WEIGHT_CARATS "Karáty" diff --git a/base/applications/calc/lang/sv-SE.rc b/base/applications/calc/lang/sv-SE.rc index 9819f1a52c1..5aa1d26b61a 100644 --- a/base/applications/calc/lang/sv-SE.rc +++ b/base/applications/calc/lang/sv-SE.rc @@ -310,7 +310,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Om ReactOS Kalkylator" FONT 8, "MS Shell Dlg" @@ -329,7 +329,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Statistik box" FONT 8, "MS Shell Dlg" @@ -346,7 +346,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "Redigera" BEGIN @@ -378,7 +378,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "Redigera" BEGIN @@ -411,7 +411,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "Redigera" BEGIN @@ -436,7 +436,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "ReactOS Kalkylator är gratis programvara utgivet under GNU GPL licensen.\r\n\r\nDu kan få en kopia av GNU GPL licensen här:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nDu kan också få en översättning av GNU GPL lisensen här:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Fel" @@ -444,7 +444,7 @@ BEGIN END // Types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "Vinkel" IDS_CONV_AREA "Område" @@ -462,7 +462,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "Grader" IDS_ANGLE_GRADIANS "Gradianer" @@ -470,7 +470,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "Tunnland" IDS_AREA_ACRES_BRAZIL "Tunnland (Brasil)" @@ -509,7 +509,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Kilometer/liter" IDS_CONSUMPTION_L_PER_100_KM "Liter/100 kilometer" @@ -518,7 +518,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Österriksk schilling" IDS_CURRENCY_BELGIAN_FRANC "Belgisk franc" @@ -541,7 +541,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "15 °C calories" IDS_ENERGY_BTUS "Britisk värme-enhet" @@ -558,7 +558,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "Ångström" IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomical units" @@ -610,7 +610,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "Britisk värme-enhet per minut" IDS_POWER_FPS_PER_MINUTE "Fot-pund per minut" @@ -621,7 +621,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "Atmosfär" IDS_PRESSURE_BARS "Bar" @@ -633,7 +633,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "Celsius" IDS_TEMPERATURE_FAHRENHEIT "Fahrenheit" @@ -642,7 +642,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "**" IDS_TIME_HOURS "**" @@ -656,7 +656,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "Centimeter/time" IDS_VELOCITY_FEET_HOUR "Fot/timme" @@ -669,7 +669,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "Barrels (UK)" IDS_VOLUME_BARRELS_OIL "Barrels oil" @@ -708,7 +708,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Baht" IDS_WEIGHT_CARATS "Carats" diff --git a/base/applications/calc/lang/th-TH.rc b/base/applications/calc/lang/th-TH.rc index 8cf1a06d742..c7ccfd1f6b8 100644 --- a/base/applications/calc/lang/th-TH.rc +++ b/base/applications/calc/lang/th-TH.rc @@ -308,7 +308,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "เกี่ยวกับ ReactOS Calc" FONT 8, "MS Shell Dlg" @@ -327,7 +327,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "กล่องสถานะ" FONT 8, "MS Shell Dlg" @@ -344,7 +344,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "แ&ก้ไข" BEGIN @@ -376,7 +376,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "แ&ก้ไข" BEGIN @@ -409,7 +409,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "แ&ก้ไข" BEGIN @@ -434,7 +434,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "ReactOS Calc is free software released under GNU GPL license.\r\n\r\nYou can get a copy of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nYou can also get a translation of GNU GPL license here:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "ผิดพลาด" @@ -442,7 +442,7 @@ BEGIN END // types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "มุม" IDS_CONV_AREA "พื้นที่" @@ -460,7 +460,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "องศา" IDS_ANGLE_GRADIANS "เกรเดียน" @@ -468,7 +468,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "Acres" IDS_AREA_ACRES_BRAZIL "Acres (Brazil)" @@ -507,7 +507,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Kilometer/liter" IDS_CONSUMPTION_L_PER_100_KM "Liters/100 kilometers" @@ -516,7 +516,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Austrian schilling" IDS_CURRENCY_BELGIAN_FRANC "Belgian franc" @@ -539,7 +539,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "15 ^0C แคลอรี" IDS_ENERGY_BTUS "British Thermal Units" @@ -556,7 +556,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "Angstroms" IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomical units" @@ -608,7 +608,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "British Thermal Units per minute" IDS_POWER_FPS_PER_MINUTE "Foot-Pounds per minute" @@ -619,7 +619,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "Atmospheres" IDS_PRESSURE_BARS "Bars" @@ -631,7 +631,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "Celsius" IDS_TEMPERATURE_FAHRENHEIT "Fahrenheit" @@ -640,7 +640,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "Days" IDS_TIME_HOURS "Hours" @@ -654,7 +654,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "Centimeters/hour" IDS_VELOCITY_FEET_HOUR "Feet/hour" @@ -667,7 +667,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "Barrels (UK)" IDS_VOLUME_BARRELS_OIL "Barrels oil" @@ -706,7 +706,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Baht" IDS_WEIGHT_CARATS "Carats" diff --git a/base/applications/calc/lang/tr-TR.rc b/base/applications/calc/lang/tr-TR.rc index e661e1ffff7..4a271ae5c02 100644 --- a/base/applications/calc/lang/tr-TR.rc +++ b/base/applications/calc/lang/tr-TR.rc @@ -38,7 +38,7 @@ BEGIN BS_NOTIFY | WS_DISABLED | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "BG",IDC_BUTTON_FE,38,60,24,18,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "dms",IDC_BUTTON_DMS,38,80,24,18,BS_CENTER | BS_VCENTER | + PUSHBUTTON "DDS",IDC_BUTTON_DMS,38,80,24,18,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "sin",IDC_BUTTON_SIN,38,100,24,18,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP @@ -74,7 +74,7 @@ BEGIN BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "BA",IDC_BUTTON_MP,123,120,24,18,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "π",IDC_BUTTON_PI,123,140,24,18,BS_CENTER | BS_VCENTER | + PUSHBUTTON "pi",IDC_BUTTON_PI,123,140,24,18,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "7",IDC_BUTTON_7,156,60,24,18,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP @@ -120,7 +120,7 @@ BEGIN BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "Veyâ",IDC_BUTTON_OR,260,80,24,18,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP - PUSHBUTTON "Sol",IDC_BUTTON_LSH,260,100,24,18,BS_CENTER | + PUSHBUTTON "Sola",IDC_BUTTON_LSH,260,100,24,18,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP PUSHBUTTON "=",IDC_BUTTON_EQU,260,120,24,18,BS_CENTER | BS_VCENTER | BS_NOTIFY | BS_OWNERDRAW | WS_TABSTOP @@ -143,7 +143,7 @@ BEGIN NOT WS_VISIBLE,190,21,38,10 CONTROL "Sözcük",IDC_RADIO_WORD,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,230,21,38,10 - CONTROL "Sekizlik",IDC_RADIO_BYTE,"Button",BS_AUTORADIOBUTTON | NOT + CONTROL "Çoklu",IDC_RADIO_BYTE,"Button",BS_AUTORADIOBUTTON | NOT WS_VISIBLE,270,21,38,10 CONTROL "Derece",IDC_RADIO_DEG,"Button",BS_AUTORADIOBUTTON, 150,21,45,10 @@ -307,7 +307,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Hesap Makinesi Hakkında" FONT 8, "MS Shell Dlg" @@ -326,7 +326,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Sayımlama Kutusu" FONT 8, "MS Shell Dlg" @@ -343,7 +343,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "&Düzen" BEGIN @@ -375,7 +375,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "&Düzen" BEGIN @@ -395,8 +395,8 @@ BEGIN MENUITEM SEPARATOR MENUITEM "Dö&rtlü Sözcük\tF12", IDM_VIEW_QWORD, CHECKED MENUITEM "İ&kili Sözcük\tF2", IDM_VIEW_DWORD, CHECKED - MENUITEM "Söz&cük\tF3", IDM_VIEW_WORD, CHECKED - MENUITEM "Seki&zlik\tF4", IDM_VIEW_BYTE, CHECKED + MENUITEM "Sö&zcük\tF3", IDM_VIEW_WORD, CHECKED + MENUITEM "&Çoklu\tF4", IDM_VIEW_BYTE, CHECKED MENUITEM SEPARATOR MENUITEM "B&asamak Ayırıcısı", IDM_VIEW_GROUP, CHECKED END @@ -408,7 +408,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "&Düzen" BEGIN @@ -433,7 +433,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "Hesap Makinesi, GNU GPL ile yayınlanan özgür bir yazılımdır.\r\n\r\nGNU GPL'nin bir tıpkısını buradan elde edebilirsiniz:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nBir de GNU GPL'nin çevirilerini buradan elde edebilirsiniz:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Yanlışlık" @@ -441,7 +441,7 @@ BEGIN END // Types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "Açı" IDS_CONV_AREA "Alan" @@ -459,7 +459,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "Derece" IDS_ANGLE_GRADIANS "Gradyan" @@ -467,7 +467,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "Akre" IDS_AREA_ACRES_BRAZIL "Akre (Brezilya)" @@ -506,7 +506,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Kilometre/Litre" IDS_CONSUMPTION_L_PER_100_KM "Litre/100 Kilometre" @@ -515,7 +515,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Avusturya Şilini" IDS_CURRENCY_BELGIAN_FRANC "Belçika Frangı" @@ -538,7 +538,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "Kalori (15°C)" IDS_ENERGY_BTUS "İngiliz Isı Birimi" @@ -555,7 +555,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "Angström" IDS_LENGTH_ASTRONOMICAL_UNITS "Astronomi birimi" @@ -607,7 +607,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "Dakîkadaki İngiliz Isı Birimi" IDS_POWER_FPS_PER_MINUTE "Dakîkadaki ayak pond kuvveti" @@ -618,7 +618,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "Gaz yuvarı" IDS_PRESSURE_BARS "Bar" @@ -630,7 +630,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "Selsiyus" IDS_TEMPERATURE_FAHRENHEIT "Fahrenayt" @@ -639,7 +639,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "Gün" IDS_TIME_HOURS "Saat" @@ -653,7 +653,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "Santimetre/Saat" IDS_VELOCITY_FEET_HOUR "Ayak/Saat" @@ -666,7 +666,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "Fıçı (BB)" IDS_VOLUME_BARRELS_OIL "Yağ Fıçısı" @@ -705,7 +705,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Baht" IDS_WEIGHT_CARATS "Ayar" diff --git a/base/applications/calc/lang/uk-UA.rc b/base/applications/calc/lang/uk-UA.rc index 757a04b6879..d9cc1b5373c 100644 --- a/base/applications/calc/lang/uk-UA.rc +++ b/base/applications/calc/lang/uk-UA.rc @@ -311,7 +311,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Про Калькулятор ReactOS" FONT 8, "MS Shell Dlg" @@ -330,7 +330,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Статистика" FONT 8, "MS Shell Dlg" @@ -347,7 +347,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "Правка" BEGIN @@ -379,7 +379,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "Правка" BEGIN @@ -412,7 +412,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "Правка" BEGIN @@ -437,7 +437,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "Калькулятор ReactOS - вільне програмне забезпечення, випущене за ліцензією GNU GPL.\r\n\r\nВи можете отримати копію ліцензії GNU GPL тут:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nВи можете також отримати переклад ліцензії GNU GPL тут:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "Помилка" @@ -445,7 +445,7 @@ BEGIN END // types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "Кут" IDS_CONV_AREA "Площа" @@ -463,7 +463,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "Градус" IDS_ANGLE_GRADIANS "Град" @@ -471,7 +471,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "Акр" IDS_AREA_ACRES_BRAZIL "Акр (бразильський)" @@ -510,7 +510,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "Кілометр/літр" IDS_CONSUMPTION_L_PER_100_KM "Літрів/100 кілометрів" @@ -519,7 +519,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "Австралійський шилінг" IDS_CURRENCY_BELGIAN_FRANC "Бельгійський франк" @@ -542,7 +542,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "Калорія 15-градусна" IDS_ENERGY_BTUS "Британська теплова одиниця" @@ -559,7 +559,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "Ангстрем" IDS_LENGTH_ASTRONOMICAL_UNITS "Астрономічна одиниця" @@ -611,7 +611,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "Британська теплова одиниця за хвилину" IDS_POWER_FPS_PER_MINUTE "Футо-фунт за хвилину" @@ -622,7 +622,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "Атмосфера (Фізична)" IDS_PRESSURE_BARS "Бар" @@ -634,7 +634,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "Градус (за шкалою Цельсія)" IDS_TEMPERATURE_FAHRENHEIT "Градус (за шкалою Фаренгейта)" @@ -643,7 +643,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "Доба" IDS_TIME_HOURS "Година" @@ -657,7 +657,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "Сантиметр за годину" IDS_VELOCITY_FEET_HOUR "Фут за годину" @@ -670,7 +670,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "Барель (британський)" IDS_VOLUME_BARRELS_OIL "Барель нафти" @@ -709,7 +709,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "Бат" IDS_WEIGHT_CARATS "Карат" diff --git a/base/applications/calc/lang/zh-CN.rc b/base/applications/calc/lang/zh-CN.rc index 00673d82483..53d4cb7db52 100644 --- a/base/applications/calc/lang/zh-CN.rc +++ b/base/applications/calc/lang/zh-CN.rc @@ -309,7 +309,7 @@ BEGIN DEFPUSHBUTTON "",IDC_BUTTON_FOCUS,0,0,5,5,NOT WS_VISIBLE END -IDD_DIALOG_ABOUT DIALOGEX DISCARDABLE 0, 0, 264, 169 +IDD_DIALOG_ABOUT DIALOGEX 0, 0, 264, 169 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "关于 ReactOS 计算器" FONT 8, "MS Shell Dlg" @@ -328,7 +328,7 @@ BEGIN WS_VSCROLL END -IDD_DIALOG_STAT DIALOGEX DISCARDABLE 0, 0, 163, 85 +IDD_DIALOG_STAT DIALOGEX 0, 0, 163, 85 STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "统计框" FONT 8, "MS Shell Dlg" @@ -345,7 +345,7 @@ END // Menus -IDR_MENU_SCIENTIFIC_1 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_1 MENU BEGIN POPUP "编辑" BEGIN @@ -377,7 +377,7 @@ BEGIN END END -IDR_MENU_SCIENTIFIC_2 MENU DISCARDABLE +IDR_MENU_SCIENTIFIC_2 MENU BEGIN POPUP "编辑" BEGIN @@ -410,7 +410,7 @@ BEGIN END END -IDR_MENU_STANDARD MENU DISCARDABLE +IDR_MENU_STANDARD MENU BEGIN POPUP "编辑" BEGIN @@ -435,7 +435,7 @@ END // String Tables -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STRING_LICENSE "ReactOS 计算器是在 GNU GPL 协议下发行的自由软件。\r\n\r\n你可以从这儿取得一份 GNU GPL 协议的副本:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\n你也可以从这儿取得其翻译:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_MATH_ERROR "错误" @@ -443,7 +443,7 @@ BEGIN END // Types of conversion -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONV_ANGLE "角" IDS_CONV_AREA "面积" @@ -461,7 +461,7 @@ BEGIN END // TYPES OF ANGLES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ANGLE_DEGREES "角度" IDS_ANGLE_GRADIANS "梯度" @@ -469,7 +469,7 @@ BEGIN END // TYPES OF AREAS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AREA_ACRES "英亩" IDS_AREA_ACRES_BRAZIL "英亩 (巴西)" @@ -508,7 +508,7 @@ BEGIN END // TYPES OF COMSUMPTIONS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CONSUMPTION_KM_PER_L "千米/升" IDS_CONSUMPTION_L_PER_100_KM "升/100 千米" @@ -517,7 +517,7 @@ BEGIN END // TYPES OF CURRENCIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CURRENCY_AUSTRIAN_SCHILLING "奥地利先令" IDS_CURRENCY_BELGIAN_FRANC "比利时法郎" @@ -540,7 +540,7 @@ BEGIN END // TYPES OF ENERGIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ENERGY_15_C_CALORIES "15 °C 卡路里" IDS_ENERGY_BTUS "英制热量单位" @@ -557,7 +557,7 @@ BEGIN END // TYPES OF LENGTHS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LENGTH_ANGSTROMS "埃" IDS_LENGTH_ASTRONOMICAL_UNITS "天文单位" @@ -609,7 +609,7 @@ BEGIN END // TYPES OF POWERS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_POWER_BTUS_PER_MINUTE "英制热量单位每分钟" IDS_POWER_FPS_PER_MINUTE "英尺-磅每分钟" @@ -620,7 +620,7 @@ BEGIN END // TYPE OF PRESSURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PRESSURE_ATMOSPHERES "大气压" IDS_PRESSURE_BARS "巴" @@ -632,7 +632,7 @@ BEGIN END // TYPES OF TEMPERATURES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TEMPERATURE_CELSIUS "摄氏度" IDS_TEMPERATURE_FAHRENHEIT "华氏度" @@ -641,7 +641,7 @@ BEGIN END // TYPES OF TIME -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TIME_DAYS "日" IDS_TIME_HOURS "小时" @@ -655,7 +655,7 @@ BEGIN END // TYPES OF VELOCITIES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VELOCITY_CMS_SECOND "厘米/小时" IDS_VELOCITY_FEET_HOUR "英尺/小时" @@ -668,7 +668,7 @@ BEGIN END // TYPES OF VOLUMES -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VOLUME_BARRELS_UK "桶 (英国)" IDS_VOLUME_BARRELS_OIL "桶油" @@ -707,7 +707,7 @@ BEGIN END // TYPES OF WEIGHTS -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_WEIGHT_BAHT "铢" IDS_WEIGHT_CARATS "克拉" diff --git a/base/applications/calc/resource.rc b/base/applications/calc/resource.rc index 123703b43b2..08b3c92d50a 100644 --- a/base/applications/calc/resource.rc +++ b/base/applications/calc/resource.rc @@ -37,12 +37,14 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL // Icons -IDI_CALC_BIG ICON DISCARDABLE "res/calc.ico" -IDI_CALC_SMALL ICON DISCARDABLE "res/calc_sm.ico" +IDI_CALC_BIG ICON "res/calc.ico" +IDI_CALC_SMALL ICON "res/calc_sm.ico" // Bitmaps -IDB_BITMAP_ROS BITMAP DISCARDABLE "res/ROS_logo.bmp" +IDB_BITMAP_ROS BITMAP "res/ROS_logo.bmp" + +#include // UTF-8 #pragma code_page(65001) diff --git a/base/applications/charmap/charmap.rc b/base/applications/charmap/charmap.rc index 67d878a6b77..f3435d161d8 100644 --- a/base/applications/charmap/charmap.rc +++ b/base/applications/charmap/charmap.rc @@ -14,4 +14,6 @@ IDI_ICON ICON "res/charmap.ico" #define REACTOS_STR_ORIGINAL_FILENAME "charmap.exe\0" #include +#include + #include "rsrc.rc" diff --git a/base/applications/charmap/lang/bg-BG.rc b/base/applications/charmap/lang/bg-BG.rc index 13fadcfd082..2e3a0c4dad1 100644 --- a/base/applications/charmap/lang/bg-BG.rc +++ b/base/applications/charmap/lang/bg-BG.rc @@ -44,7 +44,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "&За..." diff --git a/base/applications/charmap/lang/ca-ES.rc b/base/applications/charmap/lang/ca-ES.rc index f0b02adad9c..3028af96545 100644 --- a/base/applications/charmap/lang/ca-ES.rc +++ b/base/applications/charmap/lang/ca-ES.rc @@ -41,7 +41,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "&En quant a..." diff --git a/base/applications/charmap/lang/cs-CZ.rc b/base/applications/charmap/lang/cs-CZ.rc index 860a4509d1f..b962bd167ce 100644 --- a/base/applications/charmap/lang/cs-CZ.rc +++ b/base/applications/charmap/lang/cs-CZ.rc @@ -46,7 +46,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "&O programu..." diff --git a/base/applications/charmap/lang/de-DE.rc b/base/applications/charmap/lang/de-DE.rc index e85e0326eda..30c1d139f68 100644 --- a/base/applications/charmap/lang/de-DE.rc +++ b/base/applications/charmap/lang/de-DE.rc @@ -41,7 +41,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Dieses Programm ist kostenlos; Sie können es frei verteilen mit od. ohne Änderungen unter der GNU Lesser General Public License wie es von der Free Software Foundation veröffentlicht wurde; entweder Version 2.1 der Lizenz, oder eine spätere Version (ihrer Wahl).\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "Ü&ber..." diff --git a/base/applications/charmap/lang/el-GR.rc b/base/applications/charmap/lang/el-GR.rc index 0a1acda5bcc..41ac2353f08 100644 --- a/base/applications/charmap/lang/el-GR.rc +++ b/base/applications/charmap/lang/el-GR.rc @@ -41,7 +41,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "&Πληροφορίες..." diff --git a/base/applications/charmap/lang/en-US.rc b/base/applications/charmap/lang/en-US.rc index 6e9e5f51d5f..aa612c6dd39 100644 --- a/base/applications/charmap/lang/en-US.rc +++ b/base/applications/charmap/lang/en-US.rc @@ -41,7 +41,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "A&bout..." diff --git a/base/applications/charmap/lang/es-ES.rc b/base/applications/charmap/lang/es-ES.rc index a15d8b3fe70..98bb167222e 100644 --- a/base/applications/charmap/lang/es-ES.rc +++ b/base/applications/charmap/lang/es-ES.rc @@ -41,7 +41,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "&Acerca de ..." diff --git a/base/applications/charmap/lang/fr-FR.rc b/base/applications/charmap/lang/fr-FR.rc index 0811927ae83..3b2e99a8362 100644 --- a/base/applications/charmap/lang/fr-FR.rc +++ b/base/applications/charmap/lang/fr-FR.rc @@ -41,7 +41,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier tout en respectant les termes de la ""GNU General Public License"" publiée par la Free Software Foundation; dans sa version 2 (ou selon votre préférence) toute version ultérieure.\r\n\r\nCe programme est distribué dans l'espoir qu'il sera utile, cependant SANS GARANTIE D'AUCUNE SORTE ; sans même une garantie implicite de COMMERCIABILITÉ ou DE CONFORMITÉ À UNE UTILISATION PARTICULIÈRE. \r\n\r\nVoir la Licence Publique Générale GNU pour plus de détails. Vous devriez avoir reçu un exemplaire de la Licence Publique Générale GNU avec ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "À propos..." diff --git a/base/applications/charmap/lang/he-IL.rc b/base/applications/charmap/lang/he-IL.rc index 6edb893e679..c75f725df3c 100644 --- a/base/applications/charmap/lang/he-IL.rc +++ b/base/applications/charmap/lang/he-IL.rc @@ -42,7 +42,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "&אודות..." diff --git a/base/applications/charmap/lang/id-ID.rc b/base/applications/charmap/lang/id-ID.rc index a2c2cae4b96..c810ae65637 100644 --- a/base/applications/charmap/lang/id-ID.rc +++ b/base/applications/charmap/lang/id-ID.rc @@ -41,7 +41,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Program ini adalah software bebas; anda dapat mendistribusikan dan/atau mengubahnya di bawah term GNU General Public License seperti dipublikasikan oleh Free Software Foundation; baik Lisensi versi 2, atau (menurut opini anda) setiap versi berikutnya.\r\n\r\nProgram ini didistribusikan dengan harapan ia akan berguna, tetapi TANPA JAMINAN APAPUN; bahkan tanpa jaminan berarti dari MERCANTABILITAS atau KECUKUPAN UNTUK KEPERLUAN TERTENTU. Lihat GNU General Public License untuk lebih jelasnya.\r\n\r\nAnda seharusnya menerima duplikat GNU General Public License bersamaan dengan program ini; jika tidak, tulis ke Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "Te&ntang..." diff --git a/base/applications/charmap/lang/it-IT.rc b/base/applications/charmap/lang/it-IT.rc index eb1964542a3..bf8220f9777 100644 --- a/base/applications/charmap/lang/it-IT.rc +++ b/base/applications/charmap/lang/it-IT.rc @@ -41,7 +41,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Questo programma è software libero; può redistribuirlo e/o modificarlo sotto\ni termini della licenza pubblica GNU come pubblicata dalla Free Software Foundation; sia la versione 2 sia una versione successiva (a sua scelta).\r\n\r\nQuesto programma è distribuito\nnella speranza che sia utile, ma SENZA ALCUNA GARANZIA; senza neanche la garanzia implicita\ndi NEGOZIABILITA' o APPLICABILITA' per un particolare scopo. Si veda la licenza generale pubblica GNU per maggiori dettagli.\r\n\r\nDovrebbe aver ricevuto una copia assieme a questo programma; se così non fosse, scriva alla Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "&Informazioni su..." diff --git a/base/applications/charmap/lang/ja-JP.rc b/base/applications/charmap/lang/ja-JP.rc index c32cf8ae32c..8b4acece2ee 100644 --- a/base/applications/charmap/lang/ja-JP.rc +++ b/base/applications/charmap/lang/ja-JP.rc @@ -41,7 +41,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "バージョン情報(&B)..." diff --git a/base/applications/charmap/lang/ko-KR.rc b/base/applications/charmap/lang/ko-KR.rc index 1be87c3af9e..00c2f6765bf 100644 --- a/base/applications/charmap/lang/ko-KR.rc +++ b/base/applications/charmap/lang/ko-KR.rc @@ -45,7 +45,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "정보(&A)" diff --git a/base/applications/charmap/lang/lt-LT.rc b/base/applications/charmap/lang/lt-LT.rc index 378efa90ea5..2dc06dd8ece 100644 --- a/base/applications/charmap/lang/lt-LT.rc +++ b/base/applications/charmap/lang/lt-LT.rc @@ -50,7 +50,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "&Apie..." diff --git a/base/applications/charmap/lang/nl-NL.rc b/base/applications/charmap/lang/nl-NL.rc index c3bcac45066..bc672b9a2ca 100644 --- a/base/applications/charmap/lang/nl-NL.rc +++ b/base/applications/charmap/lang/nl-NL.rc @@ -41,7 +41,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "Over..." diff --git a/base/applications/charmap/lang/no-NO.rc b/base/applications/charmap/lang/no-NO.rc index 7a003b16c92..ecaee2ef729 100644 --- a/base/applications/charmap/lang/no-NO.rc +++ b/base/applications/charmap/lang/no-NO.rc @@ -41,7 +41,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Dette programmet er gratis programvare; du kan distribuere det og/eller endre det under betingelsene av GNU General Public License som er utgitt av Free Software Foundation; version 2 av lisensen, eller (etter din mening) alle senere versjoner.\r\n\r\nDette programmet er utgitt i håp for at det skal kunne brukes, men DET ER INGEN GARANTIER; uten heller forutsatt garantier av SALGBARHET eller SIKKETHET FOR EN ENKELTHET FORMÅL. Se på GNU General Public Lisensen for mere detaljer.\r\n\r\nDu skal ha motatt en kopi av GNU General Public Lisensen sammen med denne programmet; hvis du ikke har motatt det, skriv til Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "O&m..." diff --git a/base/applications/charmap/lang/pl-PL.rc b/base/applications/charmap/lang/pl-PL.rc index ba912b4efd4..1661ec48521 100644 --- a/base/applications/charmap/lang/pl-PL.rc +++ b/base/applications/charmap/lang/pl-PL.rc @@ -50,7 +50,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Niniejszy program jest wolnym oprogramowaniem; możesz go rozprowadzać dalej i/lub modyfikować na warunkach Powszechnej Licencji Publicznej GNU, wydanej przez Fundację Wolnego Oprogramowania - według wersji 2 tej Licencji lub (według twojego wyboru) którejś z późniejszych wersji.\r\n\r\nNiniejszy program rozpowszechniany jest z nadzieją, iż będzie on użyteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domyślnej gwarancji PRZYDATNOŚCI HANDLOWEJ albo PRZYDATNOŚCI DO OKRESLONYCH ZASTOSOWAŃ. W celu uzyskania bliższych informacji sięgnij do Powszechnej Licencji Publicznej GNU.\r\n\r\nZ pewnością wraz z niniejszym programem otrzymałeś też egzemplarz Powszechnej Licencji Publicznej GNU (GNU General Public License); jeśli nie - napisz do Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "&O programie..." diff --git a/base/applications/charmap/lang/pt-BR.rc b/base/applications/charmap/lang/pt-BR.rc index fccdee88a4e..957f46de0b9 100644 --- a/base/applications/charmap/lang/pt-BR.rc +++ b/base/applications/charmap/lang/pt-BR.rc @@ -41,7 +41,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Este programa é software livre; você pode redistribuí-lo e/ou modificá-lo sob os termos da GNU General Public License conforme publicada pela Free Software Foundation; quer a versão 2 da licença, ou (conforme você escolha) qualquer versão posterior.\r\n\r\nEste programa é distribuído com a esperança de que seja útil, mas SEM QUALQUER GARANTIA; mesmo sem a garantia implícita de MERCANTIBILIDADE OU ADEQUAÇÃO A UM DETERMINADO PROPÓSITO. Para mais detalhes, veja a GNU General Public License.\r\n\r\nVocê deve ter recebido uma cópia da GNU General Public License juntamente com este programa; caso contrário, escreva para a Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA." IDS_ABOUT "So&bre..." diff --git a/base/applications/charmap/lang/ro-RO.rc b/base/applications/charmap/lang/ro-RO.rc index 081a55a73e7..e351f391c69 100644 --- a/base/applications/charmap/lang/ro-RO.rc +++ b/base/applications/charmap/lang/ro-RO.rc @@ -48,7 +48,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 254, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Această aplicație este publică; fiind permisă modificarea și/sau (re)distribuția sa în termenii Licenței Publice Generale GNU publicată de Free Software Foundation; sau versiunea 2 a Licenței, sau (la alegere) a oricărei versiuni ulterioare.\r\n\r\nAceastă aplicație este distribuită doar în speranța de a fi utilă, FĂRĂ însă NICI O GARANȚIE; nici măcar cu garanția implicită a VANDABILITĂȚII sau a UTILITĂȚII ÎNTR-UN SCOP ANUME. Pentru mai multe detalii consultați Licența Publică Generală GNU.\r\n\r\nPuteți vedea această licență aici:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nDe asemenea puteți consulta traduceri neoficiale ale acestei licențe aici:\r\nhttp://www.gnu.org/licenses/translations.html" IDS_ABOUT "&Despre…" diff --git a/base/applications/charmap/lang/ru-RU.rc b/base/applications/charmap/lang/ru-RU.rc index f5e24751a64..0ab45823aa6 100644 --- a/base/applications/charmap/lang/ru-RU.rc +++ b/base/applications/charmap/lang/ru-RU.rc @@ -43,7 +43,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Эта программа является свободно распространяемой; Вы можете распространять ее повторно и (или) изменять, соблюдая условия Открытого лицензионного соглашения GNU, опубликованного Фондом свободно распространяемого программного обеспечения; либо редакции 2 Соглашения, либо (на ваше усмотрение) любой редакции, выпущенной позже.\r\n\r\nЭта программа распространяется в надежде на то, что она окажется полезной, но БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ, включая подразумеваемую гарантию КАЧЕСТВА либо ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННЫХ ЦЕЛЕЙ. Подробности содержатся в Открытом лицензионном соглашении GNU.\r\n\r\nВместе с этой программой должен распространяться экземпляр Открытого лицензионного соглашения GNU, если он отсутствует, сообщите об этом в Фонд свободно распространяемого программного обеспечения (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "&О программе..." diff --git a/base/applications/charmap/lang/sk-SK.rc b/base/applications/charmap/lang/sk-SK.rc index a91767eae9e..e315933da2e 100644 --- a/base/applications/charmap/lang/sk-SK.rc +++ b/base/applications/charmap/lang/sk-SK.rc @@ -50,7 +50,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Tento program je voľný softvér; môžete ho šíriť a/alebo modifikovať podľa podmienok GNU Všeobecnej verejnej licencie (GNU General Public License) ako bola zverejnená nadáciou Free Software Foundation; buď verzie 2 tejto licencie, alebo (podľa Vášho uváženia) niektorej neskoršej verzie.\r\n\r\nTento program je distribuovaný v nádeji, že bude užitočný, avšak BEZ AKEJKOĽVEK ZÁRUKY; rovnako bez záruky PREDAJNOSTI alebo VHODNOSTI PRE URČITÝ ÚČEL. Pre viac detailov si pozrite GNU Všeobecnú verejnú licenciu (GNU General Public License).\r\n\r\nKópiu Všeobecnej verejnej licencie GNU ste mali dostať spolu s týmto programom; ak nie, napíšte si o ňu na Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "Č&o je Mapa znakov" diff --git a/base/applications/charmap/lang/sv-SE.rc b/base/applications/charmap/lang/sv-SE.rc index 172740d878d..11653552f41 100644 --- a/base/applications/charmap/lang/sv-SE.rc +++ b/base/applications/charmap/lang/sv-SE.rc @@ -48,7 +48,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Detta programmet är fri programvara; du kan distribuera det och/eller ändra det under villkoren enligt GNU General Public License som är utgivet av Free Software Foundation; version 2, eller (om du så önskar) alla senare versioner.\r\n\r\nDette programmet er utgivet i hopp om att det skall kunne användas, men DET FINNS INGA GARANTIER; även utan underförstådd garanti om SÄLJBARHET eller LÄMPLIGHET FÖR ETT VISST ÄNDAMÅL. Se på GNU General Public Licensen för mer detaljer.\r\n\r\nDu skall ha motagit en kopia av GNU General Public Licensen tillsammans med detta programmet; om du inte har fått det, skriv til Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "O&m..." diff --git a/base/applications/charmap/lang/tr-TR.rc b/base/applications/charmap/lang/tr-TR.rc index 8f005440042..c08bf87236a 100644 --- a/base/applications/charmap/lang/tr-TR.rc +++ b/base/applications/charmap/lang/tr-TR.rc @@ -45,9 +45,9 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN - IDS_LICENSE "ÖNEMLİ: Aşağıdaki metin, özgün metnin resmî olmayan çevirisidir. Çeviri metniyle özgün metin arasında ayrım olabilir. Özgün metin, çeviri metninin altındadır.\r\n\r\n***\r\n\r\nBu yazılım özgürdür, yâni bu yazılım Özgür Yazılım Vakfı'nın yayınladığı GNU Umûmî Kamu Lisansı'nın 2. sürümü veyâ daha sonraki sürümleri altında yeniden dağıtabilir veyâ değiştirebilirsiniz.\r\n\r\nBu yazılım, kullanışlı olabileceği umuduyla dağıtılmıştır, ancak bilhassa SATILABİLİRLİK ve BELİRLİ BİR AMACA UYGUNLUK açısından olmak üzere bu yazılımın hiçbir güvencesi yoktur. Daha çok bilgi için GNU Umûmî Kamu Lisansı'na bakınız.\r\n\r\nBu yazılımla birlikte GNU Umûmî Kamu Lisansı'nın bir sûretine de iye olmanız gerekir, eğer yoksa Özgür Yazılım Vakfı A.Ş.'ne (51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ABD) yazınız.\r\n\r\n***\r\n\r\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_LICENSE "ÖNEMLİ: Aşağıdaki metin, özgün metnin resmî olmayan çevirisidir. Çeviri metniyle özgün metin arasında ayrım olabilir. Özgün metin, çeviri metninin altındadır.\r\n\r\n***\r\n\r\nBu yazılım özgürdür, yâni bu yazılım Özgür Yazılım Vakfı'nın yayınladığı GNU Umûmî Kamu Ruhsatı'nın 2. sürümü veyâ daha sonraki sürümleri altında yeniden dağıtabilir veyâ değiştirebilirsiniz.\r\n\r\nBu yazılım, kullanışlı olabileceği umuduyla dağıtılmıştır, ancak bilhassa SATILABİLİRLİK ve BELİRLİ BİR AMACA UYGUNLUK açısından olmak üzere bu yazılımın hiçbir güvencesi yoktur. Daha çok bilgi için GNU Umûmî Kamu Ruhsatı'na bakınız.\r\n\r\nBu yazılımla birlikte GNU Umûmî Kamu Ruhsatı'nın bir sûretine de iye olmanız gerekir, eğer yoksa Özgür Yazılım Vakfı A.Ş.'ne (51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ABD) yazınız.\r\n\r\n***\r\n\r\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "&Hakkında" IDS_TITLE "Karakter Eşlem" END diff --git a/base/applications/charmap/lang/uk-UA.rc b/base/applications/charmap/lang/uk-UA.rc index fc75d02978c..a61897c3c8f 100644 --- a/base/applications/charmap/lang/uk-UA.rc +++ b/base/applications/charmap/lang/uk-UA.rc @@ -49,7 +49,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Таблиця символів - вільне програмне забезпечення; Ви можете розповсюджувати її та змінювати, дотримуючись умови Відкритої ліцензійної угоди GNU, опублікованої Фондом вільного програмного забезпечення; або редакції 2 Угоди, або будь-якої редакції, випущеної пізніше.\r\n\r\nЦя програма розповсюджується в надії на те, що вона виявиться корисною, але БЕЗ БУДЬ-ЯКИХ ГАРАНТІЙ, включаючи УЯВНОЮ ГАРАНТІЄЮ ЯКОСТІ або ПРИДАТНОСТІ для певних цілей. Подробиці містяться у Відкритій ліцензійній угоді GNU.\r\n\r\nРазом з цією програмою повинен поширюватися примірник Відкритої ліцензійної угоди GNU. Якщо він відсутній, повідомте про це в Фонд вільного програмного забезпечення (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." IDS_ABOUT "&Про програму..." diff --git a/base/applications/charmap/lang/zh-CN.rc b/base/applications/charmap/lang/zh-CN.rc index 350b601d5b1..929c318195c 100644 --- a/base/applications/charmap/lang/zh-CN.rc +++ b/base/applications/charmap/lang/zh-CN.rc @@ -49,7 +49,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA." IDS_ABOUT "关于(&A)..." diff --git a/base/applications/charmap/lang/zh-TW.rc b/base/applications/charmap/lang/zh-TW.rc index 528ba5b245e..bbf84011cbe 100644 --- a/base/applications/charmap/lang/zh-TW.rc +++ b/base/applications/charmap/lang/zh-TW.rc @@ -49,7 +49,7 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 194, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA." IDS_ABOUT "關於(&A)..." diff --git a/base/applications/cmdutils/CMakeLists.txt b/base/applications/cmdutils/CMakeLists.txt index bfb9679c9ff..e6f7394b254 100644 --- a/base/applications/cmdutils/CMakeLists.txt +++ b/base/applications/cmdutils/CMakeLists.txt @@ -1,6 +1,7 @@ add_subdirectory(dbgprint) add_subdirectory(doskey) add_subdirectory(find) +add_subdirectory(help) add_subdirectory(hostname) add_subdirectory(lodctr) add_subdirectory(more) diff --git a/base/applications/cmdutils/dbgprint/dbgprint.c b/base/applications/cmdutils/dbgprint/dbgprint.c index ed3d76cab9e..e18088ce09b 100644 --- a/base/applications/cmdutils/dbgprint/dbgprint.c +++ b/base/applications/cmdutils/dbgprint/dbgprint.c @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: tools/dbgprint/dbgprint.c * PURPOSE: outputs a text via DbgPrint API - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@student.tugraz.at) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) * Christoph von Wittich (Christoph_vW@ReactOS.org) */ diff --git a/base/applications/cmdutils/doskey/lang/bg-BG.rc b/base/applications/cmdutils/doskey/lang/bg-BG.rc index 216e838a892..a5e89d031b5 100644 --- a/base/applications/cmdutils/doskey/lang/bg-BG.rc +++ b/base/applications/cmdutils/doskey/lang/bg-BG.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Управлява настройките за обработка в командния ред, дневника и макротата.\n\ diff --git a/base/applications/cmdutils/doskey/lang/de-DE.rc b/base/applications/cmdutils/doskey/lang/de-DE.rc index fc73d5dc365..1092dcb8929 100644 --- a/base/applications/cmdutils/doskey/lang/de-DE.rc +++ b/base/applications/cmdutils/doskey/lang/de-DE.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Verwaltet Einstellungen, Verlauf und Makros der Kommandozeile.\n\ diff --git a/base/applications/cmdutils/doskey/lang/en-US.rc b/base/applications/cmdutils/doskey/lang/en-US.rc index 7adc23750d0..1591a9b55e1 100644 --- a/base/applications/cmdutils/doskey/lang/en-US.rc +++ b/base/applications/cmdutils/doskey/lang/en-US.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Manages command-line editing settings, history, and macros.\n\ diff --git a/base/applications/cmdutils/doskey/lang/es-ES.rc b/base/applications/cmdutils/doskey/lang/es-ES.rc index 381a9102f25..43dbe52abb2 100644 --- a/base/applications/cmdutils/doskey/lang/es-ES.rc +++ b/base/applications/cmdutils/doskey/lang/es-ES.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_SPANISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Administra la configuración de edición en línea de comandos del historial y de las macros.\n\ diff --git a/base/applications/cmdutils/doskey/lang/fr-FR.rc b/base/applications/cmdutils/doskey/lang/fr-FR.rc index 94fd448cb1b..c18de15ba13 100644 --- a/base/applications/cmdutils/doskey/lang/fr-FR.rc +++ b/base/applications/cmdutils/doskey/lang/fr-FR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_FRENCH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Gère les paramètres d'édition en ligne de commande de l'historique et des macros.\n\ diff --git a/base/applications/cmdutils/doskey/lang/it-IT.rc b/base/applications/cmdutils/doskey/lang/it-IT.rc index f170fb20e32..a63bc93d144 100644 --- a/base/applications/cmdutils/doskey/lang/it-IT.rc +++ b/base/applications/cmdutils/doskey/lang/it-IT.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ITALIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Gestisce le impostazioni della riga di comando di editing, la cronologia e le macro.\n\ diff --git a/base/applications/cmdutils/doskey/lang/pl-PL.rc b/base/applications/cmdutils/doskey/lang/pl-PL.rc index ca54cc2febe..b62f757f00b 100644 --- a/base/applications/cmdutils/doskey/lang/pl-PL.rc +++ b/base/applications/cmdutils/doskey/lang/pl-PL.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Zarządza ustawieniami linii komend, historii i makr.\n\ diff --git a/base/applications/cmdutils/doskey/lang/ro-RO.rc b/base/applications/cmdutils/doskey/lang/ro-RO.rc index 3a4fbd07da1..9784d45e6cf 100644 --- a/base/applications/cmdutils/doskey/lang/ro-RO.rc +++ b/base/applications/cmdutils/doskey/lang/ro-RO.rc @@ -7,7 +7,7 @@ */ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Gestionează starea de editare a liniei de comandă, istoric și macrodefiniții.\n\ diff --git a/base/applications/cmdutils/doskey/lang/sv-SE.rc b/base/applications/cmdutils/doskey/lang/sv-SE.rc index 91f1a80e041..a6a3159b7bb 100644 --- a/base/applications/cmdutils/doskey/lang/sv-SE.rc +++ b/base/applications/cmdutils/doskey/lang/sv-SE.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Hanterar commandoradseditering; settings, history, and macros.\n\ diff --git a/base/applications/cmdutils/doskey/lang/uk-UA.rc b/base/applications/cmdutils/doskey/lang/uk-UA.rc index 1f320a97e21..b4386ec0851 100644 --- a/base/applications/cmdutils/doskey/lang/uk-UA.rc +++ b/base/applications/cmdutils/doskey/lang/uk-UA.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "Менеджер командного рядка для редагування налаштувань, iсторiї та макросiв.\n\ diff --git a/base/applications/cmdutils/doskey/lang/zh-CN.rc b/base/applications/cmdutils/doskey/lang/zh-CN.rc index 6f3fffadd93..4d3e7395327 100644 --- a/base/applications/cmdutils/doskey/lang/zh-CN.rc +++ b/base/applications/cmdutils/doskey/lang/zh-CN.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP, "管理命令行编辑设置、历史记录和宏。\n\ diff --git a/base/applications/cmdutils/find/lang/bg-BG.rc b/base/applications/cmdutils/find/lang/bg-BG.rc index 4966dba0684..948729093a2 100644 --- a/base/applications/cmdutils/find/lang/bg-BG.rc +++ b/base/applications/cmdutils/find/lang/bg-BG.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Извежда всички редове във файла, които съдържат указания низ..\n\n\ diff --git a/base/applications/cmdutils/find/lang/ca-ES.rc b/base/applications/cmdutils/find/lang/ca-ES.rc index 97e540ee01b..412ed253e83 100644 --- a/base/applications/cmdutils/find/lang/ca-ES.rc +++ b/base/applications/cmdutils/find/lang/ca-ES.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_CATALAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Mostra totes les linies que continguin una determinada cadena de caràcters.\n\n\ diff --git a/base/applications/cmdutils/find/lang/cs-CZ.rc b/base/applications/cmdutils/find/lang/cs-CZ.rc index e19e7392467..4c14cc06755 100644 --- a/base/applications/cmdutils/find/lang/cs-CZ.rc +++ b/base/applications/cmdutils/find/lang/cs-CZ.rc @@ -6,7 +6,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Zobrazí všechny řádky souboru obsahující hledaný řetězec.\n\n\ diff --git a/base/applications/cmdutils/find/lang/de-DE.rc b/base/applications/cmdutils/find/lang/de-DE.rc index 083bcd0686e..c7b00691103 100644 --- a/base/applications/cmdutils/find/lang/de-DE.rc +++ b/base/applications/cmdutils/find/lang/de-DE.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Sucht in einer Datei nach einer Zeichenfolge.\n\n\ diff --git a/base/applications/cmdutils/find/lang/el-GR.rc b/base/applications/cmdutils/find/lang/el-GR.rc index d339db93ef0..15c9be76720 100644 --- a/base/applications/cmdutils/find/lang/el-GR.rc +++ b/base/applications/cmdutils/find/lang/el-GR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Εκτυπώνει όλες τις γραμμές ενός αρχείου που περιέχουν ένα αλφαριθμητικό.\n\n\ diff --git a/base/applications/cmdutils/find/lang/en-US.rc b/base/applications/cmdutils/find/lang/en-US.rc index f7352819ec3..4c73c7c3fb0 100644 --- a/base/applications/cmdutils/find/lang/en-US.rc +++ b/base/applications/cmdutils/find/lang/en-US.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Prints all lines of a file that contain a string.\n\n\ diff --git a/base/applications/cmdutils/find/lang/es-ES.rc b/base/applications/cmdutils/find/lang/es-ES.rc index 51689d7978b..b75d383eb81 100644 --- a/base/applications/cmdutils/find/lang/es-ES.rc +++ b/base/applications/cmdutils/find/lang/es-ES.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Imprime todas las líneas de un fichero que contiene una cadena.\n\n\ diff --git a/base/applications/cmdutils/find/lang/fr-FR.rc b/base/applications/cmdutils/find/lang/fr-FR.rc index 71c7db58f8a..90057f6688b 100644 --- a/base/applications/cmdutils/find/lang/fr-FR.rc +++ b/base/applications/cmdutils/find/lang/fr-FR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Affiche toutes les lignes d'un fichier qui contiennent un morceau de texte.\n\n\ diff --git a/base/applications/cmdutils/find/lang/it-IT.rc b/base/applications/cmdutils/find/lang/it-IT.rc index 5889db5f2fd..366fee60e05 100644 --- a/base/applications/cmdutils/find/lang/it-IT.rc +++ b/base/applications/cmdutils/find/lang/it-IT.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Visualizza le linee di un file che contengono un stringa.\n\n\ diff --git a/base/applications/cmdutils/find/lang/lt-LT.rc b/base/applications/cmdutils/find/lang/lt-LT.rc index 08b098957a7..5c287aea849 100644 --- a/base/applications/cmdutils/find/lang/lt-LT.rc +++ b/base/applications/cmdutils/find/lang/lt-LT.rc @@ -9,7 +9,7 @@ LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Spausdina visas bylos eilutes, kuriose yra ieškomas tekstas.\n\n\ diff --git a/base/applications/cmdutils/find/lang/no-NO.rc b/base/applications/cmdutils/find/lang/no-NO.rc index ba31ca5516c..37169bbccb3 100644 --- a/base/applications/cmdutils/find/lang/no-NO.rc +++ b/base/applications/cmdutils/find/lang/no-NO.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FINN: Skriv alle linjene for filen som inneholder en streng.\n\n\ diff --git a/base/applications/cmdutils/find/lang/pl-PL.rc b/base/applications/cmdutils/find/lang/pl-PL.rc index a6411ae0f6c..1201e49042b 100644 --- a/base/applications/cmdutils/find/lang/pl-PL.rc +++ b/base/applications/cmdutils/find/lang/pl-PL.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Wyświetla wszystkie linie danego pliku, zawierające szukany ciąg znaków.\n\n\ diff --git a/base/applications/cmdutils/find/lang/pt-BR.rc b/base/applications/cmdutils/find/lang/pt-BR.rc index 22a7fbef92f..7da41a34670 100644 --- a/base/applications/cmdutils/find/lang/pt-BR.rc +++ b/base/applications/cmdutils/find/lang/pt-BR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Localiza uma seqüência de texto em um ou mais arquivos.\n\n\ diff --git a/base/applications/cmdutils/find/lang/ro-RO.rc b/base/applications/cmdutils/find/lang/ro-RO.rc index 198ddb3aac1..8d8cf636a05 100644 --- a/base/applications/cmdutils/find/lang/ro-RO.rc +++ b/base/applications/cmdutils/find/lang/ro-RO.rc @@ -7,7 +7,7 @@ */ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Tipărește toate rândurile unui fișier ce conțin un șir.\n\n\ diff --git a/base/applications/cmdutils/find/lang/ru-RU.rc b/base/applications/cmdutils/find/lang/ru-RU.rc index 945555940b8..6fce3d14f3a 100644 --- a/base/applications/cmdutils/find/lang/ru-RU.rc +++ b/base/applications/cmdutils/find/lang/ru-RU.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Поиск текстовой строки в одном или нескольких файлах.\n\n\ diff --git a/base/applications/cmdutils/find/lang/sk-SK.rc b/base/applications/cmdutils/find/lang/sk-SK.rc index bf641923070..fa45c9a346b 100644 --- a/base/applications/cmdutils/find/lang/sk-SK.rc +++ b/base/applications/cmdutils/find/lang/sk-SK.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Zobrazí všetky riadky súboru obsahujúce hľadaný reťazec.\n\n\ diff --git a/base/applications/cmdutils/find/lang/sv-SE.rc b/base/applications/cmdutils/find/lang/sv-SE.rc index f135aa8f396..f511f680ad1 100644 --- a/base/applications/cmdutils/find/lang/sv-SE.rc +++ b/base/applications/cmdutils/find/lang/sv-SE.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Skriver ut alla rader i en fil som innehåller en sträng.\n\n\ diff --git a/base/applications/cmdutils/find/lang/uk-UA.rc b/base/applications/cmdutils/find/lang/uk-UA.rc index 7cef30daf65..1cf478d10af 100644 --- a/base/applications/cmdutils/find/lang/uk-UA.rc +++ b/base/applications/cmdutils/find/lang/uk-UA.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Виведення всіх рядків файлу, які містять рядок.\n\n\ diff --git a/base/applications/cmdutils/find/lang/zh-CN.rc b/base/applications/cmdutils/find/lang/zh-CN.rc index dc545fd85c7..0d56be35a5d 100644 --- a/base/applications/cmdutils/find/lang/zh-CN.rc +++ b/base/applications/cmdutils/find/lang/zh-CN.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: 输出某文件中包含指定字符串的所有行。\n\n\ diff --git a/base/applications/cmdutils/help/CMakeLists.txt b/base/applications/cmdutils/help/CMakeLists.txt new file mode 100644 index 00000000000..4a2adc0d121 --- /dev/null +++ b/base/applications/cmdutils/help/CMakeLists.txt @@ -0,0 +1,10 @@ + +add_executable(cmd_help + help.c + help.rc) + +set_module_type(cmd_help win32cui UNICODE) +add_importlibs(cmd_help msvcrt kernel32 user32) + +set_target_properties(cmd_help PROPERTIES OUTPUT_NAME "help") +add_cd_file(TARGET cmd_help DESTINATION reactos/system32 FOR all) diff --git a/base/applications/cmdutils/help/help.c b/base/applications/cmdutils/help/help.c new file mode 100644 index 00000000000..69af5ebd091 --- /dev/null +++ b/base/applications/cmdutils/help/help.c @@ -0,0 +1,144 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS help utility + * FILE: base/applications/cmdutils/help/help.c + * PURPOSE: Provide help for command-line utilities + * PROGRAMMERS: Lee Schroeder (spaceseel at gmail dot com) + * Hermes Belusca-Maito (hermes.belusca@sfr.fr) + */ + +#include +#include +#include + +#define WIN32_NO_STATUS +#include +#include +#include +#include + +#include "help.h" +#include "resource.h" + +BOOL IsConsoleHandle(HANDLE hHandle) +{ + DWORD dwMode; + + /* Check whether the handle may be that of a console... */ + if ((GetFileType(hHandle) & FILE_TYPE_CHAR) == 0) return FALSE; + + /* + * It may be. Perform another test... The idea comes from the + * MSDN description of the WriteConsole API: + * + * "WriteConsole fails if it is used with a standard handle + * that is redirected to a file. If an application processes + * multilingual output that can be redirected, determine whether + * the output handle is a console handle (one method is to call + * the GetConsoleMode function and check whether it succeeds). + * If the handle is a console handle, call WriteConsole. If the + * handle is not a console handle, the output is redirected and + * you should call WriteFile to perform the I/O." + */ + return GetConsoleMode(hHandle, &dwMode); +} + +VOID PrintResourceString(INT resID, ...) +{ + HANDLE OutputHandle = GetStdHandle(STD_OUTPUT_HANDLE); + WCHAR tmpBuffer[RC_STRING_MAX_SIZE]; + va_list arg_ptr; + + va_start(arg_ptr, resID); + LoadStringW(GetModuleHandleW(NULL), resID, tmpBuffer, RC_STRING_MAX_SIZE); + + // FIXME: Optimize by using Win32 console functions. + if (IsConsoleHandle(OutputHandle)) + { + _vcwprintf(tmpBuffer, arg_ptr); + } + else + { + vwprintf(tmpBuffer, arg_ptr); + } + + va_end(arg_ptr); +} + +BOOL IsInternalCommand(LPCWSTR Cmd) +{ + size_t i; + int res; + + /* Invalid command */ + if (!Cmd) return FALSE; + + for (i = 0; i < sizeof(InternalCommands)/sizeof(InternalCommands[0]); ++i) + { + res = _wcsicmp(InternalCommands[i], Cmd); + if (res == 0) + { + /* This is an internal command */ + return TRUE; + } + else if (res > 0) + { + /* + * The internal commands list is sorted in alphabetical order. + * We can quit the loop immediately since the current internal + * command is lexically greater than the command to be tested. + */ + break; + } + } + + /* Command not found */ + return FALSE; +} + +int wmain(int argc, WCHAR* argv[]) +{ + WCHAR CmdLine[CMDLINE_LENGTH]; + + /* + * If the user hasn't asked for specific help, + * then print out the list of available commands. + */ + if (argc <= 1) + { + PrintResourceString(IDS_HELP1); + PrintResourceString(IDS_HELP2); + return 0; + } + + /* + * Bad usage (too much options) or we use the /? switch. + * Display help for the help command. + */ + if ((argc > 2) || (wcscmp(argv[1], L"/?") == 0)) + { + PrintResourceString(IDS_USAGE); + return 0; + } + + /* + * If the command is not an internal one, + * display an information message and exit. + */ + if (!IsInternalCommand(argv[1])) + { + PrintResourceString(IDS_NO_ENTRY, argv[1]); + return 0; + } + + /* + * Run " /?" in the current command processor. + */ + wcsncpy(CmdLine, argv[1], CMDLINE_LENGTH - wcslen(CmdLine)); + wcsncat(CmdLine, L" /?" , CMDLINE_LENGTH - wcslen(CmdLine)); + + _flushall(); + return _wsystem(CmdLine); +} + +/* EOF */ diff --git a/base/applications/cmdutils/help/help.h b/base/applications/cmdutils/help/help.h new file mode 100644 index 00000000000..8b13a83abe5 --- /dev/null +++ b/base/applications/cmdutils/help/help.h @@ -0,0 +1,87 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS help utility + * FILE: base/applications/cmdutils/help/help.h + * PURPOSE: Provide help for command-line utilities + * PROGRAMMERS: Lee Schroeder (spaceseel at gmail dot com) + * Hermes Belusca-Maito (hermes.belusca@sfr.fr) + */ + +#pragma once + +#define CMDLINE_LENGTH 1024 + +/* + * Internal commands sorted by alphabetical order. + * WARNING: Keep this list in sync with base\shell\cmd\cmdtable.c + */ +LPCWSTR InternalCommands[] = +{ + L"activate", + L"alias", + L"assoc", + L"attrib", + L"beep", + L"call", + L"cd", + L"chcp", + L"chdir", + L"choice", + L"cls", + L"cmd", + L"color", + L"copy", + L"date", + L"del", + L"delay", + L"delete", + L"dir", + L"dirs", + L"dirstack", + L"echo", + L"echoerr", + L"echos", + L"echoserr", + L"endlocal", + L"erase", + L"exit", + L"for", + L"free", + L"goto", + L"help", + L"history", + L"if", + L"label", + L"md", + L"memory", + L"mkdir", + L"mklink", + L"move", + L"msgbox", + L"path", + L"pause", + L"popd", + L"prompt", + L"pushd", + L"rd", + L"rem", + L"ren", + L"rename", + L"replace", + L"rmdir", + L"screen", + L"set", + L"setlocal", + L"shift", + L"start", + L"time", + L"timer", + L"title", + L"type", + L"ver", + L"verify", + L"vol", + L"window", +}; + +/* EOF */ diff --git a/base/applications/cmdutils/help/help.rc b/base/applications/cmdutils/help/help.rc new file mode 100644 index 00000000000..d929b615ad0 --- /dev/null +++ b/base/applications/cmdutils/help/help.rc @@ -0,0 +1,13 @@ +#include +#include + +#include "resource.h" + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Command Line Help Utility" +#define REACTOS_STR_INTERNAL_NAME "help" +#define REACTOS_STR_ORIGINAL_FILENAME "help.exe" +#include + +#include "rsrc.rc" diff --git a/base/applications/cmdutils/help/lang/de-DE.rc b/base/applications/cmdutils/help/lang/de-DE.rc new file mode 100644 index 00000000000..f21f2fd0893 --- /dev/null +++ b/base/applications/cmdutils/help/lang/de-DE.rc @@ -0,0 +1,82 @@ +/* + * German language file by Klemens Friedl 2005-06-03 + */ + +LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL + +STRINGTABLE +BEGIN + IDS_NO_ENTRY, "This command is not supported by the help utility.\nTry ""%s /?""\n." +END + +STRINGTABLE +BEGIN + +IDS_USAGE, "Provides Help information for ReactOS commands.\n\n\ +HELP [command]\n\n\ + command - Display help information for this command.\n" + +IDS_HELP1, "Übersicht aller verfügbaren Befehle und deren Kurzbeschreibungen\n\n\ + help Befehl\n\ + Befehl /? Um nähere Informationen zu einem bestimmten Befehl\n\ + zu erhalten.\n\n\ +? Listet alle Befehle auf (ohne Erklärung).\n\ +ALIAS Setzt, löscht oder zeigt den Alias.\n\ +ATTRIB Zeigt Dateiattribute an bzw. ändert sie.\n\ +BEEP Gibt einen Piepton durch den PC-Speaker aus.\n\ +CALL Ruft eine Batchdatei aus einer anderen Batchdatei heraus auf.\n\ +CD Zeigt den Namen des aktuellen Verzeichnisses an bzw. ändert diesen.\n\ +CHCP Zeigt die aktive Codepagenummer an bzw. legt diese fest.\n\ +CHOICE Wartet auf den Benutzer, welcher aus einer Auswahl eine Option\n\ + wählen muss.\n\ +CLS Löscht den Bildschirminhalt.\n\ +CMD Startet eine neue Instanz des ReactOS-Befehlsinterpreters.\n\ +COLOR Legt die Farben für Hinter- und Vordergrund der Konsole fest.\n\ +COPY Kopiert eine oder mehrere Dateien an eine andere Stelle.\n\ +DATE Zeigt das Datum an bzw. legt dieses fest.\n\ +DELETE Löscht eine oder mehrere Dateien.\n\ +DIR Listet die Dateien und Unterverzeichnisse eines Verzeichnisses auf.\n\ +ECHO Zeigt Meldungen an bzw. schaltet die Befehlsanzeige ein oder aus.\n\ +ERASE Löscht eine oder mehrere Dateien.\n\ +EXIT Beendet das Programm CMD.EXE (Befehlsinterpreter).\n\ +FOR Führt einen angegebenen Befehl für jede Datei in einem Dateiensatz\n\ + aus.\n\ +FREE Zeigt den (freien) Speicherplatz an.\n\ +GOTO Setzt den ReactOS-Befehlsinterpreter auf eine markierte Zeile in\n\ + einem Batchprogramm.\n\ +HELP Zeigt Hilfeinformationen zu ReactOS-Befehlen an.\n\ +HISTORY Listet alle Befehle auf, welche sich im Speicher befinden.\n\ +IF Verarbeitet Ausdrücke in einer Batchdatei abhängig von Bedingungen.\n\ +LABEL Erstellt, ändert oder löscht die Bezeichnung eines Volumes.\n\ +MD Erstellt ein Verzeichnis.\n\ +MKDIR Erstellt ein Verzeichnis.\n\ +MKLINK Erzeugt eine Dateisystemverknüpfung.\n\ +MOVE Verschiebt eine oder mehrere Dateien von einem Verzeichnis in\n\ + ein anderes.\n" +IDS_HELP2, "PATH Legt den Suchpfad für ausführbare Dateien fest oder zeigt diesen an.\n\ +PAUSE Hält die Ausführung einer Batchdatei an und zeigt eine Meldung an.\n\ +POPD Wechselt zu dem Verzeichnis, das durch PUSHD gespeichert wurde.\n\ +PROMPT Ändert die Eingabeaufforderung.\n\ +PUSHD Speichert das aktuelle Verzeichnis, und wechselt dann zu einem\n\ + anderen Verzeichnis.\n\ +RD Entfernt ein Verzeichnis.\n\ +REM Leitet Kommentare in einer Batchdatei.\n\ +REN Benennt eine od. mehrere Dateien um.\n\ +RENAME Benennt eine od. mehrere Dateien um.\n\ +REPLACE Ersetzt Dateien.\n\ +RMDIR Löscht ein Verzeichnis.\n\ +SCREEN Bewegt den Cursor und optional die Ausgabe.\n\ +SET Setzt oder löscht die Umgebungsvariablen bzw. zeigt sie an.\n\ +SHIFT Verändert die Position ersetzbarer Parameter in Batchdateien.\n\ +START Startet ein eigenes Fenster, um ein bestimmtes Programm oder einen\n\ + Befehl auszuführen.\n\ +TIME Zeigt die Systemzeit an bzw. legt sie fest.\n\ +TIMER Erlaubt die Benutzung von bis zu 10 Stoppuhren\n\ +TITLE Legt den Fenstertitel für das Eingabeaufforderungsfenster fest.\n\ +TYPE Zeigt den Inhalt einer Textdatei an.\n\ +VER Zeigt die ReactOS-Version an.\n\ +VERIFY Legt fest, ob überwacht werden soll, ob Dateien korrekt auf den\n\ + Datenträger geschrieben werden.\n\ +VOL Zeigt die Datenträgervolumebezeichnung und die Seriennummer an.\n" + +END diff --git a/base/applications/cmdutils/help/lang/el-GR.rc b/base/applications/cmdutils/help/lang/el-GR.rc new file mode 100644 index 00000000000..b376b4196f2 --- /dev/null +++ b/base/applications/cmdutils/help/lang/el-GR.rc @@ -0,0 +1,76 @@ +/* + * Αρχική έκδοση - Ημιτελής. + * Ελληνική μετάφραση - Απόστολος Αλεξιάδης + */ + +LANGUAGE LANG_GREEK, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_NO_ENTRY, "This command is not supported by the help utility.\nTry ""%s /?""\n." +END + +STRINGTABLE +BEGIN + +IDS_USAGE, "Provides Help information for ReactOS commands.\n\n\ +HELP [command]\n\n\ + command - Display help information for this command.\n" + +IDS_HELP1, "List of all available commands (+ description)\n\n\ + help command\n\ + command /? For more information on a specific command\n\n\ +? List all available commands without description).\n\ +ALIAS Sets, removes or shows aliases.\n\ +ATTRIB Εμφανίζει ή αλλάζει τα χαρακτηριστικά αρχείων.\n\ +BEEP Beep the speaker.\n\ +CALL Καλεί ένα πρόγραμμα δέσμης από ένα άλλο.\n\ +CD Εμφανίζει το όνομα ή τις αλλαγές του τρέχοντος καταλόγου.\n\ +CHCP Εμφανίζει ή ορίζει τον αριθμό της ενεργής κωδικοσελίδας.\n\ +CHOICE Waits for the user to choose one of a set of choices.\n\ +CLS Καθαρίζει την οθόνη.\n\ +CMD Ξεκινά μια νέα περίοδο λειτουργίας του ερμηνευτή εντολών του ReactOS.\n\ +COLOR Ορίζει τα προεπιλεγμένα χρώματα πρώτου πλάνου και παρασκηνίου της κονσόλας.\n\ +COPY Αντιγράφει ένα ή περισσότερα αρχεία σε άλλη θέση.\n\ +DATE Εμφανίζει ή ρυθμίζει την ημερομηνία.\n\ +DELETE Διαγράφει ένα ή περισσότερα αρχεία.\n\ +DIR Εμφανίζει λίστα αρχείων και δευτερευόντων καταλόγων σε κατάλογο.\n\ +ECHO Εμφανίζει μηνύματα ή ενεργοποιεί και απενεργοποιεί το echo εντολών.\n\ +ERASE Διαγράφει ένα ή περισσότερα αρχεία.\n\ +EXIT Τερματίζει το πρόγραμμα CMD.EXE (ερμηνευτής εντολών).\n\ +FOR Εκτελεί μια καθορισμένη εντολή για κάθε αρχείο ενός συνόλου αρχείων.\n\ +FREE (free) disc space.\n\ +GOTO Μεταβιβάζει τον ερμηνευτή εντολών του ReactOS σε μια γραμμή με\n\ + ετικέτα σε ένα πρόγραμμα δέσμης.\n\ +HELP Παρέχει πληροφορίες Βοήθειας για εντολές του ReactOS.\n\ +HISTORY Εμφανίζει λίστα όλων των εντολών που έχουν χρησιμοποιηθεί.\n\ +IF Εκτελεί επεξεργασία υπό όρους σε προγράμματα δέσμης.\n\ +LABEL Δημιουργεί, αλλάζει ή διαγράφει την ετικέτα τόμου ενός δίσκου.\n\ +MD Δημιουργεί έναν κατάλογο.\n\ +MKDIR Δημιουργεί έναν κατάλογο.\n\ +MKLINK Creates a filesystem link object.\n\ +MOVE Μετακινεί ένα ή περισσότερα αρχεία από έναν κατάλογο σε έναν άλλο.\n\ +PATH Εμφανίζει ή ορίζει μια διαδρομή αναζήτησης για εκτελέσιμα αρχεία.\n\ +PAUSE Αναστέλλει την εκτέλεση ενός προγράμματος δέσμης και εμφανίζει ένα μήνυμα.\n\ +POPD Επαναφέρει την προηγούμενη τιμή του τρέχοντα καταλόγου, που αποθηκεύτηκε από την PUSHD.\n\ +PROMPT Αλλάζει τη γραμμή εντολών.\n\ +PUSHD Αποθηκεύει τον τρέχοντα κατάλογο και στη συνέχεια τον αλλάζει.\n\ +RD Καταργεί έναν κατάλογο.\n\ +REM Καταγράφει σχόλια (παρατηρήσεις) σε αρχεία δέσμης ή στο CONFIG.SYS.\n\ +REN Μετονομάζει ένα αρχείο ή αρχεία.\n\ +RENAME Μετονομάζει ένα αρχείο ή αρχεία.\n\ +REPLACE Αντικαθιστά αρχεία.\n\ +RMDIR Καταργεί έναν κατάλογο.\n\ +SCREEN Move cursor and optionally print text.\n\ +SET Εμφανίζει, ορίζει ή καταργεί μεταβλητές περιβάλλοντος των Windows.\n\ +SHIFT Μετατρέπει τη θέση των παραμέτρων με δυνατότητα αντικατάστασης σε αρχεία δέσμης.\n" +IDS_HELP2, "START Ξεκινά ένα διαφορετικό παράθυρο για την εκτέλεση ενός καθορισμένου προγράμματος ή εντολής.\n\ +TIME Εμφανίζει ή ορίζει την ώρα του συστήματος.\n\ +TIMER Allow the use of ten stopwatches.\n\ +TITLE Ορίζει τον τίτλο παραθύρου για περίοδο λειτουργίας CMD.EXE.\n\ +TYPE Εμφανίζει τα περιεχόμενα ενός αρχείου κειμένου.\n\ +VER Εμφανίζει την έκδοση του ReactOS.\n\ +VERIFY Ενημερώνει τα Windows εάν πρέπει να εξακριβωθεί ότι η εγγραφή των αρχείων σας έχει γίνει σωστά σε ένα δίσκο.\n\ +VOL Εμφανίζει την ετικέτα και τον σειριακό αριθμό ενός τόμου στο δίσκο.\n" + +END diff --git a/base/applications/cmdutils/help/lang/en-US.rc b/base/applications/cmdutils/help/lang/en-US.rc new file mode 100644 index 00000000000..36c65775b2a --- /dev/null +++ b/base/applications/cmdutils/help/lang/en-US.rc @@ -0,0 +1,79 @@ +/* + * Magnus Olsen, 2005 + */ + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +STRINGTABLE +BEGIN + IDS_NO_ENTRY, "This command is not supported by the help utility.\nTry ""%s /?""\n." +END + +STRINGTABLE +BEGIN + +IDS_USAGE, "Provides Help information for ReactOS commands.\n\n\ +HELP [command]\n\n\ + command - Display help information for this command.\n" + +IDS_HELP1, "List of all available commands (+ description)\n\n\ + help command\n\ + command /? For more information on a specific command\n\n\ +? List all available commands (without description).\n\ +ALIAS Sets, removes or shows aliases.\n\ +ATTRIB Displays or changes file attributes.\n\ +BEEP Beep the speaker.\n\ +CALL Calls one batch program from another.\n\ +CD Displays the name of or changes the current directory.\n\ +CHCP Displays or sets the active code page number.\n\ +CHOICE Waits for the user to choose one of a set of choices.\n\ +CLS Clears the screen.\n\ +CMD Starts a new instance of the ReactOS command interpreter.\n\ +COLOR Sets the default console foreground and background colors.\n\ +COPY Copies one or more files to another location.\n\ +DATE Displays or sets the date.\n\ +DELETE Deletes one or more files.\n\ +DIR Displays a list of files and subdirectories in a directory.\n\ +ECHO Displays messages, or turns command echoing on or off.\n\ +ERASE Deletes one or more files.\n\ +EXIT Quits the CMD.EXE program (command interpreter).\n\ +FOR Runs a specified command for each file in a set of files.\n\ +FREE (free) disc space.\n\ +GOTO Directs the ReactOS command interpreter to a labeled line in\n\ + a batch program.\n\ +HELP Provides Help information for ReactOS commands.\n\ +HISTORY List all commands which has been used\n\ +IF Performs conditional processing in batch programs.\n\ +LABEL Creates, changes, or deletes the volume label of a disk.\n\ +MD Creates a directory.\n\ +MKDIR Creates a directory.\n\ +MKLINK Creates a filesystem link object.\n\ +MOVE Moves one or more files from one directory to another\n\ + directory.\n\ +PATH Displays or sets a search path for executable files.\n\ +PAUSE Suspends processing of a batch file and displays a message.\n\ +POPD Restores the previous value of the current directory saved by\n\ + PUSHD.\n\ +PROMPT Changes the command prompt.\n\ +PUSHD Saves the current directory then changes it.\n\ +RD Removes a directory.\n\ +REM Records comments (remarks) in batch files.\n\ +REN Renames a file or files.\n\ +RENAME Renames a file or files.\n\ +REPLACE Replaces files.\n\ +RMDIR Removes a directory.\n\ +SCREEN Move cursor and optionally print text.\n\ +SET Displays, sets, or removes ReactOS environment variables.\n\ +SHIFT Shifts the position of replaceable parameters in batch files.\n" +IDS_HELP2, "START Starts a separate window to run a specified program or command.\n\ + Executes command.\n\ +TIME Displays or sets the system time.\n\ +TIMER Allow the use of ten stopwatches.\n\ +TITLE Sets the window title for a CMD.EXE session.\n\ +TYPE Displays the contents of a text file.\n\ +VER Displays the ReactOS version.\n\ +VERIFY Tells ReactOS whether to verify that your files are written\n\ + correctly to a disk.\n\ +VOL Displays a disk volume label and serial number.\n" + +END diff --git a/base/applications/cmdutils/help/lang/es-ES.rc b/base/applications/cmdutils/help/lang/es-ES.rc new file mode 100644 index 00000000000..11b121a4d8e --- /dev/null +++ b/base/applications/cmdutils/help/lang/es-ES.rc @@ -0,0 +1,78 @@ +/* + * Spanish resource file by HUMA2000 + * Jose Pedro Fernández Pascual 2005 + */ + +LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL + +STRINGTABLE +BEGIN + IDS_NO_ENTRY, "This command is not supported by the help utility.\nTry ""%s /?""\n." +END + +STRINGTABLE +BEGIN + +IDS_USAGE, "Provides Help information for ReactOS commands.\n\n\ +HELP [command]\n\n\ + command - Display help information for this command.\n" + +IDS_HELP1, "Lista de todos los comandos disponibles (con descripción)\n\n\ + help comando\n\ + comando /? Para más información del comando especificado.\n\n\ +? Muestra todos los comandos disponibles (sin la descripción).\n\ +ALIAS Crea, borra o muestra los alias.\n\ +ATTRIB Muestra o cambia los atributos de archivo.\n\ +BEEP Hace un beep con el altavoz.\n\ +CALL Llama a un archivo por lotes desde otro.\n\ +CD Muestra o cambia el directorio actual.\n\ +CHCP Muestra o cambia el código de página activo.\n\ +CHOICE Espera a que el usuario elija una opción de un grupo de opciones.\n\ +CLS Limpia la pantalla.\n\ +CMD Comienza una nueva instancia del intérprete de comandos.\n\ +COLOR Configura el color por defecto de fondo y frente de la consola.\n\ +COPY Copia uno o varios archivos de una localización a otra.\n\ +DATE Muestra y cambia la fecha.\n\ +DELETE Borra uno o más archivos.\n\ +DIR Muestra una lista de los archivos y subdirecctorios en un directorio.\n\ +ECHO Muestra mensajes, o cambia un comando entre mostrarlos o no.\n\ +ERASE Borra uno o más archivos.\n\ +EXIT Sale del programa CMD.EXE (intérprete de comandos).\n\ +FOR Ejecuta un comando específico en un grupo de archivos.\n\ +FREE Espacio libre en disco.\n\ +GOTO Direcciona la ventana del intérprete de comandos a una linea etiquetada\n\ + en un archivo por lotes.\n\ +HELP Proporciona ayuda sobre los comandos para ReactOS.\n\ +HISTORY Muestra todos los comandos que han sido usados.\n\ +IF Realiza un proceso condicional en un archivo por lotes.\n\ +LABEL Crea, cambia, o borra la etiqueta de volumen de un disco.\n\ +MD Crea un directorio.\n\ +MKDIR Crea un directorio.\n\ +MKLINK Creates a filesystem link object.\n\ +MOVE Mueve uno o más archivos de un directorio a otro.\n\ +PATH Muestra o configura las rutas de búsqueda para archivos ejecutables.\n\ +PAUSE Suspende el procesamiento de un archivo por lotes y muestra un mensaje.\n\ +POPD Restaura el valor anterior del directorio actual guardado por PUSHD.\n\ +PROMPT Cambia el símbolo del sistema del intéprete de comandos.\n\ +PUSHD Guarda el directorio actual y después lo cambia.\n\ +RD Borra un directorio.\n\ +REM Marca comentarios en archivos por lotes.\n\ +REN Renombra un archivo o varios archivos.\n\ +RENAME Renombra un archivo o varios archivos.\n\ +RMDIR Borra un directorio.\n\ +SCREEN Mueve el cursor y opcionalmente escribe un texto.\n\ +SET Muestra, cambia o borra variables del entorno de la ventana.\n\ +SHIFT Marca la posición de parámetros remplazables en un archivo por lotes.\n" + +IDS_HELP2, "START Abre una ventana separada para ejecutar un programa o comando específicod.\n\ + Ejecuta CMD.\n\ +TIME Muestra o cambia la hora del sistema.\n\ +TIMER Permite al usuario diez paradas para ver.\n\ +TITLE Configura el título de la ventama de la sesión de CMD.EXE.\n\ +TYPE Muestra el contenido de un archivo de texto.\n\ +VER Muestra la versión de ReactOS.\n\ +VERIFY Le dice a ReactOS que verifique que cada archivo se escriba.\n\ + corectamente en el disco.\n\ +VOL Muestra la etiqueta de volumen y el número de serie del disco.\n" + +END diff --git a/base/applications/cmdutils/help/lang/fr-FR.rc b/base/applications/cmdutils/help/lang/fr-FR.rc new file mode 100644 index 00000000000..f1dc4cab23c --- /dev/null +++ b/base/applications/cmdutils/help/lang/fr-FR.rc @@ -0,0 +1,81 @@ +/* + * French resources + * Sylvain Pétréolle 2005 + * Pierre Schweitzer 2007 + */ + +LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL + +STRINGTABLE +BEGIN + IDS_NO_ENTRY, "Cette commande n'est pas prise en charge par l'utilitaire d'aide.\nEssayez ""%s /?"".\n" +END + +STRINGTABLE +BEGIN + +IDS_USAGE, "Fournit des informations d'aide pour les commandes de ReactOS.\n\n\ +HELP [commande]\n\n\ + commande - Affiche des informations d'aide sur cette commande.\n" + +IDS_HELP1, "Liste de toutes les commandes disponibles (+ description)\n\n\ + help commande\n\ + commande /? Pour plus d'informations sur une commande spécifique\n\n\ +? Liste toutes les commandes disponibles sans leur description).\n\ +ALIAS Définit, supprime ou montre les alias.\n\ +ATTRIB Affiche ou change les attributs d'un fichier.\n\ +BEEP Émet un bip par le haut-parleur système.\n\ +CALL Appelle un programme batch à partir d'un autre.\n\ +CD Affiche ou change le répertoire courant.\n\ +CHCP Affiche ou définit le numéro de page de codes.\n\ +CHOICE Attend après l'utilisateur pour un choix parmi un ensemble de propositions.\n\ +CLS Efface l'écran.\n\ +CMD Démarre une nouvelle instance de l'interpréteur de commandes de ReactOS.\n\ +COLOR Définit les couleurs par défaut pour le premier plan et l'arrière-plan de la console.\n\ +COPY Copie un ou plusieurs fichiers vers une autre destination.\n\ +DATE Affiche ou définit la date.\n\ +DELETE Supprime un ou plusieurs fichiers.\n\ +DIR Affiche la liste des fichiers et des sous-répertoires du dossier.\n\ +ECHO Affiche des messages, ou bascule l'affichage des commandes sur on ou off.\n\ +ERASE Supprime un ou plusieurs fichiers.\n\ +EXIT Quitte le programme CMD.EXE (interpréteur de commandes).\n\ +FOR Lance une commande spécifique pour chaque fichier d'un ensemble de fichiers.\n\ +FREE Espace disque (libre).\n\ +GOTO Dirige l'interpréteur de commandes de ReactOS vers une ligne nommée\n\ + dans un script batch.\n\ +HELP Fournit des informations d'aide pour les commandes de ReactOS.\n\ +HISTORY Liste toutes les commandes qui ont été utilisées\n\ +IF Exécute un traitement conditionnel dans des programmes batch.\n\ +LABEL Crée, change, ou supprime le nom de volume d'un disque.\n\ +MD Crée un répertoire.\n\ +MKDIR Crée un répertoire.\n\ +MKLINK Crée des liens symboliques ou réels.\n" +IDS_HELP2, "MOVE Déplace un ou plusieurs fichiers d'un répertoire vers un autre\n\ + répertoire.\n\ +PATH Affiche ou définit un chemin de recherche pour les fichiers exécutables.\n\ +PAUSE Suspend l'exécution d'un fichier batch et affiche un message.\n\ +POPD Restaure la précédente valeur du répertoire courant sauvegardée par\n\ + PUSHD.\n\ +PROMPT Change l'invite de commande.\n\ +PUSHD Sauvegarde le répertoire courant puis le change.\n\ +RD Supprime un répertoire.\n\ +REM Enregistre des commentaires (remarques) dans un fichier batch.\n\ +REN Renomme un ou plusieurs fichiers.\n\ +RENAME Renomme un ou plusieurs fichiers.\n\ +REPLACE Remplace un fichier.\n\ +RMDIR Supprime un répertoire.\n\ +SCREEN Déplace le curseur, optionnellement affiche du texte.\n\ +SET Affiche, définit, ou supprime des variables d'environnement de ReactOS.\n\ +SHIFT Déplace la position des paramètres remplacables dans un fichier batch.\n\ +START Démarre une fenêtre séparée pour lancer un programme spécifié ou une commande.\n\ + Exécute la commande.\n\ +TIME Affiche ou définit l'heure du système.\n\ +TIMER Permet l'utilisation de dix chronomètres.\n\ +TITLE Définit le titre de la fenêtre pour une session de CMD.EXE.\n\ +TYPE Affiche le contenu d'un fichier texte.\n\ +VER Affiche la version de ReactOS.\n\ +VERIFY Spécifie à ReactOS s'il faut vérifier que les fichiers sont correctement\n\ + écrit sur un disque.\n\ +VOL Affiche le nom de volume d'un disque et son numéro de série.\n" + +END diff --git a/base/applications/cmdutils/help/lang/hu-HU.rc b/base/applications/cmdutils/help/lang/hu-HU.rc new file mode 100644 index 00000000000..7c82bf70018 --- /dev/null +++ b/base/applications/cmdutils/help/lang/hu-HU.rc @@ -0,0 +1,74 @@ +/* + * Hungarian resource állomány for CMD + * Translation by Robert Horvath (talley at cubeclub.hu) 2005 + */ + +LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_NO_ENTRY, "This command is not supported by the help utility.\nTry ""%s /?""\n." +END + +STRINGTABLE +BEGIN + +IDS_USAGE, "Provides Help information for ReactOS commands.\n\n\ +HELP [command]\n\n\ + command - Display help information for this command.\n" + +IDS_HELP1, "Támogatott parancsok megjelenítése\n\n\ + help parancs\n\ + parancs /? Több (részletes) információ megtekintéséhez használd ezt.\n\n\ +? Minden támogatott parancs megjelenítése (részletek nélkül).\n\ +ALIAS Megjeleníti, vagy megváltoztatja az aliasokat.\n\ +ATTRIB Megjeleníti vagy megváltoztatja az állományok attribútumát.\n\ +BEEP Megszólaltatja a hangszórót.\n\ +CALL Batch állományból egy másik batch állomány meghívása.\n\ +CD Megjeleníti vagy átvált egy másik mappába.\n\ +CHCP Megjeleníti vagy megváltoztatja az aktív kódlapot.\n\ +CHOICE Vár a felhasználóra, hogy válasszon a felkínált lehetõségek közül.\n\ +CLS Letörli a képernyõt.\n\ +CMD Egy új példányt indít a ReactOS parancsértelmezõjébõl.\n\ +COLOR A konzol elõ- és háttérszínét állítja be.\n\ +COPY Egy vagy több állományt másol a megadott helyre.\n\ +DATE Megjeleníti vagy beállítja a rendszerdátumot.\n\ +DELETE Eltávolít egy vagy több állományt.\n\ +DIR Megjeleníti a mappában található almappákat és állományokat.\n\ +ECHO Megjelenít egy szöveget, vagy beállítja a visszhangot.\n\ +ERASE Eltávolít egy vagy több fájlt.\n\ +EXIT Kilép a parancssor értelmezõbõl.\n\ +FOR Végrehajt egy parancsot az összes fájlban a megadott mappákban.\n\ +FREE Megjeleníti a szabad hely méretét.\n\ +GOTO Átirányít egy másik címkére a batch állományban.\n\ +HELP Segítséget ad a ReactOS parancsairól.\n\ +HISTORY Megjeleníti az ebben az ablakban kiadott parancsok listáját.\n\ +IF Feltételes végrehajtás batch állományokban.\n\ +LABEL Beállítja egy kötet címkéjét.\n\ +MD Létrehoz egy új mappát.\n\ +MKDIR Létrehoz egy új mappát.\n\ +MKLINK Creates a filesystem link object.\n\ +MOVE Áthelyez egy vagy több állományt az egyik mappából a másikba.\n\ +PATH Megjeleníti vagy beállítja a keresési útvonalakat.\n\ +PAUSE Felfüggeszti a futást, és vár a felhasználóra.\n\ +POPD Visszalép a PUSHD által megjegyzett mappába.\n\ +PROMPT Parancssor beállítása.\n\ +PUSHD Megjegyzi az aktuális mappát, majd átvált egy máasikra.\n\ +RD Töröl egy mappát.\n\ +REM Megjegyzést jelölõ sor batch fájlokban.\n\ +REN Átnevez egy állományt.\n\ +RENAME Átnevez egy állományt.\n\ +RMDIR Töröl egy mappát.\n\ +SCREEN Megváltoztatja a kurzos pozícióját, vagy megjelenít adott pozícióban egy szöveget.\n\ +SET Megjeleníti vagy beállítja a környezeti változókat.\n\ +SHIFT Eltolja a helyettesíthetõ paraméterek pozícióját a batch állományban.\n" +IDS_HELP2, "START Egy új ablakban hajtha végre a parancsot.\n\ +TIME Megjeleníti vagy beállítja a rendszeridõt.\n\ +TIMER Idõzítõk kezelését teszi lehetõve.\n\ +TITLE Beállítja az ablak címsorának szövegét.\n\ +TYPE Megjeleníti egy állomány tartalmát.\n\ +VER Megjeleníti a ReactOS verzió információját.\n\ +VERIFY Írási mûveletek ellenõrzését vezérli\n\ +VOL Megjeleníti egy kötet címkéjét és sorozatszámát.\n" + +END diff --git a/base/applications/cmdutils/help/lang/id-ID.rc b/base/applications/cmdutils/help/lang/id-ID.rc new file mode 100644 index 00000000000..188aa2afce1 --- /dev/null +++ b/base/applications/cmdutils/help/lang/id-ID.rc @@ -0,0 +1,78 @@ +/* + * Indonesian language file by Zaenal Mutaqin 2007-02-15 + */ + +LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_NO_ENTRY, "This command is not supported by the help utility.\nTry ""%s /?""\n." +END + +STRINGTABLE +BEGIN + +IDS_USAGE, "Provides Help information for ReactOS commands.\n\n\ +HELP [command]\n\n\ + command - Display help information for this command.\n" + +IDS_HELP1, "Daftar semua perintah yang tersedia (+ deskripsi)\n\n\ + help command\n\ + command /? Untuk informasi lengkap pada perintah tertentu\n\n\ +? Daftar semua perintah yang tersedia tanpa deskripsi.\n\ +ALIAS Menyetel, menghapus atau menampilkan alias.\n\ +ATTRIB Menampilkan atau mengubah atribut file.\n\ +BEEP Membunyikan speaker.\n\ +CALL Memanggil program batch dari yang lain.\n\ +CD Menampilkan nama atau mengubah direktori saat ini.\n\ +CHCP Menampilkan atau menyetel nomor halaman kode aktif.\n\ +CHOICE Menunggu pengguna untuk memilih satu dari set pilihan.\n\ +CLS Membersihkan layar.\n\ +CMD Memulai instan interpreter perintah ReactOS baru.\n\ +COLOR Menyetel warna standar latar belakang dan depan konsol.\n\ +COPY Mengcopy satu atau lebih file ke lokasi lain.\n\ +DATE Menampilkan atau menyetel tanggal.\n\ +DELETE Menghapus satu atau lebih file.\n\ +DIR Menampilkan daftar file dan subdirektori dalam sebuah direktori.\n\ +ECHO Menampilkan pesan, atau menghidupkan/mematikan echo perintah.\n\ +ERASE Menghapus satu atau lebih file.\n\ +EXIT Keluar dari program CMD.EXE (interpreter perintah).\n\ +FOR Menjalankan perintah tertentu untuk setiap file atau set file.\n\ +FREE (bebas) ruang disc.\n\ +GOTO Melangsungkan interpreter perintah ReactOS ke baris berlabel dalam\n\ + program batch.\n\ +HELP Menyediakan informasi Bantuan untuk perintah ReactOS.\n\ +HISTORY Mendaftarkan semua perintah yang sudah digunakan\n\ +IF Melakukan pemrosesan kondisional dalam program batch.\n\ +LABEL Membuat, mengubah, atau menghapus label volume disk.\n\ +MD Membuat sebuah direktori.\n\ +MKDIR Membuat sebuah direktori.\n\ +MKLINK Creates a filesystem link object.\n\ +MOVE Memindahkan satu atau lebih file dari satu direktori ke yang lainnya\n\ + directory.\n\ +PATH Menampilkan atau menyetel path pencarian untuk file executable.\n\ +PAUSE Menunda proses file batch dan menampilkan pesan.\n\ +POPD Mengembalikan nilai sebelumnya dari direktori saat ini yang\n\ + disimpan oleh PUSHD.\n\ +PROMPT Mengubah prompt perintah.\n\ +PUSHD Menyimpan direktori saat ini lalu mengubahnya.\n\ +RD Menghapus direktori.\n\ +REM Merekam komentar (remarks) dalam file batch.\n\ +REN Mengganti nama file.\n\ +RENAME Mengganti nama file.\n\ +RMDIR Menghapus direktori.\n\ +SCREEN Memindahkan kursor dan secara opsional mencetak teks.\n\ +SET Menampilkan, menyetel, atau menghapus variabel lingkungan ReactOS.\n\ +SHIFT Mengangkat posisi parameter yang bisa diganti dalam file batch.\n" +IDS_HELP2, "START Memulai jendela terpisah untuk menjalankan perintah atau program tertentu.\n\ + Menjalankan perintah.\n\ +TIME Menampilkan atau menyetel jam sistem.\n\ +TIMER Mengijinkan penggunaan sepuluh stopwatch.\n\ +TITLE Menyetel judul jendela untuk ses CMD.EXE.\n\ +TYPE Menampilkan isi dari file teks.\n\ +VER Menampilkan versi ReactOS.\n\ +VERIFY Memberitahu ReactOS apakah memverifikasi bahwa file anda ditulis\n\ + dengan benar ke sebuah disk.\n\ +VOL Menampilkan label volume disk dan nomor seri.\n" + +END diff --git a/base/applications/cmdutils/help/lang/it-IT.rc b/base/applications/cmdutils/help/lang/it-IT.rc new file mode 100644 index 00000000000..6df8a77c1cd --- /dev/null +++ b/base/applications/cmdutils/help/lang/it-IT.rc @@ -0,0 +1,72 @@ +LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL + +STRINGTABLE +BEGIN + IDS_NO_ENTRY, "This command is not supported by the help utility.\nTry ""%s /?""\n." +END + +STRINGTABLE +BEGIN + +IDS_USAGE, "Provides Help information for ReactOS commands.\n\n\ +HELP [command]\n\n\ + command - Display help information for this command.\n" + +IDS_HELP1, "Elenco di tutti i comandi disponibili (+ descrizione)\n\n\ + help comando\n\ + comando /? Per i dettagli su uno specifico comando\n\n\ +? Elenco di tutti i comandi disponibili.\n\ +ALIAS Imposta, toglie o visualizza gli alias.\n\ +ASSOC Modifica le associazioni per le estensioni dei file.\n\ +ATTRIB Visualizza o modifica gli attributi dei file.\n\ +BEEP Segnale acustico.\n\ +CALL Chiama un batch da un'altro.\n\ +CD Visualizza il nome o modifica la cartella corrente.\n\ +CHCP Visualizza o imposta il numero della tabella dei codici.\n\ +CHOICE Aspetta che l'utente scelga una tra le opzioni disponibili.\n\ +CLS Cancella lo schermo.\n\ +CMD Esegue un altro interprete dei comandi.\n\ +COLOR Imposta i colori della console.\n\ +COPY Copia uno o più file in un'altra destinazione.\n\ +DATE Visualizza o modifica la data.\n\ +DELETE Cancella uno o più file.\n\ +DIR Visualizza un elenco di file e sottocartelle in una cartella.\n\ +ECHO Visualizza messaggi o abilita e disabilita la visualizzazione dei comandi.\n\ +ERASE Cancella uno o più file.\n\ +EXIT Esce dall'interprete dei comandi.\n\ +FOR Esegue un comando per ognuno dei file indicati.\n\ +FREE Spazio libero.\n\ +GOTO Salta a una etichetta durante l'esecuzione di un batch.\n\ +HELP Fornisce informazioni sui comandi di ReactOS.\n\ +HISTORY Elenco degli ultimi comandi usati\n\ +IF Esegue elaborazioni condizionali in un batch.\n\ +LABEL Crea, modifica, o cancella l'etichetta di un disco.\n\ +MD Crea una cartella.\n\ +MKDIR Crea una cartella.\n\ +MKLINK Crea un oggetto di collegamento nel filesystem.\n\ +MOVE Muove uno o più file da una cartella a un'altra\n\ +PATH Visualizza o imposta i percorsi di ricerca per gli eseguibili.\n\ +PAUSE Ferma l'esecuzione di un batch e visualizza un messaggio.\n\ +POPD Ripristina il valore precedente della cartella corrente salvato da\n\ + PUSHD.\n\ +PROMPT Cambia il messaggio di pronto per i comandi.\n\ +PUSHD Salva la cartella corrente e poi la cambia.\n\ +RD Rimuove una cartella.\n\ +REM Commenti in un batch.\n\ +REN Rinomina uno più file.\n\ +RENAME Rinomina uno più file.\n\ +RMDIR Rimuove una cartella.\n\ +SCREEN Sposta il cursore e visualizza un testo.\n\ +SET Visualizza, modifica, o cancella le variabili di ambiente.\n\ +SHIFT Scorre la posizione dei parametri nei batch.\n" +IDS_HELP2, "START Apre una finestra separata ed esegue uno specifico comando.\n\ +TIME Visualizza o modifica l'ora di sistema.\n\ +TIMER Permette l'uso di cronometri.\n\ +TITLE Imposta il titolo della finestra per una sessione di CMD.EXE.\n\ +TYPE Visualizza il contenuto di un file di testo.\n\ +VER Visualizza la versione di ReactOS.\n\ +VERIFY Richiede che ReactOS verifichi che i file siano scritti correttamente\n\ + su disco.\n\ +VOL Visualizza l'etichetta del volume e il numero di serie del disco.\n" + +END diff --git a/base/applications/cmdutils/help/lang/ja-JP.rc b/base/applications/cmdutils/help/lang/ja-JP.rc new file mode 100644 index 00000000000..1815e7b55f2 --- /dev/null +++ b/base/applications/cmdutils/help/lang/ja-JP.rc @@ -0,0 +1,76 @@ +/* + * Japanese translation of CMD + */ + +LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_NO_ENTRY, "This command is not supported by the help utility.\nTry ""%s /?""\n." +END + +STRINGTABLE +BEGIN + +IDS_USAGE, "Provides Help information for ReactOS commands.\n\n\ +HELP [command]\n\n\ + command - Display help information for this command.\n" + +IDS_HELP1, "利用可能なすべてのコマンドの一覧と、その説明。\n\n\ + help コマンド\n\ + コマンド /? 特定のコマンドに関する詳細情報\n\n\ +? 利用可能なすべてのコマンドの一覧 (説明なし)。\n\ +ALIAS エイリアスの設定や解除をしたり、エイリアスを表示したりします。\n\ +ATTRIB ファイル属性を表示または変更します。\n\ +BEEP スピーカからビープ音を鳴らします。\n\ +CALL バッチ プログラムを別のバッチ プログラムから呼び出します。\n\ +CD 現在のディレクトリを変更したり、ディレクトリ名を表示したりします。\n\ +CHCP 現在のコード ページ番号を表示または設定します。\n\ +CHOICE ユーザーが選択肢から一つを選択するのを待ちます。\n\ +CLS 画面を消去します。\n\ +CMD ReactOS コマンド インタープリタの新しいインスタンスを開始します。\n\ +COLOR コンソールのデフォルトの前景色および背景色を設定します。\n\ +COPY 1 つまたは複数のファイルを別の場所にコピーします。\n\ +DATE 日付を表示または設定します。\n\ +DELAY n 秒、または n ミリ秒待機します。\n\ +DELETE 1 つまたは複数のファイルを削除します。\n\ +DIR ディレクトリ中のファイルとサブディレクトリを一覧表示します。\n\ +ECHO メッセージを表示したり、コマンド エコーの ON と OFF を切り替えます。\n\ +ERASE 1 つまたは複数のファイルを削除します。\n\ +EXIT CMD.exe (コマンド ライン インタープリタ) を終了します。\n\ +FOR 指定されたコマンドをファイル セットの各ファイルに対して実行します。\n\ +FREE ディスクの空き容量\n\ +GOTO バッチ プログラム内の、ラベルで指定されている行へ制御を移動します。\n\ +HELP ReactOS コマンドのヘルプ情報を提供します。\n\ +HISTORY 使用されたすべてのコマンドを一覧表示します。\n\ +IF バッチ プログラム中で条件処理を実行します。\n\ +LABEL ディスクのボリューム ラベルを表示または変更します。\n\ +MD ディレクトリを作成します。\n\ +MKDIR ディレクトリを作成します。\n\ +MKLINK Creates a filesystem link object.\n\ +MOVE ファイルを移動およびファイルとディレクトリ名を変更します。\n\ +PATH 実行可能ファイルの検索パスを表示または設定します。\n\ +PAUSE バッチ プログラムの処理を一時停止し、メッセージを表示します。\n\ +POPD 現在のディレクトリを PUSHD コマンドで記憶されたディレクトリに\n\ + 変更します。\n\ +PROMPT コマンド プロンプトを変更します。\n\ +PUSHD 現在のディレクトリを保存し、指定したディレクトリに変更します。\n\ +RD ディレクトリを削除します。\n\ +REM バッチ ファイルにコメント (注釈) を記録します。\n\ +REN 1 つまたは複数のファイルの名前を変更します。\n\ +RENAME 1 つまたは複数のファイルの名前を変更します。\n\ +RMDIR ディレクトリを削除します。\n\ +SCREEN カーソルを移動させます。移動後、文字列を入力することもできます。\n\ +SET 環境変数を表示、設定、または削除します。\n\ +SHIFT カーソルを移動させます。移動後、文字列を入力することもできます。\n" +IDS_HELP2, "START 別のウィンドウを起動し、指定したプログラムまたはコマンドを実行します。\n\ +TIME システム時刻を表示または設定します。\n\ +TIMER 10 個までのストップウォッチを使うことができます。\n\ +TITLE コマンド プロンプト ウィンドウのウィンドウ タイトルを設定します。\n\ +TYPE テキスト ファイルまたはファイルの内容を表示します。\n\ +VER ReactOS のバージョンを表示します。\n\ +VERIFY ファイルがディスクに正しく書き込まれたことを照合するかどうかを\n\ + 指示します。\n\ +VOL ディスクのボリューム ラベルとシリアル番号を表示します。\n" + +END diff --git a/base/applications/cmdutils/help/lang/no-NO.rc b/base/applications/cmdutils/help/lang/no-NO.rc new file mode 100644 index 00000000000..1908e0501c7 --- /dev/null +++ b/base/applications/cmdutils/help/lang/no-NO.rc @@ -0,0 +1,73 @@ +LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL + +STRINGTABLE +BEGIN + IDS_NO_ENTRY, "This command is not supported by the help utility.\nTry ""%s /?""\n." +END + +STRINGTABLE +BEGIN + +IDS_USAGE, "Provides Help information for ReactOS commands.\n\n\ +HELP [command]\n\n\ + command - Display help information for this command.\n" + +IDS_HELP1, "Liste av alle tilgjengelige kommandoer (+ beskrivelse)\n\n\ +help kommando\n\ +kommando /? For mer informasjon om en bestemt kommando\n\n\ +? Lister alle tilgjengelige kommando uten beskrivelse).\n\ +ALIAS Sett, fjern eller vis alias.\n\ +ATTRIB Viser eller endre fil attributter.\n\ +BEEP Piper i høyttaleren.\n\ +CALL Starte et satsvis program fra et annet.\n\ +CD Vis navnet på eller endrer gjeldende mappe.\n\ +CHCP Viser eller angir nummer på aktiv tegntabell.\n\ +CHOICE Venter til bruken velger en av et sett av valg.\n\ +CLS Tømmer skjermen.\n\ +CMD Start en ny forekomst av ReactOS kommandotolk.\n\ +COLOR Angir standard forgrunn- og bakgrunnsfargr for konsollen.\n\ +COPY Kopierer en eller flere filer til en annen plassering.\n\ +DATE Viser eller angir datoen.\n\ +DELETE Sletter en eller flere filer.\n\ +DIR Viser en liste over filer og undermapper i en mappe.\n\ +ECHO Viser meldinger, eller slår kommandoecho på eller av.\n\ +ERASE Sletter en eller flere filer.\n\ +EXIT Avslutter programmet CMD.EXE program (kommandotolken).\n\ +FOR Kjør en bestemt kommando for hver fil i et sett av filer.\n\ +FREE Viser ledig diskplass.\n\ +GOTO Leder ReactOS kommandotolk til en merket linje i\n\ + et satsvis program.\n\ +HELP Viser hjelpeinformasjon for ReactOS-kommandoer.\n\ +HISTORY Lister alle kommandoer som har blitt brukt\n\ +IF Utføre betinget behandling i satsvise programmer.\n\ +LABEL Oppretter, endrer, eller sletter volumnavnet på en disk.\n\ +MD Oppretter en mappe.\n\ +MKDIR Oppretter en mappe.\n\ +MKLINK Creates a filesystem link object.\n\ +MOVE Flytter en eller flere filer fra en mappe til en annen.\n\ +PATH Vis eller sett en søkesti for kjørbare filer.\n\ +PAUSE Avbryter behandling av en satsvis fil, og viser en melding.\n\ +POPD Fjenoppretter den forige verdien av gjeldende mappe, lagret av\n\ + PUSHD.\n\ +PROMPT Endre kommandoledeteksten.\n\ +PUSHD Lagre gjeldende mappe og endrer den etterpå.\n\ +RD Fjerner en mappe.\n\ +REM Angir kommentarer i satsvise filer.\n\ +REN Gir nytt navn til en eller flere filer.\n\ +RENAME Gir nytt navn til en eller flere filer.\n\ +RMDIR Fjerner en mappe.\n\ +SCREEN Flytter markør.\n\ +SET Vis, sett, eller fjern ReactOS miljøvariabel.\n\ +SHIFT Shift plass for erstattelige parameter i satsvise filer.\n" +IDS_HELP2, "START Start et separat vindu til å kjøre et spesifisert program eller kommando.\n\ + Utfører kommando.\n\ +TIME Vis eller sett system tid.\n\ +TIMER Håndtere stoppeklokker (maks 10 stk).\n\ +TITLE Sett vindustittel for CMD.EXE sesjon.\n\ +TYPE Vis innholdet i en tekst fil.\n\ +VER Viser ReactOS versjon.\n\ +VERIFY Forteller ReactOS om å bekrefte om dine filer er skrevet\n\ + riktig til disk.\n\ +VOL Vis et volums navn og serienummer.\n" + +END diff --git a/base/applications/cmdutils/help/lang/pl-PL.rc b/base/applications/cmdutils/help/lang/pl-PL.rc new file mode 100644 index 00000000000..02892b117ae --- /dev/null +++ b/base/applications/cmdutils/help/lang/pl-PL.rc @@ -0,0 +1,82 @@ +/* + * Translated by Caemyr - Olaf Siejka (Jan,2008) + * Updated by niski - Maciej Bialas (Mar,2010) + * Use ReactOS forum PM or IRC to contact me + * http://www.reactos.org + * IRC: irc.freenode.net #reactos-pl; + * UTF-8 conversion by Caemyr (May, 2011) + */ + +LANGUAGE LANG_POLISH, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_NO_ENTRY, "This command is not supported by the help utility.\nTry ""%s /?""\n." +END + +STRINGTABLE +BEGIN + +IDS_USAGE, "Provides Help information for ReactOS commands.\n\n\ +HELP [command]\n\n\ + command - Display help information for this command.\n" + +IDS_HELP1, "Lista wszystkich dostępnych komend (+opisy)\n\n\ + help komenda\n\ + komenda /? Wyświetla dokładny opis danej komendy\n\n\ +? Lista wszystkich dostępnych komend (bez opisów).\n\ +ALIAS Ustawia, pokazuje lub usuwa aliasy.\n\ +ATTRIB Wyświetla lub zmienia atrybuty plików.\n\ +BEEP Sygnał przez głośnik PC.\n\ +CALL Wywołuje program wsadowy z poziomu innego.\n\ +CD Wyświetla ścieżkę lub przechodzi do innego katalogu.\n\ +CHCP Wyświetla lub ustawia bieżącą stronę kodową.\n\ +CHOICE Przedstawia użytkownikowi kilka możliwości i czeka na wybór.\n\ +CLS Czyści ekran.\n\ +CMD Uruchamia kolejne okno konsoli ReactOS.\n\ +COLOR Ustawia kolory tła i tekstu w oknie konsoli.\n\ +COPY Kopiuje jeden lub więcej plików w inne miejsce.\n\ +DATE Wyświetla lub ustawia datę.\n\ +DELETE Kasuje jeden lub więcej plików.\n\ +DIR Wyświetla listę plików i podkatalogów w danym katalogu.\n\ +ECHO Wyświetla wiadomości albo włącza/wyłącza komendę ECHO.\n\ +ERASE Kasuje jeden lub więcej plików.\n\ +EXIT Zamyka bieżące okno konsoli.\n\ +FOR Wykonuje określoną komendę dla każdego pliku z określonej listy.\n\ +FREE Wolne miejsce na dysku.\n\ +GOTO Kieruje interpreter poleceń do określonej linii,\n\ + oznaczonej, w danym programie wsadowym.\n\ +HELP Lista komend konsoli ReactOS wraz z opisem.\n\ +HISTORY Lista użytych komend.\n\ +IF Przetwarzanie warunkowe w programach wsadowych.\n\ +LABEL Tworzy, zmienia lub kasuje etykietę woluminu w danym napędzie.\n\ +MD Tworzy katalog.\n\ +MKDIR Tworzy katalog.\n\ +MKLINK Tworzy dowiązanie obiektu w systemie plików.\n\ +MOVE Przenosi jeden lub więcej plików z jednego katalogu do drugiego.\n\ +PATH Wyświetla lub ustawia ścieżki dostępu dla programów.\n\ +PAUSE Zawiesza przetwarzanie programu wsadowego i wyświetla komunikat.\n\ +POPD Odtwarza poprzednią nazwę danego katalogu, zapisaną przez\n\ + PUSHD.\n\ +PROMPT Zmienia znak zachęty w linii poleceń.\n\ +PUSHD Zapisuje obecną nazwę katalogu, po czym zmienia ją.\n\ +RD Usuwa katalog.\n\ +REM Oznaczenie linii komentarza w programie wsadowym.\n\ +REN Zmienia nazwę pliku lub plików.\n\ +RENAME Zmienia nazwę pliku lub plików.\n\ +RMDIR Usuwa katalog.\n\ +SCREEN Przenosi kursor i opcjonalnie wyświetla tekst.\n\ +SET Wyświetla, ustawia lub usuwa zmienne środowiskowe.\n\ +SHIFT Przenosi zamienne parametry w programach wsadowych.\n" +IDS_HELP2, "START Uruchamia oddzielne okno do wykonania określonego polecenia lub komendy.\n\ + Wykonuje polecenie.\n\ +TIME Wyświetla lub zmienia czas systemowy.\n\ +TIMER Pozwala na użycie do 10 stoperów.\n\ +TITLE Ustanawia tytuł dla danej sesji CMD.EXE.\n\ +TYPE Wyświetla zawartość pliku tekstowego.\n\ +VER Wyświetla wersję systemu ReactOS.\n\ +VERIFY Decyduje czy ReactOS ma sprawdzać poprawność zapisu plików\n\ + na dysku.\n\ +VOL Wyświetla etykietę woluminu na danym napędzie i numer seryjny.\n" + +END diff --git a/base/applications/cmdutils/help/lang/ro-RO.rc b/base/applications/cmdutils/help/lang/ro-RO.rc new file mode 100644 index 00000000000..6060e296f3e --- /dev/null +++ b/base/applications/cmdutils/help/lang/ro-RO.rc @@ -0,0 +1,93 @@ +/* + * FILE: base/shell/cmd/lang/ro-RO.rc + * ReactOS Project (http://www.reactos.org) + * AUTHOR: Magnus Olsen, 2005 + * TRANSLATOR: Fulea Ștefan (PM on ReactOS Forum to fulea.stefan) + * CHANGE LOG: 2011-08-25 initial translation + * 2011-10-30 UTF-8 encoding (with diacritics conversion), minor changes + */ + +LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL + +STRINGTABLE +BEGIN + IDS_NO_ENTRY, "This command is not supported by the help utility.\nTry ""%s /?""\n." +END + +STRINGTABLE +BEGIN + +IDS_USAGE, "Provides Help information for ReactOS commands.\n\n\ +HELP [command]\n\n\ + command - Display help information for this command.\n" + +IDS_HELP1, "Enumeră toate comenzile disponibile (+ descriere)\n\n\ + help comandă\n\ + comandă /? Pentru mai multe informații referitoare la o anume comandă.\n\n\ +? Enumeră toate comenzile disponibile (fără descriere).\n\ +ALIAS Instituie, destituie sau afișează alias.\n\ +ASSOC Modifică asocierile extensiilor de fișiere.\n\ +ATTRIB Afișează sau modifică atributele fișierelor.\n\ +BEEP Semnalizează utilizând difuzorul intern.\n\ +CALL Apelează dintr-un fișier de comenzi, un alt fișier de comenzi.\n\ +CD Afișează sau schimbă directorul curent.\n\ +CHCP Afișează sau stabilește numărul codificării curente a paginii.\n\ +CHDIR Afișează sau schimbă directorul curent.\n\ +CHOICE Așteaptă alegerea unei opțiuni (din mai multe furnizate).\n\ +CLS Curăță ecranul.\n\ +CMD Lansează o nouă instanță a interpretorului de comenzi ReactOS.\n\ +COLOR Stabilește culorile implicite pentru text și fundal.\n\ +COPY Copiază unul sau mai multe fișiere dintr-un loc în altul.\n\ +DATE Afișează sau stabilește data.\n\ +DEL Șterge unul sau mai multe fișiere.\n\ +DELETE Șterge unul sau mai multe fișiere.\n\ +DELAY Impune o pauză pe o durată de timp specificată.\n\ +DIR Enumeră conținutul unui director.\n\ +DIRS Afișează conținutul stivei de directoare.\n\ +ECHO Afișează mesaje în ecou sau\n\ + activează/dezactivează această funcționalitate.\n\ +ECHOS Afișează un mesaj în ecou fără a trece în rând nou.\n\ +ECHOERR Afișeză un mesaj în ecou la ieșirea standard pentru erori\n\ +ECHOSERR Afișează un mesaj în ecou la ieșirea standard pentru erori fără a\n\ + trece în rând nou.\n\ +ERASE Șterge unul sau mai multe fișiere.\n\ +EXIT Ieșire din (interpretorul de comenzi) CMD.EXE\n\ +FOR Execută o comandă pentru fiecare fișier dintr-un grup (de fișiere).\n\ +FREE Oferă informații despre unitatea de stocare.\n\ +GOTO Execută salturi către rânduri etichetate în interiorul unui\n\ + fișier de comenzi.\n\ +HELP Oferă informații referitoare la comenzile ReactOS.\n\ +HISTORY Enumeră toate comenzile care au fost utilizate.\n\ +IF Realizează execuții condiționate în fișierele de comenzi.\n\ +LABEL Crează, modifică, sau șterge eticheta unei unități de stocare.\n\ +MEMORY Afișează informații referitoare la memoria sistemului.\n\ +MD Crează un director.\n\ +MKDIR Crează un director.\n\ +MKLINK Crează un obiect-legătură în sistemul de fișiere.\n\ +MOVE Mută unul sau mai multe fișiere dintr-un director în altul.\n" +IDS_HELP2, "PATH Afișează sau stabilește căile de căutare de fișierelor executabile.\n\ +PAUSE Suspendă execuția unui fișier de comenzi și afișează un mesaj.\n\ +POPD Restabilește valoarea precedentă a directorului curent, anterior\n\ + stocată cu PUSHD.\n\ +PROMPT Modifică aspectul liniei de comandă.\n\ +PUSHD Reține calea directorului curent și o schimbă cu alta nouă.\n\ +RD Elimină un director.\n\ +REM Desemnează un rând de comentarii într-un fișier de comenzi.\n\ +REN Redenumește un fișier/director sau un grup (de fișiere/directoare).\n\ +RENAME Redenumește un fișier/director sau un grup (de fișiere/directoare).\n\ +REPLACE Înlocuiește fișiere.\n\ +RMDIR Elimină un director.\n\ +SCREEN Mută cursorul și (opțional) afișează un text.\n\ +SET Afișează, stabilește sau elimină variabile de mediu ReactOS.\n\ +SHIFT Schimbă poziția argumentelor înlocuibile într-un fișier de comenzi.\n\ +START Deschide o fereastră separată pentru execuția unui executabil sau\n\ + (fișier de) comenzi.\n\ +TIME Afișează sau stabilește data sistemului.\n\ +TIMER Gestionează cronometre.\n\ +TITLE Stabilește titlul pentru fereastra unei sesiuni CMD.EXE\n\ +TYPE Afișează conținutul unui fișier text.\n\ +VER Afișează versiunea ReactOS.\n\ +VERIFY Verifică scrierea corectă a fișierelor pe disc.\n\ +VOL Afișează eticheta și numărul de serie a unui volum.\n" + +END diff --git a/base/applications/cmdutils/help/lang/ru-RU.rc b/base/applications/cmdutils/help/lang/ru-RU.rc new file mode 100644 index 00000000000..a655f73fcc3 --- /dev/null +++ b/base/applications/cmdutils/help/lang/ru-RU.rc @@ -0,0 +1,80 @@ +/* + * Russian language file by + * Andrey Korotaev (unC0Rr@inbox.ru) + * and + * Aleksey Bragin (aleksey@reactos.com) + * Copyright 2005 + */ + +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_NO_ENTRY, "This command is not supported by the help utility.\nTry ""%s /?""\n." +END + +STRINGTABLE +BEGIN + +IDS_USAGE, "Provides Help information for ReactOS commands.\n\n\ +HELP [command]\n\n\ + command - Display help information for this command.\n" + +IDS_HELP1, "Список всех доступных команд с коротким описанием\n\n\ + help команда\n\ + команда /? Выводит подробную информацию о команде\n\n\ +? Список всех доступных команд без описания.\n\ +ALIAS Вывод, установка или удаление псевдонимов.\n\ +ATTRIB Вывод и изменение атрибутов файлов.\n\ +BEEP Звуковой сигнал.\n\ +CALL Вызов одного пакетного файла из другого.\n\ +CD Вывод имени либо смена текущего каталога.\n\ +CHCP Вывод или смена текущего номера кодовой страницы.\n\ +CHOICE Ждет, пока пользователь не выберет один из указанных в списке символов.\n\ +CLS Очистка экрана.\n\ +CMD Запуск новой копии интерпретатора команд.\n\ +COLOR Установка цветов по умолчанию для текста и фона.\n\ +COPY Копирование одного или нескольких файлов в другое место.\n\ +DATE Вывод или изменение даты.\n\ +DELETE Удаление одного или нескольких файлов.\n\ +DIR Вывод списка файлов и подкаталогов каталога.\n\ +ECHO Вывод сообщений и переключение режима отображения команд на экране.\n\ +ERASE Удаление одного или нескольких файлов.\n\ +EXIT Завершает интерпретатор команд.\n\ +FOR Запускает указанную команду для каждого файла из набора файлов.\n\ +FREE (Свободное) дисковое пространство.\n\ +GOTO Передача управления содержащей метку строке пакетного файла\n\ +HELP Предоставляет справочную информацию о командах ReactOS.\n\ +HISTORY Список запущенных команд\n\ +IF Оператор условного выполнения команд в пакетном файле.\n\ +LABEL Создание, изменение и удаление меток тома.\n\ +MD Создание каталога.\n\ +MKDIR Создание каталога.\n\ +MKLINK Creates a filesystem link object.\n\ +MOVE Перемещение файлов и переименование файлов и каталогов\n\ +PATH Вывод или задание пути поиска исполняемых файлов.\n\ +PAUSE Приостановка выполнения пакетного файла.\n\ +POPD Восттанавливает предыдущее значение текущей директории сохраненное командой\n\ + PUSHD.\n\ +PROMPT Изменение приглашения командной строки.\n\ +PUSHD Сохраняет текущую директорию, а потом меняет ее.\n\ +RD Удаление каталога.\n\ +REM Записывает комментарии (замечения) в пакетных файлах.\n\ +REN Переименование одного или нескольких файлов или каталогов.\n\ +RENAME Переименование одного или нескольких файлов или каталогов.\n\ +RMDIR Удаление каталога.\n\ +SCREEN Перемещение курсора и вывод текста.\n\ +SET Вывод, задание и удаление переменных среды.\n\ +SHIFT Изменение содержимого (сдвиг) подставляемых параметров для пакетного файла\n" +IDS_HELP2, "START Открывает отдельное окно для запуска указанных команд или программ.\n\ + Выполняет команду.\n\ +TIME Вывод или изменение времени.\n\ +TIMER Секундомер.\n\ +TITLE Изменение заголовка окна командной строки.\n\ +TYPE Вывод содержимого одного или нескольких текстовых файлов.\n\ +VER Вывод версии ОС.\n\ +VERIFY Включение или отключение режима проверки правильности записи файлов\n\ + на диск.\n\ +VOL Выводит метку тома и серийный номер.\n" + +END diff --git a/base/applications/cmdutils/help/lang/sk-SK.rc b/base/applications/cmdutils/help/lang/sk-SK.rc new file mode 100644 index 00000000000..1716d44df73 --- /dev/null +++ b/base/applications/cmdutils/help/lang/sk-SK.rc @@ -0,0 +1,83 @@ +/* Slovak translation for CMD + * TRANSLATOR: Mário Kačmár /Mario Kacmar/ aka Kario (kario@szm.sk) + * DATE OF TR: 21-03-2009 + * LastChange: 10-08-2010 + * _________________________________________________________________ + * NOTE : This file is not fully translated + */ + +LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_NO_ENTRY, "This command is not supported by the help utility.\nTry ""%s /?""\n." +END + +STRINGTABLE +BEGIN + +IDS_USAGE, "Provides Help information for ReactOS commands.\n\n\ +HELP [command]\n\n\ + command - Display help information for this command.\n" + +IDS_HELP1, "Zoznam všetkých dostupných príkazov (+ popis)\n\n\ + help príkaz\n\ + príkaz /? Pre viac informácií o konkrétnom príkaze\n\n\ +? Zoznam všetkých dostupných príkazov (bez popisu).\n\ +ALIAS Sets, removes or shows aliases.\n\ +ATTRIB Displays or changes file attributes.\n\ +BEEP Pípnutie reproduktora.\n\ +CALL Calls one batch program from another.\n\ +CD Displays the name of or changes the current directory.\n\ +CHCP Displays or sets the active code page number.\n\ +CHOICE Waits for the user to choose one of a set of choices.\n\ +CLS Vymaže obrazovku.\n\ +CMD Starts a new instance of the ReactOS command interpreter.\n\ +COLOR Sets the default console foreground and background colors.\n\ +COPY Skopíruje jeden alebo viac súborov na iné umiestnenie.\n\ +DATE Zobrazí alebo nastaví dátum.\n\ +DELETE Deletes one or more files.\n\ +DIR Displays a list of files and subdirectories in a directory.\n\ +ECHO Displays messages, or turns command echoing on or off.\n\ +ERASE Deletes one or more files.\n\ +EXIT Quits the CMD.EXE program (command interpreter).\n\ +FOR Runs a specified command for each file in a set of files.\n\ +FREE (free) disc space.\n\ +GOTO Directs the ReactOS command interpreter to a labeled line in\n\ + a batch program.\n\ +HELP Provides Help information for ReactOS commands.\n\ +HISTORY List all commands which has been used\n\ +IF Performs conditional processing in batch programs.\n\ +LABEL Creates, changes, or deletes the volume label of a disk.\n\ +MD Vytvorí adresár.\n\ +MKDIR Vytvorí adresár.\n\ +MKLINK Creates a filesystem link object.\n\ +MOVE Moves one or more files from one directory to another\n\ + directory.\n\ +PATH Displays or sets a search path for executable files.\n\ +PAUSE Suspends processing of a batch file and displays a message.\n\ +POPD Restores the previous value of the current directory saved by\n\ + PUSHD.\n\ +PROMPT Changes the command prompt.\n\ +PUSHD Saves the current directory then changes it.\n\ +RD Removes a directory.\n\ +REM Records comments (remarks) in batch files.\n\ +REN Premenuje súbor alebo súbory.\n\ +RENAME Premenuje súbor alebo súbory.\n\ +REPLACE Replaces files.\n\ +RMDIR Removes a directory.\n\ +SCREEN Move cursor and optionally print text.\n\ +SET Displays, sets, or removes ReactOS environment variables.\n\ +SHIFT Shifts the position of replaceable parameters in batch files.\n" +IDS_HELP2, "START Starts a separate window to run a specified program or command.\n\ + Executes command.\n\ +TIME Zobrazí alebo nastaví systémový čas.\n\ +TIMER Allow the use of ten stopwatches.\n\ +TITLE Sets the window title for a CMD.EXE session.\n\ +TYPE Displays the contents of a text file.\n\ +VER Displays the ReactOS version.\n\ +VERIFY Tells ReactOS whether to verify that your files are written\n\ + correctly to a disk.\n\ +VOL Displays a disk volume label and serial number.\n" + +END diff --git a/base/applications/cmdutils/help/lang/sv-SE.rc b/base/applications/cmdutils/help/lang/sv-SE.rc new file mode 100644 index 00000000000..728795df586 --- /dev/null +++ b/base/applications/cmdutils/help/lang/sv-SE.rc @@ -0,0 +1,73 @@ +LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL + +STRINGTABLE +BEGIN + IDS_NO_ENTRY, "This command is not supported by the help utility.\nTry ""%s /?""\n." +END + +STRINGTABLE +BEGIN + +IDS_USAGE, "Provides Help information for ReactOS commands.\n\n\ +HELP [command]\n\n\ + command - Display help information for this command.\n" + +IDS_HELP1, "Liste av alle tilgjengelige kommandoer (+ beskrivelse)\n\n\ +help kommando\n\ +kommando /? For mer informasjon om en bestemt kommando\n\n\ +? Lister alle tilgjengelige kommando uten beskrivelse).\n\ +ALIAS Sett, fjern eller vis alias.\n\ +ATTRIB Viser eller ändra fil attributter.\n\ +BEEP Piper i høyttaleren.\n\ +CALL Starte et satsvis program fra et annet.\n\ +CD Vis namnet på eller endrer aktuell mapp.\n\ +CHCP Viser eller anger nummer på aktiv tegntabell.\n\ +CHOICE Venter til bruken väljer en av et sett av val.\n\ +CLS Tømmer skjermen.\n\ +CMD Start en ny forekomst av ReactOS kommandotolk.\n\ +COLOR Anger standard forgrunn- och bakgrunnsfargr for konsollen.\n\ +COPY Kopierer en eller flere filer til en annen plassering.\n\ +DATE Viser eller anger datoen.\n\ +DELETE Sletter en eller flere filer.\n\ +DIR Viser en liste over filer och undermappar i en mapp.\n\ +ECHO Viser meldinger, eller slår kommandoecho på eller av.\n\ +ERASE Sletter en eller flere filer.\n\ +EXIT Avslutter programmet CMD.EXE program (kommandotolken).\n\ +FOR Kjør en bestemt kommando for hver fil i et sett av filer.\n\ +FREE Viser ledig diskplass.\n\ +GOTO Leder ReactOS kommandotolk til en merket linje i\n\ + et satsvis program.\n\ +HELP Viser hjelpeinformasjon for ReactOS-kommandoer.\n\ +HISTORY Lister alle kommandoer som har blitt brukt\n\ +IF Utføre betinget behandling i satsvise programmer.\n\ +LABEL Oppretter, endrer, eller sletter volumnamnet på en disk.\n\ +MD Oppretter en mapp.\n\ +MKDIR Oppretter en mapp.\n\ +MKLINK Creates a filesystem link object.\n\ +MOVE Flytter en eller flere filer fra en mapp til en annen.\n\ +PATH Vis eller sett en søkesti for kjørbare filer.\n\ +PAUSE Avbryter behandling av en satsvis fil, och viser en melding.\n\ +POPD Fjenoppretter den forige verdien av aktuell mapp, lagret av\n\ + PUSHD.\n\ +PROMPT Ändra kommandoledeteksten.\n\ +PUSHD Lagre aktuell mapp och endrer den etterpå.\n\ +RD Fjerner en mapp.\n\ +REM Anger kommentarer i satsvise filer.\n\ +REN Gir nytt namn til en eller flere filer.\n\ +RENAME Gir nytt namn til en eller flere filer.\n\ +RMDIR Fjerner en mapp.\n\ +SCREEN Flytter markør.\n\ +SET Vis, sett, eller fjern ReactOS miljøvariabel.\n\ +SHIFT Shift plass for erstattelige parameter i satsvise filer.\n" +IDS_HELP2, "START Start et separat vindu til att kjøre et spesifisert program eller kommando.\n\ + Utfører kommando.\n\ +TIME Vis eller sett system tid.\n\ +TIMER Håndtere stoppeklokker (maks 10 stk).\n\ +TITLE Sett vindustittel for CMD.EXE sesjon.\n\ +TYPE Vis innholdet i en text fil.\n\ +VER Viser ReactOS version.\n\ +VERIFY Forteller ReactOS om att bekrefte om dine filer är skrevet\n\ + riktig til disk.\n\ +VOL Vis et volums namn och serienummer.\n" + +END diff --git a/base/applications/cmdutils/help/lang/uk-UA.rc b/base/applications/cmdutils/help/lang/uk-UA.rc new file mode 100644 index 00000000000..de2c7314b74 --- /dev/null +++ b/base/applications/cmdutils/help/lang/uk-UA.rc @@ -0,0 +1,82 @@ +/* + * PROJECT: Command-line interface + * LICENSE: GPL - See COPYING in the top level directory + * FILE: base/shell/cmd/lang/uk-UA.rc + * PURPOSE: Ukraianian Language File for Command-line interface + * TRANSLATORS: Artem Reznikov, Igor Paliychuk + */ + +LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_NO_ENTRY, "This command is not supported by the help utility.\nTry ""%s /?""\n." +END + +STRINGTABLE +BEGIN + +IDS_USAGE, "Provides Help information for ReactOS commands.\n\n\ +HELP [command]\n\n\ + command - Display help information for this command.\n" + +IDS_HELP1, "Список всiх доступних команд (+ опис)\n\n\ + help команда\n\ + команда /? Для докладної iнформацiї про конкретну команду\n\n\ +? Список всiх доступних команд без опису.\n\ +ALIAS Встановлення, видалення або показ псевдонiмiв.\n\ +ATTRIB Вiдображення або змiна атрибутiв файлу.\n\ +BEEP Звуковий сигнал динамiка.\n\ +CALL Виклик однiєї пакетної програми з iншої.\n\ +CD Вiдображення iменi або змiна поточної теки.\n\ +CHCP Вiдображення або встановлення поточного номера кодової сторiнки.\n\ +CHOICE Очiкування вибору користувачем одного з вказаних символiв.\n\ +CLS Очищення екрану.\n\ +CMD Запуск нової копiї iнтерпретатора команд ReactOS.\n\ +COLOR Встановлення типових кольорiв тексту i тла консолi.\n\ +COPY Копiювання одного або бiльше файлiв в iнше мiсце.\n\ +DATE Вiдображення або встановлення дати.\n\ +DELETE Видалення одного або бiльше файлiв.\n\ +DIR Вiдображення списку файлiв i пiдтек в тецi.\n\ +ECHO Вiдображення повiдомлень, або перемикання режиму вiдображення команд.\n\ +ERASE Видалення одного або бiльше файлiв.\n\ +EXIT Вихiд з програми CMD.EXE (iнтерпретатора команд).\n\ +FOR Запуск вказаної команди для кожного файлу з набору файлiв.\n\ +FREE (Вiльний) дисковий простiр.\n\ +GOTO Передача управлiння рядку пакетної програми, який мiстить мiтку.\n\ +HELP Довiдкова iнформацiя про команди ReactOS.\n\ +HISTORY Список усiх використаних команд.\n\ +IF Оператор обробки умов у пакетних програмах.\n\ +LABEL Створення, змiна, або видалення мiток тому диска.\n\ +MD Створення теки.\n\ +MKDIR Створення теки.\n\ +MKLINK Створення об'єкту-посилання файлової системи.\n\ +MOVE Перемiщення одного або бiльше файлiв з однiєї теки до iншої\n\ + теки.\n\ +PATH Вiдображення або встановлення шляху пошуку виконуваних файлiв.\n\ +PAUSE Тимчасове припинення обробки командного файлу i показ повiдомлення.\n\ +POPD Вiдновлює попереднє значення поточної теки, збережене командою\n\ + PUSHD.\n\ +PROMPT Змiна запрошення командного рядка.\n\ +PUSHD Зберiгає поточну теку, а потiм змiнює її.\n\ +RD Видалення теки.\n\ +REM Записує коментарi (зауваження) в командних файлах.\n\ +REN Перейменування файла або файлiв.\n\ +RENAME Перейменування файла або файлiв.\n\ +REPLACE Замiна файлiв.\n\ +RMDIR Перемiщення теки.\n\ +SCREEN Перемiщення курсора i виведення тексту.\n\ +SET Вiдображення, встановлення, або видалення змiнних оточення ReactOS.\n\ +SHIFT Зрушення позицiї замiнних параметрiв у командних файлах.\n" +IDS_HELP2, "START Вiдкриває окреме вiкно для запуску вказаних команд або програм.\n\ + Виконує команду.\n\ +TIME Вiдображення або встановлення системного часу.\n\ +TIMER Дозволяє використання десяти секундомiрiв.\n\ +TITLE Встановлення заголовка вiкна для сесiї CMD.EXE.\n\ +TYPE Вiдображення вмiсту текстового файлу.\n\ +VER Вiдображення версiї ReactOS.\n\ +VERIFY Включення або вiдключення режиму перевiрки правильностi запису\n\ + файлiв на диск.\n\ +VOL Вiдображення мiтки тому диска i серiйного номера.\n" + +END diff --git a/base/applications/cmdutils/help/lang/zh-CN.rc b/base/applications/cmdutils/help/lang/zh-CN.rc new file mode 100644 index 00000000000..2d10961be5c --- /dev/null +++ b/base/applications/cmdutils/help/lang/zh-CN.rc @@ -0,0 +1,76 @@ +/* + * Simplified Chinese translation + * By Song Fuchang (0xfc) 2011 + */ + +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED + +STRINGTABLE +BEGIN + IDS_NO_ENTRY, "This command is not supported by the help utility.\nTry ""%s /?""\n." +END + +STRINGTABLE +BEGIN + +IDS_USAGE, "Provides Help information for ReactOS commands.\n\n\ +HELP [command]\n\n\ + command - Display help information for this command.\n" + +IDS_HELP1, "列出所有可用命令 (+ 它们的描述)\n\n\ + help 命令\n\ + 命令 /? 得到特定命令的更多信息\n\n\ +? 列出所有可用命令 (没有描述)。\n\ +ALIAS 设置、删除或显示别名。\n\ +ATTRIB 显示或改变文件属性。\n\ +BEEP 使扬声器发声。\n\ +CALL 从一个批处理程序中调用另一个。\n\ +CD 显示当前目录的名称或更改当前目录。\n\ +CHCP 显示或设置活动代码页。\n\ +CHOICE 等待用户在一组选项中做出选择。\n\ +CLS 清除屏幕。\n\ +CMD 启动 ReactOS 命令行解释器的一个新实例。\n\ +COLOR 设置控制台默认的前景和背景颜色。\n\ +COPY 将一个或多个文件复制到另一个位置。\n\ +DATE 显示或设置日期。\n\ +DELETE 删除一个或多个文件。\n\ +DIR 显示一个目录中的文件列表和子目录。\n\ +ECHO 显示消息,或打开/关闭命令回显。\n\ +ERASE 删除一个或多个文件。\n\ +EXIT 退出 CMD.EXE 程序 (命令解释器)。\n\ +FOR 为一组文件中的每一个文件执行指定命令。\n\ +FREE (空闲的) 磁盘空间。\n\ +GOTO 在批处理程序中指示 ReactOS 命令解释器跳转到被标记的行继续执行。\n\ +HELP 为 ReactOS 命令提供帮助信息。\n\ +HISTORY 列出所有曾被使用的命令。\n\ +IF 在批处理程序中执行条件控制。\n\ +LABEL 创建、更改或删除磁盘卷标。\n\ +MD 创建一个目录。\n\ +MKDIR 创建一个目录。\n\ +MKLINK 创建一个文件系统链接对象。\n\ +MOVE 将一个或多个文件从一个文件夹移动到另一个文件夹。\n\ +PATH 显示或设置可执行文件的搜索路径。\n\ +PAUSE 挂起批处理文件的执行并显示一条消息。\n\ +POPD 恢复由 PUSHD 存储的前一个当前目录的值。\n\ +PROMPT 更改命令提示符。\n\ +PUSHD 保存当前目录然后更改。\n\ +RD 删除一个目录。\n\ +REM 在批处理文件中记录注释 (评论)。\n\ +REN 重命名一个或多个文件。\n\ +RENAME 重命名一个或多个文件。\n\ +REPLACE 替换文件。\n\ +RMDIR 删除一个目录。\n\ +SCREEN 移动光标并可选地输出文本。\n\ +SET 显示、设置或删除 ReactOS 环境变量。\n\ +SHIFT 在批处理文件中移动可替换参数的位置。\n" +IDS_HELP2, "START 启动一个分隔的窗口来运行指定的程序或命令。\n\ + 执行命令。\n\ +TIME 显示或设置系统时间。\n\ +TIMER 允许使用至多十个停表。\n\ +TITLE 设置一个 CMD.EXE 会话的窗口标题。\n\ +TYPE 显示一个文本文件的内容。\n\ +VER 显示 ReactOS 版本。\n\ +VERIFY 决定 ReactOS 是否检验您的文件已被正确地写入磁盘。\n\ +VOL 显示磁盘卷标和序列号。\n" + +END diff --git a/base/applications/cmdutils/help/resource.h b/base/applications/cmdutils/help/resource.h new file mode 100644 index 00000000000..48091a6afce --- /dev/null +++ b/base/applications/cmdutils/help/resource.h @@ -0,0 +1,11 @@ +#pragma once + +#define RC_STRING_MAX_SIZE 4096 + +#define IDS_USAGE 100 +#define IDS_HELP1 101 +#define IDS_HELP2 102 + +#define IDS_NO_ENTRY 110 + +/* EOF */ diff --git a/deprecated/win32csr/rsrc.rc b/base/applications/cmdutils/help/rsrc.rc similarity index 69% rename from deprecated/win32csr/rsrc.rc rename to base/applications/cmdutils/help/rsrc.rc index c89b1b00df0..915ba1c1d2c 100644 --- a/deprecated/win32csr/rsrc.rc +++ b/base/applications/cmdutils/help/rsrc.rc @@ -1,13 +1,5 @@ -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL - -1 ICON DISCARDABLE res/terminal.ico - -#ifdef LANGUAGE_BG_BG - #include "lang/bg-BG.rc" -#endif -#ifdef LANGUAGE_CS_CZ - #include "lang/cs-CZ.rc" -#endif +// UTF-8 +#pragma code_page(65001) #ifdef LANGUAGE_DE_DE #include "lang/de-DE.rc" #endif @@ -23,51 +15,39 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #ifdef LANGUAGE_FR_FR #include "lang/fr-FR.rc" #endif +#ifdef LANGUAGE_HU_HU + #include "lang/hu-HU.rc" +#endif #ifdef LANGUAGE_ID_ID #include "lang/id-ID.rc" #endif #ifdef LANGUAGE_IT_IT #include "lang/it-IT.rc" #endif -#ifdef LANGUAGE_JA_JP - #include "lang/ja-JP.rc" -#endif #ifdef LANGUAGE_NB_NO #include "lang/no-NO.rc" #endif -#ifdef LANGUAGE_SK_SK - #include "lang/sk-SK.rc" -#endif -#ifdef LANGUAGE_SV_SE - #include "lang/sv-SE.rc" -#endif -#ifdef LANGUAGE_ZH_CN - #include "lang/zh-CN.rc" -#endif -#ifdef LANGUAGE_ZH_TW - #include "lang/zh-TW.rc" -#endif - -// UTF-8 -#pragma code_page(65001) -#ifdef LANGUAGE_HE_IL - #include "lang/he-IL.rc" +#ifdef LANGUAGE_JA_JP + #include "lang/ja-JP.rc" #endif #ifdef LANGUAGE_PL_PL #include "lang/pl-PL.rc" #endif -#ifdef LANGUAGE_PT_BR - #include "lang/pt-BR.rc" -#endif #ifdef LANGUAGE_RO_RO #include "lang/ro-RO.rc" #endif #ifdef LANGUAGE_RU_RU #include "lang/ru-RU.rc" #endif +#ifdef LANGUAGE_SK_SK + #include "lang/sk-SK.rc" +#endif +#ifdef LANGUAGE_SV_SE + #include "lang/sv-SE.rc" +#endif #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" #endif -#ifdef LANGUAGE_TR_TR - #include "lang/tr-TR.rc" +#ifdef LANGUAGE_ZH_CN + #include "lang/zh-CN.rc" #endif diff --git a/base/applications/cmdutils/hostname/lang/cs-CZ.rc b/base/applications/cmdutils/hostname/lang/cs-CZ.rc index f9e673b6490..1b4a988a8f6 100644 --- a/base/applications/cmdutils/hostname/lang/cs-CZ.rc +++ b/base/applications/cmdutils/hostname/lang/cs-CZ.rc @@ -5,7 +5,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Vypíše současný název hostitele.\n\nhostname" IDS_NOSET, "hostname -s není podporováno." diff --git a/base/applications/cmdutils/hostname/lang/de-DE.rc b/base/applications/cmdutils/hostname/lang/de-DE.rc index db787b54d64..14f51d5cc9e 100644 --- a/base/applications/cmdutils/hostname/lang/de-DE.rc +++ b/base/applications/cmdutils/hostname/lang/de-DE.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Zeigt den Computernamen an.\n\nhostname" IDS_NOSET, "Der Befehl hostname -s wird nicht untersttzt." diff --git a/base/applications/cmdutils/hostname/lang/en-US.rc b/base/applications/cmdutils/hostname/lang/en-US.rc index 84bc606fa21..1aa3369e49b 100644 --- a/base/applications/cmdutils/hostname/lang/en-US.rc +++ b/base/applications/cmdutils/hostname/lang/en-US.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Print the current host's name.\n\nhostname" IDS_NOSET, "hostname -s is not supported." diff --git a/base/applications/cmdutils/hostname/lang/fr-FR.rc b/base/applications/cmdutils/hostname/lang/fr-FR.rc index 751ae691633..399c2fb88f0 100644 --- a/base/applications/cmdutils/hostname/lang/fr-FR.rc +++ b/base/applications/cmdutils/hostname/lang/fr-FR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Affiche le nom de l'hôte actuel.\n\nhostname" IDS_NOSET, "hostname -s n'est pas pris en charge." diff --git a/base/applications/cmdutils/hostname/lang/it-IT.rc b/base/applications/cmdutils/hostname/lang/it-IT.rc index 8614c99768c..df5a9c74d34 100644 --- a/base/applications/cmdutils/hostname/lang/it-IT.rc +++ b/base/applications/cmdutils/hostname/lang/it-IT.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Stampa il nome dell'host attuale.\n\nhostname" IDS_NOSET, "hostname -s non è supportato." diff --git a/base/applications/cmdutils/hostname/lang/pl-PL.rc b/base/applications/cmdutils/hostname/lang/pl-PL.rc index 237bbc92ece..d0a7dc8baf7 100644 --- a/base/applications/cmdutils/hostname/lang/pl-PL.rc +++ b/base/applications/cmdutils/hostname/lang/pl-PL.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Wywietla obecn nazw komputera.\n\nhostname" IDS_NOSET, "Opcja hostname -s nie jest wspierana." diff --git a/base/applications/cmdutils/more/lang/bg-BG.rc b/base/applications/cmdutils/more/lang/bg-BG.rc index 7d343daddae..ea15192e54c 100644 --- a/base/applications/cmdutils/more/lang/bg-BG.rc +++ b/base/applications/cmdutils/more/lang/bg-BG.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Показва данните на екрана, разделени на страници.\n\n\ MORE < [Устройство:][Път]Файлово име\n\ diff --git a/base/applications/cmdutils/more/lang/ca-ES.rc b/base/applications/cmdutils/more/lang/ca-ES.rc index bc4a083c811..26bde5f635e 100644 --- a/base/applications/cmdutils/more/lang/ca-ES.rc +++ b/base/applications/cmdutils/more/lang/ca-ES.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_CATALAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Mostra en pantalla el contingut pàgina per pàgina.\n\n\ MORE < [Unitat:][Ruta]Nom del fitxer\n\ diff --git a/base/applications/cmdutils/more/lang/cs-CZ.rc b/base/applications/cmdutils/more/lang/cs-CZ.rc index 6aea0736141..9121b163880 100644 --- a/base/applications/cmdutils/more/lang/cs-CZ.rc +++ b/base/applications/cmdutils/more/lang/cs-CZ.rc @@ -6,7 +6,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Zobrazí výstup po jednotlivých stránkách na obrazovku.\n\n\ MORE < [Jednotka:][Cesta]Název souboru\n\ diff --git a/base/applications/cmdutils/more/lang/de-DE.rc b/base/applications/cmdutils/more/lang/de-DE.rc index 1f6980ace8b..d07a483097c 100644 --- a/base/applications/cmdutils/more/lang/de-DE.rc +++ b/base/applications/cmdutils/more/lang/de-DE.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Zeigt Daten seitenweise auf dem Bildschirm an.\n\n\ MORE < [Laufwerk:][Pfad]Dateiname\n\ diff --git a/base/applications/cmdutils/more/lang/el-GR.rc b/base/applications/cmdutils/more/lang/el-GR.rc index 2fe60e6f7ff..97696c5cab2 100644 --- a/base/applications/cmdutils/more/lang/el-GR.rc +++ b/base/applications/cmdutils/more/lang/el-GR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Εμφανίζει τα δεδομένα σελίδα-παρά-σελίδα στην οθόνη.\n\n\ MORE < [Δίσκος:][Μονοπάτι]Όνομα αρχείου\n\ diff --git a/base/applications/cmdutils/more/lang/en-US.rc b/base/applications/cmdutils/more/lang/en-US.rc index e43979584bf..8afaa2653ba 100644 --- a/base/applications/cmdutils/more/lang/en-US.rc +++ b/base/applications/cmdutils/more/lang/en-US.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Displays data page-by-page on the screen.\n\n\ MORE < [Drive:][Path]File name\n\ diff --git a/base/applications/cmdutils/more/lang/es-ES.rc b/base/applications/cmdutils/more/lang/es-ES.rc index b0169ae2559..8cdd96dcb30 100644 --- a/base/applications/cmdutils/more/lang/es-ES.rc +++ b/base/applications/cmdutils/more/lang/es-ES.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Muestra datos página por página en la pantalla.\n\n\ MORE < [Unidad:][Ruta]Nombre del archivo\n\ diff --git a/base/applications/cmdutils/more/lang/fr-FR.rc b/base/applications/cmdutils/more/lang/fr-FR.rc index 9e4b958ab06..5b4ff6c5bc1 100644 --- a/base/applications/cmdutils/more/lang/fr-FR.rc +++ b/base/applications/cmdutils/more/lang/fr-FR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Affiche les données page par page à l'écran.\n\n\ MORE < [Lecteur:][Chemin]Nom du fichier\n\ diff --git a/base/applications/cmdutils/more/lang/it-IT.rc b/base/applications/cmdutils/more/lang/it-IT.rc index 9583a2b7a02..9f0933e469b 100644 --- a/base/applications/cmdutils/more/lang/it-IT.rc +++ b/base/applications/cmdutils/more/lang/it-IT.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Visualizza dati una schermata per volta.\n\n\ MORE < [Drive:][Path]File\n\ diff --git a/base/applications/cmdutils/more/lang/lt-LT.rc b/base/applications/cmdutils/more/lang/lt-LT.rc index e70e15e6cf8..e33e8f79e3e 100644 --- a/base/applications/cmdutils/more/lang/lt-LT.rc +++ b/base/applications/cmdutils/more/lang/lt-LT.rc @@ -9,7 +9,7 @@ LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Atvaizduoja duomenis puslapiais.\n\n\ MORE < [Diskas:][Kelias iki bylos]Bylos vardas\n\ diff --git a/base/applications/cmdutils/more/lang/no-NO.rc b/base/applications/cmdutils/more/lang/no-NO.rc index a2f0598e629..e4702a4a4a7 100644 --- a/base/applications/cmdutils/more/lang/no-NO.rc +++ b/base/applications/cmdutils/more/lang/no-NO.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Vis data side-etter-side på skjermen.\n\n\ MORE < [Stasjon:][Mappe]Filnavn\n\ diff --git a/base/applications/cmdutils/more/lang/pl-PL.rc b/base/applications/cmdutils/more/lang/pl-PL.rc index 3f2dcd2df16..8ce1933ffd6 100644 --- a/base/applications/cmdutils/more/lang/pl-PL.rc +++ b/base/applications/cmdutils/more/lang/pl-PL.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Wyświetla dane, podzielone na odcinki o długości ekranu.\n\n\ MORE < [Napęd:][Ścieżka]Nazwa pliku\n\ diff --git a/base/applications/cmdutils/more/lang/ro-RO.rc b/base/applications/cmdutils/more/lang/ro-RO.rc index 7b64f7066f1..13c6d466b88 100644 --- a/base/applications/cmdutils/more/lang/ro-RO.rc +++ b/base/applications/cmdutils/more/lang/ro-RO.rc @@ -7,7 +7,7 @@ */ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Afișează date pe ecran, pagină-cu-pagină.\n\n\ MORE < [Unitate:][Cale]Nume fișier\n\ diff --git a/base/applications/cmdutils/more/lang/ru-RU.rc b/base/applications/cmdutils/more/lang/ru-RU.rc index 20c39c1fbe5..d3a34515ae3 100644 --- a/base/applications/cmdutils/more/lang/ru-RU.rc +++ b/base/applications/cmdutils/more/lang/ru-RU.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Показывать данные постранично заполняя экран.\n\n\ MORE < [Том:][Путь]Имя файла\n\ diff --git a/base/applications/cmdutils/more/lang/sk-SK.rc b/base/applications/cmdutils/more/lang/sk-SK.rc index 2d6d2841375..0d7dc9f4828 100644 --- a/base/applications/cmdutils/more/lang/sk-SK.rc +++ b/base/applications/cmdutils/more/lang/sk-SK.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Zobrazuje údaje, stránku za stránkou, na obrazovke.\n\n\ MORE < [Jednotka:][Cesta]Názov súboru\n\ diff --git a/base/applications/cmdutils/more/lang/sv-SE.rc b/base/applications/cmdutils/more/lang/sv-SE.rc index 7531e207ea8..83adf0a7215 100644 --- a/base/applications/cmdutils/more/lang/sv-SE.rc +++ b/base/applications/cmdutils/more/lang/sv-SE.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Visa data sida-efter-sida på skärmen.\n\n\ MORE < [Enhet:][Mapp]Filnamn\n\ diff --git a/base/applications/cmdutils/more/lang/uk-UA.rc b/base/applications/cmdutils/more/lang/uk-UA.rc index 805c5892225..6158ad49c8d 100644 --- a/base/applications/cmdutils/more/lang/uk-UA.rc +++ b/base/applications/cmdutils/more/lang/uk-UA.rc @@ -7,7 +7,7 @@ */ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Виводить iнфрмацію поекранно. Використання:\n\n\ MORE < [Диск:][Шлях]Iм'я_файлу\n\ diff --git a/base/applications/cmdutils/more/lang/zh-CN.rc b/base/applications/cmdutils/more/lang/zh-CN.rc index c9aab8d256b..e8d9062dfcf 100644 --- a/base/applications/cmdutils/more/lang/zh-CN.rc +++ b/base/applications/cmdutils/more/lang/zh-CN.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "在屏幕上一页一页地显示内容。\n\n\ MORE < [驱动器:][路径]文件名\n\ diff --git a/base/applications/cmdutils/xcopy/Da.rc b/base/applications/cmdutils/xcopy/lang/Da.rc similarity index 100% rename from base/applications/cmdutils/xcopy/Da.rc rename to base/applications/cmdutils/xcopy/lang/Da.rc diff --git a/base/applications/cmdutils/xcopy/De.rc b/base/applications/cmdutils/xcopy/lang/De.rc similarity index 100% rename from base/applications/cmdutils/xcopy/De.rc rename to base/applications/cmdutils/xcopy/lang/De.rc diff --git a/base/applications/cmdutils/xcopy/En.rc b/base/applications/cmdutils/xcopy/lang/En.rc similarity index 100% rename from base/applications/cmdutils/xcopy/En.rc rename to base/applications/cmdutils/xcopy/lang/En.rc diff --git a/base/applications/cmdutils/xcopy/Es.rc b/base/applications/cmdutils/xcopy/lang/Es.rc similarity index 100% rename from base/applications/cmdutils/xcopy/Es.rc rename to base/applications/cmdutils/xcopy/lang/Es.rc diff --git a/base/applications/cmdutils/xcopy/Fr.rc b/base/applications/cmdutils/xcopy/lang/Fr.rc similarity index 100% rename from base/applications/cmdutils/xcopy/Fr.rc rename to base/applications/cmdutils/xcopy/lang/Fr.rc diff --git a/base/applications/cmdutils/xcopy/It.rc b/base/applications/cmdutils/xcopy/lang/It.rc similarity index 100% rename from base/applications/cmdutils/xcopy/It.rc rename to base/applications/cmdutils/xcopy/lang/It.rc diff --git a/base/applications/cmdutils/xcopy/Ja.rc b/base/applications/cmdutils/xcopy/lang/Ja.rc similarity index 100% rename from base/applications/cmdutils/xcopy/Ja.rc rename to base/applications/cmdutils/xcopy/lang/Ja.rc diff --git a/base/applications/cmdutils/xcopy/Ko.rc b/base/applications/cmdutils/xcopy/lang/Ko.rc similarity index 100% rename from base/applications/cmdutils/xcopy/Ko.rc rename to base/applications/cmdutils/xcopy/lang/Ko.rc diff --git a/base/applications/cmdutils/xcopy/Lt.rc b/base/applications/cmdutils/xcopy/lang/Lt.rc similarity index 100% rename from base/applications/cmdutils/xcopy/Lt.rc rename to base/applications/cmdutils/xcopy/lang/Lt.rc diff --git a/base/applications/cmdutils/xcopy/Nl.rc b/base/applications/cmdutils/xcopy/lang/Nl.rc similarity index 100% rename from base/applications/cmdutils/xcopy/Nl.rc rename to base/applications/cmdutils/xcopy/lang/Nl.rc diff --git a/base/applications/cmdutils/xcopy/No.rc b/base/applications/cmdutils/xcopy/lang/No.rc similarity index 100% rename from base/applications/cmdutils/xcopy/No.rc rename to base/applications/cmdutils/xcopy/lang/No.rc diff --git a/base/applications/cmdutils/xcopy/Pl.rc b/base/applications/cmdutils/xcopy/lang/Pl.rc similarity index 100% rename from base/applications/cmdutils/xcopy/Pl.rc rename to base/applications/cmdutils/xcopy/lang/Pl.rc diff --git a/base/applications/cmdutils/xcopy/Pt.rc b/base/applications/cmdutils/xcopy/lang/Pt.rc similarity index 100% rename from base/applications/cmdutils/xcopy/Pt.rc rename to base/applications/cmdutils/xcopy/lang/Pt.rc diff --git a/base/applications/cmdutils/xcopy/Ro.rc b/base/applications/cmdutils/xcopy/lang/Ro.rc similarity index 100% rename from base/applications/cmdutils/xcopy/Ro.rc rename to base/applications/cmdutils/xcopy/lang/Ro.rc diff --git a/base/applications/cmdutils/xcopy/Ru.rc b/base/applications/cmdutils/xcopy/lang/Ru.rc similarity index 100% rename from base/applications/cmdutils/xcopy/Ru.rc rename to base/applications/cmdutils/xcopy/lang/Ru.rc diff --git a/base/applications/cmdutils/xcopy/Si.rc b/base/applications/cmdutils/xcopy/lang/Si.rc similarity index 100% rename from base/applications/cmdutils/xcopy/Si.rc rename to base/applications/cmdutils/xcopy/lang/Si.rc diff --git a/base/applications/cmdutils/xcopy/Sr.rc b/base/applications/cmdutils/xcopy/lang/Sr.rc similarity index 100% rename from base/applications/cmdutils/xcopy/Sr.rc rename to base/applications/cmdutils/xcopy/lang/Sr.rc diff --git a/base/applications/cmdutils/xcopy/Sv.rc b/base/applications/cmdutils/xcopy/lang/Sv.rc similarity index 100% rename from base/applications/cmdutils/xcopy/Sv.rc rename to base/applications/cmdutils/xcopy/lang/Sv.rc diff --git a/base/applications/cmdutils/xcopy/Uk.rc b/base/applications/cmdutils/xcopy/lang/Uk.rc similarity index 100% rename from base/applications/cmdutils/xcopy/Uk.rc rename to base/applications/cmdutils/xcopy/lang/Uk.rc diff --git a/base/applications/cmdutils/xcopy/rsrc.rc b/base/applications/cmdutils/xcopy/rsrc.rc index 7f8fc522bba..c393d7a6bf8 100644 --- a/base/applications/cmdutils/xcopy/rsrc.rc +++ b/base/applications/cmdutils/xcopy/rsrc.rc @@ -27,61 +27,61 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include #ifdef LANGUAGE_DA_DK - #include "Da.rc" + #include "lang/Da.rc" #endif #ifdef LANGUAGE_EN_US - #include "En.rc" + #include "lang/En.rc" #endif #ifdef LANGUAGE_NO_NO - #include "No.rc" + #include "lang/No.rc" #endif #ifdef LANGUAGE_PL_PL - #include "Pl.rc" + #include "lang/Pl.rc" #endif #ifdef LANGUAGE_ES_ES - #include "Es.rc" + #include "lang/Es.rc" #endif /* UTF-8 */ #ifdef LANGUAGE_DE_DE - #include "De.rc" + #include "lang/De.rc" #endif #ifdef LANGUAGE_FR_FR - #include "Fr.rc" + #include "lang/Fr.rc" #endif #ifdef LANGUAGE_IT_IT - #include "It.rc" + #include "lang/It.rc" #endif #ifdef LANGUAGE_JA_JP - #include "Ja.rc" + #include "lang/Ja.rc" #endif #ifdef LANGUAGE_KO_KR - #include "Ko.rc" + #include "lang/Ko.rc" #endif #ifdef LANGUAGE_LT_LT - #include "Lt.rc" + #include "lang/Lt.rc" #endif #ifdef LANGUAGE_NL_NL - #include "Nl.rc" + #include "lang/Nl.rc" #endif #ifdef LANGUAGE_PT_PT - #include "Pt.rc" + #include "lang/Pt.rc" #endif #ifdef LANGUAGE_RO_RO - #include "Ro.rc" + #include "lang/Ro.rc" #endif #ifdef LANGUAGE_RU_RU - #include "Ru.rc" + #include "lang/Ru.rc" #endif #ifdef LANGUAGE_SL_SI - #include "Si.rc" + #include "lang/Si.rc" #endif #ifdef LANGUAGE_SR_SP - #include "Sr.rc" + #include "lang/Sr.rc" #endif #ifdef LANGUAGE_SV_SE - #include "Sv.rc" + #include "lang/Sv.rc" #endif #ifdef LANGUAGE_UK_UA - #include "Uk.rc" + #include "lang/Uk.rc" #endif diff --git a/base/applications/control/control.rc b/base/applications/control/control.rc index a3c39d5bd97..e8a401ffc2a 100644 --- a/base/applications/control/control.rc +++ b/base/applications/control/control.rc @@ -5,4 +5,4 @@ #define REACTOS_STR_ORIGINAL_FILENAME "control.exe\0" #include -IDI_MAINICON ICON DISCARDABLE "resources/config.ico" +IDI_MAINICON ICON "resources/config.ico" diff --git a/base/applications/dxdiag/display.c b/base/applications/dxdiag/display.c index ac1221d50b6..8c1bcecc85e 100644 --- a/base/applications/dxdiag/display.c +++ b/base/applications/dxdiag/display.c @@ -339,7 +339,7 @@ void InitializeDisplayAdapters(PDXDIAG_CONTEXT pContext) break; pContext->hDisplayWnd = hDlgs; - hwndDlg = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_DISPLAY_DIALOG), pContext->hMainDialog, DisplayPageWndProc, (LPARAM)pContext); + hwndDlg = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_DISPLAY_DIALOG), pContext->hMainDialog, DisplayPageWndProc, (LPARAM)pContext); EnableDialogTheme(hwndDlg); if (!hwndDlg) break; diff --git a/base/applications/dxdiag/dxdiag.c b/base/applications/dxdiag/dxdiag.c index 2b46f9bef92..6b2784ac684 100644 --- a/base/applications/dxdiag/dxdiag.c +++ b/base/applications/dxdiag/dxdiag.c @@ -13,6 +13,61 @@ HINSTANCE hInst = 0; HWND hTabCtrlWnd; +//////////////////////////////////////////////////////////////////////////////// +// Taken from WinSpy++ 1.7 +// http://www.catch22.net/software/winspy +// Copyright (c) 2002 by J Brown +// + +// +// Copied from uxtheme.h +// If you have this new header, then delete these and +// #include instead! +// +#define ETDT_DISABLE 0x00000001 +#define ETDT_ENABLE 0x00000002 +#define ETDT_USETABTEXTURE 0x00000004 +#define ETDT_ENABLETAB (ETDT_ENABLE | ETDT_USETABTEXTURE) + +// +typedef HRESULT (WINAPI * ETDTProc) (HWND, DWORD); + +// +// Try to call EnableThemeDialogTexture, if uxtheme.dll is present +// +BOOL EnableDialogTheme(HWND hwnd) +{ + HMODULE hUXTheme; + ETDTProc fnEnableThemeDialogTexture; + + hUXTheme = LoadLibraryA("uxtheme.dll"); + + if(hUXTheme) + { + fnEnableThemeDialogTexture = + (ETDTProc)GetProcAddress(hUXTheme, "EnableThemeDialogTexture"); + + if(fnEnableThemeDialogTexture) + { + fnEnableThemeDialogTexture(hwnd, ETDT_ENABLETAB); + + FreeLibrary(hUXTheme); + return TRUE; + } + else + { + // Failed to locate API! + FreeLibrary(hUXTheme); + return FALSE; + } + } + else + { + // Not running under XP? Just fail gracefully + return FALSE; + } +} + //--------------------------------------------------------------- VOID DestroyTabCtrlDialogs(PDXDIAG_CONTEXT pContext) @@ -119,11 +174,11 @@ InitializeTabCtrl(HWND hwndDlg, PDXDIAG_CONTEXT pContext) pContext->hTabCtrl = hTabCtrlWnd; /* create the dialogs */ - pContext->hDialogs[0] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_SYSTEM_DIALOG), pContext->hMainDialog, SystemPageWndProc, (LPARAM)pContext); - pContext->hDialogs[1] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_MUSIC_DIALOG), pContext->hMainDialog, MusicPageWndProc, (LPARAM)pContext); - pContext->hDialogs[2] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_INPUT_DIALOG), pContext->hMainDialog, InputPageWndProc, (LPARAM)pContext); - pContext->hDialogs[3] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_NETWORK_DIALOG), pContext->hMainDialog, NetworkPageWndProc, (LPARAM)pContext); - pContext->hDialogs[4] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_HELP_DIALOG), pContext->hMainDialog, HelpPageWndProc, (LPARAM)pContext); + pContext->hDialogs[0] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_SYSTEM_DIALOG), pContext->hMainDialog, SystemPageWndProc, (LPARAM)pContext); EnableDialogTheme(pContext->hDialogs[0]); + pContext->hDialogs[1] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_MUSIC_DIALOG), pContext->hMainDialog, MusicPageWndProc, (LPARAM)pContext); EnableDialogTheme(pContext->hDialogs[1]); + pContext->hDialogs[2] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_INPUT_DIALOG), pContext->hMainDialog, InputPageWndProc, (LPARAM)pContext); EnableDialogTheme(pContext->hDialogs[2]); + pContext->hDialogs[3] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_NETWORK_DIALOG), pContext->hMainDialog, NetworkPageWndProc, (LPARAM)pContext); EnableDialogTheme(pContext->hDialogs[3]); + pContext->hDialogs[4] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_HELP_DIALOG), pContext->hMainDialog, HelpPageWndProc, (LPARAM)pContext); EnableDialogTheme(pContext->hDialogs[4]); /* insert tab ctrl items */ InsertTabCtrlItem(hTabCtrlWnd, 0, MAKEINTRESOURCEW(IDS_SYSTEM_DIALOG)); diff --git a/base/applications/dxdiag/dxdiag.rc b/base/applications/dxdiag/dxdiag.rc index ffb50053672..4ce8f27fa05 100644 --- a/base/applications/dxdiag/dxdiag.rc +++ b/base/applications/dxdiag/dxdiag.rc @@ -14,4 +14,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDI_APPICON ICON "res/dxdiag.ico" +#include + #include "rsrc.rc" diff --git a/base/applications/dxdiag/lang/bg-BG.rc b/base/applications/dxdiag/lang/bg-BG.rc index 4007036951a..84f1185e15c 100644 --- a/base/applications/dxdiag/lang/bg-BG.rc +++ b/base/applications/dxdiag/lang/bg-BG.rc @@ -1,9 +1,8 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Приложение за преглеждане на РеактХ" FONT 8, "MS Shell Dlg" BEGIN @@ -14,7 +13,7 @@ BEGIN PUSHBUTTON "Из&ход", IDC_BUTTON_EXIT, 425, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -45,7 +44,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -99,7 +98,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -137,14 +136,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -156,7 +155,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -164,13 +163,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "Преглеждащо сечиво на РеактХ" IDS_SYSTEM_DIALOG "Уредба" diff --git a/base/applications/dxdiag/lang/cs-CZ.rc b/base/applications/dxdiag/lang/cs-CZ.rc index f7d9ca5fcb7..4626a117c89 100644 --- a/base/applications/dxdiag/lang/cs-CZ.rc +++ b/base/applications/dxdiag/lang/cs-CZ.rc @@ -5,10 +5,9 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "ReactX-diagnostický program" FONT 8, "MS Shell Dlg" BEGIN @@ -19,7 +18,7 @@ BEGIN PUSHBUTTON "U&končit", IDC_BUTTON_EXIT, 425, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -50,7 +49,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -104,7 +103,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -142,14 +141,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -161,7 +160,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -169,13 +168,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "ReactX diagnostický nástroj" IDS_SYSTEM_DIALOG "Systém" diff --git a/base/applications/dxdiag/lang/de-DE.rc b/base/applications/dxdiag/lang/de-DE.rc index a02c9744dab..5a5445ba022 100644 --- a/base/applications/dxdiag/lang/de-DE.rc +++ b/base/applications/dxdiag/lang/de-DE.rc @@ -1,9 +1,8 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "ReactX-Diagnoseprogramm" FONT 8, "MS Shell Dlg" BEGIN @@ -14,7 +13,7 @@ BEGIN PUSHBUTTON "&Beenden", IDC_BUTTON_EXIT, 426, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -45,7 +44,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -99,7 +98,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -137,14 +136,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 362, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 362, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -156,7 +155,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -164,13 +163,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "ReactX-Diagnoseprogramm" IDS_SYSTEM_DIALOG "System" diff --git a/base/applications/dxdiag/lang/en-US.rc b/base/applications/dxdiag/lang/en-US.rc index b03b265d011..be12352a4d3 100644 --- a/base/applications/dxdiag/lang/en-US.rc +++ b/base/applications/dxdiag/lang/en-US.rc @@ -1,9 +1,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "ReactX-Diagnostic program" FONT 8, "MS Shell Dlg" BEGIN @@ -14,7 +13,7 @@ BEGIN PUSHBUTTON "&Exit", IDC_BUTTON_EXIT, 425, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -45,7 +44,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -99,7 +98,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -137,14 +136,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -156,7 +155,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -164,13 +163,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "ReactX Diagnostic Tool" IDS_SYSTEM_DIALOG "System" diff --git a/base/applications/dxdiag/lang/es-ES.rc b/base/applications/dxdiag/lang/es-ES.rc index 96af988f167..b112c74463d 100644 --- a/base/applications/dxdiag/lang/es-ES.rc +++ b/base/applications/dxdiag/lang/es-ES.rc @@ -5,10 +5,9 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Programa de diagnóstico de ReactX" FONT 8, "MS Shell Dlg" BEGIN @@ -19,7 +18,7 @@ BEGIN PUSHBUTTON "Sa&lir", IDC_BUTTON_EXIT, 323, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -50,7 +49,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -104,7 +103,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -142,14 +141,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -161,7 +160,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -169,13 +168,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "Herramienta de diagnóstico de ReactX" IDS_SYSTEM_DIALOG "Sistema" diff --git a/base/applications/dxdiag/lang/fr-FR.rc b/base/applications/dxdiag/lang/fr-FR.rc index 6f96042cf22..7e5a50387fc 100644 --- a/base/applications/dxdiag/lang/fr-FR.rc +++ b/base/applications/dxdiag/lang/fr-FR.rc @@ -1,9 +1,8 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "ReactX - Programme de diagnostic" FONT 8, "MS Shell Dlg" BEGIN @@ -14,7 +13,7 @@ BEGIN PUSHBUTTON "Quitt&er", IDC_BUTTON_EXIT, 426, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -45,7 +44,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -99,7 +98,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -137,14 +136,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -156,7 +155,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -164,13 +163,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "Outil de diagnostic ReactX" IDS_SYSTEM_DIALOG "Système" diff --git a/base/applications/dxdiag/lang/he-IL.rc b/base/applications/dxdiag/lang/he-IL.rc index 27d7088a718..46786e6f1a8 100644 --- a/base/applications/dxdiag/lang/he-IL.rc +++ b/base/applications/dxdiag/lang/he-IL.rc @@ -1,10 +1,9 @@ // Translated by Baruch Rutman LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "כלי אבחון - ReactX" FONT 8, "MS Shell Dlg" BEGIN @@ -15,7 +14,7 @@ BEGIN PUSHBUTTON "&יציאה", IDC_BUTTON_EXIT, 425, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -46,7 +45,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -100,7 +99,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -138,14 +137,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -157,7 +156,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -165,13 +164,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "כלי אבחון ReactX" IDS_SYSTEM_DIALOG "מערכת" diff --git a/base/applications/dxdiag/lang/it-IT.rc b/base/applications/dxdiag/lang/it-IT.rc index 4c7a254fb01..8e7307b1dba 100644 --- a/base/applications/dxdiag/lang/it-IT.rc +++ b/base/applications/dxdiag/lang/it-IT.rc @@ -1,9 +1,8 @@ LANGUAGE LANG_ITALIAN, SUBLANG_DEFAULT -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Programma di diagnostica ReactX" FONT 8, "MS Shell Dlg" BEGIN @@ -14,7 +13,7 @@ BEGIN PUSHBUTTON "&uSCITA", IDC_BUTTON_EXIT, 425, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -45,7 +44,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -99,7 +98,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -137,14 +136,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -156,7 +155,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -164,13 +163,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "Tool di diagnostica ReactX" IDS_SYSTEM_DIALOG "Sistema" diff --git a/base/applications/dxdiag/lang/ja-JP.rc b/base/applications/dxdiag/lang/ja-JP.rc index c9ffe4cde9e..94607622a6d 100644 --- a/base/applications/dxdiag/lang/ja-JP.rc +++ b/base/applications/dxdiag/lang/ja-JP.rc @@ -1,9 +1,8 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "ReactX 診断 プログラム" FONT 9, "MS UI Gothic" BEGIN @@ -14,7 +13,7 @@ BEGIN PUSHBUTTON "終了(&E)", IDC_BUTTON_EXIT, 425, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 9, "MS UI Gothic" BEGIN @@ -45,7 +44,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 9, "MS UI Gothic" BEGIN @@ -99,7 +98,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 9, "MS UI Gothic" BEGIN @@ -137,14 +136,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 9, "MS UI Gothic" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 9, "MS UI Gothic" BEGIN @@ -156,7 +155,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 9, "MS UI Gothic" BEGIN @@ -164,13 +163,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 9, "MS UI Gothic" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "ReactX 診断ツール" IDS_SYSTEM_DIALOG "システム" diff --git a/base/applications/dxdiag/lang/ko-KR.rc b/base/applications/dxdiag/lang/ko-KR.rc index 1136b101a6f..47db4b8d1b7 100644 --- a/base/applications/dxdiag/lang/ko-KR.rc +++ b/base/applications/dxdiag/lang/ko-KR.rc @@ -5,10 +5,9 @@ LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "ReactX 분석 도구" FONT 8, "MS Shell Dlg" BEGIN @@ -19,7 +18,7 @@ BEGIN PUSHBUTTON "종료(&E)", IDC_BUTTON_EXIT, 425, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -50,7 +49,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -104,7 +103,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -142,14 +141,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -161,7 +160,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -169,13 +168,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "ReactX 진단 도구" IDS_SYSTEM_DIALOG "시스템" diff --git a/base/applications/dxdiag/lang/nl-NL.rc b/base/applications/dxdiag/lang/nl-NL.rc index f5661486755..bba3a93723b 100644 --- a/base/applications/dxdiag/lang/nl-NL.rc +++ b/base/applications/dxdiag/lang/nl-NL.rc @@ -1,9 +1,8 @@ LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Diagnostisch hulpprogramma voor ReactX" FONT 8, "MS Shell Dlg" BEGIN @@ -14,7 +13,7 @@ BEGIN PUSHBUTTON "&Afsluiten", IDC_BUTTON_EXIT, 425, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -45,7 +44,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -99,7 +98,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -137,14 +136,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -156,7 +155,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -164,13 +163,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "Diagnostisch hulpprogramma voor ReactX" IDS_SYSTEM_DIALOG "Systeem" diff --git a/base/applications/dxdiag/lang/no-NO.rc b/base/applications/dxdiag/lang/no-NO.rc index a86ff66152c..4512971ae55 100644 --- a/base/applications/dxdiag/lang/no-NO.rc +++ b/base/applications/dxdiag/lang/no-NO.rc @@ -1,9 +1,8 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "ReactX-diagnose program" FONT 8, "MS Shell Dlg" BEGIN @@ -14,7 +13,7 @@ BEGIN PUSHBUTTON "&Avslutt", IDC_BUTTON_EXIT, 425, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -45,7 +44,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -99,7 +98,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -137,14 +136,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -156,7 +155,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -164,13 +163,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "ReactX diagnoseverktøy" IDS_SYSTEM_DIALOG "System" diff --git a/base/applications/dxdiag/lang/pl-PL.rc b/base/applications/dxdiag/lang/pl-PL.rc index f5b5d9a6760..54b17e0c9dc 100644 --- a/base/applications/dxdiag/lang/pl-PL.rc +++ b/base/applications/dxdiag/lang/pl-PL.rc @@ -9,10 +9,9 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Narzędzie diagnostyki ReactX" FONT 8, "MS Shell Dlg" BEGIN @@ -23,7 +22,7 @@ BEGIN PUSHBUTTON "&Wyjście", IDC_BUTTON_EXIT, 425, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 190 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -54,7 +53,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -108,7 +107,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -146,14 +145,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -165,7 +164,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -173,13 +172,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "Narzędzie diagnostyki ReactX" IDS_SYSTEM_DIALOG "System" diff --git a/base/applications/dxdiag/lang/pt-BR.rc b/base/applications/dxdiag/lang/pt-BR.rc index e617a889637..567037a5b09 100644 --- a/base/applications/dxdiag/lang/pt-BR.rc +++ b/base/applications/dxdiag/lang/pt-BR.rc @@ -2,10 +2,9 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Programa de Diagnóstico ReactX" FONT 8, "MS Shell Dlg" BEGIN @@ -16,7 +15,7 @@ BEGIN PUSHBUTTON "Sai&r", IDC_BUTTON_EXIT, 425, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -47,7 +46,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -101,7 +100,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -139,14 +138,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -158,7 +157,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -166,13 +165,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "Ferramenta de Diagnóstico ReactX" IDS_SYSTEM_DIALOG "Sistema" diff --git a/base/applications/dxdiag/lang/ro-RO.rc b/base/applications/dxdiag/lang/ro-RO.rc index afc2e091ff4..7f3186ac57e 100644 --- a/base/applications/dxdiag/lang/ro-RO.rc +++ b/base/applications/dxdiag/lang/ro-RO.rc @@ -7,10 +7,9 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Diagnostic ReactX" FONT 8, "MS Shell Dlg" BEGIN @@ -21,7 +20,7 @@ BEGIN PUSHBUTTON "Î&nchide", IDC_BUTTON_EXIT, 425, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -52,7 +51,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 225, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -106,7 +105,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -144,14 +143,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -163,7 +162,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -171,13 +170,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "Diagnostic ReactX" IDS_SYSTEM_DIALOG "Sistem" diff --git a/base/applications/dxdiag/lang/ru-RU.rc b/base/applications/dxdiag/lang/ru-RU.rc index 6fceecbf3ea..5881647ebb0 100644 --- a/base/applications/dxdiag/lang/ru-RU.rc +++ b/base/applications/dxdiag/lang/ru-RU.rc @@ -1,9 +1,8 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Средство диагностики ReactX" FONT 8, "MS Shell Dlg" BEGIN @@ -14,7 +13,7 @@ BEGIN PUSHBUTTON "&Выход", IDC_BUTTON_EXIT, 425, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 190 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -45,7 +44,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -99,7 +98,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -137,14 +136,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 190, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -156,7 +155,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 180, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -164,13 +163,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "Средство диагностики ReactX" IDS_SYSTEM_DIALOG "Система" diff --git a/base/applications/dxdiag/lang/sk-SK.rc b/base/applications/dxdiag/lang/sk-SK.rc index 64cc945a588..75c8902b4fc 100644 --- a/base/applications/dxdiag/lang/sk-SK.rc +++ b/base/applications/dxdiag/lang/sk-SK.rc @@ -5,10 +5,9 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "ReactX - diagnostický program" FONT 8, "MS Shell Dlg" BEGIN @@ -19,7 +18,7 @@ BEGIN PUSHBUTTON "&Skončiť", IDC_BUTTON_EXIT, 425, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -50,7 +49,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -104,7 +103,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -142,14 +141,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -161,7 +160,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -169,13 +168,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 20, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "Diagnostický nástroj ReactX" IDS_SYSTEM_DIALOG "Systém" diff --git a/base/applications/dxdiag/lang/sv-SE.rc b/base/applications/dxdiag/lang/sv-SE.rc index d06f083d81c..0930793e6cf 100644 --- a/base/applications/dxdiag/lang/sv-SE.rc +++ b/base/applications/dxdiag/lang/sv-SE.rc @@ -7,10 +7,9 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "ReactX-diagnos program" FONT 8, "MS Shell Dlg" BEGIN @@ -21,7 +20,7 @@ BEGIN PUSHBUTTON "&Avsluta", IDC_BUTTON_EXIT, 425, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -52,7 +51,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -106,7 +105,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -144,14 +143,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -163,7 +162,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -171,13 +170,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "ReactX diagnostikverktyg" IDS_SYSTEM_DIALOG "System" diff --git a/base/applications/dxdiag/lang/tr-TR.rc b/base/applications/dxdiag/lang/tr-TR.rc index 548a2a402e1..be5951f592f 100644 --- a/base/applications/dxdiag/lang/tr-TR.rc +++ b/base/applications/dxdiag/lang/tr-TR.rc @@ -5,10 +5,9 @@ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "ReactX Tanı Aracı" FONT 8, "MS Shell Dlg" BEGIN @@ -19,7 +18,7 @@ BEGIN PUSHBUTTON "&Çıkış", IDC_BUTTON_EXIT, 425, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -50,7 +49,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -104,7 +103,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -142,14 +141,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -161,7 +160,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -169,13 +168,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "ReactX Tanı Aracı" IDS_SYSTEM_DIALOG "Dizge" diff --git a/base/applications/dxdiag/lang/uk-UA.rc b/base/applications/dxdiag/lang/uk-UA.rc index 439036a00b0..86399d28b25 100644 --- a/base/applications/dxdiag/lang/uk-UA.rc +++ b/base/applications/dxdiag/lang/uk-UA.rc @@ -8,10 +8,9 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Засіб діагностики ReactX" FONT 8, "MS Shell Dlg" BEGIN @@ -22,7 +21,7 @@ BEGIN PUSHBUTTON "&Вихід", IDC_BUTTON_EXIT, 425, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 190 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 190 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -53,7 +52,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -107,7 +106,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -145,14 +144,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 190, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -164,7 +163,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 180, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -172,13 +171,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "Засіб діагностики ReactX" IDS_SYSTEM_DIALOG "Система" diff --git a/base/applications/dxdiag/lang/zh-CN.rc b/base/applications/dxdiag/lang/zh-CN.rc index 40336aff443..ff581e8d97c 100644 --- a/base/applications/dxdiag/lang/zh-CN.rc +++ b/base/applications/dxdiag/lang/zh-CN.rc @@ -8,10 +8,9 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "ReactX 诊断程式" FONT 8, "MS Shell Dlg" BEGIN @@ -22,7 +21,7 @@ BEGIN PUSHBUTTON "结束(&E)", IDC_BUTTON_EXIT, 425, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -53,7 +52,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -107,7 +106,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -145,14 +144,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -164,7 +163,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -172,13 +171,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "ReactX 诊断工具" IDS_SYSTEM_DIALOG "系统" diff --git a/base/applications/dxdiag/lang/zh-TW.rc b/base/applications/dxdiag/lang/zh-TW.rc index 30ffc1d2f83..d1299225f55 100644 --- a/base/applications/dxdiag/lang/zh-TW.rc +++ b/base/applications/dxdiag/lang/zh-TW.rc @@ -8,10 +8,9 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL -IDD_MAIN_DIALOG DIALOGEX DISCARDABLE 0, 0, 478, 280 +IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "ReactX 診斷程式" FONT 8, "MS Shell Dlg" BEGIN @@ -22,7 +21,7 @@ BEGIN PUSHBUTTON "結束(&E)", IDC_BUTTON_EXIT, 425, 261, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SYSTEM_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -53,7 +52,7 @@ BEGIN LTEXT "", IDC_STATIC_VERSION, 155, 170, 195, 10, SS_LEFT END -IDD_DISPLAY_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -107,7 +106,7 @@ BEGIN END -IDD_SOUND_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_SOUND_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -145,14 +144,14 @@ BEGIN EDITTEXT IDC_TEXT_DSOUNDINFO, 20, 192, 432, 20, WS_DISABLED | WS_TABSTOP END -IDD_MUSIC_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -IDD_INPUT_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_INPUT_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -164,7 +163,7 @@ BEGIN EDITTEXT IDC_RICH_INFO, 20, 182, 432, 30, WS_DISABLED | WS_TABSTOP END -IDD_NETWORK_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -172,13 +171,13 @@ BEGIN CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 20, 22, 432, 60 END -IDD_HELP_DIALOG DIALOGEX DISCARDABLE 0, 0, 462, 220 +IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MAIN_DIALOG "ReactX 診斷工具" IDS_SYSTEM_DIALOG "系統" diff --git a/base/applications/dxdiag/precomp.h b/base/applications/dxdiag/precomp.h index 35d0cb24d0c..21dfb3cf554 100644 --- a/base/applications/dxdiag/precomp.h +++ b/base/applications/dxdiag/precomp.h @@ -42,6 +42,9 @@ typedef struct /* globals */ extern HINSTANCE hInst; +/* theming hack */ +BOOL EnableDialogTheme(HWND hwnd); + /* dialog wnd proc */ INT_PTR CALLBACK SystemPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK DisplayPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); diff --git a/base/applications/dxdiag/sound.c b/base/applications/dxdiag/sound.c index 17c4a654481..b7ffeb63fe6 100644 --- a/base/applications/dxdiag/sound.c +++ b/base/applications/dxdiag/sound.c @@ -208,7 +208,7 @@ BOOL CALLBACK DSEnumCallback(LPGUID lpGuid, LPCWSTR lpcstrDescription, LPCWSTR l return FALSE; pContext->hSoundWnd = hDlgs; - hwndDlg = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_SOUND_DIALOG), pContext->hMainDialog, SoundPageWndProc, (LPARAM)pContext); + hwndDlg = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_SOUND_DIALOG), pContext->hMainDialog, SoundPageWndProc, (LPARAM)pContext); EnableDialogTheme(hwndDlg); if (!hwndDlg) return FALSE; diff --git a/base/applications/findstr/lang/bg-BG.rc b/base/applications/findstr/lang/bg-BG.rc index 4966dba0684..948729093a2 100644 --- a/base/applications/findstr/lang/bg-BG.rc +++ b/base/applications/findstr/lang/bg-BG.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Извежда всички редове във файла, които съдържат указания низ..\n\n\ diff --git a/base/applications/findstr/lang/ca-ES.rc b/base/applications/findstr/lang/ca-ES.rc index 97e540ee01b..412ed253e83 100644 --- a/base/applications/findstr/lang/ca-ES.rc +++ b/base/applications/findstr/lang/ca-ES.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_CATALAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Mostra totes les linies que continguin una determinada cadena de caràcters.\n\n\ diff --git a/base/applications/findstr/lang/cs-CZ.rc b/base/applications/findstr/lang/cs-CZ.rc index e19e7392467..4c14cc06755 100644 --- a/base/applications/findstr/lang/cs-CZ.rc +++ b/base/applications/findstr/lang/cs-CZ.rc @@ -6,7 +6,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Zobrazí všechny řádky souboru obsahující hledaný řetězec.\n\n\ diff --git a/base/applications/findstr/lang/de-DE.rc b/base/applications/findstr/lang/de-DE.rc index 083bcd0686e..c7b00691103 100644 --- a/base/applications/findstr/lang/de-DE.rc +++ b/base/applications/findstr/lang/de-DE.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Sucht in einer Datei nach einer Zeichenfolge.\n\n\ diff --git a/base/applications/findstr/lang/el-GR.rc b/base/applications/findstr/lang/el-GR.rc index d339db93ef0..15c9be76720 100644 --- a/base/applications/findstr/lang/el-GR.rc +++ b/base/applications/findstr/lang/el-GR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Εκτυπώνει όλες τις γραμμές ενός αρχείου που περιέχουν ένα αλφαριθμητικό.\n\n\ diff --git a/base/applications/findstr/lang/en-US.rc b/base/applications/findstr/lang/en-US.rc index bff4bc76236..66c4431c49f 100644 --- a/base/applications/findstr/lang/en-US.rc +++ b/base/applications/findstr/lang/en-US.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FINDSTR: Prints all lines of a file that contain a string.\n\n\ diff --git a/base/applications/findstr/lang/es-ES.rc b/base/applications/findstr/lang/es-ES.rc index 51689d7978b..b75d383eb81 100644 --- a/base/applications/findstr/lang/es-ES.rc +++ b/base/applications/findstr/lang/es-ES.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Imprime todas las líneas de un fichero que contiene una cadena.\n\n\ diff --git a/base/applications/findstr/lang/fr-FR.rc b/base/applications/findstr/lang/fr-FR.rc index 71c7db58f8a..90057f6688b 100644 --- a/base/applications/findstr/lang/fr-FR.rc +++ b/base/applications/findstr/lang/fr-FR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Affiche toutes les lignes d'un fichier qui contiennent un morceau de texte.\n\n\ diff --git a/base/applications/findstr/lang/it-IT.rc b/base/applications/findstr/lang/it-IT.rc index 5889db5f2fd..366fee60e05 100644 --- a/base/applications/findstr/lang/it-IT.rc +++ b/base/applications/findstr/lang/it-IT.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Visualizza le linee di un file che contengono un stringa.\n\n\ diff --git a/base/applications/findstr/lang/lt-LT.rc b/base/applications/findstr/lang/lt-LT.rc index 08b098957a7..5c287aea849 100644 --- a/base/applications/findstr/lang/lt-LT.rc +++ b/base/applications/findstr/lang/lt-LT.rc @@ -9,7 +9,7 @@ LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Spausdina visas bylos eilutes, kuriose yra ieškomas tekstas.\n\n\ diff --git a/base/applications/findstr/lang/no-NO.rc b/base/applications/findstr/lang/no-NO.rc index ba31ca5516c..37169bbccb3 100644 --- a/base/applications/findstr/lang/no-NO.rc +++ b/base/applications/findstr/lang/no-NO.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FINN: Skriv alle linjene for filen som inneholder en streng.\n\n\ diff --git a/base/applications/findstr/lang/pl-PL.rc b/base/applications/findstr/lang/pl-PL.rc index 7e8ecddf445..2bfed86a21b 100644 --- a/base/applications/findstr/lang/pl-PL.rc +++ b/base/applications/findstr/lang/pl-PL.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Wyświetla wszystkie linie danego pliku, zawierające szukany ciąg znaków.\n\n\ diff --git a/base/applications/findstr/lang/pt-BR.rc b/base/applications/findstr/lang/pt-BR.rc index 22a7fbef92f..7da41a34670 100644 --- a/base/applications/findstr/lang/pt-BR.rc +++ b/base/applications/findstr/lang/pt-BR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Localiza uma seqüência de texto em um ou mais arquivos.\n\n\ diff --git a/base/applications/findstr/lang/ro-RO.rc b/base/applications/findstr/lang/ro-RO.rc index 24c419bb422..384c88990ae 100644 --- a/base/applications/findstr/lang/ro-RO.rc +++ b/base/applications/findstr/lang/ro-RO.rc @@ -7,7 +7,7 @@ */ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FINDSTR: Tipărește toate rândurile unui fișier ce conțin un șir.\n\n\ diff --git a/base/applications/findstr/lang/ru-RU.rc b/base/applications/findstr/lang/ru-RU.rc index 945555940b8..6fce3d14f3a 100644 --- a/base/applications/findstr/lang/ru-RU.rc +++ b/base/applications/findstr/lang/ru-RU.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Поиск текстовой строки в одном или нескольких файлах.\n\n\ diff --git a/base/applications/findstr/lang/sk-SK.rc b/base/applications/findstr/lang/sk-SK.rc index bf641923070..fa45c9a346b 100644 --- a/base/applications/findstr/lang/sk-SK.rc +++ b/base/applications/findstr/lang/sk-SK.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Zobrazí všetky riadky súboru obsahujúce hľadaný reťazec.\n\n\ diff --git a/base/applications/findstr/lang/sv-SE.rc b/base/applications/findstr/lang/sv-SE.rc index c3e6e40d07b..e3e4cf1d1db 100644 --- a/base/applications/findstr/lang/sv-SE.rc +++ b/base/applications/findstr/lang/sv-SE.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Skriver ut alla rader i en fil som innehåller en sträng.\n\n\ diff --git a/base/applications/findstr/lang/uk-UA.rc b/base/applications/findstr/lang/uk-UA.rc index 7cef30daf65..1cf478d10af 100644 --- a/base/applications/findstr/lang/uk-UA.rc +++ b/base/applications/findstr/lang/uk-UA.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FIND: Виведення всіх рядків файлу, які містять рядок.\n\n\ diff --git a/base/applications/findstr/lang/zh-CN.rc b/base/applications/findstr/lang/zh-CN.rc index 35fa9b34cf1..82a3be610c9 100644 --- a/base/applications/findstr/lang/zh-CN.rc +++ b/base/applications/findstr/lang/zh-CN.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FINDSTR: 输出某文件中包含指定字符串的所有行。\n\n\ diff --git a/base/applications/findstr/lang/zh-TW.rc b/base/applications/findstr/lang/zh-TW.rc index 68c6f6f787e..b0c6552a4a4 100644 --- a/base/applications/findstr/lang/zh-TW.rc +++ b/base/applications/findstr/lang/zh-TW.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "FINDSTR: 輸出包含指定字串的檔案的所有行。\n\n\ diff --git a/base/applications/fontview/fontview.rc b/base/applications/fontview/fontview.rc index 226d4a71417..c8f4f7da605 100644 --- a/base/applications/fontview/fontview.rc +++ b/base/applications/fontview/fontview.rc @@ -11,7 +11,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDI_TT ICON "ttf.ico" -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CHARSLOWER, "abcdefghijklmnopqrstuvmxyz" IDS_CHARSUPPER, "ABCDEFGHIJKLMNOPQRSTUVMXYZ" diff --git a/base/applications/fontview/lang/bg-BG.rc b/base/applications/fontview/lang/bg-BG.rc index d0db95dba5e..a72c7a9cca7 100644 --- a/base/applications/fontview/lang/bg-BG.rc +++ b/base/applications/fontview/lang/bg-BG.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INSTALL, "Install" IDS_PRINT, "Печат" diff --git a/base/applications/fontview/lang/de-DE.rc b/base/applications/fontview/lang/de-DE.rc index 06f0235dbbe..86066995109 100644 --- a/base/applications/fontview/lang/de-DE.rc +++ b/base/applications/fontview/lang/de-DE.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INSTALL, "Installieren" IDS_PRINT, "Drucken" diff --git a/base/applications/fontview/lang/en-US.rc b/base/applications/fontview/lang/en-US.rc index 2b8159f0804..4961ee8510b 100644 --- a/base/applications/fontview/lang/en-US.rc +++ b/base/applications/fontview/lang/en-US.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INSTALL, "Install" IDS_PRINT, "Print" diff --git a/base/applications/fontview/lang/es-ES.rc b/base/applications/fontview/lang/es-ES.rc index 1290fdd5c0d..22832aa8257 100644 --- a/base/applications/fontview/lang/es-ES.rc +++ b/base/applications/fontview/lang/es-ES.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INSTALL, "Install" IDS_PRINT, "Imprimir" diff --git a/base/applications/fontview/lang/fr-FR.rc b/base/applications/fontview/lang/fr-FR.rc index 0cbf26b3b1f..833206a523b 100644 --- a/base/applications/fontview/lang/fr-FR.rc +++ b/base/applications/fontview/lang/fr-FR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INSTALL, "Installer" IDS_PRINT, "Imprimer" diff --git a/base/applications/fontview/lang/he-IL.rc b/base/applications/fontview/lang/he-IL.rc index 3130ac81d65..abdbdb2c4a2 100644 --- a/base/applications/fontview/lang/he-IL.rc +++ b/base/applications/fontview/lang/he-IL.rc @@ -1,7 +1,7 @@ // Translated by Baruch Rutman LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INSTALL, "התקן" IDS_PRINT, "הדפס" diff --git a/base/applications/fontview/lang/it-IT.rc b/base/applications/fontview/lang/it-IT.rc index b8c211e430e..cc15f366ccb 100644 --- a/base/applications/fontview/lang/it-IT.rc +++ b/base/applications/fontview/lang/it-IT.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ITALIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INSTALL, "Installa" IDS_PRINT, "Stampa" diff --git a/base/applications/fontview/lang/lt-LT.rc b/base/applications/fontview/lang/lt-LT.rc index 52fae35656a..0d56cf60cd1 100644 --- a/base/applications/fontview/lang/lt-LT.rc +++ b/base/applications/fontview/lang/lt-LT.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INSTALL, "Install" IDS_PRINT, "Spausdinti" diff --git a/base/applications/fontview/lang/no-NO.rc b/base/applications/fontview/lang/no-NO.rc index a3e9509a4dc..846e518c810 100644 --- a/base/applications/fontview/lang/no-NO.rc +++ b/base/applications/fontview/lang/no-NO.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INSTALL, "Install" IDS_PRINT, "Skriv" diff --git a/base/applications/fontview/lang/pl-PL.rc b/base/applications/fontview/lang/pl-PL.rc index adf5821d261..e2e94f8d309 100644 --- a/base/applications/fontview/lang/pl-PL.rc +++ b/base/applications/fontview/lang/pl-PL.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INSTALL, "Instaluj" IDS_PRINT, "Drukuj" diff --git a/base/applications/fontview/lang/pt-BR.rc b/base/applications/fontview/lang/pt-BR.rc index 4b14b26bcfd..2b9df553d39 100644 --- a/base/applications/fontview/lang/pt-BR.rc +++ b/base/applications/fontview/lang/pt-BR.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INSTALL, "Install" IDS_PRINT, "Imprimir" diff --git a/base/applications/fontview/lang/ro-RO.rc b/base/applications/fontview/lang/ro-RO.rc index 4361ff13dc0..0ddc3e8b7e6 100644 --- a/base/applications/fontview/lang/ro-RO.rc +++ b/base/applications/fontview/lang/ro-RO.rc @@ -1,7 +1,7 @@ //2012.09.09 - Fulea Ștefan: update caused by r56898, corrections LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INSTALL, "Inst&alează" IDS_PRINT, "I&mprimă" diff --git a/base/applications/fontview/lang/ru-RU.rc b/base/applications/fontview/lang/ru-RU.rc index d0138d48ed0..05ad9ea581d 100644 --- a/base/applications/fontview/lang/ru-RU.rc +++ b/base/applications/fontview/lang/ru-RU.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INSTALL, "Install" IDS_PRINT, "Печать" diff --git a/base/applications/fontview/lang/sk-SK.rc b/base/applications/fontview/lang/sk-SK.rc index c2366ab6df5..9bce1bba1a0 100644 --- a/base/applications/fontview/lang/sk-SK.rc +++ b/base/applications/fontview/lang/sk-SK.rc @@ -5,7 +5,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INSTALL, "Nainštalovať" IDS_PRINT, "Tlačiť" diff --git a/base/applications/fontview/lang/sv-SE.rc b/base/applications/fontview/lang/sv-SE.rc index 2f7e517514a..17d33281558 100644 --- a/base/applications/fontview/lang/sv-SE.rc +++ b/base/applications/fontview/lang/sv-SE.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INSTALL, "Install" IDS_PRINT, "Skriv ut" diff --git a/base/applications/fontview/lang/tr-TR.rc b/base/applications/fontview/lang/tr-TR.rc index dda20d1b235..951a3fd701e 100644 --- a/base/applications/fontview/lang/tr-TR.rc +++ b/base/applications/fontview/lang/tr-TR.rc @@ -1,9 +1,9 @@ /* - * TRANSLATORS: 2013 - Erdem Ersoy (eersoy93) (erdemersoy@live.com) + * TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) (erdemersoy@live.com) */ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INSTALL, "Kur..." IDS_PRINT, "Yazdır..." diff --git a/base/applications/fontview/lang/uk-UA.rc b/base/applications/fontview/lang/uk-UA.rc index 9aaa92c38fa..62616bf09d8 100644 --- a/base/applications/fontview/lang/uk-UA.rc +++ b/base/applications/fontview/lang/uk-UA.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INSTALL, "Install" IDS_PRINT, "Друк" diff --git a/base/applications/fontview/lang/zh-CN.rc b/base/applications/fontview/lang/zh-CN.rc index 7f33c3bf50f..cbbbbccbfd5 100644 --- a/base/applications/fontview/lang/zh-CN.rc +++ b/base/applications/fontview/lang/zh-CN.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INSTALL, "Install" IDS_PRINT, "列印" diff --git a/base/applications/fontview/lang/zh-TW.rc b/base/applications/fontview/lang/zh-TW.rc index 3387bb277b2..a4fbddca1e5 100644 --- a/base/applications/fontview/lang/zh-TW.rc +++ b/base/applications/fontview/lang/zh-TW.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INSTALL, "Install" IDS_PRINT, "列印" diff --git a/base/applications/games/solitaire/lang/bg-BG.rc b/base/applications/games/solitaire/lang/bg-BG.rc index a55107e5e8c..5677a357036 100644 --- a/base/applications/games/solitaire/lang/bg-BG.rc +++ b/base/applications/games/solitaire/lang/bg-BG.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Настройки" FONT 8, "MS Shell Dlg" @@ -61,7 +61,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Игра" BEGIN @@ -83,7 +83,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/ca-ES.rc b/base/applications/games/solitaire/lang/ca-ES.rc index 6b5390074d0..38a33972b10 100644 --- a/base/applications/games/solitaire/lang/ca-ES.rc +++ b/base/applications/games/solitaire/lang/ca-ES.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_CATALAN, SUBLANG_DEFAULT /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Options" FONT 8, "MS Shell Dlg" @@ -63,7 +63,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Joc" BEGIN @@ -85,7 +85,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/cs-CZ.rc b/base/applications/games/solitaire/lang/cs-CZ.rc index 9cf1e3bd462..33e42878f22 100644 --- a/base/applications/games/solitaire/lang/cs-CZ.rc +++ b/base/applications/games/solitaire/lang/cs-CZ.rc @@ -9,7 +9,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Možnosti" FONT 8, "MS Shell Dlg" @@ -62,7 +62,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Hra" BEGIN @@ -84,7 +84,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/de-DE.rc b/base/applications/games/solitaire/lang/de-DE.rc index 7c19436ed0a..93e8a1c5860 100644 --- a/base/applications/games/solitaire/lang/de-DE.rc +++ b/base/applications/games/solitaire/lang/de-DE.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Optionen" FONT 8, "MS Shell Dlg" @@ -62,7 +62,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Spiel" BEGIN @@ -83,7 +83,7 @@ END /* Accelerators */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/el-GR.rc b/base/applications/games/solitaire/lang/el-GR.rc index 7ecfce8197b..5e6ef9906d5 100644 --- a/base/applications/games/solitaire/lang/el-GR.rc +++ b/base/applications/games/solitaire/lang/el-GR.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Επιλογές" FONT 8, "MS Shell Dlg" @@ -62,7 +62,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Παιχνίδι" BEGIN @@ -84,7 +84,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/en-US.rc b/base/applications/games/solitaire/lang/en-US.rc index 703c4decb32..d48c478fd76 100644 --- a/base/applications/games/solitaire/lang/en-US.rc +++ b/base/applications/games/solitaire/lang/en-US.rc @@ -11,7 +11,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Options" FONT 8, "MS Shell Dlg" @@ -64,7 +64,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Game" BEGIN @@ -86,7 +86,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/es-ES.rc b/base/applications/games/solitaire/lang/es-ES.rc index 76d49117784..3d38ccaf519 100644 --- a/base/applications/games/solitaire/lang/es-ES.rc +++ b/base/applications/games/solitaire/lang/es-ES.rc @@ -11,7 +11,7 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Opciones" FONT 8, "MS Shell Dlg" @@ -64,7 +64,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Juego" BEGIN @@ -85,7 +85,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/eu-ES.rc b/base/applications/games/solitaire/lang/eu-ES.rc index e814f9f5c4c..b82d4253212 100644 --- a/base/applications/games/solitaire/lang/eu-ES.rc +++ b/base/applications/games/solitaire/lang/eu-ES.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_BASQUE, SUBLANG_DEFAULT /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Aukerak" FONT 8, "MS Shell Dlg" @@ -62,7 +62,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Jokoa" BEGIN @@ -83,7 +83,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/fr-FR.rc b/base/applications/games/solitaire/lang/fr-FR.rc index 87533b552eb..05d4104f210 100644 --- a/base/applications/games/solitaire/lang/fr-FR.rc +++ b/base/applications/games/solitaire/lang/fr-FR.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Options" FONT 8, "MS Shell Dlg" @@ -62,7 +62,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Partie" BEGIN @@ -83,7 +83,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/he-IL.rc b/base/applications/games/solitaire/lang/he-IL.rc index 2fad33df065..0fcb60504a1 100644 --- a/base/applications/games/solitaire/lang/he-IL.rc +++ b/base/applications/games/solitaire/lang/he-IL.rc @@ -11,7 +11,7 @@ LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "אפשרויות" FONT 8, "MS Shell Dlg" @@ -64,7 +64,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&משחק" BEGIN @@ -86,7 +86,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/hu-HU.rc b/base/applications/games/solitaire/lang/hu-HU.rc index ed99d9c28f8..d8791ef35ee 100644 --- a/base/applications/games/solitaire/lang/hu-HU.rc +++ b/base/applications/games/solitaire/lang/hu-HU.rc @@ -11,7 +11,7 @@ LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Beállítások" FONT 8, "MS Shell Dlg" @@ -64,7 +64,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Játlék" BEGIN @@ -86,7 +86,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/id-ID.rc b/base/applications/games/solitaire/lang/id-ID.rc index ca2d2729b64..dcf87d0c974 100644 --- a/base/applications/games/solitaire/lang/id-ID.rc +++ b/base/applications/games/solitaire/lang/id-ID.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Options" FONT 8, "MS Shell Dlg" @@ -62,7 +62,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Game" BEGIN @@ -83,7 +83,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/it-IT.rc b/base/applications/games/solitaire/lang/it-IT.rc index b795785419f..28ea570234b 100644 --- a/base/applications/games/solitaire/lang/it-IT.rc +++ b/base/applications/games/solitaire/lang/it-IT.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Opzioni" FONT 8, "MS Shell Dlg" @@ -62,7 +62,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Partita" BEGIN @@ -83,7 +83,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/ja-JP.rc b/base/applications/games/solitaire/lang/ja-JP.rc index 3dce23a7492..6c67accdb2d 100644 --- a/base/applications/games/solitaire/lang/ja-JP.rc +++ b/base/applications/games/solitaire/lang/ja-JP.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "オプション" FONT 9, "MS UI Gothic" @@ -63,7 +63,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "ゲーム(&G)" BEGIN @@ -85,7 +85,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/ko-KR.rc b/base/applications/games/solitaire/lang/ko-KR.rc index f92f3099ba5..2370d6d4ede 100644 --- a/base/applications/games/solitaire/lang/ko-KR.rc +++ b/base/applications/games/solitaire/lang/ko-KR.rc @@ -6,7 +6,7 @@ LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "옵션" FONT 8, "MS Shell Dlg" @@ -59,7 +59,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "게임(&G)" BEGIN @@ -82,7 +82,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/lt-LT.rc b/base/applications/games/solitaire/lang/lt-LT.rc index ac88fe615c1..585671c9d98 100644 --- a/base/applications/games/solitaire/lang/lt-LT.rc +++ b/base/applications/games/solitaire/lang/lt-LT.rc @@ -11,7 +11,7 @@ LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Nuostatos" FONT 8, "MS Shell Dlg" @@ -64,7 +64,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Žaidimas" BEGIN @@ -86,7 +86,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/nl-NL.rc b/base/applications/games/solitaire/lang/nl-NL.rc index aeaf54d6432..cb5ee546bf2 100644 --- a/base/applications/games/solitaire/lang/nl-NL.rc +++ b/base/applications/games/solitaire/lang/nl-NL.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Opties" FONT 8, "MS Shell Dlg" @@ -63,7 +63,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Spel" BEGIN @@ -85,7 +85,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/no-NO.rc b/base/applications/games/solitaire/lang/no-NO.rc index 32f434b17db..7644ec673ff 100644 --- a/base/applications/games/solitaire/lang/no-NO.rc +++ b/base/applications/games/solitaire/lang/no-NO.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Innstillinger" FONT 8, "MS Shell Dlg" @@ -62,7 +62,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Spill" BEGIN @@ -83,7 +83,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/pl-PL.rc b/base/applications/games/solitaire/lang/pl-PL.rc index 95c195fb53e..899e8e9a44c 100644 --- a/base/applications/games/solitaire/lang/pl-PL.rc +++ b/base/applications/games/solitaire/lang/pl-PL.rc @@ -11,7 +11,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Opcje" FONT 8, "MS Shell Dlg" @@ -63,7 +63,7 @@ END /* Menu */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Gra" BEGIN @@ -84,7 +84,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/ro-RO.rc b/base/applications/games/solitaire/lang/ro-RO.rc index b77c992e9ed..eb461a62e14 100644 --- a/base/applications/games/solitaire/lang/ro-RO.rc +++ b/base/applications/games/solitaire/lang/ro-RO.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Opțiuni" FONT 8, "MS Shell Dlg" @@ -63,7 +63,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "J&oc" BEGIN @@ -85,7 +85,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/ru-RU.rc b/base/applications/games/solitaire/lang/ru-RU.rc index a4b93a40a10..0808238725a 100644 --- a/base/applications/games/solitaire/lang/ru-RU.rc +++ b/base/applications/games/solitaire/lang/ru-RU.rc @@ -5,7 +5,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT /* Диалоги */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Настройки" FONT 8, "MS Shell Dlg" @@ -56,7 +56,7 @@ END /* Меню */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Игра" BEGIN @@ -78,7 +78,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/sk-SK.rc b/base/applications/games/solitaire/lang/sk-SK.rc index c0199168b25..e0e45da9130 100644 --- a/base/applications/games/solitaire/lang/sk-SK.rc +++ b/base/applications/games/solitaire/lang/sk-SK.rc @@ -13,7 +13,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Možnosti" FONT 8, "MS Shell Dlg" @@ -65,7 +65,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Hra" BEGIN @@ -87,7 +87,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/sv-SE.rc b/base/applications/games/solitaire/lang/sv-SE.rc index 3d544aff519..e79019a182e 100644 --- a/base/applications/games/solitaire/lang/sv-SE.rc +++ b/base/applications/games/solitaire/lang/sv-SE.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Options" FONT 8, "MS Shell Dlg" @@ -63,7 +63,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Spel" BEGIN @@ -85,7 +85,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/th-TH.rc b/base/applications/games/solitaire/lang/th-TH.rc index cbb1b1d5512..984d811f9bd 100644 --- a/base/applications/games/solitaire/lang/th-TH.rc +++ b/base/applications/games/solitaire/lang/th-TH.rc @@ -11,7 +11,7 @@ LANGUAGE LANG_THAI, SUBLANG_DEFAULT /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Options" FONT 8, "MS Shell Dlg" @@ -63,7 +63,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "เ&กม" BEGIN @@ -84,7 +84,7 @@ END /* Accelerators */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/tr-TR.rc b/base/applications/games/solitaire/lang/tr-TR.rc index 620d1c62d05..4f5e9a72842 100644 --- a/base/applications/games/solitaire/lang/tr-TR.rc +++ b/base/applications/games/solitaire/lang/tr-TR.rc @@ -12,7 +12,7 @@ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Seçenekler" FONT 8, "MS Shell Dlg" @@ -25,7 +25,7 @@ BEGIN AUTOCHECKBOX "&Durum çubuğu", IDC_OPT_STATUSBAR, 7, 66, 64, 10, WS_TABSTOP DEFPUSHBUTTON "Tamam", IDOK, 35, 97, 50, 14 - PUSHBUTTON "Vazgeç", IDCANCEL, 101, 97, 50, 14 + PUSHBUTTON "İptal", IDCANCEL, 101, 97, 50, 14 END @@ -47,7 +47,7 @@ BEGIN CONTROL "", IDC_CARDBACK11, "Static", SS_NOTIFY, 124, 46, 26, 32 CONTROL "", IDC_CARDBACK12, "Static", SS_NOTIFY, 154, 46, 26, 32 DEFPUSHBUTTON "Tamam", IDOK, 66, 84, 54, 13 - PUSHBUTTON "Vazgeç", IDCANCEL, 126, 84, 54, 13 + PUSHBUTTON "İptal", IDCANCEL, 126, 84, 54, 13 END @@ -65,7 +65,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Oyun" BEGIN @@ -87,7 +87,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/uk-UA.rc b/base/applications/games/solitaire/lang/uk-UA.rc index 5b523bd42d6..85aa3fc0c91 100644 --- a/base/applications/games/solitaire/lang/uk-UA.rc +++ b/base/applications/games/solitaire/lang/uk-UA.rc @@ -11,7 +11,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Параметри" FONT 8, "MS Shell Dlg" @@ -63,7 +63,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Гра" BEGIN @@ -84,7 +84,7 @@ END /* Accelerators */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/zh-CN.rc b/base/applications/games/solitaire/lang/zh-CN.rc index 569eb4bc374..96fa3c73022 100644 --- a/base/applications/games/solitaire/lang/zh-CN.rc +++ b/base/applications/games/solitaire/lang/zh-CN.rc @@ -11,7 +11,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "选项" FONT 8, "MS Shell Dlg" @@ -63,7 +63,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "游戏(&G)" BEGIN @@ -84,7 +84,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/lang/zh-TW.rc b/base/applications/games/solitaire/lang/zh-TW.rc index db55580a8b5..be0f1f6daf7 100644 --- a/base/applications/games/solitaire/lang/zh-TW.rc +++ b/base/applications/games/solitaire/lang/zh-TW.rc @@ -11,7 +11,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL /* Dialogs */ -IDD_OPTIONS DIALOGEX DISCARDABLE 0, 0, 186, 118 +IDD_OPTIONS DIALOGEX 0, 0, 186, 118 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "選項" FONT 8, "MS Shell Dlg" @@ -63,7 +63,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "遊戲(&G)" BEGIN @@ -84,7 +84,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/solitaire/rsrc.rc b/base/applications/games/solitaire/rsrc.rc index 1a44a52445f..b9e28b3765d 100644 --- a/base/applications/games/solitaire/rsrc.rc +++ b/base/applications/games/solitaire/rsrc.rc @@ -5,7 +5,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -IDI_SOLITAIRE ICON DISCARDABLE "solitaire.ico" +IDI_SOLITAIRE ICON "solitaire.ico" + +#include // UTF-8 #pragma code_page(65001) diff --git a/base/applications/games/spider/lang/bg-BG.rc b/base/applications/games/spider/lang/bg-BG.rc index 6b9508d59a1..e4f55939998 100644 --- a/base/applications/games/spider/lang/bg-BG.rc +++ b/base/applications/games/spider/lang/bg-BG.rc @@ -31,7 +31,7 @@ BEGIN PUSHBUTTON "Отказ", IDCANCEL, 126, 84, 54, 13 END -IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 106, 80 +IDD_DIFFICULTY DIALOGEX 100, 100, 106, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Трудност" FONT 8, "MS Shell Dlg" @@ -58,7 +58,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Игра" BEGIN @@ -79,7 +79,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/spider/lang/de-DE.rc b/base/applications/games/spider/lang/de-DE.rc index 5f984695e5b..6c376f66bc1 100644 --- a/base/applications/games/spider/lang/de-DE.rc +++ b/base/applications/games/spider/lang/de-DE.rc @@ -31,7 +31,7 @@ BEGIN PUSHBUTTON "Abbrechen", IDCANCEL, 126, 84, 54, 13 END -IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 120, 80 +IDD_DIFFICULTY DIALOGEX 100, 100, 120, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Schwierigkeitsgrad wählen" FONT 8, "MS Shell Dlg" @@ -58,7 +58,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Spiel" BEGIN @@ -79,7 +79,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/spider/lang/en-US.rc b/base/applications/games/spider/lang/en-US.rc index 0ae13bea145..71621c2f628 100644 --- a/base/applications/games/spider/lang/en-US.rc +++ b/base/applications/games/spider/lang/en-US.rc @@ -31,7 +31,7 @@ BEGIN PUSHBUTTON "Cancel", IDCANCEL, 126, 84, 54, 13 END -IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 106, 80 +IDD_DIFFICULTY DIALOGEX 100, 100, 106, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Difficulty" FONT 8, "MS Shell Dlg" @@ -58,7 +58,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Game" BEGIN @@ -79,7 +79,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/spider/lang/es-ES.rc b/base/applications/games/spider/lang/es-ES.rc index 9a90413924b..0c19a720851 100644 --- a/base/applications/games/spider/lang/es-ES.rc +++ b/base/applications/games/spider/lang/es-ES.rc @@ -31,7 +31,7 @@ BEGIN PUSHBUTTON "Cancelar", IDCANCEL, 126, 84, 54, 13 END -IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 106, 80 +IDD_DIFFICULTY DIALOGEX 100, 100, 106, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Dificultad" FONT 8, "MS Shell Dlg" @@ -58,7 +58,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Juego" BEGIN @@ -79,7 +79,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/spider/lang/fr-FR.rc b/base/applications/games/spider/lang/fr-FR.rc index 788fba89a73..a440d089e6e 100644 --- a/base/applications/games/spider/lang/fr-FR.rc +++ b/base/applications/games/spider/lang/fr-FR.rc @@ -31,7 +31,7 @@ BEGIN PUSHBUTTON "Annuler", IDCANCEL, 126, 84, 54, 13 END -IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 106, 80 +IDD_DIFFICULTY DIALOGEX 100, 100, 106, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Difficulté" FONT 8, "MS Shell Dlg" @@ -58,7 +58,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Partie" BEGIN @@ -79,7 +79,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/spider/lang/he-IL.rc b/base/applications/games/spider/lang/he-IL.rc index 41962a02a31..03bdb9962cd 100644 --- a/base/applications/games/spider/lang/he-IL.rc +++ b/base/applications/games/spider/lang/he-IL.rc @@ -31,7 +31,7 @@ BEGIN PUSHBUTTON "ביטול", IDCANCEL, 126, 84, 54, 13 END -IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 106, 80 +IDD_DIFFICULTY DIALOGEX 100, 100, 106, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "רמת קושי" FONT 8, "MS Shell Dlg" @@ -58,7 +58,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&משחק" BEGIN @@ -79,7 +79,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/spider/lang/hu-HU.rc b/base/applications/games/spider/lang/hu-HU.rc index e3c55198813..f00255c17dd 100644 --- a/base/applications/games/spider/lang/hu-HU.rc +++ b/base/applications/games/spider/lang/hu-HU.rc @@ -31,7 +31,7 @@ BEGIN PUSHBUTTON "Mégsem", IDCANCEL, 126, 84, 54, 13 END -IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 106, 80 +IDD_DIFFICULTY DIALOGEX 100, 100, 106, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Difficulty" FONT 8, "MS Shell Dlg" @@ -58,7 +58,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Játék" BEGIN @@ -79,7 +79,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/spider/lang/it-IT.rc b/base/applications/games/spider/lang/it-IT.rc index 31069e586e9..576f4248e95 100644 --- a/base/applications/games/spider/lang/it-IT.rc +++ b/base/applications/games/spider/lang/it-IT.rc @@ -31,7 +31,7 @@ BEGIN PUSHBUTTON "Annulla", IDCANCEL, 126, 84, 54, 13 END -IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 106, 80 +IDD_DIFFICULTY DIALOGEX 100, 100, 106, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Difficoltà" FONT 8, "MS Shell Dlg" @@ -58,7 +58,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Partita" BEGIN @@ -79,7 +79,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/spider/lang/ja-JP.rc b/base/applications/games/spider/lang/ja-JP.rc index 8a52a17d6e6..0b96819b012 100644 --- a/base/applications/games/spider/lang/ja-JP.rc +++ b/base/applications/games/spider/lang/ja-JP.rc @@ -31,7 +31,7 @@ BEGIN PUSHBUTTON "キャンセル", IDCANCEL, 126, 84, 54, 13 END -IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 106, 80 +IDD_DIFFICULTY DIALOGEX 100, 100, 106, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "難易度" FONT 9, "MS UI Gothic" @@ -58,7 +58,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "ゲーム(&G)" BEGIN @@ -79,7 +79,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/spider/lang/nl-NL.rc b/base/applications/games/spider/lang/nl-NL.rc index 772a7c99875..c4c5059a5ff 100644 --- a/base/applications/games/spider/lang/nl-NL.rc +++ b/base/applications/games/spider/lang/nl-NL.rc @@ -31,7 +31,7 @@ BEGIN PUSHBUTTON "Annuleren", IDCANCEL, 126, 84, 54, 13 END -IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 106, 80 +IDD_DIFFICULTY DIALOGEX 100, 100, 106, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Moeilijkheidsgraad" FONT 8, "MS Shell Dlg" @@ -58,7 +58,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Spel" BEGIN @@ -79,7 +79,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/spider/lang/pl-PL.rc b/base/applications/games/spider/lang/pl-PL.rc index 21bab784d32..7be62cb4fe8 100644 --- a/base/applications/games/spider/lang/pl-PL.rc +++ b/base/applications/games/spider/lang/pl-PL.rc @@ -32,7 +32,7 @@ BEGIN PUSHBUTTON "Anuluj", IDCANCEL, 126, 84, 54, 13 END -IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 106, 80 +IDD_DIFFICULTY DIALOGEX 100, 100, 106, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Poziom trudności" FONT 8, "MS Shell Dlg" @@ -59,7 +59,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Gra" BEGIN @@ -80,7 +80,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/spider/lang/pt-BR.rc b/base/applications/games/spider/lang/pt-BR.rc index 8ea56aabc32..b7a8a56b165 100644 --- a/base/applications/games/spider/lang/pt-BR.rc +++ b/base/applications/games/spider/lang/pt-BR.rc @@ -31,7 +31,7 @@ BEGIN PUSHBUTTON "Cancelar", IDCANCEL, 126, 84, 54, 13 END -IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 106, 80 +IDD_DIFFICULTY DIALOGEX 100, 100, 106, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Dificuldade" FONT 8, "MS Shell Dlg" @@ -58,7 +58,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Jogo" BEGIN @@ -79,7 +79,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/spider/lang/ro-RO.rc b/base/applications/games/spider/lang/ro-RO.rc index edea03ce241..02c5e1f6b16 100644 --- a/base/applications/games/spider/lang/ro-RO.rc +++ b/base/applications/games/spider/lang/ro-RO.rc @@ -31,7 +31,7 @@ BEGIN PUSHBUTTON "A&nulează", IDCANCEL, 126, 84, 54, 13 END -IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 106, 80 +IDD_DIFFICULTY DIALOGEX 100, 100, 106, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Joc la categoria" FONT 8, "MS Shell Dlg" @@ -58,7 +58,7 @@ END /* Meniuri */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "J&oc" BEGIN @@ -79,7 +79,7 @@ END /* Acceleratori */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/spider/lang/ru-RU.rc b/base/applications/games/spider/lang/ru-RU.rc index 91eb841fea9..5a1280348e1 100644 --- a/base/applications/games/spider/lang/ru-RU.rc +++ b/base/applications/games/spider/lang/ru-RU.rc @@ -31,7 +31,7 @@ BEGIN PUSHBUTTON "Отмена", IDCANCEL, 126, 84, 54, 13 END -IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 112, 80 +IDD_DIFFICULTY DIALOGEX 100, 100, 112, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Уровень" FONT 8, "MS Shell Dlg" @@ -58,7 +58,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Игра" BEGIN @@ -79,7 +79,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/spider/lang/sk-SK.rc b/base/applications/games/spider/lang/sk-SK.rc index be6d15a4a3a..552058b2455 100644 --- a/base/applications/games/spider/lang/sk-SK.rc +++ b/base/applications/games/spider/lang/sk-SK.rc @@ -32,7 +32,7 @@ BEGIN PUSHBUTTON "Zrušiť", IDCANCEL, 126, 84, 54, 13 END -IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 106, 80 +IDD_DIFFICULTY DIALOGEX 100, 100, 106, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Obtiažnosť" FONT 8, "MS Shell Dlg" @@ -59,7 +59,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Hra" BEGIN @@ -80,7 +80,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/spider/lang/sv-SE.rc b/base/applications/games/spider/lang/sv-SE.rc index 3916cbc6cef..9d160cae0be 100644 --- a/base/applications/games/spider/lang/sv-SE.rc +++ b/base/applications/games/spider/lang/sv-SE.rc @@ -30,7 +30,7 @@ BEGIN PUSHBUTTON "Avbryt", IDCANCEL, 126, 84, 54, 13 END -IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 106, 80 +IDD_DIFFICULTY DIALOGEX 100, 100, 106, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Svårighet" FONT 8, "MS Shell Dlg" @@ -57,7 +57,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Spel" BEGIN @@ -78,7 +78,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/spider/lang/tr-TR.rc b/base/applications/games/spider/lang/tr-TR.rc index be621ef24fe..1e7b8491b6e 100644 --- a/base/applications/games/spider/lang/tr-TR.rc +++ b/base/applications/games/spider/lang/tr-TR.rc @@ -29,10 +29,10 @@ BEGIN CONTROL "", IDC_CARDBACK11, "Static", SS_NOTIFY, 124, 46, 26, 32 CONTROL "", IDC_CARDBACK12, "Static", SS_NOTIFY, 154, 46, 26, 32 DEFPUSHBUTTON "Tamam", IDOK, 66, 84, 54, 13 - PUSHBUTTON "Vazgeç", IDCANCEL, 126, 84, 54, 13 + PUSHBUTTON "İptal", IDCANCEL, 126, 84, 54, 13 END -IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 106, 80 +IDD_DIFFICULTY DIALOGEX 100, 100, 106, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Zorluk" FONT 8, "MS Shell Dlg" @@ -42,7 +42,7 @@ BEGIN AUTORADIOBUTTON "&Zor: Dört Renk", IDC_DIF_FOURCOLORS, 8, 36, 80, 10 DEFPUSHBUTTON "Tamam", IDOK, 8, 58, 40, 14 - PUSHBUTTON "Vazgeç", IDCANCEL, 58, 58, 40, 14 + PUSHBUTTON "İptal", IDCANCEL, 58, 58, 40, 14 END /* Strings */ @@ -59,7 +59,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Oyun" BEGIN @@ -80,7 +80,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/spider/lang/uk-UA.rc b/base/applications/games/spider/lang/uk-UA.rc index c28c6e7087b..9e998b24366 100644 --- a/base/applications/games/spider/lang/uk-UA.rc +++ b/base/applications/games/spider/lang/uk-UA.rc @@ -31,7 +31,7 @@ BEGIN PUSHBUTTON "Скасувати", IDCANCEL, 126, 84, 54, 13 END -IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 106, 80 +IDD_DIFFICULTY DIALOGEX 100, 100, 106, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Рівень" FONT 8, "MS Shell Dlg" @@ -58,7 +58,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "&Гра" BEGIN @@ -79,7 +79,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/spider/lang/zh-CN.rc b/base/applications/games/spider/lang/zh-CN.rc index f832cc421cf..7a937959e1c 100644 --- a/base/applications/games/spider/lang/zh-CN.rc +++ b/base/applications/games/spider/lang/zh-CN.rc @@ -31,7 +31,7 @@ BEGIN PUSHBUTTON "取消", IDCANCEL, 126, 84, 54, 13 END -IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 106, 80 +IDD_DIFFICULTY DIALOGEX 100, 100, 106, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "难度" FONT 8, "MS Shell Dlg" @@ -58,7 +58,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "游戏(&G)" BEGIN @@ -79,7 +79,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/spider/lang/zh-TW.rc b/base/applications/games/spider/lang/zh-TW.rc index b9a0b6ac19b..498dcf202b3 100644 --- a/base/applications/games/spider/lang/zh-TW.rc +++ b/base/applications/games/spider/lang/zh-TW.rc @@ -31,7 +31,7 @@ BEGIN PUSHBUTTON "取消", IDCANCEL, 126, 84, 54, 13 END -IDD_DIFFICULTY DIALOGEX DISCARDABLE 100, 100, 106, 80 +IDD_DIFFICULTY DIALOGEX 100, 100, 106, 80 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "難度" FONT 8, "MS Shell Dlg" @@ -58,7 +58,7 @@ END /* Menus */ -IDR_MENU1 MENU DISCARDABLE +IDR_MENU1 MENU BEGIN POPUP "遊戲(&G)" BEGIN @@ -79,7 +79,7 @@ END /* Accelerator */ -IDR_ACCELERATOR1 ACCELERATORS DISCARDABLE +IDR_ACCELERATOR1 ACCELERATORS BEGIN VK_F1, IDM_HELP_CONTENTS, VIRTKEY, NOINVERT VK_F2, IDM_GAME_NEW, VIRTKEY, NOINVERT diff --git a/base/applications/games/spider/rsrc.rc b/base/applications/games/spider/rsrc.rc index c87dc29c4f4..a7e80c56cc6 100644 --- a/base/applications/games/spider/rsrc.rc +++ b/base/applications/games/spider/rsrc.rc @@ -5,7 +5,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -IDI_SPIDER ICON DISCARDABLE "spider.ico" +IDI_SPIDER ICON "spider.ico" + +#include // UTF-8 #pragma code_page(65001) diff --git a/base/applications/games/winmine/lang/tr-TR.rc b/base/applications/games/winmine/lang/tr-TR.rc index 5f77ad647b1..698f0db8438 100644 --- a/base/applications/games/winmine/lang/tr-TR.rc +++ b/base/applications/games/winmine/lang/tr-TR.rc @@ -87,5 +87,5 @@ BEGIN EDITTEXT IDC_EDITCOLS, 5, 45, 20, 12, ES_NUMBER EDITTEXT IDC_EDITMINES, 5, 75, 20, 12, ES_NUMBER DEFPUSHBUTTON "Tamam", IDOK, 40, 30, 50, 15 - PUSHBUTTON "Vazgeç", IDCANCEL, 40, 50, 50, 15 + PUSHBUTTON "İptal", IDCANCEL, 40, 50, 50, 15 END diff --git a/base/applications/games/winmine/rsrc.rc b/base/applications/games/winmine/rsrc.rc index acfbcb3f369..95bfbb6f975 100644 --- a/base/applications/games/winmine/rsrc.rc +++ b/base/applications/games/winmine/rsrc.rc @@ -44,6 +44,8 @@ LEDS BITMAP rc/leds.bmp /* @makedep: mines.bmp */ MINES BITMAP rc/mines.bmp +#include + /* include localised resources */ // UTF-8 #pragma code_page(65001) diff --git a/base/applications/hh/hh.rc b/base/applications/hh/hh.rc index 5cbabc08d54..9e00f1b0083 100644 --- a/base/applications/hh/hh.rc +++ b/base/applications/hh/hh.rc @@ -5,4 +5,4 @@ #define REACTOS_STR_ORIGINAL_FILENAME "hh.exe\0" #include -2 ICON DISCARDABLE hh.ico +2 ICON hh.ico diff --git a/base/applications/logoff/lang/bg-BG.rc b/base/applications/logoff/lang/bg-BG.rc index 7ec34f051e3..d0d514b2bed 100644 --- a/base/applications/logoff/lang/bg-BG.rc +++ b/base/applications/logoff/lang/bg-BG.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Приключва работата.\n\n\ diff --git a/base/applications/logoff/lang/ca-ES.rc b/base/applications/logoff/lang/ca-ES.rc index f1f62f35047..19df809ad69 100644 --- a/base/applications/logoff/lang/ca-ES.rc +++ b/base/applications/logoff/lang/ca-ES.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_CATALAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Finalitza una sessió.\n\n\ diff --git a/base/applications/logoff/lang/cs-CZ.rc b/base/applications/logoff/lang/cs-CZ.rc index f950c0a502b..34e5f88d6d0 100644 --- a/base/applications/logoff/lang/cs-CZ.rc +++ b/base/applications/logoff/lang/cs-CZ.rc @@ -5,7 +5,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Ukončí sezení.\n\n\ diff --git a/base/applications/logoff/lang/de-DE.rc b/base/applications/logoff/lang/de-DE.rc index 2914ebca14c..768dd7488e4 100644 --- a/base/applications/logoff/lang/de-DE.rc +++ b/base/applications/logoff/lang/de-DE.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Beendet eine Sitzung.\n\n\ diff --git a/base/applications/logoff/lang/el-GR.rc b/base/applications/logoff/lang/el-GR.rc index 4205b65883c..032082506f9 100644 --- a/base/applications/logoff/lang/el-GR.rc +++ b/base/applications/logoff/lang/el-GR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Τερματίζει μια συνεδρία.\n\n\ diff --git a/base/applications/logoff/lang/en-US.rc b/base/applications/logoff/lang/en-US.rc index bd8ffdaf562..b790ae805cd 100644 --- a/base/applications/logoff/lang/en-US.rc +++ b/base/applications/logoff/lang/en-US.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Terminates a session.\n\n\ diff --git a/base/applications/logoff/lang/es-ES.rc b/base/applications/logoff/lang/es-ES.rc index 57ef9f71e0f..ad3fca4935c 100644 --- a/base/applications/logoff/lang/es-ES.rc +++ b/base/applications/logoff/lang/es-ES.rc @@ -5,7 +5,7 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Terminar una sesión.\n\n\ diff --git a/base/applications/logoff/lang/fr-FR.rc b/base/applications/logoff/lang/fr-FR.rc index c7747df7a02..c97fd318bf7 100644 --- a/base/applications/logoff/lang/fr-FR.rc +++ b/base/applications/logoff/lang/fr-FR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Termine une session.\n\n\ diff --git a/base/applications/logoff/lang/it-IT.rc b/base/applications/logoff/lang/it-IT.rc index 258677b18d0..11d8e161c0d 100644 --- a/base/applications/logoff/lang/it-IT.rc +++ b/base/applications/logoff/lang/it-IT.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Termina una sessione.\n\n\ diff --git a/base/applications/logoff/lang/ja-JP.rc b/base/applications/logoff/lang/ja-JP.rc index 28e99e0d683..f02f62cde14 100644 --- a/base/applications/logoff/lang/ja-JP.rc +++ b/base/applications/logoff/lang/ja-JP.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "セッションを終了します。\n\n\ diff --git a/base/applications/logoff/lang/ko-KR.rc b/base/applications/logoff/lang/ko-KR.rc index a7e2ad42553..9f2004b592b 100644 --- a/base/applications/logoff/lang/ko-KR.rc +++ b/base/applications/logoff/lang/ko-KR.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "세션을 종료합니다\n\n\ diff --git a/base/applications/logoff/lang/lt-LT.rc b/base/applications/logoff/lang/lt-LT.rc index 474d0b3e833..e93596e6286 100644 --- a/base/applications/logoff/lang/lt-LT.rc +++ b/base/applications/logoff/lang/lt-LT.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Užbaigia seansą.\n\n\ diff --git a/base/applications/logoff/lang/no-NO.rc b/base/applications/logoff/lang/no-NO.rc index 74664393b09..d3b17a563d6 100644 --- a/base/applications/logoff/lang/no-NO.rc +++ b/base/applications/logoff/lang/no-NO.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Avslutter en sesjon.\n\n\ diff --git a/base/applications/logoff/lang/pl-PL.rc b/base/applications/logoff/lang/pl-PL.rc index 2ec09847a77..bde01bc69fa 100644 --- a/base/applications/logoff/lang/pl-PL.rc +++ b/base/applications/logoff/lang/pl-PL.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Przerywa sesję.\n\n\ diff --git a/base/applications/logoff/lang/pt-BR.rc b/base/applications/logoff/lang/pt-BR.rc index 49907e9edb5..5d9a82029c5 100644 --- a/base/applications/logoff/lang/pt-BR.rc +++ b/base/applications/logoff/lang/pt-BR.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Finaliza uma sessão.\n\n\ diff --git a/base/applications/logoff/lang/ro-RO.rc b/base/applications/logoff/lang/ro-RO.rc index 38fd422e38c..3a85aa999b2 100644 --- a/base/applications/logoff/lang/ro-RO.rc +++ b/base/applications/logoff/lang/ro-RO.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Încheie o sesiune.\n\n\ diff --git a/base/applications/logoff/lang/ru-RU.rc b/base/applications/logoff/lang/ru-RU.rc index 1f18415a373..740d176526c 100644 --- a/base/applications/logoff/lang/ru-RU.rc +++ b/base/applications/logoff/lang/ru-RU.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Завершение сеанса.\n\n\ diff --git a/base/applications/logoff/lang/sk-SK.rc b/base/applications/logoff/lang/sk-SK.rc index 7976967d9cf..32a83caa7e2 100644 --- a/base/applications/logoff/lang/sk-SK.rc +++ b/base/applications/logoff/lang/sk-SK.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Ukončí sedenie.\n\n\ diff --git a/base/applications/logoff/lang/sv-SE.rc b/base/applications/logoff/lang/sv-SE.rc index 0f6468543ab..e17a7cf692a 100644 --- a/base/applications/logoff/lang/sv-SE.rc +++ b/base/applications/logoff/lang/sv-SE.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Avbryter en session.\n\n\ diff --git a/base/applications/logoff/lang/uk-UA.rc b/base/applications/logoff/lang/uk-UA.rc index dd916d2d1c2..c2b835b3ff2 100644 --- a/base/applications/logoff/lang/uk-UA.rc +++ b/base/applications/logoff/lang/uk-UA.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "Завершення сеансу.\n\n\ diff --git a/base/applications/logoff/lang/zh-CN.rc b/base/applications/logoff/lang/zh-CN.rc index 5cf0ee9ddd4..d93c5f33bf5 100644 --- a/base/applications/logoff/lang/zh-CN.rc +++ b/base/applications/logoff/lang/zh-CN.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "终止一个阶段。\n\n\ diff --git a/base/applications/logoff/lang/zh-TW.rc b/base/applications/logoff/lang/zh-TW.rc index 7398091fd72..904d38b4c7a 100644 --- a/base/applications/logoff/lang/zh-TW.rc +++ b/base/applications/logoff/lang/zh-TW.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "終止一個階段。\n\n\ diff --git a/base/applications/magnify/magnify.rc b/base/applications/magnify/magnify.rc index 28d81b1826b..ee55ba6c6ab 100644 --- a/base/applications/magnify/magnify.rc +++ b/base/applications/magnify/magnify.rc @@ -13,4 +13,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDI_ICON ICON "res/magnify.ico" +#include + #include "rsrc.rc" diff --git a/base/applications/mmc/console.c b/base/applications/mmc/console.c index 920a2473cb1..97c96ebdc0c 100644 --- a/base/applications/mmc/console.c +++ b/base/applications/mmc/console.c @@ -22,7 +22,6 @@ static const TCHAR szMMCMainFrame[] = TEXT("MMCMainFrame"); static const TCHAR szMMCChildFrm[] = TEXT("MMCChildFrm"); -static LONG MainFrameWndCount = 0; static ULONG NewConsoleCount = 0; static LPTSTR @@ -41,11 +40,16 @@ CreateNewConsoleTitle(VOID) return lpTitle; } + typedef struct _CONSOLE_MAINFRAME_WND { HWND hwnd; + HWND hwndMDIClient; + LPCTSTR lpConsoleTitle; - HMENU hMenuConsoleRoot; + HMENU hMenuConsoleSmall; + HMENU hMenuConsoleLarge; + INT nConsoleCount; union { DWORD Flags; @@ -56,6 +60,173 @@ typedef struct _CONSOLE_MAINFRAME_WND }; } CONSOLE_MAINFRAME_WND, *PCONSOLE_MAINFRAME_WND; + +HWND +CreateNewMDIChild(PCONSOLE_MAINFRAME_WND Info, + HWND hwndMDIClient) +{ + MDICREATESTRUCT mcs; + HWND hChild; + + mcs.szTitle = CreateNewConsoleTitle(); + mcs.szClass = szMMCChildFrm; + mcs.hOwner = GetModuleHandle(NULL); + mcs.x = mcs.cx = CW_USEDEFAULT; + mcs.y = mcs.cy = CW_USEDEFAULT; + mcs.style = MDIS_ALLCHILDSTYLES; + + hChild = (HWND)SendMessage(hwndMDIClient, WM_MDICREATE, 0, (LONG)&mcs); + if (hChild) + { + Info->nConsoleCount++; + } + + return hChild; +} + + +static LRESULT +FrameOnCreate(HWND hwnd, + LPARAM lParam) +{ + PCONSOLE_MAINFRAME_WND Info; + CLIENTCREATESTRUCT ccs; + LPCTSTR lpFileName = (LPCTSTR)(((LPCREATESTRUCT)lParam)->lpCreateParams); + + Info = HeapAlloc(hAppHeap, + 0, + sizeof(CONSOLE_MAINFRAME_WND)); + if (Info == NULL) + return -1; + + ZeroMemory(Info, + sizeof(CONSOLE_MAINFRAME_WND)); + + Info->hwnd = hwnd; + + SetWindowLongPtr(hwnd, + 0, + (LONG_PTR)Info); + + Info->hMenuConsoleSmall = LoadMenu(hAppInstance, + MAKEINTRESOURCE(IDM_CONSOLE_SMALL)); + + Info->hMenuConsoleLarge = LoadMenu(hAppInstance, + MAKEINTRESOURCE(IDM_CONSOLE_LARGE)); + + if (lpFileName == NULL) + { + /* FIXME */ + Info->AppAuthorMode = TRUE; + Info->lpConsoleTitle = TEXT("ReactOS Management Console"); + } + else + { + Info->AppAuthorMode = TRUE; + Info->lpConsoleTitle = CreateNewConsoleTitle(); + } + + SetMenu(Info->hwnd, + Info->hMenuConsoleSmall); + + SetWindowText(Info->hwnd, + Info->lpConsoleTitle); + + ccs.hWindowMenu = GetSubMenu(Info->hMenuConsoleLarge, 1); + ccs.idFirstChild = IDM_MDI_FIRSTCHILD; + + /* Create the MDI client window */ + hwndMDIClient = CreateWindowEx(WS_EX_CLIENTEDGE, + L"MDICLIENT", + (LPCTSTR)NULL, + WS_CHILD | WS_CLIPCHILDREN | WS_VSCROLL | WS_HSCROLL | WS_VISIBLE | WS_BORDER, + CW_USEDEFAULT, + CW_USEDEFAULT, + CW_USEDEFAULT, + CW_USEDEFAULT, + hwnd, + (HMENU)0xCAC, + hAppInstance, + (LPVOID)&ccs); + + ShowWindow(Info->hwndMDIClient, SW_SHOW); + + return 0; +} + + +static VOID +FrameOnCommand(HWND hwnd, + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + PCONSOLE_MAINFRAME_WND Info; + HWND hChild; + + Info = (PCONSOLE_MAINFRAME_WND)GetWindowLongPtr(hwnd, 0); + + switch (LOWORD(wParam)) + { + case IDM_FILE_NEW: + CreateNewMDIChild(Info, hwndMDIClient); + SetMenu(Info->hwnd, + Info->hMenuConsoleLarge); + break; + + case IDM_FILE_EXIT: + PostMessage(hwnd, WM_CLOSE, 0, 0); + break; + + default: + if (LOWORD(wParam) >= IDM_MDI_FIRSTCHILD) + { + DefFrameProc(hwnd, hwndMDIClient, uMsg, wParam, lParam); + } + else + { + hChild = (HWND)SendMessage(hwndMDIClient, WM_MDIGETACTIVE, 0, 0); + if (hChild) + { + SendMessage(hChild, WM_COMMAND, wParam, lParam); + } + } + break; + } +} + + +static VOID +FrameOnSize(HWND hMainWnd, + WORD cx, + WORD cy) +{ + RECT rcClient; //, rcTool, rcStatus; +// int lvHeight, iToolHeight, iStatusHeight; + + /* Size toolbar and get height */ +// SendMessage(Info->hTool, TB_AUTOSIZE, 0, 0); +// GetWindowRect(Info->hTool, &rcTool); +// iToolHeight = rcTool.bottom - rcTool.top; + + /* Size status bar and get height */ +// SendMessage(Info->hStatus, WM_SIZE, 0, 0); +// GetWindowRect(Info->hStatus, &rcStatus); +// iStatusHeight = rcStatus.bottom - rcStatus.top; + + /* Calculate remaining height and size list view */ + GetClientRect(hMainWnd, &rcClient); +// lvHeight = rcClient.bottom - iToolHeight - iStatusHeight; + SetWindowPos(hwndMDIClient, //Info->hTreeView, + NULL, + 0, + 0, //iToolHeight, + rcClient.right, + rcClient.bottom, //lvHeight, + SWP_NOZORDER); +} + + static LRESULT CALLBACK ConsoleMainFrameWndProc(IN HWND hwnd, IN UINT uMsg, @@ -63,112 +234,80 @@ ConsoleMainFrameWndProc(IN HWND hwnd, IN LPARAM lParam) { PCONSOLE_MAINFRAME_WND Info; - LRESULT Ret = FALSE; Info = (PCONSOLE_MAINFRAME_WND)GetWindowLongPtr(hwnd, 0); - if (Info != NULL || uMsg == WM_NCCREATE) + switch (uMsg) { - switch (uMsg) - { - case WM_COMMAND: + case WM_CREATE: + return FrameOnCreate(hwnd, + lParam); + + case WM_COMMAND: + FrameOnCommand(hwnd, + uMsg, + wParam, + lParam); + break; + + case WM_SIZE: + FrameOnSize(hwnd, + LOWORD(lParam), + HIWORD(lParam)); + break; + + case WM_CLOSE: + DestroyWindow(hwnd); + break; + + case WM_DESTROY: + if (Info != NULL) { - switch (LOWORD(wParam)) - { - case ID_FILE_EXIT: - PostMessage(hwnd, - WM_CLOSE, - 0, - 0); - break; - } - break; - } - - case WM_NCCREATE: - { - MainFrameWndCount++; - - Info = HeapAlloc(hAppHeap, - 0, - sizeof(*Info)); - if (Info != NULL) - { - ZeroMemory(Info, - sizeof(*Info)); - - Info->hwnd = hwnd; - - SetWindowLongPtr(hwnd, - 0, - (LONG_PTR)Info); - - Info->hMenuConsoleRoot = LoadMenu(hAppInstance, - MAKEINTRESOURCE(IDM_CONSOLEROOT)); - Ret = TRUE; - } - break; - } - - case WM_CREATE: - { - LPCTSTR lpFileName = (LPCTSTR)(((LPCREATESTRUCT)lParam)->lpCreateParams); - - if (lpFileName != NULL) - { - /* FIXME */ - } - else - { - Info->AppAuthorMode = TRUE; - Info->lpConsoleTitle = CreateNewConsoleTitle(); - } - - SetWindowText(Info->hwnd, - Info->lpConsoleTitle); - break; - } - - case WM_NCDESTROY: SetMenu(Info->hwnd, NULL); - if (Info->hMenuConsoleRoot != NULL) + if (Info->hMenuConsoleSmall != NULL) { - DestroyMenu(Info->hMenuConsoleRoot); - Info->hMenuConsoleRoot = NULL; + DestroyMenu(Info->hMenuConsoleSmall); + Info->hMenuConsoleSmall = NULL; + } + + if (Info->hMenuConsoleLarge != NULL) + { + DestroyMenu(Info->hMenuConsoleLarge); + Info->hMenuConsoleLarge = NULL; } HeapFree(hAppHeap, 0, Info); + } - if (--MainFrameWndCount == 0) - PostQuitMessage(0); - break; + PostQuitMessage(0); + break; + case WM_USER_CLOSE_CHILD: + Info->nConsoleCount--; + if (Info->nConsoleCount == 0) + { + SetMenu(Info->hwnd, + Info->hMenuConsoleSmall); + } + break; - case WM_CLOSE: - DestroyWindow(hwnd); - break; - - default: - goto HandleDefaultMsg; - } - } - else - { -HandleDefaultMsg: - Ret = DefWindowProc(hwnd, - uMsg, - wParam, - lParam); + default: + return DefFrameProc(hwnd, + hwndMDIClient, + uMsg, + wParam, + lParam); } - return Ret; + return 0; } + typedef struct _CONSOLE_CHILDFRM_WND { HWND hwnd; @@ -182,65 +321,52 @@ ConsoleChildFrmProc(IN HWND hwnd, IN LPARAM lParam) { PCONSOLE_CHILDFRM_WND Info; - LRESULT Ret = FALSE; Info = (PCONSOLE_CHILDFRM_WND)GetWindowLongPtr(hwnd, 0); - if (Info != NULL || uMsg == WM_NCCREATE) + switch (uMsg) { - switch (uMsg) - { - case WM_NCCREATE: - Info = HeapAlloc(hAppHeap, + case WM_CREATE: + Info = HeapAlloc(hAppHeap, + 0, + sizeof(CONSOLE_CHILDFRM_WND)); + if (Info != NULL) + { + ZeroMemory(Info, + sizeof(CONSOLE_CHILDFRM_WND)); + + Info->hwnd = hwnd; + + SetWindowLongPtr(hwnd, 0, - sizeof(*Info)); - if (Info != NULL) - { - ZeroMemory(Info, - sizeof(*Info)); + (LONG_PTR)Info); + } + break; - Info->hwnd = hwnd; + case WM_DESTROY: + if (Info != NULL) + HeapFree(hAppHeap, 0, Info); - SetWindowLongPtr(hwnd, - 0, - (LONG_PTR)Info); + PostMessage(hwndMainConsole, WM_USER_CLOSE_CHILD, 0, 0); + break; - Ret = TRUE; - } - break; - - - case WM_NCDESTROY: - HeapFree(hAppHeap, - 0, - Info); - break; - - default: - goto HandleDefaultMsg; - } - } - else - { -HandleDefaultMsg: - Ret = DefWindowProc(hwnd, - uMsg, - wParam, - lParam); + default: + return DefMDIChildProc(hwnd, uMsg, wParam, lParam); } - return Ret; - + return 0; } + BOOL RegisterMMCWndClasses(VOID) { - WNDCLASS wc; + WNDCLASSEX wc = {0}; BOOL Ret; /* Register the MMCMainFrame window class */ + wc.cbSize = sizeof(WNDCLASSEX); wc.style = 0; wc.lpfnWndProc = ConsoleMainFrameWndProc; wc.cbClsExtra = 0; @@ -254,15 +380,25 @@ RegisterMMCWndClasses(VOID) wc.lpszMenuName = NULL; wc.lpszClassName = szMMCMainFrame; - Ret = (RegisterClass(&wc) != (ATOM)0); + Ret = (RegisterClassEx(&wc) != (ATOM)0); + if (Ret) { /* Register the MMCChildFrm window class */ + wc.cbSize = sizeof(WNDCLASSEX); + wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = ConsoleChildFrmProc; + wc.cbClsExtra = 0; wc.cbWndExtra = sizeof(PCONSOLE_CHILDFRM_WND); + wc.hInstance = hAppInstance; + wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); + wc.hCursor = LoadCursor(NULL, IDC_ARROW); + wc.hbrBackground = (HBRUSH)(COLOR_3DFACE+1); + wc.lpszMenuName = NULL; wc.lpszClassName = szMMCChildFrm; + wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION); - Ret = (RegisterClass(&wc) != (ATOM)0); + Ret = (RegisterClassEx(&wc) != (ATOM)0); if (!Ret) { UnregisterClass(szMMCMainFrame, @@ -283,7 +419,8 @@ UnregisterMMCWndClasses(VOID) } HWND -CreateConsoleWindow(IN LPCTSTR lpFileName OPTIONAL) +CreateConsoleWindow(IN LPCTSTR lpFileName OPTIONAL, + int nCmdShow) { HWND hWndConsole; LONG_PTR FileName = (LONG_PTR)lpFileName; @@ -291,7 +428,7 @@ CreateConsoleWindow(IN LPCTSTR lpFileName OPTIONAL) hWndConsole = CreateWindowEx(WS_EX_WINDOWEDGE, szMMCMainFrame, NULL, - WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS, + WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, @@ -303,8 +440,7 @@ CreateConsoleWindow(IN LPCTSTR lpFileName OPTIONAL) if (hWndConsole != NULL) { - ShowWindow(hWndConsole, - SW_SHOWDEFAULT); + ShowWindow(hWndConsole, nCmdShow); } return hWndConsole; diff --git a/base/applications/mmc/lang/bg-BG.rc b/base/applications/mmc/lang/bg-BG.rc index 762d8b8d09a..7f2d7875926 100644 --- a/base/applications/mmc/lang/bg-BG.rc +++ b/base/applications/mmc/lang/bg-BG.rc @@ -1,20 +1,41 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "&Файл" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "Из&ход\tAlt+F4", ID_FILE_EXIT + MENUITEM "Из&ход\tAlt+F4", IDM_FILE_EXIT END POPUP "Помо&щ" BEGIN - MENUITEM "&За Прибора за управление на РеактОС...", ID_HELP_ABOUT + MENUITEM "&За Прибора за управление на РеактОС...", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "&Файл" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "Из&ход\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "Помо&щ" + BEGIN + MENUITEM "&За Прибора за управление на РеактОС...", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "Прибор за управление на РеактОС" IDS_CONSOLETITLE "Прибор%1!u!" diff --git a/base/applications/mmc/lang/ca-ES.rc b/base/applications/mmc/lang/ca-ES.rc index 65be480ad66..503bc3a2125 100644 --- a/base/applications/mmc/lang/ca-ES.rc +++ b/base/applications/mmc/lang/ca-ES.rc @@ -1,20 +1,41 @@ LANGUAGE LANG_CATALAN, SUBLANG_DEFAULT -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "&Fitxer" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "&Sortida\tAlt+F4", ID_FILE_EXIT + MENUITEM "&Sortida\tAlt+F4", IDM_FILE_EXIT END POPUP "&Ajuda" BEGIN - MENUITEM "&En quant a Consola d'administracio de ReactOS...", ID_HELP_ABOUT + MENUITEM "&En quant a Consola d'administracio de ReactOS...", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "&Fitxer" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "&Sortida\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "&Ajuda" + BEGIN + MENUITEM "&En quant a Consola d'administracio de ReactOS...", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "Consola d'administracio de ReactOS" IDS_CONSOLETITLE "Consola%1!u!" diff --git a/base/applications/mmc/lang/cs-CZ.rc b/base/applications/mmc/lang/cs-CZ.rc index 25f794d2761..1977f073ff8 100644 --- a/base/applications/mmc/lang/cs-CZ.rc +++ b/base/applications/mmc/lang/cs-CZ.rc @@ -5,21 +5,42 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "&Soubor" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "Uk&ončit\tAlt+F4", ID_FILE_EXIT + MENUITEM "Uk&ončit\tAlt+F4", IDM_FILE_EXIT END POPUP "&Nápověda" BEGIN - MENUITEM "&O konzoli řízení systému ReactOS...", ID_HELP_ABOUT + MENUITEM "&O konzoli řízení systému ReactOS...", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "&Soubor" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "Uk&ončit\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "&Nápověda" + BEGIN + MENUITEM "&O konzoli řízení systému ReactOS...", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "Konzole řízení systému ReactOS" IDS_CONSOLETITLE "Konzole%1!u!" diff --git a/base/applications/mmc/lang/de-DE.rc b/base/applications/mmc/lang/de-DE.rc index bcd9b78890c..394f76176d8 100644 --- a/base/applications/mmc/lang/de-DE.rc +++ b/base/applications/mmc/lang/de-DE.rc @@ -1,20 +1,42 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "&Datei" BEGIN + MENUITEM "Neu\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "B&eenden\tAlt+F4", ID_FILE_EXIT + MENUITEM "B&eenden\tAlt+F4", IDM_FILE_EXIT END POPUP "&Hilfe" BEGIN - MENUITEM "Ü&ber ReactOS Management Console...", ID_HELP_ABOUT + MENUITEM "Ü&ber ReactOS Management Console...", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "&Datei" + BEGIN + MENUITEM "Neu\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "B&eenden\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Fenster" + BEGIN + MENUITEM "Liste", IDM_WINDOWS_LIST + END + + POPUP "&Hilfe" + BEGIN + MENUITEM "Ü&ber ReactOS Management Console...", IDM_HELP_ABOUT + END +END + + +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS Management Console" IDS_CONSOLETITLE "Console%1!u!" diff --git a/base/applications/mmc/lang/el-GR.rc b/base/applications/mmc/lang/el-GR.rc index ad0310b39fe..f49dd6c6b1d 100644 --- a/base/applications/mmc/lang/el-GR.rc +++ b/base/applications/mmc/lang/el-GR.rc @@ -1,20 +1,41 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "&Αρχείο" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "Έ&ξοδος\tAlt+F4", ID_FILE_EXIT + MENUITEM "Έ&ξοδος\tAlt+F4", IDM_FILE_EXIT END POPUP "&Βοήθεια" BEGIN - MENUITEM "&Σχετικά με την Κονσόλα Διαχείρισης του ReactOS...", ID_HELP_ABOUT + MENUITEM "&Σχετικά με την Κονσόλα Διαχείρισης του ReactOS...", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "&Αρχείο" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "Έ&ξοδος\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "&Βοήθεια" + BEGIN + MENUITEM "&Σχετικά με την Κονσόλα Διαχείρισης του ReactOS...", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "Κονσόλα Διαχείρισης του ReactOS" IDS_CONSOLETITLE "Κονσόλα%1!u!" diff --git a/base/applications/mmc/lang/en-US.rc b/base/applications/mmc/lang/en-US.rc index 3d0052fd31a..55d017dc502 100644 --- a/base/applications/mmc/lang/en-US.rc +++ b/base/applications/mmc/lang/en-US.rc @@ -1,20 +1,41 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "&File" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "E&xit\tAlt+F4", ID_FILE_EXIT + MENUITEM "E&xit\tAlt+F4", IDM_FILE_EXIT END POPUP "&Help" BEGIN - MENUITEM "&About ReactOS Management Console...", ID_HELP_ABOUT + MENUITEM "&About ReactOS Management Console...", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "E&xit\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "&Help" + BEGIN + MENUITEM "&About ReactOS Management Console...", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS Management Console" IDS_CONSOLETITLE "Console%1!u!" diff --git a/base/applications/mmc/lang/es-ES.rc b/base/applications/mmc/lang/es-ES.rc index a2d06193725..867f269cad7 100644 --- a/base/applications/mmc/lang/es-ES.rc +++ b/base/applications/mmc/lang/es-ES.rc @@ -5,21 +5,42 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "&Archivo" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "Sa&lir\tAlt+F4", ID_FILE_EXIT + MENUITEM "Sa&lir\tAlt+F4", IDM_FILE_EXIT END POPUP "&Ayuda" BEGIN - MENUITEM "&Acerca de la Consola de Administración de ReactOS...", ID_HELP_ABOUT + MENUITEM "&Acerca de la Consola de Administración de ReactOS...", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "&Archivo" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "Sa&lir\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "&Ayuda" + BEGIN + MENUITEM "&Acerca de la Consola de Administración de ReactOS...", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "Consola de Administración de ReactOS" IDS_CONSOLETITLE "Consola%1!u!" diff --git a/base/applications/mmc/lang/fr-FR.rc b/base/applications/mmc/lang/fr-FR.rc index 0e33a605e3b..ad35a2e9e31 100644 --- a/base/applications/mmc/lang/fr-FR.rc +++ b/base/applications/mmc/lang/fr-FR.rc @@ -1,20 +1,41 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "&Fichier" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "Quitter\tAlt+F4", ID_FILE_EXIT + MENUITEM "Quitter\tAlt+F4", IDM_FILE_EXIT END POPUP "Aide" BEGIN - MENUITEM "À propos de l&a Console de Gestion ReactOS...", ID_HELP_ABOUT + MENUITEM "À propos de l&a Console de Gestion ReactOS...", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "&Fichier" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "Quitter\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "Aide" + BEGIN + MENUITEM "À propos de l&a Console de Gestion ReactOS...", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "Console de Gestion ReactOS" IDS_CONSOLETITLE "Console%1!u!" diff --git a/base/applications/mmc/lang/he-IL.rc b/base/applications/mmc/lang/he-IL.rc index 588dde9530a..4ce64e3da95 100644 --- a/base/applications/mmc/lang/he-IL.rc +++ b/base/applications/mmc/lang/he-IL.rc @@ -1,20 +1,41 @@ LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "&קובץ" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "&יציאה\tAlt+F4", ID_FILE_EXIT + MENUITEM "&יציאה\tAlt+F4", IDM_FILE_EXIT END POPUP "&עזרה" BEGIN - MENUITEM "&אודות ReactOS Management Console...", ID_HELP_ABOUT + MENUITEM "&אודות ReactOS Management Console...", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "&קובץ" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "&יציאה\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "&עזרה" + BEGIN + MENUITEM "&אודות ReactOS Management Console...", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS Management Console" IDS_CONSOLETITLE "Console%1!u!" diff --git a/base/applications/mmc/lang/it-IT.rc b/base/applications/mmc/lang/it-IT.rc index 0c078ff3832..64d3f5ecd52 100644 --- a/base/applications/mmc/lang/it-IT.rc +++ b/base/applications/mmc/lang/it-IT.rc @@ -1,20 +1,41 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "&File" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "E&sci\tAlt+F4", ID_FILE_EXIT + MENUITEM "E&sci\tAlt+F4", IDM_FILE_EXIT END POPUP "&Aiuto" BEGIN - MENUITEM "&Informazioni su ReactOS Management Console...", ID_HELP_ABOUT + MENUITEM "&Informazioni su ReactOS Management Console...", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "E&sci\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "&Aiuto" + BEGIN + MENUITEM "&Informazioni su ReactOS Management Console...", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS Management Console" IDS_CONSOLETITLE "Console%1!u!" diff --git a/base/applications/mmc/lang/ko-KR.rc b/base/applications/mmc/lang/ko-KR.rc index d4fd68b8182..90f17c8574d 100644 --- a/base/applications/mmc/lang/ko-KR.rc +++ b/base/applications/mmc/lang/ko-KR.rc @@ -4,21 +4,42 @@ LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "파일(&F)" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "종료(&E)\tAlt+F4", ID_FILE_EXIT + MENUITEM "종료(&E)\tAlt+F4", IDM_FILE_EXIT END POPUP "도움말(&H)" BEGIN - MENUITEM "ReactOS 관리 콘솔에 대하여...(&A)", ID_HELP_ABOUT + MENUITEM "ReactOS 관리 콘솔에 대하여...(&A)", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "파일(&F)" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "종료(&E)\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "도움말(&H)" + BEGIN + MENUITEM "ReactOS 관리 콘솔에 대하여...(&A)", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS 관리 콘솔" IDS_CONSOLETITLE "Console%1!u!" diff --git a/base/applications/mmc/lang/lt-LT.rc b/base/applications/mmc/lang/lt-LT.rc index 358630c7bcf..370934890fe 100644 --- a/base/applications/mmc/lang/lt-LT.rc +++ b/base/applications/mmc/lang/lt-LT.rc @@ -2,21 +2,42 @@ LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "&Byla" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "&Baigti\tAlt+F4", ID_FILE_EXIT + MENUITEM "&Baigti\tAlt+F4", IDM_FILE_EXIT END POPUP "&Pagalba" BEGIN - MENUITEM "&Apie ReactOS Valdymo Pultą...", ID_HELP_ABOUT + MENUITEM "&Apie ReactOS Valdymo Pultą...", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "&Byla" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "&Baigti\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "&Pagalba" + BEGIN + MENUITEM "&Apie ReactOS Valdymo Pultą...", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS Valdymo Pultas" IDS_CONSOLETITLE "Pultas%1!u!" diff --git a/base/applications/mmc/lang/no-NO.rc b/base/applications/mmc/lang/no-NO.rc index 95e53610f70..b748ae10678 100644 --- a/base/applications/mmc/lang/no-NO.rc +++ b/base/applications/mmc/lang/no-NO.rc @@ -1,20 +1,41 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "&Fil" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "&Avslutt\tAlt+F4", ID_FILE_EXIT + MENUITEM "&Avslutt\tAlt+F4", IDM_FILE_EXIT END POPUP "&Hjelp" BEGIN - MENUITEM "&Om ReactOS Management Console...", ID_HELP_ABOUT + MENUITEM "&Om ReactOS Management Console...", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "&Fil" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "&Avslutt\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "&Hjelp" + BEGIN + MENUITEM "&Om ReactOS Management Console...", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS Management Console" IDS_CONSOLETITLE "Konsoll%1!u!" diff --git a/base/applications/mmc/lang/pl-PL.rc b/base/applications/mmc/lang/pl-PL.rc index dba2f6a5060..d453570da37 100644 --- a/base/applications/mmc/lang/pl-PL.rc +++ b/base/applications/mmc/lang/pl-PL.rc @@ -7,21 +7,42 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "Pl&ik" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "Za&kończ\tAlt+F4", ID_FILE_EXIT + MENUITEM "Za&kończ\tAlt+F4", IDM_FILE_EXIT END POPUP "&Pomoc" BEGIN - MENUITEM "Konsola Zarządzania ReactOS - i&nformacje...", ID_HELP_ABOUT + MENUITEM "Konsola Zarządzania ReactOS - i&nformacje...", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "Pl&ik" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "Za&kończ\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "&Pomoc" + BEGIN + MENUITEM "Konsola Zarządzania ReactOS - i&nformacje...", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "Konsola Zarządzania ReactOS" IDS_CONSOLETITLE "Konsola%1!u!" diff --git a/base/applications/mmc/lang/pt-BR.rc b/base/applications/mmc/lang/pt-BR.rc index b0eac4377db..2f0b2ef54f6 100644 --- a/base/applications/mmc/lang/pt-BR.rc +++ b/base/applications/mmc/lang/pt-BR.rc @@ -1,20 +1,41 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "&Arquivo" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "Sai&r\tAlt+F4", ID_FILE_EXIT + MENUITEM "Sai&r\tAlt+F4", IDM_FILE_EXIT END POPUP "Aj&uda" BEGIN - MENUITEM "&Sobre o Console de gerenciamento ReactOS...", ID_HELP_ABOUT + MENUITEM "&Sobre o Console de gerenciamento ReactOS...", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "&Arquivo" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "Sai&r\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "Aj&uda" + BEGIN + MENUITEM "&Sobre o Console de gerenciamento ReactOS...", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "Console de gerenciamento ReactOS" IDS_CONSOLETITLE "Console%1!u!" diff --git a/base/applications/mmc/lang/ro-RO.rc b/base/applications/mmc/lang/ro-RO.rc index f77beb68810..2324440ef8e 100644 --- a/base/applications/mmc/lang/ro-RO.rc +++ b/base/applications/mmc/lang/ro-RO.rc @@ -7,21 +7,42 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "&Fișier" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "I&eșire\tAlt+F4", ID_FILE_EXIT + MENUITEM "I&eșire\tAlt+F4", IDM_FILE_EXIT END POPUP "&?" BEGIN - MENUITEM "&Despre…", ID_HELP_ABOUT + MENUITEM "&Despre…", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "&Fișier" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "I&eșire\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "&?" + BEGIN + MENUITEM "&Despre…", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "Consola de gestiune ReactOS" IDS_CONSOLETITLE "Consola%1!u!" diff --git a/base/applications/mmc/lang/ru-RU.rc b/base/applications/mmc/lang/ru-RU.rc index 1602e37974c..a303af8a03d 100644 --- a/base/applications/mmc/lang/ru-RU.rc +++ b/base/applications/mmc/lang/ru-RU.rc @@ -2,21 +2,42 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "&Файл" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "&Выход\tAlt+F4", ID_FILE_EXIT + MENUITEM "&Выход\tAlt+F4", IDM_FILE_EXIT END POPUP "&Справка" BEGIN - MENUITEM "&О программе...", ID_HELP_ABOUT + MENUITEM "&О программе...", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "&Файл" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "&Выход\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "&Справка" + BEGIN + MENUITEM "&О программе...", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "Консоль управления ReactOS" IDS_CONSOLETITLE "Console%1!u!" diff --git a/base/applications/mmc/lang/sk-SK.rc b/base/applications/mmc/lang/sk-SK.rc index d47715cf9bb..d5ac100d0ae 100644 --- a/base/applications/mmc/lang/sk-SK.rc +++ b/base/applications/mmc/lang/sk-SK.rc @@ -8,21 +8,42 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "&Súbor" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "&Skončiť\tAlt+F4", ID_FILE_EXIT + MENUITEM "&Skončiť\tAlt+F4", IDM_FILE_EXIT END POPUP "&Pomocník" BEGIN - MENUITEM "Č&o je Konzola na správu systému ReactOS", ID_HELP_ABOUT + MENUITEM "Č&o je Konzola na správu systému ReactOS", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "&Súbor" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "&Skončiť\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "&Pomocník" + BEGIN + MENUITEM "Č&o je Konzola na správu systému ReactOS", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "Konzola na správu systému ReactOS" IDS_CONSOLETITLE "Konzola%1!u!" diff --git a/base/applications/mmc/lang/sv-SE.rc b/base/applications/mmc/lang/sv-SE.rc index 60fe4c8c0a3..d4b8461bb8d 100644 --- a/base/applications/mmc/lang/sv-SE.rc +++ b/base/applications/mmc/lang/sv-SE.rc @@ -7,21 +7,42 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "&Arkiv" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "&Avsluta\tAlt+F4", ID_FILE_EXIT + MENUITEM "&Avsluta\tAlt+F4", IDM_FILE_EXIT END POPUP "&Hjälp" BEGIN - MENUITEM "&Om ReactOS Management Console...", ID_HELP_ABOUT + MENUITEM "&Om ReactOS Management Console...", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "&Arkiv" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "&Avsluta\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "&Hjälp" + BEGIN + MENUITEM "&Om ReactOS Management Console...", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS Management Console" IDS_CONSOLETITLE "Konsoll%1!u!" diff --git a/base/applications/mmc/lang/tr-TR.rc b/base/applications/mmc/lang/tr-TR.rc index e669b0027fb..4f227b9a410 100644 --- a/base/applications/mmc/lang/tr-TR.rc +++ b/base/applications/mmc/lang/tr-TR.rc @@ -1,24 +1,45 @@ /* - * TRANSLATORS: 2013 - Erdem Ersoy (eersoy93) (erdemersoy@live.com) + * TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) (erdemersoy@live.com) */ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "&Kütük" BEGIN + MENUITEM "&Yeni\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "&Çıkış\tAlt+F4", ID_FILE_EXIT + MENUITEM "&Çıkış\tAlt+F4", IDM_FILE_EXIT END POPUP "&Yardım" BEGIN - MENUITEM "&Hakkında...", ID_HELP_ABOUT + MENUITEM "&Hakkında...", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "&Kütük" + BEGIN + MENUITEM "&Yeni\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "&Çıkış\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Pencereler" + BEGIN + MENUITEM "&Dizelgele", IDM_WINDOWS_LIST + END + + POPUP "&Yardım" + BEGIN + MENUITEM "&Hakkında...", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "Yönetim Konsolu" IDS_CONSOLETITLE "Konsol%1!u!" diff --git a/base/applications/mmc/lang/uk-UA.rc b/base/applications/mmc/lang/uk-UA.rc index a09ce90e417..8082fb2e824 100644 --- a/base/applications/mmc/lang/uk-UA.rc +++ b/base/applications/mmc/lang/uk-UA.rc @@ -8,21 +8,42 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "&Файл" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "В&ихід\tAlt+F4", ID_FILE_EXIT + MENUITEM "В&ихід\tAlt+F4", IDM_FILE_EXIT END POPUP "&Довідка" BEGIN - MENUITEM "&Про консоль керування ReactOS...", ID_HELP_ABOUT + MENUITEM "&Про консоль керування ReactOS...", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "&Файл" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "В&ихід\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "&Довідка" + BEGIN + MENUITEM "&Про консоль керування ReactOS...", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "Консоль керування ReactOS" IDS_CONSOLETITLE "Консоль%1!u!" diff --git a/base/applications/mmc/lang/zh-CN.rc b/base/applications/mmc/lang/zh-CN.rc index da35e1f93eb..33a488c33d1 100644 --- a/base/applications/mmc/lang/zh-CN.rc +++ b/base/applications/mmc/lang/zh-CN.rc @@ -8,21 +8,42 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "档案(&F)" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "结束(&X)\tAlt+F4", ID_FILE_EXIT + MENUITEM "结束(&X)\tAlt+F4", IDM_FILE_EXIT END POPUP "帮助(&H)" BEGIN - MENUITEM "关于 ReactOS 控制台(&A)...", ID_HELP_ABOUT + MENUITEM "关于 ReactOS 控制台(&A)...", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "档案(&F)" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "结束(&X)\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "帮助(&H)" + BEGIN + MENUITEM "关于 ReactOS 控制台(&A)...", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS 控制台" IDS_CONSOLETITLE "控制台%1!u!" diff --git a/base/applications/mmc/lang/zh-TW.rc b/base/applications/mmc/lang/zh-TW.rc index 4003657c1d2..5e981446ed8 100644 --- a/base/applications/mmc/lang/zh-TW.rc +++ b/base/applications/mmc/lang/zh-TW.rc @@ -8,21 +8,42 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL -IDM_CONSOLEROOT MENU DISCARDABLE +IDM_CONSOLE_SMALL MENU BEGIN POPUP "檔案(&F)" BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW MENUITEM SEPARATOR - MENUITEM "結束(&X)\tAlt+F4", ID_FILE_EXIT + MENUITEM "結束(&X)\tAlt+F4", IDM_FILE_EXIT END POPUP "說明(&H)" BEGIN - MENUITEM "關於 ReactOS 控制台(&A)...", ID_HELP_ABOUT + MENUITEM "關於 ReactOS 控制台(&A)...", IDM_HELP_ABOUT END END -STRINGTABLE DISCARDABLE +IDM_CONSOLE_LARGE MENU +BEGIN + POPUP "檔案(&F)" + BEGIN + MENUITEM "New\tStrg+N", IDM_FILE_NEW + MENUITEM SEPARATOR + MENUITEM "結束(&X)\tAlt+F4", IDM_FILE_EXIT + END + + POPUP "&Windows" + BEGIN + MENUITEM "List", IDM_WINDOWS_LIST + END + + POPUP "說明(&H)" + BEGIN + MENUITEM "關於 ReactOS 控制台(&A)...", IDM_HELP_ABOUT + END +END + +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS 控制台" IDS_CONSOLETITLE "控制台%1!u!" diff --git a/base/applications/mmc/mmc.c b/base/applications/mmc/mmc.c index 19ce1f29f29..fb1efebd5d2 100644 --- a/base/applications/mmc/mmc.c +++ b/base/applications/mmc/mmc.c @@ -21,16 +21,19 @@ HINSTANCE hAppInstance; HANDLE hAppHeap; +HWND hwndMainConsole; +HWND hwndMDIClient; -int -_tmain(IN int argc, - IN const TCHAR *argv[]) + +int WINAPI +_tWinMain(HINSTANCE hInstance, + HINSTANCE hPrevInstance, + LPTSTR lpCmdLine, + int nCmdShow) { - HWND hMainConsole; MSG Msg; - BOOL bRet; - hAppInstance = GetModuleHandle(NULL); + hAppInstance = hInstance; // GetModuleHandle(NULL); hAppHeap = GetProcessHeap(); InitCommonControls(); @@ -41,25 +44,20 @@ _tmain(IN int argc, return 1; } - hMainConsole = CreateConsoleWindow(argc > 1 ? argv[1] : NULL); - if (hMainConsole != NULL) + hwndMainConsole = CreateConsoleWindow(NULL /*argc > 1 ? argv[1] : NULL*/, nCmdShow); + if (hwndMainConsole != NULL) { - for (;;) + while (GetMessage(&Msg, NULL, 0, 0)) { - bRet = GetMessage(&Msg, - NULL, - 0, - 0); - if (bRet != 0 && bRet != -1) + if (!TranslateMDISysAccel(hwndMDIClient, &Msg)) { TranslateMessage(&Msg); DispatchMessage(&Msg); } - else if (bRet == 0) - break; } } UnregisterMMCWndClasses(); + return 0; } diff --git a/base/applications/mmc/mmc.rc b/base/applications/mmc/mmc.rc index 7e240ca8fd0..de078dec370 100644 --- a/base/applications/mmc/mmc.rc +++ b/base/applications/mmc/mmc.rc @@ -9,6 +9,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -IDI_MAINAPP ICON DISCARDABLE resources/mmc.ico +IDI_MAINAPP ICON resources/mmc.ico #include "rsrc.rc" diff --git a/base/applications/mmc/precomp.h b/base/applications/mmc/precomp.h index 0d08e9fa1df..4ae294c0c39 100644 --- a/base/applications/mmc/precomp.h +++ b/base/applications/mmc/precomp.h @@ -7,6 +7,9 @@ #include "resource.h" +#define WM_USER_CLOSE_CHILD (WM_USER + 1) + + /* console.c */ BOOL @@ -16,7 +19,8 @@ VOID UnregisterMMCWndClasses(VOID); HWND -CreateConsoleWindow(IN LPCTSTR lpFileName OPTIONAL); +CreateConsoleWindow(IN LPCTSTR lpFileName OPTIONAL, + int nCmdShow); /* misc.c */ @@ -34,3 +38,5 @@ LoadAndFormatString(IN HINSTANCE hInstance, extern HINSTANCE hAppInstance; extern HANDLE hAppHeap; +extern HWND hwndMainConsole; +extern HWND hwndMDIClient; diff --git a/base/applications/mmc/resource.h b/base/applications/mmc/resource.h index 65fbe6eac65..4c68b7d49b9 100644 --- a/base/applications/mmc/resource.h +++ b/base/applications/mmc/resource.h @@ -1,11 +1,17 @@ #pragma once -#define IDS_APPTITLE 101 +#define IDS_APPTITLE 101 #define IDS_CONSOLETITLE 102 -#define IDI_MAINAPP 101 +#define IDI_MAINAPP 101 -#define IDM_CONSOLEROOT 101 +#define IDM_CONSOLE_SMALL 1000 +#define IDM_CONSOLE_LARGE 1001 -#define ID_FILE_EXIT 1001 -#define ID_HELP_ABOUT 9001 +#define IDM_FILE_NEW 1002 +#define IDM_FILE_OPEN 1003 +#define IDM_FILE_EXIT 1010 +#define IDM_WINDOWS_LIST 2001 +#define IDM_HELP_ABOUT 9001 + +#define IDM_MDI_FIRSTCHILD 9500 diff --git a/base/applications/mplay32/lang/bg-BG.rc b/base/applications/mplay32/lang/bg-BG.rc index cb124363f53..40fd4415d90 100644 --- a/base/applications/mplay32/lang/bg-BG.rc +++ b/base/applications/mplay32/lang/bg-BG.rc @@ -18,7 +18,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Всички поддържани (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "Пускане" diff --git a/base/applications/mplay32/lang/cs-CZ.rc b/base/applications/mplay32/lang/cs-CZ.rc index 5de7fae3d7f..f45d1aa62fc 100644 --- a/base/applications/mplay32/lang/cs-CZ.rc +++ b/base/applications/mplay32/lang/cs-CZ.rc @@ -20,7 +20,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Všechny podporované (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "Přehrát" diff --git a/base/applications/mplay32/lang/de-DE.rc b/base/applications/mplay32/lang/de-DE.rc index 3c1dca97fcf..54c4539466b 100644 --- a/base/applications/mplay32/lang/de-DE.rc +++ b/base/applications/mplay32/lang/de-DE.rc @@ -15,7 +15,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Alle unterstützten (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "Wiedergabe" diff --git a/base/applications/mplay32/lang/en-US.rc b/base/applications/mplay32/lang/en-US.rc index 81380b18cca..2094fa1722b 100644 --- a/base/applications/mplay32/lang/en-US.rc +++ b/base/applications/mplay32/lang/en-US.rc @@ -15,7 +15,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "All Supported (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "Play" diff --git a/base/applications/mplay32/lang/es-ES.rc b/base/applications/mplay32/lang/es-ES.rc index 5e0b8e7a89d..f05304017ba 100644 --- a/base/applications/mplay32/lang/es-ES.rc +++ b/base/applications/mplay32/lang/es-ES.rc @@ -15,7 +15,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Todos los ficheros soportados (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "Reproducir" diff --git a/base/applications/mplay32/lang/fr-FR.rc b/base/applications/mplay32/lang/fr-FR.rc index 7df1bba054e..6b63faa0b30 100644 --- a/base/applications/mplay32/lang/fr-FR.rc +++ b/base/applications/mplay32/lang/fr-FR.rc @@ -15,7 +15,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Tous les types supportés (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "Lecture" diff --git a/base/applications/mplay32/lang/he-IL.rc b/base/applications/mplay32/lang/he-IL.rc index df8440e8166..a3b7f7bc478 100644 --- a/base/applications/mplay32/lang/he-IL.rc +++ b/base/applications/mplay32/lang/he-IL.rc @@ -15,7 +15,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "כל הקבצים הנתמכים (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "נגן" diff --git a/base/applications/mplay32/lang/it-IT.rc b/base/applications/mplay32/lang/it-IT.rc index 6a599662957..40551caadb1 100644 --- a/base/applications/mplay32/lang/it-IT.rc +++ b/base/applications/mplay32/lang/it-IT.rc @@ -15,7 +15,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Tutti i tipi supportati (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "Riproduci" diff --git a/base/applications/mplay32/lang/ja-JP.rc b/base/applications/mplay32/lang/ja-JP.rc index 9ff551d86df..bcbe2fda802 100644 --- a/base/applications/mplay32/lang/ja-JP.rc +++ b/base/applications/mplay32/lang/ja-JP.rc @@ -15,7 +15,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "すべてのサポートされたファイル (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "再生" diff --git a/base/applications/mplay32/lang/nl-NL.rc b/base/applications/mplay32/lang/nl-NL.rc index 0e05627681e..a323dacb8e9 100644 --- a/base/applications/mplay32/lang/nl-NL.rc +++ b/base/applications/mplay32/lang/nl-NL.rc @@ -15,7 +15,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Mediabestanden (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "Afspelen" diff --git a/base/applications/mplay32/lang/no-NO.rc b/base/applications/mplay32/lang/no-NO.rc index a65ff10afe3..8e002910731 100644 --- a/base/applications/mplay32/lang/no-NO.rc +++ b/base/applications/mplay32/lang/no-NO.rc @@ -15,7 +15,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Alle kompaktible filer (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "Spill av" diff --git a/base/applications/mplay32/lang/pl-PL.rc b/base/applications/mplay32/lang/pl-PL.rc index 7705abff066..5d6fab2befc 100644 --- a/base/applications/mplay32/lang/pl-PL.rc +++ b/base/applications/mplay32/lang/pl-PL.rc @@ -22,7 +22,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Wszystkie formaty (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "Odtwarzaj" diff --git a/base/applications/mplay32/lang/pt-BR.rc b/base/applications/mplay32/lang/pt-BR.rc index e0e04276ecd..2544abb3526 100644 --- a/base/applications/mplay32/lang/pt-BR.rc +++ b/base/applications/mplay32/lang/pt-BR.rc @@ -17,7 +17,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Todos os formatos (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "Executar" diff --git a/base/applications/mplay32/lang/ro-RO.rc b/base/applications/mplay32/lang/ro-RO.rc index b25d6a4fcd6..f0ca6bf0e72 100644 --- a/base/applications/mplay32/lang/ro-RO.rc +++ b/base/applications/mplay32/lang/ro-RO.rc @@ -22,7 +22,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Toate admisibile (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "Redare conținut multimedia" diff --git a/base/applications/mplay32/lang/ru-RU.rc b/base/applications/mplay32/lang/ru-RU.rc index d83dc462d4e..5ecb3223f12 100644 --- a/base/applications/mplay32/lang/ru-RU.rc +++ b/base/applications/mplay32/lang/ru-RU.rc @@ -15,7 +15,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Все поддерживаемые (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "Воспроизведение" diff --git a/base/applications/mplay32/lang/sk-SK.rc b/base/applications/mplay32/lang/sk-SK.rc index 78abb653d9d..d572541f6e6 100644 --- a/base/applications/mplay32/lang/sk-SK.rc +++ b/base/applications/mplay32/lang/sk-SK.rc @@ -20,7 +20,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Všetky podporované (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "Prehrať" diff --git a/base/applications/mplay32/lang/sv-SE.rc b/base/applications/mplay32/lang/sv-SE.rc index 3d7eb434983..00f325f40c8 100644 --- a/base/applications/mplay32/lang/sv-SE.rc +++ b/base/applications/mplay32/lang/sv-SE.rc @@ -22,7 +22,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Alla kompaktibla filer (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "Spela upp" diff --git a/base/applications/mplay32/lang/tr-TR.rc b/base/applications/mplay32/lang/tr-TR.rc index 1e9f0a9cd9c..d0d2960e29e 100644 --- a/base/applications/mplay32/lang/tr-TR.rc +++ b/base/applications/mplay32/lang/tr-TR.rc @@ -19,7 +19,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Desteklenen Kütükler (*.wav, *.cda, *.mid, *.midi, *.avi)\0*.wav;*.cda;*.mid;*.midi;*.avi\0" IDS_TOOLTIP_PLAY "Çal" diff --git a/base/applications/mplay32/lang/uk-UA.rc b/base/applications/mplay32/lang/uk-UA.rc index 629b3e0d55f..a16c5cfe841 100644 --- a/base/applications/mplay32/lang/uk-UA.rc +++ b/base/applications/mplay32/lang/uk-UA.rc @@ -23,7 +23,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "Всі підтримувані (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "Відтворення" diff --git a/base/applications/mplay32/lang/zh-CN.rc b/base/applications/mplay32/lang/zh-CN.rc index 8b56ac44d3f..8bc5fb14739 100644 --- a/base/applications/mplay32/lang/zh-CN.rc +++ b/base/applications/mplay32/lang/zh-CN.rc @@ -19,7 +19,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "所有支持的格式 (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "播放" diff --git a/base/applications/mplay32/lang/zh-TW.rc b/base/applications/mplay32/lang/zh-TW.rc index 4b105d5b170..1d48bfe4901 100644 --- a/base/applications/mplay32/lang/zh-TW.rc +++ b/base/applications/mplay32/lang/zh-TW.rc @@ -23,7 +23,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ALL_TYPES_FILTER "所有支援格式 (*.wav, *.cda, *.midi, *.mid, *.avi)\0*.wav;*.cda;*.midi;*.mid;*.avi\0" IDS_TOOLTIP_PLAY "播放" diff --git a/base/applications/mplay32/mplay32.rc b/base/applications/mplay32/mplay32.rc index ad14ef202e4..eaef1a98886 100644 --- a/base/applications/mplay32/mplay32.rc +++ b/base/applications/mplay32/mplay32.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL /* Icons */ -IDI_MAIN ICON DISCARDABLE "resources/mplay32.ico" +IDI_MAIN ICON "resources/mplay32.ico" /* Bitmaps */ IDB_PLAYICON BITMAP "resources/play.bmp" @@ -22,4 +22,6 @@ IDB_SEEKFORWICON BITMAP "resources/seekforw.bmp" IDB_FORWARDICON BITMAP "resources/forward.bmp" IDB_PAUSEICON BITMAP "resources/pause.bmp" +#include + #include "rsrc.rc" diff --git a/base/applications/msconfig/lang/bg-BG.rc b/base/applications/msconfig/lang/bg-BG.rc index 7a91d58d9f8..6d974a6d692 100644 --- a/base/applications/msconfig/lang/bg-BG.rc +++ b/base/applications/msconfig/lang/bg-BG.rc @@ -1,9 +1,8 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Приложение за настройка на системата" FONT 8, "MS Shell Dlg" BEGIN @@ -14,7 +13,7 @@ BEGIN PUSHBUTTON "Прилагане", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -23,7 +22,7 @@ BEGIN PUSHBUTTON "&Изключване на всички",IDC_BTN_STARTUP_DEACTIVATE,272,155,83,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -42,7 +41,7 @@ BEGIN PUSHBUTTON "Изк&лючване на всички",IDC_BTN_SYSTEM_DEACTIVATE, 185, 155, 79, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -51,7 +50,7 @@ BEGIN PUSHBUTTON "&Запуск", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -60,7 +59,7 @@ BEGIN PUSHBUTTON "&Изключване на всички",IDC_BTN_SERVICES_DEACTIVATE,272,155,83,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -73,7 +72,7 @@ BEGIN AUTOCHECKBOX "Зареждане на пусковите предмети", IDC_CBX_STARTUP_ITEM, 30, 110, 260, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -94,7 +93,7 @@ BEGIN LTEXT "сек.", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -119,7 +118,7 @@ BEGIN PUSHBUTTON "Отказ", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "Приложение за настройка на системата" IDS_TAB_GENERAL "Общи" @@ -130,7 +129,7 @@ BEGIN IDS_TAB_TOOLS "Средства" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Услуга" IDS_SERVICES_COLUMN_REQ "Задължително" @@ -138,7 +137,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "Състояние" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Име" IDS_TOOLS_COLUMN_DESCR "Описание" @@ -165,7 +164,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Път" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "Пуснат" IDS_SERVICES_STATUS_STOPPED "Спрян" diff --git a/base/applications/msconfig/lang/ca-ES.rc b/base/applications/msconfig/lang/ca-ES.rc index 667917db395..ab2810653e1 100644 --- a/base/applications/msconfig/lang/ca-ES.rc +++ b/base/applications/msconfig/lang/ca-ES.rc @@ -1,9 +1,8 @@ LANGUAGE LANG_CATALAN, SUBLANG_DEFAULT -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Progrma de configuracio del sistema" FONT 8, "MS Shell Dlg" BEGIN @@ -14,7 +13,7 @@ BEGIN PUSHBUTTON "Aplicar", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -23,7 +22,7 @@ BEGIN PUSHBUTTON "&Deactivar-ho tot",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -42,7 +41,7 @@ BEGIN PUSHBUTTON "&Deactivar-ho tot",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -51,7 +50,7 @@ BEGIN PUSHBUTTON "&Executa", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -60,7 +59,7 @@ BEGIN PUSHBUTTON "&Deactivar-ho tot",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -73,7 +72,7 @@ BEGIN AUTOCHECKBOX "P&rogrames del menu inici", IDC_CBX_STARTUP_ITEM, 30, 110, 75, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -94,7 +93,7 @@ BEGIN LTEXT "sec.", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -119,7 +118,7 @@ BEGIN PUSHBUTTON "Cancel·lar", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "Programa de configuracio de sistema" IDS_TAB_GENERAL "General" @@ -130,7 +129,7 @@ BEGIN IDS_TAB_TOOLS "Eines" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Servei" IDS_SERVICES_COLUMN_REQ "Obligatori" @@ -138,7 +137,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "Estat" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Nom" IDS_TOOLS_COLUMN_DESCR "Descripcio" @@ -165,7 +164,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Path" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "En marxa" IDS_SERVICES_STATUS_STOPPED "Parat" diff --git a/base/applications/msconfig/lang/cs-CZ.rc b/base/applications/msconfig/lang/cs-CZ.rc index 5ebffac38ac..a0ce2d45a64 100644 --- a/base/applications/msconfig/lang/cs-CZ.rc +++ b/base/applications/msconfig/lang/cs-CZ.rc @@ -6,10 +6,9 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Nástroj pro konfiguraci systému" FONT 8, "MS Shell Dlg" BEGIN @@ -20,7 +19,7 @@ BEGIN PUSHBUTTON "Použít", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -29,7 +28,7 @@ BEGIN PUSHBUTTON "&Zakázat vše",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -48,7 +47,7 @@ BEGIN PUSHBUTTON "Z&akázat vše",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -57,7 +56,7 @@ BEGIN PUSHBUTTON "&Spustit", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -66,7 +65,7 @@ BEGIN PUSHBUTTON "&Zakázat vše",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -79,7 +78,7 @@ BEGIN AUTOCHECKBOX "N&ačíst položky Po spuštění", IDC_CBX_STARTUP_ITEM, 30, 110, 105, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -100,7 +99,7 @@ BEGIN LTEXT "sek.", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -125,7 +124,7 @@ BEGIN PUSHBUTTON "Storno", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "Nástroj pro konfiguraci systému" IDS_TAB_GENERAL "Obecné" @@ -136,7 +135,7 @@ BEGIN IDS_TAB_TOOLS "Nástroje" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Služba" IDS_SERVICES_COLUMN_REQ "Požadováno" @@ -144,7 +143,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "Stav" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Jméno" IDS_TOOLS_COLUMN_DESCR "Popis" @@ -171,7 +170,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Cesta" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "Spuštěno" IDS_SERVICES_STATUS_STOPPED "Zastaveno" diff --git a/base/applications/msconfig/lang/de-DE.rc b/base/applications/msconfig/lang/de-DE.rc index 06186f9f113..3206848f918 100644 --- a/base/applications/msconfig/lang/de-DE.rc +++ b/base/applications/msconfig/lang/de-DE.rc @@ -1,9 +1,8 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Systemkonfigurationsprogramm" FONT 8, "MS Shell Dlg" BEGIN @@ -14,7 +13,7 @@ BEGIN PUSHBUTTON "Ü&bernehmen", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -23,7 +22,7 @@ BEGIN PUSHBUTTON "Alle &deaktivieren",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -42,7 +41,7 @@ BEGIN PUSHBUTTON "Alle &deaktivieren",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -51,7 +50,7 @@ BEGIN PUSHBUTTON "&Ausführen", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -60,7 +59,7 @@ BEGIN PUSHBUTTON "Alle &deaktivieren",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -73,7 +72,7 @@ BEGIN AUTOCHECKBOX "S&ystemstartelemente laden", IDC_CBX_STARTUP_ITEM, 30, 110, 110, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -94,7 +93,7 @@ BEGIN LTEXT "Sek.", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -119,7 +118,7 @@ BEGIN PUSHBUTTON "Abbrechen", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "Systemkonfigurationsprogramm" IDS_TAB_GENERAL "Allgemein" @@ -130,7 +129,7 @@ BEGIN IDS_TAB_TOOLS "Tools" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Dienst" IDS_SERVICES_COLUMN_REQ "Erforderlich" @@ -138,7 +137,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "Status" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Name" IDS_TOOLS_COLUMN_DESCR "Beschreibung" @@ -165,7 +164,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Pfad" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "Gestartet" IDS_SERVICES_STATUS_STOPPED "Beendet" diff --git a/base/applications/msconfig/lang/el-GR.rc b/base/applications/msconfig/lang/el-GR.rc index 99415d03083..10d4345f773 100644 --- a/base/applications/msconfig/lang/el-GR.rc +++ b/base/applications/msconfig/lang/el-GR.rc @@ -1,9 +1,8 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Πρόγραμμα παραμετροποίησης συστήματος" FONT 8, "MS Shell Dlg" BEGIN @@ -14,7 +13,7 @@ BEGIN PUSHBUTTON "Εφαρμογή", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -23,7 +22,7 @@ BEGIN PUSHBUTTON "&Απενεργοποίηση όλων",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -42,7 +41,7 @@ BEGIN PUSHBUTTON "Α&πενεργοποίηση όλων",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -51,7 +50,7 @@ BEGIN PUSHBUTTON "&Εκτέλεση", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -60,7 +59,7 @@ BEGIN PUSHBUTTON "&Απενεργοποίηση όλων",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -73,7 +72,7 @@ BEGIN AUTOCHECKBOX "Φό&ρτωση Startup αντικειμένων", IDC_CBX_STARTUP_ITEM, 30, 110, 75, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -94,7 +93,7 @@ BEGIN LTEXT "δευτ.", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -119,7 +118,7 @@ BEGIN PUSHBUTTON "Ακύρωση", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "Πρόγραμμα παραμετροποίησης συστήματος" IDS_TAB_GENERAL "Γενικά" @@ -130,7 +129,7 @@ BEGIN IDS_TAB_TOOLS "Εργαλεία" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Υπηρεσία" IDS_SERVICES_COLUMN_REQ "Απαραίτητο" @@ -138,7 +137,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "Κατάσταση" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Όνομα" IDS_TOOLS_COLUMN_DESCR "Περιγραφή" @@ -165,7 +164,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Μονοπάτι" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "Εκτελείται" IDS_SERVICES_STATUS_STOPPED "Τερματίστηκε" diff --git a/base/applications/msconfig/lang/en-US.rc b/base/applications/msconfig/lang/en-US.rc index d92f755b693..808b673b995 100644 --- a/base/applications/msconfig/lang/en-US.rc +++ b/base/applications/msconfig/lang/en-US.rc @@ -1,9 +1,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "System configuration program" FONT 8, "MS Shell Dlg" BEGIN @@ -14,7 +13,7 @@ BEGIN PUSHBUTTON "Apply", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -23,7 +22,7 @@ BEGIN PUSHBUTTON "&Deactivate all",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -42,7 +41,7 @@ BEGIN PUSHBUTTON "Disable A&ll",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -51,7 +50,7 @@ BEGIN PUSHBUTTON "&Run", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -60,7 +59,7 @@ BEGIN PUSHBUTTON "&Deactivate all",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -73,7 +72,7 @@ BEGIN AUTOCHECKBOX "L&oad Startup Items", IDC_CBX_STARTUP_ITEM, 30, 110, 75, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -94,7 +93,7 @@ BEGIN LTEXT "sec.", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -119,7 +118,7 @@ BEGIN PUSHBUTTON "Cancel", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "System configuration program" IDS_TAB_GENERAL "General" @@ -130,7 +129,7 @@ BEGIN IDS_TAB_TOOLS "Tools" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Service" IDS_SERVICES_COLUMN_REQ "Required" @@ -138,7 +137,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "Status" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Name" IDS_TOOLS_COLUMN_DESCR "Description" @@ -165,7 +164,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Path" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "Running" IDS_SERVICES_STATUS_STOPPED "Stopped" diff --git a/base/applications/msconfig/lang/es-ES.rc b/base/applications/msconfig/lang/es-ES.rc index f07f1275a6b..9a16d64f70c 100644 --- a/base/applications/msconfig/lang/es-ES.rc +++ b/base/applications/msconfig/lang/es-ES.rc @@ -1,9 +1,8 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Utilidad de configuración del sistema" FONT 8, "MS Shell Dlg" BEGIN @@ -14,7 +13,7 @@ BEGIN PUSHBUTTON "Aplicar", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -23,7 +22,7 @@ BEGIN PUSHBUTTON "&Desactivar todo",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -42,7 +41,7 @@ BEGIN PUSHBUTTON "Blo&quear Todo",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -51,7 +50,7 @@ BEGIN PUSHBUTTON "&Ejecutar", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -60,7 +59,7 @@ BEGIN PUSHBUTTON "&Desactivar todo",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -73,7 +72,7 @@ BEGIN AUTOCHECKBOX "C&argar elementos de Inicio", IDC_CBX_STARTUP_ITEM, 30, 110, 110, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -94,7 +93,7 @@ BEGIN LTEXT "seg.", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -119,7 +118,7 @@ BEGIN PUSHBUTTON "Cancelar", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "Programa de configuración del Sistema" IDS_TAB_GENERAL "General" @@ -130,7 +129,7 @@ BEGIN IDS_TAB_TOOLS "Herramientas" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Servicio" IDS_SERVICES_COLUMN_REQ "Requirido" @@ -138,7 +137,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "Estado" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Nombre" IDS_TOOLS_COLUMN_DESCR "Descripción" @@ -165,7 +164,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Ruta" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "En ejecución" IDS_SERVICES_STATUS_STOPPED "Detenido" diff --git a/base/applications/msconfig/lang/fr-FR.rc b/base/applications/msconfig/lang/fr-FR.rc index 94893662123..542d391ea83 100644 --- a/base/applications/msconfig/lang/fr-FR.rc +++ b/base/applications/msconfig/lang/fr-FR.rc @@ -1,9 +1,8 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Utilitaire de configuration système" FONT 8, "MS Shell Dlg" BEGIN @@ -14,7 +13,7 @@ BEGIN PUSHBUTTON "A&ppliquer", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -23,7 +22,7 @@ BEGIN PUSHBUTTON "&Désactiver tout",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -42,7 +41,7 @@ BEGIN PUSHBUTTON "Désactiver tout",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -51,7 +50,7 @@ BEGIN PUSHBUTTON "&Lancer", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -60,7 +59,7 @@ BEGIN PUSHBUTTON "&Désactiver tout",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -73,7 +72,7 @@ BEGIN AUTOCHECKBOX "Charger les éléments de démarrage", IDC_CBX_STARTUP_ITEM, 30, 110, 75, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -94,7 +93,7 @@ BEGIN LTEXT "secondes", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -119,7 +118,7 @@ BEGIN PUSHBUTTON "Annuler", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "Utilitaire de configuration système" IDS_TAB_GENERAL "Général" @@ -130,7 +129,7 @@ BEGIN IDS_TAB_TOOLS "Outils" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Service" IDS_SERVICES_COLUMN_REQ "Essentiel" @@ -138,7 +137,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "État" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Nom" IDS_TOOLS_COLUMN_DESCR "Description" @@ -165,7 +164,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Chemin" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "En cours d'exécution" IDS_SERVICES_STATUS_STOPPED "Arrêté" diff --git a/base/applications/msconfig/lang/he-IL.rc b/base/applications/msconfig/lang/he-IL.rc index f884ee23a77..d35ada1bc03 100644 --- a/base/applications/msconfig/lang/he-IL.rc +++ b/base/applications/msconfig/lang/he-IL.rc @@ -1,10 +1,9 @@ // Translated by Baruch Rutman LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "כלי שירות לקביעת תצורת המערכת" FONT 8, "MS Shell Dlg" BEGIN @@ -15,7 +14,7 @@ BEGIN PUSHBUTTON "החל", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -24,7 +23,7 @@ BEGIN PUSHBUTTON "בטל הכל",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -43,7 +42,7 @@ BEGIN PUSHBUTTON "בטל הכל",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -52,7 +51,7 @@ BEGIN PUSHBUTTON "&פתח", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -61,7 +60,7 @@ BEGIN PUSHBUTTON "בטל הכל",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -74,7 +73,7 @@ BEGIN AUTOCHECKBOX "טען פריטי אתחול", IDC_CBX_STARTUP_ITEM, 30, 110, 75, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -95,7 +94,7 @@ BEGIN LTEXT "שניות", -1, 330, 91, 21, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -120,7 +119,7 @@ BEGIN PUSHBUTTON "ביטול", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "כלי שירות לקביעת תצורת המערכת" IDS_TAB_GENERAL "כללי" @@ -131,7 +130,7 @@ BEGIN IDS_TAB_TOOLS "כלים" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "שירות" IDS_SERVICES_COLUMN_REQ "בסיסי" @@ -139,7 +138,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "מצב" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "שם כלי" IDS_TOOLS_COLUMN_DESCR "תיאור" @@ -166,7 +165,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "נתיב" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "מופעל" IDS_SERVICES_STATUS_STOPPED "נעצר" diff --git a/base/applications/msconfig/lang/hu-HU.rc b/base/applications/msconfig/lang/hu-HU.rc index 8265fb6b08d..ff0f1558b31 100644 --- a/base/applications/msconfig/lang/hu-HU.rc +++ b/base/applications/msconfig/lang/hu-HU.rc @@ -3,10 +3,9 @@ LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Rendszerbeállítások" FONT 8, "MS Shell Dlg" BEGIN @@ -17,7 +16,7 @@ BEGIN PUSHBUTTON "Alkalmaz", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -26,7 +25,7 @@ BEGIN PUSHBUTTON "Mindet &kikapcsol",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -45,7 +44,7 @@ BEGIN PUSHBUTTON "Disable A&ll",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -54,7 +53,7 @@ BEGIN PUSHBUTTON "&Futtat", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -63,7 +62,7 @@ BEGIN PUSHBUTTON "Mindet &kikapcsol",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -76,7 +75,7 @@ BEGIN AUTOCHECKBOX "L&oad Startup Items", IDC_CBX_STARTUP_ITEM, 30, 110, 75, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -97,7 +96,7 @@ BEGIN LTEXT "sec.", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -122,7 +121,7 @@ BEGIN PUSHBUTTON "Cancel", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "Rendszerkonfiguráciüs segédprogram" IDS_TAB_GENERAL "Általános" @@ -133,7 +132,7 @@ BEGIN IDS_TAB_TOOLS "Segédprogramok" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Szolgálgatás" IDS_SERVICES_COLUMN_REQ "Lényeges" @@ -141,7 +140,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "Állapot" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Név" IDS_TOOLS_COLUMN_DESCR "Description" @@ -168,7 +167,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Elérési út" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "Fut" IDS_SERVICES_STATUS_STOPPED "Leállítva" diff --git a/base/applications/msconfig/lang/id-ID.rc b/base/applications/msconfig/lang/id-ID.rc index 2b4e158dfe7..bd3e2698f1c 100644 --- a/base/applications/msconfig/lang/id-ID.rc +++ b/base/applications/msconfig/lang/id-ID.rc @@ -1,9 +1,8 @@ LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Program konfigurasi sistem" FONT 8, "MS Shell Dlg" BEGIN @@ -14,7 +13,7 @@ BEGIN PUSHBUTTON "Terapkan", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -23,7 +22,7 @@ BEGIN PUSHBUTTON "&Deaktivasi semua",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -42,7 +41,7 @@ BEGIN PUSHBUTTON "Disable A&ll",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -51,7 +50,7 @@ BEGIN PUSHBUTTON "&Jalankan", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -60,7 +59,7 @@ BEGIN PUSHBUTTON "&Deaktivasi semua",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -73,7 +72,7 @@ BEGIN AUTOCHECKBOX "Amb&il Item Startup", IDC_CBX_STARTUP_ITEM, 30, 110, 75, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -94,7 +93,7 @@ BEGIN LTEXT "detik", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -119,7 +118,7 @@ BEGIN PUSHBUTTON "Batal", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "Program konfigurasi sistem" IDS_TAB_GENERAL "Umum" @@ -130,7 +129,7 @@ BEGIN IDS_TAB_TOOLS "Piranti" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Layanan" IDS_SERVICES_COLUMN_REQ "Diperlukan" @@ -138,7 +137,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "Status" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Nama" IDS_TOOLS_COLUMN_DESCR "Deskripsi" @@ -165,7 +164,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Path" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "Berjalan" IDS_SERVICES_STATUS_STOPPED "Dihentikan" diff --git a/base/applications/msconfig/lang/it-IT.rc b/base/applications/msconfig/lang/it-IT.rc index 7d2f1651011..b5513648b51 100644 --- a/base/applications/msconfig/lang/it-IT.rc +++ b/base/applications/msconfig/lang/it-IT.rc @@ -1,9 +1,8 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Utilità di Configurazione del Sistema" FONT 8, "MS Shell Dlg" BEGIN @@ -14,7 +13,7 @@ BEGIN PUSHBUTTON "&Applica", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -23,7 +22,7 @@ BEGIN PUSHBUTTON "Disabi&lita tutto",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -42,7 +41,7 @@ BEGIN PUSHBUTTON "Disabi&lita tutto",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -51,7 +50,7 @@ BEGIN PUSHBUTTON "&Esegui", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -60,7 +59,7 @@ BEGIN PUSHBUTTON "Disabi&lita tutto",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -73,7 +72,7 @@ BEGIN AUTOCHECKBOX "Carica elemen&ti di avvio", IDC_CBX_STARTUP_ITEM, 30, 110, 95, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -94,7 +93,7 @@ BEGIN LTEXT "sec.", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -119,7 +118,7 @@ BEGIN PUSHBUTTON "Annulla", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "Utilità di configurazione del sistema" IDS_TAB_GENERAL "Generale" @@ -130,7 +129,7 @@ BEGIN IDS_TAB_TOOLS "Strumenti" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Servizio" IDS_SERVICES_COLUMN_REQ "Essenziale" @@ -138,7 +137,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "Stato" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Nome" IDS_TOOLS_COLUMN_DESCR "Descrizione" @@ -165,7 +164,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Percorso" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "Esecuzione" IDS_SERVICES_STATUS_STOPPED "Interrotto" diff --git a/base/applications/msconfig/lang/ko-KR.rc b/base/applications/msconfig/lang/ko-KR.rc index a86d46c95ed..5baa35ebeec 100644 --- a/base/applications/msconfig/lang/ko-KR.rc +++ b/base/applications/msconfig/lang/ko-KR.rc @@ -4,10 +4,9 @@ LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "시스템 설정 프로그램" FONT 8, "MS Shell Dlg" BEGIN @@ -18,7 +17,7 @@ BEGIN PUSHBUTTON "적용", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -27,7 +26,7 @@ BEGIN PUSHBUTTON "모두 비활성화(&D)",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -46,7 +45,7 @@ BEGIN PUSHBUTTON "모두 비활성화(&A)",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -55,7 +54,7 @@ BEGIN PUSHBUTTON "실행(&R)", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -64,7 +63,7 @@ BEGIN PUSHBUTTON "모두 비활성화(&D)",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -77,7 +76,7 @@ BEGIN AUTOCHECKBOX "시작프로그램 로드(&O)", IDC_CBX_STARTUP_ITEM, 30, 110, 75, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -98,7 +97,7 @@ BEGIN LTEXT "초", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -123,7 +122,7 @@ BEGIN PUSHBUTTON "취소", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "System 설정 프로그램" IDS_TAB_GENERAL "일반" @@ -134,7 +133,7 @@ BEGIN IDS_TAB_TOOLS "도구" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "서비스" IDS_SERVICES_COLUMN_REQ "요구됨" @@ -142,7 +141,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "상태" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "이름" IDS_TOOLS_COLUMN_DESCR "설명" @@ -169,7 +168,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Path" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "실행중" IDS_SERVICES_STATUS_STOPPED "정지됨" diff --git a/base/applications/msconfig/lang/nl-NL.rc b/base/applications/msconfig/lang/nl-NL.rc index ed82852d312..c3f6b7dcc84 100644 --- a/base/applications/msconfig/lang/nl-NL.rc +++ b/base/applications/msconfig/lang/nl-NL.rc @@ -20,10 +20,9 @@ LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Hulpprogramma voor systeemconfiguratie" FONT 8, "MS Shell Dlg" BEGIN @@ -34,7 +33,7 @@ BEGIN PUSHBUTTON "Toepassen", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -43,7 +42,7 @@ BEGIN PUSHBUTTON "Alles &uitschakelen",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -62,7 +61,7 @@ BEGIN PUSHBUTTON "Disable A&ll",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -71,7 +70,7 @@ BEGIN PUSHBUTTON "&Uitvoeren", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -80,7 +79,7 @@ BEGIN PUSHBUTTON "Alles &uitschakelen",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -93,7 +92,7 @@ BEGIN AUTOCHECKBOX "&Opstartonderdelen in het geheugen laden", IDC_CBX_STARTUP_ITEM, 30, 110, 75, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -114,7 +113,7 @@ BEGIN LTEXT "sec.", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -139,7 +138,7 @@ BEGIN PUSHBUTTON "Cancel", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "Hulpprogramma voor systeemconfiguratie" IDS_TAB_GENERAL "Algemeen" @@ -150,7 +149,7 @@ BEGIN IDS_TAB_TOOLS "Hulpmiddelen" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Service" IDS_SERVICES_COLUMN_REQ "Essentieel" @@ -158,7 +157,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "Status" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Naam" IDS_TOOLS_COLUMN_DESCR "Beschrijving" @@ -185,7 +184,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Pad" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "Wordt uitgevoerd" IDS_SERVICES_STATUS_STOPPED "Gestopt" diff --git a/base/applications/msconfig/lang/no-NO.rc b/base/applications/msconfig/lang/no-NO.rc index 26c18c1d424..200188cb600 100644 --- a/base/applications/msconfig/lang/no-NO.rc +++ b/base/applications/msconfig/lang/no-NO.rc @@ -1,9 +1,8 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Systemkonfigurasjon" FONT 8, "MS Shell Dlg" BEGIN @@ -14,7 +13,7 @@ BEGIN PUSHBUTTON "Bruk", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -23,7 +22,7 @@ BEGIN PUSHBUTTON "&Deaktivere alt",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -42,7 +41,7 @@ BEGIN PUSHBUTTON "D&eaktiver alt",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -51,7 +50,7 @@ BEGIN PUSHBUTTON "&Kjør", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -60,7 +59,7 @@ BEGIN PUSHBUTTON "&Deaktivere alt",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -73,7 +72,7 @@ BEGIN AUTOCHECKBOX "Las&t inn oppstartselementet", IDC_CBX_STARTUP_ITEM, 30, 110, 105, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -94,7 +93,7 @@ BEGIN LTEXT "sekunder", -1, 310, 100, 85, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -119,7 +118,7 @@ BEGIN PUSHBUTTON "Avbryt", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "Systemkonfigurasjon" IDS_TAB_GENERAL "Generelt" @@ -130,7 +129,7 @@ BEGIN IDS_TAB_TOOLS "Verktøy" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Tjeneste" IDS_SERVICES_COLUMN_REQ "Viktig" @@ -138,7 +137,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "Status" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Navn" IDS_TOOLS_COLUMN_DESCR "Beskrivelse" @@ -165,7 +164,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Plassering" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "Kjører" IDS_SERVICES_STATUS_STOPPED "Stoppet" diff --git a/base/applications/msconfig/lang/pl-PL.rc b/base/applications/msconfig/lang/pl-PL.rc index 125e0f8a491..0e63fda52ae 100644 --- a/base/applications/msconfig/lang/pl-PL.rc +++ b/base/applications/msconfig/lang/pl-PL.rc @@ -8,10 +8,9 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Program konfiguracji systemu" FONT 8, "MS Shell Dlg" BEGIN @@ -22,7 +21,7 @@ BEGIN PUSHBUTTON "Zastosuj", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -31,7 +30,7 @@ BEGIN PUSHBUTTON "Wyłącz wszy&stkie",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -50,7 +49,7 @@ BEGIN PUSHBUTTON "Wyłącz wszy&stkie",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -59,7 +58,7 @@ BEGIN PUSHBUTTON "&Uruchom", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -68,7 +67,7 @@ BEGIN PUSHBUTTON "Wyłącz wszy&stkie",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -81,7 +80,7 @@ BEGIN AUTOCHECKBOX "Załaduj &elementy startowe", IDC_CBX_STARTUP_ITEM, 30, 110, 98, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -102,7 +101,7 @@ BEGIN LTEXT "s", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -127,7 +126,7 @@ BEGIN PUSHBUTTON "Anuluj", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "Program konfiguracji systemu" IDS_TAB_GENERAL "Ogólne" @@ -138,7 +137,7 @@ BEGIN IDS_TAB_TOOLS "Narzędzia" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Usługa" IDS_SERVICES_COLUMN_REQ "Wymagana" @@ -146,7 +145,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "Stan" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Nazwa" IDS_TOOLS_COLUMN_DESCR "Opis" @@ -173,7 +172,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Lokalizacja" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "Uruchomiona" IDS_SERVICES_STATUS_STOPPED "Zatrzymana" diff --git a/base/applications/msconfig/lang/pt-BR.rc b/base/applications/msconfig/lang/pt-BR.rc index e865979e900..e888dadd0f4 100644 --- a/base/applications/msconfig/lang/pt-BR.rc +++ b/base/applications/msconfig/lang/pt-BR.rc @@ -4,10 +4,9 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Programa de configuração do sistema" FONT 8, "MS Shell Dlg" BEGIN @@ -18,7 +17,7 @@ BEGIN PUSHBUTTON "Aplicar", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -27,7 +26,7 @@ BEGIN PUSHBUTTON "De&sativar tudo",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -46,7 +45,7 @@ BEGIN PUSHBUTTON "Desa&tivar tudo",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -55,7 +54,7 @@ BEGIN PUSHBUTTON "&Executar", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -64,7 +63,7 @@ BEGIN PUSHBUTTON "D&esativar tudo",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -77,7 +76,7 @@ BEGIN AUTOCHECKBOX "Carregar i&tens de inicialização", IDC_CBX_STARTUP_ITEM, 30, 110, 75, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -98,7 +97,7 @@ BEGIN LTEXT "segundos", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -123,7 +122,7 @@ BEGIN PUSHBUTTON "Cancelar", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "Programa de configuração do sistema" IDS_TAB_GENERAL "Geral" @@ -134,7 +133,7 @@ BEGIN IDS_TAB_TOOLS "Ferramentas" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Serviço" IDS_SERVICES_COLUMN_REQ "Essencial" @@ -142,7 +141,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "Status" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Nome" IDS_TOOLS_COLUMN_DESCR "Descrição" @@ -169,7 +168,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Local" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "Em execução" IDS_SERVICES_STATUS_STOPPED "Parado" diff --git a/base/applications/msconfig/lang/ro-RO.rc b/base/applications/msconfig/lang/ro-RO.rc index b1d98dcefb3..4fbaec606c6 100644 --- a/base/applications/msconfig/lang/ro-RO.rc +++ b/base/applications/msconfig/lang/ro-RO.rc @@ -1,10 +1,9 @@ // 2011.12.18 - Fulea Ștefan: minor correction LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Program de configurare sistem" FONT 8, "MS Shell Dlg" BEGIN @@ -15,7 +14,7 @@ BEGIN PUSHBUTTON "&Aplică", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -24,7 +23,7 @@ BEGIN PUSHBUTTON "&Dezactivează toate", IDC_BTN_STARTUP_DEACTIVATE,285,155,76,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -43,7 +42,7 @@ BEGIN PUSHBUTTON "De&zactivează toate",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 76, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -52,7 +51,7 @@ BEGIN PUSHBUTTON "&Lansează", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -61,7 +60,7 @@ BEGIN PUSHBUTTON "&Dezactivează toate", IDC_BTN_SERVICES_DEACTIVATE,285,155,76,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -74,7 +73,7 @@ BEGIN AUTOCHECKBOX "Încarcă &elementele autolansate", IDC_CBX_STARTUP_ITEM, 30, 110, 150, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -95,7 +94,7 @@ BEGIN LTEXT "sec.", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -120,7 +119,7 @@ BEGIN PUSHBUTTON "A&nulează", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "Configuratorul de sistem" IDS_TAB_GENERAL "Generale" @@ -131,7 +130,7 @@ BEGIN IDS_TAB_TOOLS "Instrumente" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Servicii" IDS_SERVICES_COLUMN_REQ "De bază" @@ -139,7 +138,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "Stare" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Nume" IDS_TOOLS_COLUMN_DESCR "Descriere" @@ -166,7 +165,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Cale" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "Merge" IDS_SERVICES_STATUS_STOPPED "Oprit" diff --git a/base/applications/msconfig/lang/ru-RU.rc b/base/applications/msconfig/lang/ru-RU.rc index 05bebf19681..fb67dc5ab8b 100644 --- a/base/applications/msconfig/lang/ru-RU.rc +++ b/base/applications/msconfig/lang/ru-RU.rc @@ -2,10 +2,9 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Настройки системы" FONT 8, "MS Shell Dlg" BEGIN @@ -16,7 +15,7 @@ BEGIN PUSHBUTTON "Применить", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -25,7 +24,7 @@ BEGIN PUSHBUTTON "В&ыключить все",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -44,7 +43,7 @@ BEGIN PUSHBUTTON "О&тключить все",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -53,7 +52,7 @@ BEGIN PUSHBUTTON "&Запуск", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -62,20 +61,20 @@ BEGIN PUSHBUTTON "В&ыключить все",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Варианты запуска", -1, 10, 10, 340, 150,0,WS_EX_TRANSPARENT CONTROL "&Обычный запуск - загрузка всех драйверов устройств и запуск всех служб", IDC_CBX_NORMAL_START, "Button", 0x50010009, 20, 30, 280, 10 CONTROL "&Диагностический запуск - загрузка только основных драйверов и запуск основных служб", IDC_CBX_DIAGNOSTIC_START, "Button", 0x50010009, 20, 45, 325, 10 - CONTROL "&Выборочный запуск", IDC_CBX_SELECTIVE_STARTUP, "Button", 0x50010009, 20, 60, 100, 10 + CONTROL "&Выборочный запуск:", IDC_CBX_SELECTIVE_STARTUP, "Button", 0x50010009, 20, 60, 100, 10 AUTOCHECKBOX "О&брабатывать файл SYSTEM.INI", IDC_CBX_SYSTEM_INI, 30, 80, 130, 10 AUTOCHECKBOX "&Загружать системные службы", IDC_CBX_SYSTEM_SERVICE, 30, 95, 130, 10 AUTOCHECKBOX "З&агружать элементы автозагрузки", IDC_CBX_STARTUP_ITEM, 30, 110, 140, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -96,7 +95,7 @@ BEGIN LTEXT "сек.", -1, 310, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -121,7 +120,7 @@ BEGIN PUSHBUTTON "Отмена", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "Настройка системы" IDS_TAB_GENERAL "Общие" @@ -132,7 +131,7 @@ BEGIN IDS_TAB_TOOLS "Утилиты" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Служба" IDS_SERVICES_COLUMN_REQ "Базовая" @@ -140,7 +139,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "Состояние" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Название" IDS_TOOLS_COLUMN_DESCR "Описание" @@ -154,7 +153,7 @@ BEGIN IDS_TOOLS_INFO_CMD "winver.exe" IDS_TOOLS_REGEDIT_NAME "Редактор реестра" - IDS_TOOLS_REGEDIT_DESCR "Открытый редактор реестра." + IDS_TOOLS_REGEDIT_DESCR "Открыть редактор реестра." IDS_TOOLS_REGEDIT_CMD "regedit.exe" IDS_TOOLS_SYSDM_NAME "Настройки системы" @@ -167,7 +166,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Расположение" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "Запущено" IDS_SERVICES_STATUS_STOPPED "Остановлено" diff --git a/base/applications/msconfig/lang/sk-SK.rc b/base/applications/msconfig/lang/sk-SK.rc index 0b5946150b1..2788a84a1d1 100644 --- a/base/applications/msconfig/lang/sk-SK.rc +++ b/base/applications/msconfig/lang/sk-SK.rc @@ -4,10 +4,9 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Program na konfiguráciu systému" FONT 8, "MS Shell Dlg" BEGIN @@ -18,7 +17,7 @@ BEGIN PUSHBUTTON "P&oužiť", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -27,7 +26,7 @@ BEGIN PUSHBUTTON "&Deaktivovať všetky",IDC_BTN_STARTUP_DEACTIVATE,285,155,76,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -46,7 +45,7 @@ BEGIN PUSHBUTTON "Zakázať všet&ky",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -55,7 +54,7 @@ BEGIN PUSHBUTTON "&Spustiť", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -64,7 +63,7 @@ BEGIN PUSHBUTTON "&Deaktivovať všetky",IDC_BTN_SERVICES_DEACTIVATE,285,155,76,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -77,7 +76,7 @@ BEGIN AUTOCHECKBOX "N&ačítať položky Po spustení", IDC_CBX_STARTUP_ITEM, 30, 110, 100, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -98,7 +97,7 @@ BEGIN LTEXT "s", -1, 345, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -123,7 +122,7 @@ BEGIN PUSHBUTTON "Zrušiť", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "Program na konfiguráciu systému" IDS_TAB_GENERAL "Všeobecné" @@ -134,7 +133,7 @@ BEGIN IDS_TAB_TOOLS "Nástroje" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Služba" IDS_SERVICES_COLUMN_REQ "Požadovaná" @@ -142,7 +141,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "Stav" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Názov" IDS_TOOLS_COLUMN_DESCR "Popis" @@ -169,7 +168,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Umiestnenie" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "Spustená" IDS_SERVICES_STATUS_STOPPED "Zastavená" diff --git a/base/applications/msconfig/lang/sv-SE.rc b/base/applications/msconfig/lang/sv-SE.rc index 51f59a7491d..64bd5cc80ec 100644 --- a/base/applications/msconfig/lang/sv-SE.rc +++ b/base/applications/msconfig/lang/sv-SE.rc @@ -7,10 +7,9 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Systemkonfigurastion" FONT 8, "MS Shell Dlg" BEGIN @@ -21,7 +20,7 @@ BEGIN PUSHBUTTON "Verkställ", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -30,7 +29,7 @@ BEGIN PUSHBUTTON "&Inaktivera allt",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -49,7 +48,7 @@ BEGIN PUSHBUTTON "I&naktivera allt",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -58,7 +57,7 @@ BEGIN PUSHBUTTON "&Kör", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -67,7 +66,7 @@ BEGIN PUSHBUTTON "&Inaktivera allt",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -80,7 +79,7 @@ BEGIN AUTOCHECKBOX "La&dda in uppstartsprylar", IDC_CBX_STARTUP_ITEM, 30, 110, 105, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -101,7 +100,7 @@ BEGIN LTEXT "sekunder", -1, 310, 100, 85, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -126,7 +125,7 @@ BEGIN PUSHBUTTON "Avbryt", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "Systemkonfiguration" IDS_TAB_GENERAL "Generellt" @@ -137,7 +136,7 @@ BEGIN IDS_TAB_TOOLS "Verktyg" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Tjänst" IDS_SERVICES_COLUMN_REQ "Viktigt" @@ -145,7 +144,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "Status" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Namn" IDS_TOOLS_COLUMN_DESCR "Beskrivning" @@ -172,7 +171,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Plassering" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "Körs" IDS_SERVICES_STATUS_STOPPED "Stoppad" diff --git a/base/applications/msconfig/lang/th-TH.rc b/base/applications/msconfig/lang/th-TH.rc index a0be1c3ce77..878859fc853 100644 --- a/base/applications/msconfig/lang/th-TH.rc +++ b/base/applications/msconfig/lang/th-TH.rc @@ -20,10 +20,9 @@ LANGUAGE LANG_THAI, SUBLANG_DEFAULT -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "โปรแกรมโครงแบบระบบ" FONT 8, "MS Shell Dlg" BEGIN @@ -34,7 +33,7 @@ BEGIN PUSHBUTTON "ใช้ทันที", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -43,7 +42,7 @@ BEGIN PUSHBUTTON "&ไม่กระตุ้นทั้งหมด",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -62,7 +61,7 @@ BEGIN PUSHBUTTON "Disable A&ll",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -71,7 +70,7 @@ BEGIN PUSHBUTTON "&ดำเนินงาน", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -80,7 +79,7 @@ BEGIN PUSHBUTTON "&Deactivate all",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -93,7 +92,7 @@ BEGIN AUTOCHECKBOX "L&oad Startup Items", IDC_CBX_STARTUP_ITEM, 30, 110, 75, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -114,7 +113,7 @@ BEGIN LTEXT "วินาที", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -139,7 +138,7 @@ BEGIN PUSHBUTTON "ยกเลิก", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "โปรแกรมโครงแบบระบบ" IDS_TAB_GENERAL "ทั่วไป" @@ -150,7 +149,7 @@ BEGIN IDS_TAB_TOOLS "เครื่องมือ" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "บริการ" IDS_SERVICES_COLUMN_REQ "ความต้องการ" @@ -158,7 +157,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "สถานะ" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "ชื่อ" IDS_TOOLS_COLUMN_DESCR "รายละเอียด" @@ -185,7 +184,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "เส้นทาง" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "กำลังดำเนินงาน" IDS_SERVICES_STATUS_STOPPED "หยุดแล้ว" diff --git a/base/applications/msconfig/lang/tr-TR.rc b/base/applications/msconfig/lang/tr-TR.rc index 5a33d81d857..d7dd868e858 100644 --- a/base/applications/msconfig/lang/tr-TR.rc +++ b/base/applications/msconfig/lang/tr-TR.rc @@ -4,21 +4,20 @@ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Dizge Yapılandırıcı" FONT 8, "MS Shell Dlg" BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32", WS_TABSTOP, 2, 2, 374, 195 DEFPUSHBUTTON "Tamam", IDOK, 211, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP PUSHBUTTON "&Yardım", IDC_BTN_HELP, 2, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP - PUSHBUTTON "Vazgeç", IDCANCEL, 267, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP + PUSHBUTTON "İptal", IDCANCEL, 267, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP PUSHBUTTON "&Uygula", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -27,7 +26,7 @@ BEGIN PUSHBUTTON "H&epsini Devre Dışı Bırak", IDC_BTN_STARTUP_DEACTIVATE, 295, 155, 66, 14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -46,7 +45,7 @@ BEGIN PUSHBUTTON "H&epsini Devre Dışı Bırak",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -55,7 +54,7 @@ BEGIN PUSHBUTTON "&Çalıştır", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -64,7 +63,7 @@ BEGIN PUSHBUTTON "H&epsini Devre Dışı Bırak", IDC_BTN_SERVICES_DEACTIVATE, 295, 155, 66, 14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -77,13 +76,13 @@ BEGIN AUTOCHECKBOX "B&aşlangıç Öğelerini Yükle", IDC_CBX_STARTUP_ITEM, 30, 110, 75, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN LISTBOX IDC_LIST_BOX, 10, 10, 340, 50, WS_CHILD | WS_VISIBLE | WS_TABSTOP | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL PUSHBUTTON "&Tüm Ön Yükleme Yollarını Denetle", IDC_BTN_CHECK_BOOT_PATH, 10, 65, 70, 12 - PUSHBUTTON "&Ön Tanımlı Yap", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 + PUSHBUTTON "&Öntanımlı Yap", IDC_BTN_SET_DEFAULT_BOOT, 100, 65, 70, 12 PUSHBUTTON "B&ir Yukarı Taşı", IDC_BTN_MOVE_UP_BOOT_OPTION, 190, 65, 70, 12 PUSHBUTTON "Bi&r Aşağı Taşı", IDC_BTN_MOVE_DOWN_BOOT_OPTION, 280, 65, 70, 12 GROUPBOX "Ön Yükleme Seçenekleri", -1, 10, 80, 250, 90,0,WS_EX_TRANSPARENT @@ -98,7 +97,7 @@ BEGIN LTEXT "sec.", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -120,10 +119,10 @@ BEGIN EDITTEXT IDC_TXT_CHANNEL, 80, 130, 60, 12, ES_LEFT CONTROL "",IDC_SCR_CHANNEL, "msctls_updown32", 0x50000000, 140, 130, 11, 11 PUSHBUTTON "Tamam", IDC_OK, 20, 160, 50, 12 - PUSHBUTTON "Vazgeç", IDC_CANCEL, 100, 160, 50, 12 + PUSHBUTTON "İptal", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "Dizge Yapılandırıcı" IDS_TAB_GENERAL "Umûmî" @@ -134,7 +133,7 @@ BEGIN IDS_TAB_TOOLS "Araçlar" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Hizmet" IDS_SERVICES_COLUMN_REQ "Gerekli" @@ -142,7 +141,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "Durum" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Ad" IDS_TOOLS_COLUMN_DESCR "Tanım" @@ -169,7 +168,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Yol" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "Çalışıyor" IDS_SERVICES_STATUS_STOPPED "Durduruldu" diff --git a/base/applications/msconfig/lang/uk-UA.rc b/base/applications/msconfig/lang/uk-UA.rc index 70fa300d69c..2cd2c6c8189 100644 --- a/base/applications/msconfig/lang/uk-UA.rc +++ b/base/applications/msconfig/lang/uk-UA.rc @@ -8,10 +8,9 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "Програма налаштування системи" FONT 8, "MS Shell Dlg" BEGIN @@ -22,7 +21,7 @@ BEGIN PUSHBUTTON "Заст&осувати", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -31,7 +30,7 @@ BEGIN PUSHBUTTON "&Деактивувати все",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -50,7 +49,7 @@ BEGIN PUSHBUTTON "Ви&мкнути Все",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -59,7 +58,7 @@ BEGIN PUSHBUTTON "&Запустити", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -68,7 +67,7 @@ BEGIN PUSHBUTTON "&Деактивувати все",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -81,7 +80,7 @@ BEGIN AUTOCHECKBOX "Завантажувати елементи &автозавантаження", IDC_CBX_STARTUP_ITEM, 30, 110, 175, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -102,7 +101,7 @@ BEGIN LTEXT "сек.", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -127,7 +126,7 @@ BEGIN PUSHBUTTON "Скасувати", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "Програма налаштування системи" IDS_TAB_GENERAL "Загальні" @@ -138,7 +137,7 @@ BEGIN IDS_TAB_TOOLS "Утиліти" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "Служба" IDS_SERVICES_COLUMN_REQ "Вимагає" @@ -146,7 +145,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "Стан" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "Назва" IDS_TOOLS_COLUMN_DESCR "Опис" @@ -173,7 +172,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "Шлях" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "Працює" IDS_SERVICES_STATUS_STOPPED "Зупинена" diff --git a/base/applications/msconfig/lang/zh-CN.rc b/base/applications/msconfig/lang/zh-CN.rc index d819198576f..74cbba013f7 100644 --- a/base/applications/msconfig/lang/zh-CN.rc +++ b/base/applications/msconfig/lang/zh-CN.rc @@ -20,10 +20,9 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "系统配置实用程序" FONT 8, "MS Shell Dlg" BEGIN @@ -34,7 +33,7 @@ BEGIN PUSHBUTTON "应用", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -43,7 +42,7 @@ BEGIN PUSHBUTTON "全部禁用(&D)",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -62,7 +61,7 @@ BEGIN PUSHBUTTON "全部禁用(&L)",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -71,7 +70,7 @@ BEGIN PUSHBUTTON "运行(&R)", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -80,7 +79,7 @@ BEGIN PUSHBUTTON "全部禁用(&D)",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -93,7 +92,7 @@ BEGIN AUTOCHECKBOX "加载启动项(&O)", IDC_CBX_STARTUP_ITEM, 30, 110, 75, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -114,7 +113,7 @@ BEGIN LTEXT "秒", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -139,7 +138,7 @@ BEGIN PUSHBUTTON "取消", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "系统配置实用程序" IDS_TAB_GENERAL "一般" @@ -150,7 +149,7 @@ BEGIN IDS_TAB_TOOLS "工具" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "服务" IDS_SERVICES_COLUMN_REQ "基本的" @@ -158,7 +157,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "状态" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "名称" IDS_TOOLS_COLUMN_DESCR "描述" @@ -185,7 +184,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "位置" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "正在运行" IDS_SERVICES_STATUS_STOPPED "已停止" diff --git a/base/applications/msconfig/lang/zh-TW.rc b/base/applications/msconfig/lang/zh-TW.rc index ddadd6ffbad..f351814e50e 100644 --- a/base/applications/msconfig/lang/zh-TW.rc +++ b/base/applications/msconfig/lang/zh-TW.rc @@ -21,10 +21,9 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL -IDD_MSCONFIG_DIALOG DIALOGEX DISCARDABLE 0, 0, 378, 220 +IDD_MSCONFIG_DIALOG DIALOGEX 0, 0, 378, 220 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | - WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | - WS_THICKFRAME + WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU CAPTION "系統設定" FONT 8, "MS Shell Dlg" BEGIN @@ -35,7 +34,7 @@ BEGIN PUSHBUTTON "套用", IDC_BTN_APPLY, 323, 201, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_STARTUP_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_STARTUP_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -44,7 +43,7 @@ BEGIN PUSHBUTTON "全部禁用(&D)",IDC_BTN_STARTUP_DEACTIVATE,295,155,66,14 END -IDD_SYSTEM_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SYSTEM_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -63,7 +62,7 @@ BEGIN PUSHBUTTON "全部禁用(&L)",IDC_BTN_SYSTEM_DEACTIVATE, 195, 155, 66, 14 END -IDD_TOOLS_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_TOOLS_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -72,7 +71,7 @@ BEGIN PUSHBUTTON "運行(&R)", IDC_BTN_RUN, 311, 155, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP END -IDD_SERVICES_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_SERVICES_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -81,7 +80,7 @@ BEGIN PUSHBUTTON "全部禁用(&D)",IDC_BTN_SERVICES_DEACTIVATE,295,155,66,14 END -IDD_GENERAL_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_GENERAL_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -94,7 +93,7 @@ BEGIN AUTOCHECKBOX "載入啟動項目(&O)", IDC_CBX_STARTUP_ITEM, 30, 110, 75, 10 END -IDD_FREELDR_PAGE DIALOGEX DISCARDABLE 0, 0, 362, 175 +IDD_FREELDR_PAGE DIALOGEX 0, 0, 362, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -115,7 +114,7 @@ BEGIN LTEXT "秒", -1, 340, 91, 15, 10 END -IDD_FREELDR_ADVANCED_PAGE DIALOGEX DISCARDABLE 0, 0, 175, 175 +IDD_FREELDR_ADVANCED_PAGE DIALOGEX 0, 0, 175, 175 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -140,7 +139,7 @@ BEGIN PUSHBUTTON "取消", IDC_CANCEL, 100, 160, 50, 12 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSCONFIG "系統設定" IDS_TAB_GENERAL "一般" @@ -151,7 +150,7 @@ BEGIN IDS_TAB_TOOLS "工具" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_COLUMN_SERVICE "服務" IDS_SERVICES_COLUMN_REQ "基本的" @@ -159,7 +158,7 @@ BEGIN IDS_SERVICES_COLUMN_STATUS "狀態" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLS_COLUMN_NAME "名稱" IDS_TOOLS_COLUMN_DESCR "描述" @@ -186,7 +185,7 @@ BEGIN IDS_STARTUP_COLUMN_PATH "位置" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STATUS_RUNNING "執行中" IDS_SERVICES_STATUS_STOPPED "已停止" diff --git a/base/applications/msconfig/msconfig.rc b/base/applications/msconfig/msconfig.rc index 599fe3ce30e..7ddf6ad3f75 100644 --- a/base/applications/msconfig/msconfig.rc +++ b/base/applications/msconfig/msconfig.rc @@ -14,4 +14,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDI_APPICON ICON "res/msconfig.ico" +#include + #include "rsrc.rc" diff --git a/base/applications/mscutils/devmgmt/devmgmt.rc b/base/applications/mscutils/devmgmt/devmgmt.rc index 4c763675edd..a022eb1cbdb 100644 --- a/base/applications/mscutils/devmgmt/devmgmt.rc +++ b/base/applications/mscutils/devmgmt/devmgmt.rc @@ -8,4 +8,6 @@ #define REACTOS_STR_ORIGINAL_FILENAME "devmgmt.exe\0" #include +#include + #include "rsrc.rc" diff --git a/base/applications/mscutils/devmgmt/lang/bg-BG.rc b/base/applications/mscutils/devmgmt/lang/bg-BG.rc index 2fb7502a5f4..6c1e90a5420 100644 --- a/base/applications/mscutils/devmgmt/lang/bg-BG.rc +++ b/base/applications/mscutils/devmgmt/lang/bg-BG.rc @@ -51,12 +51,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Свойства" IDS_TOOLTIP_REFRESH "Опресняване" @@ -65,7 +65,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Управител на устройствата на РеактОС" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/cs-CZ.rc b/base/applications/mscutils/devmgmt/lang/cs-CZ.rc index da106b42ce4..6f0f57a28f0 100644 --- a/base/applications/mscutils/devmgmt/lang/cs-CZ.rc +++ b/base/applications/mscutils/devmgmt/lang/cs-CZ.rc @@ -51,12 +51,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Vlastnosti" IDS_TOOLTIP_REFRESH "Obnovit" @@ -65,7 +65,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS Správce zařízení" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/de-DE.rc b/base/applications/mscutils/devmgmt/lang/de-DE.rc index fa35ce1faf1..82fc5d43a85 100644 --- a/base/applications/mscutils/devmgmt/lang/de-DE.rc +++ b/base/applications/mscutils/devmgmt/lang/de-DE.rc @@ -51,12 +51,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Dieses Programm ist kostenlos; Sie können es frei verteilen mit od. ohne Änderungen unter der GNU Lesser General Public License, wie es von der Free Software Foundation veröffentlicht wurde; entweder Version 2.1 der Lizenz, oder eine spätere Version (ihrer Wahl).\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Eigenschaften" IDS_TOOLTIP_REFRESH "Aktualisieren" @@ -65,7 +65,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS Geräte-Manager" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/el-GR.rc b/base/applications/mscutils/devmgmt/lang/el-GR.rc index de9feacaa4a..0a226d47df5 100644 --- a/base/applications/mscutils/devmgmt/lang/el-GR.rc +++ b/base/applications/mscutils/devmgmt/lang/el-GR.rc @@ -51,12 +51,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Ιδιότητες" IDS_TOOLTIP_REFRESH "Ανανέωση" @@ -65,7 +65,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Διαχείριση Συσκευών του ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/en-US.rc b/base/applications/mscutils/devmgmt/lang/en-US.rc index 53b072cd950..5ff5d51458d 100644 --- a/base/applications/mscutils/devmgmt/lang/en-US.rc +++ b/base/applications/mscutils/devmgmt/lang/en-US.rc @@ -51,12 +51,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Properties" IDS_TOOLTIP_REFRESH "Refresh" @@ -65,7 +65,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS Device Manager" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/es-ES.rc b/base/applications/mscutils/devmgmt/lang/es-ES.rc index d9a70f73f9e..a77cbf250be 100644 --- a/base/applications/mscutils/devmgmt/lang/es-ES.rc +++ b/base/applications/mscutils/devmgmt/lang/es-ES.rc @@ -56,12 +56,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Propiedades" IDS_TOOLTIP_REFRESH "Actualizar" @@ -70,7 +70,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Gestor de Dispositivos de ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/fr-FR.rc b/base/applications/mscutils/devmgmt/lang/fr-FR.rc index b884c697153..3c647dacbd2 100644 --- a/base/applications/mscutils/devmgmt/lang/fr-FR.rc +++ b/base/applications/mscutils/devmgmt/lang/fr-FR.rc @@ -51,12 +51,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier tout en respectant les termes de la ""GNU General Public License"" publiée par la Free Software Foundation; dans sa version 2 (ou selon votre préférence) toute version ultérieure.\r\n\r\nCe programme est distribué dans l'espoir qu'il sera utile, cependant SANS GARANTIE D'AUCUNE SORTE ; sans même une garantie implicite de COMMERCIABILITÉ ou DE CONFORMITÉ À UNE UTILISATION PARTICULIÈRE. \r\n\r\nVoir la Licence Publique Générale GNU pour plus de détails. Vous devriez avoir reçu un exemplaire de la Licence Publique Générale GNU avec ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Propriétés" IDS_TOOLTIP_REFRESH "Actualiser" @@ -65,7 +65,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Gestionnaire de périphériques ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/he-IL.rc b/base/applications/mscutils/devmgmt/lang/he-IL.rc index 2b4cd6fd066..57c88a7372d 100644 --- a/base/applications/mscutils/devmgmt/lang/he-IL.rc +++ b/base/applications/mscutils/devmgmt/lang/he-IL.rc @@ -51,12 +51,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "מאפיינים" IDS_TOOLTIP_REFRESH "רענן" @@ -65,7 +65,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "מנהל ההתקנים של ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/id-ID.rc b/base/applications/mscutils/devmgmt/lang/id-ID.rc index c91207ed816..d6246c8333a 100644 --- a/base/applications/mscutils/devmgmt/lang/id-ID.rc +++ b/base/applications/mscutils/devmgmt/lang/id-ID.rc @@ -51,12 +51,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Program ini adalah software bebas; anda dapat mendistribusikan dan/atau mengubahnya di bawah term GNU General Public License seperti dipublikasikan oleh Free Software Foundation; baik Lisensi versi 2, atau (menurut opini anda) setiap versi berikutnya.\r\n\r\nProgram ini didistribusikan dengan harapan ia akan berguna, tetapi TANPA JAMINAN APAPUN; bahkan tanpa jaminan berarti dari MERCANTABILITAS atau KECUKUPAN UNTUK KEPERLUAN TERTENTU. Lihat GNU General Public License untuk lebih jelasnya.\r\n\r\nAnda seharusnya menerima duplikat GNU General Public License bersamaan dengan program ini; jika tidak, tulis ke Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Properti" IDS_TOOLTIP_REFRESH "Segarkan" @@ -65,7 +65,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Manajer Device ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/it-IT.rc b/base/applications/mscutils/devmgmt/lang/it-IT.rc index e918c5fb9f2..f2df3cfac3d 100644 --- a/base/applications/mscutils/devmgmt/lang/it-IT.rc +++ b/base/applications/mscutils/devmgmt/lang/it-IT.rc @@ -51,12 +51,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Questo programma è software libero; puoi distribuirlo e/o modificarlo nei termini di licenza di 'GNU General Public License' come pubblicata dalla 'Free Software Foundation'; entrambe le versioni 2 della Licenza, o (a vostra scelta) qualunque versione successiva.\r\n\r\nQuesto programma è distribuito con l'augurio che sia utile, ma PRIVO DI OGNI GARANZIA; privo anche della garanzia implicita di COMMERCIABILITÀ o UTILIZZABILITÀ PER UNO SPECIFICO USO. Vedi la 'GNU General Public License' per ulteriori dettagli.\r\n\r\nVoi dovreste aver ricevuto una copia della 'GNU General Public License' assieme a questo programma; se non è cosi' scrivete a 'Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Proprietà" IDS_TOOLTIP_REFRESH "Aggiorna" @@ -65,7 +65,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS: Gestione Dispositivi" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/ja-JP.rc b/base/applications/mscutils/devmgmt/lang/ja-JP.rc index 213a8205a0e..3a9f99dae16 100644 --- a/base/applications/mscutils/devmgmt/lang/ja-JP.rc +++ b/base/applications/mscutils/devmgmt/lang/ja-JP.rc @@ -51,12 +51,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "プロパティ" IDS_TOOLTIP_REFRESH "更新" @@ -65,7 +65,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS デバイス マネージャ" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/ko-KR.rc b/base/applications/mscutils/devmgmt/lang/ko-KR.rc index fe1f77ec5e6..0198254ab9a 100644 --- a/base/applications/mscutils/devmgmt/lang/ko-KR.rc +++ b/base/applications/mscutils/devmgmt/lang/ko-KR.rc @@ -55,12 +55,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "속성" IDS_TOOLTIP_REFRESH "새로 고침" @@ -69,7 +69,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS 장치 관리자" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/no-NO.rc b/base/applications/mscutils/devmgmt/lang/no-NO.rc index 2646ec1b9db..d6ae775fe7f 100644 --- a/base/applications/mscutils/devmgmt/lang/no-NO.rc +++ b/base/applications/mscutils/devmgmt/lang/no-NO.rc @@ -51,12 +51,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Dette programmet er gratis programvare; du kan distribuere det og/eller endre det under betingelsene av GNU General Public License som er utgitt av Free Software Foundation; version 2 av lisensen, eller (etter din mening) alle senere versjoner.\r\n\r\nDette programmet er utgitt i håp for at det skal kunne brukes, men DET ER INGEN GARANTIER; uten heller forutsatt garantier av SALGBARHET eller SIKKETHET FOR EN ENKELTHET FORMÅL. Se på GNU General Public Lisensen for mere detaljer.\r\n\r\nDu skal ha motatt en kopi av GNU General Public Lisensen sammen med denne programmet; hvis du ikke har motatt det, skriv til Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Egenskaper" IDS_TOOLTIP_REFRESH "Oppdater" @@ -65,7 +65,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS Enhetsbehandler" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/pl-PL.rc b/base/applications/mscutils/devmgmt/lang/pl-PL.rc index 3f36f576d10..79446d75fb2 100644 --- a/base/applications/mscutils/devmgmt/lang/pl-PL.rc +++ b/base/applications/mscutils/devmgmt/lang/pl-PL.rc @@ -58,12 +58,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Niniejszy program jest wolnym oprogramowaniem; możesz go rozprowadzać dalej i/lub modyfikować na warunkach Powszechnej Licencji Publicznej GNU, wydanej przez Fundację Wolnego Oprogramowania - według wersji 2 tej Licencji lub (według twojego wyboru) którejś z późniejszych wersji.\r\n\r\nNiniejszy program rozpowszechniany jest z nadzieją, iż będzie on użyteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domyślnej gwarancji PRZYDATNOŚCI HANDLOWEJ albo PRZYDATNOŚCI DO OKREŚLONYCH ZASTOSOWAŃ. W celu uzyskania bliższych informacji sięgnij do Powszechnej Licencji Publicznej GNU.\r\n\r\nZ pewnością wraz z niniejszym programem otrzymałeś też egzemplarz Powszechnej Licencji Publicznej GNU (GNU General Public License); jeśli nie - napisz do Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Właściwości" IDS_TOOLTIP_REFRESH "Odśwież" @@ -72,7 +72,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Menedżer urządzeń ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/pt-BR.rc b/base/applications/mscutils/devmgmt/lang/pt-BR.rc index 9615c5195f3..f85e080e44c 100644 --- a/base/applications/mscutils/devmgmt/lang/pt-BR.rc +++ b/base/applications/mscutils/devmgmt/lang/pt-BR.rc @@ -53,12 +53,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Propriedades" IDS_TOOLTIP_REFRESH "Atualizar" @@ -67,7 +67,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Gerenciador de Dispositivos ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/ro-RO.rc b/base/applications/mscutils/devmgmt/lang/ro-RO.rc index eba4d44e0d2..65eb8360a2c 100644 --- a/base/applications/mscutils/devmgmt/lang/ro-RO.rc +++ b/base/applications/mscutils/devmgmt/lang/ro-RO.rc @@ -52,12 +52,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 47, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Această aplicație este publică; fiind permisă modificarea și/sau (re)distribuția sa în termenii Licenței Publice Generale GNU publicată de Free Software Foundation; sau versiunea 2 a Licenței, sau (la alegere) a oricărei versiuni ulterioare.\r\n\r\nAceastă aplicație este distribuită doar în speranța de a fi utilă, FĂRĂ însă NICI O GARANȚIE; nici măcar cu garanția implicită a VANDABILITĂȚII sau a UTILITĂȚII ÎNTR-UN SCOP ANUME. Pentru mai multe detalii consultați Licența Publică Generală GNU.\r\n\r\nPuteți vedea această licență aici:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nDe asemenea puteți consulta traduceri neoficiale ale acestei licențe aici:\r\nhttp://www.gnu.org/licenses/translations.html" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Proprietăți" IDS_TOOLTIP_REFRESH "Împrospătare" @@ -66,7 +66,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Gestionar de dispozitive ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/ru-RU.rc b/base/applications/mscutils/devmgmt/lang/ru-RU.rc index 3e7bf3e79c4..558339c4b41 100644 --- a/base/applications/mscutils/devmgmt/lang/ru-RU.rc +++ b/base/applications/mscutils/devmgmt/lang/ru-RU.rc @@ -53,12 +53,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Эта программа является свободно распространяемой; Вы можете распространять ее повторно и (или) изменять, соблюдая условия Открытого лицензионного соглашения GNU, опубликованного Фондом свободно распространяемого программного обеспечения; либо редакции 2 Соглашения, либо (на ваше усмотрение) любой редакции, выпущенной позже.\r\n\r\nЭта программа распространяется в надежде на то, что она окажется полезной, но БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ, включая подразумеваемую гарантию КАЧЕСТВА либо ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННЫХ ЦЕЛЕЙ. Подробности содержатся в Открытом лицензионном соглашении GNU.\r\n\r\nВместе с этой программой должен распространяться экземпляр Открытого лицензионного соглашения GNU, если он отсутствует, сообщите об этом в Фонд свободно распространяемого программного обеспечения (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Свойства" IDS_TOOLTIP_REFRESH "Обновить" @@ -67,7 +67,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Диспетчер устройств ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/sk-SK.rc b/base/applications/mscutils/devmgmt/lang/sk-SK.rc index c888c8f0ea9..02d969a983f 100644 --- a/base/applications/mscutils/devmgmt/lang/sk-SK.rc +++ b/base/applications/mscutils/devmgmt/lang/sk-SK.rc @@ -56,12 +56,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Tento program je voľný softvér; môžete ho šíriť a/alebo modifikovať podľa podmienok GNU Všeobecnej verejnej licencie (GNU General Public License) ako bola zverejnená nadáciou Free Software Foundation; buď verzie 2 tejto licencie, alebo (podľa Vášho uváženia) niektorej neskoršej verzie.\r\n\r\nTento program je distribuovaný v nádeji, že bude užitočný, avšak BEZ AKEJKOĽVEK ZÁRUKY; rovnako bez záruky PREDAJNOSTI alebo VHODNOSTI PRE URČITÝ ÚČEL. Pre viac detailov si pozrite GNU Všeobecnú verejnú licenciu (GNU General Public License).\r\n\r\nKópiu Všeobecnej verejnej licencie GNU ste mali dostať spolu s týmto programom; ak nie, napíšte si o ňu na Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Vlastnosti" IDS_TOOLTIP_REFRESH "Obnoviť" @@ -70,7 +70,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Správca zariadení systému ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/sv-SE.rc b/base/applications/mscutils/devmgmt/lang/sv-SE.rc index 7bd07b51948..f603bd69349 100644 --- a/base/applications/mscutils/devmgmt/lang/sv-SE.rc +++ b/base/applications/mscutils/devmgmt/lang/sv-SE.rc @@ -58,12 +58,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Detta programmet är fri programvara; du kan distribuera det och/eller ändra det under villkoren enligt GNU General Public License som är utgivet av Free Software Foundation; version 2, eller (om du så önskar) alla senare versioner.\r\n\r\nDette programmet er utgivet i hopp om att det skall kunne användas, men DET FINNS INGA GARANTIER; även utan underförstådd garanti om SÄLJBARHET eller LÄMPLIGHET FÖR ETT VISST ÄNDAMÅL. Se på GNU General Public Licensen för mer detaljer.\r\n\r\nDu skall ha motagit en kopia av GNU General Public Licensen tillsammans med detta programmet; om du inte har fått det, skriv til Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Egenskaper" IDS_TOOLTIP_REFRESH "Uppdater" @@ -72,7 +72,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS Enhetshanterare" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/th-TH.rc b/base/applications/mscutils/devmgmt/lang/th-TH.rc index b2c12895df4..28f4b858a18 100644 --- a/base/applications/mscutils/devmgmt/lang/th-TH.rc +++ b/base/applications/mscutils/devmgmt/lang/th-TH.rc @@ -59,12 +59,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "คุณสมบัติ" IDS_TOOLTIP_REFRESH "ฟื้นฟู" @@ -73,7 +73,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "การจัดการอุปกรณ์ของ ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/uk-UA.rc b/base/applications/mscutils/devmgmt/lang/uk-UA.rc index 3b9e8fd72ff..d6fdecb16ac 100644 --- a/base/applications/mscutils/devmgmt/lang/uk-UA.rc +++ b/base/applications/mscutils/devmgmt/lang/uk-UA.rc @@ -59,12 +59,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Це вільне програмне забезпечення; Ви можете розповсюджувати її та змінювати, дотримуючись умови Відкритої ліцензійної угоди GNU, опублікованої Фондом вільного програмного забезпечення; або редакції 2 Угоди, або будь-якої редакції, випущеної пізніше.\r\n\r\nЦя програма розповсюджується в надії на те, що вона виявиться корисною, але БЕЗ БУДЬ-ЯКИХ ГАРАНТІЙ, включаючи УЯВНОЮ ГАРАНТІЄЮ ЯКОСТІ або ПРИДАТНОСТІ для певних цілей. Подробиці містяться у Відкритій ліцензійній угоді GNU.\r\n\r\nРазом з цією програмою повинен поширюватися примірник Відкритої ліцензійної угоди GNU. Якщо він відсутній, повідомте про це в Фонд вільного програмного забезпечення (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Властивості" IDS_TOOLTIP_REFRESH "Оновити" @@ -73,7 +73,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Диспетчер пристроїв ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/lang/zh-CN.rc b/base/applications/mscutils/devmgmt/lang/zh-CN.rc index 6ef4fc49d42..c853daff019 100644 --- a/base/applications/mscutils/devmgmt/lang/zh-CN.rc +++ b/base/applications/mscutils/devmgmt/lang/zh-CN.rc @@ -55,12 +55,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "这个程序是自由软件;你可以在自由软件基金会(FSF)的 GNU LGPL 协议下重新发布或修改它;也适用于这个协议的版本 2,或(在您看来)任何更新的版本。\r\n\r\n这个程序在希望其有用的愿望中发布,但没有任何保证;也不意味着性能保证或对某特定用途的适用性。请查看 GNU GPL 许可协议以了解更多细节。\r\n\r\n您应该已经收到了一份和这个程序一起的 GNU GPL 协议的副本;如果没有,请写信给自由软件基金会(FSF):51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "属性" IDS_TOOLTIP_REFRESH "刷新" @@ -69,7 +69,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS 设备管理器" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt/rsrc.rc b/base/applications/mscutils/devmgmt/rsrc.rc index 4148809f4db..830935150a6 100644 --- a/base/applications/mscutils/devmgmt/rsrc.rc +++ b/base/applications/mscutils/devmgmt/rsrc.rc @@ -4,10 +4,10 @@ IDI_MAIN_ICON ICON "res/computer.ico" IDB_ROOT_IMAGE BITMAP "res/root.bmp" /* main toolbar icons */ -IDB_PROP BITMAP DISCARDABLE "res/properties.bmp" -IDB_REFRESH BITMAP DISCARDABLE "res/refresh.bmp" -IDB_HELP BITMAP DISCARDABLE "res/help.bmp" -IDB_EXIT BITMAP DISCARDABLE "res/exit.bmp" +IDB_PROP BITMAP "res/properties.bmp" +IDB_REFRESH BITMAP "res/refresh.bmp" +IDB_HELP BITMAP "res/help.bmp" +IDB_EXIT BITMAP "res/exit.bmp" // UTF-8 #pragma code_page(65001) diff --git a/base/applications/mscutils/devmgmt_new/lang/bg-BG.rc b/base/applications/mscutils/devmgmt_new/lang/bg-BG.rc index 702ffe69337..b2ec272c453 100644 --- a/base/applications/mscutils/devmgmt_new/lang/bg-BG.rc +++ b/base/applications/mscutils/devmgmt_new/lang/bg-BG.rc @@ -44,12 +44,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "" IDS_TOOLTIP_REFRESH "" @@ -58,7 +58,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME " " IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/de-DE.rc b/base/applications/mscutils/devmgmt_new/lang/de-DE.rc index 687823e40ec..9fcd99f6f7a 100644 --- a/base/applications/mscutils/devmgmt_new/lang/de-DE.rc +++ b/base/applications/mscutils/devmgmt_new/lang/de-DE.rc @@ -44,12 +44,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Dieses Programm ist kostenlos; Sie knnen es frei verteilen mit od. ohne nderungen unter der GNU Lesser General Public License, wie es von der Free Software Foundation verffentlicht wurde; entweder Version 2.1 der Lizenz, oder eine sptere Version (ihrer Wahl).\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Eigenschaften" IDS_TOOLTIP_REFRESH "Aktualisieren" @@ -58,7 +58,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS Gerte-Manager" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/el-GR.rc b/base/applications/mscutils/devmgmt_new/lang/el-GR.rc index 9e0d61c3ff2..9280afabc4c 100644 --- a/base/applications/mscutils/devmgmt_new/lang/el-GR.rc +++ b/base/applications/mscutils/devmgmt_new/lang/el-GR.rc @@ -44,12 +44,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "" IDS_TOOLTIP_REFRESH "" @@ -58,7 +58,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME " ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/en-US.rc b/base/applications/mscutils/devmgmt_new/lang/en-US.rc index fbcdd9af710..d66316605fc 100644 --- a/base/applications/mscutils/devmgmt_new/lang/en-US.rc +++ b/base/applications/mscutils/devmgmt_new/lang/en-US.rc @@ -44,12 +44,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Properties" IDS_TOOLTIP_REFRESH "Refresh" @@ -58,7 +58,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS Device Manager" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/es-ES.rc b/base/applications/mscutils/devmgmt_new/lang/es-ES.rc index 19ea7fc332f..2455689e9c9 100644 --- a/base/applications/mscutils/devmgmt_new/lang/es-ES.rc +++ b/base/applications/mscutils/devmgmt_new/lang/es-ES.rc @@ -48,12 +48,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Propiedades" IDS_TOOLTIP_REFRESH "Actualizar" @@ -62,7 +62,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Gestor de Dispositivos de ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/fr-FR.rc b/base/applications/mscutils/devmgmt_new/lang/fr-FR.rc index 25fe2fd2738..1e59b0e42cb 100644 --- a/base/applications/mscutils/devmgmt_new/lang/fr-FR.rc +++ b/base/applications/mscutils/devmgmt_new/lang/fr-FR.rc @@ -44,12 +44,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier tout en respectant les termes de la ""GNU General Public License"" publie par la Free Software Foundation; dans sa version 2 (ou selon votre prfrence) toute version ultrieure.\r\n\r\nCe programme est distribu dans l'espoir qu'il sera utile, cependant SANS GARANTIE D'AUCUNE SORTE ; sans mme une garantie implicite de COMMERCIABILIT ou DE CONFORMIT UNE UTILISATION PARTICULIRE. \r\n\r\nVoir la Licence Publique Gnrale GNU pour plus de dtails. Vous devriez avoir reu un exemplaire de la Licence Publique Gnrale GNU avec ce programme ; si ce n'est pas le cas, crivez la Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Proprits" IDS_TOOLTIP_REFRESH "Actualiser" @@ -58,7 +58,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Gestionnaire de priphriques ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/he-IL.rc b/base/applications/mscutils/devmgmt_new/lang/he-IL.rc index a3b86066b8e..780fb913935 100644 --- a/base/applications/mscutils/devmgmt_new/lang/he-IL.rc +++ b/base/applications/mscutils/devmgmt_new/lang/he-IL.rc @@ -44,12 +44,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "מאפיינים" IDS_TOOLTIP_REFRESH "רענן" @@ -58,7 +58,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "מנהל ההתקנים של ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/id-ID.rc b/base/applications/mscutils/devmgmt_new/lang/id-ID.rc index a170a4a4886..97ee99f558c 100644 --- a/base/applications/mscutils/devmgmt_new/lang/id-ID.rc +++ b/base/applications/mscutils/devmgmt_new/lang/id-ID.rc @@ -44,12 +44,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Program ini adalah software bebas; anda dapat mendistribusikan dan/atau mengubahnya di bawah term GNU General Public License seperti dipublikasikan oleh Free Software Foundation; baik Lisensi versi 2, atau (menurut opini anda) setiap versi berikutnya.\r\n\r\nProgram ini didistribusikan dengan harapan ia akan berguna, tetapi TANPA JAMINAN APAPUN; bahkan tanpa jaminan berarti dari MERCANTABILITAS atau KECUKUPAN UNTUK KEPERLUAN TERTENTU. Lihat GNU General Public License untuk lebih jelasnya.\r\n\r\nAnda seharusnya menerima duplikat GNU General Public License bersamaan dengan program ini; jika tidak, tulis ke Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Properti" IDS_TOOLTIP_REFRESH "Segarkan" @@ -58,7 +58,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Manajer Device ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/it-IT.rc b/base/applications/mscutils/devmgmt_new/lang/it-IT.rc index 47975e427ca..92a954b4102 100644 --- a/base/applications/mscutils/devmgmt_new/lang/it-IT.rc +++ b/base/applications/mscutils/devmgmt_new/lang/it-IT.rc @@ -44,12 +44,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Questo programma software libero; puoi distribuirlo e/o modificarlo nei termini di licenza di 'GNU General Public License' come pubblicata dalla 'Free Software Foundation'; entrambe le versioni 2 della Licenza, o (a vostra scelta) qualunque versione successiva.\r\n\r\nQuesto programma distribuito con l'augurio che sia utile, ma PRIVO DI OGNI GARANZIA; privo anche della garanzia implicita di COMMERCIABILIT o UTILIZZABILIT PER UNO SPECIFICO USO. Vedi la 'GNU General Public License' per ulteriori dettagli.\r\n\r\nVoi dovreste aver ricevuto una copia della 'GNU General Public License' assieme a questo programma; se non cosi' scrivete a 'Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Propriet" IDS_TOOLTIP_REFRESH "Aggiorna" @@ -58,7 +58,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS: Gestione Dispositivi" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/ja-JP.rc b/base/applications/mscutils/devmgmt_new/lang/ja-JP.rc index 11db0d1785b..5214169a44b 100644 --- a/base/applications/mscutils/devmgmt_new/lang/ja-JP.rc +++ b/base/applications/mscutils/devmgmt_new/lang/ja-JP.rc @@ -44,12 +44,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "vpeB" IDS_TOOLTIP_REFRESH "XV" @@ -58,7 +58,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS foCX }l[W" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/ko-KR.rc b/base/applications/mscutils/devmgmt_new/lang/ko-KR.rc index 08516f30660..b75ee5ebae5 100644 --- a/base/applications/mscutils/devmgmt_new/lang/ko-KR.rc +++ b/base/applications/mscutils/devmgmt_new/lang/ko-KR.rc @@ -47,12 +47,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Ӽ" IDS_TOOLTIP_REFRESH " ħ" @@ -61,7 +61,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS ġ " IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/no-NO.rc b/base/applications/mscutils/devmgmt_new/lang/no-NO.rc index fdd86474e81..27a43d071d3 100644 --- a/base/applications/mscutils/devmgmt_new/lang/no-NO.rc +++ b/base/applications/mscutils/devmgmt_new/lang/no-NO.rc @@ -44,12 +44,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Dette programmet er gratis programvare; du kan distribuere det og/eller endre det under betingelsene av GNU General Public License som er utgitt av Free Software Foundation; version 2 av lisensen, eller (etter din mening) alle senere versjoner.\r\n\r\nDette programmet er utgitt i hp for at det skal kunne brukes, men DET ER INGEN GARANTIER; uten heller forutsatt garantier av SALGBARHET eller SIKKETHET FOR EN ENKELTHET FORML. Se p GNU General Public Lisensen for mere detaljer.\r\n\r\nDu skal ha motatt en kopi av GNU General Public Lisensen sammen med denne programmet; hvis du ikke har motatt det, skriv til Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Egenskaper" IDS_TOOLTIP_REFRESH "Oppdater" @@ -58,7 +58,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS Enhetsbehandler" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/pl-PL.rc b/base/applications/mscutils/devmgmt_new/lang/pl-PL.rc index 0b3ab9c383b..181ea8150cd 100644 --- a/base/applications/mscutils/devmgmt_new/lang/pl-PL.rc +++ b/base/applications/mscutils/devmgmt_new/lang/pl-PL.rc @@ -51,12 +51,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Niniejszy program jest wolnym oprogramowaniem; możesz go rozprowadzać dalej i/lub modyfikować na warunkach Powszechnej Licencji Publicznej GNU, wydanej przez Fundację Wolnego Oprogramowania - według wersji 2 tej Licencji lub (według twojego wyboru) którejś z późniejszych wersji.\r\n\r\nNiniejszy program rozpowszechniany jest z nadzieją, iż będzie on użyteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domyślnej gwarancji PRZYDATNOŚCI HANDLOWEJ albo PRZYDATNOŚCI DO OKREŚLONYCH ZASTOSOWAŃ. W celu uzyskania bliższych informacji sięgnij do Powszechnej Licencji Publicznej GNU.\r\n\r\nZ pewnością wraz z niniejszym programem otrzymałeś też egzemplarz Powszechnej Licencji Publicznej GNU (GNU General Public License); jeśli nie - napisz do Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Właściwości" IDS_TOOLTIP_REFRESH "Odśwież" @@ -65,7 +65,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Menedżer urządzeń ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/pt-BR.rc b/base/applications/mscutils/devmgmt_new/lang/pt-BR.rc index fdd44cc6036..d2104effc4b 100644 --- a/base/applications/mscutils/devmgmt_new/lang/pt-BR.rc +++ b/base/applications/mscutils/devmgmt_new/lang/pt-BR.rc @@ -46,12 +46,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Propriedades" IDS_TOOLTIP_REFRESH "Atualizar" @@ -60,7 +60,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Gerenciador de Dispositivos ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/ro-RO.rc b/base/applications/mscutils/devmgmt_new/lang/ro-RO.rc index e8b72a2e5db..3f59aed1498 100644 --- a/base/applications/mscutils/devmgmt_new/lang/ro-RO.rc +++ b/base/applications/mscutils/devmgmt_new/lang/ro-RO.rc @@ -45,12 +45,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 47, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Această aplicație este publică; fiind permisă modificarea și/sau (re)distribuția sa în termenii Licenței Publice Generale GNU publicată de Free Software Foundation; sau versiunea 2 a Licenței, sau (la alegere) a oricărei versiuni ulterioare.\r\n\r\nAceastă aplicație este distribuită doar în speranța de a fi utilă, FĂRĂ însă NICI O GARANȚIE; nici măcar cu garanția implicită a VANDABILITĂȚII sau a UTILITĂȚII ÎNTR-UN SCOP ANUME. Pentru mai multe detalii consultați Licența Publică Generală GNU.\r\n\r\nPuteți vedea această licență aici:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nDe asemenea puteți consulta traduceri neoficiale ale acestei licențe aici:\r\nhttp://www.gnu.org/licenses/translations.html" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Proprietăți" IDS_TOOLTIP_REFRESH "Împrospătare" @@ -59,7 +59,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Gestionar de dispozitive ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/ru-RU.rc b/base/applications/mscutils/devmgmt_new/lang/ru-RU.rc index b2c2675a394..88192a72dad 100644 --- a/base/applications/mscutils/devmgmt_new/lang/ru-RU.rc +++ b/base/applications/mscutils/devmgmt_new/lang/ru-RU.rc @@ -46,12 +46,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Эта программа является свободно распространяемой; Вы можете распространять ее повторно и (или) изменять, соблюдая условия Открытого лицензионного соглашения GNU, опубликованного Фондом свободно распространяемого программного обеспечения; либо редакции 2 Соглашения, либо (на ваше усмотрение) любой редакции, выпущенной позже.\r\n\r\nЭта программа распространяется в надежде на то, что она окажется полезной, но БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ, включая подразумеваемую гарантию КАЧЕСТВА либо ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННЫХ ЦЕЛЕЙ. Подробности содержатся в Открытом лицензионном соглашении GNU.\r\n\r\nВместе с этой программой должен распространяться экземпляр Открытого лицензионного соглашения GNU, если он отсутствует, сообщите об этом в Фонд свободно распространяемого программного обеспечения (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Свойства" IDS_TOOLTIP_REFRESH "Обновить" @@ -60,7 +60,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Диспетчер устройств ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/sk-SK.rc b/base/applications/mscutils/devmgmt_new/lang/sk-SK.rc index 0278c685059..1c39347a191 100644 --- a/base/applications/mscutils/devmgmt_new/lang/sk-SK.rc +++ b/base/applications/mscutils/devmgmt_new/lang/sk-SK.rc @@ -49,12 +49,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Tento program je von softvr; mete ho ri a/alebo modifikova poda podmienok GNU Veobecnej verejnej licencie (GNU General Public License) ako bola zverejnen nadciou Free Software Foundation; bu verzie 2 tejto licencie, alebo (poda Vho uvenia) niektorej neskorej verzie.\r\n\r\nTento program je distribuovan v ndeji, e bude uiton, avak BEZ AKEJKOVEK ZRUKY; rovnako bez zruky PREDAJNOSTI alebo VHODNOSTI PRE URIT EL. Pre viac detailov si pozrite GNU Veobecn verejn licenciu (GNU General Public License).\r\n\r\nKpiu Veobecnej verejnej licencie GNU ste mali dosta spolu s tmto programom; ak nie, napte si o u na Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Vlastnosti" IDS_TOOLTIP_REFRESH "Obnovi" @@ -63,7 +63,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Sprvca zariaden systmu ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/sv-SE.rc b/base/applications/mscutils/devmgmt_new/lang/sv-SE.rc index 5ef7b455f81..dc1dd9f66ef 100644 --- a/base/applications/mscutils/devmgmt_new/lang/sv-SE.rc +++ b/base/applications/mscutils/devmgmt_new/lang/sv-SE.rc @@ -50,12 +50,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Detta programmet r fri programvara; du kan distribuera det och/eller ndra det under villkoren enligt GNU General Public License som r utgivet av Free Software Foundation; version 2, eller (om du s nskar) alla senare versioner.\r\n\r\nDette programmet er utgivet i hopp om att det skall kunne anvndas, men DET FINNS INGA GARANTIER; ven utan underfrstdd garanti om SLJBARHET eller LMPLIGHET FR ETT VISST NDAML. Se p GNU General Public Licensen fr mer detaljer.\r\n\r\nDu skall ha motagit en kopia av GNU General Public Licensen tillsammans med detta programmet; om du inte har ftt det, skriv til Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Egenskaper" IDS_TOOLTIP_REFRESH "Uppdater" @@ -64,7 +64,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS Enhetshanterare" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/th-TH.rc b/base/applications/mscutils/devmgmt_new/lang/th-TH.rc index 95e50dc9b51..6fcb2510457 100644 --- a/base/applications/mscutils/devmgmt_new/lang/th-TH.rc +++ b/base/applications/mscutils/devmgmt_new/lang/th-TH.rc @@ -53,12 +53,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "سѵ" IDS_TOOLTIP_REFRESH "鹿" @@ -67,7 +67,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "èѴػóͧ ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/tr-TR.rc b/base/applications/mscutils/devmgmt_new/lang/tr-TR.rc index 487ec303239..0edaa1f64c9 100644 --- a/base/applications/mscutils/devmgmt_new/lang/tr-TR.rc +++ b/base/applications/mscutils/devmgmt_new/lang/tr-TR.rc @@ -48,12 +48,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN - IDS_LICENSE "ÖNEMLİ: Aşağıdaki metin, özgün metnin resmî olmayan çevirisidir. Çeviri metniyle özgün metin arasında ayrım olabilir. Özgün metin, çeviri metninin altındadır.\r\n\r\n***\r\n\r\nBu yazılım özgürdür, yâni bu yazılımı Özgür Yazılım Vakfı'nın yayınladığı GNU Umûmî Kamu Lisansı'nın 2. sürümü veyâ daha sonraki sürümleri altında yeniden dağıtabilir veyâ değiştirebilirsiniz.\r\n\r\nBu yazılım, kullanışlı olabileceği beklentisiyle dağıtılmıştır ancak bilhassa SATILABİLİRLİK ve BELİRLİ BİR AMACA UYGUNLUK açısından olmak üzere bu yazılımın HİÇBİR GÜVENCESİ YOKTUR. Daha çok bilgi için GNU Umûmî Kamu Lisansı'na bakınız.\r\n\r\nBu yazılımla birlikte GNU Umûmî Kamu Lisansı'nın bir sûretine de iye olmanız gerekir, eğer yoksa Özgür Yazılım Vakfı A.Ş.'ne (51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ABD) yazınız.\r\n\r\n***\r\n\r\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_LICENSE "ÖNEMLİ: Aşağıdaki metin, özgün metnin resmî olmayan çevirisidir. Çeviri metniyle özgün metin arasında ayrım olabilir. Özgün metin, çeviri metninin altındadır.\r\n\r\n***\r\n\r\nBu yazılım özgürdür, yâni bu yazılımı Özgür Yazılım Vakfı'nın yayınladığı GNU Umûmî Kamu Ruhsatı'nın 2. sürümü veyâ daha sonraki sürümleri altında yeniden dağıtabilir veyâ değiştirebilirsiniz.\r\n\r\nBu yazılım, kullanışlı olabileceği beklentisiyle dağıtılmıştır ancak bilhassa SATILABİLİRLİK ve BELİRLİ BİR AMACA UYGUNLUK açısından olmak üzere bu yazılımın HİÇBİR GÜVENCESİ YOKTUR. Daha çok bilgi için GNU Umûmî Kamu Ruhsatı'na bakınız.\r\n\r\nBu yazılımla birlikte GNU Umûmî Kamu Ruhsatı'nın bir sûretine de iye olmanız gerekir, eğer yoksa Özgür Yazılım Vakfı A.Ş.'ne (51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ABD) yazınız.\r\n\r\n***\r\n\r\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Husûsiyetler" IDS_TOOLTIP_REFRESH "Yenile" @@ -62,7 +62,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Aygıt Yöneticisi" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/uk-UA.rc b/base/applications/mscutils/devmgmt_new/lang/uk-UA.rc index 1aae4afdf3e..7f6297a1ed7 100644 --- a/base/applications/mscutils/devmgmt_new/lang/uk-UA.rc +++ b/base/applications/mscutils/devmgmt_new/lang/uk-UA.rc @@ -52,12 +52,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Це вільне програмне забезпечення; Ви можете розповсюджувати її та змінювати, дотримуючись умови Відкритої ліцензійної угоди GNU, опублікованої Фондом вільного програмного забезпечення; або редакції 2 Угоди, або будь-якої редакції, випущеної пізніше.\r\n\r\nЦя програма розповсюджується в надії на те, що вона виявиться корисною, але БЕЗ БУДЬ-ЯКИХ ГАРАНТІЙ, включаючи УЯВНОЮ ГАРАНТІЄЮ ЯКОСТІ або ПРИДАТНОСТІ для певних цілей. Подробиці містяться у Відкритій ліцензійній угоді GNU.\r\n\r\nРазом з цією програмою повинен поширюватися примірник Відкритої ліцензійної угоди GNU. Якщо він відсутній, повідомте про це в Фонд вільного програмного забезпечення (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Властивості" IDS_TOOLTIP_REFRESH "Оновити" @@ -66,7 +66,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Диспетчер пристроїв ReactOS" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/lang/zh-CN.rc b/base/applications/mscutils/devmgmt_new/lang/zh-CN.rc index b550a811473..77c49239e79 100644 --- a/base/applications/mscutils/devmgmt_new/lang/zh-CN.rc +++ b/base/applications/mscutils/devmgmt_new/lang/zh-CN.rc @@ -48,12 +48,12 @@ BEGIN EDITTEXT IDC_LICENSE_EDIT, 8, 44, 174, 107, WS_VISIBLE | WS_VSCROLL | WS_TABSTOP | ES_READONLY | ES_MULTILINE END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "这个程序是自由软件;你可以在自由软件基金会(FSF)的 GNU LGPL 协议下重新发布或修改它;也适用于这个协议的版本 2,或(在您看来)任何更新的版本。\r\n\r\n这个程序在希望其有用的愿望中发布,但没有任何保证;也不意味着性能保证或对某特定用途的适用性。请查看 GNU GPL 许可协议以了解更多细节。\r\n\r\n您应该已经收到了一份和这个程序一起的 GNU GPL 协议的副本;如果没有,请写信给自由软件基金会(FSF):51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "属性" IDS_TOOLTIP_REFRESH "刷新" @@ -62,7 +62,7 @@ BEGIN END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS 设备管理器" IDS_HINT_BLANK " " diff --git a/base/applications/mscutils/devmgmt_new/rsrc.rc b/base/applications/mscutils/devmgmt_new/rsrc.rc index ba820be63e1..79a4024864e 100644 --- a/base/applications/mscutils/devmgmt_new/rsrc.rc +++ b/base/applications/mscutils/devmgmt_new/rsrc.rc @@ -7,10 +7,10 @@ IDI_MAIN_ICON ICON "res/computer.ico" IDB_ROOT_IMAGE BITMAP "res/root.bmp" /* main toolbar icons */ -IDB_PROP BITMAP DISCARDABLE "res/properties.bmp" -IDB_REFRESH BITMAP DISCARDABLE "res/refresh.bmp" -IDB_HELP BITMAP DISCARDABLE "res/help.bmp" -IDB_EXIT BITMAP DISCARDABLE "res/exit.bmp" +IDB_PROP BITMAP "res/properties.bmp" +IDB_REFRESH BITMAP "res/refresh.bmp" +IDB_HELP BITMAP "res/help.bmp" +IDB_EXIT BITMAP "res/exit.bmp" #ifdef LANGUAGE_BG_BG #include "lang/bg-BG.rc" diff --git a/base/applications/mscutils/eventvwr/eventvwr.rc b/base/applications/mscutils/eventvwr/eventvwr.rc index 07357fad765..d5d5cb5409a 100644 --- a/base/applications/mscutils/eventvwr/eventvwr.rc +++ b/base/applications/mscutils/eventvwr/eventvwr.rc @@ -8,4 +8,6 @@ #define REACTOS_STR_ORIGINAL_FILENAME "eventvwr.exe\0" #include +#include + #include "rsrc.rc" diff --git a/base/applications/mscutils/eventvwr/lang/tr-TR.rc b/base/applications/mscutils/eventvwr/lang/tr-TR.rc index 09f6a212793..47b59a9146b 100644 --- a/base/applications/mscutils/eventvwr/lang/tr-TR.rc +++ b/base/applications/mscutils/eventvwr/lang/tr-TR.rc @@ -86,7 +86,7 @@ BEGIN LTEXT "Static",IDC_EVENTCATEGORYSTATIC,175,55,87,8 EDITTEXT IDC_EVENTDATAEDIT,14,204,247,44,ES_MULTILINE | ES_READONLY LTEXT "&Veri:",IDC_STATIC,14,194,20,8 - CONTROL "S&ekizlik",IDC_BYTESRADIO,"Button",BS_AUTORADIOBUTTON,39,194,34,10 + CONTROL "&Çoklu",IDC_BYTESRADIO,"Button",BS_AUTORADIOBUTTON,39,194,34,10 CONTROL "Sö&zcük",IDC_WORDRADIO,"Button",BS_AUTORADIOBUTTON,77,194,33,10 END diff --git a/base/applications/mscutils/servman/lang/bg-BG.rc b/base/applications/mscutils/servman/lang/bg-BG.rc index b609f7e736b..381698eb67d 100644 --- a/base/applications/mscutils/servman/lang/bg-BG.rc +++ b/base/applications/mscutils/servman/lang/bg-BG.rc @@ -77,7 +77,7 @@ END IDD_DLG_GENERAL DIALOGEX 6,6,300,225 CAPTION "Общи" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 120,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 120, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -106,7 +106,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "Зависимости" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -119,7 +119,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "Създаване на услуга" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE @@ -186,7 +186,7 @@ END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "Име" IDS_SECONDCOLUMN "Описание" @@ -195,7 +195,7 @@ BEGIN IDS_FITHCOLUMN "Влизане като" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "Пуснато" IDS_SERVICES_STOPPED "Спряно" @@ -204,7 +204,7 @@ BEGIN IDS_SERVICES_DIS "Изключено" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN /* IDS_NUM_SERVICES "Num Services: %d" */ IDS_NUM_SERVICES "Брой услуги: %d" @@ -213,7 +213,7 @@ BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Свойства" IDS_TOOLTIP_REFRESH "Опресняване" @@ -226,7 +226,7 @@ BEGIN IDS_TOOLTIP_RESTART "Презапуск на услугата" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "РеактОС се опитва да пусне следната услуга" IDS_PROGRESS_INFO_STOP "РеактОС се опитва да спре следната услуга" @@ -238,14 +238,14 @@ BEGIN IDS_DELETE_STOP "Трябва ръчно да спрете услугата, преди да я изтриете!" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN /*IDS_HELP_OPTIONS "CREATE OPTIONS:\r\nNOTE: The option name includes the equal sign.\r\n type= \r\n (default = own)\r\n start= \r\n (default = demand) \r\n error= \r\n (default = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (default = LocalSystem)\r\n password= \r\n" */ IDS_HELP_OPTIONS "СЪЗДАВАНЕ НА ВЪЗМОЖНОСТ:\r\nБЕЛЕЖКА: Името на възможността включва знака за равенство.\r\n type= \r\n (подразбирано = own)\r\n start= \r\n (подразбирано = demand) \r\n error= \r\n (подразбирано = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (подразбирано = LocalSystem)\r\n password= \r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " Износ на текущия списък във файл." @@ -281,7 +281,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Управление на услугите на РеактОС" END diff --git a/base/applications/mscutils/servman/lang/de-DE.rc b/base/applications/mscutils/servman/lang/de-DE.rc index 9eeec237234..00c579210d6 100644 --- a/base/applications/mscutils/servman/lang/de-DE.rc +++ b/base/applications/mscutils/servman/lang/de-DE.rc @@ -77,7 +77,7 @@ END IDD_DLG_GENERAL DIALOGEX 6,6,253,232 CAPTION "Allgemein" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 70,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 70, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -104,7 +104,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "Abhängigkeiten" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -116,7 +116,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "Dienst erstellen" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE @@ -183,7 +183,7 @@ END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "Name" IDS_SECONDCOLUMN "Beschreibung" @@ -192,7 +192,7 @@ BEGIN IDS_FITHCOLUMN "Anmelden als" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "Gestartet" IDS_SERVICES_STOPPED "Beendet" @@ -201,7 +201,7 @@ BEGIN IDS_SERVICES_DIS "Deaktiviert" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NUM_SERVICES "Anzahl der Dienste: %d" IDS_STOP_DEPENDS "When %s stops, these other services will also stop" @@ -209,7 +209,7 @@ BEGIN IDS_LICENSE "Dieses Programm ist kostenlos; Sie können es frei verteilen mit od. ohne Änderungen unter der GNU Lesser General Public License, wie es von der Free Software Foundation veröffentlicht wurde; entweder Version 2.1 der Lizenz, oder eine spätere Version (ihrer Wahl).\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Eigenschaften" IDS_TOOLTIP_REFRESH "Aktualisieren" @@ -222,7 +222,7 @@ BEGIN IDS_TOOLTIP_RESTART "Dienst neu starten" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "ReactOS versucht den folgenden Dienst zu starten" IDS_PROGRESS_INFO_STOP "ReactOS versucht den folgenden Dienst zu beenden" @@ -234,13 +234,13 @@ BEGIN IDS_DELETE_STOP "Sie müssen den Dienst manuell beenden, bevor er gelöscht werden kann!" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_OPTIONS "ERSTELLOPTIONEN:\r\nBEACHTEN SIE: Der Optionsname enthält das Gleichheitszeichen.\r\n type= \r\n (Standard = own)\r\n start= \r\n (Standard = demand) \r\n error= \r\n (Standard = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (Standard = LocalSystem)\r\n password= \r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " Die aktuelle Liste in eine Datei exportieren." @@ -276,7 +276,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS Dienst-Manager" END diff --git a/base/applications/mscutils/servman/lang/el-GR.rc b/base/applications/mscutils/servman/lang/el-GR.rc index e834aa7c603..1ff96b781da 100644 --- a/base/applications/mscutils/servman/lang/el-GR.rc +++ b/base/applications/mscutils/servman/lang/el-GR.rc @@ -77,7 +77,7 @@ END IDD_DLG_GENERAL DIALOGEX 6, 6, 253, 232 CAPTION "Γενικά" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 70,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 70, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -104,7 +104,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "Εξαρτήσεις" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -116,7 +116,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "ΔΗμιουργία υπηρεσίας" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE @@ -183,7 +183,7 @@ END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "Όνομα" IDS_SECONDCOLUMN "Περιγραφή" @@ -192,7 +192,7 @@ BEGIN IDS_FITHCOLUMN "Σύνδεση ως" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "Ξεκίνησε" IDS_SERVICES_STOPPED "Σταμάτησε" @@ -201,7 +201,7 @@ BEGIN IDS_SERVICES_DIS "Απενεργοποιημένο" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NUM_SERVICES "Num Services: %d" IDS_STOP_DEPENDS "When %s stops, these other services will also stop" @@ -209,7 +209,7 @@ BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Ιδιότητες" IDS_TOOLTIP_REFRESH "Ανανέωση" @@ -222,7 +222,7 @@ BEGIN IDS_TOOLTIP_RESTART "Επανεκκίνηση υπηρεσίας" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "Το ReactOS προσπαθεί να εκκινήσει την παρακάτω υπηρεσία" IDS_PROGRESS_INFO_STOP "Το ReactOS προσπαθεί να σταματήσει την παρακάτω υπηρεσία" @@ -234,13 +234,13 @@ BEGIN IDS_DELETE_STOP "Πρέπει πρώτα να σταματήσετε χειροκίνητα την υπηρεσία πριν τη διαγράψετε!" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_OPTIONS "CREATE OPTIONS:\r\nNOTE: The option name includes the equal sign.\r\n type= \r\n (default = own)\r\n start= \r\n (default = demand) \r\n error= \r\n (default = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (default = LocalSystem)\r\n password= \r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " Εξάγει τη συγκεκριμένη λίστα σε ένα αρχείο." @@ -276,7 +276,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Διαχειριστής Υπηρεσιών του ReactOS" END diff --git a/base/applications/mscutils/servman/lang/en-US.rc b/base/applications/mscutils/servman/lang/en-US.rc index ac76978d457..2dd0be24528 100644 --- a/base/applications/mscutils/servman/lang/en-US.rc +++ b/base/applications/mscutils/servman/lang/en-US.rc @@ -77,7 +77,7 @@ END IDD_DLG_GENERAL DIALOGEX 6, 6, 253, 232 CAPTION "General" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 70,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 70, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -104,7 +104,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "Dependencies" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -116,7 +116,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "Create a service" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE @@ -183,7 +183,7 @@ END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "Name" IDS_SECONDCOLUMN "Description" @@ -192,7 +192,7 @@ BEGIN IDS_FITHCOLUMN "Log On As" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "Started" IDS_SERVICES_STOPPED "Stopped" @@ -201,7 +201,7 @@ BEGIN IDS_SERVICES_DIS "Disabled" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NUM_SERVICES "Num Services: %d" IDS_STOP_DEPENDS "When %s stops, these other services will also stop" @@ -209,7 +209,7 @@ BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Properties" IDS_TOOLTIP_REFRESH "Refresh" @@ -222,7 +222,7 @@ BEGIN IDS_TOOLTIP_RESTART "Restart service" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "ReactOS is attempting to start the following service" IDS_PROGRESS_INFO_STOP "ReactOS is attempting to stop the following service" @@ -234,13 +234,13 @@ BEGIN IDS_DELETE_STOP "You must manually stop the service before deleting!" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_OPTIONS "CREATE OPTIONS:\r\nNOTE: The option name includes the equal sign.\r\n type= \r\n (default = own)\r\n start= \r\n (default = demand) \r\n error= \r\n (default = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (default = LocalSystem)\r\n password= \r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " Exports the current list to a file." @@ -276,7 +276,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS Service Manager" END diff --git a/base/applications/mscutils/servman/lang/es-ES.rc b/base/applications/mscutils/servman/lang/es-ES.rc index 60c996ca046..1083e1db3ba 100644 --- a/base/applications/mscutils/servman/lang/es-ES.rc +++ b/base/applications/mscutils/servman/lang/es-ES.rc @@ -77,7 +77,7 @@ END IDD_DLG_GENERAL DIALOGEX 6, 6, 253, 232 CAPTION "General" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 70,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 70, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -104,7 +104,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "Dependencias" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -116,7 +116,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "Crear un servicio" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE @@ -183,7 +183,7 @@ END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "Nombre" IDS_SECONDCOLUMN "Descripción" @@ -192,7 +192,7 @@ BEGIN IDS_FITHCOLUMN "Iniciar sesión como" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "Iniciado" IDS_SERVICES_STOPPED "Detenido" @@ -201,7 +201,7 @@ BEGIN IDS_SERVICES_DIS "Deshabilitado" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NUM_SERVICES "Núm Servicios: %d" IDS_STOP_DEPENDS "Cuando %s se detenga, estos otros servicios también se detendrán" @@ -209,7 +209,7 @@ BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Propiedades" IDS_TOOLTIP_REFRESH "Actualizar" @@ -222,7 +222,7 @@ BEGIN IDS_TOOLTIP_RESTART "Reiniciar servicio" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "ReactOS está intentando iniciar el siguiente servicio" IDS_PROGRESS_INFO_STOP "ReactOS está intentando detener el siguiente servicio" @@ -234,13 +234,13 @@ BEGIN IDS_DELETE_STOP "¡Debe detener manualmente el servicio antes de borrarlo!" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_OPTIONS "OPCIONES DE CREACION:\r\nNOTA: El nombre de la opción incluye el signo igual.\r\n type= \r\n (por defecto = own)\r\n start= \r\n (por defecto = demand) \r\n error= \r\n (por defecto = normal)\r\n group= \r\n E= \r\n depend= \r\n obj= \r\n (por defecto = LocalSystem)\r\n password= \r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " Exporta la lista actual a un archivo." @@ -276,7 +276,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Gestor de Servicios de ReactOS" END diff --git a/base/applications/mscutils/servman/lang/fr-FR.rc b/base/applications/mscutils/servman/lang/fr-FR.rc index cdb2b977e67..bdc124cd335 100644 --- a/base/applications/mscutils/servman/lang/fr-FR.rc +++ b/base/applications/mscutils/servman/lang/fr-FR.rc @@ -77,7 +77,7 @@ END IDD_DLG_GENERAL DIALOGEX 6,6,253,232 CAPTION "Général" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 70,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 70, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -104,7 +104,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "Dépendances" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -116,7 +116,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "Créer un service" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE @@ -181,7 +181,7 @@ BEGIN PUSHBUTTON "&Fermer", IDOK, 100, 70, 54, 13 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "Nom" IDS_SECONDCOLUMN "Description" @@ -190,7 +190,7 @@ BEGIN IDS_FITHCOLUMN "Exécuter en tant que" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "Démarré" IDS_SERVICES_STOPPED "Arrêté" @@ -199,7 +199,7 @@ BEGIN IDS_SERVICES_DIS "Désactivé" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NUM_SERVICES "Services : %d" IDS_STOP_DEPENDS "Quand %s s'arrêtera, les services suivants s'arrêteront également :" @@ -207,7 +207,7 @@ BEGIN IDS_LICENSE "Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier tout en respectant les termes de la ""GNU General Public License"" publiée par la Free Software Foundation; dans sa version 2 (ou selon votre préférence) toute version ultérieure.\r\n\r\nCe programme est distribué dans l'espoir qu'il sera utile, cependant SANS GARANTIE D'AUCUNE SORTE; sans même une garantie implicite de COMMERCIABILITÉ ou DE CONFORMITÉ A UNE UTILISATION PARTICULIÈRE. \r\n\r\nVoir la Licence Publique Générale GNU pour plus de détails. Vous devriez avoir reçu un exemplaire de la Licence Publique Générale GNU avec ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Propriétés" IDS_TOOLTIP_REFRESH "Rafraîchir" @@ -220,7 +220,7 @@ BEGIN IDS_TOOLTIP_RESTART "Redémarrer le service" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "ReactOS essaye de démarrer le service suivant" IDS_PROGRESS_INFO_STOP "ReactOS essaye d'arrêter le service suivant" @@ -232,13 +232,13 @@ BEGIN IDS_DELETE_STOP "Vous devez arrêter le service avant de le supprimer !" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_OPTIONS "OPTIONS DE CREATION:\r\nNOTE: le nom de l'option inclue le signe =.\r\n type= \r\n (default = own)\r\n start= \r\n (default = demand) \r\n error= \r\n (default = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (default = LocalSystem)\r\n password= \r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " Exporte la liste courante vers un fichier." @@ -274,7 +274,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Gestionnaire de Services ReactOS" END diff --git a/base/applications/mscutils/servman/lang/he-IL.rc b/base/applications/mscutils/servman/lang/he-IL.rc index 6516c0c8ef5..c0ecffe313a 100644 --- a/base/applications/mscutils/servman/lang/he-IL.rc +++ b/base/applications/mscutils/servman/lang/he-IL.rc @@ -77,7 +77,7 @@ END IDD_DLG_GENERAL DIALOGEX 6, 6, 253, 232 CAPTION "כללי" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 70,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 70, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -104,7 +104,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "יחסי תלות" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -116,7 +116,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "צור שירות" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE @@ -183,7 +183,7 @@ END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "שם" IDS_SECONDCOLUMN "תיאור" @@ -192,7 +192,7 @@ BEGIN IDS_FITHCOLUMN "התחבר כ" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "הופעל" IDS_SERVICES_STOPPED "נעצר" @@ -201,7 +201,7 @@ BEGIN IDS_SERVICES_DIS "הופסק" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NUM_SERVICES "מספר השירותים: %d" IDS_STOP_DEPENDS "מתי ש %s יעצור, השירותים הללו גם יעצרו." @@ -209,7 +209,7 @@ BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "מאפיינים" IDS_TOOLTIP_REFRESH "רענון" @@ -222,7 +222,7 @@ BEGIN IDS_TOOLTIP_RESTART "אתחול שירות" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "ReactOS is attempting to start the following service" IDS_PROGRESS_INFO_STOP "ReactOS is attempting to stop the following service" @@ -234,13 +234,13 @@ BEGIN IDS_DELETE_STOP "You must manually stop the service before deleting!" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_OPTIONS "CREATE OPTIONS:\r\nNOTE: The option name includes the equal sign.\r\n type= \r\n (default = own)\r\n start= \r\n (default = demand) \r\n error= \r\n (default = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (default = LocalSystem)\r\n password= \r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " Exports the current list to a file." @@ -276,7 +276,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "מנהל השירותים של ReactOS" END diff --git a/base/applications/mscutils/servman/lang/id-ID.rc b/base/applications/mscutils/servman/lang/id-ID.rc index 4afc4f5a888..4de2d45fd16 100644 --- a/base/applications/mscutils/servman/lang/id-ID.rc +++ b/base/applications/mscutils/servman/lang/id-ID.rc @@ -77,7 +77,7 @@ END IDD_DLG_GENERAL DIALOGEX 6,6,253,232 CAPTION "Umum" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 70,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 70, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -104,7 +104,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "Ketergantungan" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -116,7 +116,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "Buat layanan" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE @@ -183,7 +183,7 @@ END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "Nama" IDS_SECONDCOLUMN "Deskripsi" @@ -192,7 +192,7 @@ BEGIN IDS_FITHCOLUMN "Masuk Sebagai" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "Dimulai" IDS_SERVICES_STOPPED "Dihentikan" @@ -201,7 +201,7 @@ BEGIN IDS_SERVICES_DIS "Dimatikan" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NUM_SERVICES "Jumlah Layanan: %d" IDS_STOP_DEPENDS "When %s stops, these other services will also stop" @@ -209,7 +209,7 @@ BEGIN IDS_LICENSE "Program ini adalah software bebas; anda dapat mendistribusikan dan/atau mengubahnya di bawah term GNU General Public License seperti dipublikasikan oleh Free Software Foundation; baik Lisensi versi 2, atau (menurut opini anda) setiap versi berikutnya.\r\n\r\nProgram ini didistribusikan dengan harapan ia akan berguna, tetapi TANPA JAMINAN APAPUN; bahkan tanpa jaminan berarti dari MERCANTABILITAS atau KECUKUPAN UNTUK KEPERLUAN TERTENTU. Lihat GNU General Public License untuk lebih jelasnya.\r\n\r\nAnda seharusnya menerima duplikat GNU General Public License bersamaan dengan program ini; jika tidak, tulis ke Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Properti" IDS_TOOLTIP_REFRESH "Segarkan" @@ -222,7 +222,7 @@ BEGIN IDS_TOOLTIP_RESTART "Memulai lagi layanan" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "ReactOS sedang mencoba untuk memulai layanan berikut" IDS_PROGRESS_INFO_STOP "ReactOS sedang mencoba untuk menghentikan layanan berikut" @@ -234,13 +234,13 @@ BEGIN IDS_DELETE_STOP "Anda harus menghentikan layanan sebelum menghapus!" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_OPTIONS "OPSI BUAT:\r\nCATATAN: Nama opsi termasuk tanda sama dengan.\r\n type= \r\n (standar = own)\r\n start= \r\n (standar = demand) \r\n error= \r\n (standar = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (standar = LocalSystem)\r\n password= \r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " Mengekspor daftar sekarang ke file." @@ -276,7 +276,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS Service Manager" END diff --git a/base/applications/mscutils/servman/lang/it-IT.rc b/base/applications/mscutils/servman/lang/it-IT.rc index 1bfb8675b3e..8dcd7b44c76 100644 --- a/base/applications/mscutils/servman/lang/it-IT.rc +++ b/base/applications/mscutils/servman/lang/it-IT.rc @@ -77,7 +77,7 @@ END IDD_DLG_GENERAL DIALOGEX 6,6,253,232 CAPTION "Generale" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 70,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 70, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -104,7 +104,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "Dipendenze" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -116,7 +116,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "Crea un servizio" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE @@ -183,7 +183,7 @@ END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "Nome" IDS_SECONDCOLUMN "Descrizione" @@ -192,7 +192,7 @@ BEGIN IDS_FITHCOLUMN "Collegati come" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "Avviato" IDS_SERVICES_STOPPED "Fermato" @@ -201,7 +201,7 @@ BEGIN IDS_SERVICES_DIS "Disabilitato" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NUM_SERVICES "Numero Servizi: %d" IDS_STOP_DEPENDS "Quando %s si ferma, Questi altri sevizi si fermeranno" @@ -209,7 +209,7 @@ BEGIN IDS_LICENSE "Questo programma è software libero; puoi distribuirlo e/o modificarlo nei termini di licenza di 'GNU General Public License' come pubblicata dalla 'Free Software Foundation'; entrambe le versioni 2 della Licenza, o (a vostra scelta) qualunque versione successiva.\r\n\r\nQuesto programma è distribuito con l'augurio che sia utile, ma PRIVO DI OGNI GARANZIA; privo anche della garanzia implicita di COMMERCIABILITÀ o UTILIZZABILITÀ PER UNO SPECIFICO USO. Vedi la 'GNU General Public License' per ulteriori dettagli.\r\n\r\nVoi dovreste aver ricevuto una copia della 'GNU General Public License' assieme a questo programma; se non è cosi' scrivete a 'Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Proprietà" IDS_TOOLTIP_REFRESH "Aggiorna" @@ -222,7 +222,7 @@ BEGIN IDS_TOOLTIP_RESTART "Riavvia servizio" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "ReactOS sta avviando il seguente servizio" IDS_PROGRESS_INFO_STOP "ReactOS sta fermando il seguente servizio" @@ -234,13 +234,13 @@ BEGIN IDS_DELETE_STOP "Devi fermare il servizio prima di rimuoverlo!" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_OPTIONS "CREATE OPTIONS:\r\nNOTA: Il nome dell'ozione comprende il simbolo di uguale.\r\n type= \r\n (default = own)\r\n start= \r\n (default = demand) \r\n error= \r\n (default = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (default = LocalSystem)\r\n password= \r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " Esporta la lista attuale in un file." @@ -276,7 +276,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Gestione dei servizi di ReactOS" END diff --git a/base/applications/mscutils/servman/lang/ja-JP.rc b/base/applications/mscutils/servman/lang/ja-JP.rc index d035e73fda6..64ff3415632 100644 --- a/base/applications/mscutils/servman/lang/ja-JP.rc +++ b/base/applications/mscutils/servman/lang/ja-JP.rc @@ -77,7 +77,7 @@ END IDD_DLG_GENERAL DIALOGEX 6, 6, 253, 232 CAPTION "全般" FONT 9, "MS UI Gothic",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 70,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 70, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -104,7 +104,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "依存関係" FONT 9, "MS UI Gothic",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -116,7 +116,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "サービスの作成" FONT 9, "MS UI Gothic",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE @@ -183,7 +183,7 @@ END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "名前" IDS_SECONDCOLUMN "説明" @@ -192,7 +192,7 @@ BEGIN IDS_FITHCOLUMN "ログオン" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "開始" IDS_SERVICES_STOPPED "停止" @@ -201,7 +201,7 @@ BEGIN IDS_SERVICES_DIS "無効" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NUM_SERVICES "サービスの数: %d" IDS_STOP_DEPENDS "%s を停止する場合、これらのサービスも停止します" @@ -209,7 +209,7 @@ BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "プロパティ" IDS_TOOLTIP_REFRESH "更新" @@ -222,7 +222,7 @@ BEGIN IDS_TOOLTIP_RESTART "サービスの再起動" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "ReactOS は次のサービスを開始しようとしています" IDS_PROGRESS_INFO_STOP "ReactOS は次のサービスを停止しようとしています" @@ -234,13 +234,13 @@ BEGIN IDS_DELETE_STOP "サービスを削除する前に手動で停止してください!" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_OPTIONS "作成オプション:\r\n注意: オプション名はイコール記号を含んでいます。\r\n type= \r\n (既定値 = own)\r\n start= \r\n (既定値 = demand) \r\n error= \r\n (既定値 = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (既定値 = LocalSystem)\r\n password= \r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " 現在のリストをファイルにエクスポートします。" @@ -276,7 +276,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS サービス マネージャ" END diff --git a/base/applications/mscutils/servman/lang/ko-KR.rc b/base/applications/mscutils/servman/lang/ko-KR.rc index 26bd1d609dd..d1ef6c2897c 100644 --- a/base/applications/mscutils/servman/lang/ko-KR.rc +++ b/base/applications/mscutils/servman/lang/ko-KR.rc @@ -81,7 +81,7 @@ END IDD_DLG_GENERAL DIALOGEX 6, 6, 253, 232 CAPTION "General" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 70,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 70, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -108,7 +108,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "종속성" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -120,7 +120,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "서비스 만들기" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE @@ -187,7 +187,7 @@ END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "이름" IDS_SECONDCOLUMN "설명" @@ -196,7 +196,7 @@ BEGIN IDS_FITHCOLUMN "..로 로그인" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "시작됨" IDS_SERVICES_STOPPED "정지됨" @@ -205,7 +205,7 @@ BEGIN IDS_SERVICES_DIS "사용 안함" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NUM_SERVICES "모든 서비스: %d" IDS_STOP_DEPENDS "When %s stops, these other services will also stop" @@ -213,7 +213,7 @@ BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "속성" IDS_TOOLTIP_REFRESH "새로 고침" @@ -226,7 +226,7 @@ BEGIN IDS_TOOLTIP_RESTART "서비스 재시작" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "ReactOS는 다음 서비스를 시작하려고 합니다" IDS_PROGRESS_INFO_STOP "ReactOS는 다음 서비스를 중지하려고 합니다" @@ -238,13 +238,13 @@ BEGIN IDS_DELETE_STOP "지우기 전에 수동으로 서비스를 정지해야 됩니다!" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_OPTIONS "옵션 생성:\r\n참고: 옵션 이름은 등호를 포함합니다.\r\n 타입= \r\n (기본 = own)\r\n 시작= \r\n (기본 = demand) \r\n 에러= \r\n (기본 = normal)\r\n 그룹= \r\n tag= \r\n 종속성= \r\n obj= \r\n (기본 = LocalSystem)\r\n password= \r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " 현재 리스트를 파일로 출력합니다." @@ -280,7 +280,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS 서비스 관리자" END diff --git a/base/applications/mscutils/servman/lang/no-NO.rc b/base/applications/mscutils/servman/lang/no-NO.rc index f105547844d..a145be8b79a 100644 --- a/base/applications/mscutils/servman/lang/no-NO.rc +++ b/base/applications/mscutils/servman/lang/no-NO.rc @@ -77,7 +77,7 @@ END IDD_DLG_GENERAL DIALOGEX 6, 6, 253, 232 CAPTION "Generielt" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 70,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 70, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -104,7 +104,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "Dependencies" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -116,7 +116,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "Opprett en tjeneste" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE @@ -183,7 +183,7 @@ END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "Navn" IDS_SECONDCOLUMN "Beskrivelse" @@ -192,7 +192,7 @@ BEGIN IDS_FITHCOLUMN "Logg på som" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "Startet" IDS_SERVICES_STOPPED "Stoppet" @@ -201,7 +201,7 @@ BEGIN IDS_SERVICES_DIS "Deaktivert" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NUM_SERVICES "Num tjeneste: %d" IDS_STOP_DEPENDS "When %s stops, these other services will also stop" @@ -209,7 +209,7 @@ BEGIN IDS_LICENSE "Dette programmet er gratis programvare; du kan distribuere det og/eller endre det under betingelsene av GNU General Public License som er utgitt av Free Software Foundation; version 2 av lisensen, eller (etter din mening) alle senere versjoner.\r\n\r\nDette programmet er utgitt i håp for at det skal kunne brukes, men DET ER INGEN GARANTIER; uten heller forutsatt garantier av SALGBARHET eller SIKKETHET FOR EN ENKELTHET FORMÅL. Se på GNU General Public Lisensen for mere detaljer.\r\n\r\nDu skal ha motatt en kopi av GNU General Public Lisensen sammen med denne programmet; hvis du ikke har motatt det, skriv til Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Properties" IDS_TOOLTIP_REFRESH "Oppdater" @@ -222,7 +222,7 @@ BEGIN IDS_TOOLTIP_RESTART "Restart tjeneste" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "ReactOS forsøker å starte følgende tjeneste" IDS_PROGRESS_INFO_STOP "ReactOS forsøker å stoppe følgende tjeneste" @@ -234,13 +234,13 @@ BEGIN IDS_DELETE_STOP "Du må manuelt stoppe tjenesten før den kan slettes!" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_OPTIONS "CREATE OPTIONS:\r\nNOTE: The option name includes the equal sign.\r\n type= \r\n (default = own)\r\n start= \r\n (default = demand) \r\n error= \r\n (default = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (default = LocalSystem)\r\n password= \r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " Eksporter nåværende liste til en fil." @@ -276,7 +276,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS Tjenestebehandler" END diff --git a/base/applications/mscutils/servman/lang/pl-PL.rc b/base/applications/mscutils/servman/lang/pl-PL.rc index bb5e2ef0dd4..9b56237b44b 100644 --- a/base/applications/mscutils/servman/lang/pl-PL.rc +++ b/base/applications/mscutils/servman/lang/pl-PL.rc @@ -87,7 +87,7 @@ END IDD_DLG_GENERAL DIALOGEX 6,6,253,225 CAPTION "Ogólny" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 70,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 70, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -114,7 +114,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "Zależności" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -126,7 +126,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "Utwórz usługę" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE @@ -191,7 +191,7 @@ BEGIN PUSHBUTTON "&Zamknij", IDOK, 100, 70, 54, 13 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "Nazwa" IDS_SECONDCOLUMN "Opis" @@ -200,7 +200,7 @@ BEGIN IDS_FITHCOLUMN "Logowanie jako" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "Uruchomiono" IDS_SERVICES_STOPPED "Zatrzymano" @@ -209,7 +209,7 @@ BEGIN IDS_SERVICES_DIS "Wyłączony" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NUM_SERVICES "Numer usługi: %d" IDS_STOP_DEPENDS "Kiedy %s się zatrzyma, inne usługi od niej zależne również się zatrzymają" @@ -217,7 +217,7 @@ BEGIN IDS_LICENSE "Niniejszy program jest wolnym oprogramowaniem; możesz go rozprowadzać dalej i/lub modyfikować na warunkach Powszechnej Licencji Publicznej GNU, wydanej przez Fundację Wolnego Oprogramowania - według wersji 2 tej Licencji lub (według twojego wyboru) którejś z późniejszych wersji.\r\n\r\nNiniejszy program rozpowszechniany jest z nadzieją, iż będzie on użyteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domyślnej gwarancji PRZYDATNOŚCI HANDLOWEJ albo PRZYDATNOŚCI DO OKREŚLONYCH ZASTOSOWAŃ. W celu uzyskania bliższych informacji sięgnij do Powszechnej Licencji Publicznej GNU.\r\n\r\nZ pewnością wraz z niniejszym programem otrzymałeś też egzemplarz Powszechnej Licencji Publicznej GNU (GNU General Public License); jeśli nie - napisz do Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Właściwości" IDS_TOOLTIP_REFRESH "Odśwież" @@ -230,7 +230,7 @@ BEGIN IDS_TOOLTIP_RESTART "Wznów usługę" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "ReactOS usiłuje uruchomić następującą usługę" IDS_PROGRESS_INFO_STOP "ReactOS usiłuje zatrzymać następującą usługę" @@ -242,13 +242,13 @@ BEGIN IDS_DELETE_STOP "Musisz ręcznie zatrzymać usługę przed jej usunięciem!" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_OPTIONS "OPCJE TWORZENIA:\r\nUWAGA: Nazwa opcji zawiera znak równości.\r\n type= \r\n (domyślnie = own)\r\n start= \r\n (domyślnie = demand) \r\n error= \r\n (domyślnie = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (domyślnie = LocalSystem)\r\n password= \r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " Eksportuj aktualną listę do pliku." @@ -284,7 +284,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Menedżer Usług ReactOS" END diff --git a/base/applications/mscutils/servman/lang/ro-RO.rc b/base/applications/mscutils/servman/lang/ro-RO.rc index f56b8bef0af..98d05a1c2da 100644 --- a/base/applications/mscutils/servman/lang/ro-RO.rc +++ b/base/applications/mscutils/servman/lang/ro-RO.rc @@ -78,7 +78,7 @@ END IDD_DLG_GENERAL DIALOGEX 6, 6, 253, 232 CAPTION "Generale" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 70,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 70, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -105,7 +105,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "Dependențe" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -117,7 +117,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "Creare serviciu" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE @@ -184,7 +184,7 @@ END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "Nume" IDS_SECONDCOLUMN "Descriere" @@ -193,7 +193,7 @@ BEGIN IDS_FITHCOLUMN "Autentificare ca" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "Pornit" IDS_SERVICES_STOPPED "Oprit" @@ -202,7 +202,7 @@ BEGIN IDS_SERVICES_DIS "Inactivă" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NUM_SERVICES "Nr. servicii: %d" IDS_STOP_DEPENDS "Dacă %s se oprește aceste procese se vor opri de asemenea." @@ -210,7 +210,7 @@ BEGIN IDS_LICENSE "Această aplicație este publică; fiind permisă modificarea și/sau (re)distribuția sa în termenii Licenței Publice Generale GNU publicată de Free Software Foundation; sau versiunea 2 a Licenței, sau (la alegere) a oricărei versiuni ulterioare.\r\n\r\nAceastă aplicație este distribuită doar în speranța de a fi utilă, FĂRĂ însă NICI O GARANȚIE; nici măcar cu garanția implicită a VANDABILITĂȚII sau a UTILITĂȚII ÎNTR-UN SCOP ANUME. Pentru mai multe detalii consultați Licența Publică Generală GNU.\r\n\r\nPuteți vedea această licență aici:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nDe asemenea puteți consulta traduceri neoficiale ale acestei licențe aici:\r\nhttp://www.gnu.org/licenses/translations.html" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Proprietăți" IDS_TOOLTIP_REFRESH "Împrospătare" @@ -223,7 +223,7 @@ BEGIN IDS_TOOLTIP_RESTART "Repornește serviciul" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "Se încearcă pornirea următorului serviciu" IDS_PROGRESS_INFO_STOP "Se încearcă oprirea următorului serviciu" @@ -235,13 +235,13 @@ BEGIN IDS_DELETE_STOP "Este necesară oprirea manuală a serviciului înainte de a-l eliminăra!" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_OPTIONS "OPȚIUNI DE CREARE:\r\nNOTĂ: Numele opțiunii include semnul de egalitate.\r\n type= \r\n (implicit = own)\r\n start= \r\n (implicit = demand) \r\n error= \r\n (implicit = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (implicit = LocalSystem)\r\n password= \r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " Exportă lista curentă într-un fișier." @@ -277,7 +277,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Gestionar de servicii" END diff --git a/base/applications/mscutils/servman/lang/ru-RU.rc b/base/applications/mscutils/servman/lang/ru-RU.rc index 98290c17df1..595882d2d95 100644 --- a/base/applications/mscutils/servman/lang/ru-RU.rc +++ b/base/applications/mscutils/servman/lang/ru-RU.rc @@ -76,7 +76,7 @@ END IDD_DLG_GENERAL DIALOGEX 6,6,253,232 CAPTION "Общие" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 78,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 78, 29, 166, 12, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -103,7 +103,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "Зависимости" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -115,7 +115,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "Создать службу" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 71, 9, 150, 14, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 87, 29, 134, 14, WS_CHILD | WS_VISIBLE @@ -182,7 +182,7 @@ END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "Имя" IDS_SECONDCOLUMN "Описание" @@ -191,7 +191,7 @@ BEGIN IDS_FITHCOLUMN "Вход от имени" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "Работает" IDS_SERVICES_STOPPED "Остановлено" @@ -200,7 +200,7 @@ BEGIN IDS_SERVICES_DIS "Отключено" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NUM_SERVICES "Номер службы: %d" IDS_STOP_DEPENDS "When %s stops, these other services will also stop" @@ -208,7 +208,7 @@ BEGIN IDS_LICENSE "Эта программа является свободным программным обеспечением; Вы можете распространять и/или изменять ее в соответствии с лицензией GNU General Public License версии 2 или более поздней, опубликованной Free Software Foundation.\r\n\r\nЭта программа распространяется с надеждой, что она может быть полезна, но БЕЗ ВСЯКОЙ ГАРАНТИИ; не подразумевается даже РАБОТОСПОСОБНОСТЬ или ПРИГОДНОСТЬ ДЛЯ ВЫПОЛНЕНИЯ НЕОБХОДИМЫХ ЗАДАЧ. См. GNU General Public License для получения дополнительных сведений.\r\n\r\nВы должны получить копию лицензии GNU вместе с этой программой, в противном случае обращайтесь в Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Свойства" IDS_TOOLTIP_REFRESH "Обновить" @@ -221,7 +221,7 @@ BEGIN IDS_TOOLTIP_RESTART "Перезапуск службы" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "ReactOS запускает службу" IDS_PROGRESS_INFO_STOP "ReactOS остановливает службу" @@ -233,13 +233,13 @@ BEGIN IDS_DELETE_STOP "Вы должны вручную остановить службу перед удалением!" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_OPTIONS "ОПЦИИ СОЗДАНИЯ:\r\nПримечание: Имя опции включает знак ""равно"".\r\n type= \r\n (по умолчанию = own)\r\n start= \r\n (по умолчанию = demand) \r\n error= \r\n (по умолчанию = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (по умолчанию = LocalSystem)\r\n password= \r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " Экспорт текущего списка в файл." @@ -275,7 +275,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Диспетчер служб ReactOS" END diff --git a/base/applications/mscutils/servman/lang/sk-SK.rc b/base/applications/mscutils/servman/lang/sk-SK.rc index dde9cd95ed3..679cb8d3c1c 100644 --- a/base/applications/mscutils/servman/lang/sk-SK.rc +++ b/base/applications/mscutils/servman/lang/sk-SK.rc @@ -82,7 +82,7 @@ END IDD_DLG_GENERAL DIALOGEX 6, 6, 253, 232 CAPTION "Všeobecné" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 70,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 70, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -109,7 +109,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "Závislosti" //Dependencies FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -121,7 +121,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "Vytvoriť službu" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE @@ -188,7 +188,7 @@ END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "Názov" IDS_SECONDCOLUMN "Popis" @@ -197,7 +197,7 @@ BEGIN IDS_FITHCOLUMN "Prihlásený ako" //Log On As END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "Spustená" IDS_SERVICES_STOPPED "Zastavená" @@ -206,7 +206,7 @@ BEGIN IDS_SERVICES_DIS "Zablokovaná" //Disabled END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NUM_SERVICES "Počet služieb: %d" IDS_STOP_DEPENDS "When %s stops, these other services will also stop" @@ -214,7 +214,7 @@ BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Vlastnosti" IDS_TOOLTIP_REFRESH "Obnoviť" @@ -227,7 +227,7 @@ BEGIN IDS_TOOLTIP_RESTART "Reštartovať službu" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "ReactOS is attempting to start the following service" IDS_PROGRESS_INFO_STOP "ReactOS is attempting to stop the following service" @@ -239,13 +239,13 @@ BEGIN IDS_DELETE_STOP "You must manually stop the service before deleting!" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_OPTIONS "CREATE OPTIONS:\r\nNOTE: The option name includes the equal sign.\r\n type= \r\n (default = own)\r\n start= \r\n (default = demand) \r\n error= \r\n (default = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (default = LocalSystem)\r\n password= \r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " Exports the current list to a file." @@ -281,7 +281,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Manažér služieb systému ReactOS" END diff --git a/base/applications/mscutils/servman/lang/sv-SE.rc b/base/applications/mscutils/servman/lang/sv-SE.rc index b24531a9159..0275f83889b 100644 --- a/base/applications/mscutils/servman/lang/sv-SE.rc +++ b/base/applications/mscutils/servman/lang/sv-SE.rc @@ -84,7 +84,7 @@ END IDD_DLG_GENERAL DIALOGEX 6, 6, 253, 232 CAPTION "Allmännt" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 70,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 70, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -111,7 +111,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "Beroenden" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -123,7 +123,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "Skapa en tjänst" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE @@ -190,7 +190,7 @@ END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "Namn" IDS_SECONDCOLUMN "Beskrivning" @@ -199,7 +199,7 @@ BEGIN IDS_FITHCOLUMN "Logga på som" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "Startad" IDS_SERVICES_STOPPED "Stoppad" @@ -208,7 +208,7 @@ BEGIN IDS_SERVICES_DIS "Inaktiverad" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NUM_SERVICES "Num tjänster: %d" IDS_STOP_DEPENDS "När %s stoppas, kommer också dessa tjänster att stanna" @@ -216,7 +216,7 @@ BEGIN IDS_LICENSE "Detta programmet är fri programvara; du kan distribuera det och/eller ändra det under villkoren enligt GNU General Public License som är utgivet av Free Software Foundation; version 2, eller (om du så önskar) alla senare versioner.\r\n\r\nDette programmet er utgivet i hopp om att det skall kunne användas, men DET FINNS INGA GARANTIER; även utan underförstådd garanti om SÄLJBARHET eller LÄMPLIGHET FÖR ETT VISST ÄNDAMÅL. Se på GNU General Public Licensen för mer detaljer.\r\n\r\nDu skall ha motagit en kopia av GNU General Public Licensen tillsammans med detta programmet; om du inte har fått det, skriv til Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Egenskaper" IDS_TOOLTIP_REFRESH "Uppdatera" @@ -229,7 +229,7 @@ BEGIN IDS_TOOLTIP_RESTART "Starta om tjänest" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "ReactOS försöker att starta följande tjänst" IDS_PROGRESS_INFO_STOP "ReactOS försöker att stoppa följande tjänst" @@ -241,13 +241,13 @@ BEGIN IDS_DELETE_STOP "Du måste manuellt stoppa tjänsten före den kan raderas!" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_OPTIONS "CREATE OPTIONS:\r\nNOTE: The option name includes the equal sign.\r\n type= \r\n (default = own)\r\n start= \r\n (default = demand) \r\n error= \r\n (default = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (default = LocalSystem)\r\n password= \r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " Exportera nuvarende lista till en fil." @@ -283,7 +283,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS tjänster" END diff --git a/base/applications/mscutils/servman/lang/th-TH.rc b/base/applications/mscutils/servman/lang/th-TH.rc index 00d6163b583..27f53b6858e 100644 --- a/base/applications/mscutils/servman/lang/th-TH.rc +++ b/base/applications/mscutils/servman/lang/th-TH.rc @@ -85,7 +85,7 @@ END IDD_DLG_GENERAL DIALOGEX 6,6,253,232 CAPTION "ทั่วไป" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 70,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 70, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -112,7 +112,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "แบบไม่กำหนดเอง" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -124,7 +124,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "สร้างการให้บริการ" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE @@ -191,7 +191,7 @@ END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "ชื่อ" IDS_SECONDCOLUMN "คำบรรยาย" @@ -200,7 +200,7 @@ BEGIN IDS_FITHCOLUMN "ป้อนค่าเข้าระบบเป็น" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "เริ่มต้น" IDS_SERVICES_STOPPED "หยุด" @@ -209,7 +209,7 @@ BEGIN IDS_SERVICES_DIS "ไม่มี" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NUM_SERVICES "Num Services: %d" IDS_STOP_DEPENDS "When %s stops, these other services will also stop" @@ -217,7 +217,7 @@ BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Properties" IDS_TOOLTIP_REFRESH "Refresh" @@ -230,7 +230,7 @@ BEGIN IDS_TOOLTIP_RESTART "Restart service" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "ReactOS is attempting to start the following service" IDS_PROGRESS_INFO_STOP "ReactOS is attempting to stop the following service" @@ -242,13 +242,13 @@ BEGIN IDS_DELETE_STOP "You must manually stop the service before deleting!" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_OPTIONS "CREATE OPTIONS:\r\nNOTE: The option name includes the equal sign.\r\n type= \r\n (default = own)\r\n start= \r\n (default = demand) \r\n error= \r\n (default = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (default = LocalSystem)\r\n password= \r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " Exports the current list to a file." @@ -284,7 +284,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS Service Manager" END diff --git a/base/applications/mscutils/servman/lang/tr-TR.rc b/base/applications/mscutils/servman/lang/tr-TR.rc index 28b51b40aff..4666ebac425 100644 --- a/base/applications/mscutils/servman/lang/tr-TR.rc +++ b/base/applications/mscutils/servman/lang/tr-TR.rc @@ -37,7 +37,7 @@ BEGIN MENUITEM "&Dizelge", ID_VIEW_LIST MENUITEM "&Ayrıntılar", ID_VIEW_DETAILS MENUITEM SEPARATOR - MENUITEM "D&eğiştir...", ID_VIEW_CUST, GRAYED + MENUITEM "&Husûsileştir...", ID_VIEW_CUST, GRAYED END POPUP "&Yardım" BEGIN @@ -81,7 +81,7 @@ END IDD_DLG_GENERAL DIALOGEX 6, 6, 253, 232 CAPTION "Başlıca" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 70,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 70, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -108,7 +108,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "Bağımlılıklar" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -120,7 +120,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "Bir Hizmet Oluşturma" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE @@ -132,7 +132,7 @@ BEGIN LTEXT "&Çalıştırma Yolu*:", IDC_STATIC, 10, 51, 68, 9 LTEXT "&Açıklaması:", IDC_STATIC, 12, 86, 44, 9 PUSHBUTTON "Tamam", IDOK, 126, 192, 44, 13 - PUSHBUTTON "Vazgeç", IDCANCEL, 176, 192, 46, 13 + PUSHBUTTON "İptal", IDCANCEL, 176, 192, 46, 13 LTEXT "&Ek Seçenekler (Ayrıntılar için Yardım'a tıklayınız.)", IDC_STATIC, 10, 151, 134, 9 PUSHBUTTON "&Yardım", ID_CREATE_HELP, 10, 192, 44, 13 END @@ -187,7 +187,7 @@ END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "Ad" IDS_SECONDCOLUMN "Tanım" @@ -196,24 +196,24 @@ BEGIN IDS_FITHCOLUMN "Olarak Oturum Aç" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "Başladı" IDS_SERVICES_STOPPED "Durdu" - IDS_SERVICES_AUTO "Kendi Kendine" + IDS_SERVICES_AUTO "Kendiliğinden" IDS_SERVICES_MAN "Elle" IDS_SERVICES_DIS "Devre Dışı" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NUM_SERVICES "Hizmet Sayısı: %d" IDS_STOP_DEPENDS "%s durduğunda, bu hizmetler de durur:" IDS_NO_DEPENDS "" - IDS_LICENSE "ÖNEMLİ: Aşağıdaki metin, özgün metnin resmî olmayan çevirisidir. Çeviri metniyle özgün metin arasında ayrım olabilir. Özgün metin, çeviri metninin altındadır.\r\n\r\n***\r\n\r\nBu yazılım özgürdür, yâni bu yazılımı Özgür Yazılım Vakfı'nın yayınladığı GNU Umûmî Kamu Lisansı'nın 2. sürümü veyâ daha sonraki sürümleri altında yeniden dağıtabilir veyâ değiştirebilirsiniz.\r\n\r\nBu yazılım, kullanışlı olabileceği beklentisiyle dağıtılmıştır ancak bilhassa SATILABİLİRLİK ve BELİRLİ BİR AMACA UYGUNLUK açısından olmak üzere bu yazılımın HİÇBİR GÜVENCESİ YOKTUR. Daha çok bilgi için GNU Umûmî Kamu Lisansı'na bakınız.\r\n\r\nBu yazılımla birlikte GNU Umûmî Kamu Lisansı'nın bir sûretine de iye olmanız gerekir, eğer yoksa Özgür Yazılım Vakfı A.Ş.'ne (51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ABD) yazınız.\r\n\r\n***\r\n\r\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_LICENSE "ÖNEMLİ: Aşağıdaki metin, özgün metnin resmî olmayan çevirisidir. Çeviri metniyle özgün metin arasında ayrım olabilir. Özgün metin, çeviri metninin altındadır.\r\n\r\n***\r\n\r\nBu yazılım özgürdür, yâni bu yazılımı Özgür Yazılım Vakfı'nın yayınladığı GNU Umûmî Kamu Ruhsatı'nın 2. sürümü veyâ daha sonraki sürümleri altında yeniden dağıtabilir veyâ değiştirebilirsiniz.\r\n\r\nBu yazılım, kullanışlı olabileceği beklentisiyle dağıtılmıştır ancak bilhassa SATILABİLİRLİK ve BELİRLİ BİR AMACA UYGUNLUK açısından olmak üzere bu yazılımın HİÇBİR GÜVENCESİ YOKTUR. Daha çok bilgi için GNU Umûmî Kamu Ruhsatı'na bakınız.\r\n\r\nBu yazılımla birlikte GNU Umûmî Kamu Ruhsatı'nın bir sûretine de iye olmanız gerekir, eğer yoksa Özgür Yazılım Vakfı A.Ş.'ne (51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ABD) yazınız.\r\n\r\n***\r\n\r\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Husûsiyetler" IDS_TOOLTIP_REFRESH "Yenile" @@ -226,7 +226,7 @@ BEGIN IDS_TOOLTIP_RESTART "Hizmeti Yeniden Başlat" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "ReactOS, aşağıdaki hizmeti başlatmaya çalışıyor:" IDS_PROGRESS_INFO_STOP "ReactOS, aşağıdaki hizmeti durdurmaya çalışıyor:" @@ -238,13 +238,13 @@ BEGIN IDS_DELETE_STOP "Hizmeti silmeden önce onu, elle durdurmalısınız." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN - IDS_HELP_OPTIONS "EK SEÇENEKLER:\r\nDİKKAT: Seçenek adı, eşittir imini de kapsar.\r\n type= \r\n (Ön tanımlı = own)\r\n start= \r\n (Ön tanımlı = demand) \r\n error= \r\n (Ön tanımlı = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (Ön tanımlı = LocalSystem)\r\n password= <Şifre>\r\n" + IDS_HELP_OPTIONS "EK SEÇENEKLER:\r\nUYARI: Seçenek adı, eşittir imini de kapsar.\r\n type= \r\n (Öntanımlı = own)\r\n start= \r\n (Öntanımlı = demand) \r\n error= \r\n (Öntanımlı = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (Öntanımlı = LocalSystem)\r\n password= <Şifre>\r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " Şimdiki dizelgeyi, bir kütüğe aktarır." @@ -280,7 +280,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Hizmet Yöneticisi" END diff --git a/base/applications/mscutils/servman/lang/uk-UA.rc b/base/applications/mscutils/servman/lang/uk-UA.rc index c991a731c2c..d333dcb277e 100644 --- a/base/applications/mscutils/servman/lang/uk-UA.rc +++ b/base/applications/mscutils/servman/lang/uk-UA.rc @@ -85,7 +85,7 @@ END IDD_DLG_GENERAL DIALOGEX 6, 6, 253, 232 CAPTION "Загальні" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 70,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 70, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -112,7 +112,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "Залежності" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -124,7 +124,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "Створити службу" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE @@ -191,7 +191,7 @@ END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "Ім'я" IDS_SECONDCOLUMN "Опис" @@ -200,7 +200,7 @@ BEGIN IDS_FITHCOLUMN "Вхід від імені" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "Запущено" IDS_SERVICES_STOPPED "Зупинено" @@ -209,7 +209,7 @@ BEGIN IDS_SERVICES_DIS "Відключено" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NUM_SERVICES "Hомер служби: %d" IDS_STOP_DEPENDS "Коли %s зупинеться, наступні служби також буде зупинено" @@ -217,7 +217,7 @@ BEGIN IDS_LICENSE "Це вільне програмне забезпечення; Ви можете розповсюджувати її та змінювати, дотримуючись умови Відкритої ліцензійної угоди GNU, опублікованої Фондом вільного програмного забезпечення; або редакції 2 Угоди, або будь-якої редакції, випущеної пізніше.\r\n\r\nЦя програма розповсюджується в надії на те, що вона виявиться корисною, але БЕЗ БУДЬ-ЯКИХ ГАРАНТІЙ, включаючи УЯВНОЮ ГАРАНТІЄЮ ЯКОСТІ або ПРИДАТНОСТІ для певних цілей. Подробиці містяться у Відкритій ліцензійній угоді GNU.\r\n\r\nРазом з цією програмою повинен поширюватися примірник Відкритої ліцензійної угоди GNU. Якщо він відсутній, повідомте про це в Фонд вільного програмного забезпечення (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "Властивості" IDS_TOOLTIP_REFRESH "Оновити" @@ -230,7 +230,7 @@ BEGIN IDS_TOOLTIP_RESTART "Перезапуск служби" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "ReactOS намагається запустити наступну службу" IDS_PROGRESS_INFO_STOP "ReactOS намагається зупинити наступну службу" @@ -242,13 +242,13 @@ BEGIN IDS_DELETE_STOP "Ви маєте вручну зупинити службу перед видаленням!" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_OPTIONS "ОПЦІЇ СТВОРЕННЯ:\r\nПРИМІТКА: ім'я опції містить знак рівності.\r\n type= \r\n (default = own)\r\n start= \r\n (default = demand) \r\n error= \r\n (default = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (default = LocalSystem)\r\n password= \r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " Експорт поточного списку у файл." @@ -284,7 +284,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "Диспетчер керування службами ReactOS" END diff --git a/base/applications/mscutils/servman/lang/zh-CN.rc b/base/applications/mscutils/servman/lang/zh-CN.rc index d86b98c082c..fe728fc81df 100644 --- a/base/applications/mscutils/servman/lang/zh-CN.rc +++ b/base/applications/mscutils/servman/lang/zh-CN.rc @@ -81,7 +81,7 @@ END IDD_DLG_GENERAL DIALOGEX 6, 6, 253, 232 CAPTION "普通" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN LTEXT "", IDC_SERV_NAME, 70,11,176,11, WS_CHILD | WS_VISIBLE EDITTEXT IDC_DISP_NAME, 70, 29, 176, 13, WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_READONLY @@ -108,7 +108,7 @@ END IDD_DLG_DEPEND DIALOGEX 6,6,253,225 CAPTION "依赖" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN CONTROL "", IDC_DEPEND_TREE1, "SysTreeView32" , WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 70, 236, 68 CONTROL "", IDC_DEPEND_TREE2, "SysTreeView32", WS_BORDER | WS_CHILDWINDOW | WS_VISIBLE | WS_TABSTOP | TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP, 8, 151, 234, 67 @@ -120,7 +120,7 @@ END IDD_DLG_CREATE DIALOGEX 6,6,225,209 CAPTION "创建一个服务" FONT 8, "MS Shell Dlg",0,0 -STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_THICKFRAME | WS_GROUP | WS_TABSTOP +STYLE DS_SHELLFONT | WS_BORDER | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU | WS_GROUP | WS_TABSTOP BEGIN EDITTEXT IDC_CREATE_SERVNAME, 72, 12, 150, 11, WS_CHILD | WS_VISIBLE | WS_EX_CLIENTEDGE EDITTEXT IDC_CREATE_DISPNAME, 72, 31, 150, 11, WS_CHILD | WS_VISIBLE @@ -187,7 +187,7 @@ END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FIRSTCOLUMN "名称" IDS_SECONDCOLUMN "描述" @@ -196,7 +196,7 @@ BEGIN IDS_FITHCOLUMN "登录为" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SERVICES_STARTED "已启动" IDS_SERVICES_STOPPED "已停止" @@ -205,7 +205,7 @@ BEGIN IDS_SERVICES_DIS "已禁用" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NUM_SERVICES "服务总数: %d" IDS_STOP_DEPENDS "当 %s 停止时,这些服务也将被停止" @@ -213,7 +213,7 @@ BEGIN IDS_LICENSE "这个程序是自由软件;你可以在自由软件基金会(FSF)的 GNU LGPL 协议下重新发布或修改它;也适用于这个协议的版本 2,或(在您看来)任何更新的版本。\r\n\r\n这个程序在希望其有用的愿望中发布,但没有任何保证;也不意味着性能保证或对某特定用途的适用性。请查看 GNU GPL 许可协议以了解更多细节。\r\n\r\n您应该已经收到了一份和这个程序一起的 GNU GPL 协议的副本;如果没有,请写信给自由软件基金会(FSF):51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_PROP "属性" IDS_TOOLTIP_REFRESH "刷新" @@ -226,7 +226,7 @@ BEGIN IDS_TOOLTIP_RESTART "重新启动服务" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PROGRESS_INFO_START "ReactOS 正在尝试启动以下服务" IDS_PROGRESS_INFO_STOP "ReactOS 正在尝试停止以下服务" @@ -238,13 +238,13 @@ BEGIN IDS_DELETE_STOP "您必须在删除该服务前停止它!" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_OPTIONS "创建选项:\r\n注意:选项名包含了等号(=)。\r\n type= \r\n (default = own)\r\n start= \r\n (default = demand) \r\n error= \r\n (default = normal)\r\n group= \r\n tag= \r\n depend= \r\n obj= \r\n (default = LocalSystem)\r\n password= \r\n" END /* Hints */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HINT_BLANK " " IDS_HINT_EXPORT " 将当前服务列表导出为一个文件。" @@ -280,7 +280,7 @@ BEGIN END /* Application title */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPNAME "ReactOS 服务管理器" END diff --git a/base/applications/mscutils/servman/manifest.xml b/base/applications/mscutils/servman/manifest.xml deleted file mode 100644 index 7256947186e..00000000000 --- a/base/applications/mscutils/servman/manifest.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/base/applications/mscutils/servman/rsrc.rc b/base/applications/mscutils/servman/rsrc.rc index f1eb6a93250..16d69608cfb 100644 --- a/base/applications/mscutils/servman/rsrc.rc +++ b/base/applications/mscutils/servman/rsrc.rc @@ -3,15 +3,15 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDI_SM_ICON ICON "res/system.ico" /* main toolbar icons */ -IDB_PROP BITMAP DISCARDABLE "res/properties.bmp" -IDB_REFRESH BITMAP DISCARDABLE "res/refresh.bmp" -IDB_EXPORT BITMAP DISCARDABLE "res/export.bmp" -IDB_CREATE BITMAP DISCARDABLE "res/create.bmp" -IDB_DELETE BITMAP DISCARDABLE "res/delete.bmp" -IDB_START BITMAP DISCARDABLE "res/start.bmp" -IDB_STOP BITMAP DISCARDABLE "res/stop.bmp" -IDB_PAUSE BITMAP DISCARDABLE "res/pause.bmp" -IDB_RESTART BITMAP DISCARDABLE "res/restart.bmp" +IDB_PROP BITMAP "res/properties.bmp" +IDB_REFRESH BITMAP "res/refresh.bmp" +IDB_EXPORT BITMAP "res/export.bmp" +IDB_CREATE BITMAP "res/create.bmp" +IDB_DELETE BITMAP "res/delete.bmp" +IDB_START BITMAP "res/start.bmp" +IDB_STOP BITMAP "res/stop.bmp" +IDB_PAUSE BITMAP "res/pause.bmp" +IDB_RESTART BITMAP "res/restart.bmp" IDI_NODEPENDS ICON "res/nodepends.ico" IDI_SERVICE ICON "res/system.ico" diff --git a/base/applications/mscutils/servman/servman.rc b/base/applications/mscutils/servman/servman.rc index c51f8601540..dcd85a9e5ab 100644 --- a/base/applications/mscutils/servman/servman.rc +++ b/base/applications/mscutils/servman/servman.rc @@ -9,6 +9,6 @@ #define REACTOS_STR_ORIGINAL_FILENAME "servman.exe\0" //#include -1 24 DISCARDABLE "manifest.xml" +#include #include "rsrc.rc" diff --git a/base/applications/mscutils/servman/start.c b/base/applications/mscutils/servman/start.c index 504483f7154..1af77144bbd 100644 --- a/base/applications/mscutils/servman/start.c +++ b/base/applications/mscutils/servman/start.c @@ -183,7 +183,7 @@ DoStartService(PMAIN_WND_INFO Info, } if (lpArgsVector) - LocalFree(lpArgsVector); + LocalFree((LPVOID)lpArgsVector); return bRet; } diff --git a/base/applications/mspaint/definitions.h b/base/applications/mspaint/definitions.h index 71ec94bf263..200ca9e19b7 100644 --- a/base/applications/mspaint/definitions.h +++ b/base/applications/mspaint/definitions.h @@ -29,6 +29,8 @@ #define IDI_HORZSTRETCH 535 #define IDI_VERTSTRETCH 536 +#define IDI_HORZSKEW 537 +#define IDI_VERTSKEW 538 #define ID_MENU 501 @@ -68,7 +70,7 @@ #define IDM_VIEWSHOWMINIATURE 243 #define IDM_IMAGEROTATEMIRROR 250 -#define IDM_IMAGECHANGESIZE 251 +#define IDM_IMAGESTRETCHSKEW 251 #define IDM_IMAGECROP 252 #define IDM_IMAGEINVERTCOLORS 253 #define IDM_IMAGEATTRIBUTES 254 @@ -76,6 +78,8 @@ #define IDM_IMAGEDRAWOPAQUE 256 #define IDM_COLORSEDITPALETTE 260 +#define IDM_COLORSMODERNPALETTE 261 +#define IDM_COLORSOLDPALETTE 262 #define IDM_HELPHELPTOPICS 270 #define IDM_HELPINFO 271 @@ -147,16 +151,25 @@ #define IDD_ATTRIBUTESRB4 729 #define IDD_ATTRIBUTESRB5 730 -#define IDD_CHANGESIZE 740 -#define IDD_CHANGESIZEGROUP 741 -#define IDD_CHANGESIZEICON1 742 -#define IDD_CHANGESIZETEXT1 743 -#define IDD_CHANGESIZEEDIT1 744 -#define IDD_CHANGESIZETEXT2 745 -#define IDD_CHANGESIZEICON2 746 -#define IDD_CHANGESIZETEXT3 747 -#define IDD_CHANGESIZEEDIT2 748 -#define IDD_CHANGESIZETEXT4 749 +#define IDD_STRETCHSKEW 740 +#define IDD_STRETCHSKEWGROUPSTRETCH 741 +#define IDD_STRETCHSKEWICONHSTRETCH 742 +#define IDD_STRETCHSKEWTEXTHSTRETCH 743 +#define IDD_STRETCHSKEWEDITHSTRETCH 744 +#define IDD_STRETCHSKEWTEXTHPERCENT 745 +#define IDD_STRETCHSKEWICONVSTRETCH 746 +#define IDD_STRETCHSKEWTEXTVSTRETCH 747 +#define IDD_STRETCHSKEWEDITVSTRETCH 748 +#define IDD_STRETCHSKEWTEXTVPERCENT 749 +#define IDD_STRETCHSKEWGROUPSKEW 750 +#define IDD_STRETCHSKEWICONHSKEW 751 +#define IDD_STRETCHSKEWTEXTHSKEW 752 +#define IDD_STRETCHSKEWEDITHSKEW 753 +#define IDD_STRETCHSKEWTEXTHDEG 754 +#define IDD_STRETCHSKEWICONVSKEW 755 +#define IDD_STRETCHSKEWTEXTVSKEW 756 +#define IDD_STRETCHSKEWEDITVSKEW 757 +#define IDD_STRETCHSKEWTEXTVDEG 758 #define IDS_PROGRAMNAME 900 #define IDS_WINDOWTITLE 901 @@ -186,3 +199,7 @@ #define IDS_SAVEFILTER 927 #define IDS_FILESIZE 928 #define IDS_PRINTRES 929 + +#define IDS_INTNUMBERS 930 +#define IDS_PERCENTAGE 931 +#define IDS_ANGLE 932 diff --git a/base/applications/mspaint/dialogs.c b/base/applications/mspaint/dialogs.c index 0e843c5f7c2..3bc227b47ea 100644 --- a/base/applications/mspaint/dialogs.c +++ b/base/applications/mspaint/dialogs.c @@ -77,10 +77,13 @@ ATTDlgWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) TCHAR strrc[100]; TCHAR res[100]; + widthSetInDlg = imgXRes; + heightSetInDlg = imgYRes; + CheckDlgButton(hwnd, IDD_ATTRIBUTESRB3, BST_CHECKED); CheckDlgButton(hwnd, IDD_ATTRIBUTESRB5, BST_CHECKED); - SetDlgItemInt(hwnd, IDD_ATTRIBUTESEDIT1, imgXRes, FALSE); - SetDlgItemInt(hwnd, IDD_ATTRIBUTESEDIT2, imgYRes, FALSE); + SetDlgItemInt(hwnd, IDD_ATTRIBUTESEDIT1, widthSetInDlg, FALSE); + SetDlgItemInt(hwnd, IDD_ATTRIBUTESEDIT2, heightSetInDlg, FALSE); if (isAFile) { @@ -108,19 +111,84 @@ ATTDlgWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) switch (LOWORD(wParam)) { case IDOK: - EndDialog(hwnd, - GetDlgItemInt(hwnd, IDD_ATTRIBUTESEDIT1, NULL, - FALSE) | (GetDlgItemInt(hwnd, IDD_ATTRIBUTESEDIT2, NULL, - FALSE) << 16)); + EndDialog(hwnd, 1); break; case IDCANCEL: EndDialog(hwnd, 0); break; case IDD_ATTRIBUTESSTANDARD: + widthSetInDlg = imgXRes; + heightSetInDlg = imgYRes; CheckDlgButton(hwnd, IDD_ATTRIBUTESRB3, BST_CHECKED); CheckDlgButton(hwnd, IDD_ATTRIBUTESRB5, BST_CHECKED); - SetDlgItemInt(hwnd, IDD_ATTRIBUTESEDIT1, imgXRes, FALSE); - SetDlgItemInt(hwnd, IDD_ATTRIBUTESEDIT2, imgYRes, FALSE); + SetDlgItemInt(hwnd, IDD_ATTRIBUTESEDIT1, widthSetInDlg, FALSE); + SetDlgItemInt(hwnd, IDD_ATTRIBUTESEDIT2, heightSetInDlg, FALSE); + break; + case IDD_ATTRIBUTESRB1: + { + TCHAR number[100]; + _stprintf(number, _T("%.3lf"), widthSetInDlg / (0.0254 * fileHPPM)); + SetDlgItemText(hwnd, IDD_ATTRIBUTESEDIT1, number); + _stprintf(number, _T("%.3lf"), heightSetInDlg / (0.0254 * fileVPPM)); + SetDlgItemText(hwnd, IDD_ATTRIBUTESEDIT2, number); + break; + } + case IDD_ATTRIBUTESRB2: + { + TCHAR number[100]; + _stprintf(number, _T("%.3lf"), widthSetInDlg * 100.0 / fileHPPM); + SetDlgItemText(hwnd, IDD_ATTRIBUTESEDIT1, number); + _stprintf(number, _T("%.3lf"), heightSetInDlg * 100.0 / fileVPPM); + SetDlgItemText(hwnd, IDD_ATTRIBUTESEDIT2, number); + break; + } + case IDD_ATTRIBUTESRB3: + SetDlgItemInt(hwnd, IDD_ATTRIBUTESEDIT1, widthSetInDlg, FALSE); + SetDlgItemInt(hwnd, IDD_ATTRIBUTESEDIT2, heightSetInDlg, FALSE); + break; + case IDD_ATTRIBUTESEDIT1: + if (Edit_GetModify((HWND)lParam)) + { + TCHAR tempS[100]; + if (IsDlgButtonChecked(hwnd, IDD_ATTRIBUTESRB1)) + { + GetDlgItemText(hwnd, IDD_ATTRIBUTESEDIT1, tempS, SIZEOF(tempS)); + widthSetInDlg = max(1, (int) (_tcstod(tempS, NULL) * fileHPPM * 0.0254)); + } + else if (IsDlgButtonChecked(hwnd, IDD_ATTRIBUTESRB2)) + { + GetDlgItemText(hwnd, IDD_ATTRIBUTESEDIT1, tempS, SIZEOF(tempS)); + widthSetInDlg = max(1, (int) (_tcstod(tempS, NULL) * fileHPPM / 100)); + } + else if (IsDlgButtonChecked(hwnd, IDD_ATTRIBUTESRB3)) + { + GetDlgItemText(hwnd, IDD_ATTRIBUTESEDIT1, tempS, SIZEOF(tempS)); + widthSetInDlg = max(1, _tstoi(tempS)); + } + Edit_SetModify((HWND)lParam, FALSE); + } + break; + case IDD_ATTRIBUTESEDIT2: + if (Edit_GetModify((HWND)lParam)) + { + TCHAR tempS[100]; + if (IsDlgButtonChecked(hwnd, IDD_ATTRIBUTESRB1)) + { + GetDlgItemText(hwnd, IDD_ATTRIBUTESEDIT2, tempS, SIZEOF(tempS)); + heightSetInDlg = max(1, (int) (_tcstod(tempS, NULL) * fileVPPM * 0.0254)); + } + else if (IsDlgButtonChecked(hwnd, IDD_ATTRIBUTESRB2)) + { + GetDlgItemText(hwnd, IDD_ATTRIBUTESEDIT2, tempS, SIZEOF(tempS)); + heightSetInDlg = max(1, (int) (_tcstod(tempS, NULL) * fileVPPM / 100)); + } + else if (IsDlgButtonChecked(hwnd, IDD_ATTRIBUTESRB3)) + { + GetDlgItemText(hwnd, IDD_ATTRIBUTESEDIT2, tempS, SIZEOF(tempS)); + heightSetInDlg = max(1, _tstoi(tempS)); + } + Edit_SetModify((HWND)lParam, FALSE); + } break; } break; @@ -142,8 +210,10 @@ CHSIZEDlgWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) switch (message) { case WM_INITDIALOG: - SetDlgItemInt(hwnd, IDD_CHANGESIZEEDIT1, 100, FALSE); - SetDlgItemInt(hwnd, IDD_CHANGESIZEEDIT2, 100, FALSE); + SetDlgItemInt(hwnd, IDD_STRETCHSKEWEDITHSTRETCH, 100, FALSE); + SetDlgItemInt(hwnd, IDD_STRETCHSKEWEDITVSTRETCH, 100, FALSE); + SetDlgItemInt(hwnd, IDD_STRETCHSKEWEDITHSKEW, 0, FALSE); + SetDlgItemInt(hwnd, IDD_STRETCHSKEWEDITVSKEW, 0, FALSE); return TRUE; case WM_CLOSE: EndDialog(hwnd, 0); @@ -152,11 +222,34 @@ CHSIZEDlgWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) switch (LOWORD(wParam)) { case IDOK: - EndDialog(hwnd, - GetDlgItemInt(hwnd, IDD_CHANGESIZEEDIT1, NULL, - FALSE) | (GetDlgItemInt(hwnd, IDD_CHANGESIZEEDIT2, NULL, - FALSE) << 16)); + { + TCHAR strrcIntNumbers[100]; + TCHAR strrcPercentage[100]; + TCHAR strrcAngle[100]; + BOOL tr1, tr2, tr3, tr4; + + LoadString(hProgInstance, IDS_INTNUMBERS, strrcIntNumbers, sizeof(strrcIntNumbers)); + LoadString(hProgInstance, IDS_PERCENTAGE, strrcPercentage, sizeof(strrcPercentage)); + LoadString(hProgInstance, IDS_ANGLE, strrcAngle, sizeof(strrcAngle)); + + stretchSkew.percentage.x = GetDlgItemInt(hwnd, IDD_STRETCHSKEWEDITHSTRETCH, &tr1, FALSE); + stretchSkew.percentage.y = GetDlgItemInt(hwnd, IDD_STRETCHSKEWEDITVSTRETCH, &tr2, FALSE); + stretchSkew.angle.x = GetDlgItemInt(hwnd, IDD_STRETCHSKEWEDITHSKEW, &tr3, TRUE); + stretchSkew.angle.y = GetDlgItemInt(hwnd, IDD_STRETCHSKEWEDITVSKEW, &tr4, TRUE); + + if (!(tr1 && tr2 && tr3 && tr4)) + MessageBox(hwnd, strrcIntNumbers, NULL, MB_ICONEXCLAMATION); + else if (stretchSkew.percentage.x < 1 || stretchSkew.percentage.x > 500 + || stretchSkew.percentage.y < 1 || stretchSkew.percentage.y > 500) + MessageBox(hwnd, strrcPercentage, NULL, MB_ICONEXCLAMATION); + else if (stretchSkew.angle.x < -89 || stretchSkew.angle.x > 89 + || stretchSkew.angle.y < -89 || stretchSkew.angle.y > 89) + MessageBox(hwnd, strrcAngle, NULL, MB_ICONEXCLAMATION); + else + EndDialog(hwnd, 1); + break; + } case IDCANCEL: EndDialog(hwnd, 0); break; @@ -171,5 +264,5 @@ CHSIZEDlgWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) int changeSizeDlg() { - return DialogBox(hProgInstance, MAKEINTRESOURCE(IDD_CHANGESIZE), hMainWnd, (DLGPROC) CHSIZEDlgWinProc); + return DialogBox(hProgInstance, MAKEINTRESOURCE(IDD_STRETCHSKEW), hMainWnd, (DLGPROC) CHSIZEDlgWinProc); } diff --git a/base/applications/mspaint/drawing.c b/base/applications/mspaint/drawing.c index 7a957baddf1..9aad82a073f 100644 --- a/base/applications/mspaint/drawing.c +++ b/base/applications/mspaint/drawing.c @@ -109,14 +109,16 @@ Fill(HDC hdc, LONG x, LONG y, COLORREF color) void Erase(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF color, LONG radius) { - short a; + LONG a, b; HPEN oldPen; HBRUSH oldBrush = SelectObject(hdc, CreateSolidBrush(color)); + + b = max(1, max(abs(x2 - x1), abs(y2 - y1))); oldPen = SelectObject(hdc, CreatePen(PS_SOLID, 1, color)); - for(a = 0; a <= 100; a++) - Rectangle(hdc, (x1 * (100 - a) + x2 * a) / 100 - radius + 1, - (y1 * (100 - a) + y2 * a) / 100 - radius + 1, (x1 * (100 - a) + x2 * a) / 100 + radius + 1, - (y1 * (100 - a) + y2 * a) / 100 + radius + 1); + for(a = 0; a <= b; a++) + Rectangle(hdc, (x1 * (b - a) + x2 * a) / b - radius + 1, + (y1 * (b - a) + y2 * a) / b - radius + 1, (x1 * (b - a) + x2 * a) / b + radius + 1, + (y1 * (b - a) + y2 * a) / b + radius + 1); DeleteObject(SelectObject(hdc, oldBrush)); DeleteObject(SelectObject(hdc, oldPen)); } @@ -124,13 +126,14 @@ Erase(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF color, LONG radius) void Replace(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF bg, LONG radius) { - LONG a, x, y; + LONG a, b, x, y; + b = max(1, max(abs(x2 - x1), abs(y2 - y1))); - for(a = 0; a <= 100; a++) - for(y = (y1 * (100 - a) + y2 * a) / 100 - radius + 1; - y < (y1 * (100 - a) + y2 * a) / 100 + radius + 1; y++) - for(x = (x1 * (100 - a) + x2 * a) / 100 - radius + 1; - x < (x1 * (100 - a) + x2 * a) / 100 + radius + 1; x++) + for(a = 0; a <= b; a++) + for(y = (y1 * (b - a) + y2 * a) / b - radius + 1; + y < (y1 * (b - a) + y2 * a) / b + radius + 1; y++) + for(x = (x1 * (b - a) + x2 * a) / b - radius + 1; + x < (x1 * (b - a) + x2 * a) / b + radius + 1; x++) if (GetPixel(hdc, x, y) == fg) SetPixel(hdc, x, y, bg); } @@ -147,22 +150,23 @@ Airbrush(HDC hdc, LONG x, LONG y, COLORREF color, LONG r) } void -Brush(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF color, COLORREF style) +Brush(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF color, LONG style) { HPEN oldPen = SelectObject(hdc, CreatePen(PS_SOLID, 1, color)); HBRUSH oldBrush = SelectObject(hdc, CreateSolidBrush(color)); - short a; + LONG a, b; + b = max(1, max(abs(x2 - x1), abs(y2 - y1))); switch (style) { case 0: - for(a = 0; a <= 100; a++) - Ellipse(hdc, (x1 * (100 - a) + x2 * a) / 100 - 3, (y1 * (100 - a) + y2 * a) / 100 - 3, - (x1 * (100 - a) + x2 * a) / 100 + 4, (y1 * (100 - a) + y2 * a) / 100 + 4); + for(a = 0; a <= b; a++) + Ellipse(hdc, (x1 * (b - a) + x2 * a) / b - 3, (y1 * (b - a) + y2 * a) / b - 3, + (x1 * (b - a) + x2 * a) / b + 4, (y1 * (b - a) + y2 * a) / b + 4); break; case 1: - for(a = 0; a <= 100; a++) - Ellipse(hdc, (x1 * (100 - a) + x2 * a) / 100 - 1, (y1 * (100 - a) + y2 * a) / 100 - 1, - (x1 * (100 - a) + x2 * a) / 100 + 3, (y1 * (100 - a) + y2 * a) / 100 + 3); + for(a = 0; a <= b; a++) + Ellipse(hdc, (x1 * (b - a) + x2 * a) / b - 1, (y1 * (b - a) + y2 * a) / b - 1, + (x1 * (b - a) + x2 * a) / b + 3, (y1 * (b - a) + y2 * a) / b + 3); break; case 2: MoveToEx(hdc, x1, y1, NULL); @@ -170,62 +174,44 @@ Brush(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF color, COLORREF styl SetPixel(hdc, x2, y2, color); break; case 3: - for(a = 0; a <= 100; a++) - Rectangle(hdc, (x1 * (100 - a) + x2 * a) / 100 - 3, (y1 * (100 - a) + y2 * a) / 100 - 3, - (x1 * (100 - a) + x2 * a) / 100 + 5, (y1 * (100 - a) + y2 * a) / 100 + 5); + for(a = 0; a <= b; a++) + Rectangle(hdc, (x1 * (b - a) + x2 * a) / b - 3, (y1 * (b - a) + y2 * a) / b - 3, + (x1 * (b - a) + x2 * a) / b + 5, (y1 * (b - a) + y2 * a) / b + 5); break; case 4: - for(a = 0; a <= 100; a++) - Rectangle(hdc, (x1 * (100 - a) + x2 * a) / 100 - 2, (y1 * (100 - a) + y2 * a) / 100 - 2, - (x1 * (100 - a) + x2 * a) / 100 + 3, (y1 * (100 - a) + y2 * a) / 100 + 3); + for(a = 0; a <= b; a++) + Rectangle(hdc, (x1 * (b - a) + x2 * a) / b - 2, (y1 * (b - a) + y2 * a) / b - 2, + (x1 * (b - a) + x2 * a) / b + 3, (y1 * (b - a) + y2 * a) / b + 3); break; case 5: - for(a = 0; a <= 100; a++) - Rectangle(hdc, (x1 * (100 - a) + x2 * a) / 100 - 1, (y1 * (100 - a) + y2 * a) / 100 - 1, - (x1 * (100 - a) + x2 * a) / 100 + 1, (y1 * (100 - a) + y2 * a) / 100 + 1); + for(a = 0; a <= b; a++) + Rectangle(hdc, (x1 * (b - a) + x2 * a) / b - 1, (y1 * (b - a) + y2 * a) / b - 1, + (x1 * (b - a) + x2 * a) / b + 1, (y1 * (b - a) + y2 * a) / b + 1); break; case 6: - for(a = 0; a <= 100; a++) - { - MoveToEx(hdc, (x1 * (100 - a) + x2 * a) / 100 - 3, (y1 * (100 - a) + y2 * a) / 100 + 5, NULL); - LineTo(hdc, (x1 * (100 - a) + x2 * a) / 100 + 5, (y1 * (100 - a) + y2 * a) / 100 - 3); - } - break; case 7: - for(a = 0; a <= 100; a++) - { - MoveToEx(hdc, (x1 * (100 - a) + x2 * a) / 100 - 2, (y1 * (100 - a) + y2 * a) / 100 + 3, NULL); - LineTo(hdc, (x1 * (100 - a) + x2 * a) / 100 + 3, (y1 * (100 - a) + y2 * a) / 100 - 2); - } - break; case 8: - for(a = 0; a <= 100; a++) - { - MoveToEx(hdc, (x1 * (100 - a) + x2 * a) / 100 - 1, (y1 * (100 - a) + y2 * a) / 100 + 1, NULL); - LineTo(hdc, (x1 * (100 - a) + x2 * a) / 100 + 1, (y1 * (100 - a) + y2 * a) / 100 - 1); - } - break; case 9: - for(a = 0; a <= 100; a++) - { - MoveToEx(hdc, (x1 * (100 - a) + x2 * a) / 100 - 3, (y1 * (100 - a) + y2 * a) / 100 - 3, NULL); - LineTo(hdc, (x1 * (100 - a) + x2 * a) / 100 + 5, (y1 * (100 - a) + y2 * a) / 100 + 5); - } - break; case 10: - for(a = 0; a <= 100; a++) - { - MoveToEx(hdc, (x1 * (100 - a) + x2 * a) / 100 - 2, (y1 * (100 - a) + y2 * a) / 100 - 2, NULL); - LineTo(hdc, (x1 * (100 - a) + x2 * a) / 100 + 3, (y1 * (100 - a) + y2 * a) / 100 + 3); - } - break; case 11: - for(a = 0; a <= 100; a++) - { - MoveToEx(hdc, (x1 * (100 - a) + x2 * a) / 100 - 1, (y1 * (100 - a) + y2 * a) / 100 - 1, NULL); - LineTo(hdc, (x1 * (100 - a) + x2 * a) / 100 + 1, (y1 * (100 - a) + y2 * a) / 100 + 1); - } + { + POINT offsTop[] = {{4, 3}, {2, -2}, {0, 0}, + {-3, -3}, {-2, -2}, {-1, 0}}; + POINT offsBtm[] = {{-3, 4}, {-2, 2}, {-1, 1}, + {4, 4}, {2, 2}, {0, 1}}; + LONG idx = style - 6; + POINT pts[4]; + pts[0].x = x1 + offsTop[idx].x; + pts[0].y = y1 + offsTop[idx].y; + pts[1].x = x1 + offsBtm[idx].x; + pts[1].y = y1 + offsBtm[idx].y; + pts[2].x = x2 + offsBtm[idx].x; + pts[2].y = y2 + offsBtm[idx].y; + pts[3].x = x2 + offsTop[idx].x; + pts[3].y = y2 + offsTop[idx].y; + Polygon(hdc, pts, 4); break; + } } DeleteObject(SelectObject(hdc, oldBrush)); DeleteObject(SelectObject(hdc, oldPen)); diff --git a/base/applications/mspaint/drawing.h b/base/applications/mspaint/drawing.h index 2c39ee9538d..6368ff9e2e6 100644 --- a/base/applications/mspaint/drawing.h +++ b/base/applications/mspaint/drawing.h @@ -26,7 +26,7 @@ void Replace(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF fg, COLORREF void Airbrush(HDC hdc, LONG x, LONG y, COLORREF color, LONG r); -void Brush(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF color, COLORREF style); +void Brush(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2, COLORREF color, LONG style); void RectSel(HDC hdc, LONG x1, LONG y1, LONG x2, LONG y2); diff --git a/base/applications/mspaint/globalvar.h b/base/applications/mspaint/globalvar.h index 1c0c49bc176..63e68fe9a7b 100644 --- a/base/applications/mspaint/globalvar.h +++ b/base/applications/mspaint/globalvar.h @@ -11,6 +11,13 @@ //#include //#include "definitions.h" +/* TYPES ************************************************************/ + +typedef struct tagSTRETCHSKEW { + POINT percentage; + POINT angle; +} STRETCHSKEW; + /* VARIABLES declared in main.c *************************************/ extern HDC hDrawingDC; @@ -20,16 +27,19 @@ extern BITMAPINFO bitmapinfo; extern int imgXRes; extern int imgYRes; +extern int widthSetInDlg; +extern int heightSetInDlg; + +extern STRETCHSKEW stretchSkew; + extern HBITMAP hBms[HISTORYSIZE]; extern int currInd; extern int undoSteps; extern int redoSteps; extern BOOL imageSaved; -extern LONG startX; -extern LONG startY; -extern LONG lastX; -extern LONG lastY; +extern POINT start; +extern POINT last; extern int lineWidth; extern int shapeStyle; extern int brushStyle; @@ -46,6 +56,9 @@ extern HBITMAP hSelBm; extern HBITMAP hSelMask; extern int palColors[28]; +extern int modernPalColors[28]; +extern int oldPalColors[28]; +extern int selectedPalette; extern int fgColor; extern int bgColor; diff --git a/base/applications/mspaint/icons.rc b/base/applications/mspaint/icons.rc index 6a42717dbdd..f3c07a2c0d8 100644 --- a/base/applications/mspaint/icons.rc +++ b/base/applications/mspaint/icons.rc @@ -1,4 +1,4 @@ -IDI_APPICON ICON MOVEABLE PURE LOADONCALL DISCARDABLE "icons/paint.ico" +IDI_APPICON ICON "icons/paint.ico" IDB_TOOLBARICONS BITMAP "icons/iconbar.bmp" @@ -13,3 +13,5 @@ IDC_AIRBRUSH ICON "icons/airbrush_cur.ico" IDI_HORZSTRETCH ICON "icons/horzstretch.ico" IDI_VERTSTRETCH ICON "icons/vertstretch.ico" +IDI_HORZSKEW ICON "icons/horzskew.ico" +IDI_VERTSKEW ICON "icons/vertskew.ico" diff --git a/base/applications/mspaint/icons/horzskew.ico b/base/applications/mspaint/icons/horzskew.ico new file mode 100644 index 00000000000..81dbe7cf707 Binary files /dev/null and b/base/applications/mspaint/icons/horzskew.ico differ diff --git a/base/applications/mspaint/icons/vertskew.ico b/base/applications/mspaint/icons/vertskew.ico new file mode 100644 index 00000000000..e72012f99e4 Binary files /dev/null and b/base/applications/mspaint/icons/vertskew.ico differ diff --git a/base/applications/mspaint/lang/bg-BG.rc b/base/applications/mspaint/lang/bg-BG.rc index b7e9c792910..02e27a9eefb 100644 --- a/base/applications/mspaint/lang/bg-BG.rc +++ b/base/applications/mspaint/lang/bg-BG.rc @@ -69,7 +69,7 @@ BEGIN POPUP "Из&ображение" BEGIN MENUITEM "Завъртане/Огледало\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "Преоразмеряване\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/Skew\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "Изрязване", IDM_IMAGECROP MENUITEM "Обръщане на цветовете\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "Принадлежности\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "&Цветове" BEGIN MENUITEM "Промяна на палитрите...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "&?" @@ -107,7 +110,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -156,20 +159,29 @@ BEGIN PUSHBUTTON "Подразбирано", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Промяна на размера" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "Промяна на размера", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "Водоравно:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "Отвесно:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "Водоравно:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "Отвесно:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "Водоравно:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "Отвесно:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "Добре", IDOK, 170, 8, 48, 14 PUSHBUTTON "Отказ", IDCANCEL, 170, 24, 48, 14 END @@ -203,4 +215,7 @@ BEGIN IDS_SAVEFILTER, "24 разрядни файлове bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d разряда" IDS_PRINTRES, "%d x %d точки на метър" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/cs-CZ.rc b/base/applications/mspaint/lang/cs-CZ.rc index ecdd1846498..11ef88572ce 100644 --- a/base/applications/mspaint/lang/cs-CZ.rc +++ b/base/applications/mspaint/lang/cs-CZ.rc @@ -69,7 +69,7 @@ BEGIN POPUP "&Obrázek" BEGIN MENUITEM "Překlopit nebo otočit...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "Změnit velikost...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "Oříznout", IDM_IMAGECROP MENUITEM "Inverovat barvy\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "Atributy...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "&Barvy" BEGIN MENUITEM "Upravit paletu...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "&Nápověda" @@ -107,7 +110,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -156,20 +159,29 @@ BEGIN PUSHBUTTON "Výchozí", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Změnit velikost" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "Změnit velikost", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "Vodorovně:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "Svisle:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "Vodorovně:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "Svisle:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "Vodorovně:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "Svisle:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 PUSHBUTTON "Storno", IDCANCEL, 170, 24, 48, 14 END @@ -203,4 +215,7 @@ BEGIN IDS_SAVEFILTER, "24bitová bitmapa (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d bajtů" IDS_PRINTRES, "%d x %d pixelů na metr" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/de-DE.rc b/base/applications/mspaint/lang/de-DE.rc index 31a4334d4a6..139eae0d8c2 100644 --- a/base/applications/mspaint/lang/de-DE.rc +++ b/base/applications/mspaint/lang/de-DE.rc @@ -69,7 +69,7 @@ BEGIN POPUP "B&ild" BEGIN MENUITEM "Drehen/Spiegeln...\tStrg+D", IDM_IMAGEROTATEMIRROR - MENUITEM "Größe ändern...\tStrg+K", IDM_IMAGECHANGESIZE + MENUITEM "Strecken/Zerren...\tStrg+K", IDM_IMAGESTRETCHSKEW MENUITEM "Zuschneiden", IDM_IMAGECROP MENUITEM "Farben umkehren\tStrg+U", IDM_IMAGEINVERTCOLORS MENUITEM "Attribute...\tStrg+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "&Farben" BEGIN MENUITEM "Palette bearbeiten...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Moderne Palette", IDM_COLORSMODERNPALETTE + MENUITEM "Alte Palette", IDM_COLORSOLDPALETTE END POPUP "&?" @@ -107,7 +110,7 @@ BEGIN "^R", IDM_VIEWSHOWGRID "^G", IDM_VIEWFULLSCREEN "^D", IDM_IMAGEROTATEMIRROR - "^K", IDM_IMAGECHANGESIZE + "^K", IDM_IMAGESTRETCHSKEW "^U", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -156,20 +159,29 @@ BEGIN PUSHBUTTON "Standard", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Größe ändern" +CAPTION "Bild strecken und zerren" BEGIN - GROUPBOX "Größe ändern", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "Horizontal:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "Vertikal:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Strecken", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "Horizontal:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "Vertikal:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Zerren", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "Horizontal:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "Grad", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "Vertikal:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "Grad", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 PUSHBUTTON "Abbrechen", IDCANCEL, 170, 24, 48, 14 END @@ -203,4 +215,7 @@ BEGIN IDS_SAVEFILTER, "24-Bit-Bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d Bytes" IDS_PRINTRES, "%d x %d Pixel pro Meter" + IDS_INTNUMBERS, "Bitte geben Sie nur ganze Zahlen ein!" + IDS_PERCENTAGE, "Der Prozentsatz muss zwischen 1 und 500 liegen." + IDS_ANGLE, "Der Winkel muss zwischen -89 und 89 liegen." END diff --git a/base/applications/mspaint/lang/en-GB.rc b/base/applications/mspaint/lang/en-GB.rc index 56eb7a5467f..e4ba6f0551a 100644 --- a/base/applications/mspaint/lang/en-GB.rc +++ b/base/applications/mspaint/lang/en-GB.rc @@ -69,7 +69,7 @@ BEGIN POPUP "&Image" BEGIN MENUITEM "Rotate/Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "Resize...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "Crop", IDM_IMAGECROP MENUITEM "Invert colours\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "Attributes...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "&Colours" BEGIN MENUITEM "Edit palette...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "&?" @@ -107,7 +110,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -156,20 +159,29 @@ BEGIN PUSHBUTTON "Standard", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Change size" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "Change size", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "Horizontally:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "Vertically:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "Horizontally:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "Vertically:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "Horizontally:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "Vertically:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 PUSHBUTTON "Cancel", IDCANCEL, 170, 24, 48, 14 END @@ -203,4 +215,7 @@ BEGIN IDS_SAVEFILTER, "24 bit bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d bytes" IDS_PRINTRES, "%d x %d pixels per meter" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/en-US.rc b/base/applications/mspaint/lang/en-US.rc index 3fb6dfeb0b9..239ca593460 100644 --- a/base/applications/mspaint/lang/en-US.rc +++ b/base/applications/mspaint/lang/en-US.rc @@ -69,7 +69,7 @@ BEGIN POPUP "&Image" BEGIN MENUITEM "Rotate/Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "Resize...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "Crop", IDM_IMAGECROP MENUITEM "Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "Attributes...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "&Colors" BEGIN MENUITEM "Edit palette...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "&?" @@ -107,7 +110,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -156,20 +159,29 @@ BEGIN PUSHBUTTON "Default", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Change size" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "Change size", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "Horizontally:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "Vertically:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "Horizontally:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "Vertically:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "Horizontally:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "Vertically:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 PUSHBUTTON "Cancel", IDCANCEL, 170, 24, 48, 14 END @@ -203,4 +215,7 @@ BEGIN IDS_SAVEFILTER, "24 bit bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d bytes" IDS_PRINTRES, "%d x %d pixels per meter" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/es-ES.rc b/base/applications/mspaint/lang/es-ES.rc index a1ca360d8ad..1a0fa9491a4 100644 --- a/base/applications/mspaint/lang/es-ES.rc +++ b/base/applications/mspaint/lang/es-ES.rc @@ -69,7 +69,7 @@ BEGIN POPUP "&Imagen" BEGIN MENUITEM "Rotar/Invertir...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "Cambiar dimensiones...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "Recortar", IDM_IMAGECROP MENUITEM "Invertir colores\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "Atributos...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "&Colores" BEGIN MENUITEM "Editar paleta...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "Ay&uda" @@ -107,7 +110,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -156,20 +159,29 @@ BEGIN PUSHBUTTON "Predefinido", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Redimensionar" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "Redimensionar ", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "Horizontal:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "Vertical:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "Horizontal:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "Vertical:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "Horizontal:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "Vertical:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "Aceptar", IDOK, 170, 8, 48, 14 PUSHBUTTON "Cancelar", IDCANCEL, 170, 24, 48, 14 END @@ -203,4 +215,7 @@ BEGIN IDS_SAVEFILTER, "Mapa de bits de 24 bits (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d bytes" IDS_PRINTRES, "%d x %d pixels por metro" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/eu-ES.rc b/base/applications/mspaint/lang/eu-ES.rc index 946e59b94c6..7fe841a84da 100644 --- a/base/applications/mspaint/lang/eu-ES.rc +++ b/base/applications/mspaint/lang/eu-ES.rc @@ -69,7 +69,7 @@ BEGIN POPUP "I&rudia" BEGIN MENUITEM "Irauli/biratu...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "Tiratu...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "Recortar", IDM_IMAGECROP MENUITEM "Alderantzikatu koloreak\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "Atributuak...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "&Koloreak" BEGIN MENUITEM "Editatu koloreak...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "&Laguntza" @@ -107,7 +110,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -156,20 +159,29 @@ BEGIN PUSHBUTTON "Lehenetsia", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Tiratu" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "Tiratu ", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "Horizontalki:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "Bertikalki:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "Horizontalki:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "Bertikalki:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "Horizontalki:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "Bertikalki:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "Ados", IDOK, 170, 8, 48, 14 PUSHBUTTON "Utzi", IDCANCEL, 170, 24, 48, 14 END @@ -203,4 +215,7 @@ BEGIN IDS_SAVEFILTER, "24 Biteko bit-mapa (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d bytes" IDS_PRINTRES, "%d x %d pixels per meter" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/fr-FR.rc b/base/applications/mspaint/lang/fr-FR.rc index 2571e6b12bb..b0a39f61479 100644 --- a/base/applications/mspaint/lang/fr-FR.rc +++ b/base/applications/mspaint/lang/fr-FR.rc @@ -69,7 +69,7 @@ BEGIN POPUP "&Image" BEGIN MENUITEM "Retourner/Faire pivoter...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "Redimensionner...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "Rogner", IDM_IMAGECROP MENUITEM "Inverser les couleurs\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "Attributs...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "&Couleurs" BEGIN MENUITEM "Modifier les couleurs...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "&?" @@ -107,7 +110,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -156,20 +159,29 @@ BEGIN PUSHBUTTON "Par défaut", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Redimensionner" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "Redimensionnement", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "Horizontal :", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "Vertical :", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "Horizontal:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "Vertical:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "Horizontal:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "Vertical:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 PUSHBUTTON "Annuler", IDCANCEL, 170, 24, 48, 14 END @@ -203,4 +215,7 @@ BEGIN IDS_SAVEFILTER, "Bitmap 24 bit (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d octets" IDS_PRINTRES, "%d x %d pixels par mètre" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/he-IL.rc b/base/applications/mspaint/lang/he-IL.rc index 2d47beb704d..0ec281906bb 100644 --- a/base/applications/mspaint/lang/he-IL.rc +++ b/base/applications/mspaint/lang/he-IL.rc @@ -69,7 +69,7 @@ BEGIN POPUP "ת&מונה" BEGIN MENUITEM "סובב/הפוך...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "שנה גודל...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "חתוך", IDM_IMAGECROP MENUITEM "הפוך צבעים\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "תכונות...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "&צבעים" BEGIN MENUITEM "עריכת ערכה...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "&?" @@ -107,7 +110,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -156,20 +159,29 @@ BEGIN PUSHBUTTON "ברירת מחדל", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "שינוי גודל" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "שנה גודל", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "אופקי", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "מאוזן", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "אופקי:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "מאוזן:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "אופקי:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "מאוזן:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "אישור", IDOK, 170, 8, 48, 14 PUSHBUTTON "ביטול", IDCANCEL, 170, 24, 48, 14 END @@ -203,4 +215,7 @@ BEGIN IDS_SAVEFILTER, "קבצי מפת סיביות של 24 סיביות (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d בתים" IDS_PRINTRES, "%d x %d פיקסלים למטר" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/hu-HU.rc b/base/applications/mspaint/lang/hu-HU.rc index c8327ff2e64..45586654f63 100644 --- a/base/applications/mspaint/lang/hu-HU.rc +++ b/base/applications/mspaint/lang/hu-HU.rc @@ -69,7 +69,7 @@ BEGIN POPUP "&Kép" BEGIN MENUITEM "Forgatás/Tükrözés...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "Átméretezés...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "Vágás", IDM_IMAGECROP MENUITEM "Színek megfordítása\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "Attribútumok...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "Szín&ek" BEGIN MENUITEM "Paletta szerkesztése...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "&?" @@ -107,7 +110,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -156,20 +159,29 @@ BEGIN PUSHBUTTON "Alapértelmezett", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Átméretezés" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "Átméretezés", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "Vízszintesen:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "Függõlegesen:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "Vízszintesen:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "Függõlegesen:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "Vízszintesen:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "Függõlegesen:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 PUSHBUTTON "Mégsem", IDCANCEL, 170, 24, 48, 14 END @@ -203,4 +215,7 @@ BEGIN IDS_SAVEFILTER, "24 bites bitkép (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d bájt" IDS_PRINTRES, "%d x %d pixel per méter" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/it-IT.rc b/base/applications/mspaint/lang/it-IT.rc index 38eb6e6f4ab..ac132b19f59 100644 --- a/base/applications/mspaint/lang/it-IT.rc +++ b/base/applications/mspaint/lang/it-IT.rc @@ -69,7 +69,7 @@ BEGIN POPUP "&Immagine" BEGIN MENUITEM "Capovolgi/ruota...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "Ridimensiona...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "Ritaglia", IDM_IMAGECROP MENUITEM "Inverti colori\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "Attributi...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "&Colori" BEGIN MENUITEM "Modifica colori...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "&?" @@ -107,7 +110,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -156,20 +159,29 @@ BEGIN PUSHBUTTON "Predefiniti", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Ridimensiona" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "Ridimensiona", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "Orizzontalmente:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "Verticalmente:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "Orizzontalmente:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "Verticalmente:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "Orizzontalmente:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "Verticalmente:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 PUSHBUTTON "Annulla", IDCANCEL, 170, 24, 48, 14 END @@ -203,4 +215,7 @@ BEGIN IDS_SAVEFILTER, "24 bit bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d bytes" IDS_PRINTRES, "%d x %d pixels per metro" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/ja-JP.rc b/base/applications/mspaint/lang/ja-JP.rc index 4da051d1ac3..35b7f85d291 100644 --- a/base/applications/mspaint/lang/ja-JP.rc +++ b/base/applications/mspaint/lang/ja-JP.rc @@ -69,7 +69,7 @@ BEGIN POPUP "画像(&I)" BEGIN MENUITEM "回転と反転\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "サイズの変更\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/Skew\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "切り取り", IDM_IMAGECROP MENUITEM "色の反転\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "画像の属性\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "色(&C)" BEGIN MENUITEM "パレットの編集", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "&?" @@ -107,7 +110,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -156,20 +159,29 @@ BEGIN PUSHBUTTON "デフォルト", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 9, "MS UI Gothic" -CAPTION "サイズの変更" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "サイズの変更", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "水平方向:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "垂直方向:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "水平方向:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "垂直方向:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "水平方向:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "垂直方向:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 PUSHBUTTON "キャンセル", IDCANCEL, 170, 24, 48, 14 END @@ -203,4 +215,7 @@ BEGIN IDS_SAVEFILTER, "24 ビット ビットマップ (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d バイト" IDS_PRINTRES, "%d x %d ピクセル/メートル" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/nl-NL.rc b/base/applications/mspaint/lang/nl-NL.rc index 48a6b7f61f2..eda8e2f1973 100644 --- a/base/applications/mspaint/lang/nl-NL.rc +++ b/base/applications/mspaint/lang/nl-NL.rc @@ -69,7 +69,7 @@ BEGIN POPUP "&Afbeelding" BEGIN MENUITEM "Spiegelen/draaien...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "Formaat wijzigen...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "Bijsnijden", IDM_IMAGECROP MENUITEM "Negatief\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "Kenmerken...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "&Kleuren" BEGIN MENUITEM "Kleurenpalet bewerken...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "&?" @@ -107,7 +110,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -156,20 +159,29 @@ BEGIN PUSHBUTTON "Standaard", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Formaat wijzigen" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "Formaat wijzigen", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "Horizontaal:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "Verticaal:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "Horizontaal:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "Verticaal:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "Horizontaal:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "Verticaal:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 PUSHBUTTON "Annuleren", IDCANCEL, 170, 24, 48, 14 END @@ -203,4 +215,7 @@ BEGIN IDS_SAVEFILTER, "24 bit bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d bytes" IDS_PRINTRES, "%d x %d pixels per meter" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/no-NO.rc b/base/applications/mspaint/lang/no-NO.rc index 07784c45ba9..e43a1256a5a 100644 --- a/base/applications/mspaint/lang/no-NO.rc +++ b/base/applications/mspaint/lang/no-NO.rc @@ -69,7 +69,7 @@ BEGIN POPUP "&Bilde" BEGIN MENUITEM "Roter/speile...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "Endre størrelse...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "Beskjær", IDM_IMAGECROP MENUITEM "Invertere farger\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "Attributter...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "&Farger" BEGIN MENUITEM "Rediger farger...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "&Hjelp?" @@ -107,7 +110,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -156,20 +159,29 @@ BEGIN PUSHBUTTON "Standard", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Endre størrelse" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "Endre størrelse", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "Horisontalt:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "Vertikalt:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "Horisontalt:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "Vertikalt:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "Horisontalt:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "Vertikalt:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 PUSHBUTTON "Avbryt", IDCANCEL, 170, 24, 48, 14 END @@ -203,4 +215,7 @@ BEGIN IDS_SAVEFILTER, "24 bit bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d bytes" IDS_PRINTRES, "%d x %d pixels per meter" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/pl-PL.rc b/base/applications/mspaint/lang/pl-PL.rc index b8a431b6b34..02fc5cc6817 100644 --- a/base/applications/mspaint/lang/pl-PL.rc +++ b/base/applications/mspaint/lang/pl-PL.rc @@ -70,7 +70,7 @@ BEGIN POPUP "&Obraz" BEGIN MENUITEM "Obrót/Odbicie...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "Zmiana rozmiaru...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "Kadrowanie", IDM_IMAGECROP MENUITEM "Odwrócenie kolorów\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "Atrybuty...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -81,6 +81,9 @@ BEGIN POPUP "&Kolory" BEGIN MENUITEM "Edytuj kolory...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "&?" @@ -108,7 +111,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -157,20 +160,29 @@ BEGIN PUSHBUTTON "Domyślne", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Zmiana rozmiaru" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "Zmień rozmiar", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "W poziomie:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "W pionie:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "W poziomie:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "W pionie:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "W poziomie:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "W pionie:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 PUSHBUTTON "Anuluj", IDCANCEL, 170, 24, 48, 14 END @@ -204,4 +216,7 @@ BEGIN IDS_SAVEFILTER, "Bitmapa 24 bit (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d bajtów" IDS_PRINTRES, "%d x %d pikseli na metr" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/pt-BR.rc b/base/applications/mspaint/lang/pt-BR.rc index 661699c3ffe..f7a5920d706 100644 --- a/base/applications/mspaint/lang/pt-BR.rc +++ b/base/applications/mspaint/lang/pt-BR.rc @@ -69,7 +69,7 @@ BEGIN POPUP "&Imagem" BEGIN MENUITEM "Inverter/&girar...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "&Alongar/inclinar...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "&Alongar/inclinar...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "Cortar", IDM_IMAGECROP MENUITEM "&Inverter cores\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "A&tributos...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "&Cores" BEGIN MENUITEM "&Editar cores...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "&?" @@ -107,7 +110,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -156,20 +159,29 @@ BEGIN PUSHBUTTON "&Padrão", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Alterar tamanho" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "Alterar tamanho", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "Horizontal:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "Vertical:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "Horizontal:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "Vertical:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "Horizontal:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "Vertical:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 PUSHBUTTON "Cancelar", IDCANCEL, 170, 24, 48, 14 END @@ -203,4 +215,7 @@ BEGIN IDS_SAVEFILTER, "Bitmaps de 24 bits (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d bytes" IDS_PRINTRES, "%d x %d pixels per meter" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/pt-PT.rc b/base/applications/mspaint/lang/pt-PT.rc index d2a90e46fb0..0948ec8a2fa 100644 --- a/base/applications/mspaint/lang/pt-PT.rc +++ b/base/applications/mspaint/lang/pt-PT.rc @@ -69,7 +69,7 @@ BEGIN POPUP "&Imagem" BEGIN MENUITEM "I&nverter/rodar...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "Redimensionar/&Torcer...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Redimensionar/&Torcer...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "&Recortar", IDM_IMAGECROP MENUITEM "Inverter &cores\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "&Atributos...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "&Cores" BEGIN MENUITEM "&Editar cores...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "&Ajuda" @@ -107,7 +110,7 @@ BEGIN "^M", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -156,20 +159,29 @@ BEGIN PUSHBUTTON "&Predefinição", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Alterar tamanho" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "Alterar tamanho", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "Horizontal:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "Vertical:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "Horizontal:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "Vertical:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "Horizontal:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "Vertical:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 PUSHBUTTON "Cancelar", IDCANCEL, 170, 24, 48, 14 END @@ -203,4 +215,7 @@ BEGIN IDS_SAVEFILTER, "Mapa de bits de 24 bits (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d bytes" IDS_PRINTRES, "%d x %d pixels per meter" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/ro-RO.rc b/base/applications/mspaint/lang/ro-RO.rc index 91a1b58d1ff..b848b6e7b31 100644 --- a/base/applications/mspaint/lang/ro-RO.rc +++ b/base/applications/mspaint/lang/ro-RO.rc @@ -70,7 +70,7 @@ BEGIN POPUP "&Imagine" BEGIN MENUITEM "&Rotire/Oglindire…\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "Re&dimensionare…\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "&Trunchiază", IDM_IMAGECROP MENUITEM "In&versează culorile\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "&Atribute…\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -81,6 +81,9 @@ BEGIN POPUP "&Culori" BEGIN MENUITEM "&Editare paletă…", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "&?" @@ -108,7 +111,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -157,22 +160,31 @@ BEGIN PUSHBUTTON "I&mplicite", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Redimensionare imagine" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "Redimensionare", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "Orizontală:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "Verticală:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 - DEFPUSHBUTTON "Con&firmă", IDOK, 170, 8, 48, 14 - PUSHBUTTON "A&nulează", IDCANCEL, 170, 24, 48, 14 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "Orizontală:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "Verticală:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "Orizontală:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "Verticală:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 + DEFPUSHBUTTON "Con&firmă", IDOK, 170, 8, 48, 14 + PUSHBUTTON "A&nulează", IDCANCEL, 170, 24, 48, 14 END STRINGTABLE @@ -204,4 +216,7 @@ BEGIN IDS_SAVEFILTER, "Bitmap pe 24 biți (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d octeți" IDS_PRINTRES, "%d x %d pixeli pe metru" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/ru-RU.rc b/base/applications/mspaint/lang/ru-RU.rc index 226e1054a3e..e5486cd7576 100644 --- a/base/applications/mspaint/lang/ru-RU.rc +++ b/base/applications/mspaint/lang/ru-RU.rc @@ -69,7 +69,7 @@ BEGIN POPUP "&Рисунок" BEGIN MENUITEM "&Отразить/повернуть...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "&Изменить размер...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "Обре&зать", IDM_IMAGECROP MENUITEM "О&братить цвета\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "&Атрибуты...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "П&алитра" BEGIN MENUITEM "&Изменить палитру...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "&?" @@ -107,7 +110,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -141,35 +144,44 @@ BEGIN LTEXT "Дата сохранения:", IDD_ATTRIBUTESTEXT3, 10, 5, 60, 10 LTEXT "Размер на диске:", IDD_ATTRIBUTESTEXT4, 10, 15, 60, 10 LTEXT "Разрешение:", IDD_ATTRIBUTESTEXT5, 10, 25, 60, 10 - LTEXT "не доступно", IDD_ATTRIBUTESTEXT6, 60, 5, 90, 10 - LTEXT "не доступно", IDD_ATTRIBUTESTEXT7, 60, 15, 90, 10 - LTEXT "не доступно", IDD_ATTRIBUTESTEXT8, 60, 25, 90, 10 + LTEXT "недоступно", IDD_ATTRIBUTESTEXT6, 60, 5, 90, 10 + LTEXT "недоступно", IDD_ATTRIBUTESTEXT7, 60, 15, 90, 10 + LTEXT "недоступно", IDD_ATTRIBUTESTEXT8, 60, 25, 90, 10 GROUPBOX "Единицы измерения", IDD_ATTRIBUTESGROUP1, 6, 57, 158, 27 AUTORADIOBUTTON "д&юймы", IDD_ATTRIBUTESRB1, 12, 69, 45, 10, WS_GROUP AUTORADIOBUTTON "с&м", IDD_ATTRIBUTESRB2, 62, 69, 45, 10 AUTORADIOBUTTON "т&очки", IDD_ATTRIBUTESRB3, 112, 69, 45, 10 GROUPBOX "Палитра", IDD_ATTRIBUTESGROUP2, 6, 88, 158, 27 - AUTORADIOBUTTON "черно-белая", IDD_ATTRIBUTESRB4, 12, 100, 70, 10, WS_GROUP - AUTORADIOBUTTON "цветная", IDD_ATTRIBUTESRB5, 92, 100, 45, 10 + AUTORADIOBUTTON "&черно-белая", IDD_ATTRIBUTESRB4, 12, 100, 70, 10, WS_GROUP + AUTORADIOBUTTON "цв&етная", IDD_ATTRIBUTESRB5, 92, 100, 45, 10 DEFPUSHBUTTON "OK", IDOK, 150, 8, 57, 14 PUSHBUTTON "Отмена", IDCANCEL, 150, 24, 57, 14 PUSHBUTTON "По умо&лчанию", IDD_ATTRIBUTESSTANDARD, 150, 40, 57, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Изменение размеров" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "Размер", IDD_CHANGESIZEGROUP, 6, 6, 145, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "По горизонтали:", IDD_CHANGESIZETEXT1, 39, 24, 62, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 102, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 137, 24, 12, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "По вертикали:", IDD_CHANGESIZETEXT3, 39, 49, 62, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 102, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 137, 49, 12, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "По горизонтали:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "По вертикали:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "По горизонтали:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "По вертикали:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 PUSHBUTTON "Отмена", IDCANCEL, 170, 24, 48, 14 END @@ -179,7 +191,7 @@ BEGIN IDS_PROGRAMNAME, "Paint" IDS_WINDOWTITLE, "%s - Paint" IDS_INFOTITLE, "Paint для ReactOS" - IDS_INFOTEXT, "Paint для ReactOS распространяется под лицензией GNU Lesser General Public License (LGPL) версии 3 (see www.gnu.org)" + IDS_INFOTEXT, "Paint для ReactOS распространяется под лицензией GNU Lesser General Public License (LGPL) версии 3 (см. www.gnu.org)" IDS_SAVEPROMPTTEXT, "Сохранить изменения в %s?" IDS_DEFAULTFILENAME, "Без_имени.bmp" IDS_MINIATURETITLE, "Эскиз" @@ -201,6 +213,9 @@ BEGIN IDS_TOOLTIP16, "Скругленный прямоугольник" IDS_OPENFILTER, "Точечные рисунки (*.bmp;*.dib)\1*.bmp;*.dib\1Все файлы (*.*)\1*.*\1" IDS_SAVEFILTER, "24-разрядный рисунок (*.bmp;*.dib)\1*.bmp;*.dib\1" - IDS_FILESIZE, "%d bytes" - IDS_PRINTRES, "%d x %d pixels per meter" + IDS_FILESIZE, "%d байт" + IDS_PRINTRES, "%d x %d пикселей на метр" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/sk-SK.rc b/base/applications/mspaint/lang/sk-SK.rc index 835bd95723b..65eb1afd2cc 100644 --- a/base/applications/mspaint/lang/sk-SK.rc +++ b/base/applications/mspaint/lang/sk-SK.rc @@ -70,7 +70,7 @@ BEGIN POPUP "&Obrázok" BEGIN MENUITEM "Prevrátiť alebo otočiť...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "Zmeniť veľkosť...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "Orezať", IDM_IMAGECROP MENUITEM "Invertovať farby\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "Atribúty...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -81,6 +81,9 @@ BEGIN POPUP "&Farby" BEGIN MENUITEM "Upraviť paletu...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "&Pomocník" @@ -108,7 +111,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -157,20 +160,29 @@ BEGIN PUSHBUTTON "&Predvolené", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 150 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Zmena veľkosti" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "Zmeniť veľkosť", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "&Vodorovne:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "&Zvislo:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "&Vodorovne:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "&Zvislo:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "&Vodorovne:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "&Zvislo:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 PUSHBUTTON "Zrušiť", IDCANCEL, 170, 24, 48, 14 END @@ -204,4 +216,7 @@ BEGIN IDS_SAVEFILTER, "24-bitová mapa (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d bajtov" IDS_PRINTRES, "%d x %d pixelov na meter" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/sv-SE.rc b/base/applications/mspaint/lang/sv-SE.rc index 742b1962a62..06f3e72500b 100644 --- a/base/applications/mspaint/lang/sv-SE.rc +++ b/base/applications/mspaint/lang/sv-SE.rc @@ -69,7 +69,7 @@ BEGIN POPUP "&Bild" BEGIN MENUITEM "Rotera/Spegelvänd...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "Ändra storlek...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "Beskära", IDM_IMAGECROP MENUITEM "Invertera färger\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "Attribut...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "&Färger" BEGIN MENUITEM "Redigera palett...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "&Hjälp" @@ -107,7 +110,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -156,20 +159,29 @@ BEGIN PUSHBUTTON "Standard", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 80 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Ändra storlek" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "Ändra storlek", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "Horisontellt:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "Vertikalt:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "Horisontellt:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "Vertikalt:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "Horisontellt:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "Vertikalt:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 PUSHBUTTON "Avbryt", IDCANCEL, 170, 24, 48, 14 END @@ -203,4 +215,7 @@ BEGIN IDS_SAVEFILTER, "24 bit bitmap (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d bytes" IDS_PRINTRES, "%d x %d pixlar per meter" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/tr-TR.rc b/base/applications/mspaint/lang/tr-TR.rc index 1fa5bc2543f..0d07feba96b 100644 --- a/base/applications/mspaint/lang/tr-TR.rc +++ b/base/applications/mspaint/lang/tr-TR.rc @@ -3,7 +3,6 @@ * LICENSE: unknown (LGPL assumed) * FILE: base/applications/mspaint/lang/tr-TR.rc * PURPOSE: Turkish Resource file for ReactOS Paint - * PROGRAMMERS: * TRANSLATORS: 2013 - Erdem Ersoy (eersoy93) (erdemersoy@live.com) */ @@ -70,7 +69,7 @@ BEGIN POPUP "G&örüntü" BEGIN MENUITEM "&Döndür ya da Evir...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "&Boyutlandır...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "&Yeniden Boyutlandır veyâ Eğrilt...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "&Kırp", IDM_IMAGECROP MENUITEM "&Renkleri Evir\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "&Öz Nitelikler...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -81,6 +80,9 @@ BEGIN POPUP "&Renkler" BEGIN MENUITEM "&Renkliği Düzenle...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "&Yeni Renklik", IDM_COLORSMODERNPALETTE + MENUITEM "&Eski Renklik", IDM_COLORSOLDPALETTE END POPUP "&Yardım" @@ -108,7 +110,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -117,7 +119,7 @@ END IDD_MIRRORROTATE DIALOGEX 100, 100, 180, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Resmi Döndür ya da Evir" +CAPTION "Döndür ya da Evir" BEGIN GROUPBOX "Döndür ya da Evir", IDD_MIRRORROTATEGROUP, 6, 6, 112, 86 AUTORADIOBUTTON "&Yatay Evir", IDD_MIRRORROTATERB1, 12, 18, 100, 10, WS_GROUP @@ -127,7 +129,7 @@ BEGIN AUTORADIOBUTTON "1&80°", IDD_MIRRORROTATERB5, 42, 66, 50, 10, WS_DISABLED AUTORADIOBUTTON "2&70°", IDD_MIRRORROTATERB6, 42, 78, 50, 10, WS_DISABLED DEFPUSHBUTTON "Tamam", IDOK, 125, 8, 48, 14 - PUSHBUTTON "Vazgeç", IDCANCEL, 125, 24, 48, 14 + PUSHBUTTON "İptal", IDCANCEL, 125, 24, 48, 14 END IDD_ATTRIBUTES DIALOGEX 100, 100, 225, 120 @@ -153,26 +155,35 @@ BEGIN AUTORADIOBUTTON "Kara ve Ak", IDD_ATTRIBUTESRB4, 12, 100, 70, 10, WS_GROUP AUTORADIOBUTTON "Renkli", IDD_ATTRIBUTESRB5, 92, 100, 35, 10 DEFPUSHBUTTON "Tamam", IDOK, 170, 8, 48, 14 - PUSHBUTTON "Vazgeç", IDCANCEL, 170, 24, 48, 14 - PUSHBUTTON "Ön Tanımlı", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 + PUSHBUTTON "İptal", IDCANCEL, 170, 24, 48, 14 + PUSHBUTTON "Öntanımlı", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 80 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Yeniden Boyutlandır" +CAPTION "Yeniden Boyutlandır veyâ Eğrilt" BEGIN - GROUPBOX "Yeniden Boyutlandır", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "Yatay:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "Dikey:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Yeniden Boyutlandır", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "Yatay:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "Dikey:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Eğrilt", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "Yatay:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "Derece", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "Dikey:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "Derece", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "Tamam", IDOK, 170, 8, 48, 14 - PUSHBUTTON "Vazgeç", IDCANCEL, 170, 24, 48, 14 + PUSHBUTTON "İptal", IDCANCEL, 170, 24, 48, 14 END STRINGTABLE @@ -180,7 +191,7 @@ BEGIN IDS_PROGRAMNAME, "Görüntü Düzenleyicisi" IDS_WINDOWTITLE, "%s - Görüntü Düzenleyicisi" IDS_INFOTITLE, "Görüntü Düzenleyicisi" - IDS_INFOTEXT, "Görüntü Düzenleyicisi, GNU Kısıtlı Umûmî Kamu Lisansı'nın (LGPL) 3. sürümüyle lisanslıdır. (bk: www.gnu.org)" + IDS_INFOTEXT, "Görüntü Düzenleyicisi, GNU Kısıtlı Umûmî Kamu Ruhsatı'nın (LGPL) 3. sürümüyle ruhsatlıdır. (bkz: www.gnu.org)" IDS_SAVEPROMPTTEXT, "%s için yapılan değişiklikler kaydedilsin mi?" IDS_DEFAULTFILENAME, "Adsız.bmp" IDS_MINIATURETITLE, "Küçüğü" @@ -200,8 +211,11 @@ BEGIN IDS_TOOLTIP14, "Çokgen" IDS_TOOLTIP15, "Söbek" IDS_TOOLTIP16, "Yuvarlatılmış Dikdörtgen" - IDS_OPENFILTER, "Bit Eşlem Görüntüleri (*.bmp;*.dib)\1*.bmp;*.dib\1Tüm Kütükler (*.*)\1*.*\1" - IDS_SAVEFILTER, "24 İkillik Bit Eşlem Görüntüsü (*.bmp;*.dib)\1*.bmp;*.dib\1" - IDS_FILESIZE, "%d sekizlik" + IDS_OPENFILTER, "İkil Eşlem Görüntüleri (*.bmp;*.dib)\1*.bmp;*.dib\1Tüm Kütükler (*.*)\1*.*\1" + IDS_SAVEFILTER, "24 İkillik İkil Eşlem Görüntüsü (*.bmp;*.dib)\1*.bmp;*.dib\1" + IDS_FILESIZE, "%d çoklu" IDS_PRINTRES, "Her metrekarede %d x %d nokta" + IDS_INTNUMBERS, "Buraya yalnızca tamsayı girilmelidir." + IDS_PERCENTAGE, "Buradaki değer 1 ilâ 500 olmalıdır." + IDS_ANGLE, "Buradaki değer -89 ilâ 89 olmalıdır." END diff --git a/base/applications/mspaint/lang/uk-UA.rc b/base/applications/mspaint/lang/uk-UA.rc index 2582b0521cc..627fa93c059 100644 --- a/base/applications/mspaint/lang/uk-UA.rc +++ b/base/applications/mspaint/lang/uk-UA.rc @@ -69,7 +69,7 @@ BEGIN POPUP "&Зображення" BEGIN MENUITEM "Відобразити/повернути...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "Змінити розмір...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "Обітнути", IDM_IMAGECROP MENUITEM "Обернути кольори\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "Атрибути...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "&Кольори" BEGIN MENUITEM "Змінити палітру...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "&Довідка" @@ -107,7 +110,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -156,20 +159,29 @@ BEGIN PUSHBUTTON "Стандартно", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 80 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "Зміна розміру" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "Зміна розміру", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "Горизонталь:", IDD_CHANGESIZETEXT1, 45, 24, 45, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 92, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 127, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "Вертикаль:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 92, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 127, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "Горизонталь:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "Вертикаль:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "Горизонталь:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "Вертикаль:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 PUSHBUTTON "Скасувати", IDCANCEL, 170, 24, 48, 14 END @@ -203,4 +215,7 @@ BEGIN IDS_SAVEFILTER, "24-розрядний рисунок (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d байт" IDS_PRINTRES, "%d x %d пікс. на метр" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/zh-CN.rc b/base/applications/mspaint/lang/zh-CN.rc index cee430dedec..bd086f3fb2b 100644 --- a/base/applications/mspaint/lang/zh-CN.rc +++ b/base/applications/mspaint/lang/zh-CN.rc @@ -69,7 +69,7 @@ BEGIN POPUP "图像(&I)" BEGIN MENUITEM "旋转/镜像...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "改变大小...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "剪裁", IDM_IMAGECROP MENUITEM "颜色反转\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "属性...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "颜色(&C)" BEGIN MENUITEM "编辑调色板...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "帮助(&?)" @@ -107,7 +110,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -156,20 +159,29 @@ BEGIN PUSHBUTTON "缺省", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 80 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "改变大小" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "改变大小", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "水平:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "垂直:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "水平:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "垂直:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "水平:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "垂直:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "确定", IDOK, 170, 8, 48, 14 PUSHBUTTON "取消", IDCANCEL, 170, 24, 48, 14 END @@ -203,4 +215,7 @@ BEGIN IDS_SAVEFILTER, "24 位位图文件 (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d 字节" IDS_PRINTRES, "%d x %d 像素每米" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/lang/zh-TW.rc b/base/applications/mspaint/lang/zh-TW.rc index fec0cd3f546..f3f78dd82b1 100644 --- a/base/applications/mspaint/lang/zh-TW.rc +++ b/base/applications/mspaint/lang/zh-TW.rc @@ -69,7 +69,7 @@ BEGIN POPUP "圖像(&I)" BEGIN MENUITEM "旋轉/翻轉...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "改變大小...\tCtrl+W", IDM_IMAGECHANGESIZE + MENUITEM "Stretch/skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW MENUITEM "剪裁", IDM_IMAGECROP MENUITEM "顏色反轉\tCtrl+I", IDM_IMAGEINVERTCOLORS MENUITEM "內容...\tCtrl+E", IDM_IMAGEATTRIBUTES @@ -80,6 +80,9 @@ BEGIN POPUP "顏色(&C)" BEGIN MENUITEM "編輯色彩...", IDM_COLORSEDITPALETTE + MENUITEM SEPARATOR + MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE + MENUITEM "Old palette", IDM_COLORSOLDPALETTE END POPUP "說明(&?)" @@ -107,7 +110,7 @@ BEGIN "^G", IDM_VIEWSHOWGRID "^F", IDM_VIEWFULLSCREEN "^R", IDM_IMAGEROTATEMIRROR - "^W", IDM_IMAGECHANGESIZE + "^W", IDM_IMAGESTRETCHSKEW "^I", IDM_IMAGEINVERTCOLORS "^E", IDM_IMAGEATTRIBUTES "N", IDM_IMAGEDELETEIMAGE, CONTROL, SHIFT, VIRTKEY @@ -156,20 +159,29 @@ BEGIN PUSHBUTTON "預設值", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 END -IDD_CHANGESIZE DIALOGEX 100, 100, 225, 80 +IDD_STRETCHSKEW DIALOGEX 100, 100, 225, 80 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU FONT 8, "MS Shell Dlg" -CAPTION "改變大小" +CAPTION "Stretch and skew image" BEGIN - GROUPBOX "改變大小", IDD_CHANGESIZEGROUP, 6, 6, 158, 66 - ICON IDI_HORZSTRETCH, IDD_CHANGESIZEICON1, 12, 18, 32, 32 - LTEXT "水平:", IDD_CHANGESIZETEXT1, 45, 24, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT1, 90, 23, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT2, 125, 24, 15, 10 - ICON IDI_VERTSTRETCH, IDD_CHANGESIZEICON2, 12, 43, 32, 32 - LTEXT "垂直:", IDD_CHANGESIZETEXT3, 45, 49, 40, 10 - EDITTEXT IDD_CHANGESIZEEDIT2, 90, 48, 32, 12 - LTEXT "%", IDD_CHANGESIZETEXT4, 125, 49, 15, 10 + GROUPBOX "Stretch", IDD_STRETCHSKEWGROUPSTRETCH, 6, 6, 158, 66 + ICON IDI_HORZSTRETCH, IDD_STRETCHSKEWICONHSTRETCH, 12, 18, 32, 32 + LTEXT "水平:", IDD_STRETCHSKEWTEXTHSTRETCH, 45, 24, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSTRETCH, 90, 23, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTHPERCENT, 125, 24, 15, 10 + ICON IDI_VERTSTRETCH, IDD_STRETCHSKEWICONVSTRETCH, 12, 43, 32, 32 + LTEXT "垂直:", IDD_STRETCHSKEWTEXTVSTRETCH, 45, 49, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSTRETCH, 90, 48, 32, 12 + LTEXT "%", IDD_STRETCHSKEWTEXTVPERCENT, 125, 49, 15, 10 + GROUPBOX "Skew", IDD_STRETCHSKEWGROUPSKEW, 6, 76, 158, 66 + ICON IDI_HORZSKEW, IDD_STRETCHSKEWICONHSKEW, 12, 88, 32, 32 + LTEXT "水平:", IDD_STRETCHSKEWTEXTHSKEW, 45, 94, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITHSKEW, 90, 93, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTHDEG, 125, 94, 30, 10 + ICON IDI_VERTSKEW, IDD_STRETCHSKEWICONVSKEW, 12, 113, 32, 32 + LTEXT "垂直:", IDD_STRETCHSKEWTEXTVSKEW, 45, 119, 40, 10 + EDITTEXT IDD_STRETCHSKEWEDITVSKEW, 90, 118, 32, 12 + LTEXT "degrees", IDD_STRETCHSKEWTEXTVDEG, 125, 119, 30, 10 DEFPUSHBUTTON "確定", IDOK, 170, 8, 48, 14 PUSHBUTTON "取消", IDCANCEL, 170, 24, 48, 14 END @@ -203,4 +215,7 @@ BEGIN IDS_SAVEFILTER, "24 位元點陣圖 (*.bmp;*.dib)\1*.bmp;*.dib\1" IDS_FILESIZE, "%d 位元組" IDS_PRINTRES, "%d x %d 像素每米" + IDS_INTNUMBERS, "Please enter integral numbers only!" + IDS_PERCENTAGE, "The percentage must be between 1 and 500." + IDS_ANGLE, "The angle must be between -89 and 89." END diff --git a/base/applications/mspaint/main.c b/base/applications/mspaint/main.c index cf15d3235fd..ccd991d97e5 100644 --- a/base/applications/mspaint/main.c +++ b/base/applications/mspaint/main.c @@ -19,16 +19,19 @@ BITMAPINFO bitmapinfo; int imgXRes = 400; int imgYRes = 300; +int widthSetInDlg; +int heightSetInDlg; + +STRETCHSKEW stretchSkew; + HBITMAP hBms[HISTORYSIZE]; int currInd = 0; int undoSteps = 0; int redoSteps = 0; BOOL imageSaved = TRUE; -LONG startX; -LONG startY; -LONG lastX; -LONG lastY; +POINT start; +POINT last; int lineWidth = 1; int shapeStyle = 0; int brushStyle = 0; @@ -44,13 +47,26 @@ HWND hImageArea; HBITMAP hSelBm; HBITMAP hSelMask; -/* initial palette colors; may be changed by the user during execution */ -int palColors[28] = { 0x000000, 0x464646, 0x787878, 0x300099, 0x241ced, 0x0078ff, 0x0ec2ff, +/* array holding palette colors; may be changed by the user during execution */ +int palColors[28]; + +/* modern palette */ +int modernPalColors[28] = { 0x000000, 0x464646, 0x787878, 0x300099, 0x241ced, 0x0078ff, 0x0ec2ff, 0x00f2ff, 0x1de6a8, 0x4cb122, 0xefb700, 0xf36d4d, 0x99362f, 0x98316f, 0xffffff, 0xdcdcdc, 0xb4b4b4, 0x3c5a9c, 0xb1a3ff, 0x7aaae5, 0x9ce4f5, 0xbdf9ff, 0xbcf9d3, 0x61bb9d, 0xead999, 0xd19a70, 0x8e6d54, 0xd5a5b5 }; +/* older palette containing VGA colors */ +int oldPalColors[28] = { 0x000000, 0x808080, 0x000080, 0x008080, 0x008000, 0x808000, 0x800000, + 0x800080, 0x408080, 0x404000, 0xff8000, 0x804000, 0xff0040, 0x004080, + 0xffffff, 0xc0c0c0, 0x0000ff, 0x00ffff, 0x00ff00, 0xffff00, 0xff0000, + 0xff00ff, 0x80ffff, 0x80ff00, 0xffff80, 0xff8080, 0x8000ff, 0x4080ff +}; + +/* palette currently in use (1: modern, 2: old) */ +int selectedPalette; + /* foreground and background colors with initial value */ int fgColor = 0x00000000; int bgColor = 0x00ffffff; @@ -139,6 +155,10 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff }; + /* init palette */ + selectedPalette = 1; + CopyMemory(palColors, modernPalColors, sizeof(palColors)); + hProgInstance = hThisInstance; /* Necessary */ @@ -277,13 +297,13 @@ _tWinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPTSTR lpszArgument /* - * FIXME: Unintentionally there is a line above the tool bar. + * FIXME: Unintentionally there is a line above the tool bar (hidden by y-offset). * To prevent cropping of the buttons height has been increased from 200 to 205 */ hToolbar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, WS_CHILD | WS_VISIBLE | CCS_NOPARENTALIGN | CCS_VERT | CCS_NORESIZE | TBSTYLE_TOOLTIPS, - 1, 1, 50, 205, hToolBoxContainer, NULL, hThisInstance, NULL); + 1, -2, 50, 205, hToolBoxContainer, NULL, hThisInstance, NULL); hImageList = ImageList_Create(16, 16, ILC_COLOR24 | ILC_MASK, 16, 0); SendMessage(hToolbar, TB_SETIMAGELIST, 0, (LPARAM) hImageList); tempBm = LoadImage(hThisInstance, MAKEINTRESOURCE(IDB_TOOLBARICONS), IMAGE_BITMAP, 256, 16, 0); diff --git a/base/applications/mspaint/mouse.c b/base/applications/mspaint/mouse.c index 84909fb1f9b..70d2dba1a27 100644 --- a/base/applications/mspaint/mouse.c +++ b/base/applications/mspaint/mouse.c @@ -18,8 +18,7 @@ placeSelWin() MoveWindow(hSelection, rectSel_dest[0] * zoom / 1000, rectSel_dest[1] * zoom / 1000, rectSel_dest[2] * zoom / 1000 + 6, rectSel_dest[3] * zoom / 1000 + 6, TRUE); BringWindowToTop(hSelection); - SendMessage(hImageArea, WM_PAINT, 0, 0); - //SendMessage(hSelection, WM_PAINT, 0, 0); + InvalidateRect(hImageArea, NULL, FALSE); } void @@ -58,10 +57,10 @@ int ptSP = 0; void startPaintingL(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) { - startX = x; - startY = y; - lastX = x; - lastY = y; + start.x = x; + start.y = y; + last.x = x; + last.y = y; switch (activeTool) { case TOOL_FREESEL: @@ -146,26 +145,25 @@ whilePaintingL(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) break; case TOOL_RECTSEL: { - int tempX; - int tempY; + POINT temp; resetToU1(); - tempX = max(0, min(x, imgXRes)); - tempY = max(0, min(y, imgYRes)); - rectSel_dest[0] = rectSel_src[0] = min(startX, tempX); - rectSel_dest[1] = rectSel_src[1] = min(startY, tempY); - rectSel_dest[2] = rectSel_src[2] = max(startX, tempX) - min(startX, tempX); - rectSel_dest[3] = rectSel_src[3] = max(startY, tempY) - min(startY, tempY); - RectSel(hdc, startX, startY, tempX, tempY); + temp.x = max(0, min(x, imgXRes)); + temp.y = max(0, min(y, imgYRes)); + rectSel_dest[0] = rectSel_src[0] = min(start.x, temp.x); + rectSel_dest[1] = rectSel_src[1] = min(start.y, temp.y); + rectSel_dest[2] = rectSel_src[2] = max(start.x, temp.x) - min(start.x, temp.x); + rectSel_dest[3] = rectSel_src[3] = max(start.y, temp.y) - min(start.y, temp.y); + RectSel(hdc, start.x, start.y, temp.x, temp.y); break; } case TOOL_RUBBER: - Erase(hdc, lastX, lastY, x, y, bg, rubberRadius); + Erase(hdc, last.x, last.y, x, y, bg, rubberRadius); break; case TOOL_PEN: - Line(hdc, lastX, lastY, x, y, fg, 1); + Line(hdc, last.x, last.y, x, y, fg, 1); break; case TOOL_BRUSH: - Brush(hdc, lastX, lastY, x, y, fg, brushStyle); + Brush(hdc, last.x, last.y, x, y, fg, brushStyle); break; case TOOL_AIRBRUSH: Airbrush(hdc, x, y, fg, airBrushWidth); @@ -173,8 +171,8 @@ whilePaintingL(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) case TOOL_LINE: resetToU1(); if (GetAsyncKeyState(VK_SHIFT) < 0) - roundTo8Directions(startX, startY, &x, &y); - Line(hdc, startX, startY, x, y, fg, lineWidth); + roundTo8Directions(start.x, start.y, &x, &y); + Line(hdc, start.x, start.y, x, y, fg, lineWidth); break; case TOOL_BEZIER: resetToU1(); @@ -197,8 +195,8 @@ whilePaintingL(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) case TOOL_RECT: resetToU1(); if (GetAsyncKeyState(VK_SHIFT) < 0) - regularize(startX, startY, &x, &y); - Rect(hdc, startX, startY, x, y, fg, bg, lineWidth, shapeStyle); + regularize(start.x, start.y, &x, &y); + Rect(hdc, start.x, start.y, x, y, fg, bg, lineWidth, shapeStyle); break; case TOOL_SHAPE: resetToU1(); @@ -213,19 +211,19 @@ whilePaintingL(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) case TOOL_ELLIPSE: resetToU1(); if (GetAsyncKeyState(VK_SHIFT) < 0) - regularize(startX, startY, &x, &y); - Ellp(hdc, startX, startY, x, y, fg, bg, lineWidth, shapeStyle); + regularize(start.x, start.y, &x, &y); + Ellp(hdc, start.x, start.y, x, y, fg, bg, lineWidth, shapeStyle); break; case TOOL_RRECT: resetToU1(); if (GetAsyncKeyState(VK_SHIFT) < 0) - regularize(startX, startY, &x, &y); - RRect(hdc, startX, startY, x, y, fg, bg, lineWidth, shapeStyle); + regularize(start.x, start.y, &x, &y); + RRect(hdc, start.x, start.y, x, y, fg, bg, lineWidth, shapeStyle); break; } - lastX = x; - lastY = y; + last.x = x; + last.y = y; } void @@ -318,17 +316,17 @@ endPaintingL(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) } break; case TOOL_RUBBER: - Erase(hdc, lastX, lastY, x, y, bg, rubberRadius); + Erase(hdc, last.x, last.y, x, y, bg, rubberRadius); break; case TOOL_PEN: - Line(hdc, lastX, lastY, x, y, fg, 1); + Line(hdc, last.x, last.y, x, y, fg, 1); SetPixel(hdc, x, y, fg); break; case TOOL_LINE: resetToU1(); if (GetAsyncKeyState(VK_SHIFT) < 0) - roundTo8Directions(startX, startY, &x, &y); - Line(hdc, startX, startY, x, y, fg, lineWidth); + roundTo8Directions(start.x, start.y, &x, &y); + Line(hdc, start.x, start.y, x, y, fg, lineWidth); break; case TOOL_BEZIER: pointSP++; @@ -338,8 +336,8 @@ endPaintingL(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) case TOOL_RECT: resetToU1(); if (GetAsyncKeyState(VK_SHIFT) < 0) - regularize(startX, startY, &x, &y); - Rect(hdc, startX, startY, x, y, fg, bg, lineWidth, shapeStyle); + regularize(start.x, start.y, &x, &y); + Rect(hdc, start.x, start.y, x, y, fg, bg, lineWidth, shapeStyle); break; case TOOL_SHAPE: resetToU1(); @@ -368,14 +366,14 @@ endPaintingL(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) case TOOL_ELLIPSE: resetToU1(); if (GetAsyncKeyState(VK_SHIFT) < 0) - regularize(startX, startY, &x, &y); - Ellp(hdc, startX, startY, x, y, fg, bg, lineWidth, shapeStyle); + regularize(start.x, start.y, &x, &y); + Ellp(hdc, start.x, start.y, x, y, fg, bg, lineWidth, shapeStyle); break; case TOOL_RRECT: resetToU1(); if (GetAsyncKeyState(VK_SHIFT) < 0) - regularize(startX, startY, &x, &y); - RRect(hdc, startX, startY, x, y, fg, bg, lineWidth, shapeStyle); + regularize(start.x, start.y, &x, &y); + RRect(hdc, start.x, start.y, x, y, fg, bg, lineWidth, shapeStyle); break; } } @@ -383,10 +381,10 @@ endPaintingL(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) void startPaintingR(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) { - startX = x; - startY = y; - lastX = x; - lastY = y; + start.x = x; + start.y = y; + last.x = x; + last.y = y; switch (activeTool) { case TOOL_FREESEL: @@ -446,13 +444,13 @@ whilePaintingR(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) switch (activeTool) { case TOOL_RUBBER: - Replace(hdc, lastX, lastY, x, y, fg, bg, rubberRadius); + Replace(hdc, last.x, last.y, x, y, fg, bg, rubberRadius); break; case TOOL_PEN: - Line(hdc, lastX, lastY, x, y, bg, 1); + Line(hdc, last.x, last.y, x, y, bg, 1); break; case TOOL_BRUSH: - Brush(hdc, lastX, lastY, x, y, bg, brushStyle); + Brush(hdc, last.x, last.y, x, y, bg, brushStyle); break; case TOOL_AIRBRUSH: Airbrush(hdc, x, y, bg, airBrushWidth); @@ -460,8 +458,8 @@ whilePaintingR(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) case TOOL_LINE: resetToU1(); if (GetAsyncKeyState(VK_SHIFT) < 0) - roundTo8Directions(startX, startY, &x, &y); - Line(hdc, startX, startY, x, y, bg, lineWidth); + roundTo8Directions(start.x, start.y, &x, &y); + Line(hdc, start.x, start.y, x, y, bg, lineWidth); break; case TOOL_BEZIER: resetToU1(); @@ -484,8 +482,8 @@ whilePaintingR(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) case TOOL_RECT: resetToU1(); if (GetAsyncKeyState(VK_SHIFT) < 0) - regularize(startX, startY, &x, &y); - Rect(hdc, startX, startY, x, y, bg, fg, lineWidth, shapeStyle); + regularize(start.x, start.y, &x, &y); + Rect(hdc, start.x, start.y, x, y, bg, fg, lineWidth, shapeStyle); break; case TOOL_SHAPE: resetToU1(); @@ -500,19 +498,19 @@ whilePaintingR(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) case TOOL_ELLIPSE: resetToU1(); if (GetAsyncKeyState(VK_SHIFT) < 0) - regularize(startX, startY, &x, &y); - Ellp(hdc, startX, startY, x, y, bg, fg, lineWidth, shapeStyle); + regularize(start.x, start.y, &x, &y); + Ellp(hdc, start.x, start.y, x, y, bg, fg, lineWidth, shapeStyle); break; case TOOL_RRECT: resetToU1(); if (GetAsyncKeyState(VK_SHIFT) < 0) - regularize(startX, startY, &x, &y); - RRect(hdc, startX, startY, x, y, bg, fg, lineWidth, shapeStyle); + regularize(start.x, start.y, &x, &y); + RRect(hdc, start.x, start.y, x, y, bg, fg, lineWidth, shapeStyle); break; } - lastX = x; - lastY = y; + last.x = x; + last.y = y; } void @@ -521,17 +519,17 @@ endPaintingR(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) switch (activeTool) { case TOOL_RUBBER: - Replace(hdc, lastX, lastY, x, y, fg, bg, rubberRadius); + Replace(hdc, last.x, last.y, x, y, fg, bg, rubberRadius); break; case TOOL_PEN: - Line(hdc, lastX, lastY, x, y, bg, 1); + Line(hdc, last.x, last.y, x, y, bg, 1); SetPixel(hdc, x, y, bg); break; case TOOL_LINE: resetToU1(); if (GetAsyncKeyState(VK_SHIFT) < 0) - roundTo8Directions(startX, startY, &x, &y); - Line(hdc, startX, startY, x, y, bg, lineWidth); + roundTo8Directions(start.x, start.y, &x, &y); + Line(hdc, start.x, start.y, x, y, bg, lineWidth); break; case TOOL_BEZIER: pointSP++; @@ -541,8 +539,8 @@ endPaintingR(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) case TOOL_RECT: resetToU1(); if (GetAsyncKeyState(VK_SHIFT) < 0) - regularize(startX, startY, &x, &y); - Rect(hdc, startX, startY, x, y, bg, fg, lineWidth, shapeStyle); + regularize(start.x, start.y, &x, &y); + Rect(hdc, start.x, start.y, x, y, bg, fg, lineWidth, shapeStyle); break; case TOOL_SHAPE: resetToU1(); @@ -571,14 +569,14 @@ endPaintingR(HDC hdc, LONG x, LONG y, COLORREF fg, COLORREF bg) case TOOL_ELLIPSE: resetToU1(); if (GetAsyncKeyState(VK_SHIFT) < 0) - regularize(startX, startY, &x, &y); - Ellp(hdc, startX, startY, x, y, bg, fg, lineWidth, shapeStyle); + regularize(start.x, start.y, &x, &y); + Ellp(hdc, start.x, start.y, x, y, bg, fg, lineWidth, shapeStyle); break; case TOOL_RRECT: resetToU1(); if (GetAsyncKeyState(VK_SHIFT) < 0) - regularize(startX, startY, &x, &y); - RRect(hdc, startX, startY, x, y, bg, fg, lineWidth, shapeStyle); + regularize(start.x, start.y, &x, &y); + RRect(hdc, start.x, start.y, x, y, bg, fg, lineWidth, shapeStyle); break; } } diff --git a/base/applications/mspaint/palette.c b/base/applications/mspaint/palette.c index 2626971ec5a..0a9c38ece54 100644 --- a/base/applications/mspaint/palette.c +++ b/base/applications/mspaint/palette.c @@ -63,37 +63,37 @@ PalWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) break; } case WM_LBUTTONDOWN: - if (LOWORD(lParam) >= 31) + if (GET_X_LPARAM(lParam) >= 31) { - fgColor = palColors[(LOWORD(lParam) - 31) / 16 + (HIWORD(lParam) / 16) * 14]; - SendMessage(hwnd, WM_PAINT, 0, 0); + fgColor = palColors[(GET_X_LPARAM(lParam) - 31) / 16 + (GET_Y_LPARAM(lParam) / 16) * 14]; + InvalidateRect(hwnd, NULL, FALSE); } break; case WM_RBUTTONDOWN: - if (LOWORD(lParam) >= 31) + if (GET_X_LPARAM(lParam) >= 31) { - bgColor = palColors[(LOWORD(lParam) - 31) / 16 + (HIWORD(lParam) / 16) * 14]; - SendMessage(hwnd, WM_PAINT, 0, 0); + bgColor = palColors[(GET_X_LPARAM(lParam) - 31) / 16 + (GET_Y_LPARAM(lParam) / 16) * 14]; + InvalidateRect(hwnd, NULL, FALSE); } break; case WM_LBUTTONDBLCLK: - if (LOWORD(lParam) >= 31) + if (GET_X_LPARAM(lParam) >= 31) if (ChooseColor(&choosecolor)) { - palColors[(LOWORD(lParam) - 31) / 16 + (HIWORD(lParam) / 16) * 14] = + palColors[(GET_X_LPARAM(lParam) - 31) / 16 + (GET_Y_LPARAM(lParam) / 16) * 14] = choosecolor.rgbResult; fgColor = choosecolor.rgbResult; - SendMessage(hwnd, WM_PAINT, 0, 0); + InvalidateRect(hwnd, NULL, FALSE); } break; case WM_RBUTTONDBLCLK: - if (LOWORD(lParam) >= 31) + if (GET_X_LPARAM(lParam) >= 31) if (ChooseColor(&choosecolor)) { - palColors[(LOWORD(lParam) - 31) / 16 + (HIWORD(lParam) / 16) * 14] = + palColors[(GET_X_LPARAM(lParam) - 31) / 16 + (GET_Y_LPARAM(lParam) / 16) * 14] = choosecolor.rgbResult; bgColor = choosecolor.rgbResult; - SendMessage(hwnd, WM_PAINT, 0, 0); + InvalidateRect(hwnd, NULL, FALSE); } break; diff --git a/base/applications/mspaint/rsrc.rc b/base/applications/mspaint/rsrc.rc index c79b7c7155b..c35277787bd 100644 --- a/base/applications/mspaint/rsrc.rc +++ b/base/applications/mspaint/rsrc.rc @@ -21,6 +21,8 @@ #include "icons.rc" +#include + // UTF-8 #pragma code_page(65001) #ifdef LANGUAGE_BG_BG diff --git a/base/applications/mspaint/selection.c b/base/applications/mspaint/selection.c index 8a77b51c9f6..b3c8abfc8fb 100644 --- a/base/applications/mspaint/selection.c +++ b/base/applications/mspaint/selection.c @@ -72,8 +72,8 @@ SelectionWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) break; } case WM_LBUTTONDOWN: - xPos = LOWORD(lParam); - yPos = HIWORD(lParam); + xPos = GET_X_LPARAM(lParam); + yPos = GET_Y_LPARAM(lParam); SetCapture(hwnd); if (action != 0) SetCursor(LoadCursor(NULL, cursors[action])); @@ -86,8 +86,8 @@ SelectionWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) int xDelta; int yDelta; resetToU1(); - xFrac += (short)LOWORD(lParam) - xPos; - yFrac += (short)HIWORD(lParam) - yPos; + xFrac += GET_X_LPARAM(lParam) - xPos; + yFrac += GET_Y_LPARAM(lParam) - yPos; if (zoom < 1000) { xDelta = xFrac * 1000 / zoom; @@ -170,17 +170,17 @@ SelectionWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) hSelDC, 0, 0, tempMask, 0, 0, MAKEROP4(SRCCOPY, SRCAND)); DeleteObject(tempMask); } - SendMessage(hImageArea, WM_PAINT, 0, 0); - xPos = LOWORD(lParam); - yPos = HIWORD(lParam); + InvalidateRect(hImageArea, NULL, FALSE); + xPos = GET_X_LPARAM(lParam); + yPos = GET_Y_LPARAM(lParam); //SendMessage(hwnd, WM_PAINT, 0, 0); } else { int w = rectSel_dest[2] * zoom / 1000 + 6; int h = rectSel_dest[3] * zoom / 1000 + 6; - xPos = LOWORD(lParam); - yPos = HIWORD(lParam); + xPos = GET_X_LPARAM(lParam); + yPos = GET_Y_LPARAM(lParam); SendMessage(hStatusBar, SB_SETTEXT, 2, (LPARAM) NULL); action = identifyCorner(xPos, yPos, w, h); if (action != 0) diff --git a/base/applications/mspaint/sizebox.c b/base/applications/mspaint/sizebox.c index 728bd63a47f..12cb7a6e40b 100644 --- a/base/applications/mspaint/sizebox.c +++ b/base/applications/mspaint/sizebox.c @@ -33,8 +33,8 @@ SizeboxWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) break; case WM_LBUTTONDOWN: resizing = TRUE; - xOrig = LOWORD(lParam); - yOrig = HIWORD(lParam); + xOrig = GET_X_LPARAM(lParam); + yOrig = GET_Y_LPARAM(lParam); SetCapture(hwnd); break; case WM_MOUSEMOVE: @@ -43,8 +43,8 @@ SizeboxWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) TCHAR sizeStr[100]; short xRel; short yRel; - xRel = ((short)LOWORD(lParam) - xOrig) * 1000 / zoom; - yRel = ((short)HIWORD(lParam) - yOrig) * 1000 / zoom; + xRel = (GET_X_LPARAM(lParam) - xOrig) * 1000 / zoom; + yRel = (GET_Y_LPARAM(lParam) - yOrig) * 1000 / zoom; if (hwnd == hSizeboxLeftTop) _stprintf(sizeStr, _T("%d x %d"), imgXRes - xRel, imgYRes - yRel); if (hwnd == hSizeboxCenterTop) @@ -71,8 +71,8 @@ SizeboxWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) short yRel; ReleaseCapture(); resizing = FALSE; - xRel = ((short)LOWORD(lParam) - xOrig) * 1000 / zoom; - yRel = ((short)HIWORD(lParam) - yOrig) * 1000 / zoom; + xRel = (GET_X_LPARAM(lParam) - xOrig) * 1000 / zoom; + yRel = (GET_Y_LPARAM(lParam) - yOrig) * 1000 / zoom; if (hwnd == hSizeboxLeftTop) cropReversible(imgXRes - xRel, imgYRes - yRel, xRel, yRel); if (hwnd == hSizeboxCenterTop) diff --git a/base/applications/mspaint/toolsettings.c b/base/applications/mspaint/toolsettings.c index 2ba81c7e68d..1cfe04c171f 100644 --- a/base/applications/mspaint/toolsettings.c +++ b/base/applications/mspaint/toolsettings.c @@ -172,73 +172,75 @@ SettingsWinProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) } case WM_LBUTTONDOWN: { + int x = GET_X_LPARAM(lParam); + int y = GET_Y_LPARAM(lParam); switch (activeTool) { case TOOL_FREESEL: case TOOL_RECTSEL: case TOOL_TEXT: - if ((HIWORD(lParam) > 1) && (HIWORD(lParam) < 64)) + if ((y > 1) && (y < 64)) { - transpBg = (HIWORD(lParam) - 2) / 31; - SendMessage(hwnd, WM_PAINT, 0, 0); + transpBg = (y - 2) / 31; + InvalidateRect(hwnd, NULL, TRUE); } break; case TOOL_RUBBER: - if ((HIWORD(lParam) > 1) && (HIWORD(lParam) < 62)) + if ((y > 1) && (y < 62)) { - rubberRadius = (HIWORD(lParam) - 2) / 15 + 2; - SendMessage(hwnd, WM_PAINT, 0, 0); + rubberRadius = (y - 2) / 15 + 2; + InvalidateRect(hwnd, NULL, TRUE); } break; case TOOL_BRUSH: - if ((LOWORD(lParam) > 1) && (LOWORD(lParam) < 40) && (HIWORD(lParam) > 1) - && (HIWORD(lParam) < 62)) + if ((x > 1) && (x < 40) && (y > 1) + && (y < 62)) { - brushStyle = (HIWORD(lParam) - 2) / 15 * 3 + (LOWORD(lParam) - 2) / 13; - SendMessage(hwnd, WM_PAINT, 0, 0); + brushStyle = (y - 2) / 15 * 3 + (x - 2) / 13; + InvalidateRect(hwnd, NULL, TRUE); } break; case TOOL_AIRBRUSH: - if (HIWORD(lParam) < 62) + if (y < 62) { - if (HIWORD(lParam) < 30) + if (y < 30) { - if (LOWORD(lParam) < 20) + if (x < 20) airBrushWidth = 5; else airBrushWidth = 8; } else { - if (LOWORD(lParam) < 15) + if (x < 15) airBrushWidth = 3; else airBrushWidth = 12; } - SendMessage(hwnd, WM_PAINT, 0, 0); + InvalidateRect(hwnd, NULL, TRUE); } break; case TOOL_LINE: case TOOL_BEZIER: - if (HIWORD(lParam) <= 62) + if (y <= 62) { - lineWidth = (HIWORD(lParam) - 2) / 12 + 1; - SendMessage(hwnd, WM_PAINT, 0, 0); + lineWidth = (y - 2) / 12 + 1; + InvalidateRect(hwnd, NULL, TRUE); } break; case TOOL_RECT: case TOOL_SHAPE: case TOOL_ELLIPSE: case TOOL_RRECT: - if (HIWORD(lParam) <= 60) + if (y <= 60) { - shapeStyle = (HIWORD(lParam) - 2) / 20; - SendMessage(hwnd, WM_PAINT, 0, 0); + shapeStyle = (y - 2) / 20; + InvalidateRect(hwnd, NULL, TRUE); } - if ((HIWORD(lParam) >= 70) && (HIWORD(lParam) <= 132)) + if ((y >= 70) && (y <= 132)) { - lineWidth = (HIWORD(lParam) - 72) / 12 + 1; - SendMessage(hwnd, WM_PAINT, 0, 0); + lineWidth = (y - 72) / 12 + 1; + InvalidateRect(hwnd, NULL, TRUE); } break; } diff --git a/base/applications/mspaint/winproc.c b/base/applications/mspaint/winproc.c index 75fd2875ee8..9e1b6adffc1 100644 --- a/base/applications/mspaint/winproc.c +++ b/base/applications/mspaint/winproc.c @@ -20,7 +20,7 @@ selectTool(int tool) ShowWindow(hSelection, SW_HIDE); activeTool = tool; pointSP = 0; // resets the point-buffer of the polygon and bezier functions - SendMessage(hToolSettings, WM_PAINT, 0, 0); + InvalidateRect(hToolSettings, NULL, TRUE); ShowWindow(hTrackbarZoom, (tool == 6) ? SW_SHOW : SW_HIDE); } @@ -133,6 +133,31 @@ alignChildrenToMainWindow() MoveWindow(hPalWin, x, 9, 255, 32, TRUE); } +void +saveImage(BOOL overwrite) +{ + if (isAFile && overwrite) + { + SaveDIBToFile(hBms[currInd], filepathname, hDrawingDC, &fileTime, &fileSize, fileHPPM, + fileVPPM); + imageSaved = TRUE; + } + else if (GetSaveFileName(&sfn) != 0) + { + TCHAR tempstr[1000]; + TCHAR resstr[100]; + SaveDIBToFile(hBms[currInd], sfn.lpstrFile, hDrawingDC, &fileTime, &fileSize, + fileHPPM, fileVPPM); + CopyMemory(filename, sfn.lpstrFileTitle, sizeof(filename)); + CopyMemory(filepathname, sfn.lpstrFile, sizeof(filepathname)); + LoadString(hProgInstance, IDS_WINDOWTITLE, resstr, SIZEOF(resstr)); + _stprintf(tempstr, resstr, filename); + SetWindowText(hMainWnd, tempstr); + isAFile = TRUE; + imageSaved = TRUE; + } +} + BOOL drawing; LRESULT CALLBACK @@ -170,8 +195,9 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) DestroyWindow(hwnd); break; case IDYES: - SendMessage(hwnd, WM_COMMAND, IDM_FILESAVEAS, 0); - DestroyWindow(hwnd); + saveImage(FALSE); + if (imageSaved) + DestroyWindow(hwnd); break; } } @@ -271,6 +297,10 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) CheckMenuItem(GetMenu(hMainWnd), IDM_VIEWZOOM800, (zoom == 8000) ? (MF_CHECKED | MF_BYCOMMAND) : (MF_UNCHECKED | MF_BYCOMMAND)); + CheckMenuItem(GetMenu(hMainWnd), IDM_COLORSMODERNPALETTE, + (selectedPalette == 1) ? (MF_CHECKED | MF_BYCOMMAND) : (MF_UNCHECKED | MF_BYCOMMAND)); + CheckMenuItem(GetMenu(hMainWnd), IDM_COLORSOLDPALETTE, + (selectedPalette == 2) ? (MF_CHECKED | MF_BYCOMMAND) : (MF_UNCHECKED | MF_BYCOMMAND)); break; case WM_SIZE: @@ -280,6 +310,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) SendMessage(hStatusBar, WM_SIZE, wParam, lParam); SendMessage(hStatusBar, SB_SETPARTS, 3, (LPARAM)&test); alignChildrenToMainWindow(); + InvalidateRect(hwnd, NULL, TRUE); } if (hwnd == hImageArea) { @@ -431,8 +462,8 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) DeleteObject(SelectObject(hdc, oldPen)); } ReleaseDC(hImageArea, hdc); - SendMessage(hSelection, WM_PAINT, 0, 0); - SendMessage(hwndMiniature, WM_PAINT, 0, 0); + InvalidateRect(hSelection, NULL, FALSE); + InvalidateRect(hwndMiniature, NULL, FALSE); } else if (hwnd == hwndMiniature) { @@ -490,7 +521,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) SendMessage(hwnd, WM_LBUTTONUP, wParam, lParam); undo(); } - SendMessage(hImageArea, WM_PAINT, 0, 0); + InvalidateRect(hImageArea, NULL, FALSE); if ((activeTool == TOOL_ZOOM) && (zoom < 8000)) zoomTo(zoom * 2, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)); } @@ -511,7 +542,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) SendMessage(hwnd, WM_RBUTTONUP, wParam, lParam); undo(); } - SendMessage(hImageArea, WM_PAINT, 0, 0); + InvalidateRect(hImageArea, NULL, FALSE); if ((activeTool == TOOL_ZOOM) && (zoom > 125)) zoomTo(zoom / 2, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)); } @@ -524,14 +555,14 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) drawing = FALSE; endPaintingL(hDrawingDC, GET_X_LPARAM(lParam) * 1000 / zoom, GET_Y_LPARAM(lParam) * 1000 / zoom, fgColor, bgColor); - SendMessage(hImageArea, WM_PAINT, 0, 0); + InvalidateRect(hImageArea, NULL, FALSE); if (activeTool == TOOL_COLOR) { int tempColor = GetPixel(hDrawingDC, GET_X_LPARAM(lParam) * 1000 / zoom, GET_Y_LPARAM(lParam) * 1000 / zoom); if (tempColor != CLR_INVALID) fgColor = tempColor; - SendMessage(hPalWin, WM_PAINT, 0, 0); + InvalidateRect(hPalWin, NULL, FALSE); } SendMessage(hStatusBar, SB_SETTEXT, 2, (LPARAM) ""); } @@ -544,14 +575,14 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) drawing = FALSE; endPaintingR(hDrawingDC, GET_X_LPARAM(lParam) * 1000 / zoom, GET_Y_LPARAM(lParam) * 1000 / zoom, fgColor, bgColor); - SendMessage(hImageArea, WM_PAINT, 0, 0); + InvalidateRect(hImageArea, NULL, FALSE); if (activeTool == TOOL_COLOR) { int tempColor = GetPixel(hDrawingDC, GET_X_LPARAM(lParam) * 1000 / zoom, GET_Y_LPARAM(lParam) * 1000 / zoom); if (tempColor != CLR_INVALID) bgColor = tempColor; - SendMessage(hPalWin, WM_PAINT, 0, 0); + InvalidateRect(hPalWin, NULL, FALSE); } SendMessage(hStatusBar, SB_SETTEXT, 2, (LPARAM) ""); } @@ -586,7 +617,8 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if (activeTool == TOOL_ZOOM) { - SendMessage(hImageArea, WM_PAINT, 0, 0); + InvalidateRect(hImageArea, NULL, FALSE); + UpdateWindow(hImageArea); drawZoomFrame(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)); } @@ -606,19 +638,19 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if (drawing) { /* values displayed in statusbar */ - LONG xRel = xNow - startX; - LONG yRel = yNow - startY; + LONG xRel = xNow - start.x; + LONG yRel = yNow - start.y; /* freesel, rectsel and text tools always show numbers limited to fit into image area */ if ((activeTool == TOOL_FREESEL) || (activeTool == TOOL_RECTSEL) || (activeTool == TOOL_TEXT)) { if (xRel < 0) - xRel = (xNow < 0) ? -startX : xRel; + xRel = (xNow < 0) ? -start.x : xRel; else if (xNow > imgXRes) - xRel = imgXRes-startX; + xRel = imgXRes-start.x; if (yRel < 0) - yRel = (yNow < 0) ? -startY : yRel; + yRel = (yNow < 0) ? -start.y : yRel; else if (yNow > imgYRes) - yRel = imgYRes-startY; + yRel = imgYRes-start.y; } /* rectsel and shape tools always show non-negative numbers when drawing */ if ((activeTool == TOOL_RECTSEL) || (activeTool == TOOL_SHAPE)) @@ -646,7 +678,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if ((wParam & MK_LBUTTON) != 0) { whilePaintingL(hDrawingDC, xNow, yNow, fgColor, bgColor); - SendMessage(hImageArea, WM_PAINT, 0, 0); + InvalidateRect(hImageArea, NULL, FALSE); if ((activeTool >= TOOL_TEXT) || (activeTool == TOOL_RECTSEL) || (activeTool == TOOL_FREESEL)) { TCHAR sizeStr[100]; @@ -659,7 +691,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if ((wParam & MK_RBUTTON) != 0) { whilePaintingR(hDrawingDC, xNow, yNow, fgColor, bgColor); - SendMessage(hImageArea, WM_PAINT, 0, 0); + InvalidateRect(hImageArea, NULL, FALSE); if (activeTool >= TOOL_TEXT) { TCHAR sizeStr[100]; @@ -676,7 +708,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) case WM_MOUSELEAVE: SendMessage(hStatusBar, SB_SETTEXT, 1, (LPARAM) _T("")); if (activeTool == TOOL_ZOOM) - SendMessage(hImageArea, WM_PAINT, 0, 0); + InvalidateRect(hImageArea, NULL, FALSE); break; // menu and button events @@ -726,7 +758,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) imageSaved = TRUE; break; case IDYES: - SendMessage(hwnd, WM_COMMAND, IDM_FILESAVEAS, 0); + saveImage(FALSE); break; case IDCANCEL: reset = FALSE; @@ -736,7 +768,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if (reset && imageSaved) { Rectangle(hDrawingDC, 0 - 1, 0 - 1, imgXRes + 1, imgYRes + 1); - SendMessage(hImageArea, WM_PAINT, 0, 0); + InvalidateRect(hImageArea, NULL, FALSE); updateCanvasAndScrollbars(); clearHistory(); } @@ -764,30 +796,10 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) } break; case IDM_FILESAVE: - if (isAFile) - { - SaveDIBToFile(hBms[currInd], filepathname, hDrawingDC, &fileTime, &fileSize, fileHPPM, - fileVPPM); - imageSaved = TRUE; - } - else - SendMessage(hwnd, WM_COMMAND, IDM_FILESAVEAS, 0); + saveImage(TRUE); break; case IDM_FILESAVEAS: - if (GetSaveFileName(&sfn) != 0) - { - TCHAR tempstr[1000]; - TCHAR resstr[100]; - SaveDIBToFile(hBms[currInd], sfn.lpstrFile, hDrawingDC, &fileTime, &fileSize, - fileHPPM, fileVPPM); - CopyMemory(filename, sfn.lpstrFileTitle, sizeof(filename)); - CopyMemory(filepathname, sfn.lpstrFile, sizeof(filepathname)); - LoadString(hProgInstance, IDS_WINDOWTITLE, resstr, SIZEOF(resstr)); - _stprintf(tempstr, resstr, filename); - SetWindowText(hMainWnd, tempstr); - isAFile = TRUE; - imageSaved = TRUE; - } + saveImage(FALSE); break; case IDM_FILEASWALLPAPERPLANE: SetWallpaper(filepathname, 1, 1); @@ -800,11 +812,11 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) break; case IDM_EDITUNDO: undo(); - SendMessage(hImageArea, WM_PAINT, 0, 0); + InvalidateRect(hImageArea, NULL, FALSE); break; case IDM_EDITREDO: redo(); - SendMessage(hImageArea, WM_PAINT, 0, 0); + InvalidateRect(hImageArea, NULL, FALSE); break; case IDM_EDITCOPY: OpenClipboard(hMainWnd); @@ -877,22 +889,32 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if (ChooseColor(&choosecolor)) { fgColor = choosecolor.rgbResult; - SendMessage(hPalWin, WM_PAINT, 0, 0); + InvalidateRect(hPalWin, NULL, FALSE); } break; + case IDM_COLORSMODERNPALETTE: + selectedPalette = 1; + CopyMemory(palColors, modernPalColors, sizeof(palColors)); + InvalidateRect(hPalWin, NULL, FALSE); + break; + case IDM_COLORSOLDPALETTE: + selectedPalette = 2; + CopyMemory(palColors, oldPalColors, sizeof(palColors)); + InvalidateRect(hPalWin, NULL, FALSE); + break; case IDM_IMAGEINVERTCOLORS: { RECT tempRect; newReversible(); SetRect(&tempRect, 0, 0, imgXRes, imgYRes); InvertRect(hDrawingDC, &tempRect); - SendMessage(hImageArea, WM_PAINT, 0, 0); + InvalidateRect(hImageArea, NULL, FALSE); break; } case IDM_IMAGEDELETEIMAGE: newReversible(); Rect(hDrawingDC, 0, 0, imgXRes, imgYRes, bgColor, bgColor, 0, TRUE); - SendMessage(hImageArea, WM_PAINT, 0, 0); + InvalidateRect(hImageArea, NULL, FALSE); break; case IDM_IMAGEROTATEMIRROR: switch (mirrorRotateDlg()) @@ -916,7 +938,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) newReversible(); StretchBlt(hDrawingDC, imgXRes - 1, 0, -imgXRes, imgYRes, hDrawingDC, 0, 0, imgXRes, imgYRes, SRCCOPY); - SendMessage(hImageArea, WM_PAINT, 0, 0); + InvalidateRect(hImageArea, NULL, FALSE); } break; case 2: /* flip vertically */ @@ -937,7 +959,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) newReversible(); StretchBlt(hDrawingDC, 0, imgYRes - 1, imgXRes, -imgYRes, hDrawingDC, 0, 0, imgXRes, imgYRes, SRCCOPY); - SendMessage(hImageArea, WM_PAINT, 0, 0); + InvalidateRect(hImageArea, NULL, FALSE); } break; case 3: /* rotate 90 degrees */ @@ -960,7 +982,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) newReversible(); StretchBlt(hDrawingDC, imgXRes - 1, imgYRes - 1, -imgXRes, -imgYRes, hDrawingDC, 0, 0, imgXRes, imgYRes, SRCCOPY); - SendMessage(hImageArea, WM_PAINT, 0, 0); + InvalidateRect(hImageArea, NULL, FALSE); } break; case 5: /* rotate 270 degrees */ @@ -969,29 +991,27 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) break; case IDM_IMAGEATTRIBUTES: { - int retVal = attributesDlg(); - if ((LOWORD(retVal) != 0) && (HIWORD(retVal) != 0)) + if (attributesDlg()) { - cropReversible(LOWORD(retVal), HIWORD(retVal), 0, 0); + cropReversible(widthSetInDlg, heightSetInDlg, 0, 0); updateCanvasAndScrollbars(); } break; } - case IDM_IMAGECHANGESIZE: + case IDM_IMAGESTRETCHSKEW: { - int retVal = changeSizeDlg(); - if ((LOWORD(retVal) != 0) && (HIWORD(retVal) != 0)) + if (changeSizeDlg()) { insertReversible(CopyImage(hBms[currInd], IMAGE_BITMAP, - imgXRes * LOWORD(retVal) / 100, - imgYRes * HIWORD(retVal) / 100, 0)); + imgXRes * stretchSkew.percentage.x / 100, + imgYRes * stretchSkew.percentage.y / 100, 0)); updateCanvasAndScrollbars(); } break; } case IDM_IMAGEDRAWOPAQUE: transpBg = 1 - transpBg; - SendMessage(hToolSettings, WM_PAINT, 0, 0); + InvalidateRect(hToolSettings, NULL, TRUE); break; case IDM_IMAGECROP: insertReversible(CopyImage(hSelBm, IMAGE_BITMAP, 0, 0, LR_COPYRETURNORG)); @@ -1013,7 +1033,7 @@ WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) case IDM_VIEWSHOWGRID: showGrid = !showGrid; - SendMessage(hImageArea, WM_PAINT, 0, 0); + InvalidateRect(hImageArea, NULL, FALSE); break; case IDM_VIEWSHOWMINIATURE: showMiniature = !showMiniature; diff --git a/base/applications/mstsc/lang/tr-TR.rc b/base/applications/mstsc/lang/tr-TR.rc index 31a3b575794..1c06cadf2f9 100644 --- a/base/applications/mstsc/lang/tr-TR.rc +++ b/base/applications/mstsc/lang/tr-TR.rc @@ -47,7 +47,7 @@ CAPTION "Uzak Masaüstü Bağlayıcısı" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Bağlan",IDOK,147,245,50,14 - PUSHBUTTON "Vazgeç",IDCANCEL,203,245,50,14 + PUSHBUTTON "İptal",IDCANCEL,203,245,50,14 CONTROL "",IDC_TAB,"SysTabControl32",0x0,7,50,246,190 END diff --git a/base/applications/mstsc/rdc.rc b/base/applications/mstsc/rdc.rc index 3d73a23b776..300043f9003 100644 --- a/base/applications/mstsc/rdc.rc +++ b/base/applications/mstsc/rdc.rc @@ -9,4 +9,6 @@ #define REACTOS_STR_ORIGINAL_FILENAME "mstsc.exe\0" //#include +#include + #include "rsrc.rc" diff --git a/base/applications/network/ipconfig/lang/bg-BG.rc b/base/applications/network/ipconfig/lang/bg-BG.rc index 14200370ebd..c4386fe0733 100644 --- a/base/applications/network/ipconfig/lang/bg-BG.rc +++ b/base/applications/network/ipconfig/lang/bg-BG.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BCAST "Разпръскване" IDS_P2P "Равен с равен (P2P)" @@ -9,7 +9,7 @@ BEGIN IDS_UNKNOWN "неизвестен" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_OTHER "Друг вид карта" IDS_ETH "Карта Ethernet" @@ -20,7 +20,7 @@ BEGIN IDS_SLIP "Карта SLIP" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN /* Please keep the spacing/formatting as per En.rc when translating */ IDS_USAGE diff --git a/base/applications/network/ipconfig/lang/de-DE.rc b/base/applications/network/ipconfig/lang/de-DE.rc index 41f0d110a98..b88eecada30 100644 --- a/base/applications/network/ipconfig/lang/de-DE.rc +++ b/base/applications/network/ipconfig/lang/de-DE.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BCAST "Broadcast" IDS_P2P "Peer To Peer" @@ -9,7 +9,7 @@ BEGIN IDS_UNKNOWN "Unbekannt" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_OTHER "Anderer Adapter" IDS_ETH "Ethernet-Adapter" @@ -20,7 +20,7 @@ BEGIN IDS_SLIP "SLIP-Adapter" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE "\nSyntax:\n \ diff --git a/base/applications/network/ipconfig/lang/el-GR.rc b/base/applications/network/ipconfig/lang/el-GR.rc index f1bddf2ae87..cdbab288e22 100644 --- a/base/applications/network/ipconfig/lang/el-GR.rc +++ b/base/applications/network/ipconfig/lang/el-GR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BCAST "Broadcast" IDS_P2P "Peer To Peer" @@ -9,7 +9,7 @@ BEGIN IDS_UNKNOWN "unknown" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_OTHER "Άλλος τύπος προσαρμογέα" IDS_ETH "Προσαρμογέας Ethernet" @@ -20,7 +20,7 @@ BEGIN IDS_SLIP "Προσαρμογέας SLIP" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN /* Please keep the spacing/formatting as per En.rc when translating */ IDS_USAGE diff --git a/base/applications/network/ipconfig/lang/en-US.rc b/base/applications/network/ipconfig/lang/en-US.rc index 1805e59a5d1..4df6f0a601e 100644 --- a/base/applications/network/ipconfig/lang/en-US.rc +++ b/base/applications/network/ipconfig/lang/en-US.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BCAST "Broadcast" IDS_P2P "Peer To Peer" @@ -9,7 +9,7 @@ BEGIN IDS_UNKNOWN "unknown" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_OTHER "Other Type Of Adapter" IDS_ETH "Ethernet Adapter" @@ -20,7 +20,7 @@ BEGIN IDS_SLIP "SLIP Adapter" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN /* Please keep the spacing/formatting as per En.rc when translating */ IDS_USAGE diff --git a/base/applications/network/ipconfig/lang/es-ES.rc b/base/applications/network/ipconfig/lang/es-ES.rc index a5bad32cfed..e035dd3ae6a 100644 --- a/base/applications/network/ipconfig/lang/es-ES.rc +++ b/base/applications/network/ipconfig/lang/es-ES.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BCAST "Broadcast" IDS_P2P "Peer To Peer" @@ -9,7 +9,7 @@ BEGIN IDS_UNKNOWN "Deconocido" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_OTHER "Otro Tipo de Adaptador" IDS_ETH "Adaptador Ethernet" @@ -20,7 +20,7 @@ BEGIN IDS_SLIP "Adaptador SLIP" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN /* Please keep the spacing/formatting as per En.rc when translating */ IDS_USAGE diff --git a/base/applications/network/ipconfig/lang/fr-FR.rc b/base/applications/network/ipconfig/lang/fr-FR.rc index 8915e9b2609..b82c3cc02dd 100644 --- a/base/applications/network/ipconfig/lang/fr-FR.rc +++ b/base/applications/network/ipconfig/lang/fr-FR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BCAST "Broadcast" IDS_P2P "Peer To Peer" @@ -9,7 +9,7 @@ BEGIN IDS_UNKNOWN "Inconnu" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_OTHER "Autre Type d'adapteur" IDS_ETH "Adapteur Ethernet" @@ -20,7 +20,7 @@ BEGIN IDS_SLIP "Adapteur SLIP" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN /* Please keep the spacing/formatting as per En.rc when translating */ IDS_USAGE diff --git a/base/applications/network/ipconfig/lang/id-ID.rc b/base/applications/network/ipconfig/lang/id-ID.rc index 5487bb01009..7d66af553c9 100644 --- a/base/applications/network/ipconfig/lang/id-ID.rc +++ b/base/applications/network/ipconfig/lang/id-ID.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BCAST "Siarkan" IDS_P2P "Peer To Peer" @@ -9,7 +9,7 @@ BEGIN IDS_UNKNOWN "tidak dikenal" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_OTHER "Adapter Tipe Lainnya" IDS_ETH "Adapter Ethernet" @@ -20,7 +20,7 @@ BEGIN IDS_SLIP "Adapter SLIP" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN /* Please keep the spacing/formatting as per En.rc when translating */ IDS_USAGE diff --git a/base/applications/network/ipconfig/lang/it-IT.rc b/base/applications/network/ipconfig/lang/it-IT.rc index c5607c4541b..c308370ec3f 100644 --- a/base/applications/network/ipconfig/lang/it-IT.rc +++ b/base/applications/network/ipconfig/lang/it-IT.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BCAST "Broadcast" IDS_P2P "Peer To Peer" @@ -11,7 +11,7 @@ BEGIN IDS_UNKNOWN "sconosciuto" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_OTHER "Altro tipo di adattatore" IDS_ETH "Adattatore Ethernet" @@ -22,7 +22,7 @@ BEGIN IDS_SLIP "Adattatore SLIP" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN /* Please keep the spacing/formatting as per En.rc when translating */ IDS_USAGE diff --git a/base/applications/network/ipconfig/lang/no-NO.rc b/base/applications/network/ipconfig/lang/no-NO.rc index d9d61d6a963..faf1c703b67 100644 --- a/base/applications/network/ipconfig/lang/no-NO.rc +++ b/base/applications/network/ipconfig/lang/no-NO.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BCAST "Broadcast" IDS_P2P "Peer To Peer" @@ -9,7 +9,7 @@ BEGIN IDS_UNKNOWN "Ukjent" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_OTHER "Other Type Of Adapter" IDS_ETH "Ethernet Adapter" @@ -20,7 +20,7 @@ BEGIN IDS_SLIP "SLIP Adapter" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN /* Please keep the spacing/formatting as per En.rc when translating */ IDS_USAGE diff --git a/base/applications/network/ipconfig/lang/pl-PL.rc b/base/applications/network/ipconfig/lang/pl-PL.rc index a806cc70e35..ee50c81def6 100644 --- a/base/applications/network/ipconfig/lang/pl-PL.rc +++ b/base/applications/network/ipconfig/lang/pl-PL.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BCAST "Broadcast" IDS_P2P "Peer To Peer" @@ -16,7 +16,7 @@ BEGIN IDS_UNKNOWN "nieznany" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_OTHER "inny rodzaj karty" IDS_ETH "karta Ethernet" @@ -27,7 +27,7 @@ BEGIN IDS_SLIP "karta SLIP" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN /* Please keep the spacing/formatting as per En.rc when translating */ IDS_USAGE diff --git a/base/applications/network/ipconfig/lang/ro-RO.rc b/base/applications/network/ipconfig/lang/ro-RO.rc index 2d43e338ad2..650014e1f78 100644 --- a/base/applications/network/ipconfig/lang/ro-RO.rc +++ b/base/applications/network/ipconfig/lang/ro-RO.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BCAST "Difuzare" IDS_P2P "Egal la egal" @@ -17,7 +17,7 @@ BEGIN IDS_UNKNOWN "necunoscută" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_OTHER "alt tip de adaptor" IDS_ETH "adaptor Ethernet" @@ -28,7 +28,7 @@ BEGIN IDS_SLIP "adaptor SLIP" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN /* Please keep the spacing/formatting as per En.rc when translating */ IDS_USAGE diff --git a/base/applications/network/ipconfig/lang/ru-RU.rc b/base/applications/network/ipconfig/lang/ru-RU.rc index e2d221a2ee9..74590266031 100644 --- a/base/applications/network/ipconfig/lang/ru-RU.rc +++ b/base/applications/network/ipconfig/lang/ru-RU.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BCAST "Broadcast" IDS_P2P "Peer To Peer" @@ -11,7 +11,7 @@ BEGIN IDS_UNKNOWN "unknown" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_OTHER "Другой тип адаптера" IDS_ETH "Ethernet адаптер" @@ -22,7 +22,7 @@ BEGIN IDS_SLIP "SLIP адаптер" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN /* Please keep the spacing/formatting as per En.rc when translating */ IDS_USAGE diff --git a/base/applications/network/ipconfig/lang/sk-SK.rc b/base/applications/network/ipconfig/lang/sk-SK.rc index 1346f7a414c..011a7eb04be 100644 --- a/base/applications/network/ipconfig/lang/sk-SK.rc +++ b/base/applications/network/ipconfig/lang/sk-SK.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BCAST "Vysielací" IDS_P2P "Rovný s rovným" @@ -13,7 +13,7 @@ BEGIN IDS_UNKNOWN "Neznámy" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_OTHER "Iný adaptér" IDS_ETH "Adaptér siete Ethernet" @@ -24,7 +24,7 @@ BEGIN IDS_SLIP "Adaptér SLIP" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN /* Please keep the spacing/formatting as per En.rc when translating */ IDS_USAGE diff --git a/base/applications/network/ipconfig/lang/sv-SE.rc b/base/applications/network/ipconfig/lang/sv-SE.rc index ed4d768f3fc..6965c2bc561 100644 --- a/base/applications/network/ipconfig/lang/sv-SE.rc +++ b/base/applications/network/ipconfig/lang/sv-SE.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BCAST "Broadcast" IDS_P2P "Peer To Peer" @@ -16,7 +16,7 @@ BEGIN IDS_UNKNOWN "Okänd" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_OTHER "Annan Typ av Adapter" IDS_ETH "Ethernet Adapter" @@ -27,7 +27,7 @@ BEGIN IDS_SLIP "SLIP Adapter" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN /* Please keep the spacing/formatting as per En.rc when translating */ IDS_USAGE diff --git a/base/applications/network/ipconfig/lang/uk-UA.rc b/base/applications/network/ipconfig/lang/uk-UA.rc index ac060219166..1a1e8ca0bd5 100644 --- a/base/applications/network/ipconfig/lang/uk-UA.rc +++ b/base/applications/network/ipconfig/lang/uk-UA.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BCAST "Broadcast" IDS_P2P "Peer To Peer" @@ -17,7 +17,7 @@ BEGIN IDS_UNKNOWN "Невідомий" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_OTHER "Інший тип адаптера" IDS_ETH "Ethernet адаптер" @@ -28,7 +28,7 @@ BEGIN IDS_SLIP "SLIP адаптер" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN /* Please keep the spacing/formatting as per En.rc when translating */ IDS_USAGE diff --git a/base/applications/network/ipconfig/lang/zh-CN.rc b/base/applications/network/ipconfig/lang/zh-CN.rc index 270e8e66c64..8685fe37519 100644 --- a/base/applications/network/ipconfig/lang/zh-CN.rc +++ b/base/applications/network/ipconfig/lang/zh-CN.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BCAST "广播" IDS_P2P "点对点" @@ -13,7 +13,7 @@ BEGIN IDS_UNKNOWN "未知" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_OTHER "其他类型的适配器" IDS_ETH "以太网适配器" @@ -24,7 +24,7 @@ BEGIN IDS_SLIP "SLIP 适配器" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN /* Please keep the spacing/formatting as per En.rc when translating */ IDS_USAGE diff --git a/base/applications/network/net/CMakeLists.txt b/base/applications/network/net/CMakeLists.txt index 728cb077d02..4386350ec7a 100644 --- a/base/applications/network/net/CMakeLists.txt +++ b/base/applications/network/net/CMakeLists.txt @@ -3,7 +3,7 @@ add_definitions(-D__USE_W32_SOCKETS) list(APPEND SOURCE main.c - cmdstart.c + cmdStart.c cmdStop.c cmdHelpMsg.c cmdPause.c diff --git a/base/applications/network/net/cmdstart.c b/base/applications/network/net/cmdStart.c similarity index 98% rename from base/applications/network/net/cmdstart.c rename to base/applications/network/net/cmdStart.c index adec439cee6..c2da1ce7161 100644 --- a/base/applications/network/net/cmdstart.c +++ b/base/applications/network/net/cmdStart.c @@ -142,7 +142,7 @@ StartOneService(INT argc, WCHAR **argv) done: if (lpArgVectors != NULL) - HeapFree(GetProcessHeap(), 0, lpArgVectors); + HeapFree(GetProcessHeap(), 0, (LPVOID)lpArgVectors); if (hService != NULL) CloseServiceHandle(hService); diff --git a/base/applications/network/ping/lang/bg-BG.rc b/base/applications/network/ping/lang/bg-BG.rc index 5bcba1023bb..d7a8becfba2 100644 --- a/base/applications/network/ping/lang/bg-BG.rc +++ b/base/applications/network/ping/lang/bg-BG.rc @@ -6,7 +6,7 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE "\nУпотреба: ping [-t] [-n пъти] [-l размер] [-w просрочване] целеви_приемник\n\n\ Възможности:\n\ diff --git a/base/applications/network/ping/lang/cs-CZ.rc b/base/applications/network/ping/lang/cs-CZ.rc index 6be31a72a38..3a6e220a0c7 100644 --- a/base/applications/network/ping/lang/cs-CZ.rc +++ b/base/applications/network/ping/lang/cs-CZ.rc @@ -5,7 +5,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE "\nPoužití: ping [-t] [-n počet] [-l velikost] [-w timeout] cíl\n\n\ Options:\n\ diff --git a/base/applications/network/ping/lang/de-DE.rc b/base/applications/network/ping/lang/de-DE.rc index 9979e88250b..07c176bfce0 100644 --- a/base/applications/network/ping/lang/de-DE.rc +++ b/base/applications/network/ping/lang/de-DE.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GERMAN, SUBLANG_GERMAN -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE "\nSyntax: ping [-t] [-n Anzahl] [-l Größe] [-w Zeitlimit] Zielhost\n\n\ Optionen:\n\ diff --git a/base/applications/network/ping/lang/en-US.rc b/base/applications/network/ping/lang/en-US.rc index b4cd6eccf9a..13fb7aa8ed0 100644 --- a/base/applications/network/ping/lang/en-US.rc +++ b/base/applications/network/ping/lang/en-US.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE "\nUsage: ping [-t] [-n count] [-l size] [-w timeout] destination-host\n\n\ Options:\n\ diff --git a/base/applications/network/ping/lang/fr-FR.rc b/base/applications/network/ping/lang/fr-FR.rc index 5add4a46e14..e2e9131b7bc 100644 --- a/base/applications/network/ping/lang/fr-FR.rc +++ b/base/applications/network/ping/lang/fr-FR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE "\nUtilisation : ping [-t] [-n nombre] [-l taille] [-w délai] hôte-destination\n\n\ Options :\n\ diff --git a/base/applications/network/ping/lang/it-IT.rc b/base/applications/network/ping/lang/it-IT.rc index b2e8da956c6..b8c4b82b513 100644 --- a/base/applications/network/ping/lang/it-IT.rc +++ b/base/applications/network/ping/lang/it-IT.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE "\nUso: ping [-t] [-n conteggio] [-l dimensione] [-w timeout] host-destinazione\n\n\ Opzioni:\n\ diff --git a/base/applications/network/ping/lang/pl-PL.rc b/base/applications/network/ping/lang/pl-PL.rc index 5c17cb4431b..e7b4ae070a5 100644 --- a/base/applications/network/ping/lang/pl-PL.rc +++ b/base/applications/network/ping/lang/pl-PL.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE "\nSposób użycia: ping [-t] [-n ilość] [-l bajtów] [-w czas] host-docelowy\n\n\ Opcje:\n\ diff --git a/base/applications/network/ping/lang/ro-RO.rc b/base/applications/network/ping/lang/ro-RO.rc index 3dc2652696f..8c4aef530c3 100644 --- a/base/applications/network/ping/lang/ro-RO.rc +++ b/base/applications/network/ping/lang/ro-RO.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE "\nUtilizare: ping [-t] [-n număr] [-l dimensiune] [-w expirare] gazdă-destinație\n\n\ Opțiuni:\n\ diff --git a/base/applications/network/ping/lang/sv-SE.rc b/base/applications/network/ping/lang/sv-SE.rc index 2bcb86e37bc..a56f205ec1d 100644 --- a/base/applications/network/ping/lang/sv-SE.rc +++ b/base/applications/network/ping/lang/sv-SE.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE "\nSYNTAX: ping [-t] [-n antal] [-l storlek] [-w timeout] värddator\n\n\ Alternativ:\n\ diff --git a/base/applications/network/ping/lang/uk-UA.rc b/base/applications/network/ping/lang/uk-UA.rc index e4a8ab3c026..e2163137478 100644 --- a/base/applications/network/ping/lang/uk-UA.rc +++ b/base/applications/network/ping/lang/uk-UA.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE "\nВикористання: ping [-t] [-n count] [-l size] [-w timeout] хост\n\n\ Опції:\n\ diff --git a/base/applications/network/ping/lang/zh-CN.rc b/base/applications/network/ping/lang/zh-CN.rc index bd4f2e428fe..2dd2c78e9ef 100644 --- a/base/applications/network/ping/lang/zh-CN.rc +++ b/base/applications/network/ping/lang/zh-CN.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE "用法:ping [-t] [-n 次数] [-l 大小] [-w 超时] 目标主机\n\n\ 选项:\n\ diff --git a/base/applications/network/telnet/resource/tnmsg.rc b/base/applications/network/telnet/resource/tnmsg.rc index e7f74fbd865..c9ad49d4e27 100644 --- a/base/applications/network/telnet/resource/tnmsg.rc +++ b/base/applications/network/telnet/resource/tnmsg.rc @@ -3,7 +3,7 @@ LANGUAGE 0,0 // String Table -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN MSG_COPYRIGHT "Telnet Win32 v2.1b2, Copyright (C) 2000 Paul Brannan \nand the team. This program comes with ABSOLUTELY NO WARRANTY; for details\nread LICENSE.TXT. " MSG_COPYRIGHT_1 "This is free software, and you are welcome to redistribute\nit under certain conditions.\n\n" diff --git a/base/applications/network/wlanconf/lang/cs-CZ.rc b/base/applications/network/wlanconf/lang/cs-CZ.rc index 1dd1f9cdbfc..cebc9483b9e 100644 --- a/base/applications/network/wlanconf/lang/cs-CZ.rc +++ b/base/applications/network/wlanconf/lang/cs-CZ.rc @@ -5,7 +5,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "\nNakonfiguruje bezdrátový síťový adaptér (WLAN).\n\n\ WLANCONF [-c SSID [-w WEP] [-a]] [-d] [-s]\n\n\ diff --git a/base/applications/network/wlanconf/lang/de-DE.rc b/base/applications/network/wlanconf/lang/de-DE.rc index df90cd547fa..2b3c9bec2ad 100644 --- a/base/applications/network/wlanconf/lang/de-DE.rc +++ b/base/applications/network/wlanconf/lang/de-DE.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "\nEinen WLAN Adapter konfigurieren.\n\n\ WLANCONF [-c SSID [-w WEP] [-a]] [-d] [-s]\n\n\ diff --git a/base/applications/network/wlanconf/lang/en-US.rc b/base/applications/network/wlanconf/lang/en-US.rc index 3076a182cae..aa15884db04 100644 --- a/base/applications/network/wlanconf/lang/en-US.rc +++ b/base/applications/network/wlanconf/lang/en-US.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "\nConfigure a WLAN adapter.\n\n\ WLANCONF [-c SSID [-w WEP] [-a]] [-d] [-s]\n\n\ diff --git a/base/applications/network/wlanconf/lang/it-IT.rc b/base/applications/network/wlanconf/lang/it-IT.rc index 8adf9113aed..5f9fdcdfd91 100644 --- a/base/applications/network/wlanconf/lang/it-IT.rc +++ b/base/applications/network/wlanconf/lang/it-IT.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "\nConfigurazione adattatore WLAN.\n\n\ WLANCONF [-c SSID [-w WEP] [-a]] [-d] [-s]\n\n\ diff --git a/base/applications/network/wlanconf/lang/pl-PL.rc b/base/applications/network/wlanconf/lang/pl-PL.rc index ee35b42e298..4288de81d8e 100644 --- a/base/applications/network/wlanconf/lang/pl-PL.rc +++ b/base/applications/network/wlanconf/lang/pl-PL.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "\nSkonfiguruj adapter WLAN.\n\n\ WLANCONF [-c SSID [-w WEP] [-a]] [-d] [-s]\n\n\ diff --git a/base/applications/notepad/lang/bg-BG.rc b/base/applications/notepad/lang/bg-BG.rc index 2a940de6738..74822a162a5 100644 --- a/base/applications/notepad/lang/bg-BG.rc +++ b/base/applications/notepad/lang/bg-BG.rc @@ -143,7 +143,7 @@ DEFPUSHBUTTON "Добре", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Отказ", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "За Бележника на РеактОС" FONT 8, "MS Shell Dlg" @@ -158,13 +158,13 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." /* STRING_LICENSE, "Приложението е свободно; можете да по разпространявате и/или променяте в рамките на условията на Общото обществено разрешително ГНУ, както е обнародвано от Учреждението за свободен софтуер. either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." */ END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Страница &s" /* FIXME */ diff --git a/base/applications/notepad/lang/cs-CZ.rc b/base/applications/notepad/lang/cs-CZ.rc index d8680e7ce5f..ebe2044b3a8 100644 --- a/base/applications/notepad/lang/cs-CZ.rc +++ b/base/applications/notepad/lang/cs-CZ.rc @@ -145,7 +145,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Storno", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "O aplikaci ReactOS Notepad" FONT 8, "MS Shell Dlg" @@ -160,12 +160,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Strana &s" /* FIXME */ diff --git a/base/applications/notepad/lang/da-DK.rc b/base/applications/notepad/lang/da-DK.rc index dae9cfb19c2..d96f90aed67 100644 --- a/base/applications/notepad/lang/da-DK.rc +++ b/base/applications/notepad/lang/da-DK.rc @@ -142,7 +142,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "About ReactOS Notepad" FONT 8, "MS Shell Dlg" @@ -157,12 +157,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Side &s" diff --git a/base/applications/notepad/lang/de-DE.rc b/base/applications/notepad/lang/de-DE.rc index c69e92e167e..34ecd0e1138 100644 --- a/base/applications/notepad/lang/de-DE.rc +++ b/base/applications/notepad/lang/de-DE.rc @@ -143,7 +143,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Abbrechen", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Über ReactOS Notepad" FONT 8, "MS Shell Dlg" @@ -158,12 +158,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "Dieses Programm ist kostenlos; Sie können es frei verteilen mit od. ohne Änderungen unter der GNU Lesser General Public License, wie es von der Free Software Foundation veröffentlicht wurde; entweder Version 2.1 der Lizenz, oder eine spätere Version (ihrer Wahl).\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Seite &s" /* FIXME */ diff --git a/base/applications/notepad/lang/el-GR.rc b/base/applications/notepad/lang/el-GR.rc index bb84157f268..0a24a6938e0 100644 --- a/base/applications/notepad/lang/el-GR.rc +++ b/base/applications/notepad/lang/el-GR.rc @@ -141,7 +141,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Ακύρωση", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "About ReactOS Notepad" FONT 8, "MS Shell Dlg" @@ -156,12 +156,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Σελίδα &s" /* FIXME */ diff --git a/base/applications/notepad/lang/en-US.rc b/base/applications/notepad/lang/en-US.rc index c3672027863..e13cd576262 100644 --- a/base/applications/notepad/lang/en-US.rc +++ b/base/applications/notepad/lang/en-US.rc @@ -143,7 +143,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "About ReactOS Notepad" FONT 8, "MS Shell Dlg" @@ -158,12 +158,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */ diff --git a/base/applications/notepad/lang/es-ES.rc b/base/applications/notepad/lang/es-ES.rc index 98a1cbb9cb2..1c5922bbd82 100644 --- a/base/applications/notepad/lang/es-ES.rc +++ b/base/applications/notepad/lang/es-ES.rc @@ -145,7 +145,7 @@ DEFPUSHBUTTON "Aceptar", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Cancelar", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Acerca de Bloc de notas de ReactOS" FONT 8, "MS Shell Dlg" @@ -160,12 +160,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Página &s" /* FIXME */ diff --git a/base/applications/notepad/lang/eu-ES.rc b/base/applications/notepad/lang/eu-ES.rc index 470d08bd3f2..312da443c71 100644 --- a/base/applications/notepad/lang/eu-ES.rc +++ b/base/applications/notepad/lang/eu-ES.rc @@ -121,7 +121,7 @@ DEFPUSHBUTTON "Ados", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Utzi", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS ohar-blokari buruz" FONT 8, "MS Shell Dlg" @@ -136,12 +136,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Orriak" /* FIXME */ diff --git a/base/applications/notepad/lang/fi-FI.rc b/base/applications/notepad/lang/fi-FI.rc index 533b1c5f833..e27c4e1e625 100644 --- a/base/applications/notepad/lang/fi-FI.rc +++ b/base/applications/notepad/lang/fi-FI.rc @@ -142,7 +142,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "About ReactOS Notepad" FONT 8, "MS Shell Dlg" @@ -157,12 +157,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Sivu &s" /* FIXME */ diff --git a/base/applications/notepad/lang/fr-FR.rc b/base/applications/notepad/lang/fr-FR.rc index f4ecd46e3d1..fbc56254d78 100644 --- a/base/applications/notepad/lang/fr-FR.rc +++ b/base/applications/notepad/lang/fr-FR.rc @@ -143,7 +143,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Annuler", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "About ReactOS Notepad" FONT 8, "MS Shell Dlg" @@ -158,12 +158,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier tout en respectant les termes de la ""GNU General Public License"" publiée par la Free Software Foundation; dans sa version 2 (ou selon votre préférence) toute version ultérieure.\r\n\r\nCe programme est distribué dans l'espoir qu'il sera utile, cependant SANS GARANTIE D'AUCUNE SORTE ; sans même une garantie implicite de COMMERCIABILITÉ ou DE CONFORMITÉ À UNE UTILISATION PARTICULIÈRE. \r\n\r\nVoir la Licence Publique Générale GNU pour plus de détails. Vous devriez avoir reçu un exemplaire de la Licence Publique Générale GNU avec ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */ diff --git a/base/applications/notepad/lang/he-IL.rc b/base/applications/notepad/lang/he-IL.rc index b6730fca880..ad82510e028 100644 --- a/base/applications/notepad/lang/he-IL.rc +++ b/base/applications/notepad/lang/he-IL.rc @@ -144,7 +144,7 @@ DEFPUSHBUTTON "אישור", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "ביטול", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "אודות פנקס הרשימות של ReactOS" FONT 8, "MS Shell Dlg" @@ -159,12 +159,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "עמוד &s" /* FIXME */ diff --git a/base/applications/notepad/lang/hu-HU.rc b/base/applications/notepad/lang/hu-HU.rc index d0aa68a0287..de67972eeaa 100644 --- a/base/applications/notepad/lang/hu-HU.rc +++ b/base/applications/notepad/lang/hu-HU.rc @@ -144,7 +144,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "About ReactOS Notepad" FONT 8, "MS Shell Dlg" @@ -159,12 +159,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Oldalszám: &s." /* FIXME */ diff --git a/base/applications/notepad/lang/hy-AM.rc b/base/applications/notepad/lang/hy-AM.rc index 4f956e7939a..06da80a6102 100644 --- a/base/applications/notepad/lang/hy-AM.rc +++ b/base/applications/notepad/lang/hy-AM.rc @@ -125,7 +125,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Չնդունել", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "About ReactOS Notepad" FONT 8, "MS Shell Dlg" @@ -140,12 +140,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Էջ &s" /* FIXME */ diff --git a/base/applications/notepad/lang/id-ID.rc b/base/applications/notepad/lang/id-ID.rc index 1243da5c07f..be224229400 100644 --- a/base/applications/notepad/lang/id-ID.rc +++ b/base/applications/notepad/lang/id-ID.rc @@ -144,7 +144,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Batal", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Tentang ReactOS Notepad" FONT 8, "MS Shell Dlg" @@ -159,12 +159,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "Program ini adalah software bebas; anda dapat mendistribusikan dan/atau mengubahnya di bawah term GNU General Public License seperti dipublikasikan oleh Free Software Foundation; baik Lisensi versi 2, atau (menurut opini anda) setiap versi berikutnya.\r\n\r\nProgram ini didistribusikan dengan harapan ia akan berguna, tetapi TANPA JAMINAN APAPUN; bahkan tanpa jaminan berarti dari MERCANTABILITAS atau KECUKUPAN UNTUK KEPERLUAN TERTENTU. Lihat GNU General Public License untuk lebih jelasnya.\r\n\r\nAnda seharusnya menerima duplikat GNU General Public License bersamaan dengan program ini; jika tidak, tulis ke Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Halaman &s" /* FIXME */ diff --git a/base/applications/notepad/lang/it-IT.rc b/base/applications/notepad/lang/it-IT.rc index 9336afb67ee..9cb069fcedb 100644 --- a/base/applications/notepad/lang/it-IT.rc +++ b/base/applications/notepad/lang/it-IT.rc @@ -146,7 +146,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Annulla", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Informazioni su blocco note ReactOS" FONT 8, "MS Shell Dlg" @@ -161,12 +161,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "Questo programma è software libero; può redistribuirlo e/o modificarlo sotto\ni termini della licenza pubblica GNU come pubblicata dalla Free Software Foundation; sia la versione 2 sia una versione successiva (a sua scelta).\r\n\r\nQuesto programma è distribuito\nnella speranza che sia utile, ma SENZA ALCUNA GARANZIA; senza neanche la garanzia implicita\ndi NEGOZIABILITA' o APPLICABILITA' per un particolare scopo. Si veda la licenza generale pubblica GNU per maggiori dettagli.\r\n\r\nDovrebbe aver ricevuto una copia assieme a questo programma; se così non fosse, scriva alla Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Pagina &s" /* FIXME */ diff --git a/base/applications/notepad/lang/ja-JP.rc b/base/applications/notepad/lang/ja-JP.rc index 1cf74f17bba..af303fea7c6 100644 --- a/base/applications/notepad/lang/ja-JP.rc +++ b/base/applications/notepad/lang/ja-JP.rc @@ -143,7 +143,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "キャンセル", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS メモ帳について" FONT 9, "MS UI Gothic" @@ -158,12 +158,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "&s ページ" /* FIXME */ diff --git a/base/applications/notepad/lang/lt-LT.rc b/base/applications/notepad/lang/lt-LT.rc index 842b91d16eb..3099de13bbb 100644 --- a/base/applications/notepad/lang/lt-LT.rc +++ b/base/applications/notepad/lang/lt-LT.rc @@ -145,7 +145,7 @@ DEFPUSHBUTTON "Gerai", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Atsisakyti", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,290,170 +IDD_ABOUTBOX DIALOGEX 22,16,290,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Apie ReactOS Notepad" FONT 8, "MS Shell Dlg" @@ -160,12 +160,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Puslapis &s" /* FIXME */ diff --git a/base/applications/notepad/lang/nl-NL.rc b/base/applications/notepad/lang/nl-NL.rc index 241e596c100..de9af731184 100644 --- a/base/applications/notepad/lang/nl-NL.rc +++ b/base/applications/notepad/lang/nl-NL.rc @@ -141,7 +141,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "About ReactOS Notepad" FONT 8, "MS Shell Dlg" @@ -156,12 +156,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Pagina &s" /* FIXME */ diff --git a/base/applications/notepad/lang/no-NO.rc b/base/applications/notepad/lang/no-NO.rc index 8ed6da18a35..47c82586c38 100644 --- a/base/applications/notepad/lang/no-NO.rc +++ b/base/applications/notepad/lang/no-NO.rc @@ -143,7 +143,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Avbryt", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Om ReactOS Notisblokk" FONT 8, "MS Shell Dlg" @@ -158,12 +158,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "Dette programmet er gratis programvare; du kan distribuere det og/eller endre det under betingelsene av GNU General Public License som er utgitt av Free Software Foundation; version 2 av lisensen, eller (etter din mening) alle senere versjoner.\r\n\r\nDette programmet er utgitt i håp for at det skal kunne brukes, men DET ER INGEN GARANTIER; uten heller forutsatt garantier av SALGBARHET eller SIKKETHET FOR EN ENKELTHET FORMÅL. Se på GNU General Public Lisensen for mere detaljer.\r\n\r\nDu skal ha motatt en kopi av GNU General Public Lisensen sammen med denne programmet; hvis du ikke har motatt det, skriv til Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Side &r" /* FIXME */ diff --git a/base/applications/notepad/lang/pl-PL.rc b/base/applications/notepad/lang/pl-PL.rc index 119c47dc7ed..1337ef08b21 100644 --- a/base/applications/notepad/lang/pl-PL.rc +++ b/base/applications/notepad/lang/pl-PL.rc @@ -151,7 +151,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Anuluj", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Notatnik ReactOS" FONT 8, "MS Shell Dlg" @@ -166,12 +166,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "Niniejszy program jest wolnym oprogramowaniem; możesz go rozprowadzać dalej i/lub modyfikować na warunkach Powszechnej Licencji Publicznej GNU, wydanej przez Fundację Wolnego Oprogramowania - według wersji 2 tej Licencji lub (według twojego wyboru) którejś z późniejszych wersji.\r\n\r\nNiniejszy program rozpowszechniany jest z nadzieją, iż będzie on użyteczny - jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domyślnej gwarancji PRZYDATNOŚCI HANDLOWEJ albo PRZYDATNOŚCI DO OKREŚLONYCH ZASTOSOWAŃ. W celu uzyskania bliższych informacji sięgnij do Powszechnej Licencji Publicznej GNU.\r\n\r\nZ pewnością wraz z niniejszym programem otrzymałeś też egzemplarz Powszechnej Licencji Publicznej GNU (GNU General Public License); jeśli nie - napisz do Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Strona &s" /* FIXME */ diff --git a/base/applications/notepad/lang/pt-BR.rc b/base/applications/notepad/lang/pt-BR.rc index 157d6dab599..6ee4f267022 100644 --- a/base/applications/notepad/lang/pt-BR.rc +++ b/base/applications/notepad/lang/pt-BR.rc @@ -144,7 +144,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Cancelar", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Sobre Notepad ReactOS" FONT 8, "MS Shell Dlg" @@ -159,11 +159,11 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Página &s" /* FIXME */ diff --git a/base/applications/notepad/lang/pt-PT.rc b/base/applications/notepad/lang/pt-PT.rc index 157d6dab599..6ee4f267022 100644 --- a/base/applications/notepad/lang/pt-PT.rc +++ b/base/applications/notepad/lang/pt-PT.rc @@ -144,7 +144,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Cancelar", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Sobre Notepad ReactOS" FONT 8, "MS Shell Dlg" @@ -159,11 +159,11 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Página &s" /* FIXME */ diff --git a/base/applications/notepad/lang/ro-RO.rc b/base/applications/notepad/lang/ro-RO.rc index 497e01a8fb7..3e55488ce6a 100644 --- a/base/applications/notepad/lang/ro-RO.rc +++ b/base/applications/notepad/lang/ro-RO.rc @@ -143,7 +143,7 @@ DEFPUSHBUTTON "Con&firmă", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "A&nulează", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,294,170 +IDD_ABOUTBOX DIALOGEX 22,16,294,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Despre Carnețelul ReactOS" FONT 8, "MS Shell Dlg" @@ -157,12 +157,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "Tradus în limba română de Petru Dimitriu.\r\nAceastă aplicație este publică; fiind permisă modificarea și/sau (re)distribuția sa în termenii Licenței Publice Generale GNU publicată de Free Software Foundation; sau versiunea 2 a Licenței, sau (la alegere) a oricărei versiuni ulterioare.\r\n\r\nAceastă aplicație este distribuită doar în speranța de a fi utilă, FĂRĂ însă NICI O GARANȚIE; nici măcar cu garanția implicită a VANDABILITĂȚII sau a UTILITĂȚII ÎNTR-UN SCOP ANUME. Pentru mai multe detalii consultați Licența Publică Generală GNU.\r\n\r\nPuteți vedea această licență aici:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nDe asemenea puteți consulta traduceri neoficiale ale acestei licențe aici:\r\nhttp://www.gnu.org/licenses/translations.html" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Pagină &s" /* FIXME */ diff --git a/base/applications/notepad/lang/ru-RU.rc b/base/applications/notepad/lang/ru-RU.rc index 97269acdea7..5dcf6dcfcda 100644 --- a/base/applications/notepad/lang/ru-RU.rc +++ b/base/applications/notepad/lang/ru-RU.rc @@ -143,7 +143,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Отмена", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "О программе Блокнот ReactOS" FONT 8, "MS Shell Dlg" @@ -158,12 +158,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "Эта программа является свободно распространяемой; Вы можете распространять ее повторно и (или) изменять, соблюдая условия Открытого лицензионного соглашения GNU, опубликованного Фондом свободно распространяемого программного обеспечения; либо редакции 2 Соглашения, либо (на ваше усмотрение) любой редакции, выпущенной позже.\r\n\r\nЭта программа распространяется в надежде на то, что она окажется полезной, но БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ, включая подразумеваемую гарантию КАЧЕСТВА либо ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННЫХ ЦЕЛЕЙ. Подробности содержатся в Открытом лицензионном соглашении GNU.\r\n\r\nВместе с этой программой должен распространяться экземпляр Открытого лицензионного соглашения GNU, если он отсутствует, сообщите об этом в Фонд свободно распространяемого программного обеспечения (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Страница &s" /* FIXME */ diff --git a/base/applications/notepad/lang/sk-SK.rc b/base/applications/notepad/lang/sk-SK.rc index aff5667c987..c3e300c6cf2 100644 --- a/base/applications/notepad/lang/sk-SK.rc +++ b/base/applications/notepad/lang/sk-SK.rc @@ -129,7 +129,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Zrušiť", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Čo je Poznámkový blok systému ReactOS" FONT 8, "MS Shell Dlg" @@ -144,12 +144,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "Tento program je voľný softvér; môžete ho šíriť a/alebo modifikovať podľa podmienok GNU Všeobecnej verejnej licencie (GNU General Public License) ako bola zverejnená nadáciou Free Software Foundation; buď verzie 2 tejto licencie, alebo (podľa Vášho uváženia) niektorej neskoršej verzie.\r\n\r\nTento program je distribuovaný v nádeji, že bude užitočný, avšak BEZ AKEJKOĽVEK ZÁRUKY; rovnako bez záruky PREDAJNOSTI alebo VHODNOSTI PRE URČITÝ ÚČEL. Pre viac detailov si pozrite GNU Všeobecnú verejnú licenciu (GNU General Public License).\r\n\r\nKópiu Všeobecnej verejnej licencie GNU ste mali dostať spolu s týmto programom; ak nie, napíšte si o ňu na Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Strana &s" /* FIXME */ diff --git a/base/applications/notepad/lang/sl-SI.rc b/base/applications/notepad/lang/sl-SI.rc index 6bcaa5e25aa..ece3261f98c 100644 --- a/base/applications/notepad/lang/sl-SI.rc +++ b/base/applications/notepad/lang/sl-SI.rc @@ -141,7 +141,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "About ReactOS Notepad" FONT 8, "MS Shell Dlg" @@ -156,12 +156,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Stran &s" /* FIXME */ diff --git a/base/applications/notepad/lang/sv-SE.rc b/base/applications/notepad/lang/sv-SE.rc index f53b077c903..273dbaf586b 100644 --- a/base/applications/notepad/lang/sv-SE.rc +++ b/base/applications/notepad/lang/sv-SE.rc @@ -144,7 +144,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Avbryt", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Om ReactOS Anteckningar" FONT 8, "MS Shell Dlg" @@ -159,12 +159,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" STRING_PAGESETUP_FOOTERVALUE, "Sida &s" diff --git a/base/applications/notepad/lang/th-TH.rc b/base/applications/notepad/lang/th-TH.rc index 376981fa238..d202137d137 100644 --- a/base/applications/notepad/lang/th-TH.rc +++ b/base/applications/notepad/lang/th-TH.rc @@ -141,7 +141,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Cancel", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "About ReactOS Notepad" FONT 8, "MS Shell Dlg" @@ -156,12 +156,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "หน้า &s" /* FIXME */ diff --git a/base/applications/notepad/lang/tr-TR.rc b/base/applications/notepad/lang/tr-TR.rc index b48c0ff73a1..d18dc0e71dc 100644 --- a/base/applications/notepad/lang/tr-TR.rc +++ b/base/applications/notepad/lang/tr-TR.rc @@ -50,7 +50,7 @@ BEGIN MENUITEM SEPARATOR MENUITEM "&Sayfa Yapısı...", CMD_PAGE_SETUP MENUITEM "Ya&zdır...\tCtrl+P", CMD_PRINT - MENUITEM "Yaz&ıcı Seçenekleri...", CMD_PRINTER_SETUP + MENUITEM "Yaz&ıcı Ayarları...", CMD_PRINTER_SETUP MENUITEM SEPARATOR MENUITEM "&Çıkış", CMD_EXIT END @@ -113,7 +113,7 @@ LTEXT "Alt:", 0x14E, 100, 73, 30, 10, WS_CHILD EDITTEXT /*STRING_PAGESETUP_BOTTOMVALUE,*/ 0x150, 130, 73, 35, 11, WS_CHILD | WS_BORDER | WS_TABSTOP DEFPUSHBUTTON "Tamam", IDOK, 180, 3, 40, 15, WS_TABSTOP -PUSHBUTTON "Vazgeç", IDCANCEL, 180, 21, 40, 15, WS_TABSTOP +PUSHBUTTON "İptal", IDCANCEL, 180, 21, 40, 15, WS_TABSTOP PUSHBUTTON "Yardım", IDHELP, 180, 39, 40, 15, WS_TABSTOP END @@ -138,10 +138,10 @@ BEGIN EDITTEXT ID_LINENUMBER,54,10,106,12,WS_CHILD | WS_BORDER | WS_TABSTOP LTEXT "Yataç Numarası:",0x155,5,12,41,12,WS_CHILD | WS_TABSTOP | ES_NUMBER DEFPUSHBUTTON "Tamam",IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP -PUSHBUTTON "Vazgeç",IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP +PUSHBUTTON "İptal",IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Metin Düzenleyicisi Hakkında" FONT 8, "MS Shell Dlg" @@ -156,12 +156,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN - STRING_LICENSE, "ÖNEMLİ: Aşağıdaki metin, özgün metnin resmî olmayan çevirisidir. Çeviri metniyle özgün metin arasında ayrım olabilir. Özgün metin, çeviri metninin altındadır.\r\n\r\n***\r\n\r\nBu yazılım özgürdür, yâni bu yazılımı Özgür Yazılım Vakfı'nın yayınladığı GNU Umûmî Kamu Lisansı'nın 2. sürümü veyâ daha sonraki sürümleri altında yeniden dağıtabilir veyâ değiştirebilirsiniz.\r\n\r\nBu yazılım, kullanışlı olabileceği beklentisiyle dağıtılmıştır ancak bilhassa SATILABİLİRLİK ve BELİRLİ BİR AMACA UYGUNLUK açısından olmak üzere bu yazılımın HİÇBİR GÜVENCESİ YOKTUR. Daha çok bilgi için GNU Umûmî Kamu Lisansı'na bakınız.\r\n\r\nBu yazılımla birlikte GNU Umûmî Kamu Lisansı'nın bir sûretine de iye olmanız gerekir, eğer yoksa Özgür Yazılım Vakfı A.Ş.'ne (51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ABD) yazınız.\r\n\r\n***\r\n\r\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + STRING_LICENSE, "ÖNEMLİ: Aşağıdaki metin, özgün metnin resmî olmayan çevirisidir. Çeviri metniyle özgün metin arasında ayrım olabilir. Özgün metin, çeviri metninin altındadır.\r\n\r\n***\r\n\r\nBu yazılım özgürdür, yâni bu yazılımı Özgür Yazılım Vakfı'nın yayınladığı GNU Umûmî Kamu Ruhsatı'nın 2. sürümü veyâ daha sonraki sürümleri altında yeniden dağıtabilir veyâ değiştirebilirsiniz.\r\n\r\nBu yazılım, kullanışlı olabileceği beklentisiyle dağıtılmıştır ancak bilhassa SATILABİLİRLİK ve BELİRLİ BİR AMACA UYGUNLUK açısından olmak üzere bu yazılımın HİÇBİR GÜVENCESİ YOKTUR. Daha çok bilgi için GNU Umûmî Kamu Ruhsatı'na bakınız.\r\n\r\nBu yazılımla birlikte GNU Umûmî Kamu Ruhsatı'nın bir sûretine de iye olmanız gerekir, eğer yoksa Özgür Yazılım Vakfı A.Ş.'ne (51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ABD) yazınız.\r\n\r\n***\r\n\r\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Sayfa &s" /* FIXME */ @@ -191,8 +191,8 @@ STRING_ANSI, "ANSI" STRING_UNICODE, "Unikod" STRING_UNICODE_BE, "Unikod (Büyük Sonlu)" STRING_UTF8, "UTF-8" -STRING_CRLF, "Windows" -STRING_LF, "UNIX" -STRING_CR, "Mac" +STRING_CRLF, "Pencereler (CR + LF)" +STRING_LF, "UNIX (LF)" +STRING_CR, "Mac (CR)" STRING_LINE_COLUMN, "%d. Yataç, %d. Dikeç" END diff --git a/base/applications/notepad/lang/uk-UA.rc b/base/applications/notepad/lang/uk-UA.rc index f8de0caabce..446d6ed39f3 100644 --- a/base/applications/notepad/lang/uk-UA.rc +++ b/base/applications/notepad/lang/uk-UA.rc @@ -142,7 +142,7 @@ DEFPUSHBUTTON "OK", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "Скасувати", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Про Блокнот ReactOS" FONT 8, "MS Shell Dlg" @@ -157,12 +157,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "Це вільне програмне забезпечення; Ви можете розповсюджувати її та змінювати, дотримуючись умови Відкритої ліцензійної угоди GNU, опублікованої Фондом вільного програмного забезпечення; або редакції 2 Угоди, або будь-якої редакції, випущеної пізніше.\r\n\r\nЦя програма розповсюджується в надії на те, що вона виявиться корисною, але БЕЗ БУДЬ-ЯКИХ ГАРАНТІЙ, включаючи УЯВНОЮ ГАРАНТІЄЮ ЯКОСТІ або ПРИДАТНОСТІ для певних цілей. Подробиці містяться у Відкритій ліцензійній угоді GNU.\r\n\r\nРазом з цією програмою повинен поширюватися примірник Відкритої ліцензійної угоди GNU. Якщо він відсутній, повідомте про це в Фонд вільного програмного забезпечення (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Сторінка &s" /* FIXME */ diff --git a/base/applications/notepad/lang/zh-CN.rc b/base/applications/notepad/lang/zh-CN.rc index 7a6c90d8732..2ac9acb57af 100644 --- a/base/applications/notepad/lang/zh-CN.rc +++ b/base/applications/notepad/lang/zh-CN.rc @@ -142,7 +142,7 @@ DEFPUSHBUTTON "确定", IDOK, 75, 30, 40, 15, WS_CHILD | WS_TABSTOP PUSHBUTTON "取消", IDCANCEL, 120, 30, 40, 15, WS_CHILD | WS_TABSTOP END -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22,16,284,170 +IDD_ABOUTBOX DIALOGEX 22,16,284,170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "关于 ReactOS 记事本" FONT 8, "MS Shell Dlg" @@ -157,12 +157,12 @@ BEGIN ES_READONLY | WS_VSCROLL END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_LICENSE, "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_PAGESETUP_HEADERVALUE, "&n" /* FIXME */ STRING_PAGESETUP_FOOTERVALUE, "Page &s" /* FIXME */ diff --git a/base/applications/notepad/rsrc.rc b/base/applications/notepad/rsrc.rc index ed7a79e500c..21d04254c6e 100644 --- a/base/applications/notepad/rsrc.rc +++ b/base/applications/notepad/rsrc.rc @@ -28,9 +28,10 @@ #include - IDI_NPICON ICON "res/notepad.ico" +#include + // UTF-8 #pragma code_page(65001) #ifdef LANGUAGE_BG_BG diff --git a/base/applications/rapps/lang/bg-BG.rc b/base/applications/rapps/lang/bg-BG.rc index a31a26f1294..2b2414726a1 100644 --- a/base/applications/rapps/lang/bg-BG.rc +++ b/base/applications/rapps/lang/bg-BG.rc @@ -56,7 +56,7 @@ BEGIN END END -IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 254, 144 +IDD_SETTINGS_DIALOG DIALOGEX 0, 0, 254, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Настройки" FONT 8, "MS Shell Dlg" @@ -77,7 +77,7 @@ BEGIN PUSHBUTTON "Отказ", IDCANCEL, 181, 124, 60, 14 END -IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97 +IDD_INSTALL_DIALOG DIALOGEX 0, 0, 216, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Слагане на приложение" FONT 8, "MS Shell Dlg" @@ -91,7 +91,7 @@ BEGIN PUSHBUTTON "Отказ", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 76 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "Сваляне" FONT 8, "MS Shell Dlg" @@ -111,7 +111,7 @@ BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_INSTALL "Слагане" IDS_TOOLTIP_UNINSTALL "Махане" @@ -121,14 +121,14 @@ BEGIN IDS_TOOLTIP_EXIT "Изход" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_NAME "Име" IDS_APP_INST_VERSION "Издание" IDS_APP_DESCRIPTION "Описание" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INFO_VERSION "\nВерсия: " IDS_INFO_DESCRIPTION "\nОписание: " @@ -149,7 +149,7 @@ BEGIN IDS_INFO_INSTALLDATE "\nДата на слагане: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AINFO_VERSION "\nВерсия: " IDS_AINFO_DESCRIPTION "\nОписание: " @@ -158,7 +158,7 @@ BEGIN IDS_AINFO_LICENCE "\nРазрешително: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CAT_AUDIO "Звук" IDS_CAT_DEVEL "Разработка" @@ -177,7 +177,7 @@ BEGIN IDS_CAT_VIDEO "Видео" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "Управителят за приложения на РеактОС" IDS_SEARCH_TEXT "Търсене" diff --git a/base/applications/rapps/lang/cs-CZ.rc b/base/applications/rapps/lang/cs-CZ.rc index 897f07a62d8..7ae76122465 100644 --- a/base/applications/rapps/lang/cs-CZ.rc +++ b/base/applications/rapps/lang/cs-CZ.rc @@ -57,7 +57,7 @@ BEGIN END END -IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144 +IDD_SETTINGS_DIALOG DIALOGEX 0, 0, 250, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Nastavení" FONT 8, "MS Shell Dlg" @@ -78,7 +78,7 @@ BEGIN PUSHBUTTON "Storno", IDCANCEL, 181, 124, 60, 14 END -IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97 +IDD_INSTALL_DIALOG DIALOGEX 0, 0, 216, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalace programu" FONT 8, "MS Shell Dlg" @@ -92,7 +92,7 @@ BEGIN PUSHBUTTON "Storno", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 76 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "Stahování..." FONT 8, "MS Shell Dlg" @@ -112,7 +112,7 @@ BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_INSTALL "Instalovat" IDS_TOOLTIP_UNINSTALL "Odinstalovat" @@ -122,14 +122,14 @@ BEGIN IDS_TOOLTIP_EXIT "Konec" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_NAME "Název" IDS_APP_INST_VERSION "Verze" IDS_APP_DESCRIPTION "Popis" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INFO_VERSION "\nVerze: " IDS_INFO_DESCRIPTION "\nPopis: " @@ -150,7 +150,7 @@ BEGIN IDS_INFO_INSTALLDATE "\nDatum instalace: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AINFO_VERSION "\nVerze: " IDS_AINFO_DESCRIPTION "\nPopis: " @@ -159,7 +159,7 @@ BEGIN IDS_AINFO_LICENCE "\nLicence: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CAT_AUDIO "Audio" IDS_CAT_DEVEL "Vývoj" @@ -178,7 +178,7 @@ BEGIN IDS_CAT_VIDEO "Video" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS Manažer aplikací" IDS_SEARCH_TEXT "Hledat..." diff --git a/base/applications/rapps/lang/de-DE.rc b/base/applications/rapps/lang/de-DE.rc index cb449ca59ad..583796826e9 100644 --- a/base/applications/rapps/lang/de-DE.rc +++ b/base/applications/rapps/lang/de-DE.rc @@ -52,7 +52,7 @@ BEGIN END END -IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144 +IDD_SETTINGS_DIALOG DIALOGEX 0, 0, 250, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Einstellungen" FONT 8, "MS Shell Dlg" @@ -73,7 +73,7 @@ BEGIN PUSHBUTTON "Abbrechen", IDCANCEL, 181, 124, 60, 14 END -IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97 +IDD_INSTALL_DIALOG DIALOGEX 0, 0, 216, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Programminstallation" FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN PUSHBUTTON "Abbrechen", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 76 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "Herunterladen..." FONT 8, "MS Shell Dlg" @@ -107,7 +107,7 @@ BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_INSTALL "Installieren" IDS_TOOLTIP_UNINSTALL "Deinstallieren" @@ -117,14 +117,14 @@ BEGIN IDS_TOOLTIP_EXIT "Beenden" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_NAME "Name" IDS_APP_INST_VERSION "Version" IDS_APP_DESCRIPTION "Beschreibung" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INFO_VERSION "\nVersion: " IDS_INFO_DESCRIPTION "\nBeschreibung: " @@ -145,7 +145,7 @@ BEGIN IDS_INFO_INSTALLDATE "\nInstallationsdatum: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AINFO_VERSION "\nVersion: " IDS_AINFO_DESCRIPTION "\nBeschreibung: " @@ -154,7 +154,7 @@ BEGIN IDS_AINFO_LICENCE "\nLizenz: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CAT_AUDIO "Audio" IDS_CAT_DEVEL "Entwicklung" @@ -173,7 +173,7 @@ BEGIN IDS_CAT_VIDEO "Video" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS-Anwendungsmanager" IDS_SEARCH_TEXT "Suche..." diff --git a/base/applications/rapps/lang/en-US.rc b/base/applications/rapps/lang/en-US.rc index 8b90229563b..86fdd694807 100644 --- a/base/applications/rapps/lang/en-US.rc +++ b/base/applications/rapps/lang/en-US.rc @@ -52,7 +52,7 @@ BEGIN END END -IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144 +IDD_SETTINGS_DIALOG DIALOGEX 0, 0, 250, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Settings" FONT 8, "MS Shell Dlg" @@ -73,7 +73,7 @@ BEGIN PUSHBUTTON "Cancel", IDCANCEL, 181, 124, 60, 14 END -IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97 +IDD_INSTALL_DIALOG DIALOGEX 0, 0, 216, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Program installation" FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN PUSHBUTTON "Cancel", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 76 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "Download..." FONT 8, "MS Shell Dlg" @@ -107,7 +107,7 @@ BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_INSTALL "Install" IDS_TOOLTIP_UNINSTALL "Uninstall" @@ -117,14 +117,14 @@ BEGIN IDS_TOOLTIP_EXIT "Exit" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_NAME "Name" IDS_APP_INST_VERSION "Version" IDS_APP_DESCRIPTION "Description" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INFO_VERSION "\nVersion: " IDS_INFO_DESCRIPTION "\nDescription: " @@ -145,7 +145,7 @@ BEGIN IDS_INFO_INSTALLDATE "\nInstall Date: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AINFO_VERSION "\nVersion: " IDS_AINFO_DESCRIPTION "\nDescription: " @@ -154,7 +154,7 @@ BEGIN IDS_AINFO_LICENCE "\nLicence: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CAT_AUDIO "Audio" IDS_CAT_DEVEL "Development" @@ -173,7 +173,7 @@ BEGIN IDS_CAT_VIDEO "Video" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS Applications Manager" IDS_SEARCH_TEXT "Search..." diff --git a/base/applications/rapps/lang/es-ES.rc b/base/applications/rapps/lang/es-ES.rc index 7ec5ac31d21..e4298123b94 100644 --- a/base/applications/rapps/lang/es-ES.rc +++ b/base/applications/rapps/lang/es-ES.rc @@ -52,7 +52,7 @@ BEGIN END END -IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144 +IDD_SETTINGS_DIALOG DIALOGEX 0, 0, 250, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Ajustes" FONT 8, "MS Shell Dlg" @@ -73,7 +73,7 @@ BEGIN PUSHBUTTON "Cancelar", IDCANCEL, 181, 124, 60, 14 END -IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97 +IDD_INSTALL_DIALOG DIALOGEX 0, 0, 216, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalar programas" FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN PUSHBUTTON "Cancelas", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 76 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "Descargar..." FONT 8, "MS Shell Dlg" @@ -107,7 +107,7 @@ BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_INSTALL "Instalar" IDS_TOOLTIP_UNINSTALL "Desinstalar" @@ -117,14 +117,14 @@ BEGIN IDS_TOOLTIP_EXIT "Salir" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_NAME "Nombre" IDS_APP_INST_VERSION "Versión" IDS_APP_DESCRIPTION "Descripción" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INFO_VERSION "\nVersión: " IDS_INFO_DESCRIPTION "\nDescripción: " @@ -145,7 +145,7 @@ BEGIN IDS_INFO_INSTALLDATE "\nFecha instalación: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AINFO_VERSION "\nVersión: " IDS_AINFO_DESCRIPTION "\nDescripción: " @@ -154,7 +154,7 @@ BEGIN IDS_AINFO_LICENCE "\nLicencia: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CAT_AUDIO "Audio" IDS_CAT_DEVEL "Desarrollo" @@ -173,7 +173,7 @@ BEGIN IDS_CAT_VIDEO "Video" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS Applications Manager" IDS_SEARCH_TEXT "Buscar..." diff --git a/base/applications/rapps/lang/fr-FR.rc b/base/applications/rapps/lang/fr-FR.rc index 878893a0dd2..93f7f4a8ddf 100644 --- a/base/applications/rapps/lang/fr-FR.rc +++ b/base/applications/rapps/lang/fr-FR.rc @@ -52,7 +52,7 @@ BEGIN END END -IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144 +IDD_SETTINGS_DIALOG DIALOGEX 0, 0, 250, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Configuration" FONT 8, "MS Shell Dlg" @@ -73,7 +73,7 @@ BEGIN PUSHBUTTON "Annuler", IDCANCEL, 181, 124, 60, 14 END -IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97 +IDD_INSTALL_DIALOG DIALOGEX 0, 0, 216, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Installation de programme" FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN PUSHBUTTON "Annuler", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 76 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "Télécharger..." FONT 8, "MS Shell Dlg" @@ -107,7 +107,7 @@ BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_INSTALL "Installer" IDS_TOOLTIP_UNINSTALL "Désinstaller" @@ -117,14 +117,14 @@ BEGIN IDS_TOOLTIP_EXIT "Sortir" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_NAME "Nom" IDS_APP_INST_VERSION "Version" IDS_APP_DESCRIPTION "Description" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INFO_VERSION "\nVersion : " IDS_INFO_DESCRIPTION "\nDescription : " @@ -145,7 +145,7 @@ BEGIN IDS_INFO_INSTALLDATE "\nDate d'installation : " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AINFO_VERSION "\nVersion : " IDS_AINFO_DESCRIPTION "\nDescription : " @@ -154,7 +154,7 @@ BEGIN IDS_AINFO_LICENCE "\nLicence : " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CAT_AUDIO "Audio" IDS_CAT_DEVEL "Développement" @@ -173,7 +173,7 @@ BEGIN IDS_CAT_VIDEO "Vidéo" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS Applications Manager" IDS_SEARCH_TEXT "Chercher..." diff --git a/base/applications/rapps/lang/he-IL.rc b/base/applications/rapps/lang/he-IL.rc index 827298aaa61..b383884de01 100644 --- a/base/applications/rapps/lang/he-IL.rc +++ b/base/applications/rapps/lang/he-IL.rc @@ -53,7 +53,7 @@ BEGIN END END -IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144 +IDD_SETTINGS_DIALOG DIALOGEX 0, 0, 250, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "הגדרות" FONT 8, "MS Shell Dlg" @@ -74,7 +74,7 @@ BEGIN PUSHBUTTON "ביטול", IDCANCEL, 181, 124, 60, 14 END -IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97 +IDD_INSTALL_DIALOG DIALOGEX 0, 0, 216, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "התקנת תכנית" FONT 8, "MS Shell Dlg" @@ -88,7 +88,7 @@ BEGIN PUSHBUTTON "ביטול", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 76 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "הורדה..." FONT 8, "MS Shell Dlg" @@ -108,7 +108,7 @@ BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_INSTALL "התקנה" IDS_TOOLTIP_UNINSTALL "הסרה" @@ -118,14 +118,14 @@ BEGIN IDS_TOOLTIP_EXIT "יציאה" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_NAME "שם" IDS_APP_INST_VERSION "גרסה" IDS_APP_DESCRIPTION "תיאור" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INFO_VERSION "\nגרסה: " IDS_INFO_DESCRIPTION "\nתאור: " @@ -146,7 +146,7 @@ BEGIN IDS_INFO_INSTALLDATE "\nתאריך התקנה: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AINFO_VERSION "\nגרסה: " IDS_AINFO_DESCRIPTION "\nתיאור: " @@ -155,7 +155,7 @@ BEGIN IDS_AINFO_LICENCE "\nרישיון: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CAT_AUDIO "צלילים" IDS_CAT_DEVEL "פיתוח" @@ -174,7 +174,7 @@ BEGIN IDS_CAT_VIDEO "וידאו" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "מנהל היישומים של ReactOS" IDS_SEARCH_TEXT "חפש..." diff --git a/base/applications/rapps/lang/it-IT.rc b/base/applications/rapps/lang/it-IT.rc index 8e749c97c22..47ce01e49ad 100644 --- a/base/applications/rapps/lang/it-IT.rc +++ b/base/applications/rapps/lang/it-IT.rc @@ -52,7 +52,7 @@ BEGIN END END -IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144 +IDD_SETTINGS_DIALOG DIALOGEX 0, 0, 250, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Impostazioni" FONT 8, "MS Shell Dlg" @@ -73,7 +73,7 @@ BEGIN PUSHBUTTON "Annulla", IDCANCEL, 181, 124, 60, 14 END -IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97 +IDD_INSTALL_DIALOG DIALOGEX 0, 0, 216, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Installazione" FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN PUSHBUTTON "Annulla", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 76 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "Download in corso" FONT 8, "MS Shell Dlg" @@ -107,7 +107,7 @@ BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_INSTALL "Installa" IDS_TOOLTIP_UNINSTALL "Disinstalla" @@ -117,14 +117,14 @@ BEGIN IDS_TOOLTIP_EXIT "Esci" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_NAME "Nome" IDS_APP_INST_VERSION "Versione" IDS_APP_DESCRIPTION "Descrizione" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INFO_VERSION "\nVersione: " IDS_INFO_DESCRIPTION "\nDescrizione: " @@ -145,7 +145,7 @@ BEGIN IDS_INFO_INSTALLDATE "\nData installazione: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AINFO_VERSION "\nVersione: " IDS_AINFO_DESCRIPTION "\nDescrizione: " @@ -154,7 +154,7 @@ BEGIN IDS_AINFO_LICENCE "\nLicenza: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CAT_AUDIO "Audio" IDS_CAT_DEVEL "Sviluppo" @@ -173,7 +173,7 @@ BEGIN IDS_CAT_VIDEO "Video" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS Gestione applicazioni" IDS_SEARCH_TEXT "Cerca..." diff --git a/base/applications/rapps/lang/ja-JP.rc b/base/applications/rapps/lang/ja-JP.rc index c22ffda7d27..614fe0dd535 100644 --- a/base/applications/rapps/lang/ja-JP.rc +++ b/base/applications/rapps/lang/ja-JP.rc @@ -52,7 +52,7 @@ BEGIN END END -IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144 +IDD_SETTINGS_DIALOG DIALOGEX 0, 0, 250, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "設定" FONT 9, "MS UI Gothic" @@ -73,7 +73,7 @@ BEGIN PUSHBUTTON "キャンセル", IDCANCEL, 181, 124, 60, 14 END -IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97 +IDD_INSTALL_DIALOG DIALOGEX 0, 0, 216, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "プログラムのインストール" FONT 9, "MS UI Gothic" @@ -87,7 +87,7 @@ BEGIN PUSHBUTTON "キャンセル", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 76 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "ダウンロード..." FONT 9, "MS UI Gothic" @@ -107,7 +107,7 @@ BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_INSTALL "インストール" IDS_TOOLTIP_UNINSTALL "アンインストール" @@ -117,14 +117,14 @@ BEGIN IDS_TOOLTIP_EXIT "終了" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_NAME "名前" IDS_APP_INST_VERSION "バージョン" IDS_APP_DESCRIPTION "概要" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INFO_VERSION "\nバージョン: " IDS_INFO_DESCRIPTION "\n概要: " @@ -145,7 +145,7 @@ BEGIN IDS_INFO_INSTALLDATE "\nインストールした日付: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AINFO_VERSION "\nバージョン: " IDS_AINFO_DESCRIPTION "\n概要: " @@ -154,7 +154,7 @@ BEGIN IDS_AINFO_LICENCE "\nライセンス: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CAT_AUDIO "オーディオ" IDS_CAT_DEVEL "開発" @@ -173,7 +173,7 @@ BEGIN IDS_CAT_VIDEO "ビデオ" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS アプリケーション マネージャ" IDS_SEARCH_TEXT "検索..." diff --git a/base/applications/rapps/lang/no-NO.rc b/base/applications/rapps/lang/no-NO.rc index 0d05e00c245..6b2b2315299 100644 --- a/base/applications/rapps/lang/no-NO.rc +++ b/base/applications/rapps/lang/no-NO.rc @@ -52,7 +52,7 @@ BEGIN END END -IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144 +IDD_SETTINGS_DIALOG DIALOGEX 0, 0, 250, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Settings" FONT 8, "MS Shell Dlg" @@ -73,7 +73,7 @@ BEGIN PUSHBUTTON "Cancel", IDCANCEL, 181, 124, 60, 14 END -IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97 +IDD_INSTALL_DIALOG DIALOGEX 0, 0, 216, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Program installation" FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN PUSHBUTTON "Cancel", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 76 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "Lastet ned..." FONT 8, "MS Shell Dlg" @@ -107,7 +107,7 @@ BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_INSTALL "Installere" IDS_TOOLTIP_UNINSTALL "Avinstallere" @@ -117,14 +117,14 @@ BEGIN IDS_TOOLTIP_EXIT "Avslutt" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_NAME "Navn" IDS_APP_INST_VERSION "Versjon" IDS_APP_DESCRIPTION "Beskrivelse" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INFO_VERSION "\nVersjon: " IDS_INFO_DESCRIPTION "\nBeskrivelse: " @@ -145,7 +145,7 @@ BEGIN IDS_INFO_INSTALLDATE "\nInstallert dato: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AINFO_VERSION "\nVersjon: " IDS_AINFO_DESCRIPTION "\nBeskrivelse: " @@ -154,7 +154,7 @@ BEGIN IDS_AINFO_LICENCE "\nLisens: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CAT_AUDIO "Lyd" IDS_CAT_DEVEL "Utvikling" @@ -173,7 +173,7 @@ BEGIN IDS_CAT_VIDEO "Filmer" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS programbehandler" IDS_SEARCH_TEXT "Søk..." diff --git a/base/applications/rapps/lang/pl-PL.rc b/base/applications/rapps/lang/pl-PL.rc index 7dca4d4ba67..b1840fa92ff 100644 --- a/base/applications/rapps/lang/pl-PL.rc +++ b/base/applications/rapps/lang/pl-PL.rc @@ -60,7 +60,7 @@ BEGIN END END -IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144 +IDD_SETTINGS_DIALOG DIALOGEX 0, 0, 250, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Ustawienia" FONT 8, "MS Shell Dlg" @@ -81,7 +81,7 @@ BEGIN PUSHBUTTON "Anuluj", IDCANCEL, 181, 124, 60, 14 END -IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97 +IDD_INSTALL_DIALOG DIALOGEX 0, 0, 216, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalacja programu" FONT 8, "MS Shell Dlg" @@ -95,7 +95,7 @@ BEGIN PUSHBUTTON "Anuluj", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 76 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "Ściągnij..." FONT 8, "MS Shell Dlg" @@ -115,7 +115,7 @@ BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_INSTALL "Instaluj" IDS_TOOLTIP_UNINSTALL "Odinstaluj" @@ -125,14 +125,14 @@ BEGIN IDS_TOOLTIP_EXIT "Wyjście" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_NAME "Nazwa" IDS_APP_INST_VERSION "Wersja" IDS_APP_DESCRIPTION "Opis" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INFO_VERSION "\nWersja: " IDS_INFO_DESCRIPTION "\nOpis: " @@ -153,7 +153,7 @@ BEGIN IDS_INFO_INSTALLDATE "\nData instalacji: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AINFO_VERSION "\nWersja: " IDS_AINFO_DESCRIPTION "\nOpis: " @@ -162,7 +162,7 @@ BEGIN IDS_AINFO_LICENCE "\nLicencja: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CAT_AUDIO "Dźwięk" IDS_CAT_DEVEL "Programowanie" @@ -181,7 +181,7 @@ BEGIN IDS_CAT_VIDEO "Wideo" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "Menedżer aplikacji ReactOS" IDS_SEARCH_TEXT "Szukaj..." diff --git a/base/applications/rapps/lang/pt-BR.rc b/base/applications/rapps/lang/pt-BR.rc index eb574111b4c..03b52adc127 100644 --- a/base/applications/rapps/lang/pt-BR.rc +++ b/base/applications/rapps/lang/pt-BR.rc @@ -54,7 +54,7 @@ BEGIN END END -IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144 +IDD_SETTINGS_DIALOG DIALOGEX 0, 0, 250, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Configurações" FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN PUSHBUTTON "Cancelar", IDCANCEL, 181, 124, 60, 14 END -IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97 +IDD_INSTALL_DIALOG DIALOGEX 0, 0, 216, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalação do programa" FONT 8, "MS Shell Dlg" @@ -89,7 +89,7 @@ BEGIN PUSHBUTTON "Cancelar", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 76 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "Download..." FONT 8, "MS Shell Dlg" @@ -109,7 +109,7 @@ BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_INSTALL "Instalar" IDS_TOOLTIP_UNINSTALL "Desinstalar" @@ -119,14 +119,14 @@ BEGIN IDS_TOOLTIP_EXIT "Sair" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_NAME "Nome" IDS_APP_INST_VERSION "Versão" IDS_APP_DESCRIPTION "Descrição" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INFO_VERSION "\nVersão: " IDS_INFO_DESCRIPTION "\nDescrição: " @@ -147,7 +147,7 @@ BEGIN IDS_INFO_INSTALLDATE "\nData de Instalação: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AINFO_VERSION "\nVersão: " IDS_AINFO_DESCRIPTION "\nDescrição: " @@ -156,7 +156,7 @@ BEGIN IDS_AINFO_LICENCE "\nLicença: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CAT_AUDIO "Áudio" IDS_CAT_DEVEL "Desenvolvimento" @@ -175,7 +175,7 @@ BEGIN IDS_CAT_VIDEO "Vídeo" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "Central de Aplicativos ReactOS" IDS_SEARCH_TEXT "Procurar..." diff --git a/base/applications/rapps/lang/ro-RO.rc b/base/applications/rapps/lang/ro-RO.rc index 3d981d79905..9895fc5fb51 100644 --- a/base/applications/rapps/lang/ro-RO.rc +++ b/base/applications/rapps/lang/ro-RO.rc @@ -59,7 +59,7 @@ BEGIN END END -IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144 +IDD_SETTINGS_DIALOG DIALOGEX 0, 0, 250, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Preferințe" FONT 8, "MS Shell Dlg" @@ -80,7 +80,7 @@ BEGIN PUSHBUTTON "A&nulează", IDCANCEL, 181, 124, 60, 14 END -IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97 +IDD_INSTALL_DIALOG DIALOGEX 0, 0, 216, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalare aplicație" FONT 8, "MS Shell Dlg" @@ -94,7 +94,7 @@ BEGIN PUSHBUTTON "A&nulează", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 76 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "Descărcare…" FONT 8, "MS Shell Dlg" @@ -114,7 +114,7 @@ BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_INSTALL "Instalează" IDS_TOOLTIP_UNINSTALL "Dezinstalează" @@ -124,14 +124,14 @@ BEGIN IDS_TOOLTIP_EXIT "Ieșire" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_NAME "Nume" IDS_APP_INST_VERSION "Versiune" IDS_APP_DESCRIPTION "Descriere" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INFO_VERSION "\nVersiune: " IDS_INFO_DESCRIPTION "\nDescriere: " @@ -152,7 +152,7 @@ BEGIN IDS_INFO_INSTALLDATE "\nData de instalare: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AINFO_VERSION "\nVersiune: " IDS_AINFO_DESCRIPTION "\nDescriere: " @@ -161,7 +161,7 @@ BEGIN IDS_AINFO_LICENCE "\nLicență: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CAT_AUDIO "Audio" IDS_CAT_DEVEL "Dezvoltare" @@ -180,7 +180,7 @@ BEGIN IDS_CAT_VIDEO "Video" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "Gestionar de aplicații ReactOS" IDS_SEARCH_TEXT "Căutare…" diff --git a/base/applications/rapps/lang/ru-RU.rc b/base/applications/rapps/lang/ru-RU.rc index 03f7ea02339..66664de9114 100644 --- a/base/applications/rapps/lang/ru-RU.rc +++ b/base/applications/rapps/lang/ru-RU.rc @@ -52,7 +52,7 @@ BEGIN END END -IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144 +IDD_SETTINGS_DIALOG DIALOGEX 0, 0, 250, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Параметры" FONT 8, "MS Shell Dlg" @@ -73,7 +73,7 @@ BEGIN PUSHBUTTON "Отмена", IDCANCEL, 181, 124, 60, 14 END -IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97 +IDD_INSTALL_DIALOG DIALOGEX 0, 0, 216, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Установка программы" FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN PUSHBUTTON "Отмена", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 76 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "Загрузка..." FONT 8, "MS Shell Dlg" @@ -107,7 +107,7 @@ BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_INSTALL "Установить" IDS_TOOLTIP_UNINSTALL "Удалить" @@ -117,14 +117,14 @@ BEGIN IDS_TOOLTIP_EXIT "Выход" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_NAME "Название" IDS_APP_INST_VERSION "Версия" IDS_APP_DESCRIPTION "Описание" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INFO_VERSION "\nВерсия: " IDS_INFO_DESCRIPTION "\nОписание: " @@ -145,7 +145,7 @@ BEGIN IDS_INFO_INSTALLDATE "\nДата установки: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AINFO_VERSION "\nВерсия: " IDS_AINFO_DESCRIPTION "\nОписание: " @@ -154,7 +154,7 @@ BEGIN IDS_AINFO_LICENCE "\nЛицензия: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CAT_AUDIO "Аудио" IDS_CAT_DEVEL "Разработка" @@ -173,7 +173,7 @@ BEGIN IDS_CAT_VIDEO "Видео" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "Менеджер приложений ReactOS" IDS_SEARCH_TEXT "Поиск..." diff --git a/base/applications/rapps/lang/sk-SK.rc b/base/applications/rapps/lang/sk-SK.rc index a40a002fb22..d8d4eafb9fa 100644 --- a/base/applications/rapps/lang/sk-SK.rc +++ b/base/applications/rapps/lang/sk-SK.rc @@ -57,7 +57,7 @@ BEGIN END END -IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144 +IDD_SETTINGS_DIALOG DIALOGEX 0, 0, 250, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Nastavenia" FONT 8, "MS Shell Dlg" @@ -78,7 +78,7 @@ BEGIN PUSHBUTTON "Zrušiť", IDCANCEL, 181, 124, 60, 14 END -IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97 +IDD_INSTALL_DIALOG DIALOGEX 0, 0, 216, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Inštalácia programu" FONT 8, "MS Shell Dlg" @@ -92,7 +92,7 @@ BEGIN PUSHBUTTON "Zrušiť", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 76 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "Sťahujem ..." // Stiahnuť ??? FONT 8, "MS Shell Dlg" @@ -112,7 +112,7 @@ BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_INSTALL "Inštalovať" IDS_TOOLTIP_UNINSTALL "Odinštalovať" @@ -122,14 +122,14 @@ BEGIN IDS_TOOLTIP_EXIT "Skončiť" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_NAME "Názov" IDS_APP_INST_VERSION "Verzia" IDS_APP_DESCRIPTION "Popis" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INFO_VERSION "\nVerzia: " IDS_INFO_DESCRIPTION "\nPopis: " @@ -150,7 +150,7 @@ BEGIN IDS_INFO_INSTALLDATE "\nDátum inštalácie: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AINFO_VERSION "\nVerzia: " IDS_AINFO_DESCRIPTION "\nPopis: " @@ -159,7 +159,7 @@ BEGIN IDS_AINFO_LICENCE "\nLicencia: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CAT_AUDIO "Audio" IDS_CAT_DEVEL "Vývojárske" // Development, vývoj?? @@ -178,7 +178,7 @@ BEGIN IDS_CAT_VIDEO "Video" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "Manažér aplikácií systému ReactOS" IDS_SEARCH_TEXT "Hľadať..." diff --git a/base/applications/rapps/lang/sv-SE.rc b/base/applications/rapps/lang/sv-SE.rc index 134ae843a14..da95042b84e 100644 --- a/base/applications/rapps/lang/sv-SE.rc +++ b/base/applications/rapps/lang/sv-SE.rc @@ -59,7 +59,7 @@ BEGIN END END -IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144 +IDD_SETTINGS_DIALOG DIALOGEX 0, 0, 250, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Inställningar" FONT 8, "MS Shell Dlg" @@ -80,7 +80,7 @@ BEGIN PUSHBUTTON "Avbryt", IDCANCEL, 181, 124, 60, 14 END -IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97 +IDD_INSTALL_DIALOG DIALOGEX 0, 0, 216, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Programinstallation" FONT 8, "MS Shell Dlg" @@ -94,7 +94,7 @@ BEGIN PUSHBUTTON "Avbryt", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 76 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "Ladda ner..." FONT 8, "MS Shell Dlg" @@ -114,7 +114,7 @@ BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_INSTALL "Installera" IDS_TOOLTIP_UNINSTALL "Avinstallera" @@ -124,14 +124,14 @@ BEGIN IDS_TOOLTIP_EXIT "Avsluta" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_NAME "Namn" IDS_APP_INST_VERSION "Version" IDS_APP_DESCRIPTION "Beskrivning" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INFO_VERSION "\nVersion: " IDS_INFO_DESCRIPTION "\nBeskrivning: " @@ -152,7 +152,7 @@ BEGIN IDS_INFO_INSTALLDATE "\nInstallationsdatum: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AINFO_VERSION "\nVersion: " IDS_AINFO_DESCRIPTION "\nBeskrivning: " @@ -161,7 +161,7 @@ BEGIN IDS_AINFO_LICENCE "\nLicens: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CAT_AUDIO "Audio" IDS_CAT_DEVEL "Utveckling" @@ -180,7 +180,7 @@ BEGIN IDS_CAT_VIDEO "Video" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS programhanterare" IDS_SEARCH_TEXT "Sök..." diff --git a/base/applications/rapps/lang/tr-TR.rc b/base/applications/rapps/lang/tr-TR.rc index 640d346785f..f30598d19e2 100644 --- a/base/applications/rapps/lang/tr-TR.rc +++ b/base/applications/rapps/lang/tr-TR.rc @@ -8,7 +8,7 @@ IDR_MAINMENU MENU BEGIN POPUP "&Kütük" BEGIN - MENUITEM "&Seçenekler...", ID_SETTINGS + MENUITEM "&Ayarlar...", ID_SETTINGS MENUITEM SEPARATOR MENUITEM "&Çıkış", ID_EXIT END @@ -57,9 +57,9 @@ BEGIN END END -IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144 +IDD_SETTINGS_DIALOG DIALOGEX 0, 0, 250, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Seçenekler" +CAPTION "Ayarlar" FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Umûmî", -1, 4, 2, 240, 61 @@ -73,12 +73,12 @@ BEGIN PUSHBUTTON "&Seç", IDC_CHOOSE, 187, 85, 50, 14 AUTOCHECKBOX "&Kurulumdan Sonra Yazılımın Kurulum Kütüğünü Sil", IDC_DEL_AFTER_INSTALL, 16, 100, 218, 12 - PUSHBUTTON "Ön Tanımlılar", IDC_DEFAULT_SETTINGS, 8, 124, 60, 14 + PUSHBUTTON "Öntanımlılar", IDC_DEFAULT_SETTINGS, 8, 124, 60, 14 PUSHBUTTON "Tamam", IDOK, 116, 124, 60, 14 - PUSHBUTTON "Vazgeç", IDCANCEL, 181, 124, 60, 14 + PUSHBUTTON "İptal", IDCANCEL, 181, 124, 60, 14 END -IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97 +IDD_INSTALL_DIALOG DIALOGEX 0, 0, 216, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Yazılım Kurulumu" FONT 8, "MS Shell Dlg" @@ -89,17 +89,17 @@ BEGIN AUTORADIOBUTTON "&İndir ve Kur", IDC_DOWNLOAD_INSTALL, 10, 59, 197, 11, NOT WS_TABSTOP PUSHBUTTON "Tamam", IDOK, 86, 78, 60, 14 - PUSHBUTTON "Vazgeç", IDCANCEL, 150, 78, 60, 14 + PUSHBUTTON "İptal", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 76 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "İndiriliyor" FONT 8, "MS Shell Dlg" BEGIN CONTROL "Progress1", IDC_DOWNLOAD_PROGRESS, "msctls_progress32", WS_BORDER | PBS_SMOOTH, 10, 10, 200, 12 LTEXT "", IDC_DOWNLOAD_STATUS, 10, 30, 200, 10, SS_CENTER - PUSHBUTTON "Vazgeç", IDCANCEL, 85, 58, 50, 15, WS_GROUP | WS_TABSTOP + PUSHBUTTON "İptal", IDCANCEL, 85, 58, 50, 15, WS_GROUP | WS_TABSTOP END IDD_ABOUT_DIALOG DIALOGEX 22, 16, 190, 66 @@ -112,24 +112,24 @@ BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_INSTALL "Kur" IDS_TOOLTIP_UNINSTALL "Kaldır" IDS_TOOLTIP_MODIFY "Değiştir" - IDS_TOOLTIP_SETTINGS "Seçenekler" + IDS_TOOLTIP_SETTINGS "Ayarlar" IDS_TOOLTIP_REFRESH "Yenile" IDS_TOOLTIP_EXIT "Çıkış" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_NAME "Yazılımın Adı" IDS_APP_INST_VERSION "Sürüm" IDS_APP_DESCRIPTION "Ek Bilgi" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INFO_VERSION "\nSürüm: " IDS_INFO_DESCRIPTION "\nEk Bilgi: " @@ -150,16 +150,16 @@ BEGIN IDS_INFO_INSTALLDATE "\nKurulum Zamânı: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AINFO_VERSION "\nSürüm: " IDS_AINFO_DESCRIPTION "\nEk Bilgi: " IDS_AINFO_SIZE "\nBoyut: " IDS_AINFO_URLSITE "\nAna Sayfa: " - IDS_AINFO_LICENCE "\nLisans: " + IDS_AINFO_LICENCE "\nRuhsat: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CAT_AUDIO "Ses" IDS_CAT_DEVEL "Geliştirme" @@ -178,7 +178,7 @@ BEGIN IDS_CAT_VIDEO "Vidyo" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS Yazılım Yöneticisi" IDS_SEARCH_TEXT "Ara" diff --git a/base/applications/rapps/lang/uk-UA.rc b/base/applications/rapps/lang/uk-UA.rc index 6f0ea7b9cad..18f4d3b8fcb 100644 --- a/base/applications/rapps/lang/uk-UA.rc +++ b/base/applications/rapps/lang/uk-UA.rc @@ -60,7 +60,7 @@ BEGIN END END -IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144 +IDD_SETTINGS_DIALOG DIALOGEX 0, 0, 250, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Налаштування" FONT 8, "MS Shell Dlg" @@ -81,7 +81,7 @@ BEGIN PUSHBUTTON "Скасувати", IDCANCEL, 181, 124, 60, 14 END -IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97 +IDD_INSTALL_DIALOG DIALOGEX 0, 0, 216, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Встановлення програми" FONT 8, "MS Shell Dlg" @@ -95,7 +95,7 @@ BEGIN PUSHBUTTON "Скасувати", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 76 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "Завантаження..." FONT 8, "MS Shell Dlg" @@ -115,7 +115,7 @@ BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_INSTALL "Встановити" IDS_TOOLTIP_UNINSTALL "Видалити" @@ -125,14 +125,14 @@ BEGIN IDS_TOOLTIP_EXIT "Вихід" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_NAME "Ім’я" IDS_APP_INST_VERSION "Версія" IDS_APP_DESCRIPTION "Опис" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INFO_VERSION "\nВерсія: " IDS_INFO_DESCRIPTION "\nОпис: " @@ -153,7 +153,7 @@ BEGIN IDS_INFO_INSTALLDATE "\nВстановити дату: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AINFO_VERSION "\nВерсія: " IDS_AINFO_DESCRIPTION "\nОпис: " @@ -162,7 +162,7 @@ BEGIN IDS_AINFO_LICENCE "\nЛіцензія: " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CAT_AUDIO "Аудіо" IDS_CAT_DEVEL "Розробка" @@ -181,7 +181,7 @@ BEGIN IDS_CAT_VIDEO "Відео" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "Менеджер додатків ReactOS" IDS_SEARCH_TEXT "Пошук..." diff --git a/base/applications/rapps/lang/zh-CN.rc b/base/applications/rapps/lang/zh-CN.rc index 57143c9dc3a..5aa83b9754c 100644 --- a/base/applications/rapps/lang/zh-CN.rc +++ b/base/applications/rapps/lang/zh-CN.rc @@ -56,7 +56,7 @@ BEGIN END END -IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144 +IDD_SETTINGS_DIALOG DIALOGEX 0, 0, 250, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "设置" FONT 8, "MS Shell Dlg" @@ -77,7 +77,7 @@ BEGIN PUSHBUTTON "取消", IDCANCEL, 181, 124, 60, 14 END -IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97 +IDD_INSTALL_DIALOG DIALOGEX 0, 0, 216, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "安装程序" FONT 8, "MS Shell Dlg" @@ -91,7 +91,7 @@ BEGIN PUSHBUTTON "取消", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 76 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "正在下载..." FONT 8, "MS Shell Dlg" @@ -111,7 +111,7 @@ BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_INSTALL "安装" IDS_TOOLTIP_UNINSTALL "卸载" @@ -121,14 +121,14 @@ BEGIN IDS_TOOLTIP_EXIT "退出" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_NAME "名称" IDS_APP_INST_VERSION "版本" IDS_APP_DESCRIPTION "描述" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INFO_VERSION "版本:" IDS_INFO_DESCRIPTION "描述:" @@ -149,7 +149,7 @@ BEGIN IDS_INFO_INSTALLDATE "\n安装日期:" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AINFO_VERSION "\n版本:" IDS_AINFO_DESCRIPTION "\n描述:" @@ -158,7 +158,7 @@ BEGIN IDS_AINFO_LICENCE "\n协议:" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CAT_AUDIO "音频" IDS_CAT_DEVEL "开发" @@ -177,7 +177,7 @@ BEGIN IDS_CAT_VIDEO "视频" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS 程序管理器" IDS_SEARCH_TEXT "搜索..." diff --git a/base/applications/rapps/lang/zh-TW.rc b/base/applications/rapps/lang/zh-TW.rc index a7e5ac0f7f5..498abd49da6 100644 --- a/base/applications/rapps/lang/zh-TW.rc +++ b/base/applications/rapps/lang/zh-TW.rc @@ -57,7 +57,7 @@ BEGIN END END -IDD_SETTINGS_DIALOG DIALOGEX DISCARDABLE 0, 0, 250, 144 +IDD_SETTINGS_DIALOG DIALOGEX 0, 0, 250, 144 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "設定" FONT 8, "MS Shell Dlg" @@ -78,7 +78,7 @@ BEGIN PUSHBUTTON "取消", IDCANCEL, 181, 124, 60, 14 END -IDD_INSTALL_DIALOG DIALOGEX DISCARDABLE 0, 0, 216, 97 +IDD_INSTALL_DIALOG DIALOGEX 0, 0, 216, 97 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "安裝程式" FONT 8, "MS Shell Dlg" @@ -92,7 +92,7 @@ BEGIN PUSHBUTTON "取消", IDCANCEL, 150, 78, 60, 14 END -IDD_DOWNLOAD_DIALOG DIALOGEX LOADONCALL MOVEABLE DISCARDABLE 0, 0, 220, 76 +IDD_DOWNLOAD_DIALOG DIALOGEX 0, 0, 220, 76 STYLE DS_SHELLFONT | DS_CENTER | WS_BORDER | WS_CAPTION | WS_POPUP | WS_SYSMENU | WS_VISIBLE CAPTION "正在下載..." FONT 8, "MS Shell Dlg" @@ -112,7 +112,7 @@ BEGIN ICON IDI_MAIN, IDC_STATIC, 10, 10, 7, 30 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOOLTIP_INSTALL "安裝" IDS_TOOLTIP_UNINSTALL "解除安裝" @@ -122,14 +122,14 @@ BEGIN IDS_TOOLTIP_EXIT "退出" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_NAME "名稱" IDS_APP_INST_VERSION "版本" IDS_APP_DESCRIPTION "描述" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INFO_VERSION "版本:" IDS_INFO_DESCRIPTION "描述:" @@ -150,7 +150,7 @@ BEGIN IDS_INFO_INSTALLDATE "\n安裝日期:" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_AINFO_VERSION "\n版本:" IDS_AINFO_DESCRIPTION "\n描述:" @@ -159,7 +159,7 @@ BEGIN IDS_AINFO_LICENCE "\n協議:" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CAT_AUDIO "音訊" IDS_CAT_DEVEL "開發" @@ -178,7 +178,7 @@ BEGIN IDS_CAT_VIDEO "視訊" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS 程式管理器" IDS_SEARCH_TEXT "搜索..." diff --git a/base/applications/rapps/manifest.xml b/base/applications/rapps/manifest.xml deleted file mode 100644 index fe2a235116f..00000000000 --- a/base/applications/rapps/manifest.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/base/applications/rapps/rapps.rc b/base/applications/rapps/rapps.rc index 838afe0c064..4e0a9b6a99c 100644 --- a/base/applications/rapps/rapps.rc +++ b/base/applications/rapps/rapps.rc @@ -11,35 +11,35 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -IDI_MAIN ICON DISCARDABLE "res/main.ico" -IDI_EXIT ICON DISCARDABLE "res/exit.ico" -IDI_INSTALL ICON DISCARDABLE "res/install.ico" -IDI_UNINSTALL ICON DISCARDABLE "res/uninstall.ico" -IDI_SETTINGS ICON DISCARDABLE "res/settings.ico" -IDI_MODIFY ICON DISCARDABLE "res/modify.ico" -IDI_REFRESH ICON DISCARDABLE "res/refresh.ico" -IDI_APPS ICON DISCARDABLE "res/apps.ico" -IDI_APPUPD ICON DISCARDABLE "res/appupd.ico" -IDI_CATEGORY ICON DISCARDABLE "res/cat.ico" +IDI_MAIN ICON "res/main.ico" +IDI_EXIT ICON "res/exit.ico" +IDI_INSTALL ICON "res/install.ico" +IDI_UNINSTALL ICON "res/uninstall.ico" +IDI_SETTINGS ICON "res/settings.ico" +IDI_MODIFY ICON "res/modify.ico" +IDI_REFRESH ICON "res/refresh.ico" +IDI_APPS ICON "res/apps.ico" +IDI_APPUPD ICON "res/appupd.ico" +IDI_CATEGORY ICON "res/cat.ico" /* Categories */ -IDI_CAT_AUDIO ICON DISCARDABLE "res/cats/audio.ico" -IDI_CAT_DEVEL ICON DISCARDABLE "res/cats/devel.ico" -IDI_CAT_DRIVERS ICON DISCARDABLE "res/cats/drivers.ico" -IDI_CAT_EDU ICON DISCARDABLE "res/cats/edu.ico" -IDI_CAT_ENGINEER ICON DISCARDABLE "res/cats/engineer.ico" -IDI_CAT_FINANCE ICON DISCARDABLE "res/cats/finance.ico" -IDI_CAT_GAMES ICON DISCARDABLE "res/cats/games.ico" -IDI_CAT_GRAPHICS ICON DISCARDABLE "res/cats/graphics.ico" -IDI_CAT_INTERNET ICON DISCARDABLE "res/cats/internet.ico" -IDI_CAT_LIBS ICON DISCARDABLE "res/cats/libs.ico" -IDI_CAT_OFFICE ICON DISCARDABLE "res/cats/office.ico" -IDI_CAT_OTHER ICON DISCARDABLE "res/cats/other.ico" -IDI_CAT_SCIENCE ICON DISCARDABLE "res/cats/science.ico" -IDI_CAT_TOOLS ICON DISCARDABLE "res/cats/tools.ico" -IDI_CAT_VIDEO ICON DISCARDABLE "res/cats/video.ico" +IDI_CAT_AUDIO ICON "res/cats/audio.ico" +IDI_CAT_DEVEL ICON "res/cats/devel.ico" +IDI_CAT_DRIVERS ICON "res/cats/drivers.ico" +IDI_CAT_EDU ICON "res/cats/edu.ico" +IDI_CAT_ENGINEER ICON "res/cats/engineer.ico" +IDI_CAT_FINANCE ICON "res/cats/finance.ico" +IDI_CAT_GAMES ICON "res/cats/games.ico" +IDI_CAT_GRAPHICS ICON "res/cats/graphics.ico" +IDI_CAT_INTERNET ICON "res/cats/internet.ico" +IDI_CAT_LIBS ICON "res/cats/libs.ico" +IDI_CAT_OFFICE ICON "res/cats/office.ico" +IDI_CAT_OTHER ICON "res/cats/other.ico" +IDI_CAT_SCIENCE ICON "res/cats/science.ico" +IDI_CAT_TOOLS ICON "res/cats/tools.ico" +IDI_CAT_VIDEO ICON "res/cats/video.ico" -1 24 DISCARDABLE "manifest.xml" +#include #include diff --git a/base/applications/rapps/rapps/Pingus.txt b/base/applications/rapps/rapps/Pingus.txt new file mode 100644 index 00000000000..f93d195f465 --- /dev/null +++ b/base/applications/rapps/rapps/Pingus.txt @@ -0,0 +1,15 @@ +; UTF-8 + +[Section] +Name = Pingus +Version = 0.7.6 +Licence = GPL +Description = Pingus is a free Lemmings-like puzzle game. +Size = 16.0MB +Category = 4 +URLSite = http://pingus.seul.org +URLDownload = http://pingus.googlecode.com/files/Pingus-0.7.6.exe +CDPath = none + +[Section.0407] +Description = Pingus ist ein freies Lemings-ähnliches Puzzle Spiel. diff --git a/base/applications/rapps/rapps/abyss.txt b/base/applications/rapps/rapps/abyss.txt index 9edb1f57023..8611c800c04 100644 --- a/base/applications/rapps/rapps/abyss.txt +++ b/base/applications/rapps/rapps/abyss.txt @@ -2,7 +2,7 @@ [Section] Name = Abyss Web server X1 -Version = 2.9 +Version = 2.9.0.1 Licence = Freeware Description = Abyss Web Server enables you to host your Web sites on your computer. It supports secure SSL/TLS connections (HTTPS) as well as a wide range of Web technologies. It can also run advanced PHP, Perl, Python, ASP, ASP.NET, and Ruby on Rails Web applications, which can be backed by databases such as MySQL, SQLite, MS SQL Server, MS Access, or Oracle. Size = 2.1MB diff --git a/base/applications/rapps/rapps/alreader.txt b/base/applications/rapps/rapps/alreader.txt new file mode 100644 index 00000000000..0c21c7f98ac --- /dev/null +++ b/base/applications/rapps/rapps/alreader.txt @@ -0,0 +1,13 @@ +; UTF-8 + +[Section] +Name = AlReader +Description = A FB2 eBook Reader. +URLSite = http://www.alreader.com +Size = 4.6MB +Category = 6 +URLDownload = http://svn.reactos.org/packages/AlReader2Setup.exe +CDPath = none + +[Section.0407] +Description = Ein FB2 eBook Reader. diff --git a/base/applications/rapps/rapps/boswars.txt b/base/applications/rapps/rapps/boswars.txt new file mode 100644 index 00000000000..d09fd8aa8e3 --- /dev/null +++ b/base/applications/rapps/rapps/boswars.txt @@ -0,0 +1,15 @@ +; UTF-8 + +[Section] +Name = Bos Wars +Version = 2.6.1 +Licence = GPL +Description = Bos Wars is a futuristic real time strategy game. To start the game, install Microsoft Visual C++ 2008 runtime. +Size = 62.3MB +Category = 4 +URLSite = http://www.boswars.org +URLDownload = http://www.boswars.org/dist/releases/BosWars-2.6.1.exe +CDPath = none + +[Section.0407] +Description = Bos Wars ist ein futuristisches Echtzeitstrategiespiel. Um das Spiel zu starten, installieren Sie die Microsoft Visual C++ 2008 Runtime. diff --git a/base/applications/rapps/rapps/chromium.txt b/base/applications/rapps/rapps/chromium.txt new file mode 100644 index 00000000000..cf4754a5e46 --- /dev/null +++ b/base/applications/rapps/rapps/chromium.txt @@ -0,0 +1,15 @@ +; UTF-8 + +[Section] +Name = Chromium B.S.U. +Version = 0.9.13.2 +Licence = GPL +Description = Chromium B.S.U. is an arcade-style, top-scrolling space shooter. +Size = 2.3MB +Category = 4 +URLSite = http://chromium-bsu.sourceforge.net +URLDownload = http://files1.freesoft.ru/rep/701665/chromium-0.9.13.2.exe +CDPath = none + +[Section.0407] +Description = Chromium B.S.U. ist ein Arcade-Style, Top-Scrolling Space Shooter. diff --git a/base/applications/rapps/rapps/doublecommander.txt b/base/applications/rapps/rapps/doublecommander.txt index b2e9c242993..04bdadbfce3 100644 --- a/base/applications/rapps/rapps/doublecommander.txt +++ b/base/applications/rapps/rapps/doublecommander.txt @@ -2,13 +2,13 @@ [Section] Name = Double Commander -Version = 0.5.5 +Version = 0.5.7 Beta Licence = GPL Description = Double Commander is an open source file manager with two panels side by side. You need 7-Zip or a similar Utility to extract it. -Size = 7.5MB +Size = 7.6MB Category = 12 URLSite = http://doublecmd.sourceforge.net/ -URLDownload = http://freefr.dl.sourceforge.net/project/doublecmd/DC%20for%20Windows%2032%20bit/Double%20Commander%200.5.5%20beta/doublecmd-0.5.5.i386-win32.exe +URLDownload = http://freefr.dl.sourceforge.net/project/doublecmd/DC%20for%20Windows%2032%20bit/Double%20Commander%200.5.7%20beta/doublecmd-0.5.7.i386-win32.exe CDPath = none [Section.0407] @@ -25,7 +25,7 @@ Description = Double Commander to menedżer plików, o otwartym źródle, z klas [Section.0418] Description = Double Commander este un gestionar (open-source) de fișiere după modelul «două paneluri alăturate». Este necesar 7-Zip sau un utilitar similar de dezarhivare pentru a-l putea extrage. -Size = 6,5 Mo +Size = 7,6 Mo [Section.0419] Description = Double Commander - это открытый двухпанельный файловый менеджер. Вам нужен 7-Zip или подобная утилита для его распаковки. diff --git a/base/applications/rapps/rapps/dvdwritenow.txt b/base/applications/rapps/rapps/dvdwritenow.txt index 342eab6f6c3..5221d29a218 100644 --- a/base/applications/rapps/rapps/dvdwritenow.txt +++ b/base/applications/rapps/rapps/dvdwritenow.txt @@ -6,9 +6,15 @@ Version = 1.5.12 sp2 Licence = Freeware Description = A free direct CD/DVD recording software. Once installed, you can use your CD/DVD RW as USB Flash or removable hard drives. Along with this you can write to CD/DVD RW recorded with UDF filesystem. You can also read UDF disks created with other software. (Microsoft DVD−ROMs, RW disks recorded with Ahead InCD). You need a ZIP decompression program to install it. Size = 1.2MB -Category = 13 +Category = 12 +URLSite = http://dwn.alter.org.ua/ URLDownload = http://dwn.alter.org.ua/downloads/dwn_1_5_12_sp2.zip CDPath = none [Section.0407] Description = Eine kostenlose CD/DVD Brennsoftware. Sobald es installiert ist, kann man CD/DVD RW als USB Flash oder Wechseldatenträger beschreiben. Auch kann man hiermit auf CD/DVD RW schreiben, welche mit dem UDF Dateisystem beschrieben wurden. Auch kann man mit dieser Software UDF Disks, welche mit anderer Software erstellt wurden, lesen. (Microsoft DVD−ROMs, RW Disks erstellt mit Ahead InCD). Es wird für die Installation ein ZIP Dekomprimierprogramm benötigt. + +[Section.0419] +Description = DVD Write Now - бесплатная программа для прямой записи на CD и DVD диски. Позволяет использовать перезаписываемые CD и DVD диски как USB-Flash или съемные жесткие диски, записывать файлы на перезаписываемые CD/DVD диски, созданные в формате UDF, и читать UDF-диски, созданные другими программами. +URLSite = http://dwn.alter.org.ua/ru/ + diff --git a/base/applications/rapps/rapps/firefox5.txt b/base/applications/rapps/rapps/firefox5.txt index 99eeb3ea0c3..f52624bcd3b 100644 --- a/base/applications/rapps/rapps/firefox5.txt +++ b/base/applications/rapps/rapps/firefox5.txt @@ -1,78 +1,78 @@ ; UTF-8 [Section] -Name = Mozilla Firefox 22 -Version = 22.0 +Name = Mozilla Firefox 24 +Version = 24.0 Licence = MPL/GPL/LGPL Description = The most popular and one of the best free Web Browsers out there. -Size = 20.3MB +Size = 21.7MB Category = 5 URLSite = http://www.mozilla.org/en-US/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/en-US/Firefox%20Setup%2022.0.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/24.0/win32/en-US/Firefox%20Setup%2024.0.exe CDPath = none [Section.0407] Description = Der populärste und einer der besten freien Webbrowser. -Size = 20.17MB +Size = 21.5MB URLSite = http://www.mozilla-europe.org/de/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/de/Firefox%20Setup%2022.0.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/24.0/win32/de/Firefox%20Setup%2024.0.exe [Section.040a] Description = El más popular y uno de los mejores navegadores web gratuitos que hay. -Size = 20.13MB +Size = 21.5MB URLSite = http://www.mozilla-europe.org/es/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/es-ES/Firefox%20Setup%2022.0.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/24.0/win32/es-ES/Firefox%20Setup%2024.0.exe [Section.040c] Description = Le navigateur web gratuit le plus populaire et l'un des meilleurs. -Size = 20,46 Mo +Size = 21,8 Mo URLSite = http://www.mozilla-europe.org/fr/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/fr/Firefox%20Setup%2022.0.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/24.0/win32/fr/Firefox%20Setup%2024.0.exe [Section.0410] Description = Il più popolare e uno dei migliori web browser gratuiti. -Size = 20.1MB +Size = 21.5MB URLSite = http://www.mozilla-europe.org/it/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/it/Firefox%20Setup%2022.0.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/24.0/win32/it/Firefox%20Setup%2024.0.exe [Section.0413] Description = De meest populaire en een van de beste gratis Web browsers. -Size = 20.82MB +Size = 22.2MB URLSite = http://www.mozilla-europe.org/nl/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/nl/Firefox%20Setup%2022.0.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/24.0/win32/nl/Firefox%20Setup%2024.0.exe [Section.0414] Description = Mest populære og best også gratis nettleserene der ute. -Size = 20.18MB +Size = 21.5MB URLSite = http://www.mozilla-europe.org/no/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/nb-NO/Firefox%20Setup%2022.0.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/24.0/win32/nb-NO/Firefox%20Setup%2024.0.exe [Section.0415] Description = Najpopularniejsza i jedna z najlepszych darmowych przeglądarek internetowych. -Size = 21.03MB +Size = 22.4MB URLSite = http://www.mozilla-europe.org/pl/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/pl/Firefox%20Setup%2022.0.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/24.0/win32/pl/Firefox%20Setup%2024.0.exe [Section.0418] Description = Cel mai popular și unul dintre cele mai bune navigatoare web gratuite existente. -Size = 20,65 Mo +Size = 22,0 Mo URLSite = http://www.mozilla-europe.org/ro/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/ro/Firefox%20Setup%2022.0.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/24.0/win32/ro/Firefox%20Setup%2024.0.exe [Section.0419] Description = Один из самых популярных и лучших бесплатных браузеров. -Size = 20.59MB +Size = 22,0MB URLSite = http://www.mozilla-europe.org/ru/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/ru/Firefox%20Setup%2022.0.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/24.0/win32/ru/Firefox%20Setup%2024.0.exe [Section.041b] Description = Najpopulárnejší a jeden z najlepších slobodný webových prehliadačov. -Size = 20.84MB +Size = 22,2MB URLSite = http://www.mozilla-europe.org/sk/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/sk/Firefox%20Setup%2022.0.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/24.0/win32/sk/Firefox%20Setup%2024.0.exe [Section.0422] Description = Найпопулярніший та один з кращих безплатних веб-браузерів. -Size = 20.6MB +Size = 22,0MB URLSite = http://www.mozilla-europe.org/uk/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/22.0/win32/uk/Firefox%20Setup%2022.0.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/24.0/win32/uk/Firefox%20Setup%2024.0.exe diff --git a/base/applications/rapps/rapps/freebasic.txt b/base/applications/rapps/rapps/freebasic.txt index aff9cf6c829..1b38008895d 100644 --- a/base/applications/rapps/rapps/freebasic.txt +++ b/base/applications/rapps/rapps/freebasic.txt @@ -2,13 +2,13 @@ [Section] Name = FreeBASIC -Version = 0.90.0 +Version = 0.90.1 Licence = GPL/LGPL Description = Open Source BASIC Compiler. The BASIC syntax is compatible to QBASIC. -Size = 7.3MB +Size = 7.4MB Category = 7 URLSite = http://www.freebasic.net/ -URLDownload = http://garr.dl.sourceforge.net/project/fbc/Binaries%20-%20Windows/FreeBASIC-0.90.0-win32.exe +URLDownload = http://garr.dl.sourceforge.net/project/fbc/Binaries%20-%20Windows/FreeBASIC-0.90.1-win32.exe CDPath = none [Section.0407] @@ -19,7 +19,7 @@ Description = Compilador BASIC de código abierto. El lenguaje BASIC es compatib [Section.040c] Description = Compilateur BASIC open source. La syntaxe du BASIC est compatible avec le QBASIC. -Size = 7,3 Mo +Size = 7,4 Mo [Section.0410] Description = Compilatore BASIC open source. La sintassi del BASIC è compatibile con il QBASIC. @@ -29,7 +29,7 @@ Description = Otwarty kompilator BASIC, ze składnią kompatybilną z QBASIC. [Section.0419] Description = Compilator (open-source) BASIC. Sintaxa BASIC este compatibilă cu QBASIC. -Size = 7,3 Mo +Size = 7,4 Mo [Section.0422] Description = Відкритий компілятор BASIC. Синтаксис сумісний з QBASIC. diff --git a/base/applications/rapps/rapps/globulation2.txt b/base/applications/rapps/rapps/globulation2.txt new file mode 100644 index 00000000000..fdae8ac371f --- /dev/null +++ b/base/applications/rapps/rapps/globulation2.txt @@ -0,0 +1,15 @@ +; UTF-8 + +[Section] +Name = Globulation2 +Version = 0.9.4.4 +Licence = GPL +Description = Globulation 2 is a real-time strategy game. The game minimizes gaming micromanagement by automatically assigning tasks to units. +Size = 13.5MB +Category = 4 +URLSite = http://www.globulation2.org +URLDownload = http://dl.sv.nongnu.org/releases/glob2/0.9.4/glob2-0.9.4.4.exe +CDPath = none + +[Section.0407] +Description = Globulation 2 ist ein Echtzeitstrategiespiel. Das Spiel vereinfacht das Mikromanagement, indem es Einheiten automatisch mit Aufträgen versieht. diff --git a/base/applications/rapps/rapps/hover.txt b/base/applications/rapps/rapps/hover.txt new file mode 100644 index 00000000000..a7b1f524efe --- /dev/null +++ b/base/applications/rapps/rapps/hover.txt @@ -0,0 +1,14 @@ +; UTF-8 + +[Section] +Name = Hover! +Version = 1.0 +Licence = MS EULA +Description = The classic Hover CTF game which was found on the Windows 95 CD. +Size = 6.2MB +Category = 4 +URLDownload = http://svn.reactos.org/packages/Hover.exe +CDPath = none + +[Section.0407] +Description = Das klassische Hover CTF Spiel, dass auf der Windows 95 CD zu finden war. diff --git a/base/applications/rapps/rapps/indiftpd.txt b/base/applications/rapps/rapps/indiftpd.txt new file mode 100644 index 00000000000..625feba00a5 --- /dev/null +++ b/base/applications/rapps/rapps/indiftpd.txt @@ -0,0 +1,15 @@ +; UTF-8 + +[Section] +Name = IndiFTPD +Version = 1.0.9 Beta +Licence = GPL +Description = IndiFTPD is a standalone FTP server that functions as a single executable. It is designed for situations when a user does not want to install/configure a server on the system (or does not have permission to do so) and wants to quickly get a server running. +Size = 556kB +Category = 5 +URLSite = http://www.dftpd.com/products.php#indiftpd +URLDownload = http://www.dftpd.com/files/IndiFTPD/1.0.9_beta/Windows/Intel/indiftpd.exe +CDPath = none + +[Section.0407] +Description = IndiFTPD ist ein eigenständiger FTP Server in einer einzigen Anwendung. Er wurde erstellt für Situationen, in denen ein Anwender keinen Server auf dem System installieren/konfigurieren möchte (oder nicht die Recte dafür besitzt) und schnell einen Server lauffähig bekommen will. diff --git a/base/applications/rapps/rapps/irfanviewplugins.txt b/base/applications/rapps/rapps/irfanviewplugins.txt index c88bb52f783..afdc92689bf 100644 --- a/base/applications/rapps/rapps/irfanviewplugins.txt +++ b/base/applications/rapps/rapps/irfanviewplugins.txt @@ -2,7 +2,7 @@ [Section] Name = IrfanView Plugins -Version = 4.35 +Version = 4.36 Licence = Freeware (for personal use) Description = Additional Plugins for supporting more file types. Size = 9.85MB diff --git a/base/applications/rapps/rapps/kyodai.txt b/base/applications/rapps/rapps/kyodai.txt new file mode 100644 index 00000000000..4bc0e28c382 --- /dev/null +++ b/base/applications/rapps/rapps/kyodai.txt @@ -0,0 +1,14 @@ +; UTF-8 + +[Section] +Name = Kyodai Mahjongg +Version = 21.42 +Licence = Shareware +Description = One of the best Mahjongg Solitaire games out there. +Size = 13.8MB +Category = 4 +URLDownload = http://files.cynagames.com/kyo2006.exe +CDPath = none + +[Section.0407] +Description = Eines der besten Mahjongg Solitaire Spiele im Netz. diff --git a/base/applications/rapps/rapps/lautus.txt b/base/applications/rapps/rapps/lautus.txt new file mode 100644 index 00000000000..0fce9bf1e9e --- /dev/null +++ b/base/applications/rapps/rapps/lautus.txt @@ -0,0 +1,15 @@ +; UTF-8 + +[Section] +Name = Lautus UXTheme +Version = 1.0 +License = GPLv2 +Description = Theme made specially for ReactOS. Unzip in the "ReactOS" folder, then set the themeing service to "Automatic" and start it. +URLSite = http://www.reactos.org/forum/viewtopic.php?f=25&t=9293 +Size = 341kB +Category = 15 +URLDownload = http://svn.reactos.org/packages/Lautus.exe +CDPath = none + +[Section.0407] +Description = Theme, der speziell für ReactOS entwickelt wird. Entpacken in das "ReactOS"-Verzeichnis, dann den Design Dienst auf "Automatisch" stellen und starten. diff --git a/base/applications/rapps/rapps/lazaruside.txt b/base/applications/rapps/rapps/lazaruside.txt index b9a5ab37843..cf3c921fe0d 100644 --- a/base/applications/rapps/rapps/lazaruside.txt +++ b/base/applications/rapps/rapps/lazaruside.txt @@ -2,13 +2,13 @@ [Section] Name = Lazarus -Version = 1.0.10 +Version = 1.0.12 Licence = modified LGPL, GPL Description = A cross-platform integrated development environment (IDE) that lets you create visual (GUI) and non-visual Object Pascal programs, and uses the Free Pascal compiler to generate your executable. Size = 106MB Category = 7 URLSite = http://www.lazarus.freepascal.org/ -URLDownload = http://garr.dl.sourceforge.net/project/lazarus/Lazarus%20Windows%2032%20bits/Lazarus%201.0.10/lazarus-1.0.10-fpc-2.6.2-win32.exe +URLDownload = http://garr.dl.sourceforge.net/project/lazarus/Lazarus%20Windows%2032%20bits/Lazarus%201.0.12/lazarus-1.0.12-fpc-2.6.2-win32.exe CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/libreoffice.txt b/base/applications/rapps/rapps/libreoffice.txt index ffa3e430dd8..1e5c0cd69d4 100644 --- a/base/applications/rapps/rapps/libreoffice.txt +++ b/base/applications/rapps/rapps/libreoffice.txt @@ -2,13 +2,13 @@ [Section] Name = LibreOffice -Version = 4.0.4 +Version = 4.1.2 Licence = LGPL Description = Former called OpenOffice. Open Source Office Suite. -Size = 182.5MB +Size = 205.09MB Category = 6 URLSite = http://www.documentfoundation.org/ -URLDownload = http://download.documentfoundation.org/libreoffice/stable/4.0.4/win/x86/LibreOffice_4.0.4_Win_x86.msi +URLDownload = http://download.documentfoundation.org/libreoffice/stable/4.1.2/win/x86/LibreOffice_4.1.2_Win_x86.msi CDPath = none [Section.0407] @@ -19,7 +19,7 @@ Description = La suite de ofimática de código abierto. [Section.040c] Description = Précédemment appelé OpenOffice. Suite bureautique open source. -Size = 182,5 Mo +Size = 205,09 Mo [Section.0410] Description = Precedentemente chiamato OpenOffice. Open Source Office Suite. @@ -32,7 +32,7 @@ Description = Otwarty pakiet biurowy. [Section.0418] Description = Fostul OpenOffice. Suita de aplicații de birotică open-source. -Size = 182,5 Mo +Size = 205,09 Mo [Section.0422] Description = Відкритий офісний пакет. diff --git a/base/applications/rapps/rapps/mirandaim.txt b/base/applications/rapps/rapps/mirandaim.txt index a439efc0c47..4e835d936d7 100644 --- a/base/applications/rapps/rapps/mirandaim.txt +++ b/base/applications/rapps/rapps/mirandaim.txt @@ -2,13 +2,13 @@ [Section] Name = Miranda IM -Version = 0.10.14 +Version = 0.10.17 Licence = GPL Description = Open source multiprotocol instant messaging application - May not work completely. Size = 2.81MB Category = 5 URLSite = http://www.miranda-im.org/ -URLDownload = http://miranda.googlecode.com/files/miranda-im-v0.10.14-unicode.exe +URLDownload = http://files.miranda-im.org/stable/0.10.17.0/miranda-im-v0.10.17-unicode.exe CDPath = none [Section.0407] diff --git a/base/applications/rapps/rapps/mpc.txt b/base/applications/rapps/rapps/mpc.txt index 155f141f9d7..1d1120064f0 100644 --- a/base/applications/rapps/rapps/mpc.txt +++ b/base/applications/rapps/rapps/mpc.txt @@ -2,13 +2,13 @@ [Section] Name = Media Player Classic Home Cinema -Version = 1.6.8 +Version = 1.7.0 Licence = GPL Description = A media player. -Size = 7.08MB +Size = 9.6MB Category = 1 URLSite = http://mpc-hc.org/ -URLDownload = http://garr.dl.sourceforge.net/project/mpc-hc/MPC%20HomeCinema%20-%20Win32/MPC-HC_v1.6.8_x86/MPC-HC.1.6.8.x86.exe +URLDownload = http://garr.dl.sourceforge.net/project/mpc-hc/MPC%20HomeCinema%20-%20Win32/MPC-HC_v1.7.0_x86/MPC-HC.1.7.0.x86.exe CDPath = none [Section.0407] @@ -19,7 +19,7 @@ Description = Reproductor multimedia. [Section.040c] Description = Un lecteur media. -Size = 7,08 Mo +Size = 9,6 Mo [Section.0410] Description = Lettore multimediale. @@ -32,7 +32,7 @@ Description = Odtwarzacz multimediów. [Section.0418] Description = Lector multimedia. -Size = 7,08 Mo +Size = 9,6 Mo [Section.0419] Description = Мультимедийный проигрыватель. diff --git a/base/applications/rapps/rapps/npp.txt b/base/applications/rapps/rapps/npp.txt index 741e4de23ac..6973e590292 100644 --- a/base/applications/rapps/rapps/npp.txt +++ b/base/applications/rapps/rapps/npp.txt @@ -2,13 +2,13 @@ [Section] Name = Notepad++ -Version = 6.4.1 +Version = 6.5 Licence = GPL Description = A text editor. -Size = 7.1MB +Size = 7.2MB Category = 6 URLSite = http://notepad-plus-plus.org/ -URLDownload = http://download.tuxfamily.org/notepadplus/6.4.1/npp.6.4.1.Installer.exe +URLDownload = http://download.tuxfamily.org/notepadplus/6.5/npp.6.5.Installer.exe CDPath = none [Section.0407] @@ -19,7 +19,7 @@ Description = Un editor de text. [Section.040c] Description = Un éditeur de texte. -Size = 7,1 Mo +Size = 7,2 Mo [Section.0410] Description = Un editor di testo. @@ -32,7 +32,7 @@ Description = Edytor tekstu. [Section.0418] Description = A text editor. -Size = 7,1 Mo +Size = 7,2 Mo [Section.0419] Description = Текстовый редактор. diff --git a/base/applications/rapps/rapps/openoffice3.0.txt b/base/applications/rapps/rapps/openoffice3.0.txt index 927b9d782c8..447c20e0757 100644 --- a/base/applications/rapps/rapps/openoffice3.0.txt +++ b/base/applications/rapps/rapps/openoffice3.0.txt @@ -1,64 +1,62 @@ ; UTF-8 [Section] -Name = OpenOffice 3.4 -Version = 3.4.1 +Name = OpenOffice 4.0 +Version = 4.0.0 Licence = LGPL Description = THE Open Source Office Suite. -Size = 129.64MB +Size = 136.79MB Category = 6 URLSite = http://www.openoffice.org/ -URLDownload = http://heanet.dl.sourceforge.net/project/openofficeorg.mirror/stable/3.4.1/Apache_OpenOffice_incubating_3.4.1_Win_x86_install_en-US.exe +URLDownload = http://heanet.dl.sourceforge.net/project/openofficeorg.mirror/4.0.0/binaries/en-US/Apache_OpenOffice_4.0.0_Win_x86_install_en-US.exe CDPath = none [Section.0407] Description = DIE Open Source Office Suite. URLSite = http://de.openoffice.org/ -Size = 145.2MB -URLDownload = http://heanet.dl.sourceforge.net/project/openofficeorg.mirror/localized/de/3.4.1/Apache_OpenOffice_incubating_3.4.1_Win_x86_install_de.exe +Size = 154.88MB +URLDownload = http://heanet.dl.sourceforge.net/project/openofficeorg.mirror/4.0.0/binaries/de/Apache_OpenOffice_4.0.0_Win_x86_install_de.exe [Section.040a] Description = La suite de ofimática de código abierto. URLSite = http://es.openoffice.org/ -Size = 119.19MB -URLDownload = http://heanet.dl.sourceforge.net/project/openofficeorg.mirror/localized/es/3.4.1/Apache_OpenOffice_incubating_3.4.1_Win_x86_install_es.exe +Size = 126.29MB +URLDownload = http://heanet.dl.sourceforge.net/project/openofficeorg.mirror/4.0.0/binaries/es/Apache_OpenOffice_4.0.0_Win_x86_install_es.exe [Section.040c] Description = LA suite bureautique open source. URLSite = http://fr.openoffice.org/ -Size = 120,18 Mo -URLDownload = http://heanet.dl.sourceforge.net/project/openofficeorg.mirror/localized/fr/3.4.1/Apache_OpenOffice_incubating_3.4.1_Win_x86_install_fr.exe +Size = 127,22 Mo +URLDownload = http://heanet.dl.sourceforge.net/project/openofficeorg.mirror/4.0.0/binaries/fr/Apache_OpenOffice_4.0.0_Win_x86_install_fr.exe [Section.0410] URLSite = http://it.openoffice.org/ -Size = 120.0MB -URLDownload = http://heanet.dl.sourceforge.net/project/openofficeorg.mirror/localized/it/3.4.1/Apache_OpenOffice_incubating_3.4.1_Win_x86_install_it.exe +Size = 132.39MB +URLDownload = http://heanet.dl.sourceforge.net/project/openofficeorg.mirror/4.0.0/binaries/it/Apache_OpenOffice_4.0.0_Win_x86_install_it.exe [Section.0413] Description = Open-bron Office Pakket. URLSite = http://nl.openoffice.org/ -Size = 124.13MB -URLDownload = http://heanet.dl.sourceforge.net/project/openofficeorg.mirror/localized/nl/3.4.1/Apache_OpenOffice_incubating_3.4.1_Win_x86_install_nl.exe +Size = 132.11MB +URLDownload = http://heanet.dl.sourceforge.net/project/openofficeorg.mirror/4.0.0/binaries/nl/Apache_OpenOffice_4.0.0_Win_x86_install_nl.exe [Section.0415] Description = Otwarty pakiet biurowy. URLSite = http://pl.openoffice.org/ -Size = 120.29MB -URLDownload = http://heanet.dl.sourceforge.net/project/openofficeorg.mirror/localized/pl/3.4.1/Apache_OpenOffice_incubating_3.4.1_Win_x86_install_pl.exe +Size = 136.79MB [Section.0419] Description = Suita de aplicații de birotică open-source. -Size = 129,64 Mo +Size = 136,79 Mo URLSite = http://www.openoffice.org/ro/ [Section.0422] Description = Відкритий офісний пакет. URLSite = http://ua.openoffice.org/ -Size = 123.22MB -URLDownload = http://heanet.dl.sourceforge.net/project/openofficeorg.mirror/localized/ru/3.4.1/Apache_OpenOffice_incubating_3.4.1_Win_x86_install_ru.exe +Size = 136.79MB [Section.0813] Description = Open-bron Office Pakket. URLSite = http://nl.openoffice.org/ -Size = 124.13MB -URLDownload = http://heanet.dl.sourceforge.net/project/openofficeorg.mirror/localized/nl/3.4.1/Apache_OpenOffice_incubating_3.4.1_Win_x86_install_nl.exe +Size = 132.11MB +URLDownload = http://heanet.dl.sourceforge.net/project/openofficeorg.mirror/4.0.0/binaries/nl/Apache_OpenOffice_4.0.0_Win_x86_install_nl.exe diff --git a/base/applications/rapps/rapps/openttd.txt b/base/applications/rapps/rapps/openttd.txt index 4579c914765..237549a352b 100644 --- a/base/applications/rapps/rapps/openttd.txt +++ b/base/applications/rapps/rapps/openttd.txt @@ -2,13 +2,13 @@ [Section] Name = OpenTTD -Version = 1.3.1 +Version = 1.3.2 Licence = GPL v2 Description = Open Source clone of the "Transport Tycoon Deluxe" game engine. You need a copy of Transport Tycoon. -Size = 4.9MB +Size = 6.75MB Category = 4 URLSite = http://www.openttd.org/ -URLDownload = http://binaries.openttd.org/releases/1.3.1/openttd-1.3.1-windows-win32.exe +URLDownload = http://binaries.openttd.org/releases/1.3.2/openttd-1.3.2-windows-win32.exe CDPath = none [Section.0407] @@ -19,7 +19,7 @@ Description = Clon del motor de juegos "Transport Tycoon Deluxe" de código abie [Section.040c] Description = Clone open source du moteur de jeu "Transport Tycoon Deluxe". Vous aurez besoin d'une copie de Transport Tycoon. -Size = 4,9 Mo +Size = 6,75 Mo [Section.0410] Description = Clone open source del motore di gioco di "Transport Tycoon Deluxe". Hai bisogno di una copia di Transport Tycoon. @@ -32,7 +32,7 @@ Description = Otwarty klon silnika gry "Transport Tycoon Deluxe". Do poprawnego [Section.0418] Description = Clona (open-source a) motorului de joc "Transport Tycoon Deluxe". Este necesară o copie a jocului Transport Tycoon. -Size = 4,9 Mo +Size = 6,75 Mo [Section.0422] Description = Відкритий клон двигуна гри "Transport Tycoon Deluxe". Вам потрібна копія гри Transport Tycoon. diff --git a/base/applications/rapps/rapps/opera.txt b/base/applications/rapps/rapps/opera.txt index 56374b87043..e3980cca129 100644 --- a/base/applications/rapps/rapps/opera.txt +++ b/base/applications/rapps/rapps/opera.txt @@ -2,13 +2,13 @@ [Section] Name = Opera -Version = 12.15 +Version = 12.16 Licence = Freeware Description = The popular Opera Browser with many advanced features and including a Mail and BitTorrent client. Size = 12.56MB Category = 5 URLSite = http://www.opera.com/ -URLDownload = http://ftp.opera.com/pub/opera/win/1215/int/Opera_1215_int_Setup.exe +URLDownload = http://ftp.opera.com/pub/opera/win/1216/int/Opera_1216_int_Setup.exe CDPath = none [Section.0405] diff --git a/base/applications/rapps/rapps/pengupop.txt b/base/applications/rapps/rapps/pengupop.txt new file mode 100644 index 00000000000..44cb8693878 --- /dev/null +++ b/base/applications/rapps/rapps/pengupop.txt @@ -0,0 +1,14 @@ +; UTF-8 + +[Section] +Name = Pengupop +Version = 2.2.3 +Licence = GPL +Description = The purpose of this game is to shoot colored orbs into your playfield, so they form groups of three or more. +Size = 384KB +Category = 4 +URLDownload = http://svn.reactos.org/packages/Pengupop.exe +CDPath = none + +[Section.0407] +Description = Das Ziel des Spiels ist es farbige Orbs ins Spielfeld zu feuern, so dass diese Gruppen von drei oder mehr bilden. diff --git a/base/applications/rapps/rapps/pspad.txt b/base/applications/rapps/rapps/pspad.txt new file mode 100644 index 00000000000..22a09427f55 --- /dev/null +++ b/base/applications/rapps/rapps/pspad.txt @@ -0,0 +1,47 @@ +; UTF-8 + +[Section] +Name = PSPad +Version = 4.5.7 +Licence = Freeware +Description = A text editor. +Size = 4.46MB +Category = 6 +URLSite = http://www.pspad.com +URLDownload = http://31.31.78.126/pspad/pspad457inst_en.exe +CDPath = none + +[Section.0407] +Description = Ein Texteditor. + +[Section.040a] +Description = Un editor de text. + +[Section.040c] +Description = Un éditeur de texte. +Size = 4,46 Mo + +[Section.0410] +Description = Un editor di testo. + +[Section.0413] +Description = Een teksteditor. + +[Section.0415] +Description = Edytor tekstu. + +[Section.0418] +Description = A text editor. +Size = 4,46 Mo + +[Section.0419] +Description = Текстовый редактор. + +[Section.041b] +Description = Textový editor. + +[Section.0422] +Description = Текстовый редактор. + +[Section.0813] +Description = Een teksteditor. diff --git a/base/applications/rapps/rapps/putty.txt b/base/applications/rapps/rapps/putty.txt index fe2c357ef34..3c0a2df0f5c 100644 --- a/base/applications/rapps/rapps/putty.txt +++ b/base/applications/rapps/rapps/putty.txt @@ -2,13 +2,13 @@ [Section] Name = PuTTY -Version = 0.62 +Version = 0.63 Licence = MIT Description = A free SSH, Telnet, rlogin, and raw TCP client. -Size = 1.76MB +Size = 1.78MB Category = 5 URLSite = http://www.chiark.greenend.org.uk/~sgtatham/putty/ -URLDownload = http://the.earth.li/~sgtatham/putty/latest/x86/putty-0.62-installer.exe +URLDownload = http://the.earth.li/~sgtatham/putty/latest/x86/putty-0.63-installer.exe CDPath = none [Section.0407] @@ -19,7 +19,7 @@ Description = Un ciente SSH, Telnet, rlogin y TCP gratuito. [Section.040c] Description = Un client SSH, Telnet, rlogin et raw TCP gratuit. -Size = 1,76 Mo +Size = 1,78 Mo [Section.0410] Description = Un client SSH, Telnet, rlogin, and raw TCP gratuito. @@ -32,7 +32,7 @@ Description = Darmowy klient obsługujący protokoły SSH, Telnet, rlogin oraz b [Section.0418] Description = Un client gratuit de SSH, Telnet, rlogin, and TCP brut. -Size = 1,76 Mo +Size = 1,78 Mo [Section.0422] Description = Безплатний SSH, Telnet, rlogin та raw TCP клієнт. diff --git a/base/applications/rapps/rapps/scite.txt b/base/applications/rapps/rapps/scite.txt index 7827522fcf8..a73139cc8a7 100644 --- a/base/applications/rapps/rapps/scite.txt +++ b/base/applications/rapps/rapps/scite.txt @@ -2,13 +2,13 @@ [Section] Name = SciTE -Version = 3.3.3 +Version = 3.3.5 Licence = Freeware Description = SciTE is a SCIntilla based Text Editor. Originally built to demonstrate Scintilla, it has grown to be a generally useful editor with facilities for building and running programs. -Size = 702kB +Size = 716kB Category = 7 URLSite = http://www.scintilla.org/ -URLDownload = http://heanet.dl.sourceforge.net/project/scintilla/SciTE/3.3.3/Sc333.exe +URLDownload = http://heanet.dl.sourceforge.net/project/scintilla/SciTE/3.3.5/Sc335.exe CDPath = none [Section.0407] @@ -19,7 +19,7 @@ Description = Editor de texto basado en SCIntilla. Originalmente creado para dem [Section.040c] Description = SciTE est un éditeur de texte basé sur SCIntilla. Originelement réalisé pour montrer Scintilla, il a évolué pour devenir un éditeur généralement utile avec des options pour compiler et lancer des programmes. -Size = 702 ko +Size = 716 ko [Section.0410] Description = SciTE è un editor di testo basato scintilla. Originariamente costruito per dimostrare Scintilla, è cresciuto fino a essere un editor generalmente utile con strutture per la creazione e l'esecuzione di programmi. @@ -33,7 +33,7 @@ Description = SciTE to edytor tekstu bazowany na SCIntilla. Oryginalnie stworzon [Section.0418] Licence = Gratuită Description = SciTE este un editor de text bazat pe SCIntilla. Construit inițial pentru a demonstra Scintilla, a crescut ulterior într-un editor de uz general cu funcționalități de compilare și execuție a programelor. -Size = 702 ko +Size = 716 ko [Section.0422] Description = Текстовий редактор на основі SCIntilla. Був зібраний як презентація Scintilla, але виріс до редактора загального користування з засобами збирання та запуску програм. diff --git a/base/applications/rapps/rapps/seamonkey.txt b/base/applications/rapps/rapps/seamonkey.txt index d536039a455..8bddbbc4788 100644 --- a/base/applications/rapps/rapps/seamonkey.txt +++ b/base/applications/rapps/rapps/seamonkey.txt @@ -2,44 +2,44 @@ [Section] Name = Mozilla SeaMonkey -Version = 2.17.1 +Version = 2.21 Licence = MPL/GPL/LGPL Description = Mozilla Suite is alive. This is the one and only Browser, Mail, Chat, and Composer bundle you will ever need. -Size = 21.61MB +Size = 21.83MB Category = 5 URLSite = http://www.seamonkey-project.org/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.17.1/win32/en-US/SeaMonkey%20Setup%202.17.1.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.21/win32/en-US/SeaMonkey%20Setup%202.21.exe CDPath = none [Section.0407] Description = Mozilla Suite lebt. Dies ist das einzige Browser-, Mail-, Chat- and Composerwerkzeug-Bundle welches Sie benötigen. -Size = 21.56MB -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.17.1/win32/de/SeaMonkey%20Setup%202.17.1.exe +Size = 21.71MB +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.21/win32/de/SeaMonkey%20Setup%202.21.exe [Section.040a] Description = La suite de Mozilla está viva. Es el primero y único navegador web, gestor de correo, lector de noticias, Chat y editor HTML que necesitarás. -Size = 21.51MB -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.17.1/win32/es-ES/SeaMonkey%20Setup%202.17.1.exe +Size = 21.69MB +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.21/win32/es-ES/SeaMonkey%20Setup%202.21.exe [Section.040c] Description = La suite Mozilla est en vie. Ceci est le seul et l'unique package navigateur, client mail, client chat et composer dont vous aurez besoin. -Size = 21,8 Mo -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.17.1/win32/fr/SeaMonkey%20Setup%202.17.1.exe +Size = 21,97 Mo +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.21/win32/fr/SeaMonkey%20Setup%202.21.exe [Section.0410] Description = Mozilla Suite è vivo. Questo è l'unico e solo Browser, Mail, Chat, e Composer di cui avrete mai bisogno... -Size = 21.5MB -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.17.1/win32/it/SeaMonkey%20Setup%202.17.1.exe +Size = 21.62MB +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.21/win32/it/SeaMonkey%20Setup%202.21.exe [Section.0413] Description = Mozilla Suite bundelt alle applicaties voor het Web: Browser, Mail, Chat, Composer. -Size = 22.1MB -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.17.1/win32/nl/SeaMonkey%20Setup%202.17.1.exe +Size = 22.31MB +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.21/win32/nl/SeaMonkey%20Setup%202.21.exe [Section.0415] Description = Pakiet Mozilla żyje. W zestawie: przeglądarka, klient poczty, IRC oraz Edytor HTML - wszystko, czego potrzebujesz. -Size = 22.41MB -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.17.1/win32/pl/SeaMonkey%20Setup%202.17.1.exe +Size = 22.56MB +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.21/win32/pl/SeaMonkey%20Setup%202.21.exe [Section.0418] Description = Suita Mozilla. Acest pachet ce încorporează navigator, poștă electronică, client IRC și editor HTML, acoperind astfel o arie largă de necesități. @@ -47,10 +47,10 @@ Size = 21,59 Mo [Section.0419] Description = Продолжение Mozilla Suite. Включает браузер, почтовый клиент, IRC-клиент и HTML-редактор. -Size = 22.03MB -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.17.1/win32/ru/SeaMonkey%20Setup%202.17.1.exe +Size = 22.17MB +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.21/win32/ru/SeaMonkey%20Setup%202.21.exe [Section.0422] Description = Продовження Mozilla Suite. Включає в себе браузер, поштовий клієнт, IRC-клієнт та HTML-редактор. Size = 22.03MB -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.17.1/win32/ru/SeaMonkey%20Setup%202.17.1.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/seamonkey/releases/2.21/win32/ru/SeaMonkey%20Setup%202.21.exe diff --git a/base/applications/rapps/rapps/smplayer.txt b/base/applications/rapps/rapps/smplayer.txt index fa378e558c2..66f1eb40f33 100644 --- a/base/applications/rapps/rapps/smplayer.txt +++ b/base/applications/rapps/rapps/smplayer.txt @@ -2,13 +2,13 @@ [Section] Name = SMPlayer -Version = 0.8.5 +Version = 0.8.6 Licence = GPL Description = Graphical Frontend for MPlayer. -Size = 16.09MB +Size = 16.98MB Category = 1 URLSite = http://smplayer.sourceforge.net/ -URLDownload = http://freefr.dl.sourceforge.net/project/smplayer/SMPlayer/0.8.5/smplayer-0.8.5-win32.exe +URLDownload = http://freefr.dl.sourceforge.net/project/smplayer/SMPlayer/0.8.6/smplayer-0.8.6-win32.exe CDPath = none [Section.0407] @@ -20,7 +20,7 @@ URLSite = http://smplayer.sourceforge.net/index.php?tr_lang=es Description = Interfaz gráfico para Mplayer (reproductor multimedia). [Section.040c] -Size = 16,09 Mo +Size = 16,98 Mo URLSite = http://smplayer.sourceforge.net/index.php?tr_lang=fr [Section.0410] @@ -36,7 +36,7 @@ Description = Graficzna nakładka na MPlayer, otwarty odtwarzacz filmów. [Section.0418] Description = Lector multimedia (interfață pentru MPlayer). -Size = 16,09 Mo +Size = 16,98 Mo URLSite = http://smplayer.sourceforge.net/index.php?tr_lang=ro [Section.0422] diff --git a/base/applications/rapps/rapps/stamina.txt b/base/applications/rapps/rapps/stamina.txt new file mode 100644 index 00000000000..0a0732a856d --- /dev/null +++ b/base/applications/rapps/rapps/stamina.txt @@ -0,0 +1,13 @@ +; UTF-8 + +[Section] +Name = Stamina 2.5 +Description = Free typing tutor. +URLSite = http://stamina.ru +Size = 4.7MB +Category = 8 +URLDownload = http://stamina.ru/files/StaminaSetup.exe +CDPath = none + +[Section.0407] +Description = Ein freies Schreiblernprogramm. diff --git a/base/applications/rapps/rapps/sumatrapdf.txt b/base/applications/rapps/rapps/sumatrapdf.txt index 7617918b2a1..15c131fcbbc 100644 --- a/base/applications/rapps/rapps/sumatrapdf.txt +++ b/base/applications/rapps/rapps/sumatrapdf.txt @@ -2,13 +2,13 @@ [Section] Name = SumatraPDF -Version = 2.3.2 +Version = 2.4 Licence = GPLv3 Description = Sumatra PDF is a slim, free, open-source PDF reader. Portable out of the box. -Size = 3.87MB +Size = 4.0MB Category = 6 URLSite = http://blog.kowalczyk.info/software/sumatrapdf/free-pdf-reader.html -URLDownload = https://kjkpub.s3.amazonaws.com/sumatrapdf/rel/SumatraPDF-2.3.2-install.exe +URLDownload = https://kjkpub.s3.amazonaws.com/sumatrapdf/rel/SumatraPDF-2.4-install.exe CDPath = none [Section.0407] @@ -19,7 +19,7 @@ Description = Sumatra PDF es un lector PDF ligero, libre y open-source. [Section.040c] Description = Sumatra PDF est un lecteur PDF léger, libre et open-source. -Size = 3,87 Mo +Size = 4,0 Mo [Section.0410] Description = Sumatra PDF è un visualizzatore di file PDF. E' molto leggero ed è open source. @@ -32,7 +32,7 @@ Description = Sumatra PDF to mały, darmowy, otwarty czytnik PDF. [Section.0418] Description = Lector PDF - ușor, gratuit (open-source), și portabil. -Size = 3,87 Mo +Size = 4,0 Mo URLSite = http://blog.kowalczyk.info/software/sumatrapdf/free-pdf-reader-ro.html [Section.0813] diff --git a/base/applications/rapps/rapps/supertux.txt b/base/applications/rapps/rapps/supertux.txt new file mode 100644 index 00000000000..ca06df7ed37 --- /dev/null +++ b/base/applications/rapps/rapps/supertux.txt @@ -0,0 +1,15 @@ +; UTF-8 + +[Section] +Name = SuperTux +Version = 0.1.3 +Licence = GPL +Description = SuperTux is a free, open-source two-dimensional platform game. +Size = 7.3MB +Category = 4 +URLSite = http://www.supertux.lethargik.org +URLDownload = http://files1.freesoft.ru/rep/694851/supertux-0.1.3-setup.exe +CDPath = none + +[Section.0407] +Description = SuperTux ist ein zweidimensionales, freies, Open Source Plattformspiel. diff --git a/base/applications/rapps/rapps/thunderbird5.txt b/base/applications/rapps/rapps/thunderbird5.txt index ca0206f9457..f8fac1706a3 100644 --- a/base/applications/rapps/rapps/thunderbird5.txt +++ b/base/applications/rapps/rapps/thunderbird5.txt @@ -1,66 +1,66 @@ ; UTF-8 [Section] -Name = Mozilla Thunderbird 17 -Version = 17.0.7 +Name = Mozilla Thunderbird 24 +Version = 24.0.1 Licence = MPL/GPL/LGPL Description = The most popular and one of the best free Mail Clients out there. -Size = 18.91MB +Size = 21.12MB Category = 5 URLSite = http://www.mozilla.org/en/thunderbird/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.7/win32/en-US/Thunderbird%20Setup%2017.0.7.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.0.1/win32/en-US/Thunderbird%20Setup%2024.0.1.exe CDPath = none [Section.0407] Description = Der populärste und einer der besten freien Mail-Clients. -Size = 18.77MB +Size = 20.96MB URLSite = http://www.mozilla-europe.org/de/products/thunderbird/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.7/win32/de/Thunderbird%20Setup%2017.0.7.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.0.1/win32/de/Thunderbird%20Setup%2024.0.1.exe [Section.040a] Description = El más popular y uno de los mejores clientes mail que hay. -Size = 18.73MB +Size = 21.12MB URLSite = http://www.mozilla-europe.org/es/products/thunderbird/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.7/win32/es-ES/Thunderbird%20Setup%2017.0.7.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.0.1/win32/es-ES/Thunderbird%20Setup%2024.0.1.exe [Section.040c] Description = Le plus populaire et l'un des meilleurs clients mail gratuits disponible. -Size = 19,06 Mo +Size = 21,26 Mo URLSite = http://www.mozilla-europe.org/fr/products/thunderbird/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.7/win32/fr/Thunderbird%20Setup%2017.0.7.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.0.1/win32/fr/Thunderbird%20Setup%2024.0.1.exe [Section.0410] Description = Il più popolare e il migliore Clients mail gratuito. -Size = 18.7MB +Size = 20.91MB URLSite = http://www.mozilla-europe.org/it/products/thunderbird/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.7/win32/it/Thunderbird%20Setup%2017.0.7.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.0.1/win32/it/Thunderbird%20Setup%2024.0.1.exe [Section.0413] Description = De meest populaire en een van de beste gratis e-mail-programma's. -Size = 19.28MB +Size = 21.60MB URLSite = http://www.mozilla-europe.org/nl/products/thunderbird/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.7/win32/nl/Thunderbird%20Setup%2017.0.7.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.0.1/win32/nl/Thunderbird%20Setup%2024.0.1.exe [Section.0415] Description = Najpopularniejszy i jeden z najlepszych darmowych klientów poczty. -Size = 19.62MB +Size = 21.79MB URLSite = http://www.mozilla-europe.org/pl/products/thunderbird/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.7/win32/pl/Thunderbird%20Setup%2017.0.7.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.0.1/win32/pl/Thunderbird%20Setup%2024.0.1.exe [Section.0418] Description = Cel mai popular și unul dintre cele mai bune clientele gratuite de poștă electronică. -Size = 19,28 Mo +Size = 21,47 Mo URLSite = http://www.mozilla-europe.org/ro/products/thunderbird/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.7/win32/ro/Thunderbird%20Setup%2017.0.7.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.0.1/win32/ro/Thunderbird%20Setup%2024.0.1.exe [Section.0419] Description = Один из самых популярных и лучших бесплатных почтовых клиентов. -Size = 19.19MB +Size = 21.38MB URLSite = http://www.mozilla-europe.org/ru/products/thunderbird/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.7/win32/ru/Thunderbird%20Setup%2017.0.7.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.0.1/win32/ru/Thunderbird%20Setup%2024.0.1.exe [Section.0422] Description = Найпопулярніший та один з кращих поштових клієнтів. -Size = 19.21MB +Size = 21.40MB URLSite = http://www.mozillamessaging.com/uk/thunderbird/ -URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/17.0.7/win32/uk/Thunderbird%20Setup%2017.0.7.exe +URLDownload = http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/24.0.1/win32/uk/Thunderbird%20Setup%2024.0.1.exe diff --git a/base/applications/rapps/rapps/utorrent.txt b/base/applications/rapps/rapps/utorrent.txt index f4dd85edab3..5dabc8d96b4 100644 --- a/base/applications/rapps/rapps/utorrent.txt +++ b/base/applications/rapps/rapps/utorrent.txt @@ -2,7 +2,7 @@ [Section] Name = µTorrent -Version = 3.3 +Version = 3.3.2 Licence = Freeware for non-commercial uses Description = Small and fast BitTorrent Client. Size = 1020.58kB diff --git a/base/applications/rapps/rapps/vlc.txt b/base/applications/rapps/rapps/vlc.txt index 1837f0756b8..59053e58633 100644 --- a/base/applications/rapps/rapps/vlc.txt +++ b/base/applications/rapps/rapps/vlc.txt @@ -2,13 +2,13 @@ [Section] Name = VLC media player -Version = 2.0.7 +Version = 2.1.0 Licence = GPL Description = A media player. -Size = 21.88MB +Size = 23.2MB Category = 1 URLSite = http://www.videolan.org/vlc/ -URLDownload = http://mirror.de.leaseweb.net/videolan/vlc/2.0.7/win32/vlc-2.0.7-win32.exe +URLDownload = http://mirror.de.leaseweb.net/videolan/vlc/2.1.0/win32/vlc-2.1.0-win32.exe CDPath = none [Section.0407] @@ -19,7 +19,7 @@ Description = Reproductor multimedia. [Section.040c] Description = Un lecteur media. -Size = 21,88 Mo +Size = 23,2 Mo [Section.0410] Description = Lettore multimediale. @@ -32,7 +32,7 @@ Description = Odtwarzacz multimediów. [Section.0418] Description = Lector multimedia. -Size = 21,88 Mo +Size = 23,2 Mo [Section.0419] Description = Мультимедийный проигрыватель. diff --git a/base/applications/rapps/rapps/zaz.txt b/base/applications/rapps/rapps/zaz.txt new file mode 100644 index 00000000000..64178cc94ec --- /dev/null +++ b/base/applications/rapps/rapps/zaz.txt @@ -0,0 +1,15 @@ +; UTF-8 + +[Section] +Name = Zaz +Version = 1.0.0 +Licence = GPL +Description = Zaz is a free software arcade action puzzle computer game, a little bit like Frozen Bubble. +Size = 21.0MB +Category = 4 +URLSite = http://zaz.sourceforge.net +URLDownload = http://files1.freesoft.ru/rep/704321/Zaz-1.0.0-Setup.exe +CDPath = none + +[Section.0407] +Description = Zaz ist ein freies Arcade Action Puzzle Spiel, ein wenig wie Frozen Bubble. diff --git a/base/applications/rapps/richedit.c b/base/applications/rapps/richedit.c index 79a64d60752..99b53d256b7 100644 --- a/base/applications/rapps/richedit.c +++ b/base/applications/rapps/richedit.c @@ -25,7 +25,7 @@ RichEditOnLink(HWND hwnd, ENLINK *Link) pLink = (PWSTR) HeapAlloc(GetProcessHeap(), 0, (max(Link->chrg.cpMin, Link->chrg.cpMax) - - min(Link->chrg.cpMin, Link->chrg.cpMax))*sizeof(WCHAR)); + min(Link->chrg.cpMin, Link->chrg.cpMax) + 1) * sizeof(WCHAR)); if (!pLink) { /* TODO: Error message */ diff --git a/base/applications/regedit/clb/clb.rc b/base/applications/regedit/clb/clb.rc index 5efa8847bc8..b815dcb0654 100644 --- a/base/applications/regedit/clb/clb.rc +++ b/base/applications/regedit/clb/clb.rc @@ -7,5 +7,6 @@ #define REACTOS_STR_ORIGINAL_FILENAME "clb.dll\0" #include -#include "rsrc.rc" +#include +#include "rsrc.rc" diff --git a/base/applications/regedit/clb/lang/tr-TR.rc b/base/applications/regedit/clb/lang/tr-TR.rc index 5e96551402c..e2cac49170a 100644 --- a/base/applications/regedit/clb/lang/tr-TR.rc +++ b/base/applications/regedit/clb/lang/tr-TR.rc @@ -25,7 +25,7 @@ BEGIN CHECKBOX "K&üme", 1703, 79, 92, 32, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP CHECKBOX "Se&kme Durağı", 1704, 79, 102, 44, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP PUSHBUTTON "Tamam", IDOK, 37, 125, 40, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "Vazgeç", IDCANCEL, 93, 125, 40, 14, BS_PUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "İptal", IDCANCEL, 93, 125, 40, 14, BS_PUSHBUTTON | WS_GROUP | WS_TABSTOP CHECKBOX "Ka&ydırmayı Etkinleştir", 1708, 79, 60, 66, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP END diff --git a/base/applications/regedit/lang/bg-BG.rc b/base/applications/regedit/lang/bg-BG.rc index 19a8243b96b..d313cef3e91 100644 --- a/base/applications/regedit/lang/bg-BG.rc +++ b/base/applications/regedit/lang/bg-BG.rc @@ -38,7 +38,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&Файл" BEGIN @@ -50,7 +50,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&Файл" BEGIN @@ -119,7 +119,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -180,7 +180,7 @@ END /* * Dialog */ -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Зареждане на рой" FONT 8, "Ms Shell Dlg" @@ -302,21 +302,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Име" IDS_LIST_COLUMN_TYPE "Вид" IDS_LIST_COLUMN_DATA "Данни" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Регистърен обработчик" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Съдържа команди за работа с целия регистър" ID_EDIT_MENU "Съдържа команди за промяна на стойности или ключове" @@ -326,7 +326,7 @@ BEGIN ID_EDIT_NEW_MENU "Съдържа команди за създаване на нови ключове или стойности" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Променя стойността" ID_EDIT_NEW_KEY "Добавя нов ключ" @@ -349,7 +349,7 @@ BEGIN ID_HELP_ABOUT "Показва сведения за приложението, версия и възпроизводствени права" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Затваря регистърния обработчик" ID_FAVOURITES_ADDTOFAVOURITES "Добавя ключове в списъка с любимките" @@ -364,7 +364,7 @@ BEGIN ID_EDIT_FINDNEXT "Намира следваща поява на указания за предишното търсене текст" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Грешка" IDS_WARNING "Предупреждение" @@ -389,7 +389,7 @@ BEGIN IDS_NEW_VALUE "Нова стойност #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(двоична стойност с нулева дължина)" IDS_DEFAULT_VALUE_NAME "(Подразбрана)" @@ -403,7 +403,7 @@ BEGIN IDS_INVALID_DWORD "(самостоятелна стойност на двойна дума)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Вписващ файл" IDS_FLT_REGFILES "Вписващи (регистърни) файлове (*.reg)" @@ -416,7 +416,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Пълен достъп" IDS_ACCESS_READ "Четене" @@ -432,14 +432,14 @@ BEGIN IDS_ACCESS_READCONTROL "Право на четене" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "Само този ключ" IDS_INHERIT_THISKEYANDSUBKEYS "Този ключ и подключовете му" IDS_INHERIT_SUBKEYSONLY "Само подключовете" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Разгръщане" IDS_COLLAPSE "&Свиване" @@ -447,7 +447,7 @@ BEGIN IDS_FINISHEDFIND "Търсенето в регистъра приключи." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -455,7 +455,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Шина №" IDS_INTERFACE "Интерфейс" @@ -476,7 +476,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Размер на данните" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Извод" IDS_PORT_MEMORY_IO "Памет" @@ -487,7 +487,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Четене/ запис" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Неуказан" IDS_BUS_INTERNAL "Вътрешен" @@ -516,7 +516,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -526,7 +526,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Добавяне в любимките" FONT 8, "MS Shell Dlg" @@ -537,7 +537,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Премахване на любимки" FONT 8, "MS Shell Dlg" @@ -549,7 +549,7 @@ BEGIN LTEXT "Избор на любимки:",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Търсене" FONT 8, "MS Shell Dlg" @@ -586,7 +586,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -598,7 +598,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Отваря помощта за Регистърния обработчик." * ID_HELP_ABOUT "Показва сведения за приложението, версията и възпроизводственото право." diff --git a/base/applications/regedit/lang/cs-CZ.rc b/base/applications/regedit/lang/cs-CZ.rc index f271fa426e2..3ea39336368 100644 --- a/base/applications/regedit/lang/cs-CZ.rc +++ b/base/applications/regedit/lang/cs-CZ.rc @@ -33,7 +33,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&Soubor" BEGIN @@ -45,7 +45,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&Registry" BEGIN @@ -114,7 +114,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -287,21 +287,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Název" IDS_LIST_COLUMN_TYPE "Typ" IDS_LIST_COLUMN_DATA "Data" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Editor registru" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Obsahuje příkazy pro práci s celým registrem" ID_EDIT_MENU "Obsahuje příkazy pro úpravu hodnot a klíčů" @@ -311,7 +311,7 @@ BEGIN ID_EDIT_NEW_MENU "Obsahuje příkazy pro vytváření nových klíčů a hodnot" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Upravuje data položky" ID_EDIT_NEW_KEY "Přidá nový klíč" @@ -334,7 +334,7 @@ BEGIN ID_HELP_ABOUT "Zobrazí informace o aplikaci, verzi a copyright" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Ukončí editor registru" ID_FAVOURITES_ADDTOFAVOURITES "Přidá klíč do seznamu oblíbených" @@ -349,7 +349,7 @@ BEGIN ID_EDIT_FINDNEXT "Vyhledá další výskyt textu zadaného v předchozím hledání" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Chyba" IDS_WARNING "Upozornění" @@ -374,7 +374,7 @@ BEGIN IDS_NEW_VALUE "Nová hodnota #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(binární položka nulové hodnoty)" IDS_DEFAULT_VALUE_NAME "(Výchozí)" @@ -388,7 +388,7 @@ BEGIN IDS_INVALID_DWORD "(Neplatná hodnota DWORD)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Soubor registru" IDS_FLT_REGFILES "Soubory registru (*.reg)" @@ -401,7 +401,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Úplné oprávnění" IDS_ACCESS_READ "Čtení" @@ -417,14 +417,14 @@ BEGIN IDS_ACCESS_READCONTROL "Oprávnění ke čtení" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "Pouze tento klíč" IDS_INHERIT_THISKEYANDSUBKEYS "Tento klíč a jeho podklíče" IDS_INHERIT_SUBKEYSONLY "Pouze podklíče" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Rozbalit" IDS_COLLAPSE "&Sbalit" @@ -432,7 +432,7 @@ BEGIN IDS_FINISHEDFIND "Prohledávání registru bylo dokončeno." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Přidáváním informací můžete neúmyslně změnit nebo odstranit hodnoty a způsobit, že komponenty přestanou správně fungovat\nPokud nevěříte zdroji těchto informací v '%s', nepřidávejte je do registru.\n\nOpravdu chcete pokračovat?" IDS_IMPORT_OK "Klíče a hodnoty z '%s' byly úspěšně přidány do registru." @@ -440,7 +440,7 @@ BEGIN IDS_EXPORT_ERROR "Nelze exportovat '%s': Chyba při vytváření či psaní do souboru. Došlo k chybě disku nebo souborového systému." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interface" @@ -461,7 +461,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memory" @@ -472,7 +472,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Read / Write" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefined" IDS_BUS_INTERNAL "Internal" @@ -501,7 +501,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -511,7 +511,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Načíst registr" FONT 8, "Ms Shell Dlg" @@ -522,7 +522,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Přidat do Oblíbených" FONT 8, "MS Shell Dlg" @@ -533,7 +533,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Odebrat z Oblíbených" FONT 8, "MS Shell Dlg" @@ -545,7 +545,7 @@ BEGIN LTEXT "Vyberte Oblíbené:",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Najít" FONT 8, "MS Shell Dlg" @@ -582,7 +582,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -594,7 +594,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Otevře nápovědu pro editor registru." * ID_HELP_ABOUT "Zobrazí informace o aplikaci, verzi a copyright." diff --git a/base/applications/regedit/lang/de-DE.rc b/base/applications/regedit/lang/de-DE.rc index 4aaf339dac8..b618e056a46 100644 --- a/base/applications/regedit/lang/de-DE.rc +++ b/base/applications/regedit/lang/de-DE.rc @@ -33,7 +33,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&Datei" BEGIN @@ -45,7 +45,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&Datei" BEGIN @@ -114,7 +114,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -287,21 +287,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Name" IDS_LIST_COLUMN_TYPE "Typ" IDS_LIST_COLUMN_DATA "Daten" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Registry-Editor" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Enthält Befehle für das Arbeiten mit der ganzen Registry" ID_EDIT_MENU "Enthält Befehle für das Ändern von Schlüsseln oder Werten" @@ -311,7 +311,7 @@ BEGIN ID_EDIT_NEW_MENU "Enthält Befehle für das Erstellen von neuen Schlüsseln oder Werten" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Ändert die Daten eines Wertes" ID_EDIT_NEW_KEY "Fügt einen neuen Schlüssel hinzu" @@ -334,7 +334,7 @@ BEGIN ID_HELP_ABOUT "Zeigt Programmname, Version und Copyright an" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Beendet den Registry-Editor" ID_FAVOURITES_ADDTOFAVOURITES "Fügt Schlüssel zu den Favoriten hinzu" @@ -349,7 +349,7 @@ BEGIN ID_EDIT_FINDNEXT "Findet nächste Zeichenkette" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Fehler" IDS_WARNING "Warnung" @@ -374,7 +374,7 @@ BEGIN IDS_NEW_VALUE "Neuer Wert #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(leerer Binärwert)" IDS_DEFAULT_VALUE_NAME "(Standard)" @@ -388,7 +388,7 @@ BEGIN IDS_INVALID_DWORD "(ungültiger DWORD-Wert)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Registrierungsdatei" IDS_FLT_REGFILES "Registrierungsdateien (*.reg)" @@ -401,7 +401,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Vollzugriff" IDS_ACCESS_READ "Lesen" @@ -417,14 +417,14 @@ BEGIN IDS_ACCESS_READCONTROL "Berechtigungen lesen" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "Nur diesen Schlüssel" IDS_INHERIT_THISKEYANDSUBKEYS "Dieser Schlüssel und dessen Unterschlüssel" IDS_INHERIT_SUBKEYSONLY "Nur Unterschlüssel" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Expandieren" IDS_COLLAPSE "&Schließen" @@ -432,7 +432,7 @@ BEGIN IDS_FINISHEDFIND "Durchsuchen der Registry beendet." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Das Hinzufügen von Informationen kann zu einer unbeabsichtigten Änderung oder Löschung vorhandener Werte führen.\n Einige Komponenten könnten dann möglicherweise nicht mehr ordnungsgemäß funktionieren.\nWenn Sie der Quelle von '%s' nicht trauen, sollten Sie die Informationen nicht einfügen.\n\nMöchten Sie fortfahren?" IDS_IMPORT_OK "Die Schlüssel und Werte aus '%s' wurden erfolgreich hinzugefügt." @@ -440,7 +440,7 @@ BEGIN IDS_EXPORT_ERROR "Fehler beim Speichern der Datei '%s': Datei kann nicht am angegebenen Ort gespeichert werden." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Busnummer" IDS_INTERFACE "Schnittstelle" @@ -461,7 +461,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Datengröße" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Anschluss" IDS_PORT_MEMORY_IO "Speicher" @@ -472,7 +472,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Lesen / Schreiben" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefiniert" IDS_BUS_INTERNAL "Intern" @@ -501,7 +501,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -511,7 +511,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Load Hive" FONT 8, "Ms Shell Dlg" @@ -522,7 +522,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Zu Favoriten hinzufügen" FONT 8, "MS Shell Dlg" @@ -533,7 +533,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Favoriten entfernen" FONT 8, "MS Shell Dlg" @@ -545,7 +545,7 @@ BEGIN LTEXT "Favorit(en) auswählen:",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Suchen" FONT 8, "MS Shell Dlg" @@ -582,7 +582,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -594,7 +594,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Öffnet die Hilfe." * ID_HELP_ABOUT "Zeigt Programmname, Version und Copyright an" diff --git a/base/applications/regedit/lang/el-GR.rc b/base/applications/regedit/lang/el-GR.rc index f6ace36961b..c74f94640be 100644 --- a/base/applications/regedit/lang/el-GR.rc +++ b/base/applications/regedit/lang/el-GR.rc @@ -33,7 +33,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&Αρχείο" BEGIN @@ -45,7 +45,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&Αρχείο" BEGIN @@ -114,7 +114,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -287,21 +287,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Όνομα" IDS_LIST_COLUMN_TYPE "Τύπος" IDS_LIST_COLUMN_DATA "Δεδομένα" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Registry Editor" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Περιέχει εντολές για εργασία σε όλη τη registry" ID_EDIT_MENU "Περιέχει εντολές για την επεξεργασία τιμών ή κλειδιών" @@ -311,7 +311,7 @@ BEGIN ID_EDIT_NEW_MENU "Περιέχει εντολές για τη δημηιουργία νέων τιμών ή κλειδιών" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Τροποποιεί τα δεδομένα της τιμής" ID_EDIT_NEW_KEY "Προσθέτει νέο κλειδί" @@ -334,7 +334,7 @@ BEGIN ID_HELP_ABOUT "Εμφανίζει τις πληροφορίες προγράμματος, τον αριθμό έκδοσης και τα δικαιώματα" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Κλείνει τον registry editor" ID_FAVOURITES_ADDTOFAVOURITES "Προσθέτει κλειδιά στη λίστα αγαπημένων" @@ -349,7 +349,7 @@ BEGIN ID_EDIT_FINDNEXT "Βρίσκει την επόμενη τοποθεσία του επιλεγμένου αλφαριθμητικού της προηγούμενης αναζήτησης" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Σφάλμα" IDS_WARNING "Προειδοποίηση" @@ -374,7 +374,7 @@ BEGIN IDS_NEW_VALUE "Νέα Τιμή #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(δυαδική τιμή μηδενικού μεγέθους)" IDS_DEFAULT_VALUE_NAME "(Προεπιλεγμένο)" @@ -388,7 +388,7 @@ BEGIN IDS_INVALID_DWORD "(μη έγκυρη DWORD τιμή)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Registration File" IDS_FLT_REGFILES "Registration αρχεία (*.reg)" @@ -401,7 +401,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Πλήρης Έλεγχος" IDS_ACCESS_READ "Διάβασμα" @@ -417,14 +417,14 @@ BEGIN IDS_ACCESS_READCONTROL "Read Control" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "Μόνο αυτό το κλειδί" IDS_INHERIT_THISKEYANDSUBKEYS "Αυτό το κλειδί και τα υποκλειδιά" IDS_INHERIT_SUBKEYSONLY "Μόνο τα υποκλειδιά" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Expand" IDS_COLLAPSE "&Collapse" @@ -432,7 +432,7 @@ BEGIN IDS_FINISHEDFIND "Τέλος αναζήτησης στη registry." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -440,7 +440,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interface" @@ -461,7 +461,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memory" @@ -472,7 +472,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Read / Write" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefined" IDS_BUS_INTERNAL "Internal" @@ -501,7 +501,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -511,7 +511,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Load Hive" FONT 8, "Ms Shell Dlg" @@ -522,7 +522,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Προσθήκη στα αγαπημένα" FONT 8, "MS Shell Dlg" @@ -533,7 +533,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Αφαίρεση Αγαπημένων" FONT 8, "MS Shell Dlg" @@ -545,7 +545,7 @@ BEGIN LTEXT "Επιλογή Αγαπημένου(ων):",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Εύρεση" FONT 8, "MS Shell Dlg" @@ -582,7 +582,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -594,7 +594,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Opens Registry Editor Help." * ID_HELP_ABOUT "Displays program information, version number, and copyright." diff --git a/base/applications/regedit/lang/en-US.rc b/base/applications/regedit/lang/en-US.rc index 33c7f5f9f7e..cdf30448de5 100644 --- a/base/applications/regedit/lang/en-US.rc +++ b/base/applications/regedit/lang/en-US.rc @@ -33,7 +33,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&File" BEGIN @@ -45,7 +45,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&File" BEGIN @@ -114,7 +114,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -287,21 +287,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Name" IDS_LIST_COLUMN_TYPE "Type" IDS_LIST_COLUMN_DATA "Data" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Registry Editor" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Contains commands for working with the whole registry" ID_EDIT_MENU "Contains commands for editing values or keys" @@ -311,7 +311,7 @@ BEGIN ID_EDIT_NEW_MENU "Contains commands for creating new keys or values" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Modifies the value's data" ID_EDIT_NEW_KEY "Adds a new key" @@ -334,7 +334,7 @@ BEGIN ID_HELP_ABOUT "Displays program information, version number and copyright" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Quits the registry editor" ID_FAVOURITES_ADDTOFAVOURITES "Adds keys to the favourites list" @@ -349,7 +349,7 @@ BEGIN ID_EDIT_FINDNEXT "Finds next occurrence of text specified in previous search" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Error" IDS_WARNING "Warning" @@ -374,7 +374,7 @@ BEGIN IDS_NEW_VALUE "New Value #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(zero-length binary value)" IDS_DEFAULT_VALUE_NAME "(Default)" @@ -388,7 +388,7 @@ BEGIN IDS_INVALID_DWORD "(invalid DWORD value)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Registration File" IDS_FLT_REGFILES "Registration Files (*.reg)" @@ -401,7 +401,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Full Control" IDS_ACCESS_READ "Read" @@ -417,14 +417,14 @@ BEGIN IDS_ACCESS_READCONTROL "Read Control" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "This key only" IDS_INHERIT_THISKEYANDSUBKEYS "This key and subkeys" IDS_INHERIT_SUBKEYSONLY "Subkeys only" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Expand" IDS_COLLAPSE "&Collapse" @@ -432,7 +432,7 @@ BEGIN IDS_FINISHEDFIND "Finished searching through the registry." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -440,7 +440,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interface" @@ -461,7 +461,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memory" @@ -472,7 +472,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Read / Write" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefined" IDS_BUS_INTERNAL "Internal" @@ -501,7 +501,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -514,7 +514,7 @@ END // // Dialog resources // -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Load Hive" FONT 8, "Ms Shell Dlg" @@ -525,7 +525,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Add to Favorites" FONT 8, "MS Shell Dlg" @@ -536,7 +536,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remove Favorites" FONT 8, "MS Shell Dlg" @@ -548,7 +548,7 @@ BEGIN LTEXT "Select Favorite(s):",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Find" FONT 8, "MS Shell Dlg" @@ -585,7 +585,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -597,7 +597,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Opens Registry Editor Help." * ID_HELP_ABOUT "Displays program information, version number, and copyright." diff --git a/base/applications/regedit/lang/es-ES.rc b/base/applications/regedit/lang/es-ES.rc index 14addd7d07c..2569922b14a 100644 --- a/base/applications/regedit/lang/es-ES.rc +++ b/base/applications/regedit/lang/es-ES.rc @@ -36,7 +36,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&Archivo" BEGIN @@ -48,7 +48,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&Registro" BEGIN @@ -117,7 +117,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -290,21 +290,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Nombre" IDS_LIST_COLUMN_TYPE "Tipo" IDS_LIST_COLUMN_DATA "Datos" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Editor de registro" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Contiene comandos para trabajar con el registro completo" ID_EDIT_MENU "Contiene comandos para editar valores o claves" @@ -314,7 +314,7 @@ BEGIN ID_EDIT_NEW_MENU "Contiene comandos para crear nuevas claves o valores" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Modifica los datos del valor" ID_EDIT_NEW_KEY "Añade una nueva clave" @@ -337,7 +337,7 @@ BEGIN ID_HELP_ABOUT "Muestra información del programa, número de versión y derechos de autor" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Sale del editor de registro" ID_FAVOURITES_ADDTOFAVOURITES "Añade claves a la lista de favoritos" @@ -352,7 +352,7 @@ BEGIN ID_EDIT_FINDNEXT "Busca la siguiente ocurrencia del texto especificado en la búsqueda anterior" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Error" IDS_WARNING "Aviso" @@ -377,7 +377,7 @@ BEGIN IDS_NEW_VALUE "Nuevo Valor #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(valor binario de longitud cero)" IDS_DEFAULT_VALUE_NAME "(Por Defecto)" @@ -391,7 +391,7 @@ BEGIN IDS_INVALID_DWORD "(valor DWORD invalido)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Fichero de Registro" IDS_FLT_REGFILES "Fichero de Registro (*.reg)" @@ -404,7 +404,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Control Total" IDS_ACCESS_READ "Lectura" @@ -420,14 +420,14 @@ BEGIN IDS_ACCESS_READCONTROL "Controles de Lectura" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "Esta clave solamente" IDS_INHERIT_THISKEYANDSUBKEYS "Esta clave y sus subclaves" IDS_INHERIT_SUBKEYSONLY "Subclaves solamente" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Expandir" IDS_COLLAPSE "&Colapsar" @@ -435,7 +435,7 @@ BEGIN IDS_FINISHEDFIND "Finalizado la busqueda del registro." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -443,7 +443,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interface" @@ -464,7 +464,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memory" @@ -475,7 +475,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Read / Write" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefined" IDS_BUS_INTERNAL "Internal" @@ -504,7 +504,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -514,7 +514,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT,25,34,245,12 END -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Load Hive" FONT 8, "Ms Shell Dlg" @@ -525,7 +525,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Añadir a Favoritos" FONT 8, "MS Shell Dlg" @@ -536,7 +536,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Quitar favoritos" FONT 8, "MS Shell Dlg" @@ -548,7 +548,7 @@ BEGIN LTEXT "Seleccionar favorito(s):",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Buscar" FONT 8, "MS Shell Dlg" @@ -585,7 +585,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -597,7 +597,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Abre la ayuda del Editor de registro." * ID_HELP_ABOUT "Despliega información del programa, versión y licencia." diff --git a/base/applications/regedit/lang/fr-FR.rc b/base/applications/regedit/lang/fr-FR.rc index 46f29a26044..d1b565c1dd6 100644 --- a/base/applications/regedit/lang/fr-FR.rc +++ b/base/applications/regedit/lang/fr-FR.rc @@ -36,7 +36,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&Fichier" BEGIN @@ -48,7 +48,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&Fichier" BEGIN @@ -111,7 +111,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -284,21 +284,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Nom" IDS_LIST_COLUMN_TYPE "Type" IDS_LIST_COLUMN_DATA "Valeur" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Éditeur de registres" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Contient des commandes pour travailler sur les registres de manière globale" ID_EDIT_MENU "Contient des commandes pour éditer des valeurs ou des clés" @@ -308,7 +308,7 @@ BEGIN ID_EDIT_NEW_MENU "Contient des commandes pour créer de nouvelles clés ou valeurs" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Modifie les données d'une valeur" ID_EDIT_NEW_KEY "Ajoute une nouvelle clé" @@ -330,7 +330,7 @@ BEGIN ID_HELP_ABOUT "Affiche de l'information sur le programme, le numéro de version et le copyright" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Quitte l'éditeur de registres" ID_FAVOURITES_ADDTOFAVOURITES "Ajoute des clés à la liste des Favoris" @@ -345,7 +345,7 @@ BEGIN ID_EDIT_FINDNEXT "Recherche l'occurrence suivante du texte de la dernière recherche" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Erreur" IDS_WARNING "Attention" @@ -370,7 +370,7 @@ BEGIN IDS_NEW_VALUE "Nouvelle valeur #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(valeur binaire de longueur nulle)" IDS_DEFAULT_VALUE_NAME "(Défaut)" @@ -384,7 +384,7 @@ BEGIN IDS_INVALID_DWORD "(valeur mot double invalide)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Fichier d'enregistrement" IDS_FLT_REGFILES "Fichiers d'enregistrement (*.reg)" @@ -397,7 +397,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Contrôle total" IDS_ACCESS_READ "Lecture" @@ -413,14 +413,14 @@ BEGIN IDS_ACCESS_READCONTROL "Contrôle en lecture" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "Seulement cette clé" IDS_INHERIT_THISKEYANDSUBKEYS "Cette clé et les sous-clés" IDS_INHERIT_SUBKEYSONLY "Les sous-clés seulement" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "Dérouler" IDS_COLLAPSE "Réduire" @@ -428,7 +428,7 @@ BEGIN IDS_FINISHEDFIND "Recherche dans le registre terminée." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "L'ajout d'informations peut involontairement modifier ou supprimer des valeurs et endommager le fonctionnement de composants.\nSi vous n'êtes pas sûr de la source de ces informations dans '%s', ne les ajoutez pas au Registre.\n\nÊtes-vous sûr de vouloir continuer ?" IDS_IMPORT_OK "Les clés et valeurs contenues dans '%s' ont été correctement ajoutées au Registre." @@ -436,7 +436,7 @@ BEGIN IDS_EXPORT_ERROR "Impossible d'exporter dans le fichier '%s' à la suite d'une erreur lors de sa création ou d'une tentative d'écriture, pouvant être due à une erreur de disque ou de système de fichiers." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Numéro de bus" IDS_INTERFACE "Interface" @@ -457,7 +457,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Taille des données" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Mémoire" @@ -468,7 +468,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Lecture / Écriture" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Indéfini" IDS_BUS_INTERNAL "Interne" @@ -497,7 +497,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -507,7 +507,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Charger une ruche" FONT 8, "Ms Shell Dlg" @@ -518,7 +518,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Ajouter aux favoris" FONT 8, "MS Shell Dlg" @@ -529,7 +529,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Supprimer des favoris" FONT 8, "MS Shell Dlg" @@ -541,7 +541,7 @@ BEGIN LTEXT "Sélectionnez le(s) favori(s) :",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Chercher" FONT 8, "MS Shell Dlg" @@ -578,7 +578,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -590,7 +590,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Ouvre l'aide de l'éditeur de registres." * ID_HELP_ABOUT "Affiche de l'information sur le programme, le numéro de version et le copyright." diff --git a/base/applications/regedit/lang/he-IL.rc b/base/applications/regedit/lang/he-IL.rc index 0c0f89d1844..505f4df38e3 100644 --- a/base/applications/regedit/lang/he-IL.rc +++ b/base/applications/regedit/lang/he-IL.rc @@ -34,7 +34,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&קובץ" BEGIN @@ -46,7 +46,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&קובץ" BEGIN @@ -115,7 +115,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -288,21 +288,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "שם" IDS_LIST_COLUMN_TYPE "סוג" IDS_LIST_COLUMN_DATA "מידע" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "עורך הרשום" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Contains commands for working with the whole registry" ID_EDIT_MENU "Contains commands for editing values or keys" @@ -312,7 +312,7 @@ BEGIN ID_EDIT_NEW_MENU "Contains commands for creating new keys or values" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Modifies the value's data" ID_EDIT_NEW_KEY "Adds a new key" @@ -335,7 +335,7 @@ BEGIN ID_HELP_ABOUT "Displays program information, version number and copyright" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Quits the registry editor" ID_FAVOURITES_ADDTOFAVOURITES "Adds keys to the favourites list" @@ -350,7 +350,7 @@ BEGIN ID_EDIT_FINDNEXT "Finds next occurrence of text specified in previous search" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "שגיאה" IDS_WARNING "אזהרה" @@ -375,7 +375,7 @@ BEGIN IDS_NEW_VALUE "New Value #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(zero-length binary value)" IDS_DEFAULT_VALUE_NAME "(ברירת מחדל)" @@ -389,7 +389,7 @@ BEGIN IDS_INVALID_DWORD "(invalid DWORD value)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "קובץ רשום" IDS_FLT_REGFILES "קבצי רשום (*.reg)" @@ -402,7 +402,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "שליטה מלאה" IDS_ACCESS_READ "קרא" @@ -418,14 +418,14 @@ BEGIN IDS_ACCESS_READCONTROL "Read Control" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "This key only" IDS_INHERIT_THISKEYANDSUBKEYS "This key and subkeys" IDS_INHERIT_SUBKEYSONLY "Subkeys only" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "הרחב" IDS_COLLAPSE "כווץ" @@ -433,7 +433,7 @@ BEGIN IDS_FINISHEDFIND "Finished searching through the registry." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -441,7 +441,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "ממשק" @@ -462,7 +462,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "יציאה" IDS_PORT_MEMORY_IO "זיכרון" @@ -473,7 +473,7 @@ BEGIN IDS_MEMORY_READ_WRITE "קריאה / כתיבה" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "לא מוגדר" IDS_BUS_INTERNAL "פנימי" @@ -502,7 +502,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -515,7 +515,7 @@ END // // Dialog resources // -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "טעינת כוורות" FONT 8, "Ms Shell Dlg" @@ -526,7 +526,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "ביטול", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "הוספה למועדפים" FONT 8, "MS Shell Dlg" @@ -537,7 +537,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "הסרת מועדפים" FONT 8, "MS Shell Dlg" @@ -549,7 +549,7 @@ BEGIN LTEXT "בחירת מועדפים:",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "חפש" FONT 8, "MS Shell Dlg" @@ -586,7 +586,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -598,7 +598,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Opens Registry Editor Help." * ID_HELP_ABOUT "Displays program information, version number, and copyright." diff --git a/base/applications/regedit/lang/hu-HU.rc b/base/applications/regedit/lang/hu-HU.rc index e299293482b..3adcdb091b4 100644 --- a/base/applications/regedit/lang/hu-HU.rc +++ b/base/applications/regedit/lang/hu-HU.rc @@ -34,7 +34,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&File" BEGIN @@ -46,7 +46,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&Registry" BEGIN @@ -115,7 +115,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -288,21 +288,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Name" IDS_LIST_COLUMN_TYPE "Type" IDS_LIST_COLUMN_DATA "Data" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Registry Editor" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Contains commands for working with the whole registry" ID_EDIT_MENU "Contains commands for editing values or keys" @@ -312,7 +312,7 @@ BEGIN ID_EDIT_NEW_MENU "Contains commands for creating new keys or values" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Modifies the value's data" ID_EDIT_NEW_KEY "Adds a new key" @@ -335,7 +335,7 @@ BEGIN ID_HELP_ABOUT "Displays program information, version number and copyright" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Quits the registry editor" ID_FAVOURITES_ADDTOFAVOURITES "Adds keys to the favourites list" @@ -350,7 +350,7 @@ BEGIN ID_EDIT_FINDNEXT "Finds next occurrence of text specified in previous search" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Error" IDS_WARNING "Warning" @@ -375,7 +375,7 @@ BEGIN IDS_NEW_VALUE "New Value #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(zero-length binary value)" IDS_DEFAULT_VALUE_NAME "(Default)" @@ -389,7 +389,7 @@ BEGIN IDS_INVALID_DWORD "(invalid DWORD value)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Registration File" IDS_FLT_REGFILES "Registration Files (*.reg)" @@ -402,7 +402,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Full Control" IDS_ACCESS_READ "Read" @@ -418,14 +418,14 @@ BEGIN IDS_ACCESS_READCONTROL "Read Control" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "This key only" IDS_INHERIT_THISKEYANDSUBKEYS "This key and subkeys" IDS_INHERIT_SUBKEYSONLY "Subkeys only" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Expand" IDS_COLLAPSE "&Collapse" @@ -433,7 +433,7 @@ BEGIN IDS_FINISHEDFIND "Finished searching through the registry." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -441,7 +441,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interface" @@ -462,7 +462,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memory" @@ -473,7 +473,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Read / Write" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefined" IDS_BUS_INTERNAL "Internal" @@ -502,7 +502,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -512,7 +512,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Load Hive" FONT 8, "Ms Shell Dlg" @@ -523,7 +523,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Add to Favorites" FONT 8, "MS Shell Dlg" @@ -534,7 +534,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remove Favorites" FONT 8, "MS Shell Dlg" @@ -546,7 +546,7 @@ BEGIN LTEXT "Select Favorite(s):",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Find" FONT 8, "MS Shell Dlg" @@ -583,7 +583,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -595,7 +595,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Opens Registry Editor Help." * ID_HELP_ABOUT "Displays program information, version number, and copyright." diff --git a/base/applications/regedit/lang/id-ID.rc b/base/applications/regedit/lang/id-ID.rc index 1c628cc4119..d20b97e6454 100644 --- a/base/applications/regedit/lang/id-ID.rc +++ b/base/applications/regedit/lang/id-ID.rc @@ -33,7 +33,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&File" BEGIN @@ -45,7 +45,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&File" BEGIN @@ -113,7 +113,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -286,21 +286,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Nama" IDS_LIST_COLUMN_TYPE "Tipe" IDS_LIST_COLUMN_DATA "Data" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Editor Registry" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Berisi perintah untuk bekerja dengan registri keseluruhan" ID_EDIT_MENU "Berisi perintah untuk mengedit nilai atau kunci" @@ -310,7 +310,7 @@ BEGIN ID_EDIT_NEW_MENU "Berisi perintah untuk membuat kunci atau nilai baru" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Memodifikasi data nilail" ID_EDIT_NEW_KEY "Menambah kunci baru" @@ -333,7 +333,7 @@ BEGIN ID_HELP_ABOUT "Menampilkan informasi program, nomor versi, dan hak cipta" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Keluar dari editor registri" ID_FAVOURITES_ADDTOFAVOURITES "Menambah kunci ke daftar favourit" @@ -348,7 +348,7 @@ BEGIN ID_EDIT_FINDNEXT "Mencari kejadian berikutnya atas teks yang ditetapkan dalam pencarian sebelumnya" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Salah" IDS_WARNING "Peringatan" @@ -373,7 +373,7 @@ BEGIN IDS_NEW_VALUE "Nilai Baru #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(nilai biner panjang-nol)" IDS_DEFAULT_VALUE_NAME "(Standar)" @@ -387,7 +387,7 @@ BEGIN IDS_INVALID_DWORD "(nilai DWORD tidak benar)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Registration File" IDS_FLT_REGFILES "File Registrasi (*.reg)" @@ -400,7 +400,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Kontrol Penuh" IDS_ACCESS_READ "Baca" @@ -416,14 +416,14 @@ BEGIN IDS_ACCESS_READCONTROL "Kontrol Baca" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "Hanya kunci ini" IDS_INHERIT_THISKEYANDSUBKEYS "Kunci ini dan subkunci" IDS_INHERIT_SUBKEYSONLY "hanya Subkunci" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Lebarkan" IDS_COLLAPSE "&Sempitkan" @@ -431,7 +431,7 @@ BEGIN IDS_FINISHEDFIND "Selesai mencari seluruh registri." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -439,7 +439,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interface" @@ -460,7 +460,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memory" @@ -471,7 +471,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Read / Write" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefined" IDS_BUS_INTERNAL "Internal" @@ -500,7 +500,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -510,7 +510,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Load Hive" FONT 8, "Ms Shell Dlg" @@ -521,7 +521,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Tamah ke Favorit" FONT 8, "MS Shell Dlg" @@ -532,7 +532,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Hapus Favorit" FONT 8, "MS Shell Dlg" @@ -544,7 +544,7 @@ BEGIN LTEXT "Pilih Favorit:",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Cari" FONT 8, "MS Shell Dlg" @@ -581,7 +581,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -593,7 +593,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Opens Registry Editor Help." * ID_HELP_ABOUT "Displays program information, version number, and copyright." diff --git a/base/applications/regedit/lang/it-IT.rc b/base/applications/regedit/lang/it-IT.rc index f356be56b01..5954d70de61 100644 --- a/base/applications/regedit/lang/it-IT.rc +++ b/base/applications/regedit/lang/it-IT.rc @@ -36,7 +36,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&File" BEGIN @@ -48,7 +48,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&Registro" BEGIN @@ -116,7 +116,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -289,21 +289,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Nome" IDS_LIST_COLUMN_TYPE "Tipo" IDS_LIST_COLUMN_DATA "Dati" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Editor del Registro" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Contiene i comandi per lavorare su tutto il Registro" ID_EDIT_MENU "Contiene i comandi per modificare valori o chiavi" @@ -313,7 +313,7 @@ BEGIN ID_EDIT_NEW_MENU "Contiene i comandi per creare nuove chiavi o valori" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Modifica i dati del valore" ID_EDIT_NEW_KEY "Aggiunge una nuova chiave" @@ -336,7 +336,7 @@ BEGIN ID_HELP_ABOUT "Visualizza informazioni sul programma, numero di versione e copyright" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Esce dall'editor del Registro" ID_FAVOURITES_ADDTOFAVOURITES "Aggiunge una chiave alla lista dei Preferiti" @@ -351,7 +351,7 @@ BEGIN ID_EDIT_FINDNEXT "Trova la volta successiva il testo specificato nella ricerca precedente" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Errore" IDS_WARNING "Segnalazione" @@ -376,7 +376,7 @@ BEGIN IDS_NEW_VALUE "Nuovo valore #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(valore binario di lunghezza nulla)" IDS_DEFAULT_VALUE_NAME "(predefinito)" @@ -390,7 +390,7 @@ BEGIN IDS_INVALID_DWORD "(valore DWORD non valido)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "File di Registrazione" IDS_FLT_REGFILES "File di Registrazione (*.reg)" @@ -403,7 +403,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Controllo completo" IDS_ACCESS_READ "Lettura" @@ -419,14 +419,14 @@ BEGIN IDS_ACCESS_READCONTROL "Controllo di lettura" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "Solo questa chiave" IDS_INHERIT_THISKEYANDSUBKEYS "Questa chiave e sottochiavi" IDS_INHERIT_SUBKEYSONLY "Solo sottochiavi" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Espandi" IDS_COLLAPSE "&Raccogli" @@ -434,7 +434,7 @@ BEGIN IDS_FINISHEDFIND "Fine ricerca nel registro." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Aggiungendo informazioni si possono involontariamente modificare o eliminare i valori e causare il giusto funzionamente dei componenti.\n Se non si considera attendibile la fonte di queste informazioni in '% s', non aggiungere al Registro di sistema.\n\n Si desidera continuare? " IDS_IMPORT_OK "Le chiavi e i valori contenuti in '% s' sono stati correttamente aggiunti al Registro di sistema." @@ -442,7 +442,7 @@ BEGIN IDS_EXPORT_ERROR "Impossibile esportare '% s': Errore durante la creazione o la scrittura del file. Ci può essere un disco o un file di sistema danneggiato." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interfaccia" @@ -463,7 +463,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Lunghezza dati" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Porta" IDS_PORT_MEMORY_IO "Memoria" @@ -474,7 +474,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Leggi / Scrivi" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Indefinito" IDS_BUS_INTERNAL "Interno" @@ -503,7 +503,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -516,7 +516,7 @@ END // // Dialog resources // -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Carica Hive" FONT 8, "Ms Shell Dlg" @@ -527,7 +527,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Annulla", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Aggiungi ai preferiti" FONT 8, "MS Shell Dlg" @@ -538,7 +538,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Rimuovi preferiti" FONT 8, "MS Shell Dlg" @@ -550,7 +550,7 @@ BEGIN LTEXT "Scegli preferiti:",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Trova" FONT 8, "MS Shell Dlg" @@ -587,7 +587,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -599,7 +599,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Opens Registry Editor Help." * ID_HELP_ABOUT "Displays program information, version number, and copyright." diff --git a/base/applications/regedit/lang/ja-JP.rc b/base/applications/regedit/lang/ja-JP.rc index 49390f63c5f..b346e04fe6c 100644 --- a/base/applications/regedit/lang/ja-JP.rc +++ b/base/applications/regedit/lang/ja-JP.rc @@ -33,7 +33,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "ファイル(&F)" BEGIN @@ -45,7 +45,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "ファイル(&F)" BEGIN @@ -114,7 +114,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -287,21 +287,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "名前" IDS_LIST_COLUMN_TYPE "種類" IDS_LIST_COLUMN_DATA "データ" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "レジストリ エディタ" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "レジストリ全体で使用するコマンドです。" ID_EDIT_MENU "値やキーを編集するコマンドです。" @@ -311,7 +311,7 @@ BEGIN ID_EDIT_NEW_MENU "新しいキーや値を作成するコマンドです。" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "値のデータを変更します。" ID_EDIT_NEW_KEY "新しいキーを追加します。" @@ -334,7 +334,7 @@ BEGIN ID_HELP_ABOUT "プログラムの情報、バージョン番号および著作権を表示します。" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "レジストリ エディタを終了します。" ID_FAVOURITES_ADDTOFAVOURITES "お気に入りの一覧にキーを追加します。" @@ -349,7 +349,7 @@ BEGIN ID_EDIT_FINDNEXT "前回と同じ条件で次の項目を検索します。" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "エラー" IDS_WARNING "警告" @@ -374,7 +374,7 @@ BEGIN IDS_NEW_VALUE "新しい値 #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(長さ 0 のバイナリ値)" IDS_DEFAULT_VALUE_NAME "(既定値)" @@ -388,7 +388,7 @@ BEGIN IDS_INVALID_DWORD "(無効な DWORD 値)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "登録ファイル" IDS_FLT_REGFILES "登録ファイル (*.reg)" @@ -401,7 +401,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "フル コントロール" IDS_ACCESS_READ "読み取り" @@ -417,14 +417,14 @@ BEGIN IDS_ACCESS_READCONTROL "読み取り制御" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "このキーのみ" IDS_INHERIT_THISKEYANDSUBKEYS "このキーとサブキー" IDS_INHERIT_SUBKEYSONLY "サブキーのみ" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "展開(&E)" IDS_COLLAPSE "閉じる(&C)" @@ -432,7 +432,7 @@ BEGIN IDS_FINISHEDFIND "レジストリをすべて検索しました。" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "情報を追加することは、意図せずに値を変更または削除し、コンポーネントの正しい動作の停止を引き起こすかも知れません。\nもし '%1' の情報の入手元を信頼していないのなら、レジストリに追加しないで下さい。\n\n続行しますか?" IDS_IMPORT_OK "'%1' に含まれるキーと値は、正しくレジストリに追加されました。" @@ -440,7 +440,7 @@ BEGIN IDS_EXPORT_ERROR "'%1' をエクスポートできません: ファイルを作成または書き込むときにエラーが発生しました。ディスクかファイル システムのエラーかも知れません。" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interface" @@ -461,7 +461,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memory" @@ -472,7 +472,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Read / Write" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefined" IDS_BUS_INTERNAL "Internal" @@ -501,7 +501,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 9, "MS UI Gothic" BEGIN @@ -511,7 +511,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "ハイブを読み込む" FONT 9, "MS UI Gothic" @@ -522,7 +522,7 @@ FONT 9, "MS UI Gothic" PUSHBUTTON "キャンセル", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "お気に入りに追加" FONT 9, "MS UI Gothic" @@ -533,7 +533,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "お気に入りの削除" FONT 9, "MS UI Gothic" @@ -545,7 +545,7 @@ BEGIN LTEXT "お気に入りの選択:",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "検索" FONT 9, "MS UI Gothic" @@ -582,7 +582,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -594,7 +594,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "レジストリ エディタのヘルプを開きます。" * ID_HELP_ABOUT "プログラムの情報、バージョン番号および著作権を表示します。" diff --git a/base/applications/regedit/lang/ko-KR.rc b/base/applications/regedit/lang/ko-KR.rc index fd371da8295..65f19ad9eb0 100644 --- a/base/applications/regedit/lang/ko-KR.rc +++ b/base/applications/regedit/lang/ko-KR.rc @@ -18,7 +18,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "파일(&F)" BEGIN @@ -30,7 +30,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "파일(&F)" BEGIN @@ -99,7 +99,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -272,21 +272,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "이름" IDS_LIST_COLUMN_TYPE "종류" IDS_LIST_COLUMN_DATA "데이터" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "레지스트리 편집기" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "전체 레지스트리를 관리하기 위한 명령어를 제공합니다" ID_EDIT_MENU "값이나 키를 편집하기 위한 명령어를 제공합니다" @@ -296,7 +296,7 @@ BEGIN ID_EDIT_NEW_MENU "새 키나 값을 만들기 위한 명령어를 제공합니다" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "값의 데이터를 수정합니다" ID_EDIT_NEW_KEY "새 키를 추가합니다" @@ -319,7 +319,7 @@ BEGIN ID_HELP_ABOUT "프로그램 정보, 벼젼과 라이센스를 표시합니다" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "레지스트리 에디터를 종료합니다" ID_FAVOURITES_ADDTOFAVOURITES "키를 즐겨찾기 리스트에 추가합니다" @@ -334,7 +334,7 @@ BEGIN ID_EDIT_FINDNEXT "전의 검색에서 찾은 문자열을 계속 찾습니다" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "에러" IDS_WARNING "경고" @@ -359,7 +359,7 @@ BEGIN IDS_NEW_VALUE "새 값 #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(길이가 0인 바이너리 값)" IDS_DEFAULT_VALUE_NAME "(기본값)" @@ -373,7 +373,7 @@ BEGIN IDS_INVALID_DWORD "(잘못된 DWORD값)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "레지스트리 파일" IDS_FLT_REGFILES "레지스트리 파일들 (*.reg)" @@ -386,7 +386,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "모든 권한" IDS_ACCESS_READ "읽기" @@ -402,14 +402,14 @@ BEGIN IDS_ACCESS_READCONTROL "권한 읽기" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "이 키만" IDS_INHERIT_THISKEYANDSUBKEYS "이 키와 서브키" IDS_INHERIT_SUBKEYSONLY "서브키만" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "확장(&E)" IDS_COLLAPSE "축소(&C)" @@ -417,7 +417,7 @@ BEGIN IDS_FINISHEDFIND "레지스트리 검색을 완료했습니다." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -425,7 +425,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interface" @@ -446,7 +446,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memory" @@ -457,7 +457,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Read / Write" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefined" IDS_BUS_INTERNAL "Internal" @@ -486,7 +486,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -496,7 +496,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Load Hive" FONT 8, "Ms Shell Dlg" @@ -507,7 +507,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "즐겨찾기에 추가" FONT 8, "MS Shell Dlg" @@ -518,7 +518,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "즐겨찾기 제거" FONT 8, "MS Shell Dlg" @@ -530,7 +530,7 @@ BEGIN LTEXT "즐겨찾기를 선택:",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "찾기" FONT 8, "MS Shell Dlg" @@ -567,7 +567,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -579,7 +579,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Opens Registry Editor Help." * ID_HELP_ABOUT "Displays program information, version number, and copyright." diff --git a/base/applications/regedit/lang/nl-NL.rc b/base/applications/regedit/lang/nl-NL.rc index dfcc4cfdd6b..8fdca13bbe0 100644 --- a/base/applications/regedit/lang/nl-NL.rc +++ b/base/applications/regedit/lang/nl-NL.rc @@ -33,7 +33,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&Bestand" BEGIN @@ -45,7 +45,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&Registerbestand" BEGIN @@ -114,7 +114,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -287,21 +287,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Naam" IDS_LIST_COLUMN_TYPE "Type" IDS_LIST_COLUMN_DATA "Gegevens" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Register-editor" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Opdrachten voor het werken met het gehele register" ID_EDIT_MENU "Opdrachten voor het bewerken van waarden of sleutels" @@ -311,7 +311,7 @@ BEGIN ID_EDIT_NEW_MENU "Opdrachten voor het maken van nieuwe sleutels of waarden" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "De gegevens van de waarde wijzigen" ID_EDIT_NEW_KEY "Een nieuwe sleutel toevoegen" @@ -334,7 +334,7 @@ BEGIN ID_HELP_ABOUT "Programmagegevens, versienummer en copyrightgegevens weergeven" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "De Register-editor afsluiten" ID_FAVOURITES_ADDTOFAVOURITES "Sleutels toevoegen aan de lijst met favorieten" @@ -349,7 +349,7 @@ BEGIN ID_EDIT_FINDNEXT "De opgegeven tekst nogmaals zoeken" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Error" IDS_WARNING "Warning" @@ -374,7 +374,7 @@ BEGIN IDS_NEW_VALUE "New Value #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(zero-length binary value)" IDS_DEFAULT_VALUE_NAME "(Default)" @@ -388,7 +388,7 @@ BEGIN IDS_INVALID_DWORD "(invalid DWORD value)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Registration File" IDS_FLT_REGFILES "Registration Files (*.reg)" @@ -401,7 +401,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Full Control" IDS_ACCESS_READ "Read" @@ -417,14 +417,14 @@ BEGIN IDS_ACCESS_READCONTROL "Read Control" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "This key only" IDS_INHERIT_THISKEYANDSUBKEYS "This key and subkeys" IDS_INHERIT_SUBKEYSONLY "Subkeys only" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Expand" IDS_COLLAPSE "&Collapse" @@ -432,7 +432,7 @@ BEGIN IDS_FINISHEDFIND "Finished searching through the registry." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -440,7 +440,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interface" @@ -461,7 +461,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memory" @@ -472,7 +472,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Read / Write" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefined" IDS_BUS_INTERNAL "Internal" @@ -501,7 +501,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -511,7 +511,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Load Hive" FONT 8, "Ms Shell Dlg" @@ -522,7 +522,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Add to Favorites" FONT 8, "MS Shell Dlg" @@ -533,7 +533,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remove Favorites" FONT 8, "MS Shell Dlg" @@ -545,7 +545,7 @@ BEGIN LTEXT "Select Favorite(s):",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Find" FONT 8, "MS Shell Dlg" @@ -582,7 +582,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -594,7 +594,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Opens Registry Editor Help." * ID_HELP_ABOUT "Displays program information, version number, and copyright." diff --git a/base/applications/regedit/lang/no-NO.rc b/base/applications/regedit/lang/no-NO.rc index 083c0cf7321..3b2baba1071 100644 --- a/base/applications/regedit/lang/no-NO.rc +++ b/base/applications/regedit/lang/no-NO.rc @@ -33,7 +33,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&Fil" BEGIN @@ -45,7 +45,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&Fil" BEGIN @@ -114,7 +114,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -287,21 +287,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Navn" IDS_LIST_COLUMN_TYPE "Type" IDS_LIST_COLUMN_DATA "Data" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Registerredigering" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Inneholder kommandoer for å arbeide med hele registret" ID_EDIT_MENU "Inneholder kommandoer for redigering av nøkler eller verdier." @@ -311,7 +311,7 @@ BEGIN ID_EDIT_NEW_MENU "Inneholder kommandoer for å opprette nye nøkler eller verdier" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Endrer verdiens data" ID_EDIT_NEW_KEY "Legger til en ny nøkkel" @@ -334,7 +334,7 @@ BEGIN ID_HELP_ABOUT "Viser informasjon om program, version og opphavsrett" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Avslutter Registerredigering" ID_FAVOURITES_ADDTOFAVOURITES "Legger til nøkler i Favoritt-listen" @@ -349,7 +349,7 @@ BEGIN ID_EDIT_FINDNEXT "Søker etter neste forekomst av den forige søkestrengen" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Feil" IDS_WARNING "Advarsel" @@ -374,7 +374,7 @@ BEGIN IDS_NEW_VALUE "Ny verdi #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(binær nullverdi)" IDS_DEFAULT_VALUE_NAME "(Standard)" @@ -388,7 +388,7 @@ BEGIN IDS_INVALID_DWORD "(ugyldig DWORD-verdi)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Registration File" IDS_FLT_REGFILES "Registerfiler (*.reg)" @@ -401,7 +401,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Full tilgang" IDS_ACCESS_READ "Les" @@ -417,14 +417,14 @@ BEGIN IDS_ACCESS_READCONTROL "Lesetilgang" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "Kun denne nøkkelen" IDS_INHERIT_THISKEYANDSUBKEYS "Denne nøkkelen og undernøkler" IDS_INHERIT_SUBKEYSONLY "Kun undernøkler" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Utvid" IDS_COLLAPSE "&Minimer" @@ -432,7 +432,7 @@ BEGIN IDS_FINISHEDFIND "Søket i registret er fullført." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -440,7 +440,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interface" @@ -461,7 +461,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memory" @@ -472,7 +472,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Read / Write" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefined" IDS_BUS_INTERNAL "Internal" @@ -501,7 +501,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -511,7 +511,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Load Hive" FONT 8, "Ms Shell Dlg" @@ -522,7 +522,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Legg til i Favoritter" FONT 8, "MS Shell Dlg" @@ -533,7 +533,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Fjern favoritter" FONT 8, "MS Shell Dlg" @@ -545,7 +545,7 @@ BEGIN LTEXT "Velg favoritt(er):",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Søk" FONT 8, "MS Shell Dlg" @@ -582,7 +582,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -594,7 +594,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Åpne registerredigering hjelpen." * ID_HELP_ABOUT "Vis program informasjon, versjon nummer, og enerett." diff --git a/base/applications/regedit/lang/pl-PL.rc b/base/applications/regedit/lang/pl-PL.rc index b467de8d225..110d6317eee 100644 --- a/base/applications/regedit/lang/pl-PL.rc +++ b/base/applications/regedit/lang/pl-PL.rc @@ -40,7 +40,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&Plik" BEGIN @@ -52,7 +52,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&Rejestr" BEGIN @@ -121,7 +121,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -294,21 +294,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Nazwa" IDS_LIST_COLUMN_TYPE "Typ" IDS_LIST_COLUMN_DATA "Dane" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Edytor rejestru" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Zawiera polecenia do pracy z całym rejestrem" ID_EDIT_MENU "Zawiera polecenia do edycji wartości lub kluczy" @@ -318,7 +318,7 @@ BEGIN ID_EDIT_NEW_MENU "Zawiera polecenia do tworzenia nowych kluczy lub wartości" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Zmienia dane wartości" ID_EDIT_NEW_KEY "Dodaje nowy klucz" @@ -341,7 +341,7 @@ BEGIN ID_HELP_ABOUT "Wyświetla informacje o programie, numerze wersji i prawach autorskich" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Kończy działanie Edytora rejestru" ID_FAVOURITES_ADDTOFAVOURITES "Dodaje klawisze do listy elementów ulubionych" @@ -356,7 +356,7 @@ BEGIN ID_EDIT_FINDNEXT "Znajduje następne wystąpienie tekstu określonego przy poprzednim szukaniu" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Błąd" IDS_WARNING "Ostrzeżenie" @@ -381,7 +381,7 @@ BEGIN IDS_NEW_VALUE "Nowa wartość #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(wartość binarna o długości zero)" IDS_DEFAULT_VALUE_NAME "(domyślna)" @@ -395,7 +395,7 @@ BEGIN IDS_INVALID_DWORD "(niewłaściwa wartość DWORD)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Plik rejestru" IDS_FLT_REGFILES "Pliki rejestru (*.reg)" @@ -408,7 +408,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Pełna kontrola" IDS_ACCESS_READ "Odczyt" @@ -424,14 +424,14 @@ BEGIN IDS_ACCESS_READCONTROL "Kontrola odczytu" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "Tylko ten klucz" IDS_INHERIT_THISKEYANDSUBKEYS "Ten klucz i podklucze" IDS_INHERIT_SUBKEYSONLY "Tylko podklucze" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Rozwiń" IDS_COLLAPSE "&Zwiń" @@ -439,7 +439,7 @@ BEGIN IDS_FINISHEDFIND "Przeszukiwanie rejestru zakończone." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Dodawanie danych do rejestru może zmienić lub skasować pewne wartości, przez co pewne składniki systemu mogą przestać poprawnie funkcjonować.\nJeśli nie ufasz źródłu danch w '%s', nie dodawaj ich do rejestru.\n\nCzy na pewno chcesz kontynuować?" IDS_IMPORT_OK "Klucze i wartości w '%s' zostały z powodzeniem dodane do rejestru." @@ -447,7 +447,7 @@ BEGIN IDS_EXPORT_ERROR "Nie można wyeksportować '%s': Błąd podczas tworzenia bądź zapisywania pliku. Może to oznaczać problem z dyskiem lub systemem plików." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Numer Szyny" IDS_INTERFACE "Interfejs" @@ -468,7 +468,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Rozmiar danych" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Pamięć" @@ -479,7 +479,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Odczyt / Zapis" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Niezdefiniowane" IDS_BUS_INTERNAL "Wewnętrzne" @@ -508,7 +508,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -518,7 +518,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Ładuj drzewo" FONT 8, "Ms Shell Dlg" @@ -529,7 +529,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Anuluj", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Dodaj do ulubionych" FONT 8, "MS Shell Dlg" @@ -540,7 +540,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Usuń z ulubionych" FONT 8, "MS Shell Dlg" @@ -552,7 +552,7 @@ BEGIN LTEXT "Wybierz ulubione:",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Znajdź" FONT 8, "MS Shell Dlg" @@ -589,7 +589,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -601,7 +601,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Otwiera pomoc Edytora Rejestru." * ID_HELP_ABOUT "Wyświetla informacje o programie, numerze wersji, licencji." diff --git a/base/applications/regedit/lang/pt-BR.rc b/base/applications/regedit/lang/pt-BR.rc index 85bb32abacb..13c4121e5b5 100644 --- a/base/applications/regedit/lang/pt-BR.rc +++ b/base/applications/regedit/lang/pt-BR.rc @@ -34,7 +34,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&Arquivo" BEGIN @@ -46,7 +46,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&Arquivo" BEGIN @@ -115,7 +115,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -288,21 +288,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Nome" IDS_LIST_COLUMN_TYPE "Tipo" IDS_LIST_COLUMN_DATA "Dados" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Editor do Registro" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Contém comandos para trabalhar com o registro inteiro" ID_EDIT_MENU "Contém comandos para editar valores ou chaves" @@ -312,7 +312,7 @@ BEGIN ID_EDIT_NEW_MENU "Contém comandos poara criar novas chaves ou valores" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Modifica os dados do valor" ID_EDIT_NEW_KEY "Adiciona nova chave" @@ -335,7 +335,7 @@ BEGIN ID_HELP_ABOUT "Exibe informações sobre o programa, número da versão e direitos autorais." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Encerra o editor do registro" ID_FAVOURITES_ADDTOFAVOURITES "Adiciona chaves à lista de favoritos" @@ -350,7 +350,7 @@ BEGIN ID_EDIT_FINDNEXT "Localiza a próxima ocorrência do texto especificado na pesquisa anterior" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Erro" IDS_WARNING "Aviso" @@ -375,7 +375,7 @@ BEGIN IDS_NEW_VALUE "Novo valor #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(valor binário de comprimento zero)" IDS_DEFAULT_VALUE_NAME "(Padrão)" @@ -389,7 +389,7 @@ BEGIN IDS_INVALID_DWORD "(valor DWORD inválido)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Registration File" IDS_FLT_REGFILES "Arquivos do Registro (*.reg)" @@ -402,7 +402,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Controle total" IDS_ACCESS_READ "Leitura" @@ -418,14 +418,14 @@ BEGIN IDS_ACCESS_READCONTROL "Controle de leitura" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "Apenas esta chave" IDS_INHERIT_THISKEYANDSUBKEYS "Esta chave e subchaves" IDS_INHERIT_SUBKEYSONLY "Apenas subchaves" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Expandir" IDS_COLLAPSE "&Reduzir" @@ -433,7 +433,7 @@ BEGIN IDS_FINISHEDFIND "Pesquisa do Registro concluída." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -441,7 +441,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interface" @@ -462,7 +462,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memory" @@ -473,7 +473,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Read / Write" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefined" IDS_BUS_INTERNAL "Internal" @@ -502,7 +502,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -512,7 +512,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Load Hive" FONT 8, "Ms Shell Dlg" @@ -523,7 +523,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Adicionar a favoritos" FONT 8, "MS Shell Dlg" @@ -534,7 +534,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remover favoritos" FONT 8, "MS Shell Dlg" @@ -546,7 +546,7 @@ BEGIN LTEXT "Selecionar favorito(s):",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Localizar" FONT 8, "MS Shell Dlg" @@ -583,7 +583,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -595,7 +595,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Abre ajuda do Editor do Registro." * ID_HELP_ABOUT "Exibe informações sobre o programa, número da versão e direitos autorais." diff --git a/base/applications/regedit/lang/pt-PT.rc b/base/applications/regedit/lang/pt-PT.rc index ced0bcc8c6a..3251312f908 100644 --- a/base/applications/regedit/lang/pt-PT.rc +++ b/base/applications/regedit/lang/pt-PT.rc @@ -34,7 +34,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&Arquivo" BEGIN @@ -46,7 +46,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&Registro" BEGIN @@ -115,7 +115,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -289,21 +289,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Nome" IDS_LIST_COLUMN_TYPE "Tipo" IDS_LIST_COLUMN_DATA "Dados" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Editor do Registro" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Contém comandos para trabalhar com o Registro inteiro." ID_EDIT_MENU "Contém comandos para edição de valores ou chaves." @@ -313,7 +313,7 @@ BEGIN ID_EDIT_NEW_MENU "Contém comandos para criação de novas chaves ou valores" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Modifica os dados do valor." ID_EDIT_NEW_KEY "Adiciona uma nova chave" @@ -336,7 +336,7 @@ BEGIN ID_HELP_ABOUT "Exibe informações do programa, número da versão e copyright." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Encerra o Editor do Registro." ID_FAVOURITES_ADDTOFAVOURITES "Adiciona chaves a lista de favoritos." @@ -351,7 +351,7 @@ BEGIN ID_EDIT_FINDNEXT "Localiza a próxima ocorrência do texto especificado na pesquisa anterior." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Erro" IDS_WARNING "Warning" @@ -376,7 +376,7 @@ BEGIN IDS_NEW_VALUE "New Value #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(zero-length binary value)" IDS_DEFAULT_VALUE_NAME "(Default)" @@ -390,7 +390,7 @@ BEGIN IDS_INVALID_DWORD "(invalid DWORD value)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Registration File" IDS_FLT_REGFILES "Registration Files (*.reg)" @@ -403,7 +403,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Full Control" IDS_ACCESS_READ "Read" @@ -419,14 +419,14 @@ BEGIN IDS_ACCESS_READCONTROL "Read Control" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "This key only" IDS_INHERIT_THISKEYANDSUBKEYS "This key and subkeys" IDS_INHERIT_SUBKEYSONLY "Subkeys only" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Expand" IDS_COLLAPSE "&Collapse" @@ -434,7 +434,7 @@ BEGIN IDS_FINISHEDFIND "Finished searching through the registry." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -442,7 +442,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interface" @@ -463,7 +463,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memory" @@ -474,7 +474,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Read / Write" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefined" IDS_BUS_INTERNAL "Internal" @@ -503,7 +503,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -513,7 +513,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Load Hive" FONT 8, "Ms Shell Dlg" @@ -524,7 +524,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Add to Favorites" FONT 8, "MS Shell Dlg" @@ -535,7 +535,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remove Favorites" FONT 8, "MS Shell Dlg" @@ -547,7 +547,7 @@ BEGIN LTEXT "Select Favorite(s):",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Find" FONT 8, "MS Shell Dlg" @@ -584,7 +584,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -596,7 +596,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Opens Registry Editor Help." * ID_HELP_ABOUT "Displays program information, version number, and copyright." diff --git a/base/applications/regedit/lang/ro-RO.rc b/base/applications/regedit/lang/ro-RO.rc index c8264be8b5a..e0013308908 100644 --- a/base/applications/regedit/lang/ro-RO.rc +++ b/base/applications/regedit/lang/ro-RO.rc @@ -36,7 +36,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&Fișier" BEGIN @@ -48,7 +48,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&Fișier" BEGIN @@ -117,7 +117,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -290,21 +290,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Nume" IDS_LIST_COLUMN_TYPE "Tip" IDS_LIST_COLUMN_DATA "Date" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Editor de registru" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Conține comenzi de lucru cu întreg registrul" ID_EDIT_MENU "Conține comenzi pentru editarea valorilor și cheilor" @@ -314,7 +314,7 @@ BEGIN ID_EDIT_NEW_MENU "Conține comenzi pentru crearea noilor chei sau valori" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Modifică datele unei valori" ID_EDIT_NEW_KEY "Adaugă o nouă cheie" @@ -332,7 +332,7 @@ BEGIN ID_HELP_ABOUT "Prezintă informații despre program, numărul versiunii și drepturi de autor" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Ieșire din editorul de registru" ID_FAVOURITES_ADDTOFAVOURITES "Adaugă chei către lista de favorite" @@ -347,7 +347,7 @@ BEGIN ID_EDIT_FINDNEXT "Găsește următoarea apariție a textului specificat în căutarea precedentă" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Eroare" IDS_WARNING "Avertisment" @@ -372,7 +372,7 @@ BEGIN IDS_NEW_VALUE "Valoarea nouă #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(valoare binară)" IDS_DEFAULT_VALUE_NAME "(Implicit)" @@ -386,7 +386,7 @@ BEGIN IDS_INVALID_DWORD "(valoare de 32 biți nevalidă)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Fișier registru" IDS_FLT_REGFILES "Fișiere registru (*.reg)" @@ -399,7 +399,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Control deplin" IDS_ACCESS_READ "Citire" @@ -415,14 +415,14 @@ BEGIN IDS_ACCESS_READCONTROL "Citire control" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "Doar această cheie" IDS_INHERIT_THISKEYANDSUBKEYS "Cheia și subcheile" IDS_INHERIT_SUBKEYSONLY "Doar subcheile" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Extinde" IDS_COLLAPSE "&Restrânge" @@ -430,7 +430,7 @@ BEGIN IDS_FINISHEDFIND "Căutarea în registru a fost finalizată." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -438,7 +438,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Număr magistrală" IDS_INTERFACE "Interfață" @@ -459,7 +459,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Dimensiune date" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memorie" @@ -470,7 +470,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Citire / Scriere" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Nedefinită" IDS_BUS_INTERNAL "Internă" @@ -499,7 +499,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -512,7 +512,7 @@ END // // Dialog resources // -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Încărcare registru" FONT 8, "Ms Shell Dlg" @@ -523,7 +523,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "A&nulează", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Adaugă la favorite" FONT 8, "MS Shell Dlg" @@ -534,7 +534,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Eliminare favorite" FONT 8, "MS Shell Dlg" @@ -546,7 +546,7 @@ BEGIN LTEXT "Alege favorit(e):",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Găsire" FONT 8, "MS Shell Dlg" @@ -583,7 +583,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -595,7 +595,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Opens Registry Editor Help." * ID_HELP_ABOUT "Displays program information, version number, and copyright." diff --git a/base/applications/regedit/lang/ru-RU.rc b/base/applications/regedit/lang/ru-RU.rc index efb10f9989d..c96104460db 100644 --- a/base/applications/regedit/lang/ru-RU.rc +++ b/base/applications/regedit/lang/ru-RU.rc @@ -33,7 +33,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&Файл" BEGIN @@ -45,7 +45,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&Реестр" BEGIN @@ -113,7 +113,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -286,21 +286,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Имя" IDS_LIST_COLUMN_TYPE "Тип" IDS_LIST_COLUMN_DATA "Данные" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Редактор реестра" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Содержит команды для работы с регистром в целом" ID_EDIT_MENU "Содержит команды для редактирования значений или ключей" @@ -310,7 +310,7 @@ BEGIN ID_EDIT_NEW_MENU "Содержит команды для создания новых ключей или значений" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Изменяет значение" ID_EDIT_NEW_KEY "Добавляет новый ключ" @@ -331,7 +331,7 @@ BEGIN ID_HELP_ABOUT "Отображает информацию о программе, номер версии и авторские права" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Выход из редактора реестра" ID_FAVOURITES_ADDTOFAVOURITES "Добавить ключ в избранное" @@ -346,7 +346,7 @@ BEGIN ID_EDIT_FINDNEXT "Ищет следующее совпадение текста, заданного в предыдущем поиске" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Ошибка" IDS_WARNING "Предупреждение" @@ -371,7 +371,7 @@ BEGIN IDS_NEW_VALUE "Новое значение #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(двоичное значение нулевой длины)" IDS_DEFAULT_VALUE_NAME "(По умолчанию)" @@ -385,7 +385,7 @@ BEGIN IDS_INVALID_DWORD "(неправильное значение DWORD)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Файл реестра" IDS_FLT_REGFILES "Файлы реестра (*.reg)" @@ -398,7 +398,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Полный контроль" IDS_ACCESS_READ "Чтение" @@ -414,14 +414,14 @@ BEGIN IDS_ACCESS_READCONTROL "Чтение разрешений" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "Только этот ключ" IDS_INHERIT_THISKEYANDSUBKEYS "Только этот ключ и подключи" IDS_INHERIT_SUBKEYSONLY "Только подключи" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Развернуть" IDS_COLLAPSE "&Свернуть" @@ -429,7 +429,7 @@ BEGIN IDS_FINISHEDFIND "Поиск в реестре завершен." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -437,7 +437,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interface" @@ -458,7 +458,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memory" @@ -469,7 +469,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Read / Write" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefined" IDS_BUS_INTERNAL "Internal" @@ -498,7 +498,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 268, 98 +IDD_EXPORTRANGE DIALOGEX 50, 50, 268, 98 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" @@ -509,7 +509,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT, 30, 34, 335, 12 END -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Load Hive" FONT 8, "Ms Shell Dlg" @@ -520,7 +520,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 187, 95 +IDD_ADDFAVORITES DIALOGEX 0, 0, 187, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Добавить в избранное" FONT 8, "MS Shell Dlg" @@ -531,7 +531,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME, 7, 26, 110, 13, ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Удалить из избранного" FONT 8, "MS Shell Dlg" @@ -543,7 +543,7 @@ BEGIN LTEXT "Выберите удаляемое:", IDC_STATIC, 7, 7, 99, 12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Поиск" FONT 8, "MS Shell Dlg" @@ -581,7 +581,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -593,7 +593,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Открывает справку редактора реестра." * ID_HELP_ABOUT "Отображает информацию о программе, номер версии и авторские права." diff --git a/base/applications/regedit/lang/sk-SK.rc b/base/applications/regedit/lang/sk-SK.rc index b5de43b4234..0d862fb09ec 100644 --- a/base/applications/regedit/lang/sk-SK.rc +++ b/base/applications/regedit/lang/sk-SK.rc @@ -18,7 +18,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&Súbor" BEGIN @@ -30,7 +30,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&Súbor" BEGIN @@ -99,7 +99,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -272,21 +272,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Názov" IDS_LIST_COLUMN_TYPE "Typ" IDS_LIST_COLUMN_DATA "Údaje" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Editor registrov" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Contains commands for working with the whole registry" ID_EDIT_MENU "Contains commands for editing values or keys" @@ -296,7 +296,7 @@ BEGIN ID_EDIT_NEW_MENU "Contains commands for creating new keys or values" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Modifies the value's data" ID_EDIT_NEW_KEY "Pridá nový kľúč" @@ -319,7 +319,7 @@ BEGIN ID_HELP_ABOUT "Displays program information, version number and copyright" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Ukončí editor registrov" ID_FAVOURITES_ADDTOFAVOURITES "Adds keys to the favourites list" @@ -334,7 +334,7 @@ BEGIN ID_EDIT_FINDNEXT "Finds next occurrence of text specified in previous search" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Chyba" IDS_WARNING "Upozornenie" @@ -359,7 +359,7 @@ BEGIN IDS_NEW_VALUE "Nová hodnota #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(binárna hodnota nulovej dĺžky)" IDS_DEFAULT_VALUE_NAME "(Predvolené)" @@ -373,7 +373,7 @@ BEGIN IDS_INVALID_DWORD "(neplatná DWORD hodnota)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Registration File" IDS_FLT_REGFILES "Registration Files (*.reg)" @@ -386,7 +386,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Full Control" IDS_ACCESS_READ "Read" @@ -402,14 +402,14 @@ BEGIN IDS_ACCESS_READCONTROL "Read Control" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "This key only" IDS_INHERIT_THISKEYANDSUBKEYS "This key and subkeys" IDS_INHERIT_SUBKEYSONLY "Subkeys only" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Expand" IDS_COLLAPSE "&Collapse" @@ -417,7 +417,7 @@ BEGIN IDS_FINISHEDFIND "Finished searching through the registry." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -425,7 +425,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interface" @@ -446,7 +446,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memory" @@ -457,7 +457,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Read / Write" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefined" IDS_BUS_INTERNAL "Internal" @@ -486,7 +486,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -496,7 +496,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Load Hive" FONT 8, "Ms Shell Dlg" @@ -507,7 +507,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Add to Favorites" FONT 8, "MS Shell Dlg" @@ -518,7 +518,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remove Favorites" FONT 8, "MS Shell Dlg" @@ -530,7 +530,7 @@ BEGIN LTEXT "Select Favorite(s):",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Find" FONT 8, "MS Shell Dlg" @@ -567,7 +567,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -579,7 +579,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Otvorí pomocníka pre Editor registrov." * ID_HELP_ABOUT "Zobrazuje informácie programu, číslo verzie a autorské práva." diff --git a/base/applications/regedit/lang/sl-SI.rc b/base/applications/regedit/lang/sl-SI.rc index d1598c2455f..53e6f498b3e 100644 --- a/base/applications/regedit/lang/sl-SI.rc +++ b/base/applications/regedit/lang/sl-SI.rc @@ -33,7 +33,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&Datoteka" BEGIN @@ -45,7 +45,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&Register" BEGIN @@ -114,7 +114,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -287,21 +287,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Ime" IDS_LIST_COLUMN_TYPE "Vrsta" IDS_LIST_COLUMN_DATA "Podatki" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Urejevalnik registra" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Ukazi za delo s celotnim registrom" ID_EDIT_MENU "Ukazi za urejanje vrednosti in kljuèev" @@ -311,7 +311,7 @@ BEGIN ID_EDIT_NEW_MENU "Ukazi za ustvarjanje novih kljuèev in vrednosti" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Spremeni podatke vrednosti" ID_EDIT_NEW_KEY "Doda nov kljuè" @@ -334,7 +334,7 @@ BEGIN ID_HELP_ABOUT "Informacije o programu, številki razlièice in avtorskih pravicah" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Konèa program" ID_FAVOURITES_ADDTOFAVOURITES "Doda kljuè med Priljubljene" @@ -349,7 +349,7 @@ BEGIN ID_EDIT_FINDNEXT "Išèe naslednjo ponovitev iskanega besedila" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Error" IDS_WARNING "Warning" @@ -374,7 +374,7 @@ BEGIN IDS_NEW_VALUE "New Value #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(zero-length binary value)" IDS_DEFAULT_VALUE_NAME "(Default)" @@ -388,7 +388,7 @@ BEGIN IDS_INVALID_DWORD "(invalid DWORD value)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Registration File" IDS_FLT_REGFILES "Registration Files (*.reg)" @@ -401,7 +401,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Full Control" IDS_ACCESS_READ "Read" @@ -417,14 +417,14 @@ BEGIN IDS_ACCESS_READCONTROL "Read Control" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "This key only" IDS_INHERIT_THISKEYANDSUBKEYS "This key and subkeys" IDS_INHERIT_SUBKEYSONLY "Subkeys only" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Expand" IDS_COLLAPSE "&Collapse" @@ -432,7 +432,7 @@ BEGIN IDS_FINISHEDFIND "Finished searching through the registry." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -440,7 +440,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interface" @@ -461,7 +461,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memory" @@ -472,7 +472,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Read / Write" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefined" IDS_BUS_INTERNAL "Internal" @@ -501,7 +501,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -511,7 +511,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Load Hive" FONT 8, "Ms Shell Dlg" @@ -522,7 +522,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Add to Favorites" FONT 8, "MS Shell Dlg" @@ -533,7 +533,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remove Favorites" FONT 8, "MS Shell Dlg" @@ -545,7 +545,7 @@ BEGIN LTEXT "Select Favorite(s):",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Find" FONT 8, "MS Shell Dlg" @@ -582,7 +582,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -594,7 +594,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Odpre pomoè." * ID_HELP_ABOUT "Informacije o programu, številki razlièice in avtorskih pravicah." diff --git a/base/applications/regedit/lang/sv-SE.rc b/base/applications/regedit/lang/sv-SE.rc index b371820479e..88ba375c63e 100644 --- a/base/applications/regedit/lang/sv-SE.rc +++ b/base/applications/regedit/lang/sv-SE.rc @@ -33,7 +33,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&Arkiv" BEGIN @@ -45,7 +45,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "R&egistret" BEGIN @@ -114,7 +114,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -287,21 +287,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Namn" IDS_LIST_COLUMN_TYPE "Typ" IDS_LIST_COLUMN_DATA "Data" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Registereditorn" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Innehåller kommandon för att arbeta med hela registret" ID_EDIT_MENU "Innehåller kommandon för att ändra värden och nycklar" @@ -311,7 +311,7 @@ BEGIN ID_EDIT_NEW_MENU "Innehåller kommandon för att skapa nya nycklar eller värden" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Ändrar värdets data" ID_EDIT_NEW_KEY "Lägger till en ny nyckel" @@ -334,7 +334,7 @@ BEGIN ID_HELP_ABOUT "Visar programinformation, versionsnummer, och upphovsrätt" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Avslutar Registereditorn" ID_FAVOURITES_ADDTOFAVOURITES "Lägger till nycklar till Favoriter" @@ -349,7 +349,7 @@ BEGIN ID_EDIT_FINDNEXT "Söker igen efter nästa träff i registret" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Fel" IDS_WARNING "Varning" @@ -374,7 +374,7 @@ BEGIN IDS_NEW_VALUE "Nytt Värde #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(Tomt binärvärde)" IDS_DEFAULT_VALUE_NAME "(Standard)" @@ -388,7 +388,7 @@ BEGIN IDS_INVALID_DWORD "(felaktigt DWORD-värde)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Registerfil" IDS_FLT_REGFILES "Registerfiler (*.reg)" @@ -401,7 +401,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Fullständig behörighet" IDS_ACCESS_READ "Läsa" @@ -417,14 +417,14 @@ BEGIN IDS_ACCESS_READCONTROL "Läsa behörighet" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "Endast denna nyckel" IDS_INHERIT_THISKEYANDSUBKEYS "Denna nyckel samt undernycklar" IDS_INHERIT_SUBKEYSONLY "Endast undernycklar" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Visa nivå" IDS_COLLAPSE "&Dölj nivå" @@ -432,7 +432,7 @@ BEGIN IDS_FINISHEDFIND "Slutfört sökningen av registret." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -440,7 +440,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interface" @@ -461,7 +461,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memory" @@ -472,7 +472,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Read / Write" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefined" IDS_BUS_INTERNAL "Internal" @@ -501,7 +501,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -511,7 +511,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Läs in registerdata" FONT 8, "Ms Shell Dlg" @@ -522,7 +522,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Avbryt", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Lägg till i Favoriter" FONT 8, "MS Shell Dlg" @@ -533,7 +533,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Ta bort Favoriter" FONT 8, "MS Shell Dlg" @@ -545,7 +545,7 @@ BEGIN LTEXT "Välj Favorit(er):",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Sök" FONT 8, "MS Shell Dlg" @@ -582,7 +582,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -594,7 +594,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Öppnar hjälpen för Registereditorn." * ID_HELP_ABOUT "Visar programinformation, versionsnummer, och upphovsrätt." diff --git a/base/applications/regedit/lang/th-TH.rc b/base/applications/regedit/lang/th-TH.rc index 47bac7ad3ea..301b89fe8fa 100644 --- a/base/applications/regedit/lang/th-TH.rc +++ b/base/applications/regedit/lang/th-TH.rc @@ -33,7 +33,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "แ&ฟ้ม" BEGIN @@ -45,7 +45,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "แ&ฟ้ม" BEGIN @@ -114,7 +114,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -287,21 +287,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Name" IDS_LIST_COLUMN_TYPE "Type" IDS_LIST_COLUMN_DATA "Data" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Registry Editor" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Contains commands for working with the whole registry" ID_EDIT_MENU "Contains commands for editing values or keys" @@ -311,7 +311,7 @@ BEGIN ID_EDIT_NEW_MENU "Contains commands for creating new keys or values" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Modifies the value's data" ID_EDIT_NEW_KEY "Adds a new key" @@ -334,7 +334,7 @@ BEGIN ID_HELP_ABOUT "Displays program information, version number and copyright" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Quits the registry editor" ID_FAVOURITES_ADDTOFAVOURITES "Adds keys to the favourites list" @@ -349,7 +349,7 @@ BEGIN ID_EDIT_FINDNEXT "Finds next occurrence of text specified in previous search" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Error" IDS_WARNING "Warning" @@ -374,7 +374,7 @@ BEGIN IDS_NEW_VALUE "New Value #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(zero-length binary value)" IDS_DEFAULT_VALUE_NAME "(Default)" @@ -388,7 +388,7 @@ BEGIN IDS_INVALID_DWORD "(invalid DWORD value)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Registration File" IDS_FLT_REGFILES "Registration Files (*.reg)" @@ -401,7 +401,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Full Control" IDS_ACCESS_READ "Read" @@ -417,14 +417,14 @@ BEGIN IDS_ACCESS_READCONTROL "Read Control" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "This key only" IDS_INHERIT_THISKEYANDSUBKEYS "This key and subkeys" IDS_INHERIT_SUBKEYSONLY "Subkeys only" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Expand" IDS_COLLAPSE "&Collapse" @@ -432,7 +432,7 @@ BEGIN IDS_FINISHEDFIND "Finished searching through the registry." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -440,7 +440,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interface" @@ -461,7 +461,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memory" @@ -472,7 +472,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Read / Write" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefined" IDS_BUS_INTERNAL "Internal" @@ -501,7 +501,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -511,7 +511,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Load Hive" FONT 8, "Ms Shell Dlg" @@ -522,7 +522,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Add to Favorites" FONT 8, "MS Shell Dlg" @@ -533,7 +533,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remove Favorites" FONT 8, "MS Shell Dlg" @@ -545,7 +545,7 @@ BEGIN LTEXT "Select Favorite(s):",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Find" FONT 8, "MS Shell Dlg" @@ -582,7 +582,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -594,7 +594,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Opens Registry Editor Help." * ID_HELP_ABOUT "Displays program information, version number, and copyright." diff --git a/base/applications/regedit/lang/tr-TR.rc b/base/applications/regedit/lang/tr-TR.rc index 08acfa08674..433f84ae1d1 100644 --- a/base/applications/regedit/lang/tr-TR.rc +++ b/base/applications/regedit/lang/tr-TR.rc @@ -33,7 +33,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&Kütük" BEGIN @@ -45,7 +45,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "&Kütük" BEGIN @@ -110,7 +110,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -129,7 +129,7 @@ BEGIN MENUITEM "D&izgi Değeri", ID_EDIT_NEW_STRINGVALUE MENUITEM "İ&kili Değer", ID_EDIT_NEW_BINARYVALUE MENUITEM "&32 İkillik Değer", ID_EDIT_NEW_DWORDVALUE - MENUITEM "&Çoklu Dizeli Dizgi Değeri", ID_EDIT_NEW_MULTISTRINGVALUE + MENUITEM "&Çok Dizeli Dizgi Değeri", ID_EDIT_NEW_MULTISTRINGVALUE MENUITEM "&Genişletilebilir Dizgi Değeri", ID_EDIT_NEW_EXPANDABLESTRINGVALUE END END @@ -143,7 +143,7 @@ BEGIN MENUITEM "D&izgi Değeri", ID_EDIT_NEW_STRINGVALUE MENUITEM "İ&kili Değer", ID_EDIT_NEW_BINARYVALUE MENUITEM "&32 İkillik Değer", ID_EDIT_NEW_DWORDVALUE - MENUITEM "&Çoklu Dizeli Dizgi Değeri", ID_EDIT_NEW_MULTISTRINGVALUE + MENUITEM "&Çok Dizeli Dizgi Değeri", ID_EDIT_NEW_MULTISTRINGVALUE MENUITEM "&Genişletilebilir Dizgi Değeri", ID_EDIT_NEW_EXPANDABLESTRINGVALUE END MENUITEM "A&ra...", ID_EDIT_FIND @@ -183,13 +183,13 @@ BEGIN LTEXT "D&eğer Bilgisi:",IDC_STATIC,6,35,161,8 EDITTEXT IDC_VALUE_DATA,6,46,240,12,ES_AUTOHSCROLL DEFPUSHBUTTON "Tamam",IDOK,142,64,50,14 - PUSHBUTTON "Vazgeç",IDCANCEL,196,64,50,14 + PUSHBUTTON "İptal",IDCANCEL,196,64,50,14 END IDD_EDIT_MULTI_STRING DIALOGEX 32, 24, 252, 174 STYLE DS_SHELLFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Çoklu Dizeli Dizgi Değerini Düzenle" +CAPTION "Çok Dizeli Dizgi Değerini Düzenle" FONT 8, "MS Shell Dlg" BEGIN LTEXT "&Değer Adı:",IDC_STATIC,6,6,134,8 @@ -197,7 +197,7 @@ BEGIN LTEXT "D&eğer Bilgisi:",IDC_STATIC,6,35,161,8 EDITTEXT IDC_VALUE_DATA,6,46,240,102,ES_AUTOHSCROLL | ES_MULTILINE | ES_WANTRETURN | ES_AUTOVSCROLL | WS_VSCROLL DEFPUSHBUTTON "Tamam",IDOK,142,154,50,14 - PUSHBUTTON "Vazgeç",IDCANCEL,196,154,50,14 + PUSHBUTTON "İptal",IDCANCEL,196,154,50,14 END IDD_EDIT_BIN_DATA DIALOGEX 32, 24, 252, 174 @@ -211,7 +211,7 @@ BEGIN LTEXT "D&eğer Bilgisi:",IDC_STATIC,6,35,161,8 CONTROL "",IDC_VALUE_DATA,"HexEdit32",WS_VSCROLL | WS_BORDER | WS_TABSTOP,6,46,240,102 DEFPUSHBUTTON "Tamam",IDOK,142,154,50,14 - PUSHBUTTON "Vazgeç",IDCANCEL,196,154,50,14 + PUSHBUTTON "İptal",IDCANCEL,196,154,50,14 END @@ -229,7 +229,7 @@ BEGIN AUTORADIOBUTTON "&Onaltılık",IDC_FORMAT_HEX,141,46,60,10,WS_GROUP AUTORADIOBUTTON "O&nluk",IDC_FORMAT_DEC,141,59,60,10 DEFPUSHBUTTON "Tamam",IDOK,142,82,50,14 - PUSHBUTTON "Vazgeç",IDCANCEL,196,82,50,14 + PUSHBUTTON "İptal",IDCANCEL,196,82,50,14 END @@ -283,21 +283,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Değerin Adı" IDS_LIST_COLUMN_TYPE "Değerin Türü" IDS_LIST_COLUMN_DATA "Değer" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Değer Defteri Düzenleyicisi" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Bu seçke, bütün Değer Defteri ile çalışma komutlarını içerir." ID_EDIT_MENU "Bu seçke, dizinleri veyâ değerleri düzenleme komutlarını içerir." @@ -307,7 +307,7 @@ BEGIN ID_EDIT_NEW_MENU "Bu seçke, yeni bir dizin veyâ yeni bir değer oluşturma komutlarını içerir." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Değeri değiştirir." ID_EDIT_NEW_KEY "Yeni bir dizin oluşturur." @@ -325,7 +325,7 @@ BEGIN ID_HELP_ABOUT "Değer Defteri Düzenleyicisi ile ilgili bilgi görüntüler." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Değer Defteri Düzenleyicisi'nden çıkar." ID_FAVOURITES_ADDTOFAVOURITES "Bir dizini yer imlerine ekler." @@ -340,7 +340,7 @@ BEGIN ID_EDIT_FINDNEXT "Bulunan dizgiyi bulunduğu yerden başlayarak bir daha arar." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Yanlışlık" IDS_WARNING "Uyarı" @@ -365,10 +365,10 @@ BEGIN IDS_NEW_VALUE "%d. Yeni Değer" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(Bu değer sıfır uzunluktadır.)" - IDS_DEFAULT_VALUE_NAME "(Ön tanımlı)" + IDS_DEFAULT_VALUE_NAME "(Öntanımlı)" IDS_VALUE_NOT_SET "(Bu değer belirtilmemiştir.)" IDS_UNKNOWN_TYPE "Bilinmeyen tür: (0x%lx)" IDS_MY_COMPUTER "Bilgisayar" @@ -379,20 +379,20 @@ BEGIN IDS_INVALID_DWORD "(Bu 32 ikillik değer geçersizdir.)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Değer Kütüğü" IDS_FLT_REGFILES "Değer Kütükleri (*.reg)" IDS_FLT_REGFILES_FLT "*.reg" IDS_FLT_HIVFILES "Yığın Dosyaları (*.*)" IDS_FLT_HIVFILES_FLT "*.*" - IDS_FLT_REGEDIT4 "Windows 9x ve Windows NT 4.0 Türündeki Değer Kütükleri (*.reg)" + IDS_FLT_REGEDIT4 "Pencereler 9x ve Pencereler NT 4.0 Türündeki Değer Kütükleri (*.reg)" IDS_FLT_REGEDIT4_FLT "*.reg" IDS_FLT_ALLFILES "Tüm Kütükler (*.*)" IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Tüm Denetim" IDS_ACCESS_READ "Okuma" @@ -408,30 +408,30 @@ BEGIN IDS_ACCESS_READCONTROL "Okuma Denetimi" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "Yalnızca bu dizin" IDS_INHERIT_THISKEYANDSUBKEYS "Alt dizinleriyle birlikte bu dizin" IDS_INHERIT_SUBKEYSONLY "Yalnızca bu dizinin alt dizinleri" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Genişlet" IDS_COLLAPSE "&Daralt" IDS_GOTO_SUGGESTED_KEY "G&it: %s" - IDS_FINISHEDFIND "Değer defterinde arama bitti." + IDS_FINISHEDFIND "Değer Defteri'nde arama bitti." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN - IDS_IMPORT_PROMPT "Eklenen bilgiler, değerleri değiştirebilir veyâ bileşenlerin doğru çalışmasını engelleyebilir.\nEğer %s kütüğündeki bilgilerin kaynağını bilmiyorsanız bu bilgileri değer defterine eklemeyiniz.\n\nSürdürmek istiyor musunuz?" + IDS_IMPORT_PROMPT "Eklenen bilgiler, değerleri değiştirebilir veyâ bileşenlerin doğru çalışmasını engelleyebilir.\nEğer %s kütüğündeki bilgilerin kaynağını bilmiyorsanız bu bilgileri Değer Defteri'ne eklemeyiniz.\n\nSürdürmek istiyor musunuz?" IDS_IMPORT_OK "Bilgiler, %s kütüğünden başarıyla alındı." IDS_IMPORT_ERROR "%s alınamıyor. Disk yanlışlığı, kütük dizgesi yanlışlığı ya da belirtilen kütüğün olmamasından dolayı bilgi alınacak kütük açılamıyor." IDS_EXPORT_ERROR "%s verilemiyor. Disk yanlışlığı ya da kütük dizgesi yanlışlığından dolayı belirtilen kütük oluşturulamıyor ya da bilgiler, bu kütüğün üzerine yazılamıyor." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Veri Yolu Numarası" IDS_INTERFACE "Arayüz" @@ -452,7 +452,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Veri Niceliği" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Giriş" IDS_PORT_MEMORY_IO "Bellek" @@ -463,7 +463,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Okuma/Yazma" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Tanımlanmamış" IDS_BUS_INTERNAL "Dâhilî" @@ -492,7 +492,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -505,7 +505,7 @@ END // // Dialog resources // -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Yığın Yükleme" FONT 8, "Ms Shell Dlg" @@ -513,39 +513,39 @@ FONT 8, "Ms Shell Dlg" LTEXT "Dizin:", IDC_STATIC, 4, 4, 15, 8, SS_LEFT EDITTEXT IDC_EDIT_KEY, 23, 2, 167, 13 DEFPUSHBUTTON "Tamam", IDOK, 140, 17, 50, 14 - PUSHBUTTON "Vazgeç", IDCANCEL, 89, 17, 50, 14 + PUSHBUTTON "İptal", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Yer İmlerine Ekleme" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "Tamam",IDOK,129,7,50,14 - PUSHBUTTON "Vazgeç",IDCANCEL,129,24,50,14 + PUSHBUTTON "İptal",IDCANCEL,129,24,50,14 LTEXT "Yer İmi Adı:",IDC_STATIC,7,7,70,10 EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Yer İmlerini Silme" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "Tamam",IDOK,107,114,50,14 - PUSHBUTTON "Vazgeç",IDCANCEL,7,114,50,14 + PUSHBUTTON "İptal",IDCANCEL,7,114,50,14 CONTROL "List1",IDC_FAVORITESLIST,"SysListView32",LVS_LIST | WS_BORDER | WS_TABSTOP,7,20,150,90 LTEXT "Yer İmlerini Seç:",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Ara" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "&Sonrakini Ara",IDOK,197,7,50,14 - PUSHBUTTON "Vazgeç",IDCANCEL,197,24,50,14 + PUSHBUTTON "İptal",IDCANCEL,197,24,50,14 GROUPBOX "Şunlara Bak",IDC_STATIC,7,25,63,51 LTEXT "Şunu Ara:",IDC_STATIC,7,8,37,10 EDITTEXT IDC_FINDWHAT,47,7,142,13,ES_AUTOHSCROLL @@ -568,7 +568,7 @@ CAPTION "Arama" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN ICON IDI_REGEDIT,IDC_STATIC,7,7,20,20 - DEFPUSHBUTTON "Vazgeç",IDCANCEL,93,29,45,14 + DEFPUSHBUTTON "İptal",IDCANCEL,93,29,45,14 LTEXT "Aranıyor...",IDC_STATIC,33,12,83,8 END @@ -576,7 +576,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -588,7 +588,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Değer Defteri Düzenleyicisi ile ilgili yardım konularını açar." * ID_HELP_ABOUT "Değer Defteri Düzenleyicisi ile ilgili bilgi görüntüler." diff --git a/base/applications/regedit/lang/uk-UA.rc b/base/applications/regedit/lang/uk-UA.rc index 934091fcc11..1b2bbed3deb 100644 --- a/base/applications/regedit/lang/uk-UA.rc +++ b/base/applications/regedit/lang/uk-UA.rc @@ -34,7 +34,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "&Файл" BEGIN @@ -46,7 +46,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "Фа&йл" BEGIN @@ -115,7 +115,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -288,21 +288,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "Ім'я" IDS_LIST_COLUMN_TYPE "Тип" IDS_LIST_COLUMN_DATA "Дані" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Редактор реєстру" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "Містить команди для роботи з реєстром у цілому" ID_EDIT_MENU "Містить команди для редагування значень або розділів" @@ -312,7 +312,7 @@ BEGIN ID_EDIT_NEW_MENU "Містить команди для створення нових розділів або значень" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "Змінює дані значення" ID_EDIT_NEW_KEY "Додає новий розділ" @@ -335,7 +335,7 @@ BEGIN ID_HELP_ABOUT "Відображає інформацію про програму, номер версії та авторство" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "Виходить з редактора реєстру" ID_FAVOURITES_ADDTOFAVOURITES "Додає розділ до обраного" @@ -350,7 +350,7 @@ BEGIN ID_EDIT_FINDNEXT "Шукає наступний збіг тексту, заданого в попередньому пошуку" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "Помилка" IDS_WARNING "Увага" @@ -375,7 +375,7 @@ BEGIN IDS_NEW_VALUE "Нове значення #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(двійкове значення нульової довжини)" IDS_DEFAULT_VALUE_NAME "(За замовчуванням)" @@ -389,7 +389,7 @@ BEGIN IDS_INVALID_DWORD "(Неправильне значення DWORD)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "Файл реєстру" IDS_FLT_REGFILES "Файли реєстру (*.reg)" @@ -402,7 +402,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "Повний контроль" IDS_ACCESS_READ "Читання" @@ -418,14 +418,14 @@ BEGIN IDS_ACCESS_READCONTROL "Читання дозволу" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "Тільки цей розділ" IDS_INHERIT_THISKEYANDSUBKEYS "Цей розділ та підрозділи" IDS_INHERIT_SUBKEYSONLY "Тільки підрозділи" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "&Розгорнути" IDS_COLLAPSE "&Згорнути" @@ -433,7 +433,7 @@ BEGIN IDS_FINISHEDFIND "Пошук у реєстрі завершений." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -441,7 +441,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interface" @@ -462,7 +462,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memory" @@ -473,7 +473,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Read / Write" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefined" IDS_BUS_INTERNAL "Internal" @@ -502,7 +502,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 370, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 370, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -512,7 +512,7 @@ BEGIN EDITTEXT IDC_EXPORT_BRANCH_TEXT,30,34,335,12 END -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Load Hive" FONT 8, "Ms Shell Dlg" @@ -523,7 +523,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Додання до обраного" FONT 8, "MS Shell Dlg" @@ -534,7 +534,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Видалення до обраного" FONT 8, "MS Shell Dlg" @@ -546,7 +546,7 @@ BEGIN LTEXT "Оберіть імена для видалення:",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 254, 82 +IDD_FIND DIALOGEX 0, 0, 254, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Пошук" FONT 8, "MS Shell Dlg" @@ -583,7 +583,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -595,7 +595,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Відкриває довідку редактора реєстра." * ID_HELP_ABOUT "Відображає інформацію про програму, номер версії, та авторські права." diff --git a/base/applications/regedit/lang/zh-CN.rc b/base/applications/regedit/lang/zh-CN.rc index 3c6e45bdb40..51a87e7550f 100644 --- a/base/applications/regedit/lang/zh-CN.rc +++ b/base/applications/regedit/lang/zh-CN.rc @@ -33,7 +33,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "文件(&F)" BEGIN @@ -45,7 +45,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "文件(&F)" BEGIN @@ -114,7 +114,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -287,21 +287,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "名称" IDS_LIST_COLUMN_TYPE "类型" IDS_LIST_COLUMN_DATA "数据" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "注册表编辑器" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "包含与整个注册表工作相关的命令。" ID_EDIT_MENU "包含编辑值或项的命令。" @@ -311,7 +311,7 @@ BEGIN ID_EDIT_NEW_MENU "包含创建新项或值的命令。" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "修改该值的数据。" ID_EDIT_NEW_KEY "添加新项。" @@ -334,7 +334,7 @@ BEGIN ID_HELP_ABOUT "显示程序信息、版本号和版权。" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "退出注册表编辑器。" ID_FAVOURITES_ADDTOFAVOURITES "将项添加到收藏夹列表中。" @@ -349,7 +349,7 @@ BEGIN ID_EDIT_FINDNEXT "继续查找上次搜索的文本。" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "错误" IDS_WARNING "警告" @@ -374,7 +374,7 @@ BEGIN IDS_NEW_VALUE "新值 #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(长度为零的二进位值)" IDS_DEFAULT_VALUE_NAME "(默认)" @@ -388,7 +388,7 @@ BEGIN IDS_INVALID_DWORD "(不正确的 DWORD 值)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "注册文件" IDS_FLT_REGFILES "注册文件 (*.reg)" @@ -401,7 +401,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "完全控制" IDS_ACCESS_READ "读取" @@ -417,14 +417,14 @@ BEGIN IDS_ACCESS_READCONTROL "读取控制" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "只有该项" IDS_INHERIT_THISKEYANDSUBKEYS "该项及其子项" IDS_INHERIT_SUBKEYSONLY "只有子项" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "展开" IDS_COLLAPSE "折叠" @@ -432,7 +432,7 @@ BEGIN IDS_FINISHEDFIND "注册表搜索完毕。" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -440,7 +440,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interface" @@ -461,7 +461,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memory" @@ -472,7 +472,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Read / Write" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefined" IDS_BUS_INTERNAL "Internal" @@ -501,7 +501,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 380, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 380, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -514,7 +514,7 @@ END // // Dialog resources // -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Load Hive" FONT 8, "Ms Shell Dlg" @@ -525,7 +525,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "添加到收藏夹" FONT 8, "MS Shell Dlg" @@ -536,7 +536,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "删除收藏夹" FONT 8, "MS Shell Dlg" @@ -548,7 +548,7 @@ BEGIN LTEXT "选择收藏夹(&S):",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 275, 82 +IDD_FIND DIALOGEX 0, 0, 275, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "查找" FONT 8, "MS Shell Dlg" @@ -585,7 +585,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -597,7 +597,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "Opens Registry Editor Help." * ID_HELP_ABOUT "Displays program information, version number, and copyright." diff --git a/base/applications/regedit/lang/zh-TW.rc b/base/applications/regedit/lang/zh-TW.rc index 348c2188a9b..599322d6d88 100644 --- a/base/applications/regedit/lang/zh-TW.rc +++ b/base/applications/regedit/lang/zh-TW.rc @@ -35,7 +35,7 @@ END * Menu */ -IDC_REGEDIT MENU DISCARDABLE +IDC_REGEDIT MENU BEGIN POPUP "檔案(&F)" BEGIN @@ -47,7 +47,7 @@ BEGIN END END -IDR_REGEDIT_MENU MENU DISCARDABLE +IDR_REGEDIT_MENU MENU BEGIN POPUP "文件(&F)" BEGIN @@ -116,7 +116,7 @@ BEGIN END END -IDR_POPUP_MENUS MENU DISCARDABLE +IDR_POPUP_MENUS MENU BEGIN POPUP "" BEGIN @@ -288,21 +288,21 @@ FONT 8, "MS Shell Dlg" * String Table */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_COLUMN_NAME "名稱" IDS_LIST_COLUMN_TYPE "類型" IDS_LIST_COLUMN_DATA "資料" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "登錄編輯器" IDC_REGEDIT "REGEDIT" IDC_REGEDIT_FRAME "REGEDIT_FRAME" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_MENU "包含與整個登錄工作相關的指令。" ID_EDIT_MENU "包含編輯值或機碼的指令。" @@ -312,7 +312,7 @@ BEGIN ID_EDIT_NEW_MENU "包含創建新機碼或值的指令。" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_EDIT_MODIFY "修改該值的資料。" ID_EDIT_NEW_KEY "添加新機碼。" @@ -335,7 +335,7 @@ BEGIN ID_HELP_ABOUT "顯示程序信息、版本編號和著作權。" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_REGISTRY_EXIT "結束登錄編輯器。" ID_FAVOURITES_ADDTOFAVOURITES "將機碼添加到我的最愛列表中。" @@ -350,7 +350,7 @@ BEGIN ID_EDIT_FINDNEXT "繼續尋找上次搜索的文字。" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR "錯誤" IDS_WARNING "警告" @@ -375,7 +375,7 @@ BEGIN IDS_NEW_VALUE "新值 #%d" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BINARY_EMPTY "(長度為零的二進位值)" IDS_DEFAULT_VALUE_NAME "(預設)" @@ -389,7 +389,7 @@ BEGIN IDS_INVALID_DWORD "(不正確的 DWORD 值)" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_FLT_REGFILE "登錄文件" IDS_FLT_REGFILES "登錄文件 (*.reg)" @@ -402,7 +402,7 @@ BEGIN IDS_FLT_ALLFILES_FLT "*.*" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACCESS_FULLCONTROL "完全控制" IDS_ACCESS_READ "讀取" @@ -418,14 +418,14 @@ BEGIN IDS_ACCESS_READCONTROL "讀取控制" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INHERIT_THISKEYONLY "只有該機碼" IDS_INHERIT_THISKEYANDSUBKEYS "該機碼及其子機碼" IDS_INHERIT_SUBKEYSONLY "只有子機碼" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_EXPAND "展開" IDS_COLLAPSE "摺疊" @@ -433,7 +433,7 @@ BEGIN IDS_FINISHEDFIND "登錄搜索完畢。" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_IMPORT_PROMPT "Adding information can unintentionally change or delete values and cause components to stop working correctly.\nIf you do not trust the source of this information in '%s', do not add it to registry.\n\nAre you sure you want to continue?" IDS_IMPORT_OK "The keys and values contained in '%s' have been successfully added to the registry." @@ -441,7 +441,7 @@ BEGIN IDS_EXPORT_ERROR "Cannot export '%s': Error creating or writing to the file. There may be a disk or file system error." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUSNUMBER "Bus Number" IDS_INTERFACE "Interface" @@ -462,7 +462,7 @@ BEGIN IDS_SPECIFIC_DATASIZE "Data Size" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_PORT_PORT_IO "Port" IDS_PORT_MEMORY_IO "Memory" @@ -473,7 +473,7 @@ BEGIN IDS_MEMORY_READ_WRITE "Read / Write" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BUS_UNDEFINED "Undefined" IDS_BUS_INTERNAL "Internal" @@ -502,7 +502,7 @@ END * Dialog */ -IDD_EXPORTRANGE DIALOGEX DISCARDABLE 50, 50, 380, 50 +IDD_EXPORTRANGE DIALOGEX 50, 50, 380, 50 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_BORDER FONT 8, "MS Shell Dlg" BEGIN @@ -515,7 +515,7 @@ END // // Dialog resources // -IDD_LOADHIVE DIALOGEX DISCARDABLE 0, 0, 193, 34 +IDD_LOADHIVE DIALOGEX 0, 0, 193, 34 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Load Hive" FONT 8, "Ms Shell Dlg" @@ -526,7 +526,7 @@ FONT 8, "Ms Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 89, 17, 50, 14 } -IDD_ADDFAVORITES DIALOGEX DISCARDABLE 0, 0, 186, 46 +IDD_ADDFAVORITES DIALOGEX 0, 0, 186, 46 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "添加到我的最愛" FONT 8, "MS Shell Dlg" @@ -537,7 +537,7 @@ BEGIN EDITTEXT IDC_FAVORITENAME,7,26,110,13,ES_AUTOHSCROLL END -IDD_REMOVEFAVORITES DIALOGEX DISCARDABLE 0, 0, 164, 135 +IDD_REMOVEFAVORITES DIALOGEX 0, 0, 164, 135 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "刪除我的最愛" FONT 8, "MS Shell Dlg" @@ -549,7 +549,7 @@ BEGIN LTEXT "選擇我的最愛(&S):",IDC_STATIC,7,7,99,12 END -IDD_FIND DIALOGEX DISCARDABLE 0, 0, 275, 82 +IDD_FIND DIALOGEX 0, 0, 275, 82 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "尋找" FONT 8, "MS Shell Dlg" @@ -586,7 +586,7 @@ END * TEXTINCLUDE */ -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -598,7 +598,7 @@ END */ /* - *STRINGTABLE DISCARDABLE + *STRINGTABLE *BEGIN * ID_HELP_HELPTOPICS "開啟登錄編輯器說明。" * ID_HELP_ABOUT "顯示程式資訊、版本編號及著作權。" diff --git a/base/applications/regedit/regedit.rc b/base/applications/regedit/regedit.rc index d25727bf783..2535d391b8c 100644 --- a/base/applications/regedit/regedit.rc +++ b/base/applications/regedit/regedit.rc @@ -29,14 +29,16 @@ #define REACTOS_STR_ORIGINAL_FILENAME "regedit.exe" #include +#include + LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include "rsrc.rc" -IDI_OPEN_FILE ICON DISCARDABLE res/folderopen.ico -IDI_CLOSED_FILE ICON DISCARDABLE res/folder.ico -IDI_ROOT ICON DISCARDABLE res/computer.ico -IDI_STRING ICON DISCARDABLE res/string.ico -IDI_BIN ICON DISCARDABLE res/bin.ico -IDI_REGEDIT ICON DISCARDABLE res/regedit.ico -IDI_REGFILE ICON DISCARDABLE res/regfile.ico +IDI_OPEN_FILE ICON res/folderopen.ico +IDI_CLOSED_FILE ICON res/folder.ico +IDI_ROOT ICON res/computer.ico +IDI_STRING ICON res/string.ico +IDI_BIN ICON res/bin.ico +IDI_REGEDIT ICON res/regedit.ico +IDI_REGFILE ICON res/regfile.ico diff --git a/base/applications/regedt32/resource.rc b/base/applications/regedt32/resource.rc index a9604fcd83e..a1965b07371 100644 --- a/base/applications/regedt32/resource.rc +++ b/base/applications/regedt32/resource.rc @@ -31,4 +31,4 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #define REACTOS_STR_ORIGINAL_FILENAME "regedt32.exe\0" #include -IDI_REGEDIT ICON DISCARDABLE res/regedt32.ico +IDI_REGEDIT ICON res/regedt32.ico diff --git a/base/applications/screensavers/3dtext/lang/bg-BG.rc b/base/applications/screensavers/3dtext/lang/bg-BG.rc index f87139bea39..d893bc99273 100644 --- a/base/applications/screensavers/3dtext/lang/bg-BG.rc +++ b/base/applications/screensavers/3dtext/lang/bg-BG.rc @@ -11,7 +11,7 @@ BEGIN LTEXT "Собствен текст",IDC_STATIC,18,17,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Екранен предпазител „Тримерен текст“." END diff --git a/base/applications/screensavers/3dtext/lang/de-DE.rc b/base/applications/screensavers/3dtext/lang/de-DE.rc index 0fb89e80ef2..1686548a4c8 100644 --- a/base/applications/screensavers/3dtext/lang/de-DE.rc +++ b/base/applications/screensavers/3dtext/lang/de-DE.rc @@ -11,7 +11,7 @@ BEGIN LTEXT "Eigener Text:",IDC_STATIC,18,17,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "3D-Text-Bildschirmschoner" END diff --git a/base/applications/screensavers/3dtext/lang/el-GR.rc b/base/applications/screensavers/3dtext/lang/el-GR.rc index f0375b5de67..3ce97c97550 100644 --- a/base/applications/screensavers/3dtext/lang/el-GR.rc +++ b/base/applications/screensavers/3dtext/lang/el-GR.rc @@ -11,7 +11,7 @@ BEGIN LTEXT "Προσαρμοσμένο κείμενο:",IDC_STATIC,18,17,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Προφύλαξη οθόνης με κείμενο 3Δ" END diff --git a/base/applications/screensavers/3dtext/lang/en-US.rc b/base/applications/screensavers/3dtext/lang/en-US.rc index 2bab0a16c69..f908b001cf8 100644 --- a/base/applications/screensavers/3dtext/lang/en-US.rc +++ b/base/applications/screensavers/3dtext/lang/en-US.rc @@ -11,7 +11,7 @@ BEGIN LTEXT "Custom text",IDC_STATIC,18,17,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "3D Text ScreenSaver" END diff --git a/base/applications/screensavers/3dtext/lang/es-ES.rc b/base/applications/screensavers/3dtext/lang/es-ES.rc index fc19ebcd032..1effb796f49 100644 --- a/base/applications/screensavers/3dtext/lang/es-ES.rc +++ b/base/applications/screensavers/3dtext/lang/es-ES.rc @@ -11,7 +11,7 @@ BEGIN LTEXT "Texto personalizado",IDC_STATIC,18,17,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Salvapantallas Texto en 3D" END diff --git a/base/applications/screensavers/3dtext/lang/eu-ES.rc b/base/applications/screensavers/3dtext/lang/eu-ES.rc index 7f18547d675..8033b4e110a 100644 --- a/base/applications/screensavers/3dtext/lang/eu-ES.rc +++ b/base/applications/screensavers/3dtext/lang/eu-ES.rc @@ -11,7 +11,7 @@ BEGIN LTEXT "Testu pertsonalizatua",IDC_STATIC,18,17,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Pantaila-babeslea Testua 3D-n" END diff --git a/base/applications/screensavers/3dtext/lang/fr-FR.rc b/base/applications/screensavers/3dtext/lang/fr-FR.rc index 653a5555cb4..9708ed1078a 100644 --- a/base/applications/screensavers/3dtext/lang/fr-FR.rc +++ b/base/applications/screensavers/3dtext/lang/fr-FR.rc @@ -11,7 +11,7 @@ BEGIN LTEXT "Texte personnalisé",IDC_STATIC,18,17,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Écran de veille Texte 3D" END diff --git a/base/applications/screensavers/3dtext/lang/he-IL.rc b/base/applications/screensavers/3dtext/lang/he-IL.rc index 5e1ce2acd84..81341e21d9a 100644 --- a/base/applications/screensavers/3dtext/lang/he-IL.rc +++ b/base/applications/screensavers/3dtext/lang/he-IL.rc @@ -11,7 +11,7 @@ BEGIN LTEXT "טקסט מותאם אישית:",IDC_STATIC,18,17,77,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "שומר מסר של טקסט תלת מימדי" END diff --git a/base/applications/screensavers/3dtext/lang/it-IT.rc b/base/applications/screensavers/3dtext/lang/it-IT.rc index c3bc0562f64..f6aac406c36 100644 --- a/base/applications/screensavers/3dtext/lang/it-IT.rc +++ b/base/applications/screensavers/3dtext/lang/it-IT.rc @@ -11,7 +11,7 @@ BEGIN LTEXT "Testo personalizzato",IDC_STATIC,18,17,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Salvaschermo 'Testo 3D'" END diff --git a/base/applications/screensavers/3dtext/lang/ja-JP.rc b/base/applications/screensavers/3dtext/lang/ja-JP.rc index d218a79ae1d..e7779182d4f 100644 --- a/base/applications/screensavers/3dtext/lang/ja-JP.rc +++ b/base/applications/screensavers/3dtext/lang/ja-JP.rc @@ -11,7 +11,7 @@ BEGIN LTEXT "カスタム テキスト",IDC_STATIC,18,17,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "3D テキスト スクリーンセーバー" END diff --git a/base/applications/screensavers/3dtext/lang/ko-KR.rc b/base/applications/screensavers/3dtext/lang/ko-KR.rc index e67d9072e83..dd6814c7356 100644 --- a/base/applications/screensavers/3dtext/lang/ko-KR.rc +++ b/base/applications/screensavers/3dtext/lang/ko-KR.rc @@ -15,7 +15,7 @@ BEGIN LTEXT "커스텀 텍스트",IDC_STATIC,18,17,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "3D 텍스트 화면 보호기" END diff --git a/base/applications/screensavers/3dtext/lang/lt-LT.rc b/base/applications/screensavers/3dtext/lang/lt-LT.rc index 7d345912582..a651b76474d 100644 --- a/base/applications/screensavers/3dtext/lang/lt-LT.rc +++ b/base/applications/screensavers/3dtext/lang/lt-LT.rc @@ -20,7 +20,7 @@ BEGIN LTEXT "Pasirinktas tekstas",IDC_STATIC,7,7,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "3D tekstas" END diff --git a/base/applications/screensavers/3dtext/lang/no-NO.rc b/base/applications/screensavers/3dtext/lang/no-NO.rc index 07f9dc5f5c7..acb3235fc7b 100644 --- a/base/applications/screensavers/3dtext/lang/no-NO.rc +++ b/base/applications/screensavers/3dtext/lang/no-NO.rc @@ -11,7 +11,7 @@ BEGIN LTEXT "Tilpass tekst",IDC_STATIC,18,17,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "3D Tekst skjermsparer" END diff --git a/base/applications/screensavers/3dtext/lang/pl-PL.rc b/base/applications/screensavers/3dtext/lang/pl-PL.rc index b0e143431d0..8acad590c32 100644 --- a/base/applications/screensavers/3dtext/lang/pl-PL.rc +++ b/base/applications/screensavers/3dtext/lang/pl-PL.rc @@ -19,7 +19,7 @@ BEGIN LTEXT "Własny tekst",IDC_STATIC,18,17,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Wygaszacz ekranu Tekst 3d" END diff --git a/base/applications/screensavers/3dtext/lang/ro-RO.rc b/base/applications/screensavers/3dtext/lang/ro-RO.rc index a22d2378113..8dff7dd96f9 100644 --- a/base/applications/screensavers/3dtext/lang/ro-RO.rc +++ b/base/applications/screensavers/3dtext/lang/ro-RO.rc @@ -18,7 +18,7 @@ BEGIN LTEXT "Text afișat:", IDC_STATIC,18,17,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Text 3D" END diff --git a/base/applications/screensavers/3dtext/lang/ru-RU.rc b/base/applications/screensavers/3dtext/lang/ru-RU.rc index 1b62865f667..615ed292a52 100644 --- a/base/applications/screensavers/3dtext/lang/ru-RU.rc +++ b/base/applications/screensavers/3dtext/lang/ru-RU.rc @@ -11,7 +11,7 @@ BEGIN LTEXT "Другой текст",IDC_STATIC,18,17,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Заставка 3D-текст" END diff --git a/base/applications/screensavers/3dtext/lang/sk-SK.rc b/base/applications/screensavers/3dtext/lang/sk-SK.rc index 3a37edd09b2..c8eed2f3a6d 100644 --- a/base/applications/screensavers/3dtext/lang/sk-SK.rc +++ b/base/applications/screensavers/3dtext/lang/sk-SK.rc @@ -15,7 +15,7 @@ BEGIN LTEXT "Ľubovoľný text",IDC_STATIC,18,17,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "3D text - šetrič obrazovky" END diff --git a/base/applications/screensavers/3dtext/lang/sv-SE.rc b/base/applications/screensavers/3dtext/lang/sv-SE.rc index 1229633922f..db4d6cf40c5 100644 --- a/base/applications/screensavers/3dtext/lang/sv-SE.rc +++ b/base/applications/screensavers/3dtext/lang/sv-SE.rc @@ -11,7 +11,7 @@ BEGIN LTEXT "Anpassa text",IDC_STATIC,18,17,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "3D Text skärmsläckare" END diff --git a/base/applications/screensavers/3dtext/lang/tr-TR.rc b/base/applications/screensavers/3dtext/lang/tr-TR.rc index 1bd5b732c7c..5ed98cd2ff0 100644 --- a/base/applications/screensavers/3dtext/lang/tr-TR.rc +++ b/base/applications/screensavers/3dtext/lang/tr-TR.rc @@ -10,12 +10,12 @@ CAPTION "3D Metin Görüntülük Koruyucusu Seçenekleri" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Tamam",IDOK,216,7,50,14 - PUSHBUTTON "Vazgeç",IDCANCEL,216,24,50,14 + PUSHBUTTON "İptal",IDCANCEL,216,24,50,14 EDITTEXT IDC_MESSAGE_TEXT,18,28,122,14,ES_AUTOHSCROLL LTEXT "Metin:",IDC_STATIC,18,17,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "3D Metin Görüntülük Koruyucusu" END diff --git a/base/applications/screensavers/3dtext/lang/uk-UA.rc b/base/applications/screensavers/3dtext/lang/uk-UA.rc index aab854ff041..006f1843797 100644 --- a/base/applications/screensavers/3dtext/lang/uk-UA.rc +++ b/base/applications/screensavers/3dtext/lang/uk-UA.rc @@ -19,7 +19,7 @@ BEGIN LTEXT "Текст",IDC_STATIC,18,17,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Заставка ""Об'ємний текст""" END diff --git a/base/applications/screensavers/3dtext/lang/zh-CN.rc b/base/applications/screensavers/3dtext/lang/zh-CN.rc index 533ec73f1a3..a15d81fb5fe 100644 --- a/base/applications/screensavers/3dtext/lang/zh-CN.rc +++ b/base/applications/screensavers/3dtext/lang/zh-CN.rc @@ -15,7 +15,7 @@ BEGIN LTEXT "自定义文字",IDC_STATIC,18,17,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "3D 文字屏幕保护程序" END diff --git a/base/applications/screensavers/3dtext/lang/zh-TW.rc b/base/applications/screensavers/3dtext/lang/zh-TW.rc index 28ed4b03e0d..e6e54cdb04e 100644 --- a/base/applications/screensavers/3dtext/lang/zh-TW.rc +++ b/base/applications/screensavers/3dtext/lang/zh-TW.rc @@ -15,7 +15,7 @@ BEGIN LTEXT "自訂文字",IDC_STATIC,18,17,65,8 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "3D 文字螢幕保護程式" END diff --git a/base/applications/screensavers/3dtext/rsrc.rc b/base/applications/screensavers/3dtext/rsrc.rc index 8057577be91..edfd3d579a5 100644 --- a/base/applications/screensavers/3dtext/rsrc.rc +++ b/base/applications/screensavers/3dtext/rsrc.rc @@ -12,6 +12,8 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #define REACTOS_STR_ORIGINAL_FILENAME "3dtext.scr\0" #include +#include + // UTF-8 #pragma code_page(65001) #ifdef LANGUAGE_DE_DE diff --git a/base/applications/screensavers/logon/lang/bg-BG.rc b/base/applications/screensavers/logon/lang/bg-BG.rc index fa6770e76a2..5d253661680 100644 --- a/base/applications/screensavers/logon/lang/bg-BG.rc +++ b/base/applications/screensavers/logon/lang/bg-BG.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Входен екранен предпазител" IDS_TEXT "Няма възможност за настройки." diff --git a/base/applications/screensavers/logon/lang/de-DE.rc b/base/applications/screensavers/logon/lang/de-DE.rc index b740bedea3e..e854dd0905b 100644 --- a/base/applications/screensavers/logon/lang/de-DE.rc +++ b/base/applications/screensavers/logon/lang/de-DE.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Logon-Bildschirmschoner" IDS_TEXT "Keinerlei Einstellungen notwendig." diff --git a/base/applications/screensavers/logon/lang/el-GR.rc b/base/applications/screensavers/logon/lang/el-GR.rc index 6248911f968..26b50d8ad04 100644 --- a/base/applications/screensavers/logon/lang/el-GR.rc +++ b/base/applications/screensavers/logon/lang/el-GR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Προφύλαξη οθόνης Logon" IDS_TEXT "Αυτή η προφύλαξη οθόνης δε διαθέτει επιλογές τις οποίες μπορείτε να ορίσετε." diff --git a/base/applications/screensavers/logon/lang/en-US.rc b/base/applications/screensavers/logon/lang/en-US.rc index caf8440e766..8ea25647dcf 100644 --- a/base/applications/screensavers/logon/lang/en-US.rc +++ b/base/applications/screensavers/logon/lang/en-US.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Logon ScreenSaver" IDS_TEXT "No options need to be set." diff --git a/base/applications/screensavers/logon/lang/es-ES.rc b/base/applications/screensavers/logon/lang/es-ES.rc index d8ee7ab8c46..43e5afa6c93 100644 --- a/base/applications/screensavers/logon/lang/es-ES.rc +++ b/base/applications/screensavers/logon/lang/es-ES.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Logotipo ReactOS" IDS_TEXT "Ninguna opción necesita ser configurada." diff --git a/base/applications/screensavers/logon/lang/eu-ES.rc b/base/applications/screensavers/logon/lang/eu-ES.rc index fa666554d6f..f8a41ca9ba4 100644 --- a/base/applications/screensavers/logon/lang/eu-ES.rc +++ b/base/applications/screensavers/logon/lang/eu-ES.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_BASQUE, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "ReactOS Logotipoa" IDS_TEXT "Ez dago konfiguratu beharreko aukerarik." diff --git a/base/applications/screensavers/logon/lang/fr-FR.rc b/base/applications/screensavers/logon/lang/fr-FR.rc index 6e31e18a1a0..04fb974fc58 100644 --- a/base/applications/screensavers/logon/lang/fr-FR.rc +++ b/base/applications/screensavers/logon/lang/fr-FR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Écran de veille de logon" IDS_TEXT "Il n'y a aucune option à définir." diff --git a/base/applications/screensavers/logon/lang/he-IL.rc b/base/applications/screensavers/logon/lang/he-IL.rc index c843c7b9976..b4c63f2f18d 100644 --- a/base/applications/screensavers/logon/lang/he-IL.rc +++ b/base/applications/screensavers/logon/lang/he-IL.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "שומר מסך של התחברות" IDS_TEXT "אין אפשרויות כדי להגדיר" diff --git a/base/applications/screensavers/logon/lang/it-IT.rc b/base/applications/screensavers/logon/lang/it-IT.rc index e2294f22482..8aad7bb6d3a 100644 --- a/base/applications/screensavers/logon/lang/it-IT.rc +++ b/base/applications/screensavers/logon/lang/it-IT.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Salvaschermo Logon" IDS_TEXT "Nessuna impostazione necessaria." diff --git a/base/applications/screensavers/logon/lang/ja-JP.rc b/base/applications/screensavers/logon/lang/ja-JP.rc index 343f3958d4d..79dff2313ac 100644 --- a/base/applications/screensavers/logon/lang/ja-JP.rc +++ b/base/applications/screensavers/logon/lang/ja-JP.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "ログオン スクリーンセーバー" IDS_TEXT "設定が必要なオプションはありません。" diff --git a/base/applications/screensavers/logon/lang/ko-KR.rc b/base/applications/screensavers/logon/lang/ko-KR.rc index e8ba152dcbf..e41bfca27c7 100644 --- a/base/applications/screensavers/logon/lang/ko-KR.rc +++ b/base/applications/screensavers/logon/lang/ko-KR.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "로그온 화면 보호기" IDS_TEXT "설정할 것이 없습니다." diff --git a/base/applications/screensavers/logon/lang/lt-LT.rc b/base/applications/screensavers/logon/lang/lt-LT.rc index 894f01beb00..4e3a164a6ef 100644 --- a/base/applications/screensavers/logon/lang/lt-LT.rc +++ b/base/applications/screensavers/logon/lang/lt-LT.rc @@ -9,7 +9,7 @@ LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Logon" IDS_TEXT "Nėra keičiamų parametrų." diff --git a/base/applications/screensavers/logon/lang/nl-NL.rc b/base/applications/screensavers/logon/lang/nl-NL.rc index deee07f16b6..06ae46f01bd 100644 --- a/base/applications/screensavers/logon/lang/nl-NL.rc +++ b/base/applications/screensavers/logon/lang/nl-NL.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Logon Schermbeveiliging" IDS_TEXT "Geen dingen om in te stellen." diff --git a/base/applications/screensavers/logon/lang/no-NO.rc b/base/applications/screensavers/logon/lang/no-NO.rc index 52d749e3e19..3c1d18deffe 100644 --- a/base/applications/screensavers/logon/lang/no-NO.rc +++ b/base/applications/screensavers/logon/lang/no-NO.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Pålogging skjermsparer" IDS_TEXT "Ingen valg trenges å bli satt." diff --git a/base/applications/screensavers/logon/lang/pl-PL.rc b/base/applications/screensavers/logon/lang/pl-PL.rc index 0a89bab5875..25f4640be8b 100644 --- a/base/applications/screensavers/logon/lang/pl-PL.rc +++ b/base/applications/screensavers/logon/lang/pl-PL.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Wygaszacz ekranu Logon" IDS_TEXT "Brak opcji." diff --git a/base/applications/screensavers/logon/lang/pt-BR.rc b/base/applications/screensavers/logon/lang/pt-BR.rc index 9451342c45b..4f8bc3f5265 100644 --- a/base/applications/screensavers/logon/lang/pt-BR.rc +++ b/base/applications/screensavers/logon/lang/pt-BR.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Protetor de Tela de Logon" IDS_TEXT "Nenhuma opção precisa ser definida." diff --git a/base/applications/screensavers/logon/lang/ro-RO.rc b/base/applications/screensavers/logon/lang/ro-RO.rc index 94128f6fbc9..d5847abfa6e 100644 --- a/base/applications/screensavers/logon/lang/ro-RO.rc +++ b/base/applications/screensavers/logon/lang/ro-RO.rc @@ -1,7 +1,7 @@ //2011.10.30 - Fulea Ștefan: minor changes LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Sigla ReactOS" IDS_TEXT "Această animație de ecran inactiv nu are opțiuni." diff --git a/base/applications/screensavers/logon/lang/ru-RU.rc b/base/applications/screensavers/logon/lang/ru-RU.rc index 82a8c14473f..406b9b9f448 100644 --- a/base/applications/screensavers/logon/lang/ru-RU.rc +++ b/base/applications/screensavers/logon/lang/ru-RU.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Заставка ""Вход в систему""" IDS_TEXT "Эта заставка не имеет настраиваемых параметров." diff --git a/base/applications/screensavers/logon/lang/sk-SK.rc b/base/applications/screensavers/logon/lang/sk-SK.rc index b30a9d9318c..2355f8d31c0 100644 --- a/base/applications/screensavers/logon/lang/sk-SK.rc +++ b/base/applications/screensavers/logon/lang/sk-SK.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Logon - šetrič obrazovky" IDS_TEXT "Nie sú potrebné žiadne nastavenia." diff --git a/base/applications/screensavers/logon/lang/sv-SE.rc b/base/applications/screensavers/logon/lang/sv-SE.rc index 213190d5cfb..ddc82b2e67e 100644 --- a/base/applications/screensavers/logon/lang/sv-SE.rc +++ b/base/applications/screensavers/logon/lang/sv-SE.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Inloggingsskärmsläckare" IDS_TEXT "Inga inställningar behövs." diff --git a/base/applications/screensavers/logon/lang/tr-TR.rc b/base/applications/screensavers/logon/lang/tr-TR.rc index 02e170c1b7b..0833de978a5 100644 --- a/base/applications/screensavers/logon/lang/tr-TR.rc +++ b/base/applications/screensavers/logon/lang/tr-TR.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Oturum Açma Görüntülük Koruyucusu" IDS_TEXT "Bu görüntülük koruyucusu için hiçbir seçenek yok." diff --git a/base/applications/screensavers/logon/lang/uk-UA.rc b/base/applications/screensavers/logon/lang/uk-UA.rc index 19035b0856d..9a2bf07b5b9 100644 --- a/base/applications/screensavers/logon/lang/uk-UA.rc +++ b/base/applications/screensavers/logon/lang/uk-UA.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "Заставка ""Вхід до системи""" IDS_TEXT "Ця заставка не має налаштовуваних параметрів." diff --git a/base/applications/screensavers/logon/lang/zh-CN.rc b/base/applications/screensavers/logon/lang/zh-CN.rc index 6fee2178edb..5e28ee447a4 100644 --- a/base/applications/screensavers/logon/lang/zh-CN.rc +++ b/base/applications/screensavers/logon/lang/zh-CN.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "登录屏幕保护程序" IDS_TEXT "没有需要设置的选项。" diff --git a/base/applications/screensavers/logon/lang/zh-TW.rc b/base/applications/screensavers/logon/lang/zh-TW.rc index 7e937844d39..8d2361e570a 100644 --- a/base/applications/screensavers/logon/lang/zh-TW.rc +++ b/base/applications/screensavers/logon/lang/zh-TW.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DESCRIPTION "登入螢幕保護程式" IDS_TEXT "沒有需要設定的選項。" diff --git a/base/applications/screensavers/logon/logon.rc b/base/applications/screensavers/logon/logon.rc index fd2a4bd652c..8d689065176 100644 --- a/base/applications/screensavers/logon/logon.rc +++ b/base/applications/screensavers/logon/logon.rc @@ -12,8 +12,10 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include -IDB_WORKSTATION BITMAP DISCARDABLE "res/0.bmp" -IDB_SERVER BITMAP DISCARDABLE "res/1.bmp" +IDB_WORKSTATION BITMAP "res/0.bmp" +IDB_SERVER BITMAP "res/1.bmp" + +#include // UTF-8 #pragma code_page(65001) diff --git a/base/applications/shutdown/lang/bg-BG.rc b/base/applications/shutdown/lang/bg-BG.rc index b962f49861c..31c47eda8e1 100644 --- a/base/applications/shutdown/lang/bg-BG.rc +++ b/base/applications/shutdown/lang/bg-BG.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remote Shutdown" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -79,7 +79,7 @@ Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Shutdown the system" IDS_ACTION_RESTART, "Restart the system" @@ -87,7 +87,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Other" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Maintenance" diff --git a/base/applications/shutdown/lang/cs-CZ.rc b/base/applications/shutdown/lang/cs-CZ.rc index 3bcdabcae3e..89eee7780a0 100644 --- a/base/applications/shutdown/lang/cs-CZ.rc +++ b/base/applications/shutdown/lang/cs-CZ.rc @@ -6,7 +6,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Vzrálené vypnutí" FONT 8, "MS Shell Dlg" @@ -33,7 +33,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS nástroj na vypínání\n\ \n\ @@ -83,7 +83,7 @@ Použití: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Vypnutí systému" IDS_ACTION_RESTART, "Restart systému" @@ -91,7 +91,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Jiný" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Údržba" diff --git a/base/applications/shutdown/lang/de-DE.rc b/base/applications/shutdown/lang/de-DE.rc index deb4784c817..ca1871a5a13 100644 --- a/base/applications/shutdown/lang/de-DE.rc +++ b/base/applications/shutdown/lang/de-DE.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remote Shutdown" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Werkzeug\n\ \n\ @@ -86,7 +86,7 @@ Benutzung: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Das System herunterfahren" IDS_ACTION_RESTART, "Das System neustarten" @@ -94,7 +94,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Anderer Grund" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Wartung" diff --git a/base/applications/shutdown/lang/el-GR.rc b/base/applications/shutdown/lang/el-GR.rc index ce2c9252640..b1186e79f62 100644 --- a/base/applications/shutdown/lang/el-GR.rc +++ b/base/applications/shutdown/lang/el-GR.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remote Shutdown" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -79,7 +79,7 @@ Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Shutdown the system" IDS_ACTION_RESTART, "Restart the system" @@ -87,7 +87,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Other" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Maintenance" diff --git a/base/applications/shutdown/lang/en-US.rc b/base/applications/shutdown/lang/en-US.rc index 344227a9156..d1973d859ef 100644 --- a/base/applications/shutdown/lang/en-US.rc +++ b/base/applications/shutdown/lang/en-US.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remote Shutdown" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -79,7 +79,7 @@ Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Shutdown the system" IDS_ACTION_RESTART, "Restart the system" @@ -87,7 +87,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Other" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Maintenance" diff --git a/base/applications/shutdown/lang/es-ES.rc b/base/applications/shutdown/lang/es-ES.rc index 41ad4900dd8..6ca52f3cf9b 100644 --- a/base/applications/shutdown/lang/es-ES.rc +++ b/base/applications/shutdown/lang/es-ES.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remote Shutdown" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -79,7 +79,7 @@ Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Shutdown the system" IDS_ACTION_RESTART, "Restart the system" @@ -87,7 +87,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Other" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Maintenance" diff --git a/base/applications/shutdown/lang/fr-FR.rc b/base/applications/shutdown/lang/fr-FR.rc index 204f90f3290..d4295d1868e 100644 --- a/base/applications/shutdown/lang/fr-FR.rc +++ b/base/applications/shutdown/lang/fr-FR.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Arrêt à distance" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -83,7 +83,7 @@ Utilisation : shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Arrêter le système" IDS_ACTION_RESTART, "Redémarrer le système" @@ -91,7 +91,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Autre" IDS_REASON_HARDWARE_MAINTENANCE, "Matériel : Maintenance" diff --git a/base/applications/shutdown/lang/he-IL.rc b/base/applications/shutdown/lang/he-IL.rc index 52051a91a82..6aedadc8c2a 100644 --- a/base/applications/shutdown/lang/he-IL.rc +++ b/base/applications/shutdown/lang/he-IL.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "כיבוי מרחוק" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -79,7 +79,7 @@ Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "כבה את המערכת" IDS_ACTION_RESTART, "הפעל מחדש את המערכת" @@ -87,7 +87,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "אחר" IDS_REASON_HARDWARE_MAINTENANCE, "חומרה: תחזוקה" diff --git a/base/applications/shutdown/lang/it-IT.rc b/base/applications/shutdown/lang/it-IT.rc index f8efc8f5b60..165aaa0fea8 100644 --- a/base/applications/shutdown/lang/it-IT.rc +++ b/base/applications/shutdown/lang/it-IT.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Accesso remoto" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -79,7 +79,7 @@ Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Esci dal sistema" IDS_ACTION_RESTART, "Riavvia il sistema" @@ -87,7 +87,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Altro" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Manutenzione" diff --git a/base/applications/shutdown/lang/ja-JP.rc b/base/applications/shutdown/lang/ja-JP.rc index 66b80f59d66..dd6e19a95f1 100644 --- a/base/applications/shutdown/lang/ja-JP.rc +++ b/base/applications/shutdown/lang/ja-JP.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remote Shutdown" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -79,7 +79,7 @@ Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Shutdown the system" IDS_ACTION_RESTART, "Restart the system" @@ -87,7 +87,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Other" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Maintenance" diff --git a/base/applications/shutdown/lang/ko-KR.rc b/base/applications/shutdown/lang/ko-KR.rc index 4878f06eba6..99fc7c77d79 100644 --- a/base/applications/shutdown/lang/ko-KR.rc +++ b/base/applications/shutdown/lang/ko-KR.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remote Shutdown" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -79,7 +79,7 @@ Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Shutdown the system" IDS_ACTION_RESTART, "Restart the system" @@ -87,7 +87,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Other" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Maintenance" diff --git a/base/applications/shutdown/lang/lt-LT.rc b/base/applications/shutdown/lang/lt-LT.rc index d3e2d7a9129..1d721ec68c0 100644 --- a/base/applications/shutdown/lang/lt-LT.rc +++ b/base/applications/shutdown/lang/lt-LT.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remote Shutdown" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -79,7 +79,7 @@ Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Shutdown the system" IDS_ACTION_RESTART, "Restart the system" @@ -87,7 +87,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Other" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Maintenance" diff --git a/base/applications/shutdown/lang/nl-NL.rc b/base/applications/shutdown/lang/nl-NL.rc index 237948e7e32..29b38013b29 100644 --- a/base/applications/shutdown/lang/nl-NL.rc +++ b/base/applications/shutdown/lang/nl-NL.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remote Shutdown" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -79,7 +79,7 @@ Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Shutdown the system" IDS_ACTION_RESTART, "Restart the system" @@ -87,7 +87,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Other" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Maintenance" diff --git a/base/applications/shutdown/lang/no-NO.rc b/base/applications/shutdown/lang/no-NO.rc index 156f3f5741d..691536cd88a 100644 --- a/base/applications/shutdown/lang/no-NO.rc +++ b/base/applications/shutdown/lang/no-NO.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remote Shutdown" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -79,7 +79,7 @@ Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Shutdown the system" IDS_ACTION_RESTART, "Restart the system" @@ -87,7 +87,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Other" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Maintenance" diff --git a/base/applications/shutdown/lang/pl-PL.rc b/base/applications/shutdown/lang/pl-PL.rc index c04813a0cf8..ec9e6614c5a 100644 --- a/base/applications/shutdown/lang/pl-PL.rc +++ b/base/applications/shutdown/lang/pl-PL.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remote Shutdown" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -79,7 +79,7 @@ Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Shutdown the system" IDS_ACTION_RESTART, "Restart the system" @@ -87,7 +87,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Other" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Maintenance" diff --git a/base/applications/shutdown/lang/pt-BR.rc b/base/applications/shutdown/lang/pt-BR.rc index d028fb7d167..34858f4f449 100644 --- a/base/applications/shutdown/lang/pt-BR.rc +++ b/base/applications/shutdown/lang/pt-BR.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remote Shutdown" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -79,7 +79,7 @@ Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Shutdown the system" IDS_ACTION_RESTART, "Restart the system" @@ -87,7 +87,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Other" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Maintenance" diff --git a/base/applications/shutdown/lang/ro-RO.rc b/base/applications/shutdown/lang/ro-RO.rc index ee4a54f5a41..c03aaedcb23 100644 --- a/base/applications/shutdown/lang/ro-RO.rc +++ b/base/applications/shutdown/lang/ro-RO.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remote Shutdown" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -79,7 +79,7 @@ Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Shutdown the system" IDS_ACTION_RESTART, "Restart the system" @@ -87,7 +87,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Other" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Maintenance" diff --git a/base/applications/shutdown/lang/ru-RU.rc b/base/applications/shutdown/lang/ru-RU.rc index 3aee3f1c268..9ae32a91085 100644 --- a/base/applications/shutdown/lang/ru-RU.rc +++ b/base/applications/shutdown/lang/ru-RU.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remote Shutdown" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -79,7 +79,7 @@ Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Shutdown the system" IDS_ACTION_RESTART, "Restart the system" @@ -87,7 +87,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Other" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Maintenance" diff --git a/base/applications/shutdown/lang/sk-SK.rc b/base/applications/shutdown/lang/sk-SK.rc index 4638470dc01..a16fc91d6fe 100644 --- a/base/applications/shutdown/lang/sk-SK.rc +++ b/base/applications/shutdown/lang/sk-SK.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remote Shutdown" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -79,7 +79,7 @@ Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Shutdown the system" IDS_ACTION_RESTART, "Restart the system" @@ -87,7 +87,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Other" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Maintenance" diff --git a/base/applications/shutdown/lang/sv-SE.rc b/base/applications/shutdown/lang/sv-SE.rc index fe3f3790b2e..dd1f55eb95d 100644 --- a/base/applications/shutdown/lang/sv-SE.rc +++ b/base/applications/shutdown/lang/sv-SE.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remote Shutdown" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -79,7 +79,7 @@ Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Shutdown the system" IDS_ACTION_RESTART, "Restart the system" @@ -87,7 +87,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Other" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Maintenance" diff --git a/base/applications/shutdown/lang/uk-UA.rc b/base/applications/shutdown/lang/uk-UA.rc index 19662b84959..9e09b554d59 100644 --- a/base/applications/shutdown/lang/uk-UA.rc +++ b/base/applications/shutdown/lang/uk-UA.rc @@ -9,7 +9,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remote Shutdown" FONT 8, "MS Shell Dlg" @@ -36,7 +36,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -87,7 +87,7 @@ Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Shutdown the system" IDS_ACTION_RESTART, "Restart the system" @@ -95,7 +95,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Other" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Maintenance" diff --git a/base/applications/shutdown/lang/zh-CN.rc b/base/applications/shutdown/lang/zh-CN.rc index 23f0c6f6b33..93d987263d0 100644 --- a/base/applications/shutdown/lang/zh-CN.rc +++ b/base/applications/shutdown/lang/zh-CN.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remote Shutdown" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -79,7 +79,7 @@ Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Shutdown the system" IDS_ACTION_RESTART, "Restart the system" @@ -87,7 +87,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Other" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Maintenance" diff --git a/base/applications/shutdown/lang/zh-TW.rc b/base/applications/shutdown/lang/zh-TW.rc index b1b52dcf521..958cc2fdb7c 100644 --- a/base/applications/shutdown/lang/zh-TW.rc +++ b/base/applications/shutdown/lang/zh-TW.rc @@ -1,7 +1,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL /* Dialog */ -IDD_GUI DIALOGEX DISCARDABLE 0, 0, 240, 255 +IDD_GUI DIALOGEX 0, 0, 240, 255 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Remote Shutdown" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN END /* Information and error messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_USAGE, "ReactOS Shutdown Utility\n\ \n\ @@ -79,7 +79,7 @@ Usage: shutdown [/?] [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]\n\ END /* Remote shutdown action strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ACTION_SHUTDOWN, "Shutdown the system" IDS_ACTION_RESTART, "Restart the system" @@ -87,7 +87,7 @@ BEGIN END /* Remote shutdown reason strings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_REASON_OTHER, "Other" IDS_REASON_HARDWARE_MAINTENANCE, "Hardware: Maintenance" diff --git a/base/applications/shutdown/shutdown.rc b/base/applications/shutdown/shutdown.rc index c6b93f48019..0862f3bc0b9 100644 --- a/base/applications/shutdown/shutdown.rc +++ b/base/applications/shutdown/shutdown.rc @@ -11,4 +11,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #define REACTOS_STR_ORIGINAL_FILENAME "shutdown.exe" #include +#include + #include "rsrc.rc" diff --git a/base/applications/sndrec32/rsrc.rc b/base/applications/sndrec32/rsrc.rc index 41d7cc1679d..70423ba52d9 100644 --- a/base/applications/sndrec32/rsrc.rc +++ b/base/applications/sndrec32/rsrc.rc @@ -18,6 +18,8 @@ IDB_BITMAP2_REC_DIS BITMAP "resources/but_rec_dis.bmp" IDB_BITMAP2_START_DIS BITMAP "resources/but_start_dis.bmp" IDB_BITMAP2_STOP_DIS BITMAP "resources/but_stop_dis.bmp" +#include + // UTF-8 #pragma code_page(65001) #ifdef LANGUAGE_CS_CZ diff --git a/base/applications/sndvol32/lang/bg-BG.rc b/base/applications/sndvol32/lang/bg-BG.rc index a213084d30b..135bbe9964e 100644 --- a/base/applications/sndvol32/lang/bg-BG.rc +++ b/base/applications/sndvol32/lang/bg-BG.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "Въз&можности" BEGIN @@ -21,7 +21,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Сила на звука" IDS_NOMIXERDEVICES "Не са открити работещи смесителни устройства! Приложението ще се затвори." diff --git a/base/applications/sndvol32/lang/cs-CZ.rc b/base/applications/sndvol32/lang/cs-CZ.rc index c38b4530d27..3791070824c 100644 --- a/base/applications/sndvol32/lang/cs-CZ.rc +++ b/base/applications/sndvol32/lang/cs-CZ.rc @@ -6,7 +6,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "&Nastavení" BEGIN @@ -23,7 +23,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Ovládání hlasitosti" IDS_NOMIXERDEVICES "Nejsou dostupná žádná směšovací zařízení! Aplikace se nyní ukončí." diff --git a/base/applications/sndvol32/lang/de-DE.rc b/base/applications/sndvol32/lang/de-DE.rc index d6263d3f5e6..1d78c26c14e 100644 --- a/base/applications/sndvol32/lang/de-DE.rc +++ b/base/applications/sndvol32/lang/de-DE.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "&Optionen" BEGIN @@ -17,7 +17,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Lautstärke-Einstellungen" IDS_NOMIXERDEVICES "Es sind keine aktiven Mixer vorhanden! Die Anwendung wird jetzt beendet." diff --git a/base/applications/sndvol32/lang/el-GR.rc b/base/applications/sndvol32/lang/el-GR.rc index 042c838a540..ae98f8233f3 100644 --- a/base/applications/sndvol32/lang/el-GR.rc +++ b/base/applications/sndvol32/lang/el-GR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "O&ptions" BEGIN @@ -17,7 +17,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Έλεγχος έντασης" IDS_NOMIXERDEVICES "There are no active mixer devices available! The application will now exit." diff --git a/base/applications/sndvol32/lang/en-US.rc b/base/applications/sndvol32/lang/en-US.rc index ab60131c3c5..b21b79605fa 100644 --- a/base/applications/sndvol32/lang/en-US.rc +++ b/base/applications/sndvol32/lang/en-US.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "O&ptions" BEGIN @@ -17,7 +17,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Volume Control" IDS_NOMIXERDEVICES "There are no active mixer devices available! The application will now exit." diff --git a/base/applications/sndvol32/lang/es-ES.rc b/base/applications/sndvol32/lang/es-ES.rc index 208b3fd870e..415375c008c 100644 --- a/base/applications/sndvol32/lang/es-ES.rc +++ b/base/applications/sndvol32/lang/es-ES.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "&Opciones" BEGIN @@ -21,7 +21,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Control de Volumen" IDS_NOMIXERDEVICES "¡No hay dispositivos mezcladores activos en este momento! \n\ diff --git a/base/applications/sndvol32/lang/fr-FR.rc b/base/applications/sndvol32/lang/fr-FR.rc index e9aea0e406d..fe77a427c4d 100644 --- a/base/applications/sndvol32/lang/fr-FR.rc +++ b/base/applications/sndvol32/lang/fr-FR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "O&ptions" BEGIN @@ -17,7 +17,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Contrôle du volume" IDS_NOMIXERDEVICES "Il n'y a pas de périphérique de mixage disponible ! L'application va se terminer." diff --git a/base/applications/sndvol32/lang/he-IL.rc b/base/applications/sndvol32/lang/he-IL.rc index cb469f26427..5432929503f 100644 --- a/base/applications/sndvol32/lang/he-IL.rc +++ b/base/applications/sndvol32/lang/he-IL.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "אפשרויות" BEGIN @@ -17,7 +17,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "בקרת עוצמה" IDS_NOMIXERDEVICES "אין התקני ערבול פעילים זמינים! היישום יצא עכשיו" diff --git a/base/applications/sndvol32/lang/hu-HU.rc b/base/applications/sndvol32/lang/hu-HU.rc index 4dde87b7c1c..d1f60aa3957 100644 --- a/base/applications/sndvol32/lang/hu-HU.rc +++ b/base/applications/sndvol32/lang/hu-HU.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "&Beállítások" BEGIN @@ -21,7 +21,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Hangerõ szabályozó" IDS_NOMIXERDEVICES "Nincsenek elérhetõ keverõ eszközök. A program kilép." diff --git a/base/applications/sndvol32/lang/id-ID.rc b/base/applications/sndvol32/lang/id-ID.rc index 487e5fd7630..ff40c4a097c 100644 --- a/base/applications/sndvol32/lang/id-ID.rc +++ b/base/applications/sndvol32/lang/id-ID.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "O&psi" BEGIN @@ -17,7 +17,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Kontrol Volume" IDS_NOMIXERDEVICES "Tidak ada device mixer yang aktif yang tersedia! Aplikasi akan keluar sekarang." diff --git a/base/applications/sndvol32/lang/it-IT.rc b/base/applications/sndvol32/lang/it-IT.rc index a5bab0b083a..c97a1c126ab 100644 --- a/base/applications/sndvol32/lang/it-IT.rc +++ b/base/applications/sndvol32/lang/it-IT.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "O&pzioni" BEGIN @@ -17,7 +17,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Controllo Volume" IDS_NOMIXERDEVICES "Non ci sono dispositivi mixer disponibili! Il programma si chiuderà." diff --git a/base/applications/sndvol32/lang/ja-JP.rc b/base/applications/sndvol32/lang/ja-JP.rc index 4d6d248874d..97711c7eccf 100644 --- a/base/applications/sndvol32/lang/ja-JP.rc +++ b/base/applications/sndvol32/lang/ja-JP.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "オプション(&P)" BEGIN @@ -17,7 +17,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "ボリューム コントロール" IDS_NOMIXERDEVICES "アクティブなミキサーが利用できません ! アプリケーションを終了します。" diff --git a/base/applications/sndvol32/lang/ko-KR.rc b/base/applications/sndvol32/lang/ko-KR.rc index ad2526e8fe0..2feac7587eb 100644 --- a/base/applications/sndvol32/lang/ko-KR.rc +++ b/base/applications/sndvol32/lang/ko-KR.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "옵션(&P)" BEGIN @@ -21,7 +21,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "볼륨 컨트롤" IDS_NOMIXERDEVICES "사용 가능한 믹서 장치가 없습니다! 이 프로그램은 종료됩니다." diff --git a/base/applications/sndvol32/lang/lt-LT.rc b/base/applications/sndvol32/lang/lt-LT.rc index 86d079a22d7..997af743716 100644 --- a/base/applications/sndvol32/lang/lt-LT.rc +++ b/base/applications/sndvol32/lang/lt-LT.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "&Parametrai" BEGIN @@ -19,7 +19,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Garso valdiklis" IDS_NOMIXERDEVICES "Šiuo metu nėra aktyvių garso maišymo įrenginių! Programa darbą baigė." diff --git a/base/applications/sndvol32/lang/nl-NL.rc b/base/applications/sndvol32/lang/nl-NL.rc index 599f8f2ea8f..2b1c46a751e 100644 --- a/base/applications/sndvol32/lang/nl-NL.rc +++ b/base/applications/sndvol32/lang/nl-NL.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "O&pties" BEGIN @@ -17,7 +17,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Volume Control" IDS_NOMIXERDEVICES "Er zijn geen actieve mixerapparaten beschikbaar! Deze toepassing wordt nu afgesloten." diff --git a/base/applications/sndvol32/lang/no-NO.rc b/base/applications/sndvol32/lang/no-NO.rc index ae09d4dc239..aacf5203868 100644 --- a/base/applications/sndvol32/lang/no-NO.rc +++ b/base/applications/sndvol32/lang/no-NO.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "I&nnstillinger" BEGIN @@ -17,7 +17,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Volumkontroll" IDS_NOMIXERDEVICES "Det er ingen aktive mikser enheter tilgjengelig! Programmet vil nå avsluttes." diff --git a/base/applications/sndvol32/lang/pl-PL.rc b/base/applications/sndvol32/lang/pl-PL.rc index c4fe9bf99a2..8214fa7376a 100644 --- a/base/applications/sndvol32/lang/pl-PL.rc +++ b/base/applications/sndvol32/lang/pl-PL.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "&Opcje" BEGIN @@ -25,7 +25,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Regulacja głośności" IDS_NOMIXERDEVICES "Nie jest dostępne żadne aktywne urządzenie miksujące! Program zostanie zamknięty." diff --git a/base/applications/sndvol32/lang/pt-BR.rc b/base/applications/sndvol32/lang/pt-BR.rc index 29d815ba6a0..3441f596426 100644 --- a/base/applications/sndvol32/lang/pt-BR.rc +++ b/base/applications/sndvol32/lang/pt-BR.rc @@ -5,7 +5,7 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "&Opções" BEGIN @@ -22,7 +22,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Controle de Volume" IDS_NOMIXERDEVICES "Não há dispositivos de mixagem disponíveis! O aplicativo irá sair agora." diff --git a/base/applications/sndvol32/lang/ro-RO.rc b/base/applications/sndvol32/lang/ro-RO.rc index afe6989c047..80ca570690b 100644 --- a/base/applications/sndvol32/lang/ro-RO.rc +++ b/base/applications/sndvol32/lang/ro-RO.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "&Opțiuni" BEGIN @@ -24,7 +24,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Reglaj de volum" IDS_NOMIXERDEVICES "Nu există dispozitive active de mixaj! Aplicația se va închide." diff --git a/base/applications/sndvol32/lang/ru-RU.rc b/base/applications/sndvol32/lang/ru-RU.rc index 872cdb8b9d8..d045c0d7144 100644 --- a/base/applications/sndvol32/lang/ru-RU.rc +++ b/base/applications/sndvol32/lang/ru-RU.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "&Параметры" BEGIN @@ -19,7 +19,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Управление громкостью" IDS_NOMIXERDEVICES "Нет доступных микшерных устройств! Приложение будет завершено." diff --git a/base/applications/sndvol32/lang/sk-SK.rc b/base/applications/sndvol32/lang/sk-SK.rc index 42d92d3006b..edf793c2a4a 100644 --- a/base/applications/sndvol32/lang/sk-SK.rc +++ b/base/applications/sndvol32/lang/sk-SK.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "&Možnosti" BEGIN @@ -21,7 +21,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Ovládanie hlasitosti" IDS_NOMIXERDEVICES "Nie sú dostupné žiadne zariadenie zmiešavača! Program sa teraz ukončí." diff --git a/base/applications/sndvol32/lang/sv-SE.rc b/base/applications/sndvol32/lang/sv-SE.rc index def61d1548f..bdf1cdfad50 100644 --- a/base/applications/sndvol32/lang/sv-SE.rc +++ b/base/applications/sndvol32/lang/sv-SE.rc @@ -21,7 +21,7 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "&Alternativ" BEGIN @@ -38,7 +38,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Volymkontroll" IDS_NOMIXERDEVICES "Det finns inga ljudmixningsenheter tillgängliga! Programmet kommer nu att avslutas." diff --git a/base/applications/sndvol32/lang/th-TH.rc b/base/applications/sndvol32/lang/th-TH.rc index 2fd8fc245a2..8e2cd4beabe 100644 --- a/base/applications/sndvol32/lang/th-TH.rc +++ b/base/applications/sndvol32/lang/th-TH.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_THAI, SUBLANG_DEFAULT -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "&ตัวเลือก" BEGIN @@ -25,7 +25,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "แผงควบคุมระบบเสียง" IDS_NOMIXERDEVICES "ไม่พบอุปกรณ์ผสมเสียงใดๆเหลืออยู่เลย! โปรแกรมนี้จะถูกปิดทันที" diff --git a/base/applications/sndvol32/lang/tr-TR.rc b/base/applications/sndvol32/lang/tr-TR.rc index e767c3e2cab..4a3da27bafa 100644 --- a/base/applications/sndvol32/lang/tr-TR.rc +++ b/base/applications/sndvol32/lang/tr-TR.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "&Seçenekler" BEGIN @@ -21,7 +21,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Ses Düzeyi Denetleyicisi" IDS_NOMIXERDEVICES "Etkin bir karıştırıcı aygıt yok. Uygulamadan çıkılacaktır." @@ -42,7 +42,7 @@ BEGIN LTEXT "Gösterilecek Ses Düzeyi Denetimleri:", IDC_LABELCONTROLS, 7, 109, 162, 8 CONTROL "", IDC_CONTROLS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | WS_TABSTOP | WS_BORDER, 7, 122, 211, 96 PUSHBUTTON "Tamam", IDOK, 114,226,50,14 - PUSHBUTTON "Vazgeç", IDCANCEL, 168,226,50,14 + PUSHBUTTON "İptal", IDCANCEL, 168,226,50,14 END IDD_VOLUME_CTRL DIALOG 0, 0, 90, 150 diff --git a/base/applications/sndvol32/lang/uk-UA.rc b/base/applications/sndvol32/lang/uk-UA.rc index 9f996386f52..2455e43a5f0 100644 --- a/base/applications/sndvol32/lang/uk-UA.rc +++ b/base/applications/sndvol32/lang/uk-UA.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "&Параметри" BEGIN @@ -25,7 +25,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "Регулятор гучності" IDS_NOMIXERDEVICES "Активні пристрої-мікшери недоступні! Додаток закінчує роботу." diff --git a/base/applications/sndvol32/lang/zh-CN.rc b/base/applications/sndvol32/lang/zh-CN.rc index 17e13cce06a..25e77faa731 100644 --- a/base/applications/sndvol32/lang/zh-CN.rc +++ b/base/applications/sndvol32/lang/zh-CN.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "选项(&P)" BEGIN @@ -21,7 +21,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "音量控制" IDS_NOMIXERDEVICES "没有可用的混音器设备!这个程序即将退出。" diff --git a/base/applications/sndvol32/lang/zh-TW.rc b/base/applications/sndvol32/lang/zh-TW.rc index b02e421d32e..7e3c0137ab9 100644 --- a/base/applications/sndvol32/lang/zh-TW.rc +++ b/base/applications/sndvol32/lang/zh-TW.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL -IDM_MAINMENU MENU DISCARDABLE +IDM_MAINMENU MENU BEGIN POPUP "選項(&P)" BEGIN @@ -21,7 +21,7 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SNDVOL32 "音量控制" IDS_NOMIXERDEVICES "沒有可用的混音器設備!這個程式即將結束。" diff --git a/base/applications/sndvol32/rsrc.rc b/base/applications/sndvol32/rsrc.rc index 1ed4470049d..9d6c9a0d1c6 100644 --- a/base/applications/sndvol32/rsrc.rc +++ b/base/applications/sndvol32/rsrc.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -IDI_MAINAPP ICON DISCARDABLE resources/sndvol32.ico +IDI_MAINAPP ICON resources/sndvol32.ico // UTF-8 #pragma code_page(65001) diff --git a/base/applications/sndvol32/sndvol32.rc b/base/applications/sndvol32/sndvol32.rc index 7efb803190c..a397f7a019d 100644 --- a/base/applications/sndvol32/sndvol32.rc +++ b/base/applications/sndvol32/sndvol32.rc @@ -9,4 +9,6 @@ #define REACTOS_STR_ORIGINAL_FILENAME "sndvol32.exe\0" #include +#include + #include "rsrc.rc" diff --git a/base/applications/taskmgr/lang/bg-BG.rc b/base/applications/taskmgr/lang/bg-BG.rc index 625c199c9d1..d381cf9246f 100644 --- a/base/applications/taskmgr/lang/bg-BG.rc +++ b/base/applications/taskmgr/lang/bg-BG.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&Файл" BEGIN @@ -62,7 +62,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "Водоравно настелване", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "&Отвесно настелване", ID_WINDOWS_TILEVERTICALLY @@ -72,7 +72,7 @@ BEGIN MENUITEM "Изваждане &отпред ", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -84,7 +84,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -103,7 +103,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -114,7 +114,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -150,7 +150,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -161,7 +161,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -172,7 +172,7 @@ BEGIN PUSHBUTTON "&Прекратяване на задача",IDC_ENDTASK,7,189,95,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 220 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 220 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -185,7 +185,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -241,7 +241,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Обезбубяващи канали" FONT 8, "MS Shell Dlg" @@ -252,7 +252,7 @@ BEGIN PUSHBUTTON "Затваряне",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Процесорно сродство" FONT 8, "MS Shell Dlg" @@ -327,7 +327,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 240, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 240, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Избор на стълбове" FONT 8, "MS Shell Dlg" @@ -395,7 +395,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -404,13 +404,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -424,7 +424,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -507,14 +507,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Задачен управител" IDC_TASKMGR "Задачен управител" IDS_IDLE_PROCESS "Бездействия" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Изпълнява ново приложение" ID_OPTIONS_ALWAYSONTOP "Задачният управител остава над всички други прозорци, ако не е смален." @@ -530,7 +530,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Обновяване на екрана четири секунди" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Без самообновяване" ID_WINDOWS_TILEHORIZONTALLY @@ -554,7 +554,7 @@ BEGIN "Извеждане на задача отпред" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Казва на избраните задачи да се затворят" ID_GOTOPROCESS "Switches the focus to the process of the selected task" @@ -578,7 +578,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Приложения" IDS_TAB_PROCESSES "Действия" diff --git a/base/applications/taskmgr/lang/cs-CZ.rc b/base/applications/taskmgr/lang/cs-CZ.rc index 0b37b3d69c9..b62e5d1fac8 100644 --- a/base/applications/taskmgr/lang/cs-CZ.rc +++ b/base/applications/taskmgr/lang/cs-CZ.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&Soubor" BEGIN @@ -62,7 +62,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "Vyrovnat &horizontálně", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "Vyrovnat &vertikálně", ID_WINDOWS_TILEVERTICALLY @@ -72,7 +72,7 @@ BEGIN MENUITEM "&Přenést do popředí", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -84,7 +84,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -103,7 +103,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -114,7 +114,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -150,7 +150,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -161,7 +161,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -172,7 +172,7 @@ BEGIN PUSHBUTTON "&Ukončit úlohu",IDC_ENDTASK,75,189,53,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -185,7 +185,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -241,7 +241,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Kanály ladění" FONT 8, "MS Shell Dlg" @@ -252,7 +252,7 @@ BEGIN PUSHBUTTON "Zavřít",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Afinita procesoru" FONT 8, "MS Shell Dlg" @@ -327,7 +327,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 195, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 195, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Vyberte sloupce" FONT 8, "MS Shell Dlg" @@ -395,7 +395,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -404,13 +404,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -424,7 +424,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -507,14 +507,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Správce úloh" IDC_TASKMGR "Správce úloh" IDS_IDLE_PROCESS "Nečinné procesy" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Spustí novou aplikaci" ID_OPTIONS_ALWAYSONTOP "Správce úloh zůstane zobrazený nad ostatními okny, dokud jej neminimalizujete" @@ -530,7 +530,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Aktualizuje ukazatel jednou za čtyři vteřinu" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Automaticky neaktualizuje" ID_WINDOWS_TILEHORIZONTALLY @@ -554,7 +554,7 @@ BEGIN "Přepne úlohu do popředí" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Pokusí se ukončit zvolenou aplikaci" ID_GOTOPROCESS "Přepne na proces zvolené úlohy" @@ -578,7 +578,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Aplikace" IDS_TAB_PROCESSES "Procesy" diff --git a/base/applications/taskmgr/lang/da-DK.rc b/base/applications/taskmgr/lang/da-DK.rc index 15c1c936f19..65923262e02 100644 --- a/base/applications/taskmgr/lang/da-DK.rc +++ b/base/applications/taskmgr/lang/da-DK.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_DANISH, SUBLANG_DEFAULT -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&Fil" BEGIN @@ -62,7 +62,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "Tile &Horisontalt", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "Tile &Verticalt", ID_WINDOWS_TILEVERTICALLY @@ -72,7 +72,7 @@ BEGIN MENUITEM "&Bring til front", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -84,7 +84,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -103,7 +103,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -114,7 +114,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -150,7 +150,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -161,7 +161,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -172,7 +172,7 @@ BEGIN PUSHBUTTON "&Afslut Opgave",IDC_ENDTASK,75,189,53,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -185,7 +185,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -241,7 +241,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Debug Kanaler" FONT 8, "MS Shell Dlg" @@ -252,7 +252,7 @@ BEGIN PUSHBUTTON "Luk",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Processor Affinitet" FONT 8, "MS Shell Dlg" @@ -327,7 +327,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 195, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 195, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Vælg Kolonner" FONT 8, "MS Shell Dlg" @@ -395,7 +395,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -404,13 +404,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -424,7 +424,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -507,14 +507,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Opgavestyring" IDC_TASKMGR "Opgavestyring" IDS_IDLE_PROCESS "System Idle Process" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Kører et nyt Program" ID_OPTIONS_ALWAYSONTOP "Opgavestyring bliver i front af alle de andre vinduer med mindre Opgavestyring er minimeret" @@ -530,7 +530,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Opdatere visning hvert 4 sekund" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Opdatere ikke visning automatisk" ID_WINDOWS_TILEHORIZONTALLY @@ -554,7 +554,7 @@ BEGIN "Bringer opgaven til fronten, og skifter fokus til denne opgave" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Fortæller den valgt opgave at den skal lukkes" ID_GOTOPROCESS "Switches the focus to the process of the selected task" @@ -578,7 +578,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Applications" IDS_TAB_PROCESSES "Processes" diff --git a/base/applications/taskmgr/lang/de-DE.rc b/base/applications/taskmgr/lang/de-DE.rc index 291f6042a78..9f3a3fce15c 100644 --- a/base/applications/taskmgr/lang/de-DE.rc +++ b/base/applications/taskmgr/lang/de-DE.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&Datei" BEGIN @@ -64,7 +64,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "&Untereinander", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "&Nebeneinander", ID_WINDOWS_TILEVERTICALLY @@ -74,7 +74,7 @@ BEGIN MENUITEM "&In Vordergrund", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -86,7 +86,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -105,7 +105,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -116,7 +116,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -152,7 +152,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -163,7 +163,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -174,7 +174,7 @@ BEGIN PUSHBUTTON "&Task beenden",IDC_ENDTASK,75,189,53,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -187,7 +187,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -243,7 +243,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Debug-Kanäle" FONT 8, "MS Shell Dlg" @@ -254,7 +254,7 @@ BEGIN PUSHBUTTON "Schließen",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Prozessorzugehörigkeit" FONT 8, "MS Shell Dlg" @@ -329,7 +329,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 240, 199 //0, 0, 195, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 240, 199 //0, 0, 195, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Spalten auswählen" FONT 8, "MS Shell Dlg" @@ -396,7 +396,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -405,13 +405,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -425,7 +425,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -549,14 +549,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Task-Manager" IDC_TASKMGR "Task-Manager" IDS_IDLE_PROCESS "Leerlaufprozess" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Führt ein neues Programm aus." ID_OPTIONS_ALWAYSONTOP "Task-Manager bleibt im Vordergrund, wenn nicht minimiert." @@ -572,7 +572,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Aktualisiert die Anzeige alle vier Sekunden." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Aktualisiert nicht automatisch" ID_WINDOWS_TILEHORIZONTALLY @@ -596,7 +596,7 @@ BEGIN "Zeigt das Fenster im Vordergrund an und wechselt zu diesem Task." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Schließt den markierten Task." ID_GOTOPROCESS "Wechselt den Fokus zu dem markierten Task." @@ -619,7 +619,7 @@ BEGIN ID_PROCESS_PAGE_SETPRIORITY_LOW "Legt die Priorität auf NIEDRIG fest." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Anwendungen" IDS_TAB_PROCESSES "Prozesse" diff --git a/base/applications/taskmgr/lang/el-GR.rc b/base/applications/taskmgr/lang/el-GR.rc index 99b67876795..3bf9c55bba2 100644 --- a/base/applications/taskmgr/lang/el-GR.rc +++ b/base/applications/taskmgr/lang/el-GR.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&Αρχείο" BEGIN @@ -64,7 +64,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "Tile &Horizontally", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "Tile &Vertically", ID_WINDOWS_TILEVERTICALLY @@ -74,7 +74,7 @@ BEGIN MENUITEM "&Bring To Front", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -86,7 +86,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -105,7 +105,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -116,7 +116,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -152,7 +152,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -163,7 +163,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -174,7 +174,7 @@ BEGIN PUSHBUTTON "&End Task",IDC_ENDTASK,75,189,53,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -187,7 +187,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -243,7 +243,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Debug Channels" FONT 8, "MS Shell Dlg" @@ -254,7 +254,7 @@ BEGIN PUSHBUTTON "Close",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Processor Affinity" FONT 8, "MS Shell Dlg" @@ -329,7 +329,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 195, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 195, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Select Columns" FONT 8, "MS Shell Dlg" @@ -397,7 +397,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -406,13 +406,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -426,7 +426,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -509,14 +509,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Task Manager" IDC_TASKMGR "Task Manager" IDS_IDLE_PROCESS "System Idle Process" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Runs a new program" ID_OPTIONS_ALWAYSONTOP "Task Manager remains in front of all other windows unless minimized" @@ -532,7 +532,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Updates the display every four seconds" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Does not automatically update" ID_WINDOWS_TILEHORIZONTALLY @@ -556,7 +556,7 @@ BEGIN "Brings a task to the foreground, switch focus to that task" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Tells the selected tasks to close" ID_GOTOPROCESS "Switches the focus to the process of the selected task" @@ -580,7 +580,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Applications" IDS_TAB_PROCESSES "Processes" diff --git a/base/applications/taskmgr/lang/en-US.rc b/base/applications/taskmgr/lang/en-US.rc index 4b294ba71b8..afdfe36b123 100644 --- a/base/applications/taskmgr/lang/en-US.rc +++ b/base/applications/taskmgr/lang/en-US.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&File" BEGIN @@ -64,7 +64,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "Tile &Horizontally", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "Tile &Vertically", ID_WINDOWS_TILEVERTICALLY @@ -74,7 +74,7 @@ BEGIN MENUITEM "&Bring To Front", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -86,7 +86,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -105,7 +105,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -116,7 +116,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -151,7 +151,7 @@ END // Dialog // -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -162,7 +162,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -173,7 +173,7 @@ BEGIN PUSHBUTTON "&End Task",IDC_ENDTASK,75,189,53,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -186,7 +186,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -242,7 +242,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Debug Channels" FONT 8, "MS Shell Dlg" @@ -253,7 +253,7 @@ BEGIN PUSHBUTTON "Close",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Processor Affinity" FONT 8, "MS Shell Dlg" @@ -328,7 +328,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 195, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 195, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Select Columns" FONT 8, "MS Shell Dlg" @@ -396,7 +396,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -405,13 +405,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -425,7 +425,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -508,14 +508,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Task Manager" IDC_TASKMGR "Task Manager" IDS_IDLE_PROCESS "System Idle Process" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Runs a new program" ID_OPTIONS_ALWAYSONTOP "Task Manager remains in front of all other windows unless minimized" @@ -531,7 +531,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Updates the display every four seconds" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Does not automatically update" ID_WINDOWS_TILEHORIZONTALLY @@ -555,7 +555,7 @@ BEGIN "Brings a task to the foreground, switch focus to that task" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Tells the selected tasks to close" ID_GOTOPROCESS "Switches the focus to the process of the selected task" @@ -579,7 +579,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Applications" IDS_TAB_PROCESSES "Processes" diff --git a/base/applications/taskmgr/lang/es-ES.rc b/base/applications/taskmgr/lang/es-ES.rc index eedba1cc66a..8c1818b086a 100644 --- a/base/applications/taskmgr/lang/es-ES.rc +++ b/base/applications/taskmgr/lang/es-ES.rc @@ -3,7 +3,7 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&Archivo" BEGIN @@ -65,7 +65,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "Mosaico &Horizontal", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "Mosaico &Vertical", ID_WINDOWS_TILEVERTICALLY @@ -75,7 +75,7 @@ BEGIN MENUITEM "&Traer al Frente", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -87,7 +87,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -106,7 +106,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -117,7 +117,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -153,7 +153,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -164,7 +164,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -175,7 +175,7 @@ BEGIN PUSHBUTTON "&Finalizar Tarea",IDC_ENDTASK,75,189,53,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -188,7 +188,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -244,7 +244,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Canales de Depuración" FONT 8, "MS Shell Dlg" @@ -255,7 +255,7 @@ BEGIN PUSHBUTTON "Cerrar",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Afinidad del Procesador" FONT 8, "MS Shell Dlg" @@ -330,7 +330,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 245, 199 //0, 0, 195, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 245, 199 //0, 0, 195, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Seleccionar Columnas" FONT 8, "MS Shell Dlg" @@ -397,7 +397,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -406,13 +406,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -426,7 +426,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -509,14 +509,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Administrador de Tareas" IDC_TASKMGR "Administrador de Tareas" IDS_IDLE_PROCESS "System Idle Process" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Ejecutar un nuevo Programa" ID_OPTIONS_ALWAYSONTOP "El Administrador de Tareas permanece siempre visible excepto cuando este minimizado" @@ -532,7 +532,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Actualizar la vista cada cuatro segundos" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "No actualizar automaticamente" ID_WINDOWS_TILEHORIZONTALLY @@ -556,7 +556,7 @@ BEGIN "Trae una tarea al primer plano, enfocar esa tarea" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Finalizar las tareas seleccionadas" ID_GOTOPROCESS "Enfocar el proceso de la tarea seleccionada" @@ -580,7 +580,7 @@ BEGIN END // Spanish (SPAIN) resources by Carlos Garcia Gomez -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Aplicaciones" IDS_TAB_PROCESSES "Procesos" diff --git a/base/applications/taskmgr/lang/fr-FR.rc b/base/applications/taskmgr/lang/fr-FR.rc index 1c70373d317..1d508617479 100644 --- a/base/applications/taskmgr/lang/fr-FR.rc +++ b/base/applications/taskmgr/lang/fr-FR.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&Fichier" BEGIN @@ -64,7 +64,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "Mosaïque &horizontale", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "Mosaïque &verticale", ID_WINDOWS_TILEVERTICALLY @@ -74,7 +74,7 @@ BEGIN MENUITEM "Mettre au &premier plan", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -86,7 +86,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -105,7 +105,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -116,7 +116,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -152,7 +152,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -163,7 +163,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -174,7 +174,7 @@ BEGIN PUSHBUTTON "F&in de tâche",IDC_ENDTASK,75,189,53,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -187,7 +187,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -243,7 +243,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Cannaux de débogage" FONT 8, "MS Shell Dlg" @@ -254,7 +254,7 @@ BEGIN PUSHBUTTON "Fermer",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Affinité du processeur" FONT 8, "MS Shell Dlg" @@ -329,7 +329,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 244, 198 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 244, 198 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Sélection de colonnes" FONT 8, "MS Shell Dlg" @@ -397,7 +397,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -406,13 +406,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -426,7 +426,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -509,14 +509,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Gestionnaire des tâches" IDC_TASKMGR "Gestionnaire des tâches" IDS_IDLE_PROCESS "Processus système en attente" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Exécute un nouveau programme" ID_OPTIONS_ALWAYSONTOP "Le Gestionnaire des tâches reste devant toutes les autres fenêtre à moins d'être réduit" @@ -532,7 +532,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Actualise l'écran toutes les quatre secondes" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "L'affichage n'est pas automatiquement actualisé" ID_WINDOWS_TILEHORIZONTALLY @@ -556,7 +556,7 @@ BEGIN "Amène une tâche en avant-plan, mettre le focus sur cette tâche" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Ferme la tâche sélectionnée" ID_GOTOPROCESS "Met le focus sur le processus de la tâche sélectionnée" @@ -580,7 +580,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Applications" IDS_TAB_PROCESSES "Processus" diff --git a/base/applications/taskmgr/lang/he-IL.rc b/base/applications/taskmgr/lang/he-IL.rc index 0651bee857b..bd211156af7 100644 --- a/base/applications/taskmgr/lang/he-IL.rc +++ b/base/applications/taskmgr/lang/he-IL.rc @@ -3,7 +3,7 @@ LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&קובץ" BEGIN @@ -65,7 +65,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "חלונות מוערמים", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "חלונות זה לצד זה", ID_WINDOWS_TILEVERTICALLY @@ -75,7 +75,7 @@ BEGIN MENUITEM "ה&בא לפנים", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -87,7 +87,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -106,7 +106,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -117,7 +117,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -152,7 +152,7 @@ END // Dialog // -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -163,7 +163,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -174,7 +174,7 @@ BEGIN PUSHBUTTON "&סיים משימה",IDC_ENDTASK,75,189,53,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -187,7 +187,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -243,7 +243,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Debug Channels" FONT 8, "MS Shell Dlg" @@ -254,7 +254,7 @@ BEGIN PUSHBUTTON "סגירה",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "קירבה בין מעבדים" FONT 8, "MS Shell Dlg" @@ -329,7 +329,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 195, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 195, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "בחירת עמודות" FONT 8, "MS Shell Dlg" @@ -397,7 +397,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -406,13 +406,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -426,7 +426,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -509,14 +509,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "מנהל המשימות" IDC_TASKMGR "מנהל המשימות" IDS_IDLE_PROCESS "תהליך לא פעיל של המערכת" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "מפעיל תכנית חדשה" ID_OPTIONS_ALWAYSONTOP "Task Manager remains in front of all other windows unless minimized" @@ -532,7 +532,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Updates the display every four seconds" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Does not automatically update" ID_WINDOWS_TILEHORIZONTALLY @@ -556,7 +556,7 @@ BEGIN "Brings a task to the foreground, switch focus to that task" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Tells the selected tasks to close" ID_GOTOPROCESS "Switches the focus to the process of the selected task" @@ -580,7 +580,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Applications" IDS_TAB_PROCESSES "Processes" diff --git a/base/applications/taskmgr/lang/hu-HU.rc b/base/applications/taskmgr/lang/hu-HU.rc index e3969c35e9c..5849264268d 100644 --- a/base/applications/taskmgr/lang/hu-HU.rc +++ b/base/applications/taskmgr/lang/hu-HU.rc @@ -3,7 +3,7 @@ LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&Állomány" BEGIN @@ -65,7 +65,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "&Vízszintes rendezés", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "&Függõleges rendezés", ID_WINDOWS_TILEVERTICALLY @@ -75,7 +75,7 @@ BEGIN MENUITEM "&Elõtérbe helyezés", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -87,7 +87,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -106,7 +106,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -117,7 +117,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -153,7 +153,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -164,7 +164,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -175,7 +175,7 @@ BEGIN PUSHBUTTON "Fela&dat befejezése",IDC_ENDTASK,75,189,53,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -188,7 +188,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -244,7 +244,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Hibakeresõ csatornák" FONT 8, "MS Shell Dlg" @@ -255,7 +255,7 @@ BEGIN PUSHBUTTON "Bezárás",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Processor Affinity" FONT 8, "MS Shell Dlg" @@ -330,7 +330,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 195, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 195, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Oszlopok kiválasztása" FONT 8, "MS Shell Dlg" @@ -398,7 +398,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -407,13 +407,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -427,7 +427,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -510,14 +510,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Feladatkezelõ" IDC_TASKMGR "Feladatkezelõ" IDS_IDLE_PROCESS "Üres járat" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Program indítása" ID_OPTIONS_ALWAYSONTOP "A feladatkezelõ minden ablak felett lesz addig amíg nem lesz kicsinyítve" @@ -533,7 +533,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Négy másodpercenként frissít" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Nincs automatikus frissítés" ID_WINDOWS_TILEHORIZONTALLY @@ -557,7 +557,7 @@ BEGIN "Elõtérbe hozza és aktívvá teszi a kiválasztott alkalmazást" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Bezárja a kiválasztott alkalmazást" ID_GOTOPROCESS "Elõtérbe hozza és aktívvá teszi a kiválasztott alkalmazást" @@ -580,7 +580,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Programok" IDS_TAB_PROCESSES "Folyamatok" diff --git a/base/applications/taskmgr/lang/id-ID.rc b/base/applications/taskmgr/lang/id-ID.rc index a7f998bb9d3..3511e695bf4 100644 --- a/base/applications/taskmgr/lang/id-ID.rc +++ b/base/applications/taskmgr/lang/id-ID.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&File" BEGIN @@ -64,7 +64,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "Tile &Horisontal", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "Tile &Vertikal", ID_WINDOWS_TILEVERTICALLY @@ -74,7 +74,7 @@ BEGIN MENUITEM "&Bawa Ke Depan", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -86,7 +86,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -105,7 +105,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -116,7 +116,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -152,7 +152,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -163,7 +163,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -174,7 +174,7 @@ BEGIN PUSHBUTTON "&End Task",IDC_ENDTASK,75,189,53,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -187,7 +187,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -243,7 +243,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Kanal Debug" FONT 8, "MS Shell Dlg" @@ -254,7 +254,7 @@ BEGIN PUSHBUTTON "Tutup",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Afinitas Prosesor" FONT 8, "MS Shell Dlg" @@ -329,7 +329,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 195, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 195, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Pilih Kolom" FONT 8, "MS Shell Dlg" @@ -397,7 +397,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -406,13 +406,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -426,7 +426,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -509,14 +509,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Manajer Tugas" IDC_TASKMGR "Manajer Tugas" IDS_IDLE_PROCESS "Proses Diam Sistem" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Runs a new program" ID_OPTIONS_ALWAYSONTOP "Task Manager remains in front of all other windows unless minimized" @@ -532,7 +532,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Updates the display every four seconds" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Does not automatically update" ID_WINDOWS_TILEHORIZONTALLY @@ -556,7 +556,7 @@ BEGIN "Brings a task to the foreground, switch focus to that task" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Tells the selected tasks to close" ID_GOTOPROCESS "Switches the focus to the process of the selected task" @@ -580,7 +580,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Applications" IDS_TAB_PROCESSES "Processes" diff --git a/base/applications/taskmgr/lang/it-IT.rc b/base/applications/taskmgr/lang/it-IT.rc index b0ac8d6278f..4ec760f3405 100644 --- a/base/applications/taskmgr/lang/it-IT.rc +++ b/base/applications/taskmgr/lang/it-IT.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&File" BEGIN @@ -62,7 +62,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "Affianca &Orizzontalmente", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "Affianca &Verticalmente", ID_WINDOWS_TILEVERTICALLY @@ -72,7 +72,7 @@ BEGIN MENUITEM "&Porta in primo piano", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -84,7 +84,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -103,7 +103,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -114,7 +114,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -150,7 +150,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -161,7 +161,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -172,7 +172,7 @@ BEGIN PUSHBUTTON "&Termina processo",IDC_ENDTASK,28,188,68,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -185,7 +185,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -241,7 +241,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Debug Channels" FONT 8, "MS Shell Dlg" @@ -252,7 +252,7 @@ BEGIN PUSHBUTTON "Chiudi",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Processor Affinity" FONT 8, "MS Shell Dlg" @@ -327,7 +327,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 195, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 195, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Selezione Colonne" FONT 8, "MS Shell Dlg" @@ -395,7 +395,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -404,13 +404,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -424,7 +424,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -507,14 +507,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Task Manager" IDC_TASKMGR "Task Manager" IDS_IDLE_PROCESS "Processo Idle di sistema" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Esegue un nuovo programma" ID_OPTIONS_ALWAYSONTOP "Task Manager rimane di fronte a ogni altra finestra a meno che sia minimizzato" @@ -530,7 +530,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Aggiorna lo schermo ogni quattro secondi" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Non aggiorna automaticamente" ID_WINDOWS_TILEHORIZONTALLY @@ -554,7 +554,7 @@ BEGIN "Porta un task in vista e gli dà il focus" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Richiede la chiusura del task selezionato" ID_GOTOPROCESS "Porta il focus al task selezionato" @@ -578,7 +578,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Applicazioni" IDS_TAB_PROCESSES "Processi" diff --git a/base/applications/taskmgr/lang/ja-JP.rc b/base/applications/taskmgr/lang/ja-JP.rc index 69b13de1654..92992ab9e88 100644 --- a/base/applications/taskmgr/lang/ja-JP.rc +++ b/base/applications/taskmgr/lang/ja-JP.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "ファイル(&F)" BEGIN @@ -62,7 +62,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "上下に並べて表示(&H)", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "左右に並べて表示(&V)", ID_WINDOWS_TILEVERTICALLY @@ -72,7 +72,7 @@ BEGIN MENUITEM "手前に表示(&B)", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -84,7 +84,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -103,7 +103,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -114,7 +114,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -150,7 +150,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -161,7 +161,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 9, "MS UI Gothic" BEGIN @@ -172,7 +172,7 @@ BEGIN PUSHBUTTON "タスクの終了(&E)",IDC_ENDTASK,75,189,53,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 9, "MS UI Gothic" BEGIN @@ -185,7 +185,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 9, "MS UI Gothic" BEGIN @@ -241,7 +241,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "デバッグ チャンネル" FONT 9, "MS UI Gothic" @@ -252,7 +252,7 @@ BEGIN PUSHBUTTON "閉じる",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "プロセッサの関係" FONT 9, "MS UI Gothic" @@ -327,7 +327,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 195, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 195, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "列の選択" FONT 9, "MS UI Gothic" @@ -395,7 +395,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -404,13 +404,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -424,7 +424,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -507,14 +507,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "タスク マネージャ" IDC_TASKMGR "タスク マネージャ" IDS_IDLE_PROCESS "System Idle Process" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "新しいプログラムを実行します" ID_OPTIONS_ALWAYSONTOP "最小化されない限り、常にタスク マネージャがほかのすべてのウィンドウよりも手前に表示されます" @@ -530,7 +530,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "4 秒に 1 回表示を更新します" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "表示を自動的に更新しません" ID_WINDOWS_TILEHORIZONTALLY @@ -554,7 +554,7 @@ BEGIN "タスクを手前に表示し、フォーカスを切り替えます" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "選択されているタスクに終了するよう指示します" ID_GOTOPROCESS "選択されているタスクのプロセスにフォーカスを切り替えます" @@ -578,7 +578,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "アプリケーション" IDS_TAB_PROCESSES "プロセス" diff --git a/base/applications/taskmgr/lang/ko-KR.rc b/base/applications/taskmgr/lang/ko-KR.rc index 24c3bf4807d..f2684012a25 100644 --- a/base/applications/taskmgr/lang/ko-KR.rc +++ b/base/applications/taskmgr/lang/ko-KR.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "파일(&F)" BEGIN @@ -66,7 +66,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "가로 바둑판식 창 배열(&H)", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "세로 바둑판식 창 배열(&V)", ID_WINDOWS_TILEVERTICALLY @@ -76,7 +76,7 @@ BEGIN MENUITEM "맨 앞으로 가져오기(&B)", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -88,7 +88,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -107,7 +107,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -118,7 +118,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -154,7 +154,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -165,7 +165,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -176,7 +176,7 @@ BEGIN PUSHBUTTON "작업 끝내기(&E)",IDC_ENDTASK,75,189,53,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -189,7 +189,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -245,7 +245,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "디버그 채널" FONT 8, "MS Shell Dlg" @@ -256,7 +256,7 @@ BEGIN PUSHBUTTON "닫기",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "프로세서 선호도" FONT 8, "MS Shell Dlg" @@ -331,7 +331,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 195, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 195, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "열 선택" FONT 8, "MS Shell Dlg" @@ -399,7 +399,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -408,13 +408,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -428,7 +428,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -511,14 +511,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "작업 관리자" IDC_TASKMGR "작업 관리자" IDS_IDLE_PROCESS "System Idle Process" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "새 프로그램을 실행합니다" ID_OPTIONS_ALWAYSONTOP "최소화되기 전까지는 작업 관리자다 항상 다른 창 앞에 표시됩니다" @@ -534,7 +534,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "4초에 한번씩 화면을 업데이트합니다" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "자동으로 업데이트를 하지 않습니다" ID_WINDOWS_TILEHORIZONTALLY @@ -558,7 +558,7 @@ BEGIN "작업을 맨 앞으로 가져오고 그 작업으로 화면을 전환합니다" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "선택한 작업을 끝내라고 명령합니다" ID_GOTOPROCESS "선택한 작업의 프로세스로 초점을 맞춥니다" @@ -582,7 +582,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "응용 프로그램" IDS_TAB_PROCESSES "프로세스" diff --git a/base/applications/taskmgr/lang/nl-NL.rc b/base/applications/taskmgr/lang/nl-NL.rc index 25c607c2fb2..41336530b0c 100644 --- a/base/applications/taskmgr/lang/nl-NL.rc +++ b/base/applications/taskmgr/lang/nl-NL.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&Bestand" BEGIN @@ -62,7 +62,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "&Onder elkaar", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "N&aast elkaar", ID_WINDOWS_TILEVERTICALLY @@ -72,7 +72,7 @@ BEGIN MENUITEM "Naar &voorgrond", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -84,7 +84,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -103,7 +103,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -114,7 +114,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -150,7 +150,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -161,7 +161,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -172,7 +172,7 @@ BEGIN PUSHBUTTON "Taa&k beëindigen",IDC_ENDTASK,75,189,53,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -185,7 +185,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -242,7 +242,7 @@ BEGIN END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Debug kanalen" FONT 8, "MS Shell Dlg" @@ -253,7 +253,7 @@ BEGIN PUSHBUTTON "Sluit",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Processoraffiniteit" FONT 8, "MS Shell Dlg" @@ -328,7 +328,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 235, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 235, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Kolommen selecteren" FONT 8, "MS Shell Dlg" @@ -396,7 +396,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -405,13 +405,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -425,7 +425,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -508,14 +508,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Taakbeheer" IDC_TASKMGR "Taakbeheer" IDS_IDLE_PROCESS "Niet-actieve systeemprocessen" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Een nieuw programma uitvoeren" ID_OPTIONS_ALWAYSONTOP "Taakbeheer blijft op de voorgrond, behalve als het wordt geminimaliseerd" @@ -530,7 +530,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Het beeldscherm elke vier seconden bijwerken" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Beeldscherm wordt niet automatisch bijgewerkt" ID_WINDOWS_TILEHORIZONTALLY "Vensters onder elkaar schikken" @@ -550,7 +550,7 @@ BEGIN ID_APPLICATION_PAGE_SWITCHTO "Venster naar de voorgrond brengen en actief maken" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Sluit de geselecteerde taken" ID_GOTOPROCESS "Activeert het proces van de geselecteerde taak" @@ -568,7 +568,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Toepassingen" IDS_TAB_PROCESSES "Procesnaam" diff --git a/base/applications/taskmgr/lang/no-NO.rc b/base/applications/taskmgr/lang/no-NO.rc index 12c9be13d02..fa91f5d2222 100644 --- a/base/applications/taskmgr/lang/no-NO.rc +++ b/base/applications/taskmgr/lang/no-NO.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&Fil" BEGIN @@ -62,7 +62,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "Sorter &horisontalt", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "Sorter &vertikalt", ID_WINDOWS_TILEVERTICALLY @@ -72,7 +72,7 @@ BEGIN MENUITEM "&Plasser lengst frem", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -84,7 +84,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -103,7 +103,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -114,7 +114,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -150,7 +150,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -161,7 +161,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -172,7 +172,7 @@ BEGIN PUSHBUTTON "&Avslutt oppgave",IDC_ENDTASK,60,189,65,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -185,7 +185,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -241,7 +241,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Debug kanaler" FONT 8, "MS Shell Dlg" @@ -252,7 +252,7 @@ BEGIN PUSHBUTTON "Avslutt",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Prosessor slektskap" FONT 8, "MS Shell Dlg" @@ -327,7 +327,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 195, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 195, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Velg kolonnene" FONT 8, "MS Shell Dlg" @@ -395,7 +395,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -404,13 +404,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -424,7 +424,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -507,14 +507,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Oppgavebehandling" IDC_TASKMGR "Oppgavebehandling" IDS_IDLE_PROCESS "System Idle Process" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Kjør et nytt program" ID_OPTIONS_ALWAYSONTOP "Oppgavebehandler fortsette å være over alle andre vinduer med mindre de er minimert" @@ -530,7 +530,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Oppdater skjermen hvert fjerde sekund" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Skjermen oppdaterer ikke automatisk" ID_WINDOWS_TILEHORIZONTALLY @@ -554,7 +554,7 @@ BEGIN "Skaffe en oppgave til forgrunn, endre fokus til den oppgaven" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Fortell valgte oppgave for å avsluttes" ID_GOTOPROCESS "Endre fokus til prosess av valgte oppgave" @@ -578,7 +578,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Programmer" IDS_TAB_PROCESSES "Prosesser" diff --git a/base/applications/taskmgr/lang/pl-PL.rc b/base/applications/taskmgr/lang/pl-PL.rc index 50b2eb52f29..cfb03f05eb8 100644 --- a/base/applications/taskmgr/lang/pl-PL.rc +++ b/base/applications/taskmgr/lang/pl-PL.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&Plik" BEGIN @@ -69,7 +69,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "&Sąsiadująco w poziomie", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "Sąsi&adująco w pionie", ID_WINDOWS_TILEVERTICALLY @@ -79,7 +79,7 @@ BEGIN MENUITEM "&Przesuń na wierzch", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -91,7 +91,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -110,7 +110,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -121,7 +121,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -157,7 +157,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -168,7 +168,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -179,7 +179,7 @@ BEGIN PUSHBUTTON "&Zakończ zadanie",IDC_ENDTASK,39,189,65,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -192,7 +192,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -248,7 +248,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Kanały debugowania" FONT 8, "MS Shell Dlg" @@ -259,7 +259,7 @@ BEGIN PUSHBUTTON "Zamknij",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Koligacje procesora" FONT 8, "MS Shell Dlg" @@ -334,7 +334,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 195, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 195, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Wybierz kolumny" FONT 8, "MS Shell Dlg" @@ -402,7 +402,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -411,13 +411,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -431,7 +431,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -514,14 +514,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Menedżer zadań" IDC_TASKMGR "Menedżer zadań" IDS_IDLE_PROCESS "Proces bezczynności systemu" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Uruchamia nowy program" ID_OPTIONS_ALWAYSONTOP "Menedżer zadań wyświetlany jest na wierzchu wszystkich okien" @@ -537,7 +537,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Aktualizuje okno co cztery sekundy" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Nie aktualizuje automatycznie" ID_WINDOWS_TILEHORIZONTALLY @@ -561,7 +561,7 @@ BEGIN "Przenosi zadanie na pierwszy plan i uaktywnia je" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Zamyka zadanie" ID_GOTOPROCESS "Ustawia aktywnym proces zaznaczonego zadania" @@ -585,7 +585,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Aplikacje" IDS_TAB_PROCESSES "Procesy" diff --git a/base/applications/taskmgr/lang/pt-BR.rc b/base/applications/taskmgr/lang/pt-BR.rc index 99168f07752..cb904f163ed 100644 --- a/base/applications/taskmgr/lang/pt-BR.rc +++ b/base/applications/taskmgr/lang/pt-BR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&Arquivo" BEGIN @@ -62,7 +62,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "Lado a lado &horizontalmente", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "Lado a lado &verticalmente", ID_WINDOWS_TILEVERTICALLY @@ -72,7 +72,7 @@ BEGIN MENUITEM "&Trazer para a frente", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -84,7 +84,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -103,7 +103,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -114,7 +114,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -150,7 +150,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -161,7 +161,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -172,7 +172,7 @@ BEGIN PUSHBUTTON "&Finalizar tarefa",IDC_ENDTASK,75,189,53,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -185,7 +185,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -241,7 +241,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Canais de depuração" FONT 8, "MS Shell Dlg" @@ -252,7 +252,7 @@ BEGIN PUSHBUTTON "Fechar",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Afinidade com processador" FONT 8, "MS Shell Dlg" @@ -327,7 +327,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 254, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 254, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Selecionar colunas" FONT 8, "MS Shell Dlg" @@ -395,7 +395,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -404,13 +404,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -424,7 +424,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -507,14 +507,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Gerenciador de tarefas" IDC_TASKMGR "Gerenciador de tarefas" IDS_IDLE_PROCESS "Processo inativo do sistema" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Executa um novo programa" ID_OPTIONS_ALWAYSONTOP "O 'Gerenciador de tarefas' permanece na frente de todas as outras janelas, a menos que seja minimizado" @@ -530,7 +530,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Atualiza a tela a cada quatro segundos" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Não atualiza a tela automaticamente" ID_WINDOWS_TILEHORIZONTALLY @@ -554,7 +554,7 @@ BEGIN "Coloca a tarefa em primeiro plano e alterna o foco para ela" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Fecha tarefa selecionada" ID_GOTOPROCESS "Altera o foco para o processo da tarefa selecionada" @@ -578,7 +578,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Aplicativos" IDS_TAB_PROCESSES "Processos" diff --git a/base/applications/taskmgr/lang/ro-RO.rc b/base/applications/taskmgr/lang/ro-RO.rc index b9e9402f9cc..652280acec6 100644 --- a/base/applications/taskmgr/lang/ro-RO.rc +++ b/base/applications/taskmgr/lang/ro-RO.rc @@ -1,7 +1,7 @@ // 2011.10.30 - Fulea Ștefan: minor changes LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&Fișier" BEGIN @@ -63,7 +63,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "Aranjări &orizontale", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "Aranjări &verticale", ID_WINDOWS_TILEVERTICALLY @@ -73,7 +73,7 @@ BEGIN MENUITEM "&Aduce în prim plan", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -85,7 +85,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -104,7 +104,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -115,7 +115,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -151,7 +151,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -162,7 +162,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -173,7 +173,7 @@ BEGIN PUSHBUTTON "&Temină", IDC_ENDTASK,75,189,53,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -186,7 +186,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -242,7 +242,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Canale de depanare" FONT 8, "MS Shell Dlg" @@ -253,7 +253,7 @@ BEGIN PUSHBUTTON "Î&nchide", IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Afinitate procesor" FONT 8, "MS Shell Dlg" @@ -328,7 +328,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 235, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 235, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Alegere coloane" FONT 8, "MS Shell Dlg" @@ -396,7 +396,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -405,13 +405,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -425,7 +425,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -508,14 +508,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Gestionar de activități" IDC_TASKMGR "Gestionar de activități" IDS_IDLE_PROCESS "Proces de inactivitate sistem" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Pornește un nou program." ID_OPTIONS_ALWAYSONTOP "Gestionarul rămâne deasupra celorlaltor ferestre până când e minimizat." @@ -530,7 +530,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Actualizează fereastra o dată la patru secunde." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Fără actualizare automată." ID_WINDOWS_TILEHORIZONTALLY "Aranjează ferestrele orizontal pe ecran." @@ -550,7 +550,7 @@ BEGIN ID_APPLICATION_PAGE_SWITCHTO "Aduce fereastra aplicației selectate în prim plan, activând-o." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Comandă închiderea aplicației selectate." ID_GOTOPROCESS "Arată procesul aplicației selectate." @@ -568,7 +568,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Aplicații" IDS_TAB_PROCESSES "Procese" diff --git a/base/applications/taskmgr/lang/ru-RU.rc b/base/applications/taskmgr/lang/ru-RU.rc index ffaad3c96a1..2a71c990359 100644 --- a/base/applications/taskmgr/lang/ru-RU.rc +++ b/base/applications/taskmgr/lang/ru-RU.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&Файл" BEGIN @@ -64,7 +64,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "&Слева направо", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "С&верху вниз", ID_WINDOWS_TILEVERTICALLY @@ -74,7 +74,7 @@ BEGIN MENUITEM "&На передний план", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -86,7 +86,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -105,7 +105,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -116,7 +116,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -152,7 +152,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -163,7 +163,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -174,7 +174,7 @@ BEGIN PUSHBUTTON "&Завершить задачу",IDC_ENDTASK,12,189,73,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -187,7 +187,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -243,7 +243,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Отладка потоков" FONT 8, "MS Shell Dlg" @@ -254,7 +254,7 @@ BEGIN PUSHBUTTON "Закрыть",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Семейство процессоров" FONT 8, "MS Shell Dlg" @@ -329,7 +329,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 230, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 230, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Выбор столбцов" FONT 8, "MS Shell Dlg" @@ -397,7 +397,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -406,13 +406,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -426,7 +426,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -509,14 +509,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Диспетчер задач" IDC_TASKMGR "Диспетчер задач" IDS_IDLE_PROCESS "Бездействие системы" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Создать новую задачу" ID_OPTIONS_ALWAYSONTOP "Менеджер задач остается поверх всех окон, если не свернут" @@ -532,7 +532,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Обновлять каждые четыре секунды" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Не обновлять автоматически" ID_WINDOWS_TILEHORIZONTALLY @@ -556,7 +556,7 @@ BEGIN "Перенести задачу на передний план и переключиться к ней" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Сообщает выбранным задачам о необходимости завершиться" ID_GOTOPROCESS "Переносит выбранный процесс на передний план" @@ -580,7 +580,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Приложения" IDS_TAB_PROCESSES "Процессы" diff --git a/base/applications/taskmgr/lang/sk-SK.rc b/base/applications/taskmgr/lang/sk-SK.rc index 6c54952777f..a1d5d41864e 100644 --- a/base/applications/taskmgr/lang/sk-SK.rc +++ b/base/applications/taskmgr/lang/sk-SK.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&Súbor" BEGIN @@ -64,7 +64,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "&Pod seba", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "&Vedľa seba", ID_WINDOWS_TILEVERTICALLY @@ -74,7 +74,7 @@ BEGIN MENUITEM "Presunúť d&opredu", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -86,7 +86,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -104,7 +104,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -115,7 +115,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -151,7 +151,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -162,7 +162,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -173,7 +173,7 @@ BEGIN PUSHBUTTON "Ukončiť úlo&hu",IDC_ENDTASK,75,189,53,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -186,7 +186,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -242,7 +242,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Kanály ladenia" FONT 8, "MS Shell Dlg" @@ -253,7 +253,7 @@ BEGIN PUSHBUTTON "Zavrieť",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 270, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 270, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Afinita procesorov" FONT 8, "MS Shell Dlg" @@ -328,7 +328,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,200,119,62,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 258, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 258, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Výber stĺpcov" FONT 8, "MS Shell Dlg" @@ -396,7 +396,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -405,13 +405,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -425,7 +425,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -508,14 +508,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Správca úloh systému" IDC_TASKMGR "Správca úloh systému" IDS_IDLE_PROCESS "Procesy systémovej nečinnosti" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Spustí nový program." ID_OPTIONS_ALWAYSONTOP "Ak Správca úloh nie je minimalizovaný, zostáva v popredí všetkých ostatných úloh." @@ -531,7 +531,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Aktualizuje obrazovku každé štyri sekundy." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Obrazovka sa automaticky neaktualizuje." ID_WINDOWS_TILEHORIZONTALLY @@ -555,7 +555,7 @@ BEGIN "Prenesie úlohu do popredia a aktivuje jej okno." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Pokúsi sa ukončiť vybrané úlohy." ID_GOTOPROCESS "Prepne na proces vybranej úlohy." @@ -579,7 +579,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Aplikácie" IDS_TAB_PROCESSES "Procesy" diff --git a/base/applications/taskmgr/lang/sv-SE.rc b/base/applications/taskmgr/lang/sv-SE.rc index 89135c2aef1..7657092ac0e 100644 --- a/base/applications/taskmgr/lang/sv-SE.rc +++ b/base/applications/taskmgr/lang/sv-SE.rc @@ -18,7 +18,7 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&Arkiv" BEGIN @@ -80,7 +80,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "Ordna &horizontellt", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "Ordna &vertikalt", ID_WINDOWS_TILEVERTICALLY @@ -90,7 +90,7 @@ BEGIN MENUITEM "&För till förgrunden", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -102,7 +102,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -121,7 +121,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -132,7 +132,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -168,7 +168,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -179,7 +179,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -190,7 +190,7 @@ BEGIN PUSHBUTTON "&Avsluta aktiviteten",IDC_ENDTASK,34,189,83,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -203,7 +203,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -259,7 +259,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Felsökningskanaler" FONT 8, "MS Shell Dlg" @@ -270,7 +270,7 @@ BEGIN PUSHBUTTON "Stäng",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Processorsamhörighet" FONT 8, "MS Shell Dlg" @@ -345,7 +345,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,55,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 275, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 275, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Välj kolumner" FONT 8, "MS Shell Dlg" @@ -413,7 +413,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -422,13 +422,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -442,7 +442,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -525,14 +525,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Aktivitetshanteraren" IDC_TASKMGR "Aktivitetshanteraren" IDS_IDLE_PROCESS "Systemets lediga resurser" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Kör ett nytt program" ID_OPTIONS_ALWAYSONTOP "Aktivitetshanteraren förblir i förgrunden om den inte minimeras" @@ -548,7 +548,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Uppdaterar värden var 4:e sekund" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Uppdaterar inte automatiskt" ID_WINDOWS_TILEHORIZONTALLY @@ -572,7 +572,7 @@ BEGIN "För aktiviteten till förgrunden och växla till den" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Ber de valda aktiviteterna att avslutas" ID_GOTOPROCESS "Ändrar fokus till den valda aktivitetens process" @@ -596,7 +596,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Program" IDS_TAB_PROCESSES "Processer" diff --git a/base/applications/taskmgr/lang/tr-TR.rc b/base/applications/taskmgr/lang/tr-TR.rc index 037cd223b20..97e8776d482 100644 --- a/base/applications/taskmgr/lang/tr-TR.rc +++ b/base/applications/taskmgr/lang/tr-TR.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&Kütük" BEGIN @@ -58,7 +58,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "&Yatay Olarak Sırala", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "&Dikey Olarak Sırala", ID_WINDOWS_TILEVERTICALLY @@ -68,7 +68,7 @@ BEGIN MENUITEM "&Öne Getir", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "SAHTE" BEGIN @@ -80,7 +80,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "SAHTE" BEGIN @@ -99,7 +99,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "SAHTE" BEGIN @@ -110,7 +110,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "SAHTE" BEGIN @@ -139,7 +139,7 @@ END // Dialog // -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -150,7 +150,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -161,7 +161,7 @@ BEGIN PUSHBUTTON "G&örevi Sonlandır",IDC_ENDTASK,75,189,53,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -174,7 +174,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -230,7 +230,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Yanlışlık Ayıklama Kanalları" FONT 8, "MS Shell Dlg" @@ -241,13 +241,13 @@ BEGIN PUSHBUTTON "Kapat",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "CPU'larla İlişkisini Değiştir" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "Tamam",IDOK,120,133,50,14 - PUSHBUTTON "Vazgeç",IDCANCEL,174,133,50,14 + PUSHBUTTON "İptal",IDCANCEL,174,133,50,14 LTEXT "Bu seçenekler, bu işlemin hangi CPU'larla yürütüleceğini belirler.", IDC_STATIC,5,5,220,16 CONTROL "0. CPU",IDC_CPU0,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, @@ -316,13 +316,13 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 195, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 195, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Dikeçleri Seç" FONT 8, "MS Shell Dlg" BEGIN DEFPUSHBUTTON "Tamam",IDOK,84,178,50,14 - PUSHBUTTON "Vazgeç",IDCANCEL,138,178,50,14 + PUSHBUTTON "İptal",IDCANCEL,138,178,50,14 LTEXT "Bu seçenekler, ""İşlemci"" sekmesindeki dikeçlerin hangisinin görüntülenip görüntülenmeyeceğini belirler.", IDC_STATIC,7,7,181,17 CONTROL "Yansıma Adı",IDC_IMAGENAME,"Button",BS_AUTOCHECKBOX | @@ -345,7 +345,7 @@ BEGIN WS_TABSTOP,7,116,62,10 CONTROL "G/Ç Okuma",IDC_IOREADS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,127,49,10 - CONTROL "G/Ç Okuma Sekizlikleri",IDC_IOREADBYTES,"Button", + CONTROL "G/Ç Okuma Çokluları",IDC_IOREADBYTES,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,138,65,10 CONTROL "Oturum Kimliği",IDC_SESSIONID,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,149,50,10 @@ -369,11 +369,11 @@ BEGIN WS_TABSTOP,107,105,55,10 CONTROL "G/Ç Yazma",IDC_IOWRITES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,116,49,10 - CONTROL "G/Ç Yazma Sekizlikleri",IDC_IOWRITEBYTES,"Button", + CONTROL "G/Ç Yazma Çokluları",IDC_IOWRITEBYTES,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,127,65,10 CONTROL "G/Ç Diğer",IDC_IOOTHER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,107,138,46,10 - CONTROL "G/Ç Diğer Sekizlikler",IDC_IOOTHERBYTES,"Button", + CONTROL "G/Ç Diğer Çoklular",IDC_IOOTHERBYTES,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,107,149,65,10 END @@ -384,7 +384,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -393,13 +393,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -413,7 +413,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -496,14 +496,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Görev Yöneticisi" IDC_TASKMGR "Görev Yöneticisi" IDS_IDLE_PROCESS "Çalışmayan İşlemci Yüzdesi İşlemi" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Yeni görev çalıştırır." ID_OPTIONS_ALWAYSONTOP "Görev Yöneticisi'ni diğer pencerelerin üstünde tutar." @@ -518,9 +518,9 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Her dört sâniyede bir Görev Yöneticisi'ndeki bilgileri yeniler." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN - ID_VIEW_UPDATESPEED_PAUSED "Görev Yöneticisi'ndeki bilgilerin kendiliğinden yenilenmesini durdurur. " + ID_VIEW_UPDATESPEED_PAUSED "Görev Yöneticisi'ndeki bilgilerin kendiliğinden yenilenmesini durdurur." ID_WINDOWS_TILEHORIZONTALLY "Masaüstündeki pencereleri yatay olarak sıralar." ID_WINDOWS_TILEVERTICALLY "Masaüstündeki pencereleri dikey olarak sıralar." ID_WINDOWS_MINIMIZE "Pencereleri simge durumuna küçültür." @@ -538,7 +538,7 @@ BEGIN ID_APPLICATION_PAGE_SWITCHTO "Seçilen görevi öne getirip o göreve odaklatır." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Seçili görevi sonlandırmaya çalışır." ID_GOTOPROCESS "Seçili görevin işlemine gider." @@ -556,7 +556,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Görevler" IDS_TAB_PROCESSES "İşlemler" @@ -585,9 +585,9 @@ BEGIN IDS_TAB_IOREADS "G/Ç Okuma" IDS_TAB_IOWRITES "G/Ç Yazma" IDS_TAB_IOOTHER "G/Ç Diğer" - IDS_TAB_IOREADBYTES "G/Ç Okuma Sekizlikleri" - IDS_TAB_IOWRITESBYTES "G/Ç Yazma Sekizlikleri" - IDS_TAB_IOOTHERBYTES "G/Ç Diğer Sekizlikler" + IDS_TAB_IOREADBYTES "G/Ç Okuma Çokluları" + IDS_TAB_IOWRITESBYTES "G/Ç Yazma Çokluları" + IDS_TAB_IOOTHERBYTES "G/Ç Diğer Çoklular" IDS_MENU_SELECTCOLUMNS "&Dikeçleri Seç..." IDS_MENU_16BITTASK "&16 İkillik Görevleri Göster" IDS_MENU_WINDOWS "&Pencereler" diff --git a/base/applications/taskmgr/lang/uk-UA.rc b/base/applications/taskmgr/lang/uk-UA.rc index d718a91031a..441a084f3e9 100644 --- a/base/applications/taskmgr/lang/uk-UA.rc +++ b/base/applications/taskmgr/lang/uk-UA.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "&Файл" BEGIN @@ -64,7 +64,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "З&ліва направо", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "Згори до&низу", ID_WINDOWS_TILEVERTICALLY @@ -74,7 +74,7 @@ BEGIN MENUITEM "На передні&й план", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -86,7 +86,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -105,7 +105,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -116,7 +116,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -152,7 +152,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -163,7 +163,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -174,7 +174,7 @@ BEGIN PUSHBUTTON "Зн&яти завдання",IDC_ENDTASK,58,189,56,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -187,7 +187,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -243,7 +243,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Налагодження каналів" FONT 8, "MS Shell Dlg" @@ -254,7 +254,7 @@ BEGIN PUSHBUTTON "Закрити",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Відповідність процесорів" FONT 8, "MS Shell Dlg" @@ -329,7 +329,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 227, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 227, 199 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Вибір стовпців" FONT 8, "MS Shell Dlg" @@ -397,7 +397,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -406,13 +406,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -426,7 +426,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -509,14 +509,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "Диспетчер завдань" IDC_TASKMGR "Диспетчер завдань" IDS_IDLE_PROCESS "Бездіяльність системи" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "Запускає нову програму" ID_OPTIONS_ALWAYSONTOP "Вікно диспетчера завдань залишається поверх інших вікон, якщо його не згорнуто" @@ -532,7 +532,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Оновлює зображення раз на чотири секунди" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Не оновлювати автоматично" ID_WINDOWS_TILEHORIZONTALLY @@ -556,7 +556,7 @@ BEGIN "Переміщення завдання на передній план і передача керування цьому завданню" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Наказує вибраним завданням закритися" ID_GOTOPROCESS "Передача фокуса до процесу вибраного завдання" @@ -580,7 +580,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "Додатки" IDS_TAB_PROCESSES "Процеси" diff --git a/base/applications/taskmgr/lang/zh-CN.rc b/base/applications/taskmgr/lang/zh-CN.rc index ed11576ec85..a3a13f1db7f 100644 --- a/base/applications/taskmgr/lang/zh-CN.rc +++ b/base/applications/taskmgr/lang/zh-CN.rc @@ -6,7 +6,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "文件(&F)" BEGIN @@ -68,7 +68,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "横向平铺(&H)", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "纵向平铺(&V)", ID_WINDOWS_TILEVERTICALLY @@ -78,7 +78,7 @@ BEGIN MENUITEM "前置(&B)", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -90,7 +90,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -109,7 +109,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -120,7 +120,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -156,7 +156,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -167,7 +167,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -178,7 +178,7 @@ BEGIN PUSHBUTTON "结束任务(&E)",IDC_ENDTASK,75,189,53,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -191,7 +191,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -247,7 +247,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Debug Channels" FONT 8, "MS Shell Dlg" @@ -258,7 +258,7 @@ BEGIN PUSHBUTTON "关闭",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Processor Affinity" FONT 8, "MS Shell Dlg" @@ -333,7 +333,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 195, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 195, 199 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "选择列" FONT 8, "MS Shell Dlg" @@ -401,7 +401,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -410,13 +410,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -430,7 +430,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -513,14 +513,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "任务管理器" IDC_TASKMGR "任务管理器" IDS_IDLE_PROCESS "System Idle Process" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "执行新程序" ID_OPTIONS_ALWAYSONTOP "Task Manager remains in front of all other windows unless minimized" @@ -536,7 +536,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "Updates the display every four seconds" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Does not automatically update" ID_WINDOWS_TILEHORIZONTALLY @@ -560,7 +560,7 @@ BEGIN "Brings a task to the foreground, switch focus to that task" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Tells the selected tasks to close" ID_GOTOPROCESS "Switches the focus to the process of the selected task" @@ -584,7 +584,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "应用程序" IDS_TAB_PROCESSES "进程" diff --git a/base/applications/taskmgr/lang/zh-TW.rc b/base/applications/taskmgr/lang/zh-TW.rc index 55fb0ac6bfb..850ade0add8 100644 --- a/base/applications/taskmgr/lang/zh-TW.rc +++ b/base/applications/taskmgr/lang/zh-TW.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL -IDR_TASKMANAGER MENU DISCARDABLE +IDR_TASKMANAGER MENU BEGIN POPUP "檔案(&F)" BEGIN @@ -70,7 +70,7 @@ BEGIN END END -IDR_WINDOWSMENU MENU DISCARDABLE +IDR_WINDOWSMENU MENU BEGIN MENUITEM "橫向平鋪(&H)", ID_WINDOWS_TILEHORIZONTALLY MENUITEM "縱向平鋪(&V)", ID_WINDOWS_TILEVERTICALLY @@ -80,7 +80,7 @@ BEGIN MENUITEM "前置(&B)", ID_WINDOWS_BRINGTOFRONT END -IDR_APPLICATION_PAGE_CONTEXT1 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT1 MENU BEGIN POPUP "DUMMY" BEGIN @@ -92,7 +92,7 @@ BEGIN END END -IDR_APPLICATION_PAGE_CONTEXT2 MENU DISCARDABLE +IDR_APPLICATION_PAGE_CONTEXT2 MENU BEGIN POPUP "DUMMY" BEGIN @@ -111,7 +111,7 @@ BEGIN END END -IDR_TRAY_POPUP MENU DISCARDABLE +IDR_TRAY_POPUP MENU BEGIN POPUP "DUMMY" BEGIN @@ -122,7 +122,7 @@ BEGIN END END -IDR_PROCESS_PAGE_CONTEXT MENU DISCARDABLE +IDR_PROCESS_PAGE_CONTEXT MENU BEGIN POPUP "DUMMY" BEGIN @@ -158,7 +158,7 @@ END // // TRANSLATORS: CAPTION must be the same as IDS_APP_TITLE to be brought back to focus when already opened -IDD_TASKMGR_DIALOG DIALOGEX DISCARDABLE 0, 0, 264, 246 +IDD_TASKMGR_DIALOG DIALOGEX 0, 0, 264, 246 STYLE DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME @@ -169,7 +169,7 @@ BEGIN CONTROL "Tab1",IDC_TAB,"SysTabControl32",WS_TABSTOP,3,3,257,228 END -IDD_APPLICATION_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_APPLICATION_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -180,7 +180,7 @@ BEGIN PUSHBUTTON "結束工作(&E)",IDC_ENDTASK,75,189,53,14,WS_DISABLED END -IDD_PROCESS_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PROCESS_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -193,7 +193,7 @@ BEGIN END //IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 -IDD_PERFORMANCE_PAGE DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_PERFORMANCE_PAGE DIALOGEX 0, 0, 247, 210 STYLE DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN FONT 8, "MS Shell Dlg" BEGIN @@ -249,7 +249,7 @@ BEGIN 153,37,NOT WS_TABSTOP,WS_EX_CLIENTEDGE END -IDD_DEBUG_CHANNELS_DIALOG DIALOGEX DISCARDABLE 0, 0, 247, 210 +IDD_DEBUG_CHANNELS_DIALOG DIALOGEX 0, 0, 247, 210 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Debug Channels" FONT 8, "MS Shell Dlg" @@ -260,7 +260,7 @@ BEGIN PUSHBUTTON "關閉",IDOK,171,189,69,14 END -IDD_AFFINITY_DIALOG DIALOGEX DISCARDABLE 0, 0, 231, 154 +IDD_AFFINITY_DIALOG DIALOGEX 0, 0, 231, 154 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "處理器親和性" FONT 8, "MS Shell Dlg" @@ -335,7 +335,7 @@ BEGIN WS_DISABLED | WS_TABSTOP,175,119,41,10 END -IDD_COLUMNS_DIALOG DIALOGEX DISCARDABLE 0, 0, 195, 199 +IDD_COLUMNS_DIALOG DIALOGEX 0, 0, 195, 199 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "選擇欄位" FONT 8, "MS Shell Dlg" @@ -403,7 +403,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -412,13 +412,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -432,7 +432,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -515,14 +515,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "工作管理員" IDC_TASKMGR "工作管理員" IDS_IDLE_PROCESS "System Idle Process" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_FILE_NEW "新程序" ID_OPTIONS_ALWAYSONTOP "Task Manager remains in front of all other windows unless minimized" @@ -538,7 +538,7 @@ BEGIN ID_VIEW_UPDATESPEED_LOW "每四秒更新一次" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_VIEW_UPDATESPEED_PAUSED "Does not automatically update" ID_WINDOWS_TILEHORIZONTALLY @@ -562,7 +562,7 @@ BEGIN "Brings a task to the foreground, switch focus to that task" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN ID_ENDTASK "Tells the selected tasks to close" ID_GOTOPROCESS "Switches the focus to the process of the selected task" @@ -586,7 +586,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TAB_APPS "應用程式" IDS_TAB_PROCESSES "處理程序" diff --git a/base/applications/taskmgr/taskmgr.c b/base/applications/taskmgr/taskmgr.c index f497e0c1195..c1478780143 100644 --- a/base/applications/taskmgr/taskmgr.c +++ b/base/applications/taskmgr/taskmgr.c @@ -42,6 +42,60 @@ BOOL bInMenuLoop = FALSE; /* Tells us if we are in the menu loop */ TASKMANAGER_SETTINGS TaskManagerSettings; +//////////////////////////////////////////////////////////////////////////////// +// Taken from WinSpy++ 1.7 +// http://www.catch22.net/software/winspy +// Copyright (c) 2002 by J Brown +// + +// +// Copied from uxtheme.h +// If you have this new header, then delete these and +// #include instead! +// +#define ETDT_DISABLE 0x00000001 +#define ETDT_ENABLE 0x00000002 +#define ETDT_USETABTEXTURE 0x00000004 +#define ETDT_ENABLETAB (ETDT_ENABLE | ETDT_USETABTEXTURE) + +// +typedef HRESULT (WINAPI * ETDTProc) (HWND, DWORD); + +// +// Try to call EnableThemeDialogTexture, if uxtheme.dll is present +// +BOOL EnableDialogTheme(HWND hwnd) +{ + HMODULE hUXTheme; + ETDTProc fnEnableThemeDialogTexture; + + hUXTheme = LoadLibraryA("uxtheme.dll"); + + if(hUXTheme) + { + fnEnableThemeDialogTexture = + (ETDTProc)GetProcAddress(hUXTheme, "EnableThemeDialogTexture"); + + if(fnEnableThemeDialogTexture) + { + fnEnableThemeDialogTexture(hwnd, ETDT_ENABLETAB); + + FreeLibrary(hUXTheme); + return TRUE; + } + else + { + // Failed to locate API! + FreeLibrary(hUXTheme); + return FALSE; + } + } + else + { + // Not running under XP? Just fail gracefully + return FALSE; + } +} int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, @@ -490,13 +544,13 @@ BOOL OnCreate(HWND hWnd) /* Create tab pages */ hTabWnd = GetDlgItem(hWnd, IDC_TAB); #if 1 - hApplicationPage = CreateDialogW(hInst, MAKEINTRESOURCEW(IDD_APPLICATION_PAGE), hWnd, ApplicationPageWndProc); - hProcessPage = CreateDialogW(hInst, MAKEINTRESOURCEW(IDD_PROCESS_PAGE), hWnd, ProcessPageWndProc); - hPerformancePage = CreateDialogW(hInst, MAKEINTRESOURCEW(IDD_PERFORMANCE_PAGE), hWnd, PerformancePageWndProc); + hApplicationPage = CreateDialogW(hInst, MAKEINTRESOURCEW(IDD_APPLICATION_PAGE), hWnd, ApplicationPageWndProc); EnableDialogTheme(hApplicationPage); + hProcessPage = CreateDialogW(hInst, MAKEINTRESOURCEW(IDD_PROCESS_PAGE), hWnd, ProcessPageWndProc); EnableDialogTheme(hProcessPage); + hPerformancePage = CreateDialogW(hInst, MAKEINTRESOURCEW(IDD_PERFORMANCE_PAGE), hWnd, PerformancePageWndProc); EnableDialogTheme(hPerformancePage); #else - hApplicationPage = CreateDialogW(hInst, MAKEINTRESOURCEW(IDD_APPLICATION_PAGE), hTabWnd, ApplicationPageWndProc); - hProcessPage = CreateDialogW(hInst, MAKEINTRESOURCEW(IDD_PROCESS_PAGE), hTabWnd, ProcessPageWndProc); - hPerformancePage = CreateDialogW(hInst, MAKEINTRESOURCEW(IDD_PERFORMANCE_PAGE), hTabWnd, PerformancePageWndProc); + hApplicationPage = CreateDialogW(hInst, MAKEINTRESOURCEW(IDD_APPLICATION_PAGE), hTabWnd, ApplicationPageWndProc); EnableDialogTheme(hApplicationPage); + hProcessPage = CreateDialogW(hInst, MAKEINTRESOURCEW(IDD_PROCESS_PAGE), hTabWnd, ProcessPageWndProc); EnableDialogTheme(hProcessPage); + hPerformancePage = CreateDialogW(hInst, MAKEINTRESOURCEW(IDD_PERFORMANCE_PAGE), hTabWnd, PerformancePageWndProc); EnableDialogTheme(hPerformancePage); #endif /* Insert tabs */ diff --git a/base/applications/taskmgr/taskmgr.rc b/base/applications/taskmgr/taskmgr.rc index 487439814d7..354dba1851d 100644 --- a/base/applications/taskmgr/taskmgr.rc +++ b/base/applications/taskmgr/taskmgr.rc @@ -4,10 +4,12 @@ #include "resource.h" -IDI_TASKMANAGER ICON DISCARDABLE "res/taskmgr.ico" -IDI_WINDOW ICON DISCARDABLE "res/window.ico" -IDI_WINDOWSM ICON DISCARDABLE "res/windowsm.ico" -IDB_TRAYMASK BITMAP DISCARDABLE "res/traymask.bmp" -IDB_TRAYICON BITMAP DISCARDABLE "res/trayicon.bmp" +IDI_TASKMANAGER ICON "res/taskmgr.ico" +IDI_WINDOW ICON "res/window.ico" +IDI_WINDOWSM ICON "res/windowsm.ico" +IDB_TRAYMASK BITMAP "res/traymask.bmp" +IDB_TRAYICON BITMAP "res/trayicon.bmp" + +#include #include "rsrc.rc" diff --git a/base/applications/winhlp32/Bg.rc b/base/applications/winhlp32/lang/Bg.rc similarity index 100% rename from base/applications/winhlp32/Bg.rc rename to base/applications/winhlp32/lang/Bg.rc diff --git a/base/applications/winhlp32/Cs.rc b/base/applications/winhlp32/lang/Cs.rc similarity index 100% rename from base/applications/winhlp32/Cs.rc rename to base/applications/winhlp32/lang/Cs.rc diff --git a/base/applications/winhlp32/Da.rc b/base/applications/winhlp32/lang/Da.rc similarity index 100% rename from base/applications/winhlp32/Da.rc rename to base/applications/winhlp32/lang/Da.rc diff --git a/base/applications/winhlp32/De.rc b/base/applications/winhlp32/lang/De.rc similarity index 100% rename from base/applications/winhlp32/De.rc rename to base/applications/winhlp32/lang/De.rc diff --git a/base/applications/winhlp32/En.rc b/base/applications/winhlp32/lang/En.rc similarity index 100% rename from base/applications/winhlp32/En.rc rename to base/applications/winhlp32/lang/En.rc diff --git a/base/applications/winhlp32/Es.rc b/base/applications/winhlp32/lang/Es.rc similarity index 100% rename from base/applications/winhlp32/Es.rc rename to base/applications/winhlp32/lang/Es.rc diff --git a/base/applications/winhlp32/Fi.rc b/base/applications/winhlp32/lang/Fi.rc similarity index 100% rename from base/applications/winhlp32/Fi.rc rename to base/applications/winhlp32/lang/Fi.rc diff --git a/base/applications/winhlp32/Fr.rc b/base/applications/winhlp32/lang/Fr.rc similarity index 100% rename from base/applications/winhlp32/Fr.rc rename to base/applications/winhlp32/lang/Fr.rc diff --git a/base/applications/winhlp32/He.rc b/base/applications/winhlp32/lang/He.rc similarity index 100% rename from base/applications/winhlp32/He.rc rename to base/applications/winhlp32/lang/He.rc diff --git a/base/applications/winhlp32/Hu.rc b/base/applications/winhlp32/lang/Hu.rc similarity index 100% rename from base/applications/winhlp32/Hu.rc rename to base/applications/winhlp32/lang/Hu.rc diff --git a/base/applications/winhlp32/It.rc b/base/applications/winhlp32/lang/It.rc similarity index 100% rename from base/applications/winhlp32/It.rc rename to base/applications/winhlp32/lang/It.rc diff --git a/base/applications/winhlp32/Ja.rc b/base/applications/winhlp32/lang/Ja.rc similarity index 100% rename from base/applications/winhlp32/Ja.rc rename to base/applications/winhlp32/lang/Ja.rc diff --git a/base/applications/winhlp32/Ko.rc b/base/applications/winhlp32/lang/Ko.rc similarity index 100% rename from base/applications/winhlp32/Ko.rc rename to base/applications/winhlp32/lang/Ko.rc diff --git a/base/applications/winhlp32/Lt.rc b/base/applications/winhlp32/lang/Lt.rc similarity index 100% rename from base/applications/winhlp32/Lt.rc rename to base/applications/winhlp32/lang/Lt.rc diff --git a/base/applications/winhlp32/Nl.rc b/base/applications/winhlp32/lang/Nl.rc similarity index 100% rename from base/applications/winhlp32/Nl.rc rename to base/applications/winhlp32/lang/Nl.rc diff --git a/base/applications/winhlp32/No.rc b/base/applications/winhlp32/lang/No.rc similarity index 100% rename from base/applications/winhlp32/No.rc rename to base/applications/winhlp32/lang/No.rc diff --git a/base/applications/winhlp32/Pl.rc b/base/applications/winhlp32/lang/Pl.rc similarity index 100% rename from base/applications/winhlp32/Pl.rc rename to base/applications/winhlp32/lang/Pl.rc diff --git a/base/applications/winhlp32/Pt.rc b/base/applications/winhlp32/lang/Pt.rc similarity index 100% rename from base/applications/winhlp32/Pt.rc rename to base/applications/winhlp32/lang/Pt.rc diff --git a/base/applications/winhlp32/Rm.rc b/base/applications/winhlp32/lang/Rm.rc similarity index 100% rename from base/applications/winhlp32/Rm.rc rename to base/applications/winhlp32/lang/Rm.rc diff --git a/base/applications/winhlp32/Ro.rc b/base/applications/winhlp32/lang/Ro.rc similarity index 100% rename from base/applications/winhlp32/Ro.rc rename to base/applications/winhlp32/lang/Ro.rc diff --git a/base/applications/winhlp32/Ru.rc b/base/applications/winhlp32/lang/Ru.rc similarity index 100% rename from base/applications/winhlp32/Ru.rc rename to base/applications/winhlp32/lang/Ru.rc diff --git a/base/applications/winhlp32/Si.rc b/base/applications/winhlp32/lang/Si.rc similarity index 100% rename from base/applications/winhlp32/Si.rc rename to base/applications/winhlp32/lang/Si.rc diff --git a/base/applications/winhlp32/Sk.rc b/base/applications/winhlp32/lang/Sk.rc similarity index 100% rename from base/applications/winhlp32/Sk.rc rename to base/applications/winhlp32/lang/Sk.rc diff --git a/base/applications/winhlp32/Sr.rc b/base/applications/winhlp32/lang/Sr.rc similarity index 100% rename from base/applications/winhlp32/Sr.rc rename to base/applications/winhlp32/lang/Sr.rc diff --git a/base/applications/winhlp32/Sv.rc b/base/applications/winhlp32/lang/Sv.rc similarity index 100% rename from base/applications/winhlp32/Sv.rc rename to base/applications/winhlp32/lang/Sv.rc diff --git a/base/applications/winhlp32/Tr.rc b/base/applications/winhlp32/lang/Tr.rc similarity index 96% rename from base/applications/winhlp32/Tr.rc rename to base/applications/winhlp32/lang/Tr.rc index e03d6335576..dbd32803dfa 100644 --- a/base/applications/winhlp32/Tr.rc +++ b/base/applications/winhlp32/lang/Tr.rc @@ -31,7 +31,7 @@ MAIN_MENU MENU MENUITEM "&Aç...", MNID_FILE_OPEN MENUITEM SEPARATOR MENUITEM "&Yazdır...", MNID_FILE_PRINT - MENUITEM "Ya&zıcı seçenekleri...", MNID_FILE_SETUP + MENUITEM "Ya&zıcı Ayarları...", MNID_FILE_SETUP MENUITEM SEPARATOR MENUITEM "&Çıkış", MNID_FILE_EXIT } @@ -46,7 +46,7 @@ MAIN_MENU MENU POPUP "&Seçenekler" { POPUP "&Her Zaman Üstte Olma" BEGIN - MENUITEM "&Ön Tanımlı", MNID_OPTS_HELP_DEFAULT + MENUITEM "&Öntanımlı", MNID_OPTS_HELP_DEFAULT MENUITEM "&Evet", MNID_OPTS_HELP_VISIBLE MENUITEM "&Hayır", MNID_OPTS_HELP_NONVISIBLE END diff --git a/base/applications/winhlp32/Uk.rc b/base/applications/winhlp32/lang/Uk.rc similarity index 100% rename from base/applications/winhlp32/Uk.rc rename to base/applications/winhlp32/lang/Uk.rc diff --git a/base/applications/winhlp32/Zh.rc b/base/applications/winhlp32/lang/Zh.rc similarity index 100% rename from base/applications/winhlp32/Zh.rc rename to base/applications/winhlp32/lang/Zh.rc diff --git a/base/applications/winhlp32/winhelp.ico b/base/applications/winhlp32/res/winhelp.ico similarity index 100% rename from base/applications/winhlp32/winhelp.ico rename to base/applications/winhlp32/res/winhelp.ico diff --git a/base/applications/winhlp32/rsrc.rc b/base/applications/winhlp32/rsrc.rc index 4580707de66..9bf3a0fe21e 100644 --- a/base/applications/winhlp32/rsrc.rc +++ b/base/applications/winhlp32/rsrc.rc @@ -25,91 +25,93 @@ #include "winhelp_res.h" /* @makedep: winhelp.ico */ -IDI_WINHELP ICON winhelp.ico +IDI_WINHELP ICON "res/winhelp.ico" + +#include #ifdef LANGUAGE_BG_BG - #include "Bg.rc" + #include "lang/Bg.rc" #endif #ifdef LANGUAGE_CS_CZ - #include "Cs.rc" + #include "lang/Cs.rc" #endif #ifdef LANGUAGE_EN_US - #include "En.rc" + #include "lang/En.rc" #endif #ifdef LANGUAGE_ES_ES - #include "Es.rc" + #include "lang/Es.rc" #endif #ifdef LANGUAGE_FI_FI - #include "Fi.rc" + #include "lang/Fi.rc" #endif #ifdef LANGUAGE_HU_HU - #include "Hu.rc" + #include "lang/Hu.rc" #endif #ifdef LANGUAGE_NO_NO - #include "No.rc" + #include "lang/No.rc" #endif #ifdef LANGUAGE_PL_PL - #include "Pl.rc" + #include "lang/Pl.rc" #endif #ifdef LANGUAGE_SK_SK - #include "Sk.rc" + #include "lang/Sk.rc" #endif #ifdef LANGUAGE_SV_SE - #include "Sv.rc" + #include "lang/Sv.rc" #endif /* UTF-8 */ #ifdef LANGUAGE_DA_DK - #include "Da.rc" + #include "lang/Da.rc" #endif #ifdef LANGUAGE_DE_DE - #include "De.rc" + #include "lang/De.rc" #endif #ifdef LANGUAGE_FR_FR - #include "Fr.rc" + #include "lang/Fr.rc" #endif #ifdef LANGUAGE_HE_IL - #include "He.rc" + #include "lang/He.rc" #endif #ifdef LANGUAGE_IT_IT - #include "It.rc" + #include "lang/It.rc" #endif #ifdef LANGUAGE_JA_JP - #include "Ja.rc" + #include "lang/Ja.rc" #endif #ifdef LANGUAGE_KO_KR - #include "Ko.rc" + #include "lang/Ko.rc" #endif #ifdef LANGUAGE_LT_LT - #include "Lt.rc" + #include "lang/Lt.rc" #endif #ifdef LANGUAGE_NL_NL - #include "Nl.rc" + #include "lang/Nl.rc" #endif #ifdef LANGUAGE_PT_PT - #include "Pt.rc" + #include "lang/Pt.rc" #endif #ifdef LANGUAGE_RM_CH - #include "Rm.rc" + #include "lang/Rm.rc" #endif #ifdef LANGUAGE_RO_RO - #include "Ro.rc" + #include "lang/Ro.rc" #endif #ifdef LANGUAGE_RU_RU - #include "Ru.rc" + #include "lang/Ru.rc" #endif #ifdef LANGUAGE_SL_SI - #include "Si.rc" + #include "lang/Si.rc" #endif #ifdef LANGUAGE_SR_SP - #include "Sr.rc" + #include "lang/Sr.rc" #endif #ifdef LANGUAGE_TR_TR - #include "Tr.rc" + #include "lang/Tr.rc" #endif #ifdef LANGUAGE_UK_UA - #include "Uk.rc" + #include "lang/Uk.rc" #endif #ifdef LANGUAGE_ZH_CN - #include "Zh.rc" + #include "lang/Zh.rc" #endif diff --git a/base/applications/wordpad/Da.rc b/base/applications/wordpad/lang/Da.rc similarity index 100% rename from base/applications/wordpad/Da.rc rename to base/applications/wordpad/lang/Da.rc diff --git a/base/applications/wordpad/De.rc b/base/applications/wordpad/lang/De.rc similarity index 100% rename from base/applications/wordpad/De.rc rename to base/applications/wordpad/lang/De.rc diff --git a/base/applications/wordpad/En.rc b/base/applications/wordpad/lang/En.rc similarity index 100% rename from base/applications/wordpad/En.rc rename to base/applications/wordpad/lang/En.rc diff --git a/base/applications/wordpad/Fr.rc b/base/applications/wordpad/lang/Fr.rc similarity index 100% rename from base/applications/wordpad/Fr.rc rename to base/applications/wordpad/lang/Fr.rc diff --git a/base/applications/wordpad/He.rc b/base/applications/wordpad/lang/He.rc similarity index 100% rename from base/applications/wordpad/He.rc rename to base/applications/wordpad/lang/He.rc diff --git a/base/applications/wordpad/Hu.rc b/base/applications/wordpad/lang/Hu.rc similarity index 100% rename from base/applications/wordpad/Hu.rc rename to base/applications/wordpad/lang/Hu.rc diff --git a/base/applications/wordpad/It.rc b/base/applications/wordpad/lang/It.rc similarity index 100% rename from base/applications/wordpad/It.rc rename to base/applications/wordpad/lang/It.rc diff --git a/base/applications/wordpad/Ja.rc b/base/applications/wordpad/lang/Ja.rc similarity index 100% rename from base/applications/wordpad/Ja.rc rename to base/applications/wordpad/lang/Ja.rc diff --git a/base/applications/wordpad/Ko.rc b/base/applications/wordpad/lang/Ko.rc similarity index 100% rename from base/applications/wordpad/Ko.rc rename to base/applications/wordpad/lang/Ko.rc diff --git a/base/applications/wordpad/Lt.rc b/base/applications/wordpad/lang/Lt.rc similarity index 100% rename from base/applications/wordpad/Lt.rc rename to base/applications/wordpad/lang/Lt.rc diff --git a/base/applications/wordpad/Nl.rc b/base/applications/wordpad/lang/Nl.rc similarity index 100% rename from base/applications/wordpad/Nl.rc rename to base/applications/wordpad/lang/Nl.rc diff --git a/base/applications/wordpad/No.rc b/base/applications/wordpad/lang/No.rc similarity index 100% rename from base/applications/wordpad/No.rc rename to base/applications/wordpad/lang/No.rc diff --git a/base/applications/wordpad/Pl.rc b/base/applications/wordpad/lang/Pl.rc similarity index 100% rename from base/applications/wordpad/Pl.rc rename to base/applications/wordpad/lang/Pl.rc diff --git a/base/applications/wordpad/Pt.rc b/base/applications/wordpad/lang/Pt.rc similarity index 100% rename from base/applications/wordpad/Pt.rc rename to base/applications/wordpad/lang/Pt.rc diff --git a/base/applications/wordpad/Ro.rc b/base/applications/wordpad/lang/Ro.rc similarity index 100% rename from base/applications/wordpad/Ro.rc rename to base/applications/wordpad/lang/Ro.rc diff --git a/base/applications/wordpad/Ru.rc b/base/applications/wordpad/lang/Ru.rc similarity index 100% rename from base/applications/wordpad/Ru.rc rename to base/applications/wordpad/lang/Ru.rc diff --git a/base/applications/wordpad/Si.rc b/base/applications/wordpad/lang/Si.rc similarity index 100% rename from base/applications/wordpad/Si.rc rename to base/applications/wordpad/lang/Si.rc diff --git a/base/applications/wordpad/Sv.rc b/base/applications/wordpad/lang/Sv.rc similarity index 100% rename from base/applications/wordpad/Sv.rc rename to base/applications/wordpad/lang/Sv.rc diff --git a/base/applications/wordpad/Tr.rc b/base/applications/wordpad/lang/Tr.rc similarity index 95% rename from base/applications/wordpad/Tr.rc rename to base/applications/wordpad/lang/Tr.rc index ff4de79e759..1fd0f1d6c12 100644 --- a/base/applications/wordpad/Tr.rc +++ b/base/applications/wordpad/lang/Tr.rc @@ -1,8 +1,8 @@ /* * Turkish Resources for ReactOS Wordpad * - * Copyright: 2006 Fatih Aşıcı (fasici@linux-sevenler.org) - * 2013 Erdem Ersoy (eersoy93) (erdemersoy@live.com) + * Copyrights: 2006 Fatih Aşıcı (fasici@linux-sevenler.org) + * 2013 Erdem Ersoy (eersoy93) (erdemersoy@live.com) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -72,7 +72,7 @@ BEGIN MENUITEM "&Çizgilik", ID_TOGGLE_RULER MENUITEM "&Durum Çubuğu", ID_TOGGLE_STATUSBAR MENUITEM SEPARATOR - MENUITEM "&Seçenekler...", ID_VIEWPROPERTIES + MENUITEM "&Husûsiyetler...", ID_VIEWPROPERTIES END POPUP "&Ekle" BEGIN @@ -141,7 +141,7 @@ BEGIN LTEXT "Var Olan Biçimler:",-1,3,2,100,15 LISTBOX IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT | LBS_NOTIFY PUSHBUTTON "Tamam",IDOK,87,12,40,12 - PUSHBUTTON "Vazgeç",IDCANCEL,87,26,40,12 + PUSHBUTTON "İptal",IDCANCEL,87,26,40,12 END IDD_NEWFILE DIALOG 30, 20, 140, 80 @@ -152,7 +152,7 @@ BEGIN LTEXT "Yeni Belge Türü:",-1,3,2,100,15 LISTBOX IDC_NEWFILE,3,12,90,65,LBS_NOINTEGRALHEIGHT PUSHBUTTON "Tamam",IDOK,97,12,40,12 - PUSHBUTTON "Vazgeç",IDCANCEL,97,26,40,12 + PUSHBUTTON "İptal",IDCANCEL,97,26,40,12 END IDD_PARAFORMAT DIALOG 30, 20, 200, 110 @@ -170,7 +170,7 @@ BEGIN LTEXT "Hizâlama", -1, 15, 87, 40, 13 COMBOBOX IDC_PARA_ALIGN, 55, 85, 60, 60, CBS_DROPDOWNLIST PUSHBUTTON "Tamam", IDOK, 137, 15, 50, 15 - PUSHBUTTON "Vazgeç", IDCANCEL, 137, 33, 50, 15 + PUSHBUTTON "İptal", IDCANCEL, 137, 33, 50, 15 END IDD_TABSTOPS DIALOG 30, 20, 200, 110 @@ -183,7 +183,7 @@ BEGIN DEFPUSHBUTTON "Ekle", ID_TAB_ADD, 20, 80, 45, 15 PUSHBUTTON "Sil", ID_TAB_DEL, 72, 80, 45, 15 PUSHBUTTON "Tamam", IDOK, 137, 15, 50, 15 - PUSHBUTTON "Vazgeç", IDCANCEL, 137, 33, 50, 15 + PUSHBUTTON "İptal", IDCANCEL, 137, 33, 50, 15 PUSHBUTTON "Hepsini Sil", ID_TAB_EMPTY, 137, 51, 50, 15 END @@ -225,7 +225,7 @@ END STRINGTABLE BEGIN - STRING_VIEWPROPS_TITLE, "Seçenekler" + STRING_VIEWPROPS_TITLE, "Husûsiyetler" STRING_VIEWPROPS_TEXT, "Metin" STRING_VIEWPROPS_RICHTEXT, "Gelişmiş Metin" END @@ -261,6 +261,6 @@ BEGIN STRING_WRITE_ACCESS_DENIED, "Bu belgeyi kaydetme yetkiniz yok." STRING_OPEN_FAILED, "Belgenin açılması başarısız oldu." STRING_OPEN_ACCESS_DENIED, "Bu belgeyi açma yetkiniz yok." - STRING_PRINTING_NOT_IMPLEMENTED, "Yazdırma seçeneği daha bitirilmedi." + STRING_PRINTING_NOT_IMPLEMENTED, "Yazdırma seçeneği daha bitirilmemiştir." STRING_MAX_TAB_STOPS, "En çok 32 adet sekme durağı ekleyebilirsiniz." END diff --git a/base/applications/wordpad/Uk.rc b/base/applications/wordpad/lang/Uk.rc similarity index 100% rename from base/applications/wordpad/Uk.rc rename to base/applications/wordpad/lang/Uk.rc diff --git a/base/applications/wordpad/Zh.rc b/base/applications/wordpad/lang/Zh.rc similarity index 100% rename from base/applications/wordpad/Zh.rc rename to base/applications/wordpad/lang/Zh.rc diff --git a/base/applications/wordpad/formatbar.bmp b/base/applications/wordpad/res/formatbar.bmp similarity index 100% rename from base/applications/wordpad/formatbar.bmp rename to base/applications/wordpad/res/formatbar.bmp diff --git a/base/applications/wordpad/toolbar.bmp b/base/applications/wordpad/res/toolbar.bmp similarity index 100% rename from base/applications/wordpad/toolbar.bmp rename to base/applications/wordpad/res/toolbar.bmp diff --git a/base/applications/wordpad/wordpad.ico b/base/applications/wordpad/res/wordpad.ico similarity index 100% rename from base/applications/wordpad/wordpad.ico rename to base/applications/wordpad/res/wordpad.ico diff --git a/base/applications/wordpad/zoom.cur b/base/applications/wordpad/res/zoom.cur similarity index 100% rename from base/applications/wordpad/zoom.cur rename to base/applications/wordpad/res/zoom.cur diff --git a/base/applications/wordpad/rsrc.rc b/base/applications/wordpad/rsrc.rc index 0ed7ac21288..e0d77aba644 100644 --- a/base/applications/wordpad/rsrc.rc +++ b/base/applications/wordpad/rsrc.rc @@ -53,80 +53,81 @@ BEGIN END /* @makedep: toolbar.bmp */ -IDB_TOOLBAR BITMAP "toolbar.bmp" +IDB_TOOLBAR BITMAP "res/toolbar.bmp" /* @makedep: formatbar.bmp */ -IDB_FORMATBAR BITMAP "formatbar.bmp" +IDB_FORMATBAR BITMAP "res/formatbar.bmp" /* @makedep: wordpad.ico */ -IDI_WORDPAD ICON "wordpad.ico" +IDI_WORDPAD ICON "res/wordpad.ico" /* @makedep: zoom.cur */ -IDC_ZOOM CURSOR "zoom.cur" +IDC_ZOOM CURSOR "res/zoom.cur" +#include #ifdef LANGUAGE_EN_US - #include "En.rc" + #include "lang/En.rc" #endif #ifdef LANGUAGE_HU_HU - #include "Hu.rc" + #include "lang/Hu.rc" #endif #ifdef LANGUAGE_KO_KR - #include "Ko.rc" + #include "lang/Ko.rc" #endif #ifdef LANGUAGE_PL_PL - #include "Pl.rc" + #include "lang/Pl.rc" #endif /* UTF-8 */ #ifdef LANGUAGE_DA_DK - #include "Da.rc" + #include "lang/Da.rc" #endif #ifdef LANGUAGE_DE_DE - #include "De.rc" + #include "lang/De.rc" #endif #ifdef LANGUAGE_FR_FR - #include "Fr.rc" + #include "lang/Fr.rc" #endif #ifdef LANGUAGE_HE_IL - #include "He.rc" + #include "lang/He.rc" #endif #ifdef LANGUAGE_IT_IT - #include "It.rc" + #include "lang/It.rc" #endif #ifdef LANGUAGE_JA_JP - #include "Ja.rc" + #include "lang/Ja.rc" #endif #ifdef LANGUAGE_LT_LT - #include "Lt.rc" + #include "lang/Lt.rc" #endif #ifdef LANGUAGE_NL_NL - #include "Nl.rc" + #include "lang/Nl.rc" #endif #ifdef LANGUAGE_NO_NO - #include "No.rc" + #include "lang/No.rc" #endif #ifdef LANGUAGE_PT_PT - #include "Pt.rc" + #include "lang/Pt.rc" #endif #ifdef LANGUAGE_RO_RO - #include "Ro.rc" + #include "lang/Ro.rc" #endif #ifdef LANGUAGE_RU_RU - #include "Ru.rc" + #include "lang/Ru.rc" #endif #ifdef LANGUAGE_SL_SI - #include "Si.rc" + #include "lang/Si.rc" #endif #ifdef LANGUAGE_SV_SE - #include "Sv.rc" + #include "lang/Sv.rc" #endif #ifdef LANGUAGE_TR_TR - #include "Tr.rc" + #include "lang/Tr.rc" #endif #ifdef LANGUAGE_UK_UA - #include "Uk.rc" + #include "lang/Uk.rc" #endif #ifdef LANGUAGE_ZH_CN - #include "Zh.rc" + #include "lang/Zh.rc" #endif diff --git a/base/applications/wordpad/wordpad.c b/base/applications/wordpad/wordpad.c index 9d832eaa66f..bc5aba2a0f5 100644 --- a/base/applications/wordpad/wordpad.c +++ b/base/applications/wordpad/wordpad.c @@ -47,7 +47,7 @@ #endif /* use LoadString */ -static const WCHAR wszAppTitle[] = {'W','i','n','e',' ','W','o','r','d','p','a','d',0}; +static const WCHAR wszAppTitle[] = {'W','o','r','d','p','a','d',0}; static const WCHAR wszMainWndClass[] = {'W','O','R','D','P','A','D','T','O','P',0}; diff --git a/base/applications/write/Bg.rc b/base/applications/write/lang/Bg.rc similarity index 100% rename from base/applications/write/Bg.rc rename to base/applications/write/lang/Bg.rc diff --git a/base/applications/write/Da.rc b/base/applications/write/lang/Da.rc similarity index 100% rename from base/applications/write/Da.rc rename to base/applications/write/lang/Da.rc diff --git a/base/applications/write/De.rc b/base/applications/write/lang/De.rc similarity index 100% rename from base/applications/write/De.rc rename to base/applications/write/lang/De.rc diff --git a/base/applications/write/En.rc b/base/applications/write/lang/En.rc similarity index 100% rename from base/applications/write/En.rc rename to base/applications/write/lang/En.rc diff --git a/base/applications/write/Es.rc b/base/applications/write/lang/Es.rc similarity index 100% rename from base/applications/write/Es.rc rename to base/applications/write/lang/Es.rc diff --git a/base/applications/write/Fr.rc b/base/applications/write/lang/Fr.rc similarity index 100% rename from base/applications/write/Fr.rc rename to base/applications/write/lang/Fr.rc diff --git a/base/applications/write/He.rc b/base/applications/write/lang/He.rc similarity index 100% rename from base/applications/write/He.rc rename to base/applications/write/lang/He.rc diff --git a/base/applications/write/It.rc b/base/applications/write/lang/It.rc similarity index 100% rename from base/applications/write/It.rc rename to base/applications/write/lang/It.rc diff --git a/base/applications/write/Ja.rc b/base/applications/write/lang/Ja.rc similarity index 100% rename from base/applications/write/Ja.rc rename to base/applications/write/lang/Ja.rc diff --git a/base/applications/write/Ko.rc b/base/applications/write/lang/Ko.rc similarity index 100% rename from base/applications/write/Ko.rc rename to base/applications/write/lang/Ko.rc diff --git a/base/applications/write/Lt.rc b/base/applications/write/lang/Lt.rc similarity index 100% rename from base/applications/write/Lt.rc rename to base/applications/write/lang/Lt.rc diff --git a/base/applications/write/Nl.rc b/base/applications/write/lang/Nl.rc similarity index 100% rename from base/applications/write/Nl.rc rename to base/applications/write/lang/Nl.rc diff --git a/base/applications/write/No.rc b/base/applications/write/lang/No.rc similarity index 100% rename from base/applications/write/No.rc rename to base/applications/write/lang/No.rc diff --git a/base/applications/write/Pl.rc b/base/applications/write/lang/Pl.rc similarity index 100% rename from base/applications/write/Pl.rc rename to base/applications/write/lang/Pl.rc diff --git a/base/applications/write/Pt.rc b/base/applications/write/lang/Pt.rc similarity index 100% rename from base/applications/write/Pt.rc rename to base/applications/write/lang/Pt.rc diff --git a/base/applications/write/Ro.rc b/base/applications/write/lang/Ro.rc similarity index 100% rename from base/applications/write/Ro.rc rename to base/applications/write/lang/Ro.rc diff --git a/base/applications/write/Ru.rc b/base/applications/write/lang/Ru.rc similarity index 100% rename from base/applications/write/Ru.rc rename to base/applications/write/lang/Ru.rc diff --git a/base/applications/write/Si.rc b/base/applications/write/lang/Si.rc similarity index 100% rename from base/applications/write/Si.rc rename to base/applications/write/lang/Si.rc diff --git a/base/applications/write/Sr.rc b/base/applications/write/lang/Sr.rc similarity index 100% rename from base/applications/write/Sr.rc rename to base/applications/write/lang/Sr.rc diff --git a/base/applications/write/Sv.rc b/base/applications/write/lang/Sv.rc similarity index 100% rename from base/applications/write/Sv.rc rename to base/applications/write/lang/Sv.rc diff --git a/base/applications/write/Tr.rc b/base/applications/write/lang/Tr.rc similarity index 91% rename from base/applications/write/Tr.rc rename to base/applications/write/lang/Tr.rc index 03acc70131c..de63743c926 100644 --- a/base/applications/write/Tr.rc +++ b/base/applications/write/lang/Tr.rc @@ -24,5 +24,5 @@ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT STRINGTABLE { - IDS_FAILED, "Gelişmiş Metin Düzenleyicisi'nin açılması başarısız oldu." + IDS_FAILED, "Kelime İşlemci'nin açılması başarısız oldu." } diff --git a/base/applications/write/Uk.rc b/base/applications/write/lang/Uk.rc similarity index 100% rename from base/applications/write/Uk.rc rename to base/applications/write/lang/Uk.rc diff --git a/base/applications/write/Zh.rc b/base/applications/write/lang/Zh.rc similarity index 100% rename from base/applications/write/Zh.rc rename to base/applications/write/lang/Zh.rc diff --git a/base/applications/write/rsrc.rc b/base/applications/write/rsrc.rc index 11ec57618f8..f0ed8cecca7 100644 --- a/base/applications/write/rsrc.rc +++ b/base/applications/write/rsrc.rc @@ -20,76 +20,78 @@ #include "resources.h" +#include + LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #ifdef LANGUAGE_DA_DK - #include "Da.rc" + #include "lang/Da.rc" #endif #ifdef LANGUAGE_EN_US - #include "En.rc" + #include "lang/En.rc" #endif #ifdef LANGUAGE_KO_KR - #include "Ko.rc" + #include "lang/Ko.rc" #endif #ifdef LANGUAGE_NL_NL - #include "Nl.rc" + #include "lang/Nl.rc" #endif #ifdef LANGUAGE_NO_NO - #include "No.rc" + #include "lang/No.rc" #endif #ifdef LANGUAGE_PL_PL - #include "Pl.rc" + #include "lang/Pl.rc" #endif #ifdef LANGUAGE_PT_PT - #include "Pt.rc" + #include "lang/Pt.rc" #endif #ifdef LANGUAGE_SV_SE - #include "Sv.rc" + #include "lang/Sv.rc" #endif /* UTF-8 */ #ifdef LANGUAGE_BG_BG - #include "Bg.rc" + #include "lang/Bg.rc" #endif #ifdef LANGUAGE_DE_DE - #include "De.rc" + #include "lang/De.rc" #endif #ifdef LANGUAGE_ES_ES - #include "Es.rc" + #include "lang/Es.rc" #endif #ifdef LANGUAGE_FR_FR - #include "Fr.rc" + #include "lang/Fr.rc" #endif #ifdef LANGUAGE_HE_IL - #include "He.rc" + #include "lang/He.rc" #endif #ifdef LANGUAGE_IT_IT - #include "It.rc" + #include "lang/It.rc" #endif #ifdef LANGUAGE_JA_JP - #include "Ja.rc" + #include "lang/Ja.rc" #endif #ifdef LANGUAGE_LT_LT - #include "Lt.rc" + #include "lang/Lt.rc" #endif #ifdef LANGUAGE_RO_RO - #include "Ro.rc" + #include "lang/Ro.rc" #endif #ifdef LANGUAGE_RU_RU - #include "Ru.rc" + #include "lang/Ru.rc" #endif #ifdef LANGUAGE_SL_SI - #include "Si.rc" + #include "lang/Si.rc" #endif #ifdef LANGUAGE_SR_SP - #include "Sr.rc" + #include "lang/Sr.rc" #endif #ifdef LANGUAGE_TR_TR - #include "Tr.rc" + #include "lang/Tr.rc" #endif #ifdef LANGUAGE_UK_UA - #include "Uk.rc" + #include "lang/Uk.rc" #endif #ifdef LANGUAGE_ZH_CN - #include "Zh.rc" + #include "lang/Zh.rc" #endif diff --git a/base/services/rpcss/epmp.c b/base/services/rpcss/epmp.c index 2d3041f2b25..aef5fde0d30 100644 --- a/base/services/rpcss/epmp.c +++ b/base/services/rpcss/epmp.c @@ -19,6 +19,7 @@ */ #include + #include #include @@ -88,16 +89,16 @@ void __RPC_USER ept_lookup_handle_t_rundown(ept_lookup_handle_t entry_handle) WINE_FIXME("%p\n", entry_handle); } -void ept_insert(handle_t h, - unsigned32 num_ents, - ept_entry_t entries[], - boolean32 replace, - error_status_t *status) +void __cdecl ept_insert(handle_t h, + unsigned32 num_ents, + ept_entry_t entries[], + boolean32 replace, + error_status_t *status) { unsigned32 i; RPC_STATUS rpc_status; - WINE_TRACE("(%p, %lu, %p, %lu, %p)\n", h, num_ents, entries, replace, status); + WINE_TRACE("(%p, %u, %p, %u, %p)\n", h, num_ents, entries, replace, status); *status = RPC_S_OK; @@ -119,7 +120,7 @@ void ept_insert(handle_t h, &entry->address); if (rpc_status != RPC_S_OK) { - WINE_WARN("TowerExplode failed %lu\n", rpc_status); + WINE_WARN("TowerExplode failed %u\n", rpc_status); *status = rpc_status; break; /* FIXME: more cleanup? */ } @@ -138,17 +139,17 @@ void ept_insert(handle_t h, LeaveCriticalSection(&csEpm); } -void ept_delete(handle_t h, - unsigned32 num_ents, - ept_entry_t entries[], - error_status_t *status) +void __cdecl ept_delete(handle_t h, + unsigned32 num_ents, + ept_entry_t entries[], + error_status_t *status) { unsigned32 i; RPC_STATUS rpc_status; *status = RPC_S_OK; - WINE_TRACE("(%p, %lu, %p, %p)\n", h, num_ents, entries, status); + WINE_TRACE("(%p, %u, %p, %p)\n", h, num_ents, entries, status); EnterCriticalSection(&csEpm); @@ -179,30 +180,30 @@ void ept_delete(handle_t h, LeaveCriticalSection(&csEpm); } -void ept_lookup(handle_t h, - unsigned32 inquiry_type, - uuid_p_t object, - rpc_if_id_p_t interface_id, - unsigned32 vers_option, - ept_lookup_handle_t *entry_handle, - unsigned32 max_ents, - unsigned32 *num_ents, - ept_entry_t entries[], - error_status_t *status) +void __cdecl ept_lookup(handle_t h, + unsigned32 inquiry_type, + uuid_p_t object, + rpc_if_id_p_t interface_id, + unsigned32 vers_option, + ept_lookup_handle_t *entry_handle, + unsigned32 max_ents, + unsigned32 *num_ents, + ept_entry_t entries[], + error_status_t *status) { WINE_FIXME("(%p, %p, %p): stub\n", h, entry_handle, status); *status = EPT_S_CANT_PERFORM_OP; } -void ept_map(handle_t h, - uuid_p_t object, - twr_p_t map_tower, - ept_lookup_handle_t *entry_handle, - unsigned32 max_towers, - unsigned32 *num_towers, - twr_p_t *towers, - error_status_t *status) +void __cdecl ept_map(handle_t h, + uuid_p_t object, + twr_p_t map_tower, + ept_lookup_handle_t *entry_handle, + unsigned32 max_towers, + unsigned32 *num_towers, + twr_p_t *towers, + error_status_t *status) { RPC_STATUS rpc_status; RPC_SYNTAX_IDENTIFIER iface, syntax; @@ -212,7 +213,7 @@ void ept_map(handle_t h, *status = RPC_S_OK; *num_towers = 0; - WINE_TRACE("(%p, %p, %p, %p, %lu, %p, %p, %p)\n", h, object, map_tower, + WINE_TRACE("(%p, %p, %p, %p, %u, %p, %p, %p)\n", h, object, map_tower, entry_handle, max_towers, num_towers, towers, status); rpc_status = TowerExplode(map_tower, &iface, &syntax, &protseq, @@ -253,31 +254,31 @@ void ept_map(handle_t h, LeaveCriticalSection(&csEpm); } -void ept_lookup_handle_free(handle_t h, - ept_lookup_handle_t *entry_handle, - error_status_t *status) +void __cdecl ept_lookup_handle_free(handle_t h, + ept_lookup_handle_t *entry_handle, + error_status_t *status) { WINE_FIXME("(%p, %p, %p): stub\n", h, entry_handle, status); *status = EPT_S_CANT_PERFORM_OP; } -void ept_inq_object(handle_t h, - GUID *ept_object, - error_status_t *status) +void __cdecl ept_inq_object(handle_t h, + GUID *ept_object, + error_status_t *status) { WINE_FIXME("(%p, %p, %p): stub\n", h, ept_object, status); *status = EPT_S_CANT_PERFORM_OP; } -void ept_mgmt_delete(handle_t h, - boolean32 object_speced, - uuid_p_t object, - twr_p_t tower, - error_status_t *status) +void __cdecl ept_mgmt_delete(handle_t h, + boolean32 object_speced, + uuid_p_t object, + twr_p_t tower, + error_status_t *status) { - WINE_FIXME("(%p, %ld, %p, %p, %p): stub\n", h, object_speced, object, tower, status); + WINE_FIXME("(%p, %d, %p, %p, %p): stub\n", h, object_speced, object, tower, status); *status = EPT_S_CANT_PERFORM_OP; } diff --git a/base/services/rpcss/irotp.c b/base/services/rpcss/irotp.c index 015a89f735b..368dea64ebd 100644 --- a/base/services/rpcss/irotp.c +++ b/base/services/rpcss/irotp.c @@ -1,5 +1,5 @@ /* - * Running Object Table + * Running Object Table * * Copyright 2007 Robert Shearman * @@ -60,7 +60,7 @@ static inline void rot_entry_release(struct rot_entry *rot_entry) } } -HRESULT IrotRegister( +HRESULT __cdecl IrotRegister( IrotHandle h, const MonikerComparisonData *data, const InterfaceData *obj, @@ -140,7 +140,7 @@ HRESULT IrotRegister( return hr; } -HRESULT IrotRevoke( +HRESULT __cdecl IrotRevoke( IrotHandle h, IrotCookie cookie, IrotContextHandle *ctxt_handle, @@ -187,7 +187,7 @@ HRESULT IrotRevoke( return E_INVALIDARG; } -HRESULT IrotIsRunning( +HRESULT __cdecl IrotIsRunning( IrotHandle h, const MonikerComparisonData *data) { @@ -212,7 +212,7 @@ HRESULT IrotIsRunning( return hr; } -HRESULT IrotGetObject( +HRESULT __cdecl IrotGetObject( IrotHandle h, const MonikerComparisonData *moniker_data, PInterfaceData *obj, @@ -254,7 +254,7 @@ HRESULT IrotGetObject( return MK_E_UNAVAILABLE; } -HRESULT IrotNoteChangeTime( +HRESULT __cdecl IrotNoteChangeTime( IrotHandle h, IrotCookie cookie, const FILETIME *last_modified_time) @@ -278,7 +278,7 @@ HRESULT IrotNoteChangeTime( return E_INVALIDARG; } -HRESULT IrotGetTimeOfLastChange( +HRESULT __cdecl IrotGetTimeOfLastChange( IrotHandle h, const MonikerComparisonData *moniker_data, FILETIME *time) @@ -306,7 +306,7 @@ HRESULT IrotGetTimeOfLastChange( return hr; } -HRESULT IrotEnumRunning( +HRESULT __cdecl IrotEnumRunning( IrotHandle h, PInterfaceList *list) { diff --git a/base/services/rpcss/rpcss_main.c b/base/services/rpcss/rpcss_main.c index 87496bf6094..f2255020f9e 100644 --- a/base/services/rpcss/rpcss_main.c +++ b/base/services/rpcss/rpcss_main.c @@ -122,7 +122,7 @@ BOOL RPCSS_Shutdown(void) return TRUE; } -#if 0 +#ifndef __REACTOS__ int main( int argc, char **argv ) { /* diff --git a/base/services/svchost/CMakeLists.txt b/base/services/svchost/CMakeLists.txt index b5593117322..1bcddd725a9 100644 --- a/base/services/svchost/CMakeLists.txt +++ b/base/services/svchost/CMakeLists.txt @@ -1,6 +1,14 @@ -add_executable(svchost svchost.c svchost.rc) +list(APPEND SOURCE + globals.c + registry.c + security.cxx + rpcsrv.c + netbios.c + svchost.c) +add_executable(svchost ${SOURCE} svchost.rc) +target_link_libraries(svchost uuid) set_module_type(svchost win32cui UNICODE) -add_importlibs(svchost advapi32 msvcrt kernel32 ntdll) +add_importlibs(svchost advapi32 netapi32 rpcrt4 ole32 kernel32 ntdll) add_cd_file(TARGET svchost DESTINATION reactos/system32 FOR all) diff --git a/base/services/svchost/globals.c b/base/services/svchost/globals.c new file mode 100644 index 00000000000..7acc7351835 --- /dev/null +++ b/base/services/svchost/globals.c @@ -0,0 +1,299 @@ +/* + * PROJECT: ReactOS Service Host + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: base/services/svchost/globals.c + * PURPOSE: Functions to initialize global settings and support + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES ******************************************************************/ + +#include "svchost.h" + +/* GLOBALS *******************************************************************/ + +PSID NullSid, WorldSid, LocalSid, NetworkSid, InteractiveSid, ServiceLogonSid; +PSID LocalSystemSid, LocalServiceSid, NetworkServiceSid, BuiltinDomainSid; +PSID AuthenticatedUserSid, AnonymousLogonSid, AliasAdminsSid, AliasUsersSid; +PSID AliasGuestsSid, AliasPowerUsersSid, AliasAccountOpsSid, AliasSystemOpsSid; +PSID AliasPrintOpsSid; +PSID AliasBackupOpsSid; + +SID_DATA SidData[12] = +{ + { &NullSid, { SECURITY_NULL_SID_AUTHORITY }, SECURITY_NULL_RID }, + { &WorldSid, { SECURITY_WORLD_SID_AUTHORITY }, SECURITY_WORLD_RID }, + { &LocalSid, { SECURITY_LOCAL_SID_AUTHORITY }, SECURITY_LOCAL_RID }, + { &NetworkSid, { SECURITY_NT_AUTHORITY }, SECURITY_NETWORK_RID }, + { &InteractiveSid, { SECURITY_NT_AUTHORITY }, SECURITY_INTERACTIVE_RID }, + { &ServiceLogonSid, { SECURITY_NT_AUTHORITY }, SECURITY_SERVICE_RID }, + { &LocalSystemSid, { SECURITY_NT_AUTHORITY }, SECURITY_LOCAL_SYSTEM_RID }, + { &LocalServiceSid, { SECURITY_NT_AUTHORITY }, SECURITY_LOCAL_SERVICE_RID }, + { &NetworkServiceSid, { SECURITY_NT_AUTHORITY }, SECURITY_NETWORK_SERVICE_RID }, + { &BuiltinDomainSid, { SECURITY_NT_AUTHORITY }, SECURITY_BUILTIN_DOMAIN_RID }, + { &AuthenticatedUserSid, { SECURITY_NT_AUTHORITY }, SECURITY_AUTHENTICATED_USER_RID }, + { &AnonymousLogonSid, { SECURITY_NT_AUTHORITY }, SECURITY_ANONYMOUS_LOGON_RID }, +}; + +DOMAIN_SID_DATA DomainSidData[8] = +{ + { &AliasAdminsSid, DOMAIN_ALIAS_RID_ADMINS }, + { &AliasUsersSid, DOMAIN_ALIAS_RID_USERS }, + { &AliasGuestsSid, DOMAIN_ALIAS_RID_GUESTS }, + { &AliasPowerUsersSid, DOMAIN_ALIAS_RID_POWER_USERS }, + { &AliasAccountOpsSid, DOMAIN_ALIAS_RID_ACCOUNT_OPS }, + { &AliasSystemOpsSid, DOMAIN_ALIAS_RID_SYSTEM_OPS }, + { &AliasPrintOpsSid, DOMAIN_ALIAS_RID_PRINT_OPS }, + { &AliasBackupOpsSid, DOMAIN_ALIAS_RID_BACKUP_OPS }, +}; + +PSVCHOST_GLOBALS g_pSvchostSharedGlobals; +DWORD g_SvchostInitFlag; +HANDLE g_hHeap; + +/* FUNCTIONS *****************************************************************/ + +VOID +WINAPI +MemInit ( + _In_ HANDLE Heap + ) +{ + /* Save the heap handle */ + g_hHeap = Heap; +} + +BOOL +WINAPI +MemFree ( + _In_ LPVOID lpMem + ) +{ + /* Free memory back into the heap */ + return HeapFree(g_hHeap, 0, lpMem); +} + +PVOID +WINAPI +MemAlloc ( + _In_ DWORD dwFlags, + _In_ DWORD dwBytes + ) +{ + /* Allocate memory from the heap */ + return HeapAlloc(g_hHeap, dwFlags, dwBytes); +} + +VOID +WINAPI +SvchostBuildSharedGlobals ( + VOID + ) +{ + ASSERT(g_pSvchostSharedGlobals == NULL); + + /* Is RPC initialized? */ + if (!(g_SvchostInitFlag & SVCHOST_RPC_INIT_COMPLETE)) + { + /* Nope, go initialize it */ + if (!NT_SUCCESS(RpcpInitRpcServer())) return; + + /* This is now done */ + g_SvchostInitFlag |= SVCHOST_RPC_INIT_COMPLETE; + } + + /* Is NetBIOS initialized? */ + if (!(g_SvchostInitFlag & SVCHOST_NBT_INIT_COMPLETE)) + { + /* Nope, set it up */ + SvcNetBiosInit(); + + /* This is now done */ + g_SvchostInitFlag |= SVCHOST_NBT_INIT_COMPLETE; + } + + /* Do we have the global SIDs initialized? */ + if (!(g_SvchostInitFlag & SVCHOST_SID_INIT_COMPLETE)) + { + /* Create the SIDs we'll export in the global structure */ + if (!NT_SUCCESS(ScCreateWellKnownSids())) return; + + /* This is now done */ + g_SvchostInitFlag |= SVCHOST_SID_INIT_COMPLETE; + } + + /* Allocate memory for the globals */ + g_pSvchostSharedGlobals = MemAlloc(HEAP_ZERO_MEMORY, + sizeof(*g_pSvchostSharedGlobals)); + if (g_pSvchostSharedGlobals == NULL) return; + + /* Write the pointers to the SIDs */ + g_pSvchostSharedGlobals->NullSid = NullSid; + g_pSvchostSharedGlobals->WorldSid = WorldSid; + g_pSvchostSharedGlobals->LocalSid = LocalSid; + g_pSvchostSharedGlobals->NetworkSid = NetworkSid; + g_pSvchostSharedGlobals->LocalSystemSid = LocalSystemSid; + g_pSvchostSharedGlobals->LocalServiceSid = LocalServiceSid; + g_pSvchostSharedGlobals->NetworkServiceSid = NetworkServiceSid; + g_pSvchostSharedGlobals->BuiltinDomainSid = BuiltinDomainSid; + g_pSvchostSharedGlobals->AuthenticatedUserSid = AuthenticatedUserSid; + g_pSvchostSharedGlobals->AnonymousLogonSid = AnonymousLogonSid; + g_pSvchostSharedGlobals->AliasAdminsSid = AliasAdminsSid; + g_pSvchostSharedGlobals->AliasUsersSid = AliasUsersSid; + g_pSvchostSharedGlobals->AliasGuestsSid = AliasGuestsSid; + g_pSvchostSharedGlobals->AliasPowerUsersSid = AliasPowerUsersSid; + g_pSvchostSharedGlobals->AliasAccountOpsSid = AliasAccountOpsSid; + g_pSvchostSharedGlobals->AliasSystemOpsSid = AliasSystemOpsSid; + g_pSvchostSharedGlobals->AliasPrintOpsSid = AliasPrintOpsSid; + g_pSvchostSharedGlobals->AliasBackupOpsSid = AliasBackupOpsSid; + + /* Write the pointers to the callbacks */ + g_pSvchostSharedGlobals->RpcpStartRpcServer = RpcpStartRpcServer; + g_pSvchostSharedGlobals->RpcpStopRpcServer = RpcpStopRpcServer; + g_pSvchostSharedGlobals->RpcpStopRpcServerEx = RpcpStopRpcServerEx; + g_pSvchostSharedGlobals->SvcNetBiosOpen = SvcNetBiosOpen; + g_pSvchostSharedGlobals->SvcNetBiosClose = SvcNetBiosClose; + g_pSvchostSharedGlobals->SvcNetBiosReset = SvcNetBiosReset; + g_pSvchostSharedGlobals->SvcRegisterStopCallback = SvcRegisterStopCallback; +} + +VOID +WINAPI +SvchostCharLowerW ( + _In_ LPCWSTR lpSrcStr + ) +{ + DWORD cchSrc; + + /* If there's nothing to do, bail out */ + if (lpSrcStr == NULL) return; + + /* Get the length of the input string */ + cchSrc = wcslen(lpSrcStr); + + /* Call the locale API to lower-case it */ + if (LCMapStringW(LANG_USER_DEFAULT, + LCMAP_LOWERCASE, + lpSrcStr, + cchSrc + 1, + (LPWSTR)lpSrcStr, + cchSrc + 1) == FALSE) + { + DBG_ERR("SvchostCharLowerW failed for %ws\n", lpSrcStr); + } +} + +NTSTATUS +NTAPI +ScDomainIdToSid ( + _In_ PSID SourceSid, + _In_ ULONG DomainId, + _Out_ PSID *DestinationSid + ) +{ + ULONG sidCount, sidLength; + NTSTATUS status; + + /* Get the length of the SID based onthe number of subauthorities */ + sidCount = *RtlSubAuthorityCountSid(SourceSid); + sidLength = RtlLengthRequiredSid(sidCount + 1); + + /* Allocate it */ + *DestinationSid = RtlAllocateHeap(RtlGetProcessHeap(), 0, sidLength); + if (*DestinationSid) + { + /* Make a copy of it */ + status = RtlCopySid(sidLength, *DestinationSid, SourceSid); + if (NT_SUCCESS(status)) + { + /* Increase the subauthority count */ + ++*RtlSubAuthorityCountSid(*DestinationSid); + + /* And add the specific domain RID we're creating */ + *RtlSubAuthoritySid(*DestinationSid, sidCount) = DomainId; + + /* Everything worked */ + status = STATUS_SUCCESS; + } + else + { + /* The SID copy failed, so free the SID we just allocated */ + RtlFreeHeap(RtlGetProcessHeap(), 0, *DestinationSid); + } + } + else + { + /* No space for the SID, bail out */ + status = STATUS_NO_MEMORY; + } + + /* Return back to the caller */ + return status; +} + +NTSTATUS +NTAPI +ScAllocateAndInitializeSid ( + _Out_ PVOID *Sid, + _In_ PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, + _In_ ULONG SubAuthorityCount + ) +{ + NTSTATUS Status; + + /* Allocate room for the SID */ + *Sid = RtlAllocateHeap(RtlGetProcessHeap(), + 0, + RtlLengthRequiredSid(SubAuthorityCount)); + if (*Sid) + { + /* Initialize it, we're done */ + RtlInitializeSid(*Sid, IdentifierAuthority, SubAuthorityCount); + Status = STATUS_SUCCESS; + } + else + { + /* No memory, we'll fail */ + Status = STATUS_NO_MEMORY; + } + + /* Return what happened */ + return Status; +} + +NTSTATUS +NTAPI +ScCreateWellKnownSids ( + VOID + ) +{ + ULONG i; + NTSTATUS Status; + + /* Loop the non-domain SIDs */ + for (i = 0; i < RTL_NUMBER_OF(SidData); i++) + { + /* Convert our optimized structure into an actual SID */ + Status = ScAllocateAndInitializeSid(&SidData[i].Sid, + &SidData[i].Authority, + 1); + if (!NT_SUCCESS(Status)) break; + + /* Write the correct sub-authority */ + *RtlSubAuthoritySid(SidData[i].Sid, 0) = SidData[i].SubAuthority; + } + + /* Now loop the domain SIDs */ + for (i = 0; i < RTL_NUMBER_OF(DomainSidData); i++) + { + /* Convert our optimized structure into an actual SID */ + Status = ScDomainIdToSid(BuiltinDomainSid, + DomainSidData[i].SubAuthority, + &DomainSidData[i].Sid); + if (!NT_SUCCESS(Status)) break; + } + + /* If we got to the end, return success */ + return (i == RTL_NUMBER_OF(DomainSidData)) ? STATUS_SUCCESS : STATUS_NO_MEMORY; +} + diff --git a/base/services/svchost/netbios.c b/base/services/svchost/netbios.c new file mode 100644 index 00000000000..ba52b0e7d7b --- /dev/null +++ b/base/services/svchost/netbios.c @@ -0,0 +1,158 @@ +/* + * PROJECT: ReactOS Service Host + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: base/services/svchost/netbios.c + * PURPOSE: NetBIOS Service Support + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES ******************************************************************/ + +#include "svchost.h" + +/* GLOBALS *******************************************************************/ + +LONG GlobalNetBiosUseCount; +DWORD LanaFlags[8]; +CRITICAL_SECTION SvcNetBiosCritSec; + +/* FUNCTIONS *****************************************************************/ + +DWORD +WINAPI +SvcNetBiosStatusToApiStatus ( + _In_ DWORD NetBiosError + ) +{ + /* Convert from one status to another */ + switch (NetBiosError) + { + case NRC_GOODRET: + return NERR_Success; + case NRC_INUSE: + case NRC_NAMCONF: + return NERR_DuplicateName; + case NRC_NOWILD: + case NRC_NAMERR: + return ERROR_INVALID_PARAMETER; + case NRC_NOCALL: + return NERR_NameNotFound; + case NRC_NORES: + return NERR_NoNetworkResource; + case NRC_DUPNAME: + return NERR_AlreadyExists; + case NRC_NAMTFUL: + return NERR_TooManyNames; + case NRC_ACTSES: + return NERR_DeleteLater; + case NRC_REMTFUL: + return ERROR_REM_NOT_LIST; + default: + return NERR_NetworkError; + } +} + +BOOL +WINAPI +LanaFlagIsSet ( + _In_ UCHAR Lana + ) +{ + DWORD i = Lana / 32; + + /* Clear the flag for this LANA */ + return (i <= 8) ? LanaFlags[i] & (1 << (Lana - 32 * i)) : FALSE; +} + +VOID +WINAPI +SetLanaFlag ( + _In_ UCHAR Lana + ) +{ + DWORD i = Lana / 32; + + /* Set the flag for this LANA */ + if (i <= 8) LanaFlags[i] |= 1 << (Lana - 32 * i); +} + +VOID +WINAPI +SvcNetBiosInit( + VOID + ) +{ + /* Initialize NetBIOS-related structures and variables */ + InitializeCriticalSection(&SvcNetBiosCritSec); + GlobalNetBiosUseCount = 0; + ZeroMemory(LanaFlags, sizeof(LanaFlags)); +} + +VOID +WINAPI +SvcNetBiosClose ( + VOID + ) +{ + /* While holding the lock, drop a reference*/ + EnterCriticalSection(&SvcNetBiosCritSec); + if ((GlobalNetBiosUseCount != 0) && (--GlobalNetBiosUseCount == 0)) + { + /* All references are gone, clear all LANA's */ + ZeroMemory(LanaFlags, sizeof(LanaFlags)); + } + LeaveCriticalSection(&SvcNetBiosCritSec); +} + +VOID +WINAPI +SvcNetBiosOpen ( + VOID + ) +{ + /* Increment the reference counter while holding the lock */ + EnterCriticalSection(&SvcNetBiosCritSec); + GlobalNetBiosUseCount++; + LeaveCriticalSection(&SvcNetBiosCritSec); +} + +DWORD +WINAPI +SvcNetBiosReset ( + _In_ UCHAR LanaNum + ) +{ + DWORD dwError = ERROR_SUCCESS; + UCHAR nbtError; + NCB ncb; + + /* Block all other NetBIOS operations */ + EnterCriticalSection(&SvcNetBiosCritSec); + + /* Is this LANA enabled? */ + if (!LanaFlagIsSet(LanaNum)) + { + /* Yep, build a reset packet */ + ZeroMemory(&ncb, sizeof(ncb)); + ncb.ncb_lsn = 0; + ncb.ncb_command = NCBRESET; + ncb.ncb_callname[0] = 0xFE; // Max Sessions + ncb.ncb_callname[1] = 0; + ncb.ncb_callname[2] = 0xFD; // Max Names + ncb.ncb_callname[3] = 0; + ncb.ncb_lana_num = LanaNum; + + /* Send it */ + nbtError = Netbios(&ncb); + + /* Convert the status to Win32 format */ + dwError = SvcNetBiosStatusToApiStatus(nbtError); + + /* Enable the LANA if the reset worked */ + if (dwError == ERROR_SUCCESS) SetLanaFlag(LanaNum); + } + + /* Drop the lock and return */ + LeaveCriticalSection(&SvcNetBiosCritSec); + return dwError; +} diff --git a/base/services/svchost/registry.c b/base/services/svchost/registry.c new file mode 100644 index 00000000000..b6260e15c2b --- /dev/null +++ b/base/services/svchost/registry.c @@ -0,0 +1,201 @@ +/* + * PROJECT: ReactOS Service Host + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: base/services/svchost/registry.c + * PURPOSE: Helper functions for accessing the registry + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES ******************************************************************/ + +#include "svchost.h" + +/* FUNCTIONS *****************************************************************/ + +DWORD +WINAPI +RegQueryValueWithAlloc ( + _In_ HKEY hKey, + _In_ LPCWSTR pszValueName, + _In_ DWORD dwExpectedType, + _Out_ PBYTE* ppbData, + _Out_ PDWORD pdwSize + ) +{ + DWORD dwError, dwType, dwBytes; + PBYTE pbData; + ASSERT(hKey); + ASSERT(pszValueName); + ASSERT(ppbData); + ASSERT(pdwSize); + + /* Assume failure */ + *ppbData = NULL; + *pdwSize = 0; + + /* Query how big and what type the registry data is */ + dwBytes = 0; + dwError = RegQueryValueExW(hKey, + pszValueName, + NULL, + &dwType, + NULL, + &dwBytes); + if (dwError != ERROR_SUCCESS) return dwError; + + /* It if's not the right type, or it's sero bytes, fail*/ + if ((dwType != dwExpectedType) || (dwBytes == 0)) return ERROR_INVALID_DATA; + + /* Allocate space to hold the data */ + pbData = MemAlloc(0, dwBytes); + if (pbData == NULL) return ERROR_OUTOFMEMORY; + + /* Now get the real registry data */ + dwError = RegQueryValueExW(hKey, + pszValueName, + NULL, + &dwType, + pbData, + &dwBytes); + if (dwError != ERROR_SUCCESS) + { + /* We failed, free the data since it won't be needed */ + MemFree(pbData); + } + else + { + /* It worked, return the data and size back to the caller */ + *ppbData = pbData; + *pdwSize = dwBytes; + } + + /* All done */ + return dwError; +} + +DWORD +WINAPI +RegQueryDword ( + _In_ HKEY hKey, + _In_ LPCWSTR pszValueName, + _Out_ PDWORD pdwValue + ) +{ + DWORD dwError, cbData, dwType; + ASSERT(hKey); + ASSERT(pszValueName); + ASSERT(pdwValue); + + /* Attempt to read 4 bytes */ + cbData = sizeof(DWORD); + dwError = RegQueryValueExW(hKey, pszValueName, 0, &dwType, 0, &cbData); + + /* If we didn't get back a DWORD... */ + if ((dwError == ERROR_SUCCESS) && (dwType != REG_DWORD)) + { + /* Zero out the output and fail */ + *pdwValue = 0; + dwError = ERROR_INVALID_DATATYPE; + } + + /* All done! */ + return dwError; +} + +DWORD +WINAPI +RegQueryString ( + _In_ HKEY hKey, + _In_ LPCWSTR pszValueName, + _In_ DWORD dwExpectedType, + _Out_ PBYTE* ppbData + ) +{ + DWORD dwSize; + ASSERT(hKey); + ASSERT(pszValueName); + + /* Call the helper function */ + return RegQueryValueWithAlloc(hKey, + pszValueName, + dwExpectedType, + ppbData, + &dwSize); +} + +DWORD +WINAPI +RegQueryStringA ( + _In_ HKEY hKey, + _In_ LPCWSTR pszValueName, + _In_ DWORD dwExpectedType, + _Out_ LPCSTR* ppszData + ) +{ + DWORD dwError; + LPWSTR pbLocalData; + DWORD cchValueName, cbMultiByte; + LPSTR pszData; + ASSERT(hKey); + ASSERT(pszValueName); + ASSERT(ppszData); + + /* Assume failure */ + *ppszData = NULL; + + /* Query the string in Unicode first */ + dwError = RegQueryString(hKey, + pszValueName, + dwExpectedType, + (PBYTE*)&pbLocalData); + if (dwError != ERROR_SUCCESS) return dwError; + + /* Get the length of the Unicode string */ + cchValueName = lstrlenW(pbLocalData); + + /* See how much space it would take to convert to ANSI */ + cbMultiByte = WideCharToMultiByte(CP_ACP, + 0, + pbLocalData, + cchValueName + 1, + NULL, + 0, + NULL, + NULL); + if (cbMultiByte != 0) + { + /* Allocate the space, assuming failure */ + dwError = ERROR_OUTOFMEMORY; + pszData = MemAlloc(0, cbMultiByte); + if (pszData != NULL) + { + /* What do you know, it worked! */ + dwError = ERROR_SUCCESS; + + /* Now do the real conversion */ + if (WideCharToMultiByte(CP_ACP, + 0, + pbLocalData, + cchValueName + 1, + pszData, + cbMultiByte, + NULL, + NULL) != 0) + { + /* It worked, return the data back to the caller */ + *ppszData = pszData; + } + else + { + /* It failed, free our buffer and get the error code */ + MemFree(pszData); + dwError = GetLastError(); + } + } + } + + /* Free the original Unicode string and return the error */ + MemFree(pbLocalData); + return dwError; +} + diff --git a/base/services/svchost/rpcsrv.c b/base/services/svchost/rpcsrv.c new file mode 100644 index 00000000000..ce422e12292 --- /dev/null +++ b/base/services/svchost/rpcsrv.c @@ -0,0 +1,156 @@ +/* + * PROJECT: ReactOS Service Host + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: base/services/svchost/rpcsrv.c + * PURPOSE: RPC Service Support + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES ******************************************************************/ + +#include "svchost.h" + +/* GLOBALS *******************************************************************/ + +LONG RpcpNumInstances; +CRITICAL_SECTION RpcpCriticalSection; + +/* FUNCTIONS *****************************************************************/ + +NTSTATUS +NTAPI +RpcpInitRpcServer ( + VOID + ) +{ + /* Clear the reference count and initialize the critical section */ + RpcpNumInstances = 0; + return RtlInitializeCriticalSection((PVOID)&RpcpCriticalSection); +} + +NTSTATUS +NTAPI +RpcpStopRpcServer ( + _In_ RPC_IF_HANDLE IfSpec + ) +{ + RPC_STATUS rpcStatus; + + /* Unregister the interface */ + rpcStatus = RpcServerUnregisterIf(IfSpec, NULL, TRUE); + + /* Acquire the lock while we dereference the RPC services */ + EnterCriticalSection(&RpcpCriticalSection); + if (--RpcpNumInstances == 0) + { + /* All RPC services stopped, rundown the server */ + RpcMgmtStopServerListening(NULL); + RpcMgmtWaitServerListen(); + } + + /* Release the lock and return the unregister result */ + LeaveCriticalSection(&RpcpCriticalSection); + return I_RpcMapWin32Status(rpcStatus); +} + +NTSTATUS +NTAPI +RpcpStopRpcServerEx ( + _In_ RPC_IF_HANDLE IfSpec + ) +{ + RPC_STATUS rpcStatus; + + /* Unregister the interface */ + rpcStatus = RpcServerUnregisterIfEx(IfSpec, NULL, TRUE); + + /* Acquire the lock while we dereference the RPC services */ + EnterCriticalSection(&RpcpCriticalSection); + if (--RpcpNumInstances == 0) + { + /* All RPC services stopped, rundown the server */ + RpcMgmtStopServerListening(NULL); + RpcMgmtWaitServerListen(); + } + + /* Release the lock and return the unregister result */ + LeaveCriticalSection(&RpcpCriticalSection); + return I_RpcMapWin32Status(rpcStatus); +} + +NTSTATUS +NTAPI +RpcpAddInterface ( + _In_ LPCWSTR IfName, + _In_ RPC_IF_HANDLE IfSpec + ) +{ + PWCHAR endpointName; + NTSTATUS ntStatus; + RPC_STATUS rpcStatus; + + /* Allocate space for the interface name and the \\PIPE\\ prefix */ + endpointName = LocalAlloc(0, sizeof(WCHAR) * wcslen(IfName) + 16); + if (endpointName) + { + /* Copy the prefix, and then the interface name */ + wcscpy(endpointName, L"\\PIPE\\"); + wcscat(endpointName, IfName); + + /* Create a named pipe endpoint with this name */ + rpcStatus = RpcServerUseProtseqEpW(L"ncacn_np", 10, endpointName, NULL); + if ((rpcStatus != RPC_S_OK) && (rpcStatus != RPC_S_DUPLICATE_ENDPOINT)) + { + /* We couldn't create it, or it already existed... */ + DbgPrint("RpcServerUseProtseqW failed! rpcstatus = %u\n", rpcStatus); + } + else + { + /* It worked, register an interface on this endpoint now*/ + rpcStatus = RpcServerRegisterIf(IfSpec, 0, 0); + } + + /* In both success and failure, free the name, and convert the status */ + LocalFree(endpointName); + ntStatus = I_RpcMapWin32Status(rpcStatus); + } + else + { + /* No memory, bail out */ + ntStatus = STATUS_NO_MEMORY; + } + + /* Return back to the caller */ + return ntStatus; +} + +NTSTATUS +NTAPI +RpcpStartRpcServer ( + _In_ LPCWSTR IfName, + _In_ RPC_IF_HANDLE IfSpec + ) +{ + NTSTATUS ntStatus; + + /* Acquire the lock while we instantiate a new interface */ + EnterCriticalSection(&RpcpCriticalSection); + + /* Add this interface to the service */ + ntStatus = RpcpAddInterface(IfName, IfSpec); + if (!ntStatus) + { + /* Increment the reference count to see if this was the first interface */ + if (++RpcpNumInstances == 1) + { + /* It was, so put the server into listening mode now */ + ntStatus = RpcServerListen(1, 12345, TRUE); + if (ntStatus == RPC_S_ALREADY_LISTENING) ntStatus = STATUS_SUCCESS; + } + } + + /* Release the lock and return back the result to the caller */ + LeaveCriticalSection(&RpcpCriticalSection); + return I_RpcMapWin32Status(ntStatus); +} + diff --git a/base/services/svchost/security.cxx b/base/services/svchost/security.cxx new file mode 100644 index 00000000000..8d4a22ec04a --- /dev/null +++ b/base/services/svchost/security.cxx @@ -0,0 +1,226 @@ +/* + * PROJECT: ReactOS Service Host + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: base/services/svchost/security.c + * PURPOSE: Initializes the COM Object Security Model and Parameters + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +/* INCLUDES ******************************************************************/ + +extern "C" +{ +#include "svchost.h" +} + +/* GLOBALS *******************************************************************/ + +SID NtSid = { SID_REVISION, 1, { SECURITY_NT_AUTHORITY }, { SECURITY_LOCAL_SYSTEM_RID } }; + +/* FUNCTIONS *****************************************************************/ + +DWORD +WINAPI +DwInitializeSdFromThreadToken ( + _Out_ PVOID *ppSecurityDescriptor, + _Out_ PACL *ppAcl + ) +{ + HANDLE hToken; + DWORD dwGroupLength, dwUserLength, dwError, dwAlignLength; + PTOKEN_PRIMARY_GROUP pTokenGroup; + PTOKEN_USER pTokenUser; + EXPLICIT_ACCESS_W pListOfExplicitEntries; + PACL pAcl = NULL; + PISECURITY_DESCRIPTOR pSd; + + /* Assume failure */ + *ppSecurityDescriptor = NULL; + *ppAcl = NULL; + + /* Open the token of the current thread */ + if (OpenThreadToken(GetCurrentThread(), TOKEN_QUERY, 0, &hToken) == FALSE) + { + /* The thread is not impersonating, use the process token */ + if (OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken) == FALSE) + { + /* No token could be queried, fail */ + return GetLastError(); + } + } + + /* Get the size of the token's user */ + if ((GetTokenInformation(hToken, TokenUser, NULL, 0, &dwUserLength) == FALSE) || + (GetLastError() != ERROR_INSUFFICIENT_BUFFER)) + { + return GetLastError(); + } + + /* Get the size of the token's primary group */ + if ((GetTokenInformation(hToken, TokenPrimaryGroup, NULL, 0, &dwGroupLength) == FALSE) || + (GetLastError() != ERROR_INSUFFICIENT_BUFFER)) + { + return GetLastError(); + } + + /* Allocate an SD large enough to hold the SIDs for the above */ + dwAlignLength = ALIGN_UP(dwUserLength, ULONG); + pSd = (PISECURITY_DESCRIPTOR)MemAlloc(0, + dwAlignLength + + dwGroupLength + + sizeof(*pSd)); + if (pSd == NULL) return ERROR_OUTOFMEMORY; + + /* Assume success for now */ + dwError = ERROR_SUCCESS; + + /* We'll put them right after the SD itself */ + pTokenUser = (PTOKEN_USER)(pSd + 1); + pTokenGroup = (PTOKEN_PRIMARY_GROUP)((ULONG_PTR)pTokenUser + dwAlignLength); + + /* Now initialize it */ + if (InitializeSecurityDescriptor(pSd, SECURITY_DESCRIPTOR_REVISION) == FALSE) + { + dwError = GetLastError(); + } + + /* And do the actual query for the user */ + if (GetTokenInformation(hToken, + TokenUser, + pTokenUser, + dwUserLength, + &dwUserLength) == FALSE) + { + dwError = GetLastError(); + } + + /* And then the actual query for the primary group */ + if (GetTokenInformation(hToken, + TokenPrimaryGroup, + pTokenGroup, + dwGroupLength, + &dwGroupLength) == FALSE) + { + dwError = GetLastError(); + } + + /* Set the user as owner */ + if (SetSecurityDescriptorOwner(pSd, pTokenUser->User.Sid, FALSE) == FALSE) + { + dwError = GetLastError(); + } + + /* Set the group as primary */ + if (SetSecurityDescriptorGroup(pSd, pTokenGroup->PrimaryGroup, FALSE) == FALSE) + { + dwError = GetLastError(); + } + + /* Did everything so far work out? */ + if (dwError == ERROR_SUCCESS) + { + /* Yes, create an ACL granting the SYSTEM account access */ + pListOfExplicitEntries.grfAccessMode = SET_ACCESS; + pListOfExplicitEntries.Trustee.TrusteeType = TRUSTEE_IS_GROUP; + pListOfExplicitEntries.grfAccessPermissions = 1; + pListOfExplicitEntries.grfInheritance = 0; + pListOfExplicitEntries.Trustee.pMultipleTrustee = 0; + pListOfExplicitEntries.Trustee.MultipleTrusteeOperation = NO_MULTIPLE_TRUSTEE; + pListOfExplicitEntries.Trustee.TrusteeForm = TRUSTEE_IS_SID; + pListOfExplicitEntries.Trustee.ptstrName = (LPWSTR)&NtSid; + dwError = SetEntriesInAclW(1, &pListOfExplicitEntries, NULL, &pAcl); + if (dwError == ERROR_SUCCESS) + { + /* Make that ACL the DACL of the SD we just built */ + if (SetSecurityDescriptorDacl(pSd, 1, pAcl, FALSE) == FALSE) + { + /* We failed, bail out */ + LocalFree(pAcl); + dwError = GetLastError(); + } + else + { + /* Now we have the SD and the ACL all ready to go */ + *ppSecurityDescriptor = pSd; + *ppAcl = pAcl; + return ERROR_SUCCESS; + } + } + } + + /* Failure path, we'll free the SD since the caller can't use it */ + MemFree(pSd); + return dwError; +} + +BOOL +WINAPI +InitializeSecurity ( + _In_ DWORD dwParam, + _In_ DWORD dwAuthnLevel, + _In_ DWORD dwImpLevel, + _In_ DWORD dwCapabilities + ) +{ + HRESULT hr; + PACL pAcl; + PSECURITY_DESCRIPTOR pSecurityDescriptor; + IGlobalOptions *pGlobalOptions; + ASSERT(dwParam != 0); + + /* Create a valid SD and ACL based on the current thread's token */ + if (DwInitializeSdFromThreadToken(&pSecurityDescriptor, &pAcl) == ERROR_SUCCESS) + { + /* It worked -- initialize COM without DDE support */ + hr = CoInitializeEx(NULL, COINIT_DISABLE_OLE1DDE); + } + else + { + /* Don't keep going if we don't have an SD */ + hr = E_FAIL; + } + + /* Did we make it? */ + if (SUCCEEDED(hr)) + { + /* Indeed, initialize COM security now */ + DBG_TRACE("Calling CoInitializeSecurity (dwAuthCapabilities = 0x%08x)\n", + dwCapabilities); + hr = CoInitializeSecurity(pSecurityDescriptor, + -1, + NULL, + NULL, + dwAuthnLevel, + dwImpLevel, + NULL, + dwCapabilities, + NULL); + if (FAILED(hr)) DBG_ERR("CoInitializeSecurity returned hr=0x%08x\n", hr); + } + + /* Free the SD and ACL since we no longer need it */ + MemFree(pSecurityDescriptor); + LocalFree(pAcl); + + /* Did we initialize COM correctly? */ + if (SUCCEEDED(hr)) + { + /* Get the COM Global Options Interface */ + hr = CoCreateInstance(CLSID_GlobalOptions, + NULL, + CLSCTX_INPROC_SERVER, + IID_IGlobalOptions, + (LPVOID*)&pGlobalOptions); + if (SUCCEEDED(hr)) + { + /* Use it to disable COM exception handling */ + hr = pGlobalOptions->Set(COMGLB_EXCEPTION_HANDLING, + COMGLB_EXCEPTION_DONOT_HANDLE); + pGlobalOptions->Release(); + ASSERT(SUCCEEDED(hr)); + } + } + + /* Return whether all COM calls were successful or not */ + return SUCCEEDED(hr); +} diff --git a/base/services/svchost/svchost.c b/base/services/svchost/svchost.c index a04346962cd..e114cd4de16 100644 --- a/base/services/svchost/svchost.c +++ b/base/services/svchost/svchost.c @@ -1,305 +1,1298 @@ /* - * PROJECT: ReactOS SvcHost - * LICENSE: GPL - See COPYING in the top level directory - * FILE: /base/services/svchost/svchost.c - * PURPOSE: Provide dll service loader - * PROGRAMMERS: Gregor Brunmar (gregor.brunmar@home.se) + * PROJECT: ReactOS Service Host + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: base/services/svchost/svchost.c + * PURPOSE: Main Service Host Implementation Routines + * PROGRAMMERS: ReactOS Portable Systems Group */ /* INCLUDES ******************************************************************/ #include "svchost.h" -#define NDEBUG -#include +/* GLOBALS *******************************************************************/ -/* DEFINES *******************************************************************/ - -static PCWSTR SVCHOST_REG_KEY = L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SvcHost"; -static PCWSTR SERVICE_KEY = L"SYSTEM\\CurrentControlSet\\Services\\"; -static PCWSTR PARAMETERS_KEY = L"\\Parameters"; - -#define REG_MAX_DATA_SIZE 2048 - -static PSERVICE FirstService = NULL; +LIST_ENTRY DllList; +CRITICAL_SECTION ListLock; +DWORD ServiceCount; +LPCWSTR ServiceNames; +PSVCHOST_SERVICE ServiceArray; /* FUNCTIONS *****************************************************************/ -BOOL PrepareService(PCWSTR ServiceName) +__callback +LONG +WINAPI +SvchostUnhandledExceptionFilter ( + _In_ struct _EXCEPTION_POINTERS * ExceptionInfo + ) { - HKEY hServiceKey; - WCHAR ServiceKeyBuffer[512]; - HRESULT Result; - DWORD ValueType; - PWSTR Buffer; - DWORD BufferSize; - LONG RetVal; - HINSTANCE hServiceDll; - PWSTR DllPath; - DWORD DllPathSize; - LPSERVICE_MAIN_FUNCTION ServiceMainFunc; - PSERVICE Service; - DWORD ServiceNameSize; + /* Call the default OS handler */ + return RtlUnhandledExceptionFilter(ExceptionInfo); +} - /* Compose the registry path to the service's "Parameter" key */ - Result = StringCbCopy(ServiceKeyBuffer, sizeof(ServiceKeyBuffer), SERVICE_KEY); - if (FAILED(Result)) - { - DPRINT1("Buffer overflow for service name: '%ls'\n", ServiceName); - return FALSE; - } - Result = StringCbCat(ServiceKeyBuffer, sizeof(ServiceKeyBuffer), ServiceName); - if (FAILED(Result)) - { - DPRINT1("Buffer overflow for service name: '%ls'\n", ServiceName); - return FALSE; - } - Result = StringCbCat(ServiceKeyBuffer, sizeof(ServiceKeyBuffer), PARAMETERS_KEY); - if (FAILED(Result)) - { - DPRINT1("Buffer overflow for service name: '%ls'\n", ServiceName); - return FALSE; - } +VOID +WINAPI +DummySvchostCtrlHandler ( + _In_ DWORD dwControl + ) +{ + /* This is just a stub while we abort loading */ + return; +} - /* Open the service registry key to find the dll name */ - RetVal = RegOpenKeyEx(HKEY_LOCAL_MACHINE, ServiceKeyBuffer, 0, KEY_READ, &hServiceKey); - if (RetVal != ERROR_SUCCESS) - { - DPRINT1("Could not open service key (%ls)\n", ServiceKeyBuffer); - return FALSE; - } +PSVCHOST_OPTIONS +WINAPI +BuildCommandOptions ( + _In_ LPWSTR pszCmdLine + ) +{ + ULONG cbCmdLine; + PSVCHOST_OPTIONS pOptions; + LPWSTR pch, pGroupNameStart, lpServiceGroup; + LPWSTR *pGroupName = NULL; - BufferSize = 0; - RetVal = RegQueryValueEx(hServiceKey, L"ServiceDll", NULL, &ValueType, NULL, &BufferSize); - if (RetVal != ERROR_SUCCESS) - { - RegCloseKey(hServiceKey); - return FALSE; - } + /* Nothing to do without a command-line */ + if (pszCmdLine == NULL) return ERROR_SUCCESS; - Buffer = HeapAlloc(GetProcessHeap(), 0, BufferSize); - if (Buffer == NULL) - { - DPRINT1("Not enough memory for service: %ls\n", ServiceName); - RegCloseKey(hServiceKey); - return FALSE; - } + /* Get the length if the command line*/ + cbCmdLine = sizeof(WCHAR) * lstrlenW(pszCmdLine) + sizeof(UNICODE_NULL); - RetVal = RegQueryValueEx(hServiceKey, L"ServiceDll", NULL, &ValueType, (LPBYTE)Buffer, &BufferSize); - if (RetVal != ERROR_SUCCESS || BufferSize == 0) - { - DPRINT1("Could not read 'ServiceDll' value from service: %ls, ErrorCode: 0x%lx\n", ServiceName, RetVal); - RegCloseKey(hServiceKey); - HeapFree(GetProcessHeap(), 0, Buffer); - return FALSE; - } - RegCloseKey(hServiceKey); + /* Allocate a buffer for the parsed options */ + pOptions = MemAlloc(HEAP_ZERO_MEMORY, cbCmdLine + sizeof(*pOptions)); + if (pOptions == NULL) return ERROR_SUCCESS; - if (ValueType == REG_EXPAND_SZ) + /* Copy the buffer into the parsed options block */ + pOptions->CmdLineBuffer = (PWCHAR)(pOptions + 1); + memcpy(pOptions->CmdLineBuffer, pszCmdLine, cbCmdLine); + + /* Set the command-line as being inside the block itself */ + pch = pOptions->CmdLineBuffer; + ASSERT(pch); + pOptions->CmdLine = pch; + + /* Now scan it */ + while (*pch != UNICODE_NULL) { - /* Convert possible %SystemRoot% to a real path */ - DllPathSize = ExpandEnvironmentStrings(Buffer, NULL, 0); - if (DllPathSize == 0) + /* And look for the first space or TAB */ + if ((*pch == ' ') || (*pch == '\t')) { - DPRINT1("Invalid ServiceDll path: %ls, ErrorCode: %lu\n", Buffer, GetLastError()); - HeapFree(GetProcessHeap(), 0, Buffer); - return FALSE; - } - DllPath = HeapAlloc(GetProcessHeap(), 0, DllPathSize * sizeof(WCHAR)); - if (DllPath == NULL) - { - DPRINT1("Not enough memory for service: %ls\n", ServiceName); - HeapFree(GetProcessHeap(), 0, Buffer); - return FALSE; - } - if (ExpandEnvironmentStrings(Buffer, DllPath, DllPathSize) != DllPathSize) - { - DPRINT1("Invalid ServiceDll path: %ls, ErrorCode: %lu\n", Buffer, GetLastError()); - HeapFree(GetProcessHeap(), 0, DllPath); - HeapFree(GetProcessHeap(), 0, Buffer); - return FALSE; + /* Terminate the command-line there */ + *pch++ = UNICODE_NULL; + break; } - HeapFree(GetProcessHeap(), 0, Buffer); + /* Keep searching */ + pch++; } - else if (ValueType == REG_SZ) + + /* Lowercase the entire command line, but not the options */ + SvchostCharLowerW(pOptions->CmdLine); + + /* Loop over the command-line */ + while (*pch != UNICODE_NULL) { - DllPath = Buffer; + /* Do an inner loop within it */ + while (*pch != UNICODE_NULL) + { + /* And keep going until we find a space or TAB */ + if ((*pch != ' ') && (*pch != '\t')) break; + pch++; + } + + /* Did we reach the end? If so, bail out */ + if (*pch == UNICODE_NULL) break; + + /* We found the space -- is it followed by a dash or slash? */ + if ((*pch == '-' || *pch == '/') && (*(pch + 1) != UNICODE_NULL)) + { + /* Yep, and there's at least one character. Is it k or K? */ + pch++; + if (*pch == 'k' || *pch == 'K') + { + /* Yep, we have a proper command line with a group! */ + pOptions->HasServiceGroup = TRUE; + pGroupName = &pOptions->ServiceGroupName; + } + + /* Keep going -- the name follows between spaces or quotes */ + pch++; + } + else + { + /* Nope, so this might be the group being entered */ + pGroupNameStart = pch; + + /* Check if there's a quote */ + if ((*pch == '"') && (*(pch + 1) != UNICODE_NULL)) + { + /* There is, keep going until the quote is over with */ + pGroupNameStart = ++pch; + while (*pch) if (*pch++ == '"') break; + } + else + { + /* No quote, so keep going until the next space or TAB */ + while ((*pch) && ((*pch != ' ') && (*pch != '\t'))) pch++; + } + + /* Now we have a space or quote deliminated name, terminate it */ + if (*pch) *pch++ = UNICODE_NULL; + + /* Ok, so we have a string -- was it preceeded by a -K or /K? */ + if (pGroupName) + { + /* Yes it was, remember this, and don't overwrite it later */ + *pGroupName = pGroupNameStart; + pGroupName = NULL; + } + } + } + + /* Print out the service group for the debugger, and the command line */ + DBG_TRACE("Command line : %ws\n", pszCmdLine); + lpServiceGroup = (pOptions->HasServiceGroup) ? + pOptions->ServiceGroupName : L"No"; + DBG_TRACE("Service Group : %ws\n", lpServiceGroup); + + /* Was a group specified? */ + if (pOptions->HasServiceGroup == FALSE) + { + /* This isn't valid. Print out help on the debugger and fail */ + DBG_TRACE("Generic Service Host\n\n" + "%ws [-k ] | [-r] | \n\n" + " -k Host all services whose ImagePath matches\n" + " %ws -k .\n\n", + lpServiceGroup); + MemFree(pOptions); + pOptions = NULL; + } + + /* Return the allocated option block, if valid*/ + return pOptions; +} + +DWORD +WINAPI +ReadPerInstanceRegistryParameters ( + _In_ HKEY hKey, + _In_ PSVCHOST_OPTIONS pOptions + ) +{ + DWORD dwError, dwData; + HKEY hSubKey; + + /* We should have a name for this service group... */ + ASSERT(pOptions->ServiceGroupName); + + /* Query the group to see what services are part of it */ + dwError = RegQueryString(hKey, + pOptions->ServiceGroupName, + REG_MULTI_SZ, + (PBYTE*)&ServiceNames); + if ((dwError == ERROR_SUCCESS) && + ((ServiceNames == NULL) || (*ServiceNames == UNICODE_NULL))) + { + /* If the key exists but there's no data, fail */ + return ERROR_INVALID_DATA; + } + + /* Open the key for this group */ + if (RegOpenKeyExW(hKey, + pOptions->ServiceGroupName, + 0, + KEY_READ, + &hSubKey) != ERROR_SUCCESS) + { + /* If we couldn't, bail out */ + return dwError; + } + + /* Check if we should initialize COM */ + if (RegQueryDword(hSubKey, + L"CoInitializeSecurityParam", + &dwData) == ERROR_SUCCESS) + { + /* Yes, remember the parameter to be sent when we do so */ + pOptions->CoInitializeSecurityParam = dwData; + } + + /* Also, if COM is requested, we must read a bunch more data... */ + if (pOptions->CoInitializeSecurityParam) + { + /* First, read the authentication level, use a default if none is set */ + if (RegQueryDword(hSubKey, L"AuthenticationLevel", &dwData)) + { + pOptions->AuthenticationLevel = RPC_C_AUTHN_LEVEL_PKT; + } + else + { + pOptions->AuthenticationLevel = dwData; + } + + /* Do the same for the impersonation level */ + if (RegQueryDword(hSubKey, L"ImpersonationLevel", &dwData)) + { + pOptions->ImpersonationLevel = RPC_C_IMP_LEVEL_IDENTIFY; + } + else + { + pOptions->ImpersonationLevel = dwData; + } + + /* Do the same for the authentication capabilities */ + if (RegQueryDword(hSubKey, L"AuthenticationCapabilities", &dwData)) + { + pOptions->AuthenticationCapabilities = EOAC_NO_CUSTOM_MARSHAL | + EOAC_DISABLE_AAA; + } + else + { + pOptions->AuthenticationCapabilities = dwData; + } + } + + /* Check if we need a specific RPC stack size, if not, we'll set it later */ + if (!RegQueryDword(hSubKey, L"DefaultRpcStackSize", &dwData)) + { + pOptions->DefaultRpcStackSize = dwData; + } + + /* Finally, check if the services should be marked critical later on */ + if (!RegQueryDword(hSubKey, L"SystemCritical", &dwData)) + { + pOptions->SystemCritical = dwData; + } + + /* All done reading the settings */ + RegCloseKey(hSubKey); + return dwError; +} + +VOID +WINAPI +BuildServiceArray ( + _In_ PSVCHOST_OPTIONS lpOptions + ) +{ + DWORD dwError; + PSVCHOST_SERVICE pService; + LPCWSTR pszServiceName; + HKEY hKey; + + /* Open the service host key */ + dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Svchost", + 0, + KEY_READ, + &hKey); + if (dwError != ERROR_SUCCESS) return; + + /* Read all the parameters for this service group */ + dwError = ReadPerInstanceRegistryParameters(hKey, lpOptions); + RegCloseKey(hKey); + if (dwError != ERROR_SUCCESS) return; + + /* Acquire the database lock while we create the service group */ + EnterCriticalSection(&ListLock); + + /* Loop the array of services for this group */ + pszServiceName = ServiceNames; + while (*pszServiceName != UNICODE_NULL) + { + /* For each one, increment the amount of services we'llhost */ + ServiceCount++; + pszServiceName += lstrlenW(pszServiceName) + 1; + } + + /* We should host at least one... */ + ASSERT(ServiceCount); + + /* Now allocate an array to hold all their pointers */ + ServiceArray = MemAlloc(HEAP_ZERO_MEMORY, sizeof(*pService) * ServiceCount); + if (ServiceArray) + { + /* Start at the beginning of the array */ + pService = ServiceArray; + + /* Loop through all the services */ + pszServiceName = ServiceNames; + while (*pszServiceName != UNICODE_NULL) + { + /* Save the service's name and move to the next entry */ + pService++->pszServiceName = pszServiceName; + pszServiceName += lstrlenW(pszServiceName) + 1; + } + + /* We should have gotten the same count as earlier! */ + ASSERT(pService == ServiceArray + ServiceCount); + } + + /* We're done, drop the lock */ + LeaveCriticalSection(&ListLock); +} + +BOOL +WINAPI +FDebugBreakForService ( + _In_ LPCWSTR ServiceName + ) +{ + DWORD Data; + BOOL DebugBreakOn = FALSE; + HKEY hKey, hSubKey; + + /* Open the key for Svchost itself */ + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, + L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Svchost", + 0, + KEY_READ, + &hKey) == ERROR_SUCCESS) + { + /* That worked, now open the key for this service, if it exists */ + if (RegOpenKeyExW(hKey, ServiceName, 0, KEY_READ, &hSubKey) == ERROR_SUCCESS) + { + /* It does -- is there a DebugBreak value set? */ + if (RegQueryDword(hSubKey, L"DebugBreak", &Data) == ERROR_SUCCESS) + { + /* There is! Check if it's 0 or 1 */ + DebugBreakOn = Data != 0; + } + + /* Done, close the service key */ + RegCloseKey(hSubKey); + } + + /* Done, close the svchost key */ + RegCloseKey(hKey); + } + + /* Return if the value was set or not */ + return DebugBreakOn; +} + +DWORD +WINAPI +OpenServiceParametersKey ( + _In_ LPCWSTR lpSubKey, + _Out_ PHKEY phKey + ) +{ + DWORD dwError; + HKEY hSubKey = NULL, hKey = NULL; + ASSERT(phKey); + + /* Open the services key */ + dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + L"System\\CurrentControlSet\\Services", + 0, + KEY_READ, + &hKey); + if (dwError == ERROR_SUCCESS) + { + /* Now open the service specific key, returning its handle */ + dwError = RegOpenKeyExW(hKey, lpSubKey, 0, KEY_READ, &hSubKey); + if (dwError == ERROR_SUCCESS) + { + /* And if that worked, return a handle to the parameters key */ + dwError = RegOpenKeyExW(hSubKey, + L"Parameters", + 0, + KEY_READ, + phKey); + } + } + + /* Clean up any leftovers*/ + if (hKey != NULL) RegCloseKey(hKey); + if (hSubKey != NULL) RegCloseKey(hSubKey); + return dwError; +} + +VOID +WINAPI +UnloadServiceDll ( + _In_ PSVCHOST_SERVICE pService + ) +{ + DWORD cbData; + DWORD Data; + DWORD dwType; + HKEY hKey = NULL; + + cbData = 4; + Data = 0; + + /* Grab the lock while we touch the thread count and potentially unload */ + EnterCriticalSection(&ListLock); + + /* There is one less active callout into the DLL, it may be unloadabl now */ + ASSERT(pService->cServiceActiveThreadCount > 0); + pService->cServiceActiveThreadCount--; + + /* Try to open the service registry key */ + if (OpenServiceParametersKey(pService->pszServiceName, &hKey) == ERROR_SUCCESS) + { + /* It worked -- check if we should unload the service when stopped */ + if (RegQueryValueExW(hKey, + L"ServiceDllUnloadOnStop", + 0, + &dwType, + (LPBYTE)&Data, + &cbData) == ERROR_SUCCESS) + { + /* Make sure the data is correctly formatted */ + if ((dwType == REG_DWORD) && (Data == 1)) + { + /* Does the service still have active threads? */ + if (pService->cServiceActiveThreadCount != 0) + { + /* Yep, so we can't kill it just yet */ + DBG_TRACE("Skip Unload dll %ws for service %ws, " + "active threads %d\n", + pService->pDll->pszDllPath, + pService->pszServiceName, + pService->cServiceActiveThreadCount); + } + else + { + /* Nope, we're good to go */ + DBG_TRACE("Unload dll %ws for service %ws\n", + pService->pDll->pszDllPath, + pService->pszServiceName); + + /* Free the library and clear the module handle */ + FreeLibrary(pService->pDll->hModule); + pService->pDll->hModule = NULL; + } + } + } + } + + /* Drop the lock, unload is complete */ + LeaveCriticalSection(&ListLock); + + /* Close the parameters key if we had it */ + if (hKey) RegCloseKey(hKey); +} + +VOID +WINAPI +SvchostStopCallback ( + _In_ PVOID Context, + _In_ BOOLEAN TimerOrWaitFired + ) +{ + PSVCHOST_CALLBACK_CONTEXT pSvcsStopCbContext = Context; + PSVCHOST_STOP_CALLBACK pfnStopCallback; + + /* Hold the lock while we grab the callback */ + EnterCriticalSection(&ListLock); + + /* Grab the callback, then clear it */ + ASSERT(pSvcsStopCbContext->pService != NULL); + pfnStopCallback = pSvcsStopCbContext->pService->pfnStopCallback; + ASSERT(pfnStopCallback != NULL); + pSvcsStopCbContext->pService->pfnStopCallback = NULL; + + /* Now release the lock, making sure the above was atomic */ + LeaveCriticalSection(&ListLock); + + /* Now make the callout */ + DBG_TRACE("Call stop callback for service %ws, active threads %d\n", + pSvcsStopCbContext->pService->pszServiceName, + pSvcsStopCbContext->pService->cServiceActiveThreadCount); + pfnStopCallback(pSvcsStopCbContext->pContext, TimerOrWaitFired); + + /* Decrement the active threads -- maybe the DLL can unload now */ + UnloadServiceDll(pSvcsStopCbContext->pService); + + /* We no longer need the context */ + MemFree(pSvcsStopCbContext); +} + +DWORD +WINAPI +SvcRegisterStopCallback ( + _In_ PHANDLE phNewWaitObject, + _In_ LPCWSTR ServiceName, + _In_ HANDLE hObject, + _In_ PSVCHOST_STOP_CALLBACK pfnStopCallback, + _In_ PVOID pContext, + _In_ ULONG dwFlags + ) +{ + ULONG i; + PSVCHOST_CALLBACK_CONTEXT pSvcsStopCbContext = NULL; + PSVCHOST_SERVICE pService = NULL; + DWORD dwError = ERROR_SUCCESS; + + /* All parameters must be present */ + if ((phNewWaitObject == NULL) || + (ServiceName == NULL) || + (hObject == NULL) || + (pfnStopCallback == NULL)) + { + /* Fail otherwise */ + return ERROR_INVALID_PARAMETER; + } + + /* Don't allow new DLLs while we send notifications */ + EnterCriticalSection(&ListLock); + + /* Scan all registered services */ + for (i = 0; i < ServiceCount; i++) + { + /* Search for the service entry matching this service name */ + if (lstrcmpiW(ServiceName, ServiceArray[i].pszServiceName) == 0) + { + /* Found it */ + pService = &ServiceArray[i]; + break; + } + } + + /* Do we have a service? Does it already have a callback? */ + if ((pService == NULL) || (pService->pfnStopCallback != NULL)) + { + /* Affirmative, nothing for us to do */ + dwError = ERROR_INVALID_DATA; + DBG_ERR("Service %ws missing or already registered for callback, " + "status %d\n", + ServiceName, + dwError); + goto Quickie; + } + + /* Allocate our internal context */ + pSvcsStopCbContext = MemAlloc(HEAP_ZERO_MEMORY, sizeof(*pSvcsStopCbContext)); + if (pSvcsStopCbContext == NULL) + { + /* We failed, bail out */ + dwError = ERROR_NOT_ENOUGH_MEMORY; + DBG_ERR("MemAlloc for context block for service %ws failed, status " + "%d\n", + ServiceName, + dwError); + goto Quickie; + } + + /* Setup the context and register for the wait */ + pSvcsStopCbContext->pContext = pContext; + pSvcsStopCbContext->pService = pService; + if (RegisterWaitForSingleObject(phNewWaitObject, + hObject, + SvchostStopCallback, + pSvcsStopCbContext, + INFINITE, + dwFlags)) + { + /* We now have an active thread associated with this wait */ + pService->cServiceActiveThreadCount++; + pService->pfnStopCallback = pfnStopCallback; + DBG_TRACE("Registered stop callback for service %ws, active threads %d\n", + ServiceName, + pService->cServiceActiveThreadCount); } else { - DPRINT1("Invalid ServiceDll value type %lu for service: %ls, ErrorCode: %lu\n", ValueType, ServiceName, GetLastError()); - HeapFree(GetProcessHeap(), 0, Buffer); - return FALSE; + /* Registration failed, bail out */ + dwError = GetLastError(); + DBG_ERR("Registration for stop callback for service %ws failed, " + "status %d\n", + ServiceName, + dwError); } - /* Load the service dll */ - DPRINT("Trying to load dll\n"); - hServiceDll = LoadLibrary(DllPath); - if (hServiceDll == NULL) +Quickie: + /* Drop the lock, and free the context if we failed */ + LeaveCriticalSection(&ListLock); + if (dwError != ERROR_SUCCESS) MemFree(pSvcsStopCbContext); + return dwError; +} + +VOID +WINAPI +AbortSvchostService ( + _In_ LPCWSTR lpServiceName, + _In_ DWORD dwExitCode + ) +{ + SERVICE_STATUS_HANDLE scHandle; + SERVICE_STATUS ServiceStatus; + + /* Make us stopped and accept only query commands */ + ServiceStatus.dwCheckPoint = 0; + ServiceStatus.dwWaitHint = 0; + ServiceStatus.dwServiceSpecificExitCode = 0; + ServiceStatus.dwCurrentState = SERVICE_STOPPED; + ServiceStatus.dwControlsAccepted = SERVICE_QUERY_CONFIG; + ServiceStatus.dwServiceType = SERVICE_WIN32; + ServiceStatus.dwWin32ExitCode = dwExitCode; + + /* Register a handler that will do nothing while we are being stopped */ + scHandle = RegisterServiceCtrlHandlerW(lpServiceName, + DummySvchostCtrlHandler); + if (scHandle) { - DPRINT1("Unable to load ServiceDll: %ls, ErrorCode: %lu\n", DllPath, GetLastError()); - HeapFree(GetProcessHeap(), 0, DllPath); - return FALSE; + /* Stop us */ + if (!SetServiceStatus(scHandle, &ServiceStatus)) + { + /* Tell the debugger if this didn't work */ + DBG_ERR("AbortSvchostService: SetServiceStatus error %ld\n", + GetLastError()); + } } - HeapFree(GetProcessHeap(), 0, DllPath); - - ServiceMainFunc = (LPSERVICE_MAIN_FUNCTION)GetProcAddress(hServiceDll, "ServiceMain"); - - /* Allocate a service node in the linked list */ - Service = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SERVICE)); - if (Service == NULL) + else { - DPRINT1("Not enough memory for service: %ls\n", ServiceName); - return FALSE; + /* Tell the debugger if we couldn't register the handler */ + DBG_ERR("AbortSvchostService: RegisterServiceCtrlHandler failed %d\n", + GetLastError()); } +} - ServiceNameSize = (wcslen(ServiceName) + 1) * sizeof(WCHAR); - Service->Name = HeapAlloc(GetProcessHeap(), 0, ServiceNameSize); - if (Service->Name == NULL) +PVOID +WINAPI +GetServiceDllFunction ( + _In_ PSVCHOST_DLL pDll, + _In_ LPCSTR lpProcName, + _Out_ PDWORD lpdwError + ) +{ + HMODULE hModule; + PVOID lpAddress = NULL; + ULONG_PTR ulCookie = 0; + + /* Activate the context */ + if (ActivateActCtx(pDll->hActCtx, &ulCookie) != TRUE) { - DPRINT1("Not enough memory for service: %ls\n", ServiceName); - HeapFree(GetProcessHeap(), 0, Service); - return FALSE; + /* We couldn't, bail out */ + if (lpdwError) *lpdwError = GetLastError(); + DBG_ERR("ActivateActCtx for %ws failed. Error %d.\n", + pDll->pszDllPath, + GetLastError()); + return lpAddress; } - Result = StringCbCopy(Service->Name, ServiceNameSize, ServiceName); - ASSERT(SUCCEEDED(Result)); - (VOID)Result; - Service->hServiceDll = hServiceDll; - Service->ServiceMainFunc = ServiceMainFunc; + /* Check if we already have a loaded module for this service */ + hModule = pDll->hModule; + if (!hModule) + { + /* We don't -- load it */ + hModule = LoadLibraryExW(pDll->pszDllPath, + NULL, + LOAD_WITH_ALTERED_SEARCH_PATH); + if (!hModule) + { + /* We failed to load it, bail out */ + if (lpdwError) *lpdwError = GetLastError(); + DBG_ERR("LoadLibrary (%ws) failed. Error %d.\n", + pDll->pszDllPath, + GetLastError()); + DeactivateActCtx(0, ulCookie); + return lpAddress; + } - Service->Next = FirstService; - FirstService = Service; + /* Loaded! */ + pDll->hModule = hModule; + } + /* Next, get the address being looked up*/ + lpAddress = GetProcAddress(hModule, lpProcName); + if (!lpAddress) + { + /* We couldn't find it, write the error code and a debug statement */ + if (lpdwError) *lpdwError = GetLastError(); + DBG_ERR("GetProcAddress (%s) failed on DLL %ws. Error %d.\n", + lpProcName, + pDll->pszDllPath, + GetLastError()); + } + + /* All done, get rid of the activation context */ + DeactivateActCtx(0, ulCookie); + return lpAddress; +} + +PSVCHOST_DLL +WINAPI +FindDll ( + _In_ LPCWSTR pszManifestPath, + _In_ LPCWSTR pszDllPath, + _In_ PSVCHOST_SERVICE pService + ) +{ + PSVCHOST_DLL pDll, pFoundDll = NULL; + PLIST_ENTRY pNextEntry; + ASSERT(pszDllPath); + + /* Lock the DLL database */ + EnterCriticalSection(&ListLock); + + /* Scan through the database */ + pNextEntry = DllList.Flink; + while (pNextEntry != &DllList) + { + /* Search for an existing DLL with the same parameters */ + pDll = CONTAINING_RECORD(pNextEntry, SVCHOST_DLL, DllList); + if ((lstrcmpW(pDll->pszDllPath, pszDllPath) == 0) && + (lstrcmpW(pDll->pszManifestPath, pszManifestPath) == 0) && + (lstrcmpW(pDll->pService->pszServiceName, pService->pszServiceName) == 0)) + { + /* Found it! */ + pFoundDll = pDll; + break; + } + + /* Keep searching */ + pNextEntry = pNextEntry->Flink; + } + + /* All done, release the lock and return what we found, if anything */ + LeaveCriticalSection(&ListLock); + return pFoundDll; +} + +PSVCHOST_DLL +WINAPI +AddDll ( + _In_ LPCWSTR pszManifestPath, + _In_ LPCWSTR pszDllPath, + _In_ PSVCHOST_SERVICE pService, + _Out_ PDWORD lpdwError + ) +{ + PSVCHOST_DLL pDll; + ULONG nDllPathLength, nManifestPathLength; + ASSERT(pszDllPath); + ASSERT(*pszDllPath); + + /* Compute the length of the two paths */ + nDllPathLength = lstrlenW(pszDllPath); + nManifestPathLength = lstrlenW(pszManifestPath); + + /* Allocate the DLL entry for this service */ + pDll = MemAlloc(HEAP_ZERO_MEMORY, + sizeof(*pDll) + + (nDllPathLength + nManifestPathLength) * sizeof(WCHAR) + + 2 * sizeof(UNICODE_NULL)); + if (pDll == NULL) + { + /* Bail out with failure */ + *lpdwError = ERROR_NOT_ENOUGH_MEMORY; + return pDll; + } + + /* Put the DLL path right after the DLL entry */ + pDll->pszDllPath = (LPCWSTR)(pDll + 1); + + /* Put the manifest path right past the DLL path (note the pointer math) */ + pDll->pszManifestPath = pDll->pszDllPath + nDllPathLength + 1; + + /* Now copy both paths */ + CopyMemory((PVOID)pDll->pszDllPath, + pszDllPath, + sizeof(WCHAR) * nDllPathLength); + CopyMemory((PVOID)pDll->pszManifestPath, + pszManifestPath, + sizeof(WCHAR) * nManifestPathLength); + + /* Now set the service, and make sure both paths are NULL-terminated */ + pDll->pService = pService; + ASSERT(pDll->hActCtx == NULL); + ASSERT(pDll->pszDllPath[nDllPathLength] == UNICODE_NULL); + ASSERT(pDll->pszManifestPath[nManifestPathLength] == UNICODE_NULL); + + /* Finally, add the entry to the DLL database, while holding the lock */ + EnterCriticalSection(&ListLock); + InsertTailList(&DllList, &pDll->DllList); + LeaveCriticalSection(&ListLock); + + /* And return it */ + return pDll; +} + +VOID +WINAPI +GetServiceMainFunctions ( + _In_ PSVCHOST_SERVICE pService, + _Out_ PVOID *pServiceMain, + _Out_ PVOID *pPushServiceGlobals, + _Out_ PDWORD lpdwError + ) +{ + DWORD dwError, cbDllLength, cbData, dwType; + PSVCHOST_DLL pDll; + ACTCTXW actCtx; + LPCWSTR pszDllPath; + HKEY hKey; + HANDLE hActCtx; + LPWSTR lpData; + WCHAR szDllBuffer[MAX_PATH + 2], szManifestBuffer[MAX_PATH + 2]; + + /* Initialize the activation context we might need later */ + RtlZeroMemory(&actCtx, sizeof(actCtx)); + actCtx.cbSize = sizeof(actCtx); + + /* We clean these up in our failure path so initialize them to NULL here */ + hActCtx = NULL; + hKey = NULL; + lpData = NULL; + *lpdwError = ERROR_SUCCESS; + + /* Null terminate the string buffers */ + szDllBuffer[0] = UNICODE_NULL; + szManifestBuffer[0] = UNICODE_NULL; + + /* Do we already have a DLL ready to go for this service? */ + pDll = pService->pDll; + if (pDll != NULL) goto HaveDll; + + /* Nope, we're starting from scratch. Open a handle to parameters key */ + dwError = OpenServiceParametersKey(pService->pszServiceName, &hKey); + if (dwError) + { + *lpdwError = dwError; + ASSERT(*lpdwError != NO_ERROR); + goto Quickie; + } + + /* Allocate enough space to hold a unicode path (NULL-terminated) */ + cbData = MAX_PATH * sizeof(WCHAR) + sizeof(UNICODE_NULL); + lpData = MemAlloc(0, cbData); + if (lpData == NULL) + { + /* No memory, bail out */ + *lpdwError = ERROR_NOT_ENOUGH_MEMORY; + goto Quickie; + } + + /* Query the DLL path */ + lpData[0] = UNICODE_NULL; + dwError = RegQueryValueExW(hKey, + L"ServiceDll", + 0, + &dwType, + (LPBYTE)lpData, + &cbData); + if (dwError != ERROR_SUCCESS) + { + *lpdwError = dwError; + DBG_ERR("RegQueryValueEx for the ServiceDll parameter of the %ws " + "service returned %u\n", + pService->pszServiceName, + dwError); + goto Quickie; + } + + /* Is the registry data valid and present? */ + if ((dwType != REG_EXPAND_SZ) || (lpData[0] == UNICODE_NULL)) + { + /* Nope, bail out */ + *lpdwError = ERROR_FILE_NOT_FOUND; + DBG_ERR("The ServiceDll parameter for the %ws service is not of type " + "REG_EXPAND_SZ\n", + pService->pszServiceName); + goto Quickie; + } + + /* Convert the expandable path into an absolute path */ + ExpandEnvironmentStringsW(lpData, szDllBuffer, MAX_PATH); + SvchostCharLowerW(szDllBuffer); + + /* Check if the service has a manifest file associated with it */ + cbData = MAX_PATH * sizeof(WCHAR) + sizeof(UNICODE_NULL); + dwError = RegQueryValueExW(hKey, + L"ServiceManifest", + NULL, + &dwType, + (LPBYTE)lpData, + &cbData); + if (dwError != ERROR_SUCCESS) + { + /* Did we fail because one wasn't set? */ + if ((dwError != ERROR_PATH_NOT_FOUND) && + (dwError != ERROR_FILE_NOT_FOUND)) + { + /* We failed for some other reason, bail out */ + *lpdwError = dwError; + DBG_ERR("RegQueryValueEx for the ServiceManifest parameter of the " + "%ws service returned %u\n", + pService->pszServiceName, + dwError); + goto Quickie; + } + + /* We have no manifest, make sure the buffer is empty */ + szManifestBuffer[0] = UNICODE_NULL; + + /* We're done with this buffer */ + MemFree(lpData); + lpData = NULL; + + /* Use the whole DLL path, since we don't have a manifest */ + pszDllPath = szDllBuffer; + } + else + { + /* Do we have invalid registry data? */ + if ((dwType != REG_EXPAND_SZ) || (*lpData == UNICODE_NULL)) + { + /* Yes, pretend there's no manifest and bail out */ + *lpdwError = ERROR_FILE_NOT_FOUND; + DBG_ERR("The ServiceManifest parameter for the %ws service is not " + "of type REG_EXPAND_SZ\n", + pService->pszServiceName); + goto Quickie; + } + + /* Expand the string into our stack buffer */ + ExpandEnvironmentStringsW(lpData, szManifestBuffer, MAX_PATH); + + /* We no longer need the heap buffer*/ + MemFree(lpData); + lpData = NULL; + + /* Lowercase the manifest path */ + SvchostCharLowerW(szManifestBuffer); + + /* Now loop over the DLL path */ + cbDllLength = lstrlenW(szDllBuffer); + while (cbDllLength) + { + /* From the end, until we find the first path separator */ + if (szDllBuffer[cbDllLength] == '\\' || szDllBuffer[cbDllLength] == '/') + { + /* Use just a short name (cut out the rest of the path) */ + pszDllPath = &szDllBuffer[cbDllLength + 1]; + break; + } + + /* Try the next character */ + cbDllLength--; + } + } + + /* See if we already have a matching DLL and manifest for this service */ + pDll = FindDll(szManifestBuffer, pszDllPath, pService); + if (pDll == NULL) + { + /* We don't have it yet -- does this DLL have a manifest? */ + if (szManifestBuffer[0] != UNICODE_NULL) + { + /* Create an activation context for it */ + actCtx.lpSource = szManifestBuffer; + hActCtx = CreateActCtxW(&actCtx); + if (hActCtx == INVALID_HANDLE_VALUE) + { + /* We've failed to create one, bail out */ + *lpdwError = GetLastError(); + DBG_ERR("CreateActCtxW(%ws) for the %ws service returned %u\n", + szManifestBuffer, + pService->pszServiceName, + *lpdwError); + goto Quickie; + } + } + + /* Add this new DLL into the database */ + pDll = AddDll(szManifestBuffer, pszDllPath, pService, lpdwError); + if (pDll) + { + /* Save the activation context and zero it so we don't release later */ + pDll->hActCtx = hActCtx; + hActCtx = NULL; + } + } + + /* We either found, added, or failed to add, the DLL for this service */ + ASSERT(!pService->pDll); + pService->pDll = pDll; + + /* In all cases, we will query the ServiceMain function, however*/ + RegQueryStringA(hKey, + L"ServiceMain", + REG_SZ, + &pService->pszServiceMain); + + /* And now we'll check if we were able to create it earlier (or find it) */ + if (!pService->pDll) + { + /* We were not, so there's no point in going on */ + ASSERT(*lpdwError != NO_ERROR); + goto Quickie; + } + + /* We do have a valid DLL, so now get the service main routine out of it */ +HaveDll: + *pServiceMain = GetServiceDllFunction(pDll, + pService->pszServiceMain ? + pService->pszServiceMain : + "ServiceMain", + lpdwError); + + /* And now get the globals routine out of it (this one is optional) */ + *pPushServiceGlobals = GetServiceDllFunction(pDll, + "SvchostPushServiceGlobals", + NULL); + +Quickie: + /* We're done, cleanup any resources we left behind */ + if (hKey != NULL) RegCloseKey(hKey); + if (lpData != NULL) MemFree(lpData); + if ((hActCtx) && (hActCtx != INVALID_HANDLE_VALUE)) ReleaseActCtx(hActCtx); +} + +VOID +WINAPI +ServiceStarter ( + _In_ DWORD dwNumServicesArgs, + _In_ LPWSTR *lpServiceArgVectors + ) +{ + DWORD i, dwError = ERROR_FILE_NOT_FOUND; + PSVCHOST_SERVICE ServiceEntry; + LPCWSTR lpServiceName; + LPSERVICE_MAIN_FUNCTIONW ServiceMain = NULL; + PSVCHOST_INIT_GLOBALS ServiceInitGlobals = NULL; + + /* Hold the lock while we start a service */ + EnterCriticalSection(&ListLock); + + /* Get this service's name, and loop the database */ + lpServiceName = *lpServiceArgVectors; + for (i = 0; i < ServiceCount; i++) + { + /* Try to find a match by name */ + if (!lstrcmpiW(lpServiceName, ServiceArray[i].pszServiceName)) break; + } + + /* Check if we didn't find it */ + if (i == ServiceCount) + { + /* This looks like a bogus attempt, bail out */ + LeaveCriticalSection(&ListLock); + return; + } + + /* We have it */ + ServiceEntry = &ServiceArray[i]; + + /* Should we breakpoint before loading this service? */ + if (FDebugBreakForService(lpServiceName) != FALSE) + { + /* Yep -- do it */ + DBG_TRACE("Attaching debugger before getting ServiceMain for %ws...\n", + lpServiceName); + DebugBreak(); + } + + /* Get the callbacks for this service */ + GetServiceMainFunctions(&ServiceArray[i], + (PVOID*)&ServiceMain, + (PVOID*)&ServiceInitGlobals, + &dwError); + + /* If this service is valid and needs globals, but we don't have them... */ + if ((ServiceMain != NULL) && + (ServiceInitGlobals != NULL) && + (g_pSvchostSharedGlobals == NULL)) + { + /* Go and build them for the first time! */ + SvchostBuildSharedGlobals(); + } + + /* We call a service if it has a main, or if wants globals and we have them */ + if (((ServiceInitGlobals != NULL) && (g_pSvchostSharedGlobals != NULL)) || + ((ServiceMain != NULL) && (ServiceInitGlobals == NULL))) + { + /* Therefore, make sure it won't be unloaded as we drop the lock */ + ServiceEntry->cServiceActiveThreadCount++; + } + + /* Drop the lock while we call into the service DLL */ + LeaveCriticalSection(&ListLock); + + /* First: does this service want globals? */ + if (ServiceInitGlobals != NULL) + { + /* Do we have any to give? */ + if (g_pSvchostSharedGlobals != NULL) + { + /* Yes, push them to the service */ + ServiceInitGlobals(g_pSvchostSharedGlobals); + + /* Does the service NOT have an entrypoint? */ + if (ServiceMain == NULL) + { + /* We're going to abort loading, it serves no use */ + if (lpServiceName != NULL) + { + AbortSvchostService(lpServiceName, dwError); + } + + /* And drop a reference count since it's not active anymore */ + UnloadServiceDll(ServiceEntry); + } + } + else if (lpServiceName != NULL) + { + /* We have no globals to give, so don't even bother calling it */ + AbortSvchostService(lpServiceName, dwError); + } + } + + /* Next up, does it have an entrypoint? */ + if (ServiceMain != NULL) + { + /* It does, so call it */ + DBG_TRACE("Calling ServiceMain for %ws...\n", lpServiceName); + ServiceMain(dwNumServicesArgs, lpServiceArgVectors); + + /* We're out of the service now, so we can drop a reference */ + UnloadServiceDll(ServiceEntry); + } + else if (lpServiceName != NULL) + { + /* It has no entrypoint, so abort its launch */ + AbortSvchostService(lpServiceName, dwError); + } +} + +SERVICE_TABLE_ENTRYW* +WINAPI +BuildServiceTable ( + VOID + ) +{ + SERVICE_TABLE_ENTRYW *pServiceTable; + ULONG i; + + /* Acquire the database lock while we go over the services */ + EnterCriticalSection(&ListLock); + + /* Allocate space for a NULL entry at the end as well, Windows needs this */ + pServiceTable = MemAlloc(HEAP_ZERO_MEMORY, + (ServiceCount + 1) * sizeof(*pServiceTable)); + if (pServiceTable) + { + /* Go over all our registered services */ + for (i = 0; i < ServiceCount; i++) + { + /* And set their parameters in the service table */ + pServiceTable[i].lpServiceName = (LPWSTR)ServiceArray[i].pszServiceName; + pServiceTable[i].lpServiceProc = ServiceStarter; + DBG_TRACE("Added service table entry for %ws\n", + pServiceTable[i].lpServiceName); + } + } + + /* All done, can release the lock now */ + LeaveCriticalSection(&ListLock); + return pServiceTable; +} + +BOOLEAN +WINAPI +CallPerInstanceInitFunctions ( + _In_ PSVCHOST_OPTIONS pOptions + ) +{ + PIMAGE_NT_HEADERS pNtHeaders; + BOOLEAN bResult; + + /* Is COM required for this host? */ + if (pOptions->CoInitializeSecurityParam != 0) + { + /* Yes, initialize COM security and parameters */ + bResult = InitializeSecurity(pOptions->CoInitializeSecurityParam, + pOptions->AuthenticationLevel, + pOptions->ImpersonationLevel, + pOptions->AuthenticationCapabilities); + if (bResult != TRUE) return FALSE; + } + + /* Do we have a custom RPC stack size? */ + if (pOptions->DefaultRpcStackSize != 0) + { + /* Yes, go set it */ + RpcMgmtSetServerStackSize(pOptions->DefaultRpcStackSize << 10); + } + else + { + /* Nope, get the NT headers from the image */ + pNtHeaders = RtlImageNtHeader(NtCurrentPeb()->ImageBaseAddress); + if (pNtHeaders) + { + /* And just use whatever the default thread stack is */ + RpcMgmtSetServerStackSize(pNtHeaders->OptionalHeader.SizeOfStackCommit); + } + } + + /* Is this host holding critical services? */ + if (pOptions->SystemCritical != FALSE) + { + /* Mark the process as critical if so */ + RtlSetProcessIsCritical(TRUE, NULL, TRUE); + } + + /* All done */ return TRUE; } -VOID FreeServices(VOID) +VOID +wmainCRTStartup ( + VOID + ) { - while (FirstService) + PSVCHOST_OPTIONS lpOptions; + SERVICE_TABLE_ENTRYW *pServiceTable; + LPWSTR pszCmdLine; + + /* Set a generic SEH filter and hard fail all critical errors */ + SetUnhandledExceptionFilter(SvchostUnhandledExceptionFilter); + SetErrorMode(SEM_FAILCRITICALERRORS); + + /* Initialize the heap allocator */ + MemInit(GetProcessHeap()); + + /* Initialize the DLL database and lock */ + InitializeListHead(&DllList); + InitializeCriticalSection(&ListLock); + + /* Get the command-line and parse it to get the service group */ + pszCmdLine = GetCommandLineW(); + lpOptions = BuildCommandOptions(pszCmdLine); + if (lpOptions == NULL) { - PSERVICE Service = FirstService; - FirstService = Service->Next; - - FreeLibrary(Service->hServiceDll); - - HeapFree(GetProcessHeap(), 0, Service->Name); - HeapFree(GetProcessHeap(), 0, Service); + /* Without a valid command-line, there's nothing for us to do */ + DBG_TRACE("Calling ExitProcess for %ws\n", pszCmdLine); + ExitProcess(0); } + + /* Now use the service group information to lookup all the services */ + BuildServiceArray(lpOptions); + + /* Convert the list of services in this group to the SCM format */ + pServiceTable = BuildServiceTable(); + if (pServiceTable == NULL) + { + /* This is critical, bail out without it */ + MemFree(lpOptions); + return; + } + + /* Initialize COM and RPC as needed for this service group */ + if (CallPerInstanceInitFunctions(lpOptions) == FALSE) + { + /* Exit with a special code indicating COM/RPC setup has failed */ + DBG_ERR("%s", "CallPerInstanceInitFunctions failed -- exiting!\n"); + ExitProcess(1); + } + + /* We're ready to go -- free the options buffer */ + MemFree(lpOptions); + + /* And call into ADVAPI32 to get our services going */ + StartServiceCtrlDispatcherW(pServiceTable); } - -/* - * Returns the number of services successfully loaded from the category - */ -DWORD LoadServiceCategory(PCWSTR ServiceCategory) -{ - HKEY hServicesKey; - DWORD ValueType; - WCHAR Buffer[REG_MAX_DATA_SIZE]; - DWORD BufferSize = sizeof(Buffer); - PCWSTR ServiceName; - DWORD BufferIndex = 0; - DWORD NrOfServices = 0; - LONG RetVal; - - /* Get all the services in this category */ - RetVal = RegOpenKeyEx(HKEY_LOCAL_MACHINE, SVCHOST_REG_KEY, 0, KEY_READ, &hServicesKey); - if (RetVal != ERROR_SUCCESS) - { - DPRINT1("Could not open service category: %ls\n", ServiceCategory); - return 0; - } - - RetVal = RegQueryValueEx(hServicesKey, ServiceCategory, NULL, &ValueType, (LPBYTE)Buffer, &BufferSize); - if (RetVal != ERROR_SUCCESS) - { - DPRINT1("Could not open service category (2): %ls\n", ServiceCategory); - RegCloseKey(hServicesKey); - return 0; - } - - /* Clean up */ - RegCloseKey(hServicesKey); - - /* Load services in the category */ - ServiceName = Buffer; - while (ServiceName[0] != UNICODE_NULL) - { - size_t Length; - - Length = wcslen(ServiceName); - if (Length == 0) - break; - - if (PrepareService(ServiceName)) - ++NrOfServices; - - BufferIndex += Length + 1; - - ServiceName = &Buffer[BufferIndex]; - } - - return NrOfServices; -} - -int wmain(int argc, wchar_t **argv) -{ - DWORD NrOfServices; - LPSERVICE_TABLE_ENTRY ServiceTable; - - if (argc < 3) - { - /* MS svchost.exe doesn't seem to print help, should we? */ - return 0; - } - - if (wcscmp(argv[1], L"-k")) - { - /* For now, we only handle "-k" */ - return 0; - } - - NrOfServices = LoadServiceCategory(argv[2]); - - DPRINT("NrOfServices: %lu\n", NrOfServices); - if (NrOfServices == 0) - return 0; - - ServiceTable = HeapAlloc(GetProcessHeap(), 0, sizeof(SERVICE_TABLE_ENTRY) * (NrOfServices + 1)); - if (ServiceTable != NULL) - { - DWORD i; - PSERVICE Service = FirstService; - - /* Fill the service table */ - for (i = 0; i < NrOfServices; i++) - { - DPRINT("Loading service: %ls\n", Service->Name); - ServiceTable[i].lpServiceName = Service->Name; - ServiceTable[i].lpServiceProc = Service->ServiceMainFunc; - Service = Service->Next; - } - ASSERT(Service == NULL); - - /* Set a NULL entry to end the service table */ - ServiceTable[i].lpServiceName = NULL; - ServiceTable[i].lpServiceProc = NULL; - - if (!StartServiceCtrlDispatcher(ServiceTable)) - DPRINT1("Failed to start service control dispatcher, ErrorCode: %lu\n", GetLastError()); - - HeapFree(GetProcessHeap(), 0, ServiceTable); - } - else - { - DPRINT1("Not enough memory for the service table, trying to allocate %u bytes\n", sizeof(SERVICE_TABLE_ENTRY) * (NrOfServices + 1)); - } - - DPRINT("Freeing services...\n"); - FreeServices(); - - return 0; -} - -/* EOF */ diff --git a/base/services/svchost/svchost.h b/base/services/svchost/svchost.h index 1702b3da692..63226a58d88 100644 --- a/base/services/svchost/svchost.h +++ b/base/services/svchost/svchost.h @@ -1,32 +1,296 @@ /* - * PROJECT: ReactOS SvcHost - * LICENSE: GPL - See COPYING in the top level directory - * FILE: /base/services/svchost/svchost.h - * PURPOSE: Provide dll service loader - * PROGRAMMERS: Gregor Brunmar (gregor.brunmar@home.se) + * PROJECT: ReactOS Service Host + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: base/services/svchost/svchost.h + * PURPOSE: Precompiled Header for Service Host + * PROGRAMMERS: ReactOS Portable Systems Group */ #pragma once +#define WIN32_NO_STATUS +#include +#include +#include +#include -/* INCLUDES ******************************************************************/ +// +// FIXME: Should go in public headers +// +#define DPFLTR_SVCHOST_ID 28 -#include -#include -#include -#include -#include -#include -#include +// +// This prints out a SVCHOST-specific debug print, with the PID/TID +// +#define SvchostDbgPrint(lev, fmt, ...) \ + DbgPrintEx(DPFLTR_SVCHOST_ID, \ + DPFLTR_MASK | lev, \ + "[SVCHOST] %lx.%lx: " fmt, \ + GetCurrentProcessId(), \ + GetCurrentThreadId(), \ + __VA_ARGS__); -/* DEFINES *******************************************************************/ +#define DBG_ERR(fmt, ...) SvchostDbgPrint(1, fmt, __VA_ARGS__) +#define DBG_TRACE(fmt, ...) SvchostDbgPrint(4, fmt, __VA_ARGS__) -typedef struct _SERVICE { - PWSTR Name; - HINSTANCE hServiceDll; - LPSERVICE_MAIN_FUNCTION ServiceMainFunc; - struct _SERVICE *Next; -} SERVICE, *PSERVICE; +// +// This is the callback that a hosted service can register for stop notification +// FIXME: GLOBAL HEADER +// +typedef VOID + (*CALLBACK PSVCHOST_STOP_CALLBACK) ( + _In_ PVOID lpParameter, + _In_ BOOLEAN TimerOrWaitFired + ); -/* FUNCTIONS *****************************************************************/ +// +// Hosted Services and SvcHost Use this Structure +// FIXME: GLOBAL HEADER +// +typedef struct _SVCHOST_GLOBALS +{ + PVOID NullSid; + PVOID WorldSid; + PVOID LocalSid; + PVOID NetworkSid; + PVOID LocalSystemSid; + PVOID LocalServiceSid; + PVOID NetworkServiceSid; + PVOID BuiltinDomainSid; + PVOID AuthenticatedUserSid; + PVOID AnonymousLogonSid; + PVOID AliasAdminsSid; + PVOID AliasUsersSid; + PVOID AliasGuestsSid; + PVOID AliasPowerUsersSid; + PVOID AliasAccountOpsSid; + PVOID AliasSystemOpsSid; + PVOID AliasPrintOpsSid; + PVOID AliasBackupOpsSid; + PVOID RpcpStartRpcServer; + PVOID RpcpStopRpcServer; + PVOID RpcpStopRpcServerEx; + PVOID SvcNetBiosOpen; + PVOID SvcNetBiosClose; + PVOID SvcNetBiosReset; + PVOID SvcRegisterStopCallback; +} SVCHOST_GLOBALS, *PSVCHOST_GLOBALS; + +// +// This is the callback for them to receive it +// +typedef VOID +(WINAPI *PSVCHOST_INIT_GLOBALS) ( + _In_ PSVCHOST_GLOBALS Globals +); +// +// Initialization Stages +// +#define SVCHOST_RPC_INIT_COMPLETE 1 +#define SVCHOST_NBT_INIT_COMPLETE 2 +#define SVCHOST_SID_INIT_COMPLETE 4 + +// +// Domain Alias SID Structure +// +typedef struct _DOMAIN_SID_DATA +{ + PSID Sid; + DWORD SubAuthority; +} DOMAIN_SID_DATA; + +// +// Well-known SID Structure +// +typedef struct _SID_DATA +{ + PSID Sid; + SID_IDENTIFIER_AUTHORITY Authority; + DWORD SubAuthority; +} SID_DATA; + +// +// This contains all the settings (from the registry) for a hosted service +// +typedef struct _SVCHOST_OPTIONS +{ + PWCHAR CmdLineBuffer; + PWCHAR CmdLine; + BOOL HasServiceGroup; + LPWSTR ServiceGroupName; + DWORD CoInitializeSecurityParam; + DWORD AuthenticationLevel; + SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; + DWORD AuthenticationCapabilities; + DWORD DefaultRpcStackSize; + BOOLEAN SystemCritical; +} SVCHOST_OPTIONS, *PSVCHOST_OPTIONS; + +// +// This represents the DLL used to hold a hosted service +// +typedef struct _SVCHOST_DLL +{ + LIST_ENTRY DllList; + HINSTANCE hModule; + LPCWSTR pszDllPath; + LPCWSTR pszManifestPath; + HANDLE hActCtx; + struct _SVCHOST_SERVICE* pService; +} SVCHOST_DLL, *PSVCHOST_DLL; + +// +// This represents an actual hosted service +// +typedef struct _SVCHOST_SERVICE +{ + LPCWSTR pszServiceName; + LPCSTR pszServiceMain; + LONG cServiceActiveThreadCount; + PSVCHOST_DLL pDll; + PSVCHOST_STOP_CALLBACK pfnStopCallback; +} SVCHOST_SERVICE, *PSVCHOST_SERVICE; + +// +// This is the context that a hosted service with a stop callback has +// +typedef struct _SVCHOST_CALLBACK_CONTEXT +{ + PVOID pContext; + PSVCHOST_SERVICE pService; +} SVCHOST_CALLBACK_CONTEXT, *PSVCHOST_CALLBACK_CONTEXT; + +NTSTATUS +NTAPI +RpcpInitRpcServer ( + VOID +); + +NTSTATUS +NTAPI +RpcpStopRpcServer ( + _In_ RPC_IF_HANDLE IfSpec +); + +NTSTATUS +NTAPI +RpcpStopRpcServerEx ( + _In_ RPC_IF_HANDLE IfSpec +); + +NTSTATUS +NTAPI +RpcpStartRpcServer ( + _In_ LPCWSTR IfName, + _In_ RPC_IF_HANDLE IfSpec +); + +VOID +WINAPI +SvchostBuildSharedGlobals ( + VOID +); + +VOID +WINAPI +SvchostCharLowerW ( + _In_ LPCWSTR lpSrcStr +); + +NTSTATUS +NTAPI +ScCreateWellKnownSids ( + VOID +); + +VOID +WINAPI +MemInit ( + _In_ HANDLE Heap +); + +BOOL +WINAPI +MemFree ( + _In_ LPVOID lpMem +); + +PVOID +WINAPI +MemAlloc ( + _In_ DWORD dwFlags, + _In_ DWORD dwBytes +); + +VOID +WINAPI +SvcNetBiosInit ( + VOID +); + +VOID +WINAPI +SvcNetBiosClose ( +VOID +); + +VOID +WINAPI +SvcNetBiosOpen ( + VOID +); + +DWORD +WINAPI +SvcNetBiosReset ( + _In_ UCHAR LanaNum +); + +BOOL +WINAPI +InitializeSecurity ( + _In_ DWORD dwParam, + _In_ DWORD dwAuthnLevel, + _In_ DWORD dwImpLevel, + _In_ DWORD dwCapabilities +); + + +DWORD +WINAPI +RegQueryDword ( + _In_ HKEY hKey, + _In_ LPCWSTR pszValueName, + _Out_ PDWORD pdwValue +); + +DWORD +WINAPI +RegQueryString ( + _In_ HKEY hKey, + _In_ LPCWSTR pszValueName, + _In_ DWORD dwExpectedType, + _Out_ PBYTE* ppbData +); + +DWORD +WINAPI +RegQueryStringA ( + _In_ HKEY hKey, + _In_ LPCWSTR pszValueName, + _In_ DWORD dwExpectedType, + _Out_ LPCSTR* ppszData +); + +DWORD +WINAPI +SvcRegisterStopCallback ( + _In_ PHANDLE phNewWaitObject, + _In_ LPCWSTR ServiceName, + _In_ HANDLE hObject, + _In_ PSVCHOST_STOP_CALLBACK pfnStopCallback, + _In_ PVOID pContext, + _In_ ULONG dwFlags +); + +extern PSVCHOST_GLOBALS g_pSvchostSharedGlobals; -/* EOF */ diff --git a/base/setup/reactos/lang/bg-BG.rc b/base/setup/reactos/lang/bg-BG.rc index 8041f9defca..6f9b75a5e8b 100644 --- a/base/setup/reactos/lang/bg-BG.rc +++ b/base/setup/reactos/lang/bg-BG.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Настройка на РеактОС" FONT 8, "MS Shell Dlg" @@ -10,7 +10,7 @@ BEGIN LTEXT "Натиснете „Приключване“ за изход от настройването.", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Настройка на РеактОС" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN LTEXT "Натиснете „Напред“ за избор на вида настройване.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Настройка на РеактОС" FONT 8, "MS Shell Dlg" @@ -34,7 +34,7 @@ BEGIN LTEXT "Натиснете „Напред“ за настройка на устройствата.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Настройка на РеактОС" FONT 8, "MS Shell Dlg" @@ -49,7 +49,7 @@ BEGIN LTEXT "Натиснете „Напред“ за избор на устройство за слагане.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Настройка на РеактОС" FONT 8, "MS Shell Dlg" @@ -63,8 +63,8 @@ BEGIN LTEXT "Натиснете „Напред“, за да започне слагането.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Създаване на дял" FONT 8, "MS Shell Dlg" BEGIN @@ -79,8 +79,8 @@ BEGIN PUSHBUTTON "&Отказ",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Разширени дялови настройски" FONT 8, "MS Shell Dlg" BEGIN @@ -117,7 +117,7 @@ BEGIN PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Завършване настройката на РеактОС" FONT 8, "MS Shell Dlg" diff --git a/base/setup/reactos/lang/cs-CZ.rc b/base/setup/reactos/lang/cs-CZ.rc index 71553ab43d4..9977f9cfa02 100644 --- a/base/setup/reactos/lang/cs-CZ.rc +++ b/base/setup/reactos/lang/cs-CZ.rc @@ -6,7 +6,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalace systému ReactOS" FONT 8, "MS Shell Dlg" @@ -16,7 +16,7 @@ BEGIN LTEXT "Klepnutím na Dokončit ukončíte instalaci.", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalace systému ReactOS" FONT 8, "MS Shell Dlg" @@ -29,7 +29,7 @@ BEGIN LTEXT "Po klepnutí na Další bude možné zvolit typ instalace.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalace systému ReactOS" FONT 8, "MS Shell Dlg" @@ -40,7 +40,7 @@ BEGIN LTEXT "Po klepnutí na Další bude možné nastavit zařízení.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalace systému ReactOS" FONT 8, "MS Shell Dlg" @@ -55,7 +55,7 @@ BEGIN LTEXT "Po klepnutí na Další bude možné nastavit instalační zařízení.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalace systému ReactOS" FONT 8, "MS Shell Dlg" @@ -69,8 +69,8 @@ BEGIN LTEXT "Po klepnutí na Další bude možné zkontrolovat všechna nastavení.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Vytvořit oddíl" FONT 8, "MS Shell Dlg" BEGIN @@ -85,8 +85,8 @@ BEGIN PUSHBUTTON "&Storno",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Pokročilá nastavení oddílu" FONT 8, "MS Shell Dlg" BEGIN @@ -123,7 +123,7 @@ BEGIN PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Dokončení instalace systému ReactOS" FONT 8, "MS Shell Dlg" diff --git a/base/setup/reactos/lang/de-DE.rc b/base/setup/reactos/lang/de-DE.rc index 59263677cdb..383c564a1e2 100644 --- a/base/setup/reactos/lang/de-DE.rc +++ b/base/setup/reactos/lang/de-DE.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS-Setup" FONT 8, "MS Shell Dlg" @@ -10,7 +10,7 @@ BEGIN LTEXT "Klicken Sie auf Beenden um das Setup zu verlassen.", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS-Setup" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN LTEXT "Klicken Sie auf Weiter um zum Setuptyp zu gelangen.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS-Setup" FONT 8, "MS Shell Dlg" @@ -34,7 +34,7 @@ BEGIN LTEXT "Klicken Sie auf Weiter um die Geräte einzustellen.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS-Setup" FONT 8, "MS Shell Dlg" @@ -49,7 +49,7 @@ BEGIN LTEXT "Klicken Sie auf Weiter um den Installationsort zu konfigurieren.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS-Setup" FONT 8, "MS Shell Dlg" @@ -63,8 +63,8 @@ BEGIN LTEXT "Klicken Sie auf Weiter um die Zusammenfassung zu überprüfen.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Erstelle Partition" FONT 8, "MS Shell Dlg" BEGIN @@ -79,8 +79,8 @@ BEGIN PUSHBUTTON "&Abbrechen",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Erweiterte Partitionseinstellungen" FONT 8, "MS Shell Dlg" BEGIN @@ -118,7 +118,7 @@ BEGIN END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Vervollständige ReactOS-Setup" FONT 8, "MS Shell Dlg" diff --git a/base/setup/reactos/lang/el-GR.rc b/base/setup/reactos/lang/el-GR.rc index 0e43051f412..dda862ac5fd 100644 --- a/base/setup/reactos/lang/el-GR.rc +++ b/base/setup/reactos/lang/el-GR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Εγκατάσταση του ReactOS" FONT 8, "MS Shell Dlg" @@ -10,7 +10,7 @@ BEGIN LTEXT "Πατήστε Ολοκλήρωση για να βγείτε από την Εγκατάσταση.", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Εγκατάσταση του ReactOS" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN LTEXT "Πατήστε Επόμενο για να επιλέξετε τον τύπο εγκατάστασης.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Εγκατάσταση του ReactOS" FONT 8, "MS Shell Dlg" @@ -34,7 +34,7 @@ BEGIN LTEXT "Πατήστε Επόμενο για να ρυθμίσετε τις συσκευές.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Εγκατάσταση του ReactOS" FONT 8, "MS Shell Dlg" @@ -49,7 +49,7 @@ BEGIN LTEXT "Click Next setup of the installation device.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Εγκατάσταση του ReactOS" FONT 8, "MS Shell Dlg" @@ -63,8 +63,8 @@ BEGIN LTEXT "Πατήστε Επόμενο για να ξεκινήσετε τη διαδικασία εγκατάστασης.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Δημιουργία Partition" FONT 8, "MS Shell Dlg" BEGIN @@ -79,8 +79,8 @@ BEGIN PUSHBUTTON "&Άκυρο",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Ρυθμίσεις Partition για προχωρημένους" FONT 8, "MS Shell Dlg" BEGIN @@ -117,7 +117,7 @@ BEGIN PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Ολοκληρώνεται η εγκατάσταση του ReactOS" FONT 8, "MS Shell Dlg" diff --git a/base/setup/reactos/lang/en-US.rc b/base/setup/reactos/lang/en-US.rc index 3f46405db92..6c42c2db7ea 100644 --- a/base/setup/reactos/lang/en-US.rc +++ b/base/setup/reactos/lang/en-US.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" @@ -10,7 +10,7 @@ BEGIN LTEXT "Click Finish to exit the Setup.", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN LTEXT "Click Next to select the setup type.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" @@ -34,7 +34,7 @@ BEGIN LTEXT "Click Next to setup the devices.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" @@ -49,7 +49,7 @@ BEGIN LTEXT "Click Next to setup of the installation device.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" @@ -63,8 +63,8 @@ BEGIN LTEXT "Click Next to check the summary.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Create Partition" FONT 8, "MS Shell Dlg" BEGIN @@ -79,8 +79,8 @@ BEGIN PUSHBUTTON "&Cancel",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Advanced Partition Settings" FONT 8, "MS Shell Dlg" BEGIN @@ -117,7 +117,7 @@ BEGIN PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Completing ReactOS Setup" FONT 8, "MS Shell Dlg" diff --git a/base/setup/reactos/lang/es-ES.rc b/base/setup/reactos/lang/es-ES.rc index 9d4055afed9..92cb8061e50 100644 --- a/base/setup/reactos/lang/es-ES.rc +++ b/base/setup/reactos/lang/es-ES.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalación de ReactOS" FONT 8, "MS Shell Dlg" @@ -14,7 +14,7 @@ BEGIN LTEXT "Pulse Finalizar para salir del instalador.", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalación de ReactOS" FONT 8, "MS Shell Dlg" @@ -27,7 +27,7 @@ BEGIN LTEXT "Presione Siguiente para seleccionar el tipo de instalación.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalación de ReactOS" FONT 8, "MS Shell Dlg" @@ -38,7 +38,7 @@ BEGIN LTEXT "Presione Siguiente para instalar los dispositivos.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalación de ReactOS" FONT 8, "MS Shell Dlg" @@ -53,7 +53,7 @@ BEGIN LTEXT "Presione Siguiente para configurar la instalación de dispositivos.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalación de ReactOS" FONT 8, "MS Shell Dlg" @@ -67,8 +67,8 @@ BEGIN LTEXT "Presione Siguiente para verificar el resumen.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Crear Partición" FONT 8, "MS Shell Dlg" BEGIN @@ -83,8 +83,8 @@ BEGIN PUSHBUTTON "&Cancelar",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Ajustes avanzados de la partición" FONT 8, "MS Shell Dlg" BEGIN @@ -121,7 +121,7 @@ BEGIN PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Completando la instalación de ReactOS" FONT 8, "MS Shell Dlg" diff --git a/base/setup/reactos/lang/et-EE.rc b/base/setup/reactos/lang/et-EE.rc index 1c6ac6aadb7..531491994b2 100644 --- a/base/setup/reactos/lang/et-EE.rc +++ b/base/setup/reactos/lang/et-EE.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ESTONIAN, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" @@ -10,7 +10,7 @@ BEGIN LTEXT "Vajuta lõpeta, et installeerimine lõpetada.", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOSi paigaldamine" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN LTEXT "Vajuta Järgmine, et valida paigalduse tüüp.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOSi paigaldamine" FONT 8, "MS Shell Dlg" @@ -34,7 +34,7 @@ BEGIN LTEXT "Vajuta Järgmine, et seadmeid paigaldada.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOSi paigaldamine" FONT 8, "MS Shell Dlg" @@ -49,7 +49,7 @@ BEGIN LTEXT "Vajuta Järgmine, et seadistada sihtketas.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOSi paigaldamine" FONT 8, "MS Shell Dlg" @@ -63,8 +63,8 @@ BEGIN LTEXT "Vajuta Järgmine, et seaded üle kontrollida.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Partitsiooni loomine" FONT 8, "MS Shell Dlg" BEGIN @@ -79,8 +79,8 @@ BEGIN PUSHBUTTON "&Tühista",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Täpsemad vormindamise seaded" FONT 8, "MS Shell Dlg" BEGIN @@ -117,7 +117,7 @@ BEGIN PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOSi paigaldamise lõpetamine" FONT 8, "MS Shell Dlg" diff --git a/base/setup/reactos/lang/fi-FI.rc b/base/setup/reactos/lang/fi-FI.rc index fc3e608c68e..379a964b896 100644 --- a/base/setup/reactos/lang/fi-FI.rc +++ b/base/setup/reactos/lang/fi-FI.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Asennus" FONT 8, "MS Shell Dlg" @@ -10,7 +10,7 @@ BEGIN LTEXT "Click Finish to exit the Setup.", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN LTEXT "Click Next to select the setup type.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" @@ -34,7 +34,7 @@ BEGIN LTEXT "Click Next to setup the devices.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" @@ -49,7 +49,7 @@ BEGIN LTEXT "Click Next setup of the installation device.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" @@ -63,8 +63,8 @@ BEGIN LTEXT "Click Next to check the summary.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Create Partition" FONT 8, "MS Shell Dlg" BEGIN @@ -79,8 +79,8 @@ BEGIN PUSHBUTTON "&Cancel",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Advanced Partition Settings" FONT 8, "MS Shell Dlg" BEGIN @@ -117,7 +117,7 @@ BEGIN PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Completing ReactOS Setup" FONT 8, "MS Shell Dlg" diff --git a/base/setup/reactos/lang/fr-FR.rc b/base/setup/reactos/lang/fr-FR.rc index 9c2cc13d404..51c69067a27 100644 --- a/base/setup/reactos/lang/fr-FR.rc +++ b/base/setup/reactos/lang/fr-FR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Installation de ReactOS" FONT 8, "MS Shell Dlg" @@ -10,7 +10,7 @@ BEGIN LTEXT "Cliquez sur Terminer pour quitter l'installation.", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Installation de ReactOS" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN LTEXT "Click Next to select the setup type.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Installation de ReactOS" FONT 8, "MS Shell Dlg" @@ -34,7 +34,7 @@ BEGIN LTEXT "Click Next to setup the devices.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Installation de ReactOS" FONT 8, "MS Shell Dlg" @@ -49,7 +49,7 @@ BEGIN LTEXT "Click Next setup of the installation device.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Installation de ReactOS" FONT 8, "MS Shell Dlg" @@ -63,8 +63,8 @@ BEGIN LTEXT "Click Next to check the summary.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Create Partition" FONT 8, "MS Shell Dlg" BEGIN @@ -79,8 +79,8 @@ BEGIN PUSHBUTTON "&Cancel",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Advanced Partition Settings" FONT 8, "MS Shell Dlg" BEGIN @@ -117,7 +117,7 @@ BEGIN PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Completing ReactOS Setup" FONT 8, "MS Shell Dlg" diff --git a/base/setup/reactos/lang/he-IL.rc b/base/setup/reactos/lang/he-IL.rc index 1a52d0cf729..f14d5c9c25d 100644 --- a/base/setup/reactos/lang/he-IL.rc +++ b/base/setup/reactos/lang/he-IL.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "התקנת ReactOS" FONT 8, "MS Shell Dlg" @@ -12,7 +12,7 @@ BEGIN LTEXT "לחץ על סיום כדי לסיים את ההתקנה.", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "התקנת ReactOS" FONT 8, "MS Shell Dlg" @@ -25,7 +25,7 @@ BEGIN LTEXT "לחץ על הבא כדי לבחור סוג התקנה:", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "התקנת ReactOS" FONT 8, "MS Shell Dlg" @@ -36,7 +36,7 @@ BEGIN LTEXT "לחץ על הבא כדי להגדיר את ההתקנים", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "התקנת ReactOS" FONT 8, "MS Shell Dlg" @@ -51,7 +51,7 @@ BEGIN LTEXT "לחץ על הבא כדי להגדיר את התקן ההתקנה.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "התקנת ReactOS" FONT 8, "MS Shell Dlg" @@ -65,8 +65,8 @@ BEGIN LTEXT "לחץ על הבא כדי לראות סיכום.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "יצירת מחיצה" FONT 8, "MS Shell Dlg" BEGIN @@ -81,8 +81,8 @@ BEGIN PUSHBUTTON "ביטול",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "הגדרות מחיצה מתקדמות" FONT 8, "MS Shell Dlg" BEGIN @@ -119,7 +119,7 @@ BEGIN PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "השלמת התקנת ReactOS" FONT 8, "MS Shell Dlg" diff --git a/base/setup/reactos/lang/hu-HU.rc b/base/setup/reactos/lang/hu-HU.rc index baa02c48c04..59b6c1e5082 100644 --- a/base/setup/reactos/lang/hu-HU.rc +++ b/base/setup/reactos/lang/hu-HU.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS telepítõ" FONT 8, "MS Shell Dlg" @@ -12,7 +12,7 @@ BEGIN LTEXT "Click Finish to exit the Setup.", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" @@ -25,7 +25,7 @@ BEGIN LTEXT "Click Next to select the setup type.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" @@ -36,7 +36,7 @@ BEGIN LTEXT "Click Next to setup the devices.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" @@ -51,7 +51,7 @@ BEGIN LTEXT "Click Next setup of the installation device.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" @@ -65,8 +65,8 @@ BEGIN LTEXT "Click Next to check the summary.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Create Partition" FONT 8, "MS Shell Dlg" BEGIN @@ -81,8 +81,8 @@ BEGIN PUSHBUTTON "&Cancel",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Advanced Partition Settings" FONT 8, "MS Shell Dlg" BEGIN @@ -119,7 +119,7 @@ BEGIN PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Completing ReactOS Setup" FONT 8, "MS Shell Dlg" diff --git a/base/setup/reactos/lang/it-IT.rc b/base/setup/reactos/lang/it-IT.rc index c9965002393..ee162baba82 100644 --- a/base/setup/reactos/lang/it-IT.rc +++ b/base/setup/reactos/lang/it-IT.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Installazione di ReactOS" FONT 8, "MS Shell Dlg" @@ -10,7 +10,7 @@ BEGIN LTEXT "Cliccare Fine per uscire.", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Installazione di ReactOS" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN LTEXT "Cliccare Avanti per selezionare il tipo di installazione.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Installazione di ReactOS" FONT 8, "MS Shell Dlg" @@ -34,7 +34,7 @@ BEGIN LTEXT "Cliccare Avanti per impostare i dispositivi.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Installazione di ReactOS" FONT 8, "MS Shell Dlg" @@ -49,7 +49,7 @@ BEGIN LTEXT "Cliccare Avanti per scegliere dove effettuare l'installazione.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Installazione di ReactOS" FONT 8, "MS Shell Dlg" @@ -63,8 +63,8 @@ BEGIN LTEXT "Cliccare Avanti per iniziare l'installazione.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Creazione Partizioni" FONT 8, "MS Shell Dlg" BEGIN @@ -79,8 +79,8 @@ BEGIN PUSHBUTTON "&Annulla",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Impostazioni avanzate delle partizioni" FONT 8, "MS Shell Dlg" BEGIN @@ -117,7 +117,7 @@ BEGIN PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Completamento della installazione di ReactOS" FONT 8, "MS Shell Dlg" diff --git a/base/setup/reactos/lang/no-NO.rc b/base/setup/reactos/lang/no-NO.rc index 57a55eaeeda..8e560c4d19f 100644 --- a/base/setup/reactos/lang/no-NO.rc +++ b/base/setup/reactos/lang/no-NO.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS installering" FONT 8, "MS Shell Dlg" @@ -10,7 +10,7 @@ BEGIN LTEXT "Trykk på Fullført for å avslutte installeringen.", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS installering" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN LTEXT "Trykk på Neste for å velge installering type.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS installering" FONT 8, "MS Shell Dlg" @@ -34,7 +34,7 @@ BEGIN LTEXT "Trykk på Neste for installere enhetene.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS installering" FONT 8, "MS Shell Dlg" @@ -49,7 +49,7 @@ BEGIN LTEXT "Trykk på Neste for å installere enhetene.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS installering" FONT 8, "MS Shell Dlg" @@ -63,8 +63,8 @@ BEGIN LTEXT "Trykk på Neste for å starte installasjon prosessen.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Opprett partisjon" FONT 8, "MS Shell Dlg" BEGIN @@ -79,8 +79,8 @@ BEGIN PUSHBUTTON "&Avbryt",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Avansert partisjon innstillinger" FONT 8, "MS Shell Dlg" BEGIN @@ -117,7 +117,7 @@ BEGIN PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Fullfører ReactOS installering" FONT 8, "MS Shell Dlg" diff --git a/base/setup/reactos/lang/pl-PL.rc b/base/setup/reactos/lang/pl-PL.rc index b2efea3021e..403006b5765 100644 --- a/base/setup/reactos/lang/pl-PL.rc +++ b/base/setup/reactos/lang/pl-PL.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" @@ -20,7 +20,7 @@ BEGIN LTEXT "Naciśnij przycisk aby zakończyć pracę Instalatora.", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" @@ -33,7 +33,7 @@ BEGIN LTEXT "Naciśnij Dalej, aby wybrać rodzaj instalacji.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN LTEXT "Naciśnij Dalej, aby zmienić ustawienia sprzętu.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" @@ -59,7 +59,7 @@ BEGIN LTEXT "Naciśnij Dalej, aby ustalić miejsce instalacji.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalator ReactOS" FONT 8, "MS Shell Dlg" @@ -73,8 +73,8 @@ BEGIN LTEXT "Naciśnij Dalej, aby rozpocząć proces instalacji.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Stwórz partycję" FONT 8, "MS Shell Dlg" BEGIN @@ -89,8 +89,8 @@ BEGIN PUSHBUTTON "&Anuluj",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Zaawansowane ustawienia partycji" FONT 8, "MS Shell Dlg" BEGIN @@ -127,7 +127,7 @@ BEGIN PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Kończenie instalacji ReactOS" FONT 8, "MS Shell Dlg" diff --git a/base/setup/reactos/lang/pt-BR.rc b/base/setup/reactos/lang/pt-BR.rc index 2ddf45671b0..d583e79729c 100644 --- a/base/setup/reactos/lang/pt-BR.rc +++ b/base/setup/reactos/lang/pt-BR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalação do ReactOS" FONT 8, "MS Shell Dlg" @@ -10,7 +10,7 @@ BEGIN LTEXT "Clique em Finalizar para sair da Instalação.", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalação do ReactOS" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN LTEXT "Clique em Próximo e selecione o modo de instalação.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalação do ReactOS" FONT 8, "MS Shell Dlg" @@ -34,7 +34,7 @@ BEGIN LTEXT "Clique em Próximo para configurar os dispositivos.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalação do ReactOS" FONT 8, "MS Shell Dlg" @@ -49,7 +49,7 @@ BEGIN LTEXT "Clique em Próximo para configurar o dispositivo de instalação.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalação do ReactOS" FONT 8, "MS Shell Dlg" @@ -63,8 +63,8 @@ BEGIN LTEXT "Clique em Próximo para verificar o sumário.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Criar Partição" FONT 8, "MS Shell Dlg" BEGIN @@ -79,8 +79,8 @@ BEGIN PUSHBUTTON "&Cancelar",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Configurações Avançadas de Particionamento" FONT 8, "MS Shell Dlg" BEGIN @@ -117,7 +117,7 @@ BEGIN PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Finalizando Instalação do ReactOS" FONT 8, "MS Shell Dlg" diff --git a/base/setup/reactos/lang/ro-RO.rc b/base/setup/reactos/lang/ro-RO.rc index 538cb2b16ef..6951b93dd02 100644 --- a/base/setup/reactos/lang/ro-RO.rc +++ b/base/setup/reactos/lang/ro-RO.rc @@ -1,7 +1,7 @@ //2011.10.30 - Fulea Ștefan: UTF-8 encoding, diacritics, minor changes LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalare ReactOS" FONT 8, "MS Shell Dlg" @@ -11,7 +11,7 @@ BEGIN LTEXT "Apăsați pe „Termină” pentru a ieși.", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalare ReactOS" FONT 8, "MS Shell Dlg" @@ -24,7 +24,7 @@ BEGIN LTEXT "Apăsați pe „Înainte” pentru a specifica tipul instalării.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalare ReactOS" FONT 8, "MS Shell Dlg" @@ -35,7 +35,7 @@ BEGIN LTEXT "Apăsați pe „Înainte” pentru configurarea de dispozitive.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalare ReactOS" FONT 8, "MS Shell Dlg" @@ -50,7 +50,7 @@ BEGIN LTEXT "Apăsați pe „Înainte” pentru configurarea dispozitivului de instalare.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalare ReactOS" FONT 8, "MS Shell Dlg" @@ -64,8 +64,8 @@ BEGIN LTEXT "Apăsați pe „Înainte” pentru a verifica sumarul.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Creare partiție" FONT 8, "MS Shell Dlg" BEGIN @@ -80,8 +80,8 @@ BEGIN PUSHBUTTON "A&nulează",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Opțiuni avansate partiție" FONT 8, "MS Shell Dlg" BEGIN @@ -118,7 +118,7 @@ BEGIN PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Încheiere instalare ReactOS" FONT 8, "MS Shell Dlg" diff --git a/base/setup/reactos/lang/ru-RU.rc b/base/setup/reactos/lang/ru-RU.rc index ff10bb026a6..83be4904887 100644 --- a/base/setup/reactos/lang/ru-RU.rc +++ b/base/setup/reactos/lang/ru-RU.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" @@ -12,7 +12,7 @@ BEGIN LTEXT "Нажмите кнопку ""ЗавершитьW"" для выхода.", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" @@ -25,7 +25,7 @@ BEGIN LTEXT "Для выбора типа установки нажмите ""Далее"".", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" @@ -36,7 +36,7 @@ BEGIN LTEXT "Для установки устройств нажмите ""Далее"".", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" @@ -51,7 +51,7 @@ BEGIN LTEXT "Для установки устройств нажмите ""Далее"".", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" @@ -65,8 +65,8 @@ BEGIN LTEXT "Для начала установки нажмите ""Далее"".", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Create Partition" FONT 8, "MS Shell Dlg" BEGIN @@ -81,8 +81,8 @@ BEGIN PUSHBUTTON "&Отставить",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Дополнительные параметры установки" FONT 8, "MS Shell Dlg" BEGIN @@ -119,7 +119,7 @@ BEGIN PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Завершение установки ReactOS" FONT 8, "MS Shell Dlg" diff --git a/base/setup/reactos/lang/sk-SK.rc b/base/setup/reactos/lang/sk-SK.rc index 20597699d81..2bcbe049a01 100644 --- a/base/setup/reactos/lang/sk-SK.rc +++ b/base/setup/reactos/lang/sk-SK.rc @@ -5,7 +5,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Inštalácia systému ReactOS" //ReactOS Setup FONT 8, "MS Shell Dlg" @@ -15,7 +15,7 @@ BEGIN LTEXT "Inštaláciu ukončíte kliknutím na tlačidlo Dokončiť.", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Inštalácia systému ReactOS" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN LTEXT "Click Next to select the setup type.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Inštalácia systému ReactOS" FONT 8, "MS Shell Dlg" @@ -39,7 +39,7 @@ BEGIN LTEXT "Click Next to setup the devices.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Inštalácia systému ReactOS" FONT 8, "MS Shell Dlg" @@ -54,7 +54,7 @@ BEGIN LTEXT "Click Next setup of the installation device.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Inštalácia systému ReactOS" FONT 8, "MS Shell Dlg" @@ -68,8 +68,8 @@ BEGIN LTEXT "Click Next to check the summary.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Vytvoriť partíciu" FONT 8, "MS Shell Dlg" BEGIN @@ -84,8 +84,8 @@ BEGIN PUSHBUTTON "&Zrušiť",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Rozšírené nastavenia partície" FONT 8, "MS Shell Dlg" BEGIN @@ -122,7 +122,7 @@ BEGIN PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Completing ReactOS Setup" FONT 8, "MS Shell Dlg" diff --git a/base/setup/reactos/lang/tr-TR.rc b/base/setup/reactos/lang/tr-TR.rc index 60207470ee2..eb236aa6aa8 100644 --- a/base/setup/reactos/lang/tr-TR.rc +++ b/base/setup/reactos/lang/tr-TR.rc @@ -1,97 +1,102 @@ +/* + * TRANSLATORS: 2012 - Arda Tanrıkulu (ardatanrikulu@gmail.com) + * 2013 - Erdem Ersoy (eersoy93) (erdemersoy@live.com) + */ + LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Kur" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "ReactOS Kurulum Sihirbazı'na hoşgeldiniz.", IDC_STARTTITLE, 115, 8, 195, 24 - LTEXT "You cannot install ReactOS directly from this CD yet! Please restart your computer from this CD in order to install ReactOS.", IDC_STATIC, 115, 40, 195, 100 - LTEXT "Çıkmak için Bitir'e basın.", IDC_STATIC, 115, 169, 195, 17 + LTEXT "ReactOS Kur'a Hoşgeldiniz.", IDC_STARTTITLE, 115, 8, 195, 24 + LTEXT "Daha bu CD'den ReactOS'u doğrudan kuramazsınız. Bu CD'den ReactOS'u kurmak için bilgisayarınızı yeniden başlatınız.", IDC_STATIC, 115, 40, 195, 100 + LTEXT "Kur'dan çıkmak için ""İptal"" düğmesine tıklayınız.", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Kur" FONT 8, "MS Shell Dlg" BEGIN CONTROL "IDB_LOGO", IDB_ROSLOGO, "Static", WS_CHILD | WS_VISIBLE | SS_OWNERDRAW, 18, 0, 290, 99 - CONTROL "Kurulum dili:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 109, 106, 11 + CONTROL "Kurulum Dili:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 109, 106, 11 CONTROL "", IDC_LANGUAGES, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 132, 107, 176, 142 - CONTROL "Klavye ve giriş metodu:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 142, 106, 11 + CONTROL "Düğme Takımı Düzeni:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 142, 106, 11 CONTROL "", IDC_KEYLAYOUT, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 132, 141, 176, 81 - LTEXT "Kurulum tipini seçmek için devam edin.", IDC_STATIC, 10, 180 ,297, 10 + LTEXT "Kurulum türünü seçmek için ""İleri >"" düğmesine tıklayınız.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Kur" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Kurulum tipi", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 - CONTROL "ReactOS'u yükle", IDC_INSTALL, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 20, 15, 277, 10 - CONTROL "ReactOS'u kur yada onar", IDC_SETUP, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 20, 30, 277, 10 - LTEXT "Aygıtları yüklemek için devam edin.", IDC_STATIC, 10, 180 ,297, 10 + CONTROL "Kurulum Türü", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 + CONTROL "ReactOS'u Yükleme", IDC_INSTALL, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 20, 15, 277, 10 + CONTROL "ReactOS'u Onarma ya da Yükseltme", IDC_SETUP, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 20, 30, 277, 10 + LTEXT "Aygıt seçeneklerini seçmek için ""İleri >"" düğmesine tıklayınız.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Kur" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Aygıt ayarları", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 - LTEXT "Bilgisayar:", IDC_STATIC, 20,15, 80, 10 + CONTROL "Aygıt Seçenekleri", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172 + LTEXT "Bilgisayar Türü:", IDC_STATIC, 20,15, 80, 10 CONTROL "", IDC_COMPUTER, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 15, 180, 80 - LTEXT "Görüntü:", IDC_STATIC, 20,35, 80, 10 + LTEXT "Görüntü Ayarları:", IDC_STATIC, 20,35, 80, 10 CONTROL "", IDC_DISPLAY, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 35, 180, 80 - LTEXT "Klavye:", IDC_STATIC, 20,55, 80, 10 + LTEXT "Düğme Takımı Türü:", IDC_STATIC, 20,55, 80, 10 CONTROL "", IDC_KEYBOARD, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 55, 180, 80 - LTEXT "Aygıt kurulumunu tamamlamak için devam edin.", IDC_STATIC, 10, 180 ,277, 20 + LTEXT "Kurulum yapılacak bölümü seçmek için ""İleri >"" düğmesine tıklayınız.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Kur" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "ReactOS kurulacak bölümü", IDC_STATIC, "Button", BS_GROUPBOX, 10,1,298,176 + CONTROL "ReactOS'un Kurulacağı Bölüm", IDC_STATIC, "Button", BS_GROUPBOX, 10,1,298,176 LISTBOX IDC_PARTITION, 20,12,278,142,LBS_HASSTRINGS | WS_VSCROLL - PUSHBUTTON "&Oluştur", IDC_PARTCREATE, 20,155,50,15 + PUSHBUTTON "&Oluştur...", IDC_PARTCREATE, 20,155,50,15 PUSHBUTTON "&Sil", IDC_PARTDELETE, 76,155,50,15 PUSHBUTTON "S&ürücü", IDC_DEVICEDRIVER, 162,155,50,15, WS_DISABLED - PUSHBUTTON "&Gelişmiş seçenekler...", IDC_PARTMOREOPTS, 218,155,80,15 - LTEXT "Kurulum özetini görmek için devam edin.", IDC_STATIC, 10, 180 ,277, 20 + PUSHBUTTON "G&elişmiş Seçenekler...", IDC_PARTMOREOPTS, 218,155,80,15 + LTEXT "Kurulum özetini görmek için ""İleri >"" düğmesine tıklayınız.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME -CAPTION "Bölüm Oluştur" +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION +CAPTION "Bölüm Oluşturma" FONT 8, "MS Shell Dlg" BEGIN CONTROL "",IDC_UPDOWN1,"msctls_updown32", WS_VISIBLE,104,22,9,13 - CONTROL "Bölüm oluştur ve biçimlendir",IDC_STATIC,"Button",BS_GROUPBOX,7,5,129,57 - LTEXT "Boyut:",IDC_STATIC, 13,24,27,9 + CONTROL "Bölüm Oluşturma",IDC_STATIC,"Button",BS_GROUPBOX,7,5,129,57 + LTEXT "Büyüklük:",IDC_STATIC, 13,24,27,9 EDITTEXT IDC_PARTSIZE,52,23,53,13, WS_VISIBLE|WS_TABSTOP LTEXT "GB",IDC_UNIT, 117,24,14,9 - LTEXT "Dosya Sistemi:",IDC_STATIC,13,46,35,9 + LTEXT "Kütük Dizgesi:",IDC_STATIC,13,46,35,9 CONTROL "",IDC_FSTYPE,"ComboBox",WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,52,42,79,50 PUSHBUTTON "Tamam",IDOK,35,68,47,15, WS_VISIBLE|WS_TABSTOP PUSHBUTTON "İptal",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME -CAPTION "Gelişmiş Disk Bölümleme Seçenekleri" +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION +CAPTION "Gelişmiş Seçenekler" FONT 8, "MS Shell Dlg" BEGIN CONTROL "Kurulum Dizini", IDC_STATIC, "Button", BS_GROUPBOX, 4,1,298,30 EDITTEXT IDC_PATH, 10,11,278,13, WS_VISIBLE - CONTROL "Başlangıç yükleyicisi kurulumu", IDC_STATIC, "Button", BS_GROUPBOX, 4,36,298,52 + CONTROL "Önyükleyici Kurulumu", IDC_STATIC, "Button", BS_GROUPBOX, 4,36,298,52 - CONTROL "Sabit diske başlangıç yükleyicisini (MBR ve VBR)", IDC_INSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,46,278,11 - CONTROL "Sabit diske başlangıç yükleyicisini kur (Sadece VBR)", IDC_INSTVBRONLY, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,57,278,11 - CONTROL "Başlangıç yükleyicisi kurma", IDC_NOINSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,68,278,11 + CONTROL "Önyükleyici, diskin MBR'sine ve VBR'sine kurulsun.", IDC_INSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,46,278,11 + CONTROL "Önyükleyici, diskin yalnızca VBR'sine kurulsun.", IDC_INSTVBRONLY, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,57,278,11 + CONTROL "Önyükleyici kurulmasın.", IDC_NOINSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED, 10,68,278,11 PUSHBUTTON "Tamam", IDOK, 180,94,50,15, WS_TABSTOP | WS_VISIBLE PUSHBUTTON "İptal", IDCANCEL, 240,94,50,15, WS_TABSTOP | WS_VISIBLE END @@ -102,7 +107,7 @@ CAPTION "ReactOS Kur" FONT 8, "MS Shell Dlg" BEGIN CONTROL "Kurulum Özeti", IDC_ACTION, "Button", BS_GROUPBOX, 10,0,297,172 - LTEXT "Kurulumu başlatmak için İleri'ye basın.", IDC_STATIC, 10, 180 ,277, 20 + LTEXT "Kurulumu başlatmak için ""İleri >"" düğmesine tıklayınız.", IDC_STATIC, 10, 180 ,277, 20 END IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193 @@ -110,43 +115,43 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYS CAPTION "ReactOS Kur" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Kurulum işlemi", IDC_ACTION, "Button", BS_GROUPBOX, 10,0,297,172 - LTEXT "Dosyaları yükle...", IDC_ACTIVITY, 20, 50, 277, 10 - LTEXT "test.txt", IDC_ITEM, 30, 80, 257, 10 + CONTROL "Kurulum Süreci", IDC_ACTION, "Button", BS_GROUPBOX, 10,0,297,172 + LTEXT "Kütükler yükleniyor...", IDC_ACTIVITY, 20, 50, 277, 10 + LTEXT "sınama.txt", IDC_ITEM, 30, 80, 257, 10 CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Kur" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "ReactOS Kur'un ilk aşaması tamamlanıyor...", IDC_FINISHTITLE, "Button", BS_GROUPBOX, 10,0,297,172 - LTEXT "Kurulumun ilk aşaması tamamlandı.", IDC_STATIC, 20, 50, 277, 10 + CONTROL "ReactOS Kurulumunun İlk Aşaması Bitmesi", IDC_FINISHTITLE, "Button", BS_GROUPBOX, 10,0,297,172 + LTEXT "ReactOS kurulumunun ilk aşaması bitti.", IDC_STATIC, 20, 50, 277, 10 - LTEXT "Bitir'e bastığınız anda bilgisayarınız yeniden başlatılacak.", IDC_STATIC, 20, 80, 277, 10 + LTEXT """Bitir"" düğmesine bastığınızda bilgisayarınız yeniden başlatılacak.", IDC_STATIC, 20, 80, 277, 10 CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 - LTEXT "Eğer sürücünüzde CD varsa, hemen çıkarın ve bilgisayarı yeniden başlatmak için Bitir'e basın.", IDC_STATIC, 10, 180, 297, 20 + LTEXT "Eğer bilgisayarınızda takılı bir CD varsa onu çıkarttığınızdan sonra ""Bitir"" düğmesine tıklayınız.", IDC_STATIC, 10, 180, 297, 20 END STRINGTABLE BEGIN IDS_LANGTITLE "Dil Seçimi" - IDS_LANGSUBTITLE "Kurulum ve sistem için dilinizi seçiniz." + IDS_LANGSUBTITLE "Kurulum ve dizge dilini seçiniz." IDS_TYPETITLE "ReactOS Kur'a Hoşgeldiniz" - IDS_TYPESUBTITLE "Kurulum tipi seçimi" - IDS_DEVICETITLE "Temel aygıtların kurulumu" - IDS_DEVICESUBTITLE "Görüntü ve klavye ayarlar seçimi" - IDS_DRIVETITLE "Kurulacak disk bölümü ve klasör seçimi" - IDS_DRIVESUBTITLE "Kurulum bölümünün, sistem klasörünün ve başlangıç yükleyicisinin hazırlanması." - IDS_PROCESSTITLE "Disk bölümü ayarlama, dosyaları kopyalama ve sistem yapılandırması" - IDS_PROCESSSUBTITLE "Disk bölümü oluştur ve biçimlendir ardından dosyaları kopyalama" - IDS_RESTARTTITLE "Kurulumun ilk aşaması tamamlandı" - IDS_RESTARTSUBTITLE "Kurulumun ilk aşaması tamamlandı ve ikinciye geçmek için yeniden başlatmak gerekiyor" + IDS_TYPESUBTITLE "Kurulum türünü seçiniz." + IDS_DEVICETITLE "Aygıt Seçeneklerinin Seçilmesi" + IDS_DEVICESUBTITLE "Görüntü ayarlarını ve düğme takımı türünü seçiniz." + IDS_DRIVETITLE "Kurulum Yapılacak Bölümün Seçilmesi" + IDS_DRIVESUBTITLE "Kurulum yapılacak bölümü, kurulum dizinini ve önyükleyici seçeneklerini seçiniz." + IDS_PROCESSTITLE "Bölümün Biçimlendirilmesi, Kütüklerin Çoğaltılması ve Önyükleyicinin Kurulması" + IDS_PROCESSSUBTITLE "Bölüm biçimlendiriliyor, kütükler çoğaltılıyor ve önyükleyici kuruluyor." + IDS_RESTARTTITLE "Kurulumun İlk Aşamasının Bitmesi" + IDS_RESTARTSUBTITLE "Kurulumun ilk aşaması bitti. İkincisine geçmek için bilgisayarı yeniden başlatınız." IDS_SUMMARYTITLE "Kurulum Özeti" - IDS_SUMMARYSUBTITLE "List installation properties to check before apply to the installation device" - IDS_ABORTSETUP "ReactOS is not completely installed on your computer. If you quit Setup now, you will need to run Setup again to install Reactos. Really quit?" - IDS_ABORTSETUP2 "Kurulumu iptal mi edeyim?" + IDS_SUMMARYSUBTITLE "Kurulumdan önce, dizelgelenen kurulum seçeneklerini gözden geçiriniz." + IDS_ABORTSETUP "ReactOS kurulumu bitmedi. Eğer Kur'dan çıkarsanız, ReactOS'u kurmak için Kur'u yeniden çalıştırabilirsiniz. Çıkmayı onaylıyor musunuz?" + IDS_ABORTSETUP2 "Kurulum iptal edilsin mi?" END /* EOF */ diff --git a/base/setup/reactos/lang/uk-UA.rc b/base/setup/reactos/lang/uk-UA.rc index a2c9e1c1b7b..35800b531aa 100644 --- a/base/setup/reactos/lang/uk-UA.rc +++ b/base/setup/reactos/lang/uk-UA.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" @@ -18,7 +18,7 @@ BEGIN LTEXT "Натисніть кнопку Завершити для виходу.", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" @@ -31,7 +31,7 @@ BEGIN LTEXT "Для вибору типу встановлення натисніть Далі.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" @@ -42,7 +42,7 @@ BEGIN LTEXT "Для встановлення пристроїв натисніть Далі.", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" @@ -57,7 +57,7 @@ BEGIN LTEXT "Для встановлення пристроїв натисніть Далі.", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" @@ -71,8 +71,8 @@ BEGIN LTEXT "Для початку встановлення натисніть Далі", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 172, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_PARTITION DIALOGEX 0, 0, 172, 90 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Створення розділу" FONT 8, "MS Shell Dlg" BEGIN @@ -87,8 +87,8 @@ BEGIN PUSHBUTTON "&Скасувати",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "Розширені параметри розділу" FONT 8, "MS Shell Dlg" BEGIN @@ -125,7 +125,7 @@ BEGIN PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Завершення встановлення ReactOS" FONT 8, "MS Shell Dlg" diff --git a/base/setup/reactos/lang/zh-CN.rc b/base/setup/reactos/lang/zh-CN.rc index 6269d858f33..fc6a6cca34c 100644 --- a/base/setup/reactos/lang/zh-CN.rc +++ b/base/setup/reactos/lang/zh-CN.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -IDD_STARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_STARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS 安装" FONT 8, "MS Shell Dlg" @@ -10,7 +10,7 @@ BEGIN LTEXT "点击完成退出安装。", IDC_STATIC, 115, 169, 195, 17 END -IDD_LANGSELPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_LANGSELPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS 安装" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN LTEXT "点击下一步选择安装类型。", IDC_STATIC, 10, 180 ,297, 10 END -IDD_TYPEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_TYPEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS 安装" FONT 8, "MS Shell Dlg" @@ -34,7 +34,7 @@ BEGIN LTEXT "点击下一步安装设备。", IDC_STATIC, 10, 180 ,297, 10 END -IDD_DEVICEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DEVICEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS 安装" FONT 8, "MS Shell Dlg" @@ -49,7 +49,7 @@ BEGIN LTEXT "点击下一步设置安装驱动器。", IDC_STATIC, 10, 180 ,277, 20 END -IDD_DRIVEPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_DRIVEPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS 安装" FONT 8, "MS Shell Dlg" @@ -63,8 +63,8 @@ BEGIN LTEXT "点击下一步检查安装概要。", IDC_STATIC, 10, 180 ,277, 20 END -IDD_PARTITION DIALOGEX DISCARDABLE 0, 0, 145, 90 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_PARTITION DIALOGEX 0, 0, 145, 90 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "建立分区" FONT 8, "MS Shell Dlg" BEGIN @@ -79,8 +79,8 @@ BEGIN PUSHBUTTON "取消(&C)",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP END -IDD_BOOTOPTIONS DIALOGEX DISCARDABLE 0, 0, 305, 116 -STYLE WS_VISIBLE|WS_CAPTION|WS_THICKFRAME +IDD_BOOTOPTIONS DIALOGEX 0, 0, 305, 116 +STYLE WS_VISIBLE|WS_CAPTION CAPTION "高级分区设置" FONT 8, "MS Shell Dlg" BEGIN @@ -117,7 +117,7 @@ BEGIN PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8 END -IDD_RESTARTPAGE DIALOGEX DISCARDABLE 0, 0, 317, 193 +IDD_RESTARTPAGE DIALOGEX 0, 0, 317, 193 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS 安装完成" FONT 8, "MS Shell Dlg" diff --git a/base/setup/reactos/reactos.rc b/base/setup/reactos/reactos.rc index 1eb064bf143..ddd825c7582 100644 --- a/base/setup/reactos/reactos.rc +++ b/base/setup/reactos/reactos.rc @@ -20,6 +20,8 @@ IDB_WATERMARK BITMAP "res/watermark.bmp" IDB_HEADER BITMAP "res/header.bmp" IDB_ROSLOGO BITMAP "res/rosbitmap.bmp" +#include + /* Language-specific resources */ #include "rsrc.rc" diff --git a/base/setup/usetup/lang/bg-BG.h b/base/setup/usetup/lang/bg-BG.h index 1119bb9251e..f8ca9a7641c 100644 --- a/base/setup/usetup/lang/bg-BG.h +++ b/base/setup/usetup/lang/bg-BG.h @@ -1658,11 +1658,11 @@ MUI_STRING bgBGStrings[] = {STRING_REBOOTCOMPUTER2, " ENTER = १᪠ "}, {STRING_CONSOLEFAIL1, - "⢠ﭥ ꧬ\n\n"}, + "⢠ﭥ ꧬ\r\n\r\n"}, {STRING_CONSOLEFAIL2, - " 碠 - 㯮ॡ USB \n"}, + " 碠 - 㯮ॡ USB \r\n"}, {STRING_CONSOLEFAIL3, - "ꦪ USB ꫭ\n"}, + "ꦪ USB ꫭ\r\n"}, {STRING_FORMATTINGDISK, " ଠ࠭ ᪠"}, {STRING_CHECKINGDISK, diff --git a/base/setup/usetup/lang/cs-CZ.h b/base/setup/usetup/lang/cs-CZ.h index a38da327cd1..1bb8dd6e600 100644 --- a/base/setup/usetup/lang/cs-CZ.h +++ b/base/setup/usetup/lang/cs-CZ.h @@ -1654,11 +1654,11 @@ MUI_STRING csCZStrings[] = {STRING_REBOOTCOMPUTER2, " ENTER = Restartovat pota"}, {STRING_CONSOLEFAIL1, - "Nelze otevt konzoli\n\n"}, + "Nelze otevt konzoli\r\n\r\n"}, {STRING_CONSOLEFAIL2, - "Nejbاnj pinou je pouvn USB klvesnice\n"}, + "Nejbاnj pinou je pouvn USB klvesnice\r\n"}, {STRING_CONSOLEFAIL3, - "USB klvesnice zatm nejsou pln podporovny\n"}, + "USB klvesnice zatm nejsou pln podporovny\r\n"}, {STRING_FORMATTINGDISK, "Instalace formtuje disk"}, {STRING_CHECKINGDISK, diff --git a/base/setup/usetup/lang/de-DE.h b/base/setup/usetup/lang/de-DE.h index 00ca11907e7..0ec4b5cc6db 100644 --- a/base/setup/usetup/lang/de-DE.h +++ b/base/setup/usetup/lang/de-DE.h @@ -1647,11 +1647,11 @@ MUI_STRING deDEStrings[] = {STRING_REBOOTCOMPUTER2, " ENTER = Computer neu starten"}, {STRING_CONSOLEFAIL1, - "Konsole konnte nicht geffnet werden\n\n"}, + "Konsole konnte nicht geffnet werden\r\n\r\n"}, {STRING_CONSOLEFAIL2, - "Der hufigste Grund hierfr ist die Verwendung einer USB-Tastatur\n"}, + "Der hufigste Grund hierfr ist die Verwendung einer USB-Tastatur\r\n"}, {STRING_CONSOLEFAIL3, - "USB-Tastaturen werden noch nicht vollstndig untersttzt\n"}, + "USB-Tastaturen werden noch nicht vollstndig untersttzt\r\n"}, {STRING_FORMATTINGDISK, "Setup formatiert Ihre Festplatte"}, {STRING_CHECKINGDISK, diff --git a/base/setup/usetup/lang/el-GR.h b/base/setup/usetup/lang/el-GR.h index 16fc2d3f57d..fd5cac13c73 100644 --- a/base/setup/usetup/lang/el-GR.h +++ b/base/setup/usetup/lang/el-GR.h @@ -1009,13 +1009,13 @@ static MUI_ENTRY elGRBootLoaderEntries[] = { 8, 12, - "Install bootloader on the harddisk (MBR and VBR).", + "ᩫ bootloader 婡 (MBR and VBR).", TEXT_STYLE_NORMAL }, { 8, 13, - "Install bootloader on the harddisk (VBR only).", + "ᩫ bootloader 婡 (VBR only).", TEXT_STYLE_NORMAL }, { @@ -1670,11 +1670,11 @@ MUI_STRING elGRStrings[] = {STRING_REBOOTCOMPUTER2, " ENTER = 夞 "}, {STRING_CONSOLEFAIL1, - "礘 梘\n\n"}, + "礘 梘\r\n\r\n"}, {STRING_CONSOLEFAIL2, - "The most common cause of this is using an USB keyboard\n"}, + "The most common cause of this is using an USB keyboard\r\n"}, {STRING_CONSOLEFAIL3, - " USB 暠 夘 棜 棘\n"}, + " USB 暠 夘 棜 棘\r\n"}, {STRING_FORMATTINGDISK, " ᩫ 餜 婡 "}, {STRING_CHECKINGDISK, diff --git a/base/setup/usetup/lang/en-US.h b/base/setup/usetup/lang/en-US.h index 909552f277d..b89e0e4b93e 100644 --- a/base/setup/usetup/lang/en-US.h +++ b/base/setup/usetup/lang/en-US.h @@ -1645,11 +1645,11 @@ MUI_STRING enUSStrings[] = {STRING_REBOOTCOMPUTER2, " ENTER = Reboot computer"}, {STRING_CONSOLEFAIL1, - "Unable to open the console\n\n"}, + "Unable to open the console\r\n\r\n"}, {STRING_CONSOLEFAIL2, - "The most common cause of this is using an USB keyboard\n"}, + "The most common cause of this is using an USB keyboard\r\n"}, {STRING_CONSOLEFAIL3, - "USB keyboards are not fully supported yet\n"}, + "USB keyboards are not fully supported yet\r\n"}, {STRING_FORMATTINGDISK, "Setup is formatting your disk"}, {STRING_CHECKINGDISK, diff --git a/base/setup/usetup/lang/es-ES.h b/base/setup/usetup/lang/es-ES.h index 1df39349954..930accac885 100644 --- a/base/setup/usetup/lang/es-ES.h +++ b/base/setup/usetup/lang/es-ES.h @@ -992,13 +992,13 @@ static MUI_ENTRY esESBootLoaderEntries[] = { 8, 12, - "Install bootloader on the harddisk (MBR and VBR).", + "Instalar cargador de arranque en el disco duro (MBR and VBR).", TEXT_STYLE_NORMAL }, { 8, 13, - "Install bootloader on the harddisk (VBR only).", + "Instalar cargador de arranque en el disco duro (VBR only).", TEXT_STYLE_NORMAL }, { @@ -1652,11 +1652,11 @@ MUI_STRING esESStrings[] = {STRING_REBOOTCOMPUTER2, " ENTER = Reiniciar el equipo"}, {STRING_CONSOLEFAIL1, - "Incapaz de abrir la consola\n\n"}, + "Incapaz de abrir la consola\r\n\r\n"}, {STRING_CONSOLEFAIL2, - "La causa ms comn es la utilizacin de un teclado USB\n"}, + "La causa ms comn es la utilizacin de un teclado USB\r\n"}, {STRING_CONSOLEFAIL3, - "Los teclados USB aun no son soportados completamente\n"}, + "Los teclados USB aun no son soportados completamente\r\n"}, {STRING_FORMATTINGDISK, "El instalador est formateando su disco"}, {STRING_CHECKINGDISK, diff --git a/base/setup/usetup/lang/et-EE.h b/base/setup/usetup/lang/et-EE.h index bb3349ed929..ec85f59065e 100644 --- a/base/setup/usetup/lang/et-EE.h +++ b/base/setup/usetup/lang/et-EE.h @@ -1643,11 +1643,11 @@ MUI_STRING etEEStrings[] = {STRING_REBOOTCOMPUTER2, " ENTER = Taaskivita arvuti"}, {STRING_CONSOLEFAIL1, - "Konsooli ei nnestunud avada\n\n"}, + "Konsooli ei nnestunud avada\r\n\r\n"}, {STRING_CONSOLEFAIL2, - "Tenoliselt on probleem USB klaviatuuri kasutamises\n"}, + "Tenoliselt on probleem USB klaviatuuri kasutamises\r\n"}, {STRING_CONSOLEFAIL3, - "USB klaviatuurid ei ole veel toetatud\n"}, + "USB klaviatuurid ei ole veel toetatud\r\n"}, {STRING_FORMATTINGDISK, "Kvaketta vormindamine"}, {STRING_CHECKINGDISK, diff --git a/base/setup/usetup/lang/fr-FR.h b/base/setup/usetup/lang/fr-FR.h index 460411b6462..7712bbe48e9 100644 --- a/base/setup/usetup/lang/fr-FR.h +++ b/base/setup/usetup/lang/fr-FR.h @@ -998,13 +998,13 @@ static MUI_ENTRY frFRBootLoaderEntries[] = { 8, 12, - "Installer le chargeur de dmarrage sur le disque (MBR et VBR).", + "Installer le chargeur de dmarrage sur le disque dur (MBR et VBR).", TEXT_STYLE_NORMAL }, { 8, 13, - "Installer le chargeur de dmarrage sur le disque (VBR seulement).", + "Installer le chargeur de dmarrage sur le disque dur (VBR seulement).", TEXT_STYLE_NORMAL }, { @@ -1659,11 +1659,11 @@ MUI_STRING frFRStrings[] = {STRING_REBOOTCOMPUTER2, " ENTRE = Redmarrer l'ordinateur"}, {STRING_CONSOLEFAIL1, - "Impossible d'ouvrir la console\n\n"}, + "Impossible d'ouvrir la console\r\n\r\n"}, {STRING_CONSOLEFAIL2, - "La cause propbable est l'utilisation d'un clavier USB\n"}, + "La cause probable est l'utilisation d'un clavier USB\r\n"}, {STRING_CONSOLEFAIL3, - "Les claviers USB ne sont pas compltement supports actuellement\n"}, + "Les claviers USB ne sont pas compltement supports actuellement\r\n"}, {STRING_FORMATTINGDISK, "Setup formate votre disque"}, {STRING_CHECKINGDISK, diff --git a/base/setup/usetup/lang/he-IL.h b/base/setup/usetup/lang/he-IL.h index eb869b7cfb3..9bdc3a8d2b3 100644 --- a/base/setup/usetup/lang/he-IL.h +++ b/base/setup/usetup/lang/he-IL.h @@ -1646,11 +1646,11 @@ MUI_STRING heILStrings[] = {STRING_REBOOTCOMPUTER2, " ENTER = "}, {STRING_CONSOLEFAIL1, - "Unable to open the console\n\n"}, + "Unable to open the console\r\n\r\n"}, {STRING_CONSOLEFAIL2, - "The most common cause of this is using an USB keyboard\n"}, + "The most common cause of this is using an USB keyboard\r\n"}, {STRING_CONSOLEFAIL3, - "USB keyboards are not fully supported yet\n"}, + "USB keyboards are not fully supported yet\r\n"}, {STRING_FORMATTINGDISK, "Setup is formatting your disk"}, {STRING_CHECKINGDISK, diff --git a/base/setup/usetup/lang/it-IT.h b/base/setup/usetup/lang/it-IT.h index 7741e832f4c..b0992abe30c 100644 --- a/base/setup/usetup/lang/it-IT.h +++ b/base/setup/usetup/lang/it-IT.h @@ -1647,11 +1647,11 @@ MUI_STRING itITStrings[] = {STRING_REBOOTCOMPUTER2, " INVIO = Riavvia il computer"}, {STRING_CONSOLEFAIL1, - "Impossibile aprire la console\n\n"}, + "Impossibile aprire la console\r\n\r\n"}, {STRING_CONSOLEFAIL2, - "La causa pi frequente di questo l'uso di una tastiera USB\n"}, + "La causa pi frequente di questo l'uso di una tastiera USB\r\n"}, {STRING_CONSOLEFAIL3, - "le tastiere USB non sono ancora completamente supportate\n"}, + "le tastiere USB non sono ancora completamente supportate\r\n"}, {STRING_FORMATTINGDISK, "Setup sta formattando il disco"}, {STRING_CHECKINGDISK, diff --git a/base/setup/usetup/lang/ja-JP.h b/base/setup/usetup/lang/ja-JP.h index 1bcd002f042..be3834f7125 100644 --- a/base/setup/usetup/lang/ja-JP.h +++ b/base/setup/usetup/lang/ja-JP.h @@ -1646,11 +1646,11 @@ MUI_STRING jaJPStrings[] = {STRING_REBOOTCOMPUTER2, " ENTER = ߭ ޳"}, {STRING_CONSOLEFAIL1, - "ݿ٦ ޷Ͼ\n\n"}, + "ݿ٦ ޷Ͼ\r\n\r\n"}, {STRING_CONSOLEFAIL2, - "÷ ݲ ļ USB ް ¶ ٺĶ ݶ޴ Ͻ\n"}, + "÷ ݲ ļ USB ް ¶ ٺĶ ݶ޴ Ͻ\r\n"}, {STRING_CONSOLEFAIL3, - "USB ް ݾ ߰ Ͼ\n"}, + "USB ް ݾ ߰ Ͼ\r\n"}, {STRING_FORMATTINGDISK, "ı ި ̫ϯ òϽ"}, {STRING_CHECKINGDISK, diff --git a/base/setup/usetup/lang/lt-LT.h b/base/setup/usetup/lang/lt-LT.h index 363f1f3923e..576137e4dd6 100644 --- a/base/setup/usetup/lang/lt-LT.h +++ b/base/setup/usetup/lang/lt-LT.h @@ -1656,11 +1656,11 @@ MUI_STRING ltLTStrings[] = {STRING_REBOOTCOMPUTER2, " ENTER = Reboot computer"}, {STRING_CONSOLEFAIL1, - "Unable to open the console\n\n"}, + "Unable to open the console\r\n\r\n"}, {STRING_CONSOLEFAIL2, - "The most common cause of this is using an USB keyboard\n"}, + "The most common cause of this is using an USB keyboard\r\n"}, {STRING_CONSOLEFAIL3, - "USB keyboards are not fully supported yet\n"}, + "USB keyboards are not fully supported yet\r\n"}, {STRING_FORMATTINGDISK, "Setup is formatting your disk"}, {STRING_CHECKINGDISK, diff --git a/base/setup/usetup/lang/nl-NL.h b/base/setup/usetup/lang/nl-NL.h index 8f4bc50fda8..f1814a11e58 100644 --- a/base/setup/usetup/lang/nl-NL.h +++ b/base/setup/usetup/lang/nl-NL.h @@ -1691,11 +1691,11 @@ MUI_STRING nlNLStrings[] = {STRING_REBOOTCOMPUTER2, " ENTER = Computer opnieuw opstarten"}, {STRING_CONSOLEFAIL1, - "Kan console niet openen.\n\n"}, + "Kan console niet openen.\r\n\r\n"}, {STRING_CONSOLEFAIL2, - "De meest voorkomende oorzaak is het gebruik van een USB toetsenbord.\n"}, + "De meest voorkomende oorzaak is het gebruik van een USB toetsenbord.\r\n"}, {STRING_CONSOLEFAIL3, - "USB toetsenborden worden nog niet volledig ondersteund.\n"}, + "USB toetsenborden worden nog niet volledig ondersteund.\r\n"}, {STRING_FORMATTINGDISK, "Setup is de vaste schijf aan het formatteren."}, {STRING_CHECKINGDISK, diff --git a/base/setup/usetup/lang/pl-PL.h b/base/setup/usetup/lang/pl-PL.h index 97cf395ec73..e0c0c2ceed7 100644 --- a/base/setup/usetup/lang/pl-PL.h +++ b/base/setup/usetup/lang/pl-PL.h @@ -1655,11 +1655,11 @@ MUI_STRING plPLStrings[] = {STRING_REBOOTCOMPUTER2, " ENTER = Restart komputera"}, {STRING_CONSOLEFAIL1, - "Otwarcie konsoli nieudane\n\n"}, + "Otwarcie konsoli nieudane\r\n\r\n"}, {STRING_CONSOLEFAIL2, - "Najczstsz tego przyczyn jest uycie klawiatury USB.\n"}, + "Najczstsz tego przyczyn jest uycie klawiatury USB.\r\n"}, {STRING_CONSOLEFAIL3, - "Nie s obecnie w peni obsugiwane.\n"}, + "Nie s obecnie w peni obsugiwane.\r\n"}, {STRING_FORMATTINGDISK, "Instalator formatuje twj dysk"}, {STRING_CHECKINGDISK, diff --git a/base/setup/usetup/lang/pt-BR.h b/base/setup/usetup/lang/pt-BR.h index 8d75d481f76..1ee9c7f12f9 100644 --- a/base/setup/usetup/lang/pt-BR.h +++ b/base/setup/usetup/lang/pt-BR.h @@ -1682,11 +1682,11 @@ MUI_STRING ptBRStrings[] = {STRING_REBOOTCOMPUTER2, " ENTER=Reiniciar"}, {STRING_CONSOLEFAIL1, - "No foi possvel abrir o console\n\n"}, + "No foi possvel abrir o console\r\n\r\n"}, {STRING_CONSOLEFAIL2, - "A causa mais comm a utilizao de um teclado USB\n"}, + "A causa mais comm a utilizao de um teclado USB\r\n"}, {STRING_CONSOLEFAIL3, - "Os teclados USB ainda no so completamente suportados\n"}, + "Os teclados USB ainda no so completamente suportados\r\n"}, {STRING_FORMATTINGDISK, "O instalador est formatando o disco"}, {STRING_CHECKINGDISK, diff --git a/base/setup/usetup/lang/ro-RO.h b/base/setup/usetup/lang/ro-RO.h index 67da03c5b75..46e4d15fd33 100644 --- a/base/setup/usetup/lang/ro-RO.h +++ b/base/setup/usetup/lang/ro-RO.h @@ -1723,11 +1723,11 @@ MUI_STRING roROStrings[] = {STRING_REBOOTCOMPUTER2, " ENTER = Repornire calculator"}, {STRING_CONSOLEFAIL1, - "Nu se poate deschide consola\n\n"}, + "Nu se poate deschide consola\r\n\r\n"}, {STRING_CONSOLEFAIL2, - "Cea mai frecvent cauz pentru asta este utilizarea unei tastaturi USB\n"}, + "Cea mai frecvent cauz pentru asta este utilizarea unei tastaturi USB\r\n"}, {STRING_CONSOLEFAIL3, - "Tastaturile USB nc nu sunt complet suportate\n"}, + "Tastaturile USB nc nu sunt complet suportate\r\n"}, {STRING_FORMATTINGDISK, "Formatarea discului"}, {STRING_CHECKINGDISK, diff --git a/base/setup/usetup/lang/ru-RU.h b/base/setup/usetup/lang/ru-RU.h index b55efabbbc9..606f5d926cc 100644 --- a/base/setup/usetup/lang/ru-RU.h +++ b/base/setup/usetup/lang/ru-RU.h @@ -1647,11 +1647,11 @@ MUI_STRING ruRUStrings[] = {STRING_REBOOTCOMPUTER2, " ENTER = १㧪"}, {STRING_CONSOLEFAIL1, - " 㤠 ᮫\n\n"}, + " 㤠 ᮫\r\n\r\n"}, {STRING_CONSOLEFAIL2, - " ⭠ 稭 ⮣ - ᯮ짮 USB-\n"}, + " ⭠ 稭 ⮣ - ᯮ짮 USB-\r\n"}, {STRING_CONSOLEFAIL3, - "USB ᥩ ন \n"}, + "USB ᥩ ন \r\n"}, {STRING_FORMATTINGDISK, "ணࠬ ⠭ ଠ "}, {STRING_CHECKINGDISK, diff --git a/base/setup/usetup/lang/sk-SK.h b/base/setup/usetup/lang/sk-SK.h index 4d4635aea50..6c7bf3c1504 100644 --- a/base/setup/usetup/lang/sk-SK.h +++ b/base/setup/usetup/lang/sk-SK.h @@ -1657,11 +1657,11 @@ MUI_STRING skSKStrings[] = {STRING_REBOOTCOMPUTER2, " ENTER = Retart potaa"}, {STRING_CONSOLEFAIL1, - "Nemono otvori konzolu\n\n"}, + "Nemono otvori konzolu\r\n\r\n"}, {STRING_CONSOLEFAIL2, - "Najbenejou prinou tohto je pouitie USB klvesnice\n"}, + "Najbenejou prinou tohto je pouitie USB klvesnice\r\n"}, {STRING_CONSOLEFAIL3, - "USB klvesnica ete nie je plne podporovan\n"}, + "USB klvesnica ete nie je plne podporovan\r\n"}, {STRING_FORMATTINGDISK, "Intaltor formtuje V disk"}, {STRING_CHECKINGDISK, diff --git a/base/setup/usetup/lang/sv-SE.h b/base/setup/usetup/lang/sv-SE.h index f96f8b3c65a..c0f8c13352a 100644 --- a/base/setup/usetup/lang/sv-SE.h +++ b/base/setup/usetup/lang/sv-SE.h @@ -1652,11 +1652,11 @@ MUI_STRING svSEStrings[] = {STRING_REBOOTCOMPUTER2, " ENTER = Starta om datorn"}, {STRING_CONSOLEFAIL1, - "Det gr inte ppna Konsollen\n\n"}, + "Det gr inte ppna Konsollen\r\n\r\n"}, {STRING_CONSOLEFAIL2, - "Den vanligaste orsaken till detta r att ett USB tangentbord anvnds\n"}, + "Den vanligaste orsaken till detta r att ett USB tangentbord anvnds\r\n"}, {STRING_CONSOLEFAIL3, - "USB tangentbord r itne helt sttt n\n"}, + "USB tangentbord r itne helt sttt n\r\n"}, {STRING_FORMATTINGDISK, "Setup formaterar din disk"}, {STRING_CHECKINGDISK, diff --git a/base/setup/usetup/lang/uk-UA.h b/base/setup/usetup/lang/uk-UA.h index 9b40eb6bb06..10231d1448b 100644 --- a/base/setup/usetup/lang/uk-UA.h +++ b/base/setup/usetup/lang/uk-UA.h @@ -1652,11 +1652,11 @@ MUI_STRING ukUAStrings[] = {STRING_REBOOTCOMPUTER2, " ENTER = १⠦ '"}, {STRING_CONSOLEFAIL1, - " i ᮫\n\n"}, + " i ᮫\r\n\r\n"}, {STRING_CONSOLEFAIL2, - "i iୠ 稭 쮣 - ⠭ USB i\n"}, + "i iୠ 稭 쮣 - ⠭ USB i\r\n"}, {STRING_CONSOLEFAIL3, - "USB i iਬ i\n"}, + "USB i iਬ i\r\n"}, {STRING_FORMATTINGDISK, "⠭ ଠ "}, {STRING_CHECKINGDISK, diff --git a/base/setup/vmwinst/lang/tr-TR.rc b/base/setup/vmwinst/lang/tr-TR.rc new file mode 100644 index 00000000000..6f3c89f4513 --- /dev/null +++ b/base/setup/vmwinst/lang/tr-TR.rc @@ -0,0 +1,135 @@ +/* + * TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) (erdemersoy@live.com) + */ + +LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT + +IDD_WELCOMEPAGE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Görüntülük Sürücüsü Kurulumu" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "ReactOS Kur, VMWare(r)'de çalıştığını algıladı.", -1, 117, 8, 140, 24 + LTEXT "VMware(r) SVGA sürücüsünü kurmak için ""İleri"" düğmesine tıklayınız. Eğer sürücüyü kurmak istemiyorsanız ""İptal"" düğmesine tıklayınız.", -1, 117, 140, 140, 24 +END + +IDD_INSERT_VMWARE_TOOLS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Görüntülük Sürücüsü Kurulumu" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "ReactOS Kur, VMware(r) SVGA sürücüsüyle birlikte gelmez.\n\nBu yüzden, VMWare(r)'de bulunan ""Install VMware tools..."" seçeneğine tıklayınız.\n\n\nİşlemi sürdürmek için ""İleri"" düğmesine, sürücünün kurulumunu atlamak için ""İptal"" düğmesine tıklayınız.",-1,25,25,225,85 +END + +IDD_INSTALLING_VMWARE_TOOLS DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Görüntülük Sürücüsü Kurulumu" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "{STATUS}",IDC_INSTALLINGSTATUS,25,68,225,8 + CONTROL "", IDC_INSTALLINGPROGRESS, "msctls_progress32", PBS_MARQUEE | WS_CHILD | WS_VISIBLE | WS_BORDER, 25, 80, 225, 8 +END + +IDD_CONFIG DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Görüntülük Sürücüsü Kurulumu" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "VMware(r) SVGA sürücüsü, başarılı bir şekilde kuruldu. Aşağıdaki çözünürlüklerden birini seçiniz:",-1,25,5,225,20 + PUSHBUTTON "640x480", 1120, 25, 30, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "800x600", 1400, 25, 45, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "1024x768", 1792, 25, 60, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "1152x864", 2016, 25, 75, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "1280x960", 2240, 110, 30, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "1280x1024", 2304, 110, 45, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "1400x1050", 2450, 110, 60, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "1600x1200", 2800, 110, 75, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "1792x1344", 3136, 195, 30, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "1856x1392", 3248, 195, 45, 65, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "1920x1440", 3360, 195, 60, 50, 15, BS_AUTORADIOBUTTON + LTEXT "Aşağıdaki derinliklerden birini seçiniz:", -1, 25, 93, 225, 12 + COMBOBOX IDC_COLORQUALITY, 25, 105, 75, 80, CBS_DROPDOWNLIST | WS_TABSTOP +END + +IDD_INSTALLATION_FAILED DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Görüntülük Sürücüsü Kurulumu" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "ReactOS Kur, VMware(r) SVGA sürücüsünü kuramadı.\n\n\nReactOS kurulumunu sürdürmek için ""Bitir"" düğmesine tıklayınız.",-1,25,25,225,85 +END + +IDD_CHOOSEACTION DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Görüntülük Sürücüsü Kurulumu" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "VMware(r) SVGA sürücüsü, daha önceden kurulmuş.\n\nNe yapmak istediğinizi seçiniz:",-1,25,5,225,30 + PUSHBUTTON "Görüntülük Ayarlarını Yapılandırmak", IDC_CONFIGSETTINGS, 25, 40, 200, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "Başka Bir Görüntülük Sürücüsü Kurmak", IDC_USEOTHERDRIVER, 25, 55, 200, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "VMware(r) SVGA Sürücüsünü Kaldırmak", IDC_UNINSTALL, 25, 70, 200, 15, BS_AUTORADIOBUTTON + LTEXT "Sürdürmek için ""İleri"" düğmesine, çıkmak için ""İptal"" düğmesine tıklayınız.", -1, 25, 93, 225, 19 +END + +IDD_SELECTDRIVER DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Görüntülük Sürücüsü Kurulumu" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Kullanmak istediğiniz görüntülük sürücüsünü seçiniz:",-1,25,25,225,15 + PUSHBUTTON "ReactOS VGA Sürücüsü", IDC_VGA, 25, 40, 225, 15, BS_AUTORADIOBUTTON + PUSHBUTTON "ReactOS VBE Sürücüsü (SVGA)", IDC_VBE, 25, 55, 225, 15, BS_AUTORADIOBUTTON + LTEXT "İşlemi bitirmek için ""Bitir"" düğmesine, hiçbir değişiklik yapmadan çıkmak için ""İptal"" düğmesine tıklayınız.", -1, 25, 93, 225, 20 +END + +IDD_DOUNINSTALL DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Görüntülük Sürücüsü Kurulumu" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "ReactOS Kur, VMware(r) SVGA sürücüsünü kaldırmak üzere.\n\n\nKaldırmayı bitirmek için ""Bitir"" düğmesine, hiçbir değişiklik yapılmadan çıkmak için ""İptal"" düğmesine tıklayınız.",-1,25,25,225,85 +END + +STRINGTABLE +BEGIN + IDS_WIZARD_NAME "VMware(r) algılandı." + IDS_FAILEDTOLOCATEDRIVERS "ReactOS Kur, gerekli kütükleri bulamadı.\nVMWare(r) Araç CD'sini bağladığınızı onaylayın." + IDS_FAILEDTOCOPYFILES "ReactOS Kur, gerekli kütükleri çoğaltamadı.\nVMWare(r) Araç CD'sini bağladığınızı onaylayın.\n" + IDS_FAILEDTOACTIVATEDRIVER "VMware(r) SVGA sürücüsünün etkinleştirilmesi başarısız oldu." + IDS_FAILEDTOSELVGADRIVER "ReactOS VGA sürücüsünün etkinleştirilmesi başarısız oldu." + IDS_FAILEDTOSELVBEDRIVER "ReactOS VBE sürücüsünün etkinleştirilmesi başarısız oldu." + IDS_UNINSTNOTICE "VMware(r) SVGA sürücüsünün kütükleri silinmedi.\nOnları, dizgeyi yeniden başlatma sonrasında siliniz." + IDS_FAILEDTOADDREGENTRIES "VMware(r) SVGA sürücüsünün değerleri oluşturulamadı." +END + +STRINGTABLE +BEGIN + 10001 "Düşük (8 İkillik)" + 10002 "Orta (16 İkillik)" + 10003 "Yüksek (32 İkillik)" +END + +STRINGTABLE +BEGIN + IDS_SEARCHINGFORCDROM "VMWare(r) Araç CD'si aranıyor..." + IDS_COPYINGFILES "Kütükler çoğaltılıyor..." + IDS_ENABLINGDRIVER "VMware(r) SVGA sürücüsü etkinleştiriliyor..." +END + +STRINGTABLE +BEGIN + IDD_INSERT_VMWARE_TOOLSTITLE "VMware(r) SVGA Sürücüsünün Kurulumu" + IDD_INSERT_VMWARE_TOOLSSUBTITLE "VMWare(r) Araç CD'sini bağlayınız." + IDD_INSTALLING_VMWARE_TOOLSTITLE "VMware(r) SVGA Sürücüsünün Kurulumu" + IDD_INSTALLING_VMWARE_TOOLSSUBTITLE "VMware(r) SVGA sürücüsünü bulunuz ve çoğaltınız." + IDD_CONFIGTITLE "VMware(r) SVGA Sürücüsünün Kurulumu" + IDD_CONFIGSUBTITLE "Çözünürlüklerden birini seçiniz." + IDD_INSTALLATION_FAILEDTITLE "VMware(r) SVGA Sürücüsünün Kurulumu" + IDD_INSTALLATION_FAILEDSUBTITLE "VMware(r) SVGA sürücüsünün kurulumu başarısız oldu." + IDD_CHOOSEACTIONTITLE "VMware(r) SVGA Sürücüsünün Kurulumu" + IDD_CHOOSEACTIONSUBTITLE "Ne yapmak istediğinizi seçiniz." + IDD_SELECTDRIVERTITLE "VMware(r) SVGA Sürücüsünün Kurulumu" + IDD_SELECTDRIVERSUBTITLE "Bir sürücü seçiniz." + IDD_DOUNINSTALLTITLE "VMware(r) SVGA Sürücüsünün Kurulumu" + IDD_DOUNINSTALLSUBTITLE "Sürücüyü kaldırınız." +END diff --git a/base/setup/vmwinst/rsrc.rc b/base/setup/vmwinst/rsrc.rc index ff942239eae..7b54c25921a 100644 --- a/base/setup/vmwinst/rsrc.rc +++ b/base/setup/vmwinst/rsrc.rc @@ -74,6 +74,9 @@ IDB_HEADER BITMAP "resources/header.bmp" #ifdef LANGUAGE_SV_SE #include "lang/sv-SE.rc" #endif +#ifdef LANGUAGE_TR_TR + #include "lang/tr-TR.rc" +#endif #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" #endif diff --git a/base/setup/vmwinst/vmwinst.c b/base/setup/vmwinst/vmwinst.c index 7058a8a33a5..3079ef2184f 100644 --- a/base/setup/vmwinst/vmwinst.c +++ b/base/setup/vmwinst/vmwinst.c @@ -96,14 +96,14 @@ DetectVMware(int *Version) } #elif defined(_MSC_VER) && defined(_M_AMD64) DPRINT1("DetectVMware stub\n"); - return FALSE; + _SEH2_YIELD(return FALSE); #else #error TODO #endif } _SEH2_EXCEPT(_SEH2_GetExceptionCode() == EXCEPTION_PRIV_INSTRUCTION ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) { - return FALSE; + _SEH2_YIELD(return FALSE); } _SEH2_END; diff --git a/base/setup/welcome/lang/bg-BG.rc b/base/setup/welcome/lang/bg-BG.rc index 00c08d32157..1f47d04c86e 100644 --- a/base/setup/welcome/lang/bg-BG.rc +++ b/base/setup/welcome/lang/bg-BG.rc @@ -25,7 +25,7 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Добре дошли" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -35,7 +35,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "Инсталиране на ReactOS" IDS_TOPICBUTTON1 "Разгледай това CD" @@ -50,7 +50,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "Инсталиране на ReactOSS" IDS_TOPICTITLE1 "Разгледай това CD" @@ -65,7 +65,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Създаване на нова инсталация ня ReactOS или обновяване на съществуваща такава." IDS_TOPICDESC1 "Разглеждане на CD-то." diff --git a/base/setup/welcome/lang/cs-CZ.rc b/base/setup/welcome/lang/cs-CZ.rc index f0bd67bff4b..c9ec1f1a7d7 100644 --- a/base/setup/welcome/lang/cs-CZ.rc +++ b/base/setup/welcome/lang/cs-CZ.rc @@ -3,7 +3,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Vítejte" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -13,7 +13,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "Instalovat ReactOS" IDS_TOPICBUTTON1 "Prohlížet toto CD" @@ -28,7 +28,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "Instalovat ReactOS" IDS_TOPICTITLE1 "Prohlížet toto CD" @@ -43,7 +43,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Nainstaluje ReactOS na Váš počítač nebo zaktualizuje existující systém." IDS_TOPICDESC1 "Prohlížet toto CD." diff --git a/base/setup/welcome/lang/da-DK.rc b/base/setup/welcome/lang/da-DK.rc index 58b7f58ffb7..fd7e82edd95 100644 --- a/base/setup/welcome/lang/da-DK.rc +++ b/base/setup/welcome/lang/da-DK.rc @@ -3,7 +3,7 @@ LANGUAGE LANG_DANISH, SUBLANG_DEFAULT /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Velkommen" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -13,7 +13,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "Installer ReactOS" IDS_TOPICBUTTON1 "Gennemse Cdrom" @@ -28,7 +28,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "Installer ReactOS" IDS_TOPICTITLE1 "Gennemse Cdrom" @@ -43,7 +43,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Opret en ny ReactOS installation på din computer eller opgradere en eksisterende installation." IDS_TOPICDESC1 "Gennemse Reactos Installations Cdrom" diff --git a/base/setup/welcome/lang/de-DE.rc b/base/setup/welcome/lang/de-DE.rc index e7c8771ab02..0ad68bed400 100644 --- a/base/setup/welcome/lang/de-DE.rc +++ b/base/setup/welcome/lang/de-DE.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Willkommen" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -17,7 +17,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "ReactOS installieren" IDS_TOPICBUTTON1 "CD durchsuchen" @@ -32,7 +32,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "ReactOS installieren" IDS_TOPICTITLE1 "CD durchsuchen" @@ -47,7 +47,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Installiert ReactOS auf ihrem Computer oder aktualisiert eine bestehende Installation." IDS_TOPICDESC1 "Die ReactOS-CD durchsuchen." diff --git a/base/setup/welcome/lang/el-GR.rc b/base/setup/welcome/lang/el-GR.rc index 9d232b323e6..cc8a5097270 100644 --- a/base/setup/welcome/lang/el-GR.rc +++ b/base/setup/welcome/lang/el-GR.rc @@ -3,7 +3,7 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Καλώς Ήλθατε" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -13,7 +13,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "Εγκατάσταση του ReactOS" IDS_TOPICBUTTON1 "Εξερεύνηση αυτού του CD" @@ -28,7 +28,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "Εγκατάσταση του ReactOS" IDS_TOPICTITLE1 "Εξερεύνηση αυτού του CD" @@ -43,7 +43,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Δημιουργία νέας εγκατάστασης του ReactOS στον υπολογιστή ή αναβάθμιση μιας ήδη υπάρχουσας εγκατάστασης." IDS_TOPICDESC1 "Εξερεύνηση αυτού του CD." diff --git a/base/setup/welcome/lang/en-US.rc b/base/setup/welcome/lang/en-US.rc index 148bb1c722a..42348666a24 100644 --- a/base/setup/welcome/lang/en-US.rc +++ b/base/setup/welcome/lang/en-US.rc @@ -3,7 +3,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Welcome" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -13,7 +13,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "Install ReactOS" IDS_TOPICBUTTON1 "Browse this CD" @@ -28,7 +28,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "Install ReactOS" IDS_TOPICTITLE1 "Browse this CD" @@ -43,7 +43,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Create a new ReactOS installation on your computer or upgrade an existing installation." IDS_TOPICDESC1 "Browse the CD." diff --git a/base/setup/welcome/lang/es-ES.rc b/base/setup/welcome/lang/es-ES.rc index a0448ec099c..498e2598753 100644 --- a/base/setup/welcome/lang/es-ES.rc +++ b/base/setup/welcome/lang/es-ES.rc @@ -3,7 +3,7 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Bienvenido" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -13,7 +13,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "Instalar ReactOS" IDS_TOPICBUTTON1 "Explorar este CD" @@ -28,7 +28,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "Instalar ReactOS" IDS_TOPICTITLE1 "Explorar este CD" @@ -43,7 +43,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Crear una nueva instalación de ReactOS en su PC o actualizar una instalación existente." IDS_TOPICDESC1 "Explorar este CD." diff --git a/base/setup/welcome/lang/et-EE.rc b/base/setup/welcome/lang/et-EE.rc index 7f15eb9c2f8..4e0c90ae6f5 100644 --- a/base/setup/welcome/lang/et-EE.rc +++ b/base/setup/welcome/lang/et-EE.rc @@ -3,7 +3,7 @@ LANGUAGE LANG_ESTONIAN, SUBLANG_DEFAULT /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Tere tulemast" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -13,7 +13,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "Paigalda ReactOS" IDS_TOPICBUTTON1 "Sirvi CD sisu" @@ -28,7 +28,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "Paigalda ReactOS" IDS_TOPICTITLE1 "Sirvi CD sisu" @@ -43,7 +43,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Paigalda ReactOS oma arvutisse või uuenda olemasolevat installatsiooni." IDS_TOPICDESC1 "Sirvi CD sisu." diff --git a/base/setup/welcome/lang/fr-FR.rc b/base/setup/welcome/lang/fr-FR.rc index 8c342dad02f..2afa56e4cd7 100644 --- a/base/setup/welcome/lang/fr-FR.rc +++ b/base/setup/welcome/lang/fr-FR.rc @@ -24,7 +24,7 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Bienvenue" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -34,7 +34,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "Installer ReactOS" IDS_TOPICBUTTON1 "Naviguer dans ce CD" @@ -49,7 +49,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "Installer ReactOS" IDS_TOPICTITLE1 "Naviguer dans ce CD" @@ -64,7 +64,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Crée une nouvelle installation de ReactOS sur votre ordinateur ou met à jour votre installation actuelle." IDS_TOPICDESC1 "Explore le CD." diff --git a/base/setup/welcome/lang/he-IL.rc b/base/setup/welcome/lang/he-IL.rc index 1d4b9610ace..0d127f0b01c 100644 --- a/base/setup/welcome/lang/he-IL.rc +++ b/base/setup/welcome/lang/he-IL.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ברוכים הבאים - ReactOS" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -14,7 +14,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "התקנת ReactOS" IDS_TOPICBUTTON1 "סייר בתוכן הדיסק" @@ -29,7 +29,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "התקנת ReactOS" IDS_TOPICTITLE1 "סייר בתוכן הדיסק" @@ -44,7 +44,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "צור התקנה חדשה של ReactOS במחשבך או שדרג את ההתקנה הנוכחית." IDS_TOPICDESC1 "סייר בתוכן הדיסק." diff --git a/base/setup/welcome/lang/hu-HU.rc b/base/setup/welcome/lang/hu-HU.rc index 5cff0eee3d7..bbb076fb388 100644 --- a/base/setup/welcome/lang/hu-HU.rc +++ b/base/setup/welcome/lang/hu-HU.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Üdvözlünk" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -17,7 +17,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "ReactOS telepítése" IDS_TOPICBUTTON1 "A CD böngészése" @@ -32,7 +32,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "ReactOS telepítése" IDS_TOPICTITLE1 "A CD böngészése" @@ -47,7 +47,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "A ReactOS telepítése vagy frissítése." IDS_TOPICDESC1 "A CD böngészése" diff --git a/base/setup/welcome/lang/id-ID.rc b/base/setup/welcome/lang/id-ID.rc index b4eb29c71f9..88ed762c3f4 100644 --- a/base/setup/welcome/lang/id-ID.rc +++ b/base/setup/welcome/lang/id-ID.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Selamat Datang" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -17,7 +17,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "Instalasi ReactOS" IDS_TOPICBUTTON1 "Lihat CD ini" @@ -32,7 +32,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "Instalasi ReactOS" IDS_TOPICTITLE1 "Lihat CD ini" @@ -47,7 +47,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Buat instalasi baru ReactOS pada komputer anda atau tingkatkan instalasi yang sudah ada." IDS_TOPICDESC1 "Lihat CD." diff --git a/base/setup/welcome/lang/it-IT.rc b/base/setup/welcome/lang/it-IT.rc index 454839c4d35..92490f86202 100644 --- a/base/setup/welcome/lang/it-IT.rc +++ b/base/setup/welcome/lang/it-IT.rc @@ -5,7 +5,7 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Benvenuto" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -15,7 +15,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "Installa ReactOS" IDS_TOPICBUTTON1 "Esplora il CD" @@ -30,7 +30,7 @@ BEGIN END /* Topic Titolos */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "Installa ReactOS" IDS_TOPICTITLE1 "Esplora il CD" @@ -45,7 +45,7 @@ BEGIN END /* Descrizione argomentos */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Crea una nuova installazione di ReactOS sul tuo computer o aggiorna l'installazione esistente." IDS_TOPICDESC1 "Esplora il CD." diff --git a/base/setup/welcome/lang/ja-JP.rc b/base/setup/welcome/lang/ja-JP.rc index f2ce3c0ef62..00874a36c5b 100644 --- a/base/setup/welcome/lang/ja-JP.rc +++ b/base/setup/welcome/lang/ja-JP.rc @@ -3,7 +3,7 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Welcome" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -13,7 +13,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "ReactOS をインストールする" IDS_TOPICBUTTON1 "この CD を開く" @@ -28,7 +28,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "ReactOS をインストールする" IDS_TOPICTITLE1 "この CD を開く" @@ -43,7 +43,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "コンピュータに新しく ReactOS をインストールしたり、既存の ReactOS をアップグレードします。" IDS_TOPICDESC1 "CD の内容を参照します。" diff --git a/base/setup/welcome/lang/lt-LT.rc b/base/setup/welcome/lang/lt-LT.rc index 92511c9a3dd..c856d6f90e9 100644 --- a/base/setup/welcome/lang/lt-LT.rc +++ b/base/setup/welcome/lang/lt-LT.rc @@ -5,7 +5,7 @@ LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Sveiki" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -15,7 +15,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "Įdiegti ReactOS" IDS_TOPICBUTTON1 "Peržiūrėti šį CD" @@ -30,7 +30,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "Įdiegti ReactOS" IDS_TOPICTITLE1 "Peržiūrėti šį CD" @@ -45,7 +45,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Įdiekite arba atnaujinkite ReactOS." IDS_TOPICDESC1 "Peržiūrėti šį CD." diff --git a/base/setup/welcome/lang/nl-NL.rc b/base/setup/welcome/lang/nl-NL.rc index 1604a5ce578..aaec5abbe8d 100644 --- a/base/setup/welcome/lang/nl-NL.rc +++ b/base/setup/welcome/lang/nl-NL.rc @@ -3,7 +3,7 @@ LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Welkom" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -13,7 +13,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "Installeer ReactOS" IDS_TOPICBUTTON1 "Deze CD Verkennen" @@ -28,7 +28,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "Installeer ReactOS" IDS_TOPICTITLE1 "Deze CD Verkennen" @@ -43,7 +43,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Maak een nieuwe ReactOS installatie of upgrade een bestaande installatie." IDS_TOPICDESC1 "Deze CD Verkennen." diff --git a/base/setup/welcome/lang/no-NO.rc b/base/setup/welcome/lang/no-NO.rc index dbfe6357cf1..036165e874e 100644 --- a/base/setup/welcome/lang/no-NO.rc +++ b/base/setup/welcome/lang/no-NO.rc @@ -3,7 +3,7 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Velkommen" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -13,7 +13,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "Innstaller ReactOS" IDS_TOPICBUTTON1 "Utforsk denne CD" @@ -28,7 +28,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "Innstaller ReactOS" IDS_TOPICTITLE1 "Utforsk denne CD" @@ -43,7 +43,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Opprett en ny ReactOS innstallasjon på din datamaskin eller oppgrader eksisterende innstallasjon." IDS_TOPICDESC1 "Utforsk CDen." diff --git a/base/setup/welcome/lang/pl-PL.rc b/base/setup/welcome/lang/pl-PL.rc index 5c0144f59b3..5ace94d5e6e 100644 --- a/base/setup/welcome/lang/pl-PL.rc +++ b/base/setup/welcome/lang/pl-PL.rc @@ -9,7 +9,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Zapraszamy" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -19,7 +19,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "Zainstaluj ReactOS" IDS_TOPICBUTTON1 "Przeglądaj CD" @@ -34,7 +34,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "Zainstaluj ReactOS" IDS_TOPICTITLE1 "Przeglądaj CD" @@ -49,7 +49,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Utwórz nową instalację ReactOS na komputerze lub aktualizuj już istniejącą." IDS_TOPICDESC1 "Przeglądaj CD." diff --git a/base/setup/welcome/lang/pt-BR.rc b/base/setup/welcome/lang/pt-BR.rc index 155acb53d39..21a6268609b 100644 --- a/base/setup/welcome/lang/pt-BR.rc +++ b/base/setup/welcome/lang/pt-BR.rc @@ -3,7 +3,7 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Bem vindo" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -13,7 +13,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "Instalar ReactOS" IDS_TOPICBUTTON1 "Examinar este CD" @@ -28,7 +28,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "Instalar ReactOS" IDS_TOPICTITLE1 "Examinar este CD" @@ -43,7 +43,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Cria uma nova instalação do ReactOS em seu computador ou atualiza uma instalação já existente." IDS_TOPICDESC1 "Exibe os arquivos contidos no CD." diff --git a/base/setup/welcome/lang/ro-RO.rc b/base/setup/welcome/lang/ro-RO.rc index 535e459d347..941938fbab5 100644 --- a/base/setup/welcome/lang/ro-RO.rc +++ b/base/setup/welcome/lang/ro-RO.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Bun venit" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -20,7 +20,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "Instalare ReactOS" IDS_TOPICBUTTON1 "Explorare CD" @@ -35,7 +35,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "Instalare ReactOS" IDS_TOPICTITLE1 "Explorare CD" @@ -50,7 +50,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Creați o instalare nouă sau actualizați o instalare existentă." IDS_TOPICDESC1 "Explorați conținutul acestui CD." diff --git a/base/setup/welcome/lang/ru-RU.rc b/base/setup/welcome/lang/ru-RU.rc index c40e3f18377..0019680458d 100644 --- a/base/setup/welcome/lang/ru-RU.rc +++ b/base/setup/welcome/lang/ru-RU.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Добро пожаловать!" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -14,7 +14,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "Установить ReactOS" IDS_TOPICBUTTON1 "Обзор диска" @@ -29,7 +29,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "Установить ReactOS" IDS_TOPICTITLE1 "Обзор диска" @@ -44,7 +44,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Установит ReactOS на Ваш компьютер с нуля или обновит уже установленную версию." IDS_TOPICDESC1 "Обзор диска." diff --git a/base/setup/welcome/lang/sk-SK.rc b/base/setup/welcome/lang/sk-SK.rc index 8f31fad3f51..0526ee21e9c 100644 --- a/base/setup/welcome/lang/sk-SK.rc +++ b/base/setup/welcome/lang/sk-SK.rc @@ -5,7 +5,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Vitajte" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -15,7 +15,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "Inštalovať ReactOS" IDS_TOPICBUTTON1 "Prezerať toto CD" @@ -30,7 +30,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "Inštalovať ReactOS" IDS_TOPICTITLE1 "Prezerať toto CD" @@ -45,7 +45,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Nainštaluje ReactOS na Váš počítač alebo zaktualizuje už existujúci systém." IDS_TOPICDESC1 "Prezerať toto CD." diff --git a/base/setup/welcome/lang/sv-SE.rc b/base/setup/welcome/lang/sv-SE.rc index f2bfaa36cc9..dd028b23c12 100644 --- a/base/setup/welcome/lang/sv-SE.rc +++ b/base/setup/welcome/lang/sv-SE.rc @@ -23,7 +23,7 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Välkommen" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -33,7 +33,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "Installera ReactOS" IDS_TOPICBUTTON1 "Utforska skivan" @@ -48,7 +48,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "Installera ReactOS" IDS_TOPICTITLE1 "Utforska skivan" @@ -63,7 +63,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Skapa en ny ReactOS installation på den här datorn eller uppgradera en befintlig." IDS_TOPICDESC1 "Utforska skivan." diff --git a/base/setup/welcome/lang/th-TH.rc b/base/setup/welcome/lang/th-TH.rc index 765b0edd29c..6b59ab535b8 100644 --- a/base/setup/welcome/lang/th-TH.rc +++ b/base/setup/welcome/lang/th-TH.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_THAI, SUBLANG_DEFAULT /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - ยินดีต้อนรับ" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -20,7 +20,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "ติดตั้ง ReactOS" IDS_TOPICBUTTON1 "ดูรายละเอียดของแผ่นซีดีนี้" @@ -35,7 +35,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "ติดตั้ง ReactOS" IDS_TOPICTITLE1 "ดูรายละเอียดของแผ่นซีดีนี้" @@ -50,7 +50,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "คุณต้องการติดตั้ง ReactOS ลงในเครื่องคอมพิวเตอร์ของคุณ\n\nหรือต้องการปรับแต่งเพิ่มเติมจากที่มีอยู่เดิม." IDS_TOPICDESC1 "ดูรายละเอียดของแผ่นซีดีนี้." diff --git a/base/setup/welcome/lang/tr-TR.rc b/base/setup/welcome/lang/tr-TR.rc new file mode 100644 index 00000000000..5eb4ec5aa8f --- /dev/null +++ b/base/setup/welcome/lang/tr-TR.rc @@ -0,0 +1,64 @@ +/* + * TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) (erdemersoy@live.com) + */ + +LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT + +/* String Tables */ + +/* Default settings */ +STRINGTABLE +BEGIN + IDS_APPTITLE "ReactOS - Hoşgeldiniz Uygulaması" + IDS_DEFAULTTOPICTITLE "ReactOS - Hoşgeldiniz Uygulaması" + IDS_DEFAULTTOPICDESC "React İşletim Dizgesi'ne hoşgeldiniz.\n\nFârenizi, soldaki herhangi bir seçeneğe götürebilirsiniz." +// IDS_CHECKTEXT "Bir sonraki sefere bu pencereyi göster." +// IDS_CLOSETEXT "Çıkış" +END + +/* Topic buttons */ +STRINGTABLE +BEGIN + IDS_TOPICBUTTON0 "ReactOS'u Kur" + IDS_TOPICBUTTON1 "CD'nin İçini Araştır" + IDS_TOPICBUTTON2 "Çıkış" +// IDS_TOPICBUTTON3 "Empty Topic 3" +// IDS_TOPICBUTTON4 "Empty Topic 4" +// IDS_TOPICBUTTON5 "Empty Topic 5" +// IDS_TOPICBUTTON6 "Empty Topic 6" +// IDS_TOPICBUTTON7 "Empty Topic 7" +// IDS_TOPICBUTTON8 "Empty Topic 8" +// IDS_TOPICBUTTON9 "Empty Topic 9" +END + +/* Topic titles */ +STRINGTABLE +BEGIN + IDS_TOPICTITLE0 "ReactOS'u Kur" + IDS_TOPICTITLE1 "CD'nin İçini Araştır" + IDS_TOPICTITLE2 "Çıkış" +// IDS_TOPICTITLE3 "Empty Topic Title 3" +// IDS_TOPICTITLE4 "Empty Topic Title 4" +// IDS_TOPICTITLE5 "Empty Topic Title 5" +// IDS_TOPICTITLE6 "Empty Topic Title 6" +// IDS_TOPICTITLE7 "Empty Topic Title 7" +// IDS_TOPICTITLE8 "Empty Topic Title 8" +// IDS_TOPICTITLE9 "Empty Topic Title 9" +END + +/* Topic descriptions */ +STRINGTABLE +BEGIN + IDS_TOPICDESC0 "Bu seçenek ile bilgisayarınıza ReactOS yükleyebilir ya da bilgisayarınızda var olan bir ReactOS yüklemesini yükseltebilirsiniz." + IDS_TOPICDESC1 "CD'deki kütükleri gösterir." + IDS_TOPICDESC2 "Bu uygulamadan çıkar." +// IDS_TOPICDESC3 "Topic description 3.\n\nDescribe topic 3 here." +// IDS_TOPICDESC4 "Topic description 4.\n\nDescribe topic 4 here." +// IDS_TOPICDESC5 "Topic description 5.\n\nDescribe topic 5 here." +// IDS_TOPICDESC6 "Topic description 6.\n\nDescribe topic 6 here." +// IDS_TOPICDESC7 "Topic description 7.\n\nDescribe topic 7 here." +// IDS_TOPICDESC8 "Topic description 8.\n\nDescribe topic 8 here." +// IDS_TOPICDESC9 "Topic description 9.\n\nDescribe topic 9 here." +END + +/* EOF */ diff --git a/base/setup/welcome/lang/uk-UA.rc b/base/setup/welcome/lang/uk-UA.rc index 2066bfe1ea1..83a3e6c13f2 100644 --- a/base/setup/welcome/lang/uk-UA.rc +++ b/base/setup/welcome/lang/uk-UA.rc @@ -23,7 +23,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - Ласкаво просимо" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -33,7 +33,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "Встановлення ReactOS" IDS_TOPICBUTTON1 "Огляд цього CD" @@ -48,7 +48,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "Встановлення ReactOS" IDS_TOPICTITLE1 "Огляд цього CD" @@ -63,7 +63,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "Створення нової інсталяції ReactOS на Вашому комп'ютері чи оновлення існуючої інсталяції." IDS_TOPICDESC1 "Проглянути CD." diff --git a/base/setup/welcome/lang/zh-CN.rc b/base/setup/welcome/lang/zh-CN.rc index 55b22052d93..cb47505fd27 100644 --- a/base/setup/welcome/lang/zh-CN.rc +++ b/base/setup/welcome/lang/zh-CN.rc @@ -23,7 +23,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED /* String Tables */ /* Default settings */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APPTITLE "ReactOS - 欢迎" IDS_DEFAULTTOPICTITLE "ReactOS" @@ -33,7 +33,7 @@ BEGIN END /* Topic buttons */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICBUTTON0 "安装 ReactOS" IDS_TOPICBUTTON1 "浏览 CD" @@ -48,7 +48,7 @@ BEGIN END /* Topic titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICTITLE0 "安装 ReactOS" IDS_TOPICTITLE1 "浏览 CD" @@ -63,7 +63,7 @@ BEGIN END /* Topic descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICDESC0 "重新安装 ReactOS 或 更新你的ReactOS 。" IDS_TOPICDESC1 "浏览 CD 的内容。" diff --git a/base/setup/welcome/rsrc.rc b/base/setup/welcome/rsrc.rc index 13f8aab9971..5e790d08c25 100644 --- a/base/setup/welcome/rsrc.rc +++ b/base/setup/welcome/rsrc.rc @@ -4,23 +4,23 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDI_MAIN ICON "res/welcome.ico" /* Bitmaps */ -IDB_TITLEBITMAP BITMAP DISCARDABLE "res/title.bmp" -//IDB_DEFAULTTOPICBITMAP BITMAP DISCARDABLE "res/default.bmp" +IDB_TITLEBITMAP BITMAP "res/title.bmp" +//IDB_DEFAULTTOPICBITMAP BITMAP "res/default.bmp" -//IDB_TOPICBITMAP0 BITMAP DISCARDABLE "res/topic0.bmp" -//IDB_TOPICBITMAP1 BITMAP DISCARDABLE "res/topic1.bmp" -//IDB_TOPICBITMAP2 BITMAP DISCARDABLE "res/topic2.bmp" -//IDB_TOPICBITMAP3 BITMAP DISCARDABLE "res/topic3.bmp" -//IDB_TOPICBITMAP4 BITMAP DISCARDABLE "res/topic4.bmp" -//IDB_TOPICBITMAP5 BITMAP DISCARDABLE "res/topic5.bmp" -//IDB_TOPICBITMAP6 BITMAP DISCARDABLE "res/topic6.bmp" -//IDB_TOPICBITMAP7 BITMAP DISCARDABLE "res/topic7.bmp" -//IDB_TOPICBITMAP8 BITMAP DISCARDABLE "res/topic8.bmp" -//IDB_TOPICBITMAP9 BITMAP DISCARDABLE "res/topic9.bmp" +//IDB_TOPICBITMAP0 BITMAP "res/topic0.bmp" +//IDB_TOPICBITMAP1 BITMAP "res/topic1.bmp" +//IDB_TOPICBITMAP2 BITMAP "res/topic2.bmp" +//IDB_TOPICBITMAP3 BITMAP "res/topic3.bmp" +//IDB_TOPICBITMAP4 BITMAP "res/topic4.bmp" +//IDB_TOPICBITMAP5 BITMAP "res/topic5.bmp" +//IDB_TOPICBITMAP6 BITMAP "res/topic6.bmp" +//IDB_TOPICBITMAP7 BITMAP "res/topic7.bmp" +//IDB_TOPICBITMAP8 BITMAP "res/topic8.bmp" +//IDB_TOPICBITMAP9 BITMAP "res/topic9.bmp" /* Topic actions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TOPICACTION0 "reactos.exe" IDS_TOPICACTION1 "explorer.exe" @@ -110,6 +110,9 @@ END #ifdef LANGUAGE_TH_TH #include "lang/th-TH.rc" #endif +#ifdef LANGUAGE_TR_TR + #include "lang/tr-TR.rc" +#endif #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" #endif diff --git a/base/shell/cmd/cmd.h b/base/shell/cmd/cmd.h index a39950bf431..4e2f038e545 100644 --- a/base/shell/cmd/cmd.h +++ b/base/shell/cmd/cmd.h @@ -137,7 +137,6 @@ typedef struct tagCOMMAND extern COMMAND cmds[]; /* The internal command table */ VOID PrintCommandList (VOID); -VOID PrintCommandListDetail (VOID); LPCTSTR GetParsedEnvVar ( LPCTSTR varName, UINT* varNameLen, BOOL ModeSetA ); @@ -295,7 +294,6 @@ INT cmd_rmdir (LPTSTR); INT CommandExit (LPTSTR); INT CommandRem (LPTSTR); INT CommandShowCommands (LPTSTR); -INT CommandShowCommandsDetail (LPTSTR); /* Prototypes for LABEL.C */ INT cmd_label (LPTSTR); diff --git a/base/shell/cmd/cmd.rc b/base/shell/cmd/cmd.rc index 802390ee497..41047b0f89c 100644 --- a/base/shell/cmd/cmd.rc +++ b/base/shell/cmd/cmd.rc @@ -11,7 +11,7 @@ #include -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_FREEDOS_DEV, " Tim Norman Matt Rains\n\ Evan Jeffrey Steffen Kaiser\n\ @@ -25,6 +25,6 @@ BEGIN Sylvain Petreolle\n" END -1 ICON DISCARDABLE res/terminal.ico +1 ICON res/terminal.ico #include "rsrc.rc" diff --git a/base/shell/cmd/cmdtable.c b/base/shell/cmd/cmdtable.c index bd0a0dca298..7c13c30ac4c 100644 --- a/base/shell/cmd/cmdtable.c +++ b/base/shell/cmd/cmdtable.c @@ -119,8 +119,6 @@ COMMAND cmds[] = {_T("goto"), CMD_BATCHONLY, cmd_goto}, - {_T("help"), 0, CommandShowCommandsDetail}, - #ifdef FEATURE_HISTORY {_T("history"), 0, CommandHistory}, #endif @@ -244,7 +242,6 @@ COMMAND cmds[] = {NULL, 0, NULL} }; - VOID PrintCommandList(VOID) { LPCOMMAND cmdptr; @@ -274,10 +271,4 @@ VOID PrintCommandList(VOID) ConOutChar(_T('\n')); } -VOID PrintCommandListDetail(VOID) -{ - ConOutResPaging(TRUE , STRING_HELP1); - ConOutResPaging(FALSE, STRING_HELP2); -} - /* EOF */ diff --git a/base/shell/cmd/internal.c b/base/shell/cmd/internal.c index 15f3c77ca2f..925f2c3b46d 100644 --- a/base/shell/cmd/internal.c +++ b/base/shell/cmd/internal.c @@ -547,26 +547,4 @@ INT CommandShowCommands (LPTSTR param) return 0; } -INT CommandShowCommandsDetail(LPTSTR param) -{ - /* We display help for the help command */ - if (!_tcsncmp(param, _T("/?"), 2)) - { - ConOutResPaging(TRUE, STRING_HELP_HELP1); - return 0; - } - - /* If a param was send, display help of corresponding command */ - if (_tcslen(param)) - { - DoCommand(param, _T("/?"), NULL); - } - /* Else, display detailed commands list */ - else - { - PrintCommandListDetail(); - } - return 0; -} - /* EOF */ diff --git a/base/shell/cmd/lang/de-DE.rc b/base/shell/cmd/lang/de-DE.rc index 7136a37bce0..63048241351 100644 --- a/base/shell/cmd/lang/de-DE.rc +++ b/base/shell/cmd/lang/de-DE.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_ASSOC_HELP, "Modifiziert Dateierweiterungs-Zuordnungen.\n\n\ @@ -267,10 +267,6 @@ GOTO Marke\n\n\ Marke Definiert eine Zeichenfolge als Marke in einem Batchprogramm.\n\n\ Marken stehen am Zeilenanfang mit einem vorangestellten Doppelpunkt." -STRING_HELP_HELP1, "Provides Help information for ReactOS commands.\n\n\ -HELP [command]\n\n\ - command - Display help information for this command.\n" - STRING_IF_HELP1, "Verarbeitet Ausdrücke in einer Batchdatei abhängig von Bedingungen.\n\n\ IF [NOT] ERRORLEVEL Nummer Befehl\n\ IF [NOT] variable1==variable2 Befehl\n\ @@ -559,68 +555,6 @@ MAX maximiert das Fenster\n\ RESTORE stellt das Fenster wieder her\n\ title neuer Titel" -STRING_HELP1, "Übersicht aller verfügbaren Befehle und deren Kurzbeschreibungen\n\n\ - help Befehl\n\ - Befehl /? Um nähere Informationen zu einem bestimmten Befehl\n\ - zu erhalten.\n\n\ -? Listet alle Befehle auf (ohne Erklärung).\n\ -ALIAS Setzt, löscht oder zeigt den Alias.\n\ -ATTRIB Zeigt Dateiattribute an bzw. ändert sie.\n\ -BEEP Gibt einen Piepton durch den PC-Speaker aus.\n\ -CALL Ruft eine Batchdatei aus einer anderen Batchdatei heraus auf.\n\ -CD Zeigt den Namen des aktuellen Verzeichnisses an bzw. ändert diesen.\n\ -CHCP Zeigt die aktive Codepagenummer an bzw. legt diese fest.\n\ -CHOICE Wartet auf den Benutzer, welcher aus einer Auswahl eine Option\n\ - wählen muss.\n\ -CLS Löscht den Bildschirminhalt.\n\ -CMD Startet eine neue Instanz des ReactOS-Befehlsinterpreters.\n\ -COLOR Legt die Farben für Hinter- und Vordergrund der Konsole fest.\n\ -COPY Kopiert eine oder mehrere Dateien an eine andere Stelle.\n\ -DATE Zeigt das Datum an bzw. legt dieses fest.\n\ -DELETE Löscht eine oder mehrere Dateien.\n\ -DIR Listet die Dateien und Unterverzeichnisse eines Verzeichnisses auf.\n\ -ECHO Zeigt Meldungen an bzw. schaltet die Befehlsanzeige ein oder aus.\n\ -ERASE Löscht eine oder mehrere Dateien.\n\ -EXIT Beendet das Programm CMD.EXE (Befehlsinterpreter).\n\ -FOR Führt einen angegebenen Befehl für jede Datei in einem Dateiensatz\n\ - aus.\n\ -FREE Zeigt den (freien) Speicherplatz an.\n\ -GOTO Setzt den ReactOS-Befehlsinterpreter auf eine markierte Zeile in\n\ - einem Batchprogramm.\n\ -HELP Zeigt Hilfeinformationen zu ReactOS-Befehlen an.\n\ -HISTORY Listet alle Befehle auf, welche sich im Speicher befinden.\n\ -IF Verarbeitet Ausdrücke in einer Batchdatei abhängig von Bedingungen.\n\ -LABEL Erstellt, ändert oder löscht die Bezeichnung eines Volumes.\n\ -MD Erstellt ein Verzeichnis.\n\ -MKDIR Erstellt ein Verzeichnis.\n\ -MKLINK Erzeugt eine Dateisystemverknüpfung.\n\ -MOVE Verschiebt eine oder mehrere Dateien von einem Verzeichnis in\n\ - ein anderes.\n" -STRING_HELP2, "PATH Legt den Suchpfad für ausführbare Dateien fest oder zeigt diesen an.\n\ -PAUSE Hält die Ausführung einer Batchdatei an und zeigt eine Meldung an.\n\ -POPD Wechselt zu dem Verzeichnis, das durch PUSHD gespeichert wurde.\n\ -PROMPT Ändert die Eingabeaufforderung.\n\ -PUSHD Speichert das aktuelle Verzeichnis, und wechselt dann zu einem\n\ - anderen Verzeichnis.\n\ -RD Entfernt ein Verzeichnis.\n\ -REM Leitet Kommentare in einer Batchdatei.\n\ -REN Benennt eine od. mehrere Dateien um.\n\ -RENAME Benennt eine od. mehrere Dateien um.\n\ -REPLACE Ersetzt Dateien.\n\ -RMDIR Löscht ein Verzeichnis.\n\ -SCREEN Bewegt den Cursor und optional die Ausgabe.\n\ -SET Setzt oder löscht die Umgebungsvariablen bzw. zeigt sie an.\n\ -SHIFT Verändert die Position ersetzbarer Parameter in Batchdateien.\n\ -START Startet ein eigenes Fenster, um ein bestimmtes Programm oder einen\n\ - Befehl auszuführen.\n\ -TIME Zeigt die Systemzeit an bzw. legt sie fest.\n\ -TIMER Erlaubt die Benutzung von bis zu 10 Stoppuhren\n\ -TITLE Legt den Fenstertitel für das Eingabeaufforderungsfenster fest.\n\ -TYPE Zeigt den Inhalt einer Textdatei an.\n\ -VER Zeigt die ReactOS-Version an.\n\ -VERIFY Legt fest, ob überwacht werden soll, ob Dateien korrekt auf den\n\ - Datenträger geschrieben werden.\n\ -VOL Zeigt die Datenträgervolumebezeichnung und die Seriennummer an.\n" STRING_CHOICE_OPTION, "JN" STRING_COPY_OPTION, "JNA" diff --git a/base/shell/cmd/lang/el-GR.rc b/base/shell/cmd/lang/el-GR.rc index 15f79119200..7d062f8f4f6 100644 --- a/base/shell/cmd/lang/el-GR.rc +++ b/base/shell/cmd/lang/el-GR.rc @@ -4,7 +4,7 @@ */ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_ASSOC_HELP, "Modify file extension associations.\n\n\ @@ -271,10 +271,6 @@ GOTO label\n\n\ label Specifies a text string used in a batch script as a label.\n\n\ You type a label on a line by itself, beginning with a colon." -STRING_HELP_HELP1, "Provides Help information for ReactOS commands.\n\n\ -HELP [command]\n\n\ - command - Display help information for this command.\n" - STRING_IF_HELP1, "Performs conditional processing in batch programs.\n\n\ IF [NOT] ERRORLEVEL number command\n\ IF [NOT] string1==string2 command\n\ @@ -564,63 +560,6 @@ RESTORE restore the window\n\ title new title\n" -STRING_HELP1, "List of all available commands (+ description)\n\n\ - help command\n\ - command /? For more information on a specific command\n\n\ -? List all available commands without description).\n\ -ALIAS Sets, removes or shows aliases.\n\ -ATTRIB Εμφανίζει ή αλλάζει τα χαρακτηριστικά αρχείων.\n\ -BEEP Beep the speaker.\n\ -CALL Καλεί ένα πρόγραμμα δέσμης από ένα άλλο.\n\ -CD Εμφανίζει το όνομα ή τις αλλαγές του τρέχοντος καταλόγου.\n\ -CHCP Εμφανίζει ή ορίζει τον αριθμό της ενεργής κωδικοσελίδας.\n\ -CHOICE Waits for the user to choose one of a set of choices.\n\ -CLS Καθαρίζει την οθόνη.\n\ -CMD Ξεκινά μια νέα περίοδο λειτουργίας του ερμηνευτή εντολών του ReactOS.\n\ -COLOR Ορίζει τα προεπιλεγμένα χρώματα πρώτου πλάνου και παρασκηνίου της κονσόλας.\n\ -COPY Αντιγράφει ένα ή περισσότερα αρχεία σε άλλη θέση.\n\ -DATE Εμφανίζει ή ρυθμίζει την ημερομηνία.\n\ -DELETE Διαγράφει ένα ή περισσότερα αρχεία.\n\ -DIR Εμφανίζει λίστα αρχείων και δευτερευόντων καταλόγων σε κατάλογο.\n\ -ECHO Εμφανίζει μηνύματα ή ενεργοποιεί και απενεργοποιεί το echo εντολών.\n\ -ERASE Διαγράφει ένα ή περισσότερα αρχεία.\n\ -EXIT Τερματίζει το πρόγραμμα CMD.EXE (ερμηνευτής εντολών).\n\ -FOR Εκτελεί μια καθορισμένη εντολή για κάθε αρχείο ενός συνόλου αρχείων.\n\ -FREE (free) disc space.\n\ -GOTO Μεταβιβάζει τον ερμηνευτή εντολών του ReactOS σε μια γραμμή με\n\ - ετικέτα σε ένα πρόγραμμα δέσμης.\n\ -HELP Παρέχει πληροφορίες Βοήθειας για εντολές του ReactOS.\n\ -HISTORY Εμφανίζει λίστα όλων των εντολών που έχουν χρησιμοποιηθεί.\n\ -IF Εκτελεί επεξεργασία υπό όρους σε προγράμματα δέσμης.\n\ -LABEL Δημιουργεί, αλλάζει ή διαγράφει την ετικέτα τόμου ενός δίσκου.\n\ -MD Δημιουργεί έναν κατάλογο.\n\ -MKDIR Δημιουργεί έναν κατάλογο.\n\ -MKLINK Creates a filesystem link object.\n\ -MOVE Μετακινεί ένα ή περισσότερα αρχεία από έναν κατάλογο σε έναν άλλο.\n\ -PATH Εμφανίζει ή ορίζει μια διαδρομή αναζήτησης για εκτελέσιμα αρχεία.\n\ -PAUSE Αναστέλλει την εκτέλεση ενός προγράμματος δέσμης και εμφανίζει ένα μήνυμα.\n\ -POPD Επαναφέρει την προηγούμενη τιμή του τρέχοντα καταλόγου, που αποθηκεύτηκε από την PUSHD.\n\ -PROMPT Αλλάζει τη γραμμή εντολών.\n\ -PUSHD Αποθηκεύει τον τρέχοντα κατάλογο και στη συνέχεια τον αλλάζει.\n\ -RD Καταργεί έναν κατάλογο.\n\ -REM Καταγράφει σχόλια (παρατηρήσεις) σε αρχεία δέσμης ή στο CONFIG.SYS.\n\ -REN Μετονομάζει ένα αρχείο ή αρχεία.\n\ -RENAME Μετονομάζει ένα αρχείο ή αρχεία.\n\ -REPLACE Αντικαθιστά αρχεία.\n\ -RMDIR Καταργεί έναν κατάλογο.\n\ -SCREEN Move cursor and optionally print text.\n\ -SET Εμφανίζει, ορίζει ή καταργεί μεταβλητές περιβάλλοντος των Windows.\n\ -SHIFT Μετατρέπει τη θέση των παραμέτρων με δυνατότητα αντικατάστασης σε αρχεία δέσμης.\n" -STRING_HELP2, "START Ξεκινά ένα διαφορετικό παράθυρο για την εκτέλεση ενός καθορισμένου προγράμματος ή εντολής.\n\ -TIME Εμφανίζει ή ορίζει την ώρα του συστήματος.\n\ -TIMER Allow the use of ten stopwatches.\n\ -TITLE Ορίζει τον τίτλο παραθύρου για περίοδο λειτουργίας CMD.EXE.\n\ -TYPE Εμφανίζει τα περιεχόμενα ενός αρχείου κειμένου.\n\ -VER Εμφανίζει την έκδοση του ReactOS.\n\ -VERIFY Ενημερώνει τα Windows εάν πρέπει να εξακριβωθεί ότι η εγγραφή των αρχείων σας έχει γίνει σωστά σε ένα δίσκο.\n\ -VOL Εμφανίζει την ετικέτα και τον σειριακό αριθμό ενός τόμου στο δίσκο.\n" - - STRING_CHOICE_OPTION, "YN" STRING_COPY_OPTION, "YNA" diff --git a/base/shell/cmd/lang/en-US.rc b/base/shell/cmd/lang/en-US.rc index b63393c0f0d..2f7cd46c01b 100644 --- a/base/shell/cmd/lang/en-US.rc +++ b/base/shell/cmd/lang/en-US.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_ASSOC_HELP, "Modify file extension associations.\n\n\ @@ -271,10 +271,6 @@ GOTO label\n\n\ label Specifies a text string used in a batch script as a label.\n\n\ You type a label on a line by itself, beginning with a colon." -STRING_HELP_HELP1, "Provides Help information for ReactOS commands.\n\n\ -HELP [command]\n\n\ - command - Display help information for this command.\n" - STRING_IF_HELP1, "Performs conditional processing in batch programs.\n\n\ IF [NOT] ERRORLEVEL number command\n\ IF [NOT] string1==string2 command\n\ @@ -564,67 +560,6 @@ RESTORE restore the window\n\ title new title\n" -STRING_HELP1, "List of all available commands (+ description)\n\n\ - help command\n\ - command /? For more information on a specific command\n\n\ -? List all available commands (without description).\n\ -ALIAS Sets, removes or shows aliases.\n\ -ATTRIB Displays or changes file attributes.\n\ -BEEP Beep the speaker.\n\ -CALL Calls one batch program from another.\n\ -CD Displays the name of or changes the current directory.\n\ -CHCP Displays or sets the active code page number.\n\ -CHOICE Waits for the user to choose one of a set of choices.\n\ -CLS Clears the screen.\n\ -CMD Starts a new instance of the ReactOS command interpreter.\n\ -COLOR Sets the default console foreground and background colors.\n\ -COPY Copies one or more files to another location.\n\ -DATE Displays or sets the date.\n\ -DELETE Deletes one or more files.\n\ -DIR Displays a list of files and subdirectories in a directory.\n\ -ECHO Displays messages, or turns command echoing on or off.\n\ -ERASE Deletes one or more files.\n\ -EXIT Quits the CMD.EXE program (command interpreter).\n\ -FOR Runs a specified command for each file in a set of files.\n\ -FREE (free) disc space.\n\ -GOTO Directs the ReactOS command interpreter to a labeled line in\n\ - a batch program.\n\ -HELP Provides Help information for ReactOS commands.\n\ -HISTORY List all commands which has been used\n\ -IF Performs conditional processing in batch programs.\n\ -LABEL Creates, changes, or deletes the volume label of a disk.\n\ -MD Creates a directory.\n\ -MKDIR Creates a directory.\n\ -MKLINK Creates a filesystem link object.\n\ -MOVE Moves one or more files from one directory to another\n\ - directory.\n\ -PATH Displays or sets a search path for executable files.\n\ -PAUSE Suspends processing of a batch file and displays a message.\n\ -POPD Restores the previous value of the current directory saved by\n\ - PUSHD.\n\ -PROMPT Changes the command prompt.\n\ -PUSHD Saves the current directory then changes it.\n\ -RD Removes a directory.\n\ -REM Records comments (remarks) in batch files.\n\ -REN Renames a file or files.\n\ -RENAME Renames a file or files.\n\ -REPLACE Replaces files.\n\ -RMDIR Removes a directory.\n\ -SCREEN Move cursor and optionally print text.\n\ -SET Displays, sets, or removes ReactOS environment variables.\n\ -SHIFT Shifts the position of replaceable parameters in batch files.\n" -STRING_HELP2, "START Starts a separate window to run a specified program or command.\n\ - Executes command.\n\ -TIME Displays or sets the system time.\n\ -TIMER Allow the use of ten stopwatches.\n\ -TITLE Sets the window title for a CMD.EXE session.\n\ -TYPE Displays the contents of a text file.\n\ -VER Displays the ReactOS version.\n\ -VERIFY Tells ReactOS whether to verify that your files are written\n\ - correctly to a disk.\n\ -VOL Displays a disk volume label and serial number.\n" - - STRING_CHOICE_OPTION, "YN" STRING_COPY_OPTION, "YNA" diff --git a/base/shell/cmd/lang/es-ES.rc b/base/shell/cmd/lang/es-ES.rc index 6690009ca43..f203a2c5286 100644 --- a/base/shell/cmd/lang/es-ES.rc +++ b/base/shell/cmd/lang/es-ES.rc @@ -4,7 +4,7 @@ */ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_ASSOC_HELP, "Modify file extension associations.\n\n\ @@ -272,10 +272,6 @@ GOTO etiqueta\n\n\ etiqueta Especifica la cadena de texto usada en el archivo por lotes como etiqueta.\n\n\ Escriba la etiqueta en la linea misma, empezando con dos puntos." -STRING_HELP_HELP1, "Provides Help information for ReactOS commands.\n\n\ -HELP [command]\n\n\ - command - Display help information for this command.\n" - STRING_IF_HELP1, "Ejecuta procesos condicionales en archivos por lotes.\n\n\ IF [NOT] ERRORLEVEL número comando\n\ IF [NOT] string1==string2 comando\n\ @@ -565,65 +561,6 @@ RESTORE restaura la ventana\n\ title Nuevo título\n" -STRING_HELP1, "Lista de todos los comandos disponibles (con descripción)\n\n\ - help comando\n\ - comando /? Para más información del comando especificado.\n\n\ -? Muestra todos los comandos disponibles (sin la descripción).\n\ -ALIAS Crea, borra o muestra los alias.\n\ -ATTRIB Muestra o cambia los atributos de archivo.\n\ -BEEP Hace un beep con el altavoz.\n\ -CALL Llama a un archivo por lotes desde otro.\n\ -CD Muestra o cambia el directorio actual.\n\ -CHCP Muestra o cambia el código de página activo.\n\ -CHOICE Espera a que el usuario elija una opción de un grupo de opciones.\n\ -CLS Limpia la pantalla.\n\ -CMD Comienza una nueva instancia del intérprete de comandos.\n\ -COLOR Configura el color por defecto de fondo y frente de la consola.\n\ -COPY Copia uno o varios archivos de una localización a otra.\n\ -DATE Muestra y cambia la fecha.\n\ -DELETE Borra uno o más archivos.\n\ -DIR Muestra una lista de los archivos y subdirecctorios en un directorio.\n\ -ECHO Muestra mensajes, o cambia un comando entre mostrarlos o no.\n\ -ERASE Borra uno o más archivos.\n\ -EXIT Sale del programa CMD.EXE (intérprete de comandos).\n\ -FOR Ejecuta un comando específico en un grupo de archivos.\n\ -FREE Espacio libre en disco.\n\ -GOTO Direcciona la ventana del intérprete de comandos a una linea etiquetada\n\ - en un archivo por lotes.\n\ -HELP Proporciona ayuda sobre los comandos para ReactOS.\n\ -HISTORY Muestra todos los comandos que han sido usados.\n\ -IF Realiza un proceso condicional en un archivo por lotes.\n\ -LABEL Crea, cambia, o borra la etiqueta de volumen de un disco.\n\ -MD Crea un directorio.\n\ -MKDIR Crea un directorio.\n\ -MKLINK Creates a filesystem link object.\n\ -MOVE Mueve uno o más archivos de un directorio a otro.\n\ -PATH Muestra o configura las rutas de búsqueda para archivos ejecutables.\n\ -PAUSE Suspende el procesamiento de un archivo por lotes y muestra un mensaje.\n\ -POPD Restaura el valor anterior del directorio actual guardado por PUSHD.\n\ -PROMPT Cambia el símbolo del sistema del intéprete de comandos.\n\ -PUSHD Guarda el directorio actual y después lo cambia.\n\ -RD Borra un directorio.\n\ -REM Marca comentarios en archivos por lotes.\n\ -REN Renombra un archivo o varios archivos.\n\ -RENAME Renombra un archivo o varios archivos.\n\ -RMDIR Borra un directorio.\n\ -SCREEN Mueve el cursor y opcionalmente escribe un texto.\n\ -SET Muestra, cambia o borra variables del entorno de la ventana.\n\ -SHIFT Marca la posición de parámetros remplazables en un archivo por lotes.\n" - -STRING_HELP2, "START Abre una ventana separada para ejecutar un programa o comando específicod.\n\ - Ejecuta CMD.\n\ -TIME Muestra o cambia la hora del sistema.\n\ -TIMER Permite al usuario diez paradas para ver.\n\ -TITLE Configura el título de la ventama de la sesión de CMD.EXE.\n\ -TYPE Muestra el contenido de un archivo de texto.\n\ -VER Muestra la versión de ReactOS.\n\ -VERIFY Le dice a ReactOS que verifique que cada archivo se escriba.\n\ - corectamente en el disco.\n\ -VOL Muestra la etiqueta de volumen y el número de serie del disco.\n" - - STRING_CHOICE_OPTION, "SN" STRING_COPY_OPTION, "SNT" diff --git a/base/shell/cmd/lang/fr-FR.rc b/base/shell/cmd/lang/fr-FR.rc index c08527ec836..d12ae0816ea 100644 --- a/base/shell/cmd/lang/fr-FR.rc +++ b/base/shell/cmd/lang/fr-FR.rc @@ -5,7 +5,7 @@ */ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_ASSOC_HELP, "Modify file extension associations.\n\n\ @@ -286,10 +286,6 @@ GOTO label\n\n\ label Spécifie un champ texte utilisé dans un script batch comme un label.\n\n\ Vous écrivez un label seul sur une ligne commençant par un deux-points.\n" -STRING_HELP_HELP1, "Fournit des informations d'aide pour les commandes de ReactOS.\n\n\ -HELP [commande]\n\n\ - commande - Affiche des informations d'aide sur cette commande.\n" - STRING_IF_HELP1, "Exécute un traitement conditionnel dans des programmes batch.\n\n\ IF [NOT] ERRORLEVEL nombre commande\n\ IF [NOT] chaine1==chaine2 commande\n\ @@ -578,67 +574,6 @@ RESTORE restaure la fenêtre\n\ titre titre de la fenêtre" -STRING_HELP1, "Liste de toutes les commandes disponibles (+ description)\n\n\ - help commande\n\ - commande /? Pour plus d'informations sur une commande spécifique\n\n\ -? Liste toutes les commandes disponibles sans leur description).\n\ -ALIAS Défini, supprime ou montre les alias.\n\ -ATTRIB Affiche ou change les attributs d'un fichier.\n\ -BEEP Émet un bip par le haut-parleur système.\n\ -CALL Appelle un programme batch à partir d'un autre.\n\ -CD Affiche ou change le répertoire courant.\n\ -CHCP Affiche ou défini le numéro de page de codes.\n\ -CHOICE Attend après l'utilisateur pour un choix parmi un ensemble de propositions.\n\ -CLS Efface l'écran.\n\ -CMD Démarre une nouvelle instance de l'interpréteur de commandes de ReactOS.\n\ -COLOR Défini les couleurs par défaut pour le premier plan et l'arrière-plan de la console.\n\ -COPY Copie un ou plusieurs fichiers vers une autre destination.\n\ -DATE Affiche ou défini la date.\n\ -DELETE Supprime un ou plusieurs fichiers.\n\ -DIR Affiche la liste des fichiers et des sous-répertoires du dossier.\n\ -ECHO Affiche des messages, ou bascule l'affichage des commandes sur on ou off.\n\ -ERASE Supprime un ou plusieurs fichiers.\n\ -EXIT Quitte le programme CMD.EXE (interpréteur de commandes).\n\ -FOR Lance une commande spécifique pour chaque fichier d'un ensemble de fichiers.\n\ -FREE Espace disque (libre).\n\ -GOTO Dirige l'interpréteur de commandes de ReactOS vers une ligne nommée\n\ - dans un script batch.\n\ -HELP Fournit des informations d'aide pour les commandes de ReactOS.\n\ -HISTORY Liste toutes les commandes qui ont été utilisées\n\ -IF Exécute un traitement conditionnel dans des programmes batch.\n\ -LABEL Créé, change, ou supprime le nom de volume d'un disque.\n\ -MD Créé un répertoire.\n\ -MKDIR Créé un répertoire.\n\ -MKLINK Creates a filesystem link object.\n\ -MOVE Déplace un ou plusieurs fichiers d'un répertoire vers un autre\n\ - répertoire.\n\ -PATH Affiche ou défini un chemin de recherche pour les fichiers exécutables.\n\ -PAUSE Suspend l'exécution d'un fichier batch et affiche un message.\n\ -POPD Restaure la précédente valeur du répertoire courant sauvegardée par\n\ - PUSHD.\n\ -PROMPT Change l'invite de commande.\n\ -PUSHD Sauvegarde le répertoire courant puis le change.\n\ -RD Supprime un répertoire.\n\ -REM Enregistre des commentaires (remarques) dans un fichier batch.\n\ -REN Renomme un ou plusieurs fichiers.\n\ -RENAME Renomme un ou plusieurs fichiers.\n\ -REPLACE Remplace un fichier.\n\ -RMDIR Supprime un répertoire.\n\ -SCREEN Déplace le curseur, optionnellement affiche du texte.\n\ -SET Affiche, défini, ou supprime des variables d'environnement de ReactOS.\n\ -SHIFT Déplace la position des paramètres remplacables dans un fichier batch.\n" -STRING_HELP2, "START Démarre une fenêtre séparée pour lancer un programme spécifié ou une commande.\n\ - Exécute la commande.\n\ -TIME Affiche ou défini l'heure du système.\n\ -TIMER Permet l'utilisation de dix chronomètres.\n\ -TITLE Défini le titre de la fenêtre pour une session de CMD.EXE.\n\ -TYPE Affiche le contenu d'un fichier texte.\n\ -VER Affiche la version de ReactOS.\n\ -VERIFY Spécifie à ReactOS s'il faut vérifier que les fichiers sont correctement\n\ - écrit sur un disque.\n\ -VOL Affiche le nom de volume d'un disque et son numéro de série.\n" - - STRING_CHOICE_OPTION, "ON" STRING_COPY_OPTION, "ONT" diff --git a/base/shell/cmd/lang/hu-HU.rc b/base/shell/cmd/lang/hu-HU.rc index c63be91b113..0c7d07a8db8 100644 --- a/base/shell/cmd/lang/hu-HU.rc +++ b/base/shell/cmd/lang/hu-HU.rc @@ -4,7 +4,7 @@ */ LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_ASSOC_HELP, "Modify file extension associations.\n\n\ @@ -256,10 +256,6 @@ GOTO címke\n\n\ címke A megadott címkére fog ugrani az értelmezõ.\n\n\ Egy címkét egy sorban lehet megadni, ':' -tal kezdve." -STRING_HELP_HELP1, "Provides Help information for ReactOS commands.\n\n\ -HELP [command]\n\n\ - command - Display help information for this command.\n" - STRING_IF_HELP1, "Performs conditional processing in batch programs.\n\n\ IF [NOT] ERRORLEVEL number command\n\ IF [NOT] string1==string2 command\n\ @@ -548,61 +544,6 @@ RESTORE restore the window\n\ title new title\n" -STRING_HELP1, "Támogatott parancsok megjelenítése\n\n\ - help parancs\n\ - parancs /? Több (részletes) információ megtekintéséhez használd ezt.\n\n\ -? Minden támogatott parancs megjelenítése (részletek nélkül).\n\ -ALIAS Megjeleníti, vagy megváltoztatja az aliasokat.\n\ -ATTRIB Megjeleníti vagy megváltoztatja az állományok attribútumát.\n\ -BEEP Megszólaltatja a hangszórót.\n\ -CALL Batch állományból egy másik batch állomány meghívása.\n\ -CD Megjeleníti vagy átvált egy másik mappába.\n\ -CHCP Megjeleníti vagy megváltoztatja az aktív kódlapot.\n\ -CHOICE Vár a felhasználóra, hogy válasszon a felkínált lehetõségek közül.\n\ -CLS Letörli a képernyõt.\n\ -CMD Egy új példányt indít a ReactOS parancsértelmezõjébõl.\n\ -COLOR A konzol elõ- és háttérszínét állítja be.\n\ -COPY Egy vagy több állományt másol a megadott helyre.\n\ -DATE Megjeleníti vagy beállítja a rendszerdátumot.\n\ -DELETE Eltávolít egy vagy több állományt.\n\ -DIR Megjeleníti a mappában található almappákat és állományokat.\n\ -ECHO Megjelenít egy szöveget, vagy beállítja a visszhangot.\n\ -ERASE Eltávolít egy vagy több fájlt.\n\ -EXIT Kilép a parancssor értelmezõbõl.\n\ -FOR Végrehajt egy parancsot az összes fájlban a megadott mappákban.\n\ -FREE Megjeleníti a szabad hely méretét.\n\ -GOTO Átirányít egy másik címkére a batch állományban.\n\ -HELP Segítséget ad a ReactOS parancsairól.\n\ -HISTORY Megjeleníti az ebben az ablakban kiadott parancsok listáját.\n\ -IF Feltételes végrehajtás batch állományokban.\n\ -LABEL Beállítja egy kötet címkéjét.\n\ -MD Létrehoz egy új mappát.\n\ -MKDIR Létrehoz egy új mappát.\n\ -MKLINK Creates a filesystem link object.\n\ -MOVE Áthelyez egy vagy több állományt az egyik mappából a másikba.\n\ -PATH Megjeleníti vagy beállítja a keresési útvonalakat.\n\ -PAUSE Felfüggeszti a futást, és vár a felhasználóra.\n\ -POPD Visszalép a PUSHD által megjegyzett mappába.\n\ -PROMPT Parancssor beállítása.\n\ -PUSHD Megjegyzi az aktuális mappát, majd átvált egy máasikra.\n\ -RD Töröl egy mappát.\n\ -REM Megjegyzést jelölõ sor batch fájlokban.\n\ -REN Átnevez egy állományt.\n\ -RENAME Átnevez egy állományt.\n\ -RMDIR Töröl egy mappát.\n\ -SCREEN Megváltoztatja a kurzos pozícióját, vagy megjelenít adott pozícióban egy szöveget.\n\ -SET Megjeleníti vagy beállítja a környezeti változókat.\n\ -SHIFT Eltolja a helyettesíthetõ paraméterek pozícióját a batch állományban.\n" -STRING_HELP2, "START Egy új ablakban hajtha végre a parancsot.\n\ -TIME Megjeleníti vagy beállítja a rendszeridõt.\n\ -TIMER Idõzítõk kezelését teszi lehetõve.\n\ -TITLE Beállítja az ablak címsorának szövegét.\n\ -TYPE Megjeleníti egy állomány tartalmát.\n\ -VER Megjeleníti a ReactOS verzió információját.\n\ -VERIFY Írási mûveletek ellenõrzését vezérli\n\ -VOL Megjeleníti egy kötet címkéjét és sorozatszámát.\n" - - STRING_CHOICE_OPTION, "IN" STRING_COPY_OPTION, "INM" diff --git a/base/shell/cmd/lang/id-ID.rc b/base/shell/cmd/lang/id-ID.rc index 7608db7f3ee..fbab91a0adc 100644 --- a/base/shell/cmd/lang/id-ID.rc +++ b/base/shell/cmd/lang/id-ID.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_ASSOC_HELP, "Modify file extension associations.\n\n\ @@ -272,10 +272,6 @@ GOTO label\n\n\ label Menetapkan string teks yang digunakan dalam naskah batch sebagai label.\n\n\ Anda mengetik label pada sebuah baris, dimulai dengan titik dua." -STRING_HELP_HELP1, "Provides Help information for ReactOS commands.\n\n\ -HELP [command]\n\n\ - command - Display help information for this command.\n" - STRING_IF_HELP1, "Melakukan pemrosesan kondisional dalam program batch.\n\n\ IF [NOT] ERRORLEVEL nomor perintah\n\ IF [NOT] string1==string2 perintah\n\ @@ -563,66 +559,6 @@ RESTORE mengembalikan jendela\n\ title judul baru\n" -STRING_HELP1, "Daftar semua perintah yang tersedia (+ deskripsi)\n\n\ - help command\n\ - command /? Untuk informasi lengkap pada perintah tertentu\n\n\ -? Daftar semua perintah yang tersedia tanpa deskripsi.\n\ -ALIAS Menyetel, menghapus atau menampilkan alias.\n\ -ATTRIB Menampilkan atau mengubah atribut file.\n\ -BEEP Membunyikan speaker.\n\ -CALL Memanggil program batch dari yang lain.\n\ -CD Menampilkan nama atau mengubah direktori saat ini.\n\ -CHCP Menampilkan atau menyetel nomor halaman kode aktif.\n\ -CHOICE Menunggu pengguna untuk memilih satu dari set pilihan.\n\ -CLS Membersihkan layar.\n\ -CMD Memulai instan interpreter perintah ReactOS baru.\n\ -COLOR Menyetel warna standar latar belakang dan depan konsol.\n\ -COPY Mengcopy satu atau lebih file ke lokasi lain.\n\ -DATE Menampilkan atau menyetel tanggal.\n\ -DELETE Menghapus satu atau lebih file.\n\ -DIR Menampilkan daftar file dan subdirektori dalam sebuah direktori.\n\ -ECHO Menampilkan pesan, atau menghidupkan/mematikan echo perintah.\n\ -ERASE Menghapus satu atau lebih file.\n\ -EXIT Keluar dari program CMD.EXE (interpreter perintah).\n\ -FOR Menjalankan perintah tertentu untuk setiap file atau set file.\n\ -FREE (bebas) ruang disc.\n\ -GOTO Melangsungkan interpreter perintah ReactOS ke baris berlabel dalam\n\ - program batch.\n\ -HELP Menyediakan informasi Bantuan untuk perintah ReactOS.\n\ -HISTORY Mendaftarkan semua perintah yang sudah digunakan\n\ -IF Melakukan pemrosesan kondisional dalam program batch.\n\ -LABEL Membuat, mengubah, atau menghapus label volume disk.\n\ -MD Membuat sebuah direktori.\n\ -MKDIR Membuat sebuah direktori.\n\ -MKLINK Creates a filesystem link object.\n\ -MOVE Memindahkan satu atau lebih file dari satu direktori ke yang lainnya\n\ - directory.\n\ -PATH Menampilkan atau menyetel path pencarian untuk file executable.\n\ -PAUSE Menunda proses file batch dan menampilkan pesan.\n\ -POPD Mengembalikan nilai sebelumnya dari direktori saat ini yang\n\ - disimpan oleh PUSHD.\n\ -PROMPT Mengubah prompt perintah.\n\ -PUSHD Menyimpan direktori saat ini lalu mengubahnya.\n\ -RD Menghapus direktori.\n\ -REM Merekam komentar (remarks) dalam file batch.\n\ -REN Mengganti nama file.\n\ -RENAME Mengganti nama file.\n\ -RMDIR Menghapus direktori.\n\ -SCREEN Memindahkan kursor dan secara opsional mencetak teks.\n\ -SET Menampilkan, menyetel, atau menghapus variabel lingkungan ReactOS.\n\ -SHIFT Mengangkat posisi parameter yang bisa diganti dalam file batch.\n" -STRING_HELP2, "START Memulai jendela terpisah untuk menjalankan perintah atau program tertentu.\n\ - Menjalankan perintah.\n\ -TIME Menampilkan atau menyetel jam sistem.\n\ -TIMER Mengijinkan penggunaan sepuluh stopwatch.\n\ -TITLE Menyetel judul jendela untuk ses CMD.EXE.\n\ -TYPE Menampilkan isi dari file teks.\n\ -VER Menampilkan versi ReactOS.\n\ -VERIFY Memberitahu ReactOS apakah memverifikasi bahwa file anda ditulis\n\ - dengan benar ke sebuah disk.\n\ -VOL Menampilkan label volume disk dan nomor seri.\n" - - STRING_CHOICE_OPTION, "YT" STRING_COPY_OPTION, "YTS" diff --git a/base/shell/cmd/lang/it-IT.rc b/base/shell/cmd/lang/it-IT.rc index 5c2f36b5c4b..55f40931883 100644 --- a/base/shell/cmd/lang/it-IT.rc +++ b/base/shell/cmd/lang/it-IT.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_ASSOC_HELP, "Modifica le associazioni per le estensioni dei file.\n\n\ @@ -270,10 +270,6 @@ GOTO etichetta\n\n\ etichetta Indica il testo utilizzato come etichetta in un batch.\n\n\ Nel batch questa deve trovarsi da sola in una linea con davanti due punti :.\n" -STRING_HELP_HELP1, "Provides Help information for ReactOS commands.\n\n\ -HELP [command]\n\n\ - command - Display help information for this command.\n" - STRING_IF_HELP1, "Esegue una elaborazione condizionale nei batch.\n\n\ IF [NOT] ERRORLEVEL numero comando\n\ IF [NOT] stringa1==stringa2 comando\n\ @@ -571,64 +567,6 @@ RESTORE ripristina la finestra\n\ titolo il nuovo titolo\n" -STRING_HELP1, "Elenco di tutti i comandi disponibili (+ descrizione)\n\n\ - help comando\n\ - comando /? Per i dettagli su uno specifico comando\n\n\ -? Elenco di tutti i comandi disponibili.\n\ -ALIAS Imposta, toglie o visualizza gli alias.\n\ -ASSOC Modifica le associazioni per le estensioni dei file.\n\ -ATTRIB Visualizza o modifica gli attributi dei file.\n\ -BEEP Segnale acustico.\n\ -CALL Chiama un batch da un'altro.\n\ -CD Visualizza il nome o modifica la cartella corrente.\n\ -CHCP Visualizza o imposta il numero della tabella dei codici.\n\ -CHOICE Aspetta che l'utente scelga una tra le opzioni disponibili.\n\ -CLS Cancella lo schermo.\n\ -CMD Esegue un altro interprete dei comandi.\n\ -COLOR Imposta i colori della console.\n\ -COPY Copia uno o più file in un'altra destinazione.\n\ -DATE Visualizza o modifica la data.\n\ -DELETE Cancella uno o più file.\n\ -DIR Visualizza un elenco di file e sottocartelle in una cartella.\n\ -ECHO Visualizza messaggi o abilita e disabilita la visualizzazione dei comandi.\n\ -ERASE Cancella uno o più file.\n\ -EXIT Esce dall'interprete dei comandi.\n\ -FOR Esegue un comando per ognuno dei file indicati.\n\ -FREE Spazio libero.\n\ -GOTO Salta a una etichetta durante l'esecuzione di un batch.\n\ -HELP Fornisce informazioni sui comandi di ReactOS.\n\ -HISTORY Elenco degli ultimi comandi usati\n\ -IF Esegue elaborazioni condizionali in un batch.\n\ -LABEL Crea, modifica, o cancella l'etichetta di un disco.\n\ -MD Crea una cartella.\n\ -MKDIR Crea una cartella.\n\ -MKLINK Crea un oggetto di collegamento nel filesystem.\n\ -MOVE Muove uno o più file da una cartella a un'altra\n\ -PATH Visualizza o imposta i percorsi di ricerca per gli eseguibili.\n\ -PAUSE Ferma l'esecuzione di un batch e visualizza un messaggio.\n\ -POPD Ripristina il valore precedente della cartella corrente salvato da\n\ - PUSHD.\n\ -PROMPT Cambia il messaggio di pronto per i comandi.\n\ -PUSHD Salva la cartella corrente e poi la cambia.\n\ -RD Rimuove una cartella.\n\ -REM Commenti in un batch.\n\ -REN Rinomina uno più file.\n\ -RENAME Rinomina uno più file.\n\ -RMDIR Rimuove una cartella.\n\ -SCREEN Sposta il cursore e visualizza un testo.\n\ -SET Visualizza, modifica, o cancella le variabili di ambiente.\n\ -SHIFT Scorre la posizione dei parametri nei batch.\n" -STRING_HELP2, "START Apre una finestra separata ed esegue uno specifico comando.\n\ -TIME Visualizza o modifica l'ora di sistema.\n\ -TIMER Permette l'uso di cronometri.\n\ -TITLE Imposta il titolo della finestra per una sessione di CMD.EXE.\n\ -TYPE Visualizza il contenuto di un file di testo.\n\ -VER Visualizza la versione di ReactOS.\n\ -VERIFY Richiede che ReactOS verifichi che i file siano scritti correttamente\n\ - su disco.\n\ -VOL Visualizza l'etichetta del volume e il numero di serie del disco.\n" - - STRING_CHOICE_OPTION, "SN" STRING_COPY_OPTION, "SNT" diff --git a/base/shell/cmd/lang/ja-JP.rc b/base/shell/cmd/lang/ja-JP.rc index 9c7ccc5d226..07768a8c859 100644 --- a/base/shell/cmd/lang/ja-JP.rc +++ b/base/shell/cmd/lang/ja-JP.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_ASSOC_HELP, "Modify file extension associations.\n\n\ @@ -277,10 +277,6 @@ GOTO ラベル\n\n\ ラベルの先頭には : (コロン) を指定し、ラベルだけを単独で 1 行に入力してくだ\n\ さい。" -STRING_HELP_HELP1, "Provides Help information for ReactOS commands.\n\n\ -HELP [command]\n\n\ - command - Display help information for this command.\n" - STRING_IF_HELP1, "バッチ プログラム中で条件処理を実行します。\n\n\ IF [NOT] ERRORLEVEL 番号 コマンド\n\ IF [NOT] 文字列1==文字列2 コマンド\n\ @@ -571,64 +567,6 @@ RESTORE ウィンドウを元のサイズに戻します。\n\ タイトル 新しいタイトルです。\n" -STRING_HELP1, "利用可能なすべてのコマンドの一覧と、その説明。\n\n\ - help コマンド\n\ - コマンド /? 特定のコマンドに関する詳細情報\n\n\ -? 利用可能なすべてのコマンドの一覧 (説明なし)。\n\ -ALIAS エイリアスの設定や解除をしたり、エイリアスを表示したりします。\n\ -ATTRIB ファイル属性を表示または変更します。\n\ -BEEP スピーカからビープ音を鳴らします。\n\ -CALL バッチ プログラムを別のバッチ プログラムから呼び出します。\n\ -CD 現在のディレクトリを変更したり、ディレクトリ名を表示したりします。\n\ -CHCP 現在のコード ページ番号を表示または設定します。\n\ -CHOICE ユーザーが選択肢から一つを選択するのを待ちます。\n\ -CLS 画面を消去します。\n\ -CMD ReactOS コマンド インタープリタの新しいインスタンスを開始します。\n\ -COLOR コンソールのデフォルトの前景色および背景色を設定します。\n\ -COPY 1 つまたは複数のファイルを別の場所にコピーします。\n\ -DATE 日付を表示または設定します。\n\ -DELAY n 秒、または n ミリ秒待機します。\n\ -DELETE 1 つまたは複数のファイルを削除します。\n\ -DIR ディレクトリ中のファイルとサブディレクトリを一覧表示します。\n\ -ECHO メッセージを表示したり、コマンド エコーの ON と OFF を切り替えます。\n\ -ERASE 1 つまたは複数のファイルを削除します。\n\ -EXIT CMD.exe (コマンド ライン インタープリタ) を終了します。\n\ -FOR 指定されたコマンドをファイル セットの各ファイルに対して実行します。\n\ -FREE ディスクの空き容量\n\ -GOTO バッチ プログラム内の、ラベルで指定されている行へ制御を移動します。\n\ -HELP ReactOS コマンドのヘルプ情報を提供します。\n\ -HISTORY 使用されたすべてのコマンドを一覧表示します。\n\ -IF バッチ プログラム中で条件処理を実行します。\n\ -LABEL ディスクのボリューム ラベルを表示または変更します。\n\ -MD ディレクトリを作成します。\n\ -MKDIR ディレクトリを作成します。\n\ -MKLINK Creates a filesystem link object.\n\ -MOVE ファイルを移動およびファイルとディレクトリ名を変更します。\n\ -PATH 実行可能ファイルの検索パスを表示または設定します。\n\ -PAUSE バッチ プログラムの処理を一時停止し、メッセージを表示します。\n\ -POPD 現在のディレクトリを PUSHD コマンドで記憶されたディレクトリに\n\ - 変更します。\n\ -PROMPT コマンド プロンプトを変更します。\n\ -PUSHD 現在のディレクトリを保存し、指定したディレクトリに変更します。\n\ -RD ディレクトリを削除します。\n\ -REM バッチ ファイルにコメント (注釈) を記録します。\n\ -REN 1 つまたは複数のファイルの名前を変更します。\n\ -RENAME 1 つまたは複数のファイルの名前を変更します。\n\ -RMDIR ディレクトリを削除します。\n\ -SCREEN カーソルを移動させます。移動後、文字列を入力することもできます。\n\ -SET 環境変数を表示、設定、または削除します。\n\ -SHIFT カーソルを移動させます。移動後、文字列を入力することもできます。\n" -STRING_HELP2, "START 別のウィンドウを起動し、指定したプログラムまたはコマンドを実行します。\n\ -TIME システム時刻を表示または設定します。\n\ -TIMER 10 個までのストップウォッチを使うことができます。\n\ -TITLE コマンド プロンプト ウィンドウのウィンドウ タイトルを設定します。\n\ -TYPE テキスト ファイルまたはファイルの内容を表示します。\n\ -VER ReactOS のバージョンを表示します。\n\ -VERIFY ファイルがディスクに正しく書き込まれたことを照合するかどうかを\n\ - 指示します。\n\ -VOL ディスクのボリューム ラベルとシリアル番号を表示します。\n" - - STRING_CHOICE_OPTION, "YN" STRING_COPY_OPTION, "YNA" diff --git a/base/shell/cmd/lang/no-NO.rc b/base/shell/cmd/lang/no-NO.rc index 114351d700b..2b03a1adef8 100644 --- a/base/shell/cmd/lang/no-NO.rc +++ b/base/shell/cmd/lang/no-NO.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_ASSOC_HELP, "Modify file extension associations.\n\n\ @@ -267,10 +267,6 @@ GOTO merke\n\n\ merke angir en tekst streng brukt i en satsvis skript.\n\n\ Et merke opprettes på egen linje ved å skrive kolon fulgt av navn på merke." -STRING_HELP_HELP1, "Provides Help information for ReactOS commands.\n\n\ -HELP [command]\n\n\ - command - Display help information for this command.\n" - STRING_IF_HELP1, "Utføre betinget behandling i satsvise programmer.\n\n\ IF [NOT] ERRORLEVEL nummer kommando\n\ IF [NOT] streng1==streng2 kommando\n\ @@ -558,65 +554,6 @@ RESTORE gjenopprett vinduet\n\ tittel ny tittel\n" -STRING_HELP1, "Liste av alle tilgjengelige kommandoer (+ beskrivelse)\n\n\ -help kommando\n\ -kommando /? For mer informasjon om en bestemt kommando\n\n\ -? Lister alle tilgjengelige kommando uten beskrivelse).\n\ -ALIAS Sett, fjern eller vis alias.\n\ -ATTRIB Viser eller endre fil attributter.\n\ -BEEP Piper i høyttaleren.\n\ -CALL Starte et satsvis program fra et annet.\n\ -CD Vis navnet på eller endrer gjeldende mappe.\n\ -CHCP Viser eller angir nummer på aktiv tegntabell.\n\ -CHOICE Venter til bruken velger en av et sett av valg.\n\ -CLS Tømmer skjermen.\n\ -CMD Start en ny forekomst av ReactOS kommandotolk.\n\ -COLOR Angir standard forgrunn- og bakgrunnsfargr for konsollen.\n\ -COPY Kopierer en eller flere filer til en annen plassering.\n\ -DATE Viser eller angir datoen.\n\ -DELETE Sletter en eller flere filer.\n\ -DIR Viser en liste over filer og undermapper i en mappe.\n\ -ECHO Viser meldinger, eller slår kommandoecho på eller av.\n\ -ERASE Sletter en eller flere filer.\n\ -EXIT Avslutter programmet CMD.EXE program (kommandotolken).\n\ -FOR Kjør en bestemt kommando for hver fil i et sett av filer.\n\ -FREE Viser ledig diskplass.\n\ -GOTO Leder ReactOS kommandotolk til en merket linje i\n\ - et satsvis program.\n\ -HELP Viser hjelpeinformasjon for ReactOS-kommandoer.\n\ -HISTORY Lister alle kommandoer som har blitt brukt\n\ -IF Utføre betinget behandling i satsvise programmer.\n\ -LABEL Oppretter, endrer, eller sletter volumnavnet på en disk.\n\ -MD Oppretter en mappe.\n\ -MKDIR Oppretter en mappe.\n\ -MKLINK Creates a filesystem link object.\n\ -MOVE Flytter en eller flere filer fra en mappe til en annen.\n\ -PATH Vis eller sett en søkesti for kjørbare filer.\n\ -PAUSE Avbryter behandling av en satsvis fil, og viser en melding.\n\ -POPD Fjenoppretter den forige verdien av gjeldende mappe, lagret av\n\ - PUSHD.\n\ -PROMPT Endre kommandoledeteksten.\n\ -PUSHD Lagre gjeldende mappe og endrer den etterpå.\n\ -RD Fjerner en mappe.\n\ -REM Angir kommentarer i satsvise filer.\n\ -REN Gir nytt navn til en eller flere filer.\n\ -RENAME Gir nytt navn til en eller flere filer.\n\ -RMDIR Fjerner en mappe.\n\ -SCREEN Flytter markør.\n\ -SET Vis, sett, eller fjern ReactOS miljøvariabel.\n\ -SHIFT Shift plass for erstattelige parameter i satsvise filer.\n" -STRING_HELP2, "START Start et separat vindu til å kjøre et spesifisert program eller kommando.\n\ - Utfører kommando.\n\ -TIME Vis eller sett system tid.\n\ -TIMER Håndtere stoppeklokker (maks 10 stk).\n\ -TITLE Sett vindustittel for CMD.EXE sesjon.\n\ -TYPE Vis innholdet i en tekst fil.\n\ -VER Viser ReactOS versjon.\n\ -VERIFY Forteller ReactOS om å bekrefte om dine filer er skrevet\n\ - riktig til disk.\n\ -VOL Vis et volums navn og serienummer.\n" - - STRING_CHOICE_OPTION, "YN" STRING_COPY_OPTION, "YNA" diff --git a/base/shell/cmd/lang/pl-PL.rc b/base/shell/cmd/lang/pl-PL.rc index b30e04052c6..ca646b1c9c4 100644 --- a/base/shell/cmd/lang/pl-PL.rc +++ b/base/shell/cmd/lang/pl-PL.rc @@ -8,7 +8,7 @@ */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_ASSOC_HELP, "Modyfikuje skojarzenia rozszerzeń plików.\n\n\ @@ -275,10 +275,6 @@ GOTO etykieta\n\n\ etykieta Ciąg znaków, użyty w programie wsadowym do oznaczenia linii.\n\n\ Możesz oznaczyć linie dowolną etykietą, zaczynając od dwukropka." -STRING_HELP_HELP1, "Provides Help information for ReactOS commands.\n\n\ -HELP [command]\n\n\ - command - Display help information for this command.\n" - STRING_IF_HELP1, "Wykonuje przetwarzanie warunkowe w programach wsadowych.\n\n\ IF [NOT] ERRORLEVEL numer komenda\n\ IF [NOT] ciąg_znaków1==ciąg_znaków2 komenda\n\ @@ -565,65 +561,6 @@ RESTORE odtwarza standardowe ustawienia okna\n\ title nowy tytuł okna\n" -STRING_HELP1, "Lista wszystkich dostępnych komend (+opisy)\n\n\ - help komenda\n\ - komenda /? Wyświetla dokładny opis danej komendy\n\n\ -? Lista wszystkich dostępnych komend (bez opisów).\n\ -ALIAS Ustawia, pokazuje lub usuwa aliasy.\n\ -ATTRIB Wyświetla lub zmienia atrybuty plików.\n\ -BEEP Sygnał przez głośnik PC.\n\ -CALL Wywołuje program wsadowy z poziomu innego.\n\ -CD Wyświetla ścieżkę lub przechodzi do innego katalogu.\n\ -CHCP Wyświetla lub ustawia bieżącą stronę kodową.\n\ -CHOICE Przedstawia użytkownikowi kilka możliwości i czeka na wybór.\n\ -CLS Czyści ekran.\n\ -CMD Uruchamia kolejne okno konsoli ReactOS.\n\ -COLOR Ustawia kolory tła i tekstu w oknie konsoli.\n\ -COPY Kopiuje jeden lub więcej plików w inne miejsce.\n\ -DATE Wyświetla lub ustawia datę.\n\ -DELETE Kasuje jeden lub więcej plików.\n\ -DIR Wyświetla listę plików i podkatalogów w danym katalogu.\n\ -ECHO Wyświetla wiadomości albo włącza/wyłącza komendę ECHO.\n\ -ERASE Kasuje jeden lub więcej plików.\n\ -EXIT Zamyka bieżące okno konsoli.\n\ -FOR Wykonuje określoną komendę dla każdego pliku z określonej listy.\n\ -FREE Wolne miejsce na dysku.\n\ -GOTO Kieruje interpreter poleceń do określonej linii,\n\ - oznaczonej, w danym programie wsadowym.\n\ -HELP Lista komend konsoli ReactOS wraz z opisem.\n\ -HISTORY Lista użytych komend.\n\ -IF Przetwarzanie warunkowe w programach wsadowych.\n\ -LABEL Tworzy, zmienia lub kasuje etykietę woluminu w danym napędzie.\n\ -MD Tworzy katalog.\n\ -MKDIR Tworzy katalog.\n\ -MKLINK Tworzy dowiązanie obiektu w systemie plików.\n\ -MOVE Przenosi jeden lub więcej plików z jednego katalogu do drugiego.\n\ -PATH Wyświetla lub ustawia ścieżki dostępu dla programów.\n\ -PAUSE Zawiesza przetwarzanie programu wsadowego i wyświetla komunikat.\n\ -POPD Odtwarza poprzednią nazwę danego katalogu, zapisaną przez\n\ - PUSHD.\n\ -PROMPT Zmienia znak zachęty w linii poleceń.\n\ -PUSHD Zapisuje obecną nazwę katalogu, po czym zmienia ją.\n\ -RD Usuwa katalog.\n\ -REM Oznaczenie linii komentarza w programie wsadowym.\n\ -REN Zmienia nazwę pliku lub plików.\n\ -RENAME Zmienia nazwę pliku lub plików.\n\ -RMDIR Usuwa katalog.\n\ -SCREEN Przenosi kursor i opcjonalnie wyświetla tekst.\n\ -SET Wyświetla, ustawia lub usuwa zmienne środowiskowe.\n\ -SHIFT Przenosi zamienne parametry w programach wsadowych.\n" -STRING_HELP2, "START Uruchamia oddzielne okno do wykonania określonego polecenia lub komendy.\n\ - Wykonuje polecenie.\n\ -TIME Wyświetla lub zmienia czas systemowy.\n\ -TIMER Pozwala na użycie do 10 stoperów.\n\ -TITLE Ustanawia tytuł dla danej sesji CMD.EXE.\n\ -TYPE Wyświetla zawartość pliku tekstowego.\n\ -VER Wyświetla wersję systemu ReactOS.\n\ -VERIFY Decyduje czy ReactOS ma sprawdzać poprawność zapisu plików\n\ - na dysku.\n\ -VOL Wyświetla etykietę woluminu na danym napędzie i numer seryjny.\n" - - STRING_CHOICE_OPTION, "TN" STRING_COPY_OPTION, "TNZ" diff --git a/base/shell/cmd/lang/ro-RO.rc b/base/shell/cmd/lang/ro-RO.rc index 441038152c3..3ea08221e45 100644 --- a/base/shell/cmd/lang/ro-RO.rc +++ b/base/shell/cmd/lang/ro-RO.rc @@ -8,7 +8,7 @@ */ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_ASSOC_HELP, "Modifică asocierile extensiilor de fișiere.\n\n\ @@ -300,10 +300,6 @@ GOTO etichetă\n\n\ fișierele de comenzi.\n\n\ O etichetă se va defini pe un rând întreg, începând cu două puncte (:)\n" -STRING_HELP_HELP1, "Provides Help information for ReactOS commands.\n\n\ -HELP [command]\n\n\ - command - Display help information for this command.\n" - STRING_IF_HELP1, "Realizează execuția condiționată a comenzilor într-un fișier de comenzi.\n\n\ IF [NOT] ERRORLEVEL număr comandă\n\ IF [NOT] șir1==șir2 comandă\n\ @@ -599,76 +595,6 @@ RESTORE Restabilește fereastra.\n\ titlu Noul titlu.\n" -STRING_HELP1, "Enumeră toate comenzile disponibile (+ descriere)\n\n\ - help comandă\n\ - comandă /? Pentru mai multe informații referitoare la o anume comandă.\n\n\ -? Enumeră toate comenzile disponibile (fără descriere).\n\ -ALIAS Instituie, destituie sau afișează alias.\n\ -ASSOC Modifică asocierile extensiilor de fișiere.\n\ -ATTRIB Afișează sau modifică atributele fișierelor.\n\ -BEEP Semnalizează utilizând difuzorul intern.\n\ -CALL Apelează dintr-un fișier de comenzi, un alt fișier de comenzi.\n\ -CD Afișează sau schimbă directorul curent.\n\ -CHCP Afișează sau stabilește numărul codificării curente a paginii.\n\ -CHDIR Afișează sau schimbă directorul curent.\n\ -CHOICE Așteaptă alegerea unei opțiuni (din mai multe furnizate).\n\ -CLS Curăță ecranul.\n\ -CMD Lansează o nouă instanță a interpretorului de comenzi ReactOS.\n\ -COLOR Stabilește culorile implicite pentru text și fundal.\n\ -COPY Copiază unul sau mai multe fișiere dintr-un loc în altul.\n\ -DATE Afișează sau stabilește data.\n\ -DEL Șterge unul sau mai multe fișiere.\n\ -DELETE Șterge unul sau mai multe fișiere.\n\ -DELAY Impune o pauză pe o durată de timp specificată.\n\ -DIR Enumeră conținutul unui director.\n\ -DIRS Afișează conținutul stivei de directoare.\n\ -ECHO Afișează mesaje în ecou sau\n\ - activează/dezactivează această funcționalitate.\n\ -ECHOS Afișează un mesaj în ecou fără a trece în rând nou.\n\ -ECHOERR Afișeză un mesaj în ecou la ieșirea standard pentru erori\n\ -ECHOSERR Afișează un mesaj în ecou la ieșirea standard pentru erori fără a\n\ - trece în rând nou.\n\ -ERASE Șterge unul sau mai multe fișiere.\n\ -EXIT Ieșire din (interpretorul de comenzi) CMD.EXE\n\ -FOR Execută o comandă pentru fiecare fișier dintr-un grup (de fișiere).\n\ -FREE Oferă informații despre unitatea de stocare.\n\ -GOTO Execută salturi către rânduri etichetate în interiorul unui\n\ - fișier de comenzi.\n\ -HELP Oferă informații referitoare la comenzile ReactOS.\n\ -HISTORY Enumeră toate comenzile care au fost utilizate.\n\ -IF Realizează execuții condiționate în fișierele de comenzi.\n\ -LABEL Crează, modifică, sau șterge eticheta unei unități de stocare.\n\ -MEMORY Afișează informații referitoare la memoria sistemului.\n\ -MD Crează un director.\n\ -MKDIR Crează un director.\n\ -MKLINK Crează un obiect-legătură în sistemul de fișiere.\n\ -MOVE Mută unul sau mai multe fișiere dintr-un director în altul.\n" -STRING_HELP2, "PATH Afișează sau stabilește căile de căutare de fișierelor executabile.\n\ -PAUSE Suspendă execuția unui fișier de comenzi și afișează un mesaj.\n\ -POPD Restabilește valoarea precedentă a directorului curent, anterior\n\ - stocată cu PUSHD.\n\ -PROMPT Modifică aspectul liniei de comandă.\n\ -PUSHD Reține calea directorului curent și o schimbă cu alta nouă.\n\ -RD Elimină un director.\n\ -REM Desemnează un rând de comentarii într-un fișier de comenzi.\n\ -REN Redenumește un fișier/director sau un grup (de fișiere/directoare).\n\ -RENAME Redenumește un fișier/director sau un grup (de fișiere/directoare).\n\ -REPLACE Înlocuiește fișiere.\n\ -RMDIR Elimină un director.\n\ -SCREEN Mută cursorul și (opțional) afișează un text.\n\ -SET Afișează, stabilește sau elimină variabile de mediu ReactOS.\n\ -SHIFT Schimbă poziția argumentelor înlocuibile într-un fișier de comenzi.\n\ -START Deschide o fereastră separată pentru execuția unui executabil sau\n\ - (fișier de) comenzi.\n\ -TIME Afișează sau stabilește data sistemului.\n\ -TIMER Gestionează cronometre.\n\ -TITLE Stabilește titlul pentru fereastra unei sesiuni CMD.EXE\n\ -TYPE Afișează conținutul unui fișier text.\n\ -VER Afișează versiunea ReactOS.\n\ -VERIFY Verifică scrierea corectă a fișierelor pe disc.\n\ -VOL Afișează eticheta și numărul de serie a unui volum.\n" - - STRING_CHOICE_OPTION, "DN" STRING_COPY_OPTION, "DNT" diff --git a/base/shell/cmd/lang/ru-RU.rc b/base/shell/cmd/lang/ru-RU.rc index 811e85d8517..6859534e773 100644 --- a/base/shell/cmd/lang/ru-RU.rc +++ b/base/shell/cmd/lang/ru-RU.rc @@ -7,7 +7,7 @@ */ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_ASSOC_HELP, "Modify file extension associations.\n\n\ @@ -272,10 +272,6 @@ GOTO метка\n\n\ label Строка пакетного файла, оформленная как метка.\n\n\ Метка должна находиться в отдельной строке и начинаться с двоеточия." -STRING_HELP_HELP1, "Provides Help information for ReactOS commands.\n\n\ -HELP [command]\n\n\ - command - Display help information for this command.\n" - STRING_IF_HELP1, "Оператор условного выполнения команд в пакетном файле.\n\n\ IF [NOT] ERRORLEVEL число команда\n\ IF [NOT] строка1==строка2 команда\n\ @@ -570,64 +566,6 @@ RESTORE восстанавливает окно\n\ заголовок новый заголовок\n" -STRING_HELP1, "Список всех доступных команд с коротким описанием\n\n\ - help команда\n\ - команда /? Выводит подробную информацию о команде\n\n\ -? Список всех доступных команд без описания.\n\ -ALIAS Вывод, установка или удаление псевдонимов.\n\ -ATTRIB Вывод и изменение атрибутов файлов.\n\ -BEEP Звуковой сигнал.\n\ -CALL Вызов одного пакетного файла из другого.\n\ -CD Вывод имени либо смена текущего каталога.\n\ -CHCP Вывод или смена текущего номера кодовой страницы.\n\ -CHOICE Ждет, пока пользователь не выберет один из указанных в списке символов.\n\ -CLS Очистка экрана.\n\ -CMD Запуск новой копии интерпретатора команд.\n\ -COLOR Установка цветов по умолчанию для текста и фона.\n\ -COPY Копирование одного или нескольких файлов в другое место.\n\ -DATE Вывод или изменение даты.\n\ -DELETE Удаление одного или нескольких файлов.\n\ -DIR Вывод списка файлов и подкаталогов каталога.\n\ -ECHO Вывод сообщений и переключение режима отображения команд на экране.\n\ -ERASE Удаление одного или нескольких файлов.\n\ -EXIT Завершает интерпретатор команд.\n\ -FOR Запускает указанную команду для каждого файла из набора файлов.\n\ -FREE (Свободное) дисковое пространство.\n\ -GOTO Передача управления содержащей метку строке пакетного файла\n\ -HELP Предоставляет справочную информацию о командах ReactOS.\n\ -HISTORY Список запущенных команд\n\ -IF Оператор условного выполнения команд в пакетном файле.\n\ -LABEL Создание, изменение и удаление меток тома.\n\ -MD Создание каталога.\n\ -MKDIR Создание каталога.\n\ -MKLINK Creates a filesystem link object.\n\ -MOVE Перемещение файлов и переименование файлов и каталогов\n\ -PATH Вывод или задание пути поиска исполняемых файлов.\n\ -PAUSE Приостановка выполнения пакетного файла.\n\ -POPD Восттанавливает предыдущее значение текущей директории сохраненное командой\n\ - PUSHD.\n\ -PROMPT Изменение приглашения командной строки.\n\ -PUSHD Сохраняет текущую директорию, а потом меняет ее.\n\ -RD Удаление каталога.\n\ -REM Записывает комментарии (замечения) в пакетных файлах.\n\ -REN Переименование одного или нескольких файлов или каталогов.\n\ -RENAME Переименование одного или нескольких файлов или каталогов.\n\ -RMDIR Удаление каталога.\n\ -SCREEN Перемещение курсора и вывод текста.\n\ -SET Вывод, задание и удаление переменных среды.\n\ -SHIFT Изменение содержимого (сдвиг) подставляемых параметров для пакетного файла\n" -STRING_HELP2, "START Открывает отдельное окно для запуска указанных команд или программ.\n\ - Выполняет команду.\n\ -TIME Вывод или изменение времени.\n\ -TIMER Секундомер.\n\ -TITLE Изменение заголовка окна командной строки.\n\ -TYPE Вывод содержимого одного или нескольких текстовых файлов.\n\ -VER Вывод версии ОС.\n\ -VERIFY Включение или отключение режима проверки правильности записи файлов\n\ - на диск.\n\ -VOL Выводит метку тома и серийный номер.\n" - - STRING_CHOICE_OPTION, "YN" STRING_COPY_OPTION, "YNA" diff --git a/base/shell/cmd/lang/sk-SK.rc b/base/shell/cmd/lang/sk-SK.rc index 0917bb195ff..b9fc7a44d9d 100644 --- a/base/shell/cmd/lang/sk-SK.rc +++ b/base/shell/cmd/lang/sk-SK.rc @@ -7,7 +7,7 @@ */ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_ASSOC_HELP, "Modify file extension associations.\n\n\ @@ -275,10 +275,6 @@ GOTO label\n\n\ label Specifies a text string used in a batch script as a label.\n\n\ You type a label on a line by itself, beginning with a colon." -STRING_HELP_HELP1, "Provides Help information for ReactOS commands.\n\n\ -HELP [command]\n\n\ - command - Display help information for this command.\n" - STRING_IF_HELP1, "Performs conditional processing in batch programs.\n\n\ IF [NOT] ERRORLEVEL number command\n\ IF [NOT] string1==string2 command\n\ @@ -568,67 +564,6 @@ RESTORE obnoviť okno\n\ title new title\n" -STRING_HELP1, "Zoznam všetkých dostupných príkazov (+ popis)\n\n\ - help príkaz\n\ - príkaz /? Pre viac informácií o konkrétnom príkaze\n\n\ -? Zoznam všetkých dostupných príkazov (bez popisu).\n\ -ALIAS Sets, removes or shows aliases.\n\ -ATTRIB Displays or changes file attributes.\n\ -BEEP Pípnutie reproduktora.\n\ -CALL Calls one batch program from another.\n\ -CD Displays the name of or changes the current directory.\n\ -CHCP Displays or sets the active code page number.\n\ -CHOICE Waits for the user to choose one of a set of choices.\n\ -CLS Vymaže obrazovku.\n\ -CMD Starts a new instance of the ReactOS command interpreter.\n\ -COLOR Sets the default console foreground and background colors.\n\ -COPY Skopíruje jeden alebo viac súborov na iné umiestnenie.\n\ -DATE Zobrazí alebo nastaví dátum.\n\ -DELETE Deletes one or more files.\n\ -DIR Displays a list of files and subdirectories in a directory.\n\ -ECHO Displays messages, or turns command echoing on or off.\n\ -ERASE Deletes one or more files.\n\ -EXIT Quits the CMD.EXE program (command interpreter).\n\ -FOR Runs a specified command for each file in a set of files.\n\ -FREE (free) disc space.\n\ -GOTO Directs the ReactOS command interpreter to a labeled line in\n\ - a batch program.\n\ -HELP Provides Help information for ReactOS commands.\n\ -HISTORY List all commands which has been used\n\ -IF Performs conditional processing in batch programs.\n\ -LABEL Creates, changes, or deletes the volume label of a disk.\n\ -MD Vytvorí adresár.\n\ -MKDIR Vytvorí adresár.\n\ -MKLINK Creates a filesystem link object.\n\ -MOVE Moves one or more files from one directory to another\n\ - directory.\n\ -PATH Displays or sets a search path for executable files.\n\ -PAUSE Suspends processing of a batch file and displays a message.\n\ -POPD Restores the previous value of the current directory saved by\n\ - PUSHD.\n\ -PROMPT Changes the command prompt.\n\ -PUSHD Saves the current directory then changes it.\n\ -RD Removes a directory.\n\ -REM Records comments (remarks) in batch files.\n\ -REN Premenuje súbor alebo súbory.\n\ -RENAME Premenuje súbor alebo súbory.\n\ -REPLACE Replaces files.\n\ -RMDIR Removes a directory.\n\ -SCREEN Move cursor and optionally print text.\n\ -SET Displays, sets, or removes ReactOS environment variables.\n\ -SHIFT Shifts the position of replaceable parameters in batch files.\n" -STRING_HELP2, "START Starts a separate window to run a specified program or command.\n\ - Executes command.\n\ -TIME Zobrazí alebo nastaví systémový čas.\n\ -TIMER Allow the use of ten stopwatches.\n\ -TITLE Sets the window title for a CMD.EXE session.\n\ -TYPE Displays the contents of a text file.\n\ -VER Displays the ReactOS version.\n\ -VERIFY Tells ReactOS whether to verify that your files are written\n\ - correctly to a disk.\n\ -VOL Displays a disk volume label and serial number.\n" - - STRING_CHOICE_OPTION, "YN" STRING_COPY_OPTION, "YNA" diff --git a/base/shell/cmd/lang/sv-SE.rc b/base/shell/cmd/lang/sv-SE.rc index 440b3dd1e60..39f853ea8ca 100644 --- a/base/shell/cmd/lang/sv-SE.rc +++ b/base/shell/cmd/lang/sv-SE.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_ASSOC_HELP, "Ändra assossierad filextention.\n\n\ @@ -267,10 +267,6 @@ GOTO etikett\n\n\ etikett Anger en text sträng använt i ett batchprogram.\n\n\ En etikett skapas på en egen rad genom att skriva kolon följt av namn på etiketten." -STRING_HELP_HELP1, "Provides Help information for ReactOS commands.\n\n\ -HELP [command]\n\n\ - command - Display help information for this command.\n" - STRING_IF_HELP1, "Utför villkorsstyrd bearbetning i batchprogram.\n\n\ IF [NOT] ERRORLEVEL nummer kommando\n\ IF [NOT] sträng1==sträng2 kommando\n\ @@ -558,65 +554,6 @@ RESTORE gjenopprett vinduet\n\ tittel ny tittel\n" -STRING_HELP1, "Liste av alle tilgjengelige kommandoer (+ beskrivelse)\n\n\ -help kommando\n\ -kommando /? For mer informasjon om en bestemt kommando\n\n\ -? Lister alle tilgjengelige kommando uten beskrivelse).\n\ -ALIAS Sett, fjern eller vis alias.\n\ -ATTRIB Viser eller ändra fil attributter.\n\ -BEEP Piper i høyttaleren.\n\ -CALL Starte et satsvis program fra et annet.\n\ -CD Vis namnet på eller endrer aktuell mapp.\n\ -CHCP Viser eller anger nummer på aktiv tegntabell.\n\ -CHOICE Venter til bruken väljer en av et sett av val.\n\ -CLS Tømmer skjermen.\n\ -CMD Start en ny forekomst av ReactOS kommandotolk.\n\ -COLOR Anger standard forgrunn- och bakgrunnsfargr for konsollen.\n\ -COPY Kopierer en eller flere filer til en annen plassering.\n\ -DATE Viser eller anger datoen.\n\ -DELETE Sletter en eller flere filer.\n\ -DIR Viser en liste over filer och undermappar i en mapp.\n\ -ECHO Viser meldinger, eller slår kommandoecho på eller av.\n\ -ERASE Sletter en eller flere filer.\n\ -EXIT Avslutter programmet CMD.EXE program (kommandotolken).\n\ -FOR Kjør en bestemt kommando for hver fil i et sett av filer.\n\ -FREE Viser ledig diskplass.\n\ -GOTO Leder ReactOS kommandotolk til en merket linje i\n\ - et satsvis program.\n\ -HELP Viser hjelpeinformasjon for ReactOS-kommandoer.\n\ -HISTORY Lister alle kommandoer som har blitt brukt\n\ -IF Utføre betinget behandling i satsvise programmer.\n\ -LABEL Oppretter, endrer, eller sletter volumnamnet på en disk.\n\ -MD Oppretter en mapp.\n\ -MKDIR Oppretter en mapp.\n\ -MKLINK Creates a filesystem link object.\n\ -MOVE Flytter en eller flere filer fra en mapp til en annen.\n\ -PATH Vis eller sett en søkesti for kjørbare filer.\n\ -PAUSE Avbryter behandling av en satsvis fil, och viser en melding.\n\ -POPD Fjenoppretter den forige verdien av aktuell mapp, lagret av\n\ - PUSHD.\n\ -PROMPT Ändra kommandoledeteksten.\n\ -PUSHD Lagre aktuell mapp och endrer den etterpå.\n\ -RD Fjerner en mapp.\n\ -REM Anger kommentarer i satsvise filer.\n\ -REN Gir nytt namn til en eller flere filer.\n\ -RENAME Gir nytt namn til en eller flere filer.\n\ -RMDIR Fjerner en mapp.\n\ -SCREEN Flytter markør.\n\ -SET Vis, sett, eller fjern ReactOS miljøvariabel.\n\ -SHIFT Shift plass for erstattelige parameter i satsvise filer.\n" -STRING_HELP2, "START Start et separat vindu til att kjøre et spesifisert program eller kommando.\n\ - Utfører kommando.\n\ -TIME Vis eller sett system tid.\n\ -TIMER Håndtere stoppeklokker (maks 10 stk).\n\ -TITLE Sett vindustittel for CMD.EXE sesjon.\n\ -TYPE Vis innholdet i en text fil.\n\ -VER Viser ReactOS version.\n\ -VERIFY Forteller ReactOS om att bekrefte om dine filer är skrevet\n\ - riktig til disk.\n\ -VOL Vis et volums namn och serienummer.\n" - - STRING_CHOICE_OPTION, "YN" STRING_COPY_OPTION, "YNA" diff --git a/base/shell/cmd/lang/uk-UA.rc b/base/shell/cmd/lang/uk-UA.rc index 251f52f83a9..7256dda14f5 100644 --- a/base/shell/cmd/lang/uk-UA.rc +++ b/base/shell/cmd/lang/uk-UA.rc @@ -7,7 +7,7 @@ */ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_ASSOC_HELP, "Змiна асоцiацiй файлових розширень.\n\n\ @@ -278,10 +278,6 @@ GOTO мiтка\n\n\ label рядок пакетного файлу, визначений як мiтка.\n\n\ Мітка повинна знаходитися в окремому рядку i починатися з двокрапки." -STRING_HELP_HELP1, "Provides Help information for ReactOS commands.\n\n\ -HELP [command]\n\n\ - command - Display help information for this command.\n" - STRING_IF_HELP1, "Оператор умовного виконання команд у пакетному файлi.\n\n\ IF [NOT] ERRORLEVEL число команда\n\ IF [NOT] рядок1==рядок2 команда\n\ @@ -570,66 +566,6 @@ RESTORE вiдновлює вiкно\n\ title новий заголовок\n" -STRING_HELP1, "Список всiх доступних команд (+ опис)\n\n\ - help команда\n\ - команда /? Для докладної iнформацiї про конкретну команду\n\n\ -? Список всiх доступних команд без опису.\n\ -ALIAS Встановлення, видалення або показ псевдонiмiв.\n\ -ATTRIB Вiдображення або змiна атрибутiв файлу.\n\ -BEEP Звуковий сигнал динамiка.\n\ -CALL Виклик однiєї пакетної програми з iншої.\n\ -CD Вiдображення iменi або змiна поточної теки.\n\ -CHCP Вiдображення або встановлення поточного номера кодової сторiнки.\n\ -CHOICE Очiкування вибору користувачем одного з вказаних символiв.\n\ -CLS Очищення екрану.\n\ -CMD Запуск нової копiї iнтерпретатора команд ReactOS.\n\ -COLOR Встановлення типових кольорiв тексту i тла консолi.\n\ -COPY Копiювання одного або бiльше файлiв в iнше мiсце.\n\ -DATE Вiдображення або встановлення дати.\n\ -DELETE Видалення одного або бiльше файлiв.\n\ -DIR Вiдображення списку файлiв i пiдтек в тецi.\n\ -ECHO Вiдображення повiдомлень, або перемикання режиму вiдображення команд.\n\ -ERASE Видалення одного або бiльше файлiв.\n\ -EXIT Вихiд з програми CMD.EXE (iнтерпретатора команд).\n\ -FOR Запуск вказаної команди для кожного файлу з набору файлiв.\n\ -FREE (Вiльний) дисковий простiр.\n\ -GOTO Передача управлiння рядку пакетної програми, який мiстить мiтку.\n\ -HELP Довiдкова iнформацiя про команди ReactOS.\n\ -HISTORY Список усiх використаних команд.\n\ -IF Оператор обробки умов у пакетних програмах.\n\ -LABEL Створення, змiна, або видалення мiток тому диска.\n\ -MD Створення теки.\n\ -MKDIR Створення теки.\n\ -MKLINK Створення об'єкту-посилання файлової системи.\n\ -MOVE Перемiщення одного або бiльше файлiв з однiєї теки до iншої\n\ - теки.\n\ -PATH Вiдображення або встановлення шляху пошуку виконуваних файлiв.\n\ -PAUSE Тимчасове припинення обробки командного файлу i показ повiдомлення.\n\ -POPD Вiдновлює попереднє значення поточної теки, збережене командою\n\ - PUSHD.\n\ -PROMPT Змiна запрошення командного рядка.\n\ -PUSHD Зберiгає поточну теку, а потiм змiнює її.\n\ -RD Видалення теки.\n\ -REM Записує коментарi (зауваження) в командних файлах.\n\ -REN Перейменування файла або файлiв.\n\ -RENAME Перейменування файла або файлiв.\n\ -REPLACE Замiна файлiв.\n\ -RMDIR Перемiщення теки.\n\ -SCREEN Перемiщення курсора i виведення тексту.\n\ -SET Вiдображення, встановлення, або видалення змiнних оточення ReactOS.\n\ -SHIFT Зрушення позицiї замiнних параметрiв у командних файлах.\n" -STRING_HELP2, "START Вiдкриває окреме вiкно для запуску вказаних команд або програм.\n\ - Виконує команду.\n\ -TIME Вiдображення або встановлення системного часу.\n\ -TIMER Дозволяє використання десяти секундомiрiв.\n\ -TITLE Встановлення заголовка вiкна для сесiї CMD.EXE.\n\ -TYPE Вiдображення вмiсту текстового файлу.\n\ -VER Вiдображення версiї ReactOS.\n\ -VERIFY Включення або вiдключення режиму перевiрки правильностi запису\n\ - файлiв на диск.\n\ -VOL Вiдображення мiтки тому диска i серiйного номера.\n" - - STRING_CHOICE_OPTION, "YN" STRING_COPY_OPTION, "YNA" diff --git a/base/shell/cmd/lang/zh-CN.rc b/base/shell/cmd/lang/zh-CN.rc index 5cf55cef849..2481900f308 100644 --- a/base/shell/cmd/lang/zh-CN.rc +++ b/base/shell/cmd/lang/zh-CN.rc @@ -4,7 +4,7 @@ */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_ASSOC_HELP, "修改文件关联。\n\n\ @@ -259,10 +259,6 @@ GOTO 标签\n\n\ 标签 在批处理脚本中被用作标签的文本字符串。\n\n\ 使用冒号开头的一行就作为一个标签。" -STRING_HELP_HELP1, "Provides Help information for ReactOS commands.\n\n\ -HELP [command]\n\n\ - command - Display help information for this command.\n" - STRING_IF_HELP1, "在批处理文件中执行条件控制处理。\n\n\ IF [NOT] ERRORLEVEL 数字 命令\n\ IF [NOT] 字符串1==字符串2 命令\n\ @@ -532,63 +528,6 @@ RESTORE 恢复窗口\n\ 标题 指定新的标题\n" -STRING_HELP1, "列出所有可用命令 (+ 它们的描述)\n\n\ - help 命令\n\ - 命令 /? 得到特定命令的更多信息\n\n\ -? 列出所有可用命令 (没有描述)。\n\ -ALIAS 设置、删除或显示别名。\n\ -ATTRIB 显示或改变文件属性。\n\ -BEEP 使扬声器发声。\n\ -CALL 从一个批处理程序中调用另一个。\n\ -CD 显示当前目录的名称或更改当前目录。\n\ -CHCP 显示或设置活动代码页。\n\ -CHOICE 等待用户在一组选项中做出选择。\n\ -CLS 清除屏幕。\n\ -CMD 启动 ReactOS 命令行解释器的一个新实例。\n\ -COLOR 设置控制台默认的前景和背景颜色。\n\ -COPY 将一个或多个文件复制到另一个位置。\n\ -DATE 显示或设置日期。\n\ -DELETE 删除一个或多个文件。\n\ -DIR 显示一个目录中的文件列表和子目录。\n\ -ECHO 显示消息,或打开/关闭命令回显。\n\ -ERASE 删除一个或多个文件。\n\ -EXIT 退出 CMD.EXE 程序 (命令解释器)。\n\ -FOR 为一组文件中的每一个文件执行指定命令。\n\ -FREE (空闲的) 磁盘空间。\n\ -GOTO 在批处理程序中指示 ReactOS 命令解释器跳转到被标记的行继续执行。\n\ -HELP 为 ReactOS 命令提供帮助信息。\n\ -HISTORY 列出所有曾被使用的命令。\n\ -IF 在批处理程序中执行条件控制。\n\ -LABEL 创建、更改或删除磁盘卷标。\n\ -MD 创建一个目录。\n\ -MKDIR 创建一个目录。\n\ -MKLINK 创建一个文件系统链接对象。\n\ -MOVE 将一个或多个文件从一个文件夹移动到另一个文件夹。\n\ -PATH 显示或设置可执行文件的搜索路径。\n\ -PAUSE 挂起批处理文件的执行并显示一条消息。\n\ -POPD 恢复由 PUSHD 存储的前一个当前目录的值。\n\ -PROMPT 更改命令提示符。\n\ -PUSHD 保存当前目录然后更改。\n\ -RD 删除一个目录。\n\ -REM 在批处理文件中记录注释 (评论)。\n\ -REN 重命名一个或多个文件。\n\ -RENAME 重命名一个或多个文件。\n\ -REPLACE 替换文件。\n\ -RMDIR 删除一个目录。\n\ -SCREEN 移动光标并可选地输出文本。\n\ -SET 显示、设置或删除 ReactOS 环境变量。\n\ -SHIFT 在批处理文件中移动可替换参数的位置。\n" -STRING_HELP2, "START 启动一个分隔的窗口来运行指定的程序或命令。\n\ - 执行命令。\n\ -TIME 显示或设置系统时间。\n\ -TIMER 允许使用至多十个停表。\n\ -TITLE 设置一个 CMD.EXE 会话的窗口标题。\n\ -TYPE 显示一个文本文件的内容。\n\ -VER 显示 ReactOS 版本。\n\ -VERIFY 决定 ReactOS 是否检验您的文件已被正确地写入磁盘。\n\ -VOL 显示磁盘卷标和序列号。\n" - - STRING_CHOICE_OPTION, "YN" STRING_COPY_OPTION, "YNA" diff --git a/base/shell/cmd/prompt.c b/base/shell/cmd/prompt.c index da6ea9ddaa0..2898a03ce2d 100644 --- a/base/shell/cmd/prompt.c +++ b/base/shell/cmd/prompt.c @@ -52,7 +52,7 @@ static TCHAR InfoLine[] = _T(" ReactOS Command Prompt Type HELP = Help "); /* The default prompt */ -static TCHAR DefaultPrompt[] = _T("$I$P$G"); +static TCHAR DefaultPrompt[] = _T("$P$G"); /* @@ -256,18 +256,13 @@ INT cmd_prompt(LPTSTR param) } /* - * If 'param' is NULL, then we need to set it to default, - * because that means the user entered "prompt" only. - * So even if 'param' is null you _must_ still set prompt - * to the default. There seems to be some kind of difference - * between winxp and 2k in this matter and this way will - * cover both. Do not use fixed size of 'szParam' for 'param'; - * the buffers are 8192 bytes and will later change to dynamic buffer. + * Set the PROMPT environment variable. If 'param' is NULL or is + * an empty string (the user entered "prompt" only), then remove + * the environment variable and therefore use the default prompt. + * Otherwise, use the new prompt. */ - - /* Set the PROMPT environment variable */ if (!SetEnvironmentVariable(_T("PROMPT"), - (param[0] != _T('\0') ? param : DefaultPrompt))) + (param && param[0] != _T('\0') ? param : NULL))) { return 1; } diff --git a/base/shell/cmd/resource.h b/base/shell/cmd/resource.h index c44ccddb59f..46ee65e4a3e 100644 --- a/base/shell/cmd/resource.h +++ b/base/shell/cmd/resource.h @@ -137,8 +137,6 @@ #define STRING_GOTO_HELP1 659 -#define STRING_HELP_HELP1 660 - #define STRING_LABEL_HELP1 661 #define STRING_LABEL_HELP2 662 #define STRING_LABEL_HELP3 663 @@ -221,8 +219,6 @@ #define STRING_SCREEN_COL 715 #define STRING_SCREEN_ROW 716 #define STRING_TIMER_TIME 717 -#define STRING_HELP1 718 -#define STRING_HELP2 719 #define STRING_INVALID_OPERAND 720 #define STRING_EXPECTED_CLOSE_PAREN 721 diff --git a/base/shell/explorer-new/explorer.rc b/base/shell/explorer-new/explorer.rc index 7f76aef539f..275adcf9fa0 100644 --- a/base/shell/explorer-new/explorer.rc +++ b/base/shell/explorer-new/explorer.rc @@ -10,18 +10,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -IDI_START ICON DISCARDABLE res/start.ico -IDB_STARTMENU BITMAP DISCARDABLE res/logov.bmp +IDI_START ICON res/start.ico +IDB_STARTMENU BITMAP res/logov.bmp -IDB_TASKBARPROP_AUTOHIDE BITMAP DISCARDABLE res/auto_hide.bmp -IDB_TASKBARPROP_LOCK_GROUP_NOQL BITMAP DISCARDABLE res/lock_group_noql.bmp -IDB_TASKBARPROP_LOCK_GROUP_QL BITMAP DISCARDABLE res/lock_group_ql.bmp -IDB_TASKBARPROP_LOCK_NOGROUP_NOQL BITMAP DISCARDABLE res/lock_nogroup_noql.bmp -IDB_TASKBARPROP_LOCK_NOGROUP_QL BITMAP DISCARDABLE res/lock_nogroup_ql.bmp -IDB_TASKBARPROP_NOLOCK_GROUP_NOQL BITMAP DISCARDABLE res/nolock_group_noql.bmp -IDB_TASKBARPROP_NOLOCK_NOGROUP_NOQL BITMAP DISCARDABLE res/nolock_nogroup_noql.bmp -IDB_TASKBARPROP_NOLOCK_NOGROUP_QL BITMAP DISCARDABLE res/nolock_nogroup_ql.bmp -IDB_TASKBARPROP_NOLOCK_GROUP_QL BITMAP DISCARDABLE res/nolock_group_ql.bmp +IDB_TASKBARPROP_AUTOHIDE BITMAP res/auto_hide.bmp +IDB_TASKBARPROP_LOCK_GROUP_NOQL BITMAP res/lock_group_noql.bmp +IDB_TASKBARPROP_LOCK_GROUP_QL BITMAP res/lock_group_ql.bmp +IDB_TASKBARPROP_LOCK_NOGROUP_NOQL BITMAP res/lock_nogroup_noql.bmp +IDB_TASKBARPROP_LOCK_NOGROUP_QL BITMAP res/lock_nogroup_ql.bmp +IDB_TASKBARPROP_NOLOCK_GROUP_NOQL BITMAP res/nolock_group_noql.bmp +IDB_TASKBARPROP_NOLOCK_NOGROUP_NOQL BITMAP res/nolock_nogroup_noql.bmp +IDB_TASKBARPROP_NOLOCK_NOGROUP_QL BITMAP res/nolock_nogroup_ql.bmp +IDB_TASKBARPROP_NOLOCK_GROUP_QL BITMAP res/nolock_group_ql.bmp CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "explorer.exe.manifest" // UTF-8 @@ -80,6 +80,9 @@ CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "explorer.exe.manifest" #ifdef LANGUAGE_SK_SK #include "lang/sk-SK.rc" #endif +#ifdef LANGUAGE_TR_TR + #include "lang/tr-TR.rc" +#endif #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" #endif diff --git a/base/shell/explorer-new/lang/bg-BG.rc b/base/shell/explorer-new/lang/bg-BG.rc index 2f1894036cb..e1bb48774a6 100644 --- a/base/shell/explorer-new/lang/bg-BG.rc +++ b/base/shell/explorer-new/lang/bg-BG.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -IDM_TRAYWND MENU DISCARDABLE +IDM_TRAYWND MENU BEGIN POPUP "" BEGIN @@ -21,7 +21,7 @@ BEGIN END END -IDM_STARTMENU MENUEX DISCARDABLE +IDM_STARTMENU MENUEX BEGIN POPUP "" BEGIN @@ -134,7 +134,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_START "Пуск" IDS_PROPERTIES "&Свойства" @@ -143,7 +143,7 @@ BEGIN IDS_STARTUP_ERROR "Уредбата не може да пусне изследователя, понеже понеже регистърът е увреден или недостъпен." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "Свойства на задачната лента и на пусковия изборник" END diff --git a/base/shell/explorer-new/lang/cs-CZ.rc b/base/shell/explorer-new/lang/cs-CZ.rc index bd80de3caac..92c88521335 100644 --- a/base/shell/explorer-new/lang/cs-CZ.rc +++ b/base/shell/explorer-new/lang/cs-CZ.rc @@ -6,7 +6,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -IDM_TRAYWND MENU DISCARDABLE +IDM_TRAYWND MENU BEGIN POPUP "" BEGIN @@ -27,7 +27,7 @@ BEGIN END END -IDM_STARTMENU MENUEX DISCARDABLE +IDM_STARTMENU MENUEX BEGIN POPUP "" BEGIN @@ -138,7 +138,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_START "Start" IDS_PROPERTIES "Vl&astnosti" @@ -147,7 +147,7 @@ BEGIN IDS_STARTUP_ERROR "Systém nemohl spustit proces Explorer, protože registry jsou poškozené nebo nedostupné." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "Vlastnosti hlavního panelu a Start menu" END diff --git a/base/shell/explorer-new/lang/de-DE.rc b/base/shell/explorer-new/lang/de-DE.rc index 909e91e9de2..3efb9c1a576 100644 --- a/base/shell/explorer-new/lang/de-DE.rc +++ b/base/shell/explorer-new/lang/de-DE.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -IDM_TRAYWND MENU DISCARDABLE +IDM_TRAYWND MENU BEGIN POPUP "" BEGIN @@ -21,7 +21,7 @@ BEGIN END END -IDM_STARTMENU MENUEX DISCARDABLE +IDM_STARTMENU MENUEX BEGIN POPUP "" BEGIN @@ -132,7 +132,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_START "Start" IDS_PROPERTIES "E&igenschaften" @@ -141,7 +141,7 @@ BEGIN IDS_STARTUP_ERROR "Das System kann den Explorer nicht starten, weil die Registrierung nicht verfügbar bzw. fehlerhaft ist." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "Taskleisten- und Startmenüeinstellungen" END diff --git a/base/shell/explorer-new/lang/en-US.rc b/base/shell/explorer-new/lang/en-US.rc index 0326e713eec..3bfae6a250f 100644 --- a/base/shell/explorer-new/lang/en-US.rc +++ b/base/shell/explorer-new/lang/en-US.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -IDM_TRAYWND MENU DISCARDABLE +IDM_TRAYWND MENU BEGIN POPUP "" BEGIN @@ -21,7 +21,7 @@ BEGIN END END -IDM_STARTMENU MENUEX DISCARDABLE +IDM_STARTMENU MENUEX BEGIN POPUP "" BEGIN @@ -132,7 +132,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_START "Start" IDS_PROPERTIES "P&roperties" @@ -141,7 +141,7 @@ BEGIN IDS_STARTUP_ERROR "The system cannot start explorer because the registry is corrupted or unavailable." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "Taskbar and Start Menu" END diff --git a/base/shell/explorer-new/lang/es-ES.rc b/base/shell/explorer-new/lang/es-ES.rc index 974b537f339..12ca8266fc8 100644 --- a/base/shell/explorer-new/lang/es-ES.rc +++ b/base/shell/explorer-new/lang/es-ES.rc @@ -9,7 +9,7 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -IDM_TRAYWND MENU DISCARDABLE +IDM_TRAYWND MENU BEGIN POPUP "" BEGIN @@ -30,7 +30,7 @@ BEGIN END END -IDM_STARTMENU MENUEX DISCARDABLE +IDM_STARTMENU MENUEX BEGIN POPUP "" BEGIN @@ -141,7 +141,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_START "Inicio" IDS_PROPERTIES "P&ropiedades" @@ -150,7 +150,7 @@ BEGIN IDS_STARTUP_ERROR "The system cannot start explorer because the registry is corrupted or unavailable." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "Propiedades de la Barra de tareas y del Menú Inicio" END diff --git a/base/shell/explorer-new/lang/fr-FR.rc b/base/shell/explorer-new/lang/fr-FR.rc index ee57e4109d2..4d1b9f30602 100644 --- a/base/shell/explorer-new/lang/fr-FR.rc +++ b/base/shell/explorer-new/lang/fr-FR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -IDM_TRAYWND MENU DISCARDABLE +IDM_TRAYWND MENU BEGIN POPUP "" BEGIN @@ -21,7 +21,7 @@ BEGIN END END -IDM_STARTMENU MENUEX DISCARDABLE +IDM_STARTMENU MENUEX BEGIN POPUP "" BEGIN @@ -132,7 +132,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_START "Démarrer" IDS_PROPERTIES "P&ropriétés" @@ -141,7 +141,7 @@ BEGIN IDS_STARTUP_ERROR "The system cannot start explorer because the registry is corrupted or unavailable." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "Taskbar and Start Menu" END diff --git a/base/shell/explorer-new/lang/he-IL.rc b/base/shell/explorer-new/lang/he-IL.rc index db12f920a5a..d0a5796d74d 100644 --- a/base/shell/explorer-new/lang/he-IL.rc +++ b/base/shell/explorer-new/lang/he-IL.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT -IDM_TRAYWND MENU DISCARDABLE +IDM_TRAYWND MENU BEGIN POPUP "" BEGIN @@ -21,7 +21,7 @@ BEGIN END END -IDM_STARTMENU MENUEX DISCARDABLE +IDM_STARTMENU MENUEX BEGIN POPUP "" BEGIN @@ -132,7 +132,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_START "התחל" IDS_PROPERTIES "מאפיינים" @@ -141,7 +141,7 @@ BEGIN IDS_STARTUP_ERROR "The system cannot start explorer because the registry is corrupted or unavailable." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "שורת המשימות ושולחן העבודה" END diff --git a/base/shell/explorer-new/lang/it-IT.rc b/base/shell/explorer-new/lang/it-IT.rc index 98c193ee48d..bdea050b46b 100644 --- a/base/shell/explorer-new/lang/it-IT.rc +++ b/base/shell/explorer-new/lang/it-IT.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -IDM_TRAYWND MENU DISCARDABLE +IDM_TRAYWND MENU BEGIN POPUP "" BEGIN @@ -21,7 +21,7 @@ BEGIN END END -IDM_STARTMENU MENUEX DISCARDABLE +IDM_STARTMENU MENUEX BEGIN POPUP "" BEGIN @@ -132,7 +132,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_START "Avvio" IDS_PROPERTIES "&Proprietà" @@ -141,7 +141,7 @@ BEGIN IDS_STARTUP_ERROR "Impossibile avviare explorer perché il registro è danneggiato o non disponibile." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "Proprietà della Barra delle applicazioni e del Menú di avvio" END diff --git a/base/shell/explorer-new/lang/ja-JP.rc b/base/shell/explorer-new/lang/ja-JP.rc index 87c62a1352d..00cb187079e 100644 --- a/base/shell/explorer-new/lang/ja-JP.rc +++ b/base/shell/explorer-new/lang/ja-JP.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -IDM_TRAYWND MENU DISCARDABLE +IDM_TRAYWND MENU BEGIN POPUP "" BEGIN @@ -21,7 +21,7 @@ BEGIN END END -IDM_STARTMENU MENUEX DISCARDABLE +IDM_STARTMENU MENUEX BEGIN POPUP "" BEGIN @@ -132,7 +132,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_START "スタート" IDS_PROPERTIES "プロパティ(&R)" @@ -141,7 +141,7 @@ BEGIN IDS_STARTUP_ERROR "The system cannot start explorer because the registry is corrupted or unavailable." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "タスクバーとスタートメニューのプロパティ" END diff --git a/base/shell/explorer-new/lang/ko-KR.rc b/base/shell/explorer-new/lang/ko-KR.rc index 07b9d2584fc..13a5d826271 100644 --- a/base/shell/explorer-new/lang/ko-KR.rc +++ b/base/shell/explorer-new/lang/ko-KR.rc @@ -5,7 +5,7 @@ LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT -IDM_TRAYWND MENU DISCARDABLE +IDM_TRAYWND MENU BEGIN POPUP "" BEGIN @@ -26,7 +26,7 @@ BEGIN END END -IDM_STARTMENU MENUEX DISCARDABLE +IDM_STARTMENU MENUEX BEGIN POPUP "" BEGIN @@ -137,7 +137,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_START "시작" IDS_PROPERTIES "속성(&R)" @@ -146,7 +146,7 @@ BEGIN IDS_STARTUP_ERROR "The system cannot start explorer because the registry is corrupted or unavailable." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "Taskbar and Start Menu" END diff --git a/base/shell/explorer-new/lang/lt-LT.rc b/base/shell/explorer-new/lang/lt-LT.rc index 3972b876e0f..f23a41f2b9b 100644 --- a/base/shell/explorer-new/lang/lt-LT.rc +++ b/base/shell/explorer-new/lang/lt-LT.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT -IDM_TRAYWND MENU DISCARDABLE +IDM_TRAYWND MENU BEGIN POPUP "" BEGIN @@ -25,7 +25,7 @@ BEGIN END END -IDM_STARTMENU MENUEX DISCARDABLE +IDM_STARTMENU MENUEX BEGIN POPUP "" BEGIN @@ -135,7 +135,7 @@ BEGIN AUTOCHECKBOX "&Show window previews (thumbnails)", IDC_TASKBARPROP_WNDPREV, 13,31,200,10 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_START "ReactOS" IDS_PROPERTIES "&Parametrai" @@ -144,7 +144,7 @@ BEGIN IDS_STARTUP_ERROR "The system cannot start explorer because the registry is corrupted or unavailable." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "Taskbar and Start Menu" END diff --git a/base/shell/explorer-new/lang/nl-NL.rc b/base/shell/explorer-new/lang/nl-NL.rc index fce494b493f..c677fd78a04 100644 --- a/base/shell/explorer-new/lang/nl-NL.rc +++ b/base/shell/explorer-new/lang/nl-NL.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL -IDM_TRAYWND MENU DISCARDABLE +IDM_TRAYWND MENU BEGIN POPUP "" BEGIN @@ -21,7 +21,7 @@ BEGIN END END -IDM_STARTMENU MENUEX DISCARDABLE +IDM_STARTMENU MENUEX BEGIN POPUP "" BEGIN @@ -131,7 +131,7 @@ BEGIN AUTOCHECKBOX "Venstervoorbeelden (miniatuurweergaven) &weergeven", IDC_TASKBARPROP_WNDPREV, 13,31,200,10 END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_START "&Start" IDS_PROPERTIES "&Eigenschappen" @@ -140,7 +140,7 @@ BEGIN IDS_STARTUP_ERROR "The system cannot start explorer because the registry is corrupted or unavailable." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "Taakbalk en menu Start eigenschappen" END diff --git a/base/shell/explorer-new/lang/no-NO.rc b/base/shell/explorer-new/lang/no-NO.rc index 1cbe5d201c6..76e841cbdb4 100644 --- a/base/shell/explorer-new/lang/no-NO.rc +++ b/base/shell/explorer-new/lang/no-NO.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -IDM_TRAYWND MENU DISCARDABLE +IDM_TRAYWND MENU BEGIN POPUP "" BEGIN @@ -21,7 +21,7 @@ BEGIN END END -IDM_STARTMENU MENUEX DISCARDABLE +IDM_STARTMENU MENUEX BEGIN POPUP "" BEGIN @@ -132,7 +132,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_START "Start" IDS_PROPERTIES "E&genskaper" @@ -141,7 +141,7 @@ BEGIN IDS_STARTUP_ERROR "The system cannot start explorer because the registry is corrupted or unavailable." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "Egenskaper for oppgavelinjen og startmeny" END diff --git a/base/shell/explorer-new/lang/pl-PL.rc b/base/shell/explorer-new/lang/pl-PL.rc index 0f95a009df6..e51543608bc 100644 --- a/base/shell/explorer-new/lang/pl-PL.rc +++ b/base/shell/explorer-new/lang/pl-PL.rc @@ -9,7 +9,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -IDM_TRAYWND MENU DISCARDABLE +IDM_TRAYWND MENU BEGIN POPUP "" BEGIN @@ -30,7 +30,7 @@ BEGIN END END -IDM_STARTMENU MENUEX DISCARDABLE +IDM_STARTMENU MENUEX BEGIN POPUP "" BEGIN @@ -141,7 +141,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_START "Start" IDS_PROPERTIES "Właś&ciwości" @@ -150,7 +150,7 @@ BEGIN IDS_STARTUP_ERROR "System nie może uruchomić eksploratora, ponieważ rejestr jest niedostępny lub uszkodzony." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "Właściwości paska zadań i Menu Start" END diff --git a/base/shell/explorer-new/lang/pt-BR.rc b/base/shell/explorer-new/lang/pt-BR.rc index c896497dda0..24fed4bfcc0 100644 --- a/base/shell/explorer-new/lang/pt-BR.rc +++ b/base/shell/explorer-new/lang/pt-BR.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL -IDM_TRAYWND MENU DISCARDABLE +IDM_TRAYWND MENU BEGIN POPUP "" BEGIN @@ -23,7 +23,7 @@ BEGIN END END -IDM_STARTMENU MENUEX DISCARDABLE +IDM_STARTMENU MENUEX BEGIN POPUP "" BEGIN @@ -134,7 +134,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_START "Iniciar" IDS_PROPERTIES "P&ropriedades" @@ -143,7 +143,7 @@ BEGIN IDS_STARTUP_ERROR "O sistema não pode iniciar o explorer porque o registro está corrompido ou inacessível." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "Propriedades do Barra de Tarefas e Menu Iniciar" END diff --git a/base/shell/explorer-new/lang/ro-RO.rc b/base/shell/explorer-new/lang/ro-RO.rc index 78b1b43dc7f..312ab7a0a53 100644 --- a/base/shell/explorer-new/lang/ro-RO.rc +++ b/base/shell/explorer-new/lang/ro-RO.rc @@ -1,7 +1,7 @@ //2012.03.05 - Fulea Ștefan: translate the taskbar context menu additions LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -IDM_TRAYWND MENU DISCARDABLE +IDM_TRAYWND MENU BEGIN POPUP "" BEGIN @@ -22,7 +22,7 @@ BEGIN END END -IDM_STARTMENU MENUEX DISCARDABLE +IDM_STARTMENU MENUEX BEGIN POPUP "" BEGIN @@ -133,7 +133,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_START "Pornire" IDS_PROPERTIES "P&referințe" @@ -142,7 +142,7 @@ BEGIN IDS_STARTUP_ERROR "Pornirea exploratorului a eșuat din cauza informațiilor lipsă sau corupte din registru." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "Preferințe bară de activități și meniu Pornire" END diff --git a/base/shell/explorer-new/lang/ru-RU.rc b/base/shell/explorer-new/lang/ru-RU.rc index 66be5486fc0..e06c16ac233 100644 --- a/base/shell/explorer-new/lang/ru-RU.rc +++ b/base/shell/explorer-new/lang/ru-RU.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -IDM_TRAYWND MENU DISCARDABLE +IDM_TRAYWND MENU BEGIN POPUP "" BEGIN @@ -23,7 +23,7 @@ BEGIN END END -IDM_STARTMENU MENUEX DISCARDABLE +IDM_STARTMENU MENUEX BEGIN POPUP "" BEGIN @@ -134,7 +134,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_START "Пуск" IDS_PROPERTIES "&Свойства" @@ -143,7 +143,7 @@ BEGIN IDS_STARTUP_ERROR "The system cannot start explorer because the registry is corrupted or unavailable." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "Свойства меню Пуск и Панели задач" END diff --git a/base/shell/explorer-new/lang/sk-SK.rc b/base/shell/explorer-new/lang/sk-SK.rc index b7aaa00c4b6..008a3f7f28b 100644 --- a/base/shell/explorer-new/lang/sk-SK.rc +++ b/base/shell/explorer-new/lang/sk-SK.rc @@ -5,7 +5,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -IDM_TRAYWND MENU DISCARDABLE +IDM_TRAYWND MENU BEGIN POPUP "" BEGIN @@ -26,7 +26,7 @@ BEGIN END END -IDM_STARTMENU MENUEX DISCARDABLE +IDM_STARTMENU MENUEX BEGIN POPUP "" BEGIN @@ -137,7 +137,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_START "Štart" IDS_PROPERTIES "Vl&astnosti" @@ -146,7 +146,7 @@ BEGIN IDS_STARTUP_ERROR "Systém nemože spustiť prieskumníka, pretože registre sú poškodené alebo nedostupné." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "Vlastnosti panela úloh a ponuky Štart" END diff --git a/base/shell/explorer-new/lang/tr-TR.rc b/base/shell/explorer-new/lang/tr-TR.rc new file mode 100644 index 00000000000..29227030eed --- /dev/null +++ b/base/shell/explorer-new/lang/tr-TR.rc @@ -0,0 +1,151 @@ +/* + * TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) (erdemersoy@live.com) + */ + +LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT + +IDM_TRAYWND MENU +BEGIN + POPUP "" + BEGIN + MENUITEM SEPARATOR + MENUITEM "&Zamânı Ayarla", ID_SHELL_CMD_ADJUST_DAT + MENUITEM "&Bildirimleri Husûsileştir...", ID_SHELL_CMD_CUST_NOTIF + MENUITEM SEPARATOR + MENUITEM "&Pencereleri Basamakla", ID_SHELL_CMD_CASCADE_WND + MENUITEM "P&encereleri Üst Üste Sırala", ID_SHELL_CMD_TILE_WND_H + MENUITEM "Pe&ncereleri Yan Yana Sırala", ID_SHELL_CMD_TILE_WND_V + MENUITEM "&Masaüstünü Göster", ID_SHELL_CMD_SHOW_DESKTOP + MENUITEM "&Geri Al", ID_SHELL_CMD_UNDO_ACTION + MENUITEM SEPARATOR + MENUITEM "G&örev Yöneticisi", ID_SHELL_CMD_OPEN_TASKMGR + MENUITEM SEPARATOR + MENUITEM "Gö&rev Çubuğunu Kilitle", ID_LOCKTASKBAR + MENUITEM "&Husûsiyetler", ID_SHELL_CMD_PROPERTIES + END +END + +IDM_STARTMENU MENUEX +BEGIN + POPUP "" + BEGIN + MENUITEM "", -1, MFT_SEPARATOR + POPUP "&Yazılımlar", IDM_PROGRAMS + BEGIN + MENUITEM "(Boş)", -1, MFT_STRING, MFS_GRAYED + END + POPUP "Y&er İmleri", IDM_FAVORITES + BEGIN + MENUITEM "(Boş)", -1, MFT_STRING, MFS_GRAYED + END + POPUP "&Belgeler", IDM_DOCUMENTS + BEGIN + MENUITEM "(Boş)", -1, MFT_STRING, MFS_GRAYED + END + POPUP "&Ayarlar", IDM_SETTINGS + BEGIN + MENUITEM "&Denetim Masası", IDM_CONTROLPANEL, MFT_STRING, MFS_GRAYED + MENUITEM "", -1, MFT_SEPARATOR + MENUITEM "&Güvenlik...", IDM_SECURITY, MFT_STRING, MFS_ENABLED + MENUITEM "&Ağ Bağlantıları", IDM_NETWORKCONNECTIONS, MFT_STRING, MFS_ENABLED + MENUITEM "&Yazıcılar ve Belgegeçerler", IDM_PRINTERSANDFAXES, MFT_STRING, MFS_ENABLED + MENUITEM "G&örev Çubuğu ve Başlat Seçkesi", IDM_TASKBARANDSTARTMENU, MFT_STRING, MFS_ENABLED + END + POPUP "A&ra", IDM_SEARCH + BEGIN + MENUITEM "", -1, MFT_SEPARATOR + END + MENUITEM "Yar&dım ve Destek", IDM_HELPANDSUPPORT, MFT_STRING, MFS_ENABLED + MENUITEM "&Çalıştır...", IDM_RUN, MFT_STRING, MFS_ENABLED + MENUITEM "", 450, MFT_SEPARATOR, MFS_ENABLED + MENUITEM "E&şle", IDM_SYNCHRONIZE, MFT_STRING, MFS_ENABLED + MENUITEM "&Oturumu Kapat %s...", IDM_LOGOFF, MFT_STRING, MFS_ENABLED + MENUITEM "Ba&ğlantıyı Kes...", IDM_DISCONNECT, MFT_STRING, MFS_ENABLED + MENUITEM "B&ilgisayarı Ayır", IDM_UNDOCKCOMPUTER, MFT_STRING, MFS_ENABLED + MENUITEM "Bi&lgisayarı Kapat...", IDM_SHUTDOWN, MFT_STRING, MFS_ENABLED + END +END + + +IDD_TASKBARPROP_TASKBAR DIALOGEX 0, 0, 252, 218 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Görev Çubuğu" +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + GROUPBOX "Görev Çubuğunun Görünümü", IDC_STATIC, 6,6,240,104 + CONTROL "", IDC_TASKBARPROP_TASKBARBITMAP, "Static", SS_BITMAP | SS_SUNKEN, 13,18,224,21 + AUTOCHECKBOX "&Görev Çubuğunu Kilitle", IDC_TASKBARPROP_LOCK, 13,45,200,10 + AUTOCHECKBOX "G&örev Çubuğunu Kendiliğinden Gizle", IDC_TASKBARPROP_HIDE, 13,58,200,10 + AUTOCHECKBOX "Gö&rev Çubuğunu Pencerelerin Üstünde Tut", IDC_TASKBARPROP_ONTOP, 13,71,200,10 + AUTOCHECKBOX "&Benzer Görev Çubuğu Düğmelerini Kümeleştir", IDC_TASKBARPROP_GROUP, 13,84,200,10 + AUTOCHECKBOX "&Hızlı Başlat'ı Göster", IDC_TASKBARPROP_SHOWQL, 13,97,200,10 +END + +IDD_TASKBARPROP_STARTMENU DIALOGEX 0, 0, 252, 218 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Başlat Seçkesi" +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + AUTORADIOBUTTON "&Gelişmiş Başlat Seçkesi", IDC_TASKBARPROP_STARTMENU, 7,7,105,10 + LTEXT "Gelişmiş Başlat Seçkesi; dizinlere, sık kullanılan yazılımlara ve aramaya kolayca ulaşmanıza olanak sağlar.", IDC_STATIC, 20,17,150,24, WS_DISABLED + PUSHBUTTON "&Husûsileştir...", IDC_TASKBARPROP_STARTMENUCUST, 192,4,53,14, WS_DISABLED + AUTORADIOBUTTON "&Eski Başlat Seçkesi", IDC_TASKBARPROP_STARTMENUCLASSIC, 7,47,105,10, WS_DISABLED + LTEXT "Eski Başlat Seçkesi, eski görünüm ve eski işlevliği sağlar.",-1,20,57,150,24, WS_DISABLED + PUSHBUTTON "H&usûsileştir...", IDC_TASKBARPROP_STARTMENUCLASSICCUST, 192,44,53,14, WS_DISABLED + GROUPBOX "Gizlilik",IDC_STATIC, 7,100,238,42 + AUTOCHECKBOX "&Son Kullanılan Kütüklerin Dizelgesini Sakla ve Görüntüle", IDC_TASKBARPROP_RECENTFILES, 14,114,224,10, WS_DISABLED + AUTOCHECKBOX "S&on Kullanılan Yazılımların Dizelgesini Sakla ve Görüntüle",IDC_TASKBARPROP_RECENTFOLDERS, 14,128,224,10, WS_DISABLED +END + +IDD_TASKBARPROP_NOTIFICATION DIALOGEX 0, 0, 252, 218 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Bildirim Alanı" +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + CONTROL "", IDC_TASKBARPROP_NOTIFICATIONBITMAP, "Static", SS_BITMAP | SS_SUNKEN,7,6,238,21, WS_DISABLED + GROUPBOX "Simgeler", IDC_STATIC, 6,33,240,58, WS_DISABLED + LTEXT "Yakın zamanda kullanmadığınız simgeleri gizleyerek bildirim alanının şişmesini önleyebilirsiniz.", IDC_STATIC, 13,48,223,16, WS_DISABLED + AUTOCHECKBOX "E&dilgin Simgeleri Gizle", IDC_TASKBARPROP_HIDEICONS, 13,70,125,10, WS_DISABLED + PUSHBUTTON "&Husûsileştir...", IDC_TASKBARPROP_ICONCUST, 188,70,50,14, WS_DISABLED + GROUPBOX "Dizge Simgeleri", IDC_STATIC, 6,97,240,84, WS_DISABLED + LTEXT "Her zaman görüntülenecek dizge simgelerini seçiniz:", IDC_STATIC, 13,112,223,16, WS_DISABLED + AUTOCHECKBOX "&Saat", IDC_TASKBARPROP_CLOCK, 13,126,200,10, WS_DISABLED + AUTOCHECKBOX "S&es Ayârı", IDC_TASKBARPROP_VOLUME, 13,139,200,10, WS_DISABLED + AUTOCHECKBOX "&Ağ", IDC_TASKBARPROP_NETWORK, 13,152,200,10, WS_DISABLED + AUTOCHECKBOX "&Güç", IDC_TASKBARPROP_POWER, 13,164,200,10, WS_DISABLED + +END + +IDD_TASKBARPROP_TOOLBARS DIALOGEX 0, 0, 252, 218 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Araç Çubukları" +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + LTEXT "Görev çubuğuna hangi araç çubuklarının ekleneceğini seçebilirsiniz:", IDC_STATIC, 7,7,223,12, WS_DISABLED + CONTROL "", IDC_TASKBARPROP_DESKBANDLIST, "SysTreeView32",WS_BORDER | WS_TABSTOP | WS_DISABLED, 7,20,236,160, WS_EX_CLIENTEDGE +END + +IDD_TASKBARPROP_ADVANCED DIALOGEX 0, 0, 252, 218 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Gelişmiş" +FONT 8, "MS Shell Dlg", 0, 0, 0x1 +BEGIN + GROUPBOX "Gelişmiş Seçenekler", IDC_STATIC, 6,6,240,121 + AUTOCHECKBOX "&Sâniyeleri Göster", IDC_TASKBARPROP_SECONDS, 13,18,200,10 + AUTOCHECKBOX "&Pencere Önizlemelerini Göster", IDC_TASKBARPROP_WNDPREV, 13,31,200,10 +END + + +STRINGTABLE +BEGIN + IDS_START "Başlat" + IDS_PROPERTIES "&Husûsiyetler" + IDS_OPEN_ALL_USERS "&Tüm Kullanıcılar'da Aç" + IDS_EXPLORE_ALL_USERS "T&üm Kullanıcılar'da Araştır" + IDS_STARTUP_ERROR "Dizge, gerekli değerlerin, bozuk olduğundan ya da olmadığından Gezgin'i başlatamadı." +END + +STRINGTABLE +BEGIN + IDS_TASKBAR_STARTMENU_PROP_CAPTION "Görev Çubuğu ve Başlat Seçkesi" +END diff --git a/base/shell/explorer-new/lang/uk-UA.rc b/base/shell/explorer-new/lang/uk-UA.rc index 6f7e0eaeeea..56217441ef2 100644 --- a/base/shell/explorer-new/lang/uk-UA.rc +++ b/base/shell/explorer-new/lang/uk-UA.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -IDM_TRAYWND MENU DISCARDABLE +IDM_TRAYWND MENU BEGIN POPUP "" BEGIN @@ -29,7 +29,7 @@ BEGIN END END -IDM_STARTMENU MENUEX DISCARDABLE +IDM_STARTMENU MENUEX BEGIN POPUP "" BEGIN @@ -140,7 +140,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_START "Пуск" IDS_PROPERTIES "В&ластивості" @@ -149,7 +149,7 @@ BEGIN IDS_STARTUP_ERROR "Система не може стартувати explorer, оскільки реєстр пошкоджений або відсутній." END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "Властивості меню Пуск та Панелі завдань" END diff --git a/base/shell/explorer-new/lang/zh-CN.rc b/base/shell/explorer-new/lang/zh-CN.rc index bacc6b2d02e..cca70ba862a 100644 --- a/base/shell/explorer-new/lang/zh-CN.rc +++ b/base/shell/explorer-new/lang/zh-CN.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -IDM_TRAYWND MENU DISCARDABLE +IDM_TRAYWND MENU BEGIN POPUP "" BEGIN @@ -29,7 +29,7 @@ BEGIN END END -IDM_STARTMENU MENUEX DISCARDABLE +IDM_STARTMENU MENUEX BEGIN POPUP "" BEGIN @@ -140,7 +140,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_START "开始" IDS_PROPERTIES "属性(&R)" @@ -149,7 +149,7 @@ BEGIN IDS_STARTUP_ERROR "因为注册表损坏或不可用,系统无法启动文件浏览器。" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TASKBAR_STARTMENU_PROP_CAPTION "任务栏和开始菜单属性" END diff --git a/base/shell/explorer/CMakeLists.txt b/base/shell/explorer/CMakeLists.txt index 3b5b54c4e0f..5a7f9767908 100644 --- a/base/shell/explorer/CMakeLists.txt +++ b/base/shell/explorer/CMakeLists.txt @@ -26,7 +26,6 @@ list(APPEND SOURCE shell/winfs.cpp dialogs/searchprogram.cpp dialogs/settings.cpp - i386-stub-win32.c taskbar/taskbar.cpp taskbar/favorites.cpp taskbar/quicklaunch.cpp @@ -47,6 +46,11 @@ list(APPEND SOURCE utility/window.cpp utility/shellbrowserimpl.cpp) # utility/shelltests.cpp +if(ARCH MATCHES i386) + list(APPEND SOURCE + i386-stub-win32.c) +endif() + add_executable(explorer ${SOURCE}) target_link_libraries(explorer comsupp wine uuid) set_module_type(explorer win32gui UNICODE) diff --git a/base/shell/explorer/explorer-bg.rc b/base/shell/explorer/explorer-bg.rc index c28f76b2a68..166a9a30930 100644 --- a/base/shell/explorer/explorer-bg.rc +++ b/base/shell/explorer/explorer-bg.rc @@ -26,7 +26,7 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT // Menu // -IDM_MDIFRAME MENU DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "&" BEGIN @@ -67,7 +67,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -78,7 +78,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -87,7 +87,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -100,7 +100,7 @@ BEGIN END END -IDM_SDIFRAME MENU DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "&" BEGIN @@ -136,7 +136,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "" FONT 8, "MS Shell Dlg" @@ -167,7 +167,7 @@ BEGIN PUSHBUTTON "&",IDC_CHECK_ENTRIES,143,2,50,20 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION " " FONT 7, "MS Shell Dlg" @@ -202,7 +202,7 @@ BEGIN BS_AUTOCHECKBOX | WS_TABSTOP,7,177,120,10 END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION " " FONT 8, "MS Shell Dlg" @@ -215,7 +215,7 @@ BEGIN PUSHBUTTON "&...",ID_CONFIG_NOTIFYAREA,150,173,62,14 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION " " FONT 8, "MS Shell Dlg" @@ -277,7 +277,7 @@ BEGIN PUSHBUTTON "&" ,IDCANCEL,106,136,50,14 END -IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 +IDD_ABOUT_EXPLORER DIALOGEX 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -299,18 +299,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -324,7 +324,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE " " IDS_START "" @@ -344,7 +344,7 @@ BEGIN IDS_ADMIN "" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU " " IDS_MINIMIZE_ALL " " @@ -362,7 +362,7 @@ BEGIN IDS_TERMINATE " " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "" IDS_CONNECTIONS " " diff --git a/base/shell/explorer/explorer-cz.rc b/base/shell/explorer/explorer-cz.rc index f2ae2c28a5c..76bbaf3f471 100644 --- a/base/shell/explorer/explorer-cz.rc +++ b/base/shell/explorer/explorer-cz.rc @@ -26,7 +26,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT // Menu // -IDM_MDIFRAME MENU PRELOAD DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "&Soubor" BEGIN @@ -67,7 +67,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -78,7 +78,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -87,7 +87,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -100,7 +100,7 @@ BEGIN END END -IDM_SDIFRAME MENU PRELOAD DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "&Soubor" BEGIN @@ -136,7 +136,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Spustit" FONT 8, "MS Shell Dlg" @@ -167,7 +167,7 @@ BEGIN PUSHBUTTON "&Vyhledat",IDC_CHECK_ENTRIES,143,7,50,14 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Vlastnosti plochy" FONT 8, "MS Shell Dlg" @@ -202,7 +202,7 @@ BEGIN // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,91,10 END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Vlastnosti panelu loh" FONT 8, "MS Shell Dlg" @@ -215,7 +215,7 @@ BEGIN PUSHBUTTON "&Upozornn...",ID_CONFIG_NOTIFYAREA,153,173,50,14 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Vlastnosti nabdky Start" FONT 8, "MS Shell Dlg" @@ -277,7 +277,7 @@ BEGIN PUSHBUTTON "&Storno",IDCANCEL,106,136,50,14 END -IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 +IDD_ABOUT_EXPLORER DIALOGEX 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "O ReactOS Przkumnku" FONT 8, "MS Shell Dlg" @@ -299,18 +299,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -324,7 +324,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE "ReactOS Przkumnk" IDS_START "Start" @@ -344,7 +344,7 @@ BEGIN IDS_ADMIN "Systmov nstroje" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU "Nabdka Start" IDS_MINIMIZE_ALL "minimalizovat vechna okna" @@ -362,7 +362,7 @@ BEGIN IDS_TERMINATE "Ukonit ReactOS Przkumnka" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "S" IDS_CONNECTIONS "Sov spojen" diff --git a/base/shell/explorer/explorer-de.rc b/base/shell/explorer/explorer-de.rc index 0f437224a87..71dd89a6bb0 100644 --- a/base/shell/explorer/explorer-de.rc +++ b/base/shell/explorer/explorer-de.rc @@ -29,7 +29,7 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL // Menu // -IDM_MDIFRAME MENU DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "&Datei" BEGIN @@ -70,7 +70,7 @@ BEGIN END END -IDM_SDIFRAME MENU DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "&Datei" BEGIN @@ -100,7 +100,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -111,7 +111,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -124,7 +124,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -139,7 +139,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Ausfhren" FONT 8, "MS Shell Dlg" @@ -155,7 +155,7 @@ BEGIN PUSHBUTTON "&Hilfe",254,158,43,47,14 END -IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 +IDD_ABOUT_EXPLORER DIALOGEX 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "ber ReactOS Explorer" FONT 8, "MS Shell Dlg" @@ -170,7 +170,7 @@ BEGIN 154,90,38,12 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 204 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Desktop-Einstellungen" FONT 8, "MS Shell Dlg" @@ -205,14 +205,14 @@ BEGIN // BS_AUTOCHECKBOX | WS_TABSTOP,7,187,107,10 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 204 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Startmen-Einstellungen" FONT 8, "MS Shell Dlg" BEGIN END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 204 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Taskbar-Einstellungen" FONT 8, "MS Shell Dlg" @@ -302,12 +302,12 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#include ""resource.h""\r\n" "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" @@ -316,7 +316,7 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -330,7 +330,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE "ReactOS Explorer" IDS_START "Start" @@ -350,7 +350,7 @@ BEGIN IDS_ADMIN "Verwaltung" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU "Startmen" IDS_MINIMIZE_ALL "alle Fenster minimieren" @@ -368,7 +368,7 @@ BEGIN IDS_TERMINATE "ROS Explorer beenden" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "Netzwerk" IDS_CONNECTIONS "Netzwerk-Verbindungen" diff --git a/base/shell/explorer/explorer-el.rc b/base/shell/explorer/explorer-el.rc index 6fb12e88db0..b22dc73c51b 100644 --- a/base/shell/explorer/explorer-el.rc +++ b/base/shell/explorer/explorer-el.rc @@ -26,7 +26,7 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT // Menu // -IDM_MDIFRAME MENU DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "&" BEGIN @@ -67,7 +67,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -78,7 +78,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -87,7 +87,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -100,7 +100,7 @@ BEGIN END END -IDM_SDIFRAME MENU DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "&" BEGIN @@ -136,7 +136,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "" FONT 8, "MS Shell Dlg" @@ -167,7 +167,7 @@ BEGIN PUSHBUTTON "&",IDC_CHECK_ENTRIES,143,7,50,14 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION " " FONT 8, "MS Shell Dlg" @@ -202,7 +202,7 @@ BEGIN // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,91,10 END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION " " FONT 8, "MS Shell Dlg" @@ -214,7 +214,7 @@ BEGIN PUSHBUTTON "&...",ID_CONFIG_NOTIFYAREA,147,173,56,14 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION " """"" FONT 8, "MS Shell Dlg" @@ -276,7 +276,7 @@ BEGIN PUSHBUTTON "&",IDCANCEL,106,136,50,14 END -IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 +IDD_ABOUT_EXPLORER DIALOGEX 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION " ReactOS" FONT 8, "MS Shell Dlg" @@ -298,18 +298,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -323,7 +323,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE " ReactOS" IDS_START "" @@ -343,7 +343,7 @@ BEGIN IDS_ADMIN "" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU " " IDS_MINIMIZE_ALL " " @@ -361,7 +361,7 @@ BEGIN IDS_TERMINATE " ROS" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "" IDS_CONNECTIONS " " diff --git a/base/shell/explorer/explorer-en.rc b/base/shell/explorer/explorer-en.rc index ede8f1efeab..c1cdabceb86 100644 --- a/base/shell/explorer/explorer-en.rc +++ b/base/shell/explorer/explorer-en.rc @@ -26,7 +26,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // Menu // -IDM_MDIFRAME MENU DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "&File" BEGIN @@ -67,7 +67,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -78,7 +78,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -87,7 +87,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -100,7 +100,7 @@ BEGIN END END -IDM_SDIFRAME MENU DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "&File" BEGIN @@ -136,7 +136,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Execute" FONT 8, "MS Shell Dlg" @@ -167,7 +167,7 @@ BEGIN PUSHBUTTON "&Check Entries",IDC_CHECK_ENTRIES,143,7,50,14 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Desktop Properties" FONT 8, "MS Shell Dlg" @@ -202,7 +202,7 @@ BEGIN // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,91,10 END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Taskbar Properties" FONT 8, "MS Shell Dlg" @@ -215,7 +215,7 @@ BEGIN PUSHBUTTON "&Notifications...",ID_CONFIG_NOTIFYAREA,153,173,50,14 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Start Menu Properties" FONT 8, "MS Shell Dlg" @@ -277,7 +277,7 @@ BEGIN PUSHBUTTON "&Cancel",IDCANCEL,106,136,50,14 END -IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 +IDD_ABOUT_EXPLORER DIALOGEX 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "About ReactOS Explorer" FONT 8, "MS Shell Dlg" @@ -299,18 +299,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -324,7 +324,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE "ReactOS Explorer" IDS_START "Start" @@ -344,7 +344,7 @@ BEGIN IDS_ADMIN "Administration" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU "Start Menu" IDS_MINIMIZE_ALL "Minimize all windows" @@ -362,7 +362,7 @@ BEGIN IDS_TERMINATE "Terminate ROS Explorer" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "Network" IDS_CONNECTIONS "Network Connections" diff --git a/base/shell/explorer/explorer-es.rc b/base/shell/explorer/explorer-es.rc index f63d80a687f..db3b681f7da 100644 --- a/base/shell/explorer/explorer-es.rc +++ b/base/shell/explorer/explorer-es.rc @@ -26,7 +26,7 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL // Menu // -IDM_MDIFRAME MENU DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "&Archivo" BEGIN @@ -67,7 +67,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -78,7 +78,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -87,7 +87,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -100,7 +100,7 @@ BEGIN END END -IDM_SDIFRAME MENU DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "&Archivo" BEGIN @@ -136,7 +136,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Ejecutar" FONT 8, "MS Shell Dlg" @@ -167,7 +167,7 @@ BEGIN PUSHBUTTON "&Marcar Entradas",IDC_CHECK_ENTRIES,136,7,57,14 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Propiedades de Pantalla" FONT 8, "MS Shell Dlg" @@ -202,7 +202,7 @@ BEGIN // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,91,10 END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Propiedades de la Barra de Tareas" FONT 8, "MS Shell Dlg" @@ -215,7 +215,7 @@ BEGIN PUSHBUTTON "&Notificaciones...",ID_CONFIG_NOTIFYAREA,148,173,58,14 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Propiedades del Men Inicio" FONT 8, "MS Shell Dlg" @@ -277,7 +277,7 @@ BEGIN PUSHBUTTON "&Cancelar",IDCANCEL,106,136,50,14 END -IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 +IDD_ABOUT_EXPLORER DIALOGEX 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Acerca de Explorador de ReactOS" FONT 8, "MS Shell Dlg" @@ -298,18 +298,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -323,7 +323,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE "ReactOS Explorer" IDS_START "Inicio" @@ -343,7 +343,7 @@ BEGIN IDS_ADMIN "Administracin" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU "Men Inicio" IDS_MINIMIZE_ALL "Mimimizar todas las ventanas" @@ -361,7 +361,7 @@ BEGIN IDS_TERMINATE "Finalizar ROS Explorer" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "Red" IDS_CONNECTIONS "Conexiones de Red" diff --git a/base/shell/explorer/explorer-fr.rc b/base/shell/explorer/explorer-fr.rc index 889a4c762aa..b11441fa836 100644 --- a/base/shell/explorer/explorer-fr.rc +++ b/base/shell/explorer/explorer-fr.rc @@ -26,7 +26,7 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL // Menu // -IDM_MDIFRAME MENU DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "&Fichier" BEGIN @@ -67,7 +67,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -78,7 +78,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -87,7 +87,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -100,7 +100,7 @@ BEGIN END END -IDM_SDIFRAME MENU DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "&Fichier" BEGIN @@ -136,7 +136,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Excuter" FONT 8, "MS Shell Dlg" @@ -167,7 +167,7 @@ BEGIN PUSHBUTTON "&Rechercher",IDC_CHECK_ENTRIES,143,7,50,14 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Proprits du bureau" FONT 8, "MS Shell Dlg" @@ -202,7 +202,7 @@ BEGIN // "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,177,120,10 END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Proprits de la barre de tches" FONT 8, "MS Shell Dlg" @@ -215,7 +215,7 @@ BEGIN PUSHBUTTON "&Notifications...",ID_CONFIG_NOTIFYAREA,153,173,50,14 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Proprits du menu dmarrer" FONT 8, "MS Shell Dlg" @@ -276,7 +276,7 @@ BEGIN PUSHBUTTON "&Annuler",IDCANCEL,106,136,50,14 END -IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 +IDD_ABOUT_EXPLORER DIALOGEX 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION " propos de ReactOS Explorer" FONT 8, "MS Shell Dlg" @@ -298,18 +298,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -323,7 +323,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE "ReactOS Explorer" IDS_START "Dmarrer" @@ -343,7 +343,7 @@ BEGIN IDS_ADMIN "Administration" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU "Menu dmarrer" IDS_MINIMIZE_ALL "Mimimiser toutes les fentres" @@ -361,7 +361,7 @@ BEGIN IDS_TERMINATE "Fermer ROS Explorer" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "Rseaux" IDS_CONNECTIONS "Connections rseau" diff --git a/base/shell/explorer/explorer-he.rc b/base/shell/explorer/explorer-he.rc index 52dd8848dd3..1600b092ac6 100644 --- a/base/shell/explorer/explorer-he.rc +++ b/base/shell/explorer/explorer-he.rc @@ -25,7 +25,7 @@ LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT // Menu // -IDM_MDIFRAME MENU DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "&קובץ" BEGIN @@ -66,7 +66,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -77,7 +77,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -86,7 +86,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -99,7 +99,7 @@ BEGIN END END -IDM_SDIFRAME MENU DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "קובץ" BEGIN @@ -135,7 +135,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "הרצה" FONT 8, "MS Shell Dlg" @@ -166,7 +166,7 @@ BEGIN PUSHBUTTON "בדוק כניסות",IDC_CHECK_ENTRIES,143,7,50,14 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "מאפייני שולחן העבודה" FONT 8, "MS Shell Dlg" @@ -201,7 +201,7 @@ BEGIN // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,91,10 END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "מאפייני שורת המשימות" FONT 8, "MS Shell Dlg" @@ -214,7 +214,7 @@ BEGIN PUSHBUTTON "התראות...",ID_CONFIG_NOTIFYAREA,153,173,50,14 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "מאפייני תפריט התחל" FONT 8, "MS Shell Dlg" @@ -276,7 +276,7 @@ BEGIN PUSHBUTTON "ביטול",IDCANCEL,106,136,50,14 END -IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 +IDD_ABOUT_EXPLORER DIALOGEX 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "אודות סייר ReactOS" FONT 8, "MS Shell Dlg" @@ -298,18 +298,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -323,7 +323,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE "ReactOS סייר" IDS_START "התחל" @@ -343,7 +343,7 @@ BEGIN IDS_ADMIN "ניהול" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU "תפריט התחל" IDS_MINIMIZE_ALL "מזער את כל החלונות" @@ -361,7 +361,7 @@ BEGIN IDS_TERMINATE "סגור את הסייר" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "רשת" IDS_CONNECTIONS "חיבורי רשת" diff --git a/base/shell/explorer/explorer-hu.rc b/base/shell/explorer/explorer-hu.rc index ef1b8d34c01..d14f74965cc 100644 --- a/base/shell/explorer/explorer-hu.rc +++ b/base/shell/explorer/explorer-hu.rc @@ -26,7 +26,7 @@ LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT // Menu // -IDM_MDIFRAME MENU DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "&File" BEGIN @@ -67,7 +67,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -78,7 +78,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -87,7 +87,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -100,7 +100,7 @@ BEGIN END END -IDM_SDIFRAME MENU DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "&File" BEGIN @@ -136,7 +136,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Futtats" FONT 8, "MS Shell Dlg" @@ -167,7 +167,7 @@ BEGIN PUSHBUTTON "&Check Entries",IDC_CHECK_ENTRIES,143,7,50,14 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Asztal belltsai" FONT 8, "MS Shell Dlg" @@ -202,7 +202,7 @@ BEGIN // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,91,10 END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Taskbar Properties" FONT 8, "MS Shell Dlg" @@ -215,7 +215,7 @@ BEGIN PUSHBUTTON "&Notifications...",ID_CONFIG_NOTIFYAREA,153,173,50,14 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Startmenu Properties" FONT 8, "MS Shell Dlg" @@ -277,7 +277,7 @@ BEGIN PUSHBUTTON "&Mgse",IDCANCEL,106,136,50,14 END -IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 +IDD_ABOUT_EXPLORER DIALOGEX 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "About ReactOS Explorer" FONT 8, "MS Shell Dlg" @@ -299,18 +299,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -324,7 +324,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE "ReactOS Explorer" IDS_START "Start" @@ -344,7 +344,7 @@ BEGIN IDS_ADMIN "Felgyelet" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU "Startmenu" IDS_MINIMIZE_ALL "mimimize all windows" @@ -362,7 +362,7 @@ BEGIN IDS_TERMINATE "Kilps a ROS Explorerbl" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "Hlzat" IDS_CONNECTIONS "Hlzati kapcsolatok" diff --git a/base/shell/explorer/explorer-id.rc b/base/shell/explorer/explorer-id.rc index d3c80c22f8e..a34bf0468f7 100644 --- a/base/shell/explorer/explorer-id.rc +++ b/base/shell/explorer/explorer-id.rc @@ -26,7 +26,7 @@ LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT // Menu // -IDM_MDIFRAME MENU DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "&File" BEGIN @@ -67,7 +67,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -78,7 +78,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -87,7 +87,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -100,7 +100,7 @@ BEGIN END END -IDM_SDIFRAME MENU DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "&File" BEGIN @@ -136,7 +136,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Jalankan" FONT 8, "MS Shell Dlg" @@ -167,7 +167,7 @@ BEGIN PUSHBUTTON "&Periksa Entri",IDC_CHECK_ENTRIES,143,7,50,14 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Properti Desktop" FONT 8, "MS Shell Dlg" @@ -202,7 +202,7 @@ BEGIN // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,91,10 END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Properti Taskbar" FONT 8, "MS Shell Dlg" @@ -215,7 +215,7 @@ BEGIN PUSHBUTTON "&Pemberitahuan...",ID_CONFIG_NOTIFYAREA,153,173,50,14 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Properti Startmenu" FONT 8, "MS Shell Dlg" @@ -277,7 +277,7 @@ BEGIN PUSHBUTTON "&Batal",IDCANCEL,106,136,50,14 END -IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 +IDD_ABOUT_EXPLORER DIALOGEX 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Tentang ReactOS Explorer" FONT 8, "MS Shell Dlg" @@ -299,18 +299,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -324,7 +324,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE "ReactOS Explorer" IDS_START "Mulai" @@ -344,7 +344,7 @@ BEGIN IDS_ADMIN "Administrasi" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU "Startmenu" IDS_MINIMIZE_ALL "kecilkan semua jendela" @@ -362,7 +362,7 @@ BEGIN IDS_TERMINATE "Akhiri ROS Explorer" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "Jaringan" IDS_CONNECTIONS "Koneksi Jaringan" diff --git a/base/shell/explorer/explorer-ja.rc b/base/shell/explorer/explorer-ja.rc index a87722fa19f..c324d2e36a0 100644 --- a/base/shell/explorer/explorer-ja.rc +++ b/base/shell/explorer/explorer-ja.rc @@ -26,7 +26,7 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT // Menu // -IDM_MDIFRAME MENU DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "t@C(&F)" BEGIN @@ -67,7 +67,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -78,7 +78,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -87,7 +87,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -100,7 +100,7 @@ BEGIN END END -IDM_SDIFRAME MENU DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "t@C(&F)" BEGIN @@ -136,7 +136,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "s" FONT 9, "MS UI Gothic" @@ -167,7 +167,7 @@ BEGIN PUSHBUTTON "o^`FbN(&C)",IDC_CHECK_ENTRIES,143,7,50,14 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "fXNgbṽvpeB" FONT 9, "MS UI Gothic" @@ -202,7 +202,7 @@ BEGIN // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,91,10 END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "^XN o[̃vpeB" FONT 9, "MS UI Gothic" @@ -215,7 +215,7 @@ BEGIN PUSHBUTTON "ʒmACR(&N)...",ID_CONFIG_NOTIFYAREA,153,173,50,14 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "X^[gj[̃vpeB" FONT 9, "MS UI Gothic" @@ -277,7 +277,7 @@ BEGIN PUSHBUTTON "LZ(&C)",IDCANCEL,106,136,50,14 END -IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 +IDD_ABOUT_EXPLORER DIALOGEX 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Explorer ɂ‚" FONT 9, "MS UI Gothic" @@ -299,18 +299,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -324,7 +324,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE "ReactOS Explorer" IDS_START "X^[g" @@ -344,7 +344,7 @@ BEGIN IDS_ADMIN "Ǘc[" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU "X^[gj[" IDS_MINIMIZE_ALL "SEBhEŏ" @@ -362,7 +362,7 @@ BEGIN IDS_TERMINATE "ROS Explorer I" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "lbg[N" IDS_CONNECTIONS "lbg[Nڑ" diff --git a/base/shell/explorer/explorer-ko.rc b/base/shell/explorer/explorer-ko.rc index 421f252548b..454fc585c5a 100644 --- a/base/shell/explorer/explorer-ko.rc +++ b/base/shell/explorer/explorer-ko.rc @@ -24,7 +24,7 @@ LANGUAGE LANG_KOREAN, SUBLANG_NEUTRAL // Menu // -IDM_MDIFRAME MENU DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "(&F)" BEGIN @@ -65,7 +65,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -76,7 +76,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -85,7 +85,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -98,7 +98,7 @@ BEGIN END END -IDM_SDIFRAME MENU DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "(&F)" BEGIN @@ -134,7 +134,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Execute" FONT 8, "MS Shell Dlg" @@ -165,7 +165,7 @@ BEGIN PUSHBUTTON " üũ(&C)",IDC_CHECK_ENTRIES,143,7,50,14 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "ȭ " FONT 8, "MS Shell Dlg" @@ -200,7 +200,7 @@ BEGIN // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,91,10 END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "۾ ǥ " FONT 8, "MS Shell Dlg" @@ -213,7 +213,7 @@ BEGIN PUSHBUTTON "˸(&N)...",ID_CONFIG_NOTIFYAREA,153,173,50,14 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION " ޴ " FONT 8, "MS Shell Dlg" @@ -275,7 +275,7 @@ BEGIN PUSHBUTTON "&Cancel",IDCANCEL,106,136,50,14 END -IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 +IDD_ABOUT_EXPLORER DIALOGEX 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Ž " FONT 8, "MS Shell Dlg" @@ -297,18 +297,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -322,7 +322,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE "ReactOS Ž" IDS_START "" @@ -342,7 +342,7 @@ BEGIN IDS_ADMIN "" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU " ޴" IDS_MINIMIZE_ALL " â ּȭ" @@ -360,7 +360,7 @@ BEGIN IDS_TERMINATE "ROS Ž " END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "Ʈũ" IDS_CONNECTIONS "Ʈũ " diff --git a/base/shell/explorer/explorer-nl.rc b/base/shell/explorer/explorer-nl.rc index a718b959c2a..94988244ead 100644 --- a/base/shell/explorer/explorer-nl.rc +++ b/base/shell/explorer/explorer-nl.rc @@ -26,7 +26,7 @@ LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL // Vertaald door Lionel Lowie // Menu // -IDM_MDIFRAME MENU DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "&Bestand" BEGIN @@ -67,7 +67,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -78,7 +78,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -87,7 +87,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -100,7 +100,7 @@ BEGIN END END -IDM_SDIFRAME MENU DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "&Bestand" BEGIN @@ -136,7 +136,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Uitvoeren" FONT 8, "MS Shell Dlg" @@ -167,7 +167,7 @@ BEGIN PUSHBUTTON "&Check Entries",IDC_CHECK_ENTRIES,143,7,50,14 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Bureaublad Eigenschappen" FONT 8, "MS Shell Dlg" @@ -202,7 +202,7 @@ BEGIN // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,91,10 END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Taakbalk Eigenschappen" FONT 8, "MS Shell Dlg" @@ -215,7 +215,7 @@ BEGIN PUSHBUTTON "&Meldingen...",ID_CONFIG_NOTIFYAREA,153,173,50,14 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Startmenu Eigenschappen" FONT 8, "MS Shell Dlg" @@ -277,7 +277,7 @@ BEGIN PUSHBUTTON "&Annuleren",IDCANCEL,106,136,50,14 END -IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 +IDD_ABOUT_EXPLORER DIALOGEX 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Over ReactOS Explorer" FONT 8, "MS Shell Dlg" @@ -299,18 +299,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -324,7 +324,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE "Reactos Explorer" IDS_START "Start" @@ -344,7 +344,7 @@ BEGIN IDS_ADMIN "Administratie" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU "Startmenu" IDS_MINIMIZE_ALL "Alle vensters minimaliseren" @@ -362,7 +362,7 @@ BEGIN IDS_TERMINATE "ROS Explorer Afsluiten" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "Netwerk" IDS_CONNECTIONS "Netwerkverbindingen" diff --git a/base/shell/explorer/explorer-no.rc b/base/shell/explorer/explorer-no.rc index 5386af164fb..f4338fa79c0 100644 --- a/base/shell/explorer/explorer-no.rc +++ b/base/shell/explorer/explorer-no.rc @@ -26,7 +26,7 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL // Menu // -IDM_MDIFRAME MENU DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "&Fil" BEGIN @@ -67,7 +67,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -78,7 +78,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -87,7 +87,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -100,7 +100,7 @@ BEGIN END END -IDM_SDIFRAME MENU DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "&Fil" BEGIN @@ -136,7 +136,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Kjr" FONT 8, "MS Shell Dlg" @@ -167,7 +167,7 @@ BEGIN PUSHBUTTON "&Sk",IDC_CHECK_ENTRIES,143,7,50,14 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Skrivebordsinnstillinger" FONT 8, "MS Shell Dlg" @@ -202,7 +202,7 @@ BEGIN // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,91,10 END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Egenskaper for Oppgavelinje" FONT 8, "MS Shell Dlg" @@ -215,7 +215,7 @@ BEGIN PUSHBUTTON "&Notifikasjoner...",ID_CONFIG_NOTIFYAREA,153,173,58,14 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Egenskaper for Startmeny" FONT 8, "MS Shell Dlg" @@ -277,7 +277,7 @@ BEGIN PUSHBUTTON "&Avbryt",IDCANCEL,106,136,50,14 END -IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 +IDD_ABOUT_EXPLORER DIALOGEX 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Om ReactOS Explorer" FONT 8, "MS Shell Dlg" @@ -299,18 +299,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -324,7 +324,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE "ReactOS Utforsker" IDS_START "Start" @@ -344,7 +344,7 @@ BEGIN IDS_ADMIN "Administrasjon" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU "Start meny" IDS_MINIMIZE_ALL "Minimalisere alle vinduer" @@ -362,7 +362,7 @@ BEGIN IDS_TERMINATE "Avslutte ROS Explorer" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "Nettverk" IDS_CONNECTIONS "Nettverk tilkoblinger" diff --git a/base/shell/explorer/explorer-pl.rc b/base/shell/explorer/explorer-pl.rc index 2001458d76d..6a6fa02756f 100644 --- a/base/shell/explorer/explorer-pl.rc +++ b/base/shell/explorer/explorer-pl.rc @@ -26,7 +26,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT // Menu // -IDM_MDIFRAME MENU DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "&Plik" BEGIN @@ -67,7 +67,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -78,7 +78,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -87,7 +87,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -100,7 +100,7 @@ BEGIN END END -IDM_SDIFRAME MENU DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "&Plik" BEGIN @@ -136,7 +136,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Uruchom" FONT 8, "MS Shell Dlg" @@ -167,7 +167,7 @@ BEGIN PUSHBUTTON "&Szukaj nazwy",IDC_CHECK_ENTRIES,143,7,50,14 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Właściwości pulpitu" FONT 8, "MS Shell Dlg" @@ -202,7 +202,7 @@ BEGIN // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,91,10 END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Właściwości paska zadań" FONT 8, "MS Shell Dlg" @@ -215,7 +215,7 @@ BEGIN PUSHBUTTON "&Dostosuj",ID_CONFIG_NOTIFYAREA,153,173,50,14 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Właściwości Menu Start" FONT 8, "MS Shell Dlg" @@ -277,7 +277,7 @@ BEGIN PUSHBUTTON "&Anuluj",IDCANCEL,106,136,50,14 END -IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 +IDD_ABOUT_EXPLORER DIALOGEX 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Explorer - &informacje" FONT 8, "MS Shell Dlg" @@ -299,18 +299,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -324,7 +324,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE "ReactOS Explorer" IDS_START "Start" @@ -344,7 +344,7 @@ BEGIN IDS_ADMIN "Administracja" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU "Menu Start" IDS_MINIMIZE_ALL "Minimalizuj wszystko" @@ -362,7 +362,7 @@ BEGIN IDS_TERMINATE "Zakończ działanie ReactOS Explorer" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "Sieć" IDS_CONNECTIONS "Połączenia sieciowe" diff --git a/base/shell/explorer/explorer-pt.rc b/base/shell/explorer/explorer-pt.rc index 29efaabb08e..833a494a751 100644 --- a/base/shell/explorer/explorer-pt.rc +++ b/base/shell/explorer/explorer-pt.rc @@ -30,12 +30,12 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL // TEXTINCLUDE // -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#include ""resource.h""\r\n" "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" @@ -44,7 +44,7 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -70,7 +70,7 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Executar" FONT 8, "MS Shell Dlg" @@ -92,7 +92,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE "Explorador do ReactOS" IDS_START "Iniciar" @@ -112,7 +112,7 @@ BEGIN IDS_ADMIN "Administrar" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU "Startmenu" IDS_MINIMIZE_ALL "mimimize all windows" @@ -130,7 +130,7 @@ BEGIN IDS_TERMINATE "Terminar ROS Explorador" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "Rede" IDS_CONNECTIONS "Coneces da rede" diff --git a/base/shell/explorer/explorer-ro.rc b/base/shell/explorer/explorer-ro.rc index 9d5b49276d9..2ded266e01c 100644 --- a/base/shell/explorer/explorer-ro.rc +++ b/base/shell/explorer/explorer-ro.rc @@ -25,7 +25,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL // Menu // -IDM_MDIFRAME MENU DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "&Fișier" BEGIN @@ -66,7 +66,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -77,7 +77,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -86,7 +86,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -99,7 +99,7 @@ BEGIN END END -IDM_SDIFRAME MENU DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "&Fișier" BEGIN @@ -135,7 +135,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Executare" FONT 8, "MS Shell Dlg" @@ -164,7 +164,7 @@ BEGIN PUSHBUTTON "&Caută", IDC_CHECK_ENTRIES,143,7,50,14 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Ordinea pe birou" FONT 8, "MS Shell Dlg" @@ -199,7 +199,7 @@ BEGIN // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,91,10 END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Bara de activități" FONT 8, "MS Shell Dlg" @@ -212,7 +212,7 @@ BEGIN PUSHBUTTON "&Notificări…", ID_CONFIG_NOTIFYAREA,153,173,50,14 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Meniul Pornire" FONT 8, "MS Shell Dlg" @@ -273,7 +273,7 @@ BEGIN PUSHBUTTON "A&nulează", IDCANCEL,106,136,50,14 END -IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 +IDD_ABOUT_EXPLORER DIALOGEX 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Despre Explorator ReactOS" FONT 8, "MS Shell Dlg" @@ -293,18 +293,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -318,7 +318,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE "Explorator ReactOS" IDS_START "Pornire" @@ -338,7 +338,7 @@ BEGIN IDS_ADMIN "Administrare" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU "Meniul Pornire" IDS_MINIMIZE_ALL "Minimizarea tuturor ferestrelor" @@ -356,7 +356,7 @@ BEGIN IDS_TERMINATE "Închide Explorator ROS" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "Rețea" IDS_CONNECTIONS "Conexuni în rețea" diff --git a/base/shell/explorer/explorer-ru.rc b/base/shell/explorer/explorer-ru.rc index 0bad959ed5e..b432a3e5f20 100644 --- a/base/shell/explorer/explorer-ru.rc +++ b/base/shell/explorer/explorer-ru.rc @@ -25,7 +25,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT // Menu // -IDM_MDIFRAME MENU DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "&Файл" BEGIN @@ -66,7 +66,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -77,7 +77,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -86,7 +86,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -99,7 +99,7 @@ BEGIN END END -IDM_SDIFRAME MENU DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "&Файл" BEGIN @@ -135,7 +135,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Выполнить" FONT 8, "MS Shell Dlg" @@ -166,7 +166,7 @@ BEGIN PUSHBUTTON "&Проверить",IDC_CHECK_ENTRIES,143,7,50,14 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Свойства: Рабочий стол" FONT 8, "MS Shell Dlg" @@ -201,7 +201,7 @@ BEGIN // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,109,10 END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Свойства панели задач" FONT 8, "MS Shell Dlg" @@ -214,7 +214,7 @@ BEGIN PUSHBUTTON "&Уведомления...",ID_CONFIG_NOTIFYAREA,133,173,70,14 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Свойства меню Пуск" FONT 8, "MS Shell Dlg" @@ -276,7 +276,7 @@ BEGIN PUSHBUTTON "&Отмена",IDCANCEL,106,136,50,14 END -IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 +IDD_ABOUT_EXPLORER DIALOGEX 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "О Проводнике ReactOS" FONT 8, "MS Shell Dlg" @@ -298,18 +298,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -323,7 +323,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE "Проводник ReactOS" IDS_START "Пуск" @@ -343,7 +343,7 @@ BEGIN IDS_ADMIN "Администрирование" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU "Меню Пуск" IDS_MINIMIZE_ALL "Cвернуть все окна" @@ -361,7 +361,7 @@ BEGIN IDS_TERMINATE "Завершить работу Проводника" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "Сеть" IDS_CONNECTIONS "Сетевые подключения" diff --git a/base/shell/explorer/explorer-sk.rc b/base/shell/explorer/explorer-sk.rc index fc3ee86ed04..afd199ed2f0 100644 --- a/base/shell/explorer/explorer-sk.rc +++ b/base/shell/explorer/explorer-sk.rc @@ -37,7 +37,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT // Menu // -IDM_MDIFRAME MENU DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "&Sbor" BEGIN @@ -78,7 +78,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -89,7 +89,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -98,7 +98,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -111,7 +111,7 @@ BEGIN END END -IDM_SDIFRAME MENU DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "&Sbor" BEGIN @@ -147,7 +147,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Spusti" FONT 8, "MS Shell Dlg" @@ -178,7 +178,7 @@ BEGIN PUSHBUTTON "&Vyhada",IDC_CHECK_ENTRIES,143,7,50,14 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Vlastnosti plochy" FONT 8, "MS Shell Dlg" @@ -213,7 +213,7 @@ BEGIN // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,91,10 END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Vlastnosti panela loh" FONT 8, "MS Shell Dlg" @@ -226,7 +226,7 @@ BEGIN PUSHBUTTON "&Prispsobi...",ID_CONFIG_NOTIFYAREA,153,173,50,14 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Vlastnosti ponuky tart" FONT 8, "MS Shell Dlg" @@ -288,7 +288,7 @@ BEGIN PUSHBUTTON "&Zrui",IDCANCEL,106,136,50,14 END -IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 +IDD_ABOUT_EXPLORER DIALOGEX 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "o je Prieskumnk systmu ReactOS" FONT 8, "MS Shell Dlg" @@ -310,18 +310,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -335,7 +335,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE "Prieskumnk systmu ReactOS" IDS_START "tart" @@ -355,7 +355,7 @@ BEGIN IDS_ADMIN "Administrcia" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU "Ponuka tart" IDS_MINIMIZE_ALL "Minimalizova vetke okn" @@ -373,7 +373,7 @@ BEGIN IDS_TERMINATE "Ukoni Prieskumnka systmu ReactOS" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "Sie" IDS_CONNECTIONS "Sieov pripojenia" diff --git a/base/shell/explorer/explorer-sv.rc b/base/shell/explorer/explorer-sv.rc index 34735183f8e..fb77b779947 100644 --- a/base/shell/explorer/explorer-sv.rc +++ b/base/shell/explorer/explorer-sv.rc @@ -27,18 +27,18 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -64,7 +64,7 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL // Menu // -IDM_MDIFRAME MENU DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "&Arkiv" BEGIN @@ -105,7 +105,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -116,7 +116,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -125,7 +125,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -138,7 +138,7 @@ BEGIN END END -IDM_SDIFRAME MENU DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "&Arkiv" BEGIN @@ -174,7 +174,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Kr" FONT 8, "MS Shell Dlg" @@ -205,7 +205,7 @@ BEGIN PUSHBUTTON "&Kontrollera poster",IDC_CHECK_ENTRIES,143,7,50,14 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Skrivbordsinstllningar" FONT 8, "MS Shell Dlg" @@ -240,7 +240,7 @@ BEGIN // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,91,10 END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Aktivitetsfltsinstllningar" FONT 8, "MS Shell Dlg" @@ -252,7 +252,7 @@ BEGIN PUSHBUTTON "&Meddelanden...",ID_CONFIG_NOTIFYAREA,153,173,50,14 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Startmenyinstllningar" FONT 8, "MS Shell Dlg" @@ -319,7 +319,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE "ReactOS Explorer" IDS_START "Start" @@ -339,7 +339,7 @@ BEGIN IDS_ADMIN "Administration" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU "Startmeny" IDS_MINIMIZE_ALL "minimera alla fnster" @@ -357,7 +357,7 @@ BEGIN IDS_TERMINATE "Avsluta Explorer" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "Ntverk" IDS_CONNECTIONS "Ntverksanslutningar" diff --git a/base/shell/explorer/explorer-uk.rc b/base/shell/explorer/explorer-uk.rc index ea6c7d4f22c..7d2c92c174b 100644 --- a/base/shell/explorer/explorer-uk.rc +++ b/base/shell/explorer/explorer-uk.rc @@ -25,7 +25,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT // Menu // -IDM_MDIFRAME MENU DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "&Файл" BEGIN @@ -66,7 +66,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -77,7 +77,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -86,7 +86,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -99,7 +99,7 @@ BEGIN END END -IDM_SDIFRAME MENU DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "&Файл" BEGIN @@ -135,7 +135,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX DISCARDABLE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Виконати" FONT 8, "MS Shell Dlg" @@ -166,7 +166,7 @@ BEGIN PUSHBUTTON "&Перевірити",IDC_CHECK_ENTRIES,143,7,50,14 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 194 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Властивості робочого столу" FONT 8, "MS Shell Dlg" @@ -201,7 +201,7 @@ BEGIN // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,91,10 END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Властивості панелі завдань" FONT 8, "MS Shell Dlg" @@ -214,7 +214,7 @@ BEGIN PUSHBUTTON "&Сповіщення...",ID_CONFIG_NOTIFYAREA,153,173,52,14 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Властивості меню Пуск" FONT 8, "MS Shell Dlg" @@ -276,7 +276,7 @@ BEGIN PUSHBUTTON "&Скасувати",IDCANCEL,106,136,50,14 END -IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 +IDD_ABOUT_EXPLORER DIALOGEX 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Про Провідник ReactOS" FONT 8, "MS Shell Dlg" @@ -298,18 +298,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -323,7 +323,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE "Провідник ReactOS" IDS_START "Пуск" @@ -343,7 +343,7 @@ BEGIN IDS_ADMIN "Адміністрування" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU "Меню Пуск" IDS_MINIMIZE_ALL "згорнути всі вікна" @@ -361,7 +361,7 @@ BEGIN IDS_TERMINATE "Завершити роботу Провідника" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "Мережа" IDS_CONNECTIONS "Мережні підключення" diff --git a/base/shell/explorer/explorer-zh.rc b/base/shell/explorer/explorer-zh.rc index 842b990f256..6d0c0afb174 100644 --- a/base/shell/explorer/explorer-zh.rc +++ b/base/shell/explorer/explorer-zh.rc @@ -25,7 +25,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED // Menu // -IDM_MDIFRAME MENU PRELOAD DISCARDABLE +IDM_MDIFRAME MENU BEGIN POPUP "文件(&F)" BEGIN @@ -66,7 +66,7 @@ BEGIN END END -IDM_DESKTOPBAR MENU DISCARDABLE +IDM_DESKTOPBAR MENU BEGIN POPUP "" BEGIN @@ -77,7 +77,7 @@ BEGIN END END -IDM_VOLUME MENU DISCARDABLE +IDM_VOLUME MENU BEGIN POPUP "" BEGIN @@ -86,7 +86,7 @@ BEGIN END END -IDM_NOTIFYAREA MENU DISCARDABLE +IDM_NOTIFYAREA MENU BEGIN POPUP "" BEGIN @@ -99,7 +99,7 @@ BEGIN END END -IDM_SDIFRAME MENU PRELOAD DISCARDABLE +IDM_SDIFRAME MENU BEGIN POPUP "文件(&F)" BEGIN @@ -135,7 +135,7 @@ END // Dialog // -IDD_EXECUTE DIALOGEX FIXED IMPURE 15, 13, 210, 63 +IDD_EXECUTE DIALOGEX 15, 13, 210, 63 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "运行" FONT 8, "MS Shell Dlg" @@ -166,7 +166,7 @@ BEGIN PUSHBUTTON "选取输入项(&C)",IDC_CHECK_ENTRIES,143,7,50,14 END -IDD_DESKBAR_DESKTOP DIALOGEX DISCARDABLE 0, 0, 212, 172 +IDD_DESKBAR_DESKTOP DIALOGEX 0, 0, 212, 172 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "桌面属性" FONT 8, "MS Shell Dlg" @@ -201,7 +201,7 @@ BEGIN // BS_AUTOCHECKBOX | WS_TABSTOP,7,177,91,10 END -IDD_DESKBAR_TASKBAR DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_TASKBAR DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "任务栏属性" FONT 8, "MS Shell Dlg" @@ -214,7 +214,7 @@ BEGIN PUSHBUTTON "任务栏通知区(&N)...",ID_CONFIG_NOTIFYAREA,153,173,50,14 END -IDD_DESKBAR_STARTMENU DIALOGEX DISCARDABLE 0, 0, 210, 194 +IDD_DESKBAR_STARTMENU DIALOGEX 0, 0, 210, 194 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "开始菜单属性" FONT 8, "MS Shell Dlg" @@ -276,7 +276,7 @@ BEGIN PUSHBUTTON "取消(&C)",IDCANCEL,106,136,50,14 END -IDD_ABOUT_EXPLORER DIALOGEX DISCARDABLE 0, 0, 199, 106 +IDD_ABOUT_EXPLORER DIALOGEX 0, 0, 199, 106 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "关于 ReactOS 浏览器" FONT 8, "MS Shell Dlg" @@ -298,18 +298,18 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -323,7 +323,7 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_TITLE "Reactos 浏览器" IDS_START "开始" @@ -343,7 +343,7 @@ BEGIN IDS_ADMIN "管理工具" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STARTMENU "开始菜单" IDS_MINIMIZE_ALL "最小化所有窗口" @@ -361,7 +361,7 @@ BEGIN IDS_TERMINATE "终止 ROS 浏览器" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_NETWORK "网络" IDS_CONNECTIONS "网络连接" diff --git a/base/shell/explorer/explorer.cpp b/base/shell/explorer/explorer.cpp index d402398f860..cdeb9aa2fb4 100644 --- a/base/shell/explorer/explorer.cpp +++ b/base/shell/explorer/explorer.cpp @@ -1186,19 +1186,17 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdL if (_tcsstr(ext_options,TEXT("-break"))) { LOG(TEXT("debugger breakpoint")); -#ifdef _MSC_VER - __asm int 3 -#else - asm("int3"); -#endif + __debugbreak(); } +#ifdef _M_IX86 // activate GDB remote debugging stub if no other debugger is running if (use_gdb_stub) { LOG(TEXT("waiting for debugger connection...\n")); initialize_gdb_stub(); } +#endif g_Globals.init(hInstance); diff --git a/base/shell/explorer/explorer.rc b/base/shell/explorer/explorer.rc index 5ea0d3dc07b..7be07439bd8 100644 --- a/base/shell/explorer/explorer.rc +++ b/base/shell/explorer/explorer.rc @@ -12,7 +12,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VERSION_STR REACTOS_STR_PRODUCT_VERSION IDS_EXPLORER_VERSION_STR "ReactOS %s Explorer" diff --git a/base/shell/explorer/explorer_intres.rc b/base/shell/explorer/explorer_intres.rc index e7e1e099a63..206eb88750f 100644 --- a/base/shell/explorer/explorer_intres.rc +++ b/base/shell/explorer/explorer_intres.rc @@ -27,30 +27,30 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL // Bitmap // -IDB_DRIVEBAR BITMAP MOVEABLE PURE "res/drivebar.bmp" -IDB_LOGOV BITMAP MOVEABLE PURE "res/logov.bmp" -IDB_LOGOV256 BITMAP MOVEABLE PURE "res/logov256.bmp" -IDB_LOGOV16 BITMAP MOVEABLE PURE "res/logov16.bmp" -IDB_ICON_ALIGN_0 BITMAP MOVEABLE PURE "res/icoalig0.bmp" -IDB_ICON_ALIGN_1 BITMAP MOVEABLE PURE "res/icoalig1.bmp" -IDB_ICON_ALIGN_2 BITMAP MOVEABLE PURE "res/icoalig2.bmp" -IDB_ICON_ALIGN_3 BITMAP MOVEABLE PURE "res/icoalig3.bmp" -IDB_ICON_ALIGN_4 BITMAP MOVEABLE PURE "res/icoalig4.bmp" -IDB_ICON_ALIGN_5 BITMAP MOVEABLE PURE "res/icoalig5.bmp" -IDB_ICON_ALIGN_6 BITMAP MOVEABLE PURE "res/icoalig6.bmp" -IDB_ICON_ALIGN_7 BITMAP MOVEABLE PURE "res/icoalig7.bmp" -IDB_ICON_ALIGN_8 BITMAP MOVEABLE PURE "res/icoalig8.bmp" -IDB_ICON_ALIGN_9 BITMAP MOVEABLE PURE "res/icoalig9.bmp" -IDB_ICON_ALIGN_10 BITMAP MOVEABLE PURE "res/icoali10.bmp" -IDB_MDI BITMAP MOVEABLE PURE "res/mdi.bmp" -IDB_SDI BITMAP MOVEABLE PURE "res/sdi.bmp" +IDB_DRIVEBAR BITMAP "res/drivebar.bmp" +IDB_LOGOV BITMAP "res/logov.bmp" +IDB_LOGOV256 BITMAP "res/logov256.bmp" +IDB_LOGOV16 BITMAP "res/logov16.bmp" +IDB_ICON_ALIGN_0 BITMAP "res/icoalig0.bmp" +IDB_ICON_ALIGN_1 BITMAP "res/icoalig1.bmp" +IDB_ICON_ALIGN_2 BITMAP "res/icoalig2.bmp" +IDB_ICON_ALIGN_3 BITMAP "res/icoalig3.bmp" +IDB_ICON_ALIGN_4 BITMAP "res/icoalig4.bmp" +IDB_ICON_ALIGN_5 BITMAP "res/icoalig5.bmp" +IDB_ICON_ALIGN_6 BITMAP "res/icoalig6.bmp" +IDB_ICON_ALIGN_7 BITMAP "res/icoalig7.bmp" +IDB_ICON_ALIGN_8 BITMAP "res/icoalig8.bmp" +IDB_ICON_ALIGN_9 BITMAP "res/icoalig9.bmp" +IDB_ICON_ALIGN_10 BITMAP "res/icoali10.bmp" +IDB_MDI BITMAP "res/mdi.bmp" +IDB_SDI BITMAP "res/sdi.bmp" ///////////////////////////////////////////////////////////////////////////// // // Accelerator // -IDA_EXPLORER ACCELERATORS MOVEABLE PURE +IDA_EXPLORER ACCELERATORS BEGIN "S", ID_VIEW_FULLSCREEN, VIRTKEY, SHIFT, CONTROL, NOINVERT @@ -58,12 +58,12 @@ BEGIN "X", ID_FILE_EXIT, VIRTKEY, ALT, NOINVERT END -IDA_SEARCH_PROGRAM ACCELERATORS MOVEABLE PURE +IDA_SEARCH_PROGRAM ACCELERATORS BEGIN VK_F5, ID_REFRESH, VIRTKEY, NOINVERT END -IDA_TRAYNOTIFY ACCELERATORS MOVEABLE PURE +IDA_TRAYNOTIFY ACCELERATORS BEGIN VK_F5, ID_REFRESH, VIRTKEY, NOINVERT END @@ -75,26 +75,26 @@ END // TEXTINCLUDE // -1 TEXTINCLUDE MOVEABLE PURE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE MOVEABLE PURE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE MOVEABLE PURE +3 TEXTINCLUDE BEGIN "#ifndef ROSSHELL\r\n" - "IDB_IMAGES BITMAP DISCARDABLE ""res/images.bmp""\r\n" - "IDB_TOOLBAR BITMAP DISCARDABLE ""res/toolbar.bmp""\r\n" + "IDB_IMAGES BITMAP ""res/images.bmp""\r\n" + "IDB_TOOLBAR BITMAP ""res/toolbar.bmp""\r\n" "#endif\r\n" "#ifndef __REACTOS__\r\n" "LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL\r\n" - "STRINGTABLE DISCARDABLE \r\n" + "STRINGTABLE \r\n" "BEGIN\r\n" "IDS_VERSION_STR """"\r\n" "#ifdef UNICODE\r\n" @@ -105,7 +105,7 @@ BEGIN "END\r\n" "#endif\r\n" "#ifndef _DEBUG\r\n" - "CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST DISCARDABLE PURE ""explorer.exe.manifest""\r\n" + "CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST ""explorer.exe.manifest""\r\n" "#endif\r\n" "\r\n" "#include ""explorer-bg.rc""\r\n" @@ -147,43 +147,43 @@ END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. -IDI_COMPUTER ICON DISCARDABLE "res/computer.ico" -IDI_EXPLORER ICON DISCARDABLE "res/explorer.ico" -IDI_STARTMENU ICON DISCARDABLE "res/startmenu.ico" -IDI_LOGOFF ICON DISCARDABLE "res/logoff.ico" -IDI_SHUTDOWN ICON DISCARDABLE "res/shutdown.ico" -IDI_RESTART ICON DISCARDABLE "res/restart.ico" -IDI_ARROW ICON DISCARDABLE "res/arrow.ico" -IDI_ARROW_SELECTED ICON DISCARDABLE "res/arrowsel.ico" -IDI_APPICON ICON DISCARDABLE "res/appicon.ico" -IDI_FLOATING ICON DISCARDABLE "res/floating.ico" -IDI_REACTOS_BIG ICON DISCARDABLE "res/ros-big.ico" -IDI_CONFIG ICON DISCARDABLE "res/config.ico" -IDI_DOCUMENTS ICON DISCARDABLE "res/documents.ico" -IDI_FAVORITES ICON DISCARDABLE "res/favorites.ico" -IDI_INFO ICON DISCARDABLE "res/info.ico" -IDI_APPS ICON DISCARDABLE "res/apps.ico" -IDI_SEARCH ICON DISCARDABLE "res/search.ico" -IDI_ACTION ICON DISCARDABLE "res/action.ico" -IDI_FOLDER ICON DISCARDABLE "res/folder.ico" -IDI_SEARCH_DOC ICON DISCARDABLE "res/search-doc.ico" -IDI_PRINTER ICON DISCARDABLE "res/printer.ico" -IDI_NETWORK ICON DISCARDABLE "res/network.ico" -IDI_REACTOS ICON DISCARDABLE "res/reactos.ico" -IDI_SPEAKER ICON DISCARDABLE "res/speaker.ico" -IDI_DOT ICON DISCARDABLE "res/dot.ico" -IDI_DOT_TRANS ICON DISCARDABLE "res/dot_trans.ico" -IDI_DOT_RED ICON DISCARDABLE "res/dot_red.ico" -IDI_ARROW_UP ICON DISCARDABLE "res/arrow_up.ico" -IDI_ARROW_DOWN ICON DISCARDABLE "res/arrow_dwn.ico" -IDI_NOTIFY_L ICON DISCARDABLE "res/notify_l.ico" -IDI_NOTIFY_R ICON DISCARDABLE "res/notify_r.ico" -IDI_MINIMIZE ICON DISCARDABLE "res/minimize.ico" -IDI_CONTROLPAN ICON DISCARDABLE "res/control-panel.ico" -IDI_DESKSETTING ICON DISCARDABLE "res/desktop-settings.ico" -IDI_NETCONNS ICON DISCARDABLE "res/network-conns.ico" -IDI_ADMIN ICON DISCARDABLE "res/administration.ico" -IDI_RECENT ICON DISCARDABLE "res/recent-documents.ico" +IDI_COMPUTER ICON "res/computer.ico" +IDI_EXPLORER ICON "res/explorer.ico" +IDI_STARTMENU ICON "res/startmenu.ico" +IDI_LOGOFF ICON "res/logoff.ico" +IDI_SHUTDOWN ICON "res/shutdown.ico" +IDI_RESTART ICON "res/restart.ico" +IDI_ARROW ICON "res/arrow.ico" +IDI_ARROW_SELECTED ICON "res/arrowsel.ico" +IDI_APPICON ICON "res/appicon.ico" +IDI_FLOATING ICON "res/floating.ico" +IDI_REACTOS_BIG ICON "res/ros-big.ico" +IDI_CONFIG ICON "res/config.ico" +IDI_DOCUMENTS ICON "res/documents.ico" +IDI_FAVORITES ICON "res/favorites.ico" +IDI_INFO ICON "res/info.ico" +IDI_APPS ICON "res/apps.ico" +IDI_SEARCH ICON "res/search.ico" +IDI_ACTION ICON "res/action.ico" +IDI_FOLDER ICON "res/folder.ico" +IDI_SEARCH_DOC ICON "res/search-doc.ico" +IDI_PRINTER ICON "res/printer.ico" +IDI_NETWORK ICON "res/network.ico" +IDI_REACTOS ICON "res/reactos.ico" +IDI_SPEAKER ICON "res/speaker.ico" +IDI_DOT ICON "res/dot.ico" +IDI_DOT_TRANS ICON "res/dot_trans.ico" +IDI_DOT_RED ICON "res/dot_red.ico" +IDI_ARROW_UP ICON "res/arrow_up.ico" +IDI_ARROW_DOWN ICON "res/arrow_dwn.ico" +IDI_NOTIFY_L ICON "res/notify_l.ico" +IDI_NOTIFY_R ICON "res/notify_r.ico" +IDI_MINIMIZE ICON "res/minimize.ico" +IDI_CONTROLPAN ICON "res/control-panel.ico" +IDI_DESKSETTING ICON "res/desktop-settings.ico" +IDI_NETCONNS ICON "res/network-conns.ico" +IDI_ADMIN ICON "res/administration.ico" +IDI_RECENT ICON "res/recent-documents.ico" #endif // Neutral resources ///////////////////////////////////////////////////////////////////////////// @@ -195,12 +195,12 @@ IDI_RECENT ICON DISCARDABLE "res/recent-documents.ico" // Generated from the TEXTINCLUDE 3 resource. // #ifndef ROSSHELL -IDB_IMAGES BITMAP DISCARDABLE "res/images.bmp" -IDB_TOOLBAR BITMAP DISCARDABLE "res/toolbar.bmp" +IDB_IMAGES BITMAP "res/images.bmp" +IDB_TOOLBAR BITMAP "res/toolbar.bmp" #endif #ifndef __REACTOS__ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_VERSION_STR "" #ifdef UNICODE @@ -211,7 +211,7 @@ IDS_EXPLORER_VERSION_STR "ROS Explorer Ansi%0s" END #endif #ifndef _DEBUG -CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST DISCARDABLE PURE "explorer.exe.manifest" +CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "explorer.exe.manifest" #endif #ifdef LANGUAGE_BG_BG diff --git a/base/shell/explorer/taskbar/taskbar.cpp b/base/shell/explorer/taskbar/taskbar.cpp index 19d26f17527..83c4b14058d 100644 --- a/base/shell/explorer/taskbar/taskbar.cpp +++ b/base/shell/explorer/taskbar/taskbar.cpp @@ -328,13 +328,13 @@ HICON get_window_icon_small(HWND hwnd) { HICON hIcon = 0; - SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon); + SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon); if (!hIcon) - SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon); + SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon); if (!hIcon) - SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon); + SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon); if (!hIcon) hIcon = (HICON)GetClassLongPtr(hwnd, GCL_HICONSM); @@ -343,7 +343,7 @@ HICON get_window_icon_small(HWND hwnd) hIcon = (HICON)GetClassLongPtr(hwnd, GCL_HICON); if (!hIcon) - SendMessageTimeout(hwnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (LPDWORD)&hIcon); + SendMessageTimeout(hwnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (PDWORD_PTR)&hIcon); return hIcon; } @@ -352,13 +352,13 @@ HICON get_window_icon_big(HWND hwnd, bool allow_from_class) { HICON hIcon = 0; - SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon); + SendMessageTimeout(hwnd, WM_GETICON, ICON_BIG, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon); if (!hIcon) - SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon); + SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL2, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon); if (!hIcon) - SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000, (LPDWORD)&hIcon); + SendMessageTimeout(hwnd, WM_GETICON, ICON_SMALL, 0, SMTO_ABORTIFHUNG, 1000, (PDWORD_PTR)&hIcon); if (allow_from_class) { if (!hIcon) @@ -369,7 +369,7 @@ HICON get_window_icon_big(HWND hwnd, bool allow_from_class) } if (!hIcon) - SendMessageTimeout(hwnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (LPDWORD)&hIcon); + SendMessageTimeout(hwnd, WM_QUERYDRAGICON, 0, 0, 0, 1000, (PDWORD_PTR)&hIcon); return hIcon; } @@ -519,7 +519,7 @@ void TaskBar::Refresh() if (!SendMessage(_htoolbar, TB_DELETEBUTTON, idx, 0)) MessageBoxW(NULL, L"failed to delete button", NULL, MB_OK); - + for(TaskBarMap::iterator it2=_map.begin(); it2!=_map.end(); ++it2) { TaskBarEntry& entry = it2->second; @@ -528,7 +528,7 @@ void TaskBar::Refresh() --entry._btn_idx; #if 0 --entry._bmp_idx; - + TBBUTTONINFO info; info.cbSize = sizeof(TBBUTTONINFO); @@ -540,7 +540,7 @@ void TaskBar::Refresh() #endif } } - + } for(set::iterator it=hbmp_to_delete.begin(); it!=hbmp_to_delete.end(); ++it) { diff --git a/base/system/autochk/autochk.c b/base/system/autochk/autochk.c index 50bf14f315a..d1cd6a4b41f 100644 --- a/base/system/autochk/autochk.c +++ b/base/system/autochk/autochk.c @@ -167,59 +167,59 @@ ChkdskCallback( switch(Command) { case UNKNOWN2: - DPRINT("UNKNOWN2\r"); + DPRINT("UNKNOWN2\n"); break; case UNKNOWN3: - DPRINT("UNKNOWN3\r"); + DPRINT("UNKNOWN3\n"); break; case UNKNOWN4: - DPRINT("UNKNOWN4\r"); + DPRINT("UNKNOWN4\n"); break; case UNKNOWN5: - DPRINT("UNKNOWN5\r"); + DPRINT("UNKNOWN5\n"); break; case UNKNOWN9: - DPRINT("UNKNOWN9\r"); + DPRINT("UNKNOWN9\n"); break; case UNKNOWNA: - DPRINT("UNKNOWNA\r"); + DPRINT("UNKNOWNA\n"); break; case UNKNOWNC: - DPRINT("UNKNOWNC\r"); + DPRINT("UNKNOWNC\n"); break; case UNKNOWND: - DPRINT("UNKNOWND\r"); + DPRINT("UNKNOWND\n"); break; case INSUFFICIENTRIGHTS: - DPRINT("INSUFFICIENTRIGHTS\r"); + DPRINT("INSUFFICIENTRIGHTS\n"); break; case FSNOTSUPPORTED: - DPRINT("FSNOTSUPPORTED\r"); + DPRINT("FSNOTSUPPORTED\n"); break; case VOLUMEINUSE: - DPRINT("VOLUMEINUSE\r"); + DPRINT("VOLUMEINUSE\n"); break; case STRUCTUREPROGRESS: - DPRINT("STRUCTUREPROGRESS\r"); + DPRINT("STRUCTUREPROGRESS\n"); break; case DONEWITHSTRUCTURE: - DPRINT("DONEWITHSTRUCTURE\r"); + DPRINT("DONEWITHSTRUCTURE\n"); break; case CLUSTERSIZETOOSMALL: - DPRINT("CLUSTERSIZETOOSMALL\r"); + DPRINT("CLUSTERSIZETOOSMALL\n"); break; case PROGRESS: @@ -236,8 +236,8 @@ ChkdskCallback( Status = (PBOOLEAN)Argument; if (*Status == TRUE) { - PrintString("Autochk was unable to complete successfully.\n\n"); - //Error = TRUE; + PrintString("Autochk was unable to complete successfully.\r\n\r\n"); + // Error = TRUE; } break; } @@ -294,7 +294,7 @@ CheckVolume( if (!NT_SUCCESS(Status)) { DPRINT1("GetFileSystem() failed with status 0x%08lx\n", Status); - PrintString(" Unable to get file system of %S\n", DrivePath); + PrintString(" Unable to get file system of %S\r\n", DrivePath); return Status; } @@ -303,7 +303,7 @@ CheckVolume( if (Provider == NULL) { DPRINT1("LoadProvider() failed\n"); - PrintString(" Unable to verify a %S volume\n", FileSystem); + PrintString(" Unable to verify a %S volume\r\n", FileSystem); return STATUS_DLL_NOT_FOUND; } @@ -315,13 +315,13 @@ CheckVolume( if (!NT_SUCCESS(Status)) { DPRINT1("LdrGetProcedureAddress() failed with status 0x%08lx\n", Status); - PrintString(" Unable to verify a %S volume\n", FileSystem); + PrintString(" Unable to verify a %S volume\r\n", FileSystem); LdrUnloadDll(Provider); return Status; } /* Call provider */ - //PrintString(" Verifying volume %S\n", DrivePath); + // PrintString(" Verifying volume %S\r\n", DrivePath); swprintf(NtDrivePath, L"\\??\\"); wcscat(NtDrivePath, DrivePath); NtDrivePath[wcslen(NtDrivePath)-1] = 0; @@ -384,7 +384,7 @@ _main(int argc, CheckVolume(DrivePath); } } - //PrintString(" Done\n\n"); + // PrintString(" Done\r\n\r\n"); return 0; } diff --git a/base/system/diskpart/lang/en-US.rc b/base/system/diskpart/lang/en-US.rc index d427fabe8d3..b714b68ff4f 100644 --- a/base/system/diskpart/lang/en-US.rc +++ b/base/system/diskpart/lang/en-US.rc @@ -11,7 +11,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT /* Basic application information */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_HEADER, "ReactOS DiskPart" IDS_APP_USAGE, "\nDisk Partitioning Interpreter.\n\n\ @@ -26,7 +26,7 @@ Usage: DISKPART [/S filename] [/T timeout] [/?]\n\n\ END /* Disk Information Labels */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DETAIL_INFO_DISK_ID, "Disk" IDS_DETAIL_INFO_TYPE, "Type" @@ -45,7 +45,7 @@ BEGIN END /* Detail header titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_DISK_HEAD "Disk ### Status\tSize\tFree\tDyn\tGpt\n" IDS_LIST_DISK_LINE "-------- ------\t----\t----\t---\t---\n" @@ -53,7 +53,7 @@ BEGIN END /* Disk Status */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STATUS_YES "Yes" IDS_STATUS_NO "No" @@ -66,7 +66,7 @@ BEGIN END /* CMD Messages for commands */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSG_CURRENT_DSK_STATUS "is now the selected disk." IDS_MSG_NO_DISK "There is no disk currently selected.\nPlease select a disk and try again." @@ -75,7 +75,7 @@ END /* Help Command Descripions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_DESC_ACTIVE "ACTIVE\t\t- Mark the selected partition as active.\n" IDS_HELP_CMD_DESC_ADD "ADD\t\t- Add a mirror to a simple volume.\n" @@ -118,7 +118,7 @@ BEGIN END /* Common Error Messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR_MSG_NO_SCRIPT "Error opening script: %s\n" IDS_ERROR_MSG_BAD_ARG "Error processing argument: %s\n" @@ -127,252 +127,252 @@ END /* Active help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_ACTIVE "\n\ \n\n" END /* Add help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_ADD "\n\ \n\n" END /* Assign help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_ASSIGN "\n\ \n\n" END /* Attach help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_ATTACH "\n\ \n\n" END /* Attributes Command Messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_ATTRIBUTES "\n\ \n\n" END /* Automount help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_AUTOMOUNT "\n\ \n\n" END /* Break help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_BREAK "\n\ \n\n" END /* Clean help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_CLEAN "\n\ \n\n" END /* Compact help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_COMPACT "\n\ \n\n" END /* Convert help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_CONVERT "\n\ \n\n" END /* Convert help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_CREATE "\n\ \n\n" END /* Delete help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_DELETE "\n\ \n\n" END /* Delete help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_DETAIL "\n\ \n\n" END /* Detach help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_DETACH "\n\ \n\n" END /* Expand help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_EXPAND "\n\ \n\n" END /* Extend help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_EXTEND "\n\ \n\n" END /* Filesystems help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_FILESYSTEMS "\n\ \n\n" END /* Format help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_FORMAT "\n\ \n\n" END /* GPT help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_GPT "\n\ \n\n" END /* Help help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_HELP "\n\ \n\n" END /* Import help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_IMPORT "\n\ \n\n" END /* Inactive help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_INACTIVE "\n\ \n\n" END /* List help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_LIST "\n\ \n\n" END /* Merge help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_MERGE "\n\ \n\n" END /* Offline help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_OFFLINE "\n\ \n\n" END /* Online help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_ONLINE "\n\ \n\n" END /* Recover help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_RECOVER "\n\ \n\n" END /* Remove help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_REMOVE "\n\ \n\n" END /* Repair help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_REPAIR "\n\ \n\n" END /* Rescan help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_RESCAN "\n\ \n\n" END /* Retain help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_RETAIN "\n\ \n\n" END /* San help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_SAN "\n\ \n\n" END /* Select help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_SELECT "\n\ \n\n" END /* Setid help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_SETID "\n\ \n\n" END /* Setid help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_SHRINK "\n\ \n\n" END /* Uniqueid help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_UNIQUEID "\n\ \n\n" diff --git a/base/system/diskpart/lang/ro-RO.rc b/base/system/diskpart/lang/ro-RO.rc index 3efd247c7b0..620437f1611 100644 --- a/base/system/diskpart/lang/ro-RO.rc +++ b/base/system/diskpart/lang/ro-RO.rc @@ -13,7 +13,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL /* Basic application information */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_HEADER, "ReactOS DiskPart" IDS_APP_USAGE, "Interpretor pentru partiționare discuri.\n\nUtilizare: DISKPART [/S numefișier] [/T timplimită] [/?]\n\n\ @@ -27,7 +27,7 @@ BEGIN END /* Disk Information Labels */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DETAIL_INFO_DISK_ID, "Disc" IDS_DETAIL_INFO_TYPE, "Tip" @@ -46,7 +46,7 @@ BEGIN END /* Detail header titles */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LIST_DISK_HEAD "Disc ### Stare\tDimensiune\tLiber\tDyn\tGpt\n" IDS_LIST_DISK_LINE "-------- ------\t----\t----\t---\t---\n" @@ -54,7 +54,7 @@ BEGIN END /* Disk Status */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STATUS_YES "Da" IDS_STATUS_NO "Nu" @@ -67,7 +67,7 @@ BEGIN END /* CMD Messages for commands */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_MSG_CURRENT_DSK_STATUS " a devenit discul curent." IDS_MSG_NO_DISK "Momentan nici un disc nu este selectat.\nAlegeți un disc apoi reîncercați." @@ -76,7 +76,7 @@ END /* Help Command Descripions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_DESC_ACTIVE "ACTIVE\t\t- Desemnează ca activă partiția selectată.\n" IDS_HELP_CMD_DESC_ADD "ADD\t\t- Adaugă o oglindă la un volum simplu.\n" @@ -119,7 +119,7 @@ BEGIN END /* Common Error Messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ERROR_MSG_NO_SCRIPT "Eroare la deschiderea fișierului script: %s\n" IDS_ERROR_MSG_BAD_ARG "Eroare la prelucrarea argumentului: %s\n" @@ -128,77 +128,77 @@ END /* Active help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_ACTIVE "\n\ \n\n" END /* Add help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_ADD "\n\ \n\n" END /* Assign help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_ASSIGN "\n\ \n\n" END /* Attach help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_ATTACH "\n\ \n\n" END /* Attributes Command Messages */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_ATTRIBUTES "\n\ \n\n" END /* Automount help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_AUTOMOUNT "\n\ \n\n" END /* Break help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_BREAK "\n\ \n\n" END /* Clean help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_CLEAN "\n\ \n\n" END /* Compact help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_COMPACT "\n\ \n\n" END /* Convert help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_CONVERT "\n\ \n\n" END /* Convert help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_CREATE "\n\ \n\n" @@ -206,175 +206,175 @@ END /* Delete help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_DELETE "\n\ \n\n" END /* Delete help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_DETAIL "\n\ \n\n" END /* Detach help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_DETACH "\n\ \n\n" END /* Expand help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_EXPAND "\n\ \n\n" END /* Extend help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_EXTEND "\n\ \n\n" END /* Filesystems help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_FILESYSTEMS "\n\ \n\n" END /* Format help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_FORMAT "\n\ \n\n" END /* GPT help description */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_GPT "\n\ \n\n" END /* Help help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_HELP "\n\ \n\n" END /* Import help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_IMPORT "\n\ \n\n" END /* Inactive help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_INACTIVE "\n\ \n\n" END /* List help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_LIST "\n\ \n\n" END /* Merge help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_MERGE "\n\ \n\n" END /* Offline help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_OFFLINE "\n\ \n\n" END /* Online help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_ONLINE "\n\ \n\n" END /* Recover help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_RECOVER "\n\ \n\n" END /* Remove help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_REMOVE "\n\ \n\n" END /* Repair help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_REPAIR "\n\ \n\n" END /* Rescan help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_RESCAN "\n\ \n\n" END /* Retain help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_RETAIN "\n\ \n\n" END /* San help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_SAN "\n\ \n\n" END /* Select help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_SELECT "\n\ \n\n" END /* Setid help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_SETID "\n\ \n\n" END /* Setid help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_SHRINK "\n\ \n\n" END /* Uniqueid help descriptions */ -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_HELP_CMD_UNIQUEID "\n\ \n\n" diff --git a/base/system/format/lang/bg-BG.rc b/base/system/format/lang/bg-BG.rc index c070efcd1af..5ce4137f96c 100644 --- a/base/system/format/lang/bg-BG.rc +++ b/base/system/format/lang/bg-BG.rc @@ -3,7 +3,7 @@ /* LOCATION: \base\applications\format\lang */ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_HELP, "Употреба: %s устройство: [-FS:файлова_система] [-V:етикет] [-Q] [-A:размер] [-C]\n\n\ [drive:] Указва устройството за оразмеряване.\n\ diff --git a/base/system/format/lang/cs-CZ.rc b/base/system/format/lang/cs-CZ.rc index cb9865a6141..855c996b945 100644 --- a/base/system/format/lang/cs-CZ.rc +++ b/base/system/format/lang/cs-CZ.rc @@ -4,7 +4,7 @@ */ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_HELP, "Použití: %s jednotka: [-FS:filesystem] [-V:jmenovka] [-Q] [-A:velikost] [-C]\n\n\ [jednotka:] Určí jednotku, která bude zformátována.\n\ diff --git a/base/system/format/lang/de-DE.rc b/base/system/format/lang/de-DE.rc index faf5b7f05c1..63fbd866000 100644 --- a/base/system/format/lang/de-DE.rc +++ b/base/system/format/lang/de-DE.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_HELP, "Syntax: %s Datenträger: [-FS:Dateisystem] [-V:Label] [-Q] [-A:Größe] [-C]\n\n\ [Datenträger:] Legt das zu formatierende Laufwerk fest.\n\ diff --git a/base/system/format/lang/el-GR.rc b/base/system/format/lang/el-GR.rc index a7e4e0703da..efdb56ae687 100644 --- a/base/system/format/lang/el-GR.rc +++ b/base/system/format/lang/el-GR.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_HELP, "Χρήση: %s τόμος: [-FS:σύστημα-αρχείων] [-V:ετικέτα] [-Q] [-A:μέγεθος] [-C]\n\n\ [τόμος:] Καθορίζει το γράμμα μονάδας δίσκου προς διαμόρφωση.\n\ diff --git a/base/system/format/lang/en-US.rc b/base/system/format/lang/en-US.rc index ca8249e65e5..86bcb2d12b0 100644 --- a/base/system/format/lang/en-US.rc +++ b/base/system/format/lang/en-US.rc @@ -4,7 +4,7 @@ */ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_HELP, "Usage: %s drive: [-FS:file-system] [-V:label] [-Q] [-A:size] [-C]\n\n\ [drive:] Specifies the drive to format.\n\ diff --git a/base/system/format/lang/es-ES.rc b/base/system/format/lang/es-ES.rc index 8afe1ce70d6..11d2e9eccd1 100644 --- a/base/system/format/lang/es-ES.rc +++ b/base/system/format/lang/es-ES.rc @@ -4,7 +4,7 @@ */ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_HELP, "Uso: %s unidad: [-FS:sistema de archivos] [-V:etiqueta] [-Q] [-A:tamaño] [-C]\n\n\ [unidad:] Especifica la unidad a formatear.\n\ diff --git a/base/system/format/lang/fr-FR.rc b/base/system/format/lang/fr-FR.rc index dd86a1c585e..510d92c9fd6 100644 --- a/base/system/format/lang/fr-FR.rc +++ b/base/system/format/lang/fr-FR.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_HELP, "Utilisation : %s disque: [-FS:système de fichier] [-V:nom] [-Q] [-A:taille] [-C]\n\n\ [disque:] Indique le disque à formater.\n\ diff --git a/base/system/format/lang/hu-HU.rc b/base/system/format/lang/hu-HU.rc index 540f00fa116..9e212acbb1e 100644 --- a/base/system/format/lang/hu-HU.rc +++ b/base/system/format/lang/hu-HU.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_HELP, "Használat: %s kötet: [-FS:állományrendszer] [-V:címke] [-Q] [-A:méret] [-C]\n\n\ [kötet:] A meghajtóbetûjelet adja meg (kettõsponttal a végén).\n\ diff --git a/base/system/format/lang/id-ID.rc b/base/system/format/lang/id-ID.rc index 698d549cd27..41b3e2a518f 100644 --- a/base/system/format/lang/id-ID.rc +++ b/base/system/format/lang/id-ID.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_HELP, "Pemakaian: %s drive: [-FS:file-system] [-V:label] [-Q] [-A:size] [-C]\n\n\ [drive:] Menetapkan drive yang akan diformat.\n\ diff --git a/base/system/format/lang/it-IT.rc b/base/system/format/lang/it-IT.rc index 91f4ef2dc24..4a5004e1b4f 100644 --- a/base/system/format/lang/it-IT.rc +++ b/base/system/format/lang/it-IT.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_HELP, "Uso: %s drive: [-FS:file-system] [-V:label] [-Q] [-A:size] [-C]\n\n\ [drive:] Specifica l'unità disco da formattare.\n\ diff --git a/base/system/format/lang/ja-JP.rc b/base/system/format/lang/ja-JP.rc index 61923e6c3e6..cc87b26de58 100644 --- a/base/system/format/lang/ja-JP.rc +++ b/base/system/format/lang/ja-JP.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_HELP, "使用法: %s ドライブ: [-FS:ファイルシステム] [-V:ラベル] [-Q] [-A:サイズ] [-C]\n\n\ [ドライブ:] フォーマットするドライブを指定します。\n\ diff --git a/base/system/format/lang/lt-LT.rc b/base/system/format/lang/lt-LT.rc index c60f8f85b69..281432b73ff 100644 --- a/base/system/format/lang/lt-LT.rc +++ b/base/system/format/lang/lt-LT.rc @@ -1,7 +1,7 @@ /* Translation by Vytis 'CMan' Girdžijauskas cman@cman.us */ LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_HELP, "Naudojimas: %s diskas: [-FS:bylų-sistema] [-V:žymė] [-Q] [-A:dydis] [-C]\n\n\ [diskas:] Nurodo diską formavimui.\n\ diff --git a/base/system/format/lang/no-NO.rc b/base/system/format/lang/no-NO.rc index b18882487f8..7134d790763 100644 --- a/base/system/format/lang/no-NO.rc +++ b/base/system/format/lang/no-NO.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_HELP, "bruk: %s stasjon: [-FS:fil-system] [-V:merke] [-Q] [-A:størrelse] [-C]\n\n\ [stasjon:] Spesifisere stasjon til formater.\n\ diff --git a/base/system/format/lang/pl-PL.rc b/base/system/format/lang/pl-PL.rc index 2cc52fbb356..d09d1f07465 100644 --- a/base/system/format/lang/pl-PL.rc +++ b/base/system/format/lang/pl-PL.rc @@ -6,7 +6,7 @@ */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_HELP, "Sposób użycia: %s wolumin: [-FS:syst-plik] [-V:etykieta] [-Q] [-A:rozmiar] [-C]\n\n\ [wolumin:] Określa literę dysku przeznaczonego do formatowania.\n\ diff --git a/base/system/format/lang/ro-RO.rc b/base/system/format/lang/ro-RO.rc index df28014e721..2029f0d0fda 100644 --- a/base/system/format/lang/ro-RO.rc +++ b/base/system/format/lang/ro-RO.rc @@ -9,7 +9,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_HELP, "Utilizare: %s unitate: [-FS:sistem-de-fișiere] [-V:etichetă]\n\ [-Q] [-A:dimensiune] [-C]\n\n\ diff --git a/base/system/format/lang/ru-RU.rc b/base/system/format/lang/ru-RU.rc index 1a61d20fbab..4097ba1831b 100644 --- a/base/system/format/lang/ru-RU.rc +++ b/base/system/format/lang/ru-RU.rc @@ -1,7 +1,7 @@ // Russian language resource file (Dmitry Chapyshev, 2007-06-10) LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_HELP, "Использование: %s том: [-FS:система] [-V:метка] [-Q] [-A:размер] [-C]\n\n\ [том:] Указывает букву диска (с последующим двоеточием),\n\ diff --git a/base/system/format/lang/sk-SK.rc b/base/system/format/lang/sk-SK.rc index 049d764337e..1ec247d1276 100644 --- a/base/system/format/lang/sk-SK.rc +++ b/base/system/format/lang/sk-SK.rc @@ -4,7 +4,7 @@ */ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN /* menovka zväzku = volume label, drive = jednotka */ STRING_HELP, "Použitie: %s jednotka: [-FS:systém súborov] [-V:menovka] [-Q] [-A:veľkosť] [-C]\n\n\ diff --git a/base/system/format/lang/uk-UA.rc b/base/system/format/lang/uk-UA.rc index 40d11fee7c9..a5bae4a6d22 100644 --- a/base/system/format/lang/uk-UA.rc +++ b/base/system/format/lang/uk-UA.rc @@ -7,7 +7,7 @@ */ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_HELP, "Використання: %s пристрій: [-FS:файл-система] [-V:мітка] [-Q] [-A:розмір] [-C]\n\n\ [пристрій:] Вказує диск, який слід відформатувати (двокрапка обов'язкова).\n\ diff --git a/base/system/format/lang/zh-CN.rc b/base/system/format/lang/zh-CN.rc index f23047b8300..f78e099a0c8 100644 --- a/base/system/format/lang/zh-CN.rc +++ b/base/system/format/lang/zh-CN.rc @@ -4,7 +4,7 @@ */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_HELP, "用法:%s 驱动器: [-FS:文件系统] [-V:卷标] [-Q] [-A:大小] [-C]\n\n\ [驱动器:] 指定要格式化的驱动器。\n\ diff --git a/base/system/logonui/rsrc.rc b/base/system/logonui/rsrc.rc index f2521e79f63..3d158f0b16a 100644 --- a/base/system/logonui/rsrc.rc +++ b/base/system/logonui/rsrc.rc @@ -4,10 +4,10 @@ LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL -IDB_MAIN_PANEL_SHINE BITMAP DISCARDABLE "res/100.bmp" -IDB_MAIN_ROS_LOGO BITMAP DISCARDABLE "res/123.bmp" -IDB_TOP_DIVIDER_STRIP BITMAP DISCARDABLE "res/125.bmp" -IDB_BOTTOM_DIVIDER_STRIP BITMAP DISCARDABLE "res/126.bmp" +IDB_MAIN_PANEL_SHINE BITMAP "res/100.bmp" +IDB_MAIN_ROS_LOGO BITMAP "res/123.bmp" +IDB_TOP_DIVIDER_STRIP BITMAP "res/125.bmp" +IDB_BOTTOM_DIVIDER_STRIP BITMAP "res/126.bmp" //#include "lang/en-US.rc" diff --git a/base/system/regsvr32/lang/bg-BG.rc b/base/system/regsvr32/lang/bg-BG.rc index 4af32944eff..0d00058990e 100644 --- a/base/system/regsvr32/lang/bg-BG.rc +++ b/base/system/regsvr32/lang/bg-BG.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_UsageMessage, "%s\n\nУпотреба: regsvr32 [/u] [/s] [/c] [/n] [/i[:ключ]] име_на_dll\n\ diff --git a/base/system/regsvr32/lang/cs-CZ.rc b/base/system/regsvr32/lang/cs-CZ.rc index 023c7852457..6be60d4e7fe 100644 --- a/base/system/regsvr32/lang/cs-CZ.rc +++ b/base/system/regsvr32/lang/cs-CZ.rc @@ -4,7 +4,7 @@ */ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_UsageMessage, "%s\n\nPoužití: regsvr32 [/u] [/s] [/c] [/n] [/i[:příkaz]] názevdll\n\ diff --git a/base/system/regsvr32/lang/de-DE.rc b/base/system/regsvr32/lang/de-DE.rc index ad42ee3866e..73349788d4b 100644 --- a/base/system/regsvr32/lang/de-DE.rc +++ b/base/system/regsvr32/lang/de-DE.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_UsageMessage, "%s\n\nSyntax: regsvr32 [/u] [/s] [/c] [/n] [/i[:cmdline]] dllname\n\ diff --git a/base/system/regsvr32/lang/en-US.rc b/base/system/regsvr32/lang/en-US.rc index c9ed91e7870..76dd1ac8899 100644 --- a/base/system/regsvr32/lang/en-US.rc +++ b/base/system/regsvr32/lang/en-US.rc @@ -4,7 +4,7 @@ */ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_UsageMessage, "%s\n\nUsage: regsvr32 [/u] [/s] [/c] [/n] [/i[:cmdline]] dllname\n\ diff --git a/base/system/regsvr32/lang/es-ES.rc b/base/system/regsvr32/lang/es-ES.rc index c3543185871..dfc825bfb3c 100644 --- a/base/system/regsvr32/lang/es-ES.rc +++ b/base/system/regsvr32/lang/es-ES.rc @@ -4,7 +4,7 @@ */ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_UsageMessage, "%s\n\nUtilización: regsvr32 [/u] [/s] [/c] [/n] [/i[:cmdline]] dllname\n\ diff --git a/base/system/regsvr32/lang/fr-FR.rc b/base/system/regsvr32/lang/fr-FR.rc index 6d97ca7b103..4aabfa88206 100644 --- a/base/system/regsvr32/lang/fr-FR.rc +++ b/base/system/regsvr32/lang/fr-FR.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_UsageMessage, "%s\n\nUtilisation : regsvr32 [/u] [/s] [/c] [/n] [/i[:lignedecommande]] nomDLL\n\ diff --git a/base/system/regsvr32/lang/hu-HU.rc b/base/system/regsvr32/lang/hu-HU.rc index 9f5e38f5e2f..b27f3b1de6a 100644 --- a/base/system/regsvr32/lang/hu-HU.rc +++ b/base/system/regsvr32/lang/hu-HU.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_UsageMessage, "%s\n\nHasználat: regsvr32 [/u] [/s] [/c] [/n] [/i[:parancssor]] dll_neve\n\ diff --git a/base/system/regsvr32/lang/id-ID.rc b/base/system/regsvr32/lang/id-ID.rc index 3bc48c144ee..649310969a3 100644 --- a/base/system/regsvr32/lang/id-ID.rc +++ b/base/system/regsvr32/lang/id-ID.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_UsageMessage, "%s\n\nPemakaian: regsvr32 [/u] [/s] [/c] [/n] [/i[:cmdline]] dllname\n\ diff --git a/base/system/regsvr32/lang/it-IT.rc b/base/system/regsvr32/lang/it-IT.rc index da212266aa6..627846c2b76 100644 --- a/base/system/regsvr32/lang/it-IT.rc +++ b/base/system/regsvr32/lang/it-IT.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_UsageMessage, "%s\n\nUso: regsvr32 [/u] [/s] [/c] [/n] [/i[:cmdline]] nomedll\n\ diff --git a/base/system/regsvr32/lang/ja-JP.rc b/base/system/regsvr32/lang/ja-JP.rc index 3ee41f26d1e..5875346b64a 100644 --- a/base/system/regsvr32/lang/ja-JP.rc +++ b/base/system/regsvr32/lang/ja-JP.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_UsageMessage, "%s\n\n使用法: regsvr32 [/u] [/s] [/c] [/n] [/i[:コマンド ライン]] DLL名\n\ diff --git a/base/system/regsvr32/lang/lt-LT.rc b/base/system/regsvr32/lang/lt-LT.rc index 65017c4a3c1..be8cc43c48a 100644 --- a/base/system/regsvr32/lang/lt-LT.rc +++ b/base/system/regsvr32/lang/lt-LT.rc @@ -1,7 +1,7 @@ /* Translation by Vytis 'CMan' Girdžijauskas cman@cman.us */ LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_UsageMessage, "%s\n\nNaudojimas: regsvr32 [/u] [/s] [/c] [/n] [/i[:parametras]] dll_bylos_vardas\n\ diff --git a/base/system/regsvr32/lang/nl-NL.rc b/base/system/regsvr32/lang/nl-NL.rc index 893ed13ea18..8d8e5cbdd24 100644 --- a/base/system/regsvr32/lang/nl-NL.rc +++ b/base/system/regsvr32/lang/nl-NL.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_UsageMessage, "%s\n\nSyntaxis: regsvr32 [/u] [/s] [/c] [/n] [/i[:cmdline]] DLL-naam\n\ diff --git a/base/system/regsvr32/lang/no-NO.rc b/base/system/regsvr32/lang/no-NO.rc index 7a7b8074b11..e8ffef40682 100644 --- a/base/system/regsvr32/lang/no-NO.rc +++ b/base/system/regsvr32/lang/no-NO.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_UsageMessage, "%s\n\nUsage: regsvr32 [/u] [/s] [/c] [/n] [/i[:cmdlinje]] dllnavn\n\ diff --git a/base/system/regsvr32/lang/pl-PL.rc b/base/system/regsvr32/lang/pl-PL.rc index 50a734739a8..b9a0e890758 100644 --- a/base/system/regsvr32/lang/pl-PL.rc +++ b/base/system/regsvr32/lang/pl-PL.rc @@ -6,7 +6,7 @@ */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_UsageMessage, "%s\n\ diff --git a/base/system/regsvr32/lang/pt-BR.rc b/base/system/regsvr32/lang/pt-BR.rc index 49454e4f9fc..b00f3d5c5da 100644 --- a/base/system/regsvr32/lang/pt-BR.rc +++ b/base/system/regsvr32/lang/pt-BR.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_UsageMessage, "%s\n\nUso: regsvr32 [/u] [/s] [/c] [/n] [/i[:cmdline]] dllname\n\ diff --git a/base/system/regsvr32/lang/ro-RO.rc b/base/system/regsvr32/lang/ro-RO.rc index 45b4326fbe8..5455d292abd 100644 --- a/base/system/regsvr32/lang/ro-RO.rc +++ b/base/system/regsvr32/lang/ro-RO.rc @@ -7,7 +7,7 @@ */ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_UsageMessage, "%s\n\nUtilizare: regsvr32 [/u] [/s] [/c] [/n] [/i[:argumente]] nume_fișier_dll \n\ diff --git a/base/system/regsvr32/lang/ru-RU.rc b/base/system/regsvr32/lang/ru-RU.rc index bb1df12275e..543221e2fa0 100644 --- a/base/system/regsvr32/lang/ru-RU.rc +++ b/base/system/regsvr32/lang/ru-RU.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_UsageMessage, "%s\n\nИспользование: regsvr32 [/u] [/s] [/c] [/n] [/i[:параметр]] имя_dll\n\ diff --git a/base/system/regsvr32/lang/uk-UA.rc b/base/system/regsvr32/lang/uk-UA.rc index 055f5629cf3..e1418e003a7 100644 --- a/base/system/regsvr32/lang/uk-UA.rc +++ b/base/system/regsvr32/lang/uk-UA.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_UsageMessage, "%s\n\nВикористання: regsvr32 [/u] [/s] [/c] [/n] [/i[:параметри]] назва_dll\n\ diff --git a/base/system/regsvr32/lang/zh-CN.rc b/base/system/regsvr32/lang/zh-CN.rc index 238d0791521..6e1e77edb04 100644 --- a/base/system/regsvr32/lang/zh-CN.rc +++ b/base/system/regsvr32/lang/zh-CN.rc @@ -4,7 +4,7 @@ */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_UsageMessage, "%s\n\n用法:regsvr32 [/u] [/s] [/c] [/n] [/i[:命令行]] DLL名称\n\ diff --git a/base/system/rundll32/lang/bg-BG.rc b/base/system/rundll32/lang/bg-BG.rc index 168fbe7bb69..84b80172cec 100644 --- a/base/system/rundll32/lang/bg-BG.rc +++ b/base/system/rundll32/lang/bg-BG.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "Неуспешно зареждане на библиотека '%s'" IDS_MissingEntry, "Липсваща входна точка:%s\nв %s" diff --git a/base/system/rundll32/lang/cs-CZ.rc b/base/system/rundll32/lang/cs-CZ.rc index fc21b2d31f7..20c5ddf1743 100644 --- a/base/system/rundll32/lang/cs-CZ.rc +++ b/base/system/rundll32/lang/cs-CZ.rc @@ -4,7 +4,7 @@ */ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "LoadLibrary se nepodařilo načíst '%s'" IDS_MissingEntry, "Chybí vstupní bod:%s\nV %s" diff --git a/base/system/rundll32/lang/de-DE.rc b/base/system/rundll32/lang/de-DE.rc index 0475246cdae..fdf681047cc 100644 --- a/base/system/rundll32/lang/de-DE.rc +++ b/base/system/rundll32/lang/de-DE.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "LoadLibrary laden von '%s' fehlgeschlagen" IDS_MissingEntry, "Fehlender Eintrag:%s\nIn %s" diff --git a/base/system/rundll32/lang/el-GR.rc b/base/system/rundll32/lang/el-GR.rc index facb8bd714f..d1e291ad69b 100644 --- a/base/system/rundll32/lang/el-GR.rc +++ b/base/system/rundll32/lang/el-GR.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "LoadLibrary δεν κατάφερε να φορτώσει '%s'" IDS_MissingEntry, "Λείπει το σημείο εκκίνησης:%s\nIn %s" diff --git a/base/system/rundll32/lang/en-US.rc b/base/system/rundll32/lang/en-US.rc index 0853fa2c1bd..23a54d62dc7 100644 --- a/base/system/rundll32/lang/en-US.rc +++ b/base/system/rundll32/lang/en-US.rc @@ -4,7 +4,7 @@ */ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "LoadLibrary failed to load '%s'" IDS_MissingEntry, "Missing entry point:%s\nIn %s" diff --git a/base/system/rundll32/lang/es-ES.rc b/base/system/rundll32/lang/es-ES.rc index 6192ba38e4c..6ba97bf4667 100644 --- a/base/system/rundll32/lang/es-ES.rc +++ b/base/system/rundll32/lang/es-ES.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "El cargador de Librerias falló al cargar '%s'" IDS_MissingEntry, "Punto de entrada perdido:%s\nIn %s" diff --git a/base/system/rundll32/lang/fr-FR.rc b/base/system/rundll32/lang/fr-FR.rc index dde8fe1c078..0ea9eec3223 100644 --- a/base/system/rundll32/lang/fr-FR.rc +++ b/base/system/rundll32/lang/fr-FR.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "LoadLibrary a échoué lors du chargement de '%s'" IDS_MissingEntry, "Point d'entrée manquant:%s\ndans %s" diff --git a/base/system/rundll32/lang/he-IL.rc b/base/system/rundll32/lang/he-IL.rc index 0aba4c581bb..611bb5c5e27 100644 --- a/base/system/rundll32/lang/he-IL.rc +++ b/base/system/rundll32/lang/he-IL.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "טעינת ספרייה '%s' נכשלה" IDS_MissingEntry, "חסרה נקודת כניסה:%s\nב %s" diff --git a/base/system/rundll32/lang/hu-HU.rc b/base/system/rundll32/lang/hu-HU.rc index f6bdcd0d285..3fce2c96a10 100644 --- a/base/system/rundll32/lang/hu-HU.rc +++ b/base/system/rundll32/lang/hu-HU.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "A(z) '%s' állományt, vagy valamelyik összetevõjét nem sikerült megnyitni" IDS_MissingEntry, "Hiányzó bejegyzés: %s\nIn A Következõ állomány nem tölthetõ be: %s" diff --git a/base/system/rundll32/lang/id-ID.rc b/base/system/rundll32/lang/id-ID.rc index cb5d942e13e..e6c99af271b 100644 --- a/base/system/rundll32/lang/id-ID.rc +++ b/base/system/rundll32/lang/id-ID.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "LoadLibrary gagal untuk mengambil '%s'" IDS_MissingEntry, "entry point hilang:%s\nDalam %s" diff --git a/base/system/rundll32/lang/it-IT.rc b/base/system/rundll32/lang/it-IT.rc index e59798180cc..3b878d62faa 100644 --- a/base/system/rundll32/lang/it-IT.rc +++ b/base/system/rundll32/lang/it-IT.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "LoadLibrary fallita '%s'" IDS_MissingEntry, "Manca:%s\nIn %s" diff --git a/base/system/rundll32/lang/ja-JP.rc b/base/system/rundll32/lang/ja-JP.rc index c7f2fd0f41e..f0ca21b8551 100644 --- a/base/system/rundll32/lang/ja-JP.rc +++ b/base/system/rundll32/lang/ja-JP.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "LoadLibrary は '%s' の読み込みに失敗しました。" IDS_MissingEntry, "エントリ ポイントがありません:%s\n( %s 中)" diff --git a/base/system/rundll32/lang/lt-LT.rc b/base/system/rundll32/lang/lt-LT.rc index f6289be3479..5625cb467c8 100644 --- a/base/system/rundll32/lang/lt-LT.rc +++ b/base/system/rundll32/lang/lt-LT.rc @@ -1,7 +1,7 @@ /* Translation by Vytis 'CMan' Girdžijauskas cman@cman.us */ LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "LoadLibrary nepavyko paleisti '%s'" IDS_MissingEntry, "Trūksta įėjimo taško:%s\nIn %s" diff --git a/base/system/rundll32/lang/nl-NL.rc b/base/system/rundll32/lang/nl-NL.rc index fdc0998dd4b..bb09284d8c0 100644 --- a/base/system/rundll32/lang/nl-NL.rc +++ b/base/system/rundll32/lang/nl-NL.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "LoadLibrary kon '%s' niet laden" IDS_MissingEntry, "Entry point:%s\n niet gevonden In %s" diff --git a/base/system/rundll32/lang/no-NO.rc b/base/system/rundll32/lang/no-NO.rc index 000e5dac95e..398d60bf913 100644 --- a/base/system/rundll32/lang/no-NO.rc +++ b/base/system/rundll32/lang/no-NO.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "LoadLibrary mislykket å laste '%s'" IDS_MissingEntry, "Mistet oppføring moment:%s\nIn %s" diff --git a/base/system/rundll32/lang/pl-PL.rc b/base/system/rundll32/lang/pl-PL.rc index 01c582ce53e..6c0e9da1c07 100644 --- a/base/system/rundll32/lang/pl-PL.rc +++ b/base/system/rundll32/lang/pl-PL.rc @@ -6,7 +6,7 @@ */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "Funkcja LoadLibrary nie mogła załadować '%s'" IDS_MissingEntry, "Brakujący punkt wejścia:%s\nW %s" diff --git a/base/system/rundll32/lang/pt-BR.rc b/base/system/rundll32/lang/pt-BR.rc index dcb8883c05e..f857cef8953 100644 --- a/base/system/rundll32/lang/pt-BR.rc +++ b/base/system/rundll32/lang/pt-BR.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "Erro ao carregar '%s'" IDS_MissingEntry, "Está faltando a entrada:%s\nem %s" diff --git a/base/system/rundll32/lang/ro-RO.rc b/base/system/rundll32/lang/ro-RO.rc index f022b03d506..6293e7aad24 100644 --- a/base/system/rundll32/lang/ro-RO.rc +++ b/base/system/rundll32/lang/ro-RO.rc @@ -6,7 +6,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "LoadLibrary nu a putut încărca „%s”" IDS_MissingEntry, "Lipsă punct de intrare: %s\nîn %s" diff --git a/base/system/rundll32/lang/ru-RU.rc b/base/system/rundll32/lang/ru-RU.rc index 5f749a6a4ca..6aea1c19844 100644 --- a/base/system/rundll32/lang/ru-RU.rc +++ b/base/system/rundll32/lang/ru-RU.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "Невозможно загрузить библиотеку '%s'" IDS_MissingEntry, "Невозможно найти точку входа: %s\nв библиотеке %s" diff --git a/base/system/rundll32/lang/sk-SK.rc b/base/system/rundll32/lang/sk-SK.rc index 8b28924e287..0a2564661a5 100644 --- a/base/system/rundll32/lang/sk-SK.rc +++ b/base/system/rundll32/lang/sk-SK.rc @@ -4,7 +4,7 @@ */ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "LoadLibrary sa nepodarilo načítať '%s'" IDS_MissingEntry, "Chybný vstupný bod:%s\nv %s" diff --git a/base/system/rundll32/lang/th-TH.rc b/base/system/rundll32/lang/th-TH.rc index 3ffd81882d8..6112116650f 100644 --- a/base/system/rundll32/lang/th-TH.rc +++ b/base/system/rundll32/lang/th-TH.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_THAI, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "การบรรจุค่าระบบเกิดผิดพลาด '%s'" IDS_MissingEntry, "การเข้าหาตำแหน่งผิดพลาด: %s\n%s" diff --git a/base/system/rundll32/lang/tr-TR.rc b/base/system/rundll32/lang/tr-TR.rc new file mode 100644 index 00000000000..79e5f2dd5ba --- /dev/null +++ b/base/system/rundll32/lang/tr-TR.rc @@ -0,0 +1,10 @@ +/* + * TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) (erdemersoy@live.com) + */ + +LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT +STRINGTABLE +BEGIN + IDS_DllNotLoaded, """%s"" kitaplığı yüklenemedi." + IDS_MissingEntry, "%s giriş noktası %s içinde bulunamadı." +END diff --git a/base/system/rundll32/lang/uk-UA.rc b/base/system/rundll32/lang/uk-UA.rc index 308b39b3489..eb6816ac89e 100644 --- a/base/system/rundll32/lang/uk-UA.rc +++ b/base/system/rundll32/lang/uk-UA.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "LoadLibrary не вдалося завантажити '%s'" IDS_MissingEntry, "Неможливо знайти точку входу:%s\nВ бібліотеці %s" diff --git a/base/system/rundll32/lang/zh-CN.rc b/base/system/rundll32/lang/zh-CN.rc index f4089d544c2..d247b9680d7 100644 --- a/base/system/rundll32/lang/zh-CN.rc +++ b/base/system/rundll32/lang/zh-CN.rc @@ -4,7 +4,7 @@ */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DllNotLoaded, "LoadLibrary 无法加载 '%s'" IDS_MissingEntry, "缺少入口点:%s\n在 %s 中" diff --git a/base/system/rundll32/rsrc.rc b/base/system/rundll32/rsrc.rc index db893c9c35a..98c606c9803 100644 --- a/base/system/rundll32/rsrc.rc +++ b/base/system/rundll32/rsrc.rc @@ -62,6 +62,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #ifdef LANGUAGE_TH_TH #include "lang/th-TH.rc" #endif +#ifdef LANGUAGE_TR_TR + #include "lang/tr-TR.rc" +#endif #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" #endif diff --git a/base/system/runonce/lang/de-DE.rc b/base/system/runonce/lang/de-DE.rc index 44df265a81d..f6e4d16f39d 100644 --- a/base/system/runonce/lang/de-DE.rc +++ b/base/system/runonce/lang/de-DE.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -IDD_RUNONCE_DLG DIALOG DISCARDABLE 0, 0, 239, 170 +IDD_RUNONCE_DLG DIALOG 0, 0, 239, 170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS-Setup" FONT 8, "MS Shell Dlg" diff --git a/base/system/runonce/lang/en-US.rc b/base/system/runonce/lang/en-US.rc index e5976c4cbc4..dcc6823122a 100644 --- a/base/system/runonce/lang/en-US.rc +++ b/base/system/runonce/lang/en-US.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -IDD_RUNONCE_DLG DIALOG DISCARDABLE 0, 0, 239, 170 +IDD_RUNONCE_DLG DIALOG 0, 0, 239, 170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" diff --git a/base/system/runonce/lang/es-ES.rc b/base/system/runonce/lang/es-ES.rc index 373c88921e6..adb7ff6acbd 100644 --- a/base/system/runonce/lang/es-ES.rc +++ b/base/system/runonce/lang/es-ES.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -IDD_RUNONCE_DLG DIALOG DISCARDABLE 0, 0, 239, 170 +IDD_RUNONCE_DLG DIALOG 0, 0, 239, 170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalación de ReactOS" FONT 8, "MS Shell Dlg" diff --git a/base/system/runonce/lang/fr-FR.rc b/base/system/runonce/lang/fr-FR.rc index c9eb3aa23d0..26e0cb01e26 100644 --- a/base/system/runonce/lang/fr-FR.rc +++ b/base/system/runonce/lang/fr-FR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -IDD_RUNONCE_DLG DIALOG DISCARDABLE 0, 0, 239, 170 +IDD_RUNONCE_DLG DIALOG 0, 0, 239, 170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Installation de ReactOS" FONT 8, "MS Shell Dlg" diff --git a/base/system/runonce/lang/he-IL.rc b/base/system/runonce/lang/he-IL.rc index e119fc0863c..8253a43ba7a 100644 --- a/base/system/runonce/lang/he-IL.rc +++ b/base/system/runonce/lang/he-IL.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT -IDD_RUNONCE_DLG DIALOG DISCARDABLE 0, 0, 239, 170 +IDD_RUNONCE_DLG DIALOG 0, 0, 239, 170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "התקנת ReactOS" FONT 8, "MS Shell Dlg" diff --git a/base/system/runonce/lang/ja-JP.rc b/base/system/runonce/lang/ja-JP.rc index bc1168651c7..b95d4083554 100644 --- a/base/system/runonce/lang/ja-JP.rc +++ b/base/system/runonce/lang/ja-JP.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -IDD_RUNONCE_DLG DIALOG DISCARDABLE 0, 0, 239, 170 +IDD_RUNONCE_DLG DIALOG 0, 0, 239, 170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS セットアップ" FONT 9, "MS UI Gothic" diff --git a/base/system/runonce/lang/pl-PL.rc b/base/system/runonce/lang/pl-PL.rc index 61e31eadead..c608b6017c5 100644 --- a/base/system/runonce/lang/pl-PL.rc +++ b/base/system/runonce/lang/pl-PL.rc @@ -9,7 +9,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -IDD_RUNONCE_DLG DIALOG DISCARDABLE 0, 0, 239, 170 +IDD_RUNONCE_DLG DIALOG 0, 0, 239, 170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Program konfiguracyjny ReactOS" FONT 8, "MS Shell Dlg" diff --git a/base/system/runonce/lang/pt-BR.rc b/base/system/runonce/lang/pt-BR.rc index 5d832c06748..99f8af72d4a 100644 --- a/base/system/runonce/lang/pt-BR.rc +++ b/base/system/runonce/lang/pt-BR.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL -IDD_RUNONCE_DLG DIALOG DISCARDABLE 0, 0, 239, 170 +IDD_RUNONCE_DLG DIALOG 0, 0, 239, 170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalação do ReactOS" FONT 8, "MS Shell Dlg" diff --git a/base/system/runonce/lang/ro-RO.rc b/base/system/runonce/lang/ro-RO.rc index 2fc2ec2564f..51b86f5d0bf 100644 --- a/base/system/runonce/lang/ro-RO.rc +++ b/base/system/runonce/lang/ro-RO.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -IDD_RUNONCE_DLG DIALOG DISCARDABLE 0, 0, 239, 170 +IDD_RUNONCE_DLG DIALOG 0, 0, 239, 170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Instalatorul ReactOS" FONT 8, "MS Shell Dlg" diff --git a/base/system/runonce/lang/ru-RU.rc b/base/system/runonce/lang/ru-RU.rc index 1ff0637bef4..0b1bc6f1043 100644 --- a/base/system/runonce/lang/ru-RU.rc +++ b/base/system/runonce/lang/ru-RU.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -IDD_RUNONCE_DLG DIALOG DISCARDABLE 0, 0, 239, 170 +IDD_RUNONCE_DLG DIALOG 0, 0, 239, 170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Установка ReactOS" FONT 8, "MS Shell Dlg" diff --git a/base/system/runonce/lang/sk-SK.rc b/base/system/runonce/lang/sk-SK.rc index 3d53343e431..bc2782a94b6 100644 --- a/base/system/runonce/lang/sk-SK.rc +++ b/base/system/runonce/lang/sk-SK.rc @@ -5,7 +5,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -IDD_RUNONCE_DLG DIALOG DISCARDABLE 0, 0, 239, 170 +IDD_RUNONCE_DLG DIALOG 0, 0, 239, 170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Inštalácia systému ReactOS" FONT 8, "MS Shell Dlg" diff --git a/base/system/runonce/lang/tr-TR.rc b/base/system/runonce/lang/tr-TR.rc new file mode 100644 index 00000000000..bed7ecd61a9 --- /dev/null +++ b/base/system/runonce/lang/tr-TR.rc @@ -0,0 +1,15 @@ +/* + * TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) (erdemersoy@live.com) + */ + +LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT + +IDD_RUNONCE_DLG DIALOG 0, 0, 239, 170 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "ReactOS Kur" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "ReactOS, şimdi aşağıdaki ayarlamaları yapıyor:", -1, 38, 8, 196, 18 + LISTBOX IDC_COMP_LIST, 36, 32, 197, 131, LBS_OWNERDRAWVARIABLE | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + ICON IDI_ICON, -1, 5, 6, 21, 20 +END diff --git a/base/system/runonce/lang/uk-UA.rc b/base/system/runonce/lang/uk-UA.rc index 18108958a3a..9dc6b911c21 100644 --- a/base/system/runonce/lang/uk-UA.rc +++ b/base/system/runonce/lang/uk-UA.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -IDD_RUNONCE_DLG DIALOG DISCARDABLE 0, 0, 239, 170 +IDD_RUNONCE_DLG DIALOG 0, 0, 239, 170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Встановлення ReactOS" FONT 8, "MS Shell Dlg" diff --git a/base/system/runonce/lang/zh-CN.rc b/base/system/runonce/lang/zh-CN.rc index 97e5d6faf1a..170085d4030 100644 --- a/base/system/runonce/lang/zh-CN.rc +++ b/base/system/runonce/lang/zh-CN.rc @@ -5,7 +5,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -IDD_RUNONCE_DLG DIALOG DISCARDABLE 0, 0, 239, 170 +IDD_RUNONCE_DLG DIALOG 0, 0, 239, 170 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "ReactOS 安装" FONT 8, "MS Shell Dlg" diff --git a/base/system/runonce/rsrc.rc b/base/system/runonce/rsrc.rc index fbd57de54a6..4d64f1ba189 100644 --- a/base/system/runonce/rsrc.rc +++ b/base/system/runonce/rsrc.rc @@ -33,6 +33,9 @@ #ifdef LANGUAGE_SK_SK #include "lang/sk-SK.rc" #endif +#ifdef LANGUAGE_TR_TR + #include "lang/tr-TR.rc" +#endif #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" #endif diff --git a/base/system/runonce/runonce.rc b/base/system/runonce/runonce.rc index 6e27ac49158..42171fabdc6 100644 --- a/base/system/runonce/runonce.rc +++ b/base/system/runonce/runonce.rc @@ -10,6 +10,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -IDI_ICON ICON DISCARDABLE "res/icon.ico" +IDI_ICON ICON "res/icon.ico" #include "rsrc.rc" diff --git a/base/system/smss/pagefile.c b/base/system/smss/pagefile.c index c94707287ea..44f8d54408c 100644 --- a/base/system/smss/pagefile.c +++ b/base/system/smss/pagefile.c @@ -94,7 +94,7 @@ SmpCreatePagingFileDescriptor(IN PUNICODE_STRING PageFileToken) /* Make sure we don't have too many */ if (SmpNumberOfPagingFiles >= 16) { - DPRINT1("SMSS:PFILE: Too many paging files specified - %d\n", + DPRINT1("SMSS:PFILE: Too many paging files specified - %lu\n", SmpNumberOfPagingFiles); return STATUS_TOO_MANY_PAGING_FILES; } @@ -160,10 +160,10 @@ SmpCreatePagingFileDescriptor(IN PUNICODE_STRING PageFileToken) { /* Use the rest of the arguments as a maximum size */ SecondArgument.Buffer = &Arguments.Buffer[i]; - SecondArgument.Length = Arguments.Length - - i * sizeof(WCHAR); - SecondArgument.MaximumLength = Arguments.MaximumLength - - i * sizeof(WCHAR); + SecondArgument.Length = (USHORT)(Arguments.Length - + i * sizeof(WCHAR)); + SecondArgument.MaximumLength = (USHORT)(Arguments.MaximumLength - + i * sizeof(WCHAR)); Status = RtlUnicodeStringToInteger(&SecondArgument, 0, &MaxSize); if (!NT_SUCCESS(Status)) { diff --git a/base/system/smss/sminit.c b/base/system/smss/sminit.c index 1f28e5ff93e..4625013a1e0 100644 --- a/base/system/smss/sminit.c +++ b/base/system/smss/sminit.c @@ -236,7 +236,7 @@ SmpConfigureProtectionMode(IN PWSTR ValueName, /* Recreate the security descriptors to take into account security mode */ SmpCreateSecurityDescriptors(FALSE); - DPRINT("SmpProtectionMode: %d\n", SmpProtectionMode); + DPRINT("SmpProtectionMode: %lu\n", SmpProtectionMode); return STATUS_SUCCESS; } @@ -261,7 +261,7 @@ SmpConfigureAllowProtectedRenames(IN PWSTR ValueName, SmpAllowProtectedRenames = 0; } - DPRINT("SmpAllowProtectedRenames: %d\n", SmpAllowProtectedRenames); + DPRINT("SmpAllowProtectedRenames: %lu\n", SmpAllowProtectedRenames); return STATUS_SUCCESS; } @@ -1394,8 +1394,8 @@ SmpInitializeKnownDllsInternal(IN PUNICODE_STRING Directory, NTSTATUS Status, Status1; PLIST_ENTRY NextEntry; PSMP_REGISTRY_VALUE RegEntry; - //ULONG_PTR ErrorParameters[3]; - //UNICODE_STRING ErrorResponse; + ULONG_PTR ErrorParameters[3]; + UNICODE_STRING ErrorResponse; IO_STATUS_BLOCK IoStatusBlock; SECURITY_DESCRIPTOR_CONTROL OldFlag = 0; USHORT ImageCharacteristics; @@ -1525,7 +1525,6 @@ SmpInitializeKnownDllsInternal(IN PUNICODE_STRING Directory, SmpProcessModuleImports, RegEntry, &ImageCharacteristics); -#if 0 if (!NT_SUCCESS(Status)) { /* Checksum failed, so don't even try going further -- kill SMSS */ @@ -1547,7 +1546,6 @@ SmpInitializeKnownDllsInternal(IN PUNICODE_STRING Directory, ErrorParameters[2] = (ULONG)&RegEntry->Value; SmpTerminate(ErrorParameters, 5, RTL_NUMBER_OF(ErrorParameters)); } -#endif /* Temporarily hack the SD to use a default DACL for this section */ if (SmpLiberalSecurityDescriptor) @@ -1819,13 +1817,13 @@ SmpCreateDynamicEnvironmentVariables(VOID) { /* To combine it into a single string */ swprintf((PWCHAR)PartialInfo->Data + wcslen((PWCHAR)PartialInfo->Data), - L", %ws", + L", %S", PartialInfo2->Data); } /* So that we can set this as the PROCESSOR_IDENTIFIER variable */ RtlInitUnicodeString(&ValueName, L"PROCESSOR_IDENTIFIER"); - DPRINT("Setting %wZ to %S\n", &ValueName, PartialInfo->Data); + DPRINT("Setting %wZ to %s\n", &ValueName, PartialInfo->Data); Status = NtSetValueKey(KeyHandle, &ValueName, 0, @@ -1884,7 +1882,7 @@ SmpCreateDynamicEnvironmentVariables(VOID) /* And finally, write the number of CPUs */ RtlInitUnicodeString(&ValueName, L"NUMBER_OF_PROCESSORS"); - swprintf(ValueBuffer, L"%u", BasicInfo.NumberOfProcessors); + swprintf(ValueBuffer, L"%d", BasicInfo.NumberOfProcessors); DPRINT("Setting %wZ to %S\n", &ValueName, ValueBuffer); Status = NtSetValueKey(KeyHandle, &ValueName, @@ -2431,7 +2429,7 @@ SmpInit(IN PUNICODE_STRING InitialCommand, RtlInitUnicodeString(&Os2Name, L"OS2"); /* Create the SM API Port */ - RtlInitUnicodeString(&PortName, L"\\SmApiPort2"); + RtlInitUnicodeString(&PortName, L"\\SmApiPort"); InitializeObjectAttributes(&ObjectAttributes, &PortName, 0, NULL, NULL); Status = NtCreatePort(&PortHandle, &ObjectAttributes, diff --git a/base/system/smss/smsessn.c b/base/system/smss/smsessn.c index 805f99c9857..2422d599b8f 100644 --- a/base/system/smss/smsessn.c +++ b/base/system/smss/smsessn.c @@ -184,7 +184,7 @@ SmpGetProcessMuSessionId(IN HANDLE ProcessHandle, else { /* Failure -- assume session zero */ - DPRINT1("SMSS: GetProcessMuSessionId, Process=%x, Status=%x\n", + DPRINT1("SMSS: GetProcessMuSessionId, Process=%p, Status=%x\n", ProcessHandle, Status); *SessionId = 0; } @@ -207,7 +207,7 @@ SmpSetProcessMuSessionId(IN HANDLE ProcessHandle, sizeof(SessionId)); if (!NT_SUCCESS(Status)) { - DPRINT1("SMSS: SetProcessMuSessionId, Process=%x, Status=%x\n", + DPRINT1("SMSS: SetProcessMuSessionId, Process=%p, Status=%x\n", ProcessHandle, Status); } diff --git a/base/system/smss/smss.c b/base/system/smss/smss.c index 9f6b4bda9bc..aa46164bcdc 100644 --- a/base/system/smss/smss.c +++ b/base/system/smss/smss.c @@ -174,7 +174,7 @@ SmpInvokeAutoChk(IN PUNICODE_STRING FileName, { /* It wasn't, so create an error message to print on the screen */ sprintf_nt(MessageBuffer, - "%wZ program not found - skipping AUTOCHECK\n", + "%wZ program not found - skipping AUTOCHECK\r\n", FileName); RtlInitAnsiString(&MessageString, MessageBuffer); if (NT_SUCCESS(RtlAnsiStringToUnicodeString(&Destination, @@ -420,7 +420,7 @@ SmpUnhandledExceptionFilter(IN PEXCEPTION_POINTERS ExceptionInfo) UNICODE_STRING DestinationString; /* Print and breakpoint into the debugger */ - DbgPrint("SMSS: Unhandled exception - Status == %x IP == %x\n", + DbgPrint("SMSS: Unhandled exception - Status == %x IP == %p\n", ExceptionInfo->ExceptionRecord->ExceptionCode, ExceptionInfo->ExceptionRecord->ExceptionAddress); DbgPrint(" Memory Address: %x Read/Write: %x\n", diff --git a/base/system/smss/smsubsys.c b/base/system/smss/smsubsys.c index e18435e4e46..b15bddee379 100644 --- a/base/system/smss/smsubsys.c +++ b/base/system/smss/smsubsys.c @@ -330,7 +330,7 @@ SmpLoadSubSystem(IN PUNICODE_STRING FileName, { /* Odd failure -- but handle it anyway */ Status = STATUS_NO_SUCH_PACKAGE; - DPRINT1("SMSS: SmpLoadSubSystem - SmpLocateKnownSubSysByType Failed with Status %lx for sessionid %ld\n", + DPRINT1("SMSS: SmpLoadSubSystem - SmpLocateKnownSubSysByType Failed with Status %lx for sessionid %lu\n", Status, MuSessionId); goto Quickie; @@ -347,7 +347,7 @@ SmpLoadSubSystem(IN PUNICODE_STRING FileName, if (!NT_SUCCESS(Status)) { /* Fail since this is critical */ - DPRINT1("SMSS: SmpLoadSubSystem - NtDuplicateObject Failed with Status %lx for sessionid %ld\n", + DPRINT1("SMSS: SmpLoadSubSystem - NtDuplicateObject Failed with Status %lx for sessionid %lu\n", Status, MuSessionId); goto Quickie; @@ -364,7 +364,7 @@ SmpLoadSubSystem(IN PUNICODE_STRING FileName, if (!NT_SUCCESS(Status)) { /* Fail since this is critical */ - DPRINT1("SMSS: SmpLoadSubSystem - NtDuplicateObject Failed with Status %lx for sessionid %ld\n", + DPRINT1("SMSS: SmpLoadSubSystem - NtDuplicateObject Failed with Status %lx for sessionid %lu\n", Status, MuSessionId); goto Quickie; @@ -387,7 +387,7 @@ SmpLoadSubSystem(IN PUNICODE_STRING FileName, { /* Delete the session and handle failure if the LPC call failed */ SmpDeleteSession(CreateSession->SessionId); - DPRINT1("SMSS: SmpLoadSubSystem - NtRequestWaitReplyPort Failed with Status %lx for sessionid %ld\n", + DPRINT1("SMSS: SmpLoadSubSystem - NtRequestWaitReplyPort Failed with Status %lx for sessionid %lu\n", Status, CreateSession->SessionId); goto Quickie; @@ -422,7 +422,7 @@ SmpLoadSubSystem(IN PUNICODE_STRING FileName, if (Status != STATUS_WAIT_0) { /* Something is wrong with the subsystem, so back out of everything */ - DPRINT1("SMSS: SmpLoadSubSystem - Timeout waiting for subsystem connect with Status %lx for sessionid %ld\n", + DPRINT1("SMSS: SmpLoadSubSystem - Timeout waiting for subsystem connect with Status %lx for sessionid %lu\n", Status, MuSessionId); goto Quickie; @@ -618,7 +618,7 @@ SmpLoadSubSystemsForMuSession(IN PULONG MuSessionId, } if (!NT_SUCCESS(Status)) { - DbgPrint("SMSS: Subsystem execute failed (%WZ)\n", &RegEntry->Value); + DbgPrint("SMSS: Subsystem execute failed (%wZ)\n", &RegEntry->Value); return Status; } diff --git a/base/system/smss/smutil.c b/base/system/smss/smutil.c index e50f2ff3f7a..4295be9ddf5 100644 --- a/base/system/smss/smutil.c +++ b/base/system/smss/smutil.c @@ -213,14 +213,14 @@ SmpParseToken(IN PUNICODE_STRING Input, if (!Token->Buffer) return STATUS_NO_MEMORY; /* Fill in the unicode string to hold it */ - Token->MaximumLength = TokenLength + sizeof(UNICODE_NULL); - Token->Length = TokenLength; + Token->MaximumLength = (USHORT)(TokenLength + sizeof(UNICODE_NULL)); + Token->Length = (USHORT)TokenLength; RtlCopyMemory(Token->Buffer, p, TokenLength); Token->Buffer[TokenLength / sizeof(WCHAR)] = UNICODE_NULL; } /* Modify the input string with the position of where the next token begins */ - Input->Length -= (ULONG_PTR)pp - (ULONG_PTR)Input->Buffer; + Input->Length -= (USHORT)((ULONG_PTR)pp - (ULONG_PTR)Input->Buffer); Input->Buffer = pp; return STATUS_SUCCESS; } @@ -256,7 +256,7 @@ SmpParseCommandLine(IN PUNICODE_STRING CommandLine, sizeof(L"\\system32;"); RtlInitEmptyUnicodeString(&FullPathString, RtlAllocateHeap(SmpHeap, SmBaseTag, Length), - Length); + (USHORT)Length); if (FullPathString.Buffer) { /* Append the root, system32;, and then the current library path */ @@ -308,7 +308,7 @@ SmpParseCommandLine(IN PUNICODE_STRING CommandLine, Length = PAGE_SIZE; RtlInitEmptyUnicodeString(&PathString, RtlAllocateHeap(SmpHeap, SmBaseTag, Length), - Length); + (USHORT)Length); if (!PathString.Buffer) { /* Fail if we have no memory for this */ @@ -329,7 +329,7 @@ SmpParseCommandLine(IN PUNICODE_STRING CommandLine, Length = PathString.Length + sizeof(UNICODE_NULL); RtlInitEmptyUnicodeString(&PathString, RtlAllocateHeap(SmpHeap, SmBaseTag, Length), - Length); + (USHORT)Length); if (!PathString.Buffer) { /* Fail if we have no memory for this */ diff --git a/base/system/subst/lang/bg-BG.rc b/base/system/subst/lang/bg-BG.rc index 63dfb0284c1..bdeafc07f91 100644 --- a/base/system/subst/lang/bg-BG.rc +++ b/base/system/subst/lang/bg-BG.rc @@ -11,8 +11,8 @@ BEGIN IDS_INCORRECT_PARAMETER_COUNT "Неправилен брой ключове - %s\n" IDS_INVALID_PARAMETER "Неправилен брой ключове - %s\n" IDS_INVALID_PARAMETER2 "Недопустим ключ - %s\n" - IDS_DRIVE_ALREAD_SUBSTED "Устройството вече е подложено на SUBST\n" - IDS_FAILED_WITH_ERROCODE "Грешка номер: 0x%x: %s\n" + IDS_DRIVE_ALREADY_SUBSTED "Устройството вече е подложено на SUBST\n" + IDS_FAILED_WITH_ERRORCODE "Грешка номер: 0x%x: %s\n" IDS_USAGE "Обвързва път с име на устройство (дял).\n\nSUBST [drive1: [drive2:]path]\nSUBST drive1: /D\n\n drive1: \ Указва мнимото устройство и пъта, с който искате да обвържете пътя.\n \ [drive2:]path Указва действително устройство и пътя, с който искате да обвържете\n \ diff --git a/base/system/subst/lang/en-US.rc b/base/system/subst/lang/en-US.rc index 74ee0c9e7b2..2fb1b26e8bc 100644 --- a/base/system/subst/lang/en-US.rc +++ b/base/system/subst/lang/en-US.rc @@ -5,8 +5,8 @@ BEGIN IDS_INCORRECT_PARAMETER_COUNT "Incorrect number of parameters - %s\n" IDS_INVALID_PARAMETER "Incorrect number of parameters - %s\n" IDS_INVALID_PARAMETER2 "Invalid parameter - %s\n" - IDS_DRIVE_ALREAD_SUBSTED "Drive already SUBSTed\n" - IDS_FAILED_WITH_ERROCODE "Failed with error code 0x%x: %s\n" + IDS_DRIVE_ALREADY_SUBSTED "Drive already SUBSTed\n" + IDS_FAILED_WITH_ERRORCODE "Failed with error code 0x%x: %s\n" IDS_USAGE "Associates a path with a drive letter.\n\n\ SUBST [drive1: [drive2:]path]\n\ SUBST drive1: /D\n\n\ diff --git a/base/system/subst/lang/es-ES.rc b/base/system/subst/lang/es-ES.rc index 75b7703866b..27875a7a37d 100644 --- a/base/system/subst/lang/es-ES.rc +++ b/base/system/subst/lang/es-ES.rc @@ -5,8 +5,8 @@ BEGIN IDS_INCORRECT_PARAMETER_COUNT "Cantidad de parámetros incorrecta - %s\n" IDS_INVALID_PARAMETER "Cantidad de parámetros incorrecta - %s\n" IDS_INVALID_PARAMETER2 "Parámetro incorrecto - %s\n" - IDS_DRIVE_ALREAD_SUBSTED "Unidad ya sustituida\n" - IDS_FAILED_WITH_ERROCODE "Falla con código de error 0x%x: %s\n" + IDS_DRIVE_ALREADY_SUBSTED "Unidad ya sustituida\n" + IDS_FAILED_WITH_ERRORCODE "Falla con código de error 0x%x: %s\n" IDS_USAGE "Asocia una ruta con una letra de unidad.\n\n\ SUBST [unidad1: [unidad2:]ruta]\n\ SUBST unidad1: /D\n\n\ diff --git a/base/system/subst/lang/fr-FR.rc b/base/system/subst/lang/fr-FR.rc index 28119e480a7..c0ab880aad6 100644 --- a/base/system/subst/lang/fr-FR.rc +++ b/base/system/subst/lang/fr-FR.rc @@ -5,11 +5,13 @@ BEGIN IDS_INCORRECT_PARAMETER_COUNT "Nombre incorrect de paramètres - %s\n" IDS_INVALID_PARAMETER "Nombre incorrect de paramètres - %s\n" IDS_INVALID_PARAMETER2 "Paramètre incorrect - %s\n" - IDS_DRIVE_ALREAD_SUBSTED "Disque déjà substitué\n" - IDS_FAILED_WITH_ERROCODE "Échoue avec le code d'erreur 0x%x: %s\n" - IDS_USAGE "Associe un chemin avec une lettre de lecteur.\n\nSUBST [disque1: [disque2:]chemin]\nSUBST dique1: /D\n\n disque1: \ - Spécifie un lecteur virtuel auquel vous voulez affecter un chemin.\n \ - [disque2:]chemin Spécifie un disque physique et le chemin que vous souhaitez attribuer à\n \ - un disque virtuel.\n /D \ - Supprime un disque (virtuel) substitué.\n\nTapez SUBST sans paramètres pour afficher la liste des lecteurs virtuels en cours.\n" + IDS_DRIVE_ALREADY_SUBSTED "Disque déjà substitué\n" + IDS_FAILED_WITH_ERRORCODE "Échoue avec le code d'erreur 0x%x: %s\n" + IDS_USAGE "Associe un chemin avec une lettre de lecteur.\n\n\ +SUBST [disque1: [disque2:]chemin]\n\ +SUBST dique1: /D\n\n\ +disque1: Lecteur virtuel auquel vous voulez affecter un chemin.\n\ +[disque2:]chemin Disque physique/chemin attribués à un disque virtuel.\n\ +/D Supprime un disque (virtuel) substitué.\n\n\ +Tapez SUBST sans paramètre pour afficher la liste des lecteurs virtuels.\n" END diff --git a/base/system/subst/lang/it-IT.rc b/base/system/subst/lang/it-IT.rc index a1863576479..a10dd0f1e46 100644 --- a/base/system/subst/lang/it-IT.rc +++ b/base/system/subst/lang/it-IT.rc @@ -5,8 +5,8 @@ BEGIN IDS_INCORRECT_PARAMETER_COUNT "Numero di parametri errato - %s\n" IDS_INVALID_PARAMETER "Numero di parametri errato - %s\n" IDS_INVALID_PARAMETER2 "Parametro errato - %s\n" - IDS_DRIVE_ALREAD_SUBSTED "Unità già sostituita\n" - IDS_FAILED_WITH_ERROCODE "Interruzione con codice di errore 0x%x: %s\n" + IDS_DRIVE_ALREADY_SUBSTED "Unità già sostituita\n" + IDS_FAILED_WITH_ERRORCODE "Interruzione con codice di errore 0x%x: %s\n" IDS_USAGE "Associa un percorso ad una lettera di unità.\n\n\ SUBST [unità1: [unità2:]percorso]\n\ SUBST unità1: /D\n\n\ diff --git a/base/system/subst/lang/pl-PL.rc b/base/system/subst/lang/pl-PL.rc index 651852390d7..8d1c336b458 100644 --- a/base/system/subst/lang/pl-PL.rc +++ b/base/system/subst/lang/pl-PL.rc @@ -13,8 +13,8 @@ BEGIN IDS_INCORRECT_PARAMETER_COUNT "Nieprawidłowa liczba parametrów - %s\n" IDS_INVALID_PARAMETER "Nieprawidłowy parametr - %s\n" IDS_INVALID_PARAMETER2 "Nieprawidłowe parametry - %s\n" - IDS_DRIVE_ALREAD_SUBSTED "Na tym dysku już użyto komendy SUBST\n" - IDS_FAILED_WITH_ERROCODE "Błąd 0x%x: %s\n" + IDS_DRIVE_ALREADY_SUBSTED "Na tym dysku już użyto komendy SUBST\n" + IDS_FAILED_WITH_ERRORCODE "Błąd 0x%x: %s\n" IDS_USAGE "Powiązuje ścieżkę z literą napędu.\n\n\ SUBST [napęd1: [napęd2:]ścieżka]\n\ SUBST napęd1: /D\n\n\ diff --git a/base/system/subst/lang/ro-RO.rc b/base/system/subst/lang/ro-RO.rc index ac529c914c2..57cfbc053a3 100644 --- a/base/system/subst/lang/ro-RO.rc +++ b/base/system/subst/lang/ro-RO.rc @@ -14,8 +14,8 @@ BEGIN IDS_INCORRECT_PARAMETER_COUNT "Număr eronat de parametri - %s\n" IDS_INVALID_PARAMETER "Număr eronat de parametri - %s\n" IDS_INVALID_PARAMETER2 "Parametru eronat - %s\n" - IDS_DRIVE_ALREAD_SUBSTED "Unitatea este deja SUBSTituită\n" - IDS_FAILED_WITH_ERROCODE "Operația a eșuat. Codul de eroare 0x%x: %s\n" + IDS_DRIVE_ALREADY_SUBSTED "Unitatea este deja SUBSTituită\n" + IDS_FAILED_WITH_ERRORCODE "Operația a eșuat. Codul de eroare 0x%x: %s\n" IDS_USAGE "Substituie un director cu o unitate de stocare.\n\n\ SUBST [unitate1: [unitate2:]cale]\n\ SUBST unitate1: /D\n\n\ diff --git a/base/system/subst/lang/uk-UA.rc b/base/system/subst/lang/uk-UA.rc index 09ffc5853ff..6ffdda97cb3 100644 --- a/base/system/subst/lang/uk-UA.rc +++ b/base/system/subst/lang/uk-UA.rc @@ -13,8 +13,8 @@ BEGIN IDS_INCORRECT_PARAMETER_COUNT "Невірна кількість параметрів - %s\n" IDS_INVALID_PARAMETER "Невірна кількість параметрів - %s\n" IDS_INVALID_PARAMETER2 "Невірний параметр - %s\n" - IDS_DRIVE_ALREAD_SUBSTED "До диску вже застосовано SUBST\n" - IDS_FAILED_WITH_ERROCODE "Невдача з кодом помилки 0x%x: %s\n" + IDS_DRIVE_ALREADY_SUBSTED "До диску вже застосовано SUBST\n" + IDS_FAILED_WITH_ERRORCODE "Невдача з кодом помилки 0x%x: %s\n" IDS_USAGE "Асоціює шлях з буквою диску.\n\n\ SUBST [диск1: [диск2:]шлях]\n\ SUBST диск1: /D\n\n\ diff --git a/base/system/subst/lang/zh-CN.rc b/base/system/subst/lang/zh-CN.rc index 86a38747b8a..08063f34d56 100644 --- a/base/system/subst/lang/zh-CN.rc +++ b/base/system/subst/lang/zh-CN.rc @@ -10,8 +10,8 @@ BEGIN IDS_INCORRECT_PARAMETER_COUNT "参数个数不正确 - %s\n" IDS_INVALID_PARAMETER "参数个数不正确 - %s\n" IDS_INVALID_PARAMETER2 "无效参数 - %s\n" - IDS_DRIVE_ALREAD_SUBSTED "驱动器已经运行过 SUBST\n" - IDS_FAILED_WITH_ERROCODE "操作失败!错误码 0x%x:%s\n" + IDS_DRIVE_ALREADY_SUBSTED "驱动器已经运行过 SUBST\n" + IDS_FAILED_WITH_ERRORCODE "操作失败!错误码 0x%x:%s\n" IDS_USAGE "将一个路径用驱动器号关联。\n\n\ SUBST [驱动器1: [驱动器2:]路径]\n\ SUBST 驱动器1: /D\n\n\ diff --git a/base/system/subst/resource.h b/base/system/subst/resource.h index a7558936fca..7fd8c4c071b 100644 --- a/base/system/subst/resource.h +++ b/base/system/subst/resource.h @@ -3,11 +3,11 @@ #define RC_STRING_MAX_SIZE 2048 /* Strings */ -#define IDS_FAILED_WITH_ERROCODE 1001 +#define IDS_FAILED_WITH_ERRORCODE 1001 #define IDS_USAGE 1002 #define IDS_INCORRECT_PARAMETER_COUNT 1003 #define IDS_INVALID_PARAMETER 1004 #define IDS_INVALID_PARAMETER2 1005 -#define IDS_DRIVE_ALREAD_SUBSTED 1006 +#define IDS_DRIVE_ALREADY_SUBSTED 1006 /* EOF */ diff --git a/base/system/subst/subst.c b/base/system/subst/subst.c index b9ddaff4e12..903d59b9ef0 100644 --- a/base/system/subst/subst.c +++ b/base/system/subst/subst.c @@ -39,7 +39,7 @@ void PrintError(DWORD ErrCode) 0, NULL); LoadString(GetModuleHandle(NULL), - IDS_FAILED_WITH_ERROCODE, + IDS_FAILED_WITH_ERRORCODE, szFmtString, sizeof(szFmtString) / sizeof(szFmtString[0])); _sntprintf(buffer, @@ -228,7 +228,7 @@ int AddSubst(TCHAR* Drive, TCHAR *Path) if (IsSubstedDrive(Drive)) { LoadString(GetModuleHandle(NULL), - IDS_DRIVE_ALREAD_SUBSTED, + IDS_DRIVE_ALREADY_SUBSTED, szFmtString, sizeof(szFmtString) / sizeof(szFmtString[0])); _tprintf(szFmtString); diff --git a/base/system/userinit/lang/bg-BG.rc b/base/system/userinit/lang/bg-BG.rc index e4fd90105fc..4f2170b64d9 100644 --- a/base/system/userinit/lang/bg-BG.rc +++ b/base/system/userinit/lang/bg-BG.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Приложението userinit не успя да пусне обвивката!\n" diff --git a/base/system/userinit/lang/cs-CZ.rc b/base/system/userinit/lang/cs-CZ.rc index af8a6d09592..f6c4a4da2c4 100644 --- a/base/system/userinit/lang/cs-CZ.rc +++ b/base/system/userinit/lang/cs-CZ.rc @@ -4,7 +4,7 @@ */ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Aplikace Userinit selhala při spouštění uživatelského rozhraní!\n" diff --git a/base/system/userinit/lang/de-DE.rc b/base/system/userinit/lang/de-DE.rc index 47f69563a3a..c8eb69ae27c 100644 --- a/base/system/userinit/lang/de-DE.rc +++ b/base/system/userinit/lang/de-DE.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Userinit konnte die Shell nicht starten!\n" diff --git a/base/system/userinit/lang/el-GR.rc b/base/system/userinit/lang/el-GR.rc index 57505e2d314..d27e973cd40 100644 --- a/base/system/userinit/lang/el-GR.rc +++ b/base/system/userinit/lang/el-GR.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "H Userinit δε μπόρεσε να εκκινήσει το κέλυφος!\n" diff --git a/base/system/userinit/lang/en-US.rc b/base/system/userinit/lang/en-US.rc index 59eb07b8562..4244e55cb21 100644 --- a/base/system/userinit/lang/en-US.rc +++ b/base/system/userinit/lang/en-US.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Userinit failed to start the shell!\n" diff --git a/base/system/userinit/lang/es-ES.rc b/base/system/userinit/lang/es-ES.rc index f7ee1ac82e2..5cbd812431d 100644 --- a/base/system/userinit/lang/es-ES.rc +++ b/base/system/userinit/lang/es-ES.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Userinit no pudo iniciar el shell con éxito!\n" diff --git a/base/system/userinit/lang/fr-FR.rc b/base/system/userinit/lang/fr-FR.rc index e793f1ece8d..dd3eafb9fed 100644 --- a/base/system/userinit/lang/fr-FR.rc +++ b/base/system/userinit/lang/fr-FR.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Userinit a échoué lors du chargement de l'interface (shell) !\n" diff --git a/base/system/userinit/lang/he-IL.rc b/base/system/userinit/lang/he-IL.rc index 45184940882..b847ff4a554 100644 --- a/base/system/userinit/lang/he-IL.rc +++ b/base/system/userinit/lang/he-IL.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Userinit נכשל להפעיל את הממשק!\n" diff --git a/base/system/userinit/lang/hu-HU.rc b/base/system/userinit/lang/hu-HU.rc index 7fe2b8616ac..8eccec38821 100644 --- a/base/system/userinit/lang/hu-HU.rc +++ b/base/system/userinit/lang/hu-HU.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Az Userinit nem tudja elindítani a rendszert!\n" diff --git a/base/system/userinit/lang/id-ID.rc b/base/system/userinit/lang/id-ID.rc index de32a63667b..746f31f115d 100644 --- a/base/system/userinit/lang/id-ID.rc +++ b/base/system/userinit/lang/id-ID.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Userinit gagal untuk memulai shell!\n" diff --git a/base/system/userinit/lang/it-IT.rc b/base/system/userinit/lang/it-IT.rc index 33a89970095..63d619d53d9 100644 --- a/base/system/userinit/lang/it-IT.rc +++ b/base/system/userinit/lang/it-IT.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Userinit non ha potuto avviare l'ambiente(shell)!\n" diff --git a/base/system/userinit/lang/ja-JP.rc b/base/system/userinit/lang/ja-JP.rc index cfebe564de5..6b638bf51ef 100644 --- a/base/system/userinit/lang/ja-JP.rc +++ b/base/system/userinit/lang/ja-JP.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Userinit はシェルを開始できませんでした!\n" diff --git a/base/system/userinit/lang/lt-LT.rc b/base/system/userinit/lang/lt-LT.rc index c6cee598e24..2e842442497 100644 --- a/base/system/userinit/lang/lt-LT.rc +++ b/base/system/userinit/lang/lt-LT.rc @@ -1,7 +1,7 @@ /* Translation by Vytis 'CMan' Girdžijauskas cman@cman.us */ LANGUAGE LANG_LITHUANIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Userinit nepavyko paleisti aplinkos!\n" diff --git a/base/system/userinit/lang/nl-NL.rc b/base/system/userinit/lang/nl-NL.rc index 87f4664c8e2..0c584c9d02f 100644 --- a/base/system/userinit/lang/nl-NL.rc +++ b/base/system/userinit/lang/nl-NL.rc @@ -4,7 +4,7 @@ */ LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Userinit kon de shell niet starten!\n" diff --git a/base/system/userinit/lang/no-NO.rc b/base/system/userinit/lang/no-NO.rc index 96a28baa145..87127bb1ac8 100644 --- a/base/system/userinit/lang/no-NO.rc +++ b/base/system/userinit/lang/no-NO.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Userinit mislykket å starte skall!\n" diff --git a/base/system/userinit/lang/pl-PL.rc b/base/system/userinit/lang/pl-PL.rc index 9d7491da0b3..5f53e1ca8e9 100644 --- a/base/system/userinit/lang/pl-PL.rc +++ b/base/system/userinit/lang/pl-PL.rc @@ -6,7 +6,7 @@ */ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Nie powiodło się uruchomienie powłoki przez userinit!\n" diff --git a/base/system/userinit/lang/pt-BR.rc b/base/system/userinit/lang/pt-BR.rc index 481a368eb9b..8c3f9041fb6 100644 --- a/base/system/userinit/lang/pt-BR.rc +++ b/base/system/userinit/lang/pt-BR.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Userinit falhou ao tentar iniciar o shell!\n" diff --git a/base/system/userinit/lang/ro-RO.rc b/base/system/userinit/lang/ro-RO.rc index 5f11b89ff47..8428a2a0f0b 100644 --- a/base/system/userinit/lang/ro-RO.rc +++ b/base/system/userinit/lang/ro-RO.rc @@ -7,7 +7,7 @@ */ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Userinit a eșuat în lansarea interfeței!\n" diff --git a/base/system/userinit/lang/ru-RU.rc b/base/system/userinit/lang/ru-RU.rc index 1ab8a01793e..cbd77c5e411 100644 --- a/base/system/userinit/lang/ru-RU.rc +++ b/base/system/userinit/lang/ru-RU.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Ошибка запуска оболочки при инициализации пользовательского сеанса!\n" diff --git a/base/system/userinit/lang/sk-SK.rc b/base/system/userinit/lang/sk-SK.rc index dd633df3096..d0de9488f37 100644 --- a/base/system/userinit/lang/sk-SK.rc +++ b/base/system/userinit/lang/sk-SK.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Userinit zlyhal pri spúšťaní shellu!\n" diff --git a/base/system/userinit/lang/sv-SE.rc b/base/system/userinit/lang/sv-SE.rc index 573335fed5d..4532c98fa1f 100644 --- a/base/system/userinit/lang/sv-SE.rc +++ b/base/system/userinit/lang/sv-SE.rc @@ -3,7 +3,7 @@ */ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Userinit misslyckades att starta användargränssnittet!\n" diff --git a/base/system/userinit/lang/th-TH.rc b/base/system/userinit/lang/th-TH.rc index 8aaec9409cd..0e3141f49e4 100644 --- a/base/system/userinit/lang/th-TH.rc +++ b/base/system/userinit/lang/th-TH.rc @@ -1,5 +1,5 @@ LANGUAGE LANG_THAI, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "ค่าผู้ใช้ผิดพลาดในตอนเข้าสู่ชั้นสถานะ!\n" diff --git a/base/system/userinit/lang/tr-TR.rc b/base/system/userinit/lang/tr-TR.rc new file mode 100644 index 00000000000..e57e288d614 --- /dev/null +++ b/base/system/userinit/lang/tr-TR.rc @@ -0,0 +1,11 @@ +/* + * TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) (erdemersoy@live.com) + */ + +LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT +STRINGTABLE +BEGIN + +STRING_USERINIT_FAIL, "Userinit, kabuğu başlatamadı!\n" + +END diff --git a/base/system/userinit/lang/uk-UA.rc b/base/system/userinit/lang/uk-UA.rc index 6fea3ec46e4..3a29aa1b0b8 100644 --- a/base/system/userinit/lang/uk-UA.rc +++ b/base/system/userinit/lang/uk-UA.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Userinit не вдалося запустити оболонку!\n" diff --git a/base/system/userinit/lang/zh-CN.rc b/base/system/userinit/lang/zh-CN.rc index da17fa85395..a58177b6683 100644 --- a/base/system/userinit/lang/zh-CN.rc +++ b/base/system/userinit/lang/zh-CN.rc @@ -4,7 +4,7 @@ */ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STRING_USERINIT_FAIL, "Userinit 无法启动外壳!\n" diff --git a/base/system/userinit/rsrc.rc b/base/system/userinit/rsrc.rc index a95103ac745..1d97f3a4ef2 100644 --- a/base/system/userinit/rsrc.rc +++ b/base/system/userinit/rsrc.rc @@ -1,4 +1,4 @@ -LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL // UTF-8 #pragma code_page(65001) @@ -68,6 +68,9 @@ LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL #ifdef LANGUAGE_TH_TH #include "lang/th-TH.rc" #endif +#ifdef LANGUAGE_TR_TR + #include "lang/tr-TR.rc" +#endif #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" #endif diff --git a/base/system/winlogon/lang/tr-TR.rc b/base/system/winlogon/lang/tr-TR.rc new file mode 100644 index 00000000000..041ef6c8d85 --- /dev/null +++ b/base/system/winlogon/lang/tr-TR.rc @@ -0,0 +1,49 @@ +/* + * TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) (erdemersoy@live.com) + */ + +LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT + +IDD_SHUTDOWNCOMPUTER DIALOGEX 45, 22, 164, 52 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Bilgisayarı Kapat" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Şimdi bilgisayarınızı kapatabilirsiniz.", IDC_SHUTDOWNCOMPUTER, 31, 13, 132, 8 + ICON IDI_WINLOGON, IDC_SHTDOWNICON, 6, 7, 18, 20 + DEFPUSHBUTTON "&Yeniden Başlat", IDC_BTNSHTDOWNCOMPUTER, 62, 32, 40, 14 +END + +IDD_GINALOADFAILED DIALOGEX 58, 83, 231, 119 +STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Kullanıcı Arayüzü Yanlışlığı" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Oturum Açma Kullanıcı Arayüzü DLL'si (%s) yüklenemedi.", IDC_GINALOADFAILED, 39, 16, 156, 24 + LTEXT "DLL'nin yenilenmesi için dizge yöneticinize başvurunuz.", IDC_GINALOADFAILEDCONTACT, 39, 53, 151, 25 + DEFPUSHBUTTON "&Yeniden Başlat", 1, 80, 91, 68, 14 +END + +STRINGTABLE +BEGIN + IDS_PREPARENETWORKCONNECTIONS "Ağ Bağlantıları Hazırlanıyor..." + IDS_APPLYINGCOMPUTERSETTINGS "Bilgisayar Ayarları Uygulanıyor..." + IDS_RUNNINGSTARTUPSCRIPTS "Bilgisayarı Açma Betikleri Çalıştırılıyor..." + IDS_RUNNINGSHUTDOWNSCRIPTS "Bilgisayarı Kapama Betikleri Çalıştırılıyor..." + IDS_APPLYINGYOURPERSONALSETTINGS "Kullanıcı Ayarlarınız Uygulanıyor..." + IDS_RUNNINGLOGOFFSCRIPTS "Oturum Kapama Betikleri Çalıştırılıyor..." + IDS_RUNNINGLOGONSCRIPTS "Oturum Açma Betikleri Çalıştırılıyor..." + IDS_LOADINGYOURPERSONALSETTINGS "Kullanıcı Ayarlarınız Yükleniyor..." + IDS_CLOSINGNETWORKCONNECTIONS "Ağ Bağlantıları Kapatılıyor..." + IDS_REACTOSISSHUTTINGDOWN "ReactOS Kapatılıyor..." + IDS_PREPARETOSTANDBY "Uyku Kipine Geçiliyor..." + IDS_PREPARETOHIBERNATE "Hazırda Beklemeye Geçiliyor..." + IDS_SAVEYOURSETTINGS "Ayarlarınız Kaydediliyor..." + IDS_REACTOSISSTARTINGUP "ReactOS Başlatılıyor..." +END + +STRINGTABLE +BEGIN + IDS_FAILEDACTIVATEUSERSHELL "Winlogon, kullanıcı kabuğunu etkinleştiremedi." +END + diff --git a/base/system/winlogon/rsrc.rc b/base/system/winlogon/rsrc.rc index 7509c684b76..c90f45fbd68 100644 --- a/base/system/winlogon/rsrc.rc +++ b/base/system/winlogon/rsrc.rc @@ -68,6 +68,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #ifdef LANGUAGE_SK_SK #include "lang/sk-SK.rc" #endif +#ifdef LANGUAGE_TR_TR + #include "lang/tr-TR.rc" +#endif #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" #endif diff --git a/boot/bootdata/CMakeLists.txt b/boot/bootdata/CMakeLists.txt index 611d1a079b4..10a10d4a593 100644 --- a/boot/bootdata/CMakeLists.txt +++ b/boot/bootdata/CMakeLists.txt @@ -56,6 +56,9 @@ add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/icon.ico DESTINATION root NO_CAB FO add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/readme.txt DESTINATION root NO_CAB FOR all) add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/readme.txt DESTINATION reactos FOR all) +#system.ini +add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/system.ini DESTINATION reactos FOR all) + #freeldr.ini add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcd.ini DESTINATION root NO_CAB NAME_ON_CD freeldr.ini FOR bootcd regtest) add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/livecd.ini DESTINATION root NAME_ON_CD freeldr.ini FOR livecd) diff --git a/boot/bootdata/bootcdregtest/regtest.cmd b/boot/bootdata/bootcdregtest/regtest.cmd index 7e0d2aa4512..e5190514463 100644 --- a/boot/bootdata/bootcdregtest/regtest.cmd +++ b/boot/bootdata/bootcdregtest/regtest.cmd @@ -1,5 +1,6 @@ @echo off set WINETEST_DEBUG=0 +set WINETEST_PLATFORM=reactos if exist "C:\ReactOS\bin\AHKAppTests.cmd" ( dbgprint "Preparing AHK Application testing suite." diff --git a/boot/bootdata/hivesft.inf b/boot/bootdata/hivesft.inf index 7f98ba10b14..143432f3ca5 100644 --- a/boot/bootdata/hivesft.inf +++ b/boot/bootdata/hivesft.inf @@ -146,6 +146,10 @@ HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Network\SMAddOns",,0x00000012 HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Network\UMAddOns",,0x00000012 HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Network\World Full Access Shared Parameters",,0x00000012 +; INI File Mappings +HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping",,0x00000012 + +; Global Console settings HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console",,0x00000012 HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\Nls","00000409",2,"" HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont","0",2,"Lucida Console" @@ -159,6 +163,7 @@ HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\IME Compatibility",,0x0000001 HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\IMM","LoadIMM",0x00010003,0 HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\IMM","LoadCTFIME",0x00010003,0 +; DOS Device ports HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports","COM1:",2,"9600,n,8,1" HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports","COM2:",2,"9600,n,8,1" HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports","COM3:",2,"9600,n,8,1" @@ -225,13 +230,6 @@ HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","wmv",0x00000 HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","wmx",0x00000002,"MPEGVideo" HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\MCI Extensions","wvx",0x00000002,"MPEGVideo" -; Mesa OpenGL Driver -HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers","DefaultDriver",0x00000000,"Mesa" -HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\Mesa","Version",0x00010001,0x00000002 -HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\Mesa","Dll",0x00000000,"mesa32" -HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\Mesa","DriverVersion",0x00010001,0x00000001 -HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\OpenGLDrivers\Mesa","Flags",0x00010001,0x00000001 - ; User Profile List HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList",,0x00000012 HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList","ProfilesDirectory",0x00020000,"%SystemDrive%\Documents and Settings" @@ -1063,6 +1061,7 @@ HKLM,"SOFTWARE\ReactOS\ReactOS\CurrentVersion\IFS","FAT",0x00000000,"ufat.dll" HKLM,"SOFTWARE\ReactOS\ReactOS\CurrentVersion\IFS","FAT32",0x00000000,"ufat.dll" HKLM,"SOFTWARE\ReactOS\ReactOS\CurrentVersion\IFS","FATX",0x00000000,"ufatx.dll" +; Winlogon settings HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","ConsoleShell",0x00020000,"%SystemRoot%\system32\cmd.exe" HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","Shell",0x00020000,"%SystemRoot%\explorer.exe" HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon","Userinit",0x00020000,"%SystemRoot%\system32\userinit.exe" diff --git a/boot/bootdata/hivesys.inf b/boot/bootdata/hivesys.inf index 751e1df160f..13c645a6ba9 100644 --- a/boot/bootdata/hivesys.inf +++ b/boot/bootdata/hivesys.inf @@ -830,6 +830,7 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Nls\CodePage","10007",0x00000000,"c_10007 HKLM,"SYSTEM\CurrentControlSet\Control\Nls\CodePage","10029",0x00000000,"c_10029.nls" HKLM,"SYSTEM\CurrentControlSet\Control\Nls\CodePage","10079",0x00000000,"c_10079.nls" HKLM,"SYSTEM\CurrentControlSet\Control\Nls\CodePage","10081",0x00000000,"c_10081.nls" +HKLM,"SYSTEM\CurrentControlSet\Control\Nls\CodePage","20127",0x00000000,"c_20127.nls" HKLM,"SYSTEM\CurrentControlSet\Control\Nls\CodePage","20866",0x00000000,"c_20866.nls" HKLM,"SYSTEM\CurrentControlSet\Control\Nls\CodePage","21866",0x00000000,"c_21866.nls" HKLM,"SYSTEM\CurrentControlSet\Control\Nls\CodePage","28591",0x00000000,"c_28591.nls" @@ -1211,10 +1212,11 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices","UNC",0x0000 ; System environment settings HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","ComSpec",0x00020000,"%SystemRoot%\system32\cmd.exe" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","Path",0x00020000,"%SystemRoot%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\wbem" -HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","windir",0x00020000,"%SystemRoot%" +HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","PATHEXT",0x00000000,".COM;.EXE;.BAT;.CMD" +HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","PROMPT",0x00000000,"$I$P$G" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TEMP",0x00020000,"%SystemDrive%\TEMP" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TMP",0x00020000,"%SystemDrive%\TEMP" -HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","PATHEXT",0x00000000,".COM;.EXE;.BAT;.CMD" +HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","windir",0x00020000,"%SystemRoot%" ; Known DLLs @@ -1252,6 +1254,9 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems","Posix",0x000 HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems","Required",0x00010000,"Debug","Windows" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems","Windows",0x00020000,"%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,12288,512 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=16" +; App Compat -- Disable on ReactOS +HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\AppCompatibility","DisableAppCompat",0x00010003, 0x00000001 + ; WOW Support HKLM,"SYSTEM\CurrentControlSet\Control\Wow","",0x00000000,"" diff --git a/boot/bootdata/packages/reactos.dff.in b/boot/bootdata/packages/reactos.dff.in index 9a2c54c5813..0b20c62cc4d 100644 --- a/boot/bootdata/packages/reactos.dff.in +++ b/boot/bootdata/packages/reactos.dff.in @@ -60,5 +60,5 @@ modules\optional\vmx_fb.dll 1 optional modules\optional\vmx_mode.dll 1 optional modules\optional\vmx_svga.inf 6 optional modules\optional\vmx_svga.sys 2 optional -modules\optional\wine_gecko-1.9-x86.msi 4 optional +modules\optional\wine_gecko-2.21-x86.msi 4 optional boot\bootdata\bootcdregtest\AHKAppTests.cmd 7 optional diff --git a/boot/freeldr/fdebug/fdebug.rc b/boot/freeldr/fdebug/fdebug.rc index 21479ce6824..5c81337234e 100644 --- a/boot/freeldr/fdebug/fdebug.rc +++ b/boot/freeldr/fdebug/fdebug.rc @@ -18,11 +18,11 @@ IDI_FDEBUG ICON "fdebug.ico" #include "lang/ja-JP.rc" #include "lang/no-NO.rc" #include "lang/sk-SK.rc" -#include "lang/tr-TR.rc" // UTF-8 #pragma code_page(65001) #include "lang/pl-PL.rc" #include "lang/ro-RO.rc" #include "lang/ru-RU.rc" +#include "lang/tr-TR.rc" #include "lang/uk-UA.rc" diff --git a/boot/freeldr/fdebug/lang/bg-BG.rc b/boot/freeldr/fdebug/lang/bg-BG.rc index cd53d93166d..69eb8498af3 100644 --- a/boot/freeldr/fdebug/lang/bg-BG.rc +++ b/boot/freeldr/fdebug/lang/bg-BG.rc @@ -12,7 +12,7 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT // Menu // -IDC_FDEBUG MENU DISCARDABLE +IDC_FDEBUG MENU BEGIN POPUP "&" BEGIN @@ -40,7 +40,7 @@ END // Accelerator // -IDC_FDEBUG ACCELERATORS MOVEABLE PURE +IDC_FDEBUG ACCELERATORS BEGIN 63, IDM_ABOUT, ASCII, ALT // "?" 47, IDM_ABOUT, ASCII, ALT // "/" @@ -53,7 +53,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -62,13 +62,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -82,7 +82,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -116,7 +116,7 @@ END // Dialog // -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 259, 210 +IDD_ABOUTBOX DIALOGEX 22, 17, 259, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION " FreeLoader Debugger" FONT 8, "MS Shell Dlg" @@ -130,7 +130,7 @@ BEGIN ES_READONLY | WS_VSCROLL END -IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 +IDD_CONNECTION DIALOGEX 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -143,7 +143,7 @@ BEGIN PUSHBUTTON "",IDCANCEL,100,79,50,14 END -IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 +IDD_CAPTURE DIALOGEX 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -161,14 +161,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "fdebug" IDS_HELLO ", !" IDC_FDEBUG "FDEBUG" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END diff --git a/boot/freeldr/fdebug/lang/cs-CZ.rc b/boot/freeldr/fdebug/lang/cs-CZ.rc index 78ee087eb1a..8ad7bcf4d5f 100644 --- a/boot/freeldr/fdebug/lang/cs-CZ.rc +++ b/boot/freeldr/fdebug/lang/cs-CZ.rc @@ -13,7 +13,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT // Menu // -IDC_FDEBUG MENU DISCARDABLE +IDC_FDEBUG MENU BEGIN POPUP "&Soubor" BEGIN @@ -41,7 +41,7 @@ END // Accelerator // -IDC_FDEBUG ACCELERATORS MOVEABLE PURE +IDC_FDEBUG ACCELERATORS BEGIN 63, IDM_ABOUT, ASCII, ALT // "?" 47, IDM_ABOUT, ASCII, ALT // "/" @@ -54,7 +54,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -63,13 +63,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -83,7 +83,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -117,7 +117,7 @@ END // Dialog // -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 259, 210 +IDD_ABOUTBOX DIALOGEX 22, 17, 259, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "O FreeLoader Debuggeru" FONT 8, "MS Shell Dlg" @@ -131,7 +131,7 @@ BEGIN ES_READONLY | WS_VSCROLL END -IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 +IDD_CONNECTION DIALOGEX 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Monosti pipojen" FONT 8, "MS Shell Dlg" @@ -144,7 +144,7 @@ BEGIN PUSHBUTTON "Storno",IDCANCEL,100,79,50,14 END -IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 +IDD_CAPTURE DIALOGEX 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Zachytvac soubor" FONT 8, "MS Shell Dlg" @@ -162,14 +162,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "fdebug" IDS_HELLO "Hello World!" IDC_FDEBUG "FDEBUG" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END diff --git a/boot/freeldr/fdebug/lang/de-DE.rc b/boot/freeldr/fdebug/lang/de-DE.rc index 2ce51f46c9c..4e80051b1e2 100644 --- a/boot/freeldr/fdebug/lang/de-DE.rc +++ b/boot/freeldr/fdebug/lang/de-DE.rc @@ -12,7 +12,7 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL // Menu // -IDC_FDEBUG MENU DISCARDABLE +IDC_FDEBUG MENU BEGIN POPUP "&Datei" BEGIN @@ -40,7 +40,7 @@ END // Accelerator // -IDC_FDEBUG ACCELERATORS MOVEABLE PURE +IDC_FDEBUG ACCELERATORS BEGIN 63, IDM_ABOUT, ASCII, ALT // "?" 47, IDM_ABOUT, ASCII, ALT // "/" @@ -53,7 +53,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -62,13 +62,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -82,7 +82,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -116,7 +116,7 @@ END // Dialog // -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 259, 210 +IDD_ABOUTBOX DIALOGEX 22, 17, 259, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "ber FreeLoader Debugger" FONT 8, "MS Shell Dlg" @@ -130,7 +130,7 @@ BEGIN ES_READONLY | WS_VSCROLL END -IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 +IDD_CONNECTION DIALOGEX 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Verbindungsoptionen" FONT 8, "MS Shell Dlg" @@ -143,7 +143,7 @@ BEGIN PUSHBUTTON "Abbrechen",IDCANCEL,100,79,50,14 END -IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 +IDD_CAPTURE DIALOGEX 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Protokolldatei" FONT 8, "MS Shell Dlg" @@ -161,14 +161,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "fdebug" IDS_HELLO "Hello World!" IDC_FDEBUG "FDEBUG" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Dieses Programm ist kostenlos; Sie knnen es frei verteilen mit od. ohne nderungen unter der GNU Lesser General Public License wie es von der Free Software Foundation verffentlicht wurde; entweder Version 2.1 der Lizenz, oder eine sptere Version (ihrer Wahl).\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END diff --git a/boot/freeldr/fdebug/lang/el-GR.rc b/boot/freeldr/fdebug/lang/el-GR.rc index 4fc361c9f41..2db7716e239 100644 --- a/boot/freeldr/fdebug/lang/el-GR.rc +++ b/boot/freeldr/fdebug/lang/el-GR.rc @@ -12,7 +12,7 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT // Menu // -IDC_FDEBUG MENU DISCARDABLE +IDC_FDEBUG MENU BEGIN POPUP "&" BEGIN @@ -40,7 +40,7 @@ END // Accelerator // -IDC_FDEBUG ACCELERATORS MOVEABLE PURE +IDC_FDEBUG ACCELERATORS BEGIN 63, IDM_ABOUT, ASCII, ALT // "?" 47, IDM_ABOUT, ASCII, ALT // "/" @@ -53,7 +53,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -62,13 +62,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -82,7 +82,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -116,7 +116,7 @@ END // Dialog // -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 259, 210 +IDD_ABOUTBOX DIALOGEX 22, 17, 259, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION " FreeLoader" FONT 8, "MS Shell Dlg" @@ -130,7 +130,7 @@ BEGIN ES_READONLY | WS_VSCROLL END -IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 +IDD_CONNECTION DIALOGEX 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -143,7 +143,7 @@ BEGIN PUSHBUTTON "",IDCANCEL,100,79,50,14 END -IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 +IDD_CAPTURE DIALOGEX 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Capture " FONT 8, "MS Shell Dlg" @@ -161,14 +161,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "fdebug" IDS_HELLO "Hello World!" IDC_FDEBUG "FDEBUG" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END diff --git a/boot/freeldr/fdebug/lang/en-US.rc b/boot/freeldr/fdebug/lang/en-US.rc index 57fbc468257..c4c011c74c8 100644 --- a/boot/freeldr/fdebug/lang/en-US.rc +++ b/boot/freeldr/fdebug/lang/en-US.rc @@ -12,7 +12,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // Menu // -IDC_FDEBUG MENU DISCARDABLE +IDC_FDEBUG MENU BEGIN POPUP "&File" BEGIN @@ -40,7 +40,7 @@ END // Accelerator // -IDC_FDEBUG ACCELERATORS MOVEABLE PURE +IDC_FDEBUG ACCELERATORS BEGIN 63, IDM_ABOUT, ASCII, ALT // "?" 47, IDM_ABOUT, ASCII, ALT // "/" @@ -53,7 +53,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -62,13 +62,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -82,7 +82,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -116,7 +116,7 @@ END // Dialog // -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 259, 210 +IDD_ABOUTBOX DIALOGEX 22, 17, 259, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "About FreeLoader Debugger" FONT 8, "MS Shell Dlg" @@ -130,7 +130,7 @@ BEGIN ES_READONLY | WS_VSCROLL END -IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 +IDD_CONNECTION DIALOGEX 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Connection Options" FONT 8, "MS Shell Dlg" @@ -143,7 +143,7 @@ BEGIN PUSHBUTTON "Cancel",IDCANCEL,100,79,50,14 END -IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 +IDD_CAPTURE DIALOGEX 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Capture File" FONT 8, "MS Shell Dlg" @@ -161,14 +161,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "fdebug" IDS_HELLO "Hello World!" IDC_FDEBUG "FDEBUG" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END diff --git a/boot/freeldr/fdebug/lang/es-ES.rc b/boot/freeldr/fdebug/lang/es-ES.rc index fcac5f1f097..2cf9b43b1d8 100644 --- a/boot/freeldr/fdebug/lang/es-ES.rc +++ b/boot/freeldr/fdebug/lang/es-ES.rc @@ -12,7 +12,7 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL // Menu // -IDC_FDEBUG MENU DISCARDABLE +IDC_FDEBUG MENU BEGIN POPUP "&Archivo" BEGIN @@ -40,7 +40,7 @@ END // Accelerator // -IDC_FDEBUG ACCELERATORS MOVEABLE PURE +IDC_FDEBUG ACCELERATORS BEGIN 63, IDM_ABOUT, ASCII, ALT // "?" 47, IDM_ABOUT, ASCII, ALT // "/" @@ -53,7 +53,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -62,13 +62,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -82,7 +82,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -116,7 +116,7 @@ END // Dialog // -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 259, 210 +IDD_ABOUTBOX DIALOGEX 22, 17, 259, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Acerca de FreeLoader Debugger" FONT 8, "MS Shell Dlg" @@ -130,7 +130,7 @@ BEGIN ES_READONLY | WS_VSCROLL END -IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 +IDD_CONNECTION DIALOGEX 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Opciones de Conexin" FONT 8, "MS Shell Dlg" @@ -143,7 +143,7 @@ BEGIN PUSHBUTTON "Cancelar",IDCANCEL,100,79,50,14 END -IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 +IDD_CAPTURE DIALOGEX 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Archivo de Captura" FONT 8, "MS Shell Dlg" @@ -161,14 +161,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "fdebug" IDS_HELLO "Hola mundo" IDC_FDEBUG "FDEBUG" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END diff --git a/boot/freeldr/fdebug/lang/fr-FR.rc b/boot/freeldr/fdebug/lang/fr-FR.rc index c11f2f0ac06..b4dab867f50 100644 --- a/boot/freeldr/fdebug/lang/fr-FR.rc +++ b/boot/freeldr/fdebug/lang/fr-FR.rc @@ -12,7 +12,7 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL // Menu // -IDC_FDEBUG MENU DISCARDABLE +IDC_FDEBUG MENU BEGIN POPUP "&Fichier" BEGIN @@ -40,7 +40,7 @@ END // Accelerator // -IDC_FDEBUG ACCELERATORS MOVEABLE PURE +IDC_FDEBUG ACCELERATORS BEGIN 63, IDM_ABOUT, ASCII, ALT // "?" 47, IDM_ABOUT, ASCII, ALT // "/" @@ -53,7 +53,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -62,13 +62,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -82,7 +82,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -116,7 +116,7 @@ END // Dialog // -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 259, 210 +IDD_ABOUTBOX DIALOGEX 22, 17, 259, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "A propos du dbogueur de FreeLoader" FONT 8, "MS Shell Dlg" @@ -130,7 +130,7 @@ BEGIN ES_READONLY | WS_VSCROLL END -IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 +IDD_CONNECTION DIALOGEX 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Options de Connection" FONT 8, "MS Shell Dlg" @@ -143,7 +143,7 @@ BEGIN PUSHBUTTON "Annuler",IDCANCEL,100,79,50,14 END -IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 +IDD_CAPTURE DIALOGEX 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Fichier de Capture" FONT 8, "MS Shell Dlg" @@ -161,14 +161,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "fdebug" IDS_HELLO "Hello World!" IDC_FDEBUG "FDEBUG" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier tout en respectant les termes de la ""GNU General Public License"" publie par la Free Software Foundation; dans sa version 2 (ou selon votre prfrence) toute version ultrieure.\r\n\r\nCe programme est distribu dans l'espoir qu'il sera utile, cependant SANS GARANTIE D'AUCUNE SORTE ; sans mme une garantie implicite de COMMERCIABILIT ou DE CONFORMIT A UNE UTILISATION PARTICULIRE. \r\n\r\nVoir la Licence Publique Gnrale GNU pour plus de dtails. Vous devriez avoir reu un exemplaire de la Licence Publique Gnrale GNU avec ce programme ; si ce n'est pas le cas, crivez la Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END diff --git a/boot/freeldr/fdebug/lang/hu-HU.rc b/boot/freeldr/fdebug/lang/hu-HU.rc index d8146e3697d..bc53964cc04 100644 --- a/boot/freeldr/fdebug/lang/hu-HU.rc +++ b/boot/freeldr/fdebug/lang/hu-HU.rc @@ -12,7 +12,7 @@ LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT // Menu // -IDC_FDEBUG MENU DISCARDABLE +IDC_FDEBUG MENU BEGIN POPUP "&File" BEGIN @@ -40,7 +40,7 @@ END // Accelerator // -IDC_FDEBUG ACCELERATORS MOVEABLE PURE +IDC_FDEBUG ACCELERATORS BEGIN 63, IDM_ABOUT, ASCII, ALT // "?" 47, IDM_ABOUT, ASCII, ALT // "/" @@ -53,7 +53,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -62,13 +62,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -82,7 +82,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -116,7 +116,7 @@ END // Dialog // -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 259, 210 +IDD_ABOUTBOX DIALOGEX 22, 17, 259, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "FreeLoader Debugger" FONT 8, "MS Shell Dlg" @@ -130,7 +130,7 @@ BEGIN ES_READONLY | WS_VSCROLL END -IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 +IDD_CONNECTION DIALOGEX 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Kapcsolat tulajdonsgai" FONT 8, "MS Shell Dlg" @@ -143,7 +143,7 @@ BEGIN PUSHBUTTON "Mgse",IDCANCEL,100,79,50,14 END -IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 +IDD_CAPTURE DIALOGEX 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Napl llomny" FONT 8, "MS Shell Dlg" @@ -161,14 +161,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "fdebug" IDS_HELLO "Hellka!" IDC_FDEBUG "FDEBUG" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END diff --git a/boot/freeldr/fdebug/lang/id-ID.rc b/boot/freeldr/fdebug/lang/id-ID.rc index e69d8d15b3f..9ebc135b14b 100644 --- a/boot/freeldr/fdebug/lang/id-ID.rc +++ b/boot/freeldr/fdebug/lang/id-ID.rc @@ -13,7 +13,7 @@ LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT // Menu // -IDC_FDEBUG MENU DISCARDABLE +IDC_FDEBUG MENU BEGIN POPUP "&File" BEGIN @@ -41,7 +41,7 @@ END // Accelerator // -IDC_FDEBUG ACCELERATORS MOVEABLE PURE +IDC_FDEBUG ACCELERATORS BEGIN 63, IDM_ABOUT, ASCII, ALT // "?" 47, IDM_ABOUT, ASCII, ALT // "/" @@ -54,7 +54,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -63,13 +63,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -83,7 +83,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -117,7 +117,7 @@ END // Dialog // -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 259, 210 +IDD_ABOUTBOX DIALOGEX 22, 17, 259, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Tentang FreeLoader Debugger" FONT 8, "MS Shell Dlg" @@ -131,7 +131,7 @@ BEGIN ES_READONLY | WS_VSCROLL END -IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 +IDD_CONNECTION DIALOGEX 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Opsi Koneksi" FONT 8, "MS Shell Dlg" @@ -144,7 +144,7 @@ BEGIN PUSHBUTTON "Batal",IDCANCEL,100,79,50,14 END -IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 +IDD_CAPTURE DIALOGEX 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "File Tangkapan" FONT 8, "MS Shell Dlg" @@ -162,14 +162,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "fdebug" IDS_HELLO "Halo Dunia!" IDC_FDEBUG "FDEBUG" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Program ini adalah software bebas; anda dapat mendistribusikan dan/atau mengubahnya di bawah term GNU General Public License seperti dipublikasikan oleh Free Software Foundation; baik Lisensi versi 2, atau (menurut opini anda) setiap versi berikutnya.\r\n\r\nProgram ini didistribusikan dengan harapan ia akan berguna, tetapi TANPA JAMINAN APAPUN; bahkan tanpa jaminan berarti dari MERCANTABILITAS atau KECUKUPAN UNTUK KEPERLUAN TERTENTU. Lihat GNU General Public License untuk lebih jelasnya.\r\n\r\nAnda seharusnya menerima duplikat GNU General Public License bersamaan dengan program ini; jika tidak, tulis ke Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END diff --git a/boot/freeldr/fdebug/lang/it-IT.rc b/boot/freeldr/fdebug/lang/it-IT.rc index b7114a0e104..c09c58c1d3f 100644 --- a/boot/freeldr/fdebug/lang/it-IT.rc +++ b/boot/freeldr/fdebug/lang/it-IT.rc @@ -12,7 +12,7 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL // Menu // -IDC_FDEBUG MENU DISCARDABLE +IDC_FDEBUG MENU BEGIN POPUP "&File" BEGIN @@ -40,7 +40,7 @@ END // Accelerator // -IDC_FDEBUG ACCELERATORS MOVEABLE PURE +IDC_FDEBUG ACCELERATORS BEGIN 63, IDM_ABOUT, ASCII, ALT // "?" 47, IDM_ABOUT, ASCII, ALT // "/" @@ -53,7 +53,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -62,13 +62,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -82,7 +82,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -116,7 +116,7 @@ END // Dialog // -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 259, 210 +IDD_ABOUTBOX DIALOGEX 22, 17, 259, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Informazioni su FreeLoader Debugger" FONT 8, "MS Shell Dlg" @@ -130,7 +130,7 @@ BEGIN ES_READONLY | WS_VSCROLL END -IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 +IDD_CONNECTION DIALOGEX 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Opzioni di connessione" FONT 8, "MS Shell Dlg" @@ -143,7 +143,7 @@ BEGIN PUSHBUTTON "Annulla",IDCANCEL,100,79,50,14 END -IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 +IDD_CAPTURE DIALOGEX 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Capture File" FONT 8, "MS Shell Dlg" @@ -161,14 +161,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "fdebug" IDS_HELLO "Hello World!" IDC_FDEBUG "FDEBUG" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Questo programma software libero; puoi distribuirlo e/o modificarlo nei termini di licenza di 'GNU General Public License' come pubblicata dalla 'Free Software Foundation'; entrambe le versioni 2 della Licenza, o (a vostra scelta) qualunque versione successiva.\r\n\r\nQuesto programma distribuito con l'augurio che sia utile, ma PRIVO DI OGNI GARANZIA; privo anche della garanzia implicita di VENDIBILITA' o ADEGUATEZZA PER UNO SPECIFICO USO. Vedi la 'GNU General Public License' per ulteriori dettagli.\r\n\r\nVoi dovreste aver ricevuto una copia della 'GNU General Public License' assieme a questo programma; se non cosi' scrivete a 'Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.." END diff --git a/boot/freeldr/fdebug/lang/ja-JP.rc b/boot/freeldr/fdebug/lang/ja-JP.rc index a26401b2af1..907380bbf52 100644 --- a/boot/freeldr/fdebug/lang/ja-JP.rc +++ b/boot/freeldr/fdebug/lang/ja-JP.rc @@ -12,7 +12,7 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT // Menu // -IDC_FDEBUG MENU DISCARDABLE +IDC_FDEBUG MENU BEGIN POPUP "t@C(&F)" BEGIN @@ -40,7 +40,7 @@ END // Accelerator // -IDC_FDEBUG ACCELERATORS MOVEABLE PURE +IDC_FDEBUG ACCELERATORS BEGIN 63, IDM_ABOUT, ASCII, ALT // "?" 47, IDM_ABOUT, ASCII, ALT // "/" @@ -53,7 +53,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -62,13 +62,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -82,7 +82,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -116,7 +116,7 @@ END // Dialog // -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 259, 210 +IDD_ABOUTBOX DIALOGEX 22, 17, 259, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "FreeLoader Debugger ɂ‚" FONT 9, "MS UI Gothic" @@ -130,7 +130,7 @@ BEGIN ES_READONLY | WS_VSCROLL END -IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 +IDD_CONNECTION DIALOGEX 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "ڑIvV" FONT 9, "MS UI Gothic" @@ -143,7 +143,7 @@ BEGIN PUSHBUTTON "LZ",IDCANCEL,100,79,50,14 END -IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 +IDD_CAPTURE DIALOGEX 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "荞݃t@C" FONT 9, "MS UI Gothic" @@ -161,14 +161,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "fdebug" IDS_HELLO "Hello World!" IDC_FDEBUG "FDEBUG" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "̃vO̓t[\\tgEFAłBȂ͂At[\\tgEFAcɂĔsꂽ GNU General Public License (o[W 2 A]ɂĂ͂ȍ~̃o[Ŵǂꂩ) ̒߂̉ōĔЕz܂͉ς邱Ƃł܂B\r\n\r\ñvO͗Lpł邱ƂĔЕz܂A*S̖ۏ* łBƉ”\\̕ۏ؂̖ړIւ̓ḰAOɎꂽ̂܂ߑS݂܂Bڂ GNU General Public License B\r\n\r\nȂ͂̃vOƋɁAGNU General Public License ̕ꕔ󂯎͂łB󂯎ĂȂ΁At[\\tgEFAc܂ŐĂ ( the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.)B" END diff --git a/boot/freeldr/fdebug/lang/no-NO.rc b/boot/freeldr/fdebug/lang/no-NO.rc index 44418be988d..cbfa02c43ed 100644 --- a/boot/freeldr/fdebug/lang/no-NO.rc +++ b/boot/freeldr/fdebug/lang/no-NO.rc @@ -12,7 +12,7 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL // Menu // -IDC_FDEBUG MENU DISCARDABLE +IDC_FDEBUG MENU BEGIN POPUP "&Fil" BEGIN @@ -40,7 +40,7 @@ END // Accelerator // -IDC_FDEBUG ACCELERATORS MOVEABLE PURE +IDC_FDEBUG ACCELERATORS BEGIN 63, IDM_ABOUT, ASCII, ALT // "?" 47, IDM_ABOUT, ASCII, ALT // "/" @@ -53,7 +53,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -62,13 +62,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -82,7 +82,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -116,7 +116,7 @@ END // Dialog // -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 259, 210 +IDD_ABOUTBOX DIALOGEX 22, 17, 259, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Om FreeLoader feilsker" FONT 8, "MS Shell Dlg" @@ -130,7 +130,7 @@ BEGIN ES_READONLY | WS_VSCROLL END -IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 +IDD_CONNECTION DIALOGEX 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Tilkobling valg" FONT 8, "MS Shell Dlg" @@ -143,7 +143,7 @@ BEGIN PUSHBUTTON "Avbryt",IDCANCEL,100,79,50,14 END -IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 +IDD_CAPTURE DIALOGEX 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Capture File" FONT 8, "MS Shell Dlg" @@ -161,14 +161,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "fdebug" IDS_HELLO "Hei verden!" IDC_FDEBUG "FDEBUG" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Dette programmet er gratis programvare; du kan distribuere det og/eller endre det under betingelsene av GNU General Public License som er utgitt av Free Software Foundation; version 2 av lisensen, eller (etter din mening) alle senere versjoner.\r\n\r\nDette programmet er utgitt i hp for at det skal kunne brukes, men DET ER INGEN GARANTIER; uten heller forutsatt garantier av SALGBARHET eller SIKKETHET FOR EN ENKELTHET FORML. Se p GNU General Public Lisensen for mere detaljer.\r\n\r\nDu skal ha motatt en kopi av GNU General Public Lisensen sammen med denne programmet; hvis du ikke har motatt det, skriv til Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END diff --git a/boot/freeldr/fdebug/lang/pl-PL.rc b/boot/freeldr/fdebug/lang/pl-PL.rc index 67c917a4b7e..6207732adc3 100644 --- a/boot/freeldr/fdebug/lang/pl-PL.rc +++ b/boot/freeldr/fdebug/lang/pl-PL.rc @@ -12,7 +12,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT // Menu // -IDC_FDEBUG MENU DISCARDABLE +IDC_FDEBUG MENU BEGIN POPUP "&Plik" BEGIN @@ -40,7 +40,7 @@ END // Accelerator // -IDC_FDEBUG ACCELERATORS MOVEABLE PURE +IDC_FDEBUG ACCELERATORS BEGIN 63, IDM_ABOUT, ASCII, ALT // "?" 47, IDM_ABOUT, ASCII, ALT // "/" @@ -53,7 +53,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -62,13 +62,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -82,7 +82,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -116,7 +116,7 @@ END // Dialog // -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 259, 210 +IDD_ABOUTBOX DIALOGEX 22, 17, 259, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "O debuggerze FreeLoadera" FONT 8, "MS Shell Dlg" @@ -130,7 +130,7 @@ BEGIN ES_READONLY | WS_VSCROLL END -IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 +IDD_CONNECTION DIALOGEX 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Opcje połączenia" FONT 8, "MS Shell Dlg" @@ -143,7 +143,7 @@ BEGIN PUSHBUTTON "Anuluj",IDCANCEL,100,79,50,14 END -IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 +IDD_CAPTURE DIALOGEX 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Przechwyć plik" FONT 8, "MS Shell Dlg" @@ -161,14 +161,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "fdebug" IDS_HELLO "Hello World!" IDC_FDEBUG "FDEBUG" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Ten program należy do wolnego oprogramowania; możesz go rozpowszechniać i/lub modyfikować w zgodzie z zasadami licencji GNU GPL w formie w jakiej zostały opublikowane przez fundację Free Software Foundation; albo w wersji 2 Licencji albo (tu masz wybór) w jakiejkolwiek późniejszej wersji.\r\n\r\nRozpowszechniając ten program mamy nadzieję, że będzie użyteczny, ale BEZ ŻADNEJ GWARANCJI; nawet bez zakładanej gwarancji HANDLOWOŚCI, a w szczególnym przypadku zdatności. Aby poznać więcej szczegółów, zajrzyj do licencji GNU.\r\n\r\nKopia licencji GNU GPL powinna być dostarczona razem z tym programem; jeśli tak nie jest, napisz list do fundacji na adres: Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." diff --git a/boot/freeldr/fdebug/lang/ro-RO.rc b/boot/freeldr/fdebug/lang/ro-RO.rc index 73c31183be2..bcdde966f21 100644 --- a/boot/freeldr/fdebug/lang/ro-RO.rc +++ b/boot/freeldr/fdebug/lang/ro-RO.rc @@ -14,7 +14,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL // Menu // -IDC_FDEBUG MENU DISCARDABLE +IDC_FDEBUG MENU BEGIN POPUP "&Fișier" BEGIN @@ -42,7 +42,7 @@ END // Accelerator // -IDC_FDEBUG ACCELERATORS MOVEABLE PURE +IDC_FDEBUG ACCELERATORS BEGIN 63, IDM_ABOUT, ASCII, ALT // "?" 47, IDM_ABOUT, ASCII, ALT // "/" @@ -55,7 +55,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -64,13 +64,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -84,7 +84,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -118,7 +118,7 @@ END // Dialog // -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 259, 210 +IDD_ABOUTBOX DIALOGEX 22, 17, 259, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Despre depanatorul FreeLoader" FONT 8, "MS Shell Dlg" @@ -131,7 +131,7 @@ BEGIN ES_READONLY | WS_VSCROLL END -IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 +IDD_CONNECTION DIALOGEX 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Opțiuni de conectare" FONT 8, "MS Shell Dlg" @@ -144,7 +144,7 @@ BEGIN PUSHBUTTON "A&nulează", IDCANCEL,100,79,50,14 END -IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 +IDD_CAPTURE DIALOGEX 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Fișierul de captură" FONT 8, "MS Shell Dlg" @@ -162,14 +162,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "fdebug" IDS_HELLO "Salut, lume!" IDC_FDEBUG "FDEBUG" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Această aplicație este un soft public; poate fi redistribuită și/sau modificată respectând termenii Licenței Publice Generale GNU publicată de Free Software Foundation; sau respectând Licența în versiunea 2, sau (la alegere) o altă versiune ulterioară.\r\n\r\nAceastă aplicație este distribuită în speranța că va fi utilă, FĂRĂ însă NICI O GARANŢIE; nici măcar cu garanția implicită a VANDABILITĂŢII sau a UTILITĂŢII ÎNTR-UN SCOP ANUME. Consultați Licența Publică Generală GNU pentru mai multe detalii.\r\n\r\nPuteți vedea această licență aici:\r\nhttp://www.gnu.org/licenses/gpl.html\r\n\r\nDe asemenea puteți consulta traduceri neoficiale ale acestei licențe aici:\r\nhttp://www.gnu.org/licenses/translations.html" END diff --git a/boot/freeldr/fdebug/lang/ru-RU.rc b/boot/freeldr/fdebug/lang/ru-RU.rc index f27cd678292..ae16cd64e08 100644 --- a/boot/freeldr/fdebug/lang/ru-RU.rc +++ b/boot/freeldr/fdebug/lang/ru-RU.rc @@ -10,7 +10,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT // Menu // -IDC_FDEBUG MENU DISCARDABLE +IDC_FDEBUG MENU BEGIN POPUP "&Файл" BEGIN @@ -38,7 +38,7 @@ END // Accelerator // -IDC_FDEBUG ACCELERATORS MOVEABLE PURE +IDC_FDEBUG ACCELERATORS BEGIN 63, IDM_ABOUT, ASCII, ALT // "?" 47, IDM_ABOUT, ASCII, ALT // "/" @@ -51,7 +51,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -60,13 +60,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -80,7 +80,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -114,7 +114,7 @@ END // Dialog // -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 259, 210 +IDD_ABOUTBOX DIALOGEX 22, 17, 259, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "О программе Отладчик FreeLoader" FONT 8, "MS Shell Dlg" @@ -128,7 +128,7 @@ BEGIN ES_READONLY | WS_VSCROLL END -IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 +IDD_CONNECTION DIALOGEX 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Настройки соединения" FONT 8, "MS Shell Dlg" @@ -141,7 +141,7 @@ BEGIN PUSHBUTTON "Отмена",IDCANCEL,100,79,50,14 END -IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 +IDD_CAPTURE DIALOGEX 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Файл захвата" FONT 8, "MS Shell Dlg" @@ -159,14 +159,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "fdebug" IDS_HELLO "Привет мир!" IDC_FDEBUG "FDEBUG" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Эта программа является свободным программным обеспечением; Вы можете распространять и/или изменять ее в соответствии с лицензией GNU General Public License версии 2 или более поздней, опубликованной Free Software Foundation.\r\n\r\nЭта программа распространяется с надеждой, что она может быть полезна, но БЕЗ ВСЯКОЙ ГАРАНТИИ; не подразумевается даже РАБОТОСПОСОБНОСТЬ или ПРИГОДНОСТЬ ДЛЯ ВЫПОЛНЕНИЯ НЕОБХОДИМЫХ ЗАДАЧ. См. GNU General Public License для получения дополнительных сведений.\r\n\r\nВы должны получить копию лицензии GNU вместе с этой программой, в противном случае обращайтесь в Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END diff --git a/boot/freeldr/fdebug/lang/sk-SK.rc b/boot/freeldr/fdebug/lang/sk-SK.rc index 275bdc8afa0..56b18c2a0fb 100644 --- a/boot/freeldr/fdebug/lang/sk-SK.rc +++ b/boot/freeldr/fdebug/lang/sk-SK.rc @@ -12,7 +12,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT // Menu // -IDC_FDEBUG MENU DISCARDABLE +IDC_FDEBUG MENU BEGIN POPUP "&Sbor" BEGIN @@ -40,7 +40,7 @@ END // Accelerator // -IDC_FDEBUG ACCELERATORS MOVEABLE PURE +IDC_FDEBUG ACCELERATORS BEGIN 63, IDM_ABOUT, ASCII, ALT // "?" 47, IDM_ABOUT, ASCII, ALT // "/" @@ -53,7 +53,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -62,13 +62,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -82,7 +82,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -116,7 +116,7 @@ END // Dialog // -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 259, 210 +IDD_ABOUTBOX DIALOGEX 22, 17, 259, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "o je Ladenie vonho zavdzaa" FONT 8, "MS Shell Dlg" @@ -130,7 +130,7 @@ BEGIN ES_READONLY | WS_VSCROLL END -IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 +IDD_CONNECTION DIALOGEX 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Monosti spojenia" FONT 8, "MS Shell Dlg" @@ -143,7 +143,7 @@ BEGIN PUSHBUTTON "Zrui",IDCANCEL,100,79,50,14 END -IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 +IDD_CAPTURE DIALOGEX 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Sbor zachytvania" FONT 8, "MS Shell Dlg" @@ -161,14 +161,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "fdebug" IDS_HELLO "Hello World!" IDC_FDEBUG "FDEBUG" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Tento program je von softvr; mete ho ri a/alebo modifikova poda podmienok GNU Veobecnej verejnej licencie (GNU General Public License) ako bola zverejnen nadciou Free Software Foundation; bu verzie 2 tejto licencie, alebo (poda Vho uvenia) niektorej neskorej verzie.\r\n\r\nTento program je distribuovan v ndeji, e bude uiton, avak BEZ AKEJKOVEK ZRUKY; rovnako bez zruky PREDAJNOSTI alebo VHODNOSTI PRE URIT EL. Pre viac detailov si pozrite GNU Veobecn verejn licenciu (GNU General Public License).\r\n\r\nKpiu Veobecnej verejnej licencie GNU ste mali dosta spolu s tmto programom; ak nie, napte si o u na Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END diff --git a/boot/freeldr/fdebug/lang/tr-TR.rc b/boot/freeldr/fdebug/lang/tr-TR.rc index 5601564ba14..fff08c3f149 100644 --- a/boot/freeldr/fdebug/lang/tr-TR.rc +++ b/boot/freeldr/fdebug/lang/tr-TR.rc @@ -1,10 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// // Turkish resources +// +// TRANSLATORS: 2005 - un.real, 2013 - Erdem Ersoy (eersoy93) (erdemersoy@live.com) +// #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT -#pragma code_page(1252) #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// @@ -12,25 +14,25 @@ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT // Menu // -IDC_FDEBUG MENU DISCARDABLE +IDC_FDEBUG MENU BEGIN - POPUP "&Dosya" + POPUP "&Kütük" BEGIN - MENUITEM "&Balan", IDM_FILE_CONNECT - MENUITEM "Balanty &Kes", IDM_FILE_DISCONNECT, GRAYED + MENUITEM "&Bağlan", IDM_FILE_CONNECT + MENUITEM "B&ağlantıyı Kes", IDM_FILE_DISCONNECT, GRAYED MENUITEM SEPARATOR - MENUITEM "&Clear display", IDM_FILE_CLEARDISPLAY + MENUITEM "&Görüntüyü Temizle", IDM_FILE_CLEARDISPLAY MENUITEM SEPARATOR - MENUITEM "&Yakalamay Balat", IDM_FILE_STARTCAPTURE - MENUITEM "Yakalamay &Durdur", IDM_FILE_STOPCAPTURE, GRAYED + MENUITEM "&Yakalamayı Başlat", IDM_FILE_STARTCAPTURE + MENUITEM "Ya&kalamayı Durdur", IDM_FILE_STOPCAPTURE, GRAYED MENUITEM SEPARATOR - MENUITEM "Blgesel &Yank", IDM_FILE_LOCALECHO + MENUITEM "B&ölgevî Yankı", IDM_FILE_LOCALECHO MENUITEM SEPARATOR - MENUITEM "&k", IDM_EXIT + MENUITEM "&Çıkış", IDM_EXIT END - POPUP "&Yardm" + POPUP "&Yardım" BEGIN - MENUITEM "&Hakknda ...", IDM_ABOUT + MENUITEM "&Hakkında...", IDM_ABOUT END END @@ -40,7 +42,7 @@ END // Accelerator // -IDC_FDEBUG ACCELERATORS MOVEABLE PURE +IDC_FDEBUG ACCELERATORS BEGIN 63, IDM_ABOUT, ASCII, ALT // "?" 47, IDM_ABOUT, ASCII, ALT // "/" @@ -53,7 +55,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -62,13 +64,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -82,7 +84,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -116,12 +118,12 @@ END // Dialog // -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 259, 210 +IDD_ABOUTBOX DIALOGEX 22, 17, 259, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU -CAPTION "FreeLoader Debugger Hakknda" +CAPTION "FreeLoader Yanlışlık Ayıklayıcı Hakkında" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "FreeLoader Debugger v1.0\nCopyright (C) 2003\nby Brian Palmer (brianp@reactos.org)", + CONTROL "FreeLoader Yanlışlık Ayıklayıcı - Sürüm 1.0\nTelif Hakkı: 2003 - Brian Palmer\n(brianp@reactos.org)", IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,53,28, 122,26 DEFPUSHBUTTON "Tamam",IDOK,183,189,44,14,WS_GROUP @@ -130,29 +132,29 @@ BEGIN ES_READONLY | WS_VSCROLL END -IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 +IDD_CONNECTION DIALOGEX 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Balant Seenekleri" +CAPTION "Bağlantı Seçenekleri" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "COM Port deerini giriniz(rnek COM1):",IDC_STATIC,7,7,108,8 + LTEXT "COM girişini giriniz: (Örnek: COM1)",IDC_STATIC,7,7,108,8 EDITTEXT IDC_COMPORT,7,17,182,14,ES_AUTOHSCROLL - LTEXT "Baudrate deerini giriniz (e.g. 115200):",IDC_STATIC,7,38,114,8 + LTEXT "Baud hızını giriniz: (Örnek: 115200)",IDC_STATIC,7,38,114,8 EDITTEXT IDC_BAUTRATE,7,48,182,14,ES_AUTOHSCROLL DEFPUSHBUTTON "Tamam",IDOK,45,79,50,14 - PUSHBUTTON "ptal",IDCANCEL,100,79,50,14 + PUSHBUTTON "İptal",IDCANCEL,100,79,50,14 END -IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 +IDD_CAPTURE DIALOGEX 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Dosya Yakalama" +CAPTION "Kütük Yakalama" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Yakalanacak Dosya Ad:",IDC_STATIC,7,17,62,8 + LTEXT "Yakalanacak Kütük Adı:",IDC_STATIC,7,17,62,8 EDITTEXT IDC_CAPTUREFILENAME,7,26,181,14,ES_AUTOHSCROLL - PUSHBUTTON "&Gzat",IDC_BROWSE,194,26,50,14 + PUSHBUTTON "&Göz At",IDC_BROWSE,194,26,50,14 DEFPUSHBUTTON "Tamam",IDOK,139,74,50,14 - PUSHBUTTON "ptal",IDCANCEL,194,74,50,14 + PUSHBUTTON "İptal",IDCANCEL,194,74,50,14 END @@ -161,16 +163,16 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN - IDS_APP_TITLE "fdebug" - IDS_HELLO "Merhaba Dnya!" + IDS_APP_TITLE "FreeLoader Ayıklayıcı" + IDS_HELLO "Merhaba Dünyâ!" IDC_FDEBUG "FDEBUG" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN - IDS_LICENSE "Bu program zgr bir yazlmdr; zgr Yazlm Vakf'nn (Free Software Foundation) yaynlad GNU Genel Kamu Lisans'nn 2. versiyonu yada (dilerseniz) herhangi bir sonraki versiyonunun kurallarna uyarak databilir ve deitirebilirsiniz.\r\n\r\nBu program faydal olaca umularak datlmaktadr, fakat HBR GARANT VERLMEZ; ve TCAR YADA DER AMALARA UYGUNLUU hakknda aktan yada imal bir bildirim yaplmaz. Ayrntlar iin ltfen GNU Genel Kamu Lisans'n (General Public License) inceleyiniz.\r\n\r\nBu programla birlikte GNU Genel Kamu Lisans'nn da bir kopyasnn size verilmi olmas gerekir; aksi sz konusu ise, zgr Yazlm Vakf'na yaznz: Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." + IDS_LICENSE "ÖNEMLİ: Aşağıdaki metin, özgün metnin resmî olmayan çevirisidir. Çeviri metniyle özgün metin arasında ayrım olabilir. Özgün metin, çeviri metninin altındadır.\r\n\r\n***\r\n\r\nBu yazılım özgürdür, yâni bu yazılımı Özgür Yazılım Vakfı'nın yayınladığı GNU Umûmî Kamu Ruhsatı'nın 2. sürümü veyâ daha sonraki sürümleri altında yeniden dağıtabilir veyâ değiştirebilirsiniz.\r\n\r\nBu yazılım, kullanışlı olabileceği beklentisiyle dağıtılmıştır ancak bilhassa SATILABİLİRLİK ve BELİRLİ BİR AMACA UYGUNLUK açısından olmak üzere bu yazılımın HİÇBİR GÜVENCESİ YOKTUR. Daha çok bilgi için GNU Umûmî Kamu Ruhsatı'na bakınız.\r\n\r\nBu yazılımla birlikte GNU Umûmî Kamu Ruhsatı'nın bir sûretine de iye olmanız gerekir, eğer yoksa Özgür Yazılım Vakfı A.Ş.'ne (51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ABD) yazınız.\r\n\r\n***\r\n\r\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END #endif // Turkish resources diff --git a/boot/freeldr/fdebug/lang/uk-UA.rc b/boot/freeldr/fdebug/lang/uk-UA.rc index 1754cb0046b..90432feba7b 100644 --- a/boot/freeldr/fdebug/lang/uk-UA.rc +++ b/boot/freeldr/fdebug/lang/uk-UA.rc @@ -11,7 +11,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT // Menu // -IDC_FDEBUG MENU DISCARDABLE +IDC_FDEBUG MENU BEGIN POPUP "&Файл" BEGIN @@ -39,7 +39,7 @@ END // Accelerator // -IDC_FDEBUG ACCELERATORS MOVEABLE PURE +IDC_FDEBUG ACCELERATORS BEGIN 63, IDM_ABOUT, ASCII, ALT // "?" 47, IDM_ABOUT, ASCII, ALT // "/" @@ -52,7 +52,7 @@ END // TEXTINCLUDE // -2 TEXTINCLUDE DISCARDABLE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -61,13 +61,13 @@ BEGIN "\0" END -3 TEXTINCLUDE DISCARDABLE +3 TEXTINCLUDE BEGIN "\r\n" "\0" END -1 TEXTINCLUDE DISCARDABLE +1 TEXTINCLUDE BEGIN "resource.h\0" END @@ -81,7 +81,7 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO DISCARDABLE +GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN @@ -115,7 +115,7 @@ END // Dialog // -IDD_ABOUTBOX DIALOGEX DISCARDABLE 22, 17, 259, 210 +IDD_ABOUTBOX DIALOGEX 22, 17, 259, 210 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU CAPTION "Про програму Налагоджувач FreeLoader" FONT 8, "MS Shell Dlg" @@ -129,7 +129,7 @@ BEGIN ES_READONLY | WS_VSCROLL END -IDD_CONNECTION DIALOGEX DISCARDABLE 0, 0, 196, 100 +IDD_CONNECTION DIALOGEX 0, 0, 196, 100 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Настройки з'єднання" FONT 8, "MS Shell Dlg" @@ -142,7 +142,7 @@ BEGIN PUSHBUTTON "Скасувати",IDCANCEL,100,79,50,14 END -IDD_CAPTURE DIALOGEX DISCARDABLE 0, 0, 251, 95 +IDD_CAPTURE DIALOGEX 0, 0, 251, 95 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Файл захоплення" FONT 8, "MS Shell Dlg" @@ -160,14 +160,14 @@ END // String Table // -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_APP_TITLE "fdebug" IDS_HELLO "Привіт Світ!" IDC_FDEBUG "FDEBUG" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_LICENSE "Це вільне програмне забезпечення; Ви можете розповсюджувати її та змінювати, дотримуючись умови Відкритої ліцензійної угоди GNU, опублікованої Фондом вільного програмного забезпечення; або редакції 2 Угоди, або будь-якої редакції, випущеної пізніше.\r\n\r\nЦя програма розповсюджується в надії на те, що вона виявиться корисною, але БЕЗ БУДЬ-ЯКИХ ГАРАНТІЙ, включаючи УЯВНОЮ ГАРАНТІЄЮ ЯКОСТІ або ПРИДАТНОСТІ для певних цілей. Подробиці містяться у Відкритій ліцензійній угоді GNU.\r\n\r\nРазом з цією програмою повинен поширюватися примірник Відкритої ліцензійної угоди GNU. Якщо він відсутній, повідомте про це в Фонд вільного програмного забезпечення (Free Software Foundation, Inc.), 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA." END diff --git a/boot/freeldr/freeldr/CMakeLists.txt b/boot/freeldr/freeldr/CMakeLists.txt index 924a75d71cc..d837fd65e09 100644 --- a/boot/freeldr/freeldr/CMakeLists.txt +++ b/boot/freeldr/freeldr/CMakeLists.txt @@ -151,7 +151,7 @@ else() #TBD endif() -if((NOT MSVC) AND (CMAKE_VERSION VERSION_GREATER 2.8.7)) +if(NOT MSVC) add_library(freeldr_common OBJECT ${FREELDR_COMMON_SOURCE} ${FREELDR_COMMON_ASM_SOURCE}) else() add_asm_files(freeldr_common_asm ${FREELDR_COMMON_ASM_SOURCE}) @@ -172,7 +172,7 @@ if(NOT MSVC) list(APPEND FREELDR_BASE_SOURCE ${CMAKE_CURRENT_BINARY_DIR}/freeldr.def) endif() -if((NOT MSVC) AND (CMAKE_VERSION VERSION_GREATER 2.8.7)) +if(NOT MSVC) add_library(freeldr_pe SHARED $ ${FREELDR_BASE_SOURCE}) add_library(freeldr_pe_dbg SHARED EXCLUDE_FROM_ALL $ ${FREELDR_BASE_SOURCE}) if(SEPARATE_DBG) @@ -205,13 +205,13 @@ if(ARCH STREQUAL "i386") target_link_libraries(freeldr_pe_dbg mini_hal) endif() -if(MSVC OR (NOT CMAKE_VERSION VERSION_GREATER 2.8.7)) +if(MSVC) target_link_libraries(freeldr_pe freeldr_common) target_link_libraries(freeldr_pe_dbg freeldr_common) endif() -target_link_libraries(freeldr_pe cportlib rossym cmlib rtl libcntpr) -target_link_libraries(freeldr_pe_dbg cportlib rossym cmlib rtl libcntpr) +target_link_libraries(freeldr_pe cportlib cmlib rtl libcntpr) +target_link_libraries(freeldr_pe_dbg cportlib cmlib rtl libcntpr) # add_pch(freeldr_pe include/freeldr.h) @@ -236,7 +236,7 @@ if(ARCH STREQUAL "i386" OR ARCH STREQUAL "amd64") list(APPEND SETUPLDR_SOURCE windows/setupldr.c) endif() -if((NOT MSVC) AND (CMAKE_VERSION VERSION_GREATER 2.8.7)) +if(NOT MSVC) add_library(setupldr_pe SHARED $ ${FREELDR_BASE_SOURCE} ${SETUPLDR_SOURCE}) add_library(setupldr_pe_dbg SHARED EXCLUDE_FROM_ALL $ ${FREELDR_BASE_SOURCE} ${SETUPLDR_SOURCE}) if(SEPARATE_DBG) @@ -272,13 +272,13 @@ if(ARCH STREQUAL "i386") target_link_libraries(setupldr_pe_dbg mini_hal) endif() -if(MSVC OR (NOT CMAKE_VERSION VERSION_GREATER 2.8.7)) +if(MSVC) target_link_libraries(setupldr_pe freeldr_common) target_link_libraries(setupldr_pe_dbg freeldr_common) endif() -target_link_libraries(setupldr_pe cportlib rossym cmlib rtl libcntpr) -target_link_libraries(setupldr_pe_dbg cportlib rossym cmlib rtl libcntpr) +target_link_libraries(setupldr_pe cportlib cmlib rtl libcntpr) +target_link_libraries(setupldr_pe_dbg cportlib cmlib rtl libcntpr) add_dependencies(setupldr_pe asm) add_dependencies(setupldr_pe_dbg asm) diff --git a/boot/freeldr/freeldr/comm/rs232.c b/boot/freeldr/freeldr/comm/rs232.c index 7f0d9d837a6..f589a13275d 100644 --- a/boot/freeldr/freeldr/comm/rs232.c +++ b/boot/freeldr/freeldr/comm/rs232.c @@ -109,7 +109,7 @@ BOOLEAN Rs232PortPollByte(PUCHAR ByteReceived) if (PortInitialized == FALSE) return FALSE; - return (CpGetByte(&Rs232ComPort, ByteReceived, FALSE) == CP_GET_SUCCESS); + return (CpGetByte(&Rs232ComPort, ByteReceived, FALSE, FALSE) == CP_GET_SUCCESS); } */ diff --git a/boot/freeldr/freeldr/fs/ext2.c b/boot/freeldr/freeldr/fs/ext2.c index 3ccb5c1c1a1..aa78dfa5153 100644 --- a/boot/freeldr/freeldr/fs/ext2.c +++ b/boot/freeldr/freeldr/fs/ext2.c @@ -866,7 +866,9 @@ BOOLEAN Ext2ReadPartialBlock(ULONG BlockNumber, ULONG StartingOffset, ULONG Leng TRACE("Ext2ReadPartialBlock() BlockNumber = %d StartingOffset = %d Length = %d Buffer = 0x%x\n", BlockNumber, StartingOffset, Length, Buffer); - TempBuffer = HeapAllocate(FrLdrTempHeap, Ext2BlockSizeInBytes, '2TXE'); + TempBuffer = FrLdrHeapAllocate(FrLdrTempHeap, + Ext2BlockSizeInBytes, + '2TXE'); if (!Ext2ReadBlock(BlockNumber, TempBuffer)) { @@ -875,7 +877,7 @@ BOOLEAN Ext2ReadPartialBlock(ULONG BlockNumber, ULONG StartingOffset, ULONG Leng memcpy(Buffer, ((PUCHAR)TempBuffer + StartingOffset), Length); - HeapFree(FrLdrTempHeap, TempBuffer, '2TXE'); + FrLdrHeapFree(FrLdrTempHeap, TempBuffer, '2TXE'); return TRUE; } @@ -1098,9 +1100,9 @@ BOOLEAN Ext2CopyIndirectBlockPointers(ULONG* BlockList, ULONG* CurrentBlockInLis BlockPointersPerBlock = Ext2BlockSizeInBytes / sizeof(ULONG); - BlockBuffer = HeapAllocate(FrLdrTempHeap, - Ext2BlockSizeInBytes, - '2TXE'); + BlockBuffer = FrLdrHeapAllocate(FrLdrTempHeap, + Ext2BlockSizeInBytes, + '2TXE'); if (!BlockBuffer) { return FALSE; @@ -1117,7 +1119,7 @@ BOOLEAN Ext2CopyIndirectBlockPointers(ULONG* BlockList, ULONG* CurrentBlockInLis (*CurrentBlockInList)++; } - HeapFree(FrLdrTempHeap, BlockBuffer, '2TXE'); + FrLdrHeapFree(FrLdrTempHeap, BlockBuffer, '2TXE'); return TRUE; } diff --git a/boot/freeldr/freeldr/fs/fat.c b/boot/freeldr/freeldr/fs/fat.c index bb6a4a04cd9..a58aace801d 100644 --- a/boot/freeldr/freeldr/fs/fat.c +++ b/boot/freeldr/freeldr/fs/fat.c @@ -911,7 +911,9 @@ BOOLEAN FatGetFatEntry(PFAT_VOLUME_INFO Volume, ULONG Cluster, ULONG* ClusterPoi //TRACE("FatGetFatEntry() Retrieving FAT entry for cluster %d.\n", Cluster); // We need a buffer for 2 secors - ReadBuffer = HeapAllocate(FrLdrTempHeap, 2 * Volume->BytesPerSector, 'xTAF'); + ReadBuffer = FrLdrHeapAllocate(FrLdrTempHeap, + 2 * Volume->BytesPerSector, + 'xTAF'); if (!ReadBuffer) { return FALSE; @@ -997,7 +999,7 @@ BOOLEAN FatGetFatEntry(PFAT_VOLUME_INFO Volume, ULONG Cluster, ULONG* ClusterPoi //TRACE("FAT entry is 0x%x.\n", fat); - HeapFree(FrLdrTempHeap, ReadBuffer, 'xTAF'); + FrLdrHeapFree(FrLdrTempHeap, ReadBuffer, 'xTAF'); *ClusterPointer = fat; @@ -1181,7 +1183,7 @@ BOOLEAN FatReadPartialCluster(PFAT_VOLUME_INFO Volume, ULONG ClusterNumber, ULON // Calculate rounded up read size ReadSize = SectorCount * Volume->BytesPerSector; - ReadBuffer = HeapAllocate(FrLdrTempHeap, ReadSize, 'xTAF'); + ReadBuffer = FrLdrHeapAllocate(FrLdrTempHeap, ReadSize, 'xTAF'); if (!ReadBuffer) { return FALSE; @@ -1193,7 +1195,7 @@ BOOLEAN FatReadPartialCluster(PFAT_VOLUME_INFO Volume, ULONG ClusterNumber, ULON status = TRUE; } - HeapFree(FrLdrTempHeap, ReadBuffer, 'xTAF'); + FrLdrHeapFree(FrLdrTempHeap, ReadBuffer, 'xTAF'); return status; } diff --git a/boot/freeldr/freeldr/include/mm.h b/boot/freeldr/freeldr/include/mm.h index 8bf68e8f05b..485823d758e 100644 --- a/boot/freeldr/freeldr/include/mm.h +++ b/boot/freeldr/freeldr/include/mm.h @@ -125,34 +125,33 @@ extern PVOID FrLdrDefaultHeap; extern PVOID FrLdrTempHeap; PVOID -HeapCreate( +FrLdrHeapCreate( SIZE_T MaximumSize, TYPE_OF_MEMORY MemoryType); VOID -HeapDestroy( +FrLdrHeapDestroy( PVOID HeapHandle); VOID -HeapRelease( +FrLdrHeapRelease( PVOID HeapHandle); VOID -HeapVerify( +FrLdrHeapVerify( PVOID HeapHandle); VOID -HeapCleanupAll(VOID); +FrLdrHeapCleanupAll(VOID); PVOID -HeapAllocate( +FrLdrHeapAllocate( PVOID HeapHandle, SIZE_T ByteSize, ULONG Tag); VOID -HeapFree( +FrLdrHeapFree( PVOID HeapHandle, PVOID Pointer, ULONG Tag); - diff --git a/boot/freeldr/freeldr/mm/heap.c b/boot/freeldr/freeldr/mm/heap.c index 54c46d4b2e8..64431334e59 100644 --- a/boot/freeldr/freeldr/mm/heap.c +++ b/boot/freeldr/freeldr/mm/heap.c @@ -66,7 +66,7 @@ typedef struct _HEAP } HEAP, *PHEAP; PVOID -HeapCreate( +FrLdrHeapCreate( SIZE_T MaximumSize, TYPE_OF_MEMORY MemoryType) { @@ -137,7 +137,7 @@ HeapCreate( } VOID -HeapDestroy( +FrLdrHeapDestroy( PVOID HeapHandle) { PHEAP Heap = HeapHandle; @@ -151,7 +151,7 @@ HeapDestroy( #ifdef FREELDR_HEAP_VERIFIER VOID -HeapVerify( +FrLdrHeapVerify( PVOID HeapHandle) { PHEAP Heap = HeapHandle; @@ -176,7 +176,7 @@ HeapVerify( #endif /* FREELDR_HEAP_VERIFIER */ VOID -HeapRelease( +FrLdrHeapRelease( PVOID HeapHandle) { PHEAP Heap = HeapHandle; @@ -242,7 +242,7 @@ HeapRelease( } VOID -HeapCleanupAll(VOID) +FrLdrHeapCleanupAll(VOID) { PHEAP Heap; @@ -257,7 +257,7 @@ HeapCleanupAll(VOID) /* Release fre pages */ - HeapRelease(FrLdrDefaultHeap); + FrLdrHeapRelease(FrLdrDefaultHeap); Heap = FrLdrTempHeap; TRACE("Heap statistics for temp heap:\n" @@ -267,11 +267,11 @@ HeapCleanupAll(VOID) Heap->NumAllocs, Heap->NumFrees); /* Destroy the heap */ - HeapDestroy(FrLdrTempHeap); + FrLdrHeapDestroy(FrLdrTempHeap); } static VOID -HeapRemoveFreeList( +FrLdrHeapRemoveFreeList( PHEAP Heap, PHEAP_BLOCK Block) { @@ -289,7 +289,7 @@ HeapRemoveFreeList( } static VOID -HeapInsertFreeList( +FrLdrHeapInsertFreeList( PHEAP Heap, PHEAP_BLOCK FreeBlock) { @@ -311,7 +311,7 @@ HeapInsertFreeList( } PVOID -HeapAllocate( +FrLdrHeapAllocate( PVOID HeapHandle, SIZE_T ByteSize, ULONG Tag) @@ -323,7 +323,7 @@ HeapAllocate( #ifdef FREELDR_HEAP_VERIFIER /* Verify the heap */ - HeapVerify(HeapHandle); + FrLdrHeapVerify(HeapHandle); /* Add space for a size field and 2 redzones */ ByteSize += REDZONE_ALLOCATION; @@ -357,7 +357,7 @@ HeapAllocate( Block->Tag = Tag; /* Remove this entry from the free list */ - HeapRemoveFreeList(Heap, Block); + FrLdrHeapRemoveFreeList(Heap, Block); /* Calculate the remaining size */ Remaining = Block->Size - BlockSize; @@ -376,7 +376,7 @@ HeapAllocate( NextBlock->Size = Remaining - 1; NextBlock->PreviousSize = BlockSize; BlockSize = NextBlock->Size; - HeapInsertFreeList(Heap, NextBlock); + FrLdrHeapInsertFreeList(Heap, NextBlock); /* Advance to the next block */ NextBlock = NextBlock + 1 + BlockSize; @@ -426,7 +426,7 @@ HeapAllocate( } VOID -HeapFree( +FrLdrHeapFree( PVOID HeapHandle, PVOID Pointer, ULONG Tag) @@ -439,7 +439,7 @@ HeapFree( #ifdef FREELDR_HEAP_VERIFIER /* Verify the heap */ - HeapVerify(HeapHandle); + FrLdrHeapVerify(HeapHandle); #endif /* Check if the block is really inside this heap */ @@ -485,7 +485,7 @@ HeapFree( { /* Merge next block into current */ Block->Size += NextBlock->Size + 1; - HeapRemoveFreeList(Heap, NextBlock); + FrLdrHeapRemoveFreeList(Heap, NextBlock); NextBlock = Block + Block->Size + 1; } @@ -501,7 +501,7 @@ HeapFree( else { /* Insert the entry into the free list */ - HeapInsertFreeList(Heap, Block); + FrLdrHeapInsertFreeList(Heap, Block); } /* Update the next block's back link */ @@ -519,11 +519,11 @@ MmInitializeHeap(PVOID PageLookupTable) TRACE("MmInitializeHeap()\n"); /* Create the default heap */ - FrLdrDefaultHeap = HeapCreate(DEFAULT_HEAP_SIZE, LoaderOsloaderHeap); + FrLdrDefaultHeap = FrLdrHeapCreate(DEFAULT_HEAP_SIZE, LoaderOsloaderHeap); ASSERT(FrLdrDefaultHeap); /* Create a temporary heap */ - FrLdrTempHeap = HeapCreate(TEMP_HEAP_SIZE, LoaderFirmwareTemporary); + FrLdrTempHeap = FrLdrHeapCreate(TEMP_HEAP_SIZE, LoaderFirmwareTemporary); ASSERT(FrLdrTempHeap); TRACE("MmInitializeHeap() done, default heap %p, temp heap %p\n", @@ -533,13 +533,13 @@ MmInitializeHeap(PVOID PageLookupTable) PVOID MmHeapAlloc(SIZE_T MemorySize) { - return HeapAllocate(FrLdrDefaultHeap, MemorySize, 'pHmM'); + return FrLdrHeapAllocate(FrLdrDefaultHeap, MemorySize, 'pHmM'); } VOID MmHeapFree(PVOID MemoryPointer) { - HeapFree(FrLdrDefaultHeap, MemoryPointer, 'pHmM'); + FrLdrHeapFree(FrLdrDefaultHeap, MemoryPointer, 'pHmM'); } PVOID @@ -549,7 +549,7 @@ ExAllocatePoolWithTag( IN SIZE_T NumberOfBytes, IN ULONG Tag) { - return HeapAllocate(FrLdrDefaultHeap, NumberOfBytes, Tag); + return FrLdrHeapAllocate(FrLdrDefaultHeap, NumberOfBytes, Tag); } PVOID @@ -558,7 +558,7 @@ ExAllocatePool( IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes) { - return HeapAllocate(FrLdrDefaultHeap, NumberOfBytes, 0); + return FrLdrHeapAllocate(FrLdrDefaultHeap, NumberOfBytes, 0); } VOID @@ -566,7 +566,7 @@ NTAPI ExFreePool( IN PVOID P) { - HeapFree(FrLdrDefaultHeap, P, 0); + FrLdrHeapFree(FrLdrDefaultHeap, P, 0); } VOID @@ -575,7 +575,7 @@ ExFreePoolWithTag( IN PVOID P, IN ULONG Tag) { - HeapFree(FrLdrDefaultHeap, P, Tag); + FrLdrHeapFree(FrLdrDefaultHeap, P, Tag); } PVOID @@ -587,7 +587,7 @@ RtlAllocateHeap( { PVOID ptr; - ptr = HeapAllocate(FrLdrDefaultHeap, Size, ' ltR'); + ptr = FrLdrHeapAllocate(FrLdrDefaultHeap, Size, ' ltR'); if (ptr && (Flags & HEAP_ZERO_MEMORY)) { RtlZeroMemory(ptr, Size); @@ -603,7 +603,6 @@ RtlFreeHeap( IN ULONG Flags, IN PVOID HeapBase) { - HeapFree(FrLdrDefaultHeap, HeapBase, ' ltR'); + FrLdrHeapFree(FrLdrDefaultHeap, HeapBase, ' ltR'); return TRUE; } - diff --git a/boot/freeldr/freeldr/windows/headless.c b/boot/freeldr/freeldr/windows/headless.c index 515593adf46..4c0c3bf6782 100644 --- a/boot/freeldr/freeldr/windows/headless.c +++ b/boot/freeldr/freeldr/windows/headless.c @@ -45,7 +45,7 @@ VOID WinLdrLoadGUID(OUT PGUID SystemGuid) { PSYSID_UUID_ENTRY CurrentAddress; - + CurrentAddress = (PSYSID_UUID_ENTRY)0xE0000; while (CurrentAddress < (PSYSID_UUID_ENTRY)0x100000) { @@ -56,7 +56,7 @@ WinLdrLoadGUID(OUT PGUID SystemGuid) } CurrentAddress = (PSYSID_UUID_ENTRY)((ULONG_PTR)CurrentAddress + 1); } - + RtlZeroMemory(SystemGuid, SYSID_UUID_DATA_SIZE); } @@ -78,7 +78,7 @@ WinLdrPortInitialize(IN ULONG BaudRate, { switch (PortNumber) { - case 1: + case 1: PortAddress = (PUCHAR)0x3F8; break; @@ -111,7 +111,7 @@ WinLdrPortInitialize(IN ULONG BaudRate, PortNumber = 1; } } - + /* Not yet supported */ ASSERT(LoaderRedirectionInformation.IsMMIODevice == FALSE); @@ -128,22 +128,22 @@ WinLdrPortInitialize(IN ULONG BaudRate, return TRUE; } } - + return FALSE; } VOID WinLdrPortPutByte(IN ULONG PortId, - IN UCHAR Data) + IN UCHAR Byte) { - CpPutByte(&Port[PortId], Data); + CpPutByte(&Port[PortId], Byte); } BOOLEAN -WinLdrPortGetByte(IN ULONG PortId, - OUT PUCHAR Data) +WinLdrPortGetByte(IN ULONG PortId, + OUT PUCHAR Byte) { - return CpGetByte(&Port[PortId], Data, TRUE, FALSE) == CP_GET_SUCCESS; + return CpGetByte(&Port[PortId], Byte, TRUE, FALSE) == CP_GET_SUCCESS; } BOOLEAN @@ -156,7 +156,7 @@ WinLdrPortPollOnly(IN ULONG PortId) VOID WinLdrEnableFifo(IN ULONG PortId, - IN BOOLEAN Enable) + IN BOOLEAN Enable) { CpEnableFifo(Port[PortId].Address, Enable); } @@ -168,11 +168,11 @@ WinLdrInitializeHeadlessPort(VOID) PUCHAR PortAddress; PCHAR AnsiReset = "\x1B[m"; ULONG i; - + PortNumber = LoaderRedirectionInformation.PortNumber; PortAddress = LoaderRedirectionInformation.PortAddress; BaudRate = LoaderRedirectionInformation.BaudRate; - + /* Pick a port address */ if (PortNumber) { @@ -204,7 +204,7 @@ WinLdrInitializeHeadlessPort(VOID) WinLdrTerminalConnected = FALSE; return; } - + /* Call arch code to initialize the port */ PortAddress = LoaderRedirectionInformation.PortAddress; WinLdrTerminalConnected = WinLdrPortInitialize( @@ -227,9 +227,9 @@ WinLdrInitializeHeadlessPort(VOID) BaudRate = 9600; LoaderRedirectionInformation.BaudRate = BaudRate; } - + WinLdrTerminalDelay = (10 * 1000 * 1000) / (BaudRate / 10) / 6; - + /* Sent an ANSI reset sequence to get the terminal up and running */ for (i = 0; i < strlen(AnsiReset); i++) { @@ -277,7 +277,7 @@ WinLdrSetupEms(IN PCHAR BootOptions) } } } - + /* Use a direction baudrate if one was given */ RedirectPort = strstr(BootOptions, "/redirectbaudrate="); if (RedirectPort) @@ -299,7 +299,7 @@ WinLdrSetupEms(IN PCHAR BootOptions) LoaderRedirectionInformation.BaudRate = 9600; } } - + /* Enable headless support if parameters were found */ if (LoaderRedirectionInformation.PortNumber) { @@ -307,7 +307,9 @@ WinLdrSetupEms(IN PCHAR BootOptions) { LoaderRedirectionInformation.BaudRate = 9600; } - + WinLdrInitializeHeadlessPort(); } } + +/* EOF */ diff --git a/boot/freeldr/freeldr/windows/winldr.c b/boot/freeldr/freeldr/windows/winldr.c index 6163933901f..012e8e8a555 100644 --- a/boot/freeldr/freeldr/windows/winldr.c +++ b/boot/freeldr/freeldr/windows/winldr.c @@ -144,9 +144,9 @@ WinLdrInitializePhase1(PLOADER_PARAMETER_BLOCK LoaderBlock, PARC_DISK_SIGNATURE_EX ArcDiskSig; /* Allocate the ARC structure */ - ArcDiskSig = HeapAllocate(FrLdrDefaultHeap, - sizeof(ARC_DISK_SIGNATURE_EX), - 'giSD'); + ArcDiskSig = FrLdrHeapAllocate(FrLdrDefaultHeap, + sizeof(ARC_DISK_SIGNATURE_EX), + 'giSD'); /* Copy the data over */ ArcDiskSig->DiskSignature.Signature = reactos_arc_disk_info[i].Signature; diff --git a/boot/freeldr/freeldr/windows/wlmemory.c b/boot/freeldr/freeldr/windows/wlmemory.c index 0c3d3098a8b..6e45f45b510 100644 --- a/boot/freeldr/freeldr/windows/wlmemory.c +++ b/boot/freeldr/freeldr/windows/wlmemory.c @@ -188,7 +188,7 @@ WinLdrSetupMemoryLayout(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock) //BOOLEAN Status; /* Cleanup heap */ - HeapCleanupAll(); + FrLdrHeapCleanupAll(); // // Creating a suitable memory map for Windows can be tricky, so let's diff --git a/cmake/CMakeMacros.cmake b/cmake/CMakeMacros.cmake index 63a99ce0c21..798327b379d 100644 --- a/cmake/CMakeMacros.cmake +++ b/cmake/CMakeMacros.cmake @@ -189,7 +189,7 @@ macro(dir_to_num dir var) set(${var} 16) elseif(${dir} STREQUAL reactos/system32/wbem) set(${var} 17) - else() + else() message(FATAL_ERROR "Wrong destination: ${dir}") endif() endmacro() @@ -207,7 +207,7 @@ function(add_cd_file) endif() if(NOT _CD_FOR) - message(FATAL_ERROR "You must provide a cd name (or "all" for all of them) to install the file on!") + message(FATAL_ERROR "You must provide a cd name (or \"all\" for all of them) to install the file on!") endif() #get file if we need to @@ -345,6 +345,32 @@ if(NOT MSVC_IDE) _add_executable(${name} ${ARGN}) add_clean_target(${name}) endfunction() +elseif(USE_FOLDER_STRUCTURE) + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + string(LENGTH ${CMAKE_SOURCE_DIR} CMAKE_SOURCE_DIR_LENGTH) + + function(add_custom_target name) + _add_custom_target(${name} ${ARGN}) + string(SUBSTRING ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR_LENGTH} -1 CMAKE_CURRENT_SOURCE_DIR_RELATIVE) + set_property(TARGET "${name}" PROPERTY FOLDER "${CMAKE_CURRENT_SOURCE_DIR_RELATIVE}") + endfunction() + + function(add_library name) + _add_library(${name} ${ARGN}) + get_target_property(_target_excluded ${name} EXCLUDE_FROM_ALL) + if(_target_excluded AND ${name} MATCHES "^lib.*") + set_property(TARGET "${name}" PROPERTY FOLDER "Importlibs") + else() + string(SUBSTRING ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR_LENGTH} -1 CMAKE_CURRENT_SOURCE_DIR_RELATIVE) + set_property(TARGET "${name}" PROPERTY FOLDER "${CMAKE_CURRENT_SOURCE_DIR_RELATIVE}") + endif() + endfunction() + + function(add_executable name) + _add_executable(${name} ${ARGN}) + string(SUBSTRING ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR_LENGTH} -1 CMAKE_CURRENT_SOURCE_DIR_RELATIVE) + set_property(TARGET "${name}" PROPERTY FOLDER "${CMAKE_CURRENT_SOURCE_DIR_RELATIVE}") + endfunction() endif() if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") @@ -527,7 +553,7 @@ function(get_defines OUTPUT_VAR) set(${OUTPUT_VAR} ${__tmp_var} PARENT_SCOPE) endfunction() -if(NOT MSVC AND (CMAKE_VERSION VERSION_GREATER 2.8.7)) +if(NOT MSVC) function(add_object_library _target) add_library(${_target} OBJECT ${ARGN}) endfunction() @@ -536,3 +562,9 @@ else() add_library(${_target} ${ARGN}) endfunction() endif() + +if(KDBG) + set(ROSSYM_LIB "rossym") +else() + set(ROSSYM_LIB "") +endif() diff --git a/cmake/Platform/Windows-MSVC.cmake b/cmake/Platform/Windows-MSVC.cmake index cf117c66c44..94ed324c9b1 100644 --- a/cmake/Platform/Windows-MSVC.cmake +++ b/cmake/Platform/Windows-MSVC.cmake @@ -227,7 +227,6 @@ macro(__windows_compiler_msvc lang) set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE " ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO}${_COMPILE_${lang}} /FoNUL /FAs /Fa /c ${CMAKE_END_TEMP_FILE}") - set(CMAKE_${lang}_COMPILER_LINKER_OPTION_FLAG_EXECUTABLE "/link") set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS 1) set(CMAKE_${lang}_LINK_EXECUTABLE "${_CMAKE_VS_LINK_EXE} ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out: /implib: /pdb: /version:. ${CMAKE_END_TEMP_FILE}") diff --git a/cmake/baseaddress.cmake b/cmake/baseaddress.cmake index 75c9f10f3f9..e4ea958b98f 100644 --- a/cmake/baseaddress.cmake +++ b/cmake/baseaddress.cmake @@ -40,7 +40,7 @@ set(baseaddress_avicap32 0x75ab0000) set(baseaddress_cabinet 0x75a60000) set(baseaddress_dsound 0x759f0000) set(baseaddress_glu32 0x758e0000) -set(baseaddress_opengl32 0x758a0000) +set(baseaddress_opengl32 0x72bc0000) set(baseaddress_riched20 0x75810000) set(baseaddress_smdll 0x757f0000) set(baseaddress_userenv 0x757a0000) @@ -163,7 +163,6 @@ set(baseaddress_mcicda 0x73460000) set(baseaddress_mciqtz32 0x73420000) set(baseaddress_mciseq 0x733f0000) set(baseaddress_mciwave 0x733c0000) -set(baseaddress_mesa32 0x72bc0000) set(baseaddress_midimap 0x72b90000) set(baseaddress_mlang 0x72b50000) set(baseaddress_mmdrv 0x72b20000) diff --git a/cmake/config.cmake b/cmake/config.cmake index d3619a524a0..9dd983b5fc9 100644 --- a/cmake/config.cmake +++ b/cmake/config.cmake @@ -71,15 +71,8 @@ set(GENERATE_DEPENDENCY_GRAPH FALSE CACHE BOOL "Whether to create a graphml dependency of dlls.") if(MSVC) - set(_PREFAST_ FALSE CACHE BOOL "Whether to enable PREFAST while compiling.") set(_VS_ANALYZE_ FALSE CACHE BOOL "Whether to enable static analysis while compiling.") - -else() - -set(USE_PSEH3 FALSE CACHE BOOL -"Whether to use the new PSEH3 library (requires GCC 4.5 and newer).") - endif() diff --git a/cmake/gcc.cmake b/cmake/gcc.cmake index 4c3872763e6..669ffe6bfd3 100644 --- a/cmake/gcc.cmake +++ b/cmake/gcc.cmake @@ -9,6 +9,14 @@ if(NOT DEFINED SEPARATE_DBG) set(SEPARATE_DBG FALSE) endif() +if(NOT DEFINED USE_PSEH3) + set(USE_PSEH3 0) +endif() + +if(USE_PSEH3) + add_definitions(-D_USE_PSEH3=1) +endif() + # Compiler Core add_compile_flags("-pipe -fms-extensions -fno-strict-aliasing") if(GCC_VERSION VERSION_GREATER 4.7) diff --git a/cmake/msvc.cmake b/cmake/msvc.cmake index b92107b89d5..2c1f4df26b6 100644 --- a/cmake/msvc.cmake +++ b/cmake/msvc.cmake @@ -23,13 +23,22 @@ add_definitions(/Dinline=__inline /D__STDC__=1) add_compile_flags("/X /GR- /EHs-c- /GS- /Zl /W3") # HACK: for VS 11+ we need to explicitly disable SSE, which is off by -# default for older compilers. See bug #7174 +# default for older compilers. See CORE-6507 if (MSVC_VERSION GREATER 1699 AND ARCH STREQUAL "i386") add_compile_flags("/arch:IA32") endif () -# C4700 is almost always likely to result in broken code, so mark it as an error -add_compile_flags("/we4700") +# C++ exception specification ignored... yeah we don't care +add_compile_flags("/wd4290") + +# The following warnings are treated as errors: +# - C4047: different level of indirection +# - C4090: different 'modifier' qualifiers (for C programs only; +# for C++ programs, the compiler error C2440 is issued) +# - C4098: void function returning a value +# - C4700: uninitialized variable usage +##add_compile_flags("/we4047 /we4090 /we4098 /we4700") +add_compile_flags("/we4047 /we4098 /we4700") # Debugging #if(${CMAKE_BUILD_TYPE} STREQUAL "Debug") @@ -45,13 +54,14 @@ endif() if(MSVC_IDE) add_compile_flags("/MP") + if(NOT DEFINED USE_FOLDER_STRUCTURE) + set(USE_FOLDER_STRUCTURE FALSE) + endif() endif() -if(${_MACHINE_ARCH_FLAG} MATCHES X86) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO /INCREMENTAL:NO /SAFESEH:NO /NODEFAULTLIB /RELEASE") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /MANIFEST:NO /INCREMENTAL:NO /SAFESEH:NO /NODEFAULTLIB /RELEASE") - set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /MANIFEST:NO /INCREMENTAL:NO /SAFESEH:NO /NODEFAULTLIB /RELEASE") -endif() +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO /INCREMENTAL:NO /SAFESEH:NO /NODEFAULTLIB /RELEASE") +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /MANIFEST:NO /INCREMENTAL:NO /SAFESEH:NO /NODEFAULTLIB /RELEASE") +set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /MANIFEST:NO /INCREMENTAL:NO /SAFESEH:NO /NODEFAULTLIB /RELEASE") if(MSVC_IDE AND (CMAKE_VERSION MATCHES "ReactOS")) # for VS builds we'll only have en-US in resource files @@ -100,7 +110,11 @@ function(set_entrypoint _module _entrypoint) endfunction() function(set_subsystem MODULE SUBSYSTEM) - add_target_link_flags(${MODULE} "/SUBSYSTEM:${SUBSYSTEM}") + if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 17) + add_target_link_flags(${MODULE} "/SUBSYSTEM:${SUBSYSTEM},5.01") + else() + add_target_link_flags(${MODULE} "/SUBSYSTEM:${SUBSYSTEM}") + endif() endfunction() function(set_image_base MODULE IMAGE_BASE) @@ -144,13 +158,13 @@ function(generate_import_lib _libname _dllname _spec_file) set(_def_file ${CMAKE_CURRENT_BINARY_DIR}/${_libname}_exp.def) set(_asm_stubs_file ${CMAKE_CURRENT_BINARY_DIR}/${_libname}_stubs.asm) - + # Generate the asm stub file and the def file for import library add_custom_command( OUTPUT ${_asm_stubs_file} ${_def_file} COMMAND native-spec2def --ms --kill-at -a=${SPEC2DEF_ARCH} --implib -n=${_dllname} -d=${_def_file} -l=${_asm_stubs_file} ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_spec_file} native-spec2def) - + if(MSVC_IDE) # Compile the generated asm stub file add_custom_command( @@ -185,7 +199,7 @@ else() set(SPEC2DEF_ARCH i386) endif() function(spec2def _dllname _spec_file) - # do we also want to add impotlib targets? + # do we also want to add importlib targets? if(${ARGC} GREATER 2) if(${ARGN} STREQUAL "ADD_IMPORTLIB") set(__add_importlib TRUE) diff --git a/configure.sh b/configure.sh index e8595b7dd54..8893d4e9390 100755 --- a/configure.sh +++ b/configure.sh @@ -21,14 +21,14 @@ while [ $# -gt 0 ]; do -D) shift if echo "x$1" | grep 'x?*=*' > /dev/null; then - ROS_CMAKEOPTS+=" -D $1" + ROS_CMAKEOPTS=$ROS_CMAKEOPTS" -D $1" else usage fi ;; -D?*=*|-D?*) - ROS_CMAKEOPTS+=" $1" + ROS_CMAKEOPTS=$ROS_CMAKEOPTS" $1" ;; makefiles|Makefiles) CMAKE_GENERATOR="Unix Makefiles" diff --git a/deprecated/csr/CMakeLists.txt b/deprecated/csr/CMakeLists.txt deleted file mode 100644 index 29ccac1a8da..00000000000 --- a/deprecated/csr/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ - -include_directories( - include - ${REACTOS_SOURCE_DIR}/include/reactos/subsys - ${REACTOS_SOURCE_DIR}/include/reactos/drivers) - -add_executable(csrss2 main.c csr.rc) - -set_module_type(csrss2 nativecui) -target_link_libraries(csrss2 nt) -add_importlibs(csrss2 ntdll csrsrv2) -add_dependencies(csrss2 psdk bugcodes) -add_cd_file(TARGET csrss2 DESTINATION reactos/system32 FOR all) - -add_subdirectory(csrsrv) - diff --git a/deprecated/csr/csr.rc b/deprecated/csr/csr.rc deleted file mode 100644 index c5d32a1013d..00000000000 --- a/deprecated/csr/csr.rc +++ /dev/null @@ -1,4 +0,0 @@ -#define REACTOS_STR_FILE_DESCRIPTION "Client/Server Runtime Process\0" -#define REACTOS_STR_INTERNAL_NAME "csrss\0" -#define REACTOS_STR_ORIGINAL_FILENAME "csrss.exe\0" -#include diff --git a/deprecated/csr/csrsrv/CMakeLists.txt b/deprecated/csr/csrsrv/CMakeLists.txt deleted file mode 100644 index 8c48af51816..00000000000 --- a/deprecated/csr/csrsrv/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ - -include_directories(${REACTOS_SOURCE_DIR}/subsystems/win32/csrss/include) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys) - -spec2def(csrsrv2.dll csrsrv2.spec ADD_IMPORTLIB) - -list(APPEND SOURCE - api.c - init.c - process.c - server.c - session.c - thread.c - wait.c - csrsrv.rc - ${CMAKE_CURRENT_BINARY_DIR}/csrsrv2.def) - -add_library(csrsrv2 SHARED ${SOURCE}) - -target_link_libraries(csrsrv2 ${PSEH_LIB} smlib) - -set_module_type(csrsrv2 nativedll) - -add_importlibs(csrsrv2 ntdll) - -add_pch(csrsrv2 srv.h) - -add_dependencies(csrsrv2 psdk bugcodes) -add_cd_file(TARGET csrsrv2 DESTINATION reactos/system32 FOR all) - diff --git a/deprecated/csr/csrsrv/api.c b/deprecated/csr/csrsrv/api.c deleted file mode 100644 index e7257095f14..00000000000 --- a/deprecated/csr/csrsrv/api.c +++ /dev/null @@ -1,1650 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS CSR Sub System - * FILE: subsys/csr/csrsrv/api.c - * PURPOSE: CSR Server DLL API LPC Implementation - * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) - */ - -/* INCLUDES ******************************************************************/ - -#include "srv.h" - -#define NDEBUG -#include - -/* DATA **********************************************************************/ -BOOLEAN (*CsrClientThreadSetup)(VOID) = NULL; -ULONG CsrMaxApiRequestThreads; -UNICODE_STRING CsrSbApiPortName; -UNICODE_STRING CsrApiPortName; -HANDLE CsrSbApiPort; -HANDLE CsrApiPort; -PCSR_THREAD CsrSbApiRequestThreadPtr; -volatile LONG CsrpStaticThreadCount; -volatile LONG CsrpDynamicThreadTotal; - -/* PRIVATE FUNCTIONS *********************************************************/ - -/*++ - * @name CsrpCheckRequestThreads - * - * The CsrpCheckRequestThreads routine checks if there are no more threads - * to handle CSR API Requests, and creates a new thread if possible, to - * avoid starvation. - * - * @param None. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * if a new thread couldn't be created. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrpCheckRequestThreads(VOID) -{ - HANDLE hThread; - CLIENT_ID ClientId; - NTSTATUS Status; - - /* Decrease the count, and see if we're out */ - if (!(_InterlockedDecrement(&CsrpStaticThreadCount))) - { - /* Check if we've still got space for a Dynamic Thread */ - if (CsrpDynamicThreadTotal < CsrMaxApiRequestThreads) - { - /* Create a new dynamic thread */ - Status = RtlCreateUserThread(NtCurrentProcess(), - NULL, - TRUE, - 0, - 0, - 0, - (PVOID)CsrApiRequestThread, - NULL, - &hThread, - &ClientId); - /* Check success */ - if (NT_SUCCESS(Status)) - { - /* Increase the thread counts */ - _InterlockedIncrement(&CsrpStaticThreadCount); - _InterlockedIncrement(&CsrpDynamicThreadTotal); - - /* Add a new server thread */ - if (CsrAddStaticServerThread(hThread, - &ClientId, - CsrThreadIsServerThread)) - { - /* Activate it */ - NtResumeThread(hThread,NULL); - } - else - { - /* Failed to create a new static thread */ - _InterlockedDecrement(&CsrpStaticThreadCount); - _InterlockedDecrement(&CsrpDynamicThreadTotal); - - /* Terminate it */ - NtTerminateThread(hThread,0); - NtClose(hThread); - - /* Return */ - return STATUS_UNSUCCESSFUL; - } - } - } - } - - /* Success */ - return STATUS_SUCCESS; -} - -/*++ - * @name CsrSbApiPortInitialize - * - * The CsrSbApiPortInitialize routine initializes the LPC Port used for - * communications with the Session Manager (SM) and initializes the static - * thread that will handle connection requests and APIs. - * - * @param None - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrSbApiPortInitialize(VOID) -{ - ULONG Size; - PSECURITY_DESCRIPTOR PortSd; - OBJECT_ATTRIBUTES ObjectAttributes; - NTSTATUS Status; - HANDLE hRequestThread; - CLIENT_ID ClientId; - - /* Calculate how much space we'll need for the Port Name */ - Size = CsrDirectoryName.Length + sizeof(SB_PORT_NAME) + sizeof(WCHAR); - - /* Create the buffer for it */ - CsrSbApiPortName.Buffer = RtlAllocateHeap(CsrHeap, 0, Size); - if (!CsrSbApiPortName.Buffer) return STATUS_NO_MEMORY; - - /* Setup the rest of the empty string */ - CsrSbApiPortName.Length = 0; - CsrSbApiPortName.MaximumLength = (USHORT)Size; - - /* Now append the full port name */ - RtlAppendUnicodeStringToString(&CsrSbApiPortName, &CsrDirectoryName); - RtlAppendUnicodeToString(&CsrSbApiPortName, UNICODE_PATH_SEP); - RtlAppendUnicodeToString(&CsrSbApiPortName, SB_PORT_NAME); - if (CsrDebug & 2) DPRINT1("CSRSS: Creating %wZ port and associated thread\n", &CsrSbApiPortName); - - /* Create Security Descriptor for this Port */ - Status = CsrCreateLocalSystemSD(&PortSd); - if (!NT_SUCCESS(Status)) return Status; - - /* Initialize the Attributes */ - InitializeObjectAttributes(&ObjectAttributes, - &CsrSbApiPortName, - 0, - NULL, - PortSd); - - /* Create the Port Object */ - Status = NtCreatePort(&CsrSbApiPort, - &ObjectAttributes, - sizeof(SB_CONNECTION_INFO), - sizeof(SB_API_MSG), - 32 * sizeof(SB_API_MSG)); - if (PortSd) RtlFreeHeap(CsrHeap, 0, PortSd); - - if (NT_SUCCESS(Status)) - { - /* Create the Thread to handle the API Requests */ - Status = RtlCreateUserThread(NtCurrentProcess(), - NULL, - TRUE, - 0, - 0, - 0, - (PVOID)CsrSbApiRequestThread, - NULL, - &hRequestThread, - &ClientId); - if (NT_SUCCESS(Status)) - { - /* Add it as a Static Server Thread */ - CsrSbApiRequestThreadPtr = CsrAddStaticServerThread(hRequestThread, - &ClientId, - 0); - - /* Activate it */ - Status = NtResumeThread(hRequestThread, NULL); - } - } - - return Status; -} - -/*++ - * @name CsrApiPortInitialize - * - * The CsrApiPortInitialize routine initializes the LPC Port used for - * communications with the Client/Server Runtime (CSR) and initializes the - * static thread that will handle connection requests and APIs. - * - * @param None - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrApiPortInitialize(VOID) -{ - ULONG Size; - OBJECT_ATTRIBUTES ObjectAttributes; - NTSTATUS Status; - HANDLE hRequestEvent, hThread; - CLIENT_ID ClientId; - PLIST_ENTRY ListHead, NextEntry; - PCSR_THREAD ServerThread; - - /* Calculate how much space we'll need for the Port Name */ - Size = CsrDirectoryName.Length + sizeof(CSR_PORT_NAME) + sizeof(WCHAR); - - /* Create the buffer for it */ - CsrApiPortName.Buffer = RtlAllocateHeap(CsrHeap, 0, Size); - if (!CsrApiPortName.Buffer) return STATUS_NO_MEMORY; - - /* Setup the rest of the empty string */ - CsrApiPortName.Length = 0; - CsrApiPortName.MaximumLength = (USHORT)Size; - RtlAppendUnicodeStringToString(&CsrApiPortName, &CsrDirectoryName); - RtlAppendUnicodeToString(&CsrApiPortName, UNICODE_PATH_SEP); - RtlAppendUnicodeToString(&CsrApiPortName, CSR_PORT_NAME); - if (CsrDebug & 1) - { - DPRINT1("CSRSS: Creating %wZ port and associated threads\n", &CsrApiPortName); - DPRINT1("CSRSS: sizeof( CONNECTINFO ) == %ld sizeof( API_MSG ) == %ld\n", - sizeof(CSR_CONNECTION_INFO), sizeof(CSR_API_MESSAGE)); - } - - /* FIXME: Create a Security Descriptor */ - - /* Initialize the Attributes */ - InitializeObjectAttributes(&ObjectAttributes, - &CsrApiPortName, - 0, - NULL, - NULL /* FIXME*/); - - /* Create the Port Object */ - Status = NtCreatePort(&CsrApiPort, - &ObjectAttributes, - sizeof(CSR_CONNECTION_INFO), - sizeof(CSR_API_MESSAGE), - 16 * PAGE_SIZE); - if (NT_SUCCESS(Status)) - { - /* Create the event the Port Thread will use */ - Status = NtCreateEvent(&hRequestEvent, - EVENT_ALL_ACCESS, - NULL, - SynchronizationEvent, - FALSE); - if (NT_SUCCESS(Status)) - { - /* Create the Request Thread */ - Status = RtlCreateUserThread(NtCurrentProcess(), - NULL, - TRUE, - 0, - 0, - 0, - (PVOID)CsrApiRequestThread, - (PVOID)hRequestEvent, - &hThread, - &ClientId); - if (NT_SUCCESS(Status)) - { - /* Add this as a static thread to CSRSRV */ - CsrAddStaticServerThread(hThread, &ClientId, CsrThreadIsServerThread); - - /* Get the Thread List Pointers */ - ListHead = &CsrRootProcess->ThreadList; - NextEntry = ListHead->Flink; - - /* Start looping the list */ - while (NextEntry != ListHead) - { - /* Get the Thread */ - ServerThread = CONTAINING_RECORD(NextEntry, CSR_THREAD, Link); - - /* Start it up */ - Status = NtResumeThread(ServerThread->ThreadHandle, NULL); - - /* Is this a Server Thread? */ - if (ServerThread->Flags & CsrThreadIsServerThread) - { - /* If so, then wait for it to initialize */ - Status = NtWaitForSingleObject(hRequestEvent, FALSE, NULL); - ASSERT(NT_SUCCESS(Status)); - } - - /* Next thread */ - NextEntry = NextEntry->Flink; - } - - /* We don't need this anymore */ - NtClose(hRequestEvent); - } - } - } - - /* Return */ - return Status; -} - -/*++ - * @name CsrApiRequestThread - * - * The CsrApiRequestThread routine handles incoming messages or connection - * requests on the CSR API LPC Port. - * - * @param Parameter - * System-default user-defined parameter. Unused. - * - * @return The thread exit code, if the thread is terminated. - * - * @remarks Before listening on the port, the routine will first attempt - * to connect to the user subsystem. - * - *--*/ -NTSTATUS -NTAPI -CsrApiRequestThread(IN PVOID Parameter) -{ - PTEB Teb = NtCurrentTeb(); - LARGE_INTEGER TimeOut; - PCSR_THREAD CurrentThread, CsrThread; - NTSTATUS Status; - PCSR_API_MESSAGE ReplyMsg; - CSR_API_MESSAGE ReceiveMsg; - PCSR_PROCESS CsrProcess; - PHARDERROR_MSG HardErrorMsg; - PVOID PortContext; - PCSR_SERVER_DLL ServerDll; - PCLIENT_DIED_MSG ClientDiedMsg; - PDBGKM_MSG DebugMessage; - ULONG ServerId, ApiId, Reply, MessageType, i; - HANDLE ReplyPort; - - /* Setup LPC loop port and message */ - ReplyMsg = NULL; - ReplyPort = CsrApiPort; - - /* Connect to user32 */ - while (!CsrConnectToUser()) - { - /* Set up the timeout for the connect (30 seconds) */ - TimeOut.QuadPart = -30 * 1000 * 1000 * 10; - - /* Keep trying until we get a response */ - Teb->Win32ClientInfo[0] = 0; - NtDelayExecution(FALSE, &TimeOut); - } - - /* Get our thread */ - CurrentThread = Teb->CsrClientThread; - - /* If we got an event... */ - if (Parameter) - { - /* Set it, to let stuff waiting on us load */ - Status = NtSetEvent((HANDLE)Parameter, NULL); - ASSERT(NT_SUCCESS(Status)); - - /* Increase the Thread Counts */ - _InterlockedIncrement(&CsrpStaticThreadCount); - _InterlockedIncrement(&CsrpDynamicThreadTotal); - } - - /* Now start the loop */ - while (TRUE) - { - /* Make sure the real CID is set */ - Teb->RealClientId = Teb->ClientId; - - /* Debug check */ - if (Teb->CountOfOwnedCriticalSections) - { - DPRINT1("CSRSRV: FATAL ERROR. CsrThread is Idle while holding %lu critical sections\n", - Teb->CountOfOwnedCriticalSections); - DPRINT1("CSRSRV: Last Receive Message %lx ReplyMessage %lx\n", - &ReceiveMsg, ReplyMsg); - DbgBreakPoint(); - } - - /* Wait for a message to come through */ - Status = NtReplyWaitReceivePort(ReplyPort, - &PortContext, - &ReplyMsg->Header, - &ReceiveMsg.Header); - - /* Check if we didn't get success */ - if (Status != STATUS_SUCCESS) - { - /* Was it a failure or another success code? */ - if (!NT_SUCCESS(Status)) - { - /* Check for specific status cases */ - if ((Status != STATUS_INVALID_CID) && - (Status != STATUS_UNSUCCESSFUL) && - ((Status == STATUS_INVALID_HANDLE) || (ReplyPort == CsrApiPort))) - { - /* Notify the debugger */ - DPRINT1("CSRSS: ReceivePort failed - Status == %X\n", Status); - DPRINT1("CSRSS: ReplyPortHandle %lx CsrApiPort %lx\n", ReplyPort, CsrApiPort); - } - - /* We failed big time, so start out fresh */ - ReplyMsg = NULL; - ReplyPort = CsrApiPort; - continue; - } - else - { - /* A bizare "success" code, just try again */ - DPRINT1("NtReplyWaitReceivePort returned \"success\" status 0x%x\n", Status); - continue; - } - } - - /* Use whatever Client ID we got */ - Teb->RealClientId = ReceiveMsg.Header.ClientId; - - /* Get the Message Type */ - MessageType = ReceiveMsg.Header.u2.s2.Type; - - /* Handle connection requests */ - if (MessageType == LPC_CONNECTION_REQUEST) - { - /* Handle the Connection Request */ - CsrApiHandleConnectionRequest(&ReceiveMsg); - ReplyPort = CsrApiPort; - ReplyMsg = NULL; - continue; - } - - /* It's some other kind of request. Get the lock for the lookup */ - CsrAcquireProcessLock(); - - /* Now do the lookup to get the CSR_THREAD */ - CsrThread = CsrLocateThreadByClientId(&CsrProcess, - &ReceiveMsg.Header.ClientId); - - /* Did we find a thread? */ - if (!CsrThread) - { - /* This wasn't a CSR Thread, release lock */ - CsrReleaseProcessLock(); - - /* If this was an exception, handle it */ - if (MessageType == LPC_EXCEPTION) - { - ReplyMsg = &ReceiveMsg; - ReplyPort = CsrApiPort; - ReplyMsg->Status = DBG_CONTINUE; - } - else if (MessageType == LPC_PORT_CLOSED || - MessageType == LPC_CLIENT_DIED) - { - /* The Client or Port are gone, loop again */ - ReplyMsg = NULL; - ReplyPort = CsrApiPort; - } - else if (MessageType == LPC_ERROR_EVENT) - { - /* If it's a hard error, handle this too */ - HardErrorMsg = (PHARDERROR_MSG)&ReceiveMsg; - - /* Default it to unhandled */ - HardErrorMsg->Response = ResponseNotHandled; - - /* Check if there are free api threads */ - CsrpCheckRequestThreads(); - if (CsrpStaticThreadCount) - { - /* Loop every Server DLL */ - for (i = 0; i < CSR_SERVER_DLL_MAX; i++) - { - /* Get the Server DLL */ - ServerDll = CsrLoadedServerDll[i]; - - /* Check if it's valid and if it has a Hard Error Callback */ - if ((ServerDll) && (ServerDll->HardErrorCallback)) - { - /* Call it */ - ServerDll->HardErrorCallback(NULL, HardErrorMsg); - - /* If it's handled, get out of here */ - if (HardErrorMsg->Response != ResponseNotHandled) break; - } - } - } - - /* Increase the thread count */ - _InterlockedIncrement(&CsrpStaticThreadCount); - - /* If the response was 0xFFFFFFFF, we'll ignore it */ - if (HardErrorMsg->Response == 0xFFFFFFFF) - { - ReplyMsg = NULL; - ReplyPort = CsrApiPort; - } - else - { - ReplyMsg = &ReceiveMsg; - } - } - else if (MessageType == LPC_REQUEST) - { - /* This is an API Message coming from a non-CSR Thread */ - ReplyMsg = &ReceiveMsg; - ReplyPort = CsrApiPort; - ReplyMsg->Status = STATUS_ILLEGAL_FUNCTION; - } - else if (MessageType == LPC_DATAGRAM) - { - /* This is an API call, get the Server ID */ - ServerId = CSR_SERVER_ID_FROM_OPCODE(ReceiveMsg.Opcode); - - /* Make sure that the ID is within limits, and the Server DLL loaded */ - ServerDll = NULL; - if ((ServerId >= CSR_SERVER_DLL_MAX) || - (!(ServerDll = CsrLoadedServerDll[ServerId]))) - { - /* We are beyond the Maximum Server ID */ - DPRINT1("CSRSS: %lx is invalid ServerDllIndex (%08x)\n", - ServerId, ServerDll); - DbgBreakPoint(); - ReplyPort = CsrApiPort; - ReplyMsg = NULL; - continue; - } - - /* Get the API ID */ - ApiId = CSR_API_ID_FROM_OPCODE(ReceiveMsg.Opcode); - - /* Normalize it with our Base ID */ - ApiId -= ServerDll->ApiBase; - - /* Make sure that the ID is within limits, and the entry exists */ - if (ApiId >= ServerDll->HighestApiSupported) - { - /* We are beyond the Maximum API ID, or it doesn't exist */ - DPRINT1("CSRSS: %lx is invalid ApiTableIndex for %Z\n", - CSR_API_ID_FROM_OPCODE(ReceiveMsg.Opcode), - &ServerDll->Name); - ReplyPort = CsrApiPort; - ReplyMsg = NULL; - continue; - } - - if (CsrDebug & 2) - { - DPRINT1("[%02x] CSRSS: [%02x,%02x] - %s Api called from %08x\n", - Teb->ClientId.UniqueThread, - ReceiveMsg.Header.ClientId.UniqueProcess, - ReceiveMsg.Header.ClientId.UniqueThread, - ServerDll->NameTable[ApiId], - NULL); - } - - /* Assume success */ - ReceiveMsg.Status = STATUS_SUCCESS; - - /* Validation complete, start SEH */ - _SEH2_TRY - { - /* Make sure we have enough threads */ - CsrpCheckRequestThreads(); - - /* Call the API and get the result */ - ReplyMsg = NULL; - ReplyPort = CsrApiPort; - ServerDll->DispatchTable[ApiId](&ReceiveMsg, &Reply); - - /* Increase the static thread count */ - _InterlockedIncrement(&CsrpStaticThreadCount); - } - _SEH2_EXCEPT(CsrUnhandledExceptionFilter(_SEH2_GetExceptionInformation())) - { - ReplyMsg = NULL; - ReplyPort = CsrApiPort; - } - _SEH2_END; - } - else - { - /* Some other ignored message type */ - ReplyMsg = NULL; - ReplyPort = CsrApiPort; - } - - /* Keep going */ - continue; - } - - /* We have a valid thread, was this an LPC Request? */ - if (MessageType != LPC_REQUEST) - { - /* It's not an API, check if the client died */ - if (MessageType == LPC_CLIENT_DIED) - { - /* Get the information and check if it matches our thread */ - ClientDiedMsg = (PCLIENT_DIED_MSG)&ReceiveMsg; - if (ClientDiedMsg->CreateTime.QuadPart == CsrThread->CreateTime.QuadPart) - { - /* Reference the thread */ - CsrLockedReferenceThread(CsrThread); - - /* Destroy the thread in the API Message */ - CsrDestroyThread(&ReceiveMsg.Header.ClientId); - - /* Check if the thread was actually ourselves */ - if (CsrProcess->ThreadCount == 1) - { - /* Kill the process manually here */ - CsrDestroyProcess(&CsrThread->ClientId, 0); - } - - /* Remove our extra reference */ - CsrLockedDereferenceThread(CsrThread); - } - - /* Release the lock and keep looping */ - CsrReleaseProcessLock(); - ReplyMsg = NULL; - ReplyPort = CsrApiPort; - continue; - } - - /* Reference the thread and release the lock */ - CsrLockedReferenceThread(CsrThread); - CsrReleaseProcessLock(); - - /* Check if this was an exception */ - if (MessageType == LPC_EXCEPTION) - { - /* Kill the process */ - NtTerminateProcess(CsrProcess->ProcessHandle, STATUS_ABANDONED); - - /* Destroy it from CSR */ - CsrDestroyProcess(&ReceiveMsg.Header.ClientId, STATUS_ABANDONED); - - /* Return a Debug Message */ - DebugMessage = (PDBGKM_MSG)&ReceiveMsg; - DebugMessage->ReturnedStatus = DBG_CONTINUE; - ReplyMsg = &ReceiveMsg; - ReplyPort = CsrApiPort; - - /* Remove our extra reference */ - CsrDereferenceThread(CsrThread); - } - else if (MessageType == LPC_ERROR_EVENT) - { - /* If it's a hard error, handle this too */ - HardErrorMsg = (PHARDERROR_MSG)&ReceiveMsg; - - /* Default it to unhandled */ - HardErrorMsg->Response = ResponseNotHandled; - - /* Check if there are free api threads */ - CsrpCheckRequestThreads(); - if (CsrpStaticThreadCount) - { - /* Loop every Server DLL */ - for (i = 0; i < CSR_SERVER_DLL_MAX; i++) - { - /* Get the Server DLL */ - ServerDll = CsrLoadedServerDll[i]; - - /* Check if it's valid and if it has a Hard Error Callback */ - if ((ServerDll) && (ServerDll->HardErrorCallback)) - { - /* Call it */ - ServerDll->HardErrorCallback(CsrThread, HardErrorMsg); - - /* If it's handled, get out of here */ - if (HardErrorMsg->Response != ResponseNotHandled) break; - } - } - } - - /* Increase the thread count */ - _InterlockedIncrement(&CsrpStaticThreadCount); - - /* If the response was 0xFFFFFFFF, we'll ignore it */ - if (HardErrorMsg->Response == 0xFFFFFFFF) - { - ReplyMsg = NULL; - ReplyPort = CsrApiPort; - } - else - { - CsrDereferenceThread(CsrThread); - ReplyMsg = &ReceiveMsg; - ReplyPort = CsrApiPort; - } - } - else - { - /* Something else */ - CsrDereferenceThread(CsrThread); - ReplyMsg = NULL; - } - - /* Keep looping */ - continue; - } - - /* We got an API Request */ - CsrLockedReferenceThread(CsrThread); - CsrReleaseProcessLock(); - - /* This is an API call, get the Server ID */ - ServerId = CSR_SERVER_ID_FROM_OPCODE(ReceiveMsg.Opcode); - - /* Make sure that the ID is within limits, and the Server DLL loaded */ - ServerDll = NULL; - if ((ServerId >= CSR_SERVER_DLL_MAX) || - (!(ServerDll = CsrLoadedServerDll[ServerId]))) - { - /* We are beyond the Maximum Server ID */ - DPRINT1("CSRSS: %lx is invalid ServerDllIndex (%08x)\n", - ServerId, ServerDll); - DbgBreakPoint(); - - ReplyPort = CsrApiPort; - ReplyMsg = &ReceiveMsg; - ReplyMsg->Status = STATUS_ILLEGAL_FUNCTION; - CsrDereferenceThread(CsrThread); - continue; - } - - /* Get the API ID */ - ApiId = CSR_API_ID_FROM_OPCODE(ReceiveMsg.Opcode); - - /* Normalize it with our Base ID */ - ApiId -= ServerDll->ApiBase; - - /* Make sure that the ID is within limits, and the entry exists */ - if (ApiId >= ServerDll->HighestApiSupported) - { - /* We are beyond the Maximum API ID, or it doesn't exist */ - DPRINT1("CSRSS: %lx is invalid ApiTableIndex for %Z\n", - CSR_API_ID_FROM_OPCODE(ReceiveMsg.Opcode), - &ServerDll->Name); - - ReplyPort = CsrApiPort; - ReplyMsg = &ReceiveMsg; - ReplyMsg->Status = STATUS_ILLEGAL_FUNCTION; - CsrDereferenceThread(CsrThread); - continue; - } - - if (CsrDebug & 2) - { - DPRINT1("[%02x] CSRSS: [%02x,%02x] - %s Api called from %08x\n", - Teb->ClientId.UniqueThread, - ReceiveMsg.Header.ClientId.UniqueProcess, - ReceiveMsg.Header.ClientId.UniqueThread, - ServerDll->NameTable[ApiId], - CsrThread); - } - - /* Assume success */ - ReplyMsg = &ReceiveMsg; - ReceiveMsg.Status = STATUS_SUCCESS; - - /* Now we reply to a particular client */ - ReplyPort = CsrThread->Process->ClientPort; - - /* Check if there's a capture buffer */ - if (ReceiveMsg.CsrCaptureData) - { - /* Capture the arguments */ - if (!CsrCaptureArguments(CsrThread, &ReceiveMsg)) - { - /* Ignore this message if we failed to get the arguments */ - CsrDereferenceThread(CsrThread); - continue; - } - } - - /* Validation complete, start SEH */ - _SEH2_TRY - { - /* Make sure we have enough threads */ - CsrpCheckRequestThreads(); - - Teb->CsrClientThread = CsrThread; - - /* Call the API and get the result */ - Reply = 0; - ServerDll->DispatchTable[ApiId](&ReceiveMsg, &Reply); - - /* Increase the static thread count */ - _InterlockedIncrement(&CsrpStaticThreadCount); - - Teb->CsrClientThread = CurrentThread; - - if (Reply == 3) - { - ReplyMsg = NULL; - if (ReceiveMsg.CsrCaptureData) - { - CsrReleaseCapturedArguments(&ReceiveMsg); - } - CsrDereferenceThread(CsrThread); - ReplyPort = CsrApiPort; - } - else if (Reply == 2) - { - NtReplyPort(ReplyPort, &ReplyMsg->Header); - ReplyPort = CsrApiPort; - ReplyMsg = NULL; - CsrDereferenceThread(CsrThread); - } - else if (Reply == 1) - { - ReplyPort = CsrApiPort; - ReplyMsg = NULL; - } - else - { - if (ReceiveMsg.CsrCaptureData) - { - CsrReleaseCapturedArguments(&ReceiveMsg); - } - CsrDereferenceThread(CsrThread); - } - } - _SEH2_EXCEPT(CsrUnhandledExceptionFilter(_SEH2_GetExceptionInformation())) - { - ReplyMsg = NULL; - ReplyPort = CsrApiPort; - } - _SEH2_END; - } - - /* We're out of the loop for some reason, terminate! */ - NtTerminateThread(NtCurrentThread(), Status); - return Status; -} - -/*++ - * @name CsrApiHandleConnectionRequest - * - * The CsrApiHandleConnectionRequest routine handles and accepts a new - * connection request to the CSR API LPC Port. - * - * @param ApiMessage - * Pointer to the incoming CSR API Message which contains the - * connection request. - * - * @return STATUS_SUCCESS in case of success, or status code which caused - * the routine to error. - * - * @remarks This routine is responsible for attaching the Shared Section to - * new clients connecting to CSR. - * - *--*/ -NTSTATUS -NTAPI -CsrApiHandleConnectionRequest(IN PCSR_API_MESSAGE ApiMessage) -{ - PCSR_THREAD CsrThread = NULL; - PCSR_PROCESS CsrProcess = NULL; - NTSTATUS Status = STATUS_SUCCESS; - PCSR_CONNECTION_INFO ConnectInfo = &ApiMessage->ConnectionInfo; - BOOLEAN AllowConnection = FALSE; - REMOTE_PORT_VIEW RemotePortView; - HANDLE hPort; - - /* Acquire the Process Lock */ - CsrAcquireProcessLock(); - - /* Lookup the CSR Thread */ - CsrThread = CsrLocateThreadByClientId(NULL, &ApiMessage->Header.ClientId); - - /* Check if we have a thread */ - if (CsrThread) - { - /* Get the Process */ - CsrProcess = CsrThread->Process; - - /* Make sure we have a Process as well */ - if (CsrProcess) - { - /* Reference the Process */ - CsrLockedReferenceProcess(CsrThread->Process); - - /* Release the lock */ - CsrReleaseProcessLock(); - - /* Duplicate the Object Directory */ - Status = NtDuplicateObject(NtCurrentProcess(), - CsrObjectDirectory, - CsrProcess->ProcessHandle, - &ConnectInfo->ObjectDirectory, - 0, - 0, - DUPLICATE_SAME_ACCESS | - DUPLICATE_SAME_ATTRIBUTES); - - /* Acquire the lock */ - CsrAcquireProcessLock(); - - /* Check for success */ - if (NT_SUCCESS(Status)) - { - /* Attach the Shared Section */ - Status = CsrSrvAttachSharedSection(CsrProcess, ConnectInfo); - - /* Check how this went */ - if (NT_SUCCESS(Status)) AllowConnection = TRUE; - } - - /* Dereference the project */ - CsrLockedDereferenceProcess(CsrProcess); - } - } - - /* Release the lock */ - CsrReleaseProcessLock(); - - /* Setup the Port View Structure */ - RemotePortView.Length = sizeof(REMOTE_PORT_VIEW); - RemotePortView.ViewSize = 0; - RemotePortView.ViewBase = NULL; - - /* Save the Process ID */ - ConnectInfo->ProcessId = NtCurrentTeb()->ClientId.UniqueProcess; - - /* Accept the Connection */ - Status = NtAcceptConnectPort(&hPort, - AllowConnection ? UlongToPtr(CsrProcess->SequenceNumber) : 0, - &ApiMessage->Header, - AllowConnection, - NULL, - &RemotePortView); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: NtAcceptConnectPort - failed. Status == %X\n", Status); - } - else if (AllowConnection) - { - if (CsrDebug & 2) - { - DPRINT1("CSRSS: ClientId: %lx.%lx has ClientView: Base=%p, Size=%lx\n", - ApiMessage->Header.ClientId.UniqueProcess, - ApiMessage->Header.ClientId.UniqueThread, - RemotePortView.ViewBase, - RemotePortView.ViewSize); - } - - /* Set some Port Data in the Process */ - CsrProcess->ClientPort = hPort; - CsrProcess->ClientViewBase = (ULONG_PTR)RemotePortView.ViewBase; - CsrProcess->ClientViewBounds = (ULONG_PTR)((ULONG_PTR)RemotePortView.ViewBase + - (ULONG_PTR)RemotePortView.ViewSize); - - /* Complete the connection */ - Status = NtCompleteConnectPort(hPort); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: NtCompleteConnectPort - failed. Status == %X\n", Status); - } - } - else - { - DPRINT1("CSRSS: Rejecting Connection Request from ClientId: %lx.%lx\n", - ApiMessage->Header.ClientId.UniqueProcess, - ApiMessage->Header.ClientId.UniqueThread); - } - - /* Return status to caller */ - return Status; -} - -/*++ - * @name CsrSbApiRequestThread - * - * The CsrSbApiRequestThread routine handles incoming messages or connection - * requests on the SM API LPC Port. - * - * @param Parameter - * System-default user-defined parameter. Unused. - * - * @return The thread exit code, if the thread is terminated. - * - * @remarks Before listening on the port, the routine will first attempt - * to connect to the user subsystem. - * - *--*/ -VOID -NTAPI -CsrSbApiRequestThread(IN PVOID Parameter) -{ - NTSTATUS Status; - SB_API_MSG ReceiveMsg; - PSB_API_MSG ReplyMsg = NULL; - PVOID PortContext; - ULONG MessageType; - - /* Start the loop */ - while (TRUE) - { - /* Wait for a message to come in */ - Status = NtReplyWaitReceivePort(CsrSbApiPort, - &PortContext, - &ReplyMsg->h, - &ReceiveMsg.h); - - /* Check if we didn't get success */ - if (Status != STATUS_SUCCESS) - { - /* If we only got a warning, keep going */ - if (NT_SUCCESS(Status)) continue; - - /* We failed big time, so start out fresh */ - ReplyMsg = NULL; - DPRINT1("CSRSS: ReceivePort failed - Status == %X\n", Status); - continue; - } - - /* Save the message type */ - MessageType = ReceiveMsg.h.u2.s2.Type; - - /* Check if this is a connection request */ - if (MessageType == LPC_CONNECTION_REQUEST) - { - /* Handle connection request */ - CsrSbApiHandleConnectionRequest(&ReceiveMsg); - - /* Start over */ - ReplyMsg = NULL; - continue; - } - - /* Check if the port died */ - if (MessageType == LPC_PORT_CLOSED) - { - /* Close the handle if we have one */ - if (PortContext) NtClose((HANDLE)PortContext); - - /* Client died, start over */ - ReplyMsg = NULL; - continue; - } - else if (MessageType == LPC_CLIENT_DIED) - { - /* Client died, start over */ - ReplyMsg = NULL; - continue; - } - - /* - * It's an API Message, check if it's within limits. If it's not, the - * NT Behaviour is to set this to the Maximum API. - */ - if (ReceiveMsg.ApiNumber > SbpMaxApiNumber) - { - ReceiveMsg.ApiNumber = SbpMaxApiNumber; - DPRINT1("CSRSS: %lx is invalid Sb ApiNumber\n", ReceiveMsg.ApiNumber); - } - - /* Reuse the message */ - ReplyMsg = &ReceiveMsg; - - /* Make sure that the message is supported */ - if (ReceiveMsg.ApiNumber < SbpMaxApiNumber) - { - /* Call the API */ - if (!CsrServerSbApiDispatch[ReceiveMsg.ApiNumber](&ReceiveMsg)) - { - /* It failed, so return nothing */ - ReplyMsg = NULL; - } - } - else - { - /* We don't support this API Number */ - ReplyMsg->ReturnValue = STATUS_NOT_IMPLEMENTED; - } - } -} - -/*++ - * @name CsrSbApiHandleConnectionRequest - * - * The CsrSbApiHandleConnectionRequest routine handles and accepts a new - * connection request to the SM API LPC Port. - * - * @param ApiMessage - * Pointer to the incoming CSR API Message which contains the - * connection request. - * - * @return STATUS_SUCCESS in case of success, or status code which caused - * the routine to error. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrSbApiHandleConnectionRequest(IN PSB_API_MSG Message) -{ - NTSTATUS Status; - REMOTE_PORT_VIEW RemotePortView; - HANDLE hPort; - - /* Set the Port View Structure Length */ - RemotePortView.Length = sizeof(REMOTE_PORT_VIEW); - - /* Accept the connection */ - Status = NtAcceptConnectPort(&hPort, - NULL, - (PPORT_MESSAGE)Message, - TRUE, - NULL, - &RemotePortView); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: Sb Accept Connection failed %lx\n", Status); - return Status; - } - - /* Complete the Connection */ - Status = NtCompleteConnectPort(hPort); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: Sb Complete Connection failed %lx\n",Status); - } - - /* Return status */ - return Status; -} - -/* PUBLIC FUNCTIONS **********************************************************/ - -/*++ - * @name CsrCallServerFromServer - * @implemented NT4 - * - * The CsrCallServerFromServer routine calls a CSR API from within a server. - * It avoids using LPC messages since the request isn't coming from a client. - * - * @param ReceiveMsg - * Pointer to the CSR API Message to send to the server. - * - * @param ReplyMsg - * Pointer to the CSR API Message to receive from the server. - * - * @return STATUS_SUCCESS in case of success, STATUS_ILLEGAL_FUNCTION - * if the opcode is invalid, or STATUS_ACCESS_VIOLATION if there - * was a problem executing the API. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrCallServerFromServer(PCSR_API_MESSAGE ReceiveMsg, - PCSR_API_MESSAGE ReplyMsg) -{ - ULONG ServerId; - PCSR_SERVER_DLL ServerDll; - ULONG ApiId; - ULONG Reply; - NTSTATUS Status; - - /* Get the Server ID */ - ServerId = CSR_SERVER_ID_FROM_OPCODE(ReceiveMsg->Opcode); - - /* Make sure that the ID is within limits, and the Server DLL loaded */ - if ((ServerId >= CSR_SERVER_DLL_MAX) || - (!(ServerDll = CsrLoadedServerDll[ServerId]))) - { - /* We are beyond the Maximum Server ID */ - DPRINT1("CSRSS: %lx is invalid ServerDllIndex (%08x)\n", ServerId, ServerDll); - ReplyMsg->Status = (ULONG)STATUS_ILLEGAL_FUNCTION; - return STATUS_ILLEGAL_FUNCTION; - } - else - { - /* Get the API ID */ - ApiId = CSR_API_ID_FROM_OPCODE(ReceiveMsg->Opcode); - - /* Normalize it with our Base ID */ - ApiId -= ServerDll->ApiBase; - - /* Make sure that the ID is within limits, and the entry exists */ - if ((ApiId >= ServerDll->HighestApiSupported) || - ((ServerDll->ValidTable) && !(ServerDll->ValidTable[ApiId]))) - { - /* We are beyond the Maximum API ID, or it doesn't exist */ - DPRINT1("CSRSS: %lx (%s) is invalid ApiTableIndex for %Z or is an " - "invalid API to call from the server.\n", - ServerDll->ValidTable[ApiId], - ((ServerDll->NameTable) && (ServerDll->NameTable[ApiId])) ? - ServerDll->NameTable[ApiId] : "*** UNKNOWN ***", &ServerDll->Name); - DbgBreakPoint(); - ReplyMsg->Status = (ULONG)STATUS_ILLEGAL_FUNCTION; - return STATUS_ILLEGAL_FUNCTION; - } - } - - if (CsrDebug & 2) - { - DPRINT1("CSRSS: %s Api Request received from server process\n", - ServerDll->NameTable[ApiId]); - } - - /* Validation complete, start SEH */ - _SEH2_TRY - { - /* Call the API and get the result */ - Status = ServerDll->DispatchTable[ApiId](ReceiveMsg, &Reply); - - /* Return the result, no matter what it is */ - ReplyMsg->Status = Status; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - /* If we got an exception, return access violation */ - ReplyMsg->Status = STATUS_ACCESS_VIOLATION; - } - _SEH2_END; - - /* Return success */ - return STATUS_SUCCESS; -} - -/*++ - * @name CsrConnectToUser - * @implemented NT4 - * - * The CsrConnectToUser connects to the User subsystem. - * - * @param None - * - * @return A pointer to the CSR Thread - * - * @remarks None. - * - *--*/ -PCSR_THREAD -NTAPI -CsrConnectToUser(VOID) -{ - NTSTATUS Status; - ANSI_STRING DllName; - UNICODE_STRING TempName; - HANDLE hUser32; - STRING StartupName; - PTEB Teb = NtCurrentTeb(); - PCSR_THREAD CsrThread; - BOOLEAN Connected; - - /* Check if we didn't already find it */ - if (!CsrClientThreadSetup) - { - /* Get the DLL Handle for user32.dll */ - RtlInitAnsiString(&DllName, "user32"); - RtlAnsiStringToUnicodeString(&TempName, &DllName, TRUE); - Status = LdrGetDllHandle(NULL, - NULL, - &TempName, - &hUser32); - RtlFreeUnicodeString(&TempName); - - /* If we got teh handle, get the Client Thread Startup Entrypoint */ - if (NT_SUCCESS(Status)) - { - RtlInitAnsiString(&StartupName,"ClientThreadSetup"); - Status = LdrGetProcedureAddress(hUser32, - &StartupName, - 0, - (PVOID)&CsrClientThreadSetup); - } - } - - /* Connect to user32 */ - _SEH2_TRY - { - Connected = CsrClientThreadSetup(); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - Connected = FALSE; - } _SEH2_END; - - if (!Connected) - { - DPRINT1("CSRSS: CsrConnectToUser failed\n"); - return NULL; - } - - /* Save pointer to this thread in TEB */ - CsrAcquireProcessLock(); - CsrThread = CsrLocateThreadInProcess(NULL, &Teb->ClientId); - CsrReleaseProcessLock(); - if (CsrThread) Teb->CsrClientThread = CsrThread; - - /* Return it */ - return CsrThread; -} - -/*++ - * @name CsrQueryApiPort - * @implemented NT4 - * - * The CsrQueryApiPort routine returns a handle to the CSR API LPC port. - * - * @param None. - * - * @return A handle to the port. - * - * @remarks None. - * - *--*/ -HANDLE -NTAPI -CsrQueryApiPort(VOID) -{ - DPRINT("CSRSRV: %s called\n", __FUNCTION__); - return CsrApiPort; -} - -/*++ - * @name CsrCaptureArguments - * @implemented NT5.1 - * - * The CsrCaptureArguments routine validates a CSR Capture Buffer and - * re-captures it into a server CSR Capture Buffer. - * - * @param CsrThread - * Pointer to the CSR Thread performing the validation. - * - * @param ApiMessage - * Pointer to the CSR API Message containing the Capture Buffer - * that needs to be validated. - * - * @return TRUE if validation succeeded, FALSE otherwise. - * - * @remarks None. - * - *--*/ -BOOLEAN -NTAPI -CsrCaptureArguments(IN PCSR_THREAD CsrThread, - IN PCSR_API_MESSAGE ApiMessage) -{ - PCSR_CAPTURE_BUFFER LocalCaptureBuffer = NULL, RemoteCaptureBuffer = NULL; - ULONG LocalLength = 0, PointerCount = 0; - SIZE_T BufferDistance = 0; - ULONG_PTR **PointerOffsets = NULL, *CurrentPointer = NULL; - - /* Use SEH to make sure this is valid */ - _SEH2_TRY - { - /* Get the buffer we got from whoever called NTDLL */ - LocalCaptureBuffer = ApiMessage->CsrCaptureData; - LocalLength = LocalCaptureBuffer->Size; - - /* Now check if the buffer is inside our mapped section */ - if (((ULONG_PTR)LocalCaptureBuffer < CsrThread->Process->ClientViewBase) || - (((ULONG_PTR)LocalCaptureBuffer + LocalLength) >= CsrThread->Process->ClientViewBounds)) - { - /* Return failure */ - DPRINT1("*** CSRSS: CaptureBuffer outside of ClientView\n"); - ApiMessage->Status = STATUS_INVALID_PARAMETER; - _SEH2_YIELD(return FALSE); - } - - /* Check if the Length is valid */ - if (((LocalCaptureBuffer->PointerCount * 4 + sizeof(CSR_CAPTURE_BUFFER)) > - LocalLength) ||(LocalLength > MAXWORD)) - { - /* Return failure */ - DPRINT1("*** CSRSS: CaptureBuffer %p has bad length\n", LocalCaptureBuffer); - DbgBreakPoint(); - ApiMessage->Status = STATUS_INVALID_PARAMETER; - _SEH2_YIELD(return FALSE); - } - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - /* Return failure */ - ApiMessage->Status = STATUS_INVALID_PARAMETER; - _SEH2_YIELD(return FALSE); - } _SEH2_END; - - /* We validated the incoming buffer, now allocate the remote one */ - RemoteCaptureBuffer = RtlAllocateHeap(CsrHeap, 0, LocalLength); - if (!RemoteCaptureBuffer) - { - /* We're out of memory */ - ApiMessage->Status = STATUS_NO_MEMORY; - return FALSE; - } - - /* Copy the client's buffer */ - RtlMoveMemory(RemoteCaptureBuffer, LocalCaptureBuffer, LocalLength); - - /* Copy the length */ - RemoteCaptureBuffer->Size = LocalLength; - - /* Calculate the difference between our buffer and the client's */ - BufferDistance = (ULONG_PTR)RemoteCaptureBuffer - (ULONG_PTR)LocalCaptureBuffer; - - /* Save the pointer count and offset pointer */ - PointerCount = RemoteCaptureBuffer->PointerCount; - PointerOffsets = (ULONG_PTR**)(RemoteCaptureBuffer + 1); - - /* Start the loop */ - while (PointerCount) - { - /* Get the current pointer */ - if ((CurrentPointer = *PointerOffsets++)) - { - /* Add it to the CSR Message structure */ - CurrentPointer += (ULONG_PTR)ApiMessage; - - /* Validate the bounds of the current pointer */ - if ((*CurrentPointer >= CsrThread->Process->ClientViewBase) && - (*CurrentPointer < CsrThread->Process->ClientViewBounds)) - { - /* Modify the pointer to take into account its new position */ - *CurrentPointer += BufferDistance; - } - else - { - /* Invalid pointer, fail */ - DPRINT1("*** CSRSS: CaptureBuffer MessagePointer outside of ClientView\n"); - DbgBreakPoint(); - ApiMessage->Status = STATUS_INVALID_PARAMETER; - } - } - - /* Move to the next Pointer */ - PointerCount--; - } - - /* Check if we got success */ - if (ApiMessage->Status != STATUS_SUCCESS) - { - /* Failure. Free the buffer and return*/ - RtlFreeHeap(CsrHeap, 0, RemoteCaptureBuffer); - return FALSE; - } - else - { - /* Success, save the previous buffer */ - RemoteCaptureBuffer->PreviousCaptureBuffer = LocalCaptureBuffer; - ApiMessage->CsrCaptureData = RemoteCaptureBuffer; - } - - /* Success */ - return TRUE; -} - -/*++ - * @name CsrReleaseCapturedArguments - * @implemented NT5.1 - * - * The CsrReleaseCapturedArguments routine releases a Capture Buffer - * that was previously captured with CsrCaptureArguments. - * - * @param ApiMessage - * Pointer to the CSR API Message containing the Capture Buffer - * that needs to be released. - * - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -CsrReleaseCapturedArguments(IN PCSR_API_MESSAGE ApiMessage) -{ - PCSR_CAPTURE_BUFFER RemoteCaptureBuffer, LocalCaptureBuffer; - SIZE_T BufferDistance; - ULONG PointerCount; - ULONG_PTR **PointerOffsets, *CurrentPointer; - - /* Get the capture buffers */ - RemoteCaptureBuffer = ApiMessage->CsrCaptureData; - LocalCaptureBuffer = RemoteCaptureBuffer->PreviousCaptureBuffer; - - /* Free the previous one */ - RemoteCaptureBuffer->PreviousCaptureBuffer = NULL; - - /* Find out the difference between the two buffers */ - BufferDistance = (ULONG_PTR)LocalCaptureBuffer - (ULONG_PTR)RemoteCaptureBuffer; - - /* Save the pointer count and offset pointer */ - PointerCount = RemoteCaptureBuffer->PointerCount; - PointerOffsets = (ULONG_PTR**)(RemoteCaptureBuffer + 1); - - /* Start the loop */ - while (PointerCount) - { - /* Get the current pointer */ - CurrentPointer = *PointerOffsets++; - if (CurrentPointer) - { - /* Add it to the CSR Message structure */ - CurrentPointer += (ULONG_PTR)ApiMessage; - - /* Modify the pointer to take into account its new position */ - *CurrentPointer += BufferDistance; - } - - /* Move to the next Pointer */ - PointerCount--; - } - - /* Copy the data back */ - RtlMoveMemory(LocalCaptureBuffer, RemoteCaptureBuffer, RemoteCaptureBuffer->Size); - - /* Free our allocated buffer */ - RtlFreeHeap(CsrHeap, 0, RemoteCaptureBuffer); -} - -/*++ - * @name CsrValidateMessageBuffer - * @implemented NT5.1 - * - * The CsrValidateMessageBuffer routine validates a captured message buffer - * present in the CSR Api Message - * - * @param ApiMessage - * Pointer to the CSR API Message containing the CSR Capture Buffer. - * - * @param Buffer - * Pointer to the message buffer to validate. - * - * @param ArgumentSize - * Size of the message to check. - * - * @param ArgumentCount - * Number of messages to check. - * - * @return TRUE if validation suceeded, FALSE otherwise. - * - * @remarks None. - * - *--*/ -BOOLEAN -NTAPI -CsrValidateMessageBuffer(IN PCSR_API_MESSAGE ApiMessage, - IN PVOID *Buffer, - IN ULONG ArgumentSize, - IN ULONG ArgumentCount) -{ - PCSR_CAPTURE_BUFFER CaptureBuffer = ApiMessage->CsrCaptureData; - SIZE_T BufferDistance; - ULONG PointerCount, i; - ULONG_PTR **PointerOffsets, *CurrentPointer; - - /* Make sure there are some arguments */ - if (!ArgumentCount) return FALSE; - - /* Check if didn't get a buffer and there aren't any arguments to check */ - if (!(*Buffer) && (!(ArgumentCount * ArgumentSize))) return TRUE; - - /* Check if we have no capture buffer */ - if (!CaptureBuffer) - { - /* In this case, check only the Process ID */ - if (NtCurrentTeb()->ClientId.UniqueProcess == - ApiMessage->Header.ClientId.UniqueProcess) - { - /* There is a match, validation succeeded */ - return TRUE; - } - } - else - { - /* Make sure that there is still space left in the buffer */ - if ((CaptureBuffer->Size - (ULONG_PTR)*Buffer + (ULONG_PTR)CaptureBuffer) < - (ArgumentCount * ArgumentSize)) - { - /* Find out the difference between the two buffers */ - BufferDistance = (ULONG_PTR)Buffer - (ULONG_PTR)ApiMessage; - - /* Save the pointer count */ - PointerCount = CaptureBuffer->PointerCount; - PointerOffsets = (ULONG_PTR**)(CaptureBuffer + 1); - - /* Start the loop */ - for (i = 0; i < PointerCount; i++) - { - /* Get the current pointer */ - CurrentPointer = *PointerOffsets++; - - /* Check if its' equal to the difference */ - if (*CurrentPointer == BufferDistance) return TRUE; - } - } - } - - /* Failure */ - DbgPrint("CSRSRV: Bad message buffer %p\n", ApiMessage); - DbgBreakPoint(); - return FALSE; -} - -/*++ - * @name CsrValidateMessageString - * @implemented NT5.1 - * - * The CsrValidateMessageString validates a captured Wide-Character String - * present in a CSR API Message. - * - * @param ApiMessage - * Pointer to the CSR API Message containing the CSR Capture Buffer. - * - * @param MessageString - * Pointer to the buffer containing the string to validate. - * - * @return TRUE if validation suceeded, FALSE otherwise. - * - * @remarks None. - * - *--*/ -BOOLEAN -NTAPI -CsrValidateMessageString(IN PCSR_API_MESSAGE ApiMessage, - IN LPWSTR *MessageString) -{ - DPRINT1("CSRSRV: %s called\n", __FUNCTION__); - return FALSE; -} - -/* EOF */ diff --git a/deprecated/csr/csrsrv/csrsrv.rc b/deprecated/csr/csrsrv/csrsrv.rc deleted file mode 100644 index 658072d09b8..00000000000 --- a/deprecated/csr/csrsrv/csrsrv.rc +++ /dev/null @@ -1,5 +0,0 @@ -#define REACTOS_VERSION_DLL -#define REACTOS_STR_FILE_DESCRIPTION "ReactOS CSR Core Server\0" -#define REACTOS_STR_INTERNAL_NAME "csrsrv\0" -#define REACTOS_STR_ORIGINAL_FILENAME "csrsrv.dll\0" -#include diff --git a/deprecated/csr/csrsrv/csrsrv2.spec b/deprecated/csr/csrsrv/csrsrv2.spec deleted file mode 100644 index e3794208fe9..00000000000 --- a/deprecated/csr/csrsrv/csrsrv2.spec +++ /dev/null @@ -1,35 +0,0 @@ -@ stdcall CsrAddStaticServerThread(ptr ptr long) -@ stdcall CsrCallServerFromServer(ptr ptr) -@ stdcall CsrConnectToUser() -@ stdcall CsrCreateProcess(ptr ptr ptr ptr long ptr) -@ stdcall CsrCreateRemoteThread(ptr ptr) -@ stdcall CsrCreateThread(ptr ptr ptr long) -@ stdcall CsrCreateWait(ptr ptr ptr ptr ptr ptr) -@ stdcall CsrDebugProcess(ptr) -@ stdcall CsrDebugProcessStop(ptr) -@ stdcall CsrDereferenceProcess(ptr) -@ stdcall CsrDereferenceThread(ptr) -@ stdcall CsrDereferenceWait(ptr) -@ stdcall CsrDestroyProcess(ptr long) -@ stdcall CsrDestroyThread(ptr) -@ stdcall CsrExecServerThread(ptr long) -@ stdcall CsrGetProcessLuid(ptr ptr) -@ stdcall CsrImpersonateClient(ptr) -@ stdcall CsrLockProcessByClientId(ptr ptr) -@ stdcall CsrLockThreadByClientId(ptr ptr) -@ stdcall CsrMoveSatisfiedWait(ptr ptr) -@ stdcall CsrNotifyWait(ptr long ptr ptr) -@ stdcall CsrPopulateDosDevices() -@ stdcall CsrQueryApiPort() -@ stdcall CsrReferenceThread(ptr) -@ stdcall CsrRevertToSelf() -@ stdcall CsrServerInitialization(long ptr) -@ stdcall CsrSetBackgroundPriority(ptr) -@ stdcall CsrSetCallingSpooler(long) -@ stdcall CsrSetForegroundPriority(ptr) -@ stdcall CsrShutdownProcesses(ptr long) -@ stdcall CsrUnhandledExceptionFilter(ptr) -@ stdcall CsrUnlockProcess(ptr) -@ stdcall CsrUnlockThread(ptr) -@ stdcall CsrValidateMessageBuffer(ptr ptr long long) -@ stdcall CsrValidateMessageString(ptr ptr) diff --git a/deprecated/csr/csrsrv/init.c b/deprecated/csr/csrsrv/init.c deleted file mode 100644 index eee4f3d28d6..00000000000 --- a/deprecated/csr/csrsrv/init.c +++ /dev/null @@ -1,988 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS CSR Sub System - * FILE: subsys/csr/csrsrv/init.c - * PURPOSE: CSR Server DLL Initialization - * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) - */ - -/* INCLUDES ******************************************************************/ - -#include "srv.h" - -#define NDEBUG -#include - -/* DATA **********************************************************************/ - -HANDLE CsrObjectDirectory; -ULONG SessionId; -BOOLEAN CsrProfileControl; -UNICODE_STRING CsrDirectoryName; -HANDLE CsrHeap; -HANDLE BNOLinksDirectory; -HANDLE SessionObjectDirectory; -HANDLE DosDevicesDirectory; -HANDLE CsrInitializationEvent; -SYSTEM_BASIC_INFORMATION CsrNtSysInfo; -ULONG CsrDebug; - -/* PRIVATE FUNCTIONS *********************************************************/ - -/*++ - * @name CsrParseServerCommandLine - * - * The CsrParseServerCommandLine routine parses the CSRSS command-line in the - * registry and performs operations for each entry found. - * - * @param ArgumentCount - * Number of arguments on the command line. - * - * @param Arguments - * Array of arguments. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -FASTCALL -CsrParseServerCommandLine(IN ULONG ArgumentCount, - IN PCHAR Arguments[]) -{ - NTSTATUS Status; - PCHAR ParameterName = NULL, ParameterValue = NULL, EntryPoint, ServerString; - ULONG i, DllIndex; - ANSI_STRING AnsiString; - OBJECT_ATTRIBUTES ObjectAttributes; - - /* Set the Defaults */ - CsrTotalPerProcessDataLength = 0; - CsrObjectDirectory = 0; - CsrMaxApiRequestThreads = 16; - - /* Save our Session ID, and create a Directory for it */ - SessionId = NtCurrentPeb()->SessionId; - Status = CsrCreateSessionObjectDirectory(SessionId); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: CsrCreateSessionObjectDirectory failed (%lx)\n", - Status); - - /* It's not fatal if the session ID isn't zero */ - if (SessionId) return Status; - ASSERT(NT_SUCCESS(Status)); - } - - /* Loop through every argument */ - for (i = 1; i < ArgumentCount; i++) - { - /* Split Name and Value */ - ParameterName = Arguments[i]; - ParameterValue = NULL; - ParameterValue = strchr(ParameterName, '='); - if (ParameterValue) *ParameterValue++ = ANSI_NULL; - DPRINT1("Name=%s, Value=%s\n", ParameterName, ParameterValue); - - /* Check for Object Directory */ - if (!_stricmp(ParameterName, "ObjectDirectory")) - { - /* Check if a session ID is specified */ - if (SessionId) - { - DPRINT1("Sessions not yet implemented\n"); - ASSERT(SessionId); - } - - /* Initialize the directory name */ - RtlInitAnsiString(&AnsiString, ParameterValue); - Status = RtlAnsiStringToUnicodeString(&CsrDirectoryName, - &AnsiString, - TRUE); - ASSERT(NT_SUCCESS(Status) || SessionId != 0); - if (!NT_SUCCESS(Status)) return Status; - - /* Create it */ - InitializeObjectAttributes(&ObjectAttributes, - &CsrDirectoryName, - OBJ_OPENIF | OBJ_CASE_INSENSITIVE | OBJ_PERMANENT, - NULL, - NULL); - Status = NtCreateDirectoryObject(&CsrObjectDirectory, - DIRECTORY_ALL_ACCESS, - &ObjectAttributes); - if (!NT_SUCCESS(Status)) return Status; - - /* Secure it */ - Status = CsrSetDirectorySecurity(CsrObjectDirectory); - if (!NT_SUCCESS(Status)) return Status; - } - else if (!_stricmp(ParameterName, "SubSystemType")) - { - /* Ignored */ - } - else if (!_stricmp(ParameterName, "MaxRequestThreads")) - { - Status = RtlCharToInteger(ParameterValue, - 0, - &CsrMaxApiRequestThreads); - } - else if (!_stricmp(ParameterName, "RequestThreads")) - { - /* Ignored */ - Status = STATUS_SUCCESS; - } - else if (!_stricmp(ParameterName, "ProfileControl")) - { - /* Ignored */ - } - else if (!_stricmp(ParameterName, "SharedSection")) - { - /* Craete the Section */ - Status = CsrSrvCreateSharedSection(ParameterValue); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: *** Invalid syntax for %s=%s (Status == %X)\n", - ParameterName, ParameterValue, Status); - return Status; - } - - /* Load us */ - Status = CsrLoadServerDll("CSRSS", NULL, CSR_SRV_SERVER); - } - else if (!_stricmp(ParameterName, "ServerDLL")) - { - /* Loop the command line */ - EntryPoint = NULL; - Status = STATUS_INVALID_PARAMETER; - ServerString = ParameterValue; - while (*ServerString) - { - /* Check for the Entry Point */ - if ((*ServerString == ':') && (!EntryPoint)) - { - /* Found it. Add a nullchar and save it */ - *ServerString++ = ANSI_NULL; - EntryPoint = ServerString; - } - - /* Check for the Dll Index */ - if (*ServerString++ == ',') break; - } - - /* Did we find something to load? */ - if (!*ServerString) - { - DPRINT1("CSRSS: *** Invalid syntax for ServerDll=%s (Status == %X)\n", - ParameterValue, Status); - return Status; - } - - /* Convert it to a ULONG */ - Status = RtlCharToInteger(ServerString, 10, &DllIndex); - - /* Add a null char if it was valid */ - if (NT_SUCCESS(Status)) ServerString[-1] = ANSI_NULL; - - /* Load it */ - if (CsrDebug & 1) DPRINT1("CSRSS: Loading ServerDll=%s:%s\n", ParameterValue, EntryPoint); - Status = CsrLoadServerDll(ParameterValue, EntryPoint, DllIndex); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: *** Failed loading ServerDll=%s (Status == 0x%x)\n", - ParameterValue, Status); - return Status; - } - } - else if (!_stricmp(ParameterName, "Windows")) - { - /* Ignored */ - } - else - { - /* Invalid parameter on the command line */ - Status = STATUS_INVALID_PARAMETER; - } - } - - /* Return status */ - return Status; -} - -/*++ - * @name CsrCreateLocalSystemSD - * - * The CsrCreateLocalSystemSD routine creates a Security Descriptor for - * the local account with PORT_ALL_ACCESS. - * - * @param LocalSystemSd - * Pointer to a pointer to the security descriptor to create. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrCreateLocalSystemSD(OUT PSECURITY_DESCRIPTOR *LocalSystemSd) -{ - SID_IDENTIFIER_AUTHORITY NtSidAuthority = {SECURITY_NT_AUTHORITY}; - PSID SystemSid; - ULONG Length; - PSECURITY_DESCRIPTOR SystemSd; - PACL Dacl; - NTSTATUS Status; - - /* Initialize the System SID */ - RtlAllocateAndInitializeSid(&NtSidAuthority, 1, - SECURITY_LOCAL_SYSTEM_RID, - 0, 0, 0, 0, 0, 0, 0, - &SystemSid); - - /* Get the length of the SID */ - Length = RtlLengthSid(SystemSid) + sizeof(ACL) + sizeof(ACCESS_ALLOWED_ACE); - - /* Allocate a buffer for the Security Descriptor, with SID and DACL */ - SystemSd = RtlAllocateHeap(CsrHeap, 0, SECURITY_DESCRIPTOR_MIN_LENGTH + Length); - - /* Set the pointer to the DACL */ - Dacl = (PACL)((ULONG_PTR)SystemSd + SECURITY_DESCRIPTOR_MIN_LENGTH); - - /* Now create the SD itself */ - Status = RtlCreateSecurityDescriptor(SystemSd, SECURITY_DESCRIPTOR_REVISION); - if (!NT_SUCCESS(Status)) - { - /* Fail */ - RtlFreeHeap(CsrHeap, 0, SystemSd); - return Status; - } - - /* Create the DACL for it*/ - RtlCreateAcl(Dacl, Length, ACL_REVISION2); - - /* Create the ACE */ - Status = RtlAddAccessAllowedAce(Dacl, ACL_REVISION, PORT_ALL_ACCESS, SystemSid); - if (!NT_SUCCESS(Status)) - { - /* Fail */ - RtlFreeHeap(CsrHeap, 0, SystemSd); - return Status; - } - - /* Clear the DACL in the SD */ - Status = RtlSetDaclSecurityDescriptor(SystemSd, TRUE, Dacl, FALSE); - if (!NT_SUCCESS(Status)) - { - /* Fail */ - RtlFreeHeap(CsrHeap, 0, SystemSd); - return Status; - } - - /* Free the SID and return*/ - RtlFreeSid(SystemSid); - *LocalSystemSd = SystemSd; - return Status; -} - -/*++ - * @name GetDosDevicesProtection - * - * The GetDosDevicesProtection creates a security descriptor for the DOS Devices - * Object Directory. - * - * @param DosDevicesSd - * Pointer to the Security Descriptor to return. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks Depending on the DOS Devices Protection Mode (set in the registry), - * regular users may or may not have full access to the directory. - * - *--*/ -NTSTATUS -NTAPI -GetDosDevicesProtection(OUT PSECURITY_DESCRIPTOR DosDevicesSd) -{ - SID_IDENTIFIER_AUTHORITY WorldAuthority = {SECURITY_WORLD_SID_AUTHORITY}; - SID_IDENTIFIER_AUTHORITY CreatorAuthority = {SECURITY_CREATOR_SID_AUTHORITY}; - SID_IDENTIFIER_AUTHORITY NtSidAuthority = {SECURITY_NT_AUTHORITY}; - PSID WorldSid, CreatorSid, AdminSid, SystemSid; - UCHAR KeyValueBuffer[0x40]; - PKEY_VALUE_PARTIAL_INFORMATION KeyValuePartialInfo; - UNICODE_STRING KeyName; - ULONG ProtectionMode = 0; - OBJECT_ATTRIBUTES ObjectAttributes; - PACL Dacl; - PACCESS_ALLOWED_ACE Ace; - HANDLE hKey; - NTSTATUS Status; - ULONG ResultLength, SidLength, AclLength; - - /* Create the SD */ - Status = RtlCreateSecurityDescriptor(DosDevicesSd, SECURITY_DESCRIPTOR_REVISION); - ASSERT(NT_SUCCESS(Status)); - - /* Initialize the System SID */ - Status = RtlAllocateAndInitializeSid(&NtSidAuthority, 1, - SECURITY_LOCAL_SYSTEM_RID, - 0, 0, 0, 0, 0, 0, 0, - &SystemSid); - ASSERT(NT_SUCCESS(Status)); - - /* Initialize the World SID */ - Status = RtlAllocateAndInitializeSid(&WorldAuthority, 1, - SECURITY_WORLD_RID, - 0, 0, 0, 0, 0, 0, 0, - &WorldSid); - ASSERT(NT_SUCCESS(Status)); - - /* Initialize the Admin SID */ - Status = RtlAllocateAndInitializeSid(&NtSidAuthority, 2, - SECURITY_BUILTIN_DOMAIN_RID, - DOMAIN_ALIAS_RID_ADMINS, - 0, 0, 0, 0, 0, 0, - &AdminSid); - ASSERT(NT_SUCCESS(Status)); - - /* Initialize the Creator SID */ - Status = RtlAllocateAndInitializeSid(&CreatorAuthority, 1, - SECURITY_CREATOR_OWNER_RID, - 0, 0, 0, 0, 0, 0, 0, - &CreatorSid); - ASSERT(NT_SUCCESS(Status)); - - /* Open the Session Manager Key */ - RtlInitUnicodeString(&KeyName, SM_REG_KEY); - InitializeObjectAttributes(&ObjectAttributes, - &KeyName, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - Status = NtOpenKey(&hKey, KEY_READ, &ObjectAttributes); - if (NT_SUCCESS(Status)) - { - /* Read the key value */ - RtlInitUnicodeString(&KeyName, L"ProtectionMode"); - Status = NtQueryValueKey(hKey, - &KeyName, - KeyValuePartialInformation, - KeyValueBuffer, - sizeof(KeyValueBuffer), - &ResultLength); - - /* Make sure it's what we expect it to be */ - KeyValuePartialInfo = (PKEY_VALUE_PARTIAL_INFORMATION)KeyValueBuffer; - if ((NT_SUCCESS(Status)) && (KeyValuePartialInfo->Type == REG_DWORD) && - (*(PULONG)KeyValuePartialInfo->Data)) - { - /* Save the Protection Mode */ - ProtectionMode = *(PULONG)KeyValuePartialInfo->Data; - } - - /* Close the handle */ - NtClose(hKey); - } - - /* Check the Protection Mode */ - if (ProtectionMode & 3) - { - /* Calculate SID Lengths */ - SidLength = RtlLengthSid(CreatorSid) + RtlLengthSid(SystemSid) + - RtlLengthSid(AdminSid); - AclLength = sizeof(ACL) + 3 * sizeof(ACCESS_ALLOWED_ACE) + SidLength; - - /* Allocate memory for the DACL */ - Dacl = RtlAllocateHeap(CsrHeap, HEAP_ZERO_MEMORY, AclLength); - ASSERT(Dacl != NULL); - - /* Build the ACL and add 3 ACEs */ - Status = RtlCreateAcl(Dacl, AclLength, ACL_REVISION2); - ASSERT(NT_SUCCESS(Status)); - Status = RtlAddAccessAllowedAce(Dacl, ACL_REVISION, GENERIC_ALL, SystemSid); - ASSERT(NT_SUCCESS(Status)); - Status = RtlAddAccessAllowedAce(Dacl, ACL_REVISION, GENERIC_ALL, AdminSid); - ASSERT(NT_SUCCESS(Status)); - Status = RtlAddAccessAllowedAce(Dacl, ACL_REVISION, GENERIC_ALL, CreatorSid); - ASSERT(NT_SUCCESS(Status)); - - /* Edit the ACEs to make them inheritable */ - Status = RtlGetAce(Dacl, 0, (PVOID*)&Ace); - ASSERT(NT_SUCCESS(Status)); - Ace->Header.AceFlags |= OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE; - Status = RtlGetAce(Dacl, 1, (PVOID*)&Ace); - ASSERT(NT_SUCCESS(Status)); - Ace->Header.AceFlags |= OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE; - Status = RtlGetAce(Dacl, 2, (PVOID*)&Ace); - ASSERT(NT_SUCCESS(Status)); - Ace->Header.AceFlags |= OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE | INHERIT_ONLY_ACE; - - /* Set this DACL with the SD */ - Status = RtlSetDaclSecurityDescriptor(DosDevicesSd, TRUE, Dacl, FALSE); - ASSERT(NT_SUCCESS(Status)); - goto Quickie; - } - else - { - /* Calculate SID Lengths */ - SidLength = RtlLengthSid(WorldSid) + RtlLengthSid(SystemSid); - AclLength = sizeof(ACL) + 3 * sizeof(ACCESS_ALLOWED_ACE) + SidLength; - - /* Allocate memory for the DACL */ - Dacl = RtlAllocateHeap(CsrHeap, HEAP_ZERO_MEMORY, AclLength); - ASSERT(Dacl != NULL); - - /* Build the ACL and add 3 ACEs */ - Status = RtlCreateAcl(Dacl, AclLength, ACL_REVISION2); - ASSERT(NT_SUCCESS(Status)); - Status = RtlAddAccessAllowedAce(Dacl, ACL_REVISION, GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE, WorldSid); - ASSERT(NT_SUCCESS(Status)); - Status = RtlAddAccessAllowedAce(Dacl, ACL_REVISION, GENERIC_ALL, SystemSid); - ASSERT(NT_SUCCESS(Status)); - Status = RtlAddAccessAllowedAce(Dacl, ACL_REVISION, GENERIC_ALL, WorldSid); - ASSERT(NT_SUCCESS(Status)); - - /* Edit the last ACE to make it inheritable */ - Status = RtlGetAce(Dacl, 2, (PVOID*)&Ace); - ASSERT(NT_SUCCESS(Status)); - Ace->Header.AceFlags |= OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE | INHERIT_ONLY_ACE; - - /* Set this DACL with the SD */ - Status = RtlSetDaclSecurityDescriptor(DosDevicesSd, TRUE, Dacl, FALSE); - ASSERT(NT_SUCCESS(Status)); - goto Quickie; - } - -/* FIXME: failure cases! Fail: */ - /* Free the memory */ - RtlFreeHeap(CsrHeap, 0, Dacl); - -/* FIXME: semi-failure cases! Quickie: */ -Quickie: - /* Free the SIDs */ - RtlFreeSid(SystemSid); - RtlFreeSid(WorldSid); - RtlFreeSid(AdminSid); - RtlFreeSid(CreatorSid); - - /* Return */ - return Status; -} - -/*++ - * @name FreeDosDevicesProtection - * - * The FreeDosDevicesProtection frees the security descriptor that was created - * by GetDosDevicesProtection - * - * @param DosDevicesSd - * Pointer to the security descriptor to free. - - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -FreeDosDevicesProtection(IN PSECURITY_DESCRIPTOR DosDevicesSd) -{ - PACL Dacl; - BOOLEAN Present, Default; - NTSTATUS Status; - - /* Get the DACL corresponding to this SD */ - Status = RtlGetDaclSecurityDescriptor(DosDevicesSd, &Present, &Dacl, &Default); - ASSERT(NT_SUCCESS(Status)); - ASSERT(Present); - ASSERT(Dacl != NULL); - - /* Free it */ - if ((NT_SUCCESS(Status)) && (Dacl)) RtlFreeHeap(CsrHeap, 0, Dacl); -} - -/*++ - * @name CsrCreateSessionObjectDirectory - * - * The CsrCreateSessionObjectDirectory routine creates the BaseNamedObjects, - * Session and Dos Devices directories for the specified session. - * - * @param Session - * Session ID for which to create the directories. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrCreateSessionObjectDirectory(IN ULONG Session) -{ - WCHAR SessionBuffer[512], BnoBuffer[512]; - UNICODE_STRING SessionString, BnoString; - OBJECT_ATTRIBUTES ObjectAttributes; - HANDLE BnoHandle; - SECURITY_DESCRIPTOR DosDevicesSd; - NTSTATUS Status; - - /* Generate the Session BNOLINKS Directory name */ - swprintf(SessionBuffer, L"%ws\\BNOLINKS", SESSION_ROOT); - RtlInitUnicodeString(&SessionString, SessionBuffer); - - /* Create it */ - InitializeObjectAttributes(&ObjectAttributes, - &SessionString, - OBJ_OPENIF | OBJ_CASE_INSENSITIVE, - NULL, - NULL); - Status = NtCreateDirectoryObject(&BNOLinksDirectory, - DIRECTORY_ALL_ACCESS, - &ObjectAttributes); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: NtCreateDirectoryObject failed in " - "CsrCreateSessionObjectDirectory - status = %lx\n", Status); - return Status; - } - - /* Now add the Session ID */ - swprintf(SessionBuffer, L"%ld", Session); - RtlInitUnicodeString(&SessionString, SessionBuffer); - - /* Check if this is the first Session */ - if (Session) - { - /* Not the first, so the name will be slighly more complex */ - swprintf(BnoBuffer, L"%ws\\%ld\\BaseNamedObjects", SESSION_ROOT, Session); - RtlInitUnicodeString(&BnoString, BnoBuffer); - } - else - { - /* Use the direct name */ - RtlInitUnicodeString(&BnoString, L"\\BaseNamedObjects"); - } - - /* Create the symlink */ - InitializeObjectAttributes(&ObjectAttributes, - &SessionString, - OBJ_OPENIF | OBJ_CASE_INSENSITIVE, - BNOLinksDirectory, - NULL); - Status = NtCreateSymbolicLinkObject(&BnoHandle, - SYMBOLIC_LINK_ALL_ACCESS, - &ObjectAttributes, - &BnoString); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: NtCreateSymbolicLinkObject failed in " - "CsrCreateSessionObjectDirectory - status = %lx\n", Status); - return Status; - } - - /* Create the \DosDevices Security Descriptor */ - Status = GetDosDevicesProtection(&DosDevicesSd); - if (!NT_SUCCESS(Status)) return Status; - - /* Now create a directory for this session */ - swprintf(SessionBuffer, L"%ws\\%ld", SESSION_ROOT, Session); - RtlInitUnicodeString(&SessionString, SessionBuffer); - - /* Create the directory */ - InitializeObjectAttributes(&ObjectAttributes, - &SessionString, - OBJ_OPENIF | OBJ_CASE_INSENSITIVE, - 0, - &DosDevicesSd); - Status = NtCreateDirectoryObject(&SessionObjectDirectory, - DIRECTORY_ALL_ACCESS, - &ObjectAttributes); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: NtCreateDirectoryObject failed in " - "CsrCreateSessionObjectDirectory - status = %lx\n", Status); - FreeDosDevicesProtection(&DosDevicesSd); - return Status; - } - - /* Next, create a directory for this session's DOS Devices */ - RtlInitUnicodeString(&SessionString, L"DosDevices"); - InitializeObjectAttributes(&ObjectAttributes, - &SessionString, - OBJ_CASE_INSENSITIVE, - SessionObjectDirectory, - &DosDevicesSd); - Status = NtCreateDirectoryObject(&DosDevicesDirectory, - DIRECTORY_ALL_ACCESS, - &ObjectAttributes); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: NtCreateDirectoryObject failed in " - "CsrCreateSessionObjectDirectory - status = %lx\n", Status); - } - - /* Release the Security Descriptor */ - FreeDosDevicesProtection(&DosDevicesSd); - - /* Return */ - return Status; -} - -/*++ - * @name CsrSetProcessSecurity - * - * The CsrSetProcessSecurity routine protects access to the CSRSS process - * from unauthorized tampering. - * - * @param None. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrSetProcessSecurity(VOID) -{ - NTSTATUS Status; - HANDLE hToken, hProcess = NtCurrentProcess(); - ULONG ReturnLength, Length; - PTOKEN_USER TokenInfo = NULL; - PSECURITY_DESCRIPTOR ProcSd = NULL; - PACL Dacl; - PSID UserSid; - - /* Open our token */ - Status = NtOpenProcessToken(hProcess, TOKEN_QUERY, &hToken); - if (!NT_SUCCESS(Status)) goto Quickie; - - /* Get the Token User Length */ - NtQueryInformationToken(hToken, TokenUser, NULL, 0, &Length); - - /* Allocate space for it */ - TokenInfo = RtlAllocateHeap(CsrHeap, HEAP_ZERO_MEMORY, Length); - if (!TokenInfo) - { - Status = STATUS_NO_MEMORY; - goto Quickie; - } - - /* Now query the data */ - Status = NtQueryInformationToken(hToken, TokenUser, TokenInfo, Length, &Length); - NtClose(hToken); - if (!NT_SUCCESS(Status)) goto Quickie; - - /* Now check the SID Length */ - UserSid = TokenInfo->User.Sid; - ReturnLength = RtlLengthSid(UserSid) + sizeof(ACL) + sizeof(ACCESS_ALLOWED_ACE); - - /* Allocate a buffer for the Security Descriptor, with SID and DACL */ - ProcSd = RtlAllocateHeap(CsrHeap, HEAP_ZERO_MEMORY, SECURITY_DESCRIPTOR_MIN_LENGTH + Length); - if (!ProcSd) - { - Status = STATUS_NO_MEMORY; - goto Quickie; - } - - /* Set the pointer to the DACL */ - Dacl = (PACL)((ULONG_PTR)ProcSd + SECURITY_DESCRIPTOR_MIN_LENGTH); - - /* Now create the SD itself */ - Status = RtlCreateSecurityDescriptor(ProcSd, SECURITY_DESCRIPTOR_REVISION); - if (!NT_SUCCESS(Status)) goto Quickie; - - /* Create the DACL for it*/ - RtlCreateAcl(Dacl, Length, ACL_REVISION2); - - /* Create the ACE */ - Status = RtlAddAccessAllowedAce(Dacl, - ACL_REVISION, - PROCESS_VM_READ | PROCESS_VM_WRITE | - PROCESS_VM_OPERATION | PROCESS_DUP_HANDLE | - PROCESS_TERMINATE | PROCESS_SUSPEND_RESUME | - PROCESS_QUERY_INFORMATION | READ_CONTROL, - UserSid); - if (!NT_SUCCESS(Status)) goto Quickie; - - /* Clear the DACL in the SD */ - Status = RtlSetDaclSecurityDescriptor(ProcSd, TRUE, Dacl, FALSE); - if (!NT_SUCCESS(Status)) goto Quickie; - - /* Write the SD into the Process */ - Status = NtSetSecurityObject(hProcess, DACL_SECURITY_INFORMATION, ProcSd); - - /* Free the memory and return */ -Quickie: - if (ProcSd) RtlFreeHeap(CsrHeap, 0, ProcSd); - RtlFreeHeap(CsrHeap, 0, TokenInfo); - return Status; -} - -/*++ - * @name CsrSetDirectorySecurity - * - * The CsrSetDirectorySecurity routine sets the security descriptor for the - * specified Object Directory. - * - * @param ObjectDirectory - * Handle fo the Object Directory to protect. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrSetDirectorySecurity(IN HANDLE ObjectDirectory) -{ - /* FIXME: Implement */ - return STATUS_SUCCESS; -} - -/* PUBLIC FUNCTIONS **********************************************************/ - -/*++ - * @name CsrServerInitialization - * @implemented NT4 - * - * The CsrServerInitialization routine is the native (not Server) entrypoint - * of this Server DLL. It serves as the entrypoint for csrss. - * - * @param ArgumentCount - * Number of arguments on the command line. - * - * @param Arguments - * Array of arguments from the command line. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrServerInitialization(IN ULONG ArgumentCount, - IN PCHAR Arguments[]) -{ - NTSTATUS Status = STATUS_SUCCESS; - ULONG i = 0; - PVOID ProcessData; - PCSR_SERVER_DLL ServerDll; - DPRINT("CSRSRV: %s called\n", __FUNCTION__); - - /* Create the Init Event */ - Status = NtCreateEvent(&CsrInitializationEvent, - EVENT_ALL_ACCESS, - NULL, - SynchronizationEvent, - FALSE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: NtCreateEvent failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* Cache System Basic Information so we don't always request it */ - Status = NtQuerySystemInformation(SystemBasicInformation, - &CsrNtSysInfo, - sizeof(SYSTEM_BASIC_INFORMATION), - NULL); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: NtQuerySystemInformation failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* Save our Heap */ - CsrHeap = RtlGetProcessHeap(); - - /* Set our Security Descriptor to protect the process */ - Status = CsrSetProcessSecurity(); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: CsrSetProcessSecurity failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* Set up Session Support */ - Status = CsrInitializeNtSessionList(); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: CsrInitializeSessions failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* Set up Process Support */ - Status = CsrInitializeProcessStructure(); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: CsrInitializeProcessStructure failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* Parse the command line */ - Status = CsrParseServerCommandLine(ArgumentCount, Arguments); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: CsrParseServerCommandLine failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* All Server DLLs are now loaded, allocate a heap for the Root Process */ - ProcessData = RtlAllocateHeap(CsrHeap, - HEAP_ZERO_MEMORY, - CsrTotalPerProcessDataLength); - if (!ProcessData) - { - DPRINT1("CSRSRV:%s: RtlAllocateHeap failed (Status=%08lx)\n", - __FUNCTION__, STATUS_NO_MEMORY); - return STATUS_NO_MEMORY; - } - - /* - * Our Root Process was never officially initalized, so write the data - * for each Server DLL manually. - */ - for (i = 0; i < CSR_SERVER_DLL_MAX; i++) - { - /* Get the current Server */ - ServerDll = CsrLoadedServerDll[i]; - - /* Is it loaded, and does it have per process data? */ - if ((ServerDll) && (ServerDll->SizeOfProcessData)) - { - /* It does, give it part of our allocated heap */ - CsrRootProcess->ServerData[i] = ProcessData; - - /* Move to the next heap position */ - ProcessData = (PVOID)((ULONG_PTR)ProcessData + - ServerDll->SizeOfProcessData); - } - else - { - /* Nothing for this Server DLL */ - CsrRootProcess->ServerData[i] = NULL; - } - } - - /* Now initialize the Root Process manually as well */ - for (i = 0; i < CSR_SERVER_DLL_MAX; i++) - { - /* Get the current Server */ - ServerDll = CsrLoadedServerDll[i]; - - /* Is it loaded, and does it a callback for new processes? */ - if ((ServerDll) && (ServerDll->NewProcessCallback)) - { - /* Call the callback */ - ServerDll->NewProcessCallback(NULL, CsrRootProcess); - } - } - - /* Now initialize our API Port */ - Status = CsrApiPortInitialize(); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: CsrApiPortInitialize failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* Initialize the API Port for SM communication */ - Status = CsrSbApiPortInitialize(); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: CsrSbApiPortInitialize failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* We're all set! Connect to SM! */ - Status = SmConnectToSm(&CsrSbApiPortName, - CsrSbApiPort, - IMAGE_SUBSYSTEM_WINDOWS_GUI, - &CsrSmApiPort); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: SmConnectToSm failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* Finito! Signal the event */ - Status = NtSetEvent(CsrInitializationEvent, NULL); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: NtSetEvent failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* Close the event handle now */ - NtClose(CsrInitializationEvent); - - /* Have us handle Hard Errors */ - Status = NtSetDefaultHardErrorPort(CsrApiPort); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: NtSetDefaultHardErrorPort failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* Return status */ - return Status; -} - -/*++ - * @name CsrPopulateDosDevices - * @unimplemented NT5.1 - * - * The CsrPopulateDosDevices routine uses the DOS Device Map from the Kernel - * to populate the Dos Devices Object Directory for the session. - * - * @param None. - * - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -CsrPopulateDosDevices(VOID) -{ - DPRINT1("Deprecated API\n"); - return; -} - -BOOL -NTAPI -DllMain(IN HANDLE hDll, - IN DWORD dwReason, - IN LPVOID lpReserved) -{ - /* We don't do much */ - UNREFERENCED_PARAMETER(hDll); - UNREFERENCED_PARAMETER(dwReason); - UNREFERENCED_PARAMETER(lpReserved); - return TRUE; -} - -/* EOF */ diff --git a/deprecated/csr/csrsrv/process.c b/deprecated/csr/csrsrv/process.c deleted file mode 100644 index 9bf455db7c4..00000000000 --- a/deprecated/csr/csrsrv/process.c +++ /dev/null @@ -1,1342 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS CSR Sub System - * FILE: subsys/csr/csrsrv/process.c - * PURPOSE: CSR Server DLL Process Implementation - * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) - */ - -/* INCLUDES ******************************************************************/ - -#include "srv.h" - -#define NDEBUG -#include - -/* DATA **********************************************************************/ - -PCSR_PROCESS CsrRootProcess = NULL; -RTL_CRITICAL_SECTION CsrProcessLock; -ULONG CsrProcessSequenceCount = 5; -ULONG CsrTotalPerProcessDataLength; - -/* PRIVATE FUNCTIONS *********************************************************/ - -/*++ - * @name ProtectHandle - * @implemented NT5.2 - * - * The ProtectHandle routine protects an object handle against closure. - * - * @return TRUE or FALSE. - * - * @remarks None. - * - *--*/ -BOOLEAN -NTAPI -ProtectHandle(IN HANDLE ObjectHandle) -{ - NTSTATUS Status; - OBJECT_HANDLE_ATTRIBUTE_INFORMATION HandleInfo; - - /* Query current state */ - Status = NtQueryObject(ObjectHandle, - ObjectHandleFlagInformation, - &HandleInfo, - sizeof(HandleInfo), - NULL); - if (NT_SUCCESS(Status)) - { - /* Enable protect from close */ - HandleInfo.ProtectFromClose = TRUE; - Status = NtSetInformationObject(ObjectHandle, - ObjectHandleFlagInformation, - &HandleInfo, - sizeof(HandleInfo)); - if (NT_SUCCESS(Status)) return TRUE; - } - - /* We failed to or set the state */ - return FALSE; -} - -/*++ - * @name UnProtectHandle - * @implemented NT5.2 - * - * The UnProtectHandle routine unprotects an object handle against closure. - * - * @return TRUE or FALSE. - * - * @remarks None. - * - *--*/ -BOOLEAN -NTAPI -UnProtectHandle(IN HANDLE ObjectHandle) -{ - NTSTATUS Status; - OBJECT_HANDLE_ATTRIBUTE_INFORMATION HandleInfo; - - /* Query current state */ - Status = NtQueryObject(ObjectHandle, - ObjectHandleFlagInformation, - &HandleInfo, - sizeof(HandleInfo), - NULL); - if (NT_SUCCESS(Status)) - { - /* Disable protect from close */ - HandleInfo.ProtectFromClose = FALSE; - Status = NtSetInformationObject(ObjectHandle, - ObjectHandleFlagInformation, - &HandleInfo, - sizeof(HandleInfo)); - if (NT_SUCCESS(Status)) return TRUE; - } - - /* We failed to or set the state */ - return FALSE; -} - -/*++ - * @name CsrAllocateProcess - * @implemented NT4 - * - * The CsrAllocateProcess routine allocates a new CSR Process object. - * - * @return Pointer to the newly allocated CSR Process. - * - * @remarks None. - * - *--*/ -PCSR_PROCESS -NTAPI -CsrAllocateProcess(VOID) -{ - PCSR_PROCESS CsrProcess; - ULONG TotalSize; - - /* Calculate the amount of memory this should take */ - TotalSize = sizeof(CSR_PROCESS) + - (CSR_SERVER_DLL_MAX * sizeof(PVOID)) + - CsrTotalPerProcessDataLength; - - /* Allocate a Process */ - CsrProcess = RtlAllocateHeap(CsrHeap, HEAP_ZERO_MEMORY, TotalSize); - if (!CsrProcess) return NULL; - - /* Handle the Sequence Number and protect against overflow */ - CsrProcess->SequenceNumber = CsrProcessSequenceCount++; - if (CsrProcessSequenceCount < 5) CsrProcessSequenceCount = 5; - - /* Increase the reference count */ - CsrProcess->ReferenceCount++; - - /* Initialize the Thread List */ - InitializeListHead(&CsrProcess->ThreadList); - - /* Return the Process */ - return CsrProcess; -} - -/*++ - * @name CsrServerInitialization - * @implemented NT4 - * - * The CsrInitializeProcessStructure routine sets up support for CSR Processes - * and CSR Threads. - * - * @param None. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrInitializeProcessStructure(VOID) -{ - NTSTATUS Status; - ULONG i; - - /* Initialize the Lock */ - Status = RtlInitializeCriticalSection(&CsrProcessLock); - if (!NT_SUCCESS(Status)) return Status; - - /* Set up the Root Process */ - CsrRootProcess = CsrAllocateProcess(); - if (!CsrRootProcess) return STATUS_NO_MEMORY; - - /* Set up the minimal information for it */ - InitializeListHead(&CsrRootProcess->ListLink); - CsrRootProcess->ProcessHandle = (HANDLE)-1; - CsrRootProcess->ClientId = NtCurrentTeb()->ClientId; - - /* Initialize the Thread Hash List */ - for (i = 0; i < 256; i++) InitializeListHead(&CsrThreadHashTable[i]); - - /* Initialize the Wait Lock */ - return RtlInitializeCriticalSection(&CsrWaitListsLock); -} - -/*++ - * @name CsrDeallocateProcess - * - * The CsrDeallocateProcess frees the memory associated with a CSR Process. - * - * @param CsrProcess - * Pointer to the CSR Process to be freed. - * - * @return None. - * - * @remarks Do not call this routine. It is reserved for the internal - * thread management routines when a CSR Process has been cleanly - * dereferenced and killed. - * - *--*/ -VOID -NTAPI -CsrDeallocateProcess(IN PCSR_PROCESS CsrProcess) -{ - /* Free the process object from the heap */ - RtlFreeHeap(CsrHeap, 0, CsrProcess); -} - -/*++ - * @name CsrInsertProcess - * - * The CsrInsertProcess routine inserts a CSR Process into the Process List - * and notifies Server DLLs of the creation of a new CSR Process. - * - * @param Parent - * Optional pointer to the CSR Process creating this CSR Process. - * - * @param CurrentProcess - * Optional pointer to the current CSR Process. - * - * @param CsrProcess - * Pointer to the CSR Process which is to be inserted. - * - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -CsrInsertProcess(IN PCSR_PROCESS Parent OPTIONAL, - IN PCSR_PROCESS CurrentProcess OPTIONAL, - IN PCSR_PROCESS CsrProcess) -{ - PCSR_SERVER_DLL ServerDll; - ULONG i; - ASSERT(ProcessStructureListLocked()); - - /* Set the parent */ - CsrProcess->Parent = Parent; - - /* Insert it into the Root List */ - InsertTailList(&CsrRootProcess->ListLink, &CsrProcess->ListLink); - - /* Notify the Server DLLs */ - for (i = 0; i < CSR_SERVER_DLL_MAX; i++) - { - /* Get the current Server DLL */ - ServerDll = CsrLoadedServerDll[i]; - - /* Make sure it's valid and that it has callback */ - if ((ServerDll) && (ServerDll->NewProcessCallback)) - { - ServerDll->NewProcessCallback(CurrentProcess, CsrProcess); - } - } -} - -/*++ - * @name CsrLockedDereferenceProcess - * - * The CsrLockedDereferenceProcess dereferences a CSR Process while the - * Process Lock is already being held. - * - * @param CsrProcess - * Pointer to the CSR Process to be dereferenced. - * - * @return None. - * - * @remarks This routine will return with the Process Lock held. - * - *--*/ -VOID -NTAPI -CsrLockedDereferenceProcess(PCSR_PROCESS CsrProcess) -{ - LONG LockCount; - - /* Decrease reference count */ - LockCount = --CsrProcess->ReferenceCount; - ASSERT(LockCount >= 0); - if (!LockCount) - { - /* Call the generic cleanup code */ - CsrProcessRefcountZero(CsrProcess); - CsrAcquireProcessLock(); - } -} - -/*++ - * @name CsrLockedReferenceProcess - * - * The CsrLockedReferenceProcess refences a CSR Process while the - * Process Lock is already being held. - * - * @param CsrProcess - * Pointer to the CSR Process to be referenced. - * - * @return None. - * - * @remarks This routine will return with the Process Lock held. - * - *--*/ -VOID -NTAPI -CsrLockedReferenceProcess(IN PCSR_PROCESS CsrProcess) -{ - /* Increment the reference count */ - ++CsrProcess->ReferenceCount; -} - -/*++ - * @name CsrRemoveProcess - * - * The CsrRemoveProcess function undoes a CsrInsertProcess operation and - * removes the CSR Process from the Process List and notifies Server DLLs - * of this removal. - * - * @param CsrProcess - * Pointer to the CSR Process to remove. - * - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -CsrRemoveProcess(IN PCSR_PROCESS CsrProcess) -{ - PCSR_SERVER_DLL ServerDll; - ULONG i; - ASSERT(ProcessStructureListLocked()); - - /* Remove us from the Process List */ - RemoveEntryList(&CsrProcess->ListLink); - - /* Release the lock */ - CsrReleaseProcessLock(); - - /* Loop every Server DLL */ - for (i = 0; i < CSR_SERVER_DLL_MAX; i++) - { - /* Get the Server DLL */ - ServerDll = CsrLoadedServerDll[i]; - - /* Check if it's valid and if it has a Disconnect Callback */ - if ((ServerDll) && (ServerDll->DisconnectCallback)) - { - /* Call it */ - ServerDll->DisconnectCallback(CsrProcess); - } - } -} - -/*++ - * @name CsrProcessRefcountZero - * - * The CsrProcessRefcountZero routine is executed when a CSR Process has lost - * all its active references. It removes and de-allocates the CSR Process. - * - * @param CsrProcess - * Pointer to the CSR Process that is to be deleted. - * - * @return None. - * - * @remarks Do not call this routine. It is reserved for the internal - * thread management routines when a CSR Process has lost all - * its references. - * - * This routine is called with the Process Lock held. - * - *--*/ -VOID -NTAPI -CsrProcessRefcountZero(IN PCSR_PROCESS CsrProcess) -{ - /* Remove the Process from the list */ - CsrRemoveProcess(CsrProcess); - - /* Check if there's a session */ - if (CsrProcess->NtSession) - { - /* Dereference the Session */ - CsrDereferenceNtSession(CsrProcess->NtSession, 0); - } - - /* Close the Client Port if there is one */ - if (CsrProcess->ClientPort) NtClose(CsrProcess->ClientPort); - - /* Close the process handle */ - NtClose(CsrProcess->ProcessHandle); - - /* Free the Proces Object */ - CsrDeallocateProcess(CsrProcess); -} - -/*++ - * @name CsrpSetToNormalPriority - * - * The CsrpSetToNormalPriority routine sets the current NT Process' - * priority to the normal priority for CSR Processes. - * - * @param None. - * - * @return None. - * - * @remarks The "Normal" Priority corresponds to the Normal Forground - * Priority (9) plus a boost of 4. - * - *--*/ -VOID -NTAPI -CsrpSetToNormalPriority(VOID) -{ - KPRIORITY BasePriority = (8 + 1) + 4; - - /* Set the Priority */ - NtSetInformationProcess(NtCurrentProcess(), - ProcessBasePriority, - &BasePriority, - sizeof(KPRIORITY)); -} - -/*++ - * @name CsrpSetToShutdownPriority - * - * The CsrpSetToShutdownPriority routine sets the current NT Process' - * priority to the boosted priority for CSR Processes doing shutdown. - * Additonally, it acquires the Shutdown Privilege required for shutdown. - * - * @param None. - * - * @return None. - * - * @remarks The "Shutdown" Priority corresponds to the Normal Forground - * Priority (9) plus a boost of 6. - * - *--*/ -VOID -NTAPI -CsrpSetToShutdownPriority(VOID) -{ - KPRIORITY SetBasePriority = (8 + 1) + 6; - BOOLEAN Old; - - /* Get the shutdown privilege */ - if (NT_SUCCESS(RtlAdjustPrivilege(SE_SHUTDOWN_PRIVILEGE, - TRUE, - FALSE, - &Old))) - { - /* Set the Priority */ - NtSetInformationProcess(NtCurrentProcess(), - ProcessBasePriority, - &SetBasePriority, - sizeof(KPRIORITY)); - } -} - -/*++ - * @name FindProcessForShutdown - * - * The FindProcessForShutdown routine returns a CSR Process which is ready - * to be shutdown, and sets the appropriate shutdown flags for it. - * - * @param CallerLuid - * Pointer to the LUID of the CSR Process calling this routine. - * - * @return Pointer to a CSR Process which is ready to be shutdown. - * - * @remarks None. - * - *--*/ -PCSR_PROCESS -NTAPI -FindProcessForShutdown(IN PLUID CallerLuid) -{ - PLIST_ENTRY NextEntry; - LUID ProcessLuid; - NTSTATUS Status; - LUID SystemLuid = SYSTEM_LUID; - PCSR_PROCESS CsrProcess; - PCSR_THREAD CsrThread; - PCSR_PROCESS ReturnCsrProcess = NULL; - ULONG Level = 0; - - /* Set the List Pointers */ - NextEntry = CsrRootProcess->ListLink.Flink; - while (NextEntry != &CsrRootProcess->ListLink) - { - /* Get the process */ - CsrProcess = CONTAINING_RECORD(NextEntry, CSR_PROCESS, ListLink); - - /* Move to the next entry */ - NextEntry = NextEntry->Flink; - - /* Skip this process if it's already been processed*/ - if (CsrProcess->Flags & CsrProcessSkipShutdown) continue; - - /* Get the LUID of this Process */ - Status = CsrGetProcessLuid(CsrProcess->ProcessHandle, &ProcessLuid); - - /* Check if we didn't get access to the LUID */ - if (Status == STATUS_ACCESS_DENIED) - { - /* Check if we have any threads */ - if (CsrProcess->ThreadCount) - { - /* Impersonate one of the threads and retry */ - CsrThread = CONTAINING_RECORD(CsrProcess->ThreadList.Flink, - CSR_THREAD, - Link); - CsrImpersonateClient(CsrThread); - Status = CsrGetProcessLuid(NULL, &ProcessLuid); - CsrRevertToSelf(); - } - } - - if (!NT_SUCCESS(Status)) - { - /* We didn't have access, so skip it */ - CsrProcess->Flags |= CsrProcessSkipShutdown; - continue; - } - - /* Check if this is the System LUID */ - if (RtlEqualLuid(&ProcessLuid, &SystemLuid)) - { - /* Mark this process */ - CsrProcess->ShutdownFlags |= CsrShutdownSystem; - } - else if (!RtlEqualLuid(&ProcessLuid, CallerLuid)) - { - /* Our LUID doesn't match with the caller's */ - CsrProcess->ShutdownFlags |= CsrShutdownOther; - } - - /* Check if we're past the previous level */ - if ((CsrProcess->ShutdownLevel > Level) || !(ReturnCsrProcess)) - { - /* Update the level */ - Level = CsrProcess->ShutdownLevel; - - /* Set the final process */ - ReturnCsrProcess = CsrProcess; - } - } - - /* Check if we found a process */ - if (ReturnCsrProcess) - { - /* Skip this one next time */ - ReturnCsrProcess->Flags |= CsrProcessSkipShutdown; - } - - return ReturnCsrProcess; -} - -/* PUBLIC FUNCTIONS ***********************************************************/ - -/*++ - * @name CsrCreateProcess - * @implemented NT4 - * - * Do nothing for 500ms. - * - * @param ArgumentCount - * Description of the parameter. Wrapped to more lines on ~70th - * column. - * - * @param Arguments - * Description of the parameter. Wrapped to more lines on ~70th - * column. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrCreateProcess(IN HANDLE hProcess, - IN HANDLE hThread, - IN PCLIENT_ID ClientId, - IN PCSR_NT_SESSION NtSession, - IN ULONG Flags, - IN PCLIENT_ID DebugCid) -{ - PCSR_THREAD CurrentThread = NtCurrentTeb()->CsrClientThread; - CLIENT_ID CurrentCid; - PCSR_PROCESS CurrentProcess; - PVOID ProcessData; - ULONG i; - PCSR_PROCESS CsrProcess; - NTSTATUS Status; - PCSR_THREAD CsrThread; - KERNEL_USER_TIMES KernelTimes; - - /* Get the current CID and lock Processes */ - CurrentCid = CurrentThread->ClientId; - CsrAcquireProcessLock(); - - /* Get the current CSR Thread */ - CurrentThread = CsrLocateThreadByClientId(&CurrentProcess, &CurrentCid); - if (!CurrentThread) - { - /* We've failed to locate the thread */ - CsrReleaseProcessLock(); - return STATUS_THREAD_IS_TERMINATING; - } - - /* Allocate a new Process Object */ - CsrProcess = CsrAllocateProcess(); - if (!CsrProcess) - { - /* Couldn't allocate Process */ - CsrReleaseProcessLock(); - return STATUS_NO_MEMORY; - } - - /* Inherit the Process Data */ - CurrentProcess = CurrentThread->Process; - ProcessData = &CurrentProcess->ServerData[CSR_SERVER_DLL_MAX]; - for (i = 0; i < CSR_SERVER_DLL_MAX; i++) - { - /* Check if the DLL is Loaded and has Per Process Data */ - if (CsrLoadedServerDll[i] && CsrLoadedServerDll[i]->SizeOfProcessData) - { - /* Set the pointer */ - CsrProcess->ServerData[i] = ProcessData; - - /* Copy the Data */ - RtlMoveMemory(ProcessData, - CurrentProcess->ServerData[i], - CsrLoadedServerDll[i]->SizeOfProcessData); - - /* Update next data pointer */ - ProcessData = (PVOID)((ULONG_PTR)ProcessData + - CsrLoadedServerDll[i]->SizeOfProcessData); - } - else - { - /* No data for this Server */ - CsrProcess->ServerData[i] = NULL; - } - } - - /* Set the Exception port to us */ - Status = NtSetInformationProcess(hProcess, - ProcessExceptionPort, - &CsrApiPort, - sizeof(HANDLE)); - if (!NT_SUCCESS(Status)) - { - /* Failed */ - CsrDeallocateProcess(CsrProcess); - CsrReleaseProcessLock(); - return STATUS_NO_MEMORY; - } - - /* If Check if CreateProcess got CREATE_NEW_PROCESS_GROUP */ - if (!(Flags & CsrProcessCreateNewGroup)) - { - /* Create new data */ - CsrProcess->ProcessGroupId = HandleToUlong(ClientId->UniqueProcess); - CsrProcess->ProcessGroupSequence = CsrProcess->SequenceNumber; - } - else - { - /* Copy it from the current process */ - CsrProcess->ProcessGroupId = CurrentProcess->ProcessGroupId; - CsrProcess->ProcessGroupSequence = CurrentProcess->ProcessGroupSequence; - } - - /* Check if this is a console process */ - if (Flags & CsrProcessIsConsoleApp) CsrProcess->Flags |= CsrProcessIsConsoleApp; - - /* Mask out non-debug flags */ - Flags &= ~(CsrProcessIsConsoleApp | CsrProcessCreateNewGroup | CsrProcessPriorityFlags); - - /* Check if every process will be debugged */ - if (!(Flags) && (CurrentProcess->DebugFlags & CsrDebugProcessChildren)) - { - /* Pass it on to the current process */ - CsrProcess->DebugFlags = CsrDebugProcessChildren; - CsrProcess->DebugCid = CurrentProcess->DebugCid; - } - - /* Check if Debugging was used on this process */ - if ((Flags & (CsrDebugOnlyThisProcess | CsrDebugProcessChildren)) && (DebugCid)) - { - /* Save the debug flag used */ - CsrProcess->DebugFlags = Flags; - - /* Save the CID */ - CsrProcess->DebugCid = *DebugCid; - } - - /* Check if we debugging is enabled */ - if (CsrProcess->DebugFlags) - { - /* Set the Debug Port to us */ - Status = NtSetInformationProcess(hProcess, - ProcessDebugPort, - &CsrApiPort, - sizeof(HANDLE)); - ASSERT(NT_SUCCESS(Status)); - if (!NT_SUCCESS(Status)) - { - /* Failed */ - CsrDeallocateProcess(CsrProcess); - CsrReleaseProcessLock(); - return STATUS_NO_MEMORY; - } - } - - /* Get the Thread Create Time */ - Status = NtQueryInformationThread(hThread, - ThreadTimes, - (PVOID)&KernelTimes, - sizeof(KernelTimes), - NULL); - if (!NT_SUCCESS(Status)) - { - /* Failed */ - CsrDeallocateProcess(CsrProcess); - CsrReleaseProcessLock(); - return STATUS_NO_MEMORY; - } - - /* Allocate a CSR Thread Structure */ - CsrThread = CsrAllocateThread(CsrProcess); - if (!CsrThread) - { - /* Failed */ - CsrDeallocateProcess(CsrProcess); - CsrReleaseProcessLock(); - return STATUS_NO_MEMORY; - } - - /* Save the data we have */ - CsrThread->CreateTime = KernelTimes.CreateTime; - CsrThread->ClientId = *ClientId; - CsrThread->ThreadHandle = hThread; - ProtectHandle(hThread); - CsrThread->Flags = 0; - - /* Insert the Thread into the Process */ - CsrInsertThread(CsrProcess, CsrThread); - - /* Reference the session */ - CsrReferenceNtSession(NtSession); - CsrProcess->NtSession = NtSession; - - /* Setup Process Data */ - CsrProcess->ClientId = *ClientId; - CsrProcess->ProcessHandle = hProcess; - CsrProcess->ShutdownLevel = 0x280; - - /* Set the Priority to Background */ - CsrSetBackgroundPriority(CsrProcess); - - /* Insert the Process */ - CsrInsertProcess(NULL, CurrentProcess, CsrProcess); - - /* Release lock and return */ - CsrReleaseProcessLock(); - return Status; -} - -/*++ - * @name CsrDebugProcess - * @implemented NT4 - * - * The CsrDebugProcess routine is deprecated in NT 5.1 and higher. It is - * exported only for compatibility with older CSR Server DLLs. - * - * @param CsrProcess - * Deprecated. - * - * @return Deprecated - * - * @remarks Deprecated. - * - *--*/ -NTSTATUS -NTAPI -CsrDebugProcess(IN PCSR_PROCESS CsrProcess) -{ - /* CSR does not handle debugging anymore */ - DPRINT("CSRSRV: %s(%08lx) called\n", __FUNCTION__, CsrProcess); - return STATUS_UNSUCCESSFUL; -} - -/*++ - * @name CsrServerInitialization - * @implemented NT4 - * - * The CsrDebugProcessStop routine is deprecated in NT 5.1 and higher. It is - * exported only for compatibility with older CSR Server DLLs. - * - * @param CsrProcess - * Deprecated. - * - * @return Deprecated - * - * @remarks Deprecated. - * - *--*/ -NTSTATUS -NTAPI -CsrDebugProcessStop(IN PCSR_PROCESS CsrProcess) -{ - /* CSR does not handle debugging anymore */ - DPRINT("CSRSRV: %s(%08lx) called\n", __FUNCTION__, CsrProcess); - return STATUS_UNSUCCESSFUL; -} - -/*++ - * @name CsrDereferenceProcess - * @implemented NT4 - * - * The CsrDereferenceProcess routine removes a reference from a CSR Process. - * - * @param CsrThread - * Pointer to the CSR Process to dereference. - * - * @return None. - * - * @remarks If the reference count has reached zero (ie: the CSR Process has - * no more active references), it will be deleted. - * - *--*/ -VOID -NTAPI -CsrDereferenceProcess(IN PCSR_PROCESS CsrProcess) -{ - LONG LockCount; - - /* Acquire process lock */ - CsrAcquireProcessLock(); - - /* Decrease reference count */ - LockCount = --CsrProcess->ReferenceCount; - ASSERT(LockCount >= 0); - if (!LockCount) - { - /* Call the generic cleanup code */ - CsrProcessRefcountZero(CsrProcess); - } - else - { - /* Just release the lock */ - CsrReleaseProcessLock(); - } -} - -/*++ - * @name CsrDestroyProcess - * @implemented NT4 - * - * The CsrDestroyProcess routine destroys the CSR Process corresponding to - * a given Client ID. - * - * @param Cid - * Pointer to the Client ID Structure corresponding to the CSR - * Process which is about to be destroyed. - * - * @param ExitStatus - * Unused. - * - * @return STATUS_SUCCESS in case of success, STATUS_THREAD_IS_TERMINATING - * if the CSR Process is already terminating. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrDestroyProcess(IN PCLIENT_ID Cid, - IN NTSTATUS ExitStatus) -{ - PCSR_THREAD CsrThread; - PCSR_PROCESS CsrProcess; - CLIENT_ID ClientId = *Cid; - PLIST_ENTRY NextEntry; - - /* Acquire lock */ - CsrAcquireProcessLock(); - - /* Find the thread */ - CsrThread = CsrLocateThreadByClientId(&CsrProcess, &ClientId); - - /* Make sure we got one back, and that it's not already gone */ - if (!(CsrThread) || (CsrProcess->Flags & CsrProcessTerminating)) - { - /* Release the lock and return failure */ - CsrReleaseProcessLock(); - return STATUS_THREAD_IS_TERMINATING; - } - - /* Set the terminated flag */ - CsrProcess->Flags |= CsrProcessTerminating; - - /* Get the List Pointers */ - NextEntry = CsrProcess->ThreadList.Flink; - while (NextEntry != &CsrProcess->ThreadList) - { - /* Get the current thread entry */ - CsrThread = CONTAINING_RECORD(NextEntry, CSR_THREAD, Link); - - /* Make sure the thread isn't already dead */ - if (CsrThread->Flags & CsrThreadTerminated) - { - NextEntry = NextEntry->Flink; - continue; - } - - /* Set the Terminated flag */ - CsrThread->Flags |= CsrThreadTerminated; - - /* Acquire the Wait Lock */ - CsrAcquireWaitLock(); - - /* Do we have an active wait block? */ - if (CsrThread->WaitBlock) - { - /* Notify waiters of termination */ - CsrNotifyWaitBlock(CsrThread->WaitBlock, - NULL, - NULL, - NULL, - CsrProcessTerminating, - TRUE); - } - - /* Release the Wait Lock */ - CsrReleaseWaitLock(); - - /* Dereference the thread */ - CsrLockedDereferenceThread(CsrThread); - NextEntry = CsrProcess->ThreadList.Flink; - } - - /* Release the Process Lock and return success */ - CsrReleaseProcessLock(); - return STATUS_SUCCESS; -} - -/*++ - * @name CsrGetProcessLuid - * @implemented NT4 - * - * Do nothing for 500ms. - * - * @param hProcess - * Optional handle to the process whose LUID should be returned. - * - * @param Luid - * Pointer to a LUID Pointer which will receive the CSR Process' LUID - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks If hProcess is not supplied, then the current thread's token will - * be used. If that too is missing, then the current process' token - * will be used. - * - *--*/ -NTSTATUS -NTAPI -CsrGetProcessLuid(HANDLE hProcess OPTIONAL, - PLUID Luid) -{ - HANDLE hToken = NULL; - NTSTATUS Status; - ULONG Length; - PTOKEN_STATISTICS TokenStats; - - /* Check if we have a handle to a CSR Process */ - if (!hProcess) - { - /* We don't, so try opening the Thread's Token */ - Status = NtOpenThreadToken(NtCurrentThread(), - TOKEN_QUERY, - FALSE, - &hToken); - - /* Check for success */ - if (!NT_SUCCESS(Status)) - { - /* If we got some other failure, then return and quit */ - if (Status != STATUS_NO_TOKEN) return Status; - - /* We don't have a Thread Token, use a Process Token */ - hProcess = NtCurrentProcess(); - hToken = NULL; - } - } - - /* Check if we have a token by now */ - if (!hToken) - { - /* No token yet, so open the Process Token */ - Status = NtOpenProcessToken(hProcess, - TOKEN_QUERY, - &hToken); - if (!NT_SUCCESS(Status)) return Status; - } - - /* Now get the size we'll need for the Token Information */ - Status = NtQueryInformationToken(hToken, - TokenStatistics, - NULL, - 0, - &Length); - - /* Allocate memory for the Token Info */ - TokenStats = RtlAllocateHeap(CsrHeap, 0, Length); - if (!TokenStats) - { - /* Fail and close the token */ - NtClose(hToken); - return STATUS_NO_MEMORY; - } - - /* Now query the information */ - Status = NtQueryInformationToken(hToken, - TokenStatistics, - TokenStats, - Length, - &Length); - - /* Close the handle */ - NtClose(hToken); - - /* Check for success to return the LUID */ - if (NT_SUCCESS(Status)) *Luid = TokenStats->AuthenticationId; - - /* Free the query information */ - RtlFreeHeap(CsrHeap, 0, TokenStats); - - /* Return the Status */ - return Status; -} - -/*++ - * @name CsrLockProcessByClientId - * @implemented NT4 - * - * The CsrLockProcessByClientId routine locks the CSR Process corresponding - * to the given Process ID and optionally returns it. - * - * @param Pid - * Process ID corresponding to the CSR Process which will be locked. - * - * @param CsrProcess - * Optional pointer to a CSR Process pointer which will hold the - * CSR Process corresponding to the given Process ID. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks Locking a CSR Process is defined as acquiring an extra - * reference to it and returning with the Process Lock held. - * - *--*/ -NTSTATUS -NTAPI -CsrLockProcessByClientId(IN HANDLE Pid, - OUT PCSR_PROCESS *CsrProcess) -{ - PLIST_ENTRY NextEntry; - PCSR_PROCESS CurrentProcess = NULL; - NTSTATUS Status; - - /* Acquire the lock */ - CsrAcquireProcessLock(); - - /* Assume failure */ - ASSERT(CsrProcess != NULL); - *CsrProcess = NULL; - - /* Setup the List Pointers */ - NextEntry = &CsrRootProcess->ListLink; - do - { - /* Get the Process */ - CurrentProcess = CONTAINING_RECORD(NextEntry, CSR_PROCESS, ListLink); - - /* Check for PID Match */ - if (CurrentProcess->ClientId.UniqueProcess == Pid) - { - Status = STATUS_SUCCESS; - break; - } - - /* Next entry */ - NextEntry = NextEntry->Flink; - } while (NextEntry != &CsrRootProcess->ListLink); - - /* Check if we didn't find it in the list */ - if (!NT_SUCCESS(Status)) - { - /* Nothing found, release the lock */ - CsrReleaseProcessLock(); - } - else - { - /* Lock the found process and return it */ - CsrLockedReferenceProcess(CurrentProcess); - *CsrProcess = CurrentProcess; - } - - /* Return the result */ - return Status; -} - -/*++ - * @name CsrSetForegroundPriority - * @implemented NT4 - * - * The CsrSetForegroundPriority routine sets the priority for the given CSR - * Process as a Foreground priority. - * - * @param CsrProcess - * Pointer to the CSR Process whose priority will be modified. - * - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -CsrSetForegroundPriority(IN PCSR_PROCESS CsrProcess) -{ - PROCESS_PRIORITY_CLASS PriorityClass; - - /* Set the Foreground bit on */ - PriorityClass.Foreground = TRUE; - - /* Set the new Priority */ - NtSetInformationProcess(CsrProcess->ProcessHandle, - ProcessPriorityClass, - &PriorityClass, - sizeof(PriorityClass)); -} - -/*++ - * @name CsrSetBackgroundPriority - * @implemented NT4 - * - * The CsrSetBackgroundPriority routine sets the priority for the given CSR - * Process as a Background priority. - * - * @param CsrProcess - * Pointer to the CSR Process whose priority will be modified. - * - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -CsrSetBackgroundPriority(IN PCSR_PROCESS CsrProcess) -{ - PROCESS_PRIORITY_CLASS PriorityClass; - - /* Set the Foreground bit off */ - PriorityClass.Foreground = FALSE; - - /* Set the new Priority */ - NtSetInformationProcess(CsrProcess->ProcessHandle, - ProcessPriorityClass, - &PriorityClass, - sizeof(PriorityClass)); -} - -/*++ - * @name CsrShutdownProcesses - * @implemented NT4 - * - * The CsrShutdownProcesses routine shuts down every CSR Process possible - * and calls each Server DLL's shutdown notification. - * - * @param CallerLuid - * Pointer to the LUID of the CSR Process that is ordering the - * shutdown. - * - * @param Flags - * Flags to send to the shutdown notification routine. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrShutdownProcesses(IN PLUID CallerLuid, - IN ULONG Flags) -{ - PLIST_ENTRY NextEntry; - PCSR_PROCESS CsrProcess; - NTSTATUS Status; - BOOLEAN FirstTry; - ULONG i; - PCSR_SERVER_DLL ServerDll; - ULONG Result = 0; /* Intentionally invalid enumeratee to silence compiler warning */ - - /* Acquire process lock */ - CsrAcquireProcessLock(); - - /* Add shutdown flag */ - CsrRootProcess->ShutdownFlags |= CsrShutdownSystem; - - /* Get the list pointers */ - NextEntry = CsrRootProcess->ListLink.Flink; - while (NextEntry != &CsrRootProcess->ListLink) - { - /* Get the Process */ - CsrProcess = CONTAINING_RECORD(NextEntry, CSR_PROCESS, ListLink); - - /* Remove the skip flag, set shutdown flags to 0*/ - CsrProcess->Flags &= ~CsrProcessSkipShutdown; - CsrProcess->ShutdownFlags = 0; - - /* Move to the next */ - NextEntry = NextEntry->Flink; - } - - /* Set shudown Priority */ - CsrpSetToShutdownPriority(); - - /* Start looping */ - while (TRUE) - { - /* Find the next process to shutdown */ - CsrProcess = FindProcessForShutdown(CallerLuid); - if (!CsrProcess) break; - - /* Increase reference to process */ - CsrProcess->ReferenceCount++; - - FirstTry = TRUE; - while (TRUE) - { - /* Loop all the servers */ - for (i = 0; i < CSR_SERVER_DLL_MAX; i++) - { - /* Get the current server */ - ServerDll = CsrLoadedServerDll[i]; - if ((ServerDll) && (ServerDll->ShutdownProcessCallback)) - { - /* Release the lock, make the callback, and acquire it back */ - CsrReleaseProcessLock(); - Result = ServerDll->ShutdownProcessCallback(CsrProcess, - Flags, - FirstTry); - CsrAcquireProcessLock(); - - /* Check the result */ - if (Result == CsrShutdownCsrProcess) - { - /* The callback unlocked the process */ - break; - } - else if (Result == CsrShutdownCancelled) - { - /* Check if this was a forced shutdown */ - if (Flags & EWX_FORCE) - { - DPRINT1("Process %x cancelled forced shutdown (Dll = %d)\n", - CsrProcess->ClientId.UniqueProcess, i); - DbgBreakPoint(); - } - - /* Shutdown was cancelled, unlock and exit */ - CsrReleaseProcessLock(); - Status = STATUS_CANCELLED; - goto Quickie; - } - } - } - - /* No matches during the first try, so loop again */ - if ((FirstTry) && (Result == CsrShutdownNonCsrProcess)) - { - FirstTry = FALSE; - continue; - } - - /* Second try, break out */ - break; - } - - /* We've reached the final loop here, so dereference */ - if (i == CSR_SERVER_DLL_MAX) CsrLockedDereferenceProcess(CsrProcess); - } - - /* Success path */ - CsrReleaseProcessLock(); - Status = STATUS_SUCCESS; - -Quickie: - /* Return to normal priority */ - CsrpSetToNormalPriority(); - return Status; -} - -/*++ - * @name CsrUnlockProcess - * @implemented NT4 - * - * The CsrUnlockProcess undoes a previous CsrLockProcessByClientId operation. - * - * @param CsrProcess - * Pointer to a previously locked CSR Process. - * - * @return STATUS_SUCCESS. - * - * @remarks This routine must be called with the Process Lock held. - * - *--*/ -NTSTATUS -NTAPI -CsrUnlockProcess(IN PCSR_PROCESS CsrProcess) -{ - /* Dereference the process */ - CsrLockedDereferenceProcess(CsrProcess); - - /* Release the lock and return */ - CsrReleaseProcessLock(); - return STATUS_SUCCESS; -} - -/* EOF */ diff --git a/deprecated/csr/csrsrv/server.c b/deprecated/csr/csrsrv/server.c deleted file mode 100644 index 12100055981..00000000000 --- a/deprecated/csr/csrsrv/server.c +++ /dev/null @@ -1,687 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS CSR Sub System - * FILE: subsys/csr/csrsrv/server.c - * PURPOSE: CSR Server DLL Server Functions - * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) - */ - -/* INCLUDES ******************************************************************/ -#include "srv.h" - -#define NDEBUG -#include - -/* DATA **********************************************************************/ - -PCSR_API_ROUTINE CsrServerApiDispatchTable[5] = -{ - CsrSrvClientConnect, - CsrSrvUnusedFunction, - CsrSrvUnusedFunction, - CsrSrvIdentifyAlertableThread, - CsrSrvSetPriorityClass -}; - -BOOLEAN CsrServerApiServerValidTable[5] = -{ - TRUE, - FALSE, - TRUE, - TRUE, - TRUE -}; - -PCHAR CsrServerApiNameTable[5] = -{ - "ClientConnect", - "ThreadConnect", - "ProfileControl", - "IdentifyAlertableThread", - "SetPriorityClass" -}; - -PCSR_SERVER_DLL CsrLoadedServerDll[CSR_SERVER_DLL_MAX]; -PVOID CsrSrvSharedSectionHeap; -PVOID CsrSrvSharedSectionBase; -PVOID *CsrSrvSharedStaticServerData; -ULONG CsrSrvSharedSectionSize; -HANDLE CsrSrvSharedSection; - -/* PRIVATE FUNCTIONS**********************************************************/ - -/*++ - * @name CsrLoadServerDll - * @implemented NT4 - * - * The CsrLoadServerDll routine loads a CSR Server DLL and calls its entrypoint - * - * @param DllString - * Pointer to the CSR Server DLL to load and call. - * - * @param EntryPoint - * Pointer to the name of the server's initialization function. If - * this parameter is NULL, the default ServerDllInitialize will be - * assumed. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrLoadServerDll(IN PCHAR DllString, - IN PCHAR EntryPoint OPTIONAL, - IN ULONG ServerId) -{ - NTSTATUS Status; - ANSI_STRING DllName; - UNICODE_STRING TempString, ErrorString; - ULONG_PTR Parameters[2]; - HANDLE hServerDll = NULL; - ULONG Size; - PCSR_SERVER_DLL ServerDll; - STRING EntryPointString; - PCSR_SERVER_DLL_INIT_CALLBACK ServerDllInitProcedure; - ULONG Response; - - /* Check if it's beyond the maximum we support */ - if (ServerId >= CSR_SERVER_DLL_MAX) return STATUS_TOO_MANY_NAMES; - - /* Check if it's already been loaded */ - if (CsrLoadedServerDll[ServerId]) return STATUS_INVALID_PARAMETER; - - /* Convert the name to Unicode */ - ASSERT(DllString != NULL); - RtlInitAnsiString(&DllName, DllString); - Status = RtlAnsiStringToUnicodeString(&TempString, &DllName, TRUE); - if (!NT_SUCCESS(Status)) return Status; - - /* If we are loading ourselves, don't actually load us */ - if (ServerId != CSR_SRV_SERVER) - { - /* Load the DLL */ - Status = LdrLoadDll(NULL, 0, &TempString, &hServerDll); - if (!NT_SUCCESS(Status)) - { - /* Setup error parameters */ - Parameters[0] = (ULONG_PTR)&TempString; - Parameters[1] = (ULONG_PTR)&ErrorString; - RtlInitUnicodeString(&ErrorString, L"Default Load Path"); - - /* Send a hard error */ - NtRaiseHardError(Status, - 2, - 3, - Parameters, - OptionOk, - &Response); - } - - /* Get rid of the string */ - RtlFreeUnicodeString(&TempString); - if (!NT_SUCCESS(Status)) return Status; - } - - /* Allocate a CSR DLL Object */ - Size = sizeof(CSR_SERVER_DLL) + DllName.MaximumLength; - ServerDll = RtlAllocateHeap(CsrHeap, HEAP_ZERO_MEMORY, Size); - if (!ServerDll) - { - if (hServerDll) LdrUnloadDll(hServerDll); - return STATUS_NO_MEMORY; - } - - /* Set up the Object */ - ServerDll->Length = Size; - ServerDll->SharedSection = CsrSrvSharedSectionHeap; - ServerDll->Event = CsrInitializationEvent; - ServerDll->Name.Length = DllName.Length; - ServerDll->Name.MaximumLength = DllName.MaximumLength; - ServerDll->Name.Buffer = (PCHAR)(ServerDll + 1); - if (DllName.Length) - { - strncpy(ServerDll->Name.Buffer, DllName.Buffer, DllName.Length); - } - ServerDll->ServerId = ServerId; - ServerDll->ServerHandle = hServerDll; - - /* Now get the entrypoint */ - if (hServerDll) - { - /* Initialize a string for the entrypoint, or use the default */ - RtlInitAnsiString(&EntryPointString, - !(EntryPoint) ? "ServerDllInitialization" : - EntryPoint); - - /* Get a pointer to it */ - Status = LdrGetProcedureAddress(hServerDll, - &EntryPointString, - 0, - (PVOID)&ServerDllInitProcedure); - } - else - { - /* No handle, so we are loading ourselves */ - ServerDllInitProcedure = CsrServerDllInitialization; - Status = STATUS_SUCCESS; - } - - /* Check if we got the pointer, and call it */ - if (NT_SUCCESS(Status)) - { - /* Get the result from the Server DLL */ - Status = ServerDllInitProcedure(ServerDll); - - /* Check for Success */ - if (NT_SUCCESS(Status)) - { - /* - * Add this Server's Per-Process Data Size to the total that each - * process will need. - */ - CsrTotalPerProcessDataLength += ServerDll->SizeOfProcessData; - - /* Save the pointer in our list */ - CsrLoadedServerDll[ServerDll->ServerId] = ServerDll; - - /* Does it use our generic heap? */ - if (ServerDll->SharedSection != CsrSrvSharedSectionHeap) - { - /* No, save the pointer to its shared section in our list */ - CsrSrvSharedStaticServerData[ServerDll->ServerId] = ServerDll->SharedSection; - } - } - else - { - /* Use shared failure code */ - goto LoadFailed; - } - } - else - { -LoadFailed: - /* Server Init failed, unload it */ - if (hServerDll) LdrUnloadDll(hServerDll); - - /* Delete the Object */ - RtlFreeHeap(CsrHeap, 0, ServerDll); - } - - /* Return to caller */ - return Status; -} - -/*++ - * @name CsrServerDllInitialization - * @implemented NT4 - * - * The CsrServerDllInitialization is the initialization routine for - * the this Server DLL. - * - * @param LoadedServerDll - * Pointer to the CSR Server DLL structure representing this Server DLL. - * - * @return STATUS_SUCCESS. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrServerDllInitialization(IN PCSR_SERVER_DLL LoadedServerDll) -{ - /* Setup the DLL Object */ - LoadedServerDll->ApiBase = 0; - LoadedServerDll->HighestApiSupported = 5; - LoadedServerDll->DispatchTable = CsrServerApiDispatchTable; - LoadedServerDll->ValidTable = CsrServerApiServerValidTable; - LoadedServerDll->NameTable = CsrServerApiNameTable; - LoadedServerDll->SizeOfProcessData = 0; - LoadedServerDll->ConnectCallback = NULL; - LoadedServerDll->DisconnectCallback = NULL; - - /* All done */ - return STATUS_SUCCESS; -} - -/*++ - * @name CsrSrvClientConnect - * - * The CsrSrvClientConnect CSR API handles a new connection to a server DLL. - * - * @param ApiMessage - * Pointer to the CSR API Message for this request. - * - * @param Reply - * Optional reply to this request. - * - * @return STATUS_SUCCESS in case of success, STATUS_INVALID_PARAMETER - * or STATUS_TOO_MANY_NAMES in case of failure. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrSrvClientConnect(IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply OPTIONAL) -{ - NTSTATUS Status; - PCSR_CLIENT_CONNECT ClientConnect; - PCSR_SERVER_DLL ServerDll; - PCSR_PROCESS CurrentProcess = ((PCSR_THREAD)NtCurrentTeb()->CsrClientThread)->Process; - - /* Load the Message, set default reply */ - ClientConnect = (PCSR_CLIENT_CONNECT)&ApiMessage->CsrClientConnect; - *Reply = 0; - - /* Validate the ServerID */ - if (ClientConnect->ServerId >= CSR_SERVER_DLL_MAX) - { - return STATUS_TOO_MANY_NAMES; - } - else if (!CsrLoadedServerDll[ClientConnect->ServerId]) - { - return STATUS_INVALID_PARAMETER; - } - - /* Validate the Message Buffer */ - if (!(CsrValidateMessageBuffer(ApiMessage, - ClientConnect->ConnectionInfo, - ClientConnect->ConnectionInfoSize, - 1))) - { - /* Fail due to buffer overflow or other invalid buffer */ - return STATUS_INVALID_PARAMETER; - } - - /* Load the Server DLL */ - ServerDll = CsrLoadedServerDll[ClientConnect->ServerId]; - - /* Check if it has a Connect Callback */ - if (ServerDll->ConnectCallback) - { - /* Call the callback */ - Status = ServerDll->ConnectCallback(CurrentProcess, - ClientConnect->ConnectionInfo, - &ClientConnect->ConnectionInfoSize); - } - else - { - /* Assume success */ - Status = STATUS_SUCCESS; - } - - /* Return status */ - return Status; -} - -/*++ - * @name CsrSrvCreateSharedSection - * - * The CsrSrvCreateSharedSection creates the Shared Section that all CSR Server - * DLLs and Clients can use to share data. - * - * @param ParameterValue - * Specially formatted string from our registry command-line which - * specifies various arguments for the shared section. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrSrvCreateSharedSection(IN PCHAR ParameterValue) -{ - PCHAR SizeValue = ParameterValue; - ULONG Size; - NTSTATUS Status; - LARGE_INTEGER SectionSize; - ULONG ViewSize = 0; - PPEB Peb = NtCurrentPeb(); - - /* If there's no parameter, fail */ - if (!ParameterValue) return STATUS_INVALID_PARAMETER; - - /* Find the first comma, and null terminate */ - while (*SizeValue) - { - if (*SizeValue == ',') - { - *SizeValue++ = ANSI_NULL; - break; - } - else - { - SizeValue++; - } - } - - /* Make sure it's valid */ - if (!*SizeValue) return STATUS_INVALID_PARAMETER; - - /* Convert it to an integer */ - Status = RtlCharToInteger(SizeValue, 0, &Size); - if (!NT_SUCCESS(Status)) return Status; - - /* Multiply by 1024 entries and round to page size */ - CsrSrvSharedSectionSize = ROUND_UP(Size * 1024, CsrNtSysInfo.PageSize); - - /* Create the Secion */ - SectionSize.LowPart = CsrSrvSharedSectionSize; - SectionSize.HighPart = 0; - Status = NtCreateSection(&CsrSrvSharedSection, - SECTION_ALL_ACCESS, - NULL, - &SectionSize, - PAGE_EXECUTE_READWRITE, - SEC_BASED | SEC_RESERVE, - NULL); - if (!NT_SUCCESS(Status)) return Status; - - /* Map the section */ - Status = NtMapViewOfSection(CsrSrvSharedSection, - NtCurrentProcess(), - &CsrSrvSharedSectionBase, - 0, - 0, - NULL, - &ViewSize, - ViewUnmap, - MEM_TOP_DOWN, - PAGE_EXECUTE_READWRITE); - if (!NT_SUCCESS(Status)) - { - /* Fail */ - NtClose(CsrSrvSharedSection); - return Status; - } - - /* FIXME: Write the value to registry */ - - /* The Heap is the same place as the Base */ - CsrSrvSharedSectionHeap = CsrSrvSharedSectionBase; - - /* Create the heap */ - if (!(RtlCreateHeap(HEAP_ZERO_MEMORY | HEAP_CLASS_7, - CsrSrvSharedSectionHeap, - CsrSrvSharedSectionSize, - PAGE_SIZE, - 0, - 0))) - { - /* Failure, unmap section and return */ - NtUnmapViewOfSection(NtCurrentProcess(), CsrSrvSharedSectionBase); - NtClose(CsrSrvSharedSection); - return STATUS_NO_MEMORY; - } - - /* Now allocate space from the heap for the Shared Data */ - CsrSrvSharedStaticServerData = RtlAllocateHeap(CsrSrvSharedSectionHeap, - 0, - CSR_SERVER_DLL_MAX * - sizeof(PVOID)); - if (!CsrSrvSharedStaticServerData) return STATUS_NO_MEMORY; - - /* Write the values to the PEB */ - Peb->ReadOnlySharedMemoryBase = CsrSrvSharedSectionBase; - Peb->ReadOnlySharedMemoryHeap = CsrSrvSharedSectionHeap; - Peb->ReadOnlyStaticServerData = CsrSrvSharedStaticServerData; - - /* Return */ - return STATUS_SUCCESS; -} - -/*++ - * @name CsrSrvAttachSharedSection - * - * The CsrSrvAttachSharedSection maps the CSR Shared Section into a new - * CSR Process' address space, and returns the pointers to the section - * through the Connection Info structure. - * - * @param CsrProcess - * Pointer to the CSR Process that is attempting a connection. - * - * @param ConnectInfo - * Pointer to the CSR Connection Info structure for the incoming - * connection. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrSrvAttachSharedSection(IN PCSR_PROCESS CsrProcess OPTIONAL, - OUT PCSR_CONNECTION_INFO ConnectInfo) -{ - NTSTATUS Status; - ULONG ViewSize = 0; - - /* Check if we have a process */ - if (CsrProcess) - { - /* Map the sectio into this process */ - Status = NtMapViewOfSection(CsrSrvSharedSection, - CsrProcess->ProcessHandle, - &CsrSrvSharedSectionBase, - 0, - 0, - NULL, - &ViewSize, - ViewUnmap, - SEC_NO_CHANGE, - PAGE_EXECUTE_READ); - if (!NT_SUCCESS(Status)) return Status; - } - - /* Write the values in the Connection Info structure */ - ConnectInfo->SharedSectionBase = CsrSrvSharedSectionBase; - ConnectInfo->SharedSectionHeap = CsrSrvSharedSectionHeap; - ConnectInfo->SharedSectionData = CsrSrvSharedStaticServerData; - - /* Return success */ - return STATUS_SUCCESS; -} - -/*++ - * @name CsrSrvIdentifyAlertableThread - * @implemented NT4 - * - * The CsrSrvIdentifyAlertableThread CSR API marks a CSR Thread as alertable. - * - * @param ApiMessage - * Pointer to the CSR API Message for this request. - * - * @param Reply - * Pointer to an optional reply to this request. - * - * @return STATUS_SUCCESS. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrSrvIdentifyAlertableThread(IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply) -{ - PCSR_THREAD CsrThread = NtCurrentTeb()->CsrClientThread; - - /* Set the alertable flag */ - CsrThread->Flags |= CsrThreadAltertable; - - /* Return success */ - return STATUS_SUCCESS; -} - -/*++ - * @name CsrSrvSetPriorityClass - * @implemented NT4 - * - * The CsrSrvSetPriorityClass CSR API is deprecated. - * - * @param ApiMessage - * Pointer to the CSR API Message for this request. - * - * @param Reply - * Pointer to an optional reply to this request. - * - * @return STATUS_SUCCESS. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrSrvSetPriorityClass(IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply) -{ - /* Deprecated */ - return STATUS_SUCCESS; -} - -/*++ - * @name CsrSrvUnusedFunction - * @implemented NT4 - * - * The CsrSrvUnusedFunction CSR API is a stub for deprecated APIs. - * - * The CsrSrvSetPriorityClass CSR API is deprecated. - * - * @param ApiMessage - * Pointer to the CSR API Message for this request. - * - * @param Reply - * Pointer to an optional reply to this request. - * - * @return STATUS_INVALID_PARAMETER. - * - * @remarks CsrSrvSetPriorityClass does not use this stub because it must - * return success. - * - *--*/ -NTSTATUS -NTAPI -CsrSrvUnusedFunction(IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply) -{ - /* Deprecated */ - return STATUS_INVALID_PARAMETER; -} - -/* PUBLIC FUNCTIONS***********************************************************/ - -/*++ - * @name CsrSetCallingSpooler - * @implemented NT4 - * - * the CsrSetCallingSpooler routine is deprecated. - * - * @param Reserved - * Deprecated - * - * @return None. - * - * @remarks This routine was used in archaic versions of NT for Printer Drivers. - * - *--*/ -VOID -NTAPI -CsrSetCallingSpooler(ULONG Reserved) -{ - /* Deprecated */ - return; -} - -/*++ - * @name CsrUnhandledExceptionFilter - * @implemented NT5 - * - * The CsrUnhandledExceptionFilter routine handles all exceptions - * within SEH-protected blocks. - * - * @param ExceptionPointers - * System-defined Argument. - * - * @return EXCEPTION_EXECUTE_HANDLER. - * - * @remarks None. - * - *--*/ -LONG -NTAPI -CsrUnhandledExceptionFilter(IN PEXCEPTION_POINTERS ExceptionInfo) -{ - SYSTEM_KERNEL_DEBUGGER_INFORMATION DebuggerInfo; - EXCEPTION_DISPOSITION Result = EXCEPTION_EXECUTE_HANDLER; - BOOLEAN OldValue; - NTSTATUS Status; - UNICODE_STRING ErrorSource; - ULONG_PTR ErrorParameters[4]; - ULONG Response; - - /* Check if a debugger is installed */ - Status = NtQuerySystemInformation(SystemKernelDebuggerInformation, - &DebuggerInfo, - sizeof(DebuggerInfo), - NULL); - - /* Check if this is Session 0, and the Debugger is Enabled */ - if ((NtCurrentPeb()->SessionId) && (NT_SUCCESS(Status)) && - (DebuggerInfo.KernelDebuggerEnabled)) - { - /* Call the Unhandled Exception Filter */ - if ((Result = RtlUnhandledExceptionFilter(ExceptionInfo)) != - EXCEPTION_CONTINUE_EXECUTION) - { - /* We're going to raise an error. Get Shutdown Privilege first */ - Status = RtlAdjustPrivilege(SE_SHUTDOWN_PRIVILEGE, - TRUE, - TRUE, - &OldValue); - - /* Use the Process token if that failed */ - if (Status == STATUS_NO_TOKEN) - { - Status = RtlAdjustPrivilege(SE_SHUTDOWN_PRIVILEGE, - TRUE, - FALSE, - &OldValue); - } - - /* Initialize our Name String */ - RtlInitUnicodeString(&ErrorSource, L"Windows SubSystem"); - - /* Set the parameters */ - ErrorParameters[0] = (ULONG_PTR)&ErrorSource; - ErrorParameters[1] = ExceptionInfo->ExceptionRecord->ExceptionCode; - ErrorParameters[2] = (ULONG_PTR)ExceptionInfo->ExceptionRecord->ExceptionAddress; - ErrorParameters[3] = (ULONG_PTR)ExceptionInfo->ContextRecord; - - /* Bugcheck */ - Status = NtRaiseHardError(STATUS_SYSTEM_PROCESS_TERMINATED, - 4, - 1, - ErrorParameters, - OptionShutdownSystem, - &Response); - } - - /* Just terminate us */ - NtTerminateProcess(NtCurrentProcess(), - ExceptionInfo->ExceptionRecord->ExceptionCode); - } - - return Result; -} - -/* EOF */ diff --git a/deprecated/csr/csrsrv/session.c b/deprecated/csr/csrsrv/session.c deleted file mode 100644 index 2ec08a66a4f..00000000000 --- a/deprecated/csr/csrsrv/session.c +++ /dev/null @@ -1,407 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS CSR Sub System - * FILE: subsys/csr/csrsrv/session.c - * PURPOSE: CSR Server DLL Session Implementation - * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) - */ - -/* INCLUDES ******************************************************************/ - -#include "srv.h" - -#define NDEBUG -#include - -/* DATA **********************************************************************/ - -RTL_CRITICAL_SECTION CsrNtSessionLock; -LIST_ENTRY CsrNtSessionList; -HANDLE CsrSmApiPort; - -PSB_API_ROUTINE CsrServerSbApiDispatch[5] = -{ - CsrSbCreateSession, - CsrSbTerminateSession, - CsrSbForeignSessionComplete, - CsrSbCreateProcess, - NULL -}; - -PCHAR CsrServerSbApiName[5] = -{ - "SbCreateSession", - "SbTerminateSession", - "SbForeignSessionComplete", - "SbCreateProcess", - "Unknown Csr Sb Api Number" -}; - -/* PRIVATE FUNCTIONS *********************************************************/ - -/*++ - * @name CsrInitializeNtSessionList - * - * The CsrInitializeNtSessionList routine sets up support for CSR Sessions. - * - * @param None - * - * @return None - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrInitializeNtSessionList(VOID) -{ - DPRINT("CSRSRV: %s called\n", __FUNCTION__); - - /* Initialize the Session List */ - InitializeListHead(&CsrNtSessionList); - - /* Initialize the Session Lock */ - return RtlInitializeCriticalSection(&CsrNtSessionLock); -} - -/*++ - * @name CsrAllocateNtSession - * - * The CsrAllocateNtSession routine allocates a new CSR NT Session. - * - * @param SessionId - * Session ID of the CSR NT Session to allocate. - * - * @return Pointer to the newly allocated CSR NT Session. - * - * @remarks None. - * - *--*/ -PCSR_NT_SESSION -NTAPI -CsrAllocateNtSession(IN ULONG SessionId) -{ - PCSR_NT_SESSION NtSession; - - /* Allocate an NT Session Object */ - NtSession = RtlAllocateHeap(CsrHeap, 0, sizeof(CSR_NT_SESSION)); - if (NtSession) - { - /* Setup the Session Object */ - NtSession->SessionId = SessionId; - NtSession->ReferenceCount = 1; - - /* Insert it into the Session List */ - CsrAcquireNtSessionLock(); - InsertHeadList(&CsrNtSessionList, &NtSession->SessionLink); - CsrReleaseNtSessionLock(); - } - else - { - ASSERT(NtSession != NULL); - } - - /* Return the Session (or NULL) */ - return NtSession; -} - -/*++ - * @name CsrReferenceNtSession - * - * The CsrReferenceNtSession increases the reference count of a CSR NT Session. - * - * @param Session - * Pointer to the CSR NT Session to reference. - * - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -CsrReferenceNtSession(IN PCSR_NT_SESSION Session) -{ - /* Acquire the lock */ - CsrAcquireNtSessionLock(); - - /* Sanity checks */ - ASSERT(!IsListEmpty(&Session->SessionLink)); - ASSERT(Session->SessionId != 0); - ASSERT(Session->ReferenceCount != 0); - - /* Increase the reference count */ - Session->ReferenceCount++; - - /* Release the lock */ - CsrReleaseNtSessionLock(); -} - -/*++ - * @name CsrDereferenceNtSession - * - * The CsrDereferenceNtSession decreases the reference count of a - * CSR NT Session. - * - * @param Session - * Pointer to the CSR NT Session to reference. - * - * @param ExitStatus - * If this is the last reference to the session, this argument - * specifies the exit status. - * - * @return None. - * - * @remarks CsrDereferenceNtSession will complete the session if - * the last reference to it has been closed. - * - *--*/ -VOID -NTAPI -CsrDereferenceNtSession(IN PCSR_NT_SESSION Session, - IN NTSTATUS ExitStatus) -{ - /* Acquire the lock */ - CsrAcquireNtSessionLock(); - - /* Sanity checks */ - ASSERT(!IsListEmpty(&Session->SessionLink)); - ASSERT(Session->SessionId != 0); - ASSERT(Session->ReferenceCount != 0); - - /* Dereference the Session Object */ - if (!(--Session->ReferenceCount)) - { - /* Remove it from the list */ - RemoveEntryList(&Session->SessionLink); - - /* Release the lock */ - CsrReleaseNtSessionLock(); - - /* Tell SM that we're done here */ - SmSessionComplete(CsrSmApiPort, Session->SessionId, ExitStatus); - - /* Free the Session Object */ - RtlFreeHeap(CsrHeap, 0, Session); - } - else - { - /* Release the lock, the Session is still active */ - CsrReleaseNtSessionLock(); - } -} - - -/* SESSION MANAGER FUNCTIONS**************************************************/ - -/*++ - * @name CsrSbCreateSession - * - * The CsrSbCreateSession API is called by the Session Manager whenever a new - * session is created. - * - * @param ApiMessage - * Pointer to the Session Manager API Message. - * - * @return TRUE in case of success, FALSE othwerwise. - * - * @remarks The CsrSbCreateSession routine will initialize a new CSR NT - * Session and allocate a new CSR Process for the subsystem process. - * - *--*/ -BOOLEAN -NTAPI -CsrSbCreateSession(IN PSB_API_MSG ApiMessage) -{ - PSB_CREATE_SESSION_MSG CreateSession = &ApiMessage->CreateSession; - HANDLE hProcess, hThread; - PCSR_PROCESS CsrProcess; - NTSTATUS Status; - KERNEL_USER_TIMES KernelTimes; - PCSR_THREAD CsrThread; - PVOID ProcessData; - ULONG i; - - /* Save the Process and Thread Handles */ - hProcess = CreateSession->ProcessInfo.ProcessHandle; - hThread = CreateSession->ProcessInfo.ThreadHandle; - - /* Lock the Processes */ - CsrAcquireProcessLock(); - - /* Allocate a new process */ - CsrProcess = CsrAllocateProcess(); - if (!CsrProcess) - { - /* Fail */ - ApiMessage->ReturnValue = STATUS_NO_MEMORY; - CsrReleaseProcessLock(); - return TRUE; - } - - /* Set the exception port */ - Status = NtSetInformationProcess(hProcess, - ProcessExceptionPort, - &CsrApiPort, - sizeof(HANDLE)); - - /* Check for success */ - if (!NT_SUCCESS(Status)) - { - /* Fail the request */ - CsrDeallocateProcess(CsrProcess); - CsrReleaseProcessLock(); - - /* Strange as it seems, NTSTATUSes are actually returned */ - return (BOOLEAN)STATUS_NO_MEMORY; - } - - /* Get the Create Time */ - Status = NtQueryInformationThread(hThread, - ThreadTimes, - &KernelTimes, - sizeof(KERNEL_USER_TIMES), - NULL); - - /* Check for success */ - if (!NT_SUCCESS(Status)) - { - /* Fail the request */ - CsrDeallocateProcess(CsrProcess); - CsrReleaseProcessLock(); - - /* Strange as it seems, NTSTATUSes are actually returned */ - return (BOOLEAN)Status; - } - - /* Allocate a new Thread */ - CsrThread = CsrAllocateThread(CsrProcess); - if (!CsrThread) - { - /* Fail the request */ - CsrDeallocateProcess(CsrProcess); - ApiMessage->ReturnValue = STATUS_NO_MEMORY; - CsrReleaseProcessLock(); - return TRUE; - } - - /* Setup the Thread Object */ - CsrThread->CreateTime = KernelTimes.CreateTime; - CsrThread->ClientId = CreateSession->ProcessInfo.ClientId; - CsrThread->ThreadHandle = hThread; - ProtectHandle(hThread); - CsrThread->Flags = 0; - - /* Insert it into the Process List */ - CsrInsertThread(CsrProcess, CsrThread); - - /* Setup Process Data */ - CsrProcess->ClientId = CreateSession->ProcessInfo.ClientId; - CsrProcess->ProcessHandle = hProcess; - CsrProcess->NtSession = CsrAllocateNtSession(CreateSession->SessionId); - - /* Set the Process Priority */ - CsrSetBackgroundPriority(CsrProcess); - - /* Get the first data location */ - ProcessData = &CsrProcess->ServerData[CSR_SERVER_DLL_MAX]; - - /* Loop every DLL */ - for (i = 0; i < CSR_SERVER_DLL_MAX; i++) - { - /* Check if the DLL is loaded and has Process Data */ - if (CsrLoadedServerDll[i] && CsrLoadedServerDll[i]->SizeOfProcessData) - { - /* Write the pointer to the data */ - CsrProcess->ServerData[i] = ProcessData; - - /* Move to the next data location */ - ProcessData = (PVOID)((ULONG_PTR)ProcessData + - CsrLoadedServerDll[i]->SizeOfProcessData); - } - else - { - /* Nothing for this Process */ - CsrProcess->ServerData[i] = NULL; - } - } - - /* Insert the Process */ - CsrInsertProcess(NULL, NULL, CsrProcess); - - /* Activate the Thread */ - ApiMessage->ReturnValue = NtResumeThread(hThread, NULL); - - /* Release lock and return */ - CsrReleaseProcessLock(); - return TRUE; -} - -/*++ - * @name CsrSbForeignSessionComplete - * - * The CsrSbForeignSessionComplete API is called by the Session Manager - * whenever a foreign session is completed (ie: terminated). - * - * @param ApiMessage - * Pointer to the Session Manager API Message. - * - * @return TRUE in case of success, FALSE othwerwise. - * - * @remarks The CsrSbForeignSessionComplete API is not yet implemented. - * - *--*/ -BOOLEAN -NTAPI -CsrSbForeignSessionComplete(IN PSB_API_MSG ApiMessage) -{ - /* Deprecated/Unimplemented in NT */ - ApiMessage->ReturnValue = STATUS_NOT_IMPLEMENTED; - return TRUE; -} - -/*++ - * @name CsrSbTerminateSession - * - * The CsrSbTerminateSession API is called by the Session Manager - * whenever a foreign session should be destroyed. - * - * @param ApiMessage - * Pointer to the Session Manager API Message. - * - * @return TRUE in case of success, FALSE othwerwise. - * - * @remarks The CsrSbTerminateSession API is not yet implemented. - * - *--*/ -BOOLEAN -NTAPI -CsrSbTerminateSession(IN PSB_API_MSG ApiMessage) -{ - ApiMessage->ReturnValue = STATUS_NOT_IMPLEMENTED; - return TRUE; -} - -/*++ - * @name CsrSbCreateProcess - * - * The CsrSbCreateProcess API is called by the Session Manager - * whenever a foreign session is created and a new process should be started. - * - * @param ApiMessage - * Pointer to the Session Manager API Message. - * - * @return TRUE in case of success, FALSE othwerwise. - * - * @remarks The CsrSbCreateProcess API is not yet implemented. - * - *--*/ -BOOLEAN -NTAPI -CsrSbCreateProcess(IN PSB_API_MSG ApiMessage) -{ - ApiMessage->ReturnValue = STATUS_NOT_IMPLEMENTED; - return TRUE; -} - -/* EOF */ diff --git a/deprecated/csr/csrsrv/srv.h b/deprecated/csr/csrsrv/srv.h deleted file mode 100644 index 48a9f0f1345..00000000000 --- a/deprecated/csr/csrsrv/srv.h +++ /dev/null @@ -1,395 +0,0 @@ -#ifndef _SRV_H -#define _SRV_H - -/* PSDK/NDK Headers */ -#define NTOS_MODE_USER -#include -#define WIN32_NO_STATUS -#include -#include -#include - -/* CSR Header */ -#include -#include - -/* PSEH for SEH Support */ -#include - -/* DEFINES *******************************************************************/ - -#define CSR_SERVER_DLL_MAX 4 - -#define CsrAcquireProcessLock() \ - RtlEnterCriticalSection(&CsrProcessLock); - -#define CsrReleaseProcessLock() \ - RtlLeaveCriticalSection(&CsrProcessLock); - -#define CsrAcquireWaitLock() \ - RtlEnterCriticalSection(&CsrWaitListsLock); - -#define CsrReleaseWaitLock() \ - RtlLeaveCriticalSection(&CsrWaitListsLock); - -#define CsrAcquireNtSessionLock() \ - RtlEnterCriticalSection(&CsrNtSessionLock) - -#define CsrReleaseNtSessionLock() \ - RtlLeaveCriticalSection(&CsrNtSessionLock) - -#define CsrHashThread(t) \ - (HandleToUlong(t)&(256 - 1)) - -#define ProcessStructureListLocked() \ - (CsrProcessLock.OwningThread == NtCurrentTeb()->ClientId.UniqueThread) - -#define SM_REG_KEY \ - L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Session Manager" - -#define SESSION_ROOT L"\\Sessions" -#define GLOBAL_ROOT L"\\GLOBAL??" -#define SYMLINK_NAME L"SymbolicLink" -#define SB_PORT_NAME L"SbAbiPort" -#define CSR_PORT_NAME L"ApiPort" -#define UNICODE_PATH_SEP L"\\" - -#define ROUND_UP(n, align) ROUND_DOWN(((ULONG)n) + (align) - 1, (align)) -#define ROUND_DOWN(n, align) (((ULONG)n) & ~((align) - 1l)) - -/* DATA **********************************************************************/ - -extern ULONG CsrTotalPerProcessDataLength; -extern ULONG CsrMaxApiRequestThreads; -extern PCSR_SERVER_DLL CsrLoadedServerDll[CSR_SERVER_DLL_MAX]; -extern PCSR_PROCESS CsrRootProcess; -extern UNICODE_STRING CsrSbApiPortName; -extern UNICODE_STRING CsrApiPortName; -extern HANDLE CsrSbApiPort; -extern HANDLE CsrSmApiPort; -extern HANDLE CsrApiPort; -extern HANDLE CsrHeap; -extern RTL_CRITICAL_SECTION CsrProcessLock; -extern RTL_CRITICAL_SECTION CsrWaitListsLock; -extern LIST_ENTRY CsrThreadHashTable[256]; -extern HANDLE CsrInitializationEvent; -extern SYSTEM_BASIC_INFORMATION CsrNtSysInfo; -extern UNICODE_STRING CsrDirectoryName; -extern HANDLE CsrObjectDirectory; -extern PSB_API_ROUTINE CsrServerSbApiDispatch[5]; -extern ULONG CsrDebug; - -/* FUNCTIONS *****************************************************************/ - -/* FIXME: Public APIs should go in the CSR Server Include */ -BOOLEAN -NTAPI -CsrCaptureArguments( - IN PCSR_THREAD CsrThread, - IN PCSR_API_MESSAGE ApiMessage -); - -NTSTATUS -NTAPI -CsrLoadServerDll( - IN PCHAR DllString, - IN PCHAR EntryPoint, - IN ULONG ServerId -); - -NTSTATUS -NTAPI -CsrServerInitialization( - ULONG ArgumentCount, - PCHAR Arguments[] -); - -BOOLEAN -NTAPI -UnProtectHandle(IN HANDLE ObjectHandle); - -VOID -NTAPI -CsrLockedReferenceProcess(IN PCSR_PROCESS CsrProcess); - -VOID -NTAPI -CsrLockedReferenceThread(IN PCSR_THREAD CsrThread); - -NTSTATUS -NTAPI -CsrCreateSessionObjectDirectory(IN ULONG SessionId); - -NTSTATUS -NTAPI -CsrCreateObjectDirectory(IN PCHAR ObjectDirectory); - -NTSTATUS -NTAPI -CsrSrvCreateSharedSection(IN PCHAR ParameterValue); - -NTSTATUS -NTAPI -CsrInitializeNtSessionList(VOID); - -NTSTATUS -NTAPI -CsrInitializeProcessStructure(VOID); - -NTSTATUS -NTAPI -CsrApiPortInitialize(VOID); - -NTSTATUS -NTAPI -CsrSbApiPortInitialize(VOID); - -BOOLEAN -NTAPI -CsrSbCreateSession(IN PSB_API_MSG ApiMessage); - -BOOLEAN -NTAPI -CsrSbTerminateSession(IN PSB_API_MSG ApiMessage); - -BOOLEAN -NTAPI -CsrSbForeignSessionComplete(IN PSB_API_MSG ApiMessage); - -BOOLEAN -NTAPI -CsrSbCreateProcess(IN PSB_API_MSG ApiMessage); - -PCSR_PROCESS -NTAPI -CsrAllocateProcess(VOID); - -PCSR_THREAD -NTAPI -CsrAllocateThread(IN PCSR_PROCESS CsrProcess); - -VOID -NTAPI -CsrInsertThread( - IN PCSR_PROCESS Process, - IN PCSR_THREAD Thread -); - -VOID -NTAPI -CsrSetBackgroundPriority(IN PCSR_PROCESS CsrProcess); - -VOID -NTAPI -CsrDeallocateProcess(IN PCSR_PROCESS CsrProcess); - -NTSTATUS -NTAPI -CsrGetProcessLuid( - HANDLE hProcess, - PLUID Luid -); - -BOOLEAN -NTAPI -CsrImpersonateClient(IN PCSR_THREAD CsrThread); - -BOOLEAN -NTAPI -CsrRevertToSelf(VOID); - -PCSR_THREAD -NTAPI -CsrLocateThreadByClientId( - OUT PCSR_PROCESS *Process, - IN PCLIENT_ID ClientId -); - -VOID -NTAPI -CsrDereferenceNtSession( - IN PCSR_NT_SESSION Session, - NTSTATUS ExitStatus -); - -VOID -NTAPI -CsrReferenceNtSession(PCSR_NT_SESSION Session); - -VOID -NTAPI -CsrLockedDereferenceThread(PCSR_THREAD CsrThread); - -VOID -NTAPI -CsrLockedDereferenceProcess(PCSR_PROCESS CsrProcess); - -NTSTATUS -NTAPI -CsrLockProcessByClientId( - IN HANDLE Pid, - OUT PCSR_PROCESS *CsrProcess OPTIONAL -); - -NTSTATUS -NTAPI -CsrUnlockProcess(PCSR_PROCESS CsrProcess); - -NTSTATUS -NTAPI -CsrSrvClientConnect( - IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply -); - -NTSTATUS -NTAPI -CsrSrvUnusedFunction( - IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply -); - -NTSTATUS -NTAPI -CsrSrvIdentifyAlertableThread( - IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply -); - -NTSTATUS -NTAPI -CsrSrvSetPriorityClass( - IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply -); - -NTSTATUS -NTAPI -CsrServerDllInitialization(IN PCSR_SERVER_DLL LoadedServerDll); - -VOID -NTAPI -CsrDereferenceThread(PCSR_THREAD CsrThread); - -VOID -NTAPI -CsrSbApiRequestThread(IN PVOID Parameter); - -NTSTATUS -NTAPI -CsrApiRequestThread(IN PVOID Parameter); - -BOOLEAN -NTAPI -ProtectHandle(IN HANDLE ObjectHandle); - -PCSR_THREAD -NTAPI -CsrAddStaticServerThread( - IN HANDLE hThread, - IN PCLIENT_ID ClientId, - IN ULONG ThreadFlags -); - -PCSR_THREAD -NTAPI -CsrConnectToUser(VOID); - -PCSR_THREAD -NTAPI -CsrLocateThreadInProcess( - IN PCSR_PROCESS CsrProcess OPTIONAL, - IN PCLIENT_ID Cid -); - -NTSTATUS -NTAPI -CsrSbApiHandleConnectionRequest(IN PSB_API_MSG Message); - -NTSTATUS -NTAPI -CsrApiHandleConnectionRequest(IN PCSR_API_MESSAGE ApiMessage); - -NTSTATUS -NTAPI -CsrSrvAttachSharedSection( - IN PCSR_PROCESS CsrProcess OPTIONAL, - OUT PCSR_CONNECTION_INFO ConnectInfo -); - -VOID -NTAPI -CsrReleaseCapturedArguments(IN PCSR_API_MESSAGE ApiMessage); - -BOOLEAN -NTAPI -CsrNotifyWaitBlock( - IN PCSR_WAIT_BLOCK WaitBlock, - IN PLIST_ENTRY WaitList, - IN PVOID WaitArgument1, - IN PVOID WaitArgument2, - IN ULONG WaitFlags, - IN BOOLEAN DereferenceThread -); - -VOID -NTAPI -CsrDereferenceProcess(PCSR_PROCESS CsrProcess); - -VOID -NTAPI -CsrInsertProcess( - IN PCSR_PROCESS Parent OPTIONAL, - IN PCSR_PROCESS CurrentProcess OPTIONAL, - IN PCSR_PROCESS CsrProcess -); - -NTSTATUS -NTAPI -CsrPopulateDosDevicesDirectory( - IN HANDLE DosDevicesDirectory, - IN PPROCESS_DEVICEMAP_INFORMATION DeviceMap -); - -BOOLEAN -NTAPI -CsrValidateMessageBuffer( - IN PCSR_API_MESSAGE ApiMessage, - IN PVOID *Buffer, - IN ULONG ArgumentSize, - IN ULONG ArgumentCount -); - -NTSTATUS -NTAPI -CsrCreateLocalSystemSD(OUT PSECURITY_DESCRIPTOR *LocalSystemSd); - -NTSTATUS -NTAPI -CsrDestroyThread(IN PCLIENT_ID Cid); - -NTSTATUS -NTAPI -CsrDestroyProcess( - IN PCLIENT_ID Cid, - IN NTSTATUS ExitStatus -); - -LONG -NTAPI -CsrUnhandledExceptionFilter( - IN PEXCEPTION_POINTERS ExceptionInfo -); - -VOID -NTAPI -CsrProcessRefcountZero(IN PCSR_PROCESS CsrProcess); - -VOID -NTAPI -CsrThreadRefcountZero(IN PCSR_THREAD CsrThread); - -NTSTATUS -NTAPI -CsrSetDirectorySecurity(IN HANDLE ObjectDirectory); -#endif diff --git a/deprecated/csr/csrsrv/status.h b/deprecated/csr/csrsrv/status.h deleted file mode 100644 index e619443abd3..00000000000 --- a/deprecated/csr/csrsrv/status.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * CSRSRV Status - */ - -/* Organization - * - * api.c - Handles the LPC Reply/Request Threads which wait on Sb and Csr APIs. - * Also in charge of creating those threads and setting up the ports. - * Finally, it provides external APIs for validating the API buffers - * and doing server-to-server API calls. - * - * init.c - Handles initialization of CSRSRV, including command-line parsing, - * loading the Server DLLs, creating the Session Directories, setting - * up the DosDevices Object Directory, and initializing each component. - * - * process.c - Handles all internal functions dealing with the CSR Process Object, - * including de/allocation, de/referencing, un/locking, prority, and - * lookups. Also handles all external APIs which touch the CSR Process Object. - * - * server.c - Handles all internal functions related to loading and managing Server - * DLLs, as well as the routines handling the Shared Static Memory Section. - * Holds the API Dispatch/Valid/Name Tables and the public CSR_SERVER API - * interface. Also home of the SEH handler. - * - * session.c - Handles all internal functions dealing with the CSR Session Object, - * including de/allocation, de/referencing, and un/locking. Holds the SB API - * Dispatch/Name Tables and the public CsrSv API Interface for commmunication - * with the Session Manager. - * - * thread.c - Handles all internal functions dealing with the CSR Thread Object, - * including de/allocation, de/referencing, un/locking, impersonation, and - * lookups. Also handles all external APIs which touch the CSR Thread Object. - * - * wait.c - Handles all internal functions dealing with the CSR Wait Object, - * including de/allocation, de/referencing and un/locking. Also implements - * the external Wait API for creating, removing and/or notifying waits. - */ - -/* Exported APIs, their location, and their status - * CsrAddStaticServerThread 753E679E 1 - server.c - IMPLEMENTED - * CsrCallServerFromServer 753E4FD9 2 - api.c - IMPLEMENTED - * CsrConnectToUser 753E4E48 3 - api.c - IMPLEMENTED - * CsrCreateProcess 753E6FD3 4 - process.c - IMPLEMENTED - * CsrCreateRemoteThread 753E73BD 5 - thread.c - IMPLEMENTED - * CsrCreateThread 753E72DA 6 - thread.c - IMPLEMENTED - * CsrCreateWait 753E770E 7 - wait.c - IMPLEMENTED - * CsrDebugProcess 753E7682 8 - process.c - IMPLEMENTED - * CsrDebugProcessStop 753E768A 9 - process.c - IMPLEMENTED - * CsrDereferenceProcess 753E6281 10 - process.c - IMPLEMENTED - * CsrDereferenceThread 753E6964 11 - thread.c - IMPLEMENTED - * CsrDereferenceWait 753E7886 12 - wait.c - IMPLEMENTED - * CsrDestroyProcess 753E7225 13 - process.c - IMPLEMENTED - * CsrDestroyThread 753E7478 14 - thread.c - IMPLEMENTED - * CsrExecServerThread 753E6841 15 - thread.c - IMPLEMENTED - * CsrGetProcessLuid 753E632F 16 - process.c - IMPLEMENTED - * CsrImpersonateClient 753E60F8 17 - thread.c - IMPLEMENTED - * CsrLockProcessByClientId 753E668F 18 - process.c - IMPLEMENTED - * CsrLockThreadByClientId 753E6719 19 - thread.c - IMPLEMENTED - * CsrMoveSatisfiedWait 753E7909 20 - wait.c - IMPLEMENTED - * CsrNotifyWait 753E782F 21 - wait.c - IMPLEMENTED - * CsrPopulateDosDevices 753E37A5 22 - init.c - IMPLEMENTED - * CsrQueryApiPort 753E4E42 23 - api.c - IMPLEMENTED - * CsrReferenceThread 753E61E5 24 - thread.c - IMPLEMENTED - * CsrRevertToSelf 753E615A 25 - thread.c - IMPLEMENTED - * CsrServerInitialization 753E3D75 26 - server.c - IMPLEMENTED - * CsrSetBackgroundPriority 753E5E87 27 - process.c - IMPLEMENTED - * CsrSetCallingSpooler 753E6425 28 - server.c - IMPLEMENTED - * CsrSetForegroundPriority 753E5E67 29 - process.c - IMPLEMENTED - * CsrShutdownProcesses 753E7547 30 - process.c - IMPLEMENTED - * CsrUnhandledExceptionFilter 753E3FE3 31 - server.c - IMPLEMENTED - * CsrUnlockProcess 753E66FD 32 - process.c - IMPLEMENTED - * CsrUnlockThread 753E7503 33 - thread.c - IMPLEMENTED - * CsrValidateMessageBuffer 753E528D 34 - api.c - IMPLEMENTED - * CsrValidateMessageString 753E5323 35 - api.c - UNIMPLEMENTED - */ - -/* Public CSR API Interface Status (server.c) - * CsrSrvClientConnect - IMPLEMENTED - * CsrSrvUnusedFunction - IMPLEMENTED - * CsrSrvIdentifyAlertableThread - IMPLEMENTED - * CsrSrvSetPriorityClass - IMPLEMENTED - */ - -/* Public SB API Interface Status (session.c) - * CsrSbCreateSession - IMPLEMENTED - * CsrSbForeignSessionComplete - IMPLEMENTED - * CsrSbTerminateSession - UNIMPLEMENTED - * CsrSbCreateProcess - UNIMPLEMENTED - */ - -/* What's missing: - * - * - SMSS needs to be partly re-written to match some things done here. - * Among other things, SmConnectToSm, SmCompleteSession and the other - * Sm* Exported APIs have to be properly implemented, as well as the - * callback calling and SM LPC APIs. [DONE!] - * - * - NTDLL needs to get the Csr* routines properly implemented. [DONE!] - * - * - KERNEL32, USER32 need to register with their servers properly. - * Additionally, user32 needs to have ClientThreadStartup implemented - * properly and do the syscall NtUserInitialize (I think) which also - * needs to be implemented in win32k.sys. All this should be less then - * 100 lines of code. [KERNEL32 50% DONE, USER32 NOT DONE] - * - * - The skeleton code for winsrv and basesrv which connects with CSR/CSRSRV - * needs to be written. [NOT DONE] - * - * - The kernel's LPC implementation needs to be made compatible. [DONE!] - */ - diff --git a/deprecated/csr/csrsrv/thread.c b/deprecated/csr/csrsrv/thread.c deleted file mode 100644 index c03f61d82b0..00000000000 --- a/deprecated/csr/csrsrv/thread.c +++ /dev/null @@ -1,1056 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS CSR Sub System - * FILE: subsys/csr/csrsrv/thread.c - * PURPOSE: CSR Server DLL Thread Implementation - * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) - */ - -/* INCLUDES ******************************************************************/ - -#include "srv.h" - -#define NDEBUG -#include - -/* DATA **********************************************************************/ - -LIST_ENTRY CsrThreadHashTable[256]; -SECURITY_QUALITY_OF_SERVICE CsrSecurityQos = -{ - sizeof(SECURITY_QUALITY_OF_SERVICE), - SecurityImpersonation, - SECURITY_STATIC_TRACKING, - FALSE -}; - -/* PRIVATE FUNCTIONS *********************************************************/ - -/*++ - * @name CsrAllocateThread - * - * The CsrAllocateThread routine allocates a new CSR Thread object. - * - * @param CsrProcess - * Pointer to the CSR Process which will contain this CSR Thread. - * - * @return Pointer to the newly allocated CSR Thread. - * - * @remarks None. - * - *--*/ -PCSR_THREAD -NTAPI -CsrAllocateThread(IN PCSR_PROCESS CsrProcess) -{ - PCSR_THREAD CsrThread; - - /* Allocate the structure */ - CsrThread = RtlAllocateHeap(CsrHeap, HEAP_ZERO_MEMORY, sizeof(CSR_THREAD)); - if (!CsrThread) return NULL; - - /* Reference the Thread and Process */ - CsrThread->ReferenceCount++; - CsrProcess->ReferenceCount++; - - /* Set the Parent Process */ - CsrThread->Process = CsrProcess; - - /* Return Thread */ - return CsrThread; -} - -/*++ - * @name CsrLocateThreadByClientId - * - * The CsrLocateThreadByClientId routine locates the CSR Thread and, - * optionally, its parent CSR Process, corresponding to a Client ID. - * - * @param Process - * Optional pointer to a CSR Process pointer which will contain - * the CSR Thread's parent. - * - * @param ClientId - * Pointer to a Client ID structure containing the Unique Thread ID - * to look up. - * - * @return Pointer to the CSR Thread corresponding to this CID, or NULL if - * none was found. - * - * @remarks None. - * - *--*/ -PCSR_THREAD -NTAPI -CsrLocateThreadByClientId(OUT PCSR_PROCESS *Process OPTIONAL, - IN PCLIENT_ID ClientId) -{ - ULONG i; - PLIST_ENTRY NextEntry; - PCSR_THREAD FoundThread; - ASSERT(ProcessStructureListLocked()); - - /* Hash the Thread */ - i = CsrHashThread(ClientId->UniqueThread); - - /* Set the list pointers */ - NextEntry = CsrThreadHashTable[i].Flink; - - /* Star the loop */ - while (NextEntry != &CsrThreadHashTable[i]) - { - /* Get the thread */ - FoundThread = CONTAINING_RECORD(NextEntry, CSR_THREAD, HashLinks); - - /* Compare the CID */ - if (*(PULONGLONG)&FoundThread->ClientId == *(PULONGLONG)ClientId) - { - /* Match found, return the process */ - *Process = FoundThread->Process; - - /* Return thread too */ - return FoundThread; - } - - /* Next */ - NextEntry = NextEntry->Flink; - } - - /* Nothing found */ - return NULL; -} - -/*++ - * @name CsrLocateThreadInProcess - * - * The CsrLocateThreadInProcess routine locates the CSR Thread - * corresponding to a Client ID inside a specific CSR Process. - * - * @param Process - * Optional pointer to the CSR Process which contains the CSR Thread - * that will be looked up. - * - * @param ClientId - * Pointer to a Client ID structure containing the Unique Thread ID - * to look up. - * - * @return Pointer to the CSR Thread corresponding to this CID, or NULL if - * none was found. - * - * @remarks If the CsrProcess argument is NULL, the lookup will be done inside - * CsrRootProcess. - * - *--*/ -PCSR_THREAD -NTAPI -CsrLocateThreadInProcess(IN PCSR_PROCESS CsrProcess OPTIONAL, - IN PCLIENT_ID Cid) -{ - PLIST_ENTRY NextEntry; - PCSR_THREAD FoundThread = NULL; - - /* Use the Root Process if none was specified */ - if (!CsrProcess) CsrProcess = CsrRootProcess; - - /* Save the List pointers */ - NextEntry = CsrProcess->ThreadList.Flink; - - /* Start the Loop */ - while (NextEntry != &CsrProcess->ThreadList) - { - /* Get Thread Entry */ - FoundThread = CONTAINING_RECORD(NextEntry, CSR_THREAD, Link); - - /* Check for TID Match */ - if (FoundThread->ClientId.UniqueThread == Cid->UniqueThread) break; - - /* Next entry */ - NextEntry = NextEntry->Flink; - } - - /* Return what we found */ - return FoundThread; -} - -/*++ - * @name CsrInsertThread - * - * The CsrInsertThread routine inserts a CSR Thread into its parent's - * Thread List and into the Thread Hash Table. - * - * @param Process - * Pointer to the CSR Process containing this CSR Thread. - * - * @param Thread - * Pointer to the CSR Thread to be inserted. - * - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -CsrInsertThread(IN PCSR_PROCESS Process, - IN PCSR_THREAD Thread) -{ - ULONG i; - ASSERT(ProcessStructureListLocked()); - - /* Insert it into the Regular List */ - InsertTailList(&Process->ThreadList, &Thread->Link); - - /* Increase Thread Count */ - Process->ThreadCount++; - - /* Hash the Thread */ - i = CsrHashThread(Thread->ClientId.UniqueThread); - - /* Insert it there too */ - InsertHeadList(&CsrThreadHashTable[i], &Thread->HashLinks); -} - -/*++ - * @name CsrDeallocateThread - * - * The CsrDeallocateThread frees the memory associated with a CSR Thread. - * - * @param CsrThread - * Pointer to the CSR Thread to be freed. - * - * @return None. - * - * @remarks Do not call this routine. It is reserved for the internal - * thread management routines when a CSR Thread has been cleanly - * dereferenced and killed. - * - *--*/ -VOID -NTAPI -CsrDeallocateThread(IN PCSR_THREAD CsrThread) -{ - /* Free the process object from the heap */ - ASSERT(CsrThread->WaitBlock == NULL); - RtlFreeHeap(CsrHeap, 0, CsrThread); -} - -/*++ - * @name CsrLockedReferenceThread - * - * The CsrLockedReferenceThread refences a CSR Thread while the - * Process Lock is already being held. - * - * @param CsrThread - * Pointer to the CSR Thread to be referenced. - * - * @return None. - * - * @remarks This routine will return with the Process Lock held. - * - *--*/ -VOID -NTAPI -CsrLockedReferenceThread(IN PCSR_THREAD CsrThread) -{ - /* Increment the reference count */ - ++CsrThread->ReferenceCount; -} - -/*++ - * @name CsrLockedDereferenceThread - * - * The CsrLockedDereferenceThread derefences a CSR Thread while the - * Process Lock is already being held. - * - * @param CsrThread - * Pointer to the CSR Thread to be dereferenced. - * - * @return None. - * - * @remarks This routine will return with the Process Lock held. - * - *--*/ -VOID -NTAPI -CsrLockedDereferenceThread(IN PCSR_THREAD CsrThread) -{ - LONG LockCount; - - /* Decrease reference count */ - LockCount = --CsrThread->ReferenceCount; - ASSERT(LockCount >= 0); - if (!LockCount) - { - /* Call the generic cleanup code */ - CsrThreadRefcountZero(CsrThread); - CsrAcquireProcessLock(); - } -} - -/*++ - * @name CsrRemoveThread - * - * The CsrRemoveThread function undoes a CsrInsertThread operation and - * removes the CSR Thread from the the Hash Table and Thread List. - * - * @param CsrThread - * Pointer to the CSR Thread to remove. - * - * @return None. - * - * @remarks If this CSR Thread is the last one inside a CSR Process, the - * parent will be dereferenced and the CsrProcessLastThreadTerminated - * flag will be set. - * - * After executing this routine, the CSR Thread will have the - * CsrThreadInTermination flag set. - * - *--*/ -VOID -NTAPI -CsrRemoveThread(IN PCSR_THREAD CsrThread) -{ - ASSERT(ProcessStructureListLocked()); - - /* Remove it from the List */ - RemoveEntryList(&CsrThread->Link); - - /* Decreate the thread count of the process */ - --CsrThread->Process->ThreadCount; - - /* Remove it from the Hash List as well */ - if (CsrThread->HashLinks.Flink) RemoveEntryList(&CsrThread->HashLinks); - - /* Check if this is the last Thread */ - if (!CsrThread->Process->ThreadCount) - { - /* Check if it's not already been marked for deletion */ - if (!(CsrThread->Process->Flags & CsrProcessLastThreadTerminated)) - { - /* Let everyone know this process is about to lose the thread */ - CsrThread->Process->Flags |= CsrProcessLastThreadTerminated; - - /* Reference the Process */ - CsrLockedDereferenceProcess(CsrThread->Process); - } - } - - /* Mark the thread for deletion */ - CsrThread->Flags |= CsrThreadInTermination; -} - -/*++ - * @name CsrThreadRefcountZero - * - * The CsrThreadRefcountZero routine is executed when a CSR Thread has lost - * all its active references. It removes and de-allocates the CSR Thread. - * - * @param CsrThread - * Pointer to the CSR Thread that is to be deleted. - * - * @return None. - * - * @remarks Do not call this routine. It is reserved for the internal - * thread management routines when a CSR Thread has lost all - * its references. - * - * This routine is called with the Process Lock held. - * - *--*/ -VOID -NTAPI -CsrThreadRefcountZero(IN PCSR_THREAD CsrThread) -{ - PCSR_PROCESS CsrProcess = CsrThread->Process; - NTSTATUS Status; - - /* Remove this thread */ - CsrRemoveThread(CsrThread); - - /* Release the Process Lock */ - CsrReleaseProcessLock(); - - /* Close the NT Thread Handle */ - UnProtectHandle(CsrThread->ThreadHandle); - Status = NtClose(CsrThread->ThreadHandle); - ASSERT(NT_SUCCESS(Status)); - - /* De-allocate the CSR Thread Object */ - CsrDeallocateThread(CsrThread); - - /* Remove a reference from the process */ - CsrDereferenceProcess(CsrProcess); -} - -/* PUBLIC FUNCTIONS ***********************************************************/ - -/*++ - * @name CsrAddStaticServerThread - * @implemented NT4 - * - * The CsrAddStaticServerThread routine adds a new CSR Thread to the - * CSR Server Process (CsrRootProcess). - * - * @param hThread - * Handle to an existing NT Thread to which to associate this - * CSR Thread. - * - * @param ClientId - * Pointer to the Client ID structure of the NT Thread to associate - * with this CSR Thread. - * - * @param ThreadFlags - * Initial CSR Thread Flags to associate to this CSR Thread. Usually - * CsrThreadIsServerThread. - * - * @return Pointer to the newly allocated CSR Thread. - * - * @remarks None. - * - *--*/ -PCSR_THREAD -NTAPI -CsrAddStaticServerThread(IN HANDLE hThread, - IN PCLIENT_ID ClientId, - IN ULONG ThreadFlags) -{ - PCSR_THREAD CsrThread; - - /* Get the Lock */ - CsrAcquireProcessLock(); - - /* Allocate the Server Thread */ - CsrThread = CsrAllocateThread(CsrRootProcess); - if (CsrThread) - { - /* Setup the Object */ - CsrThread->ThreadHandle = hThread; - ProtectHandle(hThread); - CsrThread->ClientId = *ClientId; - CsrThread->Flags = ThreadFlags; - - /* Insert it into the Thread List */ - InsertTailList(&CsrRootProcess->ThreadList, &CsrThread->Link); - - /* Increment the thread count */ - CsrRootProcess->ThreadCount++; - } - else - { - DPRINT1("CsrAddStaticServerThread: alloc failed for thread 0x%x\n", hThread); - } - - /* Release the Process Lock and return */ - CsrReleaseProcessLock(); - return CsrThread; -} - -/*++ - * @name CsrCreateRemoteThread - * @implemented NT4 - * - * The CsrCreateRemoteThread routine creates a CSR Thread object for - * an NT Thread which is not part of the current NT Process. - * - * @param hThread - * Handle to an existing NT Thread to which to associate this - * CSR Thread. - * - * @param ClientId - * Pointer to the Client ID structure of the NT Thread to associate - * with this CSR Thread. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrCreateRemoteThread(IN HANDLE hThread, - IN PCLIENT_ID ClientId) -{ - NTSTATUS Status; - HANDLE ThreadHandle; - PCSR_THREAD CsrThread; - PCSR_PROCESS CsrProcess; - KERNEL_USER_TIMES KernelTimes; - - DPRINT("CSRSRV: %s called\n", __FUNCTION__); - - /* Get the Thread Create Time */ - Status = NtQueryInformationThread(hThread, - ThreadTimes, - &KernelTimes, - sizeof(KernelTimes), - NULL); - if (!NT_SUCCESS(Status)) return Status; - - /* Lock the Owner Process */ - Status = CsrLockProcessByClientId(&ClientId->UniqueProcess, &CsrProcess); - - /* Make sure the thread didn't terminate */ - if (KernelTimes.ExitTime.QuadPart) - { - /* Unlock the process and return */ - CsrUnlockProcess(CsrProcess); - return STATUS_THREAD_IS_TERMINATING; - } - - /* Allocate a CSR Thread Structure */ - CsrThread = CsrAllocateThread(CsrProcess); - if (!CsrThread) - { - DPRINT1("CSRSRV:%s: out of memory!\n", __FUNCTION__); - CsrUnlockProcess(CsrProcess); - return STATUS_NO_MEMORY; - } - - /* Duplicate the Thread Handle */ - Status = NtDuplicateObject(NtCurrentProcess(), - hThread, - NtCurrentProcess(), - &ThreadHandle, - 0, - 0, - DUPLICATE_SAME_ACCESS); - /* Allow failure */ - if (!NT_SUCCESS(Status)) ThreadHandle = hThread; - - /* Save the data we have */ - CsrThread->CreateTime = KernelTimes.CreateTime; - CsrThread->ClientId = *ClientId; - CsrThread->ThreadHandle = ThreadHandle; - ProtectHandle(ThreadHandle); - CsrThread->Flags = 0; - - /* Insert the Thread into the Process */ - CsrInsertThread(CsrProcess, CsrThread); - - /* Release the lock and return */ - CsrUnlockProcess(CsrProcess); - return STATUS_SUCCESS; -} - -/*++ - * @name CsrCreateThread - * @implemented NT4 - * - * The CsrCreateThread routine creates a CSR Thread object for an NT Thread. - * - * @param CsrProcess - * Pointer to the CSR Process which will contain the CSR Thread. - * - * @param hThread - * Handle to an existing NT Thread to which to associate this - * CSR Thread. - * - * @param ClientId - * Pointer to the Client ID structure of the NT Thread to associate - * with this CSR Thread. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrCreateThread(IN PCSR_PROCESS CsrProcess, - IN HANDLE hThread, - IN PCLIENT_ID ClientId, - IN BOOLEAN HaveClient) -{ - NTSTATUS Status; - PCSR_THREAD CsrThread, CurrentThread; - PCSR_PROCESS CurrentProcess; - CLIENT_ID CurrentCid; - KERNEL_USER_TIMES KernelTimes; - DPRINT("CSRSRV: %s called\n", __FUNCTION__); - - if (HaveClient) - { - /* Get the current thread and CID */ - CurrentThread = NtCurrentTeb()->CsrClientThread; - CurrentCid = CurrentThread->ClientId; - - /* Acquire the Process Lock */ - CsrAcquireProcessLock(); - - /* Get the current Process and make sure the Thread is valid with this CID */ - CurrentThread = CsrLocateThreadByClientId(&CurrentProcess, &CurrentCid); - if (!CurrentThread) - { - DPRINT1("CSRSRV:%s: invalid thread!\n", __FUNCTION__); - CsrReleaseProcessLock(); - return STATUS_THREAD_IS_TERMINATING; - } - } - else - { - /* Acquire the Process Lock */ - CsrAcquireProcessLock(); - } - - /* Get the Thread Create Time */ - Status = NtQueryInformationThread(hThread, - ThreadTimes, - (PVOID)&KernelTimes, - sizeof(KernelTimes), - NULL); - if (!NT_SUCCESS(Status)) - { - CsrReleaseProcessLock(); - return Status; - } - - /* Allocate a CSR Thread Structure */ - CsrThread = CsrAllocateThread(CsrProcess); - if (!CsrThread) - { - DPRINT1("CSRSRV:%s: out of memory!\n", __FUNCTION__); - CsrReleaseProcessLock(); - return STATUS_NO_MEMORY; - } - - /* Save the data we have */ - CsrThread->CreateTime = KernelTimes.CreateTime; - CsrThread->ClientId = *ClientId; - CsrThread->ThreadHandle = hThread; - ProtectHandle(hThread); - CsrThread->Flags = 0; - - /* Insert the Thread into the Process */ - CsrInsertThread(CsrProcess, CsrThread); - - /* Release the lock and return */ - CsrReleaseProcessLock(); - return STATUS_SUCCESS; -} - -/*++ - * @name CsrDereferenceThread - * @implemented NT4 - * - * The CsrDereferenceThread routine removes a reference from a CSR Thread. - * - * @param CsrThread - * Pointer to the CSR Thread to dereference. - * - * @return None. - * - * @remarks If the reference count has reached zero (ie: the CSR Thread has - * no more active references), it will be deleted. - * - *--*/ -VOID -NTAPI -CsrDereferenceThread(IN PCSR_THREAD CsrThread) -{ - /* Acquire process lock */ - CsrAcquireProcessLock(); - - /* Decrease reference count */ - ASSERT(CsrThread->ReferenceCount > 0); - if (!(--CsrThread->ReferenceCount)) - { - /* Call the generic cleanup code */ - CsrThreadRefcountZero(CsrThread); - } - else - { - /* Just release the lock */ - CsrReleaseProcessLock(); - } -} - -/*++ - * @name CsrExecServerThread - * @implemented NT4 - * - * The CsrExecServerThread routine creates an NT Thread and then - * initializes a CSR Thread for it. - * - * @param ThreadHandler - * Pointer to the thread's startup routine. - * - * @param Flags - * Initial CSR Thread Flags to set to the CSR Thread. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks This routine is similar to CsrAddStaticServerThread, but it - * also creates an NT Thread instead of expecting one to already - * exist. - * - *--*/ -NTSTATUS -NTAPI -CsrExecServerThread(IN PVOID ThreadHandler, - IN ULONG Flags) -{ - PCSR_THREAD CsrThread; - HANDLE hThread; - CLIENT_ID ClientId; - NTSTATUS Status; - - /* Acquire process lock */ - CsrAcquireProcessLock(); - - /* Allocate a CSR Thread in the Root Process */ - ASSERT(CsrRootProcess != NULL); - CsrThread = CsrAllocateThread(CsrRootProcess); - if (!CsrThread) - { - /* Fail */ - CsrReleaseProcessLock(); - return STATUS_NO_MEMORY; - } - - /* Create the Thread */ - Status = RtlCreateUserThread(NtCurrentProcess(), - NULL, - FALSE, - 0, - 0, - 0, - ThreadHandler, - NULL, - &hThread, - &ClientId); - if (!NT_SUCCESS(Status)) - { - /* Fail */ - CsrDeallocateThread(CsrThread); - CsrReleaseProcessLock(); - return Status; - } - - /* Setup the Thread Object */ - CsrThread->ThreadHandle = hThread; - ProtectHandle(hThread); - CsrThread->ClientId = ClientId; - CsrThread->Flags = Flags; - - /* Insert it into the Thread List */ - InsertHeadList(&CsrRootProcess->ThreadList, &CsrThread->Link); - - /* Increase the thread count */ - CsrRootProcess->ThreadCount++; - - /* Return */ - CsrReleaseProcessLock(); - return Status; -} - -/*++ - * @name CsrDestroyThread - * @implemented NT4 - * - * The CsrDestroyThread routine destroys the CSR Thread corresponding to - * a given Thread ID. - * - * @param Cid - * Pointer to the Client ID Structure corresponding to the CSR - * Thread which is about to be destroyed. - * - * @return STATUS_SUCCESS in case of success, STATUS_THREAD_IS_TERMINATING - * if the CSR Thread is already terminating. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrDestroyThread(IN PCLIENT_ID Cid) -{ - CLIENT_ID ClientId = *Cid; - PCSR_THREAD CsrThread; - PCSR_PROCESS CsrProcess; - - /* Acquire lock */ - CsrAcquireProcessLock(); - - /* Find the thread */ - CsrThread = CsrLocateThreadByClientId(&CsrProcess, - &ClientId); - - /* Make sure we got one back, and that it's not already gone */ - if (!CsrThread || CsrThread->Flags & CsrThreadTerminated) - { - /* Release the lock and return failure */ - CsrReleaseProcessLock(); - return STATUS_THREAD_IS_TERMINATING; - } - - /* Set the terminated flag */ - CsrThread->Flags |= CsrThreadTerminated; - - /* Acquire the Wait Lock */ - CsrAcquireWaitLock(); - - /* Do we have an active wait block? */ - if (CsrThread->WaitBlock) - { - /* Notify waiters of termination */ - CsrNotifyWaitBlock(CsrThread->WaitBlock, - NULL, - NULL, - NULL, - CsrProcessTerminating, - TRUE); - } - - /* Release the Wait Lock */ - CsrReleaseWaitLock(); - - /* Dereference the thread */ - CsrLockedDereferenceThread(CsrThread); - - /* Release the Process Lock and return success */ - CsrReleaseProcessLock(); - return STATUS_SUCCESS; -} - -/*++ - * @name CsrImpersonateClient - * @implemented NT4 - * - * The CsrImpersonateClient will impersonate the given CSR Thread. - * - * @param CsrThread - * Pointer to the CSR Thread to impersonate. - * - * @return TRUE if impersionation suceeded, false otherwise. - * - * @remarks Impersonation can be recursive. - * - *--*/ -BOOLEAN -NTAPI -CsrImpersonateClient(IN PCSR_THREAD CsrThread) -{ - NTSTATUS Status; - PCSR_THREAD CurrentThread = NtCurrentTeb()->CsrClientThread; - - /* Use the current thread if none given */ - if (!CsrThread) CsrThread = CurrentThread; - - /* Still no thread, something is wrong */ - if (!CsrThread) return FALSE; - - /* Make the call */ - Status = NtImpersonateThread(NtCurrentThread(), - CsrThread->ThreadHandle, - &CsrSecurityQos); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: Can't impersonate client thread - Status = %lx\n", Status); - if (Status != STATUS_BAD_IMPERSONATION_LEVEL) DbgBreakPoint(); - return FALSE; - } - - /* Increase the impersonation count for the current thread and return */ - if (CurrentThread) ++CurrentThread->ImpersonationCount; - return TRUE; -} - -/*++ - * @name CsrRevertToSelf - * @implemented NT4 - * - * The CsrRevertToSelf routine will attempt to remove an active impersonation. - * - * @param None. - * - * @return TRUE if the reversion was succesful, false otherwise. - * - * @remarks Impersonation can be recursive; as such, the impersonation token - * will only be deleted once the CSR Thread's impersonaton count - * has reached zero. - * - *--*/ -BOOLEAN -NTAPI -CsrRevertToSelf(VOID) -{ - NTSTATUS Status; - PCSR_THREAD CurrentThread = NtCurrentTeb()->CsrClientThread; - HANDLE ImpersonationToken = NULL; - - /* Check if we have a Current Thread */ - if (CurrentThread) - { - /* Make sure impersonation is on */ - if (!CurrentThread->ImpersonationCount) - { - DPRINT1("CSRSS: CsrRevertToSelf called while not impersonating\n"); - DbgBreakPoint(); - return FALSE; - } - else if (--CurrentThread->ImpersonationCount > 0) - { - /* Success; impersonation count decreased but still not zero */ - return TRUE; - } - } - - /* Impersonation has been totally removed, revert to ourselves */ - Status = NtSetInformationThread(NtCurrentThread(), - ThreadImpersonationToken, - &ImpersonationToken, - sizeof(HANDLE)); - - /* Return TRUE or FALSE */ - ASSERT(NT_SUCCESS(Status)); - return NT_SUCCESS(Status); -} - -/*++ - * @name CsrLockThreadByClientId - * @implemented NT4 - * - * The CsrLockThreadByClientId routine locks the CSR Thread corresponding - * to the given Thread ID and optionally returns it. - * - * @param Tid - * Thread ID corresponding to the CSR Thread which will be locked. - * - * @param CsrThread - * Optional pointer to a CSR Thread pointer which will hold the - * CSR Thread corresponding to the given Thread ID. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * othwerwise. - * - * @remarks Locking a CSR Thread is defined as acquiring an extra - * reference to it and returning with the Process Lock held. - * - *--*/ -NTSTATUS -NTAPI -CsrLockThreadByClientId(IN HANDLE Tid, - OUT PCSR_THREAD *CsrThread) -{ - PLIST_ENTRY NextEntry; - PCSR_THREAD CurrentThread = NULL; - NTSTATUS Status = STATUS_UNSUCCESSFUL; - ULONG i; - - /* Acquire the lock */ - CsrAcquireProcessLock(); - - /* Assume failure */ - ASSERT(CsrThread != NULL); - *CsrThread = NULL; - - /* Convert to Hash */ - i = CsrHashThread(Tid); - - /* Setup the List Pointers */ - NextEntry = CsrThreadHashTable[i].Flink; - - /* Start Loop */ - while (NextEntry != &CsrThreadHashTable[i]) - { - /* Get the Process */ - CurrentThread = CONTAINING_RECORD(NextEntry, CSR_THREAD, HashLinks); - - /* Check for PID Match */ - if ((CurrentThread->ClientId.UniqueThread == Tid) && - !(CurrentThread->Flags & CsrThreadTerminated)) - { - /* Get out of here */ - break; - } - - /* Next entry */ - NextEntry = NextEntry->Flink; - } - - /* Nothing found if we got back to the list */ - if (NextEntry == &CsrThreadHashTable[i]) CurrentThread = NULL; - - /* Did the loop find something? */ - if (CurrentThread) - { - /* Reference the found thread */ - Status = STATUS_SUCCESS; - CurrentThread->ReferenceCount++; - *CsrThread = CurrentThread; - } - else - { - /* Nothing found, release the lock */ - Status = STATUS_UNSUCCESSFUL; - CsrReleaseProcessLock(); - } - - /* Return the status */ - return Status; -} - -/*++ - * @name CsrReferenceThread - * @implemented NT4 - * - * The CsrReferenceThread routine increases the active reference count of - * a CSR Thread. - * - * @param CsrThread - * Pointer to the CSR Thread whose reference count will be increased. - * - * @return None. - * - * @remarks Do not use this routine if the Process Lock is already held. - * - *--*/ -VOID -NTAPI -CsrReferenceThread(PCSR_THREAD CsrThread) -{ - /* Acquire process lock */ - CsrAcquireProcessLock(); - - /* Sanity checks */ - ASSERT(CsrThread->Flags & CsrThreadTerminated); // CSR_THREAD_DESTROYED in ASSERT - ASSERT(CsrThread->ReferenceCount != 0); - - /* Increment reference count */ - CsrThread->ReferenceCount++; - - /* Release the lock */ - CsrReleaseProcessLock(); -} - -/*++ - * @name CsrUnlockThread - * @implemented NT4 - * - * The CsrUnlockThread undoes a previous CsrLockThreadByClientId operation. - * - * @param CsrThread - * Pointer to a previously locked CSR Thread. - * - * @return STATUS_SUCCESS. - * - * @remarks This routine must be called with the Process Lock held. - * - *--*/ -NTSTATUS -NTAPI -CsrUnlockThread(PCSR_THREAD CsrThread) -{ - /* Dereference the Thread */ - ASSERT(ProcessStructureListLocked()); - CsrLockedDereferenceThread(CsrThread); - - /* Release the lock and return */ - CsrReleaseProcessLock(); - return STATUS_SUCCESS; -} - -/* EOF */ diff --git a/deprecated/csr/csrsrv/wait.c b/deprecated/csr/csrsrv/wait.c deleted file mode 100644 index 00d0bdf3108..00000000000 --- a/deprecated/csr/csrsrv/wait.c +++ /dev/null @@ -1,449 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS CSR Sub System - * FILE: subsys/csr/csrsrv/wait.c - * PURPOSE: CSR Server DLL Wait Implementation - * PROGRAMMERS: Emanuele Aliberti - * Alex Ionescu (alex@relsoft.net) - */ - -/* INCLUDES ******************************************************************/ - -#include "srv.h" - -#define NDEBUG -#include - -/* DATA **********************************************************************/ - -RTL_CRITICAL_SECTION CsrWaitListsLock; - -/* PRIVATE FUNCTIONS *********************************************************/ - -/*++ - * @name CsrInitializeWait - * - * The CsrInitializeWait routine initializes a CSR Wait Object. - * - * @param WaitFunction - * Pointer to the function that will handle this wait. - * - * @param CsrWaitThread - * Pointer to the CSR Thread that will perform the wait. - * - * @param WaitApiMessage - * Pointer to the CSR API Message associated to this wait. - * - * @param WaitContext - * Pointer to a user-defined parameter associated to this wait. - * - * @param NewWaitBlock - * Pointed to the initialized CSR Wait Block for this wait. - * - * @return TRUE in case of success, FALSE othwerwise. - * - * @remarks None. - * - *--*/ -BOOLEAN -NTAPI -CsrInitializeWait(IN CSR_WAIT_FUNCTION WaitFunction, - IN PCSR_THREAD CsrWaitThread, - IN OUT PCSR_API_MESSAGE WaitApiMessage, - IN PVOID WaitContext, - OUT PCSR_WAIT_BLOCK *NewWaitBlock) -{ - ULONG Size; - PCSR_WAIT_BLOCK WaitBlock; - - /* Calculate the size of the wait block */ - Size = sizeof(CSR_WAIT_BLOCK) - - sizeof(WaitBlock->WaitApiMessage) + - WaitApiMessage->Header.u1.s1.TotalLength; - - /* Allocate the Wait Block */ - WaitBlock = RtlAllocateHeap(CsrHeap, 0, Size); - if (!WaitBlock) - { - /* Fail */ - WaitApiMessage->Status = STATUS_NO_MEMORY; - return FALSE; - } - - /* Initialize it */ - WaitBlock->Size = Size; - WaitBlock->WaitThread = CsrWaitThread; - WaitBlock->WaitContext = WaitContext; - WaitBlock->WaitFunction = WaitFunction; - WaitBlock->UserWaitList.Flink = NULL; - WaitBlock->UserWaitList.Blink = NULL; - WaitBlock->WaitList = WaitBlock->UserWaitList; - - /* Copy the message */ - RtlMoveMemory(&WaitBlock->WaitApiMessage, - WaitApiMessage, - WaitApiMessage->Header.u1.s1.TotalLength); - - /* Return the block */ - *NewWaitBlock = WaitBlock; - return TRUE; -} - -/*++ - * @name CsrNotifyWaitBlock - * - * The CsrNotifyWaitBlock routine calls the wait function for a registered - * CSR Wait Block, and replies to the attached CSR API Message, if any. - * - * @param WaitBlock - * Pointer to the CSR Wait Block - * - * @param WaitList - * Pointer to the wait list for this wait. - * - * @param WaitArgument[1-2] - * User-defined values to pass to the wait function. - * - * @param WaitFlags - * Wait flags for this wait. - * - * @param DereferenceThread - * Specifies whether the CSR Thread should be dereferenced at the - * end of this wait. - * - * @return TRUE in case of success, FALSE otherwise. - * - * @remarks After a wait block is notified, the wait function becomes invalid. - * - *--*/ -BOOLEAN -NTAPI -CsrNotifyWaitBlock(IN PCSR_WAIT_BLOCK WaitBlock, - IN PLIST_ENTRY WaitList, - IN PVOID WaitArgument1, - IN PVOID WaitArgument2, - IN ULONG WaitFlags, - IN BOOLEAN DereferenceThread) -{ - /* Call the wait function */ - if ((WaitBlock->WaitFunction)(WaitList, - WaitBlock->WaitThread, - &WaitBlock->WaitApiMessage, - WaitBlock->WaitContext, - WaitArgument1, - WaitArgument2, - WaitFlags)) - { - /* The wait is done, clear the block */ - WaitBlock->WaitThread->WaitBlock = NULL; - - /* Check for captured arguments */ - if (WaitBlock->WaitApiMessage.CsrCaptureData) - { - /* Release them */ - CsrReleaseCapturedArguments(&WaitBlock->WaitApiMessage); - } - - /* Reply to the port */ - NtReplyPort(WaitBlock->WaitThread->Process->ClientPort, - (PPORT_MESSAGE)&WaitBlock->WaitApiMessage); - - /* Check if we should dereference the thread */ - if (DereferenceThread) - { - /* Remove it from the Wait List */ - if (WaitBlock->WaitList.Flink) - { - RemoveEntryList(&WaitBlock->WaitList); - } - - /* Remove it from the User Wait List */ - if (WaitBlock->UserWaitList.Flink) - { - RemoveEntryList(&WaitBlock->UserWaitList); - } - - /* Dereference teh thread */ - CsrDereferenceThread(WaitBlock->WaitThread); - - /* Free the wait block */ - RtlFreeHeap(CsrHeap, 0, WaitBlock); - } - else - { - /* The wait is complete, but the thread is being kept alive */ - WaitBlock->WaitFunction = NULL; - } - - /* The wait suceeded */ - return TRUE; - } - - /* The wait failed */ - return FALSE; -} - -/* PUBLIC FUNCTIONS **********************************************************/ - -/*++ - * @name CsrCreateWait - * @implemented NT4 - * - * The CsrCreateWait routine creates a CSR Wait. - * - * @param WaitList - * Pointer to a list entry of the waits to associate. - * - * @param WaitFunction - * Pointer to the function that will handle this wait. - * - * @param CsrWaitThread - * Pointer to the CSR Thread that will perform the wait. - * - * @param WaitApiMessage - * Pointer to the CSR API Message associated to this wait. - * - * @param WaitContext - * Pointer to a user-defined parameter associated to this wait. - * - * @param UserWaitList - * Pointer to a list entry of the user-defined waits to associate. - * - * @return TRUE in case of success, FALSE otherwise. - * - * @remarks None. - * - *--*/ -BOOLEAN -NTAPI -CsrCreateWait(IN PLIST_ENTRY WaitList, - IN CSR_WAIT_FUNCTION WaitFunction, - IN PCSR_THREAD CsrWaitThread, - IN OUT PCSR_API_MESSAGE WaitApiMessage, - IN PVOID WaitContext, - IN PLIST_ENTRY UserWaitList OPTIONAL) -{ - PCSR_WAIT_BLOCK WaitBlock; - - /* Initialize the wait */ - if (!CsrInitializeWait(WaitFunction, - CsrWaitThread, - WaitApiMessage, - WaitContext, - &WaitBlock)) - { - return FALSE; - } - - /* Acquire the Wait Lock */ - CsrAcquireWaitLock(); - - /* Make sure the thread wasn't destroyed */ - if (CsrWaitThread->Flags & CsrThreadTerminated) - { - /* Fail the wait */ - RtlFreeHeap(CsrHeap, 0, WaitBlock); - CsrReleaseWaitLock(); - return FALSE; - } - - /* Insert the wait in the queue */ - InsertTailList(WaitList, &WaitBlock->WaitList); - - /* Insert the User Wait too, if one was given */ - if (UserWaitList) InsertTailList(UserWaitList, &WaitBlock->UserWaitList); - - /* Return */ - CsrReleaseWaitLock(); - return TRUE; -} - -/*++ - * @name CsrDereferenceWait - * @implemented NT4 - * - * The CsrDereferenceWait routine derefences a CSR Wait Block. - * - * @param WaitList - * Pointer to the Wait List associated to the wait. - - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -CsrDereferenceWait(IN PLIST_ENTRY WaitList) -{ - PLIST_ENTRY NextEntry; - PCSR_WAIT_BLOCK WaitBlock; - - /* Acquire the Process and Wait Locks */ - CsrAcquireProcessLock(); - CsrAcquireWaitLock(); - - /* Set the list pointers */ - NextEntry = WaitList->Flink; - - /* Start the loop */ - while (NextEntry != WaitList) - { - /* Get the wait block */ - WaitBlock = CONTAINING_RECORD(NextEntry, CSR_WAIT_BLOCK, WaitList); - - /* Move to the next entry */ - NextEntry = NextEntry->Flink; - - /* Check if there's no Wait Routine */ - if (!WaitBlock->WaitFunction) - { - /* Remove it from the Wait List */ - if (WaitBlock->WaitList.Flink) - { - RemoveEntryList(&WaitBlock->WaitList); - } - - /* Remove it from the User Wait List */ - if (WaitBlock->UserWaitList.Flink) - { - RemoveEntryList(&WaitBlock->UserWaitList); - } - - /* Dereference the thread waiting on it */ - CsrDereferenceThread(WaitBlock->WaitThread); - - /* Free the block */ - RtlFreeHeap(CsrHeap, 0, WaitBlock); - } - } - - /* Release the locks */ - CsrReleaseWaitLock(); - CsrReleaseProcessLock(); -} - -/*++ - * @name CsrMoveSatisfiedWait - * @implemented NT5 - * - * The CsrMoveSatisfiedWait routine moves satisfied waits from a wait list - * to another list entry. - * - * @param NewEntry - * Pointer to a list entry where the satisfied waits will be added. - * - * @param WaitList - * Pointer to a list entry to analyze for satisfied waits. - * - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -CsrMoveSatisfiedWait(IN PLIST_ENTRY NewEntry, - IN PLIST_ENTRY WaitList) -{ - PLIST_ENTRY NextEntry; - PCSR_WAIT_BLOCK WaitBlock; - - /* Acquire the Wait Lock */ - CsrAcquireWaitLock(); - - /* Set the List pointers */ - NextEntry = WaitList->Flink; - - /* Start looping */ - while (NextEntry != WaitList) - { - /* Get the Wait block */ - WaitBlock = CONTAINING_RECORD(NextEntry, CSR_WAIT_BLOCK, WaitList); - - /* Go to the next entry */ - NextEntry = NextEntry->Flink; - - /* Check if there is a Wait Callback */ - if (WaitBlock->WaitFunction) - { - /* Remove it from the Wait Block Queue */ - RemoveEntryList(&WaitBlock->WaitList); - - /* Insert the new entry */ - InsertTailList(&WaitBlock->WaitList, NewEntry); - } - } - - /* Release the wait lock */ - CsrReleaseWaitLock(); -} - -/*++ - * @name CsrNotifyWait - * @implemented NT4 - * - * The CsrNotifyWait notifies a CSR Wait Block. - * - * @param WaitList - * Pointer to the list entry for this wait. - * - * @param WaitType - * Type of the wait to perform, either WaitAny or WaitAll. - * - * @param WaitArgument[1-2] - * User-defined argument to pass on to the wait function. - * - * @return TRUE in case of success, FALSE othwerwise. - * - * @remarks None. - * - *--*/ -BOOLEAN -NTAPI -CsrNotifyWait(IN PLIST_ENTRY WaitList, - IN ULONG WaitType, - IN PVOID WaitArgument1, - IN PVOID WaitArgument2) -{ - PLIST_ENTRY NextEntry; - PCSR_WAIT_BLOCK WaitBlock; - BOOLEAN NotifySuccess = FALSE; - - /* Acquire the Wait Lock */ - CsrAcquireWaitLock(); - - /* Set the List pointers */ - NextEntry = WaitList->Flink; - - /* Start looping */ - while (NextEntry != WaitList) - { - /* Get the Wait block */ - WaitBlock = CONTAINING_RECORD(NextEntry, CSR_WAIT_BLOCK, WaitList); - - /* Go to the next entry */ - NextEntry = NextEntry->Flink; - - /* Check if there is a Wait Callback */ - if (WaitBlock->WaitFunction) - { - /* Notify the Waiter */ - NotifySuccess |= CsrNotifyWaitBlock(WaitBlock, - WaitList, - WaitArgument1, - WaitArgument2, - 0, - FALSE); - - /* We've already done a wait, so leave unless this is a Wait All */ - if (WaitType != WaitAll) break; - } - } - - /* Release the wait lock and return */ - CsrReleaseWaitLock(); - return NotifySuccess; -} - -/* EOF */ diff --git a/deprecated/csr/main.c b/deprecated/csr/main.c deleted file mode 100644 index 301ff50084e..00000000000 --- a/deprecated/csr/main.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS CSR Sub System - * FILE: subsys/csr/csrss.c - * PURPOSE: CSR Executable - * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) - */ - -/* INCLUDES ******************************************************************/ - -#define WIN32_NO_STATUS -#include -#define NTOS_MODE_USER -#include -#include - -#define NDEBUG -#include - -/* PRIVATE FUNCTIONS *********************************************************/ - -VOID -NTAPI -CsrpSetDefaultProcessHardErrorMode (VOID) -{ - ULONG DefaultHardErrorMode = 0; - - /* Disable hard errors */ - NtSetInformationProcess(NtCurrentProcess(), - ProcessDefaultHardErrorMode, - &DefaultHardErrorMode, - sizeof(DefaultHardErrorMode)); -} - -/* - * Note: Standard entrypoint for Native C Programs. - * The OS backend (NtProcessStartup) which calls this routine is - * implemented in a CRT-like static library (much like mainCRTStartup). - * Do NOT manually add the NtProcessStartup entrypoint or anything else. - */ -int -_cdecl -_main(int argc, - char *argv[], - char *envp[], - int DebugFlag) -{ - KPRIORITY BasePriority = (8 + 1) + 4; - NTSTATUS Status; - ULONG Response; - UNREFERENCED_PARAMETER(envp); - UNREFERENCED_PARAMETER(DebugFlag); - - /* Set the Priority */ - NtSetInformationProcess(NtCurrentProcess(), - ProcessBasePriority, - &BasePriority, - sizeof(KPRIORITY)); - - /* Give us IOPL so that we can access the VGA registers */ - Status = NtSetInformationProcess(NtCurrentProcess(), - ProcessUserModeIOPL, - NULL, - 0); - if (!NT_SUCCESS(Status)) - { - /* Raise a hard error */ - DPRINT1("CSRSS: Could not raise IOPL: %x\n", Status); - Status = NtRaiseHardError(STATUS_IO_PRIVILEGE_FAILED, - 0, - 0, - NULL, - OptionOk, - &Response); - } - - /* Initialize CSR through CSRSRV */ - Status = CsrServerInitialization(argc, argv); - if (!NT_SUCCESS(Status)) - { - /* Kill us */ - DPRINT1("CSRSS: CsrServerInitialization failed:% lx\n", Status); - NtTerminateProcess(NtCurrentProcess(), Status); - } - - /* Disable errors */ - CsrpSetDefaultProcessHardErrorMode(); - - /* If this is Session 0, make sure killing us bugchecks the system */ - if (!NtCurrentPeb()->SessionId) RtlSetProcessIsCritical(TRUE, NULL, FALSE); - - /* Kill this thread. CSRSRV keeps us going */ - NtTerminateThread(NtCurrentThread(), Status); - return 0; -} - -/* EOF */ diff --git a/deprecated/csrsrv/CMakeLists.txt b/deprecated/csrsrv/CMakeLists.txt deleted file mode 100644 index 0fabebe4bc0..00000000000 --- a/deprecated/csrsrv/CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ - -include_directories(${REACTOS_SOURCE_DIR}/subsystems/win32/csrss/include) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys) - -spec2def(csrsrv.dll csrsrv.spec ADD_IMPORTLIB) - -list(APPEND SOURCE - api/process.c - api/user.c - api/wapi.c - procsup.c - thredsup.c - init.c - wait.c - session.c - server.c - ${CMAKE_CURRENT_BINARY_DIR}/csrsrv.def) - -add_library(csrsrv SHARED ${SOURCE}) - -target_link_libraries(csrsrv ${PSEH_LIB} smlib) - -set_module_type(csrsrv nativedll) - -add_importlibs(csrsrv ntdll smdll) - -add_pch(csrsrv srv.h) - -add_dependencies(csrsrv psdk bugcodes) -add_cd_file(TARGET csrsrv DESTINATION reactos/system32 FOR all) - diff --git a/deprecated/csrsrv/api/process.c b/deprecated/csrsrv/api/process.c deleted file mode 100644 index 2493481ce99..00000000000 --- a/deprecated/csrsrv/api/process.c +++ /dev/null @@ -1,229 +0,0 @@ -/* - * subsystems/win32/csrss/csrsrv/api/process.c - * - * "\windows\ApiPort" port process management functions - * - * ReactOS Operating System - */ - -/* INCLUDES ******************************************************************/ - -#include - -#define NDEBUG -#include - -extern NTSTATUS CallProcessCreated(PCSR_PROCESS, PCSR_PROCESS); - -/* GLOBALS *******************************************************************/ - -/* FUNCTIONS *****************************************************************/ - -/********************************************************************** - * CSRSS API - *********************************************************************/ - -CSR_API(CsrSrvCreateProcess) -{ - NTSTATUS Status; - HANDLE ProcessHandle, ThreadHandle; - PCSR_THREAD CsrThread; - PCSR_PROCESS NewProcessData; - ULONG Flags, VdmPower = 0, DebugFlags = 0; - - /* Get the current client thread */ - CsrThread = NtCurrentTeb()->CsrClientThread; - ASSERT(CsrThread != NULL); - - /* Extract the flags out of the process handle */ - Flags = (ULONG_PTR)Request->Data.CreateProcessRequest.ProcessHandle & 3; - Request->Data.CreateProcessRequest.ProcessHandle = (HANDLE)((ULONG_PTR)Request->Data.CreateProcessRequest.ProcessHandle & ~3); - - /* Duplicate the process handle */ - Status = NtDuplicateObject(CsrThread->Process->ProcessHandle, - Request->Data.CreateProcessRequest.ProcessHandle, - NtCurrentProcess(), - &ProcessHandle, - 0, - 0, - DUPLICATE_SAME_ACCESS); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to duplicate process handle\n"); - return Status; - } - - /* Duplicate the thread handle */ - Status = NtDuplicateObject(CsrThread->Process->ProcessHandle, - Request->Data.CreateProcessRequest.ThreadHandle, - NtCurrentProcess(), - &ThreadHandle, - 0, - 0, - DUPLICATE_SAME_ACCESS); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to duplicate process handle\n"); - NtClose(ProcessHandle); - return Status; - } - - /* See if this is a VDM process */ - if (VdmPower) - { - /* Request VDM powers */ - Status = NtSetInformationProcess(ProcessHandle, - ProcessWx86Information, - &VdmPower, - sizeof(VdmPower)); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to get VDM powers\n"); - NtClose(ProcessHandle); - NtClose(ThreadHandle); - return Status; - } - } - - /* Convert some flags. FIXME: More need conversion */ - if (Request->Data.CreateProcessRequest.CreationFlags & CREATE_NEW_PROCESS_GROUP) - { - DebugFlags |= CsrProcessCreateNewGroup; - } - - /* FIXME: SxS Stuff */ - - /* Call CSRSRV to create the CSR_PROCESS structure and the first CSR_THREAD */ - Status = CsrCreateProcess(ProcessHandle, - ThreadHandle, - &Request->Data.CreateProcessRequest.ClientId, - CsrThread->Process->NtSession, - DebugFlags, - NULL); - if (Status == STATUS_THREAD_IS_TERMINATING) - { - DPRINT1("Thread already dead\n"); - return Status; - } - - /* Check for other failures */ - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to create process/thread structures: %lx\n", Status); - return Status; - } - - /* FIXME: Should notify user32 */ - - /* FIXME: VDM vodoo */ - - /* ReactOS Compatibility */ - Status = CsrLockProcessByClientId(Request->Data.CreateProcessRequest.ClientId.UniqueProcess, &NewProcessData); - ASSERT(Status == STATUS_SUCCESS); - if (!(Request->Data.CreateProcessRequest.CreationFlags & (CREATE_NEW_CONSOLE | DETACHED_PROCESS))) - { - NewProcessData->ParentConsole = ProcessData->Console; - NewProcessData->bInheritHandles = Request->Data.CreateProcessRequest.bInheritHandles; - } - RtlInitializeCriticalSection(&NewProcessData->HandleTableLock); - CallProcessCreated(ProcessData, NewProcessData); - CsrUnlockProcess(NewProcessData); - - /* Return the result of this operation */ - return Status; -} - -CSR_API(CsrSrvCreateThread) -{ - PCSR_THREAD CurrentThread; - HANDLE ThreadHandle; - NTSTATUS Status; - PCSR_PROCESS CsrProcess; - - /* Get the current CSR thread */ - CurrentThread = NtCurrentTeb()->CsrClientThread; - if (!CurrentThread) - { - DPRINT1("Server Thread TID: [%lx.%lx]\n", - Request->Data.CreateThreadRequest.ClientId.UniqueProcess, - Request->Data.CreateThreadRequest.ClientId.UniqueThread); - return STATUS_SUCCESS; // server-to-server - } - - /* Get the CSR Process for this request */ - CsrProcess = CurrentThread->Process; - if (CsrProcess->ClientId.UniqueProcess != - Request->Data.CreateThreadRequest.ClientId.UniqueProcess) - { - /* This is a remote thread request -- is it within the server itself? */ - if (Request->Data.CreateThreadRequest.ClientId.UniqueProcess == NtCurrentTeb()->ClientId.UniqueProcess) - { - /* Accept this without any further work */ - return STATUS_SUCCESS; - } - - /* Get the real CSR Process for the remote thread's process */ - Status = CsrLockProcessByClientId(Request->Data.CreateThreadRequest.ClientId.UniqueProcess, - &CsrProcess); - if (!NT_SUCCESS(Status)) return Status; - } - - /* Duplicate the thread handle so we can own it */ - Status = NtDuplicateObject(CurrentThread->Process->ProcessHandle, - Request->Data.CreateThreadRequest.ThreadHandle, - NtCurrentProcess(), - &ThreadHandle, - 0, - 0, - DUPLICATE_SAME_ACCESS); - if (NT_SUCCESS(Status)) - { - /* Call CSRSRV to tell it about the new thread */ - Status = CsrCreateThread(CsrProcess, - ThreadHandle, - &Request->Data.CreateThreadRequest.ClientId); - } - - /* Unlock the process and return */ - if (CsrProcess != CurrentThread->Process) CsrUnlockProcess(CsrProcess); - return Status; -} - -CSR_API(CsrTerminateProcess) -{ - PCSR_THREAD CsrThread = NtCurrentTeb()->CsrClientThread; - ASSERT(CsrThread != NULL); - - /* Set magic flag so we don't reply this message back */ - Request->Type = 0xBABE; - - /* Remove the CSR_THREADs and CSR_PROCESS */ - return CsrDestroyProcess(&CsrThread->ClientId, - (NTSTATUS)Request->Data.TerminateProcessRequest.uExitCode); -} - -CSR_API(CsrConnectProcess) -{ - - return(STATUS_SUCCESS); -} - -CSR_API(CsrGetShutdownParameters) -{ - - Request->Data.GetShutdownParametersRequest.Level = ProcessData->ShutdownLevel; - Request->Data.GetShutdownParametersRequest.Flags = ProcessData->ShutdownFlags; - - return(STATUS_SUCCESS); -} - -CSR_API(CsrSetShutdownParameters) -{ - - ProcessData->ShutdownLevel = Request->Data.SetShutdownParametersRequest.Level; - ProcessData->ShutdownFlags = Request->Data.SetShutdownParametersRequest.Flags; - - return(STATUS_SUCCESS); -} - -/* EOF */ diff --git a/deprecated/csrsrv/api/user.c b/deprecated/csrsrv/api/user.c deleted file mode 100644 index 9ce9da0174d..00000000000 --- a/deprecated/csrsrv/api/user.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * subsystems/win32/csrss/csrsrv/api/user.c - * - * User functions - * - * ReactOS Operating System - * - * PROGRAMMER: Eric Kohl - */ - -/* INCLUDES ******************************************************************/ - -#include - -#define NDEBUG -#include - -/* GLOBALS *******************************************************************/ - -static BOOLEAN ServicesProcessIdValid = FALSE; -static ULONG_PTR ServicesProcessId; - - -/* FUNCTIONS *****************************************************************/ - -CSR_API(CsrRegisterServicesProcess) -{ - if (ServicesProcessIdValid == TRUE) - { - /* Only accept a single call */ - return STATUS_INVALID_PARAMETER; - } - else - { - ServicesProcessId = (ULONG_PTR)Request->Data.RegisterServicesProcessRequest.ProcessId; - ServicesProcessIdValid = TRUE; - return STATUS_SUCCESS; - } -} - -/* EOF */ diff --git a/deprecated/csrsrv/api/wapi.c b/deprecated/csrsrv/api/wapi.c deleted file mode 100644 index af4f764a9e6..00000000000 --- a/deprecated/csrsrv/api/wapi.c +++ /dev/null @@ -1,1400 +0,0 @@ -/* - * subsystems/win32/csrss/csrsrv/api/wapi.c - * - * CSRSS port message processing - * - * ReactOS Operating System - * - */ - -/* INCLUDES ******************************************************************/ - -#include - -#define NDEBUG -#include - -/* GLOBALS *******************************************************************/ - -static unsigned ApiDefinitionsCount = 0; -static PCSRSS_API_DEFINITION ApiDefinitions = NULL; -UNICODE_STRING CsrApiPortName; -volatile LONG CsrpStaticThreadCount; -volatile LONG CsrpDynamicThreadTotal; -extern ULONG CsrMaxApiRequestThreads; - -/* FUNCTIONS *****************************************************************/ - -NTSTATUS FASTCALL -CsrApiRegisterDefinitions(PCSRSS_API_DEFINITION NewDefinitions) -{ - unsigned NewCount; - PCSRSS_API_DEFINITION Scan; - PCSRSS_API_DEFINITION New; - - DPRINT("CSR: %s called\n", __FUNCTION__); - - NewCount = 0; - for (Scan = NewDefinitions; 0 != Scan->Handler; Scan++) - { - NewCount++; - } - - New = RtlAllocateHeap(CsrHeap, 0, - (ApiDefinitionsCount + NewCount) - * sizeof(CSRSS_API_DEFINITION)); - if (NULL == New) - { - DPRINT1("Unable to allocate memory\n"); - return STATUS_NO_MEMORY; - } - if (0 != ApiDefinitionsCount) - { - RtlCopyMemory(New, ApiDefinitions, - ApiDefinitionsCount * sizeof(CSRSS_API_DEFINITION)); - RtlFreeHeap(CsrHeap, 0, ApiDefinitions); - } - RtlCopyMemory(New + ApiDefinitionsCount, NewDefinitions, - NewCount * sizeof(CSRSS_API_DEFINITION)); - ApiDefinitions = New; - ApiDefinitionsCount += NewCount; - - return STATUS_SUCCESS; -} - -VOID -FASTCALL -CsrApiCallHandler(PCSR_PROCESS ProcessData, - PCSR_API_MESSAGE Request) -{ - unsigned DefIndex; - ULONG Type; - - DPRINT("CSR: Calling handler for type: %x.\n", Request->Type); - Type = Request->Type & 0xFFFF; /* FIXME: USE MACRO */ - DPRINT("CSR: API Number: %x ServerID: %x\n",Type, Request->Type >> 16); - - /* FIXME: Extract DefIndex instead of looping */ - for (DefIndex = 0; DefIndex < ApiDefinitionsCount; DefIndex++) - { - if (ApiDefinitions[DefIndex].Type == Type) - { - if (Request->Header.u1.s1.DataLength < ApiDefinitions[DefIndex].MinRequestSize) - { - DPRINT1("Request type %d min request size %d actual %d\n", - Type, ApiDefinitions[DefIndex].MinRequestSize, - Request->Header.u1.s1.DataLength); - Request->Status = STATUS_INVALID_PARAMETER; - } - else - { - Request->Status = (ApiDefinitions[DefIndex].Handler)(ProcessData, Request); - } - return; - } - } - DPRINT1("CSR: Unknown request type 0x%x\n", Request->Type); - Request->Status = STATUS_INVALID_SYSTEM_SERVICE; -} - -VOID -CallHardError(IN PCSR_THREAD ThreadData, - IN PHARDERROR_MSG HardErrorMessage); - -static -VOID -NTAPI -CsrHandleHardError(IN PCSR_THREAD ThreadData, - IN OUT PHARDERROR_MSG Message) -{ - DPRINT1("CSR: received hard error %lx\n", Message->Status); - - /* Call the hard error handler in win32csr */ - CallHardError(ThreadData, Message); -} - -/*++ - * @name CsrCallServerFromServer - * @implemented NT4 - * - * The CsrCallServerFromServer routine calls a CSR API from within a server. - * It avoids using LPC messages since the request isn't coming from a client. - * - * @param ReceiveMsg - * Pointer to the CSR API Message to send to the server. - * - * @param ReplyMsg - * Pointer to the CSR API Message to receive from the server. - * - * @return STATUS_SUCCESS in case of success, STATUS_ILLEGAL_FUNCTION - * if the opcode is invalid, or STATUS_ACCESS_VIOLATION if there - * was a problem executing the API. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrCallServerFromServer(PCSR_API_MESSAGE ReceiveMsg, - PCSR_API_MESSAGE ReplyMsg) -{ -#if 0 // real code - ULONG ServerId; - PCSR_SERVER_DLL ServerDll; - ULONG ApiId; - ULONG Reply; - NTSTATUS Status; - - /* Get the Server ID */ - ServerId = CSR_SERVER_ID_FROM_OPCODE(ReceiveMsg->Opcode); - - /* Make sure that the ID is within limits, and the Server DLL loaded */ - if ((ServerId >= CSR_SERVER_DLL_MAX) || - (!(ServerDll = CsrLoadedServerDll[ServerId]))) - { - /* We are beyond the Maximum Server ID */ - DPRINT1("CSRSS: %lx is invalid ServerDllIndex (%08x)\n", ServerId, ServerDll); - ReplyMsg->Status = (ULONG)STATUS_ILLEGAL_FUNCTION; - return STATUS_ILLEGAL_FUNCTION; - } - else - { - /* Get the API ID */ - ApiId = CSR_API_ID_FROM_OPCODE(ReceiveMsg->Opcode); - - /* Normalize it with our Base ID */ - ApiId -= ServerDll->ApiBase; - - /* Make sure that the ID is within limits, and the entry exists */ - if ((ApiId >= ServerDll->HighestApiSupported) || - ((ServerDll->ValidTable) && !(ServerDll->ValidTable[ApiId]))) - { - /* We are beyond the Maximum API ID, or it doesn't exist */ - DPRINT1("CSRSS: %lx (%s) is invalid ApiTableIndex for %Z or is an " - "invalid API to call from the server.\n", - ServerDll->ValidTable[ApiId], - ((ServerDll->NameTable) && (ServerDll->NameTable[ApiId])) ? - ServerDll->NameTable[ApiId] : "*** UNKNOWN ***", &ServerDll->Name); - DbgBreakPoint(); - ReplyMsg->Status = (ULONG)STATUS_ILLEGAL_FUNCTION; - return STATUS_ILLEGAL_FUNCTION; - } - } - - if (CsrDebug & 2) - { - DPRINT1("CSRSS: %s Api Request received from server process\n", - ServerDll->NameTable[ApiId]); - } - - /* Validation complete, start SEH */ - _SEH2_TRY - { - /* Call the API and get the result */ - Status = (ServerDll->DispatchTable[ApiId])(ReceiveMsg, &Reply); - - /* Return the result, no matter what it is */ - ReplyMsg->Status = Status; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - /* If we got an exception, return access violation */ - ReplyMsg->Status = STATUS_ACCESS_VIOLATION; - } - _SEH2_END; - - /* Return success */ - return STATUS_SUCCESS; - -#else // Hacky reactos code - - PCSR_PROCESS ProcessData; - - /* Get the Process Data */ - CsrLockProcessByClientId(&ReceiveMsg->Header.ClientId.UniqueProcess, &ProcessData); - if (!ProcessData) - { - DPRINT1("Message: Unable to find data for process 0x%x\n", - ReceiveMsg->Header.ClientId.UniqueProcess); - return STATUS_NOT_SUPPORTED; - } - - /* Validation complete, start SEH */ - _SEH2_TRY - { - /* Call the API and get the result */ - CsrApiCallHandler(ProcessData, ReplyMsg); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - /* If we got an exception, return access violation */ - ReplyMsg->Status = STATUS_ACCESS_VIOLATION; - } - _SEH2_END; - - /* Release the process reference */ - CsrUnlockProcess(ProcessData); - - /* Return success */ - return STATUS_SUCCESS; -#endif -} - -/*++ - * @name CsrApiPortInitialize - * - * The CsrApiPortInitialize routine initializes the LPC Port used for - * communications with the Client/Server Runtime (CSR) and initializes the - * static thread that will handle connection requests and APIs. - * - * @param None - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * otherwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrApiPortInitialize(VOID) -{ - ULONG Size; - OBJECT_ATTRIBUTES ObjectAttributes; - NTSTATUS Status; - HANDLE hRequestEvent, hThread; - CLIENT_ID ClientId; - PLIST_ENTRY ListHead, NextEntry; - PCSR_THREAD ServerThread; - - /* Calculate how much space we'll need for the Port Name */ - Size = CsrDirectoryName.Length + sizeof(CSR_PORT_NAME) + sizeof(WCHAR); - - /* Create the buffer for it */ - CsrApiPortName.Buffer = RtlAllocateHeap(CsrHeap, 0, Size); - if (!CsrApiPortName.Buffer) return STATUS_NO_MEMORY; - - /* Setup the rest of the empty string */ - CsrApiPortName.Length = 0; - CsrApiPortName.MaximumLength = (USHORT)Size; - RtlAppendUnicodeStringToString(&CsrApiPortName, &CsrDirectoryName); - RtlAppendUnicodeToString(&CsrApiPortName, UNICODE_PATH_SEP); - RtlAppendUnicodeToString(&CsrApiPortName, CSR_PORT_NAME); - if (CsrDebug & 1) - { - DPRINT1("CSRSS: Creating %wZ port and associated threads\n", &CsrApiPortName); - DPRINT1("CSRSS: sizeof( CONNECTINFO ) == %ld sizeof( API_MSG ) == %ld\n", - sizeof(CSR_CONNECTION_INFO), sizeof(CSR_API_MESSAGE)); - } - - /* FIXME: Create a Security Descriptor */ - - /* Initialize the Attributes */ - InitializeObjectAttributes(&ObjectAttributes, - &CsrApiPortName, - 0, - NULL, - NULL /* FIXME*/); - - /* Create the Port Object */ - Status = NtCreatePort(&CsrApiPort, - &ObjectAttributes, - LPC_MAX_DATA_LENGTH, // hack ; sizeof(CSR_CONNECTION_INFO), - LPC_MAX_MESSAGE_LENGTH, // hack ; sizeof(CSR_API_MESSAGE), - 16 * PAGE_SIZE); - if (NT_SUCCESS(Status)) - { - /* Create the event the Port Thread will use */ - Status = NtCreateEvent(&hRequestEvent, - EVENT_ALL_ACCESS, - NULL, - SynchronizationEvent, - FALSE); - if (NT_SUCCESS(Status)) - { - /* Create the Request Thread */ - Status = RtlCreateUserThread(NtCurrentProcess(), - NULL, - TRUE, - 0, - 0, - 0, - (PVOID)ClientConnectionThread,//CsrApiRequestThread, - (PVOID)hRequestEvent, - &hThread, - &ClientId); - if (NT_SUCCESS(Status)) - { - /* Add this as a static thread to CSRSRV */ - CsrAddStaticServerThread(hThread, &ClientId, CsrThreadIsServerThread); - - /* Get the Thread List Pointers */ - ListHead = &CsrRootProcess->ThreadList; - NextEntry = ListHead->Flink; - - /* Start looping the list */ - while (NextEntry != ListHead) - { - /* Get the Thread */ - ServerThread = CONTAINING_RECORD(NextEntry, CSR_THREAD, Link); - - /* Start it up */ - Status = NtResumeThread(ServerThread->ThreadHandle, NULL); - - /* Is this a Server Thread? */ - if (ServerThread->Flags & CsrThreadIsServerThread) - { - /* If so, then wait for it to initialize */ - Status = NtWaitForSingleObject(hRequestEvent, FALSE, NULL); - ASSERT(NT_SUCCESS(Status)); - } - - /* Next thread */ - NextEntry = NextEntry->Flink; - } - - /* We don't need this anymore */ - NtClose(hRequestEvent); - } - } - } - - /* Return */ - return Status; -} - -PBASE_STATIC_SERVER_DATA BaseStaticServerData; - -NTSTATUS -NTAPI -CreateBaseAcls(OUT PACL* Dacl, - OUT PACL* RestrictedDacl) -{ - PSID SystemSid, WorldSid, RestrictedSid; - SID_IDENTIFIER_AUTHORITY NtAuthority = {SECURITY_NT_AUTHORITY}; - SID_IDENTIFIER_AUTHORITY WorldAuthority = {SECURITY_WORLD_SID_AUTHORITY}; - NTSTATUS Status; - UCHAR KeyValueBuffer[0x40]; - PKEY_VALUE_PARTIAL_INFORMATION KeyValuePartialInfo; - UNICODE_STRING KeyName; - ULONG ProtectionMode = 0; - ULONG AclLength, ResultLength; - HANDLE hKey; - OBJECT_ATTRIBUTES ObjectAttributes; - - /* Open the Session Manager Key */ - RtlInitUnicodeString(&KeyName, SM_REG_KEY); - InitializeObjectAttributes(&ObjectAttributes, - &KeyName, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - Status = NtOpenKey(&hKey, KEY_READ, &ObjectAttributes); - if (NT_SUCCESS(Status)) - { - /* Read the key value */ - RtlInitUnicodeString(&KeyName, L"ProtectionMode"); - Status = NtQueryValueKey(hKey, - &KeyName, - KeyValuePartialInformation, - KeyValueBuffer, - sizeof(KeyValueBuffer), - &ResultLength); - - /* Make sure it's what we expect it to be */ - KeyValuePartialInfo = (PKEY_VALUE_PARTIAL_INFORMATION)KeyValueBuffer; - if ((NT_SUCCESS(Status)) && (KeyValuePartialInfo->Type == REG_DWORD) && - (*(PULONG)KeyValuePartialInfo->Data)) - { - /* Save the Protection Mode */ - ProtectionMode = *(PULONG)KeyValuePartialInfo->Data; - } - - /* Close the handle */ - NtClose(hKey); - } - - /* Allocate the System SID */ - Status = RtlAllocateAndInitializeSid(&NtAuthority, - 1, SECURITY_LOCAL_SYSTEM_RID, - 0, 0, 0, 0, 0, 0, 0, - &SystemSid); - ASSERT(NT_SUCCESS(Status)); - - /* Allocate the World SID */ - Status = RtlAllocateAndInitializeSid(&WorldAuthority, - 1, SECURITY_WORLD_RID, - 0, 0, 0, 0, 0, 0, 0, - &WorldSid); - ASSERT(NT_SUCCESS(Status)); - - /* Allocate the restricted SID */ - Status = RtlAllocateAndInitializeSid(&NtAuthority, - 1, SECURITY_RESTRICTED_CODE_RID, - 0, 0, 0, 0, 0, 0, 0, - &RestrictedSid); - ASSERT(NT_SUCCESS(Status)); - - /* Allocate one ACL with 3 ACEs each for one SID */ - AclLength = sizeof(ACL) + 3 * sizeof(ACCESS_ALLOWED_ACE) + - RtlLengthSid(SystemSid) + - RtlLengthSid(RestrictedSid) + - RtlLengthSid(WorldSid); - *Dacl = RtlAllocateHeap(CsrHeap, 0, AclLength); - ASSERT(*Dacl != NULL); - - /* Set the correct header fields */ - Status = RtlCreateAcl(*Dacl, AclLength, ACL_REVISION2); - ASSERT(NT_SUCCESS(Status)); - - /* Give the appropriate rights to each SID */ - /* FIXME: Should check SessionId/ProtectionMode */ - Status = RtlAddAccessAllowedAce(*Dacl, ACL_REVISION2, DIRECTORY_QUERY | DIRECTORY_TRAVERSE | DIRECTORY_CREATE_OBJECT | DIRECTORY_CREATE_SUBDIRECTORY | READ_CONTROL, WorldSid); - ASSERT(NT_SUCCESS(Status)); - Status = RtlAddAccessAllowedAce(*Dacl, ACL_REVISION2, DIRECTORY_ALL_ACCESS, SystemSid); - ASSERT(NT_SUCCESS(Status)); - Status = RtlAddAccessAllowedAce(*Dacl, ACL_REVISION2, DIRECTORY_TRAVERSE, RestrictedSid); - ASSERT(NT_SUCCESS(Status)); - - /* Now allocate the restricted DACL */ - *RestrictedDacl = RtlAllocateHeap(CsrHeap, 0, AclLength); - ASSERT(*RestrictedDacl != NULL); - - /* Initialize it */ - Status = RtlCreateAcl(*RestrictedDacl, AclLength, ACL_REVISION2); - ASSERT(NT_SUCCESS(Status)); - - /* And add the same ACEs as before */ - /* FIXME: Not really fully correct */ - Status = RtlAddAccessAllowedAce(*RestrictedDacl, ACL_REVISION2, DIRECTORY_QUERY | DIRECTORY_TRAVERSE | DIRECTORY_CREATE_OBJECT | DIRECTORY_CREATE_SUBDIRECTORY | READ_CONTROL, WorldSid); - ASSERT(NT_SUCCESS(Status)); - Status = RtlAddAccessAllowedAce(*RestrictedDacl, ACL_REVISION2, DIRECTORY_ALL_ACCESS, SystemSid); - ASSERT(NT_SUCCESS(Status)); - Status = RtlAddAccessAllowedAce(*RestrictedDacl, ACL_REVISION2, DIRECTORY_TRAVERSE, RestrictedSid); - ASSERT(NT_SUCCESS(Status)); - - /* The SIDs are captured, can free them now */ - RtlFreeHeap(CsrHeap, 0, SystemSid); - RtlFreeHeap(CsrHeap, 0, WorldSid); - RtlFreeHeap(CsrHeap, 0, RestrictedSid); - return Status; -} - -VOID -WINAPI -BasepFakeStaticServerData(VOID) -{ - NTSTATUS Status; - WCHAR Buffer[MAX_PATH]; - PWCHAR HeapBuffer; - UNICODE_STRING SystemRootString; - UNICODE_STRING UnexpandedSystemRootString = RTL_CONSTANT_STRING(L"%SystemRoot%"); - UNICODE_STRING BaseSrvCSDString; - UNICODE_STRING BaseSrvWindowsDirectory; - UNICODE_STRING BaseSrvWindowsSystemDirectory; - UNICODE_STRING BnoString; - OBJECT_ATTRIBUTES ObjectAttributes; - ULONG SessionId; - HANDLE BaseSrvNamedObjectDirectory; - HANDLE BaseSrvRestrictedObjectDirectory; - PACL BnoDacl, BnoRestrictedDacl; - PSECURITY_DESCRIPTOR BnoSd; - HANDLE SymHandle; - UNICODE_STRING DirectoryName, SymlinkName; - ULONG LuidEnabled; - RTL_QUERY_REGISTRY_TABLE BaseServerRegistryConfigurationTable[2] = - { - { - NULL, - RTL_QUERY_REGISTRY_DIRECT, - L"CSDVersion", - &BaseSrvCSDString - }, - {0} - }; - - /* Get the session ID */ - SessionId = NtCurrentPeb()->SessionId; - - /* Get the Windows directory */ - RtlInitEmptyUnicodeString(&SystemRootString, Buffer, sizeof(Buffer)); - Status = RtlExpandEnvironmentStrings_U(NULL, - &UnexpandedSystemRootString, - &SystemRootString, - NULL); - ASSERT(NT_SUCCESS(Status)); - - /* Create the base directory */ - Buffer[SystemRootString.Length / sizeof(WCHAR)] = UNICODE_NULL; - Status = RtlCreateUnicodeString(&BaseSrvWindowsDirectory, - SystemRootString.Buffer); - ASSERT(NT_SUCCESS(Status)); - - /* Create the system directory */ - wcscat(SystemRootString.Buffer, L"\\system32"); - Status = RtlCreateUnicodeString(&BaseSrvWindowsSystemDirectory, - SystemRootString.Buffer); - ASSERT(NT_SUCCESS(Status)); - - /* FIXME: Check Session ID */ - wcscpy(Buffer, L"\\BaseNamedObjects"); - RtlInitUnicodeString(&BnoString, Buffer); - - /* Allocate the server data */ - BaseStaticServerData = RtlAllocateHeap(CsrSrvSharedSectionHeap, - HEAP_ZERO_MEMORY, - sizeof(BASE_STATIC_SERVER_DATA)); - ASSERT(BaseStaticServerData != NULL); - - /* Process timezone information */ - BaseStaticServerData->TermsrvClientTimeZoneId = TIME_ZONE_ID_INVALID; - BaseStaticServerData->TermsrvClientTimeZoneChangeNum = 0; - Status = NtQuerySystemInformation(SystemTimeOfDayInformation, - &BaseStaticServerData->TimeOfDay, - sizeof(BaseStaticServerData->TimeOfDay), - NULL); - ASSERT(NT_SUCCESS(Status)); - - /* Make a shared heap copy of the Windows directory */ - BaseStaticServerData->WindowsDirectory = BaseSrvWindowsDirectory; - HeapBuffer = RtlAllocateHeap(CsrSrvSharedSectionHeap, - 0, - BaseSrvWindowsDirectory.MaximumLength); - ASSERT(HeapBuffer); - RtlCopyMemory(HeapBuffer, - BaseStaticServerData->WindowsDirectory.Buffer, - BaseSrvWindowsDirectory.MaximumLength); - BaseStaticServerData->WindowsDirectory.Buffer = HeapBuffer; - - /* Make a shared heap copy of the System directory */ - BaseStaticServerData->WindowsSystemDirectory = BaseSrvWindowsSystemDirectory; - HeapBuffer = RtlAllocateHeap(CsrSrvSharedSectionHeap, - 0, - BaseSrvWindowsSystemDirectory.MaximumLength); - ASSERT(HeapBuffer); - RtlCopyMemory(HeapBuffer, - BaseStaticServerData->WindowsSystemDirectory.Buffer, - BaseSrvWindowsSystemDirectory.MaximumLength); - BaseStaticServerData->WindowsSystemDirectory.Buffer = HeapBuffer; - - /* This string is not used */ - RtlInitEmptyUnicodeString(&BaseStaticServerData->WindowsSys32x86Directory, - NULL, - 0); - - /* Make a shared heap copy of the BNO directory */ - BaseStaticServerData->NamedObjectDirectory = BnoString; - BaseStaticServerData->NamedObjectDirectory.MaximumLength = BnoString.Length + - sizeof(UNICODE_NULL); - HeapBuffer = RtlAllocateHeap(CsrSrvSharedSectionHeap, - 0, - BaseStaticServerData->NamedObjectDirectory.MaximumLength); - ASSERT(HeapBuffer); - RtlCopyMemory(HeapBuffer, - BaseStaticServerData->NamedObjectDirectory.Buffer, - BaseStaticServerData->NamedObjectDirectory.MaximumLength); - BaseStaticServerData->NamedObjectDirectory.Buffer = HeapBuffer; - - /* - * Confirmed that in Windows, CSDNumber and RCNumber are actually Length - * and MaximumLength of the CSD String, since the same UNICODE_STRING is - * being queried twice, the first time as a ULONG! - * - * Somehow, in Windows this doesn't cause a buffer overflow, but it might - * in ReactOS, so this code is disabled until someone figures out WTF. - */ - BaseStaticServerData->CSDNumber = 0; - BaseStaticServerData->RCNumber = 0; - - /* Initialize the CSD string and query its value from the registry */ - RtlInitEmptyUnicodeString(&BaseSrvCSDString, Buffer, sizeof(Buffer)); - Status = RtlQueryRegistryValues(RTL_REGISTRY_WINDOWS_NT, - L"", - BaseServerRegistryConfigurationTable, - NULL, - NULL); - if (NT_SUCCESS(Status)) - { - /* Copy into the shared buffer */ - wcsncpy(BaseStaticServerData->CSDVersion, - BaseSrvCSDString.Buffer, - BaseSrvCSDString.Length / sizeof(WCHAR)); - } - else - { - /* NULL-terminate to indicate nothing is there */ - BaseStaticServerData->CSDVersion[0] = UNICODE_NULL; - } - - /* Cache the system information */ - Status = NtQuerySystemInformation(SystemBasicInformation, - &BaseStaticServerData->SysInfo, - sizeof(BaseStaticServerData->SysInfo), - NULL); - ASSERT(NT_SUCCESS(Status)); - - /* FIXME: Should query the registry for these */ - BaseStaticServerData->DefaultSeparateVDM = FALSE; - BaseStaticServerData->IsWowTaskReady = FALSE; - - /* Allocate a security descriptor and create it */ - BnoSd = RtlAllocateHeap(CsrHeap, 0, 1024); - ASSERT(BnoSd); - Status = RtlCreateSecurityDescriptor(BnoSd, SECURITY_DESCRIPTOR_REVISION); - ASSERT(NT_SUCCESS(Status)); - - /* Create the BNO and \Restricted DACLs */ - Status = CreateBaseAcls(&BnoDacl, &BnoRestrictedDacl); - ASSERT(NT_SUCCESS(Status)); - - /* Set the BNO DACL as active for now */ - Status = RtlSetDaclSecurityDescriptor(BnoSd, TRUE, BnoDacl, FALSE); - ASSERT(NT_SUCCESS(Status)); - - /* Create the BNO directory */ - RtlInitUnicodeString(&BnoString, L"\\BaseNamedObjects"); - InitializeObjectAttributes(&ObjectAttributes, - &BnoString, - OBJ_OPENIF | OBJ_PERMANENT | OBJ_CASE_INSENSITIVE, - NULL, - BnoSd); - Status = NtCreateDirectoryObject(&BaseSrvNamedObjectDirectory, - DIRECTORY_ALL_ACCESS, - &ObjectAttributes); - ASSERT(NT_SUCCESS(Status)); - - /* Check if we are session 0 */ - if (!SessionId) - { - /* Mark this as a session 0 directory */ - Status = NtSetInformationObject(BaseSrvNamedObjectDirectory, - ObjectSessionInformation, - NULL, - 0); - ASSERT(NT_SUCCESS(Status)); - } - - /* Check if LUID device maps are enabled */ - Status = NtQueryInformationProcess(NtCurrentProcess(), - ProcessLUIDDeviceMapsEnabled, - &LuidEnabled, - sizeof(LuidEnabled), - NULL); - ASSERT(NT_SUCCESS(Status)); - BaseStaticServerData->LUIDDeviceMapsEnabled = LuidEnabled; - if (!BaseStaticServerData->LUIDDeviceMapsEnabled) - { - /* Make Global point back to BNO */ - RtlInitUnicodeString(&DirectoryName, L"Global"); - RtlInitUnicodeString(&SymlinkName, L"\\BaseNamedObjects"); - InitializeObjectAttributes(&ObjectAttributes, - &DirectoryName, - OBJ_OPENIF | OBJ_PERMANENT | OBJ_CASE_INSENSITIVE, - BaseSrvNamedObjectDirectory, - BnoSd); - Status = NtCreateSymbolicLinkObject(&SymHandle, - SYMBOLIC_LINK_ALL_ACCESS, - &ObjectAttributes, - &SymlinkName); - if ((NT_SUCCESS(Status)) && !(SessionId)) NtClose(SymHandle); - - /* Make local point back to \Sessions\x\BNO */ - RtlInitUnicodeString(&DirectoryName, L"Local"); - ASSERT(SessionId == 0); - InitializeObjectAttributes(&ObjectAttributes, - &DirectoryName, - OBJ_OPENIF | OBJ_PERMANENT | OBJ_CASE_INSENSITIVE, - BaseSrvNamedObjectDirectory, - BnoSd); - Status = NtCreateSymbolicLinkObject(&SymHandle, - SYMBOLIC_LINK_ALL_ACCESS, - &ObjectAttributes, - &SymlinkName); - if ((NT_SUCCESS(Status)) && !(SessionId)) NtClose(SymHandle); - - /* Make Session point back to BNOLINKS */ - RtlInitUnicodeString(&DirectoryName, L"Session"); - RtlInitUnicodeString(&SymlinkName, L"\\Sessions\\BNOLINKS"); - InitializeObjectAttributes(&ObjectAttributes, - &DirectoryName, - OBJ_OPENIF | OBJ_PERMANENT | OBJ_CASE_INSENSITIVE, - BaseSrvNamedObjectDirectory, - BnoSd); - Status = NtCreateSymbolicLinkObject(&SymHandle, - SYMBOLIC_LINK_ALL_ACCESS, - &ObjectAttributes, - &SymlinkName); - if ((NT_SUCCESS(Status)) && !(SessionId)) NtClose(SymHandle); - - /* Create the BNO\Restricted directory and set the restricted DACL */ - RtlInitUnicodeString(&DirectoryName, L"Restricted"); - Status = RtlSetDaclSecurityDescriptor(BnoSd, TRUE, BnoRestrictedDacl, FALSE); - ASSERT(NT_SUCCESS(Status)); - InitializeObjectAttributes(&ObjectAttributes, - &DirectoryName, - OBJ_OPENIF | OBJ_PERMANENT | OBJ_CASE_INSENSITIVE, - BaseSrvNamedObjectDirectory, - BnoSd); - Status = NtCreateDirectoryObject(&BaseSrvRestrictedObjectDirectory, - DIRECTORY_ALL_ACCESS, - &ObjectAttributes); - ASSERT(NT_SUCCESS(Status)); - } - - /* Finally, set the pointer */ - CsrSrvSharedStaticServerData[CSR_CONSOLE] = BaseStaticServerData; -} - -NTSTATUS WINAPI -CsrpHandleConnectionRequest(PPORT_MESSAGE Request) -{ - NTSTATUS Status; - HANDLE ServerPort = NULL;//, ServerThread = NULL; - PCSR_PROCESS ProcessData = NULL; - REMOTE_PORT_VIEW RemotePortView; -// CLIENT_ID ClientId; - BOOLEAN AllowConnection = FALSE; - PCSR_CONNECTION_INFO ConnectInfo; - ServerPort = NULL; - - DPRINT("CSR: %s: Handling: %p\n", __FUNCTION__, Request); - - ConnectInfo = (PCSR_CONNECTION_INFO)(Request + 1); - - /* Save the process ID */ - RtlZeroMemory(ConnectInfo, sizeof(CSR_CONNECTION_INFO)); - - CsrLockProcessByClientId(Request->ClientId.UniqueProcess, &ProcessData); - if (!ProcessData) - { - DPRINT1("CSRSRV: Unknown process: %lx. Will be rejecting connection\n", - Request->ClientId.UniqueProcess); - } - - if ((ProcessData) && (ProcessData != CsrRootProcess)) - { - /* Attach the Shared Section */ - Status = CsrSrvAttachSharedSection(ProcessData, ConnectInfo); - if (NT_SUCCESS(Status)) - { - DPRINT("Connection ok\n"); - AllowConnection = TRUE; - } - else - { - DPRINT1("Shared section map failed: %lx\n", Status); - } - } - else if (ProcessData == CsrRootProcess) - { - AllowConnection = TRUE; - } - - /* Release the process */ - if (ProcessData) CsrUnlockProcess(ProcessData); - - /* Setup the Port View Structure */ - RemotePortView.Length = sizeof(REMOTE_PORT_VIEW); - RemotePortView.ViewSize = 0; - RemotePortView.ViewBase = NULL; - - /* Save the Process ID */ - ConnectInfo->ProcessId = NtCurrentTeb()->ClientId.UniqueProcess; - - Status = NtAcceptConnectPort(&ServerPort, - AllowConnection ? UlongToPtr(ProcessData->SequenceNumber) : 0, - Request, - AllowConnection, - NULL, - &RemotePortView); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: NtAcceptConnectPort - failed. Status == %X\n", Status); - } - else if (AllowConnection) - { - if (CsrDebug & 2) - { - DPRINT1("CSRSS: ClientId: %lx.%lx has ClientView: Base=%p, Size=%lx\n", - Request->ClientId.UniqueProcess, - Request->ClientId.UniqueThread, - RemotePortView.ViewBase, - RemotePortView.ViewSize); - } - - /* Set some Port Data in the Process */ - ProcessData->ClientPort = ServerPort; - ProcessData->ClientViewBase = (ULONG_PTR)RemotePortView.ViewBase; - ProcessData->ClientViewBounds = (ULONG_PTR)((ULONG_PTR)RemotePortView.ViewBase + - (ULONG_PTR)RemotePortView.ViewSize); - - /* Complete the connection */ - Status = NtCompleteConnectPort(ServerPort); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: NtCompleteConnectPort - failed. Status == %X\n", Status); - } - } - else - { - DPRINT1("CSRSS: Rejecting Connection Request from ClientId: %lx.%lx\n", - Request->ClientId.UniqueProcess, - Request->ClientId.UniqueThread); - } - - return Status; -} - -/*++ - * @name CsrConnectToUser - * @implemented NT4 - * - * The CsrConnectToUser connects to the User subsystem. - * - * @param None - * - * @return A pointer to the CSR Thread - * - * @remarks None. - * - *--*/ -PCSR_THREAD -NTAPI -CsrConnectToUser(VOID) -{ - PTEB Teb = NtCurrentTeb(); - PCSR_THREAD CsrThread; -#if 0 - NTSTATUS Status; - ANSI_STRING DllName; - UNICODE_STRING TempName; - HANDLE hUser32; - STRING StartupName; - - /* Check if we didn't already find it */ - if (!CsrClientThreadSetup) - { - /* Get the DLL Handle for user32.dll */ - RtlInitAnsiString(&DllName, "user32"); - RtlAnsiStringToUnicodeString(&TempName, &DllName, TRUE); - Status = LdrGetDllHandle(NULL, - NULL, - &TempName, - &hUser32); - RtlFreeUnicodeString(&TempName); - - /* If we got teh handle, get the Client Thread Startup Entrypoint */ - if (NT_SUCCESS(Status)) - { - RtlInitAnsiString(&StartupName,"ClientThreadSetup"); - Status = LdrGetProcedureAddress(hUser32, - &StartupName, - 0, - (PVOID)&CsrClientThreadSetup); - } - } - - /* Connect to user32 */ - CsrClientThreadSetup(); -#endif - /* Save pointer to this thread in TEB */ - CsrThread = CsrLocateThreadInProcess(NULL, &Teb->ClientId); - if (CsrThread) Teb->CsrClientThread = CsrThread; - - /* Return it */ - return CsrThread; -} - -/*++ - * @name CsrpCheckRequestThreads - * - * The CsrpCheckRequestThreads routine checks if there are no more threads - * to handle CSR API Requests, and creates a new thread if possible, to - * avoid starvation. - * - * @param None. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * if a new thread couldn't be created. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrpCheckRequestThreads(VOID) -{ - HANDLE hThread; - CLIENT_ID ClientId; - NTSTATUS Status; - - /* Decrease the count, and see if we're out */ - if (!(_InterlockedDecrement(&CsrpStaticThreadCount))) - { - /* Check if we've still got space for a Dynamic Thread */ - if (CsrpDynamicThreadTotal < CsrMaxApiRequestThreads) - { - /* Create a new dynamic thread */ - Status = RtlCreateUserThread(NtCurrentProcess(), - NULL, - TRUE, - 0, - 0, - 0, - (PVOID)ClientConnectionThread,//CsrApiRequestThread, - NULL, - &hThread, - &ClientId); - /* Check success */ - if (NT_SUCCESS(Status)) - { - /* Increase the thread counts */ - _InterlockedIncrement(&CsrpStaticThreadCount); - _InterlockedIncrement(&CsrpDynamicThreadTotal); - - /* Add a new server thread */ - if (CsrAddStaticServerThread(hThread, - &ClientId, - CsrThreadIsServerThread)) - { - /* Activate it */ - NtResumeThread(hThread, NULL); - } - else - { - /* Failed to create a new static thread */ - _InterlockedDecrement(&CsrpStaticThreadCount); - _InterlockedDecrement(&CsrpDynamicThreadTotal); - - /* Terminate it */ - DPRINT1("Failing\n"); - NtTerminateThread(hThread, 0); - NtClose(hThread); - - /* Return */ - return STATUS_UNSUCCESSFUL; - } - } - } - } - - /* Success */ - return STATUS_SUCCESS; -} - -VOID -WINAPI -ClientConnectionThread(IN PVOID Parameter) -{ - PTEB Teb = NtCurrentTeb(); - LARGE_INTEGER TimeOut; - NTSTATUS Status; - BYTE RawRequest[LPC_MAX_DATA_LENGTH]; - PCSR_API_MESSAGE Request = (PCSR_API_MESSAGE)RawRequest; - PCSR_API_MESSAGE Reply; - PCSR_PROCESS CsrProcess; - PCSR_THREAD ServerThread, CsrThread; - ULONG MessageType; - HANDLE ReplyPort; - PDBGKM_MSG DebugMessage; - PHARDERROR_MSG HardErrorMsg; - PCLIENT_DIED_MSG ClientDiedMsg; - DPRINT("CSR: %s called\n", __FUNCTION__); - - /* Setup LPC loop port and message */ - Reply = NULL; - ReplyPort = CsrApiPort; - - /* Connect to user32 */ - while (!CsrConnectToUser()) - { - /* Set up the timeout for the connect (30 seconds) */ - TimeOut.QuadPart = -30 * 1000 * 1000 * 10; - - /* Keep trying until we get a response */ - Teb->Win32ClientInfo[0] = 0; - NtDelayExecution(FALSE, &TimeOut); - } - - /* Get our thread */ - ServerThread = Teb->CsrClientThread; - - /* If we got an event... */ - if (Parameter) - { - /* Set it, to let stuff waiting on us load */ - Status = NtSetEvent((HANDLE)Parameter, NULL); - ASSERT(NT_SUCCESS(Status)); - - /* Increase the Thread Counts */ - _InterlockedIncrement(&CsrpStaticThreadCount); - _InterlockedIncrement(&CsrpDynamicThreadTotal); - } - - /* Now start the loop */ - while (TRUE) - { - /* Make sure the real CID is set */ - Teb->RealClientId = Teb->ClientId; - - /* Debug check */ - if (Teb->CountOfOwnedCriticalSections) - { - DPRINT1("CSRSRV: FATAL ERROR. CsrThread is Idle while holding %lu critical sections\n", - Teb->CountOfOwnedCriticalSections); - DPRINT1("CSRSRV: Last Receive Message %lx ReplyMessage %lx\n", - Request, Reply); - DbgBreakPoint(); - } - - /* Send the reply and wait for a new request */ - DPRINT("Replying to: %lx (%lx)\n", ReplyPort, CsrApiPort); - Status = NtReplyWaitReceivePort(ReplyPort, - 0, - &Reply->Header, - &Request->Header); - /* Check if we didn't get success */ - if (Status != STATUS_SUCCESS) - { - /* Was it a failure or another success code? */ - if (!NT_SUCCESS(Status)) - { - /* Check for specific status cases */ - if ((Status != STATUS_INVALID_CID) && - (Status != STATUS_UNSUCCESSFUL) && - ((Status == STATUS_INVALID_HANDLE) || (ReplyPort == CsrApiPort))) - { - /* Notify the debugger */ - DPRINT1("CSRSS: ReceivePort failed - Status == %X\n", Status); - DPRINT1("CSRSS: ReplyPortHandle %lx CsrApiPort %lx\n", ReplyPort, CsrApiPort); - } - - /* We failed big time, so start out fresh */ - Reply = NULL; - ReplyPort = CsrApiPort; - DPRINT1("failed: %lx\n", Status); - continue; - } - else - { - /* A bizare "success" code, just try again */ - DPRINT1("NtReplyWaitReceivePort returned \"success\" status 0x%x\n", Status); - continue; - } - } - - /* Use whatever Client ID we got */ - Teb->RealClientId = Request->Header.ClientId; - - /* Get the Message Type */ - MessageType = Request->Header.u2.s2.Type; - - /* Handle connection requests */ - if (MessageType == LPC_CONNECTION_REQUEST) - { - /* Handle the Connection Request */ - DPRINT("Accepting new connection\n"); - CsrpHandleConnectionRequest((PPORT_MESSAGE)Request); - Reply = NULL; - ReplyPort = CsrApiPort; - continue; - } - - /* It's some other kind of request. Get the lock for the lookup */ - CsrAcquireProcessLock(); - - /* Now do the lookup to get the CSR_THREAD */ - CsrThread = CsrLocateThreadByClientId(&CsrProcess, - &Request->Header.ClientId); - - /* Did we find a thread? */ - if (!CsrThread) - { - /* This wasn't a CSR Thread, release lock */ - CsrReleaseProcessLock(); - - /* If this was an exception, handle it */ - if (MessageType == LPC_EXCEPTION) - { - DPRINT1("Exception from unknown thread, just continue\n"); - Reply = Request; - ReplyPort = CsrApiPort; - Reply->Status = DBG_CONTINUE; - } - else if (MessageType == LPC_PORT_CLOSED || - MessageType == LPC_CLIENT_DIED) - { - /* The Client or Port are gone, loop again */ - DPRINT("Death from unknown thread, just continue\n"); - Reply = NULL; - ReplyPort = CsrApiPort; - } - else if (MessageType == LPC_ERROR_EVENT) - { - /* If it's a hard error, handle this too */ - DPRINT1("Hard error from unknown thread, call handlers\n"); -HandleHardError: - HardErrorMsg = (PHARDERROR_MSG)Request; - - /* Default it to unhandled */ - HardErrorMsg->Response = ResponseNotHandled; - - /* Check if there are free api threads */ - CsrpCheckRequestThreads(); - if (CsrpStaticThreadCount) - { - CsrHandleHardError(CsrThread, (PHARDERROR_MSG)Request); - } - - /* If the response was 0xFFFFFFFF, we'll ignore it */ - if (HardErrorMsg->Response == 0xFFFFFFFF) - { - Reply = NULL; - ReplyPort = CsrApiPort; - } - else - { - if (CsrThread) CsrDereferenceThread(CsrThread); - Reply = Request; - ReplyPort = CsrApiPort; - } - } - else if (MessageType == LPC_REQUEST) - { - /* This is an API Message coming from a non-CSR Thread */ - DPRINT1("No thread found for request %lx and clientID %lx.%lx\n", - Request->Type & 0xFFFF, - Request->Header.ClientId.UniqueProcess, - Request->Header.ClientId.UniqueThread); - Reply = Request; - ReplyPort = CsrApiPort; - Reply->Status = STATUS_ILLEGAL_FUNCTION; - } - else if (MessageType == LPC_DATAGRAM) - { - DPRINT1("Kernel datagram: not yet supported\n"); - Reply = NULL; - ReplyPort = CsrApiPort; - } - else - { - /* Some other ignored message type */ - Reply = NULL; - ReplyPort = CsrApiPort; - } - - /* Keep going */ - continue; - } - - /* We have a valid thread, was this an LPC Request? */ - if (MessageType != LPC_REQUEST) - { - /* It's not an API, check if the client died */ - if (MessageType == LPC_CLIENT_DIED) - { - /* Get the information and check if it matches our thread */ - ClientDiedMsg = (PCLIENT_DIED_MSG)Request; - if (ClientDiedMsg->CreateTime.QuadPart == CsrThread->CreateTime.QuadPart) - { - /* Reference the thread */ - CsrLockedReferenceThread(CsrThread); - - /* Destroy the thread in the API Message */ - CsrDestroyThread(&Request->Header.ClientId); - - /* Check if the thread was actually ourselves */ - if (CsrProcess->ThreadCount == 1) - { - /* Kill the process manually here */ - DPRINT1("Last thread\n"); - CsrDestroyProcess(&CsrThread->ClientId, 0); - } - - /* Remove our extra reference */ - CsrLockedDereferenceThread(CsrThread); - } - - /* Release the lock and keep looping */ - CsrReleaseProcessLock(); - Reply = NULL; - ReplyPort = CsrApiPort; - continue; - } - - /* Reference the thread and release the lock */ - CsrLockedReferenceThread(CsrThread); - CsrReleaseProcessLock(); - - /* If this was an exception, handle it */ - if (MessageType == LPC_EXCEPTION) - { - /* Kill the process */ - DPRINT1("Exception in %lx.%lx. Killing...\n", - Request->Header.ClientId.UniqueProcess, - Request->Header.ClientId.UniqueThread); - NtTerminateProcess(CsrProcess->ProcessHandle, STATUS_ABANDONED); - - /* Destroy it from CSR */ - CsrDestroyProcess(&Request->Header.ClientId, STATUS_ABANDONED); - - /* Return a Debug Message */ - DebugMessage = (PDBGKM_MSG)Request; - DebugMessage->ReturnedStatus = DBG_CONTINUE; - Reply = Request; - ReplyPort = CsrApiPort; - - /* Remove our extra reference */ - CsrDereferenceThread(CsrThread); - } - else if (MessageType == LPC_ERROR_EVENT) - { - DPRINT1("Hard error from known CSR thread... handling\n"); - goto HandleHardError; - } - else - { - /* Something else */ - DPRINT1("Unhandled message type: %lx\n", MessageType); - CsrDereferenceThread(CsrThread); - Reply = NULL; - } - - /* Keep looping */ - continue; - } - - /* We got an API Request */ - CsrLockedReferenceThread(CsrThread); - CsrReleaseProcessLock(); - - /* Assume success */ - Reply = Request; - Request->Status = STATUS_SUCCESS; - - /* Now we reply to a particular client */ - ReplyPort = CsrThread->Process->ClientPort; - - DPRINT("CSR: Got CSR API: %x [Message Origin: %x]\n", - Request->Type, - Request->Header.ClientId.UniqueThread); - - /* Validation complete, start SEH */ - _SEH2_TRY - { - /* Make sure we have enough threads */ - CsrpCheckRequestThreads(); - - /* Set the client thread pointer */ - NtCurrentTeb()->CsrClientThread = CsrThread; - - /* Call the Handler */ - CsrApiCallHandler(CsrThread->Process, Request); - - /* Increase the static thread count */ - _InterlockedIncrement(&CsrpStaticThreadCount); - - /* Restore the server thread */ - NtCurrentTeb()->CsrClientThread = ServerThread; - - /* Check if this is a dead client now */ - if (Request->Type == 0xBABE) - { - /* Reply to the death message */ - NtReplyPort(ReplyPort, &Reply->Header); - - /* Reply back to the API port now */ - ReplyPort = CsrApiPort; - Reply = NULL; - - /* Drop the reference */ - CsrDereferenceThread(CsrThread); - } - else - { - /* Drop the reference */ - CsrDereferenceThread(CsrThread); - } - } - _SEH2_EXCEPT(CsrUnhandledExceptionFilter(_SEH2_GetExceptionInformation())) - { - Reply = NULL; - ReplyPort = CsrApiPort; - } - _SEH2_END; - } - - /* Close the port and exit the thread */ - // NtClose(ServerPort); - - DPRINT1("CSR: %s done\n", __FUNCTION__); - /* We're out of the loop for some reason, terminate! */ - NtTerminateThread(NtCurrentThread(), Status); - //return Status; -} - -/*++ - * @name CsrReleaseCapturedArguments - * @implemented NT5.1 - * - * The CsrReleaseCapturedArguments routine releases a Capture Buffer - * that was previously captured with CsrCaptureArguments. - * - * @param ApiMessage - * Pointer to the CSR API Message containing the Capture Buffer - * that needs to be released. - * - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -CsrReleaseCapturedArguments(IN PCSR_API_MESSAGE ApiMessage) -{ - PCSR_CAPTURE_BUFFER RemoteCaptureBuffer, LocalCaptureBuffer; - SIZE_T BufferDistance; - ULONG PointerCount; - ULONG_PTR **PointerOffsets, *CurrentPointer; - - /* Get the capture buffers */ - RemoteCaptureBuffer = ApiMessage->CsrCaptureData; - LocalCaptureBuffer = RemoteCaptureBuffer->PreviousCaptureBuffer; - - /* Free the previous one */ - RemoteCaptureBuffer->PreviousCaptureBuffer = NULL; - - /* Find out the difference between the two buffers */ - BufferDistance = (ULONG_PTR)LocalCaptureBuffer - (ULONG_PTR)RemoteCaptureBuffer; - - /* Save the pointer count and offset pointer */ - PointerCount = RemoteCaptureBuffer->PointerCount; - PointerOffsets = (ULONG_PTR**)(RemoteCaptureBuffer + 1); - - /* Start the loop */ - while (PointerCount) - { - /* Get the current pointer */ - CurrentPointer = *PointerOffsets++; - if (CurrentPointer) - { - /* Add it to the CSR Message structure */ - CurrentPointer += (ULONG_PTR)ApiMessage; - - /* Modify the pointer to take into account its new position */ - *CurrentPointer += BufferDistance; - } - - /* Move to the next Pointer */ - PointerCount--; - } - - /* Copy the data back */ - RtlMoveMemory(LocalCaptureBuffer, RemoteCaptureBuffer, RemoteCaptureBuffer->Size); - - /* Free our allocated buffer */ - RtlFreeHeap(CsrHeap, 0, RemoteCaptureBuffer); -} - -/* EOF */ diff --git a/deprecated/csrsrv/csrsrv.rc b/deprecated/csrsrv/csrsrv.rc deleted file mode 100644 index fbe30d31c97..00000000000 --- a/deprecated/csrsrv/csrsrv.rc +++ /dev/null @@ -1,5 +0,0 @@ -#define REACTOS_VERSION_DLL -#define REACTOS_STR_FILE_DESCRIPTION "Client/Server Runtime SubSystem Process\0" -#define REACTOS_STR_INTERNAL_NAME "csrsrv\0" -#define REACTOS_STR_ORIGINAL_FILENAME "csrsrv.dll\0" -#include diff --git a/deprecated/csrsrv/csrsrv.spec b/deprecated/csrsrv/csrsrv.spec deleted file mode 100644 index 19f442849c5..00000000000 --- a/deprecated/csrsrv/csrsrv.spec +++ /dev/null @@ -1,36 +0,0 @@ -@ stdcall CsrAddStaticServerThread(ptr ptr long) -@ stdcall CsrCallServerFromServer(ptr ptr) -;@ stdcall CsrConnectToUser() -;@ stdcall CsrCreateProcess(ptr ptr ptr ptr long ptr) -@ stdcall CsrCreateRemoteThread(ptr ptr) -@ stdcall CsrCreateThread(ptr ptr ptr) -;@ stdcall CsrCreateWait(ptr ptr ptr ptr ptr ptr) -;@ stdcall CsrDebugProcess(ptr) -;@ stdcall CsrDebugProcessStop(ptr) -;@ stdcall CsrDereferenceProcess(ptr) -;@ stdcall CsrDereferenceThread(ptr) -;@ stdcall CsrDereferenceWait(ptr) -;@ stdcall CsrDestroyProcess(ptr long) -;@ stdcall CsrDestroyThread(ptr) -@ stdcall CsrEnumProcesses(ptr ptr) ; Temporary hack -;@ stdcall CsrExecServerThread(ptr long) -@ stdcall CsrGetProcessLuid(ptr ptr) -@ stdcall CsrImpersonateClient(ptr) -@ stdcall CsrLockProcessByClientId(ptr ptr) -;@ stdcall CsrLockThreadByClientId(ptr ptr) -;@ stdcall CsrMoveSatisfiedWait(ptr ptr) -;@ stdcall CsrNotifyWait(ptr long ptr ptr) -;@ stdcall CsrPopulateDosDevices() -;@ stdcall CsrQueryApiPort() -;@ stdcall CsrReferenceThread(ptr) -@ stdcall CsrRevertToSelf() -@ stdcall CsrServerInitialization(long ptr) -;@ stdcall CsrSetBackgroundPriority(ptr) -;@ stdcall CsrSetCallingSpooler(long) -;@ stdcall CsrSetForegroundPriority(ptr) -;@ stdcall CsrShutdownProcesses(ptr long) -;@ stdcall CsrUnhandledExceptionFilter(ptr) -@ stdcall CsrUnlockProcess(ptr) -;@ stdcall CsrUnlockThread(ptr) -;@ stdcall CsrValidateMessageBuffer(ptr ptr long long) -;@ stdcall CsrValidateMessageString(ptr ptr) diff --git a/deprecated/csrsrv/include/api.h b/deprecated/csrsrv/include/api.h deleted file mode 100644 index 6a71ee05a6d..00000000000 --- a/deprecated/csrsrv/include/api.h +++ /dev/null @@ -1,467 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: subsys/csrss/include/api.h - * PURPOSE: CSRSS API interface - */ - -#pragma once - -#define NTOS_MODE_USER -#include -#include - -#include - -#define CSR_SRV_SERVER 0 -#define CSR_SERVER_DLL_MAX 4 -#define LOCK RtlEnterCriticalSection(&ProcessDataLock) -#define UNLOCK RtlLeaveCriticalSection(&ProcessDataLock) -#define CsrAcquireProcessLock() LOCK -#define CsrReleaseProcessLock() UNLOCK -#define ProcessStructureListLocked() \ - (ProcessDataLock.OwningThread == NtCurrentTeb()->ClientId.UniqueThread) - -#define CsrAcquireWaitLock() \ - RtlEnterCriticalSection(&CsrWaitListsLock); - -#define CsrReleaseWaitLock() \ - RtlLeaveCriticalSection(&CsrWaitListsLock); - -#define CsrAcquireNtSessionLock() \ - RtlEnterCriticalSection(&CsrNtSessionLock); - -#define CsrReleaseNtSessionLock() \ - RtlLeaveCriticalSection(&CsrNtSessionLock); - -typedef enum _CSR_THREAD_FLAGS -{ - CsrThreadAltertable = 0x1, - CsrThreadInTermination = 0x2, - CsrThreadTerminated = 0x4, - CsrThreadIsServerThread = 0x10 -} CSR_THREAD_FLAGS, *PCSR_THREAD_FLAGS; - -typedef enum _SHUTDOWN_RESULT -{ - CsrShutdownCsrProcess = 1, - CsrShutdownNonCsrProcess, - CsrShutdownCancelled -} SHUTDOWN_RESULT, *PSHUTDOWN_RESULT; - -typedef enum _CSR_SHUTDOWN_FLAGS -{ - CsrShutdownSystem = 4, - CsrShutdownOther = 8 -} CSR_SHUTDOWN_FLAGS, *PCSR_SHUTDOWN_FLAGS; - -typedef enum _CSR_DEBUG_FLAGS -{ - CsrDebugOnlyThisProcess = 1, - CsrDebugProcessChildren = 2 -} CSR_PROCESS_DEBUG_FLAGS, *PCSR_PROCESS_DEBUG_FLAGS; - -typedef enum _CSR_PROCESS_FLAGS -{ - CsrProcessTerminating = 0x1, - CsrProcessSkipShutdown = 0x2, - CsrProcessNormalPriority = 0x10, - CsrProcessIdlePriority = 0x20, - CsrProcessHighPriority = 0x40, - CsrProcessRealtimePriority = 0x80, - CsrProcessCreateNewGroup = 0x100, - CsrProcessTerminated = 0x200, - CsrProcessLastThreadTerminated = 0x400, - CsrProcessIsConsoleApp = 0x800 -} CSR_PROCESS_FLAGS, *PCSR_PROCESS_FLAGS; - -#define CsrProcessPriorityFlags (CsrProcessNormalPriority | \ - CsrProcessIdlePriority | \ - CsrProcessHighPriority | \ - CsrProcessRealtimePriority) - -typedef struct _CSRSS_CON_PROCESS_DATA -{ - HANDLE ConsoleEvent; - struct tagCSRSS_CONSOLE *Console; - struct tagCSRSS_CONSOLE *ParentConsole; - BOOL bInheritHandles; - RTL_CRITICAL_SECTION HandleTableLock; - ULONG HandleTableSize; - struct _CSRSS_HANDLE *HandleTable; - PCONTROLDISPATCHER CtrlDispatcher; - LIST_ENTRY ConsoleLink; -} CSRSS_CON_PROCESS_DATA, *PCSRSS_CON_PROCESS_DATA; - -typedef struct _CSR_NT_SESSION -{ - ULONG ReferenceCount; - LIST_ENTRY SessionLink; - ULONG SessionId; -} CSR_NT_SESSION, *PCSR_NT_SESSION; - -typedef struct _CSR_PROCESS -{ - CLIENT_ID ClientId; - LIST_ENTRY ListLink; - LIST_ENTRY ThreadList; - struct _CSR_PROCESS *Parent; - PCSR_NT_SESSION NtSession; - ULONG ExpectedVersion; - HANDLE ClientPort; - ULONG_PTR ClientViewBase; - ULONG_PTR ClientViewBounds; - HANDLE ProcessHandle; - ULONG SequenceNumber; - ULONG Flags; - ULONG DebugFlags; - CLIENT_ID DebugCid; - ULONG ReferenceCount; - ULONG ProcessGroupId; - ULONG ProcessGroupSequence; - ULONG fVDM; - ULONG ThreadCount; - ULONG PriorityClass; - ULONG Reserved; - ULONG ShutdownLevel; - ULONG ShutdownFlags; -// PVOID ServerData[ANYSIZE_ARRAY]; - CSRSS_CON_PROCESS_DATA; -} CSR_PROCESS, *PCSR_PROCESS; - -typedef struct _CSR_THREAD -{ - LARGE_INTEGER CreateTime; - LIST_ENTRY Link; - LIST_ENTRY HashLinks; - CLIENT_ID ClientId; - PCSR_PROCESS Process; - struct _CSR_WAIT_BLOCK *WaitBlock; - HANDLE ThreadHandle; - ULONG Flags; - ULONG ReferenceCount; - ULONG ImpersonationCount; -} CSR_THREAD, *PCSR_THREAD; - -typedef -BOOLEAN -(*CSR_WAIT_FUNCTION)( - IN PLIST_ENTRY WaitList, - IN PCSR_THREAD WaitThread, - IN PCSR_API_MESSAGE WaitApiMessage, - IN PVOID WaitContext, - IN PVOID WaitArgument1, - IN PVOID WaitArgument2, - IN ULONG WaitFlags -); - -typedef struct _CSR_WAIT_BLOCK -{ - ULONG Size; - LIST_ENTRY WaitList; - LIST_ENTRY UserWaitList; - PVOID WaitContext; - PCSR_THREAD WaitThread; - CSR_WAIT_FUNCTION WaitFunction; - CSR_API_MESSAGE WaitApiMessage; -} CSR_WAIT_BLOCK, *PCSR_WAIT_BLOCK; - -typedef -NTSTATUS -(NTAPI *PCSR_CONNECT_CALLBACK)( - IN PCSR_PROCESS CsrProcess, - IN OUT PVOID ConnectionInfo, - IN OUT PULONG ConnectionInfoLength -); - -typedef -VOID -(NTAPI *PCSR_DISCONNECT_CALLBACK)(IN PCSR_PROCESS CsrProcess); - -typedef -NTSTATUS -(NTAPI *PCSR_NEWPROCESS_CALLBACK)( - IN PCSR_PROCESS Parent, - IN PCSR_PROCESS CsrProcess -); - -typedef -VOID -(NTAPI *PCSR_HARDERROR_CALLBACK)( - IN PCSR_THREAD CsrThread, - IN PHARDERROR_MSG HardErrorMessage -); - -typedef -ULONG -(NTAPI *PCSR_SHUTDOWNPROCESS_CALLBACK)( - IN PCSR_PROCESS CsrProcess, - IN ULONG Flags, - IN BOOLEAN FirstPhase -); - -typedef -NTSTATUS -(NTAPI *PCSR_API_ROUTINE)( - IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply -); - -typedef struct _CSR_SERVER_DLL -{ - ULONG Length; - HANDLE Event; - ANSI_STRING Name; - HANDLE ServerHandle; - ULONG ServerId; - ULONG Unknown; - ULONG ApiBase; - ULONG HighestApiSupported; - PCSR_API_ROUTINE *DispatchTable; - PBOOLEAN ValidTable; - PCHAR *NameTable; - ULONG SizeOfProcessData; - PCSR_CONNECT_CALLBACK ConnectCallback; - PCSR_DISCONNECT_CALLBACK DisconnectCallback; - PCSR_HARDERROR_CALLBACK HardErrorCallback; - PVOID SharedSection; - PCSR_NEWPROCESS_CALLBACK NewProcessCallback; - PCSR_SHUTDOWNPROCESS_CALLBACK ShutdownProcessCallback; - ULONG Unknown2[3]; -} CSR_SERVER_DLL, *PCSR_SERVER_DLL; - -typedef -NTSTATUS -(NTAPI *PCSR_SERVER_DLL_INIT_CALLBACK)(IN PCSR_SERVER_DLL ServerDll); - - -typedef NTSTATUS (WINAPI *CSRSS_API_PROC)(PCSR_PROCESS ProcessData, - PCSR_API_MESSAGE Request); - -typedef struct _CSRSS_API_DEFINITION -{ - ULONG Type; - ULONG MinRequestSize; - CSRSS_API_PROC Handler; -} CSRSS_API_DEFINITION, *PCSRSS_API_DEFINITION; - -#define CSRSS_DEFINE_API(Func, Handler) \ - { Func, sizeof(CSRSS_##Func), Handler } - -typedef struct _CSRSS_LISTEN_DATA -{ - HANDLE ApiPortHandle; - ULONG ApiDefinitionsCount; - PCSRSS_API_DEFINITION *ApiDefinitions; -} CSRSS_LISTEN_DATA, *PCSRSS_LISTEN_DATA; - -#define CSR_API(n) NTSTATUS WINAPI n ( \ - PCSR_PROCESS ProcessData, \ - PCSR_API_MESSAGE Request) - -/* init.c */ -extern HANDLE hBootstrapOk; -NTSTATUS NTAPI CsrServerInitialization(ULONG ArgumentCount, PCHAR Arguments[]); - -/* api/process.c */ -CSR_API(CsrConnectProcess); -CSR_API(CsrSrvCreateProcess); -CSR_API(CsrTerminateProcess); -CSR_API(CsrSrvCreateThread); -CSR_API(CsrGetShutdownParameters); -CSR_API(CsrSetShutdownParameters); - -VOID -NTAPI -CsrSetBackgroundPriority(IN PCSR_PROCESS CsrProcess); - -PCSR_THREAD -NTAPI -CsrAllocateThread(IN PCSR_PROCESS CsrProcess); - -PCSR_PROCESS -NTAPI -CsrAllocateProcess(VOID); - -VOID -NTAPI -CsrDeallocateProcess(IN PCSR_PROCESS CsrProcess); - -VOID -NTAPI -CsrRemoveProcess(IN PCSR_PROCESS CsrProcess); - -VOID -NTAPI -CsrDereferenceThread(IN PCSR_THREAD CsrThread); - -VOID -NTAPI -CsrInsertProcess(IN PCSR_PROCESS Parent OPTIONAL, - IN PCSR_PROCESS CurrentProcess OPTIONAL, - IN PCSR_PROCESS CsrProcess); - - -/* api/wapi.c */ -NTSTATUS FASTCALL CsrApiRegisterDefinitions(PCSRSS_API_DEFINITION NewDefinitions); -VOID FASTCALL CsrApiCallHandler(PCSR_PROCESS ProcessData, - PCSR_API_MESSAGE Request); -VOID WINAPI CsrSbApiRequestThread (PVOID PortHandle); -VOID NTAPI ClientConnectionThread(HANDLE ServerPort); - -VOID -NTAPI -CsrReleaseCapturedArguments(IN PCSR_API_MESSAGE ApiMessage); - -extern HANDLE CsrApiPort; -extern HANDLE CsrSmApiPort; -extern HANDLE CsrSbApiPort; -extern LIST_ENTRY CsrThreadHashTable[256]; -extern PCSR_PROCESS CsrRootProcess; -extern RTL_CRITICAL_SECTION ProcessDataLock, CsrWaitListsLock; -extern UNICODE_STRING CsrDirectoryName; -extern ULONG CsrDebug; -extern ULONG CsrTotalPerProcessDataLength; -extern SYSTEM_BASIC_INFORMATION CsrNtSysInfo; -extern PVOID CsrSrvSharedSectionHeap; -extern PVOID *CsrSrvSharedStaticServerData; -extern HANDLE CsrInitializationEvent; -extern PCSR_SERVER_DLL CsrLoadedServerDll[CSR_SERVER_DLL_MAX]; -extern ULONG CsrMaxApiRequestThreads; - -NTSTATUS -NTAPI -CsrApiPortInitialize(VOID); - -NTSTATUS -NTAPI -CsrCreateProcess(IN HANDLE hProcess, - IN HANDLE hThread, - IN PCLIENT_ID ClientId, - IN PCSR_NT_SESSION NtSession, - IN ULONG Flags, - IN PCLIENT_ID DebugCid); - -BOOLEAN -NTAPI -ProtectHandle(IN HANDLE ObjectHandle); - -VOID -NTAPI -CsrInsertThread(IN PCSR_PROCESS Process, -IN PCSR_THREAD Thread); - -VOID -NTAPI -CsrLockedReferenceThread(IN PCSR_THREAD CsrThread); - -/* api/process.c */ -typedef NTSTATUS (WINAPI *CSRSS_ENUM_PROCESS_PROC)(PCSR_PROCESS ProcessData, - PVOID Context); -NTSTATUS WINAPI CsrInitializeProcessStructure(VOID); - -NTSTATUS WINAPI CsrEnumProcesses(CSRSS_ENUM_PROCESS_PROC EnumProc, PVOID Context); -PCSR_THREAD NTAPI CsrAddStaticServerThread(IN HANDLE hThread, IN PCLIENT_ID ClientId, IN ULONG ThreadFlags); -PCSR_THREAD NTAPI CsrLocateThreadInProcess(IN PCSR_PROCESS CsrProcess OPTIONAL, IN PCLIENT_ID Cid); -PCSR_THREAD NTAPI CsrLocateThreadByClientId(OUT PCSR_PROCESS *Process OPTIONAL, IN PCLIENT_ID ClientId); -NTSTATUS NTAPI CsrLockProcessByClientId(IN HANDLE Pid, OUT PCSR_PROCESS *CsrProcess OPTIONAL); -NTSTATUS NTAPI CsrCreateThread(IN PCSR_PROCESS CsrProcess, IN HANDLE hThread, IN PCLIENT_ID ClientId); -NTSTATUS NTAPI CsrUnlockProcess(IN PCSR_PROCESS CsrProcess); - -//hack -VOID NTAPI CsrThreadRefcountZero(IN PCSR_THREAD CsrThread); - -NTSTATUS -NTAPI -CsrInitializeNtSessionList(VOID); - -NTSTATUS -NTAPI -CsrSrvAttachSharedSection(IN PCSR_PROCESS CsrProcess OPTIONAL, -OUT PCSR_CONNECTION_INFO ConnectInfo); - -NTSTATUS -NTAPI -CsrSrvCreateSharedSection(IN PCHAR ParameterValue); - -NTSTATUS -NTAPI -CsrSrvClientConnect( - IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply -); - -NTSTATUS -NTAPI -CsrSrvUnusedFunction( - IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply -); - -NTSTATUS -NTAPI -CsrSrvIdentifyAlertableThread( - IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply -); - -NTSTATUS -NTAPI -CsrSrvSetPriorityClass( - IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply -); - -NTSTATUS -NTAPI -CsrDestroyProcess(IN PCLIENT_ID Cid, -IN NTSTATUS ExitStatus); - -NTSTATUS -NTAPI -CsrDestroyThread(IN PCLIENT_ID Cid); - -VOID -NTAPI -CsrLockedDereferenceThread(IN PCSR_THREAD CsrThread); - -BOOLEAN -NTAPI -CsrNotifyWaitBlock(IN PCSR_WAIT_BLOCK WaitBlock, - IN PLIST_ENTRY WaitList, - IN PVOID WaitArgument1, - IN PVOID WaitArgument2, - IN ULONG WaitFlags, - IN BOOLEAN DereferenceThread); - -VOID -NTAPI -CsrReferenceNtSession(IN PCSR_NT_SESSION Session); - -LONG -NTAPI -CsrUnhandledExceptionFilter(IN PEXCEPTION_POINTERS ExceptionInfo); - -VOID -NTAPI -CsrDereferenceNtSession(IN PCSR_NT_SESSION Session, -IN NTSTATUS ExitStatus); - -VOID -NTAPI -CsrLockedDereferenceProcess(PCSR_PROCESS CsrProcess); - -VOID -NTAPI -CsrDereferenceProcess(IN PCSR_PROCESS CsrProcess); - -NTSTATUS -NTAPI -CsrLoadServerDll(IN PCHAR DllString, - IN PCHAR EntryPoint OPTIONAL, - IN ULONG ServerId); - -/* api/user.c */ -CSR_API(CsrRegisterServicesProcess); - -/* EOF */ diff --git a/deprecated/csrsrv/include/csrplugin.h b/deprecated/csrsrv/include/csrplugin.h deleted file mode 100644 index 885ea8af929..00000000000 --- a/deprecated/csrsrv/include/csrplugin.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: subsys/csrss/include/csrplugin.h - * PURPOSE: CSRSS plugin interface - */ - -/* - * CSRSS is a native application and can only implicitly link against native - * DLLs. Since e.g. user32.dll and gdi32.dll are win32 DLLs and not native - * DLLs it is not possible to call functions in those DLLs directly from - * CSRSS. - * However, it is possible to explicitly load a non-native DLL. Such a DLL - * can then in turn be implicitly linked against other DLLs in its own - * subsystem. - */ - -#pragma once - -#include "api.h" - -typedef NTSTATUS (WINAPI *CSRSS_ENUM_PROCESSES_PROC)(CSRSS_ENUM_PROCESS_PROC EnumProc, - PVOID Context); - -typedef struct tagCSRSS_EXPORTED_FUNCS -{ - CSRSS_ENUM_PROCESSES_PROC CsrEnumProcessesProc; -} CSRSS_EXPORTED_FUNCS, *PCSRSS_EXPORTED_FUNCS; - -typedef BOOL (WINAPI *CSRPLUGIN_INIT_COMPLETE_PROC)(void); - -typedef VOID (WINAPI *CSRPLUGIN_HARDERROR_PROC)(IN PCSR_THREAD ThreadData, - IN PHARDERROR_MSG HardErrorMessage); - -typedef NTSTATUS (WINAPI *CSRPLUGIN_PROCESS_INHERIT_PROC)(IN PCSR_PROCESS SourceProcessData, - IN PCSR_PROCESS TargetProcessData); - -typedef ULONG (WINAPI *CSRPLUGIN_PROCESS_DELETED_PROC)(IN PCSR_PROCESS ProcessData, IN ULONG Unused, IN BOOLEAN Flag); - -typedef struct tagCSRSS_SERVER_PROCS -{ - CSRPLUGIN_INIT_COMPLETE_PROC InitCompleteProc; - CSRPLUGIN_HARDERROR_PROC HardErrorProc; - CSRPLUGIN_PROCESS_INHERIT_PROC ProcessInheritProc; - CSRPLUGIN_PROCESS_DELETED_PROC ProcessDeletedProc; -} CSRPLUGIN_SERVER_PROCS, *PCSRPLUGIN_SERVER_PROCS; - -typedef BOOL (WINAPI *CSRPLUGIN_INITIALIZE_PROC)(PCSRSS_API_DEFINITION *ApiDefinitions, - PCSRPLUGIN_SERVER_PROCS ServerProcs); - -/* EOF */ diff --git a/deprecated/csrsrv/init.c b/deprecated/csrsrv/init.c deleted file mode 100644 index 45a44336cc1..00000000000 --- a/deprecated/csrsrv/init.c +++ /dev/null @@ -1,1144 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS CSR Sub System - * FILE: subsystems/win32/csrss/csrsrv/init.c - * PURPOSE: CSR Server DLL Initialization - * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) - * ReactOS Portable Systems Group - */ - -/* INCLUDES *******************************************************************/ - -#include "srv.h" -#define NDEBUG -#include - -/* DATA ***********************************************************************/ - -HANDLE CsrHeap = (HANDLE) 0; -HANDLE CsrObjectDirectory = (HANDLE) 0; -UNICODE_STRING CsrDirectoryName; -UNICODE_STRING CsrSbApiPortName; -HANDLE CsrSbApiPort = 0; -PCSR_THREAD CsrSbApiRequestThreadPtr; -HANDLE CsrSmApiPort; -HANDLE hSbApiPort = (HANDLE) 0; -HANDLE CsrApiPort = (HANDLE) 0; -ULONG CsrDebug = 0;//0xFFFFFFFF; -ULONG CsrMaxApiRequestThreads; -ULONG CsrTotalPerProcessDataLength; -ULONG SessionId; -HANDLE BNOLinksDirectory; -HANDLE SessionObjectDirectory; -HANDLE DosDevicesDirectory; -HANDLE CsrInitializationEvent; -SYSTEM_BASIC_INFORMATION CsrNtSysInfo; - -/* PRIVATE FUNCTIONS **********************************************************/ - -VOID -CallHardError(IN PCSR_THREAD ThreadData, - IN PHARDERROR_MSG HardErrorMessage) -{ - unsigned i; - PCSR_SERVER_DLL ServerDll; - - DPRINT("CSR: %s called\n", __FUNCTION__); - - /* Notify the Server DLLs */ - for (i = 0; i < CSR_SERVER_DLL_MAX; i++) - { - /* Get the current Server DLL */ - ServerDll = CsrLoadedServerDll[i]; - - /* Make sure it's valid and that it has callback */ - if ((ServerDll) && (ServerDll->HardErrorCallback)) - { - ServerDll->HardErrorCallback(ThreadData, HardErrorMessage); - } - } -} - -NTSTATUS -CallProcessCreated(IN PCSR_PROCESS SourceProcessData, - IN PCSR_PROCESS TargetProcessData) -{ - NTSTATUS Status = STATUS_SUCCESS; - unsigned i; - PCSR_SERVER_DLL ServerDll; - - DPRINT("CSR: %s called\n", __FUNCTION__); - - /* Notify the Server DLLs */ - for (i = 0; i < CSR_SERVER_DLL_MAX; i++) - { - /* Get the current Server DLL */ - ServerDll = CsrLoadedServerDll[i]; - - /* Make sure it's valid and that it has callback */ - if ((ServerDll) && (ServerDll->NewProcessCallback)) - { - Status = ServerDll->NewProcessCallback(SourceProcessData, TargetProcessData); - } - } - - return Status; -} - -CSRSS_API_DEFINITION NativeDefinitions[] = - { - CSRSS_DEFINE_API(CREATE_PROCESS, CsrSrvCreateProcess), - CSRSS_DEFINE_API(CREATE_THREAD, CsrSrvCreateThread), - CSRSS_DEFINE_API(TERMINATE_PROCESS, CsrTerminateProcess), - CSRSS_DEFINE_API(CONNECT_PROCESS, CsrConnectProcess), - CSRSS_DEFINE_API(REGISTER_SERVICES_PROCESS, CsrRegisterServicesProcess), - CSRSS_DEFINE_API(GET_SHUTDOWN_PARAMETERS, CsrGetShutdownParameters), - CSRSS_DEFINE_API(SET_SHUTDOWN_PARAMETERS, CsrSetShutdownParameters), - { 0, 0, NULL } - }; - -/* === INIT ROUTINES === */ - -VOID -WINAPI -BasepFakeStaticServerData(VOID); - -/*++ - * @name CsrSetProcessSecurity - * - * The CsrSetProcessSecurity routine protects access to the CSRSS process - * from unauthorized tampering. - * - * @param None. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * otherwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrSetProcessSecurity(VOID) -{ - NTSTATUS Status; - HANDLE hToken, hProcess = NtCurrentProcess(); - ULONG Length; - PTOKEN_USER TokenInfo = NULL; - PSECURITY_DESCRIPTOR ProcSd = NULL; - PACL Dacl; - PSID UserSid; - - /* Open our token */ - Status = NtOpenProcessToken(hProcess, TOKEN_QUERY, &hToken); - if (!NT_SUCCESS(Status)) goto Quickie; - - /* Get the Token User Length */ - NtQueryInformationToken(hToken, TokenUser, NULL, 0, &Length); - - /* Allocate space for it */ - TokenInfo = RtlAllocateHeap(CsrHeap, HEAP_ZERO_MEMORY, Length); - if (!TokenInfo) - { - Status = STATUS_NO_MEMORY; - goto Quickie; - } - - /* Now query the data */ - Status = NtQueryInformationToken(hToken, TokenUser, TokenInfo, Length, &Length); - NtClose(hToken); - if (!NT_SUCCESS(Status)) goto Quickie; - - /* Now check the SID Length */ - UserSid = TokenInfo->User.Sid; - Length = RtlLengthSid(UserSid) + sizeof(ACL) + sizeof(ACCESS_ALLOWED_ACE); - - /* Allocate a buffer for the Security Descriptor, with SID and DACL */ - ProcSd = RtlAllocateHeap(CsrHeap, HEAP_ZERO_MEMORY, SECURITY_DESCRIPTOR_MIN_LENGTH + Length); - if (!ProcSd) - { - Status = STATUS_NO_MEMORY; - goto Quickie; - } - - /* Set the pointer to the DACL */ - Dacl = (PACL)((ULONG_PTR)ProcSd + SECURITY_DESCRIPTOR_MIN_LENGTH); - - /* Now create the SD itself */ - Status = RtlCreateSecurityDescriptor(ProcSd, SECURITY_DESCRIPTOR_REVISION); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: SD creation failed - status = %lx\n", Status); - goto Quickie; - } - - /* Create the DACL for it*/ - Status = RtlCreateAcl(Dacl, Length, ACL_REVISION2); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: DACL creation failed - status = %lx\n", Status); - goto Quickie; - } - - /* Create the ACE */ - Status = RtlAddAccessAllowedAce(Dacl, - ACL_REVISION, - PROCESS_VM_READ | PROCESS_VM_WRITE | - PROCESS_VM_OPERATION | PROCESS_DUP_HANDLE | - PROCESS_TERMINATE | PROCESS_SUSPEND_RESUME | - PROCESS_QUERY_INFORMATION | READ_CONTROL, - UserSid); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: ACE creation failed - status = %lx\n", Status); - goto Quickie; - } - - /* Clear the DACL in the SD */ - Status = RtlSetDaclSecurityDescriptor(ProcSd, TRUE, Dacl, FALSE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: set DACL failed - status = %lx\n", Status); - goto Quickie; - } - - /* Write the SD into the Process */ - Status = NtSetSecurityObject(hProcess, DACL_SECURITY_INFORMATION, ProcSd); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: set process DACL failed - status = %lx\n", Status); - goto Quickie; - } - - /* Free the memory and return */ -Quickie: - if (ProcSd) RtlFreeHeap(CsrHeap, 0, ProcSd); - RtlFreeHeap(CsrHeap, 0, TokenInfo); - return Status; -} - -/*++ - * @name CsrSetDirectorySecurity - * - * The CsrSetDirectorySecurity routine sets the security descriptor for the - * specified Object Directory. - * - * @param ObjectDirectory - * Handle fo the Object Directory to protect. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * otherwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrSetDirectorySecurity(IN HANDLE ObjectDirectory) -{ - /* FIXME: Implement */ - return STATUS_SUCCESS; -} - -/*++ - * @name GetDosDevicesProtection - * - * The GetDosDevicesProtection creates a security descriptor for the DOS Devices - * Object Directory. - * - * @param DosDevicesSd - * Pointer to the Security Descriptor to return. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * otherwise. - * - * @remarks Depending on the DOS Devices Protection Mode (set in the registry), - * regular users may or may not have full access to the directory. - * - *--*/ -NTSTATUS -NTAPI -GetDosDevicesProtection(OUT PSECURITY_DESCRIPTOR DosDevicesSd) -{ - SID_IDENTIFIER_AUTHORITY WorldAuthority = {SECURITY_WORLD_SID_AUTHORITY}; - SID_IDENTIFIER_AUTHORITY CreatorAuthority = {SECURITY_CREATOR_SID_AUTHORITY}; - SID_IDENTIFIER_AUTHORITY NtSidAuthority = {SECURITY_NT_AUTHORITY}; - PSID WorldSid, CreatorSid, AdminSid, SystemSid; - UCHAR KeyValueBuffer[0x40]; - PKEY_VALUE_PARTIAL_INFORMATION KeyValuePartialInfo; - UNICODE_STRING KeyName; - ULONG ProtectionMode = 0; - OBJECT_ATTRIBUTES ObjectAttributes; - PACL Dacl; - PACCESS_ALLOWED_ACE Ace; - HANDLE hKey; - NTSTATUS Status; - ULONG ResultLength, SidLength, AclLength; - - /* Create the SD */ - Status = RtlCreateSecurityDescriptor(DosDevicesSd, SECURITY_DESCRIPTOR_REVISION); - ASSERT(NT_SUCCESS(Status)); - - /* Initialize the System SID */ - Status = RtlAllocateAndInitializeSid(&NtSidAuthority, 1, - SECURITY_LOCAL_SYSTEM_RID, - 0, 0, 0, 0, 0, 0, 0, - &SystemSid); - ASSERT(NT_SUCCESS(Status)); - - /* Initialize the World SID */ - Status = RtlAllocateAndInitializeSid(&WorldAuthority, 1, - SECURITY_WORLD_RID, - 0, 0, 0, 0, 0, 0, 0, - &WorldSid); - ASSERT(NT_SUCCESS(Status)); - - /* Initialize the Admin SID */ - Status = RtlAllocateAndInitializeSid(&NtSidAuthority, 2, - SECURITY_BUILTIN_DOMAIN_RID, - DOMAIN_ALIAS_RID_ADMINS, - 0, 0, 0, 0, 0, 0, - &AdminSid); - ASSERT(NT_SUCCESS(Status)); - - /* Initialize the Creator SID */ - Status = RtlAllocateAndInitializeSid(&CreatorAuthority, 1, - SECURITY_CREATOR_OWNER_RID, - 0, 0, 0, 0, 0, 0, 0, - &CreatorSid); - ASSERT(NT_SUCCESS(Status)); - - /* Open the Session Manager Key */ - RtlInitUnicodeString(&KeyName, SM_REG_KEY); - InitializeObjectAttributes(&ObjectAttributes, - &KeyName, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - Status = NtOpenKey(&hKey, KEY_READ, &ObjectAttributes); - if (NT_SUCCESS(Status)) - { - /* Read the key value */ - RtlInitUnicodeString(&KeyName, L"ProtectionMode"); - Status = NtQueryValueKey(hKey, - &KeyName, - KeyValuePartialInformation, - KeyValueBuffer, - sizeof(KeyValueBuffer), - &ResultLength); - - /* Make sure it's what we expect it to be */ - KeyValuePartialInfo = (PKEY_VALUE_PARTIAL_INFORMATION)KeyValueBuffer; - if ((NT_SUCCESS(Status)) && (KeyValuePartialInfo->Type == REG_DWORD) && - (*(PULONG)KeyValuePartialInfo->Data)) - { - /* Save the Protection Mode */ - ProtectionMode = *(PULONG)KeyValuePartialInfo->Data; - } - - /* Close the handle */ - NtClose(hKey); - } - - /* Check the Protection Mode */ - if (ProtectionMode & 3) - { - /* Calculate SID Lengths */ - SidLength = RtlLengthSid(CreatorSid) + RtlLengthSid(SystemSid) + - RtlLengthSid(AdminSid); - AclLength = sizeof(ACL) + 3 * sizeof(ACCESS_ALLOWED_ACE) + SidLength; - - /* Allocate memory for the DACL */ - Dacl = RtlAllocateHeap(CsrHeap, HEAP_ZERO_MEMORY, AclLength); - ASSERT(Dacl != NULL); - - /* Build the ACL and add 3 ACEs */ - Status = RtlCreateAcl(Dacl, AclLength, ACL_REVISION2); - ASSERT(NT_SUCCESS(Status)); - Status = RtlAddAccessAllowedAce(Dacl, ACL_REVISION, GENERIC_ALL, SystemSid); - ASSERT(NT_SUCCESS(Status)); - Status = RtlAddAccessAllowedAce(Dacl, ACL_REVISION, GENERIC_ALL, AdminSid); - ASSERT(NT_SUCCESS(Status)); - Status = RtlAddAccessAllowedAce(Dacl, ACL_REVISION, GENERIC_ALL, CreatorSid); - ASSERT(NT_SUCCESS(Status)); - - /* Edit the ACEs to make them inheritable */ - Status = RtlGetAce(Dacl, 0, (PVOID*)&Ace); - ASSERT(NT_SUCCESS(Status)); - Ace->Header.AceFlags |= OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE; - Status = RtlGetAce(Dacl, 1, (PVOID*)&Ace); - ASSERT(NT_SUCCESS(Status)); - Ace->Header.AceFlags |= OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE; - Status = RtlGetAce(Dacl, 2, (PVOID*)&Ace); - ASSERT(NT_SUCCESS(Status)); - Ace->Header.AceFlags |= OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE | INHERIT_ONLY_ACE; - - /* Set this DACL with the SD */ - Status = RtlSetDaclSecurityDescriptor(DosDevicesSd, TRUE, Dacl, FALSE); - ASSERT(NT_SUCCESS(Status)); - goto Quickie; - } - else - { - /* Calculate SID Lengths */ - SidLength = RtlLengthSid(WorldSid) + RtlLengthSid(SystemSid); - AclLength = sizeof(ACL) + 3 * sizeof(ACCESS_ALLOWED_ACE) + SidLength; - - /* Allocate memory for the DACL */ - Dacl = RtlAllocateHeap(CsrHeap, HEAP_ZERO_MEMORY, AclLength); - ASSERT(Dacl != NULL); - - /* Build the ACL and add 3 ACEs */ - Status = RtlCreateAcl(Dacl, AclLength, ACL_REVISION2); - ASSERT(NT_SUCCESS(Status)); - Status = RtlAddAccessAllowedAce(Dacl, ACL_REVISION, GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE, WorldSid); - ASSERT(NT_SUCCESS(Status)); - Status = RtlAddAccessAllowedAce(Dacl, ACL_REVISION, GENERIC_ALL, SystemSid); - ASSERT(NT_SUCCESS(Status)); - Status = RtlAddAccessAllowedAce(Dacl, ACL_REVISION, GENERIC_ALL, WorldSid); - ASSERT(NT_SUCCESS(Status)); - - /* Edit the last ACE to make it inheritable */ - Status = RtlGetAce(Dacl, 2, (PVOID*)&Ace); - ASSERT(NT_SUCCESS(Status)); - Ace->Header.AceFlags |= OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE | INHERIT_ONLY_ACE; - - /* Set this DACL with the SD */ - Status = RtlSetDaclSecurityDescriptor(DosDevicesSd, TRUE, Dacl, FALSE); - ASSERT(NT_SUCCESS(Status)); - goto Quickie; - } - -/* FIXME: failure cases! Fail: */ - /* Free the memory */ - RtlFreeHeap(CsrHeap, 0, Dacl); - -/* FIXME: semi-failure cases! Quickie: */ -Quickie: - /* Free the SIDs */ - RtlFreeSid(SystemSid); - RtlFreeSid(WorldSid); - RtlFreeSid(AdminSid); - RtlFreeSid(CreatorSid); - - /* Return */ - return Status; -} - -/*++ - * @name FreeDosDevicesProtection - * - * The FreeDosDevicesProtection frees the security descriptor that was created - * by GetDosDevicesProtection - * - * @param DosDevicesSd - * Pointer to the security descriptor to free. - - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -FreeDosDevicesProtection(IN PSECURITY_DESCRIPTOR DosDevicesSd) -{ - PACL Dacl; - BOOLEAN Present, Default; - NTSTATUS Status; - - /* Get the DACL corresponding to this SD */ - Status = RtlGetDaclSecurityDescriptor(DosDevicesSd, &Present, &Dacl, &Default); - ASSERT(NT_SUCCESS(Status)); - ASSERT(Present); - ASSERT(Dacl != NULL); - - /* Free it */ - if ((NT_SUCCESS(Status)) && (Dacl)) RtlFreeHeap(CsrHeap, 0, Dacl); -} - -/*++ - * @name CsrCreateSessionObjectDirectory - * - * The CsrCreateSessionObjectDirectory routine creates the BaseNamedObjects, - * Session and Dos Devices directories for the specified session. - * - * @param Session - * Session ID for which to create the directories. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * otherwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrCreateSessionObjectDirectory(IN ULONG Session) -{ - WCHAR SessionBuffer[512], BnoBuffer[512]; - UNICODE_STRING SessionString, BnoString; - OBJECT_ATTRIBUTES ObjectAttributes; - HANDLE BnoHandle; - SECURITY_DESCRIPTOR DosDevicesSd; - NTSTATUS Status; - - /* Generate the Session BNOLINKS Directory name */ - swprintf(SessionBuffer, L"%ws\\BNOLINKS", SESSION_ROOT); - RtlInitUnicodeString(&SessionString, SessionBuffer); - - /* Create it */ - InitializeObjectAttributes(&ObjectAttributes, - &SessionString, - OBJ_OPENIF | OBJ_CASE_INSENSITIVE, - NULL, - NULL); - Status = NtCreateDirectoryObject(&BNOLinksDirectory, - DIRECTORY_ALL_ACCESS, - &ObjectAttributes); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: NtCreateDirectoryObject failed in " - "CsrCreateSessionObjectDirectory - status = %lx\n", Status); - return Status; - } - - /* Now add the Session ID */ - swprintf(SessionBuffer, L"%ld", Session); - RtlInitUnicodeString(&SessionString, SessionBuffer); - - /* Check if this is the first Session */ - if (Session) - { - /* Not the first, so the name will be slighly more complex */ - swprintf(BnoBuffer, L"%ws\\%ld\\BaseNamedObjects", SESSION_ROOT, Session); - RtlInitUnicodeString(&BnoString, BnoBuffer); - } - else - { - /* Use the direct name */ - RtlInitUnicodeString(&BnoString, L"\\BaseNamedObjects"); - } - - /* Create the symlink */ - InitializeObjectAttributes(&ObjectAttributes, - &SessionString, - OBJ_OPENIF | OBJ_CASE_INSENSITIVE, - BNOLinksDirectory, - NULL); - Status = NtCreateSymbolicLinkObject(&BnoHandle, - SYMBOLIC_LINK_ALL_ACCESS, - &ObjectAttributes, - &BnoString); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: NtCreateSymbolicLinkObject failed in " - "CsrCreateSessionObjectDirectory - status = %lx\n", Status); - return Status; - } - - /* Create the \DosDevices Security Descriptor */ - Status = GetDosDevicesProtection(&DosDevicesSd); - if (!NT_SUCCESS(Status)) return Status; - - /* Now create a directory for this session */ - swprintf(SessionBuffer, L"%ws\\%ld", SESSION_ROOT, Session); - RtlInitUnicodeString(&SessionString, SessionBuffer); - - /* Create the directory */ - InitializeObjectAttributes(&ObjectAttributes, - &SessionString, - OBJ_OPENIF | OBJ_CASE_INSENSITIVE, - 0, - &DosDevicesSd); - Status = NtCreateDirectoryObject(&SessionObjectDirectory, - DIRECTORY_ALL_ACCESS, - &ObjectAttributes); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: NtCreateDirectoryObject failed in " - "CsrCreateSessionObjectDirectory - status = %lx\n", Status); - FreeDosDevicesProtection(&DosDevicesSd); - return Status; - } - - /* Next, create a directory for this session's DOS Devices */ - RtlInitUnicodeString(&SessionString, L"DosDevices"); - InitializeObjectAttributes(&ObjectAttributes, - &SessionString, - OBJ_CASE_INSENSITIVE, - SessionObjectDirectory, - &DosDevicesSd); - Status = NtCreateDirectoryObject(&DosDevicesDirectory, - DIRECTORY_ALL_ACCESS, - &ObjectAttributes); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: NtCreateDirectoryObject failed in " - "CsrCreateSessionObjectDirectory - status = %lx\n", Status); - } - - /* Release the Security Descriptor */ - FreeDosDevicesProtection(&DosDevicesSd); - - /* Return */ - return Status; -} - -/*++ - * @name CsrParseServerCommandLine - * - * The CsrParseServerCommandLine routine parses the CSRSS command-line in the - * registry and performs operations for each entry found. - * - * @param ArgumentCount - * Number of arguments on the command line. - * - * @param Arguments - * Array of arguments. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * otherwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -FASTCALL -CsrParseServerCommandLine(IN ULONG ArgumentCount, - IN PCHAR Arguments[]) -{ - NTSTATUS Status; - PCHAR ParameterName = NULL, ParameterValue = NULL, EntryPoint, ServerString; - ULONG i, DllIndex; - ANSI_STRING AnsiString; - OBJECT_ATTRIBUTES ObjectAttributes; - - /* Set the Defaults */ - CsrTotalPerProcessDataLength = 0; - CsrObjectDirectory = NULL; - CsrMaxApiRequestThreads = 16; - - /* Save our Session ID, and create a Directory for it */ - SessionId = NtCurrentPeb()->SessionId; - Status = CsrCreateSessionObjectDirectory(SessionId); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: CsrCreateSessionObjectDirectory failed (%lx)\n", - Status); - - /* It's not fatal if the session ID isn't zero */ - if (SessionId) return Status; - ASSERT(NT_SUCCESS(Status)); - } - - /* Loop through every argument */ - for (i = 1; i < ArgumentCount; i++) - { - /* Split Name and Value */ - ParameterName = Arguments[i]; - ParameterValue = NULL; - ParameterValue = strchr(ParameterName, '='); - if (ParameterValue) *ParameterValue++ = ANSI_NULL; - - /* Check for Object Directory */ - if (!_stricmp(ParameterName, "ObjectDirectory")) - { - /* Check if a session ID is specified */ - if (SessionId) - { - DPRINT1("Sessions not yet implemented\n"); - ASSERT(SessionId); - } - - /* Initialize the directory name */ - RtlInitAnsiString(&AnsiString, ParameterValue); - Status = RtlAnsiStringToUnicodeString(&CsrDirectoryName, - &AnsiString, - TRUE); - ASSERT(NT_SUCCESS(Status) || SessionId != 0); - if (!NT_SUCCESS(Status)) return Status; - - /* Create it */ - InitializeObjectAttributes(&ObjectAttributes, - &CsrDirectoryName, - OBJ_OPENIF | OBJ_CASE_INSENSITIVE | OBJ_PERMANENT, - NULL, - NULL); - Status = NtCreateDirectoryObject(&CsrObjectDirectory, - DIRECTORY_ALL_ACCESS, - &ObjectAttributes); - if (!NT_SUCCESS(Status)) return Status; - - /* Secure it */ - Status = CsrSetDirectorySecurity(CsrObjectDirectory); - if (!NT_SUCCESS(Status)) return Status; - } - else if (!_stricmp(ParameterName, "SubSystemType")) - { - /* Ignored */ - } - else if (!_stricmp(ParameterName, "MaxRequestThreads")) - { - Status = RtlCharToInteger(ParameterValue, - 0, - &CsrMaxApiRequestThreads); - } - else if (!_stricmp(ParameterName, "RequestThreads")) - { - /* Ignored */ - Status = STATUS_SUCCESS; - } - else if (!_stricmp(ParameterName, "ProfileControl")) - { - /* Ignored */ - } - else if (!_stricmp(ParameterName, "SharedSection")) - { - /* Create the Section */ - Status = CsrSrvCreateSharedSection(ParameterValue); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: *** Invalid syntax for %s=%s (Status == %X)\n", - ParameterName, ParameterValue, Status); - return Status; - } - - /* Load us */ - Status = CsrLoadServerDll("CSRSS", NULL, CSR_SRV_SERVER); - } - else if (!_stricmp(ParameterName, "ServerDLL")) - { - /* Loop the command line */ - EntryPoint = NULL; - Status = STATUS_INVALID_PARAMETER; - ServerString = ParameterValue; - while (*ServerString) - { - /* Check for the Entry Point */ - if ((*ServerString == ':') && (!EntryPoint)) - { - /* Found it. Add a nullchar and save it */ - *ServerString++ = ANSI_NULL; - EntryPoint = ServerString; - } - - /* Check for the Dll Index */ - if (*ServerString++ == ',') break; - } - - /* Did we find something to load? */ - if (!*ServerString) - { - DPRINT1("CSRSS: *** Invalid syntax for ServerDll=%s (Status == %X)\n", - ParameterValue, Status); - return Status; - } - - /* Convert it to a ULONG */ - Status = RtlCharToInteger(ServerString, 10, &DllIndex); - - /* Add a null char if it was valid */ - if (NT_SUCCESS(Status)) ServerString[-1] = ANSI_NULL; - - /* Load it */ - if (CsrDebug & 1) DPRINT1("CSRSS: Loading ServerDll=%s:%s\n", ParameterValue, EntryPoint); - - /* Hackito ergo sum */ - Status = STATUS_SUCCESS; - if (strstr(ParameterValue, "basesrv")) - { - DPRINT1("Fake basesrv init\n"); - BasepFakeStaticServerData(); - } -// else -// { -// Status = CsrLoadServerDll(ParameterValue, EntryPoint, 2); -// } - // Status = CsrLoadServerDll(ParameterValue, EntryPoint, DllIndex); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: *** Failed loading ServerDll=%s (Status == 0x%x)\n", - ParameterValue, Status); - return Status; - } - } - else if (!_stricmp(ParameterName, "Windows")) - { - /* Ignored */ - } - else - { - /* Invalid parameter on the command line */ - Status = STATUS_INVALID_PARAMETER; - } - } - - /* Return status */ - return Status; -} - -/*++ - * @name CsrCreateLocalSystemSD - * - * The CsrCreateLocalSystemSD routine creates a Security Descriptor for - * the local account with PORT_ALL_ACCESS. - * - * @param LocalSystemSd - * Pointer to a pointer to the security descriptor to create. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * otherwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrCreateLocalSystemSD(OUT PSECURITY_DESCRIPTOR *LocalSystemSd) -{ - SID_IDENTIFIER_AUTHORITY NtSidAuthority = {SECURITY_NT_AUTHORITY}; - PSID SystemSid; - ULONG Length; - PSECURITY_DESCRIPTOR SystemSd; - PACL Dacl; - NTSTATUS Status; - - /* Initialize the System SID */ - RtlAllocateAndInitializeSid(&NtSidAuthority, 1, - SECURITY_LOCAL_SYSTEM_RID, - 0, 0, 0, 0, 0, 0, 0, - &SystemSid); - - /* Get the length of the SID */ - Length = RtlLengthSid(SystemSid) + sizeof(ACL) + sizeof(ACCESS_ALLOWED_ACE); - - /* Allocate a buffer for the Security Descriptor, with SID and DACL */ - SystemSd = RtlAllocateHeap(CsrHeap, 0, SECURITY_DESCRIPTOR_MIN_LENGTH + Length); - - /* Set the pointer to the DACL */ - Dacl = (PACL)((ULONG_PTR)SystemSd + SECURITY_DESCRIPTOR_MIN_LENGTH); - - /* Now create the SD itself */ - Status = RtlCreateSecurityDescriptor(SystemSd, SECURITY_DESCRIPTOR_REVISION); - if (!NT_SUCCESS(Status)) - { - /* Fail */ - RtlFreeHeap(CsrHeap, 0, SystemSd); - return Status; - } - - /* Create the DACL for it */ - RtlCreateAcl(Dacl, Length, ACL_REVISION2); - - /* Create the ACE */ - Status = RtlAddAccessAllowedAce(Dacl, ACL_REVISION, PORT_ALL_ACCESS, SystemSid); - if (!NT_SUCCESS(Status)) - { - /* Fail */ - RtlFreeHeap(CsrHeap, 0, SystemSd); - return Status; - } - - /* Clear the DACL in the SD */ - Status = RtlSetDaclSecurityDescriptor(SystemSd, TRUE, Dacl, FALSE); - if (!NT_SUCCESS(Status)) - { - /* Fail */ - RtlFreeHeap(CsrHeap, 0, SystemSd); - return Status; - } - - /* Free the SID and return*/ - RtlFreeSid(SystemSid); - *LocalSystemSd = SystemSd; - return Status; -} - -/*++ - * @name CsrSbApiPortInitialize - * - * The CsrSbApiPortInitialize routine initializes the LPC Port used for - * communications with the Session Manager (SM) and initializes the static - * thread that will handle connection requests and APIs. - * - * @param None - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * otherwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrSbApiPortInitialize(VOID) -{ - ULONG Size; - PSECURITY_DESCRIPTOR PortSd; - OBJECT_ATTRIBUTES ObjectAttributes; - NTSTATUS Status; - HANDLE hRequestThread; - CLIENT_ID ClientId; - - /* Calculate how much space we'll need for the Port Name */ - Size = CsrDirectoryName.Length + sizeof(SB_PORT_NAME) + sizeof(WCHAR); - - /* Create the buffer for it */ - CsrSbApiPortName.Buffer = RtlAllocateHeap(CsrHeap, 0, Size); - if (!CsrSbApiPortName.Buffer) return STATUS_NO_MEMORY; - - /* Setup the rest of the empty string */ - CsrSbApiPortName.Length = 0; - CsrSbApiPortName.MaximumLength = (USHORT)Size; - - /* Now append the full port name */ - RtlAppendUnicodeStringToString(&CsrSbApiPortName, &CsrDirectoryName); - RtlAppendUnicodeToString(&CsrSbApiPortName, UNICODE_PATH_SEP); - RtlAppendUnicodeToString(&CsrSbApiPortName, SB_PORT_NAME); - if (CsrDebug & 2) DPRINT1("CSRSS: Creating %wZ port and associated thread\n", &CsrSbApiPortName); - - /* Create Security Descriptor for this Port */ - Status = CsrCreateLocalSystemSD(&PortSd); - if (!NT_SUCCESS(Status)) return Status; - - /* Initialize the Attributes */ - InitializeObjectAttributes(&ObjectAttributes, - &CsrSbApiPortName, - 0, - NULL, - PortSd); - - /* Create the Port Object */ - Status = NtCreatePort(&CsrSbApiPort, - &ObjectAttributes, - sizeof(SB_CONNECTION_INFO), - sizeof(SB_API_MSG), - 32 * sizeof(SB_API_MSG)); - if (PortSd) RtlFreeHeap(CsrHeap, 0, PortSd); - - if (NT_SUCCESS(Status)) - { - /* Create the Thread to handle the API Requests */ - Status = RtlCreateUserThread(NtCurrentProcess(), - NULL, - TRUE, - 0, - 0, - 0, - (PVOID)CsrSbApiRequestThread, - NULL, - &hRequestThread, - &ClientId); - if (NT_SUCCESS(Status)) - { - /* Add it as a Static Server Thread */ - CsrSbApiRequestThreadPtr = CsrAddStaticServerThread(hRequestThread, - &ClientId, - 0); - - /* Activate it */ - Status = NtResumeThread(hRequestThread, NULL); - } - } - - return Status; -} - -/* PUBLIC FUNCTIONS ***********************************************************/ - -/*++ - * @name CsrServerInitialization - * @implemented NT4 - * - * The CsrServerInitialization routine is the native (not Server) entrypoint - * of this Server DLL. It serves as the entrypoint for csrss. - * - * @param ArgumentCount - * Number of arguments on the command line. - * - * @param Arguments - * Array of arguments from the command line. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * otherwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrServerInitialization(IN ULONG ArgumentCount, - IN PCHAR Arguments[]) -{ - NTSTATUS Status = STATUS_SUCCESS; - DPRINT("CSRSRV: %s called\n", __FUNCTION__); - - /* Create the Init Event */ - Status = NtCreateEvent(&CsrInitializationEvent, - EVENT_ALL_ACCESS, - NULL, - SynchronizationEvent, - FALSE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: NtCreateEvent failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* Cache System Basic Information so we don't always request it */ - Status = NtQuerySystemInformation(SystemBasicInformation, - &CsrNtSysInfo, - sizeof(SYSTEM_BASIC_INFORMATION), - NULL); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: NtQuerySystemInformation failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* Save our Heap */ - CsrHeap = RtlGetProcessHeap(); - - /* Set our Security Descriptor to protect the process */ - Status = CsrSetProcessSecurity(); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: CsrSetProcessSecurity failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* Set up Session Support */ - Status = CsrInitializeNtSessionList(); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: CsrInitializeSessions failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* Set up Process Support */ - Status = CsrInitializeProcessStructure(); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: CsrInitializeProcessStructure failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* Parse the command line */ - Status = CsrParseServerCommandLine(ArgumentCount, Arguments); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: CsrParseServerCommandLine failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - Status = CsrApiRegisterDefinitions(NativeDefinitions); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV failed in %s with status %lx\n", "CsrApiRegisterDefinitions", Status); - } - - /* Now initialize our API Port */ - Status = CsrApiPortInitialize(); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: CsrApiPortInitialize failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* Initialize Win32csr */ - Status = CsrLoadServerDll("win32csr", "Win32CsrInitialization", 2); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV failed in %s with status %lx\n", "CsrLoadServerDll", Status); - } - - /* Initialize the API Port for SM communication */ - Status = CsrSbApiPortInitialize(); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: CsrSbApiPortInitialize failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* We're all set! Connect to SM! */ - Status = SmConnectToSm(&CsrSbApiPortName, - CsrSbApiPort, - IMAGE_SUBSYSTEM_WINDOWS_GUI, - &CsrSmApiPort); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: SmConnectToSm failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* Finito! Signal the event */ - Status = NtSetEvent(CsrInitializationEvent, NULL); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: NtSetEvent failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* Close the event handle now */ - NtClose(CsrInitializationEvent); - - /* Have us handle Hard Errors */ - Status = NtSetDefaultHardErrorPort(CsrApiPort); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSRV:%s: NtSetDefaultHardErrorPort failed (Status=%08lx)\n", - __FUNCTION__, Status); - return Status; - } - - /* Return status */ - return Status; -} - -/*++ - * @name CsrPopulateDosDevices - * @unimplemented NT5.1 - * - * The CsrPopulateDosDevices routine uses the DOS Device Map from the Kernel - * to populate the Dos Devices Object Directory for the session. - * - * @param None. - * - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -CsrPopulateDosDevices(VOID) -{ - DPRINT1("Deprecated API\n"); - return; -} - -BOOL -NTAPI -DllMain(IN HANDLE hDll, - IN DWORD dwReason, - IN LPVOID lpReserved) -{ - /* We don't do much */ - UNREFERENCED_PARAMETER(hDll); - UNREFERENCED_PARAMETER(dwReason); - UNREFERENCED_PARAMETER(lpReserved); - return TRUE; -} - -/* EOF */ diff --git a/deprecated/csrsrv/procsup.c b/deprecated/csrsrv/procsup.c deleted file mode 100644 index 228597050c2..00000000000 --- a/deprecated/csrsrv/procsup.c +++ /dev/null @@ -1,1240 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS CSR Sub System - * FILE: subsystems/win32/csrss/csrsrv/procsup.c - * PURPOSE: CSR Process Management - * PROGRAMMERS: ReactOS Portable Systems Group - * Alex Ionescu - */ - -/* INCLUDES *******************************************************************/ - -#include - -#define NDEBUG -#include - -/* GLOBALS ********************************************************************/ - -RTL_CRITICAL_SECTION ProcessDataLock; -PCSR_PROCESS CsrRootProcess = NULL; -SECURITY_QUALITY_OF_SERVICE CsrSecurityQos = -{ - sizeof(SECURITY_QUALITY_OF_SERVICE), - SecurityImpersonation, - SECURITY_STATIC_TRACKING, - FALSE -}; -ULONG CsrProcessSequenceCount = 5; -extern ULONG CsrTotalPerProcessDataLength; - -/* FUNCTIONS ******************************************************************/ - -VOID -NTAPI -CsrSetToNormalPriority(VOID) -{ - KPRIORITY BasePriority = (8 + 1) + 4; - - /* Set the Priority */ - NtSetInformationProcess(NtCurrentProcess(), - ProcessBasePriority, - &BasePriority, - sizeof(KPRIORITY)); -} - -VOID -NTAPI -CsrSetToShutdownPriority(VOID) -{ - KPRIORITY SetBasePriority = (8 + 1) + 6; - BOOLEAN Old; - - /* Get the shutdown privilege */ - if (NT_SUCCESS(RtlAdjustPrivilege(SE_SHUTDOWN_PRIVILEGE, - TRUE, - FALSE, - &Old))) - { - /* Set the Priority */ - NtSetInformationProcess(NtCurrentProcess(), - ProcessBasePriority, - &SetBasePriority, - sizeof(KPRIORITY)); - } -} - -/*++ - * @name CsrGetProcessLuid - * @implemented NT4 - * - * Do nothing for 500ms. - * - * @param hProcess - * Optional handle to the process whose LUID should be returned. - * - * @param Luid - * Pointer to a LUID Pointer which will receive the CSR Process' LUID - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * otherwise. - * - * @remarks If hProcess is not supplied, then the current thread's token will - * be used. If that too is missing, then the current process' token - * will be used. - * - *--*/ -NTSTATUS -NTAPI -CsrGetProcessLuid(HANDLE hProcess OPTIONAL, - PLUID Luid) -{ - HANDLE hToken = NULL; - NTSTATUS Status; - ULONG Length; - PTOKEN_STATISTICS TokenStats; - - /* Check if we have a handle to a CSR Process */ - if (!hProcess) - { - /* We don't, so try opening the Thread's Token */ - Status = NtOpenThreadToken(NtCurrentThread(), - TOKEN_QUERY, - FALSE, - &hToken); - - /* Check for success */ - if (!NT_SUCCESS(Status)) - { - /* If we got some other failure, then return and quit */ - if (Status != STATUS_NO_TOKEN) return Status; - - /* We don't have a Thread Token, use a Process Token */ - hProcess = NtCurrentProcess(); - hToken = NULL; - } - } - - /* Check if we have a token by now */ - if (!hToken) - { - /* No token yet, so open the Process Token */ - Status = NtOpenProcessToken(hProcess, - TOKEN_QUERY, - &hToken); - if (!NT_SUCCESS(Status)) - { - /* Still no token, return the error */ - return Status; - } - } - - /* Now get the size we'll need for the Token Information */ - Status = NtQueryInformationToken(hToken, - TokenStatistics, - NULL, - 0, - &Length); - - /* Allocate memory for the Token Info */ - if (!(TokenStats = RtlAllocateHeap(CsrHeap, 0, Length))) - { - /* Fail and close the token */ - NtClose(hToken); - return STATUS_NO_MEMORY; - } - - /* Now query the information */ - Status = NtQueryInformationToken(hToken, - TokenStatistics, - TokenStats, - Length, - &Length); - - /* Close the handle */ - NtClose(hToken); - - /* Check for success */ - if (NT_SUCCESS(Status)) - { - /* Return the LUID */ - *Luid = TokenStats->AuthenticationId; - } - - /* Free the query information */ - RtlFreeHeap(CsrHeap, 0, TokenStats); - - /* Return the Status */ - return Status; -} - -/*++ - * @name CsrImpersonateClient - * @implemented NT4 - * - * The CsrImpersonateClient will impersonate the given CSR Thread. - * - * @param CsrThread - * Pointer to the CSR Thread to impersonate. - * - * @return TRUE if impersionation suceeded, false otherwise. - * - * @remarks Impersonation can be recursive. - * - *--*/ -BOOLEAN -NTAPI -CsrImpersonateClient(IN PCSR_THREAD CsrThread) -{ - NTSTATUS Status; - PCSR_THREAD CurrentThread = NtCurrentTeb()->CsrClientThread; - - /* Use the current thread if none given */ - if (!CsrThread) CsrThread = CurrentThread; - - /* Still no thread, something is wrong */ - if (!CsrThread) - { - /* Failure */ - return FALSE; - } - - /* Make the call */ - Status = NtImpersonateThread(NtCurrentThread(), - CsrThread->ThreadHandle, - &CsrSecurityQos); - - if (!NT_SUCCESS(Status)) - { - /* Failure */ -/* - DPRINT1("CSRSS: Can't impersonate client thread - Status = %lx\n", Status); - if (Status != STATUS_BAD_IMPERSONATION_LEVEL) DbgBreakPoint(); -*/ - return FALSE; - } - - /* Increase the impersonation count for the current thread */ - if (CurrentThread) ++CurrentThread->ImpersonationCount; - - /* Return Success */ - return TRUE; -} - -/*++ - * @name CsrRevertToSelf - * @implemented NT4 - * - * The CsrRevertToSelf routine will attempt to remove an active impersonation. - * - * @param None. - * - * @return TRUE if the reversion was succesful, false otherwise. - * - * @remarks Impersonation can be recursive; as such, the impersonation token - * will only be deleted once the CSR Thread's impersonaton count - * has reached zero. - * - *--*/ -BOOLEAN -NTAPI -CsrRevertToSelf(VOID) -{ - NTSTATUS Status; - PCSR_THREAD CurrentThread = NtCurrentTeb()->CsrClientThread; - HANDLE ImpersonationToken = NULL; - - /* Check if we have a Current Thread */ - if (CurrentThread) - { - /* Make sure impersonation is on */ - if (!CurrentThread->ImpersonationCount) - { - // DPRINT1("CSRSS: CsrRevertToSelf called while not impersonating\n"); - return FALSE; - } - else if (--CurrentThread->ImpersonationCount > 0) - { - /* Success; impersonation count decreased but still not zero */ - return TRUE; - } - } - - /* Impersonation has been totally removed, revert to ourselves */ - Status = NtSetInformationThread(NtCurrentThread(), - ThreadImpersonationToken, - &ImpersonationToken, - sizeof(HANDLE)); - - /* Return TRUE or FALSE */ - return NT_SUCCESS(Status); -} - -/*++ - * @name FindProcessForShutdown - * - * The FindProcessForShutdown routine returns a CSR Process which is ready - * to be shutdown, and sets the appropriate shutdown flags for it. - * - * @param CallerLuid - * Pointer to the LUID of the CSR Process calling this routine. - * - * @return Pointer to a CSR Process which is ready to be shutdown. - * - * @remarks None. - * - *--*/ -PCSR_PROCESS -NTAPI -FindProcessForShutdown(IN PLUID CallerLuid) -{ - PCSR_PROCESS CsrProcess, ReturnCsrProcess = NULL; - // PCSR_THREAD CsrThread; - NTSTATUS Status; - ULONG Level = 0; - LUID ProcessLuid; - LUID SystemLuid = SYSTEM_LUID; - // BOOLEAN IsSystemLuid = FALSE, IsOurLuid = FALSE; - PLIST_ENTRY NextEntry; - - /* Set the List Pointers */ - NextEntry = CsrRootProcess->ListLink.Flink; - while (NextEntry != &CsrRootProcess->ListLink) - { - /* Get the process */ - CsrProcess = CONTAINING_RECORD(NextEntry, CSR_PROCESS, ListLink); - - /* Move to the next entry */ - NextEntry = NextEntry->Flink; - - /* Skip this process if it's already been processed */ - if (CsrProcess->Flags & CsrProcessSkipShutdown) continue; - - /* Get the LUID of this Process */ - Status = CsrGetProcessLuid(CsrProcess->ProcessHandle, &ProcessLuid); - - /* Check if we didn't get access to the LUID */ - if (Status == STATUS_ACCESS_DENIED) - { - /* FIXME:Check if we have any threads */ -/* - if (CsrProcess->ThreadCount) - { - /\* Impersonate one of the threads and retry *\/ - CsrThread = CONTAINING_RECORD(CsrProcess->ThreadList.Flink, - CSR_THREAD, - Link); - CsrImpersonateClient(CsrThread); - Status = CsrGetProcessLuid(NULL, &ProcessLuid); - CsrRevertToSelf(); - } -*/ - } - - if (!NT_SUCCESS(Status)) - { - /* We didn't have access, so skip it */ - CsrProcess->Flags |= CsrProcessSkipShutdown; - continue; - } - - /* Check if this is the System LUID */ - if ((/*IsSystemLuid =*/ RtlEqualLuid(&ProcessLuid, &SystemLuid))) - { - /* Mark this process */ - CsrProcess->ShutdownFlags |= CsrShutdownSystem; - } - else if (!(/*IsOurLuid =*/ RtlEqualLuid(&ProcessLuid, CallerLuid))) - { - /* Our LUID doesn't match with the caller's */ - CsrProcess->ShutdownFlags |= CsrShutdownOther; - } - - /* Check if we're past the previous level */ - if (CsrProcess->ShutdownLevel > Level /* || !ReturnCsrProcess */) - { - /* Update the level */ - Level = CsrProcess->ShutdownLevel; - - /* Set the final process */ - ReturnCsrProcess = CsrProcess; - } - } - - /* Check if we found a process */ - if (ReturnCsrProcess) - { - /* Skip this one next time */ - ReturnCsrProcess->Flags |= CsrProcessSkipShutdown; - } - - return ReturnCsrProcess; -} - -/* This is really "CsrShutdownProcess", mostly */ -NTSTATUS -WINAPI -CsrEnumProcesses(IN CSRSS_ENUM_PROCESS_PROC EnumProc, - IN PVOID Context) -{ - PVOID* RealContext = (PVOID*)Context; - PLUID CallerLuid = RealContext[0]; - PCSR_PROCESS CsrProcess = NULL; - NTSTATUS Status = STATUS_UNSUCCESSFUL; - BOOLEAN FirstTry; - PLIST_ENTRY NextEntry; - ULONG Result = 0; - - /* Acquire process lock */ - CsrAcquireProcessLock(); - - /* Get the list pointers */ - NextEntry = CsrRootProcess->ListLink.Flink; - while (NextEntry != &CsrRootProcess->ListLink) - { - /* Get the Process */ - CsrProcess = CONTAINING_RECORD(NextEntry, CSR_PROCESS, ListLink); - - /* Remove the skip flag, set shutdown flags to 0*/ - CsrProcess->Flags &= ~CsrProcessSkipShutdown; - CsrProcess->ShutdownFlags = 0; - - /* Move to the next */ - NextEntry = NextEntry->Flink; - } - - /* Set shudown Priority */ - CsrSetToShutdownPriority(); - - /* Loop all processes */ - //DPRINT1("Enumerating for LUID: %lx %lx\n", CallerLuid->HighPart, CallerLuid->LowPart); - - /* Start looping */ - while (TRUE) - { - /* Find the next process to shutdown */ - FirstTry = TRUE; - if (!(CsrProcess = FindProcessForShutdown(CallerLuid))) - { - /* Done, quit */ - CsrReleaseProcessLock(); - Status = STATUS_SUCCESS; - goto Quickie; - } - -LoopAgain: - /* Release the lock, make the callback, and acquire it back */ - //DPRINT1("Found process: %lx\n", CsrProcess->ClientId.UniqueProcess); - CsrReleaseProcessLock(); - Result = (ULONG)EnumProc(CsrProcess, (PVOID)((ULONG_PTR)Context | FirstTry)); - CsrAcquireProcessLock(); - - /* Check the result */ - //DPRINT1("Result: %d\n", Result); - if (Result == CsrShutdownCsrProcess) - { - /* The callback unlocked the process */ - break; - } - else if (Result == CsrShutdownNonCsrProcess) - { - /* A non-CSR process, the callback didn't touch it */ - //continue; - } - else if (Result == CsrShutdownCancelled) - { - /* Shutdown was cancelled, unlock and exit */ - CsrReleaseProcessLock(); - Status = STATUS_CANCELLED; - goto Quickie; - } - - /* No matches during the first try, so loop again */ - if (FirstTry && Result == CsrShutdownNonCsrProcess) - { - FirstTry = FALSE; - goto LoopAgain; - } - } - -Quickie: - /* Return to normal priority */ - CsrSetToNormalPriority(); - return Status; -} - -/*++ - * @name CsrProcessRefcountZero - * - * The CsrProcessRefcountZero routine is executed when a CSR Process has lost - * all its active references. It removes and de-allocates the CSR Process. - * - * @param CsrProcess - * Pointer to the CSR Process that is to be deleted. - * - * @return None. - * - * @remarks Do not call this routine. It is reserved for the internal - * thread management routines when a CSR Process has lost all - * its references. - * - * This routine is called with the Process Lock held. - * - *--*/ -VOID -NTAPI -CsrProcessRefcountZero(IN PCSR_PROCESS CsrProcess) -{ - ASSERT(ProcessStructureListLocked()); - - /* Remove the Process from the list */ - CsrRemoveProcess(CsrProcess); - - /* Check if there's a session */ - if (CsrProcess->NtSession) - { - /* Dereference the Session */ - CsrDereferenceNtSession(CsrProcess->NtSession, 0); - } - - /* Close the Client Port if there is one */ - if (CsrProcess->ClientPort) NtClose(CsrProcess->ClientPort); - - /* Close the process handle */ - NtClose(CsrProcess->ProcessHandle); - - /* Free the Proces Object */ - CsrDeallocateProcess(CsrProcess); -} - -/*++ - * @name CsrLockedDereferenceProcess - * - * The CsrLockedDereferenceProcess dereferences a CSR Process while the - * Process Lock is already being held. - * - * @param CsrProcess - * Pointer to the CSR Process to be dereferenced. - * - * @return None. - * - * @remarks This routine will return with the Process Lock held. - * - *--*/ -VOID -NTAPI -CsrLockedDereferenceProcess(PCSR_PROCESS CsrProcess) -{ - LONG LockCount; - - /* Decrease reference count */ - LockCount = --CsrProcess->ReferenceCount; - ASSERT(LockCount >= 0); - if (!LockCount) - { - /* Call the generic cleanup code */ - DPRINT1("Should kill process: %p\n", CsrProcess); - CsrProcessRefcountZero(CsrProcess); - CsrAcquireProcessLock(); - } -} - -/*++ - * @name CsrDereferenceProcess - * @implemented NT4 - * - * The CsrDereferenceProcess routine removes a reference from a CSR Process. - * - * @param CsrThread - * Pointer to the CSR Process to dereference. - * - * @return None. - * - * @remarks If the reference count has reached zero (ie: the CSR Process has - * no more active references), it will be deleted. - * - *--*/ -VOID -NTAPI -CsrDereferenceProcess(IN PCSR_PROCESS CsrProcess) -{ - LONG LockCount; - - /* Acquire process lock */ - CsrAcquireProcessLock(); - - /* Decrease reference count */ - LockCount = --CsrProcess->ReferenceCount; - ASSERT(LockCount >= 0); - if (!LockCount) - { - /* Call the generic cleanup code */ - CsrProcessRefcountZero(CsrProcess); - } - else - { - /* Just release the lock */ - CsrReleaseProcessLock(); - } -} - -/*++ - * @name CsrDestroyProcess - * @implemented NT4 - * - * The CsrDestroyProcess routine destroys the CSR Process corresponding to - * a given Client ID. - * - * @param Cid - * Pointer to the Client ID Structure corresponding to the CSR - * Process which is about to be destroyed. - * - * @param ExitStatus - * Unused. - * - * @return STATUS_SUCCESS in case of success, STATUS_THREAD_IS_TERMINATING - * if the CSR Process is already terminating. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrDestroyProcess(IN PCLIENT_ID Cid, - IN NTSTATUS ExitStatus) -{ - PCSR_THREAD CsrThread; - PCSR_PROCESS CsrProcess; - CLIENT_ID ClientId = *Cid; - PLIST_ENTRY NextEntry; - - /* Acquire lock */ - CsrAcquireProcessLock(); - - /* Find the thread */ - CsrThread = CsrLocateThreadByClientId(&CsrProcess, &ClientId); - - /* Make sure we got one back, and that it's not already gone */ - if (!(CsrThread) || (CsrProcess->Flags & CsrProcessTerminating)) - { - /* Release the lock and return failure */ - CsrReleaseProcessLock(); - return STATUS_THREAD_IS_TERMINATING; - } - - /* Set the terminated flag */ - CsrProcess->Flags |= CsrProcessTerminating; - - /* Get the List Pointers */ - NextEntry = CsrProcess->ThreadList.Flink; - while (NextEntry != &CsrProcess->ThreadList) - { - /* Get the current thread entry */ - CsrThread = CONTAINING_RECORD(NextEntry, CSR_THREAD, Link); - - /* Make sure the thread isn't already dead */ - if (CsrThread->Flags & CsrThreadTerminated) - { - NextEntry = NextEntry->Flink; - continue; - } - - /* Set the Terminated flag */ - CsrThread->Flags |= CsrThreadTerminated; - - /* Acquire the Wait Lock */ - CsrAcquireWaitLock(); - - /* Do we have an active wait block? */ - if (CsrThread->WaitBlock) - { - /* Notify waiters of termination */ - CsrNotifyWaitBlock(CsrThread->WaitBlock, - NULL, - NULL, - NULL, - CsrProcessTerminating, - TRUE); - } - - /* Release the Wait Lock */ - CsrReleaseWaitLock(); - - /* Dereference the thread */ - CsrLockedDereferenceThread(CsrThread); - NextEntry = CsrProcess->ThreadList.Flink; - } - - /* Release the Process Lock and return success */ - CsrReleaseProcessLock(); - return STATUS_SUCCESS; -} - -/*++ - * @name CsrCreateProcess - * @implemented NT4 - * - * Do nothing for 500ms. - * - * @param ArgumentCount - * Description of the parameter. Wrapped to more lines on ~70th - * column. - * - * @param Arguments - * Description of the parameter. Wrapped to more lines on ~70th - * column. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * otherwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrCreateProcess(IN HANDLE hProcess, - IN HANDLE hThread, - IN PCLIENT_ID ClientId, - IN PCSR_NT_SESSION NtSession, - IN ULONG Flags, - IN PCLIENT_ID DebugCid) -{ - PCSR_THREAD CurrentThread = NtCurrentTeb()->CsrClientThread; - CLIENT_ID CurrentCid; - PCSR_PROCESS CurrentProcess; -// PVOID ProcessData; -// ULONG i; - PCSR_PROCESS CsrProcess; - NTSTATUS Status; - PCSR_THREAD CsrThread; - KERNEL_USER_TIMES KernelTimes; - - /* Get the current CID and lock Processes */ - CurrentCid = CurrentThread->ClientId; - CsrAcquireProcessLock(); - - /* Get the current CSR Thread */ - CurrentThread = CsrLocateThreadByClientId(&CurrentProcess, &CurrentCid); - if (!CurrentThread) - { - /* We've failed to locate the thread */ - CsrReleaseProcessLock(); - return STATUS_THREAD_IS_TERMINATING; - } - - /* Allocate a new Process Object */ - CsrProcess = CsrAllocateProcess(); - if (!CsrProcess) - { - /* Couldn't allocate Process */ - CsrReleaseProcessLock(); - return STATUS_NO_MEMORY; - } - -#if 0 - /* Inherit the Process Data */ - CurrentProcess = CurrentThread->Process; - ProcessData = &CurrentProcess->ServerData[CSR_SERVER_DLL_MAX]; - for (i = 0; i < CSR_SERVER_DLL_MAX; i++) - { - /* Check if the DLL is Loaded and has Per Process Data */ - if ((CsrLoadedServerDll[i]) && (CsrLoadedServerDll[i]->SizeOfProcessData)) - { - /* Set the pointer */ - CsrProcess->ServerData[i] = ProcessData; - - /* Copy the Data */ - RtlMoveMemory(ProcessData, - CurrentProcess->ServerData[i], - CsrLoadedServerDll[i]->SizeOfProcessData); - - /* Update next data pointer */ - ProcessData = (PVOID)((ULONG_PTR)ProcessData + - CsrLoadedServerDll[i]->SizeOfProcessData); - } - else - { - /* No data for this Server */ - CsrProcess->ServerData[i] = NULL; - } - } -#endif - - /* Set the Exception port to us */ - Status = NtSetInformationProcess(hProcess, - ProcessExceptionPort, - &CsrApiPort, - sizeof(HANDLE)); - if (!NT_SUCCESS(Status)) - { - /* Failed */ - CsrDeallocateProcess(CsrProcess); - CsrReleaseProcessLock(); - return STATUS_NO_MEMORY; - } - - /* If Check if CreateProcess got CREATE_NEW_PROCESS_GROUP */ - if (!(Flags & CsrProcessCreateNewGroup)) - { - /* Create new data */ - CsrProcess->ProcessGroupId = HandleToUlong(ClientId->UniqueProcess); - CsrProcess->ProcessGroupSequence = CsrProcess->SequenceNumber; - } - else - { - /* Copy it from the current process */ - CsrProcess->ProcessGroupId = CurrentProcess->ProcessGroupId; - CsrProcess->ProcessGroupSequence = CurrentProcess->ProcessGroupSequence; - } - - /* Check if this is a console process */ - if (Flags & CsrProcessIsConsoleApp) CsrProcess->Flags |= CsrProcessIsConsoleApp; - - /* Mask out non-debug flags */ - Flags &= ~(CsrProcessIsConsoleApp | CsrProcessCreateNewGroup | CsrProcessPriorityFlags); - - /* Check if every process will be debugged */ - if (!(Flags) && (CurrentProcess->DebugFlags & CsrDebugProcessChildren)) - { - /* Pass it on to the current process */ - CsrProcess->DebugFlags = CsrDebugProcessChildren; - CsrProcess->DebugCid = CurrentProcess->DebugCid; - } - - /* Check if Debugging was used on this process */ - if ((Flags & (CsrDebugOnlyThisProcess | CsrDebugProcessChildren)) && (DebugCid)) - { - /* Save the debug flag used */ - CsrProcess->DebugFlags = Flags; - - /* Save the CID */ - CsrProcess->DebugCid = *DebugCid; - } - - /* Check if we debugging is enabled */ - if (CsrProcess->DebugFlags) - { - /* Set the Debug Port to us */ - Status = NtSetInformationProcess(hProcess, - ProcessDebugPort, - &CsrApiPort, - sizeof(HANDLE)); - ASSERT(NT_SUCCESS(Status)); - if (!NT_SUCCESS(Status)) - { - /* Failed */ - CsrDeallocateProcess(CsrProcess); - CsrReleaseProcessLock(); - return STATUS_NO_MEMORY; - } - } - - /* Get the Thread Create Time */ - Status = NtQueryInformationThread(hThread, - ThreadTimes, - (PVOID)&KernelTimes, - sizeof(KernelTimes), - NULL); - if (!NT_SUCCESS(Status)) - { - /* Failed */ - CsrDeallocateProcess(CsrProcess); - CsrReleaseProcessLock(); - return STATUS_NO_MEMORY; - } - - /* Allocate a CSR Thread Structure */ - CsrThread = CsrAllocateThread(CsrProcess); - if (!CsrThread) - { - /* Failed */ - CsrDeallocateProcess(CsrProcess); - CsrReleaseProcessLock(); - return STATUS_NO_MEMORY; - } - - /* Save the data we have */ - CsrThread->CreateTime = KernelTimes.CreateTime; - CsrThread->ClientId = *ClientId; - CsrThread->ThreadHandle = hThread; - ProtectHandle(hThread); - CsrThread->Flags = 0; - - /* Insert the Thread into the Process */ - CsrInsertThread(CsrProcess, CsrThread); - - /* Reference the session */ - CsrReferenceNtSession(NtSession); - CsrProcess->NtSession = NtSession; - - /* Setup Process Data */ - CsrProcess->ClientId = *ClientId; - CsrProcess->ProcessHandle = hProcess; - CsrProcess->ShutdownLevel = 0x280; - - /* Set the Priority to Background */ - CsrSetBackgroundPriority(CsrProcess); - - /* Insert the Process */ - CsrInsertProcess(NULL, CurrentProcess, CsrProcess); - - /* Release lock and return */ - CsrReleaseProcessLock(); - return Status; -} - -/*++ - * @name CsrUnlockProcess - * @implemented NT4 - * - * The CsrUnlockProcess undoes a previous CsrLockProcessByClientId operation. - * - * @param CsrProcess - * Pointer to a previously locked CSR Process. - * - * @return STATUS_SUCCESS. - * - * @remarks This routine must be called with the Process Lock held. - * - *--*/ -NTSTATUS -NTAPI -CsrUnlockProcess(IN PCSR_PROCESS CsrProcess) -{ - /* Dereference the process */ - CsrLockedDereferenceProcess(CsrProcess); - - /* Release the lock and return */ - CsrReleaseProcessLock(); - return STATUS_SUCCESS; -} - -/*++ - * @name CsrSetBackgroundPriority - * @implemented NT4 - * - * The CsrSetBackgroundPriority routine sets the priority for the given CSR - * Process as a Background priority. - * - * @param CsrProcess - * Pointer to the CSR Process whose priority will be modified. - * - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -CsrSetBackgroundPriority(IN PCSR_PROCESS CsrProcess) -{ - PROCESS_PRIORITY_CLASS PriorityClass; - - /* Set the Foreground bit off */ - PriorityClass.Foreground = FALSE; - - /* Set the new Priority */ - NtSetInformationProcess(CsrProcess->ProcessHandle, - ProcessPriorityClass, - &PriorityClass, - sizeof(PriorityClass)); -} - -/*++ - * @name CsrAllocateProcess - * @implemented NT4 - * - * The CsrAllocateProcess routine allocates a new CSR Process object. - * - * @return Pointer to the newly allocated CSR Process. - * - * @remarks None. - * - *--*/ -PCSR_PROCESS -NTAPI -CsrAllocateProcess(VOID) -{ - PCSR_PROCESS CsrProcess; - ULONG TotalSize; - - /* Calculate the amount of memory this should take */ - TotalSize = sizeof(CSR_PROCESS) + - (CSR_SERVER_DLL_MAX * sizeof(PVOID)) + - CsrTotalPerProcessDataLength; - - /* Allocate a Process */ - CsrProcess = RtlAllocateHeap(CsrHeap, HEAP_ZERO_MEMORY, TotalSize); - if (!CsrProcess) return NULL; - - /* Handle the Sequence Number and protect against overflow */ - CsrProcess->SequenceNumber = CsrProcessSequenceCount++; - if (CsrProcessSequenceCount < 5) CsrProcessSequenceCount = 5; - - /* Increase the reference count */ - CsrProcess->ReferenceCount++; - - /* Initialize the Thread List */ - InitializeListHead(&CsrProcess->ThreadList); - - /* Return the Process */ - return CsrProcess; -} - -/*++ - * @name CsrLockedReferenceProcess - * - * The CsrLockedReferenceProcess references a CSR Process while the - * Process Lock is already being held. - * - * @param CsrProcess - * Pointer to the CSR Process to be referenced. - * - * @return None. - * - * @remarks This routine will return with the Process Lock held. - * - *--*/ -VOID -NTAPI -CsrLockedReferenceProcess(IN PCSR_PROCESS CsrProcess) -{ - /* Increment the reference count */ - ++CsrProcess->ReferenceCount; -} - -/*++ - * @name CsrInitializeProcessStructure - * @implemented NT4 - * - * The CsrInitializeProcessStructure routine sets up support for CSR Processes - * and CSR Threads. - * - * @param None. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * otherwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrInitializeProcessStructure(VOID) -{ - NTSTATUS Status; - ULONG i; - - /* Initialize the Lock */ - Status = RtlInitializeCriticalSection(&ProcessDataLock); - if (!NT_SUCCESS(Status)) return Status; - - /* Set up the Root Process */ - CsrRootProcess = CsrAllocateProcess(); - if (!CsrRootProcess) return STATUS_NO_MEMORY; - - /* Set up the minimal information for it */ - InitializeListHead(&CsrRootProcess->ListLink); - CsrRootProcess->ProcessHandle = (HANDLE)-1; - CsrRootProcess->ClientId = NtCurrentTeb()->ClientId; - - /* Initialize the Thread Hash List */ - for (i = 0; i < 256; i++) InitializeListHead(&CsrThreadHashTable[i]); - - /* Initialize the Wait Lock */ - return RtlInitializeCriticalSection(&CsrWaitListsLock); -} - -/*++ - * @name CsrDeallocateProcess - * - * The CsrDeallocateProcess frees the memory associated with a CSR Process. - * - * @param CsrProcess - * Pointer to the CSR Process to be freed. - * - * @return None. - * - * @remarks Do not call this routine. It is reserved for the internal - * thread management routines when a CSR Process has been cleanly - * dereferenced and killed. - * - *--*/ -VOID -NTAPI -CsrDeallocateProcess(IN PCSR_PROCESS CsrProcess) -{ - /* Free the process object from the heap */ - RtlFreeHeap(CsrHeap, 0, CsrProcess); -} - -/*++ - * @name CsrRemoveProcess - * - * The CsrRemoveProcess function undoes a CsrInsertProcess operation and - * removes the CSR Process from the Process List and notifies Server DLLs - * of this removal. - * - * @param CsrProcess - * Pointer to the CSR Process to remove. - * - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -CsrRemoveProcess(IN PCSR_PROCESS CsrProcess) -{ - PCSR_SERVER_DLL ServerDll; - ULONG i; - ASSERT(ProcessStructureListLocked()); - - /* Remove us from the Process List */ - RemoveEntryList(&CsrProcess->ListLink); - - /* Release the lock */ - CsrReleaseProcessLock(); - - /* Loop every Server DLL */ - for (i = 0; i < CSR_SERVER_DLL_MAX; i++) - { - /* Get the Server DLL */ - ServerDll = CsrLoadedServerDll[i]; - - /* Check if it's valid and if it has a Disconnect Callback */ - if ((ServerDll) && (ServerDll->DisconnectCallback)) - { - /* Call it */ - ServerDll->DisconnectCallback(CsrProcess); - } - } -} - -/*++ - * @name CsrInsertProcess - * - * The CsrInsertProcess routine inserts a CSR Process into the Process List - * and notifies Server DLLs of the creation of a new CSR Process. - * - * @param Parent - * Optional pointer to the CSR Process creating this CSR Process. - * - * @param CurrentProcess - * Optional pointer to the current CSR Process. - * - * @param CsrProcess - * Pointer to the CSR Process which is to be inserted. - * - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -CsrInsertProcess(IN PCSR_PROCESS Parent OPTIONAL, - IN PCSR_PROCESS CurrentProcess OPTIONAL, - IN PCSR_PROCESS CsrProcess) -{ -#if 0 - PCSR_SERVER_DLL ServerDll; - ULONG i; -#endif - ASSERT(ProcessStructureListLocked()); - - /* Set the parent */ - CsrProcess->Parent = Parent; - - /* Insert it into the Root List */ - InsertTailList(&CsrRootProcess->ListLink, &CsrProcess->ListLink); -#if 0 - /* Notify the Server DLLs */ - for (i = 0; i < CSR_SERVER_DLL_MAX; i++) - { - /* Get the current Server DLL */ - ServerDll = CsrLoadedServerDll[i]; - - /* Make sure it's valid and that it has callback */ - if ((ServerDll) && (ServerDll->NewProcessCallback)) - { - ServerDll->NewProcessCallback(CurrentProcess, CsrProcess); - } - } -#endif -} - -/*++ - * @name CsrLockProcessByClientId - * @implemented NT4 - * - * The CsrLockProcessByClientId routine locks the CSR Process corresponding - * to the given Process ID and optionally returns it. - * - * @param Pid - * Process ID corresponding to the CSR Process which will be locked. - * - * @param CsrProcess - * Optional pointer to a CSR Process pointer which will hold the - * CSR Process corresponding to the given Process ID. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * otherwise. - * - * @remarks Locking a CSR Process is defined as acquiring an extra - * reference to it and returning with the Process Lock held. - * - *--*/ -NTSTATUS -NTAPI -CsrLockProcessByClientId(IN HANDLE Pid, - OUT PCSR_PROCESS *CsrProcess) -{ - PLIST_ENTRY NextEntry; - PCSR_PROCESS CurrentProcess = NULL; - NTSTATUS Status; - - /* Acquire the lock */ - CsrAcquireProcessLock(); - - /* Assume failure */ - ASSERT(CsrProcess != NULL); - *CsrProcess = NULL; - - /* Setup the List Pointers */ - NextEntry = &CsrRootProcess->ListLink; - do - { - /* Get the Process */ - CurrentProcess = CONTAINING_RECORD(NextEntry, CSR_PROCESS, ListLink); - - /* Check for PID Match */ - if (CurrentProcess->ClientId.UniqueProcess == Pid) - { - Status = STATUS_SUCCESS; - break; - } - - /* Next entry */ - NextEntry = NextEntry->Flink; - } while (NextEntry != &CsrRootProcess->ListLink); - - /* Check if we didn't find it in the list */ - if (!NT_SUCCESS(Status)) - { - /* Nothing found, release the lock */ - CsrReleaseProcessLock(); - } - else - { - /* Lock the found process and return it */ - CsrLockedReferenceProcess(CurrentProcess); - *CsrProcess = CurrentProcess; - } - - /* Return the result */ - return Status; -} - -/* EOF */ diff --git a/deprecated/csrsrv/server.c b/deprecated/csrsrv/server.c deleted file mode 100644 index 1221edc127a..00000000000 --- a/deprecated/csrsrv/server.c +++ /dev/null @@ -1,698 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS CSR Sub System - * FILE: subsystems/win32/csrss/csrsrv/server.c - * PURPOSE: CSR Server DLL Server Functions - * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) - */ - -/* INCLUDES ******************************************************************/ -#include "srv.h" - -#define NDEBUG -#include - -/* DATA **********************************************************************/ - -PCSR_API_ROUTINE CsrServerApiDispatchTable[5] = -{ - CsrSrvClientConnect, - CsrSrvUnusedFunction, - CsrSrvUnusedFunction, - CsrSrvIdentifyAlertableThread, - CsrSrvSetPriorityClass -}; - -BOOLEAN CsrServerApiServerValidTable[5] = -{ - TRUE, - FALSE, - TRUE, - TRUE, - TRUE -}; - -PCHAR CsrServerApiNameTable[5] = -{ - "ClientConnect", - "ThreadConnect", - "ProfileControl", - "IdentifyAlertableThread", - "SetPriorityClass" -}; - -PCSR_SERVER_DLL CsrLoadedServerDll[CSR_SERVER_DLL_MAX]; -PVOID CsrSrvSharedSectionHeap; -PVOID CsrSrvSharedSectionBase; -PVOID *CsrSrvSharedStaticServerData; -ULONG CsrSrvSharedSectionSize; -HANDLE CsrSrvSharedSection; - -/* PRIVATE FUNCTIONS**********************************************************/ - -/*++ - * @name CsrServerDllInitialization - * @implemented NT4 - * - * The CsrServerDllInitialization is the initialization routine for - * the this Server DLL. - * - * @param LoadedServerDll - * Pointer to the CSR Server DLL structure representing this Server DLL. - * - * @return STATUS_SUCCESS. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrServerDllInitialization(IN PCSR_SERVER_DLL LoadedServerDll) -{ - /* Setup the DLL Object */ - LoadedServerDll->ApiBase = 0; - LoadedServerDll->HighestApiSupported = CsrpMaxApiNumber; - LoadedServerDll->DispatchTable = CsrServerApiDispatchTable; - LoadedServerDll->ValidTable = CsrServerApiServerValidTable; - LoadedServerDll->NameTable = CsrServerApiNameTable; - LoadedServerDll->SizeOfProcessData = 0; - LoadedServerDll->ConnectCallback = NULL; - LoadedServerDll->DisconnectCallback = NULL; - - /* All done */ - return STATUS_SUCCESS; -} - -/*++ - * @name CsrLoadServerDll - * @implemented NT4 - * - * The CsrLoadServerDll routine loads a CSR Server DLL and calls its entrypoint - * - * @param DllString - * Pointer to the CSR Server DLL to load and call. - * - * @param EntryPoint - * Pointer to the name of the server's initialization function. If - * this parameter is NULL, the default ServerDllInitialize will be - * assumed. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * otherwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrLoadServerDll(IN PCHAR DllString, - IN PCHAR EntryPoint OPTIONAL, - IN ULONG ServerId) -{ - NTSTATUS Status; - ANSI_STRING DllName; - UNICODE_STRING TempString, ErrorString; - ULONG_PTR Parameters[2]; - HANDLE hServerDll = NULL; - ULONG Size; - PCSR_SERVER_DLL ServerDll; - STRING EntryPointString; - PCSR_SERVER_DLL_INIT_CALLBACK ServerDllInitProcedure; - ULONG Response; - - /* Check if it's beyond the maximum we support */ - if (ServerId >= CSR_SERVER_DLL_MAX) return STATUS_TOO_MANY_NAMES; - - /* Check if it's already been loaded */ - if (CsrLoadedServerDll[ServerId]) return STATUS_INVALID_PARAMETER; - - /* Convert the name to Unicode */ - ASSERT(DllString != NULL); - RtlInitAnsiString(&DllName, DllString); - Status = RtlAnsiStringToUnicodeString(&TempString, &DllName, TRUE); - if (!NT_SUCCESS(Status)) return Status; - - /* If we are loading ourselves, don't actually load us */ - if (ServerId != CSR_SRV_SERVER) - { - /* Load the DLL */ - Status = LdrLoadDll(NULL, 0, &TempString, &hServerDll); - if (!NT_SUCCESS(Status)) - { - /* Setup error parameters */ - Parameters[0] = (ULONG_PTR)&TempString; - Parameters[1] = (ULONG_PTR)&ErrorString; - RtlInitUnicodeString(&ErrorString, L"Default Load Path"); - - /* Send a hard error */ - NtRaiseHardError(Status, - 2, - 3, - Parameters, - OptionOk, - &Response); - } - - /* Get rid of the string */ - RtlFreeUnicodeString(&TempString); - if (!NT_SUCCESS(Status)) return Status; - } - - /* Allocate a CSR DLL Object */ - Size = sizeof(CSR_SERVER_DLL) + DllName.MaximumLength; - ServerDll = RtlAllocateHeap(CsrHeap, HEAP_ZERO_MEMORY, Size); - if (!ServerDll) - { - if (hServerDll) LdrUnloadDll(hServerDll); - return STATUS_NO_MEMORY; - } - - /* Set up the Object */ - ServerDll->Length = Size; - ServerDll->SharedSection = CsrSrvSharedSectionHeap; - ServerDll->Event = CsrInitializationEvent; - ServerDll->Name.Length = DllName.Length; - ServerDll->Name.MaximumLength = DllName.MaximumLength; - ServerDll->Name.Buffer = (PCHAR)(ServerDll + 1); - if (DllName.Length) - { - strncpy(ServerDll->Name.Buffer, DllName.Buffer, DllName.Length); - } - ServerDll->ServerId = ServerId; - ServerDll->ServerHandle = hServerDll; - - /* Now get the entrypoint */ - if (hServerDll) - { - /* Initialize a string for the entrypoint, or use the default */ - RtlInitAnsiString(&EntryPointString, - !(EntryPoint) ? "ServerDllInitialization" : - EntryPoint); - - /* Get a pointer to it */ - Status = LdrGetProcedureAddress(hServerDll, - &EntryPointString, - 0, - (PVOID)&ServerDllInitProcedure); - } - else - { - /* No handle, so we are loading ourselves */ - ServerDllInitProcedure = CsrServerDllInitialization; - Status = STATUS_SUCCESS; - } - - /* Check if we got the pointer, and call it */ - if (NT_SUCCESS(Status)) - { - /* Get the result from the Server DLL */ - Status = ServerDllInitProcedure(ServerDll); - - /* Check for Success */ - if (NT_SUCCESS(Status)) - { - /* - * Add this Server's Per-Process Data Size to the total that each - * process will need. - */ - CsrTotalPerProcessDataLength += ServerDll->SizeOfProcessData; - - /* Save the pointer in our list */ - CsrLoadedServerDll[ServerDll->ServerId] = ServerDll; - - /* Does it use our generic heap? */ - if (ServerDll->SharedSection != CsrSrvSharedSectionHeap) - { - /* No, save the pointer to its shared section in our list */ - CsrSrvSharedStaticServerData[ServerDll->ServerId] = ServerDll->SharedSection; - } - - /* ReactOS Specific hax */ - if (ServerDll->HighestApiSupported == 0xDEADBABE) - { - Status = CsrApiRegisterDefinitions((PVOID)ServerDll->DispatchTable); - } - } - else - { - /* Use shared failure code */ - goto LoadFailed; - } - } - else - { -LoadFailed: - /* Server Init failed, unload it */ - if (hServerDll) LdrUnloadDll(hServerDll); - - /* Delete the Object */ - RtlFreeHeap(CsrHeap, 0, ServerDll); - } - - /* Return to caller */ - return Status; -} - -/*++ - * @name CsrSrvClientConnect - * - * The CsrSrvClientConnect CSR API handles a new connection to a server DLL. - * - * @param ApiMessage - * Pointer to the CSR API Message for this request. - * - * @param Reply - * Optional reply to this request. - * - * @return STATUS_SUCCESS in case of success, STATUS_INVALID_PARAMETER - * or STATUS_TOO_MANY_NAMES in case of failure. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrSrvClientConnect(IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply OPTIONAL) -{ - /* Hack */ - return STATUS_SUCCESS; -#if 0 - NTSTATUS Status; - PCSR_CLIENT_CONNECT ClientConnect; - PCSR_SERVER_DLL ServerDll; - PCSR_PROCESS CurrentProcess = ((PCSR_THREAD)NtCurrentTeb()->CsrClientThread)->Process; - - /* Load the Message, set default reply */ - ClientConnect = (PCSR_CLIENT_CONNECT)&ApiMessage->CsrClientConnect; - *Reply = 0; - - /* Validate the ServerID */ - if (ClientConnect->ServerId >= CSR_SERVER_DLL_MAX) - { - return STATUS_TOO_MANY_NAMES; - } - else if (!CsrLoadedServerDll[ClientConnect->ServerId]) - { - return STATUS_INVALID_PARAMETER; - } - - /* Validate the Message Buffer */ - if (!(CsrValidateMessageBuffer(ApiMessage, - ClientConnect->ConnectionInfo, - ClientConnect->ConnectionInfoSize, - 1))) - { - /* Fail due to buffer overflow or other invalid buffer */ - return STATUS_INVALID_PARAMETER; - } - - /* Load the Server DLL */ - ServerDll = CsrLoadedServerDll[ClientConnect->ServerId]; - - /* Check if it has a Connect Callback */ - if (ServerDll->ConnectCallback) - { - /* Call the callback */ - Status = ServerDll->ConnectCallback(CurrentProcess, - ClientConnect->ConnectionInfo, - &ClientConnect->ConnectionInfoSize); - } - else - { - /* Assume success */ - Status = STATUS_SUCCESS; - } - - /* Return status */ - return Status; -#endif -} - -/*++ - * @name CsrSrvCreateSharedSection - * - * The CsrSrvCreateSharedSection creates the Shared Section that all CSR Server - * DLLs and Clients can use to share data. - * - * @param ParameterValue - * Specially formatted string from our registry command-line which - * specifies various arguments for the shared section. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * otherwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrSrvCreateSharedSection(IN PCHAR ParameterValue) -{ - PCHAR SizeValue = ParameterValue; - ULONG Size; - NTSTATUS Status; - LARGE_INTEGER SectionSize; - ULONG ViewSize = 0; - PPEB Peb = NtCurrentPeb(); - - /* If there's no parameter, fail */ - if (!ParameterValue) return STATUS_INVALID_PARAMETER; - - /* Find the first comma, and null terminate */ - while (*SizeValue) - { - if (*SizeValue == ',') - { - *SizeValue++ = ANSI_NULL; - break; - } - else - { - SizeValue++; - } - } - - /* Make sure it's valid */ - if (!*SizeValue) return STATUS_INVALID_PARAMETER; - - /* Convert it to an integer */ - Status = RtlCharToInteger(SizeValue, 0, &Size); - if (!NT_SUCCESS(Status)) return Status; - - /* Multiply by 1024 entries and round to page size */ - CsrSrvSharedSectionSize = ROUND_UP(Size * 1024, CsrNtSysInfo.PageSize); - - /* Create the Secion */ - SectionSize.LowPart = CsrSrvSharedSectionSize; - SectionSize.HighPart = 0; - Status = NtCreateSection(&CsrSrvSharedSection, - SECTION_ALL_ACCESS, - NULL, - &SectionSize, - PAGE_EXECUTE_READWRITE, - SEC_BASED | SEC_RESERVE, - NULL); - if (!NT_SUCCESS(Status)) return Status; - - /* Map the section */ - Status = NtMapViewOfSection(CsrSrvSharedSection, - NtCurrentProcess(), - &CsrSrvSharedSectionBase, - 0, - 0, - NULL, - &ViewSize, - ViewUnmap, - MEM_TOP_DOWN, - PAGE_EXECUTE_READWRITE); - if (!NT_SUCCESS(Status)) - { - /* Fail */ - NtClose(CsrSrvSharedSection); - return Status; - } - - /* FIXME: Write the value to registry */ - - /* The Heap is the same place as the Base */ - CsrSrvSharedSectionHeap = CsrSrvSharedSectionBase; - - /* Create the heap */ - if (!(RtlCreateHeap(HEAP_ZERO_MEMORY | HEAP_CLASS_7, - CsrSrvSharedSectionHeap, - CsrSrvSharedSectionSize, - PAGE_SIZE, - 0, - 0))) - { - /* Failure, unmap section and return */ - NtUnmapViewOfSection(NtCurrentProcess(), CsrSrvSharedSectionBase); - NtClose(CsrSrvSharedSection); - return STATUS_NO_MEMORY; - } - - /* Now allocate space from the heap for the Shared Data */ - CsrSrvSharedStaticServerData = RtlAllocateHeap(CsrSrvSharedSectionHeap, - 0, - CSR_SERVER_DLL_MAX * - sizeof(PVOID)); - if (!CsrSrvSharedStaticServerData) return STATUS_NO_MEMORY; - - /* Write the values to the PEB */ - Peb->ReadOnlySharedMemoryBase = CsrSrvSharedSectionBase; - Peb->ReadOnlySharedMemoryHeap = CsrSrvSharedSectionHeap; - Peb->ReadOnlyStaticServerData = CsrSrvSharedStaticServerData; - - /* Return */ - return STATUS_SUCCESS; -} - -/*++ - * @name CsrSrvAttachSharedSection - * - * The CsrSrvAttachSharedSection maps the CSR Shared Section into a new - * CSR Process' address space, and returns the pointers to the section - * through the Connection Info structure. - * - * @param CsrProcess - * Pointer to the CSR Process that is attempting a connection. - * - * @param ConnectInfo - * Pointer to the CSR Connection Info structure for the incoming - * connection. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * otherwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrSrvAttachSharedSection(IN PCSR_PROCESS CsrProcess OPTIONAL, - OUT PCSR_CONNECTION_INFO ConnectInfo) -{ - NTSTATUS Status; - ULONG ViewSize = 0; - - /* Check if we have a process */ - if (CsrProcess) - { - /* Map the section into this process */ - DPRINT("CSR Process Handle: %p. CSR Process: %p\n", CsrProcess->ProcessHandle, CsrProcess); - Status = NtMapViewOfSection(CsrSrvSharedSection, - CsrProcess->ProcessHandle, - &CsrSrvSharedSectionBase, - 0, - 0, - NULL, - &ViewSize, - ViewUnmap, - SEC_NO_CHANGE, - PAGE_EXECUTE_READ); - if (!NT_SUCCESS(Status)) return Status; - } - - /* Write the values in the Connection Info structure */ - ConnectInfo->SharedSectionBase = CsrSrvSharedSectionBase; - ConnectInfo->SharedSectionHeap = CsrSrvSharedSectionHeap; - ConnectInfo->SharedSectionData = CsrSrvSharedStaticServerData; - - /* Return success */ - return STATUS_SUCCESS; -} - -/*++ - * @name CsrSrvIdentifyAlertableThread - * @implemented NT4 - * - * The CsrSrvIdentifyAlertableThread CSR API marks a CSR Thread as alertable. - * - * @param ApiMessage - * Pointer to the CSR API Message for this request. - * - * @param Reply - * Pointer to an optional reply to this request. - * - * @return STATUS_SUCCESS. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrSrvIdentifyAlertableThread(IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply) -{ - PCSR_THREAD CsrThread = NtCurrentTeb()->CsrClientThread; - - /* Set the alertable flag */ - CsrThread->Flags |= CsrThreadAltertable; - - /* Return success */ - return STATUS_SUCCESS; -} - -/*++ - * @name CsrSrvSetPriorityClass - * @implemented NT4 - * - * The CsrSrvSetPriorityClass CSR API is deprecated. - * - * @param ApiMessage - * Pointer to the CSR API Message for this request. - * - * @param Reply - * Pointer to an optional reply to this request. - * - * @return STATUS_SUCCESS. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrSrvSetPriorityClass(IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply) -{ - /* Deprecated */ - return STATUS_SUCCESS; -} - -/*++ - * @name CsrSrvUnusedFunction - * @implemented NT4 - * - * The CsrSrvUnusedFunction CSR API is a stub for deprecated APIs. - * - * The CsrSrvSetPriorityClass CSR API is deprecated. - * - * @param ApiMessage - * Pointer to the CSR API Message for this request. - * - * @param Reply - * Pointer to an optional reply to this request. - * - * @return STATUS_INVALID_PARAMETER. - * - * @remarks CsrSrvSetPriorityClass does not use this stub because it must - * return success. - * - *--*/ -NTSTATUS -NTAPI -CsrSrvUnusedFunction(IN OUT PCSR_API_MESSAGE ApiMessage, - IN OUT PULONG Reply) -{ - /* Deprecated */ - return STATUS_INVALID_PARAMETER; -} - -/* PUBLIC FUNCTIONS***********************************************************/ - -/*++ - * @name CsrSetCallingSpooler - * @implemented NT4 - * - * the CsrSetCallingSpooler routine is deprecated. - * - * @param Reserved - * Deprecated - * - * @return None. - * - * @remarks This routine was used in archaic versions of NT for Printer Drivers. - * - *--*/ -VOID -NTAPI -CsrSetCallingSpooler(ULONG Reserved) -{ - /* Deprecated */ - return; -} - -/*++ - * @name CsrUnhandledExceptionFilter - * @implemented NT5 - * - * The CsrUnhandledExceptionFilter routine handles all exceptions - * within SEH-protected blocks. - * - * @param ExceptionPointers - * System-defined Argument. - * - * @return EXCEPTION_EXECUTE_HANDLER. - * - * @remarks None. - * - *--*/ -LONG -NTAPI -CsrUnhandledExceptionFilter(IN PEXCEPTION_POINTERS ExceptionInfo) -{ - SYSTEM_KERNEL_DEBUGGER_INFORMATION DebuggerInfo; - EXCEPTION_DISPOSITION Result = EXCEPTION_EXECUTE_HANDLER; - BOOLEAN OldValue; - NTSTATUS Status; - UNICODE_STRING ErrorSource; - ULONG_PTR ErrorParameters[4]; - ULONG Response; - - /* Check if a debugger is installed */ - Status = NtQuerySystemInformation(SystemKernelDebuggerInformation, - &DebuggerInfo, - sizeof(DebuggerInfo), - NULL); - - /* Check if this is Session 0, and the Debugger is Enabled */ - if ((NtCurrentPeb()->SessionId) && (NT_SUCCESS(Status)) && - (DebuggerInfo.KernelDebuggerEnabled)) - { - /* Call the Unhandled Exception Filter */ - if ((Result = RtlUnhandledExceptionFilter(ExceptionInfo)) != - EXCEPTION_CONTINUE_EXECUTION) - { - /* We're going to raise an error. Get Shutdown Privilege first */ - Status = RtlAdjustPrivilege(SE_SHUTDOWN_PRIVILEGE, - TRUE, - TRUE, - &OldValue); - - /* Use the Process token if that failed */ - if (Status == STATUS_NO_TOKEN) - { - Status = RtlAdjustPrivilege(SE_SHUTDOWN_PRIVILEGE, - TRUE, - FALSE, - &OldValue); - } - - /* Initialize our Name String */ - RtlInitUnicodeString(&ErrorSource, L"Windows SubSystem"); - - /* Set the parameters */ - ErrorParameters[0] = (ULONG_PTR)&ErrorSource; - ErrorParameters[1] = ExceptionInfo->ExceptionRecord->ExceptionCode; - ErrorParameters[2] = (ULONG_PTR)ExceptionInfo->ExceptionRecord->ExceptionAddress; - ErrorParameters[3] = (ULONG_PTR)ExceptionInfo->ContextRecord; - - /* Bugcheck */ - Status = NtRaiseHardError(STATUS_SYSTEM_PROCESS_TERMINATED, - 4, - 1, - ErrorParameters, - OptionShutdownSystem, - &Response); - } - - /* Just terminate us */ - NtTerminateProcess(NtCurrentProcess(), - ExceptionInfo->ExceptionRecord->ExceptionCode); - } - - return Result; -} - -/* EOF */ diff --git a/deprecated/csrsrv/session.c b/deprecated/csrsrv/session.c deleted file mode 100644 index 361b3c3b9f2..00000000000 --- a/deprecated/csrsrv/session.c +++ /dev/null @@ -1,568 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS CSR Sub System - * FILE: subsystems/win32/csrss/csrsrv/session.c - * PURPOSE: CSR Server DLL Session Implementation - * PROGRAMMERS: Alex Ionescu (alex@relsoft.net) - */ - -/* INCLUDES ******************************************************************/ - -#include "srv.h" - -#define NDEBUG -#include - -/* DATA **********************************************************************/ - -RTL_CRITICAL_SECTION CsrNtSessionLock; -LIST_ENTRY CsrNtSessionList; - -PCHAR CsrServerSbApiName[5] = -{ - "SbCreateSession", - "SbTerminateSession", - "SbForeignSessionComplete", - "SbCreateProcess", - "Unknown Csr Sb Api Number" -}; - -/* PRIVATE FUNCTIONS *********************************************************/ - -/*++ - * @name CsrInitializeNtSessionList - * - * The CsrInitializeNtSessionList routine sets up support for CSR Sessions. - * - * @param None - * - * @return None - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrInitializeNtSessionList(VOID) -{ - DPRINT("CSRSRV: %s called\n", __FUNCTION__); - - /* Initialize the Session List */ - InitializeListHead(&CsrNtSessionList); - - /* Initialize the Session Lock */ - return RtlInitializeCriticalSection(&CsrNtSessionLock); -} - -/*++ - * @name CsrAllocateNtSession - * - * The CsrAllocateNtSession routine allocates a new CSR NT Session. - * - * @param SessionId - * Session ID of the CSR NT Session to allocate. - * - * @return Pointer to the newly allocated CSR NT Session. - * - * @remarks None. - * - *--*/ -PCSR_NT_SESSION -NTAPI -CsrAllocateNtSession(IN ULONG SessionId) -{ - PCSR_NT_SESSION NtSession; - - /* Allocate an NT Session Object */ - NtSession = RtlAllocateHeap(CsrHeap, 0, sizeof(CSR_NT_SESSION)); - if (NtSession) - { - /* Setup the Session Object */ - NtSession->SessionId = SessionId; - NtSession->ReferenceCount = 1; - - /* Insert it into the Session List */ - CsrAcquireNtSessionLock(); - InsertHeadList(&CsrNtSessionList, &NtSession->SessionLink); - CsrReleaseNtSessionLock(); - } - else - { - ASSERT(NtSession != NULL); - } - - /* Return the Session (or NULL) */ - return NtSession; -} - -/*++ - * @name CsrReferenceNtSession - * - * The CsrReferenceNtSession increases the reference count of a CSR NT Session. - * - * @param Session - * Pointer to the CSR NT Session to reference. - * - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -CsrReferenceNtSession(IN PCSR_NT_SESSION Session) -{ - /* Acquire the lock */ - CsrAcquireNtSessionLock(); - - /* Sanity checks */ - ASSERT(!IsListEmpty(&Session->SessionLink)); - ASSERT(Session->SessionId != 0); - ASSERT(Session->ReferenceCount != 0); - - /* Increase the reference count */ - Session->ReferenceCount++; - - /* Release the lock */ - CsrReleaseNtSessionLock(); -} - -/*++ - * @name CsrDereferenceNtSession - * - * The CsrDereferenceNtSession decreases the reference count of a - * CSR NT Session. - * - * @param Session - * Pointer to the CSR NT Session to reference. - * - * @param ExitStatus - * If this is the last reference to the session, this argument - * specifies the exit status. - * - * @return None. - * - * @remarks CsrDereferenceNtSession will complete the session if - * the last reference to it has been closed. - * - *--*/ -VOID -NTAPI -CsrDereferenceNtSession(IN PCSR_NT_SESSION Session, - IN NTSTATUS ExitStatus) -{ - /* Acquire the lock */ - CsrAcquireNtSessionLock(); - - /* Sanity checks */ - ASSERT(!IsListEmpty(&Session->SessionLink)); - ASSERT(Session->SessionId != 0); - ASSERT(Session->ReferenceCount != 0); - - /* Dereference the Session Object */ - if (!(--Session->ReferenceCount)) - { - /* Remove it from the list */ - RemoveEntryList(&Session->SessionLink); - - /* Release the lock */ - CsrReleaseNtSessionLock(); - - /* Tell SM that we're done here */ - SmSessionComplete(CsrSmApiPort, Session->SessionId, ExitStatus); - - /* Free the Session Object */ - RtlFreeHeap(CsrHeap, 0, Session); - } - else - { - /* Release the lock, the Session is still active */ - CsrReleaseNtSessionLock(); - } -} - -/* SESSION MANAGER FUNCTIONS**************************************************/ - -/*++ - * @name CsrSbCreateSession - * - * The CsrSbCreateSession API is called by the Session Manager whenever a new - * session is created. - * - * @param ApiMessage - * Pointer to the Session Manager API Message. - * - * @return TRUE in case of success, FALSE otherwise. - * - * @remarks The CsrSbCreateSession routine will initialize a new CSR NT - * Session and allocate a new CSR Process for the subsystem process. - * - *--*/ -BOOLEAN -NTAPI -CsrSbCreateSession(IN PSB_API_MSG ApiMessage) -{ - PSB_CREATE_SESSION_MSG CreateSession = &ApiMessage->CreateSession; - HANDLE hProcess, hThread; - PCSR_PROCESS CsrProcess; - NTSTATUS Status; - KERNEL_USER_TIMES KernelTimes; - PCSR_THREAD CsrThread; - //PVOID ProcessData; - //ULONG i; - - /* Save the Process and Thread Handles */ - hProcess = CreateSession->ProcessInfo.ProcessHandle; - hThread = CreateSession->ProcessInfo.ThreadHandle; - - /* Lock the Processes */ - CsrAcquireProcessLock(); - - /* Allocate a new process */ - CsrProcess = CsrAllocateProcess(); - if (!CsrProcess) - { - /* Fail */ - ApiMessage->ReturnValue = STATUS_NO_MEMORY; - CsrReleaseProcessLock(); - return TRUE; - } - - /* Set the exception port */ - Status = NtSetInformationProcess(hProcess, - ProcessExceptionPort, - &CsrApiPort, - sizeof(HANDLE)); - - /* Check for success */ - if (!NT_SUCCESS(Status)) - { - /* Fail the request */ - CsrDeallocateProcess(CsrProcess); - CsrReleaseProcessLock(); - - /* Strange as it seems, NTSTATUSes are actually returned */ - return (BOOLEAN)STATUS_NO_MEMORY; - } - - /* Get the Create Time */ - Status = NtQueryInformationThread(hThread, - ThreadTimes, - &KernelTimes, - sizeof(KERNEL_USER_TIMES), - NULL); - - /* Check for success */ - if (!NT_SUCCESS(Status)) - { - /* Fail the request */ - CsrDeallocateProcess(CsrProcess); - CsrReleaseProcessLock(); - - /* Strange as it seems, NTSTATUSes are actually returned */ - return (BOOLEAN)Status; - } - - /* Allocate a new Thread */ - CsrThread = CsrAllocateThread(CsrProcess); - if (!CsrThread) - { - /* Fail the request */ - CsrDeallocateProcess(CsrProcess); - CsrReleaseProcessLock(); - - ApiMessage->ReturnValue = STATUS_NO_MEMORY; - return TRUE; - } - - /* Setup the Thread Object */ - CsrThread->CreateTime = KernelTimes.CreateTime; - CsrThread->ClientId = CreateSession->ProcessInfo.ClientId; - CsrThread->ThreadHandle = hThread; - ProtectHandle(hThread); - CsrThread->Flags = 0; - - /* Insert it into the Process List */ - CsrInsertThread(CsrProcess, CsrThread); - - /* Setup Process Data */ - CsrProcess->ClientId = CreateSession->ProcessInfo.ClientId; - CsrProcess->ProcessHandle = hProcess; - CsrProcess->NtSession = CsrAllocateNtSession(CreateSession->SessionId); - - /* Set the Process Priority */ - CsrSetBackgroundPriority(CsrProcess); -#if 0 - /* Get the first data location */ - ProcessData = &CsrProcess->ServerData[CSR_SERVER_DLL_MAX]; - - /* Loop every DLL */ - for (i = 0; i < CSR_SERVER_DLL_MAX; i++) - { - /* Check if the DLL is loaded and has Process Data */ - if (CsrLoadedServerDll[i] && CsrLoadedServerDll[i]->SizeOfProcessData) - { - /* Write the pointer to the data */ - CsrProcess->ServerData[i] = ProcessData; - - /* Move to the next data location */ - ProcessData = (PVOID)((ULONG_PTR)ProcessData + - CsrLoadedServerDll[i]->SizeOfProcessData); - } - else - { - /* Nothing for this Process */ - CsrProcess->ServerData[i] = NULL; - } - } -#else - /* HACKZ: should go in BaseSrv part of CreateCallback done in Insert below */ - RtlInitializeCriticalSection(&CsrProcess->HandleTableLock); -#endif - /* Insert the Process */ - CsrInsertProcess(NULL, NULL, CsrProcess); - - /* Activate the Thread */ - ApiMessage->ReturnValue = NtResumeThread(hThread, NULL); - - /* Release lock and return */ - CsrReleaseProcessLock(); - return TRUE; -} - -/*++ - * @name CsrSbForeignSessionComplete - * - * The CsrSbForeignSessionComplete API is called by the Session Manager - * whenever a foreign session is completed (ie: terminated). - * - * @param ApiMessage - * Pointer to the Session Manager API Message. - * - * @return TRUE in case of success, FALSE otherwise. - * - * @remarks The CsrSbForeignSessionComplete API is not yet implemented. - * - *--*/ -BOOLEAN -NTAPI -CsrSbForeignSessionComplete(IN PSB_API_MSG ApiMessage) -{ - /* Deprecated/Unimplemented in NT */ - ApiMessage->ReturnValue = STATUS_NOT_IMPLEMENTED; - return TRUE; -} - -/*++ - * @name CsrSbTerminateSession - * - * The CsrSbTerminateSession API is called by the Session Manager - * whenever a foreign session should be destroyed. - * - * @param ApiMessage - * Pointer to the Session Manager API Message. - * - * @return TRUE in case of success, FALSE otherwise. - * - * @remarks The CsrSbTerminateSession API is not yet implemented. - * - *--*/ -BOOLEAN -NTAPI -CsrSbTerminateSession(IN PSB_API_MSG ApiMessage) -{ - ApiMessage->ReturnValue = STATUS_NOT_IMPLEMENTED; - return TRUE; -} - -/*++ - * @name CsrSbCreateProcess - * - * The CsrSbCreateProcess API is called by the Session Manager - * whenever a foreign session is created and a new process should be started. - * - * @param ApiMessage - * Pointer to the Session Manager API Message. - * - * @return TRUE in case of success, FALSE otherwise. - * - * @remarks The CsrSbCreateProcess API is not yet implemented. - * - *--*/ -BOOLEAN -NTAPI -CsrSbCreateProcess(IN PSB_API_MSG ApiMessage) -{ - ApiMessage->ReturnValue = STATUS_NOT_IMPLEMENTED; - return TRUE; -} - -PSB_API_ROUTINE CsrServerSbApiDispatch[5] = -{ - CsrSbCreateSession, - CsrSbTerminateSession, - CsrSbForeignSessionComplete, - CsrSbCreateProcess, - NULL -}; - -/*++ - * @name CsrSbApiHandleConnectionRequest - * - * The CsrSbApiHandleConnectionRequest routine handles and accepts a new - * connection request to the SM API LPC Port. - * - * @param ApiMessage - * Pointer to the incoming CSR API Message which contains the - * connection request. - * - * @return STATUS_SUCCESS in case of success, or status code which caused - * the routine to error. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrSbApiHandleConnectionRequest(IN PSB_API_MSG Message) -{ - NTSTATUS Status; - REMOTE_PORT_VIEW RemotePortView; - HANDLE hPort; - - /* Set the Port View Structure Length */ - RemotePortView.Length = sizeof(REMOTE_PORT_VIEW); - - /* Accept the connection */ - Status = NtAcceptConnectPort(&hPort, - NULL, - (PPORT_MESSAGE)Message, - TRUE, - NULL, - &RemotePortView); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: Sb Accept Connection failed %lx\n", Status); - return Status; - } - - /* Complete the Connection */ - Status = NtCompleteConnectPort(hPort); - if (!NT_SUCCESS(Status)) - { - DPRINT1("CSRSS: Sb Complete Connection failed %lx\n",Status); - } - - /* Return status */ - return Status; -} - -/*++ - * @name CsrSbApiRequestThread - * - * The CsrSbApiRequestThread routine handles incoming messages or connection - * requests on the SM API LPC Port. - * - * @param Parameter - * System-default user-defined parameter. Unused. - * - * @return The thread exit code, if the thread is terminated. - * - * @remarks Before listening on the port, the routine will first attempt - * to connect to the user subsystem. - * - *--*/ -VOID -NTAPI -CsrSbApiRequestThread(IN PVOID Parameter) -{ - NTSTATUS Status; - SB_API_MSG ReceiveMsg; - PSB_API_MSG ReplyMsg = NULL; - PVOID PortContext; - ULONG MessageType; - - /* Start the loop */ - while (TRUE) - { - /* Wait for a message to come in */ - Status = NtReplyWaitReceivePort(CsrSbApiPort, - &PortContext, - &ReplyMsg->h, - &ReceiveMsg.h); - - /* Check if we didn't get success */ - if (Status != STATUS_SUCCESS) - { - /* If we only got a warning, keep going */ - if (NT_SUCCESS(Status)) continue; - - /* We failed big time, so start out fresh */ - ReplyMsg = NULL; - DPRINT1("CSRSS: ReceivePort failed - Status == %X\n", Status); - continue; - } - - /* Save the message type */ - MessageType = ReceiveMsg.h.u2.s2.Type; - - /* Check if this is a connection request */ - if (MessageType == LPC_CONNECTION_REQUEST) - { - /* Handle connection request */ - CsrSbApiHandleConnectionRequest(&ReceiveMsg); - - /* Start over */ - ReplyMsg = NULL; - continue; - } - - /* Check if the port died */ - if (MessageType == LPC_PORT_CLOSED) - { - /* Close the handle if we have one */ - if (PortContext) NtClose((HANDLE)PortContext); - - /* Client died, start over */ - ReplyMsg = NULL; - continue; - } - else if (MessageType == LPC_CLIENT_DIED) - { - /* Client died, start over */ - ReplyMsg = NULL; - continue; - } - - /* - * It's an API Message, check if it's within limits. If it's not, the - * NT Behaviour is to set this to the Maximum API. - */ - if (ReceiveMsg.ApiNumber > SbpMaxApiNumber) - { - ReceiveMsg.ApiNumber = SbpMaxApiNumber; - DPRINT1("CSRSS: %lx is invalid Sb ApiNumber\n", ReceiveMsg.ApiNumber); - } - - /* Reuse the message */ - ReplyMsg = &ReceiveMsg; - - /* Make sure that the message is supported */ - if (ReceiveMsg.ApiNumber < SbpMaxApiNumber) - { - /* Call the API */ - if (!CsrServerSbApiDispatch[ReceiveMsg.ApiNumber](&ReceiveMsg)) - { - /* It failed, so return nothing */ - ReplyMsg = NULL; - } - } - else - { - /* We don't support this API Number */ - ReplyMsg->ReturnValue = STATUS_NOT_IMPLEMENTED; - } - } -} - -/* EOF */ diff --git a/deprecated/csrsrv/srv.h b/deprecated/csrsrv/srv.h deleted file mode 100644 index c0d44177525..00000000000 --- a/deprecated/csrsrv/srv.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef _SRV_H -#define _SRV_H - -/* PSDK/NDK Headers */ -#define NTOS_MODE_USER -#include -#define WIN32_NO_STATUS -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* CSR Header */ -//#include - -/* PSEH for SEH Support */ -#include - -/* Subsystem Manager Header */ -#include -#include - -/* Internal CSRSS Headers */ -#include -#include - -extern HANDLE CsrHeap; - -#define SM_REG_KEY \ - L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Session Manager" - -#define SESSION_ROOT L"\\Sessions" -#define GLOBAL_ROOT L"\\GLOBAL??" -#define SYMLINK_NAME L"SymbolicLink" -#define SB_PORT_NAME L"SbAbiPort" -#define CSR_PORT_NAME L"ApiPort" -#define UNICODE_PATH_SEP L"\\" - -/* Defines */ -#define ROUND_UP(n, align) ROUND_DOWN(((ULONG)n) + (align) - 1, (align)) -#define ROUND_DOWN(n, align) (((ULONG)n) & ~((align) - 1l)) - -#endif diff --git a/deprecated/csrsrv/thredsup.c b/deprecated/csrsrv/thredsup.c deleted file mode 100644 index 18cfca15961..00000000000 --- a/deprecated/csrsrv/thredsup.c +++ /dev/null @@ -1,819 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS CSR Sub System - * FILE: subsystems/win32/csrss/csrsrv/thredsup.c - * PURPOSE: CSR Server DLL Thread Implementation - * PROGRAMMERS: ReactOS Portable Systems Group - * Alex Ionescu - */ - -/* INCLUDES *******************************************************************/ - -#include - -#define NDEBUG -#include - -#define CsrHashThread(t) \ - (HandleToUlong(t)&(256 - 1)) - -/* GLOBALS ********************************************************************/ - -LIST_ENTRY CsrThreadHashTable[256]; - -/* FUNCTIONS ******************************************************************/ - -/*++ - * @name ProtectHandle - * @implemented NT5.2 - * - * The ProtectHandle routine protects an object handle against closure. - * - * @return TRUE or FALSE. - * - * @remarks None. - * - *--*/ -BOOLEAN -NTAPI -ProtectHandle(IN HANDLE ObjectHandle) -{ - NTSTATUS Status; - OBJECT_HANDLE_ATTRIBUTE_INFORMATION HandleInfo; - - /* Query current state */ - Status = NtQueryObject(ObjectHandle, - ObjectHandleFlagInformation, - &HandleInfo, - sizeof(HandleInfo), - NULL); - if (NT_SUCCESS(Status)) - { - /* Enable protect from close */ - HandleInfo.ProtectFromClose = TRUE; - Status = NtSetInformationObject(ObjectHandle, - ObjectHandleFlagInformation, - &HandleInfo, - sizeof(HandleInfo)); - if (NT_SUCCESS(Status)) return TRUE; - } - - /* We failed to or set the state */ - return FALSE; -} - -/*++ - * @name UnProtectHandle - * @implemented NT5.2 - * - * The UnProtectHandle routine unprotects an object handle against closure. - * - * @return TRUE or FALSE. - * - * @remarks None. - * - *--*/ -BOOLEAN -NTAPI -UnProtectHandle(IN HANDLE ObjectHandle) -{ - NTSTATUS Status; - OBJECT_HANDLE_ATTRIBUTE_INFORMATION HandleInfo; - - /* Query current state */ - Status = NtQueryObject(ObjectHandle, - ObjectHandleFlagInformation, - &HandleInfo, - sizeof(HandleInfo), - NULL); - if (NT_SUCCESS(Status)) - { - /* Disable protect from close */ - HandleInfo.ProtectFromClose = FALSE; - Status = NtSetInformationObject(ObjectHandle, - ObjectHandleFlagInformation, - &HandleInfo, - sizeof(HandleInfo)); - if (NT_SUCCESS(Status)) return TRUE; - } - - /* We failed to or set the state */ - return FALSE; -} - -/*++ - * @name CsrAllocateThread - * - * The CsrAllocateThread routine allocates a new CSR Thread object. - * - * @param CsrProcess - * Pointer to the CSR Process which will contain this CSR Thread. - * - * @return Pointer to the newly allocated CSR Thread. - * - * @remarks None. - * - *--*/ -PCSR_THREAD -NTAPI -CsrAllocateThread(IN PCSR_PROCESS CsrProcess) -{ - PCSR_THREAD CsrThread; - - /* Allocate the structure */ - CsrThread = RtlAllocateHeap(CsrHeap, HEAP_ZERO_MEMORY, sizeof(CSR_THREAD)); - if (!CsrThread) return(NULL); - - /* Reference the Thread and Process */ - CsrThread->ReferenceCount++; - CsrProcess->ReferenceCount++; - - /* Set the Parent Process */ - CsrThread->Process = CsrProcess; - - /* Return Thread */ - return CsrThread; -} - -/*++ - * @name CsrLockedReferenceThread - * - * The CsrLockedReferenceThread references a CSR Thread while the - * Process Lock is already being held. - * - * @param CsrThread - * Pointer to the CSR Thread to be referenced. - * - * @return None. - * - * @remarks This routine will return with the Process Lock held. - * - *--*/ -VOID -NTAPI -CsrLockedReferenceThread(IN PCSR_THREAD CsrThread) -{ - /* Increment the reference count */ - ++CsrThread->ReferenceCount; -} - -/*++ - * @name CsrLocateThreadByClientId - * - * The CsrLocateThreadByClientId routine locates the CSR Thread and, - * optionally, its parent CSR Process, corresponding to a Client ID. - * - * @param Process - * Optional pointer to a CSR Process pointer which will contain - * the CSR Thread's parent. - * - * @param ClientId - * Pointer to a Client ID structure containing the Unique Thread ID - * to look up. - * - * @return Pointer to the CSR Thread corresponding to this CID, or NULL if - * none was found. - * - * @remarks None. - * - *--*/ -PCSR_THREAD -NTAPI -CsrLocateThreadByClientId(OUT PCSR_PROCESS *Process OPTIONAL, - IN PCLIENT_ID ClientId) -{ - ULONG i; - PLIST_ENTRY ListHead, NextEntry; - PCSR_THREAD FoundThread; - // ASSERT(ProcessStructureListLocked()); - - /* Hash the Thread */ - i = CsrHashThread(ClientId->UniqueThread); - - /* Set the list pointers */ - ListHead = &CsrThreadHashTable[i]; - NextEntry = ListHead->Flink; - - /* Star the loop */ - while (NextEntry != ListHead) - { - /* Get the thread */ - FoundThread = CONTAINING_RECORD(NextEntry, CSR_THREAD, HashLinks); - - /* Compare the CID */ - if (FoundThread->ClientId.UniqueThread == ClientId->UniqueThread) - { - /* Match found, return the process */ - *Process = FoundThread->Process; - - /* Return thread too */ -// DPRINT1("Found: %p %p\n", FoundThread, FoundThread->Process); - return FoundThread; - } - - /* Next */ - NextEntry = NextEntry->Flink; - } - - /* Nothing found */ - return NULL; -} - -/*++ - * @name CsrLocateThreadInProcess - * - * The CsrLocateThreadInProcess routine locates the CSR Thread - * corresponding to a Client ID inside a specific CSR Process. - * - * @param Process - * Optional pointer to the CSR Process which contains the CSR Thread - * that will be looked up. - * - * @param ClientId - * Pointer to a Client ID structure containing the Unique Thread ID - * to look up. - * - * @return Pointer to the CSR Thread corresponding to this CID, or NULL if - * none was found. - * - * @remarks If the CsrProcess argument is NULL, the lookup will be done inside - * CsrRootProcess. - * - *--*/ -PCSR_THREAD -NTAPI -CsrLocateThreadInProcess(IN PCSR_PROCESS CsrProcess OPTIONAL, - IN PCLIENT_ID Cid) -{ - PLIST_ENTRY ListHead, NextEntry; - PCSR_THREAD FoundThread = NULL; - - /* Use the Root Process if none was specified */ - if (!CsrProcess) CsrProcess = CsrRootProcess; - - /* Save the List pointers */ -// DPRINT1("Searching in: %p %d\n", CsrProcess, CsrProcess->ThreadCount); - ListHead = &CsrProcess->ThreadList; - NextEntry = ListHead->Flink; - - /* Start the Loop */ - while (NextEntry != ListHead) - { - /* Get Thread Entry */ - FoundThread = CONTAINING_RECORD(NextEntry, CSR_THREAD, Link); - - /* Check for TID Match */ - if (FoundThread->ClientId.UniqueThread == Cid->UniqueThread) break; - - /* Next entry */ - NextEntry = NextEntry->Flink; - } - - /* Return what we found */ -// DPRINT1("Found: %p\n", FoundThread); - return FoundThread; -} - -/*++ - * @name CsrInsertThread - * - * The CsrInsertThread routine inserts a CSR Thread into its parent's - * Thread List and into the Thread Hash Table. - * - * @param Process - * Pointer to the CSR Process containing this CSR Thread. - * - * @param Thread - * Pointer to the CSR Thread to be inserted. - * - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -CsrInsertThread(IN PCSR_PROCESS Process, - IN PCSR_THREAD Thread) -{ - ULONG i; - // ASSERT(ProcessStructureListLocked()); - - /* Insert it into the Regular List */ - InsertTailList(&Process->ThreadList, &Thread->Link); - - /* Increase Thread Count */ - Process->ThreadCount++; - - /* Hash the Thread */ - i = CsrHashThread(Thread->ClientId.UniqueThread); -// DPRINT1("TID %lx HASH: %lx\n", Thread->ClientId.UniqueThread, i); - - /* Insert it there too */ - InsertHeadList(&CsrThreadHashTable[i], &Thread->HashLinks); -} - -/*++ - * @name CsrDeallocateThread - * - * The CsrDeallocateThread frees the memory associated with a CSR Thread. - * - * @param CsrThread - * Pointer to the CSR Thread to be freed. - * - * @return None. - * - * @remarks Do not call this routine. It is reserved for the internal - * thread management routines when a CSR Thread has been cleanly - * dereferenced and killed. - * - *--*/ -VOID -NTAPI -CsrDeallocateThread(IN PCSR_THREAD CsrThread) -{ - /* Free the process object from the heap */ - // ASSERT(CsrThread->WaitBlock == NULL); - RtlFreeHeap(CsrHeap, 0, CsrThread); -} - -/*++ - * @name CsrRemoveThread - * - * The CsrRemoveThread function undoes a CsrInsertThread operation and - * removes the CSR Thread from the the Hash Table and Thread List. - * - * @param CsrThread - * Pointer to the CSR Thread to remove. - * - * @return None. - * - * @remarks If this CSR Thread is the last one inside a CSR Process, the - * parent will be dereferenced and the CsrProcessLastThreadTerminated - * flag will be set. - * - * After executing this routine, the CSR Thread will have the - * CsrThreadInTermination flag set. - * - *--*/ -VOID -NTAPI -CsrRemoveThread(IN PCSR_THREAD CsrThread) -{ - ASSERT(ProcessStructureListLocked()); - - /* Remove it from the List */ - RemoveEntryList(&CsrThread->Link); - - /* Decreate the thread count of the process */ - CsrThread->Process->ThreadCount--; - - /* Remove it from the Hash List as well */ - if (CsrThread->HashLinks.Flink) RemoveEntryList(&CsrThread->HashLinks); - - /* Check if this is the last Thread */ - if (!CsrThread->Process->ThreadCount) - { - /* Check if it's not already been marked for deletion */ - if (!(CsrThread->Process->Flags & CsrProcessLastThreadTerminated)) - { - /* Let everyone know this process is about to lose the thread */ - CsrThread->Process->Flags |= CsrProcessLastThreadTerminated; - - /* Reference the Process */ - CsrLockedDereferenceProcess(CsrThread->Process); - } - } - - /* Mark the thread for deletion */ - CsrThread->Flags |= CsrThreadInTermination; -} - -/*++ - * @name CsrCreateRemoteThread - * @implemented NT4 - * - * The CsrCreateRemoteThread routine creates a CSR Thread object for - * an NT Thread which is not part of the current NT Process. - * - * @param hThread - * Handle to an existing NT Thread to which to associate this - * CSR Thread. - * - * @param ClientId - * Pointer to the Client ID structure of the NT Thread to associate - * with this CSR Thread. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * otherwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrCreateRemoteThread(IN HANDLE hThread, - IN PCLIENT_ID ClientId) -{ - NTSTATUS Status; - HANDLE ThreadHandle; - PCSR_THREAD CsrThread; - PCSR_PROCESS CsrProcess; - KERNEL_USER_TIMES KernelTimes; - DPRINT("CSRSRV: %s called\n", __FUNCTION__); - - /* Get the Thread Create Time */ - Status = NtQueryInformationThread(hThread, - ThreadTimes, - &KernelTimes, - sizeof(KernelTimes), - NULL); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to query thread times: %lx\n", Status); - return Status; - } - - /* Lock the Owner Process */ - Status = CsrLockProcessByClientId(&ClientId->UniqueProcess, &CsrProcess); - if (!NT_SUCCESS(Status)) - { - DPRINT1("No known process for %lx\n", ClientId->UniqueProcess); - return Status; - } - - /* Make sure the thread didn't terminate */ - if (KernelTimes.ExitTime.QuadPart) - { - /* Unlock the process and return */ - CsrUnlockProcess(CsrProcess); - DPRINT1("Dead thread: %I64x\n", KernelTimes.ExitTime.QuadPart); - return STATUS_THREAD_IS_TERMINATING; - } - - /* Allocate a CSR Thread Structure */ - CsrThread = CsrAllocateThread(CsrProcess); - if (!CsrThread) - { - DPRINT1("CSRSRV:%s: out of memory!\n", __FUNCTION__); - CsrUnlockProcess(CsrProcess); - return STATUS_NO_MEMORY; - } - - /* Duplicate the Thread Handle */ - Status = NtDuplicateObject(NtCurrentProcess(), - hThread, - NtCurrentProcess(), - &ThreadHandle, - 0, - 0, - DUPLICATE_SAME_ACCESS); - /* Allow failure */ - if (!NT_SUCCESS(Status)) - { - DPRINT1("Thread duplication failed: %lx\n", Status); - ThreadHandle = hThread; - } - - /* Save the data we have */ - CsrThread->CreateTime = KernelTimes.CreateTime; - CsrThread->ClientId = *ClientId; - CsrThread->ThreadHandle = ThreadHandle; - ProtectHandle(ThreadHandle); - CsrThread->Flags = 0; - - /* Insert the Thread into the Process */ - CsrInsertThread(CsrProcess, CsrThread); - - /* Release the lock and return */ - CsrUnlockProcess(CsrProcess); - return STATUS_SUCCESS; -} - -/*++ - * @name CsrThreadRefcountZero - * - * The CsrThreadRefcountZero routine is executed when a CSR Thread has lost - * all its active references. It removes and de-allocates the CSR Thread. - * - * @param CsrThread - * Pointer to the CSR Thread that is to be deleted. - * - * @return None. - * - * @remarks Do not call this routine. It is reserved for the internal - * thread management routines when a CSR Thread has lost all - * its references. - * - * This routine is called with the Process Lock held. - * - *--*/ -VOID -NTAPI -CsrThreadRefcountZero(IN PCSR_THREAD CsrThread) -{ - PCSR_PROCESS CsrProcess = CsrThread->Process; - NTSTATUS Status; - ASSERT(ProcessStructureListLocked()); - - /* Remove this thread */ - CsrRemoveThread(CsrThread); - - /* Release the Process Lock */ - CsrReleaseProcessLock(); - - /* Close the NT Thread Handle */ - if (CsrThread->ThreadHandle) - { - UnProtectHandle(CsrThread->ThreadHandle); - Status = NtClose(CsrThread->ThreadHandle); - ASSERT(NT_SUCCESS(Status)); - } - - /* De-allocate the CSR Thread Object */ - CsrDeallocateThread(CsrThread); - - /* Remove a reference from the process */ - CsrDereferenceProcess(CsrProcess); -} - -/*++ - * @name CsrDestroyThread - * @implemented NT4 - * - * The CsrDestroyThread routine destroys the CSR Thread corresponding to - * a given Thread ID. - * - * @param Cid - * Pointer to the Client ID Structure corresponding to the CSR - * Thread which is about to be destroyed. - * - * @return STATUS_SUCCESS in case of success, STATUS_THREAD_IS_TERMINATING - * if the CSR Thread is already terminating. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrDestroyThread(IN PCLIENT_ID Cid) -{ - CLIENT_ID ClientId = *Cid; - PCSR_THREAD CsrThread; - PCSR_PROCESS CsrProcess; - - /* Acquire lock */ - CsrAcquireProcessLock(); - - /* Find the thread */ - CsrThread = CsrLocateThreadByClientId(&CsrProcess, - &ClientId); - - /* Make sure we got one back, and that it's not already gone */ - if (!CsrThread || CsrThread->Flags & CsrThreadTerminated) - { - /* Release the lock and return failure */ - CsrReleaseProcessLock(); - return STATUS_THREAD_IS_TERMINATING; - } - - /* Set the terminated flag */ - CsrThread->Flags |= CsrThreadTerminated; - - /* Acquire the Wait Lock */ - CsrAcquireWaitLock(); - - /* Do we have an active wait block? */ - if (CsrThread->WaitBlock) - { - /* Notify waiters of termination */ - CsrNotifyWaitBlock(CsrThread->WaitBlock, - NULL, - NULL, - NULL, - CsrProcessTerminating, - TRUE); - } - - /* Release the Wait Lock */ - CsrReleaseWaitLock(); - - /* Dereference the thread */ - CsrLockedDereferenceThread(CsrThread); - - /* Release the Process Lock and return success */ - CsrReleaseProcessLock(); - return STATUS_SUCCESS; -} - -/*++ - * @name CsrLockedDereferenceThread - * - * The CsrLockedDereferenceThread dereferences a CSR Thread while the - * Process Lock is already being held. - * - * @param CsrThread - * Pointer to the CSR Thread to be dereferenced. - * - * @return None. - * - * @remarks This routine will return with the Process Lock held. - * - *--*/ -VOID -NTAPI -CsrLockedDereferenceThread(IN PCSR_THREAD CsrThread) -{ - LONG LockCount; - - /* Decrease reference count */ - LockCount = --CsrThread->ReferenceCount; - ASSERT(LockCount >= 0); - if (!LockCount) - { - /* Call the generic cleanup code */ - CsrThreadRefcountZero(CsrThread); - CsrAcquireProcessLock(); - } -} - -/*++ - * @name CsrCreateThread - * @implemented NT4 - * - * The CsrCreateThread routine creates a CSR Thread object for an NT Thread. - * - * @param CsrProcess - * Pointer to the CSR Process which will contain the CSR Thread. - * - * @param hThread - * Handle to an existing NT Thread to which to associate this - * CSR Thread. - * - * @param ClientId - * Pointer to the Client ID structure of the NT Thread to associate - * with this CSR Thread. - * - * @return STATUS_SUCCESS in case of success, STATUS_UNSUCCESSFUL - * otherwise. - * - * @remarks None. - * - *--*/ -NTSTATUS -NTAPI -CsrCreateThread(IN PCSR_PROCESS CsrProcess, - IN HANDLE hThread, - IN PCLIENT_ID ClientId) -{ - PCSR_THREAD CsrThread; - PCSR_PROCESS CurrentProcess; - PCSR_THREAD CurrentThread = NtCurrentTeb()->CsrClientThread; - CLIENT_ID CurrentCid; - KERNEL_USER_TIMES KernelTimes; - - /* Get the current thread and CID */ - CurrentCid = CurrentThread->ClientId; - - /* Acquire the Process Lock */ - CsrAcquireProcessLock(); - - /* Get the current Process and make sure the Thread is valid with this CID */ - CurrentThread = CsrLocateThreadByClientId(&CurrentProcess, - &CurrentCid); - - /* Something is wrong if we get an empty thread back */ - if (!CurrentThread) - { - DPRINT1("CSRSRV:%s: invalid thread!\n", __FUNCTION__); - CsrReleaseProcessLock(); - return STATUS_THREAD_IS_TERMINATING; - } - - /* Get the Thread Create Time */ - NtQueryInformationThread(hThread, - ThreadTimes, - (PVOID)&KernelTimes, - sizeof(KernelTimes), - NULL); - - /* Allocate a CSR Thread Structure */ - if (!(CsrThread = CsrAllocateThread(CsrProcess))) - { - DPRINT1("CSRSRV:%s: out of memory!\n", __FUNCTION__); - CsrReleaseProcessLock(); - return STATUS_NO_MEMORY; - } - - /* Save the data we have */ - CsrThread->CreateTime = KernelTimes.CreateTime; - CsrThread->ClientId = *ClientId; - CsrThread->ThreadHandle = hThread; - CsrThread->Flags = 0; - - /* Insert the Thread into the Process */ - CsrInsertThread(CsrProcess, CsrThread); - - /* Release the lock and return */ - CsrReleaseProcessLock(); - return STATUS_SUCCESS; -} - -/*++ - * @name CsrAddStaticServerThread - * @implemented NT4 - * - * The CsrAddStaticServerThread routine adds a new CSR Thread to the - * CSR Server Process (CsrRootProcess). - * - * @param hThread - * Handle to an existing NT Thread to which to associate this - * CSR Thread. - * - * @param ClientId - * Pointer to the Client ID structure of the NT Thread to associate - * with this CSR Thread. - * - * @param ThreadFlags - * Initial CSR Thread Flags to associate to this CSR Thread. Usually - * CsrThreadIsServerThread. - * - * @return Pointer to the newly allocated CSR Thread. - * - * @remarks None. - * - *--*/ -PCSR_THREAD -NTAPI -CsrAddStaticServerThread(IN HANDLE hThread, - IN PCLIENT_ID ClientId, - IN ULONG ThreadFlags) -{ - PCSR_THREAD CsrThread; - - /* Get the Lock */ - CsrAcquireProcessLock(); - - /* Allocate the Server Thread */ - CsrThread = CsrAllocateThread(CsrRootProcess); - if (CsrThread) - { - /* Setup the Object */ - CsrThread->ThreadHandle = hThread; - ProtectHandle(hThread); - CsrThread->ClientId = *ClientId; - CsrThread->Flags = ThreadFlags; - - /* Insert it into the Thread List */ - InsertTailList(&CsrRootProcess->ThreadList, &CsrThread->Link); - - /* Increment the thread count */ - CsrRootProcess->ThreadCount++; - } - else - { - DPRINT1("CsrAddStaticServerThread: alloc failed for thread 0x%x\n", hThread); - } - - /* Release the Process Lock and return */ - CsrReleaseProcessLock(); - return CsrThread; -} - -/*++ - * @name CsrDereferenceThread - * @implemented NT4 - * - * The CsrDereferenceThread routine removes a reference from a CSR Thread. - * - * @param CsrThread - * Pointer to the CSR Thread to dereference. - * - * @return None. - * - * @remarks If the reference count has reached zero (ie: the CSR Thread has - * no more active references), it will be deleted. - * - *--*/ -VOID -NTAPI -CsrDereferenceThread(IN PCSR_THREAD CsrThread) -{ - /* Acquire process lock */ - CsrAcquireProcessLock(); - - /* Decrease reference count */ - ASSERT(CsrThread->ReferenceCount > 0); - if (!(--CsrThread->ReferenceCount)) - { - /* Call the generic cleanup code */ - CsrThreadRefcountZero(CsrThread); - } - else - { - /* Just release the lock */ - CsrReleaseProcessLock(); - } -} - -/* EOF */ diff --git a/deprecated/csrsrv/wait.c b/deprecated/csrsrv/wait.c deleted file mode 100644 index 1852c9dfb7e..00000000000 --- a/deprecated/csrsrv/wait.c +++ /dev/null @@ -1,449 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS CSR Sub System - * FILE: subsystems/win32/csrss/csrsrv/wait.c - * PURPOSE: CSR Server DLL Wait Implementation - * PROGRAMMERS: Emanuele Aliberti - * Alex Ionescu (alex@relsoft.net) - */ - -/* INCLUDES ******************************************************************/ - -#include "srv.h" - -#define NDEBUG -#include - -/* DATA **********************************************************************/ - -RTL_CRITICAL_SECTION CsrWaitListsLock; - -/* PRIVATE FUNCTIONS *********************************************************/ - -/*++ - * @name CsrInitializeWait - * - * The CsrInitializeWait routine initializes a CSR Wait Object. - * - * @param WaitFunction - * Pointer to the function that will handle this wait. - * - * @param CsrWaitThread - * Pointer to the CSR Thread that will perform the wait. - * - * @param WaitApiMessage - * Pointer to the CSR API Message associated to this wait. - * - * @param WaitContext - * Pointer to a user-defined parameter associated to this wait. - * - * @param NewWaitBlock - * Pointed to the initialized CSR Wait Block for this wait. - * - * @return TRUE in case of success, FALSE otherwise. - * - * @remarks None. - * - *--*/ -BOOLEAN -NTAPI -CsrInitializeWait(IN CSR_WAIT_FUNCTION WaitFunction, - IN PCSR_THREAD CsrWaitThread, - IN OUT PCSR_API_MESSAGE WaitApiMessage, - IN PVOID WaitContext, - OUT PCSR_WAIT_BLOCK *NewWaitBlock) -{ - ULONG Size; - PCSR_WAIT_BLOCK WaitBlock; - - /* Calculate the size of the wait block */ - Size = sizeof(CSR_WAIT_BLOCK) - - sizeof(WaitBlock->WaitApiMessage) + - WaitApiMessage->Header.u1.s1.TotalLength; - - /* Allocate the Wait Block */ - WaitBlock = RtlAllocateHeap(CsrHeap, 0, Size); - if (!WaitBlock) - { - /* Fail */ - WaitApiMessage->Status = STATUS_NO_MEMORY; - return FALSE; - } - - /* Initialize it */ - WaitBlock->Size = Size; - WaitBlock->WaitThread = CsrWaitThread; - WaitBlock->WaitContext = WaitContext; - WaitBlock->WaitFunction = WaitFunction; - WaitBlock->UserWaitList.Flink = NULL; - WaitBlock->UserWaitList.Blink = NULL; - WaitBlock->WaitList = WaitBlock->UserWaitList; - - /* Copy the message */ - RtlMoveMemory(&WaitBlock->WaitApiMessage, - WaitApiMessage, - WaitApiMessage->Header.u1.s1.TotalLength); - - /* Return the block */ - *NewWaitBlock = WaitBlock; - return TRUE; -} - -/*++ - * @name CsrNotifyWaitBlock - * - * The CsrNotifyWaitBlock routine calls the wait function for a registered - * CSR Wait Block, and replies to the attached CSR API Message, if any. - * - * @param WaitBlock - * Pointer to the CSR Wait Block - * - * @param WaitList - * Pointer to the wait list for this wait. - * - * @param WaitArgument[1-2] - * User-defined values to pass to the wait function. - * - * @param WaitFlags - * Wait flags for this wait. - * - * @param DereferenceThread - * Specifies whether the CSR Thread should be dereferenced at the - * end of this wait. - * - * @return TRUE in case of success, FALSE otherwise. - * - * @remarks After a wait block is notified, the wait function becomes invalid. - * - *--*/ -BOOLEAN -NTAPI -CsrNotifyWaitBlock(IN PCSR_WAIT_BLOCK WaitBlock, - IN PLIST_ENTRY WaitList, - IN PVOID WaitArgument1, - IN PVOID WaitArgument2, - IN ULONG WaitFlags, - IN BOOLEAN DereferenceThread) -{ - /* Call the wait function */ - if ((WaitBlock->WaitFunction)(WaitList, - WaitBlock->WaitThread, - &WaitBlock->WaitApiMessage, - WaitBlock->WaitContext, - WaitArgument1, - WaitArgument2, - WaitFlags)) - { - /* The wait is done, clear the block */ - WaitBlock->WaitThread->WaitBlock = NULL; - - /* Check for captured arguments */ - if (WaitBlock->WaitApiMessage.CsrCaptureData) - { - /* Release them */ - CsrReleaseCapturedArguments(&WaitBlock->WaitApiMessage); - } - - /* Reply to the port */ - NtReplyPort(WaitBlock->WaitThread->Process->ClientPort, - (PPORT_MESSAGE)&WaitBlock->WaitApiMessage); - - /* Check if we should dereference the thread */ - if (DereferenceThread) - { - /* Remove it from the Wait List */ - if (WaitBlock->WaitList.Flink) - { - RemoveEntryList(&WaitBlock->WaitList); - } - - /* Remove it from the User Wait List */ - if (WaitBlock->UserWaitList.Flink) - { - RemoveEntryList(&WaitBlock->UserWaitList); - } - - /* Dereference teh thread */ - CsrDereferenceThread(WaitBlock->WaitThread); - - /* Free the wait block */ - RtlFreeHeap(CsrHeap, 0, WaitBlock); - } - else - { - /* The wait is complete, but the thread is being kept alive */ - WaitBlock->WaitFunction = NULL; - } - - /* The wait suceeded */ - return TRUE; - } - - /* The wait failed */ - return FALSE; -} - -/* PUBLIC FUNCTIONS **********************************************************/ - -/*++ - * @name CsrCreateWait - * @implemented NT4 - * - * The CsrCreateWait routine creates a CSR Wait. - * - * @param WaitList - * Pointer to a list entry of the waits to associate. - * - * @param WaitFunction - * Pointer to the function that will handle this wait. - * - * @param CsrWaitThread - * Pointer to the CSR Thread that will perform the wait. - * - * @param WaitApiMessage - * Pointer to the CSR API Message associated to this wait. - * - * @param WaitContext - * Pointer to a user-defined parameter associated to this wait. - * - * @param UserWaitList - * Pointer to a list entry of the user-defined waits to associate. - * - * @return TRUE in case of success, FALSE otherwise. - * - * @remarks None. - * - *--*/ -BOOLEAN -NTAPI -CsrCreateWait(IN PLIST_ENTRY WaitList, - IN CSR_WAIT_FUNCTION WaitFunction, - IN PCSR_THREAD CsrWaitThread, - IN OUT PCSR_API_MESSAGE WaitApiMessage, - IN PVOID WaitContext, - IN PLIST_ENTRY UserWaitList OPTIONAL) -{ - PCSR_WAIT_BLOCK WaitBlock; - - /* Initialize the wait */ - if (!CsrInitializeWait(WaitFunction, - CsrWaitThread, - WaitApiMessage, - WaitContext, - &WaitBlock)) - { - return FALSE; - } - - /* Acquire the Wait Lock */ - CsrAcquireWaitLock(); - - /* Make sure the thread wasn't destroyed */ - if (CsrWaitThread->Flags & CsrThreadTerminated) - { - /* Fail the wait */ - RtlFreeHeap(CsrHeap, 0, WaitBlock); - CsrReleaseWaitLock(); - return FALSE; - } - - /* Insert the wait in the queue */ - InsertTailList(WaitList, &WaitBlock->WaitList); - - /* Insert the User Wait too, if one was given */ - if (UserWaitList) InsertTailList(UserWaitList, &WaitBlock->UserWaitList); - - /* Return */ - CsrReleaseWaitLock(); - return TRUE; -} - -/*++ - * @name CsrDereferenceWait - * @implemented NT4 - * - * The CsrDereferenceWait routine dereferences a CSR Wait Block. - * - * @param WaitList - * Pointer to the Wait List associated to the wait. - - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -CsrDereferenceWait(IN PLIST_ENTRY WaitList) -{ - PLIST_ENTRY NextEntry; - PCSR_WAIT_BLOCK WaitBlock; - - /* Acquire the Process and Wait Locks */ - CsrAcquireProcessLock(); - CsrAcquireWaitLock(); - - /* Set the list pointers */ - NextEntry = WaitList->Flink; - - /* Start the loop */ - while (NextEntry != WaitList) - { - /* Get the wait block */ - WaitBlock = CONTAINING_RECORD(NextEntry, CSR_WAIT_BLOCK, WaitList); - - /* Move to the next entry */ - NextEntry = NextEntry->Flink; - - /* Check if there's no Wait Routine */ - if (!WaitBlock->WaitFunction) - { - /* Remove it from the Wait List */ - if (WaitBlock->WaitList.Flink) - { - RemoveEntryList(&WaitBlock->WaitList); - } - - /* Remove it from the User Wait List */ - if (WaitBlock->UserWaitList.Flink) - { - RemoveEntryList(&WaitBlock->UserWaitList); - } - - /* Dereference the thread waiting on it */ - CsrDereferenceThread(WaitBlock->WaitThread); - - /* Free the block */ - RtlFreeHeap(CsrHeap, 0, WaitBlock); - } - } - - /* Release the locks */ - CsrReleaseWaitLock(); - CsrReleaseProcessLock(); -} - -/*++ - * @name CsrMoveSatisfiedWait - * @implemented NT5 - * - * The CsrMoveSatisfiedWait routine moves satisfied waits from a wait list - * to another list entry. - * - * @param NewEntry - * Pointer to a list entry where the satisfied waits will be added. - * - * @param WaitList - * Pointer to a list entry to analyze for satisfied waits. - * - * @return None. - * - * @remarks None. - * - *--*/ -VOID -NTAPI -CsrMoveSatisfiedWait(IN PLIST_ENTRY NewEntry, - IN PLIST_ENTRY WaitList) -{ - PLIST_ENTRY NextEntry; - PCSR_WAIT_BLOCK WaitBlock; - - /* Acquire the Wait Lock */ - CsrAcquireWaitLock(); - - /* Set the List pointers */ - NextEntry = WaitList->Flink; - - /* Start looping */ - while (NextEntry != WaitList) - { - /* Get the Wait block */ - WaitBlock = CONTAINING_RECORD(NextEntry, CSR_WAIT_BLOCK, WaitList); - - /* Go to the next entry */ - NextEntry = NextEntry->Flink; - - /* Check if there is a Wait Callback */ - if (WaitBlock->WaitFunction) - { - /* Remove it from the Wait Block Queue */ - RemoveEntryList(&WaitBlock->WaitList); - - /* Insert the new entry */ - InsertTailList(&WaitBlock->WaitList, NewEntry); - } - } - - /* Release the wait lock */ - CsrReleaseWaitLock(); -} - -/*++ - * @name CsrNotifyWait - * @implemented NT4 - * - * The CsrNotifyWait notifies a CSR Wait Block. - * - * @param WaitList - * Pointer to the list entry for this wait. - * - * @param WaitType - * Type of the wait to perform, either WaitAny or WaitAll. - * - * @param WaitArgument[1-2] - * User-defined argument to pass on to the wait function. - * - * @return TRUE in case of success, FALSE otherwise. - * - * @remarks None. - * - *--*/ -BOOLEAN -NTAPI -CsrNotifyWait(IN PLIST_ENTRY WaitList, - IN ULONG WaitType, - IN PVOID WaitArgument1, - IN PVOID WaitArgument2) -{ - PLIST_ENTRY NextEntry; - PCSR_WAIT_BLOCK WaitBlock; - BOOLEAN NotifySuccess = FALSE; - - /* Acquire the Wait Lock */ - CsrAcquireWaitLock(); - - /* Set the List pointers */ - NextEntry = WaitList->Flink; - - /* Start looping */ - while (NextEntry != WaitList) - { - /* Get the Wait block */ - WaitBlock = CONTAINING_RECORD(NextEntry, CSR_WAIT_BLOCK, WaitList); - - /* Go to the next entry */ - NextEntry = NextEntry->Flink; - - /* Check if there is a Wait Callback */ - if (WaitBlock->WaitFunction) - { - /* Notify the Waiter */ - NotifySuccess |= CsrNotifyWaitBlock(WaitBlock, - WaitList, - WaitArgument1, - WaitArgument2, - 0, - FALSE); - - /* We've already done a wait, so leave unless this is a Wait All */ - if (WaitType != WaitAll) break; - } - } - - /* Release the wait lock and return */ - CsrReleaseWaitLock(); - return NotifySuccess; -} - -/* EOF */ diff --git a/deprecated/win32csr/CMakeLists.txt b/deprecated/win32csr/CMakeLists.txt deleted file mode 100644 index 481cd4073a5..00000000000 --- a/deprecated/win32csr/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ - -include_directories( - BEFORE . - ${REACTOS_SOURCE_DIR}/subsystems/win32/csrss/include - ${REACTOS_SOURCE_DIR}/include/reactos/subsys - ${REACTOS_SOURCE_DIR}/include/reactos/drivers - ${REACTOS_SOURCE_DIR}/dll/cpl/console - ${REACTOS_SOURCE_DIR}/win32ss/include) - -spec2def(win32csr.dll win32csr.spec) - -list(APPEND SOURCE - alias.c - coninput.c - conoutput.c - console.c - desktopbg.c - dllmain.c - exitros.c - file.c - guiconsole.c - handle.c - harderror.c - lineinput.c - tuiconsole.c - win32csr.rc - ${CMAKE_CURRENT_BINARY_DIR}/win32csr.def) - -add_library(win32csr SHARED ${SOURCE}) -target_link_libraries(win32csr win32ksys ${PSEH_LIB}) -set_module_type(win32csr win32dll) -add_importlibs(win32csr psapi msvcrt kernel32 ntdll csrsrv) -add_delay_importlibs(win32csr user32 gdi32 advapi32) -add_pch(win32csr w32csr.h) -add_dependencies(win32csr bugcodes) -add_cd_file(TARGET win32csr DESTINATION reactos/system32 FOR all) diff --git a/deprecated/win32csr/alias.c b/deprecated/win32csr/alias.c deleted file mode 100644 index 3329d84e355..00000000000 --- a/deprecated/win32csr/alias.c +++ /dev/null @@ -1,552 +0,0 @@ -/* - * PROJECT: ReactOS CSRSS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: subsystems/win32/csrss/api/alias.c - * PURPOSE: CSRSS alias support functions - * COPYRIGHT: Christoph Wittich - * Johannes Anderwald - * - */ - - -/* INCLUDES ******************************************************************/ - -#define NDEBUG -#include "w32csr.h" -#include - -typedef struct tagALIAS_ENTRY -{ - LPCWSTR lpSource; - LPCWSTR lpTarget; - struct tagALIAS_ENTRY * Next; -} ALIAS_ENTRY, *PALIAS_ENTRY; - - -typedef struct tagALIAS_HEADER -{ - LPCWSTR lpExeName; - PALIAS_ENTRY Data; - struct tagALIAS_HEADER * Next; - -} ALIAS_HEADER, *PALIAS_HEADER; - -static -PALIAS_HEADER -IntFindAliasHeader(PALIAS_HEADER RootHeader, LPCWSTR lpExeName) -{ - while(RootHeader) - { - INT diff = _wcsicmp(RootHeader->lpExeName, lpExeName); - if (!diff) - return RootHeader; - - if (diff > 0) - break; - - RootHeader = RootHeader->Next; - } - return NULL; -} - -PALIAS_HEADER -IntCreateAliasHeader(LPCWSTR lpExeName) -{ - PALIAS_HEADER Entry; - UINT dwLength = wcslen(lpExeName) + 1; - - Entry = RtlAllocateHeap(Win32CsrApiHeap, 0, sizeof(ALIAS_HEADER) + sizeof(WCHAR) * dwLength); - if (!Entry) - return Entry; - - Entry->lpExeName = (LPCWSTR)(Entry + 1); - wcscpy((WCHAR*)Entry->lpExeName, lpExeName); - Entry->Data = NULL; - Entry->Next = NULL; - return Entry; -} - -VOID -IntInsertAliasHeader(PALIAS_HEADER * RootHeader, PALIAS_HEADER NewHeader) -{ - PALIAS_HEADER CurrentHeader; - PALIAS_HEADER *LastLink = RootHeader; - - while ((CurrentHeader = *LastLink) != NULL) - { - INT Diff = _wcsicmp(NewHeader->lpExeName, CurrentHeader->lpExeName); - if (Diff < 0) - { - break; - } - LastLink = &CurrentHeader->Next; - } - - *LastLink = NewHeader; - NewHeader->Next = CurrentHeader; -} - -PALIAS_ENTRY -IntGetAliasEntry(PALIAS_HEADER Header, LPCWSTR lpSrcName) -{ - PALIAS_ENTRY RootHeader; - - if (Header == NULL) - return NULL; - - RootHeader = Header->Data; - while(RootHeader) - { - INT diff; - DPRINT("IntGetAliasEntry>lpSource %S\n", RootHeader->lpSource); - diff = _wcsicmp(RootHeader->lpSource, lpSrcName); - if (!diff) - return RootHeader; - - if (diff > 0) - break; - - RootHeader = RootHeader->Next; - } - return NULL; -} - - -VOID -IntInsertAliasEntry(PALIAS_HEADER Header, PALIAS_ENTRY NewEntry) -{ - PALIAS_ENTRY CurrentEntry; - PALIAS_ENTRY *LastLink = &Header->Data; - - while ((CurrentEntry = *LastLink) != NULL) - { - INT Diff = _wcsicmp(NewEntry->lpSource, CurrentEntry->lpSource); - if (Diff < 0) - { - break; - } - LastLink = &CurrentEntry->Next; - } - - *LastLink = NewEntry; - NewEntry->Next = CurrentEntry; -} - -PALIAS_ENTRY -IntCreateAliasEntry(LPCWSTR lpSource, LPCWSTR lpTarget) -{ - UINT dwSource; - UINT dwTarget; - PALIAS_ENTRY Entry; - - dwSource = wcslen(lpSource) + 1; - dwTarget = wcslen(lpTarget) + 1; - - Entry = RtlAllocateHeap(Win32CsrApiHeap, 0, sizeof(ALIAS_ENTRY) + sizeof(WCHAR) * (dwSource + dwTarget)); - if (!Entry) - return Entry; - - Entry->lpSource = (LPCWSTR)(Entry + 1); - wcscpy((LPWSTR)Entry->lpSource, lpSource); - Entry->lpTarget = Entry->lpSource + dwSource; - wcscpy((LPWSTR)Entry->lpTarget, lpTarget); - Entry->Next = NULL; - - return Entry; -} - -UINT -IntGetConsoleAliasesExesLength(PALIAS_HEADER RootHeader) -{ - UINT length = 0; - - while(RootHeader) - { - length += (wcslen(RootHeader->lpExeName) + 1) * sizeof(WCHAR); - RootHeader = RootHeader->Next; - } - if (length) - length += sizeof(WCHAR); // last entry entry is terminated with 2 zero bytes - - return length; -} - -UINT -IntGetConsoleAliasesExes(PALIAS_HEADER RootHeader, LPWSTR TargetBuffer, UINT TargetBufferSize) -{ - UINT Offset = 0; - UINT Length; - - TargetBufferSize /= sizeof(WCHAR); - while(RootHeader) - { - Length = wcslen(RootHeader->lpExeName) + 1; - if (TargetBufferSize > Offset + Length) - { - wcscpy(&TargetBuffer[Offset], RootHeader->lpExeName); - Offset += Length; - } - else - { - break; - } - RootHeader = RootHeader->Next; - } - Length = min(Offset+1, TargetBufferSize); - TargetBuffer[Length] = L'\0'; - return Length * sizeof(WCHAR); -} - -UINT -IntGetAllConsoleAliasesLength(PALIAS_HEADER Header) -{ - UINT Length = 0; - PALIAS_ENTRY CurEntry = Header->Data; - - while(CurEntry) - { - Length += wcslen(CurEntry->lpSource); - Length += wcslen(CurEntry->lpTarget); - Length += 2; // zero byte and '=' - CurEntry = CurEntry->Next; - } - - if (Length) - { - return (Length+1) * sizeof(WCHAR); - } - return 0; -} -UINT -IntGetAllConsoleAliases(PALIAS_HEADER Header, LPWSTR TargetBuffer, UINT TargetBufferLength) -{ - PALIAS_ENTRY CurEntry = Header->Data; - UINT Offset = 0; - UINT SrcLength, TargetLength; - - TargetBufferLength /= sizeof(WCHAR); - while(CurEntry) - { - SrcLength = wcslen(CurEntry->lpSource) + 1; - TargetLength = wcslen(CurEntry->lpTarget) + 1; - if (Offset + TargetLength + SrcLength >= TargetBufferLength) - break; - - wcscpy(&TargetBuffer[Offset], CurEntry->lpSource); - Offset += SrcLength; - TargetBuffer[Offset] = L'='; - wcscpy(&TargetBuffer[Offset], CurEntry->lpTarget); - Offset += TargetLength; - - CurEntry = CurEntry->Next; - } - TargetBuffer[Offset] = L'\0'; - return Offset * sizeof(WCHAR); -} -VOID -IntDeleteAliasEntry(PALIAS_HEADER Header, PALIAS_ENTRY Entry) -{ - PALIAS_ENTRY *LastLink = &Header->Data; - PALIAS_ENTRY CurEntry; - - while ((CurEntry = *LastLink) != NULL) - { - if (CurEntry == Entry) - { - *LastLink = Entry->Next; - RtlFreeHeap(Win32CsrApiHeap, 0, Entry); - return; - } - LastLink = &CurEntry->Next; - } -} -VOID -IntDeleteAllAliases(PALIAS_HEADER RootHeader) -{ - PALIAS_HEADER Header, NextHeader; - PALIAS_ENTRY Entry, NextEntry; - for (Header = RootHeader; Header; Header = NextHeader) - { - NextHeader = Header->Next; - for (Entry = Header->Data; Entry; Entry = NextEntry) - { - NextEntry = Entry->Next; - RtlFreeHeap(Win32CsrApiHeap, 0, Entry); - } - RtlFreeHeap(Win32CsrApiHeap, 0, Header); - } -} - -CSR_API(CsrAddConsoleAlias) -{ - PCSRSS_CONSOLE Console; - PALIAS_HEADER Header; - PALIAS_ENTRY Entry; - WCHAR * lpExeName; - WCHAR * lpSource; - WCHAR * lpTarget; - //ULONG TotalLength; - //WCHAR * Ptr; - - //TotalLength = Request->Data.AddConsoleAlias.SourceLength + Request->Data.AddConsoleAlias.ExeLength + Request->Data.AddConsoleAlias.TargetLength; - //Ptr = (WCHAR*)((ULONG_PTR)Request + sizeof(CSR_API_MESSAGE)); - - lpSource = (WCHAR*)((ULONG_PTR)Request + sizeof(CSR_API_MESSAGE)); - lpExeName = (WCHAR*)((ULONG_PTR)Request + sizeof(CSR_API_MESSAGE) + Request->Data.AddConsoleAlias.SourceLength * sizeof(WCHAR)); - lpTarget = (Request->Data.AddConsoleAlias.TargetLength != 0 ? lpExeName + Request->Data.AddConsoleAlias.ExeLength : NULL); - - DPRINT("CsrAddConsoleAlias entered Request %p lpSource %p lpExeName %p lpTarget %p\n", Request, lpSource, lpExeName, lpTarget); - - if (lpExeName == NULL || lpSource == NULL) - { - return STATUS_INVALID_PARAMETER; - } - - Request->Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (!NT_SUCCESS(Request->Status)) - { - return Request->Status; - } - - Header = IntFindAliasHeader(Console->Aliases, lpExeName); - if (!Header && lpTarget != NULL) - { - Header = IntCreateAliasHeader(lpExeName); - if (!Header) - { - ConioUnlockConsole(Console); - return STATUS_INSUFFICIENT_RESOURCES; - } - IntInsertAliasHeader(&Console->Aliases, Header); - } - - if (lpTarget == NULL) // delete the entry - { - Entry = IntGetAliasEntry(Header, lpSource); - if (Entry) - { - IntDeleteAliasEntry(Header, Entry); - Request->Status = STATUS_SUCCESS; - } - else - { - Request->Status = STATUS_INVALID_PARAMETER; - } - ConioUnlockConsole(Console); - return Request->Status; - } - - Entry = IntCreateAliasEntry(lpSource, lpTarget); - - if (!Entry) - { - ConioUnlockConsole(Console); - return STATUS_INSUFFICIENT_RESOURCES; - } - - IntInsertAliasEntry(Header, Entry); - ConioUnlockConsole(Console); - return STATUS_SUCCESS; -} - -CSR_API(CsrGetConsoleAlias) -{ - PCSRSS_CONSOLE Console; - PALIAS_HEADER Header; - PALIAS_ENTRY Entry; - UINT Length; - WCHAR * lpExeName; - WCHAR * lpSource; - WCHAR * lpTarget; - - lpSource = (LPWSTR)((ULONG_PTR)Request + sizeof(CSR_API_MESSAGE)); - lpExeName = lpSource + Request->Data.GetConsoleAlias.SourceLength; - lpTarget = Request->Data.GetConsoleAlias.TargetBuffer; - - - DPRINT("CsrGetConsoleAlias entered lpExeName %p lpSource %p TargetBuffer %p TargetBufferLength %u\n", - lpExeName, lpSource, lpTarget, Request->Data.GetConsoleAlias.TargetBufferLength); - - if (Request->Data.GetConsoleAlias.ExeLength == 0 || lpTarget == NULL || - Request->Data.GetConsoleAlias.TargetBufferLength == 0 || Request->Data.GetConsoleAlias.SourceLength == 0) - { - return STATUS_INVALID_PARAMETER; - } - - Request->Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (!NT_SUCCESS(Request->Status)) - { - return Request->Status; - } - - Header = IntFindAliasHeader(Console->Aliases, lpExeName); - if (!Header) - { - ConioUnlockConsole(Console); - return STATUS_INVALID_PARAMETER; - } - - Entry = IntGetAliasEntry(Header, lpSource); - if (!Entry) - { - ConioUnlockConsole(Console); - return STATUS_INVALID_PARAMETER; - } - - Length = (wcslen(Entry->lpTarget)+1) * sizeof(WCHAR); - if (Length > Request->Data.GetConsoleAlias.TargetBufferLength) - { - ConioUnlockConsole(Console); - return STATUS_BUFFER_TOO_SMALL; - } - - if (!Win32CsrValidateBuffer(ProcessData, lpTarget, - Request->Data.GetConsoleAlias.TargetBufferLength, 1)) - { - ConioUnlockConsole(Console); - return STATUS_ACCESS_VIOLATION; - } - - wcscpy(lpTarget, Entry->lpTarget); - Request->Data.GetConsoleAlias.BytesWritten = Length; - ConioUnlockConsole(Console); - return STATUS_SUCCESS; -} - -CSR_API(CsrGetAllConsoleAliases) -{ - PCSRSS_CONSOLE Console; - ULONG BytesWritten; - PALIAS_HEADER Header; - - if (Request->Data.GetAllConsoleAlias.lpExeName == NULL) - { - return STATUS_INVALID_PARAMETER; - } - - Request->Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (!NT_SUCCESS(Request->Status)) - { - return Request->Status; - } - - Header = IntFindAliasHeader(Console->Aliases, Request->Data.GetAllConsoleAlias.lpExeName); - if (!Header) - { - ConioUnlockConsole(Console); - return STATUS_INVALID_PARAMETER; - } - - if (IntGetAllConsoleAliasesLength(Header) > Request->Data.GetAllConsoleAlias.AliasBufferLength) - { - ConioUnlockConsole(Console); - return STATUS_BUFFER_OVERFLOW; - } - - if (!Win32CsrValidateBuffer(ProcessData, - Request->Data.GetAllConsoleAlias.AliasBuffer, - Request->Data.GetAllConsoleAlias.AliasBufferLength, - 1)) - { - ConioUnlockConsole(Console); - return STATUS_ACCESS_VIOLATION; - } - - BytesWritten = IntGetAllConsoleAliases(Header, - Request->Data.GetAllConsoleAlias.AliasBuffer, - Request->Data.GetAllConsoleAlias.AliasBufferLength); - - Request->Data.GetAllConsoleAlias.BytesWritten = BytesWritten; - ConioUnlockConsole(Console); - return STATUS_SUCCESS; -} - -CSR_API(CsrGetAllConsoleAliasesLength) -{ - PCSRSS_CONSOLE Console; - PALIAS_HEADER Header; - UINT Length; - - if (Request->Data.GetAllConsoleAliasesLength.lpExeName == NULL) - { - return STATUS_INVALID_PARAMETER; - } - - Request->Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (!NT_SUCCESS(Request->Status)) - { - return Request->Status; - } - - Header = IntFindAliasHeader(Console->Aliases, Request->Data.GetAllConsoleAliasesLength.lpExeName); - if (!Header) - { - ConioUnlockConsole(Console); - return STATUS_INVALID_PARAMETER; - } - - Length = IntGetAllConsoleAliasesLength(Header); - Request->Data.GetAllConsoleAliasesLength.Length = Length; - ConioUnlockConsole(Console); - return STATUS_SUCCESS; -} - -CSR_API(CsrGetConsoleAliasesExes) -{ - PCSRSS_CONSOLE Console; - UINT BytesWritten; - UINT ExesLength; - - DPRINT("CsrGetConsoleAliasesExes entered\n"); - - Request->Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (!NT_SUCCESS(Request->Status)) - { - return Request->Status; - } - - ExesLength = IntGetConsoleAliasesExesLength(Console->Aliases); - - if (ExesLength > Request->Data.GetConsoleAliasesExes.Length) - { - ConioUnlockConsole(Console); - return STATUS_BUFFER_OVERFLOW; - } - - if (Request->Data.GetConsoleAliasesExes.ExeNames == NULL) - { - ConioUnlockConsole(Console); - return STATUS_INVALID_PARAMETER; - } - - if (!Win32CsrValidateBuffer(ProcessData, - Request->Data.GetConsoleAliasesExes.ExeNames, - Request->Data.GetConsoleAliasesExes.Length, - 1)) - { - ConioUnlockConsole(Console); - return STATUS_ACCESS_VIOLATION; - } - - BytesWritten = IntGetConsoleAliasesExes(Console->Aliases, - Request->Data.GetConsoleAliasesExes.ExeNames, - Request->Data.GetConsoleAliasesExes.Length); - - Request->Data.GetConsoleAliasesExes.BytesWritten = BytesWritten; - ConioUnlockConsole(Console); - return STATUS_SUCCESS; -} - -CSR_API(CsrGetConsoleAliasesExesLength) -{ - PCSRSS_CONSOLE Console; - DPRINT("CsrGetConsoleAliasesExesLength entered\n"); - - Request->Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (NT_SUCCESS(Request->Status)) - { - Request->Data.GetConsoleAliasesExesLength.Length = IntGetConsoleAliasesExesLength(Console->Aliases); - ConioUnlockConsole(Console); - } - return Request->Status; -} diff --git a/deprecated/win32csr/coninput.c b/deprecated/win32csr/coninput.c deleted file mode 100644 index 93a3f658ffc..00000000000 --- a/deprecated/win32csr/coninput.c +++ /dev/null @@ -1,651 +0,0 @@ -/* - * reactos/subsys/csrss/win32csr/conio.c - * - * Console I/O functions - * - * ReactOS Operating System - */ - -/* INCLUDES ******************************************************************/ - -#define NDEBUG -#include "w32csr.h" -#include - -/* GLOBALS *******************************************************************/ - -#define ConsoleInputUnicodeCharToAnsiChar(Console, dChar, sWChar) \ - WideCharToMultiByte((Console)->CodePage, 0, (sWChar), 1, (dChar), 1, NULL, NULL) - -#define ConsoleInputAnsiCharToUnicodeChar(Console, dWChar, sChar) \ - MultiByteToWideChar((Console)->CodePage, 0, (sChar), 1, (dWChar), 1) - -/* FUNCTIONS *****************************************************************/ - -CSR_API(CsrReadConsole) -{ - PLIST_ENTRY CurrentEntry; - ConsoleInput *Input; - PCHAR Buffer; - PWCHAR UnicodeBuffer; - ULONG i = 0; - ULONG nNumberOfCharsToRead, CharSize; - PCSRSS_CONSOLE Console; - NTSTATUS Status; - - DPRINT("CsrReadConsole\n"); - - CharSize = (Request->Data.ReadConsoleRequest.Unicode ? sizeof(WCHAR) : sizeof(CHAR)); - - nNumberOfCharsToRead = Request->Data.ReadConsoleRequest.NrCharactersToRead; - - Buffer = (PCHAR)Request->Data.ReadConsoleRequest.Buffer; - UnicodeBuffer = (PWCHAR)Buffer; - if (!Win32CsrValidateBuffer(ProcessData, Buffer, nNumberOfCharsToRead, CharSize)) - return STATUS_ACCESS_VIOLATION; - - if (Request->Data.ReadConsoleRequest.NrCharactersRead * sizeof(WCHAR) > nNumberOfCharsToRead * CharSize) - return STATUS_INVALID_PARAMETER; - - Status = ConioLockConsole(ProcessData, Request->Data.ReadConsoleRequest.ConsoleHandle, - &Console, GENERIC_READ); - if (! NT_SUCCESS(Status)) - { - return Status; - } - Request->Data.ReadConsoleRequest.EventHandle = ProcessData->ConsoleEvent; - - Status = STATUS_PENDING; /* we haven't read anything (yet) */ - if (Console->Mode & ENABLE_LINE_INPUT) - { - if (Console->LineBuffer == NULL) - { - /* Starting a new line */ - Console->LineMaxSize = max(256, nNumberOfCharsToRead); - Console->LineBuffer = HeapAlloc(Win32CsrApiHeap, 0, Console->LineMaxSize * sizeof(WCHAR)); - if (Console->LineBuffer == NULL) - { - Status = STATUS_NO_MEMORY; - goto done; - } - Console->LineComplete = FALSE; - Console->LineUpPressed = FALSE; - Console->LineInsertToggle = 0; - Console->LineWakeupMask = Request->Data.ReadConsoleRequest.CtrlWakeupMask; - Console->LineSize = Request->Data.ReadConsoleRequest.NrCharactersRead; - Console->LinePos = Console->LineSize; - /* pre-filling the buffer is only allowed in the Unicode API, - * so we don't need to worry about conversion */ - memcpy(Console->LineBuffer, Buffer, Console->LineSize * sizeof(WCHAR)); - if (Console->LineSize == Console->LineMaxSize) - { - Console->LineComplete = TRUE; - Console->LinePos = 0; - } - } - - /* If we don't have a complete line yet, process the pending input */ - while (!Console->LineComplete && !IsListEmpty(&Console->InputEvents)) - { - /* remove input event from queue */ - CurrentEntry = RemoveHeadList(&Console->InputEvents); - if (IsListEmpty(&Console->InputEvents)) - { - ResetEvent(Console->ActiveEvent); - } - Input = CONTAINING_RECORD(CurrentEntry, ConsoleInput, ListEntry); - - /* only pay attention to key down */ - if (KEY_EVENT == Input->InputEvent.EventType - && Input->InputEvent.Event.KeyEvent.bKeyDown) - { - LineInputKeyDown(Console, &Input->InputEvent.Event.KeyEvent); - Request->Data.ReadConsoleRequest.ControlKeyState = Input->InputEvent.Event.KeyEvent.dwControlKeyState; - } - HeapFree(Win32CsrApiHeap, 0, Input); - } - - /* Check if we have a complete line to read from */ - if (Console->LineComplete) - { - while (i < nNumberOfCharsToRead && Console->LinePos != Console->LineSize) - { - WCHAR Char = Console->LineBuffer[Console->LinePos++]; - if (Request->Data.ReadConsoleRequest.Unicode) - UnicodeBuffer[i++] = Char; - else - ConsoleInputUnicodeCharToAnsiChar(Console, &Buffer[i++], &Char); - } - if (Console->LinePos == Console->LineSize) - { - /* Entire line has been read */ - HeapFree(Win32CsrApiHeap, 0, Console->LineBuffer); - Console->LineBuffer = NULL; - } - Status = STATUS_SUCCESS; - } - } - else - { - /* Character input */ - while (i < nNumberOfCharsToRead && !IsListEmpty(&Console->InputEvents)) - { - /* remove input event from queue */ - CurrentEntry = RemoveHeadList(&Console->InputEvents); - if (IsListEmpty(&Console->InputEvents)) - { - ResetEvent(Console->ActiveEvent); - } - Input = CONTAINING_RECORD(CurrentEntry, ConsoleInput, ListEntry); - - /* only pay attention to valid ascii chars, on key down */ - if (KEY_EVENT == Input->InputEvent.EventType - && Input->InputEvent.Event.KeyEvent.bKeyDown - && Input->InputEvent.Event.KeyEvent.uChar.UnicodeChar != L'\0') - { - WCHAR Char = Input->InputEvent.Event.KeyEvent.uChar.UnicodeChar; - if (Request->Data.ReadConsoleRequest.Unicode) - UnicodeBuffer[i++] = Char; - else - ConsoleInputUnicodeCharToAnsiChar(Console, &Buffer[i++], &Char); - Status = STATUS_SUCCESS; /* did read something */ - } - HeapFree(Win32CsrApiHeap, 0, Input); - } - } -done: - Request->Data.ReadConsoleRequest.NrCharactersRead = i; - ConioUnlockConsole(Console); - - return Status; -} - -static VOID FASTCALL -ConioInputEventToAnsi(PCSRSS_CONSOLE Console, PINPUT_RECORD InputEvent) -{ - if (InputEvent->EventType == KEY_EVENT) - { - WCHAR UnicodeChar = InputEvent->Event.KeyEvent.uChar.UnicodeChar; - InputEvent->Event.KeyEvent.uChar.UnicodeChar = 0; - ConsoleInputUnicodeCharToAnsiChar(Console, - &InputEvent->Event.KeyEvent.uChar.AsciiChar, - &UnicodeChar); - } -} - -static NTSTATUS FASTCALL -ConioProcessChar(PCSRSS_CONSOLE Console, - PINPUT_RECORD InputEvent) -{ - ConsoleInput *ConInRec; - - /* Check for pause or unpause */ - if (InputEvent->EventType == KEY_EVENT && InputEvent->Event.KeyEvent.bKeyDown) - { - WORD vk = InputEvent->Event.KeyEvent.wVirtualKeyCode; - if (!(Console->PauseFlags & PAUSED_FROM_KEYBOARD)) - { - DWORD cks = InputEvent->Event.KeyEvent.dwControlKeyState; - if (Console->Mode & ENABLE_LINE_INPUT && - (vk == VK_PAUSE || (vk == 'S' && - (cks & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) && - !(cks & (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED))))) - { - ConioPause(Console, PAUSED_FROM_KEYBOARD); - return STATUS_SUCCESS; - } - } - else - { - if ((vk < VK_SHIFT || vk > VK_CAPITAL) && vk != VK_LWIN && - vk != VK_RWIN && vk != VK_NUMLOCK && vk != VK_SCROLL) - { - ConioUnpause(Console, PAUSED_FROM_KEYBOARD); - return STATUS_SUCCESS; - } - } - } - - /* add event to the queue */ - ConInRec = RtlAllocateHeap(Win32CsrApiHeap, 0, sizeof(ConsoleInput)); - if (ConInRec == NULL) - return STATUS_INSUFFICIENT_RESOURCES; - ConInRec->InputEvent = *InputEvent; - InsertTailList(&Console->InputEvents, &ConInRec->ListEntry); - SetEvent(Console->ActiveEvent); - return STATUS_SUCCESS; -} - -static DWORD FASTCALL -ConioGetShiftState(PBYTE KeyState) -{ - DWORD ssOut = 0; - - if (KeyState[VK_CAPITAL] & 1) - ssOut |= CAPSLOCK_ON; - - if (KeyState[VK_NUMLOCK] & 1) - ssOut |= NUMLOCK_ON; - - if (KeyState[VK_SCROLL] & 1) - ssOut |= SCROLLLOCK_ON; - - if (KeyState[VK_SHIFT] & 0x80) - ssOut |= SHIFT_PRESSED; - - if (KeyState[VK_LCONTROL] & 0x80) - ssOut |= LEFT_CTRL_PRESSED; - if (KeyState[VK_RCONTROL] & 0x80) - ssOut |= RIGHT_CTRL_PRESSED; - - if (KeyState[VK_LMENU] & 0x80) - ssOut |= LEFT_ALT_PRESSED; - if (KeyState[VK_RMENU] & 0x80) - ssOut |= RIGHT_ALT_PRESSED; - - return ssOut; -} - -VOID WINAPI -ConioProcessKey(MSG *msg, PCSRSS_CONSOLE Console, BOOL TextMode) -{ - static BYTE KeyState[256] = { 0 }; - /* MSDN mentions that you should use the last virtual key code received - * when putting a virtual key identity to a WM_CHAR message since multiple - * or translated keys may be involved. */ - static UINT LastVirtualKey = 0; - DWORD ShiftState; - UINT RepeatCount; - WCHAR UnicodeChar; - UINT VirtualKeyCode; - UINT VirtualScanCode; - BOOL Down = FALSE; - INPUT_RECORD er; - BOOLEAN Fake; // synthesized, not a real event - BOOLEAN NotChar; // message should not be used to return a character - - RepeatCount = 1; - VirtualScanCode = (msg->lParam >> 16) & 0xff; - Down = msg->message == WM_KEYDOWN || msg->message == WM_CHAR || - msg->message == WM_SYSKEYDOWN || msg->message == WM_SYSCHAR; - - GetKeyboardState(KeyState); - ShiftState = ConioGetShiftState(KeyState); - - if (msg->message == WM_CHAR || msg->message == WM_SYSCHAR) - { - VirtualKeyCode = LastVirtualKey; - UnicodeChar = msg->wParam; - } - else - { - WCHAR Chars[2]; - INT RetChars = 0; - - VirtualKeyCode = msg->wParam; - RetChars = ToUnicodeEx(VirtualKeyCode, - VirtualScanCode, - KeyState, - Chars, - 2, - 0, - 0); - UnicodeChar = (1 == RetChars ? Chars[0] : 0); - } - - er.EventType = KEY_EVENT; - er.Event.KeyEvent.bKeyDown = Down; - er.Event.KeyEvent.wRepeatCount = RepeatCount; - er.Event.KeyEvent.uChar.UnicodeChar = UnicodeChar; - er.Event.KeyEvent.dwControlKeyState = ShiftState; - er.Event.KeyEvent.wVirtualKeyCode = VirtualKeyCode; - er.Event.KeyEvent.wVirtualScanCode = VirtualScanCode; - - if (TextMode) - { - if (0 != (ShiftState & (RIGHT_ALT_PRESSED | LEFT_ALT_PRESSED)) - && VK_TAB == VirtualKeyCode) - { - if (Down) - { - TuiSwapConsole(ShiftState & SHIFT_PRESSED ? -1 : 1); - } - - return; - } - else if (VK_MENU == VirtualKeyCode && ! Down) - { - if (TuiSwapConsole(0)) - { - return; - } - } - } - else - { - if ((ShiftState & (RIGHT_ALT_PRESSED | LEFT_ALT_PRESSED) || KeyState[VK_MENU] & 0x80) && - (VirtualKeyCode == VK_ESCAPE || VirtualKeyCode == VK_TAB || VirtualKeyCode == VK_SPACE)) - { - DefWindowProcW( msg->hwnd, msg->message, msg->wParam, msg->lParam); - return; - } - } - - if (NULL == Console) - { - DPRINT1("No Active Console!\n"); - return; - } - - Fake = UnicodeChar && - (msg->message != WM_CHAR && msg->message != WM_SYSCHAR && - msg->message != WM_KEYUP && msg->message != WM_SYSKEYUP); - NotChar = (msg->message != WM_CHAR && msg->message != WM_SYSCHAR); - if (NotChar) - LastVirtualKey = msg->wParam; - - DPRINT ("csrss: %s %s %s %s %02x %02x '%lc' %04x\n", - Down ? "down" : "up ", - (msg->message == WM_CHAR || msg->message == WM_SYSCHAR) ? - "char" : "key ", - Fake ? "fake" : "real", - NotChar ? "notc" : "char", - VirtualScanCode, - VirtualKeyCode, - (UnicodeChar >= L' ') ? UnicodeChar : L'.', - ShiftState); - - if (Fake) - return; - - /* process Ctrl-C and Ctrl-Break */ - if (Console->Mode & ENABLE_PROCESSED_INPUT && - er.Event.KeyEvent.bKeyDown && - ((er.Event.KeyEvent.wVirtualKeyCode == VK_PAUSE) || - (er.Event.KeyEvent.wVirtualKeyCode == 'C')) && - (er.Event.KeyEvent.dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED) || KeyState[VK_CONTROL] & 0x80)) - { - PCSR_PROCESS current; - PLIST_ENTRY current_entry; - DPRINT1("Console_Api Ctrl-C\n"); - current_entry = Console->ProcessList.Flink; - while (current_entry != &Console->ProcessList) - { - current = CONTAINING_RECORD(current_entry, CSR_PROCESS, ConsoleLink); - current_entry = current_entry->Flink; - ConioConsoleCtrlEvent((DWORD)CTRL_C_EVENT, current); - } - if (Console->LineBuffer && !Console->LineComplete) - { - /* Line input is in progress; end it */ - Console->LinePos = Console->LineSize = 0; - Console->LineComplete = TRUE; - } - return; - } - - if (0 != (er.Event.KeyEvent.dwControlKeyState - & (RIGHT_ALT_PRESSED | LEFT_ALT_PRESSED)) - && (VK_UP == er.Event.KeyEvent.wVirtualKeyCode - || VK_DOWN == er.Event.KeyEvent.wVirtualKeyCode)) - { - if (er.Event.KeyEvent.bKeyDown) - { - /* scroll up or down */ - if (VK_UP == er.Event.KeyEvent.wVirtualKeyCode) - { - /* only scroll up if there is room to scroll up into */ - if (Console->ActiveBuffer->CurrentY != Console->ActiveBuffer->MaxY - 1) - { - Console->ActiveBuffer->VirtualY = (Console->ActiveBuffer->VirtualY + - Console->ActiveBuffer->MaxY - 1) % - Console->ActiveBuffer->MaxY; - Console->ActiveBuffer->CurrentY++; - } - } - else - { - /* only scroll down if there is room to scroll down into */ - if (Console->ActiveBuffer->CurrentY != 0) - { - Console->ActiveBuffer->VirtualY = (Console->ActiveBuffer->VirtualY + 1) % - Console->ActiveBuffer->MaxY; - Console->ActiveBuffer->CurrentY--; - } - } - ConioDrawConsole(Console); - } - return; - } - ConioProcessChar(Console, &er); -} - -CSR_API(CsrReadInputEvent) -{ - PLIST_ENTRY CurrentEntry; - PCSRSS_CONSOLE Console; - NTSTATUS Status; - BOOLEAN Done = FALSE; - ConsoleInput *Input; - - DPRINT("CsrReadInputEvent\n"); - - Request->Data.ReadInputRequest.Event = ProcessData->ConsoleEvent; - - Status = ConioLockConsole(ProcessData, Request->Data.ReadInputRequest.ConsoleHandle, &Console, GENERIC_READ); - if (! NT_SUCCESS(Status)) - { - return Status; - } - - /* only get input if there is any */ - CurrentEntry = Console->InputEvents.Flink; - while (CurrentEntry != &Console->InputEvents) - { - Input = CONTAINING_RECORD(CurrentEntry, ConsoleInput, ListEntry); - CurrentEntry = CurrentEntry->Flink; - - if (Done) - { - Request->Data.ReadInputRequest.MoreEvents = TRUE; - break; - } - - RemoveEntryList(&Input->ListEntry); - - if (!Done) - { - Request->Data.ReadInputRequest.Input = Input->InputEvent; - if (Request->Data.ReadInputRequest.Unicode == FALSE) - { - ConioInputEventToAnsi(Console, &Request->Data.ReadInputRequest.Input); - } - Done = TRUE; - } - - HeapFree(Win32CsrApiHeap, 0, Input); - } - - if (Done) - Status = STATUS_SUCCESS; - else - Status = STATUS_PENDING; - - if (IsListEmpty(&Console->InputEvents)) - { - ResetEvent(Console->ActiveEvent); - } - - ConioUnlockConsole(Console); - - return Status; -} - -CSR_API(CsrFlushInputBuffer) -{ - PLIST_ENTRY CurrentEntry; - PCSRSS_CONSOLE Console; - ConsoleInput* Input; - NTSTATUS Status; - - DPRINT("CsrFlushInputBuffer\n"); - - Status = ConioLockConsole(ProcessData, - Request->Data.FlushInputBufferRequest.ConsoleInput, - &Console, - GENERIC_WRITE); - if(! NT_SUCCESS(Status)) - { - return Status; - } - - /* Discard all entries in the input event queue */ - while (!IsListEmpty(&Console->InputEvents)) - { - CurrentEntry = RemoveHeadList(&Console->InputEvents); - Input = CONTAINING_RECORD(CurrentEntry, ConsoleInput, ListEntry); - /* Destroy the event */ - HeapFree(Win32CsrApiHeap, 0, Input); - } - ResetEvent(Console->ActiveEvent); - - ConioUnlockConsole(Console); - - return STATUS_SUCCESS; -} - -CSR_API(CsrGetNumberOfConsoleInputEvents) -{ - NTSTATUS Status; - PCSRSS_CONSOLE Console; - PLIST_ENTRY CurrentItem; - DWORD NumEvents; - - DPRINT("CsrGetNumberOfConsoleInputEvents\n"); - - Status = ConioLockConsole(ProcessData, Request->Data.GetNumInputEventsRequest.ConsoleHandle, &Console, GENERIC_READ); - if (! NT_SUCCESS(Status)) - { - return Status; - } - - CurrentItem = Console->InputEvents.Flink; - NumEvents = 0; - - /* If there are any events ... */ - while (CurrentItem != &Console->InputEvents) - { - CurrentItem = CurrentItem->Flink; - NumEvents++; - } - - ConioUnlockConsole(Console); - - Request->Data.GetNumInputEventsRequest.NumInputEvents = NumEvents; - - return STATUS_SUCCESS; -} - -CSR_API(CsrPeekConsoleInput) -{ - NTSTATUS Status; - PCSRSS_CONSOLE Console; - DWORD Length; - PLIST_ENTRY CurrentItem; - PINPUT_RECORD InputRecord; - ConsoleInput* Item; - UINT NumItems; - - DPRINT("CsrPeekConsoleInput\n"); - - Status = ConioLockConsole(ProcessData, Request->Data.GetNumInputEventsRequest.ConsoleHandle, &Console, GENERIC_READ); - if(! NT_SUCCESS(Status)) - { - return Status; - } - - InputRecord = Request->Data.PeekConsoleInputRequest.InputRecord; - Length = Request->Data.PeekConsoleInputRequest.Length; - - if (!Win32CsrValidateBuffer(ProcessData, InputRecord, Length, sizeof(INPUT_RECORD))) - { - ConioUnlockConsole(Console); - return STATUS_ACCESS_VIOLATION; - } - - NumItems = 0; - - if (! IsListEmpty(&Console->InputEvents)) - { - CurrentItem = Console->InputEvents.Flink; - - while (CurrentItem != &Console->InputEvents && NumItems < Length) - { - Item = CONTAINING_RECORD(CurrentItem, ConsoleInput, ListEntry); - - ++NumItems; - *InputRecord = Item->InputEvent; - - if (Request->Data.PeekConsoleInputRequest.Unicode == FALSE) - { - ConioInputEventToAnsi(Console, InputRecord); - } - - InputRecord++; - CurrentItem = CurrentItem->Flink; - } - } - - ConioUnlockConsole(Console); - - Request->Data.PeekConsoleInputRequest.Length = NumItems; - - return STATUS_SUCCESS; -} - -CSR_API(CsrWriteConsoleInput) -{ - PINPUT_RECORD InputRecord; - PCSRSS_CONSOLE Console; - NTSTATUS Status; - DWORD Length; - DWORD i; - - DPRINT("CsrWriteConsoleInput\n"); - - Status = ConioLockConsole(ProcessData, Request->Data.WriteConsoleInputRequest.ConsoleHandle, &Console, GENERIC_WRITE); - if (! NT_SUCCESS(Status)) - { - return Status; - } - - InputRecord = Request->Data.WriteConsoleInputRequest.InputRecord; - Length = Request->Data.WriteConsoleInputRequest.Length; - - if (!Win32CsrValidateBuffer(ProcessData, InputRecord, Length, sizeof(INPUT_RECORD))) - { - ConioUnlockConsole(Console); - return STATUS_ACCESS_VIOLATION; - } - - for (i = 0; i < Length && NT_SUCCESS(Status); i++) - { - if (!Request->Data.WriteConsoleInputRequest.Unicode && - InputRecord->EventType == KEY_EVENT) - { - CHAR AsciiChar = InputRecord->Event.KeyEvent.uChar.AsciiChar; - ConsoleInputAnsiCharToUnicodeChar(Console, - &InputRecord->Event.KeyEvent.uChar.UnicodeChar, - &AsciiChar); - } - Status = ConioProcessChar(Console, InputRecord++); - } - - ConioUnlockConsole(Console); - - Request->Data.WriteConsoleInputRequest.Length = i; - - return Status; -} - -/* EOF */ diff --git a/deprecated/win32csr/conio.h b/deprecated/win32csr/conio.h deleted file mode 100644 index 6f1b81a0b2e..00000000000 --- a/deprecated/win32csr/conio.h +++ /dev/null @@ -1,237 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: subsys/csrss/include/conio.h - * PURPOSE: CSRSS internal console I/O interface - */ - -#pragma once - -#include "api.h" -#include "win32csr.h" - -#define CSR_DEFAULT_CURSOR_SIZE 25 - -/* Object type magic numbers */ - -#define CONIO_CONSOLE_MAGIC 0x00000001 -#define CONIO_SCREEN_BUFFER_MAGIC 0x00000002 - -/************************************************************************ - * Screen buffer structure represents the win32 screen buffer object. * - * Internally, the portion of the buffer being shown CAN loop past the * - * bottom of the virtual buffer and wrap around to the top. Win32 does * - * not do this. I decided to do this because it eliminates the need to * - * do a massive memcpy() to scroll the contents of the buffer up to * - * scroll the screen on output, instead I just shift down the position * - * to be displayed, and let it wrap around to the top again. * - * The VirtualY member keeps track of the top Y coord that win32 * - * clients THINK is currently being displayed, because they think that * - * when the display reaches the bottom of the buffer and another line * - * being printed causes another line to scroll down, that the buffer IS * - * memcpy()'s up, and the bottom of the buffer is still displayed, but * - * internally, I just wrap back to the top of the buffer. * - ***********************************************************************/ - -typedef struct tagCSRSS_SCREEN_BUFFER -{ - Object_t Header; /* Object header */ - BYTE *Buffer; /* pointer to screen buffer */ - USHORT MaxX, MaxY; /* size of the entire scrollback buffer */ - USHORT ShowX, ShowY; /* beginning offset for the actual display area */ - ULONG CurrentX; /* Current X cursor position */ - ULONG CurrentY; /* Current Y cursor position */ - WORD DefaultAttrib; /* default char attribute */ - USHORT VirtualY; /* top row of buffer being displayed, reported to callers */ - CONSOLE_CURSOR_INFO CursorInfo; - USHORT Mode; - LIST_ENTRY ListEntry; /* entry in console's list of buffers */ -} CSRSS_SCREEN_BUFFER, *PCSRSS_SCREEN_BUFFER; - -typedef struct tagCSRSS_CONSOLE *PCSRSS_CONSOLE; - -typedef struct tagCSRSS_CONSOLE_VTBL -{ - VOID (WINAPI *InitScreenBuffer)(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER ScreenBuffer); - VOID (WINAPI *WriteStream)(PCSRSS_CONSOLE Console, SMALL_RECT *Block, LONG CursorStartX, LONG CursorStartY, - UINT ScrolledLines, CHAR *Buffer, UINT Length); - VOID (WINAPI *DrawRegion)(PCSRSS_CONSOLE Console, SMALL_RECT *Region); - BOOL (WINAPI *SetCursorInfo)(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER ScreenBuffer); - BOOL (WINAPI *SetScreenInfo)(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER ScreenBuffer, - UINT OldCursorX, UINT OldCursorY); - BOOL (WINAPI *UpdateScreenInfo)(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER ScreenBuffer); - BOOL (WINAPI *ChangeTitle)(PCSRSS_CONSOLE Console); - VOID (WINAPI *CleanupConsole)(PCSRSS_CONSOLE Console); - BOOL (WINAPI *ChangeIcon)(PCSRSS_CONSOLE Console, HICON hWindowIcon); - NTSTATUS (WINAPI *ResizeBuffer)(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER ScreenBuffer, COORD Size); -} CSRSS_CONSOLE_VTBL, *PCSRSS_CONSOLE_VTBL; - -typedef struct tagCSRSS_CONSOLE -{ - Object_t Header; /* Object header */ - LONG ReferenceCount; - CRITICAL_SECTION Lock; - PCSRSS_CONSOLE Prev, Next; /* Next and Prev consoles in console wheel */ - HANDLE ActiveEvent; - LIST_ENTRY InputEvents; /* List head for input event queue */ - PWCHAR LineBuffer; /* current line being input, in line buffered mode */ - WORD LineMaxSize; /* maximum size of line in characters (including CR+LF) */ - WORD LineSize; /* current size of line */ - WORD LinePos; /* current position within line */ - BOOLEAN LineComplete; /* user pressed enter, ready to send back to client */ - BOOLEAN LineUpPressed; - BOOLEAN LineInsertToggle; /* replace character over cursor instead of inserting */ - ULONG LineWakeupMask; /* bitmap of which control characters will end line input */ - LIST_ENTRY HistoryBuffers; - WORD HistoryBufferSize; /* size for newly created history buffers */ - WORD NumberOfHistoryBuffers; /* maximum number of history buffers allowed */ - BOOLEAN HistoryNoDup; /* remove old duplicate history entries */ - LIST_ENTRY BufferList; /* List of all screen buffers for this console */ - PCSRSS_SCREEN_BUFFER ActiveBuffer; /* Pointer to currently active screen buffer */ - WORD Mode; /* Console mode flags */ - UNICODE_STRING Title; /* Title of console */ - DWORD HardwareState; /* _GDI_MANAGED, _DIRECT */ - HWND hWindow; - COORD Size; - PVOID PrivateData; - UINT CodePage; - UINT OutputCodePage; - PCSRSS_CONSOLE_VTBL Vtbl; - LIST_ENTRY ProcessList; - struct tagALIAS_HEADER *Aliases; - CONSOLE_SELECTION_INFO Selection; - BYTE PauseFlags; - HANDLE UnpauseEvent; -} CSRSS_CONSOLE; - -typedef struct ConsoleInput_t -{ - LIST_ENTRY ListEntry; - INPUT_RECORD InputEvent; -} ConsoleInput; - -/* CONSOLE_SELECTION_INFO dwFlags values */ -#define CONSOLE_NO_SELECTION 0x0 -#define CONSOLE_SELECTION_IN_PROGRESS 0x1 -#define CONSOLE_SELECTION_NOT_EMPTY 0x2 -#define CONSOLE_MOUSE_SELECTION 0x4 -#define CONSOLE_MOUSE_DOWN 0x8 -/* HistoryFlags values */ -#define HISTORY_NO_DUP_FLAG 0x1 - -/* PauseFlags values (internal only) */ -#define PAUSED_FROM_KEYBOARD 0x1 -#define PAUSED_FROM_SCROLLBAR 0x2 -#define PAUSED_FROM_SELECTION 0x4 - -#define ConioInitScreenBuffer(Console, Buff) (Console)->Vtbl->InitScreenBuffer((Console), (Buff)) -#define ConioDrawRegion(Console, Region) (Console)->Vtbl->DrawRegion((Console), (Region)) -#define ConioWriteStream(Console, Block, CurStartX, CurStartY, ScrolledLines, Buffer, Length) \ - (Console)->Vtbl->WriteStream((Console), (Block), (CurStartX), (CurStartY), \ - (ScrolledLines), (Buffer), (Length)) -#define ConioSetCursorInfo(Console, Buff) (Console)->Vtbl->SetCursorInfo((Console), (Buff)) -#define ConioSetScreenInfo(Console, Buff, OldCursorX, OldCursorY) \ - (Console)->Vtbl->SetScreenInfo((Console), (Buff), (OldCursorX), (OldCursorY)) -#define ConioUpdateScreenInfo(Console, Buff) \ - (Console)->Vtbl->UpdateScreenInfo(Console, Buff) -#define ConioChangeTitle(Console) (Console)->Vtbl->ChangeTitle(Console) -#define ConioCleanupConsole(Console) (Console)->Vtbl->CleanupConsole(Console) -#define ConioChangeIcon(Console, hWindowIcon) (Console)->Vtbl->ChangeIcon(Console, hWindowIcon) -#define ConioResizeBuffer(Console, Buff, Size) (Console)->Vtbl->ResizeBuffer(Console, Buff, Size) - -/* console.c */ -NTSTATUS FASTCALL ConioConsoleFromProcessData(PCSR_PROCESS ProcessData, PCSRSS_CONSOLE *Console); -VOID WINAPI ConioDeleteConsole(Object_t *Object); -VOID WINAPI CsrInitConsoleSupport(VOID); -VOID FASTCALL ConioPause(PCSRSS_CONSOLE Console, UINT Flags); -VOID FASTCALL ConioUnpause(PCSRSS_CONSOLE Console, UINT Flags); -VOID FASTCALL ConioConsoleCtrlEvent(DWORD Event, PCSR_PROCESS ProcessData); -VOID FASTCALL ConioConsoleCtrlEventTimeout(DWORD Event, PCSR_PROCESS ProcessData, - DWORD Timeout); -CSR_API(CsrAllocConsole); -CSR_API(CsrFreeConsole); -CSR_API(CsrSetConsoleMode); -CSR_API(CsrGetConsoleMode); -CSR_API(CsrSetTitle); -CSR_API(CsrGetTitle); -CSR_API(CsrHardwareStateProperty); -CSR_API(CsrGetConsoleWindow); -CSR_API(CsrSetConsoleIcon); -CSR_API(CsrGetConsoleCodePage); -CSR_API(CsrSetConsoleCodePage); -CSR_API(CsrGetConsoleOutputCodePage); -CSR_API(CsrSetConsoleOutputCodePage); -CSR_API(CsrGetProcessList); -CSR_API(CsrGenerateCtrlEvent); -CSR_API(CsrGetConsoleSelectionInfo); - -/* coninput.c */ -#define ConioLockConsole(ProcessData, Handle, Ptr, Access) \ - Win32CsrLockObject((ProcessData), (Handle), (Object_t **)(Ptr), Access, CONIO_CONSOLE_MAGIC) -#define ConioUnlockConsole(Console) \ - Win32CsrUnlockObject((Object_t *) Console) -void WINAPI ConioProcessKey(MSG *msg, PCSRSS_CONSOLE Console, BOOL TextMode); -CSR_API(CsrReadConsole); -CSR_API(CsrReadInputEvent); -CSR_API(CsrFlushInputBuffer); -CSR_API(CsrGetNumberOfConsoleInputEvents); -CSR_API(CsrPeekConsoleInput); -CSR_API(CsrWriteConsoleInput); - -/* conoutput.c */ -#define ConioRectHeight(Rect) \ - (((Rect)->Top) > ((Rect)->Bottom) ? 0 : ((Rect)->Bottom) - ((Rect)->Top) + 1) -#define ConioRectWidth(Rect) \ - (((Rect)->Left) > ((Rect)->Right) ? 0 : ((Rect)->Right) - ((Rect)->Left) + 1) -#define ConioLockScreenBuffer(ProcessData, Handle, Ptr, Access) \ - Win32CsrLockObject((ProcessData), (Handle), (Object_t **)(Ptr), Access, CONIO_SCREEN_BUFFER_MAGIC) -#define ConioUnlockScreenBuffer(Buff) \ - Win32CsrUnlockObject((Object_t *) Buff) -PBYTE FASTCALL ConioCoordToPointer(PCSRSS_SCREEN_BUFFER Buf, ULONG X, ULONG Y); -VOID FASTCALL ConioDrawConsole(PCSRSS_CONSOLE Console); -NTSTATUS FASTCALL ConioWriteConsole(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER Buff, - CHAR *Buffer, DWORD Length, BOOL Attrib); -NTSTATUS FASTCALL CsrInitConsoleScreenBuffer(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER Buffer); -VOID WINAPI ConioDeleteScreenBuffer(PCSRSS_SCREEN_BUFFER Buffer); -DWORD FASTCALL ConioEffectiveCursorSize(PCSRSS_CONSOLE Console, DWORD Scale); - -CSR_API(CsrWriteConsole); -CSR_API(CsrGetScreenBufferInfo); -CSR_API(CsrSetCursor); -CSR_API(CsrWriteConsoleOutputChar); -CSR_API(CsrFillOutputChar); -CSR_API(CsrWriteConsoleOutputAttrib); -CSR_API(CsrFillOutputAttrib); -CSR_API(CsrGetCursorInfo); -CSR_API(CsrSetCursorInfo); -CSR_API(CsrSetTextAttrib); -CSR_API(CsrCreateScreenBuffer); -CSR_API(CsrSetScreenBuffer); -CSR_API(CsrWriteConsoleOutput); -CSR_API(CsrScrollConsoleScreenBuffer); -CSR_API(CsrReadConsoleOutputChar); -CSR_API(CsrReadConsoleOutputAttrib); -CSR_API(CsrReadConsoleOutput); -CSR_API(CsrSetScreenBufferSize); - -/* alias.c */ -VOID IntDeleteAllAliases(struct tagALIAS_HEADER *RootHeader); -CSR_API(CsrAddConsoleAlias); -CSR_API(CsrGetConsoleAlias); -CSR_API(CsrGetAllConsoleAliases); -CSR_API(CsrGetAllConsoleAliasesLength); -CSR_API(CsrGetConsoleAliasesExes); -CSR_API(CsrGetConsoleAliasesExesLength); - -/* lineinput.c */ -struct tagHISTORY_BUFFER; -VOID FASTCALL HistoryDeleteBuffer(struct tagHISTORY_BUFFER *Hist); -CSR_API(CsrGetCommandHistoryLength); -CSR_API(CsrGetCommandHistory); -CSR_API(CsrExpungeCommandHistory); -CSR_API(CsrSetHistoryNumberCommands); -CSR_API(CsrGetHistoryInfo); -CSR_API(CsrSetHistoryInfo); -VOID FASTCALL LineInputKeyDown(PCSRSS_CONSOLE Console, KEY_EVENT_RECORD *KeyEvent); - -/* EOF */ diff --git a/deprecated/win32csr/conoutput.c b/deprecated/win32csr/conoutput.c deleted file mode 100644 index 5415a601ab9..00000000000 --- a/deprecated/win32csr/conoutput.c +++ /dev/null @@ -1,1457 +0,0 @@ -/* - * reactos/subsys/csrss/win32csr/conio.c - * - * Console I/O functions - * - * ReactOS Operating System - */ - -/* INCLUDES ******************************************************************/ - -#define NDEBUG -#include "w32csr.h" -#include - -/* GLOBALS *******************************************************************/ - -#define ConioInitRect(Rect, top, left, bottom, right) \ - ((Rect)->Top) = top; \ - ((Rect)->Left) = left; \ - ((Rect)->Bottom) = bottom; \ - ((Rect)->Right) = right - -#define ConioIsRectEmpty(Rect) \ - (((Rect)->Left > (Rect)->Right) || ((Rect)->Top > (Rect)->Bottom)) - -#define ConsoleUnicodeCharToAnsiChar(Console, dChar, sWChar) \ - WideCharToMultiByte((Console)->OutputCodePage, 0, (sWChar), 1, (dChar), 1, NULL, NULL) - -#define ConsoleAnsiCharToUnicodeChar(Console, dWChar, sChar) \ - MultiByteToWideChar((Console)->OutputCodePage, 0, (sChar), 1, (dWChar), 1) - -/* FUNCTIONS *****************************************************************/ - -PBYTE FASTCALL -ConioCoordToPointer(PCSRSS_SCREEN_BUFFER Buff, ULONG X, ULONG Y) -{ - return &Buff->Buffer[2 * (((Y + Buff->VirtualY) % Buff->MaxY) * Buff->MaxX + X)]; -} - -static VOID FASTCALL -ClearLineBuffer(PCSRSS_SCREEN_BUFFER Buff) -{ - PBYTE Ptr = ConioCoordToPointer(Buff, 0, Buff->CurrentY); - UINT Pos; - - for (Pos = 0; Pos < Buff->MaxX; Pos++) - { - /* Fill the cell */ - *Ptr++ = ' '; - *Ptr++ = Buff->DefaultAttrib; - } -} - -NTSTATUS FASTCALL -CsrInitConsoleScreenBuffer(PCSRSS_CONSOLE Console, - PCSRSS_SCREEN_BUFFER Buffer) -{ - DPRINT("CsrInitConsoleScreenBuffer Size X %d Size Y %d\n", Buffer->MaxX, Buffer->MaxY); - - Buffer->Header.Type = CONIO_SCREEN_BUFFER_MAGIC; - Buffer->Header.Console = Console; - Buffer->Header.HandleCount = 0; - Buffer->ShowX = 0; - Buffer->ShowY = 0; - Buffer->VirtualY = 0; - Buffer->Buffer = HeapAlloc(Win32CsrApiHeap, HEAP_ZERO_MEMORY, Buffer->MaxX * Buffer->MaxY * 2); - if (NULL == Buffer->Buffer) - { - return STATUS_INSUFFICIENT_RESOURCES; - } - ConioInitScreenBuffer(Console, Buffer); - /* initialize buffer to be empty with default attributes */ - for (Buffer->CurrentY = 0 ; Buffer->CurrentY < Buffer->MaxY; Buffer->CurrentY++) - { - ClearLineBuffer(Buffer); - } - Buffer->Mode = ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT; - Buffer->CurrentX = 0; - Buffer->CurrentY = 0; - - InsertHeadList(&Console->BufferList, &Buffer->ListEntry); - return STATUS_SUCCESS; -} - -static VOID FASTCALL -ConioNextLine(PCSRSS_SCREEN_BUFFER Buff, SMALL_RECT *UpdateRect, UINT *ScrolledLines) -{ - /* If we hit bottom, slide the viewable screen */ - if (++Buff->CurrentY == Buff->MaxY) - { - Buff->CurrentY--; - if (++Buff->VirtualY == Buff->MaxY) - { - Buff->VirtualY = 0; - } - (*ScrolledLines)++; - ClearLineBuffer(Buff); - if (UpdateRect->Top != 0) - { - UpdateRect->Top--; - } - } - UpdateRect->Left = 0; - UpdateRect->Right = Buff->MaxX - 1; - UpdateRect->Bottom = Buff->CurrentY; -} - -NTSTATUS FASTCALL -ConioWriteConsole(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER Buff, - CHAR *Buffer, DWORD Length, BOOL Attrib) -{ - UINT i; - PBYTE Ptr; - SMALL_RECT UpdateRect; - LONG CursorStartX, CursorStartY; - UINT ScrolledLines; - - CursorStartX = Buff->CurrentX; - CursorStartY = Buff->CurrentY; - UpdateRect.Left = Buff->MaxX; - UpdateRect.Top = Buff->CurrentY; - UpdateRect.Right = -1; - UpdateRect.Bottom = Buff->CurrentY; - ScrolledLines = 0; - - for (i = 0; i < Length; i++) - { - if (Buff->Mode & ENABLE_PROCESSED_OUTPUT) - { - /* --- LF --- */ - if (Buffer[i] == '\n') - { - Buff->CurrentX = 0; - ConioNextLine(Buff, &UpdateRect, &ScrolledLines); - continue; - } - /* --- BS --- */ - else if (Buffer[i] == '\b') - { - /* Only handle BS if we're not on the first pos of the first line */ - if (0 != Buff->CurrentX || 0 != Buff->CurrentY) - { - if (0 == Buff->CurrentX) - { - /* slide virtual position up */ - Buff->CurrentX = Buff->MaxX - 1; - Buff->CurrentY--; - UpdateRect.Top = min(UpdateRect.Top, (LONG)Buff->CurrentY); - } - else - { - Buff->CurrentX--; - } - Ptr = ConioCoordToPointer(Buff, Buff->CurrentX, Buff->CurrentY); - Ptr[0] = ' '; - Ptr[1] = Buff->DefaultAttrib; - UpdateRect.Left = min(UpdateRect.Left, (LONG) Buff->CurrentX); - UpdateRect.Right = max(UpdateRect.Right, (LONG) Buff->CurrentX); - } - continue; - } - /* --- CR --- */ - else if (Buffer[i] == '\r') - { - Buff->CurrentX = 0; - UpdateRect.Left = min(UpdateRect.Left, (LONG) Buff->CurrentX); - UpdateRect.Right = max(UpdateRect.Right, (LONG) Buff->CurrentX); - continue; - } - /* --- TAB --- */ - else if (Buffer[i] == '\t') - { - UINT EndX; - - UpdateRect.Left = min(UpdateRect.Left, (LONG)Buff->CurrentX); - EndX = (Buff->CurrentX + 8) & ~7; - if (EndX > Buff->MaxX) - { - EndX = Buff->MaxX; - } - Ptr = ConioCoordToPointer(Buff, Buff->CurrentX, Buff->CurrentY); - while (Buff->CurrentX < EndX) - { - *Ptr++ = ' '; - *Ptr++ = Buff->DefaultAttrib; - Buff->CurrentX++; - } - UpdateRect.Right = max(UpdateRect.Right, (LONG) Buff->CurrentX - 1); - if (Buff->CurrentX == Buff->MaxX) - { - if (Buff->Mode & ENABLE_WRAP_AT_EOL_OUTPUT) - { - Buff->CurrentX = 0; - ConioNextLine(Buff, &UpdateRect, &ScrolledLines); - } - else - { - Buff->CurrentX--; - } - } - continue; - } - } - UpdateRect.Left = min(UpdateRect.Left, (LONG)Buff->CurrentX); - UpdateRect.Right = max(UpdateRect.Right, (LONG) Buff->CurrentX); - Ptr = ConioCoordToPointer(Buff, Buff->CurrentX, Buff->CurrentY); - Ptr[0] = Buffer[i]; - if (Attrib) - { - Ptr[1] = Buff->DefaultAttrib; - } - Buff->CurrentX++; - if (Buff->CurrentX == Buff->MaxX) - { - if (Buff->Mode & ENABLE_WRAP_AT_EOL_OUTPUT) - { - Buff->CurrentX = 0; - ConioNextLine(Buff, &UpdateRect, &ScrolledLines); - } - else - { - Buff->CurrentX = CursorStartX; - } - } - } - - if (! ConioIsRectEmpty(&UpdateRect) && Buff == Console->ActiveBuffer) - { - ConioWriteStream(Console, &UpdateRect, CursorStartX, CursorStartY, ScrolledLines, - Buffer, Length); - } - - return STATUS_SUCCESS; -} - -__inline BOOLEAN ConioGetIntersection( - SMALL_RECT *Intersection, - SMALL_RECT *Rect1, - SMALL_RECT *Rect2) -{ - if (ConioIsRectEmpty(Rect1) || - (ConioIsRectEmpty(Rect2)) || - (Rect1->Top > Rect2->Bottom) || - (Rect1->Left > Rect2->Right) || - (Rect1->Bottom < Rect2->Top) || - (Rect1->Right < Rect2->Left)) - { - /* The rectangles do not intersect */ - ConioInitRect(Intersection, 0, -1, 0, -1); - return FALSE; - } - - ConioInitRect(Intersection, - max(Rect1->Top, Rect2->Top), - max(Rect1->Left, Rect2->Left), - min(Rect1->Bottom, Rect2->Bottom), - min(Rect1->Right, Rect2->Right)); - - return TRUE; -} - -__inline BOOLEAN ConioGetUnion( - SMALL_RECT *Union, - SMALL_RECT *Rect1, - SMALL_RECT *Rect2) -{ - if (ConioIsRectEmpty(Rect1)) - { - if (ConioIsRectEmpty(Rect2)) - { - ConioInitRect(Union, 0, -1, 0, -1); - return FALSE; - } - else - { - *Union = *Rect2; - } - } - else if (ConioIsRectEmpty(Rect2)) - { - *Union = *Rect1; - } - else - { - ConioInitRect(Union, - min(Rect1->Top, Rect2->Top), - min(Rect1->Left, Rect2->Left), - max(Rect1->Bottom, Rect2->Bottom), - max(Rect1->Right, Rect2->Right)); - } - - return TRUE; -} - -/* Move from one rectangle to another. We must be careful about the order that - * this is done, to avoid overwriting parts of the source before they are moved. */ -static VOID FASTCALL -ConioMoveRegion(PCSRSS_SCREEN_BUFFER ScreenBuffer, - SMALL_RECT *SrcRegion, - SMALL_RECT *DstRegion, - SMALL_RECT *ClipRegion, - WORD Fill) -{ - int Width = ConioRectWidth(SrcRegion); - int Height = ConioRectHeight(SrcRegion); - int SX, SY; - int DX, DY; - int XDelta, YDelta; - int i, j; - - SY = SrcRegion->Top; - DY = DstRegion->Top; - YDelta = 1; - if (SY < DY) - { - /* Moving down: work from bottom up */ - SY = SrcRegion->Bottom; - DY = DstRegion->Bottom; - YDelta = -1; - } - for (i = 0; i < Height; i++) - { - PWORD SRow = (PWORD)ConioCoordToPointer(ScreenBuffer, 0, SY); - PWORD DRow = (PWORD)ConioCoordToPointer(ScreenBuffer, 0, DY); - - SX = SrcRegion->Left; - DX = DstRegion->Left; - XDelta = 1; - if (SX < DX) - { - /* Moving right: work from right to left */ - SX = SrcRegion->Right; - DX = DstRegion->Right; - XDelta = -1; - } - for (j = 0; j < Width; j++) - { - WORD Cell = SRow[SX]; - if (SX >= ClipRegion->Left && SX <= ClipRegion->Right - && SY >= ClipRegion->Top && SY <= ClipRegion->Bottom) - { - SRow[SX] = Fill; - } - if (DX >= ClipRegion->Left && DX <= ClipRegion->Right - && DY >= ClipRegion->Top && DY <= ClipRegion->Bottom) - { - DRow[DX] = Cell; - } - SX += XDelta; - DX += XDelta; - } - SY += YDelta; - DY += YDelta; - } -} - -CSR_API(CsrWriteConsole) -{ - NTSTATUS Status; - PCHAR Buffer; - PCSRSS_SCREEN_BUFFER Buff; - PCSRSS_CONSOLE Console; - DWORD Written = 0; - ULONG Length; - ULONG CharSize = (Request->Data.WriteConsoleRequest.Unicode ? sizeof(WCHAR) : sizeof(CHAR)); - - DPRINT("CsrWriteConsole\n"); - - if (Request->Header.u1.s1.TotalLength - < CSR_API_MESSAGE_HEADER_SIZE(CSRSS_WRITE_CONSOLE) - + (Request->Data.WriteConsoleRequest.NrCharactersToWrite * CharSize)) - { - DPRINT1("Invalid request size\n"); - return STATUS_INVALID_PARAMETER; - } - - Status = ConioLockScreenBuffer(ProcessData, Request->Data.WriteConsoleRequest.ConsoleHandle, &Buff, GENERIC_WRITE); - if (! NT_SUCCESS(Status)) - { - return Status; - } - Console = Buff->Header.Console; - - if (Console->UnpauseEvent) - { - Status = NtDuplicateObject(GetCurrentProcess(), Console->UnpauseEvent, - ProcessData->ProcessHandle, &Request->Data.WriteConsoleRequest.UnpauseEvent, - SYNCHRONIZE, 0, 0); - ConioUnlockScreenBuffer(Buff); - return NT_SUCCESS(Status) ? STATUS_PENDING : Status; - } - - if(Request->Data.WriteConsoleRequest.Unicode) - { - Length = WideCharToMultiByte(Console->OutputCodePage, 0, - (PWCHAR)Request->Data.WriteConsoleRequest.Buffer, - Request->Data.WriteConsoleRequest.NrCharactersToWrite, - NULL, 0, NULL, NULL); - Buffer = RtlAllocateHeap(GetProcessHeap(), 0, Length); - if (Buffer) - { - WideCharToMultiByte(Console->OutputCodePage, 0, - (PWCHAR)Request->Data.WriteConsoleRequest.Buffer, - Request->Data.WriteConsoleRequest.NrCharactersToWrite, - Buffer, Length, NULL, NULL); - } - else - { - Status = STATUS_NO_MEMORY; - } - } - else - { - Buffer = (PCHAR)Request->Data.WriteConsoleRequest.Buffer; - } - - if (Buffer) - { - if (NT_SUCCESS(Status)) - { - Status = ConioWriteConsole(Console, Buff, Buffer, - Request->Data.WriteConsoleRequest.NrCharactersToWrite, TRUE); - if (NT_SUCCESS(Status)) - { - Written = Request->Data.WriteConsoleRequest.NrCharactersToWrite; - } - } - if (Request->Data.WriteConsoleRequest.Unicode) - { - RtlFreeHeap(GetProcessHeap(), 0, Buffer); - } - } - ConioUnlockScreenBuffer(Buff); - - Request->Data.WriteConsoleRequest.NrCharactersWritten = Written; - - return Status; -} - -VOID WINAPI -ConioDeleteScreenBuffer(PCSRSS_SCREEN_BUFFER Buffer) -{ - PCSRSS_CONSOLE Console = Buffer->Header.Console; - - RemoveEntryList(&Buffer->ListEntry); - if (Buffer == Console->ActiveBuffer) - { - /* Deleted active buffer; switch to most recently created */ - Console->ActiveBuffer = NULL; - if (!IsListEmpty(&Console->BufferList)) - { - Console->ActiveBuffer = CONTAINING_RECORD(Console->BufferList.Flink, CSRSS_SCREEN_BUFFER, ListEntry); - ConioDrawConsole(Console); - } - } - - HeapFree(Win32CsrApiHeap, 0, Buffer->Buffer); - HeapFree(Win32CsrApiHeap, 0, Buffer); -} - -VOID FASTCALL -ConioDrawConsole(PCSRSS_CONSOLE Console) -{ - SMALL_RECT Region; - - ConioInitRect(&Region, 0, 0, Console->Size.Y - 1, Console->Size.X - 1); - - ConioDrawRegion(Console, &Region); -} - -CSR_API(CsrGetScreenBufferInfo) -{ - NTSTATUS Status; - PCSRSS_CONSOLE Console; - PCSRSS_SCREEN_BUFFER Buff; - PCONSOLE_SCREEN_BUFFER_INFO pInfo; - - DPRINT("CsrGetScreenBufferInfo\n"); - - Status = ConioLockScreenBuffer(ProcessData, Request->Data.ScreenBufferInfoRequest.ConsoleHandle, &Buff, GENERIC_READ); - if (! NT_SUCCESS(Status)) - { - return Status; - } - Console = Buff->Header.Console; - pInfo = &Request->Data.ScreenBufferInfoRequest.Info; - pInfo->dwSize.X = Buff->MaxX; - pInfo->dwSize.Y = Buff->MaxY; - pInfo->dwCursorPosition.X = Buff->CurrentX; - pInfo->dwCursorPosition.Y = Buff->CurrentY; - pInfo->wAttributes = Buff->DefaultAttrib; - pInfo->srWindow.Left = Buff->ShowX; - pInfo->srWindow.Right = Buff->ShowX + Console->Size.X - 1; - pInfo->srWindow.Top = Buff->ShowY; - pInfo->srWindow.Bottom = Buff->ShowY + Console->Size.Y - 1; - pInfo->dwMaximumWindowSize.X = Buff->MaxX; - pInfo->dwMaximumWindowSize.Y = Buff->MaxY; - ConioUnlockScreenBuffer(Buff); - - return STATUS_SUCCESS; -} - -CSR_API(CsrSetCursor) -{ - NTSTATUS Status; - PCSRSS_CONSOLE Console; - PCSRSS_SCREEN_BUFFER Buff; - LONG OldCursorX, OldCursorY; - LONG NewCursorX, NewCursorY; - - DPRINT("CsrSetCursor\n"); - - Status = ConioLockScreenBuffer(ProcessData, Request->Data.SetCursorRequest.ConsoleHandle, &Buff, GENERIC_WRITE); - if (! NT_SUCCESS(Status)) - { - return Status; - } - Console = Buff->Header.Console; - - NewCursorX = Request->Data.SetCursorRequest.Position.X; - NewCursorY = Request->Data.SetCursorRequest.Position.Y; - if (NewCursorX < 0 || NewCursorX >= Buff->MaxX || - NewCursorY < 0 || NewCursorY >= Buff->MaxY) - { - ConioUnlockScreenBuffer(Buff); - return STATUS_INVALID_PARAMETER; - } - OldCursorX = Buff->CurrentX; - OldCursorY = Buff->CurrentY; - Buff->CurrentX = NewCursorX; - Buff->CurrentY = NewCursorY; - if (Buff == Console->ActiveBuffer) - { - if (! ConioSetScreenInfo(Console, Buff, OldCursorX, OldCursorY)) - { - ConioUnlockScreenBuffer(Buff); - return STATUS_UNSUCCESSFUL; - } - } - - ConioUnlockScreenBuffer(Buff); - - return STATUS_SUCCESS; -} - -static VOID FASTCALL -ConioComputeUpdateRect(PCSRSS_SCREEN_BUFFER Buff, SMALL_RECT *UpdateRect, COORD *Start, UINT Length) -{ - if (Buff->MaxX <= Start->X + Length) - { - UpdateRect->Left = 0; - } - else - { - UpdateRect->Left = Start->X; - } - if (Buff->MaxX <= Start->X + Length) - { - UpdateRect->Right = Buff->MaxX - 1; - } - else - { - UpdateRect->Right = Start->X + Length - 1; - } - UpdateRect->Top = Start->Y; - UpdateRect->Bottom = Start->Y+ (Start->X + Length - 1) / Buff->MaxX; - if (Buff->MaxY <= UpdateRect->Bottom) - { - UpdateRect->Bottom = Buff->MaxY - 1; - } -} - -CSR_API(CsrWriteConsoleOutputChar) -{ - NTSTATUS Status; - PCHAR String, tmpString = NULL; - PBYTE Buffer; - PCSRSS_CONSOLE Console; - PCSRSS_SCREEN_BUFFER Buff; - DWORD X, Y, Length, CharSize, Written = 0; - SMALL_RECT UpdateRect; - - DPRINT("CsrWriteConsoleOutputChar\n"); - - CharSize = (Request->Data.WriteConsoleOutputCharRequest.Unicode ? sizeof(WCHAR) : sizeof(CHAR)); - - if (Request->Header.u1.s1.TotalLength - < CSR_API_MESSAGE_HEADER_SIZE(CSRSS_WRITE_CONSOLE_OUTPUT_CHAR) - + (Request->Data.WriteConsoleOutputCharRequest.Length * CharSize)) - { - DPRINT1("Invalid request size\n"); - return STATUS_INVALID_PARAMETER; - } - - Status = ConioLockScreenBuffer(ProcessData, - Request->Data.WriteConsoleOutputCharRequest.ConsoleHandle, - &Buff, - GENERIC_WRITE); - if (NT_SUCCESS(Status)) - { - Console = Buff->Header.Console; - if(Request->Data.WriteConsoleOutputCharRequest.Unicode) - { - Length = WideCharToMultiByte(Console->OutputCodePage, 0, - (PWCHAR)Request->Data.WriteConsoleOutputCharRequest.String, - Request->Data.WriteConsoleOutputCharRequest.Length, - NULL, 0, NULL, NULL); - tmpString = String = RtlAllocateHeap(GetProcessHeap(), 0, Length); - if (String) - { - WideCharToMultiByte(Console->OutputCodePage, 0, - (PWCHAR)Request->Data.WriteConsoleOutputCharRequest.String, - Request->Data.WriteConsoleOutputCharRequest.Length, - String, Length, NULL, NULL); - } - else - { - Status = STATUS_NO_MEMORY; - } - } - else - { - String = (PCHAR)Request->Data.WriteConsoleOutputCharRequest.String; - } - - if (String) - { - if (NT_SUCCESS(Status)) - { - X = Request->Data.WriteConsoleOutputCharRequest.Coord.X; - Y = (Request->Data.WriteConsoleOutputCharRequest.Coord.Y + Buff->VirtualY) % Buff->MaxY; - Length = Request->Data.WriteConsoleOutputCharRequest.Length; - Buffer = &Buff->Buffer[2 * (Y * Buff->MaxX + X)]; - while (Length--) - { - *Buffer = *String++; - Written++; - Buffer += 2; - if (++X == Buff->MaxX) - { - if (++Y == Buff->MaxY) - { - Y = 0; - Buffer = Buff->Buffer; - } - X = 0; - } - } - if (Buff == Console->ActiveBuffer) - { - ConioComputeUpdateRect(Buff, &UpdateRect, &Request->Data.WriteConsoleOutputCharRequest.Coord, - Request->Data.WriteConsoleOutputCharRequest.Length); - ConioDrawRegion(Console, &UpdateRect); - } - - Request->Data.WriteConsoleOutputCharRequest.EndCoord.X = X; - Request->Data.WriteConsoleOutputCharRequest.EndCoord.Y = (Y + Buff->MaxY - Buff->VirtualY) % Buff->MaxY; - - } - if (Request->Data.WriteConsoleRequest.Unicode) - { - RtlFreeHeap(GetProcessHeap(), 0, tmpString); - } - } - ConioUnlockScreenBuffer(Buff); - } - Request->Data.WriteConsoleOutputCharRequest.NrCharactersWritten = Written; - return Status; -} - -CSR_API(CsrFillOutputChar) -{ - NTSTATUS Status; - PCSRSS_CONSOLE Console; - PCSRSS_SCREEN_BUFFER Buff; - DWORD X, Y, Length, Written = 0; - CHAR Char; - PBYTE Buffer; - SMALL_RECT UpdateRect; - - DPRINT("CsrFillOutputChar\n"); - - Status = ConioLockScreenBuffer(ProcessData, Request->Data.FillOutputRequest.ConsoleHandle, &Buff, GENERIC_WRITE); - if (! NT_SUCCESS(Status)) - { - return Status; - } - Console = Buff->Header.Console; - - X = Request->Data.FillOutputRequest.Position.X; - Y = (Request->Data.FillOutputRequest.Position.Y + Buff->VirtualY) % Buff->MaxY; - Buffer = &Buff->Buffer[2 * (Y * Buff->MaxX + X)]; - if(Request->Data.FillOutputRequest.Unicode) - ConsoleUnicodeCharToAnsiChar(Console, &Char, &Request->Data.FillOutputRequest.Char.UnicodeChar); - else - Char = Request->Data.FillOutputRequest.Char.AsciiChar; - Length = Request->Data.FillOutputRequest.Length; - while (Length--) - { - *Buffer = Char; - Buffer += 2; - Written++; - if (++X == Buff->MaxX) - { - if (++Y == Buff->MaxY) - { - Y = 0; - Buffer = Buff->Buffer; - } - X = 0; - } - } - - if (Buff == Console->ActiveBuffer) - { - ConioComputeUpdateRect(Buff, &UpdateRect, &Request->Data.FillOutputRequest.Position, - Request->Data.FillOutputRequest.Length); - ConioDrawRegion(Console, &UpdateRect); - } - - ConioUnlockScreenBuffer(Buff); - Length = Request->Data.FillOutputRequest.Length; - Request->Data.FillOutputRequest.NrCharactersWritten = Length; - return STATUS_SUCCESS; -} - -CSR_API(CsrWriteConsoleOutputAttrib) -{ - PCSRSS_CONSOLE Console; - PCSRSS_SCREEN_BUFFER Buff; - PUCHAR Buffer; - PWORD Attribute; - int X, Y, Length; - NTSTATUS Status; - SMALL_RECT UpdateRect; - - DPRINT("CsrWriteConsoleOutputAttrib\n"); - - if (Request->Header.u1.s1.TotalLength - < CSR_API_MESSAGE_HEADER_SIZE(CSRSS_WRITE_CONSOLE_OUTPUT_ATTRIB) - + Request->Data.WriteConsoleOutputAttribRequest.Length * sizeof(WORD)) - { - DPRINT1("Invalid request size\n"); - return STATUS_INVALID_PARAMETER; - } - - Status = ConioLockScreenBuffer(ProcessData, - Request->Data.WriteConsoleOutputAttribRequest.ConsoleHandle, - &Buff, - GENERIC_WRITE); - if (! NT_SUCCESS(Status)) - { - return Status; - } - Console = Buff->Header.Console; - - X = Request->Data.WriteConsoleOutputAttribRequest.Coord.X; - Y = (Request->Data.WriteConsoleOutputAttribRequest.Coord.Y + Buff->VirtualY) % Buff->MaxY; - Length = Request->Data.WriteConsoleOutputAttribRequest.Length; - Buffer = &Buff->Buffer[2 * (Y * Buff->MaxX + X) + 1]; - Attribute = Request->Data.WriteConsoleOutputAttribRequest.Attribute; - while (Length--) - { - *Buffer = (UCHAR)(*Attribute++); - Buffer += 2; - if (++X == Buff->MaxX) - { - if (++Y == Buff->MaxY) - { - Y = 0; - Buffer = Buff->Buffer + 1; - } - X = 0; - } - } - - if (Buff == Console->ActiveBuffer) - { - ConioComputeUpdateRect(Buff, &UpdateRect, &Request->Data.WriteConsoleOutputAttribRequest.Coord, - Request->Data.WriteConsoleOutputAttribRequest.Length); - ConioDrawRegion(Console, &UpdateRect); - } - - Request->Data.WriteConsoleOutputAttribRequest.EndCoord.X = X; - Request->Data.WriteConsoleOutputAttribRequest.EndCoord.Y = (Y + Buff->MaxY - Buff->VirtualY) % Buff->MaxY; - - ConioUnlockScreenBuffer(Buff); - - return STATUS_SUCCESS; -} - -CSR_API(CsrFillOutputAttrib) -{ - PCSRSS_SCREEN_BUFFER Buff; - PUCHAR Buffer; - NTSTATUS Status; - int X, Y, Length; - UCHAR Attr; - SMALL_RECT UpdateRect; - PCSRSS_CONSOLE Console; - - DPRINT("CsrFillOutputAttrib\n"); - - Status = ConioLockScreenBuffer(ProcessData, Request->Data.FillOutputAttribRequest.ConsoleHandle, &Buff, GENERIC_WRITE); - if (! NT_SUCCESS(Status)) - { - return Status; - } - Console = Buff->Header.Console; - - X = Request->Data.FillOutputAttribRequest.Coord.X; - Y = (Request->Data.FillOutputAttribRequest.Coord.Y + Buff->VirtualY) % Buff->MaxY; - Length = Request->Data.FillOutputAttribRequest.Length; - Attr = Request->Data.FillOutputAttribRequest.Attribute; - Buffer = &Buff->Buffer[(Y * Buff->MaxX * 2) + (X * 2) + 1]; - while (Length--) - { - *Buffer = Attr; - Buffer += 2; - if (++X == Buff->MaxX) - { - if (++Y == Buff->MaxY) - { - Y = 0; - Buffer = Buff->Buffer + 1; - } - X = 0; - } - } - - if (Buff == Console->ActiveBuffer) - { - ConioComputeUpdateRect(Buff, &UpdateRect, &Request->Data.FillOutputAttribRequest.Coord, - Request->Data.FillOutputAttribRequest.Length); - ConioDrawRegion(Console, &UpdateRect); - } - - ConioUnlockScreenBuffer(Buff); - - return STATUS_SUCCESS; -} - -DWORD FASTCALL -ConioEffectiveCursorSize(PCSRSS_CONSOLE Console, DWORD Scale) -{ - DWORD Size = (Console->ActiveBuffer->CursorInfo.dwSize * Scale + 99) / 100; - /* If line input in progress, perhaps adjust for insert toggle */ - if (Console->LineBuffer && !Console->LineComplete && Console->LineInsertToggle) - return (Size * 2 <= Scale) ? (Size * 2) : (Size / 2); - return Size; -} - -CSR_API(CsrGetCursorInfo) -{ - PCSRSS_SCREEN_BUFFER Buff; - NTSTATUS Status; - - DPRINT("CsrGetCursorInfo\n"); - - Status = ConioLockScreenBuffer(ProcessData, Request->Data.GetCursorInfoRequest.ConsoleHandle, &Buff, GENERIC_READ); - if (! NT_SUCCESS(Status)) - { - return Status; - } - Request->Data.GetCursorInfoRequest.Info.bVisible = Buff->CursorInfo.bVisible; - Request->Data.GetCursorInfoRequest.Info.dwSize = Buff->CursorInfo.dwSize; - ConioUnlockScreenBuffer(Buff); - - return STATUS_SUCCESS; -} - -CSR_API(CsrSetCursorInfo) -{ - PCSRSS_CONSOLE Console; - PCSRSS_SCREEN_BUFFER Buff; - DWORD Size; - BOOL Visible; - NTSTATUS Status; - - DPRINT("CsrSetCursorInfo\n"); - - Status = ConioLockScreenBuffer(ProcessData, Request->Data.SetCursorInfoRequest.ConsoleHandle, &Buff, GENERIC_WRITE); - if (! NT_SUCCESS(Status)) - { - return Status; - } - Console = Buff->Header.Console; - - Size = Request->Data.SetCursorInfoRequest.Info.dwSize; - Visible = Request->Data.SetCursorInfoRequest.Info.bVisible; - if (Size < 1) - { - Size = 1; - } - if (100 < Size) - { - Size = 100; - } - - if (Size != Buff->CursorInfo.dwSize - || (Visible && ! Buff->CursorInfo.bVisible) || (! Visible && Buff->CursorInfo.bVisible)) - { - Buff->CursorInfo.dwSize = Size; - Buff->CursorInfo.bVisible = Visible; - - if (! ConioSetCursorInfo(Console, Buff)) - { - ConioUnlockScreenBuffer(Buff); - return STATUS_UNSUCCESSFUL; - } - } - - ConioUnlockScreenBuffer(Buff); - - return STATUS_SUCCESS; -} - -CSR_API(CsrSetTextAttrib) -{ - NTSTATUS Status; - PCSRSS_CONSOLE Console; - PCSRSS_SCREEN_BUFFER Buff; - - DPRINT("CsrSetTextAttrib\n"); - - Status = ConioLockScreenBuffer(ProcessData, Request->Data.SetCursorRequest.ConsoleHandle, &Buff, GENERIC_WRITE); - if (! NT_SUCCESS(Status)) - { - return Status; - } - Console = Buff->Header.Console; - - Buff->DefaultAttrib = Request->Data.SetAttribRequest.Attrib; - if (Buff == Console->ActiveBuffer) - { - if (! ConioUpdateScreenInfo(Console, Buff)) - { - ConioUnlockScreenBuffer(Buff); - return STATUS_UNSUCCESSFUL; - } - } - - ConioUnlockScreenBuffer(Buff); - - return STATUS_SUCCESS; -} - -CSR_API(CsrCreateScreenBuffer) -{ - PCSRSS_CONSOLE Console; - PCSRSS_SCREEN_BUFFER Buff; - NTSTATUS Status; - - DPRINT("CsrCreateScreenBuffer\n"); - - RtlEnterCriticalSection(&ProcessData->HandleTableLock); - Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (! NT_SUCCESS(Status)) - { - return Status; - } - - Buff = HeapAlloc(Win32CsrApiHeap, HEAP_ZERO_MEMORY, sizeof(CSRSS_SCREEN_BUFFER)); - - if (Buff != NULL) - { - if (Console->ActiveBuffer) - { - Buff->MaxX = Console->ActiveBuffer->MaxX; - Buff->MaxY = Console->ActiveBuffer->MaxY; - Buff->CursorInfo.bVisible = Console->ActiveBuffer->CursorInfo.bVisible; - Buff->CursorInfo.dwSize = Console->ActiveBuffer->CursorInfo.dwSize; - } - else - { - Buff->CursorInfo.bVisible = TRUE; - Buff->CursorInfo.dwSize = CSR_DEFAULT_CURSOR_SIZE; - } - - if (Buff->MaxX == 0) - { - Buff->MaxX = 80; - } - - if (Buff->MaxY == 0) - { - Buff->MaxY = 25; - } - - Status = CsrInitConsoleScreenBuffer(Console, Buff); - if (NT_SUCCESS(Status)) - { - Status = Win32CsrInsertObject(ProcessData, - &Request->Data.CreateScreenBufferRequest.OutputHandle, - &Buff->Header, - Request->Data.CreateScreenBufferRequest.Access, - Request->Data.CreateScreenBufferRequest.Inheritable, - Request->Data.CreateScreenBufferRequest.ShareMode); - } - } - else - { - Status = STATUS_INSUFFICIENT_RESOURCES; - } - - ConioUnlockConsole(Console); - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - return Status; -} - -CSR_API(CsrSetScreenBuffer) -{ - NTSTATUS Status; - PCSRSS_CONSOLE Console; - PCSRSS_SCREEN_BUFFER Buff; - - DPRINT("CsrSetScreenBuffer\n"); - - Status = ConioLockScreenBuffer(ProcessData, Request->Data.SetScreenBufferRequest.OutputHandle, &Buff, GENERIC_WRITE); - if (! NT_SUCCESS(Status)) - { - return Status; - } - Console = Buff->Header.Console; - - if (Buff == Console->ActiveBuffer) - { - ConioUnlockScreenBuffer(Buff); - return STATUS_SUCCESS; - } - - /* If old buffer has no handles, it's now unreferenced */ - if (Console->ActiveBuffer->Header.HandleCount == 0) - { - ConioDeleteScreenBuffer(Console->ActiveBuffer); - } - /* tie console to new buffer */ - Console->ActiveBuffer = Buff; - /* Redraw the console */ - ConioDrawConsole(Console); - - ConioUnlockScreenBuffer(Buff); - - return STATUS_SUCCESS; -} - -CSR_API(CsrWriteConsoleOutput) -{ - SHORT i, X, Y, SizeX, SizeY; - PCSRSS_CONSOLE Console; - PCSRSS_SCREEN_BUFFER Buff; - SMALL_RECT ScreenBuffer; - CHAR_INFO* CurCharInfo; - SMALL_RECT WriteRegion; - CHAR_INFO* CharInfo; - COORD BufferCoord; - COORD BufferSize; - NTSTATUS Status; - PBYTE Ptr; - - DPRINT("CsrWriteConsoleOutput\n"); - - Status = ConioLockScreenBuffer(ProcessData, - Request->Data.WriteConsoleOutputRequest.ConsoleHandle, - &Buff, - GENERIC_WRITE); - if (! NT_SUCCESS(Status)) - { - return Status; - } - Console = Buff->Header.Console; - - BufferSize = Request->Data.WriteConsoleOutputRequest.BufferSize; - BufferCoord = Request->Data.WriteConsoleOutputRequest.BufferCoord; - CharInfo = Request->Data.WriteConsoleOutputRequest.CharInfo; - if (!Win32CsrValidateBuffer(ProcessData, CharInfo, - BufferSize.X * BufferSize.Y, sizeof(CHAR_INFO))) - { - ConioUnlockScreenBuffer(Buff); - return STATUS_ACCESS_VIOLATION; - } - WriteRegion = Request->Data.WriteConsoleOutputRequest.WriteRegion; - - SizeY = min(BufferSize.Y - BufferCoord.Y, ConioRectHeight(&WriteRegion)); - SizeX = min(BufferSize.X - BufferCoord.X, ConioRectWidth(&WriteRegion)); - WriteRegion.Bottom = WriteRegion.Top + SizeY - 1; - WriteRegion.Right = WriteRegion.Left + SizeX - 1; - - /* Make sure WriteRegion is inside the screen buffer */ - ConioInitRect(&ScreenBuffer, 0, 0, Buff->MaxY - 1, Buff->MaxX - 1); - if (! ConioGetIntersection(&WriteRegion, &ScreenBuffer, &WriteRegion)) - { - ConioUnlockScreenBuffer(Buff); - - /* It is okay to have a WriteRegion completely outside the screen buffer. - No data is written then. */ - return STATUS_SUCCESS; - } - - for (i = 0, Y = WriteRegion.Top; Y <= WriteRegion.Bottom; i++, Y++) - { - CurCharInfo = CharInfo + (i + BufferCoord.Y) * BufferSize.X + BufferCoord.X; - Ptr = ConioCoordToPointer(Buff, WriteRegion.Left, Y); - for (X = WriteRegion.Left; X <= WriteRegion.Right; X++) - { - CHAR AsciiChar; - if (Request->Data.WriteConsoleOutputRequest.Unicode) - { - ConsoleUnicodeCharToAnsiChar(Console, &AsciiChar, &CurCharInfo->Char.UnicodeChar); - } - else - { - AsciiChar = CurCharInfo->Char.AsciiChar; - } - *Ptr++ = AsciiChar; - *Ptr++ = CurCharInfo->Attributes; - CurCharInfo++; - } - } - - ConioDrawRegion(Console, &WriteRegion); - - ConioUnlockScreenBuffer(Buff); - - Request->Data.WriteConsoleOutputRequest.WriteRegion.Right = WriteRegion.Left + SizeX - 1; - Request->Data.WriteConsoleOutputRequest.WriteRegion.Bottom = WriteRegion.Top + SizeY - 1; - Request->Data.WriteConsoleOutputRequest.WriteRegion.Left = WriteRegion.Left; - Request->Data.WriteConsoleOutputRequest.WriteRegion.Top = WriteRegion.Top; - - return STATUS_SUCCESS; -} - -CSR_API(CsrScrollConsoleScreenBuffer) -{ - PCSRSS_CONSOLE Console; - PCSRSS_SCREEN_BUFFER Buff; - SMALL_RECT ScreenBuffer; - SMALL_RECT SrcRegion; - SMALL_RECT DstRegion; - SMALL_RECT UpdateRegion; - SMALL_RECT ScrollRectangle; - SMALL_RECT ClipRectangle; - NTSTATUS Status; - HANDLE ConsoleHandle; - BOOLEAN UseClipRectangle; - COORD DestinationOrigin; - CHAR_INFO Fill; - CHAR FillChar; - - DPRINT("CsrScrollConsoleScreenBuffer\n"); - - ConsoleHandle = Request->Data.ScrollConsoleScreenBufferRequest.ConsoleHandle; - UseClipRectangle = Request->Data.ScrollConsoleScreenBufferRequest.UseClipRectangle; - DestinationOrigin = Request->Data.ScrollConsoleScreenBufferRequest.DestinationOrigin; - Fill = Request->Data.ScrollConsoleScreenBufferRequest.Fill; - - Status = ConioLockScreenBuffer(ProcessData, ConsoleHandle, &Buff, GENERIC_WRITE); - if (! NT_SUCCESS(Status)) - { - return Status; - } - Console = Buff->Header.Console; - - ScrollRectangle = Request->Data.ScrollConsoleScreenBufferRequest.ScrollRectangle; - - /* Make sure source rectangle is inside the screen buffer */ - ConioInitRect(&ScreenBuffer, 0, 0, Buff->MaxY - 1, Buff->MaxX - 1); - if (! ConioGetIntersection(&SrcRegion, &ScreenBuffer, &ScrollRectangle)) - { - ConioUnlockScreenBuffer(Buff); - return STATUS_SUCCESS; - } - - /* If the source was clipped on the left or top, adjust the destination accordingly */ - if (ScrollRectangle.Left < 0) - { - DestinationOrigin.X -= ScrollRectangle.Left; - } - if (ScrollRectangle.Top < 0) - { - DestinationOrigin.Y -= ScrollRectangle.Top; - } - - if (UseClipRectangle) - { - ClipRectangle = Request->Data.ScrollConsoleScreenBufferRequest.ClipRectangle; - if (!ConioGetIntersection(&ClipRectangle, &ClipRectangle, &ScreenBuffer)) - { - ConioUnlockScreenBuffer(Buff); - return STATUS_SUCCESS; - } - } - else - { - ClipRectangle = ScreenBuffer; - } - - ConioInitRect(&DstRegion, - DestinationOrigin.Y, - DestinationOrigin.X, - DestinationOrigin.Y + ConioRectHeight(&SrcRegion) - 1, - DestinationOrigin.X + ConioRectWidth(&SrcRegion) - 1); - - if (Request->Data.ScrollConsoleScreenBufferRequest.Unicode) - ConsoleUnicodeCharToAnsiChar(Console, &FillChar, &Fill.Char.UnicodeChar); - else - FillChar = Fill.Char.AsciiChar; - - ConioMoveRegion(Buff, &SrcRegion, &DstRegion, &ClipRectangle, Fill.Attributes << 8 | (BYTE)FillChar); - - if (Buff == Console->ActiveBuffer) - { - ConioGetUnion(&UpdateRegion, &SrcRegion, &DstRegion); - if (ConioGetIntersection(&UpdateRegion, &UpdateRegion, &ClipRectangle)) - { - /* Draw update region */ - ConioDrawRegion(Console, &UpdateRegion); - } - } - - ConioUnlockScreenBuffer(Buff); - - return STATUS_SUCCESS; -} - -CSR_API(CsrReadConsoleOutputChar) -{ - NTSTATUS Status; - PCSRSS_CONSOLE Console; - PCSRSS_SCREEN_BUFFER Buff; - DWORD Xpos, Ypos; - PCHAR ReadBuffer; - DWORD i; - ULONG CharSize; - CHAR Char; - - DPRINT("CsrReadConsoleOutputChar\n"); - - ReadBuffer = Request->Data.ReadConsoleOutputCharRequest.String; - - CharSize = (Request->Data.ReadConsoleOutputCharRequest.Unicode ? sizeof(WCHAR) : sizeof(CHAR)); - - Status = ConioLockScreenBuffer(ProcessData, Request->Data.ReadConsoleOutputCharRequest.ConsoleHandle, &Buff, GENERIC_READ); - if (! NT_SUCCESS(Status)) - { - return Status; - } - Console = Buff->Header.Console; - - Xpos = Request->Data.ReadConsoleOutputCharRequest.ReadCoord.X; - Ypos = (Request->Data.ReadConsoleOutputCharRequest.ReadCoord.Y + Buff->VirtualY) % Buff->MaxY; - - for (i = 0; i < Request->Data.ReadConsoleOutputCharRequest.NumCharsToRead; ++i) - { - Char = Buff->Buffer[(Xpos * 2) + (Ypos * 2 * Buff->MaxX)]; - - if(Request->Data.ReadConsoleOutputCharRequest.Unicode) - { - ConsoleAnsiCharToUnicodeChar(Console, (WCHAR*)ReadBuffer, &Char); - ReadBuffer += sizeof(WCHAR); - } - else - *(ReadBuffer++) = Char; - - Xpos++; - - if (Xpos == Buff->MaxX) - { - Xpos = 0; - Ypos++; - - if (Ypos == Buff->MaxY) - { - Ypos = 0; - } - } - } - - *ReadBuffer = 0; - Request->Data.ReadConsoleOutputCharRequest.EndCoord.X = Xpos; - Request->Data.ReadConsoleOutputCharRequest.EndCoord.Y = (Ypos - Buff->VirtualY + Buff->MaxY) % Buff->MaxY; - - ConioUnlockScreenBuffer(Buff); - - Request->Data.ReadConsoleOutputCharRequest.CharsRead = (DWORD)((ULONG_PTR)ReadBuffer - (ULONG_PTR)Request->Data.ReadConsoleOutputCharRequest.String) / CharSize; - if (Request->Data.ReadConsoleOutputCharRequest.CharsRead * CharSize + CSR_API_MESSAGE_HEADER_SIZE(CSRSS_READ_CONSOLE_OUTPUT_CHAR) > sizeof(CSR_API_MESSAGE)) - { - DPRINT1("Length won't fit in message\n"); - return STATUS_BUFFER_TOO_SMALL; - } - - return STATUS_SUCCESS; -} - - -CSR_API(CsrReadConsoleOutputAttrib) -{ - NTSTATUS Status; - PCSRSS_SCREEN_BUFFER Buff; - DWORD Xpos, Ypos; - PWORD ReadBuffer; - DWORD i; - DWORD CurrentLength; - - DPRINT("CsrReadConsoleOutputAttrib\n"); - - ReadBuffer = Request->Data.ReadConsoleOutputAttribRequest.Attribute; - - Status = ConioLockScreenBuffer(ProcessData, Request->Data.ReadConsoleOutputAttribRequest.ConsoleHandle, &Buff, GENERIC_READ); - if (! NT_SUCCESS(Status)) - { - return Status; - } - - Xpos = Request->Data.ReadConsoleOutputAttribRequest.ReadCoord.X; - Ypos = (Request->Data.ReadConsoleOutputAttribRequest.ReadCoord.Y + Buff->VirtualY) % Buff->MaxY; - - for (i = 0; i < Request->Data.ReadConsoleOutputAttribRequest.NumAttrsToRead; ++i) - { - *ReadBuffer = Buff->Buffer[(Xpos * 2) + (Ypos * 2 * Buff->MaxX) + 1]; - - ReadBuffer++; - Xpos++; - - if (Xpos == Buff->MaxX) - { - Xpos = 0; - Ypos++; - - if (Ypos == Buff->MaxY) - { - Ypos = 0; - } - } - } - - *ReadBuffer = 0; - - Request->Data.ReadConsoleOutputAttribRequest.EndCoord.X = Xpos; - Request->Data.ReadConsoleOutputAttribRequest.EndCoord.Y = (Ypos - Buff->VirtualY + Buff->MaxY) % Buff->MaxY; - - ConioUnlockScreenBuffer(Buff); - - CurrentLength = CSR_API_MESSAGE_HEADER_SIZE(CSRSS_READ_CONSOLE_OUTPUT_ATTRIB) - + Request->Data.ReadConsoleOutputAttribRequest.NumAttrsToRead * sizeof(WORD); - if (CurrentLength > sizeof(CSR_API_MESSAGE)) - { - DPRINT1("Length won't fit in message\n"); - return STATUS_BUFFER_TOO_SMALL; - } - - return STATUS_SUCCESS; -} - -CSR_API(CsrReadConsoleOutput) -{ - PCHAR_INFO CharInfo; - PCHAR_INFO CurCharInfo; - PCSRSS_SCREEN_BUFFER Buff; - DWORD SizeX, SizeY; - NTSTATUS Status; - COORD BufferSize; - COORD BufferCoord; - SMALL_RECT ReadRegion; - SMALL_RECT ScreenRect; - DWORD i; - PBYTE Ptr; - LONG X, Y; - UINT CodePage; - - DPRINT("CsrReadConsoleOutput\n"); - - Status = ConioLockScreenBuffer(ProcessData, Request->Data.ReadConsoleOutputRequest.ConsoleHandle, &Buff, GENERIC_READ); - if (! NT_SUCCESS(Status)) - { - return Status; - } - - CharInfo = Request->Data.ReadConsoleOutputRequest.CharInfo; - ReadRegion = Request->Data.ReadConsoleOutputRequest.ReadRegion; - BufferSize = Request->Data.ReadConsoleOutputRequest.BufferSize; - BufferCoord = Request->Data.ReadConsoleOutputRequest.BufferCoord; - - /* FIXME: Is this correct? */ - CodePage = ProcessData->Console->OutputCodePage; - - if (!Win32CsrValidateBuffer(ProcessData, CharInfo, - BufferSize.X * BufferSize.Y, sizeof(CHAR_INFO))) - { - ConioUnlockScreenBuffer(Buff); - return STATUS_ACCESS_VIOLATION; - } - - SizeY = min(BufferSize.Y - BufferCoord.Y, ConioRectHeight(&ReadRegion)); - SizeX = min(BufferSize.X - BufferCoord.X, ConioRectWidth(&ReadRegion)); - ReadRegion.Bottom = ReadRegion.Top + SizeY; - ReadRegion.Right = ReadRegion.Left + SizeX; - - ConioInitRect(&ScreenRect, 0, 0, Buff->MaxY, Buff->MaxX); - if (! ConioGetIntersection(&ReadRegion, &ScreenRect, &ReadRegion)) - { - ConioUnlockScreenBuffer(Buff); - return STATUS_SUCCESS; - } - - for (i = 0, Y = ReadRegion.Top; Y < ReadRegion.Bottom; ++i, ++Y) - { - CurCharInfo = CharInfo + (i * BufferSize.X); - - Ptr = ConioCoordToPointer(Buff, ReadRegion.Left, Y); - for (X = ReadRegion.Left; X < ReadRegion.Right; ++X) - { - if (Request->Data.ReadConsoleOutputRequest.Unicode) - { - MultiByteToWideChar(CodePage, 0, - (PCHAR)Ptr++, 1, - &CurCharInfo->Char.UnicodeChar, 1); - } - else - { - CurCharInfo->Char.AsciiChar = *Ptr++; - } - CurCharInfo->Attributes = *Ptr++; - ++CurCharInfo; - } - } - - ConioUnlockScreenBuffer(Buff); - - Request->Data.ReadConsoleOutputRequest.ReadRegion.Right = ReadRegion.Left + SizeX - 1; - Request->Data.ReadConsoleOutputRequest.ReadRegion.Bottom = ReadRegion.Top + SizeY - 1; - Request->Data.ReadConsoleOutputRequest.ReadRegion.Left = ReadRegion.Left; - Request->Data.ReadConsoleOutputRequest.ReadRegion.Top = ReadRegion.Top; - - return STATUS_SUCCESS; -} - -CSR_API(CsrSetScreenBufferSize) -{ - NTSTATUS Status; - PCSRSS_CONSOLE Console; - PCSRSS_SCREEN_BUFFER Buff; - - Status = ConioLockScreenBuffer(ProcessData, Request->Data.SetScreenBufferSize.OutputHandle, &Buff, GENERIC_WRITE); - if (!NT_SUCCESS(Status)) - { - return Status; - } - Console = Buff->Header.Console; - - Status = ConioResizeBuffer(Console, Buff, Request->Data.SetScreenBufferSize.Size); - ConioUnlockScreenBuffer(Buff); - - return Status; -} - -/* EOF */ diff --git a/deprecated/win32csr/console.c b/deprecated/win32csr/console.c deleted file mode 100644 index d4a1d7993e8..00000000000 --- a/deprecated/win32csr/console.c +++ /dev/null @@ -1,832 +0,0 @@ -/* - * reactos/subsys/csrss/win32csr/conio.c - * - * Console I/O functions - * - * ReactOS Operating System - */ - -/* INCLUDES ******************************************************************/ - -#define NDEBUG -#include "w32csr.h" -#include - -/* FUNCTIONS *****************************************************************/ - -NTSTATUS FASTCALL -ConioConsoleFromProcessData(PCSR_PROCESS ProcessData, PCSRSS_CONSOLE *Console) -{ - PCSRSS_CONSOLE ProcessConsole; - - RtlEnterCriticalSection(&ProcessData->HandleTableLock); - ProcessConsole = ProcessData->Console; - - if (!ProcessConsole) - { - *Console = NULL; - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - return STATUS_INVALID_HANDLE; - } - - InterlockedIncrement(&ProcessConsole->ReferenceCount); - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - EnterCriticalSection(&(ProcessConsole->Lock)); - *Console = ProcessConsole; - - return STATUS_SUCCESS; -} - -VOID FASTCALL -ConioConsoleCtrlEventTimeout(DWORD Event, PCSR_PROCESS ProcessData, DWORD Timeout) -{ - HANDLE Thread; - - DPRINT("ConioConsoleCtrlEvent Parent ProcessId = %x\n", ProcessData->ClientId.UniqueProcess); - - if (ProcessData->CtrlDispatcher) - { - - Thread = CreateRemoteThread(ProcessData->ProcessHandle, NULL, 0, - (LPTHREAD_START_ROUTINE) ProcessData->CtrlDispatcher, - UlongToPtr(Event), 0, NULL); - if (NULL == Thread) - { - DPRINT1("Failed thread creation (Error: 0x%x)\n", GetLastError()); - return; - } - WaitForSingleObject(Thread, Timeout); - CloseHandle(Thread); - } -} - -VOID FASTCALL -ConioConsoleCtrlEvent(DWORD Event, PCSR_PROCESS ProcessData) -{ - ConioConsoleCtrlEventTimeout(Event, ProcessData, 0); -} - -static NTSTATUS WINAPI -CsrInitConsole(PCSRSS_CONSOLE Console, int ShowCmd) -{ - NTSTATUS Status; - SECURITY_ATTRIBUTES SecurityAttributes; - PCSRSS_SCREEN_BUFFER NewBuffer; - BOOL GuiMode; - WCHAR Title[255]; - HINSTANCE hInst; - - Console->Title.MaximumLength = Console->Title.Length = 0; - Console->Title.Buffer = NULL; - - hInst = GetModuleHandleW(L"win32csr"); - if (LoadStringW(hInst,IDS_COMMAND_PROMPT,Title,sizeof(Title)/sizeof(Title[0]))) - { - RtlCreateUnicodeString(&Console->Title, Title); - } - else - { - RtlCreateUnicodeString(&Console->Title, L"Command Prompt"); - } - - Console->ReferenceCount = 0; - Console->LineBuffer = NULL; - Console->Header.Type = CONIO_CONSOLE_MAGIC; - Console->Header.Console = Console; - Console->Mode = ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT | ENABLE_PROCESSED_INPUT | ENABLE_MOUSE_INPUT; - InitializeListHead(&Console->BufferList); - Console->ActiveBuffer = NULL; - InitializeListHead(&Console->InputEvents); - InitializeListHead(&Console->HistoryBuffers); - Console->CodePage = GetOEMCP(); - Console->OutputCodePage = GetOEMCP(); - - SecurityAttributes.nLength = sizeof(SECURITY_ATTRIBUTES); - SecurityAttributes.lpSecurityDescriptor = NULL; - SecurityAttributes.bInheritHandle = TRUE; - - Console->ActiveEvent = CreateEventW(&SecurityAttributes, TRUE, FALSE, NULL); - if (NULL == Console->ActiveEvent) - { - RtlFreeUnicodeString(&Console->Title); - return STATUS_UNSUCCESSFUL; - } - Console->PrivateData = NULL; - InitializeCriticalSection(&Console->Lock); - - GuiMode = DtbgIsDesktopVisible(); - - /* allocate console screen buffer */ - NewBuffer = HeapAlloc(Win32CsrApiHeap, HEAP_ZERO_MEMORY, sizeof(CSRSS_SCREEN_BUFFER)); - if (NULL == NewBuffer) - { - RtlFreeUnicodeString(&Console->Title); - DeleteCriticalSection(&Console->Lock); - CloseHandle(Console->ActiveEvent); - return STATUS_INSUFFICIENT_RESOURCES; - } - /* init screen buffer with defaults */ - NewBuffer->CursorInfo.bVisible = TRUE; - NewBuffer->CursorInfo.dwSize = CSR_DEFAULT_CURSOR_SIZE; - /* make console active, and insert into console list */ - Console->ActiveBuffer = (PCSRSS_SCREEN_BUFFER) NewBuffer; - - /* - * If we are not in GUI-mode, start the text-mode console. If we fail, - * try to start the GUI-mode console (win32k will automatically switch - * to graphical mode, therefore no additional code is needed). - */ - if (!GuiMode) - { - DPRINT1("WIN32CSR: Opening text-mode console\n"); - Status = TuiInitConsole(Console); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to open text-mode console, switching to gui-mode, Status = 0x%08lx\n", Status); - GuiMode = TRUE; - } - } - - /* - * Try to open the GUI-mode console. Two cases are possible: - * - We are in GUI-mode, therefore GuiMode == TRUE, the previous test-case - * failed and we start GUI-mode console. - * - We are in text-mode, therefore GuiMode == FALSE, the previous test-case - * succeeded BUT we failed at starting text-mode console. Then GuiMode - * was switched to TRUE in order to try to open the console in GUI-mode. - */ - if (GuiMode) - { - DPRINT1("WIN32CSR: Opening GUI-mode console\n"); - Status = GuiInitConsole(Console, ShowCmd); - if (!NT_SUCCESS(Status)) - { - HeapFree(Win32CsrApiHeap,0, NewBuffer); - RtlFreeUnicodeString(&Console->Title); - DeleteCriticalSection(&Console->Lock); - CloseHandle(Console->ActiveEvent); - DPRINT1("GuiInitConsole: failed, Status = 0x%08lx\n", Status); - return Status; - } - } - - Status = CsrInitConsoleScreenBuffer(Console, NewBuffer); - if (!NT_SUCCESS(Status)) - { - ConioCleanupConsole(Console); - RtlFreeUnicodeString(&Console->Title); - DeleteCriticalSection(&Console->Lock); - CloseHandle(Console->ActiveEvent); - HeapFree(Win32CsrApiHeap, 0, NewBuffer); - DPRINT1("CsrInitConsoleScreenBuffer: failed\n"); - return Status; - } - - /* copy buffer contents to screen */ - ConioDrawConsole(Console); - - return STATUS_SUCCESS; -} - -CSR_API(CsrAllocConsole) -{ - PCSRSS_CONSOLE Console; - NTSTATUS Status = STATUS_SUCCESS; - BOOLEAN NewConsole = FALSE; - - DPRINT("CsrAllocConsole\n"); - - RtlEnterCriticalSection(&ProcessData->HandleTableLock); - if (ProcessData->Console) - { - DPRINT1("Process already has a console\n"); - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - return STATUS_INVALID_PARAMETER; - } - - /* If we don't need a console, then get out of here */ - if (!Request->Data.AllocConsoleRequest.ConsoleNeeded) - { - DPRINT("No console needed\n"); - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - return STATUS_SUCCESS; - } - - /* If we already have one, then don't create a new one... */ - if (!Request->Data.AllocConsoleRequest.Console || - Request->Data.AllocConsoleRequest.Console != ProcessData->ParentConsole) - { - /* Allocate a console structure */ - NewConsole = TRUE; - Console = HeapAlloc(Win32CsrApiHeap, HEAP_ZERO_MEMORY, sizeof(CSRSS_CONSOLE)); - if (NULL == Console) - { - DPRINT1("Not enough memory for console\n"); - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - return STATUS_NO_MEMORY; - } - /* initialize list head */ - InitializeListHead(&Console->ProcessList); - /* insert process data required for GUI initialization */ - InsertHeadList(&Console->ProcessList, &ProcessData->ConsoleLink); - /* Initialize the Console */ - Status = CsrInitConsole(Console, Request->Data.AllocConsoleRequest.ShowCmd); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Console init failed\n"); - HeapFree(Win32CsrApiHeap, 0, Console); - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - return Status; - } - } - else - { - /* Reuse our current console */ - Console = Request->Data.AllocConsoleRequest.Console; - } - - /* Set the Process Console */ - ProcessData->Console = Console; - - /* Return it to the caller */ - Request->Data.AllocConsoleRequest.Console = Console; - - /* Add a reference count because the process is tied to the console */ - _InterlockedIncrement(&Console->ReferenceCount); - - if (NewConsole || !ProcessData->bInheritHandles) - { - /* Insert the Objects */ - Status = Win32CsrInsertObject(ProcessData, - &Request->Data.AllocConsoleRequest.InputHandle, - &Console->Header, - GENERIC_READ | GENERIC_WRITE, - TRUE, - FILE_SHARE_READ | FILE_SHARE_WRITE); - if (! NT_SUCCESS(Status)) - { - DPRINT1("Failed to insert object\n"); - ConioDeleteConsole((Object_t *) Console); - ProcessData->Console = 0; - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - return Status; - } - - Status = Win32CsrInsertObject(ProcessData, - &Request->Data.AllocConsoleRequest.OutputHandle, - &Console->ActiveBuffer->Header, - GENERIC_READ | GENERIC_WRITE, - TRUE, - FILE_SHARE_READ | FILE_SHARE_WRITE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to insert object\n"); - ConioDeleteConsole((Object_t *) Console); - Win32CsrReleaseObject(ProcessData, - Request->Data.AllocConsoleRequest.InputHandle); - ProcessData->Console = 0; - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - return Status; - } - } - - /* Duplicate the Event */ - if (!DuplicateHandle(GetCurrentProcess(), - ProcessData->Console->ActiveEvent, - ProcessData->ProcessHandle, - &ProcessData->ConsoleEvent, - EVENT_ALL_ACCESS, - FALSE, - 0)) - { - DPRINT1("DuplicateHandle() failed: %lu\n", GetLastError()); - ConioDeleteConsole((Object_t *) Console); - if (NewConsole || !ProcessData->bInheritHandles) - { - Win32CsrReleaseObject(ProcessData, - Request->Data.AllocConsoleRequest.OutputHandle); - Win32CsrReleaseObject(ProcessData, - Request->Data.AllocConsoleRequest.InputHandle); - } - ProcessData->Console = 0; - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - return Status; - } - - /* Set the Ctrl Dispatcher */ - ProcessData->CtrlDispatcher = Request->Data.AllocConsoleRequest.CtrlDispatcher; - DPRINT("CSRSS:CtrlDispatcher address: %x\n", ProcessData->CtrlDispatcher); - - if (!NewConsole) - { - /* Insert into the list if it has not been added */ - InsertHeadList(&ProcessData->Console->ProcessList, &ProcessData->ConsoleLink); - } - - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - return STATUS_SUCCESS; -} - -CSR_API(CsrFreeConsole) -{ - Win32CsrReleaseConsole(ProcessData); - return STATUS_SUCCESS; -} - -VOID WINAPI -ConioDeleteConsole(Object_t *Object) -{ - PCSRSS_CONSOLE Console = (PCSRSS_CONSOLE) Object; - ConsoleInput *Event; - - DPRINT("ConioDeleteConsole\n"); - - /* Drain input event queue */ - while (Console->InputEvents.Flink != &Console->InputEvents) - { - Event = (ConsoleInput *) Console->InputEvents.Flink; - Console->InputEvents.Flink = Console->InputEvents.Flink->Flink; - Console->InputEvents.Flink->Flink->Blink = &Console->InputEvents; - HeapFree(Win32CsrApiHeap, 0, Event); - } - - ConioCleanupConsole(Console); - if (Console->LineBuffer) - RtlFreeHeap(Win32CsrApiHeap, 0, Console->LineBuffer); - while (!IsListEmpty(&Console->HistoryBuffers)) - HistoryDeleteBuffer((struct tagHISTORY_BUFFER *)Console->HistoryBuffers.Flink); - - ConioDeleteScreenBuffer(Console->ActiveBuffer); - if (!IsListEmpty(&Console->BufferList)) - { - DPRINT1("BUG: screen buffer list not empty\n"); - } - - CloseHandle(Console->ActiveEvent); - if (Console->UnpauseEvent) CloseHandle(Console->UnpauseEvent); - DeleteCriticalSection(&Console->Lock); - RtlFreeUnicodeString(&Console->Title); - IntDeleteAllAliases(Console->Aliases); - HeapFree(Win32CsrApiHeap, 0, Console); -} - -VOID WINAPI -CsrInitConsoleSupport(VOID) -{ - DPRINT("CSR: CsrInitConsoleSupport()\n"); - - /* Should call LoadKeyboardLayout */ -} - -VOID FASTCALL -ConioPause(PCSRSS_CONSOLE Console, UINT Flags) -{ - Console->PauseFlags |= Flags; - if (!Console->UnpauseEvent) - Console->UnpauseEvent = CreateEvent(NULL, TRUE, FALSE, NULL); -} - -VOID FASTCALL -ConioUnpause(PCSRSS_CONSOLE Console, UINT Flags) -{ - Console->PauseFlags &= ~Flags; - if (Console->PauseFlags == 0 && Console->UnpauseEvent) - { - SetEvent(Console->UnpauseEvent); - CloseHandle(Console->UnpauseEvent); - Console->UnpauseEvent = NULL; - } -} - -CSR_API(CsrSetConsoleMode) -{ - NTSTATUS Status; - PCSRSS_CONSOLE Console; - PCSRSS_SCREEN_BUFFER Buff; - - DPRINT("CsrSetConsoleMode\n"); - - Status = Win32CsrLockObject(ProcessData, - Request->Data.SetConsoleModeRequest.ConsoleHandle, - (Object_t **) &Console, GENERIC_WRITE, 0); - if (! NT_SUCCESS(Status)) - { - return Status; - } - - Buff = (PCSRSS_SCREEN_BUFFER)Console; - if (CONIO_CONSOLE_MAGIC == Console->Header.Type) - { - Console->Mode = Request->Data.SetConsoleModeRequest.Mode & CONSOLE_INPUT_MODE_VALID; - } - else if (CONIO_SCREEN_BUFFER_MAGIC == Console->Header.Type) - { - Buff->Mode = Request->Data.SetConsoleModeRequest.Mode & CONSOLE_OUTPUT_MODE_VALID; - } - else - { - Status = STATUS_INVALID_HANDLE; - } - - Win32CsrUnlockObject((Object_t *)Console); - - return Status; -} - -CSR_API(CsrGetConsoleMode) -{ - NTSTATUS Status; - PCSRSS_CONSOLE Console; - PCSRSS_SCREEN_BUFFER Buff; /* gee, I really wish I could use an anonymous union here */ - - DPRINT("CsrGetConsoleMode\n"); - - Status = Win32CsrLockObject(ProcessData, Request->Data.GetConsoleModeRequest.ConsoleHandle, - (Object_t **) &Console, GENERIC_READ, 0); - if (! NT_SUCCESS(Status)) - { - return Status; - } - Status = STATUS_SUCCESS; - Buff = (PCSRSS_SCREEN_BUFFER) Console; - if (CONIO_CONSOLE_MAGIC == Console->Header.Type) - { - Request->Data.GetConsoleModeRequest.ConsoleMode = Console->Mode; - } - else if (CONIO_SCREEN_BUFFER_MAGIC == Buff->Header.Type) - { - Request->Data.GetConsoleModeRequest.ConsoleMode = Buff->Mode; - } - else - { - Status = STATUS_INVALID_HANDLE; - } - - Win32CsrUnlockObject((Object_t *)Console); - return Status; -} - -CSR_API(CsrSetTitle) -{ - NTSTATUS Status; - PCSRSS_CONSOLE Console; - PWCHAR Buffer; - - DPRINT("CsrSetTitle\n"); - - if (!Win32CsrValidateBuffer(ProcessData, Request->Data.SetTitleRequest.Title, - Request->Data.SetTitleRequest.Length, 1)) - { - return STATUS_ACCESS_VIOLATION; - } - - Status = ConioConsoleFromProcessData(ProcessData, &Console); - if(NT_SUCCESS(Status)) - { - Buffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, Request->Data.SetTitleRequest.Length); - if (Buffer) - { - /* copy title to console */ - RtlFreeUnicodeString(&Console->Title); - Console->Title.Buffer = Buffer; - Console->Title.Length = Console->Title.MaximumLength = Request->Data.SetTitleRequest.Length; - memcpy(Console->Title.Buffer, Request->Data.SetTitleRequest.Title, Console->Title.Length); - if (! ConioChangeTitle(Console)) - { - Status = STATUS_UNSUCCESSFUL; - } - else - { - Status = STATUS_SUCCESS; - } - } - else - { - Status = STATUS_NO_MEMORY; - } - ConioUnlockConsole(Console); - } - - return Status; -} - -CSR_API(CsrGetTitle) -{ - NTSTATUS Status; - PCSRSS_CONSOLE Console; - DWORD Length; - - DPRINT("CsrGetTitle\n"); - - - if (!Win32CsrValidateBuffer(ProcessData, Request->Data.GetTitleRequest.Title, - Request->Data.GetTitleRequest.Length, 1)) - { - return STATUS_ACCESS_VIOLATION; - } - - Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (! NT_SUCCESS(Status)) - { - DPRINT1("Can't get console\n"); - return Status; - } - - /* Copy title of the console to the user title buffer */ - if (Request->Data.GetTitleRequest.Length >= sizeof(WCHAR)) - { - Length = min(Request->Data.GetTitleRequest.Length - sizeof(WCHAR), Console->Title.Length); - memcpy(Request->Data.GetTitleRequest.Title, Console->Title.Buffer, Length); - Request->Data.GetTitleRequest.Title[Length / sizeof(WCHAR)] = L'\0'; - } - - Request->Data.GetTitleRequest.Length = Console->Title.Length; - - ConioUnlockConsole(Console); - return STATUS_SUCCESS; -} - -/********************************************************************** - * HardwareStateProperty - * - * DESCRIPTION - * Set/Get the value of the HardwareState and switch - * between direct video buffer ouput and GDI windowed - * output. - * ARGUMENTS - * Client hands us a CSRSS_CONSOLE_HARDWARE_STATE - * object. We use the same object to Request. - * NOTE - * ConsoleHwState has the correct size to be compatible - * with NT's, but values are not. - */ -static NTSTATUS FASTCALL -SetConsoleHardwareState (PCSRSS_CONSOLE Console, DWORD ConsoleHwState) -{ - DPRINT1("Console Hardware State: %d\n", ConsoleHwState); - - if ((CONSOLE_HARDWARE_STATE_GDI_MANAGED == ConsoleHwState) - ||(CONSOLE_HARDWARE_STATE_DIRECT == ConsoleHwState)) - { - if (Console->HardwareState != ConsoleHwState) - { - /* TODO: implement switching from full screen to windowed mode */ - /* TODO: or back; now simply store the hardware state */ - Console->HardwareState = ConsoleHwState; - } - - return STATUS_SUCCESS; - } - - return STATUS_INVALID_PARAMETER_3; /* Client: (handle, set_get, [mode]) */ -} - -CSR_API(CsrHardwareStateProperty) -{ - PCSRSS_CONSOLE Console; - NTSTATUS Status; - - DPRINT("CsrHardwareStateProperty\n"); - - Status = ConioLockConsole(ProcessData, - Request->Data.ConsoleHardwareStateRequest.ConsoleHandle, - &Console, - GENERIC_READ); - if (! NT_SUCCESS(Status)) - { - DPRINT1("Failed to get console handle in SetConsoleHardwareState\n"); - return Status; - } - - switch (Request->Data.ConsoleHardwareStateRequest.SetGet) - { - case CONSOLE_HARDWARE_STATE_GET: - Request->Data.ConsoleHardwareStateRequest.State = Console->HardwareState; - break; - - case CONSOLE_HARDWARE_STATE_SET: - DPRINT("Setting console hardware state.\n"); - Status = SetConsoleHardwareState(Console, Request->Data.ConsoleHardwareStateRequest.State); - break; - - default: - Status = STATUS_INVALID_PARAMETER_2; /* Client: (handle, [set_get], mode) */ - break; - } - - ConioUnlockConsole(Console); - - return Status; -} - -CSR_API(CsrGetConsoleWindow) -{ - PCSRSS_CONSOLE Console; - NTSTATUS Status; - - DPRINT("CsrGetConsoleWindow\n"); - - Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (! NT_SUCCESS(Status)) - { - return Status; - } - - Request->Data.GetConsoleWindowRequest.WindowHandle = Console->hWindow; - ConioUnlockConsole(Console); - - return STATUS_SUCCESS; -} - -CSR_API(CsrSetConsoleIcon) -{ - PCSRSS_CONSOLE Console; - NTSTATUS Status; - - DPRINT("CsrSetConsoleIcon\n"); - - Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (! NT_SUCCESS(Status)) - { - return Status; - } - - Status = (ConioChangeIcon(Console, Request->Data.SetConsoleIconRequest.WindowIcon) - ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL); - ConioUnlockConsole(Console); - - return Status; -} - -CSR_API(CsrGetConsoleCodePage) -{ - PCSRSS_CONSOLE Console; - NTSTATUS Status; - - DPRINT("CsrGetConsoleCodePage\n"); - - Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (! NT_SUCCESS(Status)) - { - return Status; - } - - Request->Data.GetConsoleCodePage.CodePage = Console->CodePage; - ConioUnlockConsole(Console); - return STATUS_SUCCESS; -} - -CSR_API(CsrSetConsoleCodePage) -{ - PCSRSS_CONSOLE Console; - NTSTATUS Status; - - DPRINT("CsrSetConsoleCodePage\n"); - - Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (! NT_SUCCESS(Status)) - { - return Status; - } - - if (IsValidCodePage(Request->Data.SetConsoleCodePage.CodePage)) - { - Console->CodePage = Request->Data.SetConsoleCodePage.CodePage; - ConioUnlockConsole(Console); - return STATUS_SUCCESS; - } - - ConioUnlockConsole(Console); - return STATUS_INVALID_PARAMETER; -} - -CSR_API(CsrGetConsoleOutputCodePage) -{ - PCSRSS_CONSOLE Console; - NTSTATUS Status; - - DPRINT("CsrGetConsoleOutputCodePage\n"); - - Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (! NT_SUCCESS(Status)) - { - return Status; - } - - Request->Data.GetConsoleOutputCodePage.CodePage = Console->OutputCodePage; - ConioUnlockConsole(Console); - return STATUS_SUCCESS; -} - -CSR_API(CsrSetConsoleOutputCodePage) -{ - PCSRSS_CONSOLE Console; - NTSTATUS Status; - - DPRINT("CsrSetConsoleOutputCodePage\n"); - - Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (! NT_SUCCESS(Status)) - { - return Status; - } - - if (IsValidCodePage(Request->Data.SetConsoleOutputCodePage.CodePage)) - { - Console->OutputCodePage = Request->Data.SetConsoleOutputCodePage.CodePage; - ConioUnlockConsole(Console); - return STATUS_SUCCESS; - } - - ConioUnlockConsole(Console); - return STATUS_INVALID_PARAMETER; -} - -CSR_API(CsrGetProcessList) -{ - PDWORD Buffer; - PCSRSS_CONSOLE Console; - PCSR_PROCESS current; - PLIST_ENTRY current_entry; - ULONG nItems = 0; - NTSTATUS Status; - - DPRINT("CsrGetProcessList\n"); - - Buffer = Request->Data.GetProcessListRequest.ProcessId; - if (!Win32CsrValidateBuffer(ProcessData, Buffer, Request->Data.GetProcessListRequest.nMaxIds, sizeof(DWORD))) - return STATUS_ACCESS_VIOLATION; - - Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (! NT_SUCCESS(Status)) - { - return Status; - } - - for (current_entry = Console->ProcessList.Flink; - current_entry != &Console->ProcessList; - current_entry = current_entry->Flink) - { - current = CONTAINING_RECORD(current_entry, CSR_PROCESS, ConsoleLink); - if (++nItems <= Request->Data.GetProcessListRequest.nMaxIds) - { - *Buffer++ = HandleToUlong(current->ClientId.UniqueProcess); - } - } - - ConioUnlockConsole(Console); - - Request->Data.GetProcessListRequest.nProcessIdsTotal = nItems; - return STATUS_SUCCESS; -} - -CSR_API(CsrGenerateCtrlEvent) -{ - PCSRSS_CONSOLE Console; - PCSR_PROCESS current; - PLIST_ENTRY current_entry; - DWORD Group; - NTSTATUS Status; - - Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (! NT_SUCCESS(Status)) - { - return Status; - } - - Group = Request->Data.GenerateCtrlEvent.ProcessGroup; - Status = STATUS_INVALID_PARAMETER; - for (current_entry = Console->ProcessList.Flink; - current_entry != &Console->ProcessList; - current_entry = current_entry->Flink) - { - current = CONTAINING_RECORD(current_entry, CSR_PROCESS, ConsoleLink); - if (Group == 0 || current->ProcessGroupId == Group) - { - ConioConsoleCtrlEvent(Request->Data.GenerateCtrlEvent.Event, current); - Status = STATUS_SUCCESS; - } - } - - ConioUnlockConsole(Console); - - return Status; -} - -CSR_API(CsrGetConsoleSelectionInfo) -{ - NTSTATUS Status; - PCSRSS_CONSOLE Console; - - Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (NT_SUCCESS(Status)) - { - memset(&Request->Data.GetConsoleSelectionInfo.Info, 0, sizeof(CONSOLE_SELECTION_INFO)); - if (Console->Selection.dwFlags != 0) - Request->Data.GetConsoleSelectionInfo.Info = Console->Selection; - ConioUnlockConsole(Console); - } - return Status; -} - -/* EOF */ diff --git a/deprecated/win32csr/desktopbg.c b/deprecated/win32csr/desktopbg.c deleted file mode 100644 index c6ba490b4ab..00000000000 --- a/deprecated/win32csr/desktopbg.c +++ /dev/null @@ -1,27 +0,0 @@ -#define NDEBUG - -#include "w32csr.h" -#include - -CSR_API(CsrCreateDesktop) -{ - return STATUS_SUCCESS; -} - -CSR_API(CsrShowDesktop) -{ - return STATUS_SUCCESS; -} - -CSR_API(CsrHideDesktop) -{ - return STATUS_SUCCESS; -} - -BOOL -FASTCALL DtbgIsDesktopVisible(VOID) -{ - return !((BOOL)NtUserCallNoParam(NOPARAM_ROUTINE_ISCONSOLEMODE)); -} - -/* EOF */ diff --git a/deprecated/win32csr/desktopbg.h b/deprecated/win32csr/desktopbg.h deleted file mode 100644 index 84d3859eef3..00000000000 --- a/deprecated/win32csr/desktopbg.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: subsys/csrss/include/destkopbg.h - * PURPOSE: CSRSS internal desktop background window interface - */ - -#pragma once - -#include "api.h" - -/* Api functions */ -CSR_API(CsrCreateDesktop); -CSR_API(CsrShowDesktop); -CSR_API(CsrHideDesktop); -CSR_API(CsrRegisterSystemClasses); - -BOOL FASTCALL DtbgIsDesktopVisible(VOID); - -/* EOF */ diff --git a/deprecated/win32csr/dllmain.c b/deprecated/win32csr/dllmain.c deleted file mode 100644 index ade36cb9e7b..00000000000 --- a/deprecated/win32csr/dllmain.c +++ /dev/null @@ -1,372 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: subsys/csrss/win32csr/dllmain.c - * PURPOSE: Initialization - * PROGRAMMERS: Dmitry Philippov (shedon@mail.ru) - */ - -/* INCLUDES ******************************************************************/ -#define NDEBUG -#include "w32csr.h" -#include "file.h" -#include - -/* Not defined in any header file */ -extern VOID WINAPI PrivateCsrssManualGuiCheck(LONG Check); -extern LIST_ENTRY DosDeviceHistory; -extern RTL_CRITICAL_SECTION Win32CsrDefineDosDeviceCritSec; - -/* GLOBALS *******************************************************************/ - -HANDLE Win32CsrApiHeap; -HINSTANCE Win32CsrDllHandle = NULL; - -static CSRSS_API_DEFINITION Win32CsrApiDefinitions[] = -{ - CSRSS_DEFINE_API(GET_INPUT_HANDLE, CsrGetHandle), - CSRSS_DEFINE_API(GET_OUTPUT_HANDLE, CsrGetHandle), - CSRSS_DEFINE_API(CLOSE_HANDLE, CsrCloseHandle), - CSRSS_DEFINE_API(VERIFY_HANDLE, CsrVerifyHandle), - CSRSS_DEFINE_API(DUPLICATE_HANDLE, CsrDuplicateHandle), - CSRSS_DEFINE_API(GET_INPUT_WAIT_HANDLE, CsrGetInputWaitHandle), - CSRSS_DEFINE_API(WRITE_CONSOLE, CsrWriteConsole), - CSRSS_DEFINE_API(READ_CONSOLE, CsrReadConsole), - CSRSS_DEFINE_API(ALLOC_CONSOLE, CsrAllocConsole), - CSRSS_DEFINE_API(FREE_CONSOLE, CsrFreeConsole), - CSRSS_DEFINE_API(SCREEN_BUFFER_INFO, CsrGetScreenBufferInfo), - CSRSS_DEFINE_API(SET_CURSOR, CsrSetCursor), - CSRSS_DEFINE_API(FILL_OUTPUT, CsrFillOutputChar), - CSRSS_DEFINE_API(READ_INPUT, CsrReadInputEvent), - CSRSS_DEFINE_API(WRITE_CONSOLE_OUTPUT_CHAR, CsrWriteConsoleOutputChar), - CSRSS_DEFINE_API(WRITE_CONSOLE_OUTPUT_ATTRIB, CsrWriteConsoleOutputAttrib), - CSRSS_DEFINE_API(FILL_OUTPUT_ATTRIB, CsrFillOutputAttrib), - CSRSS_DEFINE_API(GET_CURSOR_INFO, CsrGetCursorInfo), - CSRSS_DEFINE_API(SET_CURSOR_INFO, CsrSetCursorInfo), - CSRSS_DEFINE_API(SET_ATTRIB, CsrSetTextAttrib), - CSRSS_DEFINE_API(GET_CONSOLE_MODE, CsrGetConsoleMode), - CSRSS_DEFINE_API(SET_CONSOLE_MODE, CsrSetConsoleMode), - CSRSS_DEFINE_API(CREATE_SCREEN_BUFFER, CsrCreateScreenBuffer), - CSRSS_DEFINE_API(SET_SCREEN_BUFFER, CsrSetScreenBuffer), - CSRSS_DEFINE_API(SET_TITLE, CsrSetTitle), - CSRSS_DEFINE_API(GET_TITLE, CsrGetTitle), - CSRSS_DEFINE_API(WRITE_CONSOLE_OUTPUT, CsrWriteConsoleOutput), - CSRSS_DEFINE_API(FLUSH_INPUT_BUFFER, CsrFlushInputBuffer), - CSRSS_DEFINE_API(SCROLL_CONSOLE_SCREEN_BUFFER, CsrScrollConsoleScreenBuffer), - CSRSS_DEFINE_API(READ_CONSOLE_OUTPUT_CHAR, CsrReadConsoleOutputChar), - CSRSS_DEFINE_API(READ_CONSOLE_OUTPUT_ATTRIB, CsrReadConsoleOutputAttrib), - CSRSS_DEFINE_API(GET_NUM_INPUT_EVENTS, CsrGetNumberOfConsoleInputEvents), - CSRSS_DEFINE_API(EXIT_REACTOS, CsrExitReactos), - CSRSS_DEFINE_API(PEEK_CONSOLE_INPUT, CsrPeekConsoleInput), - CSRSS_DEFINE_API(READ_CONSOLE_OUTPUT, CsrReadConsoleOutput), - CSRSS_DEFINE_API(WRITE_CONSOLE_INPUT, CsrWriteConsoleInput), - CSRSS_DEFINE_API(SETGET_CONSOLE_HW_STATE, CsrHardwareStateProperty), - CSRSS_DEFINE_API(GET_CONSOLE_WINDOW, CsrGetConsoleWindow), - CSRSS_DEFINE_API(CREATE_DESKTOP, CsrCreateDesktop), - CSRSS_DEFINE_API(SHOW_DESKTOP, CsrShowDesktop), - CSRSS_DEFINE_API(HIDE_DESKTOP, CsrHideDesktop), - CSRSS_DEFINE_API(SET_CONSOLE_ICON, CsrSetConsoleIcon), - CSRSS_DEFINE_API(SET_LOGON_NOTIFY_WINDOW, CsrSetLogonNotifyWindow), - CSRSS_DEFINE_API(REGISTER_LOGON_PROCESS, CsrRegisterLogonProcess), - CSRSS_DEFINE_API(GET_CONSOLE_CP, CsrGetConsoleCodePage), - CSRSS_DEFINE_API(SET_CONSOLE_CP, CsrSetConsoleCodePage), - CSRSS_DEFINE_API(GET_CONSOLE_OUTPUT_CP, CsrGetConsoleOutputCodePage), - CSRSS_DEFINE_API(SET_CONSOLE_OUTPUT_CP, CsrSetConsoleOutputCodePage), - CSRSS_DEFINE_API(GET_PROCESS_LIST, CsrGetProcessList), - CSRSS_DEFINE_API(ADD_CONSOLE_ALIAS, CsrAddConsoleAlias), - CSRSS_DEFINE_API(GET_CONSOLE_ALIAS, CsrGetConsoleAlias), - CSRSS_DEFINE_API(GET_ALL_CONSOLE_ALIASES, CsrGetAllConsoleAliases), - CSRSS_DEFINE_API(GET_ALL_CONSOLE_ALIASES_LENGTH, CsrGetAllConsoleAliasesLength), - CSRSS_DEFINE_API(GET_CONSOLE_ALIASES_EXES, CsrGetConsoleAliasesExes), - CSRSS_DEFINE_API(GET_CONSOLE_ALIASES_EXES_LENGTH, CsrGetConsoleAliasesExesLength), - CSRSS_DEFINE_API(GENERATE_CTRL_EVENT, CsrGenerateCtrlEvent), - CSRSS_DEFINE_API(SET_SCREEN_BUFFER_SIZE, CsrSetScreenBufferSize), - CSRSS_DEFINE_API(GET_CONSOLE_SELECTION_INFO, CsrGetConsoleSelectionInfo), - CSRSS_DEFINE_API(GET_COMMAND_HISTORY_LENGTH, CsrGetCommandHistoryLength), - CSRSS_DEFINE_API(GET_COMMAND_HISTORY, CsrGetCommandHistory), - CSRSS_DEFINE_API(EXPUNGE_COMMAND_HISTORY, CsrExpungeCommandHistory), - CSRSS_DEFINE_API(SET_HISTORY_NUMBER_COMMANDS, CsrSetHistoryNumberCommands), - CSRSS_DEFINE_API(GET_HISTORY_INFO, CsrGetHistoryInfo), - CSRSS_DEFINE_API(SET_HISTORY_INFO, CsrSetHistoryInfo), - CSRSS_DEFINE_API(GET_TEMP_FILE, CsrGetTempFile), - CSRSS_DEFINE_API(DEFINE_DOS_DEVICE, CsrDefineDosDevice), - CSRSS_DEFINE_API(SOUND_SENTRY, CsrSoundSentry), - { 0, 0, NULL } -}; - -static HHOOK hhk = NULL; - -/* FUNCTIONS *****************************************************************/ - -LRESULT -CALLBACK -KeyboardHookProc( - int nCode, - WPARAM wParam, - LPARAM lParam) -{ - return CallNextHookEx(hhk, nCode, wParam, lParam); -} - -ULONG -InitializeVideoAddressSpace(VOID) -{ - OBJECT_ATTRIBUTES ObjectAttributes; - UNICODE_STRING PhysMemName = RTL_CONSTANT_STRING(L"\\Device\\PhysicalMemory"); - NTSTATUS Status; - HANDLE PhysMemHandle; - PVOID BaseAddress; - LARGE_INTEGER Offset; - SIZE_T ViewSize; - CHAR IVTAndBda[1024+256]; - - /* Free the 1MB pre-reserved region. In reality, ReactOS should simply support us mapping the view into the reserved area, but it doesn't. */ - BaseAddress = 0; - ViewSize = 1024 * 1024; - Status = ZwFreeVirtualMemory(NtCurrentProcess(), - &BaseAddress, - &ViewSize, - MEM_RELEASE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Couldn't unmap reserved memory (%x)\n", Status); - return 0; - } - - /* Open the physical memory section */ - InitializeObjectAttributes(&ObjectAttributes, - &PhysMemName, - 0, - NULL, - NULL); - Status = ZwOpenSection(&PhysMemHandle, - SECTION_ALL_ACCESS, - &ObjectAttributes); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Couldn't open \\Device\\PhysicalMemory\n"); - return 0; - } - - /* Map the BIOS and device registers into the address space */ - Offset.QuadPart = 0xa0000; - ViewSize = 0x100000 - 0xa0000; - BaseAddress = (PVOID)0xa0000; - Status = ZwMapViewOfSection(PhysMemHandle, - NtCurrentProcess(), - &BaseAddress, - 0, - ViewSize, - &Offset, - &ViewSize, - ViewUnmap, - 0, - PAGE_EXECUTE_READWRITE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Couldn't map physical memory (%x)\n", Status); - ZwClose(PhysMemHandle); - return 0; - } - - /* Close physical memory section handle */ - ZwClose(PhysMemHandle); - - if (BaseAddress != (PVOID)0xa0000) - { - DPRINT1("Couldn't map physical memory at the right address (was %x)\n", - BaseAddress); - return 0; - } - - /* Allocate some low memory to use for the non-BIOS - * parts of the v86 mode address space - */ - BaseAddress = (PVOID)0x1; - ViewSize = 0xa0000 - 0x1000; - Status = ZwAllocateVirtualMemory(NtCurrentProcess(), - &BaseAddress, - 0, - &ViewSize, - MEM_RESERVE | MEM_COMMIT, - PAGE_EXECUTE_READWRITE); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to allocate virtual memory (Status %x)\n", Status); - return 0; - } - if (BaseAddress != (PVOID)0x0) - { - DPRINT1("Failed to allocate virtual memory at right address (was %x)\n", - BaseAddress); - return 0; - } - - /* Get the real mode IVT and BDA from the kernel */ - Status = NtVdmControl(VdmInitialize, IVTAndBda); - if (!NT_SUCCESS(Status)) - { - DPRINT1("NtVdmControl failed (status %x)\n", Status); - return 0; - } - - /* Return success */ - return 1; -} - -/********************************************************************** - * CsrpInitVideo/3 - * - * TODO: we need a virtual device for sessions other than - * TODO: the console one - */ -NTSTATUS -CsrpInitVideo (VOID) -{ - OBJECT_ATTRIBUTES ObjectAttributes; - UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\??\\DISPLAY1"); - IO_STATUS_BLOCK Iosb; - HANDLE VideoHandle = (HANDLE) 0; - NTSTATUS Status = STATUS_SUCCESS; - - DPRINT("CSR: %s called\n", __FUNCTION__); - - InitializeVideoAddressSpace(); - - InitializeObjectAttributes(&ObjectAttributes, - &DeviceName, - 0, - NULL, - NULL); - Status = NtOpenFile(&VideoHandle, - FILE_ALL_ACCESS, - &ObjectAttributes, - &Iosb, - 0, - 0); - if (NT_SUCCESS(Status)) - { - NtClose(VideoHandle); - } - return Status; -} - -BOOL WINAPI -DllMain(HANDLE hDll, - DWORD dwReason, - LPVOID lpReserved) -{ - if (DLL_PROCESS_ATTACH == dwReason) - { - Win32CsrDllHandle = hDll; -// -// HACK HACK HACK ReactOS to BOOT! Initialization BUG ALERT! See bug 5655. -// - hhk = SetWindowsHookEx(WH_KEYBOARD_LL, KeyboardHookProc, NULL, 0); -// BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! -// BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! -// BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! BUG ALERT! - } - - if (DLL_PROCESS_DETACH == dwReason) - { - CsrCleanupDefineDosDevice(); - } - return TRUE; -} - -/* Ensure that a captured buffer is safe to access */ -BOOL FASTCALL -Win32CsrValidateBuffer(PCSR_PROCESS ProcessData, PVOID Buffer, - SIZE_T NumElements, SIZE_T ElementSize) -{ - /* Check that the following conditions are true: - * 1. The start of the buffer is somewhere within the process's - * shared memory section view. - * 2. The remaining space in the view is at least as large as the buffer. - * (NB: Please don't try to "optimize" this by using multiplication - * instead of division; remember that 2147483648 * 2 = 0.) - * 3. The buffer is DWORD-aligned. - */ - ULONG_PTR Offset = (BYTE *)Buffer - (BYTE *)ProcessData->ClientViewBase; - if (Offset >= ProcessData->ClientViewBounds - || NumElements > (ProcessData->ClientViewBounds - Offset) / ElementSize - || (Offset & (sizeof(DWORD) - 1)) != 0) - { - DPRINT1("Invalid buffer %p(%u*%u); section view is %p(%u)\n", - Buffer, NumElements, ElementSize, - ProcessData->ClientViewBase, ProcessData->ClientViewBounds); - return FALSE; - } - return TRUE; -} - -NTSTATUS FASTCALL -Win32CsrEnumProcesses(CSRSS_ENUM_PROCESS_PROC EnumProc, - PVOID Context) -{ - return CsrEnumProcesses(EnumProc, Context); -} - -VOID -WINAPI -PrivateCsrssManualGuiCheck(LONG Check) -{ - NtUserCallOneParam(Check, ONEPARAM_ROUTINE_CSRSS_GUICHECK); -} - -DWORD -WINAPI -CreateSystemThreads(PVOID pParam) -{ - NtUserCallOneParam((DWORD)pParam, ONEPARAM_ROUTINE_CREATESYSTEMTHREADS); - DPRINT1("This thread should not terminate!\n"); - return 0; -} - -NTSTATUS -WINAPI -Win32CsrInitialization(IN PCSR_SERVER_DLL ServerDll) -{ - HANDLE ServerThread; - CLIENT_ID ClientId; - NTSTATUS Status; - UINT i; - - Win32CsrApiHeap = RtlGetProcessHeap(); - - CsrpInitVideo(); - - NtUserInitialize(0, NULL, NULL); - - PrivateCsrssManualGuiCheck(0); - CsrInitConsoleSupport(); - - /* HACK */ - ServerDll->DispatchTable = (PVOID)Win32CsrApiDefinitions; - ServerDll->HighestApiSupported = 0xDEADBABE; - - ServerDll->HardErrorCallback = Win32CsrHardError; - ServerDll->NewProcessCallback = Win32CsrDuplicateHandleTable; - ServerDll->DisconnectCallback = Win32CsrReleaseConsole; - - RtlInitializeCriticalSection(&Win32CsrDefineDosDeviceCritSec); - InitializeListHead(&DosDeviceHistory); - - /* Start the Raw Input Thread and the Desktop Thread */ - for (i = 0; i < 2; ++i) - { - Status = RtlCreateUserThread(NtCurrentProcess(), NULL, TRUE, 0, 0, 0, (PTHREAD_START_ROUTINE)CreateSystemThreads, (PVOID)i, &ServerThread, &ClientId); - if (NT_SUCCESS(Status)) - { - NtResumeThread(ServerThread, NULL); - NtClose(ServerThread); - } - else - DPRINT1("Cannot start Raw Input Thread!\n"); - } - - return STATUS_SUCCESS; -} - -/* EOF */ diff --git a/deprecated/win32csr/exitros.c b/deprecated/win32csr/exitros.c deleted file mode 100644 index 0b92f35c41a..00000000000 --- a/deprecated/win32csr/exitros.c +++ /dev/null @@ -1,912 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS CSRSS subsystem - * FILE: subsys/csrss/win32csr/exitros.c - * PURPOSE: Logout/shutdown - */ - -/* INCLUDES ******************************************************************/ -#define NDEBUG -#include "w32csr.h" -#include -#include "resource.h" -#include - -static HANDLE LogonProcess = NULL; - -CSR_API(CsrRegisterLogonProcess) -{ - if (Request->Data.RegisterLogonProcessRequest.Register) - { - if (0 != LogonProcess) - { - return STATUS_LOGON_SESSION_EXISTS; - } - LogonProcess = Request->Data.RegisterLogonProcessRequest.ProcessId; - } - else - { - if (Request->Header.ClientId.UniqueProcess != LogonProcess) - { - DPRINT1("Current logon process 0x%x, can't deregister from process 0x%x\n", - LogonProcess, Request->Header.ClientId.UniqueProcess); - return STATUS_NOT_LOGON_PROCESS; - } - LogonProcess = 0; - } - - return STATUS_SUCCESS; -} - -CSR_API(CsrSetLogonNotifyWindow) -{ - return STATUS_SUCCESS; -} - -typedef struct tagSHUTDOWN_SETTINGS -{ - BOOL AutoEndTasks; - DWORD HungAppTimeout; - DWORD WaitToKillAppTimeout; -} SHUTDOWN_SETTINGS, *PSHUTDOWN_SETTINGS; - -#define DEFAULT_AUTO_END_TASKS FALSE -#define DEFAULT_HUNG_APP_TIMEOUT 5000 -#define DEFAULT_WAIT_TO_KILL_APP_TIMEOUT 20000 - -typedef struct tagNOTIFY_CONTEXT -{ - DWORD ProcessId; - UINT Msg; - WPARAM wParam; - LPARAM lParam; - HDESK Desktop; - HDESK OldDesktop; - DWORD StartTime; - DWORD QueryResult; - HWND Dlg; - DWORD EndNowResult; - BOOL ShowUI; - HANDLE UIThread; - HWND WndClient; - PSHUTDOWN_SETTINGS ShutdownSettings; - LPTHREAD_START_ROUTINE SendMessageProc; -} NOTIFY_CONTEXT, *PNOTIFY_CONTEXT; - -#define QUERY_RESULT_ABORT 0 -#define QUERY_RESULT_CONTINUE 1 -#define QUERY_RESULT_TIMEOUT 2 -#define QUERY_RESULT_ERROR 3 -#define QUERY_RESULT_FORCE 4 - -static void FASTCALL -UpdateProgressBar(HWND ProgressBar, PNOTIFY_CONTEXT NotifyContext) -{ - DWORD Passed; - - Passed = GetTickCount() - NotifyContext->StartTime; - Passed -= NotifyContext->ShutdownSettings->HungAppTimeout; - if (NotifyContext->ShutdownSettings->WaitToKillAppTimeout < Passed) - { - Passed = NotifyContext->ShutdownSettings->WaitToKillAppTimeout; - } - SendMessageW(ProgressBar, PBM_SETPOS, Passed / 2, 0); -} - -static INT_PTR CALLBACK -EndNowDlgProc(HWND Dlg, UINT Msg, WPARAM wParam, LPARAM lParam) -{ - INT_PTR Result; - PNOTIFY_CONTEXT NotifyContext; - HWND ProgressBar; - DWORD TitleLength; - int Len; - LPWSTR Title; - - switch(Msg) - { - case WM_INITDIALOG: - NotifyContext = (PNOTIFY_CONTEXT) lParam; - NotifyContext->EndNowResult = QUERY_RESULT_ABORT; - SetWindowLongPtrW(Dlg, DWLP_USER, (LONG_PTR) lParam); - TitleLength = SendMessageW(NotifyContext->WndClient, WM_GETTEXTLENGTH, - 0, 0) + - GetWindowTextLengthW(Dlg); - Title = HeapAlloc(Win32CsrApiHeap, 0, (TitleLength + 1) * sizeof(WCHAR)); - if (NULL != Title) - { - Len = GetWindowTextW(Dlg, Title, TitleLength + 1); - SendMessageW(NotifyContext->WndClient, WM_GETTEXT, - TitleLength + 1 - Len, (LPARAM) (Title + Len)); - SetWindowTextW(Dlg, Title); - HeapFree(Win32CsrApiHeap, 0, Title); - } - ProgressBar = GetDlgItem(Dlg, IDC_PROGRESS); - SendMessageW(ProgressBar, PBM_SETRANGE32, 0, - NotifyContext->ShutdownSettings->WaitToKillAppTimeout / 2); - UpdateProgressBar(ProgressBar, NotifyContext); - SetTimer(Dlg, 0, 200, NULL); - Result = FALSE; - break; - - case WM_TIMER: - NotifyContext = (PNOTIFY_CONTEXT) GetWindowLongPtrW(Dlg, DWLP_USER); - ProgressBar = GetDlgItem(Dlg, IDC_PROGRESS); - UpdateProgressBar(ProgressBar, NotifyContext); - Result = TRUE; - break; - - case WM_COMMAND: - if (BN_CLICKED == HIWORD(wParam) && IDC_END_NOW == LOWORD(wParam)) - { - NotifyContext = (PNOTIFY_CONTEXT) GetWindowLongPtrW(Dlg, DWLP_USER); - NotifyContext->EndNowResult = QUERY_RESULT_FORCE; - SendMessageW(Dlg, WM_CLOSE, 0, 0); - Result = TRUE; - } - else - { - Result = FALSE; - } - break; - - case WM_CLOSE: - DestroyWindow(Dlg); - Result = TRUE; - break; - - case WM_DESTROY: - NotifyContext = (PNOTIFY_CONTEXT) GetWindowLongPtrW(Dlg, DWLP_USER); - NotifyContext->Dlg = NULL; - KillTimer(Dlg, 0); - PostQuitMessage(NotifyContext->EndNowResult); - Result = TRUE; - break; - - default: - Result = FALSE; - break; - } - - return Result; -} - -typedef void (WINAPI *INITCOMMONCONTROLS_PROC)(void); - -static void -CallInitCommonControls() -{ - static BOOL Initialized = FALSE; - HMODULE Lib; - INITCOMMONCONTROLS_PROC InitProc; - - if (Initialized) - { - return; - } - - Lib = LoadLibraryW(L"COMCTL32.DLL"); - if (NULL == Lib) - { - return; - } - InitProc = (INITCOMMONCONTROLS_PROC) GetProcAddress(Lib, "InitCommonControls"); - if (NULL == InitProc) - { - return; - } - - (*InitProc)(); - - Initialized = TRUE; -} - -static DWORD WINAPI -EndNowThreadProc(LPVOID Parameter) -{ - PNOTIFY_CONTEXT NotifyContext = (PNOTIFY_CONTEXT) Parameter; - MSG Msg; - - SetThreadDesktop(NotifyContext->Desktop); - SwitchDesktop(NotifyContext->Desktop); - CallInitCommonControls(); - NotifyContext->Dlg = CreateDialogParam(GetModuleHandleW(L"win32csr"), - MAKEINTRESOURCE(IDD_END_NOW), NULL, - EndNowDlgProc, (LPARAM) NotifyContext); - if (NULL == NotifyContext->Dlg) - { - return 0; - } - ShowWindow(NotifyContext->Dlg, SW_SHOWNORMAL); - - while (GetMessageW(&Msg, NULL, 0, 0)) - { - if (! IsDialogMessage(NotifyContext->Dlg, &Msg)) - { - TranslateMessage(&Msg); - DispatchMessageW(&Msg); - } - } - - return Msg.wParam; -} - -typedef struct tagMESSAGE_CONTEXT -{ - HWND Wnd; - UINT Msg; - WPARAM wParam; - LPARAM lParam; - DWORD Timeout; -} MESSAGE_CONTEXT, *PMESSAGE_CONTEXT; - -static DWORD WINAPI -SendQueryEndSession(LPVOID Parameter) -{ - PMESSAGE_CONTEXT Context = (PMESSAGE_CONTEXT) Parameter; - DWORD_PTR Result; - - if (SendMessageTimeoutW(Context->Wnd, WM_QUERYENDSESSION, Context->wParam, - Context->lParam, SMTO_NORMAL, Context->Timeout, - &Result)) - { - return Result ? QUERY_RESULT_CONTINUE : QUERY_RESULT_ABORT; - } - - return 0 == GetLastError() ? QUERY_RESULT_TIMEOUT : QUERY_RESULT_ERROR; -} - -static DWORD WINAPI -SendEndSession(LPVOID Parameter) -{ - PMESSAGE_CONTEXT Context = (PMESSAGE_CONTEXT) Parameter; - DWORD_PTR Result; - - if (Context->wParam) - { - if (SendMessageTimeoutW(Context->Wnd, WM_ENDSESSION, Context->wParam, - Context->lParam, SMTO_NORMAL, Context->Timeout, - &Result)) - { - return QUERY_RESULT_CONTINUE; - } - return 0 == GetLastError() ? QUERY_RESULT_TIMEOUT : QUERY_RESULT_ERROR; - } - else - { - SendMessage(Context->Wnd, WM_ENDSESSION, Context->wParam, - Context->lParam); - return QUERY_RESULT_CONTINUE; - } -} - -static BOOL CALLBACK -NotifyTopLevelEnum(HWND Wnd, LPARAM lParam) -{ - PNOTIFY_CONTEXT NotifyContext = (PNOTIFY_CONTEXT) lParam; - MESSAGE_CONTEXT MessageContext; - DWORD Now, Passed; - DWORD Timeout, WaitStatus; - DWORD ProcessId; - HANDLE MessageThread; - HANDLE Threads[2]; - - if (0 == GetWindowThreadProcessId(Wnd, &ProcessId)) - { - NotifyContext->QueryResult = QUERY_RESULT_ERROR; - return FALSE; - } - - if (ProcessId == NotifyContext->ProcessId) - { - Now = GetTickCount(); - if (0 == NotifyContext->StartTime) - { - NotifyContext->StartTime = Now; - } - /* Note: Passed is computed correctly even when GetTickCount() wraps due - to unsigned arithmetic */ - Passed = Now - NotifyContext->StartTime; - MessageContext.Wnd = Wnd; - MessageContext.Msg = NotifyContext->Msg; - MessageContext.wParam = NotifyContext->wParam; - MessageContext.lParam = NotifyContext->lParam; - MessageContext.Timeout = NotifyContext->ShutdownSettings->HungAppTimeout; - if (! NotifyContext->ShutdownSettings->AutoEndTasks) - { - MessageContext.Timeout += NotifyContext->ShutdownSettings->WaitToKillAppTimeout; - } - if (Passed < MessageContext.Timeout) - { - MessageContext.Timeout -= Passed; - MessageThread = CreateThread(NULL, 0, NotifyContext->SendMessageProc, - (LPVOID) &MessageContext, 0, NULL); - if (NULL == MessageThread) - { - NotifyContext->QueryResult = QUERY_RESULT_ERROR; - return FALSE; - } - Timeout = NotifyContext->ShutdownSettings->HungAppTimeout; - if (Passed < Timeout) - { - Timeout -= Passed; - WaitStatus = WaitForSingleObjectEx(MessageThread, Timeout, FALSE); - } - else - { - WaitStatus = WAIT_TIMEOUT; - } - if (WAIT_TIMEOUT == WaitStatus) - { - NotifyContext->WndClient = Wnd; - if (NULL == NotifyContext->UIThread && NotifyContext->ShowUI) - { - NotifyContext->UIThread = CreateThread(NULL, 0, - EndNowThreadProc, - (LPVOID) NotifyContext, - 0, NULL); - } - Threads[0] = MessageThread; - Threads[1] = NotifyContext->UIThread; - WaitStatus = WaitForMultipleObjectsEx(NULL == NotifyContext->UIThread ? - 1 : 2, - Threads, FALSE, INFINITE, - FALSE); - if (WAIT_OBJECT_0 == WaitStatus) - { - if (! GetExitCodeThread(MessageThread, &NotifyContext->QueryResult)) - { - NotifyContext->QueryResult = QUERY_RESULT_ERROR; - } - } - else if (WAIT_OBJECT_0 + 1 == WaitStatus) - { - if (! GetExitCodeThread(NotifyContext->UIThread, - &NotifyContext->QueryResult)) - { - NotifyContext->QueryResult = QUERY_RESULT_ERROR; - } - } - else - { - NotifyContext->QueryResult = QUERY_RESULT_ERROR; - } - if (WAIT_OBJECT_0 != WaitStatus) - { - TerminateThread(MessageThread, QUERY_RESULT_TIMEOUT); - } - } - else if (WAIT_OBJECT_0 == WaitStatus) - { - if (! GetExitCodeThread(MessageThread, - &NotifyContext->QueryResult)) - { - NotifyContext->QueryResult = QUERY_RESULT_ERROR; - } - } - else - { - NotifyContext->QueryResult = QUERY_RESULT_ERROR; - } - CloseHandle(MessageThread); - } - else - { - NotifyContext->QueryResult = QUERY_RESULT_TIMEOUT; - } - } - - return QUERY_RESULT_CONTINUE == NotifyContext->QueryResult; -} - -static BOOL CALLBACK -NotifyDesktopEnum(LPWSTR DesktopName, LPARAM lParam) -{ - PNOTIFY_CONTEXT Context = (PNOTIFY_CONTEXT) lParam; - - Context->Desktop = OpenDesktopW(DesktopName, 0, FALSE, - DESKTOP_ENUMERATE | DESKTOP_SWITCHDESKTOP); - if (NULL == Context->Desktop) - { - DPRINT1("OpenDesktop failed with error %d\n", GetLastError()); - Context->QueryResult = QUERY_RESULT_ERROR; - return FALSE; - } - - Context->OldDesktop = GetThreadDesktop(GetCurrentThreadId()); - SwitchDesktop(Context->Desktop); - - EnumDesktopWindows(Context->Desktop, NotifyTopLevelEnum, lParam); - - SwitchDesktop(Context->OldDesktop); - - CloseDesktop(Context->Desktop); - - return QUERY_RESULT_CONTINUE == Context->QueryResult; -} - -static BOOL FASTCALL -NotifyTopLevelWindows(PNOTIFY_CONTEXT Context) -{ - HWINSTA WindowStation; - - WindowStation = GetProcessWindowStation(); - if (NULL == WindowStation) - { - DPRINT1("GetProcessWindowStation failed with error %d\n", GetLastError()); - return TRUE; - } - - EnumDesktopsW(WindowStation, NotifyDesktopEnum, (LPARAM) Context); - - return TRUE; -} - -static BOOL FASTCALL -NotifyAndTerminateProcess(PCSR_PROCESS ProcessData, - PSHUTDOWN_SETTINGS ShutdownSettings, - UINT Flags) -{ - NOTIFY_CONTEXT Context; - HANDLE Process; - DWORD QueryResult = QUERY_RESULT_CONTINUE; - - Context.QueryResult = QUERY_RESULT_CONTINUE; - - if (0 == (Flags & EWX_FORCE)) - { - if (NULL != ProcessData->Console) - { - ConioConsoleCtrlEventTimeout(CTRL_LOGOFF_EVENT, ProcessData, - ShutdownSettings->WaitToKillAppTimeout); - } - else - { - Context.ProcessId = (DWORD_PTR) ProcessData->ClientId.UniqueProcess; - Context.wParam = 0; - Context.lParam = (0 != (Flags & EWX_INTERNAL_FLAG_LOGOFF) ? - ENDSESSION_LOGOFF : 0); - Context.StartTime = 0; - Context.UIThread = NULL; - Context.ShowUI = DtbgIsDesktopVisible(); - Context.Dlg = NULL; - Context.ShutdownSettings = ShutdownSettings; - Context.SendMessageProc = SendQueryEndSession; - - NotifyTopLevelWindows(&Context); - - Context.wParam = (QUERY_RESULT_ABORT != Context.QueryResult); - Context.lParam = (0 != (Flags & EWX_INTERNAL_FLAG_LOGOFF) ? - ENDSESSION_LOGOFF : 0); - Context.SendMessageProc = SendEndSession; - Context.ShowUI = DtbgIsDesktopVisible() && - (QUERY_RESULT_ABORT != Context.QueryResult); - QueryResult = Context.QueryResult; - Context.QueryResult = QUERY_RESULT_CONTINUE; - - NotifyTopLevelWindows(&Context); - - if (NULL != Context.UIThread) - { - if (NULL != Context.Dlg) - { - SendMessageW(Context.Dlg, WM_CLOSE, 0, 0); - } - else - { - TerminateThread(Context.UIThread, QUERY_RESULT_ERROR); - } - CloseHandle(Context.UIThread); - } - } - - if (QUERY_RESULT_ABORT == QueryResult) - { - return FALSE; - } - } - - /* Terminate this process */ - Process = OpenProcess(PROCESS_TERMINATE, FALSE, - (DWORD_PTR) ProcessData->ClientId.UniqueProcess); - if (NULL == Process) - { - DPRINT1("Unable to open process %d, error %d\n", ProcessData->ClientId.UniqueProcess, - GetLastError()); - return TRUE; - } - TerminateProcess(Process, 0); - CloseHandle(Process); - - return TRUE; -} - -typedef struct tagPROCESS_ENUM_CONTEXT -{ - UINT ProcessCount; - PCSR_PROCESS *ProcessData; - TOKEN_ORIGIN TokenOrigin; - DWORD ShellProcess; - DWORD CsrssProcess; -} PROCESS_ENUM_CONTEXT, *PPROCESS_ENUM_CONTEXT; - -static NTSTATUS WINAPI -ExitReactosProcessEnum(PCSR_PROCESS ProcessData, PVOID Data) -{ - HANDLE Process; - HANDLE Token; - TOKEN_ORIGIN Origin; - DWORD ReturnLength; - PPROCESS_ENUM_CONTEXT Context = (PPROCESS_ENUM_CONTEXT) Data; - PCSR_PROCESS *NewData; - - /* Do not kill winlogon or csrss */ - if ((DWORD_PTR) ProcessData->ClientId.UniqueProcess == Context->CsrssProcess || - ProcessData->ClientId.UniqueProcess == LogonProcess) - { - return STATUS_SUCCESS; - } - - /* Get the login session of this process */ - Process = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, - (DWORD_PTR) ProcessData->ClientId.UniqueProcess); - if (NULL == Process) - { - DPRINT1("Unable to open process %d, error %d\n", ProcessData->ClientId.UniqueProcess, - GetLastError()); - return STATUS_UNSUCCESSFUL; - } - - if (! OpenProcessToken(Process, TOKEN_QUERY, &Token)) - { - DPRINT1("Unable to open token for process %d, error %d\n", - ProcessData->ClientId.UniqueProcess, GetLastError()); - CloseHandle(Process); - return STATUS_UNSUCCESSFUL; - } - CloseHandle(Process); - - if (! GetTokenInformation(Token, TokenOrigin, &Origin, - sizeof(TOKEN_ORIGIN), &ReturnLength)) - { - DPRINT1("GetTokenInformation failed for process %d with error %d\n", - ProcessData->ClientId.UniqueProcess, GetLastError()); - CloseHandle(Token); - return STATUS_UNSUCCESSFUL; - } - CloseHandle(Token); - - /* This process will be killed if it's in the correct logon session */ - if (RtlEqualLuid(&(Context->TokenOrigin.OriginatingLogonSession), - &(Origin.OriginatingLogonSession))) - { - /* Kill the shell process last */ - if ((DWORD_PTR) ProcessData->ClientId.UniqueProcess == Context->ShellProcess) - { - ProcessData->ShutdownLevel = 0; - } - NewData = HeapAlloc(Win32CsrApiHeap, 0, (Context->ProcessCount + 1) - * sizeof(PCSR_PROCESS)); - if (NULL == NewData) - { - return STATUS_NO_MEMORY; - } - if (0 != Context->ProcessCount) - { - memcpy(NewData, Context->ProcessData, - Context->ProcessCount * sizeof(PCSR_PROCESS)); - HeapFree(Win32CsrApiHeap, 0, Context->ProcessData); - } - Context->ProcessData = NewData; - Context->ProcessData[Context->ProcessCount] = ProcessData; - Context->ProcessCount++; - } - - return STATUS_SUCCESS; -} - -static int -ProcessDataCompare(const void *Elem1, const void *Elem2) -{ - const PCSR_PROCESS *ProcessData1 = (PCSR_PROCESS *) Elem1; - const PCSR_PROCESS *ProcessData2 = (PCSR_PROCESS *) Elem2; - - if ((*ProcessData1)->ShutdownLevel < (*ProcessData2)->ShutdownLevel) - { - return +1; - } - else if ((*ProcessData2)->ShutdownLevel < (*ProcessData1)->ShutdownLevel) - { - return -1; - } - else if ((*ProcessData1)->ClientId.UniqueProcess < (*ProcessData2)->ClientId.UniqueProcess) - { - return +1; - } - else if ((*ProcessData2)->ClientId.UniqueProcess < (*ProcessData1)->ClientId.UniqueProcess) - { - return -1; - } - - return 0; -} - -static DWORD FASTCALL -GetShutdownSetting(HKEY DesktopKey, LPCWSTR ValueName, DWORD DefaultValue) -{ - BYTE ValueBuffer[16]; - LONG ErrCode; - DWORD Type; - DWORD ValueSize; - UNICODE_STRING StringValue; - ULONG Value; - - ValueSize = sizeof(ValueBuffer); - ErrCode = RegQueryValueExW(DesktopKey, ValueName, NULL, &Type, ValueBuffer, - &ValueSize); - if (ERROR_SUCCESS != ErrCode) - { - DPRINT("GetShutdownSetting for %S failed with error code %ld\n", - ValueName, ErrCode); - return DefaultValue; - } - - if (REG_SZ == Type) - { - RtlInitUnicodeString(&StringValue, (LPCWSTR) ValueBuffer); - if (! NT_SUCCESS(RtlUnicodeStringToInteger(&StringValue, 10, &Value))) - { - DPRINT1("Unable to convert value %S for setting %S\n", - StringValue.Buffer, ValueName); - return DefaultValue; - } - return (DWORD) Value; - } - else if (REG_DWORD == Type) - { - return *((DWORD *) ValueBuffer); - } - - DPRINT1("Unexpected registry type %d for setting %S\n", Type, ValueName); - return DefaultValue; -} - -static void FASTCALL -LoadShutdownSettings(PSID Sid, PSHUTDOWN_SETTINGS ShutdownSettings) -{ - static WCHAR Subkey[] = L"\\Control Panel\\Desktop"; - LPWSTR StringSid; - WCHAR InitialKeyName[128]; - LPWSTR KeyName; - HKEY DesktopKey; - LONG ErrCode; - - ShutdownSettings->AutoEndTasks = DEFAULT_AUTO_END_TASKS; - ShutdownSettings->HungAppTimeout = DEFAULT_HUNG_APP_TIMEOUT; - ShutdownSettings->WaitToKillAppTimeout = DEFAULT_WAIT_TO_KILL_APP_TIMEOUT; - - if (! ConvertSidToStringSidW(Sid, &StringSid)) - { - DPRINT1("ConvertSidToStringSid failed with error %d, using default shutdown settings\n", - GetLastError()); - return; - } - if (wcslen(StringSid) + wcslen(Subkey) + 1 <= - sizeof(InitialKeyName) / sizeof(WCHAR)) - { - KeyName = InitialKeyName; - } - else - { - KeyName = HeapAlloc(Win32CsrApiHeap, 0, - (wcslen(StringSid) + wcslen(Subkey) + 1) * - sizeof(WCHAR)); - if (NULL == KeyName) - { - DPRINT1("Failed to allocate memory, using default shutdown settings\n"); - LocalFree(StringSid); - return; - } - } - wcscat(wcscpy(KeyName, StringSid), Subkey); - LocalFree(StringSid); - - ErrCode = RegOpenKeyExW(HKEY_USERS, KeyName, 0, KEY_QUERY_VALUE, &DesktopKey); - if (KeyName != InitialKeyName) - { - HeapFree(Win32CsrApiHeap, 0, KeyName); - } - if (ERROR_SUCCESS != ErrCode) - { - DPRINT1("RegOpenKeyEx failed with error %ld, using default shutdown settings\n", ErrCode); - return; - } - - ShutdownSettings->AutoEndTasks = (BOOL) GetShutdownSetting(DesktopKey, L"AutoEndTasks", - (DWORD) DEFAULT_AUTO_END_TASKS); - ShutdownSettings->HungAppTimeout = GetShutdownSetting(DesktopKey, - L"HungAppTimeout", - DEFAULT_HUNG_APP_TIMEOUT); - ShutdownSettings->WaitToKillAppTimeout = GetShutdownSetting(DesktopKey, - L"WaitToKillAppTimeout", - DEFAULT_WAIT_TO_KILL_APP_TIMEOUT); - - RegCloseKey(DesktopKey); -} - -static NTSTATUS FASTCALL -InternalExitReactos(DWORD ProcessId, DWORD ThreadId, UINT Flags) -{ - HANDLE CallerThread; - HANDLE CallerToken; - NTSTATUS Status; - PROCESS_ENUM_CONTEXT Context; - DWORD ReturnLength; - HWND ShellWnd; - UINT ProcessIndex; - char FixedUserInfo[64]; - TOKEN_USER *UserInfo; - SHUTDOWN_SETTINGS ShutdownSettings; - - if (ProcessId != (DWORD_PTR) LogonProcess) - { - DPRINT1("Internal ExitWindowsEx call not from winlogon\n"); - return STATUS_ACCESS_DENIED; - } - - DPRINT1("FIXME: Need to close all user processes!\n"); - return STATUS_SUCCESS; - - CallerThread = OpenThread(THREAD_QUERY_INFORMATION, FALSE, ThreadId); - if (NULL == CallerThread) - { - DPRINT1("OpenThread failed with error %d\n", GetLastError()); - return STATUS_UNSUCCESSFUL; - } - if (! OpenThreadToken(CallerThread, TOKEN_QUERY, FALSE, &CallerToken)) - { - DPRINT1("OpenThreadToken failed with error %d\n", GetLastError()); - CloseHandle(CallerThread); - return STATUS_UNSUCCESSFUL; - } - CloseHandle(CallerThread); - - Context.ProcessCount = 0; - Context.ProcessData = NULL; - if (! GetTokenInformation(CallerToken, TokenOrigin, &Context.TokenOrigin, - sizeof(TOKEN_ORIGIN), &ReturnLength)) - { - DPRINT1("GetTokenInformation failed with error %d\n", GetLastError()); - CloseHandle(CallerToken); - return STATUS_UNSUCCESSFUL; - } - if (! GetTokenInformation(CallerToken, TokenUser, FixedUserInfo, - sizeof(FixedUserInfo), &ReturnLength)) - { - if (sizeof(FixedUserInfo) < ReturnLength) - { - UserInfo = HeapAlloc(Win32CsrApiHeap, 0, ReturnLength); - if (NULL == UserInfo) - { - DPRINT1("Unable to allocate %u bytes for user info\n", - (unsigned) ReturnLength); - CloseHandle(CallerToken); - return STATUS_NO_MEMORY; - } - if (! GetTokenInformation(CallerToken, TokenUser, UserInfo, - ReturnLength, &ReturnLength)) - { - DPRINT1("GetTokenInformation failed with error %d\n", - GetLastError()); - HeapFree(Win32CsrApiHeap, 0, UserInfo); - CloseHandle(CallerToken); - return STATUS_UNSUCCESSFUL; - } - } - else - { - DPRINT1("GetTokenInformation failed with error %d\n", GetLastError()); - CloseHandle(CallerToken); - return STATUS_UNSUCCESSFUL; - } - } - else - { - UserInfo = (TOKEN_USER *) FixedUserInfo; - } - CloseHandle(CallerToken); - LoadShutdownSettings(UserInfo->User.Sid, &ShutdownSettings); - if (UserInfo != (TOKEN_USER *) FixedUserInfo) - { - HeapFree(Win32CsrApiHeap, 0, UserInfo); - } - Context.CsrssProcess = GetCurrentProcessId(); - ShellWnd = GetShellWindow(); - if (NULL == ShellWnd) - { - DPRINT("No shell present\n"); - Context.ShellProcess = 0; - } - else if (0 == GetWindowThreadProcessId(ShellWnd, &Context.ShellProcess)) - { - DPRINT1("Can't get process id of shell window\n"); - Context.ShellProcess = 0; - } - - Status = Win32CsrEnumProcesses(ExitReactosProcessEnum, &Context); - if (! NT_SUCCESS(Status)) - { - DPRINT1("Failed to enumerate registered processes, status 0x%x\n", - Status); - if (NULL != Context.ProcessData) - { - HeapFree(Win32CsrApiHeap, 0, Context.ProcessData); - } - return Status; - } - - qsort(Context.ProcessData, Context.ProcessCount, sizeof(PCSR_PROCESS), - ProcessDataCompare); - - /* Terminate processes, stop if we find one kicking and screaming it doesn't - want to die */ - Status = STATUS_SUCCESS; - for (ProcessIndex = 0; - ProcessIndex < Context.ProcessCount && NT_SUCCESS(Status); - ProcessIndex++) - { - if (! NotifyAndTerminateProcess(Context.ProcessData[ProcessIndex], - &ShutdownSettings, Flags)) - { - Status = STATUS_REQUEST_ABORTED; - } - } - - /* Cleanup */ - if (NULL != Context.ProcessData) - { - HeapFree(Win32CsrApiHeap, 0, Context.ProcessData); - } - - return Status; -} - -static NTSTATUS FASTCALL -UserExitReactos(DWORD UserProcessId, UINT Flags) -{ - NTSTATUS Status; - - /* FIXME Inside 2000 says we should impersonate the caller here */ - Status = NtUserCallTwoParam (UserProcessId, Flags, TWOPARAM_ROUTINE_EXITREACTOS); - - /* If the message isn't handled, the return value is 0, so 0 doesn't indicate - success. Success is indicated by a 1 return value, if anything besides 0 - or 1 it's a NTSTATUS value */ - if (1 == Status) - { - Status = STATUS_SUCCESS; - } - else if (0 == Status) - { - Status = STATUS_NOT_IMPLEMENTED; - } - - return Status; -} - -CSR_API(CsrExitReactos) -{ - if (0 == (Request->Data.ExitReactosRequest.Flags & EWX_INTERNAL_FLAG)) - { - return UserExitReactos((DWORD_PTR) Request->Header.ClientId.UniqueProcess, - Request->Data.ExitReactosRequest.Flags); - } - else - { - return InternalExitReactos((DWORD_PTR) Request->Header.ClientId.UniqueProcess, - (DWORD_PTR) Request->Header.ClientId.UniqueThread, - Request->Data.ExitReactosRequest.Flags); - } -} - -/* EOF */ diff --git a/deprecated/win32csr/file.c b/deprecated/win32csr/file.c deleted file mode 100644 index 638769fad28..00000000000 --- a/deprecated/win32csr/file.c +++ /dev/null @@ -1,586 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: subsys/csrss/win32csr/file.c - * PURPOSE: File handling - * PROGRAMMERS: Pierre Schweitzer (pierre.schweitzer@reactos.org) - * NOTE: Belongs to basesrv.dll - */ - -/* INCLUDES ******************************************************************/ - -#include -#define NDEBUG -#include -#include "file.h" - -/* GLOBALS *******************************************************************/ - -typedef BOOL (WINAPI *PUSER_SOUND_SENTRY)(VOID); -BOOL -WINAPI -FirstSoundSentry(VOID); - -UINT CsrGetTempFileUnique; -LIST_ENTRY DosDeviceHistory; -RTL_CRITICAL_SECTION Win32CsrDefineDosDeviceCritSec; -PUSER_SOUND_SENTRY _UserSoundSentry = FirstSoundSentry; - -/* FUNCTIONS *****************************************************************/ - -BOOL -WINAPI -FailSoundSentry(VOID) -{ - /* In case the function can't be found/is unimplemented */ - return FALSE; -} - -BOOL -WINAPI -FirstSoundSentry(VOID) -{ - UNICODE_STRING DllString = RTL_CONSTANT_STRING(L"winsrv"); - STRING FuncString = RTL_CONSTANT_STRING("_UserSoundSentry"); - HANDLE DllHandle; - NTSTATUS Status; - PUSER_SOUND_SENTRY NewSoundSentry = FailSoundSentry; - - /* Load winsrv manually */ - Status = LdrGetDllHandle(NULL, NULL, &DllString, &DllHandle); - if (NT_SUCCESS(Status)) - { - /* If it was found, get SoundSentry export */ - Status = LdrGetProcedureAddress(DllHandle, - &FuncString, - 0, - (PVOID*)&NewSoundSentry); - } - - /* Set it as the callback for the future, and call it */ - _UserSoundSentry = NewSoundSentry; - return _UserSoundSentry(); -} - -CSR_API(CsrSoundSentry) -{ - /* Call the API and see if it suceeds */ - return _UserSoundSentry() ? STATUS_SUCCESS : STATUS_ACCESS_DENIED; -} - -CSR_API(CsrGetTempFile) -{ - DPRINT("CsrGetTempFile entered\n"); - - /* Return 16-bits ID */ - Request->Data.GetTempFile.UniqueID = (++CsrGetTempFileUnique & 0xFFFF); - - DPRINT("Returning: %u\n", Request->Data.GetTempFile.UniqueID); - - return STATUS_SUCCESS; -} - -CSR_API(CsrDefineDosDevice) -{ - OBJECT_ATTRIBUTES ObjectAttributes; - HANDLE LinkHandle = NULL; - NTSTATUS Status; - UNICODE_STRING DeviceName = {0}; - UNICODE_STRING RequestDeviceName = {0}; - UNICODE_STRING LinkTarget = {0}; - PUNICODE_STRING RequestLinkTarget; - ULONG Length; - SID_IDENTIFIER_AUTHORITY WorldAuthority = {SECURITY_WORLD_SID_AUTHORITY}; - SID_IDENTIFIER_AUTHORITY SystemAuthority = {SECURITY_NT_AUTHORITY}; - PSECURITY_DESCRIPTOR SecurityDescriptor; - PACL Dacl; - PSID AdminSid; - PSID SystemSid; - PSID WorldSid; - ULONG SidLength; - PCSRSS_DOS_DEVICE_HISTORY_ENTRY HistoryEntry; - PLIST_ENTRY Entry; - PLIST_ENTRY ListHead; - BOOLEAN Matched, AddHistory; - DWORD dwFlags; - PWSTR lpBuffer; - - DPRINT("CsrDefineDosDevice entered, Flags:%d, DeviceName:%wZ, TargetName:%wZ\n", - Request->Data.DefineDosDeviceRequest.dwFlags, - &Request->Data.DefineDosDeviceRequest.DeviceName, - &Request->Data.DefineDosDeviceRequest.TargetName); - - Matched = AddHistory = FALSE; - HistoryEntry = NULL; - AdminSid = SystemSid = WorldSid = NULL; - SecurityDescriptor = NULL; - ListHead = &DosDeviceHistory; - dwFlags = Request->Data.DefineDosDeviceRequest.dwFlags; - - /* Validate the flags */ - if ( (dwFlags & 0xFFFFFFF0) || - ((dwFlags & DDD_EXACT_MATCH_ON_REMOVE) && - ! (dwFlags & DDD_REMOVE_DEFINITION)) ) - { - return STATUS_INVALID_PARAMETER; - } - - Status = RtlEnterCriticalSection(&Win32CsrDefineDosDeviceCritSec); - if (! NT_SUCCESS(Status)) - { - DPRINT1("RtlEnterCriticalSection() failed (Status %lx)\n", - Status); - return Status; - } - - _SEH2_TRY - { - Status = - RtlUpcaseUnicodeString(&RequestDeviceName, - &Request->Data.DefineDosDeviceRequest.DeviceName, - TRUE); - if (! NT_SUCCESS(Status)) - _SEH2_LEAVE; - - RequestLinkTarget = - &Request->Data.DefineDosDeviceRequest.TargetName; - lpBuffer = (PWSTR) RtlAllocateHeap(Win32CsrApiHeap, - HEAP_ZERO_MEMORY, - RequestDeviceName.MaximumLength + 5 * sizeof(WCHAR)); - if (! lpBuffer) - { - DPRINT1("Failed to allocate memory\n"); - Status = STATUS_NO_MEMORY; - _SEH2_LEAVE; - } - - swprintf(lpBuffer, - L"\\??\\%wZ", - &RequestDeviceName); - RtlInitUnicodeString(&DeviceName, - lpBuffer); - InitializeObjectAttributes(&ObjectAttributes, - &DeviceName, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - Status = NtOpenSymbolicLinkObject(&LinkHandle, - DELETE | 0x1, - &ObjectAttributes); - if (NT_SUCCESS(Status)) - { - Status = NtQuerySymbolicLinkObject(LinkHandle, - &LinkTarget, - &Length); - if (! NT_SUCCESS(Status) && - Status == STATUS_BUFFER_TOO_SMALL) - { - LinkTarget.Length = 0; - LinkTarget.MaximumLength = Length; - LinkTarget.Buffer = (PWSTR) - RtlAllocateHeap(Win32CsrApiHeap, - HEAP_ZERO_MEMORY, - Length); - if (! LinkTarget.Buffer) - { - DPRINT1("Failed to allocate memory\n"); - Status = STATUS_NO_MEMORY; - _SEH2_LEAVE; - } - - Status = NtQuerySymbolicLinkObject(LinkHandle, - &LinkTarget, - &Length); - } - - if (! NT_SUCCESS(Status)) - { - DPRINT1("NtQuerySymbolicLinkObject(%wZ) failed (Status %lx)\n", - &DeviceName, Status); - _SEH2_LEAVE; - } - - if ((dwFlags & DDD_REMOVE_DEFINITION)) - { - /* If no target name specified we remove the current symlink target */ - if (RequestLinkTarget->Length == 0) - Matched = TRUE; - else - { - if (dwFlags & DDD_EXACT_MATCH_ON_REMOVE) - Matched = ! RtlCompareUnicodeString(RequestLinkTarget, - &LinkTarget, - TRUE); - else - Matched = RtlPrefixUnicodeString(RequestLinkTarget, - &LinkTarget, - TRUE); - } - - if (Matched && IsListEmpty(ListHead)) - { - /* Current symlink target macthed and there is nothing to revert to */ - RequestLinkTarget = NULL; - } - else if (Matched && ! IsListEmpty(ListHead)) - { - /* Fetch the first history entry we come across for the device name */ - /* This will become the current symlink target for the device name */ - Matched = FALSE; - Entry = ListHead->Flink; - while (Entry != ListHead) - { - HistoryEntry = (PCSRSS_DOS_DEVICE_HISTORY_ENTRY) - CONTAINING_RECORD(Entry, - CSRSS_DOS_DEVICE_HISTORY_ENTRY, - Entry); - Matched = - ! RtlCompareUnicodeString(&RequestDeviceName, - &HistoryEntry->Device, - FALSE); - if (Matched) - { - RemoveEntryList(&HistoryEntry->Entry); - RequestLinkTarget = &HistoryEntry->Target; - break; - } - Entry = Entry->Flink; - HistoryEntry = NULL; - } - - /* Nothing to revert to so delete the symlink */ - if (! Matched) - RequestLinkTarget = NULL; - } - else if (! Matched) - { - /* Locate a previous symlink target as we did not get a hit earlier */ - /* If we find one we need to remove it */ - Entry = ListHead->Flink; - while (Entry != ListHead) - { - HistoryEntry = (PCSRSS_DOS_DEVICE_HISTORY_ENTRY) - CONTAINING_RECORD(Entry, - CSRSS_DOS_DEVICE_HISTORY_ENTRY, - Entry); - Matched = - ! RtlCompareUnicodeString(&RequestDeviceName, - &HistoryEntry->Device, - FALSE); - if (! Matched) - { - HistoryEntry = NULL; - Entry = Entry->Flink; - continue; - } - - Matched = FALSE; - if (dwFlags & DDD_EXACT_MATCH_ON_REMOVE) - { - if (! RtlCompareUnicodeString(RequestLinkTarget, - &HistoryEntry->Target, - TRUE)) - { - Matched = TRUE; - } - } - else if (RtlPrefixUnicodeString(RequestLinkTarget, - &HistoryEntry->Target, - TRUE)) - { - Matched = TRUE; - } - - if (Matched) - { - RemoveEntryList(&HistoryEntry->Entry); - break; - } - Entry = Entry->Flink; - HistoryEntry = NULL; - } - - /* Leave existing symlink as is */ - if (! Matched) - Status = STATUS_OBJECT_NAME_NOT_FOUND; - else - Status = STATUS_SUCCESS; - _SEH2_LEAVE; - } - } - else - { - AddHistory = TRUE; - } - - Status = NtMakeTemporaryObject(LinkHandle); - if (! NT_SUCCESS(Status)) - { - DPRINT1("NtMakeTemporaryObject(%wZ) failed (Status %lx)\n", - &DeviceName, Status); - _SEH2_LEAVE; - } - - Status = NtClose(LinkHandle); - LinkHandle = NULL; - if (! NT_SUCCESS(Status)) - { - DPRINT1("NtClose(%wZ) failed (Status %lx)\n", - &DeviceName, Status); - _SEH2_LEAVE; - } - } - - /* Don't create symlink if we don't have a target */ - if (! RequestLinkTarget || RequestLinkTarget->Length == 0) - _SEH2_LEAVE; - - if (AddHistory) - { - HistoryEntry = (PCSRSS_DOS_DEVICE_HISTORY_ENTRY) - RtlAllocateHeap(Win32CsrApiHeap, - HEAP_ZERO_MEMORY, - sizeof(CSRSS_DOS_DEVICE_HISTORY_ENTRY)); - if (! HistoryEntry) - { - DPRINT1("Failed to allocate memory\n"); - Status = STATUS_NO_MEMORY; - _SEH2_LEAVE; - } - - HistoryEntry->Target.Buffer = - RtlAllocateHeap(Win32CsrApiHeap, - HEAP_ZERO_MEMORY, - LinkTarget.Length); - if (! HistoryEntry->Target.Buffer) - { - DPRINT1("Failed to allocate memory\n"); - Status = STATUS_NO_MEMORY; - _SEH2_LEAVE; - } - HistoryEntry->Target.Length = - HistoryEntry->Target.MaximumLength = - LinkTarget.Length; - RtlCopyUnicodeString(&HistoryEntry->Target, - &LinkTarget); - - HistoryEntry->Device.Buffer = - RtlAllocateHeap(Win32CsrApiHeap, - HEAP_ZERO_MEMORY, - RequestDeviceName.Length); - if (! HistoryEntry->Device.Buffer) - { - DPRINT1("Failed to allocate memory\n"); - Status = STATUS_NO_MEMORY; - _SEH2_LEAVE; - } - HistoryEntry->Device.Length = - HistoryEntry->Device.MaximumLength = - RequestDeviceName.Length; - RtlCopyUnicodeString(&HistoryEntry->Device, - &RequestDeviceName); - - /* Remember previous symlink target for this device */ - InsertHeadList(ListHead, - &HistoryEntry->Entry); - HistoryEntry = NULL; - } - - RtlAllocateAndInitializeSid(&WorldAuthority, - 1, - SECURITY_WORLD_RID, - SECURITY_NULL_RID, - SECURITY_NULL_RID, - SECURITY_NULL_RID, - SECURITY_NULL_RID, - SECURITY_NULL_RID, - SECURITY_NULL_RID, - SECURITY_NULL_RID, - &WorldSid); - - RtlAllocateAndInitializeSid(&SystemAuthority, - 1, - SECURITY_LOCAL_SYSTEM_RID, - SECURITY_NULL_RID, - SECURITY_NULL_RID, - SECURITY_NULL_RID, - SECURITY_NULL_RID, - SECURITY_NULL_RID, - SECURITY_NULL_RID, - SECURITY_NULL_RID, - &SystemSid); - - RtlAllocateAndInitializeSid(&SystemAuthority, - 2, - SECURITY_BUILTIN_DOMAIN_RID, - DOMAIN_ALIAS_RID_ADMINS, - SECURITY_NULL_RID, - SECURITY_NULL_RID, - SECURITY_NULL_RID, - SECURITY_NULL_RID, - SECURITY_NULL_RID, - SECURITY_NULL_RID, - &AdminSid); - - SidLength = RtlLengthSid(SystemSid) + - RtlLengthSid(AdminSid) + - RtlLengthSid(WorldSid); - Length = sizeof(ACL) + SidLength + 3 * sizeof(ACCESS_ALLOWED_ACE); - - SecurityDescriptor = RtlAllocateHeap(Win32CsrApiHeap, - 0, - SECURITY_DESCRIPTOR_MIN_LENGTH + Length); - if (! SecurityDescriptor) - { - DPRINT1("Failed to allocate memory\n"); - Status = STATUS_NO_MEMORY; - _SEH2_LEAVE; - } - - Dacl = (PACL)((ULONG_PTR)SecurityDescriptor + SECURITY_DESCRIPTOR_MIN_LENGTH); - Status = RtlCreateSecurityDescriptor(SecurityDescriptor, - SECURITY_DESCRIPTOR_REVISION); - if (! NT_SUCCESS(Status)) - { - DPRINT1("RtlCreateSecurityDescriptor() failed (Status %lx)\n", - Status); - _SEH2_LEAVE; - } - - Status = RtlCreateAcl(Dacl, - Length, - ACL_REVISION); - if (! NT_SUCCESS(Status)) - { - DPRINT1("RtlCreateAcl() failed (Status %lx)\n", - Status); - _SEH2_LEAVE; - } - - (void) RtlAddAccessAllowedAce(Dacl, - ACL_REVISION, - GENERIC_ALL, - SystemSid); - (void) RtlAddAccessAllowedAce(Dacl, - ACL_REVISION, - GENERIC_ALL, - AdminSid); - (void) RtlAddAccessAllowedAce(Dacl, - ACL_REVISION, - STANDARD_RIGHTS_READ, - WorldSid); - - Status = RtlSetDaclSecurityDescriptor(SecurityDescriptor, - TRUE, - Dacl, - FALSE); - if (! NT_SUCCESS(Status)) - { - DPRINT1("RtlSetDaclSecurityDescriptor() failed (Status %lx)\n", - Status); - _SEH2_LEAVE; - } - - InitializeObjectAttributes(&ObjectAttributes, - &DeviceName, - OBJ_CASE_INSENSITIVE, - NULL, - SecurityDescriptor); - Status = NtCreateSymbolicLinkObject(&LinkHandle, - SYMBOLIC_LINK_ALL_ACCESS, - &ObjectAttributes, - RequestLinkTarget); - if (NT_SUCCESS(Status)) - { - Status = NtMakePermanentObject(LinkHandle); - if (! NT_SUCCESS(Status)) - { - DPRINT1("NtMakePermanentObject(%wZ) failed (Status %lx)\n", - &DeviceName, Status); - } - } - else - { - DPRINT1("NtCreateSymbolicLinkObject(%wZ) failed (Status %lx)\n", - &DeviceName, Status); - } - } - _SEH2_FINALLY - { - (void) RtlLeaveCriticalSection(&Win32CsrDefineDosDeviceCritSec); - if (DeviceName.Buffer) - (void) RtlFreeHeap(Win32CsrApiHeap, - 0, - DeviceName.Buffer); - if (LinkTarget.Buffer) - (void) RtlFreeHeap(Win32CsrApiHeap, - 0, - LinkTarget.Buffer); - if (SecurityDescriptor) - (void) RtlFreeHeap(Win32CsrApiHeap, - 0, - SecurityDescriptor); - if (LinkHandle) - (void) NtClose(LinkHandle); - if (SystemSid) - (void) RtlFreeSid(SystemSid); - if (AdminSid) - (void) RtlFreeSid(AdminSid); - if (WorldSid) - (void) RtlFreeSid(WorldSid); - RtlFreeUnicodeString(&RequestDeviceName); - if (HistoryEntry) - { - if (HistoryEntry->Target.Buffer) - (void) RtlFreeHeap(Win32CsrApiHeap, - 0, - HistoryEntry->Target.Buffer); - if (HistoryEntry->Device.Buffer) - (void) RtlFreeHeap(Win32CsrApiHeap, - 0, - HistoryEntry->Device.Buffer); - (void) RtlFreeHeap(Win32CsrApiHeap, - 0, - HistoryEntry); - } - } - _SEH2_END - - DPRINT("CsrDefineDosDevice Exit, Statux: 0x%x\n", Status); - return Status; -} - -void CsrCleanupDefineDosDevice(void) -{ - PLIST_ENTRY Entry, ListHead; - PCSRSS_DOS_DEVICE_HISTORY_ENTRY HistoryEntry; - - (void) RtlDeleteCriticalSection(&Win32CsrDefineDosDeviceCritSec); - - ListHead = &DosDeviceHistory; - Entry = ListHead->Flink; - while (Entry != ListHead) - { - HistoryEntry = (PCSRSS_DOS_DEVICE_HISTORY_ENTRY) - CONTAINING_RECORD(Entry, - CSRSS_DOS_DEVICE_HISTORY_ENTRY, - Entry); - Entry = Entry->Flink; - - if (HistoryEntry) - { - if (HistoryEntry->Target.Buffer) - (void) RtlFreeHeap(Win32CsrApiHeap, - 0, - HistoryEntry->Target.Buffer); - if (HistoryEntry->Device.Buffer) - (void) RtlFreeHeap(Win32CsrApiHeap, - 0, - HistoryEntry->Device.Buffer); - (void) RtlFreeHeap(Win32CsrApiHeap, - 0, - HistoryEntry); - } - } -} -/* EOF */ diff --git a/deprecated/win32csr/file.h b/deprecated/win32csr/file.h deleted file mode 100644 index fa33b62efd2..00000000000 --- a/deprecated/win32csr/file.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: subsystem/win32/csrss/win32csr/file.h - * PURPOSE: File handling - * PROGRAMMERS: Pierre Schweitzer (pierre.schweitzer@reactos.org) - * NOTE: Belongs to basesrv.dll - */ - -#pragma once - -#include "api.h" - -typedef struct tagCSRSS_DOS_DEVICE_HISTORY_ENTRY -{ - UNICODE_STRING Device; - UNICODE_STRING Target; - LIST_ENTRY Entry; -} CSRSS_DOS_DEVICE_HISTORY_ENTRY, *PCSRSS_DOS_DEVICE_HISTORY_ENTRY; - -/* Api functions */ -CSR_API(CsrGetTempFile); -CSR_API(CsrDefineDosDevice); - -/* functions */ -void CsrCleanupDefineDosDevice(); - -/* EOF */ diff --git a/deprecated/win32csr/guiconsole.c b/deprecated/win32csr/guiconsole.c deleted file mode 100644 index 1db2047ccbe..00000000000 --- a/deprecated/win32csr/guiconsole.c +++ /dev/null @@ -1,2362 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: subsys/csrss/win32csr/guiconsole.c - * PURPOSE: Implementation of gui-mode consoles - */ - -/* INCLUDES ******************************************************************/ - -#define NDEBUG -#include "w32csr.h" -#include - -/* Not defined in any header file */ -extern VOID WINAPI PrivateCsrssManualGuiCheck(LONG Check); - -/* GLOBALS *******************************************************************/ - -typedef struct GUI_CONSOLE_DATA_TAG -{ - HFONT Font; - unsigned CharWidth; - unsigned CharHeight; - BOOL CursorBlinkOn; - BOOL ForceCursorOff; - CRITICAL_SECTION Lock; - HMODULE ConsoleLibrary; - HANDLE hGuiInitEvent; - WCHAR FontName[LF_FACESIZE]; - DWORD FontSize; - DWORD FontWeight; - DWORD FullScreen; - DWORD QuickEdit; - DWORD InsertMode; - DWORD WindowPosition; - DWORD UseRasterFonts; - COLORREF ScreenText; - COLORREF ScreenBackground; - COLORREF PopupBackground; - COLORREF PopupText; - COLORREF Colors[16]; - WCHAR szProcessName[MAX_PATH]; - BOOL WindowSizeLock; - POINT OldCursor; -} GUI_CONSOLE_DATA, *PGUI_CONSOLE_DATA; - -#ifndef WM_APP -#define WM_APP 0x8000 -#endif -#define PM_CREATE_CONSOLE (WM_APP + 1) -#define PM_DESTROY_CONSOLE (WM_APP + 2) - -#define CURSOR_BLINK_TIME 500 -#define DEFAULT_ATTRIB (FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED) - -static BOOL ConsInitialized = FALSE; -static HWND NotifyWnd; - -typedef struct _GUICONSOLE_MENUITEM -{ - UINT uID; - const struct _GUICONSOLE_MENUITEM *SubMenu; - WORD wCmdID; -} GUICONSOLE_MENUITEM, *PGUICONSOLE_MENUITEM; - -static const GUICONSOLE_MENUITEM GuiConsoleEditMenuItems[] = -{ - { IDS_MARK, NULL, ID_SYSTEM_EDIT_MARK }, - { IDS_COPY, NULL, ID_SYSTEM_EDIT_COPY }, - { IDS_PASTE, NULL, ID_SYSTEM_EDIT_PASTE }, - { IDS_SELECTALL, NULL, ID_SYSTEM_EDIT_SELECTALL }, - { IDS_SCROLL, NULL, ID_SYSTEM_EDIT_SCROLL }, - { IDS_FIND, NULL, ID_SYSTEM_EDIT_FIND }, - - { 0, NULL, 0 } /* End of list */ -}; - -static const GUICONSOLE_MENUITEM GuiConsoleMainMenuItems[] = -{ - { (UINT)-1, NULL, 0 }, /* Separator */ - { IDS_EDIT, GuiConsoleEditMenuItems, 0 }, - { IDS_DEFAULTS, NULL, ID_SYSTEM_DEFAULTS }, - { IDS_PROPERTIES, NULL, ID_SYSTEM_PROPERTIES }, - - { 0, NULL, 0 } /* End of list */ -}; - -static const COLORREF s_Colors[] = -{ - RGB(0, 0, 0), - RGB(0, 0, 128), - RGB(0, 128, 0), - RGB(0, 128, 128), - RGB(128, 0, 0), - RGB(128, 0, 128), - RGB(128, 128, 0), - RGB(192, 192, 192), - RGB(128, 128, 128), - RGB(0, 0, 255), - RGB(0, 255, 0), - RGB(0, 255, 255), - RGB(255, 0, 0), - RGB(255, 0, 255), - RGB(255, 255, 0), - RGB(255, 255, 255) -}; - -#define GuiConsoleRGBFromAttribute(GuiData, Attribute) ((GuiData)->Colors[(Attribute) & 0xF]) - -/* FUNCTIONS *****************************************************************/ - -static VOID -GuiConsoleAppendMenuItems(HMENU hMenu, - const GUICONSOLE_MENUITEM *Items) -{ - UINT i = 0; - WCHAR szMenuString[255]; - HMENU hSubMenu; - HINSTANCE hInst = GetModuleHandleW(L"win32csr"); - - do - { - if (Items[i].uID != (UINT)-1) - { - if (LoadStringW(hInst, - Items[i].uID, - szMenuString, - sizeof(szMenuString) / sizeof(szMenuString[0])) > 0) - { - if (Items[i].SubMenu != NULL) - { - hSubMenu = CreatePopupMenu(); - if (hSubMenu != NULL) - { - GuiConsoleAppendMenuItems(hSubMenu, - Items[i].SubMenu); - - if (!AppendMenuW(hMenu, - MF_STRING | MF_POPUP, - (UINT_PTR)hSubMenu, - szMenuString)) - { - DestroyMenu(hSubMenu); - } - } - } - else - { - AppendMenuW(hMenu, - MF_STRING, - Items[i].wCmdID, - szMenuString); - } - } - } - else - { - AppendMenuW(hMenu, - MF_SEPARATOR, - 0, - NULL); - } - i++; - } while(!(Items[i].uID == 0 && Items[i].SubMenu == NULL && Items[i].wCmdID == 0)); -} - -static VOID -GuiConsoleCreateSysMenu(PCSRSS_CONSOLE Console) -{ - HMENU hMenu; - hMenu = GetSystemMenu(Console->hWindow, - FALSE); - if (hMenu != NULL) - { - GuiConsoleAppendMenuItems(hMenu, - GuiConsoleMainMenuItems); - DrawMenuBar(Console->hWindow); - } -} - -static VOID -GuiConsoleGetDataPointers(HWND hWnd, PCSRSS_CONSOLE *Console, PGUI_CONSOLE_DATA *GuiData) -{ - *Console = (PCSRSS_CONSOLE) GetWindowLongPtrW(hWnd, GWL_USERDATA); - *GuiData = (NULL == *Console ? NULL : (*Console)->PrivateData); -} - -static BOOL -GuiConsoleOpenUserRegistryPathPerProcessId(DWORD ProcessId, PHANDLE hProcHandle, PHKEY hResult, REGSAM samDesired) -{ - HANDLE hProcessToken = NULL; - HANDLE hProcess; - - BYTE Buffer[256]; - DWORD Length = 0; - UNICODE_STRING SidName; - LONG res; - PTOKEN_USER TokUser; - - hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ | READ_CONTROL, FALSE, ProcessId); - if (!hProcess) - { - DPRINT("Error: OpenProcess failed(0x%x)\n", GetLastError()); - return FALSE; - } - - if (!OpenProcessToken(hProcess, TOKEN_QUERY, &hProcessToken)) - { - DPRINT("Error: OpenProcessToken failed(0x%x)\n", GetLastError()); - CloseHandle(hProcess); - return FALSE; - } - - if (!GetTokenInformation(hProcessToken, TokenUser, (PVOID)Buffer, sizeof(Buffer), &Length)) - { - DPRINT("Error: GetTokenInformation failed(0x%x)\n",GetLastError()); - CloseHandle(hProcessToken); - CloseHandle(hProcess); - return FALSE; - } - - TokUser = ((PTOKEN_USER)Buffer)->User.Sid; - if (!NT_SUCCESS(RtlConvertSidToUnicodeString(&SidName, TokUser, TRUE))) - { - DPRINT("Error: RtlConvertSidToUnicodeString failed(0x%x)\n", GetLastError()); - CloseHandle(hProcessToken); - CloseHandle(hProcess); - return FALSE; - } - - res = RegOpenKeyExW(HKEY_USERS, SidName.Buffer, 0, samDesired, hResult); - RtlFreeUnicodeString(&SidName); - - CloseHandle(hProcessToken); - if (res != ERROR_SUCCESS) - { - CloseHandle(hProcess); - return FALSE; - } - - if (hProcHandle) - *hProcHandle = hProcess; - else - CloseHandle(hProcess); - - return TRUE; -} - -static BOOL -GuiConsoleOpenUserSettings(PGUI_CONSOLE_DATA GuiData, DWORD ProcessId, PHKEY hSubKey, REGSAM samDesired, BOOL bCreate) -{ - WCHAR szProcessName[MAX_PATH]; - WCHAR szBuffer[MAX_PATH]; - UINT fLength, wLength; - DWORD dwBitmask, dwLength; - WCHAR CurDrive[] = { 'A',':', 0 }; - HANDLE hProcess; - HKEY hKey; - WCHAR * ptr; - - /* - * console properties are stored under - * HKCU\Console\* - * - * There are 3 ways to store console properties - * - * 1. use console title as subkey name - * i.e. cmd.exe - * - * 2. use application name as subkey name - * - * 3. use unexpanded path to console application. - * i.e. %SystemRoot%_system32_cmd.exe - */ - - DPRINT("GuiConsoleOpenUserSettings entered\n"); - - if (!GuiConsoleOpenUserRegistryPathPerProcessId(ProcessId, &hProcess, &hKey, samDesired)) - { - DPRINT("GuiConsoleOpenUserRegistryPathPerProcessId failed\n"); - return FALSE; - } - - /* FIXME we do not getting the process name so no menu will be loading, why ?*/ - fLength = GetProcessImageFileNameW(hProcess, szProcessName, sizeof(GuiData->szProcessName) / sizeof(WCHAR)); - CloseHandle(hProcess); - - //DPRINT1("szProcessName3 : %S\n",szProcessName); - - if (!fLength) - { - DPRINT("GetProcessImageFileNameW failed(0x%x)ProcessId %d\n", GetLastError(), ProcessId); - return FALSE; - } - /* - * try the process name as path - */ - - ptr = wcsrchr(szProcessName, L'\\'); - wcscpy(GuiData->szProcessName, ptr); - - swprintf(szBuffer, L"Console%s",ptr); - DPRINT("#1 Path : %S\n", szBuffer); - - if (bCreate) - { - if (RegCreateKeyW(hKey, szBuffer, hSubKey) == ERROR_SUCCESS) - { - RegCloseKey(hKey); - return TRUE; - } - RegCloseKey(hKey); - return FALSE; - } - - if (RegOpenKeyExW(hKey, szBuffer, 0, samDesired, hSubKey) == ERROR_SUCCESS) - { - RegCloseKey(hKey); - return TRUE; - } - - /* - * try the "Shortcut to processname" as path - * FIXME: detect wheter the process was started as a shortcut - */ - - swprintf(szBuffer, L"Console\\Shortcut to %S", ptr); - DPRINT("#2 Path : %S\n", szBuffer); - if (RegOpenKeyExW(hKey, szBuffer, 0, samDesired, hSubKey) == ERROR_SUCCESS) - { - swprintf(GuiData->szProcessName, L"Shortcut to %S", ptr); - RegCloseKey(hKey); - return TRUE; - } - - /* - * if the path contains \\Device\\HarddiskVolume1\... remove it - */ - - if (szProcessName[0] == L'\\') - { - dwBitmask = GetLogicalDrives(); - while(dwBitmask) - { - if (dwBitmask & 0x1) - { - dwLength = QueryDosDeviceW(CurDrive, szBuffer, MAX_PATH); - if (dwLength) - { - if (!memcmp(szBuffer, szProcessName, (dwLength-2)*sizeof(WCHAR))) - { - wcscpy(szProcessName, CurDrive); - RtlMoveMemory(&szProcessName[2], &szProcessName[dwLength-1], fLength - dwLength -1); - break; - } - } - } - dwBitmask = (dwBitmask >> 1); - CurDrive[0]++; - } - } - - /* - * last attempt: check whether the file is under %SystemRoot% - * and use path like Console\%SystemRoot%_dir_dir2_file.exe - */ - - wLength = GetWindowsDirectoryW(szBuffer, MAX_PATH); - if (wLength) - { - if (!wcsncmp(szProcessName, szBuffer, wLength)) - { - /* replace slashes by underscores */ - while((ptr = wcschr(szProcessName, L'\\'))) - ptr[0] = L'_'; - - swprintf(szBuffer, L"Console\\%%SystemRoot%%%S", &szProcessName[wLength]); - DPRINT("#3 Path : %S\n", szBuffer); - if (RegOpenKeyExW(hKey, szBuffer, 0, samDesired, hSubKey) == ERROR_SUCCESS) - { - swprintf(GuiData->szProcessName, L"%%SystemRoot%%%S", &szProcessName[wLength]); - RegCloseKey(hKey); - return TRUE; - } - } - } - RegCloseKey(hKey); - return FALSE; -} - -static VOID -GuiConsoleWriteUserSettings(PCSRSS_CONSOLE Console, PGUI_CONSOLE_DATA GuiData) -{ - HKEY hKey; - PCSR_PROCESS ProcessData; - - if (Console->ProcessList.Flink == &Console->ProcessList) - { - DPRINT("GuiConsoleWriteUserSettings: No Process!!!\n"); - return; - } - ProcessData = CONTAINING_RECORD(Console->ProcessList.Flink, CSR_PROCESS, ConsoleLink); - if (!GuiConsoleOpenUserSettings(GuiData, PtrToUlong(ProcessData->ClientId.UniqueProcess), &hKey, KEY_READ | KEY_WRITE, TRUE)) - { - return; - } - - if (Console->ActiveBuffer->CursorInfo.dwSize <= 1) - { - RegDeleteKeyW(hKey, L"CursorSize"); - } - else - { - RegSetValueExW(hKey, L"CursorSize", 0, REG_DWORD, (const BYTE *)&Console->ActiveBuffer->CursorInfo.dwSize, sizeof(DWORD)); - } - - if (Console->NumberOfHistoryBuffers == 5) - { - RegDeleteKeyW(hKey, L"NumberOfHistoryBuffers"); - } - else - { - DWORD Temp = Console->NumberOfHistoryBuffers; - RegSetValueExW(hKey, L"NumberOfHistoryBuffers", 0, REG_DWORD, (const BYTE *)&Temp, sizeof(DWORD)); - } - - if (Console->HistoryBufferSize == 50) - { - RegDeleteKeyW(hKey, L"HistoryBufferSize"); - } - else - { - DWORD Temp = Console->HistoryBufferSize; - RegSetValueExW(hKey, L"HistoryBufferSize", 0, REG_DWORD, (const BYTE *)&Temp, sizeof(DWORD)); - } - - if (GuiData->FullScreen == FALSE) - { - RegDeleteKeyW(hKey, L"FullScreen"); - } - else - { - RegSetValueExW(hKey, L"FullScreen", 0, REG_DWORD, (const BYTE *)&GuiData->FullScreen, sizeof(DWORD)); - } - - if ( GuiData->QuickEdit == FALSE) - { - RegDeleteKeyW(hKey, L"QuickEdit"); - } - else - { - RegSetValueExW(hKey, L"QuickEdit", 0, REG_DWORD, (const BYTE *)&GuiData->QuickEdit, sizeof(DWORD)); - } - - if (GuiData->InsertMode == TRUE) - { - RegDeleteKeyW(hKey, L"InsertMode"); - } - else - { - RegSetValueExW(hKey, L"InsertMode", 0, REG_DWORD, (const BYTE *)&GuiData->InsertMode, sizeof(DWORD)); - } - - if (Console->HistoryNoDup == FALSE) - { - RegDeleteKeyW(hKey, L"HistoryNoDup"); - } - else - { - DWORD Temp = Console->HistoryNoDup; - RegSetValueExW(hKey, L"HistoryNoDup", 0, REG_DWORD, (const BYTE *)&Temp, sizeof(DWORD)); - } - - if (GuiData->ScreenText == RGB(192, 192, 192)) - { - /* - * MS uses console attributes instead of real color - */ - RegDeleteKeyW(hKey, L"ScreenText"); - } - else - { - RegSetValueExW(hKey, L"ScreenText", 0, REG_DWORD, (const BYTE *)&GuiData->ScreenText, sizeof(COLORREF)); - } - - if (GuiData->ScreenBackground == RGB(0, 0, 0)) - { - RegDeleteKeyW(hKey, L"ScreenBackground"); - } - else - { - RegSetValueExW(hKey, L"ScreenBackground", 0, REG_DWORD, (const BYTE *)&GuiData->ScreenBackground, sizeof(COLORREF)); - } - - RegCloseKey(hKey); -} - -static void -GuiConsoleReadUserSettings(HKEY hKey, PCSRSS_CONSOLE Console, PGUI_CONSOLE_DATA GuiData, PCSRSS_SCREEN_BUFFER Buffer) -{ - DWORD dwNumSubKeys = 0; - DWORD dwIndex; - DWORD dwValueName; - DWORD dwValue; - DWORD dwType; - WCHAR szValueName[MAX_PATH]; - WCHAR szValue[LF_FACESIZE] = L"\0"; - DWORD Value; - - if (RegQueryInfoKey(hKey, NULL, NULL, NULL, NULL, NULL, NULL, &dwNumSubKeys, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) - { - DPRINT("GuiConsoleReadUserSettings: RegQueryInfoKey failed\n"); - return; - } - - DPRINT("GuiConsoleReadUserSettings entered dwNumSubKeys %d\n", dwNumSubKeys); - - for (dwIndex = 0; dwIndex < dwNumSubKeys; dwIndex++) - { - dwValue = sizeof(Value); - dwValueName = MAX_PATH; - - if (RegEnumValueW(hKey, dwIndex, szValueName, &dwValueName, NULL, &dwType, (BYTE*)&Value, &dwValue) != ERROR_SUCCESS) - { - if (dwType == REG_SZ) - { - /* - * retry in case of string value - */ - dwValue = sizeof(szValue); - dwValueName = LF_FACESIZE; - if (RegEnumValueW(hKey, dwIndex, szValueName, &dwValueName, NULL, NULL, (BYTE*)szValue, &dwValue) != ERROR_SUCCESS) - break; - } - else - break; - } - if (!wcscmp(szValueName, L"CursorSize")) - { - if (Value == 0x32) - { - Buffer->CursorInfo.dwSize = Value; - } - else if (Value == 0x64) - { - Buffer->CursorInfo.dwSize = Value; - } - } - else if (!wcscmp(szValueName, L"ScreenText")) - { - GuiData->ScreenText = Value; - } - else if (!wcscmp(szValueName, L"ScreenBackground")) - { - GuiData->ScreenBackground = Value; - } - else if (!wcscmp(szValueName, L"FaceName")) - { - wcscpy(GuiData->FontName, szValue); - } - else if (!wcscmp(szValueName, L"FontSize")) - { - GuiData->FontSize = Value; - } - else if (!wcscmp(szValueName, L"FontWeight")) - { - GuiData->FontWeight = Value; - } - else if (!wcscmp(szValueName, L"HistoryNoDup")) - { - Console->HistoryNoDup = Value; - } - else if (!wcscmp(szValueName, L"WindowSize")) - { - Console->Size.X = LOWORD(Value); - Console->Size.Y = HIWORD(Value); - } - else if (!wcscmp(szValueName, L"ScreenBufferSize")) - { - if(Buffer) - { - Buffer->MaxX = LOWORD(Value); - Buffer->MaxY = HIWORD(Value); - } - } - else if (!wcscmp(szValueName, L"FullScreen")) - { - GuiData->FullScreen = Value; - } - else if (!wcscmp(szValueName, L"QuickEdit")) - { - GuiData->QuickEdit = Value; - } - else if (!wcscmp(szValueName, L"InsertMode")) - { - GuiData->InsertMode = Value; - } - } -} -static VOID -GuiConsoleUseDefaults(PCSRSS_CONSOLE Console, PGUI_CONSOLE_DATA GuiData, PCSRSS_SCREEN_BUFFER Buffer) -{ - /* - * init guidata with default properties - */ - - wcscpy(GuiData->FontName, L"DejaVu Sans Mono"); - GuiData->FontSize = 0x0008000C; // font is 8x12 - GuiData->FontWeight = FW_NORMAL; - GuiData->FullScreen = FALSE; - GuiData->QuickEdit = FALSE; - GuiData->InsertMode = TRUE; - GuiData->ScreenText = RGB(192, 192, 192); - GuiData->ScreenBackground = RGB(0, 0, 0); - GuiData->PopupText = RGB(128, 0, 128); - GuiData->PopupBackground = RGB(255, 255, 255); - GuiData->WindowPosition = UINT_MAX; - GuiData->UseRasterFonts = TRUE; - memcpy(GuiData->Colors, s_Colors, sizeof(s_Colors)); - - Console->HistoryBufferSize = 50; - Console->NumberOfHistoryBuffers = 5; - Console->HistoryNoDup = FALSE; - Console->Size.X = 80; - Console->Size.Y = 25; - - if (Buffer) - { - Buffer->MaxX = 80; - Buffer->MaxY = 300; - Buffer->CursorInfo.bVisible = TRUE; - Buffer->CursorInfo.dwSize = CSR_DEFAULT_CURSOR_SIZE; - } -} - -VOID -FASTCALL -GuiConsoleInitScrollbar(PCSRSS_CONSOLE Console, HWND hwnd) -{ - SCROLLINFO sInfo; - PGUI_CONSOLE_DATA GuiData = Console->PrivateData; - - DWORD Width = Console->Size.X * GuiData->CharWidth + 2 * (GetSystemMetrics(SM_CXFRAME) + GetSystemMetrics(SM_CXEDGE)); - DWORD Height = Console->Size.Y * GuiData->CharHeight + 2 * (GetSystemMetrics(SM_CYFRAME) + GetSystemMetrics(SM_CYEDGE)) + GetSystemMetrics(SM_CYCAPTION); - - /* set scrollbar sizes */ - sInfo.cbSize = sizeof(SCROLLINFO); - sInfo.fMask = SIF_RANGE | SIF_PAGE | SIF_POS; - sInfo.nMin = 0; - if (Console->ActiveBuffer->MaxY > Console->Size.Y) - { - sInfo.nMax = Console->ActiveBuffer->MaxY - 1; - sInfo.nPage = Console->Size.Y; - sInfo.nPos = Console->ActiveBuffer->ShowY; - SetScrollInfo(hwnd, SB_VERT, &sInfo, TRUE); - Width += GetSystemMetrics(SM_CXVSCROLL); - ShowScrollBar(hwnd, SB_VERT, TRUE); - } - else - { - ShowScrollBar(hwnd, SB_VERT, FALSE); - } - - if (Console->ActiveBuffer->MaxX > Console->Size.X) - { - sInfo.nMax = Console->ActiveBuffer->MaxX - 1; - sInfo.nPage = Console->Size.X; - sInfo.nPos = Console->ActiveBuffer->ShowX; - SetScrollInfo(hwnd, SB_HORZ, &sInfo, TRUE); - Height += GetSystemMetrics(SM_CYHSCROLL); - ShowScrollBar(hwnd, SB_HORZ, TRUE); - - } - else - { - ShowScrollBar(hwnd, SB_HORZ, FALSE); - } - - SetWindowPos(hwnd, NULL, 0, 0, Width, Height, - SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE); -} - -static BOOL -GuiConsoleHandleNcCreate(HWND hWnd, CREATESTRUCTW *Create) -{ - PCSRSS_CONSOLE Console = (PCSRSS_CONSOLE) Create->lpCreateParams; - PGUI_CONSOLE_DATA GuiData = (PGUI_CONSOLE_DATA)Console->PrivateData; - HDC Dc; - HFONT OldFont; - TEXTMETRICW Metrics; - SIZE CharSize; - PCSR_PROCESS ProcessData; - HKEY hKey; - - Console->hWindow = hWnd; - - if (NULL == GuiData) - { - DPRINT1("GuiConsoleNcCreate: HeapAlloc failed\n"); - return FALSE; - } - - GuiConsoleUseDefaults(Console, GuiData, Console->ActiveBuffer); - if (Console->ProcessList.Flink != &Console->ProcessList) - { - ProcessData = CONTAINING_RECORD(Console->ProcessList.Flink, CSR_PROCESS, ConsoleLink); - if (GuiConsoleOpenUserSettings(GuiData, PtrToUlong(ProcessData->ClientId.UniqueProcess), &hKey, KEY_READ, FALSE)) - { - GuiConsoleReadUserSettings(hKey, Console, GuiData, Console->ActiveBuffer); - RegCloseKey(hKey); - } - } - - InitializeCriticalSection(&GuiData->Lock); - - GuiData->Font = CreateFontW(LOWORD(GuiData->FontSize), - 0, //HIWORD(GuiData->FontSize), - 0, - TA_BASELINE, - GuiData->FontWeight, - FALSE, - FALSE, - FALSE, - OEM_CHARSET, - OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, - NONANTIALIASED_QUALITY, FIXED_PITCH | FF_DONTCARE, - GuiData->FontName); - if (NULL == GuiData->Font) - { - DPRINT1("GuiConsoleNcCreate: CreateFont failed\n"); - DeleteCriticalSection(&GuiData->Lock); - HeapFree(Win32CsrApiHeap, 0, GuiData); - return FALSE; - } - Dc = GetDC(hWnd); - if (NULL == Dc) - { - DPRINT1("GuiConsoleNcCreate: GetDC failed\n"); - DeleteObject(GuiData->Font); - DeleteCriticalSection(&GuiData->Lock); - HeapFree(Win32CsrApiHeap, 0, GuiData); - return FALSE; - } - OldFont = SelectObject(Dc, GuiData->Font); - if (NULL == OldFont) - { - DPRINT1("GuiConsoleNcCreate: SelectObject failed\n"); - ReleaseDC(hWnd, Dc); - DeleteObject(GuiData->Font); - DeleteCriticalSection(&GuiData->Lock); - HeapFree(Win32CsrApiHeap, 0, GuiData); - return FALSE; - } - if (! GetTextMetricsW(Dc, &Metrics)) - { - DPRINT1("GuiConsoleNcCreate: GetTextMetrics failed\n"); - SelectObject(Dc, OldFont); - ReleaseDC(hWnd, Dc); - DeleteObject(GuiData->Font); - DeleteCriticalSection(&GuiData->Lock); - HeapFree(Win32CsrApiHeap, 0, GuiData); - return FALSE; - } - GuiData->CharWidth = Metrics.tmMaxCharWidth; - GuiData->CharHeight = Metrics.tmHeight + Metrics.tmExternalLeading; - - /* Measure real char width more precisely if possible. */ - if (GetTextExtentPoint32W(Dc, L"R", 1, &CharSize)) - GuiData->CharWidth = CharSize.cx; - - SelectObject(Dc, OldFont); - - ReleaseDC(hWnd, Dc); - GuiData->CursorBlinkOn = TRUE; - GuiData->ForceCursorOff = FALSE; - - DPRINT("Console %p GuiData %p\n", Console, GuiData); - Console->PrivateData = GuiData; - SetWindowLongPtrW(hWnd, GWL_USERDATA, (DWORD_PTR) Console); - - SetTimer(hWnd, CONGUI_UPDATE_TIMER, CONGUI_UPDATE_TIME, NULL); - GuiConsoleCreateSysMenu(Console); - - GuiData->WindowSizeLock = TRUE; - GuiConsoleInitScrollbar(Console, hWnd); - GuiData->WindowSizeLock = FALSE; - - SetEvent(GuiData->hGuiInitEvent); - - return (BOOL) DefWindowProcW(hWnd, WM_NCCREATE, 0, (LPARAM) Create); -} - -static VOID -SmallRectToRect(PCSRSS_CONSOLE Console, PRECT Rect, PSMALL_RECT SmallRect) -{ - PCSRSS_SCREEN_BUFFER Buffer = Console->ActiveBuffer; - PGUI_CONSOLE_DATA GuiData = Console->PrivateData; - Rect->left = (SmallRect->Left - Buffer->ShowX) * GuiData->CharWidth; - Rect->top = (SmallRect->Top - Buffer->ShowY) * GuiData->CharHeight; - Rect->right = (SmallRect->Right + 1 - Buffer->ShowX) * GuiData->CharWidth; - Rect->bottom = (SmallRect->Bottom + 1 - Buffer->ShowY) * GuiData->CharHeight; -} - -static VOID -GuiConsoleUpdateSelection(PCSRSS_CONSOLE Console, PCOORD coord) -{ - RECT oldRect, newRect; - HWND hWnd = Console->hWindow; - - SmallRectToRect(Console, &oldRect, &Console->Selection.srSelection); - - if(coord != NULL) - { - SMALL_RECT rc; - /* exchange left/top with right/bottom if required */ - rc.Left = min(Console->Selection.dwSelectionAnchor.X, coord->X); - rc.Top = min(Console->Selection.dwSelectionAnchor.Y, coord->Y); - rc.Right = max(Console->Selection.dwSelectionAnchor.X, coord->X); - rc.Bottom = max(Console->Selection.dwSelectionAnchor.Y, coord->Y); - - SmallRectToRect(Console, &newRect, &rc); - - if (Console->Selection.dwFlags & CONSOLE_SELECTION_NOT_EMPTY) - { - if (memcmp(&rc, &Console->Selection.srSelection, sizeof(SMALL_RECT)) != 0) - { - HRGN rgn1, rgn2; - - /* calculate the region that needs to be updated */ - if((rgn1 = CreateRectRgnIndirect(&oldRect))) - { - if((rgn2 = CreateRectRgnIndirect(&newRect))) - { - if(CombineRgn(rgn1, rgn2, rgn1, RGN_XOR) != ERROR) - { - InvalidateRgn(hWnd, rgn1, FALSE); - } - - DeleteObject(rgn2); - } - DeleteObject(rgn1); - } - } - } - else - { - InvalidateRect(hWnd, &newRect, FALSE); - } - Console->Selection.dwFlags |= CONSOLE_SELECTION_NOT_EMPTY; - Console->Selection.srSelection = rc; - ConioPause(Console, PAUSED_FROM_SELECTION); - } - else - { - /* clear the selection */ - if (Console->Selection.dwFlags & CONSOLE_SELECTION_NOT_EMPTY) - { - InvalidateRect(hWnd, &oldRect, FALSE); - } - Console->Selection.dwFlags = CONSOLE_NO_SELECTION; - ConioUnpause(Console, PAUSED_FROM_SELECTION); - } -} - - -static VOID -GuiConsolePaint(PCSRSS_CONSOLE Console, - PGUI_CONSOLE_DATA GuiData, - HDC hDC, - PRECT rc) -{ - PCSRSS_SCREEN_BUFFER Buff; - ULONG TopLine, BottomLine, LeftChar, RightChar; - ULONG Line, Char, Start; - PBYTE From; - PWCHAR To; - BYTE LastAttribute, Attribute; - ULONG CursorX, CursorY, CursorHeight; - HBRUSH CursorBrush, OldBrush; - HFONT OldFont; - - Buff = Console->ActiveBuffer; - - EnterCriticalSection(&Buff->Header.Console->Lock); - - TopLine = rc->top / GuiData->CharHeight + Buff->ShowY; - BottomLine = (rc->bottom + (GuiData->CharHeight - 1)) / GuiData->CharHeight - 1 + Buff->ShowY; - LeftChar = rc->left / GuiData->CharWidth + Buff->ShowX; - RightChar = (rc->right + (GuiData->CharWidth - 1)) / GuiData->CharWidth - 1 + Buff->ShowX; - LastAttribute = ConioCoordToPointer(Buff, LeftChar, TopLine)[1]; - - SetTextColor(hDC, GuiConsoleRGBFromAttribute(GuiData, LastAttribute)); - SetBkColor(hDC, GuiConsoleRGBFromAttribute(GuiData, LastAttribute >> 4)); - - if (BottomLine >= Buff->MaxY) BottomLine = Buff->MaxY - 1; - if (RightChar >= Buff->MaxX) RightChar = Buff->MaxX - 1; - - OldFont = SelectObject(hDC, - GuiData->Font); - - for (Line = TopLine; Line <= BottomLine; Line++) - { - WCHAR LineBuffer[80]; - From = ConioCoordToPointer(Buff, LeftChar, Line); - Start = LeftChar; - To = LineBuffer; - - for (Char = LeftChar; Char <= RightChar; Char++) - { - if (*(From + 1) != LastAttribute || (Char - Start == sizeof(LineBuffer) / sizeof(WCHAR))) - { - TextOutW(hDC, - (Start - Buff->ShowX) * GuiData->CharWidth, - (Line - Buff->ShowY) * GuiData->CharHeight, - LineBuffer, - Char - Start); - Start = Char; - To = LineBuffer; - Attribute = *(From + 1); - if (Attribute != LastAttribute) - { - SetTextColor(hDC, GuiConsoleRGBFromAttribute(GuiData, Attribute)); - SetBkColor(hDC, GuiConsoleRGBFromAttribute(GuiData, Attribute >> 4)); - LastAttribute = Attribute; - } - } - - MultiByteToWideChar(Console->OutputCodePage, - 0, - (PCHAR)From, - 1, - To, - 1); - To++; - From += 2; - } - - TextOutW(hDC, - (Start - Buff->ShowX) * GuiData->CharWidth, - (Line - Buff->ShowY) * GuiData->CharHeight, - LineBuffer, - RightChar - Start + 1); - } - - if (Buff->CursorInfo.bVisible && GuiData->CursorBlinkOn && - !GuiData->ForceCursorOff) - { - CursorX = Buff->CurrentX; - CursorY = Buff->CurrentY; - if (LeftChar <= CursorX && CursorX <= RightChar && - TopLine <= CursorY && CursorY <= BottomLine) - { - CursorHeight = ConioEffectiveCursorSize(Console, GuiData->CharHeight); - From = ConioCoordToPointer(Buff, Buff->CurrentX, Buff->CurrentY) + 1; - - if (*From != DEFAULT_ATTRIB) - { - CursorBrush = CreateSolidBrush(GuiConsoleRGBFromAttribute(GuiData, *From)); - } - else - { - CursorBrush = CreateSolidBrush(GuiData->ScreenText); - } - - OldBrush = SelectObject(hDC, - CursorBrush); - PatBlt(hDC, - (CursorX - Buff->ShowX) * GuiData->CharWidth, - (CursorY - Buff->ShowY) * GuiData->CharHeight + (GuiData->CharHeight - CursorHeight), - GuiData->CharWidth, - CursorHeight, - PATCOPY); - SelectObject(hDC, - OldBrush); - DeleteObject(CursorBrush); - } - } - - LeaveCriticalSection(&Buff->Header.Console->Lock); - - SelectObject(hDC, - OldFont); -} - -static VOID -GuiConsoleHandlePaint(HWND hWnd, HDC hDCPaint) -{ - HDC hDC; - PAINTSTRUCT ps; - PCSRSS_CONSOLE Console; - PGUI_CONSOLE_DATA GuiData; - - hDC = BeginPaint(hWnd, &ps); - if (hDC != NULL && - ps.rcPaint.left < ps.rcPaint.right && - ps.rcPaint.top < ps.rcPaint.bottom) - { - GuiConsoleGetDataPointers(hWnd, - &Console, - &GuiData); - if (Console != NULL && GuiData != NULL && - Console->ActiveBuffer != NULL) - { - if (Console->ActiveBuffer->Buffer != NULL) - { - EnterCriticalSection(&GuiData->Lock); - - GuiConsolePaint(Console, - GuiData, - hDC, - &ps.rcPaint); - - if (Console->Selection.dwFlags & CONSOLE_SELECTION_NOT_EMPTY) - { - RECT rc; - SmallRectToRect(Console, &rc, &Console->Selection.srSelection); - - /* invert the selection */ - if (IntersectRect(&rc, - &ps.rcPaint, - &rc)) - { - PatBlt(hDC, - rc.left, - rc.top, - rc.right - rc.left, - rc.bottom - rc.top, - DSTINVERT); - } - } - - LeaveCriticalSection(&GuiData->Lock); - } - } - - } - EndPaint(hWnd, &ps); -} - -static VOID -GuiConsoleHandleKey(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - PCSRSS_CONSOLE Console; - PGUI_CONSOLE_DATA GuiData; - MSG Message; - - GuiConsoleGetDataPointers(hWnd, &Console, &GuiData); - Message.hwnd = hWnd; - Message.message = msg; - Message.wParam = wParam; - Message.lParam = lParam; - - if(msg == WM_CHAR || msg == WM_SYSKEYDOWN) - { - /* clear the selection */ - GuiConsoleUpdateSelection(Console, NULL); - } - - ConioProcessKey(&Message, Console, FALSE); -} - -static VOID WINAPI -GuiDrawRegion(PCSRSS_CONSOLE Console, SMALL_RECT *Region) -{ - RECT RegionRect; - SmallRectToRect(Console, &RegionRect, Region); - InvalidateRect(Console->hWindow, &RegionRect, FALSE); -} - -static VOID -GuiInvalidateCell(PCSRSS_CONSOLE Console, UINT x, UINT y) -{ - SMALL_RECT CellRect = { x, y, x, y }; - GuiDrawRegion(Console, &CellRect); -} - -static VOID WINAPI -GuiWriteStream(PCSRSS_CONSOLE Console, SMALL_RECT *Region, LONG CursorStartX, LONG CursorStartY, - UINT ScrolledLines, CHAR *Buffer, UINT Length) -{ - PGUI_CONSOLE_DATA GuiData = (PGUI_CONSOLE_DATA) Console->PrivateData; - PCSRSS_SCREEN_BUFFER Buff = Console->ActiveBuffer; - LONG CursorEndX, CursorEndY; - RECT ScrollRect; - - if (NULL == Console->hWindow || NULL == GuiData) - { - return; - } - - if (0 != ScrolledLines) - { - ScrollRect.left = 0; - ScrollRect.top = 0; - ScrollRect.right = Console->Size.X * GuiData->CharWidth; - ScrollRect.bottom = Region->Top * GuiData->CharHeight; - - ScrollWindowEx(Console->hWindow, - 0, - -(ScrolledLines * GuiData->CharHeight), - &ScrollRect, - NULL, - NULL, - NULL, - SW_INVALIDATE); - } - - GuiDrawRegion(Console, Region); - - if (CursorStartX < Region->Left || Region->Right < CursorStartX - || CursorStartY < Region->Top || Region->Bottom < CursorStartY) - { - GuiInvalidateCell(Console, CursorStartX, CursorStartY); - } - - CursorEndX = Buff->CurrentX; - CursorEndY = Buff->CurrentY; - if ((CursorEndX < Region->Left || Region->Right < CursorEndX - || CursorEndY < Region->Top || Region->Bottom < CursorEndY) - && (CursorEndX != CursorStartX || CursorEndY != CursorStartY)) - { - GuiInvalidateCell(Console, CursorEndX, CursorEndY); - } - - // Set up the update timer (very short interval) - this is a "hack" for getting the OS to - // repaint the window without having it just freeze up and stay on the screen permanently. - GuiData->CursorBlinkOn = TRUE; - SetTimer(Console->hWindow, CONGUI_UPDATE_TIMER, CONGUI_UPDATE_TIME, NULL); -} - -static BOOL WINAPI -GuiSetCursorInfo(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER Buff) -{ - if (Console->ActiveBuffer == Buff) - { - GuiInvalidateCell(Console, Buff->CurrentX, Buff->CurrentY); - } - - return TRUE; -} - -static BOOL WINAPI -GuiSetScreenInfo(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER Buff, UINT OldCursorX, UINT OldCursorY) -{ - if (Console->ActiveBuffer == Buff) - { - /* Redraw char at old position (removes cursor) */ - GuiInvalidateCell(Console, OldCursorX, OldCursorY); - /* Redraw char at new position (shows cursor) */ - GuiInvalidateCell(Console, Buff->CurrentX, Buff->CurrentY); - } - - return TRUE; -} - -static BOOL WINAPI -GuiUpdateScreenInfo(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER Buff) -{ - PGUI_CONSOLE_DATA GuiData = (PGUI_CONSOLE_DATA) Console->PrivateData; - - if (Console->ActiveBuffer == Buff) - { - GuiData->ScreenText = GuiConsoleRGBFromAttribute(GuiData, Buff->DefaultAttrib); - GuiData->ScreenBackground = GuiConsoleRGBFromAttribute(GuiData, Buff->DefaultAttrib >> 4); - } - - return TRUE; -} - -static VOID -GuiConsoleHandleTimer(HWND hWnd) -{ - PCSRSS_CONSOLE Console; - PGUI_CONSOLE_DATA GuiData; - PCSRSS_SCREEN_BUFFER Buff; - - SetTimer(hWnd, CONGUI_UPDATE_TIMER, CURSOR_BLINK_TIME, NULL); - - GuiConsoleGetDataPointers(hWnd, &Console, &GuiData); - - Buff = Console->ActiveBuffer; - GuiInvalidateCell(Console, Buff->CurrentX, Buff->CurrentY); - GuiData->CursorBlinkOn = ! GuiData->CursorBlinkOn; - - if((GuiData->OldCursor.x != Buff->CurrentX) || (GuiData->OldCursor.y != Buff->CurrentY)) - { - SCROLLINFO xScroll; - int OldScrollX = -1, OldScrollY = -1; - int NewScrollX = -1, NewScrollY = -1; - - xScroll.cbSize = sizeof(SCROLLINFO); - xScroll.fMask = SIF_POS; - // Capture the original position of the scroll bars and save them. - if(GetScrollInfo(hWnd, SB_HORZ, &xScroll))OldScrollX = xScroll.nPos; - if(GetScrollInfo(hWnd, SB_VERT, &xScroll))OldScrollY = xScroll.nPos; - - // If we successfully got the info for the horizontal scrollbar - if(OldScrollX >= 0) - { - if((Buff->CurrentX < Buff->ShowX)||(Buff->CurrentX >= (Buff->ShowX + Console->Size.X))) - { - // Handle the horizontal scroll bar - if(Buff->CurrentX >= Console->Size.X) NewScrollX = Buff->CurrentX - Console->Size.X + 1; - else NewScrollX = 0; - } - else - { - NewScrollX = OldScrollX; - } - } - // If we successfully got the info for the vertical scrollbar - if(OldScrollY >= 0) - { - if((Buff->CurrentY < Buff->ShowY) || (Buff->CurrentY >= (Buff->ShowY + Console->Size.Y))) - { - // Handle the vertical scroll bar - if(Buff->CurrentY >= Console->Size.Y) NewScrollY = Buff->CurrentY - Console->Size.Y + 1; - else NewScrollY = 0; - } - else - { - NewScrollY = OldScrollY; - } - } - - // Adjust scroll bars and refresh the window if the cursor has moved outside the visible area - // NOTE: OldScroll# and NewScroll# will both be -1 (initial value) if the info for the respective scrollbar - // was not obtained successfully in the previous steps. This means their difference is 0 (no scrolling) - // and their associated scrollbar is left alone. - if((OldScrollX != NewScrollX) || (OldScrollY != NewScrollY)) - { - Buff->ShowX = NewScrollX; - Buff->ShowY = NewScrollY; - ScrollWindowEx(hWnd, - (OldScrollX - NewScrollX) * GuiData->CharWidth, - (OldScrollY - NewScrollY) * GuiData->CharHeight, - NULL, - NULL, - NULL, - NULL, - SW_INVALIDATE); - if(NewScrollX >= 0) - { - xScroll.nPos = NewScrollX; - SetScrollInfo(hWnd, SB_HORZ, &xScroll, TRUE); - } - if(NewScrollY >= 0) - { - xScroll.nPos = NewScrollY; - SetScrollInfo(hWnd, SB_VERT, &xScroll, TRUE); - } - UpdateWindow(hWnd); - GuiData->OldCursor.x = Buff->CurrentX; - GuiData->OldCursor.y = Buff->CurrentY; - } - } -} - -static VOID -GuiConsoleHandleClose(HWND hWnd) -{ - PCSRSS_CONSOLE Console; - PGUI_CONSOLE_DATA GuiData; - PLIST_ENTRY current_entry; - PCSR_PROCESS current; - - GuiConsoleGetDataPointers(hWnd, &Console, &GuiData); - - EnterCriticalSection(&Console->Lock); - - current_entry = Console->ProcessList.Flink; - while (current_entry != &Console->ProcessList) - { - current = CONTAINING_RECORD(current_entry, CSR_PROCESS, ConsoleLink); - current_entry = current_entry->Flink; - - /* FIXME: Windows will wait up to 5 seconds for the thread to exit. - * We shouldn't wait here, though, since the console lock is entered. - * A copy of the thread list probably needs to be made. */ - ConioConsoleCtrlEvent(CTRL_CLOSE_EVENT, current); - } - - LeaveCriticalSection(&Console->Lock); -} - -static VOID -GuiConsoleHandleNcDestroy(HWND hWnd) -{ - PCSRSS_CONSOLE Console; - PGUI_CONSOLE_DATA GuiData; - - - GuiConsoleGetDataPointers(hWnd, &Console, &GuiData); - KillTimer(hWnd, 1); - Console->PrivateData = NULL; - DeleteCriticalSection(&GuiData->Lock); - GetSystemMenu(hWnd, TRUE); - if (GuiData->ConsoleLibrary) - FreeLibrary(GuiData->ConsoleLibrary); - - HeapFree(Win32CsrApiHeap, 0, GuiData); -} - -static COORD -PointToCoord(PCSRSS_CONSOLE Console, LPARAM lParam) -{ - PCSRSS_SCREEN_BUFFER Buffer = Console->ActiveBuffer; - PGUI_CONSOLE_DATA GuiData = Console->PrivateData; - COORD Coord; - Coord.X = Buffer->ShowX + ((short)LOWORD(lParam) / (int)GuiData->CharWidth); - Coord.Y = Buffer->ShowY + ((short)HIWORD(lParam) / (int)GuiData->CharHeight); - - /* Clip coordinate to ensure it's inside buffer */ - if (Coord.X < 0) Coord.X = 0; - else if (Coord.X >= Buffer->MaxX) Coord.X = Buffer->MaxX - 1; - if (Coord.Y < 0) Coord.Y = 0; - else if (Coord.Y >= Buffer->MaxY) Coord.Y = Buffer->MaxY - 1; - return Coord; -} - -static VOID -GuiConsoleLeftMouseDown(HWND hWnd, LPARAM lParam) -{ - PCSRSS_CONSOLE Console; - PGUI_CONSOLE_DATA GuiData; - - GuiConsoleGetDataPointers(hWnd, &Console, &GuiData); - if (Console == NULL || GuiData == NULL) return; - - Console->Selection.dwSelectionAnchor = PointToCoord(Console, lParam); - - SetCapture(hWnd); - - Console->Selection.dwFlags |= CONSOLE_SELECTION_IN_PROGRESS | CONSOLE_MOUSE_SELECTION | CONSOLE_MOUSE_DOWN; - - GuiConsoleUpdateSelection(Console, &Console->Selection.dwSelectionAnchor); -} - -static VOID -GuiConsoleLeftMouseUp(HWND hWnd, LPARAM lParam) -{ - PCSRSS_CONSOLE Console; - PGUI_CONSOLE_DATA GuiData; - COORD c; - - GuiConsoleGetDataPointers(hWnd, &Console, &GuiData); - if (Console == NULL || GuiData == NULL) return; - if (!(Console->Selection.dwFlags & CONSOLE_MOUSE_DOWN)) return; - - c = PointToCoord(Console, lParam); - - Console->Selection.dwFlags &= ~CONSOLE_MOUSE_DOWN; - - GuiConsoleUpdateSelection(Console, &c); - - ReleaseCapture(); -} - -static VOID -GuiConsoleMouseMove(HWND hWnd, WPARAM wParam, LPARAM lParam) -{ - PCSRSS_CONSOLE Console; - PGUI_CONSOLE_DATA GuiData; - COORD c; - - if (!(wParam & MK_LBUTTON)) return; - - GuiConsoleGetDataPointers(hWnd, &Console, &GuiData); - if (Console == NULL || GuiData == NULL) return; - if (!(Console->Selection.dwFlags & CONSOLE_MOUSE_DOWN)) return; - - c = PointToCoord(Console, lParam); /* TODO: Scroll buffer to bring c into view */ - - GuiConsoleUpdateSelection(Console, &c); -} - -static VOID -GuiConsoleCopy(HWND hWnd, PCSRSS_CONSOLE Console) -{ - if (OpenClipboard(hWnd) == TRUE) - { - HANDLE hData; - PBYTE ptr; - LPSTR data, dstPos; - ULONG selWidth, selHeight; - ULONG xPos, yPos, size; - - selWidth = Console->Selection.srSelection.Right - Console->Selection.srSelection.Left + 1; - selHeight = Console->Selection.srSelection.Bottom - Console->Selection.srSelection.Top + 1; - DPRINT("Selection is (%d|%d) to (%d|%d)\n", - Console->Selection.srSelection.Left, - Console->Selection.srSelection.Top, - Console->Selection.srSelection.Right, - Console->Selection.srSelection.Bottom); - - /* Basic size for one line and termination */ - size = selWidth + 1; - if (selHeight > 0) - { - /* Multiple line selections have to get \r\n appended */ - size += ((selWidth + 2) * (selHeight - 1)); - } - - /* Allocate memory, it will be passed to the system and may not be freed here */ - hData = GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, size); - if (hData == NULL) - { - CloseClipboard(); - return; - } - data = GlobalLock(hData); - if (data == NULL) - { - CloseClipboard(); - return; - } - - DPRINT("Copying %dx%d selection\n", selWidth, selHeight); - dstPos = data; - - for (yPos = 0; yPos < selHeight; yPos++) - { - ptr = ConioCoordToPointer(Console->ActiveBuffer, - Console->Selection.srSelection.Left, - yPos + Console->Selection.srSelection.Top); - /* Copy only the characters, leave attributes alone */ - for (xPos = 0; xPos < selWidth; xPos++) - { - dstPos[xPos] = ptr[xPos * 2]; - } - dstPos += selWidth; - if (yPos != (selHeight - 1)) - { - strcat(data, "\r\n"); - dstPos += 2; - } - } - - DPRINT("Setting data <%s> to clipboard\n", data); - GlobalUnlock(hData); - - EmptyClipboard(); - SetClipboardData(CF_TEXT, hData); - CloseClipboard(); - } -} - -static VOID -GuiConsolePaste(HWND hWnd, PCSRSS_CONSOLE Console) -{ - if (OpenClipboard(hWnd) == TRUE) - { - HANDLE hData; - LPSTR str; - size_t len; - - hData = GetClipboardData(CF_TEXT); - if (hData == NULL) - { - CloseClipboard(); - return; - } - - str = GlobalLock(hData); - if (str == NULL) - { - CloseClipboard(); - return; - } - DPRINT("Got data <%s> from clipboard\n", str); - len = strlen(str); - - ConioWriteConsole(Console, Console->ActiveBuffer, str, len, TRUE); - - GlobalUnlock(hData); - CloseClipboard(); - } -} - -static VOID -GuiConsoleRightMouseDown(HWND hWnd) -{ - PCSRSS_CONSOLE Console; - PGUI_CONSOLE_DATA GuiData; - - GuiConsoleGetDataPointers(hWnd, &Console, &GuiData); - if (Console == NULL || GuiData == NULL) return; - - if (!(Console->Selection.dwFlags & CONSOLE_SELECTION_NOT_EMPTY)) - { - GuiConsolePaste(hWnd, Console); - } - else - { - GuiConsoleCopy(hWnd, Console); - - /* Clear the selection */ - GuiConsoleUpdateSelection(Console, NULL); - } - -} - - -static VOID -GuiConsoleShowConsoleProperties(HWND hWnd, BOOL Defaults, PGUI_CONSOLE_DATA GuiData) -{ - PCSRSS_CONSOLE Console; - APPLET_PROC CPLFunc; - TCHAR szBuffer[MAX_PATH]; - ConsoleInfo SharedInfo; - - DPRINT("GuiConsoleShowConsoleProperties entered\n"); - - GuiConsoleGetDataPointers(hWnd, &Console, &GuiData); - - if (GuiData == NULL) - { - DPRINT("GuiConsoleGetDataPointers failed\n"); - return; - } - - if (GuiData->ConsoleLibrary == NULL) - { - GetWindowsDirectory(szBuffer,MAX_PATH); - _tcscat(szBuffer, _T("\\system32\\console.dll")); - GuiData->ConsoleLibrary = LoadLibrary(szBuffer); - - if (GuiData->ConsoleLibrary == NULL) - { - DPRINT1("failed to load console.dll"); - return; - } - } - - CPLFunc = (APPLET_PROC) GetProcAddress(GuiData->ConsoleLibrary, _T("CPlApplet")); - if (!CPLFunc) - { - DPRINT("Error: Console.dll misses CPlApplet export\n"); - return; - } - - /* setup struct */ - SharedInfo.InsertMode = GuiData->InsertMode; - SharedInfo.HistoryBufferSize = Console->HistoryBufferSize; - SharedInfo.NumberOfHistoryBuffers = Console->NumberOfHistoryBuffers; - SharedInfo.ScreenText = GuiData->ScreenText; - SharedInfo.ScreenBackground = GuiData->ScreenBackground; - SharedInfo.PopupText = GuiData->PopupText; - SharedInfo.PopupBackground = GuiData->PopupBackground; - SharedInfo.WindowSize = (DWORD)MAKELONG(Console->Size.X, Console->Size.Y); - SharedInfo.WindowPosition = GuiData->WindowPosition; - SharedInfo.ScreenBuffer = (DWORD)MAKELONG(Console->ActiveBuffer->MaxX, Console->ActiveBuffer->MaxY); - SharedInfo.UseRasterFonts = GuiData->UseRasterFonts; - SharedInfo.FontSize = (DWORD)GuiData->FontSize; - SharedInfo.FontWeight = GuiData->FontWeight; - SharedInfo.CursorSize = Console->ActiveBuffer->CursorInfo.dwSize; - SharedInfo.HistoryNoDup = Console->HistoryNoDup; - SharedInfo.FullScreen = GuiData->FullScreen; - SharedInfo.QuickEdit = GuiData->QuickEdit; - memcpy(&SharedInfo.Colors[0], GuiData->Colors, sizeof(s_Colors)); - - if (!CPLFunc(hWnd, CPL_INIT, 0, 0)) - { - DPRINT("Error: failed to initialize console.dll\n"); - return; - } - - if (CPLFunc(hWnd, CPL_GETCOUNT, 0, 0) != 1) - { - DPRINT("Error: console.dll returned unexpected CPL count\n"); - return; - } - - CPLFunc(hWnd, CPL_DBLCLK, (LPARAM)&SharedInfo, Defaults); -} -static LRESULT -GuiConsoleHandleSysMenuCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) -{ - LRESULT Ret = TRUE; - PCSRSS_CONSOLE Console; - PGUI_CONSOLE_DATA GuiData; - COORD bottomRight = { 0, 0 }; - - GuiConsoleGetDataPointers(hWnd, &Console, &GuiData); - - switch(wParam) - { - case ID_SYSTEM_EDIT_MARK: - DPRINT1("Marking not handled yet\n"); - break; - - case ID_SYSTEM_EDIT_COPY: - GuiConsoleCopy(hWnd, Console); - break; - - case ID_SYSTEM_EDIT_PASTE: - GuiConsolePaste(hWnd, Console); - break; - - case ID_SYSTEM_EDIT_SELECTALL: - bottomRight.X = Console->Size.X - 1; - bottomRight.Y = Console->Size.Y - 1; - GuiConsoleUpdateSelection(Console, &bottomRight); - break; - - case ID_SYSTEM_EDIT_SCROLL: - DPRINT1("Scrolling is not handled yet\n"); - break; - - case ID_SYSTEM_EDIT_FIND: - DPRINT1("Finding is not handled yet\n"); - break; - - case ID_SYSTEM_DEFAULTS: - GuiConsoleShowConsoleProperties(hWnd, TRUE, GuiData); - break; - - case ID_SYSTEM_PROPERTIES: - GuiConsoleShowConsoleProperties(hWnd, FALSE, GuiData); - break; - - default: - Ret = DefWindowProcW(hWnd, WM_SYSCOMMAND, wParam, lParam); - break; - } - return Ret; -} - -static VOID -GuiConsoleGetMinMaxInfo(HWND hWnd, PMINMAXINFO minMaxInfo) -{ - PCSRSS_CONSOLE Console; - PGUI_CONSOLE_DATA GuiData; - DWORD windx, windy; - - GuiConsoleGetDataPointers(hWnd, &Console, &GuiData); - if((Console == NULL)|| (GuiData == NULL)) return; - - windx = CONGUI_MIN_WIDTH * GuiData->CharWidth + 2 * (GetSystemMetrics(SM_CXFRAME) + GetSystemMetrics(SM_CXEDGE)); - windy = CONGUI_MIN_HEIGHT * GuiData->CharHeight + 2 * (GetSystemMetrics(SM_CYFRAME) + GetSystemMetrics(SM_CYEDGE)) + GetSystemMetrics(SM_CYCAPTION); - - minMaxInfo->ptMinTrackSize.x = windx; - minMaxInfo->ptMinTrackSize.y = windy; - - windx = (Console->ActiveBuffer->MaxX) * GuiData->CharWidth + 2 * (GetSystemMetrics(SM_CXFRAME) + GetSystemMetrics(SM_CXEDGE)); - windy = (Console->ActiveBuffer->MaxY) * GuiData->CharHeight + 2 * (GetSystemMetrics(SM_CYFRAME) + GetSystemMetrics(SM_CYEDGE)) + GetSystemMetrics(SM_CYCAPTION); - - if(Console->Size.X < Console->ActiveBuffer->MaxX) windy += GetSystemMetrics(SM_CYHSCROLL); // window currently has a horizontal scrollbar - if(Console->Size.Y < Console->ActiveBuffer->MaxY) windx += GetSystemMetrics(SM_CXVSCROLL); // window currently has a vertical scrollbar - - minMaxInfo->ptMaxTrackSize.x = windx; - minMaxInfo->ptMaxTrackSize.y = windy; -} -static VOID -GuiConsoleResize(HWND hWnd, WPARAM wParam, LPARAM lParam) -{ - PCSRSS_CONSOLE Console; - PGUI_CONSOLE_DATA GuiData; - GuiConsoleGetDataPointers(hWnd, &Console, &GuiData); - if((Console == NULL) || (GuiData == NULL)) return; - - if ((GuiData->WindowSizeLock == FALSE) && (wParam == SIZE_RESTORED || wParam == SIZE_MAXIMIZED || wParam == SIZE_MINIMIZED)) - { - PCSRSS_SCREEN_BUFFER Buff = Console->ActiveBuffer; - DWORD windx, windy, charx, chary; - - GuiData->WindowSizeLock = TRUE; - - windx = LOWORD(lParam); - windy = HIWORD(lParam); - - // Compensate for existing scroll bars (because lParam values do not accommodate scroll bar) - if(Console->Size.X < Buff->MaxX) windy += GetSystemMetrics(SM_CYHSCROLL); // window currently has a horizontal scrollbar - if(Console->Size.Y < Buff->MaxY) windx += GetSystemMetrics(SM_CXVSCROLL); // window currently has a vertical scrollbar - - charx = windx / GuiData->CharWidth; - chary = windy / GuiData->CharHeight; - - // Character alignment (round size up or down) - if((windx % GuiData->CharWidth) >= (GuiData->CharWidth / 2)) ++charx; - if((windy % GuiData->CharHeight) >= (GuiData->CharHeight / 2)) ++chary; - - // Compensate for added scroll bars in new window - if(charx < Buff->MaxX)windy -= GetSystemMetrics(SM_CYHSCROLL); // new window will have a horizontal scroll bar - if(chary < Buff->MaxY)windx -= GetSystemMetrics(SM_CXVSCROLL); // new window will have a vertical scroll bar - - charx = windx / GuiData->CharWidth; - chary = windy / GuiData->CharHeight; - - // Character alignment (round size up or down) - if((windx % GuiData->CharWidth) >= (GuiData->CharWidth / 2)) ++charx; - if((windy % GuiData->CharHeight) >= (GuiData->CharHeight / 2)) ++chary; - - // Resize window - if((charx != Console->Size.X) || (chary != Console->Size.Y)) - { - Console->Size.X = (charx <= Buff->MaxX) ? charx : Buff->MaxX; - Console->Size.Y = (chary <= Buff->MaxY) ? chary : Buff->MaxY; - } - - GuiConsoleInitScrollbar(Console, hWnd); - - // Adjust the start of the visible area if we are attempting to show nonexistent areas - if((Buff->MaxX - Buff->ShowX) < Console->Size.X) Buff->ShowX = Buff->MaxX - Console->Size.X; - if((Buff->MaxY - Buff->ShowY) < Console->Size.Y) Buff->ShowY = Buff->MaxY - Console->Size.Y; - InvalidateRect(hWnd, NULL, TRUE); - - GuiData->WindowSizeLock = FALSE; - } -} - -VOID -FASTCALL -GuiConsoleHandleScrollbarMenu(VOID) -{ - HMENU hMenu; - - hMenu = CreatePopupMenu(); - if (hMenu == NULL) - { - DPRINT("CreatePopupMenu failed\n"); - return; - } - //InsertItem(hMenu, MIIM_STRING, MIIM_ID | MIIM_FTYPE | MIIM_STRING, 0, NULL, IDS_SCROLLHERE); - //InsertItem(hMenu, MFT_SEPARATOR, MIIM_FTYPE, 0, NULL, -1); - //InsertItem(hMenu, MIIM_STRING, MIIM_ID | MIIM_FTYPE | MIIM_STRING, 0, NULL, IDS_SCROLLTOP); - //InsertItem(hMenu, MIIM_STRING, MIIM_ID | MIIM_FTYPE | MIIM_STRING, 0, NULL, IDS_SCROLLBOTTOM); - //InsertItem(hMenu, MFT_SEPARATOR, MIIM_FTYPE, 0, NULL, -1); - //InsertItem(hMenu, MIIM_STRING, MIIM_ID | MIIM_FTYPE | MIIM_STRING, 0, NULL, IDS_SCROLLPAGE_UP); - //InsertItem(hMenu, MIIM_STRING, MIIM_ID | MIIM_FTYPE | MIIM_STRING, 0, NULL, IDS_SCROLLPAGE_DOWN); - //InsertItem(hMenu, MFT_SEPARATOR, MIIM_FTYPE, 0, NULL, -1); - //InsertItem(hMenu, MIIM_STRING, MIIM_ID | MIIM_FTYPE | MIIM_STRING, 0, NULL, IDS_SCROLLUP); - //InsertItem(hMenu, MIIM_STRING, MIIM_ID | MIIM_FTYPE | MIIM_STRING, 0, NULL, IDS_SCROLLDOWN); - -} - -static NTSTATUS WINAPI -GuiResizeBuffer(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER ScreenBuffer, COORD Size) -{ - BYTE * Buffer; - DWORD Offset = 0; - BYTE * OldPtr; - USHORT CurrentY; - BYTE * OldBuffer; -#if HAVE_WMEMSET - USHORT value = MAKEWORD(' ', ScreenBuffer->DefaultAttrib); -#endif - DWORD diff; - DWORD i; - - /* Buffer size is not allowed to be smaller than window size */ - if (Size.X < Console->Size.X || Size.Y < Console->Size.Y) - return STATUS_INVALID_PARAMETER; - - if (Size.X == ScreenBuffer->MaxX && Size.Y == ScreenBuffer->MaxY) - return STATUS_SUCCESS; - - Buffer = HeapAlloc(Win32CsrApiHeap, 0, Size.X * Size.Y * 2); - if (!Buffer) - return STATUS_NO_MEMORY; - - DPRINT1("Resizing (%d,%d) to (%d,%d)\n", ScreenBuffer->MaxX, ScreenBuffer->MaxY, Size.X, Size.Y); - OldBuffer = ScreenBuffer->Buffer; - - for (CurrentY = 0; CurrentY < ScreenBuffer->MaxY && CurrentY < Size.Y; CurrentY++) - { - OldPtr = ConioCoordToPointer(ScreenBuffer, 0, CurrentY); - if (Size.X <= ScreenBuffer->MaxX) - { - /* reduce size */ - RtlCopyMemory(&Buffer[Offset], OldPtr, Size.X * 2); - Offset += (Size.X * 2); - } - else - { - /* enlarge size */ - RtlCopyMemory(&Buffer[Offset], OldPtr, ScreenBuffer->MaxX * 2); - Offset += (ScreenBuffer->MaxX * 2); - - diff = Size.X - ScreenBuffer->MaxX; - /* zero new part of it */ -#if HAVE_WMEMSET - wmemset((WCHAR*)&Buffer[Offset], value, diff); -#else - for (i = 0; i < diff; i++) - { - Buffer[Offset++] = ' '; - Buffer[Offset++] = ScreenBuffer->DefaultAttrib; - } -#endif - } - } - - if (Size.Y > ScreenBuffer->MaxY) - { - diff = Size.X * (Size.Y - ScreenBuffer->MaxY); -#if HAVE_WMEMSET - wmemset((WCHAR*)&Buffer[Offset], value, diff); -#else - for (i = 0; i < diff; i++) - { - Buffer[Offset++] = ' '; - Buffer[Offset++] = ScreenBuffer->DefaultAttrib; - } -#endif - } - - (void)InterlockedExchangePointer((PVOID volatile *)&ScreenBuffer->Buffer, Buffer); - HeapFree(Win32CsrApiHeap, 0, OldBuffer); - ScreenBuffer->MaxX = Size.X; - ScreenBuffer->MaxY = Size.Y; - ScreenBuffer->VirtualY = 0; - - /* Ensure cursor and window are within buffer */ - if (ScreenBuffer->CurrentX >= Size.X) - ScreenBuffer->CurrentX = Size.X - 1; - if (ScreenBuffer->CurrentY >= Size.Y) - ScreenBuffer->CurrentY = Size.Y - 1; - if (ScreenBuffer->ShowX > Size.X - Console->Size.X) - ScreenBuffer->ShowX = Size.X - Console->Size.X; - if (ScreenBuffer->ShowY > Size.Y - Console->Size.Y) - ScreenBuffer->ShowY = Size.Y - Console->Size.Y; - - /* TODO: Should update scrollbar, but can't use anything that - * calls SendMessage or it could cause deadlock */ - - return STATUS_SUCCESS; -} - -static VOID -GuiApplyUserSettings(PCSRSS_CONSOLE Console, PGUI_CONSOLE_DATA GuiData, PConsoleInfo pConInfo) -{ - DWORD windx, windy; - PCSRSS_SCREEN_BUFFER ActiveBuffer = Console->ActiveBuffer; - COORD BufSize; - BOOL SizeChanged = FALSE; - - EnterCriticalSection(&Console->Lock); - - /* apply text / background color */ - GuiData->ScreenText = pConInfo->ScreenText; - GuiData->ScreenBackground = pConInfo->ScreenBackground; - - /* apply cursor size */ - ActiveBuffer->CursorInfo.dwSize = min(max(pConInfo->CursorSize, 1), 100); - - windx = LOWORD(pConInfo->WindowSize); - windy = HIWORD(pConInfo->WindowSize); - - if (windx != Console->Size.X || windy != Console->Size.Y) - { - /* resize window */ - Console->Size.X = windx; - Console->Size.Y = windy; - SizeChanged = TRUE; - } - - BufSize.X = LOWORD(pConInfo->ScreenBuffer); - BufSize.Y = HIWORD(pConInfo->ScreenBuffer); - if (BufSize.X != ActiveBuffer->MaxX || BufSize.Y != ActiveBuffer->MaxY) - { - if (NT_SUCCESS(GuiResizeBuffer(Console, ActiveBuffer, BufSize))) - SizeChanged = TRUE; - } - - if (SizeChanged) - { - GuiData->WindowSizeLock = TRUE; - GuiConsoleInitScrollbar(Console, pConInfo->hConsoleWindow); - GuiData->WindowSizeLock = FALSE; - } - - LeaveCriticalSection(&Console->Lock); - InvalidateRect(pConInfo->hConsoleWindow, NULL, TRUE); -} - -static -LRESULT -GuiConsoleHandleScroll(HWND hwnd, UINT uMsg, WPARAM wParam) -{ - PCSRSS_CONSOLE Console; - PCSRSS_SCREEN_BUFFER Buff; - PGUI_CONSOLE_DATA GuiData; - SCROLLINFO sInfo; - int fnBar; - int old_pos, Maximum; - PUSHORT pShowXY; - - GuiConsoleGetDataPointers(hwnd, &Console, &GuiData); - if (Console == NULL || GuiData == NULL) - return FALSE; - Buff = Console->ActiveBuffer; - - if (uMsg == WM_HSCROLL) - { - fnBar = SB_HORZ; - Maximum = Buff->MaxX - Console->Size.X; - pShowXY = &Buff->ShowX; - } - else - { - fnBar = SB_VERT; - Maximum = Buff->MaxY - Console->Size.Y; - pShowXY = &Buff->ShowY; - } - - /* set scrollbar sizes */ - sInfo.cbSize = sizeof(SCROLLINFO); - sInfo.fMask = SIF_RANGE | SIF_POS | SIF_PAGE | SIF_TRACKPOS; - - if (!GetScrollInfo(hwnd, fnBar, &sInfo)) - { - return FALSE; - } - - old_pos = sInfo.nPos; - - switch(LOWORD(wParam)) - { - case SB_LINELEFT: - sInfo.nPos -= 1; - break; - - case SB_LINERIGHT: - sInfo.nPos += 1; - break; - - case SB_PAGELEFT: - sInfo.nPos -= sInfo.nPage; - break; - - case SB_PAGERIGHT: - sInfo.nPos += sInfo.nPage; - break; - - case SB_THUMBTRACK: - sInfo.nPos = sInfo.nTrackPos; - ConioPause(Console, PAUSED_FROM_SCROLLBAR); - break; - - case SB_THUMBPOSITION: - ConioUnpause(Console, PAUSED_FROM_SCROLLBAR); - break; - - case SB_TOP: - sInfo.nPos = sInfo.nMin; - break; - - case SB_BOTTOM: - sInfo.nPos = sInfo.nMax; - break; - - default: - break; - } - - sInfo.nPos = max(sInfo.nPos, 0); - sInfo.nPos = min(sInfo.nPos, Maximum); - - if (old_pos != sInfo.nPos) - { - USHORT OldX = Buff->ShowX; - USHORT OldY = Buff->ShowY; - *pShowXY = sInfo.nPos; - - ScrollWindowEx(hwnd, - (OldX - Buff->ShowX) * GuiData->CharWidth, - (OldY - Buff->ShowY) * GuiData->CharHeight, - NULL, - NULL, - NULL, - NULL, - SW_INVALIDATE); - - sInfo.fMask = SIF_POS; - SetScrollInfo(hwnd, fnBar, &sInfo, TRUE); - - UpdateWindow(hwnd); - } - return 0; -} - -static LRESULT CALLBACK -GuiConsoleWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - LRESULT Result = 0; - PGUI_CONSOLE_DATA GuiData = NULL; - PCSRSS_CONSOLE Console = NULL; - - GuiConsoleGetDataPointers(hWnd, &Console, &GuiData); - - switch(msg) - { - case WM_NCCREATE: - Result = (LRESULT) GuiConsoleHandleNcCreate(hWnd, (CREATESTRUCTW *) lParam); - break; - case WM_PAINT: - GuiConsoleHandlePaint(hWnd, (HDC)wParam); - break; - case WM_KEYDOWN: - case WM_KEYUP: - case WM_SYSKEYDOWN: - case WM_SYSKEYUP: - case WM_CHAR: - GuiConsoleHandleKey(hWnd, msg, wParam, lParam); - break; - case WM_TIMER: - GuiConsoleHandleTimer(hWnd); - break; - case WM_CLOSE: - GuiConsoleHandleClose(hWnd); - break; - case WM_NCDESTROY: - GuiConsoleHandleNcDestroy(hWnd); - break; - case WM_LBUTTONDOWN: - GuiConsoleLeftMouseDown(hWnd, lParam); - break; - case WM_LBUTTONUP: - GuiConsoleLeftMouseUp(hWnd, lParam); - break; - case WM_RBUTTONDOWN: - GuiConsoleRightMouseDown(hWnd); - break; - case WM_MOUSEMOVE: - GuiConsoleMouseMove(hWnd, wParam, lParam); - break; - case WM_SYSCOMMAND: - Result = GuiConsoleHandleSysMenuCommand(hWnd, wParam, lParam); - break; - case WM_HSCROLL: - case WM_VSCROLL: - Result = GuiConsoleHandleScroll(hWnd, msg, wParam); - break; - case WM_GETMINMAXINFO: - GuiConsoleGetMinMaxInfo(hWnd, (PMINMAXINFO)lParam); - break; - case WM_SIZE: - GuiConsoleResize(hWnd, wParam, lParam); - break; - case PM_APPLY_CONSOLE_INFO: - GuiApplyUserSettings(Console, GuiData, (PConsoleInfo)wParam); - if (lParam) - { - GuiConsoleWriteUserSettings(Console, GuiData); - } - break; - default: - Result = DefWindowProcW(hWnd, msg, wParam, lParam); - break; - } - - return Result; -} - -static LRESULT CALLBACK -GuiConsoleNotifyWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - HWND NewWindow; - LONG WindowCount; - MSG Msg; - PWCHAR Buffer, Title; - PCSRSS_CONSOLE Console = (PCSRSS_CONSOLE) lParam; - - - - switch(msg) - { - case WM_CREATE: - SetWindowLongW(hWnd, GWL_USERDATA, 0); - return 0; - case PM_CREATE_CONSOLE: - Buffer = HeapAlloc(Win32CsrApiHeap, 0, - Console->Title.Length + sizeof(WCHAR)); - if (NULL != Buffer) - { - memcpy(Buffer, Console->Title.Buffer, Console->Title.Length); - Buffer[Console->Title.Length / sizeof(WCHAR)] = L'\0'; - Title = Buffer; - } - else - { - Title = L""; - } - NewWindow = CreateWindowExW(WS_EX_CLIENTEDGE, - L"ConsoleWindowClass", - Title, - WS_OVERLAPPEDWINDOW | WS_HSCROLL | WS_VSCROLL, - CW_USEDEFAULT, - CW_USEDEFAULT, - CW_USEDEFAULT, - CW_USEDEFAULT, - NULL, - NULL, - (HINSTANCE) GetModuleHandleW(NULL), - (PVOID) Console); - if (NULL != Buffer) - { - HeapFree(Win32CsrApiHeap, 0, Buffer); - } - if (NULL != NewWindow) - { - SetWindowLongW(hWnd, GWL_USERDATA, GetWindowLongW(hWnd, GWL_USERDATA) + 1); - ShowWindow(NewWindow, (int)wParam); - } - return (LRESULT) NewWindow; - case PM_DESTROY_CONSOLE: - /* Window creation is done using a PostMessage(), so it's possible that the - * window that we want to destroy doesn't exist yet. So first empty the message - * queue */ - while(PeekMessageW(&Msg, NULL, 0, 0, PM_REMOVE)) - { - TranslateMessage(&Msg); - DispatchMessageW(&Msg); - } - DestroyWindow(Console->hWindow); - Console->hWindow = NULL; - WindowCount = GetWindowLongW(hWnd, GWL_USERDATA); - WindowCount--; - SetWindowLongW(hWnd, GWL_USERDATA, WindowCount); - if (0 == WindowCount) - { - NotifyWnd = NULL; - DestroyWindow(hWnd); - PrivateCsrssManualGuiCheck(-1); - PostQuitMessage(0); - } - return 0; - default: - return DefWindowProcW(hWnd, msg, wParam, lParam); - } -} - -static DWORD WINAPI -GuiConsoleGuiThread(PVOID Data) -{ - MSG msg; - PHANDLE GraphicsStartupEvent = (PHANDLE) Data; - - NotifyWnd = CreateWindowW(L"Win32CsrCreateNotify", - L"", - WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, - CW_USEDEFAULT, - CW_USEDEFAULT, - CW_USEDEFAULT, - NULL, - NULL, - (HINSTANCE) GetModuleHandleW(NULL), - NULL); - if (NULL == NotifyWnd) - { - PrivateCsrssManualGuiCheck(-1); - SetEvent(*GraphicsStartupEvent); - return 1; - } - - SetEvent(*GraphicsStartupEvent); - - while(GetMessageW(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessageW(&msg); - } - - return 1; -} - -static BOOL -GuiInit(VOID) -{ - WNDCLASSEXW wc; - - if (NULL == NotifyWnd) - { - PrivateCsrssManualGuiCheck(+1); - } - - wc.cbSize = sizeof(WNDCLASSEXW); - wc.lpszClassName = L"Win32CsrCreateNotify"; - wc.lpfnWndProc = GuiConsoleNotifyWndProc; - wc.style = 0; - wc.hInstance = (HINSTANCE) GetModuleHandleW(NULL); - wc.hIcon = NULL; - wc.hCursor = NULL; - wc.hbrBackground = NULL; - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hIconSm = NULL; - if (RegisterClassExW(&wc) == 0) - { - DPRINT1("Failed to register notify wndproc\n"); - return FALSE; - } - - wc.cbSize = sizeof(WNDCLASSEXW); - wc.lpszClassName = L"ConsoleWindowClass"; - wc.lpfnWndProc = GuiConsoleWndProc; - wc.style = 0; - wc.hInstance = (HINSTANCE) GetModuleHandleW(NULL); - wc.hIcon = LoadIconW(GetModuleHandleW(L"win32csr"), MAKEINTRESOURCEW(1)); - wc.hCursor = LoadCursorW(NULL, (LPCWSTR) IDC_ARROW); - wc.hbrBackground = CreateSolidBrush(RGB(0,0,0)); - wc.lpszMenuName = NULL; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hIconSm = LoadImageW(GetModuleHandleW(L"win32csr"), MAKEINTRESOURCEW(1), IMAGE_ICON, - GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), - LR_SHARED); - if (RegisterClassExW(&wc) == 0) - { - DPRINT1("Failed to register console wndproc\n"); - return FALSE; - } - - return TRUE; -} - -static VOID WINAPI -GuiInitScreenBuffer(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER Buffer) -{ - Buffer->DefaultAttrib = DEFAULT_ATTRIB; -} - -static BOOL WINAPI -GuiChangeTitle(PCSRSS_CONSOLE Console) -{ - PWCHAR Buffer, Title; - - Buffer = HeapAlloc(Win32CsrApiHeap, 0, - Console->Title.Length + sizeof(WCHAR)); - if (NULL != Buffer) - { - memcpy(Buffer, Console->Title.Buffer, Console->Title.Length); - Buffer[Console->Title.Length / sizeof(WCHAR)] = L'\0'; - Title = Buffer; - } - else - { - Title = L""; - } - - SendMessageW(Console->hWindow, WM_SETTEXT, 0, (LPARAM) Title); - - if (NULL != Buffer) - { - HeapFree(Win32CsrApiHeap, 0, Buffer); - } - - return TRUE; -} - -static BOOL WINAPI -GuiChangeIcon(PCSRSS_CONSOLE Console, HICON hWindowIcon) -{ - SendMessageW(Console->hWindow, WM_SETICON, ICON_BIG, (LPARAM)hWindowIcon); - SendMessageW(Console->hWindow, WM_SETICON, ICON_SMALL, (LPARAM)hWindowIcon); - - return TRUE; -} - -static VOID WINAPI -GuiCleanupConsole(PCSRSS_CONSOLE Console) -{ - SendMessageW(NotifyWnd, PM_DESTROY_CONSOLE, 0, (LPARAM) Console); -} - -static CSRSS_CONSOLE_VTBL GuiVtbl = -{ - GuiInitScreenBuffer, - GuiWriteStream, - GuiDrawRegion, - GuiSetCursorInfo, - GuiSetScreenInfo, - GuiUpdateScreenInfo, - GuiChangeTitle, - GuiCleanupConsole, - GuiChangeIcon, - GuiResizeBuffer, -}; - -NTSTATUS FASTCALL -GuiInitConsole(PCSRSS_CONSOLE Console, int ShowCmd) -{ - HANDLE GraphicsStartupEvent; - HANDLE ThreadHandle; - PGUI_CONSOLE_DATA GuiData; - - if (! ConsInitialized) - { - ConsInitialized = TRUE; - if (! GuiInit()) - { - ConsInitialized = FALSE; - return STATUS_UNSUCCESSFUL; - } - } - - Console->Vtbl = &GuiVtbl; - if (NULL == NotifyWnd) - { - GraphicsStartupEvent = CreateEventW(NULL, FALSE, FALSE, NULL); - if (NULL == GraphicsStartupEvent) - { - return STATUS_UNSUCCESSFUL; - } - - ThreadHandle = CreateThread(NULL, - 0, - GuiConsoleGuiThread, - (PVOID) &GraphicsStartupEvent, - 0, - NULL); - if (NULL == ThreadHandle) - { - CloseHandle(GraphicsStartupEvent); - DPRINT1("Win32Csr: Failed to create graphics console thread. Expect problems\n"); - return STATUS_UNSUCCESSFUL; - } - SetThreadPriority(ThreadHandle, THREAD_PRIORITY_HIGHEST); - CloseHandle(ThreadHandle); - - WaitForSingleObject(GraphicsStartupEvent, INFINITE); - CloseHandle(GraphicsStartupEvent); - - if (NULL == NotifyWnd) - { - DPRINT1("Win32Csr: Failed to create notification window.\n"); - return STATUS_UNSUCCESSFUL; - } - } - GuiData = HeapAlloc(Win32CsrApiHeap, HEAP_ZERO_MEMORY, - sizeof(GUI_CONSOLE_DATA)); - if (!GuiData) - { - DPRINT1("Win32Csr: Failed to create GUI_CONSOLE_DATA\n"); - return STATUS_UNSUCCESSFUL; - } - - Console->PrivateData = (PVOID) GuiData; - /* - * we need to wait untill the GUI has been fully initialized - * to retrieve custom settings i.e. WindowSize etc.. - * Ideally we could use SendNotifyMessage for this but its not - * yet implemented. - * - */ - GuiData->hGuiInitEvent = CreateEventW(NULL, FALSE, FALSE, NULL); - /* create console */ - PostMessageW(NotifyWnd, PM_CREATE_CONSOLE, ShowCmd, (LPARAM) Console); - - /* wait untill initialization has finished */ - WaitForSingleObject(GuiData->hGuiInitEvent, INFINITE); - DPRINT("received event Console %p GuiData %p X %d Y %d\n", Console, Console->PrivateData, Console->Size.X, Console->Size.Y); - CloseHandle(GuiData->hGuiInitEvent); - GuiData->hGuiInitEvent = NULL; - - return STATUS_SUCCESS; -} - -/* EOF */ diff --git a/deprecated/win32csr/guiconsole.h b/deprecated/win32csr/guiconsole.h deleted file mode 100644 index d715883c089..00000000000 --- a/deprecated/win32csr/guiconsole.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: subsys/csrss/win32csr/guiconsole.h - * PURPOSE: Interface to GUI consoles - */ - -#include "api.h" - -#define CONGUI_MIN_WIDTH 10 -#define CONGUI_MIN_HEIGHT 10 -#define CONGUI_UPDATE_TIME 0 -#define CONGUI_UPDATE_TIMER 1 - -NTSTATUS FASTCALL GuiInitConsole(PCSRSS_CONSOLE Console, BOOL Visible); -VOID FASTCALL GuiConsoleHandleScrollbarMenu(VOID); - -/*EOF*/ diff --git a/deprecated/win32csr/handle.c b/deprecated/win32csr/handle.c deleted file mode 100644 index 33a654cfa63..00000000000 --- a/deprecated/win32csr/handle.c +++ /dev/null @@ -1,381 +0,0 @@ -/* - * reactos/subsys/csrss/api/handle.c - * - * CSRSS handle functions - * - * ReactOS Operating System - */ - -/* INCLUDES ******************************************************************/ - -#include - -#define NDEBUG -#include - -/* FUNCTIONS *****************************************************************/ - -static -BOOL -CsrIsConsoleHandle(HANDLE Handle) -{ - return ((ULONG_PTR)Handle & 0x10000003) == 0x3; -} - -static INT -AdjustHandleCounts(PCSRSS_HANDLE Entry, INT Change) -{ - Object_t *Object = Entry->Object; - if (Entry->Access & GENERIC_READ) Object->AccessRead += Change; - if (Entry->Access & GENERIC_WRITE) Object->AccessWrite += Change; - if (!(Entry->ShareMode & FILE_SHARE_READ)) Object->ExclusiveRead += Change; - if (!(Entry->ShareMode & FILE_SHARE_WRITE)) Object->ExclusiveWrite += Change; - Object->HandleCount += Change; - return Object->HandleCount; -} - -static VOID -Win32CsrCreateHandleEntry( - PCSRSS_HANDLE Entry) -{ - Object_t *Object = Entry->Object; - EnterCriticalSection(&Object->Console->Lock); - AdjustHandleCounts(Entry, +1); - LeaveCriticalSection(&Object->Console->Lock); -} - -static VOID -Win32CsrCloseHandleEntry( - PCSRSS_HANDLE Entry) -{ - Object_t *Object = Entry->Object; - if (Object != NULL) - { - PCSRSS_CONSOLE Console = Object->Console; - EnterCriticalSection(&Console->Lock); - /* If the last handle to a screen buffer is closed, delete it */ - if (AdjustHandleCounts(Entry, -1) == 0 - && Object->Type == CONIO_SCREEN_BUFFER_MAGIC) - { - PCSRSS_SCREEN_BUFFER Buffer = (PCSRSS_SCREEN_BUFFER)Object; - /* ...unless it's the only buffer left. Windows allows deletion - * even of the last buffer, but having to deal with a lack of - * any active buffer might be error-prone. */ - if (Buffer->ListEntry.Flink != Buffer->ListEntry.Blink) - ConioDeleteScreenBuffer(Buffer); - } - LeaveCriticalSection(&Console->Lock); - Entry->Object = NULL; - } -} - -NTSTATUS -FASTCALL -Win32CsrReleaseObject( - PCSR_PROCESS ProcessData, - HANDLE Handle) -{ - ULONG_PTR h = (ULONG_PTR)Handle >> 2; - Object_t *Object; - - RtlEnterCriticalSection(&ProcessData->HandleTableLock); - if (h >= ProcessData->HandleTableSize - || (Object = ProcessData->HandleTable[h].Object) == NULL) - { - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - return STATUS_INVALID_HANDLE; - } - Win32CsrCloseHandleEntry(&ProcessData->HandleTable[h]); - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - return STATUS_SUCCESS; -} - -NTSTATUS -FASTCALL -Win32CsrLockObject(PCSR_PROCESS ProcessData, - HANDLE Handle, - Object_t **Object, - DWORD Access, - LONG Type) -{ - ULONG_PTR h = (ULONG_PTR)Handle >> 2; - - DPRINT("CsrGetObject, Object: %x, %x, %x\n", - Object, Handle, ProcessData ? ProcessData->HandleTableSize : 0); - - RtlEnterCriticalSection(&ProcessData->HandleTableLock); - if (!CsrIsConsoleHandle(Handle) || h >= ProcessData->HandleTableSize - || (*Object = ProcessData->HandleTable[h].Object) == NULL - || ~ProcessData->HandleTable[h].Access & Access - || (Type != 0 && (*Object)->Type != Type)) - { - DPRINT1("CsrGetObject returning invalid handle (%x)\n", Handle); - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - return STATUS_INVALID_HANDLE; - } - _InterlockedIncrement(&(*Object)->Console->ReferenceCount); - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - - EnterCriticalSection(&((*Object)->Console->Lock)); - return STATUS_SUCCESS; -} - -VOID -FASTCALL -Win32CsrUnlockObject(Object_t *Object) -{ - PCSRSS_CONSOLE Console = Object->Console; - LeaveCriticalSection(&Console->Lock); - /* dec ref count */ - if (_InterlockedDecrement(&Console->ReferenceCount) == 0) - ConioDeleteConsole(&Console->Header); -} - -VOID -WINAPI -Win32CsrReleaseConsole( - PCSR_PROCESS ProcessData) -{ - PCSRSS_CONSOLE Console; - ULONG i; - - /* Close all console handles and detach process from console */ - RtlEnterCriticalSection(&ProcessData->HandleTableLock); - - for (i = 0; i < ProcessData->HandleTableSize; i++) - Win32CsrCloseHandleEntry(&ProcessData->HandleTable[i]); - ProcessData->HandleTableSize = 0; - RtlFreeHeap(Win32CsrApiHeap, 0, ProcessData->HandleTable); - ProcessData->HandleTable = NULL; - - Console = ProcessData->Console; - if (Console != NULL) - { - ProcessData->Console = NULL; - EnterCriticalSection(&Console->Lock); - RemoveEntryList(&ProcessData->ConsoleLink); - LeaveCriticalSection(&Console->Lock); - if (_InterlockedDecrement(&Console->ReferenceCount) == 0) - ConioDeleteConsole(&Console->Header); - //CloseHandle(ProcessData->ConsoleEvent); - //ProcessData->ConsoleEvent = NULL; - } - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); -} - -NTSTATUS -FASTCALL -Win32CsrInsertObject( - PCSR_PROCESS ProcessData, - PHANDLE Handle, - Object_t *Object, - DWORD Access, - BOOL Inheritable, - DWORD ShareMode) -{ - ULONG i; - PCSRSS_HANDLE Block; - - RtlEnterCriticalSection(&ProcessData->HandleTableLock); - - for (i = 0; i < ProcessData->HandleTableSize; i++) - { - if (ProcessData->HandleTable[i].Object == NULL) - { - break; - } - } - if (i >= ProcessData->HandleTableSize) - { - Block = RtlAllocateHeap(Win32CsrApiHeap, - HEAP_ZERO_MEMORY, - (ProcessData->HandleTableSize + 64) * sizeof(CSRSS_HANDLE)); - if (Block == NULL) - { - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - return(STATUS_UNSUCCESSFUL); - } - RtlCopyMemory(Block, - ProcessData->HandleTable, - ProcessData->HandleTableSize * sizeof(CSRSS_HANDLE)); - RtlFreeHeap(Win32CsrApiHeap, 0, ProcessData->HandleTable); - ProcessData->HandleTable = Block; - ProcessData->HandleTableSize += 64; - } - ProcessData->HandleTable[i].Object = Object; - ProcessData->HandleTable[i].Access = Access; - ProcessData->HandleTable[i].Inheritable = Inheritable; - ProcessData->HandleTable[i].ShareMode = ShareMode; - Win32CsrCreateHandleEntry(&ProcessData->HandleTable[i]); - *Handle = UlongToHandle((i << 2) | 0x3); - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - return(STATUS_SUCCESS); -} - -NTSTATUS -WINAPI -Win32CsrDuplicateHandleTable( - PCSR_PROCESS SourceProcessData, - PCSR_PROCESS TargetProcessData) -{ - ULONG i; - - /* Only inherit if the flag was set */ - if (!TargetProcessData->bInheritHandles) return STATUS_SUCCESS; - - if (TargetProcessData->HandleTableSize) - { - return STATUS_INVALID_PARAMETER; - } - - RtlEnterCriticalSection(&SourceProcessData->HandleTableLock); - - /* we are called from CreateProcessData, it isn't necessary to lock the target process data */ - - TargetProcessData->HandleTable = RtlAllocateHeap(Win32CsrApiHeap, - HEAP_ZERO_MEMORY, - SourceProcessData->HandleTableSize - * sizeof(CSRSS_HANDLE)); - if (TargetProcessData->HandleTable == NULL) - { - RtlLeaveCriticalSection(&SourceProcessData->HandleTableLock); - return(STATUS_UNSUCCESSFUL); - } - TargetProcessData->HandleTableSize = SourceProcessData->HandleTableSize; - for (i = 0; i < SourceProcessData->HandleTableSize; i++) - { - if (SourceProcessData->HandleTable[i].Object != NULL && - SourceProcessData->HandleTable[i].Inheritable) - { - TargetProcessData->HandleTable[i] = SourceProcessData->HandleTable[i]; - Win32CsrCreateHandleEntry(&TargetProcessData->HandleTable[i]); - } - } - RtlLeaveCriticalSection(&SourceProcessData->HandleTableLock); - return(STATUS_SUCCESS); -} - -CSR_API(CsrGetHandle) -{ - NTSTATUS Status = STATUS_SUCCESS; - - Request->Data.GetInputHandleRequest.Handle = INVALID_HANDLE_VALUE; - - RtlEnterCriticalSection(&ProcessData->HandleTableLock); - if (ProcessData->Console) - { - DWORD DesiredAccess = Request->Data.GetInputHandleRequest.Access; - DWORD ShareMode = Request->Data.GetInputHandleRequest.ShareMode; - - PCSRSS_CONSOLE Console = ProcessData->Console; - Object_t *Object; - - EnterCriticalSection(&Console->Lock); - if (Request->Type == GET_OUTPUT_HANDLE) - Object = &Console->ActiveBuffer->Header; - else - Object = &Console->Header; - - if (((DesiredAccess & GENERIC_READ) && Object->ExclusiveRead != 0) || - ((DesiredAccess & GENERIC_WRITE) && Object->ExclusiveWrite != 0) || - (!(ShareMode & FILE_SHARE_READ) && Object->AccessRead != 0) || - (!(ShareMode & FILE_SHARE_WRITE) && Object->AccessWrite != 0)) - { - DPRINT1("Sharing violation\n"); - Status = STATUS_SHARING_VIOLATION; - } - else - { - Status = Win32CsrInsertObject(ProcessData, - &Request->Data.GetInputHandleRequest.Handle, - Object, - DesiredAccess, - Request->Data.GetInputHandleRequest.Inheritable, - ShareMode); - } - LeaveCriticalSection(&Console->Lock); - } - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - - return Status; -} - -CSR_API(CsrCloseHandle) -{ - return Win32CsrReleaseObject(ProcessData, Request->Data.CloseHandleRequest.Handle); -} - -CSR_API(CsrVerifyHandle) -{ - ULONG_PTR Index; - NTSTATUS Status = STATUS_SUCCESS; - - Index = (ULONG_PTR)Request->Data.VerifyHandleRequest.Handle >> 2; - RtlEnterCriticalSection(&ProcessData->HandleTableLock); - if (Index >= ProcessData->HandleTableSize || - ProcessData->HandleTable[Index].Object == NULL) - { - DPRINT("CsrVerifyObject failed\n"); - Status = STATUS_INVALID_HANDLE; - } - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - - return Status; -} - -CSR_API(CsrDuplicateHandle) -{ - ULONG_PTR Index; - PCSRSS_HANDLE Entry; - DWORD DesiredAccess; - - Index = (ULONG_PTR)Request->Data.DuplicateHandleRequest.Handle >> 2; - RtlEnterCriticalSection(&ProcessData->HandleTableLock); - if (Index >= ProcessData->HandleTableSize - || (Entry = &ProcessData->HandleTable[Index])->Object == NULL) - { - DPRINT1("Couldn't dup invalid handle %p\n", Request->Data.DuplicateHandleRequest.Handle); - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - return STATUS_INVALID_HANDLE; - } - - if (Request->Data.DuplicateHandleRequest.Options & DUPLICATE_SAME_ACCESS) - { - DesiredAccess = Entry->Access; - } - else - { - DesiredAccess = Request->Data.DuplicateHandleRequest.Access; - /* Make sure the source handle has all the desired flags */ - if (~Entry->Access & DesiredAccess) - { - DPRINT1("Handle %p only has access %X; requested %X\n", - Request->Data.DuplicateHandleRequest.Handle, Entry->Access, DesiredAccess); - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - return STATUS_INVALID_PARAMETER; - } - } - - Request->Status = Win32CsrInsertObject(ProcessData, - &Request->Data.DuplicateHandleRequest.Handle, - Entry->Object, - DesiredAccess, - Request->Data.DuplicateHandleRequest.Inheritable, - Entry->ShareMode); - if (NT_SUCCESS(Request->Status) - && Request->Data.DuplicateHandleRequest.Options & DUPLICATE_CLOSE_SOURCE) - { - Win32CsrCloseHandleEntry(Entry); - } - - RtlLeaveCriticalSection(&ProcessData->HandleTableLock); - return Request->Status; -} - -CSR_API(CsrGetInputWaitHandle) -{ - Request->Data.GetConsoleInputWaitHandle.InputWaitHandle = ProcessData->ConsoleEvent; - return STATUS_SUCCESS; -} - -/* EOF */ diff --git a/deprecated/win32csr/harderror.c b/deprecated/win32csr/harderror.c deleted file mode 100644 index 128b16bc433..00000000000 --- a/deprecated/win32csr/harderror.c +++ /dev/null @@ -1,578 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: subsys/csrss/win32csr/dllmain.c - * PURPOSE: Initialization - * PROGRAMMERS: Dmitry Philippov (shedon@mail.ru) - * Timo Kreuzer (timo.kreuzer@reactos.org) - */ - -/* INCLUDES ******************************************************************/ - -#define NDEBUG -#include "w32csr.h" -#include -#include - -#define IDTRYAGAIN 10 -#define IDCONTINUE 11 - -/* FUNCTIONS *****************************************************************/ - -static -NTSTATUS -CsrpGetClientFileName( - OUT PUNICODE_STRING ClientFileNameU, - HANDLE hProcess) -{ - PLIST_ENTRY ModuleListHead; - PLIST_ENTRY Entry; - PLDR_DATA_TABLE_ENTRY Module; - PPEB_LDR_DATA Ldr; - PROCESS_BASIC_INFORMATION ClientBasicInfo; - LDR_DATA_TABLE_ENTRY ModuleData; - PVOID ClientDllBase; - NTSTATUS Status; - PPEB Peb; - - /* Initialize string */ - ClientFileNameU->MaximumLength = 0; - ClientFileNameU->Length = 0; - ClientFileNameU->Buffer = NULL; - - /* Query process information */ - Status = NtQueryInformationProcess(hProcess, - ProcessBasicInformation, - &ClientBasicInfo, - sizeof(ClientBasicInfo), - NULL); - if (!NT_SUCCESS(Status)) return Status; - - Peb = ClientBasicInfo.PebBaseAddress; - if (!Peb) return STATUS_UNSUCCESSFUL; - - Status = NtReadVirtualMemory(hProcess, &Peb->Ldr, &Ldr, sizeof(Ldr), NULL); - if (!NT_SUCCESS(Status)) return Status; - - ModuleListHead = &Ldr->InLoadOrderModuleList; - Status = NtReadVirtualMemory(hProcess, - &ModuleListHead->Flink, - &Entry, - sizeof(Entry), - NULL); - if (!NT_SUCCESS(Status)) return Status; - - if (Entry == ModuleListHead) return STATUS_UNSUCCESSFUL; - - Module = CONTAINING_RECORD(Entry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks); - - Status = NtReadVirtualMemory(hProcess, - Module, - &ModuleData, - sizeof(ModuleData), - NULL); - if (!NT_SUCCESS(Status)) return Status; - - Status = NtReadVirtualMemory(hProcess, - &Peb->ImageBaseAddress, - &ClientDllBase, - sizeof(ClientDllBase), - NULL); - if (!NT_SUCCESS(Status)) return Status; - - if (ClientDllBase != ModuleData.DllBase) return STATUS_UNSUCCESSFUL; - - ClientFileNameU->MaximumLength = ModuleData.BaseDllName.MaximumLength; - ClientFileNameU->Buffer = RtlAllocateHeap(RtlGetProcessHeap(), - HEAP_ZERO_MEMORY, - ClientFileNameU->MaximumLength); - - Status = NtReadVirtualMemory(hProcess, - ModuleData.BaseDllName.Buffer, - ClientFileNameU->Buffer, - ClientFileNameU->MaximumLength, - NULL); - if (!NT_SUCCESS(Status)) - { - RtlFreeHeap(RtlGetProcessHeap(), 0, ClientFileNameU->Buffer); - ClientFileNameU->Buffer = NULL; - ClientFileNameU->MaximumLength = 0; - return Status; - } - - ClientFileNameU->Length = wcslen(ClientFileNameU->Buffer)*sizeof(wchar_t); - DPRINT("ClientFileNameU=\'%wZ\'\n", &ClientFileNameU); - - return STATUS_SUCCESS; -} - -static -VOID -CsrpFreeStringParameters( - IN OUT PULONG_PTR Parameters, - IN PHARDERROR_MSG HardErrorMessage) -{ - ULONG nParam; - - /* Loop all parameters */ - for (nParam = 0; nParam < HardErrorMessage->NumberOfParameters; nParam++) - { - /* Check if the current parameter is a string */ - if (HardErrorMessage->UnicodeStringParameterMask & (1 << nParam) && Parameters[nParam]) - { - /* Free the string buffer */ - RtlFreeHeap(RtlGetProcessHeap(), 0, (PVOID)Parameters[nParam]); - } - } -} - -static -NTSTATUS -CsrpCaptureStringParameters( - OUT PULONG_PTR Parameters, - OUT PULONG SizeOfAllUnicodeStrings, - IN PHARDERROR_MSG HardErrorMessage, - HANDLE hProcess) -{ - ULONG nParam, Size = 0; - NTSTATUS Status = STATUS_SUCCESS; - UNICODE_STRING TempStringU, ParamStringU; - ANSI_STRING TempStringA; - - /* Read all strings from client space */ - for (nParam = 0; nParam < HardErrorMessage->NumberOfParameters; nParam++) - { - Parameters[nParam] = 0; - - /* Check if the current parameter is a unicode string */ - if (HardErrorMessage->UnicodeStringParameterMask & (1 << nParam)) - { - /* Read the UNICODE_STRING from the process memory */ - Status = NtReadVirtualMemory(hProcess, - (PVOID)HardErrorMessage->Parameters[nParam], - &ParamStringU, - sizeof(ParamStringU), - NULL); - - if (!NT_SUCCESS(Status)) - break; - - /* Allocate a buffer for the string */ - TempStringU.MaximumLength = ParamStringU.Length; - TempStringU.Length = ParamStringU.Length; - TempStringU.Buffer = RtlAllocateHeap(RtlGetProcessHeap(), - HEAP_ZERO_MEMORY, - TempStringU.MaximumLength); - - if (!TempStringU.Buffer) - { - DPRINT1("Cannot allocate memory %u\n", TempStringU.MaximumLength); - Status = STATUS_NO_MEMORY; - } - - /* Read the string buffer from the process memory */ - Status = NtReadVirtualMemory(hProcess, - ParamStringU.Buffer, - TempStringU.Buffer, - ParamStringU.Length, - NULL); - if (!NT_SUCCESS(Status)) - { - DPRINT1("NtReadVirtualMemory failed with code: %lx\n", Status); - RtlFreeHeap(RtlGetProcessHeap(), 0, TempStringU.Buffer); - break; - } - - DPRINT("ParamString=\'%wZ\'\n", &TempStringU); - - /* Allocate a buffer for converted to ANSI string */ - TempStringA.MaximumLength = RtlUnicodeStringToAnsiSize(&TempStringU); - TempStringA.Buffer = RtlAllocateHeap(RtlGetProcessHeap(), - HEAP_ZERO_MEMORY, - TempStringA.MaximumLength); - - if (!TempStringA.Buffer) - { - DPRINT1("Cannot allocate memory %u\n", TempStringA.MaximumLength); - RtlFreeHeap(RtlGetProcessHeap(), 0, TempStringU.Buffer); - Status = STATUS_NO_MEMORY; - break; - } - - /* Convert string to ANSI and free temporary buffer */ - Status = RtlUnicodeStringToAnsiString(&TempStringA, &TempStringU, FALSE); - RtlFreeHeap(RtlGetProcessHeap(), 0, TempStringU.Buffer); - if (!NT_SUCCESS(Status)) - { - RtlFreeHeap(RtlGetProcessHeap(), 0, TempStringA.Buffer); - break; - } - - /* Note: RtlUnicodeStringToAnsiString returns NULL terminated string */ - Parameters[nParam] = (ULONG_PTR)TempStringA.Buffer; - Size += TempStringU.Length; - } - else - { - /* It's not a unicode string */ - Parameters[nParam] = HardErrorMessage->Parameters[nParam]; - } - } - - if (!NT_SUCCESS(Status)) - { - CsrpFreeStringParameters(Parameters, HardErrorMessage); - return Status; - } - - *SizeOfAllUnicodeStrings = Size; - return Status; -} - -static -NTSTATUS -CsrpFormatMessages( - OUT PUNICODE_STRING TextStringU, - OUT PUNICODE_STRING CaptionStringU, - IN PULONG_PTR Parameters, - IN ULONG SizeOfStrings, - IN PHARDERROR_MSG Message, - IN HANDLE hProcess) -{ - NTSTATUS Status; - UNICODE_STRING FileNameU, TempStringU, FormatU; - ANSI_STRING FormatA; - PMESSAGE_RESOURCE_ENTRY MessageResource; - PWSTR FormatString; - ULONG Size, ExceptionCode; - - /* Get the file name of the client process */ - CsrpGetClientFileName(&FileNameU, hProcess); - - /* Check if we have a file name */ - if (!FileNameU.Buffer) - { - /* No, use system */ - RtlInitUnicodeString(&FileNameU, L"System"); - } - - /* Get text string of the error code */ - Status = RtlFindMessage(GetModuleHandleW(L"ntdll"), - (ULONG_PTR)RT_MESSAGETABLE, - LANG_NEUTRAL, - Message->Status, - &MessageResource); - - if (NT_SUCCESS(Status)) - { - if (MessageResource->Flags) - { - RtlInitUnicodeString(&FormatU, (PWSTR)MessageResource->Text); - FormatA.Buffer = NULL; - } - else - { - RtlInitAnsiString(&FormatA, (PCHAR)MessageResource->Text); - RtlAnsiStringToUnicodeString(&FormatU, &FormatA, TRUE); - } - } - else - { - /* Fall back to hardcoded value */ - RtlInitUnicodeString(&FormatU, L"Unknown Hard Error"); - FormatA.Buffer = NULL; - } - - FormatString = FormatU.Buffer; - - /* Check whether a caption exists */ - if (FormatString[0] == L'{') - { - /* Set caption start */ - TempStringU.Buffer = ++FormatString; - - /* Get size of the caption */ - for (Size = 0; *FormatString != 0 && *FormatString != L'}'; Size++) - FormatString++; - - /* Skip '}', '\r', '\n' */ - FormatString += 3; - - TempStringU.Length = Size * sizeof(WCHAR); - TempStringU.MaximumLength = TempStringU.Length; - } - else - { - /* FIXME: Set string based on severity */ - RtlInitUnicodeString(&TempStringU, L"Application Error"); - } - - /* Calculate buffer length for the caption */ - CaptionStringU->MaximumLength = FileNameU.Length + TempStringU.Length + - 4 * sizeof(WCHAR); - - /* Allocate a buffer for the caption */ - CaptionStringU->Buffer = RtlAllocateHeap(RtlGetProcessHeap(), - HEAP_ZERO_MEMORY, - CaptionStringU->MaximumLength); - - /* Append the file name, seperator and the caption text */ - CaptionStringU->Length = 0; - RtlAppendUnicodeStringToString(CaptionStringU, &FileNameU); - RtlAppendUnicodeToString(CaptionStringU, L" - "); - RtlAppendUnicodeStringToString(CaptionStringU, &TempStringU); - - /* Zero terminate the buffer */ - CaptionStringU->Buffer[CaptionStringU->Length / sizeof(WCHAR)] = 0; - - /* Free the file name buffer */ - RtlFreeUnicodeString(&FileNameU); - - /* Check if this is an exception message */ - if (Message->Status == STATUS_UNHANDLED_EXCEPTION) - { - ExceptionCode = Parameters[0]; - - /* Handle special cases */ - if (ExceptionCode == STATUS_ACCESS_VIOLATION) - { - Parameters[0] = Parameters[1]; - Parameters[1] = Parameters[3]; - if (Parameters[2]) Parameters[2] = (ULONG_PTR)L"written"; - else Parameters[2] = (ULONG_PTR)L"read"; - MessageResource = NULL; - } - else if (ExceptionCode == STATUS_IN_PAGE_ERROR) - { - Parameters[0] = Parameters[1]; - Parameters[1] = Parameters[3]; - MessageResource = NULL; - } - else - { - /* Fall back to hardcoded value */ - Parameters[2] = Parameters[1]; - Parameters[1] = Parameters[0]; - Parameters[0] = (ULONG_PTR)L"unknown software exception"; - } - - if (!MessageResource) - { - /* Get text string of the exception code */ - Status = RtlFindMessage(GetModuleHandleW(L"ntdll"), - (ULONG_PTR)RT_MESSAGETABLE, - LANG_NEUTRAL, - ExceptionCode, - &MessageResource); - - if (NT_SUCCESS(Status)) - { - if (FormatA.Buffer) RtlFreeUnicodeString(&FormatU); - - if (MessageResource->Flags) - { - RtlInitUnicodeString(&FormatU, (PWSTR)MessageResource->Text); - FormatA.Buffer = NULL; - } - else - { - RtlInitAnsiString(&FormatA, (PCHAR)MessageResource->Text); - RtlAnsiStringToUnicodeString(&FormatU, &FormatA, TRUE); - } - FormatString = FormatU.Buffer; - } - else - { - /* Fall back to hardcoded value */ - Parameters[2] = Parameters[1]; - Parameters[1] = Parameters[0]; - Parameters[0] = (ULONG_PTR)L"unknown software exception"; - } - } - } - - /* Calculate length of text buffer */ - TextStringU->MaximumLength = FormatU.Length + SizeOfStrings + 42 * sizeof(WCHAR); - - /* Allocate a buffer for the text */ - TextStringU->Buffer = RtlAllocateHeap(RtlGetProcessHeap(), - HEAP_ZERO_MEMORY, - TextStringU->MaximumLength); - - /* Wrap in SEH to protect from invalid string parameters */ - _SEH2_TRY - { - /* Print the string into the buffer */ - StringCbPrintfW(TextStringU->Buffer, - TextStringU->MaximumLength, - FormatString, - Parameters[0], - Parameters[1], - Parameters[2], - Parameters[3]); - Status = STATUS_SUCCESS; - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - /* Set error and free buffers */ - Status = _SEH2_GetExceptionCode(); - RtlFreeHeap(RtlGetProcessHeap(), 0, TextStringU->Buffer); - RtlFreeHeap(RtlGetProcessHeap(), 0, CaptionStringU->Buffer); - } - _SEH2_END - - if (NT_SUCCESS(Status)) - { - TextStringU->Length = wcslen(TextStringU->Buffer) * sizeof(WCHAR); - } - - if (FormatA.Buffer) RtlFreeUnicodeString(&FormatU); - - return Status; -} - -static -ULONG -CsrpMessageBox( - PWSTR Text, - PWSTR Caption, - ULONG ValidResponseOptions, - ULONG Severity) -{ - ULONG Type, MessageBoxResponse; - - /* Set the message box type */ - switch (ValidResponseOptions) - { - case OptionAbortRetryIgnore: - Type = MB_ABORTRETRYIGNORE; - break; - case OptionOk: - Type = MB_OK; - break; - case OptionOkCancel: - Type = MB_OKCANCEL; - break; - case OptionRetryCancel: - Type = MB_RETRYCANCEL; - break; - case OptionYesNo: - Type = MB_YESNO; - break; - case OptionYesNoCancel: - Type = MB_YESNOCANCEL; - break; - case OptionShutdownSystem: - Type = MB_RETRYCANCEL; // FIXME??? - break; - /* Anything else is invalid */ - default: - return ResponseNotHandled; - } - - /* Set severity */ - if (Severity == STATUS_SEVERITY_INFORMATIONAL) Type |= MB_ICONINFORMATION; - else if (Severity == STATUS_SEVERITY_WARNING) Type |= MB_ICONWARNING; - else if (Severity == STATUS_SEVERITY_ERROR) Type |= MB_ICONERROR; - - Type |= MB_SYSTEMMODAL | MB_SETFOREGROUND; - - DPRINT("Text = '%S', Caption = '%S', Severity = %d, Type = 0x%lx\n", - Text, Caption, Severity, Type); - - /* Display a message box */ - MessageBoxResponse = MessageBoxW(0, Text, Caption, Type); - - /* Return response value */ - switch (MessageBoxResponse) - { - case IDOK: return ResponseOk; - case IDCANCEL: return ResponseCancel; - case IDYES: return ResponseYes; - case IDNO: return ResponseNo; - case IDABORT: return ResponseAbort; - case IDIGNORE: return ResponseIgnore; - case IDRETRY: return ResponseRetry; - case IDTRYAGAIN: return ResponseTryAgain; - case IDCONTINUE: return ResponseContinue; - } - - return ResponseNotHandled; -} - -VOID -WINAPI -Win32CsrHardError( - IN PCSR_THREAD ThreadData, - IN PHARDERROR_MSG Message) -{ -#if DBG - PCSR_PROCESS ProcessData = ThreadData->Process; -#endif - ULONG_PTR Parameters[MAXIMUM_HARDERROR_PARAMETERS]; - OBJECT_ATTRIBUTES ObjectAttributes; - UNICODE_STRING TextU, CaptionU; - NTSTATUS Status; - HANDLE hProcess; - ULONG Size; - - /* Default to not handled */ - ASSERT(ProcessData != NULL); - Message->Response = ResponseNotHandled; - - /* Make sure we don't have too many parameters */ - if (Message->NumberOfParameters > MAXIMUM_HARDERROR_PARAMETERS) - Message->NumberOfParameters = MAXIMUM_HARDERROR_PARAMETERS; - - /* Initialize object attributes */ - InitializeObjectAttributes(&ObjectAttributes, NULL, 0, NULL, NULL); - - /* Open client process */ - Status = NtOpenProcess(&hProcess, - PROCESS_VM_READ | PROCESS_QUERY_INFORMATION, - &ObjectAttributes, - &Message->h.ClientId); - - if (!NT_SUCCESS(Status)) - { - DPRINT1("NtOpenProcess failed with code: %lx\n", Status); - return; - } - - /* Capture all string parameters from the process memory */ - Status = CsrpCaptureStringParameters(Parameters, &Size, Message, hProcess); - if (!NT_SUCCESS(Status)) - { - NtClose(hProcess); - return; - } - - /* Format the caption and message box text */ - Status = CsrpFormatMessages(&TextU, - &CaptionU, - Parameters, - Size, - Message, - hProcess); - - /* Cleanup */ - CsrpFreeStringParameters(Parameters, Message); - NtClose(hProcess); - - if (!NT_SUCCESS(Status)) - { - return; - } - - /* Display the message box */ - Message->Response = CsrpMessageBox(TextU.Buffer, - CaptionU.Buffer, - Message->ValidResponseOptions, - (ULONG)Message->Status >> 30); - - RtlFreeUnicodeString(&TextU); - RtlFreeUnicodeString(&CaptionU); - - return; -} - diff --git a/deprecated/win32csr/lang/bg-BG.rc b/deprecated/win32csr/lang/bg-BG.rc deleted file mode 100644 index 2166ae0d236..00000000000 --- a/deprecated/win32csr/lang/bg-BG.rc +++ /dev/null @@ -1,64 +0,0 @@ -/* - * PROJECT: ReactOS CSRSS subsystem - * FILE: subsystems/win32/csrss/win32csr/lang/bg-BG.rc - * PURPOSE: Bulgarian resource file - */ - -LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " - " -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT " ... ",IDC_STATIC,7,7,186,11 - CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT " , . , .", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "& ",IDC_END_NOW,150,71,60,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " - " -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "",IDCANCEL,142,98,43,17 - PUSHBUTTON "& ",IDC_END_NOW,150,71,60,17 - LTEXT " ",IDC_STATIC,7,7,178,8 - LTEXT " , .", - IDC_STATIC,7,26,178,16 - LTEXT " , . , .", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "" - IDS_MARK "" - IDS_COPY "\tEnter" - IDS_PASTE "" - IDS_SELECTALL " " - IDS_SCROLL "" - IDS_FIND "..." - IDS_DEFAULTS "" - IDS_PROPERTIES "" - IDS_SCROLLHERE " " - IDS_SCROLLTOP " " - IDS_SCROLLBOTTOM " " - IDS_SCROLLPAGE_UP " " - IDS_SCROLLPAGE_DOWN " " - IDS_SCROLLUP " " - IDS_SCROLLDOWN " " - - IDS_COMMAND_PROMPT "Command Prompt" -END diff --git a/deprecated/win32csr/lang/cs-CZ.rc b/deprecated/win32csr/lang/cs-CZ.rc deleted file mode 100644 index 283cdfe48c3..00000000000 --- a/deprecated/win32csr/lang/cs-CZ.rc +++ /dev/null @@ -1,63 +0,0 @@ -/* FILE: subsystems/win32/csrss/win32csr/lang/cs-CZ.rc - * TRANSLATOR: Radek Liska aka Black_Fox (radekliska at gmail dot com) - * UPDATED: 2011-04-09 - */ - -LANGUAGE LANG_CZECH, SUBLANG_DEFAULT - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Ukonit program - " -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Probh ukonen programu... ekejte, prosm",IDC_STATIC,7,7,186,11 - CONTROL "Progress",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT "IPokud zvolte okamit ukonen programu, vechna neuloen data budou ztracena. Kliknutm na Ukonit okamit ukonte program.", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "&Ukonit okamit",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Ukonit program - " -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "Storno",IDCANCEL,142,98,43,17 - PUSHBUTTON "&Ukonit okamit",IDC_END_NOW,78,98,43,17 - LTEXT "Tento program neodpovd",IDC_STATIC,7,7,178,8 - LTEXT "Kliknutm na Storno se lze vrtit do systmu ReactOS a ovit stav programu", - IDC_STATIC,7,26,178,16 - LTEXT "Pokud zvolte okamit ukonen programu, vechna neuloen data budou ztracena. Kliknutm na Ukonit okamit ukonte program.", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "Upravit" - IDS_MARK "Oznait" - IDS_COPY "Koprovat\tEnter" - IDS_PASTE "Vloit" - IDS_SELECTALL "Oznait ve" - IDS_SCROLL "Posunout" - IDS_FIND "Najt..." - IDS_DEFAULTS "Vchoz" - IDS_PROPERTIES "Vlastnosti" - IDS_SCROLLHERE "Posunout sem" - IDS_SCROLLTOP "Posunout na zatek" - IDS_SCROLLBOTTOM "Posunout na konec" - IDS_SCROLLPAGE_UP "O strnku ve" - IDS_SCROLLPAGE_DOWN "O strnku ne" - IDS_SCROLLUP "Posunout nahoru" - IDS_SCROLLDOWN "Posunout dol" - - IDS_COMMAND_PROMPT "Pkazov dek" -END diff --git a/deprecated/win32csr/lang/de-DE.rc b/deprecated/win32csr/lang/de-DE.rc deleted file mode 100644 index b5084f4f0cc..00000000000 --- a/deprecated/win32csr/lang/de-DE.rc +++ /dev/null @@ -1,58 +0,0 @@ -LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Programm beenden - " -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Programm wird beendet...",IDC_STATIC,7,7,186,11 - CONTROL "Fortschritt",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT "Wenn Sie das Programm sofort beenden, werden Sie eventuell ungespeicherte Daten verlieren. Um das Programm zu beenden, whlen Sie Jetzt beenden.", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "J&etzt beenden",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Programm beenden - " -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "Abbechen",IDCANCEL,142,98,43,17 - PUSHBUTTON "J&etzt beenden",IDC_END_NOW,78,98,43,17 - LTEXT "Das Programm reagiert nicht",IDC_STATIC,7,7,178,8 - LTEXT "Um zu ReactOS zurckzukehren und den Status der Anwendung zu berprfen, whlen Sie Abbrechen.", - IDC_STATIC,7,26,178,16 - LTEXT "Wenn Sie das Programm sofort beenden, werden Sie eventuell ungespeicherte Daten verlieren. Um das Programm zu beenden, whlen Sie Jetzt beenden.", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "Bearbeiten" - IDS_MARK "Markieren" - IDS_COPY "Kopieren\tEnter" - IDS_PASTE "Einfgen" - IDS_SELECTALL "Alles auswhlen" - IDS_SCROLL "Scrollen" - IDS_FIND "Suchen..." - IDS_DEFAULTS "Standardwerte" - IDS_PROPERTIES "Eigenschaften" - IDS_SCROLLHERE "Hier scrollen" - IDS_SCROLLTOP "Ganz nach oben scrollen" - IDS_SCROLLBOTTOM "Ganz nach unten scrollen" - IDS_SCROLLPAGE_UP "Seite nach oben" - IDS_SCROLLPAGE_DOWN "Seite nach unten" - IDS_SCROLLUP "Nach oben scrollen" - IDS_SCROLLDOWN "Nach unten scrollen" - - IDS_COMMAND_PROMPT "Eingabeaufforderung" -END diff --git a/deprecated/win32csr/lang/el-GR.rc b/deprecated/win32csr/lang/el-GR.rc deleted file mode 100644 index 4990fb194c4..00000000000 --- a/deprecated/win32csr/lang/el-GR.rc +++ /dev/null @@ -1,58 +0,0 @@ -LANGUAGE LANG_GREEK, SUBLANG_DEFAULT - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " - " -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT " ... ",IDC_STATIC,7,7,186,11 - CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT " , . , ' '.", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "& ",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION " - " -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "",IDCANCEL,142,98,43,17 - PUSHBUTTON "& ",IDC_END_NOW,78,98,43,17 - LTEXT " ",IDC_STATIC,7,7,178,8 - LTEXT " ReactOS , ''", - IDC_STATIC,7,26,178,16 - LTEXT " , . , ' '.", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "" - IDS_MARK "" - IDS_COPY "\tEnter" - IDS_PASTE "" - IDS_SELECTALL " " - IDS_SCROLL "" - IDS_FIND "..." - IDS_DEFAULTS "" - IDS_PROPERTIES "" - IDS_SCROLLHERE " " - IDS_SCROLLTOP "" - IDS_SCROLLBOTTOM "" - IDS_SCROLLPAGE_UP " " - IDS_SCROLLPAGE_DOWN " " - IDS_SCROLLUP " " - IDS_SCROLLDOWN " " - - IDS_COMMAND_PROMPT "Command Prompt" -END diff --git a/deprecated/win32csr/lang/en-US.rc b/deprecated/win32csr/lang/en-US.rc deleted file mode 100644 index 9c4e16f8513..00000000000 --- a/deprecated/win32csr/lang/en-US.rc +++ /dev/null @@ -1,58 +0,0 @@ -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "End Program - " -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Ending Program... Please wait",IDC_STATIC,7,7,186,11 - CONTROL "Progress",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT "If you choose to end the program immediately, you will lose any unsaved data. To end the program now, click End Now.", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "&End Now",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "End Program - " -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "Cancel",IDCANCEL,142,98,43,17 - PUSHBUTTON "&End Now",IDC_END_NOW,78,98,43,17 - LTEXT "This program is not responding",IDC_STATIC,7,7,178,8 - LTEXT "To return to ReactOS and check the status of the program, click Cancel", - IDC_STATIC,7,26,178,16 - LTEXT "If you choose to end the program immediately, you will lose any unsaved data. To end the program now, click End Now", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "Edit" - IDS_MARK "Mark" - IDS_COPY "Copy\tEnter" - IDS_PASTE "Paste" - IDS_SELECTALL "Select All" - IDS_SCROLL "Scroll" - IDS_FIND "Find..." - IDS_DEFAULTS "Defaults" - IDS_PROPERTIES "Properties" - IDS_SCROLLHERE "Scroll here" - IDS_SCROLLTOP "Scroll top" - IDS_SCROLLBOTTOM "Scroll bottom" - IDS_SCROLLPAGE_UP "Page up" - IDS_SCROLLPAGE_DOWN "Page down" - IDS_SCROLLUP "Scroll up" - IDS_SCROLLDOWN "Scroll down" - - IDS_COMMAND_PROMPT "Command Prompt" -END diff --git a/deprecated/win32csr/lang/es-ES.rc b/deprecated/win32csr/lang/es-ES.rc deleted file mode 100644 index d24849f9c38..00000000000 --- a/deprecated/win32csr/lang/es-ES.rc +++ /dev/null @@ -1,63 +0,0 @@ -/* - *Spanish Language resource file - * Traducido por: Javier Remacha 2008-26-01 - */ - -LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Finalizar programa - " -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Finalizando programa... Por favor, espere",IDC_STATIC,7,7,186,11 - CONTROL "Progreso",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT "Si elige finalizar el programa ahora, perder todos los datos no guardados. Para finalizar el programa ahora, haga clic en Finalizar ahora.", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "&Finalizar ahora",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Finalizar programa - " -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "Cancelar",IDCANCEL,142,98,43,17 - PUSHBUTTON "&Finalizar ahora",IDC_END_NOW,78,98,43,17 - LTEXT "Este programa no responde",IDC_STATIC,7,7,178,8 - LTEXT "Para volver a ReactOS y ver el estado del programa, haga clic en Cancelar", - IDC_STATIC,7,26,178,16 - LTEXT "Si elige finalizar el programa ahora, perder todos los datos no guardados. Para finalizar el programa ahora, haga clic en Finalizar ahora.", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "Editar" - IDS_MARK "Marcar" - IDS_COPY "Copiar\tIntroducir" - IDS_PASTE "Pegar" - IDS_SELECTALL "Seleccionar Todo" - IDS_SCROLL "Desplazar" - IDS_FIND "Buscar..." - IDS_DEFAULTS "Por defecto" - IDS_PROPERTIES "Propiedades" - IDS_SCROLLHERE "Desplazar aqu" - IDS_SCROLLTOP "Desplazar hasta arriba" - IDS_SCROLLBOTTOM "Desplazar hasta abajo" - IDS_SCROLLPAGE_UP "Subir pgina" - IDS_SCROLLPAGE_DOWN "Bajar pgina" - IDS_SCROLLUP "Desplazar arriba" - IDS_SCROLLDOWN "Desplazar abajo" - - IDS_COMMAND_PROMPT "Command Prompt" -END diff --git a/deprecated/win32csr/lang/fr-FR.rc b/deprecated/win32csr/lang/fr-FR.rc deleted file mode 100644 index 8dbe9f55a05..00000000000 --- a/deprecated/win32csr/lang/fr-FR.rc +++ /dev/null @@ -1,60 +0,0 @@ -LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Fin du programme - " -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Termine le programme... Veuillez patienter",IDC_STATIC,7,7,186,11 - CONTROL "Avancement",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT "Si vous choisissez de terminer le programme immdiatement, vous perdrez toutes les donnes non sauvegardes. Pour terminer le programme maintenant, cliquez sur Terminer maintenant.", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "T&erminer maintenant",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Fin du programme - " -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "Annuler",IDCANCEL,142,98,43,17 - PUSHBUTTON "T&erminer maintenant",IDC_END_NOW,78,98,43,17 - LTEXT "Ce programme ne rpond pas",IDC_STATIC,7,7,178,8 - LTEXT "Pour retourner ReactOS et vrifier l'tat du programme, cliquez sur Annuler", - IDC_STATIC,7,26,178,16 - LTEXT "Si vous choisissez de terminer le programme immdiatement, vous perdrez toutes les donnes non sauvegardes. Pour terminer le programme maintenant, cliquez sur Terminer maintenant", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -/* Fixme : Translation could be really improved, with context - La traduction pourrait rellement tre amliore grce au contexte */ -STRINGTABLE -BEGIN - IDS_EDIT "diter" - IDS_MARK "Marquer" - IDS_COPY "Copier\tEntre" - IDS_PASTE "Coller" - IDS_SELECTALL "Tout slectionner" - IDS_SCROLL "Dfiler" - IDS_FIND "Trouver..." - IDS_DEFAULTS "Dfauts" - IDS_PROPERTIES "Proprits" - IDS_SCROLLHERE "Dfiler ici" - IDS_SCROLLTOP "Dfiler tout en haut" - IDS_SCROLLBOTTOM "Dfiler tout en bas" - IDS_SCROLLPAGE_UP "Page prcdente" - IDS_SCROLLPAGE_DOWN "Page suivante" - IDS_SCROLLUP "Dfiler en haut" - IDS_SCROLLDOWN "Dfiler en bas" - - IDS_COMMAND_PROMPT "Command Prompt" -END diff --git a/deprecated/win32csr/lang/he-IL.rc b/deprecated/win32csr/lang/he-IL.rc deleted file mode 100644 index fc833755a45..00000000000 --- a/deprecated/win32csr/lang/he-IL.rc +++ /dev/null @@ -1,58 +0,0 @@ -LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "סיום תכנית - " -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "מסיים תכנית... נא להמתין",IDC_STATIC,7,7,186,11 - CONTROL "Progress",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT "If you choose to end the program immediately, you will lose any unsaved data. To end the program now, click End Now.", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "סיים כעת",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "סיום תכנית - " -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "ביטול",IDCANCEL,142,98,43,17 - PUSHBUTTON "סיים כעת",IDC_END_NOW,78,98,43,17 - LTEXT "התכנית אינה מגיבה",IDC_STATIC,7,7,178,8 - LTEXT "To return to ReactOS and check the status of the program, click Cancel", - IDC_STATIC,7,26,178,16 - LTEXT "If you choose to end the program immediately, you will lose any unsaved data. To end the program now, click End Now", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "ערוך" - IDS_MARK "סמן" - IDS_COPY "העתק\tEnter" - IDS_PASTE "הדבק" - IDS_SELECTALL "בחר הכל" - IDS_SCROLL "גלול" - IDS_FIND "מצא..." - IDS_DEFAULTS "ברירת מחדל" - IDS_PROPERTIES "מאפיינים" - IDS_SCROLLHERE "גלול לכאן" - IDS_SCROLLTOP "גלול למעלה" - IDS_SCROLLBOTTOM "גלול למטה" - IDS_SCROLLPAGE_UP "עמוד מעלה" - IDS_SCROLLPAGE_DOWN "עמוד מטה" - IDS_SCROLLUP "גלול מעלה" - IDS_SCROLLDOWN "גלול מטה" - - IDS_COMMAND_PROMPT "שורת הפקודה" -END diff --git a/deprecated/win32csr/lang/id-ID.rc b/deprecated/win32csr/lang/id-ID.rc deleted file mode 100644 index 3df62722928..00000000000 --- a/deprecated/win32csr/lang/id-ID.rc +++ /dev/null @@ -1,58 +0,0 @@ -LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Akhir Program - " -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Mengakhiri Program... Harap menunggu",IDC_STATIC,7,7,186,11 - CONTROL "Progres",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT "Jika anda memilih untuk segera mengakhiri program, anda akan kehilangan data yang belum disimpan. Untuk mengakhiri program sekarang, klik Akhiri Sekarang.", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "&Akhiri Sekarang",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Mengakhiri Program - " -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "Batal",IDCANCEL,142,98,43,17 - PUSHBUTTON "&Akhiri Sekarang",IDC_END_NOW,78,98,43,17 - LTEXT "Program ini tidak merespon",IDC_STATIC,7,7,178,8 - LTEXT "Untuk kembali ke ReactOS dan memeriksa status program, klik Batal", - IDC_STATIC,7,26,178,16 - LTEXT "Jika anda memilih untuk segera mengakhiri program, anda akan kehilangan data yang belum disimpan. Untuk mengakhiri program sekarang, klik Akhiri Sekarang.", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "Edit" - IDS_MARK "Tandai" - IDS_COPY "Copy\tEnter" - IDS_PASTE "Paste" - IDS_SELECTALL "Pilih Semua" - IDS_SCROLL "Gulung" - IDS_FIND "Cari..." - IDS_DEFAULTS "Standar" - IDS_PROPERTIES "Properti" - IDS_SCROLLHERE "Gulung ke Sini" - IDS_SCROLLTOP "Gulung ke Atas" - IDS_SCROLLBOTTOM "Gulung ke Bawah" - IDS_SCROLLPAGE_UP "Halaman Naik" - IDS_SCROLLPAGE_DOWN "Halaman Turun" - IDS_SCROLLUP "Gulung Naik" - IDS_SCROLLDOWN "Gulung Turun" - - IDS_COMMAND_PROMPT "Command Prompt" -END diff --git a/deprecated/win32csr/lang/it-IT.rc b/deprecated/win32csr/lang/it-IT.rc deleted file mode 100644 index a6402c1b5e4..00000000000 --- a/deprecated/win32csr/lang/it-IT.rc +++ /dev/null @@ -1,67 +0,0 @@ -/* -* PROJECT: ReactOS Client/Server Runtime subsystem -* LICENSE: GPL - See COPYING in the top level directory -* FILE: subsystems/win32/csrss/win32csr/lang/it-IT.rc -* PURPOSE: Italian Translation of subsystems/win32/csrss/win32csr/lang/en-US.rc -* PROGRAMMERS: -* Copyright (C) 2007 Daniele Forsi (dforsi at gmail.com) Italian Translation -*/ - -LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Arresto del programma - " -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Arresto del programma... Attendere",IDC_STATIC,7,7,186,11 - CONTROL "Progresso",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT "Se si sceglie di terminare il programma immediatamente, si perderanno tutti i dati non salvati. Per terminare il programma ora, selezionare Termina ora.", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "T&ermina ora",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Arresto del programma - " -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "Annulla",IDCANCEL,142,98,43,17 - PUSHBUTTON "T&ermina ora",IDC_END_NOW,78,98,43,17 - LTEXT "Il programma non risponde",IDC_STATIC,7,7,178,8 - LTEXT "Per tornare a ReactOS e controllare lo stato del programma, selezionare Annulla", - IDC_STATIC,7,26,178,16 - LTEXT "Se si sceglie di terminare il programma immediatamente, si perderanno tutti i dati non salvati. Per terminare il programma ora, selezionare Termina ora.", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "Modifica" - IDS_MARK "Seleziona" - IDS_COPY "Copia\tInvio" - IDS_PASTE "Incolla" - IDS_SELECTALL "Seleziona tutto" - IDS_SCROLL "Scorri" - IDS_FIND "Trova..." - IDS_DEFAULTS "Impostazioni predefinite" - IDS_PROPERTIES "Propriet" - IDS_SCROLLHERE "Scorri qui" - IDS_SCROLLTOP "Scorri in cima" - IDS_SCROLLBOTTOM "Scorri in fondo" - IDS_SCROLLPAGE_UP "Pagina s" - IDS_SCROLLPAGE_DOWN "Pagina gi" - IDS_SCROLLUP "Scorri s" - IDS_SCROLLDOWN "Scorri gi" - - IDS_COMMAND_PROMPT "Prompt dei commandi" -END diff --git a/deprecated/win32csr/lang/ja-JP.rc b/deprecated/win32csr/lang/ja-JP.rc deleted file mode 100644 index fd87c2d86d1..00000000000 --- a/deprecated/win32csr/lang/ja-JP.rc +++ /dev/null @@ -1,58 +0,0 @@ -LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "vȌI - " -FONT 9, "MS UI Gothic" -BEGIN - LTEXT "vOIĂ܂... ΂炭҂",IDC_STATIC,7,7,186,11 - CONTROL "Progress",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT "vOɏI悤IꍇAۑĂȂf[^ׂ͂Ď܂BvOIɂ[ɏI]NbNĂB", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "ɏI(&E)",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "vȌI - " -FONT 9, "MS UI Gothic" -BEGIN - DEFPUSHBUTTON "LZ",IDCANCEL,142,98,43,17 - PUSHBUTTON "ɏI(&E)",IDC_END_NOW,78,98,43,17 - LTEXT "̃vO͉Ă܂",IDC_STATIC,7,7,178,8 - LTEXT "ReactOS ɖ߂ăvȌԂmFɂ[LZ]NbNĂ", - IDC_STATIC,7,26,178,16 - LTEXT "vOɏI悤IꍇAۑĂȂf[^ׂ͂Ď܂BvO𒼂ɏIɂ[ɏI]NbNĂ", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 9, "MS UI Gothic", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "ҏW" - IDS_MARK "͈͎w" - IDS_COPY "Rs[\tEnter" - IDS_PASTE "\\t" - IDS_SELECTALL "ׂđI" - IDS_SCROLL "XN[" - IDS_FIND "..." - IDS_DEFAULTS "Kl" - IDS_PROPERTIES "vpeB" - IDS_SCROLLHERE "ɃXN[" - IDS_SCROLLTOP "ԏɃXN[" - IDS_SCROLLBOTTOM "ԉɃXN[" - IDS_SCROLLPAGE_UP "Page up" - IDS_SCROLLPAGE_DOWN "Page down" - IDS_SCROLLUP "ɃXN[" - IDS_SCROLLDOWN "ɃXN[" - - IDS_COMMAND_PROMPT "Command Prompt" -END diff --git a/deprecated/win32csr/lang/no-NO.rc b/deprecated/win32csr/lang/no-NO.rc deleted file mode 100644 index 684b28ddb86..00000000000 --- a/deprecated/win32csr/lang/no-NO.rc +++ /dev/null @@ -1,58 +0,0 @@ -LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Avslutt program - " -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Avslutt Program... Vennligst vent",IDC_STATIC,7,7,186,11 - CONTROL "Progress",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT "Hvis du velger avslutte programmet yeblikkelig, vil du miste alt data som ikke er lagret. For avslutte programmet n, Trykk p Avslutt n.", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "&Avslutt n",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Avslutt program - " -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "Avbryt",IDCANCEL,142,98,43,17 - PUSHBUTTON "&Avslutt n",IDC_END_NOW,78,98,43,17 - LTEXT "Programmet svarer ikke",IDC_STATIC,7,7,178,8 - LTEXT "For returnere til ReactOS for sjekke statusen p programmet, trykk p avbryt", - IDC_STATIC,7,26,178,16 - LTEXT "Hvis du velger avslutte programmet yeblikkelig, vil du miste alt data som ikke er lagret. For avslutte programmet n, Trykk p Avslutt n", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "Rediger" - IDS_MARK "Merk" - IDS_COPY "Kopier\tEnter" - IDS_PASTE "Lim inn" - IDS_SELECTALL "Velg alt" - IDS_SCROLL "Rull" - IDS_FIND "Finn..." - IDS_DEFAULTS "Standard" - IDS_PROPERTIES "Egenskaper" - IDS_SCROLLHERE "Rull her" - IDS_SCROLLTOP "Rull til toppen" - IDS_SCROLLBOTTOM "Rull knapp" - IDS_SCROLLPAGE_UP "Side opp" - IDS_SCROLLPAGE_DOWN "Side ned" - IDS_SCROLLUP "Rull opp" - IDS_SCROLLDOWN "Rull ned" - - IDS_COMMAND_PROMPT "Command Prompt" -END diff --git a/deprecated/win32csr/lang/pl-PL.rc b/deprecated/win32csr/lang/pl-PL.rc deleted file mode 100644 index ee4baf9419b..00000000000 --- a/deprecated/win32csr/lang/pl-PL.rc +++ /dev/null @@ -1,66 +0,0 @@ -/* - * translated by xrogers - * xxrogers@users.sourceforge.net - * https://sourceforge.net/projects/reactospl - * translation update by Olaf Siejka (Caemyr), Apr 2011 - * UTF-8 conversion by Caemyr (May, 2011) - */ - -LANGUAGE LANG_POLISH, SUBLANG_DEFAULT - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Zakończ program - " -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Trwa zamykanie programu... Proszę czekać",IDC_STATIC,7,7,186,11 - CONTROL "Postęp",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT "Jeśli zdecydujesz się zamknąć program natychmiastowo, utracisz wszelkie niezapisane dane. Aby zakończyć program, wciśnij Zakończ teraz.", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "&Zakończ teraz",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Zakończ program - " -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "Anuluj",IDCANCEL,142,98,43,17 - PUSHBUTTON "&Zakończ teraz",IDC_END_NOW,78,98,43,17 - LTEXT "Wybrany program nie odpowiada",IDC_STATIC,7,7,178,8 - LTEXT "Aby powrócić do ReactOS i sprawdzić status programu, kliknij Anuluj", - IDC_STATIC,7,26,178,16 - LTEXT "Jeśli zdecydujesz się zamknąć program natychmiastowo, utracisz wszelkie niezapisane dane. Aby zakończyć program, wciśnij Zakończ teraz.", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "Edytuj" - IDS_MARK "Zaznacz" - IDS_COPY "Kopiuj\tWejdź" - IDS_PASTE "Wklej" - IDS_SELECTALL "Zaznacz wszystko" - IDS_SCROLL "Przewiń" - IDS_FIND "Znajdź..." - IDS_DEFAULTS "Ustawienia domyślne" - IDS_PROPERTIES "Właściwości" - IDS_SCROLLHERE "Przewiń tutaj" - IDS_SCROLLTOP "Przewiń na początek" - IDS_SCROLLBOTTOM "Przewiń na koniec" - IDS_SCROLLPAGE_UP "Poprzednia strona" - IDS_SCROLLPAGE_DOWN "Następna strona" - IDS_SCROLLUP "Przewiń do góry" - IDS_SCROLLDOWN "Przewiń na dół" - - IDS_COMMAND_PROMPT "Wiersz polecenia" -END diff --git a/deprecated/win32csr/lang/pt-BR.rc b/deprecated/win32csr/lang/pt-BR.rc deleted file mode 100644 index c2f772c3852..00000000000 --- a/deprecated/win32csr/lang/pt-BR.rc +++ /dev/null @@ -1,60 +0,0 @@ -/* Translation and UTF-8 Conversion by mkbu95 (May, 2012) */ - -LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Finalizar Programa - " -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Finalizando Programa... Por favor aguarde",IDC_STATIC,7,7,186,11 - CONTROL "Progress",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT "Se você finalizar o programa imediatamente, você irá perder qualquer alteração não salva. Para finalizar o programa agora, pressione Finalizar Agora.", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "&Finalizar Agora",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Finalizar Programa - " -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "Cancelar",IDCANCEL,142,98,43,17 - PUSHBUTTON "&Finalizar Agora",IDC_END_NOW,78,98,43,17 - LTEXT "O programa não está respondendo",IDC_STATIC,7,7,178,8 - LTEXT "Parar retornar ao ReactOS e verificar o estado do programa, pressione Cancelar", - IDC_STATIC,7,26,178,16 - LTEXT "Se você finalizar o programa imediatamente, você irá perder qualquer alteração não salva. Para finalizar o programa agora, pressione Finalizar Agora", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "Editar" - IDS_MARK "Marcar" - IDS_COPY "Copiar\tEnter" - IDS_PASTE "Colar" - IDS_SELECTALL "Selecionar Tudo" - IDS_SCROLL "Rolar" - IDS_FIND "Procurar..." - IDS_DEFAULTS "Padrões" - IDS_PROPERTIES "Propriedades" - IDS_SCROLLHERE "Rolar aqui" - IDS_SCROLLTOP "Rolar até o topo" - IDS_SCROLLBOTTOM "Rolar até o fim" - IDS_SCROLLPAGE_UP "Page up" - IDS_SCROLLPAGE_DOWN "Page down" - IDS_SCROLLUP "Scroll up" - IDS_SCROLLDOWN "Scroll down" - - IDS_COMMAND_PROMPT "Prompt de Comando" -END diff --git a/deprecated/win32csr/lang/ro-RO.rc b/deprecated/win32csr/lang/ro-RO.rc deleted file mode 100644 index e1d4213a85d..00000000000 --- a/deprecated/win32csr/lang/ro-RO.rc +++ /dev/null @@ -1,65 +0,0 @@ -/* - * FILE: subsystems/win32/csrss/win32csr/lang/ro-RO.rc - * ReactOS Project (http://www.reactos.org) - * TRANSLATOR: Fulea Ștefan (PM on ReactOS Forum at fulea.stefan) - * CHANGE LOG: 2011-10-16 initial translation - */ - -LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Terminare execuție - " -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Terminare execuție… așteptați",IDC_STATIC,7,7,186,11 - CONTROL "Progress", IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT "Dacă alegeți închiderea forțată, riscați pierderi de date. Pentru a forța închiderea, apăsați „Termină forțat”.", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "Termină &forțat",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Terminare execuție - " -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "A&nulează", IDCANCEL,142,98,43,17 - PUSHBUTTON "Termină &forțat",IDC_END_NOW,78,98,43,17 - LTEXT "Acest program nu răspunde",IDC_STATIC,7,7,178,8 - LTEXT "Pentru a vă întoarce în ReactOS și a verifica starea programului, apăsați „Anulează”", - IDC_STATIC,7,26,178,16 - LTEXT "Dacă alegeți închiderea imediată a programului, riscați pierderi de date. Pentru a forța închiderea, apăsați „Termină forțat”.", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "Editare" - IDS_MARK "Marchează" - IDS_COPY "Copiază\tEnter" - IDS_PASTE "Lipește" - IDS_SELECTALL "Selectează tot" - IDS_SCROLL "Derulează" - IDS_FIND "Găsire…" - IDS_DEFAULTS "Implicite" - IDS_PROPERTIES "Proprietăți" - IDS_SCROLLHERE "Derulează aici" - IDS_SCROLLTOP "Derulează la început" - IDS_SCROLLBOTTOM "Derulează la sfârșit" - IDS_SCROLLPAGE_UP "Pagina anterioară" - IDS_SCROLLPAGE_DOWN "Pagina următoare" - IDS_SCROLLUP "Derulează în sus" - IDS_SCROLLDOWN "Derulează în jos" - - IDS_COMMAND_PROMPT "Linie de comandă" -END diff --git a/deprecated/win32csr/lang/ru-RU.rc b/deprecated/win32csr/lang/ru-RU.rc deleted file mode 100644 index a8acd99f5e0..00000000000 --- a/deprecated/win32csr/lang/ru-RU.rc +++ /dev/null @@ -1,58 +0,0 @@ -LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Завершение программы - " -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Завершение программы... Пажалуйста подождите",IDC_STATIC,7,7,186,11 - CONTROL "Progress",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT "Если вы завершите программу сейчас, то вы можете потерять несохраненные данные. Чтобы завешить программу сейчас нажмите ""Завершить""", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "&Завешить",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Завершение программы - " -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "Отмена",IDCANCEL,142,98,43,17 - PUSHBUTTON "&Завершить",IDC_END_NOW,78,98,43,17 - LTEXT "Эта программа не отвечает",IDC_STATIC,7,7,178,8 - LTEXT "Для возврата в ReactOS и сохранения данных нажмите ""Отмена""", - IDC_STATIC,7,26,178,16 - LTEXT "Если вы завершите программу сейчас, то вы можете потерять несохраненные данные. Чтобы завешить программу сейчас нажмите ""Завершить""", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "Изменить" - IDS_MARK "Пометить" - IDS_COPY "Копировать\tEnter" - IDS_PASTE "Вставить" - IDS_SELECTALL "Выделить все" - IDS_SCROLL "Прокрутить" - IDS_FIND "Искать..." - IDS_DEFAULTS "Умолчания" - IDS_PROPERTIES "Свойства" - IDS_SCROLLHERE "Scroll Here" - IDS_SCROLLTOP "Scroll Top" - IDS_SCROLLBOTTOM "Прокрутить вниз" - IDS_SCROLLPAGE_UP "Вверх страницы" - IDS_SCROLLPAGE_DOWN "Вниз страницы" - IDS_SCROLLUP "Прокрутить вверх" - IDS_SCROLLDOWN "Scroll Down" - - IDS_COMMAND_PROMPT "Command Prompt" -END diff --git a/deprecated/win32csr/lang/sk-SK.rc b/deprecated/win32csr/lang/sk-SK.rc deleted file mode 100644 index 9c009370114..00000000000 --- a/deprecated/win32csr/lang/sk-SK.rc +++ /dev/null @@ -1,63 +0,0 @@ -/* TRANSLATOR: Mrio Kamr /Mario Kacmar/ aka Kario (kario@szm.sk) - * DATE OF TR: 29-05-2008 - * LastChange: 12-04-2011 - */ - -LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Ukonenie programu - " -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Ukonujem program... Pokajte, prosm.",IDC_STATIC,7,7,186,11 - CONTROL "Progress",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT "Ak zvolte okamit ukonenie programu, stratte vetky neuloen daje. Ak chcete program ukoni okamite, kliknite na tlaidlo Ukoni ihne.", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "&Ukoni ihne",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Ukonenie programu - " -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "Zrui",IDCANCEL,142,98,43,17 - PUSHBUTTON "&Ukoni ihne",IDC_END_NOW,78,98,43,17 - LTEXT "Tento program neodpoved.",IDC_STATIC,7,7,178,8 - LTEXT "Pre nvrat do systmu ReactOS a overenie stavu programu kliknite na tlaidlo Zrui.", - IDC_STATIC,7,26,178,16 - LTEXT "Ak zvolte okamit ukonenie programu, stratte vetky neuloen daje. Ak chcete program ukoni okamite, kliknite na tlaidlo Ukoni ihne.", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "Upravi" - IDS_MARK "Oznai" - IDS_COPY "Koprova\tEnter" - IDS_PASTE "Vloi" - IDS_SELECTALL "Vybra vetko" - IDS_SCROLL "Rolova" - IDS_FIND "Njs..." //Find - IDS_DEFAULTS "Predvolen" //Defaults - IDS_PROPERTIES "Vlastnosti" - IDS_SCROLLHERE "Rolova sem" - IDS_SCROLLTOP "K hornmu okraju" - IDS_SCROLLBOTTOM "K dolnmu okraju" - IDS_SCROLLPAGE_UP "O strnku vyie" - IDS_SCROLLPAGE_DOWN "O strnku niie" - IDS_SCROLLUP "Rolova nahor" - IDS_SCROLLDOWN "Rolova nadol" - - IDS_COMMAND_PROMPT "Prkazov riadok" -END diff --git a/deprecated/win32csr/lang/sv-SE.rc b/deprecated/win32csr/lang/sv-SE.rc deleted file mode 100644 index 2642ffbb1df..00000000000 --- a/deprecated/win32csr/lang/sv-SE.rc +++ /dev/null @@ -1,65 +0,0 @@ -/* - * PROJECT: ReactOS CSRSS subsystem - * FILE: subsystems/win32/csrss/win32csr/lang/sv-SE.rc - * PURPOSE: Swedish resource file - * Translation: Jaix Bly - */ - -LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "End Program - " -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Avsluta Program... Var vnlig vnta",IDC_STATIC,7,7,186,11 - CONTROL "Progress",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT "Om du vljer att avsluta programmet omedelbart kommer du att frlora all osparad data. Fr att avsluta programmet, klicka Avsluta nu.", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "&Avsluta Nu",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Avsluta Program - " -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "Avbryt",IDCANCEL,142,98,43,17 - PUSHBUTTON "&Avsluta Nu",IDC_END_NOW,78,98,43,17 - LTEXT "Detta programmet svarar inte",IDC_STATIC,7,7,178,8 - LTEXT "Fr att terg till ReactOS och underska programmets status klicka Avbryt", - IDC_STATIC,7,26,178,16 - LTEXT "m du vljer att avsluta programmet omedelbart kommer du att frlora all osparad data. Fr att avsluta programmet, klicka Avsluta nu.", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "Redigera" - IDS_MARK "Markera" - IDS_COPY "Kopiera\tEnter" - IDS_PASTE "Klistra in" - IDS_SELECTALL "Markera Allt" - IDS_SCROLL "Skrolla" - IDS_FIND "Sk..." - IDS_DEFAULTS "Ursprunglig" - IDS_PROPERTIES "Egenskaper" - IDS_SCROLLHERE "Skrolla hit" - IDS_SCROLLTOP "Skrolla till topp" - IDS_SCROLLBOTTOM "Skrolla till botten" - IDS_SCROLLPAGE_UP "Sida upp" - IDS_SCROLLPAGE_DOWN "Sida ner" - IDS_SCROLLUP "Skrolla upp" - IDS_SCROLLDOWN "Skrolla ner" - - IDS_COMMAND_PROMPT "Command Prompt" -END diff --git a/deprecated/win32csr/lang/tr-TR.rc b/deprecated/win32csr/lang/tr-TR.rc deleted file mode 100644 index 7a52434a221..00000000000 --- a/deprecated/win32csr/lang/tr-TR.rc +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Turkish resources - * - * Copyright 2012 Arda Tanrikulu - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Programı Sonlandır - " -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Program Sonlandırılıyor... Lütfen bekleyin",IDC_STATIC,7,7,186,11 - CONTROL "İşlem",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT "Programı hemen kapatmayı seçerseniz, kaydedilmemiş veriyi kaybedersiniz. Programdan şimdi çıkmak için Şimdi Sonlandır'ı tıklatın.", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "&Şimdi Sonlandır",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "End Program - " -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "İptal",IDCANCEL,142,98,43,17 - PUSHBUTTON "Şimdi Sonlandır",IDC_END_NOW,78,98,43,17 - LTEXT "Bu program yanıt vermiyor.",IDC_STATIC,7,7,178,8 - LTEXT "ReactOS'a dönmek ve programın durumunu denetlemek için İptal'i tıklatın.", - IDC_STATIC,7,26,178,16 - LTEXT "Programı hemen kapatmayı seçerseniz, kaydedilmemiş veriyi kaybedersiniz. Programdan şimdi çıkmak için Şimdi Sonlandır'ı tıklatın.", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "Düzenle" - IDS_MARK "İşaretle" - IDS_COPY "Kopyala\tEnter" - IDS_PASTE "Yapıştır" - IDS_SELECTALL "Tümünü Seç" - IDS_SCROLL "Yuvarla" - IDS_FIND "Bul..." - IDS_DEFAULTS "Varsayılanlar" - IDS_PROPERTIES "Özellikler" - IDS_SCROLLHERE "Buraya yuvarla" - IDS_SCROLLTOP "Üste yuvarla" - IDS_SCROLLBOTTOM "Alta yuvarla" - IDS_SCROLLPAGE_UP "Sayfa yukarı" - IDS_SCROLLPAGE_DOWN "Sayfa aşağı" - IDS_SCROLLUP "Yukarı yuvarla" - IDS_SCROLLDOWN "Aşağı yuvarla" - - IDS_COMMAND_PROMPT "Komut İstemi" -END diff --git a/deprecated/win32csr/lang/uk-UA.rc b/deprecated/win32csr/lang/uk-UA.rc deleted file mode 100644 index 8b6e67bf543..00000000000 --- a/deprecated/win32csr/lang/uk-UA.rc +++ /dev/null @@ -1,66 +0,0 @@ -/* - * PROJECT: ReactOS CSRSS subsystem - * LICENSE: GPL - See COPYING in the top level directory - * FILE: subsystems/win32/csrss/win32csr/lang/uk-UA.rc - * PURPOSE: Ukraianian resource file - * TRANSLATOR: Artem Reznikov - */ - -LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Завершення програми - " -FONT 8, "MS Shell Dlg" -BEGIN - LTEXT "Завершення програми... Зачекайте",IDC_STATIC,7,7,186,11 - CONTROL "Прогрес",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT "Якщо завершити програму негайно, то можна втратити всі незбережені дані. Щоб завершити програму зараз, натисніть 'Завершити зараз'", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "&Завершити зараз",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Завершення програми - " -FONT 8, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "Скасувати",IDCANCEL,142,98,43,17 - PUSHBUTTON "&Завершити зараз",IDC_END_NOW,78,98,43,17 - LTEXT "Ця програма не відповідає",IDC_STATIC,7,7,178,8 - LTEXT "Щоб повернутися у ReactOS і перевірити стан програми, натисніть 'Скасувати'", - IDC_STATIC,7,26,178,16 - LTEXT "Якщо завершити програму негайно, то можна втратити всі незбережені дані. Щоб завершити програму зараз, натисніть 'Завершити зараз'", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "Редагувати" - IDS_MARK "Виділити" - IDS_COPY "Копіювати\tEnter" - IDS_PASTE "Вставити" - IDS_SELECTALL "Виділити все" - IDS_SCROLL "Прокрутити" - IDS_FIND "Знайти..." - IDS_DEFAULTS "Замовчування" - IDS_PROPERTIES "Властивості" - IDS_SCROLLHERE "Прокрутити сюди" - IDS_SCROLLTOP "Прокрутити на початок" - IDS_SCROLLBOTTOM "Прокрутити на кінець" - IDS_SCROLLPAGE_UP "Попередня сотрінка" - IDS_SCROLLPAGE_DOWN "Наступна сторінка" - IDS_SCROLLUP "Прокрутити догори" - IDS_SCROLLDOWN "Прокрутити донизу" - - IDS_COMMAND_PROMPT "Командний рядок" -END diff --git a/deprecated/win32csr/lang/zh-CN.rc b/deprecated/win32csr/lang/zh-CN.rc deleted file mode 100644 index 4c32bdd6e04..00000000000 --- a/deprecated/win32csr/lang/zh-CN.rc +++ /dev/null @@ -1,58 +0,0 @@ -LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "ֹ - " -FONT 9, "MS Shell Dlg" -BEGIN - LTEXT "ֹ... ȴ",IDC_STATIC,7,7,186,11 - CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT "ѡֹʧȥδݡҪ򣬵ֹ", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "ֹ(&E)",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "ֹ - " -FONT 9, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "ȡ",IDCANCEL,142,98,43,17 - PUSHBUTTON "ֹ(&E)",IDC_END_NOW,78,98,43,17 - LTEXT "˳δӦ",IDC_STATIC,7,7,178,8 - LTEXT "Ҫ ReactOS ó״̬ȡ", - IDC_STATIC,7,26,178,16 - LTEXT "ѡֹʧȥδݡҪ򣬵ֹ", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 9, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "༭" - IDS_MARK "" - IDS_COPY "\tEnter" - IDS_PASTE "" - IDS_SELECTALL "ȫѡ" - IDS_SCROLL "" - IDS_FIND "..." - IDS_DEFAULTS "Ĭ" - IDS_PROPERTIES "" - IDS_SCROLLHERE "" - IDS_SCROLLTOP "" - IDS_SCROLLBOTTOM "ĩ" - IDS_SCROLLPAGE_UP "һҳ" - IDS_SCROLLPAGE_DOWN "һҳ" - IDS_SCROLLUP "Ϲ" - IDS_SCROLLDOWN "¹" - - IDS_COMMAND_PROMPT "Command Prompt" -END diff --git a/deprecated/win32csr/lang/zh-TW.rc b/deprecated/win32csr/lang/zh-TW.rc deleted file mode 100644 index 1d24b7dda9b..00000000000 --- a/deprecated/win32csr/lang/zh-TW.rc +++ /dev/null @@ -1,58 +0,0 @@ -LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL - -IDD_END_NOW DIALOGEX DISCARDABLE 0, 0, 200, 95 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "{" -FONT 9, "MS Shell Dlg" -BEGIN - LTEXT "b{... еy",IDC_STATIC,7,7,186,11 - CONTROL "Progress",IDC_PROGRESS,"msctls_progress32",WS_BORDER, - 7,20,186,13 - LTEXT "pGzܥߧY{AzNhҦxsơCYnߧY{AЫUߧYC", - IDC_STATIC,7,40,186,26 - DEFPUSHBUTTON "ߧY(&E)",IDC_END_NOW,150,71,43,17 -END - -IDD_NOT_RESPONDING DIALOGEX DISCARDABLE 0, 0, 192, 122 -STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "{ - " -FONT 9, "MS Shell Dlg" -BEGIN - DEFPUSHBUTTON "",IDCANCEL,142,98,43,17 - PUSHBUTTON "ߧY(&E) ",IDC_END_NOW,78,98,43,17 - LTEXT "{åT",IDC_STATIC,7,7,178,8 - LTEXT "Yn^ ReactOS ˵{AAЫU", - IDC_STATIC,7,26,178,16 - LTEXT "pGzܥߧY{AzNhҦxsơCYnߧY{AЫUߧYC", - IDC_STATIC,7,53,178,26 -END - -IDD_SWITCH_APP DIALOGEX 90, 90, 265, 170 -STYLE DS_SYSMODAL | DS_SETFONT | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -FONT 9, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "",IDC_STATIC_CUR_APP,39,139,204,16,SS_SUNKEN,WS_EX_STATICEDGE -END - -STRINGTABLE -BEGIN - IDS_EDIT "s" - IDS_MARK "аO" - IDS_COPY "ƻs\tEnter" - IDS_PASTE "HK" - IDS_SELECTALL "" - IDS_SCROLL "u" - IDS_FIND "M..." - IDS_DEFAULTS "w]" - IDS_PROPERTIES "ݩ" - IDS_SCROLLHERE "uʨ즹 " - IDS_SCROLLTOP "uʨ쳻m" - IDS_SCROLLBOTTOM "uʨ쥽" - IDS_SCROLLPAGE_UP "W@" - IDS_SCROLLPAGE_DOWN "U@" - IDS_SCROLLUP "VWu" - IDS_SCROLLDOWN "VUu" - - IDS_COMMAND_PROMPT "Command Prompt" -END diff --git a/deprecated/win32csr/lineinput.c b/deprecated/win32csr/lineinput.c deleted file mode 100644 index 78cbe27cfb1..00000000000 --- a/deprecated/win32csr/lineinput.c +++ /dev/null @@ -1,597 +0,0 @@ -/* - * PROJECT: ReactOS CSRSS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: subsystems/win32/csrss/win32csr/lineinput.c - * PURPOSE: Console line input functions - * PROGRAMMERS: Jeffrey Morlan - */ - -/* INCLUDES ******************************************************************/ - -#define NDEBUG -#include "w32csr.h" -#include - -typedef struct tagHISTORY_BUFFER -{ - LIST_ENTRY ListEntry; - WORD Position; - WORD MaxEntries; - WORD NumEntries; - PUNICODE_STRING Entries; - UNICODE_STRING ExeName; -} HISTORY_BUFFER, *PHISTORY_BUFFER; - -/* FUNCTIONS *****************************************************************/ - -static PHISTORY_BUFFER -HistoryCurrentBuffer(PCSRSS_CONSOLE Console) -{ - /* TODO: use actual EXE name sent from process that called ReadConsole */ - UNICODE_STRING ExeName = { 14, 14, L"cmd.exe" }; - PLIST_ENTRY Entry = Console->HistoryBuffers.Flink; - PHISTORY_BUFFER Hist; - - for (; Entry != &Console->HistoryBuffers; Entry = Entry->Flink) - { - Hist = CONTAINING_RECORD(Entry, HISTORY_BUFFER, ListEntry); - if (RtlEqualUnicodeString(&ExeName, &Hist->ExeName, FALSE)) - return Hist; - } - - /* Couldn't find the buffer, create a new one */ - Hist = HeapAlloc(Win32CsrApiHeap, 0, sizeof(HISTORY_BUFFER) + ExeName.Length); - if (!Hist) - return NULL; - Hist->MaxEntries = Console->HistoryBufferSize; - Hist->NumEntries = 0; - Hist->Entries = HeapAlloc(Win32CsrApiHeap, 0, Hist->MaxEntries * sizeof(UNICODE_STRING)); - if (!Hist->Entries) - { - HeapFree(Win32CsrApiHeap, 0, Hist); - return NULL; - } - Hist->ExeName.Length = Hist->ExeName.MaximumLength = ExeName.Length; - Hist->ExeName.Buffer = (PWCHAR)(Hist + 1); - memcpy(Hist->ExeName.Buffer, ExeName.Buffer, ExeName.Length); - InsertHeadList(&Console->HistoryBuffers, &Hist->ListEntry); - return Hist; -} - -static VOID -HistoryAddEntry(PCSRSS_CONSOLE Console) -{ - UNICODE_STRING NewEntry; - PHISTORY_BUFFER Hist; - INT i; - - NewEntry.Length = NewEntry.MaximumLength = Console->LineSize * sizeof(WCHAR); - NewEntry.Buffer = Console->LineBuffer; - - if (!(Hist = HistoryCurrentBuffer(Console))) - return; - - /* Don't add blank or duplicate entries */ - if (NewEntry.Length == 0 || Hist->MaxEntries == 0 || - (Hist->NumEntries > 0 && - RtlEqualUnicodeString(&Hist->Entries[Hist->NumEntries - 1], &NewEntry, FALSE))) - { - return; - } - - if (Console->HistoryNoDup) - { - /* Check if this line has been entered before */ - for (i = Hist->NumEntries - 1; i >= 0; i--) - { - if (RtlEqualUnicodeString(&Hist->Entries[i], &NewEntry, FALSE)) - { - /* Just rotate the list to bring this entry to the end */ - NewEntry = Hist->Entries[i]; - memmove(&Hist->Entries[i], &Hist->Entries[i + 1], - (Hist->NumEntries - (i + 1)) * sizeof(UNICODE_STRING)); - Hist->Entries[Hist->NumEntries - 1] = NewEntry; - Hist->Position = Hist->NumEntries - 1; - return; - } - } - } - - if (Hist->NumEntries == Hist->MaxEntries) - { - /* List is full, remove oldest entry */ - RtlFreeUnicodeString(&Hist->Entries[0]); - memmove(&Hist->Entries[0], &Hist->Entries[1], - --Hist->NumEntries * sizeof(UNICODE_STRING)); - } - - if (NT_SUCCESS(RtlDuplicateUnicodeString(0, &NewEntry, &Hist->Entries[Hist->NumEntries]))) - Hist->NumEntries++; - Hist->Position = Hist->NumEntries - 1; -} - -static VOID -HistoryGetCurrentEntry(PCSRSS_CONSOLE Console, PUNICODE_STRING Entry) -{ - PHISTORY_BUFFER Hist; - if (!(Hist = HistoryCurrentBuffer(Console)) || Hist->NumEntries == 0) - Entry->Length = 0; - else - *Entry = Hist->Entries[Hist->Position]; -} - -static PHISTORY_BUFFER -HistoryFindBuffer(PCSRSS_CONSOLE Console, PUNICODE_STRING ExeName) -{ - PLIST_ENTRY Entry = Console->HistoryBuffers.Flink; - while (Entry != &Console->HistoryBuffers) - { - /* For the history APIs, the caller is allowed to give only part of the name */ - PHISTORY_BUFFER Hist = CONTAINING_RECORD(Entry, HISTORY_BUFFER, ListEntry); - if (RtlPrefixUnicodeString(ExeName, &Hist->ExeName, TRUE)) - return Hist; - Entry = Entry->Flink; - } - return NULL; -} - -VOID FASTCALL -HistoryDeleteBuffer(PHISTORY_BUFFER Hist) -{ - if (!Hist) - return; - while (Hist->NumEntries != 0) - RtlFreeUnicodeString(&Hist->Entries[--Hist->NumEntries]); - HeapFree(Win32CsrApiHeap, 0, Hist->Entries); - RemoveEntryList(&Hist->ListEntry); - HeapFree(Win32CsrApiHeap, 0, Hist); -} - -CSR_API(CsrGetCommandHistoryLength) -{ - PCSRSS_CONSOLE Console; - NTSTATUS Status; - PHISTORY_BUFFER Hist; - ULONG Length = 0; - INT i; - - if (!Win32CsrValidateBuffer(ProcessData, - Request->Data.GetCommandHistoryLength.ExeName.Buffer, - Request->Data.GetCommandHistoryLength.ExeName.Length, 1)) - { - return STATUS_ACCESS_VIOLATION; - } - - Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (NT_SUCCESS(Status)) - { - Hist = HistoryFindBuffer(Console, &Request->Data.GetCommandHistory.ExeName); - if (Hist) - { - for (i = 0; i < Hist->NumEntries; i++) - Length += Hist->Entries[i].Length + sizeof(WCHAR); - } - Request->Data.GetCommandHistoryLength.Length = Length; - ConioUnlockConsole(Console); - } - return Status; -} - -CSR_API(CsrGetCommandHistory) -{ - PCSRSS_CONSOLE Console; - NTSTATUS Status; - PHISTORY_BUFFER Hist; - PBYTE Buffer = (PBYTE)Request->Data.GetCommandHistory.History; - ULONG BufferSize = Request->Data.GetCommandHistory.Length; - INT i; - - if (!Win32CsrValidateBuffer(ProcessData, Buffer, BufferSize, 1) || - !Win32CsrValidateBuffer(ProcessData, - Request->Data.GetCommandHistory.ExeName.Buffer, - Request->Data.GetCommandHistory.ExeName.Length, 1)) - { - return STATUS_ACCESS_VIOLATION; - } - - Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (NT_SUCCESS(Status)) - { - Hist = HistoryFindBuffer(Console, &Request->Data.GetCommandHistory.ExeName); - if (Hist) - { - for (i = 0; i < Hist->NumEntries; i++) - { - if (BufferSize < (Hist->Entries[i].Length + sizeof(WCHAR))) - { - Status = STATUS_BUFFER_OVERFLOW; - break; - } - memcpy(Buffer, Hist->Entries[i].Buffer, Hist->Entries[i].Length); - Buffer += Hist->Entries[i].Length; - *(PWCHAR)Buffer = L'\0'; - Buffer += sizeof(WCHAR); - } - } - Request->Data.GetCommandHistory.Length = Buffer - (PBYTE)Request->Data.GetCommandHistory.History; - ConioUnlockConsole(Console); - } - return Status; -} - -CSR_API(CsrExpungeCommandHistory) -{ - PCSRSS_CONSOLE Console; - PHISTORY_BUFFER Hist; - NTSTATUS Status; - - if (!Win32CsrValidateBuffer(ProcessData, - Request->Data.ExpungeCommandHistory.ExeName.Buffer, - Request->Data.ExpungeCommandHistory.ExeName.Length, 1)) - { - return STATUS_ACCESS_VIOLATION; - } - - Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (NT_SUCCESS(Status)) - { - Hist = HistoryFindBuffer(Console, &Request->Data.ExpungeCommandHistory.ExeName); - HistoryDeleteBuffer(Hist); - ConioUnlockConsole(Console); - } - return Status; -} - -CSR_API(CsrSetHistoryNumberCommands) -{ - PCSRSS_CONSOLE Console; - PHISTORY_BUFFER Hist; - NTSTATUS Status; - WORD MaxEntries = Request->Data.SetHistoryNumberCommands.NumCommands; - PUNICODE_STRING OldEntryList, NewEntryList; - - if (!Win32CsrValidateBuffer(ProcessData, - Request->Data.SetHistoryNumberCommands.ExeName.Buffer, - Request->Data.SetHistoryNumberCommands.ExeName.Length, 1)) - { - return STATUS_ACCESS_VIOLATION; - } - - Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (NT_SUCCESS(Status)) - { - Hist = HistoryFindBuffer(Console, &Request->Data.SetHistoryNumberCommands.ExeName); - if (Hist) - { - OldEntryList = Hist->Entries; - NewEntryList = HeapAlloc(Win32CsrApiHeap, 0, - MaxEntries * sizeof(UNICODE_STRING)); - if (!NewEntryList) - { - Status = STATUS_NO_MEMORY; - } - else - { - /* If necessary, shrink by removing oldest entries */ - for (; Hist->NumEntries > MaxEntries; Hist->NumEntries--) - { - RtlFreeUnicodeString(Hist->Entries++); - Hist->Position += (Hist->Position == 0); - } - - Hist->MaxEntries = MaxEntries; - Hist->Entries = memcpy(NewEntryList, Hist->Entries, - Hist->NumEntries * sizeof(UNICODE_STRING)); - HeapFree(Win32CsrApiHeap, 0, OldEntryList); - } - } - ConioUnlockConsole(Console); - } - return Status; -} - -CSR_API(CsrGetHistoryInfo) -{ - PCSRSS_CONSOLE Console; - NTSTATUS Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (NT_SUCCESS(Status)) - { - Request->Data.SetHistoryInfo.HistoryBufferSize = Console->HistoryBufferSize; - Request->Data.SetHistoryInfo.NumberOfHistoryBuffers = Console->NumberOfHistoryBuffers; - Request->Data.SetHistoryInfo.dwFlags = Console->HistoryNoDup; - ConioUnlockConsole(Console); - } - return Status; -} - -CSR_API(CsrSetHistoryInfo) -{ - PCSRSS_CONSOLE Console; - NTSTATUS Status = ConioConsoleFromProcessData(ProcessData, &Console); - if (NT_SUCCESS(Status)) - { - Console->HistoryBufferSize = (WORD)Request->Data.SetHistoryInfo.HistoryBufferSize; - Console->NumberOfHistoryBuffers = (WORD)Request->Data.SetHistoryInfo.NumberOfHistoryBuffers; - Console->HistoryNoDup = Request->Data.SetHistoryInfo.dwFlags & HISTORY_NO_DUP_FLAG; - ConioUnlockConsole(Console); - } - return Status; -} - -static VOID -LineInputSetPos(PCSRSS_CONSOLE Console, UINT Pos) -{ - if (Pos != Console->LinePos && Console->Mode & ENABLE_ECHO_INPUT) - { - PCSRSS_SCREEN_BUFFER Buffer = Console->ActiveBuffer; - UINT OldCursorX = Buffer->CurrentX; - UINT OldCursorY = Buffer->CurrentY; - INT XY = OldCursorY * Buffer->MaxX + OldCursorX; - - XY += (Pos - Console->LinePos); - if (XY < 0) - XY = 0; - else if (XY >= Buffer->MaxY * Buffer->MaxX) - XY = Buffer->MaxY * Buffer->MaxX - 1; - - Buffer->CurrentX = XY % Buffer->MaxX; - Buffer->CurrentY = XY / Buffer->MaxX; - ConioSetScreenInfo(Console, Buffer, OldCursorX, OldCursorY); - } - - Console->LinePos = Pos; -} - -static VOID -LineInputEdit(PCSRSS_CONSOLE Console, UINT NumToDelete, UINT NumToInsert, WCHAR *Insertion) -{ - UINT Pos = Console->LinePos; - UINT NewSize = Console->LineSize - NumToDelete + NumToInsert; - INT i; - - /* Make sure there's always enough room for ending \r\n */ - if (NewSize + 2 > Console->LineMaxSize) - return; - - memmove(&Console->LineBuffer[Pos + NumToInsert], - &Console->LineBuffer[Pos + NumToDelete], - (Console->LineSize - (Pos + NumToDelete)) * sizeof(WCHAR)); - memcpy(&Console->LineBuffer[Pos], Insertion, NumToInsert * sizeof(WCHAR)); - - if (Console->Mode & ENABLE_ECHO_INPUT) - { - for (i = Pos; i < NewSize; i++) - { - CHAR AsciiChar; - WideCharToMultiByte(Console->OutputCodePage, 0, - &Console->LineBuffer[i], 1, - &AsciiChar, 1, NULL, NULL); - ConioWriteConsole(Console, Console->ActiveBuffer, &AsciiChar, 1, TRUE); - } - for (; i < Console->LineSize; i++) - { - ConioWriteConsole(Console, Console->ActiveBuffer, " ", 1, TRUE); - } - Console->LinePos = i; - } - - Console->LineSize = NewSize; - LineInputSetPos(Console, Pos + NumToInsert); -} - -static VOID -LineInputRecallHistory(PCSRSS_CONSOLE Console, INT Offset) -{ - PHISTORY_BUFFER Hist; - - if (!(Hist = HistoryCurrentBuffer(Console)) || Hist->NumEntries == 0) - return; - - Offset += Hist->Position; - Offset = max(Offset, 0); - Offset = min(Offset, Hist->NumEntries - 1); - Hist->Position = Offset; - - LineInputSetPos(Console, 0); - LineInputEdit(Console, Console->LineSize, - Hist->Entries[Offset].Length / sizeof(WCHAR), - Hist->Entries[Offset].Buffer); -} - -VOID FASTCALL -LineInputKeyDown(PCSRSS_CONSOLE Console, KEY_EVENT_RECORD *KeyEvent) -{ - UINT Pos = Console->LinePos; - PHISTORY_BUFFER Hist; - UNICODE_STRING Entry; - INT HistPos; - - switch (KeyEvent->wVirtualKeyCode) - { - case VK_ESCAPE: - /* Clear entire line */ - LineInputSetPos(Console, 0); - LineInputEdit(Console, Console->LineSize, 0, NULL); - return; - case VK_HOME: - /* Move to start of line. With ctrl, erase everything left of cursor */ - LineInputSetPos(Console, 0); - if (KeyEvent->dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) - LineInputEdit(Console, Pos, 0, NULL); - return; - case VK_END: - /* Move to end of line. With ctrl, erase everything right of cursor */ - if (KeyEvent->dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) - LineInputEdit(Console, Console->LineSize - Pos, 0, NULL); - else - LineInputSetPos(Console, Console->LineSize); - return; - case VK_LEFT: - /* Move left. With ctrl, move to beginning of previous word */ - if (KeyEvent->dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) - { - while (Pos > 0 && Console->LineBuffer[Pos - 1] == L' ') Pos--; - while (Pos > 0 && Console->LineBuffer[Pos - 1] != L' ') Pos--; - } - else - { - Pos -= (Pos > 0); - } - LineInputSetPos(Console, Pos); - return; - case VK_RIGHT: - case VK_F1: - /* Move right. With ctrl, move to beginning of next word */ - if (KeyEvent->dwControlKeyState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) - { - while (Pos < Console->LineSize && Console->LineBuffer[Pos] != L' ') Pos++; - while (Pos < Console->LineSize && Console->LineBuffer[Pos] == L' ') Pos++; - LineInputSetPos(Console, Pos); - return; - } - else - { - /* Recall one character (but don't overwrite current line) */ - HistoryGetCurrentEntry(Console, &Entry); - if (Pos < Console->LineSize) - LineInputSetPos(Console, Pos + 1); - else if (Pos * sizeof(WCHAR) < Entry.Length) - LineInputEdit(Console, 0, 1, &Entry.Buffer[Pos]); - } - return; - case VK_INSERT: - /* Toggle between insert and overstrike */ - Console->LineInsertToggle = !Console->LineInsertToggle; - ConioSetCursorInfo(Console, Console->ActiveBuffer); - return; - case VK_DELETE: - /* Remove character to right of cursor */ - if (Pos != Console->LineSize) - LineInputEdit(Console, 1, 0, NULL); - return; - case VK_PRIOR: - /* Recall first history entry */ - LineInputRecallHistory(Console, -((WORD)-1)); - return; - case VK_NEXT: - /* Recall last history entry */ - LineInputRecallHistory(Console, +((WORD)-1)); - return; - case VK_UP: - case VK_F5: - /* Recall previous history entry. On first time, actually recall the - * current (usually last) entry; on subsequent times go back. */ - LineInputRecallHistory(Console, Console->LineUpPressed ? -1 : 0); - Console->LineUpPressed = TRUE; - return; - case VK_DOWN: - /* Recall next history entry */ - LineInputRecallHistory(Console, +1); - return; - case VK_F3: - /* Recall remainder of current history entry */ - HistoryGetCurrentEntry(Console, &Entry); - if (Pos * sizeof(WCHAR) < Entry.Length) - { - UINT InsertSize = (Entry.Length / sizeof(WCHAR) - Pos); - UINT DeleteSize = min(Console->LineSize - Pos, InsertSize); - LineInputEdit(Console, DeleteSize, InsertSize, &Entry.Buffer[Pos]); - } - return; - case VK_F6: - /* Insert a ^Z character */ - KeyEvent->uChar.UnicodeChar = 26; - break; - case VK_F7: - if (KeyEvent->dwControlKeyState & (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED)) - HistoryDeleteBuffer(HistoryCurrentBuffer(Console)); - return; - case VK_F8: - /* Search for history entries starting with input. */ - if (!(Hist = HistoryCurrentBuffer(Console)) || Hist->NumEntries == 0) - return; - - /* Like Up/F5, on first time start from current (usually last) entry, - * but on subsequent times start at previous entry. */ - if (Console->LineUpPressed) - Hist->Position = (Hist->Position ? Hist->Position : Hist->NumEntries) - 1; - Console->LineUpPressed = TRUE; - - Entry.Length = Console->LinePos * sizeof(WCHAR); - Entry.Buffer = Console->LineBuffer; - - /* Keep going backwards, even wrapping around to the end, - * until we get back to starting point */ - HistPos = Hist->Position; - do - { - if (RtlPrefixUnicodeString(&Entry, &Hist->Entries[HistPos], FALSE)) - { - Hist->Position = HistPos; - LineInputEdit(Console, Console->LineSize - Pos, - Hist->Entries[HistPos].Length / sizeof(WCHAR) - Pos, - &Hist->Entries[HistPos].Buffer[Pos]); - /* Cursor stays where it was */ - LineInputSetPos(Console, Pos); - return; - } - if (--HistPos < 0) HistPos += Hist->NumEntries; - } while (HistPos != Hist->Position); - return; - } - - if (KeyEvent->uChar.UnicodeChar == L'\b' && Console->Mode & ENABLE_PROCESSED_INPUT) - { - /* backspace handling - if processed input enabled then we handle it here - * otherwise we treat it like a normal char. */ - if (Pos > 0) - { - LineInputSetPos(Console, Pos - 1); - LineInputEdit(Console, 1, 0, NULL); - } - } - else if (KeyEvent->uChar.UnicodeChar == L'\r') - { - HistoryAddEntry(Console); - - /* TODO: Expand aliases */ - - LineInputSetPos(Console, Console->LineSize); - Console->LineBuffer[Console->LineSize++] = L'\r'; - if (Console->Mode & ENABLE_ECHO_INPUT) - ConioWriteConsole(Console, Console->ActiveBuffer, "\r", 1, TRUE); - - /* Add \n if processed input. There should usually be room for it, - * but an exception to the rule exists: the buffer could have been - * pre-filled with LineMaxSize - 1 characters. */ - if (Console->Mode & ENABLE_PROCESSED_INPUT && - Console->LineSize < Console->LineMaxSize) - { - Console->LineBuffer[Console->LineSize++] = L'\n'; - if (Console->Mode & ENABLE_ECHO_INPUT) - ConioWriteConsole(Console, Console->ActiveBuffer, "\n", 1, TRUE); - } - Console->LineComplete = TRUE; - Console->LinePos = 0; - } - else if (KeyEvent->uChar.UnicodeChar != L'\0') - { - if (KeyEvent->uChar.UnicodeChar < 0x20 && - Console->LineWakeupMask & (1 << KeyEvent->uChar.UnicodeChar)) - { - /* Control key client wants to handle itself (e.g. for tab completion) */ - Console->LineBuffer[Console->LineSize++] = L' '; - Console->LineBuffer[Console->LinePos] = KeyEvent->uChar.UnicodeChar; - Console->LineComplete = TRUE; - Console->LinePos = 0; - } - else - { - /* Normal character */ - BOOL Overstrike = Console->LineInsertToggle && Console->LinePos != Console->LineSize; - LineInputEdit(Console, Overstrike, 1, &KeyEvent->uChar.UnicodeChar); - } - } -} - -/* EOF */ diff --git a/deprecated/win32csr/res/terminal.ico b/deprecated/win32csr/res/terminal.ico deleted file mode 100644 index 7e3e77d2927..00000000000 Binary files a/deprecated/win32csr/res/terminal.ico and /dev/null differ diff --git a/deprecated/win32csr/resource.h b/deprecated/win32csr/resource.h deleted file mode 100644 index 1a210f4413f..00000000000 --- a/deprecated/win32csr/resource.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS Win32 subsystem - * FILE: subsys/csrss/win32csr/resource.h - * PURPOSE: Resource #defines - */ - -#pragma once - -#define IDD_END_NOW 10 -#define IDD_NOT_RESPONDING 11 -#define IDD_SWITCH_APP 12 - -#define IDC_STATIC -1 -#define IDC_PROGRESS 101 -#define IDC_END_NOW 102 -#define IDC_STATIC_CUR_APP 103 - - -#define ID_SYSTEM_EDIT_MARK 1001 -#define ID_SYSTEM_EDIT_COPY 1002 -#define ID_SYSTEM_EDIT_PASTE 1003 -#define ID_SYSTEM_EDIT_SELECTALL 1004 -#define ID_SYSTEM_EDIT_SCROLL 1005 -#define ID_SYSTEM_EDIT_FIND 1006 -#define ID_SYSTEM_DEFAULTS 1007 -#define ID_SYSTEM_PROPERTIES 1008 - -#define NCPOPUP_MENU 103 - -#define IDS_EDIT 204 -#define IDS_MARK 205 -#define IDS_COPY 206 -#define IDS_PASTE 207 -#define IDS_SELECTALL 208 -#define IDS_SCROLL 209 -#define IDS_FIND 210 -#define IDS_DEFAULTS 211 -#define IDS_PROPERTIES 212 - -//scrollbar resource ids -#define IDS_SCROLLHERE 304 -#define IDS_SCROLLTOP 305 -#define IDS_SCROLLBOTTOM 306 -#define IDS_SCROLLPAGE_UP 307 -#define IDS_SCROLLPAGE_DOWN 308 -#define IDS_SCROLLUP 309 -#define IDS_SCROLLDOWN 310 - -#define IDS_COMMAND_PROMPT 500 - -/* EOF */ diff --git a/deprecated/win32csr/tuiconsole.c b/deprecated/win32csr/tuiconsole.c deleted file mode 100644 index ceb7ba8e0db..00000000000 --- a/deprecated/win32csr/tuiconsole.c +++ /dev/null @@ -1,487 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: subsys/csrss/win32csr/tuiconsole.c - * PURPOSE: Implementation of text-mode consoles - */ - -#define NDEBUG -#include "w32csr.h" -#include - -CRITICAL_SECTION ActiveConsoleLock; -static COORD PhysicalConsoleSize; -static HANDLE ConsoleDeviceHandle; -static PCSRSS_CONSOLE ActiveConsole; - -static BOOL ConsInitialized = FALSE; - -static LRESULT CALLBACK -TuiConsoleWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - if (msg == WM_ACTIVATE) - { - if (LOWORD(wParam) != WA_INACTIVE) - { - SetFocus(hWnd); - ConioDrawConsole(ActiveConsole); - } - } - return DefWindowProcW(hWnd, msg, wParam, lParam); -} - -static BOOL FASTCALL -TuiStartService(LPCWSTR lpServiceName) -{ - SC_HANDLE hSCManager = NULL; - SC_HANDLE hService = NULL; - BOOL ret = FALSE; - - hSCManager = OpenSCManagerW(NULL, NULL, 0); - if (hSCManager == NULL) - goto cleanup; - - hService = OpenServiceW(hSCManager, lpServiceName, SERVICE_START); - if (hService == NULL) - goto cleanup; - - ret = StartServiceW(hService, 0, NULL); - if (!ret) - goto cleanup; - - ret = TRUE; - -cleanup: - if (hSCManager != NULL) - CloseServiceHandle(hSCManager); - if (hService != NULL) - CloseServiceHandle(hService); - return ret; -} - -static BOOL FASTCALL -TuiInit(DWORD OemCP) -{ - CONSOLE_SCREEN_BUFFER_INFO ScrInfo; - DWORD BytesReturned; - WNDCLASSEXW wc; - USHORT TextAttribute = FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED; - - TuiStartService(L"Blue"); - - ConsoleDeviceHandle = CreateFileW(L"\\\\.\\BlueScreen", FILE_ALL_ACCESS, 0, NULL, - OPEN_EXISTING, 0, NULL); - if (INVALID_HANDLE_VALUE == ConsoleDeviceHandle) - { - DPRINT1("Failed to open BlueScreen.\n"); - return FALSE; - } - - if (!DeviceIoControl(ConsoleDeviceHandle, IOCTL_CONSOLE_LOADFONT, - &OemCP, sizeof(OemCP), NULL, 0, - &BytesReturned, NULL)) - { - DPRINT1("Failed to load the font for codepage %d\n", OemCP); - /* Let's suppose the font is good enough to continue */ - } - - if (!DeviceIoControl(ConsoleDeviceHandle, IOCTL_CONSOLE_SET_TEXT_ATTRIBUTE, - &TextAttribute, sizeof(TextAttribute), NULL, 0, - &BytesReturned, NULL)) - { - DPRINT1("Failed to set text attribute\n"); - } - - ActiveConsole = NULL; - InitializeCriticalSection(&ActiveConsoleLock); - if (! DeviceIoControl(ConsoleDeviceHandle, IOCTL_CONSOLE_GET_SCREEN_BUFFER_INFO, - NULL, 0, &ScrInfo, sizeof(ScrInfo), &BytesReturned, NULL)) - { - DPRINT1("Failed to get console info\n"); - return FALSE; - } - PhysicalConsoleSize = ScrInfo.dwSize; - - RtlZeroMemory(&wc, sizeof(WNDCLASSEXW)); - wc.cbSize = sizeof(WNDCLASSEXW); - wc.lpszClassName = L"TuiConsoleWindowClass"; - wc.lpfnWndProc = TuiConsoleWndProc; - wc.hInstance = (HINSTANCE) GetModuleHandleW(NULL); - if (RegisterClassExW(&wc) == 0) - { - DPRINT1("Failed to register console wndproc\n"); - return FALSE; - } - - return TRUE; -} - -static VOID WINAPI -TuiInitScreenBuffer(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER Buffer) -{ - Buffer->DefaultAttrib = FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED; -} - -static void FASTCALL -TuiCopyRect(char *Dest, PCSRSS_SCREEN_BUFFER Buff, SMALL_RECT *Region) -{ - UINT SrcDelta, DestDelta; - LONG i; - PBYTE Src, SrcEnd; - - Src = ConioCoordToPointer(Buff, Region->Left, Region->Top); - SrcDelta = Buff->MaxX * 2; - SrcEnd = Buff->Buffer + Buff->MaxY * Buff->MaxX * 2; - DestDelta = ConioRectWidth(Region) * 2; - for (i = Region->Top; i <= Region->Bottom; i++) - { - memcpy(Dest, Src, DestDelta); - Src += SrcDelta; - if (SrcEnd <= Src) - { - Src -= Buff->MaxY * Buff->MaxX * 2; - } - Dest += DestDelta; - } -} - -static VOID WINAPI -TuiDrawRegion(PCSRSS_CONSOLE Console, SMALL_RECT *Region) -{ - DWORD BytesReturned; - PCSRSS_SCREEN_BUFFER Buff = Console->ActiveBuffer; - PCONSOLE_DRAW ConsoleDraw; - UINT ConsoleDrawSize; - - if (ActiveConsole != Console) - { - return; - } - - ConsoleDrawSize = sizeof(CONSOLE_DRAW) + - (ConioRectWidth(Region) * ConioRectHeight(Region)) * 2; - ConsoleDraw = HeapAlloc(Win32CsrApiHeap, 0, ConsoleDrawSize); - if (NULL == ConsoleDraw) - { - DPRINT1("HeapAlloc failed\n"); - return; - } - ConsoleDraw->X = Region->Left; - ConsoleDraw->Y = Region->Top; - ConsoleDraw->SizeX = ConioRectWidth(Region); - ConsoleDraw->SizeY = ConioRectHeight(Region); - ConsoleDraw->CursorX = Buff->CurrentX; - ConsoleDraw->CursorY = Buff->CurrentY; - - TuiCopyRect((char *) (ConsoleDraw + 1), Buff, Region); - - if (! DeviceIoControl(ConsoleDeviceHandle, IOCTL_CONSOLE_DRAW, - NULL, 0, ConsoleDraw, ConsoleDrawSize, &BytesReturned, NULL)) - { - DPRINT1("Failed to draw console\n"); - HeapFree(Win32CsrApiHeap, 0, ConsoleDraw); - return; - } - - HeapFree(Win32CsrApiHeap, 0, ConsoleDraw); -} - -static VOID WINAPI -TuiWriteStream(PCSRSS_CONSOLE Console, SMALL_RECT *Region, LONG CursorStartX, LONG CursorStartY, - UINT ScrolledLines, CHAR *Buffer, UINT Length) -{ - DWORD BytesWritten; - PCSRSS_SCREEN_BUFFER Buff = Console->ActiveBuffer; - - if (ActiveConsole->ActiveBuffer != Buff) - { - return; - } - - if (! WriteFile(ConsoleDeviceHandle, Buffer, Length, &BytesWritten, NULL)) - { - DPRINT1("Error writing to BlueScreen\n"); - } -} - -static BOOL WINAPI -TuiSetCursorInfo(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER Buff) -{ - CONSOLE_CURSOR_INFO Info; - DWORD BytesReturned; - - if (ActiveConsole->ActiveBuffer != Buff) - { - return TRUE; - } - - Info.dwSize = ConioEffectiveCursorSize(Console, 100); - Info.bVisible = Buff->CursorInfo.bVisible; - - if (! DeviceIoControl(ConsoleDeviceHandle, IOCTL_CONSOLE_SET_CURSOR_INFO, - &Info, sizeof(Info), NULL, 0, &BytesReturned, NULL)) - { - DPRINT1( "Failed to set cursor info\n" ); - return FALSE; - } - - return TRUE; -} - -static BOOL WINAPI -TuiSetScreenInfo(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER Buff, UINT OldCursorX, UINT OldCursorY) -{ - CONSOLE_SCREEN_BUFFER_INFO Info; - DWORD BytesReturned; - - if (ActiveConsole->ActiveBuffer != Buff) - { - return TRUE; - } - - Info.dwCursorPosition.X = Buff->CurrentX; - Info.dwCursorPosition.Y = Buff->CurrentY; - Info.wAttributes = Buff->DefaultAttrib; - - if (! DeviceIoControl(ConsoleDeviceHandle, IOCTL_CONSOLE_SET_SCREEN_BUFFER_INFO, - &Info, sizeof(CONSOLE_SCREEN_BUFFER_INFO), NULL, 0, - &BytesReturned, NULL)) - { - DPRINT1( "Failed to set cursor position\n" ); - return FALSE; - } - - return TRUE; -} - -static BOOL WINAPI -TuiUpdateScreenInfo(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER Buff) -{ - return TRUE; -} - -static BOOL WINAPI -TuiChangeTitle(PCSRSS_CONSOLE Console) -{ - return TRUE; -} - -static VOID WINAPI -TuiCleanupConsole(PCSRSS_CONSOLE Console) -{ - DestroyWindow(Console->hWindow); - - EnterCriticalSection(&ActiveConsoleLock); - - /* Switch to next console */ - if (ActiveConsole == Console) - { - ActiveConsole = Console->Next != Console ? Console->Next : NULL; - } - - if (Console->Next != Console) - { - Console->Prev->Next = Console->Next; - Console->Next->Prev = Console->Prev; - } - LeaveCriticalSection(&ActiveConsoleLock); - - if (NULL != ActiveConsole) - { - ConioDrawConsole(ActiveConsole); - } -} - -static BOOL WINAPI -TuiChangeIcon(PCSRSS_CONSOLE Console, HICON hWindowIcon) -{ - return TRUE; -} - -static NTSTATUS WINAPI -TuiResizeBuffer(PCSRSS_CONSOLE Console, PCSRSS_SCREEN_BUFFER ScreenBuffer, COORD Size) -{ - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; -} - -DWORD WINAPI -TuiConsoleThread (PVOID Data) -{ - PCSRSS_CONSOLE Console = (PCSRSS_CONSOLE) Data; - HWND NewWindow; - MSG msg; - - NewWindow = CreateWindowW(L"TuiConsoleWindowClass", - Console->Title.Buffer, - 0, - -32000, -32000, 0, 0, - NULL, NULL, - (HINSTANCE) GetModuleHandleW(NULL), - (PVOID) Console); - Console->hWindow = NewWindow; - if (NULL == NewWindow) - { - DPRINT1("CSR: Unable to create console window\n"); - return 1; - } - - SetForegroundWindow(Console->hWindow); - - while (TRUE) - { - GetMessageW(&msg, 0, 0, 0); - DispatchMessage(&msg); - TranslateMessage(&msg); - - if (msg.message == WM_CHAR || msg.message == WM_SYSCHAR || - msg.message == WM_KEYDOWN || msg.message == WM_KEYUP || - msg.message == WM_SYSKEYDOWN || msg.message == WM_SYSKEYUP) - { - ConioProcessKey(&msg, Console, TRUE); - } - } - - return 0; -} - -static CSRSS_CONSOLE_VTBL TuiVtbl = -{ - TuiInitScreenBuffer, - TuiWriteStream, - TuiDrawRegion, - TuiSetCursorInfo, - TuiSetScreenInfo, - TuiUpdateScreenInfo, - TuiChangeTitle, - TuiCleanupConsole, - TuiChangeIcon, - TuiResizeBuffer, -}; - -NTSTATUS FASTCALL -TuiInitConsole(PCSRSS_CONSOLE Console) -{ - HANDLE ThreadHandle; - - if (! ConsInitialized) - { - ConsInitialized = TRUE; - if (! TuiInit(Console->CodePage)) - { - ConsInitialized = FALSE; - return STATUS_UNSUCCESSFUL; - } - } - - Console->Vtbl = &TuiVtbl; - Console->hWindow = NULL; - Console->Size = PhysicalConsoleSize; - Console->ActiveBuffer->MaxX = PhysicalConsoleSize.X; - Console->ActiveBuffer->MaxY = PhysicalConsoleSize.Y; - - ThreadHandle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) TuiConsoleThread, - Console, 0, NULL); - if (NULL == ThreadHandle) - { - DPRINT1("CSR: Unable to create console thread\n"); - return STATUS_UNSUCCESSFUL; - } - CloseHandle(ThreadHandle); - - EnterCriticalSection(&ActiveConsoleLock); - if (NULL != ActiveConsole) - { - Console->Prev = ActiveConsole; - Console->Next = ActiveConsole->Next; - ActiveConsole->Next->Prev = Console; - ActiveConsole->Next = Console; - } - else - { - Console->Prev = Console; - Console->Next = Console; - } - ActiveConsole = Console; - LeaveCriticalSection(&ActiveConsoleLock); - - return STATUS_SUCCESS; -} - -PCSRSS_CONSOLE FASTCALL -TuiGetFocusConsole(VOID) -{ - return ActiveConsole; -} - -BOOL FASTCALL -TuiSwapConsole(int Next) -{ - static PCSRSS_CONSOLE SwapConsole = NULL; /* console we are thinking about swapping with */ - DWORD BytesReturned; - ANSI_STRING Title; - void * Buffer; - COORD *pos; - - if (0 != Next) - { - /* alt-tab, swap consoles */ - /* move SwapConsole to next console, and print its title */ - EnterCriticalSection(&ActiveConsoleLock); - if (! SwapConsole) - { - SwapConsole = ActiveConsole; - } - - SwapConsole = (0 < Next ? SwapConsole->Next : SwapConsole->Prev); - Title.MaximumLength = RtlUnicodeStringToAnsiSize(&SwapConsole->Title); - Title.Length = 0; - Buffer = HeapAlloc(Win32CsrApiHeap, - 0, - sizeof(COORD) + Title.MaximumLength); - pos = (COORD *)Buffer; - Title.Buffer = (PVOID)((ULONG_PTR)Buffer + sizeof( COORD )); - - RtlUnicodeStringToAnsiString(&Title, &SwapConsole->Title, FALSE); - pos->Y = PhysicalConsoleSize.Y / 2; - pos->X = (PhysicalConsoleSize.X - Title.Length) / 2; - /* redraw the console to clear off old title */ - ConioDrawConsole(ActiveConsole); - if (! DeviceIoControl(ConsoleDeviceHandle, IOCTL_CONSOLE_WRITE_OUTPUT_CHARACTER, - NULL, 0, Buffer, sizeof(COORD) + Title.Length, - &BytesReturned, NULL)) - { - DPRINT1( "Error writing to console\n" ); - } - HeapFree(Win32CsrApiHeap, 0, Buffer); - LeaveCriticalSection(&ActiveConsoleLock); - - return TRUE; - } - else if (NULL != SwapConsole) - { - EnterCriticalSection(&ActiveConsoleLock); - if (SwapConsole != ActiveConsole) - { - /* first remove swapconsole from the list */ - SwapConsole->Prev->Next = SwapConsole->Next; - SwapConsole->Next->Prev = SwapConsole->Prev; - /* now insert before activeconsole */ - SwapConsole->Next = ActiveConsole; - SwapConsole->Prev = ActiveConsole->Prev; - ActiveConsole->Prev->Next = SwapConsole; - ActiveConsole->Prev = SwapConsole; - } - ActiveConsole = SwapConsole; - SwapConsole = NULL; - ConioDrawConsole(ActiveConsole); - LeaveCriticalSection(&ActiveConsoleLock); - return TRUE; - } - else - { - return FALSE; - } -} - -/* EOF */ diff --git a/deprecated/win32csr/tuiconsole.h b/deprecated/win32csr/tuiconsole.h deleted file mode 100644 index c4012bd8107..00000000000 --- a/deprecated/win32csr/tuiconsole.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: subsys/csrss/win32csr/tuiconsole.h - * PURPOSE: Interface to text-mode consoles - */ - -#include "api.h" - -extern NTSTATUS FASTCALL TuiInitConsole(PCSRSS_CONSOLE Console); -extern PCSRSS_CONSOLE FASTCALL TuiGetFocusConsole(VOID); -extern BOOL FASTCALL TuiSwapConsole(int Next); - -/* EOF */ diff --git a/deprecated/win32csr/w32csr.h b/deprecated/win32csr/w32csr.h deleted file mode 100644 index 8759ebc6281..00000000000 --- a/deprecated/win32csr/w32csr.h +++ /dev/null @@ -1,46 +0,0 @@ -/* PSDK/NDK Headers */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#define NTOS_MODE_USER -#include -#include -#include -#include -#include -#include - -/* External Winlogon Header */ -#include - -/* Internal CSRSS Headers */ -#include -#include -#include -#include "guiconsole.h" -#include "tuiconsole.h" - -/* Public Win32K Headers */ -#include - -#include "resource.h" - -/* shared header with console.dll */ -#include "console.h" - -VOID -WINAPI -Win32CsrHardError( - IN PCSR_THREAD ThreadData, - IN PHARDERROR_MSG Message); - -/* EOF */ diff --git a/deprecated/win32csr/win32csr.h b/deprecated/win32csr/win32csr.h deleted file mode 100644 index 9e68a0d46b6..00000000000 --- a/deprecated/win32csr/win32csr.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: subsys/csrss/win32csr/win32csr.h - * PURPOSE: Interface to win32csr.dll - */ - -#pragma once - -#include - -extern HANDLE Win32CsrApiHeap; -extern HINSTANCE Win32CsrDllHandle; - -typedef struct Object_tt -{ - LONG Type; - struct tagCSRSS_CONSOLE *Console; - LONG AccessRead, AccessWrite; - LONG ExclusiveRead, ExclusiveWrite; - LONG HandleCount; -} Object_t; - -typedef struct _CSRSS_HANDLE -{ - Object_t *Object; - DWORD Access; - BOOL Inheritable; - DWORD ShareMode; -} CSRSS_HANDLE, *PCSRSS_HANDLE; - -typedef VOID (WINAPI *CSR_CLEANUP_OBJECT_PROC)(Object_t *Object); - -typedef struct tagCSRSS_OBJECT_DEFINITION -{ - LONG Type; - CSR_CLEANUP_OBJECT_PROC CsrCleanupObjectProc; -} CSRSS_OBJECT_DEFINITION, *PCSRSS_OBJECT_DEFINITION; - -/* handle.c */ -NTSTATUS FASTCALL Win32CsrInsertObject(PCSR_PROCESS ProcessData, - PHANDLE Handle, - Object_t *Object, - DWORD Access, - BOOL Inheritable, - DWORD ShareMode); -NTSTATUS FASTCALL Win32CsrLockObject(PCSR_PROCESS ProcessData, - HANDLE Handle, - Object_t **Object, - DWORD Access, - long Type); -VOID FASTCALL Win32CsrUnlockObject(Object_t *Object); -NTSTATUS FASTCALL Win32CsrReleaseObject(PCSR_PROCESS ProcessData, - HANDLE Object); -VOID WINAPI Win32CsrReleaseConsole(PCSR_PROCESS ProcessData); -NTSTATUS WINAPI Win32CsrDuplicateHandleTable(PCSR_PROCESS SourceProcessData, - PCSR_PROCESS TargetProcessData); -CSR_API(CsrGetHandle); -CSR_API(CsrCloseHandle); -CSR_API(CsrVerifyHandle); -CSR_API(CsrDuplicateHandle); -CSR_API(CsrGetInputWaitHandle); - -BOOL FASTCALL Win32CsrValidateBuffer(PCSR_PROCESS ProcessData, - PVOID Buffer, - SIZE_T NumElements, - SIZE_T ElementSize); -NTSTATUS FASTCALL Win32CsrEnumProcesses(CSRSS_ENUM_PROCESS_PROC EnumProc, - PVOID Context); - -/* exitros.c */ -CSR_API(CsrExitReactos); -CSR_API(CsrSetLogonNotifyWindow); -CSR_API(CsrRegisterLogonProcess); - -CSR_API(CsrSoundSentry); - -/* EOF */ diff --git a/deprecated/win32csr/win32csr.rc b/deprecated/win32csr/win32csr.rc deleted file mode 100644 index 8ce91c6d7bd..00000000000 --- a/deprecated/win32csr/win32csr.rc +++ /dev/null @@ -1,12 +0,0 @@ -#include -#include - -#include "resource.h" - -#define REACTOS_VERSION_DLL -#define REACTOS_STR_FILE_DESCRIPTION "CSRSS subsystem usermode code\0" -#define REACTOS_STR_INTERNAL_NAME "win32csr\0" -#define REACTOS_STR_ORIGINAL_FILENAME "win32csr.dll\0" -#include - -#include "rsrc.rc" diff --git a/deprecated/win32csr/win32csr.spec b/deprecated/win32csr/win32csr.spec deleted file mode 100644 index 025171277d1..00000000000 --- a/deprecated/win32csr/win32csr.spec +++ /dev/null @@ -1 +0,0 @@ -@ stdcall Win32CsrInitialization(ptr) diff --git a/dll/cpl/access/access.c b/dll/cpl/access/access.c index 76be27d6a36..2d65fc32b90 100644 --- a/dll/cpl/access/access.c +++ b/dll/cpl/access/access.c @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/access/access.c * PURPOSE: Main control panel code - * COPYRIGHT: Copyright 2004 Johannes Anderwald (j_anderw@sbox.tugraz.at) + * COPYRIGHT: Copyright 2004 Johannes Anderwald (johannes.anderwald@reactos.org) * Copyright 2007 Eric Kohl */ diff --git a/dll/cpl/access/access.rc b/dll/cpl/access/access.rc index ca418b29d9c..7e4433ca802 100644 --- a/dll/cpl/access/access.rc +++ b/dll/cpl/access/access.rc @@ -14,4 +14,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDI_CPLACCESS ICON "resources/applet.ico" +#include + #include "rsrc.rc" diff --git a/dll/cpl/access/display.c b/dll/cpl/access/display.c index 3154da12983..9c4bb41535e 100644 --- a/dll/cpl/access/display.c +++ b/dll/cpl/access/display.c @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/access/display.c * PURPOSE: Display-related accessibility settings - * COPYRIGHT: Copyright 2004 Johannes Anderwald (j_anderw@sbox.tugraz.at) + * COPYRIGHT: Copyright 2004 Johannes Anderwald (johannes.anderwald@reactos.org) * Copyright 2007 Eric Kohl */ diff --git a/dll/cpl/access/general.c b/dll/cpl/access/general.c index 421348aa726..e8421cb9039 100644 --- a/dll/cpl/access/general.c +++ b/dll/cpl/access/general.c @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/access/general.c * PURPOSE: General accessibility settings - * COPYRIGHT: Copyright 2004 Johannes Anderwald (j_anderw@sbox.tugraz.at) + * COPYRIGHT: Copyright 2004 Johannes Anderwald (johannes.anderwald@reactos.org) * Copyright 2007 Eric Kohl */ diff --git a/dll/cpl/access/keyboard.c b/dll/cpl/access/keyboard.c index c63711ecba1..6d5c7be79d5 100644 --- a/dll/cpl/access/keyboard.c +++ b/dll/cpl/access/keyboard.c @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/access/keyboard.c * PURPOSE: Keyboard-related accessibility settings - * COPYRIGHT: Copyright 2004 Johannes Anderwald (j_anderw@sbox.tugraz.at) + * COPYRIGHT: Copyright 2004 Johannes Anderwald (johannes.anderwald@reactos.org) * Copyright 2007 Eric Kohl */ diff --git a/dll/cpl/access/mouse.c b/dll/cpl/access/mouse.c index 6473718a724..38a7b95a29f 100644 --- a/dll/cpl/access/mouse.c +++ b/dll/cpl/access/mouse.c @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/access/mouse.c * PURPOSE: Mouse-related accessibility settings - * COPYRIGHT: Copyright 2004 Johannes Anderwald (j_anderw@sbox.tugraz.at) + * COPYRIGHT: Copyright 2004 Johannes Anderwald (johannes.anderwald@reactos.org) * Copyright 2007 Eric Kohl */ diff --git a/dll/cpl/access/sound.c b/dll/cpl/access/sound.c index dea63e27054..f0b3edead6f 100644 --- a/dll/cpl/access/sound.c +++ b/dll/cpl/access/sound.c @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/access/sound.c * PURPOSE: Sound-related acessibility settings - * COPYRIGHT: Copyright 2004 Johannes Anderwald (j_anderw@sbox.tugraz.at) + * COPYRIGHT: Copyright 2004 Johannes Anderwald (johannes.anderwald@reactos.org) * Copyright 2007 Eric Kohl */ diff --git a/dll/cpl/appwiz/addons.c b/dll/cpl/appwiz/addons.c index 02b85142272..2e86442873b 100644 --- a/dll/cpl/appwiz/addons.c +++ b/dll/cpl/appwiz/addons.c @@ -39,11 +39,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(appwiz); -#define GECKO_VERSION "1.9" +#define GECKO_VERSION "2.21" #ifdef __i386__ #define ARCH_STRING "x86" -#define GECKO_SHA "cadf123dd7c4cedf2b22c066b6259e8649ac2b40" +#define GECKO_SHA "a514fc4d53783a586c7880a676c415695fe934a3" #else #define ARCH_STRING "" #define GECKO_SHA "???" @@ -73,7 +73,7 @@ static const addon_info_t *addon; static HWND install_dialog = NULL; -static WCHAR GeckoUrl[] = L"http://www.reactos.org/wine-gecko.php"; +static WCHAR GeckoUrl[] = L"http://dl.dropboxusercontent.com/u/743491/ReactOS/wine_gecko-2.21-x86.msi"; /* SHA definitions are copied from advapi32. They aren't available in headers. */ diff --git a/dll/cpl/appwiz/appwiz.rc b/dll/cpl/appwiz/appwiz.rc index 5b9eb0e9b26..a6d23ba8c46 100644 --- a/dll/cpl/appwiz/appwiz.rc +++ b/dll/cpl/appwiz/appwiz.rc @@ -21,4 +21,6 @@ IDI_APPINETICO ICON "resources/1505.ico" IDB_WATERMARK BITMAP "resources/watermark.bmp" +#include + #include "rsrc.rc" diff --git a/dll/cpl/appwiz/lang/bg-BG.rc b/dll/cpl/appwiz/lang/bg-BG.rc index d19e3bfc689..c9afeb41f4c 100644 --- a/dll/cpl/appwiz/lang/bg-BG.rc +++ b/dll/cpl/appwiz/lang/bg-BG.rc @@ -61,7 +61,7 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMEN CAPTION "Wine Gecko Installer" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Wine could not find a Gecko package which is needed for applications embedding HTML to work correctly. Wine can automatically download and install it for you.\n\nNote: it is recommended to use your distribution's packages instead. See http://wiki.winehq.org/Gecko for details.", + CONTROL "ReactOS could not find a Wine Gecko package which is needed for applications embedding HTML to work correctly. ReactOS can automatically download and install it for you.", ID_DWL_STATUS, "SysLink", 0, 10, 10, 240, 65 CONTROL "", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER | PBS_SMOOTH, 10, 40, 240, 12 DEFPUSHBUTTON "&Install", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP diff --git a/dll/cpl/appwiz/lang/cs-CZ.rc b/dll/cpl/appwiz/lang/cs-CZ.rc index ee6c28ae3fc..e531386eb07 100644 --- a/dll/cpl/appwiz/lang/cs-CZ.rc +++ b/dll/cpl/appwiz/lang/cs-CZ.rc @@ -10,8 +10,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Create link" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Text1", -1, 115, 15, 160, 24 - LTEXT "Text2", -1, 115, 35, 160, 17 + LTEXT "Text1", -1, 115, 15, 160, 24 + LTEXT "Text2", -1, 115, 35, 160, 17 END IDD_SUBMIT_REPORT DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT @@ -19,9 +19,9 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Create link" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Text1",-1,10,0,225,40 - LTEXT "Text2",-1,10,40,120,20 - LTEXT "Text3",-1,10,55,120,20 + LTEXT "Text1",-1,10,0,225,40 + LTEXT "Text2",-1,10,40,120,20 + LTEXT "Text3",-1,10,55,120,20 END IDD_SHORTCUT_LOCATION DIALOGEX 0, 0, 340, 200 @@ -29,11 +29,11 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Vytvořit zástupce" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Tento průvodce pomůže s vytvořením zástupců na místní\nnebo síťové programy, soubory, složky, počítače nebo\ninternetové adresy.", -1, 120, 15, 200, 30 - LTEXT "Zadejte umístění položky:", -1, 120, 50, 120, 10 - EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT - PUSHBUTTON "Procházet...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT - LTEXT "Pokračujte kliknutím na Další.", -1, 120, 97, 162, 10 + LTEXT "Tento průvodce pomůže s vytvořením zástupců na místní\nnebo síťové programy, soubory, složky, počítače nebo\ninternetové adresy.", -1, 120, 15, 200, 30 + LTEXT "Zadejte umístění položky:", -1, 120, 50, 120, 10 + EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT + PUSHBUTTON "Procházet...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT + LTEXT "Pokračujte kliknutím na Další.", -1, 120, 97, 162, 10 END IDD_SHORTCUT_FINISH DIALOGEX 0, 0, 340, 200 @@ -41,15 +41,15 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Zvolte název programu" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "&Zadejte název tohoto zástupce:", -1, 120, 15, 150, 10 - EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT - LTEXT "Kliknutím na Dokončit vytvoříte zástupce.", -1, 118, 97, 178, 17 + LTEXT "&Zadejte název tohoto zástupce:", -1, 120, 15, 150, 10 + EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT + LTEXT "Kliknutím na Dokončit vytvoříte zástupce.", -1, 118, 97, 178, 17 END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME "Přidat a odebrat programy" - IDS_CPLSYSTEMDESCRIPTION "Nastavuje programy a vytváří zástupce." + IDS_CPLSYSTEMNAME "Přidat a odebrat programy" + IDS_CPLSYSTEMDESCRIPTION "Nastavuje programy a vytváří zástupce." IDS_CREATE_SHORTCUT "Vytvořit zástupce" IDS_ERROR_NOT_FOUND "Soubor %s nebyl nalezen." END @@ -66,7 +66,7 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMEN CAPTION "Wine Gecko Instalátor" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Wine nenalezlo balíček Gecko nutný k tomu, aby aplikace zapouzdřující HTML fungovaly správně. Wine jej může automaticky stáhnout a nainstalovat.\n\nPoznámka: doporučujeme použít balíček dodávaný s distribucí. Pro více informací viz http://wiki.winehq.org/Gecko.", + CONTROL "ReactOS nenalezl balíček Wine Gecko nutný k tomu, aby aplikace zapouzdřující HTML fungovaly správně. ReactOS jej může automaticky stáhnout a nainstalovat.", ID_DWL_STATUS, "SysLink", 0, 10, 10, 240, 65 CONTROL "", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER | PBS_SMOOTH, 10, 40, 240, 12 DEFPUSHBUTTON "&Instalovat", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP diff --git a/dll/cpl/appwiz/lang/de-DE.rc b/dll/cpl/appwiz/lang/de-DE.rc index ba376248d9d..2ffb3b951ab 100644 --- a/dll/cpl/appwiz/lang/de-DE.rc +++ b/dll/cpl/appwiz/lang/de-DE.rc @@ -61,9 +61,9 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMEN CAPTION "Wine Gecko Installation" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "ReactOS konnte kein Gecko-Paket finden, welches fr die korrekte Ausfhrung von Anwendungen mit eingebettetem HTML bentigt wird. ReactOS kann es automatisch fr Sie herunterladen und installieren.\n\nAnmerkung: es wir empfohlen das entsprechende Paket Ihrer Distribution zu verwenden. Weitere Details auf: http://wiki.winehq.org/Gecko", + CONTROL "ReactOS konnte kein Gecko-Paket finden, welches fr die korrekte Ausfhrung von Anwendungen mit eingebettetem HTML bentigt wird. ReactOS kann es automatisch fr Sie herunterladen und installieren.", ID_DWL_STATUS, "SysLink", 0, 10, 10, 240, 65 CONTROL "", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER | PBS_SMOOTH, 10, 40, 240, 12 - DEFPUSHBUTTON "&Install", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 144, 76, 50, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "&Installieren", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Abbrechen", IDCANCEL, 144, 76, 50, 14, WS_GROUP | WS_TABSTOP END diff --git a/dll/cpl/appwiz/lang/el-GR.rc b/dll/cpl/appwiz/lang/el-GR.rc index e8003f33175..0f134678476 100644 --- a/dll/cpl/appwiz/lang/el-GR.rc +++ b/dll/cpl/appwiz/lang/el-GR.rc @@ -61,7 +61,7 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMEN CAPTION "Wine Gecko Installer" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Wine could not find a Gecko package which is needed for applications embedding HTML to work correctly. Wine can automatically download and install it for you.\n\nNote: it is recommended to use your distribution's packages instead. See http://wiki.winehq.org/Gecko for details.", + CONTROL "ReactOS could not find a Wine Gecko package which is needed for applications embedding HTML to work correctly. ReactOS can automatically download and install it for you.", ID_DWL_STATUS, "SysLink", 0, 10, 10, 240, 65 CONTROL "", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER | PBS_SMOOTH, 10, 40, 240, 12 DEFPUSHBUTTON "&Install", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP diff --git a/dll/cpl/appwiz/lang/en-US.rc b/dll/cpl/appwiz/lang/en-US.rc index df2aba92a19..49d5a091cc6 100644 --- a/dll/cpl/appwiz/lang/en-US.rc +++ b/dll/cpl/appwiz/lang/en-US.rc @@ -5,8 +5,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Create link" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Text1", -1, 115, 15, 160, 24 - LTEXT "Text2", -1, 115, 35, 160, 17 + LTEXT "Text1", -1, 115, 15, 160, 24 + LTEXT "Text2", -1, 115, 35, 160, 17 END IDD_SUBMIT_REPORT DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT @@ -14,9 +14,9 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Create link" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Text1",-1,10,0,225,40 - LTEXT "Text2",-1,10,40,120,20 - LTEXT "Text3",-1,10,55,120,20 + LTEXT "Text1",-1,10,0,225,40 + LTEXT "Text2",-1,10,40,120,20 + LTEXT "Text3",-1,10,55,120,20 END IDD_SHORTCUT_LOCATION DIALOGEX 0, 0, 340, 200 @@ -24,11 +24,11 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Create Shortcut" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "This wizard helps you to create shortcuts to local or\nnetwork programs, files, folders, computers, or Internet\naddresses.", -1, 120, 15, 200, 30 - LTEXT "Type the location of the item:", -1, 120, 50, 120, 10 - EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT - PUSHBUTTON "Browse...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT - LTEXT "Click Next to continue.", -1, 120, 97, 162, 10 + LTEXT "This wizard helps you to create shortcuts to local or\nnetwork programs, files, folders, computers, or Internet\naddresses.", -1, 120, 15, 200, 30 + LTEXT "Type the location of the item:", -1, 120, 50, 120, 10 + EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT + PUSHBUTTON "Browse...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT + LTEXT "Click Next to continue.", -1, 120, 97, 162, 10 END IDD_SHORTCUT_FINISH DIALOGEX 0, 0, 340, 200 @@ -36,15 +36,15 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Select a Title for the Program" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "&Type a name for this shortcut:", -1, 120, 15, 150, 10 - EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT - LTEXT "Click Finish to create the shortcut.", -1, 118, 97, 178, 17 + LTEXT "&Type a name for this shortcut:", -1, 120, 15, 150, 10 + EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT + LTEXT "Click Finish to create the shortcut.", -1, 118, 97, 178, 17 END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME "Add/Remove Programs" - IDS_CPLSYSTEMDESCRIPTION "Sets up programs and creates shortcuts." + IDS_CPLSYSTEMNAME "Add/Remove Programs" + IDS_CPLSYSTEMDESCRIPTION "Sets up programs and creates shortcuts." IDS_CREATE_SHORTCUT "Create Shortcut" IDS_ERROR_NOT_FOUND "The file %s was not found." END @@ -61,7 +61,7 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMEN CAPTION "Wine Gecko Installer" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Wine could not find a Gecko package which is needed for applications embedding HTML to work correctly. Wine can automatically download and install it for you.\n\nNote: it is recommended to use your distribution's packages instead. See http://wiki.winehq.org/Gecko for details.", + CONTROL "ReactOS could not find a Wine Gecko package which is needed for applications embedding HTML to work correctly. ReactOS can automatically download and install it for you.", ID_DWL_STATUS, "SysLink", 0, 10, 10, 240, 65 CONTROL "", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER | PBS_SMOOTH, 10, 40, 240, 12 DEFPUSHBUTTON "&Install", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP diff --git a/dll/cpl/appwiz/lang/es-ES.rc b/dll/cpl/appwiz/lang/es-ES.rc index 35e166bba3f..bd9d3ead6e3 100644 --- a/dll/cpl/appwiz/lang/es-ES.rc +++ b/dll/cpl/appwiz/lang/es-ES.rc @@ -66,7 +66,7 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMEN CAPTION "Wine Gecko Installer" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Wine could not find a Gecko package which is needed for applications embedding HTML to work correctly. Wine can automatically download and install it for you.\n\nNote: it is recommended to use your distribution's packages instead. See http://wiki.winehq.org/Gecko for details.", + CONTROL "ReactOS could not find a Wine Gecko package which is needed for applications embedding HTML to work correctly. ReactOS can automatically download and install it for you.", ID_DWL_STATUS, "SysLink", 0, 10, 10, 240, 65 CONTROL "", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER | PBS_SMOOTH, 10, 40, 240, 12 DEFPUSHBUTTON "&Install", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP diff --git a/dll/cpl/appwiz/lang/fr-FR.rc b/dll/cpl/appwiz/lang/fr-FR.rc index 97fddf57fd2..fb98ea37c5d 100644 --- a/dll/cpl/appwiz/lang/fr-FR.rc +++ b/dll/cpl/appwiz/lang/fr-FR.rc @@ -2,68 +2,68 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL IDD_FIRSTPAGE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Crer un lien" +CAPTION "Créer un lien" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Texte1", -1, 115, 15, 160, 24 - LTEXT "Texte2", -1, 115, 35, 160, 17 + LTEXT "Texte1", -1, 115, 15, 160, 24 + LTEXT "Texte2", -1, 115, 35, 160, 17 END IDD_SUBMIT_REPORT DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Crer un lien" +CAPTION "Créer un lien" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Texte1",-1,10,0,225,40 - LTEXT "Texte2",-1,10,40,120,20 - LTEXT "Texte3",-1,10,55,120,20 + LTEXT "Texte1",-1,10,0,225,40 + LTEXT "Texte2",-1,10,40,120,20 + LTEXT "Texte3",-1,10,55,120,20 END IDD_SHORTCUT_LOCATION DIALOGEX 0, 0, 340, 200 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Crer un raccourci" +CAPTION "Créer un raccourci" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Cet assistant vous aider crer des raccourcis vers des programmes, des fichiers, des dossiers, des ordinateurs,\nou des adresses Internet locaux ou sur le rseau.", -1, 120, 15, 200, 30 - LTEXT "Entrez la localisation de l'lment :", -1, 120, 50, 120, 10 - EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT - PUSHBUTTON "Parcourir...", IDC_SHORTCUT_BROWSE, 272, 65, 60, 15, ES_LEFT - LTEXT "Cliquez sur Suivant pour continuer.", -1, 120, 97, 162, 10 + LTEXT "Cet assistant vous aide à créer des raccourcis vers des programmes, des fichiers, des dossiers, des ordinateurs,\nou des adresses Internet locaux ou sur le réseau.", -1, 120, 15, 200, 30 + LTEXT "Entrez la localisation de l'élément :", -1, 120, 50, 120, 10 + EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT + PUSHBUTTON "Parcourir...", IDC_SHORTCUT_BROWSE, 272, 65, 60, 15, ES_LEFT + LTEXT "Cliquez sur Suivant pour continuer.", -1, 120, 97, 162, 10 END IDD_SHORTCUT_FINISH DIALOGEX 0, 0, 340, 200 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Slectionnez un titre pour le programme" +CAPTION "Sélectionnez un titre pour le programme" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "En&trez un nom pour ce raccourci :", -1, 120, 15, 150, 10 - EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT - LTEXT "Cliquez sur Terminer pour crer le raccourci.", -1, 118, 97, 178, 17 + LTEXT "En&trez un nom pour ce raccourci :", -1, 120, 15, 150, 10 + EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT + LTEXT "Cliquez sur Terminer pour créer le raccourci.", -1, 118, 97, 178, 17 END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME "Ajouter/Supprimer des Programmes" - IDS_CPLSYSTEMDESCRIPTION "Installe des programmes et cr des raccourcis." - IDS_CREATE_SHORTCUT "Crer un raccourci" - IDS_ERROR_NOT_FOUND "Le fichier %s n'a pas t trouv." + IDS_CPLSYSTEMNAME "Ajouter/Supprimer des Programmes" + IDS_CPLSYSTEMDESCRIPTION "Installe des programmes et crée des raccourcis." + IDS_CREATE_SHORTCUT "Créer un raccourci" + IDS_ERROR_NOT_FOUND "Le fichier %s n'a pas été trouvé." END STRINGTABLE BEGIN - IDS_DOWNLOADING "Downloading..." - IDS_INSTALLING "Installing..." - IDS_INVALID_SHA "Unexpected checksum of downloaded file. Aborting installation of corrupted file." + IDS_DOWNLOADING "Téléchargement..." + IDS_INSTALLING "Installation..." + IDS_INVALID_SHA "La somme de contrôle du fichier téléchargé est erronée. Abandon de l'installation du fichier corrompu." END ID_DWL_GECKO_DIALOG DIALOG 0, 0, 260, 95 STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "Wine Gecko Installer" +CAPTION "Installation du package Wine Gecko" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Wine could not find a Gecko package which is needed for applications embedding HTML to work correctly. Wine can automatically download and install it for you.\n\nNote: it is recommended to use your distribution's packages instead. See http://wiki.winehq.org/Gecko for details.", + CONTROL "ReactOS n'a trouvé aucun package Wine Gecko nécessaire pour pouvoir exécuter correctement les applications incluant du code HTML. ReactOS est capable de télécharger et d'installer automatiquement le package pour vous.", ID_DWL_STATUS, "SysLink", 0, 10, 10, 240, 65 CONTROL "", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER | PBS_SMOOTH, 10, 40, 240, 12 - DEFPUSHBUTTON "&Install", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP - PUSHBUTTON "Cancel", IDCANCEL, 144, 76, 50, 14, WS_GROUP | WS_TABSTOP + DEFPUSHBUTTON "&Installer", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "Annuler", IDCANCEL, 144, 76, 50, 14, WS_GROUP | WS_TABSTOP END diff --git a/dll/cpl/appwiz/lang/he-IL.rc b/dll/cpl/appwiz/lang/he-IL.rc index 4dbec9cf92c..5669f349d46 100644 --- a/dll/cpl/appwiz/lang/he-IL.rc +++ b/dll/cpl/appwiz/lang/he-IL.rc @@ -6,8 +6,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "צור קישור" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Text1", -1, 115, 15, 160, 24 - LTEXT "Text2", -1, 115, 35, 160, 17 + LTEXT "Text1", -1, 115, 15, 160, 24 + LTEXT "Text2", -1, 115, 35, 160, 17 END IDD_SUBMIT_REPORT DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT @@ -15,9 +15,9 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "צור קישור" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Text1",-1,10,0,225,40 - LTEXT "Text2",-1,10,40,120,20 - LTEXT "Text3",-1,10,55,120,20 + LTEXT "Text1",-1,10,0,225,40 + LTEXT "Text2",-1,10,40,120,20 + LTEXT "Text3",-1,10,55,120,20 END IDD_SHORTCUT_LOCATION DIALOGEX 0, 0, 340, 200 @@ -25,11 +25,11 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "צור קיצור דרך" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "This wizard helps you to create shortcuts to local or\nnetwork programs, files, folders, computers, or Internet\naddresses.", -1, 120, 15, 200, 30 - LTEXT "הקלד את מיקום הפריט:", -1, 120, 50, 120, 10 - EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT - PUSHBUTTON "סייר...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT - LTEXT "לחץ הבא כדי להמשיך.", -1, 120, 97, 162, 10 + LTEXT "This wizard helps you to create shortcuts to local or\nnetwork programs, files, folders, computers, or Internet\naddresses.", -1, 120, 15, 200, 30 + LTEXT "הקלד את מיקום הפריט:", -1, 120, 50, 120, 10 + EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT + PUSHBUTTON "סייר...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT + LTEXT "לחץ הבא כדי להמשיך.", -1, 120, 97, 162, 10 END IDD_SHORTCUT_FINISH DIALOGEX 0, 0, 340, 200 @@ -37,15 +37,15 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "בחירת שם לתכנית" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "הקלד שם עבור קיצור דרך זה:", -1, 120, 15, 150, 10 - EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT - LTEXT "לחץ על סיום כדי ליצור את קיצור הדרך.", -1, 118, 97, 178, 17 + LTEXT "הקלד שם עבור קיצור דרך זה:", -1, 120, 15, 150, 10 + EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT + LTEXT "לחץ על סיום כדי ליצור את קיצור הדרך.", -1, 118, 97, 178, 17 END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME "הוספת/הסרת תכניות" - IDS_CPLSYSTEMDESCRIPTION "מגדיר תכניות ויוצר קישורי דרך." + IDS_CPLSYSTEMNAME "הוספת/הסרת תכניות" + IDS_CPLSYSTEMDESCRIPTION "מגדיר תכניות ויוצר קישורי דרך." IDS_CREATE_SHORTCUT "צור קיצור דרך" IDS_ERROR_NOT_FOUND "הקובץ %s לא נמצא." END @@ -62,7 +62,7 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMEN CAPTION "Wine Gecko Installer" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Wine could not find a Gecko package which is needed for applications embedding HTML to work correctly. Wine can automatically download and install it for you.\n\nNote: it is recommended to use your distribution's packages instead. See http://wiki.winehq.org/Gecko for details.", + CONTROL "ReactOS could not find a Wine Gecko package which is needed for applications embedding HTML to work correctly. ReactOS can automatically download and install it for you.", ID_DWL_STATUS, "SysLink", 0, 10, 10, 240, 65 CONTROL "", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER | PBS_SMOOTH, 10, 40, 240, 12 DEFPUSHBUTTON "&Install", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP diff --git a/dll/cpl/appwiz/lang/it-IT.rc b/dll/cpl/appwiz/lang/it-IT.rc index 9c2a5fdac36..15ec4b06c71 100644 --- a/dll/cpl/appwiz/lang/it-IT.rc +++ b/dll/cpl/appwiz/lang/it-IT.rc @@ -61,7 +61,7 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMEN CAPTION "Wine Gecko Installer" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Wine could not find a Gecko package which is needed for applications embedding HTML to work correctly. Wine can automatically download and install it for you.\n\nNote: it is recommended to use your distribution's packages instead. See http://wiki.winehq.org/Gecko for details.", + CONTROL "ReactOS could not find a Wine Gecko package which is needed for applications embedding HTML to work correctly. ReactOS can automatically download and install it for you.", ID_DWL_STATUS, "SysLink", 0, 10, 10, 240, 65 CONTROL "", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER | PBS_SMOOTH, 10, 40, 240, 12 DEFPUSHBUTTON "&Install", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP diff --git a/dll/cpl/appwiz/lang/no-NO.rc b/dll/cpl/appwiz/lang/no-NO.rc index 677dda0e008..4bcf7d07541 100644 --- a/dll/cpl/appwiz/lang/no-NO.rc +++ b/dll/cpl/appwiz/lang/no-NO.rc @@ -61,7 +61,7 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMEN CAPTION "Wine Gecko Installer" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Wine could not find a Gecko package which is needed for applications embedding HTML to work correctly. Wine can automatically download and install it for you.\n\nNote: it is recommended to use your distribution's packages instead. See http://wiki.winehq.org/Gecko for details.", + CONTROL "ReactOS could not find a Wine Gecko package which is needed for applications embedding HTML to work correctly. ReactOS can automatically download and install it for you.", ID_DWL_STATUS, "SysLink", 0, 10, 10, 240, 65 CONTROL "", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER | PBS_SMOOTH, 10, 40, 240, 12 DEFPUSHBUTTON "&Install", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP diff --git a/dll/cpl/appwiz/lang/pl-PL.rc b/dll/cpl/appwiz/lang/pl-PL.rc index f1453425ee9..b46b76189b7 100644 --- a/dll/cpl/appwiz/lang/pl-PL.rc +++ b/dll/cpl/appwiz/lang/pl-PL.rc @@ -13,8 +13,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Utwórz łącze" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Text1", -1, 115, 15, 160, 24 - LTEXT "Text2", -1, 115, 35, 160, 17 + LTEXT "Text1", -1, 115, 15, 160, 24 + LTEXT "Text2", -1, 115, 35, 160, 17 END IDD_SUBMIT_REPORT DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT @@ -22,9 +22,9 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Utwórz łącze" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Text1",-1,10,0,225,40 - LTEXT "Text2",-1,10,40,120,20 - LTEXT "Text3",-1,10,55,120,20 + LTEXT "Text1",-1,10,0,225,40 + LTEXT "Text2",-1,10,40,120,20 + LTEXT "Text3",-1,10,55,120,20 END IDD_SHORTCUT_LOCATION DIALOGEX 0, 0, 340, 200 @@ -32,11 +32,11 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Utwórz skrót" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Ten program konfiguracyjny pomoże ci stworzyć skróty do lokalnych lub\nsieciowych programów, plików, katalogów, komputerów, bądź addresów\nInternetowych.", -1, 120, 15, 200, 30 - LTEXT "Wpisz ścieżkę dostępu do obiektu:", -1, 120, 50, 120, 10 - EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT - PUSHBUTTON "Przeglądaj...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT - LTEXT "Naciśnij Dalej aby kontynuować.", -1, 120, 97, 162, 10 + LTEXT "Ten program konfiguracyjny pomoże ci stworzyć skróty do lokalnych lub\nsieciowych programów, plików, katalogów, komputerów, bądź addresów\nInternetowych.", -1, 120, 15, 200, 30 + LTEXT "Wpisz ścieżkę dostępu do obiektu:", -1, 120, 50, 120, 10 + EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT + PUSHBUTTON "Przeglądaj...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT + LTEXT "Naciśnij Dalej aby kontynuować.", -1, 120, 97, 162, 10 END IDD_SHORTCUT_FINISH DIALOGEX 0, 0, 340, 200 @@ -44,15 +44,15 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Wybierz nazwę" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "&Wpisz nazwę dla tego skrótu:", -1, 120, 15, 150, 10 - EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT - LTEXT "Naciśnij Zakończ by utworzyć skrót.", -1, 118, 97, 178, 17 + LTEXT "&Wpisz nazwę dla tego skrótu:", -1, 120, 15, 150, 10 + EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT + LTEXT "Naciśnij Zakończ by utworzyć skrót.", -1, 118, 97, 178, 17 END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME "Dodaj/Usuń Programy" - IDS_CPLSYSTEMDESCRIPTION "Instaluje bądź usuwa programy oraz tworzy skróty." + IDS_CPLSYSTEMNAME "Dodaj/Usuń Programy" + IDS_CPLSYSTEMDESCRIPTION "Instaluje bądź usuwa programy oraz tworzy skróty." IDS_CREATE_SHORTCUT "Utwórz skrót" IDS_ERROR_NOT_FOUND "Plik %s nie został znaleziony." END @@ -69,7 +69,7 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMEN CAPTION "Wine Gecko Installer" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Wine could not find a Gecko package which is needed for applications embedding HTML to work correctly. Wine can automatically download and install it for you.\n\nNote: it is recommended to use your distribution's packages instead. See http://wiki.winehq.org/Gecko for details.", + CONTROL "ReactOS could not find a Wine Gecko package which is needed for applications embedding HTML to work correctly. ReactOS can automatically download and install it for you.", ID_DWL_STATUS, "SysLink", 0, 10, 10, 240, 65 CONTROL "", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER | PBS_SMOOTH, 10, 40, 240, 12 DEFPUSHBUTTON "&Install", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP diff --git a/dll/cpl/appwiz/lang/pt-BR.rc b/dll/cpl/appwiz/lang/pt-BR.rc index 867acfdce2b..1a95215e978 100644 --- a/dll/cpl/appwiz/lang/pt-BR.rc +++ b/dll/cpl/appwiz/lang/pt-BR.rc @@ -7,8 +7,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Criar link" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Text1", -1, 115, 15, 160, 24 - LTEXT "Text2", -1, 115, 35, 160, 17 + LTEXT "Text1", -1, 115, 15, 160, 24 + LTEXT "Text2", -1, 115, 35, 160, 17 END IDD_SUBMIT_REPORT DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT @@ -16,9 +16,9 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Criar link" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Text1",-1,10,0,225,40 - LTEXT "Text2",-1,10,40,120,20 - LTEXT "Text3",-1,10,55,120,20 + LTEXT "Text1",-1,10,0,225,40 + LTEXT "Text2",-1,10,40,120,20 + LTEXT "Text3",-1,10,55,120,20 END IDD_SHORTCUT_LOCATION DIALOGEX 0, 0, 340, 200 @@ -26,11 +26,11 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Criar Atalho" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Este assitente irá ajudá-lo a criar atalhos para\nprogramas, arquivos, pastas, computadores ou endereços\nde Internet, ambos locais ou de rede.", -1, 120, 15, 200, 30 - LTEXT "Digite a localização do item:", -1, 120, 50, 120, 10 - EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT - PUSHBUTTON "Procurar...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT - LTEXT "Pressione Próximo para prosseguir.", -1, 120, 97, 162, 10 + LTEXT "Este assitente irá ajudá-lo a criar atalhos para\nprogramas, arquivos, pastas, computadores ou endereços\nde Internet, ambos locais ou de rede.", -1, 120, 15, 200, 30 + LTEXT "Digite a localização do item:", -1, 120, 50, 120, 10 + EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT + PUSHBUTTON "Procurar...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT + LTEXT "Pressione Próximo para prosseguir.", -1, 120, 97, 162, 10 END IDD_SHORTCUT_FINISH DIALOGEX 0, 0, 340, 200 @@ -38,15 +38,15 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Selecione um Título para o Programa" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "&Digite um nome para este atalho:", -1, 120, 15, 150, 10 - EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT - LTEXT "Pressione Terminar para criar o atalho.", -1, 118, 97, 178, 17 + LTEXT "&Digite um nome para este atalho:", -1, 120, 15, 150, 10 + EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT + LTEXT "Pressione Terminar para criar o atalho.", -1, 118, 97, 178, 17 END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME "Adicionar/Remover Programas" - IDS_CPLSYSTEMDESCRIPTION "Configura programas e cria atalhos." + IDS_CPLSYSTEMNAME "Adicionar/Remover Programas" + IDS_CPLSYSTEMDESCRIPTION "Configura programas e cria atalhos." IDS_CREATE_SHORTCUT "Criar Atalho" IDS_ERROR_NOT_FOUND "O arquivo %s não foi encontrado." END @@ -63,7 +63,7 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMEN CAPTION "Wine Gecko Installer" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Wine could not find a Gecko package which is needed for applications embedding HTML to work correctly. Wine can automatically download and install it for you.\n\nNote: it is recommended to use your distribution's packages instead. See http://wiki.winehq.org/Gecko for details.", + CONTROL "ReactOS could not find a Wine Gecko package which is needed for applications embedding HTML to work correctly. ReactOS can automatically download and install it for you.", ID_DWL_STATUS, "SysLink", 0, 10, 10, 240, 65 CONTROL "", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER | PBS_SMOOTH, 10, 40, 240, 12 DEFPUSHBUTTON "&Install", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP diff --git a/dll/cpl/appwiz/lang/ro-RO.rc b/dll/cpl/appwiz/lang/ro-RO.rc index e59842ca720..069c4c6371d 100644 --- a/dll/cpl/appwiz/lang/ro-RO.rc +++ b/dll/cpl/appwiz/lang/ro-RO.rc @@ -12,8 +12,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Creare legătură" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Text1", -1, 115, 15, 160, 24 - LTEXT "Text2", -1, 115, 35, 160, 17 + LTEXT "Text1", -1, 115, 15, 160, 24 + LTEXT "Text2", -1, 115, 35, 160, 17 END IDD_SUBMIT_REPORT DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT @@ -21,9 +21,9 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Creare legătură" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Text1",-1,10,0,225,40 - LTEXT "Text2",-1,10,40,120,20 - LTEXT "Text3",-1,10,55,120,20 + LTEXT "Text1",-1,10,0,225,40 + LTEXT "Text2",-1,10,40,120,20 + LTEXT "Text3",-1,10,55,120,20 END IDD_SHORTCUT_LOCATION DIALOGEX 0, 0, 340, 200 @@ -31,11 +31,11 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Creare scurtătură" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Acest expert vă va asista în crearea unei scurtături\ncătre adrese din Internet, calculatoare, dosare, fișiere\nlocale sau din rețea.", -1, 120, 15, 200, 30 - LTEXT "Scrieți adresa elementului:", -1, 120, 50, 120, 10 - EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT - PUSHBUTTON "&Răsfoire…", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT - LTEXT "Apăsați „Înainte” pentru a continua.", -1, 120, 97, 162, 10 + LTEXT "Acest expert vă va asista în crearea unei scurtături\ncătre adrese din Internet, calculatoare, dosare, fișiere\nlocale sau din rețea.", -1, 120, 15, 200, 30 + LTEXT "Scrieți adresa elementului:", -1, 120, 50, 120, 10 + EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT + PUSHBUTTON "&Răsfoire…", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT + LTEXT "Apăsați „Înainte” pentru a continua.", -1, 120, 97, 162, 10 END IDD_SHORTCUT_FINISH DIALOGEX 0, 0, 340, 200 @@ -43,15 +43,15 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Titlul scurtăturii" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Scrieți un &nume pentru scurtătură:", -1, 120, 15, 150, 10 - EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT - LTEXT "Apăsați „Termină” pentru a crea scurtătura.", -1, 118, 97, 178, 17 + LTEXT "Scrieți un &nume pentru scurtătură:", -1, 120, 15, 150, 10 + EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT + LTEXT "Apăsați „Termină” pentru a crea scurtătura.", -1, 118, 97, 178, 17 END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME "Gestionar de aplicații" - IDS_CPLSYSTEMDESCRIPTION "Instalează programe și crează scurtături." + IDS_CPLSYSTEMNAME "Gestionar de aplicații" + IDS_CPLSYSTEMDESCRIPTION "Instalează programe și crează scurtături." IDS_CREATE_SHORTCUT "Creare scurtătură" IDS_ERROR_NOT_FOUND "Elementul „%s” nu poate fi localizat." END @@ -68,7 +68,7 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMEN CAPTION "Wine Gecko Installer" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Wine could not find a Gecko package which is needed for applications embedding HTML to work correctly. Wine can automatically download and install it for you.\n\nNote: it is recommended to use your distribution's packages instead. See http://wiki.winehq.org/Gecko for details.", + CONTROL "ReactOS could not find a Wine Gecko package which is needed for applications embedding HTML to work correctly. ReactOS can automatically download and install it for you.", ID_DWL_STATUS, "SysLink", 0, 10, 10, 240, 65 CONTROL "", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER | PBS_SMOOTH, 10, 40, 240, 12 DEFPUSHBUTTON "&Install", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP diff --git a/dll/cpl/appwiz/lang/ru-RU.rc b/dll/cpl/appwiz/lang/ru-RU.rc index 36ff60d2b2e..f2e377779fb 100644 --- a/dll/cpl/appwiz/lang/ru-RU.rc +++ b/dll/cpl/appwiz/lang/ru-RU.rc @@ -5,8 +5,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Создания ярлыка" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Text1", -1, 115, 15, 160, 24 - LTEXT "Text2", -1, 115, 35, 160, 17 + LTEXT "Text1", -1, 115, 15, 160, 24 + LTEXT "Text2", -1, 115, 35, 160, 17 END IDD_SUBMIT_REPORT DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT @@ -14,9 +14,9 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Создание ярлыка" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Text1",-1,10,0,225,40 - LTEXT "Text2",-1,10,40,120,20 - LTEXT "Text3",-1,10,55,120,20 + LTEXT "Text1",-1,10,0,225,40 + LTEXT "Text2",-1,10,40,120,20 + LTEXT "Text3",-1,10,55,120,20 END IDD_SHORTCUT_LOCATION DIALOGEX 0, 0, 340, 200 @@ -24,11 +24,11 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Создание ярлыка" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Этот мастер поможет создать ярлык для локальных или\nсетевых программ, файлов, папок, компьютеров или\nИнтернет-адресов.", -1, 120, 15, 200, 30 - LTEXT "Выберите местоположение элемента:", -1, 120, 50, 120, 10 - EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT - PUSHBUTTON "Обзор...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT - LTEXT "Щелкните ""Далее"" для продолжения.", -1, 120, 97, 162, 10 + LTEXT "Этот мастер поможет создать ярлык для локальных или\nсетевых программ, файлов, папок, компьютеров или\nИнтернет-адресов.", -1, 120, 15, 200, 30 + LTEXT "Выберите местоположение элемента:", -1, 120, 50, 120, 10 + EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT + PUSHBUTTON "Обзор...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT + LTEXT "Щелкните ""Далее"" для продолжения.", -1, 120, 97, 162, 10 END IDD_SHORTCUT_FINISH DIALOGEX 0, 0, 340, 200 @@ -36,15 +36,15 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Выбор заголовка для программы" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "&Введите заголовок ярлыка:", -1, 120, 15, 150, 10 - EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT - LTEXT "Щелкните ""Завершить"" для создания ярлыка.", -1, 118, 97, 178, 17 + LTEXT "&Введите заголовок ярлыка:", -1, 120, 15, 150, 10 + EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT + LTEXT "Щелкните ""Завершить"" для создания ярлыка.", -1, 118, 97, 178, 17 END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME "Установка и удаление программ" - IDS_CPLSYSTEMDESCRIPTION "Работа с программами, обновлениями и ярлыками." + IDS_CPLSYSTEMNAME "Установка и удаление программ" + IDS_CPLSYSTEMDESCRIPTION "Работа с программами, обновлениями и ярлыками." IDS_CREATE_SHORTCUT "Создать ярлык" IDS_ERROR_NOT_FOUND "Файл %s не найден." END @@ -61,7 +61,7 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMEN CAPTION "Wine Gecko Installer" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Wine could not find a Gecko package which is needed for applications embedding HTML to work correctly. Wine can automatically download and install it for you.\n\nNote: it is recommended to use your distribution's packages instead. See http://wiki.winehq.org/Gecko for details.", + CONTROL "ReactOS could not find a Wine Gecko package which is needed for applications embedding HTML to work correctly. ReactOS can automatically download and install it for you.", ID_DWL_STATUS, "SysLink", 0, 10, 10, 240, 65 CONTROL "", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER | PBS_SMOOTH, 10, 40, 240, 12 DEFPUSHBUTTON "&Install", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP diff --git a/dll/cpl/appwiz/lang/sk-SK.rc b/dll/cpl/appwiz/lang/sk-SK.rc index fbff4f80957..61bdcc14c62 100644 --- a/dll/cpl/appwiz/lang/sk-SK.rc +++ b/dll/cpl/appwiz/lang/sk-SK.rc @@ -65,7 +65,7 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMEN CAPTION "Wine Gecko Installer" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Wine could not find a Gecko package which is needed for applications embedding HTML to work correctly. Wine can automatically download and install it for you.\n\nNote: it is recommended to use your distribution's packages instead. See http://wiki.winehq.org/Gecko for details.", + CONTROL "ReactOS could not find a Wine Gecko package which is needed for applications embedding HTML to work correctly. ReactOS can automatically download and install it for you.", ID_DWL_STATUS, "SysLink", 0, 10, 10, 240, 65 CONTROL "", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER | PBS_SMOOTH, 10, 40, 240, 12 DEFPUSHBUTTON "&Install", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP diff --git a/dll/cpl/appwiz/lang/tr-TR.rc b/dll/cpl/appwiz/lang/tr-TR.rc new file mode 100644 index 00000000000..dd378bd70f7 --- /dev/null +++ b/dll/cpl/appwiz/lang/tr-TR.rc @@ -0,0 +1,73 @@ +/* + * TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) (erdemersoy@live.com) + */ + +LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT + +IDD_FIRSTPAGE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Bağlantı Oluştur" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Metin1", -1, 115, 15, 160, 24 + LTEXT "Metin2", -1, 115, 35, 160, 17 +END + +IDD_SUBMIT_REPORT DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Bağlantı Oluştur" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Metin1",-1,10,0,225,40 + LTEXT "Metin2",-1,10,40,120,20 + LTEXT "Metin3",-1,10,55,120,20 +END + +IDD_SHORTCUT_LOCATION DIALOGEX 0, 0, 340, 200 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Kısayol Oluştur" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "Bu sihirbaz, ağdaki ya da mahallî çizeylemlere, kütüklere,\ndizinlere, bilgisayarlara ve örütbağ adreslerine\nkısayol oluşturmanıza yardımcı olur.", -1, 120, 15, 200, 30 + LTEXT "Nesnenin konumunu yazınız:", -1, 120, 50, 120, 10 + EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT + PUSHBUTTON "&Göz At...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT + LTEXT "Sürdürmek için ""İleri"" düğmesine tıklayınız.", -1, 120, 97, 162, 10 +END + +IDD_SHORTCUT_FINISH DIALOGEX 0, 0, 340, 200 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Kısayolun Adını Girme" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + LTEXT "&Kısayolun adını giriniz:", -1, 120, 15, 150, 10 + EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT + LTEXT "Kısayolu oluşturmak için ""Bitir"" düğmesine tıklayınız.", -1, 118, 97, 178, 17 +END + +STRINGTABLE +BEGIN + IDS_CPLSYSTEMNAME "Yazılım Ekle/Kaldır" + IDS_CPLSYSTEMDESCRIPTION "Yazılımları kurar ve kısayolları oluşturur." + IDS_CREATE_SHORTCUT "Kısayol Oluştur" + IDS_ERROR_NOT_FOUND "%s kütüğü bulunamadı." +END + +STRINGTABLE +BEGIN + IDS_DOWNLOADING "İndiriliyor..." + IDS_INSTALLING "Kuruluyor..." + IDS_INVALID_SHA "İndirilen kütükte beklenmeyen sağlama toplamı var. Bozuk kütüğün kurulumu iptal ediliyor." +END + +ID_DWL_GECKO_DIALOG DIALOG 0, 0, 260, 95 +STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Wine Geko Kurucusu" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "ReactOS, HTML gömülü uygulamalarını düzgün bir şekilde çalıştırmak için gereken Wine Geko paketini bulamadı. ReactOS, bunu indirip kurabilir.", + ID_DWL_STATUS, "SysLink", 0, 10, 10, 240, 65 + CONTROL "", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER | PBS_SMOOTH, 10, 40, 240, 12 + DEFPUSHBUTTON "&Kur", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "İptal", IDCANCEL, 144, 76, 50, 14, WS_GROUP | WS_TABSTOP +END diff --git a/dll/cpl/appwiz/lang/uk-UA.rc b/dll/cpl/appwiz/lang/uk-UA.rc index b6c4ac790c0..03b98393c1f 100644 --- a/dll/cpl/appwiz/lang/uk-UA.rc +++ b/dll/cpl/appwiz/lang/uk-UA.rc @@ -13,8 +13,8 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Створення ярлика" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Text1", -1, 115, 15, 160, 24 - LTEXT "Text2", -1, 115, 35, 160, 17 + LTEXT "Text1", -1, 115, 15, 160, 24 + LTEXT "Text2", -1, 115, 35, 160, 17 END IDD_SUBMIT_REPORT DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT @@ -22,9 +22,9 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Створення ярлика" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Text1",-1,10,0,225,40 - LTEXT "Text2",-1,10,40,120,20 - LTEXT "Text3",-1,10,55,120,20 + LTEXT "Text1",-1,10,0,225,40 + LTEXT "Text2",-1,10,40,120,20 + LTEXT "Text3",-1,10,55,120,20 END IDD_SHORTCUT_LOCATION DIALOGEX 0, 0, 340, 200 @@ -32,11 +32,11 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Створення ярлика" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "Цей майстер допомагає створити ярлик, який указує на\nлокальні або мережні програми, файли, папки, комп'ютери\nабо адреси в Інтернеті.", -1, 120, 15, 200, 30 - LTEXT "Укажіть розташування об'єкта:", -1, 120, 50, 120, 10 - EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT - PUSHBUTTON "Огляд...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT - LTEXT "Щоб продовжити установку, натисніть кнопку ""Далі"".", -1, 120, 97, 162, 10 + LTEXT "Цей майстер допомагає створити ярлик, який указує на\nлокальні або мережні програми, файли, папки, комп'ютери\nабо адреси в Інтернеті.", -1, 120, 15, 200, 30 + LTEXT "Укажіть розташування об'єкта:", -1, 120, 50, 120, 10 + EDITTEXT IDC_SHORTCUT_LOCATION, 120, 65, 150, 15, ES_LEFT + PUSHBUTTON "Огляд...", IDC_SHORTCUT_BROWSE, 272, 65, 55, 15, ES_LEFT + LTEXT "Щоб продовжити установку, натисніть кнопку ""Далі"".", -1, 120, 97, 162, 10 END IDD_SHORTCUT_FINISH DIALOGEX 0, 0, 340, 200 @@ -44,15 +44,15 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Вибір назви програми" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN - LTEXT "&Введіть ім'я ярлика:", -1, 120, 15, 150, 10 - EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT - LTEXT "Щоб створити ярлик, натисніть кнопку ""Готово"".", -1, 118, 97, 178, 17 + LTEXT "&Введіть ім'я ярлика:", -1, 120, 15, 150, 10 + EDITTEXT IDC_SHORTCUT_NAME, 120, 35, 150, 15, ES_LEFT + LTEXT "Щоб створити ярлик, натисніть кнопку ""Готово"".", -1, 118, 97, 178, 17 END STRINGTABLE BEGIN - IDS_CPLSYSTEMNAME "Установка й видалення програм" - IDS_CPLSYSTEMDESCRIPTION "Встановлення програм і створення ярликів." + IDS_CPLSYSTEMNAME "Установка й видалення програм" + IDS_CPLSYSTEMDESCRIPTION "Встановлення програм і створення ярликів." IDS_CREATE_SHORTCUT "Створити ярлик" IDS_ERROR_NOT_FOUND "Файл %s не знайдений." END @@ -69,7 +69,7 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMEN CAPTION "Wine Gecko Installer" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Wine could not find a Gecko package which is needed for applications embedding HTML to work correctly. Wine can automatically download and install it for you.\n\nNote: it is recommended to use your distribution's packages instead. See http://wiki.winehq.org/Gecko for details.", + CONTROL "ReactOS could not find a Wine Gecko package which is needed for applications embedding HTML to work correctly. ReactOS can automatically download and install it for you.", ID_DWL_STATUS, "SysLink", 0, 10, 10, 240, 65 CONTROL "", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER | PBS_SMOOTH, 10, 40, 240, 12 DEFPUSHBUTTON "&Install", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP diff --git a/dll/cpl/appwiz/lang/zh-CN.rc b/dll/cpl/appwiz/lang/zh-CN.rc index 6c4b4a7e2e2..0b45a70a662 100644 --- a/dll/cpl/appwiz/lang/zh-CN.rc +++ b/dll/cpl/appwiz/lang/zh-CN.rc @@ -68,7 +68,7 @@ STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMEN CAPTION "Wine Gecko Installer" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Wine could not find a Gecko package which is needed for applications embedding HTML to work correctly. Wine can automatically download and install it for you.\n\nNote: it is recommended to use your distribution's packages instead. See http://wiki.winehq.org/Gecko for details.", + CONTROL "ReactOS could not find a Wine Gecko package which is needed for applications embedding HTML to work correctly. ReactOS can automatically download and install it for you.", ID_DWL_STATUS, "SysLink", 0, 10, 10, 240, 65 CONTROL "", ID_DWL_PROGRESS, PROGRESS_CLASSA, WS_BORDER | PBS_SMOOTH, 10, 40, 240, 12 DEFPUSHBUTTON "&Install", ID_DWL_INSTALL, 200, 76, 50, 14, WS_GROUP | WS_TABSTOP diff --git a/dll/cpl/appwiz/rsrc.rc b/dll/cpl/appwiz/rsrc.rc index b003da144a4..61bc0c9dc84 100644 --- a/dll/cpl/appwiz/rsrc.rc +++ b/dll/cpl/appwiz/rsrc.rc @@ -7,15 +7,9 @@ #ifdef LANGUAGE_EL_GR #include "lang/el-GR.rc" #endif -#ifdef LANGUAGE_EN_US - #include "lang/en-US.rc" -#endif #ifdef LANGUAGE_ES_ES #include "lang/es-ES.rc" #endif -#ifdef LANGUAGE_FR_FR - #include "lang/fr-FR.rc" -#endif #ifdef LANGUAGE_IT_IT #include "lang/it-IT.rc" #endif @@ -34,6 +28,12 @@ #ifdef LANGUAGE_CS_CZ #include "lang/cs-CZ.rc" #endif +#ifdef LANGUAGE_EN_US + #include "lang/en-US.rc" +#endif +#ifdef LANGUAGE_FR_FR + #include "lang/fr-FR.rc" +#endif #ifdef LANGUAGE_HE_IL #include "lang/he-IL.rc" #endif @@ -49,6 +49,9 @@ #ifdef LANGUAGE_RU_RU #include "lang/ru-RU.rc" #endif +#ifdef LANGUAGE_TR_TR + #include "lang/tr-TR.rc" +#endif #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" #endif diff --git a/dll/cpl/console/colors.c b/dll/cpl/console/colors.c index 94f549a6eb1..00ddc80ec39 100644 --- a/dll/cpl/console/colors.c +++ b/dll/cpl/console/colors.c @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/win32/console/colors.c * PURPOSE: displays colors dialog - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@student.tugraz.at) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "console.h" diff --git a/dll/cpl/console/console.c b/dll/cpl/console/console.c index a674aa018a1..16db1146788 100644 --- a/dll/cpl/console/console.c +++ b/dll/cpl/console/console.c @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/win32/console/console.c * PURPOSE: initialization of DLL - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@student.tugraz.at) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "console.h" diff --git a/dll/cpl/console/console.rc b/dll/cpl/console/console.rc index 93d94c33b81..add970a4baf 100644 --- a/dll/cpl/console/console.rc +++ b/dll/cpl/console/console.rc @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/win32/console/console.rc * PURPOSE: main resource file - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@student.tugraz.at) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include @@ -17,6 +17,8 @@ #define REACTOS_STR_ORIGINAL_FILENAME "console.dll\0" #include -IDC_CPLICON ICON DISCARDABLE "res/terminal.ico" +IDC_CPLICON ICON "res/terminal.ico" + +#include #include "rsrc.rc" diff --git a/dll/cpl/console/font.c b/dll/cpl/console/font.c index a4e11609a9e..a65b7786d1e 100644 --- a/dll/cpl/console/font.c +++ b/dll/cpl/console/font.c @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/win32/console/font.c * PURPOSE: displays font dialog - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@student.tugraz.at) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "console.h" diff --git a/dll/cpl/console/lang/bg-BG.rc b/dll/cpl/console/lang/bg-BG.rc index 279f5555df1..f67daee67c9 100644 --- a/dll/cpl/console/lang/bg-BG.rc +++ b/dll/cpl/console/lang/bg-BG.rc @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/console/lang/en-US.rc * PURPOSE: English resource file - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@student.tugraz.at) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include diff --git a/dll/cpl/console/lang/en-US.rc b/dll/cpl/console/lang/en-US.rc index 9d37e6f598d..73ac9797693 100644 --- a/dll/cpl/console/lang/en-US.rc +++ b/dll/cpl/console/lang/en-US.rc @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/console/lang/en-US.rc * PURPOSE: English resource file - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@student.tugraz.at) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include diff --git a/dll/cpl/console/lang/he-IL.rc b/dll/cpl/console/lang/he-IL.rc index 1fb0a216315..7017d9569fb 100644 --- a/dll/cpl/console/lang/he-IL.rc +++ b/dll/cpl/console/lang/he-IL.rc @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/console/lang/he-IL.rc * PURPOSE: Hebrew resource file - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@student.tugraz.at) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) * TRANSLATORS: Baruch Rutman (peterooch@gmail.com) */ diff --git a/dll/cpl/console/lang/no-NO.rc b/dll/cpl/console/lang/no-NO.rc index 209f72160eb..782ebcc6d08 100644 --- a/dll/cpl/console/lang/no-NO.rc +++ b/dll/cpl/console/lang/no-NO.rc @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/win32/console/lang/en-US.rc * PURPOSE: Norwegian resource file - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@student.tugraz.at) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include diff --git a/dll/cpl/console/lang/uk-UA.rc b/dll/cpl/console/lang/uk-UA.rc index 4a96456e583..0f076eb3ae3 100644 --- a/dll/cpl/console/lang/uk-UA.rc +++ b/dll/cpl/console/lang/uk-UA.rc @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/win32/console/lang/en-US.rc * PURPOSE: Ukraianian resource file - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@student.tugraz.at) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) * TRANSLATOR: Artem Reznikov */ diff --git a/dll/cpl/console/layout.c b/dll/cpl/console/layout.c index e4e69788901..065e00c3c28 100644 --- a/dll/cpl/console/layout.c +++ b/dll/cpl/console/layout.c @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/win32/console/layout.c * PURPOSE: displays layout dialog - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@student.tugraz.at) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "console.h" diff --git a/dll/cpl/console/options.c b/dll/cpl/console/options.c index e3a19140cee..d445871ac39 100644 --- a/dll/cpl/console/options.c +++ b/dll/cpl/console/options.c @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/win32/console/options.c * PURPOSE: displays options dialog - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@student.tugraz.at) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "console.h" diff --git a/dll/cpl/desk/desk.rc b/dll/cpl/desk/desk.rc index 7823db03bee..f5844f06950 100644 --- a/dll/cpl/desk/desk.rc +++ b/dll/cpl/desk/desk.rc @@ -20,4 +20,6 @@ IDB_SPECTRUM_4 BITMAP "resources/spectrum_4.bmp" IDB_SPECTRUM_8 BITMAP "resources/spectrum_8.bmp" IDB_SPECTRUM_16 BITMAP "resources/spectrum_16.bmp" +#include + #include "rsrc.rc" diff --git a/dll/cpl/desk/lang/bg-BG.rc b/dll/cpl/desk/lang/bg-BG.rc index 2e8f960675d..b726d2a861e 100644 --- a/dll/cpl/desk/lang/bg-BG.rc +++ b/dll/cpl/desk/lang/bg-BG.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Работна площ" FONT 8, "MS Shell Dlg" @@ -46,7 +46,7 @@ BEGIN PUSHBUTTON "Захранване...", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Облик" FONT 8, "MS Shell Dlg" @@ -63,7 +63,7 @@ BEGIN PUSHBUTTON "Още", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Разширен облик" @@ -101,7 +101,7 @@ BEGIN DEFPUSHBUTTON "Добре", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Ефекти" @@ -125,7 +125,7 @@ BEGIN DEFPUSHBUTTON "Добре", IDOK, 172, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Настройки" FONT 8, "MS Shell Dlg" @@ -147,7 +147,7 @@ BEGIN PUSHBUTTON "Раз&ширени...",IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Общи" FONT 8, "MS Shell Dlg" @@ -182,13 +182,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "Ефект на плъзгане" IDS_FADEEFFECT "Ефект на изтляване" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "Обичаен" IDS_CLEARTYPEEFFECT "Изчистен" @@ -211,7 +211,7 @@ BEGIN IDS_TILE "Настелено" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "16 цвята" IDS_COLOR_8BIT "256 цвята" @@ -221,13 +221,13 @@ BEGIN IDS_PIXEL "%lux%lu точки" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "Изображения (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "Нетекущ прозорец" IDS_ACTWIN "Текущ прозорец" @@ -238,7 +238,7 @@ BEGIN IDS_CLASSIC_THEME "Classic Theme" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "Работна площ" IDS_ELEMENT_2 "Надписвания на нетекущите прозорци" @@ -264,7 +264,7 @@ BEGIN IDS_ELEMENT_22 "Символ" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "Настройки на екрана" IDS_APPLY_FAILED "Неуспешно прилагане на новите настройки..." diff --git a/dll/cpl/desk/lang/cs-CZ.rc b/dll/cpl/desk/lang/cs-CZ.rc index 32626ffcce3..37ab0117184 100644 --- a/dll/cpl/desk/lang/cs-CZ.rc +++ b/dll/cpl/desk/lang/cs-CZ.rc @@ -6,7 +6,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Pozadí" FONT 8, "MS Shell Dlg" @@ -50,7 +50,7 @@ BEGIN PUSHBUTTON "Na&pájení...", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Vzhled" FONT 8, "MS Shell Dlg" @@ -67,7 +67,7 @@ BEGIN PUSHBUTTON "Upřesnit", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Upřesnit vzhled" @@ -105,7 +105,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Efekty" @@ -129,7 +129,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Nastavení" FONT 8, "MS Shell Dlg" @@ -151,7 +151,7 @@ BEGIN PUSHBUTTON "&Upřesnit",IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Obecné" FONT 8, "MS Shell Dlg" @@ -186,13 +186,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "Efekt vysunutí" IDS_FADEEFFECT "Efekt přechodu" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "Standardní" IDS_CLEARTYPEEFFECT "ClearType" @@ -215,7 +215,7 @@ BEGIN IDS_TILE "Dlaždice" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "16 barev" IDS_COLOR_8BIT "256 barev" @@ -225,13 +225,13 @@ BEGIN IDS_PIXEL "%lux%lu bodů" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "Obrázky (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "Neaktivní okno" IDS_ACTWIN "Aktivní okno" @@ -242,7 +242,7 @@ BEGIN IDS_CLASSIC_THEME "Klasické téma" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "Plocha" IDS_ELEMENT_2 "Neaktivní záhlaví" @@ -268,7 +268,7 @@ BEGIN IDS_ELEMENT_22 "Ikona" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "Nastavení zobrazení" IDS_APPLY_FAILED "Nepodařilo se aplikovat nová nastavení..." diff --git a/dll/cpl/desk/lang/de-DE.rc b/dll/cpl/desk/lang/de-DE.rc index 0b7f41881cb..491fdf8c02e 100644 --- a/dll/cpl/desk/lang/de-DE.rc +++ b/dll/cpl/desk/lang/de-DE.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Desktop" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN PUSHBUTTON "Energieoptionen", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Darstellung" FONT 8, "MS Shell Dlg" @@ -61,7 +61,7 @@ BEGIN PUSHBUTTON "Erweitert", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Erweiterte Darstellung" @@ -99,7 +99,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Effekte" @@ -123,7 +123,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Einstellungen" FONT 8, "MS Shell Dlg" @@ -145,7 +145,7 @@ BEGIN PUSHBUTTON "&Erweitert",IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Allgemein" FONT 8, "MS Shell Dlg" @@ -180,13 +180,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "Gleiten" IDS_FADEEFFECT "Ausblenden" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "Standard" IDS_CLEARTYPEEFFECT "ClearType" @@ -209,7 +209,7 @@ BEGIN IDS_TILE "Nebeneinander" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "16 Farben" IDS_COLOR_8BIT "256 Farben" @@ -219,13 +219,13 @@ BEGIN IDS_PIXEL "%lux%lu Pixel" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "Bilddateien (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "Inaktives Fenster" IDS_ACTWIN "Aktives Fenster" @@ -236,7 +236,7 @@ BEGIN IDS_CLASSIC_THEME "Klassischer Stil" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "Desktop" IDS_ELEMENT_2 "Titelleiste der inaktiven Fenster" @@ -262,7 +262,7 @@ BEGIN IDS_ELEMENT_22 "Symbol" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "Anzeigeeinstellungen" IDS_APPLY_FAILED "Beim Anwenden Ihrer Änderungen ist ein Fehler aufgetreten..." diff --git a/dll/cpl/desk/lang/el-GR.rc b/dll/cpl/desk/lang/el-GR.rc index c87919a3ea3..59be8656233 100644 --- a/dll/cpl/desk/lang/el-GR.rc +++ b/dll/cpl/desk/lang/el-GR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Φόντο" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN PUSHBUTTON "Ενέργεια...", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Εμφάνιση" FONT 8, "MS Shell Dlg" @@ -61,7 +61,7 @@ BEGIN PUSHBUTTON "Για προχωρημένους", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Πρόσθετες ρυθμίσεις εμφάνισης" @@ -99,7 +99,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Effects" @@ -123,7 +123,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Ρυθμίσεις" FONT 8, "MS Shell Dlg" @@ -145,7 +145,7 @@ BEGIN PUSHBUTTON "Για &προχωρημένους...",IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg" @@ -180,13 +180,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "Slide effect" IDS_FADEEFFECT "Fade effect" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "Standard" IDS_CLEARTYPEEFFECT "ClearType" @@ -209,7 +209,7 @@ BEGIN IDS_TILE "Σε παράθεση" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "16 χρώματα" IDS_COLOR_8BIT "256 χρώματα" @@ -219,13 +219,13 @@ BEGIN IDS_PIXEL "%lu επί %lu Pixel" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "Εικόνες (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "Ανενεργό παράθυρο" IDS_ACTWIN "Ενεργό παράθυρο" @@ -236,7 +236,7 @@ BEGIN IDS_CLASSIC_THEME "Κλασικό θέμα" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "Επιφάνεια εργασίας" IDS_ELEMENT_2 "Ανενεργή γραμμή τίτλου" @@ -262,7 +262,7 @@ BEGIN IDS_ELEMENT_22 "Εικονίδιο" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "Display settings" IDS_APPLY_FAILED "Failed to apply new settings..." diff --git a/dll/cpl/desk/lang/en-US.rc b/dll/cpl/desk/lang/en-US.rc index 54b7c08d074..4037921f9a6 100644 --- a/dll/cpl/desk/lang/en-US.rc +++ b/dll/cpl/desk/lang/en-US.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Background" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN PUSHBUTTON "P&ower...", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Appearance" FONT 8, "MS Shell Dlg" @@ -61,7 +61,7 @@ BEGIN PUSHBUTTON "Ad&vanced...", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Advanced Appearance" @@ -99,7 +99,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Effects" @@ -123,7 +123,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Settings" FONT 8, "MS Shell Dlg" @@ -145,7 +145,7 @@ BEGIN PUSHBUTTON "Ad&vanced...",IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg" @@ -180,13 +180,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "Slide effect" IDS_FADEEFFECT "Fade effect" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "Standard" IDS_CLEARTYPEEFFECT "ClearType" @@ -209,7 +209,7 @@ BEGIN IDS_TILE "Tile" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "16 Colors" IDS_COLOR_8BIT "256 Colors" @@ -219,13 +219,13 @@ BEGIN IDS_PIXEL "%lux%lu Pixel" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "Pictures (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "Inactive Window" IDS_ACTWIN "Active Window" @@ -236,7 +236,7 @@ BEGIN IDS_CLASSIC_THEME "Classic Theme" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "Desktop" IDS_ELEMENT_2 "Caption of inactive windows" @@ -262,7 +262,7 @@ BEGIN IDS_ELEMENT_22 "Symbol" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "Display settings" IDS_APPLY_FAILED "Failed to apply new settings..." diff --git a/dll/cpl/desk/lang/es-ES.rc b/dll/cpl/desk/lang/es-ES.rc index 6952225cbcd..c951ea051f9 100644 --- a/dll/cpl/desk/lang/es-ES.rc +++ b/dll/cpl/desk/lang/es-ES.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Escritorio" FONT 8, "MS Shell Dlg" @@ -52,7 +52,7 @@ BEGIN PUSHBUTTON "E&nergía...", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Apariencia" FONT 8, "MS Shell Dlg" @@ -69,7 +69,7 @@ BEGIN PUSHBUTTON "Opciones &avanzadas", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Opciones avanzadas de apariencia" @@ -107,7 +107,7 @@ BEGIN DEFPUSHBUTTON "Aceptar", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Efectos" @@ -131,7 +131,7 @@ BEGIN DEFPUSHBUTTON "Aceptar", IDOK, 172, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Configuración" FONT 8, "MS Shell Dlg" @@ -153,7 +153,7 @@ BEGIN PUSHBUTTON "Opciones &avanzadas",IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg" @@ -188,13 +188,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "Desplazamiento" IDS_FADEEFFECT "Atenuación" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "Estándar" IDS_CLEARTYPEEFFECT "ClearType" @@ -217,7 +217,7 @@ BEGIN IDS_TILE "En mosaico" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "Muy baja (4 bits)" IDS_COLOR_8BIT "Baja (8 bits)" @@ -227,13 +227,13 @@ BEGIN IDS_PIXEL "%lu x %lu píxeles" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "Imágenes (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "Ventana Inactiva" IDS_ACTWIN "Ventana Activa" @@ -244,7 +244,7 @@ BEGIN IDS_CLASSIC_THEME "Classic Theme" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "Escritorio" IDS_ELEMENT_2 "Barra de ventana inactiva" @@ -270,7 +270,7 @@ BEGIN IDS_ELEMENT_22 "Icono" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "Configuración del monitor" IDS_APPLY_FAILED "Error al aplicar la nueva configuración..." diff --git a/dll/cpl/desk/lang/fr-FR.rc b/dll/cpl/desk/lang/fr-FR.rc index 126a059857f..cac4ed8c2c6 100644 --- a/dll/cpl/desk/lang/fr-FR.rc +++ b/dll/cpl/desk/lang/fr-FR.rc @@ -3,7 +3,7 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Fond d'écran" FONT 8, "MS Shell Dlg" @@ -47,7 +47,7 @@ BEGIN PUSHBUTTON "&Gestion de l'alimentation...", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Apparence" FONT 8, "MS Shell Dlg" @@ -64,7 +64,7 @@ BEGIN PUSHBUTTON "Avancé", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Apparence avancée" @@ -102,7 +102,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Effets" @@ -126,7 +126,7 @@ BEGIN DEFPUSHBUTTON "Accepter", IDOK, 172, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Paramètres" FONT 8, "MS Shell Dlg" @@ -148,7 +148,7 @@ BEGIN PUSHBUTTON "A&vancé...",IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Général" FONT 8, "MS Shell Dlg" @@ -183,13 +183,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "Slide effect" IDS_FADEEFFECT "Fade effect" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "Standard" IDS_CLEARTYPEEFFECT "ClearType" @@ -212,7 +212,7 @@ BEGIN IDS_TILE "Mosaïque" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "16 Couleurs" IDS_COLOR_8BIT "256 Couleurs" @@ -222,13 +222,13 @@ BEGIN IDS_PIXEL "%lux%lu Pixel" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "Images (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "Fenêtre inactive" IDS_ACTWIN "Fenêtre active" @@ -239,7 +239,7 @@ BEGIN IDS_CLASSIC_THEME "Classic Theme" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "Bureau" IDS_ELEMENT_2 "Titre de fenêtres actives" @@ -265,7 +265,7 @@ BEGIN IDS_ELEMENT_22 "Symbole" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "Paramètres d'affichage" IDS_APPLY_FAILED "Echec lors de l'application des nouveaux paramètres..." diff --git a/dll/cpl/desk/lang/he-IL.rc b/dll/cpl/desk/lang/he-IL.rc index bee14812ff6..a76e261d43f 100644 --- a/dll/cpl/desk/lang/he-IL.rc +++ b/dll/cpl/desk/lang/he-IL.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "רקע" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN PUSHBUTTON "P&ower...", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "מראה" FONT 8, "MS Shell Dlg" @@ -61,7 +61,7 @@ BEGIN PUSHBUTTON "מתקדם...", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "מראה מתקדם" @@ -99,7 +99,7 @@ BEGIN DEFPUSHBUTTON "אישור", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "אפקטים" @@ -123,7 +123,7 @@ BEGIN DEFPUSHBUTTON "אישור", IDOK, 172, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "הגדרות" FONT 8, "MS Shell Dlg" @@ -145,7 +145,7 @@ BEGIN PUSHBUTTON "מתקדם...",IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "כללי" FONT 8, "MS Shell Dlg" @@ -180,13 +180,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "אפקט גלילה" IDS_FADEEFFECT "אפקט עמעום" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "רגיל" IDS_CLEARTYPEEFFECT "ClearType" @@ -209,7 +209,7 @@ BEGIN IDS_TILE "פרוש" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "16 צבעים" IDS_COLOR_8BIT "256 צבעים" @@ -219,13 +219,13 @@ BEGIN IDS_PIXEL "%lux%lu פיקסל" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "תמונות (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "חלון לא פעיל" IDS_ACTWIN "חלון פעיל" @@ -236,7 +236,7 @@ BEGIN IDS_CLASSIC_THEME "Classic Theme" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "שולחן עבודה" IDS_ELEMENT_2 "Caption of inactive windows" @@ -262,7 +262,7 @@ BEGIN IDS_ELEMENT_22 "Symbol" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "הגדרות תצוגה" IDS_APPLY_FAILED "Failed to apply new settings..." diff --git a/dll/cpl/desk/lang/hu-HU.rc b/dll/cpl/desk/lang/hu-HU.rc index 35071b13903..48da5c41703 100644 --- a/dll/cpl/desk/lang/hu-HU.rc +++ b/dll/cpl/desk/lang/hu-HU.rc @@ -1,7 +1,7 @@ // Hungarian resource file by Peter Lukacs LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Háttér" FONT 8, "MS Shell Dlg" @@ -45,7 +45,7 @@ BEGIN PUSHBUTTON "P&ower...", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Megjelenés" FONT 8, "MS Shell Dlg" @@ -62,7 +62,7 @@ BEGIN PUSHBUTTON "Advanced", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Advanced Appearance" @@ -100,7 +100,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Effects" @@ -124,7 +124,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Beállítások" FONT 8, "MS Shell Dlg" @@ -146,7 +146,7 @@ BEGIN PUSHBUTTON "&Haladóknak...",IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg" @@ -181,13 +181,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "Slide effect" IDS_FADEEFFECT "Fade effect" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "Standard" IDS_CLEARTYPEEFFECT "ClearType" @@ -210,7 +210,7 @@ BEGIN IDS_TILE "Mozaikszerűen" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "16 színű" IDS_COLOR_8BIT "256 színű" @@ -220,13 +220,13 @@ BEGIN IDS_PIXEL "%lux%lu Képpont" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "Képek (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "Inactive Window" IDS_ACTWIN "Active Window" @@ -237,7 +237,7 @@ BEGIN IDS_CLASSIC_THEME "Classic Theme" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "Desktop" IDS_ELEMENT_2 "Caption of inactive windows" @@ -263,7 +263,7 @@ BEGIN IDS_ELEMENT_22 "Symbol" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "Display settings" IDS_APPLY_FAILED "Failed to apply new settings..." diff --git a/dll/cpl/desk/lang/id-ID.rc b/dll/cpl/desk/lang/id-ID.rc index d3718658059..2996d81eddb 100644 --- a/dll/cpl/desk/lang/id-ID.rc +++ b/dll/cpl/desk/lang/id-ID.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Latar Belakang" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN PUSHBUTTON "P&ower...", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Penampilan" FONT 8, "MS Shell Dlg" @@ -61,7 +61,7 @@ BEGIN PUSHBUTTON "Lanjutan", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Penampilan Lanjutan" @@ -99,7 +99,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Effects" @@ -123,7 +123,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Setelan" FONT 8, "MS Shell Dlg" @@ -145,7 +145,7 @@ BEGIN PUSHBUTTON "&Lanjutan...",IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg" @@ -180,13 +180,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "Slide effect" IDS_FADEEFFECT "Fade effect" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "Standard" IDS_CLEARTYPEEFFECT "ClearType" @@ -209,7 +209,7 @@ BEGIN IDS_TILE "Tile" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "16 Warna" IDS_COLOR_8BIT "256 Warna" @@ -219,13 +219,13 @@ BEGIN IDS_PIXEL "%lux%lu Pixel" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "Gambar (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "Jendela Inaktif" IDS_ACTWIN "Jendela Aktif" @@ -236,7 +236,7 @@ BEGIN IDS_CLASSIC_THEME "Classic Theme" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "Desktop" IDS_ELEMENT_2 "Judul jendela inaktif" @@ -262,7 +262,7 @@ BEGIN IDS_ELEMENT_22 "Simbol" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "Display settings" IDS_APPLY_FAILED "Failed to apply new settings..." diff --git a/dll/cpl/desk/lang/it-IT.rc b/dll/cpl/desk/lang/it-IT.rc index 8a9871c9f91..523a23fd6d7 100644 --- a/dll/cpl/desk/lang/it-IT.rc +++ b/dll/cpl/desk/lang/it-IT.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Sfondo" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN PUSHBUTTON "Alim&entazione...", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Aspetto" FONT 8, "MS Shell Dlg" @@ -61,7 +61,7 @@ BEGIN PUSHBUTTON "A&vanzato...", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Avanzato" @@ -99,7 +99,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Effetti" @@ -123,7 +123,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Impostazioni" FONT 8, "MS Shell Dlg" @@ -145,7 +145,7 @@ BEGIN PUSHBUTTON "A&vanzate...",IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Generale" FONT 8, "MS Shell Dlg" @@ -180,13 +180,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "Effetto Slide" IDS_FADEEFFECT "Effetto dissolvenza" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "Standard" IDS_CLEARTYPEEFFECT "ClearType" @@ -209,7 +209,7 @@ BEGIN IDS_TILE "Affiancata" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "16 Colori" IDS_COLOR_8BIT "256 Colori" @@ -219,13 +219,13 @@ BEGIN IDS_PIXEL "%lux%lu Pixel" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "Immagini (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "Finestra non attiva" IDS_ACTWIN "Finestra attiva" @@ -236,7 +236,7 @@ BEGIN IDS_CLASSIC_THEME "Tema Classico" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "Desktop" IDS_ELEMENT_2 "Titolo di una finestra non attiva" @@ -262,7 +262,7 @@ BEGIN IDS_ELEMENT_22 "Simbolo" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "Impostazioni del monitor" IDS_APPLY_FAILED "Impossibile applicare le nuove impostazioni..." diff --git a/dll/cpl/desk/lang/ja-JP.rc b/dll/cpl/desk/lang/ja-JP.rc index 023743cb064..4bbd7e90221 100644 --- a/dll/cpl/desk/lang/ja-JP.rc +++ b/dll/cpl/desk/lang/ja-JP.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "背景" FONT 9, "MS UI Gothic" @@ -44,7 +44,7 @@ BEGIN PUSHBUTTON "電源(&O)...", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "デザイン" FONT 9, "MS UI Gothic" @@ -61,7 +61,7 @@ BEGIN PUSHBUTTON "詳細設定(&V)...", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "デザインの詳細" @@ -99,7 +99,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "効果" @@ -123,7 +123,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "設定" FONT 9, "MS UI Gothic" @@ -145,7 +145,7 @@ BEGIN PUSHBUTTON "詳細設定(&V)...",IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "全般" FONT 9, "MS UI Gothic" @@ -180,13 +180,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "スライド効果" IDS_FADEEFFECT "フェード効果" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "スタンダード" IDS_CLEARTYPEEFFECT "ClearType" @@ -209,7 +209,7 @@ BEGIN IDS_TILE "並べて表示" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "16 色" IDS_COLOR_8BIT "256 色" @@ -219,13 +219,13 @@ BEGIN IDS_PIXEL "%lu x %lu ピクセル" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "画像 (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "非アクティブ ウィンドウ" IDS_ACTWIN "アクティブ ウィンドウ" @@ -236,7 +236,7 @@ BEGIN IDS_CLASSIC_THEME "Classic Theme" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "デスクトップ" IDS_ELEMENT_2 "非アクティブ ウィンドウのタイトル" @@ -262,7 +262,7 @@ BEGIN IDS_ELEMENT_22 "シンボル" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "表示設定" IDS_APPLY_FAILED "新しい設定の適用に失敗しました..." diff --git a/dll/cpl/desk/lang/nl-NL.rc b/dll/cpl/desk/lang/nl-NL.rc index 958ce93f7c6..0a8f27a293d 100644 --- a/dll/cpl/desk/lang/nl-NL.rc +++ b/dll/cpl/desk/lang/nl-NL.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Achtergrond" FONT 8, "MS Shell Dlg" @@ -46,7 +46,7 @@ BEGIN PUSHBUTTON "&Energie...", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Vormgeving" FONT 8, "MS Shell Dlg" @@ -63,7 +63,7 @@ BEGIN PUSHBUTTON "Geavan&ceerd...", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Geavanceerde vormgeving" @@ -101,7 +101,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Effecten" @@ -125,7 +125,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Instellingen" FONT 8, "MS Shell Dlg" @@ -147,7 +147,7 @@ BEGIN PUSHBUTTON "&Geavanceerd...",IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg" @@ -182,13 +182,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "Overvloeien" IDS_FADEEFFECT "Schuiven" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "Standaard" IDS_CLEARTYPEEFFECT "ClearType" @@ -211,7 +211,7 @@ BEGIN IDS_TILE "Tile" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "16 kleuren" IDS_COLOR_8BIT "256 kleuren" @@ -221,13 +221,13 @@ BEGIN IDS_PIXEL "%lux%lu Pixel" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "Pictures (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "Niet-actief venster" IDS_ACTWIN "Actief venster" @@ -238,7 +238,7 @@ BEGIN IDS_CLASSIC_THEME "Classic Theme" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "Bureaublad" IDS_ELEMENT_2 "Bijschrift niet-actieve vensters" @@ -264,7 +264,7 @@ BEGIN IDS_ELEMENT_22 "Symbool" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "Display settings" IDS_APPLY_FAILED "Failed to apply new settings..." diff --git a/dll/cpl/desk/lang/no-NO.rc b/dll/cpl/desk/lang/no-NO.rc index ab87d4ce520..b5dd8fee185 100644 --- a/dll/cpl/desk/lang/no-NO.rc +++ b/dll/cpl/desk/lang/no-NO.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Bakgrunn" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN PUSHBUTTON "S&trøm...", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Utseende" FONT 8, "MS Shell Dlg" @@ -61,7 +61,7 @@ BEGIN PUSHBUTTON "Avansert", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Avansert utseende" @@ -99,7 +99,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Effekter" @@ -123,7 +123,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Innstillinger" FONT 8, "MS Shell Dlg" @@ -145,7 +145,7 @@ BEGIN PUSHBUTTON "A&vansert...",IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Generielt" FONT 8, "MS Shell Dlg" @@ -180,13 +180,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "Slide effekter" IDS_FADEEFFECT "Fade effekter" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "Vanlig" IDS_CLEARTYPEEFFECT "Klartype" @@ -209,7 +209,7 @@ BEGIN IDS_TILE "Stukket" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "16 Farger" IDS_COLOR_8BIT "256 Farger" @@ -219,13 +219,13 @@ BEGIN IDS_PIXEL "%lux%lu piksler" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "Bilder (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "Uaktiv vindu" IDS_ACTWIN "Aktiv vindu" @@ -236,7 +236,7 @@ BEGIN IDS_CLASSIC_THEME "Classic Theme" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "Skrivebord" IDS_ELEMENT_2 "Caption of inactive windows" @@ -262,7 +262,7 @@ BEGIN IDS_ELEMENT_22 "Symbol" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "Skjerm innstillinger" IDS_APPLY_FAILED "Mislykket å endre innstillingene..." diff --git a/dll/cpl/desk/lang/pl-PL.rc b/dll/cpl/desk/lang/pl-PL.rc index 1960205e384..7cfb0f22a60 100644 --- a/dll/cpl/desk/lang/pl-PL.rc +++ b/dll/cpl/desk/lang/pl-PL.rc @@ -9,7 +9,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Pulpit" FONT 8, "MS Shell Dlg" @@ -53,7 +53,7 @@ BEGIN PUSHBUTTON "Z&asilanie...", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Wygląd" FONT 8, "MS Shell Dlg" @@ -70,7 +70,7 @@ BEGIN PUSHBUTTON "Zaawansowane", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Ustawienia zaawnsowane" @@ -108,7 +108,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Efekty" @@ -132,7 +132,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Ustawienia" FONT 8, "MS Shell Dlg" @@ -154,7 +154,7 @@ BEGIN PUSHBUTTON "Zaawa&nsowane...",IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Ogólne" FONT 8, "MS Shell Dlg" @@ -189,13 +189,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "Efekt przewijania" IDS_FADEEFFECT "Efekt przejścia" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "Standardowe" IDS_CLEARTYPEEFFECT "ClearType" @@ -218,7 +218,7 @@ BEGIN IDS_TILE "Sąsiadująco" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "16 kolorów" IDS_COLOR_8BIT "256 kolorów" @@ -228,13 +228,13 @@ BEGIN IDS_PIXEL "%lux%lu pikseli" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "Pliki tła (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "Nieaktywne okno" IDS_ACTWIN "Aktywne okno" @@ -245,7 +245,7 @@ BEGIN IDS_CLASSIC_THEME "Classic Theme" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "Pulpit" IDS_ELEMENT_2 "Nieaktywny pasek tytułu" @@ -271,7 +271,7 @@ BEGIN IDS_ELEMENT_22 "Ikona" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "Ustawienia ekranu" IDS_APPLY_FAILED "Nie udało się zastosować nowych ustawień..." diff --git a/dll/cpl/desk/lang/ro-RO.rc b/dll/cpl/desk/lang/ro-RO.rc index 9e67376ab59..2b47bc3d9cf 100644 --- a/dll/cpl/desk/lang/ro-RO.rc +++ b/dll/cpl/desk/lang/ro-RO.rc @@ -1,7 +1,7 @@ // 2011.11.07 - Fulea Ștefan: minor changes LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Fundal" FONT 8, "MS Shell Dlg" @@ -45,7 +45,7 @@ BEGIN PUSHBUTTON "&Energie…", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Aspect" FONT 8, "MS Shell Dlg" @@ -62,7 +62,7 @@ BEGIN PUSHBUTTON "A&vansate…", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Opțiuni avansate" @@ -100,7 +100,7 @@ BEGIN DEFPUSHBUTTON "Con&firmă", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Efecte vizuale" @@ -124,7 +124,7 @@ BEGIN DEFPUSHBUTTON "Con&firmă", IDOK, 77, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Configurare" FONT 8, "MS Shell Dlg" @@ -146,7 +146,7 @@ BEGIN PUSHBUTTON "A&vansate…", IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Generale" FONT 8, "MS Shell Dlg" @@ -181,13 +181,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "Efect de glisare" IDS_FADEEFFECT "Efect de estompare" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "Standard" IDS_CLEARTYPEEFFECT "ClearType" @@ -210,7 +210,7 @@ BEGIN IDS_TILE "Tapițat" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "Joasă (4 biți, 16 culori)" IDS_COLOR_8BIT "Limitată (8 biți, 256 culori)" @@ -220,13 +220,13 @@ BEGIN IDS_PIXEL "%lux%lu pixeli" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "Imagini (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "Fereastră inactivă" IDS_ACTWIN "Fereastră activă" @@ -237,7 +237,7 @@ BEGIN IDS_CLASSIC_THEME "Classic Theme" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "Fundal" IDS_ELEMENT_2 "Titlul ferestrelor inactive" @@ -263,7 +263,7 @@ BEGIN IDS_ELEMENT_22 "Simbol" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "Configurare afișare" IDS_APPLY_FAILED "Modificările aduse nu au putut fi aplicate." diff --git a/dll/cpl/desk/lang/ru-RU.rc b/dll/cpl/desk/lang/ru-RU.rc index 6ce0a9224f2..caf20135411 100644 --- a/dll/cpl/desk/lang/ru-RU.rc +++ b/dll/cpl/desk/lang/ru-RU.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Рабочий стол" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN PUSHBUTTON "П&итание...", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Оформление" FONT 8, "MS Shell Dlg" @@ -61,7 +61,7 @@ BEGIN PUSHBUTTON "Дополнительно", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Дополнительное оформление" @@ -99,7 +99,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Эффекты" @@ -123,7 +123,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Параметры" FONT 8, "MS Shell Dlg" @@ -145,7 +145,7 @@ BEGIN PUSHBUTTON "До&полнительно",IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Общие" FONT 8, "MS Shell Dlg" @@ -180,13 +180,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "Развертывание" IDS_FADEEFFECT "Затемнение" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "Обычный" IDS_CLEARTYPEEFFECT "ClearType" @@ -209,7 +209,7 @@ BEGIN IDS_TILE "замостить" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "16 цветов" IDS_COLOR_8BIT "256 цветов" @@ -219,13 +219,13 @@ BEGIN IDS_PIXEL "%lux%lu точек" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "Изображения (*.bmp;*.dib)\000*.bmp;*.dib" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "Неактивное окно" IDS_ACTWIN "Активное окно" @@ -236,7 +236,7 @@ BEGIN IDS_CLASSIC_THEME "Classic Theme" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "Рабочий стол" IDS_ELEMENT_2 "Заголовок неактивных окон" @@ -262,7 +262,7 @@ BEGIN IDS_ELEMENT_22 "Значок" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "Параметры экрана" IDS_APPLY_FAILED "Не удалось применить новые настройки..." diff --git a/dll/cpl/desk/lang/sk-SK.rc b/dll/cpl/desk/lang/sk-SK.rc index c95b1f46fa0..03f6b2b5917 100644 --- a/dll/cpl/desk/lang/sk-SK.rc +++ b/dll/cpl/desk/lang/sk-SK.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Pozadie" FONT 8, "MS Shell Dlg" @@ -52,7 +52,7 @@ BEGIN PUSHBUTTON "N&apájanie...", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Vzhľad" FONT 8, "MS Shell Dlg" @@ -69,7 +69,7 @@ BEGIN PUSHBUTTON "&Spresniť", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Spresnenie vzhľadu" @@ -107,7 +107,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Efekty" @@ -131,7 +131,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Nastavenie" FONT 8, "MS Shell Dlg" @@ -153,7 +153,7 @@ BEGIN PUSHBUTTON "&Spresniť...",IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Všeobecné" FONT 8, "MS Shell Dlg" @@ -188,13 +188,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "Posúvanie" // Slide effect IDS_FADEEFFECT "Vytrácanie" // Fade effect END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "Štandardná" IDS_CLEARTYPEEFFECT "ClearType" @@ -217,7 +217,7 @@ BEGIN IDS_TILE "Dlaždice" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "16 farieb" IDS_COLOR_8BIT "256 farieb" @@ -227,13 +227,13 @@ BEGIN IDS_PIXEL "%lux%lu pixelov" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "Obrázky (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "Neaktívne okno" IDS_ACTWIN "Aktívne okno" @@ -244,7 +244,7 @@ BEGIN IDS_CLASSIC_THEME "Classic Theme" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "Pracovná plocha" IDS_ELEMENT_2 "Záhlavie neaktívneho okna" @@ -270,7 +270,7 @@ BEGIN IDS_ELEMENT_22 "Ikona" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "Nastavenia zobrazenia" // obrazovky ? IDS_APPLY_FAILED "Nepodarilo sa aplikovať nové nastavenia..." diff --git a/dll/cpl/desk/lang/sv-SE.rc b/dll/cpl/desk/lang/sv-SE.rc index 4876c5f4a20..49def83737a 100644 --- a/dll/cpl/desk/lang/sv-SE.rc +++ b/dll/cpl/desk/lang/sv-SE.rc @@ -3,7 +3,7 @@ LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Bakgrund" FONT 8, "MS Shell Dlg" @@ -47,7 +47,7 @@ BEGIN PUSHBUTTON "P&ower...", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Utseende" FONT 8, "MS Shell Dlg" @@ -64,7 +64,7 @@ BEGIN PUSHBUTTON "Advanced", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Advanced Appearance" @@ -102,7 +102,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Effects" @@ -126,7 +126,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Inställningar" FONT 8, "MS Shell Dlg" @@ -148,7 +148,7 @@ BEGIN PUSHBUTTON "&Avancerat...",IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg" @@ -183,13 +183,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "Slide effect" IDS_FADEEFFECT "Fade effect" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "Standard" IDS_CLEARTYPEEFFECT "ClearType" @@ -212,7 +212,7 @@ BEGIN IDS_TILE "Stapla" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "16 färger" IDS_COLOR_8BIT "256 färger" @@ -222,13 +222,13 @@ BEGIN IDS_PIXEL "%lux%lu Pixlar" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "Pictures (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "Inactive Window" IDS_ACTWIN "Active Window" @@ -239,7 +239,7 @@ BEGIN IDS_CLASSIC_THEME "Classic Theme" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "Desktop" IDS_ELEMENT_2 "Caption of inactive windows" @@ -265,7 +265,7 @@ BEGIN IDS_ELEMENT_22 "Symbol" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "Display settings" IDS_APPLY_FAILED "Failed to apply new settings..." diff --git a/dll/cpl/desk/lang/tr-TR.rc b/dll/cpl/desk/lang/tr-TR.rc new file mode 100644 index 00000000000..cf44317a040 --- /dev/null +++ b/dll/cpl/desk/lang/tr-TR.rc @@ -0,0 +1,274 @@ +/* + * TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) (erdemersoy@live.com) + */ + +LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT + +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Arkagörünüm" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", IDC_BACKGROUND_PREVIEW, "Static", SS_OWNERDRAW, + 70, 10, 105, 80, 0 + CONTROL "", IDC_BACKGROUND_LIST, "SysListView32", LVS_REPORT | + LVS_SINGLESEL | LVS_NOCOLUMNHEADER | LVS_SHAREIMAGELISTS | LVS_SHOWSELALWAYS | + WS_BORDER | WS_TABSTOP, 8, 114, 174, 78 + LTEXT "Duvar kağıdı olarak kullanmak için bir resim seçiniz.", + IDC_STATIC, 8, 103, 230, 9 + PUSHBUTTON "&Göz At...", IDC_BROWSE_BUTTON, 188, 114, 55, 15 + PUSHBUTTON "&Renk...", IDC_COLOR_BUTTON, 188, 177, 55, 15 + LTEXT "Yerleşim:", IDC_STATIC, 188, 138, 55, 9 + COMBOBOX IDC_PLACEMENT_COMBO, 188, 149, 55, 54, + CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP +END + +IDD_SCREENSAVER DIALOGEX 0, 0, 246, 204 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Görüntülük Koruyucu" +FONT 8, "MS Shell Dlg", 0, 0 +BEGIN + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, + 70, 10, 105, 70, WS_EX_STATICEDGE + GROUPBOX "&Görüntülük Koruyucu", IDC_SCREENS_DUMMY, 8, 92, 230, 52 + COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "&Ayarlar", IDC_SCREENS_SETTINGS, 120, 103, 50, 13, WS_GROUP + PUSHBUTTON "&Önizleme", IDC_SCREENS_TESTSC, 175, 103, 50, 13 + LTEXT "&Bekleme", IDC_WAITTEXT, 14, 125, 20, 9 + EDITTEXT IDC_SCREENS_TIMEDELAY, 36, 123, 32, 13, ES_RIGHT | WS_GROUP + CONTROL "", IDC_SCREENS_TIME, UPDOWN_CLASS, UDS_SETBUDDYINT | + UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | + WS_BORDER | WS_GROUP, 56, 123, 12, 13 + LTEXT "Dakîka", IDC_MINTEXT, 70, 125, 26, 9 + CONTROL "&Çıkışta Şifre Sor", IDC_SCREENS_USEPASSCHK, "button", + BS_AUTOCHECKBOX | WS_TABSTOP, 108, 120, 117, 19 + GROUPBOX "Göstergecin Güç Tutumu Husûsiyetleri", IDC_SCREENS_DUMMY2, 6, 155, 232, 41 + LTEXT "Göstergecin güç ayarlarını düzenlemek için ""Güç"" düğmesine tıklayınız.", + IDC_STATIC, 14, 166, 146, 27 + PUSHBUTTON "G&üç...", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 +END + +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Görünüm" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", IDC_APPEARANCE_PREVIEW, "PreviewWndClass", + WS_VISIBLE | WS_BORDER, 7, 7, 232, 120 + LTEXT "&Basarî Biçem", IDC_STATIC, 7, 130, 104, 9 + COMBOBOX IDC_APPEARANCE_VISUAL_STYLE, 7, 140, 134, 90, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP + LTEXT "&Renk Düzeni:", IDC_STATIC, 7, 160, 104, 9 + COMBOBOX IDC_APPEARANCE_COLORSCHEME, 7, 170, 134, 90, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP + LTEXT "B&oyut:", IDC_STATIC, 7, 190, 104, 9 + COMBOBOX IDC_APPEARANCE_SIZE, 7, 200, 134, 90, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "&Efektler...", IDC_APPEARANCE_EFFECTS, 182, 150, 56, 15 + PUSHBUTTON "&Gelişmiş...", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 +END + +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE +CAPTION "Gelişmiş Görünüm" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "", IDC_APPEARANCE_PREVIEW, "PreviewWndClass", + WS_VISIBLE | WS_BORDER, 7, 7, 232, 120 + + LTEXT "&Öğe", 8, 5, 160, 50, 9 + COMBOBOX IDC_ADVAPPEARANCE_ELEMENT, 5, 170, 130, 90, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_CHILD | WS_VSCROLL | WS_TABSTOP + + LTEXT "Boyut", IDC_ADVAPPEARANCE_SIZE_T, 142, 160, 39, 9 + EDITTEXT IDC_ADVAPPEARANCE_SIZE_E, 142, 170, 38, 13, ES_RIGHT | WS_GROUP + CONTROL "", IDC_ADVAPPEARANCE_SIZE_UD, UPDOWN_CLASS, UDS_AUTOBUDDY | WS_BORDER | WS_GROUP | UDS_ALIGNRIGHT | UDS_ARROWKEYS | UDS_SETBUDDYINT | WS_CHILD | WS_VISIBLE, 172, 170, 10, 13 + + LTEXT "&1. Renk", IDC_ADVAPPEARANCE_COLOR1_T, 184, 160, 40, 9 + CHECKBOX "-", IDC_ADVAPPEARANCE_COLOR1_B, 184, 170, 28, 13, BS_PUSHLIKE | BS_BITMAP + + LTEXT "&2. Renk", IDC_ADVAPPEARANCE_COLOR2_T, 216, 160, 40, 9 + CHECKBOX "-", IDC_ADVAPPEARANCE_COLOR2_B, 216, 170, 28, 13, BS_PUSHLIKE | BS_BITMAP + + LTEXT "Yazı Türü", IDC_ADVAPPEARANCE_FONT_T, 5, 190, 50, 9 + COMBOBOX IDC_ADVAPPEARANCE_FONT_C, 5, 200, 130, 90, CBS_DROPDOWN | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP + + LTEXT "Yazı Türü Boyutu", IDC_ADVAPPEARANCE_FONTSIZE_T, 142, 190, 39, 9 + COMBOBOX IDC_ADVAPPEARANCE_FONTSIZE_E, 142, 200, 38, 200, CBS_DROPDOWN | WS_VSCROLL + + LTEXT "Renk", IDC_ADVAPPEARANCE_FONTCOLOR_T, 184, 190, 28, 9 + CHECKBOX "", IDC_ADVAPPEARANCE_FONTCOLOR_B, 184, 200, 28, 13, BS_PUSHLIKE | BS_BITMAP + + AUTOCHECKBOX "K", IDC_ADVAPPEARANCE_FONTBOLD, 216, 200, 14, 13, BS_PUSHLIKE + AUTOCHECKBOX "E", IDC_ADVAPPEARANCE_FONTITALIC, 230, 200, 14, 13, BS_PUSHLIKE + + PUSHBUTTON "İptal", IDCANCEL, 191, 220, 50, 14 + DEFPUSHBUTTON "Tamam", IDOK, 137, 220, 50, 14 +END + +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 +STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE +CAPTION "Efektler" +FONT 8, "MS Shell Dlg" +BEGIN + CONTROL "&Araç İpuçlarında ve Seçkelerde Geçiş Efekti Kullan",IDC_EFFAPPEARANCE_ANIMATION,"button", + BS_AUTOCHECKBOX | WS_TABSTOP, 10, 5, 267, 19 + COMBOBOX IDC_EFFAPPEARANCE_ANIMATIONTYPE, 20, 25, 80, 19, CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_CHILD | WS_VSCROLL | WS_TABSTOP + CONTROL "&Görüntülük Yazı Türlerinin Kenarlarını Düzgünleştirmeyi Etkinleştir",IDC_EFFAPPEARANCE_SMOOTHING,"button", + BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED, 10, 42, 267, 19 + COMBOBOX IDC_EFFAPPEARANCE_SMOOTHINGTYPE, 20, 62, 80, 19, CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_DISABLED + CONTROL "&Büyük Simgeler Kullan",IDC_EFFAPPEARANCE_LARGEICONS,"button", + BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED, 10, 80, 267, 19 + CONTROL "&Seçkeler Altında Gölge Göster",IDC_EFFAPPEARANCE_SETDROPSHADOW,"button", + BS_AUTOCHECKBOX | WS_TABSTOP | WS_DISABLED, 10, 95, 267, 19 + CONTROL "&Sürüklerken Pencere İçeriğini Göster",IDC_EFFAPPEARANCE_DRAGFULLWINDOWS,"button", + BS_AUTOCHECKBOX | WS_TABSTOP, 10, 110, 267, 19 + CONTROL "&Seçenek Düğmesine Basana Kadar Düğme Takımı ile Yönlendirme Çizgilerini Gizle",IDC_EFFAPPEARANCE_KEYBOARDCUES,"button", + BS_AUTOCHECKBOX | WS_TABSTOP, 10, 125, 267, 19 + PUSHBUTTON "İptal", IDCANCEL, 226, 165, 50, 14 + DEFPUSHBUTTON "Tamam", IDOK, 172, 165, 50, 14 +END + +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Ayarlar" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Göstergeçteki fizîkî düzenlemeyi karşılaştırmak için göstergeç simgelerini sürükleyiniz.",-1,3,3,240,20 + CONTROL "",IDC_SETTINGS_MONSEL,"MONITORSELWNDCLASS",WS_CHILD|WS_VISIBLE|WS_TABSTOP,3,23,240,82,WS_EX_CLIENTEDGE + LTEXT "Görüntü",1820,3,107,70,9 + LTEXT "",IDC_SETTINGS_DEVICE,9,116,224,9 + GROUPBOX "G&örüntülük Alanı",1818,3,127,115,43 + CONTROL "",IDC_SETTINGS_RESOLUTION,"msctls_trackbar32", + TBS_AUTOTICKS | WS_TABSTOP, 30, 137, 58, 17 + LTEXT "Daha Az",1815,9,137,25,9,NOT WS_GROUP + LTEXT "Daha Çok",1816,93,137,25,9,NOT WS_GROUP + LTEXT "",IDC_SETTINGS_RESOLUTION_TEXT,10,157,100,10,NOT WS_GROUP | SS_CENTER + GROUPBOX "&Renk",1817,125,127,115,43 + COMBOBOX IDC_SETTINGS_BPP,131,137,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | + WS_VSCROLL | WS_TABSTOP + CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW | SS_SUNKEN,131,155,103,9 + PUSHBUTTON "&Gelişmiş...",IDC_SETTINGS_ADVANCED,170,174,70,14 +END + +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Umûmî" +FONT 8, "MS Shell Dlg" +BEGIN + GROUPBOX "Görüntü", -1, 7, 6, 237, 56, WS_GROUP + LTEXT "Yazı Türü Boyutu", -1, 14, 20, 222, 9 + COMBOBOX IDC_FONTSIZE_COMBO, 14, 30, 223, 80, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "", IDC_FONTSIZE_COSTOM, 14, 46, 223, 12 + GROUPBOX "Uyumluluk", -1, 7, 67, 237, 97 + LTEXT "Birtakım çizeylemler, renk ayarlarını değiştirdikten sonra yeniden başlatılmazsa tam olarak çalışmayabilir.\r\n\nRenk ayarları değiştirildikten sonra:", -1, 12, 78, 228, 34 + AUTORADIOBUTTON "¥i renk ayarları uygulanmadan önce bilgisayar yeniden başlatılsın.", IDC_RESTART_RB, 14, 116, 228, 10 + AUTORADIOBUTTON "y&eniden başlatılmadan yeni renk ayarları uygulansın.", IDC_WITHOUTREBOOT_RB, 14, 131, 228, 10 + AUTORADIOBUTTON "ye&ni renk ayarlarının uygulanıp uygulanmayacağı kullanıcıya sorulsun.", IDC_ASKME_RB, 14, 146, 228, 10 +END + +IDR_PREVIEW_MENU MENU +BEGIN + MENUITEM "Bilindik", ID_MENU_NORMAL + MENUITEM "Etkin Değil", ID_MENU_DISABLED + MENUITEM "Seçili", ID_MENU_SELECTED +END + +IDM_MONITOR_MENU MENU +BEGIN + POPUP "" + BEGIN + MENUITEM "&İliştirilmiş", ID_MENU_ATTACHED + MENUITEM "&Birincil", ID_MENU_PRIMARY + MENUITEM SEPARATOR + MENUITEM "&Tanıla", ID_MENU_IDENTIFY + MENUITEM "&Husûsiyetler", ID_MENU_PROPERTIES + END +END + +STRINGTABLE +BEGIN + IDS_SLIDEEFFECT "Kayma Efekti" + IDS_FADEEFFECT "Solma Efekti" +END + +STRINGTABLE +BEGIN + IDS_STANDARDEFFECT "Ölçünlü" + IDS_CLEARTYPEEFFECT "ClearType" +END + +STRINGTABLE +BEGIN + IDS_MULTIPLEMONITORS "(Çoklu Göstergeç)" + IDS_UNKNOWNMONITOR "(Bilinmeyen Göstergeç)" + IDS_ADVANCEDTITLEFMT "%s ve %s" +END + +STRINGTABLE +BEGIN + IDS_CPLNAME "Görüntü" + IDS_CPLDESCRIPTION "Masaüstünün görünümünü ve görüntülük koruyucusunu husûsileştirir." + IDS_NONE "(Yok)" + IDS_CENTER "Ortala" + IDS_STRETCH "Uzat" + IDS_TILE "Döşe" +END + +STRINGTABLE +BEGIN + IDS_COLOR_4BIT "16 Renk" + IDS_COLOR_8BIT "256 Renk" + IDS_COLOR_16BIT "Yüksek Renk (16 İkillik)" + IDS_COLOR_24BIT "Gerçek Renk (24 İkillik)" + IDS_COLOR_32BIT "Gerçek Renk (32 İkillik)" + IDS_PIXEL "%lux%lu Nokta" +END + +STRINGTABLE +BEGIN + IDS_BACKGROUND_COMDLG_FILTER "Resimler (*.bmp;*.dib)\0*.bmp;*.dib\0" + IDS_SUPPORTED_EXT "*.bmp;*.dib" +END + +STRINGTABLE +BEGIN + IDS_INACTWIN "Edilgin Pencere" + IDS_ACTWIN "Etkin Pencere" + IDS_WINTEXT "Pencere Metni" + IDS_MESSBOX "İleti Kutusu" + IDS_MESSTEXT "İleti Metni" + IDS_BUTTEXT "Tamam" + IDS_CLASSIC_THEME "Kökleşik Tema" +END + +STRINGTABLE +BEGIN + IDS_ELEMENT_1 "Masaüstü" + IDS_ELEMENT_2 "Edilgin Pencere Başlığı" + IDS_ELEMENT_3 "Edilgin Pencere Kenarlığı" + IDS_ELEMENT_4 "Etkin Pencere Başlığı" + IDS_ELEMENT_5 "Etkin Pencere Kenarlığı" + IDS_ELEMENT_6 "Seçke" + IDS_ELEMENT_7 "Seçili Öğeler" + IDS_ELEMENT_8 "Pencereler" + IDS_ELEMENT_9 "Kaydırma Çubukları" + IDS_ELEMENT_10 "3D Nesneler" + IDS_ELEMENT_11 "Renklik Etiketi" + IDS_ELEMENT_12 "Simge Etiketi" + IDS_ELEMENT_13 "Başlık Çubuğu" + IDS_ELEMENT_14 "Edilgin Seçke Öğeleri" + IDS_ELEMENT_15 "İleti" + IDS_ELEMENT_16 "Kaydırma Çubukları Denetimleri" + IDS_ELEMENT_17 "Uygulama Arkagörünümü" + IDS_ELEMENT_18 "Küçük Başlık Çubuğu" + IDS_ELEMENT_19 "Simge Aralığı (Yatay)" + IDS_ELEMENT_20 "Simge Aralığı (Dikey)" + IDS_ELEMENT_21 "Araç İpucu" + IDS_ELEMENT_22 "Simge" +END + +STRINGTABLE +BEGIN + IDS_DISPLAY_SETTINGS "Görüntü Ayarları" + IDS_APPLY_FAILED "Yeni ayarlar uygulanamadı." + IDS_APPLY_NEEDS_RESTART "Değişikliklerin uygulanması için bilgisayarınızı yeniden başlatmalısınız." +END diff --git a/dll/cpl/desk/lang/uk-UA.rc b/dll/cpl/desk/lang/uk-UA.rc index 937c57cdc14..9c96108c116 100644 --- a/dll/cpl/desk/lang/uk-UA.rc +++ b/dll/cpl/desk/lang/uk-UA.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Робочий стіл" FONT 8, "MS Shell Dlg" @@ -52,7 +52,7 @@ BEGIN PUSHBUTTON "&Живлення...", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Оформлення" FONT 8, "MS Shell Dlg" @@ -69,7 +69,7 @@ BEGIN PUSHBUTTON "Додатково", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Додаткове оформлення" @@ -107,7 +107,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "Ефекти" @@ -131,7 +131,7 @@ BEGIN DEFPUSHBUTTON "OK", IDOK, 172, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Параметри" FONT 8, "MS Shell Dlg" @@ -153,7 +153,7 @@ BEGIN PUSHBUTTON "Дод&атково...",IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Загальні" FONT 8, "MS Shell Dlg" @@ -188,13 +188,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "Розгортання" IDS_FADEEFFECT "Затемнення" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "Звичайний" IDS_CLEARTYPEEFFECT "Відкритий тип" @@ -217,7 +217,7 @@ BEGIN IDS_TILE "Плиткою" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "16 кольорів" IDS_COLOR_8BIT "256 кольорів" @@ -227,13 +227,13 @@ BEGIN IDS_PIXEL "%lu на %lu крапок" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "Малюнки (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "Неактивне вікно" IDS_ACTWIN "Активне вікно" @@ -244,7 +244,7 @@ BEGIN IDS_CLASSIC_THEME "Classic Theme" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "Робочий стіл" IDS_ELEMENT_2 "Заголовок неактивних вікон" @@ -270,7 +270,7 @@ BEGIN IDS_ELEMENT_22 "Значок" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "Параметри дисплея" IDS_APPLY_FAILED "Не вдалося застосувати нові параметри..." diff --git a/dll/cpl/desk/lang/zh-CN.rc b/dll/cpl/desk/lang/zh-CN.rc index 0e049f36456..92548f78384 100644 --- a/dll/cpl/desk/lang/zh-CN.rc +++ b/dll/cpl/desk/lang/zh-CN.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -IDD_BACKGROUND DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_BACKGROUND DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "背景" FONT 9, "MS Shell Dlg" @@ -51,7 +51,7 @@ BEGIN PUSHBUTTON "电源(&O)...", IDC_SCREENS_POWER_BUTTON, 165, 171, 61, 13 END -IDD_APPEARANCE DIALOGEX DISCARDABLE 0, 0, 246, 234 +IDD_APPEARANCE DIALOGEX 0, 0, 246, 234 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "外观" FONT 9, "MS Shell Dlg" @@ -68,7 +68,7 @@ BEGIN PUSHBUTTON "高级(&D)", IDC_APPEARANCE_ADVANCED, 182, 170, 56, 15 END -IDD_ADVAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 250, 239 +IDD_ADVAPPEARANCE DIALOGEX 0, 0, 250, 239 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "高级外观" @@ -106,7 +106,7 @@ BEGIN DEFPUSHBUTTON "确定", IDOK, 137, 220, 50, 14 END -IDD_EFFAPPEARANCE DIALOGEX DISCARDABLE 0, 0, 285, 185 +IDD_EFFAPPEARANCE DIALOGEX 0, 0, 285, 185 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE CAPTION "效果" @@ -130,7 +130,7 @@ BEGIN DEFPUSHBUTTON "确定", IDOK, 172, 165, 50, 14 END -IDD_SETTINGS DIALOGEX DISCARDABLE 0, 0, 246, 204 +IDD_SETTINGS DIALOGEX 0, 0, 246, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "设置" FONT 9, "MS Shell Dlg" @@ -152,7 +152,7 @@ BEGIN PUSHBUTTON "高级(&V)...",IDC_SETTINGS_ADVANCED,170,174,70,14 END -IDD_ADVANCED_GENERAL DIALOGEX DISCARDABLE 0, 0, 253, 204 +IDD_ADVANCED_GENERAL DIALOGEX 0, 0, 253, 204 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "常规" FONT 9, "MS Shell Dlg" @@ -187,13 +187,13 @@ BEGIN END END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_SLIDEEFFECT "滑动效果" IDS_FADEEFFECT "渐变效果" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_STANDARDEFFECT "标准" IDS_CLEARTYPEEFFECT "清晰字体" @@ -216,7 +216,7 @@ BEGIN IDS_TILE "平铺" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_COLOR_4BIT "16 色" IDS_COLOR_8BIT "256 色" @@ -226,13 +226,13 @@ BEGIN IDS_PIXEL "%lux%lu 像素" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_BACKGROUND_COMDLG_FILTER "位图 (*.bmp;*.dib)\0*.bmp;*.dib\0" IDS_SUPPORTED_EXT "*.bmp;*.dib" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_INACTWIN "非活动窗口" IDS_ACTWIN "活动窗口" @@ -243,7 +243,7 @@ BEGIN IDS_CLASSIC_THEME "Classic Theme" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_ELEMENT_1 "桌面" IDS_ELEMENT_2 "非活动窗口标题栏" @@ -269,7 +269,7 @@ BEGIN IDS_ELEMENT_22 "图标" END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_DISPLAY_SETTINGS "显示设置" IDS_APPLY_FAILED "应用新设置失败..." diff --git a/dll/cpl/desk/rsrc.rc b/dll/cpl/desk/rsrc.rc index a446895e7d5..4820dc13b71 100644 --- a/dll/cpl/desk/rsrc.rc +++ b/dll/cpl/desk/rsrc.rc @@ -59,6 +59,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #ifdef LANGUAGE_SV_SE #include "lang/sv-SE.rc" #endif +#ifdef LANGUAGE_TR_TR + #include "lang/tr-TR.rc" +#endif #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" #endif diff --git a/dll/cpl/hdwwiz/hdwwiz.rc b/dll/cpl/hdwwiz/hdwwiz.rc index 33d39313713..424e1759daf 100644 --- a/dll/cpl/hdwwiz/hdwwiz.rc +++ b/dll/cpl/hdwwiz/hdwwiz.rc @@ -20,4 +20,6 @@ IDI_SEARCHICON ICON "resources/search.ico" IDB_WATERMARK BITMAP "resources/watermark.bmp" IDB_HEADER BITMAP "resources/header.bmp" +#include + #include "rsrc.rc" diff --git a/dll/cpl/hdwwiz/lang/bg-BG.rc b/dll/cpl/hdwwiz/lang/bg-BG.rc index 00bb63de935..adb2fc2d787 100644 --- a/dll/cpl/hdwwiz/lang/bg-BG.rc +++ b/dll/cpl/hdwwiz/lang/bg-BG.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -14,7 +14,7 @@ BEGIN LTEXT " , .", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -33,7 +33,7 @@ BEGIN AUTORADIOBUTTON "&, ", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -55,7 +55,7 @@ BEGIN AUTORADIOBUTTON " , & ( )", IDC_MANUALLYINST, 30, 70, 288, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -65,7 +65,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN LTEXT " .", -1, 114, 166, 180, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -109,7 +109,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -121,7 +121,7 @@ BEGIN LTEXT " .", IDC_STATUSTEXT, 114, 166, 180, 8 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/cs-CZ.rc b/dll/cpl/hdwwiz/lang/cs-CZ.rc index e53bdefb27d..4107fed31ab 100644 --- a/dll/cpl/hdwwiz/lang/cs-CZ.rc +++ b/dll/cpl/hdwwiz/lang/cs-CZ.rc @@ -5,7 +5,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Prvodce pidnm hardwaru" FONT 8, "MS Shell Dlg" @@ -19,7 +19,7 @@ BEGIN LTEXT "Pokraujte klepnutm na tlatko Dal.", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Prvodce pidnm hardwaru" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Prvodce pidnm hardwaru" FONT 8, "MS Shell Dlg" @@ -38,7 +38,7 @@ BEGIN AUTORADIOBUTTON "&Ne, jet nebyl pidn", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Prvodce pidnm hardwaru" FONT 8, "MS Shell Dlg" @@ -49,7 +49,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Prvodce pidnm hardwaru" FONT 8, "MS Shell Dlg" @@ -60,7 +60,7 @@ BEGIN AUTORADIOBUTTON "Nainstalovat hardware, kter si &run zvolm ze seznamu (pokroil)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Prvodce pidnm hardwaru" FONT 8, "MS Shell Dlg" @@ -70,7 +70,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Prvodce pidnm hardwaru" FONT 8, "MS Shell Dlg" @@ -80,7 +80,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Prvodce pidnm hardwaru" FONT 8, "MS Shell Dlg" @@ -92,7 +92,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Prvodce pidnm hardwaru" FONT 8, "MS Shell Dlg" @@ -103,7 +103,7 @@ BEGIN LTEXT "Klepnutm na Dokonit uzavete prvodce.", -1, 114, 166, 132, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Prvodce pidnm hardwaru" FONT 8, "MS Shell Dlg" @@ -114,7 +114,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Prvodce pidnm hardwaru" FONT 8, "MS Shell Dlg" @@ -126,7 +126,7 @@ BEGIN LTEXT "Klepnutm na Storno ukonte prvodce.", IDC_STATUSTEXT, 114, 166, 132, 8 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Prvodce pidnm hardwaru" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/de-DE.rc b/dll/cpl/hdwwiz/lang/de-DE.rc index 9fb5c2daac2..e00c572e2a7 100644 --- a/dll/cpl/hdwwiz/lang/de-DE.rc +++ b/dll/cpl/hdwwiz/lang/de-DE.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Hardwareassistent" FONT 8, "MS Shell Dlg" @@ -14,7 +14,7 @@ BEGIN LTEXT "Klicken Sie auf ""Weiter"", um fortzufahren.", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Hardwareassistent" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Hardwareassistent" FONT 8, "MS Shell Dlg" @@ -33,7 +33,7 @@ BEGIN AUTORADIOBUTTON "&Nein, die Hardware ist noch nicht angeschlossen", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Hardwareassistent" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Hardwareassistent" FONT 8, "MS Shell Dlg" @@ -55,7 +55,7 @@ BEGIN AUTORADIOBUTTON "&Manuell aus der Liste ausgewhlte Hardware installieren (erweitert)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Hardwareassistent" FONT 8, "MS Shell Dlg" @@ -65,7 +65,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Hardwareassistent" FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Hardwareassistent" FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Hardwareassistent" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN LTEXT "Klicken Sie ""Beenden"", um den Assistenten zu schlieen.", -1, 114, 166, 192, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Hardwareassistent" FONT 8, "MS Shell Dlg" @@ -109,7 +109,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Hardwareassistent" FONT 8, "MS Shell Dlg" @@ -121,7 +121,7 @@ BEGIN LTEXT "Klicken Sie ""Abbrechen"", um den Assistenten zu schlieen.", IDC_STATUSTEXT, 114, 166, 200, 8 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Hardwareassistent" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/el-GR.rc b/dll/cpl/hdwwiz/lang/el-GR.rc index dbe90729450..ec11b7de695 100644 --- a/dll/cpl/hdwwiz/lang/el-GR.rc +++ b/dll/cpl/hdwwiz/lang/el-GR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -14,7 +14,7 @@ BEGIN LTEXT " , ''.", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -33,7 +33,7 @@ BEGIN AUTORADIOBUTTON "&, ", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -55,7 +55,7 @@ BEGIN AUTORADIOBUTTON " & ( )", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -65,7 +65,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN LTEXT " , ''.", -1, 114, 166, 132, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -109,7 +109,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -121,7 +121,7 @@ BEGIN LTEXT " , ''.", IDC_STATUSTEXT, 114, 166, 132, 8 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/en-US.rc b/dll/cpl/hdwwiz/lang/en-US.rc index 3009a9109d6..ff58aec9961 100644 --- a/dll/cpl/hdwwiz/lang/en-US.rc +++ b/dll/cpl/hdwwiz/lang/en-US.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -14,7 +14,7 @@ BEGIN LTEXT "To continue, click Next.", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -33,7 +33,7 @@ BEGIN AUTORADIOBUTTON "&No, I have not added the hardware yet", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -55,7 +55,7 @@ BEGIN AUTORADIOBUTTON "Install the hardware that I &manually select from a list (Advanced)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -65,7 +65,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN LTEXT "To close this wizard, click Finish.", -1, 114, 166, 132, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -109,7 +109,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -121,7 +121,7 @@ BEGIN LTEXT "To exit this wizard, click Cancel.", IDC_STATUSTEXT, 114, 166, 132, 8 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/es-ES.rc b/dll/cpl/hdwwiz/lang/es-ES.rc index da9dd7090aa..db6b185d8ba 100644 --- a/dll/cpl/hdwwiz/lang/es-ES.rc +++ b/dll/cpl/hdwwiz/lang/es-ES.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Asistente para agregar Hardware" FONT 8, "MS Shell Dlg" @@ -14,7 +14,7 @@ BEGIN LTEXT "Haga clic en Siguiente para continuar.", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Asistente para agregar Hardware" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Asistente para agregar Hardware" FONT 8, "MS Shell Dlg" @@ -33,7 +33,7 @@ BEGIN AUTORADIOBUTTON "&No, todava no he agregado el hardware", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Asistente para agregar Hardware" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Asistente para agregar Hardware" FONT 8, "MS Shell Dlg" @@ -55,7 +55,7 @@ BEGIN AUTORADIOBUTTON "Instalar el hardware seleccionndolo manualmente de una lista (Avanzado)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Asistente para agregar Hardware" FONT 8, "MS Shell Dlg" @@ -65,7 +65,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Asistente para agregar Hardware" FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Asistente para agregar Hardware" FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Asistente para agregar Hardware" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN LTEXT "Para salir de este asistente, haga clic en Finalizar.", -1, 114, 166, 193, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Asistente para agregar Hardware" FONT 8, "MS Shell Dlg" @@ -109,7 +109,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Asistente para agregar Hardware" FONT 8, "MS Shell Dlg" @@ -121,7 +121,7 @@ BEGIN LTEXT "Para salir de este asistente, haga clic en Cancelar.", IDC_STATUSTEXT, 114, 166, 193, 8 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Asistente para agregar Hardware" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/fr-FR.rc b/dll/cpl/hdwwiz/lang/fr-FR.rc index c17631b1379..be17fa55961 100644 --- a/dll/cpl/hdwwiz/lang/fr-FR.rc +++ b/dll/cpl/hdwwiz/lang/fr-FR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Assistant Ajout de matriel" FONT 8, "MS Shell Dlg" @@ -14,7 +14,7 @@ BEGIN LTEXT "Pour continuer, cliquez sur Suivant.", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Assistant Ajout de matriel" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Assistant Ajout de matriel" FONT 8, "MS Shell Dlg" @@ -33,7 +33,7 @@ BEGIN AUTORADIOBUTTON "Non, je ne l'ai pas encore ajout", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Assistant Ajout de matriel" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Assistant Ajout de matriel" FONT 8, "MS Shell Dlg" @@ -55,7 +55,7 @@ BEGIN AUTORADIOBUTTON "Installer le matriel que je slectionne manuellement dans la liste (Avanc)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Assistant Ajout de matriel" FONT 8, "MS Shell Dlg" @@ -65,7 +65,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Assistant Ajout de matriel" FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Assistant Ajout de matriel" FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Assistant Ajout de matriel" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN LTEXT "Pour fermer cet assistant, cliquez sur Terminer.", -1, 114, 166, 132, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Assistant Ajout de matriel" FONT 8, "MS Shell Dlg" @@ -109,7 +109,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Assistant Ajout de matriel" FONT 8, "MS Shell Dlg" @@ -121,7 +121,7 @@ BEGIN LTEXT "Pour quitter cet assistant, cliquez sur Annuler.", IDC_STATUSTEXT, 114, 166, 132, 8 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Assistant Ajout de matriel" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/he-IL.rc b/dll/cpl/hdwwiz/lang/he-IL.rc index 8c3fa4f05f0..6f810910ee1 100644 --- a/dll/cpl/hdwwiz/lang/he-IL.rc +++ b/dll/cpl/hdwwiz/lang/he-IL.rc @@ -1,7 +1,7 @@ // Traslated by Baruch Rutman LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "אשף הוספת החומרה" FONT 8, "MS Shell Dlg" @@ -15,7 +15,7 @@ BEGIN LTEXT "To continue, click Next.", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "אשף הוספת החומרה" FONT 8, "MS Shell Dlg" @@ -24,7 +24,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "אשף הוספת החומרה" FONT 8, "MS Shell Dlg" @@ -34,7 +34,7 @@ BEGIN AUTORADIOBUTTON "&No, I have not added the hardware yet", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "אשף הוספת החומרה" FONT 8, "MS Shell Dlg" @@ -45,7 +45,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "אשף הוספת החומרה" FONT 8, "MS Shell Dlg" @@ -56,7 +56,7 @@ BEGIN AUTORADIOBUTTON "Install the hardware that I &manually select from a list (Advanced)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "אשף הוספת החומרה" FONT 8, "MS Shell Dlg" @@ -66,7 +66,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "אשף הוספת החומרה" FONT 8, "MS Shell Dlg" @@ -76,7 +76,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "אשף הוספת החומרה" FONT 8, "MS Shell Dlg" @@ -88,7 +88,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "אשף הוספת החומרה" FONT 8, "MS Shell Dlg" @@ -99,7 +99,7 @@ BEGIN LTEXT "To close this wizard, click Finish.", -1, 114, 166, 132, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "אשף הוספת החומרה" FONT 8, "MS Shell Dlg" @@ -110,7 +110,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "אשף הוספת החומרה" FONT 8, "MS Shell Dlg" @@ -122,7 +122,7 @@ BEGIN LTEXT "To exit this wizard, click Cancel.", IDC_STATUSTEXT, 114, 166, 132, 8 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "אשף הוספת החומרה" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/hu-HU.rc b/dll/cpl/hdwwiz/lang/hu-HU.rc index dda94981b1d..4a60c7e7d4b 100644 --- a/dll/cpl/hdwwiz/lang/hu-HU.rc +++ b/dll/cpl/hdwwiz/lang/hu-HU.rc @@ -1,7 +1,7 @@ // Hungarian resource file by Peter Lukacs LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -15,7 +15,7 @@ BEGIN LTEXT "To continue, click Next.", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -24,7 +24,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -34,7 +34,7 @@ BEGIN AUTORADIOBUTTON "&No, I have not added the hardware yet", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -45,7 +45,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -56,7 +56,7 @@ BEGIN AUTORADIOBUTTON "Install the hardware that I &manually select from a list (Advanced)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -66,7 +66,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -76,7 +76,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -88,7 +88,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -99,7 +99,7 @@ BEGIN LTEXT "To close this wizard, click Finish.", -1, 114, 166, 132, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -110,7 +110,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -122,7 +122,7 @@ BEGIN LTEXT "To exit this wizard, click Cancel.", IDC_STATUSTEXT, 114, 166, 132, 8 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/id-ID.rc b/dll/cpl/hdwwiz/lang/id-ID.rc index 1baaccd5e2a..5187dca2e72 100644 --- a/dll/cpl/hdwwiz/lang/id-ID.rc +++ b/dll/cpl/hdwwiz/lang/id-ID.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -14,7 +14,7 @@ BEGIN LTEXT "To continue, click Next.", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -33,7 +33,7 @@ BEGIN AUTORADIOBUTTON "&No, I have not added the hardware yet", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -55,7 +55,7 @@ BEGIN AUTORADIOBUTTON "Install the hardware that I &manually select from a list (Advanced)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -65,7 +65,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN LTEXT "To close this wizard, click Finish.", -1, 114, 166, 132, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -109,7 +109,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -121,7 +121,7 @@ BEGIN LTEXT "To exit this wizard, click Cancel.", IDC_STATUSTEXT, 114, 166, 132, 8 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/it-IT.rc b/dll/cpl/hdwwiz/lang/it-IT.rc index 085d8400f05..5a2c97381b7 100644 --- a/dll/cpl/hdwwiz/lang/it-IT.rc +++ b/dll/cpl/hdwwiz/lang/it-IT.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Nuovo hardware" FONT 8, "MS Shell Dlg" @@ -14,7 +14,7 @@ BEGIN LTEXT "Per procedere cliccare Avanti.", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Nuovo hardware" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Nuovo hardware" FONT 8, "MS Shell Dlg" @@ -33,7 +33,7 @@ BEGIN AUTORADIOBUTTON "&No, non gi collegato", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Nuovo hardware" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Nuovo hardware" FONT 8, "MS Shell Dlg" @@ -55,7 +55,7 @@ BEGIN AUTORADIOBUTTON "Scelta manuale da una lista (Esperto)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Nuovo hardware" FONT 8, "MS Shell Dlg" @@ -65,7 +65,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Nuovo hardware" FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Nuovo hardware" FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Nuovo hardware" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN LTEXT "Per chiudere cliccare Fine.", -1, 114, 166, 132, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Nuovo hardware" FONT 8, "MS Shell Dlg" @@ -109,7 +109,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Nuovo hardware" FONT 8, "MS Shell Dlg" @@ -121,7 +121,7 @@ BEGIN LTEXT "Per uscire cliccare Annulla.", IDC_STATUSTEXT, 114, 166, 132, 8 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Nuovo hardware" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/ja-JP.rc b/dll/cpl/hdwwiz/lang/ja-JP.rc index a3714a6b458..e82e7c61389 100644 --- a/dll/cpl/hdwwiz/lang/ja-JP.rc +++ b/dll/cpl/hdwwiz/lang/ja-JP.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -14,7 +14,7 @@ BEGIN LTEXT "To continue, click Next.", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -33,7 +33,7 @@ BEGIN AUTORADIOBUTTON "&No, I have not added the hardware yet", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -55,7 +55,7 @@ BEGIN AUTORADIOBUTTON "Install the hardware that I &manually select from a list (Advanced)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -65,7 +65,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN LTEXT "To close this wizard, click Finish.", -1, 114, 166, 132, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -109,7 +109,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -121,7 +121,7 @@ BEGIN LTEXT "To exit this wizard, click Cancel.", IDC_STATUSTEXT, 114, 166, 132, 8 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/nl-NL.rc b/dll/cpl/hdwwiz/lang/nl-NL.rc index 7fcca398f5b..249f30c30d3 100644 --- a/dll/cpl/hdwwiz/lang/nl-NL.rc +++ b/dll/cpl/hdwwiz/lang/nl-NL.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -14,7 +14,7 @@ BEGIN LTEXT "To continue, click Next.", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -33,7 +33,7 @@ BEGIN AUTORADIOBUTTON "&No, I have not added the hardware yet", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -55,7 +55,7 @@ BEGIN AUTORADIOBUTTON "Install the hardware that I &manually select from a list (Advanced)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -65,7 +65,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN LTEXT "To close this wizard, click Finish.", -1, 114, 166, 132, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -109,7 +109,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -121,7 +121,7 @@ BEGIN LTEXT "To exit this wizard, click Cancel.", IDC_STATUSTEXT, 114, 166, 132, 8 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/no-NO.rc b/dll/cpl/hdwwiz/lang/no-NO.rc index c5f0a4d594c..1aa69518b8e 100644 --- a/dll/cpl/hdwwiz/lang/no-NO.rc +++ b/dll/cpl/hdwwiz/lang/no-NO.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Veiviser for legge til maskinvare" FONT 8, "MS Shell Dlg" @@ -14,7 +14,7 @@ BEGIN LTEXT "Klikk Neste, for fortsette.", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Veiviser for legge til maskinvare" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Veiviser for legge til maskinvare" FONT 8, "MS Shell Dlg" @@ -33,7 +33,7 @@ BEGIN AUTORADIOBUTTON "&Nei, jeg har ikke tilkoblet maskinvaren", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Veiviser for legge til maskinvare" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Veiviser for legge til maskinvare" FONT 8, "MS Shell Dlg" @@ -55,7 +55,7 @@ BEGIN AUTORADIOBUTTON "Installer maskinvaren som jeg &manuelt velger fra listen (Avansert)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Veiviser for legge til maskinvare" FONT 8, "MS Shell Dlg" @@ -65,7 +65,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Veiviser for legge til maskinvare" FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Veiviser for legge til maskinvare" FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Veiviser for legge til maskinvare" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN LTEXT "For avslutte veiviseren, trykk p Fullfrt.", -1, 114, 166, 132, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Veiviser for legge til maskinvare" FONT 8, "MS Shell Dlg" @@ -109,7 +109,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Veiviser for legge til maskinvare" FONT 8, "MS Shell Dlg" @@ -121,7 +121,7 @@ BEGIN LTEXT "For avslutte veiviseren, trykk p Avbryt.", IDC_STATUSTEXT, 114, 166, 132, 8 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Veiviser for legge til maskinvare" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/pl-PL.rc b/dll/cpl/hdwwiz/lang/pl-PL.rc index 9c8c0a25c81..da0b939a1af 100644 --- a/dll/cpl/hdwwiz/lang/pl-PL.rc +++ b/dll/cpl/hdwwiz/lang/pl-PL.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" @@ -22,7 +22,7 @@ BEGIN LTEXT "Aby kontynuować, kliknij Dalej.", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" @@ -31,7 +31,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" @@ -41,7 +41,7 @@ BEGIN AUTORADIOBUTTON "&Nie, urządzenie nie zostało jeszcze podłączone", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" @@ -52,7 +52,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" @@ -63,7 +63,7 @@ BEGIN AUTORADIOBUTTON "&Zainstaluj urządzenie, które wybiorę ręcznie z listy (zaawansowane)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" @@ -73,7 +73,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" @@ -83,7 +83,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" @@ -95,7 +95,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" @@ -106,7 +106,7 @@ BEGIN LTEXT "Aby zamknąć kreatora, kliknij Zakończ", -1, 114, 166, 132, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" @@ -117,7 +117,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" @@ -129,7 +129,7 @@ BEGIN LTEXT "Aby zamknąć kreator, kliknij przycisk Anuluj", IDC_STATUSTEXT, 114, 166, 138, 8 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Kreator dodawania sprzętu" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/pt-BR.rc b/dll/cpl/hdwwiz/lang/pt-BR.rc index 33b3886b0c7..881f8516ad0 100644 --- a/dll/cpl/hdwwiz/lang/pt-BR.rc +++ b/dll/cpl/hdwwiz/lang/pt-BR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_NEUTRAL -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -14,7 +14,7 @@ BEGIN LTEXT "To continue, click Next.", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -33,7 +33,7 @@ BEGIN AUTORADIOBUTTON "&No, I have not added the hardware yet", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -55,7 +55,7 @@ BEGIN AUTORADIOBUTTON "Install the hardware that I &manually select from a list (Advanced)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -65,7 +65,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN LTEXT "To close this wizard, click Finish.", -1, 114, 166, 132, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -109,7 +109,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -121,7 +121,7 @@ BEGIN LTEXT "To exit this wizard, click Cancel.", IDC_STATUSTEXT, 114, 166, 132, 8 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/ro-RO.rc b/dll/cpl/hdwwiz/lang/ro-RO.rc index 2df00afb8ff..08557faacf6 100644 --- a/dll/cpl/hdwwiz/lang/ro-RO.rc +++ b/dll/cpl/hdwwiz/lang/ro-RO.rc @@ -1,7 +1,7 @@ // 2011.11.08 - Fulea Ștefan: minor changes LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Adăugare componente fizice" FONT 8, "MS Shell Dlg" @@ -15,7 +15,7 @@ BEGIN LTEXT "Pentru a continua, apăsați „Înainte”.", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Adăugare componente fizice" FONT 8, "MS Shell Dlg" @@ -24,7 +24,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Adăugare componente fizice" FONT 8, "MS Shell Dlg" @@ -34,7 +34,7 @@ BEGIN AUTORADIOBUTTON "N&u, încă nu am conectat componenta fizică.", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Adăugare componente fizice" FONT 8, "MS Shell Dlg" @@ -45,7 +45,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Adăugare componente fizice" FONT 8, "MS Shell Dlg" @@ -56,7 +56,7 @@ BEGIN AUTORADIOBUTTON "Să instaleze modulul pilot pe care îl voi specifica &manual (Avansat)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Adăugare componente fizice" FONT 8, "MS Shell Dlg" @@ -66,7 +66,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Adăugare componente fizice" FONT 8, "MS Shell Dlg" @@ -76,7 +76,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Adăugare componente fizice" FONT 8, "MS Shell Dlg" @@ -88,7 +88,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Adăugare componente fizice" FONT 8, "MS Shell Dlg" @@ -99,7 +99,7 @@ BEGIN LTEXT "Pentru a închide fereastra expertului, apăsați „Termină”.", -1, 114, 166, 132, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Adăugare componente fizice" FONT 8, "MS Shell Dlg" @@ -110,7 +110,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Adăugare componente fizice" FONT 8, "MS Shell Dlg" @@ -122,7 +122,7 @@ BEGIN LTEXT "Pentru a ieși, apăsți „Anulează”.", IDC_STATUSTEXT, 114, 166, 132, 8 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Adăugare componente fizice" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/ru-RU.rc b/dll/cpl/hdwwiz/lang/ru-RU.rc index d9dfc0ef285..5cf25424fa6 100644 --- a/dll/cpl/hdwwiz/lang/ru-RU.rc +++ b/dll/cpl/hdwwiz/lang/ru-RU.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" @@ -14,7 +14,7 @@ BEGIN LTEXT "Для продолжения нажмите кнопку ""Далее"".", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" @@ -33,7 +33,7 @@ BEGIN AUTORADIOBUTTON "Н&ет, это устройство еще не подключено", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" @@ -55,7 +55,7 @@ BEGIN AUTORADIOBUTTON "&Установка оборудования, выбранного из списка вручную", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" @@ -65,7 +65,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN LTEXT "Для закрытия мастера нажмите кнопку ""Готово"".", -1, 114, 166, 190, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" @@ -109,7 +109,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" @@ -121,7 +121,7 @@ BEGIN LTEXT "Для прекращения работы мастера нажмите кнопку ""Отмена"".", IDC_STATUSTEXT, 114, 158, 192, 19 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Мастер установки оборудования" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/sk-SK.rc b/dll/cpl/hdwwiz/lang/sk-SK.rc index eb3a5a142c8..b192101826c 100644 --- a/dll/cpl/hdwwiz/lang/sk-SK.rc +++ b/dll/cpl/hdwwiz/lang/sk-SK.rc @@ -5,7 +5,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Sprievodca pridanm hardvru" // Add Hardware Wizard FONT 8, "MS Shell Dlg" @@ -19,7 +19,7 @@ BEGIN LTEXT "Pre pokraovanie kliknite na tlaidlo alej.", -1, 114, 166, 193, 8 // Pokraujte stlaenm tlaidla alej. END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Sprievodca pridanm hardvru" FONT 8, "MS Shell Dlg" @@ -28,7 +28,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Sprievodca pridanm hardvru" FONT 8, "MS Shell Dlg" @@ -38,7 +38,7 @@ BEGIN AUTORADIOBUTTON "&Nie, zatia som nepridal hardvr", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Sprievodca pridanm hardvru" FONT 8, "MS Shell Dlg" @@ -49,7 +49,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Sprievodca pridanm hardvru" FONT 8, "MS Shell Dlg" @@ -60,7 +60,7 @@ BEGIN AUTORADIOBUTTON "Install the hardware that I &manually select from a list (Advanced)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Sprievodca pridanm hardvru" FONT 8, "MS Shell Dlg" @@ -70,7 +70,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Sprievodca pridanm hardvru" FONT 8, "MS Shell Dlg" @@ -80,7 +80,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Sprievodca pridanm hardvru" FONT 8, "MS Shell Dlg" @@ -92,7 +92,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Sprievodca pridanm hardvru" FONT 8, "MS Shell Dlg" @@ -103,7 +103,7 @@ BEGIN LTEXT "Pre zatvorenie tohto sprievodcu kliknite na tlaidlo Dokoni.", -1, 114, 166, 132, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Sprievodca pridanm hardvru" FONT 8, "MS Shell Dlg" @@ -114,7 +114,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Sprievodca pridanm hardvru" FONT 8, "MS Shell Dlg" @@ -126,7 +126,7 @@ BEGIN LTEXT "Sprievodcu ukonte kliknutm na tlaidlo Zrui.", IDC_STATUSTEXT, 114, 166, 132, 8 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Sprievodca pridanm hardvru" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/th-TH.rc b/dll/cpl/hdwwiz/lang/th-TH.rc index aae71a346bf..4365a9c66a4 100644 --- a/dll/cpl/hdwwiz/lang/th-TH.rc +++ b/dll/cpl/hdwwiz/lang/th-TH.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_THAI, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -14,7 +14,7 @@ BEGIN LTEXT "To continue, click Next.", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -23,7 +23,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -33,7 +33,7 @@ BEGIN AUTORADIOBUTTON "&No, I have not added the hardware yet", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -55,7 +55,7 @@ BEGIN AUTORADIOBUTTON "Install the hardware that I &manually select from a list (Advanced)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -65,7 +65,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -87,7 +87,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN LTEXT "To close this wizard, click Finish.", -1, 114, 166, 132, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -109,7 +109,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" @@ -121,7 +121,7 @@ BEGIN LTEXT "To exit this wizard, click Cancel.", IDC_STATUSTEXT, 114, 166, 132, 8 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Add Hardware Wizard" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/uk-UA.rc b/dll/cpl/hdwwiz/lang/uk-UA.rc index dc4648f810a..d995b07b390 100644 --- a/dll/cpl/hdwwiz/lang/uk-UA.rc +++ b/dll/cpl/hdwwiz/lang/uk-UA.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" @@ -22,7 +22,7 @@ BEGIN LTEXT "Для продовження натисніть кнопку ""Далі"".", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" @@ -31,7 +31,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" @@ -41,7 +41,7 @@ BEGIN AUTORADIOBUTTON "&Ні, цей пристрій ще не під'єднано", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" @@ -52,7 +52,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" @@ -63,7 +63,7 @@ BEGIN AUTORADIOBUTTON "Встановлення обладнання, що вибрано зі спику в&ручну", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" @@ -73,7 +73,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" @@ -83,7 +83,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" @@ -95,7 +95,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" @@ -106,7 +106,7 @@ BEGIN LTEXT "Для закриття майстра натисніть кнопку ""Завершити"".", -1, 114, 166, 132, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" @@ -117,7 +117,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" @@ -129,7 +129,7 @@ BEGIN LTEXT "Для припинення роботи майстра натисніть кнопку ""Скасувати"".", IDC_STATUSTEXT, 114, 166, 170, 16 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Майстер встановлення обладнання" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hdwwiz/lang/zh-CN.rc b/dll/cpl/hdwwiz/lang/zh-CN.rc index 61425ba125e..de525b1b128 100644 --- a/dll/cpl/hdwwiz/lang/zh-CN.rc +++ b/dll/cpl/hdwwiz/lang/zh-CN.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -IDD_STARTPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_STARTPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Ӳ" FONT 8, "MS Shell Dlg" @@ -21,7 +21,7 @@ BEGIN LTEXT "Ҫ뵥һ", -1, 114, 166, 193, 8 END -IDD_SEARCHPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SEARCHPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Ӳ" FONT 8, "MS Shell Dlg" @@ -30,7 +30,7 @@ BEGIN ICON IDI_SEARCHICON, IDC_SEARCHICON, 148, 50, 20, 20 END -IDD_ISCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_ISCONNECTEDPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Ӳ" FONT 8, "MS Shell Dlg" @@ -40,7 +40,7 @@ BEGIN AUTORADIOBUTTON "δӲ(&N)", IDC_NOTCONNECTED, 29, 35, 266, 8 END -IDD_PROBELISTPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROBELISTPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Ӳ" FONT 8, "MS Shell Dlg" @@ -51,7 +51,7 @@ BEGIN CONTROL "", IDC_PROBELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 72, 275, 66 END -IDD_SELECTWAYPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_SELECTWAYPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Ӳ" FONT 8, "MS Shell Dlg" @@ -62,7 +62,7 @@ BEGIN AUTORADIOBUTTON "װֶбѡӲ(߼)(&M)", IDC_MANUALLYINST, 30, 70, 266, 8, NOT WS_TABSTOP END -IDD_DETECTEDHWPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_DETECTEDHWPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Ӳ" FONT 8, "MS Shell Dlg" @@ -72,7 +72,7 @@ BEGIN CONTROL "", IDC_DETECTEDHWLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 65, 275, 70 END -IDD_HWTYPESPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_HWTYPESPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Ӳ" FONT 8, "MS Shell Dlg" @@ -82,7 +82,7 @@ BEGIN CONTROL "", IDC_HWTYPESLIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS | LVS_NOCOLUMNHEADER, 21, 42, 275, 92 END -IDD_PROGRESSPAGE DIALOG DISCARDABLE 0, 0, 317, 143 +IDD_PROGRESSPAGE DIALOG 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Ӳ" FONT 8, "MS Shell Dlg" @@ -94,7 +94,7 @@ BEGIN CONTROL "", IDC_PROGRESSBAR, "msctls_progress32", 0, 58, 70, 200, 8 END -IDD_FINISHPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_FINISHPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Ӳ" FONT 8, "MS Shell Dlg" @@ -105,7 +105,7 @@ BEGIN LTEXT "Ҫر򵼣뵥ɡ", -1, 114, 166, 132, 8 END -IDD_ISFOUNDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_ISFOUNDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Ӳ" FONT 8, "MS Shell Dlg" @@ -116,7 +116,7 @@ BEGIN CONTROL "", IDC_FOUNDHARDWARELIST, "SysListView32", WS_BORDER | WS_GROUP | WS_TABSTOP | LVS_REPORT | LVS_NOSORTHEADER | LVS_SINGLESEL | LVS_SHAREIMAGELISTS, 114, 56, 193, 78 END -IDD_HWSTATUSPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_HWSTATUSPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Ӳ" FONT 8, "MS Shell Dlg" @@ -128,7 +128,7 @@ BEGIN LTEXT "Ҫ˳򵼣뵥ȡ", IDC_STATUSTEXT, 114, 166, 132, 8 END -IDD_NOTCONNECTEDPAGE DIALOG DISCARDABLE 0, 0, 317, 186 +IDD_NOTCONNECTEDPAGE DIALOG 0, 0, 317, 186 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Ӳ" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/hotplug/enum.c b/dll/cpl/hotplug/enum.c index f63d8746b7b..82795dfcdb4 100644 --- a/dll/cpl/hotplug/enum.c +++ b/dll/cpl/hotplug/enum.c @@ -3,5 +3,5 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/hotplug/hotplug.c * PURPOSE: device enumeration - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ diff --git a/dll/cpl/hotplug/hotplug.c b/dll/cpl/hotplug/hotplug.c index 733e16c0de6..295a3cbad82 100644 --- a/dll/cpl/hotplug/hotplug.c +++ b/dll/cpl/hotplug/hotplug.c @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/hotplug/hotplug.c * PURPOSE: applet initialization -* PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) +* PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "hotplug.h" diff --git a/dll/cpl/hotplug/hotplug.rc b/dll/cpl/hotplug/hotplug.rc index bdbe51a06fb..320b515b43a 100644 --- a/dll/cpl/hotplug/hotplug.rc +++ b/dll/cpl/hotplug/hotplug.rc @@ -3,7 +3,7 @@ * LICENSE: GPL - See COPYING in the top level directory * FILE: dll/cpl/hotplug/hotplug.rc * PURPOSE: main resource file - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include diff --git a/dll/cpl/inetcpl/inetcpl.rc b/dll/cpl/inetcpl/inetcpl.rc index 788362abb41..16ca40ee55a 100644 --- a/dll/cpl/inetcpl/inetcpl.rc +++ b/dll/cpl/inetcpl/inetcpl.rc @@ -21,6 +21,8 @@ #include "inetcpl.h" +#include + #ifdef LANGUAGE_DE_DE #include "lang/de-DE.rc" #endif diff --git a/dll/cpl/inetcpl/lang/He.rc b/dll/cpl/inetcpl/lang/He.rc index 0f00ef5e599..9c32eb07e5f 100644 --- a/dll/cpl/inetcpl/lang/He.rc +++ b/dll/cpl/inetcpl/lang/He.rc @@ -67,7 +67,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPL_NAME "הגדרות אינטרנט" IDS_CPL_INFO "הגדר את דפדפן האינטרנט של Wine והגדרות קשורות." diff --git a/dll/cpl/inetcpl/lang/Sr.rc b/dll/cpl/inetcpl/lang/Sr.rc index 246d4fefaf7..46803a800e3 100644 --- a/dll/cpl/inetcpl/lang/Sr.rc +++ b/dll/cpl/inetcpl/lang/Sr.rc @@ -102,7 +102,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPL_NAME "Internet Settings" IDS_CPL_INFO "Configure Wine Internet Browser and related settings" diff --git a/dll/cpl/inetcpl/lang/de-DE.rc b/dll/cpl/inetcpl/lang/de-DE.rc index c7b4d14fe70..1517173723f 100644 --- a/dll/cpl/inetcpl/lang/de-DE.rc +++ b/dll/cpl/inetcpl/lang/de-DE.rc @@ -102,7 +102,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPL_NAME "Internet Settings" IDS_CPL_INFO "Configure Wine Internet Browser and related settings" diff --git a/dll/cpl/inetcpl/lang/en-US.rc b/dll/cpl/inetcpl/lang/en-US.rc index 2d1724bed9c..7c71f303966 100644 --- a/dll/cpl/inetcpl/lang/en-US.rc +++ b/dll/cpl/inetcpl/lang/en-US.rc @@ -100,7 +100,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPL_NAME "Internet Settings" IDS_CPL_INFO "Configure Wine Internet Browser and related settings" diff --git a/dll/cpl/inetcpl/lang/fr-FR.rc b/dll/cpl/inetcpl/lang/fr-FR.rc index d46eda926a1..50bcf8bdbe8 100644 --- a/dll/cpl/inetcpl/lang/fr-FR.rc +++ b/dll/cpl/inetcpl/lang/fr-FR.rc @@ -104,7 +104,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPL_NAME "Internet Settings" IDS_CPL_INFO "Configure Wine Internet Browser and related settings" diff --git a/dll/cpl/inetcpl/lang/it-IT.rc b/dll/cpl/inetcpl/lang/it-IT.rc index 76daee6db15..5101bd3ea37 100644 --- a/dll/cpl/inetcpl/lang/it-IT.rc +++ b/dll/cpl/inetcpl/lang/it-IT.rc @@ -63,7 +63,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPL_NAME "Impostazioni Internet" IDS_CPL_INFO "Configura Internet Browser e impostazioni corelate" diff --git a/dll/cpl/inetcpl/lang/ja-JP.rc b/dll/cpl/inetcpl/lang/ja-JP.rc index 67ec68a0baa..b0e54b506c2 100644 --- a/dll/cpl/inetcpl/lang/ja-JP.rc +++ b/dll/cpl/inetcpl/lang/ja-JP.rc @@ -64,7 +64,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPL_NAME "Internet Settings" IDS_CPL_INFO "Configure Wine Internet Browser and related settings" diff --git a/dll/cpl/inetcpl/lang/ko-KR.rc b/dll/cpl/inetcpl/lang/ko-KR.rc index a4a82df82ca..b393cc97b06 100644 --- a/dll/cpl/inetcpl/lang/ko-KR.rc +++ b/dll/cpl/inetcpl/lang/ko-KR.rc @@ -103,7 +103,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPL_NAME "Internet Settings" IDS_CPL_INFO "Configure Wine Internet Browser and related settings" diff --git a/dll/cpl/inetcpl/lang/lt-LT.rc b/dll/cpl/inetcpl/lang/lt-LT.rc index dc710f39407..2f4aed120bf 100644 --- a/dll/cpl/inetcpl/lang/lt-LT.rc +++ b/dll/cpl/inetcpl/lang/lt-LT.rc @@ -103,7 +103,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPL_NAME "Internet Settings" IDS_CPL_INFO "Configure Wine Internet Browser and related settings" diff --git a/dll/cpl/inetcpl/lang/nl-NL.rc b/dll/cpl/inetcpl/lang/nl-NL.rc index 20a521b730a..e79857b1d42 100644 --- a/dll/cpl/inetcpl/lang/nl-NL.rc +++ b/dll/cpl/inetcpl/lang/nl-NL.rc @@ -60,7 +60,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPL_NAME "Internet Settings" IDS_CPL_INFO "Configure Wine Internet Browser and related settings" diff --git a/dll/cpl/inetcpl/lang/pl-PL.rc b/dll/cpl/inetcpl/lang/pl-PL.rc index 4afc7a3fca2..67a2c469d8b 100644 --- a/dll/cpl/inetcpl/lang/pl-PL.rc +++ b/dll/cpl/inetcpl/lang/pl-PL.rc @@ -103,7 +103,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPL_NAME "Ustawienia Internetowe" IDS_CPL_INFO "Konfiguracja przeglądarki internetowej Wine" diff --git a/dll/cpl/inetcpl/lang/pt-BR.rc b/dll/cpl/inetcpl/lang/pt-BR.rc index 04408875e7a..d6339183e28 100644 --- a/dll/cpl/inetcpl/lang/pt-BR.rc +++ b/dll/cpl/inetcpl/lang/pt-BR.rc @@ -62,7 +62,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPL_NAME "Internet Settings" IDS_CPL_INFO "Configure Wine Internet Browser and related settings" diff --git a/dll/cpl/inetcpl/lang/ro-RO.rc b/dll/cpl/inetcpl/lang/ro-RO.rc index 2b55a5516e5..d0e1d733030 100644 --- a/dll/cpl/inetcpl/lang/ro-RO.rc +++ b/dll/cpl/inetcpl/lang/ro-RO.rc @@ -102,7 +102,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPL_NAME "Preferințe Internet" IDS_CPL_INFO "Configurarea Navigatorului de Internet Wine și preferințele aferente" diff --git a/dll/cpl/inetcpl/lang/ru-RU.rc b/dll/cpl/inetcpl/lang/ru-RU.rc index 986c848dcd4..5d892e091c7 100644 --- a/dll/cpl/inetcpl/lang/ru-RU.rc +++ b/dll/cpl/inetcpl/lang/ru-RU.rc @@ -104,7 +104,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPL_NAME "Internet Settings" IDS_CPL_INFO "Configure Wine Internet Browser and related settings" diff --git a/dll/cpl/inetcpl/lang/sv-SE.rc b/dll/cpl/inetcpl/lang/sv-SE.rc index 117006ced27..14abe5959a7 100644 --- a/dll/cpl/inetcpl/lang/sv-SE.rc +++ b/dll/cpl/inetcpl/lang/sv-SE.rc @@ -62,7 +62,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPL_NAME "Internet Settings" IDS_CPL_INFO "Configure Wine Internet Browser and related settings" diff --git a/dll/cpl/inetcpl/lang/uk-UA.rc b/dll/cpl/inetcpl/lang/uk-UA.rc index e527a49539d..2186904a7df 100644 --- a/dll/cpl/inetcpl/lang/uk-UA.rc +++ b/dll/cpl/inetcpl/lang/uk-UA.rc @@ -64,7 +64,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPL_NAME "Internet Settings" IDS_CPL_INFO "Configure Wine Internet Browser and related settings" diff --git a/dll/cpl/input/input.rc b/dll/cpl/input/input.rc index f9904a1f7ce..25b004e5393 100644 --- a/dll/cpl/input/input.rc +++ b/dll/cpl/input/input.rc @@ -14,4 +14,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDI_KEY_SHORT_ICO ICON "resources/keyboard-shortcuts.ico" +#include + #include "rsrc.rc" diff --git a/dll/cpl/intl/intl.rc b/dll/cpl/intl/intl.rc index d50d42ca4a0..ba97c220e01 100644 --- a/dll/cpl/intl/intl.rc +++ b/dll/cpl/intl/intl.rc @@ -12,4 +12,6 @@ IDC_CPLICON ICON "resources/applet.ico" +#include + #include "rsrc.rc" diff --git a/dll/cpl/intl/lang/ru-RU.rc b/dll/cpl/intl/lang/ru-RU.rc index 95a62c26182..5dea52a160d 100644 --- a/dll/cpl/intl/lang/ru-RU.rc +++ b/dll/cpl/intl/lang/ru-RU.rc @@ -21,7 +21,7 @@ BEGIN EDITTEXT IDC_TIMESAMPLE_EDIT, 89, 116, 140, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP EDITTEXT IDC_SHORTTIMESAMPLE_EDIT, 89, 131, 140, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP EDITTEXT IDC_FULLTIMESAMPLE_EDIT, 89, 146, 140, 12, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - GROUPBOX "Географического расположение", -1, 5, 171, 234, 55 + GROUPBOX "Расположение", -1, 5, 171, 234, 55 LTEXT "&Укажите ваше расположение для того, чтобы службы могли снабжать вас местной информацией, например, новостями и сводками погоды:", -1, 14, 180, 217, 24 COMBOBOX IDC_LOCATION_COMBO, 14, 207, 217, 160, CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | CBS_SORT END @@ -81,7 +81,7 @@ BEGIN COMBOBOX IDC_NUMBERSDISPLEADZER, 137, 161, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL LTEXT "Разделитель &элементов списка:", -1, 8, 181, 125, 10, WS_CHILD | WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSLSEP, 137, 177, 100, 83, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL - LTEXT "&Система едениц:", -1, 8, 197, 96, 10, WS_CHILD | WS_VISIBLE | WS_GROUP + LTEXT "&Система единиц:", -1, 8, 197, 96, 10, WS_CHILD | WS_VISIBLE | WS_GROUP COMBOBOX IDC_NUMBERSMEASSYS, 137, 193, 100, 83, CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL END @@ -129,7 +129,7 @@ BEGIN COMBOBOX IDC_TIMEPMSYMBOL, 152, 104, 84, 100, CBS_DROPDOWN | WS_CHILD | WS_VISIBLE | WS_TABSTOP GROUPBOX "", -1, 7, 140, 230, 80, WS_VISIBLE LTEXT "Обозначение формата времени\n\n\ -h = час m = минута s = секунда t = am или pm\n\n\ +h = час m = минута s = секунда t = AM или PM\n\n\ h = 12-часовой формат суток\n\ H = 24-часовой формат суток\n\ hh, mm, ss = с выводом нулей в начале\n\ @@ -155,7 +155,7 @@ BEGIN GROUPBOX "Краткий формат даты", -1, 7, 83, 230, 81 LTEXT "Образец:", -1, 13, 95, 63, 10 EDITTEXT IDC_SHRTDATESAMPLE_EDIT, 77, 93, 153, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - LTEXT "Образец - справа на лево:", -1, 13, 111, 60, 16 + LTEXT "Образец - справа налево:", -1, 13, 111, 60, 16 EDITTEXT IDC_SHRTDATERTOL_EDIT, 77, 111, 153, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP | WS_DISABLED LTEXT "Краткий формат:", -1, 13, 131, 60, 10 COMBOBOX IDC_SHRTDATEFMT_COMBO, 77, 129, 153, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE @@ -164,7 +164,7 @@ BEGIN GROUPBOX "Полный формат даты", -1, 7, 167, 230, 64 LTEXT "Образец:", -1, 13, 179, 61, 10 EDITTEXT IDC_LONGDATESAMPLE_EDIT, 77, 177, 153, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP - LTEXT "Образец - справа на лево:", -1, 13, 195, 61, 16 + LTEXT "Образец - справа налево:", -1, 13, 195, 61, 16 EDITTEXT IDC_LONGDATERTOL_EDIT, 77, 195, 153, 14, ES_READONLY | WS_CHILD | WS_VISIBLE | WS_GROUP | NOT WS_TABSTOP | WS_DISABLED LTEXT "&Полный формат:", -1, 13, 215, 60, 10 COMBOBOX IDC_LONGDATEFMT_COMBO, 77, 213, 153, 100, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP | WS_VISIBLE diff --git a/dll/cpl/joy/joy.rc b/dll/cpl/joy/joy.rc index 9713e713a83..41da87bad88 100644 --- a/dll/cpl/joy/joy.rc +++ b/dll/cpl/joy/joy.rc @@ -13,4 +13,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDI_CPLSYSTEM ICON "resources/applet.ico" +#include + #include "rsrc.rc" diff --git a/dll/cpl/liccpa/lang/bg-BG.rc b/dll/cpl/liccpa/lang/bg-BG.rc index 9aa52185dbe..1ecf90fd25b 100644 --- a/dll/cpl/liccpa/lang/bg-BG.rc +++ b/dll/cpl/liccpa/lang/bg-BG.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT -IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 +IDD_PROPPAGE1 DIALOGEX 20, 40, 315, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU CAPTION " " FONT 8, "Helv" diff --git a/dll/cpl/liccpa/lang/cs-CZ.rc b/dll/cpl/liccpa/lang/cs-CZ.rc index b3e75c38105..628ef9aa128 100644 --- a/dll/cpl/liccpa/lang/cs-CZ.rc +++ b/dll/cpl/liccpa/lang/cs-CZ.rc @@ -5,7 +5,7 @@ LANGUAGE LANG_CZECH, SUBLANG_DEFAULT -IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 +IDD_PROPPAGE1 DIALOGEX 20, 40, 315, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU CAPTION "Zvolit licenn reim" FONT 8, "Helv" diff --git a/dll/cpl/liccpa/lang/de-DE.rc b/dll/cpl/liccpa/lang/de-DE.rc index e9143430499..842fb7303d2 100644 --- a/dll/cpl/liccpa/lang/de-DE.rc +++ b/dll/cpl/liccpa/lang/de-DE.rc @@ -2,7 +2,7 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL -IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 +IDD_PROPPAGE1 DIALOGEX 20, 40, 315, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU CAPTION "Whlen Sie den Lizenzmodus aus" FONT 8, "Helv" diff --git a/dll/cpl/liccpa/lang/el-GR.rc b/dll/cpl/liccpa/lang/el-GR.rc index 70478c521d3..56f4ac37b27 100644 --- a/dll/cpl/liccpa/lang/el-GR.rc +++ b/dll/cpl/liccpa/lang/el-GR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_GREEK, SUBLANG_DEFAULT -IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 +IDD_PROPPAGE1 DIALOGEX 20, 40, 315, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU CAPTION " " FONT 8, "Helv" diff --git a/dll/cpl/liccpa/lang/en-US.rc b/dll/cpl/liccpa/lang/en-US.rc index 0bef9bb8d12..47ea4ea2a03 100644 --- a/dll/cpl/liccpa/lang/en-US.rc +++ b/dll/cpl/liccpa/lang/en-US.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 +IDD_PROPPAGE1 DIALOGEX 20, 40, 315, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU CAPTION "Choose Licensing Mode" FONT 8, "Helv" diff --git a/dll/cpl/liccpa/lang/es-ES.rc b/dll/cpl/liccpa/lang/es-ES.rc index e0df8c50683..42f251ec9b1 100644 --- a/dll/cpl/liccpa/lang/es-ES.rc +++ b/dll/cpl/liccpa/lang/es-ES.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL -IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 +IDD_PROPPAGE1 DIALOGEX 20, 40, 315, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU CAPTION "Seleccione modo de licencia" FONT 8, "Helv" diff --git a/dll/cpl/liccpa/lang/fr-FR.rc b/dll/cpl/liccpa/lang/fr-FR.rc index 98be8bc6b91..3d7184a244c 100644 --- a/dll/cpl/liccpa/lang/fr-FR.rc +++ b/dll/cpl/liccpa/lang/fr-FR.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL -IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 +IDD_PROPPAGE1 DIALOGEX 20, 40, 315, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU CAPTION "Choisissez le mode de licence" FONT 8, "Helv" diff --git a/dll/cpl/liccpa/lang/he-IL.rc b/dll/cpl/liccpa/lang/he-IL.rc index fa731428945..2b60b8d3303 100644 --- a/dll/cpl/liccpa/lang/he-IL.rc +++ b/dll/cpl/liccpa/lang/he-IL.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT -IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 +IDD_PROPPAGE1 DIALOGEX 20, 40, 315, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU CAPTION "בחר מצב רישוי" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/liccpa/lang/id-ID.rc b/dll/cpl/liccpa/lang/id-ID.rc index a0625c1b243..5e133f16c3b 100644 --- a/dll/cpl/liccpa/lang/id-ID.rc +++ b/dll/cpl/liccpa/lang/id-ID.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_INDONESIAN, SUBLANG_DEFAULT -IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 +IDD_PROPPAGE1 DIALOGEX 20, 40, 315, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU CAPTION "Pilih Mode Lisensi" FONT 8, "Helv" diff --git a/dll/cpl/liccpa/lang/it-IT.rc b/dll/cpl/liccpa/lang/it-IT.rc index cd539e3a0ef..860405fcc56 100644 --- a/dll/cpl/liccpa/lang/it-IT.rc +++ b/dll/cpl/liccpa/lang/it-IT.rc @@ -1,7 +1,7 @@ // Italian language resource file (Paolo Devoti, devotip@tiscali.it, 2007-01-10) LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL -IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 +IDD_PROPPAGE1 DIALOGEX 20, 40, 315, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU CAPTION "Scegli il tipo di licenza d'uso" FONT 8, "Helv" diff --git a/dll/cpl/liccpa/lang/ja-JP.rc b/dll/cpl/liccpa/lang/ja-JP.rc index 98422575d61..2663754c673 100644 --- a/dll/cpl/liccpa/lang/ja-JP.rc +++ b/dll/cpl/liccpa/lang/ja-JP.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT -IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 +IDD_PROPPAGE1 DIALOGEX 20, 40, 315, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU CAPTION "gp[h̑I" FONT 9, "MS UI Gothic" diff --git a/dll/cpl/liccpa/lang/no-NO.rc b/dll/cpl/liccpa/lang/no-NO.rc index 14be465ccb9..2cbd549ea0a 100644 --- a/dll/cpl/liccpa/lang/no-NO.rc +++ b/dll/cpl/liccpa/lang/no-NO.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL -IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 +IDD_PROPPAGE1 DIALOGEX 20, 40, 315, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU CAPTION "Velg lisens modus" FONT 8, "Helv" diff --git a/dll/cpl/liccpa/lang/pl-PL.rc b/dll/cpl/liccpa/lang/pl-PL.rc index e0365b67a46..b84cfbfeb92 100644 --- a/dll/cpl/liccpa/lang/pl-PL.rc +++ b/dll/cpl/liccpa/lang/pl-PL.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT -IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 +IDD_PROPPAGE1 DIALOGEX 20, 40, 315, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU CAPTION "Wybierz tryb licencjonowania" FONT 8, "Helv" diff --git a/dll/cpl/liccpa/lang/ro-RO.rc b/dll/cpl/liccpa/lang/ro-RO.rc index bfe7ecaf178..7a2486ccaa3 100644 --- a/dll/cpl/liccpa/lang/ro-RO.rc +++ b/dll/cpl/liccpa/lang/ro-RO.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL -IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 +IDD_PROPPAGE1 DIALOGEX 20, 40, 315, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU CAPTION "Alegeți modul de licențiere" FONT 8, "Helv" diff --git a/dll/cpl/liccpa/lang/ru-RU.rc b/dll/cpl/liccpa/lang/ru-RU.rc index f64e0adc2a0..9ad2794aff7 100644 --- a/dll/cpl/liccpa/lang/ru-RU.rc +++ b/dll/cpl/liccpa/lang/ru-RU.rc @@ -1,6 +1,6 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 +IDD_PROPPAGE1 DIALOGEX 20, 40, 315, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU CAPTION "Выбор вариантов лицензирования" FONT 8, "Helv" diff --git a/dll/cpl/liccpa/lang/sk-SK.rc b/dll/cpl/liccpa/lang/sk-SK.rc index cbeaebfdfc4..dad77a6cda4 100644 --- a/dll/cpl/liccpa/lang/sk-SK.rc +++ b/dll/cpl/liccpa/lang/sk-SK.rc @@ -4,7 +4,7 @@ LANGUAGE LANG_SLOVAK, SUBLANG_DEFAULT -IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 +IDD_PROPPAGE1 DIALOGEX 20, 40, 315, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU CAPTION "Chose Licensing Mode" FONT 8, "Helv" diff --git a/dll/cpl/liccpa/lang/uk-UA.rc b/dll/cpl/liccpa/lang/uk-UA.rc index b3b697479b7..243fbd54699 100644 --- a/dll/cpl/liccpa/lang/uk-UA.rc +++ b/dll/cpl/liccpa/lang/uk-UA.rc @@ -8,7 +8,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT -IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 +IDD_PROPPAGE1 DIALOGEX 20, 40, 315, 104 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU CAPTION "Вибір режиму ліцензування" FONT 8, "Helv" diff --git a/dll/cpl/liccpa/lang/zh-CN.rc b/dll/cpl/liccpa/lang/zh-CN.rc index 7cfeb6cc657..07eba7e1dc5 100644 --- a/dll/cpl/liccpa/lang/zh-CN.rc +++ b/dll/cpl/liccpa/lang/zh-CN.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -IDD_PROPPAGE1 DIALOGEX DISCARDABLE 20, 40, 315, 104 +IDD_PROPPAGE1 DIALOGEX 20, 40, 315, 104 STYLE DS_MODALFRAME | WS_OVERLAPPED | WS_CAPTION | WS_VISIBLE | WS_SYSMENU CAPTION "ѡЭģʽ" FONT 9, "MS Shell Dlg" diff --git a/dll/cpl/liccpa/liccpa.rc b/dll/cpl/liccpa/liccpa.rc index 6e51ca7098b..612f6554b54 100644 --- a/dll/cpl/liccpa/liccpa.rc +++ b/dll/cpl/liccpa/liccpa.rc @@ -12,4 +12,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDC_CPLICON_1 ICON "resources/cpl_icon1.ico" +#include + #include "rsrc.rc" diff --git a/dll/cpl/main/main.rc b/dll/cpl/main/main.rc index bddf0117bcb..154156234f0 100644 --- a/dll/cpl/main/main.rc +++ b/dll/cpl/main/main.rc @@ -29,4 +29,6 @@ IDI_REPEAT_RATE ICON "resources/repeat_rate.ico" IDI_REPEAT_DELAY ICON "resources/repeat_delay.ico" IDI_LOOK_KEY ICON "resources/look_key.ico" +#include + #include "rsrc.rc" diff --git a/dll/cpl/mmsys/mmsys.rc b/dll/cpl/mmsys/mmsys.rc index d89dcc4e9d5..1d3baa2dc7b 100644 --- a/dll/cpl/mmsys/mmsys.rc +++ b/dll/cpl/mmsys/mmsys.rc @@ -61,4 +61,6 @@ IDI_STOP_ICON ICON "resources/stop.ico" /* Bitmaps */ IDB_SPEAKIMG BITMAP "resources/speaker.bmp" +#include + #include "rsrc.rc" diff --git a/dll/cpl/powercfg/advanced.c b/dll/cpl/powercfg/advanced.c index f615966cc33..9795d454045 100644 --- a/dll/cpl/powercfg/advanced.c +++ b/dll/cpl/powercfg/advanced.c @@ -4,7 +4,7 @@ * FILE: dll/cpl/powercfg/advanced.c * PURPOSE: advanced tab of applet * PROGRAMMERS: Alexander Wurzinger (Lohnegrim at gmx dot net) - * Johannes Anderwald (johannes.anderwald@student.tugraz.at) + * Johannes Anderwald (johannes.anderwald@reactos.org) * Martin Rottensteiner * Dmitry Chapyshev (lentind@yandex.ru) */ diff --git a/dll/cpl/powercfg/alarms.c b/dll/cpl/powercfg/alarms.c index 71f3a2891e7..4029475b752 100644 --- a/dll/cpl/powercfg/alarms.c +++ b/dll/cpl/powercfg/alarms.c @@ -4,7 +4,7 @@ * FILE: dll/cpl/powercfg/alarms.c * PURPOSE: alarms tab of applet * PROGRAMMERS: Alexander Wurzinger (Lohnegrim at gmx dot net) - * Johannes Anderwald (johannes.anderwald@student.tugraz.at) + * Johannes Anderwald (johannes.anderwald@reactos.org) * Martin Rottensteiner * Dmitry Chapyshev (lentind@yandex.ru) */ diff --git a/dll/cpl/powercfg/hibernate.c b/dll/cpl/powercfg/hibernate.c index 82f54fac114..181f2cdf15d 100644 --- a/dll/cpl/powercfg/hibernate.c +++ b/dll/cpl/powercfg/hibernate.c @@ -4,7 +4,7 @@ * FILE: dll/cpl/powercfg/hibernate.c * PURPOSE: hibernate tab of applet * PROGRAMMERS: Alexander Wurzinger (Lohnegrim at gmx dot net) - * Johannes Anderwald (johannes.anderwald@student.tugraz.at) + * Johannes Anderwald (johannes.anderwald@reactos.org) * Martin Rottensteiner * Dmitry Chapyshev (lentind@yandex.ru) */ diff --git a/dll/cpl/powercfg/lang/bg-BG.rc b/dll/cpl/powercfg/lang/bg-BG.rc index 59310f781e1..15e0402982f 100644 --- a/dll/cpl/powercfg/lang/bg-BG.rc +++ b/dll/cpl/powercfg/lang/bg-BG.rc @@ -34,7 +34,7 @@ BEGIN COMBOBOX IDC_HYBERNATEDCLIST, 175,190,65,150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEALARMS DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "" FONT 8, "MS Shell Dlg" @@ -72,7 +72,7 @@ BEGIN LTEXT "",IDC_ALARMPROG2,180,190,55,10 END -IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEHIBERNATE DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/powercfg/lang/cs-CZ.rc b/dll/cpl/powercfg/lang/cs-CZ.rc index a41b2101429..3d504e3155c 100644 --- a/dll/cpl/powercfg/lang/cs-CZ.rc +++ b/dll/cpl/powercfg/lang/cs-CZ.rc @@ -32,7 +32,7 @@ BEGIN COMBOBOX IDC_HYBERNATEDCLIST, 173, 209, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEALARMS DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Varovn" FONT 8, "MS Shell Dlg" @@ -70,7 +70,7 @@ BEGIN LTEXT "Neznm",IDC_ALARMPROG2, 154, 211, 84, 10 END -IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Upesnit" FONT 8, "MS Shell Dlg" @@ -96,7 +96,7 @@ BEGIN WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEHIBERNATE DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Reim spnku" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/powercfg/lang/de-DE.rc b/dll/cpl/powercfg/lang/de-DE.rc index 044d6ca82a6..a852ab1fc13 100644 --- a/dll/cpl/powercfg/lang/de-DE.rc +++ b/dll/cpl/powercfg/lang/de-DE.rc @@ -34,7 +34,7 @@ BEGIN COMBOBOX IDC_HYBERNATEDCLIST, 175,190,65,150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEALARMS DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Alarme" FONT 8, "MS Shell Dlg" @@ -72,7 +72,7 @@ BEGIN LTEXT "Unbekannt",IDC_ALARMPROG2,155,190,40,10 END -IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Erweitert" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEHIBERNATE DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Ruhezustand" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/powercfg/lang/el-GR.rc b/dll/cpl/powercfg/lang/el-GR.rc index 93b6a5fa800..c1633c78c9e 100644 --- a/dll/cpl/powercfg/lang/el-GR.rc +++ b/dll/cpl/powercfg/lang/el-GR.rc @@ -34,7 +34,7 @@ BEGIN COMBOBOX IDC_HYBERNATEDCLIST, 173, 209, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEALARMS DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "" FONT 8, "MS Shell Dlg" @@ -72,7 +72,7 @@ BEGIN LTEXT "Unknown",IDC_ALARMPROG2, 154, 211, 84, 10 END -IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION " " FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEHIBERNATE DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/powercfg/lang/en-US.rc b/dll/cpl/powercfg/lang/en-US.rc index 3a106b64a43..da2b0c4ecd3 100644 --- a/dll/cpl/powercfg/lang/en-US.rc +++ b/dll/cpl/powercfg/lang/en-US.rc @@ -35,7 +35,7 @@ BEGIN COMBOBOX IDC_HYBERNATEDCLIST, 173, 209, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEALARMS DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Alarms" FONT 8, "MS Shell Dlg" @@ -73,7 +73,7 @@ BEGIN LTEXT "Unknown",IDC_ALARMPROG2, 154, 211, 84, 10 END -IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Advanced" FONT 8, "MS Shell Dlg" @@ -99,7 +99,7 @@ BEGIN WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEHIBERNATE DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Hibernate" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/powercfg/lang/es-ES.rc b/dll/cpl/powercfg/lang/es-ES.rc index b24697b77dd..edce0ed5a04 100644 --- a/dll/cpl/powercfg/lang/es-ES.rc +++ b/dll/cpl/powercfg/lang/es-ES.rc @@ -37,7 +37,7 @@ BEGIN COMBOBOX IDC_HYBERNATEDCLIST, 173, 209, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 262, 237 +IDD_PROPPAGEALARMS DIALOGEX 0, 0, 262, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Alarmas" FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN LTEXT "Desconocido",IDC_ALARMPROG2, 154, 211, 84, 10 END -IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 262, 237 +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 262, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Opciones avanzadas" FONT 8, "MS Shell Dlg" @@ -101,7 +101,7 @@ BEGIN WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 262, 237 +IDD_PROPPAGEHIBERNATE DIALOGEX 0, 0, 262, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Hibernacin" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/powercfg/lang/fr-FR.rc b/dll/cpl/powercfg/lang/fr-FR.rc index 2055b926e20..a928acb68c6 100644 --- a/dll/cpl/powercfg/lang/fr-FR.rc +++ b/dll/cpl/powercfg/lang/fr-FR.rc @@ -34,7 +34,7 @@ BEGIN COMBOBOX IDC_HYBERNATEDCLIST, 175,190,65,150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEALARMS DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Alarmes" FONT 8, "MS Shell Dlg" @@ -72,7 +72,7 @@ BEGIN LTEXT "Inconnu",IDC_ALARMPROG2,150,190,40,10 END -IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Avanc" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEHIBERNATE DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Mise en veille" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/powercfg/lang/he-IL.rc b/dll/cpl/powercfg/lang/he-IL.rc index b5c17b731a8..739800f637a 100644 --- a/dll/cpl/powercfg/lang/he-IL.rc +++ b/dll/cpl/powercfg/lang/he-IL.rc @@ -34,7 +34,7 @@ BEGIN COMBOBOX IDC_HYBERNATEDCLIST, 173, 209, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEALARMS DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "התראות" FONT 8, "MS Shell Dlg" @@ -72,7 +72,7 @@ BEGIN LTEXT "Unknown",IDC_ALARMPROG2, 154, 211, 84, 10 END -IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "מתקדם" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEHIBERNATE DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "תרדמת" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/powercfg/lang/id-ID.rc b/dll/cpl/powercfg/lang/id-ID.rc index 4a368e11ff8..5ba5750bac8 100644 --- a/dll/cpl/powercfg/lang/id-ID.rc +++ b/dll/cpl/powercfg/lang/id-ID.rc @@ -34,7 +34,7 @@ BEGIN COMBOBOX IDC_HYBERNATEDCLIST, 175,190,65,150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEALARMS DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Alarm" FONT 8, "MS Shell Dlg" @@ -72,7 +72,7 @@ BEGIN LTEXT "Tidak dikenal",IDC_ALARMPROG2,150,190,40,10 END -IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Lanjutan" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEHIBERNATE DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Hibernasi" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/powercfg/lang/it-IT.rc b/dll/cpl/powercfg/lang/it-IT.rc index ff4c0b537a5..13d9b59e836 100644 --- a/dll/cpl/powercfg/lang/it-IT.rc +++ b/dll/cpl/powercfg/lang/it-IT.rc @@ -41,7 +41,7 @@ BEGIN WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEALARMS DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Allarmi" FONT 8, "MS Shell Dlg" @@ -79,7 +79,7 @@ BEGIN LTEXT "Unknown",IDC_ALARMPROG2,150,190,40,10 END -IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Avanzate" FONT 8, "MS Shell Dlg" @@ -112,7 +112,7 @@ BEGIN CBS_SORT | WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEHIBERNATE DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Sospensione" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/powercfg/lang/ja-JP.rc b/dll/cpl/powercfg/lang/ja-JP.rc index d98e534794f..4bcba82ca00 100644 --- a/dll/cpl/powercfg/lang/ja-JP.rc +++ b/dll/cpl/powercfg/lang/ja-JP.rc @@ -34,7 +34,7 @@ BEGIN COMBOBOX IDC_HYBERNATEDCLIST, 173, 209, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEALARMS DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "A[" FONT 9, "MS UI Gothic" @@ -72,7 +72,7 @@ BEGIN LTEXT "s",IDC_ALARMPROG2, 154, 211, 84, 10 END -IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "ڍאݒ" FONT 9, "MS UI Gothic" @@ -98,7 +98,7 @@ BEGIN WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEHIBERNATE DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "x~" FONT 9, "MS UI Gothic" diff --git a/dll/cpl/powercfg/lang/nl-NL.rc b/dll/cpl/powercfg/lang/nl-NL.rc index 95e15a191b8..46550767863 100644 --- a/dll/cpl/powercfg/lang/nl-NL.rc +++ b/dll/cpl/powercfg/lang/nl-NL.rc @@ -34,7 +34,7 @@ BEGIN COMBOBOX IDC_HYBERNATEDCLIST, 175,190,65,150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEALARMS DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Waarschuwingen" FONT 8, "MS Shell Dlg" @@ -72,7 +72,7 @@ BEGIN LTEXT "Onbekend",IDC_ALARMPROG2,150,190,40,10 END -IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Geavanceerd" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEHIBERNATE DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Slaapstand" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/powercfg/lang/no-NO.rc b/dll/cpl/powercfg/lang/no-NO.rc index 5a65cd0e27f..c5ee046e841 100644 --- a/dll/cpl/powercfg/lang/no-NO.rc +++ b/dll/cpl/powercfg/lang/no-NO.rc @@ -34,7 +34,7 @@ BEGIN COMBOBOX IDC_HYBERNATEDCLIST, 173, 209, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEALARMS DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Alarmer" FONT 8, "MS Shell Dlg" @@ -72,7 +72,7 @@ BEGIN LTEXT "Ukjent",IDC_ALARMPROG2, 154, 211, 84, 10 END -IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Avansert" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEHIBERNATE DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Dvalemodus" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/powercfg/lang/pl-PL.rc b/dll/cpl/powercfg/lang/pl-PL.rc index 9a91c6fa66a..78fe44195f6 100644 --- a/dll/cpl/powercfg/lang/pl-PL.rc +++ b/dll/cpl/powercfg/lang/pl-PL.rc @@ -40,7 +40,7 @@ BEGIN COMBOBOX IDC_HYBERNATEDCLIST, 175,190,65,150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEALARMS DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Ostrzeżenia" FONT 8, "MS Shell Dlg" @@ -78,7 +78,7 @@ BEGIN LTEXT "Nieznany",IDC_ALARMPROG2,150,190,40,10 END -IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Zaawansowane" FONT 8, "MS Shell Dlg" @@ -104,7 +104,7 @@ BEGIN WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEHIBERNATE DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Hibernacja" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/powercfg/lang/ro-RO.rc b/dll/cpl/powercfg/lang/ro-RO.rc index fae63e15bd7..14b0ea2b047 100644 --- a/dll/cpl/powercfg/lang/ro-RO.rc +++ b/dll/cpl/powercfg/lang/ro-RO.rc @@ -34,7 +34,7 @@ BEGIN COMBOBOX IDC_HYBERNATEDCLIST, 173, 209, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEALARMS DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Alarme" FONT 8, "MS Shell Dlg" @@ -72,7 +72,7 @@ BEGIN LTEXT "Unknown", IDC_ALARMPROG2, 154, 211, 84, 10 END -IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Avansate" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEHIBERNATE DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Hibernare" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/powercfg/lang/ru-RU.rc b/dll/cpl/powercfg/lang/ru-RU.rc index 47d07e02ad3..eeae0a81fdc 100644 --- a/dll/cpl/powercfg/lang/ru-RU.rc +++ b/dll/cpl/powercfg/lang/ru-RU.rc @@ -34,7 +34,7 @@ BEGIN COMBOBOX IDC_HYBERNATEDCLIST, 175,190,65,150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEALARMS DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Уведомления" FONT 8, "MS Shell Dlg" @@ -72,7 +72,7 @@ BEGIN LTEXT "Нет данных",IDC_ALARMPROG2,150,190,40,10 END -IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Дополнительно" FONT 8, "MS Shell Dlg" @@ -98,7 +98,7 @@ BEGIN WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEHIBERNATE DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Спящий режим" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/powercfg/lang/sk-SK.rc b/dll/cpl/powercfg/lang/sk-SK.rc index 67b7480ab77..b8419a51b64 100644 --- a/dll/cpl/powercfg/lang/sk-SK.rc +++ b/dll/cpl/powercfg/lang/sk-SK.rc @@ -40,7 +40,7 @@ BEGIN COMBOBOX IDC_HYBERNATEDCLIST, 173, 209, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEALARMS DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Signalizcie" FONT 8, "MS Shell Dlg" @@ -78,7 +78,7 @@ BEGIN LTEXT "Neznmy",IDC_ALARMPROG2, 154, 211, 84, 10 END -IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Spresnenie" FONT 8, "MS Shell Dlg" @@ -104,7 +104,7 @@ BEGIN WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEHIBERNATE DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Dlhodob spnok" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/powercfg/lang/th-TH.rc b/dll/cpl/powercfg/lang/th-TH.rc index fcfaa1694b7..484520cea6d 100644 --- a/dll/cpl/powercfg/lang/th-TH.rc +++ b/dll/cpl/powercfg/lang/th-TH.rc @@ -32,7 +32,7 @@ BEGIN COMBOBOX IDC_HYBERNATEDCLIST, 175,190,65,150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEALARMS DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Alarms" FONT 8, "MS Shell Dlg" @@ -70,7 +70,7 @@ BEGIN LTEXT "Unknown",IDC_ALARMPROG2,150,190,40,10 END -IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Advanced" FONT 8, "MS Shell Dlg" @@ -96,7 +96,7 @@ BEGIN WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEHIBERNATE DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Hibernate" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/powercfg/lang/uk-UA.rc b/dll/cpl/powercfg/lang/uk-UA.rc index 9563a641eda..b6d92d6c0b6 100644 --- a/dll/cpl/powercfg/lang/uk-UA.rc +++ b/dll/cpl/powercfg/lang/uk-UA.rc @@ -40,7 +40,7 @@ BEGIN COMBOBOX IDC_HYBERNATEDCLIST, 173, 209, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEALARMS DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Сигналізація" FONT 8, "MS Shell Dlg" @@ -78,7 +78,7 @@ BEGIN LTEXT "Немає даних",IDC_ALARMPROG2,150,190,40,10 END -IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Додатково" FONT 8, "MS Shell Dlg" @@ -104,7 +104,7 @@ BEGIN WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 250, 220 +IDD_PROPPAGEHIBERNATE DIALOGEX 0, 0, 250, 220 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Сплячий режим" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/powercfg/lang/zh-CN.rc b/dll/cpl/powercfg/lang/zh-CN.rc index dc1d75995b1..23c67526c31 100644 --- a/dll/cpl/powercfg/lang/zh-CN.rc +++ b/dll/cpl/powercfg/lang/zh-CN.rc @@ -37,7 +37,7 @@ BEGIN COMBOBOX IDC_HYBERNATEDCLIST, 173, 209, 65, 150, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEALARMS DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEALARMS DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "" FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN LTEXT "δ֪",IDC_ALARMPROG2, 154, 211, 84, 10 END -IDD_PROPPAGEADVANCED DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEADVANCED DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "߼" FONT 8, "MS Shell Dlg" @@ -101,7 +101,7 @@ BEGIN WS_VSCROLL | WS_TABSTOP END -IDD_PROPPAGEHIBERNATE DIALOGEX DISCARDABLE 0, 0, 252, 237 +IDD_PROPPAGEHIBERNATE DIALOGEX 0, 0, 252, 237 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "" FONT 8, "MS Shell Dlg" diff --git a/dll/cpl/powercfg/powercfg.c b/dll/cpl/powercfg/powercfg.c index 9e5b441e3ac..047dd336aaa 100644 --- a/dll/cpl/powercfg/powercfg.c +++ b/dll/cpl/powercfg/powercfg.c @@ -4,7 +4,7 @@ * FILE: dll/cpl/powercfg/powershemes.c * PURPOSE: initialization of applet * PROGRAMMERS: Alexander Wurzinger (Lohnegrim at gmx dot net) - * Johannes Anderwald (johannes.anderwald@student.tugraz.at) + * Johannes Anderwald (johannes.anderwald@reactos.org) * Martin Rottensteiner * Dmitry Chapyshev (lentind@yandex.ru) */ diff --git a/dll/cpl/powercfg/powercfg.rc b/dll/cpl/powercfg/powercfg.rc index 4fd42479a80..4179aa7ba07 100644 --- a/dll/cpl/powercfg/powercfg.rc +++ b/dll/cpl/powercfg/powercfg.rc @@ -18,4 +18,6 @@ IDI_DC ICON "resources/dc.ico" IDI_SCREEN ICON "resources/screen.ico" IDI_HIBERNATE ICON "resources/hibernate.ico" +#include + #include "rsrc.rc" diff --git a/dll/cpl/powercfg/powershemes.c b/dll/cpl/powercfg/powershemes.c index 7a6b3fd50c3..f6ec02e360c 100644 --- a/dll/cpl/powercfg/powershemes.c +++ b/dll/cpl/powercfg/powershemes.c @@ -4,7 +4,7 @@ * FILE: dll/cpl/powercfg/powershemes.c * PURPOSE: powerschemes tab of applet * PROGRAMMERS: Alexander Wurzinger (Lohnegrim at gmx dot net) - * Johannes Anderwald (johannes.anderwald@student.tugraz.at) + * Johannes Anderwald (johannes.anderwald@reactos.org) * Martin Rottensteiner * Dmitry Chapyshev (lentind@yandex.ru) */ @@ -471,7 +471,7 @@ DelScheme(HWND hwnd) LoadString(hApplet, IDS_DEL_SCHEME_TITLE, szBufT, sizeof(szBufT) / sizeof(TCHAR)); LoadString(hApplet, IDS_DEL_SCHEME, szBuf, sizeof(szBuf) / sizeof(TCHAR)); - if (MessageBox(hwnd, (LPCTSTR)szBuf, (LPCTSTR)szBufT, MB_OKCANCEL | MB_ICONQUESTION) == IDOK) + if (MessageBox(hwnd, szBuf, szBufT, MB_YESNO | MB_ICONQUESTION) == IDYES) { UINT Current; diff --git a/dll/cpl/sysdm/lang/bg-BG.rc b/dll/cpl/sysdm/lang/bg-BG.rc index a41cb5d5c5d..34d3db1eabf 100644 --- a/dll/cpl/sysdm/lang/bg-BG.rc +++ b/dll/cpl/sysdm/lang/bg-BG.rc @@ -285,7 +285,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "Уредба" IDS_CPLSYSTEMDESCRIPTION "Можете да видите сведения за компютъра ви и за различни настройки" diff --git a/dll/cpl/sysdm/lang/cs-CZ.rc b/dll/cpl/sysdm/lang/cs-CZ.rc index e97509909cc..d80c5f3027a 100644 --- a/dll/cpl/sysdm/lang/cs-CZ.rc +++ b/dll/cpl/sysdm/lang/cs-CZ.rc @@ -286,7 +286,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "Systém" IDS_CPLSYSTEMDESCRIPTION "Zde lze zobrazit informace o tomto počítači a změnit různá systémová a hardwarová nastavení." diff --git a/dll/cpl/sysdm/lang/da-DK.rc b/dll/cpl/sysdm/lang/da-DK.rc index 48138e5ebb3..310a6d15ce6 100644 --- a/dll/cpl/sysdm/lang/da-DK.rc +++ b/dll/cpl/sysdm/lang/da-DK.rc @@ -281,7 +281,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "System Indstillinger" IDS_CPLSYSTEMDESCRIPTION "Se mere information omkring din computer, og skift diverse system og hardware indstillinger." diff --git a/dll/cpl/sysdm/lang/de-DE.rc b/dll/cpl/sysdm/lang/de-DE.rc index 6b2956ca165..519d53bde97 100644 --- a/dll/cpl/sysdm/lang/de-DE.rc +++ b/dll/cpl/sysdm/lang/de-DE.rc @@ -288,7 +288,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "System" IDS_CPLSYSTEMDESCRIPTION "Zeigt Informationen über Ihren Computer an und ändert verschiedene Computer- und Hardware-Einstellungen" diff --git a/dll/cpl/sysdm/lang/el-GR.rc b/dll/cpl/sysdm/lang/el-GR.rc index 56043a44316..b43a5691874 100644 --- a/dll/cpl/sysdm/lang/el-GR.rc +++ b/dll/cpl/sysdm/lang/el-GR.rc @@ -280,7 +280,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "Σύστημα" IDS_CPLSYSTEMDESCRIPTION "Δείτε πληροφορίες για το σύστημα του υπολογιστή σας και αλλάξτε ρυθμίσεις υλικού, επιδόσεων και αυτόματης ενημέρωσης." diff --git a/dll/cpl/sysdm/lang/en-US.rc b/dll/cpl/sysdm/lang/en-US.rc index cad8e0e6718..112320693bb 100644 --- a/dll/cpl/sysdm/lang/en-US.rc +++ b/dll/cpl/sysdm/lang/en-US.rc @@ -281,7 +281,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "System" IDS_CPLSYSTEMDESCRIPTION "See information about your computer and change various system and hardware settings." diff --git a/dll/cpl/sysdm/lang/es-ES.rc b/dll/cpl/sysdm/lang/es-ES.rc index eeb974db0c8..e55e76539a8 100644 --- a/dll/cpl/sysdm/lang/es-ES.rc +++ b/dll/cpl/sysdm/lang/es-ES.rc @@ -286,7 +286,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "Sistema" IDS_CPLSYSTEMDESCRIPTION "Muestra información sobre el sistema de su equipo y cambia la configuración del hardware, rendimiento y actualizaciones automáticas." diff --git a/dll/cpl/sysdm/lang/fr-FR.rc b/dll/cpl/sysdm/lang/fr-FR.rc index 189b07c54c0..e5f1642949e 100644 --- a/dll/cpl/sysdm/lang/fr-FR.rc +++ b/dll/cpl/sysdm/lang/fr-FR.rc @@ -283,7 +283,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "Système" IDS_CPLSYSTEMDESCRIPTION "Affiche des informations à propos de l'ordinateur et change des réglages systèmes et matériels." diff --git a/dll/cpl/sysdm/lang/he-IL.rc b/dll/cpl/sysdm/lang/he-IL.rc index 0aaa259fd87..6c0677986bf 100644 --- a/dll/cpl/sysdm/lang/he-IL.rc +++ b/dll/cpl/sysdm/lang/he-IL.rc @@ -282,7 +282,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "מערכת" IDS_CPLSYSTEMDESCRIPTION "See information about your computer and change various system and hardware settings." diff --git a/dll/cpl/sysdm/lang/hu-HU.rc b/dll/cpl/sysdm/lang/hu-HU.rc index 51fac049729..91ac30d1835 100644 --- a/dll/cpl/sysdm/lang/hu-HU.rc +++ b/dll/cpl/sysdm/lang/hu-HU.rc @@ -282,7 +282,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "Rendszer" IDS_CPLSYSTEMDESCRIPTION "A számítógéppel kapcsolatos információk megjelenítése, különböző rendszer és hardver beállítások módosítása." diff --git a/dll/cpl/sysdm/lang/id-ID.rc b/dll/cpl/sysdm/lang/id-ID.rc index 305644334c5..b1224c54692 100644 --- a/dll/cpl/sysdm/lang/id-ID.rc +++ b/dll/cpl/sysdm/lang/id-ID.rc @@ -281,7 +281,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "Sistem" IDS_CPLSYSTEMDESCRIPTION "Lihat informasi tentang komputer anda dan ubah berbagai setelan sistem dan hardware." diff --git a/dll/cpl/sysdm/lang/it-IT.rc b/dll/cpl/sysdm/lang/it-IT.rc index 91b301f7832..0d873db7aa0 100644 --- a/dll/cpl/sysdm/lang/it-IT.rc +++ b/dll/cpl/sysdm/lang/it-IT.rc @@ -281,7 +281,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "Sistema" IDS_CPLSYSTEMDESCRIPTION "Visualizza informazioni sul vostro computer e modifica varie impostazioni di sistema." diff --git a/dll/cpl/sysdm/lang/ja-JP.rc b/dll/cpl/sysdm/lang/ja-JP.rc index 1ea54056856..6cbc5dadb05 100644 --- a/dll/cpl/sysdm/lang/ja-JP.rc +++ b/dll/cpl/sysdm/lang/ja-JP.rc @@ -281,7 +281,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "システム" IDS_CPLSYSTEMDESCRIPTION "コンピュータのさまざまなシステムおよびハードウェアの設定を変更するには情報をご覧ください。" diff --git a/dll/cpl/sysdm/lang/nl-NL.rc b/dll/cpl/sysdm/lang/nl-NL.rc index 52c0d3b3f78..c39e706b92a 100644 --- a/dll/cpl/sysdm/lang/nl-NL.rc +++ b/dll/cpl/sysdm/lang/nl-NL.rc @@ -282,7 +282,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "Systeem" IDS_CPLSYSTEMDESCRIPTION "Systeeminformatie weergeven en omgevingsinstellingen wijzigen." diff --git a/dll/cpl/sysdm/lang/no-NO.rc b/dll/cpl/sysdm/lang/no-NO.rc index f634faede9d..0fca7cae537 100644 --- a/dll/cpl/sysdm/lang/no-NO.rc +++ b/dll/cpl/sysdm/lang/no-NO.rc @@ -281,7 +281,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "System" IDS_CPLSYSTEMDESCRIPTION "Se informasjon om din datamaskin og endre forskjellig system og maskinvare innstilling." diff --git a/dll/cpl/sysdm/lang/pl-PL.rc b/dll/cpl/sysdm/lang/pl-PL.rc index 4dd6f1d1036..56899bd0ff2 100644 --- a/dll/cpl/sysdm/lang/pl-PL.rc +++ b/dll/cpl/sysdm/lang/pl-PL.rc @@ -290,7 +290,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "System" IDS_CPLSYSTEMDESCRIPTION "Wyświetl informacje o swoim systemie komputerowym, zmień ustawienia dotyczące sprzętu i wydajności" diff --git a/dll/cpl/sysdm/lang/ro-RO.rc b/dll/cpl/sysdm/lang/ro-RO.rc index dad136a9349..a8f698336d7 100644 --- a/dll/cpl/sysdm/lang/ro-RO.rc +++ b/dll/cpl/sysdm/lang/ro-RO.rc @@ -282,7 +282,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "Sistem" IDS_CPLSYSTEMDESCRIPTION "Afișarea informațiilor de sistem și schimbarea configurației fizice sau de sistem." diff --git a/dll/cpl/sysdm/lang/ru-RU.rc b/dll/cpl/sysdm/lang/ru-RU.rc index 3efd051a0d7..5fe6dac2c64 100644 --- a/dll/cpl/sysdm/lang/ru-RU.rc +++ b/dll/cpl/sysdm/lang/ru-RU.rc @@ -281,7 +281,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "Система" IDS_CPLSYSTEMDESCRIPTION "Просмотр информации о вашем компьютере и изменение различных системных и аппаратных параметров." diff --git a/dll/cpl/sysdm/lang/sk-SK.rc b/dll/cpl/sysdm/lang/sk-SK.rc index b4a46f1d157..d7d6d246e54 100644 --- a/dll/cpl/sysdm/lang/sk-SK.rc +++ b/dll/cpl/sysdm/lang/sk-SK.rc @@ -289,7 +289,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "Systém" IDS_CPLSYSTEMDESCRIPTION "Zobrazí informácie o počítači, zmenách rôznych systémových a hardvérových nastavení." diff --git a/dll/cpl/sysdm/lang/sv-SE.rc b/dll/cpl/sysdm/lang/sv-SE.rc index adffc0984fa..0b4569294d4 100644 --- a/dll/cpl/sysdm/lang/sv-SE.rc +++ b/dll/cpl/sysdm/lang/sv-SE.rc @@ -284,7 +284,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "System" IDS_CPLSYSTEMDESCRIPTION "Se information om din dator och ändra olika system- och hårdvaruinställningar." diff --git a/dll/cpl/sysdm/lang/uk-UA.rc b/dll/cpl/sysdm/lang/uk-UA.rc index 418ce3b6d7e..2298d2dd18f 100644 --- a/dll/cpl/sysdm/lang/uk-UA.rc +++ b/dll/cpl/sysdm/lang/uk-UA.rc @@ -289,7 +289,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "Система" IDS_CPLSYSTEMDESCRIPTION "Перегляд відомостей про систему комп'ютера та зміна параметрів обладнання, швидкодії, автоматичних оновлень." diff --git a/dll/cpl/sysdm/lang/zh-CN.rc b/dll/cpl/sysdm/lang/zh-CN.rc index 37c21e77bed..53372c21904 100644 --- a/dll/cpl/sysdm/lang/zh-CN.rc +++ b/dll/cpl/sysdm/lang/zh-CN.rc @@ -286,7 +286,7 @@ BEGIN END -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "系统" IDS_CPLSYSTEMDESCRIPTION "查看您的计算机系统的信息并更改各种系统及硬件设置" diff --git a/dll/cpl/sysdm/startrec.c b/dll/cpl/sysdm/startrec.c index 937c0a94c66..309e01de3d0 100644 --- a/dll/cpl/sysdm/startrec.c +++ b/dll/cpl/sysdm/startrec.c @@ -5,7 +5,7 @@ * PURPOSE: Computer settings for startup and recovery * COPYRIGHT: Copyright 2006 Ged Murphy * Copyright 2006 Christoph von Wittich - * Copyright 2007 Johannes Anderwald + * Copyright 2007 Johannes Anderwald */ #include "precomp.h" diff --git a/dll/cpl/sysdm/sysdm.rc b/dll/cpl/sysdm/sysdm.rc index 07fe9debfdc..0bc80e65f51 100644 --- a/dll/cpl/sysdm/sysdm.rc +++ b/dll/cpl/sysdm/sysdm.rc @@ -22,4 +22,6 @@ IDB_ROSBMP BITMAP "resources/rosbitmap.bmp" RC_LICENSE RTDATA "resources/gpl.txt" +#include + #include "rsrc.rc" diff --git a/dll/cpl/timedate/lang/tr-TR.rc b/dll/cpl/timedate/lang/tr-TR.rc new file mode 100644 index 00000000000..bd11760e5d7 --- /dev/null +++ b/dll/cpl/timedate/lang/tr-TR.rc @@ -0,0 +1,72 @@ +/* + * TRANSLATOR: 2013 - Erdem Ersoy (eersoy93) (erdemersoy@live.com) + */ + +LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT + +IDD_DATETIMEPAGE DIALOGEX 0, 0, 252, 146 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Zaman" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + GROUPBOX "&Târih", -1, 4, 2, 122, 125 + COMBOBOX IDC_MONTHCB, 11, 17, 50, 120, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + EDITTEXT IDC_YEARTEXT,65, 17, 55, 12, ES_LEFT | WS_GROUP | ES_READONLY + CONTROL "", IDC_YEAR, UPDOWN_CLASS, UDS_SETBUDDYINT | UDS_NOTHOUSANDS | + UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | + WS_BORDER | WS_GROUP, 120, 17, 50, 12 + + CONTROL "", IDC_MONTHCALENDAR, "MonthCalWnd", + WS_CHILD | WS_VISIBLE | WS_TABSTOP, + 11, 37, 108, 80, WS_EX_CLIENTEDGE + GROUPBOX "&Saat", -1, 132, 2, 113, 125 + CONTROL "", IDC_TIMEPICKER, "SysDateTimePick32", + DTS_TIMEFORMAT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, + 144, 105, 90, 12 + LTEXT "", IDC_TIMEZONE, 6, 132, 242, 11 + CONTROL "", IDC_CLOCKWND, "ClockWndClass", + WS_CHILD | WS_VISIBLE, 138, 12, 102, 89 +END + + +IDD_TIMEZONEPAGE DIALOGEX 0, 0, 252, 146 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Saat Dilimi" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + COMBOBOX IDC_TIMEZONELIST, 5, 4, 241, 136, + CBS_DROPDOWNLIST | WS_VSCROLL | WS_VISIBLE | WS_TABSTOP + CONTROL "", IDC_WORLD_BACKGROUND, "Static", SS_OWNERDRAW, 5, 20, 240, 110, WS_EX_STATICEDGE + AUTOCHECKBOX "Saati, Yaz Saati Uygulamalarında Kendiliğinden Ayarla", + IDC_AUTODAYLIGHT, 6, 132, 242, 11, WS_VISIBLE | WS_GROUP | WS_TABSTOP +END + + +IDD_INETTIMEPAGE DIALOGEX 0, 0, 252, 146 +STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Örütbağ Zamânı" +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + COMBOBOX IDC_SERVERLIST, 65, 22, 117, 136, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + AUTOCHECKBOX "Zamânı, Örütbağ Zaman Sunucusuyla Kendiliğinden Eşleştir", IDC_AUTOSYNC, + 11, 7, 241, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP + LTEXT "Sunucu:", IDC_SERVERTEXT, 34, 22, 28, 13 + PUSHBUTTON "&Eşleştir", IDC_UPDATEBUTTON, 187, 22, 49, 14 + LTEXT "", IDC_SUCSYNC, 12, 54, 214, 23 + LTEXT "", IDC_NEXTSYNC, 12, 96, 137, 12 + LTEXT "Eşleme, yalnızca bilgisayar örütbağa bağlandığında olur.", -1, 12, 114, 225, 25 +END + + +STRINGTABLE +BEGIN + IDS_CPLNAME "Zaman" + IDS_CPLDESCRIPTION "Zamânı ve saat dilimini değiştirir." + IDS_TIMEZONETEXT "Şimdiki Saat Dilimi: %s" + IDS_TIMEZONEINVALID "Geçersiz" + IDS_TIMEZONEUNKNOWN "Bilinmeyen" + IDS_INETTIMESUCSYNC "Zaman, %s.%s:%s ile başarıyla eşlendi." + IDS_INETTIMENEXTSYNC "Bir Dahaki Eşleme: %s.%s" + IDS_INETTIMESYNCING "ReactOS, zamânı %s ile eşlerken lütfen bekleyiniz." + IDS_INETTIMEERROR "ReactOS, zamânı %s ile eşlerken bir yanlışlık oldu." +END diff --git a/dll/cpl/timedate/rsrc.rc b/dll/cpl/timedate/rsrc.rc index 099879b900c..e0b7f74296b 100644 --- a/dll/cpl/timedate/rsrc.rc +++ b/dll/cpl/timedate/rsrc.rc @@ -71,6 +71,9 @@ #ifdef LANGUAGE_RU_RU #include "lang/ru-RU.rc" #endif +#ifdef LANGUAGE_TR_TR + #include "lang/tr-TR.rc" +#endif #ifdef LANGUAGE_UK_UA #include "lang/uk-UA.rc" #endif diff --git a/dll/cpl/timedate/timedate.rc b/dll/cpl/timedate/timedate.rc index 897c32abaf9..7914329ae74 100644 --- a/dll/cpl/timedate/timedate.rc +++ b/dll/cpl/timedate/timedate.rc @@ -15,4 +15,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDC_CPLICON ICON "resources/applet.ico" IDC_WORLD BITMAP "resources/world.bmp" +#include + #include "rsrc.rc" diff --git a/dll/cpl/usrmgr/groupprops.c b/dll/cpl/usrmgr/groupprops.c index d34acd3eb51..a455446a912 100644 --- a/dll/cpl/usrmgr/groupprops.c +++ b/dll/cpl/usrmgr/groupprops.c @@ -389,7 +389,7 @@ GetGeneralGroupData(HWND hwndDlg, PGENERAL_GROUP_DATA pGroupData) { PLOCALGROUP_INFO_1 groupInfo = NULL; - PLOCALGROUP_MEMBERS_INFO_1 membersInfo = NULL; + PLOCALGROUP_MEMBERS_INFO_2 membersInfo = NULL; DWORD dwRead; DWORD dwTotal; DWORD_PTR resumeHandle = 0; @@ -435,7 +435,7 @@ GetGeneralGroupData(HWND hwndDlg, NetApiBufferFree(groupInfo); /* Set group members */ - NetLocalGroupGetMembers(NULL, pGroupData->szGroupName, 1, (LPBYTE*)&membersInfo, + NetLocalGroupGetMembers(NULL, pGroupData->szGroupName, 2, (LPBYTE*)&membersInfo, MAX_PREFERRED_LENGTH, &dwRead, &dwTotal, &resumeHandle); @@ -443,32 +443,45 @@ GetGeneralGroupData(HWND hwndDlg, { ZeroMemory(&lvi, sizeof(lvi)); lvi.mask = LVIF_TEXT | LVIF_STATE | LVIF_IMAGE; - lvi.pszText = membersInfo[i].lgrmi1_name; lvi.state = 0; - if (membersInfo[i].lgrmi1_sidusage == SidTypeGroup || - membersInfo[i].lgrmi1_sidusage == SidTypeWellKnownGroup) + if (membersInfo[i].lgrmi2_sidusage == SidTypeGroup || + membersInfo[i].lgrmi2_sidusage == SidTypeWellKnownGroup) { lvi.iImage = 0; } - else if (membersInfo[i].lgrmi1_sidusage == SidTypeUser) + else if (membersInfo[i].lgrmi2_sidusage == SidTypeUser) { /* FIXME: handle locked user properly! */ lvi.iImage = 1; } - if (membersInfo[i].lgrmi1_sidusage == SidTypeWellKnownGroup) + if (membersInfo[i].lgrmi2_sidusage == SidTypeWellKnownGroup) { TCHAR szSid[256]; - GetTextSid(membersInfo[i].lgrmi1_sid, szSid); + GetTextSid(membersInfo[i].lgrmi2_sid, szSid); wsprintf(szGroupName, TEXT("%s (%s)"), - membersInfo[i].lgrmi1_name, + membersInfo[i].lgrmi2_domainandname, szSid); lvi.pszText = szGroupName; } + else + { + LPWSTR ptr; + + ptr = wcschr(membersInfo[i].lgrmi2_domainandname, L'\\'); + if (ptr != NULL) + { + lvi.pszText = ++ptr; + } + else + { + lvi.pszText = membersInfo[i].lgrmi2_domainandname; + } + } (void)ListView_InsertItem(hwndLV, &lvi); } diff --git a/dll/cpl/usrmgr/lang/de-DE.rc b/dll/cpl/usrmgr/lang/de-DE.rc index d803ab17356..8d4b51c5021 100644 --- a/dll/cpl/usrmgr/lang/de-DE.rc +++ b/dll/cpl/usrmgr/lang/de-DE.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL /* Dialogs */ -IDD_USERS DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USERS DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Benutzer" FONT 8, "MS Shell Dlg" @@ -18,11 +18,11 @@ BEGIN PUSHBUTTON "&Entfernen", IDC_USERS_REMOVE, 141, 98, 50, 14 PUSHBUTTON "E&igenschaften", IDC_USERS_PROPERTIES, 195, 98, 50, 14 AUTOCHECKBOX "Benut&zer mssen Benutzername und Kennwort zum Starten eingeben", IDC_USERS_STARTUP_REQUIRE, 10, 118, 235, 14, WS_DISABLED - PUSHBUTTON "Administrator Kenn&wort zurcksetzen", IDC_USERS_ADMIN_RESET, 120, 200, 125, 14, WS_DISABLED, 100, 16 + PUSHBUTTON "Kenn&wort zurcksetzen", IDC_USERS_RESET, 165, 200, 80, 14, WS_DISABLED, 100, 16 END -IDD_GROUPS DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_GROUPS DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Gruppen" FONT 8, "MS Shell Dlg" @@ -35,7 +35,7 @@ BEGIN END -IDD_EXTRA DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_EXTRA DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Extra" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN END -IDD_USER_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_GENERAL DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Allgemein" FONT 8, "MS Shell Dlg" @@ -62,7 +62,7 @@ BEGIN END -IDD_USER_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_MEMBERSHIP DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Mitgliedschaft" FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN END -IDD_USER_PROFILE DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_PROFILE DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Profil" FONT 8, "MS Shell Dlg" @@ -96,7 +96,7 @@ BEGIN END -IDD_GROUP_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_GROUP_GENERAL DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Allgemein" FONT 8, "MS Shell Dlg" @@ -105,14 +105,14 @@ BEGIN LTEXT "Beschreibung:", -1, 7, 45, 46, 8 EDITTEXT IDC_GROUP_GENERAL_DESCRIPTION,65,42,180,13,ES_AUTOHSCROLL LTEXT "Mitglieder:", -1, 7, 63, 45, 8 - CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, + CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 74, 238, 117, WS_EX_CLIENTEDGE PUSHBUTTON "&Hinzufgen...", IDC_GROUP_GENERAL_ADD, 7, 197, 50, 14 PUSHBUTTON "&Entfernen", IDC_GROUP_GENERAL_REMOVE, 61, 197, 50, 14, WS_DISABLED END -IDD_CHANGE_PASSWORD DIALOGEX DISCARDABLE 0, 0, 267, 74 +IDD_CHANGE_PASSWORD DIALOGEX 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Passwort ndern" FONT 8, "MS Shell Dlg" @@ -126,7 +126,7 @@ BEGIN END -IDD_USER_NEW DIALOGEX DISCARDABLE 0, 0, 267, 200 +IDD_USER_NEW DIALOGEX 0, 0, 267, 200 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Neuer Benutzer" FONT 8, "MS Shell Dlg" @@ -150,7 +150,7 @@ BEGIN END -IDD_GROUP_NEW DIALOGEX DISCARDABLE 0, 0, 267, 74 +IDD_GROUP_NEW DIALOGEX 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Neue Gruppe" FONT 8, "MS Shell Dlg" @@ -164,7 +164,7 @@ BEGIN END -IDD_USER_ADD_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_ADD_MEMBERSHIP DIALOGEX 0, 0, 252, 223 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Gruppenmitgliedschaft" FONT 8, "MS Shell Dlg" @@ -179,7 +179,7 @@ END /* Menus */ -IDM_POPUP_GROUP MENU DISCARDABLE +IDM_POPUP_GROUP MENU BEGIN POPUP "" BEGIN @@ -197,7 +197,7 @@ BEGIN END -IDM_POPUP_USER MENU DISCARDABLE +IDM_POPUP_USER MENU BEGIN POPUP "" BEGIN diff --git a/dll/cpl/usrmgr/lang/en-US.rc b/dll/cpl/usrmgr/lang/en-US.rc index 5239e9270ef..99162345aa5 100644 --- a/dll/cpl/usrmgr/lang/en-US.rc +++ b/dll/cpl/usrmgr/lang/en-US.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US /* Dialogs */ -IDD_USERS DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USERS DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Users" FONT 8, "MS Shell Dlg" @@ -18,11 +18,11 @@ BEGIN PUSHBUTTON "&Remove", IDC_USERS_REMOVE, 141, 98, 50, 14 PUSHBUTTON "Pr&operties", IDC_USERS_PROPERTIES, 195, 98, 50, 14 AUTOCHECKBOX "Require user name and password on system startup.", IDC_USERS_STARTUP_REQUIRE, 10, 118, 200, 14, WS_DISABLED - PUSHBUTTON "Reset Administrator Password", IDC_USERS_ADMIN_RESET, 142, 200, 103, 14, WS_DISABLED + PUSHBUTTON "Reset Password", IDC_USERS_RESET, 165, 200, 80, 14, WS_DISABLED END -IDD_GROUPS DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_GROUPS DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Groups" FONT 8, "MS Shell Dlg" @@ -35,7 +35,7 @@ BEGIN END -IDD_EXTRA DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_EXTRA DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Extra" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN END -IDD_USER_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_GENERAL DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg" @@ -62,7 +62,7 @@ BEGIN END -IDD_USER_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_MEMBERSHIP DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Membership" FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN END -IDD_USER_PROFILE DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_PROFILE DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Profile" FONT 8, "MS Shell Dlg" @@ -96,7 +96,7 @@ BEGIN END -IDD_GROUP_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_GROUP_GENERAL DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg" @@ -105,14 +105,14 @@ BEGIN LTEXT "Description:", -1, 7, 45, 46, 8 EDITTEXT IDC_GROUP_GENERAL_DESCRIPTION,65,42,180,13,ES_AUTOHSCROLL LTEXT "Members:", -1, 7, 63, 45, 8 - CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, + CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 74, 238, 117, WS_EX_CLIENTEDGE PUSHBUTTON "Add...", IDC_GROUP_GENERAL_ADD, 7, 197, 50, 14 PUSHBUTTON "Remove", IDC_GROUP_GENERAL_REMOVE, 61, 197, 50, 14, WS_DISABLED END -IDD_CHANGE_PASSWORD DIALOGEX DISCARDABLE 0, 0, 267, 74 +IDD_CHANGE_PASSWORD DIALOGEX 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Change Password" FONT 8, "MS Shell Dlg" @@ -126,7 +126,7 @@ BEGIN END -IDD_USER_NEW DIALOGEX DISCARDABLE 0, 0, 267, 200 +IDD_USER_NEW DIALOGEX 0, 0, 267, 200 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "New User" FONT 8, "MS Shell Dlg" @@ -150,7 +150,7 @@ BEGIN END -IDD_GROUP_NEW DIALOGEX DISCARDABLE 0, 0, 267, 74 +IDD_GROUP_NEW DIALOGEX 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "New Group" FONT 8, "MS Shell Dlg" @@ -164,7 +164,7 @@ BEGIN END -IDD_USER_ADD_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_ADD_MEMBERSHIP DIALOGEX 0, 0, 252, 223 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Group Membership" FONT 8, "MS Shell Dlg" @@ -179,7 +179,7 @@ END /* Menus */ -IDM_POPUP_GROUP MENU DISCARDABLE +IDM_POPUP_GROUP MENU BEGIN POPUP "" BEGIN @@ -197,7 +197,7 @@ BEGIN END -IDM_POPUP_USER MENU DISCARDABLE +IDM_POPUP_USER MENU BEGIN POPUP "" BEGIN diff --git a/dll/cpl/usrmgr/lang/es-ES.rc b/dll/cpl/usrmgr/lang/es-ES.rc index da6defed6a5..16392587401 100644 --- a/dll/cpl/usrmgr/lang/es-ES.rc +++ b/dll/cpl/usrmgr/lang/es-ES.rc @@ -3,7 +3,7 @@ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL /* Dialogs */ -IDD_USERS DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USERS DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Usuarios" FONT 8, "MS Shell Dlg" @@ -14,11 +14,11 @@ BEGIN PUSHBUTTON "&Remove", IDC_USERS_REMOVE, 141, 98, 50, 14 PUSHBUTTON "Pr&operties", IDC_USERS_PROPERTIES, 195, 98, 50, 14 AUTOCHECKBOX "Require user name and password on system startup.", IDC_USERS_STARTUP_REQUIRE, 10, 118, 200, 14, WS_DISABLED - PUSHBUTTON "Reset Administrator Password", IDC_USERS_ADMIN_RESET, 142, 200, 103, 14, WS_DISABLED + PUSHBUTTON "Reset Password", IDC_USERS_RESET, 165, 200, 80, 14, WS_DISABLED END -IDD_GROUPS DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_GROUPS DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Grupos" FONT 8, "MS Shell Dlg" @@ -31,7 +31,7 @@ BEGIN END -IDD_EXTRA DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_EXTRA DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Extra" FONT 8, "MS Shell Dlg" @@ -40,7 +40,7 @@ BEGIN END -IDD_USER_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_GENERAL DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg" @@ -58,7 +58,7 @@ BEGIN END -IDD_USER_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_MEMBERSHIP DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Miembro de" FONT 8, "MS Shell Dlg" @@ -71,7 +71,7 @@ BEGIN END -IDD_USER_PROFILE DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_PROFILE DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Perfil" FONT 8, "MS Shell Dlg" @@ -92,7 +92,7 @@ BEGIN END -IDD_GROUP_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_GROUP_GENERAL DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg" @@ -101,14 +101,14 @@ BEGIN LTEXT "Descripcin:", -1, 7, 45, 46, 8 EDITTEXT IDC_GROUP_GENERAL_DESCRIPTION,65,42,180,13,ES_AUTOHSCROLL LTEXT "Miembros:", -1, 7, 63, 45, 8 - CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, + CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 74, 238, 117, WS_EX_CLIENTEDGE PUSHBUTTON "Aadir...", IDC_GROUP_GENERAL_ADD, 7, 197, 50, 14 PUSHBUTTON "Quitar", IDC_GROUP_GENERAL_REMOVE, 61, 197, 50, 14, WS_DISABLED END -IDD_CHANGE_PASSWORD DIALOGEX DISCARDABLE 0, 0, 267, 74 +IDD_CHANGE_PASSWORD DIALOGEX 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Cambiar contrasea" FONT 8, "MS Shell Dlg" @@ -122,7 +122,7 @@ BEGIN END -IDD_USER_NEW DIALOGEX DISCARDABLE 0, 0, 267, 200 +IDD_USER_NEW DIALOGEX 0, 0, 267, 200 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Nuevo usuario" FONT 8, "MS Shell Dlg" @@ -146,7 +146,7 @@ BEGIN END -IDD_GROUP_NEW DIALOGEX DISCARDABLE 0, 0, 267, 74 +IDD_GROUP_NEW DIALOGEX 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Nuevo grupo" FONT 8, "MS Shell Dlg" @@ -160,7 +160,7 @@ BEGIN END -IDD_USER_ADD_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_ADD_MEMBERSHIP DIALOGEX 0, 0, 252, 223 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Pertenencia a grupos" FONT 8, "MS Shell Dlg" @@ -175,7 +175,7 @@ END /* Menus */ -IDM_POPUP_GROUP MENU DISCARDABLE +IDM_POPUP_GROUP MENU BEGIN POPUP "" BEGIN @@ -193,7 +193,7 @@ BEGIN END -IDM_POPUP_USER MENU DISCARDABLE +IDM_POPUP_USER MENU BEGIN POPUP "" BEGIN diff --git a/dll/cpl/usrmgr/lang/fr-FR.rc b/dll/cpl/usrmgr/lang/fr-FR.rc index c747efe9abd..c3257c1a4b8 100644 --- a/dll/cpl/usrmgr/lang/fr-FR.rc +++ b/dll/cpl/usrmgr/lang/fr-FR.rc @@ -3,7 +3,7 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL /* Dialogs */ -IDD_USERS DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USERS DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Utilisateurs" FONT 8, "MS Shell Dlg" @@ -14,11 +14,11 @@ BEGIN PUSHBUTTON "&Remove", IDC_USERS_REMOVE, 141, 98, 50, 14 PUSHBUTTON "Pr&operties", IDC_USERS_PROPERTIES, 195, 98, 50, 14 AUTOCHECKBOX "Require user name and password on system startup.", IDC_USERS_STARTUP_REQUIRE, 10, 118, 200, 14, WS_DISABLED - PUSHBUTTON "Reset Administrator Password", IDC_USERS_ADMIN_RESET, 142, 200, 103, 14, WS_DISABLED + PUSHBUTTON "Reset Password", IDC_USERS_RESET, 165, 200, 80, 14, WS_DISABLED END -IDD_GROUPS DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_GROUPS DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Groupes" FONT 8, "MS Shell Dlg" @@ -31,7 +31,7 @@ BEGIN END -IDD_EXTRA DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_EXTRA DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Extra" FONT 8, "MS Shell Dlg" @@ -40,7 +40,7 @@ BEGIN END -IDD_USER_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_GENERAL DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Général" FONT 8, "MS Shell Dlg" @@ -58,7 +58,7 @@ BEGIN END -IDD_USER_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_MEMBERSHIP DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Appartenance" FONT 8, "MS Shell Dlg" @@ -71,7 +71,7 @@ BEGIN END -IDD_USER_PROFILE DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_PROFILE DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Profil" FONT 8, "MS Shell Dlg" @@ -92,7 +92,7 @@ BEGIN END -IDD_GROUP_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_GROUP_GENERAL DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Général" FONT 8, "MS Shell Dlg" @@ -101,14 +101,14 @@ BEGIN LTEXT "Description :", -1, 7, 45, 46, 8 EDITTEXT IDC_GROUP_GENERAL_DESCRIPTION,65,42,180,13,ES_AUTOHSCROLL LTEXT "Membres :", -1, 7, 63, 45, 8 - CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, + CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 74, 238, 117, WS_EX_CLIENTEDGE PUSHBUTTON "Ajouter...", IDC_GROUP_GENERAL_ADD, 7, 197, 50, 14 PUSHBUTTON "Enlever", IDC_GROUP_GENERAL_REMOVE, 61, 197, 50, 14, WS_DISABLED END -IDD_CHANGE_PASSWORD DIALOGEX DISCARDABLE 0, 0, 267, 74 +IDD_CHANGE_PASSWORD DIALOGEX 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Changer le mot de passe" FONT 8, "MS Shell Dlg" @@ -122,7 +122,7 @@ BEGIN END -IDD_USER_NEW DIALOGEX DISCARDABLE 0, 0, 267, 200 +IDD_USER_NEW DIALOGEX 0, 0, 267, 200 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Nouvel utilisateur" FONT 8, "MS Shell Dlg" @@ -146,7 +146,7 @@ BEGIN END -IDD_GROUP_NEW DIALOGEX DISCARDABLE 0, 0, 267, 74 +IDD_GROUP_NEW DIALOGEX 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Nouveau groupe" FONT 8, "MS Shell Dlg" @@ -160,7 +160,7 @@ BEGIN END -IDD_USER_ADD_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_ADD_MEMBERSHIP DIALOGEX 0, 0, 252, 223 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Appartenance à un groupe" FONT 8, "MS Shell Dlg" @@ -175,7 +175,7 @@ END /* Menus */ -IDM_POPUP_GROUP MENU DISCARDABLE +IDM_POPUP_GROUP MENU BEGIN POPUP "" BEGIN @@ -193,7 +193,7 @@ BEGIN END -IDM_POPUP_USER MENU DISCARDABLE +IDM_POPUP_USER MENU BEGIN POPUP "" BEGIN diff --git a/dll/cpl/usrmgr/lang/he-IL.rc b/dll/cpl/usrmgr/lang/he-IL.rc index a12f689e3dc..6ef4dc18a35 100644 --- a/dll/cpl/usrmgr/lang/he-IL.rc +++ b/dll/cpl/usrmgr/lang/he-IL.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT // To be added if above no longer valid /* Dialogs */ -IDD_USERS DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USERS DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Users" FONT 8, "MS Shell Dlg" @@ -18,11 +18,11 @@ BEGIN PUSHBUTTON "&Remove", IDC_USERS_REMOVE, 141, 98, 50, 14 PUSHBUTTON "Pr&operties", IDC_USERS_PROPERTIES, 195, 98, 50, 14 AUTOCHECKBOX "Require user name and password on system startup.", IDC_USERS_STARTUP_REQUIRE, 10, 118, 200, 14, WS_DISABLED - PUSHBUTTON "Reset Administrator Password", IDC_USERS_ADMIN_RESET, 142, 200, 103, 14, WS_DISABLED + PUSHBUTTON "Reset Password", IDC_USERS_RESET, 165, 200, 80, 14, WS_DISABLED END -IDD_GROUPS DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_GROUPS DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Groups" FONT 8, "MS Shell Dlg" @@ -35,7 +35,7 @@ BEGIN END -IDD_EXTRA DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_EXTRA DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Extra" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN END -IDD_USER_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_GENERAL DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg" @@ -62,7 +62,7 @@ BEGIN END -IDD_USER_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_MEMBERSHIP DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Membership" FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN END -IDD_USER_PROFILE DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_PROFILE DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Profile" FONT 8, "MS Shell Dlg" @@ -96,7 +96,7 @@ BEGIN END -IDD_GROUP_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_GROUP_GENERAL DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "General" FONT 8, "MS Shell Dlg" @@ -105,14 +105,14 @@ BEGIN LTEXT "Description:", -1, 7, 45, 46, 8 EDITTEXT IDC_GROUP_GENERAL_DESCRIPTION,65,42,180,13,ES_AUTOHSCROLL LTEXT "Members:", -1, 7, 63, 45, 8 - CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, + CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 74, 238, 117, WS_EX_CLIENTEDGE PUSHBUTTON "Add...", IDC_GROUP_GENERAL_ADD, 7, 197, 50, 14 PUSHBUTTON "Remove", IDC_GROUP_GENERAL_REMOVE, 61, 197, 50, 14, WS_DISABLED END -IDD_CHANGE_PASSWORD DIALOGEX DISCARDABLE 0, 0, 267, 74 +IDD_CHANGE_PASSWORD DIALOGEX 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Change Password" FONT 8, "MS Shell Dlg" @@ -126,7 +126,7 @@ BEGIN END -IDD_USER_NEW DIALOGEX DISCARDABLE 0, 0, 267, 200 +IDD_USER_NEW DIALOGEX 0, 0, 267, 200 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "New User" FONT 8, "MS Shell Dlg" @@ -150,7 +150,7 @@ BEGIN END -IDD_GROUP_NEW DIALOGEX DISCARDABLE 0, 0, 267, 74 +IDD_GROUP_NEW DIALOGEX 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "New Group" FONT 8, "MS Shell Dlg" @@ -164,7 +164,7 @@ BEGIN END -IDD_USER_ADD_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_ADD_MEMBERSHIP DIALOGEX 0, 0, 252, 223 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Group Membership" FONT 8, "MS Shell Dlg" @@ -179,7 +179,7 @@ END /* Menus */ -IDM_POPUP_GROUP MENU DISCARDABLE +IDM_POPUP_GROUP MENU BEGIN POPUP "" BEGIN @@ -197,7 +197,7 @@ BEGIN END -IDM_POPUP_USER MENU DISCARDABLE +IDM_POPUP_USER MENU BEGIN POPUP "" BEGIN diff --git a/dll/cpl/usrmgr/lang/pl-PL.rc b/dll/cpl/usrmgr/lang/pl-PL.rc index 10b1fd6d051..fc414aaecc1 100644 --- a/dll/cpl/usrmgr/lang/pl-PL.rc +++ b/dll/cpl/usrmgr/lang/pl-PL.rc @@ -11,7 +11,7 @@ LANGUAGE LANG_POLISH, SUBLANG_DEFAULT /* Dialogs */ -IDD_USERS DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USERS DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Użytkownicy" FONT 8, "MS Shell Dlg" @@ -22,11 +22,11 @@ BEGIN PUSHBUTTON "&Remove", IDC_USERS_REMOVE, 141, 98, 50, 14 PUSHBUTTON "Pr&operties", IDC_USERS_PROPERTIES, 195, 98, 50, 14 AUTOCHECKBOX "Require user name and password on system startup.", IDC_USERS_STARTUP_REQUIRE, 10, 118, 200, 14, WS_DISABLED - PUSHBUTTON "Reset Administrator Password", IDC_USERS_ADMIN_RESET, 142, 200, 103, 14, WS_DISABLED + PUSHBUTTON "Reset Password", IDC_USERS_RESET, 165, 200, 80, 14, WS_DISABLED END -IDD_GROUPS DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_GROUPS DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Grupy" FONT 8, "MS Shell Dlg" @@ -39,7 +39,7 @@ BEGIN END -IDD_EXTRA DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_EXTRA DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Dodatki" FONT 8, "MS Shell Dlg" @@ -48,7 +48,7 @@ BEGIN END -IDD_USER_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_GENERAL DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Ogólne" FONT 8, "MS Shell Dlg" @@ -66,7 +66,7 @@ BEGIN END -IDD_USER_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_MEMBERSHIP DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Członkostwo" FONT 8, "MS Shell Dlg" @@ -79,7 +79,7 @@ BEGIN END -IDD_USER_PROFILE DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_PROFILE DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Profil" FONT 8, "MS Shell Dlg" @@ -100,7 +100,7 @@ BEGIN END -IDD_GROUP_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_GROUP_GENERAL DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Ogólne" FONT 8, "MS Shell Dlg" @@ -109,14 +109,14 @@ BEGIN LTEXT "Opis:", -1, 7, 45, 46, 8 EDITTEXT IDC_GROUP_GENERAL_DESCRIPTION,65,42,180,13,ES_AUTOHSCROLL LTEXT "Członkowie:", -1, 7, 63, 45, 8 - CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, + CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 74, 238, 117, WS_EX_CLIENTEDGE PUSHBUTTON "Dodaj...", IDC_GROUP_GENERAL_ADD, 7, 197, 50, 14 PUSHBUTTON "Usuń", IDC_GROUP_GENERAL_REMOVE, 61, 197, 50, 14, WS_DISABLED END -IDD_CHANGE_PASSWORD DIALOGEX DISCARDABLE 0, 0, 267, 74 +IDD_CHANGE_PASSWORD DIALOGEX 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Zmiana hasła" FONT 8, "MS Shell Dlg" @@ -130,7 +130,7 @@ BEGIN END -IDD_USER_NEW DIALOGEX DISCARDABLE 0, 0, 267, 200 +IDD_USER_NEW DIALOGEX 0, 0, 267, 200 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Nowy użytkownik" FONT 8, "MS Shell Dlg" @@ -154,7 +154,7 @@ BEGIN END -IDD_GROUP_NEW DIALOGEX DISCARDABLE 0, 0, 267, 74 +IDD_GROUP_NEW DIALOGEX 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Nowa grupa" FONT 8, "MS Shell Dlg" @@ -168,7 +168,7 @@ BEGIN END -IDD_USER_ADD_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_ADD_MEMBERSHIP DIALOGEX 0, 0, 252, 223 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Przynależność do grup" FONT 8, "MS Shell Dlg" @@ -183,7 +183,7 @@ END /* Menus */ -IDM_POPUP_GROUP MENU DISCARDABLE +IDM_POPUP_GROUP MENU BEGIN POPUP "" BEGIN @@ -201,7 +201,7 @@ BEGIN END -IDM_POPUP_USER MENU DISCARDABLE +IDM_POPUP_USER MENU BEGIN POPUP "" BEGIN diff --git a/dll/cpl/usrmgr/lang/ro-RO.rc b/dll/cpl/usrmgr/lang/ro-RO.rc index 3267596ba68..86737c9859d 100644 --- a/dll/cpl/usrmgr/lang/ro-RO.rc +++ b/dll/cpl/usrmgr/lang/ro-RO.rc @@ -3,7 +3,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL /* Dialogs */ -IDD_USERS DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USERS DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Utilizatori" FONT 8, "MS Shell Dlg" @@ -14,11 +14,11 @@ BEGIN PUSHBUTTON "&Remove", IDC_USERS_REMOVE, 141, 98, 50, 14 PUSHBUTTON "Pr&operties", IDC_USERS_PROPERTIES, 195, 98, 50, 14 AUTOCHECKBOX "Require user name and password on system startup.", IDC_USERS_STARTUP_REQUIRE, 10, 118, 200, 14, WS_DISABLED - PUSHBUTTON "Reset Administrator Password", IDC_USERS_ADMIN_RESET, 142, 200, 103, 14, WS_DISABLED + PUSHBUTTON "Reset Password", IDC_USERS_RESET, 165, 200, 80, 14, WS_DISABLED END -IDD_GROUPS DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_GROUPS DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Grupuri" FONT 8, "MS Shell Dlg" @@ -31,7 +31,7 @@ BEGIN END -IDD_EXTRA DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_EXTRA DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Extra" FONT 8, "MS Shell Dlg" @@ -40,7 +40,7 @@ BEGIN END -IDD_USER_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_GENERAL DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Generale" FONT 8, "MS Shell Dlg" @@ -58,7 +58,7 @@ BEGIN END -IDD_USER_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_MEMBERSHIP DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Apartenență" FONT 8, "MS Shell Dlg" @@ -71,7 +71,7 @@ BEGIN END -IDD_USER_PROFILE DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_PROFILE DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Profil" FONT 8, "MS Shell Dlg" @@ -92,7 +92,7 @@ BEGIN END -IDD_GROUP_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_GROUP_GENERAL DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Generale" FONT 8, "MS Shell Dlg" @@ -101,14 +101,14 @@ BEGIN LTEXT "Descriere:", -1, 7, 45, 46, 8 EDITTEXT IDC_GROUP_GENERAL_DESCRIPTION,65,42,180,13,ES_AUTOHSCROLL LTEXT "Membri:", -1, 7, 63, 45, 8 - CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, + CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 74, 238, 117, WS_EX_CLIENTEDGE PUSHBUTTON "A&dăugare…", IDC_GROUP_GENERAL_ADD, 7, 197, 50, 14 PUSHBUTTON "Elimină", IDC_GROUP_GENERAL_REMOVE, 61, 197, 50, 14, WS_DISABLED END -IDD_CHANGE_PASSWORD DIALOGEX DISCARDABLE 0, 0, 267, 74 +IDD_CHANGE_PASSWORD DIALOGEX 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Modificare parolă" FONT 8, "MS Shell Dlg" @@ -122,7 +122,7 @@ BEGIN END -IDD_USER_NEW DIALOGEX DISCARDABLE 0, 0, 267, 200 +IDD_USER_NEW DIALOGEX 0, 0, 267, 200 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Utilizator nou" FONT 8, "MS Shell Dlg" @@ -146,7 +146,7 @@ BEGIN END -IDD_GROUP_NEW DIALOGEX DISCARDABLE 0, 0, 267, 74 +IDD_GROUP_NEW DIALOGEX 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Grup nou" FONT 8, "MS Shell Dlg" @@ -160,7 +160,7 @@ BEGIN END -IDD_USER_ADD_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_ADD_MEMBERSHIP DIALOGEX 0, 0, 252, 223 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Apartenență grup" FONT 8, "MS Shell Dlg" @@ -175,7 +175,7 @@ END /* Menus */ -IDM_POPUP_GROUP MENU DISCARDABLE +IDM_POPUP_GROUP MENU BEGIN POPUP "" BEGIN @@ -193,7 +193,7 @@ BEGIN END -IDM_POPUP_USER MENU DISCARDABLE +IDM_POPUP_USER MENU BEGIN POPUP "" BEGIN diff --git a/dll/cpl/usrmgr/lang/ru-RU.rc b/dll/cpl/usrmgr/lang/ru-RU.rc index ba516a72d89..9c502ae2002 100644 --- a/dll/cpl/usrmgr/lang/ru-RU.rc +++ b/dll/cpl/usrmgr/lang/ru-RU.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT /* Dialogs */ -IDD_USERS DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USERS DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Пользователи" FONT 8, "MS Shell Dlg" @@ -18,11 +18,11 @@ BEGIN PUSHBUTTON "&Remove", IDC_USERS_REMOVE, 141, 98, 50, 14 PUSHBUTTON "Pr&operties", IDC_USERS_PROPERTIES, 195, 98, 50, 14 AUTOCHECKBOX "Require user name and password on system startup.", IDC_USERS_STARTUP_REQUIRE, 10, 118, 200, 14, WS_DISABLED - PUSHBUTTON "Reset Administrator Password", IDC_USERS_ADMIN_RESET, 142, 200, 103, 14, WS_DISABLED + PUSHBUTTON "Reset Password", IDC_USERS_RESET, 165, 200, 80, 14, WS_DISABLED END -IDD_GROUPS DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_GROUPS DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Группы" FONT 8, "MS Shell Dlg" @@ -35,7 +35,7 @@ BEGIN END -IDD_EXTRA DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_EXTRA DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Дополнительно" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN END -IDD_USER_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_GENERAL DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Общие" FONT 8, "MS Shell Dlg" @@ -62,7 +62,7 @@ BEGIN END -IDD_USER_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_MEMBERSHIP DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Членство в группах" FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN END -IDD_USER_PROFILE DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_PROFILE DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Профиль" FONT 8, "MS Shell Dlg" @@ -96,7 +96,7 @@ BEGIN END -IDD_GROUP_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_GROUP_GENERAL DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Общие" FONT 8, "MS Shell Dlg" @@ -105,14 +105,14 @@ BEGIN LTEXT "Описание:", -1, 7, 45, 46, 8 EDITTEXT IDC_GROUP_GENERAL_DESCRIPTION,65,42,180,13,ES_AUTOHSCROLL LTEXT "Члены группы:", -1, 7, 63, 45, 8 - CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, + CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 74, 238, 117, WS_EX_CLIENTEDGE PUSHBUTTON "Добавить...", IDC_GROUP_GENERAL_ADD, 7, 197, 50, 14 PUSHBUTTON "Удалить", IDC_GROUP_GENERAL_REMOVE, 61, 197, 50, 14, WS_DISABLED END -IDD_CHANGE_PASSWORD DIALOGEX DISCARDABLE 0, 0, 267, 74 +IDD_CHANGE_PASSWORD DIALOGEX 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Установка пароля" FONT 8, "MS Shell Dlg" @@ -126,7 +126,7 @@ BEGIN END -IDD_USER_NEW DIALOGEX DISCARDABLE 0, 0, 267, 200 +IDD_USER_NEW DIALOGEX 0, 0, 267, 200 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Новый пользователь" FONT 8, "MS Shell Dlg" @@ -150,7 +150,7 @@ BEGIN END -IDD_GROUP_NEW DIALOGEX DISCARDABLE 0, 0, 267, 74 +IDD_GROUP_NEW DIALOGEX 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Новая группа" FONT 8, "MS Shell Dlg" @@ -164,7 +164,7 @@ BEGIN END -IDD_USER_ADD_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_ADD_MEMBERSHIP DIALOGEX 0, 0, 252, 223 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Членство в группах" FONT 8, "MS Shell Dlg" @@ -179,7 +179,7 @@ END /* Menus */ -IDM_POPUP_GROUP MENU DISCARDABLE +IDM_POPUP_GROUP MENU BEGIN POPUP "" BEGIN @@ -197,7 +197,7 @@ BEGIN END -IDM_POPUP_USER MENU DISCARDABLE +IDM_POPUP_USER MENU BEGIN POPUP "" BEGIN diff --git a/dll/cpl/usrmgr/lang/uk-UA.rc b/dll/cpl/usrmgr/lang/uk-UA.rc index 01b54fc5045..d2148eed059 100644 --- a/dll/cpl/usrmgr/lang/uk-UA.rc +++ b/dll/cpl/usrmgr/lang/uk-UA.rc @@ -7,7 +7,7 @@ LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT /* Dialogs */ -IDD_USERS DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USERS DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Користувачі" FONT 8, "MS Shell Dlg" @@ -18,11 +18,11 @@ BEGIN PUSHBUTTON "&Remove", IDC_USERS_REMOVE, 141, 98, 50, 14 PUSHBUTTON "Pr&operties", IDC_USERS_PROPERTIES, 195, 98, 50, 14 AUTOCHECKBOX "Require user name and password on system startup.", IDC_USERS_STARTUP_REQUIRE, 10, 118, 200, 14, WS_DISABLED - PUSHBUTTON "Reset Administrator Password", IDC_USERS_ADMIN_RESET, 142, 200, 103, 14, WS_DISABLED + PUSHBUTTON "Reset Password", IDC_USERS_RESET, 165, 200, 80, 14, WS_DISABLED END -IDD_GROUPS DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_GROUPS DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Групи" FONT 8, "MS Shell Dlg" @@ -35,7 +35,7 @@ BEGIN END -IDD_EXTRA DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_EXTRA DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Додатково" FONT 8, "MS Shell Dlg" @@ -44,7 +44,7 @@ BEGIN END -IDD_USER_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_GENERAL DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Загальні" FONT 8, "MS Shell Dlg" @@ -62,7 +62,7 @@ BEGIN END -IDD_USER_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_MEMBERSHIP DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Членство" FONT 8, "MS Shell Dlg" @@ -75,7 +75,7 @@ BEGIN END -IDD_USER_PROFILE DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_PROFILE DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Профіль" FONT 8, "MS Shell Dlg" @@ -96,7 +96,7 @@ BEGIN END -IDD_GROUP_GENERAL DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_GROUP_GENERAL DIALOGEX 0, 0, 252, 223 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Загальні" FONT 8, "MS Shell Dlg" @@ -105,14 +105,14 @@ BEGIN LTEXT "Опис:", -1, 7, 45, 46, 8 EDITTEXT IDC_GROUP_GENERAL_DESCRIPTION,65,42,180,13,ES_AUTOHSCROLL LTEXT "Члени:", -1, 7, 63, 45, 8 - CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, + CONTROL "", IDC_GROUP_GENERAL_MEMBERS, "SysListView32", LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP, 7, 74, 238, 117, WS_EX_CLIENTEDGE PUSHBUTTON "Додати...", IDC_GROUP_GENERAL_ADD, 7, 197, 50, 14 PUSHBUTTON "Вилучити", IDC_GROUP_GENERAL_REMOVE, 61, 197, 50, 14, WS_DISABLED END -IDD_CHANGE_PASSWORD DIALOGEX DISCARDABLE 0, 0, 267, 74 +IDD_CHANGE_PASSWORD DIALOGEX 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Зміна Паролю" FONT 8, "MS Shell Dlg" @@ -126,7 +126,7 @@ BEGIN END -IDD_USER_NEW DIALOGEX DISCARDABLE 0, 0, 267, 200 +IDD_USER_NEW DIALOGEX 0, 0, 267, 200 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Новий Користувач" FONT 8, "MS Shell Dlg" @@ -150,7 +150,7 @@ BEGIN END -IDD_GROUP_NEW DIALOGEX DISCARDABLE 0, 0, 267, 74 +IDD_GROUP_NEW DIALOGEX 0, 0, 267, 74 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Нова Група" FONT 8, "MS Shell Dlg" @@ -164,7 +164,7 @@ BEGIN END -IDD_USER_ADD_MEMBERSHIP DIALOGEX DISCARDABLE 0, 0, 252, 223 +IDD_USER_ADD_MEMBERSHIP DIALOGEX 0, 0, 252, 223 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT CAPTION "Членство в Групах" FONT 8, "MS Shell Dlg" @@ -179,7 +179,7 @@ END /* Menus */ -IDM_POPUP_GROUP MENU DISCARDABLE +IDM_POPUP_GROUP MENU BEGIN POPUP "" BEGIN @@ -197,7 +197,7 @@ BEGIN END -IDM_POPUP_USER MENU DISCARDABLE +IDM_POPUP_USER MENU BEGIN POPUP "" BEGIN diff --git a/dll/cpl/usrmgr/resource.h b/dll/cpl/usrmgr/resource.h index 2f74f65a5a8..c0ffe60cae6 100644 --- a/dll/cpl/usrmgr/resource.h +++ b/dll/cpl/usrmgr/resource.h @@ -46,7 +46,7 @@ #define IDC_USERS_REMOVE 320 #define IDC_USERS_PROPERTIES 321 #define IDC_USERS_STARTUP_REQUIRE 322 -#define IDC_USERS_ADMIN_RESET 323 +#define IDC_USERS_RESET 323 #define IDC_GROUPS_ADD 324 #define IDC_GROUPS_REMOVE 325 diff --git a/dll/cpl/usrmgr/users.c b/dll/cpl/usrmgr/users.c index 97b582e1d5b..8ade77fc5ed 100644 --- a/dll/cpl/usrmgr/users.c +++ b/dll/cpl/usrmgr/users.c @@ -32,13 +32,13 @@ CheckPasswords(HWND hwndDlg, INT nIdDlgItem1, INT nIdDlgItem2) { - TCHAR szPassword1[256]; - TCHAR szPassword2[256]; + TCHAR szPassword1[PWLEN]; + TCHAR szPassword2[PWLEN]; UINT uLen1; UINT uLen2; - uLen1 = GetDlgItemText(hwndDlg, nIdDlgItem1, szPassword1, 256); - uLen2 = GetDlgItemText(hwndDlg, nIdDlgItem2, szPassword2, 256); + uLen1 = GetDlgItemText(hwndDlg, nIdDlgItem1, szPassword1, PWLEN); + uLen2 = GetDlgItemText(hwndDlg, nIdDlgItem2, szPassword2, PWLEN); /* Check the passwords */ if (uLen1 != uLen2 || _tcscmp(szPassword1, szPassword2) != 0) @@ -50,7 +50,6 @@ CheckPasswords(HWND hwndDlg, return FALSE; } - return TRUE; } @@ -61,11 +60,18 @@ ChangePasswordDlgProc(HWND hwndDlg, WPARAM wParam, LPARAM lParam) { + PUSER_INFO_1003 userInfo; + INT nLength; + UNREFERENCED_PARAMETER(wParam); + userInfo = (PUSER_INFO_1003)GetWindowLongPtr(hwndDlg, DWLP_USER); + switch (uMsg) { case WM_INITDIALOG: + userInfo = (PUSER_INFO_1003)lParam; + SetWindowLongPtr(hwndDlg, DWLP_USER, lParam); break; case WM_COMMAND: @@ -73,11 +79,22 @@ ChangePasswordDlgProc(HWND hwndDlg, { case IDOK: if (CheckPasswords(hwndDlg, IDC_EDIT_PASSWORD1, IDC_EDIT_PASSWORD2)) - EndDialog(hwndDlg, 0); + { + + /* Store the password */ + nLength = SendDlgItemMessage(hwndDlg, IDC_EDIT_PASSWORD1, WM_GETTEXTLENGTH, 0, 0); + if (nLength > 0) + { + userInfo->usri1003_password = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (nLength + 1) * sizeof(WCHAR)); + GetDlgItemText(hwndDlg, IDC_EDIT_PASSWORD1, userInfo->usri1003_password, nLength + 1); + } + + EndDialog(hwndDlg, IDOK); + } break; case IDCANCEL: - EndDialog(hwndDlg, 0); + EndDialog(hwndDlg, IDCANCEL); break; } break; @@ -90,6 +107,52 @@ ChangePasswordDlgProc(HWND hwndDlg, } +static VOID +UserChangePassword(HWND hwndDlg) +{ + TCHAR szUserName[UNLEN]; + USER_INFO_1003 user; + INT nItem; + HWND hwndLV; + NET_API_STATUS status; + + ZeroMemory(&user, sizeof(USER_INFO_1003)); + + hwndLV = GetDlgItem(hwndDlg, IDC_USERS_LIST); + nItem = ListView_GetNextItem(hwndLV, -1, LVNI_SELECTED); + if (nItem == -1) + return; + + /* Get the new user name */ + ListView_GetItemText(hwndLV, + nItem, 0, + szUserName, + UNLEN); + + if (DialogBoxParam(hApplet, + MAKEINTRESOURCE(IDD_CHANGE_PASSWORD), + hwndDlg, + ChangePasswordDlgProc, + (LPARAM)&user) == IDOK) + { + status = NetUserSetInfo(NULL, + szUserName, + 1003, + (LPBYTE)&user, + NULL); + if (status != NERR_Success) + { + TCHAR szText[256]; + wsprintf(szText, TEXT("Error: %u"), status); + MessageBox(NULL, szText, TEXT("NetUserSetInfo"), MB_ICONERROR | MB_OK); + } + } + + if (user.usri1003_password) + HeapFree(GetProcessHeap(), 0, user.usri1003_password); +} + + static VOID UpdateUserOptions(HWND hwndDlg, PUSER_INFO_3 userInfo, @@ -407,7 +470,6 @@ UpdateUsersList(HWND hwndListView) LV_ITEM lvi; INT iItem; - for (;;) { netStatus = NetUserEnum(NULL, 20, FILTER_NORMAL_ACCOUNT, @@ -441,7 +503,6 @@ UpdateUsersList(HWND hwndListView) if (netStatus != ERROR_MORE_DATA) break; } - } @@ -655,11 +716,7 @@ UsersPageProc(HWND hwndDlg, switch (LOWORD(wParam)) { case IDM_USER_CHANGE_PASSWORD: - DialogBoxParam(hApplet, - MAKEINTRESOURCE(IDD_CHANGE_PASSWORD), - hwndDlg, - ChangePasswordDlgProc, - (LPARAM)NULL); + UserChangePassword(hwndDlg); break; case IDM_USER_RENAME: diff --git a/dll/cpl/usrmgr/usrmgr.rc b/dll/cpl/usrmgr/usrmgr.rc index 9407402da05..cdee52b3caa 100644 --- a/dll/cpl/usrmgr/usrmgr.rc +++ b/dll/cpl/usrmgr/usrmgr.rc @@ -19,4 +19,6 @@ IDI_USER ICON "resources/user.ico" IDI_LOCKED_USER ICON "resources/locked.ico" IDI_GROUP ICON "resources/group.ico" +#include + #include "rsrc.rc" diff --git a/dll/cpl/wined3dcfg/wined3dcfg.rc b/dll/cpl/wined3dcfg/wined3dcfg.rc index 5a5487c3fd8..3da63e8fa94 100644 --- a/dll/cpl/wined3dcfg/wined3dcfg.rc +++ b/dll/cpl/wined3dcfg/wined3dcfg.rc @@ -14,4 +14,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL /* Icons */ IDI_CPLICON ICON "resources/wined3dcfg.ico" +#include + #include "rsrc.rc" diff --git a/dll/directx/CMakeLists.txt b/dll/directx/CMakeLists.txt index 578e4f426c6..cf477d43989 100644 --- a/dll/directx/CMakeLists.txt +++ b/dll/directx/CMakeLists.txt @@ -1,25 +1,12 @@ -add_subdirectory(amstream) add_subdirectory(d3d8thk) #add_subdirectory(bdaplgin) #disabled in trunk #add_subdirectory(d3d8) #disabled in trunk, see wine subfolder #add_subdirectory(d3d9) #disabled in trunk, see wine subfolder #add_subdirectory(ddraw) #disabled in trunk, see wine subfolder -add_subdirectory(devenum) -add_subdirectory(dinput) -add_subdirectory(dinput8) -add_subdirectory(dmusic) -add_subdirectory(dplay) -add_subdirectory(dplayx) -add_subdirectory(dsound) #add_subdirectory(dsound_new) #disabled in trunk -add_subdirectory(dxdiagn) -add_subdirectory(dxgi) #add_subdirectory(ksproxy) Not needed at the moment add_subdirectory(ksuser) -add_subdirectory(msdmo) #add_subdirectory(msdvbnp) #disabled in trunk #add_subdirectory(msvidctl) #disabled in trunk -add_subdirectory(qedit) -add_subdirectory(quartz) add_subdirectory(wine) diff --git a/dll/directx/amstream/mediastream.c b/dll/directx/amstream/mediastream.c deleted file mode 100644 index 57c0221ffb7..00000000000 --- a/dll/directx/amstream/mediastream.c +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Implementation of IMediaStream Interface - * - * Copyright 2005, 2008 Christian Costa - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#define COBJMACROS - -//#include "winbase.h" -//#include "wingdi.h" - -//#include "amstream_private.h" -#include - -//#include "ddstream.h" - -WINE_DEFAULT_DEBUG_CHANNEL(amstream); - -typedef struct { - IDirectDrawMediaStream IDirectDrawMediaStream_iface; - LONG ref; - IMultiMediaStream* Parent; - MSPID PurposeId; - STREAM_TYPE StreamType; -} IDirectDrawMediaStreamImpl; - -static inline IDirectDrawMediaStreamImpl *impl_from_IDirectDrawMediaStream(IDirectDrawMediaStream *iface) -{ - return CONTAINING_RECORD(iface, IDirectDrawMediaStreamImpl, IDirectDrawMediaStream_iface); -} - -static HRESULT WINAPI IDirectDrawMediaStreamImpl_QueryInterface(IDirectDrawMediaStream *iface, - REFIID riid, void **ppv) -{ - IDirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); - - TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppv); - - if (IsEqualGUID(riid, &IID_IUnknown) || - IsEqualGUID(riid, &IID_IMediaStream) || - IsEqualGUID(riid, &IID_IDirectDrawMediaStream)) - { - IUnknown_AddRef(iface); - *ppv = This; - return S_OK; - } - - ERR("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv); - return E_NOINTERFACE; -} - -static ULONG WINAPI IDirectDrawMediaStreamImpl_AddRef(IDirectDrawMediaStream *iface) -{ - IDirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); - - TRACE("(%p/%p)\n", iface, This); - - return InterlockedIncrement(&This->ref); -} - -static ULONG WINAPI IDirectDrawMediaStreamImpl_Release(IDirectDrawMediaStream *iface) -{ - IDirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); - ULONG ref = InterlockedDecrement(&This->ref); - - TRACE("(%p/%p)\n", iface, This); - - if (!ref) - HeapFree(GetProcessHeap(), 0, This); - - return ref; -} - -/*** IMediaStream methods ***/ -static HRESULT WINAPI IDirectDrawMediaStreamImpl_GetMultiMediaStream(IDirectDrawMediaStream *iface, - IMultiMediaStream** ppMultiMediaStream) -{ - IDirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); - - FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppMultiMediaStream); - - return S_FALSE; -} - -static HRESULT WINAPI IDirectDrawMediaStreamImpl_GetInformation(IDirectDrawMediaStream *iface, - MSPID *pPurposeId, STREAM_TYPE *pType) -{ - IDirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); - - TRACE("(%p/%p)->(%p,%p)\n", This, iface, pPurposeId, pType); - - if (pPurposeId) - *pPurposeId = This->PurposeId; - if (pType) - *pType = This->StreamType; - - return S_OK; -} - -static HRESULT WINAPI IDirectDrawMediaStreamImpl_SetSameFormat(IDirectDrawMediaStream *iface, - IMediaStream *pStreamThatHasDesiredFormat, DWORD dwFlags) -{ - IDirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); - - FIXME("(%p/%p)->(%p,%x) stub!\n", This, iface, pStreamThatHasDesiredFormat, dwFlags); - - return S_FALSE; -} - -static HRESULT WINAPI IDirectDrawMediaStreamImpl_AllocateSample(IDirectDrawMediaStream *iface, - DWORD dwFlags, IStreamSample **ppSample) -{ - IDirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); - - FIXME("(%p/%p)->(%x,%p) stub!\n", This, iface, dwFlags, ppSample); - - return S_FALSE; -} - -static HRESULT WINAPI IDirectDrawMediaStreamImpl_CreateSharedSample(IDirectDrawMediaStream *iface, - IStreamSample *pExistingSample, DWORD dwFlags, IStreamSample **ppSample) -{ - IDirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); - - FIXME("(%p/%p)->(%p,%x,%p) stub!\n", This, iface, pExistingSample, dwFlags, ppSample); - - return S_FALSE; -} - -static HRESULT WINAPI IDirectDrawMediaStreamImpl_SendEndOfStream(IDirectDrawMediaStream *iface, - DWORD dwFlags) -{ - IDirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); - - FIXME("(%p/%p)->(%x) stub!\n", This, iface, dwFlags); - - return S_FALSE; -} - -static HRESULT WINAPI IDirectDrawMediaStreamImpl_GetFormat(IDirectDrawMediaStream *iface, - DDSURFACEDESC *pDDSDCurrent, IDirectDrawPalette **ppDirectDrawPalette, - DDSURFACEDESC *pDDSDDesired, DWORD *pdwFlags) -{ - FIXME("(%p)->(%p,%p,%p,%p) stub!\n", iface, pDDSDCurrent, ppDirectDrawPalette, pDDSDDesired, - pdwFlags); - - return E_NOTIMPL; - -} - -static HRESULT WINAPI IDirectDrawMediaStreamImpl_SetFormat(IDirectDrawMediaStream *iface, - const DDSURFACEDESC *pDDSurfaceDesc, IDirectDrawPalette *pDirectDrawPalette) -{ - FIXME("(%p)->(%p,%p) stub!\n", iface, pDDSurfaceDesc, pDirectDrawPalette); - - return E_NOTIMPL; -} - -static HRESULT WINAPI IDirectDrawMediaStreamImpl_GetDirectDraw(IDirectDrawMediaStream *iface, - IDirectDraw **ppDirectDraw) -{ - FIXME("(%p)->(%p) stub!\n", iface, ppDirectDraw); - - return E_NOTIMPL; -} - -static HRESULT WINAPI IDirectDrawMediaStreamImpl_SetDirectDraw(IDirectDrawMediaStream *iface, - IDirectDraw *pDirectDraw) -{ - FIXME("(%p)->(%p) stub!\n", iface, pDirectDraw); - - return E_NOTIMPL; -} - -static HRESULT WINAPI IDirectDrawMediaStreamImpl_CreateSample(IDirectDrawMediaStream *iface, - IDirectDrawSurface *pSurface, const RECT *pRect, DWORD dwFlags, - IDirectDrawStreamSample **ppSample) -{ - FIXME("(%p)->(%p,%p,%x,%p) stub!\n", iface, pSurface, pRect, dwFlags, ppSample); - - return E_NOTIMPL; -} - -static HRESULT WINAPI IDirectDrawMediaStreamImpl_GetTimePerFrame(IDirectDrawMediaStream *iface, - STREAM_TIME *pFrameTime) -{ - FIXME("(%p)->(%p) stub!\n", iface, pFrameTime); - - return E_NOTIMPL; -} - -static const struct IDirectDrawMediaStreamVtbl DirectDrawMediaStream_Vtbl = -{ - IDirectDrawMediaStreamImpl_QueryInterface, - IDirectDrawMediaStreamImpl_AddRef, - IDirectDrawMediaStreamImpl_Release, - IDirectDrawMediaStreamImpl_GetMultiMediaStream, - IDirectDrawMediaStreamImpl_GetInformation, - IDirectDrawMediaStreamImpl_SetSameFormat, - IDirectDrawMediaStreamImpl_AllocateSample, - IDirectDrawMediaStreamImpl_CreateSharedSample, - IDirectDrawMediaStreamImpl_SendEndOfStream, - IDirectDrawMediaStreamImpl_GetFormat, - IDirectDrawMediaStreamImpl_SetFormat, - IDirectDrawMediaStreamImpl_GetDirectDraw, - IDirectDrawMediaStreamImpl_SetDirectDraw, - IDirectDrawMediaStreamImpl_CreateSample, - IDirectDrawMediaStreamImpl_GetTimePerFrame -}; - -HRESULT mediastream_create(IMultiMediaStream *Parent, const MSPID *pPurposeId, - STREAM_TYPE StreamType, IMediaStream **ppMediaStream) -{ - IDirectDrawMediaStreamImpl *object; - - TRACE("(%p,%s,%p)\n", Parent, debugstr_guid(pPurposeId), ppMediaStream); - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectDrawMediaStreamImpl)); - if (!object) - { - ERR("Out of memory\n"); - return E_OUTOFMEMORY; - } - - object->IDirectDrawMediaStream_iface.lpVtbl = &DirectDrawMediaStream_Vtbl; - object->ref = 1; - - object->Parent = Parent; - object->PurposeId = *pPurposeId; - object->StreamType = StreamType; - - *ppMediaStream = (IMediaStream*)&object->IDirectDrawMediaStream_iface; - - return S_OK; -} diff --git a/dll/directx/amstream/mediastreamfilter.c b/dll/directx/amstream/mediastreamfilter.c deleted file mode 100644 index d33c8034aff..00000000000 --- a/dll/directx/amstream/mediastreamfilter.c +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Implementation of MediaStream Filter - * - * Copyright 2008 Christian Costa - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -#define COBJMACROS - -//#include "winbase.h" -//#include "wingdi.h" - -//#include "amstream_private.h" -#include - -//#include "ddstream.h" - -WINE_DEFAULT_DEBUG_CHANNEL(amstream); - -typedef struct { - IMediaStreamFilter IMediaStreamFilter_iface; - LONG ref; - CRITICAL_SECTION csFilter; - FILTER_STATE state; - REFERENCE_TIME rtStreamStart; - IReferenceClock * pClock; - FILTER_INFO filterInfo; -} IMediaStreamFilterImpl; - -static inline IMediaStreamFilterImpl *impl_from_IMediaStreamFilter(IMediaStreamFilter *iface) -{ - return CONTAINING_RECORD(iface, IMediaStreamFilterImpl, IMediaStreamFilter_iface); -} - -/*** IUnknown methods ***/ - -static HRESULT WINAPI MediaStreamFilterImpl_QueryInterface(IMediaStreamFilter *iface, REFIID riid, - void **ppv) -{ - IMediaStreamFilterImpl *This = impl_from_IMediaStreamFilter(iface); - - TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv); - - *ppv = NULL; - - if (IsEqualIID(riid, &IID_IUnknown)) - *ppv = This; - else if (IsEqualIID(riid, &IID_IPersist)) - *ppv = This; - else if (IsEqualIID(riid, &IID_IMediaFilter)) - *ppv = This; - else if (IsEqualIID(riid, &IID_IBaseFilter)) - *ppv = This; - else if (IsEqualIID(riid, &IID_IMediaStreamFilter)) - *ppv = This; - - if (*ppv) - { - IUnknown_AddRef((IUnknown *)(*ppv)); - return S_OK; - } - - return E_NOINTERFACE; -} - -static ULONG WINAPI MediaStreamFilterImpl_AddRef(IMediaStreamFilter *iface) -{ - IMediaStreamFilterImpl *This = impl_from_IMediaStreamFilter(iface); - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p)->() AddRef from %d\n", iface, refCount - 1); - - return refCount; -} - -static ULONG WINAPI MediaStreamFilterImpl_Release(IMediaStreamFilter *iface) -{ - IMediaStreamFilterImpl *This = impl_from_IMediaStreamFilter(iface); - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE("(%p)->() Release from %d\n", iface, refCount + 1); - - if (!refCount) - HeapFree(GetProcessHeap(), 0, This); - - return refCount; -} - -/*** IPersist methods ***/ - -static HRESULT WINAPI MediaStreamFilterImpl_GetClassID(IMediaStreamFilter * iface, CLSID * pClsid) -{ - TRACE("(%p)->(%p)\n", iface, pClsid); - - *pClsid = CLSID_MediaStreamFilter; - - return S_OK; -} - -/*** IMediaFilter methods ***/ - -static HRESULT WINAPI MediaStreamFilterImpl_Stop(IMediaStreamFilter * iface) -{ - FIXME("(%p)->(): Stub!\n", iface); - - return E_NOTIMPL; -} - -static HRESULT WINAPI MediaStreamFilterImpl_Pause(IMediaStreamFilter * iface) -{ - FIXME("(%p)->(): Stub!\n", iface); - - return E_NOTIMPL; -} - -static HRESULT WINAPI MediaStreamFilterImpl_Run(IMediaStreamFilter * iface, REFERENCE_TIME tStart) -{ - FIXME("(%p)->(%s): Stub!\n", iface, wine_dbgstr_longlong(tStart)); - - return E_NOTIMPL; -} - -static HRESULT WINAPI MediaStreamFilterImpl_GetState(IMediaStreamFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState) -{ - FIXME("(%p)->(%d,%p): Stub!\n", iface, dwMilliSecsTimeout, pState); - - return E_NOTIMPL; -} - -static HRESULT WINAPI MediaStreamFilterImpl_SetSyncSource(IMediaStreamFilter * iface, IReferenceClock *pClock) -{ - TRACE("(%p)->(%p): Stub!\n", iface, pClock); - - return E_NOTIMPL; -} - -static HRESULT WINAPI MediaStreamFilterImpl_GetSyncSource(IMediaStreamFilter * iface, IReferenceClock **ppClock) -{ - FIXME("(%p)->(%p): Stub!\n", iface, ppClock); - - return E_NOTIMPL; -} - -/*** IBaseFilter methods ***/ - -static HRESULT WINAPI MediaStreamFilterImpl_EnumPins(IMediaStreamFilter * iface, IEnumPins **ppEnum) -{ - FIXME("(%p)->(%p): Stub!\n", iface, ppEnum); - - return E_NOTIMPL; -} - -static HRESULT WINAPI MediaStreamFilterImpl_FindPin(IMediaStreamFilter * iface, LPCWSTR Id, IPin **ppPin) -{ - FIXME("(%p)->(%s,%p): Stub!\n", iface, debugstr_w(Id), ppPin); - - return E_NOTIMPL; -} - -static HRESULT WINAPI MediaStreamFilterImpl_QueryFilterInfo(IMediaStreamFilter * iface, FILTER_INFO *pInfo) -{ - FIXME("(%p)->(%p): Stub!\n", iface, pInfo); - - return E_NOTIMPL; -} - -static HRESULT WINAPI MediaStreamFilterImpl_JoinFilterGraph(IMediaStreamFilter * iface, IFilterGraph *pGraph, LPCWSTR pName) -{ - FIXME("(%p)->(%p, %s): Stub!\n", iface, pGraph, debugstr_w(pName)); - - return E_NOTIMPL; -} - -static HRESULT WINAPI MediaStreamFilterImpl_QueryVendorInfo(IMediaStreamFilter * iface, LPWSTR *pVendorInfo) -{ - FIXME("(%p)->(%p): Stub!\n", iface, pVendorInfo); - - return E_NOTIMPL; -} - -/*** IMediaStreamFilter methods ***/ - -static HRESULT WINAPI MediaStreamFilterImpl_AddMediaStream(IMediaStreamFilter* iface, IAMMediaStream *pAMMediaStream) -{ - FIXME("(%p)->(%p): Stub!\n", iface, pAMMediaStream); - - return E_NOTIMPL; -} - -static HRESULT WINAPI MediaStreamFilterImpl_GetMediaStream(IMediaStreamFilter* iface, REFMSPID idPurpose, IMediaStream **ppMediaStream) -{ - FIXME("(%p)->(%s,%p): Stub!\n", iface, debugstr_guid(idPurpose), ppMediaStream); - - return E_NOTIMPL; -} - -static HRESULT WINAPI MediaStreamFilterImpl_EnumMediaStreams(IMediaStreamFilter* iface, LONG Index, IMediaStream **ppMediaStream) -{ - FIXME("(%p)->(%d,%p): Stub!\n", iface, Index, ppMediaStream); - - return E_NOTIMPL; -} - -static HRESULT WINAPI MediaStreamFilterImpl_SupportSeeking(IMediaStreamFilter* iface, BOOL bRenderer) -{ - FIXME("(%p)->(%d): Stub!\n", iface, bRenderer); - - return E_NOTIMPL; -} - -static HRESULT WINAPI MediaStreamFilterImpl_ReferenceTimeToStreamTime(IMediaStreamFilter* iface, REFERENCE_TIME *pTime) -{ - FIXME("(%p)->(%p): Stub!\n", iface, pTime); - - return E_NOTIMPL; -} - -static HRESULT WINAPI MediaStreamFilterImpl_GetCurrentStreamTime(IMediaStreamFilter* iface, REFERENCE_TIME *pCurrentStreamTime) -{ - FIXME("(%p)->(%p): Stub!\n", iface, pCurrentStreamTime); - - return E_NOTIMPL; -} - -static HRESULT WINAPI MediaStreamFilterImpl_WaitUntil(IMediaStreamFilter* iface, REFERENCE_TIME WaitStreamTime) -{ - FIXME("(%p)->(%s): Stub!\n", iface, wine_dbgstr_longlong(WaitStreamTime)); - - return E_NOTIMPL; -} - -static HRESULT WINAPI MediaStreamFilterImpl_Flush(IMediaStreamFilter* iface, BOOL bCancelEOS) -{ - FIXME("(%p)->(%d): Stub!\n", iface, bCancelEOS); - - return E_NOTIMPL; -} - -static HRESULT WINAPI MediaStreamFilterImpl_EndOfStream(IMediaStreamFilter* iface) -{ - FIXME("(%p)->(): Stub!\n", iface); - - return E_NOTIMPL; -} - -static const IMediaStreamFilterVtbl MediaStreamFilter_Vtbl = -{ - MediaStreamFilterImpl_QueryInterface, - MediaStreamFilterImpl_AddRef, - MediaStreamFilterImpl_Release, - MediaStreamFilterImpl_GetClassID, - MediaStreamFilterImpl_Stop, - MediaStreamFilterImpl_Pause, - MediaStreamFilterImpl_Run, - MediaStreamFilterImpl_GetState, - MediaStreamFilterImpl_SetSyncSource, - MediaStreamFilterImpl_GetSyncSource, - MediaStreamFilterImpl_EnumPins, - MediaStreamFilterImpl_FindPin, - MediaStreamFilterImpl_QueryFilterInfo, - MediaStreamFilterImpl_JoinFilterGraph, - MediaStreamFilterImpl_QueryVendorInfo, - MediaStreamFilterImpl_AddMediaStream, - MediaStreamFilterImpl_GetMediaStream, - MediaStreamFilterImpl_EnumMediaStreams, - MediaStreamFilterImpl_SupportSeeking, - MediaStreamFilterImpl_ReferenceTimeToStreamTime, - MediaStreamFilterImpl_GetCurrentStreamTime, - MediaStreamFilterImpl_WaitUntil, - MediaStreamFilterImpl_Flush, - MediaStreamFilterImpl_EndOfStream -}; - -HRESULT MediaStreamFilter_create(IUnknown *pUnkOuter, void **ppObj) -{ - IMediaStreamFilterImpl* object; - - TRACE("(%p,%p)\n", pUnkOuter, ppObj); - - if( pUnkOuter ) - return CLASS_E_NOAGGREGATION; - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IMediaStreamFilterImpl)); - if (!object) - { - ERR("Out of memory\n"); - return E_OUTOFMEMORY; - } - - object->IMediaStreamFilter_iface.lpVtbl = &MediaStreamFilter_Vtbl; - object->ref = 1; - - *ppObj = object; - - return S_OK; -} diff --git a/dll/directx/bdaplgin/bdaplgin.cpp b/dll/directx/bdaplgin/bdaplgin.cpp index bc15f3110e9..74412e6f735 100644 --- a/dll/directx/bdaplgin/bdaplgin.cpp +++ b/dll/directx/bdaplgin/bdaplgin.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/bdaplgin/classfactory.cpp * PURPOSE: ClassFactory interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/bdaplgin/classfactory.cpp b/dll/directx/bdaplgin/classfactory.cpp index d6aaa3e8a18..10ba0b184ac 100644 --- a/dll/directx/bdaplgin/classfactory.cpp +++ b/dll/directx/bdaplgin/classfactory.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/bdaplgin/classfactory.cpp * PURPOSE: ClassFactory interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/bdaplgin/controlnode.cpp b/dll/directx/bdaplgin/controlnode.cpp index 40ec853ee3d..b9f13e638e7 100644 --- a/dll/directx/bdaplgin/controlnode.cpp +++ b/dll/directx/bdaplgin/controlnode.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/bdaplgin/controlnode.cpp * PURPOSE: ControlNode interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/bdaplgin/devicecontrol.cpp b/dll/directx/bdaplgin/devicecontrol.cpp index 5d0e50121d2..fc70e2f13dd 100644 --- a/dll/directx/bdaplgin/devicecontrol.cpp +++ b/dll/directx/bdaplgin/devicecontrol.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/bdaplgin/classfactory.cpp * PURPOSE: ClassFactory interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/bdaplgin/digitaldemo.cpp b/dll/directx/bdaplgin/digitaldemo.cpp index 311ddeeb47b..01845e8f3a7 100644 --- a/dll/directx/bdaplgin/digitaldemo.cpp +++ b/dll/directx/bdaplgin/digitaldemo.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/bdaplgin/digitaldemo.cpp * PURPOSE: IBDA_DigitalDemodulator interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/bdaplgin/frequencyfilter.cpp b/dll/directx/bdaplgin/frequencyfilter.cpp index ca3bc46282f..047fc8d7b20 100644 --- a/dll/directx/bdaplgin/frequencyfilter.cpp +++ b/dll/directx/bdaplgin/frequencyfilter.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/bdaplgin/frequencyfilter.cpp * PURPOSE: IBDA_FrequencyFilter interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/bdaplgin/lnbinfo.cpp b/dll/directx/bdaplgin/lnbinfo.cpp index 689443d43cd..fe08fc31b96 100644 --- a/dll/directx/bdaplgin/lnbinfo.cpp +++ b/dll/directx/bdaplgin/lnbinfo.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/bdaplgin/lnbinfo.cpp * PURPOSE: IBDA_LNBInfo interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/bdaplgin/pincontrol.cpp b/dll/directx/bdaplgin/pincontrol.cpp index 2571abbf866..07a68f76080 100644 --- a/dll/directx/bdaplgin/pincontrol.cpp +++ b/dll/directx/bdaplgin/pincontrol.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/bdaplgin/classfactory.cpp * PURPOSE: ClassFactory interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/bdaplgin/signalstatistics.cpp b/dll/directx/bdaplgin/signalstatistics.cpp index 230ab8b34f4..9783c7f7095 100644 --- a/dll/directx/bdaplgin/signalstatistics.cpp +++ b/dll/directx/bdaplgin/signalstatistics.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/bdaplgin/frequencyfilter.cpp * PURPOSE: IBDA_FrequencyFilter interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/ddraw/ddraw.rc b/dll/directx/ddraw/ddraw.rc index 5e773bc8910..06eb6a0a31a 100644 --- a/dll/directx/ddraw/ddraw.rc +++ b/dll/directx/ddraw/ddraw.rc @@ -10,7 +10,7 @@ #include -STRINGTABLE DISCARDABLE +STRINGTABLE BEGIN STR_PRIMARY_DISPLAY, "Primary Display Driver" END diff --git a/dll/directx/devenum/Makefile.in b/dll/directx/devenum/Makefile.in deleted file mode 100644 index 8653126df62..00000000000 --- a/dll/directx/devenum/Makefile.in +++ /dev/null @@ -1,20 +0,0 @@ -TOPSRCDIR = @top_srcdir@ -TOPOBJDIR = ../.. -SRCDIR = @srcdir@ -VPATH = @srcdir@ -MODULE = devenum.dll -IMPORTS = ole32 oleaut32 winmm user32 advapi32 kernel32 -EXTRALIBS = -lstrmiids -luuid - -C_SRCS = \ - createdevenum.c \ - devenum_main.c \ - factory.c \ - mediacatenum.c \ - parsedisplayname.c - -RC_SRCS = devenum.rc - -@MAKE_DLL_RULES@ - -### Dependencies: diff --git a/dll/directx/devenum/devenum_main.c b/dll/directx/devenum/devenum_main.c deleted file mode 100644 index d4d29484bd9..00000000000 --- a/dll/directx/devenum/devenum_main.c +++ /dev/null @@ -1,380 +0,0 @@ -/* - * exported dll functions for devenum.dll - * - * Copyright (C) 2002 John K. Hohm - * Copyright (C) 2002 Robert Shearman - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "devenum_private.h" -#include -//#include "winreg.h" - -WINE_DEFAULT_DEBUG_CHANNEL(devenum); - -LONG dll_refs; -HINSTANCE DEVENUM_hInstance; - -typedef struct -{ - REFCLSID clsid; - LPCWSTR friendly_name; - BOOL instance; -} register_info; - -static HRESULT register_clsids(int count, const register_info * pRegInfo, LPCWSTR pszThreadingModel); -static void DEVENUM_RegisterQuartz(void); - -/*********************************************************************** - * Global string constant definitions - */ -const WCHAR clsid_keyname[6] = { 'C', 'L', 'S', 'I', 'D', 0 }; - -/*********************************************************************** - * DllEntryPoint - */ -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) -{ - TRACE("%p 0x%x %p\n", hinstDLL, fdwReason, fImpLoad); - - switch(fdwReason) { - case DLL_PROCESS_ATTACH: - DEVENUM_hInstance = hinstDLL; - DisableThreadLibraryCalls(hinstDLL); - break; - - case DLL_PROCESS_DETACH: - DEVENUM_hInstance = 0; - break; - } - return TRUE; -} - -/*********************************************************************** - * DllGetClassObject (DEVENUM.@) - */ -HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) -{ - TRACE("(%s, %s, %p)\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv); - - *ppv = NULL; - - /* FIXME: we should really have two class factories. - * Oh well - works just fine as it is */ - if (IsEqualGUID(rclsid, &CLSID_SystemDeviceEnum) || - IsEqualGUID(rclsid, &CLSID_CDeviceMoniker)) - return IClassFactory_QueryInterface((IClassFactory*)&DEVENUM_ClassFactory, iid, ppv); - - FIXME("CLSID: %s, IID: %s\n", debugstr_guid(rclsid), debugstr_guid(iid)); - return CLASS_E_CLASSNOTAVAILABLE; -} - -/*********************************************************************** - * DllCanUnloadNow (DEVENUM.@) - */ -HRESULT WINAPI DllCanUnloadNow(void) -{ - return dll_refs != 0 ? S_FALSE : S_OK; -} - -/*********************************************************************** - * DllRegisterServer (DEVENUM.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - HRESULT res; - HKEY hkeyClsid = NULL; - HKEY hkey1 = NULL; - HKEY hkey2 = NULL; - LPOLESTR pszClsidDevMon = NULL; - IFilterMapper2 * pMapper = NULL; - LPVOID mapvptr; - static const WCHAR threadingModel[] = {'B','o','t','h',0}; - static const WCHAR sysdevenum[] = {'S','y','s','t','e','m',' ','D','e','v','i','c','e',' ','E','n','u','m',0}; - static const WCHAR devmon[] = {'D','e','v','i','c','e','M','o','n','i','k','e','r',0}; - static const WCHAR acmcat[] = {'A','C','M',' ','C','l','a','s','s',' ','M','a','n','a','g','e','r',0}; - static const WCHAR vidcat[] = {'I','C','M',' ','C','l','a','s','s',' ','M','a','n','a','g','e','r',0}; - static const WCHAR filtcat[] = {'A','c','t','i','v','e','M','o','v','i','e',' ','F','i','l','t','e','r',' ','C','l','a','s','s',' ','M','a','n','a','g','e','r',0}; - static const WCHAR vfwcat[] = {'V','F','W',' ','C','a','p','t','u','r','e',' ','C','l','a','s','s',' ','M','a','n','a','g','e','r',0}; - static const WCHAR wavein[] = {'W','a','v','e','I','n',' ','C','l','a','s','s',' ','M','a','n','a','g','e','r', 0}; - static const WCHAR waveout[] = {'W','a','v','e','O','u','t',' ','a','n','d',' ','D','S','o','u','n','d',' ','C','l','a','s','s',' ','M','a','n','a','g','e','r',0}; - static const WCHAR midiout[] = {'M','i','d','i','O','u','t',' ','C','l','a','s','s',' ','M','a','n','a','g','e','r',0}; - static const WCHAR amcat[] = {'A','c','t','i','v','e','M','o','v','i','e',' ','F','i','l','t','e','r',' ','C','a','t','e','g','o','r','i','e','s',0}; - static const WCHAR device[] = {'d','e','v','i','c','e',0}; - static const WCHAR device_1[] = {'d','e','v','i','c','e','.','1',0}; - static const register_info ri[] = - { - {&CLSID_SystemDeviceEnum, sysdevenum, FALSE}, - {&CLSID_CDeviceMoniker, devmon, FALSE}, - {&CLSID_AudioCompressorCategory, acmcat, TRUE}, - {&CLSID_VideoCompressorCategory, vidcat, TRUE}, - {&CLSID_LegacyAmFilterCategory, filtcat, TRUE}, - {&CLSID_VideoInputDeviceCategory, vfwcat, FALSE}, - {&CLSID_AudioInputDeviceCategory, wavein, FALSE}, - {&CLSID_AudioRendererCategory, waveout, FALSE}, - {&CLSID_MidiRendererCategory, midiout, FALSE}, - {&CLSID_ActiveMovieCategories, amcat, TRUE} - }; - - TRACE("\n"); - - res = register_clsids(sizeof(ri) / sizeof(register_info), ri, threadingModel); - - /* Quartz is needed for IFilterMapper2 */ - DEVENUM_RegisterQuartz(); - -/*** ActiveMovieFilter Categories ***/ - - CoInitialize(NULL); - - res = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC, - &IID_IFilterMapper2, &mapvptr); - if (SUCCEEDED(res)) - { - static const WCHAR friendlyvidcap[] = {'V','i','d','e','o',' ','C','a','p','t','u','r','e',' ','S','o','u','r','c','e','s',0}; - static const WCHAR friendlydshow[] = {'D','i','r','e','c','t','S','h','o','w',' ','F','i','l','t','e','r','s',0}; - static const WCHAR friendlyvidcomp[] = {'V','i','d','e','o',' ','C','o','m','p','r','e','s','s','o','r','s',0}; - static const WCHAR friendlyaudcap[] = {'A','u','d','i','o',' ','C','a','p','t','u','r','e',' ','S','o','u','r','c','e','s',0}; - static const WCHAR friendlyaudcomp[] = {'A','u','d','i','o',' ','C','o','m','p','r','e','s','s','o','r','s',0}; - static const WCHAR friendlyaudrend[] = {'A','u','d','i','o',' ','R','e','n','d','e','r','e','r','s',0}; - static const WCHAR friendlymidirend[] = {'M','i','d','i',' ','R','e','n','d','e','r','e','r','s',0}; - static const WCHAR friendlyextrend[] = {'E','x','t','e','r','n','a','l',' ','R','e','n','d','e','r','e','r','s',0}; - static const WCHAR friendlydevctrl[] = {'D','e','v','i','c','e',' ','C','o','n','t','r','o','l',' ','F','i','l','t','e','r','s',0}; - - pMapper = mapvptr; - - IFilterMapper2_CreateCategory(pMapper, &CLSID_VideoInputDeviceCategory, MERIT_DO_NOT_USE, friendlyvidcap); - IFilterMapper2_CreateCategory(pMapper, &CLSID_LegacyAmFilterCategory, MERIT_NORMAL, friendlydshow); - IFilterMapper2_CreateCategory(pMapper, &CLSID_VideoCompressorCategory, MERIT_DO_NOT_USE, friendlyvidcomp); - IFilterMapper2_CreateCategory(pMapper, &CLSID_AudioInputDeviceCategory, MERIT_DO_NOT_USE, friendlyaudcap); - IFilterMapper2_CreateCategory(pMapper, &CLSID_AudioCompressorCategory, MERIT_DO_NOT_USE, friendlyaudcomp); - IFilterMapper2_CreateCategory(pMapper, &CLSID_AudioRendererCategory, MERIT_NORMAL, friendlyaudrend); - IFilterMapper2_CreateCategory(pMapper, &CLSID_MidiRendererCategory, MERIT_NORMAL, friendlymidirend); - IFilterMapper2_CreateCategory(pMapper, &CLSID_TransmitCategory, MERIT_DO_NOT_USE, friendlyextrend); - IFilterMapper2_CreateCategory(pMapper, &CLSID_DeviceControlCategory, MERIT_DO_NOT_USE, friendlydevctrl); - - IFilterMapper2_Release(pMapper); - } - -/*** CDeviceMoniker ***/ - if (SUCCEEDED(res)) - { - res = StringFromCLSID(&CLSID_CDeviceMoniker, &pszClsidDevMon); - } - if (SUCCEEDED(res)) - { - res = RegOpenKeyW(HKEY_CLASSES_ROOT, clsid_keyname, &hkeyClsid) - == ERROR_SUCCESS ? S_OK : E_FAIL; - } - if (SUCCEEDED(res)) - { - res = RegOpenKeyW(hkeyClsid, pszClsidDevMon, &hkey1) - == ERROR_SUCCESS ? S_OK : E_FAIL; - } - if (SUCCEEDED(res)) - { - static const WCHAR wszProgID[] = {'P','r','o','g','I','D',0}; - res = RegCreateKeyW(hkey1, wszProgID, &hkey2) - == ERROR_SUCCESS ? S_OK : E_FAIL; - } - if (SUCCEEDED(res)) - { - res = RegSetValueW(hkey2, NULL, REG_SZ, device_1, (lstrlenW(device_1) + 1) * sizeof(WCHAR)) - == ERROR_SUCCESS ? S_OK : E_FAIL; - } - - if (hkey2) - { - RegCloseKey(hkey2); - hkey2 = NULL; - } - - if (SUCCEEDED(res)) - { - static const WCHAR wszVProgID[] = {'V','e','r','s','i','o','n','I','n','d','e','p','e','d','e','n','t','P','r','o','g','I','D',0}; - res = RegCreateKeyW(hkey1, wszVProgID, &hkey2) - == ERROR_SUCCESS ? S_OK : E_FAIL; - } - if (SUCCEEDED(res)) - { - res = RegSetValueW(hkey2, NULL, REG_SZ, device, (lstrlenW(device) + 1) * sizeof(WCHAR)) - == ERROR_SUCCESS ? S_OK : E_FAIL; - } - - if (hkey2) - { - RegCloseKey(hkey2); - hkey2 = NULL; - } - - if (hkey1) - { - RegCloseKey(hkey1); - hkey1 = NULL; - } - - if (SUCCEEDED(res)) - { - res = RegCreateKeyW(HKEY_CLASSES_ROOT, device, &hkey1) - == ERROR_SUCCESS ? S_OK : E_FAIL; - } - if (SUCCEEDED(res)) - { - res = RegCreateKeyW(hkey1, clsid_keyname, &hkey2) - == ERROR_SUCCESS ? S_OK : E_FAIL; - } - if (SUCCEEDED(res)) - { - res = RegSetValueW(hkey2, NULL, REG_SZ, pszClsidDevMon, (lstrlenW(pszClsidDevMon) + 1) * sizeof(WCHAR)) - == ERROR_SUCCESS ? S_OK : E_FAIL; - } - if (hkey2) - { - RegCloseKey(hkey2); - hkey2 = NULL; - } - - if (hkey1) - { - RegCloseKey(hkey1); - hkey1 = NULL; - } - - if (SUCCEEDED(res)) - { - res = RegCreateKeyW(HKEY_CLASSES_ROOT, device_1, &hkey1) - == ERROR_SUCCESS ? S_OK : E_FAIL; - } - if (SUCCEEDED(res)) - { - res = RegCreateKeyW(hkey1, clsid_keyname, &hkey2) - == ERROR_SUCCESS ? S_OK : E_FAIL; - } - if (SUCCEEDED(res)) - { - res = RegSetValueW(hkey2, NULL, REG_SZ, pszClsidDevMon, (lstrlenW(pszClsidDevMon) + 1) * sizeof(WCHAR)) - == ERROR_SUCCESS ? S_OK : E_FAIL; - } - - if (hkey2) - RegCloseKey(hkey2); - - if (hkey1) - RegCloseKey(hkey1); - - if (hkeyClsid) - RegCloseKey(hkeyClsid); - - CoTaskMemFree(pszClsidDevMon); - CoUninitialize(); - - return res; -} - -/*********************************************************************** - * DllUnregisterServer (DEVENUM.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - FIXME("stub!\n"); - return E_FAIL; -} - -static HRESULT register_clsids(int count, const register_info * pRegInfo, LPCWSTR pszThreadingModel) -{ - HRESULT res = S_OK; - LPOLESTR clsidString = NULL; - HKEY hkeyClsid; - HKEY hkeySub; - HKEY hkeyInproc32; - HKEY hkeyInstance = NULL; - int i; - static const WCHAR wcszInproc32[] = {'I','n','p','r','o','c','S','e','r','v','e','r','3','2',0}; - static const WCHAR wcszThreadingModel[] = {'T','h','r','e','a','d','i','n','g','M','o','d','e','l',0}; - static const WCHAR dll_module[] = {'d','e','v','e','n','u','m','.','d','l','l',0}; - - res = RegOpenKeyW(HKEY_CLASSES_ROOT, clsid_keyname, &hkeyClsid) - == ERROR_SUCCESS ? S_OK : E_FAIL; - - for (i = 0; i < count; i++) - { - hkeySub = 0; - if (SUCCEEDED(res)) - { - res = StringFromCLSID(pRegInfo[i].clsid, &clsidString); - } - if (SUCCEEDED(res)) - { - res = RegCreateKeyW(hkeyClsid, clsidString, &hkeySub) - == ERROR_SUCCESS ? S_OK : E_FAIL; - } - if (pRegInfo[i].instance && SUCCEEDED(res)) - { - res = RegCreateKeyW(hkeySub, wszInstanceKeyName, &hkeyInstance) - == ERROR_SUCCESS ? S_OK : E_FAIL; - RegCloseKey(hkeyInstance); - } - if (SUCCEEDED(res)) - { - RegSetValueW(hkeySub, - NULL, - REG_SZ, - pRegInfo->friendly_name ? pRegInfo[i].friendly_name : clsidString, - (lstrlenW(pRegInfo[i].friendly_name ? pRegInfo->friendly_name : clsidString) + 1) * sizeof(WCHAR)); - res = RegCreateKeyW(hkeySub, wcszInproc32, &hkeyInproc32) - == ERROR_SUCCESS ? S_OK : E_FAIL; - } - if (SUCCEEDED(res)) - { - RegSetValueW(hkeyInproc32, - NULL, - REG_SZ, - dll_module, - (lstrlenW(dll_module) + 1) * sizeof(WCHAR)); - RegSetValueExW(hkeyInproc32, - wcszThreadingModel, - 0, - REG_SZ, - (LPCVOID)pszThreadingModel, - (lstrlenW(pszThreadingModel) + 1) * sizeof(WCHAR)); - RegCloseKey(hkeyInproc32); - } - if (hkeySub) RegCloseKey(hkeySub); - CoTaskMemFree(clsidString); - clsidString = NULL; - } - - RegCloseKey(hkeyClsid); - - return res; -} - -typedef HRESULT (WINAPI *DllRegisterServer_func)(void); - -/* calls DllRegisterServer() for the Quartz DLL */ -static void DEVENUM_RegisterQuartz(void) -{ - HANDLE hDLL = LoadLibraryA("quartz.dll"); - DllRegisterServer_func pDllRegisterServer = NULL; - if (hDLL) - pDllRegisterServer = (DllRegisterServer_func)GetProcAddress(hDLL, "DllRegisterServer"); - if (pDllRegisterServer) - { - HRESULT hr = pDllRegisterServer(); - if (FAILED(hr)) - ERR("Failed to register Quartz. Error was 0x%x)\n", hr); - } -} diff --git a/dll/directx/dplay/dplay_main.c b/dll/directx/dplay/dplay_main.c deleted file mode 100644 index 67a01ed518c..00000000000 --- a/dll/directx/dplay/dplay_main.c +++ /dev/null @@ -1 +0,0 @@ -/* nothing here yet */ diff --git a/dll/directx/dplayx/dplay.c b/dll/directx/dplayx/dplay.c deleted file mode 100644 index c22dc2d30ff..00000000000 --- a/dll/directx/dplayx/dplay.c +++ /dev/null @@ -1,5497 +0,0 @@ -/* Direct Play 2,3,4 Implementation - * - * Copyright 1998,1999,2000,2001 - Peter Hunnisett - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include -//#include "wine/port.h" - -//#include -//#include - -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#include -//#include "winerror.h" -//#include "winbase.h" -//#include "winnt.h" -#include -//#include "winnls.h" -#include -#include - -#include "dpinit.h" -#include "dplayx_global.h" -#include "name_server.h" -//#include "dplayx_queue.h" -//#include "dplaysp.h" -//#include "dplay_global.h" - -WINE_DEFAULT_DEBUG_CHANNEL(dplay); - -/* FIXME: Should this be externed? */ -extern HRESULT DPL_CreateCompoundAddress -( LPCDPCOMPOUNDADDRESSELEMENT lpElements, DWORD dwElementCount, - LPVOID lpAddress, LPDWORD lpdwAddressSize, BOOL bAnsiInterface ); - - -/* Local function prototypes */ -static lpPlayerList DP_FindPlayer( IDirectPlay2AImpl* This, DPID dpid ); -static lpPlayerData DP_CreatePlayer( IDirectPlay2Impl* iface, LPDPID lpid, - LPDPNAME lpName, DWORD dwFlags, - HANDLE hEvent, BOOL bAnsi ); -static BOOL DP_CopyDPNAMEStruct( LPDPNAME lpDst, const DPNAME *lpSrc, BOOL bAnsi ); -static void DP_SetPlayerData( lpPlayerData lpPData, DWORD dwFlags, - LPVOID lpData, DWORD dwDataSize ); - -static lpGroupData DP_CreateGroup( IDirectPlay2AImpl* iface, const DPID *lpid, - const DPNAME *lpName, DWORD dwFlags, - DPID idParent, BOOL bAnsi ); -static void DP_SetGroupData( lpGroupData lpGData, DWORD dwFlags, - LPVOID lpData, DWORD dwDataSize ); -static void DP_DeleteDPNameStruct( LPDPNAME lpDPName ); -static void DP_DeletePlayer( IDirectPlay2Impl* This, DPID dpid ); -static BOOL CALLBACK cbDeletePlayerFromAllGroups( DPID dpId, - DWORD dwPlayerType, - LPCDPNAME lpName, - DWORD dwFlags, - LPVOID lpContext ); -static lpGroupData DP_FindAnyGroup( IDirectPlay2AImpl* This, DPID dpid ); -static BOOL CALLBACK cbRemoveGroupOrPlayer( DPID dpId, DWORD dwPlayerType, - LPCDPNAME lpName, DWORD dwFlags, - LPVOID lpContext ); -static void DP_DeleteGroup( IDirectPlay2Impl* This, DPID dpid ); - -/* Forward declarations of virtual tables */ -static const IDirectPlay2Vtbl directPlay2AVT; -static const IDirectPlay3Vtbl directPlay3AVT; -static const IDirectPlay4Vtbl directPlay4AVT; - -static const IDirectPlay2Vtbl directPlay2WVT; -static const IDirectPlay3Vtbl directPlay3WVT; -static const IDirectPlay4Vtbl directPlay4WVT; - -/* Helper methods for player/group interfaces */ -static HRESULT DP_IF_DeletePlayerFromGroup - ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, DPID idGroup, - DPID idPlayer, BOOL bAnsi ); -static HRESULT DP_IF_CreatePlayer - ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, LPDPID lpidPlayer, - LPDPNAME lpPlayerName, HANDLE hEvent, LPVOID lpData, - DWORD dwDataSize, DWORD dwFlags, BOOL bAnsi ); -static HRESULT DP_IF_DestroyGroup - ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, DPID idGroup, BOOL bAnsi ); -static HRESULT DP_IF_DestroyPlayer - ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, DPID idPlayer, BOOL bAnsi ); -static HRESULT DP_IF_EnumGroupPlayers - ( IDirectPlay2Impl* This, DPID idGroup, LPGUID lpguidInstance, - LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, - LPVOID lpContext, DWORD dwFlags, BOOL bAnsi ); -static HRESULT DP_IF_EnumGroups - ( IDirectPlay2Impl* This, LPGUID lpguidInstance, - LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, - LPVOID lpContext, DWORD dwFlags, BOOL bAnsi ); -static HRESULT DP_IF_EnumPlayers - ( IDirectPlay2Impl* This, LPGUID lpguidInstance, - LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, - LPVOID lpContext, DWORD dwFlags, BOOL bAnsi ); -static HRESULT DP_IF_GetGroupData - ( IDirectPlay2Impl* This, DPID idGroup, LPVOID lpData, - LPDWORD lpdwDataSize, DWORD dwFlags, BOOL bAnsi ); -static HRESULT DP_IF_GetGroupName - ( IDirectPlay2Impl* This, DPID idGroup, LPVOID lpData, - LPDWORD lpdwDataSize, BOOL bAnsi ); -static HRESULT DP_IF_GetPlayerData - ( IDirectPlay2Impl* This, DPID idPlayer, LPVOID lpData, - LPDWORD lpdwDataSize, DWORD dwFlags, BOOL bAnsi ); -static HRESULT DP_IF_GetPlayerName - ( IDirectPlay2Impl* This, DPID idPlayer, LPVOID lpData, - LPDWORD lpdwDataSize, BOOL bAnsi ); -static HRESULT DP_IF_SetGroupName - ( IDirectPlay2Impl* This, DPID idGroup, LPDPNAME lpGroupName, - DWORD dwFlags, BOOL bAnsi ); -static HRESULT DP_IF_SetPlayerData - ( IDirectPlay2Impl* This, DPID idPlayer, LPVOID lpData, - DWORD dwDataSize, DWORD dwFlags, BOOL bAnsi ); -static HRESULT DP_IF_SetPlayerName - ( IDirectPlay2Impl* This, DPID idPlayer, LPDPNAME lpPlayerName, - DWORD dwFlags, BOOL bAnsi ); -static HRESULT DP_IF_AddGroupToGroup - ( IDirectPlay3Impl* This, DPID idParentGroup, DPID idGroup ); -static HRESULT DP_IF_CreateGroup - ( IDirectPlay2AImpl* This, LPVOID lpMsgHdr, LPDPID lpidGroup, - LPDPNAME lpGroupName, LPVOID lpData, DWORD dwDataSize, - DWORD dwFlags, BOOL bAnsi ); -static HRESULT DP_IF_CreateGroupInGroup - ( IDirectPlay3Impl* This, LPVOID lpMsgHdr, DPID idParentGroup, - LPDPID lpidGroup, LPDPNAME lpGroupName, LPVOID lpData, - DWORD dwDataSize, DWORD dwFlags, BOOL bAnsi ); -static HRESULT DP_IF_AddPlayerToGroup - ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, DPID idGroup, - DPID idPlayer, BOOL bAnsi ); -static HRESULT DP_IF_DeleteGroupFromGroup - ( IDirectPlay3Impl* This, DPID idParentGroup, DPID idGroup ); -static HRESULT DP_SetSessionDesc - ( IDirectPlay2Impl* This, LPCDPSESSIONDESC2 lpSessDesc, - DWORD dwFlags, BOOL bInitial, BOOL bAnsi ); -static HRESULT DP_SecureOpen - ( IDirectPlay2Impl* This, LPCDPSESSIONDESC2 lpsd, DWORD dwFlags, - LPCDPSECURITYDESC lpSecurity, LPCDPCREDENTIALS lpCredentials, - BOOL bAnsi ); -static HRESULT DP_SendEx - ( IDirectPlay2Impl* This, DPID idFrom, DPID idTo, DWORD dwFlags, - LPVOID lpData, DWORD dwDataSize, DWORD dwPriority, DWORD dwTimeout, - LPVOID lpContext, LPDWORD lpdwMsgID, BOOL bAnsi ); -static HRESULT DP_IF_Receive - ( IDirectPlay2Impl* This, LPDPID lpidFrom, LPDPID lpidTo, - DWORD dwFlags, LPVOID lpData, LPDWORD lpdwDataSize, BOOL bAnsi ); -static HRESULT DP_IF_GetMessageQueue - ( IDirectPlay4Impl* This, DPID idFrom, DPID idTo, DWORD dwFlags, - LPDWORD lpdwNumMsgs, LPDWORD lpdwNumBytes, BOOL bAnsi ); -static HRESULT DP_SP_SendEx - ( IDirectPlay2Impl* This, DWORD dwFlags, - LPVOID lpData, DWORD dwDataSize, DWORD dwPriority, DWORD dwTimeout, - LPVOID lpContext, LPDWORD lpdwMsgID ); -static HRESULT DP_IF_SetGroupData - ( IDirectPlay2Impl* This, DPID idGroup, LPVOID lpData, - DWORD dwDataSize, DWORD dwFlags, BOOL bAnsi ); -static HRESULT DP_IF_GetPlayerCaps - ( IDirectPlay2Impl* This, DPID idPlayer, LPDPCAPS lpDPCaps, - DWORD dwFlags ); -static HRESULT DP_IF_Close( IDirectPlay2Impl* This, BOOL bAnsi ); -static HRESULT DP_IF_CancelMessage - ( IDirectPlay4Impl* This, DWORD dwMsgID, DWORD dwFlags, - DWORD dwMinPriority, DWORD dwMaxPriority, BOOL bAnsi ); -static HRESULT DP_IF_EnumGroupsInGroup - ( IDirectPlay3AImpl* This, DPID idGroup, LPGUID lpguidInstance, - LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, - LPVOID lpContext, DWORD dwFlags, BOOL bAnsi ); -static HRESULT DP_IF_GetGroupParent - ( IDirectPlay3AImpl* This, DPID idGroup, LPDPID lpidGroup, - BOOL bAnsi ); -static HRESULT DP_IF_GetCaps - ( IDirectPlay2Impl* This, LPDPCAPS lpDPCaps, DWORD dwFlags ); -static HRESULT DP_IF_EnumSessions - ( IDirectPlay2Impl* This, LPDPSESSIONDESC2 lpsd, DWORD dwTimeout, - LPDPENUMSESSIONSCALLBACK2 lpEnumSessionsCallback2, - LPVOID lpContext, DWORD dwFlags, BOOL bAnsi ); -static HRESULT DP_IF_InitializeConnection - ( IDirectPlay3Impl* This, LPVOID lpConnection, DWORD dwFlags, BOOL bAnsi ); -static BOOL CALLBACK cbDPCreateEnumConnections( LPCGUID lpguidSP, - LPVOID lpConnection, DWORD dwConnectionSize, LPCDPNAME lpName, - DWORD dwFlags, LPVOID lpContext ); -static BOOL DP_BuildSPCompoundAddr( LPGUID lpcSpGuid, LPVOID* lplpAddrBuf, - LPDWORD lpdwBufSize ); - - - -static inline DPID DP_NextObjectId(void); -static DPID DP_GetRemoteNextObjectId(void); - -static DWORD DP_CalcSessionDescSize( LPCDPSESSIONDESC2 lpSessDesc, BOOL bAnsi ); -static void DP_CopySessionDesc( LPDPSESSIONDESC2 destSessionDesc, - LPCDPSESSIONDESC2 srcSessDesc, BOOL bAnsi ); - - -static HMODULE DP_LoadSP( LPCGUID lpcGuid, LPSPINITDATA lpSpData, LPBOOL lpbIsDpSp ); -static HRESULT DP_InitializeDPSP( IDirectPlay3Impl* This, HMODULE hServiceProvider ); -static HRESULT DP_InitializeDPLSP( IDirectPlay3Impl* This, HMODULE hServiceProvider ); - - - - - - -#define DPID_NOPARENT_GROUP 0 /* Magic number to indicate no parent of group */ -#define DPID_SYSTEM_GROUP DPID_NOPARENT_GROUP /* If system group is supported - we don't have to change much */ -#define DPID_NAME_SERVER 0x19a9d65b /* Don't ask me why */ - -/* Strip out dwFlag values which cannot be sent in the CREATEGROUP msg */ -#define DPMSG_CREATEGROUP_DWFLAGS(x) ( (x) & DPGROUP_HIDDEN ) - -/* Strip out all dwFlags values for CREATEPLAYER msg */ -#define DPMSG_CREATEPLAYER_DWFLAGS(x) 0 - -static LONG kludgePlayerGroupId = 1000; - -/* ------------------------------------------------------------------ */ - - -static BOOL DP_CreateIUnknown( LPVOID lpDP ) -{ - IDirectPlay2AImpl *This = lpDP; - - This->unk = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *(This->unk) ) ); - if ( This->unk == NULL ) - { - return FALSE; - } - - InitializeCriticalSection( &This->unk->DP_lock ); - This->unk->DP_lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IDirectPlay2AImpl*->DirectPlayIUnknownData*->DP_lock"); - - return TRUE; -} - -static BOOL DP_DestroyIUnknown( LPVOID lpDP ) -{ - IDirectPlay2AImpl *This = lpDP; - - This->unk->DP_lock.DebugInfo->Spare[0] = 0; - DeleteCriticalSection( &This->unk->DP_lock ); - HeapFree( GetProcessHeap(), 0, This->unk ); - - return TRUE; -} - -static BOOL DP_CreateDirectPlay2( LPVOID lpDP ) -{ - IDirectPlay2AImpl *This = lpDP; - - This->dp2 = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *(This->dp2) ) ); - if ( This->dp2 == NULL ) - { - return FALSE; - } - - This->dp2->bConnectionOpen = FALSE; - - This->dp2->hEnumSessionThread = INVALID_HANDLE_VALUE; - This->dp2->dwEnumSessionLock = 0; - - This->dp2->bHostInterface = FALSE; - - DPQ_INIT(This->dp2->receiveMsgs); - DPQ_INIT(This->dp2->sendMsgs); - DPQ_INIT(This->dp2->repliesExpected); - - if( !NS_InitializeSessionCache( &This->dp2->lpNameServerData ) ) - { - /* FIXME: Memory leak */ - return FALSE; - } - - /* Provide an initial session desc with nothing in it */ - This->dp2->lpSessionDesc = HeapAlloc( GetProcessHeap(), - HEAP_ZERO_MEMORY, - sizeof( *This->dp2->lpSessionDesc ) ); - if( This->dp2->lpSessionDesc == NULL ) - { - /* FIXME: Memory leak */ - return FALSE; - } - This->dp2->lpSessionDesc->dwSize = sizeof( *This->dp2->lpSessionDesc ); - - /* We are emulating a dp 6 implementation */ - This->dp2->spData.dwSPVersion = DPSP_MAJORVERSION; - - This->dp2->spData.lpCB = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof( *This->dp2->spData.lpCB ) ); - This->dp2->spData.lpCB->dwSize = sizeof( *This->dp2->spData.lpCB ); - This->dp2->spData.lpCB->dwVersion = DPSP_MAJORVERSION; - - /* This is the pointer to the service provider */ - if( FAILED( DPSP_CreateInterface( &IID_IDirectPlaySP, - (LPVOID*)&This->dp2->spData.lpISP, This ) ) - ) - { - /* FIXME: Memory leak */ - return FALSE; - } - - /* Setup lobby provider information */ - This->dp2->dplspData.dwSPVersion = DPSP_MAJORVERSION; - This->dp2->dplspData.lpCB = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof( *This->dp2->dplspData.lpCB ) ); - This->dp2->dplspData.lpCB->dwSize = sizeof( *This->dp2->dplspData.lpCB ); - - if( FAILED( DPLSP_CreateInterface( &IID_IDPLobbySP, - (LPVOID*)&This->dp2->dplspData.lpISP, This ) ) - ) - { - /* FIXME: Memory leak */ - return FALSE; - } - - return TRUE; -} - -/* Definition of the global function in dplayx_queue.h. # - * FIXME: Would it be better to have a dplayx_queue.c for this function? */ -DPQ_DECL_DELETECB( cbDeleteElemFromHeap, LPVOID ) -{ - HeapFree( GetProcessHeap(), 0, elem ); -} - -static BOOL DP_DestroyDirectPlay2( LPVOID lpDP ) -{ - IDirectPlay2AImpl *This = lpDP; - - if( This->dp2->hEnumSessionThread != INVALID_HANDLE_VALUE ) - { - TerminateThread( This->dp2->hEnumSessionThread, 0 ); - CloseHandle( This->dp2->hEnumSessionThread ); - } - - /* Finish with the SP - have it shutdown */ - if( This->dp2->spData.lpCB->ShutdownEx ) - { - DPSP_SHUTDOWNDATA data; - - TRACE( "Calling SP ShutdownEx\n" ); - - data.lpISP = This->dp2->spData.lpISP; - - (*This->dp2->spData.lpCB->ShutdownEx)( &data ); - } - else if (This->dp2->spData.lpCB->Shutdown ) /* obsolete interface */ - { - TRACE( "Calling obsolete SP Shutdown\n" ); - (*This->dp2->spData.lpCB->Shutdown)(); - } - - /* Unload the SP (if it exists) */ - if( This->dp2->hServiceProvider != 0 ) - { - FreeLibrary( This->dp2->hServiceProvider ); - } - - /* Unload the Lobby Provider (if it exists) */ - if( This->dp2->hDPLobbyProvider != 0 ) - { - FreeLibrary( This->dp2->hDPLobbyProvider ); - } - - /* FIXME: Need to delete receive and send msgs queue contents */ - - NS_DeleteSessionCache( This->dp2->lpNameServerData ); - - HeapFree( GetProcessHeap(), 0, This->dp2->lpSessionDesc ); - - IDirectPlaySP_Release( This->dp2->spData.lpISP ); - - /* Delete the contents */ - HeapFree( GetProcessHeap(), 0, This->dp2 ); - - return TRUE; -} - -static BOOL DP_CreateDirectPlay3( LPVOID lpDP ) -{ - IDirectPlay3AImpl *This = lpDP; - - This->dp3 = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *(This->dp3) ) ); - if ( This->dp3 == NULL ) - { - return FALSE; - } - - return TRUE; -} - -static BOOL DP_DestroyDirectPlay3( LPVOID lpDP ) -{ - IDirectPlay3AImpl *This = lpDP; - - /* Delete the contents */ - HeapFree( GetProcessHeap(), 0, This->dp3 ); - - return TRUE; -} - -static BOOL DP_CreateDirectPlay4( LPVOID lpDP ) -{ - IDirectPlay4AImpl *This = lpDP; - - This->dp4 = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *(This->dp4) ) ); - if ( This->dp4 == NULL ) - { - return FALSE; - } - - return TRUE; -} - -static BOOL DP_DestroyDirectPlay4( LPVOID lpDP ) -{ - IDirectPlay3AImpl *This = lpDP; - - /* Delete the contents */ - HeapFree( GetProcessHeap(), 0, This->dp4 ); - - return TRUE; -} - - -/* Create a new interface */ -HRESULT DP_CreateInterface - ( REFIID riid, LPVOID* ppvObj ) -{ - TRACE( " for %s\n", debugstr_guid( riid ) ); - - *ppvObj = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof( IDirectPlay2Impl ) ); - - if( *ppvObj == NULL ) - { - return DPERR_OUTOFMEMORY; - } - - if( IsEqualGUID( &IID_IDirectPlay2, riid ) ) - { - IDirectPlay2Impl *This = *ppvObj; - This->lpVtbl = &directPlay2WVT; - } - else if( IsEqualGUID( &IID_IDirectPlay2A, riid ) ) - { - IDirectPlay2AImpl *This = *ppvObj; - This->lpVtbl = &directPlay2AVT; - } - else if( IsEqualGUID( &IID_IDirectPlay3, riid ) ) - { - IDirectPlay3Impl *This = *ppvObj; - This->lpVtbl = &directPlay3WVT; - } - else if( IsEqualGUID( &IID_IDirectPlay3A, riid ) ) - { - IDirectPlay3AImpl *This = *ppvObj; - This->lpVtbl = &directPlay3AVT; - } - else if( IsEqualGUID( &IID_IDirectPlay4, riid ) ) - { - IDirectPlay4Impl *This = *ppvObj; - This->lpVtbl = &directPlay4WVT; - } - else if( IsEqualGUID( &IID_IDirectPlay4A, riid ) ) - { - IDirectPlay4AImpl *This = *ppvObj; - This->lpVtbl = &directPlay4AVT; - } - else - { - /* Unsupported interface */ - HeapFree( GetProcessHeap(), 0, *ppvObj ); - *ppvObj = NULL; - - return E_NOINTERFACE; - } - - /* Initialize it */ - if ( DP_CreateIUnknown( *ppvObj ) && - DP_CreateDirectPlay2( *ppvObj ) && - DP_CreateDirectPlay3( *ppvObj ) && - DP_CreateDirectPlay4( *ppvObj ) - ) - { - IDirectPlayX_AddRef( (LPDIRECTPLAY2A)*ppvObj ); - - return S_OK; - } - - /* Initialize failed, destroy it */ - DP_DestroyDirectPlay4( *ppvObj ); - DP_DestroyDirectPlay3( *ppvObj ); - DP_DestroyDirectPlay2( *ppvObj ); - DP_DestroyIUnknown( *ppvObj ); - - HeapFree( GetProcessHeap(), 0, *ppvObj ); - - *ppvObj = NULL; - return DPERR_NOMEMORY; -} - - -/* Direct Play methods */ - -/* Shared between all dplay types */ -static HRESULT WINAPI DP_QueryInterface - ( LPDIRECTPLAY2 iface, REFIID riid, LPVOID* ppvObj ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - TRACE("(%p)->(%s,%p)\n", This, debugstr_guid( riid ), ppvObj ); - - *ppvObj = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof( *This ) ); - - if( *ppvObj == NULL ) - { - return DPERR_OUTOFMEMORY; - } - - CopyMemory( *ppvObj, This, sizeof( *This ) ); - (*(IDirectPlay2Impl**)ppvObj)->ulInterfaceRef = 0; - - if( IsEqualGUID( &IID_IDirectPlay2, riid ) ) - { - IDirectPlay2Impl *This = *ppvObj; - This->lpVtbl = &directPlay2WVT; - } - else if( IsEqualGUID( &IID_IDirectPlay2A, riid ) ) - { - IDirectPlay2AImpl *This = *ppvObj; - This->lpVtbl = &directPlay2AVT; - } - else if( IsEqualGUID( &IID_IDirectPlay3, riid ) ) - { - IDirectPlay3Impl *This = *ppvObj; - This->lpVtbl = &directPlay3WVT; - } - else if( IsEqualGUID( &IID_IDirectPlay3A, riid ) ) - { - IDirectPlay3AImpl *This = *ppvObj; - This->lpVtbl = &directPlay3AVT; - } - else if( IsEqualGUID( &IID_IDirectPlay4, riid ) ) - { - IDirectPlay4Impl *This = *ppvObj; - This->lpVtbl = &directPlay4WVT; - } - else if( IsEqualGUID( &IID_IDirectPlay4A, riid ) ) - { - IDirectPlay4AImpl *This = *ppvObj; - This->lpVtbl = &directPlay4AVT; - } - else - { - /* Unsupported interface */ - HeapFree( GetProcessHeap(), 0, *ppvObj ); - *ppvObj = NULL; - - return E_NOINTERFACE; - } - - IDirectPlayX_AddRef( (LPDIRECTPLAY2)*ppvObj ); - - return S_OK; -} - -/* Shared between all dplay types */ -static ULONG WINAPI DP_AddRef - ( LPDIRECTPLAY3 iface ) -{ - ULONG ulInterfaceRefCount, ulObjRefCount; - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - - ulObjRefCount = InterlockedIncrement( &This->unk->ulObjRef ); - ulInterfaceRefCount = InterlockedIncrement( &This->ulInterfaceRef ); - - TRACE( "ref count incremented to %u:%u for %p\n", - ulInterfaceRefCount, ulObjRefCount, This ); - - return ulObjRefCount; -} - -static ULONG WINAPI DP_Release -( LPDIRECTPLAY3 iface ) -{ - ULONG ulInterfaceRefCount, ulObjRefCount; - - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - - ulObjRefCount = InterlockedDecrement( &This->unk->ulObjRef ); - ulInterfaceRefCount = InterlockedDecrement( &This->ulInterfaceRef ); - - TRACE( "ref count decremented to %u:%u for %p\n", - ulInterfaceRefCount, ulObjRefCount, This ); - - /* Deallocate if this is the last reference to the object */ - if( ulObjRefCount == 0 ) - { - /* If we're destroying the object, this must be the last ref - of the last interface */ - DP_DestroyDirectPlay4( This ); - DP_DestroyDirectPlay3( This ); - DP_DestroyDirectPlay2( This ); - DP_DestroyIUnknown( This ); - } - - /* Deallocate the interface */ - if( ulInterfaceRefCount == 0 ) - { - HeapFree( GetProcessHeap(), 0, This ); - } - - return ulObjRefCount; -} - -static inline DPID DP_NextObjectId(void) -{ - return (DPID)InterlockedIncrement( &kludgePlayerGroupId ); -} - -/* *lplpReply will be non NULL iff there is something to reply */ -HRESULT DP_HandleMessage( IDirectPlay2Impl* This, LPCVOID lpcMessageBody, - DWORD dwMessageBodySize, LPCVOID lpcMessageHeader, - WORD wCommandId, WORD wVersion, - LPVOID* lplpReply, LPDWORD lpdwMsgSize ) -{ - TRACE( "(%p)->(%p,0x%08x,%p,%u,%u)\n", - This, lpcMessageBody, dwMessageBodySize, lpcMessageHeader, wCommandId, - wVersion ); - - switch( wCommandId ) - { - /* Name server needs to handle this request */ - case DPMSGCMD_ENUMSESSIONSREQUEST: - /* Reply expected */ - NS_ReplyToEnumSessionsRequest( lpcMessageBody, lplpReply, lpdwMsgSize, This ); - break; - - /* Name server needs to handle this request */ - case DPMSGCMD_ENUMSESSIONSREPLY: - /* No reply expected */ - NS_AddRemoteComputerAsNameServer( lpcMessageHeader, - This->dp2->spData.dwSPHeaderSize, - lpcMessageBody, - This->dp2->lpNameServerData ); - break; - - case DPMSGCMD_REQUESTNEWPLAYERID: - { - LPCDPMSG_REQUESTNEWPLAYERID lpcMsg = lpcMessageBody; - - LPDPMSG_NEWPLAYERIDREPLY lpReply; - - *lpdwMsgSize = This->dp2->spData.dwSPHeaderSize + sizeof( *lpReply ); - - *lplpReply = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, *lpdwMsgSize ); - - FIXME( "Ignoring dwFlags 0x%08x in request msg\n", - lpcMsg->dwFlags ); - - /* Setup the reply */ - lpReply = (LPDPMSG_NEWPLAYERIDREPLY)( (BYTE*)(*lplpReply) + - This->dp2->spData.dwSPHeaderSize ); - - lpReply->envelope.dwMagic = DPMSGMAGIC_DPLAYMSG; - lpReply->envelope.wCommandId = DPMSGCMD_NEWPLAYERIDREPLY; - lpReply->envelope.wVersion = DPMSGVER_DP6; - - lpReply->dpidNewPlayerId = DP_NextObjectId(); - - TRACE( "Allocating new playerid 0x%08x from remote request\n", - lpReply->dpidNewPlayerId ); - break; - } - - case DPMSGCMD_GETNAMETABLEREPLY: - case DPMSGCMD_NEWPLAYERIDREPLY: -#if 0 - if( wCommandId == DPMSGCMD_NEWPLAYERIDREPLY ) - DebugBreak(); -#endif - DP_MSG_ReplyReceived( This, wCommandId, lpcMessageBody, dwMessageBodySize ); - break; - -#if 1 - case DPMSGCMD_JUSTENVELOPE: - TRACE( "GOT THE SELF MESSAGE: %p -> 0x%08x\n", lpcMessageHeader, ((const DWORD *)lpcMessageHeader)[1] ); - NS_SetLocalAddr( This->dp2->lpNameServerData, lpcMessageHeader, 20 ); - DP_MSG_ReplyReceived( This, wCommandId, lpcMessageBody, dwMessageBodySize ); -#endif - - case DPMSGCMD_FORWARDADDPLAYER: -#if 0 - DebugBreak(); -#endif -#if 1 - TRACE( "Sending message to self to get my addr\n" ); - DP_MSG_ToSelf( This, 1 ); /* This is a hack right now */ -#endif - break; - - case DPMSGCMD_FORWARDADDPLAYERNACK: - DP_MSG_ErrorReceived( This, wCommandId, lpcMessageBody, dwMessageBodySize ); - break; - - default: - FIXME( "Unknown wCommandId %u. Ignoring message\n", wCommandId ); - DebugBreak(); - break; - } - - /* FIXME: There is code in dplaysp.c to handle dplay commands. Move to here. */ - - return DP_OK; -} - - -static HRESULT DP_IF_AddPlayerToGroup - ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, DPID idGroup, - DPID idPlayer, BOOL bAnsi ) -{ - lpGroupData lpGData; - lpPlayerList lpPList; - lpPlayerList lpNewPList; - - TRACE( "(%p)->(%p,0x%08x,0x%08x,%u)\n", - This, lpMsgHdr, idGroup, idPlayer, bAnsi ); - - if( This->dp2->connectionInitialized == NO_PROVIDER ) - { - return DPERR_UNINITIALIZED; - } - - /* Find the group */ - if( ( lpGData = DP_FindAnyGroup( This, idGroup ) ) == NULL ) - { - return DPERR_INVALIDGROUP; - } - - /* Find the player */ - if( ( lpPList = DP_FindPlayer( This, idPlayer ) ) == NULL ) - { - return DPERR_INVALIDPLAYER; - } - - /* Create a player list (ie "shortcut" ) */ - lpNewPList = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *lpNewPList ) ); - if( lpNewPList == NULL ) - { - return DPERR_CANTADDPLAYER; - } - - /* Add the shortcut */ - lpPList->lpPData->uRef++; - lpNewPList->lpPData = lpPList->lpPData; - - /* Add the player to the list of players for this group */ - DPQ_INSERT(lpGData->players,lpNewPList,players); - - /* Let the SP know that we've added a player to the group */ - if( This->dp2->spData.lpCB->AddPlayerToGroup ) - { - DPSP_ADDPLAYERTOGROUPDATA data; - - TRACE( "Calling SP AddPlayerToGroup\n" ); - - data.idPlayer = idPlayer; - data.idGroup = idGroup; - data.lpISP = This->dp2->spData.lpISP; - - (*This->dp2->spData.lpCB->AddPlayerToGroup)( &data ); - } - - /* Inform all other peers of the addition of player to the group. If there are - * no peers keep this event quiet. - * Also, if this event was the result of another machine sending it to us, - * don't bother rebroadcasting it. - */ - if( ( lpMsgHdr == NULL ) && - This->dp2->lpSessionDesc && - ( This->dp2->lpSessionDesc->dwFlags & DPSESSION_MULTICASTSERVER ) ) - { - DPMSG_ADDPLAYERTOGROUP msg; - msg.dwType = DPSYS_ADDPLAYERTOGROUP; - - msg.dpIdGroup = idGroup; - msg.dpIdPlayer = idPlayer; - - /* FIXME: Correct to just use send effectively? */ - /* FIXME: Should size include data w/ message or just message "header" */ - /* FIXME: Check return code */ - DP_SendEx( This, DPID_SERVERPLAYER, DPID_ALLPLAYERS, 0, &msg, sizeof( msg ), 0, 0, NULL, NULL, bAnsi ); - } - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay2AImpl_AddPlayerToGroup - ( LPDIRECTPLAY2A iface, DPID idGroup, DPID idPlayer ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_AddPlayerToGroup( This, NULL, idGroup, idPlayer, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_AddPlayerToGroup - ( LPDIRECTPLAY2 iface, DPID idGroup, DPID idPlayer ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_AddPlayerToGroup( This, NULL, idGroup, idPlayer, FALSE ); -} - -static HRESULT DP_IF_Close( IDirectPlay2Impl* This, BOOL bAnsi ) -{ - HRESULT hr = DP_OK; - - TRACE("(%p)->(%u)\n", This, bAnsi ); - - /* FIXME: Need to find a new host I assume (how?) */ - /* FIXME: Need to destroy all local groups */ - /* FIXME: Need to migrate all remotely visible players to the new host */ - - /* Invoke the SP callback to inform of session close */ - if( This->dp2->spData.lpCB->CloseEx ) - { - DPSP_CLOSEDATA data; - - TRACE( "Calling SP CloseEx\n" ); - - data.lpISP = This->dp2->spData.lpISP; - - hr = (*This->dp2->spData.lpCB->CloseEx)( &data ); - - } - else if ( This->dp2->spData.lpCB->Close ) /* Try obsolete version */ - { - TRACE( "Calling SP Close (obsolete interface)\n" ); - - hr = (*This->dp2->spData.lpCB->Close)(); - } - - return hr; -} - -static HRESULT WINAPI DirectPlay2AImpl_Close - ( LPDIRECTPLAY2A iface ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_Close( This, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_Close - ( LPDIRECTPLAY2 iface ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_Close( This, FALSE ); -} - -static -lpGroupData DP_CreateGroup( IDirectPlay2AImpl* This, const DPID *lpid, - const DPNAME *lpName, DWORD dwFlags, - DPID idParent, BOOL bAnsi ) -{ - lpGroupData lpGData; - - /* Allocate the new space and add to end of high level group list */ - lpGData = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *lpGData ) ); - - if( lpGData == NULL ) - { - return NULL; - } - - DPQ_INIT(lpGData->groups); - DPQ_INIT(lpGData->players); - - /* Set the desired player ID - no sanity checking to see if it exists */ - lpGData->dpid = *lpid; - - DP_CopyDPNAMEStruct( &lpGData->name, lpName, bAnsi ); - - /* FIXME: Should we check that the parent exists? */ - lpGData->parent = idParent; - - /* FIXME: Should we validate the dwFlags? */ - lpGData->dwFlags = dwFlags; - - TRACE( "Created group id 0x%08x\n", *lpid ); - - return lpGData; -} - -/* This method assumes that all links to it are already deleted */ -static void -DP_DeleteGroup( IDirectPlay2Impl* This, DPID dpid ) -{ - lpGroupList lpGList; - - TRACE( "(%p)->(0x%08x)\n", This, dpid ); - - DPQ_REMOVE_ENTRY( This->dp2->lpSysGroup->groups, groups, lpGData->dpid, ==, dpid, lpGList ); - - if( lpGList == NULL ) - { - ERR( "DPID 0x%08x not found\n", dpid ); - return; - } - - if( --(lpGList->lpGData->uRef) ) - { - FIXME( "Why is this not the last reference to group?\n" ); - DebugBreak(); - } - - /* Delete player */ - DP_DeleteDPNameStruct( &lpGList->lpGData->name ); - HeapFree( GetProcessHeap(), 0, lpGList->lpGData ); - - /* Remove and Delete Player List object */ - HeapFree( GetProcessHeap(), 0, lpGList ); - -} - -static lpGroupData DP_FindAnyGroup( IDirectPlay2AImpl* This, DPID dpid ) -{ - lpGroupList lpGroups; - - TRACE( "(%p)->(0x%08x)\n", This, dpid ); - - if( dpid == DPID_SYSTEM_GROUP ) - { - return This->dp2->lpSysGroup; - } - else - { - DPQ_FIND_ENTRY( This->dp2->lpSysGroup->groups, groups, lpGData->dpid, ==, dpid, lpGroups ); - } - - if( lpGroups == NULL ) - { - return NULL; - } - - return lpGroups->lpGData; -} - -static HRESULT DP_IF_CreateGroup - ( IDirectPlay2AImpl* This, LPVOID lpMsgHdr, LPDPID lpidGroup, - LPDPNAME lpGroupName, LPVOID lpData, DWORD dwDataSize, - DWORD dwFlags, BOOL bAnsi ) -{ - lpGroupData lpGData; - - TRACE( "(%p)->(%p,%p,%p,%p,0x%08x,0x%08x,%u)\n", - This, lpMsgHdr, lpidGroup, lpGroupName, lpData, dwDataSize, - dwFlags, bAnsi ); - - if( This->dp2->connectionInitialized == NO_PROVIDER ) - { - return DPERR_UNINITIALIZED; - } - - /* If the name is not specified, we must provide one */ - if( DPID_UNKNOWN == *lpidGroup ) - { - /* If we are the name server, we decide on the group ids. If not, we - * must ask for one before attempting a creation. - */ - if( This->dp2->bHostInterface ) - { - *lpidGroup = DP_NextObjectId(); - } - else - { - *lpidGroup = DP_GetRemoteNextObjectId(); - } - } - - lpGData = DP_CreateGroup( This, lpidGroup, lpGroupName, dwFlags, - DPID_NOPARENT_GROUP, bAnsi ); - - if( lpGData == NULL ) - { - return DPERR_CANTADDPLAYER; /* yes player not group */ - } - - if( DPID_SYSTEM_GROUP == *lpidGroup ) - { - This->dp2->lpSysGroup = lpGData; - TRACE( "Inserting system group\n" ); - } - else - { - /* Insert into the system group */ - lpGroupList lpGroup = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *lpGroup ) ); - lpGroup->lpGData = lpGData; - - DPQ_INSERT( This->dp2->lpSysGroup->groups, lpGroup, groups ); - } - - /* Something is now referencing this data */ - lpGData->uRef++; - - /* Set all the important stuff for the group */ - DP_SetGroupData( lpGData, DPSET_REMOTE, lpData, dwDataSize ); - - /* FIXME: We should only create the system group if GetCaps returns - * DPCAPS_GROUPOPTIMIZED. - */ - - /* Let the SP know that we've created this group */ - if( This->dp2->spData.lpCB->CreateGroup ) - { - DPSP_CREATEGROUPDATA data; - DWORD dwCreateFlags = 0; - - TRACE( "Calling SP CreateGroup\n" ); - - if( *lpidGroup == DPID_NOPARENT_GROUP ) - dwCreateFlags |= DPLAYI_GROUP_SYSGROUP; - - if( lpMsgHdr == NULL ) - dwCreateFlags |= DPLAYI_PLAYER_PLAYERLOCAL; - - if( dwFlags & DPGROUP_HIDDEN ) - dwCreateFlags |= DPLAYI_GROUP_HIDDEN; - - data.idGroup = *lpidGroup; - data.dwFlags = dwCreateFlags; - data.lpSPMessageHeader = lpMsgHdr; - data.lpISP = This->dp2->spData.lpISP; - - (*This->dp2->spData.lpCB->CreateGroup)( &data ); - } - - /* Inform all other peers of the creation of a new group. If there are - * no peers keep this event quiet. - * Also if this message was sent to us, don't rebroadcast. - */ - if( ( lpMsgHdr == NULL ) && - This->dp2->lpSessionDesc && - ( This->dp2->lpSessionDesc->dwFlags & DPSESSION_MULTICASTSERVER ) ) - { - DPMSG_CREATEPLAYERORGROUP msg; - msg.dwType = DPSYS_CREATEPLAYERORGROUP; - - msg.dwPlayerType = DPPLAYERTYPE_GROUP; - msg.dpId = *lpidGroup; - msg.dwCurrentPlayers = 0; /* FIXME: Incorrect? */ - msg.lpData = lpData; - msg.dwDataSize = dwDataSize; - msg.dpnName = *lpGroupName; - msg.dpIdParent = DPID_NOPARENT_GROUP; - msg.dwFlags = DPMSG_CREATEGROUP_DWFLAGS( dwFlags ); - - /* FIXME: Correct to just use send effectively? */ - /* FIXME: Should size include data w/ message or just message "header" */ - /* FIXME: Check return code */ - DP_SendEx( This, DPID_SERVERPLAYER, DPID_ALLPLAYERS, 0, &msg, sizeof( msg ), - 0, 0, NULL, NULL, bAnsi ); - } - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay2AImpl_CreateGroup - ( LPDIRECTPLAY2A iface, LPDPID lpidGroup, LPDPNAME lpGroupName, - LPVOID lpData, DWORD dwDataSize, DWORD dwFlags ) -{ - *lpidGroup = DPID_UNKNOWN; - - return DP_IF_CreateGroup( (IDirectPlay2AImpl*)iface, NULL, lpidGroup, - lpGroupName, lpData, dwDataSize, dwFlags, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_CreateGroup - ( LPDIRECTPLAY2 iface, LPDPID lpidGroup, LPDPNAME lpGroupName, - LPVOID lpData, DWORD dwDataSize, DWORD dwFlags ) -{ - *lpidGroup = DPID_UNKNOWN; - - return DP_IF_CreateGroup( (IDirectPlay2AImpl*)iface, NULL, lpidGroup, - lpGroupName, lpData, dwDataSize, dwFlags, FALSE ); -} - - -static void -DP_SetGroupData( lpGroupData lpGData, DWORD dwFlags, - LPVOID lpData, DWORD dwDataSize ) -{ - /* Clear out the data with this player */ - if( dwFlags & DPSET_LOCAL ) - { - if ( lpGData->dwLocalDataSize != 0 ) - { - HeapFree( GetProcessHeap(), 0, lpGData->lpLocalData ); - lpGData->lpLocalData = NULL; - lpGData->dwLocalDataSize = 0; - } - } - else - { - if( lpGData->dwRemoteDataSize != 0 ) - { - HeapFree( GetProcessHeap(), 0, lpGData->lpRemoteData ); - lpGData->lpRemoteData = NULL; - lpGData->dwRemoteDataSize = 0; - } - } - - /* Reallocate for new data */ - if( lpData != NULL ) - { - if( dwFlags & DPSET_LOCAL ) - { - lpGData->lpLocalData = lpData; - lpGData->dwLocalDataSize = dwDataSize; - } - else - { - lpGData->lpRemoteData = HeapAlloc( GetProcessHeap(), 0, dwDataSize ); - CopyMemory( lpGData->lpRemoteData, lpData, dwDataSize ); - lpGData->dwRemoteDataSize = dwDataSize; - } - } - -} - -/* This function will just create the storage for the new player. */ -static -lpPlayerData DP_CreatePlayer( IDirectPlay2Impl* This, LPDPID lpid, - LPDPNAME lpName, DWORD dwFlags, - HANDLE hEvent, BOOL bAnsi ) -{ - lpPlayerData lpPData; - - TRACE( "(%p)->(%p,%p,%u)\n", This, lpid, lpName, bAnsi ); - - /* Allocate the storage for the player and associate it with list element */ - lpPData = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *lpPData ) ); - if( lpPData == NULL ) - { - return NULL; - } - - /* Set the desired player ID */ - lpPData->dpid = *lpid; - - DP_CopyDPNAMEStruct( &lpPData->name, lpName, bAnsi ); - - lpPData->dwFlags = dwFlags; - - /* If we were given an event handle, duplicate it */ - if( hEvent != 0 ) - { - if( !DuplicateHandle( GetCurrentProcess(), hEvent, - GetCurrentProcess(), &lpPData->hEvent, - 0, FALSE, DUPLICATE_SAME_ACCESS ) - ) - { - /* FIXME: Memory leak */ - ERR( "Can't duplicate player msg handle %p\n", hEvent ); - } - } - - /* Initialize the SP data section */ - lpPData->lpSPPlayerData = DPSP_CreateSPPlayerData(); - - TRACE( "Created player id 0x%08x\n", *lpid ); - - if( ~dwFlags & DPLAYI_PLAYER_SYSPLAYER ) - This->dp2->lpSessionDesc->dwCurrentPlayers++; - - return lpPData; -} - -/* Delete the contents of the DPNAME struct */ -static void -DP_DeleteDPNameStruct( LPDPNAME lpDPName ) -{ - HeapFree( GetProcessHeap(), HEAP_ZERO_MEMORY, lpDPName->u1.lpszShortNameA ); - HeapFree( GetProcessHeap(), HEAP_ZERO_MEMORY, lpDPName->u2.lpszLongNameA ); -} - -/* This method assumes that all links to it are already deleted */ -static void -DP_DeletePlayer( IDirectPlay2Impl* This, DPID dpid ) -{ - lpPlayerList lpPList; - - TRACE( "(%p)->(0x%08x)\n", This, dpid ); - - DPQ_REMOVE_ENTRY( This->dp2->lpSysGroup->players, players, lpPData->dpid, ==, dpid, lpPList ); - - if( lpPList == NULL ) - { - ERR( "DPID 0x%08x not found\n", dpid ); - return; - } - - /* Verify that this is the last reference to the data */ - if( --(lpPList->lpPData->uRef) ) - { - FIXME( "Why is this not the last reference to player?\n" ); - DebugBreak(); - } - - /* Delete player */ - DP_DeleteDPNameStruct( &lpPList->lpPData->name ); - - CloseHandle( lpPList->lpPData->hEvent ); - HeapFree( GetProcessHeap(), 0, lpPList->lpPData ); - - /* Delete Player List object */ - HeapFree( GetProcessHeap(), 0, lpPList ); -} - -static lpPlayerList DP_FindPlayer( IDirectPlay2AImpl* This, DPID dpid ) -{ - lpPlayerList lpPlayers; - - TRACE( "(%p)->(0x%08x)\n", This, dpid ); - - if(This->dp2->lpSysGroup == NULL) - return NULL; - - DPQ_FIND_ENTRY( This->dp2->lpSysGroup->players, players, lpPData->dpid, ==, dpid, lpPlayers ); - - return lpPlayers; -} - -/* Basic area for Dst must already be allocated */ -static BOOL DP_CopyDPNAMEStruct( LPDPNAME lpDst, const DPNAME *lpSrc, BOOL bAnsi ) -{ - if( lpSrc == NULL ) - { - ZeroMemory( lpDst, sizeof( *lpDst ) ); - lpDst->dwSize = sizeof( *lpDst ); - return TRUE; - } - - if( lpSrc->dwSize != sizeof( *lpSrc) ) - { - return FALSE; - } - - /* Delete any existing pointers */ - HeapFree( GetProcessHeap(), 0, lpDst->u1.lpszShortNameA ); - HeapFree( GetProcessHeap(), 0, lpDst->u2.lpszLongNameA ); - - /* Copy as required */ - CopyMemory( lpDst, lpSrc, lpSrc->dwSize ); - - if( bAnsi ) - { - if( lpSrc->u1.lpszShortNameA ) - { - lpDst->u1.lpszShortNameA = HeapAlloc( GetProcessHeap(), 0, - strlen(lpSrc->u1.lpszShortNameA)+1 ); - strcpy( lpDst->u1.lpszShortNameA, lpSrc->u1.lpszShortNameA ); - } - if( lpSrc->u2.lpszLongNameA ) - { - lpDst->u2.lpszLongNameA = HeapAlloc( GetProcessHeap(), 0, - strlen(lpSrc->u2.lpszLongNameA)+1 ); - strcpy( lpDst->u2.lpszLongNameA, lpSrc->u2.lpszLongNameA ); - } - } - else - { - if( lpSrc->u1.lpszShortNameA ) - { - lpDst->u1.lpszShortName = HeapAlloc( GetProcessHeap(), 0, - (strlenW(lpSrc->u1.lpszShortName)+1)*sizeof(WCHAR) ); - strcpyW( lpDst->u1.lpszShortName, lpSrc->u1.lpszShortName ); - } - if( lpSrc->u2.lpszLongNameA ) - { - lpDst->u2.lpszLongName = HeapAlloc( GetProcessHeap(), 0, - (strlenW(lpSrc->u2.lpszLongName)+1)*sizeof(WCHAR) ); - strcpyW( lpDst->u2.lpszLongName, lpSrc->u2.lpszLongName ); - } - } - - return TRUE; -} - -static void -DP_SetPlayerData( lpPlayerData lpPData, DWORD dwFlags, - LPVOID lpData, DWORD dwDataSize ) -{ - /* Clear out the data with this player */ - if( dwFlags & DPSET_LOCAL ) - { - if ( lpPData->dwLocalDataSize != 0 ) - { - HeapFree( GetProcessHeap(), 0, lpPData->lpLocalData ); - lpPData->lpLocalData = NULL; - lpPData->dwLocalDataSize = 0; - } - } - else - { - if( lpPData->dwRemoteDataSize != 0 ) - { - HeapFree( GetProcessHeap(), 0, lpPData->lpRemoteData ); - lpPData->lpRemoteData = NULL; - lpPData->dwRemoteDataSize = 0; - } - } - - /* Reallocate for new data */ - if( lpData != NULL ) - { - - if( dwFlags & DPSET_LOCAL ) - { - lpPData->lpLocalData = lpData; - lpPData->dwLocalDataSize = dwDataSize; - } - else - { - lpPData->lpRemoteData = HeapAlloc( GetProcessHeap(), 0, dwDataSize ); - CopyMemory( lpPData->lpRemoteData, lpData, dwDataSize ); - lpPData->dwRemoteDataSize = dwDataSize; - } - } - -} - -static HRESULT DP_IF_CreatePlayer -( IDirectPlay2Impl* This, - LPVOID lpMsgHdr, /* NULL for local creation, non NULL for remote creation */ - LPDPID lpidPlayer, - LPDPNAME lpPlayerName, - HANDLE hEvent, - LPVOID lpData, - DWORD dwDataSize, - DWORD dwFlags, - BOOL bAnsi ) -{ - HRESULT hr = DP_OK; - lpPlayerData lpPData; - lpPlayerList lpPList; - DWORD dwCreateFlags = 0; - - TRACE( "(%p)->(%p,%p,%p,%p,0x%08x,0x%08x,%u)\n", - This, lpidPlayer, lpPlayerName, hEvent, lpData, - dwDataSize, dwFlags, bAnsi ); - if( This->dp2->connectionInitialized == NO_PROVIDER ) - { - return DPERR_UNINITIALIZED; - } - - if( dwFlags == 0 ) - { - dwFlags = DPPLAYER_SPECTATOR; - } - - if( lpidPlayer == NULL ) - { - return DPERR_INVALIDPARAMS; - } - - - /* Determine the creation flags for the player. These will be passed - * to the name server if requesting a player id and to the SP when - * informing it of the player creation - */ - { - if( dwFlags & DPPLAYER_SERVERPLAYER ) - { - if( *lpidPlayer == DPID_SERVERPLAYER ) - { - /* Server player for the host interface */ - dwCreateFlags |= DPLAYI_PLAYER_APPSERVER; - } - else if( *lpidPlayer == DPID_NAME_SERVER ) - { - /* Name server - master of everything */ - dwCreateFlags |= (DPLAYI_PLAYER_NAMESRVR|DPLAYI_PLAYER_SYSPLAYER); - } - else - { - /* Server player for a non host interface */ - dwCreateFlags |= DPLAYI_PLAYER_SYSPLAYER; - } - } - - if( lpMsgHdr == NULL ) - dwCreateFlags |= DPLAYI_PLAYER_PLAYERLOCAL; - } - - /* Verify we know how to handle all the flags */ - if( !( ( dwFlags & DPPLAYER_SERVERPLAYER ) || - ( dwFlags & DPPLAYER_SPECTATOR ) - ) - ) - { - /* Assume non fatal failure */ - ERR( "unknown dwFlags = 0x%08x\n", dwFlags ); - } - - /* If the name is not specified, we must provide one */ - if( *lpidPlayer == DPID_UNKNOWN ) - { - /* If we are the session master, we dish out the group/player ids */ - if( This->dp2->bHostInterface ) - { - *lpidPlayer = DP_NextObjectId(); - } - else - { - hr = DP_MSG_SendRequestPlayerId( This, dwCreateFlags, lpidPlayer ); - - if( FAILED(hr) ) - { - ERR( "Request for ID failed: %s\n", DPLAYX_HresultToString( hr ) ); - return hr; - } - } - } - else - { - /* FIXME: Would be nice to perhaps verify that we don't already have - * this player. - */ - } - - /* We pass creation flags, so we can distinguish sysplayers and not count them in the current - player total */ - lpPData = DP_CreatePlayer( This, lpidPlayer, lpPlayerName, dwCreateFlags, - hEvent, bAnsi ); - - if( lpPData == NULL ) - { - return DPERR_CANTADDPLAYER; - } - - /* Create the list object and link it in */ - lpPList = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *lpPList ) ); - if( lpPList == NULL ) - { - FIXME( "Memory leak\n" ); - return DPERR_CANTADDPLAYER; - } - - lpPData->uRef = 1; - lpPList->lpPData = lpPData; - - /* Add the player to the system group */ - DPQ_INSERT( This->dp2->lpSysGroup->players, lpPList, players ); - - /* Update the information and send it to all players in the session */ - DP_SetPlayerData( lpPData, DPSET_REMOTE, lpData, dwDataSize ); - - /* Let the SP know that we've created this player */ - if( This->dp2->spData.lpCB->CreatePlayer ) - { - DPSP_CREATEPLAYERDATA data; - - data.idPlayer = *lpidPlayer; - data.dwFlags = dwCreateFlags; - data.lpSPMessageHeader = lpMsgHdr; - data.lpISP = This->dp2->spData.lpISP; - - TRACE( "Calling SP CreatePlayer 0x%08x: dwFlags: 0x%08x lpMsgHdr: %p\n", - *lpidPlayer, data.dwFlags, data.lpSPMessageHeader ); - - hr = (*This->dp2->spData.lpCB->CreatePlayer)( &data ); - } - - if( FAILED(hr) ) - { - ERR( "Failed to create player with sp: %s\n", DPLAYX_HresultToString(hr) ); - return hr; - } - - /* Now let the SP know that this player is a member of the system group */ - if( This->dp2->spData.lpCB->AddPlayerToGroup ) - { - DPSP_ADDPLAYERTOGROUPDATA data; - - data.idPlayer = *lpidPlayer; - data.idGroup = DPID_SYSTEM_GROUP; - data.lpISP = This->dp2->spData.lpISP; - - TRACE( "Calling SP AddPlayerToGroup (sys group)\n" ); - - hr = (*This->dp2->spData.lpCB->AddPlayerToGroup)( &data ); - } - - if( FAILED(hr) ) - { - ERR( "Failed to add player to sys group with sp: %s\n", - DPLAYX_HresultToString(hr) ); - return hr; - } - -#if 1 - if( This->dp2->bHostInterface == FALSE ) - { - /* Let the name server know about the creation of this player */ - /* FIXME: Is this only to be done for the creation of a server player or - * is this used for regular players? If only for server players, move - * this call to DP_SecureOpen(...); - */ -#if 0 - TRACE( "Sending message to self to get my addr\n" ); - DP_MSG_ToSelf( This, *lpidPlayer ); /* This is a hack right now */ -#endif - - hr = DP_MSG_ForwardPlayerCreation( This, *lpidPlayer); - } -#else - /* Inform all other peers of the creation of a new player. If there are - * no peers keep this quiet. - * Also, if this was a remote event, no need to rebroadcast it. - */ - if( ( lpMsgHdr == NULL ) && - This->dp2->lpSessionDesc && - ( This->dp2->lpSessionDesc->dwFlags & DPSESSION_MULTICASTSERVER ) ) - { - DPMSG_CREATEPLAYERORGROUP msg; - msg.dwType = DPSYS_CREATEPLAYERORGROUP; - - msg.dwPlayerType = DPPLAYERTYPE_PLAYER; - msg.dpId = *lpidPlayer; - msg.dwCurrentPlayers = 0; /* FIXME: Incorrect */ - msg.lpData = lpData; - msg.dwDataSize = dwDataSize; - msg.dpnName = *lpPlayerName; - msg.dpIdParent = DPID_NOPARENT_GROUP; - msg.dwFlags = DPMSG_CREATEPLAYER_DWFLAGS( dwFlags ); - - /* FIXME: Correct to just use send effectively? */ - /* FIXME: Should size include data w/ message or just message "header" */ - /* FIXME: Check return code */ - hr = DP_SendEx( This, DPID_SERVERPLAYER, DPID_ALLPLAYERS, 0, &msg, - sizeof( msg ), 0, 0, NULL, NULL, bAnsi ); - } -#endif - - return hr; -} - -static HRESULT WINAPI DirectPlay2AImpl_CreatePlayer - ( LPDIRECTPLAY2A iface, LPDPID lpidPlayer, LPDPNAME lpPlayerName, - HANDLE hEvent, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - - if( lpidPlayer == NULL ) - { - return DPERR_INVALIDPARAMS; - } - - if( dwFlags & DPPLAYER_SERVERPLAYER ) - { - *lpidPlayer = DPID_SERVERPLAYER; - } - else - { - *lpidPlayer = DPID_UNKNOWN; - } - - return DP_IF_CreatePlayer( This, NULL, lpidPlayer, lpPlayerName, hEvent, - lpData, dwDataSize, dwFlags, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_CreatePlayer - ( LPDIRECTPLAY2 iface, LPDPID lpidPlayer, LPDPNAME lpPlayerName, - HANDLE hEvent, LPVOID lpData, DWORD dwDataSize, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - - if( lpidPlayer == NULL ) - { - return DPERR_INVALIDPARAMS; - } - - if( dwFlags & DPPLAYER_SERVERPLAYER ) - { - *lpidPlayer = DPID_SERVERPLAYER; - } - else - { - *lpidPlayer = DPID_UNKNOWN; - } - - return DP_IF_CreatePlayer( This, NULL, lpidPlayer, lpPlayerName, hEvent, - lpData, dwDataSize, dwFlags, FALSE ); -} - -static DPID DP_GetRemoteNextObjectId(void) -{ - FIXME( ":stub\n" ); - - /* Hack solution */ - return DP_NextObjectId(); -} - -static HRESULT DP_IF_DeletePlayerFromGroup - ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, DPID idGroup, - DPID idPlayer, BOOL bAnsi ) -{ - HRESULT hr = DP_OK; - - lpGroupData lpGData; - lpPlayerList lpPList; - - TRACE( "(%p)->(%p,0x%08x,0x%08x,%u)\n", - This, lpMsgHdr, idGroup, idPlayer, bAnsi ); - - /* Find the group */ - if( ( lpGData = DP_FindAnyGroup( This, idGroup ) ) == NULL ) - { - return DPERR_INVALIDGROUP; - } - - /* Find the player */ - if( ( lpPList = DP_FindPlayer( This, idPlayer ) ) == NULL ) - { - return DPERR_INVALIDPLAYER; - } - - /* Remove the player shortcut from the group */ - DPQ_REMOVE_ENTRY( lpGData->players, players, lpPData->dpid, ==, idPlayer, lpPList ); - - if( lpPList == NULL ) - { - return DPERR_INVALIDPLAYER; - } - - /* One less reference */ - lpPList->lpPData->uRef--; - - /* Delete the Player List element */ - HeapFree( GetProcessHeap(), 0, lpPList ); - - /* Inform the SP if they care */ - if( This->dp2->spData.lpCB->RemovePlayerFromGroup ) - { - DPSP_REMOVEPLAYERFROMGROUPDATA data; - - TRACE( "Calling SP RemovePlayerFromGroup\n" ); - - data.idPlayer = idPlayer; - data.idGroup = idGroup; - data.lpISP = This->dp2->spData.lpISP; - - hr = (*This->dp2->spData.lpCB->RemovePlayerFromGroup)( &data ); - } - - /* Need to send a DELETEPLAYERFROMGROUP message */ - FIXME( "Need to send a message\n" ); - - return hr; -} - -static HRESULT WINAPI DirectPlay2AImpl_DeletePlayerFromGroup - ( LPDIRECTPLAY2A iface, DPID idGroup, DPID idPlayer ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_DeletePlayerFromGroup( This, NULL, idGroup, idPlayer, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_DeletePlayerFromGroup - ( LPDIRECTPLAY2 iface, DPID idGroup, DPID idPlayer ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_DeletePlayerFromGroup( This, NULL, idGroup, idPlayer, FALSE ); -} - -typedef struct _DPRGOPContext -{ - IDirectPlay3Impl* This; - BOOL bAnsi; - DPID idGroup; -} DPRGOPContext, *lpDPRGOPContext; - -static BOOL CALLBACK -cbRemoveGroupOrPlayer( - DPID dpId, - DWORD dwPlayerType, - LPCDPNAME lpName, - DWORD dwFlags, - LPVOID lpContext ) -{ - lpDPRGOPContext lpCtxt = (lpDPRGOPContext)lpContext; - - TRACE( "Removing element:0x%08x (type:0x%08x) from element:0x%08x\n", - dpId, dwPlayerType, lpCtxt->idGroup ); - - if( dwPlayerType == DPPLAYERTYPE_GROUP ) - { - if( FAILED( DP_IF_DeleteGroupFromGroup( lpCtxt->This, lpCtxt->idGroup, - dpId ) - ) - ) - { - ERR( "Unable to delete group 0x%08x from group 0x%08x\n", - dpId, lpCtxt->idGroup ); - } - } - else - { - if( FAILED( DP_IF_DeletePlayerFromGroup( (IDirectPlay2Impl*)lpCtxt->This, - NULL, lpCtxt->idGroup, - dpId, lpCtxt->bAnsi ) - ) - ) - { - ERR( "Unable to delete player 0x%08x from grp 0x%08x\n", - dpId, lpCtxt->idGroup ); - } - } - - return TRUE; /* Continue enumeration */ -} - -static HRESULT DP_IF_DestroyGroup - ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, DPID idGroup, BOOL bAnsi ) -{ - lpGroupData lpGData; - DPRGOPContext context; - - FIXME( "(%p)->(%p,0x%08x,%u): semi stub\n", - This, lpMsgHdr, idGroup, bAnsi ); - - /* Find the group */ - if( ( lpGData = DP_FindAnyGroup( This, idGroup ) ) == NULL ) - { - return DPERR_INVALIDPLAYER; /* yes player */ - } - - context.This = (IDirectPlay3Impl*)This; - context.bAnsi = bAnsi; - context.idGroup = idGroup; - - /* Remove all players that this group has */ - DP_IF_EnumGroupPlayers( This, idGroup, NULL, - cbRemoveGroupOrPlayer, &context, 0, bAnsi ); - - /* Remove all links to groups that this group has since this is dp3 */ - DP_IF_EnumGroupsInGroup( (IDirectPlay3Impl*)This, idGroup, NULL, - cbRemoveGroupOrPlayer, (LPVOID)&context, 0, bAnsi ); - - /* Remove this group from the parent group - if it has one */ - if( ( idGroup != DPID_SYSTEM_GROUP ) && - ( lpGData->parent != DPID_SYSTEM_GROUP ) - ) - { - DP_IF_DeleteGroupFromGroup( (IDirectPlay3Impl*)This, lpGData->parent, - idGroup ); - } - - /* Now delete this group data and list from the system group */ - DP_DeleteGroup( This, idGroup ); - - /* Let the SP know that we've destroyed this group */ - if( This->dp2->spData.lpCB->DeleteGroup ) - { - DPSP_DELETEGROUPDATA data; - - FIXME( "data.dwFlags is incorrect\n" ); - - data.idGroup = idGroup; - data.dwFlags = 0; - data.lpISP = This->dp2->spData.lpISP; - - (*This->dp2->spData.lpCB->DeleteGroup)( &data ); - } - - FIXME( "Send out a DESTORYPLAYERORGROUP message\n" ); - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay2AImpl_DestroyGroup - ( LPDIRECTPLAY2A iface, DPID idGroup ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_DestroyGroup( This, NULL, idGroup, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_DestroyGroup - ( LPDIRECTPLAY2 iface, DPID idGroup ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_DestroyGroup( This, NULL, idGroup, FALSE ); -} - -typedef struct _DPFAGContext -{ - IDirectPlay2Impl* This; - DPID idPlayer; - BOOL bAnsi; -} DPFAGContext, *lpDPFAGContext; - -static HRESULT DP_IF_DestroyPlayer - ( IDirectPlay2Impl* This, LPVOID lpMsgHdr, DPID idPlayer, BOOL bAnsi ) -{ - DPFAGContext cbContext; - - FIXME( "(%p)->(%p,0x%08x,%u): semi stub\n", - This, lpMsgHdr, idPlayer, bAnsi ); - - if( This->dp2->connectionInitialized == NO_PROVIDER ) - { - return DPERR_UNINITIALIZED; - } - - if( DP_FindPlayer( This, idPlayer ) == NULL ) - { - return DPERR_INVALIDPLAYER; - } - - /* FIXME: If the player is remote, we must be the host to delete this */ - - cbContext.This = This; - cbContext.idPlayer = idPlayer; - cbContext.bAnsi = bAnsi; - - /* Find each group and call DeletePlayerFromGroup if the player is a - member of the group */ - DP_IF_EnumGroups( This, NULL, cbDeletePlayerFromAllGroups, - &cbContext, DPENUMGROUPS_ALL, bAnsi ); - - /* Now delete player and player list from the sys group */ - DP_DeletePlayer( This, idPlayer ); - - /* Let the SP know that we've destroyed this group */ - if( This->dp2->spData.lpCB->DeletePlayer ) - { - DPSP_DELETEPLAYERDATA data; - - FIXME( "data.dwFlags is incorrect\n" ); - - data.idPlayer = idPlayer; - data.dwFlags = 0; - data.lpISP = This->dp2->spData.lpISP; - - (*This->dp2->spData.lpCB->DeletePlayer)( &data ); - } - - FIXME( "Send a DELETEPLAYERORGROUP msg\n" ); - - return DP_OK; -} - -static BOOL CALLBACK -cbDeletePlayerFromAllGroups( - DPID dpId, - DWORD dwPlayerType, - LPCDPNAME lpName, - DWORD dwFlags, - LPVOID lpContext ) -{ - lpDPFAGContext lpCtxt = (lpDPFAGContext)lpContext; - - if( dwPlayerType == DPPLAYERTYPE_GROUP ) - { - DP_IF_DeletePlayerFromGroup( lpCtxt->This, NULL, dpId, lpCtxt->idPlayer, - lpCtxt->bAnsi ); - - /* Enumerate all groups in this group since this will normally only - * be called for top level groups - */ - DP_IF_EnumGroupsInGroup( (IDirectPlay3Impl*)lpCtxt->This, - dpId, NULL, - cbDeletePlayerFromAllGroups, - lpContext, DPENUMGROUPS_ALL, - lpCtxt->bAnsi ); - - } - else - { - ERR( "Group callback has dwPlayerType = 0x%08x\n", dwPlayerType ); - } - - return TRUE; -} - -static HRESULT WINAPI DirectPlay2AImpl_DestroyPlayer - ( LPDIRECTPLAY2A iface, DPID idPlayer ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_DestroyPlayer( This, NULL, idPlayer, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_DestroyPlayer - ( LPDIRECTPLAY2 iface, DPID idPlayer ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_DestroyPlayer( This, NULL, idPlayer, FALSE ); -} - -static HRESULT DP_IF_EnumGroupPlayers - ( IDirectPlay2Impl* This, DPID idGroup, LPGUID lpguidInstance, - LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, - LPVOID lpContext, DWORD dwFlags, BOOL bAnsi ) -{ - lpGroupData lpGData; - lpPlayerList lpPList; - - FIXME("(%p)->(0x%08x,%p,%p,%p,0x%08x,%u): semi stub\n", - This, idGroup, lpguidInstance, lpEnumPlayersCallback2, - lpContext, dwFlags, bAnsi ); - - if( This->dp2->connectionInitialized == NO_PROVIDER ) - { - return DPERR_UNINITIALIZED; - } - - /* Find the group */ - if( ( lpGData = DP_FindAnyGroup( This, idGroup ) ) == NULL ) - { - return DPERR_INVALIDGROUP; - } - - if( DPQ_IS_EMPTY( lpGData->players ) ) - { - return DP_OK; - } - - lpPList = DPQ_FIRST( lpGData->players ); - - /* Walk the players in this group */ - for( ;; ) - { - /* We do not enum the name server or app server as they are of no - * consequence to the end user. - */ - if( ( lpPList->lpPData->dpid != DPID_NAME_SERVER ) && - ( lpPList->lpPData->dpid != DPID_SERVERPLAYER ) - ) - { - - /* FIXME: Need to add stuff for dwFlags checking */ - - if( !lpEnumPlayersCallback2( lpPList->lpPData->dpid, DPPLAYERTYPE_PLAYER, - &lpPList->lpPData->name, - lpPList->lpPData->dwFlags, - lpContext ) - ) - { - /* User requested break */ - return DP_OK; - } - } - - if( DPQ_IS_ENDOFLIST( lpPList->players ) ) - { - break; - } - - lpPList = DPQ_NEXT( lpPList->players ); - } - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay2AImpl_EnumGroupPlayers - ( LPDIRECTPLAY2A iface, DPID idGroup, LPGUID lpguidInstance, - LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, - LPVOID lpContext, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_EnumGroupPlayers( This, idGroup, lpguidInstance, - lpEnumPlayersCallback2, lpContext, - dwFlags, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_EnumGroupPlayers - ( LPDIRECTPLAY2 iface, DPID idGroup, LPGUID lpguidInstance, - LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, - LPVOID lpContext, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_EnumGroupPlayers( This, idGroup, lpguidInstance, - lpEnumPlayersCallback2, lpContext, - dwFlags, FALSE ); -} - -/* NOTE: This only enumerates top level groups (created with CreateGroup) */ -static HRESULT DP_IF_EnumGroups - ( IDirectPlay2Impl* This, LPGUID lpguidInstance, - LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, - LPVOID lpContext, DWORD dwFlags, BOOL bAnsi ) -{ - return DP_IF_EnumGroupsInGroup( (IDirectPlay3Impl*)This, - DPID_SYSTEM_GROUP, lpguidInstance, - lpEnumPlayersCallback2, lpContext, - dwFlags, bAnsi ); -} - -static HRESULT WINAPI DirectPlay2AImpl_EnumGroups - ( LPDIRECTPLAY2A iface, LPGUID lpguidInstance, - LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, - LPVOID lpContext, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_EnumGroups( This, lpguidInstance, lpEnumPlayersCallback2, - lpContext, dwFlags, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_EnumGroups - ( LPDIRECTPLAY2 iface, LPGUID lpguidInstance, - LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, - LPVOID lpContext, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_EnumGroups( This, lpguidInstance, lpEnumPlayersCallback2, - lpContext, dwFlags, FALSE ); -} - -static HRESULT DP_IF_EnumPlayers - ( IDirectPlay2Impl* This, LPGUID lpguidInstance, - LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, - LPVOID lpContext, DWORD dwFlags, BOOL bAnsi ) -{ - return DP_IF_EnumGroupPlayers( This, DPID_SYSTEM_GROUP, lpguidInstance, - lpEnumPlayersCallback2, lpContext, - dwFlags, bAnsi ); -} - -static HRESULT WINAPI DirectPlay2AImpl_EnumPlayers - ( LPDIRECTPLAY2A iface, LPGUID lpguidInstance, - LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, - LPVOID lpContext, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_EnumPlayers( This, lpguidInstance, lpEnumPlayersCallback2, - lpContext, dwFlags, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_EnumPlayers - ( LPDIRECTPLAY2 iface, LPGUID lpguidInstance, - LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, - LPVOID lpContext, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_EnumPlayers( This, lpguidInstance, lpEnumPlayersCallback2, - lpContext, dwFlags, FALSE ); -} - -/* This function should call the registered callback function that the user - passed into EnumSessions for each entry available. - */ -static void DP_InvokeEnumSessionCallbacks - ( LPDPENUMSESSIONSCALLBACK2 lpEnumSessionsCallback2, - LPVOID lpNSInfo, - DWORD dwTimeout, - LPVOID lpContext ) -{ - LPDPSESSIONDESC2 lpSessionDesc; - - FIXME( ": not checking for conditions\n" ); - - /* Not sure if this should be pruning but it's convenient */ - NS_PruneSessionCache( lpNSInfo ); - - NS_ResetSessionEnumeration( lpNSInfo ); - - /* Enumerate all sessions */ - /* FIXME: Need to indicate ANSI */ - while( (lpSessionDesc = NS_WalkSessions( lpNSInfo ) ) != NULL ) - { - TRACE( "EnumSessionsCallback2 invoked\n" ); - if( !lpEnumSessionsCallback2( lpSessionDesc, &dwTimeout, 0, lpContext ) ) - { - return; - } - } - - /* Invoke one last time to indicate that there is no more to come */ - lpEnumSessionsCallback2( NULL, &dwTimeout, DPESC_TIMEDOUT, lpContext ); -} - -static DWORD CALLBACK DP_EnumSessionsSendAsyncRequestThread( LPVOID lpContext ) -{ - EnumSessionAsyncCallbackData* data = lpContext; - HANDLE hSuicideRequest = data->hSuicideRequest; - DWORD dwTimeout = data->dwTimeout; - - TRACE( "Thread started with timeout = 0x%08x\n", dwTimeout ); - - for( ;; ) - { - HRESULT hr; - - /* Sleep up to dwTimeout waiting for request to terminate thread */ - if( WaitForSingleObject( hSuicideRequest, dwTimeout ) == WAIT_OBJECT_0 ) - { - TRACE( "Thread terminating on terminate request\n" ); - break; - } - - /* Now resend the enum request */ - hr = NS_SendSessionRequestBroadcast( &data->requestGuid, - data->dwEnumSessionFlags, - data->lpSpData ); - - if( FAILED(hr) ) - { - ERR( "Enum broadcase request failed: %s\n", DPLAYX_HresultToString(hr) ); - /* FIXME: Should we kill this thread? How to inform the main thread? */ - } - - } - - TRACE( "Thread terminating\n" ); - - /* Clean up the thread data */ - CloseHandle( hSuicideRequest ); - HeapFree( GetProcessHeap(), 0, lpContext ); - - /* FIXME: Need to have some notification to main app thread that this is - * dead. It would serve two purposes. 1) allow sync on termination - * so that we don't actually send something to ourselves when we - * become name server (race condition) and 2) so that if we die - * abnormally something else will be able to tell. - */ - - return 1; -} - -static void DP_KillEnumSessionThread( IDirectPlay2Impl* This ) -{ - /* Does a thread exist? If so we were doing an async enum session */ - if( This->dp2->hEnumSessionThread != INVALID_HANDLE_VALUE ) - { - TRACE( "Killing EnumSession thread %p\n", - This->dp2->hEnumSessionThread ); - - /* Request that the thread kill itself nicely */ - SetEvent( This->dp2->hKillEnumSessionThreadEvent ); - CloseHandle( This->dp2->hKillEnumSessionThreadEvent ); - - /* We no longer need to know about the thread */ - CloseHandle( This->dp2->hEnumSessionThread ); - - This->dp2->hEnumSessionThread = INVALID_HANDLE_VALUE; - } -} - -static HRESULT DP_IF_EnumSessions - ( IDirectPlay2Impl* This, LPDPSESSIONDESC2 lpsd, DWORD dwTimeout, - LPDPENUMSESSIONSCALLBACK2 lpEnumSessionsCallback2, - LPVOID lpContext, DWORD dwFlags, BOOL bAnsi ) -{ - HRESULT hr = DP_OK; - - TRACE( "(%p)->(%p,0x%08x,%p,%p,0x%08x,%u)\n", - This, lpsd, dwTimeout, lpEnumSessionsCallback2, lpContext, dwFlags, - bAnsi ); - if( This->dp2->connectionInitialized == NO_PROVIDER ) - { - return DPERR_UNINITIALIZED; - } - - /* Can't enumerate if the interface is already open */ - if( This->dp2->bConnectionOpen ) - { - return DPERR_GENERIC; - } - -#if 1 - /* The loading of a lobby provider _seems_ to require a backdoor loading - * of the service provider to also associate with this DP object. This is - * because the app doesn't seem to have to call EnumConnections and - * InitializeConnection for the SP before calling this method. As such - * we'll do their dirty work for them with a quick hack so as to always - * load the TCP/IP service provider. - * - * The correct solution would seem to involve creating a dialog box which - * contains the possible SPs. These dialog boxes most likely follow SDK - * examples. - */ - if( This->dp2->bDPLSPInitialized && !This->dp2->bSPInitialized ) - { - LPVOID lpConnection; - DWORD dwSize; - - WARN( "Hack providing TCP/IP SP for lobby provider activated\n" ); - - if( !DP_BuildSPCompoundAddr( (LPGUID)&DPSPGUID_TCPIP, &lpConnection, &dwSize ) ) - { - ERR( "Can't build compound addr\n" ); - return DPERR_GENERIC; - } - - hr = DP_IF_InitializeConnection( (IDirectPlay3Impl*)This, lpConnection, - 0, bAnsi ); - if( FAILED(hr) ) - { - return hr; - } - - /* Free up the address buffer */ - HeapFree( GetProcessHeap(), 0, lpConnection ); - - /* The SP is now initialized */ - This->dp2->bSPInitialized = TRUE; - } -#endif - - - /* Use the service provider default? */ - if( dwTimeout == 0 ) - { - DPCAPS spCaps; - spCaps.dwSize = sizeof( spCaps ); - - DP_IF_GetCaps( This, &spCaps, 0 ); - dwTimeout = spCaps.dwTimeout; - - /* The service provider doesn't provide one either! */ - if( dwTimeout == 0 ) - { - /* Provide the TCP/IP default */ - dwTimeout = DPMSG_WAIT_5_SECS; - } - } - - if( dwFlags & DPENUMSESSIONS_STOPASYNC ) - { - DP_KillEnumSessionThread( This ); - return hr; - } - - if( ( dwFlags & DPENUMSESSIONS_ASYNC ) ) - { - /* Enumerate everything presently in the local session cache */ - DP_InvokeEnumSessionCallbacks( lpEnumSessionsCallback2, - This->dp2->lpNameServerData, dwTimeout, - lpContext ); - - if( This->dp2->dwEnumSessionLock != 0 ) - return DPERR_CONNECTING; - - /* See if we've already created a thread to service this interface */ - if( This->dp2->hEnumSessionThread == INVALID_HANDLE_VALUE ) - { - DWORD dwThreadId; - This->dp2->dwEnumSessionLock++; - - /* Send the first enum request inline since the user may cancel a dialog - * if one is presented. Also, may also have a connecting return code. - */ - hr = NS_SendSessionRequestBroadcast( &lpsd->guidApplication, - dwFlags, &This->dp2->spData ); - - if( SUCCEEDED(hr) ) - { - EnumSessionAsyncCallbackData* lpData - = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *lpData ) ); - /* FIXME: need to kill the thread on object deletion */ - lpData->lpSpData = &This->dp2->spData; - - lpData->requestGuid = lpsd->guidApplication; - lpData->dwEnumSessionFlags = dwFlags; - lpData->dwTimeout = dwTimeout; - - This->dp2->hKillEnumSessionThreadEvent = - CreateEventW( NULL, TRUE, FALSE, NULL ); - - if( !DuplicateHandle( GetCurrentProcess(), - This->dp2->hKillEnumSessionThreadEvent, - GetCurrentProcess(), - &lpData->hSuicideRequest, - 0, FALSE, DUPLICATE_SAME_ACCESS ) - ) - { - ERR( "Can't duplicate thread killing handle\n" ); - } - - TRACE( ": creating EnumSessionsRequest thread\n" ); - - This->dp2->hEnumSessionThread = CreateThread( NULL, - 0, - DP_EnumSessionsSendAsyncRequestThread, - lpData, - 0, - &dwThreadId ); - } - This->dp2->dwEnumSessionLock--; - } - } - else - { - /* Invalidate the session cache for the interface */ - NS_InvalidateSessionCache( This->dp2->lpNameServerData ); - - /* Send the broadcast for session enumeration */ - hr = NS_SendSessionRequestBroadcast( &lpsd->guidApplication, - dwFlags, - &This->dp2->spData ); - - - SleepEx( dwTimeout, FALSE ); - - DP_InvokeEnumSessionCallbacks( lpEnumSessionsCallback2, - This->dp2->lpNameServerData, dwTimeout, - lpContext ); - } - - return hr; -} - -static HRESULT WINAPI DirectPlay2AImpl_EnumSessions - ( LPDIRECTPLAY2A iface, LPDPSESSIONDESC2 lpsd, DWORD dwTimeout, - LPDPENUMSESSIONSCALLBACK2 lpEnumSessionsCallback2, - LPVOID lpContext, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_EnumSessions( This, lpsd, dwTimeout, lpEnumSessionsCallback2, - lpContext, dwFlags, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_EnumSessions - ( LPDIRECTPLAY2 iface, LPDPSESSIONDESC2 lpsd, DWORD dwTimeout, - LPDPENUMSESSIONSCALLBACK2 lpEnumSessionsCallback2, - LPVOID lpContext, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_EnumSessions( This, lpsd, dwTimeout, lpEnumSessionsCallback2, - lpContext, dwFlags, FALSE ); -} - -static HRESULT DP_IF_GetPlayerCaps - ( IDirectPlay2Impl* This, DPID idPlayer, LPDPCAPS lpDPCaps, - DWORD dwFlags ) -{ - DPSP_GETCAPSDATA data; - - TRACE("(%p)->(0x%08x,%p,0x%08x)\n", This, idPlayer, lpDPCaps, dwFlags); - - if ( This->dp2->connectionInitialized == NO_PROVIDER ) - { - return DPERR_UNINITIALIZED; - } - - /* Query the service provider */ - data.idPlayer = idPlayer; - data.dwFlags = dwFlags; - data.lpCaps = lpDPCaps; - data.lpISP = This->dp2->spData.lpISP; - - return (*This->dp2->spData.lpCB->GetCaps)( &data ); -} - -static HRESULT DP_IF_GetCaps - ( IDirectPlay2Impl* This, LPDPCAPS lpDPCaps, DWORD dwFlags ) -{ - return DP_IF_GetPlayerCaps( This, DPID_ALLPLAYERS, lpDPCaps, dwFlags ); -} - -static HRESULT WINAPI DirectPlay2AImpl_GetCaps - ( LPDIRECTPLAY2A iface, LPDPCAPS lpDPCaps, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_GetCaps( This, lpDPCaps, dwFlags ); -} - -static HRESULT WINAPI DirectPlay2WImpl_GetCaps - ( LPDIRECTPLAY2 iface, LPDPCAPS lpDPCaps, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_GetCaps( This, lpDPCaps, dwFlags ); -} - -static HRESULT DP_IF_GetGroupData - ( IDirectPlay2Impl* This, DPID idGroup, LPVOID lpData, - LPDWORD lpdwDataSize, DWORD dwFlags, BOOL bAnsi ) -{ - lpGroupData lpGData; - DWORD dwRequiredBufferSize; - LPVOID lpCopyDataFrom; - - TRACE( "(%p)->(0x%08x,%p,%p,0x%08x,%u)\n", - This, idGroup, lpData, lpdwDataSize, dwFlags, bAnsi ); - - if( ( lpGData = DP_FindAnyGroup( This, idGroup ) ) == NULL ) - { - return DPERR_INVALIDGROUP; - } - - /* How much buffer is required? */ - if( dwFlags & DPSET_LOCAL ) - { - dwRequiredBufferSize = lpGData->dwLocalDataSize; - lpCopyDataFrom = lpGData->lpLocalData; - } - else - { - dwRequiredBufferSize = lpGData->dwRemoteDataSize; - lpCopyDataFrom = lpGData->lpRemoteData; - } - - /* Is the user requesting to know how big a buffer is required? */ - if( ( lpData == NULL ) || - ( *lpdwDataSize < dwRequiredBufferSize ) - ) - { - *lpdwDataSize = dwRequiredBufferSize; - return DPERR_BUFFERTOOSMALL; - } - - CopyMemory( lpData, lpCopyDataFrom, dwRequiredBufferSize ); - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay2AImpl_GetGroupData - ( LPDIRECTPLAY2A iface, DPID idGroup, LPVOID lpData, - LPDWORD lpdwDataSize, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_GetGroupData( This, idGroup, lpData, lpdwDataSize, - dwFlags, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_GetGroupData - ( LPDIRECTPLAY2 iface, DPID idGroup, LPVOID lpData, - LPDWORD lpdwDataSize, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_GetGroupData( This, idGroup, lpData, lpdwDataSize, - dwFlags, FALSE ); -} - -static HRESULT DP_IF_GetGroupName - ( IDirectPlay2Impl* This, DPID idGroup, LPVOID lpData, - LPDWORD lpdwDataSize, BOOL bAnsi ) -{ - lpGroupData lpGData; - LPDPNAME lpName = lpData; - DWORD dwRequiredDataSize; - - FIXME("(%p)->(0x%08x,%p,%p,%u) ANSI ignored\n", - This, idGroup, lpData, lpdwDataSize, bAnsi ); - - if( ( lpGData = DP_FindAnyGroup( This, idGroup ) ) == NULL ) - { - return DPERR_INVALIDGROUP; - } - - dwRequiredDataSize = lpGData->name.dwSize; - - if( lpGData->name.u1.lpszShortNameA ) - { - dwRequiredDataSize += strlen( lpGData->name.u1.lpszShortNameA ) + 1; - } - - if( lpGData->name.u2.lpszLongNameA ) - { - dwRequiredDataSize += strlen( lpGData->name.u2.lpszLongNameA ) + 1; - } - - if( ( lpData == NULL ) || - ( *lpdwDataSize < dwRequiredDataSize ) - ) - { - *lpdwDataSize = dwRequiredDataSize; - return DPERR_BUFFERTOOSMALL; - } - - /* Copy the structure */ - CopyMemory( lpName, &lpGData->name, lpGData->name.dwSize ); - - if( lpGData->name.u1.lpszShortNameA ) - { - strcpy( ((char*)lpName)+lpGData->name.dwSize, - lpGData->name.u1.lpszShortNameA ); - } - else - { - lpName->u1.lpszShortNameA = NULL; - } - - if( lpGData->name.u1.lpszShortNameA ) - { - strcpy( ((char*)lpName)+lpGData->name.dwSize, - lpGData->name.u2.lpszLongNameA ); - } - else - { - lpName->u2.lpszLongNameA = NULL; - } - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay2AImpl_GetGroupName - ( LPDIRECTPLAY2A iface, DPID idGroup, LPVOID lpData, - LPDWORD lpdwDataSize ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_GetGroupName( This, idGroup, lpData, lpdwDataSize, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_GetGroupName - ( LPDIRECTPLAY2 iface, DPID idGroup, LPVOID lpData, - LPDWORD lpdwDataSize ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_GetGroupName( This, idGroup, lpData, lpdwDataSize, FALSE ); -} - -static HRESULT DP_IF_GetMessageCount - ( IDirectPlay2Impl* This, DPID idPlayer, - LPDWORD lpdwCount, BOOL bAnsi ) -{ - FIXME("(%p)->(0x%08x,%p,%u): stub\n", This, idPlayer, lpdwCount, bAnsi ); - return DP_IF_GetMessageQueue( (IDirectPlay4Impl*)This, 0, idPlayer, - DPMESSAGEQUEUE_RECEIVE, lpdwCount, NULL, - bAnsi ); -} - -static HRESULT WINAPI DirectPlay2AImpl_GetMessageCount - ( LPDIRECTPLAY2A iface, DPID idPlayer, LPDWORD lpdwCount ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_GetMessageCount( This, idPlayer, lpdwCount, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_GetMessageCount - ( LPDIRECTPLAY2 iface, DPID idPlayer, LPDWORD lpdwCount ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_GetMessageCount( This, idPlayer, lpdwCount, FALSE ); -} - -static HRESULT WINAPI DirectPlay2AImpl_GetPlayerAddress - ( LPDIRECTPLAY2A iface, DPID idPlayer, LPVOID lpData, LPDWORD lpdwDataSize ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - FIXME("(%p)->(0x%08x,%p,%p): stub\n", This, idPlayer, lpData, lpdwDataSize ); - return DP_OK; -} - -static HRESULT WINAPI DirectPlay2WImpl_GetPlayerAddress - ( LPDIRECTPLAY2 iface, DPID idPlayer, LPVOID lpData, LPDWORD lpdwDataSize ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - FIXME("(%p)->(0x%08x,%p,%p): stub\n", This, idPlayer, lpData, lpdwDataSize ); - return DP_OK; -} - -static HRESULT WINAPI DirectPlay2AImpl_GetPlayerCaps - ( LPDIRECTPLAY2A iface, DPID idPlayer, LPDPCAPS lpPlayerCaps, - DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_GetPlayerCaps( This, idPlayer, lpPlayerCaps, dwFlags ); -} - -static HRESULT WINAPI DirectPlay2WImpl_GetPlayerCaps - ( LPDIRECTPLAY2 iface, DPID idPlayer, LPDPCAPS lpPlayerCaps, - DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_GetPlayerCaps( This, idPlayer, lpPlayerCaps, dwFlags ); -} - -static HRESULT DP_IF_GetPlayerData - ( IDirectPlay2Impl* This, DPID idPlayer, LPVOID lpData, - LPDWORD lpdwDataSize, DWORD dwFlags, BOOL bAnsi ) -{ - lpPlayerList lpPList; - DWORD dwRequiredBufferSize; - LPVOID lpCopyDataFrom; - - TRACE( "(%p)->(0x%08x,%p,%p,0x%08x,%u)\n", - This, idPlayer, lpData, lpdwDataSize, dwFlags, bAnsi ); - - if( This->dp2->connectionInitialized == NO_PROVIDER ) - { - return DPERR_UNINITIALIZED; - } - - if( ( lpPList = DP_FindPlayer( This, idPlayer ) ) == NULL ) - { - return DPERR_INVALIDPLAYER; - } - - /* How much buffer is required? */ - if( dwFlags & DPSET_LOCAL ) - { - dwRequiredBufferSize = lpPList->lpPData->dwLocalDataSize; - lpCopyDataFrom = lpPList->lpPData->lpLocalData; - } - else - { - dwRequiredBufferSize = lpPList->lpPData->dwRemoteDataSize; - lpCopyDataFrom = lpPList->lpPData->lpRemoteData; - } - - /* Is the user requesting to know how big a buffer is required? */ - if( ( lpData == NULL ) || - ( *lpdwDataSize < dwRequiredBufferSize ) - ) - { - *lpdwDataSize = dwRequiredBufferSize; - return DPERR_BUFFERTOOSMALL; - } - - CopyMemory( lpData, lpCopyDataFrom, dwRequiredBufferSize ); - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay2AImpl_GetPlayerData - ( LPDIRECTPLAY2A iface, DPID idPlayer, LPVOID lpData, - LPDWORD lpdwDataSize, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_GetPlayerData( This, idPlayer, lpData, lpdwDataSize, - dwFlags, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_GetPlayerData - ( LPDIRECTPLAY2 iface, DPID idPlayer, LPVOID lpData, - LPDWORD lpdwDataSize, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_GetPlayerData( This, idPlayer, lpData, lpdwDataSize, - dwFlags, FALSE ); -} - -static HRESULT DP_IF_GetPlayerName - ( IDirectPlay2Impl* This, DPID idPlayer, LPVOID lpData, - LPDWORD lpdwDataSize, BOOL bAnsi ) -{ - lpPlayerList lpPList; - LPDPNAME lpName = lpData; - DWORD dwRequiredDataSize; - - FIXME( "(%p)->(0x%08x,%p,%p,%u): ANSI\n", - This, idPlayer, lpData, lpdwDataSize, bAnsi ); - - if( This->dp2->connectionInitialized == NO_PROVIDER ) - { - return DPERR_UNINITIALIZED; - } - - if( ( lpPList = DP_FindPlayer( This, idPlayer ) ) == NULL ) - { - return DPERR_INVALIDPLAYER; - } - - dwRequiredDataSize = lpPList->lpPData->name.dwSize; - - if( lpPList->lpPData->name.u1.lpszShortNameA ) - { - dwRequiredDataSize += strlen( lpPList->lpPData->name.u1.lpszShortNameA ) + 1; - } - - if( lpPList->lpPData->name.u2.lpszLongNameA ) - { - dwRequiredDataSize += strlen( lpPList->lpPData->name.u2.lpszLongNameA ) + 1; - } - - if( ( lpData == NULL ) || - ( *lpdwDataSize < dwRequiredDataSize ) - ) - { - *lpdwDataSize = dwRequiredDataSize; - return DPERR_BUFFERTOOSMALL; - } - - /* Copy the structure */ - CopyMemory( lpName, &lpPList->lpPData->name, lpPList->lpPData->name.dwSize ); - - if( lpPList->lpPData->name.u1.lpszShortNameA ) - { - strcpy( ((char*)lpName)+lpPList->lpPData->name.dwSize, - lpPList->lpPData->name.u1.lpszShortNameA ); - } - else - { - lpName->u1.lpszShortNameA = NULL; - } - - if( lpPList->lpPData->name.u1.lpszShortNameA ) - { - strcpy( ((char*)lpName)+lpPList->lpPData->name.dwSize, - lpPList->lpPData->name.u2.lpszLongNameA ); - } - else - { - lpName->u2.lpszLongNameA = NULL; - } - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay2AImpl_GetPlayerName - ( LPDIRECTPLAY2A iface, DPID idPlayer, LPVOID lpData, - LPDWORD lpdwDataSize ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_GetPlayerName( This, idPlayer, lpData, lpdwDataSize, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_GetPlayerName - ( LPDIRECTPLAY2 iface, DPID idPlayer, LPVOID lpData, - LPDWORD lpdwDataSize ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_GetPlayerName( This, idPlayer, lpData, lpdwDataSize, FALSE ); -} - -static HRESULT DP_GetSessionDesc - ( IDirectPlay2Impl* This, LPVOID lpData, LPDWORD lpdwDataSize, - BOOL bAnsi ) -{ - DWORD dwRequiredSize; - - TRACE( "(%p)->(%p,%p,%u)\n", This, lpData, lpdwDataSize, bAnsi ); - - if( This->dp2->connectionInitialized == NO_PROVIDER ) - { - return DPERR_UNINITIALIZED; - } - - if( ( lpData == NULL ) && ( lpdwDataSize == NULL ) ) - { - return DPERR_INVALIDPARAMS; - } - - /* FIXME: Get from This->dp2->lpSessionDesc */ - dwRequiredSize = DP_CalcSessionDescSize( This->dp2->lpSessionDesc, bAnsi ); - - if ( ( lpData == NULL ) || - ( *lpdwDataSize < dwRequiredSize ) - ) - { - *lpdwDataSize = dwRequiredSize; - return DPERR_BUFFERTOOSMALL; - } - - DP_CopySessionDesc( lpData, This->dp2->lpSessionDesc, bAnsi ); - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay2AImpl_GetSessionDesc - ( LPDIRECTPLAY2A iface, LPVOID lpData, LPDWORD lpdwDataSize ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_GetSessionDesc( This, lpData, lpdwDataSize, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_GetSessionDesc - ( LPDIRECTPLAY2 iface, LPVOID lpData, LPDWORD lpdwDataSize ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_GetSessionDesc( This, lpData, lpdwDataSize, TRUE ); -} - -/* Intended only for COM compatibility. Always returns an error. */ -static HRESULT WINAPI DirectPlay2AImpl_Initialize - ( LPDIRECTPLAY2A iface, LPGUID lpGUID ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - TRACE("(%p)->(%p): stub\n", This, lpGUID ); - return DPERR_ALREADYINITIALIZED; -} - -/* Intended only for COM compatibility. Always returns an error. */ -static HRESULT WINAPI DirectPlay2WImpl_Initialize - ( LPDIRECTPLAY2 iface, LPGUID lpGUID ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - TRACE("(%p)->(%p): stub\n", This, lpGUID ); - return DPERR_ALREADYINITIALIZED; -} - - -static HRESULT DP_SecureOpen - ( IDirectPlay2Impl* This, LPCDPSESSIONDESC2 lpsd, DWORD dwFlags, - LPCDPSECURITYDESC lpSecurity, LPCDPCREDENTIALS lpCredentials, - BOOL bAnsi ) -{ - HRESULT hr = DP_OK; - - FIXME( "(%p)->(%p,0x%08x,%p,%p): partial stub\n", - This, lpsd, dwFlags, lpSecurity, lpCredentials ); - - if( This->dp2->connectionInitialized == NO_PROVIDER ) - { - return DPERR_UNINITIALIZED; - } - - if( lpsd->dwSize != sizeof(DPSESSIONDESC2) ) - { - TRACE( ": rejecting invalid dpsd size (%d).\n", lpsd->dwSize ); - return DPERR_INVALIDPARAMS; - } - - if( This->dp2->bConnectionOpen ) - { - TRACE( ": rejecting already open connection.\n" ); - return DPERR_ALREADYINITIALIZED; - } - - /* If we're enumerating, kill the thread */ - DP_KillEnumSessionThread( This ); - - if( dwFlags & DPOPEN_CREATE ) - { - /* Rightoo - this computer is the host and the local computer needs to be - the name server so that others can join this session */ - NS_SetLocalComputerAsNameServer( lpsd, This->dp2->lpNameServerData ); - - This->dp2->bHostInterface = TRUE; - - hr = DP_SetSessionDesc( This, lpsd, 0, TRUE, bAnsi ); - if( FAILED( hr ) ) - { - ERR( "Unable to set session desc: %s\n", DPLAYX_HresultToString( hr ) ); - return hr; - } - } - - /* Invoke the conditional callback for the service provider */ - if( This->dp2->spData.lpCB->Open ) - { - DPSP_OPENDATA data; - - FIXME( "Not all data fields are correct. Need new parameter\n" ); - - data.bCreate = (dwFlags & DPOPEN_CREATE ) != 0; - data.lpSPMessageHeader = (dwFlags & DPOPEN_CREATE ) ? NULL - : NS_GetNSAddr( This->dp2->lpNameServerData ); - data.lpISP = This->dp2->spData.lpISP; - data.bReturnStatus = (dwFlags & DPOPEN_RETURNSTATUS) != 0; - data.dwOpenFlags = dwFlags; - data.dwSessionFlags = This->dp2->lpSessionDesc->dwFlags; - - hr = (*This->dp2->spData.lpCB->Open)(&data); - if( FAILED( hr ) ) - { - ERR( "Unable to open session: %s\n", DPLAYX_HresultToString( hr ) ); - return hr; - } - } - - { - /* Create the system group of which everything is a part of */ - DPID systemGroup = DPID_SYSTEM_GROUP; - - hr = DP_IF_CreateGroup( This, NULL, &systemGroup, NULL, - NULL, 0, 0, TRUE ); - - } - - if( dwFlags & DPOPEN_JOIN ) - { - DPID dpidServerId = DPID_UNKNOWN; - - /* Create the server player for this interface. This way we can receive - * messages for this session. - */ - /* FIXME: I suppose that we should be setting an event for a receive - * type of thing. That way the messaging thread could know to wake - * up. DPlay would then trigger the hEvent for the player the - * message is directed to. - */ - hr = DP_IF_CreatePlayer( This, NULL, &dpidServerId, NULL, 0, NULL, - 0, - DPPLAYER_SERVERPLAYER | DPPLAYER_LOCAL , bAnsi ); - - } - else if( dwFlags & DPOPEN_CREATE ) - { - DPID dpidNameServerId = DPID_NAME_SERVER; - - hr = DP_IF_CreatePlayer( This, NULL, &dpidNameServerId, NULL, 0, NULL, - 0, DPPLAYER_SERVERPLAYER, bAnsi ); - } - - if( FAILED(hr) ) - { - ERR( "Couldn't create name server/system player: %s\n", - DPLAYX_HresultToString(hr) ); - } - - return hr; -} - -static HRESULT WINAPI DirectPlay2AImpl_Open - ( LPDIRECTPLAY2A iface, LPDPSESSIONDESC2 lpsd, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - TRACE("(%p)->(%p,0x%08x)\n", This, lpsd, dwFlags ); - return DP_SecureOpen( This, lpsd, dwFlags, NULL, NULL, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_Open - ( LPDIRECTPLAY2 iface, LPDPSESSIONDESC2 lpsd, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - TRACE("(%p)->(%p,0x%08x)\n", This, lpsd, dwFlags ); - return DP_SecureOpen( This, lpsd, dwFlags, NULL, NULL, FALSE ); -} - -static HRESULT DP_IF_Receive - ( IDirectPlay2Impl* This, LPDPID lpidFrom, LPDPID lpidTo, - DWORD dwFlags, LPVOID lpData, LPDWORD lpdwDataSize, BOOL bAnsi ) -{ - LPDPMSG lpMsg = NULL; - - FIXME( "(%p)->(%p,%p,0x%08x,%p,%p,%u): stub\n", - This, lpidFrom, lpidTo, dwFlags, lpData, lpdwDataSize, bAnsi ); - - if( This->dp2->connectionInitialized == NO_PROVIDER ) - { - return DPERR_UNINITIALIZED; - } - - if( dwFlags == 0 ) - { - dwFlags = DPRECEIVE_ALL; - } - - /* If the lpData is NULL, we must be peeking the message */ - if( ( lpData == NULL ) && - !( dwFlags & DPRECEIVE_PEEK ) - ) - { - return DPERR_INVALIDPARAMS; - } - - if( dwFlags & DPRECEIVE_ALL ) - { - lpMsg = This->dp2->receiveMsgs.lpQHFirst; - - if( !( dwFlags & DPRECEIVE_PEEK ) ) - { - FIXME( "Remove from queue\n" ); - } - } - else if( ( dwFlags & DPRECEIVE_TOPLAYER ) || - ( dwFlags & DPRECEIVE_FROMPLAYER ) - ) - { - FIXME( "Find matching message 0x%08x\n", dwFlags ); - } - else - { - ERR( "Hmmm..dwFlags 0x%08x\n", dwFlags ); - } - - if( lpMsg == NULL ) - { - return DPERR_NOMESSAGES; - } - - /* Copy into the provided buffer */ - if (lpData) CopyMemory( lpData, lpMsg->msg, *lpdwDataSize ); - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay2AImpl_Receive - ( LPDIRECTPLAY2A iface, LPDPID lpidFrom, LPDPID lpidTo, - DWORD dwFlags, LPVOID lpData, LPDWORD lpdwDataSize ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_Receive( This, lpidFrom, lpidTo, dwFlags, - lpData, lpdwDataSize, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_Receive - ( LPDIRECTPLAY2 iface, LPDPID lpidFrom, LPDPID lpidTo, - DWORD dwFlags, LPVOID lpData, LPDWORD lpdwDataSize ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_Receive( This, lpidFrom, lpidTo, dwFlags, - lpData, lpdwDataSize, FALSE ); -} - -static HRESULT WINAPI DirectPlay2AImpl_Send - ( LPDIRECTPLAY2A iface, DPID idFrom, DPID idTo, DWORD dwFlags, LPVOID lpData, DWORD dwDataSize ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_SendEx( This, idFrom, idTo, dwFlags, lpData, dwDataSize, - 0, 0, NULL, NULL, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_Send - ( LPDIRECTPLAY2 iface, DPID idFrom, DPID idTo, DWORD dwFlags, LPVOID lpData, DWORD dwDataSize ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_SendEx( This, idFrom, idTo, dwFlags, lpData, dwDataSize, - 0, 0, NULL, NULL, FALSE ); -} - -static HRESULT DP_IF_SetGroupData - ( IDirectPlay2Impl* This, DPID idGroup, LPVOID lpData, - DWORD dwDataSize, DWORD dwFlags, BOOL bAnsi ) -{ - lpGroupData lpGData; - - TRACE( "(%p)->(0x%08x,%p,0x%08x,0x%08x,%u)\n", - This, idGroup, lpData, dwDataSize, dwFlags, bAnsi ); - - /* Parameter check */ - if( ( lpData == NULL ) && - ( dwDataSize != 0 ) - ) - { - return DPERR_INVALIDPARAMS; - } - - /* Find the pointer to the data for this player */ - if( ( lpGData = DP_FindAnyGroup( This, idGroup ) ) == NULL ) - { - return DPERR_INVALIDOBJECT; - } - - if( !(dwFlags & DPSET_LOCAL) ) - { - FIXME( "Was this group created by this interface?\n" ); - /* FIXME: If this is a remote update need to allow it but not - * send a message. - */ - } - - DP_SetGroupData( lpGData, dwFlags, lpData, dwDataSize ); - - /* FIXME: Only send a message if this group is local to the session otherwise - * it will have been rejected above - */ - if( !(dwFlags & DPSET_LOCAL) ) - { - FIXME( "Send msg?\n" ); - } - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay2AImpl_SetGroupData - ( LPDIRECTPLAY2A iface, DPID idGroup, LPVOID lpData, - DWORD dwDataSize, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_SetGroupData( This, idGroup, lpData, dwDataSize, dwFlags, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_SetGroupData - ( LPDIRECTPLAY2 iface, DPID idGroup, LPVOID lpData, - DWORD dwDataSize, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_SetGroupData( This, idGroup, lpData, dwDataSize, dwFlags, FALSE ); -} - -static HRESULT DP_IF_SetGroupName - ( IDirectPlay2Impl* This, DPID idGroup, LPDPNAME lpGroupName, - DWORD dwFlags, BOOL bAnsi ) -{ - lpGroupData lpGData; - - TRACE( "(%p)->(0x%08x,%p,0x%08x,%u)\n", This, idGroup, - lpGroupName, dwFlags, bAnsi ); - - if( ( lpGData = DP_FindAnyGroup( This, idGroup ) ) == NULL ) - { - return DPERR_INVALIDGROUP; - } - - DP_CopyDPNAMEStruct( &lpGData->name, lpGroupName, bAnsi ); - - /* Should send a DPMSG_SETPLAYERORGROUPNAME message */ - FIXME( "Message not sent and dwFlags ignored\n" ); - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay2AImpl_SetGroupName - ( LPDIRECTPLAY2A iface, DPID idGroup, LPDPNAME lpGroupName, - DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_SetGroupName( This, idGroup, lpGroupName, dwFlags, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_SetGroupName - ( LPDIRECTPLAY2 iface, DPID idGroup, LPDPNAME lpGroupName, - DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_SetGroupName( This, idGroup, lpGroupName, dwFlags, FALSE ); -} - -static HRESULT DP_IF_SetPlayerData - ( IDirectPlay2Impl* This, DPID idPlayer, LPVOID lpData, - DWORD dwDataSize, DWORD dwFlags, BOOL bAnsi ) -{ - lpPlayerList lpPList; - - TRACE( "(%p)->(0x%08x,%p,0x%08x,0x%08x,%u)\n", - This, idPlayer, lpData, dwDataSize, dwFlags, bAnsi ); - - if( This->dp2->connectionInitialized == NO_PROVIDER ) - { - return DPERR_UNINITIALIZED; - } - - /* Parameter check */ - if( ( lpData == NULL ) && - ( dwDataSize != 0 ) - ) - { - return DPERR_INVALIDPARAMS; - } - - /* Find the pointer to the data for this player */ - if( ( lpPList = DP_FindPlayer( This, idPlayer ) ) == NULL ) - { - return DPERR_INVALIDPLAYER; - } - - if( !(dwFlags & DPSET_LOCAL) ) - { - FIXME( "Was this group created by this interface?\n" ); - /* FIXME: If this is a remote update need to allow it but not - * send a message. - */ - } - - DP_SetPlayerData( lpPList->lpPData, dwFlags, lpData, dwDataSize ); - - if( !(dwFlags & DPSET_LOCAL) ) - { - FIXME( "Send msg?\n" ); - } - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay2AImpl_SetPlayerData - ( LPDIRECTPLAY2A iface, DPID idPlayer, LPVOID lpData, - DWORD dwDataSize, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_SetPlayerData( This, idPlayer, lpData, dwDataSize, - dwFlags, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_SetPlayerData - ( LPDIRECTPLAY2 iface, DPID idPlayer, LPVOID lpData, - DWORD dwDataSize, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_SetPlayerData( This, idPlayer, lpData, dwDataSize, - dwFlags, FALSE ); -} - -static HRESULT DP_IF_SetPlayerName - ( IDirectPlay2Impl* This, DPID idPlayer, LPDPNAME lpPlayerName, - DWORD dwFlags, BOOL bAnsi ) -{ - lpPlayerList lpPList; - - TRACE( "(%p)->(0x%08x,%p,0x%08x,%u)\n", - This, idPlayer, lpPlayerName, dwFlags, bAnsi ); - - if( This->dp2->connectionInitialized == NO_PROVIDER ) - { - return DPERR_UNINITIALIZED; - } - - if( ( lpPList = DP_FindPlayer( This, idPlayer ) ) == NULL ) - { - return DPERR_INVALIDGROUP; - } - - DP_CopyDPNAMEStruct( &lpPList->lpPData->name, lpPlayerName, bAnsi ); - - /* Should send a DPMSG_SETPLAYERORGROUPNAME message */ - FIXME( "Message not sent and dwFlags ignored\n" ); - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay2AImpl_SetPlayerName - ( LPDIRECTPLAY2A iface, DPID idPlayer, LPDPNAME lpPlayerName, - DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_SetPlayerName( This, idPlayer, lpPlayerName, dwFlags, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_SetPlayerName - ( LPDIRECTPLAY2 iface, DPID idPlayer, LPDPNAME lpPlayerName, - DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_IF_SetPlayerName( This, idPlayer, lpPlayerName, dwFlags, FALSE ); -} - -static HRESULT DP_SetSessionDesc - ( IDirectPlay2Impl* This, LPCDPSESSIONDESC2 lpSessDesc, - DWORD dwFlags, BOOL bInitial, BOOL bAnsi ) -{ - DWORD dwRequiredSize; - LPDPSESSIONDESC2 lpTempSessDesc; - - TRACE( "(%p)->(%p,0x%08x,%u,%u)\n", - This, lpSessDesc, dwFlags, bInitial, bAnsi ); - - if( This->dp2->connectionInitialized == NO_PROVIDER ) - { - return DPERR_UNINITIALIZED; - } - - if( dwFlags ) - { - return DPERR_INVALIDPARAMS; - } - - /* Only the host is allowed to update the session desc */ - if( !This->dp2->bHostInterface ) - { - return DPERR_ACCESSDENIED; - } - - /* FIXME: Copy into This->dp2->lpSessionDesc */ - dwRequiredSize = DP_CalcSessionDescSize( lpSessDesc, bAnsi ); - lpTempSessDesc = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwRequiredSize ); - - if( lpTempSessDesc == NULL ) - { - return DPERR_OUTOFMEMORY; - } - - /* Free the old */ - HeapFree( GetProcessHeap(), 0, This->dp2->lpSessionDesc ); - - This->dp2->lpSessionDesc = lpTempSessDesc; - /* Set the new */ - DP_CopySessionDesc( This->dp2->lpSessionDesc, lpSessDesc, bAnsi ); - if( bInitial ) - { - /*Initializing session GUID*/ - CoCreateGuid( &(This->dp2->lpSessionDesc->guidInstance) ); - } - /* If this is an external invocation of the interface, we should be - * letting everyone know that things have changed. Otherwise this is - * just an initialization and it doesn't need to be propagated. - */ - if( !bInitial ) - { - FIXME( "Need to send a DPMSG_SETSESSIONDESC msg to everyone\n" ); - } - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay2AImpl_SetSessionDesc - ( LPDIRECTPLAY2A iface, LPDPSESSIONDESC2 lpSessDesc, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_SetSessionDesc( This, lpSessDesc, dwFlags, FALSE, TRUE ); -} - -static HRESULT WINAPI DirectPlay2WImpl_SetSessionDesc - ( LPDIRECTPLAY2 iface, LPDPSESSIONDESC2 lpSessDesc, DWORD dwFlags ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; - return DP_SetSessionDesc( This, lpSessDesc, dwFlags, FALSE, TRUE ); -} - -/* FIXME: See about merging some of this stuff with dplayx_global.c stuff */ -static DWORD DP_CalcSessionDescSize( LPCDPSESSIONDESC2 lpSessDesc, BOOL bAnsi ) -{ - DWORD dwSize = 0; - - if( lpSessDesc == NULL ) - { - /* Hmmm..don't need any size? */ - ERR( "NULL lpSessDesc\n" ); - return dwSize; - } - - dwSize += sizeof( *lpSessDesc ); - - if( bAnsi ) - { - if( lpSessDesc->u1.lpszSessionNameA ) - { - dwSize += lstrlenA( lpSessDesc->u1.lpszSessionNameA ) + 1; - } - - if( lpSessDesc->u2.lpszPasswordA ) - { - dwSize += lstrlenA( lpSessDesc->u2.lpszPasswordA ) + 1; - } - } - else /* UNICODE */ - { - if( lpSessDesc->u1.lpszSessionName ) - { - dwSize += sizeof( WCHAR ) * - ( lstrlenW( lpSessDesc->u1.lpszSessionName ) + 1 ); - } - - if( lpSessDesc->u2.lpszPassword ) - { - dwSize += sizeof( WCHAR ) * - ( lstrlenW( lpSessDesc->u2.lpszPassword ) + 1 ); - } - } - - return dwSize; -} - -/* Assumes that contiguous buffers are already allocated. */ -static void DP_CopySessionDesc( LPDPSESSIONDESC2 lpSessionDest, - LPCDPSESSIONDESC2 lpSessionSrc, BOOL bAnsi ) -{ - BYTE* lpStartOfFreeSpace; - - if( lpSessionDest == NULL ) - { - ERR( "NULL lpSessionDest\n" ); - return; - } - - CopyMemory( lpSessionDest, lpSessionSrc, sizeof( *lpSessionSrc ) ); - - lpStartOfFreeSpace = ((BYTE*)lpSessionDest) + sizeof( *lpSessionSrc ); - - if( bAnsi ) - { - if( lpSessionSrc->u1.lpszSessionNameA ) - { - lstrcpyA( (LPSTR)lpStartOfFreeSpace, - lpSessionDest->u1.lpszSessionNameA ); - lpSessionDest->u1.lpszSessionNameA = (LPSTR)lpStartOfFreeSpace; - lpStartOfFreeSpace += - lstrlenA( lpSessionDest->u1.lpszSessionNameA ) + 1; - } - - if( lpSessionSrc->u2.lpszPasswordA ) - { - lstrcpyA( (LPSTR)lpStartOfFreeSpace, - lpSessionDest->u2.lpszPasswordA ); - lpSessionDest->u2.lpszPasswordA = (LPSTR)lpStartOfFreeSpace; - } - } - else /* UNICODE */ - { - if( lpSessionSrc->u1.lpszSessionName ) - { - lstrcpyW( (LPWSTR)lpStartOfFreeSpace, - lpSessionDest->u1.lpszSessionName ); - lpSessionDest->u1.lpszSessionName = (LPWSTR)lpStartOfFreeSpace; - lpStartOfFreeSpace += sizeof(WCHAR) * - ( lstrlenW( lpSessionDest->u1.lpszSessionName ) + 1 ); - } - - if( lpSessionSrc->u2.lpszPassword ) - { - lstrcpyW( (LPWSTR)lpStartOfFreeSpace, - lpSessionDest->u2.lpszPassword ); - lpSessionDest->u2.lpszPassword = (LPWSTR)lpStartOfFreeSpace; - } - } -} - - -static HRESULT DP_IF_AddGroupToGroup - ( IDirectPlay3Impl* This, DPID idParentGroup, DPID idGroup ) -{ - lpGroupData lpGData; - lpGroupList lpNewGList; - - TRACE( "(%p)->(0x%08x,0x%08x)\n", This, idParentGroup, idGroup ); - - if( This->dp2->connectionInitialized == NO_PROVIDER ) - { - return DPERR_UNINITIALIZED; - } - - if( DP_FindAnyGroup( (IDirectPlay2AImpl*)This, idParentGroup ) == NULL ) - { - return DPERR_INVALIDGROUP; - } - - if( ( lpGData = DP_FindAnyGroup( (IDirectPlay2AImpl*)This, idGroup ) ) == NULL ) - { - return DPERR_INVALIDGROUP; - } - - /* Create a player list (ie "shortcut" ) */ - lpNewGList = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *lpNewGList ) ); - if( lpNewGList == NULL ) - { - return DPERR_CANTADDPLAYER; - } - - /* Add the shortcut */ - lpGData->uRef++; - lpNewGList->lpGData = lpGData; - - /* Add the player to the list of players for this group */ - DPQ_INSERT( lpGData->groups, lpNewGList, groups ); - - /* Send a ADDGROUPTOGROUP message */ - FIXME( "Not sending message\n" ); - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay3AImpl_AddGroupToGroup - ( LPDIRECTPLAY3A iface, DPID idParentGroup, DPID idGroup ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - return DP_IF_AddGroupToGroup( This, idParentGroup, idGroup ); -} - -static HRESULT WINAPI DirectPlay3WImpl_AddGroupToGroup - ( LPDIRECTPLAY3 iface, DPID idParentGroup, DPID idGroup ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - return DP_IF_AddGroupToGroup( This, idParentGroup, idGroup ); -} - -static HRESULT DP_IF_CreateGroupInGroup - ( IDirectPlay3Impl* This, LPVOID lpMsgHdr, DPID idParentGroup, - LPDPID lpidGroup, LPDPNAME lpGroupName, LPVOID lpData, - DWORD dwDataSize, DWORD dwFlags, BOOL bAnsi ) -{ - lpGroupData lpGParentData; - lpGroupList lpGList; - lpGroupData lpGData; - - TRACE( "(%p)->(0x%08x,%p,%p,%p,0x%08x,0x%08x,%u)\n", - This, idParentGroup, lpidGroup, lpGroupName, lpData, - dwDataSize, dwFlags, bAnsi ); - - if( This->dp2->connectionInitialized == NO_PROVIDER ) - { - return DPERR_UNINITIALIZED; - } - - /* Verify that the specified parent is valid */ - if( ( lpGParentData = DP_FindAnyGroup( (IDirectPlay2AImpl*)This, - idParentGroup ) ) == NULL - ) - { - return DPERR_INVALIDGROUP; - } - - lpGData = DP_CreateGroup( (IDirectPlay2AImpl*)This, lpidGroup, lpGroupName, - dwFlags, idParentGroup, bAnsi ); - - if( lpGData == NULL ) - { - return DPERR_CANTADDPLAYER; /* yes player not group */ - } - - /* Something else is referencing this data */ - lpGData->uRef++; - - DP_SetGroupData( lpGData, DPSET_REMOTE, lpData, dwDataSize ); - - /* The list has now been inserted into the interface group list. We now - need to put a "shortcut" to this group in the parent group */ - lpGList = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *lpGList ) ); - if( lpGList == NULL ) - { - FIXME( "Memory leak\n" ); - return DPERR_CANTADDPLAYER; /* yes player not group */ - } - - lpGList->lpGData = lpGData; - - DPQ_INSERT( lpGParentData->groups, lpGList, groups ); - - /* Let the SP know that we've created this group */ - if( This->dp2->spData.lpCB->CreateGroup ) - { - DPSP_CREATEGROUPDATA data; - - TRACE( "Calling SP CreateGroup\n" ); - - data.idGroup = *lpidGroup; - data.dwFlags = dwFlags; - data.lpSPMessageHeader = lpMsgHdr; - data.lpISP = This->dp2->spData.lpISP; - - (*This->dp2->spData.lpCB->CreateGroup)( &data ); - } - - /* Inform all other peers of the creation of a new group. If there are - * no peers keep this quiet. - */ - if( This->dp2->lpSessionDesc && - ( This->dp2->lpSessionDesc->dwFlags & DPSESSION_MULTICASTSERVER ) ) - { - DPMSG_CREATEPLAYERORGROUP msg; - - msg.dwType = DPSYS_CREATEPLAYERORGROUP; - msg.dwPlayerType = DPPLAYERTYPE_GROUP; - msg.dpId = *lpidGroup; - msg.dwCurrentPlayers = idParentGroup; /* FIXME: Incorrect? */ - msg.lpData = lpData; - msg.dwDataSize = dwDataSize; - msg.dpnName = *lpGroupName; - - /* FIXME: Correct to just use send effectively? */ - /* FIXME: Should size include data w/ message or just message "header" */ - /* FIXME: Check return code */ - DP_SendEx( (IDirectPlay2Impl*)This, - DPID_SERVERPLAYER, DPID_ALLPLAYERS, 0, &msg, sizeof( msg ), - 0, 0, NULL, NULL, bAnsi ); - } - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay3AImpl_CreateGroupInGroup - ( LPDIRECTPLAY3A iface, DPID idParentGroup, LPDPID lpidGroup, - LPDPNAME lpGroupName, LPVOID lpData, DWORD dwDataSize, - DWORD dwFlags ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - - *lpidGroup = DPID_UNKNOWN; - - return DP_IF_CreateGroupInGroup( This, NULL, idParentGroup, lpidGroup, - lpGroupName, lpData, dwDataSize, dwFlags, - TRUE ); -} - -static HRESULT WINAPI DirectPlay3WImpl_CreateGroupInGroup - ( LPDIRECTPLAY3 iface, DPID idParentGroup, LPDPID lpidGroup, - LPDPNAME lpGroupName, LPVOID lpData, DWORD dwDataSize, - DWORD dwFlags ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - - *lpidGroup = DPID_UNKNOWN; - - return DP_IF_CreateGroupInGroup( This, NULL, idParentGroup, lpidGroup, - lpGroupName, lpData, dwDataSize, - dwFlags, FALSE ); -} - -static HRESULT DP_IF_DeleteGroupFromGroup - ( IDirectPlay3Impl* This, DPID idParentGroup, DPID idGroup ) -{ - lpGroupList lpGList; - lpGroupData lpGParentData; - - TRACE("(%p)->(0x%08x,0x%08x)\n", This, idParentGroup, idGroup ); - - /* Is the parent group valid? */ - if( ( lpGParentData = DP_FindAnyGroup( (IDirectPlay2AImpl*)This, idParentGroup ) ) == NULL ) - { - return DPERR_INVALIDGROUP; - } - - /* Remove the group from the parent group queue */ - DPQ_REMOVE_ENTRY( lpGParentData->groups, groups, lpGData->dpid, ==, idGroup, lpGList ); - - if( lpGList == NULL ) - { - return DPERR_INVALIDGROUP; - } - - /* Decrement the ref count */ - lpGList->lpGData->uRef--; - - /* Free up the list item */ - HeapFree( GetProcessHeap(), 0, lpGList ); - - /* Should send a DELETEGROUPFROMGROUP message */ - FIXME( "message not sent\n" ); - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay3AImpl_DeleteGroupFromGroup - ( LPDIRECTPLAY3 iface, DPID idParentGroup, DPID idGroup ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - return DP_IF_DeleteGroupFromGroup( This, idParentGroup, idGroup ); -} - -static HRESULT WINAPI DirectPlay3WImpl_DeleteGroupFromGroup - ( LPDIRECTPLAY3 iface, DPID idParentGroup, DPID idGroup ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - return DP_IF_DeleteGroupFromGroup( This, idParentGroup, idGroup ); -} - -static BOOL DP_BuildSPCompoundAddr( LPGUID lpcSpGuid, LPVOID* lplpAddrBuf, - LPDWORD lpdwBufSize ) -{ - DPCOMPOUNDADDRESSELEMENT dpCompoundAddress; - HRESULT hr; - - dpCompoundAddress.dwDataSize = sizeof( GUID ); - dpCompoundAddress.guidDataType = DPAID_ServiceProvider; - dpCompoundAddress.lpData = lpcSpGuid; - - *lplpAddrBuf = NULL; - *lpdwBufSize = 0; - - hr = DPL_CreateCompoundAddress( &dpCompoundAddress, 1, *lplpAddrBuf, - lpdwBufSize, TRUE ); - - if( hr != DPERR_BUFFERTOOSMALL ) - { - ERR( "can't get buffer size: %s\n", DPLAYX_HresultToString( hr ) ); - return FALSE; - } - - /* Now allocate the buffer */ - *lplpAddrBuf = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - *lpdwBufSize ); - - hr = DPL_CreateCompoundAddress( &dpCompoundAddress, 1, *lplpAddrBuf, - lpdwBufSize, TRUE ); - if( FAILED(hr) ) - { - ERR( "can't create address: %s\n", DPLAYX_HresultToString( hr ) ); - return FALSE; - } - - return TRUE; -} - -static HRESULT WINAPI DirectPlay3AImpl_EnumConnections - ( LPDIRECTPLAY3A iface, LPCGUID lpguidApplication, LPDPENUMCONNECTIONSCALLBACK lpEnumCallback, LPVOID lpContext, DWORD dwFlags ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - TRACE("(%p)->(%p,%p,%p,0x%08x)\n", This, lpguidApplication, lpEnumCallback, lpContext, dwFlags ); - - /* A default dwFlags (0) is backwards compatible -- DPCONNECTION_DIRECTPLAY */ - if( dwFlags == 0 ) - { - dwFlags = DPCONNECTION_DIRECTPLAY; - } - - if( ! ( ( dwFlags & DPCONNECTION_DIRECTPLAY ) || - ( dwFlags & DPCONNECTION_DIRECTPLAYLOBBY ) ) - ) - { - return DPERR_INVALIDFLAGS; - } - - if( !lpEnumCallback ) - { - return DPERR_INVALIDPARAMS; - } - - /* Enumerate DirectPlay service providers */ - if( dwFlags & DPCONNECTION_DIRECTPLAY ) - { - HKEY hkResult; - LPCSTR searchSubKey = "SOFTWARE\\Microsoft\\DirectPlay\\Service Providers"; - LPCSTR guidDataSubKey = "Guid"; - char subKeyName[51]; - DWORD dwIndex, sizeOfSubKeyName=50; - FILETIME filetime; - - /* Need to loop over the service providers in the registry */ - if( RegOpenKeyExA( HKEY_LOCAL_MACHINE, searchSubKey, - 0, KEY_READ, &hkResult ) != ERROR_SUCCESS ) - { - /* Hmmm. Does this mean that there are no service providers? */ - ERR(": no service providers?\n"); - return DP_OK; - } - - - /* Traverse all the service providers we have available */ - for( dwIndex=0; - RegEnumKeyExA( hkResult, dwIndex, subKeyName, &sizeOfSubKeyName, - NULL, NULL, NULL, &filetime ) != ERROR_NO_MORE_ITEMS; - ++dwIndex, sizeOfSubKeyName=51 ) - { - - HKEY hkServiceProvider; - GUID serviceProviderGUID; - DWORD returnTypeGUID, sizeOfReturnBuffer = 50; - char returnBuffer[51]; - WCHAR buff[51]; - DPNAME dpName; - BOOL bBuildPass; - - LPVOID lpAddressBuffer = NULL; - DWORD dwAddressBufferSize = 0; - - TRACE(" this time through: %s\n", subKeyName ); - - /* Get a handle for this particular service provider */ - if( RegOpenKeyExA( hkResult, subKeyName, 0, KEY_READ, - &hkServiceProvider ) != ERROR_SUCCESS ) - { - ERR(": what the heck is going on?\n" ); - continue; - } - - if( RegQueryValueExA( hkServiceProvider, guidDataSubKey, - NULL, &returnTypeGUID, (LPBYTE)returnBuffer, - &sizeOfReturnBuffer ) != ERROR_SUCCESS ) - { - ERR(": missing GUID registry data members\n" ); - RegCloseKey(hkServiceProvider); - continue; - } - RegCloseKey(hkServiceProvider); - - /* FIXME: Check return types to ensure we're interpreting data right */ - MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) ); - CLSIDFromString( buff, &serviceProviderGUID ); - /* FIXME: Have I got a memory leak on the serviceProviderGUID? */ - - /* Fill in the DPNAME struct for the service provider */ - dpName.dwSize = sizeof( dpName ); - dpName.dwFlags = 0; - dpName.u1.lpszShortNameA = subKeyName; - dpName.u2.lpszLongNameA = NULL; - - /* Create the compound address for the service provider. - * NOTE: This is a gruesome architectural scar right now. DP - * uses DPL and DPL uses DP. Nasty stuff. This may be why the - * native dll just gets around this little bit by allocating an - * 80 byte buffer which isn't even filled with a valid compound - * address. Oh well. Creating a proper compound address is the - * way to go anyways despite this method taking slightly more - * heap space and realtime :) */ - - bBuildPass = DP_BuildSPCompoundAddr( &serviceProviderGUID, - &lpAddressBuffer, - &dwAddressBufferSize ); - if( !bBuildPass ) - { - ERR( "Can't build compound addr\n" ); - return DPERR_GENERIC; - } - - /* The enumeration will return FALSE if we are not to continue */ - if( !lpEnumCallback( &serviceProviderGUID, lpAddressBuffer, dwAddressBufferSize, - &dpName, dwFlags, lpContext ) ) - { - return DP_OK; - } - } - } - - /* Enumerate DirectPlayLobby service providers */ - if( dwFlags & DPCONNECTION_DIRECTPLAYLOBBY ) - { - HKEY hkResult; - LPCSTR searchSubKey = "SOFTWARE\\Microsoft\\DirectPlay\\Lobby Providers"; - LPCSTR guidDataSubKey = "Guid"; - char subKeyName[51]; - DWORD dwIndex, sizeOfSubKeyName=50; - FILETIME filetime; - - /* Need to loop over the service providers in the registry */ - if( RegOpenKeyExA( HKEY_LOCAL_MACHINE, searchSubKey, - 0, KEY_READ, &hkResult ) != ERROR_SUCCESS ) - { - /* Hmmm. Does this mean that there are no service providers? */ - ERR(": no service providers?\n"); - return DP_OK; - } - - - /* Traverse all the lobby providers we have available */ - for( dwIndex=0; - RegEnumKeyExA( hkResult, dwIndex, subKeyName, &sizeOfSubKeyName, - NULL, NULL, NULL, &filetime ) != ERROR_NO_MORE_ITEMS; - ++dwIndex, sizeOfSubKeyName=51 ) - { - - HKEY hkServiceProvider; - GUID serviceProviderGUID; - DWORD returnTypeGUID, sizeOfReturnBuffer = 50; - char returnBuffer[51]; - WCHAR buff[51]; - DPNAME dpName; - HRESULT hr; - - DPCOMPOUNDADDRESSELEMENT dpCompoundAddress; - LPVOID lpAddressBuffer = NULL; - DWORD dwAddressBufferSize = 0; - - TRACE(" this time through: %s\n", subKeyName ); - - /* Get a handle for this particular service provider */ - if( RegOpenKeyExA( hkResult, subKeyName, 0, KEY_READ, - &hkServiceProvider ) != ERROR_SUCCESS ) - { - ERR(": what the heck is going on?\n" ); - continue; - } - - if( RegQueryValueExA( hkServiceProvider, guidDataSubKey, - NULL, &returnTypeGUID, (LPBYTE)returnBuffer, - &sizeOfReturnBuffer ) != ERROR_SUCCESS ) - { - ERR(": missing GUID registry data members\n" ); - RegCloseKey(hkServiceProvider); - continue; - } - RegCloseKey(hkServiceProvider); - - /* FIXME: Check return types to ensure we're interpreting data right */ - MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) ); - CLSIDFromString( buff, &serviceProviderGUID ); - /* FIXME: Have I got a memory leak on the serviceProviderGUID? */ - - /* Fill in the DPNAME struct for the service provider */ - dpName.dwSize = sizeof( dpName ); - dpName.dwFlags = 0; - dpName.u1.lpszShortNameA = subKeyName; - dpName.u2.lpszLongNameA = NULL; - - /* Create the compound address for the service provider. - NOTE: This is a gruesome architectural scar right now. DP uses DPL and DPL uses DP - nast stuff. This may be why the native dll just gets around this little bit by - allocating an 80 byte buffer which isn't even a filled with a valid compound - address. Oh well. Creating a proper compound address is the way to go anyways - despite this method taking slightly more heap space and realtime :) */ - - dpCompoundAddress.guidDataType = DPAID_LobbyProvider; - dpCompoundAddress.dwDataSize = sizeof( GUID ); - dpCompoundAddress.lpData = &serviceProviderGUID; - - if( ( hr = DPL_CreateCompoundAddress( &dpCompoundAddress, 1, lpAddressBuffer, - &dwAddressBufferSize, TRUE ) ) != DPERR_BUFFERTOOSMALL ) - { - ERR( "can't get buffer size: %s\n", DPLAYX_HresultToString( hr ) ); - return hr; - } - - /* Now allocate the buffer */ - lpAddressBuffer = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwAddressBufferSize ); - - if( ( hr = DPL_CreateCompoundAddress( &dpCompoundAddress, 1, lpAddressBuffer, - &dwAddressBufferSize, TRUE ) ) != DP_OK ) - { - ERR( "can't create address: %s\n", DPLAYX_HresultToString( hr ) ); - HeapFree( GetProcessHeap(), 0, lpAddressBuffer ); - return hr; - } - - /* The enumeration will return FALSE if we are not to continue */ - if( !lpEnumCallback( &serviceProviderGUID, lpAddressBuffer, dwAddressBufferSize, - &dpName, dwFlags, lpContext ) ) - { - HeapFree( GetProcessHeap(), 0, lpAddressBuffer ); - return DP_OK; - } - HeapFree( GetProcessHeap(), 0, lpAddressBuffer ); - } - } - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay3WImpl_EnumConnections - ( LPDIRECTPLAY3 iface, LPCGUID lpguidApplication, LPDPENUMCONNECTIONSCALLBACK lpEnumCallback, LPVOID lpContext, DWORD dwFlags ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - FIXME("(%p)->(%p,%p,%p,0x%08x): stub\n", This, lpguidApplication, lpEnumCallback, lpContext, dwFlags ); - return DP_OK; -} - -static HRESULT DP_IF_EnumGroupsInGroup - ( IDirectPlay3AImpl* This, DPID idGroup, LPGUID lpguidInstance, - LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, - LPVOID lpContext, DWORD dwFlags, BOOL bAnsi ) -{ - lpGroupList lpGList; - lpGroupData lpGData; - - FIXME( "(%p)->(0x%08x,%p,%p,%p,0x%08x,%u): semi stub\n", - This, idGroup, lpguidInstance, lpEnumPlayersCallback2, - lpContext, dwFlags, bAnsi ); - - if( This->dp2->connectionInitialized == NO_PROVIDER ) - { - return DPERR_UNINITIALIZED; - } - - if( ( lpGData = DP_FindAnyGroup( (IDirectPlay2AImpl*)This, idGroup ) ) == NULL ) - { - return DPERR_INVALIDGROUP; - } - - if( DPQ_IS_EMPTY( lpGData->groups ) ) - { - return DP_OK; - } - - lpGList = DPQ_FIRST( lpGData->groups ); - - for( ;; ) - { - /* FIXME: Should check dwFlags for match here */ - - if( !(*lpEnumPlayersCallback2)( lpGList->lpGData->dpid, DPPLAYERTYPE_GROUP, - &lpGList->lpGData->name, dwFlags, - lpContext ) ) - { - return DP_OK; /* User requested break */ - } - - if( DPQ_IS_ENDOFLIST( lpGList->groups ) ) - { - break; - } - - lpGList = DPQ_NEXT( lpGList->groups ); - - } - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay3AImpl_EnumGroupsInGroup - ( LPDIRECTPLAY3A iface, DPID idGroup, LPGUID lpguidInstance, - LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, LPVOID lpContext, - DWORD dwFlags ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - return DP_IF_EnumGroupsInGroup( This, idGroup, lpguidInstance, - lpEnumPlayersCallback2, lpContext, dwFlags, - TRUE ); -} - -static HRESULT WINAPI DirectPlay3WImpl_EnumGroupsInGroup - ( LPDIRECTPLAY3A iface, DPID idGroup, LPGUID lpguidInstance, - LPDPENUMPLAYERSCALLBACK2 lpEnumPlayersCallback2, LPVOID lpContext, - DWORD dwFlags ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - return DP_IF_EnumGroupsInGroup( This, idGroup, lpguidInstance, - lpEnumPlayersCallback2, lpContext, dwFlags, - FALSE ); -} - -static HRESULT WINAPI DirectPlay3AImpl_GetGroupConnectionSettings - ( LPDIRECTPLAY3A iface, DWORD dwFlags, DPID idGroup, LPVOID lpData, LPDWORD lpdwDataSize ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - FIXME("(%p)->(0x%08x,0x%08x,%p,%p): stub\n", This, dwFlags, idGroup, lpData, lpdwDataSize ); - return DP_OK; -} - -static HRESULT WINAPI DirectPlay3WImpl_GetGroupConnectionSettings - ( LPDIRECTPLAY3 iface, DWORD dwFlags, DPID idGroup, LPVOID lpData, LPDWORD lpdwDataSize ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - FIXME("(%p)->(0x%08x,0x%08x,%p,%p): stub\n", This, dwFlags, idGroup, lpData, lpdwDataSize ); - return DP_OK; -} - -static BOOL CALLBACK DP_GetSpLpGuidFromCompoundAddress( - REFGUID guidDataType, - DWORD dwDataSize, - LPCVOID lpData, - LPVOID lpContext ) -{ - /* Looking for the GUID of the provider to load */ - if( ( IsEqualGUID( guidDataType, &DPAID_ServiceProvider ) ) || - ( IsEqualGUID( guidDataType, &DPAID_LobbyProvider ) ) - ) - { - TRACE( "Found SP/LP (%s) %s (data size = 0x%08x)\n", - debugstr_guid( guidDataType ), debugstr_guid( lpData ), dwDataSize ); - - if( dwDataSize != sizeof( GUID ) ) - { - ERR( "Invalid sp/lp guid size 0x%08x\n", dwDataSize ); - } - - memcpy( lpContext, lpData, dwDataSize ); - - /* There shouldn't be more than 1 GUID/compound address */ - return FALSE; - } - - /* Still waiting for what we want */ - return TRUE; -} - - -/* Find and perform a LoadLibrary on the requested SP or LP GUID */ -static HMODULE DP_LoadSP( LPCGUID lpcGuid, LPSPINITDATA lpSpData, LPBOOL lpbIsDpSp ) -{ - UINT i; - LPCSTR spSubKey = "SOFTWARE\\Microsoft\\DirectPlay\\Service Providers"; - LPCSTR lpSubKey = "SOFTWARE\\Microsoft\\DirectPlay\\Lobby Providers"; - LPCSTR guidDataSubKey = "Guid"; - LPCSTR majVerDataSubKey = "dwReserved1"; - LPCSTR minVerDataSubKey = "dwReserved2"; - LPCSTR pathSubKey = "Path"; - - TRACE( " request to load %s\n", debugstr_guid( lpcGuid ) ); - - /* FIXME: Cloned code with a quick hack. */ - for( i=0; i<2; i++ ) - { - HKEY hkResult; - LPCSTR searchSubKey; - char subKeyName[51]; - DWORD dwIndex, sizeOfSubKeyName=50; - FILETIME filetime; - - (i == 0) ? (searchSubKey = spSubKey ) : (searchSubKey = lpSubKey ); - *lpbIsDpSp = (i == 0) ? TRUE : FALSE; - - - /* Need to loop over the service providers in the registry */ - if( RegOpenKeyExA( HKEY_LOCAL_MACHINE, searchSubKey, - 0, KEY_READ, &hkResult ) != ERROR_SUCCESS ) - { - /* Hmmm. Does this mean that there are no service providers? */ - ERR(": no service providers?\n"); - return 0; - } - - /* Traverse all the service providers we have available */ - for( dwIndex=0; - RegEnumKeyExA( hkResult, dwIndex, subKeyName, &sizeOfSubKeyName, - NULL, NULL, NULL, &filetime ) != ERROR_NO_MORE_ITEMS; - ++dwIndex, sizeOfSubKeyName=51 ) - { - - HKEY hkServiceProvider; - GUID serviceProviderGUID; - DWORD returnType, sizeOfReturnBuffer = 255; - char returnBuffer[256]; - WCHAR buff[51]; - DWORD dwTemp, len; - - TRACE(" this time through: %s\n", subKeyName ); - - /* Get a handle for this particular service provider */ - if( RegOpenKeyExA( hkResult, subKeyName, 0, KEY_READ, - &hkServiceProvider ) != ERROR_SUCCESS ) - { - ERR(": what the heck is going on?\n" ); - continue; - } - - if( RegQueryValueExA( hkServiceProvider, guidDataSubKey, - NULL, &returnType, (LPBYTE)returnBuffer, - &sizeOfReturnBuffer ) != ERROR_SUCCESS ) - { - ERR(": missing GUID registry data members\n" ); - continue; - } - - /* FIXME: Check return types to ensure we're interpreting data right */ - MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) ); - CLSIDFromString( buff, &serviceProviderGUID ); - /* FIXME: Have I got a memory leak on the serviceProviderGUID? */ - - /* Determine if this is the Service Provider that the user asked for */ - if( !IsEqualGUID( &serviceProviderGUID, lpcGuid ) ) - { - continue; - } - - if( i == 0 ) /* DP SP */ - { - len = MultiByteToWideChar( CP_ACP, 0, subKeyName, -1, NULL, 0 ); - lpSpData->lpszName = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) ); - MultiByteToWideChar( CP_ACP, 0, subKeyName, -1, lpSpData->lpszName, len ); - } - - sizeOfReturnBuffer = 255; - - /* Get dwReserved1 */ - if( RegQueryValueExA( hkServiceProvider, majVerDataSubKey, - NULL, &returnType, (LPBYTE)returnBuffer, - &sizeOfReturnBuffer ) != ERROR_SUCCESS ) - { - ERR(": missing dwReserved1 registry data members\n") ; - continue; - } - - if( i == 0 ) - memcpy( &lpSpData->dwReserved1, returnBuffer, sizeof(lpSpData->dwReserved1) ); - - sizeOfReturnBuffer = 255; - - /* Get dwReserved2 */ - if( RegQueryValueExA( hkServiceProvider, minVerDataSubKey, - NULL, &returnType, (LPBYTE)returnBuffer, - &sizeOfReturnBuffer ) != ERROR_SUCCESS ) - { - ERR(": missing dwReserved1 registry data members\n") ; - continue; - } - - if( i == 0 ) - memcpy( &lpSpData->dwReserved2, returnBuffer, sizeof(lpSpData->dwReserved2) ); - - sizeOfReturnBuffer = 255; - - /* Get the path for this service provider */ - if( ( dwTemp = RegQueryValueExA( hkServiceProvider, pathSubKey, - NULL, NULL, (LPBYTE)returnBuffer, - &sizeOfReturnBuffer ) ) != ERROR_SUCCESS ) - { - ERR(": missing PATH registry data members: 0x%08x\n", dwTemp ); - continue; - } - - TRACE( "Loading %s\n", returnBuffer ); - return LoadLibraryA( returnBuffer ); - } - } - - return 0; -} - -static -HRESULT DP_InitializeDPSP( IDirectPlay3Impl* This, HMODULE hServiceProvider ) -{ - HRESULT hr; - LPDPSP_SPINIT SPInit; - - /* Initialize the service provider by calling SPInit */ - SPInit = (LPDPSP_SPINIT)GetProcAddress( hServiceProvider, "SPInit" ); - - if( SPInit == NULL ) - { - ERR( "Service provider doesn't provide SPInit interface?\n" ); - FreeLibrary( hServiceProvider ); - return DPERR_UNAVAILABLE; - } - - TRACE( "Calling SPInit (DP SP entry point)\n" ); - - hr = (*SPInit)( &This->dp2->spData ); - - if( FAILED(hr) ) - { - ERR( "DP SP Initialization failed: %s\n", DPLAYX_HresultToString(hr) ); - FreeLibrary( hServiceProvider ); - return hr; - } - - /* FIXME: Need to verify the sanity of the returned callback table - * using IsBadCodePtr */ - This->dp2->bSPInitialized = TRUE; - - /* This interface is now initialized as a DP object */ - This->dp2->connectionInitialized = DP_SERVICE_PROVIDER; - - /* Store the handle of the module so that we can unload it later */ - This->dp2->hServiceProvider = hServiceProvider; - - return hr; -} - -static -HRESULT DP_InitializeDPLSP( IDirectPlay3Impl* This, HMODULE hLobbyProvider ) -{ - HRESULT hr; - LPSP_INIT DPLSPInit; - - /* Initialize the service provider by calling SPInit */ - DPLSPInit = (LPSP_INIT)GetProcAddress( hLobbyProvider, "DPLSPInit" ); - - if( DPLSPInit == NULL ) - { - ERR( "Service provider doesn't provide DPLSPInit interface?\n" ); - FreeLibrary( hLobbyProvider ); - return DPERR_UNAVAILABLE; - } - - TRACE( "Calling DPLSPInit (DPL SP entry point)\n" ); - - hr = (*DPLSPInit)( &This->dp2->dplspData ); - - if( FAILED(hr) ) - { - ERR( "DPL SP Initialization failed: %s\n", DPLAYX_HresultToString(hr) ); - FreeLibrary( hLobbyProvider ); - return hr; - } - - /* FIXME: Need to verify the sanity of the returned callback table - * using IsBadCodePtr */ - - This->dp2->bDPLSPInitialized = TRUE; - - /* This interface is now initialized as a lobby object */ - This->dp2->connectionInitialized = DP_LOBBY_PROVIDER; - - /* Store the handle of the module so that we can unload it later */ - This->dp2->hDPLobbyProvider = hLobbyProvider; - - return hr; -} - -static HRESULT DP_IF_InitializeConnection - ( IDirectPlay3Impl* This, LPVOID lpConnection, DWORD dwFlags, BOOL bAnsi ) -{ - HMODULE hServiceProvider; - HRESULT hr; - GUID guidSP; - const DWORD dwAddrSize = 80; /* FIXME: Need to calculate it correctly */ - BOOL bIsDpSp; /* TRUE if Direct Play SP, FALSE if Direct Play Lobby SP */ - - TRACE("(%p)->(%p,0x%08x,%u)\n", This, lpConnection, dwFlags, bAnsi ); - - if ( lpConnection == NULL ) - { - return DPERR_INVALIDPARAMS; - } - - if( dwFlags != 0 ) - { - return DPERR_INVALIDFLAGS; - } - - if( This->dp2->connectionInitialized != NO_PROVIDER ) - { - return DPERR_ALREADYINITIALIZED; - } - - /* Find out what the requested SP is and how large this buffer is */ - hr = DPL_EnumAddress( DP_GetSpLpGuidFromCompoundAddress, lpConnection, - dwAddrSize, &guidSP ); - - if( FAILED(hr) ) - { - ERR( "Invalid compound address?\n" ); - return DPERR_UNAVAILABLE; - } - - /* Load the service provider */ - hServiceProvider = DP_LoadSP( &guidSP, &This->dp2->spData, &bIsDpSp ); - - if( hServiceProvider == 0 ) - { - ERR( "Unable to load service provider %s\n", debugstr_guid(&guidSP) ); - return DPERR_UNAVAILABLE; - } - - if( bIsDpSp ) - { - /* Fill in what we can of the Service Provider required information. - * The rest was be done in DP_LoadSP - */ - This->dp2->spData.lpAddress = lpConnection; - This->dp2->spData.dwAddressSize = dwAddrSize; - This->dp2->spData.lpGuid = &guidSP; - - hr = DP_InitializeDPSP( This, hServiceProvider ); - } - else - { - This->dp2->dplspData.lpAddress = lpConnection; - - hr = DP_InitializeDPLSP( This, hServiceProvider ); - } - - if( FAILED(hr) ) - { - return hr; - } - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay3AImpl_InitializeConnection - ( LPDIRECTPLAY3A iface, LPVOID lpConnection, DWORD dwFlags ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - - /* This may not be externally invoked once either an SP or LP is initialized */ - if( This->dp2->connectionInitialized != NO_PROVIDER ) - { - return DPERR_ALREADYINITIALIZED; - } - - return DP_IF_InitializeConnection( This, lpConnection, dwFlags, TRUE ); -} - -static HRESULT WINAPI DirectPlay3WImpl_InitializeConnection - ( LPDIRECTPLAY3 iface, LPVOID lpConnection, DWORD dwFlags ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - - /* This may not be externally invoked once either an SP or LP is initialized */ - if( This->dp2->connectionInitialized != NO_PROVIDER ) - { - return DPERR_ALREADYINITIALIZED; - } - - return DP_IF_InitializeConnection( This, lpConnection, dwFlags, FALSE ); -} - -static HRESULT WINAPI DirectPlay3AImpl_SecureOpen - ( LPDIRECTPLAY3A iface, LPCDPSESSIONDESC2 lpsd, DWORD dwFlags, - LPCDPSECURITYDESC lpSecurity, LPCDPCREDENTIALS lpCredentials ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; /* Yes a dp 2 interface */ - return DP_SecureOpen( This, lpsd, dwFlags, lpSecurity, lpCredentials, TRUE ); -} - -static HRESULT WINAPI DirectPlay3WImpl_SecureOpen - ( LPDIRECTPLAY3 iface, LPCDPSESSIONDESC2 lpsd, DWORD dwFlags, - LPCDPSECURITYDESC lpSecurity, LPCDPCREDENTIALS lpCredentials ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; /* Yes a dp 2 interface */ - return DP_SecureOpen( This, lpsd, dwFlags, lpSecurity, lpCredentials, FALSE ); -} - -static HRESULT WINAPI DirectPlay3AImpl_SendChatMessage - ( LPDIRECTPLAY3A iface, DPID idFrom, DPID idTo, DWORD dwFlags, LPDPCHAT lpChatMessage ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - FIXME("(%p)->(0x%08x,0x%08x,0x%08x,%p): stub\n", This, idFrom, idTo, dwFlags, lpChatMessage ); - return DP_OK; -} - -static HRESULT WINAPI DirectPlay3WImpl_SendChatMessage - ( LPDIRECTPLAY3 iface, DPID idFrom, DPID idTo, DWORD dwFlags, LPDPCHAT lpChatMessage ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - FIXME("(%p)->(0x%08x,0x%08x,0x%08x,%p): stub\n", This, idFrom, idTo, dwFlags, lpChatMessage ); - return DP_OK; -} - -static HRESULT WINAPI DirectPlay3AImpl_SetGroupConnectionSettings - ( LPDIRECTPLAY3A iface, DWORD dwFlags, DPID idGroup, LPDPLCONNECTION lpConnection ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - FIXME("(%p)->(0x%08x,0x%08x,%p): stub\n", This, dwFlags, idGroup, lpConnection ); - return DP_OK; -} - -static HRESULT WINAPI DirectPlay3WImpl_SetGroupConnectionSettings - ( LPDIRECTPLAY3 iface, DWORD dwFlags, DPID idGroup, LPDPLCONNECTION lpConnection ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - FIXME("(%p)->(0x%08x,0x%08x,%p): stub\n", This, dwFlags, idGroup, lpConnection ); - return DP_OK; -} - -static HRESULT WINAPI DirectPlay3AImpl_StartSession - ( LPDIRECTPLAY3A iface, DWORD dwFlags, DPID idGroup ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - FIXME("(%p)->(0x%08x,0x%08x): stub\n", This, dwFlags, idGroup ); - return DP_OK; -} - -static HRESULT WINAPI DirectPlay3WImpl_StartSession - ( LPDIRECTPLAY3 iface, DWORD dwFlags, DPID idGroup ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - FIXME("(%p)->(0x%08x,0x%08x): stub\n", This, dwFlags, idGroup ); - return DP_OK; -} - -static HRESULT WINAPI DirectPlay3AImpl_GetGroupFlags - ( LPDIRECTPLAY3A iface, DPID idGroup, LPDWORD lpdwFlags ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - FIXME("(%p)->(0x%08x,%p): stub\n", This, idGroup, lpdwFlags ); - return DP_OK; -} - -static HRESULT WINAPI DirectPlay3WImpl_GetGroupFlags - ( LPDIRECTPLAY3 iface, DPID idGroup, LPDWORD lpdwFlags ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - FIXME("(%p)->(0x%08x,%p): stub\n", This, idGroup, lpdwFlags ); - return DP_OK; -} - -static HRESULT DP_IF_GetGroupParent - ( IDirectPlay3AImpl* This, DPID idGroup, LPDPID lpidGroup, - BOOL bAnsi ) -{ - lpGroupData lpGData; - - TRACE("(%p)->(0x%08x,%p,%u)\n", This, idGroup, lpidGroup, bAnsi ); - - if( ( lpGData = DP_FindAnyGroup( (IDirectPlay2AImpl*)This, idGroup ) ) == NULL ) - { - return DPERR_INVALIDGROUP; - } - - *lpidGroup = lpGData->dpid; - - return DP_OK; -} - -static HRESULT WINAPI DirectPlay3AImpl_GetGroupParent - ( LPDIRECTPLAY3A iface, DPID idGroup, LPDPID lpidGroup ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - return DP_IF_GetGroupParent( This, idGroup, lpidGroup, TRUE ); -} -static HRESULT WINAPI DirectPlay3WImpl_GetGroupParent - ( LPDIRECTPLAY3 iface, DPID idGroup, LPDPID lpidGroup ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - return DP_IF_GetGroupParent( This, idGroup, lpidGroup, FALSE ); -} - -static HRESULT WINAPI DirectPlay3AImpl_GetPlayerAccount - ( LPDIRECTPLAY3A iface, DPID idPlayer, DWORD dwFlags, LPVOID lpData, LPDWORD lpdwDataSize ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - FIXME("(%p)->(0x%08x,0x%08x,%p,%p): stub\n", This, idPlayer, dwFlags, lpData, lpdwDataSize ); - return DP_OK; -} - -static HRESULT WINAPI DirectPlay3WImpl_GetPlayerAccount - ( LPDIRECTPLAY3 iface, DPID idPlayer, DWORD dwFlags, LPVOID lpData, LPDWORD lpdwDataSize ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - FIXME("(%p)->(0x%08x,0x%08x,%p,%p): stub\n", This, idPlayer, dwFlags, lpData, lpdwDataSize ); - return DP_OK; -} - -static HRESULT WINAPI DirectPlay3AImpl_GetPlayerFlags - ( LPDIRECTPLAY3A iface, DPID idPlayer, LPDWORD lpdwFlags ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - FIXME("(%p)->(0x%08x,%p): stub\n", This, idPlayer, lpdwFlags ); - return DP_OK; -} - -static HRESULT WINAPI DirectPlay3WImpl_GetPlayerFlags - ( LPDIRECTPLAY3 iface, DPID idPlayer, LPDWORD lpdwFlags ) -{ - IDirectPlay3Impl *This = (IDirectPlay3Impl *)iface; - FIXME("(%p)->(0x%08x,%p): stub\n", This, idPlayer, lpdwFlags ); - return DP_OK; -} - -static HRESULT WINAPI DirectPlay4AImpl_GetGroupOwner - ( LPDIRECTPLAY4A iface, DPID idGroup, LPDPID lpidGroupOwner ) -{ - IDirectPlay4Impl *This = (IDirectPlay4Impl *)iface; - FIXME("(%p)->(0x%08x,%p): stub\n", This, idGroup, lpidGroupOwner ); - return DP_OK; -} - -static HRESULT WINAPI DirectPlay4WImpl_GetGroupOwner - ( LPDIRECTPLAY4 iface, DPID idGroup, LPDPID lpidGroupOwner ) -{ - IDirectPlay4Impl *This = (IDirectPlay4Impl *)iface; - FIXME("(%p)->(0x%08x,%p): stub\n", This, idGroup, lpidGroupOwner ); - return DP_OK; -} - -static HRESULT WINAPI DirectPlay4AImpl_SetGroupOwner - ( LPDIRECTPLAY4A iface, DPID idGroup , DPID idGroupOwner ) -{ - IDirectPlay4Impl *This = (IDirectPlay4Impl *)iface; - FIXME("(%p)->(0x%08x,0x%08x): stub\n", This, idGroup, idGroupOwner ); - return DP_OK; -} - -static HRESULT WINAPI DirectPlay4WImpl_SetGroupOwner - ( LPDIRECTPLAY4 iface, DPID idGroup , DPID idGroupOwner ) -{ - IDirectPlay4Impl *This = (IDirectPlay4Impl *)iface; - FIXME("(%p)->(0x%08x,0x%08x): stub\n", This, idGroup, idGroupOwner ); - return DP_OK; -} - -static HRESULT DP_SendEx - ( IDirectPlay2Impl* This, DPID idFrom, DPID idTo, DWORD dwFlags, - LPVOID lpData, DWORD dwDataSize, DWORD dwPriority, DWORD dwTimeout, - LPVOID lpContext, LPDWORD lpdwMsgID, BOOL bAnsi ) -{ - BOOL bValidDestination = FALSE; - - FIXME( "(%p)->(0x%08x,0x%08x,0x%08x,%p,0x%08x,0x%08x,0x%08x,%p,%p,%u)" - ": stub\n", - This, idFrom, idTo, dwFlags, lpData, dwDataSize, dwPriority, - dwTimeout, lpContext, lpdwMsgID, bAnsi ); - - if( This->dp2->connectionInitialized == NO_PROVIDER ) - { - return DPERR_UNINITIALIZED; - } - - /* FIXME: Add parameter checking */ - /* FIXME: First call to this needs to acquire a message id which will be - * used for multiple sends - */ - - /* NOTE: Can't send messages to yourself - this will be trapped in receive */ - - /* Verify that the message is being sent from a valid local player. The - * from player may be anonymous DPID_UNKNOWN - */ - if( idFrom != DPID_UNKNOWN ) - { - if( DP_FindPlayer( This, idFrom ) == NULL ) - { - WARN( "INFO: Invalid from player 0x%08x\n", idFrom ); - return DPERR_INVALIDPLAYER; - } - } - - /* Verify that the message is being sent to a valid player, group or to - * everyone. If it's valid, send it to those players. - */ - if( idTo == DPID_ALLPLAYERS ) - { - bValidDestination = TRUE; - - /* See if SP has the ability to multicast. If so, use it */ - if( This->dp2->spData.lpCB->SendToGroupEx ) - { - FIXME( "Use group sendex to group 0\n" ); - } - else if( This->dp2->spData.lpCB->SendToGroup ) /* obsolete interface */ - { - FIXME( "Use obsolete group send to group 0\n" ); - } - else /* No multicast, multiplicate */ - { - /* Send to all players we know about */ - FIXME( "Send to all players using EnumPlayersInGroup\n" ); - } - } - - if( ( !bValidDestination ) && - ( DP_FindPlayer( This, idTo ) != NULL ) - ) - { - /* Have the service provider send this message */ - /* FIXME: Could optimize for local interface sends */ - return DP_SP_SendEx( This, dwFlags, lpData, dwDataSize, dwPriority, - dwTimeout, lpContext, lpdwMsgID ); - } - - if( ( !bValidDestination ) && - ( DP_FindAnyGroup( This, idTo ) != NULL ) - ) - { - bValidDestination = TRUE; - - /* See if SP has the ability to multicast. If so, use it */ - if( This->dp2->spData.lpCB->SendToGroupEx ) - { - FIXME( "Use group sendex\n" ); - } - else if( This->dp2->spData.lpCB->SendToGroup ) /* obsolete interface */ - { - FIXME( "Use obsolete group send to group\n" ); - } - else /* No multicast, multiplicate */ - { - FIXME( "Send to all players using EnumPlayersInGroup\n" ); - } - -#if 0 - if( bExpectReply ) - { - DWORD dwWaitReturn; - - This->dp2->hReplyEvent = CreateEventW( NULL, FALSE, FALSE, NULL ); - - dwWaitReturn = WaitForSingleObject( hReplyEvent, dwTimeout ); - if( dwWaitReturn != WAIT_OBJECT_0 ) - { - ERR( "Wait failed 0x%08lx\n", dwWaitReturn ); - } - } -#endif - } - - if( !bValidDestination ) - { - return DPERR_INVALIDPLAYER; - } - else - { - /* FIXME: Should return what the send returned */ - return DP_OK; - } -} - - -static HRESULT WINAPI DirectPlay4AImpl_SendEx - ( LPDIRECTPLAY4A iface, DPID idFrom, DPID idTo, DWORD dwFlags, - LPVOID lpData, DWORD dwDataSize, DWORD dwPriority, DWORD dwTimeout, - LPVOID lpContext, LPDWORD lpdwMsgID ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; /* yes downcast to 2 */ - return DP_SendEx( This, idFrom, idTo, dwFlags, lpData, dwDataSize, - dwPriority, dwTimeout, lpContext, lpdwMsgID, TRUE ); -} - -static HRESULT WINAPI DirectPlay4WImpl_SendEx - ( LPDIRECTPLAY4 iface, DPID idFrom, DPID idTo, DWORD dwFlags, - LPVOID lpData, DWORD dwDataSize, DWORD dwPriority, DWORD dwTimeout, - LPVOID lpContext, LPDWORD lpdwMsgID ) -{ - IDirectPlay2Impl *This = (IDirectPlay2Impl *)iface; /* yes downcast to 2 */ - return DP_SendEx( This, idFrom, idTo, dwFlags, lpData, dwDataSize, - dwPriority, dwTimeout, lpContext, lpdwMsgID, FALSE ); -} - -static HRESULT DP_SP_SendEx - ( IDirectPlay2Impl* This, DWORD dwFlags, - LPVOID lpData, DWORD dwDataSize, DWORD dwPriority, DWORD dwTimeout, - LPVOID lpContext, LPDWORD lpdwMsgID ) -{ - LPDPMSG lpMElem; - - FIXME( ": stub\n" ); - - /* FIXME: This queuing should only be for async messages */ - - lpMElem = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *lpMElem ) ); - lpMElem->msg = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwDataSize ); - - CopyMemory( lpMElem->msg, lpData, dwDataSize ); - - /* FIXME: Need to queue based on priority */ - DPQ_INSERT( This->dp2->sendMsgs, lpMElem, msgs ); - - return DP_OK; -} - -static HRESULT DP_IF_GetMessageQueue - ( IDirectPlay4Impl* This, DPID idFrom, DPID idTo, DWORD dwFlags, - LPDWORD lpdwNumMsgs, LPDWORD lpdwNumBytes, BOOL bAnsi ) -{ - HRESULT hr = DP_OK; - - FIXME( "(%p)->(0x%08x,0x%08x,0x%08x,%p,%p,%u): semi stub\n", - This, idFrom, idTo, dwFlags, lpdwNumMsgs, lpdwNumBytes, bAnsi ); - - /* FIXME: Do we need to do idFrom and idTo sanity checking here? */ - /* FIXME: What about sends which are not immediate? */ - - if( This->dp2->spData.lpCB->GetMessageQueue ) - { - DPSP_GETMESSAGEQUEUEDATA data; - - FIXME( "Calling SP GetMessageQueue - is it right?\n" ); - - /* FIXME: None of this is documented :( */ - - data.lpISP = This->dp2->spData.lpISP; - data.dwFlags = dwFlags; - data.idFrom = idFrom; - data.idTo = idTo; - data.lpdwNumMsgs = lpdwNumMsgs; - data.lpdwNumBytes = lpdwNumBytes; - - hr = (*This->dp2->spData.lpCB->GetMessageQueue)( &data ); - } - else - { - FIXME( "No SP for GetMessageQueue - fake some data\n" ); - } - - return hr; -} - -static HRESULT WINAPI DirectPlay4AImpl_GetMessageQueue - ( LPDIRECTPLAY4A iface, DPID idFrom, DPID idTo, DWORD dwFlags, - LPDWORD lpdwNumMsgs, LPDWORD lpdwNumBytes ) -{ - IDirectPlay4Impl *This = (IDirectPlay4Impl *)iface; - return DP_IF_GetMessageQueue( This, idFrom, idTo, dwFlags, lpdwNumMsgs, - lpdwNumBytes, TRUE ); -} - -static HRESULT WINAPI DirectPlay4WImpl_GetMessageQueue - ( LPDIRECTPLAY4 iface, DPID idFrom, DPID idTo, DWORD dwFlags, - LPDWORD lpdwNumMsgs, LPDWORD lpdwNumBytes ) -{ - IDirectPlay4Impl *This = (IDirectPlay4Impl *)iface; - return DP_IF_GetMessageQueue( This, idFrom, idTo, dwFlags, lpdwNumMsgs, - lpdwNumBytes, FALSE ); -} - -static HRESULT DP_IF_CancelMessage - ( IDirectPlay4Impl* This, DWORD dwMsgID, DWORD dwFlags, - DWORD dwMinPriority, DWORD dwMaxPriority, BOOL bAnsi ) -{ - HRESULT hr = DP_OK; - - FIXME( "(%p)->(0x%08x,0x%08x,%u): semi stub\n", - This, dwMsgID, dwFlags, bAnsi ); - - if( This->dp2->spData.lpCB->Cancel ) - { - DPSP_CANCELDATA data; - - TRACE( "Calling SP Cancel\n" ); - - /* FIXME: Undocumented callback */ - - data.lpISP = This->dp2->spData.lpISP; - data.dwFlags = dwFlags; - data.lprglpvSPMsgID = NULL; - data.cSPMsgID = dwMsgID; - data.dwMinPriority = dwMinPriority; - data.dwMaxPriority = dwMaxPriority; - - hr = (*This->dp2->spData.lpCB->Cancel)( &data ); - } - else - { - FIXME( "SP doesn't implement Cancel\n" ); - } - - return hr; -} - -static HRESULT WINAPI DirectPlay4AImpl_CancelMessage - ( LPDIRECTPLAY4A iface, DWORD dwMsgID, DWORD dwFlags ) -{ - IDirectPlay4Impl *This = (IDirectPlay4Impl *)iface; - - if( dwFlags != 0 ) - { - return DPERR_INVALIDFLAGS; - } - - if( dwMsgID == 0 ) - { - dwFlags |= DPCANCELSEND_ALL; - } - - return DP_IF_CancelMessage( This, dwMsgID, dwFlags, 0, 0, TRUE ); -} - -static HRESULT WINAPI DirectPlay4WImpl_CancelMessage - ( LPDIRECTPLAY4 iface, DWORD dwMsgID, DWORD dwFlags ) -{ - IDirectPlay4Impl *This = (IDirectPlay4Impl *)iface; - - if( dwFlags != 0 ) - { - return DPERR_INVALIDFLAGS; - } - - if( dwMsgID == 0 ) - { - dwFlags |= DPCANCELSEND_ALL; - } - - return DP_IF_CancelMessage( This, dwMsgID, dwFlags, 0, 0, FALSE ); -} - -static HRESULT WINAPI DirectPlay4AImpl_CancelPriority - ( LPDIRECTPLAY4A iface, DWORD dwMinPriority, DWORD dwMaxPriority, - DWORD dwFlags ) -{ - IDirectPlay4Impl *This = (IDirectPlay4Impl *)iface; - - if( dwFlags != 0 ) - { - return DPERR_INVALIDFLAGS; - } - - return DP_IF_CancelMessage( This, 0, DPCANCELSEND_PRIORITY, dwMinPriority, - dwMaxPriority, TRUE ); -} - -static HRESULT WINAPI DirectPlay4WImpl_CancelPriority - ( LPDIRECTPLAY4 iface, DWORD dwMinPriority, DWORD dwMaxPriority, - DWORD dwFlags ) -{ - IDirectPlay4Impl *This = (IDirectPlay4Impl *)iface; - - if( dwFlags != 0 ) - { - return DPERR_INVALIDFLAGS; - } - - return DP_IF_CancelMessage( This, 0, DPCANCELSEND_PRIORITY, dwMinPriority, - dwMaxPriority, FALSE ); -} - -/* Note: Hack so we can reuse the old functions without compiler warnings */ -#if !defined(__STRICT_ANSI__) && defined(__GNUC__) -# define XCAST(fun) (typeof(directPlay2WVT.fun)) -#else -# define XCAST(fun) (void*) -#endif - -static const IDirectPlay2Vtbl directPlay2WVT = -{ - XCAST(QueryInterface)DP_QueryInterface, - XCAST(AddRef)DP_AddRef, - XCAST(Release)DP_Release, - - DirectPlay2WImpl_AddPlayerToGroup, - DirectPlay2WImpl_Close, - DirectPlay2WImpl_CreateGroup, - DirectPlay2WImpl_CreatePlayer, - DirectPlay2WImpl_DeletePlayerFromGroup, - DirectPlay2WImpl_DestroyGroup, - DirectPlay2WImpl_DestroyPlayer, - DirectPlay2WImpl_EnumGroupPlayers, - DirectPlay2WImpl_EnumGroups, - DirectPlay2WImpl_EnumPlayers, - DirectPlay2WImpl_EnumSessions, - DirectPlay2WImpl_GetCaps, - DirectPlay2WImpl_GetGroupData, - DirectPlay2WImpl_GetGroupName, - DirectPlay2WImpl_GetMessageCount, - DirectPlay2WImpl_GetPlayerAddress, - DirectPlay2WImpl_GetPlayerCaps, - DirectPlay2WImpl_GetPlayerData, - DirectPlay2WImpl_GetPlayerName, - DirectPlay2WImpl_GetSessionDesc, - DirectPlay2WImpl_Initialize, - DirectPlay2WImpl_Open, - DirectPlay2WImpl_Receive, - DirectPlay2WImpl_Send, - DirectPlay2WImpl_SetGroupData, - DirectPlay2WImpl_SetGroupName, - DirectPlay2WImpl_SetPlayerData, - DirectPlay2WImpl_SetPlayerName, - DirectPlay2WImpl_SetSessionDesc -}; -#undef XCAST - -/* Note: Hack so we can reuse the old functions without compiler warnings */ -#if !defined(__STRICT_ANSI__) && defined(__GNUC__) -# define XCAST(fun) (typeof(directPlay2AVT.fun)) -#else -# define XCAST(fun) (void*) -#endif - -static const IDirectPlay2Vtbl directPlay2AVT = -{ - XCAST(QueryInterface)DP_QueryInterface, - XCAST(AddRef)DP_AddRef, - XCAST(Release)DP_Release, - - DirectPlay2AImpl_AddPlayerToGroup, - DirectPlay2AImpl_Close, - DirectPlay2AImpl_CreateGroup, - DirectPlay2AImpl_CreatePlayer, - DirectPlay2AImpl_DeletePlayerFromGroup, - DirectPlay2AImpl_DestroyGroup, - DirectPlay2AImpl_DestroyPlayer, - DirectPlay2AImpl_EnumGroupPlayers, - DirectPlay2AImpl_EnumGroups, - DirectPlay2AImpl_EnumPlayers, - DirectPlay2AImpl_EnumSessions, - DirectPlay2AImpl_GetCaps, - DirectPlay2AImpl_GetGroupData, - DirectPlay2AImpl_GetGroupName, - DirectPlay2AImpl_GetMessageCount, - DirectPlay2AImpl_GetPlayerAddress, - DirectPlay2AImpl_GetPlayerCaps, - DirectPlay2AImpl_GetPlayerData, - DirectPlay2AImpl_GetPlayerName, - DirectPlay2AImpl_GetSessionDesc, - DirectPlay2AImpl_Initialize, - DirectPlay2AImpl_Open, - DirectPlay2AImpl_Receive, - DirectPlay2AImpl_Send, - DirectPlay2AImpl_SetGroupData, - DirectPlay2AImpl_SetGroupName, - DirectPlay2AImpl_SetPlayerData, - DirectPlay2AImpl_SetPlayerName, - DirectPlay2AImpl_SetSessionDesc -}; -#undef XCAST - - -/* Note: Hack so we can reuse the old functions without compiler warnings */ -#if !defined(__STRICT_ANSI__) && defined(__GNUC__) -# define XCAST(fun) (typeof(directPlay3AVT.fun)) -#else -# define XCAST(fun) (void*) -#endif - -static const IDirectPlay3Vtbl directPlay3AVT = -{ - XCAST(QueryInterface)DP_QueryInterface, - XCAST(AddRef)DP_AddRef, - XCAST(Release)DP_Release, - - XCAST(AddPlayerToGroup)DirectPlay2AImpl_AddPlayerToGroup, - XCAST(Close)DirectPlay2AImpl_Close, - XCAST(CreateGroup)DirectPlay2AImpl_CreateGroup, - XCAST(CreatePlayer)DirectPlay2AImpl_CreatePlayer, - XCAST(DeletePlayerFromGroup)DirectPlay2AImpl_DeletePlayerFromGroup, - XCAST(DestroyGroup)DirectPlay2AImpl_DestroyGroup, - XCAST(DestroyPlayer)DirectPlay2AImpl_DestroyPlayer, - XCAST(EnumGroupPlayers)DirectPlay2AImpl_EnumGroupPlayers, - XCAST(EnumGroups)DirectPlay2AImpl_EnumGroups, - XCAST(EnumPlayers)DirectPlay2AImpl_EnumPlayers, - XCAST(EnumSessions)DirectPlay2AImpl_EnumSessions, - XCAST(GetCaps)DirectPlay2AImpl_GetCaps, - XCAST(GetGroupData)DirectPlay2AImpl_GetGroupData, - XCAST(GetGroupName)DirectPlay2AImpl_GetGroupName, - XCAST(GetMessageCount)DirectPlay2AImpl_GetMessageCount, - XCAST(GetPlayerAddress)DirectPlay2AImpl_GetPlayerAddress, - XCAST(GetPlayerCaps)DirectPlay2AImpl_GetPlayerCaps, - XCAST(GetPlayerData)DirectPlay2AImpl_GetPlayerData, - XCAST(GetPlayerName)DirectPlay2AImpl_GetPlayerName, - XCAST(GetSessionDesc)DirectPlay2AImpl_GetSessionDesc, - XCAST(Initialize)DirectPlay2AImpl_Initialize, - XCAST(Open)DirectPlay2AImpl_Open, - XCAST(Receive)DirectPlay2AImpl_Receive, - XCAST(Send)DirectPlay2AImpl_Send, - XCAST(SetGroupData)DirectPlay2AImpl_SetGroupData, - XCAST(SetGroupName)DirectPlay2AImpl_SetGroupName, - XCAST(SetPlayerData)DirectPlay2AImpl_SetPlayerData, - XCAST(SetPlayerName)DirectPlay2AImpl_SetPlayerName, - XCAST(SetSessionDesc)DirectPlay2AImpl_SetSessionDesc, - - DirectPlay3AImpl_AddGroupToGroup, - DirectPlay3AImpl_CreateGroupInGroup, - DirectPlay3AImpl_DeleteGroupFromGroup, - DirectPlay3AImpl_EnumConnections, - DirectPlay3AImpl_EnumGroupsInGroup, - DirectPlay3AImpl_GetGroupConnectionSettings, - DirectPlay3AImpl_InitializeConnection, - DirectPlay3AImpl_SecureOpen, - DirectPlay3AImpl_SendChatMessage, - DirectPlay3AImpl_SetGroupConnectionSettings, - DirectPlay3AImpl_StartSession, - DirectPlay3AImpl_GetGroupFlags, - DirectPlay3AImpl_GetGroupParent, - DirectPlay3AImpl_GetPlayerAccount, - DirectPlay3AImpl_GetPlayerFlags -}; -#undef XCAST - -/* Note: Hack so we can reuse the old functions without compiler warnings */ -#if !defined(__STRICT_ANSI__) && defined(__GNUC__) -# define XCAST(fun) (typeof(directPlay3WVT.fun)) -#else -# define XCAST(fun) (void*) -#endif -static const IDirectPlay3Vtbl directPlay3WVT = -{ - XCAST(QueryInterface)DP_QueryInterface, - XCAST(AddRef)DP_AddRef, - XCAST(Release)DP_Release, - - XCAST(AddPlayerToGroup)DirectPlay2WImpl_AddPlayerToGroup, - XCAST(Close)DirectPlay2WImpl_Close, - XCAST(CreateGroup)DirectPlay2WImpl_CreateGroup, - XCAST(CreatePlayer)DirectPlay2WImpl_CreatePlayer, - XCAST(DeletePlayerFromGroup)DirectPlay2WImpl_DeletePlayerFromGroup, - XCAST(DestroyGroup)DirectPlay2WImpl_DestroyGroup, - XCAST(DestroyPlayer)DirectPlay2WImpl_DestroyPlayer, - XCAST(EnumGroupPlayers)DirectPlay2WImpl_EnumGroupPlayers, - XCAST(EnumGroups)DirectPlay2WImpl_EnumGroups, - XCAST(EnumPlayers)DirectPlay2WImpl_EnumPlayers, - XCAST(EnumSessions)DirectPlay2WImpl_EnumSessions, - XCAST(GetCaps)DirectPlay2WImpl_GetCaps, - XCAST(GetGroupData)DirectPlay2WImpl_GetGroupData, - XCAST(GetGroupName)DirectPlay2WImpl_GetGroupName, - XCAST(GetMessageCount)DirectPlay2WImpl_GetMessageCount, - XCAST(GetPlayerAddress)DirectPlay2WImpl_GetPlayerAddress, - XCAST(GetPlayerCaps)DirectPlay2WImpl_GetPlayerCaps, - XCAST(GetPlayerData)DirectPlay2WImpl_GetPlayerData, - XCAST(GetPlayerName)DirectPlay2WImpl_GetPlayerName, - XCAST(GetSessionDesc)DirectPlay2WImpl_GetSessionDesc, - XCAST(Initialize)DirectPlay2WImpl_Initialize, - XCAST(Open)DirectPlay2WImpl_Open, - XCAST(Receive)DirectPlay2WImpl_Receive, - XCAST(Send)DirectPlay2WImpl_Send, - XCAST(SetGroupData)DirectPlay2WImpl_SetGroupData, - XCAST(SetGroupName)DirectPlay2WImpl_SetGroupName, - XCAST(SetPlayerData)DirectPlay2WImpl_SetPlayerData, - XCAST(SetPlayerName)DirectPlay2WImpl_SetPlayerName, - XCAST(SetSessionDesc)DirectPlay2WImpl_SetSessionDesc, - - DirectPlay3WImpl_AddGroupToGroup, - DirectPlay3WImpl_CreateGroupInGroup, - DirectPlay3WImpl_DeleteGroupFromGroup, - DirectPlay3WImpl_EnumConnections, - DirectPlay3WImpl_EnumGroupsInGroup, - DirectPlay3WImpl_GetGroupConnectionSettings, - DirectPlay3WImpl_InitializeConnection, - DirectPlay3WImpl_SecureOpen, - DirectPlay3WImpl_SendChatMessage, - DirectPlay3WImpl_SetGroupConnectionSettings, - DirectPlay3WImpl_StartSession, - DirectPlay3WImpl_GetGroupFlags, - DirectPlay3WImpl_GetGroupParent, - DirectPlay3WImpl_GetPlayerAccount, - DirectPlay3WImpl_GetPlayerFlags -}; -#undef XCAST - -/* Note: Hack so we can reuse the old functions without compiler warnings */ -#if !defined(__STRICT_ANSI__) && defined(__GNUC__) -# define XCAST(fun) (typeof(directPlay4WVT.fun)) -#else -# define XCAST(fun) (void*) -#endif -static const IDirectPlay4Vtbl directPlay4WVT = -{ - XCAST(QueryInterface)DP_QueryInterface, - XCAST(AddRef)DP_AddRef, - XCAST(Release)DP_Release, - - XCAST(AddPlayerToGroup)DirectPlay2WImpl_AddPlayerToGroup, - XCAST(Close)DirectPlay2WImpl_Close, - XCAST(CreateGroup)DirectPlay2WImpl_CreateGroup, - XCAST(CreatePlayer)DirectPlay2WImpl_CreatePlayer, - XCAST(DeletePlayerFromGroup)DirectPlay2WImpl_DeletePlayerFromGroup, - XCAST(DestroyGroup)DirectPlay2WImpl_DestroyGroup, - XCAST(DestroyPlayer)DirectPlay2WImpl_DestroyPlayer, - XCAST(EnumGroupPlayers)DirectPlay2WImpl_EnumGroupPlayers, - XCAST(EnumGroups)DirectPlay2WImpl_EnumGroups, - XCAST(EnumPlayers)DirectPlay2WImpl_EnumPlayers, - XCAST(EnumSessions)DirectPlay2WImpl_EnumSessions, - XCAST(GetCaps)DirectPlay2WImpl_GetCaps, - XCAST(GetGroupData)DirectPlay2WImpl_GetGroupData, - XCAST(GetGroupName)DirectPlay2WImpl_GetGroupName, - XCAST(GetMessageCount)DirectPlay2WImpl_GetMessageCount, - XCAST(GetPlayerAddress)DirectPlay2WImpl_GetPlayerAddress, - XCAST(GetPlayerCaps)DirectPlay2WImpl_GetPlayerCaps, - XCAST(GetPlayerData)DirectPlay2WImpl_GetPlayerData, - XCAST(GetPlayerName)DirectPlay2WImpl_GetPlayerName, - XCAST(GetSessionDesc)DirectPlay2WImpl_GetSessionDesc, - XCAST(Initialize)DirectPlay2WImpl_Initialize, - XCAST(Open)DirectPlay2WImpl_Open, - XCAST(Receive)DirectPlay2WImpl_Receive, - XCAST(Send)DirectPlay2WImpl_Send, - XCAST(SetGroupData)DirectPlay2WImpl_SetGroupData, - XCAST(SetGroupName)DirectPlay2WImpl_SetGroupName, - XCAST(SetPlayerData)DirectPlay2WImpl_SetPlayerData, - XCAST(SetPlayerName)DirectPlay2WImpl_SetPlayerName, - XCAST(SetSessionDesc)DirectPlay2WImpl_SetSessionDesc, - - XCAST(AddGroupToGroup)DirectPlay3WImpl_AddGroupToGroup, - XCAST(CreateGroupInGroup)DirectPlay3WImpl_CreateGroupInGroup, - XCAST(DeleteGroupFromGroup)DirectPlay3WImpl_DeleteGroupFromGroup, - XCAST(EnumConnections)DirectPlay3WImpl_EnumConnections, - XCAST(EnumGroupsInGroup)DirectPlay3WImpl_EnumGroupsInGroup, - XCAST(GetGroupConnectionSettings)DirectPlay3WImpl_GetGroupConnectionSettings, - XCAST(InitializeConnection)DirectPlay3WImpl_InitializeConnection, - XCAST(SecureOpen)DirectPlay3WImpl_SecureOpen, - XCAST(SendChatMessage)DirectPlay3WImpl_SendChatMessage, - XCAST(SetGroupConnectionSettings)DirectPlay3WImpl_SetGroupConnectionSettings, - XCAST(StartSession)DirectPlay3WImpl_StartSession, - XCAST(GetGroupFlags)DirectPlay3WImpl_GetGroupFlags, - XCAST(GetGroupParent)DirectPlay3WImpl_GetGroupParent, - XCAST(GetPlayerAccount)DirectPlay3WImpl_GetPlayerAccount, - XCAST(GetPlayerFlags)DirectPlay3WImpl_GetPlayerFlags, - - DirectPlay4WImpl_GetGroupOwner, - DirectPlay4WImpl_SetGroupOwner, - DirectPlay4WImpl_SendEx, - DirectPlay4WImpl_GetMessageQueue, - DirectPlay4WImpl_CancelMessage, - DirectPlay4WImpl_CancelPriority -}; -#undef XCAST - - -/* Note: Hack so we can reuse the old functions without compiler warnings */ -#if !defined(__STRICT_ANSI__) && defined(__GNUC__) -# define XCAST(fun) (typeof(directPlay4AVT.fun)) -#else -# define XCAST(fun) (void*) -#endif -static const IDirectPlay4Vtbl directPlay4AVT = -{ - XCAST(QueryInterface)DP_QueryInterface, - XCAST(AddRef)DP_AddRef, - XCAST(Release)DP_Release, - - XCAST(AddPlayerToGroup)DirectPlay2AImpl_AddPlayerToGroup, - XCAST(Close)DirectPlay2AImpl_Close, - XCAST(CreateGroup)DirectPlay2AImpl_CreateGroup, - XCAST(CreatePlayer)DirectPlay2AImpl_CreatePlayer, - XCAST(DeletePlayerFromGroup)DirectPlay2AImpl_DeletePlayerFromGroup, - XCAST(DestroyGroup)DirectPlay2AImpl_DestroyGroup, - XCAST(DestroyPlayer)DirectPlay2AImpl_DestroyPlayer, - XCAST(EnumGroupPlayers)DirectPlay2AImpl_EnumGroupPlayers, - XCAST(EnumGroups)DirectPlay2AImpl_EnumGroups, - XCAST(EnumPlayers)DirectPlay2AImpl_EnumPlayers, - XCAST(EnumSessions)DirectPlay2AImpl_EnumSessions, - XCAST(GetCaps)DirectPlay2AImpl_GetCaps, - XCAST(GetGroupData)DirectPlay2AImpl_GetGroupData, - XCAST(GetGroupName)DirectPlay2AImpl_GetGroupName, - XCAST(GetMessageCount)DirectPlay2AImpl_GetMessageCount, - XCAST(GetPlayerAddress)DirectPlay2AImpl_GetPlayerAddress, - XCAST(GetPlayerCaps)DirectPlay2AImpl_GetPlayerCaps, - XCAST(GetPlayerData)DirectPlay2AImpl_GetPlayerData, - XCAST(GetPlayerName)DirectPlay2AImpl_GetPlayerName, - XCAST(GetSessionDesc)DirectPlay2AImpl_GetSessionDesc, - XCAST(Initialize)DirectPlay2AImpl_Initialize, - XCAST(Open)DirectPlay2AImpl_Open, - XCAST(Receive)DirectPlay2AImpl_Receive, - XCAST(Send)DirectPlay2AImpl_Send, - XCAST(SetGroupData)DirectPlay2AImpl_SetGroupData, - XCAST(SetGroupName)DirectPlay2AImpl_SetGroupName, - XCAST(SetPlayerData)DirectPlay2AImpl_SetPlayerData, - XCAST(SetPlayerName)DirectPlay2AImpl_SetPlayerName, - XCAST(SetSessionDesc)DirectPlay2AImpl_SetSessionDesc, - - XCAST(AddGroupToGroup)DirectPlay3AImpl_AddGroupToGroup, - XCAST(CreateGroupInGroup)DirectPlay3AImpl_CreateGroupInGroup, - XCAST(DeleteGroupFromGroup)DirectPlay3AImpl_DeleteGroupFromGroup, - XCAST(EnumConnections)DirectPlay3AImpl_EnumConnections, - XCAST(EnumGroupsInGroup)DirectPlay3AImpl_EnumGroupsInGroup, - XCAST(GetGroupConnectionSettings)DirectPlay3AImpl_GetGroupConnectionSettings, - XCAST(InitializeConnection)DirectPlay3AImpl_InitializeConnection, - XCAST(SecureOpen)DirectPlay3AImpl_SecureOpen, - XCAST(SendChatMessage)DirectPlay3AImpl_SendChatMessage, - XCAST(SetGroupConnectionSettings)DirectPlay3AImpl_SetGroupConnectionSettings, - XCAST(StartSession)DirectPlay3AImpl_StartSession, - XCAST(GetGroupFlags)DirectPlay3AImpl_GetGroupFlags, - XCAST(GetGroupParent)DirectPlay3AImpl_GetGroupParent, - XCAST(GetPlayerAccount)DirectPlay3AImpl_GetPlayerAccount, - XCAST(GetPlayerFlags)DirectPlay3AImpl_GetPlayerFlags, - - DirectPlay4AImpl_GetGroupOwner, - DirectPlay4AImpl_SetGroupOwner, - DirectPlay4AImpl_SendEx, - DirectPlay4AImpl_GetMessageQueue, - DirectPlay4AImpl_CancelMessage, - DirectPlay4AImpl_CancelPriority -}; -#undef XCAST - -HRESULT DP_GetSPPlayerData( IDirectPlay2Impl* lpDP, - DPID idPlayer, - LPVOID* lplpData ) -{ - lpPlayerList lpPlayer = DP_FindPlayer( lpDP, idPlayer ); - - if( lpPlayer == NULL ) - { - return DPERR_INVALIDPLAYER; - } - - *lplpData = lpPlayer->lpPData->lpSPPlayerData; - - return DP_OK; -} - -HRESULT DP_SetSPPlayerData( IDirectPlay2Impl* lpDP, - DPID idPlayer, - LPVOID lpData ) -{ - lpPlayerList lpPlayer = DP_FindPlayer( lpDP, idPlayer ); - - if( lpPlayer == NULL ) - { - return DPERR_INVALIDPLAYER; - } - - lpPlayer->lpPData->lpSPPlayerData = lpData; - - return DP_OK; -} - -/*************************************************************************** - * DirectPlayEnumerateAW - * - * The pointer to the structure lpContext will be filled with the - * appropriate data for each service offered by the OS. These services are - * not necessarily available on this particular machine but are defined - * as simple service providers under the "Service Providers" registry key. - * This structure is then passed to lpEnumCallback for each of the different - * services. - * - * This API is useful only for applications written using DirectX3 or - * worse. It is superseded by IDirectPlay3::EnumConnections which also - * gives information on the actual connections. - * - * defn of a service provider: - * A dynamic-link library used by DirectPlay to communicate over a network. - * The service provider contains all the network-specific code required - * to send and receive messages. Online services and network operators can - * supply service providers to use specialized hardware, protocols, communications - * media, and network resources. - * - */ -static HRESULT DirectPlayEnumerateAW(LPDPENUMDPCALLBACKA lpEnumCallbackA, - LPDPENUMDPCALLBACKW lpEnumCallbackW, - LPVOID lpContext) -{ - HKEY hkResult; - static const WCHAR searchSubKey[] = { - 'S', 'O', 'F', 'T', 'W', 'A', 'R', 'E', '\\', - 'M', 'i', 'c', 'r', 'o', 's', 'o', 'f', 't', '\\', - 'D', 'i', 'r', 'e', 'c', 't', 'P', 'l', 'a', 'y', '\\', - 'S', 'e', 'r', 'v', 'i', 'c', 'e', ' ', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', 's', 0 }; - static const WCHAR guidKey[] = { 'G', 'u', 'i', 'd', 0 }; - static const WCHAR descW[] = { 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'i', 'o', 'n', 'W', 0 }; - - DWORD dwIndex; - FILETIME filetime; - - char *descriptionA = NULL; - DWORD max_sizeOfDescriptionA = 0; - WCHAR *descriptionW = NULL; - DWORD max_sizeOfDescriptionW = 0; - - if (!lpEnumCallbackA && !lpEnumCallbackW) - { - return DPERR_INVALIDPARAMS; - } - - /* Need to loop over the service providers in the registry */ - if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, searchSubKey, - 0, KEY_READ, &hkResult) != ERROR_SUCCESS) - { - /* Hmmm. Does this mean that there are no service providers? */ - ERR(": no service provider key in the registry - check your Wine installation !!!\n"); - return DPERR_GENERIC; - } - - /* Traverse all the service providers we have available */ - dwIndex = 0; - while (1) - { - WCHAR subKeyName[255]; /* 255 is the maximum key size according to MSDN */ - DWORD sizeOfSubKeyName = sizeof(subKeyName) / sizeof(WCHAR); - HKEY hkServiceProvider; - GUID serviceProviderGUID; - WCHAR guidKeyContent[(2 * 16) + 1 + 6 /* This corresponds to '{....-..-..-..-......}' */ ]; - DWORD sizeOfGuidKeyContent = sizeof(guidKeyContent); - LONG ret_value; - - ret_value = RegEnumKeyExW(hkResult, dwIndex, subKeyName, &sizeOfSubKeyName, - NULL, NULL, NULL, &filetime); - if (ret_value == ERROR_NO_MORE_ITEMS) - break; - else if (ret_value != ERROR_SUCCESS) - { - ERR(": could not enumerate on service provider key.\n"); - return DPERR_EXCEPTION; - } - TRACE(" this time through sub-key %s.\n", debugstr_w(subKeyName)); - - /* Open the key for this service provider */ - if (RegOpenKeyExW(hkResult, subKeyName, 0, KEY_READ, &hkServiceProvider) != ERROR_SUCCESS) - { - ERR(": could not open registry key for service provider %s.\n", debugstr_w(subKeyName)); - continue; - } - - /* Get the GUID from the registry */ - if (RegQueryValueExW(hkServiceProvider, guidKey, - NULL, NULL, (LPBYTE) guidKeyContent, &sizeOfGuidKeyContent) != ERROR_SUCCESS) - { - ERR(": missing GUID registry data member for service provider %s.\n", debugstr_w(subKeyName)); - continue; - } - if (sizeOfGuidKeyContent != sizeof(guidKeyContent)) - { - ERR(": invalid format for the GUID registry data member for service provider %s (%s).\n", debugstr_w(subKeyName), debugstr_w(guidKeyContent)); - continue; - } - CLSIDFromString(guidKeyContent, &serviceProviderGUID ); - - /* The enumeration will return FALSE if we are not to continue. - * - * Note: on my windows box, major / minor version is 6 / 0 for all service providers - * and have no relation to any of the two dwReserved1 and dwReserved2 keys. - * I think that it simply means that they are in-line with DirectX 6.0 - */ - if (lpEnumCallbackA) - { - DWORD sizeOfDescription = 0; - - /* Note that this is the A case of this function, so use the A variant to get the description string */ - if (RegQueryValueExA(hkServiceProvider, "DescriptionA", - NULL, NULL, NULL, &sizeOfDescription) != ERROR_SUCCESS) - { - ERR(": missing 'DescriptionA' registry data member for service provider %s.\n", debugstr_w(subKeyName)); - continue; - } - if (sizeOfDescription > max_sizeOfDescriptionA) - { - HeapFree(GetProcessHeap(), 0, descriptionA); - max_sizeOfDescriptionA = sizeOfDescription; - } - descriptionA = HeapAlloc(GetProcessHeap(), 0, sizeOfDescription); - RegQueryValueExA(hkServiceProvider, "DescriptionA", - NULL, NULL, (LPBYTE) descriptionA, &sizeOfDescription); - - if (!lpEnumCallbackA(&serviceProviderGUID, descriptionA, 6, 0, lpContext)) - goto end; - } - else - { - DWORD sizeOfDescription = 0; - - if (RegQueryValueExW(hkServiceProvider, descW, - NULL, NULL, NULL, &sizeOfDescription) != ERROR_SUCCESS) - { - ERR(": missing 'DescriptionW' registry data member for service provider %s.\n", debugstr_w(subKeyName)); - continue; - } - if (sizeOfDescription > max_sizeOfDescriptionW) - { - HeapFree(GetProcessHeap(), 0, descriptionW); - max_sizeOfDescriptionW = sizeOfDescription; - } - descriptionW = HeapAlloc(GetProcessHeap(), 0, sizeOfDescription); - RegQueryValueExW(hkServiceProvider, descW, - NULL, NULL, (LPBYTE) descriptionW, &sizeOfDescription); - - if (!lpEnumCallbackW(&serviceProviderGUID, descriptionW, 6, 0, lpContext)) - goto end; - } - - dwIndex++; - } - - end: - HeapFree(GetProcessHeap(), 0, descriptionA); - HeapFree(GetProcessHeap(), 0, descriptionW); - - return DP_OK; -} - -/*************************************************************************** - * DirectPlayEnumerate [DPLAYX.9] - * DirectPlayEnumerateA [DPLAYX.2] - */ -HRESULT WINAPI DirectPlayEnumerateA(LPDPENUMDPCALLBACKA lpEnumCallback, LPVOID lpContext ) -{ - TRACE("(%p,%p)\n", lpEnumCallback, lpContext); - - return DirectPlayEnumerateAW(lpEnumCallback, NULL, lpContext); -} - -/*************************************************************************** - * DirectPlayEnumerateW [DPLAYX.3] - */ -HRESULT WINAPI DirectPlayEnumerateW(LPDPENUMDPCALLBACKW lpEnumCallback, LPVOID lpContext ) -{ - TRACE("(%p,%p)\n", lpEnumCallback, lpContext); - - return DirectPlayEnumerateAW(NULL, lpEnumCallback, lpContext); -} - -typedef struct tagCreateEnum -{ - LPVOID lpConn; - LPCGUID lpGuid; -} CreateEnumData, *lpCreateEnumData; - -/* Find and copy the matching connection for the SP guid */ -static BOOL CALLBACK cbDPCreateEnumConnections( - LPCGUID lpguidSP, - LPVOID lpConnection, - DWORD dwConnectionSize, - LPCDPNAME lpName, - DWORD dwFlags, - LPVOID lpContext) -{ - lpCreateEnumData lpData = (lpCreateEnumData)lpContext; - - if( IsEqualGUID( lpguidSP, lpData->lpGuid ) ) - { - TRACE( "Found SP entry with guid %s\n", debugstr_guid(lpData->lpGuid) ); - - lpData->lpConn = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - dwConnectionSize ); - CopyMemory( lpData->lpConn, lpConnection, dwConnectionSize ); - - /* Found the record that we were looking for */ - return FALSE; - } - - /* Haven't found what were looking for yet */ - return TRUE; -} - - -/*************************************************************************** - * DirectPlayCreate [DPLAYX.1] - * - */ -HRESULT WINAPI DirectPlayCreate -( LPGUID lpGUID, LPDIRECTPLAY *lplpDP, IUnknown *pUnk ) -{ - HRESULT hr; - LPDIRECTPLAY3A lpDP3A; - CreateEnumData cbData; - - TRACE( "lpGUID=%s lplpDP=%p pUnk=%p\n", debugstr_guid(lpGUID), lplpDP, pUnk ); - - if( pUnk != NULL ) - { - return CLASS_E_NOAGGREGATION; - } - - if( (lplpDP == NULL) || (lpGUID == NULL) ) - { - return DPERR_INVALIDPARAMS; - } - - - /* Create an IDirectPlay object. We don't support that so we'll cheat and - give them an IDirectPlay2A object and hope that doesn't cause problems */ - if( DP_CreateInterface( &IID_IDirectPlay2A, (LPVOID*)lplpDP ) != DP_OK ) - { - return DPERR_UNAVAILABLE; - } - - if( IsEqualGUID( &GUID_NULL, lpGUID ) ) - { - /* The GUID_NULL means don't bind a service provider. Just return the - interface as is */ - return DP_OK; - } - - /* Bind the desired service provider since lpGUID is non NULL */ - TRACE( "Service Provider binding for %s\n", debugstr_guid(lpGUID) ); - - /* We're going to use a DP3 interface */ - hr = IDirectPlayX_QueryInterface( *lplpDP, &IID_IDirectPlay3A, - (LPVOID*)&lpDP3A ); - if( FAILED(hr) ) - { - ERR( "Failed to get DP3 interface: %s\n", DPLAYX_HresultToString(hr) ); - return hr; - } - - cbData.lpConn = NULL; - cbData.lpGuid = lpGUID; - - /* We were given a service provider, find info about it... */ - hr = IDirectPlayX_EnumConnections( lpDP3A, NULL, cbDPCreateEnumConnections, - &cbData, DPCONNECTION_DIRECTPLAY ); - if( ( FAILED(hr) ) || - ( cbData.lpConn == NULL ) - ) - { - ERR( "Failed to get Enum for SP: %s\n", DPLAYX_HresultToString(hr) ); - IDirectPlayX_Release( lpDP3A ); - return DPERR_UNAVAILABLE; - } - - /* Initialize the service provider */ - hr = IDirectPlayX_InitializeConnection( lpDP3A, cbData.lpConn, 0 ); - if( FAILED(hr) ) - { - ERR( "Failed to Initialize SP: %s\n", DPLAYX_HresultToString(hr) ); - HeapFree( GetProcessHeap(), 0, cbData.lpConn ); - IDirectPlayX_Release( lpDP3A ); - return hr; - } - - /* Release our version of the interface now that we're done with it */ - IDirectPlayX_Release( lpDP3A ); - HeapFree( GetProcessHeap(), 0, cbData.lpConn ); - - return DP_OK; -} diff --git a/dll/directx/dplayx/dplobby.c b/dll/directx/dplayx/dplobby.c deleted file mode 100644 index b8500334df3..00000000000 --- a/dll/directx/dplayx/dplobby.c +++ /dev/null @@ -1,2004 +0,0 @@ -/* Direct Play Lobby 2 & 3 Implementation - * - * Copyright 1998,1999,2000 - Peter Hunnisett - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ -#include -//#include - -#define NONAMELESSUNION -#define NONAMELESSSTRUCT -#include -#include -//#include "winerror.h" -#include -#include -#include - -#include "dplayx_global.h" -#include "dplayx_messages.h" -//#include "dplayx_queue.h" -//#include "dplobby.h" -#include "dpinit.h" - -WINE_DEFAULT_DEBUG_CHANNEL(dplay); - -/***************************************************************************** - * Predeclare the interface implementation structures - */ -typedef struct IDirectPlayLobbyImpl IDirectPlayLobbyAImpl; -typedef struct IDirectPlayLobbyImpl IDirectPlayLobbyWImpl; -typedef struct IDirectPlayLobby2Impl IDirectPlayLobby2AImpl; -typedef struct IDirectPlayLobby2Impl IDirectPlayLobby2WImpl; -typedef struct IDirectPlayLobby3Impl IDirectPlayLobby3AImpl; -typedef struct IDirectPlayLobby3Impl IDirectPlayLobby3WImpl; - -/* Forward declarations for this module helper methods */ -HRESULT DPL_CreateCompoundAddress ( LPCDPCOMPOUNDADDRESSELEMENT lpElements, DWORD dwElementCount, - LPVOID lpAddress, LPDWORD lpdwAddressSize, BOOL bAnsiInterface )DECLSPEC_HIDDEN; - -static HRESULT DPL_CreateAddress( REFGUID guidSP, REFGUID guidDataType, LPCVOID lpData, DWORD dwDataSize, - LPVOID lpAddress, LPDWORD lpdwAddressSize, BOOL bAnsiInterface ); - - - -extern HRESULT DPL_EnumAddress( LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, LPCVOID lpAddress, - DWORD dwAddressSize, LPVOID lpContext ); - -static HRESULT DPL_ConnectEx( IDirectPlayLobbyAImpl* This, - DWORD dwFlags, REFIID riid, - LPVOID* lplpDP, IUnknown* pUnk ); - -static BOOL DPL_CreateAndSetLobbyHandles( DWORD dwDestProcessId, HANDLE hDestProcess, - LPHANDLE lphStart, LPHANDLE lphDeath, - LPHANDLE lphRead ); - - -/***************************************************************************** - * IDirectPlayLobby {1,2,3} implementation structure - * - * The philosophy behind this extra pointer dereference is that I wanted to - * have the same structure for all types of objects without having to do - * a lot of casting. I also only wanted to implement an interface in the - * object it was "released" with IUnknown interface being implemented in the 1 version. - * Of course, with these new interfaces comes the data required to keep the state required - * by these interfaces. So, basically, the pointers contain the data associated with - * a release. If you use the data associated with release 3 in a release 2 object, you'll - * get a run time trap, as that won't have any data. - * - */ -struct DPLMSG -{ - DPQ_ENTRY( DPLMSG ) msgs; /* Link to next queued message */ -}; -typedef struct DPLMSG* LPDPLMSG; - -typedef struct tagDirectPlayLobbyIUnknownData -{ - LONG ulObjRef; - CRITICAL_SECTION DPL_lock; -} DirectPlayLobbyIUnknownData; - -typedef struct tagDirectPlayLobbyData -{ - HKEY hkCallbackKeyHack; - DWORD dwMsgThread; - DPQ_HEAD( DPLMSG ) msgs; /* List of messages received */ -} DirectPlayLobbyData; - -typedef struct tagDirectPlayLobby2Data -{ - BOOL dummy; -} DirectPlayLobby2Data; - -typedef struct tagDirectPlayLobby3Data -{ - BOOL dummy; -} DirectPlayLobby3Data; - -#define DPL_IMPL_FIELDS \ - LONG ulInterfaceRef; \ - DirectPlayLobbyIUnknownData* unk; \ - DirectPlayLobbyData* dpl; \ - DirectPlayLobby2Data* dpl2; \ - DirectPlayLobby3Data* dpl3; - -struct IDirectPlayLobbyImpl -{ - const IDirectPlayLobbyVtbl *lpVtbl; - DPL_IMPL_FIELDS -}; - -struct IDirectPlayLobby2Impl -{ - const IDirectPlayLobby2Vtbl *lpVtbl; - DPL_IMPL_FIELDS -}; - -struct IDirectPlayLobby3Impl -{ - const IDirectPlayLobby3Vtbl *lpVtbl; - DPL_IMPL_FIELDS -}; - -/* Forward declarations of virtual tables */ -static const IDirectPlayLobbyVtbl directPlayLobbyWVT; -static const IDirectPlayLobby2Vtbl directPlayLobby2WVT; -static const IDirectPlayLobby3Vtbl directPlayLobby3WVT; - -static const IDirectPlayLobbyVtbl directPlayLobbyAVT; -static const IDirectPlayLobby2Vtbl directPlayLobby2AVT; -static const IDirectPlayLobby3Vtbl directPlayLobby3AVT; - -static BOOL DPL_CreateIUnknown( LPVOID lpDPL ) -{ - IDirectPlayLobbyAImpl *This = lpDPL; - - This->unk = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *(This->unk) ) ); - if ( This->unk == NULL ) - { - return FALSE; - } - - InitializeCriticalSection( &This->unk->DPL_lock ); - This->unk->DPL_lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IDirectPlayLobbyAImpl*->DirectPlayLobbyIUnknownData*->DPL_lock"); - - return TRUE; -} - -static BOOL DPL_DestroyIUnknown( LPVOID lpDPL ) -{ - IDirectPlayLobbyAImpl *This = lpDPL; - - This->unk->DPL_lock.DebugInfo->Spare[0] = 0; - DeleteCriticalSection( &This->unk->DPL_lock ); - HeapFree( GetProcessHeap(), 0, This->unk ); - - return TRUE; -} - -static BOOL DPL_CreateLobby1( LPVOID lpDPL ) -{ - IDirectPlayLobbyAImpl *This = lpDPL; - - This->dpl = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *(This->dpl) ) ); - if ( This->dpl == NULL ) - { - return FALSE; - } - - DPQ_INIT( This->dpl->msgs ); - - return TRUE; -} - -static BOOL DPL_DestroyLobby1( LPVOID lpDPL ) -{ - IDirectPlayLobbyAImpl *This = lpDPL; - - if( This->dpl->dwMsgThread ) - { - FIXME( "Should kill the msg thread\n" ); - } - - DPQ_DELETEQ( This->dpl->msgs, msgs, LPDPLMSG, cbDeleteElemFromHeap ); - - /* Delete the contents */ - HeapFree( GetProcessHeap(), 0, This->dpl ); - - return TRUE; -} - -static BOOL DPL_CreateLobby2( LPVOID lpDPL ) -{ - IDirectPlayLobby2AImpl *This = lpDPL; - - This->dpl2 = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *(This->dpl2) ) ); - if ( This->dpl2 == NULL ) - { - return FALSE; - } - - return TRUE; -} - -static BOOL DPL_DestroyLobby2( LPVOID lpDPL ) -{ - IDirectPlayLobby2AImpl *This = lpDPL; - - HeapFree( GetProcessHeap(), 0, This->dpl2 ); - - return TRUE; -} - -static BOOL DPL_CreateLobby3( LPVOID lpDPL ) -{ - IDirectPlayLobby3AImpl *This = lpDPL; - - This->dpl3 = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *(This->dpl3) ) ); - if ( This->dpl3 == NULL ) - { - return FALSE; - } - - return TRUE; -} - -static BOOL DPL_DestroyLobby3( LPVOID lpDPL ) -{ - IDirectPlayLobby3AImpl *This = lpDPL; - - HeapFree( GetProcessHeap(), 0, This->dpl3 ); - - return TRUE; -} - - -/* The COM interface for upversioning an interface - * We've been given a GUID (riid) and we need to replace the present - * interface with that of the requested interface. - * - * Snip from some Microsoft document: - * There are four requirements for implementations of QueryInterface (In these - * cases, "must succeed" means "must succeed barring catastrophic failure."): - * - * * The set of interfaces accessible on an object through - * IUnknown::QueryInterface must be static, not dynamic. This means that - * if a call to QueryInterface for a pointer to a specified interface - * succeeds the first time, it must succeed again, and if it fails the - * first time, it must fail on all subsequent queries. - * * It must be symmetric ~W if a client holds a pointer to an interface on - * an object, and queries for that interface, the call must succeed. - * * It must be reflexive ~W if a client holding a pointer to one interface - * queries successfully for another, a query through the obtained pointer - * for the first interface must succeed. - * * It must be transitive ~W if a client holding a pointer to one interface - * queries successfully for a second, and through that pointer queries - * successfully for a third interface, a query for the first interface - * through the pointer for the third interface must succeed. - */ -HRESULT DPL_CreateInterface - ( REFIID riid, LPVOID* ppvObj ) -{ - TRACE( " for %s\n", debugstr_guid( riid ) ); - - *ppvObj = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof( IDirectPlayLobbyWImpl ) ); - - if( *ppvObj == NULL ) - { - return DPERR_OUTOFMEMORY; - } - - if( IsEqualGUID( &IID_IDirectPlayLobby, riid ) ) - { - IDirectPlayLobbyWImpl *This = *ppvObj; - This->lpVtbl = &directPlayLobbyWVT; - } - else if( IsEqualGUID( &IID_IDirectPlayLobbyA, riid ) ) - { - IDirectPlayLobbyAImpl *This = *ppvObj; - This->lpVtbl = &directPlayLobbyAVT; - } - else if( IsEqualGUID( &IID_IDirectPlayLobby2, riid ) ) - { - IDirectPlayLobby2WImpl *This = *ppvObj; - This->lpVtbl = &directPlayLobby2WVT; - } - else if( IsEqualGUID( &IID_IDirectPlayLobby2A, riid ) ) - { - IDirectPlayLobby2AImpl *This = *ppvObj; - This->lpVtbl = &directPlayLobby2AVT; - } - else if( IsEqualGUID( &IID_IDirectPlayLobby3, riid ) ) - { - IDirectPlayLobby3WImpl *This = *ppvObj; - This->lpVtbl = &directPlayLobby3WVT; - } - else if( IsEqualGUID( &IID_IDirectPlayLobby3A, riid ) ) - { - IDirectPlayLobby3AImpl *This = *ppvObj; - This->lpVtbl = &directPlayLobby3AVT; - } - else - { - /* Unsupported interface */ - HeapFree( GetProcessHeap(), 0, *ppvObj ); - *ppvObj = NULL; - - return E_NOINTERFACE; - } - - /* Initialize it */ - if ( DPL_CreateIUnknown( *ppvObj ) && - DPL_CreateLobby1( *ppvObj ) && - DPL_CreateLobby2( *ppvObj ) && - DPL_CreateLobby3( *ppvObj ) - ) - { - IDirectPlayLobby_AddRef( (LPDIRECTPLAYLOBBY)*ppvObj ); - return S_OK; - } - - /* Initialize failed, destroy it */ - DPL_DestroyLobby3( *ppvObj ); - DPL_DestroyLobby2( *ppvObj ); - DPL_DestroyLobby1( *ppvObj ); - DPL_DestroyIUnknown( *ppvObj ); - HeapFree( GetProcessHeap(), 0, *ppvObj ); - - *ppvObj = NULL; - return DPERR_NOMEMORY; -} - -static HRESULT WINAPI DPL_QueryInterface -( LPDIRECTPLAYLOBBYA iface, - REFIID riid, - LPVOID* ppvObj ) -{ - IDirectPlayLobbyAImpl *This = (IDirectPlayLobbyAImpl *)iface; - TRACE("(%p)->(%s,%p)\n", This, debugstr_guid( riid ), ppvObj ); - - *ppvObj = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof( *This ) ); - - if( *ppvObj == NULL ) - { - return DPERR_OUTOFMEMORY; - } - - CopyMemory( *ppvObj, This, sizeof( *This ) ); - (*(IDirectPlayLobbyAImpl**)ppvObj)->ulInterfaceRef = 0; - - if( IsEqualGUID( &IID_IDirectPlayLobby, riid ) ) - { - IDirectPlayLobbyWImpl *This = *ppvObj; - This->lpVtbl = &directPlayLobbyWVT; - } - else if( IsEqualGUID( &IID_IDirectPlayLobbyA, riid ) ) - { - IDirectPlayLobbyAImpl *This = *ppvObj; - This->lpVtbl = &directPlayLobbyAVT; - } - else if( IsEqualGUID( &IID_IDirectPlayLobby2, riid ) ) - { - IDirectPlayLobby2WImpl *This = *ppvObj; - This->lpVtbl = &directPlayLobby2WVT; - } - else if( IsEqualGUID( &IID_IDirectPlayLobby2A, riid ) ) - { - IDirectPlayLobby2AImpl *This = *ppvObj; - This->lpVtbl = &directPlayLobby2AVT; - } - else if( IsEqualGUID( &IID_IDirectPlayLobby3, riid ) ) - { - IDirectPlayLobby3WImpl *This = *ppvObj; - This->lpVtbl = &directPlayLobby3WVT; - } - else if( IsEqualGUID( &IID_IDirectPlayLobby3A, riid ) ) - { - IDirectPlayLobby3AImpl *This = *ppvObj; - This->lpVtbl = &directPlayLobby3AVT; - } - else - { - /* Unsupported interface */ - HeapFree( GetProcessHeap(), 0, *ppvObj ); - *ppvObj = NULL; - - return E_NOINTERFACE; - } - - IDirectPlayLobby_AddRef( (LPDIRECTPLAYLOBBY)*ppvObj ); - - return S_OK; -} - -/* - * Simple procedure. Just increment the reference count to this - * structure and return the new reference count. - */ -static ULONG WINAPI DPL_AddRef -( LPDIRECTPLAYLOBBY iface ) -{ - ULONG ulInterfaceRefCount, ulObjRefCount; - IDirectPlayLobbyWImpl *This = (IDirectPlayLobbyWImpl *)iface; - - ulObjRefCount = InterlockedIncrement( &This->unk->ulObjRef ); - ulInterfaceRefCount = InterlockedIncrement( &This->ulInterfaceRef ); - - TRACE( "ref count incremented to %u:%u for %p\n", - ulInterfaceRefCount, ulObjRefCount, This ); - - return ulObjRefCount; -} - -/* - * Simple COM procedure. Decrease the reference count to this object. - * If the object no longer has any reference counts, free up the associated - * memory. - */ -static ULONG WINAPI DPL_Release -( LPDIRECTPLAYLOBBYA iface ) -{ - ULONG ulInterfaceRefCount, ulObjRefCount; - IDirectPlayLobbyAImpl *This = (IDirectPlayLobbyAImpl *)iface; - - ulObjRefCount = InterlockedDecrement( &This->unk->ulObjRef ); - ulInterfaceRefCount = InterlockedDecrement( &This->ulInterfaceRef ); - - TRACE( "ref count decremented to %u:%u for %p\n", - ulInterfaceRefCount, ulObjRefCount, This ); - - /* Deallocate if this is the last reference to the object */ - if( ulObjRefCount == 0 ) - { - DPL_DestroyLobby3( This ); - DPL_DestroyLobby2( This ); - DPL_DestroyLobby1( This ); - DPL_DestroyIUnknown( This ); - } - - if( ulInterfaceRefCount == 0 ) - { - HeapFree( GetProcessHeap(), 0, This ); - } - - return ulInterfaceRefCount; -} - - -/******************************************************************** - * - * Connects an application to the session specified by the DPLCONNECTION - * structure currently stored with the DirectPlayLobby object. - * - * Returns an IDirectPlay interface. - * - */ -static HRESULT DPL_ConnectEx -( IDirectPlayLobbyAImpl* This, - DWORD dwFlags, - REFIID riid, - LPVOID* lplpDP, - IUnknown* pUnk) -{ - HRESULT hr; - DWORD dwOpenFlags = 0; - DWORD dwConnSize = 0; - LPDPLCONNECTION lpConn; - - FIXME("(%p)->(0x%08x,%p,%p): semi stub\n", This, dwFlags, lplpDP, pUnk ); - - if( pUnk ) - { - return DPERR_INVALIDPARAMS; - } - - /* Backwards compatibility */ - if( dwFlags == 0 ) - { - dwFlags = DPCONNECT_RETURNSTATUS; - } - - /* Create the DirectPlay interface */ - if( ( hr = DP_CreateInterface( riid, lplpDP ) ) != DP_OK ) - { - ERR( "error creating interface for %s:%s.\n", - debugstr_guid( riid ), DPLAYX_HresultToString( hr ) ); - return hr; - } - - /* FIXME: Is it safe/correct to use appID of 0? */ - hr = IDirectPlayLobby_GetConnectionSettings( (LPDIRECTPLAYLOBBY)This, - 0, NULL, &dwConnSize ); - if( hr != DPERR_BUFFERTOOSMALL ) - { - return hr; - } - - lpConn = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwConnSize ); - - if( lpConn == NULL ) - { - return DPERR_NOMEMORY; - } - - /* FIXME: Is it safe/correct to use appID of 0? */ - hr = IDirectPlayLobby_GetConnectionSettings( (LPDIRECTPLAYLOBBY)This, - 0, lpConn, &dwConnSize ); - if( FAILED( hr ) ) - { - HeapFree( GetProcessHeap(), 0, lpConn ); - return hr; - } - -#if 0 - /* - Need to call IDirectPlay::EnumConnections with the service provider to get that good information - * - Need to call CreateAddress to create the lpConnection param for IDirectPlay::InitializeConnection - * - Call IDirectPlay::InitializeConnection - */ - - /* Now initialize the Service Provider */ - hr = IDirectPlayX_InitializeConnection( (*(LPDIRECTPLAY2*)lplpDP), -#endif - - - /* Setup flags to pass into DirectPlay::Open */ - if( dwFlags & DPCONNECT_RETURNSTATUS ) - { - dwOpenFlags |= DPOPEN_RETURNSTATUS; - } - dwOpenFlags |= lpConn->dwFlags; - - hr = IDirectPlayX_Open( (*(LPDIRECTPLAY2*)lplpDP), lpConn->lpSessionDesc, - dwOpenFlags ); - - HeapFree( GetProcessHeap(), 0, lpConn ); - - return hr; -} - -static HRESULT WINAPI IDirectPlayLobbyAImpl_Connect -( LPDIRECTPLAYLOBBYA iface, - DWORD dwFlags, - LPDIRECTPLAY2A* lplpDP, - IUnknown* pUnk) -{ - IDirectPlayLobbyAImpl *This = (IDirectPlayLobbyAImpl *)iface; - return DPL_ConnectEx( This, dwFlags, &IID_IDirectPlay2A, - (LPVOID)lplpDP, pUnk ); -} - -static HRESULT WINAPI IDirectPlayLobbyWImpl_Connect -( LPDIRECTPLAYLOBBY iface, - DWORD dwFlags, - LPDIRECTPLAY2* lplpDP, - IUnknown* pUnk) -{ - IDirectPlayLobbyAImpl *This = (IDirectPlayLobbyAImpl *)iface; /* Yes cast to A */ - return DPL_ConnectEx( This, dwFlags, &IID_IDirectPlay2, - (LPVOID)lplpDP, pUnk ); -} - -/******************************************************************** - * - * Creates a DirectPlay Address, given a service provider-specific network - * address. - * Returns an address contains the globally unique identifier - * (GUID) of the service provider and data that the service provider can - * interpret as a network address. - * - * NOTE: It appears that this method is supposed to be really really stupid - * with no error checking on the contents. - */ -static HRESULT WINAPI IDirectPlayLobbyAImpl_CreateAddress -( LPDIRECTPLAYLOBBYA iface, - REFGUID guidSP, - REFGUID guidDataType, - LPCVOID lpData, - DWORD dwDataSize, - LPVOID lpAddress, - LPDWORD lpdwAddressSize ) -{ - return DPL_CreateAddress( guidSP, guidDataType, lpData, dwDataSize, - lpAddress, lpdwAddressSize, TRUE ); -} - -static HRESULT WINAPI IDirectPlayLobbyWImpl_CreateAddress -( LPDIRECTPLAYLOBBY iface, - REFGUID guidSP, - REFGUID guidDataType, - LPCVOID lpData, - DWORD dwDataSize, - LPVOID lpAddress, - LPDWORD lpdwAddressSize ) -{ - return DPL_CreateAddress( guidSP, guidDataType, lpData, dwDataSize, - lpAddress, lpdwAddressSize, FALSE ); -} - -static HRESULT DPL_CreateAddress( - REFGUID guidSP, - REFGUID guidDataType, - LPCVOID lpData, - DWORD dwDataSize, - LPVOID lpAddress, - LPDWORD lpdwAddressSize, - BOOL bAnsiInterface ) -{ - const DWORD dwNumAddElements = 2; /* Service Provide & address data type */ - DPCOMPOUNDADDRESSELEMENT addressElements[ 2 /* dwNumAddElements */ ]; - - TRACE( "(%p)->(%p,%p,0x%08x,%p,%p,%d)\n", guidSP, guidDataType, lpData, dwDataSize, - lpAddress, lpdwAddressSize, bAnsiInterface ); - - addressElements[ 0 ].guidDataType = DPAID_ServiceProvider; - addressElements[ 0 ].dwDataSize = sizeof( GUID ); - addressElements[ 0 ].lpData = (LPVOID)guidSP; - - addressElements[ 1 ].guidDataType = *guidDataType; - addressElements[ 1 ].dwDataSize = dwDataSize; - addressElements[ 1 ].lpData = (LPVOID)lpData; - - /* Call CreateCompoundAddress to cut down on code. - NOTE: We can do this because we don't support DPL 1 interfaces! */ - return DPL_CreateCompoundAddress( addressElements, dwNumAddElements, - lpAddress, lpdwAddressSize, bAnsiInterface ); -} - - - -/******************************************************************** - * - * Parses out chunks from the DirectPlay Address buffer by calling the - * given callback function, with lpContext, for each of the chunks. - * - */ -static HRESULT WINAPI IDirectPlayLobbyAImpl_EnumAddress -( LPDIRECTPLAYLOBBYA iface, - LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, - LPCVOID lpAddress, - DWORD dwAddressSize, - LPVOID lpContext ) -{ - IDirectPlayLobbyAImpl *This = (IDirectPlayLobbyAImpl *)iface; - - TRACE("(%p)->(%p,%p,0x%08x,%p)\n", This, lpEnumAddressCallback, lpAddress, - dwAddressSize, lpContext ); - - return DPL_EnumAddress( lpEnumAddressCallback, lpAddress, dwAddressSize, lpContext ); -} - -static HRESULT WINAPI IDirectPlayLobbyWImpl_EnumAddress -( LPDIRECTPLAYLOBBY iface, - LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, - LPCVOID lpAddress, - DWORD dwAddressSize, - LPVOID lpContext ) -{ - IDirectPlayLobbyWImpl *This = (IDirectPlayLobbyWImpl *)iface; - - TRACE("(%p)->(%p,%p,0x%08x,%p)\n", This, lpEnumAddressCallback, lpAddress, - dwAddressSize, lpContext ); - - return DPL_EnumAddress( lpEnumAddressCallback, lpAddress, dwAddressSize, lpContext ); -} - -HRESULT DPL_EnumAddress( LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, LPCVOID lpAddress, - DWORD dwAddressSize, LPVOID lpContext ) -{ - DWORD dwTotalSizeEnumerated = 0; - - /* FIXME: First chunk is always the total size chunk - Should we report it? */ - - while ( dwTotalSizeEnumerated < dwAddressSize ) - { - const DPADDRESS* lpElements = lpAddress; - DWORD dwSizeThisEnumeration; - - /* Invoke the enum method. If false is returned, stop enumeration */ - if ( !lpEnumAddressCallback( &lpElements->guidDataType, - lpElements->dwDataSize, - (const BYTE *)lpElements + sizeof( DPADDRESS ), - lpContext ) ) - { - break; - } - - dwSizeThisEnumeration = sizeof( DPADDRESS ) + lpElements->dwDataSize; - lpAddress = (const BYTE*) lpAddress + dwSizeThisEnumeration; - dwTotalSizeEnumerated += dwSizeThisEnumeration; - } - - return DP_OK; -} - -/******************************************************************** - * - * Enumerates all the address types that a given service provider needs to - * build the DirectPlay Address. - * - */ -static HRESULT WINAPI IDirectPlayLobbyAImpl_EnumAddressTypes -( LPDIRECTPLAYLOBBYA iface, - LPDPLENUMADDRESSTYPESCALLBACK lpEnumAddressTypeCallback, - REFGUID guidSP, - LPVOID lpContext, - DWORD dwFlags ) -{ - IDirectPlayLobbyAImpl *This = (IDirectPlayLobbyAImpl *)iface; - - HKEY hkResult; - LPCSTR searchSubKey = "SOFTWARE\\Microsoft\\DirectPlay\\Service Providers"; - DWORD dwIndex, sizeOfSubKeyName=50; - char subKeyName[51]; - FILETIME filetime; - - TRACE(" (%p)->(%p,%p,%p,0x%08x)\n", This, lpEnumAddressTypeCallback, guidSP, lpContext, dwFlags ); - - if( dwFlags != 0 ) - { - return DPERR_INVALIDPARAMS; - } - - if( !lpEnumAddressTypeCallback ) - { - return DPERR_INVALIDPARAMS; - } - - if( guidSP == NULL ) - { - return DPERR_INVALIDOBJECT; - } - - /* Need to loop over the service providers in the registry */ - if( RegOpenKeyExA( HKEY_LOCAL_MACHINE, searchSubKey, - 0, KEY_READ, &hkResult ) != ERROR_SUCCESS ) - { - /* Hmmm. Does this mean that there are no service providers? */ - ERR(": no service providers?\n"); - return DP_OK; - } - - /* Traverse all the service providers we have available */ - for( dwIndex=0; - RegEnumKeyExA( hkResult, dwIndex, subKeyName, &sizeOfSubKeyName, - NULL, NULL, NULL, &filetime ) != ERROR_NO_MORE_ITEMS; - ++dwIndex, sizeOfSubKeyName=50 ) - { - - HKEY hkServiceProvider, hkServiceProviderAt; - GUID serviceProviderGUID; - DWORD returnTypeGUID, sizeOfReturnBuffer = 50; - char atSubKey[51]; - char returnBuffer[51]; - WCHAR buff[51]; - DWORD dwAtIndex; - LPCSTR atKey = "Address Types"; - LPCSTR guidDataSubKey = "Guid"; - FILETIME filetime; - - - TRACE(" this time through: %s\n", subKeyName ); - - /* Get a handle for this particular service provider */ - if( RegOpenKeyExA( hkResult, subKeyName, 0, KEY_READ, - &hkServiceProvider ) != ERROR_SUCCESS ) - { - ERR(": what the heck is going on?\n" ); - continue; - } - - if( RegQueryValueExA( hkServiceProvider, guidDataSubKey, - NULL, &returnTypeGUID, (LPBYTE)returnBuffer, - &sizeOfReturnBuffer ) != ERROR_SUCCESS ) - { - ERR(": missing GUID registry data members\n" ); - continue; - } - - /* FIXME: Check return types to ensure we're interpreting data right */ - MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) ); - CLSIDFromString( buff, &serviceProviderGUID ); - /* FIXME: Have I got a memory leak on the serviceProviderGUID? */ - - /* Determine if this is the Service Provider that the user asked for */ - if( !IsEqualGUID( &serviceProviderGUID, guidSP ) ) - { - continue; - } - - /* Get a handle for this particular service provider */ - if( RegOpenKeyExA( hkServiceProvider, atKey, 0, KEY_READ, - &hkServiceProviderAt ) != ERROR_SUCCESS ) - { - TRACE(": No Address Types registry data sub key/members\n" ); - break; - } - - /* Traverse all the address type we have available */ - for( dwAtIndex=0; - RegEnumKeyExA( hkServiceProviderAt, dwAtIndex, atSubKey, &sizeOfSubKeyName, - NULL, NULL, NULL, &filetime ) != ERROR_NO_MORE_ITEMS; - ++dwAtIndex, sizeOfSubKeyName=50 ) - { - TRACE( "Found Address Type GUID %s\n", atSubKey ); - - /* FIXME: Check return types to ensure we're interpreting data right */ - MultiByteToWideChar( CP_ACP, 0, atSubKey, -1, buff, sizeof(buff)/sizeof(WCHAR) ); - CLSIDFromString( buff, &serviceProviderGUID ); - /* FIXME: Have I got a memory leak on the serviceProviderGUID? */ - - /* The enumeration will return FALSE if we are not to continue */ - if( !lpEnumAddressTypeCallback( &serviceProviderGUID, lpContext, 0 ) ) - { - WARN("lpEnumCallback returning FALSE\n" ); - break; /* FIXME: This most likely has to break from the procedure...*/ - } - - } - - /* We only enumerate address types for 1 GUID. We've found it, so quit looking */ - break; - } - - return DP_OK; -} - -static HRESULT WINAPI IDirectPlayLobbyWImpl_EnumAddressTypes -( LPDIRECTPLAYLOBBY iface, - LPDPLENUMADDRESSTYPESCALLBACK lpEnumAddressTypeCallback, - REFGUID guidSP, - LPVOID lpContext, - DWORD dwFlags ) -{ - FIXME(":stub\n"); - return DPERR_OUTOFMEMORY; -} - -/******************************************************************** - * - * Enumerates what applications are registered with DirectPlay by - * invoking the callback function with lpContext. - * - */ -static HRESULT WINAPI IDirectPlayLobbyWImpl_EnumLocalApplications -( LPDIRECTPLAYLOBBY iface, - LPDPLENUMLOCALAPPLICATIONSCALLBACK lpEnumLocalAppCallback, - LPVOID lpContext, - DWORD dwFlags ) -{ - IDirectPlayLobbyWImpl *This = (IDirectPlayLobbyWImpl *)iface; - - FIXME("(%p)->(%p,%p,0x%08x):stub\n", This, lpEnumLocalAppCallback, lpContext, dwFlags ); - - return DPERR_OUTOFMEMORY; -} - -static HRESULT WINAPI IDirectPlayLobbyAImpl_EnumLocalApplications -( LPDIRECTPLAYLOBBYA iface, - LPDPLENUMLOCALAPPLICATIONSCALLBACK lpEnumLocalAppCallback, - LPVOID lpContext, - DWORD dwFlags ) -{ - IDirectPlayLobbyAImpl *This = (IDirectPlayLobbyAImpl *)iface; - - HKEY hkResult; - LPCSTR searchSubKey = "SOFTWARE\\Microsoft\\DirectPlay\\Applications"; - LPCSTR guidDataSubKey = "Guid"; - DWORD dwIndex, sizeOfSubKeyName=50; - char subKeyName[51]; - FILETIME filetime; - - TRACE("(%p)->(%p,%p,0x%08x)\n", This, lpEnumLocalAppCallback, lpContext, dwFlags ); - - if( dwFlags != 0 ) - { - return DPERR_INVALIDPARAMS; - } - - if( !lpEnumLocalAppCallback ) - { - return DPERR_INVALIDPARAMS; - } - - /* Need to loop over the service providers in the registry */ - if( RegOpenKeyExA( HKEY_LOCAL_MACHINE, searchSubKey, - 0, KEY_READ, &hkResult ) != ERROR_SUCCESS ) - { - /* Hmmm. Does this mean that there are no service providers? */ - ERR(": no service providers?\n"); - return DP_OK; - } - - /* Traverse all registered applications */ - for( dwIndex=0; - RegEnumKeyExA( hkResult, dwIndex, subKeyName, &sizeOfSubKeyName, NULL, NULL, NULL, &filetime ) != ERROR_NO_MORE_ITEMS; - ++dwIndex, sizeOfSubKeyName=50 ) - { - - HKEY hkServiceProvider; - GUID serviceProviderGUID; - DWORD returnTypeGUID, sizeOfReturnBuffer = 50; - char returnBuffer[51]; - WCHAR buff[51]; - DPLAPPINFO dplAppInfo; - - TRACE(" this time through: %s\n", subKeyName ); - - /* Get a handle for this particular service provider */ - if( RegOpenKeyExA( hkResult, subKeyName, 0, KEY_READ, - &hkServiceProvider ) != ERROR_SUCCESS ) - { - ERR(": what the heck is going on?\n" ); - continue; - } - - if( RegQueryValueExA( hkServiceProvider, guidDataSubKey, - NULL, &returnTypeGUID, (LPBYTE)returnBuffer, - &sizeOfReturnBuffer ) != ERROR_SUCCESS ) - { - ERR(": missing GUID registry data members\n" ); - continue; - } - - /* FIXME: Check return types to ensure we're interpreting data right */ - MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) ); - CLSIDFromString( buff, &serviceProviderGUID ); - /* FIXME: Have I got a memory leak on the serviceProviderGUID? */ - - dplAppInfo.dwSize = sizeof( dplAppInfo ); - dplAppInfo.guidApplication = serviceProviderGUID; - dplAppInfo.u.lpszAppNameA = subKeyName; - - EnterCriticalSection( &This->unk->DPL_lock ); - - memcpy( &This->dpl->hkCallbackKeyHack, &hkServiceProvider, sizeof( hkServiceProvider ) ); - - if( !lpEnumLocalAppCallback( &dplAppInfo, lpContext, dwFlags ) ) - { - LeaveCriticalSection( &This->unk->DPL_lock ); - break; - } - - LeaveCriticalSection( &This->unk->DPL_lock ); - } - - return DP_OK; -} - -/******************************************************************** - * - * Retrieves the DPLCONNECTION structure that contains all the information - * needed to start and connect an application. This was generated using - * either the RunApplication or SetConnectionSettings methods. - * - * NOTES: If lpData is NULL then just return lpdwDataSize. This allows - * the data structure to be allocated by our caller which can then - * call this procedure/method again with a valid data pointer. - */ -static HRESULT WINAPI IDirectPlayLobbyAImpl_GetConnectionSettings -( LPDIRECTPLAYLOBBYA iface, - DWORD dwAppID, - LPVOID lpData, - LPDWORD lpdwDataSize ) -{ - IDirectPlayLobbyAImpl *This = (IDirectPlayLobbyAImpl *)iface; - HRESULT hr; - - TRACE("(%p)->(0x%08x,%p,%p)\n", This, dwAppID, lpData, lpdwDataSize ); - - EnterCriticalSection( &This->unk->DPL_lock ); - - hr = DPLAYX_GetConnectionSettingsA( dwAppID, - lpData, - lpdwDataSize - ); - - LeaveCriticalSection( &This->unk->DPL_lock ); - - return hr; -} - -static HRESULT WINAPI IDirectPlayLobbyWImpl_GetConnectionSettings -( LPDIRECTPLAYLOBBY iface, - DWORD dwAppID, - LPVOID lpData, - LPDWORD lpdwDataSize ) -{ - IDirectPlayLobbyWImpl *This = (IDirectPlayLobbyWImpl *)iface; - HRESULT hr; - - TRACE("(%p)->(0x%08x,%p,%p)\n", This, dwAppID, lpData, lpdwDataSize ); - - EnterCriticalSection( &This->unk->DPL_lock ); - - hr = DPLAYX_GetConnectionSettingsW( dwAppID, - lpData, - lpdwDataSize - ); - - LeaveCriticalSection( &This->unk->DPL_lock ); - - return hr; -} - -/******************************************************************** - * - * Retrieves the message sent between a lobby client and a DirectPlay - * application. All messages are queued until received. - * - */ -static HRESULT WINAPI IDirectPlayLobbyAImpl_ReceiveLobbyMessage -( LPDIRECTPLAYLOBBYA iface, - DWORD dwFlags, - DWORD dwAppID, - LPDWORD lpdwMessageFlags, - LPVOID lpData, - LPDWORD lpdwDataSize ) -{ - IDirectPlayLobbyAImpl *This = (IDirectPlayLobbyAImpl *)iface; - FIXME(":stub %p %08x %08x %p %p %p\n", This, dwFlags, dwAppID, lpdwMessageFlags, lpData, - lpdwDataSize ); - return DPERR_OUTOFMEMORY; -} - -static HRESULT WINAPI IDirectPlayLobbyWImpl_ReceiveLobbyMessage -( LPDIRECTPLAYLOBBY iface, - DWORD dwFlags, - DWORD dwAppID, - LPDWORD lpdwMessageFlags, - LPVOID lpData, - LPDWORD lpdwDataSize ) -{ - IDirectPlayLobbyWImpl *This = (IDirectPlayLobbyWImpl *)iface; - FIXME(":stub %p %08x %08x %p %p %p\n", This, dwFlags, dwAppID, lpdwMessageFlags, lpData, - lpdwDataSize ); - return DPERR_OUTOFMEMORY; -} - -typedef struct tagRunApplicationEnumStruct -{ - IDirectPlayLobbyAImpl* This; - - GUID appGUID; - LPSTR lpszPath; - LPSTR lpszFileName; - LPSTR lpszCommandLine; - LPSTR lpszCurrentDirectory; -} RunApplicationEnumStruct, *lpRunApplicationEnumStruct; - -/* To be called by RunApplication to find how to invoke the function */ -static BOOL CALLBACK RunApplicationA_EnumLocalApplications -( LPCDPLAPPINFO lpAppInfo, - LPVOID lpContext, - DWORD dwFlags ) -{ - lpRunApplicationEnumStruct lpData = (lpRunApplicationEnumStruct)lpContext; - - if( IsEqualGUID( &lpAppInfo->guidApplication, &lpData->appGUID ) ) - { - char returnBuffer[200]; - DWORD returnType, sizeOfReturnBuffer; - LPCSTR clSubKey = "CommandLine"; - LPCSTR cdSubKey = "CurrentDirectory"; - LPCSTR fileSubKey = "File"; - LPCSTR pathSubKey = "Path"; - - /* FIXME: Lazy man hack - dplay struct has the present reg key saved */ - - sizeOfReturnBuffer = 200; - - /* Get all the appropriate data from the registry */ - if( RegQueryValueExA( lpData->This->dpl->hkCallbackKeyHack, clSubKey, - NULL, &returnType, (LPBYTE)returnBuffer, - &sizeOfReturnBuffer ) != ERROR_SUCCESS ) - { - ERR( ": missing CommandLine registry data member\n" ); - } - else - { - if ((lpData->lpszCommandLine = HeapAlloc( GetProcessHeap(), 0, strlen(returnBuffer)+1 ))) - strcpy( lpData->lpszCommandLine, returnBuffer ); - } - - sizeOfReturnBuffer = 200; - - if( RegQueryValueExA( lpData->This->dpl->hkCallbackKeyHack, cdSubKey, - NULL, &returnType, (LPBYTE)returnBuffer, - &sizeOfReturnBuffer ) != ERROR_SUCCESS ) - { - ERR( ": missing CurrentDirectory registry data member\n" ); - } - else - { - if ((lpData->lpszCurrentDirectory = HeapAlloc( GetProcessHeap(), 0, strlen(returnBuffer)+1 ))) - strcpy( lpData->lpszCurrentDirectory, returnBuffer ); - } - - sizeOfReturnBuffer = 200; - - if( RegQueryValueExA( lpData->This->dpl->hkCallbackKeyHack, fileSubKey, - NULL, &returnType, (LPBYTE)returnBuffer, - &sizeOfReturnBuffer ) != ERROR_SUCCESS ) - { - ERR( ": missing File registry data member\n" ); - } - else - { - if ((lpData->lpszFileName = HeapAlloc( GetProcessHeap(), 0, strlen(returnBuffer)+1 ))) - strcpy( lpData->lpszFileName, returnBuffer ); - } - - sizeOfReturnBuffer = 200; - - if( RegQueryValueExA( lpData->This->dpl->hkCallbackKeyHack, pathSubKey, - NULL, &returnType, (LPBYTE)returnBuffer, - &sizeOfReturnBuffer ) != ERROR_SUCCESS ) - { - ERR( ": missing Path registry data member\n" ); - } - else - { - if ((lpData->lpszPath = HeapAlloc( GetProcessHeap(), 0, strlen(returnBuffer)+1 ))) - strcpy( lpData->lpszPath, returnBuffer ); - } - - return FALSE; /* No need to keep going as we found what we wanted */ - } - - return TRUE; /* Keep enumerating, haven't found the application yet */ -} - -static BOOL DPL_CreateAndSetLobbyHandles( DWORD dwDestProcessId, HANDLE hDestProcess, - LPHANDLE lphStart, LPHANDLE lphDeath, - LPHANDLE lphRead ) -{ - /* These are the handles for the created process */ - HANDLE hAppStart = 0, hAppDeath = 0, hAppRead = 0; - SECURITY_ATTRIBUTES s_attrib; - - s_attrib.nLength = sizeof( s_attrib ); - s_attrib.lpSecurityDescriptor = NULL; - s_attrib.bInheritHandle = TRUE; - - *lphStart = CreateEventW( &s_attrib, TRUE, FALSE, NULL ); - *lphDeath = CreateEventW( &s_attrib, TRUE, FALSE, NULL ); - *lphRead = CreateEventW( &s_attrib, TRUE, FALSE, NULL ); - - if( ( !DuplicateHandle( GetCurrentProcess(), *lphStart, - hDestProcess, &hAppStart, - 0, FALSE, DUPLICATE_SAME_ACCESS ) ) || - ( !DuplicateHandle( GetCurrentProcess(), *lphDeath, - hDestProcess, &hAppDeath, - 0, FALSE, DUPLICATE_SAME_ACCESS ) ) || - ( !DuplicateHandle( GetCurrentProcess(), *lphRead, - hDestProcess, &hAppRead, - 0, FALSE, DUPLICATE_SAME_ACCESS ) ) - ) - { - if (*lphStart) { CloseHandle(*lphStart); *lphStart = 0; } - if (*lphDeath) { CloseHandle(*lphDeath); *lphDeath = 0; } - if (*lphRead) { CloseHandle(*lphRead); *lphRead = 0; } - /* FIXME: Handle leak... */ - ERR( "Unable to dup handles\n" ); - return FALSE; - } - - if( !DPLAYX_SetLobbyHandles( dwDestProcessId, - hAppStart, hAppDeath, hAppRead ) ) - { - /* FIXME: Handle leak... */ - return FALSE; - } - - return TRUE; -} - - -/******************************************************************** - * - * Starts an application and passes to it all the information to - * connect to a session. - * - */ -static HRESULT WINAPI IDirectPlayLobbyAImpl_RunApplication -( LPDIRECTPLAYLOBBYA iface, - DWORD dwFlags, - LPDWORD lpdwAppID, - LPDPLCONNECTION lpConn, - HANDLE hReceiveEvent ) -{ - IDirectPlayLobbyAImpl *This = (IDirectPlayLobbyAImpl *)iface; - HRESULT hr; - RunApplicationEnumStruct enumData; - char temp[200]; - STARTUPINFOA startupInfo; - PROCESS_INFORMATION newProcessInfo; - LPSTR appName; - DWORD dwSuspendCount; - HANDLE hStart, hDeath, hSettingRead; - - TRACE( "(%p)->(0x%08x,%p,%p,%p)\n", - This, dwFlags, lpdwAppID, lpConn, hReceiveEvent ); - - if( dwFlags != 0 ) - { - return DPERR_INVALIDPARAMS; - } - - if( DPLAYX_AnyLobbiesWaitingForConnSettings() ) - { - FIXME( "Waiting lobby not being handled correctly\n" ); - } - - EnterCriticalSection( &This->unk->DPL_lock ); - - ZeroMemory( &enumData, sizeof( enumData ) ); - enumData.This = This; - enumData.appGUID = lpConn->lpSessionDesc->guidApplication; - - /* Our callback function will fill up the enumData structure with all the information - required to start a new process */ - IDirectPlayLobby_EnumLocalApplications( iface, RunApplicationA_EnumLocalApplications, - (&enumData), 0 ); - - /* First the application name */ - strcpy( temp, enumData.lpszPath ); - strcat( temp, "\\" ); - strcat( temp, enumData.lpszFileName ); - HeapFree( GetProcessHeap(), 0, enumData.lpszPath ); - HeapFree( GetProcessHeap(), 0, enumData.lpszFileName ); - if ((appName = HeapAlloc( GetProcessHeap(), 0, strlen(temp)+1 ))) strcpy( appName, temp ); - - /* Now the command line */ - strcat( temp, " " ); - strcat( temp, enumData.lpszCommandLine ); - HeapFree( GetProcessHeap(), 0, enumData.lpszCommandLine ); - if ((enumData.lpszCommandLine = HeapAlloc( GetProcessHeap(), 0, strlen(temp)+1 ))) - strcpy( enumData.lpszCommandLine, temp ); - - ZeroMemory( &startupInfo, sizeof( startupInfo ) ); - startupInfo.cb = sizeof( startupInfo ); - /* FIXME: Should any fields be filled in? */ - - ZeroMemory( &newProcessInfo, sizeof( newProcessInfo ) ); - - if( !CreateProcessA( appName, - enumData.lpszCommandLine, - NULL, - NULL, - FALSE, - CREATE_DEFAULT_ERROR_MODE | CREATE_NEW_CONSOLE | CREATE_SUSPENDED, /* Creation Flags */ - NULL, - enumData.lpszCurrentDirectory, - &startupInfo, - &newProcessInfo - ) - ) - { - ERR( "Failed to create process for app %s\n", appName ); - - HeapFree( GetProcessHeap(), 0, appName ); - HeapFree( GetProcessHeap(), 0, enumData.lpszCommandLine ); - HeapFree( GetProcessHeap(), 0, enumData.lpszCurrentDirectory ); - - LeaveCriticalSection( &This->unk->DPL_lock ); - return DPERR_CANTCREATEPROCESS; - } - - HeapFree( GetProcessHeap(), 0, appName ); - HeapFree( GetProcessHeap(), 0, enumData.lpszCommandLine ); - HeapFree( GetProcessHeap(), 0, enumData.lpszCurrentDirectory ); - - /* Reserve this global application id! */ - if( !DPLAYX_CreateLobbyApplication( newProcessInfo.dwProcessId ) ) - { - ERR( "Unable to create global application data for 0x%08x\n", - newProcessInfo.dwProcessId ); - } - - hr = IDirectPlayLobby_SetConnectionSettings( iface, 0, newProcessInfo.dwProcessId, lpConn ); - - if( hr != DP_OK ) - { - ERR( "SetConnectionSettings failure %s\n", DPLAYX_HresultToString( hr ) ); - LeaveCriticalSection( &This->unk->DPL_lock ); - return hr; - } - - /* Setup the handles for application notification */ - DPL_CreateAndSetLobbyHandles( newProcessInfo.dwProcessId, - newProcessInfo.hProcess, - &hStart, &hDeath, &hSettingRead ); - - /* Setup the message thread ID */ - This->dpl->dwMsgThread = - CreateLobbyMessageReceptionThread( hReceiveEvent, hStart, hDeath, hSettingRead ); - - DPLAYX_SetLobbyMsgThreadId( newProcessInfo.dwProcessId, This->dpl->dwMsgThread ); - - LeaveCriticalSection( &This->unk->DPL_lock ); - - /* Everything seems to have been set correctly, update the dwAppID */ - *lpdwAppID = newProcessInfo.dwProcessId; - - /* Unsuspend the process - should return the prev suspension count */ - if( ( dwSuspendCount = ResumeThread( newProcessInfo.hThread ) ) != 1 ) - { - ERR( "ResumeThread failed with 0x%08x\n", dwSuspendCount ); - } - - return DP_OK; -} - -static HRESULT WINAPI IDirectPlayLobbyWImpl_RunApplication -( LPDIRECTPLAYLOBBY iface, - DWORD dwFlags, - LPDWORD lpdwAppID, - LPDPLCONNECTION lpConn, - HANDLE hReceiveEvent ) -{ - IDirectPlayLobbyWImpl *This = (IDirectPlayLobbyWImpl *)iface; - FIXME( "(%p)->(0x%08x,%p,%p,%p):stub\n", This, dwFlags, lpdwAppID, lpConn, hReceiveEvent ); - return DPERR_OUTOFMEMORY; -} - -/******************************************************************** - * - * Sends a message between the application and the lobby client. - * All messages are queued until received. - * - */ -static HRESULT WINAPI IDirectPlayLobbyAImpl_SendLobbyMessage -( LPDIRECTPLAYLOBBYA iface, - DWORD dwFlags, - DWORD dwAppID, - LPVOID lpData, - DWORD dwDataSize ) -{ - FIXME(":stub\n"); - return DPERR_OUTOFMEMORY; -} - -static HRESULT WINAPI IDirectPlayLobbyWImpl_SendLobbyMessage -( LPDIRECTPLAYLOBBY iface, - DWORD dwFlags, - DWORD dwAppID, - LPVOID lpData, - DWORD dwDataSize ) -{ - FIXME(":stub\n"); - return DPERR_OUTOFMEMORY; -} - -/******************************************************************** - * - * Modifies the DPLCONNECTION structure to contain all information - * needed to start and connect an application. - * - */ -static HRESULT WINAPI IDirectPlayLobbyWImpl_SetConnectionSettings -( LPDIRECTPLAYLOBBY iface, - DWORD dwFlags, - DWORD dwAppID, - LPDPLCONNECTION lpConn ) -{ - IDirectPlayLobbyWImpl *This = (IDirectPlayLobbyWImpl *)iface; - HRESULT hr; - - TRACE("(%p)->(0x%08x,0x%08x,%p)\n", This, dwFlags, dwAppID, lpConn ); - - EnterCriticalSection( &This->unk->DPL_lock ); - - hr = DPLAYX_SetConnectionSettingsW( dwFlags, dwAppID, lpConn ); - - /* FIXME: Don't think that this is supposed to fail, but the documentation - is somewhat sketchy. I'll try creating a lobby application - for this... */ - if( hr == DPERR_NOTLOBBIED ) - { - FIXME( "Unlobbied app setting connections. Is this correct behavior?\n" ); - if( dwAppID == 0 ) - { - dwAppID = GetCurrentProcessId(); - } - DPLAYX_CreateLobbyApplication( dwAppID ); - hr = DPLAYX_SetConnectionSettingsW( dwFlags, dwAppID, lpConn ); - } - - LeaveCriticalSection( &This->unk->DPL_lock ); - - return hr; -} - -static HRESULT WINAPI IDirectPlayLobbyAImpl_SetConnectionSettings -( LPDIRECTPLAYLOBBYA iface, - DWORD dwFlags, - DWORD dwAppID, - LPDPLCONNECTION lpConn ) -{ - IDirectPlayLobbyAImpl *This = (IDirectPlayLobbyAImpl *)iface; - HRESULT hr; - - TRACE("(%p)->(0x%08x,0x%08x,%p)\n", This, dwFlags, dwAppID, lpConn ); - - EnterCriticalSection( &This->unk->DPL_lock ); - - hr = DPLAYX_SetConnectionSettingsA( dwFlags, dwAppID, lpConn ); - - /* FIXME: Don't think that this is supposed to fail, but the documentation - is somewhat sketchy. I'll try creating a lobby application - for this... */ - if( hr == DPERR_NOTLOBBIED ) - { - FIXME( "Unlobbied app setting connections. Is this correct behavior?\n" ); - dwAppID = GetCurrentProcessId(); - DPLAYX_CreateLobbyApplication( dwAppID ); - hr = DPLAYX_SetConnectionSettingsA( dwFlags, dwAppID, lpConn ); - } - - LeaveCriticalSection( &This->unk->DPL_lock ); - - return hr; -} - -/******************************************************************** - * - * Registers an event that will be set when a lobby message is received. - * - */ -static HRESULT WINAPI IDirectPlayLobbyAImpl_SetLobbyMessageEvent -( LPDIRECTPLAYLOBBYA iface, - DWORD dwFlags, - DWORD dwAppID, - HANDLE hReceiveEvent ) -{ - FIXME(":stub\n"); - return DPERR_OUTOFMEMORY; -} - -static HRESULT WINAPI IDirectPlayLobbyWImpl_SetLobbyMessageEvent -( LPDIRECTPLAYLOBBY iface, - DWORD dwFlags, - DWORD dwAppID, - HANDLE hReceiveEvent ) -{ - FIXME(":stub\n"); - return DPERR_OUTOFMEMORY; -} - - -/* DPL 2 methods */ -static HRESULT WINAPI IDirectPlayLobby2WImpl_CreateCompoundAddress -( LPDIRECTPLAYLOBBY2 iface, - LPCDPCOMPOUNDADDRESSELEMENT lpElements, - DWORD dwElementCount, - LPVOID lpAddress, - LPDWORD lpdwAddressSize ) -{ - return DPL_CreateCompoundAddress( lpElements, dwElementCount, lpAddress, lpdwAddressSize, FALSE ); -} - -static HRESULT WINAPI IDirectPlayLobby2AImpl_CreateCompoundAddress -( LPDIRECTPLAYLOBBY2A iface, - LPCDPCOMPOUNDADDRESSELEMENT lpElements, - DWORD dwElementCount, - LPVOID lpAddress, - LPDWORD lpdwAddressSize ) -{ - return DPL_CreateCompoundAddress( lpElements, dwElementCount, lpAddress, lpdwAddressSize, TRUE ); -} - -HRESULT DPL_CreateCompoundAddress -( LPCDPCOMPOUNDADDRESSELEMENT lpElements, - DWORD dwElementCount, - LPVOID lpAddress, - LPDWORD lpdwAddressSize, - BOOL bAnsiInterface ) -{ - DWORD dwSizeRequired = 0; - DWORD dwElements; - LPCDPCOMPOUNDADDRESSELEMENT lpOrigElements = lpElements; - - TRACE("(%p,0x%08x,%p,%p)\n", lpElements, dwElementCount, lpAddress, lpdwAddressSize ); - - /* Parameter check */ - if( ( lpElements == NULL ) || - ( dwElementCount == 0 ) /* FIXME: Not sure if this is a failure case */ - ) - { - return DPERR_INVALIDPARAMS; - } - - /* Add the total size chunk */ - dwSizeRequired += sizeof( DPADDRESS ) + sizeof( DWORD ); - - /* Calculate the size of the buffer required */ - for ( dwElements = dwElementCount; dwElements > 0; --dwElements, ++lpElements ) - { - if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_ServiceProvider ) ) || - ( IsEqualGUID( &lpElements->guidDataType, &DPAID_LobbyProvider ) ) - ) - { - dwSizeRequired += sizeof( DPADDRESS ) + sizeof( GUID ); - } - else if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_Phone ) ) || - ( IsEqualGUID( &lpElements->guidDataType, &DPAID_Modem ) ) || - ( IsEqualGUID( &lpElements->guidDataType, &DPAID_INet ) ) - ) - { - if( !bAnsiInterface ) - { - ERR( "Ansi GUIDs used for unicode interface\n" ); - return DPERR_INVALIDFLAGS; - } - - dwSizeRequired += sizeof( DPADDRESS ) + lpElements->dwDataSize; - } - else if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_PhoneW ) ) || - ( IsEqualGUID( &lpElements->guidDataType, &DPAID_ModemW ) ) || - ( IsEqualGUID( &lpElements->guidDataType, &DPAID_INetW ) ) - ) - { - if( bAnsiInterface ) - { - ERR( "Unicode GUIDs used for ansi interface\n" ); - return DPERR_INVALIDFLAGS; - } - - FIXME( "Right size for unicode interface?\n" ); - dwSizeRequired += sizeof( DPADDRESS ) + lpElements->dwDataSize * sizeof( WCHAR ); - } - else if ( IsEqualGUID( &lpElements->guidDataType, &DPAID_INetPort ) ) - { - dwSizeRequired += sizeof( DPADDRESS ) + sizeof( WORD ); - } - else if ( IsEqualGUID( &lpElements->guidDataType, &DPAID_ComPort ) ) - { - FIXME( "Right size for unicode interface?\n" ); - dwSizeRequired += sizeof( DPADDRESS ) + sizeof( DPCOMPORTADDRESS ); /* FIXME: Right size? */ - } - else - { - ERR( "Unknown GUID %s\n", debugstr_guid(&lpElements->guidDataType) ); - return DPERR_INVALIDFLAGS; - } - } - - /* The user wants to know how big a buffer to allocate for us */ - if( ( lpAddress == NULL ) || - ( *lpdwAddressSize < dwSizeRequired ) - ) - { - *lpdwAddressSize = dwSizeRequired; - return DPERR_BUFFERTOOSMALL; - } - - /* Add the total size chunk */ - { - LPDPADDRESS lpdpAddress = lpAddress; - - lpdpAddress->guidDataType = DPAID_TotalSize; - lpdpAddress->dwDataSize = sizeof( DWORD ); - lpAddress = (char *) lpAddress + sizeof( DPADDRESS ); - - *(LPDWORD)lpAddress = dwSizeRequired; - lpAddress = (char *) lpAddress + sizeof( DWORD ); - } - - /* Calculate the size of the buffer required */ - for( dwElements = dwElementCount, lpElements = lpOrigElements; - dwElements > 0; - --dwElements, ++lpElements ) - { - if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_ServiceProvider ) ) || - ( IsEqualGUID( &lpElements->guidDataType, &DPAID_LobbyProvider ) ) - ) - { - LPDPADDRESS lpdpAddress = lpAddress; - - lpdpAddress->guidDataType = lpElements->guidDataType; - lpdpAddress->dwDataSize = sizeof( GUID ); - lpAddress = (char *) lpAddress + sizeof( DPADDRESS ); - - CopyMemory( lpAddress, lpElements->lpData, sizeof( GUID ) ); - lpAddress = (char *) lpAddress + sizeof( GUID ); - } - else if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_Phone ) ) || - ( IsEqualGUID( &lpElements->guidDataType, &DPAID_Modem ) ) || - ( IsEqualGUID( &lpElements->guidDataType, &DPAID_INet ) ) - ) - { - LPDPADDRESS lpdpAddress = lpAddress; - - lpdpAddress->guidDataType = lpElements->guidDataType; - lpdpAddress->dwDataSize = lpElements->dwDataSize; - lpAddress = (char *) lpAddress + sizeof( DPADDRESS ); - - lstrcpynA( lpAddress, lpElements->lpData, lpElements->dwDataSize ); - lpAddress = (char *) lpAddress + lpElements->dwDataSize; - } - else if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_PhoneW ) ) || - ( IsEqualGUID( &lpElements->guidDataType, &DPAID_ModemW ) ) || - ( IsEqualGUID( &lpElements->guidDataType, &DPAID_INetW ) ) - ) - { - LPDPADDRESS lpdpAddress = lpAddress; - - lpdpAddress->guidDataType = lpElements->guidDataType; - lpdpAddress->dwDataSize = lpElements->dwDataSize; - lpAddress = (char *) lpAddress + sizeof( DPADDRESS ); - - lstrcpynW( lpAddress, lpElements->lpData, lpElements->dwDataSize ); - lpAddress = (char *) lpAddress + lpElements->dwDataSize * sizeof( WCHAR ); - } - else if ( IsEqualGUID( &lpElements->guidDataType, &DPAID_INetPort ) ) - { - LPDPADDRESS lpdpAddress = lpAddress; - - lpdpAddress->guidDataType = lpElements->guidDataType; - lpdpAddress->dwDataSize = lpElements->dwDataSize; - lpAddress = (char *) lpAddress + sizeof( DPADDRESS ); - - *((LPWORD)lpAddress) = *((LPWORD)lpElements->lpData); - lpAddress = (char *) lpAddress + sizeof( WORD ); - } - else if ( IsEqualGUID( &lpElements->guidDataType, &DPAID_ComPort ) ) - { - LPDPADDRESS lpdpAddress = lpAddress; - - lpdpAddress->guidDataType = lpElements->guidDataType; - lpdpAddress->dwDataSize = lpElements->dwDataSize; - lpAddress = (char *) lpAddress + sizeof( DPADDRESS ); - - CopyMemory( lpAddress, lpElements->lpData, sizeof( DPADDRESS ) ); - lpAddress = (char *) lpAddress + sizeof( DPADDRESS ); - } - } - - return DP_OK; -} - -/* DPL 3 methods */ - -static HRESULT WINAPI IDirectPlayLobby3WImpl_ConnectEx -( LPDIRECTPLAYLOBBY3 iface, DWORD dwFlags, REFIID riid, - LPVOID* lplpDP, IUnknown* pUnk ) -{ - IDirectPlayLobbyAImpl *This = (IDirectPlayLobbyAImpl *)iface ; - return DPL_ConnectEx( This, dwFlags, riid, lplpDP, pUnk ); -} - -static HRESULT WINAPI IDirectPlayLobby3AImpl_ConnectEx -( LPDIRECTPLAYLOBBY3A iface, DWORD dwFlags, REFIID riid, - LPVOID* lplpDP, IUnknown* pUnk ) -{ - IDirectPlayLobbyAImpl *This = (IDirectPlayLobbyAImpl *)iface ; - return DPL_ConnectEx( This, dwFlags, riid, lplpDP, pUnk ); -} - -static HRESULT WINAPI IDirectPlayLobby3WImpl_RegisterApplication -( LPDIRECTPLAYLOBBY3 iface, DWORD dwFlags, LPDPAPPLICATIONDESC lpAppDesc ) -{ - FIXME(":stub\n"); - return DP_OK; -} - -static HRESULT WINAPI IDirectPlayLobby3AImpl_RegisterApplication -( LPDIRECTPLAYLOBBY3A iface, DWORD dwFlags, LPDPAPPLICATIONDESC lpAppDesc ) -{ - FIXME(":stub\n"); - return DP_OK; -} - -static HRESULT WINAPI IDirectPlayLobby3WImpl_UnregisterApplication -( LPDIRECTPLAYLOBBY3 iface, DWORD dwFlags, REFGUID lpAppDesc ) -{ - FIXME(":stub\n"); - return DP_OK; -} - -static HRESULT WINAPI IDirectPlayLobby3AImpl_UnregisterApplication -( LPDIRECTPLAYLOBBY3A iface, DWORD dwFlags, REFGUID lpAppDesc ) -{ - FIXME(":stub\n"); - return DP_OK; -} - -static HRESULT WINAPI IDirectPlayLobby3WImpl_WaitForConnectionSettings -( LPDIRECTPLAYLOBBY3 iface, DWORD dwFlags ) -{ - HRESULT hr = DP_OK; - BOOL bStartWait = !(dwFlags & DPLWAIT_CANCEL); - - TRACE( "(%p)->(0x%08x)\n", iface, dwFlags ); - - if( DPLAYX_WaitForConnectionSettings( bStartWait ) ) - { - /* FIXME: What is the correct error return code? */ - hr = DPERR_NOTLOBBIED; - } - - return hr; -} - -static HRESULT WINAPI IDirectPlayLobby3AImpl_WaitForConnectionSettings -( LPDIRECTPLAYLOBBY3A iface, DWORD dwFlags ) -{ - HRESULT hr = DP_OK; - BOOL bStartWait = !(dwFlags & DPLWAIT_CANCEL); - - TRACE( "(%p)->(0x%08x)\n", iface, dwFlags ); - - if( DPLAYX_WaitForConnectionSettings( bStartWait ) ) - { - /* FIXME: What is the correct error return code? */ - hr = DPERR_NOTLOBBIED; - } - - return hr; -} - - -/* Virtual Table definitions for DPL{1,2,3}{A,W} */ - -/* Note: Hack so we can reuse the old functions without compiler warnings */ -#if !defined(__STRICT_ANSI__) && defined(__GNUC__) -# define XCAST(fun) (typeof(directPlayLobbyAVT.fun)) -#else -# define XCAST(fun) (void*) -#endif - -/* Direct Play Lobby 1 (ascii) Virtual Table for methods */ -/* All lobby 1 methods are exactly the same except QueryInterface */ -static const IDirectPlayLobbyVtbl directPlayLobbyAVT = -{ - - XCAST(QueryInterface)DPL_QueryInterface, - XCAST(AddRef)DPL_AddRef, - XCAST(Release)DPL_Release, - - IDirectPlayLobbyAImpl_Connect, - IDirectPlayLobbyAImpl_CreateAddress, - IDirectPlayLobbyAImpl_EnumAddress, - IDirectPlayLobbyAImpl_EnumAddressTypes, - IDirectPlayLobbyAImpl_EnumLocalApplications, - IDirectPlayLobbyAImpl_GetConnectionSettings, - IDirectPlayLobbyAImpl_ReceiveLobbyMessage, - IDirectPlayLobbyAImpl_RunApplication, - IDirectPlayLobbyAImpl_SendLobbyMessage, - IDirectPlayLobbyAImpl_SetConnectionSettings, - IDirectPlayLobbyAImpl_SetLobbyMessageEvent -}; -#undef XCAST - - -/* Note: Hack so we can reuse the old functions without compiler warnings */ -#if !defined(__STRICT_ANSI__) && defined(__GNUC__) -# define XCAST(fun) (typeof(directPlayLobbyWVT.fun)) -#else -# define XCAST(fun) (void*) -#endif - -/* Direct Play Lobby 1 (unicode) Virtual Table for methods */ -static const IDirectPlayLobbyVtbl directPlayLobbyWVT = -{ - - XCAST(QueryInterface)DPL_QueryInterface, - XCAST(AddRef)DPL_AddRef, - XCAST(Release)DPL_Release, - - IDirectPlayLobbyWImpl_Connect, - IDirectPlayLobbyWImpl_CreateAddress, - IDirectPlayLobbyWImpl_EnumAddress, - IDirectPlayLobbyWImpl_EnumAddressTypes, - IDirectPlayLobbyWImpl_EnumLocalApplications, - IDirectPlayLobbyWImpl_GetConnectionSettings, - IDirectPlayLobbyWImpl_ReceiveLobbyMessage, - IDirectPlayLobbyWImpl_RunApplication, - IDirectPlayLobbyWImpl_SendLobbyMessage, - IDirectPlayLobbyWImpl_SetConnectionSettings, - IDirectPlayLobbyWImpl_SetLobbyMessageEvent -}; -#undef XCAST - -/* Note: Hack so we can reuse the old functions without compiler warnings */ -#if !defined(__STRICT_ANSI__) && defined(__GNUC__) -# define XCAST(fun) (typeof(directPlayLobby2AVT.fun)) -#else -# define XCAST(fun) (void*) -#endif - -/* Direct Play Lobby 2 (ascii) Virtual Table for methods */ -static const IDirectPlayLobby2Vtbl directPlayLobby2AVT = -{ - - XCAST(QueryInterface)DPL_QueryInterface, - XCAST(AddRef)DPL_AddRef, - XCAST(Release)DPL_Release, - - XCAST(Connect)IDirectPlayLobbyAImpl_Connect, - XCAST(CreateAddress)IDirectPlayLobbyAImpl_CreateAddress, - XCAST(EnumAddress)IDirectPlayLobbyAImpl_EnumAddress, - XCAST(EnumAddressTypes)IDirectPlayLobbyAImpl_EnumAddressTypes, - XCAST(EnumLocalApplications)IDirectPlayLobbyAImpl_EnumLocalApplications, - XCAST(GetConnectionSettings)IDirectPlayLobbyAImpl_GetConnectionSettings, - XCAST(ReceiveLobbyMessage)IDirectPlayLobbyAImpl_ReceiveLobbyMessage, - XCAST(RunApplication)IDirectPlayLobbyAImpl_RunApplication, - XCAST(SendLobbyMessage)IDirectPlayLobbyAImpl_SendLobbyMessage, - XCAST(SetConnectionSettings)IDirectPlayLobbyAImpl_SetConnectionSettings, - XCAST(SetLobbyMessageEvent)IDirectPlayLobbyAImpl_SetLobbyMessageEvent, - - IDirectPlayLobby2AImpl_CreateCompoundAddress -}; -#undef XCAST - -/* Note: Hack so we can reuse the old functions without compiler warnings */ -#if !defined(__STRICT_ANSI__) && defined(__GNUC__) -# define XCAST(fun) (typeof(directPlayLobby2WVT.fun)) -#else -# define XCAST(fun) (void*) -#endif - -/* Direct Play Lobby 2 (unicode) Virtual Table for methods */ -static const IDirectPlayLobby2Vtbl directPlayLobby2WVT = -{ - - XCAST(QueryInterface)DPL_QueryInterface, - XCAST(AddRef)DPL_AddRef, - XCAST(Release)DPL_Release, - - XCAST(Connect)IDirectPlayLobbyWImpl_Connect, - XCAST(CreateAddress)IDirectPlayLobbyWImpl_CreateAddress, - XCAST(EnumAddress)IDirectPlayLobbyWImpl_EnumAddress, - XCAST(EnumAddressTypes)IDirectPlayLobbyWImpl_EnumAddressTypes, - XCAST(EnumLocalApplications)IDirectPlayLobbyWImpl_EnumLocalApplications, - XCAST(GetConnectionSettings)IDirectPlayLobbyWImpl_GetConnectionSettings, - XCAST(ReceiveLobbyMessage)IDirectPlayLobbyWImpl_ReceiveLobbyMessage, - XCAST(RunApplication)IDirectPlayLobbyWImpl_RunApplication, - XCAST(SendLobbyMessage)IDirectPlayLobbyWImpl_SendLobbyMessage, - XCAST(SetConnectionSettings)IDirectPlayLobbyWImpl_SetConnectionSettings, - XCAST(SetLobbyMessageEvent)IDirectPlayLobbyWImpl_SetLobbyMessageEvent, - - IDirectPlayLobby2WImpl_CreateCompoundAddress -}; -#undef XCAST - -/* Direct Play Lobby 3 (ascii) Virtual Table for methods */ - -/* Note: Hack so we can reuse the old functions without compiler warnings */ -#if !defined(__STRICT_ANSI__) && defined(__GNUC__) -# define XCAST(fun) (typeof(directPlayLobby3AVT.fun)) -#else -# define XCAST(fun) (void*) -#endif - -static const IDirectPlayLobby3Vtbl directPlayLobby3AVT = -{ - XCAST(QueryInterface)DPL_QueryInterface, - XCAST(AddRef)DPL_AddRef, - XCAST(Release)DPL_Release, - - XCAST(Connect)IDirectPlayLobbyAImpl_Connect, - XCAST(CreateAddress)IDirectPlayLobbyAImpl_CreateAddress, - XCAST(EnumAddress)IDirectPlayLobbyAImpl_EnumAddress, - XCAST(EnumAddressTypes)IDirectPlayLobbyAImpl_EnumAddressTypes, - XCAST(EnumLocalApplications)IDirectPlayLobbyAImpl_EnumLocalApplications, - XCAST(GetConnectionSettings)IDirectPlayLobbyAImpl_GetConnectionSettings, - XCAST(ReceiveLobbyMessage)IDirectPlayLobbyAImpl_ReceiveLobbyMessage, - XCAST(RunApplication)IDirectPlayLobbyAImpl_RunApplication, - XCAST(SendLobbyMessage)IDirectPlayLobbyAImpl_SendLobbyMessage, - XCAST(SetConnectionSettings)IDirectPlayLobbyAImpl_SetConnectionSettings, - XCAST(SetLobbyMessageEvent)IDirectPlayLobbyAImpl_SetLobbyMessageEvent, - - XCAST(CreateCompoundAddress)IDirectPlayLobby2AImpl_CreateCompoundAddress, - - IDirectPlayLobby3AImpl_ConnectEx, - IDirectPlayLobby3AImpl_RegisterApplication, - IDirectPlayLobby3AImpl_UnregisterApplication, - IDirectPlayLobby3AImpl_WaitForConnectionSettings -}; -#undef XCAST - -/* Direct Play Lobby 3 (unicode) Virtual Table for methods */ - -/* Note: Hack so we can reuse the old functions without compiler warnings */ -#if !defined(__STRICT_ANSI__) && defined(__GNUC__) -# define XCAST(fun) (typeof(directPlayLobby3WVT.fun)) -#else -# define XCAST(fun) (void*) -#endif - -static const IDirectPlayLobby3Vtbl directPlayLobby3WVT = -{ - XCAST(QueryInterface)DPL_QueryInterface, - XCAST(AddRef)DPL_AddRef, - XCAST(Release)DPL_Release, - - XCAST(Connect)IDirectPlayLobbyWImpl_Connect, - XCAST(CreateAddress)IDirectPlayLobbyWImpl_CreateAddress, - XCAST(EnumAddress)IDirectPlayLobbyWImpl_EnumAddress, - XCAST(EnumAddressTypes)IDirectPlayLobbyWImpl_EnumAddressTypes, - XCAST(EnumLocalApplications)IDirectPlayLobbyWImpl_EnumLocalApplications, - XCAST(GetConnectionSettings)IDirectPlayLobbyWImpl_GetConnectionSettings, - XCAST(ReceiveLobbyMessage)IDirectPlayLobbyWImpl_ReceiveLobbyMessage, - XCAST(RunApplication)IDirectPlayLobbyWImpl_RunApplication, - XCAST(SendLobbyMessage)IDirectPlayLobbyWImpl_SendLobbyMessage, - XCAST(SetConnectionSettings)IDirectPlayLobbyWImpl_SetConnectionSettings, - XCAST(SetLobbyMessageEvent)IDirectPlayLobbyWImpl_SetLobbyMessageEvent, - - XCAST(CreateCompoundAddress)IDirectPlayLobby2WImpl_CreateCompoundAddress, - - IDirectPlayLobby3WImpl_ConnectEx, - IDirectPlayLobby3WImpl_RegisterApplication, - IDirectPlayLobby3WImpl_UnregisterApplication, - IDirectPlayLobby3WImpl_WaitForConnectionSettings -}; -#undef XCAST - - -/********************************************************* - * - * Direct Play Lobby Interface Implementation - * - *********************************************************/ - -/*************************************************************************** - * DirectPlayLobbyCreateA (DPLAYX.4) - * - */ -HRESULT WINAPI DirectPlayLobbyCreateA( LPGUID lpGUIDDSP, - LPDIRECTPLAYLOBBYA *lplpDPL, - IUnknown *lpUnk, - LPVOID lpData, - DWORD dwDataSize ) -{ - TRACE("lpGUIDDSP=%p lplpDPL=%p lpUnk=%p lpData=%p dwDataSize=%08x\n", - lpGUIDDSP,lplpDPL,lpUnk,lpData,dwDataSize); - - /* Parameter Check: lpGUIDSP, lpUnk & lpData must be NULL. dwDataSize must - * equal 0. These fields are mostly for future expansion. - */ - if ( lpGUIDDSP || lpData || dwDataSize ) - { - *lplpDPL = NULL; - return DPERR_INVALIDPARAMS; - } - - if( lpUnk ) - { - *lplpDPL = NULL; - ERR("Bad parameters!\n" ); - return CLASS_E_NOAGGREGATION; - } - - return DPL_CreateInterface( &IID_IDirectPlayLobbyA, (void**)lplpDPL ); -} - -/*************************************************************************** - * DirectPlayLobbyCreateW (DPLAYX.5) - * - */ -HRESULT WINAPI DirectPlayLobbyCreateW( LPGUID lpGUIDDSP, - LPDIRECTPLAYLOBBY *lplpDPL, - IUnknown *lpUnk, - LPVOID lpData, - DWORD dwDataSize ) -{ - TRACE("lpGUIDDSP=%p lplpDPL=%p lpUnk=%p lpData=%p dwDataSize=%08x\n", - lpGUIDDSP,lplpDPL,lpUnk,lpData,dwDataSize); - - /* Parameter Check: lpGUIDSP, lpUnk & lpData must be NULL. dwDataSize must - * equal 0. These fields are mostly for future expansion. - */ - if ( lpGUIDDSP || lpData || dwDataSize ) - { - *lplpDPL = NULL; - ERR("Bad parameters!\n" ); - return DPERR_INVALIDPARAMS; - } - - if( lpUnk ) - { - *lplpDPL = NULL; - ERR("Bad parameters!\n" ); - return CLASS_E_NOAGGREGATION; - } - - return DPL_CreateInterface( &IID_IDirectPlayLobby, (void**)lplpDPL ); -} diff --git a/dll/directx/dsound_new/capture.c b/dll/directx/dsound_new/capture.c index 4a86ef1b32c..a79433b6d56 100644 --- a/dll/directx/dsound_new/capture.c +++ b/dll/directx/dsound_new/capture.c @@ -4,7 +4,7 @@ * FILE: dll/directx/dsound_new/capture.c * PURPOSE: Implement IDirectSoundCapture * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/dsound_new/capturebuffer.c b/dll/directx/dsound_new/capturebuffer.c index c6ac772802b..fa0a66cceea 100644 --- a/dll/directx/dsound_new/capturebuffer.c +++ b/dll/directx/dsound_new/capturebuffer.c @@ -4,7 +4,7 @@ * FILE: dll/directx/dsound_new/capturebuffer.c * PURPOSE: IDirectSoundCaptureBuffer8 implementation * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ diff --git a/dll/directx/dsound_new/classfactory.c b/dll/directx/dsound_new/classfactory.c index 64d2f8f6192..0f25f272fd8 100644 --- a/dll/directx/dsound_new/classfactory.c +++ b/dll/directx/dsound_new/classfactory.c @@ -4,7 +4,7 @@ * FILE: dll/directx/dsound_new/classfactory.c * PURPOSE: IClassFactory implementation * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ diff --git a/dll/directx/dsound_new/devicelist.c b/dll/directx/dsound_new/devicelist.c index 8441eb99146..1a2db7af812 100644 --- a/dll/directx/dsound_new/devicelist.c +++ b/dll/directx/dsound_new/devicelist.c @@ -4,7 +4,7 @@ * FILE: dll/directx/dsound_new/devicelist.c * PURPOSE: Enumeration of audio devices * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/dsound_new/directsound.c b/dll/directx/dsound_new/directsound.c index 8a630c2c055..1727f89fe9d 100644 --- a/dll/directx/dsound_new/directsound.c +++ b/dll/directx/dsound_new/directsound.c @@ -4,7 +4,7 @@ * FILE: dll/directx/dsound_new/directsound.c * PURPOSE: Handles IDirectSound interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/dsound_new/dsound.c b/dll/directx/dsound_new/dsound.c index c88fc00e528..3f29e895c7c 100644 --- a/dll/directx/dsound_new/dsound.c +++ b/dll/directx/dsound_new/dsound.c @@ -4,7 +4,7 @@ * FILE: dll/directx/dsound_new/dsound.c * PURPOSE: Handles DSound initialization * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/dsound_new/enum.c b/dll/directx/dsound_new/enum.c index 777168fb27a..9f85d583508 100644 --- a/dll/directx/dsound_new/enum.c +++ b/dll/directx/dsound_new/enum.c @@ -4,7 +4,7 @@ * FILE: dll/directx/dsound_new/enum.c * PURPOSE: Handles DSound device enumeration * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/dsound_new/misc.c b/dll/directx/dsound_new/misc.c index 73c2e63a283..72c9a24c885 100644 --- a/dll/directx/dsound_new/misc.c +++ b/dll/directx/dsound_new/misc.c @@ -4,7 +4,7 @@ * FILE: dll/directx/dsound_new/misc.c * PURPOSE: Misc support routines * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/dsound_new/notify.c b/dll/directx/dsound_new/notify.c index 8028b48a60c..6b5a40fe157 100644 --- a/dll/directx/dsound_new/notify.c +++ b/dll/directx/dsound_new/notify.c @@ -4,7 +4,7 @@ * FILE: dll/directx/dsound_new/notify.c * PURPOSE: IDirectSoundNotify implementation * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ diff --git a/dll/directx/dsound_new/primary.c b/dll/directx/dsound_new/primary.c index 2a62ccee855..31b1fe41635 100644 --- a/dll/directx/dsound_new/primary.c +++ b/dll/directx/dsound_new/primary.c @@ -4,7 +4,7 @@ * FILE: dll/directx/dsound_new/primary.c * PURPOSE: Primary IDirectSoundBuffer8 implementation * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ diff --git a/dll/directx/dsound_new/property.c b/dll/directx/dsound_new/property.c index cfc17614a84..8a68eedea86 100644 --- a/dll/directx/dsound_new/property.c +++ b/dll/directx/dsound_new/property.c @@ -4,7 +4,7 @@ * FILE: dll/directx/dsound_new/secondary.c * PURPOSE: Secondary IDirectSoundBuffer8 implementation * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ diff --git a/dll/directx/dsound_new/secondary.c b/dll/directx/dsound_new/secondary.c index 2293d34f2e9..6d97ada87a6 100644 --- a/dll/directx/dsound_new/secondary.c +++ b/dll/directx/dsound_new/secondary.c @@ -4,7 +4,7 @@ * FILE: dll/directx/dsound_new/secondary.c * PURPOSE: Secondary IDirectSoundBuffer8 implementation * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ diff --git a/dll/directx/dsound_new/stubs.c b/dll/directx/dsound_new/stubs.c index 388d1037731..2e91e7fca01 100644 --- a/dll/directx/dsound_new/stubs.c +++ b/dll/directx/dsound_new/stubs.c @@ -4,7 +4,7 @@ * FILE: dll/directx/dsound_new/stubs.c * PURPOSE: DSound stubs * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/dxdiagn/CMakeLists.txt b/dll/directx/dxdiagn/CMakeLists.txt deleted file mode 100644 index a3a30b1f861..00000000000 --- a/dll/directx/dxdiagn/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ - - -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - -spec2def(dxdiagn.dll dxdiagn.spec) - -add_library(dxdiagn SHARED - container.c - dxdiag_main.c - provider.c - regsvr.c - ${CMAKE_CURRENT_BINARY_DIR}/dxdiagn.def) - -set_module_type(dxdiagn win32dll UNICODE) - -target_link_libraries(dxdiagn uuid wine) - -add_importlibs(dxdiagn - user32 - advapi32 - ole32 - oleaut32 - msvcrt - kernel32 - ntdll) - -add_pch(dxdiagn dxdiag_private.h) -add_cd_file(TARGET dxdiagn DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/dxdiagn/container.c b/dll/directx/dxdiagn/container.c deleted file mode 100644 index 75581714da4..00000000000 --- a/dll/directx/dxdiagn/container.c +++ /dev/null @@ -1,321 +0,0 @@ -/* - * IDxDiagContainer Implementation - * - * Copyright 2004 Raphael Junqueira - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include -#include "dxdiag_private.h" -#include -#include - -WINE_DEFAULT_DEBUG_CHANNEL(dxdiag); - -/* IDxDiagContainer IUnknown parts follow: */ -HRESULT WINAPI IDxDiagContainerImpl_QueryInterface(PDXDIAGCONTAINER iface, REFIID riid, LPVOID *ppobj) -{ - IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface; - - if (IsEqualGUID(riid, &IID_IUnknown) - || IsEqualGUID(riid, &IID_IDxDiagContainer)) { - IDxDiagContainerImpl_AddRef(iface); - *ppobj = This; - return S_OK; - } - - WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj); - return E_NOINTERFACE; -} - -ULONG WINAPI IDxDiagContainerImpl_AddRef(PDXDIAGCONTAINER iface) { - IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->ref); - - TRACE("(%p)->(ref before=%lu)\n", This, refCount - 1); - - DXDIAGN_LockModule(); - - return refCount; -} - -ULONG WINAPI IDxDiagContainerImpl_Release(PDXDIAGCONTAINER iface) { - IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->ref); - - TRACE("(%p)->(ref before=%lu)\n", This, refCount + 1); - - if (!refCount) { - HeapFree(GetProcessHeap(), 0, This); - } - - DXDIAGN_UnlockModule(); - - return refCount; -} - -/* IDxDiagContainer Interface follow: */ -HRESULT WINAPI IDxDiagContainerImpl_GetNumberOfChildContainers(PDXDIAGCONTAINER iface, DWORD* pdwCount) { - IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface; - TRACE("(%p)\n", iface); - if (NULL == pdwCount) { - return E_INVALIDARG; - } - *pdwCount = This->nSubContainers; - return S_OK; -} - -HRESULT WINAPI IDxDiagContainerImpl_EnumChildContainerNames(PDXDIAGCONTAINER iface, DWORD dwIndex, LPWSTR pwszContainer, DWORD cchContainer) { - IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface; - IDxDiagContainerImpl_SubContainer* p = NULL; - DWORD i = 0; - - TRACE("(%p, %lu, %s, %lu)\n", iface, dwIndex, debugstr_w(pwszContainer), cchContainer); - - if (NULL == pwszContainer) { - return E_INVALIDARG; - } - if (256 > cchContainer) { - return DXDIAG_E_INSUFFICIENT_BUFFER; - } - - p = This->subContainers; - while (NULL != p) { - if (dwIndex == i) { - if (cchContainer <= strlenW(p->contName)) { - return DXDIAG_E_INSUFFICIENT_BUFFER; - } - lstrcpynW(pwszContainer, p->contName, cchContainer); - return S_OK; - } - p = p->next; - ++i; - } - return E_INVALIDARG; -} - -HRESULT WINAPI IDxDiagContainerImpl_GetChildContainerInternal(PDXDIAGCONTAINER iface, LPCWSTR pwszContainer, IDxDiagContainer** ppInstance) { - IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface; - IDxDiagContainerImpl_SubContainer* p = NULL; - - p = This->subContainers; - while (NULL != p) { - if (0 == lstrcmpW(p->contName, pwszContainer)) { - *ppInstance = (PDXDIAGCONTAINER)p->pCont; - return S_OK; - } - p = p->next; - } - return E_INVALIDARG; -} - -HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(PDXDIAGCONTAINER iface, LPCWSTR pwszContainer, IDxDiagContainer** ppInstance) { - IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface; - IDxDiagContainer* pContainer = NULL; - LPWSTR tmp, orig_tmp; - INT tmp_len; - WCHAR* cur; - HRESULT hr = E_INVALIDARG; - - FIXME("(%p, %s, %p)\n", iface, debugstr_w(pwszContainer), ppInstance); - - if (NULL == ppInstance || NULL == pwszContainer) { - return E_INVALIDARG; - } - - pContainer = (PDXDIAGCONTAINER) This; - - tmp_len = strlenW(pwszContainer) + 1; - orig_tmp = tmp = HeapAlloc(GetProcessHeap(), 0, tmp_len * sizeof(WCHAR)); - if (NULL == tmp) return E_FAIL; - lstrcpynW(tmp, pwszContainer, tmp_len); - - cur = strchrW(tmp, '.'); - while (NULL != cur) { - *cur = '\0'; /* cut tmp string to '.' */ - hr = IDxDiagContainerImpl_GetChildContainerInternal(pContainer, tmp, &pContainer); - if (!SUCCEEDED(hr) || NULL == pContainer) - goto on_error; - cur++; /* go after '.' (just replaced by \0) */ - tmp = cur; - cur = strchrW(tmp, '.'); - } - - hr = IDxDiagContainerImpl_GetChildContainerInternal(pContainer, tmp, ppInstance); - if (SUCCEEDED(hr)) { - IDxDiagContainerImpl_AddRef((PDXDIAGCONTAINER)*ppInstance); - } - -on_error: - HeapFree(GetProcessHeap(), 0, orig_tmp); - return hr; -} - -HRESULT WINAPI IDxDiagContainerImpl_GetNumberOfProps(PDXDIAGCONTAINER iface, DWORD* pdwCount) { - IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface; - TRACE("(%p)\n", iface); - if (NULL == pdwCount) { - return E_INVALIDARG; - } - *pdwCount = This->nProperties; - return S_OK; -} - -HRESULT WINAPI IDxDiagContainerImpl_EnumPropNames(PDXDIAGCONTAINER iface, DWORD dwIndex, LPWSTR pwszPropName, DWORD cchPropName) { - IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface; - IDxDiagContainerImpl_Property* p = NULL; - DWORD i = 0; - - FIXME("(%p, %lu, %s, %lu)\n", iface, dwIndex, debugstr_w(pwszPropName), cchPropName); - - if (NULL == pwszPropName) { - return E_INVALIDARG; - } - if (256 > cchPropName) { - return DXDIAG_E_INSUFFICIENT_BUFFER; - } - - p = This->properties; - while (NULL != p) { - if (dwIndex == i) { - if (cchPropName <= lstrlenW(p->vName)) { - return DXDIAG_E_INSUFFICIENT_BUFFER; - } - lstrcpynW(pwszPropName, p->vName, cchPropName); - return S_OK; - } - p = p->next; - ++i; - } - return E_INVALIDARG; -} - -HRESULT WINAPI IDxDiagContainerImpl_GetProp(PDXDIAGCONTAINER iface, LPCWSTR pwszPropName, VARIANT* pvarProp) { - IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface; - IDxDiagContainerImpl_Property* p = NULL; - FIXME("(%p, %s, %p)\n", iface, debugstr_w(pwszPropName), pvarProp); - - if (NULL == pvarProp || NULL == pwszPropName) { - return E_INVALIDARG; - } - - p = This->properties; - while (NULL != p) { - if (0 == lstrcmpW(p->vName, pwszPropName)) { - VariantCopy(pvarProp, &p->v); - return S_OK; - } - p = p->next; - } - return S_OK; -} - -HRESULT WINAPI IDxDiagContainerImpl_AddProp(PDXDIAGCONTAINER iface, LPCWSTR pwszPropName, VARIANT* pVarProp) { - IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface; - IDxDiagContainerImpl_Property* p = NULL; - IDxDiagContainerImpl_Property* pNew = NULL; - - FIXME("(%p, %s, %p)\n", iface, debugstr_w(pwszPropName), pVarProp); - - if (NULL == pVarProp || NULL == pwszPropName) { - return E_INVALIDARG; - } - - pNew = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDxDiagContainerImpl_Property)); - if (NULL == pNew) { - return E_OUTOFMEMORY; - } - VariantInit(&pNew->v); - VariantCopy(&pNew->v, pVarProp); - pNew->vName = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(pwszPropName) + 1) * sizeof(WCHAR)); - lstrcpyW(pNew->vName, pwszPropName); - pNew->next = NULL; - - p = This->properties; - if (NULL == p) { - This->properties = pNew; - } else { - while (NULL != p->next) { - p = p->next; - } - p->next = pNew; - } - ++This->nProperties; - return S_OK; -} - -HRESULT WINAPI IDxDiagContainerImpl_AddChildContainer(PDXDIAGCONTAINER iface, LPCWSTR pszContName, PDXDIAGCONTAINER pSubCont) { - IDxDiagContainerImpl *This = (IDxDiagContainerImpl *)iface; - IDxDiagContainerImpl_SubContainer* p = NULL; - IDxDiagContainerImpl_SubContainer* pNew = NULL; - - FIXME("(%p, %s, %p)\n", iface, debugstr_w(pszContName), pSubCont); - - if (NULL == pSubCont || NULL == pszContName) { - return E_INVALIDARG; - } - - pNew = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDxDiagContainerImpl_SubContainer)); - if (NULL == pNew) { - return E_OUTOFMEMORY; - } - pNew->pCont = pSubCont; - pNew->contName = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(pszContName) + 1) * sizeof(WCHAR)); - lstrcpyW(pNew->contName, pszContName); - pNew->next = NULL; - - p = This->subContainers; - if (NULL == p) { - This->subContainers = pNew; - } else { - while (NULL != p->next) { - p = p->next; - } - p->next = pNew; - } - ++This->nSubContainers; - return S_OK; -} - -static const IDxDiagContainerVtbl DxDiagContainer_Vtbl = -{ - IDxDiagContainerImpl_QueryInterface, - IDxDiagContainerImpl_AddRef, - IDxDiagContainerImpl_Release, - IDxDiagContainerImpl_GetNumberOfChildContainers, - IDxDiagContainerImpl_EnumChildContainerNames, - IDxDiagContainerImpl_GetChildContainer, - IDxDiagContainerImpl_GetNumberOfProps, - IDxDiagContainerImpl_EnumPropNames, - IDxDiagContainerImpl_GetProp -}; - - -HRESULT DXDiag_CreateDXDiagContainer(REFIID riid, LPVOID *ppobj) { - IDxDiagContainerImpl* container; - - TRACE("(%p, %p)\n", debugstr_guid(riid), ppobj); - - container = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDxDiagContainerImpl)); - if (NULL == container) { - *ppobj = NULL; - return E_OUTOFMEMORY; - } - container->lpVtbl = &DxDiagContainer_Vtbl; - container->ref = 0; /* will be inited with QueryInterface */ - return IDxDiagContainerImpl_QueryInterface((PDXDIAGCONTAINER)container, riid, ppobj); -} diff --git a/dll/directx/dxdiagn/dxdiag_main.c b/dll/directx/dxdiagn/dxdiag_main.c deleted file mode 100644 index 94c42e606dc..00000000000 --- a/dll/directx/dxdiagn/dxdiag_main.c +++ /dev/null @@ -1,127 +0,0 @@ -/* - * DXDiag - * - * Copyright 2004 Raphael Junqueira - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include -#include "dxdiag_private.h" -#include - -WINE_DEFAULT_DEBUG_CHANNEL(dxdiag); - -LONG DXDIAGN_refCount = 0; - -/* At process attach */ -BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - TRACE("%p,%lx,%p\n", hInstDLL, fdwReason, lpvReserved); - if (fdwReason == DLL_PROCESS_ATTACH) { - DisableThreadLibraryCalls(hInstDLL); - } - return TRUE; -} - -/******************************************************************************* - * DXDiag ClassFactory - */ -typedef struct { - const IClassFactoryVtbl *lpVtbl; - REFCLSID rclsid; - HRESULT (*pfnCreateInstanceFactory)(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj); -} IClassFactoryImpl; - -static HRESULT WINAPI DXDiagCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) { - FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid)); - - if (ppobj == NULL) return E_POINTER; - - return E_NOINTERFACE; -} - -static ULONG WINAPI DXDiagCF_AddRef(LPCLASSFACTORY iface) { - DXDIAGN_LockModule(); - - return 2; /* non-heap based object */ -} - -static ULONG WINAPI DXDiagCF_Release(LPCLASSFACTORY iface) { - DXDIAGN_UnlockModule(); - - return 1; /* non-heap based object */ -} - -static HRESULT WINAPI DXDiagCF_CreateInstance(LPCLASSFACTORY iface,LPUNKNOWN pOuter,REFIID riid,LPVOID *ppobj) { - IClassFactoryImpl *This = (IClassFactoryImpl *)iface; - TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj); - - return This->pfnCreateInstanceFactory(iface, pOuter, riid, ppobj); -} - -static HRESULT WINAPI DXDiagCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) { - TRACE("(%d)\n", dolock); - - if (dolock) - DXDIAGN_LockModule(); - else - DXDIAGN_UnlockModule(); - - return S_OK; -} - -static const IClassFactoryVtbl DXDiagCF_Vtbl = { - DXDiagCF_QueryInterface, - DXDiagCF_AddRef, - DXDiagCF_Release, - DXDiagCF_CreateInstance, - DXDiagCF_LockServer -}; - -static IClassFactoryImpl DXDiag_CFS[] = { - { &DXDiagCF_Vtbl, &CLSID_DxDiagProvider, DXDiag_CreateDXDiagProvider }, - { NULL, NULL, NULL } -}; - -/*********************************************************************** - * DllCanUnloadNow (DXDIAGN.@) - */ -HRESULT WINAPI DllCanUnloadNow(void) -{ - return DXDIAGN_refCount != 0 ? S_FALSE : S_OK; -} - -/*********************************************************************** - * DllGetClassObject (DXDIAGN.@) - */ -HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) -{ - int i = 0; - - TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); - while (NULL != DXDiag_CFS[i].rclsid) { - if (IsEqualGUID(rclsid, DXDiag_CFS[i].rclsid)) { - DXDiagCF_AddRef((IClassFactory*) &DXDiag_CFS[i]); - *ppv = &DXDiag_CFS[i]; - return S_OK; - } - ++i; - } - - FIXME("(%p,%p,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); - return CLASS_E_CLASSNOTAVAILABLE; -} diff --git a/dll/directx/dxdiagn/dxdiag_private.h b/dll/directx/dxdiagn/dxdiag_private.h deleted file mode 100644 index 5d90a400a03..00000000000 --- a/dll/directx/dxdiagn/dxdiag_private.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * DXDiag private include file - * - * Copyright 2004 Raphael Junqueira - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef __WINE_DXDIAG_PRIVATE_H -#define __WINE_DXDIAG_PRIVATE_H - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#include - -#include -#include -//#include "wingdi.h" -//#include "winuser.h" -//#include "objbase.h" -//#include "oleauto.h" - -#include - -/* DXDiag Interfaces: */ -typedef struct IDxDiagProviderImpl IDxDiagProviderImpl; -typedef struct IDxDiagContainerImpl IDxDiagContainerImpl; - -/* ---------------- */ -/* IDxDiagProvider */ -/* ---------------- */ - -/***************************************************************************** - * IDxDiagProvider implementation structure - */ -struct IDxDiagProviderImpl { - /* IUnknown fields */ - const IDxDiagProviderVtbl *lpVtbl; - LONG ref; - /* IDxDiagProvider fields */ - BOOL init; - DXDIAG_INIT_PARAMS params; - IDxDiagContainer* pRootContainer; -}; - -/* IUnknown: */ -extern HRESULT WINAPI IDxDiagProviderImpl_QueryInterface(PDXDIAGPROVIDER iface, REFIID riid, LPVOID *ppobj); -extern ULONG WINAPI IDxDiagProviderImpl_AddRef(PDXDIAGPROVIDER iface); -extern ULONG WINAPI IDxDiagProviderImpl_Release(PDXDIAGPROVIDER iface); - -/* IDxDiagProvider: */ -extern HRESULT WINAPI IDxDiagProviderImpl_Initialize(PDXDIAGPROVIDER iface, DXDIAG_INIT_PARAMS* pParams); -extern HRESULT WINAPI IDxDiagProviderImpl_GetRootContainer(PDXDIAGPROVIDER iface, IDxDiagContainer** ppInstance); - -/* ---------------- */ -/* IDxDiagContainer */ -/* ---------------- */ - -typedef struct IDxDiagContainerImpl_SubContainer { - IDxDiagContainer* pCont; - WCHAR* contName; - struct IDxDiagContainerImpl_SubContainer* next; -} IDxDiagContainerImpl_SubContainer; - -typedef struct IDxDiagContainerImpl_Property { - LPWSTR vName; - VARIANT v; - struct IDxDiagContainerImpl_Property* next; -} IDxDiagContainerImpl_Property; - - -/***************************************************************************** - * IDxDiagContainer implementation structure - */ -struct IDxDiagContainerImpl { - /* IUnknown fields */ - const IDxDiagContainerVtbl *lpVtbl; - LONG ref; - /* IDxDiagContainer fields */ - IDxDiagContainerImpl_Property* properties; - IDxDiagContainerImpl_SubContainer* subContainers; - DWORD nProperties; - DWORD nSubContainers; -}; - -/* IUnknown: */ -extern HRESULT WINAPI IDxDiagContainerImpl_QueryInterface(PDXDIAGCONTAINER iface, REFIID riid, LPVOID *ppobj); -extern ULONG WINAPI IDxDiagContainerImpl_AddRef(PDXDIAGCONTAINER iface); - -/** Internal */ -extern HRESULT WINAPI IDxDiagContainerImpl_AddProp(PDXDIAGCONTAINER iface, LPCWSTR pwszPropName, VARIANT* pVarProp); -extern HRESULT WINAPI IDxDiagContainerImpl_AddChildContainer(PDXDIAGCONTAINER iface, LPCWSTR pszContName, PDXDIAGCONTAINER pSubCont); - -/** - * factories - */ -extern HRESULT DXDiag_CreateDXDiagProvider(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj); - -/** internal factory */ -extern HRESULT DXDiag_CreateDXDiagContainer(REFIID riid, LPVOID *ppobj); -extern HRESULT DXDiag_InitRootDXDiagContainer(IDxDiagContainer* pRootCont); - -/********************************************************************** - * Dll lifetime tracking declaration for dxdiagn.dll - */ -extern LONG DXDIAGN_refCount; -static inline void DXDIAGN_LockModule(void) { InterlockedIncrement( &DXDIAGN_refCount ); } -static inline void DXDIAGN_UnlockModule(void) { InterlockedDecrement( &DXDIAGN_refCount ); } - -#endif diff --git a/dll/directx/dxdiagn/provider.c b/dll/directx/dxdiagn/provider.c deleted file mode 100644 index 9838aff58de..00000000000 --- a/dll/directx/dxdiagn/provider.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * IDxDiagProvider Implementation - * - * Copyright 2004 Raphael Junqueira - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include -#include "dxdiag_private.h" -#include - -WINE_DEFAULT_DEBUG_CHANNEL(dxdiag); - -/* IDxDiagProvider IUnknown parts follow: */ -HRESULT WINAPI IDxDiagProviderImpl_QueryInterface(PDXDIAGPROVIDER iface, REFIID riid, LPVOID *ppobj) -{ - IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface; - - if (IsEqualGUID(riid, &IID_IUnknown) - || IsEqualGUID(riid, &IID_IDxDiagProvider)) { - IDxDiagProviderImpl_AddRef(iface); - *ppobj = This; - return S_OK; - } - - WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj); - return E_NOINTERFACE; -} - -ULONG WINAPI IDxDiagProviderImpl_AddRef(PDXDIAGPROVIDER iface) { - IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface; - TRACE("(%p) : AddRef from %ld\n", This, This->ref); - return ++(This->ref); -} - -ULONG WINAPI IDxDiagProviderImpl_Release(PDXDIAGPROVIDER iface) { - IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface; - ULONG ref = --This->ref; - TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref); - if (ref == 0) { - HeapFree(GetProcessHeap(), 0, This); - } - return ref; -} - -/* IDxDiagProvider Interface follow: */ -HRESULT WINAPI IDxDiagProviderImpl_Initialize(PDXDIAGPROVIDER iface, DXDIAG_INIT_PARAMS* pParams) { - IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface; - TRACE("(%p,%p)\n", iface, pParams); - - if (NULL == pParams) { - return E_POINTER; - } - if (pParams->dwSize != sizeof(DXDIAG_INIT_PARAMS)) { - return E_INVALIDARG; - } - - This->init = TRUE; - memcpy(&This->params, pParams, pParams->dwSize); - return S_OK; -} - -HRESULT WINAPI IDxDiagProviderImpl_GetRootContainer(PDXDIAGPROVIDER iface, IDxDiagContainer** ppInstance) { - HRESULT hr = S_OK; - IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface; - TRACE("(%p,%p)\n", iface, ppInstance); - - if (NULL == ppInstance) { - return E_INVALIDARG; - } - if (FALSE == This->init) { - return E_INVALIDARG; /* should be E_CO_UNINITIALIZED */ - } - if (NULL == This->pRootContainer) { - hr = DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, (void**) &This->pRootContainer); - if (FAILED(hr)) { - return hr; - } - } - return IDxDiagContainerImpl_QueryInterface((PDXDIAGCONTAINER)This->pRootContainer, &IID_IDxDiagContainer, (void**) ppInstance); -} - -IDxDiagProviderVtbl DxDiagProvider_Vtbl = -{ - IDxDiagProviderImpl_QueryInterface, - IDxDiagProviderImpl_AddRef, - IDxDiagProviderImpl_Release, - IDxDiagProviderImpl_Initialize, - IDxDiagProviderImpl_GetRootContainer -}; - -HRESULT DXDiag_CreateDXDiagProvider(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) { - IDxDiagProviderImpl* provider; - - TRACE("(%p, %s, %p)\n", punkOuter, debugstr_guid(riid), ppobj); - - provider = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDxDiagProviderImpl)); - if (NULL == provider) { - *ppobj = NULL; - return E_OUTOFMEMORY; - } - provider->lpVtbl = &DxDiagProvider_Vtbl; - provider->ref = 0; /* will be inited with QueryInterface */ - return IDxDiagProviderImpl_QueryInterface ((PDXDIAGPROVIDER)provider, riid, ppobj); -} diff --git a/dll/directx/dxdiagn/regsvr.c b/dll/directx/dxdiagn/regsvr.c deleted file mode 100644 index 748cc22e01f..00000000000 --- a/dll/directx/dxdiagn/regsvr.c +++ /dev/null @@ -1,558 +0,0 @@ -/* - * self-registerable dll functions for dxdiag.dll - * - * Copyright (C) 2004 Raphael Junqueira - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#include -//#include - -#include -#include -//#include "wingdi.h" -//#include "winuser.h" -#include -//#include "winerror.h" - -#include -#include "dxdiag_private.h" -#include - -WINE_DEFAULT_DEBUG_CHANNEL(dxdiag); - -/* - * Near the bottom of this file are the exported DllRegisterServer and - * DllUnregisterServer, which make all this worthwhile. - */ - -/*********************************************************************** - * interface for self-registering - */ -struct regsvr_interface -{ - IID const *iid; /* NULL for end of list */ - LPCSTR name; /* can be NULL to omit */ - IID const *base_iid; /* can be NULL to omit */ - int num_methods; /* can be <0 to omit */ - CLSID const *ps_clsid; /* can be NULL to omit */ - CLSID const *ps_clsid32; /* can be NULL to omit */ -}; - -static HRESULT register_interfaces(struct regsvr_interface const *list); -static HRESULT unregister_interfaces(struct regsvr_interface const *list); - -struct regsvr_coclass -{ - CLSID const *clsid; /* NULL for end of list */ - LPCSTR name; /* can be NULL to omit */ - LPCSTR ips; /* can be NULL to omit */ - LPCSTR ips32; /* can be NULL to omit */ - LPCSTR ips32_tmodel; /* can be NULL to omit */ - LPCSTR progid; /* can be NULL to omit */ - LPCSTR viprogid; /* can be NULL to omit */ - LPCSTR progid_extra; /* can be NULL to omit */ -}; - -static HRESULT register_coclasses(struct regsvr_coclass const *list); -static HRESULT unregister_coclasses(struct regsvr_coclass const *list); - -/*********************************************************************** - * static string constants - */ -static WCHAR const interface_keyname[10] = { - 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', 'e', 0 }; -static WCHAR const base_ifa_keyname[14] = { - 'B', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'f', 'a', 'c', - 'e', 0 }; -static WCHAR const num_methods_keyname[11] = { - 'N', 'u', 'm', 'M', 'e', 't', 'h', 'o', 'd', 's', 0 }; -static WCHAR const ps_clsid_keyname[15] = { - 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', - 'i', 'd', 0 }; -static WCHAR const ps_clsid32_keyname[17] = { - 'P', 'r', 'o', 'x', 'y', 'S', 't', 'u', 'b', 'C', 'l', 's', - 'i', 'd', '3', '2', 0 }; -static WCHAR const clsid_keyname[6] = { - 'C', 'L', 'S', 'I', 'D', 0 }; -static WCHAR const curver_keyname[7] = { - 'C', 'u', 'r', 'V', 'e', 'r', 0 }; -static WCHAR const ips_keyname[13] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', - 0 }; -static WCHAR const ips32_keyname[15] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', - '3', '2', 0 }; -static WCHAR const progid_keyname[7] = { - 'P', 'r', 'o', 'g', 'I', 'D', 0 }; -static WCHAR const viprogid_keyname[25] = { - 'V', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'd', 'e', 'p', - 'e', 'n', 'd', 'e', 'n', 't', 'P', 'r', 'o', 'g', 'I', 'D', - 0 }; -static char const tmodel_valuename[] = "ThreadingModel"; - -/*********************************************************************** - * static helper functions - */ -static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid); -static LONG register_key_defvalueW(HKEY base, WCHAR const *name, - WCHAR const *value); -static LONG register_key_defvalueA(HKEY base, WCHAR const *name, - char const *value); -static LONG register_progid(WCHAR const *clsid, - char const *progid, char const *curver_progid, - char const *name, char const *extra); -static LONG recursive_delete_key(HKEY key); -static LONG recursive_delete_keyA(HKEY base, char const *name); -static LONG recursive_delete_keyW(HKEY base, WCHAR const *name); - -/*********************************************************************** - * register_interfaces - */ -static HRESULT register_interfaces(struct regsvr_interface const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY interface_key; - - res = RegCreateKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &interface_key, NULL); - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->iid; ++list) { - WCHAR buf[39]; - HKEY iid_key; - - StringFromGUID2(list->iid, buf, 39); - res = RegCreateKeyExW(interface_key, buf, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &iid_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_interface_key; - - if (list->name) { - res = RegSetValueExA(iid_key, NULL, 0, REG_SZ, - (CONST BYTE*)(list->name), - strlen(list->name) + 1); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->base_iid) { - register_key_guid(iid_key, base_ifa_keyname, list->base_iid); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (0 <= list->num_methods) { - static WCHAR const fmt[3] = { '%', 'd', 0 }; - HKEY key; - - res = RegCreateKeyExW(iid_key, num_methods_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - - wsprintfW(buf, fmt, list->num_methods); - res = RegSetValueExW(key, NULL, 0, REG_SZ, - (CONST BYTE*)buf, - (lstrlenW(buf) + 1) * sizeof(WCHAR)); - RegCloseKey(key); - - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->ps_clsid) { - register_key_guid(iid_key, ps_clsid_keyname, list->ps_clsid); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - if (list->ps_clsid32) { - register_key_guid(iid_key, ps_clsid32_keyname, list->ps_clsid32); - if (res != ERROR_SUCCESS) goto error_close_iid_key; - } - - error_close_iid_key: - RegCloseKey(iid_key); - } - -error_close_interface_key: - RegCloseKey(interface_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * unregister_interfaces - */ -static HRESULT unregister_interfaces(struct regsvr_interface const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY interface_key; - - res = RegOpenKeyExW(HKEY_CLASSES_ROOT, interface_keyname, 0, - KEY_READ | KEY_WRITE, &interface_key); - if (res == ERROR_FILE_NOT_FOUND) return S_OK; - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->iid; ++list) { - WCHAR buf[39]; - - StringFromGUID2(list->iid, buf, 39); - res = recursive_delete_keyW(interface_key, buf); - } - - RegCloseKey(interface_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * register_coclasses - */ -static HRESULT register_coclasses(struct regsvr_coclass const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY coclass_key; - - res = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL); - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->clsid; ++list) { - WCHAR buf[39]; - HKEY clsid_key; - - StringFromGUID2(list->clsid, buf, 39); - res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - - if (list->name) { - res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ, - (CONST BYTE*)(list->name), - strlen(list->name) + 1); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->ips) { - res = register_key_defvalueA(clsid_key, ips_keyname, list->ips); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->ips32) { - HKEY ips32_key; - - res = RegCreateKeyExW(clsid_key, ips32_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, - &ips32_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ, - (CONST BYTE*)list->ips32, - lstrlenA(list->ips32) + 1); - if (res == ERROR_SUCCESS && list->ips32_tmodel) - res = RegSetValueExA(ips32_key, tmodel_valuename, 0, REG_SZ, - (CONST BYTE*)list->ips32_tmodel, - strlen(list->ips32_tmodel) + 1); - RegCloseKey(ips32_key); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->progid) { - res = register_key_defvalueA(clsid_key, progid_keyname, - list->progid); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = register_progid(buf, list->progid, NULL, - list->name, list->progid_extra); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->viprogid) { - res = register_key_defvalueA(clsid_key, viprogid_keyname, - list->viprogid); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = register_progid(buf, list->viprogid, list->progid, - list->name, list->progid_extra); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - error_close_clsid_key: - RegCloseKey(clsid_key); - } - -error_close_coclass_key: - RegCloseKey(coclass_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * unregister_coclasses - */ -static HRESULT unregister_coclasses(struct regsvr_coclass const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY coclass_key; - - res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, - KEY_READ | KEY_WRITE, &coclass_key); - if (res == ERROR_FILE_NOT_FOUND) return S_OK; - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->clsid; ++list) { - WCHAR buf[39]; - - StringFromGUID2(list->clsid, buf, 39); - res = recursive_delete_keyW(coclass_key, buf); - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - - if (list->progid) { - res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->progid); - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - } - - if (list->viprogid) { - res = recursive_delete_keyA(HKEY_CLASSES_ROOT, list->viprogid); - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - } - } - -error_close_coclass_key: - RegCloseKey(coclass_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * regsvr_key_guid - */ -static LONG register_key_guid(HKEY base, WCHAR const *name, GUID const *guid) -{ - WCHAR buf[39]; - - StringFromGUID2(guid, buf, 39); - return register_key_defvalueW(base, name, buf); -} - -/*********************************************************************** - * regsvr_key_defvalueW - */ -static LONG register_key_defvalueW( - HKEY base, - WCHAR const *name, - WCHAR const *value) -{ - LONG res; - HKEY key; - - res = RegCreateKeyExW(base, name, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) return res; - res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value, - (lstrlenW(value) + 1) * sizeof(WCHAR)); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * regsvr_key_defvalueA - */ -static LONG register_key_defvalueA( - HKEY base, - WCHAR const *name, - char const *value) -{ - LONG res; - HKEY key; - - res = RegCreateKeyExW(base, name, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) return res; - res = RegSetValueExA(key, NULL, 0, REG_SZ, (CONST BYTE*)value, - lstrlenA(value) + 1); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * regsvr_progid - */ -static LONG register_progid( - WCHAR const *clsid, - char const *progid, - char const *curver_progid, - char const *name, - char const *extra) -{ - LONG res; - HKEY progid_key; - - res = RegCreateKeyExA(HKEY_CLASSES_ROOT, progid, 0, - NULL, 0, KEY_READ | KEY_WRITE, NULL, - &progid_key, NULL); - if (res != ERROR_SUCCESS) return res; - - if (name) { - res = RegSetValueExA(progid_key, NULL, 0, REG_SZ, - (CONST BYTE*)name, strlen(name) + 1); - if (res != ERROR_SUCCESS) goto error_close_progid_key; - } - - if (clsid) { - res = register_key_defvalueW(progid_key, clsid_keyname, clsid); - if (res != ERROR_SUCCESS) goto error_close_progid_key; - } - - if (curver_progid) { - res = register_key_defvalueA(progid_key, curver_keyname, - curver_progid); - if (res != ERROR_SUCCESS) goto error_close_progid_key; - } - - if (extra) { - HKEY extra_key; - - res = RegCreateKeyExA(progid_key, extra, 0, - NULL, 0, KEY_READ | KEY_WRITE, NULL, - &extra_key, NULL); - if (res == ERROR_SUCCESS) - RegCloseKey(extra_key); - } - -error_close_progid_key: - RegCloseKey(progid_key); - return res; -} - -/*********************************************************************** - * recursive_delete_key - */ -static LONG recursive_delete_key(HKEY key) -{ - LONG res; - WCHAR subkey_name[MAX_PATH]; - DWORD cName; - HKEY subkey; - - for (;;) { - cName = sizeof(subkey_name) / sizeof(WCHAR); - res = RegEnumKeyExW(key, 0, subkey_name, &cName, - NULL, NULL, NULL, NULL); - if (res != ERROR_SUCCESS && res != ERROR_MORE_DATA) { - res = ERROR_SUCCESS; /* presumably we're done enumerating */ - break; - } - res = RegOpenKeyExW(key, subkey_name, 0, - KEY_READ | KEY_WRITE, &subkey); - if (res == ERROR_FILE_NOT_FOUND) continue; - if (res != ERROR_SUCCESS) break; - - res = recursive_delete_key(subkey); - RegCloseKey(subkey); - if (res != ERROR_SUCCESS) break; - } - - if (res == ERROR_SUCCESS) res = RegDeleteKeyW(key, 0); - return res; -} - -/*********************************************************************** - * recursive_delete_keyA - */ -static LONG recursive_delete_keyA(HKEY base, char const *name) -{ - LONG res; - HKEY key; - - res = RegOpenKeyExA(base, name, 0, KEY_READ | KEY_WRITE, &key); - if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS; - if (res != ERROR_SUCCESS) return res; - res = recursive_delete_key(key); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * recursive_delete_keyW - */ -static LONG recursive_delete_keyW(HKEY base, WCHAR const *name) -{ - LONG res; - HKEY key; - - res = RegOpenKeyExW(base, name, 0, KEY_READ | KEY_WRITE, &key); - if (res == ERROR_FILE_NOT_FOUND) return ERROR_SUCCESS; - if (res != ERROR_SUCCESS) return res; - res = recursive_delete_key(key); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * coclass list - */ -static struct regsvr_coclass const coclass_list[] = { - { - &CLSID_DxDiagProvider, - "DxDiagProvider Class", - NULL, - "dxdiagn.dll", - "Apartment", - NULL, - "DxDiag.DxDiagProvider.1", - "DxDiag.DxDiagProvider" - }, - { NULL } /* list terminator */ -}; - -/*********************************************************************** - * interface list - */ - -static struct regsvr_interface const interface_list[] = { - { NULL } /* list terminator */ -}; - -/*********************************************************************** - * DllRegisterServer (DXDIAGN.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - HRESULT hr; - - TRACE("\n"); - - hr = register_coclasses(coclass_list); - if (SUCCEEDED(hr)) - hr = register_interfaces(interface_list); - return hr; -} - -/*********************************************************************** - * DllUnregisterServer (DXDIAGN.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - HRESULT hr; - - TRACE("\n"); - - hr = unregister_coclasses(coclass_list); - if (SUCCEEDED(hr)) - hr = unregister_interfaces(interface_list); - return hr; -} diff --git a/dll/directx/ksproxy/allocator.cpp b/dll/directx/ksproxy/allocator.cpp index 22db5540cc9..1a23dc96d8e 100644 --- a/dll/directx/ksproxy/allocator.cpp +++ b/dll/directx/ksproxy/allocator.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/ksproxy/allocator.cpp * PURPOSE: IKsAllocator interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/ksproxy/basicaudio.cpp b/dll/directx/ksproxy/basicaudio.cpp index 04c53b345a0..9f01cc6e524 100644 --- a/dll/directx/ksproxy/basicaudio.cpp +++ b/dll/directx/ksproxy/basicaudio.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/ksproxy/basicaudio.cpp * PURPOSE: IBasicAudio interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/ksproxy/classfactory.cpp b/dll/directx/ksproxy/classfactory.cpp index 5b90adeb868..b671ced5307 100644 --- a/dll/directx/ksproxy/classfactory.cpp +++ b/dll/directx/ksproxy/classfactory.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/ksproxy/classfactory.cpp * PURPOSE: IClassFactory interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/ksproxy/clockforward.cpp b/dll/directx/ksproxy/clockforward.cpp index b2161e7d58d..d7cde7b21a4 100644 --- a/dll/directx/ksproxy/clockforward.cpp +++ b/dll/directx/ksproxy/clockforward.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/ksproxy/clockforward.cpp * PURPOSE: IKsClockForwarder interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/ksproxy/cvpconfig.cpp b/dll/directx/ksproxy/cvpconfig.cpp index 1333263e003..5e60da830bf 100644 --- a/dll/directx/ksproxy/cvpconfig.cpp +++ b/dll/directx/ksproxy/cvpconfig.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/ksproxy/cvpconfig.cpp * PURPOSE: IVPConfig interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/ksproxy/cvpvbiconfig.cpp b/dll/directx/ksproxy/cvpvbiconfig.cpp index b7b7130b471..656b8ba5066 100644 --- a/dll/directx/ksproxy/cvpvbiconfig.cpp +++ b/dll/directx/ksproxy/cvpvbiconfig.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/ksproxy/cvpvbiconfig.cpp * PURPOSE: CVPVBIConfig interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/ksproxy/datatype.cpp b/dll/directx/ksproxy/datatype.cpp index eb835ae0647..91fe76a21dc 100644 --- a/dll/directx/ksproxy/datatype.cpp +++ b/dll/directx/ksproxy/datatype.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/ksproxy/datatype.cpp * PURPOSE: IKsDataTypeHandler interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/ksproxy/enum_mediatypes.cpp b/dll/directx/ksproxy/enum_mediatypes.cpp index db2c7a0298e..2adfdf3ee4c 100644 --- a/dll/directx/ksproxy/enum_mediatypes.cpp +++ b/dll/directx/ksproxy/enum_mediatypes.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/msdvbnp/enum_mediatypes.cpp * PURPOSE: IEnumMediaTypes interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/ksproxy/enumpins.cpp b/dll/directx/ksproxy/enumpins.cpp index da07796d066..77c877163c6 100644 --- a/dll/directx/ksproxy/enumpins.cpp +++ b/dll/directx/ksproxy/enumpins.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/msdvbnp/enumpins.cpp * PURPOSE: IEnumPins interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/ksproxy/input_pin.cpp b/dll/directx/ksproxy/input_pin.cpp index e83051e2139..b60c09bd28f 100644 --- a/dll/directx/ksproxy/input_pin.cpp +++ b/dll/directx/ksproxy/input_pin.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/ksproxy/input_pin.cpp * PURPOSE: InputPin of Proxy Filter * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/ksproxy/interface.cpp b/dll/directx/ksproxy/interface.cpp index 7eb0fd284d5..156ff86e9ff 100644 --- a/dll/directx/ksproxy/interface.cpp +++ b/dll/directx/ksproxy/interface.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/ksproxy/interface.cpp * PURPOSE: IKsInterfaceHandler interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/ksproxy/ksproxy.cpp b/dll/directx/ksproxy/ksproxy.cpp index 00957ed3d2a..2433020e38c 100644 --- a/dll/directx/ksproxy/ksproxy.cpp +++ b/dll/directx/ksproxy/ksproxy.cpp @@ -5,7 +5,7 @@ * PURPOSE: ActiveMovie Proxy functions * * PROGRAMMERS: Dmitry Chapyshev - Johannes Anderwald (janderwald@reactos.org) + Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/ksproxy/mediasample.cpp b/dll/directx/ksproxy/mediasample.cpp index 28270cdc3bd..4c1fa095f90 100644 --- a/dll/directx/ksproxy/mediasample.cpp +++ b/dll/directx/ksproxy/mediasample.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/ksproxy/mediasample.cpp * PURPOSE: IMediaSample interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/ksproxy/node.cpp b/dll/directx/ksproxy/node.cpp index d3082255346..7470eeb3a43 100644 --- a/dll/directx/ksproxy/node.cpp +++ b/dll/directx/ksproxy/node.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/ksproxy/node.cpp * PURPOSE: Control Node * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/ksproxy/output_pin.cpp b/dll/directx/ksproxy/output_pin.cpp index 79a4b04498b..3bb089360b2 100644 --- a/dll/directx/ksproxy/output_pin.cpp +++ b/dll/directx/ksproxy/output_pin.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/ksproxy/output_pin.cpp * PURPOSE: OutputPin of Proxy Filter * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/ksproxy/proxy.cpp b/dll/directx/ksproxy/proxy.cpp index 3ff6f1f4d91..25b00fe6667 100644 --- a/dll/directx/ksproxy/proxy.cpp +++ b/dll/directx/ksproxy/proxy.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/ksproxy/proxy.cpp * PURPOSE: IKsProxy interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/ksproxy/qualityforward.cpp b/dll/directx/ksproxy/qualityforward.cpp index 0d9a81379aa..413330bffb4 100644 --- a/dll/directx/ksproxy/qualityforward.cpp +++ b/dll/directx/ksproxy/qualityforward.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/ksproxy/clockforward.cpp * PURPOSE: IKsClockForwarder interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/msdvbnp/classfactory.cpp b/dll/directx/msdvbnp/classfactory.cpp index 89b61c486fe..677e1131d14 100644 --- a/dll/directx/msdvbnp/classfactory.cpp +++ b/dll/directx/msdvbnp/classfactory.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/msdvbnp/classfactory.cpp * PURPOSE: IClassFactory interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/msdvbnp/enum_mediatypes.cpp b/dll/directx/msdvbnp/enum_mediatypes.cpp index 6cd887f358c..22478ec948b 100644 --- a/dll/directx/msdvbnp/enum_mediatypes.cpp +++ b/dll/directx/msdvbnp/enum_mediatypes.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/msdvbnp/enum_mediatypes.cpp * PURPOSE: IEnumMediaTypes interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/msdvbnp/enumpins.cpp b/dll/directx/msdvbnp/enumpins.cpp index 9466aaae8f3..c9450aacd4f 100644 --- a/dll/directx/msdvbnp/enumpins.cpp +++ b/dll/directx/msdvbnp/enumpins.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/msdvbnp/enumpins.cpp * PURPOSE: IEnumPins interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/msdvbnp/ethernetfilter.cpp b/dll/directx/msdvbnp/ethernetfilter.cpp index 16f6122cc20..b481b90b62b 100644 --- a/dll/directx/msdvbnp/ethernetfilter.cpp +++ b/dll/directx/msdvbnp/ethernetfilter.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/msdvbnp/ethernetfilter.cpp * PURPOSE: IBDA_EthernetFilter interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/msdvbnp/ipv4.cpp b/dll/directx/msdvbnp/ipv4.cpp index 6647558dcf2..b80af7fd510 100644 --- a/dll/directx/msdvbnp/ipv4.cpp +++ b/dll/directx/msdvbnp/ipv4.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/msdvbnp/ipv4.cpp * PURPOSE: IBDA_IPV4Filter interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/msdvbnp/ipv6.cpp b/dll/directx/msdvbnp/ipv6.cpp index 6017443a450..1b7c8d497b6 100644 --- a/dll/directx/msdvbnp/ipv6.cpp +++ b/dll/directx/msdvbnp/ipv6.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/msdvbnp/ipv6.cpp * PURPOSE: IBDA_IPV6Filter interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/msdvbnp/msdvbnp.cpp b/dll/directx/msdvbnp/msdvbnp.cpp index 9c1d309a500..3951148b54f 100644 --- a/dll/directx/msdvbnp/msdvbnp.cpp +++ b/dll/directx/msdvbnp/msdvbnp.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/msdvbnp/msdvbnp.cpp * PURPOSE: COM Initialization * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/msdvbnp/networkprovider.cpp b/dll/directx/msdvbnp/networkprovider.cpp index 0ac050d23d8..3d53d981f75 100644 --- a/dll/directx/msdvbnp/networkprovider.cpp +++ b/dll/directx/msdvbnp/networkprovider.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/msdvbnp/networkprovider.cpp * PURPOSE: IBDA_NetworkProvider interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/msdvbnp/pin.cpp b/dll/directx/msdvbnp/pin.cpp index b53ba433cf0..51d913e772c 100644 --- a/dll/directx/msdvbnp/pin.cpp +++ b/dll/directx/msdvbnp/pin.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/msdvbnp/pin.cpp * PURPOSE: IPin interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/msdvbnp/scanningtuner.cpp b/dll/directx/msdvbnp/scanningtuner.cpp index 8c2d90ef1c4..8f968ed23e3 100644 --- a/dll/directx/msdvbnp/scanningtuner.cpp +++ b/dll/directx/msdvbnp/scanningtuner.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/msdvbnp/networkprovider.cpp * PURPOSE: IScanningTunner interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/msvidctl/classfactory.cpp b/dll/directx/msvidctl/classfactory.cpp index 8af2a69546f..7c2abf1eb22 100644 --- a/dll/directx/msvidctl/classfactory.cpp +++ b/dll/directx/msvidctl/classfactory.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/msvidctl/classfactory.cpp * PURPOSE: ClassFactory interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/msvidctl/enumtuningspaces.cpp b/dll/directx/msvidctl/enumtuningspaces.cpp index 22d3e31bd47..997748eae28 100644 --- a/dll/directx/msvidctl/enumtuningspaces.cpp +++ b/dll/directx/msvidctl/enumtuningspaces.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/msvidctl/tuningspace.cpp * PURPOSE: ITuningSpace interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/msvidctl/msvidctl.cpp b/dll/directx/msvidctl/msvidctl.cpp index 57d6ada3882..b7f5627e987 100644 --- a/dll/directx/msvidctl/msvidctl.cpp +++ b/dll/directx/msvidctl/msvidctl.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/msvidctl/msvidctl.cpp * PURPOSE: ReactOS DVB Initialization * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/msvidctl/tunerequest.cpp b/dll/directx/msvidctl/tunerequest.cpp index 3bee7cfc194..ad15ed0d94d 100644 --- a/dll/directx/msvidctl/tunerequest.cpp +++ b/dll/directx/msvidctl/tunerequest.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/msvidctl/tuningspace.cpp * PURPOSE: ITuningRequest interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/msvidctl/tuningspace.cpp b/dll/directx/msvidctl/tuningspace.cpp index 035542e595d..3505356c2ab 100644 --- a/dll/directx/msvidctl/tuningspace.cpp +++ b/dll/directx/msvidctl/tuningspace.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/msvidctl/tuningspace.cpp * PURPOSE: ITuningSpace interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #include "precomp.h" diff --git a/dll/directx/msvidctl/tuningspace_container.cpp b/dll/directx/msvidctl/tuningspace_container.cpp index e25fdc7a600..59451f8fa73 100644 --- a/dll/directx/msvidctl/tuningspace_container.cpp +++ b/dll/directx/msvidctl/tuningspace_container.cpp @@ -4,7 +4,7 @@ * FILE: dll/directx/msvidctl/tuningspace_container.cpp * PURPOSE: ITuningSpaceContainer interface * - * PROGRAMMERS: Johannes Anderwald (janderwald@reactos.org) + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald@reactos.org) */ #define _FORCENAMELESSUNION #include "precomp.h" diff --git a/dll/directx/qedit/CMakeLists.txt b/dll/directx/qedit/CMakeLists.txt deleted file mode 100644 index e2a34212e91..00000000000 --- a/dll/directx/qedit/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ - -add_definitions(-D__WINESRC__) - -remove_definitions(-D_WIN32_WINNT=0x502) -add_definitions(-D_WIN32_WINNT=0x600) - -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - -spec2def(qedit.dll qedit.spec) - -add_library(qedit SHARED - main.c - mediadet.c - regsvr.c - samplegrabber.c - ${CMAKE_CURRENT_BINARY_DIR}/qedit.def) - -set_module_type(qedit win32dll UNICODE) - -target_link_libraries(qedit - strmiids - uuid - wine) - -add_importlibs(qedit - msvcrt - advapi32 - ole32 - oleaut32 - kernel32 - ntdll) - -add_pch(qedit qedit_private.h) -add_dependencies(qedit dxsdk) -add_cd_file(TARGET qedit DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/qedit/regsvr.c b/dll/directx/qedit/regsvr.c deleted file mode 100644 index e1e3d8694a7..00000000000 --- a/dll/directx/qedit/regsvr.c +++ /dev/null @@ -1,330 +0,0 @@ -/* - * self-registerable dll functions for qedit.dll - * - * Copyright (C) 2008 Google (Lei Zhang) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "qedit_private.h" -//#include "winreg.h" - -#include - -WINE_DEFAULT_DEBUG_CHANNEL(qedit); - -struct regsvr_coclass -{ - CLSID const *clsid; /* NULL for end of list */ - LPCSTR name; /* can be NULL to omit */ - LPCSTR ips; /* can be NULL to omit */ - LPCSTR ips32; /* can be NULL to omit */ - LPCSTR ips32_tmodel; /* can be NULL to omit */ - LPCSTR progid; /* can be NULL to omit */ - LPCSTR viprogid; /* can be NULL to omit */ - LPCSTR progid_extra; /* can be NULL to omit */ -}; - -static HRESULT register_coclasses(struct regsvr_coclass const *list); -static HRESULT unregister_coclasses(struct regsvr_coclass const *list); - -/*********************************************************************** - * static string constants - */ -static WCHAR const clsid_keyname[6] = { - 'C', 'L', 'S', 'I', 'D', 0 }; -static WCHAR const curver_keyname[7] = { - 'C', 'u', 'r', 'V', 'e', 'r', 0 }; -static WCHAR const ips_keyname[13] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', 0 }; -static WCHAR const ips32_keyname[15] = { - 'I', 'n', 'P', 'r', 'o', 'c', 'S', 'e', 'r', 'v', 'e', 'r', '3', '2', 0 }; -static WCHAR const progid_keyname[7] = { - 'P', 'r', 'o', 'g', 'I', 'D', 0 }; -static WCHAR const viprogid_keyname[25] = { - 'V', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'd', 'e', 'p', - 'e', 'n', 'd', 'e', 'n', 't', 'P', 'r', 'o', 'g', 'I', 'D', - 0 }; -static char const tmodel_valuename[] = "ThreadingModel"; - -/*********************************************************************** - * static helper functions - */ -static LONG register_key_defvalueW(HKEY base, WCHAR const *name, - WCHAR const *value); -static LONG register_key_defvalueA(HKEY base, WCHAR const *name, - char const *value); -static LONG register_progid(WCHAR const *clsid, - char const *progid, char const *curver_progid, - char const *name, char const *extra); - - - -/*********************************************************************** - * register_coclasses - */ -static HRESULT register_coclasses(struct regsvr_coclass const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY coclass_key; - - res = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL); - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->clsid; ++list) { - WCHAR buf[39]; - HKEY clsid_key; - - StringFromGUID2(list->clsid, buf, 39); - res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - - if (list->name) { - res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ, - (CONST BYTE*)(list->name), - strlen(list->name) + 1); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->ips) { - res = register_key_defvalueA(clsid_key, ips_keyname, list->ips); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->ips32) { - HKEY ips32_key; - - res = RegCreateKeyExW(clsid_key, ips32_keyname, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, - &ips32_key, NULL); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ, - (CONST BYTE*)list->ips32, - lstrlenA(list->ips32) + 1); - if (res == ERROR_SUCCESS && list->ips32_tmodel) - res = RegSetValueExA(ips32_key, tmodel_valuename, 0, REG_SZ, - (CONST BYTE*)list->ips32_tmodel, - strlen(list->ips32_tmodel) + 1); - RegCloseKey(ips32_key); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->progid) { - res = register_key_defvalueA(clsid_key, progid_keyname, - list->progid); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = register_progid(buf, list->progid, NULL, - list->name, list->progid_extra); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - - if (list->viprogid) { - res = register_key_defvalueA(clsid_key, viprogid_keyname, - list->viprogid); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - - res = register_progid(buf, list->viprogid, list->progid, - list->name, list->progid_extra); - if (res != ERROR_SUCCESS) goto error_close_clsid_key; - } - -error_close_clsid_key: - RegCloseKey(clsid_key); - } - -error_close_coclass_key: - RegCloseKey(coclass_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * unregister_coclasses - */ -static HRESULT unregister_coclasses(struct regsvr_coclass const *list) -{ - LONG res = ERROR_SUCCESS; - HKEY coclass_key; - - res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsid_keyname, 0, - KEY_READ | KEY_WRITE, &coclass_key); - if (res == ERROR_FILE_NOT_FOUND) return S_OK; - if (res != ERROR_SUCCESS) goto error_return; - - for (; res == ERROR_SUCCESS && list->clsid; ++list) { - WCHAR buf[39]; - - StringFromGUID2(list->clsid, buf, 39); - res = RegDeleteTreeW(coclass_key, buf); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - - if (list->progid) { - res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->progid); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - } - - if (list->viprogid) { - res = RegDeleteTreeA(HKEY_CLASSES_ROOT, list->viprogid); - if (res == ERROR_FILE_NOT_FOUND) res = ERROR_SUCCESS; - if (res != ERROR_SUCCESS) goto error_close_coclass_key; - } - } - -error_close_coclass_key: - RegCloseKey(coclass_key); -error_return: - return res != ERROR_SUCCESS ? HRESULT_FROM_WIN32(res) : S_OK; -} - -/*********************************************************************** - * regsvr_key_defvalueW - */ -static LONG register_key_defvalueW( - HKEY base, - WCHAR const *name, - WCHAR const *value) -{ - LONG res; - HKEY key; - - res = RegCreateKeyExW(base, name, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) return res; - res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value, - (lstrlenW(value) + 1) * sizeof(WCHAR)); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * regsvr_key_defvalueA - */ -static LONG register_key_defvalueA( - HKEY base, - WCHAR const *name, - char const *value) -{ - LONG res; - HKEY key; - - res = RegCreateKeyExW(base, name, 0, NULL, 0, - KEY_READ | KEY_WRITE, NULL, &key, NULL); - if (res != ERROR_SUCCESS) return res; - res = RegSetValueExA(key, NULL, 0, REG_SZ, (CONST BYTE*)value, - lstrlenA(value) + 1); - RegCloseKey(key); - return res; -} - -/*********************************************************************** - * regsvr_progid - */ -static LONG register_progid( - WCHAR const *clsid, - char const *progid, - char const *curver_progid, - char const *name, - char const *extra) -{ - LONG res; - HKEY progid_key; - - res = RegCreateKeyExA(HKEY_CLASSES_ROOT, progid, 0, - NULL, 0, KEY_READ | KEY_WRITE, NULL, - &progid_key, NULL); - if (res != ERROR_SUCCESS) return res; - - if (name) { - res = RegSetValueExA(progid_key, NULL, 0, REG_SZ, - (CONST BYTE*)name, strlen(name) + 1); - if (res != ERROR_SUCCESS) goto error_close_progid_key; - } - - if (clsid) { - res = register_key_defvalueW(progid_key, clsid_keyname, clsid); - if (res != ERROR_SUCCESS) goto error_close_progid_key; - } - - if (curver_progid) { - res = register_key_defvalueA(progid_key, curver_keyname, - curver_progid); - if (res != ERROR_SUCCESS) goto error_close_progid_key; - } - - if (extra) { - HKEY extra_key; - - res = RegCreateKeyExA(progid_key, extra, 0, - NULL, 0, KEY_READ | KEY_WRITE, NULL, - &extra_key, NULL); - if (res == ERROR_SUCCESS) - RegCloseKey(extra_key); - } - -error_close_progid_key: - RegCloseKey(progid_key); - return res; -} - -/*********************************************************************** - * coclass list - */ -static struct regsvr_coclass const coclass_list[] = { - { &CLSID_MediaDet, - "MediaDet", - NULL, - "qedit.dll", - "Both" - }, - { &CLSID_SampleGrabber, - "Sample Grabber", - NULL, - "qedit.dll", - "Both" - }, - { NULL } /* list terminator */ -}; - -/*********************************************************************** - * DllRegisterServer (QEDIT.@) - */ -HRESULT WINAPI DllRegisterServer(void) -{ - HRESULT hr; - - TRACE("\n"); - - hr = register_coclasses(coclass_list); - return hr; -} - -/*********************************************************************** - * DllUnregisterServer (QEDIT.@) - */ -HRESULT WINAPI DllUnregisterServer(void) -{ - HRESULT hr; - - TRACE("\n"); - - hr = unregister_coclasses(coclass_list); - return hr; -} diff --git a/dll/directx/wine/CMakeLists.txt b/dll/directx/wine/CMakeLists.txt index f0e665bc097..a58fb6a59ec 100644 --- a/dll/directx/wine/CMakeLists.txt +++ b/dll/directx/wine/CMakeLists.txt @@ -1,15 +1,15 @@ +add_subdirectory(amstream) add_subdirectory(d3d8) add_subdirectory(d3d9) +add_subdirectory(d3dcompiler_43) add_subdirectory(d3dx9_24) -if(NOT MSVC) - add_subdirectory(d3dx9_25) - add_subdirectory(d3dx9_26) - add_subdirectory(d3dx9_27) - add_subdirectory(d3dx9_28) - add_subdirectory(d3dx9_29) - add_subdirectory(d3dx9_30) -endif() +add_subdirectory(d3dx9_25) +add_subdirectory(d3dx9_26) +add_subdirectory(d3dx9_27) +add_subdirectory(d3dx9_28) +add_subdirectory(d3dx9_29) +add_subdirectory(d3dx9_30) add_subdirectory(d3dx9_31) add_subdirectory(d3dx9_32) add_subdirectory(d3dx9_33) @@ -22,5 +22,19 @@ add_subdirectory(d3dx9_39) add_subdirectory(d3dx9_40) add_subdirectory(d3dx9_41) add_subdirectory(d3dx9_42) +add_subdirectory(d3dx9_43) +add_subdirectory(d3dxof) add_subdirectory(ddraw) +add_subdirectory(devenum) +add_subdirectory(dinput) +add_subdirectory(dinput8) +add_subdirectory(dmusic) +add_subdirectory(dplay) +add_subdirectory(dplayx) +add_subdirectory(dsound) +add_subdirectory(dxdiagn) +add_subdirectory(dxgi) +add_subdirectory(msdmo) +add_subdirectory(qedit) +add_subdirectory(quartz) add_subdirectory(wined3d) diff --git a/dll/directx/amstream/CMakeLists.txt b/dll/directx/wine/amstream/CMakeLists.txt similarity index 51% rename from dll/directx/amstream/CMakeLists.txt rename to dll/directx/wine/amstream/CMakeLists.txt index 6a6af97449d..7553c828e09 100644 --- a/dll/directx/amstream/CMakeLists.txt +++ b/dll/directx/wine/amstream/CMakeLists.txt @@ -1,23 +1,21 @@ -add_definitions(-D__WINESRC__) - -remove_definitions(-D_WIN32_WINNT=0x502) -add_definitions(-D_WIN32_WINNT=0x600) +add_definitions( + -D__WINESRC__ + -DWIDL_C_INLINE_WRAPPERS) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - spec2def(amstream.dll amstream.spec) -add_library(amstream SHARED +list(APPEND SOURCE amstream.c + audiodata.c main.c mediastream.c mediastreamfilter.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/amstream.def) +add_library(amstream SHARED ${SOURCE} version.rc) set_module_type(amstream win32dll) -target_link_libraries(amstream strmiids uuid wine) -add_importlibs(amstream ole32 advapi32 msvcrt kernel32 ntdll) -add_dependencies(amstream dxsdk) +target_link_libraries(amstream strmbase strmiids uuid wine) +add_importlibs(amstream ole32 msvcrt kernel32 ntdll) add_cd_file(TARGET amstream DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/amstream/amstream.c b/dll/directx/wine/amstream/amstream.c similarity index 62% rename from dll/directx/amstream/amstream.c rename to dll/directx/wine/amstream/amstream.c index 39e97c4847a..dbf781f0487 100644 --- a/dll/directx/amstream/amstream.c +++ b/dll/directx/wine/amstream/amstream.c @@ -1,7 +1,7 @@ /* * Implementation of IAMMultiMediaStream Interface * - * Copyright 2004 Christian Costa + * Copyright 2004, 2012 Christian Costa * Copyright 2006 Ivan Leo Puoti * * This library is free software; you can redistribute it and/or @@ -35,11 +35,14 @@ typedef struct { IAMMultiMediaStream IAMMultiMediaStream_iface; LONG ref; IGraphBuilder* pFilterGraph; + IMediaSeeking* media_seeking; + IMediaControl* media_control; + IBaseFilter* media_stream_filter; IPin* ipin; - IGraphBuilder* GraphBuilder; ULONG nbStreams; IMediaStream** pStreams; STREAM_TYPE StreamType; + OAEVENT event; } IAMMultiMediaStreamImpl; static inline IAMMultiMediaStreamImpl *impl_from_IAMMultiMediaStream(IAMMultiMediaStream *iface) @@ -60,10 +63,7 @@ HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj) object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IAMMultiMediaStreamImpl)); if (!object) - { - ERR("Out of memory\n"); return E_OUTOFMEMORY; - } object->IAMMultiMediaStream_iface.lpVtbl = &AM_Vtbl; object->ref = 1; @@ -84,8 +84,8 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_QueryInterface(IAMMultiMediaStream IsEqualGUID(riid, &IID_IMultiMediaStream) || IsEqualGUID(riid, &IID_IAMMultiMediaStream)) { - IUnknown_AddRef(iface); - *ppvObject = This; + IAMMultiMediaStream_AddRef(iface); + *ppvObject = iface; return S_OK; } @@ -107,11 +107,26 @@ static ULONG WINAPI IAMMultiMediaStreamImpl_Release(IAMMultiMediaStream* iface) { IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); ULONG ref = InterlockedDecrement(&This->ref); + ULONG i; TRACE("(%p/%p)\n", iface, This); if (!ref) + { + for(i = 0; i < This->nbStreams; i++) + IMediaStream_Release(This->pStreams[i]); + if (This->ipin) + IPin_Release(This->ipin); + if (This->media_stream_filter) + IBaseFilter_Release(This->media_stream_filter); + if (This->media_seeking) + IMediaSeeking_Release(This->media_seeking); + if (This->media_control) + IMediaControl_Release(This->media_control); + if (This->pFilterGraph) + IGraphBuilder_Release(This->pFilterGraph); HeapFree(GetProcessHeap(), 0, This); + } return ref; } @@ -166,13 +181,19 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetState(IAMMultiMediaStream* ifac return E_NOTIMPL; } -static HRESULT WINAPI IAMMultiMediaStreamImpl_SetState(IAMMultiMediaStream* iface, STREAM_STATE NewState) +static HRESULT WINAPI IAMMultiMediaStreamImpl_SetState(IAMMultiMediaStream* iface, STREAM_STATE new_state) { IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); + HRESULT hr = E_INVALIDARG; - FIXME("(%p/%p)->() stub!\n", This, iface); + TRACE("(%p/%p)->(%u)\n", This, iface, new_state); - return E_NOTIMPL; + if (new_state == STREAMSTATE_RUN) + hr = IMediaControl_Run(This->media_control); + else if (new_state == STREAMSTATE_STOP) + hr = IMediaControl_Stop(This->media_control); + + return hr; } static HRESULT WINAPI IAMMultiMediaStreamImpl_GetTime(IAMMultiMediaStream* iface, STREAM_TIME* pCurrentTime) @@ -193,13 +214,13 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetDuration(IAMMultiMediaStream* i return E_NOTIMPL; } -static HRESULT WINAPI IAMMultiMediaStreamImpl_Seek(IAMMultiMediaStream* iface, STREAM_TIME SeekTime) +static HRESULT WINAPI IAMMultiMediaStreamImpl_Seek(IAMMultiMediaStream* iface, STREAM_TIME seek_time) { IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); - FIXME("(%p/%p)->() stub!\n", This, iface); + TRACE("(%p/%p)->(%s)\n", This, iface, wine_dbgstr_longlong(seek_time)); - return E_NOTIMPL; + return IMediaSeeking_SetPositions(This->media_seeking, &seek_time, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning); } static HRESULT WINAPI IAMMultiMediaStreamImpl_GetEndOfStream(IAMMultiMediaStream* iface, HANDLE* phEOS) @@ -216,6 +237,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream* if { IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); HRESULT hr = S_OK; + const WCHAR filternameW[] = {'M','e','d','i','a','S','t','r','e','a','m','F','i','l','t','e','r',0}; TRACE("(%p/%p)->(%x,%x,%p)\n", This, iface, (DWORD)StreamType, dwFlags, pFilterGraph); @@ -232,6 +254,40 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream* if if (SUCCEEDED(hr)) { This->StreamType = StreamType; + hr = IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IMediaSeeking, (void**)&This->media_seeking); + if (SUCCEEDED(hr)) + IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IMediaControl, (void**)&This->media_control); + if (SUCCEEDED(hr)) + hr = CoCreateInstance(&CLSID_MediaStreamFilter, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (LPVOID*)&This->media_stream_filter); + if (SUCCEEDED(hr)) + IGraphBuilder_AddFilter(This->pFilterGraph, This->media_stream_filter, filternameW); + if (SUCCEEDED(hr)) + { + IMediaEventEx* media_event = NULL; + hr = IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IMediaEventEx, (void**)&media_event); + if (SUCCEEDED(hr)) + hr = IMediaEventEx_GetEventHandle(media_event, &This->event); + if (SUCCEEDED(hr)) + hr = IMediaEventEx_SetNotifyFlags(media_event, AM_MEDIAEVENT_NONOTIFY); + if (media_event) + IMediaEventEx_Release(media_event); + } + } + + if (FAILED(hr)) + { + if (This->media_stream_filter) + IBaseFilter_Release(This->media_stream_filter); + This->media_stream_filter = NULL; + if (This->media_seeking) + IMediaSeeking_Release(This->media_seeking); + This->media_seeking = NULL; + if (This->media_control) + IMediaControl_Release(This->media_control); + This->media_control = NULL; + if (This->pFilterGraph) + IGraphBuilder_Release(This->pFilterGraph); + This->pFilterGraph = NULL; } return hr; @@ -247,7 +303,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilterGraph(IAMMultiMediaStream return E_POINTER; if (This->pFilterGraph) - return IFilterGraph_QueryInterface(This->pFilterGraph, &IID_IGraphBuilder, (void**)ppGraphBuilder); + return IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IGraphBuilder, (void**)ppGraphBuilder); else *ppGraphBuilder = NULL; @@ -257,13 +313,22 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilterGraph(IAMMultiMediaStream static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilter(IAMMultiMediaStream* iface, IMediaStreamFilter** ppFilter) { IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); + HRESULT hr = S_OK; - FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppFilter); + TRACE("(%p/%p)->(%p)\n", This, iface, ppFilter); - return E_NOTIMPL; + if (!ppFilter) + return E_POINTER; + + *ppFilter = NULL; + + if (This->media_stream_filter) + hr = IBaseFilter_QueryInterface(This->media_stream_filter, &IID_IMediaStreamFilter, (LPVOID*)ppFilter); + + return hr; } -static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream* iface, IUnknown* pStreamObject, const MSPID* PurposeId, +static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream* iface, IUnknown* stream_object, const MSPID* PurposeId, DWORD dwFlags, IMediaStream** ppNewStream) { IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); @@ -271,9 +336,42 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream IMediaStream* pStream; IMediaStream** pNewStreams; - FIXME("(%p/%p)->(%p,%s,%x,%p) partial stub!\n", This, iface, pStreamObject, debugstr_guid(PurposeId), dwFlags, ppNewStream); + TRACE("(%p/%p)->(%p,%s,%x,%p)\n", This, iface, stream_object, debugstr_guid(PurposeId), dwFlags, ppNewStream); - hr = mediastream_create((IMultiMediaStream*)iface, PurposeId, This->StreamType, &pStream); + if (!IsEqualGUID(PurposeId, &MSPID_PrimaryVideo) && !IsEqualGUID(PurposeId, &MSPID_PrimaryAudio)) + return MS_E_PURPOSEID; + + if (stream_object) + FIXME("Specifying a stream object in params is not yet supported\n"); + + if (dwFlags & AMMSF_ADDDEFAULTRENDERER) + { + if (IsEqualGUID(PurposeId, &MSPID_PrimaryVideo)) + { + /* Default renderer not supported by video stream */ + return MS_E_PURPOSEID; + } + else + { + IBaseFilter* dsoundrender_filter; + + /* Create the default renderer for audio */ + hr = CoCreateInstance(&CLSID_DSoundRender, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (LPVOID*)&dsoundrender_filter); + if (SUCCEEDED(hr)) + { + hr = IGraphBuilder_AddFilter(This->pFilterGraph, dsoundrender_filter, NULL); + IBaseFilter_Release(dsoundrender_filter); + } + + /* No media stream created when the default renderer is used */ + return hr; + } + } + + if (IsEqualGUID(PurposeId, &MSPID_PrimaryVideo)) + hr = ddrawmediastream_create((IMultiMediaStream*)iface, PurposeId, This->StreamType, &pStream); + else + hr = audiomediastream_create((IMultiMediaStream*)iface, PurposeId, This->StreamType, &pStream); if (SUCCEEDED(hr)) { pNewStreams = CoTaskMemRealloc(This->pStreams, (This->nbStreams+1) * sizeof(IMediaStream*)); @@ -290,80 +388,57 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream *ppNewStream = pStream; } + if (SUCCEEDED(hr)) + { + /* Add stream to the media stream filter */ + IMediaStreamFilter_AddMediaStream((IMediaStreamFilter*)This->media_stream_filter, (IAMMediaStream*)pStream); + } + return hr; } -static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenFile(IAMMultiMediaStream* iface, LPCWSTR pszFileName, DWORD dwFlags) +static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenFile(IAMMultiMediaStream* iface, LPCWSTR filename, DWORD flags) { - HRESULT ret; IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); - IFileSourceFilter *SourceFilter; - IBaseFilter *BaseFilter; - IEnumPins *EnumPins; + HRESULT ret = S_OK; + IBaseFilter *BaseFilter = NULL; + IEnumPins *EnumPins = NULL; IPin *ipin; PIN_DIRECTION pin_direction; + const WCHAR sourceW[] = {'S','o','u','r','c','e',0}; - TRACE("(%p/%p)->(%s,%x)\n", This, iface, debugstr_w(pszFileName), dwFlags); + TRACE("(%p/%p)->(%s,%x)\n", This, iface, debugstr_w(filename), flags); - ret = CoCreateInstance(&CLSID_AsyncReader, NULL, CLSCTX_INPROC_SERVER, &IID_IFileSourceFilter, (void**)&SourceFilter); - if(ret != S_OK) - return ret; - - ret = IFileSourceFilter_Load(SourceFilter, pszFileName, NULL); - if(ret != S_OK) - { - IFileSourceFilter_Release(SourceFilter); - return ret; - } - - ret = IFileSourceFilter_QueryInterface(SourceFilter, &IID_IBaseFilter, (void**)&BaseFilter); - if(ret != S_OK) - { - IFileSourceFilter_Release(SourceFilter); - return ret; - } - - ret = IBaseFilter_EnumPins(BaseFilter, &EnumPins); - if(ret != S_OK) - { - goto end; - } - - ret = IEnumPins_Next(EnumPins, 1, &ipin, NULL); - if(ret == S_OK) - { - ret = IPin_QueryDirection(ipin, &pin_direction); - IEnumPins_Release(EnumPins); - if(ret == S_OK && pin_direction == PINDIR_OUTPUT) - This->ipin = ipin; - else - goto end; - } - else - { - IEnumPins_Release(EnumPins); - goto end; - } + if (!filename) + return E_POINTER; /* If Initialize was not called before, we do it here */ if (!This->pFilterGraph) - { ret = IAMMultiMediaStream_Initialize(iface, STREAMTYPE_READ, 0, NULL); - if (FAILED(ret)) - goto end; - } - ret = IFilterGraph_QueryInterface(This->pFilterGraph, &IID_IGraphBuilder, (void**)&This->GraphBuilder); - if(ret != S_OK) + if (SUCCEEDED(ret)) + ret = IGraphBuilder_AddSourceFilter(This->pFilterGraph, filename, sourceW, &BaseFilter); + + if (SUCCEEDED(ret)) + ret = IBaseFilter_EnumPins(BaseFilter, &EnumPins); + + if (SUCCEEDED(ret)) + ret = IEnumPins_Next(EnumPins, 1, &ipin, NULL); + + if (SUCCEEDED(ret)) { - goto end; + ret = IPin_QueryDirection(ipin, &pin_direction); + if (ret == S_OK && pin_direction == PINDIR_OUTPUT) + This->ipin = ipin; } - ret = IGraphBuilder_AddSourceFilter(This->GraphBuilder, pszFileName, pszFileName, &BaseFilter); + if (SUCCEEDED(ret) && !(flags & AMMSF_NORENDER)) + ret = IGraphBuilder_Render(This->pFilterGraph, This->ipin); -end: - IBaseFilter_Release(BaseFilter); - IFileSourceFilter_Release(SourceFilter); + if (EnumPins) + IEnumPins_Release(EnumPins); + if (BaseFilter) + IBaseFilter_Release(BaseFilter); return ret; } @@ -385,7 +460,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_Render(IAMMultiMediaStream* iface, if(dwFlags != AMMSF_NOCLOCK) return E_INVALIDARG; - return IGraphBuilder_Render(This->GraphBuilder, This->ipin); + return IGraphBuilder_Render(This->pFilterGraph, This->ipin); } static const IAMMultiMediaStreamVtbl AM_Vtbl = diff --git a/dll/directx/amstream/amstream.spec b/dll/directx/wine/amstream/amstream.spec similarity index 100% rename from dll/directx/amstream/amstream.spec rename to dll/directx/wine/amstream/amstream.spec diff --git a/dll/directx/amstream/amstream_classes.idl b/dll/directx/wine/amstream/amstream_classes.idl similarity index 89% rename from dll/directx/amstream/amstream_classes.idl rename to dll/directx/wine/amstream/amstream_classes.idl index 701275d2f28..064ce00060d 100644 --- a/dll/directx/amstream/amstream_classes.idl +++ b/dll/directx/wine/amstream/amstream_classes.idl @@ -38,3 +38,10 @@ coclass AMDirectDrawStream { interface IAMMultiMediaStream; } uuid(49c47ce5-9ba4-11d0-8212-00c04fc32c45) ] coclass AMMultiMediaStream { interface IAMMultiMediaStream; } + +[ + helpstring("AuStream Class"), + threading(both), + uuid(f2468580-af8a-11d0-8212-00c04fc32c45) +] +coclass AMAudioData { interface IAudioData; } diff --git a/dll/directx/amstream/amstream.rgs b/dll/directx/wine/amstream/amstream_classes.rgs similarity index 77% rename from dll/directx/amstream/amstream.rgs rename to dll/directx/wine/amstream/amstream_classes.rgs index 2497ffbab4b..d7cf5f59bda 100644 --- a/dll/directx/amstream/amstream.rgs +++ b/dll/directx/wine/amstream/amstream_classes.rgs @@ -17,5 +17,9 @@ HKCR { InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } } + '{F2468580-AF8A-11D0-8212-00C04FC32C45}' = s 'AuStream Class' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } } } diff --git a/dll/directx/amstream/amstream_private.h b/dll/directx/wine/amstream/amstream_private.h similarity index 80% rename from dll/directx/amstream/amstream_private.h rename to dll/directx/wine/amstream/amstream_private.h index d1edbf5321d..479246f8a6d 100644 --- a/dll/directx/amstream/amstream_private.h +++ b/dll/directx/wine/amstream/amstream_private.h @@ -33,10 +33,14 @@ //#include "winuser.h" #include #include +#include HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN; +HRESULT AMAudioData_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN; HRESULT MediaStreamFilter_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN; -HRESULT mediastream_create(IMultiMediaStream *Parent, const MSPID *pPurposeId, +HRESULT ddrawmediastream_create(IMultiMediaStream *Parent, const MSPID *pPurposeId, STREAM_TYPE StreamType, IMediaStream **ppMediaStream) DECLSPEC_HIDDEN; +HRESULT audiomediastream_create(IMultiMediaStream *parent, const MSPID *purpose_id, + STREAM_TYPE stream_type, IMediaStream **media_stream) DECLSPEC_HIDDEN; #endif /* __AMSTREAM_PRIVATE_INCLUDED__ */ diff --git a/dll/directx/wine/amstream/audiodata.c b/dll/directx/wine/amstream/audiodata.c new file mode 100644 index 00000000000..3a62a9f898f --- /dev/null +++ b/dll/directx/wine/amstream/audiodata.c @@ -0,0 +1,154 @@ +/* + * Implementation of IAudioData Interface + * + * Copyright 2012 Christian Costa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "wine/debug.h" + +#define COBJMACROS + +#include "winbase.h" +#include "amstream_private.h" + +#include "amstream.h" + +WINE_DEFAULT_DEBUG_CHANNEL(amstream); + +typedef struct { + IAudioData IAudioData_iface; + LONG ref; +} AMAudioDataImpl; + +static inline AMAudioDataImpl *impl_from_IAudioData(IAudioData *iface) +{ + return CONTAINING_RECORD(iface, AMAudioDataImpl, IAudioData_iface); +} + +/*** IUnknown methods ***/ +static HRESULT WINAPI IAudioDataImpl_QueryInterface(IAudioData *iface, REFIID riid, void **ret_iface) +{ + TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid(riid), ret_iface); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_IMemoryData) || + IsEqualGUID(riid, &IID_IAudioData)) + { + IAudioData_AddRef(iface); + *ret_iface = iface; + return S_OK; + } + + ERR("(%p)->(%s,%p),not found\n", iface, debugstr_guid(riid), ret_iface); + return E_NOINTERFACE; +} + +static ULONG WINAPI IAudioDataImpl_AddRef(IAudioData* iface) +{ + AMAudioDataImpl *This = impl_from_IAudioData(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p)->(): new ref = %u\n", iface, This->ref); + + return ref; +} + +static ULONG WINAPI IAudioDataImpl_Release(IAudioData* iface) +{ + AMAudioDataImpl *This = impl_from_IAudioData(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(): new ref = %u\n", iface, This->ref); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +/*** IMemoryData methods ***/ +static HRESULT WINAPI IAudioDataImpl_SetBuffer(IAudioData* iface, DWORD size, BYTE *data, DWORD flags) +{ + FIXME("(%p)->(%u,%p,%x): stub\n", iface, size, data, flags); + + return E_NOTIMPL; +} + +static HRESULT WINAPI IAudioDataImpl_GetInfo(IAudioData* iface, DWORD *length, BYTE **data, DWORD *actual_data) +{ + FIXME("(%p)->(%p,%p,%p): stub\n", iface, length, data, actual_data); + + return E_NOTIMPL; +} + +static HRESULT WINAPI IAudioDataImpl_SetActual(IAudioData* iface, DWORD data_valid) +{ + FIXME("(%p)->(%u): stub\n", iface, data_valid); + + return E_NOTIMPL; +} + +/*** IAudioData methods ***/ +static HRESULT WINAPI IAudioDataImpl_GetFormat(IAudioData* iface, WAVEFORMATEX *wave_format_current) +{ + FIXME("(%p)->(%p): stub\n", iface, wave_format_current); + + return E_NOTIMPL; +} + +static HRESULT WINAPI IAudioDataImpl_SetFormat(IAudioData* iface, const WAVEFORMATEX *wave_format) +{ + FIXME("(%p)->(%p): stub\n", iface, wave_format); + + return E_NOTIMPL; +} + +static const struct IAudioDataVtbl AudioData_Vtbl = +{ + /*** IUnknown methods ***/ + IAudioDataImpl_QueryInterface, + IAudioDataImpl_AddRef, + IAudioDataImpl_Release, + /*** IMemoryData methods ***/ + IAudioDataImpl_SetBuffer, + IAudioDataImpl_GetInfo, + IAudioDataImpl_SetActual, + /*** IAudioData methods ***/ + IAudioDataImpl_GetFormat, + IAudioDataImpl_SetFormat +}; + +HRESULT AMAudioData_create(IUnknown *pUnkOuter, LPVOID *ppObj) +{ + AMAudioDataImpl *object; + + TRACE("(%p,%p)\n", pUnkOuter, ppObj); + + if (pUnkOuter) + return CLASS_E_NOAGGREGATION; + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(AMAudioDataImpl)); + if (!object) + return E_OUTOFMEMORY; + + object->IAudioData_iface.lpVtbl = &AudioData_Vtbl; + object->ref = 1; + + *ppObj = &object->IAudioData_iface; + + return S_OK; +} diff --git a/dll/directx/amstream/main.c b/dll/directx/wine/amstream/main.c similarity index 81% rename from dll/directx/amstream/main.c rename to dll/directx/wine/amstream/main.c index af56c01a1b0..fbe472b886f 100644 --- a/dll/directx/amstream/main.c +++ b/dll/directx/wine/amstream/main.c @@ -53,8 +53,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) instance = hInstDLL; DisableThreadLibraryCalls(hInstDLL); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } @@ -63,12 +61,16 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) * Multimedia Streams ClassFactory */ typedef struct { - IClassFactory ITF_IClassFactory; - + IClassFactory IClassFactory_iface; LONG ref; HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj); } IClassFactoryImpl; +static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface) +{ + return CONTAINING_RECORD(iface, IClassFactoryImpl, IClassFactory_iface); +} + struct object_creation_info { const CLSID *clsid; @@ -79,36 +81,34 @@ static const struct object_creation_info object_creation[] = { { &CLSID_AMMultiMediaStream, AM_create }, { &CLSID_AMDirectDrawStream, AM_create }, + { &CLSID_AMAudioData, AMAudioData_create }, { &CLSID_MediaStreamFilter, MediaStreamFilter_create } }; -static HRESULT WINAPI -AMCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) +static HRESULT WINAPI AMCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppobj) { - IClassFactoryImpl *This = (IClassFactoryImpl *)iface; - if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IClassFactory)) { IClassFactory_AddRef(iface); - *ppobj = This; + *ppobj = iface; return S_OK; } - WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj); + *ppobj = NULL; + WARN("(%p)->(%s,%p), not found\n", iface, debugstr_guid(riid), ppobj); return E_NOINTERFACE; } -static ULONG WINAPI AMCF_AddRef(LPCLASSFACTORY iface) +static ULONG WINAPI AMCF_AddRef(IClassFactory *iface) { - IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + IClassFactoryImpl *This = impl_from_IClassFactory(iface); return InterlockedIncrement(&This->ref); } -static ULONG WINAPI AMCF_Release(LPCLASSFACTORY iface) +static ULONG WINAPI AMCF_Release(IClassFactory *iface) { - IClassFactoryImpl *This = (IClassFactoryImpl *)iface; - + IClassFactoryImpl *This = impl_from_IClassFactory(iface); ULONG ref = InterlockedDecrement(&This->ref); if (ref == 0) @@ -118,10 +118,10 @@ static ULONG WINAPI AMCF_Release(LPCLASSFACTORY iface) } -static HRESULT WINAPI AMCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, - REFIID riid, LPVOID *ppobj) +static HRESULT WINAPI AMCF_CreateInstance(IClassFactory *iface, IUnknown *pOuter, + REFIID riid, void **ppobj) { - IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + IClassFactoryImpl *This = impl_from_IClassFactory(iface); HRESULT hres; LPUNKNOWN punk; @@ -136,9 +136,9 @@ static HRESULT WINAPI AMCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter return hres; } -static HRESULT WINAPI AMCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) +static HRESULT WINAPI AMCF_LockServer(IClassFactory *iface, BOOL dolock) { - IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + IClassFactoryImpl *This = impl_from_IClassFactory(iface); FIXME("(%p)->(%d),stub!\n",This,dolock); return S_OK; } @@ -195,12 +195,12 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) factory = HeapAlloc(GetProcessHeap(), 0, sizeof(*factory)); if (factory == NULL) return E_OUTOFMEMORY; - factory->ITF_IClassFactory.lpVtbl = &DSCF_Vtbl; + factory->IClassFactory_iface.lpVtbl = &DSCF_Vtbl; factory->ref = 1; factory->pfnCreateInstance = object_creation[i].pfnCreateInstance; - *ppv = &(factory->ITF_IClassFactory); + *ppv = &factory->IClassFactory_iface; return S_OK; } diff --git a/dll/directx/wine/amstream/mediastream.c b/dll/directx/wine/amstream/mediastream.c new file mode 100644 index 00000000000..ef8b6f8f7c5 --- /dev/null +++ b/dll/directx/wine/amstream/mediastream.c @@ -0,0 +1,1137 @@ +/* + * Implementation of IMediaStream Interfaces + * + * Copyright 2005, 2008, 2012 Christian Costa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +#define COBJMACROS + +//#include "winbase.h" +//#include "wingdi.h" + +//#include "amstream_private.h" +#include + +//#include "ddstream.h" + +WINE_DEFAULT_DEBUG_CHANNEL(amstream); + +static HRESULT ddrawstreamsample_create(IDirectDrawMediaStream *parent, IDirectDrawStreamSample **ddraw_stream_sample); +static HRESULT audiostreamsample_create(IAudioMediaStream *parent, IAudioData *audio_data, IAudioStreamSample **audio_stream_sample); + +typedef struct { + IAMMediaStream IAMMediaStream_iface; + IDirectDrawMediaStream IDirectDrawMediaStream_iface; + LONG ref; + IMultiMediaStream* parent; + MSPID purpose_id; + STREAM_TYPE stream_type; +} DirectDrawMediaStreamImpl; + +static inline DirectDrawMediaStreamImpl *impl_from_DirectDrawMediaStream_IAMMediaStream(IAMMediaStream *iface) +{ + return CONTAINING_RECORD(iface, DirectDrawMediaStreamImpl, IAMMediaStream_iface); +} + +/*** IUnknown methods ***/ +static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_QueryInterface(IAMMediaStream *iface, + REFIID riid, void **ret_iface) +{ + DirectDrawMediaStreamImpl *This = impl_from_DirectDrawMediaStream_IAMMediaStream(iface); + + TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ret_iface); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_IMediaStream) || + IsEqualGUID(riid, &IID_IAMMediaStream)) + { + IAMMediaStream_AddRef(iface); + *ret_iface = iface; + return S_OK; + } + else if (IsEqualGUID(riid, &IID_IDirectDrawMediaStream)) + { + IAMMediaStream_AddRef(iface); + *ret_iface = &This->IDirectDrawMediaStream_iface; + return S_OK; + } + + ERR("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ret_iface); + return E_NOINTERFACE; +} + +static ULONG WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_AddRef(IAMMediaStream *iface) +{ + DirectDrawMediaStreamImpl *This = impl_from_DirectDrawMediaStream_IAMMediaStream(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p/%p)->(): new ref = %u\n", iface, This, ref); + + return ref; +} + +static ULONG WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_Release(IAMMediaStream *iface) +{ + DirectDrawMediaStreamImpl *This = impl_from_DirectDrawMediaStream_IAMMediaStream(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p/%p)->(): new ref = %u\n", iface, This, ref); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +/*** IMediaStream methods ***/ +static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_GetMultiMediaStream(IAMMediaStream *iface, + IMultiMediaStream** multi_media_stream) +{ + DirectDrawMediaStreamImpl *This = impl_from_DirectDrawMediaStream_IAMMediaStream(iface); + + FIXME("(%p/%p)->(%p) stub!\n", This, iface, multi_media_stream); + + return S_FALSE; +} + +static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_GetInformation(IAMMediaStream *iface, + MSPID *purpose_id, STREAM_TYPE *type) +{ + DirectDrawMediaStreamImpl *This = impl_from_DirectDrawMediaStream_IAMMediaStream(iface); + + TRACE("(%p/%p)->(%p,%p)\n", This, iface, purpose_id, type); + + if (purpose_id) + *purpose_id = This->purpose_id; + if (type) + *type = This->stream_type; + + return S_OK; +} + +static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_SetSameFormat(IAMMediaStream *iface, + IMediaStream *pStreamThatHasDesiredFormat, DWORD flags) +{ + DirectDrawMediaStreamImpl *This = impl_from_DirectDrawMediaStream_IAMMediaStream(iface); + + FIXME("(%p/%p)->(%p,%x) stub!\n", This, iface, pStreamThatHasDesiredFormat, flags); + + return S_FALSE; +} + +static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_AllocateSample(IAMMediaStream *iface, + DWORD flags, IStreamSample **sample) +{ + DirectDrawMediaStreamImpl *This = impl_from_DirectDrawMediaStream_IAMMediaStream(iface); + + FIXME("(%p/%p)->(%x,%p) stub!\n", This, iface, flags, sample); + + return S_FALSE; +} + +static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_CreateSharedSample(IAMMediaStream *iface, + IStreamSample *existing_sample, DWORD flags, IStreamSample **sample) +{ + DirectDrawMediaStreamImpl *This = impl_from_DirectDrawMediaStream_IAMMediaStream(iface); + + FIXME("(%p/%p)->(%p,%x,%p) stub!\n", This, iface, existing_sample, flags, sample); + + return S_FALSE; +} + +static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_SendEndOfStream(IAMMediaStream *iface, DWORD flags) +{ + DirectDrawMediaStreamImpl *This = impl_from_DirectDrawMediaStream_IAMMediaStream(iface); + + FIXME("(%p/%p)->(%x) stub!\n", This, iface, flags); + + return S_FALSE; +} + +/*** IAMMediaStream methods ***/ +static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_Initialize(IAMMediaStream *iface, IUnknown *source_object, DWORD flags, + REFMSPID purpose_id, const STREAM_TYPE stream_type) +{ + DirectDrawMediaStreamImpl *This = impl_from_DirectDrawMediaStream_IAMMediaStream(iface); + + FIXME("(%p/%p)->(%p,%x,%p,%u) stub!\n", This, iface, source_object, flags, purpose_id, stream_type); + + return S_FALSE; +} + +static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_SetState(IAMMediaStream *iface, FILTER_STATE state) +{ + DirectDrawMediaStreamImpl *This = impl_from_DirectDrawMediaStream_IAMMediaStream(iface); + + FIXME("(%p/%p)->(%u) stub!\n", This, iface, state); + + return S_FALSE; +} + +static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_JoinAMMultiMediaStream(IAMMediaStream *iface, IAMMultiMediaStream *am_multi_media_stream) +{ + DirectDrawMediaStreamImpl *This = impl_from_DirectDrawMediaStream_IAMMediaStream(iface); + + FIXME("(%p/%p)->(%p) stub!\n", This, iface, am_multi_media_stream); + + return S_FALSE; +} + +static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_JoinFilter(IAMMediaStream *iface, IMediaStreamFilter *media_stream_filter) +{ + DirectDrawMediaStreamImpl *This = impl_from_DirectDrawMediaStream_IAMMediaStream(iface); + + FIXME("(%p/%p)->(%p) stub!\n", This, iface, media_stream_filter); + + return S_FALSE; +} + +static HRESULT WINAPI DirectDrawMediaStreamImpl_IAMMediaStream_JoinFilterGraph(IAMMediaStream *iface, IFilterGraph *filtergraph) +{ + DirectDrawMediaStreamImpl *This = impl_from_DirectDrawMediaStream_IAMMediaStream(iface); + + FIXME("(%p/%p)->(%p) stub!\n", This, iface, filtergraph); + + return S_FALSE; +} + +static const struct IAMMediaStreamVtbl DirectDrawMediaStreamImpl_IAMMediaStream_Vtbl = +{ + /*** IUnknown methods ***/ + DirectDrawMediaStreamImpl_IAMMediaStream_QueryInterface, + DirectDrawMediaStreamImpl_IAMMediaStream_AddRef, + DirectDrawMediaStreamImpl_IAMMediaStream_Release, + /*** IMediaStream methods ***/ + DirectDrawMediaStreamImpl_IAMMediaStream_GetMultiMediaStream, + DirectDrawMediaStreamImpl_IAMMediaStream_GetInformation, + DirectDrawMediaStreamImpl_IAMMediaStream_SetSameFormat, + DirectDrawMediaStreamImpl_IAMMediaStream_AllocateSample, + DirectDrawMediaStreamImpl_IAMMediaStream_CreateSharedSample, + DirectDrawMediaStreamImpl_IAMMediaStream_SendEndOfStream, + /*** IAMMediaStream methods ***/ + DirectDrawMediaStreamImpl_IAMMediaStream_Initialize, + DirectDrawMediaStreamImpl_IAMMediaStream_SetState, + DirectDrawMediaStreamImpl_IAMMediaStream_JoinAMMultiMediaStream, + DirectDrawMediaStreamImpl_IAMMediaStream_JoinFilter, + DirectDrawMediaStreamImpl_IAMMediaStream_JoinFilterGraph +}; + +static inline DirectDrawMediaStreamImpl *impl_from_IDirectDrawMediaStream(IDirectDrawMediaStream *iface) +{ + return CONTAINING_RECORD(iface, DirectDrawMediaStreamImpl, IDirectDrawMediaStream_iface); +} + +/*** IUnknown methods ***/ +static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_QueryInterface(IDirectDrawMediaStream *iface, + REFIID riid, void **ret_iface) +{ + DirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); + + TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ret_iface); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_IMediaStream) || + IsEqualGUID(riid, &IID_IDirectDrawMediaStream)) + { + IDirectDrawMediaStream_AddRef(iface); + *ret_iface = iface; + return S_OK; + } + else if (IsEqualGUID(riid, &IID_IAMMediaStream)) + { + IDirectDrawMediaStream_AddRef(iface); + *ret_iface = &This->IAMMediaStream_iface; + return S_OK; + } + + ERR("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ret_iface); + return E_NOINTERFACE; +} + +static ULONG WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_AddRef(IDirectDrawMediaStream *iface) +{ + DirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); + + TRACE("(%p/%p)\n", iface, This); + + return InterlockedIncrement(&This->ref); +} + +static ULONG WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_Release(IDirectDrawMediaStream *iface) +{ + DirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p/%p)\n", iface, This); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +/*** IMediaStream methods ***/ +static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetMultiMediaStream(IDirectDrawMediaStream *iface, + IMultiMediaStream** ppMultiMediaStream) +{ + DirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); + + FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppMultiMediaStream); + + return S_FALSE; +} + +static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetInformation(IDirectDrawMediaStream *iface, + MSPID *purpose_id, STREAM_TYPE *type) +{ + DirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); + + TRACE("(%p/%p)->(%p,%p)\n", This, iface, purpose_id, type); + + if (purpose_id) + *purpose_id = This->purpose_id; + if (type) + *type = This->stream_type; + + return S_OK; +} + +static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_SetSameFormat(IDirectDrawMediaStream *iface, + IMediaStream *pStreamThatHasDesiredFormat, DWORD dwFlags) +{ + DirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); + + FIXME("(%p/%p)->(%p,%x) stub!\n", This, iface, pStreamThatHasDesiredFormat, dwFlags); + + return S_FALSE; +} + +static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_AllocateSample(IDirectDrawMediaStream *iface, + DWORD dwFlags, IStreamSample **ppSample) +{ + DirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); + + FIXME("(%p/%p)->(%x,%p) stub!\n", This, iface, dwFlags, ppSample); + + return S_FALSE; +} + +static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_CreateSharedSample(IDirectDrawMediaStream *iface, + IStreamSample *pExistingSample, DWORD dwFlags, IStreamSample **ppSample) +{ + DirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); + + FIXME("(%p/%p)->(%p,%x,%p) stub!\n", This, iface, pExistingSample, dwFlags, ppSample); + + return S_FALSE; +} + +static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_SendEndOfStream(IDirectDrawMediaStream *iface, + DWORD dwFlags) +{ + DirectDrawMediaStreamImpl *This = impl_from_IDirectDrawMediaStream(iface); + + FIXME("(%p/%p)->(%x) stub!\n", This, iface, dwFlags); + + return S_FALSE; +} + +/*** IDirectDrawMediaStream methods ***/ +static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetFormat(IDirectDrawMediaStream *iface, + DDSURFACEDESC *current_format, IDirectDrawPalette **palette, + DDSURFACEDESC *desired_format, DWORD *flags) +{ + FIXME("(%p)->(%p,%p,%p,%p) stub!\n", iface, current_format, palette, desired_format, + flags); + + return MS_E_NOSTREAM; + +} + +static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_SetFormat(IDirectDrawMediaStream *iface, + const DDSURFACEDESC *pDDSurfaceDesc, IDirectDrawPalette *pDirectDrawPalette) +{ + FIXME("(%p)->(%p,%p) stub!\n", iface, pDDSurfaceDesc, pDirectDrawPalette); + + return E_NOTIMPL; +} + +static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetDirectDraw(IDirectDrawMediaStream *iface, + IDirectDraw **ppDirectDraw) +{ + FIXME("(%p)->(%p) stub!\n", iface, ppDirectDraw); + + return E_NOTIMPL; +} + +static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_SetDirectDraw(IDirectDrawMediaStream *iface, + IDirectDraw *pDirectDraw) +{ + FIXME("(%p)->(%p) stub!\n", iface, pDirectDraw); + + return E_NOTIMPL; +} + +static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_CreateSample(IDirectDrawMediaStream *iface, + IDirectDrawSurface *pSurface, const RECT *pRect, DWORD dwFlags, + IDirectDrawStreamSample **ppSample) +{ + TRACE("(%p)->(%p,%p,%x,%p)\n", iface, pSurface, pRect, dwFlags, ppSample); + + return ddrawstreamsample_create(iface, ppSample); +} + +static HRESULT WINAPI DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetTimePerFrame(IDirectDrawMediaStream *iface, + STREAM_TIME *pFrameTime) +{ + FIXME("(%p)->(%p) stub!\n", iface, pFrameTime); + + return E_NOTIMPL; +} + +static const struct IDirectDrawMediaStreamVtbl DirectDrawMediaStreamImpl_IDirectDrawMediaStream_Vtbl = +{ + /*** IUnknown methods ***/ + DirectDrawMediaStreamImpl_IDirectDrawMediaStream_QueryInterface, + DirectDrawMediaStreamImpl_IDirectDrawMediaStream_AddRef, + DirectDrawMediaStreamImpl_IDirectDrawMediaStream_Release, + /*** IMediaStream methods ***/ + DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetMultiMediaStream, + DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetInformation, + DirectDrawMediaStreamImpl_IDirectDrawMediaStream_SetSameFormat, + DirectDrawMediaStreamImpl_IDirectDrawMediaStream_AllocateSample, + DirectDrawMediaStreamImpl_IDirectDrawMediaStream_CreateSharedSample, + DirectDrawMediaStreamImpl_IDirectDrawMediaStream_SendEndOfStream, + /*** IDirectDrawMediaStream methods ***/ + DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetFormat, + DirectDrawMediaStreamImpl_IDirectDrawMediaStream_SetFormat, + DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetDirectDraw, + DirectDrawMediaStreamImpl_IDirectDrawMediaStream_SetDirectDraw, + DirectDrawMediaStreamImpl_IDirectDrawMediaStream_CreateSample, + DirectDrawMediaStreamImpl_IDirectDrawMediaStream_GetTimePerFrame +}; + +HRESULT ddrawmediastream_create(IMultiMediaStream *parent, const MSPID *purpose_id, + STREAM_TYPE stream_type, IMediaStream **media_stream) +{ + DirectDrawMediaStreamImpl *object; + + TRACE("(%p,%s,%p)\n", parent, debugstr_guid(purpose_id), media_stream); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DirectDrawMediaStreamImpl)); + if (!object) + return E_OUTOFMEMORY; + + object->IAMMediaStream_iface.lpVtbl = &DirectDrawMediaStreamImpl_IAMMediaStream_Vtbl; + object->IDirectDrawMediaStream_iface.lpVtbl = &DirectDrawMediaStreamImpl_IDirectDrawMediaStream_Vtbl; + object->ref = 1; + + object->parent = parent; + object->purpose_id = *purpose_id; + object->stream_type = stream_type; + + *media_stream = (IMediaStream*)&object->IAMMediaStream_iface; + + return S_OK; +} + +typedef struct { + IAMMediaStream IAMMediaStream_iface; + IAudioMediaStream IAudioMediaStream_iface; + LONG ref; + IMultiMediaStream* parent; + MSPID purpose_id; + STREAM_TYPE stream_type; +} AudioMediaStreamImpl; + +static inline AudioMediaStreamImpl *impl_from_AudioMediaStream_IAMMediaStream(IAMMediaStream *iface) +{ + return CONTAINING_RECORD(iface, AudioMediaStreamImpl, IAMMediaStream_iface); +} + +/*** IUnknown methods ***/ +static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_QueryInterface(IAMMediaStream *iface, + REFIID riid, void **ret_iface) +{ + AudioMediaStreamImpl *This = impl_from_AudioMediaStream_IAMMediaStream(iface); + + TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ret_iface); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_IMediaStream) || + IsEqualGUID(riid, &IID_IAMMediaStream)) + { + IAMMediaStream_AddRef(iface); + *ret_iface = iface; + return S_OK; + } + else if (IsEqualGUID(riid, &IID_IAudioMediaStream)) + { + IAMMediaStream_AddRef(iface); + *ret_iface = &This->IAudioMediaStream_iface; + return S_OK; + } + + ERR("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ret_iface); + return E_NOINTERFACE; +} + +static ULONG WINAPI AudioMediaStreamImpl_IAMMediaStream_AddRef(IAMMediaStream *iface) +{ + AudioMediaStreamImpl *This = impl_from_AudioMediaStream_IAMMediaStream(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p/%p)->(): new ref = %u\n", iface, This, ref); + + return ref; +} + +static ULONG WINAPI AudioMediaStreamImpl_IAMMediaStream_Release(IAMMediaStream *iface) +{ + AudioMediaStreamImpl *This = impl_from_AudioMediaStream_IAMMediaStream(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p/%p)->(): new ref = %u\n", iface, This, ref); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +/*** IMediaStream methods ***/ +static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_GetMultiMediaStream(IAMMediaStream *iface, + IMultiMediaStream** multi_media_stream) +{ + AudioMediaStreamImpl *This = impl_from_AudioMediaStream_IAMMediaStream(iface); + + FIXME("(%p/%p)->(%p) stub!\n", This, iface, multi_media_stream); + + return S_FALSE; +} + +static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_GetInformation(IAMMediaStream *iface, + MSPID *purpose_id, STREAM_TYPE *type) +{ + AudioMediaStreamImpl *This = impl_from_AudioMediaStream_IAMMediaStream(iface); + + TRACE("(%p/%p)->(%p,%p)\n", This, iface, purpose_id, type); + + if (purpose_id) + *purpose_id = This->purpose_id; + if (type) + *type = This->stream_type; + + return S_OK; +} + +static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_SetSameFormat(IAMMediaStream *iface, + IMediaStream *pStreamThatHasDesiredFormat, DWORD flags) +{ + AudioMediaStreamImpl *This = impl_from_AudioMediaStream_IAMMediaStream(iface); + + FIXME("(%p/%p)->(%p,%x) stub!\n", This, iface, pStreamThatHasDesiredFormat, flags); + + return S_FALSE; +} + +static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_AllocateSample(IAMMediaStream *iface, + DWORD flags, IStreamSample **sample) +{ + AudioMediaStreamImpl *This = impl_from_AudioMediaStream_IAMMediaStream(iface); + + FIXME("(%p/%p)->(%x,%p) stub!\n", This, iface, flags, sample); + + return S_FALSE; +} + +static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_CreateSharedSample(IAMMediaStream *iface, + IStreamSample *existing_sample, DWORD flags, IStreamSample **sample) +{ + AudioMediaStreamImpl *This = impl_from_AudioMediaStream_IAMMediaStream(iface); + + FIXME("(%p/%p)->(%p,%x,%p) stub!\n", This, iface, existing_sample, flags, sample); + + return S_FALSE; +} + +static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_SendEndOfStream(IAMMediaStream *iface, DWORD flags) +{ + AudioMediaStreamImpl *This = impl_from_AudioMediaStream_IAMMediaStream(iface); + + FIXME("(%p/%p)->(%x) stub!\n", This, iface, flags); + + return S_FALSE; +} + +/*** IAMMediaStream methods ***/ +static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_Initialize(IAMMediaStream *iface, IUnknown *source_object, DWORD flags, + REFMSPID purpose_id, const STREAM_TYPE stream_type) +{ + AudioMediaStreamImpl *This = impl_from_AudioMediaStream_IAMMediaStream(iface); + + FIXME("(%p/%p)->(%p,%x,%p,%u) stub!\n", This, iface, source_object, flags, purpose_id, stream_type); + + return S_FALSE; +} + +static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_SetState(IAMMediaStream *iface, FILTER_STATE state) +{ + AudioMediaStreamImpl *This = impl_from_AudioMediaStream_IAMMediaStream(iface); + + FIXME("(%p/%p)->(%u) stub!\n", This, iface, state); + + return S_FALSE; +} + +static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_JoinAMMultiMediaStream(IAMMediaStream *iface, IAMMultiMediaStream *am_multi_media_stream) +{ + AudioMediaStreamImpl *This = impl_from_AudioMediaStream_IAMMediaStream(iface); + + FIXME("(%p/%p)->(%p) stub!\n", This, iface, am_multi_media_stream); + + return S_FALSE; +} + +static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_JoinFilter(IAMMediaStream *iface, IMediaStreamFilter *media_stream_filter) +{ + AudioMediaStreamImpl *This = impl_from_AudioMediaStream_IAMMediaStream(iface); + + FIXME("(%p/%p)->(%p) stub!\n", This, iface, media_stream_filter); + + return S_FALSE; +} + +static HRESULT WINAPI AudioMediaStreamImpl_IAMMediaStream_JoinFilterGraph(IAMMediaStream *iface, IFilterGraph *filtergraph) +{ + AudioMediaStreamImpl *This = impl_from_AudioMediaStream_IAMMediaStream(iface); + + FIXME("(%p/%p)->(%p) stub!\n", This, iface, filtergraph); + + return S_FALSE; +} + +static const struct IAMMediaStreamVtbl AudioMediaStreamImpl_IAMMediaStream_Vtbl = +{ + /*** IUnknown methods ***/ + AudioMediaStreamImpl_IAMMediaStream_QueryInterface, + AudioMediaStreamImpl_IAMMediaStream_AddRef, + AudioMediaStreamImpl_IAMMediaStream_Release, + /*** IMediaStream methods ***/ + AudioMediaStreamImpl_IAMMediaStream_GetMultiMediaStream, + AudioMediaStreamImpl_IAMMediaStream_GetInformation, + AudioMediaStreamImpl_IAMMediaStream_SetSameFormat, + AudioMediaStreamImpl_IAMMediaStream_AllocateSample, + AudioMediaStreamImpl_IAMMediaStream_CreateSharedSample, + AudioMediaStreamImpl_IAMMediaStream_SendEndOfStream, + /*** IAMMediaStream methods ***/ + AudioMediaStreamImpl_IAMMediaStream_Initialize, + AudioMediaStreamImpl_IAMMediaStream_SetState, + AudioMediaStreamImpl_IAMMediaStream_JoinAMMultiMediaStream, + AudioMediaStreamImpl_IAMMediaStream_JoinFilter, + AudioMediaStreamImpl_IAMMediaStream_JoinFilterGraph +}; + +static inline AudioMediaStreamImpl *impl_from_IAudioMediaStream(IAudioMediaStream *iface) +{ + return CONTAINING_RECORD(iface, AudioMediaStreamImpl, IAudioMediaStream_iface); +} + +/*** IUnknown methods ***/ +static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_QueryInterface(IAudioMediaStream *iface, + REFIID riid, void **ret_iface) +{ + AudioMediaStreamImpl *This = impl_from_IAudioMediaStream(iface); + + TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ret_iface); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_IMediaStream) || + IsEqualGUID(riid, &IID_IAudioMediaStream)) + { + IAudioMediaStream_AddRef(iface); + *ret_iface = iface; + return S_OK; + } + else if (IsEqualGUID(riid, &IID_IAMMediaStream)) + { + IAudioMediaStream_AddRef(iface); + *ret_iface = &This->IAMMediaStream_iface; + return S_OK; + } + + + *ret_iface = NULL; + + ERR("(%p/%p)->(%s,%p),not found\n", iface, This, debugstr_guid(riid), ret_iface); + return E_NOINTERFACE; +} + +static ULONG WINAPI AudioMediaStreamImpl_IAudioMediaStream_AddRef(IAudioMediaStream *iface) +{ + AudioMediaStreamImpl *This = impl_from_IAudioMediaStream(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p/%p): new ref = %u\n", iface, This, ref); + + return ref; +} + +static ULONG WINAPI AudioMediaStreamImpl_IAudioMediaStream_Release(IAudioMediaStream *iface) +{ + AudioMediaStreamImpl *This = impl_from_IAudioMediaStream(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p/%p): new ref = %u\n", iface, This, ref); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +/*** IMediaStream methods ***/ +static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_GetMultiMediaStream(IAudioMediaStream *iface, + IMultiMediaStream** multimedia_stream) +{ + AudioMediaStreamImpl *This = impl_from_IAudioMediaStream(iface); + + FIXME("(%p/%p)->(%p) stub!\n", iface, This, multimedia_stream); + + return S_FALSE; +} + +static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_GetInformation(IAudioMediaStream *iface, + MSPID *purpose_id, STREAM_TYPE *type) +{ + AudioMediaStreamImpl *This = impl_from_IAudioMediaStream(iface); + + TRACE("(%p/%p)->(%p,%p)\n", iface, This, purpose_id, type); + + if (purpose_id) + *purpose_id = This->purpose_id; + if (type) + *type = This->stream_type; + + return S_OK; +} + +static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_SetSameFormat(IAudioMediaStream *iface, + IMediaStream *stream_format, DWORD flags) +{ + AudioMediaStreamImpl *This = impl_from_IAudioMediaStream(iface); + + FIXME("(%p/%p)->(%p,%x) stub!\n", iface, This, stream_format, flags); + + return S_FALSE; +} + +static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_AllocateSample(IAudioMediaStream *iface, + DWORD flags, IStreamSample **sample) +{ + AudioMediaStreamImpl *This = impl_from_IAudioMediaStream(iface); + + FIXME("(%p/%p)->(%x,%p) stub!\n", iface, This, flags, sample); + + return S_FALSE; +} + +static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_CreateSharedSample(IAudioMediaStream *iface, + IStreamSample *existing_sample, DWORD flags, IStreamSample **sample) +{ + AudioMediaStreamImpl *This = impl_from_IAudioMediaStream(iface); + + FIXME("(%p/%p)->(%p,%x,%p) stub!\n", iface, This, existing_sample, flags, sample); + + return S_FALSE; +} + +static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_SendEndOfStream(IAudioMediaStream *iface, + DWORD flags) +{ + AudioMediaStreamImpl *This = impl_from_IAudioMediaStream(iface); + + FIXME("(%p/%p)->(%x) stub!\n", iface, This, flags); + + return S_FALSE; +} + +/*** IAudioMediaStream methods ***/ +static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_GetFormat(IAudioMediaStream *iface, WAVEFORMATEX *wave_format_current) +{ + AudioMediaStreamImpl *This = impl_from_IAudioMediaStream(iface); + + FIXME("(%p/%p)->(%p) stub!\n", iface, This, wave_format_current); + + if (!wave_format_current) + return E_POINTER; + + return MS_E_NOSTREAM; + +} + +static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_SetFormat(IAudioMediaStream *iface, const WAVEFORMATEX *wave_format) +{ + AudioMediaStreamImpl *This = impl_from_IAudioMediaStream(iface); + + FIXME("(%p/%p)->(%p) stub!\n", iface, This, wave_format); + + return E_NOTIMPL; +} + +static HRESULT WINAPI AudioMediaStreamImpl_IAudioMediaStream_CreateSample(IAudioMediaStream *iface, IAudioData *audio_data, + DWORD flags, IAudioStreamSample **sample) +{ + AudioMediaStreamImpl *This = impl_from_IAudioMediaStream(iface); + + TRACE("(%p/%p)->(%p,%u,%p)\n", iface, This, audio_data, flags, sample); + + if (!audio_data) + return E_POINTER; + + return audiostreamsample_create(iface, audio_data, sample); +} + +static const struct IAudioMediaStreamVtbl AudioMediaStreamImpl_IAudioMediaStream_Vtbl = +{ + /*** IUnknown methods ***/ + AudioMediaStreamImpl_IAudioMediaStream_QueryInterface, + AudioMediaStreamImpl_IAudioMediaStream_AddRef, + AudioMediaStreamImpl_IAudioMediaStream_Release, + /*** IMediaStream methods ***/ + AudioMediaStreamImpl_IAudioMediaStream_GetMultiMediaStream, + AudioMediaStreamImpl_IAudioMediaStream_GetInformation, + AudioMediaStreamImpl_IAudioMediaStream_SetSameFormat, + AudioMediaStreamImpl_IAudioMediaStream_AllocateSample, + AudioMediaStreamImpl_IAudioMediaStream_CreateSharedSample, + AudioMediaStreamImpl_IAudioMediaStream_SendEndOfStream, + /*** IAudioMediaStream methods ***/ + AudioMediaStreamImpl_IAudioMediaStream_GetFormat, + AudioMediaStreamImpl_IAudioMediaStream_SetFormat, + AudioMediaStreamImpl_IAudioMediaStream_CreateSample +}; + +HRESULT audiomediastream_create(IMultiMediaStream *parent, const MSPID *purpose_id, + STREAM_TYPE stream_type, IMediaStream **media_stream) +{ + AudioMediaStreamImpl *object; + + TRACE("(%p,%s,%p)\n", parent, debugstr_guid(purpose_id), media_stream); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(AudioMediaStreamImpl)); + if (!object) + return E_OUTOFMEMORY; + + object->IAMMediaStream_iface.lpVtbl = &AudioMediaStreamImpl_IAMMediaStream_Vtbl; + object->IAudioMediaStream_iface.lpVtbl = &AudioMediaStreamImpl_IAudioMediaStream_Vtbl; + object->ref = 1; + + object->parent = parent; + object->purpose_id = *purpose_id; + object->stream_type = stream_type; + + *media_stream = (IMediaStream*)&object->IAMMediaStream_iface; + + return S_OK; +} + +typedef struct { + IDirectDrawStreamSample IDirectDrawStreamSample_iface; + LONG ref; + IMediaStream *parent; +} IDirectDrawStreamSampleImpl; + +static inline IDirectDrawStreamSampleImpl *impl_from_IDirectDrawStreamSample(IDirectDrawStreamSample *iface) +{ + return CONTAINING_RECORD(iface, IDirectDrawStreamSampleImpl, IDirectDrawStreamSample_iface); +} + +/*** IUnknown methods ***/ +static HRESULT WINAPI IDirectDrawStreamSampleImpl_QueryInterface(IDirectDrawStreamSample *iface, + REFIID riid, void **ret_iface) +{ + TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid(riid), ret_iface); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_IStreamSample) || + IsEqualGUID(riid, &IID_IDirectDrawStreamSample)) + { + IDirectDrawStreamSample_AddRef(iface); + *ret_iface = iface; + return S_OK; + } + + *ret_iface = NULL; + + ERR("(%p)->(%s,%p),not found\n", iface, debugstr_guid(riid), ret_iface); + return E_NOINTERFACE; +} + +static ULONG WINAPI IDirectDrawStreamSampleImpl_AddRef(IDirectDrawStreamSample *iface) +{ + IDirectDrawStreamSampleImpl *This = impl_from_IDirectDrawStreamSample(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p)->(): new ref = %u\n", iface, ref); + + return ref; +} + +static ULONG WINAPI IDirectDrawStreamSampleImpl_Release(IDirectDrawStreamSample *iface) +{ + IDirectDrawStreamSampleImpl *This = impl_from_IDirectDrawStreamSample(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(): new ref = %u\n", iface, ref); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +/*** IStreamSample methods ***/ +static HRESULT WINAPI IDirectDrawStreamSampleImpl_GetMediaStream(IDirectDrawStreamSample *iface, IMediaStream **media_stream) +{ + FIXME("(%p)->(%p): stub\n", iface, media_stream); + + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectDrawStreamSampleImpl_GetSampleTimes(IDirectDrawStreamSample *iface, STREAM_TIME *start_time, + STREAM_TIME *end_time, STREAM_TIME *current_time) +{ + FIXME("(%p)->(%p,%p,%p): stub\n", iface, start_time, end_time, current_time); + + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectDrawStreamSampleImpl_SetSampleTimes(IDirectDrawStreamSample *iface, const STREAM_TIME *start_time, + const STREAM_TIME *end_time) +{ + FIXME("(%p)->(%p,%p): stub\n", iface, start_time, end_time); + + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectDrawStreamSampleImpl_Update(IDirectDrawStreamSample *iface, DWORD flags, HANDLE event, + PAPCFUNC func_APC, DWORD APC_data) +{ + FIXME("(%p)->(%x,%p,%p,%u): stub\n", iface, flags, event, func_APC, APC_data); + + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectDrawStreamSampleImpl_CompletionStatus(IDirectDrawStreamSample *iface, DWORD flags, DWORD milliseconds) +{ + FIXME("(%p)->(%x,%u): stub\n", iface, flags, milliseconds); + + return E_NOTIMPL; +} + +/*** IDirectDrawStreamSample methods ***/ +static HRESULT WINAPI IDirectDrawStreamSampleImpl_GetSurface(IDirectDrawStreamSample *iface, IDirectDrawSurface **ddraw_surface, + RECT *rect) +{ + FIXME("(%p)->(%p,%p): stub\n", iface, ddraw_surface, rect); + + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectDrawStreamSampleImpl_SetRect(IDirectDrawStreamSample *iface, const RECT *rect) +{ + FIXME("(%p)->(%p): stub\n", iface, rect); + + return E_NOTIMPL; +} + +static const struct IDirectDrawStreamSampleVtbl DirectDrawStreamSample_Vtbl = +{ + /*** IUnknown methods ***/ + IDirectDrawStreamSampleImpl_QueryInterface, + IDirectDrawStreamSampleImpl_AddRef, + IDirectDrawStreamSampleImpl_Release, + /*** IStreamSample methods ***/ + IDirectDrawStreamSampleImpl_GetMediaStream, + IDirectDrawStreamSampleImpl_GetSampleTimes, + IDirectDrawStreamSampleImpl_SetSampleTimes, + IDirectDrawStreamSampleImpl_Update, + IDirectDrawStreamSampleImpl_CompletionStatus, + /*** IDirectDrawStreamSample methods ***/ + IDirectDrawStreamSampleImpl_GetSurface, + IDirectDrawStreamSampleImpl_SetRect +}; + +static HRESULT ddrawstreamsample_create(IDirectDrawMediaStream *parent, IDirectDrawStreamSample **ddraw_stream_sample) +{ + IDirectDrawStreamSampleImpl *object; + + TRACE("(%p)\n", ddraw_stream_sample); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectDrawStreamSampleImpl)); + if (!object) + return E_OUTOFMEMORY; + + object->IDirectDrawStreamSample_iface.lpVtbl = &DirectDrawStreamSample_Vtbl; + object->ref = 1; + object->parent = (IMediaStream*)parent; + + *ddraw_stream_sample = (IDirectDrawStreamSample*)&object->IDirectDrawStreamSample_iface; + + return S_OK; +} + +typedef struct { + IAudioStreamSample IAudioStreamSample_iface; + LONG ref; + IMediaStream *parent; + IAudioData *audio_data; +} IAudioStreamSampleImpl; + +static inline IAudioStreamSampleImpl *impl_from_IAudioStreamSample(IAudioStreamSample *iface) +{ + return CONTAINING_RECORD(iface, IAudioStreamSampleImpl, IAudioStreamSample_iface); +} + +/*** IUnknown methods ***/ +static HRESULT WINAPI IAudioStreamSampleImpl_QueryInterface(IAudioStreamSample *iface, + REFIID riid, void **ret_iface) +{ + TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid(riid), ret_iface); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_IStreamSample) || + IsEqualGUID(riid, &IID_IAudioStreamSample)) + { + IAudioStreamSample_AddRef(iface); + *ret_iface = iface; + return S_OK; + } + + *ret_iface = NULL; + + ERR("(%p)->(%s,%p),not found\n", iface, debugstr_guid(riid), ret_iface); + return E_NOINTERFACE; +} + +static ULONG WINAPI IAudioStreamSampleImpl_AddRef(IAudioStreamSample *iface) +{ + IAudioStreamSampleImpl *This = impl_from_IAudioStreamSample(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p)->(): new ref = %u\n", iface, ref); + + return ref; +} + +static ULONG WINAPI IAudioStreamSampleImpl_Release(IAudioStreamSample *iface) +{ + IAudioStreamSampleImpl *This = impl_from_IAudioStreamSample(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(): new ref = %u\n", iface, ref); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +/*** IStreamSample methods ***/ +static HRESULT WINAPI IAudioStreamSampleImpl_GetMediaStream(IAudioStreamSample *iface, IMediaStream **media_stream) +{ + FIXME("(%p)->(%p): stub\n", iface, media_stream); + + return E_NOTIMPL; +} + +static HRESULT WINAPI IAudioStreamSampleImpl_GetSampleTimes(IAudioStreamSample *iface, STREAM_TIME *start_time, + STREAM_TIME *end_time, STREAM_TIME *current_time) +{ + FIXME("(%p)->(%p,%p,%p): stub\n", iface, start_time, end_time, current_time); + + return E_NOTIMPL; +} + +static HRESULT WINAPI IAudioStreamSampleImpl_SetSampleTimes(IAudioStreamSample *iface, const STREAM_TIME *start_time, + const STREAM_TIME *end_time) +{ + FIXME("(%p)->(%p,%p): stub\n", iface, start_time, end_time); + + return E_NOTIMPL; +} + +static HRESULT WINAPI IAudioStreamSampleImpl_Update(IAudioStreamSample *iface, DWORD flags, HANDLE event, + PAPCFUNC func_APC, DWORD APC_data) +{ + FIXME("(%p)->(%x,%p,%p,%u): stub\n", iface, flags, event, func_APC, APC_data); + + return E_NOTIMPL; +} + +static HRESULT WINAPI IAudioStreamSampleImpl_CompletionStatus(IAudioStreamSample *iface, DWORD flags, DWORD milliseconds) +{ + FIXME("(%p)->(%x,%u): stub\n", iface, flags, milliseconds); + + return E_NOTIMPL; +} + +/*** IAudioStreamSample methods ***/ +static HRESULT WINAPI IAudioStreamSampleImpl_GetAudioData(IAudioStreamSample *iface, IAudioData **audio_data) +{ + FIXME("(%p)->(%p): stub\n", iface, audio_data); + + return E_NOTIMPL; +} + +static const struct IAudioStreamSampleVtbl AudioStreamSample_Vtbl = +{ + /*** IUnknown methods ***/ + IAudioStreamSampleImpl_QueryInterface, + IAudioStreamSampleImpl_AddRef, + IAudioStreamSampleImpl_Release, + /*** IStreamSample methods ***/ + IAudioStreamSampleImpl_GetMediaStream, + IAudioStreamSampleImpl_GetSampleTimes, + IAudioStreamSampleImpl_SetSampleTimes, + IAudioStreamSampleImpl_Update, + IAudioStreamSampleImpl_CompletionStatus, + /*** IAudioStreamSample methods ***/ + IAudioStreamSampleImpl_GetAudioData +}; + +static HRESULT audiostreamsample_create(IAudioMediaStream *parent, IAudioData *audio_data, IAudioStreamSample **audio_stream_sample) +{ + IAudioStreamSampleImpl *object; + + TRACE("(%p)\n", audio_stream_sample); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IAudioStreamSampleImpl)); + if (!object) + return E_OUTOFMEMORY; + + object->IAudioStreamSample_iface.lpVtbl = &AudioStreamSample_Vtbl; + object->ref = 1; + object->parent = (IMediaStream*)parent; + object->audio_data = audio_data; + + *audio_stream_sample = (IAudioStreamSample*)&object->IAudioStreamSample_iface; + + return S_OK; +} diff --git a/dll/directx/wine/amstream/mediastreamfilter.c b/dll/directx/wine/amstream/mediastreamfilter.c new file mode 100644 index 00000000000..8e89488638d --- /dev/null +++ b/dll/directx/wine/amstream/mediastreamfilter.c @@ -0,0 +1,526 @@ +/* + * Implementation of MediaStream Filter + * + * Copyright 2008, 2012 Christian Costa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +#define COBJMACROS + +//#include "winbase.h" +//#include "wingdi.h" +#include + +#include + +//#include "amstream_private.h" +#include + +//#include "ddstream.h" + +WINE_DEFAULT_DEBUG_CHANNEL(amstream); + +typedef struct MediaStreamFilter_InputPin +{ + BaseInputPin pin; +} MediaStreamFilter_InputPin; + +static const IPinVtbl MediaStreamFilter_InputPin_Vtbl = +{ + BaseInputPinImpl_QueryInterface, + BasePinImpl_AddRef, + BaseInputPinImpl_Release, + BaseInputPinImpl_Connect, + BaseInputPinImpl_ReceiveConnection, + BasePinImpl_Disconnect, + BasePinImpl_ConnectedTo, + BasePinImpl_ConnectionMediaType, + BasePinImpl_QueryPinInfo, + BasePinImpl_QueryDirection, + BasePinImpl_QueryId, + BasePinImpl_QueryAccept, + BasePinImpl_EnumMediaTypes, + BasePinImpl_QueryInternalConnections, + BaseInputPinImpl_EndOfStream, + BaseInputPinImpl_BeginFlush, + BaseInputPinImpl_EndFlush, + BasePinImpl_NewSegment +}; + +typedef struct { + BaseFilter filter; + ULONG nb_streams; + IMediaStream** streams; + IPin** pins; +} IMediaStreamFilterImpl; + +static inline IMediaStreamFilterImpl *impl_from_IMediaStreamFilter(IMediaStreamFilter *iface) +{ + return CONTAINING_RECORD(iface, IMediaStreamFilterImpl, filter); +} + +static HRESULT WINAPI BasePinImpl_CheckMediaType(BasePin *This, const AM_MEDIA_TYPE *pmt) +{ + IMediaStreamFilterImpl *filter = impl_from_IMediaStreamFilter((IMediaStreamFilter*)This->pinInfo.pFilter); + MSPID purpose_id; + ULONG i; + + TRACE("Checking media type %s - %s\n", debugstr_guid(&pmt->majortype), debugstr_guid(&pmt->subtype)); + + /* Find which stream is associated with the pin */ + for (i = 0; i < filter->nb_streams; i++) + if (&This->IPin_iface == filter->pins[i]) + break; + + if (i == filter->nb_streams) + return S_FALSE; + + if (FAILED(IMediaStream_GetInformation(filter->streams[i], &purpose_id, NULL))) + return S_FALSE; + + TRACE("Checking stream with purpose id %s\n", debugstr_guid(&purpose_id)); + + if (IsEqualGUID(&purpose_id, &MSPID_PrimaryVideo) && IsEqualGUID(&pmt->majortype, &MEDIATYPE_Video)) + { + if (IsEqualGUID(&pmt->subtype, &MEDIASUBTYPE_RGB1) || + IsEqualGUID(&pmt->subtype, &MEDIASUBTYPE_RGB4) || + IsEqualGUID(&pmt->subtype, &MEDIASUBTYPE_RGB8) || + IsEqualGUID(&pmt->subtype, &MEDIASUBTYPE_RGB565) || + IsEqualGUID(&pmt->subtype, &MEDIASUBTYPE_RGB555) || + IsEqualGUID(&pmt->subtype, &MEDIASUBTYPE_RGB24) || + IsEqualGUID(&pmt->subtype, &MEDIASUBTYPE_RGB32)) + { + TRACE("Video sub-type %s matches\n", debugstr_guid(&pmt->subtype)); + return S_OK; + } + } + else if (IsEqualGUID(&purpose_id, &MSPID_PrimaryAudio) && IsEqualGUID(&pmt->majortype, &MEDIATYPE_Audio)) + { + if (IsEqualGUID(&pmt->subtype, &MEDIASUBTYPE_PCM)) + { + TRACE("Audio sub-type %s matches\n", debugstr_guid(&pmt->subtype)); + return S_OK; + } + } + + return S_FALSE; +} + +static LONG WINAPI BasePinImp_GetMediaTypeVersion(BasePin *This) +{ + return 0; +} + +static HRESULT WINAPI BasePinImp_GetMediaType(BasePin *This, int index, AM_MEDIA_TYPE *amt) +{ + IMediaStreamFilterImpl *filter = (IMediaStreamFilterImpl*)This->pinInfo.pFilter; + MSPID purpose_id; + ULONG i; + + /* FIXME: Reset structure as we only fill majortype and minortype for now */ + ZeroMemory(amt, sizeof(*amt)); + + /* Find which stream is associated with the pin */ + for (i = 0; i < filter->nb_streams; i++) + if (&This->IPin_iface == filter->pins[i]) + break; + + if (i == filter->nb_streams) + return S_FALSE; + + if (FAILED(IMediaStream_GetInformation(filter->streams[i], &purpose_id, NULL))) + return S_FALSE; + + TRACE("Processing stream with purpose id %s\n", debugstr_guid(&purpose_id)); + + if (IsEqualGUID(&purpose_id, &MSPID_PrimaryVideo)) + { + amt->majortype = MEDIATYPE_Video; + + switch (index) + { + case 0: + amt->subtype = MEDIASUBTYPE_RGB1; + break; + case 1: + amt->subtype = MEDIASUBTYPE_RGB4; + break; + case 2: + amt->subtype = MEDIASUBTYPE_RGB8; + break; + case 3: + amt->subtype = MEDIASUBTYPE_RGB565; + break; + case 4: + amt->subtype = MEDIASUBTYPE_RGB555; + break; + case 5: + amt->subtype = MEDIASUBTYPE_RGB24; + break; + case 6: + amt->subtype = MEDIASUBTYPE_RGB32; + break; + default: + return S_FALSE; + } + } + else if (IsEqualGUID(&purpose_id, &MSPID_PrimaryAudio)) + { + if (index) + return S_FALSE; + + amt->majortype = MEDIATYPE_Audio; + amt->subtype = MEDIASUBTYPE_PCM; + } + + return S_OK; +} + +static const BasePinFuncTable input_BaseFuncTable = { + BasePinImpl_CheckMediaType, + NULL, + BasePinImp_GetMediaTypeVersion, + BasePinImp_GetMediaType +}; + +static const BaseInputPinFuncTable input_BaseInputFuncTable = { + NULL +}; + +/*** IUnknown methods ***/ + +static HRESULT WINAPI MediaStreamFilterImpl_QueryInterface(IMediaStreamFilter *iface, REFIID riid, void **ret_iface) +{ + TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ret_iface); + + *ret_iface = NULL; + + if (IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IPersist) || + IsEqualIID(riid, &IID_IMediaFilter) || + IsEqualIID(riid, &IID_IBaseFilter) || + IsEqualIID(riid, &IID_IMediaStreamFilter)) + *ret_iface = iface; + + if (*ret_iface) + { + IMediaStreamFilter_AddRef(*ret_iface); + return S_OK; + } + + return E_NOINTERFACE; +} + +static ULONG WINAPI MediaStreamFilterImpl_AddRef(IMediaStreamFilter *iface) +{ + IMediaStreamFilterImpl *This = impl_from_IMediaStreamFilter(iface); + ULONG ref = BaseFilterImpl_AddRef(&This->filter.IBaseFilter_iface); + + TRACE("(%p)->(): new ref = %u\n", iface, ref); + + return ref; +} + +static ULONG WINAPI MediaStreamFilterImpl_Release(IMediaStreamFilter *iface) +{ + IMediaStreamFilterImpl *This = impl_from_IMediaStreamFilter(iface); + ULONG ref = BaseFilterImpl_Release(&This->filter.IBaseFilter_iface); + + TRACE("(%p)->(): new ref = %u\n", iface, ref); + + if (!ref) + { + ULONG i; + for (i = 0; i < This->nb_streams; i++) + { + IMediaStream_Release(This->streams[i]); + IPin_Release(This->pins[i]); + } + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + +/*** IPersist methods ***/ + +static HRESULT WINAPI MediaStreamFilterImpl_GetClassID(IMediaStreamFilter *iface, CLSID *clsid) +{ + IMediaStreamFilterImpl *This = impl_from_IMediaStreamFilter(iface); + return BaseFilterImpl_GetClassID(&This->filter.IBaseFilter_iface, clsid); +} + +/*** IBaseFilter methods ***/ + +static HRESULT WINAPI MediaStreamFilterImpl_Stop(IMediaStreamFilter *iface) +{ + FIXME("(%p)->(): Stub!\n", iface); + + return E_NOTIMPL; +} + +static HRESULT WINAPI MediaStreamFilterImpl_Pause(IMediaStreamFilter *iface) +{ + FIXME("(%p)->(): Stub!\n", iface); + + return E_NOTIMPL; +} + +static HRESULT WINAPI MediaStreamFilterImpl_Run(IMediaStreamFilter *iface, REFERENCE_TIME start) +{ + FIXME("(%p)->(%s): Stub!\n", iface, wine_dbgstr_longlong(start)); + + return E_NOTIMPL; +} + +static HRESULT WINAPI MediaStreamFilterImpl_GetState(IMediaStreamFilter *iface, DWORD ms_timeout, FILTER_STATE *state) +{ + IMediaStreamFilterImpl *This = impl_from_IMediaStreamFilter(iface); + return BaseFilterImpl_GetState(&This->filter.IBaseFilter_iface, ms_timeout, state); +} + +static HRESULT WINAPI MediaStreamFilterImpl_SetSyncSource(IMediaStreamFilter *iface, IReferenceClock *clock) +{ + IMediaStreamFilterImpl *This = impl_from_IMediaStreamFilter(iface); + return BaseFilterImpl_SetSyncSource(&This->filter.IBaseFilter_iface, clock); +} + +static HRESULT WINAPI MediaStreamFilterImpl_GetSyncSource(IMediaStreamFilter *iface, IReferenceClock **clock) +{ + IMediaStreamFilterImpl *This = impl_from_IMediaStreamFilter(iface); + return BaseFilterImpl_GetSyncSource(&This->filter.IBaseFilter_iface, clock); +} + +static HRESULT WINAPI MediaStreamFilterImpl_EnumPins(IMediaStreamFilter *iface, IEnumPins **enum_pins) +{ + IMediaStreamFilterImpl *This = impl_from_IMediaStreamFilter(iface); + return BaseFilterImpl_EnumPins(&This->filter.IBaseFilter_iface, enum_pins); +} + +static HRESULT WINAPI MediaStreamFilterImpl_FindPin(IMediaStreamFilter *iface, LPCWSTR id, IPin **pin) +{ + FIXME("(%p)->(%s,%p): Stub!\n", iface, debugstr_w(id), pin); + + return E_NOTIMPL; +} + +static HRESULT WINAPI MediaStreamFilterImpl_QueryFilterInfo(IMediaStreamFilter *iface, FILTER_INFO *info) +{ + IMediaStreamFilterImpl *This = impl_from_IMediaStreamFilter(iface); + return BaseFilterImpl_QueryFilterInfo(&This->filter.IBaseFilter_iface, info); +} + +static HRESULT WINAPI MediaStreamFilterImpl_JoinFilterGraph(IMediaStreamFilter *iface, IFilterGraph *graph, LPCWSTR name) +{ + IMediaStreamFilterImpl *This = impl_from_IMediaStreamFilter(iface); + return BaseFilterImpl_JoinFilterGraph(&This->filter.IBaseFilter_iface, graph, name); +} + +static HRESULT WINAPI MediaStreamFilterImpl_QueryVendorInfo(IMediaStreamFilter *iface, LPWSTR *vendor_info) +{ + IMediaStreamFilterImpl *This = impl_from_IMediaStreamFilter(iface); + return BaseFilterImpl_QueryVendorInfo(&This->filter.IBaseFilter_iface, vendor_info); +} + +/*** IMediaStreamFilter methods ***/ + +static HRESULT WINAPI MediaStreamFilterImpl_AddMediaStream(IMediaStreamFilter* iface, IAMMediaStream *pAMMediaStream) +{ + IMediaStreamFilterImpl *This = impl_from_IMediaStreamFilter(iface); + IMediaStream** streams; + IPin** pins; + MediaStreamFilter_InputPin* pin; + HRESULT hr; + PIN_INFO info; + MSPID purpose_id; + + TRACE("(%p)->(%p)\n", iface, pAMMediaStream); + + streams = CoTaskMemRealloc(This->streams, (This->nb_streams + 1) * sizeof(IMediaStream*)); + if (!streams) + return E_OUTOFMEMORY; + This->streams = streams; + pins = CoTaskMemRealloc(This->pins, (This->nb_streams + 1) * sizeof(IPin*)); + if (!pins) + return E_OUTOFMEMORY; + This->pins = pins; + info.pFilter = (IBaseFilter*)&This->filter; + info.dir = PINDIR_INPUT; + hr = IAMMediaStream_GetInformation(pAMMediaStream, &purpose_id, NULL); + if (FAILED(hr)) + return hr; + /* Pin name is "I{guid MSPID_PrimaryVideo or MSPID_PrimaryAudio}" */ + info.achName[0] = 'I'; + StringFromGUID2(&purpose_id, info.achName + 1, 40); + hr = BaseInputPin_Construct(&MediaStreamFilter_InputPin_Vtbl, &info, &input_BaseFuncTable, &input_BaseInputFuncTable, &This->filter.csFilter, NULL, &This->pins[This->nb_streams]); + if (FAILED(hr)) + return hr; + + pin = (MediaStreamFilter_InputPin*)This->pins[This->nb_streams]; + pin->pin.pin.pinInfo.pFilter = (LPVOID)This; + This->streams[This->nb_streams] = (IMediaStream*)pAMMediaStream; + This->nb_streams++; + + IMediaStream_AddRef((IMediaStream*)pAMMediaStream); + + return S_OK; +} + +static HRESULT WINAPI MediaStreamFilterImpl_GetMediaStream(IMediaStreamFilter* iface, REFMSPID idPurpose, IMediaStream **ppMediaStream) +{ + IMediaStreamFilterImpl *This = impl_from_IMediaStreamFilter(iface); + MSPID purpose_id; + unsigned int i; + + TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid(idPurpose), ppMediaStream); + + for (i = 0; i < This->nb_streams; i++) + { + IMediaStream_GetInformation(This->streams[i], &purpose_id, NULL); + if (IsEqualIID(&purpose_id, idPurpose)) + { + *ppMediaStream = This->streams[i]; + IMediaStream_AddRef(*ppMediaStream); + return S_OK; + } + } + + return MS_E_NOSTREAM; +} + +static HRESULT WINAPI MediaStreamFilterImpl_EnumMediaStreams(IMediaStreamFilter* iface, LONG Index, IMediaStream **ppMediaStream) +{ + FIXME("(%p)->(%d,%p): Stub!\n", iface, Index, ppMediaStream); + + return E_NOTIMPL; +} + +static HRESULT WINAPI MediaStreamFilterImpl_SupportSeeking(IMediaStreamFilter* iface, BOOL bRenderer) +{ + FIXME("(%p)->(%d): Stub!\n", iface, bRenderer); + + return E_NOTIMPL; +} + +static HRESULT WINAPI MediaStreamFilterImpl_ReferenceTimeToStreamTime(IMediaStreamFilter* iface, REFERENCE_TIME *pTime) +{ + FIXME("(%p)->(%p): Stub!\n", iface, pTime); + + return E_NOTIMPL; +} + +static HRESULT WINAPI MediaStreamFilterImpl_GetCurrentStreamTime(IMediaStreamFilter* iface, REFERENCE_TIME *pCurrentStreamTime) +{ + FIXME("(%p)->(%p): Stub!\n", iface, pCurrentStreamTime); + + return E_NOTIMPL; +} + +static HRESULT WINAPI MediaStreamFilterImpl_WaitUntil(IMediaStreamFilter* iface, REFERENCE_TIME WaitStreamTime) +{ + FIXME("(%p)->(%s): Stub!\n", iface, wine_dbgstr_longlong(WaitStreamTime)); + + return E_NOTIMPL; +} + +static HRESULT WINAPI MediaStreamFilterImpl_Flush(IMediaStreamFilter* iface, BOOL bCancelEOS) +{ + FIXME("(%p)->(%d): Stub!\n", iface, bCancelEOS); + + return E_NOTIMPL; +} + +static HRESULT WINAPI MediaStreamFilterImpl_EndOfStream(IMediaStreamFilter* iface) +{ + FIXME("(%p)->(): Stub!\n", iface); + + return E_NOTIMPL; +} + +static const IMediaStreamFilterVtbl MediaStreamFilter_Vtbl = +{ + MediaStreamFilterImpl_QueryInterface, + MediaStreamFilterImpl_AddRef, + MediaStreamFilterImpl_Release, + MediaStreamFilterImpl_GetClassID, + MediaStreamFilterImpl_Stop, + MediaStreamFilterImpl_Pause, + MediaStreamFilterImpl_Run, + MediaStreamFilterImpl_GetState, + MediaStreamFilterImpl_SetSyncSource, + MediaStreamFilterImpl_GetSyncSource, + MediaStreamFilterImpl_EnumPins, + MediaStreamFilterImpl_FindPin, + MediaStreamFilterImpl_QueryFilterInfo, + MediaStreamFilterImpl_JoinFilterGraph, + MediaStreamFilterImpl_QueryVendorInfo, + MediaStreamFilterImpl_AddMediaStream, + MediaStreamFilterImpl_GetMediaStream, + MediaStreamFilterImpl_EnumMediaStreams, + MediaStreamFilterImpl_SupportSeeking, + MediaStreamFilterImpl_ReferenceTimeToStreamTime, + MediaStreamFilterImpl_GetCurrentStreamTime, + MediaStreamFilterImpl_WaitUntil, + MediaStreamFilterImpl_Flush, + MediaStreamFilterImpl_EndOfStream +}; + +static IPin* WINAPI MediaStreamFilterImpl_GetPin(BaseFilter *iface, int pos) +{ + IMediaStreamFilterImpl* This = (IMediaStreamFilterImpl*)iface; + + if (pos < This->nb_streams) + { + IPin_AddRef(This->pins[pos]); + return This->pins[pos]; + } + + return NULL; +} + +static LONG WINAPI MediaStreamFilterImpl_GetPinCount(BaseFilter *iface) +{ + IMediaStreamFilterImpl* This = (IMediaStreamFilterImpl*)iface; + + return This->nb_streams; +} + +static const BaseFilterFuncTable BaseFuncTable = { + MediaStreamFilterImpl_GetPin, + MediaStreamFilterImpl_GetPinCount +}; + +HRESULT MediaStreamFilter_create(IUnknown *pUnkOuter, void **ppObj) +{ + IMediaStreamFilterImpl* object; + + TRACE("(%p,%p)\n", pUnkOuter, ppObj); + + if( pUnkOuter ) + return CLASS_E_NOAGGREGATION; + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IMediaStreamFilterImpl)); + if (!object) + return E_OUTOFMEMORY; + + BaseFilter_Init(&object->filter, (IBaseFilterVtbl*)&MediaStreamFilter_Vtbl, &CLSID_MediaStreamFilter, (DWORD_PTR)(__FILE__ ": MediaStreamFilterImpl.csFilter"), &BaseFuncTable); + + *ppObj = object; + + return S_OK; +} diff --git a/dll/directx/amstream/version.rc b/dll/directx/wine/amstream/version.rc similarity index 93% rename from dll/directx/amstream/version.rc rename to dll/directx/wine/amstream/version.rc index 7d46313d5ad..3a5bb760365 100644 --- a/dll/directx/amstream/version.rc +++ b/dll/directx/wine/amstream/version.rc @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -1 WINE_REGISTRY amstream.rgs +1 WINE_REGISTRY amstream_classes.rgs #define WINE_FILEDESCRIPTION_STR "Wine AMStream dll" #define WINE_FILENAME_STR "amstream.dll" @@ -25,4 +25,4 @@ #define WINE_PRODUCTVERSION 6,5,1,900 #define WINE_PRODUCTVERSION_STR "6.5" -#include "wine/wine_common_ver.rc" +#include diff --git a/dll/directx/wine/d3d8/CMakeLists.txt b/dll/directx/wine/d3d8/CMakeLists.txt index a54b23a06d3..2dc5cf93822 100644 --- a/dll/directx/wine/d3d8/CMakeLists.txt +++ b/dll/directx/wine/d3d8/CMakeLists.txt @@ -23,17 +23,7 @@ list(APPEND SOURCE add_library(d3d8 SHARED ${SOURCE}) set_module_type(d3d8 win32dll UNICODE) -target_link_libraries(d3d8 uuid wine) - -add_importlibs(d3d8 - user32 - gdi32 - advapi32 - wined3d - msvcrt - kernel32 - ntdll) - -add_dependencies(d3d8 wineheaders) +target_link_libraries(d3d8 wine) +add_importlibs(d3d8 wined3d msvcrt kernel32 ntdll) add_pch(d3d8 d3d8_private.h) add_cd_file(TARGET d3d8 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3d8/d3d8_private.h b/dll/directx/wine/d3d8/d3d8_private.h index 94482cc8720..4820b2bfacf 100644 --- a/dll/directx/wine/d3d8/d3d8_private.h +++ b/dll/directx/wine/d3d8/d3d8_private.h @@ -188,7 +188,8 @@ struct d3d8_volume }; HRESULT volume_init(struct d3d8_volume *volume, struct d3d8_device *device, UINT width, UINT height, - UINT depth, DWORD usage, enum wined3d_format_id format, enum wined3d_pool pool) DECLSPEC_HIDDEN; + UINT depth, UINT level, DWORD usage, enum wined3d_format_id format, + enum wined3d_pool pool) DECLSPEC_HIDDEN; struct d3d8_swapchain { @@ -216,8 +217,8 @@ struct d3d8_surface }; HRESULT surface_init(struct d3d8_surface *surface, struct d3d8_device *device, UINT width, UINT height, - D3DFORMAT format, BOOL lockable, BOOL discard, DWORD usage, D3DPOOL pool, - D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality) DECLSPEC_HIDDEN; + D3DFORMAT format, DWORD flags, DWORD usage, D3DPOOL pool, D3DMULTISAMPLE_TYPE multisample_type, + DWORD multisample_quality) DECLSPEC_HIDDEN; struct d3d8_surface *unsafe_impl_from_IDirect3DSurface8(IDirect3DSurface8 *iface) DECLSPEC_HIDDEN; struct d3d8_vertexbuffer diff --git a/dll/directx/wine/d3d8/device.c b/dll/directx/wine/d3d8/device.c index 2996b5aa349..dbf1f7602e5 100644 --- a/dll/directx/wine/d3d8/device.c +++ b/dll/directx/wine/d3d8/device.c @@ -36,6 +36,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d8); +static void STDMETHODCALLTYPE d3d8_null_wined3d_object_destroyed(void *parent) {} + +static const struct wined3d_parent_ops d3d8_null_wined3d_parent_ops = +{ + d3d8_null_wined3d_object_destroyed, +}; + D3DFORMAT d3dformat_from_wined3dformat(enum wined3d_format_id format) { BYTE *c = (BYTE *)&format; @@ -571,6 +578,21 @@ static HRESULT CDECL reset_enum_callback(struct wined3d_resource *resource) { struct d3d8_surface *surface; + if (desc.resource_type == WINED3D_RTYPE_TEXTURE) + { + IUnknown *parent = wined3d_resource_get_parent(resource); + IDirect3DBaseTexture8 *texture; + + if (SUCCEEDED(IUnknown_QueryInterface(parent, &IID_IDirect3DBaseTexture8, (void **)&texture))) + { + IDirect3DBaseTexture8_Release(texture); + WARN("Texture %p (resource %p) in pool D3DPOOL_DEFAULT blocks the Reset call.\n", texture, resource); + return D3DERR_DEVICELOST; + } + + return D3D_OK; + } + if (desc.resource_type != WINED3D_RTYPE_SURFACE) { WARN("Resource %p in pool D3DPOOL_DEFAULT blocks the Reset call.\n", resource); @@ -853,33 +875,50 @@ static HRESULT WINAPI d3d8_device_CreateIndexBuffer(IDirect3DDevice8 *iface, UIN } static HRESULT d3d8_device_create_surface(struct d3d8_device *device, UINT width, UINT height, - D3DFORMAT format, BOOL lockable, BOOL discard, IDirect3DSurface8 **surface, UINT usage, - D3DPOOL pool, D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality) + D3DFORMAT format, DWORD flags, IDirect3DSurface8 **surface, UINT usage, D3DPOOL pool, + D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality) { - struct d3d8_surface *object; + struct wined3d_resource *sub_resource; + struct wined3d_resource_desc desc; + struct d3d8_surface *surface_impl; + struct wined3d_texture *texture; HRESULT hr; - TRACE("device %p, width %u, height %u, format %#x, lockable %#x, discard %#x, surface %p,\n" + TRACE("device %p, width %u, height %u, format %#x, flags %#x, surface %p,\n" "\tusage %#x, pool %#x, multisample_type %#x, multisample_quality %u.\n", - device, width, height, format, lockable, discard, surface, + device, width, height, format, flags, surface, usage, pool, multisample_type, multisample_quality); - if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)))) - { - FIXME("Failed to allocate surface memory.\n"); - return D3DERR_OUTOFVIDEOMEMORY; - } + desc.resource_type = WINED3D_RTYPE_TEXTURE; + desc.format = wined3dformat_from_d3dformat(format); + desc.multisample_type = multisample_type; + desc.multisample_quality = multisample_quality; + desc.usage = usage & WINED3DUSAGE_MASK; + desc.pool = pool; + desc.width = width; + desc.height = height; + desc.depth = 1; + desc.size = 0; - if (FAILED(hr = surface_init(object, device, width, height, format, lockable, - discard, usage, pool, multisample_type, multisample_quality))) + wined3d_mutex_lock(); + + if (FAILED(hr = wined3d_texture_create_2d(device->wined3d_device, &desc, + 1, flags, NULL, &d3d8_null_wined3d_parent_ops, &texture))) { - WARN("Failed to initialize surface, hr %#x.\n", hr); - HeapFree(GetProcessHeap(), 0, object); + wined3d_mutex_unlock(); + WARN("Failed to create texture, hr %#x.\n", hr); return hr; } - TRACE("Created surface %p.\n", object); - *surface = &object->IDirect3DSurface8_iface; + sub_resource = wined3d_texture_get_sub_resource(texture, 0); + surface_impl = wined3d_resource_get_parent(sub_resource); + surface_impl->forwardReference = NULL; + surface_impl->parent_device = &device->IDirect3DDevice8_iface; + *surface = &surface_impl->IDirect3DSurface8_iface; + IDirect3DSurface8_AddRef(*surface); + wined3d_texture_decref(texture); + + wined3d_mutex_unlock(); return D3D_OK; } @@ -889,12 +928,16 @@ static HRESULT WINAPI d3d8_device_CreateRenderTarget(IDirect3DDevice8 *iface, UI IDirect3DSurface8 **surface) { struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); + DWORD flags = 0; TRACE("iface %p, width %u, height %u, format %#x, multisample_type %#x, lockable %#x, surface %p.\n", iface, width, height, format, multisample_type, lockable, surface); - return d3d8_device_create_surface(device, width, height, format, lockable, FALSE, - surface, D3DUSAGE_RENDERTARGET, D3DPOOL_DEFAULT, multisample_type, 0); + if (lockable) + flags |= WINED3D_SURFACE_MAPPABLE; + + return d3d8_device_create_surface(device, width, height, format, flags, surface, + D3DUSAGE_RENDERTARGET, D3DPOOL_DEFAULT, multisample_type, 0); } static HRESULT WINAPI d3d8_device_CreateDepthStencilSurface(IDirect3DDevice8 *iface, @@ -907,7 +950,7 @@ static HRESULT WINAPI d3d8_device_CreateDepthStencilSurface(IDirect3DDevice8 *if iface, width, height, format, multisample_type, surface); /* TODO: Verify that Discard is false */ - return d3d8_device_create_surface(device, width, height, format, TRUE, FALSE, + return d3d8_device_create_surface(device, width, height, format, WINED3D_SURFACE_MAPPABLE, surface, D3DUSAGE_DEPTHSTENCIL, D3DPOOL_DEFAULT, multisample_type, 0); } @@ -920,7 +963,7 @@ static HRESULT WINAPI d3d8_device_CreateImageSurface(IDirect3DDevice8 *iface, UI TRACE("iface %p, width %u, height %u, format %#x, surface %p.\n", iface, width, height, format, surface); - return d3d8_device_create_surface(device, width, height, format, TRUE, FALSE, + return d3d8_device_create_surface(device, width, height, format, WINED3D_SURFACE_MAPPABLE, surface, 0, D3DPOOL_SYSTEMMEM, D3DMULTISAMPLE_NONE, 0); } @@ -1891,13 +1934,6 @@ static HRESULT WINAPI d3d8_device_DrawIndexedPrimitive(IDirect3DDevice8 *iface, return hr; } -static void STDMETHODCALLTYPE d3d8_null_wined3d_object_destroyed(void *parent) {} - -static const struct wined3d_parent_ops d3d8_null_wined3d_parent_ops = -{ - d3d8_null_wined3d_object_destroyed, -}; - /* The caller is responsible for wined3d locking */ static HRESULT d3d8_device_prepare_vertex_buffer(struct d3d8_device *device, UINT min_size) { @@ -2878,29 +2914,33 @@ static void CDECL device_parent_mode_changed(struct wined3d_device_parent *devic } static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_parent *device_parent, - void *container_parent, UINT width, UINT height, enum wined3d_format_id format, DWORD usage, - enum wined3d_pool pool, UINT sub_resource_idx, struct wined3d_surface **surface) + void *container_parent, const struct wined3d_resource_desc *desc, UINT sub_resource_idx, + DWORD flags, struct wined3d_surface **surface) { struct d3d8_device *device = device_from_device_parent(device_parent); struct d3d8_surface *d3d_surface; - BOOL lockable = TRUE; HRESULT hr; - TRACE("device_parent %p, container_parent %p, width %u, height %u, format %#x, usage %#x,\n" - "\tpool %#x, sub_resource_idx %u, surface %p.\n", - device_parent, container_parent, width, height, format, usage, pool, sub_resource_idx, surface); + TRACE("device_parent %p, container_parent %p, desc %p, sub_resource_idx %u, flags %#x, surface %p.\n", + device_parent, container_parent, desc, sub_resource_idx, flags, surface); - - if (pool == WINED3D_POOL_DEFAULT && !(usage & WINED3DUSAGE_DYNAMIC)) - lockable = FALSE; - - if (FAILED(hr = d3d8_device_create_surface(device, width, height, d3dformat_from_wined3dformat(format), - lockable, FALSE, (IDirect3DSurface8 **)&d3d_surface, usage, pool, D3DMULTISAMPLE_NONE, 0))) + if (!(d3d_surface = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*d3d_surface)))) { - WARN("Failed to create surface, hr %#x.\n", hr); + FIXME("Failed to allocate surface memory.\n"); + return D3DERR_OUTOFVIDEOMEMORY; + } + + if (FAILED(hr = surface_init(d3d_surface, device, desc->width, desc->height, + d3dformat_from_wined3dformat(desc->format), flags, desc->usage, desc->pool, + desc->multisample_type, desc->multisample_quality))) + { + WARN("Failed to initialize surface, hr %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, d3d_surface); return hr; } + TRACE("Created surface %p.\n", d3d_surface); + *surface = d3d_surface->wined3d_surface; wined3d_surface_incref(*surface); @@ -2915,39 +2955,40 @@ static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_ } static HRESULT CDECL device_parent_create_swapchain_surface(struct wined3d_device_parent *device_parent, - void *container_parent, UINT width, UINT height, enum wined3d_format_id format_id, DWORD usage, - enum wined3d_multisample_type multisample_type, DWORD multisample_quality, struct wined3d_surface **surface) + void *container_parent, const struct wined3d_resource_desc *desc, struct wined3d_surface **surface) { struct d3d8_device *device = device_from_device_parent(device_parent); + struct wined3d_resource_desc texture_desc; struct d3d8_surface *d3d_surface; + struct wined3d_texture *texture; HRESULT hr; - TRACE("device_parent %p, container_parent %p, width %u, height %u, format_id %#x, usage %#x,\n" - "\tmultisample_type %#x, multisample_quality %u, surface %p.\n", - device_parent, container_parent, width, height, format_id, usage, - multisample_type, multisample_quality, surface); + TRACE("device_parent %p, container_parent %p, desc %p, surface %p.\n", + device_parent, container_parent, desc, surface); - if (FAILED(hr = d3d8_device_create_surface(device, width, height, d3dformat_from_wined3dformat(format_id), - TRUE, FALSE, (IDirect3DSurface8 **)&d3d_surface, usage, D3DPOOL_DEFAULT, multisample_type, - multisample_quality))) + texture_desc = *desc; + texture_desc.resource_type = WINED3D_RTYPE_TEXTURE; + if (FAILED(hr = wined3d_texture_create_2d(device->wined3d_device, &texture_desc, 1, + WINED3D_SURFACE_MAPPABLE, &device->IDirect3DDevice8_iface, &d3d8_null_wined3d_parent_ops, &texture))) { - WARN("Failed to create surface, hr %#x.\n", hr); + WARN("Failed to create texture, hr %#x.\n", hr); return hr; } - *surface = d3d_surface->wined3d_surface; + *surface = wined3d_surface_from_resource(wined3d_texture_get_sub_resource(texture, 0)); wined3d_surface_incref(*surface); + wined3d_texture_decref(texture); - d3d_surface->container = (IUnknown *)&device->IDirect3DDevice8_iface; - /* Implicit surfaces are created with an refcount of 0 */ - IDirect3DSurface8_Release(&d3d_surface->IDirect3DSurface8_iface); + d3d_surface = wined3d_surface_get_parent(*surface); + d3d_surface->forwardReference = NULL; + d3d_surface->parent_device = &device->IDirect3DDevice8_iface; return hr; } static HRESULT CDECL device_parent_create_volume(struct wined3d_device_parent *device_parent, - void *container_parent, UINT width, UINT height, UINT depth, enum wined3d_format_id format, - enum wined3d_pool pool, DWORD usage, struct wined3d_volume **volume) + void *container_parent, UINT width, UINT height, UINT depth, UINT level, + enum wined3d_format_id format, enum wined3d_pool pool, DWORD usage, struct wined3d_volume **volume) { struct d3d8_device *device = device_from_device_parent(device_parent); struct d3d8_volume *object; @@ -2967,7 +3008,7 @@ static HRESULT CDECL device_parent_create_volume(struct wined3d_device_parent *d return D3DERR_OUTOFVIDEOMEMORY; } - hr = volume_init(object, device, width, height, depth, usage, format, pool); + hr = volume_init(object, device, width, height, depth, level, usage, format, pool); if (FAILED(hr)) { WARN("Failed to initialize volume, hr %#x.\n", hr); diff --git a/dll/directx/wine/d3d8/directx.c b/dll/directx/wine/d3d8/directx.c index e5b3a801f9d..dbe96e8b142 100644 --- a/dll/directx/wine/d3d8/directx.c +++ b/dll/directx/wine/d3d8/directx.c @@ -404,11 +404,13 @@ static const struct IDirect3D8Vtbl d3d8_vtbl = BOOL d3d8_init(struct d3d8 *d3d8) { + DWORD flags = WINED3D_LEGACY_DEPTH_BIAS | WINED3D_VIDMEM_ACCOUNTING; + d3d8->IDirect3D8_iface.lpVtbl = &d3d8_vtbl; d3d8->refcount = 1; wined3d_mutex_lock(); - d3d8->wined3d = wined3d_create(8, WINED3D_LEGACY_DEPTH_BIAS); + d3d8->wined3d = wined3d_create(8, flags); wined3d_mutex_unlock(); if (!d3d8->wined3d) return FALSE; diff --git a/dll/directx/wine/d3d8/surface.c b/dll/directx/wine/d3d8/surface.c index ba56944d083..70eebf95608 100644 --- a/dll/directx/wine/d3d8/surface.c +++ b/dll/directx/wine/d3d8/surface.c @@ -326,10 +326,9 @@ static const struct wined3d_parent_ops d3d8_surface_wined3d_parent_ops = }; HRESULT surface_init(struct d3d8_surface *surface, struct d3d8_device *device, UINT width, UINT height, - D3DFORMAT format, BOOL lockable, BOOL discard, DWORD usage, D3DPOOL pool, - D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality) + D3DFORMAT format, DWORD flags, DWORD usage, D3DPOOL pool, D3DMULTISAMPLE_TYPE multisample_type, + DWORD multisample_quality) { - DWORD flags = 0; HRESULT hr; surface->IDirect3DSurface8_iface.lpVtbl = &d3d8_surface_vtbl; @@ -342,11 +341,6 @@ HRESULT surface_init(struct d3d8_surface *surface, struct d3d8_device *device, U multisample_quality = 0; } - if (lockable) - flags |= WINED3D_SURFACE_MAPPABLE; - if (discard) - flags |= WINED3D_SURFACE_DISCARD; - wined3d_mutex_lock(); hr = wined3d_surface_create(device->wined3d_device, width, height, wined3dformat_from_d3dformat(format), usage & WINED3DUSAGE_MASK, (enum wined3d_pool)pool, multisample_type, multisample_quality, diff --git a/dll/directx/wine/d3d8/texture.c b/dll/directx/wine/d3d8/texture.c index c041ea729fc..f69c68b221b 100644 --- a/dll/directx/wine/d3d8/texture.c +++ b/dll/directx/wine/d3d8/texture.c @@ -1155,9 +1155,20 @@ struct d3d8_texture *unsafe_impl_from_IDirect3DBaseTexture8(IDirect3DBaseTexture { if (!iface) return NULL; - assert(iface->lpVtbl == (const IDirect3DBaseTexture8Vtbl *)&Direct3DTexture8_Vtbl - || iface->lpVtbl == (const IDirect3DBaseTexture8Vtbl *)&Direct3DCubeTexture8_Vtbl - || iface->lpVtbl == (const IDirect3DBaseTexture8Vtbl *)&Direct3DVolumeTexture8_Vtbl); + + /* SetTexture() in particular doesn't do a lot of validation on the pointer + * that gets passed in, and passing an invalid pointer works as long as the + * application doesn't try to actually render anything with it, so we print + * a WARN and return NULL instead of having the usual assert() here. + * One application affected by this is Fishdom 2. */ + if (iface->lpVtbl != (const IDirect3DBaseTexture8Vtbl *)&Direct3DTexture8_Vtbl + && iface->lpVtbl != (const IDirect3DBaseTexture8Vtbl *)&Direct3DCubeTexture8_Vtbl + && iface->lpVtbl != (const IDirect3DBaseTexture8Vtbl *)&Direct3DVolumeTexture8_Vtbl) + { + WARN("%p is not a valid IDirect3DBaseTexture8 interface.\n", iface); + return NULL; + } + return CONTAINING_RECORD(iface, struct d3d8_texture, IDirect3DBaseTexture8_iface); } @@ -1174,14 +1185,29 @@ static const struct wined3d_parent_ops d3d8_texture_wined3d_parent_ops = HRESULT texture_init(struct d3d8_texture *texture, struct d3d8_device *device, UINT width, UINT height, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool) { + struct wined3d_resource_desc desc; + DWORD surface_flags = 0; HRESULT hr; texture->IDirect3DBaseTexture8_iface.lpVtbl = (const IDirect3DBaseTexture8Vtbl *)&Direct3DTexture8_Vtbl; texture->refcount = 1; + desc.resource_type = WINED3D_RTYPE_TEXTURE; + desc.format = wined3dformat_from_d3dformat(format); + desc.multisample_type = WINED3D_MULTISAMPLE_NONE; + desc.multisample_quality = 0; + desc.usage = usage & WINED3DUSAGE_MASK; + desc.pool = pool; + desc.width = width; + desc.height = height; + desc.depth = 1; + desc.size = 0; + + if (pool != D3DPOOL_DEFAULT || (usage & D3DUSAGE_DYNAMIC)) + surface_flags |= WINED3D_SURFACE_MAPPABLE; + wined3d_mutex_lock(); - hr = wined3d_texture_create_2d(device->wined3d_device, width, height, levels, - usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(format), pool, + hr = wined3d_texture_create_2d(device->wined3d_device, &desc, levels, surface_flags, texture, &d3d8_texture_wined3d_parent_ops, &texture->wined3d_texture); wined3d_mutex_unlock(); if (FAILED(hr)) @@ -1199,15 +1225,30 @@ HRESULT texture_init(struct d3d8_texture *texture, struct d3d8_device *device, HRESULT cubetexture_init(struct d3d8_texture *texture, struct d3d8_device *device, UINT edge_length, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool) { + struct wined3d_resource_desc desc; + DWORD surface_flags = 0; HRESULT hr; texture->IDirect3DBaseTexture8_iface.lpVtbl = (const IDirect3DBaseTexture8Vtbl *)&Direct3DCubeTexture8_Vtbl; texture->refcount = 1; + desc.resource_type = WINED3D_RTYPE_CUBE_TEXTURE; + desc.format = wined3dformat_from_d3dformat(format); + desc.multisample_type = WINED3D_MULTISAMPLE_NONE; + desc.multisample_quality = 0; + desc.usage = usage & WINED3DUSAGE_MASK; + desc.pool = pool; + desc.width = edge_length; + desc.height = edge_length; + desc.depth = 1; + desc.size = 0; + + if (pool != D3DPOOL_DEFAULT || (usage & D3DUSAGE_DYNAMIC)) + surface_flags |= WINED3D_SURFACE_MAPPABLE; + wined3d_mutex_lock(); - hr = wined3d_texture_create_cube(device->wined3d_device, edge_length, levels, - usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(format), pool, texture, - &d3d8_texture_wined3d_parent_ops, &texture->wined3d_texture); + hr = wined3d_texture_create_cube(device->wined3d_device, &desc, levels, surface_flags, + texture, &d3d8_texture_wined3d_parent_ops, &texture->wined3d_texture); wined3d_mutex_unlock(); if (FAILED(hr)) { @@ -1224,15 +1265,26 @@ HRESULT cubetexture_init(struct d3d8_texture *texture, struct d3d8_device *devic HRESULT volumetexture_init(struct d3d8_texture *texture, struct d3d8_device *device, UINT width, UINT height, UINT depth, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool) { + struct wined3d_resource_desc desc; HRESULT hr; texture->IDirect3DBaseTexture8_iface.lpVtbl = (const IDirect3DBaseTexture8Vtbl *)&Direct3DVolumeTexture8_Vtbl; texture->refcount = 1; + desc.resource_type = WINED3D_RTYPE_VOLUME_TEXTURE; + desc.format = wined3dformat_from_d3dformat(format); + desc.multisample_type = WINED3D_MULTISAMPLE_NONE; + desc.multisample_quality = 0; + desc.usage = usage & WINED3DUSAGE_MASK; + desc.pool = pool; + desc.width = width; + desc.height = height; + desc.depth = depth; + desc.size = 0; + wined3d_mutex_lock(); - hr = wined3d_texture_create_3d(device->wined3d_device, width, height, depth, levels, - usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(format), pool, texture, - &d3d8_texture_wined3d_parent_ops, &texture->wined3d_texture); + hr = wined3d_texture_create_3d(device->wined3d_device, &desc, levels, + texture, &d3d8_texture_wined3d_parent_ops, &texture->wined3d_texture); wined3d_mutex_unlock(); if (FAILED(hr)) { diff --git a/dll/directx/wine/d3d8/volume.c b/dll/directx/wine/d3d8/volume.c index 4e8e88f5c9a..ee190ef2866 100644 --- a/dll/directx/wine/d3d8/volume.c +++ b/dll/directx/wine/d3d8/volume.c @@ -284,14 +284,14 @@ static const struct wined3d_parent_ops d3d8_volume_wined3d_parent_ops = }; HRESULT volume_init(struct d3d8_volume *volume, struct d3d8_device *device, UINT width, UINT height, - UINT depth, DWORD usage, enum wined3d_format_id format, enum wined3d_pool pool) + UINT depth, UINT level, DWORD usage, enum wined3d_format_id format, enum wined3d_pool pool) { HRESULT hr; volume->IDirect3DVolume8_iface.lpVtbl = &d3d8_volume_vtbl; volume->refcount = 1; - hr = wined3d_volume_create(device->wined3d_device, width, height, depth, usage, + hr = wined3d_volume_create(device->wined3d_device, width, height, depth, level, usage, format, pool, volume, &d3d8_volume_wined3d_parent_ops, &volume->wined3d_volume); if (FAILED(hr)) { diff --git a/dll/directx/wine/d3d9/CMakeLists.txt b/dll/directx/wine/d3d9/CMakeLists.txt index 52ee8b65c30..bdf9d7ae373 100644 --- a/dll/directx/wine/d3d9/CMakeLists.txt +++ b/dll/directx/wine/d3d9/CMakeLists.txt @@ -26,17 +26,7 @@ list(APPEND SOURCE add_library(d3d9 SHARED ${SOURCE}) set_module_type(d3d9 win32dll UNICODE) -target_link_libraries(d3d9 uuid wine) - -add_importlibs(d3d9 - user32 - gdi32 - advapi32 - wined3d - msvcrt - kernel32 - ntdll) - -add_dependencies(d3d9 wineheaders) +target_link_libraries(d3d9 wine) +add_importlibs(d3d9 wined3d msvcrt kernel32 ntdll) add_pch(d3d9 d3d9_private.h) add_cd_file(TARGET d3d9 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3d9/d3d9_private.h b/dll/directx/wine/d3d9/d3d9_private.h index 4e86556bcfa..3bd4f738c24 100644 --- a/dll/directx/wine/d3d9/d3d9_private.h +++ b/dll/directx/wine/d3d9/d3d9_private.h @@ -180,7 +180,8 @@ struct d3d9_volume }; HRESULT volume_init(struct d3d9_volume *volume, struct d3d9_device *device, UINT width, UINT height, - UINT depth, DWORD usage, enum wined3d_format_id format, enum wined3d_pool pool) DECLSPEC_HIDDEN; + UINT depth, UINT level, DWORD usage, enum wined3d_format_id format, + enum wined3d_pool pool) DECLSPEC_HIDDEN; struct d3d9_swapchain { @@ -205,8 +206,8 @@ struct d3d9_surface }; HRESULT surface_init(struct d3d9_surface *surface, struct d3d9_device *device, UINT width, UINT height, - D3DFORMAT format, BOOL lockable, BOOL discard, DWORD usage, D3DPOOL pool, - D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality) DECLSPEC_HIDDEN; + D3DFORMAT format, DWORD flags, DWORD usage, D3DPOOL pool, D3DMULTISAMPLE_TYPE multisample_type, + DWORD multisample_quality) DECLSPEC_HIDDEN; struct d3d9_surface *unsafe_impl_from_IDirect3DSurface9(IDirect3DSurface9 *iface) DECLSPEC_HIDDEN; struct d3d9_vertexbuffer diff --git a/dll/directx/wine/d3d9/device.c b/dll/directx/wine/d3d9/device.c index 5a943df405d..7400a423efd 100644 --- a/dll/directx/wine/d3d9/device.c +++ b/dll/directx/wine/d3d9/device.c @@ -25,6 +25,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9); +static void STDMETHODCALLTYPE d3d9_null_wined3d_object_destroyed(void *parent) {} + +static const struct wined3d_parent_ops d3d9_null_wined3d_parent_ops = +{ + d3d9_null_wined3d_object_destroyed, +}; + D3DFORMAT d3dformat_from_wined3dformat(enum wined3d_format_id format) { BYTE *c = (BYTE *)&format; @@ -557,6 +564,21 @@ static HRESULT CDECL reset_enum_callback(struct wined3d_resource *resource) { struct d3d9_surface *surface; + if (desc.resource_type == WINED3D_RTYPE_TEXTURE) + { + IUnknown *parent = wined3d_resource_get_parent(resource); + IDirect3DBaseTexture9 *texture; + + if (SUCCEEDED(IUnknown_QueryInterface(parent, &IID_IDirect3DBaseTexture9, (void **)&texture))) + { + IDirect3DBaseTexture9_Release(texture); + WARN("Texture %p (resource %p) in pool D3DPOOL_DEFAULT blocks the Reset call.\n", texture, resource); + return D3DERR_INVALIDCALL; + } + + return D3D_OK; + } + if (desc.resource_type != WINED3D_RTYPE_SURFACE) { WARN("Resource %p in pool D3DPOOL_DEFAULT blocks the Reset call.\n", resource); @@ -751,7 +773,7 @@ static HRESULT WINAPI d3d9_device_CreateTexture(IDirect3DDevice9Ex *iface, resource = wined3d_texture_get_sub_resource(object->wined3d_texture, 0); surface = wined3d_resource_get_parent(resource); - wined3d_surface_set_mem(surface->wined3d_surface, *shared_handle); + wined3d_surface_set_mem(surface->wined3d_surface, *shared_handle, 0); } TRACE("Created texture %p.\n", object); @@ -891,33 +913,50 @@ static HRESULT WINAPI d3d9_device_CreateIndexBuffer(IDirect3DDevice9Ex *iface, U } static HRESULT d3d9_device_create_surface(struct d3d9_device *device, UINT width, UINT height, - D3DFORMAT format, BOOL lockable, BOOL discard, IDirect3DSurface9 **surface, UINT usage, - D3DPOOL pool, D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality) + D3DFORMAT format, DWORD flags, IDirect3DSurface9 **surface, UINT usage, D3DPOOL pool, + D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality) { - struct d3d9_surface *object; + struct wined3d_resource *sub_resource; + struct wined3d_resource_desc desc; + struct d3d9_surface *surface_impl; + struct wined3d_texture *texture; HRESULT hr; - TRACE("device %p, width %u, height %u, format %#x, lockable %#x, discard %#x, surface %p.\n" + TRACE("device %p, width %u, height %u, format %#x, flags %#x, surface %p.\n" "usage %#x, pool %#x, multisample_type %#x, multisample_quality %u.\n", - device, width, height, format, lockable, discard, surface, usage, pool, + device, width, height, format, flags, surface, usage, pool, multisample_type, multisample_quality); - if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)))) - { - FIXME("Failed to allocate surface memory.\n"); - return D3DERR_OUTOFVIDEOMEMORY; - } + desc.resource_type = WINED3D_RTYPE_TEXTURE; + desc.format = wined3dformat_from_d3dformat(format); + desc.multisample_type = multisample_type; + desc.multisample_quality = multisample_quality; + desc.usage = usage & WINED3DUSAGE_MASK; + desc.pool = pool; + desc.width = width; + desc.height = height; + desc.depth = 1; + desc.size = 0; - if (FAILED(hr = surface_init(object, device, width, height, format, lockable, - discard, usage, pool, multisample_type, multisample_quality))) + wined3d_mutex_lock(); + + if (FAILED(hr = wined3d_texture_create_2d(device->wined3d_device, &desc, + 1, flags, NULL, &d3d9_null_wined3d_parent_ops, &texture))) { - WARN("Failed to initialize surface, hr %#x.\n", hr); - HeapFree(GetProcessHeap(), 0, object); + wined3d_mutex_unlock(); + WARN("Failed to create texture, hr %#x.\n", hr); return hr; } - TRACE("Created surface %p.\n", object); - *surface = &object->IDirect3DSurface9_iface; + sub_resource = wined3d_texture_get_sub_resource(texture, 0); + surface_impl = wined3d_resource_get_parent(sub_resource); + surface_impl->forwardReference = NULL; + surface_impl->parent_device = &device->IDirect3DDevice9Ex_iface; + *surface = &surface_impl->IDirect3DSurface9_iface; + IDirect3DSurface9_AddRef(*surface); + wined3d_texture_decref(texture); + + wined3d_mutex_unlock(); return D3D_OK; } @@ -927,6 +966,7 @@ static HRESULT WINAPI d3d9_device_CreateRenderTarget(IDirect3DDevice9Ex *iface, BOOL lockable, IDirect3DSurface9 **surface, HANDLE *shared_handle) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); + DWORD flags = 0; TRACE("iface %p, width %u, height %u, format %#x, multisample_type %#x, multisample_quality %u.\n" "lockable %#x, surface %p, shared_handle %p.\n", @@ -936,7 +976,10 @@ static HRESULT WINAPI d3d9_device_CreateRenderTarget(IDirect3DDevice9Ex *iface, if (shared_handle) FIXME("Resource sharing not implemented, *shared_handle %p.\n", *shared_handle); - return d3d9_device_create_surface(device, width, height, format, lockable, FALSE, surface, + if (lockable) + flags |= WINED3D_SURFACE_MAPPABLE; + + return d3d9_device_create_surface(device, width, height, format, flags, surface, D3DUSAGE_RENDERTARGET, D3DPOOL_DEFAULT, multisample_type, multisample_quality); } @@ -945,6 +988,7 @@ static HRESULT WINAPI d3d9_device_CreateDepthStencilSurface(IDirect3DDevice9Ex * BOOL discard, IDirect3DSurface9 **surface, HANDLE *shared_handle) { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); + DWORD flags = WINED3D_SURFACE_MAPPABLE; TRACE("iface %p, width %u, height %u, format %#x, multisample_type %#x, multisample_quality %u.\n" "discard %#x, surface %p, shared_handle %p.\n", @@ -954,7 +998,10 @@ static HRESULT WINAPI d3d9_device_CreateDepthStencilSurface(IDirect3DDevice9Ex * if (shared_handle) FIXME("Resource sharing not implemented, *shared_handle %p.\n", *shared_handle); - return d3d9_device_create_surface(device, width, height, format, TRUE, discard, surface, + if (discard) + flags |= WINED3D_SURFACE_DISCARD; + + return d3d9_device_create_surface(device, width, height, format, flags, surface, D3DUSAGE_DEPTHSTENCIL, D3DPOOL_DEFAULT, multisample_type, multisample_quality); } @@ -1155,8 +1202,8 @@ static HRESULT WINAPI d3d9_device_CreateOffscreenPlainSurface(IDirect3DDevice9Ex /* FIXME: Offscreen surfaces are supposed to be always lockable, * regardless of the pool they're created in. Should we set dynamic usage * here? */ - return d3d9_device_create_surface(device, width, height, format, TRUE, - FALSE, surface, 0, pool, D3DMULTISAMPLE_NONE, 0); + return d3d9_device_create_surface(device, width, height, format, + WINED3D_SURFACE_MAPPABLE, surface, 0, pool, D3DMULTISAMPLE_NONE, 0); } static HRESULT WINAPI d3d9_device_SetRenderTarget(IDirect3DDevice9Ex *iface, DWORD idx, IDirect3DSurface9 *surface) @@ -1966,13 +2013,6 @@ static HRESULT WINAPI d3d9_device_DrawIndexedPrimitive(IDirect3DDevice9Ex *iface return hr; } -static void STDMETHODCALLTYPE d3d9_null_wined3d_object_destroyed(void *parent) {} - -static const struct wined3d_parent_ops d3d9_null_wined3d_parent_ops = -{ - d3d9_null_wined3d_object_destroyed, -}; - /* The caller is responsible for wined3d locking */ static HRESULT d3d9_device_prepare_vertex_buffer(struct d3d9_device *device, UINT min_size) { @@ -3259,28 +3299,33 @@ static void CDECL device_parent_mode_changed(struct wined3d_device_parent *devic } static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_parent *device_parent, - void *container_parent, UINT width, UINT height, enum wined3d_format_id format, DWORD usage, - enum wined3d_pool pool, UINT sub_resource_idx, struct wined3d_surface **surface) + void *container_parent, const struct wined3d_resource_desc *desc, UINT sub_resource_idx, + DWORD flags, struct wined3d_surface **surface) { struct d3d9_device *device = device_from_device_parent(device_parent); struct d3d9_surface *d3d_surface; - BOOL lockable = TRUE; HRESULT hr; - TRACE("device_parent %p, container_parent %p, width %u, height %u, format %#x, usage %#x,\n" - "\tpool %#x, sub_resource_idx %u, surface %p.\n", - device_parent, container_parent, width, height, format, usage, pool, sub_resource_idx, surface); + TRACE("device_parent %p, container_parent %p, desc %p, sub_resource_idx %u, flags %#x, surface %p.\n", + device_parent, container_parent, desc, sub_resource_idx, flags, surface); - if (pool == WINED3D_POOL_DEFAULT && !(usage & D3DUSAGE_DYNAMIC)) - lockable = FALSE; - - if (FAILED(hr = d3d9_device_create_surface(device, width, height, d3dformat_from_wined3dformat(format), - lockable, FALSE, (IDirect3DSurface9 **)&d3d_surface, usage, pool, D3DMULTISAMPLE_NONE, 0))) + if (!(d3d_surface = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*d3d_surface)))) { - WARN("Failed to create surface, hr %#x.\n", hr); + FIXME("Failed to allocate surface memory.\n"); + return D3DERR_OUTOFVIDEOMEMORY; + } + + if (FAILED(hr = surface_init(d3d_surface, device, desc->width, desc->height, + d3dformat_from_wined3dformat(desc->format), flags, desc->usage, desc->pool, + desc->multisample_type, desc->multisample_quality))) + { + WARN("Failed to initialize surface, hr %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, d3d_surface); return hr; } + TRACE("Created surface %p.\n", d3d_surface); + *surface = d3d_surface->wined3d_surface; wined3d_surface_incref(*surface); @@ -3295,42 +3340,43 @@ static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_ } static HRESULT CDECL device_parent_create_swapchain_surface(struct wined3d_device_parent *device_parent, - void *container_parent, UINT width, UINT height, enum wined3d_format_id format_id, DWORD usage, - enum wined3d_multisample_type multisample_type, DWORD multisample_quality, struct wined3d_surface **surface) + void *container_parent, const struct wined3d_resource_desc *desc, struct wined3d_surface **surface) { struct d3d9_device *device = device_from_device_parent(device_parent); + struct wined3d_resource_desc texture_desc; struct d3d9_surface *d3d_surface; + struct wined3d_texture *texture; HRESULT hr; - TRACE("device_parent %p, container_parent %p, width %u, height %u, format_id %#x, usage %#x,\n" - "\tmultisample_type %#x, multisample_quality %u, surface %p.\n", - device_parent, container_parent, width, height, format_id, usage, - multisample_type, multisample_quality, surface); + TRACE("device_parent %p, container_parent %p, desc %p, surface %p.\n", + device_parent, container_parent, desc, surface); - if (FAILED(hr = d3d9_device_create_surface(device, width, height, d3dformat_from_wined3dformat(format_id), - TRUE, FALSE, (IDirect3DSurface9 **)&d3d_surface, usage, D3DPOOL_DEFAULT, multisample_type, - multisample_quality))) + if (container_parent == device_parent) + container_parent = &device->IDirect3DDevice9Ex_iface; + + texture_desc = *desc; + texture_desc.resource_type = WINED3D_RTYPE_TEXTURE; + if (FAILED(hr = wined3d_texture_create_2d(device->wined3d_device, &texture_desc, 1, + WINED3D_SURFACE_MAPPABLE, container_parent, &d3d9_null_wined3d_parent_ops, &texture))) { - WARN("Failed to create surface, hr %#x.\n", hr); + WARN("Failed to create texture, hr %#x.\n", hr); return hr; } - *surface = d3d_surface->wined3d_surface; + *surface = wined3d_surface_from_resource(wined3d_texture_get_sub_resource(texture, 0)); wined3d_surface_incref(*surface); + wined3d_texture_decref(texture); - if (container_parent == device_parent) - d3d_surface->container = (IUnknown *)&device->IDirect3DDevice9Ex_iface; - else - d3d_surface->container = container_parent; - /* Implicit surfaces are created with an refcount of 0 */ - IDirect3DSurface9_Release(&d3d_surface->IDirect3DSurface9_iface); + d3d_surface = wined3d_surface_get_parent(*surface); + d3d_surface->forwardReference = NULL; + d3d_surface->parent_device = &device->IDirect3DDevice9Ex_iface; return hr; } static HRESULT CDECL device_parent_create_volume(struct wined3d_device_parent *device_parent, - void *container_parent, UINT width, UINT height, UINT depth, enum wined3d_format_id format, - enum wined3d_pool pool, DWORD usage, struct wined3d_volume **volume) + void *container_parent, UINT width, UINT height, UINT depth, UINT level, + enum wined3d_format_id format, enum wined3d_pool pool, DWORD usage, struct wined3d_volume **volume) { struct d3d9_device *device = device_from_device_parent(device_parent); struct d3d9_volume *object; @@ -3350,7 +3396,7 @@ static HRESULT CDECL device_parent_create_volume(struct wined3d_device_parent *d return D3DERR_OUTOFVIDEOMEMORY; } - hr = volume_init(object, device, width, height, depth, usage, format, pool); + hr = volume_init(object, device, width, height, depth, level, usage, format, pool); if (FAILED(hr)) { WARN("Failed to initialize volume, hr %#x.\n", hr); diff --git a/dll/directx/wine/d3d9/directx.c b/dll/directx/wine/d3d9/directx.c index 41b5e7027df..a21560f1bba 100644 --- a/dll/directx/wine/d3d9/directx.c +++ b/dll/directx/wine/d3d9/directx.c @@ -632,11 +632,12 @@ static const struct IDirect3D9ExVtbl d3d9_vtbl = BOOL d3d9_init(struct d3d9 *d3d9, BOOL extended) { + DWORD flags = extended ? 0 : WINED3D_VIDMEM_ACCOUNTING; d3d9->IDirect3D9Ex_iface.lpVtbl = &d3d9_vtbl; d3d9->refcount = 1; wined3d_mutex_lock(); - d3d9->wined3d = wined3d_create(9, 0); + d3d9->wined3d = wined3d_create(9, flags); wined3d_mutex_unlock(); if (!d3d9->wined3d) return FALSE; diff --git a/dll/directx/wine/d3d9/surface.c b/dll/directx/wine/d3d9/surface.c index 3e1c34c5115..0f9688a22ce 100644 --- a/dll/directx/wine/d3d9/surface.c +++ b/dll/directx/wine/d3d9/surface.c @@ -391,10 +391,9 @@ static const struct wined3d_parent_ops d3d9_surface_wined3d_parent_ops = }; HRESULT surface_init(struct d3d9_surface *surface, struct d3d9_device *device, UINT width, UINT height, - D3DFORMAT format, BOOL lockable, BOOL discard, DWORD usage, D3DPOOL pool, - D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality) + D3DFORMAT format, DWORD flags, DWORD usage, D3DPOOL pool, D3DMULTISAMPLE_TYPE multisample_type, + DWORD multisample_quality) { - DWORD flags = 0; HRESULT hr; surface->IDirect3DSurface9_iface.lpVtbl = &d3d9_surface_vtbl; @@ -423,11 +422,6 @@ HRESULT surface_init(struct d3d9_surface *surface, struct d3d9_device *device, U multisample_quality = 0; } - if (lockable) - flags |= WINED3D_SURFACE_MAPPABLE; - if (discard) - flags |= WINED3D_SURFACE_DISCARD; - wined3d_mutex_lock(); hr = wined3d_surface_create(device->wined3d_device, width, height, wined3dformat_from_d3dformat(format), usage & WINED3DUSAGE_MASK, (enum wined3d_pool)pool, multisample_type, multisample_quality, diff --git a/dll/directx/wine/d3d9/texture.c b/dll/directx/wine/d3d9/texture.c index de795b845b8..ec53ceec94a 100644 --- a/dll/directx/wine/d3d9/texture.c +++ b/dll/directx/wine/d3d9/texture.c @@ -1309,14 +1309,29 @@ static const struct wined3d_parent_ops d3d9_texture_wined3d_parent_ops = HRESULT texture_init(struct d3d9_texture *texture, struct d3d9_device *device, UINT width, UINT height, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool) { + struct wined3d_resource_desc desc; + DWORD surface_flags = 0; HRESULT hr; texture->IDirect3DBaseTexture9_iface.lpVtbl = (const IDirect3DBaseTexture9Vtbl *)&d3d9_texture_2d_vtbl; texture->refcount = 1; + desc.resource_type = WINED3D_RTYPE_TEXTURE; + desc.format = wined3dformat_from_d3dformat(format); + desc.multisample_type = WINED3D_MULTISAMPLE_NONE; + desc.multisample_quality = 0; + desc.usage = usage & WINED3DUSAGE_MASK; + desc.pool = pool; + desc.width = width; + desc.height = height; + desc.depth = 1; + desc.size = 0; + + if (pool != D3DPOOL_DEFAULT || (usage & D3DUSAGE_DYNAMIC)) + surface_flags |= WINED3D_SURFACE_MAPPABLE; + wined3d_mutex_lock(); - hr = wined3d_texture_create_2d(device->wined3d_device, width, height, levels, - usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(format), pool, + hr = wined3d_texture_create_2d(device->wined3d_device, &desc, levels, surface_flags, texture, &d3d9_texture_wined3d_parent_ops, &texture->wined3d_texture); wined3d_mutex_unlock(); if (FAILED(hr)) @@ -1334,15 +1349,30 @@ HRESULT texture_init(struct d3d9_texture *texture, struct d3d9_device *device, HRESULT cubetexture_init(struct d3d9_texture *texture, struct d3d9_device *device, UINT edge_length, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool) { + struct wined3d_resource_desc desc; + DWORD surface_flags = 0; HRESULT hr; texture->IDirect3DBaseTexture9_iface.lpVtbl = (const IDirect3DBaseTexture9Vtbl *)&d3d9_texture_cube_vtbl; texture->refcount = 1; + desc.resource_type = WINED3D_RTYPE_CUBE_TEXTURE; + desc.format = wined3dformat_from_d3dformat(format); + desc.multisample_type = WINED3D_MULTISAMPLE_NONE; + desc.multisample_quality = 0; + desc.usage = usage & WINED3DUSAGE_MASK; + desc.pool = pool; + desc.width = edge_length; + desc.height = edge_length; + desc.depth = 1; + desc.size = 0; + + if (pool != D3DPOOL_DEFAULT || (usage & D3DUSAGE_DYNAMIC)) + surface_flags |= WINED3D_SURFACE_MAPPABLE; + wined3d_mutex_lock(); - hr = wined3d_texture_create_cube(device->wined3d_device, edge_length, - levels, usage, wined3dformat_from_d3dformat(format), pool, texture, - &d3d9_texture_wined3d_parent_ops, &texture->wined3d_texture); + hr = wined3d_texture_create_cube(device->wined3d_device, &desc, levels, surface_flags, + texture, &d3d9_texture_wined3d_parent_ops, &texture->wined3d_texture); wined3d_mutex_unlock(); if (FAILED(hr)) { @@ -1359,15 +1389,26 @@ HRESULT cubetexture_init(struct d3d9_texture *texture, struct d3d9_device *devic HRESULT volumetexture_init(struct d3d9_texture *texture, struct d3d9_device *device, UINT width, UINT height, UINT depth, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool) { + struct wined3d_resource_desc desc; HRESULT hr; texture->IDirect3DBaseTexture9_iface.lpVtbl = (const IDirect3DBaseTexture9Vtbl *)&d3d9_texture_3d_vtbl; texture->refcount = 1; + desc.resource_type = WINED3D_RTYPE_VOLUME_TEXTURE; + desc.format = wined3dformat_from_d3dformat(format); + desc.multisample_type = WINED3D_MULTISAMPLE_NONE; + desc.multisample_quality = 0; + desc.usage = usage & WINED3DUSAGE_MASK; + desc.pool = pool; + desc.width = width; + desc.height = height; + desc.depth = depth; + desc.size = 0; + wined3d_mutex_lock(); - hr = wined3d_texture_create_3d(device->wined3d_device, width, height, depth, levels, - usage & WINED3DUSAGE_MASK, wined3dformat_from_d3dformat(format), pool, texture, - &d3d9_texture_wined3d_parent_ops, &texture->wined3d_texture); + hr = wined3d_texture_create_3d(device->wined3d_device, &desc, levels, + texture, &d3d9_texture_wined3d_parent_ops, &texture->wined3d_texture); wined3d_mutex_unlock(); if (FAILED(hr)) { diff --git a/dll/directx/wine/d3d9/volume.c b/dll/directx/wine/d3d9/volume.c index 6511820c778..b3d70327230 100644 --- a/dll/directx/wine/d3d9/volume.c +++ b/dll/directx/wine/d3d9/volume.c @@ -275,15 +275,16 @@ static const struct wined3d_parent_ops d3d9_volume_wined3d_parent_ops = }; HRESULT volume_init(struct d3d9_volume *volume, struct d3d9_device *device, UINT width, UINT height, - UINT depth, DWORD usage, enum wined3d_format_id format, enum wined3d_pool pool) + UINT depth, UINT level, DWORD usage, enum wined3d_format_id format, enum wined3d_pool pool) { HRESULT hr; volume->IDirect3DVolume9_iface.lpVtbl = &d3d9_volume_vtbl; volume->refcount = 1; - hr = wined3d_volume_create(device->wined3d_device, width, height, depth, usage & WINED3DUSAGE_MASK, - format, pool, volume, &d3d9_volume_wined3d_parent_ops, &volume->wined3d_volume); + hr = wined3d_volume_create(device->wined3d_device, width, height, depth, level, + usage & WINED3DUSAGE_MASK, format, pool, volume, &d3d9_volume_wined3d_parent_ops, + &volume->wined3d_volume); if (FAILED(hr)) { WARN("Failed to create wined3d volume, hr %#x.\n", hr); diff --git a/dll/directx/wine/d3dcompiler_43/CMakeLists.txt b/dll/directx/wine/d3dcompiler_43/CMakeLists.txt new file mode 100644 index 00000000000..e99f39621c5 --- /dev/null +++ b/dll/directx/wine/d3dcompiler_43/CMakeLists.txt @@ -0,0 +1,30 @@ + +add_definitions( + -D__WINESRC__ + -DDIRECT3D_VERSION=0x0900) + +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) + +spec2def(d3dcompiler_43.dll d3dcompiler_43.spec ADD_IMPORTLIB) + +list(APPEND SOURCE + asmparser.c + asmshader.tab.c + asmshader.yy.c + blob.c + bytecodewriter.c + compiler.c + d3dcompiler_43_main.c + hlsl.tab.c + hlsl.yy.c + reflection.c + utils.c + ${CMAKE_CURRENT_BINARY_DIR}/d3dcompiler_43_stubs.c + ${CMAKE_CURRENT_BINARY_DIR}/d3dcompiler_43.def) + +add_library(d3dcompiler_43 SHARED ${SOURCE} version.rc) +set_module_type(d3dcompiler_43 win32dll) +target_link_libraries(d3dcompiler_43 dx10guid uuid wine wpp) +add_importlibs(d3dcompiler_43 msvcrt kernel32 ntdll) +add_dependencies(d3dcompiler_43 d3d_idl_headers) +add_cd_file(TARGET d3dcompiler_43 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dcompiler_43/asmparser.c b/dll/directx/wine/d3dcompiler_43/asmparser.c new file mode 100644 index 00000000000..c57343f9fce --- /dev/null +++ b/dll/directx/wine/d3dcompiler_43/asmparser.c @@ -0,0 +1,1554 @@ +/* + * Direct3D asm shader parser + * + * Copyright 2008 Stefan Dösinger + * Copyright 2009 Matteo Bruni + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "config.h" +#include "wine/port.h" +#include "wine/debug.h" + +#include "d3dcompiler_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(asmshader); +WINE_DECLARE_DEBUG_CHANNEL(parsed_shader); + + +/* How to map vs 1.0 and 2.0 varyings to 3.0 ones + * oTx is mapped to ox, which happens to be an + * identical mapping since BWRITERSPR_TEXCRDOUT == BWRITERSPR_OUTPUT + * oPos, oFog and point size are mapped to general output regs as well. + * the vs 1.x and 2.x parser functions add varying declarations + * to the shader, and the 1.x and 2.x output functions check those varyings + */ +#define OT0_REG 0 +#define OT1_REG 1 +#define OT2_REG 2 +#define OT3_REG 3 +#define OT4_REG 4 +#define OT5_REG 5 +#define OT6_REG 6 +#define OT7_REG 7 +#define OPOS_REG 8 +#define OFOG_REG 9 +#define OFOG_WRITEMASK BWRITERSP_WRITEMASK_0 +#define OPTS_REG 9 +#define OPTS_WRITEMASK BWRITERSP_WRITEMASK_1 +#define OD0_REG 10 +#define OD1_REG 11 + +/* Input color registers 0-1 are identically mapped */ +#define C0_VARYING 0 +#define C1_VARYING 1 +#define T0_VARYING 2 +#define T1_VARYING 3 +#define T2_VARYING 4 +#define T3_VARYING 5 +#define T4_VARYING 6 +#define T5_VARYING 7 +#define T6_VARYING 8 +#define T7_VARYING 9 + +/**************************************************************** + * Common(non-version specific) shader parser control code * + ****************************************************************/ + +static void asmparser_end(struct asm_parser *This) { + TRACE("Finalizing shader\n"); +} + +static void asmparser_constF(struct asm_parser *This, DWORD reg, float x, float y, float z, float w) { + if(!This->shader) return; + TRACE("Adding float constant %u at pos %u\n", reg, This->shader->num_cf); + TRACE_(parsed_shader)("def c%u, %f, %f, %f, %f\n", reg, x, y, z, w); + if(!add_constF(This->shader, reg, x, y, z, w)) { + ERR("Out of memory\n"); + set_parse_status(&This->status, PARSE_ERR); + } +} + +static void asmparser_constB(struct asm_parser *This, DWORD reg, BOOL x) { + if(!This->shader) return; + TRACE("Adding boolean constant %u at pos %u\n", reg, This->shader->num_cb); + TRACE_(parsed_shader)("def b%u, %s\n", reg, x ? "true" : "false"); + if(!add_constB(This->shader, reg, x)) { + ERR("Out of memory\n"); + set_parse_status(&This->status, PARSE_ERR); + } +} + +static void asmparser_constI(struct asm_parser *This, DWORD reg, INT x, INT y, INT z, INT w) { + if(!This->shader) return; + TRACE("Adding integer constant %u at pos %u\n", reg, This->shader->num_ci); + TRACE_(parsed_shader)("def i%u, %d, %d, %d, %d\n", reg, x, y, z, w); + if(!add_constI(This->shader, reg, x, y, z, w)) { + ERR("Out of memory\n"); + set_parse_status(&This->status, PARSE_ERR); + } +} + +static void asmparser_dcl_output(struct asm_parser *This, DWORD usage, DWORD num, + const struct shader_reg *reg) { + if(!This->shader) return; + if(This->shader->type == ST_PIXEL) { + asmparser_message(This, "Line %u: Output register declared in a pixel shader\n", This->line_no); + set_parse_status(&This->status, PARSE_ERR); + } + if(!record_declaration(This->shader, usage, num, 0, TRUE, reg->regnum, reg->u.writemask, FALSE)) { + ERR("Out of memory\n"); + set_parse_status(&This->status, PARSE_ERR); + } +} + +static void asmparser_dcl_output_unsupported(struct asm_parser *This, DWORD usage, DWORD num, + const struct shader_reg *reg) { + asmparser_message(This, "Line %u: Output declaration unsupported in this shader version\n", This->line_no); + set_parse_status(&This->status, PARSE_ERR); +} + +static void asmparser_dcl_input(struct asm_parser *This, DWORD usage, DWORD num, + DWORD mod, const struct shader_reg *reg) { + struct instruction instr; + + if(!This->shader) return; + if(mod != 0 && + (This->shader->version != BWRITERPS_VERSION(3, 0) || + (mod != BWRITERSPDM_MSAMPCENTROID && + mod != BWRITERSPDM_PARTIALPRECISION))) { + asmparser_message(This, "Line %u: Unsupported modifier in dcl instruction\n", This->line_no); + set_parse_status(&This->status, PARSE_ERR); + return; + } + + /* Check register type and modifiers */ + instr.dstmod = mod; + instr.shift = 0; + This->funcs->dstreg(This, &instr, reg); + + if(!record_declaration(This->shader, usage, num, mod, FALSE, reg->regnum, reg->u.writemask, FALSE)) { + ERR("Out of memory\n"); + set_parse_status(&This->status, PARSE_ERR); + } +} + +static void asmparser_dcl_input_ps_2(struct asm_parser *This, DWORD usage, DWORD num, + DWORD mod, const struct shader_reg *reg) { + struct instruction instr; + + if(!This->shader) return; + instr.dstmod = mod; + instr.shift = 0; + This->funcs->dstreg(This, &instr, reg); + if(!record_declaration(This->shader, usage, num, mod, FALSE, instr.dst.regnum, instr.dst.u.writemask, FALSE)) { + ERR("Out of memory\n"); + set_parse_status(&This->status, PARSE_ERR); + } +} + +static void asmparser_dcl_input_unsupported(struct asm_parser *This, + DWORD usage, DWORD num, DWORD mod, const struct shader_reg *reg) +{ + asmparser_message(This, "Line %u: Input declaration unsupported in this shader version\n", This->line_no); + set_parse_status(&This->status, PARSE_ERR); +} + +static void asmparser_dcl_sampler(struct asm_parser *This, DWORD samptype, + DWORD mod, DWORD regnum, + unsigned int line_no) { + if(!This->shader) return; + if(mod != 0 && + (This->shader->version != BWRITERPS_VERSION(3, 0) || + (mod != BWRITERSPDM_MSAMPCENTROID && + mod != BWRITERSPDM_PARTIALPRECISION))) { + asmparser_message(This, "Line %u: Unsupported modifier in dcl instruction\n", This->line_no); + set_parse_status(&This->status, PARSE_ERR); + return; + } + if(!record_sampler(This->shader, samptype, mod, regnum)) { + ERR("Out of memory\n"); + set_parse_status(&This->status, PARSE_ERR); + } +} + +static void asmparser_dcl_sampler_unsupported(struct asm_parser *This, + DWORD samptype, DWORD mod, DWORD regnum, unsigned int line_no) +{ + asmparser_message(This, "Line %u: Sampler declaration unsupported in this shader version\n", This->line_no); + set_parse_status(&This->status, PARSE_ERR); +} + +static void asmparser_sincos(struct asm_parser *This, DWORD mod, DWORD shift, + const struct shader_reg *dst, + const struct src_regs *srcs) { + struct instruction *instr; + + if(!srcs || srcs->count != 3) { + asmparser_message(This, "Line %u: sincos (vs 2) has an incorrect number of source registers\n", This->line_no); + set_parse_status(&This->status, PARSE_ERR); + return; + } + + instr = alloc_instr(3); + if(!instr) { + ERR("Error allocating memory for the instruction\n"); + set_parse_status(&This->status, PARSE_ERR); + return; + } + + instr->opcode = BWRITERSIO_SINCOS; + instr->dstmod = mod; + instr->shift = shift; + instr->comptype = 0; + + This->funcs->dstreg(This, instr, dst); + This->funcs->srcreg(This, instr, 0, &srcs->reg[0]); + This->funcs->srcreg(This, instr, 1, &srcs->reg[1]); + This->funcs->srcreg(This, instr, 2, &srcs->reg[2]); + + if(!add_instruction(This->shader, instr)) { + ERR("Out of memory\n"); + set_parse_status(&This->status, PARSE_ERR); + } +} + +static struct shader_reg map_oldps_register(const struct shader_reg *reg, BOOL tex_varying) { + struct shader_reg ret; + switch(reg->type) { + case BWRITERSPR_TEXTURE: + if(tex_varying) { + ret = *reg; + ret.type = BWRITERSPR_INPUT; + switch(reg->regnum) { + case 0: ret.regnum = T0_VARYING; break; + case 1: ret.regnum = T1_VARYING; break; + case 2: ret.regnum = T2_VARYING; break; + case 3: ret.regnum = T3_VARYING; break; + case 4: ret.regnum = T4_VARYING; break; + case 5: ret.regnum = T5_VARYING; break; + case 6: ret.regnum = T6_VARYING; break; + case 7: ret.regnum = T7_VARYING; break; + default: + FIXME("Unexpected TEXTURE register t%u\n", reg->regnum); + return *reg; + } + return ret; + } else { + ret = *reg; + ret.type = BWRITERSPR_TEMP; + switch(reg->regnum) { + case 0: ret.regnum = T0_REG; break; + case 1: ret.regnum = T1_REG; break; + case 2: ret.regnum = T2_REG; break; + case 3: ret.regnum = T3_REG; break; + default: + FIXME("Unexpected TEXTURE register t%u\n", reg->regnum); + return *reg; + } + return ret; + } + + /* case BWRITERSPR_INPUT - Identical mapping of 1.x/2.0 color varyings + to 3.0 ones */ + + default: return *reg; + } +} + +static void asmparser_texcoord(struct asm_parser *This, DWORD mod, DWORD shift, + const struct shader_reg *dst, + const struct src_regs *srcs) { + struct instruction *instr; + + if(srcs) { + asmparser_message(This, "Line %u: Source registers in texcoord instruction\n", This->line_no); + set_parse_status(&This->status, PARSE_ERR); + return; + } + + instr = alloc_instr(1); + if(!instr) { + ERR("Error allocating memory for the instruction\n"); + set_parse_status(&This->status, PARSE_ERR); + return; + } + + /* texcoord copies the texture coord data into a temporary register-like + * readable form. In newer shader models this equals a MOV from v0 to r0, + * record it as this. + */ + instr->opcode = BWRITERSIO_MOV; + instr->dstmod = mod | BWRITERSPDM_SATURATE; /* texcoord clamps to [0;1] */ + instr->shift = shift; + instr->comptype = 0; + + This->funcs->dstreg(This, instr, dst); + /* The src reg needs special care */ + instr->src[0] = map_oldps_register(dst, TRUE); + + if(!add_instruction(This->shader, instr)) { + ERR("Out of memory\n"); + set_parse_status(&This->status, PARSE_ERR); + } +} + +static void asmparser_texcrd(struct asm_parser *This, DWORD mod, DWORD shift, + const struct shader_reg *dst, + const struct src_regs *srcs) { + struct instruction *instr; + + if(!srcs || srcs->count != 1) { + asmparser_message(This, "Line %u: Wrong number of source registers in texcrd instruction\n", This->line_no); + set_parse_status(&This->status, PARSE_ERR); + return; + } + + instr = alloc_instr(1); + if(!instr) { + ERR("Error allocating memory for the instruction\n"); + set_parse_status(&This->status, PARSE_ERR); + return; + } + + /* The job of texcrd is done by mov in later shader versions */ + instr->opcode = BWRITERSIO_MOV; + instr->dstmod = mod; + instr->shift = shift; + instr->comptype = 0; + + This->funcs->dstreg(This, instr, dst); + This->funcs->srcreg(This, instr, 0, &srcs->reg[0]); + + if(!add_instruction(This->shader, instr)) { + ERR("Out of memory\n"); + set_parse_status(&This->status, PARSE_ERR); + } +} + +static void asmparser_texkill(struct asm_parser *This, + const struct shader_reg *dst) { + struct instruction *instr = alloc_instr(0); + + if(!instr) { + ERR("Error allocating memory for the instruction\n"); + set_parse_status(&This->status, PARSE_ERR); + return; + } + + instr->opcode = BWRITERSIO_TEXKILL; + instr->dstmod = 0; + instr->shift = 0; + instr->comptype = 0; + + /* Do not run the dst register through the normal + * register conversion. If used with ps_1_0 to ps_1_3 + * the texture coordinate from that register is used, + * not the temporary register value. In ps_1_4 and + * ps_2_0 t0 is always a varying and temporaries can + * be used with texkill. + */ + instr->dst = map_oldps_register(dst, TRUE); + instr->has_dst = TRUE; + + if(!add_instruction(This->shader, instr)) { + ERR("Out of memory\n"); + set_parse_status(&This->status, PARSE_ERR); + } +} + +static void asmparser_texhelper(struct asm_parser *This, DWORD mod, DWORD shift, + const struct shader_reg *dst, + const struct shader_reg *src0) { + struct instruction *instr = alloc_instr(2); + + if(!instr) { + ERR("Error allocating memory for the instruction\n"); + set_parse_status(&This->status, PARSE_ERR); + return; + } + + instr->opcode = BWRITERSIO_TEX; + instr->dstmod = mod; + instr->shift = shift; + instr->comptype = 0; + /* The dest register can be mapped normally to a temporary register */ + This->funcs->dstreg(This, instr, dst); + /* Use the src passed as parameter by the specific instruction handler */ + instr->src[0] = *src0; + + /* The 2nd source register is the sampler register with the + * destination's regnum + */ + ZeroMemory(&instr->src[1], sizeof(instr->src[1])); + instr->src[1].type = BWRITERSPR_SAMPLER; + instr->src[1].regnum = dst->regnum; + instr->src[1].u.swizzle = BWRITERVS_NOSWIZZLE; + instr->src[1].srcmod = BWRITERSPSM_NONE; + instr->src[1].rel_reg = NULL; + + if(!add_instruction(This->shader, instr)) { + ERR("Out of memory\n"); + set_parse_status(&This->status, PARSE_ERR); + } +} + +static void asmparser_tex(struct asm_parser *This, DWORD mod, DWORD shift, + const struct shader_reg *dst) { + struct shader_reg src; + + /* The first source register is the varying containing the coordinate */ + src = map_oldps_register(dst, TRUE); + asmparser_texhelper(This, mod, shift, dst, &src); +} + +static void asmparser_texld14(struct asm_parser *This, DWORD mod, DWORD shift, + const struct shader_reg *dst, + const struct src_regs *srcs) { + struct instruction *instr; + + if(!srcs || srcs->count != 1) { + asmparser_message(This, "Line %u: texld (PS 1.4) has a wrong number of source registers\n", This->line_no); + set_parse_status(&This->status, PARSE_ERR); + return; + } + + instr = alloc_instr(2); + if(!instr) { + ERR("Error allocating memory for the instruction\n"); + set_parse_status(&This->status, PARSE_ERR); + return; + } + + /* This code is recording a texld instruction, not tex. However, + * texld borrows the opcode of tex + */ + instr->opcode = BWRITERSIO_TEX; + instr->dstmod = mod; + instr->shift = shift; + instr->comptype = 0; + + This->funcs->dstreg(This, instr, dst); + This->funcs->srcreg(This, instr, 0, &srcs->reg[0]); + + /* The 2nd source register is the sampler register with the + * destination's regnum + */ + ZeroMemory(&instr->src[1], sizeof(instr->src[1])); + instr->src[1].type = BWRITERSPR_SAMPLER; + instr->src[1].regnum = dst->regnum; + instr->src[1].u.swizzle = BWRITERVS_NOSWIZZLE; + instr->src[1].srcmod = BWRITERSPSM_NONE; + instr->src[1].rel_reg = NULL; + + if(!add_instruction(This->shader, instr)) { + ERR("Out of memory\n"); + set_parse_status(&This->status, PARSE_ERR); + } +} + +static void asmparser_texreg2ar(struct asm_parser *This, DWORD mod, DWORD shift, + const struct shader_reg *dst, + const struct shader_reg *src0) { + struct shader_reg src; + + src = map_oldps_register(src0, FALSE); + /* Supply the correct swizzle */ + src.u.swizzle = BWRITERVS_X_W | BWRITERVS_Y_X | BWRITERVS_Z_X | BWRITERVS_W_X; + asmparser_texhelper(This, mod, shift, dst, &src); +} + +static void asmparser_texreg2gb(struct asm_parser *This, DWORD mod, DWORD shift, + const struct shader_reg *dst, + const struct shader_reg *src0) { + struct shader_reg src; + + src = map_oldps_register(src0, FALSE); + /* Supply the correct swizzle */ + src.u.swizzle = BWRITERVS_X_Y | BWRITERVS_Y_Z | BWRITERVS_Z_Z | BWRITERVS_W_Z; + asmparser_texhelper(This, mod, shift, dst, &src); +} + +static void asmparser_texreg2rgb(struct asm_parser *This, DWORD mod, DWORD shift, + const struct shader_reg *dst, + const struct shader_reg *src0) { + struct shader_reg src; + + src = map_oldps_register(src0, FALSE); + /* Supply the correct swizzle */ + src.u.swizzle = BWRITERVS_X_X | BWRITERVS_Y_Y | BWRITERVS_Z_Z | BWRITERVS_W_Z; + asmparser_texhelper(This, mod, shift, dst, &src); +} + +/* Complex pixel shader 1.3 instructions like texm3x3tex are tricky - the + * bytecode writer works instruction by instruction, so we can't properly + * convert these from/to equivalent ps_3_0 instructions. Then simply keep using + * the ps_1_3 opcodes and just adapt the registers in the common fashion (i.e. + * go through asmparser_instr). + */ + +static void asmparser_instr(struct asm_parser *This, DWORD opcode, + DWORD mod, DWORD shift, + BWRITER_COMPARISON_TYPE comp, + const struct shader_reg *dst, + const struct src_regs *srcs, int expectednsrcs) { + struct instruction *instr; + unsigned int i; + BOOL firstreg = TRUE; + unsigned int src_count = srcs ? srcs->count : 0; + + if(!This->shader) return; + + TRACE_(parsed_shader)("%s%s%s%s ", debug_print_opcode(opcode), + debug_print_dstmod(mod), + debug_print_shift(shift), + debug_print_comp(comp)); + if(dst) { + TRACE_(parsed_shader)("%s", debug_print_dstreg(dst)); + firstreg = FALSE; + } + for(i = 0; i < src_count; i++) { + if(!firstreg) TRACE_(parsed_shader)(", "); + else firstreg = FALSE; + TRACE_(parsed_shader)("%s", debug_print_srcreg(&srcs->reg[i])); + } + TRACE_(parsed_shader)("\n"); + + /* Check for instructions with different syntaxes in different shader versions */ + switch(opcode) { + case BWRITERSIO_SINCOS: + /* The syntax changes between vs 2 and the other shader versions */ + if(This->shader->version == BWRITERVS_VERSION(2, 0) || + This->shader->version == BWRITERVS_VERSION(2, 1)) { + asmparser_sincos(This, mod, shift, dst, srcs); + return; + } + /* Use the default handling */ + break; + case BWRITERSIO_TEXCOORD: + /* texcoord/texcrd are two instructions present only in PS <= 1.3 and PS 1.4 respectively */ + if(This->shader->version == BWRITERPS_VERSION(1, 4)) + asmparser_texcrd(This, mod, shift, dst, srcs); + else asmparser_texcoord(This, mod, shift, dst, srcs); + return; + case BWRITERSIO_TEX: + /* this encodes both the tex PS 1.x instruction and the + texld 1.4/2.0+ instruction */ + if(This->shader->version == BWRITERPS_VERSION(1, 0) || + This->shader->version == BWRITERPS_VERSION(1, 1) || + This->shader->version == BWRITERPS_VERSION(1, 2) || + This->shader->version == BWRITERPS_VERSION(1, 3)) { + asmparser_tex(This, mod, shift, dst); + return; + } + else if(This->shader->version == BWRITERPS_VERSION(1, 4)) { + asmparser_texld14(This, mod, shift, dst, srcs); + return; + } + /* else fallback to the standard behavior */ + break; + } + + if(src_count != expectednsrcs) { + asmparser_message(This, "Line %u: Wrong number of source registers\n", This->line_no); + set_parse_status(&This->status, PARSE_ERR); + return; + } + + /* Handle PS 1.x instructions, "regularizing" them */ + switch(opcode) { + case BWRITERSIO_TEXKILL: + asmparser_texkill(This, dst); + return; + case BWRITERSIO_TEXREG2AR: + asmparser_texreg2ar(This, mod, shift, dst, &srcs->reg[0]); + return; + case BWRITERSIO_TEXREG2GB: + asmparser_texreg2gb(This, mod, shift, dst, &srcs->reg[0]); + return; + case BWRITERSIO_TEXREG2RGB: + asmparser_texreg2rgb(This, mod, shift, dst, &srcs->reg[0]); + return; + } + + instr = alloc_instr(src_count); + if(!instr) { + ERR("Error allocating memory for the instruction\n"); + set_parse_status(&This->status, PARSE_ERR); + return; + } + + instr->opcode = opcode; + instr->dstmod = mod; + instr->shift = shift; + instr->comptype = comp; + if(dst) This->funcs->dstreg(This, instr, dst); + for(i = 0; i < src_count; i++) { + This->funcs->srcreg(This, instr, i, &srcs->reg[i]); + } + + if(!add_instruction(This->shader, instr)) { + ERR("Out of memory\n"); + set_parse_status(&This->status, PARSE_ERR); + } +} + +static struct shader_reg map_oldvs_register(const struct shader_reg *reg) { + struct shader_reg ret; + switch(reg->type) { + case BWRITERSPR_RASTOUT: + ret = *reg; + ret.type = BWRITERSPR_OUTPUT; + switch(reg->regnum) { + case BWRITERSRO_POSITION: + ret.regnum = OPOS_REG; + break; + case BWRITERSRO_FOG: + ret.regnum = OFOG_REG; + ret.u.writemask = OFOG_WRITEMASK; + break; + case BWRITERSRO_POINT_SIZE: + ret.regnum = OPTS_REG; + ret.u.writemask = OPTS_WRITEMASK; + break; + default: + FIXME("Unhandled RASTOUT register %u\n", reg->regnum); + return *reg; + } + return ret; + + case BWRITERSPR_TEXCRDOUT: + ret = *reg; + ret.type = BWRITERSPR_OUTPUT; + switch(reg->regnum) { + case 0: ret.regnum = OT0_REG; break; + case 1: ret.regnum = OT1_REG; break; + case 2: ret.regnum = OT2_REG; break; + case 3: ret.regnum = OT3_REG; break; + case 4: ret.regnum = OT4_REG; break; + case 5: ret.regnum = OT5_REG; break; + case 6: ret.regnum = OT6_REG; break; + case 7: ret.regnum = OT7_REG; break; + default: + FIXME("Unhandled TEXCRDOUT regnum %u\n", reg->regnum); + return *reg; + } + return ret; + + case BWRITERSPR_ATTROUT: + ret = *reg; + ret.type = BWRITERSPR_OUTPUT; + switch(reg->regnum) { + case 0: ret.regnum = OD0_REG; break; + case 1: ret.regnum = OD1_REG; break; + default: + FIXME("Unhandled ATTROUT regnum %u\n", reg->regnum); + return *reg; + } + return ret; + + default: return *reg; + } +} + +/* Checks for unsupported source modifiers in VS (all versions) or + PS 2.0 and newer */ +static void check_legacy_srcmod(struct asm_parser *This, DWORD srcmod) { + if(srcmod == BWRITERSPSM_BIAS || srcmod == BWRITERSPSM_BIASNEG || + srcmod == BWRITERSPSM_SIGN || srcmod == BWRITERSPSM_SIGNNEG || + srcmod == BWRITERSPSM_COMP || srcmod == BWRITERSPSM_X2 || + srcmod == BWRITERSPSM_X2NEG || srcmod == BWRITERSPSM_DZ || + srcmod == BWRITERSPSM_DW) { + asmparser_message(This, "Line %u: Source modifier %s not supported in this shader version\n", + This->line_no, + debug_print_srcmod(srcmod)); + set_parse_status(&This->status, PARSE_ERR); + } +} + +static void check_abs_srcmod(struct asm_parser *This, DWORD srcmod) { + if(srcmod == BWRITERSPSM_ABS || srcmod == BWRITERSPSM_ABSNEG) { + asmparser_message(This, "Line %u: Source modifier %s not supported in this shader version\n", + This->line_no, + debug_print_srcmod(srcmod)); + set_parse_status(&This->status, PARSE_ERR); + } +} + +static void check_loop_swizzle(struct asm_parser *This, + const struct shader_reg *src) { + if((src->type == BWRITERSPR_LOOP && src->u.swizzle != BWRITERVS_NOSWIZZLE) || + (src->rel_reg && src->rel_reg->type == BWRITERSPR_LOOP && + src->rel_reg->u.swizzle != BWRITERVS_NOSWIZZLE)) { + asmparser_message(This, "Line %u: Swizzle not allowed on aL register\n", This->line_no); + set_parse_status(&This->status, PARSE_ERR); + } +} + +static void check_shift_dstmod(struct asm_parser *This, DWORD shift) { + if(shift != 0) { + asmparser_message(This, "Line %u: Shift modifiers not supported in this shader version\n", + This->line_no); + set_parse_status(&This->status, PARSE_ERR); + } +} + +static void check_ps_dstmod(struct asm_parser *This, DWORD dstmod) { + if(dstmod == BWRITERSPDM_PARTIALPRECISION || + dstmod == BWRITERSPDM_MSAMPCENTROID) { + asmparser_message(This, "Line %u: Instruction modifier %s not supported in this shader version\n", + This->line_no, + debug_print_dstmod(dstmod)); + set_parse_status(&This->status, PARSE_ERR); + } +} + +struct allowed_reg_type { + DWORD type; + DWORD count; + BOOL reladdr; +}; + +static BOOL check_reg_type(const struct shader_reg *reg, + const struct allowed_reg_type *allowed) { + unsigned int i = 0; + + while(allowed[i].type != ~0U) { + if(reg->type == allowed[i].type) { + if(reg->rel_reg) { + if(allowed[i].reladdr) + return TRUE; /* The relative addressing register + can have a negative value, we + can't check the register index */ + return FALSE; + } + if(reg->regnum < allowed[i].count) return TRUE; + return FALSE; + } + i++; + } + return FALSE; +} + +/* Native assembler doesn't do separate checks for src and dst registers */ +static const struct allowed_reg_type vs_1_reg_allowed[] = { + { BWRITERSPR_TEMP, 12, FALSE }, + { BWRITERSPR_INPUT, 16, FALSE }, + { BWRITERSPR_CONST, ~0U, TRUE }, + { BWRITERSPR_ADDR, 1, FALSE }, + { BWRITERSPR_RASTOUT, 3, FALSE }, /* oPos, oFog and oPts */ + { BWRITERSPR_ATTROUT, 2, FALSE }, + { BWRITERSPR_TEXCRDOUT, 8, FALSE }, + { ~0U, 0 } /* End tag */ +}; + +/* struct instruction *asmparser_srcreg + * + * Records a source register in the instruction and does shader version + * specific checks and modifications on it + * + * Parameters: + * This: Shader parser instance + * instr: instruction to store the register in + * num: Number of source register + * src: Pointer to source the register structure. The caller can free + * it afterwards + */ +static void asmparser_srcreg_vs_1(struct asm_parser *This, + struct instruction *instr, int num, + const struct shader_reg *src) { + struct shader_reg reg; + + if(!check_reg_type(src, vs_1_reg_allowed)) { + asmparser_message(This, "Line %u: Source register %s not supported in VS 1\n", + This->line_no, + debug_print_srcreg(src)); + set_parse_status(&This->status, PARSE_ERR); + } + check_legacy_srcmod(This, src->srcmod); + check_abs_srcmod(This, src->srcmod); + reg = map_oldvs_register(src); + instr->src[num] = reg; +} + +static const struct allowed_reg_type vs_2_reg_allowed[] = { + { BWRITERSPR_TEMP, 12, FALSE }, + { BWRITERSPR_INPUT, 16, FALSE }, + { BWRITERSPR_CONST, ~0U, TRUE }, + { BWRITERSPR_ADDR, 1, FALSE }, + { BWRITERSPR_CONSTBOOL, 16, FALSE }, + { BWRITERSPR_CONSTINT, 16, FALSE }, + { BWRITERSPR_LOOP, 1, FALSE }, + { BWRITERSPR_LABEL, 2048, FALSE }, + { BWRITERSPR_PREDICATE, 1, FALSE }, + { BWRITERSPR_RASTOUT, 3, FALSE }, /* oPos, oFog and oPts */ + { BWRITERSPR_ATTROUT, 2, FALSE }, + { BWRITERSPR_TEXCRDOUT, 8, FALSE }, + { ~0U, 0 } /* End tag */ +}; + +static void asmparser_srcreg_vs_2(struct asm_parser *This, + struct instruction *instr, int num, + const struct shader_reg *src) { + struct shader_reg reg; + + if(!check_reg_type(src, vs_2_reg_allowed)) { + asmparser_message(This, "Line %u: Source register %s not supported in VS 2\n", + This->line_no, + debug_print_srcreg(src)); + set_parse_status(&This->status, PARSE_ERR); + } + check_loop_swizzle(This, src); + check_legacy_srcmod(This, src->srcmod); + check_abs_srcmod(This, src->srcmod); + reg = map_oldvs_register(src); + instr->src[num] = reg; +} + +static const struct allowed_reg_type vs_3_reg_allowed[] = { + { BWRITERSPR_TEMP, 32, FALSE }, + { BWRITERSPR_INPUT, 16, TRUE }, + { BWRITERSPR_CONST, ~0U, TRUE }, + { BWRITERSPR_ADDR, 1, FALSE }, + { BWRITERSPR_CONSTBOOL, 16, FALSE }, + { BWRITERSPR_CONSTINT, 16, FALSE }, + { BWRITERSPR_LOOP, 1, FALSE }, + { BWRITERSPR_LABEL, 2048, FALSE }, + { BWRITERSPR_PREDICATE, 1, FALSE }, + { BWRITERSPR_SAMPLER, 4, FALSE }, + { BWRITERSPR_OUTPUT, 12, TRUE }, + { ~0U, 0 } /* End tag */ +}; + +static void asmparser_srcreg_vs_3(struct asm_parser *This, + struct instruction *instr, int num, + const struct shader_reg *src) { + if(!check_reg_type(src, vs_3_reg_allowed)) { + asmparser_message(This, "Line %u: Source register %s not supported in VS 3.0\n", + This->line_no, + debug_print_srcreg(src)); + set_parse_status(&This->status, PARSE_ERR); + } + check_loop_swizzle(This, src); + check_legacy_srcmod(This, src->srcmod); + instr->src[num] = *src; +} + +static const struct allowed_reg_type ps_1_0123_reg_allowed[] = { + { BWRITERSPR_CONST, 8, FALSE }, + { BWRITERSPR_TEMP, 2, FALSE }, + { BWRITERSPR_TEXTURE, 4, FALSE }, + { BWRITERSPR_INPUT, 2, FALSE }, + { ~0U, 0 } /* End tag */ +}; + +static void asmparser_srcreg_ps_1_0123(struct asm_parser *This, + struct instruction *instr, int num, + const struct shader_reg *src) { + struct shader_reg reg; + + if(!check_reg_type(src, ps_1_0123_reg_allowed)) { + asmparser_message(This, "Line %u: Source register %s not supported in <== PS 1.3\n", + This->line_no, + debug_print_srcreg(src)); + set_parse_status(&This->status, PARSE_ERR); + } + check_abs_srcmod(This, src->srcmod); + reg = map_oldps_register(src, FALSE); + instr->src[num] = reg; +} + +static const struct allowed_reg_type ps_1_4_reg_allowed[] = { + { BWRITERSPR_CONST, 8, FALSE }, + { BWRITERSPR_TEMP, 6, FALSE }, + { BWRITERSPR_TEXTURE, 6, FALSE }, + { BWRITERSPR_INPUT, 2, FALSE }, + { ~0U, 0 } /* End tag */ +}; + +static void asmparser_srcreg_ps_1_4(struct asm_parser *This, + struct instruction *instr, int num, + const struct shader_reg *src) { + struct shader_reg reg; + + if(!check_reg_type(src, ps_1_4_reg_allowed)) { + asmparser_message(This, "Line %u: Source register %s not supported in PS 1.4\n", + This->line_no, + debug_print_srcreg(src)); + set_parse_status(&This->status, PARSE_ERR); + } + check_abs_srcmod(This, src->srcmod); + reg = map_oldps_register(src, TRUE); + instr->src[num] = reg; +} + +static const struct allowed_reg_type ps_2_0_reg_allowed[] = { + { BWRITERSPR_INPUT, 2, FALSE }, + { BWRITERSPR_TEMP, 32, FALSE }, + { BWRITERSPR_CONST, 32, FALSE }, + { BWRITERSPR_CONSTINT, 16, FALSE }, + { BWRITERSPR_CONSTBOOL, 16, FALSE }, + { BWRITERSPR_SAMPLER, 16, FALSE }, + { BWRITERSPR_TEXTURE, 8, FALSE }, + { BWRITERSPR_COLOROUT, 4, FALSE }, + { BWRITERSPR_DEPTHOUT, 1, FALSE }, + { ~0U, 0 } /* End tag */ +}; + +static void asmparser_srcreg_ps_2(struct asm_parser *This, + struct instruction *instr, int num, + const struct shader_reg *src) { + struct shader_reg reg; + + if(!check_reg_type(src, ps_2_0_reg_allowed)) { + asmparser_message(This, "Line %u: Source register %s not supported in PS 2.0\n", + This->line_no, + debug_print_srcreg(src)); + set_parse_status(&This->status, PARSE_ERR); + } + check_legacy_srcmod(This, src->srcmod); + check_abs_srcmod(This, src->srcmod); + reg = map_oldps_register(src, TRUE); + instr->src[num] = reg; +} + +static const struct allowed_reg_type ps_2_x_reg_allowed[] = { + { BWRITERSPR_INPUT, 2, FALSE }, + { BWRITERSPR_TEMP, 32, FALSE }, + { BWRITERSPR_CONST, 32, FALSE }, + { BWRITERSPR_CONSTINT, 16, FALSE }, + { BWRITERSPR_CONSTBOOL, 16, FALSE }, + { BWRITERSPR_PREDICATE, 1, FALSE }, + { BWRITERSPR_SAMPLER, 16, FALSE }, + { BWRITERSPR_TEXTURE, 8, FALSE }, + { BWRITERSPR_LABEL, 2048, FALSE }, + { BWRITERSPR_COLOROUT, 4, FALSE }, + { BWRITERSPR_DEPTHOUT, 1, FALSE }, + { ~0U, 0 } /* End tag */ +}; + +static void asmparser_srcreg_ps_2_x(struct asm_parser *This, + struct instruction *instr, int num, + const struct shader_reg *src) { + struct shader_reg reg; + + if(!check_reg_type(src, ps_2_x_reg_allowed)) { + asmparser_message(This, "Line %u: Source register %s not supported in PS 2.x\n", + This->line_no, + debug_print_srcreg(src)); + set_parse_status(&This->status, PARSE_ERR); + } + check_legacy_srcmod(This, src->srcmod); + check_abs_srcmod(This, src->srcmod); + reg = map_oldps_register(src, TRUE); + instr->src[num] = reg; +} + +static const struct allowed_reg_type ps_3_reg_allowed[] = { + { BWRITERSPR_INPUT, 10, TRUE }, + { BWRITERSPR_TEMP, 32, FALSE }, + { BWRITERSPR_CONST, 224, FALSE }, + { BWRITERSPR_CONSTINT, 16, FALSE }, + { BWRITERSPR_CONSTBOOL, 16, FALSE }, + { BWRITERSPR_PREDICATE, 1, FALSE }, + { BWRITERSPR_SAMPLER, 16, FALSE }, + { BWRITERSPR_MISCTYPE, 2, FALSE }, /* vPos and vFace */ + { BWRITERSPR_LOOP, 1, FALSE }, + { BWRITERSPR_LABEL, 2048, FALSE }, + { BWRITERSPR_COLOROUT, 4, FALSE }, + { BWRITERSPR_DEPTHOUT, 1, FALSE }, + { ~0U, 0 } /* End tag */ +}; + +static void asmparser_srcreg_ps_3(struct asm_parser *This, + struct instruction *instr, int num, + const struct shader_reg *src) { + if(!check_reg_type(src, ps_3_reg_allowed)) { + asmparser_message(This, "Line %u: Source register %s not supported in PS 3.0\n", + This->line_no, + debug_print_srcreg(src)); + set_parse_status(&This->status, PARSE_ERR); + } + check_loop_swizzle(This, src); + check_legacy_srcmod(This, src->srcmod); + instr->src[num] = *src; +} + +static void asmparser_dstreg_vs_1(struct asm_parser *This, + struct instruction *instr, + const struct shader_reg *dst) { + struct shader_reg reg; + + if(!check_reg_type(dst, vs_1_reg_allowed)) { + asmparser_message(This, "Line %u: Destination register %s not supported in VS 1\n", + This->line_no, + debug_print_dstreg(dst)); + set_parse_status(&This->status, PARSE_ERR); + } + check_ps_dstmod(This, instr->dstmod); + check_shift_dstmod(This, instr->shift); + reg = map_oldvs_register(dst); + instr->dst = reg; + instr->has_dst = TRUE; +} + +static void asmparser_dstreg_vs_2(struct asm_parser *This, + struct instruction *instr, + const struct shader_reg *dst) { + struct shader_reg reg; + + if(!check_reg_type(dst, vs_2_reg_allowed)) { + asmparser_message(This, "Line %u: Destination register %s not supported in VS 2.0\n", + This->line_no, + debug_print_dstreg(dst)); + set_parse_status(&This->status, PARSE_ERR); + } + check_ps_dstmod(This, instr->dstmod); + check_shift_dstmod(This, instr->shift); + reg = map_oldvs_register(dst); + instr->dst = reg; + instr->has_dst = TRUE; +} + +static void asmparser_dstreg_vs_3(struct asm_parser *This, + struct instruction *instr, + const struct shader_reg *dst) { + if(!check_reg_type(dst, vs_3_reg_allowed)) { + asmparser_message(This, "Line %u: Destination register %s not supported in VS 3.0\n", + This->line_no, + debug_print_dstreg(dst)); + set_parse_status(&This->status, PARSE_ERR); + } + check_ps_dstmod(This, instr->dstmod); + check_shift_dstmod(This, instr->shift); + instr->dst = *dst; + instr->has_dst = TRUE; +} + +static void asmparser_dstreg_ps_1_0123(struct asm_parser *This, + struct instruction *instr, + const struct shader_reg *dst) { + struct shader_reg reg; + + if(!check_reg_type(dst, ps_1_0123_reg_allowed)) { + asmparser_message(This, "Line %u: Destination register %s not supported in PS 1\n", + This->line_no, + debug_print_dstreg(dst)); + set_parse_status(&This->status, PARSE_ERR); + } + reg = map_oldps_register(dst, FALSE); + instr->dst = reg; + instr->has_dst = TRUE; +} + +static void asmparser_dstreg_ps_1_4(struct asm_parser *This, + struct instruction *instr, + const struct shader_reg *dst) { + struct shader_reg reg; + + if(!check_reg_type(dst, ps_1_4_reg_allowed)) { + asmparser_message(This, "Line %u: Destination register %s not supported in PS 1\n", + This->line_no, + debug_print_dstreg(dst)); + set_parse_status(&This->status, PARSE_ERR); + } + reg = map_oldps_register(dst, TRUE); + instr->dst = reg; + instr->has_dst = TRUE; +} + +static void asmparser_dstreg_ps_2(struct asm_parser *This, + struct instruction *instr, + const struct shader_reg *dst) { + struct shader_reg reg; + + if(!check_reg_type(dst, ps_2_0_reg_allowed)) { + asmparser_message(This, "Line %u: Destination register %s not supported in PS 2.0\n", + This->line_no, + debug_print_dstreg(dst)); + set_parse_status(&This->status, PARSE_ERR); + } + check_shift_dstmod(This, instr->shift); + reg = map_oldps_register(dst, TRUE); + instr->dst = reg; + instr->has_dst = TRUE; +} + +static void asmparser_dstreg_ps_2_x(struct asm_parser *This, + struct instruction *instr, + const struct shader_reg *dst) { + struct shader_reg reg; + + if(!check_reg_type(dst, ps_2_x_reg_allowed)) { + asmparser_message(This, "Line %u: Destination register %s not supported in PS 2.x\n", + This->line_no, + debug_print_dstreg(dst)); + set_parse_status(&This->status, PARSE_ERR); + } + check_shift_dstmod(This, instr->shift); + reg = map_oldps_register(dst, TRUE); + instr->dst = reg; + instr->has_dst = TRUE; +} + +static void asmparser_dstreg_ps_3(struct asm_parser *This, + struct instruction *instr, + const struct shader_reg *dst) { + if(!check_reg_type(dst, ps_3_reg_allowed)) { + asmparser_message(This, "Line %u: Destination register %s not supported in PS 3.0\n", + This->line_no, + debug_print_dstreg(dst)); + set_parse_status(&This->status, PARSE_ERR); + } + check_shift_dstmod(This, instr->shift); + instr->dst = *dst; + instr->has_dst = TRUE; +} + +static void asmparser_predicate_supported(struct asm_parser *This, + const struct shader_reg *predicate) { + /* this sets the predicate of the last instruction added to the shader */ + if(!This->shader) return; + if(This->shader->num_instrs == 0) ERR("Predicate without an instruction\n"); + This->shader->instr[This->shader->num_instrs - 1]->has_predicate = TRUE; + This->shader->instr[This->shader->num_instrs - 1]->predicate = *predicate; +} + +static void asmparser_predicate_unsupported(struct asm_parser *This, + const struct shader_reg *predicate) { + asmparser_message(This, "Line %u: Predicate not supported in < VS 2.0 or PS 2.x\n", This->line_no); + set_parse_status(&This->status, PARSE_ERR); +} + +static void asmparser_coissue_supported(struct asm_parser *This) { + /* this sets the coissue flag of the last instruction added to the shader */ + if(!This->shader) return; + if(This->shader->num_instrs == 0){ + asmparser_message(This, "Line %u: Coissue flag on the first shader instruction\n", This->line_no); + set_parse_status(&This->status, PARSE_ERR); + } + This->shader->instr[This->shader->num_instrs-1]->coissue = TRUE; +} + +static void asmparser_coissue_unsupported(struct asm_parser *This) { + asmparser_message(This, "Line %u: Coissue is only supported in pixel shaders versions <= 1.4\n", This->line_no); + set_parse_status(&This->status, PARSE_ERR); +} + +static const struct asmparser_backend parser_vs_1 = { + asmparser_constF, + asmparser_constI, + asmparser_constB, + + asmparser_dstreg_vs_1, + asmparser_srcreg_vs_1, + + asmparser_predicate_unsupported, + asmparser_coissue_unsupported, + + asmparser_dcl_output_unsupported, + asmparser_dcl_input, + asmparser_dcl_sampler_unsupported, + + asmparser_end, + + asmparser_instr, +}; + +static const struct asmparser_backend parser_vs_2 = { + asmparser_constF, + asmparser_constI, + asmparser_constB, + + asmparser_dstreg_vs_2, + asmparser_srcreg_vs_2, + + asmparser_predicate_supported, + asmparser_coissue_unsupported, + + asmparser_dcl_output_unsupported, + asmparser_dcl_input, + asmparser_dcl_sampler_unsupported, + + asmparser_end, + + asmparser_instr, +}; + +static const struct asmparser_backend parser_vs_3 = { + asmparser_constF, + asmparser_constI, + asmparser_constB, + + asmparser_dstreg_vs_3, + asmparser_srcreg_vs_3, + + asmparser_predicate_supported, + asmparser_coissue_unsupported, + + asmparser_dcl_output, + asmparser_dcl_input, + asmparser_dcl_sampler, + + asmparser_end, + + asmparser_instr, +}; + +static const struct asmparser_backend parser_ps_1_0123 = { + asmparser_constF, + asmparser_constI, + asmparser_constB, + + asmparser_dstreg_ps_1_0123, + asmparser_srcreg_ps_1_0123, + + asmparser_predicate_unsupported, + asmparser_coissue_supported, + + asmparser_dcl_output_unsupported, + asmparser_dcl_input_unsupported, + asmparser_dcl_sampler_unsupported, + + asmparser_end, + + asmparser_instr, +}; + +static const struct asmparser_backend parser_ps_1_4 = { + asmparser_constF, + asmparser_constI, + asmparser_constB, + + asmparser_dstreg_ps_1_4, + asmparser_srcreg_ps_1_4, + + asmparser_predicate_unsupported, + asmparser_coissue_supported, + + asmparser_dcl_output_unsupported, + asmparser_dcl_input_unsupported, + asmparser_dcl_sampler_unsupported, + + asmparser_end, + + asmparser_instr, +}; + +static const struct asmparser_backend parser_ps_2 = { + asmparser_constF, + asmparser_constI, + asmparser_constB, + + asmparser_dstreg_ps_2, + asmparser_srcreg_ps_2, + + asmparser_predicate_unsupported, + asmparser_coissue_unsupported, + + asmparser_dcl_output_unsupported, + asmparser_dcl_input_ps_2, + asmparser_dcl_sampler, + + asmparser_end, + + asmparser_instr, +}; + +static const struct asmparser_backend parser_ps_2_x = { + asmparser_constF, + asmparser_constI, + asmparser_constB, + + asmparser_dstreg_ps_2_x, + asmparser_srcreg_ps_2_x, + + asmparser_predicate_supported, + asmparser_coissue_unsupported, + + asmparser_dcl_output_unsupported, + asmparser_dcl_input_ps_2, + asmparser_dcl_sampler, + + asmparser_end, + + asmparser_instr, +}; + +static const struct asmparser_backend parser_ps_3 = { + asmparser_constF, + asmparser_constI, + asmparser_constB, + + asmparser_dstreg_ps_3, + asmparser_srcreg_ps_3, + + asmparser_predicate_supported, + asmparser_coissue_unsupported, + + asmparser_dcl_output_unsupported, + asmparser_dcl_input, + asmparser_dcl_sampler, + + asmparser_end, + + asmparser_instr, +}; + +static void gen_oldvs_output(struct bwriter_shader *shader) { + record_declaration(shader, BWRITERDECLUSAGE_POSITION, 0, 0, TRUE, OPOS_REG, BWRITERSP_WRITEMASK_ALL, TRUE); + record_declaration(shader, BWRITERDECLUSAGE_TEXCOORD, 0, 0, TRUE, OT0_REG, BWRITERSP_WRITEMASK_ALL, TRUE); + record_declaration(shader, BWRITERDECLUSAGE_TEXCOORD, 1, 0, TRUE, OT1_REG, BWRITERSP_WRITEMASK_ALL, TRUE); + record_declaration(shader, BWRITERDECLUSAGE_TEXCOORD, 2, 0, TRUE, OT2_REG, BWRITERSP_WRITEMASK_ALL, TRUE); + record_declaration(shader, BWRITERDECLUSAGE_TEXCOORD, 3, 0, TRUE, OT3_REG, BWRITERSP_WRITEMASK_ALL, TRUE); + record_declaration(shader, BWRITERDECLUSAGE_TEXCOORD, 4, 0, TRUE, OT4_REG, BWRITERSP_WRITEMASK_ALL, TRUE); + record_declaration(shader, BWRITERDECLUSAGE_TEXCOORD, 5, 0, TRUE, OT5_REG, BWRITERSP_WRITEMASK_ALL, TRUE); + record_declaration(shader, BWRITERDECLUSAGE_TEXCOORD, 6, 0, TRUE, OT6_REG, BWRITERSP_WRITEMASK_ALL, TRUE); + record_declaration(shader, BWRITERDECLUSAGE_TEXCOORD, 7, 0, TRUE, OT7_REG, BWRITERSP_WRITEMASK_ALL, TRUE); + record_declaration(shader, BWRITERDECLUSAGE_FOG, 0, 0, TRUE, OFOG_REG, OFOG_WRITEMASK, TRUE); + record_declaration(shader, BWRITERDECLUSAGE_PSIZE, 0, 0, TRUE, OPTS_REG, OPTS_WRITEMASK, TRUE); + record_declaration(shader, BWRITERDECLUSAGE_COLOR, 0, 0, TRUE, OD0_REG, BWRITERSP_WRITEMASK_ALL, TRUE); + record_declaration(shader, BWRITERDECLUSAGE_COLOR, 1, 0, TRUE, OD1_REG, BWRITERSP_WRITEMASK_ALL, TRUE); +} + +static void gen_oldps_input(struct bwriter_shader *shader, DWORD texcoords) { + switch(texcoords) { + case 8: record_declaration(shader, BWRITERDECLUSAGE_TEXCOORD, 7, 0, FALSE, T7_VARYING, BWRITERSP_WRITEMASK_ALL, TRUE); + /* fall through */ + case 7: record_declaration(shader, BWRITERDECLUSAGE_TEXCOORD, 6, 0, FALSE, T6_VARYING, BWRITERSP_WRITEMASK_ALL, TRUE); + /* fall through */ + case 6: record_declaration(shader, BWRITERDECLUSAGE_TEXCOORD, 5, 0, FALSE, T5_VARYING, BWRITERSP_WRITEMASK_ALL, TRUE); + /* fall through */ + case 5: record_declaration(shader, BWRITERDECLUSAGE_TEXCOORD, 4, 0, FALSE, T4_VARYING, BWRITERSP_WRITEMASK_ALL, TRUE); + /* fall through */ + case 4: record_declaration(shader, BWRITERDECLUSAGE_TEXCOORD, 3, 0, FALSE, T3_VARYING, BWRITERSP_WRITEMASK_ALL, TRUE); + /* fall through */ + case 3: record_declaration(shader, BWRITERDECLUSAGE_TEXCOORD, 2, 0, FALSE, T2_VARYING, BWRITERSP_WRITEMASK_ALL, TRUE); + /* fall through */ + case 2: record_declaration(shader, BWRITERDECLUSAGE_TEXCOORD, 1, 0, FALSE, T1_VARYING, BWRITERSP_WRITEMASK_ALL, TRUE); + /* fall through */ + case 1: record_declaration(shader, BWRITERDECLUSAGE_TEXCOORD, 0, 0, FALSE, T0_VARYING, BWRITERSP_WRITEMASK_ALL, TRUE); + }; + record_declaration(shader, BWRITERDECLUSAGE_COLOR, 0, 0, FALSE, C0_VARYING, BWRITERSP_WRITEMASK_ALL, TRUE); + record_declaration(shader, BWRITERDECLUSAGE_COLOR, 1, 0, FALSE, C1_VARYING, BWRITERSP_WRITEMASK_ALL, TRUE); +} + +void create_vs10_parser(struct asm_parser *ret) { + TRACE_(parsed_shader)("vs_1_0\n"); + + ret->shader = d3dcompiler_alloc(sizeof(*ret->shader)); + if(!ret->shader) { + ERR("Failed to allocate memory for the shader\n"); + set_parse_status(&ret->status, PARSE_ERR); + return; + } + + ret->shader->type = ST_VERTEX; + ret->shader->version = BWRITERVS_VERSION(1, 0); + ret->funcs = &parser_vs_1; + gen_oldvs_output(ret->shader); +} + +void create_vs11_parser(struct asm_parser *ret) { + TRACE_(parsed_shader)("vs_1_1\n"); + + ret->shader = d3dcompiler_alloc(sizeof(*ret->shader)); + if(!ret->shader) { + ERR("Failed to allocate memory for the shader\n"); + set_parse_status(&ret->status, PARSE_ERR); + return; + } + + ret->shader->type = ST_VERTEX; + ret->shader->version = BWRITERVS_VERSION(1, 1); + ret->funcs = &parser_vs_1; + gen_oldvs_output(ret->shader); +} + +void create_vs20_parser(struct asm_parser *ret) { + TRACE_(parsed_shader)("vs_2_0\n"); + + ret->shader = d3dcompiler_alloc(sizeof(*ret->shader)); + if(!ret->shader) { + ERR("Failed to allocate memory for the shader\n"); + set_parse_status(&ret->status, PARSE_ERR); + return; + } + + ret->shader->type = ST_VERTEX; + ret->shader->version = BWRITERVS_VERSION(2, 0); + ret->funcs = &parser_vs_2; + gen_oldvs_output(ret->shader); +} + +void create_vs2x_parser(struct asm_parser *ret) { + TRACE_(parsed_shader)("vs_2_x\n"); + + ret->shader = d3dcompiler_alloc(sizeof(*ret->shader)); + if(!ret->shader) { + ERR("Failed to allocate memory for the shader\n"); + set_parse_status(&ret->status, PARSE_ERR); + return; + } + + ret->shader->type = ST_VERTEX; + ret->shader->version = BWRITERVS_VERSION(2, 1); + ret->funcs = &parser_vs_2; + gen_oldvs_output(ret->shader); +} + +void create_vs30_parser(struct asm_parser *ret) { + TRACE_(parsed_shader)("vs_3_0\n"); + + ret->shader = d3dcompiler_alloc(sizeof(*ret->shader)); + if(!ret->shader) { + ERR("Failed to allocate memory for the shader\n"); + set_parse_status(&ret->status, PARSE_ERR); + return; + } + + ret->shader->type = ST_VERTEX; + ret->shader->version = BWRITERVS_VERSION(3, 0); + ret->funcs = &parser_vs_3; +} + +void create_ps10_parser(struct asm_parser *ret) { + TRACE_(parsed_shader)("ps_1_0\n"); + + ret->shader = d3dcompiler_alloc(sizeof(*ret->shader)); + if(!ret->shader) { + ERR("Failed to allocate memory for the shader\n"); + set_parse_status(&ret->status, PARSE_ERR); + return; + } + + ret->shader->type = ST_PIXEL; + ret->shader->version = BWRITERPS_VERSION(1, 0); + ret->funcs = &parser_ps_1_0123; + gen_oldps_input(ret->shader, 4); +} + +void create_ps11_parser(struct asm_parser *ret) { + TRACE_(parsed_shader)("ps_1_1\n"); + + ret->shader = d3dcompiler_alloc(sizeof(*ret->shader)); + if(!ret->shader) { + ERR("Failed to allocate memory for the shader\n"); + set_parse_status(&ret->status, PARSE_ERR); + return; + } + + ret->shader->type = ST_PIXEL; + ret->shader->version = BWRITERPS_VERSION(1, 1); + ret->funcs = &parser_ps_1_0123; + gen_oldps_input(ret->shader, 4); +} + +void create_ps12_parser(struct asm_parser *ret) { + TRACE_(parsed_shader)("ps_1_2\n"); + + ret->shader = d3dcompiler_alloc(sizeof(*ret->shader)); + if(!ret->shader) { + ERR("Failed to allocate memory for the shader\n"); + set_parse_status(&ret->status, PARSE_ERR); + return; + } + + ret->shader->type = ST_PIXEL; + ret->shader->version = BWRITERPS_VERSION(1, 2); + ret->funcs = &parser_ps_1_0123; + gen_oldps_input(ret->shader, 4); +} + +void create_ps13_parser(struct asm_parser *ret) { + TRACE_(parsed_shader)("ps_1_3\n"); + + ret->shader = d3dcompiler_alloc(sizeof(*ret->shader)); + if(!ret->shader) { + ERR("Failed to allocate memory for the shader\n"); + set_parse_status(&ret->status, PARSE_ERR); + return; + } + + ret->shader->type = ST_PIXEL; + ret->shader->version = BWRITERPS_VERSION(1, 3); + ret->funcs = &parser_ps_1_0123; + gen_oldps_input(ret->shader, 4); +} + +void create_ps14_parser(struct asm_parser *ret) { + TRACE_(parsed_shader)("ps_1_4\n"); + + ret->shader = d3dcompiler_alloc(sizeof(*ret->shader)); + if(!ret->shader) { + ERR("Failed to allocate memory for the shader\n"); + set_parse_status(&ret->status, PARSE_ERR); + return; + } + + ret->shader->type = ST_PIXEL; + ret->shader->version = BWRITERPS_VERSION(1, 4); + ret->funcs = &parser_ps_1_4; + gen_oldps_input(ret->shader, 6); +} + +void create_ps20_parser(struct asm_parser *ret) { + TRACE_(parsed_shader)("ps_2_0\n"); + + ret->shader = d3dcompiler_alloc(sizeof(*ret->shader)); + if(!ret->shader) { + ERR("Failed to allocate memory for the shader\n"); + set_parse_status(&ret->status, PARSE_ERR); + return; + } + + ret->shader->type = ST_PIXEL; + ret->shader->version = BWRITERPS_VERSION(2, 0); + ret->funcs = &parser_ps_2; + gen_oldps_input(ret->shader, 8); +} + +void create_ps2x_parser(struct asm_parser *ret) { + TRACE_(parsed_shader)("ps_2_x\n"); + + ret->shader = d3dcompiler_alloc(sizeof(*ret->shader)); + if(!ret->shader) { + ERR("Failed to allocate memory for the shader\n"); + set_parse_status(&ret->status, PARSE_ERR); + return; + } + + ret->shader->type = ST_PIXEL; + ret->shader->version = BWRITERPS_VERSION(2, 1); + ret->funcs = &parser_ps_2_x; + gen_oldps_input(ret->shader, 8); +} + +void create_ps30_parser(struct asm_parser *ret) { + TRACE_(parsed_shader)("ps_3_0\n"); + + ret->shader = d3dcompiler_alloc(sizeof(*ret->shader)); + if(!ret->shader) { + ERR("Failed to allocate memory for the shader\n"); + set_parse_status(&ret->status, PARSE_ERR); + return; + } + + ret->shader->type = ST_PIXEL; + ret->shader->version = BWRITERPS_VERSION(3, 0); + ret->funcs = &parser_ps_3; +} diff --git a/dll/directx/wine/d3dcompiler_43/asmshader.l b/dll/directx/wine/d3dcompiler_43/asmshader.l new file mode 100644 index 00000000000..35a404817f5 --- /dev/null +++ b/dll/directx/wine/d3dcompiler_43/asmshader.l @@ -0,0 +1,501 @@ +/* + * Direct3D shader assembler + * + * Copyright 2008 Stefan Dösinger + * Copyright 2009 Matteo Bruni + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +%{ +#include "config.h" +#include "wine/port.h" +#include "wine/debug.h" + +#include "d3dcompiler_private.h" +#include "asmshader.tab.h" + +WINE_DEFAULT_DEBUG_CHANNEL(asmshader); +%} + +%option noyywrap +%option prefix="asmshader_" +%option noinput nounput never-interactive + +/* Swizzles and writemasks consist of a dot and up to 4 x, y, z or w characters, + * or up to 4 a, r, g, b characters. There are different rules for swizzles and + * writemasks wrt repetition, those are handled in the grammar. + */ +DOT \. +COMPONENT [xyzw]|[rgba] + +/* Registers */ +REG_TEMP r[0-9]+ +/* for relative addressing in the form o[x], v[x] and c[x] */ +REG_OUTPUT o[0-9]* +REG_INPUT v[0-9]* +REG_CONSTFLOAT c[0-9]* +REG_CONSTINT i[0-9]+ +REG_CONSTBOOL b[0-9]+ +REG_TEXTURE t[0-9]+ +REG_TEXCRDOUT oT[0-9]+ +REG_SAMPLER s[0-9]+ +REG_OPOS oPos +REG_OFOG oFog +REG_OPTS oPts +REG_VERTEXCOLOR oD[01] +REG_FRAGCOLOR oC[0-9]+ +REG_FRAGDEPTH oDepth +REG_VPOS vPos +REG_VFACE vFace +REG_ADDRESS a0 +REG_LOOP aL +REG_PREDICATE p0 +/* Not really a register, but it is considered as such */ +REG_LABEL l[0-9]+ + +DCL_POSITION _position[0-9]* +DCL_BLENDWEIGHT _blendweight[0-9]* +DCL_BLENDINDICES _blendindices[0-9]* +DCL_NORMAL _normal[0-9]* +DCL_PSIZE _psize[0-9]* +DCL_TEXCOORD _texcoord[0-9]* +DCL_TANGENT _tangent[0-9]* +DCL_BINORMAL _binormal[0-9]* +DCL_TESSFACTOR _tessfactor[0-9]* +DCL_POSITIONT _positiont[0-9]* +DCL_COLOR _color[0-9]* +DCL_FOG _fog[0-9]* +DCL_DEPTH _depth[0-9]* +DCL_SAMPLE _sample[0-9]* + +DCL_SAMPLER1D _1d +DCL_SAMPLER2D _2d +DCL_SAMPLERCUBE _cube +DCL_SAMPLERVOLUME _volume + +PREPROCESSORDIRECTIVE #[^\n]*\n + +/* Comments */ +DOUBLESLASHCOMMENT "//"[^\n]* +SEMICOLONCOMMENT ";"[^\n]* + +/* Whitespaces are spaces, tabs and newlines */ +WHITESPACE [ \t]+ +NEWLINE (\n)|(\r\n) + +COMMA "," + +IMMVAL \-?(([0-9]+\.?)|([0-9]*\.[0-9]+))(f)? + +ANY (.) + +%% + + /* Common instructions(vertex and pixel shaders) */ +add {return INSTR_ADD; } +nop {return INSTR_NOP; } +mov {return INSTR_MOV; } +sub {return INSTR_SUB; } +mad {return INSTR_MAD; } +mul {return INSTR_MUL; } +rcp {return INSTR_RCP; } +rsq {return INSTR_RSQ; } +dp3 {return INSTR_DP3; } +dp4 {return INSTR_DP4; } +min {return INSTR_MIN; } +max {return INSTR_MAX; } +slt {return INSTR_SLT; } +sge {return INSTR_SGE; } +abs {return INSTR_ABS; } +exp {return INSTR_EXP; } +log {return INSTR_LOG; } +expp {return INSTR_EXPP; } +logp {return INSTR_LOGP; } +dst {return INSTR_DST; } +lrp {return INSTR_LRP; } +frc {return INSTR_FRC; } +pow {return INSTR_POW; } +crs {return INSTR_CRS; } +sgn {return INSTR_SGN; } +nrm {return INSTR_NRM; } +sincos {return INSTR_SINCOS; } +m4x4 {return INSTR_M4x4; } +m4x3 {return INSTR_M4x3; } +m3x4 {return INSTR_M3x4; } +m3x3 {return INSTR_M3x3; } +m3x2 {return INSTR_M3x2; } +dcl {return INSTR_DCL; } +def {return INSTR_DEF; } +defb {return INSTR_DEFB; } +defi {return INSTR_DEFI; } +rep {return INSTR_REP; } +endrep {return INSTR_ENDREP; } +if {return INSTR_IF; } +else {return INSTR_ELSE; } +endif {return INSTR_ENDIF; } +break {return INSTR_BREAK; } +breakp {return INSTR_BREAKP; } +call {return INSTR_CALL; } +callnz {return INSTR_CALLNZ; } +loop {return INSTR_LOOP; } +ret {return INSTR_RET; } +endloop {return INSTR_ENDLOOP; } +label {return INSTR_LABEL; } +setp {return INSTR_SETP; } +texldl {return INSTR_TEXLDL; } + + /* Vertex shader only instructions */ +lit {return INSTR_LIT; } +mova {return INSTR_MOVA; } + + /* Pixel shader only instructions */ +cnd {return INSTR_CND; } +cmp {return INSTR_CMP; } +dp2add {return INSTR_DP2ADD; } +texcoord {return INSTR_TEXCOORD; } +texcrd {return INSTR_TEXCRD; } +texkill {return INSTR_TEXKILL; } +tex {return INSTR_TEX; } +texld {return INSTR_TEXLD; } +texbem {return INSTR_TEXBEM; } +texbeml {return INSTR_TEXBEML; } +texreg2ar {return INSTR_TEXREG2AR; } +texreg2gb {return INSTR_TEXREG2GB; } +texreg2rgb {return INSTR_TEXREG2RGB; } +texm3x2pad {return INSTR_TEXM3x2PAD; } +texm3x2tex {return INSTR_TEXM3x2TEX; } +texm3x3pad {return INSTR_TEXM3x3PAD; } +texm3x3spec {return INSTR_TEXM3x3SPEC; } +texm3x3vspec {return INSTR_TEXM3x3VSPEC; } +texm3x3tex {return INSTR_TEXM3x3TEX; } +texdp3tex {return INSTR_TEXDP3TEX; } +texm3x2depth {return INSTR_TEXM3x2DEPTH; } +texdp3 {return INSTR_TEXDP3; } +texm3x3 {return INSTR_TEXM3x3; } +texdepth {return INSTR_TEXDEPTH; } +bem {return INSTR_BEM; } +dsx {return INSTR_DSX; } +dsy {return INSTR_DSY; } +texldp {return INSTR_TEXLDP; } +texldb {return INSTR_TEXLDB; } +texldd {return INSTR_TEXLDD; } +phase {return INSTR_PHASE; } + +{REG_TEMP} { + asmshader_lval.regnum = atoi(yytext + 1); + return REG_TEMP; + } +{REG_OUTPUT} { + asmshader_lval.regnum = atoi(yytext + 1); + return REG_OUTPUT; + } +{REG_INPUT} { + asmshader_lval.regnum = atoi(yytext + 1); + return REG_INPUT; + } +{REG_CONSTFLOAT} { + asmshader_lval.regnum = atoi(yytext + 1); + return REG_CONSTFLOAT; + } +{REG_CONSTINT} { + asmshader_lval.regnum = atoi(yytext + 1); + return REG_CONSTINT; + } +{REG_CONSTBOOL} { + asmshader_lval.regnum = atoi(yytext + 1); + return REG_CONSTBOOL; + } +{REG_TEXTURE} { + asmshader_lval.regnum = atoi(yytext + 1); + return REG_TEXTURE; + } +{REG_TEXCRDOUT} { + asmshader_lval.regnum = atoi(yytext + 2); + return REG_TEXCRDOUT; + } +{REG_SAMPLER} { + asmshader_lval.regnum = atoi(yytext + 1); + return REG_SAMPLER; + } +{REG_OPOS} {return REG_OPOS; } +{REG_OFOG} {return REG_OFOG; } +{REG_OPTS} {return REG_OPTS; } +{REG_VERTEXCOLOR} { + asmshader_lval.regnum = atoi(yytext + 2); + return REG_VERTEXCOLOR; + } +{REG_FRAGCOLOR} { + asmshader_lval.regnum = atoi(yytext + 2); + return REG_FRAGCOLOR; + } +{REG_FRAGDEPTH} {return REG_FRAGDEPTH; } +{REG_VPOS} {return REG_VPOS; } +{REG_VFACE} {return REG_VFACE; } +{REG_ADDRESS} {return REG_ADDRESS; } +{REG_LOOP} {return REG_LOOP; } +{REG_PREDICATE} {return REG_PREDICATE; } + +{REG_LABEL} { + asmshader_lval.regnum = atoi(yytext + 1); + return REG_LABEL; + } + + /* Shader versions. These are important to select the correct + * parser profile. + */ +vs\.1\.0|vs_1_0 {return VER_VS10; } +vs\.1\.1|vs_1_1 {return VER_VS11; } + +vs\.2\.0|vs_2_0 {return VER_VS20; } +vs\.2\.x|vs_2_x {return VER_VS2X; } +vs\.3\.0|vs_3_0 {return VER_VS30; } + +ps\.1\.0|ps_1_0 {return VER_PS10; } +ps\.1\.1|ps_1_1 {return VER_PS11; } +ps\.1\.2|ps_1_2 {return VER_PS12; } +ps\.1\.3|ps_1_3 {return VER_PS13; } +ps\.1\.4|ps_1_4 {return VER_PS14; } + +ps\.2\.0|ps_2_0 {return VER_PS20; } +ps\.2\.x|ps_2_x {return VER_PS2X; } +ps\.3\.0|ps_3_0 {return VER_PS30; } + +{DOT} {return yytext[0]; } +{COMPONENT} { + switch(yytext[0]) { + case 'x': + case 'r': + asmshader_lval.component = 0; + break; + case 'y': + case 'g': + asmshader_lval.component = 1; + break; + case 'z': + case 'b': + asmshader_lval.component = 2; + break; + case 'w': + case 'a': + asmshader_lval.component = 3; + break; + } + return COMPONENT; + } + + /* Output modifiers */ +\_x2 {return SHIFT_X2; } +\_x4 {return SHIFT_X4; } +\_x8 {return SHIFT_X8; } +\_d2 {return SHIFT_D2; } +\_d4 {return SHIFT_D4; } +\_d8 {return SHIFT_D8; } +\_sat {return MOD_SAT; } +\_pp {return MOD_PP; } +\_centroid {return MOD_CENTROID; } + + /* compare params */ +\_gt {return COMP_GT; } +\_lt {return COMP_LT; } +\_ge {return COMP_GE; } +\_le {return COMP_LE; } +\_eq {return COMP_EQ; } +\_ne {return COMP_NE; } + +{IMMVAL} { + asmshader_lval.immval.val = atof(yytext); + asmshader_lval.immval.integer = ((strstr(yytext, ".") == NULL) && (strstr(yytext, "f") == NULL)); + return IMMVAL; + } +true { + asmshader_lval.immbool = TRUE; + return IMMBOOL; + } +false { + asmshader_lval.immbool = FALSE; + return IMMBOOL; + } + +{COMMA} {return yytext[0]; } +- {return yytext[0]; } +\( {return yytext[0]; } +\) {return yytext[0]; } + + /* for relative addressing */ +\[|\]|\+ {return yytext[0]; } + +\_bias {return SMOD_BIAS; } + /* No _x2 here; it is identical to MOD_X2 */ +\_bx2 {return SMOD_SCALEBIAS; } +\_dz {return SMOD_DZ; } +\_dw {return SMOD_DW; } +\_abs {return SMOD_ABS; } + +! {return SMOD_NOT; } + +{DCL_POSITION} { + if(yytext[strlen("_position")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(yytext + strlen("_position")); + } + return USAGE_POSITION; + } +{DCL_BLENDWEIGHT} { + if(yytext[strlen("_blendweight")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(yytext + strlen("_blendweight")); + } + return USAGE_BLENDWEIGHT; + } +{DCL_BLENDINDICES} { + if(yytext[strlen("_blendindices")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(yytext + strlen("_blendindices")); + } + return USAGE_BLENDINDICES; + } +{DCL_NORMAL} { + if(yytext[strlen("_normal")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(yytext + strlen("_normal")); + } + return USAGE_NORMAL; + } +{DCL_PSIZE} { + if(yytext[strlen("_psize")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(yytext + strlen("_psize")); + } + return USAGE_PSIZE; + } +{DCL_TEXCOORD} { + if(yytext[strlen("_texcoord")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(yytext + strlen("_texcoord")); + } + return USAGE_TEXCOORD; + } +{DCL_TANGENT} { + if(yytext[strlen("_tangent")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(yytext + strlen("_tangent")); + } + return USAGE_TANGENT; + } +{DCL_BINORMAL} { + if(yytext[strlen("_binormal")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(yytext + strlen("_binormal")); + } + return USAGE_BINORMAL; + } +{DCL_TESSFACTOR} { + if(yytext[strlen("_tessfactor")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(yytext + strlen("_tessfactor")); + } + return USAGE_TESSFACTOR; + } +{DCL_POSITIONT} { + if(yytext[strlen("_positiont")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(yytext + strlen("_positiont")); + } + return USAGE_POSITIONT; + } +{DCL_COLOR} { + if(yytext[strlen("_color")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(yytext + strlen("_color")); + } + return USAGE_COLOR; + } +{DCL_FOG} { + if(yytext[strlen("_fog")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(yytext + strlen("_fog")); + } + return USAGE_FOG; + } +{DCL_DEPTH} { + if(yytext[strlen("_depth")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(yytext + strlen("_depth")); + } + return USAGE_DEPTH; + } +{DCL_SAMPLE} { + if(yytext[strlen("_sample")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(yytext + strlen("_sample")); + } + return USAGE_SAMPLE; + } + +{DCL_SAMPLER1D} { return SAMPTYPE_1D; } +{DCL_SAMPLER2D} { return SAMPTYPE_2D; } +{DCL_SAMPLERCUBE} { return SAMPTYPE_CUBE; } +{DCL_SAMPLERVOLUME} { return SAMPTYPE_VOLUME; } + +{PREPROCESSORDIRECTIVE} { + /* TODO: update current line information */ + TRACE("line info update: %s", yytext); + } + + /* Skip comments */ +{DOUBLESLASHCOMMENT} { } +{SEMICOLONCOMMENT} { } + +{WHITESPACE} { /* Do nothing */ } +{NEWLINE} { + asm_ctx.line_no++; + } + +{ANY} { + asmparser_message(&asm_ctx, "Line %u: Unexpected input %s\n", asm_ctx.line_no, yytext); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + +%% + +struct bwriter_shader *SlAssembleShader(const char *text, char **messages) { + struct bwriter_shader *ret = NULL; + YY_BUFFER_STATE buffer; + TRACE("%p, %p\n", text, messages); + + buffer = asmshader__scan_string(text); + asmshader__switch_to_buffer(buffer); + + ret = parse_asm_shader(messages); + + asmshader__delete_buffer(buffer); + + return ret; +} diff --git a/dll/directx/wine/d3dcompiler_43/asmshader.tab.c b/dll/directx/wine/d3dcompiler_43/asmshader.tab.c new file mode 100644 index 00000000000..e5e0d3e577c --- /dev/null +++ b/dll/directx/wine/d3dcompiler_43/asmshader.tab.c @@ -0,0 +1,4886 @@ +/* A Bison parser, made by GNU Bison 2.5. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.5" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + +/* Substitute the variable and function names. */ +#define yyparse asmshader_parse +#define yylex asmshader_lex +#define yyerror asmshader_error +#define yylval asmshader_lval +#define yychar asmshader_char +#define yydebug asmshader_debug +#define yynerrs asmshader_nerrs + + +/* Copy the first part of user declarations. */ + +/* Line 268 of yacc.c */ +#line 22 "asmshader.y" + +#include "config.h" +#include "wine/port.h" +#include "wine/debug.h" + +#include "d3dcompiler_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(asmshader); + +struct asm_parser asm_ctx; + +void asmparser_message(struct asm_parser *ctx, const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + compilation_message(&ctx->messages, fmt, args); + va_end(args); +} + +static void asmshader_error(char const *s) { + asmparser_message(&asm_ctx, "Line %u: Error \"%s\" from bison\n", asm_ctx.line_no, s); + set_parse_status(&asm_ctx.status, PARSE_ERR); +} + +static void set_rel_reg(struct shader_reg *reg, struct rel_reg *rel) { + /* We can have an additional offset without true relative addressing + * ex. c2[ 4 ] */ + reg->regnum += rel->additional_offset; + if(!rel->has_rel_reg) { + reg->rel_reg = NULL; + } else { + reg->rel_reg = d3dcompiler_alloc(sizeof(*reg->rel_reg)); + if(!reg->rel_reg) { + return; + } + reg->rel_reg->type = rel->type; + reg->rel_reg->u.swizzle = rel->swizzle; + reg->rel_reg->regnum = rel->rel_regnum; + } +} + +/* Needed lexer functions declarations */ +int asmshader_lex(void); + + + + +/* Line 268 of yacc.c */ +#line 128 "asmshader.tab.c" + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + INSTR_ADD = 258, + INSTR_NOP = 259, + INSTR_MOV = 260, + INSTR_SUB = 261, + INSTR_MAD = 262, + INSTR_MUL = 263, + INSTR_RCP = 264, + INSTR_RSQ = 265, + INSTR_DP3 = 266, + INSTR_DP4 = 267, + INSTR_MIN = 268, + INSTR_MAX = 269, + INSTR_SLT = 270, + INSTR_SGE = 271, + INSTR_ABS = 272, + INSTR_EXP = 273, + INSTR_LOG = 274, + INSTR_EXPP = 275, + INSTR_LOGP = 276, + INSTR_DST = 277, + INSTR_LRP = 278, + INSTR_FRC = 279, + INSTR_POW = 280, + INSTR_CRS = 281, + INSTR_SGN = 282, + INSTR_NRM = 283, + INSTR_SINCOS = 284, + INSTR_M4x4 = 285, + INSTR_M4x3 = 286, + INSTR_M3x4 = 287, + INSTR_M3x3 = 288, + INSTR_M3x2 = 289, + INSTR_DCL = 290, + INSTR_DEF = 291, + INSTR_DEFB = 292, + INSTR_DEFI = 293, + INSTR_REP = 294, + INSTR_ENDREP = 295, + INSTR_IF = 296, + INSTR_ELSE = 297, + INSTR_ENDIF = 298, + INSTR_BREAK = 299, + INSTR_BREAKP = 300, + INSTR_CALL = 301, + INSTR_CALLNZ = 302, + INSTR_LOOP = 303, + INSTR_RET = 304, + INSTR_ENDLOOP = 305, + INSTR_LABEL = 306, + INSTR_SETP = 307, + INSTR_TEXLDL = 308, + INSTR_LIT = 309, + INSTR_MOVA = 310, + INSTR_CND = 311, + INSTR_CMP = 312, + INSTR_DP2ADD = 313, + INSTR_TEXCOORD = 314, + INSTR_TEXCRD = 315, + INSTR_TEXKILL = 316, + INSTR_TEX = 317, + INSTR_TEXLD = 318, + INSTR_TEXBEM = 319, + INSTR_TEXBEML = 320, + INSTR_TEXREG2AR = 321, + INSTR_TEXREG2GB = 322, + INSTR_TEXREG2RGB = 323, + INSTR_TEXM3x2PAD = 324, + INSTR_TEXM3x2TEX = 325, + INSTR_TEXM3x3PAD = 326, + INSTR_TEXM3x3SPEC = 327, + INSTR_TEXM3x3VSPEC = 328, + INSTR_TEXM3x3TEX = 329, + INSTR_TEXDP3TEX = 330, + INSTR_TEXM3x2DEPTH = 331, + INSTR_TEXDP3 = 332, + INSTR_TEXM3x3 = 333, + INSTR_TEXDEPTH = 334, + INSTR_BEM = 335, + INSTR_DSX = 336, + INSTR_DSY = 337, + INSTR_TEXLDP = 338, + INSTR_TEXLDB = 339, + INSTR_TEXLDD = 340, + INSTR_PHASE = 341, + REG_TEMP = 342, + REG_OUTPUT = 343, + REG_INPUT = 344, + REG_CONSTFLOAT = 345, + REG_CONSTINT = 346, + REG_CONSTBOOL = 347, + REG_TEXTURE = 348, + REG_SAMPLER = 349, + REG_TEXCRDOUT = 350, + REG_OPOS = 351, + REG_OFOG = 352, + REG_OPTS = 353, + REG_VERTEXCOLOR = 354, + REG_FRAGCOLOR = 355, + REG_FRAGDEPTH = 356, + REG_VPOS = 357, + REG_VFACE = 358, + REG_ADDRESS = 359, + REG_LOOP = 360, + REG_PREDICATE = 361, + REG_LABEL = 362, + VER_VS10 = 363, + VER_VS11 = 364, + VER_VS20 = 365, + VER_VS2X = 366, + VER_VS30 = 367, + VER_PS10 = 368, + VER_PS11 = 369, + VER_PS12 = 370, + VER_PS13 = 371, + VER_PS14 = 372, + VER_PS20 = 373, + VER_PS2X = 374, + VER_PS30 = 375, + SHIFT_X2 = 376, + SHIFT_X4 = 377, + SHIFT_X8 = 378, + SHIFT_D2 = 379, + SHIFT_D4 = 380, + SHIFT_D8 = 381, + MOD_SAT = 382, + MOD_PP = 383, + MOD_CENTROID = 384, + COMP_GT = 385, + COMP_LT = 386, + COMP_GE = 387, + COMP_LE = 388, + COMP_EQ = 389, + COMP_NE = 390, + SMOD_BIAS = 391, + SMOD_SCALEBIAS = 392, + SMOD_DZ = 393, + SMOD_DW = 394, + SMOD_ABS = 395, + SMOD_NOT = 396, + SAMPTYPE_1D = 397, + SAMPTYPE_2D = 398, + SAMPTYPE_CUBE = 399, + SAMPTYPE_VOLUME = 400, + USAGE_POSITION = 401, + USAGE_BLENDWEIGHT = 402, + USAGE_BLENDINDICES = 403, + USAGE_NORMAL = 404, + USAGE_PSIZE = 405, + USAGE_TEXCOORD = 406, + USAGE_TANGENT = 407, + USAGE_BINORMAL = 408, + USAGE_TESSFACTOR = 409, + USAGE_POSITIONT = 410, + USAGE_COLOR = 411, + USAGE_FOG = 412, + USAGE_DEPTH = 413, + USAGE_SAMPLE = 414, + COMPONENT = 415, + IMMVAL = 416, + IMMBOOL = 417 + }; +#endif + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ + +/* Line 293 of yacc.c */ +#line 70 "asmshader.y" + + struct { + float val; + BOOL integer; + } immval; + BOOL immbool; + unsigned int regnum; + struct shader_reg reg; + DWORD srcmod; + DWORD writemask; + struct { + DWORD writemask; + DWORD idx; + DWORD last; + } wm_components; + DWORD swizzle; + struct { + DWORD swizzle; + DWORD idx; + } sw_components; + DWORD component; + struct { + DWORD mod; + DWORD shift; + } modshift; + BWRITER_COMPARISON_TYPE comptype; + struct { + DWORD dclusage; + unsigned int regnum; + } declaration; + BWRITERSAMPLER_TEXTURE_TYPE samplertype; + struct rel_reg rel_reg; + struct src_regs sregs; + + + +/* Line 293 of yacc.c */ +#line 363 "asmshader.tab.c" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + + +/* Copy the second part of user declarations. */ + + +/* Line 343 of yacc.c */ +#line 375 "asmshader.tab.c" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int yyi) +#else +static int +YYID (yyi) + int yyi; +#endif +{ + return yyi; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 16 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 733 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 171 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 26 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 228 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 552 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 417 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 169, 170, 2, 163, 164, 166, 165, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 167, 2, 168, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint16 yyprhs[] = +{ + 0, 0, 3, 6, 8, 10, 12, 14, 16, 18, + 20, 22, 24, 26, 28, 30, 32, 33, 36, 38, + 41, 44, 50, 52, 58, 64, 70, 76, 82, 88, + 94, 100, 106, 112, 118, 124, 130, 136, 142, 148, + 154, 160, 166, 172, 178, 184, 190, 196, 202, 208, + 214, 220, 226, 232, 236, 241, 246, 252, 256, 261, + 266, 270, 275, 280, 291, 302, 307, 310, 312, 315, + 319, 321, 323, 325, 329, 332, 335, 338, 341, 343, + 345, 348, 354, 360, 366, 372, 378, 384, 390, 394, + 400, 403, 407, 411, 417, 423, 429, 435, 441, 447, + 453, 459, 465, 471, 477, 483, 489, 495, 501, 507, + 513, 519, 525, 531, 537, 543, 545, 548, 551, 553, + 555, 557, 559, 561, 563, 565, 567, 569, 571, 573, + 575, 577, 579, 581, 583, 585, 587, 589, 591, 594, + 596, 599, 600, 603, 605, 608, 609, 612, 614, 616, + 618, 620, 622, 624, 626, 628, 630, 632, 636, 640, + 645, 650, 656, 662, 669, 673, 674, 678, 683, 690, + 697, 706, 708, 712, 714, 716, 718, 720, 722, 724, + 726, 728, 730, 732, 734, 736, 738, 740, 742, 744, + 746, 748, 750, 752, 754, 756, 758, 760, 762, 764, + 766, 768, 770, 772, 774, 776, 778, 780, 782, 784, + 786, 788, 790, 792, 794, 796, 798, 800, 802, 804, + 806, 808, 810, 812, 814, 816, 818, 820, 825 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int16 yyrhs[] = +{ + 172, 0, -1, 173, 174, -1, 108, -1, 109, -1, + 110, -1, 111, -1, 112, -1, 113, -1, 114, -1, + 115, -1, 116, -1, 117, -1, 118, -1, 119, -1, + 120, -1, -1, 174, 175, -1, 176, -1, 196, 176, + -1, 163, 176, -1, 3, 183, 177, 164, 185, -1, + 4, -1, 5, 183, 177, 164, 185, -1, 6, 183, + 177, 164, 185, -1, 7, 183, 177, 164, 185, -1, + 8, 183, 177, 164, 185, -1, 9, 183, 177, 164, + 185, -1, 10, 183, 177, 164, 185, -1, 11, 183, + 177, 164, 185, -1, 12, 183, 177, 164, 185, -1, + 13, 183, 177, 164, 185, -1, 14, 183, 177, 164, + 185, -1, 15, 183, 177, 164, 185, -1, 16, 183, + 177, 164, 185, -1, 17, 183, 177, 164, 185, -1, + 18, 183, 177, 164, 185, -1, 19, 183, 177, 164, + 185, -1, 21, 183, 177, 164, 185, -1, 20, 183, + 177, 164, 185, -1, 22, 183, 177, 164, 185, -1, + 23, 183, 177, 164, 185, -1, 24, 183, 177, 164, + 185, -1, 25, 183, 177, 164, 185, -1, 26, 183, + 177, 164, 185, -1, 27, 183, 177, 164, 185, -1, + 28, 183, 177, 164, 185, -1, 29, 183, 177, 164, + 185, -1, 30, 183, 177, 164, 185, -1, 31, 183, + 177, 164, 185, -1, 32, 183, 177, 164, 185, -1, + 33, 183, 177, 164, 185, -1, 34, 183, 177, 164, + 185, -1, 35, 193, 88, -1, 35, 193, 88, 179, + -1, 35, 193, 183, 194, -1, 35, 193, 183, 194, + 179, -1, 35, 183, 194, -1, 35, 183, 194, 179, + -1, 35, 195, 183, 94, -1, 35, 183, 94, -1, + 35, 195, 183, 194, -1, 35, 195, 183, 88, -1, + 36, 90, 164, 161, 164, 161, 164, 161, 164, 161, + -1, 38, 91, 164, 161, 164, 161, 164, 161, 164, + 161, -1, 37, 92, 164, 162, -1, 39, 185, -1, + 40, -1, 41, 185, -1, 41, 192, 185, -1, 42, + -1, 43, -1, 44, -1, 44, 192, 185, -1, 45, + 185, -1, 46, 185, -1, 47, 185, -1, 48, 185, + -1, 49, -1, 50, -1, 51, 185, -1, 52, 192, + 177, 164, 185, -1, 53, 183, 177, 164, 185, -1, + 54, 183, 177, 164, 185, -1, 55, 183, 177, 164, + 185, -1, 56, 183, 177, 164, 185, -1, 57, 183, + 177, 164, 185, -1, 58, 183, 177, 164, 185, -1, + 59, 183, 177, -1, 60, 183, 177, 164, 185, -1, + 61, 177, -1, 62, 183, 177, -1, 79, 183, 177, + -1, 63, 183, 177, 164, 185, -1, 83, 183, 177, + 164, 185, -1, 84, 183, 177, 164, 185, -1, 64, + 183, 177, 164, 185, -1, 65, 183, 177, 164, 185, + -1, 66, 183, 177, 164, 185, -1, 67, 183, 177, + 164, 185, -1, 68, 183, 177, 164, 185, -1, 69, + 183, 177, 164, 185, -1, 71, 183, 177, 164, 185, + -1, 72, 183, 177, 164, 185, -1, 73, 183, 177, + 164, 185, -1, 74, 183, 177, 164, 185, -1, 75, + 183, 177, 164, 185, -1, 76, 183, 177, 164, 185, + -1, 70, 183, 177, 164, 185, -1, 77, 183, 177, + 164, 185, -1, 78, 183, 177, 164, 185, -1, 80, + 183, 177, 164, 185, -1, 81, 183, 177, 164, 185, + -1, 82, 183, 177, 164, 185, -1, 85, 183, 177, + 164, 185, -1, 86, -1, 178, 187, -1, 178, 179, + -1, 87, -1, 88, -1, 89, -1, 90, -1, 91, + -1, 92, -1, 93, -1, 95, -1, 94, -1, 96, + -1, 98, -1, 97, -1, 99, -1, 100, -1, 101, + -1, 106, -1, 102, -1, 103, -1, 104, -1, 105, + -1, 165, 180, -1, 160, -1, 180, 160, -1, -1, + 165, 182, -1, 160, -1, 182, 160, -1, -1, 183, + 184, -1, 121, -1, 122, -1, 123, -1, 124, -1, + 125, -1, 126, -1, 127, -1, 128, -1, 129, -1, + 186, -1, 185, 164, 186, -1, 191, 187, 181, -1, + 191, 187, 189, 181, -1, 166, 191, 187, 181, -1, + 166, 191, 187, 189, 181, -1, 161, 166, 191, 187, + 181, -1, 161, 166, 191, 187, 189, 181, -1, 141, + 191, 181, -1, -1, 167, 188, 168, -1, 167, 190, + 181, 168, -1, 167, 188, 163, 190, 181, 168, -1, + 167, 190, 181, 163, 188, 168, -1, 167, 188, 163, + 190, 181, 163, 188, 168, -1, 161, -1, 188, 163, + 161, -1, 136, -1, 121, -1, 137, -1, 138, -1, + 139, -1, 140, -1, 104, -1, 105, -1, 87, -1, + 88, -1, 89, -1, 90, -1, 91, -1, 92, -1, + 93, -1, 95, -1, 94, -1, 96, -1, 97, -1, + 99, -1, 100, -1, 101, -1, 106, -1, 102, -1, + 103, -1, 104, -1, 105, -1, 107, -1, 130, -1, + 131, -1, 132, -1, 133, -1, 134, -1, 135, -1, + 146, -1, 147, -1, 148, -1, 149, -1, 150, -1, + 151, -1, 152, -1, 153, -1, 154, -1, 155, -1, + 156, -1, 157, -1, 158, -1, 159, -1, 89, -1, + 93, -1, 142, -1, 143, -1, 144, -1, 145, -1, + 169, 106, 181, 170, -1, 169, 141, 106, 181, 170, + -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 311, 311, 316, 321, 326, 331, 336, 341, 346, + 351, 356, 361, 366, 371, 376, 382, 383, 388, 392, + 397, 403, 408, 413, 418, 423, 428, 433, 438, 443, + 448, 453, 458, 463, 468, 473, 478, 483, 488, 493, + 498, 503, 508, 513, 518, 523, 528, 533, 538, 543, + 548, 553, 558, 563, 575, 587, 610, 633, 655, 677, + 687, 702, 709, 716, 720, 724, 728, 733, 738, 743, + 748, 753, 758, 763, 768, 773, 778, 783, 788, 793, + 798, 803, 808, 813, 818, 823, 828, 833, 838, 843, + 849, 854, 859, 864, 875, 880, 885, 890, 895, 900, + 905, 910, 915, 920, 925, 930, 935, 940, 945, 950, + 955, 960, 965, 970, 975, 980, 987, 995, 1004, 1008, + 1012, 1016, 1022, 1028, 1034, 1038, 1042, 1048, 1052, 1056, + 1060, 1064, 1068, 1072, 1076, 1082, 1088, 1093, 1100, 1115, + 1121, 1137, 1141, 1163, 1168, 1182, 1186, 1199, 1204, 1209, + 1214, 1219, 1224, 1229, 1234, 1239, 1245, 1250, 1261, 1269, + 1277, 1285, 1310, 1324, 1338, 1348, 1352, 1357, 1365, 1373, + 1381, 1390, 1399, 1409, 1413, 1417, 1421, 1425, 1429, 1434, + 1438, 1443, 1447, 1453, 1457, 1461, 1465, 1469, 1473, 1479, + 1483, 1489, 1495, 1501, 1507, 1513, 1517, 1521, 1525, 1529, + 1533, 1538, 1539, 1540, 1541, 1542, 1543, 1545, 1551, 1557, + 1563, 1569, 1575, 1581, 1587, 1593, 1599, 1605, 1611, 1617, + 1623, 1630, 1634, 1639, 1643, 1647, 1651, 1656, 1664 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "INSTR_ADD", "INSTR_NOP", "INSTR_MOV", + "INSTR_SUB", "INSTR_MAD", "INSTR_MUL", "INSTR_RCP", "INSTR_RSQ", + "INSTR_DP3", "INSTR_DP4", "INSTR_MIN", "INSTR_MAX", "INSTR_SLT", + "INSTR_SGE", "INSTR_ABS", "INSTR_EXP", "INSTR_LOG", "INSTR_EXPP", + "INSTR_LOGP", "INSTR_DST", "INSTR_LRP", "INSTR_FRC", "INSTR_POW", + "INSTR_CRS", "INSTR_SGN", "INSTR_NRM", "INSTR_SINCOS", "INSTR_M4x4", + "INSTR_M4x3", "INSTR_M3x4", "INSTR_M3x3", "INSTR_M3x2", "INSTR_DCL", + "INSTR_DEF", "INSTR_DEFB", "INSTR_DEFI", "INSTR_REP", "INSTR_ENDREP", + "INSTR_IF", "INSTR_ELSE", "INSTR_ENDIF", "INSTR_BREAK", "INSTR_BREAKP", + "INSTR_CALL", "INSTR_CALLNZ", "INSTR_LOOP", "INSTR_RET", "INSTR_ENDLOOP", + "INSTR_LABEL", "INSTR_SETP", "INSTR_TEXLDL", "INSTR_LIT", "INSTR_MOVA", + "INSTR_CND", "INSTR_CMP", "INSTR_DP2ADD", "INSTR_TEXCOORD", + "INSTR_TEXCRD", "INSTR_TEXKILL", "INSTR_TEX", "INSTR_TEXLD", + "INSTR_TEXBEM", "INSTR_TEXBEML", "INSTR_TEXREG2AR", "INSTR_TEXREG2GB", + "INSTR_TEXREG2RGB", "INSTR_TEXM3x2PAD", "INSTR_TEXM3x2TEX", + "INSTR_TEXM3x3PAD", "INSTR_TEXM3x3SPEC", "INSTR_TEXM3x3VSPEC", + "INSTR_TEXM3x3TEX", "INSTR_TEXDP3TEX", "INSTR_TEXM3x2DEPTH", + "INSTR_TEXDP3", "INSTR_TEXM3x3", "INSTR_TEXDEPTH", "INSTR_BEM", + "INSTR_DSX", "INSTR_DSY", "INSTR_TEXLDP", "INSTR_TEXLDB", "INSTR_TEXLDD", + "INSTR_PHASE", "REG_TEMP", "REG_OUTPUT", "REG_INPUT", "REG_CONSTFLOAT", + "REG_CONSTINT", "REG_CONSTBOOL", "REG_TEXTURE", "REG_SAMPLER", + "REG_TEXCRDOUT", "REG_OPOS", "REG_OFOG", "REG_OPTS", "REG_VERTEXCOLOR", + "REG_FRAGCOLOR", "REG_FRAGDEPTH", "REG_VPOS", "REG_VFACE", "REG_ADDRESS", + "REG_LOOP", "REG_PREDICATE", "REG_LABEL", "VER_VS10", "VER_VS11", + "VER_VS20", "VER_VS2X", "VER_VS30", "VER_PS10", "VER_PS11", "VER_PS12", + "VER_PS13", "VER_PS14", "VER_PS20", "VER_PS2X", "VER_PS30", "SHIFT_X2", + "SHIFT_X4", "SHIFT_X8", "SHIFT_D2", "SHIFT_D4", "SHIFT_D8", "MOD_SAT", + "MOD_PP", "MOD_CENTROID", "COMP_GT", "COMP_LT", "COMP_GE", "COMP_LE", + "COMP_EQ", "COMP_NE", "SMOD_BIAS", "SMOD_SCALEBIAS", "SMOD_DZ", + "SMOD_DW", "SMOD_ABS", "SMOD_NOT", "SAMPTYPE_1D", "SAMPTYPE_2D", + "SAMPTYPE_CUBE", "SAMPTYPE_VOLUME", "USAGE_POSITION", + "USAGE_BLENDWEIGHT", "USAGE_BLENDINDICES", "USAGE_NORMAL", "USAGE_PSIZE", + "USAGE_TEXCOORD", "USAGE_TANGENT", "USAGE_BINORMAL", "USAGE_TESSFACTOR", + "USAGE_POSITIONT", "USAGE_COLOR", "USAGE_FOG", "USAGE_DEPTH", + "USAGE_SAMPLE", "COMPONENT", "IMMVAL", "IMMBOOL", "'+'", "','", "'.'", + "'-'", "'['", "']'", "'('", "')'", "$accept", "shader", "version_marker", + "instructions", "complexinstr", "instruction", "dreg", "dreg_name", + "writemask", "wm_components", "swizzle", "sw_components", "omods", + "omodifier", "sregs", "sreg", "rel_reg", "immsum", "smod", "relreg_name", + "sreg_name", "comp", "dclusage", "dcl_inputreg", "sampdcl", "predicate", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, + 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, + 415, 416, 417, 43, 44, 46, 45, 91, 93, 40, + 41 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 171, 172, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 174, 174, 175, 175, + 175, 176, 176, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, + 176, 176, 176, 176, 176, 176, 177, 177, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, + 178, 178, 178, 178, 178, 178, 178, 178, 179, 180, + 180, 181, 181, 182, 182, 183, 183, 184, 184, 184, + 184, 184, 184, 184, 184, 184, 185, 185, 186, 186, + 186, 186, 186, 186, 186, 187, 187, 187, 187, 187, + 187, 188, 188, 189, 189, 189, 189, 189, 189, 190, + 190, 191, 191, 191, 191, 191, 191, 191, 191, 191, + 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, + 191, 192, 192, 192, 192, 192, 192, 193, 193, 193, + 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, + 193, 194, 194, 195, 195, 195, 195, 196, 196 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 2, 1, 2, + 2, 5, 1, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 3, 4, 4, 5, 3, 4, 4, + 3, 4, 4, 10, 10, 4, 2, 1, 2, 3, + 1, 1, 1, 3, 2, 2, 2, 2, 1, 1, + 2, 5, 5, 5, 5, 5, 5, 5, 3, 5, + 2, 3, 3, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 1, 2, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, + 2, 0, 2, 1, 2, 0, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 3, 4, + 4, 5, 5, 6, 3, 0, 3, 4, 6, 6, + 8, 1, 3, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 4, 5 +}; + +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 0, 16, 1, 2, 145, 22, + 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, + 145, 0, 0, 0, 0, 67, 0, 70, 71, 72, + 0, 0, 0, 0, 78, 79, 0, 0, 145, 145, + 145, 145, 145, 145, 145, 145, 0, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, + 145, 115, 0, 0, 17, 18, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 223, 224, + 225, 226, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 0, 145, 145, 0, + 0, 0, 181, 182, 183, 184, 185, 186, 187, 189, + 188, 190, 191, 192, 193, 194, 196, 197, 198, 199, + 195, 200, 0, 0, 0, 66, 156, 165, 201, 202, + 203, 204, 205, 206, 68, 0, 0, 74, 75, 76, + 77, 80, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 118, 119, 120, 121, 122, 123, 124, 126, 125, + 127, 129, 128, 130, 131, 132, 134, 135, 136, 137, + 133, 90, 165, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 20, 141, 0, + 19, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 0, 146, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 221, 222, 60, 57, 53, 0, 0, 0, + 0, 0, 141, 0, 165, 0, 0, 141, 69, 73, + 0, 0, 0, 0, 0, 0, 0, 88, 0, 0, + 117, 116, 91, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, + 0, 0, 0, 0, 0, 0, 0, 0, 141, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 58, 54, 55, 62, 59, 61, 0, 65, 0, 164, + 165, 141, 157, 179, 180, 171, 0, 141, 174, 173, + 175, 176, 177, 178, 158, 141, 0, 0, 0, 0, + 0, 0, 0, 0, 139, 138, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 143, 142, + 227, 0, 21, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 39, 38, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 56, 0, 0, 141, 160, 141, 0, + 166, 0, 159, 81, 82, 83, 84, 85, 86, 87, + 89, 140, 93, 96, 97, 98, 99, 100, 101, 108, + 102, 103, 104, 105, 106, 107, 109, 110, 111, 112, + 113, 94, 95, 114, 144, 228, 0, 0, 162, 141, + 161, 172, 141, 0, 167, 0, 0, 163, 0, 0, + 0, 0, 0, 168, 0, 169, 0, 0, 0, 63, + 64, 170 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 14, 15, 17, 104, 105, 231, 232, 330, 425, + 357, 449, 107, 271, 185, 186, 317, 406, 415, 407, + 187, 195, 157, 305, 158, 106 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -458 +static const yytype_int16 yypact[] = +{ + 386, -458, -458, -458, -458, -458, -458, -458, -458, -458, + -458, -458, -458, -458, 11, -458, -458, 389, -458, -458, + -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, + -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, + -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, + 334, -42, -28, -10, -34, -458, 95, -458, -458, 3, + -34, -34, -34, -34, -458, -458, -34, 3, -458, -458, + -458, -458, -458, -458, -458, -458, 247, -458, -458, -458, + -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, + -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, + -458, -458, 647, -55, -458, -458, 647, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, -458, -458, + -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, + -458, -458, -458, -458, -458, -458, 123, 2, -458, -44, + -40, -39, -458, -458, -458, -458, -458, -458, -458, -458, + -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, + -458, -458, 185, -45, 185, -38, -458, -37, -458, -458, + -458, -458, -458, -458, -38, -34, -34, -38, -38, -38, + -38, -38, 247, 505, 505, 505, 505, 505, 505, 505, + 505, -458, -458, -458, -458, -458, -458, -458, -458, -458, + -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, + -458, -458, -76, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, + 505, 505, 505, 505, 505, 505, 505, -458, -57, 22, + -458, -458, -458, -458, -458, -458, -458, -458, -458, -458, + -35, -458, 1, 4, 8, 9, 10, 14, 16, 29, + 49, 50, 51, 54, 55, 57, 58, 60, 68, 69, + 70, 73, 74, 75, 76, 77, 78, 79, 89, 90, + 91, 93, -458, -458, -458, 94, 94, 142, 82, 5, + 96, 6, -57, 185, -37, -34, -58, -43, -38, -38, + 98, 119, 129, 130, 131, 132, 133, -458, 134, 100, + -458, -458, -458, 135, 136, 137, 138, 190, 191, 192, + 193, 194, 195, 204, 205, 343, 344, 345, 346, -458, + 378, 379, 380, 381, 382, 383, 388, 384, -57, -34, + -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, + -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, + -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, + -458, -458, 94, -458, -458, -458, 385, -458, 387, -458, + -37, -43, -458, -458, -458, -458, -154, -57, -458, -458, + -458, -458, -458, -458, -458, -57, -34, -34, -34, -34, + -34, -34, -34, -34, -458, 390, -34, -34, -34, -34, + -34, -34, -34, -34, -34, -34, -34, -34, -34, -34, + -34, -34, -34, -34, -34, -34, -34, -34, -458, 393, + -458, 397, -38, -38, -38, -38, -38, -38, -38, -38, + -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, + -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, + -38, -38, -38, -458, 394, 395, -43, -458, -57, -30, + -458, -86, -458, -38, -38, -38, -38, -38, -38, -38, + -38, -458, -38, -38, -38, -38, -38, -38, -38, -38, + -38, -38, -38, -38, -38, -38, -38, -38, -38, -38, + -38, -38, -38, -38, -458, -458, 448, 449, -458, -57, + -458, -458, -57, 396, -458, 453, 454, -458, -84, -63, + 452, 455, 396, -458, 456, -458, 457, 459, -59, -458, + -458, -458 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -458, -458, -458, -458, -458, 17, -92, -458, -293, -458, + -309, -458, 491, -458, -56, 306, -231, -457, -399, 146, + -132, 21, -458, -206, -458, -458 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -1 +static const yytype_uint16 yytable[] = +{ + 194, 331, 488, 399, 197, 198, 199, 200, 414, 489, + 201, 16, 390, 391, 490, 270, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 403, 404, 159, 451, + 312, 258, 314, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 160, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 403, 404, 539, 533, 408, 542, + 196, 161, 534, 401, 543, 548, 259, 529, 202, 329, + 306, 316, 487, 409, 410, 411, 412, 413, 491, 483, + 544, 392, 395, 405, 544, 545, 492, 182, 356, 551, + 320, 321, 322, 323, 324, 325, 326, 327, 328, 257, + 309, 313, 356, 260, 310, 311, 315, 183, 358, 359, + 316, 531, 184, 188, 189, 190, 191, 192, 193, 318, + 319, 332, 333, 334, 335, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, + 351, 352, 353, 354, 355, 360, 396, 398, 361, 486, + 393, 302, 362, 363, 364, 303, 394, 528, 365, 530, + 366, 400, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 367, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 261, 262, 263, 264, 265, 266, 267, + 268, 269, 302, 368, 369, 370, 303, 304, 371, 372, + 537, 373, 374, 538, 375, 188, 189, 190, 191, 192, + 193, 302, 376, 377, 378, 303, 182, 379, 380, 381, + 382, 383, 384, 385, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 386, 387, 388, 183, 389, 397, 329, + 424, 184, 416, 261, 262, 263, 264, 265, 266, 267, + 268, 269, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 417, 173, 174, 175, 176, 177, 178, + 179, 180, 181, 418, 419, 420, 421, 422, 423, 426, + 427, 428, 429, 452, 453, 454, 455, 456, 457, 458, + 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, + 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, + 479, 480, 481, 482, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 430, 431, 432, 433, 434, 435, + 493, 494, 495, 496, 497, 498, 499, 500, 436, 437, + 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, + 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, + 522, 523, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 1, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 438, 439, 440, + 441, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 156, 442, 443, 444, 445, 446, 447, 448, 484, + 501, 485, 102, 524, 450, 526, 527, 405, 103, 203, + 204, 205, 206, 207, 208, 209, 210, 525, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, + 229, 230, 535, 536, 540, 541, 546, 531, 549, 547, + 550, 402, 0, 0, 0, 0, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 532, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 307, 308, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101 +}; + +#define yypact_value_is_default(yystate) \ + ((yystate) == (-458)) + +#define yytable_value_is_error(yytable_value) \ + YYID (0) + +static const yytype_int16 yycheck[] = +{ + 56, 232, 401, 312, 60, 61, 62, 63, 317, 163, + 66, 0, 305, 306, 168, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 104, 105, 90, 358, + 182, 106, 184, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 92, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 104, 105, 533, 163, 121, 163, + 59, 91, 168, 314, 168, 542, 141, 486, 67, 165, + 88, 167, 401, 136, 137, 138, 139, 140, 407, 392, + 163, 307, 308, 161, 163, 168, 415, 141, 165, 168, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 102, + 164, 166, 165, 106, 164, 164, 164, 161, 106, 164, + 167, 161, 166, 130, 131, 132, 133, 134, 135, 195, + 196, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 164, 161, 161, 164, 400, + 88, 89, 164, 164, 164, 93, 94, 486, 164, 488, + 164, 313, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 164, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 89, 164, 164, 164, 93, 94, 164, 164, + 529, 164, 164, 532, 164, 130, 131, 132, 133, 134, + 135, 89, 164, 164, 164, 93, 141, 164, 164, 164, + 164, 164, 164, 164, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 164, 164, 164, 161, 164, 162, 165, + 160, 166, 164, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 164, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 359, 360, 361, 362, 363, 364, 365, + 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, + 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, + 386, 387, 388, 389, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 164, 164, 164, 164, 164, 164, + 416, 417, 418, 419, 420, 421, 422, 423, 164, 164, + 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, + 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, + 446, 447, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 164, 164, 164, + 164, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 164, 164, 164, 164, 164, 164, 160, 164, + 160, 164, 163, 160, 170, 161, 161, 161, 169, 68, + 69, 70, 71, 72, 73, 74, 75, 170, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, 100, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 164, 164, 161, 161, 164, 161, 161, 164, + 161, 315, -1, -1, -1, -1, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 489, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 157, 158, + 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 172, 173, 0, 174, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 163, 169, 175, 176, 196, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 183, 193, 195, 90, + 92, 91, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 141, 161, 166, 185, 186, 191, 130, 131, + 132, 133, 134, 135, 185, 192, 192, 185, 185, 185, + 185, 185, 192, 183, 183, 183, 183, 183, 183, 183, + 183, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 177, 178, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 176, 106, 141, + 176, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 177, 184, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 89, 93, 94, 194, 88, 183, 183, 164, + 164, 164, 191, 166, 191, 164, 167, 187, 185, 185, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 165, + 179, 187, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, + 177, 177, 177, 177, 177, 177, 165, 181, 106, 164, + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, + 179, 179, 194, 88, 94, 194, 161, 162, 161, 181, + 191, 187, 186, 104, 105, 161, 188, 190, 121, 136, + 137, 138, 139, 140, 181, 189, 164, 164, 164, 164, + 164, 164, 164, 164, 160, 180, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, 160, 182, + 170, 181, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 185, 179, 164, 164, 187, 181, 189, 163, + 168, 181, 181, 185, 185, 185, 185, 185, 185, 185, + 185, 160, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 185, 185, 160, 170, 161, 161, 181, 189, + 181, 161, 190, 163, 168, 164, 164, 181, 181, 188, + 161, 161, 163, 168, 163, 168, 164, 164, 188, 161, + 161, 168 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ + +#define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + + +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* This macro is provided for backward compatibility. */ + +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (YYLEX_PARAM) +#else +# define YYLEX yylex () +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +#else +static void +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) +#else +static void +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; + int yyrule; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = 0; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + + for details. YYERROR is fine as it does not invoke this + function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; +} +#endif /* YYERROR_VERBOSE */ + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + YYUSE (yyvaluep); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + +/* The lookahead symbol. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void) +#else +int +yyparse () + +#endif +#endif +{ + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + yyssp = yyss; + yyvsp = yyvs; + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + *++yyvsp = yylval; + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: + +/* Line 1806 of yacc.c */ +#line 312 "asmshader.y" + { + asm_ctx.funcs->end(&asm_ctx); + } + break; + + case 3: + +/* Line 1806 of yacc.c */ +#line 317 "asmshader.y" + { + TRACE("Vertex shader 1.0\n"); + create_vs10_parser(&asm_ctx); + } + break; + + case 4: + +/* Line 1806 of yacc.c */ +#line 322 "asmshader.y" + { + TRACE("Vertex shader 1.1\n"); + create_vs11_parser(&asm_ctx); + } + break; + + case 5: + +/* Line 1806 of yacc.c */ +#line 327 "asmshader.y" + { + TRACE("Vertex shader 2.0\n"); + create_vs20_parser(&asm_ctx); + } + break; + + case 6: + +/* Line 1806 of yacc.c */ +#line 332 "asmshader.y" + { + TRACE("Vertex shader 2.x\n"); + create_vs2x_parser(&asm_ctx); + } + break; + + case 7: + +/* Line 1806 of yacc.c */ +#line 337 "asmshader.y" + { + TRACE("Vertex shader 3.0\n"); + create_vs30_parser(&asm_ctx); + } + break; + + case 8: + +/* Line 1806 of yacc.c */ +#line 342 "asmshader.y" + { + TRACE("Pixel shader 1.0\n"); + create_ps10_parser(&asm_ctx); + } + break; + + case 9: + +/* Line 1806 of yacc.c */ +#line 347 "asmshader.y" + { + TRACE("Pixel shader 1.1\n"); + create_ps11_parser(&asm_ctx); + } + break; + + case 10: + +/* Line 1806 of yacc.c */ +#line 352 "asmshader.y" + { + TRACE("Pixel shader 1.2\n"); + create_ps12_parser(&asm_ctx); + } + break; + + case 11: + +/* Line 1806 of yacc.c */ +#line 357 "asmshader.y" + { + TRACE("Pixel shader 1.3\n"); + create_ps13_parser(&asm_ctx); + } + break; + + case 12: + +/* Line 1806 of yacc.c */ +#line 362 "asmshader.y" + { + TRACE("Pixel shader 1.4\n"); + create_ps14_parser(&asm_ctx); + } + break; + + case 13: + +/* Line 1806 of yacc.c */ +#line 367 "asmshader.y" + { + TRACE("Pixel shader 2.0\n"); + create_ps20_parser(&asm_ctx); + } + break; + + case 14: + +/* Line 1806 of yacc.c */ +#line 372 "asmshader.y" + { + TRACE("Pixel shader 2.x\n"); + create_ps2x_parser(&asm_ctx); + } + break; + + case 15: + +/* Line 1806 of yacc.c */ +#line 377 "asmshader.y" + { + TRACE("Pixel shader 3.0\n"); + create_ps30_parser(&asm_ctx); + } + break; + + case 17: + +/* Line 1806 of yacc.c */ +#line 384 "asmshader.y" + { + /* Nothing to do */ + } + break; + + case 18: + +/* Line 1806 of yacc.c */ +#line 389 "asmshader.y" + { + + } + break; + + case 19: + +/* Line 1806 of yacc.c */ +#line 393 "asmshader.y" + { + TRACE("predicate\n"); + asm_ctx.funcs->predicate(&asm_ctx, &(yyvsp[(1) - (2)].reg)); + } + break; + + case 20: + +/* Line 1806 of yacc.c */ +#line 398 "asmshader.y" + { + TRACE("coissue\n"); + asm_ctx.funcs->coissue(&asm_ctx); + } + break; + + case 21: + +/* Line 1806 of yacc.c */ +#line 404 "asmshader.y" + { + TRACE("ADD\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_ADD, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 22: + +/* Line 1806 of yacc.c */ +#line 409 "asmshader.y" + { + TRACE("NOP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_NOP, 0, 0, 0, 0, 0, 0); + } + break; + + case 23: + +/* Line 1806 of yacc.c */ +#line 414 "asmshader.y" + { + TRACE("MOV\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_MOV, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 24: + +/* Line 1806 of yacc.c */ +#line 419 "asmshader.y" + { + TRACE("SUB\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_SUB, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 25: + +/* Line 1806 of yacc.c */ +#line 424 "asmshader.y" + { + TRACE("MAD\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_MAD, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 3); + } + break; + + case 26: + +/* Line 1806 of yacc.c */ +#line 429 "asmshader.y" + { + TRACE("MUL\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_MUL, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 27: + +/* Line 1806 of yacc.c */ +#line 434 "asmshader.y" + { + TRACE("RCP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_RCP, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 28: + +/* Line 1806 of yacc.c */ +#line 439 "asmshader.y" + { + TRACE("RSQ\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_RSQ, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 29: + +/* Line 1806 of yacc.c */ +#line 444 "asmshader.y" + { + TRACE("DP3\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_DP3, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 30: + +/* Line 1806 of yacc.c */ +#line 449 "asmshader.y" + { + TRACE("DP4\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_DP4, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 31: + +/* Line 1806 of yacc.c */ +#line 454 "asmshader.y" + { + TRACE("MIN\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_MIN, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 32: + +/* Line 1806 of yacc.c */ +#line 459 "asmshader.y" + { + TRACE("MAX\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_MAX, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 33: + +/* Line 1806 of yacc.c */ +#line 464 "asmshader.y" + { + TRACE("SLT\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_SLT, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 34: + +/* Line 1806 of yacc.c */ +#line 469 "asmshader.y" + { + TRACE("SGE\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_SGE, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 35: + +/* Line 1806 of yacc.c */ +#line 474 "asmshader.y" + { + TRACE("ABS\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_ABS, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 36: + +/* Line 1806 of yacc.c */ +#line 479 "asmshader.y" + { + TRACE("EXP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_EXP, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 37: + +/* Line 1806 of yacc.c */ +#line 484 "asmshader.y" + { + TRACE("LOG\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_LOG, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 38: + +/* Line 1806 of yacc.c */ +#line 489 "asmshader.y" + { + TRACE("LOGP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_LOGP, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 39: + +/* Line 1806 of yacc.c */ +#line 494 "asmshader.y" + { + TRACE("EXPP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_EXPP, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 40: + +/* Line 1806 of yacc.c */ +#line 499 "asmshader.y" + { + TRACE("DST\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_DST, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 41: + +/* Line 1806 of yacc.c */ +#line 504 "asmshader.y" + { + TRACE("LRP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_LRP, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 3); + } + break; + + case 42: + +/* Line 1806 of yacc.c */ +#line 509 "asmshader.y" + { + TRACE("FRC\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_FRC, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 43: + +/* Line 1806 of yacc.c */ +#line 514 "asmshader.y" + { + TRACE("POW\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_POW, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 44: + +/* Line 1806 of yacc.c */ +#line 519 "asmshader.y" + { + TRACE("CRS\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_CRS, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 45: + +/* Line 1806 of yacc.c */ +#line 524 "asmshader.y" + { + TRACE("SGN\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_SGN, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 3); + } + break; + + case 46: + +/* Line 1806 of yacc.c */ +#line 529 "asmshader.y" + { + TRACE("NRM\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_NRM, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 47: + +/* Line 1806 of yacc.c */ +#line 534 "asmshader.y" + { + TRACE("SINCOS\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_SINCOS, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 48: + +/* Line 1806 of yacc.c */ +#line 539 "asmshader.y" + { + TRACE("M4x4\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_M4x4, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 49: + +/* Line 1806 of yacc.c */ +#line 544 "asmshader.y" + { + TRACE("M4x3\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_M4x3, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 50: + +/* Line 1806 of yacc.c */ +#line 549 "asmshader.y" + { + TRACE("M3x4\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_M3x4, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 51: + +/* Line 1806 of yacc.c */ +#line 554 "asmshader.y" + { + TRACE("M3x3\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_M3x3, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 52: + +/* Line 1806 of yacc.c */ +#line 559 "asmshader.y" + { + TRACE("M3x2\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_M3x2, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 53: + +/* Line 1806 of yacc.c */ +#line 564 "asmshader.y" + { + struct shader_reg reg; + TRACE("Output reg declaration\n"); + ZeroMemory(®, sizeof(reg)); + reg.type = BWRITERSPR_OUTPUT; + reg.regnum = (yyvsp[(3) - (3)].regnum); + reg.rel_reg = NULL; + reg.srcmod = 0; + reg.u.writemask = BWRITERSP_WRITEMASK_ALL; + asm_ctx.funcs->dcl_output(&asm_ctx, (yyvsp[(2) - (3)].declaration).dclusage, (yyvsp[(2) - (3)].declaration).regnum, ®); + } + break; + + case 54: + +/* Line 1806 of yacc.c */ +#line 576 "asmshader.y" + { + struct shader_reg reg; + TRACE("Output reg declaration\n"); + ZeroMemory(®, sizeof(reg)); + reg.type = BWRITERSPR_OUTPUT; + reg.regnum = (yyvsp[(3) - (4)].regnum); + reg.rel_reg = NULL; + reg.srcmod = 0; + reg.u.writemask = (yyvsp[(4) - (4)].writemask); + asm_ctx.funcs->dcl_output(&asm_ctx, (yyvsp[(2) - (4)].declaration).dclusage, (yyvsp[(2) - (4)].declaration).regnum, ®); + } + break; + + case 55: + +/* Line 1806 of yacc.c */ +#line 588 "asmshader.y" + { + struct shader_reg reg; + TRACE("Input reg declaration\n"); + if((yyvsp[(3) - (4)].modshift).shift != 0) { + asmparser_message(&asm_ctx, "Line %u: Shift modifier not allowed here\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + if(asm_ctx.shader->version == BWRITERPS_VERSION(2, 0) || + asm_ctx.shader->version == BWRITERPS_VERSION(2, 1)) { + asmparser_message(&asm_ctx, "Line %u: Declaration not supported in PS 2\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + ZeroMemory(®, sizeof(reg)); + reg.type = (yyvsp[(4) - (4)].reg).type; + reg.regnum = (yyvsp[(4) - (4)].reg).regnum; + reg.rel_reg = NULL; + reg.srcmod = 0; + reg.u.writemask = BWRITERSP_WRITEMASK_ALL; + asm_ctx.funcs->dcl_input(&asm_ctx, (yyvsp[(2) - (4)].declaration).dclusage, (yyvsp[(2) - (4)].declaration).regnum, (yyvsp[(3) - (4)].modshift).mod, ®); + } + break; + + case 56: + +/* Line 1806 of yacc.c */ +#line 611 "asmshader.y" + { + struct shader_reg reg; + TRACE("Input reg declaration\n"); + if((yyvsp[(3) - (5)].modshift).shift != 0) { + asmparser_message(&asm_ctx, "Line %u: Shift modifier not allowed here\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + if(asm_ctx.shader->version == BWRITERPS_VERSION(2, 0) || + asm_ctx.shader->version == BWRITERPS_VERSION(2, 1)) { + asmparser_message(&asm_ctx, "Line %u: Declaration not supported in PS 2\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + ZeroMemory(®, sizeof(reg)); + reg.type = (yyvsp[(4) - (5)].reg).type; + reg.regnum = (yyvsp[(4) - (5)].reg).regnum; + reg.rel_reg = NULL; + reg.srcmod = 0; + reg.u.writemask = (yyvsp[(5) - (5)].writemask); + asm_ctx.funcs->dcl_input(&asm_ctx, (yyvsp[(2) - (5)].declaration).dclusage, (yyvsp[(2) - (5)].declaration).regnum, (yyvsp[(3) - (5)].modshift).mod, ®); + } + break; + + case 57: + +/* Line 1806 of yacc.c */ +#line 634 "asmshader.y" + { + struct shader_reg reg; + TRACE("Input reg declaration\n"); + if((yyvsp[(2) - (3)].modshift).shift != 0) { + asmparser_message(&asm_ctx, "Line %u: Shift modifier not allowed here\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + if(asm_ctx.shader->type != ST_PIXEL) { + asmparser_message(&asm_ctx, "Line %u: Declaration needs a semantic\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + ZeroMemory(®, sizeof(reg)); + reg.type = (yyvsp[(3) - (3)].reg).type; + reg.regnum = (yyvsp[(3) - (3)].reg).regnum; + reg.rel_reg = NULL; + reg.srcmod = 0; + reg.u.writemask = BWRITERSP_WRITEMASK_ALL; + asm_ctx.funcs->dcl_input(&asm_ctx, 0, 0, (yyvsp[(2) - (3)].modshift).mod, ®); + } + break; + + case 58: + +/* Line 1806 of yacc.c */ +#line 656 "asmshader.y" + { + struct shader_reg reg; + TRACE("Input reg declaration\n"); + if((yyvsp[(2) - (4)].modshift).shift != 0) { + asmparser_message(&asm_ctx, "Line %u: Shift modifier not allowed here\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + if(asm_ctx.shader->type != ST_PIXEL) { + asmparser_message(&asm_ctx, "Line %u: Declaration needs a semantic\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + ZeroMemory(®, sizeof(reg)); + reg.type = (yyvsp[(3) - (4)].reg).type; + reg.regnum = (yyvsp[(3) - (4)].reg).regnum; + reg.rel_reg = NULL; + reg.srcmod = 0; + reg.u.writemask = (yyvsp[(4) - (4)].writemask); + asm_ctx.funcs->dcl_input(&asm_ctx, 0, 0, (yyvsp[(2) - (4)].modshift).mod, ®); + } + break; + + case 59: + +/* Line 1806 of yacc.c */ +#line 678 "asmshader.y" + { + TRACE("Sampler declared\n"); + if((yyvsp[(3) - (4)].modshift).shift != 0) { + asmparser_message(&asm_ctx, "Line %u: Shift modifier not allowed here\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + asm_ctx.funcs->dcl_sampler(&asm_ctx, (yyvsp[(2) - (4)].samplertype), (yyvsp[(3) - (4)].modshift).mod, (yyvsp[(4) - (4)].regnum), asm_ctx.line_no); + } + break; + + case 60: + +/* Line 1806 of yacc.c */ +#line 688 "asmshader.y" + { + TRACE("Sampler declared\n"); + if((yyvsp[(2) - (3)].modshift).shift != 0) { + asmparser_message(&asm_ctx, "Line %u: Shift modifier not allowed here\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + if(asm_ctx.shader->type != ST_PIXEL) { + asmparser_message(&asm_ctx, "Line %u: Declaration needs a sampler type\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + asm_ctx.funcs->dcl_sampler(&asm_ctx, BWRITERSTT_UNKNOWN, (yyvsp[(2) - (3)].modshift).mod, (yyvsp[(3) - (3)].regnum), asm_ctx.line_no); + } + break; + + case 61: + +/* Line 1806 of yacc.c */ +#line 703 "asmshader.y" + { + TRACE("Error rule: sampler decl of input reg\n"); + asmparser_message(&asm_ctx, "Line %u: Sampler declarations of input regs is not valid\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + break; + + case 62: + +/* Line 1806 of yacc.c */ +#line 710 "asmshader.y" + { + TRACE("Error rule: sampler decl of output reg\n"); + asmparser_message(&asm_ctx, "Line %u: Sampler declarations of output regs is not valid\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + break; + + case 63: + +/* Line 1806 of yacc.c */ +#line 717 "asmshader.y" + { + asm_ctx.funcs->constF(&asm_ctx, (yyvsp[(2) - (10)].regnum), (yyvsp[(4) - (10)].immval).val, (yyvsp[(6) - (10)].immval).val, (yyvsp[(8) - (10)].immval).val, (yyvsp[(10) - (10)].immval).val); + } + break; + + case 64: + +/* Line 1806 of yacc.c */ +#line 721 "asmshader.y" + { + asm_ctx.funcs->constI(&asm_ctx, (yyvsp[(2) - (10)].regnum), (yyvsp[(4) - (10)].immval).val, (yyvsp[(6) - (10)].immval).val, (yyvsp[(8) - (10)].immval).val, (yyvsp[(10) - (10)].immval).val); + } + break; + + case 65: + +/* Line 1806 of yacc.c */ +#line 725 "asmshader.y" + { + asm_ctx.funcs->constB(&asm_ctx, (yyvsp[(2) - (4)].regnum), (yyvsp[(4) - (4)].immbool)); + } + break; + + case 66: + +/* Line 1806 of yacc.c */ +#line 729 "asmshader.y" + { + TRACE("REP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_REP, 0, 0, 0, 0, &(yyvsp[(2) - (2)].sregs), 1); + } + break; + + case 67: + +/* Line 1806 of yacc.c */ +#line 734 "asmshader.y" + { + TRACE("ENDREP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_ENDREP, 0, 0, 0, 0, 0, 0); + } + break; + + case 68: + +/* Line 1806 of yacc.c */ +#line 739 "asmshader.y" + { + TRACE("IF\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_IF, 0, 0, 0, 0, &(yyvsp[(2) - (2)].sregs), 1); + } + break; + + case 69: + +/* Line 1806 of yacc.c */ +#line 744 "asmshader.y" + { + TRACE("IFC\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_IFC, 0, 0, (yyvsp[(2) - (3)].comptype), 0, &(yyvsp[(3) - (3)].sregs), 2); + } + break; + + case 70: + +/* Line 1806 of yacc.c */ +#line 749 "asmshader.y" + { + TRACE("ELSE\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_ELSE, 0, 0, 0, 0, 0, 0); + } + break; + + case 71: + +/* Line 1806 of yacc.c */ +#line 754 "asmshader.y" + { + TRACE("ENDIF\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_ENDIF, 0, 0, 0, 0, 0, 0); + } + break; + + case 72: + +/* Line 1806 of yacc.c */ +#line 759 "asmshader.y" + { + TRACE("BREAK\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_BREAK, 0, 0, 0, 0, 0, 0); + } + break; + + case 73: + +/* Line 1806 of yacc.c */ +#line 764 "asmshader.y" + { + TRACE("BREAKC\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_BREAKC, 0, 0, (yyvsp[(2) - (3)].comptype), 0, &(yyvsp[(3) - (3)].sregs), 2); + } + break; + + case 74: + +/* Line 1806 of yacc.c */ +#line 769 "asmshader.y" + { + TRACE("BREAKP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_BREAKP, 0, 0, 0, 0, &(yyvsp[(2) - (2)].sregs), 1); + } + break; + + case 75: + +/* Line 1806 of yacc.c */ +#line 774 "asmshader.y" + { + TRACE("CALL\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_CALL, 0, 0, 0, 0, &(yyvsp[(2) - (2)].sregs), 1); + } + break; + + case 76: + +/* Line 1806 of yacc.c */ +#line 779 "asmshader.y" + { + TRACE("CALLNZ\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_CALLNZ, 0, 0, 0, 0, &(yyvsp[(2) - (2)].sregs), 2); + } + break; + + case 77: + +/* Line 1806 of yacc.c */ +#line 784 "asmshader.y" + { + TRACE("LOOP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_LOOP, 0, 0, 0, 0, &(yyvsp[(2) - (2)].sregs), 2); + } + break; + + case 78: + +/* Line 1806 of yacc.c */ +#line 789 "asmshader.y" + { + TRACE("RET\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_RET, 0, 0, 0, 0, 0, 0); + } + break; + + case 79: + +/* Line 1806 of yacc.c */ +#line 794 "asmshader.y" + { + TRACE("ENDLOOP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_ENDLOOP, 0, 0, 0, 0, 0, 0); + } + break; + + case 80: + +/* Line 1806 of yacc.c */ +#line 799 "asmshader.y" + { + TRACE("LABEL\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_LABEL, 0, 0, 0, 0, &(yyvsp[(2) - (2)].sregs), 1); + } + break; + + case 81: + +/* Line 1806 of yacc.c */ +#line 804 "asmshader.y" + { + TRACE("SETP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_SETP, 0, 0, (yyvsp[(2) - (5)].comptype), &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 82: + +/* Line 1806 of yacc.c */ +#line 809 "asmshader.y" + { + TRACE("TEXLDL\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXLDL, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 83: + +/* Line 1806 of yacc.c */ +#line 814 "asmshader.y" + { + TRACE("LIT\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_LIT, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 84: + +/* Line 1806 of yacc.c */ +#line 819 "asmshader.y" + { + TRACE("MOVA\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_MOVA, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 85: + +/* Line 1806 of yacc.c */ +#line 824 "asmshader.y" + { + TRACE("CND\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_CND, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 3); + } + break; + + case 86: + +/* Line 1806 of yacc.c */ +#line 829 "asmshader.y" + { + TRACE("CMP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_CMP, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 3); + } + break; + + case 87: + +/* Line 1806 of yacc.c */ +#line 834 "asmshader.y" + { + TRACE("DP2ADD\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_DP2ADD, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 3); + } + break; + + case 88: + +/* Line 1806 of yacc.c */ +#line 839 "asmshader.y" + { + TRACE("TEXCOORD\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXCOORD, (yyvsp[(2) - (3)].modshift).mod, (yyvsp[(2) - (3)].modshift).shift, 0, &(yyvsp[(3) - (3)].reg), 0, 0); + } + break; + + case 89: + +/* Line 1806 of yacc.c */ +#line 844 "asmshader.y" + { + TRACE("TEXCRD\n"); + /* texcoord and texcrd share the same opcode */ + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXCOORD, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 90: + +/* Line 1806 of yacc.c */ +#line 850 "asmshader.y" + { + TRACE("TEXKILL\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXKILL, 0, 0, 0, &(yyvsp[(2) - (2)].reg), 0, 0); + } + break; + + case 91: + +/* Line 1806 of yacc.c */ +#line 855 "asmshader.y" + { + TRACE("TEX\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEX, (yyvsp[(2) - (3)].modshift).mod, (yyvsp[(2) - (3)].modshift).shift, 0, &(yyvsp[(3) - (3)].reg), 0, 0); + } + break; + + case 92: + +/* Line 1806 of yacc.c */ +#line 860 "asmshader.y" + { + TRACE("TEXDEPTH\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXDEPTH, (yyvsp[(2) - (3)].modshift).mod, (yyvsp[(2) - (3)].modshift).shift, 0, &(yyvsp[(3) - (3)].reg), 0, 0); + } + break; + + case 93: + +/* Line 1806 of yacc.c */ +#line 865 "asmshader.y" + { + TRACE("TEXLD\n"); + /* There is more than one acceptable syntax for texld: + with 1 sreg (PS 1.4) or + with 2 sregs (PS 2.0+) + Moreover, texld shares the same opcode as the tex instruction, + so there are a total of 3 valid syntaxes + These variations are handled in asmparser.c */ + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEX, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 94: + +/* Line 1806 of yacc.c */ +#line 876 "asmshader.y" + { + TRACE("TEXLDP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXLDP, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 95: + +/* Line 1806 of yacc.c */ +#line 881 "asmshader.y" + { + TRACE("TEXLDB\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXLDB, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 96: + +/* Line 1806 of yacc.c */ +#line 886 "asmshader.y" + { + TRACE("TEXBEM\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXBEM, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 97: + +/* Line 1806 of yacc.c */ +#line 891 "asmshader.y" + { + TRACE("TEXBEML\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXBEML, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 98: + +/* Line 1806 of yacc.c */ +#line 896 "asmshader.y" + { + TRACE("TEXREG2AR\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXREG2AR, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 99: + +/* Line 1806 of yacc.c */ +#line 901 "asmshader.y" + { + TRACE("TEXREG2GB\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXREG2GB, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 100: + +/* Line 1806 of yacc.c */ +#line 906 "asmshader.y" + { + TRACE("TEXREG2RGB\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXREG2RGB, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 101: + +/* Line 1806 of yacc.c */ +#line 911 "asmshader.y" + { + TRACE("TEXM3x2PAD\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x2PAD, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 102: + +/* Line 1806 of yacc.c */ +#line 916 "asmshader.y" + { + TRACE("INSTR_TEXM3x3PAD\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x3PAD, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 103: + +/* Line 1806 of yacc.c */ +#line 921 "asmshader.y" + { + TRACE("TEXM3x3SPEC\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x3SPEC, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 104: + +/* Line 1806 of yacc.c */ +#line 926 "asmshader.y" + { + TRACE("TEXM3x3VSPEC\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x3VSPEC, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 105: + +/* Line 1806 of yacc.c */ +#line 931 "asmshader.y" + { + TRACE("TEXM3x3TEX\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x3TEX, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 106: + +/* Line 1806 of yacc.c */ +#line 936 "asmshader.y" + { + TRACE("TEXDP3TEX\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXDP3TEX, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 107: + +/* Line 1806 of yacc.c */ +#line 941 "asmshader.y" + { + TRACE("TEXM3x2DEPTH\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x2DEPTH, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 108: + +/* Line 1806 of yacc.c */ +#line 946 "asmshader.y" + { + TRACE("TEXM3x2TEX\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x2TEX, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 109: + +/* Line 1806 of yacc.c */ +#line 951 "asmshader.y" + { + TRACE("TEXDP3\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXDP3, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 110: + +/* Line 1806 of yacc.c */ +#line 956 "asmshader.y" + { + TRACE("TEXM3x3\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x3, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 111: + +/* Line 1806 of yacc.c */ +#line 961 "asmshader.y" + { + TRACE("BEM\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_BEM, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 2); + } + break; + + case 112: + +/* Line 1806 of yacc.c */ +#line 966 "asmshader.y" + { + TRACE("DSX\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_DSX, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 113: + +/* Line 1806 of yacc.c */ +#line 971 "asmshader.y" + { + TRACE("DSY\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_DSY, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 1); + } + break; + + case 114: + +/* Line 1806 of yacc.c */ +#line 976 "asmshader.y" + { + TRACE("TEXLDD\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXLDD, (yyvsp[(2) - (5)].modshift).mod, (yyvsp[(2) - (5)].modshift).shift, 0, &(yyvsp[(3) - (5)].reg), &(yyvsp[(5) - (5)].sregs), 4); + } + break; + + case 115: + +/* Line 1806 of yacc.c */ +#line 981 "asmshader.y" + { + TRACE("PHASE\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_PHASE, 0, 0, 0, 0, 0, 0); + } + break; + + case 116: + +/* Line 1806 of yacc.c */ +#line 988 "asmshader.y" + { + (yyval.reg).regnum = (yyvsp[(1) - (2)].reg).regnum; + (yyval.reg).type = (yyvsp[(1) - (2)].reg).type; + (yyval.reg).u.writemask = BWRITERSP_WRITEMASK_ALL; + (yyval.reg).srcmod = BWRITERSPSM_NONE; + set_rel_reg(&(yyval.reg), &(yyvsp[(2) - (2)].rel_reg)); + } + break; + + case 117: + +/* Line 1806 of yacc.c */ +#line 996 "asmshader.y" + { + (yyval.reg).regnum = (yyvsp[(1) - (2)].reg).regnum; + (yyval.reg).type = (yyvsp[(1) - (2)].reg).type; + (yyval.reg).u.writemask = (yyvsp[(2) - (2)].writemask); + (yyval.reg).srcmod = BWRITERSPSM_NONE; + (yyval.reg).rel_reg = NULL; + } + break; + + case 118: + +/* Line 1806 of yacc.c */ +#line 1005 "asmshader.y" + { + (yyval.reg).regnum = (yyvsp[(1) - (1)].regnum); (yyval.reg).type = BWRITERSPR_TEMP; + } + break; + + case 119: + +/* Line 1806 of yacc.c */ +#line 1009 "asmshader.y" + { + (yyval.reg).regnum = (yyvsp[(1) - (1)].regnum); (yyval.reg).type = BWRITERSPR_OUTPUT; + } + break; + + case 120: + +/* Line 1806 of yacc.c */ +#line 1013 "asmshader.y" + { + (yyval.reg).regnum = (yyvsp[(1) - (1)].regnum); (yyval.reg).type = BWRITERSPR_INPUT; + } + break; + + case 121: + +/* Line 1806 of yacc.c */ +#line 1017 "asmshader.y" + { + asmparser_message(&asm_ctx, "Line %u: Register c%u is not a valid destination register\n", + asm_ctx.line_no, (yyvsp[(1) - (1)].regnum)); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + break; + + case 122: + +/* Line 1806 of yacc.c */ +#line 1023 "asmshader.y" + { + asmparser_message(&asm_ctx, "Line %u: Register i%u is not a valid destination register\n", + asm_ctx.line_no, (yyvsp[(1) - (1)].regnum)); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + break; + + case 123: + +/* Line 1806 of yacc.c */ +#line 1029 "asmshader.y" + { + asmparser_message(&asm_ctx, "Line %u: Register b%u is not a valid destination register\n", + asm_ctx.line_no, (yyvsp[(1) - (1)].regnum)); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + break; + + case 124: + +/* Line 1806 of yacc.c */ +#line 1035 "asmshader.y" + { + (yyval.reg).regnum = (yyvsp[(1) - (1)].regnum); (yyval.reg).type = BWRITERSPR_TEXTURE; + } + break; + + case 125: + +/* Line 1806 of yacc.c */ +#line 1039 "asmshader.y" + { + (yyval.reg).regnum = (yyvsp[(1) - (1)].regnum); (yyval.reg).type = BWRITERSPR_TEXCRDOUT; + } + break; + + case 126: + +/* Line 1806 of yacc.c */ +#line 1043 "asmshader.y" + { + asmparser_message(&asm_ctx, "Line %u: Register s%u is not a valid destination register\n", + asm_ctx.line_no, (yyvsp[(1) - (1)].regnum)); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + break; + + case 127: + +/* Line 1806 of yacc.c */ +#line 1049 "asmshader.y" + { + (yyval.reg).regnum = BWRITERSRO_POSITION; (yyval.reg).type = BWRITERSPR_RASTOUT; + } + break; + + case 128: + +/* Line 1806 of yacc.c */ +#line 1053 "asmshader.y" + { + (yyval.reg).regnum = BWRITERSRO_POINT_SIZE; (yyval.reg).type = BWRITERSPR_RASTOUT; + } + break; + + case 129: + +/* Line 1806 of yacc.c */ +#line 1057 "asmshader.y" + { + (yyval.reg).regnum = BWRITERSRO_FOG; (yyval.reg).type = BWRITERSPR_RASTOUT; + } + break; + + case 130: + +/* Line 1806 of yacc.c */ +#line 1061 "asmshader.y" + { + (yyval.reg).regnum = (yyvsp[(1) - (1)].regnum); (yyval.reg).type = BWRITERSPR_ATTROUT; + } + break; + + case 131: + +/* Line 1806 of yacc.c */ +#line 1065 "asmshader.y" + { + (yyval.reg).regnum = (yyvsp[(1) - (1)].regnum); (yyval.reg).type = BWRITERSPR_COLOROUT; + } + break; + + case 132: + +/* Line 1806 of yacc.c */ +#line 1069 "asmshader.y" + { + (yyval.reg).regnum = 0; (yyval.reg).type = BWRITERSPR_DEPTHOUT; + } + break; + + case 133: + +/* Line 1806 of yacc.c */ +#line 1073 "asmshader.y" + { + (yyval.reg).regnum = 0; (yyval.reg).type = BWRITERSPR_PREDICATE; + } + break; + + case 134: + +/* Line 1806 of yacc.c */ +#line 1077 "asmshader.y" + { + asmparser_message(&asm_ctx, "Line %u: Register vPos is not a valid destination register\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + break; + + case 135: + +/* Line 1806 of yacc.c */ +#line 1083 "asmshader.y" + { + asmparser_message(&asm_ctx, "Line %u: Register vFace is not a valid destination register\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + break; + + case 136: + +/* Line 1806 of yacc.c */ +#line 1089 "asmshader.y" + { + /* index 0 is hardcoded for the addr register */ + (yyval.reg).regnum = 0; (yyval.reg).type = BWRITERSPR_ADDR; + } + break; + + case 137: + +/* Line 1806 of yacc.c */ +#line 1094 "asmshader.y" + { + asmparser_message(&asm_ctx, "Line %u: Register aL is not a valid destination register\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + break; + + case 138: + +/* Line 1806 of yacc.c */ +#line 1101 "asmshader.y" + { + if((yyvsp[(2) - (2)].wm_components).writemask == SWIZZLE_ERR) { + asmparser_message(&asm_ctx, "Line %u: Invalid writemask specified\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + /* Provide a correct writemask to prevent following complaints */ + (yyval.writemask) = BWRITERSP_WRITEMASK_ALL; + } + else { + (yyval.writemask) = (yyvsp[(2) - (2)].wm_components).writemask; + TRACE("Writemask: %x\n", (yyval.writemask)); + } + } + break; + + case 139: + +/* Line 1806 of yacc.c */ +#line 1116 "asmshader.y" + { + (yyval.wm_components).writemask = 1 << (yyvsp[(1) - (1)].component); + (yyval.wm_components).last = (yyvsp[(1) - (1)].component); + (yyval.wm_components).idx = 1; + } + break; + + case 140: + +/* Line 1806 of yacc.c */ +#line 1122 "asmshader.y" + { + if((yyvsp[(1) - (2)].wm_components).writemask == SWIZZLE_ERR || (yyvsp[(1) - (2)].wm_components).idx == 4) + /* Wrong writemask */ + (yyval.wm_components).writemask = SWIZZLE_ERR; + else { + if((yyvsp[(2) - (2)].component) <= (yyvsp[(1) - (2)].wm_components).last) + (yyval.wm_components).writemask = SWIZZLE_ERR; + else { + (yyval.wm_components).writemask = (yyvsp[(1) - (2)].wm_components).writemask | (1 << (yyvsp[(2) - (2)].component)); + (yyval.wm_components).idx = (yyvsp[(1) - (2)].wm_components).idx + 1; + } + } + } + break; + + case 141: + +/* Line 1806 of yacc.c */ +#line 1137 "asmshader.y" + { + (yyval.swizzle) = BWRITERVS_NOSWIZZLE; + TRACE("Default swizzle: %08x\n", (yyval.swizzle)); + } + break; + + case 142: + +/* Line 1806 of yacc.c */ +#line 1142 "asmshader.y" + { + if((yyvsp[(2) - (2)].sw_components).swizzle == SWIZZLE_ERR) { + asmparser_message(&asm_ctx, "Line %u: Invalid swizzle\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + /* Provide a correct swizzle to prevent following complaints */ + (yyval.swizzle) = BWRITERVS_NOSWIZZLE; + } + else { + DWORD last, i; + + (yyval.swizzle) = (yyvsp[(2) - (2)].sw_components).swizzle << BWRITERVS_SWIZZLE_SHIFT; + /* Fill the swizzle by extending the last component */ + last = ((yyvsp[(2) - (2)].sw_components).swizzle >> 2 * ((yyvsp[(2) - (2)].sw_components).idx - 1)) & 0x03; + for(i = (yyvsp[(2) - (2)].sw_components).idx; i < 4; i++){ + (yyval.swizzle) |= last << (BWRITERVS_SWIZZLE_SHIFT + 2 * i); + } + TRACE("Got a swizzle: %08x\n", (yyval.swizzle)); + } + } + break; + + case 143: + +/* Line 1806 of yacc.c */ +#line 1164 "asmshader.y" + { + (yyval.sw_components).swizzle = (yyvsp[(1) - (1)].component); + (yyval.sw_components).idx = 1; + } + break; + + case 144: + +/* Line 1806 of yacc.c */ +#line 1169 "asmshader.y" + { + if((yyvsp[(1) - (2)].sw_components).idx == 4) { + /* Too many sw_components */ + (yyval.sw_components).swizzle = SWIZZLE_ERR; + (yyval.sw_components).idx = 4; + } + else { + (yyval.sw_components).swizzle = (yyvsp[(1) - (2)].sw_components).swizzle | ((yyvsp[(2) - (2)].component) << 2 * (yyvsp[(1) - (2)].sw_components).idx); + (yyval.sw_components).idx = (yyvsp[(1) - (2)].sw_components).idx + 1; + } + } + break; + + case 145: + +/* Line 1806 of yacc.c */ +#line 1182 "asmshader.y" + { + (yyval.modshift).mod = 0; + (yyval.modshift).shift = 0; + } + break; + + case 146: + +/* Line 1806 of yacc.c */ +#line 1187 "asmshader.y" + { + (yyval.modshift).mod = (yyvsp[(1) - (2)].modshift).mod | (yyvsp[(2) - (2)].modshift).mod; + if((yyvsp[(1) - (2)].modshift).shift && (yyvsp[(2) - (2)].modshift).shift) { + asmparser_message(&asm_ctx, "Line %u: More than one shift flag\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + (yyval.modshift).shift = (yyvsp[(1) - (2)].modshift).shift; + } else { + (yyval.modshift).shift = (yyvsp[(1) - (2)].modshift).shift | (yyvsp[(2) - (2)].modshift).shift; + } + } + break; + + case 147: + +/* Line 1806 of yacc.c */ +#line 1200 "asmshader.y" + { + (yyval.modshift).mod = 0; + (yyval.modshift).shift = 1; + } + break; + + case 148: + +/* Line 1806 of yacc.c */ +#line 1205 "asmshader.y" + { + (yyval.modshift).mod = 0; + (yyval.modshift).shift = 2; + } + break; + + case 149: + +/* Line 1806 of yacc.c */ +#line 1210 "asmshader.y" + { + (yyval.modshift).mod = 0; + (yyval.modshift).shift = 3; + } + break; + + case 150: + +/* Line 1806 of yacc.c */ +#line 1215 "asmshader.y" + { + (yyval.modshift).mod = 0; + (yyval.modshift).shift = 15; + } + break; + + case 151: + +/* Line 1806 of yacc.c */ +#line 1220 "asmshader.y" + { + (yyval.modshift).mod = 0; + (yyval.modshift).shift = 14; + } + break; + + case 152: + +/* Line 1806 of yacc.c */ +#line 1225 "asmshader.y" + { + (yyval.modshift).mod = 0; + (yyval.modshift).shift = 13; + } + break; + + case 153: + +/* Line 1806 of yacc.c */ +#line 1230 "asmshader.y" + { + (yyval.modshift).mod = BWRITERSPDM_SATURATE; + (yyval.modshift).shift = 0; + } + break; + + case 154: + +/* Line 1806 of yacc.c */ +#line 1235 "asmshader.y" + { + (yyval.modshift).mod = BWRITERSPDM_PARTIALPRECISION; + (yyval.modshift).shift = 0; + } + break; + + case 155: + +/* Line 1806 of yacc.c */ +#line 1240 "asmshader.y" + { + (yyval.modshift).mod = BWRITERSPDM_MSAMPCENTROID; + (yyval.modshift).shift = 0; + } + break; + + case 156: + +/* Line 1806 of yacc.c */ +#line 1246 "asmshader.y" + { + (yyval.sregs).reg[0] = (yyvsp[(1) - (1)].reg); + (yyval.sregs).count = 1; + } + break; + + case 157: + +/* Line 1806 of yacc.c */ +#line 1251 "asmshader.y" + { + if((yyval.sregs).count == MAX_SRC_REGS){ + asmparser_message(&asm_ctx, "Line %u: Too many source registers in this instruction\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + else + (yyval.sregs).reg[(yyval.sregs).count++] = (yyvsp[(3) - (3)].reg); + } + break; + + case 158: + +/* Line 1806 of yacc.c */ +#line 1262 "asmshader.y" + { + (yyval.reg).type = (yyvsp[(1) - (3)].reg).type; + (yyval.reg).regnum = (yyvsp[(1) - (3)].reg).regnum; + (yyval.reg).u.swizzle = (yyvsp[(3) - (3)].swizzle); + (yyval.reg).srcmod = BWRITERSPSM_NONE; + set_rel_reg(&(yyval.reg), &(yyvsp[(2) - (3)].rel_reg)); + } + break; + + case 159: + +/* Line 1806 of yacc.c */ +#line 1270 "asmshader.y" + { + (yyval.reg).type = (yyvsp[(1) - (4)].reg).type; + (yyval.reg).regnum = (yyvsp[(1) - (4)].reg).regnum; + set_rel_reg(&(yyval.reg), &(yyvsp[(2) - (4)].rel_reg)); + (yyval.reg).srcmod = (yyvsp[(3) - (4)].srcmod); + (yyval.reg).u.swizzle = (yyvsp[(4) - (4)].swizzle); + } + break; + + case 160: + +/* Line 1806 of yacc.c */ +#line 1278 "asmshader.y" + { + (yyval.reg).type = (yyvsp[(2) - (4)].reg).type; + (yyval.reg).regnum = (yyvsp[(2) - (4)].reg).regnum; + (yyval.reg).srcmod = BWRITERSPSM_NEG; + set_rel_reg(&(yyval.reg), &(yyvsp[(3) - (4)].rel_reg)); + (yyval.reg).u.swizzle = (yyvsp[(4) - (4)].swizzle); + } + break; + + case 161: + +/* Line 1806 of yacc.c */ +#line 1286 "asmshader.y" + { + (yyval.reg).type = (yyvsp[(2) - (5)].reg).type; + (yyval.reg).regnum = (yyvsp[(2) - (5)].reg).regnum; + set_rel_reg(&(yyval.reg), &(yyvsp[(3) - (5)].rel_reg)); + switch((yyvsp[(4) - (5)].srcmod)) { + case BWRITERSPSM_BIAS: (yyval.reg).srcmod = BWRITERSPSM_BIASNEG; break; + case BWRITERSPSM_X2: (yyval.reg).srcmod = BWRITERSPSM_X2NEG; break; + case BWRITERSPSM_SIGN: (yyval.reg).srcmod = BWRITERSPSM_SIGNNEG; break; + case BWRITERSPSM_ABS: (yyval.reg).srcmod = BWRITERSPSM_ABSNEG; break; + case BWRITERSPSM_DZ: + asmparser_message(&asm_ctx, "Line %u: Incompatible source modifiers: NEG and DZ\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + break; + case BWRITERSPSM_DW: + asmparser_message(&asm_ctx, "Line %u: Incompatible source modifiers: NEG and DW\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + break; + default: + FIXME("Unhandled combination of NEGATE and %u\n", (yyvsp[(4) - (5)].srcmod)); + } + (yyval.reg).u.swizzle = (yyvsp[(5) - (5)].swizzle); + } + break; + + case 162: + +/* Line 1806 of yacc.c */ +#line 1311 "asmshader.y" + { + if((yyvsp[(1) - (5)].immval).val != 1.0 || (!(yyvsp[(1) - (5)].immval).integer)) { + asmparser_message(&asm_ctx, "Line %u: Only \"1 - reg\" is valid for D3DSPSM_COMP, " + "%g - reg found\n", asm_ctx.line_no, (yyvsp[(1) - (5)].immval).val); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + /* Complement - not compatible with other source modifiers */ + (yyval.reg).type = (yyvsp[(3) - (5)].reg).type; + (yyval.reg).regnum = (yyvsp[(3) - (5)].reg).regnum; + (yyval.reg).srcmod = BWRITERSPSM_COMP; + set_rel_reg(&(yyval.reg), &(yyvsp[(4) - (5)].rel_reg)); + (yyval.reg).u.swizzle = (yyvsp[(5) - (5)].swizzle); + } + break; + + case 163: + +/* Line 1806 of yacc.c */ +#line 1325 "asmshader.y" + { + /* For nicer error reporting */ + if((yyvsp[(1) - (6)].immval).val != 1.0 || (!(yyvsp[(1) - (6)].immval).integer)) { + asmparser_message(&asm_ctx, "Line %u: Only \"1 - reg\" is valid for D3DSPSM_COMP\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } else { + asmparser_message(&asm_ctx, "Line %u: Incompatible source modifiers: D3DSPSM_COMP and %s\n", + asm_ctx.line_no, + debug_print_srcmod((yyvsp[(5) - (6)].srcmod))); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + } + break; + + case 164: + +/* Line 1806 of yacc.c */ +#line 1339 "asmshader.y" + { + (yyval.reg).type = (yyvsp[(2) - (3)].reg).type; + (yyval.reg).regnum = (yyvsp[(2) - (3)].reg).regnum; + (yyval.reg).rel_reg = NULL; + (yyval.reg).srcmod = BWRITERSPSM_NOT; + (yyval.reg).u.swizzle = (yyvsp[(3) - (3)].swizzle); + } + break; + + case 165: + +/* Line 1806 of yacc.c */ +#line 1348 "asmshader.y" + { + (yyval.rel_reg).has_rel_reg = FALSE; + (yyval.rel_reg).additional_offset = 0; + } + break; + + case 166: + +/* Line 1806 of yacc.c */ +#line 1353 "asmshader.y" + { + (yyval.rel_reg).has_rel_reg = FALSE; + (yyval.rel_reg).additional_offset = (yyvsp[(2) - (3)].immval).val; + } + break; + + case 167: + +/* Line 1806 of yacc.c */ +#line 1358 "asmshader.y" + { + (yyval.rel_reg).has_rel_reg = TRUE; + (yyval.rel_reg).type = (yyvsp[(2) - (4)].reg).type; + (yyval.rel_reg).additional_offset = 0; + (yyval.rel_reg).rel_regnum = (yyvsp[(2) - (4)].reg).regnum; + (yyval.rel_reg).swizzle = (yyvsp[(3) - (4)].swizzle); + } + break; + + case 168: + +/* Line 1806 of yacc.c */ +#line 1366 "asmshader.y" + { + (yyval.rel_reg).has_rel_reg = TRUE; + (yyval.rel_reg).type = (yyvsp[(4) - (6)].reg).type; + (yyval.rel_reg).additional_offset = (yyvsp[(2) - (6)].immval).val; + (yyval.rel_reg).rel_regnum = (yyvsp[(4) - (6)].reg).regnum; + (yyval.rel_reg).swizzle = (yyvsp[(5) - (6)].swizzle); + } + break; + + case 169: + +/* Line 1806 of yacc.c */ +#line 1374 "asmshader.y" + { + (yyval.rel_reg).has_rel_reg = TRUE; + (yyval.rel_reg).type = (yyvsp[(2) - (6)].reg).type; + (yyval.rel_reg).additional_offset = (yyvsp[(5) - (6)].immval).val; + (yyval.rel_reg).rel_regnum = (yyvsp[(2) - (6)].reg).regnum; + (yyval.rel_reg).swizzle = (yyvsp[(3) - (6)].swizzle); + } + break; + + case 170: + +/* Line 1806 of yacc.c */ +#line 1382 "asmshader.y" + { + (yyval.rel_reg).has_rel_reg = TRUE; + (yyval.rel_reg).type = (yyvsp[(4) - (8)].reg).type; + (yyval.rel_reg).additional_offset = (yyvsp[(2) - (8)].immval).val + (yyvsp[(7) - (8)].immval).val; + (yyval.rel_reg).rel_regnum = (yyvsp[(4) - (8)].reg).regnum; + (yyval.rel_reg).swizzle = (yyvsp[(5) - (8)].swizzle); + } + break; + + case 171: + +/* Line 1806 of yacc.c */ +#line 1391 "asmshader.y" + { + if(!(yyvsp[(1) - (1)].immval).integer) { + asmparser_message(&asm_ctx, "Line %u: Unexpected float %f\n", + asm_ctx.line_no, (yyvsp[(1) - (1)].immval).val); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + (yyval.immval).val = (yyvsp[(1) - (1)].immval).val; + } + break; + + case 172: + +/* Line 1806 of yacc.c */ +#line 1400 "asmshader.y" + { + if(!(yyvsp[(3) - (3)].immval).integer) { + asmparser_message(&asm_ctx, "Line %u: Unexpected float %f\n", + asm_ctx.line_no, (yyvsp[(3) - (3)].immval).val); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + (yyval.immval).val = (yyvsp[(1) - (3)].immval).val + (yyvsp[(3) - (3)].immval).val; + } + break; + + case 173: + +/* Line 1806 of yacc.c */ +#line 1410 "asmshader.y" + { + (yyval.srcmod) = BWRITERSPSM_BIAS; + } + break; + + case 174: + +/* Line 1806 of yacc.c */ +#line 1414 "asmshader.y" + { + (yyval.srcmod) = BWRITERSPSM_X2; + } + break; + + case 175: + +/* Line 1806 of yacc.c */ +#line 1418 "asmshader.y" + { + (yyval.srcmod) = BWRITERSPSM_SIGN; + } + break; + + case 176: + +/* Line 1806 of yacc.c */ +#line 1422 "asmshader.y" + { + (yyval.srcmod) = BWRITERSPSM_DZ; + } + break; + + case 177: + +/* Line 1806 of yacc.c */ +#line 1426 "asmshader.y" + { + (yyval.srcmod) = BWRITERSPSM_DW; + } + break; + + case 178: + +/* Line 1806 of yacc.c */ +#line 1430 "asmshader.y" + { + (yyval.srcmod) = BWRITERSPSM_ABS; + } + break; + + case 179: + +/* Line 1806 of yacc.c */ +#line 1435 "asmshader.y" + { + (yyval.reg).regnum = 0; (yyval.reg).type = BWRITERSPR_ADDR; + } + break; + + case 180: + +/* Line 1806 of yacc.c */ +#line 1439 "asmshader.y" + { + (yyval.reg).regnum = 0; (yyval.reg).type = BWRITERSPR_LOOP; + } + break; + + case 181: + +/* Line 1806 of yacc.c */ +#line 1444 "asmshader.y" + { + (yyval.reg).regnum = (yyvsp[(1) - (1)].regnum); (yyval.reg).type = BWRITERSPR_TEMP; + } + break; + + case 182: + +/* Line 1806 of yacc.c */ +#line 1448 "asmshader.y" + { + asmparser_message(&asm_ctx, "Line %u: Register o%u is not a valid source register\n", + asm_ctx.line_no, (yyvsp[(1) - (1)].regnum)); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + break; + + case 183: + +/* Line 1806 of yacc.c */ +#line 1454 "asmshader.y" + { + (yyval.reg).regnum = (yyvsp[(1) - (1)].regnum); (yyval.reg).type = BWRITERSPR_INPUT; + } + break; + + case 184: + +/* Line 1806 of yacc.c */ +#line 1458 "asmshader.y" + { + (yyval.reg).regnum = (yyvsp[(1) - (1)].regnum); (yyval.reg).type = BWRITERSPR_CONST; + } + break; + + case 185: + +/* Line 1806 of yacc.c */ +#line 1462 "asmshader.y" + { + (yyval.reg).regnum = (yyvsp[(1) - (1)].regnum); (yyval.reg).type = BWRITERSPR_CONSTINT; + } + break; + + case 186: + +/* Line 1806 of yacc.c */ +#line 1466 "asmshader.y" + { + (yyval.reg).regnum = (yyvsp[(1) - (1)].regnum); (yyval.reg).type = BWRITERSPR_CONSTBOOL; + } + break; + + case 187: + +/* Line 1806 of yacc.c */ +#line 1470 "asmshader.y" + { + (yyval.reg).regnum = (yyvsp[(1) - (1)].regnum); (yyval.reg).type = BWRITERSPR_TEXTURE; + } + break; + + case 188: + +/* Line 1806 of yacc.c */ +#line 1474 "asmshader.y" + { + asmparser_message(&asm_ctx, "Line %u: Register oT%u is not a valid source register\n", + asm_ctx.line_no, (yyvsp[(1) - (1)].regnum)); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + break; + + case 189: + +/* Line 1806 of yacc.c */ +#line 1480 "asmshader.y" + { + (yyval.reg).regnum = (yyvsp[(1) - (1)].regnum); (yyval.reg).type = BWRITERSPR_SAMPLER; + } + break; + + case 190: + +/* Line 1806 of yacc.c */ +#line 1484 "asmshader.y" + { + asmparser_message(&asm_ctx, "Line %u: Register oPos is not a valid source register\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + break; + + case 191: + +/* Line 1806 of yacc.c */ +#line 1490 "asmshader.y" + { + asmparser_message(&asm_ctx, "Line %u: Register oFog is not a valid source register\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + break; + + case 192: + +/* Line 1806 of yacc.c */ +#line 1496 "asmshader.y" + { + asmparser_message(&asm_ctx, "Line %u: Register oD%u is not a valid source register\n", + asm_ctx.line_no, (yyvsp[(1) - (1)].regnum)); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + break; + + case 193: + +/* Line 1806 of yacc.c */ +#line 1502 "asmshader.y" + { + asmparser_message(&asm_ctx, "Line %u: Register oC%u is not a valid source register\n", + asm_ctx.line_no, (yyvsp[(1) - (1)].regnum)); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + break; + + case 194: + +/* Line 1806 of yacc.c */ +#line 1508 "asmshader.y" + { + asmparser_message(&asm_ctx, "Line %u: Register oDepth is not a valid source register\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + break; + + case 195: + +/* Line 1806 of yacc.c */ +#line 1514 "asmshader.y" + { + (yyval.reg).regnum = 0; (yyval.reg).type = BWRITERSPR_PREDICATE; + } + break; + + case 196: + +/* Line 1806 of yacc.c */ +#line 1518 "asmshader.y" + { + (yyval.reg).regnum = 0; (yyval.reg).type = BWRITERSPR_MISCTYPE; + } + break; + + case 197: + +/* Line 1806 of yacc.c */ +#line 1522 "asmshader.y" + { + (yyval.reg).regnum = 1; (yyval.reg).type = BWRITERSPR_MISCTYPE; + } + break; + + case 198: + +/* Line 1806 of yacc.c */ +#line 1526 "asmshader.y" + { + (yyval.reg).regnum = 0; (yyval.reg).type = BWRITERSPR_ADDR; + } + break; + + case 199: + +/* Line 1806 of yacc.c */ +#line 1530 "asmshader.y" + { + (yyval.reg).regnum = 0; (yyval.reg).type = BWRITERSPR_LOOP; + } + break; + + case 200: + +/* Line 1806 of yacc.c */ +#line 1534 "asmshader.y" + { + (yyval.reg).regnum = (yyvsp[(1) - (1)].regnum); (yyval.reg).type = BWRITERSPR_LABEL; + } + break; + + case 201: + +/* Line 1806 of yacc.c */ +#line 1538 "asmshader.y" + { (yyval.comptype) = BWRITER_COMPARISON_GT; } + break; + + case 202: + +/* Line 1806 of yacc.c */ +#line 1539 "asmshader.y" + { (yyval.comptype) = BWRITER_COMPARISON_LT; } + break; + + case 203: + +/* Line 1806 of yacc.c */ +#line 1540 "asmshader.y" + { (yyval.comptype) = BWRITER_COMPARISON_GE; } + break; + + case 204: + +/* Line 1806 of yacc.c */ +#line 1541 "asmshader.y" + { (yyval.comptype) = BWRITER_COMPARISON_LE; } + break; + + case 205: + +/* Line 1806 of yacc.c */ +#line 1542 "asmshader.y" + { (yyval.comptype) = BWRITER_COMPARISON_EQ; } + break; + + case 206: + +/* Line 1806 of yacc.c */ +#line 1543 "asmshader.y" + { (yyval.comptype) = BWRITER_COMPARISON_NE; } + break; + + case 207: + +/* Line 1806 of yacc.c */ +#line 1546 "asmshader.y" + { + TRACE("dcl_position%u\n", (yyvsp[(1) - (1)].regnum)); + (yyval.declaration).regnum = (yyvsp[(1) - (1)].regnum); + (yyval.declaration).dclusage = BWRITERDECLUSAGE_POSITION; + } + break; + + case 208: + +/* Line 1806 of yacc.c */ +#line 1552 "asmshader.y" + { + TRACE("dcl_blendweight%u\n", (yyvsp[(1) - (1)].regnum)); + (yyval.declaration).regnum = (yyvsp[(1) - (1)].regnum); + (yyval.declaration).dclusage = BWRITERDECLUSAGE_BLENDWEIGHT; + } + break; + + case 209: + +/* Line 1806 of yacc.c */ +#line 1558 "asmshader.y" + { + TRACE("dcl_blendindices%u\n", (yyvsp[(1) - (1)].regnum)); + (yyval.declaration).regnum = (yyvsp[(1) - (1)].regnum); + (yyval.declaration).dclusage = BWRITERDECLUSAGE_BLENDINDICES; + } + break; + + case 210: + +/* Line 1806 of yacc.c */ +#line 1564 "asmshader.y" + { + TRACE("dcl_normal%u\n", (yyvsp[(1) - (1)].regnum)); + (yyval.declaration).regnum = (yyvsp[(1) - (1)].regnum); + (yyval.declaration).dclusage = BWRITERDECLUSAGE_NORMAL; + } + break; + + case 211: + +/* Line 1806 of yacc.c */ +#line 1570 "asmshader.y" + { + TRACE("dcl_psize%u\n", (yyvsp[(1) - (1)].regnum)); + (yyval.declaration).regnum = (yyvsp[(1) - (1)].regnum); + (yyval.declaration).dclusage = BWRITERDECLUSAGE_PSIZE; + } + break; + + case 212: + +/* Line 1806 of yacc.c */ +#line 1576 "asmshader.y" + { + TRACE("dcl_texcoord%u\n", (yyvsp[(1) - (1)].regnum)); + (yyval.declaration).regnum = (yyvsp[(1) - (1)].regnum); + (yyval.declaration).dclusage = BWRITERDECLUSAGE_TEXCOORD; + } + break; + + case 213: + +/* Line 1806 of yacc.c */ +#line 1582 "asmshader.y" + { + TRACE("dcl_tangent%u\n", (yyvsp[(1) - (1)].regnum)); + (yyval.declaration).regnum = (yyvsp[(1) - (1)].regnum); + (yyval.declaration).dclusage = BWRITERDECLUSAGE_TANGENT; + } + break; + + case 214: + +/* Line 1806 of yacc.c */ +#line 1588 "asmshader.y" + { + TRACE("dcl_binormal%u\n", (yyvsp[(1) - (1)].regnum)); + (yyval.declaration).regnum = (yyvsp[(1) - (1)].regnum); + (yyval.declaration).dclusage = BWRITERDECLUSAGE_BINORMAL; + } + break; + + case 215: + +/* Line 1806 of yacc.c */ +#line 1594 "asmshader.y" + { + TRACE("dcl_tessfactor%u\n", (yyvsp[(1) - (1)].regnum)); + (yyval.declaration).regnum = (yyvsp[(1) - (1)].regnum); + (yyval.declaration).dclusage = BWRITERDECLUSAGE_TESSFACTOR; + } + break; + + case 216: + +/* Line 1806 of yacc.c */ +#line 1600 "asmshader.y" + { + TRACE("dcl_positiont%u\n", (yyvsp[(1) - (1)].regnum)); + (yyval.declaration).regnum = (yyvsp[(1) - (1)].regnum); + (yyval.declaration).dclusage = BWRITERDECLUSAGE_POSITIONT; + } + break; + + case 217: + +/* Line 1806 of yacc.c */ +#line 1606 "asmshader.y" + { + TRACE("dcl_color%u\n", (yyvsp[(1) - (1)].regnum)); + (yyval.declaration).regnum = (yyvsp[(1) - (1)].regnum); + (yyval.declaration).dclusage = BWRITERDECLUSAGE_COLOR; + } + break; + + case 218: + +/* Line 1806 of yacc.c */ +#line 1612 "asmshader.y" + { + TRACE("dcl_fog%u\n", (yyvsp[(1) - (1)].regnum)); + (yyval.declaration).regnum = (yyvsp[(1) - (1)].regnum); + (yyval.declaration).dclusage = BWRITERDECLUSAGE_FOG; + } + break; + + case 219: + +/* Line 1806 of yacc.c */ +#line 1618 "asmshader.y" + { + TRACE("dcl_depth%u\n", (yyvsp[(1) - (1)].regnum)); + (yyval.declaration).regnum = (yyvsp[(1) - (1)].regnum); + (yyval.declaration).dclusage = BWRITERDECLUSAGE_DEPTH; + } + break; + + case 220: + +/* Line 1806 of yacc.c */ +#line 1624 "asmshader.y" + { + TRACE("dcl_sample%u\n", (yyvsp[(1) - (1)].regnum)); + (yyval.declaration).regnum = (yyvsp[(1) - (1)].regnum); + (yyval.declaration).dclusage = BWRITERDECLUSAGE_SAMPLE; + } + break; + + case 221: + +/* Line 1806 of yacc.c */ +#line 1631 "asmshader.y" + { + (yyval.reg).regnum = (yyvsp[(1) - (1)].regnum); (yyval.reg).type = BWRITERSPR_INPUT; + } + break; + + case 222: + +/* Line 1806 of yacc.c */ +#line 1635 "asmshader.y" + { + (yyval.reg).regnum = (yyvsp[(1) - (1)].regnum); (yyval.reg).type = BWRITERSPR_TEXTURE; + } + break; + + case 223: + +/* Line 1806 of yacc.c */ +#line 1640 "asmshader.y" + { + (yyval.samplertype) = BWRITERSTT_1D; + } + break; + + case 224: + +/* Line 1806 of yacc.c */ +#line 1644 "asmshader.y" + { + (yyval.samplertype) = BWRITERSTT_2D; + } + break; + + case 225: + +/* Line 1806 of yacc.c */ +#line 1648 "asmshader.y" + { + (yyval.samplertype) = BWRITERSTT_CUBE; + } + break; + + case 226: + +/* Line 1806 of yacc.c */ +#line 1652 "asmshader.y" + { + (yyval.samplertype) = BWRITERSTT_VOLUME; + } + break; + + case 227: + +/* Line 1806 of yacc.c */ +#line 1657 "asmshader.y" + { + (yyval.reg).type = BWRITERSPR_PREDICATE; + (yyval.reg).regnum = 0; + (yyval.reg).rel_reg = NULL; + (yyval.reg).srcmod = BWRITERSPSM_NONE; + (yyval.reg).u.swizzle = (yyvsp[(3) - (4)].swizzle); + } + break; + + case 228: + +/* Line 1806 of yacc.c */ +#line 1665 "asmshader.y" + { + (yyval.reg).type = BWRITERSPR_PREDICATE; + (yyval.reg).regnum = 0; + (yyval.reg).rel_reg = NULL; + (yyval.reg).srcmod = BWRITERSPSM_NOT; + (yyval.reg).u.swizzle = (yyvsp[(4) - (5)].swizzle); + } + break; + + + +/* Line 1806 of yacc.c */ +#line 4612 "asmshader.tab.c" + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; + } +# undef YYSYNTAX_ERROR +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + *++yyvsp = yylval; + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#if !defined(yyoverflow) || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + } + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + + +/* Line 2067 of yacc.c */ +#line 1673 "asmshader.y" + + +struct bwriter_shader *parse_asm_shader(char **messages) +{ + struct bwriter_shader *ret = NULL; + + asm_ctx.shader = NULL; + asm_ctx.status = PARSE_SUCCESS; + asm_ctx.messages.size = asm_ctx.messages.capacity = 0; + asm_ctx.line_no = 1; + + asmshader_parse(); + + if (asm_ctx.status != PARSE_ERR) + ret = asm_ctx.shader; + else if (asm_ctx.shader) + SlDeleteShader(asm_ctx.shader); + + if (messages) + { + if (asm_ctx.messages.size) + { + /* Shrink the buffer to the used size */ + *messages = d3dcompiler_realloc(asm_ctx.messages.string, asm_ctx.messages.size + 1); + if (!*messages) + { + ERR("Out of memory, no messages reported\n"); + d3dcompiler_free(asm_ctx.messages.string); + } + } + else + { + *messages = NULL; + } + } + else + { + if (asm_ctx.messages.capacity) + d3dcompiler_free(asm_ctx.messages.string); + } + + return ret; +} + diff --git a/dll/directx/wine/d3dcompiler_43/asmshader.tab.h b/dll/directx/wine/d3dcompiler_43/asmshader.tab.h new file mode 100644 index 00000000000..04e200d4e05 --- /dev/null +++ b/dll/directx/wine/d3dcompiler_43/asmshader.tab.h @@ -0,0 +1,257 @@ +/* A Bison parser, made by GNU Bison 2.5. */ + +/* Bison interface for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + INSTR_ADD = 258, + INSTR_NOP = 259, + INSTR_MOV = 260, + INSTR_SUB = 261, + INSTR_MAD = 262, + INSTR_MUL = 263, + INSTR_RCP = 264, + INSTR_RSQ = 265, + INSTR_DP3 = 266, + INSTR_DP4 = 267, + INSTR_MIN = 268, + INSTR_MAX = 269, + INSTR_SLT = 270, + INSTR_SGE = 271, + INSTR_ABS = 272, + INSTR_EXP = 273, + INSTR_LOG = 274, + INSTR_EXPP = 275, + INSTR_LOGP = 276, + INSTR_DST = 277, + INSTR_LRP = 278, + INSTR_FRC = 279, + INSTR_POW = 280, + INSTR_CRS = 281, + INSTR_SGN = 282, + INSTR_NRM = 283, + INSTR_SINCOS = 284, + INSTR_M4x4 = 285, + INSTR_M4x3 = 286, + INSTR_M3x4 = 287, + INSTR_M3x3 = 288, + INSTR_M3x2 = 289, + INSTR_DCL = 290, + INSTR_DEF = 291, + INSTR_DEFB = 292, + INSTR_DEFI = 293, + INSTR_REP = 294, + INSTR_ENDREP = 295, + INSTR_IF = 296, + INSTR_ELSE = 297, + INSTR_ENDIF = 298, + INSTR_BREAK = 299, + INSTR_BREAKP = 300, + INSTR_CALL = 301, + INSTR_CALLNZ = 302, + INSTR_LOOP = 303, + INSTR_RET = 304, + INSTR_ENDLOOP = 305, + INSTR_LABEL = 306, + INSTR_SETP = 307, + INSTR_TEXLDL = 308, + INSTR_LIT = 309, + INSTR_MOVA = 310, + INSTR_CND = 311, + INSTR_CMP = 312, + INSTR_DP2ADD = 313, + INSTR_TEXCOORD = 314, + INSTR_TEXCRD = 315, + INSTR_TEXKILL = 316, + INSTR_TEX = 317, + INSTR_TEXLD = 318, + INSTR_TEXBEM = 319, + INSTR_TEXBEML = 320, + INSTR_TEXREG2AR = 321, + INSTR_TEXREG2GB = 322, + INSTR_TEXREG2RGB = 323, + INSTR_TEXM3x2PAD = 324, + INSTR_TEXM3x2TEX = 325, + INSTR_TEXM3x3PAD = 326, + INSTR_TEXM3x3SPEC = 327, + INSTR_TEXM3x3VSPEC = 328, + INSTR_TEXM3x3TEX = 329, + INSTR_TEXDP3TEX = 330, + INSTR_TEXM3x2DEPTH = 331, + INSTR_TEXDP3 = 332, + INSTR_TEXM3x3 = 333, + INSTR_TEXDEPTH = 334, + INSTR_BEM = 335, + INSTR_DSX = 336, + INSTR_DSY = 337, + INSTR_TEXLDP = 338, + INSTR_TEXLDB = 339, + INSTR_TEXLDD = 340, + INSTR_PHASE = 341, + REG_TEMP = 342, + REG_OUTPUT = 343, + REG_INPUT = 344, + REG_CONSTFLOAT = 345, + REG_CONSTINT = 346, + REG_CONSTBOOL = 347, + REG_TEXTURE = 348, + REG_SAMPLER = 349, + REG_TEXCRDOUT = 350, + REG_OPOS = 351, + REG_OFOG = 352, + REG_OPTS = 353, + REG_VERTEXCOLOR = 354, + REG_FRAGCOLOR = 355, + REG_FRAGDEPTH = 356, + REG_VPOS = 357, + REG_VFACE = 358, + REG_ADDRESS = 359, + REG_LOOP = 360, + REG_PREDICATE = 361, + REG_LABEL = 362, + VER_VS10 = 363, + VER_VS11 = 364, + VER_VS20 = 365, + VER_VS2X = 366, + VER_VS30 = 367, + VER_PS10 = 368, + VER_PS11 = 369, + VER_PS12 = 370, + VER_PS13 = 371, + VER_PS14 = 372, + VER_PS20 = 373, + VER_PS2X = 374, + VER_PS30 = 375, + SHIFT_X2 = 376, + SHIFT_X4 = 377, + SHIFT_X8 = 378, + SHIFT_D2 = 379, + SHIFT_D4 = 380, + SHIFT_D8 = 381, + MOD_SAT = 382, + MOD_PP = 383, + MOD_CENTROID = 384, + COMP_GT = 385, + COMP_LT = 386, + COMP_GE = 387, + COMP_LE = 388, + COMP_EQ = 389, + COMP_NE = 390, + SMOD_BIAS = 391, + SMOD_SCALEBIAS = 392, + SMOD_DZ = 393, + SMOD_DW = 394, + SMOD_ABS = 395, + SMOD_NOT = 396, + SAMPTYPE_1D = 397, + SAMPTYPE_2D = 398, + SAMPTYPE_CUBE = 399, + SAMPTYPE_VOLUME = 400, + USAGE_POSITION = 401, + USAGE_BLENDWEIGHT = 402, + USAGE_BLENDINDICES = 403, + USAGE_NORMAL = 404, + USAGE_PSIZE = 405, + USAGE_TEXCOORD = 406, + USAGE_TANGENT = 407, + USAGE_BINORMAL = 408, + USAGE_TESSFACTOR = 409, + USAGE_POSITIONT = 410, + USAGE_COLOR = 411, + USAGE_FOG = 412, + USAGE_DEPTH = 413, + USAGE_SAMPLE = 414, + COMPONENT = 415, + IMMVAL = 416, + IMMBOOL = 417 + }; +#endif + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ + +/* Line 2068 of yacc.c */ +#line 70 "asmshader.y" + + struct { + float val; + BOOL integer; + } immval; + BOOL immbool; + unsigned int regnum; + struct shader_reg reg; + DWORD srcmod; + DWORD writemask; + struct { + DWORD writemask; + DWORD idx; + DWORD last; + } wm_components; + DWORD swizzle; + struct { + DWORD swizzle; + DWORD idx; + } sw_components; + DWORD component; + struct { + DWORD mod; + DWORD shift; + } modshift; + BWRITER_COMPARISON_TYPE comptype; + struct { + DWORD dclusage; + unsigned int regnum; + } declaration; + BWRITERSAMPLER_TEXTURE_TYPE samplertype; + struct rel_reg rel_reg; + struct src_regs sregs; + + + +/* Line 2068 of yacc.c */ +#line 249 "asmshader.tab.h" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + +extern YYSTYPE asmshader_lval; + + diff --git a/dll/directx/wine/d3dcompiler_43/asmshader.y b/dll/directx/wine/d3dcompiler_43/asmshader.y new file mode 100644 index 00000000000..4109745a6a8 --- /dev/null +++ b/dll/directx/wine/d3dcompiler_43/asmshader.y @@ -0,0 +1,1715 @@ + /* + * Direct3D shader assembler + * + * Copyright 2008 Stefan Dösinger + * Copyright 2009 Matteo Bruni + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +%{ +#include "config.h" +#include "wine/port.h" +#include "wine/debug.h" + +#include "d3dcompiler_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(asmshader); + +struct asm_parser asm_ctx; + +void asmparser_message(struct asm_parser *ctx, const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + compilation_message(&ctx->messages, fmt, args); + va_end(args); +} + +static void asmshader_error(char const *s) { + asmparser_message(&asm_ctx, "Line %u: Error \"%s\" from bison\n", asm_ctx.line_no, s); + set_parse_status(&asm_ctx.status, PARSE_ERR); +} + +static void set_rel_reg(struct shader_reg *reg, struct rel_reg *rel) { + /* We can have an additional offset without true relative addressing + * ex. c2[ 4 ] */ + reg->regnum += rel->additional_offset; + if(!rel->has_rel_reg) { + reg->rel_reg = NULL; + } else { + reg->rel_reg = d3dcompiler_alloc(sizeof(*reg->rel_reg)); + if(!reg->rel_reg) { + return; + } + reg->rel_reg->type = rel->type; + reg->rel_reg->u.swizzle = rel->swizzle; + reg->rel_reg->regnum = rel->rel_regnum; + } +} + +/* Needed lexer functions declarations */ +int asmshader_lex(void); + + +%} + +%union { + struct { + float val; + BOOL integer; + } immval; + BOOL immbool; + unsigned int regnum; + struct shader_reg reg; + DWORD srcmod; + DWORD writemask; + struct { + DWORD writemask; + DWORD idx; + DWORD last; + } wm_components; + DWORD swizzle; + struct { + DWORD swizzle; + DWORD idx; + } sw_components; + DWORD component; + struct { + DWORD mod; + DWORD shift; + } modshift; + BWRITER_COMPARISON_TYPE comptype; + struct { + DWORD dclusage; + unsigned int regnum; + } declaration; + BWRITERSAMPLER_TEXTURE_TYPE samplertype; + struct rel_reg rel_reg; + struct src_regs sregs; +} + +/* Common instructions between vertex and pixel shaders */ +%token INSTR_ADD +%token INSTR_NOP +%token INSTR_MOV +%token INSTR_SUB +%token INSTR_MAD +%token INSTR_MUL +%token INSTR_RCP +%token INSTR_RSQ +%token INSTR_DP3 +%token INSTR_DP4 +%token INSTR_MIN +%token INSTR_MAX +%token INSTR_SLT +%token INSTR_SGE +%token INSTR_ABS +%token INSTR_EXP +%token INSTR_LOG +%token INSTR_EXPP +%token INSTR_LOGP +%token INSTR_DST +%token INSTR_LRP +%token INSTR_FRC +%token INSTR_POW +%token INSTR_CRS +%token INSTR_SGN +%token INSTR_NRM +%token INSTR_SINCOS +%token INSTR_M4x4 +%token INSTR_M4x3 +%token INSTR_M3x4 +%token INSTR_M3x3 +%token INSTR_M3x2 +%token INSTR_DCL +%token INSTR_DEF +%token INSTR_DEFB +%token INSTR_DEFI +%token INSTR_REP +%token INSTR_ENDREP +%token INSTR_IF +%token INSTR_ELSE +%token INSTR_ENDIF +%token INSTR_BREAK +%token INSTR_BREAKP +%token INSTR_CALL +%token INSTR_CALLNZ +%token INSTR_LOOP +%token INSTR_RET +%token INSTR_ENDLOOP +%token INSTR_LABEL +%token INSTR_SETP +%token INSTR_TEXLDL + +/* Vertex shader only instructions */ +%token INSTR_LIT +%token INSTR_MOVA + +/* Pixel shader only instructions */ +%token INSTR_CND +%token INSTR_CMP +%token INSTR_DP2ADD +%token INSTR_TEXCOORD +%token INSTR_TEXCRD +%token INSTR_TEXKILL +%token INSTR_TEX +%token INSTR_TEXLD +%token INSTR_TEXBEM +%token INSTR_TEXBEML +%token INSTR_TEXREG2AR +%token INSTR_TEXREG2GB +%token INSTR_TEXREG2RGB +%token INSTR_TEXM3x2PAD +%token INSTR_TEXM3x2TEX +%token INSTR_TEXM3x3PAD +%token INSTR_TEXM3x3SPEC +%token INSTR_TEXM3x3VSPEC +%token INSTR_TEXM3x3TEX +%token INSTR_TEXDP3TEX +%token INSTR_TEXM3x2DEPTH +%token INSTR_TEXDP3 +%token INSTR_TEXM3x3 +%token INSTR_TEXDEPTH +%token INSTR_BEM +%token INSTR_DSX +%token INSTR_DSY +%token INSTR_TEXLDP +%token INSTR_TEXLDB +%token INSTR_TEXLDD +%token INSTR_PHASE + +/* Registers */ +%token REG_TEMP +%token REG_OUTPUT +%token REG_INPUT +%token REG_CONSTFLOAT +%token REG_CONSTINT +%token REG_CONSTBOOL +%token REG_TEXTURE +%token REG_SAMPLER +%token REG_TEXCRDOUT +%token REG_OPOS +%token REG_OFOG +%token REG_OPTS +%token REG_VERTEXCOLOR +%token REG_FRAGCOLOR +%token REG_FRAGDEPTH +%token REG_VPOS +%token REG_VFACE +%token REG_ADDRESS +%token REG_LOOP +%token REG_PREDICATE +%token REG_LABEL + +/* Version tokens */ +%token VER_VS10 +%token VER_VS11 +%token VER_VS20 +%token VER_VS2X +%token VER_VS30 + +%token VER_PS10 +%token VER_PS11 +%token VER_PS12 +%token VER_PS13 +%token VER_PS14 +%token VER_PS20 +%token VER_PS2X +%token VER_PS30 + +/* Output modifiers */ +%token SHIFT_X2 +%token SHIFT_X4 +%token SHIFT_X8 +%token SHIFT_D2 +%token SHIFT_D4 +%token SHIFT_D8 +%token MOD_SAT +%token MOD_PP +%token MOD_CENTROID + +/* Compare tokens */ +%token COMP_GT +%token COMP_LT +%token COMP_GE +%token COMP_LE +%token COMP_EQ +%token COMP_NE + +/* Source register modifiers */ +%token SMOD_BIAS +%token SMOD_SCALEBIAS +%token SMOD_DZ +%token SMOD_DW +%token SMOD_ABS +%token SMOD_NOT + +/* Sampler types */ +%token SAMPTYPE_1D +%token SAMPTYPE_2D +%token SAMPTYPE_CUBE +%token SAMPTYPE_VOLUME + +/* Usage declaration tokens */ +%token USAGE_POSITION +%token USAGE_BLENDWEIGHT +%token USAGE_BLENDINDICES +%token USAGE_NORMAL +%token USAGE_PSIZE +%token USAGE_TEXCOORD +%token USAGE_TANGENT +%token USAGE_BINORMAL +%token USAGE_TESSFACTOR +%token USAGE_POSITIONT +%token USAGE_COLOR +%token USAGE_FOG +%token USAGE_DEPTH +%token USAGE_SAMPLE + +/* Misc stuff */ +%token COMPONENT +%token IMMVAL +%token IMMBOOL + +%type dreg_name +%type dreg +%type sreg_name +%type relreg_name +%type sreg +%type smod +%type writemask +%type wm_components +%type swizzle +%type sw_components +%type omods +%type omodifier +%type comp +%type dclusage +%type dcl_inputreg +%type sampdcl +%type rel_reg +%type predicate +%type immsum +%type sregs + +%% + +shader: version_marker instructions + { + asm_ctx.funcs->end(&asm_ctx); + } + +version_marker: VER_VS10 + { + TRACE("Vertex shader 1.0\n"); + create_vs10_parser(&asm_ctx); + } + | VER_VS11 + { + TRACE("Vertex shader 1.1\n"); + create_vs11_parser(&asm_ctx); + } + | VER_VS20 + { + TRACE("Vertex shader 2.0\n"); + create_vs20_parser(&asm_ctx); + } + | VER_VS2X + { + TRACE("Vertex shader 2.x\n"); + create_vs2x_parser(&asm_ctx); + } + | VER_VS30 + { + TRACE("Vertex shader 3.0\n"); + create_vs30_parser(&asm_ctx); + } + | VER_PS10 + { + TRACE("Pixel shader 1.0\n"); + create_ps10_parser(&asm_ctx); + } + | VER_PS11 + { + TRACE("Pixel shader 1.1\n"); + create_ps11_parser(&asm_ctx); + } + | VER_PS12 + { + TRACE("Pixel shader 1.2\n"); + create_ps12_parser(&asm_ctx); + } + | VER_PS13 + { + TRACE("Pixel shader 1.3\n"); + create_ps13_parser(&asm_ctx); + } + | VER_PS14 + { + TRACE("Pixel shader 1.4\n"); + create_ps14_parser(&asm_ctx); + } + | VER_PS20 + { + TRACE("Pixel shader 2.0\n"); + create_ps20_parser(&asm_ctx); + } + | VER_PS2X + { + TRACE("Pixel shader 2.x\n"); + create_ps2x_parser(&asm_ctx); + } + | VER_PS30 + { + TRACE("Pixel shader 3.0\n"); + create_ps30_parser(&asm_ctx); + } + +instructions: /* empty */ + | instructions complexinstr + { + /* Nothing to do */ + } + +complexinstr: instruction + { + + } + | predicate instruction + { + TRACE("predicate\n"); + asm_ctx.funcs->predicate(&asm_ctx, &$1); + } + | '+' instruction + { + TRACE("coissue\n"); + asm_ctx.funcs->coissue(&asm_ctx); + } + +instruction: INSTR_ADD omods dreg ',' sregs + { + TRACE("ADD\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_ADD, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_NOP + { + TRACE("NOP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_NOP, 0, 0, 0, 0, 0, 0); + } + | INSTR_MOV omods dreg ',' sregs + { + TRACE("MOV\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_MOV, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_SUB omods dreg ',' sregs + { + TRACE("SUB\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_SUB, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_MAD omods dreg ',' sregs + { + TRACE("MAD\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_MAD, $2.mod, $2.shift, 0, &$3, &$5, 3); + } + | INSTR_MUL omods dreg ',' sregs + { + TRACE("MUL\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_MUL, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_RCP omods dreg ',' sregs + { + TRACE("RCP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_RCP, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_RSQ omods dreg ',' sregs + { + TRACE("RSQ\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_RSQ, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_DP3 omods dreg ',' sregs + { + TRACE("DP3\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_DP3, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_DP4 omods dreg ',' sregs + { + TRACE("DP4\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_DP4, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_MIN omods dreg ',' sregs + { + TRACE("MIN\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_MIN, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_MAX omods dreg ',' sregs + { + TRACE("MAX\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_MAX, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_SLT omods dreg ',' sregs + { + TRACE("SLT\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_SLT, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_SGE omods dreg ',' sregs + { + TRACE("SGE\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_SGE, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_ABS omods dreg ',' sregs + { + TRACE("ABS\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_ABS, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_EXP omods dreg ',' sregs + { + TRACE("EXP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_EXP, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_LOG omods dreg ',' sregs + { + TRACE("LOG\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_LOG, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_LOGP omods dreg ',' sregs + { + TRACE("LOGP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_LOGP, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_EXPP omods dreg ',' sregs + { + TRACE("EXPP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_EXPP, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_DST omods dreg ',' sregs + { + TRACE("DST\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_DST, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_LRP omods dreg ',' sregs + { + TRACE("LRP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_LRP, $2.mod, $2.shift, 0, &$3, &$5, 3); + } + | INSTR_FRC omods dreg ',' sregs + { + TRACE("FRC\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_FRC, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_POW omods dreg ',' sregs + { + TRACE("POW\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_POW, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_CRS omods dreg ',' sregs + { + TRACE("CRS\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_CRS, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_SGN omods dreg ',' sregs + { + TRACE("SGN\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_SGN, $2.mod, $2.shift, 0, &$3, &$5, 3); + } + | INSTR_NRM omods dreg ',' sregs + { + TRACE("NRM\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_NRM, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_SINCOS omods dreg ',' sregs + { + TRACE("SINCOS\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_SINCOS, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_M4x4 omods dreg ',' sregs + { + TRACE("M4x4\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_M4x4, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_M4x3 omods dreg ',' sregs + { + TRACE("M4x3\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_M4x3, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_M3x4 omods dreg ',' sregs + { + TRACE("M3x4\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_M3x4, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_M3x3 omods dreg ',' sregs + { + TRACE("M3x3\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_M3x3, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_M3x2 omods dreg ',' sregs + { + TRACE("M3x2\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_M3x2, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_DCL dclusage REG_OUTPUT + { + struct shader_reg reg; + TRACE("Output reg declaration\n"); + ZeroMemory(®, sizeof(reg)); + reg.type = BWRITERSPR_OUTPUT; + reg.regnum = $3; + reg.rel_reg = NULL; + reg.srcmod = 0; + reg.u.writemask = BWRITERSP_WRITEMASK_ALL; + asm_ctx.funcs->dcl_output(&asm_ctx, $2.dclusage, $2.regnum, ®); + } + | INSTR_DCL dclusage REG_OUTPUT writemask + { + struct shader_reg reg; + TRACE("Output reg declaration\n"); + ZeroMemory(®, sizeof(reg)); + reg.type = BWRITERSPR_OUTPUT; + reg.regnum = $3; + reg.rel_reg = NULL; + reg.srcmod = 0; + reg.u.writemask = $4; + asm_ctx.funcs->dcl_output(&asm_ctx, $2.dclusage, $2.regnum, ®); + } + | INSTR_DCL dclusage omods dcl_inputreg + { + struct shader_reg reg; + TRACE("Input reg declaration\n"); + if($3.shift != 0) { + asmparser_message(&asm_ctx, "Line %u: Shift modifier not allowed here\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + if(asm_ctx.shader->version == BWRITERPS_VERSION(2, 0) || + asm_ctx.shader->version == BWRITERPS_VERSION(2, 1)) { + asmparser_message(&asm_ctx, "Line %u: Declaration not supported in PS 2\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + ZeroMemory(®, sizeof(reg)); + reg.type = $4.type; + reg.regnum = $4.regnum; + reg.rel_reg = NULL; + reg.srcmod = 0; + reg.u.writemask = BWRITERSP_WRITEMASK_ALL; + asm_ctx.funcs->dcl_input(&asm_ctx, $2.dclusage, $2.regnum, $3.mod, ®); + } + | INSTR_DCL dclusage omods dcl_inputreg writemask + { + struct shader_reg reg; + TRACE("Input reg declaration\n"); + if($3.shift != 0) { + asmparser_message(&asm_ctx, "Line %u: Shift modifier not allowed here\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + if(asm_ctx.shader->version == BWRITERPS_VERSION(2, 0) || + asm_ctx.shader->version == BWRITERPS_VERSION(2, 1)) { + asmparser_message(&asm_ctx, "Line %u: Declaration not supported in PS 2\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + ZeroMemory(®, sizeof(reg)); + reg.type = $4.type; + reg.regnum = $4.regnum; + reg.rel_reg = NULL; + reg.srcmod = 0; + reg.u.writemask = $5; + asm_ctx.funcs->dcl_input(&asm_ctx, $2.dclusage, $2.regnum, $3.mod, ®); + } + | INSTR_DCL omods dcl_inputreg + { + struct shader_reg reg; + TRACE("Input reg declaration\n"); + if($2.shift != 0) { + asmparser_message(&asm_ctx, "Line %u: Shift modifier not allowed here\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + if(asm_ctx.shader->type != ST_PIXEL) { + asmparser_message(&asm_ctx, "Line %u: Declaration needs a semantic\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + ZeroMemory(®, sizeof(reg)); + reg.type = $3.type; + reg.regnum = $3.regnum; + reg.rel_reg = NULL; + reg.srcmod = 0; + reg.u.writemask = BWRITERSP_WRITEMASK_ALL; + asm_ctx.funcs->dcl_input(&asm_ctx, 0, 0, $2.mod, ®); + } + | INSTR_DCL omods dcl_inputreg writemask + { + struct shader_reg reg; + TRACE("Input reg declaration\n"); + if($2.shift != 0) { + asmparser_message(&asm_ctx, "Line %u: Shift modifier not allowed here\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + if(asm_ctx.shader->type != ST_PIXEL) { + asmparser_message(&asm_ctx, "Line %u: Declaration needs a semantic\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + ZeroMemory(®, sizeof(reg)); + reg.type = $3.type; + reg.regnum = $3.regnum; + reg.rel_reg = NULL; + reg.srcmod = 0; + reg.u.writemask = $4; + asm_ctx.funcs->dcl_input(&asm_ctx, 0, 0, $2.mod, ®); + } + | INSTR_DCL sampdcl omods REG_SAMPLER + { + TRACE("Sampler declared\n"); + if($3.shift != 0) { + asmparser_message(&asm_ctx, "Line %u: Shift modifier not allowed here\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + asm_ctx.funcs->dcl_sampler(&asm_ctx, $2, $3.mod, $4, asm_ctx.line_no); + } + | INSTR_DCL omods REG_SAMPLER + { + TRACE("Sampler declared\n"); + if($2.shift != 0) { + asmparser_message(&asm_ctx, "Line %u: Shift modifier not allowed here\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + if(asm_ctx.shader->type != ST_PIXEL) { + asmparser_message(&asm_ctx, "Line %u: Declaration needs a sampler type\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + asm_ctx.funcs->dcl_sampler(&asm_ctx, BWRITERSTT_UNKNOWN, $2.mod, $3, asm_ctx.line_no); + } + | INSTR_DCL sampdcl omods dcl_inputreg + { + TRACE("Error rule: sampler decl of input reg\n"); + asmparser_message(&asm_ctx, "Line %u: Sampler declarations of input regs is not valid\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + | INSTR_DCL sampdcl omods REG_OUTPUT + { + TRACE("Error rule: sampler decl of output reg\n"); + asmparser_message(&asm_ctx, "Line %u: Sampler declarations of output regs is not valid\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + | INSTR_DEF REG_CONSTFLOAT ',' IMMVAL ',' IMMVAL ',' IMMVAL ',' IMMVAL + { + asm_ctx.funcs->constF(&asm_ctx, $2, $4.val, $6.val, $8.val, $10.val); + } + | INSTR_DEFI REG_CONSTINT ',' IMMVAL ',' IMMVAL ',' IMMVAL ',' IMMVAL + { + asm_ctx.funcs->constI(&asm_ctx, $2, $4.val, $6.val, $8.val, $10.val); + } + | INSTR_DEFB REG_CONSTBOOL ',' IMMBOOL + { + asm_ctx.funcs->constB(&asm_ctx, $2, $4); + } + | INSTR_REP sregs + { + TRACE("REP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_REP, 0, 0, 0, 0, &$2, 1); + } + | INSTR_ENDREP + { + TRACE("ENDREP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_ENDREP, 0, 0, 0, 0, 0, 0); + } + | INSTR_IF sregs + { + TRACE("IF\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_IF, 0, 0, 0, 0, &$2, 1); + } + | INSTR_IF comp sregs + { + TRACE("IFC\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_IFC, 0, 0, $2, 0, &$3, 2); + } + | INSTR_ELSE + { + TRACE("ELSE\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_ELSE, 0, 0, 0, 0, 0, 0); + } + | INSTR_ENDIF + { + TRACE("ENDIF\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_ENDIF, 0, 0, 0, 0, 0, 0); + } + | INSTR_BREAK + { + TRACE("BREAK\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_BREAK, 0, 0, 0, 0, 0, 0); + } + | INSTR_BREAK comp sregs + { + TRACE("BREAKC\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_BREAKC, 0, 0, $2, 0, &$3, 2); + } + | INSTR_BREAKP sregs + { + TRACE("BREAKP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_BREAKP, 0, 0, 0, 0, &$2, 1); + } + | INSTR_CALL sregs + { + TRACE("CALL\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_CALL, 0, 0, 0, 0, &$2, 1); + } + | INSTR_CALLNZ sregs + { + TRACE("CALLNZ\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_CALLNZ, 0, 0, 0, 0, &$2, 2); + } + | INSTR_LOOP sregs + { + TRACE("LOOP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_LOOP, 0, 0, 0, 0, &$2, 2); + } + | INSTR_RET + { + TRACE("RET\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_RET, 0, 0, 0, 0, 0, 0); + } + | INSTR_ENDLOOP + { + TRACE("ENDLOOP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_ENDLOOP, 0, 0, 0, 0, 0, 0); + } + | INSTR_LABEL sregs + { + TRACE("LABEL\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_LABEL, 0, 0, 0, 0, &$2, 1); + } + | INSTR_SETP comp dreg ',' sregs + { + TRACE("SETP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_SETP, 0, 0, $2, &$3, &$5, 2); + } + | INSTR_TEXLDL omods dreg ',' sregs + { + TRACE("TEXLDL\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXLDL, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_LIT omods dreg ',' sregs + { + TRACE("LIT\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_LIT, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_MOVA omods dreg ',' sregs + { + TRACE("MOVA\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_MOVA, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_CND omods dreg ',' sregs + { + TRACE("CND\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_CND, $2.mod, $2.shift, 0, &$3, &$5, 3); + } + | INSTR_CMP omods dreg ',' sregs + { + TRACE("CMP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_CMP, $2.mod, $2.shift, 0, &$3, &$5, 3); + } + | INSTR_DP2ADD omods dreg ',' sregs + { + TRACE("DP2ADD\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_DP2ADD, $2.mod, $2.shift, 0, &$3, &$5, 3); + } + | INSTR_TEXCOORD omods dreg + { + TRACE("TEXCOORD\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXCOORD, $2.mod, $2.shift, 0, &$3, 0, 0); + } + | INSTR_TEXCRD omods dreg ',' sregs + { + TRACE("TEXCRD\n"); + /* texcoord and texcrd share the same opcode */ + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXCOORD, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_TEXKILL dreg + { + TRACE("TEXKILL\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXKILL, 0, 0, 0, &$2, 0, 0); + } + | INSTR_TEX omods dreg + { + TRACE("TEX\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEX, $2.mod, $2.shift, 0, &$3, 0, 0); + } + | INSTR_TEXDEPTH omods dreg + { + TRACE("TEXDEPTH\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXDEPTH, $2.mod, $2.shift, 0, &$3, 0, 0); + } + | INSTR_TEXLD omods dreg ',' sregs + { + TRACE("TEXLD\n"); + /* There is more than one acceptable syntax for texld: + with 1 sreg (PS 1.4) or + with 2 sregs (PS 2.0+) + Moreover, texld shares the same opcode as the tex instruction, + so there are a total of 3 valid syntaxes + These variations are handled in asmparser.c */ + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEX, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_TEXLDP omods dreg ',' sregs + { + TRACE("TEXLDP\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXLDP, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_TEXLDB omods dreg ',' sregs + { + TRACE("TEXLDB\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXLDB, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_TEXBEM omods dreg ',' sregs + { + TRACE("TEXBEM\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXBEM, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_TEXBEML omods dreg ',' sregs + { + TRACE("TEXBEML\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXBEML, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_TEXREG2AR omods dreg ',' sregs + { + TRACE("TEXREG2AR\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXREG2AR, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_TEXREG2GB omods dreg ',' sregs + { + TRACE("TEXREG2GB\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXREG2GB, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_TEXREG2RGB omods dreg ',' sregs + { + TRACE("TEXREG2RGB\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXREG2RGB, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_TEXM3x2PAD omods dreg ',' sregs + { + TRACE("TEXM3x2PAD\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x2PAD, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_TEXM3x3PAD omods dreg ',' sregs + { + TRACE("INSTR_TEXM3x3PAD\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x3PAD, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_TEXM3x3SPEC omods dreg ',' sregs + { + TRACE("TEXM3x3SPEC\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x3SPEC, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_TEXM3x3VSPEC omods dreg ',' sregs + { + TRACE("TEXM3x3VSPEC\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x3VSPEC, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_TEXM3x3TEX omods dreg ',' sregs + { + TRACE("TEXM3x3TEX\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x3TEX, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_TEXDP3TEX omods dreg ',' sregs + { + TRACE("TEXDP3TEX\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXDP3TEX, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_TEXM3x2DEPTH omods dreg ',' sregs + { + TRACE("TEXM3x2DEPTH\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x2DEPTH, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_TEXM3x2TEX omods dreg ',' sregs + { + TRACE("TEXM3x2TEX\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x2TEX, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_TEXDP3 omods dreg ',' sregs + { + TRACE("TEXDP3\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXDP3, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_TEXM3x3 omods dreg ',' sregs + { + TRACE("TEXM3x3\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXM3x3, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_BEM omods dreg ',' sregs + { + TRACE("BEM\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_BEM, $2.mod, $2.shift, 0, &$3, &$5, 2); + } + | INSTR_DSX omods dreg ',' sregs + { + TRACE("DSX\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_DSX, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_DSY omods dreg ',' sregs + { + TRACE("DSY\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_DSY, $2.mod, $2.shift, 0, &$3, &$5, 1); + } + | INSTR_TEXLDD omods dreg ',' sregs + { + TRACE("TEXLDD\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_TEXLDD, $2.mod, $2.shift, 0, &$3, &$5, 4); + } + | INSTR_PHASE + { + TRACE("PHASE\n"); + asm_ctx.funcs->instr(&asm_ctx, BWRITERSIO_PHASE, 0, 0, 0, 0, 0, 0); + } + + +dreg: dreg_name rel_reg + { + $$.regnum = $1.regnum; + $$.type = $1.type; + $$.u.writemask = BWRITERSP_WRITEMASK_ALL; + $$.srcmod = BWRITERSPSM_NONE; + set_rel_reg(&$$, &$2); + } + | dreg_name writemask + { + $$.regnum = $1.regnum; + $$.type = $1.type; + $$.u.writemask = $2; + $$.srcmod = BWRITERSPSM_NONE; + $$.rel_reg = NULL; + } + +dreg_name: REG_TEMP + { + $$.regnum = $1; $$.type = BWRITERSPR_TEMP; + } + | REG_OUTPUT + { + $$.regnum = $1; $$.type = BWRITERSPR_OUTPUT; + } + | REG_INPUT + { + $$.regnum = $1; $$.type = BWRITERSPR_INPUT; + } + | REG_CONSTFLOAT + { + asmparser_message(&asm_ctx, "Line %u: Register c%u is not a valid destination register\n", + asm_ctx.line_no, $1); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + | REG_CONSTINT + { + asmparser_message(&asm_ctx, "Line %u: Register i%u is not a valid destination register\n", + asm_ctx.line_no, $1); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + | REG_CONSTBOOL + { + asmparser_message(&asm_ctx, "Line %u: Register b%u is not a valid destination register\n", + asm_ctx.line_no, $1); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + | REG_TEXTURE + { + $$.regnum = $1; $$.type = BWRITERSPR_TEXTURE; + } + | REG_TEXCRDOUT + { + $$.regnum = $1; $$.type = BWRITERSPR_TEXCRDOUT; + } + | REG_SAMPLER + { + asmparser_message(&asm_ctx, "Line %u: Register s%u is not a valid destination register\n", + asm_ctx.line_no, $1); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + | REG_OPOS + { + $$.regnum = BWRITERSRO_POSITION; $$.type = BWRITERSPR_RASTOUT; + } + | REG_OPTS + { + $$.regnum = BWRITERSRO_POINT_SIZE; $$.type = BWRITERSPR_RASTOUT; + } + | REG_OFOG + { + $$.regnum = BWRITERSRO_FOG; $$.type = BWRITERSPR_RASTOUT; + } + | REG_VERTEXCOLOR + { + $$.regnum = $1; $$.type = BWRITERSPR_ATTROUT; + } + | REG_FRAGCOLOR + { + $$.regnum = $1; $$.type = BWRITERSPR_COLOROUT; + } + | REG_FRAGDEPTH + { + $$.regnum = 0; $$.type = BWRITERSPR_DEPTHOUT; + } + | REG_PREDICATE + { + $$.regnum = 0; $$.type = BWRITERSPR_PREDICATE; + } + | REG_VPOS + { + asmparser_message(&asm_ctx, "Line %u: Register vPos is not a valid destination register\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + | REG_VFACE + { + asmparser_message(&asm_ctx, "Line %u: Register vFace is not a valid destination register\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + | REG_ADDRESS + { + /* index 0 is hardcoded for the addr register */ + $$.regnum = 0; $$.type = BWRITERSPR_ADDR; + } + | REG_LOOP + { + asmparser_message(&asm_ctx, "Line %u: Register aL is not a valid destination register\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + +writemask: '.' wm_components + { + if($2.writemask == SWIZZLE_ERR) { + asmparser_message(&asm_ctx, "Line %u: Invalid writemask specified\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + /* Provide a correct writemask to prevent following complaints */ + $$ = BWRITERSP_WRITEMASK_ALL; + } + else { + $$ = $2.writemask; + TRACE("Writemask: %x\n", $$); + } + } + +wm_components: COMPONENT + { + $$.writemask = 1 << $1; + $$.last = $1; + $$.idx = 1; + } + | wm_components COMPONENT + { + if($1.writemask == SWIZZLE_ERR || $1.idx == 4) + /* Wrong writemask */ + $$.writemask = SWIZZLE_ERR; + else { + if($2 <= $1.last) + $$.writemask = SWIZZLE_ERR; + else { + $$.writemask = $1.writemask | (1 << $2); + $$.idx = $1.idx + 1; + } + } + } + +swizzle: /* empty */ + { + $$ = BWRITERVS_NOSWIZZLE; + TRACE("Default swizzle: %08x\n", $$); + } + | '.' sw_components + { + if($2.swizzle == SWIZZLE_ERR) { + asmparser_message(&asm_ctx, "Line %u: Invalid swizzle\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + /* Provide a correct swizzle to prevent following complaints */ + $$ = BWRITERVS_NOSWIZZLE; + } + else { + DWORD last, i; + + $$ = $2.swizzle << BWRITERVS_SWIZZLE_SHIFT; + /* Fill the swizzle by extending the last component */ + last = ($2.swizzle >> 2 * ($2.idx - 1)) & 0x03; + for(i = $2.idx; i < 4; i++){ + $$ |= last << (BWRITERVS_SWIZZLE_SHIFT + 2 * i); + } + TRACE("Got a swizzle: %08x\n", $$); + } + } + +sw_components: COMPONENT + { + $$.swizzle = $1; + $$.idx = 1; + } + | sw_components COMPONENT + { + if($1.idx == 4) { + /* Too many sw_components */ + $$.swizzle = SWIZZLE_ERR; + $$.idx = 4; + } + else { + $$.swizzle = $1.swizzle | ($2 << 2 * $1.idx); + $$.idx = $1.idx + 1; + } + } + +omods: /* Empty */ + { + $$.mod = 0; + $$.shift = 0; + } + | omods omodifier + { + $$.mod = $1.mod | $2.mod; + if($1.shift && $2.shift) { + asmparser_message(&asm_ctx, "Line %u: More than one shift flag\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + $$.shift = $1.shift; + } else { + $$.shift = $1.shift | $2.shift; + } + } + +omodifier: SHIFT_X2 + { + $$.mod = 0; + $$.shift = 1; + } + | SHIFT_X4 + { + $$.mod = 0; + $$.shift = 2; + } + | SHIFT_X8 + { + $$.mod = 0; + $$.shift = 3; + } + | SHIFT_D2 + { + $$.mod = 0; + $$.shift = 15; + } + | SHIFT_D4 + { + $$.mod = 0; + $$.shift = 14; + } + | SHIFT_D8 + { + $$.mod = 0; + $$.shift = 13; + } + | MOD_SAT + { + $$.mod = BWRITERSPDM_SATURATE; + $$.shift = 0; + } + | MOD_PP + { + $$.mod = BWRITERSPDM_PARTIALPRECISION; + $$.shift = 0; + } + | MOD_CENTROID + { + $$.mod = BWRITERSPDM_MSAMPCENTROID; + $$.shift = 0; + } + +sregs: sreg + { + $$.reg[0] = $1; + $$.count = 1; + } + | sregs ',' sreg + { + if($$.count == MAX_SRC_REGS){ + asmparser_message(&asm_ctx, "Line %u: Too many source registers in this instruction\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + else + $$.reg[$$.count++] = $3; + } + +sreg: sreg_name rel_reg swizzle + { + $$.type = $1.type; + $$.regnum = $1.regnum; + $$.u.swizzle = $3; + $$.srcmod = BWRITERSPSM_NONE; + set_rel_reg(&$$, &$2); + } + | sreg_name rel_reg smod swizzle + { + $$.type = $1.type; + $$.regnum = $1.regnum; + set_rel_reg(&$$, &$2); + $$.srcmod = $3; + $$.u.swizzle = $4; + } + | '-' sreg_name rel_reg swizzle + { + $$.type = $2.type; + $$.regnum = $2.regnum; + $$.srcmod = BWRITERSPSM_NEG; + set_rel_reg(&$$, &$3); + $$.u.swizzle = $4; + } + | '-' sreg_name rel_reg smod swizzle + { + $$.type = $2.type; + $$.regnum = $2.regnum; + set_rel_reg(&$$, &$3); + switch($4) { + case BWRITERSPSM_BIAS: $$.srcmod = BWRITERSPSM_BIASNEG; break; + case BWRITERSPSM_X2: $$.srcmod = BWRITERSPSM_X2NEG; break; + case BWRITERSPSM_SIGN: $$.srcmod = BWRITERSPSM_SIGNNEG; break; + case BWRITERSPSM_ABS: $$.srcmod = BWRITERSPSM_ABSNEG; break; + case BWRITERSPSM_DZ: + asmparser_message(&asm_ctx, "Line %u: Incompatible source modifiers: NEG and DZ\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + break; + case BWRITERSPSM_DW: + asmparser_message(&asm_ctx, "Line %u: Incompatible source modifiers: NEG and DW\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + break; + default: + FIXME("Unhandled combination of NEGATE and %u\n", $4); + } + $$.u.swizzle = $5; + } + | IMMVAL '-' sreg_name rel_reg swizzle + { + if($1.val != 1.0 || (!$1.integer)) { + asmparser_message(&asm_ctx, "Line %u: Only \"1 - reg\" is valid for D3DSPSM_COMP, " + "%g - reg found\n", asm_ctx.line_no, $1.val); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + /* Complement - not compatible with other source modifiers */ + $$.type = $3.type; + $$.regnum = $3.regnum; + $$.srcmod = BWRITERSPSM_COMP; + set_rel_reg(&$$, &$4); + $$.u.swizzle = $5; + } + | IMMVAL '-' sreg_name rel_reg smod swizzle + { + /* For nicer error reporting */ + if($1.val != 1.0 || (!$1.integer)) { + asmparser_message(&asm_ctx, "Line %u: Only \"1 - reg\" is valid for D3DSPSM_COMP\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } else { + asmparser_message(&asm_ctx, "Line %u: Incompatible source modifiers: D3DSPSM_COMP and %s\n", + asm_ctx.line_no, + debug_print_srcmod($5)); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + } + | SMOD_NOT sreg_name swizzle + { + $$.type = $2.type; + $$.regnum = $2.regnum; + $$.rel_reg = NULL; + $$.srcmod = BWRITERSPSM_NOT; + $$.u.swizzle = $3; + } + +rel_reg: /* empty */ + { + $$.has_rel_reg = FALSE; + $$.additional_offset = 0; + } + | '[' immsum ']' + { + $$.has_rel_reg = FALSE; + $$.additional_offset = $2.val; + } + | '[' relreg_name swizzle ']' + { + $$.has_rel_reg = TRUE; + $$.type = $2.type; + $$.additional_offset = 0; + $$.rel_regnum = $2.regnum; + $$.swizzle = $3; + } + | '[' immsum '+' relreg_name swizzle ']' + { + $$.has_rel_reg = TRUE; + $$.type = $4.type; + $$.additional_offset = $2.val; + $$.rel_regnum = $4.regnum; + $$.swizzle = $5; + } + | '[' relreg_name swizzle '+' immsum ']' + { + $$.has_rel_reg = TRUE; + $$.type = $2.type; + $$.additional_offset = $5.val; + $$.rel_regnum = $2.regnum; + $$.swizzle = $3; + } + | '[' immsum '+' relreg_name swizzle '+' immsum ']' + { + $$.has_rel_reg = TRUE; + $$.type = $4.type; + $$.additional_offset = $2.val + $7.val; + $$.rel_regnum = $4.regnum; + $$.swizzle = $5; + } + +immsum: IMMVAL + { + if(!$1.integer) { + asmparser_message(&asm_ctx, "Line %u: Unexpected float %f\n", + asm_ctx.line_no, $1.val); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + $$.val = $1.val; + } + | immsum '+' IMMVAL + { + if(!$3.integer) { + asmparser_message(&asm_ctx, "Line %u: Unexpected float %f\n", + asm_ctx.line_no, $3.val); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + $$.val = $1.val + $3.val; + } + +smod: SMOD_BIAS + { + $$ = BWRITERSPSM_BIAS; + } + | SHIFT_X2 + { + $$ = BWRITERSPSM_X2; + } + | SMOD_SCALEBIAS + { + $$ = BWRITERSPSM_SIGN; + } + | SMOD_DZ + { + $$ = BWRITERSPSM_DZ; + } + | SMOD_DW + { + $$ = BWRITERSPSM_DW; + } + | SMOD_ABS + { + $$ = BWRITERSPSM_ABS; + } + +relreg_name: REG_ADDRESS + { + $$.regnum = 0; $$.type = BWRITERSPR_ADDR; + } + | REG_LOOP + { + $$.regnum = 0; $$.type = BWRITERSPR_LOOP; + } + +sreg_name: REG_TEMP + { + $$.regnum = $1; $$.type = BWRITERSPR_TEMP; + } + | REG_OUTPUT + { + asmparser_message(&asm_ctx, "Line %u: Register o%u is not a valid source register\n", + asm_ctx.line_no, $1); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + | REG_INPUT + { + $$.regnum = $1; $$.type = BWRITERSPR_INPUT; + } + | REG_CONSTFLOAT + { + $$.regnum = $1; $$.type = BWRITERSPR_CONST; + } + | REG_CONSTINT + { + $$.regnum = $1; $$.type = BWRITERSPR_CONSTINT; + } + | REG_CONSTBOOL + { + $$.regnum = $1; $$.type = BWRITERSPR_CONSTBOOL; + } + | REG_TEXTURE + { + $$.regnum = $1; $$.type = BWRITERSPR_TEXTURE; + } + | REG_TEXCRDOUT + { + asmparser_message(&asm_ctx, "Line %u: Register oT%u is not a valid source register\n", + asm_ctx.line_no, $1); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + | REG_SAMPLER + { + $$.regnum = $1; $$.type = BWRITERSPR_SAMPLER; + } + | REG_OPOS + { + asmparser_message(&asm_ctx, "Line %u: Register oPos is not a valid source register\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + | REG_OFOG + { + asmparser_message(&asm_ctx, "Line %u: Register oFog is not a valid source register\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + | REG_VERTEXCOLOR + { + asmparser_message(&asm_ctx, "Line %u: Register oD%u is not a valid source register\n", + asm_ctx.line_no, $1); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + | REG_FRAGCOLOR + { + asmparser_message(&asm_ctx, "Line %u: Register oC%u is not a valid source register\n", + asm_ctx.line_no, $1); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + | REG_FRAGDEPTH + { + asmparser_message(&asm_ctx, "Line %u: Register oDepth is not a valid source register\n", + asm_ctx.line_no); + set_parse_status(&asm_ctx.status, PARSE_WARN); + } + | REG_PREDICATE + { + $$.regnum = 0; $$.type = BWRITERSPR_PREDICATE; + } + | REG_VPOS + { + $$.regnum = 0; $$.type = BWRITERSPR_MISCTYPE; + } + | REG_VFACE + { + $$.regnum = 1; $$.type = BWRITERSPR_MISCTYPE; + } + | REG_ADDRESS + { + $$.regnum = 0; $$.type = BWRITERSPR_ADDR; + } + | REG_LOOP + { + $$.regnum = 0; $$.type = BWRITERSPR_LOOP; + } + | REG_LABEL + { + $$.regnum = $1; $$.type = BWRITERSPR_LABEL; + } + +comp: COMP_GT { $$ = BWRITER_COMPARISON_GT; } + | COMP_LT { $$ = BWRITER_COMPARISON_LT; } + | COMP_GE { $$ = BWRITER_COMPARISON_GE; } + | COMP_LE { $$ = BWRITER_COMPARISON_LE; } + | COMP_EQ { $$ = BWRITER_COMPARISON_EQ; } + | COMP_NE { $$ = BWRITER_COMPARISON_NE; } + +dclusage: USAGE_POSITION + { + TRACE("dcl_position%u\n", $1); + $$.regnum = $1; + $$.dclusage = BWRITERDECLUSAGE_POSITION; + } + | USAGE_BLENDWEIGHT + { + TRACE("dcl_blendweight%u\n", $1); + $$.regnum = $1; + $$.dclusage = BWRITERDECLUSAGE_BLENDWEIGHT; + } + | USAGE_BLENDINDICES + { + TRACE("dcl_blendindices%u\n", $1); + $$.regnum = $1; + $$.dclusage = BWRITERDECLUSAGE_BLENDINDICES; + } + | USAGE_NORMAL + { + TRACE("dcl_normal%u\n", $1); + $$.regnum = $1; + $$.dclusage = BWRITERDECLUSAGE_NORMAL; + } + | USAGE_PSIZE + { + TRACE("dcl_psize%u\n", $1); + $$.regnum = $1; + $$.dclusage = BWRITERDECLUSAGE_PSIZE; + } + | USAGE_TEXCOORD + { + TRACE("dcl_texcoord%u\n", $1); + $$.regnum = $1; + $$.dclusage = BWRITERDECLUSAGE_TEXCOORD; + } + | USAGE_TANGENT + { + TRACE("dcl_tangent%u\n", $1); + $$.regnum = $1; + $$.dclusage = BWRITERDECLUSAGE_TANGENT; + } + | USAGE_BINORMAL + { + TRACE("dcl_binormal%u\n", $1); + $$.regnum = $1; + $$.dclusage = BWRITERDECLUSAGE_BINORMAL; + } + | USAGE_TESSFACTOR + { + TRACE("dcl_tessfactor%u\n", $1); + $$.regnum = $1; + $$.dclusage = BWRITERDECLUSAGE_TESSFACTOR; + } + | USAGE_POSITIONT + { + TRACE("dcl_positiont%u\n", $1); + $$.regnum = $1; + $$.dclusage = BWRITERDECLUSAGE_POSITIONT; + } + | USAGE_COLOR + { + TRACE("dcl_color%u\n", $1); + $$.regnum = $1; + $$.dclusage = BWRITERDECLUSAGE_COLOR; + } + | USAGE_FOG + { + TRACE("dcl_fog%u\n", $1); + $$.regnum = $1; + $$.dclusage = BWRITERDECLUSAGE_FOG; + } + | USAGE_DEPTH + { + TRACE("dcl_depth%u\n", $1); + $$.regnum = $1; + $$.dclusage = BWRITERDECLUSAGE_DEPTH; + } + | USAGE_SAMPLE + { + TRACE("dcl_sample%u\n", $1); + $$.regnum = $1; + $$.dclusage = BWRITERDECLUSAGE_SAMPLE; + } + +dcl_inputreg: REG_INPUT + { + $$.regnum = $1; $$.type = BWRITERSPR_INPUT; + } + | REG_TEXTURE + { + $$.regnum = $1; $$.type = BWRITERSPR_TEXTURE; + } + +sampdcl: SAMPTYPE_1D + { + $$ = BWRITERSTT_1D; + } + | SAMPTYPE_2D + { + $$ = BWRITERSTT_2D; + } + | SAMPTYPE_CUBE + { + $$ = BWRITERSTT_CUBE; + } + | SAMPTYPE_VOLUME + { + $$ = BWRITERSTT_VOLUME; + } + +predicate: '(' REG_PREDICATE swizzle ')' + { + $$.type = BWRITERSPR_PREDICATE; + $$.regnum = 0; + $$.rel_reg = NULL; + $$.srcmod = BWRITERSPSM_NONE; + $$.u.swizzle = $3; + } + | '(' SMOD_NOT REG_PREDICATE swizzle ')' + { + $$.type = BWRITERSPR_PREDICATE; + $$.regnum = 0; + $$.rel_reg = NULL; + $$.srcmod = BWRITERSPSM_NOT; + $$.u.swizzle = $4; + } + +%% + +struct bwriter_shader *parse_asm_shader(char **messages) +{ + struct bwriter_shader *ret = NULL; + + asm_ctx.shader = NULL; + asm_ctx.status = PARSE_SUCCESS; + asm_ctx.messages.size = asm_ctx.messages.capacity = 0; + asm_ctx.line_no = 1; + + asmshader_parse(); + + if (asm_ctx.status != PARSE_ERR) + ret = asm_ctx.shader; + else if (asm_ctx.shader) + SlDeleteShader(asm_ctx.shader); + + if (messages) + { + if (asm_ctx.messages.size) + { + /* Shrink the buffer to the used size */ + *messages = d3dcompiler_realloc(asm_ctx.messages.string, asm_ctx.messages.size + 1); + if (!*messages) + { + ERR("Out of memory, no messages reported\n"); + d3dcompiler_free(asm_ctx.messages.string); + } + } + else + { + *messages = NULL; + } + } + else + { + if (asm_ctx.messages.capacity) + d3dcompiler_free(asm_ctx.messages.string); + } + + return ret; +} diff --git a/dll/directx/wine/d3dcompiler_43/asmshader.yy.c b/dll/directx/wine/d3dcompiler_43/asmshader.yy.c new file mode 100644 index 00000000000..1b31cec460f --- /dev/null +++ b/dll/directx/wine/d3dcompiler_43/asmshader.yy.c @@ -0,0 +1,3183 @@ +#line 2 "asmshader.yy.c" + +#line 4 "asmshader.yy.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define yy_create_buffer asmshader__create_buffer +#define yy_delete_buffer asmshader__delete_buffer +#define yy_flex_debug asmshader__flex_debug +#define yy_init_buffer asmshader__init_buffer +#define yy_flush_buffer asmshader__flush_buffer +#define yy_load_buffer_state asmshader__load_buffer_state +#define yy_switch_to_buffer asmshader__switch_to_buffer +#define yyin asmshader_in +#define yyleng asmshader_leng +#define yylex asmshader_lex +#define yylineno asmshader_lineno +#define yyout asmshader_out +#define yyrestart asmshader_restart +#define yytext asmshader_text +#define yywrap asmshader_wrap +#define yyalloc asmshader_alloc +#define yyrealloc asmshader_realloc +#define yyfree asmshader_free + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 35 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE asmshader_restart(asmshader_in ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +extern int asmshader_leng; + +extern FILE *asmshader_in, *asmshader_out; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up asmshader_text. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up asmshader_text again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via asmshader_restart()), so that the user can continue scanning by + * just pointing asmshader_in at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when asmshader_text is formed. */ +static char yy_hold_char; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int asmshader_leng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow asmshader_wrap()'s to do buffer switches + * instead of setting up a fresh asmshader_in. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void asmshader_restart (FILE *input_file ); +void asmshader__switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE asmshader__create_buffer (FILE *file,int size ); +void asmshader__delete_buffer (YY_BUFFER_STATE b ); +void asmshader__flush_buffer (YY_BUFFER_STATE b ); +void asmshader_push_buffer_state (YY_BUFFER_STATE new_buffer ); +void asmshader_pop_buffer_state (void ); + +static void asmshader_ensure_buffer_stack (void ); +static void asmshader__load_buffer_state (void ); +static void asmshader__init_buffer (YY_BUFFER_STATE b,FILE *file ); + +#define YY_FLUSH_BUFFER asmshader__flush_buffer(YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE asmshader__scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE asmshader__scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE asmshader__scan_bytes (yyconst char *bytes,int len ); + +void *asmshader_alloc (yy_size_t ); +void *asmshader_realloc (void *,yy_size_t ); +void asmshader_free (void * ); + +#define yy_new_buffer asmshader__create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + asmshader_ensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + asmshader__create_buffer(asmshader_in,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + asmshader_ensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + asmshader__create_buffer(asmshader_in,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define asmshader_wrap(n) 1 +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +FILE *asmshader_in = (FILE *) 0, *asmshader_out = (FILE *) 0; + +typedef int yy_state_type; + +extern int asmshader_lineno; + +int asmshader_lineno = 1; + +extern char *asmshader_text; +#define yytext_ptr asmshader_text + +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up asmshader_text. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + asmshader_leng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +#define YY_NUM_RULES 174 +#define YY_END_OF_BUFFER 175 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[481] = + { 0, + 0, 0, 175, 173, 171, 172, 173, 149, 173, 141, + 142, 143, 139, 140, 119, 173, 136, 170, 173, 120, + 120, 88, 173, 173, 173, 120, 173, 173, 173, 173, + 86, 173, 120, 173, 173, 87, 171, 172, 0, 168, + 0, 136, 136, 169, 136, 136, 170, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 102, 103, 0, 0, 90, 0, 0, + 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 89, 39, 105, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, + + 0, 0, 0, 0, 0, 104, 0, 0, 0, 85, + 0, 0, 0, 93, 0, 0, 0, 0, 0, 91, + 0, 0, 87, 0, 0, 0, 169, 164, 165, 0, + 0, 0, 0, 0, 0, 0, 124, 125, 126, 0, + 147, 146, 134, 0, 132, 130, 133, 131, 135, 0, + 0, 128, 0, 0, 0, 0, 0, 121, 122, 123, + 15, 1, 78, 0, 0, 55, 54, 24, 33, 34, + 0, 9, 10, 20, 79, 80, 0, 0, 16, 0, + 22, 0, 52, 17, 0, 21, 0, 0, 5, 12, + 11, 3, 6, 2, 26, 98, 97, 0, 0, 0, + + 0, 92, 0, 23, 0, 0, 7, 37, 47, 8, + 0, 14, 25, 0, 13, 4, 60, 0, 0, 0, + 0, 0, 148, 0, 0, 0, 145, 0, 0, 0, + 0, 161, 0, 0, 0, 0, 127, 0, 0, 0, + 0, 0, 44, 35, 36, 0, 40, 0, 0, 0, + 18, 0, 0, 19, 46, 32, 31, 30, 29, 28, + 53, 0, 95, 94, 96, 0, 0, 0, 0, 0, + 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, + 0, 137, 0, 100, 0, 0, 0, 0, 0, 0, + 144, 0, 0, 0, 0, 166, 0, 161, 0, 0, + + 0, 0, 0, 0, 0, 0, 42, 0, 0, 41, + 0, 0, 138, 49, 0, 84, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, + 0, 0, 101, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 160, 162, 0, 0, 154, 0, 0, 0, + 0, 0, 43, 45, 56, 0, 38, 99, 111, 112, + 113, 114, 115, 116, 117, 118, 27, 62, 0, 58, + 0, 75, 0, 82, 83, 51, 81, 0, 0, 106, + 107, 108, 109, 110, 0, 0, 0, 0, 160, 162, + 153, 0, 154, 163, 0, 0, 0, 167, 48, 63, + + 0, 0, 0, 59, 0, 76, 0, 0, 0, 0, + 0, 153, 0, 163, 156, 0, 0, 57, 77, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 157, 0, 0, 129, 150, 156, 0, 155, 73, 0, + 0, 0, 0, 0, 0, 0, 64, 65, 0, 157, + 0, 0, 150, 159, 0, 155, 0, 67, 68, 69, + 0, 72, 0, 66, 0, 0, 159, 158, 0, 70, + 0, 0, 151, 158, 74, 71, 152, 151, 152, 0 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 5, 1, 6, 1, 1, 1, 1, 7, + 8, 1, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 19, 19, 20, 19, 1, 21, 1, + 1, 1, 1, 1, 1, 1, 22, 23, 1, 24, + 1, 1, 1, 1, 1, 25, 1, 1, 1, 26, + 1, 1, 1, 27, 1, 1, 1, 1, 1, 1, + 28, 1, 29, 1, 30, 1, 31, 32, 33, 34, + + 35, 36, 37, 38, 39, 1, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[56] = + { 0, + 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 3, 1, 4, 4, 4, 4, 4, 4, 4, + 1, 1, 1, 5, 1, 5, 1, 1, 1, 1, + 6, 1, 7, 1, 8, 3, 1, 1, 9, 1, + 1, 10, 10, 9, 1, 1, 11, 12, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int16_t yy_base[491] = + { 0, + 0, 0, 889, 890, 886, 890, 884, 890, 883, 890, + 890, 890, 890, 44, 51, 872, 45, 0, 67, 59, + 39, 45, 61, 36, 64, 890, 107, 97, 114, 28, + 151, 91, 107, 165, 43, 124, 882, 890, 880, 890, + 172, 101, 193, 0, 202, 890, 0, 848, 847, 848, + 108, 189, 179, 833, 834, 84, 103, 116, 182, 846, + 99, 832, 178, 890, 890, 827, 840, 226, 831, 837, + 233, 830, 825, 835, 820, 826, 830, 219, 205, 817, + 830, 818, 821, 828, 246, 890, 253, 828, 810, 70, + 813, 804, 803, 123, 812, 803, 812, 807, 809, 260, + + 267, 274, 806, 36, 276, 890, 818, 796, 193, 283, + 802, 114, 800, 296, 796, 111, 801, 794, 810, 303, + 788, 790, 310, 808, 794, 319, 0, 890, 890, 789, + 301, 801, 819, 791, 792, 800, 890, 890, 890, 786, + 890, 890, 890, 793, 890, 890, 890, 890, 890, 782, + 780, 890, 788, 183, 783, 285, 784, 890, 890, 890, + 890, 890, 890, 793, 782, 890, 890, 890, 890, 302, + 791, 890, 890, 890, 890, 890, 786, 296, 775, 771, + 890, 783, 890, 772, 771, 890, 239, 287, 890, 890, + 890, 784, 890, 890, 890, 336, 890, 769, 776, 764, + + 763, 343, 762, 890, 291, 330, 890, 890, 890, 890, + 764, 890, 890, 775, 890, 890, 332, 772, 773, 757, + 352, 360, 890, 756, 759, 759, 890, 752, 756, 764, + 749, 366, 755, 757, 740, 749, 890, 756, 744, 758, + 740, 749, 745, 890, 890, 753, 890, 750, 741, 749, + 890, 748, 741, 890, 890, 890, 890, 890, 890, 890, + 890, 732, 890, 890, 890, 745, 767, 766, 765, 746, + 745, 744, 890, 729, 737, 292, 158, 732, 736, 752, + 733, 890, 732, 890, 754, 753, 752, 733, 732, 731, + 890, 713, 725, 711, 710, 890, 718, 373, 724, 705, + + 718, 711, 716, 714, 705, 706, 702, 691, 711, 890, + 700, 698, 890, 890, 704, 890, 380, 103, 727, 385, + 148, 726, 691, 696, 693, 702, 690, 717, 692, 372, + 679, 694, 890, 356, 391, 716, 393, 395, 715, 686, + 371, 683, 410, 417, 685, 686, 435, 689, 670, 679, + 665, 673, 890, 890, 890, 662, 890, 890, 890, 890, + 890, 890, 890, 890, 890, 890, 890, 665, 658, 890, + 652, 651, 657, 890, 890, 890, 890, 395, 681, 890, + 890, 890, 890, 890, 665, 650, 657, 652, 442, 449, + 456, 644, 463, 470, 638, 651, 635, 890, 890, 890, + + 647, 641, 640, 890, 457, 370, 461, 633, 639, 632, + 634, 495, 624, 502, 509, 616, 630, 890, 890, 610, + 616, 476, 470, 473, 458, 466, 452, 452, 465, 459, + 516, 456, 457, 890, 523, 530, 449, 537, 890, 402, + 412, 392, 409, 407, 388, 395, 890, 890, 407, 544, + 405, 384, 551, 559, 373, 566, 367, 890, 890, 890, + 381, 890, 343, 890, 313, 293, 573, 580, 302, 890, + 195, 49, 587, 594, 890, 890, 601, 608, 615, 890, + 635, 645, 649, 658, 666, 674, 682, 691, 699, 711 + } ; + +static yyconst flex_int16_t yy_def[491] = + { 0, + 480, 1, 480, 480, 480, 480, 480, 480, 481, 480, + 480, 480, 480, 480, 480, 480, 482, 483, 480, 480, + 484, 485, 480, 480, 480, 480, 480, 486, 480, 480, + 480, 480, 487, 480, 488, 489, 480, 480, 481, 480, + 480, 482, 480, 490, 480, 480, 483, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 490, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 0, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480 + } ; + +static yyconst flex_int16_t yy_nxt[946] = + { 0, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 17, 17, 17, 17, 17, 17, + 18, 4, 4, 4, 4, 4, 4, 12, 12, 19, + 20, 21, 22, 23, 24, 25, 26, 4, 27, 4, + 28, 29, 30, 31, 32, 4, 33, 34, 35, 4, + 36, 26, 26, 26, 26, 41, 45, 42, 42, 42, + 42, 42, 42, 42, 43, 43, 43, 43, 43, 43, + 43, 98, 64, 69, 99, 72, 80, 121, 81, 200, + 46, 48, 49, 65, 201, 70, 73, 74, 82, 122, + 66, 75, 67, 76, 83, 77, 477, 50, 51, 52, + + 53, 54, 55, 56, 106, 78, 184, 57, 79, 58, + 84, 59, 45, 185, 60, 61, 364, 62, 145, 63, + 85, 85, 85, 85, 85, 85, 85, 88, 107, 155, + 92, 93, 146, 156, 108, 89, 46, 147, 109, 111, + 90, 112, 86, 91, 94, 212, 131, 124, 132, 125, + 149, 148, 95, 213, 113, 365, 189, 96, 208, 150, + 133, 364, 209, 97, 100, 100, 100, 100, 100, 100, + 100, 126, 101, 102, 103, 190, 104, 105, 114, 114, + 114, 114, 114, 114, 114, 43, 43, 43, 43, 43, + 43, 43, 327, 158, 137, 159, 138, 160, 139, 115, + + 365, 116, 328, 117, 205, 118, 43, 43, 43, 43, + 43, 43, 43, 140, 119, 43, 43, 43, 43, 43, + 43, 43, 206, 134, 236, 151, 152, 476, 46, 153, + 141, 237, 135, 142, 171, 172, 173, 46, 136, 68, + 68, 68, 68, 68, 68, 68, 71, 71, 71, 71, + 71, 71, 71, 174, 256, 257, 258, 175, 176, 85, + 85, 85, 85, 85, 85, 85, 87, 87, 87, 87, + 87, 87, 87, 100, 100, 100, 100, 100, 100, 100, + 196, 196, 196, 196, 196, 196, 196, 197, 197, 202, + 202, 202, 202, 202, 202, 202, 110, 110, 110, 110, + + 110, 110, 110, 259, 260, 267, 268, 269, 198, 114, + 114, 114, 114, 114, 114, 114, 120, 120, 120, 120, + 120, 120, 120, 123, 123, 123, 123, 123, 123, 123, + 221, 224, 239, 244, 248, 325, 249, 240, 326, 475, + 245, 473, 250, 225, 270, 271, 272, 472, 222, 196, + 196, 196, 196, 196, 196, 196, 202, 202, 202, 202, + 202, 202, 202, 275, 276, 277, 285, 286, 287, 380, + 381, 278, 279, 280, 288, 289, 290, 471, 281, 298, + 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, + 298, 298, 298, 359, 360, 361, 362, 363, 359, 360, + + 361, 362, 363, 374, 382, 375, 380, 381, 382, 386, + 405, 406, 376, 470, 424, 469, 377, 425, 426, 468, + 427, 466, 387, 389, 389, 389, 389, 389, 389, 389, + 390, 390, 390, 390, 390, 390, 390, 465, 464, 463, + 462, 461, 460, 383, 459, 458, 457, 383, 393, 393, + 393, 393, 393, 393, 393, 389, 389, 389, 389, 389, + 389, 389, 390, 390, 390, 390, 390, 390, 390, 412, + 412, 412, 412, 412, 412, 412, 393, 393, 393, 393, + 393, 393, 393, 414, 414, 414, 414, 414, 414, 414, + 421, 428, 455, 452, 451, 449, 448, 429, 447, 446, + + 445, 422, 444, 443, 442, 423, 441, 430, 412, 412, + 412, 412, 412, 412, 412, 414, 414, 414, 414, 414, + 414, 414, 436, 436, 436, 436, 436, 436, 436, 450, + 450, 450, 450, 450, 450, 450, 453, 453, 453, 453, + 453, 453, 453, 436, 436, 436, 436, 436, 436, 436, + 456, 456, 456, 456, 456, 456, 456, 450, 450, 450, + 450, 450, 450, 450, 453, 453, 453, 453, 453, 453, + 453, 454, 467, 467, 467, 467, 467, 467, 467, 456, + 456, 456, 456, 456, 456, 456, 467, 467, 467, 467, + 467, 467, 467, 474, 474, 474, 474, 474, 474, 474, + + 478, 478, 478, 478, 478, 478, 478, 474, 474, 474, + 474, 474, 474, 474, 479, 479, 479, 479, 479, 479, + 479, 478, 478, 478, 478, 478, 478, 478, 479, 479, + 479, 479, 479, 479, 479, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 42, 42, 47, + 440, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 68, 439, 438, 437, 68, 435, 434, 68, 71, + 433, 71, 432, 431, 420, 71, 71, 87, 419, 87, + 418, 417, 87, 416, 87, 110, 415, 413, 110, 110, + 411, 410, 409, 110, 120, 408, 407, 404, 120, 403, + + 402, 120, 123, 123, 401, 400, 399, 398, 397, 396, + 123, 127, 395, 127, 127, 127, 127, 127, 127, 127, + 127, 127, 127, 394, 392, 391, 388, 385, 384, 384, + 379, 378, 373, 372, 371, 370, 369, 368, 367, 366, + 366, 358, 357, 356, 355, 354, 353, 352, 351, 350, + 349, 348, 347, 346, 345, 344, 343, 342, 341, 340, + 339, 338, 337, 336, 335, 334, 333, 332, 331, 330, + 329, 324, 323, 322, 321, 320, 319, 318, 317, 316, + 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, + 305, 304, 303, 302, 301, 300, 299, 297, 296, 295, + + 294, 293, 292, 291, 284, 283, 282, 274, 273, 266, + 265, 264, 263, 262, 261, 255, 254, 253, 252, 251, + 247, 246, 243, 242, 241, 238, 235, 234, 233, 232, + 231, 230, 229, 228, 227, 226, 223, 220, 219, 218, + 217, 216, 215, 214, 211, 210, 207, 204, 203, 199, + 195, 194, 193, 192, 191, 188, 187, 186, 183, 182, + 181, 180, 179, 178, 177, 170, 169, 168, 167, 166, + 165, 164, 163, 162, 161, 157, 154, 144, 143, 130, + 129, 128, 40, 37, 44, 40, 38, 37, 480, 3, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480 + } ; + +static yyconst flex_int16_t yy_chk[946] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 14, 17, 14, 14, 14, + 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, + 15, 30, 20, 21, 30, 22, 24, 35, 24, 104, + 17, 19, 19, 20, 104, 21, 22, 22, 24, 35, + 20, 22, 20, 23, 25, 23, 472, 19, 19, 19, + + 19, 19, 19, 19, 32, 23, 90, 19, 23, 19, + 25, 19, 42, 90, 19, 19, 318, 19, 56, 19, + 27, 27, 27, 27, 27, 27, 27, 28, 32, 61, + 29, 29, 56, 61, 32, 28, 42, 57, 32, 33, + 28, 33, 27, 28, 29, 116, 51, 36, 51, 36, + 58, 57, 29, 116, 33, 318, 94, 29, 112, 58, + 51, 321, 112, 29, 31, 31, 31, 31, 31, 31, + 31, 36, 31, 31, 31, 94, 31, 31, 34, 34, + 34, 34, 34, 34, 34, 41, 41, 41, 41, 41, + 41, 41, 277, 63, 53, 63, 53, 63, 53, 34, + + 321, 34, 277, 34, 109, 34, 43, 43, 43, 43, + 43, 43, 43, 53, 34, 45, 45, 45, 45, 45, + 45, 45, 109, 52, 154, 59, 59, 471, 43, 59, + 53, 154, 52, 53, 78, 78, 78, 45, 52, 68, + 68, 68, 68, 68, 68, 68, 71, 71, 71, 71, + 71, 71, 71, 79, 187, 187, 187, 79, 79, 85, + 85, 85, 85, 85, 85, 85, 87, 87, 87, 87, + 87, 87, 87, 100, 100, 100, 100, 100, 100, 100, + 101, 101, 101, 101, 101, 101, 101, 102, 102, 105, + 105, 105, 105, 105, 105, 105, 110, 110, 110, 110, + + 110, 110, 110, 188, 188, 205, 205, 205, 102, 114, + 114, 114, 114, 114, 114, 114, 120, 120, 120, 120, + 120, 120, 120, 123, 123, 123, 123, 123, 123, 123, + 126, 131, 156, 170, 178, 276, 178, 156, 276, 469, + 170, 466, 178, 131, 206, 206, 206, 465, 126, 196, + 196, 196, 196, 196, 196, 196, 202, 202, 202, 202, + 202, 202, 202, 217, 217, 217, 221, 221, 221, 334, + 334, 217, 217, 217, 222, 222, 222, 463, 217, 232, + 232, 232, 232, 232, 232, 232, 298, 298, 298, 298, + 298, 298, 298, 317, 317, 317, 317, 317, 320, 320, + + 320, 320, 320, 330, 335, 330, 337, 337, 338, 341, + 378, 378, 330, 461, 406, 457, 330, 406, 406, 455, + 406, 452, 341, 343, 343, 343, 343, 343, 343, 343, + 344, 344, 344, 344, 344, 344, 344, 451, 449, 446, + 445, 444, 443, 335, 442, 441, 440, 338, 347, 347, + 347, 347, 347, 347, 347, 389, 389, 389, 389, 389, + 389, 389, 390, 390, 390, 390, 390, 390, 390, 391, + 391, 391, 391, 391, 391, 391, 393, 393, 393, 393, + 393, 393, 393, 394, 394, 394, 394, 394, 394, 394, + 405, 407, 437, 433, 432, 430, 429, 407, 428, 427, + + 426, 405, 425, 424, 423, 405, 422, 407, 412, 412, + 412, 412, 412, 412, 412, 414, 414, 414, 414, 414, + 414, 414, 415, 415, 415, 415, 415, 415, 415, 431, + 431, 431, 431, 431, 431, 431, 435, 435, 435, 435, + 435, 435, 435, 436, 436, 436, 436, 436, 436, 436, + 438, 438, 438, 438, 438, 438, 438, 450, 450, 450, + 450, 450, 450, 450, 453, 453, 453, 453, 453, 453, + 453, 435, 454, 454, 454, 454, 454, 454, 454, 456, + 456, 456, 456, 456, 456, 456, 467, 467, 467, 467, + 467, 467, 467, 468, 468, 468, 468, 468, 468, 468, + + 473, 473, 473, 473, 473, 473, 473, 474, 474, 474, + 474, 474, 474, 474, 477, 477, 477, 477, 477, 477, + 477, 478, 478, 478, 478, 478, 478, 478, 479, 479, + 479, 479, 479, 479, 479, 481, 481, 481, 481, 481, + 481, 481, 481, 481, 481, 481, 481, 482, 482, 483, + 421, 483, 483, 483, 483, 483, 483, 483, 483, 483, + 483, 484, 420, 417, 416, 484, 413, 411, 484, 485, + 410, 485, 409, 408, 403, 485, 485, 486, 402, 486, + 401, 397, 486, 396, 486, 487, 395, 392, 487, 487, + 388, 387, 386, 487, 488, 385, 379, 373, 488, 372, + + 371, 488, 489, 489, 369, 368, 356, 352, 351, 350, + 489, 490, 349, 490, 490, 490, 490, 490, 490, 490, + 490, 490, 490, 348, 346, 345, 342, 340, 339, 336, + 332, 331, 329, 328, 327, 326, 325, 324, 323, 322, + 319, 315, 312, 311, 309, 308, 307, 306, 305, 304, + 303, 302, 301, 300, 299, 297, 295, 294, 293, 292, + 290, 289, 288, 287, 286, 285, 283, 281, 280, 279, + 278, 275, 274, 272, 271, 270, 269, 268, 267, 266, + 262, 253, 252, 250, 249, 248, 246, 243, 242, 241, + 240, 239, 238, 236, 235, 234, 233, 231, 230, 229, + + 228, 226, 225, 224, 220, 219, 218, 214, 211, 203, + 201, 200, 199, 198, 192, 185, 184, 182, 180, 179, + 177, 171, 165, 164, 157, 155, 153, 151, 150, 144, + 140, 136, 135, 134, 133, 132, 130, 125, 124, 122, + 121, 119, 118, 117, 115, 113, 111, 108, 107, 103, + 99, 98, 97, 96, 95, 93, 92, 91, 89, 88, + 84, 83, 82, 81, 80, 77, 76, 75, 74, 73, + 72, 70, 69, 67, 66, 62, 60, 55, 54, 50, + 49, 48, 39, 37, 16, 9, 7, 5, 3, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480 + } ; + +static yy_state_type yy_last_accepting_state; +static char *yy_last_accepting_cpos; + +extern int asmshader__flex_debug; +int asmshader__flex_debug = 0; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *asmshader_text; +#line 1 "asmshader.l" +/* + * Direct3D shader assembler + * + * Copyright 2008 Stefan Dösinger + * Copyright 2009 Matteo Bruni + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#line 23 "asmshader.l" +#include "config.h" +#include "wine/port.h" +#include "wine/debug.h" + +#include "d3dcompiler_private.h" +#include "asmshader.tab.h" + +WINE_DEFAULT_DEBUG_CHANNEL(asmshader); +#define YY_NO_INPUT 1 +/* Swizzles and writemasks consist of a dot and up to 4 x, y, z or w characters, + * or up to 4 a, r, g, b characters. There are different rules for swizzles and + * writemasks wrt repetition, those are handled in the grammar. + */ +/* Registers */ +/* for relative addressing in the form o[x], v[x] and c[x] */ +/* Not really a register, but it is considered as such */ +/* Comments */ +/* Whitespaces are spaces, tabs and newlines */ +#line 886 "asmshader.yy.c" + +#define INITIAL 0 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int asmshader_lex_destroy (void ); + +int asmshader_get_debug (void ); + +void asmshader_set_debug (int debug_flag ); + +YY_EXTRA_TYPE asmshader_get_extra (void ); + +void asmshader_set_extra (YY_EXTRA_TYPE user_defined ); + +FILE *asmshader_get_in (void ); + +void asmshader_set_in (FILE * in_str ); + +FILE *asmshader_get_out (void ); + +void asmshader_set_out (FILE * out_str ); + +int asmshader_get_leng (void ); + +char *asmshader_get_text (void ); + +int asmshader_get_lineno (void ); + +void asmshader_set_lineno (int line_number ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int asmshader_wrap (void ); +#else +extern int asmshader_wrap (void ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); +#else +static int input (void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( asmshader_text, asmshader_leng, 1, asmshader_out )) {} } while (0) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( asmshader_in )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( asmshader_in ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, asmshader_in))==0 && ferror(asmshader_in)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(asmshader_in); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int asmshader_lex (void); + +#define YY_DECL int asmshader_lex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after asmshader_text and asmshader_leng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + +#line 105 "asmshader.l" + + + /* Common instructions(vertex and pixel shaders) */ +#line 1075 "asmshader.yy.c" + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! asmshader_in ) + asmshader_in = stdin; + + if ( ! asmshader_out ) + asmshader_out = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + asmshader_ensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + asmshader__create_buffer(asmshader_in,YY_BUF_SIZE ); + } + + asmshader__load_buffer_state( ); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of asmshader_text. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 481 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_current_state != 480 ); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 108 "asmshader.l" +{return INSTR_ADD; } + YY_BREAK +case 2: +YY_RULE_SETUP +#line 109 "asmshader.l" +{return INSTR_NOP; } + YY_BREAK +case 3: +YY_RULE_SETUP +#line 110 "asmshader.l" +{return INSTR_MOV; } + YY_BREAK +case 4: +YY_RULE_SETUP +#line 111 "asmshader.l" +{return INSTR_SUB; } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 112 "asmshader.l" +{return INSTR_MAD; } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 113 "asmshader.l" +{return INSTR_MUL; } + YY_BREAK +case 7: +YY_RULE_SETUP +#line 114 "asmshader.l" +{return INSTR_RCP; } + YY_BREAK +case 8: +YY_RULE_SETUP +#line 115 "asmshader.l" +{return INSTR_RSQ; } + YY_BREAK +case 9: +YY_RULE_SETUP +#line 116 "asmshader.l" +{return INSTR_DP3; } + YY_BREAK +case 10: +YY_RULE_SETUP +#line 117 "asmshader.l" +{return INSTR_DP4; } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 118 "asmshader.l" +{return INSTR_MIN; } + YY_BREAK +case 12: +YY_RULE_SETUP +#line 119 "asmshader.l" +{return INSTR_MAX; } + YY_BREAK +case 13: +YY_RULE_SETUP +#line 120 "asmshader.l" +{return INSTR_SLT; } + YY_BREAK +case 14: +YY_RULE_SETUP +#line 121 "asmshader.l" +{return INSTR_SGE; } + YY_BREAK +case 15: +YY_RULE_SETUP +#line 122 "asmshader.l" +{return INSTR_ABS; } + YY_BREAK +case 16: +YY_RULE_SETUP +#line 123 "asmshader.l" +{return INSTR_EXP; } + YY_BREAK +case 17: +YY_RULE_SETUP +#line 124 "asmshader.l" +{return INSTR_LOG; } + YY_BREAK +case 18: +YY_RULE_SETUP +#line 125 "asmshader.l" +{return INSTR_EXPP; } + YY_BREAK +case 19: +YY_RULE_SETUP +#line 126 "asmshader.l" +{return INSTR_LOGP; } + YY_BREAK +case 20: +YY_RULE_SETUP +#line 127 "asmshader.l" +{return INSTR_DST; } + YY_BREAK +case 21: +YY_RULE_SETUP +#line 128 "asmshader.l" +{return INSTR_LRP; } + YY_BREAK +case 22: +YY_RULE_SETUP +#line 129 "asmshader.l" +{return INSTR_FRC; } + YY_BREAK +case 23: +YY_RULE_SETUP +#line 130 "asmshader.l" +{return INSTR_POW; } + YY_BREAK +case 24: +YY_RULE_SETUP +#line 131 "asmshader.l" +{return INSTR_CRS; } + YY_BREAK +case 25: +YY_RULE_SETUP +#line 132 "asmshader.l" +{return INSTR_SGN; } + YY_BREAK +case 26: +YY_RULE_SETUP +#line 133 "asmshader.l" +{return INSTR_NRM; } + YY_BREAK +case 27: +YY_RULE_SETUP +#line 134 "asmshader.l" +{return INSTR_SINCOS; } + YY_BREAK +case 28: +YY_RULE_SETUP +#line 135 "asmshader.l" +{return INSTR_M4x4; } + YY_BREAK +case 29: +YY_RULE_SETUP +#line 136 "asmshader.l" +{return INSTR_M4x3; } + YY_BREAK +case 30: +YY_RULE_SETUP +#line 137 "asmshader.l" +{return INSTR_M3x4; } + YY_BREAK +case 31: +YY_RULE_SETUP +#line 138 "asmshader.l" +{return INSTR_M3x3; } + YY_BREAK +case 32: +YY_RULE_SETUP +#line 139 "asmshader.l" +{return INSTR_M3x2; } + YY_BREAK +case 33: +YY_RULE_SETUP +#line 140 "asmshader.l" +{return INSTR_DCL; } + YY_BREAK +case 34: +YY_RULE_SETUP +#line 141 "asmshader.l" +{return INSTR_DEF; } + YY_BREAK +case 35: +YY_RULE_SETUP +#line 142 "asmshader.l" +{return INSTR_DEFB; } + YY_BREAK +case 36: +YY_RULE_SETUP +#line 143 "asmshader.l" +{return INSTR_DEFI; } + YY_BREAK +case 37: +YY_RULE_SETUP +#line 144 "asmshader.l" +{return INSTR_REP; } + YY_BREAK +case 38: +YY_RULE_SETUP +#line 145 "asmshader.l" +{return INSTR_ENDREP; } + YY_BREAK +case 39: +YY_RULE_SETUP +#line 146 "asmshader.l" +{return INSTR_IF; } + YY_BREAK +case 40: +YY_RULE_SETUP +#line 147 "asmshader.l" +{return INSTR_ELSE; } + YY_BREAK +case 41: +YY_RULE_SETUP +#line 148 "asmshader.l" +{return INSTR_ENDIF; } + YY_BREAK +case 42: +YY_RULE_SETUP +#line 149 "asmshader.l" +{return INSTR_BREAK; } + YY_BREAK +case 43: +YY_RULE_SETUP +#line 150 "asmshader.l" +{return INSTR_BREAKP; } + YY_BREAK +case 44: +YY_RULE_SETUP +#line 151 "asmshader.l" +{return INSTR_CALL; } + YY_BREAK +case 45: +YY_RULE_SETUP +#line 152 "asmshader.l" +{return INSTR_CALLNZ; } + YY_BREAK +case 46: +YY_RULE_SETUP +#line 153 "asmshader.l" +{return INSTR_LOOP; } + YY_BREAK +case 47: +YY_RULE_SETUP +#line 154 "asmshader.l" +{return INSTR_RET; } + YY_BREAK +case 48: +YY_RULE_SETUP +#line 155 "asmshader.l" +{return INSTR_ENDLOOP; } + YY_BREAK +case 49: +YY_RULE_SETUP +#line 156 "asmshader.l" +{return INSTR_LABEL; } + YY_BREAK +case 50: +YY_RULE_SETUP +#line 157 "asmshader.l" +{return INSTR_SETP; } + YY_BREAK +case 51: +YY_RULE_SETUP +#line 158 "asmshader.l" +{return INSTR_TEXLDL; } + YY_BREAK +/* Vertex shader only instructions */ +case 52: +YY_RULE_SETUP +#line 161 "asmshader.l" +{return INSTR_LIT; } + YY_BREAK +case 53: +YY_RULE_SETUP +#line 162 "asmshader.l" +{return INSTR_MOVA; } + YY_BREAK +/* Pixel shader only instructions */ +case 54: +YY_RULE_SETUP +#line 165 "asmshader.l" +{return INSTR_CND; } + YY_BREAK +case 55: +YY_RULE_SETUP +#line 166 "asmshader.l" +{return INSTR_CMP; } + YY_BREAK +case 56: +YY_RULE_SETUP +#line 167 "asmshader.l" +{return INSTR_DP2ADD; } + YY_BREAK +case 57: +YY_RULE_SETUP +#line 168 "asmshader.l" +{return INSTR_TEXCOORD; } + YY_BREAK +case 58: +YY_RULE_SETUP +#line 169 "asmshader.l" +{return INSTR_TEXCRD; } + YY_BREAK +case 59: +YY_RULE_SETUP +#line 170 "asmshader.l" +{return INSTR_TEXKILL; } + YY_BREAK +case 60: +YY_RULE_SETUP +#line 171 "asmshader.l" +{return INSTR_TEX; } + YY_BREAK +case 61: +YY_RULE_SETUP +#line 172 "asmshader.l" +{return INSTR_TEXLD; } + YY_BREAK +case 62: +YY_RULE_SETUP +#line 173 "asmshader.l" +{return INSTR_TEXBEM; } + YY_BREAK +case 63: +YY_RULE_SETUP +#line 174 "asmshader.l" +{return INSTR_TEXBEML; } + YY_BREAK +case 64: +YY_RULE_SETUP +#line 175 "asmshader.l" +{return INSTR_TEXREG2AR; } + YY_BREAK +case 65: +YY_RULE_SETUP +#line 176 "asmshader.l" +{return INSTR_TEXREG2GB; } + YY_BREAK +case 66: +YY_RULE_SETUP +#line 177 "asmshader.l" +{return INSTR_TEXREG2RGB; } + YY_BREAK +case 67: +YY_RULE_SETUP +#line 178 "asmshader.l" +{return INSTR_TEXM3x2PAD; } + YY_BREAK +case 68: +YY_RULE_SETUP +#line 179 "asmshader.l" +{return INSTR_TEXM3x2TEX; } + YY_BREAK +case 69: +YY_RULE_SETUP +#line 180 "asmshader.l" +{return INSTR_TEXM3x3PAD; } + YY_BREAK +case 70: +YY_RULE_SETUP +#line 181 "asmshader.l" +{return INSTR_TEXM3x3SPEC; } + YY_BREAK +case 71: +YY_RULE_SETUP +#line 182 "asmshader.l" +{return INSTR_TEXM3x3VSPEC; } + YY_BREAK +case 72: +YY_RULE_SETUP +#line 183 "asmshader.l" +{return INSTR_TEXM3x3TEX; } + YY_BREAK +case 73: +YY_RULE_SETUP +#line 184 "asmshader.l" +{return INSTR_TEXDP3TEX; } + YY_BREAK +case 74: +YY_RULE_SETUP +#line 185 "asmshader.l" +{return INSTR_TEXM3x2DEPTH; } + YY_BREAK +case 75: +YY_RULE_SETUP +#line 186 "asmshader.l" +{return INSTR_TEXDP3; } + YY_BREAK +case 76: +YY_RULE_SETUP +#line 187 "asmshader.l" +{return INSTR_TEXM3x3; } + YY_BREAK +case 77: +YY_RULE_SETUP +#line 188 "asmshader.l" +{return INSTR_TEXDEPTH; } + YY_BREAK +case 78: +YY_RULE_SETUP +#line 189 "asmshader.l" +{return INSTR_BEM; } + YY_BREAK +case 79: +YY_RULE_SETUP +#line 190 "asmshader.l" +{return INSTR_DSX; } + YY_BREAK +case 80: +YY_RULE_SETUP +#line 191 "asmshader.l" +{return INSTR_DSY; } + YY_BREAK +case 81: +YY_RULE_SETUP +#line 192 "asmshader.l" +{return INSTR_TEXLDP; } + YY_BREAK +case 82: +YY_RULE_SETUP +#line 193 "asmshader.l" +{return INSTR_TEXLDB; } + YY_BREAK +case 83: +YY_RULE_SETUP +#line 194 "asmshader.l" +{return INSTR_TEXLDD; } + YY_BREAK +case 84: +YY_RULE_SETUP +#line 195 "asmshader.l" +{return INSTR_PHASE; } + YY_BREAK +case 85: +YY_RULE_SETUP +#line 197 "asmshader.l" +{ + asmshader_lval.regnum = atoi(asmshader_text + 1); + return REG_TEMP; + } + YY_BREAK +case 86: +YY_RULE_SETUP +#line 201 "asmshader.l" +{ + asmshader_lval.regnum = atoi(asmshader_text + 1); + return REG_OUTPUT; + } + YY_BREAK +case 87: +YY_RULE_SETUP +#line 205 "asmshader.l" +{ + asmshader_lval.regnum = atoi(asmshader_text + 1); + return REG_INPUT; + } + YY_BREAK +case 88: +YY_RULE_SETUP +#line 209 "asmshader.l" +{ + asmshader_lval.regnum = atoi(asmshader_text + 1); + return REG_CONSTFLOAT; + } + YY_BREAK +case 89: +YY_RULE_SETUP +#line 213 "asmshader.l" +{ + asmshader_lval.regnum = atoi(asmshader_text + 1); + return REG_CONSTINT; + } + YY_BREAK +case 90: +YY_RULE_SETUP +#line 217 "asmshader.l" +{ + asmshader_lval.regnum = atoi(asmshader_text + 1); + return REG_CONSTBOOL; + } + YY_BREAK +case 91: +YY_RULE_SETUP +#line 221 "asmshader.l" +{ + asmshader_lval.regnum = atoi(asmshader_text + 1); + return REG_TEXTURE; + } + YY_BREAK +case 92: +YY_RULE_SETUP +#line 225 "asmshader.l" +{ + asmshader_lval.regnum = atoi(asmshader_text + 2); + return REG_TEXCRDOUT; + } + YY_BREAK +case 93: +YY_RULE_SETUP +#line 229 "asmshader.l" +{ + asmshader_lval.regnum = atoi(asmshader_text + 1); + return REG_SAMPLER; + } + YY_BREAK +case 94: +YY_RULE_SETUP +#line 233 "asmshader.l" +{return REG_OPOS; } + YY_BREAK +case 95: +YY_RULE_SETUP +#line 234 "asmshader.l" +{return REG_OFOG; } + YY_BREAK +case 96: +YY_RULE_SETUP +#line 235 "asmshader.l" +{return REG_OPTS; } + YY_BREAK +case 97: +YY_RULE_SETUP +#line 236 "asmshader.l" +{ + asmshader_lval.regnum = atoi(asmshader_text + 2); + return REG_VERTEXCOLOR; + } + YY_BREAK +case 98: +YY_RULE_SETUP +#line 240 "asmshader.l" +{ + asmshader_lval.regnum = atoi(asmshader_text + 2); + return REG_FRAGCOLOR; + } + YY_BREAK +case 99: +YY_RULE_SETUP +#line 244 "asmshader.l" +{return REG_FRAGDEPTH; } + YY_BREAK +case 100: +YY_RULE_SETUP +#line 245 "asmshader.l" +{return REG_VPOS; } + YY_BREAK +case 101: +YY_RULE_SETUP +#line 246 "asmshader.l" +{return REG_VFACE; } + YY_BREAK +case 102: +YY_RULE_SETUP +#line 247 "asmshader.l" +{return REG_ADDRESS; } + YY_BREAK +case 103: +YY_RULE_SETUP +#line 248 "asmshader.l" +{return REG_LOOP; } + YY_BREAK +case 104: +YY_RULE_SETUP +#line 249 "asmshader.l" +{return REG_PREDICATE; } + YY_BREAK +case 105: +YY_RULE_SETUP +#line 251 "asmshader.l" +{ + asmshader_lval.regnum = atoi(asmshader_text + 1); + return REG_LABEL; + } + YY_BREAK +/* Shader versions. These are important to select the correct + * parser profile. + */ +case 106: +YY_RULE_SETUP +#line 259 "asmshader.l" +{return VER_VS10; } + YY_BREAK +case 107: +YY_RULE_SETUP +#line 260 "asmshader.l" +{return VER_VS11; } + YY_BREAK +case 108: +YY_RULE_SETUP +#line 262 "asmshader.l" +{return VER_VS20; } + YY_BREAK +case 109: +YY_RULE_SETUP +#line 263 "asmshader.l" +{return VER_VS2X; } + YY_BREAK +case 110: +YY_RULE_SETUP +#line 264 "asmshader.l" +{return VER_VS30; } + YY_BREAK +case 111: +YY_RULE_SETUP +#line 266 "asmshader.l" +{return VER_PS10; } + YY_BREAK +case 112: +YY_RULE_SETUP +#line 267 "asmshader.l" +{return VER_PS11; } + YY_BREAK +case 113: +YY_RULE_SETUP +#line 268 "asmshader.l" +{return VER_PS12; } + YY_BREAK +case 114: +YY_RULE_SETUP +#line 269 "asmshader.l" +{return VER_PS13; } + YY_BREAK +case 115: +YY_RULE_SETUP +#line 270 "asmshader.l" +{return VER_PS14; } + YY_BREAK +case 116: +YY_RULE_SETUP +#line 272 "asmshader.l" +{return VER_PS20; } + YY_BREAK +case 117: +YY_RULE_SETUP +#line 273 "asmshader.l" +{return VER_PS2X; } + YY_BREAK +case 118: +YY_RULE_SETUP +#line 274 "asmshader.l" +{return VER_PS30; } + YY_BREAK +case 119: +YY_RULE_SETUP +#line 276 "asmshader.l" +{return asmshader_text[0]; } + YY_BREAK +case 120: +YY_RULE_SETUP +#line 277 "asmshader.l" +{ + switch(asmshader_text[0]) { + case 'x': + case 'r': + asmshader_lval.component = 0; + break; + case 'y': + case 'g': + asmshader_lval.component = 1; + break; + case 'z': + case 'b': + asmshader_lval.component = 2; + break; + case 'w': + case 'a': + asmshader_lval.component = 3; + break; + } + return COMPONENT; + } + YY_BREAK +/* Output modifiers */ +case 121: +YY_RULE_SETUP +#line 300 "asmshader.l" +{return SHIFT_X2; } + YY_BREAK +case 122: +YY_RULE_SETUP +#line 301 "asmshader.l" +{return SHIFT_X4; } + YY_BREAK +case 123: +YY_RULE_SETUP +#line 302 "asmshader.l" +{return SHIFT_X8; } + YY_BREAK +case 124: +YY_RULE_SETUP +#line 303 "asmshader.l" +{return SHIFT_D2; } + YY_BREAK +case 125: +YY_RULE_SETUP +#line 304 "asmshader.l" +{return SHIFT_D4; } + YY_BREAK +case 126: +YY_RULE_SETUP +#line 305 "asmshader.l" +{return SHIFT_D8; } + YY_BREAK +case 127: +YY_RULE_SETUP +#line 306 "asmshader.l" +{return MOD_SAT; } + YY_BREAK +case 128: +YY_RULE_SETUP +#line 307 "asmshader.l" +{return MOD_PP; } + YY_BREAK +case 129: +YY_RULE_SETUP +#line 308 "asmshader.l" +{return MOD_CENTROID; } + YY_BREAK +/* compare params */ +case 130: +YY_RULE_SETUP +#line 311 "asmshader.l" +{return COMP_GT; } + YY_BREAK +case 131: +YY_RULE_SETUP +#line 312 "asmshader.l" +{return COMP_LT; } + YY_BREAK +case 132: +YY_RULE_SETUP +#line 313 "asmshader.l" +{return COMP_GE; } + YY_BREAK +case 133: +YY_RULE_SETUP +#line 314 "asmshader.l" +{return COMP_LE; } + YY_BREAK +case 134: +YY_RULE_SETUP +#line 315 "asmshader.l" +{return COMP_EQ; } + YY_BREAK +case 135: +YY_RULE_SETUP +#line 316 "asmshader.l" +{return COMP_NE; } + YY_BREAK +case 136: +YY_RULE_SETUP +#line 318 "asmshader.l" +{ + asmshader_lval.immval.val = atof(asmshader_text); + asmshader_lval.immval.integer = ((strstr(asmshader_text, ".") == NULL) && (strstr(asmshader_text, "f") == NULL)); + return IMMVAL; + } + YY_BREAK +case 137: +YY_RULE_SETUP +#line 323 "asmshader.l" +{ + asmshader_lval.immbool = TRUE; + return IMMBOOL; + } + YY_BREAK +case 138: +YY_RULE_SETUP +#line 327 "asmshader.l" +{ + asmshader_lval.immbool = FALSE; + return IMMBOOL; + } + YY_BREAK +case 139: +YY_RULE_SETUP +#line 332 "asmshader.l" +{return asmshader_text[0]; } + YY_BREAK +case 140: +YY_RULE_SETUP +#line 333 "asmshader.l" +{return asmshader_text[0]; } + YY_BREAK +case 141: +YY_RULE_SETUP +#line 334 "asmshader.l" +{return asmshader_text[0]; } + YY_BREAK +case 142: +YY_RULE_SETUP +#line 335 "asmshader.l" +{return asmshader_text[0]; } + YY_BREAK +/* for relative addressing */ +case 143: +YY_RULE_SETUP +#line 338 "asmshader.l" +{return asmshader_text[0]; } + YY_BREAK +case 144: +YY_RULE_SETUP +#line 340 "asmshader.l" +{return SMOD_BIAS; } + YY_BREAK +/* No _x2 here; it is identical to MOD_X2 */ +case 145: +YY_RULE_SETUP +#line 342 "asmshader.l" +{return SMOD_SCALEBIAS; } + YY_BREAK +case 146: +YY_RULE_SETUP +#line 343 "asmshader.l" +{return SMOD_DZ; } + YY_BREAK +case 147: +YY_RULE_SETUP +#line 344 "asmshader.l" +{return SMOD_DW; } + YY_BREAK +case 148: +YY_RULE_SETUP +#line 345 "asmshader.l" +{return SMOD_ABS; } + YY_BREAK +case 149: +YY_RULE_SETUP +#line 347 "asmshader.l" +{return SMOD_NOT; } + YY_BREAK +case 150: +YY_RULE_SETUP +#line 349 "asmshader.l" +{ + if(asmshader_text[strlen("_position")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(asmshader_text + strlen("_position")); + } + return USAGE_POSITION; + } + YY_BREAK +case 151: +YY_RULE_SETUP +#line 357 "asmshader.l" +{ + if(asmshader_text[strlen("_blendweight")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(asmshader_text + strlen("_blendweight")); + } + return USAGE_BLENDWEIGHT; + } + YY_BREAK +case 152: +YY_RULE_SETUP +#line 365 "asmshader.l" +{ + if(asmshader_text[strlen("_blendindices")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(asmshader_text + strlen("_blendindices")); + } + return USAGE_BLENDINDICES; + } + YY_BREAK +case 153: +YY_RULE_SETUP +#line 373 "asmshader.l" +{ + if(asmshader_text[strlen("_normal")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(asmshader_text + strlen("_normal")); + } + return USAGE_NORMAL; + } + YY_BREAK +case 154: +YY_RULE_SETUP +#line 381 "asmshader.l" +{ + if(asmshader_text[strlen("_psize")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(asmshader_text + strlen("_psize")); + } + return USAGE_PSIZE; + } + YY_BREAK +case 155: +YY_RULE_SETUP +#line 389 "asmshader.l" +{ + if(asmshader_text[strlen("_texcoord")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(asmshader_text + strlen("_texcoord")); + } + return USAGE_TEXCOORD; + } + YY_BREAK +case 156: +YY_RULE_SETUP +#line 397 "asmshader.l" +{ + if(asmshader_text[strlen("_tangent")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(asmshader_text + strlen("_tangent")); + } + return USAGE_TANGENT; + } + YY_BREAK +case 157: +YY_RULE_SETUP +#line 405 "asmshader.l" +{ + if(asmshader_text[strlen("_binormal")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(asmshader_text + strlen("_binormal")); + } + return USAGE_BINORMAL; + } + YY_BREAK +case 158: +YY_RULE_SETUP +#line 413 "asmshader.l" +{ + if(asmshader_text[strlen("_tessfactor")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(asmshader_text + strlen("_tessfactor")); + } + return USAGE_TESSFACTOR; + } + YY_BREAK +case 159: +YY_RULE_SETUP +#line 421 "asmshader.l" +{ + if(asmshader_text[strlen("_positiont")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(asmshader_text + strlen("_positiont")); + } + return USAGE_POSITIONT; + } + YY_BREAK +case 160: +YY_RULE_SETUP +#line 429 "asmshader.l" +{ + if(asmshader_text[strlen("_color")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(asmshader_text + strlen("_color")); + } + return USAGE_COLOR; + } + YY_BREAK +case 161: +YY_RULE_SETUP +#line 437 "asmshader.l" +{ + if(asmshader_text[strlen("_fog")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(asmshader_text + strlen("_fog")); + } + return USAGE_FOG; + } + YY_BREAK +case 162: +YY_RULE_SETUP +#line 445 "asmshader.l" +{ + if(asmshader_text[strlen("_depth")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(asmshader_text + strlen("_depth")); + } + return USAGE_DEPTH; + } + YY_BREAK +case 163: +YY_RULE_SETUP +#line 453 "asmshader.l" +{ + if(asmshader_text[strlen("_sample")] == '\0') { + asmshader_lval.regnum = 0; + } else { + asmshader_lval.regnum = atoi(asmshader_text + strlen("_sample")); + } + return USAGE_SAMPLE; + } + YY_BREAK +case 164: +YY_RULE_SETUP +#line 462 "asmshader.l" +{ return SAMPTYPE_1D; } + YY_BREAK +case 165: +YY_RULE_SETUP +#line 463 "asmshader.l" +{ return SAMPTYPE_2D; } + YY_BREAK +case 166: +YY_RULE_SETUP +#line 464 "asmshader.l" +{ return SAMPTYPE_CUBE; } + YY_BREAK +case 167: +YY_RULE_SETUP +#line 465 "asmshader.l" +{ return SAMPTYPE_VOLUME; } + YY_BREAK +case 168: +/* rule 168 can match eol */ +YY_RULE_SETUP +#line 467 "asmshader.l" +{ + /* TODO: update current line information */ + TRACE("line info update: %s", asmshader_text); + } + YY_BREAK +/* Skip comments */ +case 169: +YY_RULE_SETUP +#line 473 "asmshader.l" +{ } + YY_BREAK +case 170: +YY_RULE_SETUP +#line 474 "asmshader.l" +{ } + YY_BREAK +case 171: +YY_RULE_SETUP +#line 476 "asmshader.l" +{ /* Do nothing */ } + YY_BREAK +case 172: +/* rule 172 can match eol */ +YY_RULE_SETUP +#line 477 "asmshader.l" +{ + asm_ctx.line_no++; + } + YY_BREAK +case 173: +YY_RULE_SETUP +#line 481 "asmshader.l" +{ + asmparser_message(&asm_ctx, "Line %u: Unexpected input %s\n", asm_ctx.line_no, asmshader_text); + set_parse_status(&asm_ctx.status, PARSE_ERR); + } + YY_BREAK +case 174: +YY_RULE_SETUP +#line 486 "asmshader.l" +ECHO; + YY_BREAK +#line 2208 "asmshader.yy.c" +case YY_STATE_EOF(INITIAL): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed asmshader_in at a new source and called + * asmshader_lex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = asmshader_in; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( asmshader_wrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * asmshader_text, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of asmshader_lex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); + register int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + asmshader_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), (size_t) num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + asmshader_restart(asmshader_in ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) asmshader_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = (yy_start); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 481 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + register int yy_is_jam; + register char *yy_cp = (yy_c_buf_p); + + register YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 481 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 480); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + asmshader_restart(asmshader_in ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( asmshader_wrap( ) ) + return EOF; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve asmshader_text */ + (yy_hold_char) = *++(yy_c_buf_p); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void asmshader_restart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + asmshader_ensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + asmshader__create_buffer(asmshader_in,YY_BUF_SIZE ); + } + + asmshader__init_buffer(YY_CURRENT_BUFFER,input_file ); + asmshader__load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void asmshader__switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * asmshader_pop_buffer_state(); + * asmshader_push_buffer_state(new_buffer); + */ + asmshader_ensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + asmshader__load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (asmshader_wrap()) processing, but the only time this flag + * is looked at is after asmshader_wrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void asmshader__load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + asmshader_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE asmshader__create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) asmshader_alloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in asmshader__create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) asmshader_alloc(b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in asmshader__create_buffer()" ); + + b->yy_is_our_buffer = 1; + + asmshader__init_buffer(b,file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with asmshader__create_buffer() + * + */ + void asmshader__delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + asmshader_free((void *) b->yy_ch_buf ); + + asmshader_free((void *) b ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a asmshader_restart() or at EOF. + */ + static void asmshader__init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + asmshader__flush_buffer(b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then asmshader__init_buffer was _probably_ + * called from asmshader_restart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void asmshader__flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + asmshader__load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void asmshader_push_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + asmshader_ensure_buffer_stack(); + + /* This block is copied from asmshader__switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from asmshader__switch_to_buffer. */ + asmshader__load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void asmshader_pop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + asmshader__delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + asmshader__load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void asmshader_ensure_buffer_stack (void) +{ + int num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)asmshader_alloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in asmshader_ensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)asmshader_realloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in asmshader_ensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE asmshader__scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) asmshader_alloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in asmshader__scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + asmshader__switch_to_buffer(b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to asmshader_lex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * asmshader__scan_bytes() instead. + */ +YY_BUFFER_STATE asmshader__scan_string (yyconst char * yystr ) +{ + + return asmshader__scan_bytes(yystr,strlen(yystr) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to asmshader_lex() will + * scan from a @e copy of @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE asmshader__scan_bytes (yyconst char * yybytes, int _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; + buf = (char *) asmshader_alloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in asmshader__scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = asmshader__scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in asmshader__scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up asmshader_text. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + asmshader_text[asmshader_leng] = (yy_hold_char); \ + (yy_c_buf_p) = asmshader_text + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + asmshader_leng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int asmshader_get_lineno (void) +{ + + return asmshader_lineno; +} + +/** Get the input stream. + * + */ +FILE *asmshader_get_in (void) +{ + return asmshader_in; +} + +/** Get the output stream. + * + */ +FILE *asmshader_get_out (void) +{ + return asmshader_out; +} + +/** Get the length of the current token. + * + */ +int asmshader_get_leng (void) +{ + return asmshader_leng; +} + +/** Get the current token. + * + */ + +char *asmshader_get_text (void) +{ + return asmshader_text; +} + +/** Set the current line number. + * @param line_number + * + */ +void asmshader_set_lineno (int line_number ) +{ + + asmshader_lineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see asmshader__switch_to_buffer + */ +void asmshader_set_in (FILE * in_str ) +{ + asmshader_in = in_str ; +} + +void asmshader_set_out (FILE * out_str ) +{ + asmshader_out = out_str ; +} + +int asmshader_get_debug (void) +{ + return asmshader__flex_debug; +} + +void asmshader_set_debug (int bdebug ) +{ + asmshader__flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from asmshader_lex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + asmshader_in = stdin; + asmshader_out = stdout; +#else + asmshader_in = (FILE *) 0; + asmshader_out = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * asmshader_lex_init() + */ + return 0; +} + +/* asmshader_lex_destroy is for both reentrant and non-reentrant scanners. */ +int asmshader_lex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + asmshader__delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + asmshader_pop_buffer_state(); + } + + /* Destroy the stack itself. */ + asmshader_free((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * asmshader_lex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s ) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *asmshader_alloc (yy_size_t size ) +{ + return (void *) malloc( size ); +} + +void *asmshader_realloc (void * ptr, yy_size_t size ) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void asmshader_free (void * ptr ) +{ + free( (char *) ptr ); /* see asmshader_realloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 486 "asmshader.l" + + + +struct bwriter_shader *SlAssembleShader(const char *text, char **messages) { + struct bwriter_shader *ret = NULL; + YY_BUFFER_STATE buffer; + TRACE("%p, %p\n", text, messages); + + buffer = asmshader__scan_string(text); + asmshader__switch_to_buffer(buffer); + + ret = parse_asm_shader(messages); + + asmshader__delete_buffer(buffer); + + return ret; +} + diff --git a/dll/directx/wine/d3dcompiler_43/blob.c b/dll/directx/wine/d3dcompiler_43/blob.c new file mode 100644 index 00000000000..865d139ccd8 --- /dev/null +++ b/dll/directx/wine/d3dcompiler_43/blob.c @@ -0,0 +1,465 @@ +/* + * Direct3D blob file + * + * Copyright 2010 Rico Schüller + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "config.h" +#include "wine/port.h" + +#include "d3dcompiler_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(d3dcompiler); + +struct d3dcompiler_blob +{ + ID3DBlob ID3DBlob_iface; + LONG refcount; + + SIZE_T size; + void *data; +}; + +static inline struct d3dcompiler_blob *impl_from_ID3DBlob(ID3DBlob *iface) +{ + return CONTAINING_RECORD(iface, struct d3dcompiler_blob, ID3DBlob_iface); +} + +/* IUnknown methods */ + +static HRESULT STDMETHODCALLTYPE d3dcompiler_blob_QueryInterface(ID3DBlob *iface, REFIID riid, void **object) +{ + TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object); + + if (IsEqualGUID(riid, &IID_ID3D10Blob) + || IsEqualGUID(riid, &IID_IUnknown)) + { + IUnknown_AddRef(iface); + *object = iface; + return S_OK; + } + + WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid)); + + *object = NULL; + return E_NOINTERFACE; +} + +static ULONG STDMETHODCALLTYPE d3dcompiler_blob_AddRef(ID3DBlob *iface) +{ + struct d3dcompiler_blob *blob = impl_from_ID3DBlob(iface); + ULONG refcount = InterlockedIncrement(&blob->refcount); + + TRACE("%p increasing refcount to %u\n", blob, refcount); + + return refcount; +} + +static ULONG STDMETHODCALLTYPE d3dcompiler_blob_Release(ID3DBlob *iface) +{ + struct d3dcompiler_blob *blob = impl_from_ID3DBlob(iface); + ULONG refcount = InterlockedDecrement(&blob->refcount); + + TRACE("%p decreasing refcount to %u\n", blob, refcount); + + if (!refcount) + { + HeapFree(GetProcessHeap(), 0, blob->data); + HeapFree(GetProcessHeap(), 0, blob); + } + + return refcount; +} + +/* ID3DBlob methods */ + +static void * STDMETHODCALLTYPE d3dcompiler_blob_GetBufferPointer(ID3DBlob *iface) +{ + struct d3dcompiler_blob *blob = impl_from_ID3DBlob(iface); + + TRACE("iface %p\n", iface); + + return blob->data; +} + +static SIZE_T STDMETHODCALLTYPE d3dcompiler_blob_GetBufferSize(ID3DBlob *iface) +{ + struct d3dcompiler_blob *blob = impl_from_ID3DBlob(iface); + + TRACE("iface %p\n", iface); + + return blob->size; +} + +static const struct ID3D10BlobVtbl d3dcompiler_blob_vtbl = +{ + /* IUnknown methods */ + d3dcompiler_blob_QueryInterface, + d3dcompiler_blob_AddRef, + d3dcompiler_blob_Release, + /* ID3DBlob methods */ + d3dcompiler_blob_GetBufferPointer, + d3dcompiler_blob_GetBufferSize, +}; + +static HRESULT d3dcompiler_blob_init(struct d3dcompiler_blob *blob, SIZE_T data_size) +{ + blob->ID3DBlob_iface.lpVtbl = &d3dcompiler_blob_vtbl; + blob->refcount = 1; + blob->size = data_size; + + blob->data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, data_size); + if (!blob->data) + { + ERR("Failed to allocate D3D blob data memory\n"); + return E_OUTOFMEMORY; + } + + return S_OK; +} + +HRESULT WINAPI D3DCreateBlob(SIZE_T data_size, ID3DBlob **blob) +{ + struct d3dcompiler_blob *object; + HRESULT hr; + + TRACE("data_size %lu, blob %p\n", data_size, blob); + + if (!blob) + { + WARN("Invalid blob specified.\n"); + return D3DERR_INVALIDCALL; + } + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + return E_OUTOFMEMORY; + + hr = d3dcompiler_blob_init(object, data_size); + if (FAILED(hr)) + { + WARN("Failed to initialize blob, hr %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + + *blob = &object->ID3DBlob_iface; + + TRACE("Created ID3DBlob %p\n", *blob); + + return S_OK; +} + +static BOOL check_blob_part(DWORD tag, D3D_BLOB_PART part) +{ + BOOL add = FALSE; + + switch(part) + { + case D3D_BLOB_INPUT_SIGNATURE_BLOB: + if (tag == TAG_ISGN) add = TRUE; + break; + + case D3D_BLOB_OUTPUT_SIGNATURE_BLOB: + if (tag == TAG_OSGN || tag == TAG_OSG5) add = TRUE; + break; + + case D3D_BLOB_INPUT_AND_OUTPUT_SIGNATURE_BLOB: + if (tag == TAG_ISGN || tag == TAG_OSGN || tag == TAG_OSG5) add = TRUE; + break; + + case D3D_BLOB_PATCH_CONSTANT_SIGNATURE_BLOB: + if (tag == TAG_PCSG) add = TRUE; + break; + + case D3D_BLOB_ALL_SIGNATURE_BLOB: + if (tag == TAG_ISGN || tag == TAG_OSGN || tag == TAG_OSG5 || tag == TAG_PCSG) add = TRUE; + break; + + case D3D_BLOB_DEBUG_INFO: + if (tag == TAG_SDBG) add = TRUE; + break; + + case D3D_BLOB_LEGACY_SHADER: + if (tag == TAG_Aon9) add = TRUE; + break; + + case D3D_BLOB_XNA_PREPASS_SHADER: + if (tag == TAG_XNAP) add = TRUE; + break; + + case D3D_BLOB_XNA_SHADER: + if (tag == TAG_XNAS) add = TRUE; + break; + + default: + FIXME("Unhandled D3D_BLOB_PART %s.\n", debug_d3dcompiler_d3d_blob_part(part)); + break; + } + + TRACE("%s tag %s\n", add ? "Add" : "Skip", debugstr_an((const char *)&tag, 4)); + + return add; +} + +static HRESULT d3dcompiler_get_blob_part(const void *data, SIZE_T data_size, D3D_BLOB_PART part, UINT flags, ID3DBlob **blob) +{ + struct dxbc src_dxbc, dst_dxbc; + HRESULT hr; + unsigned int i, count; + + if (!data || !data_size || flags || !blob) + { + WARN("Invalid arguments: data %p, data_size %lu, flags %#x, blob %p\n", data, data_size, flags, blob); + return D3DERR_INVALIDCALL; + } + + if (part > D3D_BLOB_TEST_COMPILE_PERF + || (part < D3D_BLOB_TEST_ALTERNATE_SHADER && part > D3D_BLOB_XNA_SHADER)) + { + WARN("Invalid D3D_BLOB_PART: part %s\n", debug_d3dcompiler_d3d_blob_part(part)); + return D3DERR_INVALIDCALL; + } + + hr = dxbc_parse(data, data_size, &src_dxbc); + if (FAILED(hr)) + { + WARN("Failed to parse blob part\n"); + return hr; + } + + hr = dxbc_init(&dst_dxbc, 0); + if (FAILED(hr)) + { + dxbc_destroy(&src_dxbc); + WARN("Failed to init dxbc\n"); + return hr; + } + + for (i = 0; i < src_dxbc.count; ++i) + { + struct dxbc_section *section = &src_dxbc.sections[i]; + + if (check_blob_part(section->tag, part)) + { + hr = dxbc_add_section(&dst_dxbc, section->tag, section->data, section->data_size); + if (FAILED(hr)) + { + dxbc_destroy(&src_dxbc); + dxbc_destroy(&dst_dxbc); + WARN("Failed to add section to dxbc\n"); + return hr; + } + } + } + + count = dst_dxbc.count; + + switch(part) + { + case D3D_BLOB_INPUT_SIGNATURE_BLOB: + case D3D_BLOB_OUTPUT_SIGNATURE_BLOB: + case D3D_BLOB_PATCH_CONSTANT_SIGNATURE_BLOB: + case D3D_BLOB_DEBUG_INFO: + case D3D_BLOB_LEGACY_SHADER: + case D3D_BLOB_XNA_PREPASS_SHADER: + case D3D_BLOB_XNA_SHADER: + if (count != 1) count = 0; + break; + + case D3D_BLOB_INPUT_AND_OUTPUT_SIGNATURE_BLOB: + if (count != 2) count = 0; + break; + + case D3D_BLOB_ALL_SIGNATURE_BLOB: + if (count != 3) count = 0; + break; + + default: + FIXME("Unhandled D3D_BLOB_PART %s.\n", debug_d3dcompiler_d3d_blob_part(part)); + break; + } + + if (count == 0) + { + dxbc_destroy(&src_dxbc); + dxbc_destroy(&dst_dxbc); + WARN("Nothing to write into the blob (count = 0)\n"); + return E_FAIL; + } + + /* some parts aren't full DXBCs, they contain only the data */ + if (count == 1 && (part == D3D_BLOB_DEBUG_INFO || part == D3D_BLOB_LEGACY_SHADER || part == D3D_BLOB_XNA_PREPASS_SHADER + || part == D3D_BLOB_XNA_SHADER)) + { + hr = D3DCreateBlob(dst_dxbc.sections[0].data_size, blob); + if (SUCCEEDED(hr)) + { + memcpy(ID3D10Blob_GetBufferPointer(*blob), dst_dxbc.sections[0].data, dst_dxbc.sections[0].data_size); + } + else + { + WARN("Could not create blob\n"); + } + } + else + { + hr = dxbc_write_blob(&dst_dxbc, blob); + if (FAILED(hr)) + { + WARN("Failed to write blob part\n"); + } + } + + dxbc_destroy(&src_dxbc); + dxbc_destroy(&dst_dxbc); + + return hr; +} + +static BOOL check_blob_strip(DWORD tag, UINT flags) +{ + BOOL add = TRUE; + + if (flags & D3DCOMPILER_STRIP_TEST_BLOBS) FIXME("Unhandled flag D3DCOMPILER_STRIP_TEST_BLOBS.\n"); + + switch(tag) + { + case TAG_RDEF: + case TAG_STAT: + if (flags & D3DCOMPILER_STRIP_REFLECTION_DATA) add = FALSE; + break; + + case TAG_SDBG: + if (flags & D3DCOMPILER_STRIP_DEBUG_INFO) add = FALSE; + break; + + default: + break; + } + + TRACE("%s tag %s\n", add ? "Add" : "Skip", debugstr_an((const char *)&tag, 4)); + + return add; +} + +static HRESULT d3dcompiler_strip_shader(const void *data, SIZE_T data_size, UINT flags, ID3DBlob **blob) +{ + struct dxbc src_dxbc, dst_dxbc; + HRESULT hr; + unsigned int i; + + if (!blob) + { + WARN("NULL for blob specified\n"); + return E_FAIL; + } + + if (!data || !data_size) + { + WARN("Invalid arguments: data %p, data_size %lu\n", data, data_size); + return D3DERR_INVALIDCALL; + } + + hr = dxbc_parse(data, data_size, &src_dxbc); + if (FAILED(hr)) + { + WARN("Failed to parse blob part\n"); + return hr; + } + + /* src_dxbc.count >= dst_dxbc.count */ + hr = dxbc_init(&dst_dxbc, src_dxbc.count); + if (FAILED(hr)) + { + dxbc_destroy(&src_dxbc); + WARN("Failed to init dxbc\n"); + return hr; + } + + for (i = 0; i < src_dxbc.count; ++i) + { + struct dxbc_section *section = &src_dxbc.sections[i]; + + if (check_blob_strip(section->tag, flags)) + { + hr = dxbc_add_section(&dst_dxbc, section->tag, section->data, section->data_size); + if (FAILED(hr)) + { + dxbc_destroy(&src_dxbc); + dxbc_destroy(&dst_dxbc); + WARN("Failed to add section to dxbc\n"); + return hr; + } + } + } + + hr = dxbc_write_blob(&dst_dxbc, blob); + if (FAILED(hr)) + { + WARN("Failed to write blob part\n"); + } + + dxbc_destroy(&src_dxbc); + dxbc_destroy(&dst_dxbc); + + return hr; +} + +HRESULT WINAPI D3DGetBlobPart(const void *data, SIZE_T data_size, D3D_BLOB_PART part, UINT flags, ID3DBlob **blob) +{ + TRACE("data %p, data_size %lu, part %s, flags %#x, blob %p\n", data, + data_size, debug_d3dcompiler_d3d_blob_part(part), flags, blob); + + return d3dcompiler_get_blob_part(data, data_size, part, flags, blob); +} + +HRESULT WINAPI D3DGetInputSignatureBlob(const void *data, SIZE_T data_size, ID3DBlob **blob) +{ + TRACE("data %p, data_size %lu, blob %p\n", data, data_size, blob); + + return d3dcompiler_get_blob_part(data, data_size, D3D_BLOB_INPUT_SIGNATURE_BLOB, 0, blob); +} + +HRESULT WINAPI D3DGetOutputSignatureBlob(const void *data, SIZE_T data_size, ID3DBlob **blob) +{ + TRACE("data %p, data_size %lu, blob %p\n", data, data_size, blob); + + return d3dcompiler_get_blob_part(data, data_size, D3D_BLOB_OUTPUT_SIGNATURE_BLOB, 0, blob); +} + +HRESULT WINAPI D3DGetInputAndOutputSignatureBlob(const void *data, SIZE_T data_size, ID3DBlob **blob) +{ + TRACE("data %p, data_size %lu, blob %p\n", data, data_size, blob); + + return d3dcompiler_get_blob_part(data, data_size, D3D_BLOB_INPUT_AND_OUTPUT_SIGNATURE_BLOB, 0, blob); +} + +HRESULT WINAPI D3DGetDebugInfo(const void *data, SIZE_T data_size, ID3DBlob **blob) +{ + TRACE("data %p, data_size %lu, blob %p\n", data, data_size, blob); + + return d3dcompiler_get_blob_part(data, data_size, D3D_BLOB_DEBUG_INFO, 0, blob); +} + +HRESULT WINAPI D3DStripShader(const void *data, SIZE_T data_size, UINT flags, ID3D10Blob **blob) +{ + TRACE("data %p, data_size %lu, flags %#x, blob %p\n", data, data_size, flags, blob); + + return d3dcompiler_strip_shader(data, data_size, flags, blob); +} diff --git a/dll/directx/wine/d3dcompiler_43/bytecodewriter.c b/dll/directx/wine/d3dcompiler_43/bytecodewriter.c new file mode 100644 index 00000000000..17289d230b6 --- /dev/null +++ b/dll/directx/wine/d3dcompiler_43/bytecodewriter.c @@ -0,0 +1,2630 @@ +/* + * Direct3D bytecode output functions + * + * Copyright 2008 Stefan Dösinger + * Copyright 2009 Matteo Bruni + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "config.h" +#include "wine/port.h" +#include "wine/debug.h" + +#include "d3d9types.h" +#include "d3dcompiler_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(bytecodewriter); + +/**************************************************************** + * General assembler shader construction helper routines follow * + ****************************************************************/ +/* struct instruction *alloc_instr + * + * Allocates a new instruction structure with srcs registers + * + * Parameters: + * srcs: Number of source registers to allocate + * + * Returns: + * A pointer to the allocated instruction structure + * NULL in case of an allocation failure + */ +struct instruction *alloc_instr(unsigned int srcs) { + struct instruction *ret = d3dcompiler_alloc(sizeof(*ret)); + if(!ret) { + ERR("Failed to allocate memory for an instruction structure\n"); + return NULL; + } + + if(srcs) { + ret->src = d3dcompiler_alloc(srcs * sizeof(*ret->src)); + if(!ret->src) { + ERR("Failed to allocate memory for instruction registers\n"); + d3dcompiler_free(ret); + return NULL; + } + ret->num_srcs = srcs; + } + return ret; +} + +/* void add_instruction + * + * Adds a new instruction to the shader's instructions array and grows the instruction array + * if needed. + * + * The function does NOT copy the instruction structure. Make sure not to release the + * instruction or any of its substructures like registers. + * + * Parameters: + * shader: Shader to add the instruction to + * instr: Instruction to add to the shader + */ +BOOL add_instruction(struct bwriter_shader *shader, struct instruction *instr) { + struct instruction **new_instructions; + + if(!shader) return FALSE; + + if(shader->instr_alloc_size == 0) { + shader->instr = d3dcompiler_alloc(sizeof(*shader->instr) * INSTRARRAY_INITIAL_SIZE); + if(!shader->instr) { + ERR("Failed to allocate the shader instruction array\n"); + return FALSE; + } + shader->instr_alloc_size = INSTRARRAY_INITIAL_SIZE; + } else if(shader->instr_alloc_size == shader->num_instrs) { + new_instructions = d3dcompiler_realloc(shader->instr, + sizeof(*shader->instr) * (shader->instr_alloc_size) * 2); + if(!new_instructions) { + ERR("Failed to grow the shader instruction array\n"); + return FALSE; + } + shader->instr = new_instructions; + shader->instr_alloc_size = shader->instr_alloc_size * 2; + } else if(shader->num_instrs > shader->instr_alloc_size) { + ERR("More instructions than allocated. This should not happen\n"); + return FALSE; + } + + shader->instr[shader->num_instrs] = instr; + shader->num_instrs++; + return TRUE; +} + +BOOL add_constF(struct bwriter_shader *shader, DWORD reg, float x, float y, float z, float w) { + struct constant *newconst; + + if(shader->num_cf) { + struct constant **newarray; + newarray = d3dcompiler_realloc(shader->constF, + sizeof(*shader->constF) * (shader->num_cf + 1)); + if(!newarray) { + ERR("Failed to grow the constants array\n"); + return FALSE; + } + shader->constF = newarray; + } else { + shader->constF = d3dcompiler_alloc(sizeof(*shader->constF)); + if(!shader->constF) { + ERR("Failed to allocate the constants array\n"); + return FALSE; + } + } + + newconst = d3dcompiler_alloc(sizeof(*newconst)); + if(!newconst) { + ERR("Failed to allocate a new constant\n"); + return FALSE; + } + newconst->regnum = reg; + newconst->value[0].f = x; + newconst->value[1].f = y; + newconst->value[2].f = z; + newconst->value[3].f = w; + shader->constF[shader->num_cf] = newconst; + + shader->num_cf++; + return TRUE; +} + +BOOL add_constI(struct bwriter_shader *shader, DWORD reg, INT x, INT y, INT z, INT w) { + struct constant *newconst; + + if(shader->num_ci) { + struct constant **newarray; + newarray = d3dcompiler_realloc(shader->constI, + sizeof(*shader->constI) * (shader->num_ci + 1)); + if(!newarray) { + ERR("Failed to grow the constants array\n"); + return FALSE; + } + shader->constI = newarray; + } else { + shader->constI = d3dcompiler_alloc(sizeof(*shader->constI)); + if(!shader->constI) { + ERR("Failed to allocate the constants array\n"); + return FALSE; + } + } + + newconst = d3dcompiler_alloc(sizeof(*newconst)); + if(!newconst) { + ERR("Failed to allocate a new constant\n"); + return FALSE; + } + newconst->regnum = reg; + newconst->value[0].i = x; + newconst->value[1].i = y; + newconst->value[2].i = z; + newconst->value[3].i = w; + shader->constI[shader->num_ci] = newconst; + + shader->num_ci++; + return TRUE; +} + +BOOL add_constB(struct bwriter_shader *shader, DWORD reg, BOOL x) { + struct constant *newconst; + + if(shader->num_cb) { + struct constant **newarray; + newarray = d3dcompiler_realloc(shader->constB, + sizeof(*shader->constB) * (shader->num_cb + 1)); + if(!newarray) { + ERR("Failed to grow the constants array\n"); + return FALSE; + } + shader->constB = newarray; + } else { + shader->constB = d3dcompiler_alloc(sizeof(*shader->constB)); + if(!shader->constB) { + ERR("Failed to allocate the constants array\n"); + return FALSE; + } + } + + newconst = d3dcompiler_alloc(sizeof(*newconst)); + if(!newconst) { + ERR("Failed to allocate a new constant\n"); + return FALSE; + } + newconst->regnum = reg; + newconst->value[0].b = x; + shader->constB[shader->num_cb] = newconst; + + shader->num_cb++; + return TRUE; +} + +BOOL record_declaration(struct bwriter_shader *shader, DWORD usage, + DWORD usage_idx, DWORD mod, BOOL output, + DWORD regnum, DWORD writemask, BOOL builtin) { + unsigned int *num; + struct declaration **decl; + unsigned int i; + + if(!shader) return FALSE; + + if(output) { + num = &shader->num_outputs; + decl = &shader->outputs; + } else { + num = &shader->num_inputs; + decl = &shader->inputs; + } + + if(*num == 0) { + *decl = d3dcompiler_alloc(sizeof(**decl)); + if(!*decl) { + ERR("Error allocating declarations array\n"); + return FALSE; + } + } else { + struct declaration *newdecl; + for(i = 0; i < *num; i++) { + if((*decl)[i].regnum == regnum && ((*decl)[i].writemask & writemask)) { + WARN("Declaration of register %u already exists, writemask match 0x%x\n", + regnum, (*decl)[i].writemask & writemask); + } + } + + newdecl = d3dcompiler_realloc(*decl, + sizeof(**decl) * ((*num) + 1)); + if(!newdecl) { + ERR("Error reallocating declarations array\n"); + return FALSE; + } + *decl = newdecl; + } + (*decl)[*num].usage = usage; + (*decl)[*num].usage_idx = usage_idx; + (*decl)[*num].regnum = regnum; + (*decl)[*num].mod = mod; + (*decl)[*num].writemask = writemask; + (*decl)[*num].builtin = builtin; + (*num)++; + + return TRUE; +} + +BOOL record_sampler(struct bwriter_shader *shader, DWORD samptype, DWORD mod, DWORD regnum) { + unsigned int i; + + if(!shader) return FALSE; + + if(shader->num_samplers == 0) { + shader->samplers = d3dcompiler_alloc(sizeof(*shader->samplers)); + if(!shader->samplers) { + ERR("Error allocating samplers array\n"); + return FALSE; + } + } else { + struct samplerdecl *newarray; + + for(i = 0; i < shader->num_samplers; i++) { + if(shader->samplers[i].regnum == regnum) { + WARN("Sampler %u already declared\n", regnum); + /* This is not an error as far as the assembler is concerned. + * Direct3D might refuse to load the compiled shader though + */ + } + } + + newarray = d3dcompiler_realloc(shader->samplers, + sizeof(*shader->samplers) * (shader->num_samplers + 1)); + if(!newarray) { + ERR("Error reallocating samplers array\n"); + return FALSE; + } + shader->samplers = newarray; + } + + shader->samplers[shader->num_samplers].type = samptype; + shader->samplers[shader->num_samplers].mod = mod; + shader->samplers[shader->num_samplers].regnum = regnum; + shader->num_samplers++; + return TRUE; +} + + +/* shader bytecode buffer manipulation functions. + * allocate_buffer creates a new buffer structure, put_dword adds a new + * DWORD to the buffer. In the rare case of a memory allocation failure + * when trying to grow the buffer a flag is set in the buffer to mark it + * invalid. This avoids return value checking and passing in many places + */ +static struct bytecode_buffer *allocate_buffer(void) { + struct bytecode_buffer *ret; + + ret = d3dcompiler_alloc(sizeof(*ret)); + if(!ret) return NULL; + + ret->alloc_size = BYTECODEBUFFER_INITIAL_SIZE; + ret->data = d3dcompiler_alloc(sizeof(DWORD) * ret->alloc_size); + if(!ret->data) { + d3dcompiler_free(ret); + return NULL; + } + ret->state = S_OK; + return ret; +} + +static void put_dword(struct bytecode_buffer *buffer, DWORD value) { + if(FAILED(buffer->state)) return; + + if(buffer->alloc_size == buffer->size) { + DWORD *newarray; + buffer->alloc_size *= 2; + newarray = d3dcompiler_realloc(buffer->data, + sizeof(DWORD) * buffer->alloc_size); + if(!newarray) { + ERR("Failed to grow the buffer data memory\n"); + buffer->state = E_OUTOFMEMORY; + return; + } + buffer->data = newarray; + } + buffer->data[buffer->size++] = value; +} + +/* bwriter -> d3d9 conversion functions. */ +static DWORD d3d9_swizzle(DWORD bwriter_swizzle) +{ + /* Currently a NOP, but this allows changing the internal definitions + * without side effects. */ + DWORD ret = 0; + + if ((bwriter_swizzle & BWRITERVS_X_X) == BWRITERVS_X_X) ret |= D3DVS_X_X; + if ((bwriter_swizzle & BWRITERVS_X_Y) == BWRITERVS_X_Y) ret |= D3DVS_X_Y; + if ((bwriter_swizzle & BWRITERVS_X_Z) == BWRITERVS_X_Z) ret |= D3DVS_X_Z; + if ((bwriter_swizzle & BWRITERVS_X_W) == BWRITERVS_X_W) ret |= D3DVS_X_W; + + if ((bwriter_swizzle & BWRITERVS_Y_X) == BWRITERVS_Y_X) ret |= D3DVS_Y_X; + if ((bwriter_swizzle & BWRITERVS_Y_Y) == BWRITERVS_Y_Y) ret |= D3DVS_Y_Y; + if ((bwriter_swizzle & BWRITERVS_Y_Z) == BWRITERVS_Y_Z) ret |= D3DVS_Y_Z; + if ((bwriter_swizzle & BWRITERVS_Y_W) == BWRITERVS_Y_W) ret |= D3DVS_Y_W; + + if ((bwriter_swizzle & BWRITERVS_Z_X) == BWRITERVS_Z_X) ret |= D3DVS_Z_X; + if ((bwriter_swizzle & BWRITERVS_Z_Y) == BWRITERVS_Z_Y) ret |= D3DVS_Z_Y; + if ((bwriter_swizzle & BWRITERVS_Z_Z) == BWRITERVS_Z_Z) ret |= D3DVS_Z_Z; + if ((bwriter_swizzle & BWRITERVS_Z_W) == BWRITERVS_Z_W) ret |= D3DVS_Z_W; + + if ((bwriter_swizzle & BWRITERVS_W_X) == BWRITERVS_W_X) ret |= D3DVS_W_X; + if ((bwriter_swizzle & BWRITERVS_W_Y) == BWRITERVS_W_Y) ret |= D3DVS_W_Y; + if ((bwriter_swizzle & BWRITERVS_W_Z) == BWRITERVS_W_Z) ret |= D3DVS_W_Z; + if ((bwriter_swizzle & BWRITERVS_W_W) == BWRITERVS_W_W) ret |= D3DVS_W_W; + + return ret; +} + +static DWORD d3d9_writemask(DWORD bwriter_writemask) +{ + DWORD ret = 0; + + if (bwriter_writemask & BWRITERSP_WRITEMASK_0) ret |= D3DSP_WRITEMASK_0; + if (bwriter_writemask & BWRITERSP_WRITEMASK_1) ret |= D3DSP_WRITEMASK_1; + if (bwriter_writemask & BWRITERSP_WRITEMASK_2) ret |= D3DSP_WRITEMASK_2; + if (bwriter_writemask & BWRITERSP_WRITEMASK_3) ret |= D3DSP_WRITEMASK_3; + + return ret; +} + +static DWORD d3d9_srcmod(DWORD bwriter_srcmod) +{ + switch (bwriter_srcmod) + { + case BWRITERSPSM_NONE: return D3DSPSM_NONE; + case BWRITERSPSM_NEG: return D3DSPSM_NEG; + case BWRITERSPSM_BIAS: return D3DSPSM_BIAS; + case BWRITERSPSM_BIASNEG: return D3DSPSM_BIASNEG; + case BWRITERSPSM_SIGN: return D3DSPSM_SIGN; + case BWRITERSPSM_SIGNNEG: return D3DSPSM_SIGNNEG; + case BWRITERSPSM_COMP: return D3DSPSM_COMP; + case BWRITERSPSM_X2: return D3DSPSM_X2; + case BWRITERSPSM_X2NEG: return D3DSPSM_X2NEG; + case BWRITERSPSM_DZ: return D3DSPSM_DZ; + case BWRITERSPSM_DW: return D3DSPSM_DW; + case BWRITERSPSM_ABS: return D3DSPSM_ABS; + case BWRITERSPSM_ABSNEG: return D3DSPSM_ABSNEG; + case BWRITERSPSM_NOT: return D3DSPSM_NOT; + default: + FIXME("Unhandled BWRITERSPSM token %#x.\n", bwriter_srcmod); + return 0; + } +} + +static DWORD d3d9_dstmod(DWORD bwriter_mod) +{ + DWORD ret = 0; + + if (bwriter_mod & BWRITERSPDM_SATURATE) ret |= D3DSPDM_SATURATE; + if (bwriter_mod & BWRITERSPDM_PARTIALPRECISION) ret |= D3DSPDM_PARTIALPRECISION; + if (bwriter_mod & BWRITERSPDM_MSAMPCENTROID) ret |= D3DSPDM_MSAMPCENTROID; + + return ret; +} + +static DWORD d3d9_comparetype(DWORD asmshader_comparetype) +{ + switch (asmshader_comparetype) + { + case BWRITER_COMPARISON_GT: return D3DSPC_GT; + case BWRITER_COMPARISON_EQ: return D3DSPC_EQ; + case BWRITER_COMPARISON_GE: return D3DSPC_GE; + case BWRITER_COMPARISON_LT: return D3DSPC_LT; + case BWRITER_COMPARISON_NE: return D3DSPC_NE; + case BWRITER_COMPARISON_LE: return D3DSPC_LE; + default: + FIXME("Unexpected BWRITER_COMPARISON type %#x.\n", asmshader_comparetype); + return 0; + } +} + +static DWORD d3d9_sampler(DWORD bwriter_sampler) +{ + if (bwriter_sampler == BWRITERSTT_UNKNOWN) return D3DSTT_UNKNOWN; + if (bwriter_sampler == BWRITERSTT_1D) return D3DSTT_1D; + if (bwriter_sampler == BWRITERSTT_2D) return D3DSTT_2D; + if (bwriter_sampler == BWRITERSTT_CUBE) return D3DSTT_CUBE; + if (bwriter_sampler == BWRITERSTT_VOLUME) return D3DSTT_VOLUME; + FIXME("Unexpected BWRITERSAMPLER_TEXTURE_TYPE type %#x.\n", bwriter_sampler); + + return 0; +} + +static DWORD d3d9_register(DWORD bwriter_register) +{ + if (bwriter_register == BWRITERSPR_TEMP) return D3DSPR_TEMP; + if (bwriter_register == BWRITERSPR_INPUT) return D3DSPR_INPUT; + if (bwriter_register == BWRITERSPR_CONST) return D3DSPR_CONST; + if (bwriter_register == BWRITERSPR_ADDR) return D3DSPR_ADDR; + if (bwriter_register == BWRITERSPR_TEXTURE) return D3DSPR_TEXTURE; + if (bwriter_register == BWRITERSPR_RASTOUT) return D3DSPR_RASTOUT; + if (bwriter_register == BWRITERSPR_ATTROUT) return D3DSPR_ATTROUT; + if (bwriter_register == BWRITERSPR_TEXCRDOUT) return D3DSPR_TEXCRDOUT; + if (bwriter_register == BWRITERSPR_OUTPUT) return D3DSPR_OUTPUT; + if (bwriter_register == BWRITERSPR_CONSTINT) return D3DSPR_CONSTINT; + if (bwriter_register == BWRITERSPR_COLOROUT) return D3DSPR_COLOROUT; + if (bwriter_register == BWRITERSPR_DEPTHOUT) return D3DSPR_DEPTHOUT; + if (bwriter_register == BWRITERSPR_SAMPLER) return D3DSPR_SAMPLER; + if (bwriter_register == BWRITERSPR_CONSTBOOL) return D3DSPR_CONSTBOOL; + if (bwriter_register == BWRITERSPR_LOOP) return D3DSPR_LOOP; + if (bwriter_register == BWRITERSPR_MISCTYPE) return D3DSPR_MISCTYPE; + if (bwriter_register == BWRITERSPR_LABEL) return D3DSPR_LABEL; + if (bwriter_register == BWRITERSPR_PREDICATE) return D3DSPR_PREDICATE; + + FIXME("Unexpected BWRITERSPR %#x.\n", bwriter_register); + return ~0U; +} + +static DWORD d3d9_opcode(DWORD bwriter_opcode) +{ + switch (bwriter_opcode) + { + case BWRITERSIO_NOP: return D3DSIO_NOP; + case BWRITERSIO_MOV: return D3DSIO_MOV; + case BWRITERSIO_ADD: return D3DSIO_ADD; + case BWRITERSIO_SUB: return D3DSIO_SUB; + case BWRITERSIO_MAD: return D3DSIO_MAD; + case BWRITERSIO_MUL: return D3DSIO_MUL; + case BWRITERSIO_RCP: return D3DSIO_RCP; + case BWRITERSIO_RSQ: return D3DSIO_RSQ; + case BWRITERSIO_DP3: return D3DSIO_DP3; + case BWRITERSIO_DP4: return D3DSIO_DP4; + case BWRITERSIO_MIN: return D3DSIO_MIN; + case BWRITERSIO_MAX: return D3DSIO_MAX; + case BWRITERSIO_SLT: return D3DSIO_SLT; + case BWRITERSIO_SGE: return D3DSIO_SGE; + case BWRITERSIO_EXP: return D3DSIO_EXP; + case BWRITERSIO_LOG: return D3DSIO_LOG; + case BWRITERSIO_LIT: return D3DSIO_LIT; + case BWRITERSIO_DST: return D3DSIO_DST; + case BWRITERSIO_LRP: return D3DSIO_LRP; + case BWRITERSIO_FRC: return D3DSIO_FRC; + case BWRITERSIO_M4x4: return D3DSIO_M4x4; + case BWRITERSIO_M4x3: return D3DSIO_M4x3; + case BWRITERSIO_M3x4: return D3DSIO_M3x4; + case BWRITERSIO_M3x3: return D3DSIO_M3x3; + case BWRITERSIO_M3x2: return D3DSIO_M3x2; + case BWRITERSIO_CALL: return D3DSIO_CALL; + case BWRITERSIO_CALLNZ: return D3DSIO_CALLNZ; + case BWRITERSIO_LOOP: return D3DSIO_LOOP; + case BWRITERSIO_RET: return D3DSIO_RET; + case BWRITERSIO_ENDLOOP: return D3DSIO_ENDLOOP; + case BWRITERSIO_LABEL: return D3DSIO_LABEL; + case BWRITERSIO_DCL: return D3DSIO_DCL; + case BWRITERSIO_POW: return D3DSIO_POW; + case BWRITERSIO_CRS: return D3DSIO_CRS; + case BWRITERSIO_SGN: return D3DSIO_SGN; + case BWRITERSIO_ABS: return D3DSIO_ABS; + case BWRITERSIO_NRM: return D3DSIO_NRM; + case BWRITERSIO_SINCOS: return D3DSIO_SINCOS; + case BWRITERSIO_REP: return D3DSIO_REP; + case BWRITERSIO_ENDREP: return D3DSIO_ENDREP; + case BWRITERSIO_IF: return D3DSIO_IF; + case BWRITERSIO_IFC: return D3DSIO_IFC; + case BWRITERSIO_ELSE: return D3DSIO_ELSE; + case BWRITERSIO_ENDIF: return D3DSIO_ENDIF; + case BWRITERSIO_BREAK: return D3DSIO_BREAK; + case BWRITERSIO_BREAKC: return D3DSIO_BREAKC; + case BWRITERSIO_MOVA: return D3DSIO_MOVA; + case BWRITERSIO_DEFB: return D3DSIO_DEFB; + case BWRITERSIO_DEFI: return D3DSIO_DEFI; + + case BWRITERSIO_TEXCOORD: return D3DSIO_TEXCOORD; + case BWRITERSIO_TEXKILL: return D3DSIO_TEXKILL; + case BWRITERSIO_TEX: return D3DSIO_TEX; + case BWRITERSIO_TEXBEM: return D3DSIO_TEXBEM; + case BWRITERSIO_TEXBEML: return D3DSIO_TEXBEML; + case BWRITERSIO_TEXREG2AR: return D3DSIO_TEXREG2AR; + case BWRITERSIO_TEXREG2GB: return D3DSIO_TEXREG2GB; + case BWRITERSIO_TEXM3x2PAD: return D3DSIO_TEXM3x2PAD; + case BWRITERSIO_TEXM3x2TEX: return D3DSIO_TEXM3x2TEX; + case BWRITERSIO_TEXM3x3PAD: return D3DSIO_TEXM3x3PAD; + case BWRITERSIO_TEXM3x3TEX: return D3DSIO_TEXM3x3TEX; + case BWRITERSIO_TEXM3x3SPEC: return D3DSIO_TEXM3x3SPEC; + case BWRITERSIO_TEXM3x3VSPEC:return D3DSIO_TEXM3x3VSPEC; + case BWRITERSIO_EXPP: return D3DSIO_EXPP; + case BWRITERSIO_LOGP: return D3DSIO_LOGP; + case BWRITERSIO_CND: return D3DSIO_CND; + case BWRITERSIO_DEF: return D3DSIO_DEF; + case BWRITERSIO_TEXREG2RGB: return D3DSIO_TEXREG2RGB; + case BWRITERSIO_TEXDP3TEX: return D3DSIO_TEXDP3TEX; + case BWRITERSIO_TEXM3x2DEPTH:return D3DSIO_TEXM3x2DEPTH; + case BWRITERSIO_TEXDP3: return D3DSIO_TEXDP3; + case BWRITERSIO_TEXM3x3: return D3DSIO_TEXM3x3; + case BWRITERSIO_TEXDEPTH: return D3DSIO_TEXDEPTH; + case BWRITERSIO_CMP: return D3DSIO_CMP; + case BWRITERSIO_BEM: return D3DSIO_BEM; + case BWRITERSIO_DP2ADD: return D3DSIO_DP2ADD; + case BWRITERSIO_DSX: return D3DSIO_DSX; + case BWRITERSIO_DSY: return D3DSIO_DSY; + case BWRITERSIO_TEXLDD: return D3DSIO_TEXLDD; + case BWRITERSIO_SETP: return D3DSIO_SETP; + case BWRITERSIO_TEXLDL: return D3DSIO_TEXLDL; + case BWRITERSIO_BREAKP: return D3DSIO_BREAKP; + + case BWRITERSIO_PHASE: return D3DSIO_PHASE; + case BWRITERSIO_COMMENT: return D3DSIO_COMMENT; + case BWRITERSIO_END: return D3DSIO_END; + + case BWRITERSIO_TEXLDP: return D3DSIO_TEX | D3DSI_TEXLD_PROJECT; + case BWRITERSIO_TEXLDB: return D3DSIO_TEX | D3DSI_TEXLD_BIAS; + + default: + FIXME("Unhandled BWRITERSIO token %#x.\n", bwriter_opcode); + return ~0U; + } +} + +/****************************************************** + * Implementation of the writer functions starts here * + ******************************************************/ +static void write_declarations(struct bc_writer *This, + struct bytecode_buffer *buffer, BOOL len, + const struct declaration *decls, unsigned int num, DWORD type) { + DWORD i; + DWORD instr_dcl = D3DSIO_DCL; + DWORD token; + struct shader_reg reg; + + ZeroMemory(®, sizeof(reg)); + + if(len) { + instr_dcl |= 2 << D3DSI_INSTLENGTH_SHIFT; + } + + for(i = 0; i < num; i++) { + if(decls[i].builtin) continue; + + /* Write the DCL instruction */ + put_dword(buffer, instr_dcl); + + /* Write the usage and index */ + token = (1 << 31); /* Bit 31 of non-instruction opcodes is 1 */ + token |= (decls[i].usage << D3DSP_DCL_USAGE_SHIFT) & D3DSP_DCL_USAGE_MASK; + token |= (decls[i].usage_idx << D3DSP_DCL_USAGEINDEX_SHIFT) & D3DSP_DCL_USAGEINDEX_MASK; + put_dword(buffer, token); + + /* Write the dest register */ + reg.type = type; + reg.regnum = decls[i].regnum; + reg.u.writemask = decls[i].writemask; + This->funcs->dstreg(This, ®, buffer, 0, decls[i].mod); + } +} + +static void write_const(struct constant **consts, int num, DWORD opcode, DWORD reg_type, struct bytecode_buffer *buffer, BOOL len) { + int i; + DWORD instr_def = opcode; + const DWORD reg = (1<<31) | + ((reg_type << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK) | + ((reg_type << D3DSP_REGTYPE_SHIFT2) & D3DSP_REGTYPE_MASK2) | + D3DSP_WRITEMASK_ALL; + + if(len) { + if(opcode == D3DSIO_DEFB) + instr_def |= 2 << D3DSI_INSTLENGTH_SHIFT; + else + instr_def |= 5 << D3DSI_INSTLENGTH_SHIFT; + } + + for(i = 0; i < num; i++) { + /* Write the DEF instruction */ + put_dword(buffer, instr_def); + + put_dword(buffer, reg | (consts[i]->regnum & D3DSP_REGNUM_MASK)); + put_dword(buffer, consts[i]->value[0].d); + if(opcode != D3DSIO_DEFB) { + put_dword(buffer, consts[i]->value[1].d); + put_dword(buffer, consts[i]->value[2].d); + put_dword(buffer, consts[i]->value[3].d); + } + } +} + +static void write_constF(const struct bwriter_shader *shader, struct bytecode_buffer *buffer, BOOL len) { + write_const(shader->constF, shader->num_cf, D3DSIO_DEF, D3DSPR_CONST, buffer, len); +} + +/* This function looks for VS 1/2 registers mapping to VS 3 output registers */ +static HRESULT vs_find_builtin_varyings(struct bc_writer *This, const struct bwriter_shader *shader) { + DWORD i; + DWORD usage, usage_idx, writemask, regnum; + + for(i = 0; i < shader->num_outputs; i++) { + if(!shader->outputs[i].builtin) continue; + + usage = shader->outputs[i].usage; + usage_idx = shader->outputs[i].usage_idx; + writemask = shader->outputs[i].writemask; + regnum = shader->outputs[i].regnum; + + switch(usage) { + case BWRITERDECLUSAGE_POSITION: + case BWRITERDECLUSAGE_POSITIONT: + if(usage_idx > 0) { + WARN("dcl_position%u not supported in sm 1/2 shaders\n", usage_idx); + return E_INVALIDARG; + } + TRACE("o%u is oPos\n", regnum); + This->oPos_regnum = regnum; + break; + + case BWRITERDECLUSAGE_COLOR: + if(usage_idx > 1) { + WARN("dcl_color%u not supported in sm 1/2 shaders\n", usage_idx); + return E_INVALIDARG; + } + if(writemask != BWRITERSP_WRITEMASK_ALL) { + WARN("Only WRITEMASK_ALL is supported on color in sm 1/2\n"); + return E_INVALIDARG; + } + TRACE("o%u is oD%u\n", regnum, usage_idx); + This->oD_regnum[usage_idx] = regnum; + break; + + case BWRITERDECLUSAGE_TEXCOORD: + if(usage_idx >= 8) { + WARN("dcl_color%u not supported in sm 1/2 shaders\n", usage_idx); + return E_INVALIDARG; + } + if(writemask != (BWRITERSP_WRITEMASK_0) && + writemask != (BWRITERSP_WRITEMASK_0 | BWRITERSP_WRITEMASK_1) && + writemask != (BWRITERSP_WRITEMASK_0 | BWRITERSP_WRITEMASK_1 | BWRITERSP_WRITEMASK_2) && + writemask != (BWRITERSP_WRITEMASK_ALL)) { + WARN("Partial writemasks not supported on texture coordinates in sm 1 and 2\n"); + return E_INVALIDARG; + } + TRACE("o%u is oT%u\n", regnum, usage_idx); + This->oT_regnum[usage_idx] = regnum; + break; + + case BWRITERDECLUSAGE_PSIZE: + if(usage_idx > 0) { + WARN("dcl_psize%u not supported in sm 1/2 shaders\n", usage_idx); + return E_INVALIDARG; + } + TRACE("o%u writemask 0x%08x is oPts\n", regnum, writemask); + This->oPts_regnum = regnum; + This->oPts_mask = writemask; + break; + + case BWRITERDECLUSAGE_FOG: + if(usage_idx > 0) { + WARN("dcl_fog%u not supported in sm 1 shaders\n", usage_idx); + return E_INVALIDARG; + } + if(writemask != BWRITERSP_WRITEMASK_0 && writemask != BWRITERSP_WRITEMASK_1 && + writemask != BWRITERSP_WRITEMASK_2 && writemask != BWRITERSP_WRITEMASK_3) { + WARN("Unsupported fog writemask\n"); + return E_INVALIDARG; + } + TRACE("o%u writemask 0x%08x is oFog\n", regnum, writemask); + This->oFog_regnum = regnum; + This->oFog_mask = writemask; + break; + + default: + WARN("Varying type %u is not supported in shader model 1.x\n", usage); + return E_INVALIDARG; + } + } + + return S_OK; +} + +static void vs_1_x_header(struct bc_writer *This, const struct bwriter_shader *shader, struct bytecode_buffer *buffer) { + HRESULT hr; + + if(shader->num_ci || shader->num_cb) { + WARN("Int and bool constants are not supported in shader model 1 shaders\n"); + WARN("Got %u int and %u boolean constants\n", shader->num_ci, shader->num_cb); + This->state = E_INVALIDARG; + return; + } + + hr = vs_find_builtin_varyings(This, shader); + if(FAILED(hr)) { + This->state = hr; + return; + } + + write_declarations(This, buffer, FALSE, shader->inputs, shader->num_inputs, BWRITERSPR_INPUT); + write_constF(shader, buffer, FALSE); +} + +static HRESULT find_ps_builtin_semantics(struct bc_writer *This, + const struct bwriter_shader *shader, + DWORD texcoords) { + DWORD i; + DWORD usage, usage_idx, writemask, regnum; + + This->v_regnum[0] = -1; This->v_regnum[1] = -1; + for(i = 0; i < 8; i++) This->t_regnum[i] = -1; + + for(i = 0; i < shader->num_inputs; i++) { + if(!shader->inputs[i].builtin) continue; + + usage = shader->inputs[i].usage; + usage_idx = shader->inputs[i].usage_idx; + writemask = shader->inputs[i].writemask; + regnum = shader->inputs[i].regnum; + + switch(usage) { + case BWRITERDECLUSAGE_COLOR: + if(usage_idx > 1) { + WARN("dcl_color%u not supported in sm 1 shaders\n", usage_idx); + return E_INVALIDARG; + } + if(writemask != BWRITERSP_WRITEMASK_ALL) { + WARN("Only WRITEMASK_ALL is supported on color in sm 1\n"); + return E_INVALIDARG; + } + TRACE("v%u is v%u\n", regnum, usage_idx); + This->v_regnum[usage_idx] = regnum; + break; + + case BWRITERDECLUSAGE_TEXCOORD: + if(usage_idx > texcoords) { + WARN("dcl_texcoord%u not supported in this shader version\n", usage_idx); + return E_INVALIDARG; + } + if(writemask != (BWRITERSP_WRITEMASK_0) && + writemask != (BWRITERSP_WRITEMASK_0 | BWRITERSP_WRITEMASK_1) && + writemask != (BWRITERSP_WRITEMASK_0 | BWRITERSP_WRITEMASK_1 | BWRITERSP_WRITEMASK_2) && + writemask != (BWRITERSP_WRITEMASK_ALL)) { + WARN("Partial writemasks not supported on texture coordinates in sm 1 and 2\n"); + } else { + writemask = BWRITERSP_WRITEMASK_ALL; + } + TRACE("v%u is t%u\n", regnum, usage_idx); + This->t_regnum[usage_idx] = regnum; + break; + + default: + WARN("Varying type %u is not supported in shader model 1.x\n", usage); + return E_INVALIDARG; + } + } + + return S_OK; +} + +static void ps_1_x_header(struct bc_writer *This, const struct bwriter_shader *shader, struct bytecode_buffer *buffer) { + HRESULT hr; + + /* First check the constants and varyings, and complain if unsupported things are used */ + if(shader->num_ci || shader->num_cb) { + WARN("Int and bool constants are not supported in shader model 1 shaders\n"); + WARN("Got %u int and %u boolean constants\n", shader->num_ci, shader->num_cb); + This->state = E_INVALIDARG; + return; + } + + hr = find_ps_builtin_semantics(This, shader, 4); + if(FAILED(hr)) { + This->state = hr; + return; + } + + write_constF(shader, buffer, FALSE); +} + +static void ps_1_4_header(struct bc_writer *This, const struct bwriter_shader *shader, struct bytecode_buffer *buffer) { + HRESULT hr; + + /* First check the constants and varyings, and complain if unsupported things are used */ + if(shader->num_ci || shader->num_cb) { + WARN("Int and bool constants are not supported in shader model 1 shaders\n"); + WARN("Got %u int and %u boolean constants\n", shader->num_ci, shader->num_cb); + This->state = E_INVALIDARG; + return; + } + hr = find_ps_builtin_semantics(This, shader, 6); + if(FAILED(hr)) { + This->state = hr; + return; + } + + write_constF(shader, buffer, FALSE); +} + +static void end(struct bc_writer *This, const struct bwriter_shader *shader, struct bytecode_buffer *buffer) { + put_dword(buffer, D3DSIO_END); +} + +static DWORD map_vs_output(struct bc_writer *This, DWORD regnum, DWORD mask, DWORD *has_components) { + DWORD token = 0; + DWORD i; + + *has_components = TRUE; + if(regnum == This->oPos_regnum) { + token |= (D3DSPR_RASTOUT << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= D3DSRO_POSITION & D3DSP_REGNUM_MASK; /* No shift */ + return token; + } + if(regnum == This->oFog_regnum && mask == This->oFog_mask) { + token |= (D3DSPR_RASTOUT << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= D3DSRO_FOG & D3DSP_REGNUM_MASK; /* No shift */ + token |= D3DSP_WRITEMASK_ALL; + *has_components = FALSE; + return token; + } + if(regnum == This->oPts_regnum && mask == This->oPts_mask) { + token |= (D3DSPR_RASTOUT << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= D3DSRO_POINT_SIZE & D3DSP_REGNUM_MASK; /* No shift */ + token |= D3DSP_WRITEMASK_ALL; + *has_components = FALSE; + return token; + } + for(i = 0; i < 2; i++) { + if(regnum == This->oD_regnum[i]) { + token |= (D3DSPR_ATTROUT << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= i & D3DSP_REGNUM_MASK; /* No shift */ + return token; + } + } + for(i = 0; i < 8; i++) { + if(regnum == This->oT_regnum[i]) { + token |= (D3DSPR_TEXCRDOUT << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= i & D3DSP_REGNUM_MASK; /* No shift */ + return token; + } + } + + /* The varying must be undeclared - if an unsupported varying was declared, + * the vs_find_builtin_varyings function would have caught it and this code + * would not run */ + WARN("Undeclared varying %u\n", regnum); + This->state = E_INVALIDARG; + return -1; +} + +static void vs_12_dstreg(struct bc_writer *This, const struct shader_reg *reg, + struct bytecode_buffer *buffer, + DWORD shift, DWORD mod) { + DWORD token = (1 << 31); /* Bit 31 of registers is 1 */ + DWORD has_wmask; + + if(reg->rel_reg) { + WARN("Relative addressing not supported for destination registers\n"); + This->state = E_INVALIDARG; + return; + } + + switch(reg->type) { + case BWRITERSPR_OUTPUT: + token |= map_vs_output(This, reg->regnum, reg->u.writemask, &has_wmask); + break; + + case BWRITERSPR_RASTOUT: + case BWRITERSPR_ATTROUT: + /* These registers are mapped to input and output regs. They can be encoded in the bytecode, + * but are unexpected. If we hit this path it might be due to an error. + */ + FIXME("Unexpected register type %u\n", reg->type); + /* drop through */ + case BWRITERSPR_INPUT: + case BWRITERSPR_TEMP: + case BWRITERSPR_CONST: + token |= (reg->type << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= reg->regnum & D3DSP_REGNUM_MASK; /* No shift */ + has_wmask = TRUE; + break; + + case BWRITERSPR_ADDR: + if(reg->regnum != 0) { + WARN("Only a0 exists\n"); + This->state = E_INVALIDARG; + return; + } + token |= (D3DSPR_ADDR << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= 0 & D3DSP_REGNUM_MASK; /* No shift */ + has_wmask = TRUE; + break; + + case BWRITERSPR_PREDICATE: + if(This->version != BWRITERVS_VERSION(2, 1)){ + WARN("Predicate register is allowed only in vs_2_x\n"); + This->state = E_INVALIDARG; + return; + } + if(reg->regnum != 0) { + WARN("Only predicate register p0 exists\n"); + This->state = E_INVALIDARG; + return; + } + token |= (D3DSPR_PREDICATE << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= (D3DSPR_PREDICATE << D3DSP_REGTYPE_SHIFT2) & D3DSP_REGTYPE_MASK2; + token |= 0 & D3DSP_REGNUM_MASK; /* No shift */ + has_wmask = TRUE; + break; + + default: + WARN("Invalid register type for 1.x-2.x vertex shader\n"); + This->state = E_INVALIDARG; + return; + } + + /* strictly speaking there are no modifiers in vs_2_0 and vs_1_x, but they can be written + * into the bytecode and since the compiler doesn't do such checks write them + * (the checks are done by the undocumented shader validator) + */ + token |= (shift << D3DSP_DSTSHIFT_SHIFT) & D3DSP_DSTSHIFT_MASK; + token |= d3d9_dstmod(mod); + + if(has_wmask) { + token |= d3d9_writemask(reg->u.writemask); + } + put_dword(buffer, token); +} + +static void vs_1_x_srcreg(struct bc_writer *This, const struct shader_reg *reg, + struct bytecode_buffer *buffer) { + DWORD token = (1 << 31); /* Bit 31 of registers is 1 */ + DWORD has_swizzle; + DWORD component; + + switch(reg->type) { + case BWRITERSPR_OUTPUT: + /* Map the swizzle to a writemask, the format expected + by map_vs_output + */ + switch(reg->u.swizzle) { + case BWRITERVS_SWIZZLE_X: + component = BWRITERSP_WRITEMASK_0; + break; + case BWRITERVS_SWIZZLE_Y: + component = BWRITERSP_WRITEMASK_1; + break; + case BWRITERVS_SWIZZLE_Z: + component = BWRITERSP_WRITEMASK_2; + break; + case BWRITERVS_SWIZZLE_W: + component = BWRITERSP_WRITEMASK_3; + break; + default: + component = 0; + } + token |= map_vs_output(This, reg->regnum, component, &has_swizzle); + break; + + case BWRITERSPR_RASTOUT: + case BWRITERSPR_ATTROUT: + /* These registers are mapped to input and output regs. They can be encoded in the bytecode, + * but are unexpected. If we hit this path it might be due to an error. + */ + FIXME("Unexpected register type %u\n", reg->type); + /* drop through */ + case BWRITERSPR_INPUT: + case BWRITERSPR_TEMP: + case BWRITERSPR_CONST: + case BWRITERSPR_ADDR: + token |= (reg->type << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= reg->regnum & D3DSP_REGNUM_MASK; /* No shift */ + if(reg->rel_reg) { + if(reg->rel_reg->type != BWRITERSPR_ADDR || + reg->rel_reg->regnum != 0 || + reg->rel_reg->u.swizzle != BWRITERVS_SWIZZLE_X) { + WARN("Relative addressing in vs_1_x is only allowed with a0.x\n"); + This->state = E_INVALIDARG; + return; + } + token |= D3DVS_ADDRMODE_RELATIVE & D3DVS_ADDRESSMODE_MASK; + } + break; + + default: + WARN("Invalid register type for 1.x vshader\n"); + This->state = E_INVALIDARG; + return; + } + + token |= d3d9_swizzle(reg->u.swizzle) & D3DVS_SWIZZLE_MASK; /* already shifted */ + + token |= d3d9_srcmod(reg->srcmod); + put_dword(buffer, token); +} + +static void write_srcregs(struct bc_writer *This, const struct instruction *instr, + struct bytecode_buffer *buffer){ + unsigned int i; + if(instr->has_predicate){ + This->funcs->srcreg(This, &instr->predicate, buffer); + } + for(i = 0; i < instr->num_srcs; i++){ + This->funcs->srcreg(This, &instr->src[i], buffer); + } +} + +static DWORD map_ps13_temp(struct bc_writer *This, const struct shader_reg *reg) { + DWORD token = 0; + if(reg->regnum == T0_REG) { + token |= (D3DSPR_TEXTURE << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= 0 & D3DSP_REGNUM_MASK; /* No shift */ + } else if(reg->regnum == T1_REG) { + token |= (D3DSPR_TEXTURE << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= 1 & D3DSP_REGNUM_MASK; /* No shift */ + } else if(reg->regnum == T2_REG) { + token |= (D3DSPR_TEXTURE << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= 2 & D3DSP_REGNUM_MASK; /* No shift */ + } else if(reg->regnum == T3_REG) { + token |= (D3DSPR_TEXTURE << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= 3 & D3DSP_REGNUM_MASK; /* No shift */ + } else { + token |= (D3DSPR_TEMP << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= reg->regnum & D3DSP_REGNUM_MASK; /* No shift */ + } + return token; +} + +static DWORD map_ps_input(struct bc_writer *This, + const struct shader_reg *reg) { + DWORD i, token = 0; + /* Map color interpolators */ + for(i = 0; i < 2; i++) { + if(reg->regnum == This->v_regnum[i]) { + token |= (D3DSPR_INPUT << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= i & D3DSP_REGNUM_MASK; /* No shift */ + return token; + } + } + for(i = 0; i < 8; i++) { + if(reg->regnum == This->t_regnum[i]) { + token |= (D3DSPR_TEXTURE << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= i & D3DSP_REGNUM_MASK; /* No shift */ + return token; + } + } + + WARN("Invalid ps 1/2 varying\n"); + This->state = E_INVALIDARG; + return token; +} + +static void ps_1_0123_srcreg(struct bc_writer *This, const struct shader_reg *reg, + struct bytecode_buffer *buffer) { + DWORD token = (1 << 31); /* Bit 31 of registers is 1 */ + if(reg->rel_reg) { + WARN("Relative addressing not supported in <= ps_3_0\n"); + This->state = E_INVALIDARG; + return; + } + + switch(reg->type) { + case BWRITERSPR_INPUT: + token |= map_ps_input(This, reg); + break; + + /* Take care about the texture temporaries. There's a problem: They aren't + * declared anywhere, so we can only hardcode the values that are used + * to map ps_1_3 shaders to the common shader structure + */ + case BWRITERSPR_TEMP: + token |= map_ps13_temp(This, reg); + break; + + case BWRITERSPR_CONST: /* Can be mapped 1:1 */ + token |= (reg->type << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= reg->regnum & D3DSP_REGNUM_MASK; /* No shift */ + break; + + default: + WARN("Invalid register type for <= ps_1_3 shader\n"); + This->state = E_INVALIDARG; + return; + } + + token |= d3d9_swizzle(reg->u.swizzle) & D3DVS_SWIZZLE_MASK; /* already shifted */ + + if(reg->srcmod == BWRITERSPSM_DZ || reg->srcmod == BWRITERSPSM_DW || + reg->srcmod == BWRITERSPSM_ABS || reg->srcmod == BWRITERSPSM_ABSNEG || + reg->srcmod == BWRITERSPSM_NOT) { + WARN("Invalid source modifier %u for <= ps_1_3\n", reg->srcmod); + This->state = E_INVALIDARG; + return; + } + token |= d3d9_srcmod(reg->srcmod); + put_dword(buffer, token); +} + +static void ps_1_0123_dstreg(struct bc_writer *This, const struct shader_reg *reg, + struct bytecode_buffer *buffer, + DWORD shift, DWORD mod) { + DWORD token = (1 << 31); /* Bit 31 of registers is 1 */ + + if(reg->rel_reg) { + WARN("Relative addressing not supported for destination registers\n"); + This->state = E_INVALIDARG; + return; + } + + switch(reg->type) { + case BWRITERSPR_TEMP: + token |= map_ps13_temp(This, reg); + break; + + /* texkill uses the input register as a destination parameter */ + case BWRITERSPR_INPUT: + token |= map_ps_input(This, reg); + break; + + default: + WARN("Invalid dest register type for 1.x pshader\n"); + This->state = E_INVALIDARG; + return; + } + + token |= (shift << D3DSP_DSTSHIFT_SHIFT) & D3DSP_DSTSHIFT_MASK; + token |= d3d9_dstmod(mod); + + token |= d3d9_writemask(reg->u.writemask); + put_dword(buffer, token); +} + +/* The length of an instruction consists of the destination register (if any), + * the number of source registers, the number of address registers used for + * indirect addressing, and optionally the predicate register + */ +static DWORD instrlen(const struct instruction *instr, unsigned int srcs, unsigned int dsts) { + unsigned int i; + DWORD ret = srcs + dsts + (instr->has_predicate ? 1 : 0); + + if(dsts){ + if(instr->dst.rel_reg) ret++; + } + for(i = 0; i < srcs; i++) { + if(instr->src[i].rel_reg) ret++; + } + return ret; +} + +static void sm_1_x_opcode(struct bc_writer *This, + const struct instruction *instr, + DWORD token, struct bytecode_buffer *buffer) { + /* In sm_1_x instruction length isn't encoded */ + if(instr->coissue){ + token |= D3DSI_COISSUE; + } + put_dword(buffer, token); +} + +static void instr_handler(struct bc_writer *This, + const struct instruction *instr, + struct bytecode_buffer *buffer) { + DWORD token = d3d9_opcode(instr->opcode); + + This->funcs->opcode(This, instr, token, buffer); + if(instr->has_dst) This->funcs->dstreg(This, &instr->dst, buffer, instr->shift, instr->dstmod); + write_srcregs(This, instr, buffer); +} + +static const struct instr_handler_table vs_1_x_handlers[] = { + {BWRITERSIO_ADD, instr_handler}, + {BWRITERSIO_NOP, instr_handler}, + {BWRITERSIO_MOV, instr_handler}, + {BWRITERSIO_SUB, instr_handler}, + {BWRITERSIO_MAD, instr_handler}, + {BWRITERSIO_MUL, instr_handler}, + {BWRITERSIO_RCP, instr_handler}, + {BWRITERSIO_RSQ, instr_handler}, + {BWRITERSIO_DP3, instr_handler}, + {BWRITERSIO_DP4, instr_handler}, + {BWRITERSIO_MIN, instr_handler}, + {BWRITERSIO_MAX, instr_handler}, + {BWRITERSIO_SLT, instr_handler}, + {BWRITERSIO_SGE, instr_handler}, + {BWRITERSIO_EXP, instr_handler}, + {BWRITERSIO_LOG, instr_handler}, + {BWRITERSIO_EXPP, instr_handler}, + {BWRITERSIO_LOGP, instr_handler}, + {BWRITERSIO_DST, instr_handler}, + {BWRITERSIO_FRC, instr_handler}, + {BWRITERSIO_M4x4, instr_handler}, + {BWRITERSIO_M4x3, instr_handler}, + {BWRITERSIO_M3x4, instr_handler}, + {BWRITERSIO_M3x3, instr_handler}, + {BWRITERSIO_M3x2, instr_handler}, + {BWRITERSIO_LIT, instr_handler}, + + {BWRITERSIO_END, NULL}, /* Sentinel value, it signals + the end of the list */ +}; + +static const struct bytecode_backend vs_1_x_backend = { + vs_1_x_header, + end, + vs_1_x_srcreg, + vs_12_dstreg, + sm_1_x_opcode, + vs_1_x_handlers +}; + +static void instr_ps_1_0123_texld(struct bc_writer *This, + const struct instruction *instr, + struct bytecode_buffer *buffer) { + DWORD idx; + struct shader_reg reg; + DWORD swizzlemask; + + if(instr->src[1].type != BWRITERSPR_SAMPLER || + instr->src[1].regnum > 3) { + WARN("Unsupported sampler type %u regnum %u\n", + instr->src[1].type, instr->src[1].regnum); + This->state = E_INVALIDARG; + return; + } else if(instr->dst.type != BWRITERSPR_TEMP) { + WARN("Can only sample into a temp register\n"); + This->state = E_INVALIDARG; + return; + } + + idx = instr->src[1].regnum; + if((idx == 0 && instr->dst.regnum != T0_REG) || + (idx == 1 && instr->dst.regnum != T1_REG) || + (idx == 2 && instr->dst.regnum != T2_REG) || + (idx == 3 && instr->dst.regnum != T3_REG)) { + WARN("Sampling from sampler s%u to register r%u is not possible in ps_1_x\n", + idx, instr->dst.regnum); + This->state = E_INVALIDARG; + return; + } + if(instr->src[0].type == BWRITERSPR_INPUT) { + /* A simple non-dependent read tex instruction */ + if(instr->src[0].regnum != This->t_regnum[idx]) { + WARN("Cannot sample from s%u with texture address data from interpolator %u\n", + idx, instr->src[0].regnum); + This->state = E_INVALIDARG; + return; + } + This->funcs->opcode(This, instr, D3DSIO_TEX & D3DSI_OPCODE_MASK, buffer); + + /* map the temp dstreg to the ps_1_3 texture temporary register */ + This->funcs->dstreg(This, &instr->dst, buffer, instr->shift, instr->dstmod); + } else if(instr->src[0].type == BWRITERSPR_TEMP) { + + swizzlemask = (3 << BWRITERVS_SWIZZLE_SHIFT) | + (3 << (BWRITERVS_SWIZZLE_SHIFT + 2)) | + (3 << (BWRITERVS_SWIZZLE_SHIFT + 4)); + if((instr->src[0].u.swizzle & swizzlemask) == (BWRITERVS_X_X | BWRITERVS_Y_Y | BWRITERVS_Z_Z)) { + TRACE("writing texreg2rgb\n"); + This->funcs->opcode(This, instr, D3DSIO_TEXREG2RGB & D3DSI_OPCODE_MASK, buffer); + } else if(instr->src[0].u.swizzle == (BWRITERVS_X_W | BWRITERVS_Y_X | BWRITERVS_Z_X | BWRITERVS_W_X)) { + TRACE("writing texreg2ar\n"); + This->funcs->opcode(This, instr, D3DSIO_TEXREG2AR & D3DSI_OPCODE_MASK, buffer); + } else if(instr->src[0].u.swizzle == (BWRITERVS_X_Y | BWRITERVS_Y_Z | BWRITERVS_Z_Z | BWRITERVS_W_Z)) { + TRACE("writing texreg2gb\n"); + This->funcs->opcode(This, instr, D3DSIO_TEXREG2GB & D3DSI_OPCODE_MASK, buffer); + } else { + WARN("Unsupported src addr swizzle in dependent texld: 0x%08x\n", instr->src[0].u.swizzle); + This->state = E_INVALIDARG; + return; + } + + /* Dst and src reg can be mapped normally. Both registers are temporary registers in the + * source shader and have to be mapped to the temporary form of the texture registers. However, + * the src reg doesn't have a swizzle + */ + This->funcs->dstreg(This, &instr->dst, buffer, instr->shift, instr->dstmod); + reg = instr->src[0]; + reg.u.swizzle = BWRITERVS_NOSWIZZLE; + This->funcs->srcreg(This, ®, buffer); + } else { + WARN("Invalid address data source register\n"); + This->state = E_INVALIDARG; + return; + } +} + +static void instr_ps_1_0123_mov(struct bc_writer *This, + const struct instruction *instr, + struct bytecode_buffer *buffer) { + DWORD token = D3DSIO_MOV & D3DSI_OPCODE_MASK; + + if(instr->dst.type == BWRITERSPR_TEMP && instr->src[0].type == BWRITERSPR_INPUT) { + if((instr->dst.regnum == T0_REG && instr->src[0].regnum == This->t_regnum[0]) || + (instr->dst.regnum == T1_REG && instr->src[0].regnum == This->t_regnum[1]) || + (instr->dst.regnum == T2_REG && instr->src[0].regnum == This->t_regnum[2]) || + (instr->dst.regnum == T3_REG && instr->src[0].regnum == This->t_regnum[3])) { + if(instr->dstmod & BWRITERSPDM_SATURATE) { + This->funcs->opcode(This, instr, D3DSIO_TEXCOORD & D3DSI_OPCODE_MASK, buffer); + /* Remove the SATURATE flag, it's implicit to the instruction */ + This->funcs->dstreg(This, &instr->dst, buffer, instr->shift, instr->dstmod & (~BWRITERSPDM_SATURATE)); + return; + } else { + WARN("A varying -> temp copy is only supported with the SATURATE modifier in <=ps_1_3\n"); + This->state = E_INVALIDARG; + return; + } + } else if(instr->src[0].regnum == This->v_regnum[0] || + instr->src[0].regnum == This->v_regnum[1]) { + /* Handled by the normal mov below. Just drop out of the if condition */ + } else { + WARN("Unsupported varying -> temp mov in <= ps_1_3\n"); + This->state = E_INVALIDARG; + return; + } + } + + This->funcs->opcode(This, instr, token, buffer); + This->funcs->dstreg(This, &instr->dst, buffer, instr->shift, instr->dstmod); + This->funcs->srcreg(This, &instr->src[0], buffer); +} + +static const struct instr_handler_table ps_1_0123_handlers[] = { + {BWRITERSIO_ADD, instr_handler}, + {BWRITERSIO_NOP, instr_handler}, + {BWRITERSIO_MOV, instr_ps_1_0123_mov}, + {BWRITERSIO_SUB, instr_handler}, + {BWRITERSIO_MAD, instr_handler}, + {BWRITERSIO_MUL, instr_handler}, + {BWRITERSIO_DP3, instr_handler}, + {BWRITERSIO_DP4, instr_handler}, + {BWRITERSIO_LRP, instr_handler}, + + /* pshader instructions */ + {BWRITERSIO_CND, instr_handler}, + {BWRITERSIO_CMP, instr_handler}, + {BWRITERSIO_TEXKILL, instr_handler}, + {BWRITERSIO_TEX, instr_ps_1_0123_texld}, + {BWRITERSIO_TEXBEM, instr_handler}, + {BWRITERSIO_TEXBEML, instr_handler}, + {BWRITERSIO_TEXM3x2PAD, instr_handler}, + {BWRITERSIO_TEXM3x3PAD, instr_handler}, + {BWRITERSIO_TEXM3x3SPEC, instr_handler}, + {BWRITERSIO_TEXM3x3VSPEC, instr_handler}, + {BWRITERSIO_TEXM3x3TEX, instr_handler}, + {BWRITERSIO_TEXM3x3, instr_handler}, + {BWRITERSIO_TEXM3x2DEPTH, instr_handler}, + {BWRITERSIO_TEXM3x2TEX, instr_handler}, + {BWRITERSIO_TEXDP3, instr_handler}, + {BWRITERSIO_TEXDP3TEX, instr_handler}, + {BWRITERSIO_END, NULL}, +}; + +static const struct bytecode_backend ps_1_0123_backend = { + ps_1_x_header, + end, + ps_1_0123_srcreg, + ps_1_0123_dstreg, + sm_1_x_opcode, + ps_1_0123_handlers +}; + +static void ps_1_4_srcreg(struct bc_writer *This, const struct shader_reg *reg, + struct bytecode_buffer *buffer) { + DWORD token = (1 << 31); /* Bit 31 of registers is 1 */ + if(reg->rel_reg) { + WARN("Relative addressing not supported in <= ps_3_0\n"); + This->state = E_INVALIDARG; + return; + } + + switch(reg->type) { + case BWRITERSPR_INPUT: + token |= map_ps_input(This, reg); + break; + + /* Can be mapped 1:1 */ + case BWRITERSPR_TEMP: + case BWRITERSPR_CONST: + token |= (reg->type << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= reg->regnum & D3DSP_REGNUM_MASK; /* No shift */ + break; + + default: + WARN("Invalid register type for ps_1_4 shader\n"); + This->state = E_INVALIDARG; + return; + } + + token |= d3d9_swizzle(reg->u.swizzle) & D3DVS_SWIZZLE_MASK; /* already shifted */ + + if(reg->srcmod == BWRITERSPSM_ABS || reg->srcmod == BWRITERSPSM_ABSNEG || + reg->srcmod == BWRITERSPSM_NOT) { + WARN("Invalid source modifier %u for ps_1_4\n", reg->srcmod); + This->state = E_INVALIDARG; + return; + } + token |= d3d9_srcmod(reg->srcmod); + put_dword(buffer, token); +} + +static void ps_1_4_dstreg(struct bc_writer *This, const struct shader_reg *reg, + struct bytecode_buffer *buffer, + DWORD shift, DWORD mod) { + DWORD token = (1 << 31); /* Bit 31 of registers is 1 */ + + if(reg->rel_reg) { + WARN("Relative addressing not supported for destination registers\n"); + This->state = E_INVALIDARG; + return; + } + + switch(reg->type) { + case BWRITERSPR_TEMP: /* 1:1 mapping */ + token |= (reg->type << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= reg->regnum & D3DSP_REGNUM_MASK; /* No shift */ + break; + + /* For texkill */ + case BWRITERSPR_INPUT: + token |= map_ps_input(This, reg); + break; + + default: + WARN("Invalid dest register type for 1.x pshader\n"); + This->state = E_INVALIDARG; + return; + } + + token |= (shift << D3DSP_DSTSHIFT_SHIFT) & D3DSP_DSTSHIFT_MASK; + token |= d3d9_dstmod(mod); + + token |= d3d9_writemask(reg->u.writemask); + put_dword(buffer, token); +} + +static void instr_ps_1_4_mov(struct bc_writer *This, + const struct instruction *instr, + struct bytecode_buffer *buffer) { + DWORD token = D3DSIO_MOV & D3DSI_OPCODE_MASK; + + if(instr->dst.type == BWRITERSPR_TEMP && instr->src[0].type == BWRITERSPR_INPUT) { + if(instr->src[0].regnum == This->t_regnum[0] || + instr->src[0].regnum == This->t_regnum[1] || + instr->src[0].regnum == This->t_regnum[2] || + instr->src[0].regnum == This->t_regnum[3] || + instr->src[0].regnum == This->t_regnum[4] || + instr->src[0].regnum == This->t_regnum[5]) { + /* Similar to a regular mov, but a different opcode */ + token = D3DSIO_TEXCOORD & D3DSI_OPCODE_MASK; + } else if(instr->src[0].regnum == This->v_regnum[0] || + instr->src[0].regnum == This->v_regnum[1]) { + /* Handled by the normal mov below. Just drop out of the if condition */ + } else { + WARN("Unsupported varying -> temp mov in ps_1_4\n"); + This->state = E_INVALIDARG; + return; + } + } + + This->funcs->opcode(This, instr, token, buffer); + This->funcs->dstreg(This, &instr->dst, buffer, instr->shift, instr->dstmod); + This->funcs->srcreg(This, &instr->src[0], buffer); +} + +static void instr_ps_1_4_texld(struct bc_writer *This, + const struct instruction *instr, + struct bytecode_buffer *buffer) { + if(instr->src[1].type != BWRITERSPR_SAMPLER || + instr->src[1].regnum > 5) { + WARN("Unsupported sampler type %u regnum %u\n", + instr->src[1].type, instr->src[1].regnum); + This->state = E_INVALIDARG; + return; + } else if(instr->dst.type != BWRITERSPR_TEMP) { + WARN("Can only sample into a temp register\n"); + This->state = E_INVALIDARG; + return; + } + + if(instr->src[1].regnum != instr->dst.regnum) { + WARN("Sampling from sampler s%u to register r%u is not possible in ps_1_4\n", + instr->src[1].regnum, instr->dst.regnum); + This->state = E_INVALIDARG; + return; + } + + This->funcs->opcode(This, instr, D3DSIO_TEX & D3DSI_OPCODE_MASK, buffer); + This->funcs->dstreg(This, &instr->dst, buffer, instr->shift, instr->dstmod); + This->funcs->srcreg(This, &instr->src[0], buffer); +} + +static const struct instr_handler_table ps_1_4_handlers[] = { + {BWRITERSIO_ADD, instr_handler}, + {BWRITERSIO_NOP, instr_handler}, + {BWRITERSIO_MOV, instr_ps_1_4_mov}, + {BWRITERSIO_SUB, instr_handler}, + {BWRITERSIO_MAD, instr_handler}, + {BWRITERSIO_MUL, instr_handler}, + {BWRITERSIO_DP3, instr_handler}, + {BWRITERSIO_DP4, instr_handler}, + {BWRITERSIO_LRP, instr_handler}, + + /* pshader instructions */ + {BWRITERSIO_CND, instr_handler}, + {BWRITERSIO_CMP, instr_handler}, + {BWRITERSIO_TEXKILL, instr_handler}, + {BWRITERSIO_TEX, instr_ps_1_4_texld}, + {BWRITERSIO_TEXDEPTH, instr_handler}, + {BWRITERSIO_BEM, instr_handler}, + + {BWRITERSIO_PHASE, instr_handler}, + {BWRITERSIO_END, NULL}, +}; + +static const struct bytecode_backend ps_1_4_backend = { + ps_1_4_header, + end, + ps_1_4_srcreg, + ps_1_4_dstreg, + sm_1_x_opcode, + ps_1_4_handlers +}; + +static void write_constB(const struct bwriter_shader *shader, struct bytecode_buffer *buffer, BOOL len) { + write_const(shader->constB, shader->num_cb, D3DSIO_DEFB, D3DSPR_CONSTBOOL, buffer, len); +} + +static void write_constI(const struct bwriter_shader *shader, struct bytecode_buffer *buffer, BOOL len) { + write_const(shader->constI, shader->num_ci, D3DSIO_DEFI, D3DSPR_CONSTINT, buffer, len); +} + +static void vs_2_header(struct bc_writer *This, + const struct bwriter_shader *shader, + struct bytecode_buffer *buffer) { + HRESULT hr; + + hr = vs_find_builtin_varyings(This, shader); + if(FAILED(hr)) { + This->state = hr; + return; + } + + write_declarations(This, buffer, TRUE, shader->inputs, shader->num_inputs, BWRITERSPR_INPUT); + write_constF(shader, buffer, TRUE); + write_constB(shader, buffer, TRUE); + write_constI(shader, buffer, TRUE); +} + +static void vs_2_srcreg(struct bc_writer *This, + const struct shader_reg *reg, + struct bytecode_buffer *buffer) { + DWORD token = (1 << 31); /* Bit 31 of registers is 1 */ + DWORD has_swizzle; + DWORD component; + DWORD d3d9reg; + + switch(reg->type) { + case BWRITERSPR_OUTPUT: + /* Map the swizzle to a writemask, the format expected + by map_vs_output + */ + switch(reg->u.swizzle) { + case BWRITERVS_SWIZZLE_X: + component = BWRITERSP_WRITEMASK_0; + break; + case BWRITERVS_SWIZZLE_Y: + component = BWRITERSP_WRITEMASK_1; + break; + case BWRITERVS_SWIZZLE_Z: + component = BWRITERSP_WRITEMASK_2; + break; + case BWRITERVS_SWIZZLE_W: + component = BWRITERSP_WRITEMASK_3; + break; + default: + component = 0; + } + token |= map_vs_output(This, reg->regnum, component, &has_swizzle); + break; + + case BWRITERSPR_RASTOUT: + case BWRITERSPR_ATTROUT: + /* These registers are mapped to input and output regs. They can be encoded in the bytecode, + * but are unexpected. If we hit this path it might be due to an error. + */ + FIXME("Unexpected register type %u\n", reg->type); + /* drop through */ + case BWRITERSPR_INPUT: + case BWRITERSPR_TEMP: + case BWRITERSPR_CONST: + case BWRITERSPR_ADDR: + case BWRITERSPR_CONSTINT: + case BWRITERSPR_CONSTBOOL: + case BWRITERSPR_LABEL: + d3d9reg = d3d9_register(reg->type); + token |= (d3d9reg << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= (d3d9reg << D3DSP_REGTYPE_SHIFT2) & D3DSP_REGTYPE_MASK2; + token |= reg->regnum & D3DSP_REGNUM_MASK; /* No shift */ + break; + + case BWRITERSPR_LOOP: + if(reg->regnum != 0) { + WARN("Only regnum 0 is supported for the loop index register in vs_2_0\n"); + This->state = E_INVALIDARG; + return; + } + token |= (D3DSPR_LOOP << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= (D3DSPR_LOOP << D3DSP_REGTYPE_SHIFT2) & D3DSP_REGTYPE_MASK2; + token |= 0 & D3DSP_REGNUM_MASK; /* No shift */ + break; + + case BWRITERSPR_PREDICATE: + if(This->version != BWRITERVS_VERSION(2, 1)){ + WARN("Predicate register is allowed only in vs_2_x\n"); + This->state = E_INVALIDARG; + return; + } + if(reg->regnum > 0) { + WARN("Only predicate register 0 is supported\n"); + This->state = E_INVALIDARG; + return; + } + token |= (D3DSPR_PREDICATE << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= (D3DSPR_PREDICATE << D3DSP_REGTYPE_SHIFT2) & D3DSP_REGTYPE_MASK2; + token |= 0 & D3DSP_REGNUM_MASK; /* No shift */ + + break; + + default: + WARN("Invalid register type for 2.0 vshader\n"); + This->state = E_INVALIDARG; + return; + } + + token |= d3d9_swizzle(reg->u.swizzle) & D3DVS_SWIZZLE_MASK; /* already shifted */ + + token |= d3d9_srcmod(reg->srcmod); + + if(reg->rel_reg) + token |= D3DVS_ADDRMODE_RELATIVE & D3DVS_ADDRESSMODE_MASK; + + put_dword(buffer, token); + + /* vs_2_0 and newer write the register containing the index explicitly in the + * binary code + */ + if(token & D3DVS_ADDRMODE_RELATIVE) + vs_2_srcreg(This, reg->rel_reg, buffer); +} + +static void sm_2_opcode(struct bc_writer *This, + const struct instruction *instr, + DWORD token, struct bytecode_buffer *buffer) { + /* From sm 2 onwards instruction length is encoded in the opcode field */ + int dsts = instr->has_dst ? 1 : 0; + token |= instrlen(instr, instr->num_srcs, dsts) << D3DSI_INSTLENGTH_SHIFT; + if(instr->comptype) + token |= (d3d9_comparetype(instr->comptype) << 16) & (0xf << 16); + if(instr->has_predicate) + token |= D3DSHADER_INSTRUCTION_PREDICATED; + put_dword(buffer,token); +} + +static const struct instr_handler_table vs_2_0_handlers[] = { + {BWRITERSIO_ADD, instr_handler}, + {BWRITERSIO_NOP, instr_handler}, + {BWRITERSIO_MOV, instr_handler}, + {BWRITERSIO_SUB, instr_handler}, + {BWRITERSIO_MAD, instr_handler}, + {BWRITERSIO_MUL, instr_handler}, + {BWRITERSIO_RCP, instr_handler}, + {BWRITERSIO_RSQ, instr_handler}, + {BWRITERSIO_DP3, instr_handler}, + {BWRITERSIO_DP4, instr_handler}, + {BWRITERSIO_MIN, instr_handler}, + {BWRITERSIO_MAX, instr_handler}, + {BWRITERSIO_SLT, instr_handler}, + {BWRITERSIO_SGE, instr_handler}, + {BWRITERSIO_ABS, instr_handler}, + {BWRITERSIO_EXP, instr_handler}, + {BWRITERSIO_LOG, instr_handler}, + {BWRITERSIO_EXPP, instr_handler}, + {BWRITERSIO_LOGP, instr_handler}, + {BWRITERSIO_DST, instr_handler}, + {BWRITERSIO_LRP, instr_handler}, + {BWRITERSIO_FRC, instr_handler}, + {BWRITERSIO_CRS, instr_handler}, + {BWRITERSIO_SGN, instr_handler}, + {BWRITERSIO_NRM, instr_handler}, + {BWRITERSIO_SINCOS, instr_handler}, + {BWRITERSIO_M4x4, instr_handler}, + {BWRITERSIO_M4x3, instr_handler}, + {BWRITERSIO_M3x4, instr_handler}, + {BWRITERSIO_M3x3, instr_handler}, + {BWRITERSIO_M3x2, instr_handler}, + {BWRITERSIO_LIT, instr_handler}, + {BWRITERSIO_POW, instr_handler}, + {BWRITERSIO_MOVA, instr_handler}, + + {BWRITERSIO_CALL, instr_handler}, + {BWRITERSIO_CALLNZ, instr_handler}, + {BWRITERSIO_REP, instr_handler}, + {BWRITERSIO_ENDREP, instr_handler}, + {BWRITERSIO_IF, instr_handler}, + {BWRITERSIO_LABEL, instr_handler}, + {BWRITERSIO_ELSE, instr_handler}, + {BWRITERSIO_ENDIF, instr_handler}, + {BWRITERSIO_LOOP, instr_handler}, + {BWRITERSIO_RET, instr_handler}, + {BWRITERSIO_ENDLOOP, instr_handler}, + + {BWRITERSIO_END, NULL}, +}; + +static const struct bytecode_backend vs_2_0_backend = { + vs_2_header, + end, + vs_2_srcreg, + vs_12_dstreg, + sm_2_opcode, + vs_2_0_handlers +}; + +static const struct instr_handler_table vs_2_x_handlers[] = { + {BWRITERSIO_ADD, instr_handler}, + {BWRITERSIO_NOP, instr_handler}, + {BWRITERSIO_MOV, instr_handler}, + {BWRITERSIO_SUB, instr_handler}, + {BWRITERSIO_MAD, instr_handler}, + {BWRITERSIO_MUL, instr_handler}, + {BWRITERSIO_RCP, instr_handler}, + {BWRITERSIO_RSQ, instr_handler}, + {BWRITERSIO_DP3, instr_handler}, + {BWRITERSIO_DP4, instr_handler}, + {BWRITERSIO_MIN, instr_handler}, + {BWRITERSIO_MAX, instr_handler}, + {BWRITERSIO_SLT, instr_handler}, + {BWRITERSIO_SGE, instr_handler}, + {BWRITERSIO_ABS, instr_handler}, + {BWRITERSIO_EXP, instr_handler}, + {BWRITERSIO_LOG, instr_handler}, + {BWRITERSIO_EXPP, instr_handler}, + {BWRITERSIO_LOGP, instr_handler}, + {BWRITERSIO_DST, instr_handler}, + {BWRITERSIO_LRP, instr_handler}, + {BWRITERSIO_FRC, instr_handler}, + {BWRITERSIO_CRS, instr_handler}, + {BWRITERSIO_SGN, instr_handler}, + {BWRITERSIO_NRM, instr_handler}, + {BWRITERSIO_SINCOS, instr_handler}, + {BWRITERSIO_M4x4, instr_handler}, + {BWRITERSIO_M4x3, instr_handler}, + {BWRITERSIO_M3x4, instr_handler}, + {BWRITERSIO_M3x3, instr_handler}, + {BWRITERSIO_M3x2, instr_handler}, + {BWRITERSIO_LIT, instr_handler}, + {BWRITERSIO_POW, instr_handler}, + {BWRITERSIO_MOVA, instr_handler}, + + {BWRITERSIO_CALL, instr_handler}, + {BWRITERSIO_CALLNZ, instr_handler}, + {BWRITERSIO_REP, instr_handler}, + {BWRITERSIO_ENDREP, instr_handler}, + {BWRITERSIO_IF, instr_handler}, + {BWRITERSIO_LABEL, instr_handler}, + {BWRITERSIO_IFC, instr_handler}, + {BWRITERSIO_ELSE, instr_handler}, + {BWRITERSIO_ENDIF, instr_handler}, + {BWRITERSIO_BREAK, instr_handler}, + {BWRITERSIO_BREAKC, instr_handler}, + {BWRITERSIO_LOOP, instr_handler}, + {BWRITERSIO_RET, instr_handler}, + {BWRITERSIO_ENDLOOP, instr_handler}, + + {BWRITERSIO_SETP, instr_handler}, + {BWRITERSIO_BREAKP, instr_handler}, + + {BWRITERSIO_END, NULL}, +}; + +static const struct bytecode_backend vs_2_x_backend = { + vs_2_header, + end, + vs_2_srcreg, + vs_12_dstreg, + sm_2_opcode, + vs_2_x_handlers +}; + +static void write_samplers(const struct bwriter_shader *shader, struct bytecode_buffer *buffer) { + DWORD i; + DWORD instr_dcl = D3DSIO_DCL | (2 << D3DSI_INSTLENGTH_SHIFT); + DWORD token; + const DWORD reg = (1<<31) | + ((D3DSPR_SAMPLER << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK) | + ((D3DSPR_SAMPLER << D3DSP_REGTYPE_SHIFT2) & D3DSP_REGTYPE_MASK2) | + D3DSP_WRITEMASK_ALL; + + for(i = 0; i < shader->num_samplers; i++) { + /* Write the DCL instruction */ + put_dword(buffer, instr_dcl); + token = (1<<31); + /* Already shifted */ + token |= (d3d9_sampler(shader->samplers[i].type)) & D3DSP_TEXTURETYPE_MASK; + put_dword(buffer, token); + token = reg | (shader->samplers[i].regnum & D3DSP_REGNUM_MASK); + token |= d3d9_dstmod(shader->samplers[i].mod); + put_dword(buffer, token); + } +} + +static void ps_2_header(struct bc_writer *This, const struct bwriter_shader *shader, struct bytecode_buffer *buffer) { + HRESULT hr = find_ps_builtin_semantics(This, shader, 8); + if(FAILED(hr)) { + This->state = hr; + return; + } + + write_declarations(This, buffer, TRUE, shader->inputs, shader->num_inputs, BWRITERSPR_INPUT); + write_samplers(shader, buffer); + write_constF(shader, buffer, TRUE); + write_constB(shader, buffer, TRUE); + write_constI(shader, buffer, TRUE); +} + +static void ps_2_srcreg(struct bc_writer *This, + const struct shader_reg *reg, + struct bytecode_buffer *buffer) { + DWORD token = (1 << 31); /* Bit 31 of registers is 1 */ + DWORD d3d9reg; + if(reg->rel_reg) { + WARN("Relative addressing not supported in <= ps_3_0\n"); + This->state = E_INVALIDARG; + return; + } + + switch(reg->type) { + case BWRITERSPR_INPUT: + token |= map_ps_input(This, reg); + break; + + /* Can be mapped 1:1 */ + case BWRITERSPR_TEMP: + case BWRITERSPR_CONST: + case BWRITERSPR_COLOROUT: + case BWRITERSPR_CONSTBOOL: + case BWRITERSPR_CONSTINT: + case BWRITERSPR_SAMPLER: + case BWRITERSPR_LABEL: + case BWRITERSPR_DEPTHOUT: + d3d9reg = d3d9_register(reg->type); + token |= (d3d9reg << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= (d3d9reg << D3DSP_REGTYPE_SHIFT2) & D3DSP_REGTYPE_MASK2; + token |= reg->regnum & D3DSP_REGNUM_MASK; /* No shift */ + break; + + case BWRITERSPR_PREDICATE: + if(This->version != BWRITERPS_VERSION(2, 1)){ + WARN("Predicate register not supported in ps_2_0\n"); + This->state = E_INVALIDARG; + } + if(reg->regnum) { + WARN("Predicate register with regnum %u not supported\n", + reg->regnum); + This->state = E_INVALIDARG; + } + token |= (D3DSPR_PREDICATE << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= (D3DSPR_PREDICATE << D3DSP_REGTYPE_SHIFT2) & D3DSP_REGTYPE_MASK2; + token |= 0 & D3DSP_REGNUM_MASK; /* No shift */ + break; + + default: + WARN("Invalid register type for ps_2_0 shader\n"); + This->state = E_INVALIDARG; + return; + } + + token |= d3d9_swizzle(reg->u.swizzle) & D3DVS_SWIZZLE_MASK; /* already shifted */ + + token |= d3d9_srcmod(reg->srcmod); + put_dword(buffer, token); +} + +static void ps_2_0_dstreg(struct bc_writer *This, + const struct shader_reg *reg, + struct bytecode_buffer *buffer, + DWORD shift, DWORD mod) { + DWORD token = (1 << 31); /* Bit 31 of registers is 1 */ + DWORD d3d9reg; + + if(reg->rel_reg) { + WARN("Relative addressing not supported for destination registers\n"); + This->state = E_INVALIDARG; + return; + } + + switch(reg->type) { + case BWRITERSPR_TEMP: /* 1:1 mapping */ + case BWRITERSPR_COLOROUT: + case BWRITERSPR_DEPTHOUT: + d3d9reg = d3d9_register(reg->type); + token |= (d3d9reg << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= (d3d9reg << D3DSP_REGTYPE_SHIFT2) & D3DSP_REGTYPE_MASK2; + token |= reg->regnum & D3DSP_REGNUM_MASK; /* No shift */ + break; + + case BWRITERSPR_PREDICATE: + if(This->version != BWRITERPS_VERSION(2, 1)){ + WARN("Predicate register not supported in ps_2_0\n"); + This->state = E_INVALIDARG; + } + token |= (D3DSPR_PREDICATE << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= (D3DSPR_PREDICATE << D3DSP_REGTYPE_SHIFT2) & D3DSP_REGTYPE_MASK2; + token |= reg->regnum & D3DSP_REGNUM_MASK; /* No shift */ + break; + + /* texkill uses the input register as a destination parameter */ + case BWRITERSPR_INPUT: + token |= map_ps_input(This, reg); + break; + + default: + WARN("Invalid dest register type for 2.x pshader\n"); + This->state = E_INVALIDARG; + return; + } + + token |= (shift << D3DSP_DSTSHIFT_SHIFT) & D3DSP_DSTSHIFT_MASK; + token |= d3d9_dstmod(mod); + + token |= d3d9_writemask(reg->u.writemask); + put_dword(buffer, token); +} + +static const struct instr_handler_table ps_2_0_handlers[] = { + {BWRITERSIO_ADD, instr_handler}, + {BWRITERSIO_NOP, instr_handler}, + {BWRITERSIO_MOV, instr_handler}, + {BWRITERSIO_SUB, instr_handler}, + {BWRITERSIO_MAD, instr_handler}, + {BWRITERSIO_MUL, instr_handler}, + {BWRITERSIO_RCP, instr_handler}, + {BWRITERSIO_RSQ, instr_handler}, + {BWRITERSIO_DP3, instr_handler}, + {BWRITERSIO_DP4, instr_handler}, + {BWRITERSIO_MIN, instr_handler}, + {BWRITERSIO_MAX, instr_handler}, + {BWRITERSIO_ABS, instr_handler}, + {BWRITERSIO_EXP, instr_handler}, + {BWRITERSIO_LOG, instr_handler}, + {BWRITERSIO_EXPP, instr_handler}, + {BWRITERSIO_LOGP, instr_handler}, + {BWRITERSIO_LRP, instr_handler}, + {BWRITERSIO_FRC, instr_handler}, + {BWRITERSIO_CRS, instr_handler}, + {BWRITERSIO_NRM, instr_handler}, + {BWRITERSIO_SINCOS, instr_handler}, + {BWRITERSIO_M4x4, instr_handler}, + {BWRITERSIO_M4x3, instr_handler}, + {BWRITERSIO_M3x4, instr_handler}, + {BWRITERSIO_M3x3, instr_handler}, + {BWRITERSIO_M3x2, instr_handler}, + {BWRITERSIO_POW, instr_handler}, + {BWRITERSIO_DP2ADD, instr_handler}, + {BWRITERSIO_CMP, instr_handler}, + + {BWRITERSIO_TEX, instr_handler}, + {BWRITERSIO_TEXLDP, instr_handler}, + {BWRITERSIO_TEXLDB, instr_handler}, + {BWRITERSIO_TEXKILL, instr_handler}, + + {BWRITERSIO_END, NULL}, +}; + +static const struct bytecode_backend ps_2_0_backend = { + ps_2_header, + end, + ps_2_srcreg, + ps_2_0_dstreg, + sm_2_opcode, + ps_2_0_handlers +}; + +static const struct instr_handler_table ps_2_x_handlers[] = { + {BWRITERSIO_ADD, instr_handler}, + {BWRITERSIO_NOP, instr_handler}, + {BWRITERSIO_MOV, instr_handler}, + {BWRITERSIO_SUB, instr_handler}, + {BWRITERSIO_MAD, instr_handler}, + {BWRITERSIO_MUL, instr_handler}, + {BWRITERSIO_RCP, instr_handler}, + {BWRITERSIO_RSQ, instr_handler}, + {BWRITERSIO_DP3, instr_handler}, + {BWRITERSIO_DP4, instr_handler}, + {BWRITERSIO_MIN, instr_handler}, + {BWRITERSIO_MAX, instr_handler}, + {BWRITERSIO_ABS, instr_handler}, + {BWRITERSIO_EXP, instr_handler}, + {BWRITERSIO_LOG, instr_handler}, + {BWRITERSIO_EXPP, instr_handler}, + {BWRITERSIO_LOGP, instr_handler}, + {BWRITERSIO_LRP, instr_handler}, + {BWRITERSIO_FRC, instr_handler}, + {BWRITERSIO_CRS, instr_handler}, + {BWRITERSIO_NRM, instr_handler}, + {BWRITERSIO_SINCOS, instr_handler}, + {BWRITERSIO_M4x4, instr_handler}, + {BWRITERSIO_M4x3, instr_handler}, + {BWRITERSIO_M3x4, instr_handler}, + {BWRITERSIO_M3x3, instr_handler}, + {BWRITERSIO_M3x2, instr_handler}, + {BWRITERSIO_POW, instr_handler}, + {BWRITERSIO_DP2ADD, instr_handler}, + {BWRITERSIO_CMP, instr_handler}, + + {BWRITERSIO_CALL, instr_handler}, + {BWRITERSIO_CALLNZ, instr_handler}, + {BWRITERSIO_REP, instr_handler}, + {BWRITERSIO_ENDREP, instr_handler}, + {BWRITERSIO_IF, instr_handler}, + {BWRITERSIO_LABEL, instr_handler}, + {BWRITERSIO_IFC, instr_handler}, + {BWRITERSIO_ELSE, instr_handler}, + {BWRITERSIO_ENDIF, instr_handler}, + {BWRITERSIO_BREAK, instr_handler}, + {BWRITERSIO_BREAKC, instr_handler}, + {BWRITERSIO_RET, instr_handler}, + + {BWRITERSIO_TEX, instr_handler}, + {BWRITERSIO_TEXLDP, instr_handler}, + {BWRITERSIO_TEXLDB, instr_handler}, + {BWRITERSIO_TEXKILL, instr_handler}, + {BWRITERSIO_DSX, instr_handler}, + {BWRITERSIO_DSY, instr_handler}, + + {BWRITERSIO_SETP, instr_handler}, + {BWRITERSIO_BREAKP, instr_handler}, + + {BWRITERSIO_TEXLDD, instr_handler}, + + {BWRITERSIO_END, NULL}, +}; + +static const struct bytecode_backend ps_2_x_backend = { + ps_2_header, + end, + ps_2_srcreg, + ps_2_0_dstreg, + sm_2_opcode, + ps_2_x_handlers +}; + +static void sm_3_header(struct bc_writer *This, const struct bwriter_shader *shader, struct bytecode_buffer *buffer) { + write_declarations(This, buffer, TRUE, shader->inputs, shader->num_inputs, BWRITERSPR_INPUT); + write_declarations(This, buffer, TRUE, shader->outputs, shader->num_outputs, BWRITERSPR_OUTPUT); + write_constF(shader, buffer, TRUE); + write_constB(shader, buffer, TRUE); + write_constI(shader, buffer, TRUE); + write_samplers(shader, buffer); +} + +static void sm_3_srcreg(struct bc_writer *This, + const struct shader_reg *reg, + struct bytecode_buffer *buffer) { + DWORD token = (1 << 31); /* Bit 31 of registers is 1 */ + DWORD d3d9reg; + + d3d9reg = d3d9_register(reg->type); + token |= (d3d9reg << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= (d3d9reg << D3DSP_REGTYPE_SHIFT2) & D3DSP_REGTYPE_MASK2; + token |= reg->regnum & D3DSP_REGNUM_MASK; + + token |= d3d9_swizzle(reg->u.swizzle) & D3DVS_SWIZZLE_MASK; + token |= d3d9_srcmod(reg->srcmod); + + if(reg->rel_reg) { + if(reg->type == BWRITERSPR_CONST && This->version == BWRITERPS_VERSION(3, 0)) { + WARN("c%u[...] is unsupported in ps_3_0\n", reg->regnum); + This->state = E_INVALIDARG; + return; + } + if(((reg->rel_reg->type == BWRITERSPR_ADDR && This->version == BWRITERVS_VERSION(3, 0)) || + reg->rel_reg->type == BWRITERSPR_LOOP) && + reg->rel_reg->regnum == 0) { + token |= D3DVS_ADDRMODE_RELATIVE & D3DVS_ADDRESSMODE_MASK; + } else { + WARN("Unsupported relative addressing register\n"); + This->state = E_INVALIDARG; + return; + } + } + + put_dword(buffer, token); + + /* vs_2_0 and newer write the register containing the index explicitly in the + * binary code + */ + if(token & D3DVS_ADDRMODE_RELATIVE) { + sm_3_srcreg(This, reg->rel_reg, buffer); + } +} + +static void sm_3_dstreg(struct bc_writer *This, + const struct shader_reg *reg, + struct bytecode_buffer *buffer, + DWORD shift, DWORD mod) { + DWORD token = (1 << 31); /* Bit 31 of registers is 1 */ + DWORD d3d9reg; + + if(reg->rel_reg) { + if(This->version == BWRITERVS_VERSION(3, 0) && + reg->type == BWRITERSPR_OUTPUT) { + token |= D3DVS_ADDRMODE_RELATIVE & D3DVS_ADDRESSMODE_MASK; + } else { + WARN("Relative addressing not supported for this shader type or register type\n"); + This->state = E_INVALIDARG; + return; + } + } + + d3d9reg = d3d9_register(reg->type); + token |= (d3d9reg << D3DSP_REGTYPE_SHIFT) & D3DSP_REGTYPE_MASK; + token |= (d3d9reg << D3DSP_REGTYPE_SHIFT2) & D3DSP_REGTYPE_MASK2; + token |= reg->regnum & D3DSP_REGNUM_MASK; /* No shift */ + + token |= d3d9_dstmod(mod); + + token |= d3d9_writemask(reg->u.writemask); + put_dword(buffer, token); + + /* vs_2_0 and newer write the register containing the index explicitly in the + * binary code + */ + if(token & D3DVS_ADDRMODE_RELATIVE) { + sm_3_srcreg(This, reg->rel_reg, buffer); + } +} + +static const struct instr_handler_table vs_3_handlers[] = { + {BWRITERSIO_ADD, instr_handler}, + {BWRITERSIO_NOP, instr_handler}, + {BWRITERSIO_MOV, instr_handler}, + {BWRITERSIO_SUB, instr_handler}, + {BWRITERSIO_MAD, instr_handler}, + {BWRITERSIO_MUL, instr_handler}, + {BWRITERSIO_RCP, instr_handler}, + {BWRITERSIO_RSQ, instr_handler}, + {BWRITERSIO_DP3, instr_handler}, + {BWRITERSIO_DP4, instr_handler}, + {BWRITERSIO_MIN, instr_handler}, + {BWRITERSIO_MAX, instr_handler}, + {BWRITERSIO_SLT, instr_handler}, + {BWRITERSIO_SGE, instr_handler}, + {BWRITERSIO_ABS, instr_handler}, + {BWRITERSIO_EXP, instr_handler}, + {BWRITERSIO_LOG, instr_handler}, + {BWRITERSIO_EXPP, instr_handler}, + {BWRITERSIO_LOGP, instr_handler}, + {BWRITERSIO_DST, instr_handler}, + {BWRITERSIO_LRP, instr_handler}, + {BWRITERSIO_FRC, instr_handler}, + {BWRITERSIO_CRS, instr_handler}, + {BWRITERSIO_SGN, instr_handler}, + {BWRITERSIO_NRM, instr_handler}, + {BWRITERSIO_SINCOS, instr_handler}, + {BWRITERSIO_M4x4, instr_handler}, + {BWRITERSIO_M4x3, instr_handler}, + {BWRITERSIO_M3x4, instr_handler}, + {BWRITERSIO_M3x3, instr_handler}, + {BWRITERSIO_M3x2, instr_handler}, + {BWRITERSIO_LIT, instr_handler}, + {BWRITERSIO_POW, instr_handler}, + {BWRITERSIO_MOVA, instr_handler}, + + {BWRITERSIO_CALL, instr_handler}, + {BWRITERSIO_CALLNZ, instr_handler}, + {BWRITERSIO_REP, instr_handler}, + {BWRITERSIO_ENDREP, instr_handler}, + {BWRITERSIO_IF, instr_handler}, + {BWRITERSIO_LABEL, instr_handler}, + {BWRITERSIO_IFC, instr_handler}, + {BWRITERSIO_ELSE, instr_handler}, + {BWRITERSIO_ENDIF, instr_handler}, + {BWRITERSIO_BREAK, instr_handler}, + {BWRITERSIO_BREAKC, instr_handler}, + {BWRITERSIO_LOOP, instr_handler}, + {BWRITERSIO_RET, instr_handler}, + {BWRITERSIO_ENDLOOP, instr_handler}, + + {BWRITERSIO_SETP, instr_handler}, + {BWRITERSIO_BREAKP, instr_handler}, + {BWRITERSIO_TEXLDL, instr_handler}, + + {BWRITERSIO_END, NULL}, +}; + +static const struct bytecode_backend vs_3_backend = { + sm_3_header, + end, + sm_3_srcreg, + sm_3_dstreg, + sm_2_opcode, + vs_3_handlers +}; + +static const struct instr_handler_table ps_3_handlers[] = { + {BWRITERSIO_ADD, instr_handler}, + {BWRITERSIO_NOP, instr_handler}, + {BWRITERSIO_MOV, instr_handler}, + {BWRITERSIO_SUB, instr_handler}, + {BWRITERSIO_MAD, instr_handler}, + {BWRITERSIO_MUL, instr_handler}, + {BWRITERSIO_RCP, instr_handler}, + {BWRITERSIO_RSQ, instr_handler}, + {BWRITERSIO_DP3, instr_handler}, + {BWRITERSIO_DP4, instr_handler}, + {BWRITERSIO_MIN, instr_handler}, + {BWRITERSIO_MAX, instr_handler}, + {BWRITERSIO_ABS, instr_handler}, + {BWRITERSIO_EXP, instr_handler}, + {BWRITERSIO_LOG, instr_handler}, + {BWRITERSIO_EXPP, instr_handler}, + {BWRITERSIO_LOGP, instr_handler}, + {BWRITERSIO_LRP, instr_handler}, + {BWRITERSIO_FRC, instr_handler}, + {BWRITERSIO_CRS, instr_handler}, + {BWRITERSIO_NRM, instr_handler}, + {BWRITERSIO_SINCOS, instr_handler}, + {BWRITERSIO_M4x4, instr_handler}, + {BWRITERSIO_M4x3, instr_handler}, + {BWRITERSIO_M3x4, instr_handler}, + {BWRITERSIO_M3x3, instr_handler}, + {BWRITERSIO_M3x2, instr_handler}, + {BWRITERSIO_POW, instr_handler}, + {BWRITERSIO_DP2ADD, instr_handler}, + {BWRITERSIO_CMP, instr_handler}, + + {BWRITERSIO_CALL, instr_handler}, + {BWRITERSIO_CALLNZ, instr_handler}, + {BWRITERSIO_REP, instr_handler}, + {BWRITERSIO_ENDREP, instr_handler}, + {BWRITERSIO_IF, instr_handler}, + {BWRITERSIO_LABEL, instr_handler}, + {BWRITERSIO_IFC, instr_handler}, + {BWRITERSIO_ELSE, instr_handler}, + {BWRITERSIO_ENDIF, instr_handler}, + {BWRITERSIO_BREAK, instr_handler}, + {BWRITERSIO_BREAKC, instr_handler}, + {BWRITERSIO_LOOP, instr_handler}, + {BWRITERSIO_RET, instr_handler}, + {BWRITERSIO_ENDLOOP, instr_handler}, + + {BWRITERSIO_SETP, instr_handler}, + {BWRITERSIO_BREAKP, instr_handler}, + {BWRITERSIO_TEXLDL, instr_handler}, + + {BWRITERSIO_TEX, instr_handler}, + {BWRITERSIO_TEXLDP, instr_handler}, + {BWRITERSIO_TEXLDB, instr_handler}, + {BWRITERSIO_TEXKILL, instr_handler}, + {BWRITERSIO_DSX, instr_handler}, + {BWRITERSIO_DSY, instr_handler}, + {BWRITERSIO_TEXLDD, instr_handler}, + + {BWRITERSIO_END, NULL}, +}; + +static const struct bytecode_backend ps_3_backend = { + sm_3_header, + end, + sm_3_srcreg, + sm_3_dstreg, + sm_2_opcode, + ps_3_handlers +}; + +static void init_vs10_dx9_writer(struct bc_writer *writer) { + TRACE("Creating DirectX9 vertex shader 1.0 writer\n"); + writer->funcs = &vs_1_x_backend; +} + +static void init_vs11_dx9_writer(struct bc_writer *writer) { + TRACE("Creating DirectX9 vertex shader 1.1 writer\n"); + writer->funcs = &vs_1_x_backend; +} + +static void init_vs20_dx9_writer(struct bc_writer *writer) { + TRACE("Creating DirectX9 vertex shader 2.0 writer\n"); + writer->funcs = &vs_2_0_backend; +} + +static void init_vs2x_dx9_writer(struct bc_writer *writer) { + TRACE("Creating DirectX9 vertex shader 2.x writer\n"); + writer->funcs = &vs_2_x_backend; +} + +static void init_vs30_dx9_writer(struct bc_writer *writer) { + TRACE("Creating DirectX9 vertex shader 3.0 writer\n"); + writer->funcs = &vs_3_backend; +} + +static void init_ps10_dx9_writer(struct bc_writer *writer) { + TRACE("Creating DirectX9 pixel shader 1.0 writer\n"); + writer->funcs = &ps_1_0123_backend; +} + +static void init_ps11_dx9_writer(struct bc_writer *writer) { + TRACE("Creating DirectX9 pixel shader 1.1 writer\n"); + writer->funcs = &ps_1_0123_backend; +} + +static void init_ps12_dx9_writer(struct bc_writer *writer) { + TRACE("Creating DirectX9 pixel shader 1.2 writer\n"); + writer->funcs = &ps_1_0123_backend; +} + +static void init_ps13_dx9_writer(struct bc_writer *writer) { + TRACE("Creating DirectX9 pixel shader 1.3 writer\n"); + writer->funcs = &ps_1_0123_backend; +} + +static void init_ps14_dx9_writer(struct bc_writer *writer) { + TRACE("Creating DirectX9 pixel shader 1.4 writer\n"); + writer->funcs = &ps_1_4_backend; +} + +static void init_ps20_dx9_writer(struct bc_writer *writer) { + TRACE("Creating DirectX9 pixel shader 2.0 writer\n"); + writer->funcs = &ps_2_0_backend; +} + +static void init_ps2x_dx9_writer(struct bc_writer *writer) { + TRACE("Creating DirectX9 pixel shader 2.x writer\n"); + writer->funcs = &ps_2_x_backend; +} + +static void init_ps30_dx9_writer(struct bc_writer *writer) { + TRACE("Creating DirectX9 pixel shader 3.0 writer\n"); + writer->funcs = &ps_3_backend; +} + +static struct bc_writer *create_writer(DWORD version, DWORD dxversion) { + struct bc_writer *ret = d3dcompiler_alloc(sizeof(*ret)); + + if(!ret) { + WARN("Failed to allocate a bytecode writer instance\n"); + return NULL; + } + + switch(version) { + case BWRITERVS_VERSION(1, 0): + if(dxversion != 9) { + WARN("Unsupported dxversion for vertex shader 1.0 requested: %u\n", dxversion); + goto fail; + } + init_vs10_dx9_writer(ret); + break; + case BWRITERVS_VERSION(1, 1): + if(dxversion != 9) { + WARN("Unsupported dxversion for vertex shader 1.1 requested: %u\n", dxversion); + goto fail; + } + init_vs11_dx9_writer(ret); + break; + case BWRITERVS_VERSION(2, 0): + if(dxversion != 9) { + WARN("Unsupported dxversion for vertex shader 2.0 requested: %u\n", dxversion); + goto fail; + } + init_vs20_dx9_writer(ret); + break; + case BWRITERVS_VERSION(2, 1): + if(dxversion != 9) { + WARN("Unsupported dxversion for vertex shader 2.x requested: %u\n", dxversion); + goto fail; + } + init_vs2x_dx9_writer(ret); + break; + case BWRITERVS_VERSION(3, 0): + if(dxversion != 9) { + WARN("Unsupported dxversion for vertex shader 3.0 requested: %u\n", dxversion); + goto fail; + } + init_vs30_dx9_writer(ret); + break; + + case BWRITERPS_VERSION(1, 0): + if(dxversion != 9) { + WARN("Unsupported dxversion for pixel shader 1.0 requested: %u\n", dxversion); + goto fail; + } + init_ps10_dx9_writer(ret); + break; + case BWRITERPS_VERSION(1, 1): + if(dxversion != 9) { + WARN("Unsupported dxversion for pixel shader 1.1 requested: %u\n", dxversion); + goto fail; + } + init_ps11_dx9_writer(ret); + break; + case BWRITERPS_VERSION(1, 2): + if(dxversion != 9) { + WARN("Unsupported dxversion for pixel shader 1.2 requested: %u\n", dxversion); + goto fail; + } + init_ps12_dx9_writer(ret); + break; + case BWRITERPS_VERSION(1, 3): + if(dxversion != 9) { + WARN("Unsupported dxversion for pixel shader 1.3 requested: %u\n", dxversion); + goto fail; + } + init_ps13_dx9_writer(ret); + break; + case BWRITERPS_VERSION(1, 4): + if(dxversion != 9) { + WARN("Unsupported dxversion for pixel shader 1.4 requested: %u\n", dxversion); + goto fail; + } + init_ps14_dx9_writer(ret); + break; + + case BWRITERPS_VERSION(2, 0): + if(dxversion != 9) { + WARN("Unsupported dxversion for pixel shader 2.0 requested: %u\n", dxversion); + goto fail; + } + init_ps20_dx9_writer(ret); + break; + + case BWRITERPS_VERSION(2, 1): + if(dxversion != 9) { + WARN("Unsupported dxversion for pixel shader 2.x requested: %u\n", dxversion); + goto fail; + } + init_ps2x_dx9_writer(ret); + break; + + case BWRITERPS_VERSION(3, 0): + if(dxversion != 9) { + WARN("Unsupported dxversion for pixel shader 3.0 requested: %u\n", dxversion); + goto fail; + } + init_ps30_dx9_writer(ret); + break; + + default: + WARN("Unexpected shader version requested: %08x\n", version); + goto fail; + } + ret->version = version; + return ret; + +fail: + d3dcompiler_free(ret); + return NULL; +} + +static HRESULT call_instr_handler(struct bc_writer *writer, + const struct instruction *instr, + struct bytecode_buffer *buffer) { + DWORD i=0; + + while(writer->funcs->instructions[i].opcode != BWRITERSIO_END) { + if(instr->opcode == writer->funcs->instructions[i].opcode) { + if(!writer->funcs->instructions[i].func) { + WARN("Opcode %u not supported by this profile\n", instr->opcode); + return E_INVALIDARG; + } + writer->funcs->instructions[i].func(writer, instr, buffer); + return S_OK; + } + i++; + } + + FIXME("Unhandled instruction %u - %s\n", instr->opcode, + debug_print_opcode(instr->opcode)); + return E_INVALIDARG; +} + +HRESULT SlWriteBytecode(const struct bwriter_shader *shader, int dxversion, DWORD **result, DWORD *size) +{ + struct bc_writer *writer; + struct bytecode_buffer *buffer = NULL; + HRESULT hr; + unsigned int i; + + if(!shader){ + ERR("NULL shader structure, aborting\n"); + return E_FAIL; + } + writer = create_writer(shader->version, dxversion); + *result = NULL; + + if(!writer) { + WARN("Could not create a bytecode writer instance. Either unsupported version\n"); + WARN("or out of memory\n"); + hr = E_FAIL; + goto error; + } + + buffer = allocate_buffer(); + if(!buffer) { + WARN("Failed to allocate a buffer for the shader bytecode\n"); + hr = E_FAIL; + goto error; + } + + /* Write shader type and version */ + put_dword(buffer, shader->version); + + writer->funcs->header(writer, shader, buffer); + if(FAILED(writer->state)) { + hr = writer->state; + goto error; + } + + for(i = 0; i < shader->num_instrs; i++) { + hr = call_instr_handler(writer, shader->instr[i], buffer); + if(FAILED(hr)) { + goto error; + } + } + + if(FAILED(writer->state)) { + hr = writer->state; + goto error; + } + + writer->funcs->end(writer, shader, buffer); + + if(FAILED(buffer->state)) { + hr = buffer->state; + goto error; + } + + *size = buffer->size * sizeof(DWORD); + *result = buffer->data; + buffer->data = NULL; + hr = S_OK; + +error: + if(buffer) { + d3dcompiler_free(buffer->data); + d3dcompiler_free(buffer); + } + d3dcompiler_free(writer); + return hr; +} + +void SlDeleteShader(struct bwriter_shader *shader) { + unsigned int i, j; + + TRACE("Deleting shader %p\n", shader); + + for(i = 0; i < shader->num_cf; i++) { + d3dcompiler_free(shader->constF[i]); + } + d3dcompiler_free(shader->constF); + for(i = 0; i < shader->num_ci; i++) { + d3dcompiler_free(shader->constI[i]); + } + d3dcompiler_free(shader->constI); + for(i = 0; i < shader->num_cb; i++) { + d3dcompiler_free(shader->constB[i]); + } + d3dcompiler_free(shader->constB); + + d3dcompiler_free(shader->inputs); + d3dcompiler_free(shader->outputs); + d3dcompiler_free(shader->samplers); + + for(i = 0; i < shader->num_instrs; i++) { + for(j = 0; j < shader->instr[i]->num_srcs; j++) { + d3dcompiler_free(shader->instr[i]->src[j].rel_reg); + } + d3dcompiler_free(shader->instr[i]->src); + d3dcompiler_free(shader->instr[i]); + } + d3dcompiler_free(shader->instr); + + d3dcompiler_free(shader); +} diff --git a/dll/directx/wine/d3dcompiler_43/compiler.c b/dll/directx/wine/d3dcompiler_43/compiler.c new file mode 100644 index 00000000000..14fa652b65e --- /dev/null +++ b/dll/directx/wine/d3dcompiler_43/compiler.c @@ -0,0 +1,763 @@ +/* + * Copyright 2009 Matteo Bruni + * Copyright 2010 Matteo Bruni for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS +#include "config.h" +#include "wine/port.h" +#include "wine/debug.h" +#include "wine/unicode.h" + +#include "d3dcompiler_private.h" +#include "wine/wpp.h" + +WINE_DEFAULT_DEBUG_CHANNEL(d3dcompiler); + +#define D3DXERR_INVALIDDATA 0x88760b59 + +#define BUFFER_INITIAL_CAPACITY 256 + +struct mem_file_desc +{ + const char *buffer; + unsigned int size; + unsigned int pos; +}; + +static struct mem_file_desc current_shader; +static ID3DInclude *current_include; +static const char *initial_filename; + +#define INCLUDES_INITIAL_CAPACITY 4 + +struct loaded_include +{ + const char *name; + const char *data; +}; + +static struct loaded_include *includes; +static int includes_capacity, includes_size; +static const char *parent_include; + +static char *wpp_output; +static int wpp_output_capacity, wpp_output_size; + +static char *wpp_messages; +static int wpp_messages_capacity, wpp_messages_size; + +/* Mutex used to guarantee a single invocation + of the D3DXAssembleShader function (or its variants) at a time. + This is needed as wpp isn't thread-safe */ +static CRITICAL_SECTION wpp_mutex; +static CRITICAL_SECTION_DEBUG wpp_mutex_debug = +{ + 0, 0, &wpp_mutex, + { &wpp_mutex_debug.ProcessLocksList, + &wpp_mutex_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": wpp_mutex") } +}; +static CRITICAL_SECTION wpp_mutex = { &wpp_mutex_debug, -1, 0, 0, 0, 0 }; + +/* Preprocessor error reporting functions */ +static void wpp_write_message(const char *fmt, va_list args) +{ + char* newbuffer; + int rc, newsize; + + if(wpp_messages_capacity == 0) + { + wpp_messages = HeapAlloc(GetProcessHeap(), 0, MESSAGEBUFFER_INITIAL_SIZE); + if(wpp_messages == NULL) + return; + + wpp_messages_capacity = MESSAGEBUFFER_INITIAL_SIZE; + } + + while(1) + { + rc = vsnprintf(wpp_messages + wpp_messages_size, + wpp_messages_capacity - wpp_messages_size, fmt, args); + + if (rc < 0 || /* C89 */ + rc >= wpp_messages_capacity - wpp_messages_size) { /* C99 */ + /* Resize the buffer */ + newsize = wpp_messages_capacity * 2; + newbuffer = HeapReAlloc(GetProcessHeap(), 0, wpp_messages, newsize); + if(newbuffer == NULL) + { + ERR("Error reallocating memory for parser messages\n"); + return; + } + wpp_messages = newbuffer; + wpp_messages_capacity = newsize; + } + else + { + wpp_messages_size += rc; + return; + } + } +} + +static void PRINTF_ATTR(1,2) wpp_write_message_var(const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + wpp_write_message(fmt, args); + va_end(args); +} + +static void wpp_error(const char *file, int line, int col, const char *_near, + const char *msg, va_list ap) +{ + wpp_write_message_var("%s:%d:%d: %s: ", file ? file : "'main file'", + line, col, "Error"); + wpp_write_message(msg, ap); + wpp_write_message_var("\n"); +} + +static void wpp_warning(const char *file, int line, int col, const char *_near, + const char *msg, va_list ap) +{ + wpp_write_message_var("%s:%d:%d: %s: ", file ? file : "'main file'", + line, col, "Warning"); + wpp_write_message(msg, ap); + wpp_write_message_var("\n"); +} + +static char *wpp_lookup_mem(const char *filename, int type, const char *parent_name, + char **include_path, int include_path_count) +{ + /* Here we return always ok. We will maybe fail on the next wpp_open_mem */ + char *path; + int i; + + parent_include = NULL; + if(parent_name[0] != '\0') + { + for(i = 0; i < includes_size; i++) + { + if(!strcmp(parent_name, includes[i].name)) + { + parent_include = includes[i].data; + break; + } + } + if(parent_include == NULL) + { + ERR("Parent include file missing\n"); + return NULL; + } + } + + path = malloc(strlen(filename) + 1); + if(path) + memcpy(path, filename, strlen(filename) + 1); + return path; +} + +static void *wpp_open_mem(const char *filename, int type) +{ + struct mem_file_desc *desc; + HRESULT hr; + + if(!strcmp(filename, initial_filename)) + { + current_shader.pos = 0; + return ¤t_shader; + } + + if(current_include == NULL) return NULL; + desc = HeapAlloc(GetProcessHeap(), 0, sizeof(*desc)); + if(!desc) + return NULL; + + hr = ID3DInclude_Open(current_include, + type ? D3D_INCLUDE_LOCAL : D3D_INCLUDE_SYSTEM, + filename, parent_include, (LPCVOID *)&desc->buffer, + &desc->size); + if(FAILED(hr)) + { + HeapFree(GetProcessHeap(), 0, desc); + return NULL; + } + + if(includes_capacity == includes_size) + { + if(includes_capacity == 0) + { + includes = HeapAlloc(GetProcessHeap(), 0, INCLUDES_INITIAL_CAPACITY * sizeof(*includes)); + if(includes == NULL) + { + ERR("Error allocating memory for the loaded includes structure\n"); + goto error; + } + includes_capacity = INCLUDES_INITIAL_CAPACITY * sizeof(*includes); + } + else + { + int newcapacity = includes_capacity * 2; + struct loaded_include *newincludes = + HeapReAlloc(GetProcessHeap(), 0, includes, newcapacity); + if(newincludes == NULL) + { + ERR("Error reallocating memory for the loaded includes structure\n"); + goto error; + } + includes = newincludes; + includes_capacity = newcapacity; + } + } + includes[includes_size].name = filename; + includes[includes_size++].data = desc->buffer; + + desc->pos = 0; + return desc; + +error: + ID3DInclude_Close(current_include, desc->buffer); + HeapFree(GetProcessHeap(), 0, desc); + return NULL; +} + +static void wpp_close_mem(void *file) +{ + struct mem_file_desc *desc = file; + + if(desc != ¤t_shader) + { + if(current_include) + ID3DInclude_Close(current_include, desc->buffer); + else + ERR("current_include == NULL, desc == %p, buffer = %s\n", + desc, desc->buffer); + + HeapFree(GetProcessHeap(), 0, desc); + } +} + +static int wpp_read_mem(void *file, char *buffer, unsigned int len) +{ + struct mem_file_desc *desc = file; + + len = min(len, desc->size - desc->pos); + memcpy(buffer, desc->buffer + desc->pos, len); + desc->pos += len; + return len; +} + +static void wpp_write_mem(const char *buffer, unsigned int len) +{ + char *new_wpp_output; + + if(wpp_output_capacity == 0) + { + wpp_output = HeapAlloc(GetProcessHeap(), 0, BUFFER_INITIAL_CAPACITY); + if(!wpp_output) + return; + + wpp_output_capacity = BUFFER_INITIAL_CAPACITY; + } + if(len > wpp_output_capacity - wpp_output_size) + { + while(len > wpp_output_capacity - wpp_output_size) + { + wpp_output_capacity *= 2; + } + new_wpp_output = HeapReAlloc(GetProcessHeap(), 0, wpp_output, + wpp_output_capacity); + if(!new_wpp_output) + { + ERR("Error allocating memory\n"); + return; + } + wpp_output = new_wpp_output; + } + memcpy(wpp_output + wpp_output_size, buffer, len); + wpp_output_size += len; +} + +static int wpp_close_output(void) +{ + char *new_wpp_output = HeapReAlloc(GetProcessHeap(), 0, wpp_output, + wpp_output_size + 1); + if(!new_wpp_output) return 0; + wpp_output = new_wpp_output; + wpp_output[wpp_output_size]='\0'; + wpp_output_size++; + return 1; +} + +static HRESULT preprocess_shader(const void *data, SIZE_T data_size, const char *filename, + const D3D_SHADER_MACRO *defines, ID3DInclude *include, ID3DBlob **error_messages) +{ + int ret; + HRESULT hr = S_OK; + const D3D_SHADER_MACRO *def = defines; + + static const struct wpp_callbacks wpp_callbacks = + { + wpp_lookup_mem, + wpp_open_mem, + wpp_close_mem, + wpp_read_mem, + wpp_write_mem, + wpp_error, + wpp_warning, + }; + + if (def != NULL) + { + while (def->Name != NULL) + { + wpp_add_define(def->Name, def->Definition); + def++; + } + } + current_include = include; + includes_size = 0; + + wpp_output_size = wpp_output_capacity = 0; + wpp_output = NULL; + + wpp_set_callbacks(&wpp_callbacks); + wpp_messages_size = wpp_messages_capacity = 0; + wpp_messages = NULL; + current_shader.buffer = data; + current_shader.size = data_size; + initial_filename = filename ? filename : ""; + + ret = wpp_parse(initial_filename, NULL); + if (!wpp_close_output()) + ret = 1; + if (ret) + { + TRACE("Error during shader preprocessing\n"); + if (wpp_messages) + { + int size; + ID3DBlob *buffer; + + TRACE("Preprocessor messages:\n%s\n", debugstr_a(wpp_messages)); + + if (error_messages) + { + size = strlen(wpp_messages) + 1; + hr = D3DCreateBlob(size, &buffer); + if (FAILED(hr)) + goto cleanup; + CopyMemory(ID3D10Blob_GetBufferPointer(buffer), wpp_messages, size); + *error_messages = buffer; + } + } + if (data) + TRACE("Shader source:\n%s\n", debugstr_an(data, data_size)); + hr = E_FAIL; + } + +cleanup: + /* Remove the previously added defines */ + if (defines != NULL) + { + while (defines->Name != NULL) + { + wpp_del_define(defines->Name); + defines++; + } + } + HeapFree(GetProcessHeap(), 0, wpp_messages); + return hr; +} + +static HRESULT assemble_shader(const char *preproc_shader, + ID3DBlob **shader_blob, ID3DBlob **error_messages) +{ + struct bwriter_shader *shader; + char *messages = NULL; + HRESULT hr; + DWORD *res, size; + ID3DBlob *buffer; + char *pos; + + shader = SlAssembleShader(preproc_shader, &messages); + + if (messages) + { + TRACE("Assembler messages:\n"); + TRACE("%s\n", debugstr_a(messages)); + + TRACE("Shader source:\n"); + TRACE("%s\n", debugstr_a(preproc_shader)); + + if (error_messages) + { + const char *preproc_messages = *error_messages ? ID3D10Blob_GetBufferPointer(*error_messages) : NULL; + + size = strlen(messages) + (preproc_messages ? strlen(preproc_messages) : 0) + 1; + hr = D3DCreateBlob(size, &buffer); + if (FAILED(hr)) + { + HeapFree(GetProcessHeap(), 0, messages); + if (shader) SlDeleteShader(shader); + return hr; + } + pos = ID3D10Blob_GetBufferPointer(buffer); + if (preproc_messages) + { + CopyMemory(pos, preproc_messages, strlen(preproc_messages) + 1); + pos += strlen(preproc_messages); + } + CopyMemory(pos, messages, strlen(messages) + 1); + + if (*error_messages) ID3D10Blob_Release(*error_messages); + *error_messages = buffer; + } + HeapFree(GetProcessHeap(), 0, messages); + } + + if (shader == NULL) + { + ERR("Asm reading failed\n"); + return D3DXERR_INVALIDDATA; + } + + hr = SlWriteBytecode(shader, 9, &res, &size); + SlDeleteShader(shader); + if (FAILED(hr)) + { + ERR("SlWriteBytecode failed with 0x%08x\n", hr); + return D3DXERR_INVALIDDATA; + } + + if (shader_blob) + { + hr = D3DCreateBlob(size, &buffer); + if (FAILED(hr)) + { + HeapFree(GetProcessHeap(), 0, res); + return hr; + } + CopyMemory(ID3D10Blob_GetBufferPointer(buffer), res, size); + *shader_blob = buffer; + } + + HeapFree(GetProcessHeap(), 0, res); + + return S_OK; +} + +HRESULT WINAPI D3DAssemble(const void *data, SIZE_T datasize, const char *filename, + const D3D_SHADER_MACRO *defines, ID3DInclude *include, UINT flags, + ID3DBlob **shader, ID3DBlob **error_messages) +{ + HRESULT hr; + + TRACE("data %p, datasize %lu, filename %s, defines %p, include %p, sflags %#x,\n" + "shader %p, error_messages %p\n", + data, datasize, debugstr_a(filename), defines, include, flags, shader, error_messages); + + EnterCriticalSection(&wpp_mutex); + + /* TODO: flags */ + if (flags) FIXME("flags %x\n", flags); + + if (shader) *shader = NULL; + if (error_messages) *error_messages = NULL; + + hr = preprocess_shader(data, datasize, filename, defines, include, error_messages); + if (SUCCEEDED(hr)) + hr = assemble_shader(wpp_output, shader, error_messages); + + HeapFree(GetProcessHeap(), 0, wpp_output); + LeaveCriticalSection(&wpp_mutex); + return hr; +} + +struct target_info { + const char *name; + enum shader_type type; + DWORD sm_major; + DWORD sm_minor; + DWORD level_major; + DWORD level_minor; + BOOL sw; + BOOL support; +}; + +/* Must be kept sorted for binary search */ +static const struct target_info targets_info[] = { + { "cs_4_0", ST_UNKNOWN, 4, 0, 0, 0, FALSE, FALSE }, + { "cs_4_1", ST_UNKNOWN, 4, 1, 0, 0, FALSE, FALSE }, + { "cs_5_0", ST_UNKNOWN, 5, 0, 0, 0, FALSE, FALSE }, + { "ds_5_0", ST_UNKNOWN, 5, 0, 0, 0, FALSE, FALSE }, + { "fx_2_0", ST_UNKNOWN, 2, 0, 0, 0, FALSE, FALSE }, + { "fx_4_0", ST_UNKNOWN, 4, 0, 0, 0, FALSE, FALSE }, + { "fx_4_1", ST_UNKNOWN, 4, 1, 0, 0, FALSE, FALSE }, + { "fx_5_0", ST_UNKNOWN, 5, 0, 0, 0, FALSE, FALSE }, + { "gs_4_0", ST_UNKNOWN, 4, 0, 0, 0, FALSE, FALSE }, + { "gs_4_1", ST_UNKNOWN, 4, 1, 0, 0, FALSE, FALSE }, + { "gs_5_0", ST_UNKNOWN, 5, 0, 0, 0, FALSE, FALSE }, + { "hs_5_0", ST_UNKNOWN, 5, 0, 0, 0, FALSE, FALSE }, + { "ps.1.0", ST_PIXEL, 1, 0, 0, 0, FALSE, TRUE }, + { "ps.1.1", ST_PIXEL, 1, 1, 0, 0, FALSE, FALSE }, + { "ps.1.2", ST_PIXEL, 1, 2, 0, 0, FALSE, FALSE }, + { "ps.1.3", ST_PIXEL, 1, 3, 0, 0, FALSE, FALSE }, + { "ps.1.4", ST_PIXEL, 1, 4, 0, 0, FALSE, FALSE }, + { "ps.2.0", ST_PIXEL, 2, 0, 0, 0, FALSE, TRUE }, + { "ps.2.a", ST_PIXEL, 2, 1, 0, 0, FALSE, FALSE }, + { "ps.2.b", ST_PIXEL, 2, 2, 0, 0, FALSE, FALSE }, + { "ps.2.sw", ST_PIXEL, 2, 0, 0, 0, TRUE, FALSE }, + { "ps.3.0", ST_PIXEL, 3, 0, 0, 0, FALSE, TRUE }, + { "ps_1_0", ST_PIXEL, 1, 0, 0, 0, FALSE, TRUE }, + { "ps_1_1", ST_PIXEL, 1, 1, 0, 0, FALSE, FALSE }, + { "ps_1_2", ST_PIXEL, 1, 2, 0, 0, FALSE, FALSE }, + { "ps_1_3", ST_PIXEL, 1, 3, 0, 0, FALSE, FALSE }, + { "ps_1_4", ST_PIXEL, 1, 4, 0, 0, FALSE, FALSE }, + { "ps_2_0", ST_PIXEL, 2, 0, 0, 0, FALSE, TRUE }, + { "ps_2_a", ST_PIXEL, 2, 1, 0, 0, FALSE, FALSE }, + { "ps_2_b", ST_PIXEL, 2, 2, 0, 0, FALSE, FALSE }, + { "ps_2_sw", ST_PIXEL, 2, 0, 0, 0, TRUE, FALSE }, + { "ps_3_0", ST_PIXEL, 3, 0, 0, 0, FALSE, TRUE }, + { "ps_3_sw", ST_PIXEL, 3, 0, 0, 0, TRUE, FALSE }, + { "ps_4_0", ST_PIXEL, 4, 0, 0, 0, FALSE, TRUE }, + { "ps_4_0_level_9_0", ST_PIXEL, 4, 0, 9, 0, FALSE, FALSE }, + { "ps_4_0_level_9_1", ST_PIXEL, 4, 0, 9, 1, FALSE, FALSE }, + { "ps_4_0_level_9_3", ST_PIXEL, 4, 0, 9, 3, FALSE, FALSE }, + { "ps_4_1", ST_PIXEL, 4, 1, 0, 0, FALSE, TRUE }, + { "ps_5_0", ST_PIXEL, 5, 0, 0, 0, FALSE, TRUE }, + { "tx_1_0", ST_UNKNOWN, 1, 0, 0, 0, FALSE, FALSE }, + { "vs.1.0", ST_VERTEX, 1, 0, 0, 0, FALSE, TRUE }, + { "vs.1.1", ST_VERTEX, 1, 1, 0, 0, FALSE, TRUE }, + { "vs.2.0", ST_VERTEX, 2, 0, 0, 0, FALSE, TRUE }, + { "vs.2.a", ST_VERTEX, 2, 1, 0, 0, FALSE, FALSE }, + { "vs.2.sw", ST_VERTEX, 2, 0, 0, 0, TRUE, FALSE }, + { "vs.3.0", ST_VERTEX, 3, 0, 0, 0, FALSE, TRUE }, + { "vs.3.sw", ST_VERTEX, 3, 0, 0, 0, TRUE, FALSE }, + { "vs_1_0", ST_VERTEX, 1, 0, 0, 0, FALSE, TRUE }, + { "vs_1_1", ST_VERTEX, 1, 1, 0, 0, FALSE, TRUE }, + { "vs_2_0", ST_VERTEX, 2, 0, 0, 0, FALSE, TRUE }, + { "vs_2_a", ST_VERTEX, 2, 1, 0, 0, FALSE, FALSE }, + { "vs_2_sw", ST_VERTEX, 2, 0, 0, 0, TRUE, FALSE }, + { "vs_3_0", ST_VERTEX, 3, 0, 0, 0, FALSE, TRUE }, + { "vs_3_sw", ST_VERTEX, 3, 0, 0, 0, TRUE, FALSE }, + { "vs_4_0", ST_VERTEX, 4, 0, 0, 0, FALSE, TRUE }, + { "vs_4_0_level_9_0", ST_VERTEX, 4, 0, 9, 0, FALSE, FALSE }, + { "vs_4_0_level_9_1", ST_VERTEX, 4, 0, 9, 1, FALSE, FALSE }, + { "vs_4_0_level_9_3", ST_VERTEX, 4, 0, 9, 3, FALSE, FALSE }, + { "vs_4_1", ST_VERTEX, 4, 1, 0, 0, FALSE, TRUE }, + { "vs_5_0", ST_VERTEX, 5, 0, 0, 0, FALSE, TRUE }, +}; + +static const struct target_info * get_target_info(const char *target) +{ + LONG min = 0; + LONG max = sizeof(targets_info) / sizeof(targets_info[0]) - 1; + LONG cur; + int res; + + while (min <= max) + { + cur = (min + max) / 2; + res = strcmp(target, targets_info[cur].name); + if (res < 0) + max = cur - 1; + else if (res > 0) + min = cur + 1; + else + return &targets_info[cur]; + } + + return NULL; +} + +static HRESULT compile_shader(const char *preproc_shader, const char *target, const char *entrypoint, + ID3DBlob **shader_blob, ID3DBlob **error_messages) +{ + struct bwriter_shader *shader; + char *messages = NULL; + HRESULT hr; + DWORD *res, size, major, minor; + ID3DBlob *buffer; + char *pos; + enum shader_type shader_type; + const struct target_info *info; + + TRACE("Preprocessed shader source: %s\n", debugstr_a(preproc_shader)); + + TRACE("Checking compilation target %s\n", debugstr_a(target)); + info = get_target_info(target); + if (!info) + { + FIXME("Unknown compilation target %s\n", debugstr_a(target)); + return D3DERR_INVALIDCALL; + } + else + { + if (!info->support) + { + FIXME("Compilation target %s not yet supported\n", debugstr_a(target)); + return D3DERR_INVALIDCALL; + } + else + { + shader_type = info->type; + major = info->sm_major; + minor = info->sm_minor; + } + } + + shader = parse_hlsl_shader(preproc_shader, shader_type, major, minor, entrypoint, &messages); + + if (messages) + { + TRACE("Compiler messages:\n"); + TRACE("%s\n", debugstr_a(messages)); + + TRACE("Shader source:\n"); + TRACE("%s\n", debugstr_a(preproc_shader)); + + if (error_messages) + { + const char *preproc_messages = *error_messages ? ID3D10Blob_GetBufferPointer(*error_messages) : NULL; + + size = strlen(messages) + (preproc_messages ? strlen(preproc_messages) : 0) + 1; + hr = D3DCreateBlob(size, &buffer); + if (FAILED(hr)) + { + HeapFree(GetProcessHeap(), 0, messages); + if (shader) SlDeleteShader(shader); + return hr; + } + pos = ID3D10Blob_GetBufferPointer(buffer); + if (preproc_messages) + { + memcpy(pos, preproc_messages, strlen(preproc_messages) + 1); + pos += strlen(preproc_messages); + } + memcpy(pos, messages, strlen(messages) + 1); + + if (*error_messages) ID3D10Blob_Release(*error_messages); + *error_messages = buffer; + } + HeapFree(GetProcessHeap(), 0, messages); + } + + if (!shader) + { + ERR("HLSL shader parsing failed.\n"); + return D3DXERR_INVALIDDATA; + } + + hr = SlWriteBytecode(shader, 9, &res, &size); + SlDeleteShader(shader); + if (FAILED(hr)) + { + ERR("SlWriteBytecode failed with error 0x%08x.\n", hr); + return D3DXERR_INVALIDDATA; + } + + if (shader_blob) + { + hr = D3DCreateBlob(size, &buffer); + if (FAILED(hr)) + { + HeapFree(GetProcessHeap(), 0, res); + return hr; + } + memcpy(ID3D10Blob_GetBufferPointer(buffer), res, size); + *shader_blob = buffer; + } + + HeapFree(GetProcessHeap(), 0, res); + + return S_OK; +} + +HRESULT WINAPI D3DCompile(const void *data, SIZE_T data_size, const char *filename, + const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint, + const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages) +{ + HRESULT hr; + + TRACE("data %p, data_size %lu, filename %s, defines %p, include %p, entrypoint %s,\n" + "target %s, sflags %#x, eflags %#x, shader %p, error_messages %p\n", + data, data_size, debugstr_a(filename), defines, include, debugstr_a(entrypoint), + debugstr_a(target), sflags, eflags, shader, error_messages); + + if (shader) *shader = NULL; + if (error_messages) *error_messages = NULL; + + EnterCriticalSection(&wpp_mutex); + + hr = preprocess_shader(data, data_size, filename, defines, include, error_messages); + if (SUCCEEDED(hr)) + hr = compile_shader(wpp_output, target, entrypoint, shader, error_messages); + + HeapFree(GetProcessHeap(), 0, wpp_output); + LeaveCriticalSection(&wpp_mutex); + return hr; +} + +HRESULT WINAPI D3DPreprocess(const void *data, SIZE_T size, const char *filename, + const D3D_SHADER_MACRO *defines, ID3DInclude *include, + ID3DBlob **shader, ID3DBlob **error_messages) +{ + HRESULT hr; + ID3DBlob *buffer; + + TRACE("data %p, size %lu, filename %s, defines %p, include %p, shader %p, error_messages %p\n", + data, size, debugstr_a(filename), defines, include, shader, error_messages); + + if (!data) + return E_INVALIDARG; + + EnterCriticalSection(&wpp_mutex); + + if (shader) *shader = NULL; + if (error_messages) *error_messages = NULL; + + hr = preprocess_shader(data, size, filename, defines, include, error_messages); + + if (SUCCEEDED(hr)) + { + if (shader) + { + hr = D3DCreateBlob(wpp_output_size, &buffer); + if (FAILED(hr)) + goto cleanup; + CopyMemory(ID3D10Blob_GetBufferPointer(buffer), wpp_output, wpp_output_size); + *shader = buffer; + } + else + hr = E_INVALIDARG; + } + +cleanup: + HeapFree(GetProcessHeap(), 0, wpp_output); + LeaveCriticalSection(&wpp_mutex); + return hr; +} + +HRESULT WINAPI D3DDisassemble(const void *data, SIZE_T size, UINT flags, const char *comments, ID3DBlob **disassembly) +{ + FIXME("data %p, size %lu, flags %#x, comments %p, disassembly %p stub!\n", + data, size, flags, comments, disassembly); + return E_NOTIMPL; +} diff --git a/dll/directx/wine/d3dcompiler_43/d3dcompiler_43.spec b/dll/directx/wine/d3dcompiler_43/d3dcompiler_43.spec new file mode 100644 index 00000000000..21ff9b4a81e --- /dev/null +++ b/dll/directx/wine/d3dcompiler_43/d3dcompiler_43.spec @@ -0,0 +1,17 @@ +@ stdcall D3DAssemble(ptr long str ptr ptr long ptr ptr) +@ stub DebugSetMute +@ stdcall D3DCompile(ptr long str ptr ptr str str long long ptr ptr) +@ stub D3DCompressShaders +@ stdcall D3DCreateBlob(long ptr) +@ stub D3DDecompressShaders +@ stdcall -stub D3DDisassemble10Effect(ptr long ptr) +@ stdcall D3DDisassemble(ptr long long ptr ptr) +@ stdcall D3DGetBlobPart(ptr long long long ptr) +@ stdcall D3DGetDebugInfo(ptr long ptr) +@ stdcall D3DGetInputAndOutputSignatureBlob(ptr long ptr) +@ stdcall D3DGetInputSignatureBlob(ptr long ptr) +@ stdcall D3DGetOutputSignatureBlob(ptr long ptr) +@ stdcall D3DPreprocess(ptr long str ptr ptr ptr ptr) +@ stdcall D3DReflect(ptr long ptr ptr) +@ stub D3DReturnFailure1 +@ stdcall D3DStripShader(ptr long long ptr) diff --git a/dll/directx/wine/d3dcompiler_43/d3dcompiler_43_main.c b/dll/directx/wine/d3dcompiler_43/d3dcompiler_43_main.c new file mode 100644 index 00000000000..0c664710935 --- /dev/null +++ b/dll/directx/wine/d3dcompiler_43/d3dcompiler_43_main.c @@ -0,0 +1,42 @@ +/* + * Direct3D shader compiler main file + * + * Copyright 2010 Matteo Bruni for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "config.h" + +#include + +#include "windef.h" +#include "winbase.h" + +#include "d3dcompiler_private.h" + +BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) +{ + switch (reason) + { + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(inst); + break; + } + return TRUE; +} diff --git a/dll/directx/wine/d3dcompiler_43/d3dcompiler_private.h b/dll/directx/wine/d3dcompiler_43/d3dcompiler_private.h new file mode 100644 index 00000000000..d25b4e54d56 --- /dev/null +++ b/dll/directx/wine/d3dcompiler_43/d3dcompiler_private.h @@ -0,0 +1,1215 @@ +/* + * Copyright 2008 Stefan Dösinger + * Copyright 2009 Matteo Bruni + * Copyright 2010 Rico Schüller + * Copyright 2012 Matteo Bruni for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_D3DCOMPILER_PRIVATE_H +#define __WINE_D3DCOMPILER_PRIVATE_H + +#include "wine/debug.h" +#include "wine/list.h" +#include "wine/rbtree.h" + +#define COBJMACROS +#include "windef.h" +#include "winbase.h" +#include "objbase.h" + +#include "d3dcompiler.h" + +#include + +/* + * This doesn't belong here, but for some functions it is possible to return that value, + * see http://msdn.microsoft.com/en-us/library/bb205278%28v=VS.85%29.aspx + * The original definition is in D3DX10core.h. + */ +#define D3DERR_INVALIDCALL 0x8876086c + +/* TRACE helper functions */ +const char *debug_d3dcompiler_d3d_blob_part(D3D_BLOB_PART part) DECLSPEC_HIDDEN; +const char *debug_d3dcompiler_shader_variable_class(D3D_SHADER_VARIABLE_CLASS c) DECLSPEC_HIDDEN; +const char *debug_d3dcompiler_shader_variable_type(D3D_SHADER_VARIABLE_TYPE t) DECLSPEC_HIDDEN; + +enum shader_type +{ + ST_UNKNOWN, + ST_VERTEX, + ST_PIXEL +}; + +typedef enum BWRITER_COMPARISON_TYPE { + BWRITER_COMPARISON_NONE, + BWRITER_COMPARISON_GT, + BWRITER_COMPARISON_EQ, + BWRITER_COMPARISON_GE, + BWRITER_COMPARISON_LT, + BWRITER_COMPARISON_NE, + BWRITER_COMPARISON_LE +} BWRITER_COMPARISON_TYPE; + +struct constant { + DWORD regnum; + union { + float f; + INT i; + BOOL b; + DWORD d; + } value[4]; +}; + +struct shader_reg { + DWORD type; + DWORD regnum; + struct shader_reg *rel_reg; + DWORD srcmod; + union { + DWORD swizzle; + DWORD writemask; + } u; +}; + +struct instruction { + DWORD opcode; + DWORD dstmod; + DWORD shift; + BWRITER_COMPARISON_TYPE comptype; + BOOL has_dst; + struct shader_reg dst; + struct shader_reg *src; + unsigned int num_srcs; /* For freeing the rel_regs */ + BOOL has_predicate; + struct shader_reg predicate; + BOOL coissue; +}; + +struct declaration { + DWORD usage, usage_idx; + DWORD regnum; + DWORD mod; + DWORD writemask; + BOOL builtin; +}; + +struct samplerdecl { + DWORD type; + DWORD regnum; + DWORD mod; +}; + +#define INSTRARRAY_INITIAL_SIZE 8 +struct bwriter_shader { + enum shader_type type; + + /* Shader version selected */ + DWORD version; + + /* Local constants. Every constant that is not defined below is loaded from + * the global constant set at shader runtime + */ + struct constant **constF; + struct constant **constI; + struct constant **constB; + unsigned int num_cf, num_ci, num_cb; + + /* Declared input and output varyings */ + struct declaration *inputs, *outputs; + unsigned int num_inputs, num_outputs; + struct samplerdecl *samplers; + unsigned int num_samplers; + + /* Are special pixel shader 3.0 registers declared? */ + BOOL vPos, vFace; + + /* Array of shader instructions - The shader code itself */ + struct instruction **instr; + unsigned int num_instrs, instr_alloc_size; +}; + +static inline void *d3dcompiler_alloc(SIZE_T size) +{ + return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); +} + +static inline void *d3dcompiler_realloc(void *ptr, SIZE_T size) +{ + return HeapReAlloc(GetProcessHeap(), 0, ptr, size); +} + +static inline BOOL d3dcompiler_free(void *ptr) +{ + return HeapFree(GetProcessHeap(), 0, ptr); +} + +static inline char *d3dcompiler_strdup(const char *string) +{ + char *copy; + SIZE_T len; + + if (!string) + return NULL; + + len = strlen(string); + copy = d3dcompiler_alloc(len + 1); + if (copy) + memcpy(copy, string, len + 1); + return copy; +} + +struct asm_parser; + +/* This structure is only used in asmshader.y, but since the .l file accesses the semantic types + * too it has to know it as well + */ +struct rel_reg { + BOOL has_rel_reg; + DWORD type; + DWORD additional_offset; + DWORD rel_regnum; + DWORD swizzle; +}; + +#define MAX_SRC_REGS 4 + +struct src_regs { + struct shader_reg reg[MAX_SRC_REGS]; + unsigned int count; +}; + +struct asmparser_backend { + void (*constF)(struct asm_parser *This, DWORD reg, float x, float y, float z, float w); + void (*constI)(struct asm_parser *This, DWORD reg, INT x, INT y, INT z, INT w); + void (*constB)(struct asm_parser *This, DWORD reg, BOOL x); + + void (*dstreg)(struct asm_parser *This, struct instruction *instr, + const struct shader_reg *dst); + void (*srcreg)(struct asm_parser *This, struct instruction *instr, int num, + const struct shader_reg *src); + + void (*predicate)(struct asm_parser *This, + const struct shader_reg *predicate); + void (*coissue)(struct asm_parser *This); + + void (*dcl_output)(struct asm_parser *This, DWORD usage, DWORD num, + const struct shader_reg *reg); + void (*dcl_input)(struct asm_parser *This, DWORD usage, DWORD num, + DWORD mod, const struct shader_reg *reg); + void (*dcl_sampler)(struct asm_parser *This, DWORD samptype, DWORD mod, + DWORD regnum, unsigned int line_no); + + void (*end)(struct asm_parser *This); + + void (*instr)(struct asm_parser *This, DWORD opcode, DWORD mod, DWORD shift, + BWRITER_COMPARISON_TYPE comp, const struct shader_reg *dst, + const struct src_regs *srcs, int expectednsrcs); +}; + +struct instruction *alloc_instr(unsigned int srcs) DECLSPEC_HIDDEN; +BOOL add_instruction(struct bwriter_shader *shader, struct instruction *instr) DECLSPEC_HIDDEN; +BOOL add_constF(struct bwriter_shader *shader, DWORD reg, float x, float y, float z, float w) DECLSPEC_HIDDEN; +BOOL add_constI(struct bwriter_shader *shader, DWORD reg, INT x, INT y, INT z, INT w) DECLSPEC_HIDDEN; +BOOL add_constB(struct bwriter_shader *shader, DWORD reg, BOOL x) DECLSPEC_HIDDEN; +BOOL record_declaration(struct bwriter_shader *shader, DWORD usage, DWORD usage_idx, + DWORD mod, BOOL output, DWORD regnum, DWORD writemask, BOOL builtin) DECLSPEC_HIDDEN; +BOOL record_sampler(struct bwriter_shader *shader, DWORD samptype, DWORD mod, DWORD regnum) DECLSPEC_HIDDEN; + +#define MESSAGEBUFFER_INITIAL_SIZE 256 + +enum parse_status +{ + PARSE_SUCCESS = 0, + PARSE_WARN = 1, + PARSE_ERR = 2 +}; + +struct compilation_messages +{ + char *string; + unsigned int size; + unsigned int capacity; +}; + +struct asm_parser +{ + /* The function table of the parser implementation */ + const struct asmparser_backend *funcs; + + /* Private data follows */ + struct bwriter_shader *shader; + unsigned int m3x3pad_count; + + enum parse_status status; + struct compilation_messages messages; + unsigned int line_no; +}; + +extern struct asm_parser asm_ctx DECLSPEC_HIDDEN; + +void create_vs10_parser(struct asm_parser *ret) DECLSPEC_HIDDEN; +void create_vs11_parser(struct asm_parser *ret) DECLSPEC_HIDDEN; +void create_vs20_parser(struct asm_parser *ret) DECLSPEC_HIDDEN; +void create_vs2x_parser(struct asm_parser *ret) DECLSPEC_HIDDEN; +void create_vs30_parser(struct asm_parser *ret) DECLSPEC_HIDDEN; +void create_ps10_parser(struct asm_parser *ret) DECLSPEC_HIDDEN; +void create_ps11_parser(struct asm_parser *ret) DECLSPEC_HIDDEN; +void create_ps12_parser(struct asm_parser *ret) DECLSPEC_HIDDEN; +void create_ps13_parser(struct asm_parser *ret) DECLSPEC_HIDDEN; +void create_ps14_parser(struct asm_parser *ret) DECLSPEC_HIDDEN; +void create_ps20_parser(struct asm_parser *ret) DECLSPEC_HIDDEN; +void create_ps2x_parser(struct asm_parser *ret) DECLSPEC_HIDDEN; +void create_ps30_parser(struct asm_parser *ret) DECLSPEC_HIDDEN; + +struct bwriter_shader *parse_asm_shader(char **messages) DECLSPEC_HIDDEN; + +#ifdef __GNUC__ +#define PRINTF_ATTR(fmt,args) __attribute__((format (printf,fmt,args))) +#else +#define PRINTF_ATTR(fmt,args) +#endif + +void compilation_message(struct compilation_messages *msg, const char *fmt, va_list args) DECLSPEC_HIDDEN; +void asmparser_message(struct asm_parser *ctx, const char *fmt, ...) PRINTF_ATTR(2,3) DECLSPEC_HIDDEN; +static inline void set_parse_status(enum parse_status *current, enum parse_status update) +{ + if (update == PARSE_ERR) + *current = PARSE_ERR; + else if (update == PARSE_WARN && *current == PARSE_SUCCESS) + *current = PARSE_WARN; +} + +/* A reasonable value as initial size */ +#define BYTECODEBUFFER_INITIAL_SIZE 32 +struct bytecode_buffer { + DWORD *data; + DWORD size; + DWORD alloc_size; + /* For tracking rare out of memory situations without passing + * return values around everywhere + */ + HRESULT state; +}; + +struct bc_writer; /* Predeclaration for use in vtable parameters */ + +typedef void (*instr_writer)(struct bc_writer *This, + const struct instruction *instr, + struct bytecode_buffer *buffer); + +struct bytecode_backend { + void (*header)(struct bc_writer *This, const struct bwriter_shader *shader, + struct bytecode_buffer *buffer); + void (*end)(struct bc_writer *This, const struct bwriter_shader *shader, + struct bytecode_buffer *buffer); + void (*srcreg)(struct bc_writer *This, const struct shader_reg *reg, + struct bytecode_buffer *buffer); + void (*dstreg)(struct bc_writer *This, const struct shader_reg *reg, + struct bytecode_buffer *buffer, DWORD shift, DWORD mod); + void (*opcode)(struct bc_writer *This, const struct instruction *instr, + DWORD token, struct bytecode_buffer *buffer); + + const struct instr_handler_table { + DWORD opcode; + instr_writer func; + } *instructions; +}; + +/* Bytecode writing stuff */ +struct bc_writer { + const struct bytecode_backend *funcs; + + /* Avoid result checking */ + HRESULT state; + + DWORD version; + + /* Vertex shader varying mapping */ + DWORD oPos_regnum; + DWORD oD_regnum[2]; + DWORD oT_regnum[8]; + DWORD oFog_regnum; + DWORD oFog_mask; + DWORD oPts_regnum; + DWORD oPts_mask; + + /* Pixel shader specific members */ + DWORD t_regnum[8]; + DWORD v_regnum[2]; +}; + +/* Debug utility routines */ +const char *debug_print_srcmod(DWORD mod) DECLSPEC_HIDDEN; +const char *debug_print_dstmod(DWORD mod) DECLSPEC_HIDDEN; +const char *debug_print_shift(DWORD shift) DECLSPEC_HIDDEN; +const char *debug_print_dstreg(const struct shader_reg *reg) DECLSPEC_HIDDEN; +const char *debug_print_srcreg(const struct shader_reg *reg) DECLSPEC_HIDDEN; +const char *debug_print_comp(DWORD comp) DECLSPEC_HIDDEN; +const char *debug_print_opcode(DWORD opcode) DECLSPEC_HIDDEN; + +/* Used to signal an incorrect swizzle/writemask */ +#define SWIZZLE_ERR ~0U + +/* + Enumerations and defines used in the bytecode writer + intermediate representation +*/ +typedef enum _BWRITERSHADER_INSTRUCTION_OPCODE_TYPE { + BWRITERSIO_NOP, + BWRITERSIO_MOV, + BWRITERSIO_ADD, + BWRITERSIO_SUB, + BWRITERSIO_MAD, + BWRITERSIO_MUL, + BWRITERSIO_RCP, + BWRITERSIO_RSQ, + BWRITERSIO_DP3, + BWRITERSIO_DP4, + BWRITERSIO_MIN, + BWRITERSIO_MAX, + BWRITERSIO_SLT, + BWRITERSIO_SGE, + BWRITERSIO_EXP, + BWRITERSIO_LOG, + BWRITERSIO_LIT, + BWRITERSIO_DST, + BWRITERSIO_LRP, + BWRITERSIO_FRC, + BWRITERSIO_M4x4, + BWRITERSIO_M4x3, + BWRITERSIO_M3x4, + BWRITERSIO_M3x3, + BWRITERSIO_M3x2, + BWRITERSIO_CALL, + BWRITERSIO_CALLNZ, + BWRITERSIO_LOOP, + BWRITERSIO_RET, + BWRITERSIO_ENDLOOP, + BWRITERSIO_LABEL, + BWRITERSIO_DCL, + BWRITERSIO_POW, + BWRITERSIO_CRS, + BWRITERSIO_SGN, + BWRITERSIO_ABS, + BWRITERSIO_NRM, + BWRITERSIO_SINCOS, + BWRITERSIO_REP, + BWRITERSIO_ENDREP, + BWRITERSIO_IF, + BWRITERSIO_IFC, + BWRITERSIO_ELSE, + BWRITERSIO_ENDIF, + BWRITERSIO_BREAK, + BWRITERSIO_BREAKC, + BWRITERSIO_MOVA, + BWRITERSIO_DEFB, + BWRITERSIO_DEFI, + + BWRITERSIO_TEXCOORD, + BWRITERSIO_TEXKILL, + BWRITERSIO_TEX, + BWRITERSIO_TEXBEM, + BWRITERSIO_TEXBEML, + BWRITERSIO_TEXREG2AR, + BWRITERSIO_TEXREG2GB, + BWRITERSIO_TEXM3x2PAD, + BWRITERSIO_TEXM3x2TEX, + BWRITERSIO_TEXM3x3PAD, + BWRITERSIO_TEXM3x3TEX, + BWRITERSIO_TEXM3x3SPEC, + BWRITERSIO_TEXM3x3VSPEC, + BWRITERSIO_EXPP, + BWRITERSIO_LOGP, + BWRITERSIO_CND, + BWRITERSIO_DEF, + BWRITERSIO_TEXREG2RGB, + BWRITERSIO_TEXDP3TEX, + BWRITERSIO_TEXM3x2DEPTH, + BWRITERSIO_TEXDP3, + BWRITERSIO_TEXM3x3, + BWRITERSIO_TEXDEPTH, + BWRITERSIO_CMP, + BWRITERSIO_BEM, + BWRITERSIO_DP2ADD, + BWRITERSIO_DSX, + BWRITERSIO_DSY, + BWRITERSIO_TEXLDD, + BWRITERSIO_SETP, + BWRITERSIO_TEXLDL, + BWRITERSIO_BREAKP, + BWRITERSIO_TEXLDP, + BWRITERSIO_TEXLDB, + + BWRITERSIO_PHASE, + BWRITERSIO_COMMENT, + BWRITERSIO_END, +} BWRITERSHADER_INSTRUCTION_OPCODE_TYPE; + +typedef enum _BWRITERSHADER_PARAM_REGISTER_TYPE { + BWRITERSPR_TEMP, + BWRITERSPR_INPUT, + BWRITERSPR_CONST, + BWRITERSPR_ADDR, + BWRITERSPR_TEXTURE, + BWRITERSPR_RASTOUT, + BWRITERSPR_ATTROUT, + BWRITERSPR_TEXCRDOUT, + BWRITERSPR_OUTPUT, + BWRITERSPR_CONSTINT, + BWRITERSPR_COLOROUT, + BWRITERSPR_DEPTHOUT, + BWRITERSPR_SAMPLER, + BWRITERSPR_CONSTBOOL, + BWRITERSPR_LOOP, + BWRITERSPR_MISCTYPE, + BWRITERSPR_LABEL, + BWRITERSPR_PREDICATE +} BWRITERSHADER_PARAM_REGISTER_TYPE; + +typedef enum _BWRITERVS_RASTOUT_OFFSETS +{ + BWRITERSRO_POSITION, + BWRITERSRO_FOG, + BWRITERSRO_POINT_SIZE +} BWRITERVS_RASTOUT_OFFSETS; + +#define BWRITERSP_WRITEMASK_0 0x1 /* .x r */ +#define BWRITERSP_WRITEMASK_1 0x2 /* .y g */ +#define BWRITERSP_WRITEMASK_2 0x4 /* .z b */ +#define BWRITERSP_WRITEMASK_3 0x8 /* .w a */ +#define BWRITERSP_WRITEMASK_ALL 0xf /* all */ + +typedef enum _BWRITERSHADER_PARAM_DSTMOD_TYPE { + BWRITERSPDM_NONE = 0, + BWRITERSPDM_SATURATE = 1, + BWRITERSPDM_PARTIALPRECISION = 2, + BWRITERSPDM_MSAMPCENTROID = 4, +} BWRITERSHADER_PARAM_DSTMOD_TYPE; + +typedef enum _BWRITERSAMPLER_TEXTURE_TYPE { + BWRITERSTT_UNKNOWN = 0, + BWRITERSTT_1D = 1, + BWRITERSTT_2D = 2, + BWRITERSTT_CUBE = 3, + BWRITERSTT_VOLUME = 4, +} BWRITERSAMPLER_TEXTURE_TYPE; + +#define BWRITERSI_TEXLD_PROJECT 1 +#define BWRITERSI_TEXLD_BIAS 2 + +typedef enum _BWRITERSHADER_PARAM_SRCMOD_TYPE { + BWRITERSPSM_NONE = 0, + BWRITERSPSM_NEG, + BWRITERSPSM_BIAS, + BWRITERSPSM_BIASNEG, + BWRITERSPSM_SIGN, + BWRITERSPSM_SIGNNEG, + BWRITERSPSM_COMP, + BWRITERSPSM_X2, + BWRITERSPSM_X2NEG, + BWRITERSPSM_DZ, + BWRITERSPSM_DW, + BWRITERSPSM_ABS, + BWRITERSPSM_ABSNEG, + BWRITERSPSM_NOT, +} BWRITERSHADER_PARAM_SRCMOD_TYPE; + +#define BWRITER_SM1_VS 0xfffe +#define BWRITER_SM1_PS 0xffff + +#define BWRITERPS_VERSION(major, minor) ((BWRITER_SM1_PS << 16) | ((major) << 8) | (minor)) +#define BWRITERVS_VERSION(major, minor) ((BWRITER_SM1_VS << 16) | ((major) << 8) | (minor)) + +#define BWRITERVS_SWIZZLE_SHIFT 16 +#define BWRITERVS_SWIZZLE_MASK (0xFF << BWRITERVS_SWIZZLE_SHIFT) + +#define BWRITERVS_X_X (0 << BWRITERVS_SWIZZLE_SHIFT) +#define BWRITERVS_X_Y (1 << BWRITERVS_SWIZZLE_SHIFT) +#define BWRITERVS_X_Z (2 << BWRITERVS_SWIZZLE_SHIFT) +#define BWRITERVS_X_W (3 << BWRITERVS_SWIZZLE_SHIFT) + +#define BWRITERVS_Y_X (0 << (BWRITERVS_SWIZZLE_SHIFT + 2)) +#define BWRITERVS_Y_Y (1 << (BWRITERVS_SWIZZLE_SHIFT + 2)) +#define BWRITERVS_Y_Z (2 << (BWRITERVS_SWIZZLE_SHIFT + 2)) +#define BWRITERVS_Y_W (3 << (BWRITERVS_SWIZZLE_SHIFT + 2)) + +#define BWRITERVS_Z_X (0 << (BWRITERVS_SWIZZLE_SHIFT + 4)) +#define BWRITERVS_Z_Y (1 << (BWRITERVS_SWIZZLE_SHIFT + 4)) +#define BWRITERVS_Z_Z (2 << (BWRITERVS_SWIZZLE_SHIFT + 4)) +#define BWRITERVS_Z_W (3 << (BWRITERVS_SWIZZLE_SHIFT + 4)) + +#define BWRITERVS_W_X (0 << (BWRITERVS_SWIZZLE_SHIFT + 6)) +#define BWRITERVS_W_Y (1 << (BWRITERVS_SWIZZLE_SHIFT + 6)) +#define BWRITERVS_W_Z (2 << (BWRITERVS_SWIZZLE_SHIFT + 6)) +#define BWRITERVS_W_W (3 << (BWRITERVS_SWIZZLE_SHIFT + 6)) + +#define BWRITERVS_NOSWIZZLE (BWRITERVS_X_X | BWRITERVS_Y_Y | BWRITERVS_Z_Z | BWRITERVS_W_W) + +#define BWRITERVS_SWIZZLE_X (BWRITERVS_X_X | BWRITERVS_Y_X | BWRITERVS_Z_X | BWRITERVS_W_X) +#define BWRITERVS_SWIZZLE_Y (BWRITERVS_X_Y | BWRITERVS_Y_Y | BWRITERVS_Z_Y | BWRITERVS_W_Y) +#define BWRITERVS_SWIZZLE_Z (BWRITERVS_X_Z | BWRITERVS_Y_Z | BWRITERVS_Z_Z | BWRITERVS_W_Z) +#define BWRITERVS_SWIZZLE_W (BWRITERVS_X_W | BWRITERVS_Y_W | BWRITERVS_Z_W | BWRITERVS_W_W) + +typedef enum _BWRITERDECLUSAGE { + BWRITERDECLUSAGE_POSITION, + BWRITERDECLUSAGE_BLENDWEIGHT, + BWRITERDECLUSAGE_BLENDINDICES, + BWRITERDECLUSAGE_NORMAL, + BWRITERDECLUSAGE_PSIZE, + BWRITERDECLUSAGE_TEXCOORD, + BWRITERDECLUSAGE_TANGENT, + BWRITERDECLUSAGE_BINORMAL, + BWRITERDECLUSAGE_TESSFACTOR, + BWRITERDECLUSAGE_POSITIONT, + BWRITERDECLUSAGE_COLOR, + BWRITERDECLUSAGE_FOG, + BWRITERDECLUSAGE_DEPTH, + BWRITERDECLUSAGE_SAMPLE +} BWRITERDECLUSAGE; + +/* ps 1.x texture registers mappings */ +#define T0_REG 2 +#define T1_REG 3 +#define T2_REG 4 +#define T3_REG 5 + +struct bwriter_shader *SlAssembleShader(const char *text, char **messages) DECLSPEC_HIDDEN; +HRESULT SlWriteBytecode(const struct bwriter_shader *shader, int dxversion, DWORD **result, DWORD *size) DECLSPEC_HIDDEN; +void SlDeleteShader(struct bwriter_shader *shader) DECLSPEC_HIDDEN; + +/* The general IR structure is inspired by Mesa GLSL hir, even though the code + * ends up being quite different in practice. Anyway, here comes the relevant + * licensing information. + * + * Copyright © 2010 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +enum hlsl_type_class +{ + HLSL_CLASS_SCALAR, + HLSL_CLASS_VECTOR, + HLSL_CLASS_MATRIX, + HLSL_CLASS_LAST_NUMERIC = HLSL_CLASS_MATRIX, + HLSL_CLASS_STRUCT, + HLSL_CLASS_ARRAY, + HLSL_CLASS_OBJECT, +}; + +enum hlsl_base_type +{ + HLSL_TYPE_FLOAT, + HLSL_TYPE_HALF, + HLSL_TYPE_DOUBLE, + HLSL_TYPE_INT, + HLSL_TYPE_UINT, + HLSL_TYPE_BOOL, + HLSL_TYPE_LAST_SCALAR = HLSL_TYPE_BOOL, + HLSL_TYPE_SAMPLER, + HLSL_TYPE_TEXTURE, + HLSL_TYPE_PIXELSHADER, + HLSL_TYPE_VERTEXSHADER, + HLSL_TYPE_STRING, + HLSL_TYPE_VOID, +}; + +enum hlsl_sampler_dim +{ + HLSL_SAMPLER_DIM_GENERIC, + HLSL_SAMPLER_DIM_1D, + HLSL_SAMPLER_DIM_2D, + HLSL_SAMPLER_DIM_3D, + HLSL_SAMPLER_DIM_CUBE, +}; + +enum hlsl_matrix_majority +{ + HLSL_COLUMN_MAJOR, + HLSL_ROW_MAJOR +}; + +struct hlsl_type +{ + struct list entry; + struct wine_rb_entry scope_entry; + enum hlsl_type_class type; + enum hlsl_base_type base_type; + enum hlsl_sampler_dim sampler_dim; + const char *name; + unsigned int modifiers; + unsigned int dimx; + unsigned int dimy; + union + { + struct list *elements; + struct + { + struct hlsl_type *type; + unsigned int elements_count; + } array; + } e; +}; + +struct hlsl_struct_field +{ + struct list entry; + struct hlsl_type *type; + const char *name; + const char *semantic; + DWORD modifiers; +}; + +struct source_location +{ + const char *file; + unsigned int line; + unsigned int col; +}; + +enum hlsl_ir_node_type +{ + HLSL_IR_VAR = 0, + HLSL_IR_ASSIGNMENT, + HLSL_IR_CONSTANT, + HLSL_IR_CONSTRUCTOR, + HLSL_IR_DEREF, + HLSL_IR_EXPR, + HLSL_IR_FUNCTION_DECL, + HLSL_IR_IF, + HLSL_IR_LOOP, + HLSL_IR_JUMP, + HLSL_IR_SWIZZLE, +}; + +struct hlsl_ir_node +{ + struct list entry; + enum hlsl_ir_node_type type; + struct hlsl_type *data_type; + + struct source_location loc; +}; + +#define HLSL_STORAGE_EXTERN 0x00000001 +#define HLSL_STORAGE_NOINTERPOLATION 0x00000002 +#define HLSL_MODIFIER_PRECISE 0x00000004 +#define HLSL_STORAGE_SHARED 0x00000008 +#define HLSL_STORAGE_GROUPSHARED 0x00000010 +#define HLSL_STORAGE_STATIC 0x00000020 +#define HLSL_STORAGE_UNIFORM 0x00000040 +#define HLSL_STORAGE_VOLATILE 0x00000080 +#define HLSL_MODIFIER_CONST 0x00000100 +#define HLSL_MODIFIER_ROW_MAJOR 0x00000200 +#define HLSL_MODIFIER_COLUMN_MAJOR 0x00000400 +#define HLSL_MODIFIER_IN 0x00000800 +#define HLSL_MODIFIER_OUT 0x00001000 + +#define HLSL_TYPE_MODIFIERS_MASK (HLSL_MODIFIER_PRECISE | HLSL_STORAGE_VOLATILE | \ + HLSL_MODIFIER_CONST | HLSL_MODIFIER_ROW_MAJOR | \ + HLSL_MODIFIER_COLUMN_MAJOR) + +#define HLSL_MODIFIERS_COMPARISON_MASK (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR) + +struct hlsl_ir_var +{ + struct hlsl_ir_node node; + const char *name; + const char *semantic; + unsigned int modifiers; + struct list scope_entry; + + struct hlsl_var_allocation *allocation; +}; + +struct hlsl_ir_function +{ + struct wine_rb_entry entry; + const char *name; + struct wine_rb_tree overloads; + BOOL intrinsic; +}; + +struct hlsl_ir_function_decl +{ + struct hlsl_ir_node node; + struct wine_rb_entry entry; + struct hlsl_ir_function *func; + const char *semantic; + struct list *parameters; + struct list *body; +}; + +struct hlsl_ir_if +{ + struct hlsl_ir_node node; + struct hlsl_ir_node *condition; + struct list *then_instrs; + struct list *else_instrs; +}; + +struct hlsl_ir_loop +{ + struct hlsl_ir_node node; + /* loop condition is stored in the body (as "if (!condition) break;") */ + struct list *body; +}; + +struct hlsl_ir_assignment +{ + struct hlsl_ir_node node; + struct hlsl_ir_node *lhs; + struct hlsl_ir_node *rhs; + unsigned char writemask; +}; + +enum hlsl_ir_expr_op { + HLSL_IR_UNOP_BIT_NOT = 0, + HLSL_IR_UNOP_LOGIC_NOT, + HLSL_IR_UNOP_NEG, + HLSL_IR_UNOP_ABS, + HLSL_IR_UNOP_SIGN, + HLSL_IR_UNOP_RCP, + HLSL_IR_UNOP_RSQ, + HLSL_IR_UNOP_SQRT, + HLSL_IR_UNOP_NRM, + HLSL_IR_UNOP_EXP2, + HLSL_IR_UNOP_LOG2, + + HLSL_IR_UNOP_CAST, + + HLSL_IR_UNOP_FRACT, + + HLSL_IR_UNOP_SIN, + HLSL_IR_UNOP_COS, + HLSL_IR_UNOP_SIN_REDUCED, /* Reduced range [-pi, pi] */ + HLSL_IR_UNOP_COS_REDUCED, /* Reduced range [-pi, pi] */ + + HLSL_IR_UNOP_DSX, + HLSL_IR_UNOP_DSY, + + HLSL_IR_UNOP_SAT, + + HLSL_IR_BINOP_ADD, + HLSL_IR_BINOP_SUB, + HLSL_IR_BINOP_MUL, + HLSL_IR_BINOP_DIV, + + HLSL_IR_BINOP_MOD, + + HLSL_IR_BINOP_LESS, + HLSL_IR_BINOP_GREATER, + HLSL_IR_BINOP_LEQUAL, + HLSL_IR_BINOP_GEQUAL, + HLSL_IR_BINOP_EQUAL, + HLSL_IR_BINOP_NEQUAL, + + HLSL_IR_BINOP_LOGIC_AND, + HLSL_IR_BINOP_LOGIC_OR, + + HLSL_IR_BINOP_LSHIFT, + HLSL_IR_BINOP_RSHIFT, + HLSL_IR_BINOP_BIT_AND, + HLSL_IR_BINOP_BIT_OR, + HLSL_IR_BINOP_BIT_XOR, + + HLSL_IR_BINOP_DOT, + HLSL_IR_BINOP_CRS, + HLSL_IR_BINOP_MIN, + HLSL_IR_BINOP_MAX, + + HLSL_IR_BINOP_POW, + + HLSL_IR_BINOP_PREINC, + HLSL_IR_BINOP_PREDEC, + HLSL_IR_BINOP_POSTINC, + HLSL_IR_BINOP_POSTDEC, + + HLSL_IR_TEROP_LERP, + + HLSL_IR_SEQUENCE, +}; + +struct hlsl_ir_expr +{ + struct hlsl_ir_node node; + enum hlsl_ir_expr_op op; + struct hlsl_ir_node *operands[3]; + struct list *subexpressions; +}; + +enum hlsl_ir_jump_type +{ + HLSL_IR_JUMP_BREAK, + HLSL_IR_JUMP_CONTINUE, + HLSL_IR_JUMP_DISCARD, + HLSL_IR_JUMP_RETURN, +}; + +struct hlsl_ir_jump +{ + struct hlsl_ir_node node; + enum hlsl_ir_jump_type type; + struct hlsl_ir_node *return_value; +}; + +struct hlsl_ir_swizzle +{ + struct hlsl_ir_node node; + struct hlsl_ir_node *val; + DWORD swizzle; +}; + +enum hlsl_ir_deref_type +{ + HLSL_IR_DEREF_VAR, + HLSL_IR_DEREF_ARRAY, + HLSL_IR_DEREF_RECORD, +}; + +struct hlsl_ir_deref +{ + struct hlsl_ir_node node; + enum hlsl_ir_deref_type type; + union + { + struct hlsl_ir_var *var; + struct + { + struct hlsl_ir_node *array; + struct hlsl_ir_node *index; + } array; + struct + { + struct hlsl_ir_node *record; + struct hlsl_struct_field *field; + } record; + } v; +}; + +struct hlsl_ir_constant +{ + struct hlsl_ir_node node; + union + { + union + { + unsigned u[16]; + int i[16]; + float f[16]; + double d[16]; + BOOL b[16]; + } value; + struct hlsl_ir_constant *array_elements; + struct list *struct_elements; + } v; +}; + +struct hlsl_ir_constructor +{ + struct hlsl_ir_node node; + struct list *arguments; +}; + +struct hlsl_scope +{ + struct list entry; + struct list vars; + struct wine_rb_tree types; + struct hlsl_scope *upper; +}; + +/* Structures used only during parsing */ +struct parse_parameter +{ + struct hlsl_type *type; + const char *name; + const char *semantic; + unsigned int modifiers; +}; + +struct parse_variable_def +{ + struct list entry; + struct source_location loc; + + char *name; + unsigned int array_size; + char *semantic; + struct list *initializer; +}; + +struct parse_function +{ + char *name; + struct hlsl_ir_function_decl *decl; +}; + +struct parse_if_body +{ + struct list *then_instrs; + struct list *else_instrs; +}; + +enum parse_unary_op +{ + UNARY_OP_PLUS, + UNARY_OP_MINUS, + UNARY_OP_LOGICNOT, + UNARY_OP_BITNOT, +}; + +enum parse_assign_op +{ + ASSIGN_OP_ASSIGN, + ASSIGN_OP_ADD, + ASSIGN_OP_SUB, + ASSIGN_OP_MUL, + ASSIGN_OP_DIV, + ASSIGN_OP_MOD, + ASSIGN_OP_LSHIFT, + ASSIGN_OP_RSHIFT, + ASSIGN_OP_AND, + ASSIGN_OP_OR, + ASSIGN_OP_XOR, +}; + +struct hlsl_parse_ctx +{ + const char **source_files; + unsigned int source_files_count; + const char *source_file; + unsigned int line_no; + unsigned int column; + enum parse_status status; + struct compilation_messages messages; + + struct hlsl_scope *cur_scope; + struct hlsl_scope *globals; + struct list scopes; + + struct list types; + struct wine_rb_tree functions; + + enum hlsl_matrix_majority matrix_majority; +}; + +extern struct hlsl_parse_ctx hlsl_ctx DECLSPEC_HIDDEN; + +enum hlsl_error_level +{ + HLSL_LEVEL_ERROR = 0, + HLSL_LEVEL_WARNING, + HLSL_LEVEL_NOTE, +}; + +void hlsl_message(const char *fmt, ...) PRINTF_ATTR(1,2) DECLSPEC_HIDDEN; +void hlsl_report_message(const char *filename, DWORD line, DWORD column, + enum hlsl_error_level level, const char *fmt, ...) PRINTF_ATTR(5,6) DECLSPEC_HIDDEN; + +static inline struct hlsl_ir_var *var_from_node(const struct hlsl_ir_node *node) +{ + assert(node->type == HLSL_IR_VAR); + return CONTAINING_RECORD(node, struct hlsl_ir_var, node); +} + +static inline struct hlsl_ir_expr *expr_from_node(const struct hlsl_ir_node *node) +{ + assert(node->type == HLSL_IR_EXPR); + return CONTAINING_RECORD(node, struct hlsl_ir_expr, node); +} + +static inline struct hlsl_ir_deref *deref_from_node(const struct hlsl_ir_node *node) +{ + assert(node->type == HLSL_IR_DEREF); + return CONTAINING_RECORD(node, struct hlsl_ir_deref, node); +} + +static inline struct hlsl_ir_constant *constant_from_node(const struct hlsl_ir_node *node) +{ + assert(node->type == HLSL_IR_CONSTANT); + return CONTAINING_RECORD(node, struct hlsl_ir_constant, node); +} + +static inline struct hlsl_ir_jump *jump_from_node(const struct hlsl_ir_node *node) +{ + assert(node->type == HLSL_IR_JUMP); + return CONTAINING_RECORD(node, struct hlsl_ir_jump, node); +} + +static inline struct hlsl_ir_assignment *assignment_from_node(const struct hlsl_ir_node *node) +{ + assert(node->type == HLSL_IR_ASSIGNMENT); + return CONTAINING_RECORD(node, struct hlsl_ir_assignment, node); +} + +static inline struct hlsl_ir_swizzle *swizzle_from_node(const struct hlsl_ir_node *node) +{ + assert(node->type == HLSL_IR_SWIZZLE); + return CONTAINING_RECORD(node, struct hlsl_ir_swizzle, node); +} + +static inline struct hlsl_ir_constructor *constructor_from_node(const struct hlsl_ir_node *node) +{ + assert(node->type == HLSL_IR_CONSTRUCTOR); + return CONTAINING_RECORD(node, struct hlsl_ir_constructor, node); +} + +static inline struct hlsl_ir_if *if_from_node(const struct hlsl_ir_node *node) +{ + assert(node->type == HLSL_IR_IF); + return CONTAINING_RECORD(node, struct hlsl_ir_if, node); +} + +static inline struct hlsl_ir_loop *loop_from_node(const struct hlsl_ir_node *node) +{ + assert(node->type == HLSL_IR_LOOP); + return CONTAINING_RECORD(node, struct hlsl_ir_loop, node); +} + +BOOL add_declaration(struct hlsl_scope *scope, struct hlsl_ir_var *decl, BOOL local_var) DECLSPEC_HIDDEN; +struct hlsl_ir_var *get_variable(struct hlsl_scope *scope, const char *name) DECLSPEC_HIDDEN; +void free_declaration(struct hlsl_ir_var *decl) DECLSPEC_HIDDEN; +BOOL add_func_parameter(struct list *list, struct parse_parameter *param, + const struct source_location *loc) DECLSPEC_HIDDEN; +struct hlsl_type *new_hlsl_type(const char *name, enum hlsl_type_class type_class, + enum hlsl_base_type base_type, unsigned dimx, unsigned dimy) DECLSPEC_HIDDEN; +struct hlsl_type *new_array_type(struct hlsl_type *basic_type, unsigned int array_size) DECLSPEC_HIDDEN; +struct hlsl_type *clone_hlsl_type(struct hlsl_type *old) DECLSPEC_HIDDEN; +struct hlsl_type *get_type(struct hlsl_scope *scope, const char *name, BOOL recursive) DECLSPEC_HIDDEN; +BOOL find_function(const char *name) DECLSPEC_HIDDEN; +unsigned int components_count_type(struct hlsl_type *type) DECLSPEC_HIDDEN; +BOOL compare_hlsl_types(const struct hlsl_type *t1, const struct hlsl_type *t2) DECLSPEC_HIDDEN; +BOOL compatible_data_types(struct hlsl_type *s1, struct hlsl_type *s2) DECLSPEC_HIDDEN; +struct hlsl_ir_expr *new_expr(enum hlsl_ir_expr_op op, struct hlsl_ir_node **operands, + struct source_location *loc) DECLSPEC_HIDDEN; +struct hlsl_ir_expr *new_cast(struct hlsl_ir_node *node, struct hlsl_type *type, + struct source_location *loc) DECLSPEC_HIDDEN; +struct hlsl_ir_expr *hlsl_mul(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) DECLSPEC_HIDDEN; +struct hlsl_ir_expr *hlsl_div(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) DECLSPEC_HIDDEN; +struct hlsl_ir_expr *hlsl_mod(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) DECLSPEC_HIDDEN; +struct hlsl_ir_expr *hlsl_add(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) DECLSPEC_HIDDEN; +struct hlsl_ir_expr *hlsl_sub(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) DECLSPEC_HIDDEN; +struct hlsl_ir_expr *hlsl_lt(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) DECLSPEC_HIDDEN; +struct hlsl_ir_expr *hlsl_gt(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) DECLSPEC_HIDDEN; +struct hlsl_ir_expr *hlsl_le(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) DECLSPEC_HIDDEN; +struct hlsl_ir_expr *hlsl_ge(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) DECLSPEC_HIDDEN; +struct hlsl_ir_expr *hlsl_eq(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) DECLSPEC_HIDDEN; +struct hlsl_ir_expr *hlsl_ne(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) DECLSPEC_HIDDEN; +struct hlsl_ir_deref *new_var_deref(struct hlsl_ir_var *var) DECLSPEC_HIDDEN; +struct hlsl_ir_deref *new_record_deref(struct hlsl_ir_node *record, struct hlsl_struct_field *field) DECLSPEC_HIDDEN; +struct hlsl_ir_node *make_assignment(struct hlsl_ir_node *left, enum parse_assign_op assign_op, + DWORD writemask, struct hlsl_ir_node *right) DECLSPEC_HIDDEN; +void push_scope(struct hlsl_parse_ctx *ctx) DECLSPEC_HIDDEN; +BOOL pop_scope(struct hlsl_parse_ctx *ctx) DECLSPEC_HIDDEN; +struct hlsl_ir_function_decl *new_func_decl(struct hlsl_type *return_type, struct list *parameters) DECLSPEC_HIDDEN; +void init_functions_tree(struct wine_rb_tree *funcs) DECLSPEC_HIDDEN; +void add_function_decl(struct wine_rb_tree *funcs, char *name, struct hlsl_ir_function_decl *decl, + BOOL intrinsic) DECLSPEC_HIDDEN; +struct bwriter_shader *parse_hlsl_shader(const char *text, enum shader_type type, DWORD major, DWORD minor, + const char *entrypoint, char **messages) DECLSPEC_HIDDEN; + +const char *debug_hlsl_type(const struct hlsl_type *type) DECLSPEC_HIDDEN; +const char *debug_modifiers(DWORD modifiers) DECLSPEC_HIDDEN; +void debug_dump_ir_function_decl(const struct hlsl_ir_function_decl *func) DECLSPEC_HIDDEN; + +void free_hlsl_type(struct hlsl_type *type) DECLSPEC_HIDDEN; +void free_instr(struct hlsl_ir_node *node) DECLSPEC_HIDDEN; +void free_instr_list(struct list *list) DECLSPEC_HIDDEN; +void free_function_rb(struct wine_rb_entry *entry, void *context) DECLSPEC_HIDDEN; + + +#define MAKE_TAG(ch0, ch1, ch2, ch3) \ + ((DWORD)(ch0) | ((DWORD)(ch1) << 8) | \ + ((DWORD)(ch2) << 16) | ((DWORD)(ch3) << 24 )) +#define TAG_Aon9 MAKE_TAG('A', 'o', 'n', '9') +#define TAG_DXBC MAKE_TAG('D', 'X', 'B', 'C') +#define TAG_ISGN MAKE_TAG('I', 'S', 'G', 'N') +#define TAG_OSGN MAKE_TAG('O', 'S', 'G', 'N') +#define TAG_OSG5 MAKE_TAG('O', 'S', 'G', '5') +#define TAG_PCSG MAKE_TAG('P', 'C', 'S', 'G') +#define TAG_RDEF MAKE_TAG('R', 'D', 'E', 'F') +#define TAG_SDBG MAKE_TAG('S', 'D', 'B', 'G') +#define TAG_SHDR MAKE_TAG('S', 'H', 'D', 'R') +#define TAG_SHEX MAKE_TAG('S', 'H', 'E', 'X') +#define TAG_STAT MAKE_TAG('S', 'T', 'A', 'T') +#define TAG_XNAP MAKE_TAG('X', 'N', 'A', 'P') +#define TAG_XNAS MAKE_TAG('X', 'N', 'A', 'S') + +struct dxbc_section +{ + DWORD tag; + const char *data; + DWORD data_size; +}; + +struct dxbc +{ + UINT size; + UINT count; + struct dxbc_section *sections; +}; + +HRESULT dxbc_write_blob(struct dxbc *dxbc, ID3DBlob **blob) DECLSPEC_HIDDEN; +void dxbc_destroy(struct dxbc *dxbc) DECLSPEC_HIDDEN; +HRESULT dxbc_parse(const char *data, SIZE_T data_size, struct dxbc *dxbc) DECLSPEC_HIDDEN; +HRESULT dxbc_add_section(struct dxbc *dxbc, DWORD tag, const char *data, DWORD data_size) DECLSPEC_HIDDEN; +HRESULT dxbc_init(struct dxbc *dxbc, DWORD count) DECLSPEC_HIDDEN; + +static inline void read_dword(const char **ptr, DWORD *d) +{ + memcpy(d, *ptr, sizeof(*d)); + *ptr += sizeof(*d); +} + +static inline void write_dword(char **ptr, DWORD d) +{ + memcpy(*ptr, &d, sizeof(d)); + *ptr += sizeof(d); +} + +void skip_dword_unknown(const char **ptr, unsigned int count) DECLSPEC_HIDDEN; + +#endif /* __WINE_D3DCOMPILER_PRIVATE_H */ diff --git a/dll/directx/wine/d3dcompiler_43/hlsl.l b/dll/directx/wine/d3dcompiler_43/hlsl.l new file mode 100644 index 00000000000..f40e3c9a049 --- /dev/null +++ b/dll/directx/wine/d3dcompiler_43/hlsl.l @@ -0,0 +1,294 @@ +/* + * HLSL parser + * + * Copyright 2008 Stefan Dösinger + * Copyright 2012 Matteo Bruni for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +%{ +#include "config.h" +#include "wine/port.h" +#include "wine/debug.h" + +#define YY_NO_UNISTD_H +#include "d3dcompiler_private.h" +#include "hlsl.tab.h" + +WINE_DEFAULT_DEBUG_CHANNEL(hlsl_parser); + +#define YY_USER_ACTION \ + do { \ + hlsl_lloc.first_column = hlsl_ctx.column; \ + hlsl_lloc.first_line = hlsl_ctx.line_no; \ + hlsl_ctx.column += yyleng; \ + } while(0); + +%} + +%option noyywrap nounput noinput never-interactive +%option prefix="hlsl_" + +%x pp pp_line pp_pragma pp_ignore + +RESERVED1 auto|case|catch|char|class|const_cast|default|delete|dynamic_cast|enum +RESERVED2 explicit|friend|goto|long|mutable|new|operator|private|protected|public +RESERVED3 reinterpret_cast|short|signed|sizeof|static_cast|template|this|throw|try +RESERVED4 typename|union|unsigned|using|virtual + +WS [ \t] +NEWLINE (\n)|(\r\n) +DOUBLESLASHCOMMENT "//"[^\n]* +STRING \"[^\"]*\" +IDENTIFIER [A-Za-z_][A-Za-z0-9_]* + +ANY (.) + +%% +{RESERVED1} { + hlsl_message("Line %u: Reserved keyword \"%s\" used.\n", hlsl_ctx.line_no, yytext); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + } +{RESERVED2} { + hlsl_message("Line %u: Reserved keyword \"%s\" used.\n", hlsl_ctx.line_no, yytext); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + } +{RESERVED3} { + hlsl_message("Line %u: Reserved keyword \"%s\" used.\n", hlsl_ctx.line_no, yytext); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + } +{RESERVED4} { + hlsl_message("Line %u: Reserved keyword \"%s\" used.\n", hlsl_ctx.line_no, yytext); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + } + +BlendState {return KW_BLENDSTATE; } +break {return KW_BREAK; } +Buffer {return KW_BUFFER; } +cbuffer {return KW_CBUFFER; } +compile {return KW_COMPILE; } +const {return KW_CONST; } +continue {return KW_CONTINUE; } +DepthStencilState {return KW_DEPTHSTENCILSTATE; } +DepthStencilView {return KW_DEPTHSTENCILVIEW; } +discard {return KW_DISCARD; } +do {return KW_DO; } +double {return KW_DOUBLE; } +else {return KW_ELSE; } +extern {return KW_EXTERN; } +false {return KW_FALSE; } +for {return KW_FOR; } +GeometryShader {return KW_GEOMETRYSHADER; } +groupshared {return KW_GROUPSHARED; } +if {return KW_IF; } +in {return KW_IN; } +inline {return KW_INLINE; } +inout {return KW_INOUT; } +matrix {return KW_MATRIX; } +namespace {return KW_NAMESPACE; } +nointerpolation {return KW_NOINTERPOLATION; } +out {return KW_OUT; } +pass {return KW_PASS; } +PixelShader {return KW_PIXELSHADER; } +precise {return KW_PRECISE; } +RasterizerState {return KW_RASTERIZERSTATE; } +RenderTargetView {return KW_RENDERTARGETVIEW; } +return {return KW_RETURN; } +register {return KW_REGISTER; } +sampler {return KW_SAMPLER; } +sampler1D {return KW_SAMPLER1D; } +sampler2D {return KW_SAMPLER2D; } +sampler3D {return KW_SAMPLER3D; } +samplerCUBE {return KW_SAMPLERCUBE; } +sampler_state {return KW_SAMPLER_STATE; } +SamplerComparisonState {return KW_SAMPLERCOMPARISONSTATE;} +shared {return KW_SHARED; } +stateblock {return KW_STATEBLOCK; } +stateblock_state {return KW_STATEBLOCK_STATE; } +static {return KW_STATIC; } +string {return KW_STRING; } +struct {return KW_STRUCT; } +switch {return KW_SWITCH; } +tbuffer {return KW_TBUFFER; } +technique {return KW_TECHNIQUE; } +technique10 {return KW_TECHNIQUE10; } +texture {return KW_TEXTURE; } +texture1D {return KW_TEXTURE1D; } +Texture1DArray {return KW_TEXTURE1DARRAY; } +texture2D {return KW_TEXTURE2D; } +Texture2DArray {return KW_TEXTURE2DARRAY; } +Texture2DMS {return KW_TEXTURE2DMS; } +Texture2DMSArray {return KW_TEXTURE2DMSARRAY; } +texture3D {return KW_TEXTURE3D; } +Texture3DArray {return KW_TEXTURE3DARRAY; } +textureCUBE {return KW_TEXTURECUBE; } +true {return KW_TRUE; } +typedef {return KW_TYPEDEF; } +uniform {return KW_UNIFORM; } +vector {return KW_VECTOR; } +VertexShader {return KW_VERTEXSHADER; } +void {return KW_VOID; } +volatile {return KW_VOLATILE; } +while {return KW_WHILE; } + +\+\+ {return OP_INC; } +\-\- {return OP_DEC; } +&& {return OP_AND; } +\|\| {return OP_OR; } +== {return OP_EQ; } +\<\< {return OP_LEFTSHIFT; } +\<\<= {return OP_LEFTSHIFTASSIGN; } +\>\> {return OP_RIGHTSHIFT; } +\>\>= {return OP_RIGHTSHIFTASSIGN; } +\.\.\. {return OP_ELLIPSIS; } +\<= {return OP_LE; } +\>= {return OP_GE; } +!= {return OP_NE; } +\+= {return OP_ADDASSIGN; } +\-= {return OP_SUBASSIGN; } +\*= {return OP_MULASSIGN; } +\/= {return OP_DIVASSIGN; } +%= {return OP_MODASSIGN; } +&= {return OP_ANDASSIGN; } +\|= {return OP_ORASSIGN; } +^= {return OP_XORASSIGN; } +## {return OP_UNKNOWN1; } +#@ {return OP_UNKNOWN2; } +:: {return OP_UNKNOWN3; } +\-\> {return OP_UNKNOWN4; } + +column_major {return KW_COLUMN_MAJOR; } +row_major {return KW_ROW_MAJOR; } + +{IDENTIFIER} { + hlsl_lval.name = d3dcompiler_strdup(yytext); + if (get_variable(hlsl_ctx.cur_scope, yytext) + || find_function(yytext)) + return VAR_IDENTIFIER; + else if (get_type(hlsl_ctx.cur_scope, yytext, TRUE)) + return TYPE_IDENTIFIER; + else + return NEW_IDENTIFIER; + } + +[0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[h|H|f|F]? { + hlsl_lval.floatval = atof(yytext); + return C_FLOAT; + } +[0-9]+\.([eE][+-]?[0-9]+)?[h|H|f|F]? { + hlsl_lval.floatval = atof(yytext); + return C_FLOAT; + } +[0-9]+([eE][+-]?[0-9]+)?[h|H|f|F] { + hlsl_lval.floatval = atof(yytext); + return C_FLOAT; + } +0x[0-9a-fA-F]+ { + sscanf(yytext, "0x%x", &hlsl_lval.intval); + return C_INTEGER; + } +0[0-7]+ { + sscanf(yytext, "0%o", &hlsl_lval.intval); + return C_INTEGER; + } +[0-9]+ { + hlsl_lval.intval = (atoi(yytext)); + return C_INTEGER; + } + +{DOUBLESLASHCOMMENT} {} + +{WS}+ {} +{NEWLINE} { + hlsl_ctx.line_no++; + hlsl_ctx.column = 1; + } + +^# { + BEGIN pp; + } + +pragma{WS}+ { + TRACE("Got a #pragma.\n"); + BEGIN pp_pragma; + } +pack_matrix{WS}*\({WS}*row_major{WS}*\) { + TRACE("#pragma setting row_major mode.\n"); + hlsl_ctx.matrix_majority = HLSL_ROW_MAJOR; + BEGIN pp_ignore; + } +pack_matrix{WS}*\({WS}*column_major{WS}*\) { + TRACE("#pragma setting column_major mode.\n"); + hlsl_ctx.matrix_majority = HLSL_COLUMN_MAJOR; + BEGIN pp_ignore; + } +{NEWLINE} { + FIXME("Unsupported preprocessor #pragma directive at line %u.\n", hlsl_ctx.line_no); + BEGIN INITIAL; + } +{ANY} {} +[0-9]+ { + TRACE("Preprocessor line info.\n"); + BEGIN pp_line; + hlsl_lval.intval = (atoi(yytext)); + return PRE_LINE; + } +{STRING} { + char *string = d3dcompiler_strdup(yytext + 1); + + BEGIN pp_ignore; + string[strlen(string) - 1] = 0; + hlsl_lval.name = string; + return STRING; + } +{WS}+ {} +{NEWLINE} { + FIXME("Malformed preprocessor line directive?\n"); + BEGIN INITIAL; + } +{NEWLINE} { + BEGIN INITIAL; + } +{ANY} {} +{NEWLINE} { + FIXME("Unexpected preprocessor directive.\n"); + BEGIN INITIAL; + } +{ANY} {} + +{ANY} { + return yytext[0]; + } + +%% + +struct bwriter_shader *parse_hlsl(enum shader_type type, DWORD major, DWORD minor, + const char *entrypoint, char **messages); + +struct bwriter_shader *parse_hlsl_shader(const char *text, enum shader_type type, DWORD major, DWORD minor, + const char *entrypoint, char **messages) +{ + struct bwriter_shader *ret = NULL; + YY_BUFFER_STATE buffer; + + buffer = hlsl__scan_string(text); + hlsl__switch_to_buffer(buffer); + + ret = parse_hlsl(type, major, minor, entrypoint, messages); + + hlsl__delete_buffer(buffer); + return ret; +} diff --git a/dll/directx/wine/d3dcompiler_43/hlsl.tab.c b/dll/directx/wine/d3dcompiler_43/hlsl.tab.c new file mode 100644 index 00000000000..5f64755876d --- /dev/null +++ b/dll/directx/wine/d3dcompiler_43/hlsl.tab.c @@ -0,0 +1,5187 @@ +/* A Bison parser, made by GNU Bison 2.5. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.5" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + +/* Using locations. */ +#define YYLSP_NEEDED 1 + +/* Substitute the variable and function names. */ +#define yyparse hlsl_parse +#define yylex hlsl_lex +#define yyerror hlsl_error +#define yylval hlsl_lval +#define yychar hlsl_char +#define yydebug hlsl_debug +#define yynerrs hlsl_nerrs +#define yylloc hlsl_lloc + +/* Copy the first part of user declarations. */ + +/* Line 268 of yacc.c */ +#line 21 "hlsl.y" + +#include "config.h" +#include "wine/debug.h" + +#include + +#include "d3dcompiler_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(hlsl_parser); + +int hlsl_lex(void); + +struct hlsl_parse_ctx hlsl_ctx; + +struct YYLTYPE; +static void set_location(struct source_location *loc, const struct YYLTYPE *l); + +void hlsl_message(const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + compilation_message(&hlsl_ctx.messages, fmt, args); + va_end(args); +} + +static const char *hlsl_get_error_level_name(enum hlsl_error_level level) +{ + const char *names[] = + { + "error", + "warning", + "note", + }; + return names[level]; +} + +void hlsl_report_message(const char *filename, DWORD line, DWORD column, + enum hlsl_error_level level, const char *fmt, ...) +{ + va_list args; + char *string = NULL; + int rc, size = 0; + + while (1) + { + va_start(args, fmt); + rc = vsnprintf(string, size, fmt, args); + va_end(args); + + if (rc >= 0 && rc < size) + break; + + if (rc >= size) + size = rc + 1; + else + size = size ? size * 2 : 32; + + if (!string) + string = d3dcompiler_alloc(size); + else + string = d3dcompiler_realloc(string, size); + if (!string) + { + ERR("Error reallocating memory for a string.\n"); + return; + } + } + + hlsl_message("%s:%u:%u: %s: %s\n", filename, line, column, hlsl_get_error_level_name(level), string); + d3dcompiler_free(string); + + if (level == HLSL_LEVEL_ERROR) + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + else if (level == HLSL_LEVEL_WARNING) + set_parse_status(&hlsl_ctx.status, PARSE_WARN); +} + +static void hlsl_error(const char *s) +{ + hlsl_report_message(hlsl_ctx.source_file, hlsl_ctx.line_no, hlsl_ctx.column, HLSL_LEVEL_ERROR, "%s", s); +} + +static void debug_dump_decl(struct hlsl_type *type, DWORD modifiers, const char *declname, unsigned int line_no) +{ + TRACE("Line %u: ", line_no); + if (modifiers) + TRACE("%s ", debug_modifiers(modifiers)); + TRACE("%s %s;\n", debug_hlsl_type(type), declname); +} + +static void check_invalid_matrix_modifiers(DWORD modifiers, struct source_location *loc) +{ + if (modifiers & (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR)) + { + hlsl_report_message(loc->file, loc->line, loc->col, HLSL_LEVEL_ERROR, + "'row_major' or 'column_major' modifiers are only allowed for matrices"); + } +} + +static BOOL declare_variable(struct hlsl_ir_var *decl, BOOL local) +{ + BOOL ret; + + TRACE("Declaring variable %s.\n", decl->name); + if (decl->node.data_type->type == HLSL_CLASS_MATRIX) + { + if (!(decl->modifiers & (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR))) + { + decl->modifiers |= hlsl_ctx.matrix_majority == HLSL_ROW_MAJOR + ? HLSL_MODIFIER_ROW_MAJOR : HLSL_MODIFIER_COLUMN_MAJOR; + } + } + else + check_invalid_matrix_modifiers(decl->modifiers, &decl->node.loc); + + if (local) + { + DWORD invalid = decl->modifiers & (HLSL_STORAGE_EXTERN | HLSL_STORAGE_SHARED + | HLSL_STORAGE_GROUPSHARED | HLSL_STORAGE_UNIFORM); + if (invalid) + { + hlsl_report_message(decl->node.loc.file, decl->node.loc.line, decl->node.loc.col, HLSL_LEVEL_ERROR, + "modifier '%s' invalid for local variables", debug_modifiers(invalid)); + } + if (decl->semantic) + { + hlsl_report_message(decl->node.loc.file, decl->node.loc.line, decl->node.loc.col, HLSL_LEVEL_ERROR, + "semantics are not allowed on local variables"); + return FALSE; + } + } + else + { + if (find_function(decl->name)) + { + hlsl_report_message(decl->node.loc.file, decl->node.loc.line, decl->node.loc.col, HLSL_LEVEL_ERROR, + "redefinition of '%s'", decl->name); + return FALSE; + } + } + ret = add_declaration(hlsl_ctx.cur_scope, decl, local); + if (!ret) + { + struct hlsl_ir_var *old = get_variable(hlsl_ctx.cur_scope, decl->name); + + hlsl_report_message(decl->node.loc.file, decl->node.loc.line, decl->node.loc.col, HLSL_LEVEL_ERROR, + "\"%s\" already declared", decl->name); + hlsl_report_message(old->node.loc.file, old->node.loc.line, old->node.loc.col, HLSL_LEVEL_NOTE, + "\"%s\" was previously declared here", old->name); + return FALSE; + } + return TRUE; +} + +static DWORD add_modifier(DWORD modifiers, DWORD mod, const struct YYLTYPE *loc); + +static BOOL check_type_modifiers(DWORD modifiers, struct source_location *loc) +{ + if (modifiers & ~HLSL_TYPE_MODIFIERS_MASK) + { + hlsl_report_message(loc->file, loc->line, loc->col, HLSL_LEVEL_ERROR, + "modifier not allowed on typedefs"); + return FALSE; + } + return TRUE; +} + +static BOOL add_type_to_scope(struct hlsl_scope *scope, struct hlsl_type *def) +{ + if (get_type(scope, def->name, FALSE)) + return FALSE; + + wine_rb_put(&scope->types, def->name, &def->scope_entry); + return TRUE; +} + +static void declare_predefined_types(struct hlsl_scope *scope) +{ + struct hlsl_type *type; + unsigned int x, y, bt; + static const char *names[] = + { + "float", + "half", + "double", + "int", + "uint", + "bool", + }; + char name[10]; + + for (bt = 0; bt <= HLSL_TYPE_LAST_SCALAR; ++bt) + { + for (y = 1; y <= 4; ++y) + { + for (x = 1; x <= 4; ++x) + { + sprintf(name, "%s%ux%u", names[bt], x, y); + type = new_hlsl_type(d3dcompiler_strdup(name), HLSL_CLASS_MATRIX, bt, x, y); + add_type_to_scope(scope, type); + + if (y == 1) + { + sprintf(name, "%s%u", names[bt], x); + type = new_hlsl_type(d3dcompiler_strdup(name), HLSL_CLASS_VECTOR, bt, x, y); + add_type_to_scope(scope, type); + + if (x == 1) + { + sprintf(name, "%s", names[bt]); + type = new_hlsl_type(d3dcompiler_strdup(name), HLSL_CLASS_SCALAR, bt, x, y); + add_type_to_scope(scope, type); + } + } + } + } + } + + /* DX8 effects predefined types */ + type = new_hlsl_type(d3dcompiler_strdup("DWORD"), HLSL_CLASS_SCALAR, HLSL_TYPE_INT, 1, 1); + add_type_to_scope(scope, type); + type = new_hlsl_type(d3dcompiler_strdup("FLOAT"), HLSL_CLASS_SCALAR, HLSL_TYPE_FLOAT, 1, 1); + add_type_to_scope(scope, type); + type = new_hlsl_type(d3dcompiler_strdup("VECTOR"), HLSL_CLASS_VECTOR, HLSL_TYPE_FLOAT, 4, 1); + add_type_to_scope(scope, type); + type = new_hlsl_type(d3dcompiler_strdup("MATRIX"), HLSL_CLASS_MATRIX, HLSL_TYPE_FLOAT, 4, 4); + add_type_to_scope(scope, type); + type = new_hlsl_type(d3dcompiler_strdup("STRING"), HLSL_CLASS_OBJECT, HLSL_TYPE_STRING, 1, 1); + add_type_to_scope(scope, type); + type = new_hlsl_type(d3dcompiler_strdup("TEXTURE"), HLSL_CLASS_OBJECT, HLSL_TYPE_TEXTURE, 1, 1); + add_type_to_scope(scope, type); + type = new_hlsl_type(d3dcompiler_strdup("PIXELSHADER"), HLSL_CLASS_OBJECT, HLSL_TYPE_PIXELSHADER, 1, 1); + add_type_to_scope(scope, type); + type = new_hlsl_type(d3dcompiler_strdup("VERTEXSHADER"), HLSL_CLASS_OBJECT, HLSL_TYPE_VERTEXSHADER, 1, 1); + add_type_to_scope(scope, type); +} + +static struct hlsl_ir_if *loop_condition(struct list *cond_list) +{ + struct hlsl_ir_if *out_cond; + struct hlsl_ir_expr *not_cond; + struct hlsl_ir_node *cond, *operands[3]; + struct hlsl_ir_jump *jump; + unsigned int count = list_count(cond_list); + + if (!count) + return NULL; + if (count != 1) + ERR("Got multiple expressions in a for condition.\n"); + + cond = LIST_ENTRY(list_head(cond_list), struct hlsl_ir_node, entry); + out_cond = d3dcompiler_alloc(sizeof(*out_cond)); + if (!out_cond) + { + ERR("Out of memory.\n"); + return NULL; + } + out_cond->node.type = HLSL_IR_IF; + operands[0] = cond; + operands[1] = operands[2] = NULL; + not_cond = new_expr(HLSL_IR_UNOP_LOGIC_NOT, operands, &cond->loc); + if (!not_cond) + { + ERR("Out of memory.\n"); + d3dcompiler_free(out_cond); + return NULL; + } + out_cond->condition = ¬_cond->node; + jump = d3dcompiler_alloc(sizeof(*jump)); + if (!jump) + { + ERR("Out of memory.\n"); + d3dcompiler_free(out_cond); + d3dcompiler_free(not_cond); + return NULL; + } + jump->node.type = HLSL_IR_JUMP; + jump->type = HLSL_IR_JUMP_BREAK; + out_cond->then_instrs = d3dcompiler_alloc(sizeof(*out_cond->then_instrs)); + if (!out_cond->then_instrs) + { + ERR("Out of memory.\n"); + d3dcompiler_free(out_cond); + d3dcompiler_free(not_cond); + d3dcompiler_free(jump); + return NULL; + } + list_init(out_cond->then_instrs); + list_add_head(out_cond->then_instrs, &jump->node.entry); + + return out_cond; +} + +enum loop_type +{ + LOOP_FOR, + LOOP_WHILE, + LOOP_DO_WHILE +}; + +static struct list *create_loop(enum loop_type type, struct list *init, struct list *cond, + struct hlsl_ir_node *iter, struct list *body, struct source_location *loc) +{ + struct list *list = NULL; + struct hlsl_ir_loop *loop = NULL; + struct hlsl_ir_if *cond_jump = NULL; + + list = d3dcompiler_alloc(sizeof(*list)); + if (!list) + goto oom; + list_init(list); + + if (init) + list_move_head(list, init); + + loop = d3dcompiler_alloc(sizeof(*loop)); + if (!loop) + goto oom; + loop->node.type = HLSL_IR_LOOP; + loop->node.loc = *loc; + list_add_tail(list, &loop->node.entry); + loop->body = d3dcompiler_alloc(sizeof(*loop->body)); + if (!loop->body) + goto oom; + list_init(loop->body); + + cond_jump = loop_condition(cond); + if (!cond_jump) + goto oom; + + if (type != LOOP_DO_WHILE) + list_add_tail(loop->body, &cond_jump->node.entry); + + list_move_tail(loop->body, body); + + if (iter) + list_add_tail(loop->body, &iter->entry); + + if (type == LOOP_DO_WHILE) + list_add_tail(loop->body, &cond_jump->node.entry); + + d3dcompiler_free(init); + d3dcompiler_free(cond); + d3dcompiler_free(body); + return list; + +oom: + ERR("Out of memory.\n"); + if (loop) + d3dcompiler_free(loop->body); + d3dcompiler_free(loop); + d3dcompiler_free(cond_jump); + d3dcompiler_free(list); + free_instr_list(init); + free_instr_list(cond); + free_instr(iter); + free_instr_list(body); + return NULL; +} + +static unsigned int initializer_size(struct list *initializer) +{ + unsigned int count = 0; + struct hlsl_ir_node *node; + + LIST_FOR_EACH_ENTRY(node, initializer, struct hlsl_ir_node, entry) + { + count += components_count_type(node->data_type); + } + TRACE("Initializer size = %u\n", count); + return count; +} + +static unsigned int components_count_expr_list(struct list *list) +{ + struct hlsl_ir_node *node; + unsigned int count = 0; + + LIST_FOR_EACH_ENTRY(node, list, struct hlsl_ir_node, entry) + { + count += components_count_type(node->data_type); + } + return count; +} + +static struct hlsl_ir_swizzle *new_swizzle(DWORD s, unsigned int components, + struct hlsl_ir_node *val, struct source_location *loc) +{ + struct hlsl_ir_swizzle *swizzle = d3dcompiler_alloc(sizeof(*swizzle)); + + if (!swizzle) + return NULL; + swizzle->node.type = HLSL_IR_SWIZZLE; + swizzle->node.loc = *loc; + swizzle->node.data_type = new_hlsl_type(NULL, HLSL_CLASS_VECTOR, val->data_type->base_type, components, 1); + swizzle->val = val; + swizzle->swizzle = s; + return swizzle; +} + +static struct hlsl_ir_swizzle *get_swizzle(struct hlsl_ir_node *value, const char *swizzle, + struct source_location *loc) +{ + unsigned int len = strlen(swizzle), component = 0; + unsigned int i, set, swiz = 0; + BOOL valid; + + if (value->data_type->type == HLSL_CLASS_MATRIX) + { + /* Matrix swizzle */ + BOOL m_swizzle; + unsigned int inc, x, y; + + if (len < 3 || swizzle[0] != '_') + return NULL; + m_swizzle = swizzle[1] == 'm'; + inc = m_swizzle ? 4 : 3; + + if (len % inc || len > inc * 4) + return NULL; + + for (i = 0; i < len; i += inc) + { + if (swizzle[i] != '_') + return NULL; + if (m_swizzle) + { + if (swizzle[i + 1] != 'm') + return NULL; + x = swizzle[i + 2] - '0'; + y = swizzle[i + 3] - '0'; + } + else + { + x = swizzle[i + 1] - '1'; + y = swizzle[i + 2] - '1'; + } + + if (x >= value->data_type->dimx || y >= value->data_type->dimy) + return NULL; + swiz |= (y << 4 | x) << component * 8; + component++; + } + return new_swizzle(swiz, component, value, loc); + } + + /* Vector swizzle */ + if (len > 4) + return NULL; + + for (set = 0; set < 2; ++set) + { + valid = TRUE; + component = 0; + for (i = 0; i < len; ++i) + { + char c[2][4] = {{'x', 'y', 'z', 'w'}, {'r', 'g', 'b', 'a'}}; + unsigned int s = 0; + + for (s = 0; s < 4; ++s) + { + if (swizzle[i] == c[set][s]) + break; + } + if (s == 4) + { + valid = FALSE; + break; + } + + if (s >= value->data_type->dimx) + return NULL; + swiz |= s << component * 2; + component++; + } + if (valid) + return new_swizzle(swiz, component, value, loc); + } + + return NULL; +} + +static void struct_var_initializer(struct list *list, struct hlsl_ir_var *var, struct list *initializer) +{ + struct hlsl_type *type = var->node.data_type; + struct hlsl_ir_node *node; + struct hlsl_struct_field *field; + struct list *cur_node; + struct hlsl_ir_node *assignment; + struct hlsl_ir_deref *deref; + + if (initializer_size(initializer) != components_count_type(type)) + { + hlsl_report_message(var->node.loc.file, var->node.loc.line, var->node.loc.col, HLSL_LEVEL_ERROR, + "structure initializer mismatch"); + free_instr_list(initializer); + return; + } + cur_node = list_head(initializer); + assert(cur_node); + node = LIST_ENTRY(cur_node, struct hlsl_ir_node, entry); + LIST_FOR_EACH_ENTRY(field, type->e.elements, struct hlsl_struct_field, entry) + { + if (!cur_node) + { + d3dcompiler_free(initializer); + return; + } + if (components_count_type(field->type) == components_count_type(node->data_type)) + { + deref = new_record_deref(&var->node, field); + if (!deref) + { + ERR("Out of memory.\n"); + break; + } + deref->node.loc = node->loc; + assignment = make_assignment(&deref->node, ASSIGN_OP_ASSIGN, BWRITERSP_WRITEMASK_ALL, node); + list_add_tail(list, &assignment->entry); + } + else + FIXME("Initializing with \"mismatched\" fields is not supported yet.\n"); + cur_node = list_next(initializer, cur_node); + node = LIST_ENTRY(cur_node, struct hlsl_ir_node, entry); + } + + /* Free initializer elements in excess. */ + while (cur_node) + { + struct list *next = list_next(initializer, cur_node); + free_instr(node); + cur_node = next; + node = LIST_ENTRY(cur_node, struct hlsl_ir_node, entry); + } + d3dcompiler_free(initializer); +} + +static struct list *declare_vars(struct hlsl_type *basic_type, DWORD modifiers, struct list *var_list) +{ + struct hlsl_type *type; + struct parse_variable_def *v, *v_next; + struct hlsl_ir_var *var; + struct hlsl_ir_node *assignment; + BOOL ret, local = TRUE; + struct list *statements_list = d3dcompiler_alloc(sizeof(*statements_list)); + + if (!statements_list) + { + ERR("Out of memory.\n"); + LIST_FOR_EACH_ENTRY_SAFE(v, v_next, var_list, struct parse_variable_def, entry) + d3dcompiler_free(v); + d3dcompiler_free(var_list); + return NULL; + } + list_init(statements_list); + + if (!var_list) + return statements_list; + + LIST_FOR_EACH_ENTRY_SAFE(v, v_next, var_list, struct parse_variable_def, entry) + { + var = d3dcompiler_alloc(sizeof(*var)); + if (!var) + { + ERR("Out of memory.\n"); + d3dcompiler_free(v); + continue; + } + var->node.type = HLSL_IR_VAR; + if (v->array_size) + type = new_array_type(basic_type, v->array_size); + else + type = basic_type; + var->node.data_type = type; + var->node.loc = v->loc; + var->name = v->name; + var->modifiers = modifiers; + var->semantic = v->semantic; + debug_dump_decl(type, modifiers, v->name, v->loc.line); + + if (hlsl_ctx.cur_scope == hlsl_ctx.globals) + { + var->modifiers |= HLSL_STORAGE_UNIFORM; + local = FALSE; + } + + if (var->modifiers & HLSL_MODIFIER_CONST && !(var->modifiers & HLSL_STORAGE_UNIFORM) && !v->initializer) + { + hlsl_report_message(v->loc.file, v->loc.line, v->loc.col, + HLSL_LEVEL_ERROR, "const variable without initializer"); + free_declaration(var); + d3dcompiler_free(v); + continue; + } + + ret = declare_variable(var, local); + if (!ret) + { + free_declaration(var); + d3dcompiler_free(v); + continue; + } + TRACE("Declared variable %s.\n", var->name); + + if (v->initializer) + { + unsigned int size = initializer_size(v->initializer); + struct hlsl_ir_node *node; + + TRACE("Variable with initializer.\n"); + if (type->type <= HLSL_CLASS_LAST_NUMERIC + && type->dimx * type->dimy != size && size != 1) + { + if (size < type->dimx * type->dimy) + { + hlsl_report_message(v->loc.file, v->loc.line, v->loc.col, HLSL_LEVEL_ERROR, + "'%s' initializer does not match", v->name); + free_instr_list(v->initializer); + d3dcompiler_free(v); + continue; + } + } + if ((type->type == HLSL_CLASS_STRUCT || type->type == HLSL_CLASS_ARRAY) + && components_count_type(type) != size) + { + hlsl_report_message(v->loc.file, v->loc.line, v->loc.col, HLSL_LEVEL_ERROR, + "'%s' initializer does not match", v->name); + free_instr_list(v->initializer); + d3dcompiler_free(v); + continue; + } + + if (type->type == HLSL_CLASS_STRUCT) + { + struct_var_initializer(statements_list, var, v->initializer); + d3dcompiler_free(v); + continue; + } + if (type->type > HLSL_CLASS_LAST_NUMERIC) + { + FIXME("Initializers for non scalar/struct variables not supported yet.\n"); + free_instr_list(v->initializer); + d3dcompiler_free(v); + continue; + } + if (v->array_size > 0) + { + FIXME("Initializing arrays is not supported yet.\n"); + free_instr_list(v->initializer); + d3dcompiler_free(v); + continue; + } + if (list_count(v->initializer) > 1) + { + FIXME("Complex initializers are not supported yet.\n"); + free_instr_list(v->initializer); + d3dcompiler_free(v); + continue; + } + node = LIST_ENTRY(list_head(v->initializer), struct hlsl_ir_node, entry); + assignment = make_assignment(&var->node, ASSIGN_OP_ASSIGN, + BWRITERSP_WRITEMASK_ALL, node); + list_add_tail(statements_list, &assignment->entry); + d3dcompiler_free(v->initializer); + } + d3dcompiler_free(v); + } + d3dcompiler_free(var_list); + return statements_list; +} + +static BOOL add_struct_field(struct list *fields, struct hlsl_struct_field *field) +{ + struct hlsl_struct_field *f; + + LIST_FOR_EACH_ENTRY(f, fields, struct hlsl_struct_field, entry) + { + if (!strcmp(f->name, field->name)) + return FALSE; + } + list_add_tail(fields, &field->entry); + return TRUE; +} + +static struct list *gen_struct_fields(struct hlsl_type *type, DWORD modifiers, struct list *fields) +{ + struct parse_variable_def *v, *v_next; + struct hlsl_struct_field *field; + struct list *list; + + list = d3dcompiler_alloc(sizeof(*list)); + if (!list) + { + ERR("Out of memory.\n"); + return NULL; + } + list_init(list); + LIST_FOR_EACH_ENTRY_SAFE(v, v_next, fields, struct parse_variable_def, entry) + { + debug_dump_decl(type, 0, v->name, v->loc.line); + field = d3dcompiler_alloc(sizeof(*field)); + if (!field) + { + ERR("Out of memory.\n"); + d3dcompiler_free(v); + return list; + } + field->type = type; + field->name = v->name; + field->modifiers = modifiers; + field->semantic = v->semantic; + if (v->initializer) + { + hlsl_report_message(v->loc.file, v->loc.line, v->loc.col, HLSL_LEVEL_ERROR, + "struct field with an initializer.\n"); + free_instr_list(v->initializer); + } + list_add_tail(list, &field->entry); + d3dcompiler_free(v); + } + d3dcompiler_free(fields); + return list; +} + +static struct hlsl_type *new_struct_type(const char *name, DWORD modifiers, struct list *fields) +{ + struct hlsl_type *type = d3dcompiler_alloc(sizeof(*type)); + + if (!type) + { + ERR("Out of memory.\n"); + return NULL; + } + type->type = HLSL_CLASS_STRUCT; + type->name = name; + type->dimx = type->dimy = 1; + type->modifiers = modifiers; + type->e.elements = fields; + + list_add_tail(&hlsl_ctx.types, &type->entry); + + return type; +} + +static BOOL add_typedef(DWORD modifiers, struct hlsl_type *orig_type, struct list *list, + struct source_location *loc) +{ + BOOL ret; + struct hlsl_type *type; + struct parse_variable_def *v, *v_next; + + if (!check_type_modifiers(modifiers, loc)) + { + LIST_FOR_EACH_ENTRY_SAFE(v, v_next, list, struct parse_variable_def, entry) + d3dcompiler_free(v); + d3dcompiler_free(list); + return FALSE; + } + + LIST_FOR_EACH_ENTRY_SAFE(v, v_next, list, struct parse_variable_def, entry) + { + if (v->array_size) + type = new_array_type(orig_type, v->array_size); + else + type = clone_hlsl_type(orig_type); + if (!type) + { + ERR("Out of memory\n"); + return FALSE; + } + d3dcompiler_free((void *)type->name); + type->name = v->name; + type->modifiers |= modifiers; + + if (type->type != HLSL_CLASS_MATRIX) + check_invalid_matrix_modifiers(type->modifiers, &v->loc); + + ret = add_type_to_scope(hlsl_ctx.cur_scope, type); + if (!ret) + { + hlsl_report_message(v->loc.file, v->loc.line, v->loc.col, HLSL_LEVEL_ERROR, + "redefinition of custom type '%s'", v->name); + } + d3dcompiler_free(v); + } + d3dcompiler_free(list); + return TRUE; +} + +static const struct hlsl_ir_function_decl *get_overloaded_func(struct wine_rb_tree *funcs, char *name, + struct list *params, BOOL exact_signature) +{ + struct hlsl_ir_function *func; + struct wine_rb_entry *entry; + + entry = wine_rb_get(funcs, name); + if (entry) + { + func = WINE_RB_ENTRY_VALUE(entry, struct hlsl_ir_function, entry); + + entry = wine_rb_get(&func->overloads, params); + if (!entry) + { + if (!exact_signature) + FIXME("No exact match, search for a compatible overloaded function (if any).\n"); + return NULL; + } + return WINE_RB_ENTRY_VALUE(entry, struct hlsl_ir_function_decl, entry); + } + return NULL; +} + + + +/* Line 268 of yacc.c */ +#line 895 "hlsl.tab.c" + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 1 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + KW_BLENDSTATE = 258, + KW_BREAK = 259, + KW_BUFFER = 260, + KW_CBUFFER = 261, + KW_COLUMN_MAJOR = 262, + KW_COMPILE = 263, + KW_CONST = 264, + KW_CONTINUE = 265, + KW_DEPTHSTENCILSTATE = 266, + KW_DEPTHSTENCILVIEW = 267, + KW_DISCARD = 268, + KW_DO = 269, + KW_DOUBLE = 270, + KW_ELSE = 271, + KW_EXTERN = 272, + KW_FALSE = 273, + KW_FOR = 274, + KW_GEOMETRYSHADER = 275, + KW_GROUPSHARED = 276, + KW_IF = 277, + KW_IN = 278, + KW_INLINE = 279, + KW_INOUT = 280, + KW_MATRIX = 281, + KW_NAMESPACE = 282, + KW_NOINTERPOLATION = 283, + KW_OUT = 284, + KW_PASS = 285, + KW_PIXELSHADER = 286, + KW_PRECISE = 287, + KW_RASTERIZERSTATE = 288, + KW_RENDERTARGETVIEW = 289, + KW_RETURN = 290, + KW_REGISTER = 291, + KW_ROW_MAJOR = 292, + KW_SAMPLER = 293, + KW_SAMPLER1D = 294, + KW_SAMPLER2D = 295, + KW_SAMPLER3D = 296, + KW_SAMPLERCUBE = 297, + KW_SAMPLER_STATE = 298, + KW_SAMPLERCOMPARISONSTATE = 299, + KW_SHARED = 300, + KW_STATEBLOCK = 301, + KW_STATEBLOCK_STATE = 302, + KW_STATIC = 303, + KW_STRING = 304, + KW_STRUCT = 305, + KW_SWITCH = 306, + KW_TBUFFER = 307, + KW_TECHNIQUE = 308, + KW_TECHNIQUE10 = 309, + KW_TEXTURE = 310, + KW_TEXTURE1D = 311, + KW_TEXTURE1DARRAY = 312, + KW_TEXTURE2D = 313, + KW_TEXTURE2DARRAY = 314, + KW_TEXTURE2DMS = 315, + KW_TEXTURE2DMSARRAY = 316, + KW_TEXTURE3D = 317, + KW_TEXTURE3DARRAY = 318, + KW_TEXTURECUBE = 319, + KW_TRUE = 320, + KW_TYPEDEF = 321, + KW_UNIFORM = 322, + KW_VECTOR = 323, + KW_VERTEXSHADER = 324, + KW_VOID = 325, + KW_VOLATILE = 326, + KW_WHILE = 327, + OP_INC = 328, + OP_DEC = 329, + OP_AND = 330, + OP_OR = 331, + OP_EQ = 332, + OP_LEFTSHIFT = 333, + OP_LEFTSHIFTASSIGN = 334, + OP_RIGHTSHIFT = 335, + OP_RIGHTSHIFTASSIGN = 336, + OP_ELLIPSIS = 337, + OP_LE = 338, + OP_GE = 339, + OP_NE = 340, + OP_ADDASSIGN = 341, + OP_SUBASSIGN = 342, + OP_MULASSIGN = 343, + OP_DIVASSIGN = 344, + OP_MODASSIGN = 345, + OP_ANDASSIGN = 346, + OP_ORASSIGN = 347, + OP_XORASSIGN = 348, + OP_UNKNOWN1 = 349, + OP_UNKNOWN2 = 350, + OP_UNKNOWN3 = 351, + OP_UNKNOWN4 = 352, + PRE_LINE = 353, + VAR_IDENTIFIER = 354, + TYPE_IDENTIFIER = 355, + NEW_IDENTIFIER = 356, + STRING = 357, + C_FLOAT = 358, + C_INTEGER = 359 + }; +#endif + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ + +/* Line 293 of yacc.c */ +#line 841 "hlsl.y" + + struct hlsl_type *type; + INT intval; + FLOAT floatval; + BOOL boolval; + char *name; + DWORD modifiers; + struct hlsl_ir_var *var; + struct hlsl_ir_node *instr; + struct list *list; + struct parse_function function; + struct parse_parameter parameter; + struct parse_variable_def *variable_def; + struct parse_if_body if_body; + enum parse_unary_op unary_op; + enum parse_assign_op assign_op; + + + +/* Line 293 of yacc.c */ +#line 1055 "hlsl.tab.c" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +typedef struct YYLTYPE +{ + int first_line; + int first_column; + int last_line; + int last_column; +} YYLTYPE; +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ +# define YYLTYPE_IS_DECLARED 1 +# define YYLTYPE_IS_TRIVIAL 1 +#endif + + +/* Copy the second part of user declarations. */ + + +/* Line 343 of yacc.c */ +#line 1080 "hlsl.tab.c" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int yyi) +#else +static int +YYID (yyi) + int yyi; +#endif +{ + return yyi; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; + YYLTYPE yyls_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + + 2 * YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 2 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 848 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 129 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 63 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 171 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 312 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 359 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 120, 2, 2, 2, 124, 125, 2, + 108, 109, 122, 118, 111, 119, 117, 123, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 110, 105, + 112, 114, 113, 128, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 115, 2, 116, 126, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 106, 127, 107, 121, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint16 yyprhs[] = +{ + 0, 0, 3, 4, 7, 10, 13, 16, 19, 23, + 25, 27, 34, 40, 42, 44, 46, 47, 50, 55, + 59, 62, 65, 73, 76, 81, 82, 84, 86, 87, + 90, 92, 95, 97, 101, 107, 108, 111, 113, 115, + 117, 119, 126, 135, 137, 139, 141, 143, 145, 147, + 149, 152, 154, 156, 158, 164, 169, 171, 175, 178, + 183, 184, 186, 188, 192, 196, 202, 203, 207, 208, + 211, 214, 217, 220, 223, 226, 229, 232, 235, 238, + 241, 243, 247, 252, 254, 256, 260, 262, 264, 266, + 269, 271, 273, 275, 277, 279, 281, 285, 291, 293, + 297, 303, 311, 320, 329, 331, 334, 336, 338, 340, + 342, 346, 348, 350, 353, 356, 360, 365, 371, 373, + 376, 379, 382, 389, 391, 393, 395, 397, 399, 403, + 407, 411, 413, 417, 421, 423, 427, 431, 433, 437, + 441, 445, 449, 451, 455, 459, 461, 465, 467, 471, + 473, 477, 479, 483, 485, 489, 491, 497, 499, 503, + 505, 507, 509, 511, 513, 515, 517, 519, 521, 523, + 525, 527 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int16 yyrhs[] = +{ + 130, 0, -1, -1, 130, 139, -1, 130, 152, -1, + 130, 131, -1, 130, 105, -1, 98, 102, -1, 133, + 157, 105, -1, 134, -1, 135, -1, 161, 50, 136, + 106, 137, 107, -1, 161, 50, 106, 137, 107, -1, + 99, -1, 100, -1, 101, -1, -1, 137, 138, -1, + 161, 150, 158, 105, -1, 135, 158, 105, -1, 140, + 141, -1, 140, 105, -1, 161, 150, 143, 108, 145, + 109, 144, -1, 106, 107, -1, 106, 142, 166, 107, + -1, -1, 99, -1, 101, -1, -1, 110, 136, -1, + 142, -1, 142, 146, -1, 147, -1, 146, 111, 147, + -1, 148, 161, 150, 136, 144, -1, -1, 148, 149, + -1, 23, -1, 29, -1, 25, -1, 151, -1, 68, + 112, 151, 111, 104, 113, -1, 26, 112, 151, 111, + 104, 111, 104, 113, -1, 70, -1, 38, -1, 39, + -1, 40, -1, 41, -1, 42, -1, 100, -1, 50, + 100, -1, 156, -1, 132, -1, 153, -1, 66, 161, + 150, 154, 105, -1, 66, 133, 154, 105, -1, 155, + -1, 154, 111, 155, -1, 136, 160, -1, 161, 150, + 158, 105, -1, -1, 158, -1, 159, -1, 158, 111, + 159, -1, 136, 160, 144, -1, 136, 160, 144, 114, + 162, -1, -1, 115, 191, 116, -1, -1, 17, 161, + -1, 28, 161, -1, 32, 161, -1, 45, 161, -1, + 21, 161, -1, 48, 161, -1, 67, 161, -1, 71, + 161, -1, 9, 161, -1, 37, 161, -1, 7, 161, + -1, 163, -1, 106, 164, 107, -1, 106, 164, 111, + 107, -1, 189, -1, 163, -1, 164, 111, 163, -1, + 65, -1, 18, -1, 167, -1, 166, 167, -1, 152, + -1, 172, -1, 141, -1, 168, -1, 169, -1, 171, + -1, 35, 191, 105, -1, 22, 108, 191, 109, 170, + -1, 167, -1, 167, 16, 167, -1, 72, 108, 191, + 109, 167, -1, 14, 167, 72, 108, 191, 109, 105, + -1, 19, 108, 142, 172, 172, 191, 109, 167, -1, + 19, 108, 142, 156, 172, 191, 109, 167, -1, 105, + -1, 191, 105, -1, 103, -1, 104, -1, 165, -1, + 174, -1, 108, 191, 109, -1, 99, -1, 173, -1, + 175, 73, -1, 175, 74, -1, 175, 117, 136, -1, + 175, 115, 191, 116, -1, 161, 150, 108, 164, 109, + -1, 175, -1, 73, 176, -1, 74, 176, -1, 177, + 176, -1, 108, 161, 150, 160, 109, 176, -1, 118, + -1, 119, -1, 120, -1, 121, -1, 176, -1, 178, + 122, 176, -1, 178, 123, 176, -1, 178, 124, 176, + -1, 178, -1, 179, 118, 178, -1, 179, 119, 178, + -1, 179, -1, 180, 78, 179, -1, 180, 80, 179, + -1, 180, -1, 181, 112, 180, -1, 181, 113, 180, + -1, 181, 83, 180, -1, 181, 84, 180, -1, 181, + -1, 182, 77, 181, -1, 182, 85, 181, -1, 182, + -1, 183, 125, 182, -1, 183, -1, 184, 126, 183, + -1, 184, -1, 185, 127, 184, -1, 185, -1, 186, + 75, 185, -1, 186, -1, 187, 76, 186, -1, 187, + -1, 187, 128, 191, 110, 189, -1, 188, -1, 176, + 190, 189, -1, 114, -1, 86, -1, 87, -1, 88, + -1, 89, -1, 90, -1, 79, -1, 81, -1, 91, + -1, 92, -1, 93, -1, 189, -1, 191, 111, 189, + -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 1022, 1022, 1024, 1061, 1065, 1068, 1073, 1092, 1109, + 1110, 1112, 1138, 1148, 1149, 1150, 1153, 1157, 1176, 1180, + 1185, 1192, 1199, 1224, 1229, 1236, 1240, 1241, 1244, 1247, + 1252, 1257, 1262, 1276, 1290, 1300, 1303, 1314, 1318, 1322, + 1327, 1331, 1350, 1370, 1374, 1379, 1384, 1389, 1394, 1399, + 1408, 1427, 1428, 1429, 1440, 1448, 1457, 1463, 1469, 1477, + 1483, 1486, 1491, 1497, 1503, 1511, 1523, 1526, 1534, 1537, + 1541, 1545, 1549, 1553, 1557, 1561, 1565, 1569, 1573, 1577, + 1582, 1588, 1592, 1597, 1602, 1608, 1614, 1618, 1623, 1627, + 1634, 1635, 1636, 1637, 1638, 1639, 1642, 1665, 1689, 1694, + 1700, 1715, 1730, 1738, 1750, 1755, 1763, 1777, 1791, 1805, + 1816, 1821, 1835, 1839, 1858, 1877, 1931, 1991, 2027, 2031, + 2047, 2063, 2083, 2115, 2119, 2123, 2127, 2132, 2136, 2143, + 2150, 2158, 2162, 2169, 2177, 2181, 2185, 2190, 2194, 2201, + 2208, 2215, 2223, 2227, 2234, 2242, 2246, 2251, 2255, 2260, + 2264, 2269, 2273, 2278, 2282, 2287, 2291, 2296, 2300, 2317, + 2321, 2325, 2329, 2333, 2337, 2341, 2345, 2349, 2353, 2357, + 2362, 2366 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "KW_BLENDSTATE", "KW_BREAK", "KW_BUFFER", + "KW_CBUFFER", "KW_COLUMN_MAJOR", "KW_COMPILE", "KW_CONST", "KW_CONTINUE", + "KW_DEPTHSTENCILSTATE", "KW_DEPTHSTENCILVIEW", "KW_DISCARD", "KW_DO", + "KW_DOUBLE", "KW_ELSE", "KW_EXTERN", "KW_FALSE", "KW_FOR", + "KW_GEOMETRYSHADER", "KW_GROUPSHARED", "KW_IF", "KW_IN", "KW_INLINE", + "KW_INOUT", "KW_MATRIX", "KW_NAMESPACE", "KW_NOINTERPOLATION", "KW_OUT", + "KW_PASS", "KW_PIXELSHADER", "KW_PRECISE", "KW_RASTERIZERSTATE", + "KW_RENDERTARGETVIEW", "KW_RETURN", "KW_REGISTER", "KW_ROW_MAJOR", + "KW_SAMPLER", "KW_SAMPLER1D", "KW_SAMPLER2D", "KW_SAMPLER3D", + "KW_SAMPLERCUBE", "KW_SAMPLER_STATE", "KW_SAMPLERCOMPARISONSTATE", + "KW_SHARED", "KW_STATEBLOCK", "KW_STATEBLOCK_STATE", "KW_STATIC", + "KW_STRING", "KW_STRUCT", "KW_SWITCH", "KW_TBUFFER", "KW_TECHNIQUE", + "KW_TECHNIQUE10", "KW_TEXTURE", "KW_TEXTURE1D", "KW_TEXTURE1DARRAY", + "KW_TEXTURE2D", "KW_TEXTURE2DARRAY", "KW_TEXTURE2DMS", + "KW_TEXTURE2DMSARRAY", "KW_TEXTURE3D", "KW_TEXTURE3DARRAY", + "KW_TEXTURECUBE", "KW_TRUE", "KW_TYPEDEF", "KW_UNIFORM", "KW_VECTOR", + "KW_VERTEXSHADER", "KW_VOID", "KW_VOLATILE", "KW_WHILE", "OP_INC", + "OP_DEC", "OP_AND", "OP_OR", "OP_EQ", "OP_LEFTSHIFT", + "OP_LEFTSHIFTASSIGN", "OP_RIGHTSHIFT", "OP_RIGHTSHIFTASSIGN", + "OP_ELLIPSIS", "OP_LE", "OP_GE", "OP_NE", "OP_ADDASSIGN", "OP_SUBASSIGN", + "OP_MULASSIGN", "OP_DIVASSIGN", "OP_MODASSIGN", "OP_ANDASSIGN", + "OP_ORASSIGN", "OP_XORASSIGN", "OP_UNKNOWN1", "OP_UNKNOWN2", + "OP_UNKNOWN3", "OP_UNKNOWN4", "PRE_LINE", "VAR_IDENTIFIER", + "TYPE_IDENTIFIER", "NEW_IDENTIFIER", "STRING", "C_FLOAT", "C_INTEGER", + "';'", "'{'", "'}'", "'('", "')'", "':'", "','", "'<'", "'>'", "'='", + "'['", "']'", "'.'", "'+'", "'-'", "'!'", "'~'", "'*'", "'/'", "'%'", + "'&'", "'^'", "'|'", "'?'", "$accept", "hlsl_prog", "preproc_directive", + "struct_declaration", "struct_spec", "named_struct_spec", + "unnamed_struct_spec", "any_identifier", "fields_list", "field", + "func_declaration", "func_prototype", "compound_statement", + "scope_start", "var_identifier", "semantic", "parameters", "param_list", + "parameter", "input_mods", "input_mod", "type", "base_type", + "declaration_statement", "typedef", "type_specs", "type_spec", + "declaration", "variables_def_optional", "variables_def", "variable_def", + "array", "var_modifiers", "complex_initializer", "initializer_expr", + "initializer_expr_list", "boolean", "statement_list", "statement", + "jump_statement", "selection_statement", "if_body", "loop_statement", + "expr_statement", "primary_expr", "variable", "postfix_expr", + "unary_expr", "unary_op", "mul_expr", "add_expr", "shift_expr", + "relational_expr", "equality_expr", "bitand_expr", "bitxor_expr", + "bitor_expr", "logicand_expr", "logicor_expr", "conditional_expr", + "assignment_expr", "assign_op", "expr", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 59, 123, 125, 40, 41, + 58, 44, 60, 62, 61, 91, 93, 46, 43, 45, + 33, 126, 42, 47, 37, 38, 94, 124, 63 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 129, 130, 130, 130, 130, 130, 131, 132, 133, + 133, 134, 135, 136, 136, 136, 137, 137, 138, 138, + 139, 139, 140, 141, 141, 142, 143, 143, 144, 144, + 145, 145, 146, 146, 147, 148, 148, 149, 149, 149, + 150, 150, 150, 151, 151, 151, 151, 151, 151, 151, + 151, 152, 152, 152, 153, 153, 154, 154, 155, 156, + 157, 157, 158, 158, 159, 159, 160, 160, 161, 161, + 161, 161, 161, 161, 161, 161, 161, 161, 161, 161, + 162, 162, 162, 163, 164, 164, 165, 165, 166, 166, + 167, 167, 167, 167, 167, 167, 168, 169, 170, 170, + 171, 171, 171, 171, 172, 172, 173, 173, 173, 173, + 173, 174, 175, 175, 175, 175, 175, 175, 176, 176, + 176, 176, 176, 177, 177, 177, 177, 178, 178, 178, + 178, 179, 179, 179, 180, 180, 180, 181, 181, 181, + 181, 181, 182, 182, 182, 183, 183, 184, 184, 185, + 185, 186, 186, 187, 187, 188, 188, 189, 189, 190, + 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + 191, 191 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 0, 2, 2, 2, 2, 2, 3, 1, + 1, 6, 5, 1, 1, 1, 0, 2, 4, 3, + 2, 2, 7, 2, 4, 0, 1, 1, 0, 2, + 1, 2, 1, 3, 5, 0, 2, 1, 1, 1, + 1, 6, 8, 1, 1, 1, 1, 1, 1, 1, + 2, 1, 1, 1, 5, 4, 1, 3, 2, 4, + 0, 1, 1, 3, 3, 5, 0, 3, 0, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 1, 3, 4, 1, 1, 3, 1, 1, 1, 2, + 1, 1, 1, 1, 1, 1, 3, 5, 1, 3, + 5, 7, 8, 8, 1, 2, 1, 1, 1, 1, + 3, 1, 1, 2, 2, 3, 4, 5, 1, 2, + 2, 2, 6, 1, 1, 1, 1, 1, 3, 3, + 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, + 3, 3, 1, 3, 3, 1, 3, 1, 3, 1, + 3, 1, 3, 1, 3, 1, 5, 1, 3, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3 +}; + +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 2, 68, 1, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 0, 6, 5, 52, 60, + 9, 10, 3, 0, 4, 53, 51, 0, 79, 77, + 69, 73, 70, 71, 78, 72, 74, 0, 0, 75, + 76, 7, 13, 14, 15, 66, 0, 61, 62, 21, + 25, 20, 0, 44, 45, 46, 47, 48, 0, 0, + 43, 49, 0, 40, 66, 0, 56, 0, 68, 28, + 8, 0, 23, 68, 0, 50, 16, 0, 0, 13, + 15, 0, 0, 58, 55, 0, 0, 87, 86, 68, + 68, 111, 106, 107, 68, 123, 124, 125, 126, 0, + 108, 112, 109, 118, 127, 68, 131, 134, 137, 142, + 145, 147, 149, 151, 153, 155, 157, 170, 0, 0, + 64, 63, 68, 0, 0, 68, 0, 104, 92, 90, + 0, 68, 88, 93, 94, 95, 91, 0, 0, 0, + 68, 16, 0, 25, 59, 57, 54, 119, 120, 0, + 0, 0, 113, 114, 68, 0, 165, 166, 160, 161, + 162, 163, 164, 167, 168, 169, 159, 68, 121, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 67, + 29, 68, 0, 25, 68, 0, 68, 0, 24, 89, + 105, 50, 0, 12, 0, 17, 0, 68, 0, 35, + 0, 66, 110, 68, 0, 115, 158, 128, 129, 130, + 127, 132, 133, 135, 136, 140, 141, 138, 139, 143, + 144, 146, 148, 150, 152, 154, 0, 171, 68, 65, + 80, 83, 0, 68, 0, 96, 0, 0, 0, 0, + 0, 11, 0, 31, 32, 68, 28, 0, 84, 0, + 116, 68, 0, 68, 68, 0, 68, 68, 68, 0, + 19, 0, 41, 35, 37, 39, 38, 36, 0, 22, + 68, 117, 68, 156, 81, 68, 0, 68, 68, 98, + 97, 100, 0, 18, 33, 0, 122, 85, 82, 0, + 0, 0, 68, 42, 28, 101, 68, 68, 99, 34, + 103, 102 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 1, 17, 18, 19, 20, 21, 45, 140, 205, + 22, 23, 128, 73, 81, 120, 210, 253, 254, 255, + 277, 197, 63, 129, 25, 65, 66, 26, 46, 82, + 48, 69, 99, 239, 258, 259, 100, 131, 132, 133, + 134, 290, 135, 136, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 167, 137 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -231 +static const yytype_int16 yypact[] = +{ + -231, 640, -231, 777, 777, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, -69, -231, -231, -231, 32, + -231, -231, -231, 118, -231, -231, -231, 12, -231, -231, + -231, -231, -231, -231, -231, -231, -231, 32, 12, -231, + -231, -231, -231, -231, -231, -67, -41, -26, -231, -231, + 8, -231, -20, -231, -231, -231, -231, -231, -60, 14, + -231, -231, 72, -231, -67, -81, -231, 32, 579, -39, + -231, 32, -231, 320, 145, 28, -231, 34, 145, 15, + 35, 74, -15, -231, -231, 32, -10, -231, -231, 579, + 579, -231, -231, -231, 579, -231, -231, -231, -231, 37, + -231, -231, -231, -18, 182, 579, 52, 86, -19, -55, + -40, 66, 70, 90, 126, -44, -231, -231, 2, 32, + 127, -231, 320, 105, 124, 579, 135, -231, -231, -231, + 12, 212, -231, -231, -231, -231, -231, -7, 125, 137, + 684, -231, 141, -231, -231, -231, -231, -231, -231, 37, + 79, 147, -231, -231, 579, 32, -231, -231, -231, -231, + -231, -231, -231, -231, -231, -231, -231, 579, -231, 579, + 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, + 579, 579, 579, 579, 579, 579, 579, 579, 579, -231, + -231, 399, 181, -231, 579, -5, 579, -65, -231, -231, + -231, -231, 154, -231, 32, -231, 139, 716, 158, 155, + 167, -48, -231, 579, 11, -231, -231, -231, -231, -231, + -231, 52, 52, 86, 86, -19, -19, -19, -19, -55, + -55, -40, 66, 70, 90, 126, 117, -231, 579, -231, + -231, -231, 174, 439, 83, -231, 88, 176, -2, 10, + 32, -231, 175, 178, -231, 745, -39, 183, -231, 99, + -231, 579, 17, 579, 439, 37, 439, 320, 320, 186, + -231, 9, -231, -231, -231, -231, -231, -231, 37, -231, + 579, -231, 579, -231, -231, 518, 103, 579, 579, 275, + -231, -231, 180, -231, -231, 32, -231, -231, -231, 189, + 107, 111, 320, -231, -39, -231, 320, 320, -231, -231, + -231, -231 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -231, -231, -231, -231, 283, -231, -119, -36, 156, -231, + -231, -231, 276, -123, -231, -230, -231, -231, 25, -231, + -231, -13, 51, 299, -231, 235, 218, 61, -231, -4, + 236, -45, -1, -231, -174, 71, -231, -231, -104, -231, + -231, -231, -231, -175, -231, -231, -231, -24, -231, 65, + 76, -9, 100, 128, 129, 130, 123, 136, -231, -231, + -144, -231, -52 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -31 +static const yytype_int16 yytable[] = +{ + 27, 64, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 38, 39, 40, 62, 47, 118, 240, 192, 83, + 209, 204, 77, 216, 84, 67, 279, 199, 176, 177, + 85, 64, 186, 41, 42, 43, 44, 180, 52, 42, + 75, 44, 150, 213, 237, 181, 76, 241, 68, 64, + 53, 54, 55, 56, 57, 152, 153, 178, 179, 174, + 213, 175, 58, 52, 70, 147, 148, 68, 266, 241, + 243, 119, 130, 195, 309, 53, 54, 55, 56, 57, + 59, 168, 60, 190, 187, 71, 151, 138, 204, 287, + 144, 288, 74, 149, 241, 146, 71, 154, 200, 155, + 245, 85, 214, 270, 188, 59, 188, 60, 297, 71, + 201, 297, 61, 188, 293, 72, 76, 283, 189, 215, + 71, 130, 188, -26, 284, 139, 78, 260, 285, 142, + 130, 42, 43, 44, -14, 236, 211, 61, 241, 206, + 141, 241, 244, -27, 246, 217, 218, 219, 220, 220, + 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + 220, 220, 220, 289, 291, 52, 257, 225, 226, 227, + 228, 79, 43, 80, 169, 170, 171, 53, 54, 55, + 56, 57, 143, 53, 54, 55, 56, 57, 212, 249, + 188, 182, 267, 250, 188, 138, 183, 268, 308, 188, + 248, 185, 310, 311, 172, 173, 206, 59, 281, 60, + 282, 286, 299, 193, 188, 60, 306, 184, 188, 3, + 307, 4, 188, 49, 50, 201, 122, 261, 188, 5, + 87, 123, 194, 6, 124, 300, 301, 221, 222, 61, + 7, 191, 265, 196, 8, 61, 271, 125, 202, 9, + 223, 224, 208, 242, 278, 213, 296, 10, 247, 304, + 11, 156, 252, 157, -30, 295, 130, 130, 158, 159, + 160, 161, 162, 163, 164, 165, 256, 88, 12, 13, + 229, 230, 263, 14, 126, 89, 90, 269, 272, 273, + 292, 302, 280, 303, 305, 37, 166, 207, 294, 51, + 24, 130, 86, 145, 264, 130, 130, 121, 234, 262, + 231, 91, 232, 0, 233, 92, 93, 127, 50, 198, + 94, 0, 235, 0, 0, 0, 0, 3, 0, 4, + 95, 96, 97, 98, 122, 0, 0, 5, 87, 123, + 0, 6, 124, 0, 0, 0, 0, 0, 7, 0, + 0, 0, 8, 0, 0, 125, 0, 9, 0, 0, + 0, 0, 0, 0, 0, 10, 0, 0, 11, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 88, 12, 13, 0, 0, + 0, 14, 126, 89, 90, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, + 0, 0, 0, 0, 0, 0, 5, 87, 0, 91, + 6, 0, 0, 92, 93, 127, 50, 7, 94, 0, + 0, 8, 0, 0, 0, 0, 9, 0, 95, 96, + 97, 98, 0, 0, 10, 0, 3, 11, 4, 0, + 0, 0, 0, 0, 0, 0, 5, 87, 0, 0, + 6, 0, 0, 0, 88, 0, 13, 7, 0, 0, + 14, 8, 89, 90, 0, 0, 9, 0, 0, 0, + 0, 0, 0, 0, 10, 0, 0, 11, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 91, 0, + 0, 0, 92, 93, 88, 238, 13, 94, 0, 0, + 14, 0, 89, 90, 0, 0, 0, 95, 96, 97, + 98, 0, 0, 0, 0, 3, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 5, 87, 0, 91, 6, + 0, 0, 92, 93, 127, 0, 7, 94, 0, 0, + 8, 0, 0, 0, 0, 9, 0, 95, 96, 97, + 98, 0, 0, 10, 0, 0, 11, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 88, 0, 13, 3, 0, 4, 14, + 0, 89, 90, 0, 0, 0, 5, 87, 0, 0, + 6, 0, 0, 0, 0, 0, 0, 7, 0, 0, + 0, 8, 0, 0, 0, 0, 9, 91, 0, 0, + 0, 92, 93, 0, 10, 298, 94, 11, 0, 0, + 0, 0, 0, 0, 0, 0, 95, 96, 97, 98, + 2, 0, 0, 0, 88, 0, 13, 3, 0, 4, + 14, 0, 89, 90, 0, 0, 0, 5, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 0, 7, 0, + 0, 0, 8, 0, 0, 0, 0, 9, 91, 0, + 0, 0, 92, 93, 0, 10, 0, 94, 11, 0, + 0, 3, 0, 4, 0, 0, 0, 95, 96, 97, + 98, 5, 0, 0, 0, 6, 12, 13, 0, 0, + 0, 14, 7, 0, 0, 0, 8, 0, 0, 0, + 0, 9, 0, 3, 0, 4, 0, 0, 0, 10, + 0, 0, 11, 5, 0, 0, 0, 6, 15, 0, + 0, 0, 0, 0, 7, 16, 0, 0, 8, 0, + 0, 13, 3, 9, 4, 14, 0, 0, 0, 0, + 0, 10, 5, 0, 11, 0, 6, 0, 274, 0, + 275, 0, 0, 7, 276, 0, 0, 8, 0, 0, + 0, 0, 9, 13, 3, 0, 4, 14, 0, 0, + 10, 203, 0, 11, 5, 0, 0, 0, 6, 0, + 0, 0, 0, 0, 0, 7, 0, 0, 0, 8, + 0, 0, 13, 0, 9, 0, 14, 0, 0, 0, + 0, 0, 10, 251, 0, 11, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 13, 0, 0, 0, 14 +}; + +#define yypact_value_is_default(yystate) \ + ((yystate) == (-231)) + +#define yytable_value_is_error(yytable_value) \ + YYID (0) + +static const yytype_int16 yycheck[] = +{ + 1, 37, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 27, 19, 68, 191, 122, 64, + 143, 140, 58, 167, 105, 38, 256, 131, 83, 84, + 111, 67, 76, 102, 99, 100, 101, 77, 26, 99, + 100, 101, 94, 108, 188, 85, 106, 191, 115, 85, + 38, 39, 40, 41, 42, 73, 74, 112, 113, 78, + 108, 80, 50, 26, 105, 89, 90, 115, 243, 213, + 193, 110, 73, 125, 304, 38, 39, 40, 41, 42, + 68, 105, 70, 119, 128, 111, 99, 50, 207, 264, + 105, 266, 112, 94, 238, 105, 111, 115, 105, 117, + 105, 111, 154, 105, 111, 68, 111, 70, 282, 111, + 100, 285, 100, 111, 105, 107, 106, 261, 116, 155, + 111, 122, 111, 108, 107, 74, 112, 116, 111, 78, + 131, 99, 100, 101, 106, 187, 149, 100, 282, 140, + 106, 285, 194, 108, 196, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 267, 268, 26, 211, 176, 177, 178, + 179, 99, 100, 101, 122, 123, 124, 38, 39, 40, + 41, 42, 108, 38, 39, 40, 41, 42, 109, 50, + 111, 125, 109, 206, 111, 50, 126, 109, 302, 111, + 204, 75, 306, 307, 118, 119, 207, 68, 109, 70, + 111, 263, 109, 108, 111, 70, 109, 127, 111, 7, + 109, 9, 111, 105, 106, 100, 14, 110, 111, 17, + 18, 19, 108, 21, 22, 287, 288, 172, 173, 100, + 28, 114, 243, 108, 32, 100, 250, 35, 111, 37, + 174, 175, 111, 72, 255, 108, 280, 45, 104, 295, + 48, 79, 104, 81, 109, 278, 267, 268, 86, 87, + 88, 89, 90, 91, 92, 93, 109, 65, 66, 67, + 180, 181, 108, 71, 72, 73, 74, 111, 113, 111, + 104, 16, 109, 113, 105, 12, 114, 141, 273, 23, + 1, 302, 67, 85, 243, 306, 307, 71, 185, 238, + 182, 99, 183, -1, 184, 103, 104, 105, 106, 107, + 108, -1, 186, -1, -1, -1, -1, 7, -1, 9, + 118, 119, 120, 121, 14, -1, -1, 17, 18, 19, + -1, 21, 22, -1, -1, -1, -1, -1, 28, -1, + -1, -1, 32, -1, -1, 35, -1, 37, -1, -1, + -1, -1, -1, -1, -1, 45, -1, -1, 48, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 65, 66, 67, -1, -1, + -1, 71, 72, 73, 74, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 7, -1, 9, -1, + -1, -1, -1, -1, -1, -1, 17, 18, -1, 99, + 21, -1, -1, 103, 104, 105, 106, 28, 108, -1, + -1, 32, -1, -1, -1, -1, 37, -1, 118, 119, + 120, 121, -1, -1, 45, -1, 7, 48, 9, -1, + -1, -1, -1, -1, -1, -1, 17, 18, -1, -1, + 21, -1, -1, -1, 65, -1, 67, 28, -1, -1, + 71, 32, 73, 74, -1, -1, 37, -1, -1, -1, + -1, -1, -1, -1, 45, -1, -1, 48, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 99, -1, + -1, -1, 103, 104, 65, 106, 67, 108, -1, -1, + 71, -1, 73, 74, -1, -1, -1, 118, 119, 120, + 121, -1, -1, -1, -1, 7, -1, 9, -1, -1, + -1, -1, -1, -1, -1, 17, 18, -1, 99, 21, + -1, -1, 103, 104, 105, -1, 28, 108, -1, -1, + 32, -1, -1, -1, -1, 37, -1, 118, 119, 120, + 121, -1, -1, 45, -1, -1, 48, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 65, -1, 67, 7, -1, 9, 71, + -1, 73, 74, -1, -1, -1, 17, 18, -1, -1, + 21, -1, -1, -1, -1, -1, -1, 28, -1, -1, + -1, 32, -1, -1, -1, -1, 37, 99, -1, -1, + -1, 103, 104, -1, 45, 107, 108, 48, -1, -1, + -1, -1, -1, -1, -1, -1, 118, 119, 120, 121, + 0, -1, -1, -1, 65, -1, 67, 7, -1, 9, + 71, -1, 73, 74, -1, -1, -1, 17, -1, -1, + -1, 21, -1, -1, -1, -1, -1, -1, 28, -1, + -1, -1, 32, -1, -1, -1, -1, 37, 99, -1, + -1, -1, 103, 104, -1, 45, -1, 108, 48, -1, + -1, 7, -1, 9, -1, -1, -1, 118, 119, 120, + 121, 17, -1, -1, -1, 21, 66, 67, -1, -1, + -1, 71, 28, -1, -1, -1, 32, -1, -1, -1, + -1, 37, -1, 7, -1, 9, -1, -1, -1, 45, + -1, -1, 48, 17, -1, -1, -1, 21, 98, -1, + -1, -1, -1, -1, 28, 105, -1, -1, 32, -1, + -1, 67, 7, 37, 9, 71, -1, -1, -1, -1, + -1, 45, 17, -1, 48, -1, 21, -1, 23, -1, + 25, -1, -1, 28, 29, -1, -1, 32, -1, -1, + -1, -1, 37, 67, 7, -1, 9, 71, -1, -1, + 45, 107, -1, 48, 17, -1, -1, -1, 21, -1, + -1, -1, -1, -1, -1, 28, -1, -1, -1, 32, + -1, -1, 67, -1, 37, -1, 71, -1, -1, -1, + -1, -1, 45, 107, -1, 48, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 67, -1, -1, -1, 71 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 130, 0, 7, 9, 17, 21, 28, 32, 37, + 45, 48, 66, 67, 71, 98, 105, 131, 132, 133, + 134, 135, 139, 140, 152, 153, 156, 161, 161, 161, + 161, 161, 161, 161, 161, 161, 161, 133, 161, 161, + 161, 102, 99, 100, 101, 136, 157, 158, 159, 105, + 106, 141, 26, 38, 39, 40, 41, 42, 50, 68, + 70, 100, 150, 151, 136, 154, 155, 150, 115, 160, + 105, 111, 107, 142, 112, 100, 106, 136, 112, 99, + 101, 143, 158, 160, 105, 111, 154, 18, 65, 73, + 74, 99, 103, 104, 108, 118, 119, 120, 121, 161, + 165, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 191, 110, + 144, 159, 14, 19, 22, 35, 72, 105, 141, 152, + 161, 166, 167, 168, 169, 171, 172, 191, 50, 151, + 137, 106, 151, 108, 105, 155, 105, 176, 176, 161, + 191, 150, 73, 74, 115, 117, 79, 81, 86, 87, + 88, 89, 90, 91, 92, 93, 114, 190, 176, 122, + 123, 124, 118, 119, 78, 80, 83, 84, 112, 113, + 77, 85, 125, 126, 127, 75, 76, 128, 111, 116, + 136, 114, 167, 108, 108, 191, 108, 150, 107, 167, + 105, 100, 111, 107, 135, 138, 161, 137, 111, 142, + 145, 150, 109, 108, 191, 136, 189, 176, 176, 176, + 176, 178, 178, 179, 179, 180, 180, 180, 180, 181, + 181, 182, 183, 184, 185, 186, 191, 189, 106, 162, + 163, 189, 72, 142, 191, 105, 191, 104, 158, 50, + 150, 107, 104, 146, 147, 148, 109, 160, 163, 164, + 116, 110, 164, 108, 156, 161, 172, 109, 109, 111, + 105, 158, 113, 111, 23, 25, 29, 149, 161, 144, + 109, 109, 111, 189, 107, 111, 191, 172, 172, 167, + 170, 167, 104, 105, 147, 150, 176, 163, 107, 109, + 191, 191, 16, 113, 136, 105, 109, 109, 167, 144, + 167, 167 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ + +#define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + + +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (YYLEX_PARAM) +#else +# define YYLEX yylex () +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, Location); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + YYLTYPE const * const yylocationp; +#endif +{ + if (!yyvaluep) + return; + YYUSE (yylocationp); +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + YYLTYPE const * const yylocationp; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + YY_LOCATION_PRINT (yyoutput, *yylocationp); + YYFPRINTF (yyoutput, ": "); + yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +#else +static void +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) +#else +static void +yy_reduce_print (yyvsp, yylsp, yyrule) + YYSTYPE *yyvsp; + YYLTYPE *yylsp; + int yyrule; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , &(yylsp[(yyi + 1) - (yynrhs)]) ); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, yylsp, Rule); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = 0; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + + for details. YYERROR is fine as it does not invoke this + function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; +} +#endif /* YYERROR_VERBOSE */ + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp) +#else +static void +yydestruct (yymsg, yytype, yyvaluep, yylocationp) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; + YYLTYPE *yylocationp; +#endif +{ + YYUSE (yyvaluep); + YYUSE (yylocationp); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + +/* The lookahead symbol. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; + +/* Location data for the lookahead symbol. */ +YYLTYPE yylloc; + +/* Number of syntax errors so far. */ +int yynerrs; + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void) +#else +int +yyparse () + +#endif +#endif +{ + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + /* The location stack. */ + YYLTYPE yylsa[YYINITDEPTH]; + YYLTYPE *yyls; + YYLTYPE *yylsp; + + /* The locations where the error started and ended. */ + YYLTYPE yyerror_range[3]; + + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + YYLTYPE yyloc; + +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yyls = yylsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + yyssp = yyss; + yyvsp = yyvs; + yylsp = yyls; + +#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL + /* Initialize the default location before parsing starts. */ + yylloc.first_line = yylloc.last_line = 1; + yylloc.first_column = yylloc.last_column = 1; +#endif + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yyls1, yysize * sizeof (*yylsp), + &yystacksize); + + yyls = yyls1; + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + yylsp = yyls + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + *++yyvsp = yylval; + *++yylsp = yylloc; + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + /* Default location. */ + YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: + +/* Line 1806 of yacc.c */ +#line 1022 "hlsl.y" + { + } + break; + + case 3: + +/* Line 1806 of yacc.c */ +#line 1025 "hlsl.y" + { + const struct hlsl_ir_function_decl *decl; + + decl = get_overloaded_func(&hlsl_ctx.functions, (yyvsp[(2) - (2)].function).name, (yyvsp[(2) - (2)].function).decl->parameters, TRUE); + if (decl && !decl->func->intrinsic) + { + if (decl->body && (yyvsp[(2) - (2)].function).decl->body) + { + hlsl_report_message((yyvsp[(2) - (2)].function).decl->node.loc.file, (yyvsp[(2) - (2)].function).decl->node.loc.line, + (yyvsp[(2) - (2)].function).decl->node.loc.col, HLSL_LEVEL_ERROR, + "redefinition of function %s", debugstr_a((yyvsp[(2) - (2)].function).name)); + return 1; + } + else if (!compare_hlsl_types(decl->node.data_type, (yyvsp[(2) - (2)].function).decl->node.data_type)) + { + hlsl_report_message((yyvsp[(2) - (2)].function).decl->node.loc.file, (yyvsp[(2) - (2)].function).decl->node.loc.line, + (yyvsp[(2) - (2)].function).decl->node.loc.col, HLSL_LEVEL_ERROR, + "redefining function %s with a different return type", + debugstr_a((yyvsp[(2) - (2)].function).name)); + hlsl_report_message(decl->node.loc.file, decl->node.loc.line, decl->node.loc.col, HLSL_LEVEL_NOTE, + "%s previously declared here", + debugstr_a((yyvsp[(2) - (2)].function).name)); + return 1; + } + } + + if ((yyvsp[(2) - (2)].function).decl->node.data_type->base_type == HLSL_TYPE_VOID && (yyvsp[(2) - (2)].function).decl->semantic) + { + hlsl_report_message((yyvsp[(2) - (2)].function).decl->node.loc.file, (yyvsp[(2) - (2)].function).decl->node.loc.line, + (yyvsp[(2) - (2)].function).decl->node.loc.col, HLSL_LEVEL_ERROR, + "void function with a semantic"); + } + + TRACE("Adding function '%s' to the function list.\n", (yyvsp[(2) - (2)].function).name); + add_function_decl(&hlsl_ctx.functions, (yyvsp[(2) - (2)].function).name, (yyvsp[(2) - (2)].function).decl, FALSE); + } + break; + + case 4: + +/* Line 1806 of yacc.c */ +#line 1062 "hlsl.y" + { + TRACE("Declaration statement parsed.\n"); + } + break; + + case 5: + +/* Line 1806 of yacc.c */ +#line 1066 "hlsl.y" + { + } + break; + + case 6: + +/* Line 1806 of yacc.c */ +#line 1069 "hlsl.y" + { + TRACE("Skipping stray semicolon.\n"); + } + break; + + case 7: + +/* Line 1806 of yacc.c */ +#line 1074 "hlsl.y" + { + TRACE("Updating line information to file %s, line %u\n", debugstr_a((yyvsp[(2) - (2)].name)), (yyvsp[(1) - (2)].intval)); + hlsl_ctx.line_no = (yyvsp[(1) - (2)].intval); + if (strcmp((yyvsp[(2) - (2)].name), hlsl_ctx.source_file)) + { + const char **new_array; + + hlsl_ctx.source_file = (yyvsp[(2) - (2)].name); + new_array = d3dcompiler_realloc(hlsl_ctx.source_files, + sizeof(*hlsl_ctx.source_files) * hlsl_ctx.source_files_count + 1); + if (new_array) + { + hlsl_ctx.source_files = new_array; + hlsl_ctx.source_files[hlsl_ctx.source_files_count++] = (yyvsp[(2) - (2)].name); + } + } + } + break; + + case 8: + +/* Line 1806 of yacc.c */ +#line 1093 "hlsl.y" + { + struct source_location loc; + + set_location(&loc, &(yylsp[(3) - (3)])); + if (!(yyvsp[(2) - (3)].list)) + { + if (!(yyvsp[(1) - (3)].type)->name) + { + hlsl_report_message(loc.file, loc.line, loc.col, + HLSL_LEVEL_ERROR, "anonymous struct declaration with no variables"); + } + check_type_modifiers((yyvsp[(1) - (3)].type)->modifiers, &loc); + } + (yyval.list) = declare_vars((yyvsp[(1) - (3)].type), 0, (yyvsp[(2) - (3)].list)); + } + break; + + case 11: + +/* Line 1806 of yacc.c */ +#line 1113 "hlsl.y" + { + BOOL ret; + struct source_location loc; + + TRACE("Structure %s declaration.\n", debugstr_a((yyvsp[(3) - (6)].name))); + set_location(&loc, &(yylsp[(1) - (6)])); + check_invalid_matrix_modifiers((yyvsp[(1) - (6)].modifiers), &loc); + (yyval.type) = new_struct_type((yyvsp[(3) - (6)].name), (yyvsp[(1) - (6)].modifiers), (yyvsp[(5) - (6)].list)); + + if (get_variable(hlsl_ctx.cur_scope, (yyvsp[(3) - (6)].name))) + { + hlsl_report_message(hlsl_ctx.source_file, (yylsp[(3) - (6)]).first_line, (yylsp[(3) - (6)]).first_column, + HLSL_LEVEL_ERROR, "redefinition of '%s'", (yyvsp[(3) - (6)].name)); + return 1; + } + + ret = add_type_to_scope(hlsl_ctx.cur_scope, (yyval.type)); + if (!ret) + { + hlsl_report_message(hlsl_ctx.source_file, (yylsp[(3) - (6)]).first_line, (yylsp[(3) - (6)]).first_column, + HLSL_LEVEL_ERROR, "redefinition of struct '%s'", (yyvsp[(3) - (6)].name)); + return 1; + } + } + break; + + case 12: + +/* Line 1806 of yacc.c */ +#line 1139 "hlsl.y" + { + struct source_location loc; + + TRACE("Anonymous structure declaration.\n"); + set_location(&loc, &(yylsp[(1) - (5)])); + check_invalid_matrix_modifiers((yyvsp[(1) - (5)].modifiers), &loc); + (yyval.type) = new_struct_type(NULL, (yyvsp[(1) - (5)].modifiers), (yyvsp[(4) - (5)].list)); + } + break; + + case 16: + +/* Line 1806 of yacc.c */ +#line 1153 "hlsl.y" + { + (yyval.list) = d3dcompiler_alloc(sizeof(*(yyval.list))); + list_init((yyval.list)); + } + break; + + case 17: + +/* Line 1806 of yacc.c */ +#line 1158 "hlsl.y" + { + BOOL ret; + struct hlsl_struct_field *field, *next; + + (yyval.list) = (yyvsp[(1) - (2)].list); + LIST_FOR_EACH_ENTRY_SAFE(field, next, (yyvsp[(2) - (2)].list), struct hlsl_struct_field, entry) + { + ret = add_struct_field((yyval.list), field); + if (ret == FALSE) + { + hlsl_report_message(hlsl_ctx.source_file, (yylsp[(2) - (2)]).first_line, (yylsp[(2) - (2)]).first_column, + HLSL_LEVEL_ERROR, "redefinition of '%s'", field->name); + d3dcompiler_free(field); + } + } + d3dcompiler_free((yyvsp[(2) - (2)].list)); + } + break; + + case 18: + +/* Line 1806 of yacc.c */ +#line 1177 "hlsl.y" + { + (yyval.list) = gen_struct_fields((yyvsp[(2) - (4)].type), (yyvsp[(1) - (4)].modifiers), (yyvsp[(3) - (4)].list)); + } + break; + + case 19: + +/* Line 1806 of yacc.c */ +#line 1181 "hlsl.y" + { + (yyval.list) = gen_struct_fields((yyvsp[(1) - (3)].type), 0, (yyvsp[(2) - (3)].list)); + } + break; + + case 20: + +/* Line 1806 of yacc.c */ +#line 1186 "hlsl.y" + { + TRACE("Function %s parsed.\n", (yyvsp[(1) - (2)].function).name); + (yyval.function) = (yyvsp[(1) - (2)].function); + (yyval.function).decl->body = (yyvsp[(2) - (2)].list); + pop_scope(&hlsl_ctx); + } + break; + + case 21: + +/* Line 1806 of yacc.c */ +#line 1193 "hlsl.y" + { + TRACE("Function prototype for %s.\n", (yyvsp[(1) - (2)].function).name); + (yyval.function) = (yyvsp[(1) - (2)].function); + pop_scope(&hlsl_ctx); + } + break; + + case 22: + +/* Line 1806 of yacc.c */ +#line 1200 "hlsl.y" + { + if (get_variable(hlsl_ctx.globals, (yyvsp[(3) - (7)].name))) + { + hlsl_report_message(hlsl_ctx.source_file, (yylsp[(3) - (7)]).first_line, (yylsp[(3) - (7)]).first_column, + HLSL_LEVEL_ERROR, "redefinition of '%s'\n", (yyvsp[(3) - (7)].name)); + return 1; + } + if ((yyvsp[(2) - (7)].type)->base_type == HLSL_TYPE_VOID && (yyvsp[(7) - (7)].name)) + { + hlsl_report_message(hlsl_ctx.source_file, (yylsp[(7) - (7)]).first_line, (yylsp[(7) - (7)]).first_column, + HLSL_LEVEL_ERROR, "void function with a semantic"); + } + + (yyval.function).decl = new_func_decl((yyvsp[(2) - (7)].type), (yyvsp[(5) - (7)].list)); + if (!(yyval.function).decl) + { + ERR("Out of memory.\n"); + return -1; + } + (yyval.function).name = (yyvsp[(3) - (7)].name); + (yyval.function).decl->semantic = (yyvsp[(7) - (7)].name); + set_location(&(yyval.function).decl->node.loc, &(yylsp[(3) - (7)])); + } + break; + + case 23: + +/* Line 1806 of yacc.c */ +#line 1225 "hlsl.y" + { + (yyval.list) = d3dcompiler_alloc(sizeof(*(yyval.list))); + list_init((yyval.list)); + } + break; + + case 24: + +/* Line 1806 of yacc.c */ +#line 1230 "hlsl.y" + { + pop_scope(&hlsl_ctx); + (yyval.list) = (yyvsp[(3) - (4)].list); + } + break; + + case 25: + +/* Line 1806 of yacc.c */ +#line 1236 "hlsl.y" + { + push_scope(&hlsl_ctx); + } + break; + + case 28: + +/* Line 1806 of yacc.c */ +#line 1244 "hlsl.y" + { + (yyval.name) = NULL; + } + break; + + case 29: + +/* Line 1806 of yacc.c */ +#line 1248 "hlsl.y" + { + (yyval.name) = (yyvsp[(2) - (2)].name); + } + break; + + case 30: + +/* Line 1806 of yacc.c */ +#line 1253 "hlsl.y" + { + (yyval.list) = d3dcompiler_alloc(sizeof(*(yyval.list))); + list_init((yyval.list)); + } + break; + + case 31: + +/* Line 1806 of yacc.c */ +#line 1258 "hlsl.y" + { + (yyval.list) = (yyvsp[(2) - (2)].list); + } + break; + + case 32: + +/* Line 1806 of yacc.c */ +#line 1263 "hlsl.y" + { + struct source_location loc; + + (yyval.list) = d3dcompiler_alloc(sizeof(*(yyval.list))); + list_init((yyval.list)); + set_location(&loc, &(yylsp[(1) - (1)])); + if (!add_func_parameter((yyval.list), &(yyvsp[(1) - (1)].parameter), &loc)) + { + ERR("Error adding function parameter %s.\n", (yyvsp[(1) - (1)].parameter).name); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + return -1; + } + } + break; + + case 33: + +/* Line 1806 of yacc.c */ +#line 1277 "hlsl.y" + { + struct source_location loc; + + (yyval.list) = (yyvsp[(1) - (3)].list); + set_location(&loc, &(yylsp[(3) - (3)])); + if (!add_func_parameter((yyval.list), &(yyvsp[(3) - (3)].parameter), &loc)) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "duplicate parameter %s", (yyvsp[(3) - (3)].parameter).name); + return 1; + } + } + break; + + case 34: + +/* Line 1806 of yacc.c */ +#line 1291 "hlsl.y" + { + (yyval.parameter).modifiers = (yyvsp[(1) - (5)].modifiers) ? (yyvsp[(1) - (5)].modifiers) : HLSL_MODIFIER_IN; + (yyval.parameter).modifiers |= (yyvsp[(2) - (5)].modifiers); + (yyval.parameter).type = (yyvsp[(3) - (5)].type); + (yyval.parameter).name = (yyvsp[(4) - (5)].name); + (yyval.parameter).semantic = (yyvsp[(5) - (5)].name); + } + break; + + case 35: + +/* Line 1806 of yacc.c */ +#line 1300 "hlsl.y" + { + (yyval.modifiers) = 0; + } + break; + + case 36: + +/* Line 1806 of yacc.c */ +#line 1304 "hlsl.y" + { + if ((yyvsp[(1) - (2)].modifiers) & (yyvsp[(2) - (2)].modifiers)) + { + hlsl_report_message(hlsl_ctx.source_file, (yylsp[(2) - (2)]).first_line, (yylsp[(2) - (2)]).first_column, + HLSL_LEVEL_ERROR, "duplicate input-output modifiers"); + return 1; + } + (yyval.modifiers) = (yyvsp[(1) - (2)].modifiers) | (yyvsp[(2) - (2)].modifiers); + } + break; + + case 37: + +/* Line 1806 of yacc.c */ +#line 1315 "hlsl.y" + { + (yyval.modifiers) = HLSL_MODIFIER_IN; + } + break; + + case 38: + +/* Line 1806 of yacc.c */ +#line 1319 "hlsl.y" + { + (yyval.modifiers) = HLSL_MODIFIER_OUT; + } + break; + + case 39: + +/* Line 1806 of yacc.c */ +#line 1323 "hlsl.y" + { + (yyval.modifiers) = HLSL_MODIFIER_IN | HLSL_MODIFIER_OUT; + } + break; + + case 40: + +/* Line 1806 of yacc.c */ +#line 1328 "hlsl.y" + { + (yyval.type) = (yyvsp[(1) - (1)].type); + } + break; + + case 41: + +/* Line 1806 of yacc.c */ +#line 1332 "hlsl.y" + { + if ((yyvsp[(3) - (6)].type)->type != HLSL_CLASS_SCALAR) + { + hlsl_message("Line %u: vectors of non-scalar types are not allowed.\n", + hlsl_ctx.line_no); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + return 1; + } + if ((yyvsp[(5) - (6)].intval) < 1 || (yyvsp[(5) - (6)].intval) > 4) + { + hlsl_message("Line %u: vector size must be between 1 and 4.\n", + hlsl_ctx.line_no); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + return 1; + } + + (yyval.type) = new_hlsl_type(NULL, HLSL_CLASS_VECTOR, (yyvsp[(3) - (6)].type)->base_type, (yyvsp[(5) - (6)].intval), 1); + } + break; + + case 42: + +/* Line 1806 of yacc.c */ +#line 1351 "hlsl.y" + { + if ((yyvsp[(3) - (8)].type)->type != HLSL_CLASS_SCALAR) + { + hlsl_message("Line %u: matrices of non-scalar types are not allowed.\n", + hlsl_ctx.line_no); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + return 1; + } + if ((yyvsp[(5) - (8)].intval) < 1 || (yyvsp[(5) - (8)].intval) > 4 || (yyvsp[(7) - (8)].intval) < 1 || (yyvsp[(7) - (8)].intval) > 4) + { + hlsl_message("Line %u: matrix dimensions must be between 1 and 4.\n", + hlsl_ctx.line_no); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + return 1; + } + + (yyval.type) = new_hlsl_type(NULL, HLSL_CLASS_MATRIX, (yyvsp[(3) - (8)].type)->base_type, (yyvsp[(5) - (8)].intval), (yyvsp[(7) - (8)].intval)); + } + break; + + case 43: + +/* Line 1806 of yacc.c */ +#line 1371 "hlsl.y" + { + (yyval.type) = new_hlsl_type(d3dcompiler_strdup("void"), HLSL_CLASS_OBJECT, HLSL_TYPE_VOID, 1, 1); + } + break; + + case 44: + +/* Line 1806 of yacc.c */ +#line 1375 "hlsl.y" + { + (yyval.type) = new_hlsl_type(d3dcompiler_strdup("sampler"), HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1); + (yyval.type)->sampler_dim = HLSL_SAMPLER_DIM_GENERIC; + } + break; + + case 45: + +/* Line 1806 of yacc.c */ +#line 1380 "hlsl.y" + { + (yyval.type) = new_hlsl_type(d3dcompiler_strdup("sampler1D"), HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1); + (yyval.type)->sampler_dim = HLSL_SAMPLER_DIM_1D; + } + break; + + case 46: + +/* Line 1806 of yacc.c */ +#line 1385 "hlsl.y" + { + (yyval.type) = new_hlsl_type(d3dcompiler_strdup("sampler2D"), HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1); + (yyval.type)->sampler_dim = HLSL_SAMPLER_DIM_2D; + } + break; + + case 47: + +/* Line 1806 of yacc.c */ +#line 1390 "hlsl.y" + { + (yyval.type) = new_hlsl_type(d3dcompiler_strdup("sampler3D"), HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1); + (yyval.type)->sampler_dim = HLSL_SAMPLER_DIM_3D; + } + break; + + case 48: + +/* Line 1806 of yacc.c */ +#line 1395 "hlsl.y" + { + (yyval.type) = new_hlsl_type(d3dcompiler_strdup("samplerCUBE"), HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1); + (yyval.type)->sampler_dim = HLSL_SAMPLER_DIM_CUBE; + } + break; + + case 49: + +/* Line 1806 of yacc.c */ +#line 1400 "hlsl.y" + { + struct hlsl_type *type; + + TRACE("Type %s.\n", (yyvsp[(1) - (1)].name)); + type = get_type(hlsl_ctx.cur_scope, (yyvsp[(1) - (1)].name), TRUE); + (yyval.type) = type; + d3dcompiler_free((yyvsp[(1) - (1)].name)); + } + break; + + case 50: + +/* Line 1806 of yacc.c */ +#line 1409 "hlsl.y" + { + struct hlsl_type *type; + + TRACE("Struct type %s.\n", (yyvsp[(2) - (2)].name)); + type = get_type(hlsl_ctx.cur_scope, (yyvsp[(2) - (2)].name), TRUE); + if (type->type != HLSL_CLASS_STRUCT) + { + hlsl_message("Line %u: redefining %s as a structure.\n", + hlsl_ctx.line_no, (yyvsp[(2) - (2)].name)); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + } + else + { + (yyval.type) = type; + } + d3dcompiler_free((yyvsp[(2) - (2)].name)); + } + break; + + case 53: + +/* Line 1806 of yacc.c */ +#line 1430 "hlsl.y" + { + (yyval.list) = d3dcompiler_alloc(sizeof(*(yyval.list))); + if (!(yyval.list)) + { + ERR("Out of memory\n"); + return -1; + } + list_init((yyval.list)); + } + break; + + case 54: + +/* Line 1806 of yacc.c */ +#line 1441 "hlsl.y" + { + struct source_location loc; + + set_location(&loc, &(yylsp[(1) - (5)])); + if (!add_typedef((yyvsp[(2) - (5)].modifiers), (yyvsp[(3) - (5)].type), (yyvsp[(4) - (5)].list), &loc)) + return 1; + } + break; + + case 55: + +/* Line 1806 of yacc.c */ +#line 1449 "hlsl.y" + { + struct source_location loc; + + set_location(&loc, &(yylsp[(1) - (4)])); + if (!add_typedef(0, (yyvsp[(2) - (4)].type), (yyvsp[(3) - (4)].list), &loc)) + return 1; + } + break; + + case 56: + +/* Line 1806 of yacc.c */ +#line 1458 "hlsl.y" + { + (yyval.list) = d3dcompiler_alloc(sizeof(*(yyval.list))); + list_init((yyval.list)); + list_add_head((yyval.list), &(yyvsp[(1) - (1)].variable_def)->entry); + } + break; + + case 57: + +/* Line 1806 of yacc.c */ +#line 1464 "hlsl.y" + { + (yyval.list) = (yyvsp[(1) - (3)].list); + list_add_tail((yyval.list), &(yyvsp[(3) - (3)].variable_def)->entry); + } + break; + + case 58: + +/* Line 1806 of yacc.c */ +#line 1470 "hlsl.y" + { + (yyval.variable_def) = d3dcompiler_alloc(sizeof(*(yyval.variable_def))); + set_location(&(yyval.variable_def)->loc, &(yylsp[(1) - (2)])); + (yyval.variable_def)->name = (yyvsp[(1) - (2)].name); + (yyval.variable_def)->array_size = (yyvsp[(2) - (2)].intval); + } + break; + + case 59: + +/* Line 1806 of yacc.c */ +#line 1478 "hlsl.y" + { + (yyval.list) = declare_vars((yyvsp[(2) - (4)].type), (yyvsp[(1) - (4)].modifiers), (yyvsp[(3) - (4)].list)); + } + break; + + case 60: + +/* Line 1806 of yacc.c */ +#line 1483 "hlsl.y" + { + (yyval.list) = NULL; + } + break; + + case 61: + +/* Line 1806 of yacc.c */ +#line 1487 "hlsl.y" + { + (yyval.list) = (yyvsp[(1) - (1)].list); + } + break; + + case 62: + +/* Line 1806 of yacc.c */ +#line 1492 "hlsl.y" + { + (yyval.list) = d3dcompiler_alloc(sizeof(*(yyval.list))); + list_init((yyval.list)); + list_add_head((yyval.list), &(yyvsp[(1) - (1)].variable_def)->entry); + } + break; + + case 63: + +/* Line 1806 of yacc.c */ +#line 1498 "hlsl.y" + { + (yyval.list) = (yyvsp[(1) - (3)].list); + list_add_tail((yyval.list), &(yyvsp[(3) - (3)].variable_def)->entry); + } + break; + + case 64: + +/* Line 1806 of yacc.c */ +#line 1504 "hlsl.y" + { + (yyval.variable_def) = d3dcompiler_alloc(sizeof(*(yyval.variable_def))); + set_location(&(yyval.variable_def)->loc, &(yylsp[(1) - (3)])); + (yyval.variable_def)->name = (yyvsp[(1) - (3)].name); + (yyval.variable_def)->array_size = (yyvsp[(2) - (3)].intval); + (yyval.variable_def)->semantic = (yyvsp[(3) - (3)].name); + } + break; + + case 65: + +/* Line 1806 of yacc.c */ +#line 1512 "hlsl.y" + { + TRACE("Declaration with initializer.\n"); + (yyval.variable_def) = d3dcompiler_alloc(sizeof(*(yyval.variable_def))); + set_location(&(yyval.variable_def)->loc, &(yylsp[(1) - (5)])); + (yyval.variable_def)->name = (yyvsp[(1) - (5)].name); + (yyval.variable_def)->array_size = (yyvsp[(2) - (5)].intval); + (yyval.variable_def)->semantic = (yyvsp[(3) - (5)].name); + (yyval.variable_def)->initializer = (yyvsp[(5) - (5)].list); + } + break; + + case 66: + +/* Line 1806 of yacc.c */ +#line 1523 "hlsl.y" + { + (yyval.intval) = 0; + } + break; + + case 67: + +/* Line 1806 of yacc.c */ +#line 1527 "hlsl.y" + { + FIXME("Array.\n"); + (yyval.intval) = 0; + free_instr((yyvsp[(2) - (3)].instr)); + } + break; + + case 68: + +/* Line 1806 of yacc.c */ +#line 1534 "hlsl.y" + { + (yyval.modifiers) = 0; + } + break; + + case 69: + +/* Line 1806 of yacc.c */ +#line 1538 "hlsl.y" + { + (yyval.modifiers) = add_modifier((yyvsp[(2) - (2)].modifiers), HLSL_STORAGE_EXTERN, &(yylsp[(1) - (2)])); + } + break; + + case 70: + +/* Line 1806 of yacc.c */ +#line 1542 "hlsl.y" + { + (yyval.modifiers) = add_modifier((yyvsp[(2) - (2)].modifiers), HLSL_STORAGE_NOINTERPOLATION, &(yylsp[(1) - (2)])); + } + break; + + case 71: + +/* Line 1806 of yacc.c */ +#line 1546 "hlsl.y" + { + (yyval.modifiers) = add_modifier((yyvsp[(2) - (2)].modifiers), HLSL_MODIFIER_PRECISE, &(yylsp[(1) - (2)])); + } + break; + + case 72: + +/* Line 1806 of yacc.c */ +#line 1550 "hlsl.y" + { + (yyval.modifiers) = add_modifier((yyvsp[(2) - (2)].modifiers), HLSL_STORAGE_SHARED, &(yylsp[(1) - (2)])); + } + break; + + case 73: + +/* Line 1806 of yacc.c */ +#line 1554 "hlsl.y" + { + (yyval.modifiers) = add_modifier((yyvsp[(2) - (2)].modifiers), HLSL_STORAGE_GROUPSHARED, &(yylsp[(1) - (2)])); + } + break; + + case 74: + +/* Line 1806 of yacc.c */ +#line 1558 "hlsl.y" + { + (yyval.modifiers) = add_modifier((yyvsp[(2) - (2)].modifiers), HLSL_STORAGE_STATIC, &(yylsp[(1) - (2)])); + } + break; + + case 75: + +/* Line 1806 of yacc.c */ +#line 1562 "hlsl.y" + { + (yyval.modifiers) = add_modifier((yyvsp[(2) - (2)].modifiers), HLSL_STORAGE_UNIFORM, &(yylsp[(1) - (2)])); + } + break; + + case 76: + +/* Line 1806 of yacc.c */ +#line 1566 "hlsl.y" + { + (yyval.modifiers) = add_modifier((yyvsp[(2) - (2)].modifiers), HLSL_STORAGE_VOLATILE, &(yylsp[(1) - (2)])); + } + break; + + case 77: + +/* Line 1806 of yacc.c */ +#line 1570 "hlsl.y" + { + (yyval.modifiers) = add_modifier((yyvsp[(2) - (2)].modifiers), HLSL_MODIFIER_CONST, &(yylsp[(1) - (2)])); + } + break; + + case 78: + +/* Line 1806 of yacc.c */ +#line 1574 "hlsl.y" + { + (yyval.modifiers) = add_modifier((yyvsp[(2) - (2)].modifiers), HLSL_MODIFIER_ROW_MAJOR, &(yylsp[(1) - (2)])); + } + break; + + case 79: + +/* Line 1806 of yacc.c */ +#line 1578 "hlsl.y" + { + (yyval.modifiers) = add_modifier((yyvsp[(2) - (2)].modifiers), HLSL_MODIFIER_COLUMN_MAJOR, &(yylsp[(1) - (2)])); + } + break; + + case 80: + +/* Line 1806 of yacc.c */ +#line 1583 "hlsl.y" + { + (yyval.list) = d3dcompiler_alloc(sizeof(*(yyval.list))); + list_init((yyval.list)); + list_add_head((yyval.list), &(yyvsp[(1) - (1)].instr)->entry); + } + break; + + case 81: + +/* Line 1806 of yacc.c */ +#line 1589 "hlsl.y" + { + (yyval.list) = (yyvsp[(2) - (3)].list); + } + break; + + case 82: + +/* Line 1806 of yacc.c */ +#line 1593 "hlsl.y" + { + (yyval.list) = (yyvsp[(2) - (4)].list); + } + break; + + case 83: + +/* Line 1806 of yacc.c */ +#line 1598 "hlsl.y" + { + (yyval.instr) = (yyvsp[(1) - (1)].instr); + } + break; + + case 84: + +/* Line 1806 of yacc.c */ +#line 1603 "hlsl.y" + { + (yyval.list) = d3dcompiler_alloc(sizeof(*(yyval.list))); + list_init((yyval.list)); + list_add_head((yyval.list), &(yyvsp[(1) - (1)].instr)->entry); + } + break; + + case 85: + +/* Line 1806 of yacc.c */ +#line 1609 "hlsl.y" + { + (yyval.list) = (yyvsp[(1) - (3)].list); + list_add_tail((yyval.list), &(yyvsp[(3) - (3)].instr)->entry); + } + break; + + case 86: + +/* Line 1806 of yacc.c */ +#line 1615 "hlsl.y" + { + (yyval.boolval) = TRUE; + } + break; + + case 87: + +/* Line 1806 of yacc.c */ +#line 1619 "hlsl.y" + { + (yyval.boolval) = FALSE; + } + break; + + case 88: + +/* Line 1806 of yacc.c */ +#line 1624 "hlsl.y" + { + (yyval.list) = (yyvsp[(1) - (1)].list); + } + break; + + case 89: + +/* Line 1806 of yacc.c */ +#line 1628 "hlsl.y" + { + (yyval.list) = (yyvsp[(1) - (2)].list); + list_move_tail((yyval.list), (yyvsp[(2) - (2)].list)); + d3dcompiler_free((yyvsp[(2) - (2)].list)); + } + break; + + case 96: + +/* Line 1806 of yacc.c */ +#line 1643 "hlsl.y" + { + struct hlsl_ir_jump *jump = d3dcompiler_alloc(sizeof(*jump)); + if (!jump) + { + ERR("Out of memory\n"); + return -1; + } + jump->node.type = HLSL_IR_JUMP; + set_location(&jump->node.loc, &(yylsp[(1) - (3)])); + jump->type = HLSL_IR_JUMP_RETURN; + jump->node.data_type = (yyvsp[(2) - (3)].instr)->data_type; + jump->return_value = (yyvsp[(2) - (3)].instr); + + FIXME("Check for valued return on void function.\n"); + FIXME("Implicit conversion to the return type if needed, " + "error out if conversion not possible.\n"); + + (yyval.list) = d3dcompiler_alloc(sizeof(*(yyval.list))); + list_init((yyval.list)); + list_add_tail((yyval.list), &jump->node.entry); + } + break; + + case 97: + +/* Line 1806 of yacc.c */ +#line 1666 "hlsl.y" + { + struct hlsl_ir_if *instr = d3dcompiler_alloc(sizeof(*instr)); + if (!instr) + { + ERR("Out of memory\n"); + return -1; + } + instr->node.type = HLSL_IR_IF; + set_location(&instr->node.loc, &(yylsp[(1) - (5)])); + instr->condition = (yyvsp[(3) - (5)].instr); + instr->then_instrs = (yyvsp[(5) - (5)].if_body).then_instrs; + instr->else_instrs = (yyvsp[(5) - (5)].if_body).else_instrs; + if ((yyvsp[(3) - (5)].instr)->data_type->dimx > 1 || (yyvsp[(3) - (5)].instr)->data_type->dimy > 1) + { + hlsl_report_message(instr->node.loc.file, instr->node.loc.line, + instr->node.loc.col, HLSL_LEVEL_ERROR, + "if condition requires a scalar"); + } + (yyval.list) = d3dcompiler_alloc(sizeof(*(yyval.list))); + list_init((yyval.list)); + list_add_head((yyval.list), &instr->node.entry); + } + break; + + case 98: + +/* Line 1806 of yacc.c */ +#line 1690 "hlsl.y" + { + (yyval.if_body).then_instrs = (yyvsp[(1) - (1)].list); + (yyval.if_body).else_instrs = NULL; + } + break; + + case 99: + +/* Line 1806 of yacc.c */ +#line 1695 "hlsl.y" + { + (yyval.if_body).then_instrs = (yyvsp[(1) - (3)].list); + (yyval.if_body).else_instrs = (yyvsp[(3) - (3)].list); + } + break; + + case 100: + +/* Line 1806 of yacc.c */ +#line 1701 "hlsl.y" + { + struct source_location loc; + struct list *cond = d3dcompiler_alloc(sizeof(*cond)); + + if (!cond) + { + ERR("Out of memory.\n"); + return -1; + } + list_init(cond); + list_add_head(cond, &(yyvsp[(3) - (5)].instr)->entry); + set_location(&loc, &(yylsp[(1) - (5)])); + (yyval.list) = create_loop(LOOP_WHILE, NULL, cond, NULL, (yyvsp[(5) - (5)].list), &loc); + } + break; + + case 101: + +/* Line 1806 of yacc.c */ +#line 1716 "hlsl.y" + { + struct source_location loc; + struct list *cond = d3dcompiler_alloc(sizeof(*cond)); + + if (!cond) + { + ERR("Out of memory.\n"); + return -1; + } + list_init(cond); + list_add_head(cond, &(yyvsp[(5) - (7)].instr)->entry); + set_location(&loc, &(yylsp[(1) - (7)])); + (yyval.list) = create_loop(LOOP_DO_WHILE, NULL, cond, NULL, (yyvsp[(2) - (7)].list), &loc); + } + break; + + case 102: + +/* Line 1806 of yacc.c */ +#line 1731 "hlsl.y" + { + struct source_location loc; + + set_location(&loc, &(yylsp[(1) - (8)])); + (yyval.list) = create_loop(LOOP_FOR, (yyvsp[(4) - (8)].list), (yyvsp[(5) - (8)].list), (yyvsp[(6) - (8)].instr), (yyvsp[(8) - (8)].list), &loc); + pop_scope(&hlsl_ctx); + } + break; + + case 103: + +/* Line 1806 of yacc.c */ +#line 1739 "hlsl.y" + { + struct source_location loc; + + set_location(&loc, &(yylsp[(1) - (8)])); + if (!(yyvsp[(4) - (8)].list)) + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_WARNING, + "no expressions in for loop initializer"); + (yyval.list) = create_loop(LOOP_FOR, (yyvsp[(4) - (8)].list), (yyvsp[(5) - (8)].list), (yyvsp[(6) - (8)].instr), (yyvsp[(8) - (8)].list), &loc); + pop_scope(&hlsl_ctx); + } + break; + + case 104: + +/* Line 1806 of yacc.c */ +#line 1751 "hlsl.y" + { + (yyval.list) = d3dcompiler_alloc(sizeof(*(yyval.list))); + list_init((yyval.list)); + } + break; + + case 105: + +/* Line 1806 of yacc.c */ +#line 1756 "hlsl.y" + { + (yyval.list) = d3dcompiler_alloc(sizeof(*(yyval.list))); + list_init((yyval.list)); + if ((yyvsp[(1) - (2)].instr)) + list_add_head((yyval.list), &(yyvsp[(1) - (2)].instr)->entry); + } + break; + + case 106: + +/* Line 1806 of yacc.c */ +#line 1764 "hlsl.y" + { + struct hlsl_ir_constant *c = d3dcompiler_alloc(sizeof(*c)); + if (!c) + { + ERR("Out of memory.\n"); + return -1; + } + c->node.type = HLSL_IR_CONSTANT; + set_location(&c->node.loc, &yylloc); + c->node.data_type = new_hlsl_type(d3dcompiler_strdup("float"), HLSL_CLASS_SCALAR, HLSL_TYPE_FLOAT, 1, 1); + c->v.value.f[0] = (yyvsp[(1) - (1)].floatval); + (yyval.instr) = &c->node; + } + break; + + case 107: + +/* Line 1806 of yacc.c */ +#line 1778 "hlsl.y" + { + struct hlsl_ir_constant *c = d3dcompiler_alloc(sizeof(*c)); + if (!c) + { + ERR("Out of memory.\n"); + return -1; + } + c->node.type = HLSL_IR_CONSTANT; + set_location(&c->node.loc, &yylloc); + c->node.data_type = new_hlsl_type(d3dcompiler_strdup("int"), HLSL_CLASS_SCALAR, HLSL_TYPE_INT, 1, 1); + c->v.value.i[0] = (yyvsp[(1) - (1)].intval); + (yyval.instr) = &c->node; + } + break; + + case 108: + +/* Line 1806 of yacc.c */ +#line 1792 "hlsl.y" + { + struct hlsl_ir_constant *c = d3dcompiler_alloc(sizeof(*c)); + if (!c) + { + ERR("Out of memory.\n"); + return -1; + } + c->node.type = HLSL_IR_CONSTANT; + set_location(&c->node.loc, &yylloc); + c->node.data_type = new_hlsl_type(d3dcompiler_strdup("bool"), HLSL_CLASS_SCALAR, HLSL_TYPE_BOOL, 1, 1); + c->v.value.b[0] = (yyvsp[(1) - (1)].boolval); + (yyval.instr) = &c->node; + } + break; + + case 109: + +/* Line 1806 of yacc.c */ +#line 1806 "hlsl.y" + { + struct hlsl_ir_deref *deref = new_var_deref((yyvsp[(1) - (1)].var)); + if (deref) + { + (yyval.instr) = &deref->node; + set_location(&(yyval.instr)->loc, &(yylsp[(1) - (1)])); + } + else + (yyval.instr) = NULL; + } + break; + + case 110: + +/* Line 1806 of yacc.c */ +#line 1817 "hlsl.y" + { + (yyval.instr) = (yyvsp[(2) - (3)].instr); + } + break; + + case 111: + +/* Line 1806 of yacc.c */ +#line 1822 "hlsl.y" + { + struct hlsl_ir_var *var; + var = get_variable(hlsl_ctx.cur_scope, (yyvsp[(1) - (1)].name)); + if (!var) + { + hlsl_message("Line %d: variable '%s' not declared\n", + hlsl_ctx.line_no, (yyvsp[(1) - (1)].name)); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + return 1; + } + (yyval.var) = var; + } + break; + + case 112: + +/* Line 1806 of yacc.c */ +#line 1836 "hlsl.y" + { + (yyval.instr) = (yyvsp[(1) - (1)].instr); + } + break; + + case 113: + +/* Line 1806 of yacc.c */ +#line 1840 "hlsl.y" + { + struct hlsl_ir_node *operands[3]; + struct source_location loc; + + set_location(&loc, &(yylsp[(2) - (2)])); + if ((yyvsp[(1) - (2)].instr)->data_type->modifiers & HLSL_MODIFIER_CONST) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "modifying a const expression"); + return 1; + } + operands[0] = (yyvsp[(1) - (2)].instr); + operands[1] = operands[2] = NULL; + (yyval.instr) = &new_expr(HLSL_IR_BINOP_POSTINC, operands, &loc)->node; + /* Post increment/decrement expressions are considered const */ + (yyval.instr)->data_type = clone_hlsl_type((yyval.instr)->data_type); + (yyval.instr)->data_type->modifiers |= HLSL_MODIFIER_CONST; + } + break; + + case 114: + +/* Line 1806 of yacc.c */ +#line 1859 "hlsl.y" + { + struct hlsl_ir_node *operands[3]; + struct source_location loc; + + set_location(&loc, &(yylsp[(2) - (2)])); + if ((yyvsp[(1) - (2)].instr)->data_type->modifiers & HLSL_MODIFIER_CONST) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "modifying a const expression"); + return 1; + } + operands[0] = (yyvsp[(1) - (2)].instr); + operands[1] = operands[2] = NULL; + (yyval.instr) = &new_expr(HLSL_IR_BINOP_POSTDEC, operands, &loc)->node; + /* Post increment/decrement expressions are considered const */ + (yyval.instr)->data_type = clone_hlsl_type((yyval.instr)->data_type); + (yyval.instr)->data_type->modifiers |= HLSL_MODIFIER_CONST; + } + break; + + case 115: + +/* Line 1806 of yacc.c */ +#line 1878 "hlsl.y" + { + struct source_location loc; + + set_location(&loc, &(yylsp[(2) - (3)])); + if ((yyvsp[(1) - (3)].instr)->data_type->type == HLSL_CLASS_STRUCT) + { + struct hlsl_type *type = (yyvsp[(1) - (3)].instr)->data_type; + struct hlsl_struct_field *field; + + (yyval.instr) = NULL; + LIST_FOR_EACH_ENTRY(field, type->e.elements, struct hlsl_struct_field, entry) + { + if (!strcmp((yyvsp[(3) - (3)].name), field->name)) + { + struct hlsl_ir_deref *deref = new_record_deref((yyvsp[(1) - (3)].instr), field); + + if (!deref) + { + ERR("Out of memory\n"); + return -1; + } + deref->node.loc = loc; + (yyval.instr) = &deref->node; + break; + } + } + if (!(yyval.instr)) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "invalid subscript %s", debugstr_a((yyvsp[(3) - (3)].name))); + return 1; + } + } + else if ((yyvsp[(1) - (3)].instr)->data_type->type <= HLSL_CLASS_LAST_NUMERIC) + { + struct hlsl_ir_swizzle *swizzle; + + swizzle = get_swizzle((yyvsp[(1) - (3)].instr), (yyvsp[(3) - (3)].name), &loc); + if (!swizzle) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "invalid swizzle %s", debugstr_a((yyvsp[(3) - (3)].name))); + return 1; + } + (yyval.instr) = &swizzle->node; + } + else + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "invalid subscript %s", debugstr_a((yyvsp[(3) - (3)].name))); + return 1; + } + } + break; + + case 116: + +/* Line 1806 of yacc.c */ +#line 1932 "hlsl.y" + { + /* This may be an array dereference or a vector/matrix + * subcomponent access. + * We store it as an array dereference in any case. */ + struct hlsl_ir_deref *deref = d3dcompiler_alloc(sizeof(*deref)); + struct hlsl_type *expr_type = (yyvsp[(1) - (4)].instr)->data_type; + struct source_location loc; + + TRACE("Array dereference from type %s\n", debug_hlsl_type(expr_type)); + if (!deref) + { + ERR("Out of memory\n"); + return -1; + } + deref->node.type = HLSL_IR_DEREF; + set_location(&loc, &(yylsp[(2) - (4)])); + deref->node.loc = loc; + if (expr_type->type == HLSL_CLASS_ARRAY) + { + deref->node.data_type = expr_type->e.array.type; + } + else if (expr_type->type == HLSL_CLASS_MATRIX) + { + deref->node.data_type = new_hlsl_type(NULL, HLSL_CLASS_VECTOR, expr_type->base_type, expr_type->dimx, 1); + } + else if (expr_type->type == HLSL_CLASS_VECTOR) + { + deref->node.data_type = new_hlsl_type(NULL, HLSL_CLASS_SCALAR, expr_type->base_type, 1, 1); + } + else + { + if (expr_type->type == HLSL_CLASS_SCALAR) + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "array-indexed expression is scalar"); + else + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "expression is not array-indexable"); + d3dcompiler_free(deref); + free_instr((yyvsp[(1) - (4)].instr)); + free_instr((yyvsp[(3) - (4)].instr)); + return 1; + } + if ((yyvsp[(3) - (4)].instr)->data_type->type != HLSL_CLASS_SCALAR) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "array index is not scalar"); + d3dcompiler_free(deref); + free_instr((yyvsp[(1) - (4)].instr)); + free_instr((yyvsp[(3) - (4)].instr)); + return 1; + } + deref->type = HLSL_IR_DEREF_ARRAY; + deref->v.array.array = (yyvsp[(1) - (4)].instr); + deref->v.array.index = (yyvsp[(3) - (4)].instr); + + (yyval.instr) = &deref->node; + } + break; + + case 117: + +/* Line 1806 of yacc.c */ +#line 1992 "hlsl.y" + { + struct hlsl_ir_constructor *constructor; + + TRACE("%s constructor.\n", debug_hlsl_type((yyvsp[(2) - (5)].type))); + if ((yyvsp[(1) - (5)].modifiers)) + { + hlsl_message("Line %u: unexpected modifier in a constructor.\n", + hlsl_ctx.line_no); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + return -1; + } + if ((yyvsp[(2) - (5)].type)->type > HLSL_CLASS_LAST_NUMERIC) + { + hlsl_message("Line %u: constructors are allowed only for numeric data types.\n", + hlsl_ctx.line_no); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + return -1; + } + if ((yyvsp[(2) - (5)].type)->dimx * (yyvsp[(2) - (5)].type)->dimy != components_count_expr_list((yyvsp[(4) - (5)].list))) + { + hlsl_message("Line %u: wrong number of components in constructor.\n", + hlsl_ctx.line_no); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + return -1; + } + + constructor = d3dcompiler_alloc(sizeof(*constructor)); + constructor->node.type = HLSL_IR_CONSTRUCTOR; + set_location(&constructor->node.loc, &(yylsp[(3) - (5)])); + constructor->node.data_type = (yyvsp[(2) - (5)].type); + constructor->arguments = (yyvsp[(4) - (5)].list); + + (yyval.instr) = &constructor->node; + } + break; + + case 118: + +/* Line 1806 of yacc.c */ +#line 2028 "hlsl.y" + { + (yyval.instr) = (yyvsp[(1) - (1)].instr); + } + break; + + case 119: + +/* Line 1806 of yacc.c */ +#line 2032 "hlsl.y" + { + struct hlsl_ir_node *operands[3]; + struct source_location loc; + + set_location(&loc, &(yylsp[(1) - (2)])); + if ((yyvsp[(2) - (2)].instr)->data_type->modifiers & HLSL_MODIFIER_CONST) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "modifying a const expression"); + return 1; + } + operands[0] = (yyvsp[(2) - (2)].instr); + operands[1] = operands[2] = NULL; + (yyval.instr) = &new_expr(HLSL_IR_BINOP_PREINC, operands, &loc)->node; + } + break; + + case 120: + +/* Line 1806 of yacc.c */ +#line 2048 "hlsl.y" + { + struct hlsl_ir_node *operands[3]; + struct source_location loc; + + set_location(&loc, &(yylsp[(1) - (2)])); + if ((yyvsp[(2) - (2)].instr)->data_type->modifiers & HLSL_MODIFIER_CONST) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "modifying a const expression"); + return 1; + } + operands[0] = (yyvsp[(2) - (2)].instr); + operands[1] = operands[2] = NULL; + (yyval.instr) = &new_expr(HLSL_IR_BINOP_PREDEC, operands, &loc)->node; + } + break; + + case 121: + +/* Line 1806 of yacc.c */ +#line 2064 "hlsl.y" + { + enum hlsl_ir_expr_op ops[] = {0, HLSL_IR_UNOP_NEG, + HLSL_IR_UNOP_LOGIC_NOT, HLSL_IR_UNOP_BIT_NOT}; + struct hlsl_ir_node *operands[3]; + struct source_location loc; + + if ((yyvsp[(1) - (2)].unary_op) == UNARY_OP_PLUS) + { + (yyval.instr) = (yyvsp[(2) - (2)].instr); + } + else + { + operands[0] = (yyvsp[(2) - (2)].instr); + operands[1] = operands[2] = NULL; + set_location(&loc, &(yylsp[(1) - (2)])); + (yyval.instr) = &new_expr(ops[(yyvsp[(1) - (2)].unary_op)], operands, &loc)->node; + } + } + break; + + case 122: + +/* Line 1806 of yacc.c */ +#line 2084 "hlsl.y" + { + struct hlsl_ir_expr *expr; + struct hlsl_type *src_type = (yyvsp[(6) - (6)].instr)->data_type; + struct hlsl_type *dst_type; + struct source_location loc; + + set_location(&loc, &(yylsp[(3) - (6)])); + if ((yyvsp[(2) - (6)].modifiers)) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "unexpected modifier in a cast"); + return 1; + } + + if ((yyvsp[(4) - (6)].intval)) + dst_type = new_array_type((yyvsp[(3) - (6)].type), (yyvsp[(4) - (6)].intval)); + else + dst_type = (yyvsp[(3) - (6)].type); + + if (!compatible_data_types(src_type, dst_type)) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "can't cast from %s to %s", + debug_hlsl_type(src_type), debug_hlsl_type(dst_type)); + return 1; + } + + expr = new_cast((yyvsp[(6) - (6)].instr), dst_type, &loc); + (yyval.instr) = expr ? &expr->node : NULL; + } + break; + + case 123: + +/* Line 1806 of yacc.c */ +#line 2116 "hlsl.y" + { + (yyval.unary_op) = UNARY_OP_PLUS; + } + break; + + case 124: + +/* Line 1806 of yacc.c */ +#line 2120 "hlsl.y" + { + (yyval.unary_op) = UNARY_OP_MINUS; + } + break; + + case 125: + +/* Line 1806 of yacc.c */ +#line 2124 "hlsl.y" + { + (yyval.unary_op) = UNARY_OP_LOGICNOT; + } + break; + + case 126: + +/* Line 1806 of yacc.c */ +#line 2128 "hlsl.y" + { + (yyval.unary_op) = UNARY_OP_BITNOT; + } + break; + + case 127: + +/* Line 1806 of yacc.c */ +#line 2133 "hlsl.y" + { + (yyval.instr) = (yyvsp[(1) - (1)].instr); + } + break; + + case 128: + +/* Line 1806 of yacc.c */ +#line 2137 "hlsl.y" + { + struct source_location loc; + + set_location(&loc, &(yylsp[(2) - (3)])); + (yyval.instr) = &hlsl_mul((yyvsp[(1) - (3)].instr), (yyvsp[(3) - (3)].instr), &loc)->node; + } + break; + + case 129: + +/* Line 1806 of yacc.c */ +#line 2144 "hlsl.y" + { + struct source_location loc; + + set_location(&loc, &(yylsp[(2) - (3)])); + (yyval.instr) = &hlsl_div((yyvsp[(1) - (3)].instr), (yyvsp[(3) - (3)].instr), &loc)->node; + } + break; + + case 130: + +/* Line 1806 of yacc.c */ +#line 2151 "hlsl.y" + { + struct source_location loc; + + set_location(&loc, &(yylsp[(2) - (3)])); + (yyval.instr) = &hlsl_mod((yyvsp[(1) - (3)].instr), (yyvsp[(3) - (3)].instr), &loc)->node; + } + break; + + case 131: + +/* Line 1806 of yacc.c */ +#line 2159 "hlsl.y" + { + (yyval.instr) = (yyvsp[(1) - (1)].instr); + } + break; + + case 132: + +/* Line 1806 of yacc.c */ +#line 2163 "hlsl.y" + { + struct source_location loc; + + set_location(&loc, &(yylsp[(2) - (3)])); + (yyval.instr) = &hlsl_add((yyvsp[(1) - (3)].instr), (yyvsp[(3) - (3)].instr), &loc)->node; + } + break; + + case 133: + +/* Line 1806 of yacc.c */ +#line 2170 "hlsl.y" + { + struct source_location loc; + + set_location(&loc, &(yylsp[(2) - (3)])); + (yyval.instr) = &hlsl_sub((yyvsp[(1) - (3)].instr), (yyvsp[(3) - (3)].instr), &loc)->node; + } + break; + + case 134: + +/* Line 1806 of yacc.c */ +#line 2178 "hlsl.y" + { + (yyval.instr) = (yyvsp[(1) - (1)].instr); + } + break; + + case 135: + +/* Line 1806 of yacc.c */ +#line 2182 "hlsl.y" + { + FIXME("Left shift\n"); + } + break; + + case 136: + +/* Line 1806 of yacc.c */ +#line 2186 "hlsl.y" + { + FIXME("Right shift\n"); + } + break; + + case 137: + +/* Line 1806 of yacc.c */ +#line 2191 "hlsl.y" + { + (yyval.instr) = (yyvsp[(1) - (1)].instr); + } + break; + + case 138: + +/* Line 1806 of yacc.c */ +#line 2195 "hlsl.y" + { + struct source_location loc; + + set_location(&loc, &(yylsp[(2) - (3)])); + (yyval.instr) = &hlsl_lt((yyvsp[(1) - (3)].instr), (yyvsp[(3) - (3)].instr), &loc)->node; + } + break; + + case 139: + +/* Line 1806 of yacc.c */ +#line 2202 "hlsl.y" + { + struct source_location loc; + + set_location(&loc, &(yylsp[(2) - (3)])); + (yyval.instr) = &hlsl_gt((yyvsp[(1) - (3)].instr), (yyvsp[(3) - (3)].instr), &loc)->node; + } + break; + + case 140: + +/* Line 1806 of yacc.c */ +#line 2209 "hlsl.y" + { + struct source_location loc; + + set_location(&loc, &(yylsp[(2) - (3)])); + (yyval.instr) = &hlsl_le((yyvsp[(1) - (3)].instr), (yyvsp[(3) - (3)].instr), &loc)->node; + } + break; + + case 141: + +/* Line 1806 of yacc.c */ +#line 2216 "hlsl.y" + { + struct source_location loc; + + set_location(&loc, &(yylsp[(2) - (3)])); + (yyval.instr) = &hlsl_ge((yyvsp[(1) - (3)].instr), (yyvsp[(3) - (3)].instr), &loc)->node; + } + break; + + case 142: + +/* Line 1806 of yacc.c */ +#line 2224 "hlsl.y" + { + (yyval.instr) = (yyvsp[(1) - (1)].instr); + } + break; + + case 143: + +/* Line 1806 of yacc.c */ +#line 2228 "hlsl.y" + { + struct source_location loc; + + set_location(&loc, &(yylsp[(2) - (3)])); + (yyval.instr) = &hlsl_eq((yyvsp[(1) - (3)].instr), (yyvsp[(3) - (3)].instr), &loc)->node; + } + break; + + case 144: + +/* Line 1806 of yacc.c */ +#line 2235 "hlsl.y" + { + struct source_location loc; + + set_location(&loc, &(yylsp[(2) - (3)])); + (yyval.instr) = &hlsl_ne((yyvsp[(1) - (3)].instr), (yyvsp[(3) - (3)].instr), &loc)->node; + } + break; + + case 145: + +/* Line 1806 of yacc.c */ +#line 2243 "hlsl.y" + { + (yyval.instr) = (yyvsp[(1) - (1)].instr); + } + break; + + case 146: + +/* Line 1806 of yacc.c */ +#line 2247 "hlsl.y" + { + FIXME("bitwise AND\n"); + } + break; + + case 147: + +/* Line 1806 of yacc.c */ +#line 2252 "hlsl.y" + { + (yyval.instr) = (yyvsp[(1) - (1)].instr); + } + break; + + case 148: + +/* Line 1806 of yacc.c */ +#line 2256 "hlsl.y" + { + FIXME("bitwise XOR\n"); + } + break; + + case 149: + +/* Line 1806 of yacc.c */ +#line 2261 "hlsl.y" + { + (yyval.instr) = (yyvsp[(1) - (1)].instr); + } + break; + + case 150: + +/* Line 1806 of yacc.c */ +#line 2265 "hlsl.y" + { + FIXME("bitwise OR\n"); + } + break; + + case 151: + +/* Line 1806 of yacc.c */ +#line 2270 "hlsl.y" + { + (yyval.instr) = (yyvsp[(1) - (1)].instr); + } + break; + + case 152: + +/* Line 1806 of yacc.c */ +#line 2274 "hlsl.y" + { + FIXME("logic AND\n"); + } + break; + + case 153: + +/* Line 1806 of yacc.c */ +#line 2279 "hlsl.y" + { + (yyval.instr) = (yyvsp[(1) - (1)].instr); + } + break; + + case 154: + +/* Line 1806 of yacc.c */ +#line 2283 "hlsl.y" + { + FIXME("logic OR\n"); + } + break; + + case 155: + +/* Line 1806 of yacc.c */ +#line 2288 "hlsl.y" + { + (yyval.instr) = (yyvsp[(1) - (1)].instr); + } + break; + + case 156: + +/* Line 1806 of yacc.c */ +#line 2292 "hlsl.y" + { + FIXME("ternary operator\n"); + } + break; + + case 157: + +/* Line 1806 of yacc.c */ +#line 2297 "hlsl.y" + { + (yyval.instr) = (yyvsp[(1) - (1)].instr); + } + break; + + case 158: + +/* Line 1806 of yacc.c */ +#line 2301 "hlsl.y" + { + struct source_location loc; + + set_location(&loc, &(yylsp[(2) - (3)])); + if ((yyvsp[(1) - (3)].instr)->data_type->modifiers & HLSL_MODIFIER_CONST) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "l-value is const"); + return 1; + } + (yyval.instr) = make_assignment((yyvsp[(1) - (3)].instr), (yyvsp[(2) - (3)].assign_op), BWRITERSP_WRITEMASK_ALL, (yyvsp[(3) - (3)].instr)); + if (!(yyval.instr)) + return 1; + (yyval.instr)->loc = loc; + } + break; + + case 159: + +/* Line 1806 of yacc.c */ +#line 2318 "hlsl.y" + { + (yyval.assign_op) = ASSIGN_OP_ASSIGN; + } + break; + + case 160: + +/* Line 1806 of yacc.c */ +#line 2322 "hlsl.y" + { + (yyval.assign_op) = ASSIGN_OP_ADD; + } + break; + + case 161: + +/* Line 1806 of yacc.c */ +#line 2326 "hlsl.y" + { + (yyval.assign_op) = ASSIGN_OP_SUB; + } + break; + + case 162: + +/* Line 1806 of yacc.c */ +#line 2330 "hlsl.y" + { + (yyval.assign_op) = ASSIGN_OP_MUL; + } + break; + + case 163: + +/* Line 1806 of yacc.c */ +#line 2334 "hlsl.y" + { + (yyval.assign_op) = ASSIGN_OP_DIV; + } + break; + + case 164: + +/* Line 1806 of yacc.c */ +#line 2338 "hlsl.y" + { + (yyval.assign_op) = ASSIGN_OP_MOD; + } + break; + + case 165: + +/* Line 1806 of yacc.c */ +#line 2342 "hlsl.y" + { + (yyval.assign_op) = ASSIGN_OP_LSHIFT; + } + break; + + case 166: + +/* Line 1806 of yacc.c */ +#line 2346 "hlsl.y" + { + (yyval.assign_op) = ASSIGN_OP_RSHIFT; + } + break; + + case 167: + +/* Line 1806 of yacc.c */ +#line 2350 "hlsl.y" + { + (yyval.assign_op) = ASSIGN_OP_AND; + } + break; + + case 168: + +/* Line 1806 of yacc.c */ +#line 2354 "hlsl.y" + { + (yyval.assign_op) = ASSIGN_OP_OR; + } + break; + + case 169: + +/* Line 1806 of yacc.c */ +#line 2358 "hlsl.y" + { + (yyval.assign_op) = ASSIGN_OP_XOR; + } + break; + + case 170: + +/* Line 1806 of yacc.c */ +#line 2363 "hlsl.y" + { + (yyval.instr) = (yyvsp[(1) - (1)].instr); + } + break; + + case 171: + +/* Line 1806 of yacc.c */ +#line 2367 "hlsl.y" + { + FIXME("Comma expression\n"); + } + break; + + + +/* Line 1806 of yacc.c */ +#line 4835 "hlsl.tab.c" + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + *++yylsp = yyloc; + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; + } +# undef YYSYNTAX_ERROR +#endif + } + + yyerror_range[1] = yylloc; + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + yyerror_range[1] = yylsp[1-yylen]; + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + yyerror_range[1] = *yylsp; + yydestruct ("Error: popping", + yystos[yystate], yyvsp, yylsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + *++yyvsp = yylval; + + yyerror_range[2] = yylloc; + /* Using YYLLOC is tempting, but would change the location of + the lookahead. YYLOC is available though. */ + YYLLOC_DEFAULT (yyloc, yyerror_range, 2); + *++yylsp = yyloc; + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#if !defined(yyoverflow) || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, &yylloc); + } + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp, yylsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + + +/* Line 2067 of yacc.c */ +#line 2371 "hlsl.y" + + +static void set_location(struct source_location *loc, const struct YYLTYPE *l) +{ + loc->file = hlsl_ctx.source_file; + loc->line = l->first_line; + loc->col = l->first_column; +} + +static DWORD add_modifier(DWORD modifiers, DWORD mod, const struct YYLTYPE *loc) +{ + if (modifiers & mod) + { + hlsl_report_message(hlsl_ctx.source_file, loc->first_line, loc->first_column, HLSL_LEVEL_ERROR, + "modifier '%s' already specified", debug_modifiers(mod)); + return modifiers; + } + if (mod & (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR) + && modifiers & (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR)) + { + hlsl_report_message(hlsl_ctx.source_file, loc->first_line, loc->first_column, HLSL_LEVEL_ERROR, + "more than one matrix majority keyword"); + return modifiers; + } + return modifiers | mod; +} + +static void dump_function_decl(struct wine_rb_entry *entry, void *context) +{ + struct hlsl_ir_function_decl *func = WINE_RB_ENTRY_VALUE(entry, struct hlsl_ir_function_decl, entry); + if (func->body) + debug_dump_ir_function_decl(func); +} + +static void dump_function(struct wine_rb_entry *entry, void *context) +{ + struct hlsl_ir_function *func = WINE_RB_ENTRY_VALUE(entry, struct hlsl_ir_function, entry); + wine_rb_for_each_entry(&func->overloads, dump_function_decl, NULL); +} + +struct bwriter_shader *parse_hlsl(enum shader_type type, DWORD major, DWORD minor, + const char *entrypoint, char **messages) +{ + struct hlsl_scope *scope, *next_scope; + struct hlsl_type *hlsl_type, *next_type; + struct hlsl_ir_var *var, *next_var; + unsigned int i; + + hlsl_ctx.status = PARSE_SUCCESS; + hlsl_ctx.messages.size = hlsl_ctx.messages.capacity = 0; + hlsl_ctx.line_no = hlsl_ctx.column = 1; + hlsl_ctx.source_file = d3dcompiler_strdup(""); + hlsl_ctx.source_files = d3dcompiler_alloc(sizeof(*hlsl_ctx.source_files)); + if (hlsl_ctx.source_files) + hlsl_ctx.source_files[0] = hlsl_ctx.source_file; + hlsl_ctx.source_files_count = 1; + hlsl_ctx.cur_scope = NULL; + hlsl_ctx.matrix_majority = HLSL_COLUMN_MAJOR; + list_init(&hlsl_ctx.scopes); + list_init(&hlsl_ctx.types); + init_functions_tree(&hlsl_ctx.functions); + + push_scope(&hlsl_ctx); + hlsl_ctx.globals = hlsl_ctx.cur_scope; + declare_predefined_types(hlsl_ctx.globals); + + hlsl_parse(); + + if (TRACE_ON(hlsl_parser)) + { + TRACE("IR dump.\n"); + wine_rb_for_each_entry(&hlsl_ctx.functions, dump_function, NULL); + } + + TRACE("Compilation status = %d\n", hlsl_ctx.status); + if (messages) + { + if (hlsl_ctx.messages.size) + *messages = hlsl_ctx.messages.string; + else + *messages = NULL; + } + else + { + if (hlsl_ctx.messages.capacity) + d3dcompiler_free(hlsl_ctx.messages.string); + } + + for (i = 0; i < hlsl_ctx.source_files_count; ++i) + d3dcompiler_free((void *)hlsl_ctx.source_files[i]); + d3dcompiler_free(hlsl_ctx.source_files); + + TRACE("Freeing functions IR.\n"); + wine_rb_destroy(&hlsl_ctx.functions, free_function_rb, NULL); + + TRACE("Freeing variables.\n"); + LIST_FOR_EACH_ENTRY_SAFE(scope, next_scope, &hlsl_ctx.scopes, struct hlsl_scope, entry) + { + LIST_FOR_EACH_ENTRY_SAFE(var, next_var, &scope->vars, struct hlsl_ir_var, scope_entry) + { + free_declaration(var); + } + wine_rb_destroy(&scope->types, NULL, NULL); + d3dcompiler_free(scope); + } + + TRACE("Freeing types.\n"); + LIST_FOR_EACH_ENTRY_SAFE(hlsl_type, next_type, &hlsl_ctx.types, struct hlsl_type, entry) + { + free_hlsl_type(hlsl_type); + } + + return NULL; +} + diff --git a/dll/directx/wine/d3dcompiler_43/hlsl.tab.h b/dll/directx/wine/d3dcompiler_43/hlsl.tab.h new file mode 100644 index 00000000000..22dddd841af --- /dev/null +++ b/dll/directx/wine/d3dcompiler_43/hlsl.tab.h @@ -0,0 +1,196 @@ +/* A Bison parser, made by GNU Bison 2.5. */ + +/* Bison interface for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + KW_BLENDSTATE = 258, + KW_BREAK = 259, + KW_BUFFER = 260, + KW_CBUFFER = 261, + KW_COLUMN_MAJOR = 262, + KW_COMPILE = 263, + KW_CONST = 264, + KW_CONTINUE = 265, + KW_DEPTHSTENCILSTATE = 266, + KW_DEPTHSTENCILVIEW = 267, + KW_DISCARD = 268, + KW_DO = 269, + KW_DOUBLE = 270, + KW_ELSE = 271, + KW_EXTERN = 272, + KW_FALSE = 273, + KW_FOR = 274, + KW_GEOMETRYSHADER = 275, + KW_GROUPSHARED = 276, + KW_IF = 277, + KW_IN = 278, + KW_INLINE = 279, + KW_INOUT = 280, + KW_MATRIX = 281, + KW_NAMESPACE = 282, + KW_NOINTERPOLATION = 283, + KW_OUT = 284, + KW_PASS = 285, + KW_PIXELSHADER = 286, + KW_PRECISE = 287, + KW_RASTERIZERSTATE = 288, + KW_RENDERTARGETVIEW = 289, + KW_RETURN = 290, + KW_REGISTER = 291, + KW_ROW_MAJOR = 292, + KW_SAMPLER = 293, + KW_SAMPLER1D = 294, + KW_SAMPLER2D = 295, + KW_SAMPLER3D = 296, + KW_SAMPLERCUBE = 297, + KW_SAMPLER_STATE = 298, + KW_SAMPLERCOMPARISONSTATE = 299, + KW_SHARED = 300, + KW_STATEBLOCK = 301, + KW_STATEBLOCK_STATE = 302, + KW_STATIC = 303, + KW_STRING = 304, + KW_STRUCT = 305, + KW_SWITCH = 306, + KW_TBUFFER = 307, + KW_TECHNIQUE = 308, + KW_TECHNIQUE10 = 309, + KW_TEXTURE = 310, + KW_TEXTURE1D = 311, + KW_TEXTURE1DARRAY = 312, + KW_TEXTURE2D = 313, + KW_TEXTURE2DARRAY = 314, + KW_TEXTURE2DMS = 315, + KW_TEXTURE2DMSARRAY = 316, + KW_TEXTURE3D = 317, + KW_TEXTURE3DARRAY = 318, + KW_TEXTURECUBE = 319, + KW_TRUE = 320, + KW_TYPEDEF = 321, + KW_UNIFORM = 322, + KW_VECTOR = 323, + KW_VERTEXSHADER = 324, + KW_VOID = 325, + KW_VOLATILE = 326, + KW_WHILE = 327, + OP_INC = 328, + OP_DEC = 329, + OP_AND = 330, + OP_OR = 331, + OP_EQ = 332, + OP_LEFTSHIFT = 333, + OP_LEFTSHIFTASSIGN = 334, + OP_RIGHTSHIFT = 335, + OP_RIGHTSHIFTASSIGN = 336, + OP_ELLIPSIS = 337, + OP_LE = 338, + OP_GE = 339, + OP_NE = 340, + OP_ADDASSIGN = 341, + OP_SUBASSIGN = 342, + OP_MULASSIGN = 343, + OP_DIVASSIGN = 344, + OP_MODASSIGN = 345, + OP_ANDASSIGN = 346, + OP_ORASSIGN = 347, + OP_XORASSIGN = 348, + OP_UNKNOWN1 = 349, + OP_UNKNOWN2 = 350, + OP_UNKNOWN3 = 351, + OP_UNKNOWN4 = 352, + PRE_LINE = 353, + VAR_IDENTIFIER = 354, + TYPE_IDENTIFIER = 355, + NEW_IDENTIFIER = 356, + STRING = 357, + C_FLOAT = 358, + C_INTEGER = 359 + }; +#endif + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ + +/* Line 2068 of yacc.c */ +#line 841 "hlsl.y" + + struct hlsl_type *type; + INT intval; + FLOAT floatval; + BOOL boolval; + char *name; + DWORD modifiers; + struct hlsl_ir_var *var; + struct hlsl_ir_node *instr; + struct list *list; + struct parse_function function; + struct parse_parameter parameter; + struct parse_variable_def *variable_def; + struct parse_if_body if_body; + enum parse_unary_op unary_op; + enum parse_assign_op assign_op; + + + +/* Line 2068 of yacc.c */ +#line 174 "hlsl.tab.h" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + +extern YYSTYPE hlsl_lval; + +#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED +typedef struct YYLTYPE +{ + int first_line; + int first_column; + int last_line; + int last_column; +} YYLTYPE; +# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ +# define YYLTYPE_IS_DECLARED 1 +# define YYLTYPE_IS_TRIVIAL 1 +#endif + +extern YYLTYPE hlsl_lloc; + diff --git a/dll/directx/wine/d3dcompiler_43/hlsl.y b/dll/directx/wine/d3dcompiler_43/hlsl.y new file mode 100644 index 00000000000..777fb4e2871 --- /dev/null +++ b/dll/directx/wine/d3dcompiler_43/hlsl.y @@ -0,0 +1,2484 @@ +/* + * HLSL parser + * + * Copyright 2008 Stefan Dösinger + * Copyright 2012 Matteo Bruni for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +%{ +#include "config.h" +#include "wine/debug.h" + +#include + +#include "d3dcompiler_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(hlsl_parser); + +int hlsl_lex(void); + +struct hlsl_parse_ctx hlsl_ctx; + +struct YYLTYPE; +static void set_location(struct source_location *loc, const struct YYLTYPE *l); + +void hlsl_message(const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + compilation_message(&hlsl_ctx.messages, fmt, args); + va_end(args); +} + +static const char *hlsl_get_error_level_name(enum hlsl_error_level level) +{ + const char *names[] = + { + "error", + "warning", + "note", + }; + return names[level]; +} + +void hlsl_report_message(const char *filename, DWORD line, DWORD column, + enum hlsl_error_level level, const char *fmt, ...) +{ + va_list args; + char *string = NULL; + int rc, size = 0; + + while (1) + { + va_start(args, fmt); + rc = vsnprintf(string, size, fmt, args); + va_end(args); + + if (rc >= 0 && rc < size) + break; + + if (rc >= size) + size = rc + 1; + else + size = size ? size * 2 : 32; + + if (!string) + string = d3dcompiler_alloc(size); + else + string = d3dcompiler_realloc(string, size); + if (!string) + { + ERR("Error reallocating memory for a string.\n"); + return; + } + } + + hlsl_message("%s:%u:%u: %s: %s\n", filename, line, column, hlsl_get_error_level_name(level), string); + d3dcompiler_free(string); + + if (level == HLSL_LEVEL_ERROR) + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + else if (level == HLSL_LEVEL_WARNING) + set_parse_status(&hlsl_ctx.status, PARSE_WARN); +} + +static void hlsl_error(const char *s) +{ + hlsl_report_message(hlsl_ctx.source_file, hlsl_ctx.line_no, hlsl_ctx.column, HLSL_LEVEL_ERROR, "%s", s); +} + +static void debug_dump_decl(struct hlsl_type *type, DWORD modifiers, const char *declname, unsigned int line_no) +{ + TRACE("Line %u: ", line_no); + if (modifiers) + TRACE("%s ", debug_modifiers(modifiers)); + TRACE("%s %s;\n", debug_hlsl_type(type), declname); +} + +static void check_invalid_matrix_modifiers(DWORD modifiers, struct source_location *loc) +{ + if (modifiers & (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR)) + { + hlsl_report_message(loc->file, loc->line, loc->col, HLSL_LEVEL_ERROR, + "'row_major' or 'column_major' modifiers are only allowed for matrices"); + } +} + +static BOOL declare_variable(struct hlsl_ir_var *decl, BOOL local) +{ + BOOL ret; + + TRACE("Declaring variable %s.\n", decl->name); + if (decl->node.data_type->type == HLSL_CLASS_MATRIX) + { + if (!(decl->modifiers & (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR))) + { + decl->modifiers |= hlsl_ctx.matrix_majority == HLSL_ROW_MAJOR + ? HLSL_MODIFIER_ROW_MAJOR : HLSL_MODIFIER_COLUMN_MAJOR; + } + } + else + check_invalid_matrix_modifiers(decl->modifiers, &decl->node.loc); + + if (local) + { + DWORD invalid = decl->modifiers & (HLSL_STORAGE_EXTERN | HLSL_STORAGE_SHARED + | HLSL_STORAGE_GROUPSHARED | HLSL_STORAGE_UNIFORM); + if (invalid) + { + hlsl_report_message(decl->node.loc.file, decl->node.loc.line, decl->node.loc.col, HLSL_LEVEL_ERROR, + "modifier '%s' invalid for local variables", debug_modifiers(invalid)); + } + if (decl->semantic) + { + hlsl_report_message(decl->node.loc.file, decl->node.loc.line, decl->node.loc.col, HLSL_LEVEL_ERROR, + "semantics are not allowed on local variables"); + return FALSE; + } + } + else + { + if (find_function(decl->name)) + { + hlsl_report_message(decl->node.loc.file, decl->node.loc.line, decl->node.loc.col, HLSL_LEVEL_ERROR, + "redefinition of '%s'", decl->name); + return FALSE; + } + } + ret = add_declaration(hlsl_ctx.cur_scope, decl, local); + if (!ret) + { + struct hlsl_ir_var *old = get_variable(hlsl_ctx.cur_scope, decl->name); + + hlsl_report_message(decl->node.loc.file, decl->node.loc.line, decl->node.loc.col, HLSL_LEVEL_ERROR, + "\"%s\" already declared", decl->name); + hlsl_report_message(old->node.loc.file, old->node.loc.line, old->node.loc.col, HLSL_LEVEL_NOTE, + "\"%s\" was previously declared here", old->name); + return FALSE; + } + return TRUE; +} + +static DWORD add_modifier(DWORD modifiers, DWORD mod, const struct YYLTYPE *loc); + +static BOOL check_type_modifiers(DWORD modifiers, struct source_location *loc) +{ + if (modifiers & ~HLSL_TYPE_MODIFIERS_MASK) + { + hlsl_report_message(loc->file, loc->line, loc->col, HLSL_LEVEL_ERROR, + "modifier not allowed on typedefs"); + return FALSE; + } + return TRUE; +} + +static BOOL add_type_to_scope(struct hlsl_scope *scope, struct hlsl_type *def) +{ + if (get_type(scope, def->name, FALSE)) + return FALSE; + + wine_rb_put(&scope->types, def->name, &def->scope_entry); + return TRUE; +} + +static void declare_predefined_types(struct hlsl_scope *scope) +{ + struct hlsl_type *type; + unsigned int x, y, bt; + static const char *names[] = + { + "float", + "half", + "double", + "int", + "uint", + "bool", + }; + char name[10]; + + for (bt = 0; bt <= HLSL_TYPE_LAST_SCALAR; ++bt) + { + for (y = 1; y <= 4; ++y) + { + for (x = 1; x <= 4; ++x) + { + sprintf(name, "%s%ux%u", names[bt], x, y); + type = new_hlsl_type(d3dcompiler_strdup(name), HLSL_CLASS_MATRIX, bt, x, y); + add_type_to_scope(scope, type); + + if (y == 1) + { + sprintf(name, "%s%u", names[bt], x); + type = new_hlsl_type(d3dcompiler_strdup(name), HLSL_CLASS_VECTOR, bt, x, y); + add_type_to_scope(scope, type); + + if (x == 1) + { + sprintf(name, "%s", names[bt]); + type = new_hlsl_type(d3dcompiler_strdup(name), HLSL_CLASS_SCALAR, bt, x, y); + add_type_to_scope(scope, type); + } + } + } + } + } + + /* DX8 effects predefined types */ + type = new_hlsl_type(d3dcompiler_strdup("DWORD"), HLSL_CLASS_SCALAR, HLSL_TYPE_INT, 1, 1); + add_type_to_scope(scope, type); + type = new_hlsl_type(d3dcompiler_strdup("FLOAT"), HLSL_CLASS_SCALAR, HLSL_TYPE_FLOAT, 1, 1); + add_type_to_scope(scope, type); + type = new_hlsl_type(d3dcompiler_strdup("VECTOR"), HLSL_CLASS_VECTOR, HLSL_TYPE_FLOAT, 4, 1); + add_type_to_scope(scope, type); + type = new_hlsl_type(d3dcompiler_strdup("MATRIX"), HLSL_CLASS_MATRIX, HLSL_TYPE_FLOAT, 4, 4); + add_type_to_scope(scope, type); + type = new_hlsl_type(d3dcompiler_strdup("STRING"), HLSL_CLASS_OBJECT, HLSL_TYPE_STRING, 1, 1); + add_type_to_scope(scope, type); + type = new_hlsl_type(d3dcompiler_strdup("TEXTURE"), HLSL_CLASS_OBJECT, HLSL_TYPE_TEXTURE, 1, 1); + add_type_to_scope(scope, type); + type = new_hlsl_type(d3dcompiler_strdup("PIXELSHADER"), HLSL_CLASS_OBJECT, HLSL_TYPE_PIXELSHADER, 1, 1); + add_type_to_scope(scope, type); + type = new_hlsl_type(d3dcompiler_strdup("VERTEXSHADER"), HLSL_CLASS_OBJECT, HLSL_TYPE_VERTEXSHADER, 1, 1); + add_type_to_scope(scope, type); +} + +static struct hlsl_ir_if *loop_condition(struct list *cond_list) +{ + struct hlsl_ir_if *out_cond; + struct hlsl_ir_expr *not_cond; + struct hlsl_ir_node *cond, *operands[3]; + struct hlsl_ir_jump *jump; + unsigned int count = list_count(cond_list); + + if (!count) + return NULL; + if (count != 1) + ERR("Got multiple expressions in a for condition.\n"); + + cond = LIST_ENTRY(list_head(cond_list), struct hlsl_ir_node, entry); + out_cond = d3dcompiler_alloc(sizeof(*out_cond)); + if (!out_cond) + { + ERR("Out of memory.\n"); + return NULL; + } + out_cond->node.type = HLSL_IR_IF; + operands[0] = cond; + operands[1] = operands[2] = NULL; + not_cond = new_expr(HLSL_IR_UNOP_LOGIC_NOT, operands, &cond->loc); + if (!not_cond) + { + ERR("Out of memory.\n"); + d3dcompiler_free(out_cond); + return NULL; + } + out_cond->condition = ¬_cond->node; + jump = d3dcompiler_alloc(sizeof(*jump)); + if (!jump) + { + ERR("Out of memory.\n"); + d3dcompiler_free(out_cond); + d3dcompiler_free(not_cond); + return NULL; + } + jump->node.type = HLSL_IR_JUMP; + jump->type = HLSL_IR_JUMP_BREAK; + out_cond->then_instrs = d3dcompiler_alloc(sizeof(*out_cond->then_instrs)); + if (!out_cond->then_instrs) + { + ERR("Out of memory.\n"); + d3dcompiler_free(out_cond); + d3dcompiler_free(not_cond); + d3dcompiler_free(jump); + return NULL; + } + list_init(out_cond->then_instrs); + list_add_head(out_cond->then_instrs, &jump->node.entry); + + return out_cond; +} + +enum loop_type +{ + LOOP_FOR, + LOOP_WHILE, + LOOP_DO_WHILE +}; + +static struct list *create_loop(enum loop_type type, struct list *init, struct list *cond, + struct hlsl_ir_node *iter, struct list *body, struct source_location *loc) +{ + struct list *list = NULL; + struct hlsl_ir_loop *loop = NULL; + struct hlsl_ir_if *cond_jump = NULL; + + list = d3dcompiler_alloc(sizeof(*list)); + if (!list) + goto oom; + list_init(list); + + if (init) + list_move_head(list, init); + + loop = d3dcompiler_alloc(sizeof(*loop)); + if (!loop) + goto oom; + loop->node.type = HLSL_IR_LOOP; + loop->node.loc = *loc; + list_add_tail(list, &loop->node.entry); + loop->body = d3dcompiler_alloc(sizeof(*loop->body)); + if (!loop->body) + goto oom; + list_init(loop->body); + + cond_jump = loop_condition(cond); + if (!cond_jump) + goto oom; + + if (type != LOOP_DO_WHILE) + list_add_tail(loop->body, &cond_jump->node.entry); + + list_move_tail(loop->body, body); + + if (iter) + list_add_tail(loop->body, &iter->entry); + + if (type == LOOP_DO_WHILE) + list_add_tail(loop->body, &cond_jump->node.entry); + + d3dcompiler_free(init); + d3dcompiler_free(cond); + d3dcompiler_free(body); + return list; + +oom: + ERR("Out of memory.\n"); + if (loop) + d3dcompiler_free(loop->body); + d3dcompiler_free(loop); + d3dcompiler_free(cond_jump); + d3dcompiler_free(list); + free_instr_list(init); + free_instr_list(cond); + free_instr(iter); + free_instr_list(body); + return NULL; +} + +static unsigned int initializer_size(struct list *initializer) +{ + unsigned int count = 0; + struct hlsl_ir_node *node; + + LIST_FOR_EACH_ENTRY(node, initializer, struct hlsl_ir_node, entry) + { + count += components_count_type(node->data_type); + } + TRACE("Initializer size = %u\n", count); + return count; +} + +static unsigned int components_count_expr_list(struct list *list) +{ + struct hlsl_ir_node *node; + unsigned int count = 0; + + LIST_FOR_EACH_ENTRY(node, list, struct hlsl_ir_node, entry) + { + count += components_count_type(node->data_type); + } + return count; +} + +static struct hlsl_ir_swizzle *new_swizzle(DWORD s, unsigned int components, + struct hlsl_ir_node *val, struct source_location *loc) +{ + struct hlsl_ir_swizzle *swizzle = d3dcompiler_alloc(sizeof(*swizzle)); + + if (!swizzle) + return NULL; + swizzle->node.type = HLSL_IR_SWIZZLE; + swizzle->node.loc = *loc; + swizzle->node.data_type = new_hlsl_type(NULL, HLSL_CLASS_VECTOR, val->data_type->base_type, components, 1); + swizzle->val = val; + swizzle->swizzle = s; + return swizzle; +} + +static struct hlsl_ir_swizzle *get_swizzle(struct hlsl_ir_node *value, const char *swizzle, + struct source_location *loc) +{ + unsigned int len = strlen(swizzle), component = 0; + unsigned int i, set, swiz = 0; + BOOL valid; + + if (value->data_type->type == HLSL_CLASS_MATRIX) + { + /* Matrix swizzle */ + BOOL m_swizzle; + unsigned int inc, x, y; + + if (len < 3 || swizzle[0] != '_') + return NULL; + m_swizzle = swizzle[1] == 'm'; + inc = m_swizzle ? 4 : 3; + + if (len % inc || len > inc * 4) + return NULL; + + for (i = 0; i < len; i += inc) + { + if (swizzle[i] != '_') + return NULL; + if (m_swizzle) + { + if (swizzle[i + 1] != 'm') + return NULL; + x = swizzle[i + 2] - '0'; + y = swizzle[i + 3] - '0'; + } + else + { + x = swizzle[i + 1] - '1'; + y = swizzle[i + 2] - '1'; + } + + if (x >= value->data_type->dimx || y >= value->data_type->dimy) + return NULL; + swiz |= (y << 4 | x) << component * 8; + component++; + } + return new_swizzle(swiz, component, value, loc); + } + + /* Vector swizzle */ + if (len > 4) + return NULL; + + for (set = 0; set < 2; ++set) + { + valid = TRUE; + component = 0; + for (i = 0; i < len; ++i) + { + char c[2][4] = {{'x', 'y', 'z', 'w'}, {'r', 'g', 'b', 'a'}}; + unsigned int s = 0; + + for (s = 0; s < 4; ++s) + { + if (swizzle[i] == c[set][s]) + break; + } + if (s == 4) + { + valid = FALSE; + break; + } + + if (s >= value->data_type->dimx) + return NULL; + swiz |= s << component * 2; + component++; + } + if (valid) + return new_swizzle(swiz, component, value, loc); + } + + return NULL; +} + +static void struct_var_initializer(struct list *list, struct hlsl_ir_var *var, struct list *initializer) +{ + struct hlsl_type *type = var->node.data_type; + struct hlsl_ir_node *node; + struct hlsl_struct_field *field; + struct list *cur_node; + struct hlsl_ir_node *assignment; + struct hlsl_ir_deref *deref; + + if (initializer_size(initializer) != components_count_type(type)) + { + hlsl_report_message(var->node.loc.file, var->node.loc.line, var->node.loc.col, HLSL_LEVEL_ERROR, + "structure initializer mismatch"); + free_instr_list(initializer); + return; + } + cur_node = list_head(initializer); + assert(cur_node); + node = LIST_ENTRY(cur_node, struct hlsl_ir_node, entry); + LIST_FOR_EACH_ENTRY(field, type->e.elements, struct hlsl_struct_field, entry) + { + if (!cur_node) + { + d3dcompiler_free(initializer); + return; + } + if (components_count_type(field->type) == components_count_type(node->data_type)) + { + deref = new_record_deref(&var->node, field); + if (!deref) + { + ERR("Out of memory.\n"); + break; + } + deref->node.loc = node->loc; + assignment = make_assignment(&deref->node, ASSIGN_OP_ASSIGN, BWRITERSP_WRITEMASK_ALL, node); + list_add_tail(list, &assignment->entry); + } + else + FIXME("Initializing with \"mismatched\" fields is not supported yet.\n"); + cur_node = list_next(initializer, cur_node); + node = LIST_ENTRY(cur_node, struct hlsl_ir_node, entry); + } + + /* Free initializer elements in excess. */ + while (cur_node) + { + struct list *next = list_next(initializer, cur_node); + free_instr(node); + cur_node = next; + node = LIST_ENTRY(cur_node, struct hlsl_ir_node, entry); + } + d3dcompiler_free(initializer); +} + +static struct list *declare_vars(struct hlsl_type *basic_type, DWORD modifiers, struct list *var_list) +{ + struct hlsl_type *type; + struct parse_variable_def *v, *v_next; + struct hlsl_ir_var *var; + struct hlsl_ir_node *assignment; + BOOL ret, local = TRUE; + struct list *statements_list = d3dcompiler_alloc(sizeof(*statements_list)); + + if (!statements_list) + { + ERR("Out of memory.\n"); + LIST_FOR_EACH_ENTRY_SAFE(v, v_next, var_list, struct parse_variable_def, entry) + d3dcompiler_free(v); + d3dcompiler_free(var_list); + return NULL; + } + list_init(statements_list); + + if (!var_list) + return statements_list; + + LIST_FOR_EACH_ENTRY_SAFE(v, v_next, var_list, struct parse_variable_def, entry) + { + var = d3dcompiler_alloc(sizeof(*var)); + if (!var) + { + ERR("Out of memory.\n"); + d3dcompiler_free(v); + continue; + } + var->node.type = HLSL_IR_VAR; + if (v->array_size) + type = new_array_type(basic_type, v->array_size); + else + type = basic_type; + var->node.data_type = type; + var->node.loc = v->loc; + var->name = v->name; + var->modifiers = modifiers; + var->semantic = v->semantic; + debug_dump_decl(type, modifiers, v->name, v->loc.line); + + if (hlsl_ctx.cur_scope == hlsl_ctx.globals) + { + var->modifiers |= HLSL_STORAGE_UNIFORM; + local = FALSE; + } + + if (var->modifiers & HLSL_MODIFIER_CONST && !(var->modifiers & HLSL_STORAGE_UNIFORM) && !v->initializer) + { + hlsl_report_message(v->loc.file, v->loc.line, v->loc.col, + HLSL_LEVEL_ERROR, "const variable without initializer"); + free_declaration(var); + d3dcompiler_free(v); + continue; + } + + ret = declare_variable(var, local); + if (!ret) + { + free_declaration(var); + d3dcompiler_free(v); + continue; + } + TRACE("Declared variable %s.\n", var->name); + + if (v->initializer) + { + unsigned int size = initializer_size(v->initializer); + struct hlsl_ir_node *node; + + TRACE("Variable with initializer.\n"); + if (type->type <= HLSL_CLASS_LAST_NUMERIC + && type->dimx * type->dimy != size && size != 1) + { + if (size < type->dimx * type->dimy) + { + hlsl_report_message(v->loc.file, v->loc.line, v->loc.col, HLSL_LEVEL_ERROR, + "'%s' initializer does not match", v->name); + free_instr_list(v->initializer); + d3dcompiler_free(v); + continue; + } + } + if ((type->type == HLSL_CLASS_STRUCT || type->type == HLSL_CLASS_ARRAY) + && components_count_type(type) != size) + { + hlsl_report_message(v->loc.file, v->loc.line, v->loc.col, HLSL_LEVEL_ERROR, + "'%s' initializer does not match", v->name); + free_instr_list(v->initializer); + d3dcompiler_free(v); + continue; + } + + if (type->type == HLSL_CLASS_STRUCT) + { + struct_var_initializer(statements_list, var, v->initializer); + d3dcompiler_free(v); + continue; + } + if (type->type > HLSL_CLASS_LAST_NUMERIC) + { + FIXME("Initializers for non scalar/struct variables not supported yet.\n"); + free_instr_list(v->initializer); + d3dcompiler_free(v); + continue; + } + if (v->array_size > 0) + { + FIXME("Initializing arrays is not supported yet.\n"); + free_instr_list(v->initializer); + d3dcompiler_free(v); + continue; + } + if (list_count(v->initializer) > 1) + { + FIXME("Complex initializers are not supported yet.\n"); + free_instr_list(v->initializer); + d3dcompiler_free(v); + continue; + } + node = LIST_ENTRY(list_head(v->initializer), struct hlsl_ir_node, entry); + assignment = make_assignment(&var->node, ASSIGN_OP_ASSIGN, + BWRITERSP_WRITEMASK_ALL, node); + list_add_tail(statements_list, &assignment->entry); + d3dcompiler_free(v->initializer); + } + d3dcompiler_free(v); + } + d3dcompiler_free(var_list); + return statements_list; +} + +static BOOL add_struct_field(struct list *fields, struct hlsl_struct_field *field) +{ + struct hlsl_struct_field *f; + + LIST_FOR_EACH_ENTRY(f, fields, struct hlsl_struct_field, entry) + { + if (!strcmp(f->name, field->name)) + return FALSE; + } + list_add_tail(fields, &field->entry); + return TRUE; +} + +static struct list *gen_struct_fields(struct hlsl_type *type, DWORD modifiers, struct list *fields) +{ + struct parse_variable_def *v, *v_next; + struct hlsl_struct_field *field; + struct list *list; + + list = d3dcompiler_alloc(sizeof(*list)); + if (!list) + { + ERR("Out of memory.\n"); + return NULL; + } + list_init(list); + LIST_FOR_EACH_ENTRY_SAFE(v, v_next, fields, struct parse_variable_def, entry) + { + debug_dump_decl(type, 0, v->name, v->loc.line); + field = d3dcompiler_alloc(sizeof(*field)); + if (!field) + { + ERR("Out of memory.\n"); + d3dcompiler_free(v); + return list; + } + field->type = type; + field->name = v->name; + field->modifiers = modifiers; + field->semantic = v->semantic; + if (v->initializer) + { + hlsl_report_message(v->loc.file, v->loc.line, v->loc.col, HLSL_LEVEL_ERROR, + "struct field with an initializer.\n"); + free_instr_list(v->initializer); + } + list_add_tail(list, &field->entry); + d3dcompiler_free(v); + } + d3dcompiler_free(fields); + return list; +} + +static struct hlsl_type *new_struct_type(const char *name, DWORD modifiers, struct list *fields) +{ + struct hlsl_type *type = d3dcompiler_alloc(sizeof(*type)); + + if (!type) + { + ERR("Out of memory.\n"); + return NULL; + } + type->type = HLSL_CLASS_STRUCT; + type->name = name; + type->dimx = type->dimy = 1; + type->modifiers = modifiers; + type->e.elements = fields; + + list_add_tail(&hlsl_ctx.types, &type->entry); + + return type; +} + +static BOOL add_typedef(DWORD modifiers, struct hlsl_type *orig_type, struct list *list, + struct source_location *loc) +{ + BOOL ret; + struct hlsl_type *type; + struct parse_variable_def *v, *v_next; + + if (!check_type_modifiers(modifiers, loc)) + { + LIST_FOR_EACH_ENTRY_SAFE(v, v_next, list, struct parse_variable_def, entry) + d3dcompiler_free(v); + d3dcompiler_free(list); + return FALSE; + } + + LIST_FOR_EACH_ENTRY_SAFE(v, v_next, list, struct parse_variable_def, entry) + { + if (v->array_size) + type = new_array_type(orig_type, v->array_size); + else + type = clone_hlsl_type(orig_type); + if (!type) + { + ERR("Out of memory\n"); + return FALSE; + } + d3dcompiler_free((void *)type->name); + type->name = v->name; + type->modifiers |= modifiers; + + if (type->type != HLSL_CLASS_MATRIX) + check_invalid_matrix_modifiers(type->modifiers, &v->loc); + + ret = add_type_to_scope(hlsl_ctx.cur_scope, type); + if (!ret) + { + hlsl_report_message(v->loc.file, v->loc.line, v->loc.col, HLSL_LEVEL_ERROR, + "redefinition of custom type '%s'", v->name); + } + d3dcompiler_free(v); + } + d3dcompiler_free(list); + return TRUE; +} + +static const struct hlsl_ir_function_decl *get_overloaded_func(struct wine_rb_tree *funcs, char *name, + struct list *params, BOOL exact_signature) +{ + struct hlsl_ir_function *func; + struct wine_rb_entry *entry; + + entry = wine_rb_get(funcs, name); + if (entry) + { + func = WINE_RB_ENTRY_VALUE(entry, struct hlsl_ir_function, entry); + + entry = wine_rb_get(&func->overloads, params); + if (!entry) + { + if (!exact_signature) + FIXME("No exact match, search for a compatible overloaded function (if any).\n"); + return NULL; + } + return WINE_RB_ENTRY_VALUE(entry, struct hlsl_ir_function_decl, entry); + } + return NULL; +} + +%} + +%locations +%error-verbose +%expect 1 + +%union +{ + struct hlsl_type *type; + INT intval; + FLOAT floatval; + BOOL boolval; + char *name; + DWORD modifiers; + struct hlsl_ir_var *var; + struct hlsl_ir_node *instr; + struct list *list; + struct parse_function function; + struct parse_parameter parameter; + struct parse_variable_def *variable_def; + struct parse_if_body if_body; + enum parse_unary_op unary_op; + enum parse_assign_op assign_op; +} + +%token KW_BLENDSTATE +%token KW_BREAK +%token KW_BUFFER +%token KW_CBUFFER +%token KW_COLUMN_MAJOR +%token KW_COMPILE +%token KW_CONST +%token KW_CONTINUE +%token KW_DEPTHSTENCILSTATE +%token KW_DEPTHSTENCILVIEW +%token KW_DISCARD +%token KW_DO +%token KW_DOUBLE +%token KW_ELSE +%token KW_EXTERN +%token KW_FALSE +%token KW_FOR +%token KW_GEOMETRYSHADER +%token KW_GROUPSHARED +%token KW_IF +%token KW_IN +%token KW_INLINE +%token KW_INOUT +%token KW_MATRIX +%token KW_NAMESPACE +%token KW_NOINTERPOLATION +%token KW_OUT +%token KW_PASS +%token KW_PIXELSHADER +%token KW_PRECISE +%token KW_RASTERIZERSTATE +%token KW_RENDERTARGETVIEW +%token KW_RETURN +%token KW_REGISTER +%token KW_ROW_MAJOR +%token KW_SAMPLER +%token KW_SAMPLER1D +%token KW_SAMPLER2D +%token KW_SAMPLER3D +%token KW_SAMPLERCUBE +%token KW_SAMPLER_STATE +%token KW_SAMPLERCOMPARISONSTATE +%token KW_SHARED +%token KW_STATEBLOCK +%token KW_STATEBLOCK_STATE +%token KW_STATIC +%token KW_STRING +%token KW_STRUCT +%token KW_SWITCH +%token KW_TBUFFER +%token KW_TECHNIQUE +%token KW_TECHNIQUE10 +%token KW_TEXTURE +%token KW_TEXTURE1D +%token KW_TEXTURE1DARRAY +%token KW_TEXTURE2D +%token KW_TEXTURE2DARRAY +%token KW_TEXTURE2DMS +%token KW_TEXTURE2DMSARRAY +%token KW_TEXTURE3D +%token KW_TEXTURE3DARRAY +%token KW_TEXTURECUBE +%token KW_TRUE +%token KW_TYPEDEF +%token KW_UNIFORM +%token KW_VECTOR +%token KW_VERTEXSHADER +%token KW_VOID +%token KW_VOLATILE +%token KW_WHILE + +%token OP_INC +%token OP_DEC +%token OP_AND +%token OP_OR +%token OP_EQ +%token OP_LEFTSHIFT +%token OP_LEFTSHIFTASSIGN +%token OP_RIGHTSHIFT +%token OP_RIGHTSHIFTASSIGN +%token OP_ELLIPSIS +%token OP_LE +%token OP_GE +%token OP_NE +%token OP_ADDASSIGN +%token OP_SUBASSIGN +%token OP_MULASSIGN +%token OP_DIVASSIGN +%token OP_MODASSIGN +%token OP_ANDASSIGN +%token OP_ORASSIGN +%token OP_XORASSIGN +%token OP_UNKNOWN1 +%token OP_UNKNOWN2 +%token OP_UNKNOWN3 +%token OP_UNKNOWN4 + +%token PRE_LINE + +%token VAR_IDENTIFIER TYPE_IDENTIFIER NEW_IDENTIFIER +%type any_identifier var_identifier +%token STRING +%token C_FLOAT +%token C_INTEGER +%type boolean +%type base_type +%type type +%type declaration_statement +%type declaration +%type struct_declaration +%type struct_spec +%type named_struct_spec +%type unnamed_struct_spec +%type type_specs +%type type_spec +%type complex_initializer +%type initializer_expr_list +%type initializer_expr +%type var_modifiers +%type field +%type parameters +%type param_list +%type expr +%type variable +%type array +%type statement +%type statement_list +%type compound_statement +%type jump_statement +%type selection_statement +%type loop_statement +%type func_declaration +%type func_prototype +%type fields_list +%type parameter +%type semantic +%type variable_def +%type variables_def +%type variables_def_optional +%type if_body +%type primary_expr +%type postfix_expr +%type unary_expr +%type mul_expr +%type add_expr +%type shift_expr +%type relational_expr +%type equality_expr +%type bitand_expr +%type bitxor_expr +%type bitor_expr +%type logicand_expr +%type logicor_expr +%type conditional_expr +%type assignment_expr +%type expr_statement +%type unary_op +%type assign_op +%type input_mods +%type input_mod +%% + +hlsl_prog: /* empty */ + { + } + | hlsl_prog func_declaration + { + const struct hlsl_ir_function_decl *decl; + + decl = get_overloaded_func(&hlsl_ctx.functions, $2.name, $2.decl->parameters, TRUE); + if (decl && !decl->func->intrinsic) + { + if (decl->body && $2.decl->body) + { + hlsl_report_message($2.decl->node.loc.file, $2.decl->node.loc.line, + $2.decl->node.loc.col, HLSL_LEVEL_ERROR, + "redefinition of function %s", debugstr_a($2.name)); + return 1; + } + else if (!compare_hlsl_types(decl->node.data_type, $2.decl->node.data_type)) + { + hlsl_report_message($2.decl->node.loc.file, $2.decl->node.loc.line, + $2.decl->node.loc.col, HLSL_LEVEL_ERROR, + "redefining function %s with a different return type", + debugstr_a($2.name)); + hlsl_report_message(decl->node.loc.file, decl->node.loc.line, decl->node.loc.col, HLSL_LEVEL_NOTE, + "%s previously declared here", + debugstr_a($2.name)); + return 1; + } + } + + if ($2.decl->node.data_type->base_type == HLSL_TYPE_VOID && $2.decl->semantic) + { + hlsl_report_message($2.decl->node.loc.file, $2.decl->node.loc.line, + $2.decl->node.loc.col, HLSL_LEVEL_ERROR, + "void function with a semantic"); + } + + TRACE("Adding function '%s' to the function list.\n", $2.name); + add_function_decl(&hlsl_ctx.functions, $2.name, $2.decl, FALSE); + } + | hlsl_prog declaration_statement + { + TRACE("Declaration statement parsed.\n"); + } + | hlsl_prog preproc_directive + { + } + | hlsl_prog ';' + { + TRACE("Skipping stray semicolon.\n"); + } + +preproc_directive: PRE_LINE STRING + { + TRACE("Updating line information to file %s, line %u\n", debugstr_a($2), $1); + hlsl_ctx.line_no = $1; + if (strcmp($2, hlsl_ctx.source_file)) + { + const char **new_array; + + hlsl_ctx.source_file = $2; + new_array = d3dcompiler_realloc(hlsl_ctx.source_files, + sizeof(*hlsl_ctx.source_files) * hlsl_ctx.source_files_count + 1); + if (new_array) + { + hlsl_ctx.source_files = new_array; + hlsl_ctx.source_files[hlsl_ctx.source_files_count++] = $2; + } + } + } + +struct_declaration: struct_spec variables_def_optional ';' + { + struct source_location loc; + + set_location(&loc, &@3); + if (!$2) + { + if (!$1->name) + { + hlsl_report_message(loc.file, loc.line, loc.col, + HLSL_LEVEL_ERROR, "anonymous struct declaration with no variables"); + } + check_type_modifiers($1->modifiers, &loc); + } + $$ = declare_vars($1, 0, $2); + } + +struct_spec: named_struct_spec + | unnamed_struct_spec + +named_struct_spec: var_modifiers KW_STRUCT any_identifier '{' fields_list '}' + { + BOOL ret; + struct source_location loc; + + TRACE("Structure %s declaration.\n", debugstr_a($3)); + set_location(&loc, &@1); + check_invalid_matrix_modifiers($1, &loc); + $$ = new_struct_type($3, $1, $5); + + if (get_variable(hlsl_ctx.cur_scope, $3)) + { + hlsl_report_message(hlsl_ctx.source_file, @3.first_line, @3.first_column, + HLSL_LEVEL_ERROR, "redefinition of '%s'", $3); + return 1; + } + + ret = add_type_to_scope(hlsl_ctx.cur_scope, $$); + if (!ret) + { + hlsl_report_message(hlsl_ctx.source_file, @3.first_line, @3.first_column, + HLSL_LEVEL_ERROR, "redefinition of struct '%s'", $3); + return 1; + } + } + +unnamed_struct_spec: var_modifiers KW_STRUCT '{' fields_list '}' + { + struct source_location loc; + + TRACE("Anonymous structure declaration.\n"); + set_location(&loc, &@1); + check_invalid_matrix_modifiers($1, &loc); + $$ = new_struct_type(NULL, $1, $4); + } + +any_identifier: VAR_IDENTIFIER + | TYPE_IDENTIFIER + | NEW_IDENTIFIER + +fields_list: /* Empty */ + { + $$ = d3dcompiler_alloc(sizeof(*$$)); + list_init($$); + } + | fields_list field + { + BOOL ret; + struct hlsl_struct_field *field, *next; + + $$ = $1; + LIST_FOR_EACH_ENTRY_SAFE(field, next, $2, struct hlsl_struct_field, entry) + { + ret = add_struct_field($$, field); + if (ret == FALSE) + { + hlsl_report_message(hlsl_ctx.source_file, @2.first_line, @2.first_column, + HLSL_LEVEL_ERROR, "redefinition of '%s'", field->name); + d3dcompiler_free(field); + } + } + d3dcompiler_free($2); + } + +field: var_modifiers type variables_def ';' + { + $$ = gen_struct_fields($2, $1, $3); + } + | unnamed_struct_spec variables_def ';' + { + $$ = gen_struct_fields($1, 0, $2); + } + +func_declaration: func_prototype compound_statement + { + TRACE("Function %s parsed.\n", $1.name); + $$ = $1; + $$.decl->body = $2; + pop_scope(&hlsl_ctx); + } + | func_prototype ';' + { + TRACE("Function prototype for %s.\n", $1.name); + $$ = $1; + pop_scope(&hlsl_ctx); + } + +func_prototype: var_modifiers type var_identifier '(' parameters ')' semantic + { + if (get_variable(hlsl_ctx.globals, $3)) + { + hlsl_report_message(hlsl_ctx.source_file, @3.first_line, @3.first_column, + HLSL_LEVEL_ERROR, "redefinition of '%s'\n", $3); + return 1; + } + if ($2->base_type == HLSL_TYPE_VOID && $7) + { + hlsl_report_message(hlsl_ctx.source_file, @7.first_line, @7.first_column, + HLSL_LEVEL_ERROR, "void function with a semantic"); + } + + $$.decl = new_func_decl($2, $5); + if (!$$.decl) + { + ERR("Out of memory.\n"); + return -1; + } + $$.name = $3; + $$.decl->semantic = $7; + set_location(&$$.decl->node.loc, &@3); + } + +compound_statement: '{' '}' + { + $$ = d3dcompiler_alloc(sizeof(*$$)); + list_init($$); + } + | '{' scope_start statement_list '}' + { + pop_scope(&hlsl_ctx); + $$ = $3; + } + +scope_start: /* Empty */ + { + push_scope(&hlsl_ctx); + } + +var_identifier: VAR_IDENTIFIER + | NEW_IDENTIFIER + +semantic: /* Empty */ + { + $$ = NULL; + } + | ':' any_identifier + { + $$ = $2; + } + +parameters: scope_start + { + $$ = d3dcompiler_alloc(sizeof(*$$)); + list_init($$); + } + | scope_start param_list + { + $$ = $2; + } + +param_list: parameter + { + struct source_location loc; + + $$ = d3dcompiler_alloc(sizeof(*$$)); + list_init($$); + set_location(&loc, &@1); + if (!add_func_parameter($$, &$1, &loc)) + { + ERR("Error adding function parameter %s.\n", $1.name); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + return -1; + } + } + | param_list ',' parameter + { + struct source_location loc; + + $$ = $1; + set_location(&loc, &@3); + if (!add_func_parameter($$, &$3, &loc)) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "duplicate parameter %s", $3.name); + return 1; + } + } + +parameter: input_mods var_modifiers type any_identifier semantic + { + $$.modifiers = $1 ? $1 : HLSL_MODIFIER_IN; + $$.modifiers |= $2; + $$.type = $3; + $$.name = $4; + $$.semantic = $5; + } + +input_mods: /* Empty */ + { + $$ = 0; + } + | input_mods input_mod + { + if ($1 & $2) + { + hlsl_report_message(hlsl_ctx.source_file, @2.first_line, @2.first_column, + HLSL_LEVEL_ERROR, "duplicate input-output modifiers"); + return 1; + } + $$ = $1 | $2; + } + +input_mod: KW_IN + { + $$ = HLSL_MODIFIER_IN; + } + | KW_OUT + { + $$ = HLSL_MODIFIER_OUT; + } + | KW_INOUT + { + $$ = HLSL_MODIFIER_IN | HLSL_MODIFIER_OUT; + } + +type: base_type + { + $$ = $1; + } + | KW_VECTOR '<' base_type ',' C_INTEGER '>' + { + if ($3->type != HLSL_CLASS_SCALAR) + { + hlsl_message("Line %u: vectors of non-scalar types are not allowed.\n", + hlsl_ctx.line_no); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + return 1; + } + if ($5 < 1 || $5 > 4) + { + hlsl_message("Line %u: vector size must be between 1 and 4.\n", + hlsl_ctx.line_no); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + return 1; + } + + $$ = new_hlsl_type(NULL, HLSL_CLASS_VECTOR, $3->base_type, $5, 1); + } + | KW_MATRIX '<' base_type ',' C_INTEGER ',' C_INTEGER '>' + { + if ($3->type != HLSL_CLASS_SCALAR) + { + hlsl_message("Line %u: matrices of non-scalar types are not allowed.\n", + hlsl_ctx.line_no); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + return 1; + } + if ($5 < 1 || $5 > 4 || $7 < 1 || $7 > 4) + { + hlsl_message("Line %u: matrix dimensions must be between 1 and 4.\n", + hlsl_ctx.line_no); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + return 1; + } + + $$ = new_hlsl_type(NULL, HLSL_CLASS_MATRIX, $3->base_type, $5, $7); + } + +base_type: KW_VOID + { + $$ = new_hlsl_type(d3dcompiler_strdup("void"), HLSL_CLASS_OBJECT, HLSL_TYPE_VOID, 1, 1); + } + | KW_SAMPLER + { + $$ = new_hlsl_type(d3dcompiler_strdup("sampler"), HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1); + $$->sampler_dim = HLSL_SAMPLER_DIM_GENERIC; + } + | KW_SAMPLER1D + { + $$ = new_hlsl_type(d3dcompiler_strdup("sampler1D"), HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1); + $$->sampler_dim = HLSL_SAMPLER_DIM_1D; + } + | KW_SAMPLER2D + { + $$ = new_hlsl_type(d3dcompiler_strdup("sampler2D"), HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1); + $$->sampler_dim = HLSL_SAMPLER_DIM_2D; + } + | KW_SAMPLER3D + { + $$ = new_hlsl_type(d3dcompiler_strdup("sampler3D"), HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1); + $$->sampler_dim = HLSL_SAMPLER_DIM_3D; + } + | KW_SAMPLERCUBE + { + $$ = new_hlsl_type(d3dcompiler_strdup("samplerCUBE"), HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1); + $$->sampler_dim = HLSL_SAMPLER_DIM_CUBE; + } + | TYPE_IDENTIFIER + { + struct hlsl_type *type; + + TRACE("Type %s.\n", $1); + type = get_type(hlsl_ctx.cur_scope, $1, TRUE); + $$ = type; + d3dcompiler_free($1); + } + | KW_STRUCT TYPE_IDENTIFIER + { + struct hlsl_type *type; + + TRACE("Struct type %s.\n", $2); + type = get_type(hlsl_ctx.cur_scope, $2, TRUE); + if (type->type != HLSL_CLASS_STRUCT) + { + hlsl_message("Line %u: redefining %s as a structure.\n", + hlsl_ctx.line_no, $2); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + } + else + { + $$ = type; + } + d3dcompiler_free($2); + } + +declaration_statement: declaration + | struct_declaration + | typedef + { + $$ = d3dcompiler_alloc(sizeof(*$$)); + if (!$$) + { + ERR("Out of memory\n"); + return -1; + } + list_init($$); + } + +typedef: KW_TYPEDEF var_modifiers type type_specs ';' + { + struct source_location loc; + + set_location(&loc, &@1); + if (!add_typedef($2, $3, $4, &loc)) + return 1; + } + | KW_TYPEDEF struct_spec type_specs ';' + { + struct source_location loc; + + set_location(&loc, &@1); + if (!add_typedef(0, $2, $3, &loc)) + return 1; + } + +type_specs: type_spec + { + $$ = d3dcompiler_alloc(sizeof(*$$)); + list_init($$); + list_add_head($$, &$1->entry); + } + | type_specs ',' type_spec + { + $$ = $1; + list_add_tail($$, &$3->entry); + } + +type_spec: any_identifier array + { + $$ = d3dcompiler_alloc(sizeof(*$$)); + set_location(&$$->loc, &@1); + $$->name = $1; + $$->array_size = $2; + } + +declaration: var_modifiers type variables_def ';' + { + $$ = declare_vars($2, $1, $3); + } + +variables_def_optional: /* Empty */ + { + $$ = NULL; + } + | variables_def + { + $$ = $1; + } + +variables_def: variable_def + { + $$ = d3dcompiler_alloc(sizeof(*$$)); + list_init($$); + list_add_head($$, &$1->entry); + } + | variables_def ',' variable_def + { + $$ = $1; + list_add_tail($$, &$3->entry); + } + +variable_def: any_identifier array semantic + { + $$ = d3dcompiler_alloc(sizeof(*$$)); + set_location(&$$->loc, &@1); + $$->name = $1; + $$->array_size = $2; + $$->semantic = $3; + } + | any_identifier array semantic '=' complex_initializer + { + TRACE("Declaration with initializer.\n"); + $$ = d3dcompiler_alloc(sizeof(*$$)); + set_location(&$$->loc, &@1); + $$->name = $1; + $$->array_size = $2; + $$->semantic = $3; + $$->initializer = $5; + } + +array: /* Empty */ + { + $$ = 0; + } + | '[' expr ']' + { + FIXME("Array.\n"); + $$ = 0; + free_instr($2); + } + +var_modifiers: /* Empty */ + { + $$ = 0; + } + | KW_EXTERN var_modifiers + { + $$ = add_modifier($2, HLSL_STORAGE_EXTERN, &@1); + } + | KW_NOINTERPOLATION var_modifiers + { + $$ = add_modifier($2, HLSL_STORAGE_NOINTERPOLATION, &@1); + } + | KW_PRECISE var_modifiers + { + $$ = add_modifier($2, HLSL_MODIFIER_PRECISE, &@1); + } + | KW_SHARED var_modifiers + { + $$ = add_modifier($2, HLSL_STORAGE_SHARED, &@1); + } + | KW_GROUPSHARED var_modifiers + { + $$ = add_modifier($2, HLSL_STORAGE_GROUPSHARED, &@1); + } + | KW_STATIC var_modifiers + { + $$ = add_modifier($2, HLSL_STORAGE_STATIC, &@1); + } + | KW_UNIFORM var_modifiers + { + $$ = add_modifier($2, HLSL_STORAGE_UNIFORM, &@1); + } + | KW_VOLATILE var_modifiers + { + $$ = add_modifier($2, HLSL_STORAGE_VOLATILE, &@1); + } + | KW_CONST var_modifiers + { + $$ = add_modifier($2, HLSL_MODIFIER_CONST, &@1); + } + | KW_ROW_MAJOR var_modifiers + { + $$ = add_modifier($2, HLSL_MODIFIER_ROW_MAJOR, &@1); + } + | KW_COLUMN_MAJOR var_modifiers + { + $$ = add_modifier($2, HLSL_MODIFIER_COLUMN_MAJOR, &@1); + } + +complex_initializer: initializer_expr + { + $$ = d3dcompiler_alloc(sizeof(*$$)); + list_init($$); + list_add_head($$, &$1->entry); + } + | '{' initializer_expr_list '}' + { + $$ = $2; + } + | '{' initializer_expr_list ',' '}' + { + $$ = $2; + } + +initializer_expr: assignment_expr + { + $$ = $1; + } + +initializer_expr_list: initializer_expr + { + $$ = d3dcompiler_alloc(sizeof(*$$)); + list_init($$); + list_add_head($$, &$1->entry); + } + | initializer_expr_list ',' initializer_expr + { + $$ = $1; + list_add_tail($$, &$3->entry); + } + +boolean: KW_TRUE + { + $$ = TRUE; + } + | KW_FALSE + { + $$ = FALSE; + } + +statement_list: statement + { + $$ = $1; + } + | statement_list statement + { + $$ = $1; + list_move_tail($$, $2); + d3dcompiler_free($2); + } + +statement: declaration_statement + | expr_statement + | compound_statement + | jump_statement + | selection_statement + | loop_statement + + /* FIXME: add rule for return with no value */ +jump_statement: KW_RETURN expr ';' + { + struct hlsl_ir_jump *jump = d3dcompiler_alloc(sizeof(*jump)); + if (!jump) + { + ERR("Out of memory\n"); + return -1; + } + jump->node.type = HLSL_IR_JUMP; + set_location(&jump->node.loc, &@1); + jump->type = HLSL_IR_JUMP_RETURN; + jump->node.data_type = $2->data_type; + jump->return_value = $2; + + FIXME("Check for valued return on void function.\n"); + FIXME("Implicit conversion to the return type if needed, " + "error out if conversion not possible.\n"); + + $$ = d3dcompiler_alloc(sizeof(*$$)); + list_init($$); + list_add_tail($$, &jump->node.entry); + } + +selection_statement: KW_IF '(' expr ')' if_body + { + struct hlsl_ir_if *instr = d3dcompiler_alloc(sizeof(*instr)); + if (!instr) + { + ERR("Out of memory\n"); + return -1; + } + instr->node.type = HLSL_IR_IF; + set_location(&instr->node.loc, &@1); + instr->condition = $3; + instr->then_instrs = $5.then_instrs; + instr->else_instrs = $5.else_instrs; + if ($3->data_type->dimx > 1 || $3->data_type->dimy > 1) + { + hlsl_report_message(instr->node.loc.file, instr->node.loc.line, + instr->node.loc.col, HLSL_LEVEL_ERROR, + "if condition requires a scalar"); + } + $$ = d3dcompiler_alloc(sizeof(*$$)); + list_init($$); + list_add_head($$, &instr->node.entry); + } + +if_body: statement + { + $$.then_instrs = $1; + $$.else_instrs = NULL; + } + | statement KW_ELSE statement + { + $$.then_instrs = $1; + $$.else_instrs = $3; + } + +loop_statement: KW_WHILE '(' expr ')' statement + { + struct source_location loc; + struct list *cond = d3dcompiler_alloc(sizeof(*cond)); + + if (!cond) + { + ERR("Out of memory.\n"); + return -1; + } + list_init(cond); + list_add_head(cond, &$3->entry); + set_location(&loc, &@1); + $$ = create_loop(LOOP_WHILE, NULL, cond, NULL, $5, &loc); + } + | KW_DO statement KW_WHILE '(' expr ')' ';' + { + struct source_location loc; + struct list *cond = d3dcompiler_alloc(sizeof(*cond)); + + if (!cond) + { + ERR("Out of memory.\n"); + return -1; + } + list_init(cond); + list_add_head(cond, &$5->entry); + set_location(&loc, &@1); + $$ = create_loop(LOOP_DO_WHILE, NULL, cond, NULL, $2, &loc); + } + | KW_FOR '(' scope_start expr_statement expr_statement expr ')' statement + { + struct source_location loc; + + set_location(&loc, &@1); + $$ = create_loop(LOOP_FOR, $4, $5, $6, $8, &loc); + pop_scope(&hlsl_ctx); + } + | KW_FOR '(' scope_start declaration expr_statement expr ')' statement + { + struct source_location loc; + + set_location(&loc, &@1); + if (!$4) + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_WARNING, + "no expressions in for loop initializer"); + $$ = create_loop(LOOP_FOR, $4, $5, $6, $8, &loc); + pop_scope(&hlsl_ctx); + } + +expr_statement: ';' + { + $$ = d3dcompiler_alloc(sizeof(*$$)); + list_init($$); + } + | expr ';' + { + $$ = d3dcompiler_alloc(sizeof(*$$)); + list_init($$); + if ($1) + list_add_head($$, &$1->entry); + } + +primary_expr: C_FLOAT + { + struct hlsl_ir_constant *c = d3dcompiler_alloc(sizeof(*c)); + if (!c) + { + ERR("Out of memory.\n"); + return -1; + } + c->node.type = HLSL_IR_CONSTANT; + set_location(&c->node.loc, &yylloc); + c->node.data_type = new_hlsl_type(d3dcompiler_strdup("float"), HLSL_CLASS_SCALAR, HLSL_TYPE_FLOAT, 1, 1); + c->v.value.f[0] = $1; + $$ = &c->node; + } + | C_INTEGER + { + struct hlsl_ir_constant *c = d3dcompiler_alloc(sizeof(*c)); + if (!c) + { + ERR("Out of memory.\n"); + return -1; + } + c->node.type = HLSL_IR_CONSTANT; + set_location(&c->node.loc, &yylloc); + c->node.data_type = new_hlsl_type(d3dcompiler_strdup("int"), HLSL_CLASS_SCALAR, HLSL_TYPE_INT, 1, 1); + c->v.value.i[0] = $1; + $$ = &c->node; + } + | boolean + { + struct hlsl_ir_constant *c = d3dcompiler_alloc(sizeof(*c)); + if (!c) + { + ERR("Out of memory.\n"); + return -1; + } + c->node.type = HLSL_IR_CONSTANT; + set_location(&c->node.loc, &yylloc); + c->node.data_type = new_hlsl_type(d3dcompiler_strdup("bool"), HLSL_CLASS_SCALAR, HLSL_TYPE_BOOL, 1, 1); + c->v.value.b[0] = $1; + $$ = &c->node; + } + | variable + { + struct hlsl_ir_deref *deref = new_var_deref($1); + if (deref) + { + $$ = &deref->node; + set_location(&$$->loc, &@1); + } + else + $$ = NULL; + } + | '(' expr ')' + { + $$ = $2; + } + +variable: VAR_IDENTIFIER + { + struct hlsl_ir_var *var; + var = get_variable(hlsl_ctx.cur_scope, $1); + if (!var) + { + hlsl_message("Line %d: variable '%s' not declared\n", + hlsl_ctx.line_no, $1); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + return 1; + } + $$ = var; + } + +postfix_expr: primary_expr + { + $$ = $1; + } + | postfix_expr OP_INC + { + struct hlsl_ir_node *operands[3]; + struct source_location loc; + + set_location(&loc, &@2); + if ($1->data_type->modifiers & HLSL_MODIFIER_CONST) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "modifying a const expression"); + return 1; + } + operands[0] = $1; + operands[1] = operands[2] = NULL; + $$ = &new_expr(HLSL_IR_BINOP_POSTINC, operands, &loc)->node; + /* Post increment/decrement expressions are considered const */ + $$->data_type = clone_hlsl_type($$->data_type); + $$->data_type->modifiers |= HLSL_MODIFIER_CONST; + } + | postfix_expr OP_DEC + { + struct hlsl_ir_node *operands[3]; + struct source_location loc; + + set_location(&loc, &@2); + if ($1->data_type->modifiers & HLSL_MODIFIER_CONST) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "modifying a const expression"); + return 1; + } + operands[0] = $1; + operands[1] = operands[2] = NULL; + $$ = &new_expr(HLSL_IR_BINOP_POSTDEC, operands, &loc)->node; + /* Post increment/decrement expressions are considered const */ + $$->data_type = clone_hlsl_type($$->data_type); + $$->data_type->modifiers |= HLSL_MODIFIER_CONST; + } + | postfix_expr '.' any_identifier + { + struct source_location loc; + + set_location(&loc, &@2); + if ($1->data_type->type == HLSL_CLASS_STRUCT) + { + struct hlsl_type *type = $1->data_type; + struct hlsl_struct_field *field; + + $$ = NULL; + LIST_FOR_EACH_ENTRY(field, type->e.elements, struct hlsl_struct_field, entry) + { + if (!strcmp($3, field->name)) + { + struct hlsl_ir_deref *deref = new_record_deref($1, field); + + if (!deref) + { + ERR("Out of memory\n"); + return -1; + } + deref->node.loc = loc; + $$ = &deref->node; + break; + } + } + if (!$$) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "invalid subscript %s", debugstr_a($3)); + return 1; + } + } + else if ($1->data_type->type <= HLSL_CLASS_LAST_NUMERIC) + { + struct hlsl_ir_swizzle *swizzle; + + swizzle = get_swizzle($1, $3, &loc); + if (!swizzle) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "invalid swizzle %s", debugstr_a($3)); + return 1; + } + $$ = &swizzle->node; + } + else + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "invalid subscript %s", debugstr_a($3)); + return 1; + } + } + | postfix_expr '[' expr ']' + { + /* This may be an array dereference or a vector/matrix + * subcomponent access. + * We store it as an array dereference in any case. */ + struct hlsl_ir_deref *deref = d3dcompiler_alloc(sizeof(*deref)); + struct hlsl_type *expr_type = $1->data_type; + struct source_location loc; + + TRACE("Array dereference from type %s\n", debug_hlsl_type(expr_type)); + if (!deref) + { + ERR("Out of memory\n"); + return -1; + } + deref->node.type = HLSL_IR_DEREF; + set_location(&loc, &@2); + deref->node.loc = loc; + if (expr_type->type == HLSL_CLASS_ARRAY) + { + deref->node.data_type = expr_type->e.array.type; + } + else if (expr_type->type == HLSL_CLASS_MATRIX) + { + deref->node.data_type = new_hlsl_type(NULL, HLSL_CLASS_VECTOR, expr_type->base_type, expr_type->dimx, 1); + } + else if (expr_type->type == HLSL_CLASS_VECTOR) + { + deref->node.data_type = new_hlsl_type(NULL, HLSL_CLASS_SCALAR, expr_type->base_type, 1, 1); + } + else + { + if (expr_type->type == HLSL_CLASS_SCALAR) + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "array-indexed expression is scalar"); + else + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "expression is not array-indexable"); + d3dcompiler_free(deref); + free_instr($1); + free_instr($3); + return 1; + } + if ($3->data_type->type != HLSL_CLASS_SCALAR) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "array index is not scalar"); + d3dcompiler_free(deref); + free_instr($1); + free_instr($3); + return 1; + } + deref->type = HLSL_IR_DEREF_ARRAY; + deref->v.array.array = $1; + deref->v.array.index = $3; + + $$ = &deref->node; + } + /* "var_modifiers" doesn't make sense in this case, but it's needed + in the grammar to avoid shift/reduce conflicts. */ + | var_modifiers type '(' initializer_expr_list ')' + { + struct hlsl_ir_constructor *constructor; + + TRACE("%s constructor.\n", debug_hlsl_type($2)); + if ($1) + { + hlsl_message("Line %u: unexpected modifier in a constructor.\n", + hlsl_ctx.line_no); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + return -1; + } + if ($2->type > HLSL_CLASS_LAST_NUMERIC) + { + hlsl_message("Line %u: constructors are allowed only for numeric data types.\n", + hlsl_ctx.line_no); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + return -1; + } + if ($2->dimx * $2->dimy != components_count_expr_list($4)) + { + hlsl_message("Line %u: wrong number of components in constructor.\n", + hlsl_ctx.line_no); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + return -1; + } + + constructor = d3dcompiler_alloc(sizeof(*constructor)); + constructor->node.type = HLSL_IR_CONSTRUCTOR; + set_location(&constructor->node.loc, &@3); + constructor->node.data_type = $2; + constructor->arguments = $4; + + $$ = &constructor->node; + } + +unary_expr: postfix_expr + { + $$ = $1; + } + | OP_INC unary_expr + { + struct hlsl_ir_node *operands[3]; + struct source_location loc; + + set_location(&loc, &@1); + if ($2->data_type->modifiers & HLSL_MODIFIER_CONST) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "modifying a const expression"); + return 1; + } + operands[0] = $2; + operands[1] = operands[2] = NULL; + $$ = &new_expr(HLSL_IR_BINOP_PREINC, operands, &loc)->node; + } + | OP_DEC unary_expr + { + struct hlsl_ir_node *operands[3]; + struct source_location loc; + + set_location(&loc, &@1); + if ($2->data_type->modifiers & HLSL_MODIFIER_CONST) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "modifying a const expression"); + return 1; + } + operands[0] = $2; + operands[1] = operands[2] = NULL; + $$ = &new_expr(HLSL_IR_BINOP_PREDEC, operands, &loc)->node; + } + | unary_op unary_expr + { + enum hlsl_ir_expr_op ops[] = {0, HLSL_IR_UNOP_NEG, + HLSL_IR_UNOP_LOGIC_NOT, HLSL_IR_UNOP_BIT_NOT}; + struct hlsl_ir_node *operands[3]; + struct source_location loc; + + if ($1 == UNARY_OP_PLUS) + { + $$ = $2; + } + else + { + operands[0] = $2; + operands[1] = operands[2] = NULL; + set_location(&loc, &@1); + $$ = &new_expr(ops[$1], operands, &loc)->node; + } + } + /* var_modifiers just to avoid shift/reduce conflicts */ + | '(' var_modifiers type array ')' unary_expr + { + struct hlsl_ir_expr *expr; + struct hlsl_type *src_type = $6->data_type; + struct hlsl_type *dst_type; + struct source_location loc; + + set_location(&loc, &@3); + if ($2) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "unexpected modifier in a cast"); + return 1; + } + + if ($4) + dst_type = new_array_type($3, $4); + else + dst_type = $3; + + if (!compatible_data_types(src_type, dst_type)) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "can't cast from %s to %s", + debug_hlsl_type(src_type), debug_hlsl_type(dst_type)); + return 1; + } + + expr = new_cast($6, dst_type, &loc); + $$ = expr ? &expr->node : NULL; + } + +unary_op: '+' + { + $$ = UNARY_OP_PLUS; + } + | '-' + { + $$ = UNARY_OP_MINUS; + } + | '!' + { + $$ = UNARY_OP_LOGICNOT; + } + | '~' + { + $$ = UNARY_OP_BITNOT; + } + +mul_expr: unary_expr + { + $$ = $1; + } + | mul_expr '*' unary_expr + { + struct source_location loc; + + set_location(&loc, &@2); + $$ = &hlsl_mul($1, $3, &loc)->node; + } + | mul_expr '/' unary_expr + { + struct source_location loc; + + set_location(&loc, &@2); + $$ = &hlsl_div($1, $3, &loc)->node; + } + | mul_expr '%' unary_expr + { + struct source_location loc; + + set_location(&loc, &@2); + $$ = &hlsl_mod($1, $3, &loc)->node; + } + +add_expr: mul_expr + { + $$ = $1; + } + | add_expr '+' mul_expr + { + struct source_location loc; + + set_location(&loc, &@2); + $$ = &hlsl_add($1, $3, &loc)->node; + } + | add_expr '-' mul_expr + { + struct source_location loc; + + set_location(&loc, &@2); + $$ = &hlsl_sub($1, $3, &loc)->node; + } + +shift_expr: add_expr + { + $$ = $1; + } + | shift_expr OP_LEFTSHIFT add_expr + { + FIXME("Left shift\n"); + } + | shift_expr OP_RIGHTSHIFT add_expr + { + FIXME("Right shift\n"); + } + +relational_expr: shift_expr + { + $$ = $1; + } + | relational_expr '<' shift_expr + { + struct source_location loc; + + set_location(&loc, &@2); + $$ = &hlsl_lt($1, $3, &loc)->node; + } + | relational_expr '>' shift_expr + { + struct source_location loc; + + set_location(&loc, &@2); + $$ = &hlsl_gt($1, $3, &loc)->node; + } + | relational_expr OP_LE shift_expr + { + struct source_location loc; + + set_location(&loc, &@2); + $$ = &hlsl_le($1, $3, &loc)->node; + } + | relational_expr OP_GE shift_expr + { + struct source_location loc; + + set_location(&loc, &@2); + $$ = &hlsl_ge($1, $3, &loc)->node; + } + +equality_expr: relational_expr + { + $$ = $1; + } + | equality_expr OP_EQ relational_expr + { + struct source_location loc; + + set_location(&loc, &@2); + $$ = &hlsl_eq($1, $3, &loc)->node; + } + | equality_expr OP_NE relational_expr + { + struct source_location loc; + + set_location(&loc, &@2); + $$ = &hlsl_ne($1, $3, &loc)->node; + } + +bitand_expr: equality_expr + { + $$ = $1; + } + | bitand_expr '&' equality_expr + { + FIXME("bitwise AND\n"); + } + +bitxor_expr: bitand_expr + { + $$ = $1; + } + | bitxor_expr '^' bitand_expr + { + FIXME("bitwise XOR\n"); + } + +bitor_expr: bitxor_expr + { + $$ = $1; + } + | bitor_expr '|' bitxor_expr + { + FIXME("bitwise OR\n"); + } + +logicand_expr: bitor_expr + { + $$ = $1; + } + | logicand_expr OP_AND bitor_expr + { + FIXME("logic AND\n"); + } + +logicor_expr: logicand_expr + { + $$ = $1; + } + | logicor_expr OP_OR logicand_expr + { + FIXME("logic OR\n"); + } + +conditional_expr: logicor_expr + { + $$ = $1; + } + | logicor_expr '?' expr ':' assignment_expr + { + FIXME("ternary operator\n"); + } + +assignment_expr: conditional_expr + { + $$ = $1; + } + | unary_expr assign_op assignment_expr + { + struct source_location loc; + + set_location(&loc, &@2); + if ($1->data_type->modifiers & HLSL_MODIFIER_CONST) + { + hlsl_report_message(loc.file, loc.line, loc.col, HLSL_LEVEL_ERROR, + "l-value is const"); + return 1; + } + $$ = make_assignment($1, $2, BWRITERSP_WRITEMASK_ALL, $3); + if (!$$) + return 1; + $$->loc = loc; + } + +assign_op: '=' + { + $$ = ASSIGN_OP_ASSIGN; + } + | OP_ADDASSIGN + { + $$ = ASSIGN_OP_ADD; + } + | OP_SUBASSIGN + { + $$ = ASSIGN_OP_SUB; + } + | OP_MULASSIGN + { + $$ = ASSIGN_OP_MUL; + } + | OP_DIVASSIGN + { + $$ = ASSIGN_OP_DIV; + } + | OP_MODASSIGN + { + $$ = ASSIGN_OP_MOD; + } + | OP_LEFTSHIFTASSIGN + { + $$ = ASSIGN_OP_LSHIFT; + } + | OP_RIGHTSHIFTASSIGN + { + $$ = ASSIGN_OP_RSHIFT; + } + | OP_ANDASSIGN + { + $$ = ASSIGN_OP_AND; + } + | OP_ORASSIGN + { + $$ = ASSIGN_OP_OR; + } + | OP_XORASSIGN + { + $$ = ASSIGN_OP_XOR; + } + +expr: assignment_expr + { + $$ = $1; + } + | expr ',' assignment_expr + { + FIXME("Comma expression\n"); + } + +%% + +static void set_location(struct source_location *loc, const struct YYLTYPE *l) +{ + loc->file = hlsl_ctx.source_file; + loc->line = l->first_line; + loc->col = l->first_column; +} + +static DWORD add_modifier(DWORD modifiers, DWORD mod, const struct YYLTYPE *loc) +{ + if (modifiers & mod) + { + hlsl_report_message(hlsl_ctx.source_file, loc->first_line, loc->first_column, HLSL_LEVEL_ERROR, + "modifier '%s' already specified", debug_modifiers(mod)); + return modifiers; + } + if (mod & (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR) + && modifiers & (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR)) + { + hlsl_report_message(hlsl_ctx.source_file, loc->first_line, loc->first_column, HLSL_LEVEL_ERROR, + "more than one matrix majority keyword"); + return modifiers; + } + return modifiers | mod; +} + +static void dump_function_decl(struct wine_rb_entry *entry, void *context) +{ + struct hlsl_ir_function_decl *func = WINE_RB_ENTRY_VALUE(entry, struct hlsl_ir_function_decl, entry); + if (func->body) + debug_dump_ir_function_decl(func); +} + +static void dump_function(struct wine_rb_entry *entry, void *context) +{ + struct hlsl_ir_function *func = WINE_RB_ENTRY_VALUE(entry, struct hlsl_ir_function, entry); + wine_rb_for_each_entry(&func->overloads, dump_function_decl, NULL); +} + +struct bwriter_shader *parse_hlsl(enum shader_type type, DWORD major, DWORD minor, + const char *entrypoint, char **messages) +{ + struct hlsl_scope *scope, *next_scope; + struct hlsl_type *hlsl_type, *next_type; + struct hlsl_ir_var *var, *next_var; + unsigned int i; + + hlsl_ctx.status = PARSE_SUCCESS; + hlsl_ctx.messages.size = hlsl_ctx.messages.capacity = 0; + hlsl_ctx.line_no = hlsl_ctx.column = 1; + hlsl_ctx.source_file = d3dcompiler_strdup(""); + hlsl_ctx.source_files = d3dcompiler_alloc(sizeof(*hlsl_ctx.source_files)); + if (hlsl_ctx.source_files) + hlsl_ctx.source_files[0] = hlsl_ctx.source_file; + hlsl_ctx.source_files_count = 1; + hlsl_ctx.cur_scope = NULL; + hlsl_ctx.matrix_majority = HLSL_COLUMN_MAJOR; + list_init(&hlsl_ctx.scopes); + list_init(&hlsl_ctx.types); + init_functions_tree(&hlsl_ctx.functions); + + push_scope(&hlsl_ctx); + hlsl_ctx.globals = hlsl_ctx.cur_scope; + declare_predefined_types(hlsl_ctx.globals); + + hlsl_parse(); + + if (TRACE_ON(hlsl_parser)) + { + TRACE("IR dump.\n"); + wine_rb_for_each_entry(&hlsl_ctx.functions, dump_function, NULL); + } + + TRACE("Compilation status = %d\n", hlsl_ctx.status); + if (messages) + { + if (hlsl_ctx.messages.size) + *messages = hlsl_ctx.messages.string; + else + *messages = NULL; + } + else + { + if (hlsl_ctx.messages.capacity) + d3dcompiler_free(hlsl_ctx.messages.string); + } + + for (i = 0; i < hlsl_ctx.source_files_count; ++i) + d3dcompiler_free((void *)hlsl_ctx.source_files[i]); + d3dcompiler_free(hlsl_ctx.source_files); + + TRACE("Freeing functions IR.\n"); + wine_rb_destroy(&hlsl_ctx.functions, free_function_rb, NULL); + + TRACE("Freeing variables.\n"); + LIST_FOR_EACH_ENTRY_SAFE(scope, next_scope, &hlsl_ctx.scopes, struct hlsl_scope, entry) + { + LIST_FOR_EACH_ENTRY_SAFE(var, next_var, &scope->vars, struct hlsl_ir_var, scope_entry) + { + free_declaration(var); + } + wine_rb_destroy(&scope->types, NULL, NULL); + d3dcompiler_free(scope); + } + + TRACE("Freeing types.\n"); + LIST_FOR_EACH_ENTRY_SAFE(hlsl_type, next_type, &hlsl_ctx.types, struct hlsl_type, entry) + { + free_hlsl_type(hlsl_type); + } + + return NULL; +} diff --git a/dll/directx/wine/d3dcompiler_43/hlsl.yy.c b/dll/directx/wine/d3dcompiler_43/hlsl.yy.c new file mode 100644 index 00000000000..a3e98d5543c --- /dev/null +++ b/dll/directx/wine/d3dcompiler_43/hlsl.yy.c @@ -0,0 +1,2954 @@ +#line 2 "hlsl.yy.c" + +#line 4 "hlsl.yy.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define yy_create_buffer hlsl__create_buffer +#define yy_delete_buffer hlsl__delete_buffer +#define yy_flex_debug hlsl__flex_debug +#define yy_init_buffer hlsl__init_buffer +#define yy_flush_buffer hlsl__flush_buffer +#define yy_load_buffer_state hlsl__load_buffer_state +#define yy_switch_to_buffer hlsl__switch_to_buffer +#define yyin hlsl_in +#define yyleng hlsl_leng +#define yylex hlsl_lex +#define yylineno hlsl_lineno +#define yyout hlsl_out +#define yyrestart hlsl_restart +#define yytext hlsl_text +#define yywrap hlsl_wrap +#define yyalloc hlsl_alloc +#define yyrealloc hlsl_realloc +#define yyfree hlsl_free + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 35 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE hlsl_restart(hlsl_in ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else +#define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +extern int hlsl_leng; + +extern FILE *hlsl_in, *hlsl_out; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up hlsl_text. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up hlsl_text again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via hlsl_restart()), so that the user can continue scanning by + * just pointing hlsl_in at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when hlsl_text is formed. */ +static char yy_hold_char; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int hlsl_leng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow hlsl_wrap()'s to do buffer switches + * instead of setting up a fresh hlsl_in. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void hlsl_restart (FILE *input_file ); +void hlsl__switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE hlsl__create_buffer (FILE *file,int size ); +void hlsl__delete_buffer (YY_BUFFER_STATE b ); +void hlsl__flush_buffer (YY_BUFFER_STATE b ); +void hlsl_push_buffer_state (YY_BUFFER_STATE new_buffer ); +void hlsl_pop_buffer_state (void ); + +static void hlsl_ensure_buffer_stack (void ); +static void hlsl__load_buffer_state (void ); +static void hlsl__init_buffer (YY_BUFFER_STATE b,FILE *file ); + +#define YY_FLUSH_BUFFER hlsl__flush_buffer(YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE hlsl__scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE hlsl__scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE hlsl__scan_bytes (yyconst char *bytes,int len ); + +void *hlsl_alloc (yy_size_t ); +void *hlsl_realloc (void *,yy_size_t ); +void hlsl_free (void * ); + +#define yy_new_buffer hlsl__create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + hlsl_ensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + hlsl__create_buffer(hlsl_in,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + hlsl_ensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + hlsl__create_buffer(hlsl_in,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define hlsl_wrap(n) 1 +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +FILE *hlsl_in = (FILE *) 0, *hlsl_out = (FILE *) 0; + +typedef int yy_state_type; + +extern int hlsl_lineno; + +int hlsl_lineno = 1; + +extern char *hlsl_text; +#define yytext_ptr hlsl_text + +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up hlsl_text. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + hlsl_leng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +#define YY_NUM_RULES 125 +#define YY_END_OF_BUFFER 126 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[717] = + { 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 126, 124, 108, 109, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 106, 106, 124, 124, 124, 124, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 124, 110, + 93, 123, 122, 123, 116, 123, 125, 118, 119, 125, + 125, 115, 114, 115, 115, 121, 120, 121, 108, 109, + 85, 94, 95, 90, 75, 91, 88, 73, 86, 74, + 87, 97, 0, 101, 107, 89, 102, 105, 106, 0, + + 103, 0, 96, 78, 83, 77, 84, 80, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 15, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 23, 24, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 92, + 76, 122, 116, 0, 118, 119, 0, 117, 114, 0, + 120, 82, 0, 101, 107, 0, 102, 0, 0, 104, + 79, 81, 100, 100, 100, 100, 100, 100, 100, 100, + + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 20, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 2, 100, 100, 30, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 3, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 0, 0, 0, 101, 0, 102, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 1, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + + 17, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 31, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 65, 100, 100, 100, + 100, 100, 100, 100, 70, 100, 100, 0, 0, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 6, + 100, 100, 100, 10, 100, 100, 100, 100, 100, 100, + 100, 100, 19, 100, 100, 100, 26, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + + 100, 100, 100, 100, 100, 100, 4, 100, 100, 100, + 100, 72, 0, 0, 100, 7, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 16, 100, 100, 18, 100, 25, 27, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 36, 100, 100, + 45, 100, 48, 49, 50, 51, 100, 100, 100, 100, + 100, 100, 100, 100, 68, 100, 100, 0, 0, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 8, 100, + 9, 100, 100, 14, 100, 100, 100, 100, 100, 100, + 33, 100, 100, 100, 100, 38, 100, 100, 52, 100, + + 100, 55, 66, 100, 67, 100, 100, 111, 0, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 11, 100, 100, 100, 100, 100, 37, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 71, 0, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 28, 100, 100, 99, 39, 40, 41, 100, 100, 100, + 100, 53, 56, 58, 62, 100, 0, 5, 100, 100, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, 100, 46, 100, 100, 100, + + 0, 100, 100, 32, 100, 100, 100, 100, 100, 60, + 100, 100, 100, 100, 22, 100, 100, 42, 100, 100, + 54, 64, 0, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 69, 98, 100, 100, 100, 100, 0, 0, + 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, + 100, 100, 43, 100, 0, 0, 0, 100, 100, 21, + 100, 100, 100, 57, 59, 100, 63, 100, 100, 100, + 0, 0, 100, 100, 34, 100, 100, 100, 29, 100, + 100, 0, 0, 100, 13, 35, 100, 61, 47, 0, + 0, 12, 100, 0, 0, 100, 0, 0, 100, 0, + + 0, 100, 0, 0, 100, 0, 0, 44, 0, 0, + 112, 0, 0, 0, 113, 0 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 5, 6, 7, 1, 8, 9, 1, 10, + 11, 12, 13, 1, 14, 15, 16, 17, 18, 19, + 20, 21, 21, 21, 21, 22, 22, 23, 1, 24, + 25, 26, 1, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 36, 36, 36, 37, 36, 36, 38, + 36, 39, 40, 41, 42, 43, 36, 36, 36, 36, + 1, 1, 1, 1, 44, 1, 45, 46, 47, 48, + + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, + 69, 70, 1, 71, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[72] = + { 0, + 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, + 3, 3, 1, 1, 1, 1, 1, 3, 3, 3, + 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 1 + } ; + +static yyconst flex_int16_t yy_base[725] = + { 0, + 0, 65, 74, 80, 83, 101, 70, 72, 76, 78, + 938, 939, 935, 939, 933, 910, 81, 909, 97, 908, + 96, 98, 96, 94, 126, 118, 909, 101, 906, 102, + 0, 64, 881, 880, 875, 104, 882, 877, 876, 859, + 861, 110, 101, 109, 112, 120, 114, 863, 86, 136, + 103, 128, 93, 135, 152, 126, 147, 869, 158, 184, + 895, 939, 939, 916, 198, 856, 939, 915, 939, 913, + 909, 939, 939, 911, 868, 939, 939, 909, 909, 939, + 939, 939, 939, 939, 939, 939, 939, 939, 939, 939, + 939, 939, 895, 213, 0, 939, 268, 841, 0, 236, + + 939, 0, 939, 883, 939, 939, 939, 882, 0, 857, + 855, 844, 844, 834, 838, 842, 842, 830, 835, 832, + 846, 144, 829, 848, 847, 166, 153, 828, 825, 831, + 825, 822, 176, 830, 823, 831, 819, 823, 0, 154, + 823, 816, 815, 821, 810, 823, 826, 810, 810, 188, + 826, 174, 804, 813, 167, 191, 198, 816, 803, 212, + 211, 201, 807, 214, 813, 818, 802, 215, 810, 939, + 939, 939, 274, 817, 859, 939, 854, 939, 939, 812, + 939, 939, 291, 939, 0, 308, 939, 314, 323, 0, + 939, 939, 800, 807, 792, 798, 805, 789, 804, 791, + + 786, 785, 789, 802, 797, 798, 794, 781, 779, 776, + 780, 188, 794, 789, 790, 790, 790, 785, 776, 776, + 782, 767, 0, 780, 769, 762, 773, 760, 773, 761, + 777, 772, 0, 762, 757, 0, 755, 770, 750, 751, + 758, 760, 754, 746, 766, 749, 746, 745, 748, 756, + 740, 249, 739, 752, 749, 740, 735, 735, 738, 747, + 0, 746, 222, 741, 735, 728, 727, 742, 744, 732, + 736, 731, 329, 378, 342, 433, 737, 735, 731, 733, + 725, 731, 730, 722, 712, 727, 0, 720, 722, 723, + 709, 714, 717, 705, 715, 702, 702, 720, 708, 706, + + 0, 709, 699, 711, 701, 698, 699, 692, 702, 708, + 690, 688, 706, 0, 697, 704, 699, 694, 683, 681, + 682, 686, 686, 692, 676, 690, 679, 225, 679, 689, + 688, 684, 675, 676, 666, 663, 0, 249, 670, 670, + 676, 675, 666, 659, 0, 659, 673, 664, 676, 679, + 656, 677, 652, 675, 652, 651, 663, 649, 642, 0, + 660, 650, 651, 662, 647, 648, 654, 640, 652, 647, + 652, 640, 0, 649, 633, 646, 0, 626, 637, 632, + 642, 626, 626, 624, 640, 639, 621, 635, 625, 637, + 632, 632, 631, 628, 631, 629, 624, 610, 621, 623, + + 618, 625, 607, 619, 622, 604, 0, 607, 602, 618, + 609, 0, 616, 603, 595, 0, 594, 595, 604, 602, + 613, 591, 603, 611, 588, 605, 599, 600, 581, 581, + 596, 0, 596, 589, 0, 589, 0, 0, 591, 594, + 576, 578, 587, 586, 570, 584, 570, 0, 577, 568, + 0, 573, 584, 0, 0, 0, 565, 565, 561, 575, + 573, 565, 564, 571, 0, 563, 562, 615, 571, 570, + 565, 544, 567, 541, 565, 579, 334, 556, 0, 550, + 0, 561, 556, 0, 560, 539, 557, 554, 540, 537, + 0, 549, 535, 536, 536, 347, 535, 546, 0, 527, + + 542, 350, 0, 541, 0, 541, 539, 585, 522, 521, + 526, 543, 534, 532, 518, 520, 547, 546, 545, 530, + 529, 510, 0, 525, 509, 521, 510, 520, 0, 505, + 504, 534, 533, 532, 520, 498, 513, 514, 509, 526, + 525, 524, 512, 0, 491, 503, 504, 498, 500, 486, + 496, 489, 517, 278, 516, 495, 488, 477, 495, 490, + 0, 482, 488, 0, 0, 0, 0, 507, 471, 479, + 470, 514, 0, 0, 0, 502, 475, 0, 450, 457, + 439, 460, 450, 438, 435, 434, 455, 432, 444, 433, + 428, 442, 444, 424, 455, 441, 440, 418, 464, 448, + + 411, 422, 429, 0, 412, 411, 429, 411, 410, 443, + 408, 407, 405, 401, 0, 400, 419, 0, 398, 398, + 0, 0, 273, 236, 411, 414, 415, 395, 411, 403, + 385, 401, 0, 0, 392, 397, 394, 378, 314, 355, + 377, 387, 377, 374, 384, 383, 366, 365, 371, 363, + 370, 382, 0, 381, 369, 366, 365, 378, 373, 0, + 372, 371, 356, 0, 0, 373, 0, 357, 351, 348, + 354, 342, 344, 340, 0, 339, 346, 335, 0, 339, + 352, 328, 346, 340, 0, 0, 329, 0, 0, 329, + 327, 0, 93, 134, 160, 164, 195, 190, 237, 241, + + 240, 255, 278, 275, 289, 301, 370, 0, 315, 374, + 939, 316, 377, 381, 939, 939, 504, 508, 512, 516, + 518, 522, 526, 379 + } ; + +static yyconst flex_int16_t yy_def[725] = + { 0, + 716, 1, 717, 717, 718, 718, 719, 719, 720, 720, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 25, 716, 716, 716, 716, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 716, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 722, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 723, 716, 716, 25, 26, 716, + + 716, 724, 716, 716, 716, 716, 716, 716, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 716, + 716, 716, 716, 716, 716, 716, 722, 716, 716, 716, + 716, 716, 716, 716, 723, 716, 716, 716, 716, 724, + 716, 716, 721, 721, 721, 721, 721, 721, 721, 721, + + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 716, 716, 716, 716, 716, 716, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 716, 716, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 716, 716, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 716, 716, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + + 721, 721, 721, 721, 721, 721, 721, 716, 716, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 716, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 716, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + + 716, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 716, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 716, 716, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 716, 716, 716, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, + 716, 716, 721, 721, 721, 721, 721, 721, 721, 721, + 721, 716, 716, 721, 721, 721, 721, 721, 721, 716, + 716, 721, 721, 716, 716, 721, 716, 716, 721, 716, + + 716, 721, 716, 716, 721, 716, 716, 721, 716, 716, + 716, 716, 716, 716, 716, 0, 716, 716, 716, 716, + 716, 716, 716, 716 + } ; + +static yyconst flex_int16_t yy_nxt[1011] = + { 0, + 12, 13, 14, 15, 16, 12, 17, 18, 19, 12, + 12, 20, 21, 22, 23, 24, 25, 26, 26, 26, + 26, 26, 27, 28, 29, 30, 12, 31, 32, 31, + 33, 31, 31, 34, 31, 31, 31, 35, 36, 37, + 38, 31, 39, 31, 40, 41, 42, 43, 44, 45, + 46, 31, 47, 31, 31, 48, 49, 50, 51, 52, + 31, 53, 54, 55, 56, 57, 58, 31, 31, 31, + 59, 60, 73, 74, 73, 74, 63, 64, 77, 78, + 77, 78, 63, 64, 68, 69, 70, 82, 71, 61, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, + + 65, 65, 68, 69, 70, 85, 71, 83, 88, 95, + 93, 90, 94, 94, 94, 94, 94, 94, 96, 110, + 89, 86, 91, 92, 104, 105, 107, 108, 111, 75, + 142, 75, 696, 66, 99, 99, 99, 99, 99, 66, + 97, 152, 98, 98, 98, 98, 98, 99, 115, 127, + 143, 153, 116, 128, 122, 123, 134, 100, 101, 129, + 101, 124, 147, 139, 131, 125, 132, 148, 126, 130, + 135, 140, 149, 136, 100, 101, 133, 101, 137, 154, + 144, 138, 170, 164, 145, 716, 155, 156, 165, 150, + 82, 697, 151, 102, 146, 166, 101, 159, 157, 167, + + 160, 158, 213, 161, 698, 168, 205, 206, 214, 227, + 83, 247, 228, 162, 173, 173, 173, 173, 173, 173, + 163, 210, 211, 212, 242, 248, 243, 699, 171, 94, + 94, 94, 94, 94, 94, 220, 238, 244, 700, 221, + 239, 249, 251, 701, 183, 184, 240, 184, 188, 188, + 294, 295, 189, 189, 189, 189, 189, 189, 255, 252, + 250, 183, 184, 258, 184, 260, 263, 268, 256, 261, + 269, 339, 259, 395, 639, 641, 264, 396, 642, 257, + 340, 702, 640, 184, 94, 94, 94, 94, 94, 94, + 173, 173, 173, 173, 173, 173, 404, 703, 704, 186, + + 187, 329, 187, 273, 273, 586, 405, 274, 274, 274, + 274, 274, 274, 330, 587, 639, 186, 187, 705, 187, + 275, 275, 706, 640, 276, 276, 276, 276, 276, 276, + 189, 189, 189, 189, 189, 189, 707, 708, 187, 189, + 189, 189, 189, 189, 189, 274, 274, 274, 274, 274, + 274, 517, 518, 519, 709, 101, 655, 101, 276, 276, + 276, 276, 276, 276, 532, 533, 534, 540, 541, 542, + 655, 710, 101, 712, 101, 710, 535, 713, 714, 543, + 711, 190, 714, 695, 711, 694, 693, 715, 692, 691, + 536, 715, 690, 101, 274, 274, 274, 274, 274, 274, + + 689, 656, 261, 688, 687, 686, 685, 684, 683, 682, + 184, 681, 184, 680, 679, 656, 657, 678, 677, 676, + 675, 674, 673, 672, 671, 670, 669, 184, 668, 184, + 657, 667, 666, 665, 664, 663, 662, 661, 660, 659, + 658, 654, 653, 652, 651, 650, 649, 648, 184, 276, + 276, 276, 276, 276, 276, 647, 646, 645, 644, 643, + 638, 637, 636, 635, 287, 187, 634, 187, 633, 632, + 631, 630, 629, 628, 627, 626, 625, 624, 623, 622, + 621, 261, 187, 620, 187, 619, 618, 617, 616, 615, + 614, 613, 612, 611, 610, 609, 608, 607, 606, 605, + + 604, 603, 602, 187, 62, 62, 62, 62, 67, 67, + 67, 67, 72, 72, 72, 72, 76, 76, 76, 76, + 109, 109, 177, 177, 177, 177, 185, 601, 185, 185, + 600, 599, 598, 597, 596, 595, 594, 593, 592, 591, + 287, 590, 589, 588, 585, 584, 583, 582, 581, 580, + 579, 578, 577, 576, 575, 574, 573, 572, 571, 570, + 569, 568, 567, 566, 565, 564, 563, 233, 562, 561, + 560, 559, 558, 557, 556, 555, 554, 553, 552, 551, + 550, 549, 548, 547, 546, 545, 508, 544, 407, 407, + 261, 539, 538, 537, 531, 530, 529, 528, 233, 527, + + 526, 525, 233, 524, 523, 522, 521, 520, 516, 515, + 514, 513, 512, 511, 510, 509, 508, 507, 407, 506, + 505, 504, 503, 502, 501, 500, 499, 498, 497, 496, + 495, 494, 493, 492, 233, 491, 490, 489, 488, 233, + 487, 486, 485, 484, 287, 483, 482, 481, 480, 479, + 478, 477, 476, 475, 474, 473, 472, 471, 470, 469, + 468, 467, 466, 465, 464, 463, 462, 461, 460, 459, + 458, 457, 456, 455, 454, 453, 452, 261, 261, 451, + 450, 449, 448, 447, 446, 233, 445, 444, 443, 442, + 441, 440, 439, 438, 437, 436, 233, 435, 434, 433, + + 432, 431, 287, 430, 429, 428, 427, 426, 425, 424, + 423, 422, 421, 420, 419, 418, 417, 416, 415, 414, + 413, 412, 411, 410, 409, 407, 408, 407, 406, 261, + 403, 402, 401, 400, 399, 398, 397, 394, 393, 261, + 392, 391, 390, 389, 388, 387, 386, 385, 384, 383, + 382, 381, 380, 379, 378, 377, 376, 375, 374, 373, + 372, 371, 370, 369, 368, 367, 366, 365, 364, 363, + 362, 287, 361, 287, 360, 359, 358, 357, 356, 355, + 354, 353, 352, 351, 350, 349, 348, 347, 346, 345, + 344, 343, 342, 341, 338, 337, 336, 261, 335, 334, + + 333, 332, 331, 328, 327, 326, 325, 324, 323, 322, + 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, + 311, 310, 309, 233, 308, 307, 306, 233, 305, 304, + 303, 302, 287, 301, 300, 299, 298, 297, 296, 293, + 292, 291, 287, 290, 289, 287, 288, 287, 286, 285, + 284, 283, 282, 281, 280, 279, 278, 277, 272, 178, + 175, 271, 270, 267, 266, 265, 262, 254, 253, 246, + 245, 241, 237, 236, 235, 234, 233, 232, 231, 230, + 229, 226, 225, 224, 223, 222, 219, 218, 217, 216, + 215, 209, 208, 207, 204, 203, 202, 201, 200, 199, + + 198, 197, 196, 195, 194, 193, 192, 191, 716, 182, + 79, 181, 180, 179, 178, 176, 175, 174, 172, 106, + 169, 141, 121, 120, 119, 118, 117, 114, 113, 112, + 106, 103, 87, 84, 81, 80, 79, 716, 11, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716 + } ; + +static yyconst flex_int16_t yy_chk[1011] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 7, 7, 8, 8, 3, 3, 9, 9, + 10, 10, 4, 4, 5, 5, 5, 17, 5, 2, + 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, + + 4, 4, 6, 6, 6, 19, 6, 17, 21, 24, + 23, 22, 23, 23, 23, 23, 23, 23, 24, 32, + 21, 19, 22, 22, 28, 28, 30, 30, 32, 7, + 49, 8, 693, 3, 26, 26, 26, 26, 26, 4, + 25, 53, 25, 25, 25, 25, 25, 25, 36, 43, + 49, 53, 36, 43, 42, 42, 45, 25, 25, 43, + 25, 42, 51, 47, 44, 42, 44, 51, 42, 43, + 45, 47, 52, 45, 25, 25, 44, 25, 46, 54, + 50, 46, 59, 56, 50, 26, 54, 54, 56, 52, + 60, 694, 52, 25, 50, 57, 25, 55, 54, 57, + + 55, 54, 127, 55, 695, 57, 122, 122, 127, 140, + 60, 155, 140, 55, 65, 65, 65, 65, 65, 65, + 55, 126, 126, 126, 152, 155, 152, 696, 59, 94, + 94, 94, 94, 94, 94, 133, 150, 152, 697, 133, + 150, 156, 157, 698, 94, 94, 150, 94, 100, 100, + 212, 212, 100, 100, 100, 100, 100, 100, 160, 157, + 156, 94, 94, 161, 94, 162, 164, 168, 160, 162, + 168, 263, 161, 328, 623, 624, 164, 328, 624, 160, + 263, 699, 623, 94, 97, 97, 97, 97, 97, 97, + 173, 173, 173, 173, 173, 173, 338, 700, 701, 97, + + 97, 252, 97, 183, 183, 554, 338, 183, 183, 183, + 183, 183, 183, 252, 554, 639, 97, 97, 702, 97, + 186, 186, 703, 639, 186, 186, 186, 186, 186, 186, + 188, 188, 188, 188, 188, 188, 704, 705, 97, 189, + 189, 189, 189, 189, 189, 273, 273, 273, 273, 273, + 273, 477, 477, 477, 706, 189, 640, 189, 275, 275, + 275, 275, 275, 275, 496, 496, 496, 502, 502, 502, + 655, 707, 189, 709, 189, 710, 496, 712, 713, 502, + 707, 724, 714, 691, 710, 690, 687, 713, 684, 683, + 496, 714, 682, 189, 274, 274, 274, 274, 274, 274, + + 681, 640, 680, 678, 677, 676, 674, 673, 672, 671, + 274, 670, 274, 669, 668, 655, 640, 666, 663, 662, + 661, 659, 658, 657, 656, 654, 652, 274, 651, 274, + 655, 650, 649, 648, 647, 646, 645, 644, 643, 642, + 641, 638, 637, 636, 635, 632, 631, 630, 274, 276, + 276, 276, 276, 276, 276, 629, 628, 627, 626, 625, + 620, 619, 617, 616, 614, 276, 613, 276, 612, 611, + 610, 609, 608, 607, 606, 605, 603, 602, 601, 600, + 599, 598, 276, 597, 276, 596, 595, 594, 593, 592, + 591, 590, 589, 588, 587, 586, 585, 584, 583, 582, + + 581, 580, 579, 276, 717, 717, 717, 717, 718, 718, + 718, 718, 719, 719, 719, 719, 720, 720, 720, 720, + 721, 721, 722, 722, 722, 722, 723, 577, 723, 723, + 576, 572, 571, 570, 569, 568, 563, 562, 560, 559, + 558, 557, 556, 555, 553, 552, 551, 550, 549, 548, + 547, 546, 545, 543, 542, 541, 540, 539, 538, 537, + 536, 535, 534, 533, 532, 531, 530, 528, 527, 526, + 525, 524, 522, 521, 520, 519, 518, 517, 516, 515, + 514, 513, 512, 511, 510, 509, 508, 507, 506, 504, + 501, 500, 498, 497, 495, 494, 493, 492, 490, 489, + + 488, 487, 486, 485, 483, 482, 480, 478, 476, 475, + 474, 473, 472, 471, 470, 469, 468, 467, 466, 464, + 463, 462, 461, 460, 459, 458, 457, 453, 452, 450, + 449, 447, 446, 445, 444, 443, 442, 441, 440, 439, + 436, 434, 433, 431, 430, 429, 428, 427, 426, 425, + 424, 423, 422, 421, 420, 419, 418, 417, 415, 414, + 413, 411, 410, 409, 408, 406, 405, 404, 403, 402, + 401, 400, 399, 398, 397, 396, 395, 394, 393, 392, + 391, 390, 389, 388, 387, 386, 385, 384, 383, 382, + 381, 380, 379, 378, 376, 375, 374, 372, 371, 370, + + 369, 368, 367, 366, 365, 364, 363, 362, 361, 359, + 358, 357, 356, 355, 354, 353, 352, 351, 350, 349, + 348, 347, 346, 344, 343, 342, 341, 340, 339, 336, + 335, 334, 333, 332, 331, 330, 329, 327, 326, 325, + 324, 323, 322, 321, 320, 319, 318, 317, 316, 315, + 313, 312, 311, 310, 309, 308, 307, 306, 305, 304, + 303, 302, 300, 299, 298, 297, 296, 295, 294, 293, + 292, 291, 290, 289, 288, 286, 285, 284, 283, 282, + 281, 280, 279, 278, 277, 272, 271, 270, 269, 268, + 267, 266, 265, 264, 262, 260, 259, 258, 257, 256, + + 255, 254, 253, 251, 250, 249, 248, 247, 246, 245, + 244, 243, 242, 241, 240, 239, 238, 237, 235, 234, + 232, 231, 230, 229, 228, 227, 226, 225, 224, 222, + 221, 220, 219, 218, 217, 216, 215, 214, 213, 211, + 210, 209, 208, 207, 206, 205, 204, 203, 202, 201, + 200, 199, 198, 197, 196, 195, 194, 193, 180, 177, + 175, 174, 169, 167, 166, 165, 163, 159, 158, 154, + 153, 151, 149, 148, 147, 146, 145, 144, 143, 142, + 141, 138, 137, 136, 135, 134, 132, 131, 130, 129, + 128, 125, 124, 123, 121, 120, 119, 118, 117, 116, + + 115, 114, 113, 112, 111, 110, 108, 104, 98, 93, + 79, 78, 75, 74, 71, 70, 68, 66, 64, 61, + 58, 48, 41, 40, 39, 38, 37, 35, 34, 33, + 29, 27, 20, 18, 16, 15, 13, 11, 716, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716 + } ; + +static yy_state_type yy_last_accepting_state; +static char *yy_last_accepting_cpos; + +extern int hlsl__flex_debug; +int hlsl__flex_debug = 0; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *hlsl_text; +#line 1 "hlsl.l" +/* + * HLSL parser + * + * Copyright 2008 Stefan Dösinger + * Copyright 2012 Matteo Bruni for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#line 23 "hlsl.l" +#include "config.h" +#include "wine/port.h" +#include "wine/debug.h" + +#define YY_NO_UNISTD_H +#include "d3dcompiler_private.h" +#include "hlsl.tab.h" + +WINE_DEFAULT_DEBUG_CHANNEL(hlsl_parser); + +#define YY_USER_ACTION \ + do { \ + hlsl_lloc.first_column = hlsl_ctx.column; \ + hlsl_lloc.first_line = hlsl_ctx.line_no; \ + hlsl_ctx.column += hlsl_leng; \ + } while(0); + +#define YY_NO_INPUT 1 + +#line 984 "hlsl.yy.c" + +#define INITIAL 0 +#define pp 1 +#define pp_line 2 +#define pp_pragma 3 +#define pp_ignore 4 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int hlsl_lex_destroy (void ); + +int hlsl_get_debug (void ); + +void hlsl_set_debug (int debug_flag ); + +YY_EXTRA_TYPE hlsl_get_extra (void ); + +void hlsl_set_extra (YY_EXTRA_TYPE user_defined ); + +FILE *hlsl_get_in (void ); + +void hlsl_set_in (FILE * in_str ); + +FILE *hlsl_get_out (void ); + +void hlsl_set_out (FILE * out_str ); + +int hlsl_get_leng (void ); + +char *hlsl_get_text (void ); + +int hlsl_get_lineno (void ); + +void hlsl_set_lineno (int line_number ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int hlsl_wrap (void ); +#else +extern int hlsl_wrap (void ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); +#else +static int input (void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else +#define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( hlsl_text, hlsl_leng, 1, hlsl_out )) {} } while (0) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( hlsl_in )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( hlsl_in ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, hlsl_in))==0 && ferror(hlsl_in)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(hlsl_in); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int hlsl_lex (void); + +#define YY_DECL int hlsl_lex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after hlsl_text and hlsl_leng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + if ( hlsl_leng > 0 ) \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ + (hlsl_text[hlsl_leng - 1] == '\n'); \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + +#line 60 "hlsl.l" + +#line 1178 "hlsl.yy.c" + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! hlsl_in ) + hlsl_in = stdin; + + if ( ! hlsl_out ) + hlsl_out = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + hlsl_ensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + hlsl__create_buffer(hlsl_in,YY_BUF_SIZE ); + } + + hlsl__load_buffer_state( ); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of hlsl_text. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 717 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_current_state != 716 ); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 61 "hlsl.l" +{ + hlsl_message("Line %u: Reserved keyword \"%s\" used.\n", hlsl_ctx.line_no, hlsl_text); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + } + YY_BREAK +case 2: +YY_RULE_SETUP +#line 65 "hlsl.l" +{ + hlsl_message("Line %u: Reserved keyword \"%s\" used.\n", hlsl_ctx.line_no, hlsl_text); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + } + YY_BREAK +case 3: +YY_RULE_SETUP +#line 69 "hlsl.l" +{ + hlsl_message("Line %u: Reserved keyword \"%s\" used.\n", hlsl_ctx.line_no, hlsl_text); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + } + YY_BREAK +case 4: +YY_RULE_SETUP +#line 73 "hlsl.l" +{ + hlsl_message("Line %u: Reserved keyword \"%s\" used.\n", hlsl_ctx.line_no, hlsl_text); + set_parse_status(&hlsl_ctx.status, PARSE_ERR); + } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 78 "hlsl.l" +{return KW_BLENDSTATE; } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 79 "hlsl.l" +{return KW_BREAK; } + YY_BREAK +case 7: +YY_RULE_SETUP +#line 80 "hlsl.l" +{return KW_BUFFER; } + YY_BREAK +case 8: +YY_RULE_SETUP +#line 81 "hlsl.l" +{return KW_CBUFFER; } + YY_BREAK +case 9: +YY_RULE_SETUP +#line 82 "hlsl.l" +{return KW_COMPILE; } + YY_BREAK +case 10: +YY_RULE_SETUP +#line 83 "hlsl.l" +{return KW_CONST; } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 84 "hlsl.l" +{return KW_CONTINUE; } + YY_BREAK +case 12: +YY_RULE_SETUP +#line 85 "hlsl.l" +{return KW_DEPTHSTENCILSTATE; } + YY_BREAK +case 13: +YY_RULE_SETUP +#line 86 "hlsl.l" +{return KW_DEPTHSTENCILVIEW; } + YY_BREAK +case 14: +YY_RULE_SETUP +#line 87 "hlsl.l" +{return KW_DISCARD; } + YY_BREAK +case 15: +YY_RULE_SETUP +#line 88 "hlsl.l" +{return KW_DO; } + YY_BREAK +case 16: +YY_RULE_SETUP +#line 89 "hlsl.l" +{return KW_DOUBLE; } + YY_BREAK +case 17: +YY_RULE_SETUP +#line 90 "hlsl.l" +{return KW_ELSE; } + YY_BREAK +case 18: +YY_RULE_SETUP +#line 91 "hlsl.l" +{return KW_EXTERN; } + YY_BREAK +case 19: +YY_RULE_SETUP +#line 92 "hlsl.l" +{return KW_FALSE; } + YY_BREAK +case 20: +YY_RULE_SETUP +#line 93 "hlsl.l" +{return KW_FOR; } + YY_BREAK +case 21: +YY_RULE_SETUP +#line 94 "hlsl.l" +{return KW_GEOMETRYSHADER; } + YY_BREAK +case 22: +YY_RULE_SETUP +#line 95 "hlsl.l" +{return KW_GROUPSHARED; } + YY_BREAK +case 23: +YY_RULE_SETUP +#line 96 "hlsl.l" +{return KW_IF; } + YY_BREAK +case 24: +YY_RULE_SETUP +#line 97 "hlsl.l" +{return KW_IN; } + YY_BREAK +case 25: +YY_RULE_SETUP +#line 98 "hlsl.l" +{return KW_INLINE; } + YY_BREAK +case 26: +YY_RULE_SETUP +#line 99 "hlsl.l" +{return KW_INOUT; } + YY_BREAK +case 27: +YY_RULE_SETUP +#line 100 "hlsl.l" +{return KW_MATRIX; } + YY_BREAK +case 28: +YY_RULE_SETUP +#line 101 "hlsl.l" +{return KW_NAMESPACE; } + YY_BREAK +case 29: +YY_RULE_SETUP +#line 102 "hlsl.l" +{return KW_NOINTERPOLATION; } + YY_BREAK +case 30: +YY_RULE_SETUP +#line 103 "hlsl.l" +{return KW_OUT; } + YY_BREAK +case 31: +YY_RULE_SETUP +#line 104 "hlsl.l" +{return KW_PASS; } + YY_BREAK +case 32: +YY_RULE_SETUP +#line 105 "hlsl.l" +{return KW_PIXELSHADER; } + YY_BREAK +case 33: +YY_RULE_SETUP +#line 106 "hlsl.l" +{return KW_PRECISE; } + YY_BREAK +case 34: +YY_RULE_SETUP +#line 107 "hlsl.l" +{return KW_RASTERIZERSTATE; } + YY_BREAK +case 35: +YY_RULE_SETUP +#line 108 "hlsl.l" +{return KW_RENDERTARGETVIEW; } + YY_BREAK +case 36: +YY_RULE_SETUP +#line 109 "hlsl.l" +{return KW_RETURN; } + YY_BREAK +case 37: +YY_RULE_SETUP +#line 110 "hlsl.l" +{return KW_REGISTER; } + YY_BREAK +case 38: +YY_RULE_SETUP +#line 111 "hlsl.l" +{return KW_SAMPLER; } + YY_BREAK +case 39: +YY_RULE_SETUP +#line 112 "hlsl.l" +{return KW_SAMPLER1D; } + YY_BREAK +case 40: +YY_RULE_SETUP +#line 113 "hlsl.l" +{return KW_SAMPLER2D; } + YY_BREAK +case 41: +YY_RULE_SETUP +#line 114 "hlsl.l" +{return KW_SAMPLER3D; } + YY_BREAK +case 42: +YY_RULE_SETUP +#line 115 "hlsl.l" +{return KW_SAMPLERCUBE; } + YY_BREAK +case 43: +YY_RULE_SETUP +#line 116 "hlsl.l" +{return KW_SAMPLER_STATE; } + YY_BREAK +case 44: +YY_RULE_SETUP +#line 117 "hlsl.l" +{return KW_SAMPLERCOMPARISONSTATE;} + YY_BREAK +case 45: +YY_RULE_SETUP +#line 118 "hlsl.l" +{return KW_SHARED; } + YY_BREAK +case 46: +YY_RULE_SETUP +#line 119 "hlsl.l" +{return KW_STATEBLOCK; } + YY_BREAK +case 47: +YY_RULE_SETUP +#line 120 "hlsl.l" +{return KW_STATEBLOCK_STATE; } + YY_BREAK +case 48: +YY_RULE_SETUP +#line 121 "hlsl.l" +{return KW_STATIC; } + YY_BREAK +case 49: +YY_RULE_SETUP +#line 122 "hlsl.l" +{return KW_STRING; } + YY_BREAK +case 50: +YY_RULE_SETUP +#line 123 "hlsl.l" +{return KW_STRUCT; } + YY_BREAK +case 51: +YY_RULE_SETUP +#line 124 "hlsl.l" +{return KW_SWITCH; } + YY_BREAK +case 52: +YY_RULE_SETUP +#line 125 "hlsl.l" +{return KW_TBUFFER; } + YY_BREAK +case 53: +YY_RULE_SETUP +#line 126 "hlsl.l" +{return KW_TECHNIQUE; } + YY_BREAK +case 54: +YY_RULE_SETUP +#line 127 "hlsl.l" +{return KW_TECHNIQUE10; } + YY_BREAK +case 55: +YY_RULE_SETUP +#line 128 "hlsl.l" +{return KW_TEXTURE; } + YY_BREAK +case 56: +YY_RULE_SETUP +#line 129 "hlsl.l" +{return KW_TEXTURE1D; } + YY_BREAK +case 57: +YY_RULE_SETUP +#line 130 "hlsl.l" +{return KW_TEXTURE1DARRAY; } + YY_BREAK +case 58: +YY_RULE_SETUP +#line 131 "hlsl.l" +{return KW_TEXTURE2D; } + YY_BREAK +case 59: +YY_RULE_SETUP +#line 132 "hlsl.l" +{return KW_TEXTURE2DARRAY; } + YY_BREAK +case 60: +YY_RULE_SETUP +#line 133 "hlsl.l" +{return KW_TEXTURE2DMS; } + YY_BREAK +case 61: +YY_RULE_SETUP +#line 134 "hlsl.l" +{return KW_TEXTURE2DMSARRAY; } + YY_BREAK +case 62: +YY_RULE_SETUP +#line 135 "hlsl.l" +{return KW_TEXTURE3D; } + YY_BREAK +case 63: +YY_RULE_SETUP +#line 136 "hlsl.l" +{return KW_TEXTURE3DARRAY; } + YY_BREAK +case 64: +YY_RULE_SETUP +#line 137 "hlsl.l" +{return KW_TEXTURECUBE; } + YY_BREAK +case 65: +YY_RULE_SETUP +#line 138 "hlsl.l" +{return KW_TRUE; } + YY_BREAK +case 66: +YY_RULE_SETUP +#line 139 "hlsl.l" +{return KW_TYPEDEF; } + YY_BREAK +case 67: +YY_RULE_SETUP +#line 140 "hlsl.l" +{return KW_UNIFORM; } + YY_BREAK +case 68: +YY_RULE_SETUP +#line 141 "hlsl.l" +{return KW_VECTOR; } + YY_BREAK +case 69: +YY_RULE_SETUP +#line 142 "hlsl.l" +{return KW_VERTEXSHADER; } + YY_BREAK +case 70: +YY_RULE_SETUP +#line 143 "hlsl.l" +{return KW_VOID; } + YY_BREAK +case 71: +YY_RULE_SETUP +#line 144 "hlsl.l" +{return KW_VOLATILE; } + YY_BREAK +case 72: +YY_RULE_SETUP +#line 145 "hlsl.l" +{return KW_WHILE; } + YY_BREAK +case 73: +YY_RULE_SETUP +#line 147 "hlsl.l" +{return OP_INC; } + YY_BREAK +case 74: +YY_RULE_SETUP +#line 148 "hlsl.l" +{return OP_DEC; } + YY_BREAK +case 75: +YY_RULE_SETUP +#line 149 "hlsl.l" +{return OP_AND; } + YY_BREAK +case 76: +YY_RULE_SETUP +#line 150 "hlsl.l" +{return OP_OR; } + YY_BREAK +case 77: +YY_RULE_SETUP +#line 151 "hlsl.l" +{return OP_EQ; } + YY_BREAK +case 78: +YY_RULE_SETUP +#line 152 "hlsl.l" +{return OP_LEFTSHIFT; } + YY_BREAK +case 79: +YY_RULE_SETUP +#line 153 "hlsl.l" +{return OP_LEFTSHIFTASSIGN; } + YY_BREAK +case 80: +YY_RULE_SETUP +#line 154 "hlsl.l" +{return OP_RIGHTSHIFT; } + YY_BREAK +case 81: +YY_RULE_SETUP +#line 155 "hlsl.l" +{return OP_RIGHTSHIFTASSIGN; } + YY_BREAK +case 82: +YY_RULE_SETUP +#line 156 "hlsl.l" +{return OP_ELLIPSIS; } + YY_BREAK +case 83: +YY_RULE_SETUP +#line 157 "hlsl.l" +{return OP_LE; } + YY_BREAK +case 84: +YY_RULE_SETUP +#line 158 "hlsl.l" +{return OP_GE; } + YY_BREAK +case 85: +YY_RULE_SETUP +#line 159 "hlsl.l" +{return OP_NE; } + YY_BREAK +case 86: +YY_RULE_SETUP +#line 160 "hlsl.l" +{return OP_ADDASSIGN; } + YY_BREAK +case 87: +YY_RULE_SETUP +#line 161 "hlsl.l" +{return OP_SUBASSIGN; } + YY_BREAK +case 88: +YY_RULE_SETUP +#line 162 "hlsl.l" +{return OP_MULASSIGN; } + YY_BREAK +case 89: +YY_RULE_SETUP +#line 163 "hlsl.l" +{return OP_DIVASSIGN; } + YY_BREAK +case 90: +YY_RULE_SETUP +#line 164 "hlsl.l" +{return OP_MODASSIGN; } + YY_BREAK +case 91: +YY_RULE_SETUP +#line 165 "hlsl.l" +{return OP_ANDASSIGN; } + YY_BREAK +case 92: +YY_RULE_SETUP +#line 166 "hlsl.l" +{return OP_ORASSIGN; } + YY_BREAK +case 93: +YY_RULE_SETUP +#line 167 "hlsl.l" +{return OP_XORASSIGN; } + YY_BREAK +case 94: +YY_RULE_SETUP +#line 168 "hlsl.l" +{return OP_UNKNOWN1; } + YY_BREAK +case 95: +YY_RULE_SETUP +#line 169 "hlsl.l" +{return OP_UNKNOWN2; } + YY_BREAK +case 96: +YY_RULE_SETUP +#line 170 "hlsl.l" +{return OP_UNKNOWN3; } + YY_BREAK +case 97: +YY_RULE_SETUP +#line 171 "hlsl.l" +{return OP_UNKNOWN4; } + YY_BREAK +case 98: +YY_RULE_SETUP +#line 173 "hlsl.l" +{return KW_COLUMN_MAJOR; } + YY_BREAK +case 99: +YY_RULE_SETUP +#line 174 "hlsl.l" +{return KW_ROW_MAJOR; } + YY_BREAK +case 100: +YY_RULE_SETUP +#line 176 "hlsl.l" +{ + hlsl_lval.name = d3dcompiler_strdup(hlsl_text); + if (get_variable(hlsl_ctx.cur_scope, hlsl_text) + || find_function(hlsl_text)) + return VAR_IDENTIFIER; + else if (get_type(hlsl_ctx.cur_scope, hlsl_text, TRUE)) + return TYPE_IDENTIFIER; + else + return NEW_IDENTIFIER; + } + YY_BREAK +case 101: +YY_RULE_SETUP +#line 187 "hlsl.l" +{ + hlsl_lval.floatval = atof(hlsl_text); + return C_FLOAT; + } + YY_BREAK +case 102: +YY_RULE_SETUP +#line 191 "hlsl.l" +{ + hlsl_lval.floatval = atof(hlsl_text); + return C_FLOAT; + } + YY_BREAK +case 103: +YY_RULE_SETUP +#line 195 "hlsl.l" +{ + hlsl_lval.floatval = atof(hlsl_text); + return C_FLOAT; + } + YY_BREAK +case 104: +YY_RULE_SETUP +#line 199 "hlsl.l" +{ + sscanf(hlsl_text, "0x%x", &hlsl_lval.intval); + return C_INTEGER; + } + YY_BREAK +case 105: +YY_RULE_SETUP +#line 203 "hlsl.l" +{ + sscanf(hlsl_text, "0%o", &hlsl_lval.intval); + return C_INTEGER; + } + YY_BREAK +case 106: +YY_RULE_SETUP +#line 207 "hlsl.l" +{ + hlsl_lval.intval = (atoi(hlsl_text)); + return C_INTEGER; + } + YY_BREAK +case 107: +YY_RULE_SETUP +#line 212 "hlsl.l" +{} + YY_BREAK +case 108: +YY_RULE_SETUP +#line 214 "hlsl.l" +{} + YY_BREAK +case 109: +/* rule 109 can match eol */ +YY_RULE_SETUP +#line 215 "hlsl.l" +{ + hlsl_ctx.line_no++; + hlsl_ctx.column = 1; + } + YY_BREAK +case 110: +YY_RULE_SETUP +#line 220 "hlsl.l" +{ + BEGIN pp; + } + YY_BREAK +case 111: +YY_RULE_SETUP +#line 224 "hlsl.l" +{ + TRACE("Got a #pragma.\n"); + BEGIN pp_pragma; + } + YY_BREAK +case 112: +YY_RULE_SETUP +#line 228 "hlsl.l" +{ + TRACE("#pragma setting row_major mode.\n"); + hlsl_ctx.matrix_majority = HLSL_ROW_MAJOR; + BEGIN pp_ignore; + } + YY_BREAK +case 113: +YY_RULE_SETUP +#line 233 "hlsl.l" +{ + TRACE("#pragma setting column_major mode.\n"); + hlsl_ctx.matrix_majority = HLSL_COLUMN_MAJOR; + BEGIN pp_ignore; + } + YY_BREAK +case 114: +/* rule 114 can match eol */ +YY_RULE_SETUP +#line 238 "hlsl.l" +{ + FIXME("Unsupported preprocessor #pragma directive at line %u.\n", hlsl_ctx.line_no); + BEGIN INITIAL; + } + YY_BREAK +case 115: +YY_RULE_SETUP +#line 242 "hlsl.l" +{} + YY_BREAK +case 116: +YY_RULE_SETUP +#line 243 "hlsl.l" +{ + TRACE("Preprocessor line info.\n"); + BEGIN pp_line; + hlsl_lval.intval = (atoi(hlsl_text)); + return PRE_LINE; + } + YY_BREAK +case 117: +/* rule 117 can match eol */ +YY_RULE_SETUP +#line 249 "hlsl.l" +{ + char *string = d3dcompiler_strdup(hlsl_text + 1); + + BEGIN pp_ignore; + string[strlen(string) - 1] = 0; + hlsl_lval.name = string; + return STRING; + } + YY_BREAK +case 118: +YY_RULE_SETUP +#line 257 "hlsl.l" +{} + YY_BREAK +case 119: +/* rule 119 can match eol */ +YY_RULE_SETUP +#line 258 "hlsl.l" +{ + FIXME("Malformed preprocessor line directive?\n"); + BEGIN INITIAL; + } + YY_BREAK +case 120: +/* rule 120 can match eol */ +YY_RULE_SETUP +#line 262 "hlsl.l" +{ + BEGIN INITIAL; + } + YY_BREAK +case 121: +YY_RULE_SETUP +#line 265 "hlsl.l" +{} + YY_BREAK +case 122: +/* rule 122 can match eol */ +YY_RULE_SETUP +#line 266 "hlsl.l" +{ + FIXME("Unexpected preprocessor directive.\n"); + BEGIN INITIAL; + } + YY_BREAK +case 123: +YY_RULE_SETUP +#line 270 "hlsl.l" +{} + YY_BREAK +case 124: +YY_RULE_SETUP +#line 272 "hlsl.l" +{ + return hlsl_text[0]; + } + YY_BREAK +case 125: +YY_RULE_SETUP +#line 276 "hlsl.l" +ECHO; + YY_BREAK +#line 1969 "hlsl.yy.c" +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(pp): +case YY_STATE_EOF(pp_line): +case YY_STATE_EOF(pp_pragma): +case YY_STATE_EOF(pp_ignore): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed hlsl_in at a new source and called + * hlsl_lex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = hlsl_in; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( hlsl_wrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * hlsl_text, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of hlsl_lex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); + register int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + hlsl_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), (size_t) num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + hlsl_restart(hlsl_in ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) hlsl_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 717 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + register int yy_is_jam; + register char *yy_cp = (yy_c_buf_p); + + register YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 717 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 716); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + hlsl_restart(hlsl_in ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( hlsl_wrap( ) ) + return EOF; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve hlsl_text */ + (yy_hold_char) = *++(yy_c_buf_p); + + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void hlsl_restart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + hlsl_ensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + hlsl__create_buffer(hlsl_in,YY_BUF_SIZE ); + } + + hlsl__init_buffer(YY_CURRENT_BUFFER,input_file ); + hlsl__load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void hlsl__switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * hlsl_pop_buffer_state(); + * hlsl_push_buffer_state(new_buffer); + */ + hlsl_ensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + hlsl__load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (hlsl_wrap()) processing, but the only time this flag + * is looked at is after hlsl_wrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void hlsl__load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + hlsl_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE hlsl__create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) hlsl_alloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in hlsl__create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) hlsl_alloc(b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in hlsl__create_buffer()" ); + + b->yy_is_our_buffer = 1; + + hlsl__init_buffer(b,file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with hlsl__create_buffer() + * + */ + void hlsl__delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + hlsl_free((void *) b->yy_ch_buf ); + + hlsl_free((void *) b ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a hlsl_restart() or at EOF. + */ + static void hlsl__init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + hlsl__flush_buffer(b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then hlsl__init_buffer was _probably_ + * called from hlsl_restart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void hlsl__flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + hlsl__load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void hlsl_push_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + hlsl_ensure_buffer_stack(); + + /* This block is copied from hlsl__switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from hlsl__switch_to_buffer. */ + hlsl__load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void hlsl_pop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + hlsl__delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + hlsl__load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void hlsl_ensure_buffer_stack (void) +{ + int num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)hlsl_alloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in hlsl_ensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)hlsl_realloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in hlsl_ensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE hlsl__scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) hlsl_alloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in hlsl__scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + hlsl__switch_to_buffer(b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to hlsl_lex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * hlsl__scan_bytes() instead. + */ +YY_BUFFER_STATE hlsl__scan_string (yyconst char * yystr ) +{ + + return hlsl__scan_bytes(yystr,strlen(yystr) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to hlsl_lex() will + * scan from a @e copy of @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE hlsl__scan_bytes (yyconst char * yybytes, int _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; + buf = (char *) hlsl_alloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in hlsl__scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = hlsl__scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in hlsl__scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up hlsl_text. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + hlsl_text[hlsl_leng] = (yy_hold_char); \ + (yy_c_buf_p) = hlsl_text + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + hlsl_leng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int hlsl_get_lineno (void) +{ + + return hlsl_lineno; +} + +/** Get the input stream. + * + */ +FILE *hlsl_get_in (void) +{ + return hlsl_in; +} + +/** Get the output stream. + * + */ +FILE *hlsl_get_out (void) +{ + return hlsl_out; +} + +/** Get the length of the current token. + * + */ +int hlsl_get_leng (void) +{ + return hlsl_leng; +} + +/** Get the current token. + * + */ + +char *hlsl_get_text (void) +{ + return hlsl_text; +} + +/** Set the current line number. + * @param line_number + * + */ +void hlsl_set_lineno (int line_number ) +{ + + hlsl_lineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see hlsl__switch_to_buffer + */ +void hlsl_set_in (FILE * in_str ) +{ + hlsl_in = in_str ; +} + +void hlsl_set_out (FILE * out_str ) +{ + hlsl_out = out_str ; +} + +int hlsl_get_debug (void) +{ + return hlsl__flex_debug; +} + +void hlsl_set_debug (int bdebug ) +{ + hlsl__flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from hlsl_lex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + hlsl_in = stdin; + hlsl_out = stdout; +#else + hlsl_in = (FILE *) 0; + hlsl_out = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * hlsl_lex_init() + */ + return 0; +} + +/* hlsl_lex_destroy is for both reentrant and non-reentrant scanners. */ +int hlsl_lex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + hlsl__delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + hlsl_pop_buffer_state(); + } + + /* Destroy the stack itself. */ + hlsl_free((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * hlsl_lex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s ) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *hlsl_alloc (yy_size_t size ) +{ + return (void *) malloc( size ); +} + +void *hlsl_realloc (void * ptr, yy_size_t size ) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void hlsl_free (void * ptr ) +{ + free( (char *) ptr ); /* see hlsl_realloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 276 "hlsl.l" + + + +struct bwriter_shader *parse_hlsl(enum shader_type type, DWORD major, DWORD minor, + const char *entrypoint, char **messages); + +struct bwriter_shader *parse_hlsl_shader(const char *text, enum shader_type type, DWORD major, DWORD minor, + const char *entrypoint, char **messages) +{ + struct bwriter_shader *ret = NULL; + YY_BUFFER_STATE buffer; + + buffer = hlsl__scan_string(text); + hlsl__switch_to_buffer(buffer); + + ret = parse_hlsl(type, major, minor, entrypoint, messages); + + hlsl__delete_buffer(buffer); + return ret; +} + diff --git a/dll/directx/wine/d3dcompiler_43/reflection.c b/dll/directx/wine/d3dcompiler_43/reflection.c new file mode 100644 index 00000000000..f516e4a0449 --- /dev/null +++ b/dll/directx/wine/d3dcompiler_43/reflection.c @@ -0,0 +1,1848 @@ +/* + * Copyright 2009 Henri Verbeet for CodeWeavers + * Copyright 2010 Rico Schüller + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "config.h" +#include "wine/port.h" + +#include "d3dcompiler_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(d3dcompiler); + +enum D3DCOMPILER_SIGNATURE_ELEMENT_SIZE +{ + D3DCOMPILER_SIGNATURE_ELEMENT_SIZE6 = 6, + D3DCOMPILER_SIGNATURE_ELEMENT_SIZE7 = 7, +}; + +#define D3DCOMPILER_SHADER_TARGET_VERSION_MASK 0xffff +#define D3DCOMPILER_SHADER_TARGET_SHADERTYPE_MASK 0xffff0000 + +struct d3dcompiler_shader_signature +{ + D3D11_SIGNATURE_PARAMETER_DESC *elements; + UINT element_count; + char *string_data; +}; + +struct d3dcompiler_shader_reflection_type +{ + ID3D11ShaderReflectionType ID3D11ShaderReflectionType_iface; + + DWORD id; + struct wine_rb_entry entry; + + struct d3dcompiler_shader_reflection *reflection; + + D3D11_SHADER_TYPE_DESC desc; + struct d3dcompiler_shader_reflection_type_member *members; +}; + +struct d3dcompiler_shader_reflection_type_member +{ + char *name; + DWORD offset; + struct d3dcompiler_shader_reflection_type *type; +}; + +struct d3dcompiler_shader_reflection_variable +{ + ID3D11ShaderReflectionVariable ID3D11ShaderReflectionVariable_iface; + + struct d3dcompiler_shader_reflection_constant_buffer *constant_buffer; + struct d3dcompiler_shader_reflection_type *type; + + char *name; + UINT start_offset; + UINT size; + UINT flags; + LPVOID default_value; +}; + +struct d3dcompiler_shader_reflection_constant_buffer +{ + ID3D11ShaderReflectionConstantBuffer ID3D11ShaderReflectionConstantBuffer_iface; + + struct d3dcompiler_shader_reflection *reflection; + + char *name; + D3D_CBUFFER_TYPE type; + UINT variable_count; + UINT size; + UINT flags; + + struct d3dcompiler_shader_reflection_variable *variables; +}; + +/* ID3D11ShaderReflection */ +struct d3dcompiler_shader_reflection +{ + ID3D11ShaderReflection ID3D11ShaderReflection_iface; + LONG refcount; + + DWORD target; + char *creator; + UINT flags; + UINT version; + UINT bound_resource_count; + UINT constant_buffer_count; + + UINT mov_instruction_count; + UINT conversion_instruction_count; + UINT instruction_count; + UINT emit_instruction_count; + D3D_PRIMITIVE_TOPOLOGY gs_output_topology; + UINT gs_max_output_vertex_count; + D3D_PRIMITIVE input_primitive; + UINT cut_instruction_count; + UINT dcl_count; + UINT static_flow_control_count; + UINT float_instruction_count; + UINT temp_register_count; + UINT int_instruction_count; + UINT uint_instruction_count; + UINT temp_array_count; + UINT array_instruction_count; + UINT texture_normal_instructions; + UINT texture_load_instructions; + UINT texture_comp_instructions; + UINT texture_bias_instructions; + UINT texture_gradient_instructions; + UINT dynamic_flow_control_count; + UINT c_control_points; + D3D_TESSELLATOR_OUTPUT_PRIMITIVE hs_output_primitive; + D3D_TESSELLATOR_PARTITIONING hs_prtitioning; + D3D_TESSELLATOR_DOMAIN tessellator_domain; + + struct d3dcompiler_shader_signature *isgn; + struct d3dcompiler_shader_signature *osgn; + struct d3dcompiler_shader_signature *pcsg; + char *resource_string; + D3D11_SHADER_INPUT_BIND_DESC *bound_resources; + struct d3dcompiler_shader_reflection_constant_buffer *constant_buffers; + struct wine_rb_tree types; +}; + +static struct d3dcompiler_shader_reflection_type *get_reflection_type(struct d3dcompiler_shader_reflection *reflection, const char *data, DWORD offset); + +static const struct ID3D11ShaderReflectionConstantBufferVtbl d3dcompiler_shader_reflection_constant_buffer_vtbl; +static const struct ID3D11ShaderReflectionVariableVtbl d3dcompiler_shader_reflection_variable_vtbl; +static const struct ID3D11ShaderReflectionTypeVtbl d3dcompiler_shader_reflection_type_vtbl; + +/* null objects - needed for invalid calls */ +static struct d3dcompiler_shader_reflection_constant_buffer null_constant_buffer = {{&d3dcompiler_shader_reflection_constant_buffer_vtbl}}; +static struct d3dcompiler_shader_reflection_type null_type = {{&d3dcompiler_shader_reflection_type_vtbl}}; +static struct d3dcompiler_shader_reflection_variable null_variable = {{&d3dcompiler_shader_reflection_variable_vtbl}, + &null_constant_buffer, &null_type}; + +static BOOL copy_name(const char *ptr, char **name) +{ + size_t name_len; + + if (!ptr) return TRUE; + + name_len = strlen(ptr) + 1; + if (name_len == 1) + { + return TRUE; + } + + *name = HeapAlloc(GetProcessHeap(), 0, name_len); + if (!*name) + { + ERR("Failed to allocate name memory.\n"); + return FALSE; + } + + memcpy(*name, ptr, name_len); + + return TRUE; +} + +static BOOL copy_value(const char *ptr, void **value, DWORD size) +{ + if (!ptr || !size) return TRUE; + + *value = HeapAlloc(GetProcessHeap(), 0, size); + if (!*value) + { + ERR("Failed to allocate vlaue memory.\n"); + return FALSE; + } + + memcpy(*value, ptr, size); + + return TRUE; +} + +static void *d3dcompiler_rb_alloc(size_t size) +{ + return HeapAlloc(GetProcessHeap(), 0, size); +} + +static void *d3dcompiler_rb_realloc(void *ptr, size_t size) +{ + return HeapReAlloc(GetProcessHeap(), 0, ptr, size); +} + +static void d3dcompiler_rb_free(void *ptr) +{ + HeapFree(GetProcessHeap(), 0, ptr); +} + +static int d3dcompiler_shader_reflection_type_compare(const void *key, const struct wine_rb_entry *entry) +{ + const struct d3dcompiler_shader_reflection_type *t = WINE_RB_ENTRY_VALUE(entry, const struct d3dcompiler_shader_reflection_type, entry); + const DWORD *id = key; + + return *id - t->id; +} + +static void free_type_member(struct d3dcompiler_shader_reflection_type_member *member) +{ + if (member) + { + HeapFree(GetProcessHeap(), 0, member->name); + } +} + +static void d3dcompiler_shader_reflection_type_destroy(struct wine_rb_entry *entry, void *context) +{ + struct d3dcompiler_shader_reflection_type *t = WINE_RB_ENTRY_VALUE(entry, struct d3dcompiler_shader_reflection_type, entry); + unsigned int i; + + TRACE("reflection type %p.\n", t); + + if (t->members) + { + for (i = 0; i < t->desc.Members; ++i) + { + free_type_member(&t->members[i]); + } + HeapFree(GetProcessHeap(), 0, t->members); + } + + HeapFree(GetProcessHeap(), 0, t); +} + +static const struct wine_rb_functions d3dcompiler_shader_reflection_type_rb_functions = +{ + d3dcompiler_rb_alloc, + d3dcompiler_rb_realloc, + d3dcompiler_rb_free, + d3dcompiler_shader_reflection_type_compare, +}; + +static void free_signature(struct d3dcompiler_shader_signature *sig) +{ + TRACE("Free signature %p\n", sig); + + HeapFree(GetProcessHeap(), 0, sig->elements); + HeapFree(GetProcessHeap(), 0, sig->string_data); +} + +static void free_variable(struct d3dcompiler_shader_reflection_variable *var) +{ + if (var) + { + HeapFree(GetProcessHeap(), 0, var->name); + HeapFree(GetProcessHeap(), 0, var->default_value); + } +} + +static void free_constant_buffer(struct d3dcompiler_shader_reflection_constant_buffer *cb) +{ + if (cb->variables) + { + unsigned int i; + + for (i = 0; i < cb->variable_count; ++i) + { + free_variable(&cb->variables[i]); + } + HeapFree(GetProcessHeap(), 0, cb->variables); + } + + HeapFree(GetProcessHeap(), 0, cb->name); +} + +static void reflection_cleanup(struct d3dcompiler_shader_reflection *ref) +{ + TRACE("Cleanup %p\n", ref); + + if (ref->isgn) + { + free_signature(ref->isgn); + HeapFree(GetProcessHeap(), 0, ref->isgn); + } + + if (ref->osgn) + { + free_signature(ref->osgn); + HeapFree(GetProcessHeap(), 0, ref->osgn); + } + + if (ref->pcsg) + { + free_signature(ref->pcsg); + HeapFree(GetProcessHeap(), 0, ref->pcsg); + } + + if (ref->constant_buffers) + { + unsigned int i; + + for (i = 0; i < ref->constant_buffer_count; ++i) + { + free_constant_buffer(&ref->constant_buffers[i]); + } + } + + wine_rb_destroy(&ref->types, d3dcompiler_shader_reflection_type_destroy, NULL); + HeapFree(GetProcessHeap(), 0, ref->constant_buffers); + HeapFree(GetProcessHeap(), 0, ref->bound_resources); + HeapFree(GetProcessHeap(), 0, ref->resource_string); + HeapFree(GetProcessHeap(), 0, ref->creator); +} + +/* IUnknown methods */ + +static inline struct d3dcompiler_shader_reflection *impl_from_ID3D11ShaderReflection(ID3D11ShaderReflection *iface) +{ + return CONTAINING_RECORD(iface, struct d3dcompiler_shader_reflection, ID3D11ShaderReflection_iface); +} + +static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_QueryInterface(ID3D11ShaderReflection *iface, REFIID riid, void **object) +{ + TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object); + + if (IsEqualGUID(riid, &IID_ID3D11ShaderReflection) + || IsEqualGUID(riid, &IID_IUnknown)) + { + IUnknown_AddRef(iface); + *object = iface; + return S_OK; + } + + WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid)); + + *object = NULL; + return E_NOINTERFACE; +} + +static ULONG STDMETHODCALLTYPE d3dcompiler_shader_reflection_AddRef(ID3D11ShaderReflection *iface) +{ + struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); + ULONG refcount = InterlockedIncrement(&This->refcount); + + TRACE("%p increasing refcount to %u\n", This, refcount); + + return refcount; +} + +static ULONG STDMETHODCALLTYPE d3dcompiler_shader_reflection_Release(ID3D11ShaderReflection *iface) +{ + struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); + ULONG refcount = InterlockedDecrement(&This->refcount); + + TRACE("%p decreasing refcount to %u\n", This, refcount); + + if (!refcount) + { + reflection_cleanup(This); + HeapFree(GetProcessHeap(), 0, This); + } + + return refcount; +} + +/* ID3D11ShaderReflection methods */ + +static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetDesc(ID3D11ShaderReflection *iface, D3D11_SHADER_DESC *desc) +{ + struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); + + FIXME("iface %p, desc %p partial stub!\n", iface, desc); + + if (!desc) + { + WARN("Invalid argument specified\n"); + return E_FAIL; + } + + desc->Version = This->version; + desc->Creator = This->creator; + desc->Flags = This->flags; + desc->ConstantBuffers = This->constant_buffer_count; + desc->BoundResources = This->bound_resource_count; + desc->InputParameters = This->isgn ? This->isgn->element_count : 0; + desc->OutputParameters = This->osgn ? This->osgn->element_count : 0; + desc->InstructionCount = This->instruction_count; + desc->TempRegisterCount = This->temp_register_count; + desc->TempArrayCount = This->temp_array_count; + desc->DefCount = 0; + desc->DclCount = This->dcl_count; + desc->TextureNormalInstructions = This->texture_normal_instructions; + desc->TextureLoadInstructions = This->texture_load_instructions; + desc->TextureCompInstructions = This->texture_comp_instructions; + desc->TextureBiasInstructions = This->texture_bias_instructions; + desc->TextureGradientInstructions = This->texture_gradient_instructions; + desc->FloatInstructionCount = This->float_instruction_count; + desc->IntInstructionCount = This->int_instruction_count; + desc->UintInstructionCount = This->uint_instruction_count; + desc->StaticFlowControlCount = This->static_flow_control_count; + desc->DynamicFlowControlCount = This->dynamic_flow_control_count; + desc->MacroInstructionCount = 0; + desc->ArrayInstructionCount = This->array_instruction_count; + desc->CutInstructionCount = This->cut_instruction_count; + desc->EmitInstructionCount = This->emit_instruction_count; + desc->GSOutputTopology = This->gs_output_topology; + desc->GSMaxOutputVertexCount = This->gs_max_output_vertex_count; + desc->InputPrimitive = This->input_primitive; + desc->PatchConstantParameters = This->pcsg ? This->pcsg->element_count : 0; + desc->cGSInstanceCount = 0; + desc->cControlPoints = This->c_control_points; + desc->HSOutputPrimitive = This->hs_output_primitive; + desc->HSPartitioning = This->hs_prtitioning; + desc->TessellatorDomain = This->tessellator_domain; + desc->cBarrierInstructions = 0; + desc->cInterlockedInstructions = 0; + desc->cTextureStoreInstructions = 0; + + return S_OK; +} + +static struct ID3D11ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetConstantBufferByIndex( + ID3D11ShaderReflection *iface, UINT index) +{ + struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); + + TRACE("iface %p, index %u\n", iface, index); + + if (index >= This->constant_buffer_count) + { + WARN("Invalid argument specified\n"); + return &null_constant_buffer.ID3D11ShaderReflectionConstantBuffer_iface; + } + + return &This->constant_buffers[index].ID3D11ShaderReflectionConstantBuffer_iface; +} + +static struct ID3D11ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetConstantBufferByName( + ID3D11ShaderReflection *iface, LPCSTR name) +{ + struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); + unsigned int i; + + TRACE("iface %p, name %s\n", iface, debugstr_a(name)); + + if (!name) + { + WARN("Invalid argument specified\n"); + return &null_constant_buffer.ID3D11ShaderReflectionConstantBuffer_iface; + } + + for (i = 0; i < This->constant_buffer_count; ++i) + { + struct d3dcompiler_shader_reflection_constant_buffer *d = &This->constant_buffers[i]; + + if (!strcmp(d->name, name)) + { + TRACE("Returning ID3D11ShaderReflectionConstantBuffer %p.\n", d); + return &d->ID3D11ShaderReflectionConstantBuffer_iface; + } + } + + WARN("Invalid name specified\n"); + + return &null_constant_buffer.ID3D11ShaderReflectionConstantBuffer_iface; +} + +static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetResourceBindingDesc( + ID3D11ShaderReflection *iface, UINT index, D3D11_SHADER_INPUT_BIND_DESC *desc) +{ + struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); + + TRACE("iface %p, index %u, desc %p\n", iface, index, desc); + + if (!desc || index >= This->bound_resource_count) + { + WARN("Invalid argument specified\n"); + return E_INVALIDARG; + } + + *desc = This->bound_resources[index]; + + return S_OK; +} + +static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetInputParameterDesc( + ID3D11ShaderReflection *iface, UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc) +{ + struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); + + TRACE("iface %p, index %u, desc %p\n", iface, index, desc); + + if (!desc || !This->isgn || index >= This->isgn->element_count) + { + WARN("Invalid argument specified\n"); + return E_INVALIDARG; + } + + *desc = This->isgn->elements[index]; + + return S_OK; +} + +static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetOutputParameterDesc( + ID3D11ShaderReflection *iface, UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc) +{ + struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); + + TRACE("iface %p, index %u, desc %p\n", iface, index, desc); + + if (!desc || !This->osgn || index >= This->osgn->element_count) + { + WARN("Invalid argument specified\n"); + return E_INVALIDARG; + } + + *desc = This->osgn->elements[index]; + + return S_OK; +} + +static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetPatchConstantParameterDesc( + ID3D11ShaderReflection *iface, UINT index, D3D11_SIGNATURE_PARAMETER_DESC *desc) +{ + struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); + + TRACE("iface %p, index %u, desc %p\n", iface, index, desc); + + if (!desc || !This->pcsg || index >= This->pcsg->element_count) + { + WARN("Invalid argument specified\n"); + return E_INVALIDARG; + } + + *desc = This->pcsg->elements[index]; + + return S_OK; +} + +static struct ID3D11ShaderReflectionVariable * STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetVariableByName( + ID3D11ShaderReflection *iface, LPCSTR name) +{ + struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); + unsigned int i, k; + + TRACE("iface %p, name %s\n", iface, debugstr_a(name)); + + if (!name) + { + WARN("Invalid name specified\n"); + return &null_variable.ID3D11ShaderReflectionVariable_iface; + } + + for (i = 0; i < This->constant_buffer_count; ++i) + { + struct d3dcompiler_shader_reflection_constant_buffer *cb = &This->constant_buffers[i]; + + for (k = 0; k < cb->variable_count; ++k) + { + struct d3dcompiler_shader_reflection_variable *v = &cb->variables[k]; + + if (!strcmp(v->name, name)) + { + TRACE("Returning ID3D11ShaderReflectionVariable %p.\n", v); + return &v->ID3D11ShaderReflectionVariable_iface; + } + } + } + + WARN("Invalid name specified\n"); + + return &null_variable.ID3D11ShaderReflectionVariable_iface; +} + +static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetResourceBindingDescByName( + ID3D11ShaderReflection *iface, LPCSTR name, D3D11_SHADER_INPUT_BIND_DESC *desc) +{ + struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); + unsigned int i; + + TRACE("iface %p, name %s, desc %p\n", iface, debugstr_a(name), desc); + + if (!desc || !name) + { + WARN("Invalid argument specified\n"); + return E_INVALIDARG; + } + + for (i = 0; i < This->bound_resource_count; ++i) + { + D3D11_SHADER_INPUT_BIND_DESC *d = &This->bound_resources[i]; + + if (!strcmp(d->Name, name)) + { + TRACE("Returning D3D11_SHADER_INPUT_BIND_DESC %p.\n", d); + *desc = *d; + return S_OK; + } + } + + WARN("Invalid name specified\n"); + + return E_INVALIDARG; +} + +static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetMovInstructionCount( + ID3D11ShaderReflection *iface) +{ + struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); + + TRACE("iface %p\n", iface); + + return This->mov_instruction_count; +} + +static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetMovcInstructionCount( + ID3D11ShaderReflection *iface) +{ + FIXME("iface %p stub!\n", iface); + + return 0; +} + +static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetConversionInstructionCount( + ID3D11ShaderReflection *iface) +{ + struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); + + TRACE("iface %p\n", iface); + + return This->conversion_instruction_count; +} + +static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetBitwiseInstructionCount( + ID3D11ShaderReflection *iface) +{ + FIXME("iface %p stub!\n", iface); + + return 0; +} + +static D3D_PRIMITIVE STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetGSInputPrimitive( + ID3D11ShaderReflection *iface) +{ + FIXME("iface %p stub!\n", iface); + + return 0; +} + +static BOOL STDMETHODCALLTYPE d3dcompiler_shader_reflection_IsSampleFrequencyShader( + ID3D11ShaderReflection *iface) +{ + FIXME("iface %p stub!\n", iface); + + return 0; +} + +static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetNumInterfaceSlots( + ID3D11ShaderReflection *iface) +{ + FIXME("iface %p stub!\n", iface); + + return 0; +} + +static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetMinFeatureLevel( + ID3D11ShaderReflection *iface, D3D_FEATURE_LEVEL *level) +{ + FIXME("iface %p, level %p stub!\n", iface, level); + + return E_NOTIMPL; +} + +static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetThreadGroupSize( + ID3D11ShaderReflection *iface, UINT *sizex, UINT *sizey, UINT *sizez) +{ + FIXME("iface %p, sizex %p, sizey %p, sizez %p stub!\n", iface, sizex, sizey, sizez); + + return 0; +} + +static const struct ID3D11ShaderReflectionVtbl d3dcompiler_shader_reflection_vtbl = +{ + /* IUnknown methods */ + d3dcompiler_shader_reflection_QueryInterface, + d3dcompiler_shader_reflection_AddRef, + d3dcompiler_shader_reflection_Release, + /* ID3D11ShaderReflection methods */ + d3dcompiler_shader_reflection_GetDesc, + d3dcompiler_shader_reflection_GetConstantBufferByIndex, + d3dcompiler_shader_reflection_GetConstantBufferByName, + d3dcompiler_shader_reflection_GetResourceBindingDesc, + d3dcompiler_shader_reflection_GetInputParameterDesc, + d3dcompiler_shader_reflection_GetOutputParameterDesc, + d3dcompiler_shader_reflection_GetPatchConstantParameterDesc, + d3dcompiler_shader_reflection_GetVariableByName, + d3dcompiler_shader_reflection_GetResourceBindingDescByName, + d3dcompiler_shader_reflection_GetMovInstructionCount, + d3dcompiler_shader_reflection_GetMovcInstructionCount, + d3dcompiler_shader_reflection_GetConversionInstructionCount, + d3dcompiler_shader_reflection_GetBitwiseInstructionCount, + d3dcompiler_shader_reflection_GetGSInputPrimitive, + d3dcompiler_shader_reflection_IsSampleFrequencyShader, + d3dcompiler_shader_reflection_GetNumInterfaceSlots, + d3dcompiler_shader_reflection_GetMinFeatureLevel, + d3dcompiler_shader_reflection_GetThreadGroupSize, +}; + +/* ID3D11ShaderReflectionConstantBuffer methods */ + +static inline struct d3dcompiler_shader_reflection_constant_buffer *impl_from_ID3D11ShaderReflectionConstantBuffer(ID3D11ShaderReflectionConstantBuffer *iface) +{ + return CONTAINING_RECORD(iface, struct d3dcompiler_shader_reflection_constant_buffer, ID3D11ShaderReflectionConstantBuffer_iface); +} + +static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_constant_buffer_GetDesc( + ID3D11ShaderReflectionConstantBuffer *iface, D3D11_SHADER_BUFFER_DESC *desc) +{ + struct d3dcompiler_shader_reflection_constant_buffer *This = impl_from_ID3D11ShaderReflectionConstantBuffer(iface); + + TRACE("iface %p, desc %p\n", iface, desc); + + if (This == &null_constant_buffer) + { + WARN("Null constant buffer specified\n"); + return E_FAIL; + } + + if (!desc) + { + WARN("Invalid argument specified\n"); + return E_FAIL; + } + + desc->Name = This->name; + desc->Type = This->type; + desc->Variables = This->variable_count; + desc->Size = This->size; + desc->uFlags = This->flags; + + return S_OK; +} + +static ID3D11ShaderReflectionVariable * STDMETHODCALLTYPE d3dcompiler_shader_reflection_constant_buffer_GetVariableByIndex( + ID3D11ShaderReflectionConstantBuffer *iface, UINT index) +{ + struct d3dcompiler_shader_reflection_constant_buffer *This = impl_from_ID3D11ShaderReflectionConstantBuffer(iface); + + TRACE("iface %p, index %u\n", iface, index); + + if (index >= This->variable_count) + { + WARN("Invalid index specified\n"); + return &null_variable.ID3D11ShaderReflectionVariable_iface; + } + + return &This->variables[index].ID3D11ShaderReflectionVariable_iface; +} + +static ID3D11ShaderReflectionVariable * STDMETHODCALLTYPE d3dcompiler_shader_reflection_constant_buffer_GetVariableByName( + ID3D11ShaderReflectionConstantBuffer *iface, LPCSTR name) +{ + struct d3dcompiler_shader_reflection_constant_buffer *This = impl_from_ID3D11ShaderReflectionConstantBuffer(iface); + unsigned int i; + + TRACE("iface %p, name %s\n", iface, debugstr_a(name)); + + if (!name) + { + WARN("Invalid argument specified\n"); + return &null_variable.ID3D11ShaderReflectionVariable_iface; + } + + for (i = 0; i < This->variable_count; ++i) + { + struct d3dcompiler_shader_reflection_variable *v = &This->variables[i]; + + if (!strcmp(v->name, name)) + { + TRACE("Returning ID3D11ShaderReflectionVariable %p.\n", v); + return &v->ID3D11ShaderReflectionVariable_iface; + } + } + + WARN("Invalid name specified\n"); + + return &null_variable.ID3D11ShaderReflectionVariable_iface; +} + +static const struct ID3D11ShaderReflectionConstantBufferVtbl d3dcompiler_shader_reflection_constant_buffer_vtbl = +{ + /* ID3D11ShaderReflectionConstantBuffer methods */ + d3dcompiler_shader_reflection_constant_buffer_GetDesc, + d3dcompiler_shader_reflection_constant_buffer_GetVariableByIndex, + d3dcompiler_shader_reflection_constant_buffer_GetVariableByName, +}; + +/* ID3D11ShaderReflectionVariable methods */ + +static inline struct d3dcompiler_shader_reflection_variable *impl_from_ID3D11ShaderReflectionVariable(ID3D11ShaderReflectionVariable *iface) +{ + return CONTAINING_RECORD(iface, struct d3dcompiler_shader_reflection_variable, ID3D11ShaderReflectionVariable_iface); +} + +static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_variable_GetDesc( + ID3D11ShaderReflectionVariable *iface, D3D11_SHADER_VARIABLE_DESC *desc) +{ + struct d3dcompiler_shader_reflection_variable *This = impl_from_ID3D11ShaderReflectionVariable(iface); + + TRACE("iface %p, desc %p\n", iface, desc); + + if (This == &null_variable) + { + WARN("Null variable specified\n"); + return E_FAIL; + } + + if (!desc) + { + WARN("Invalid argument specified\n"); + return E_FAIL; + } + + desc->Name = This->name; + desc->StartOffset = This->start_offset; + desc->Size = This->size; + desc->uFlags = This->flags; + desc->DefaultValue = This->default_value; + + return S_OK; +} + +static ID3D11ShaderReflectionType * STDMETHODCALLTYPE d3dcompiler_shader_reflection_variable_GetType( + ID3D11ShaderReflectionVariable *iface) +{ + struct d3dcompiler_shader_reflection_variable *This = impl_from_ID3D11ShaderReflectionVariable(iface); + + TRACE("iface %p\n", iface); + + return &This->type->ID3D11ShaderReflectionType_iface; +} + +static ID3D11ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3dcompiler_shader_reflection_variable_GetBuffer( + ID3D11ShaderReflectionVariable *iface) +{ + struct d3dcompiler_shader_reflection_variable *This = impl_from_ID3D11ShaderReflectionVariable(iface); + + TRACE("iface %p\n", iface); + + return &This->constant_buffer->ID3D11ShaderReflectionConstantBuffer_iface; +} + +static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_variable_GetInterfaceSlot( + ID3D11ShaderReflectionVariable *iface, UINT index) +{ + FIXME("iface %p, index %u stub!\n", iface, index); + + return 0; +} + +static const struct ID3D11ShaderReflectionVariableVtbl d3dcompiler_shader_reflection_variable_vtbl = +{ + /* ID3D11ShaderReflectionVariable methods */ + d3dcompiler_shader_reflection_variable_GetDesc, + d3dcompiler_shader_reflection_variable_GetType, + d3dcompiler_shader_reflection_variable_GetBuffer, + d3dcompiler_shader_reflection_variable_GetInterfaceSlot, +}; + +/* ID3D11ShaderReflectionType methods */ + +static inline struct d3dcompiler_shader_reflection_type *impl_from_ID3D11ShaderReflectionType(ID3D11ShaderReflectionType *iface) +{ + return CONTAINING_RECORD(iface, struct d3dcompiler_shader_reflection_type, ID3D11ShaderReflectionType_iface); +} + +static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_GetDesc( + ID3D11ShaderReflectionType *iface, D3D11_SHADER_TYPE_DESC *desc) +{ + struct d3dcompiler_shader_reflection_type *This = impl_from_ID3D11ShaderReflectionType(iface); + + TRACE("iface %p, desc %p\n", iface, desc); + + if (This == &null_type) + { + WARN("Null type specified\n"); + return E_FAIL; + } + + if (!desc) + { + WARN("Invalid argument specified\n"); + return E_FAIL; + } + + *desc = This->desc; + + return S_OK; +} + +static ID3D11ShaderReflectionType * STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_GetMemberTypeByIndex( + ID3D11ShaderReflectionType *iface, UINT index) +{ + struct d3dcompiler_shader_reflection_type *This = impl_from_ID3D11ShaderReflectionType(iface); + + TRACE("iface %p, index %u\n", iface, index); + + if (index >= This->desc.Members) + { + WARN("Invalid index specified\n"); + return &null_type.ID3D11ShaderReflectionType_iface; + } + + return &This->members[index].type->ID3D11ShaderReflectionType_iface; +} + +static ID3D11ShaderReflectionType * STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_GetMemberTypeByName( + ID3D11ShaderReflectionType *iface, LPCSTR name) +{ + struct d3dcompiler_shader_reflection_type *This = impl_from_ID3D11ShaderReflectionType(iface); + unsigned int i; + + TRACE("iface %p, name %s\n", iface, debugstr_a(name)); + + if (!name) + { + WARN("Invalid argument specified\n"); + return &null_type.ID3D11ShaderReflectionType_iface; + } + + for (i = 0; i < This->desc.Members; ++i) + { + struct d3dcompiler_shader_reflection_type_member *member = &This->members[i]; + + if (!strcmp(member->name, name)) + { + TRACE("Returning ID3D11ShaderReflectionType %p.\n", member->type); + return &member->type->ID3D11ShaderReflectionType_iface; + } + } + + WARN("Invalid name specified\n"); + + return &null_type.ID3D11ShaderReflectionType_iface; +} + +static LPCSTR STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_GetMemberTypeName( + ID3D11ShaderReflectionType *iface, UINT index) +{ + struct d3dcompiler_shader_reflection_type *This = impl_from_ID3D11ShaderReflectionType(iface); + + TRACE("iface %p, index %u\n", iface, index); + + if (This == &null_type) + { + WARN("Null type specified\n"); + return "$Invalid"; + } + + if (index >= This->desc.Members) + { + WARN("Invalid index specified\n"); + return NULL; + } + + return This->members[index].name; +} + +static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_IsEqual( + ID3D11ShaderReflectionType *iface, ID3D11ShaderReflectionType *type) +{ + struct d3dcompiler_shader_reflection_type *This = impl_from_ID3D11ShaderReflectionType(iface); + + TRACE("iface %p, type %p\n", iface, type); + + if (This == &null_type) + { + WARN("Null type specified\n"); + return E_FAIL; + } + + if (iface == type) + return S_OK; + + return S_FALSE; +} + +static ID3D11ShaderReflectionType * STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_GetSubType( + ID3D11ShaderReflectionType *iface) +{ + FIXME("iface %p stub!\n", iface); + + return NULL; +} + +static ID3D11ShaderReflectionType * STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_GetBaseClass( + ID3D11ShaderReflectionType *iface) +{ + FIXME("iface %p stub!\n", iface); + + return NULL; +} + +static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_GetNumInterfaces( + ID3D11ShaderReflectionType *iface) +{ + FIXME("iface %p stub!\n", iface); + + return 0; +} + +static ID3D11ShaderReflectionType * STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_GetInterfaceByIndex( + ID3D11ShaderReflectionType *iface, UINT index) +{ + FIXME("iface %p, index %u stub!\n", iface, index); + + return NULL; +} + +static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_IsOfType( + ID3D11ShaderReflectionType *iface, ID3D11ShaderReflectionType *type) +{ + FIXME("iface %p, type %p stub!\n", iface, type); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_type_ImplementsInterface( + ID3D11ShaderReflectionType *iface, ID3D11ShaderReflectionType *base) +{ + FIXME("iface %p, base %p stub!\n", iface, base); + + return E_NOTIMPL; +} + +static const struct ID3D11ShaderReflectionTypeVtbl d3dcompiler_shader_reflection_type_vtbl = +{ + /* ID3D11ShaderReflectionType methods */ + d3dcompiler_shader_reflection_type_GetDesc, + d3dcompiler_shader_reflection_type_GetMemberTypeByIndex, + d3dcompiler_shader_reflection_type_GetMemberTypeByName, + d3dcompiler_shader_reflection_type_GetMemberTypeName, + d3dcompiler_shader_reflection_type_IsEqual, + d3dcompiler_shader_reflection_type_GetSubType, + d3dcompiler_shader_reflection_type_GetBaseClass, + d3dcompiler_shader_reflection_type_GetNumInterfaces, + d3dcompiler_shader_reflection_type_GetInterfaceByIndex, + d3dcompiler_shader_reflection_type_IsOfType, + d3dcompiler_shader_reflection_type_ImplementsInterface, +}; + +static HRESULT d3dcompiler_parse_stat(struct d3dcompiler_shader_reflection *r, const char *data, DWORD data_size) +{ + const char *ptr = data; + DWORD size = data_size >> 2; + + TRACE("Size %u\n", size); + + read_dword(&ptr, &r->instruction_count); + TRACE("InstructionCount: %u\n", r->instruction_count); + + read_dword(&ptr, &r->temp_register_count); + TRACE("TempRegisterCount: %u\n", r->temp_register_count); + + skip_dword_unknown(&ptr, 1); + + read_dword(&ptr, &r->dcl_count); + TRACE("DclCount: %u\n", r->dcl_count); + + read_dword(&ptr, &r->float_instruction_count); + TRACE("FloatInstructionCount: %u\n", r->float_instruction_count); + + read_dword(&ptr, &r->int_instruction_count); + TRACE("IntInstructionCount: %u\n", r->int_instruction_count); + + read_dword(&ptr, &r->uint_instruction_count); + TRACE("UintInstructionCount: %u\n", r->uint_instruction_count); + + read_dword(&ptr, &r->static_flow_control_count); + TRACE("StaticFlowControlCount: %u\n", r->static_flow_control_count); + + read_dword(&ptr, &r->dynamic_flow_control_count); + TRACE("DynamicFlowControlCount: %u\n", r->dynamic_flow_control_count); + + skip_dword_unknown(&ptr, 1); + + read_dword(&ptr, &r->temp_array_count); + TRACE("TempArrayCount: %u\n", r->temp_array_count); + + read_dword(&ptr, &r->array_instruction_count); + TRACE("ArrayInstructionCount: %u\n", r->array_instruction_count); + + read_dword(&ptr, &r->cut_instruction_count); + TRACE("CutInstructionCount: %u\n", r->cut_instruction_count); + + read_dword(&ptr, &r->emit_instruction_count); + TRACE("EmitInstructionCount: %u\n", r->emit_instruction_count); + + read_dword(&ptr, &r->texture_normal_instructions); + TRACE("TextureNormalInstructions: %u\n", r->texture_normal_instructions); + + read_dword(&ptr, &r->texture_load_instructions); + TRACE("TextureLoadInstructions: %u\n", r->texture_load_instructions); + + read_dword(&ptr, &r->texture_comp_instructions); + TRACE("TextureCompInstructions: %u\n", r->texture_comp_instructions); + + read_dword(&ptr, &r->texture_bias_instructions); + TRACE("TextureBiasInstructions: %u\n", r->texture_bias_instructions); + + read_dword(&ptr, &r->texture_gradient_instructions); + TRACE("TextureGradientInstructions: %u\n", r->texture_gradient_instructions); + + read_dword(&ptr, &r->mov_instruction_count); + TRACE("MovInstructionCount: %u\n", r->mov_instruction_count); + + skip_dword_unknown(&ptr, 1); + + read_dword(&ptr, &r->conversion_instruction_count); + TRACE("ConversionInstructionCount: %u\n", r->conversion_instruction_count); + + skip_dword_unknown(&ptr, 1); + + read_dword(&ptr, &r->input_primitive); + TRACE("InputPrimitive: %x\n", r->input_primitive); + + read_dword(&ptr, &r->gs_output_topology); + TRACE("GSOutputTopology: %x\n", r->gs_output_topology); + + read_dword(&ptr, &r->gs_max_output_vertex_count); + TRACE("GSMaxOutputVertexCount: %u\n", r->gs_max_output_vertex_count); + + skip_dword_unknown(&ptr, 3); + + /* dx10 stat size */ + if (size == 29) return S_OK; + + skip_dword_unknown(&ptr, 1); + + read_dword(&ptr, &r->c_control_points); + TRACE("cControlPoints: %u\n", r->c_control_points); + + read_dword(&ptr, &r->hs_output_primitive); + TRACE("HSOutputPrimitive: %x\n", r->hs_output_primitive); + + read_dword(&ptr, &r->hs_prtitioning); + TRACE("HSPartitioning: %x\n", r->hs_prtitioning); + + read_dword(&ptr, &r->tessellator_domain); + TRACE("TessellatorDomain: %x\n", r->tessellator_domain); + + skip_dword_unknown(&ptr, 3); + + /* dx11 stat size */ + if (size == 37) return S_OK; + + FIXME("Unhandled size %u\n", size); + + return E_FAIL; +} + +static HRESULT d3dcompiler_parse_type_members(struct d3dcompiler_shader_reflection *ref, + struct d3dcompiler_shader_reflection_type_member *member, const char *data, const char **ptr) +{ + DWORD offset; + + read_dword(ptr, &offset); + if (!copy_name(data + offset, &member->name)) + { + ERR("Failed to copy name.\n"); + return E_OUTOFMEMORY; + } + TRACE("Member name: %s.\n", debugstr_a(member->name)); + + read_dword(ptr, &offset); + TRACE("Member type offset: %x\n", offset); + + member->type = get_reflection_type(ref, data, offset); + if (!member->type) + { + ERR("Failed to get member type\n"); + HeapFree(GetProcessHeap(), 0, member->name); + return E_FAIL; + } + + read_dword(ptr, &member->offset); + TRACE("Member offset %x\n", member->offset); + + return S_OK; +} + +static HRESULT d3dcompiler_parse_type(struct d3dcompiler_shader_reflection_type *type, const char *data, DWORD offset) +{ + const char *ptr = data + offset; + DWORD temp; + D3D11_SHADER_TYPE_DESC *desc; + unsigned int i; + struct d3dcompiler_shader_reflection_type_member *members = NULL; + HRESULT hr; + DWORD member_offset; + + desc = &type->desc; + + read_dword(&ptr, &temp); + desc->Class = temp & 0xffff; + desc->Type = temp >> 16; + TRACE("Class %s, Type %s\n", debug_d3dcompiler_shader_variable_class(desc->Class), + debug_d3dcompiler_shader_variable_type(desc->Type)); + + read_dword(&ptr, &temp); + desc->Rows = temp & 0xffff; + desc->Columns = temp >> 16; + TRACE("Rows %u, Columns %u\n", desc->Rows, desc->Columns); + + read_dword(&ptr, &temp); + desc->Elements = temp & 0xffff; + desc->Members = temp >> 16; + TRACE("Elements %u, Members %u\n", desc->Elements, desc->Members); + + read_dword(&ptr, &member_offset); + TRACE("Member Offset %u\n", member_offset); + + if ((type->reflection->target & D3DCOMPILER_SHADER_TARGET_VERSION_MASK) >= 0x500) + skip_dword_unknown(&ptr, 4); + + if (desc->Members) + { + const char *ptr2 = data + member_offset; + + members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*members) * desc->Members); + if (!members) + { + ERR("Failed to allocate type memory.\n"); + return E_OUTOFMEMORY; + } + + for (i = 0; i < desc->Members; ++i) + { + hr = d3dcompiler_parse_type_members(type->reflection, &members[i], data, &ptr2); + if (hr != S_OK) + { + FIXME("Failed to parse type members.\n"); + goto err_out; + } + } + } + + type->members = members; + + return S_OK; + +err_out: + for (i = 0; i < desc->Members; ++i) + { + free_type_member(&members[i]); + } + HeapFree(GetProcessHeap(), 0, members); + return hr; +} + +static struct d3dcompiler_shader_reflection_type *get_reflection_type(struct d3dcompiler_shader_reflection *reflection, const char *data, DWORD offset) +{ + struct d3dcompiler_shader_reflection_type *type; + struct wine_rb_entry *entry; + HRESULT hr; + + entry = wine_rb_get(&reflection->types, &offset); + if (entry) + { + TRACE("Returning existing type.\n"); + return WINE_RB_ENTRY_VALUE(entry, struct d3dcompiler_shader_reflection_type, entry); + } + + type = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*type)); + if (!type) + return NULL; + + type->ID3D11ShaderReflectionType_iface.lpVtbl = &d3dcompiler_shader_reflection_type_vtbl; + type->id = offset; + type->reflection = reflection; + + hr = d3dcompiler_parse_type(type, data, offset); + if (FAILED(hr)) + { + ERR("Failed to parse type info, hr %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, type); + return NULL; + } + + if (wine_rb_put(&reflection->types, &offset, &type->entry) == -1) + { + ERR("Failed to insert type entry.\n"); + HeapFree(GetProcessHeap(), 0, type); + return NULL; + } + + return type; +} + +static HRESULT d3dcompiler_parse_variables(struct d3dcompiler_shader_reflection_constant_buffer *cb, + const char *data, DWORD data_size, const char *ptr) +{ + struct d3dcompiler_shader_reflection_variable *variables; + unsigned int i; + HRESULT hr; + + variables = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, cb->variable_count * sizeof(*variables)); + if (!variables) + { + ERR("Failed to allocate variables memory.\n"); + return E_OUTOFMEMORY; + } + + for (i = 0; i < cb->variable_count; i++) + { + struct d3dcompiler_shader_reflection_variable *v = &variables[i]; + DWORD offset; + + v->ID3D11ShaderReflectionVariable_iface.lpVtbl = &d3dcompiler_shader_reflection_variable_vtbl; + v->constant_buffer = cb; + + read_dword(&ptr, &offset); + if (!copy_name(data + offset, &v->name)) + { + ERR("Failed to copy name.\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + TRACE("Variable name: %s.\n", debugstr_a(v->name)); + + read_dword(&ptr, &v->start_offset); + TRACE("Variable offset: %u\n", v->start_offset); + + read_dword(&ptr, &v->size); + TRACE("Variable size: %u\n", v->size); + + read_dword(&ptr, &v->flags); + TRACE("Variable flags: %u\n", v->flags); + + read_dword(&ptr, &offset); + TRACE("Variable type offset: %x\n", offset); + v->type = get_reflection_type(cb->reflection, data, offset); + if (!v->type) + { + ERR("Failed to get type.\n"); + hr = E_FAIL; + goto err_out; + } + + read_dword(&ptr, &offset); + TRACE("Variable default value offset: %x\n", offset); + if (!copy_value(data + offset, &v->default_value, offset ? v->size : 0)) + { + ERR("Failed to copy name.\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + + if ((cb->reflection->target & D3DCOMPILER_SHADER_TARGET_VERSION_MASK) >= 0x500) + skip_dword_unknown(&ptr, 4); + } + + cb->variables = variables; + + return S_OK; + +err_out: + for (i = 0; i < cb->variable_count; i++) + { + free_variable(&variables[i]); + } + HeapFree(GetProcessHeap(), 0, variables); + return hr; +} + +static HRESULT d3dcompiler_parse_rdef(struct d3dcompiler_shader_reflection *r, const char *data, DWORD data_size) +{ + const char *ptr = data; + DWORD size = data_size >> 2; + DWORD offset, cbuffer_offset, resource_offset, creator_offset; + unsigned int i, string_data_offset, string_data_size; + char *string_data = NULL, *creator = NULL; + D3D11_SHADER_INPUT_BIND_DESC *bound_resources = NULL; + struct d3dcompiler_shader_reflection_constant_buffer *constant_buffers = NULL; + HRESULT hr; + + TRACE("Size %u\n", size); + + read_dword(&ptr, &r->constant_buffer_count); + TRACE("Constant buffer count: %u\n", r->constant_buffer_count); + + read_dword(&ptr, &cbuffer_offset); + TRACE("Constant buffer offset: %#x\n", cbuffer_offset); + + read_dword(&ptr, &r->bound_resource_count); + TRACE("Bound resource count: %u\n", r->bound_resource_count); + + read_dword(&ptr, &resource_offset); + TRACE("Bound resource offset: %#x\n", resource_offset); + + read_dword(&ptr, &r->target); + TRACE("Target: %#x\n", r->target); + + read_dword(&ptr, &r->flags); + TRACE("Flags: %u\n", r->flags); + + read_dword(&ptr, &creator_offset); + TRACE("Creator at offset %#x.\n", creator_offset); + + if (!copy_name(data + creator_offset, &creator)) + { + ERR("Failed to copy name.\n"); + return E_OUTOFMEMORY; + } + TRACE("Creator: %s.\n", debugstr_a(creator)); + + /* todo: Parse RD11 */ + if ((r->target & D3DCOMPILER_SHADER_TARGET_VERSION_MASK) >= 0x500) + { + skip_dword_unknown(&ptr, 8); + } + + if (r->bound_resource_count) + { + /* 8 for each bind desc */ + string_data_offset = resource_offset + r->bound_resource_count * 8 * sizeof(DWORD); + string_data_size = (cbuffer_offset ? cbuffer_offset : creator_offset) - string_data_offset; + + string_data = HeapAlloc(GetProcessHeap(), 0, string_data_size); + if (!string_data) + { + ERR("Failed to allocate string data memory.\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + memcpy(string_data, data + string_data_offset, string_data_size); + + bound_resources = HeapAlloc(GetProcessHeap(), 0, r->bound_resource_count * sizeof(*bound_resources)); + if (!bound_resources) + { + ERR("Failed to allocate resources memory.\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + + ptr = data + resource_offset; + for (i = 0; i < r->bound_resource_count; i++) + { + D3D11_SHADER_INPUT_BIND_DESC *desc = &bound_resources[i]; + + read_dword(&ptr, &offset); + desc->Name = string_data + (offset - string_data_offset); + TRACE("Input bind Name: %s\n", debugstr_a(desc->Name)); + + read_dword(&ptr, &desc->Type); + TRACE("Input bind Type: %#x\n", desc->Type); + + read_dword(&ptr, &desc->ReturnType); + TRACE("Input bind ReturnType: %#x\n", desc->ReturnType); + + read_dword(&ptr, &desc->Dimension); + TRACE("Input bind Dimension: %#x\n", desc->Dimension); + + read_dword(&ptr, &desc->NumSamples); + TRACE("Input bind NumSamples: %u\n", desc->NumSamples); + + read_dword(&ptr, &desc->BindPoint); + TRACE("Input bind BindPoint: %u\n", desc->BindPoint); + + read_dword(&ptr, &desc->BindCount); + TRACE("Input bind BindCount: %u\n", desc->BindCount); + + read_dword(&ptr, &desc->uFlags); + TRACE("Input bind uFlags: %u\n", desc->uFlags); + } + } + + if (r->constant_buffer_count) + { + constant_buffers = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, r->constant_buffer_count * sizeof(*constant_buffers)); + if (!constant_buffers) + { + ERR("Failed to allocate constant buffer memory.\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + + ptr = data + cbuffer_offset; + for (i = 0; i < r->constant_buffer_count; i++) + { + struct d3dcompiler_shader_reflection_constant_buffer *cb = &constant_buffers[i]; + + cb->ID3D11ShaderReflectionConstantBuffer_iface.lpVtbl = &d3dcompiler_shader_reflection_constant_buffer_vtbl; + cb->reflection = r; + + read_dword(&ptr, &offset); + if (!copy_name(data + offset, &cb->name)) + { + ERR("Failed to copy name.\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + TRACE("Name: %s.\n", debugstr_a(cb->name)); + + read_dword(&ptr, &cb->variable_count); + TRACE("Variable count: %u\n", cb->variable_count); + + read_dword(&ptr, &offset); + TRACE("Variable offset: %x\n", offset); + + hr = d3dcompiler_parse_variables(cb, data, data_size, data + offset); + if (hr != S_OK) + { + FIXME("Failed to parse variables.\n"); + goto err_out; + } + + read_dword(&ptr, &cb->size); + TRACE("Cbuffer size: %u\n", cb->size); + + read_dword(&ptr, &cb->flags); + TRACE("Cbuffer flags: %u\n", cb->flags); + + read_dword(&ptr, &cb->type); + TRACE("Cbuffer type: %#x\n", cb->type); + } + } + + r->creator = creator; + r->resource_string = string_data; + r->bound_resources = bound_resources; + r->constant_buffers = constant_buffers; + + return S_OK; + +err_out: + for (i = 0; i < r->constant_buffer_count; ++i) + { + free_constant_buffer(&constant_buffers[i]); + } + HeapFree(GetProcessHeap(), 0, constant_buffers); + HeapFree(GetProcessHeap(), 0, bound_resources); + HeapFree(GetProcessHeap(), 0, string_data); + HeapFree(GetProcessHeap(), 0, creator); + + return hr; +} + +static HRESULT d3dcompiler_parse_signature(struct d3dcompiler_shader_signature *s, struct dxbc_section *section, DWORD target) +{ + D3D11_SIGNATURE_PARAMETER_DESC *d; + unsigned int string_data_offset; + unsigned int string_data_size; + const char *ptr = section->data; + char *string_data; + unsigned int i; + DWORD count; + enum D3DCOMPILER_SIGNATURE_ELEMENT_SIZE element_size; + + switch (section->tag) + { + case TAG_OSG5: + element_size = D3DCOMPILER_SIGNATURE_ELEMENT_SIZE7; + break; + + case TAG_ISGN: + case TAG_OSGN: + case TAG_PCSG: + element_size = D3DCOMPILER_SIGNATURE_ELEMENT_SIZE6; + break; + + default: + FIXME("Unhandled section %s!\n", debugstr_an((const char *)§ion->tag, 4)); + element_size = D3DCOMPILER_SIGNATURE_ELEMENT_SIZE6; + break; + } + + read_dword(&ptr, &count); + TRACE("%u elements\n", count); + + skip_dword_unknown(&ptr, 1); + + d = HeapAlloc(GetProcessHeap(), 0, count * sizeof(*d)); + if (!d) + { + ERR("Failed to allocate signature memory.\n"); + return E_OUTOFMEMORY; + } + + /* 2 DWORDs for the header, element_size for each element. */ + string_data_offset = 2 * sizeof(DWORD) + count * element_size * sizeof(DWORD); + string_data_size = section->data_size - string_data_offset; + + string_data = HeapAlloc(GetProcessHeap(), 0, string_data_size); + if (!string_data) + { + ERR("Failed to allocate string data memory.\n"); + HeapFree(GetProcessHeap(), 0, d); + return E_OUTOFMEMORY; + } + memcpy(string_data, section->data + string_data_offset, string_data_size); + + for (i = 0; i < count; ++i) + { + UINT name_offset; + DWORD mask; + + if (element_size == D3DCOMPILER_SIGNATURE_ELEMENT_SIZE7) + { + read_dword(&ptr, &d[i].Stream); + } + else + { + d[i].Stream = 0; + } + + read_dword(&ptr, &name_offset); + d[i].SemanticName = string_data + (name_offset - string_data_offset); + read_dword(&ptr, &d[i].SemanticIndex); + read_dword(&ptr, &d[i].SystemValueType); + read_dword(&ptr, &d[i].ComponentType); + read_dword(&ptr, &d[i].Register); + read_dword(&ptr, &mask); + d[i].ReadWriteMask = (mask >> 8) & 0xff; + d[i].Mask = mask & 0xff; + + /* pixel shaders have a special handling for SystemValueType in the output signature */ + if (((target & D3DCOMPILER_SHADER_TARGET_SHADERTYPE_MASK) == 0xffff0000) && (section->tag == TAG_OSG5 || section->tag == TAG_OSGN)) + { + TRACE("Pixelshader output signature fixup.\n"); + + if (d[i].Register == 0xffffffff) + { + if (!strcasecmp(d[i].SemanticName, "sv_depth")) d[i].SystemValueType = D3D_NAME_DEPTH; + if (!strcasecmp(d[i].SemanticName, "sv_coverage")) d[i].SystemValueType = D3D_NAME_COVERAGE; + if (!strcasecmp(d[i].SemanticName, "sv_depthgreaterequal")) d[i].SystemValueType = D3D_NAME_DEPTH_GREATER_EQUAL; + if (!strcasecmp(d[i].SemanticName, "sv_depthlessequal")) d[i].SystemValueType = D3D_NAME_DEPTH_LESS_EQUAL; + } + else + { + d[i].SystemValueType = D3D_NAME_TARGET; + } + } + + TRACE("semantic: %s, semantic idx: %u, sysval_semantic %#x, " + "type %u, register idx: %u, use_mask %#x, input_mask %#x, stream %u\n", + debugstr_a(d[i].SemanticName), d[i].SemanticIndex, d[i].SystemValueType, + d[i].ComponentType, d[i].Register, d[i].Mask, d[i].ReadWriteMask, d[i].Stream); + } + + s->elements = d; + s->element_count = count; + s->string_data = string_data; + + return S_OK; +} + +static HRESULT d3dcompiler_parse_shdr(struct d3dcompiler_shader_reflection *r, const char *data, DWORD data_size) +{ + const char *ptr = data; + + read_dword(&ptr, &r->version); + TRACE("Shader version: %u\n", r->version); + + /* todo: Check if anything else is needed from the shdr or shex blob. */ + + return S_OK; +} + +static HRESULT d3dcompiler_shader_reflection_init(struct d3dcompiler_shader_reflection *reflection, + const void *data, SIZE_T data_size) +{ + struct dxbc src_dxbc; + HRESULT hr; + unsigned int i; + + reflection->ID3D11ShaderReflection_iface.lpVtbl = &d3dcompiler_shader_reflection_vtbl; + reflection->refcount = 1; + + if (wine_rb_init(&reflection->types, &d3dcompiler_shader_reflection_type_rb_functions) == -1) + { + ERR("Failed to initialize type rbtree.\n"); + return E_FAIL; + } + + hr = dxbc_parse(data, data_size, &src_dxbc); + if (FAILED(hr)) + { + WARN("Failed to parse reflection\n"); + return hr; + } + + for (i = 0; i < src_dxbc.count; ++i) + { + struct dxbc_section *section = &src_dxbc.sections[i]; + + switch (section->tag) + { + case TAG_RDEF: + hr = d3dcompiler_parse_rdef(reflection, section->data, section->data_size); + if (FAILED(hr)) + { + WARN("Failed to parse RDEF section.\n"); + goto err_out; + } + break; + + case TAG_ISGN: + reflection->isgn = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*reflection->isgn)); + if (!reflection->isgn) + { + ERR("Failed to allocate ISGN memory.\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + + hr = d3dcompiler_parse_signature(reflection->isgn, section, reflection->target); + if (FAILED(hr)) + { + WARN("Failed to parse section ISGN.\n"); + goto err_out; + } + break; + + case TAG_OSG5: + case TAG_OSGN: + reflection->osgn = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*reflection->osgn)); + if (!reflection->osgn) + { + ERR("Failed to allocate OSGN memory.\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + + hr = d3dcompiler_parse_signature(reflection->osgn, section, reflection->target); + if (FAILED(hr)) + { + WARN("Failed to parse section OSGN.\n"); + goto err_out; + } + break; + + case TAG_PCSG: + reflection->pcsg = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*reflection->pcsg)); + if (!reflection->pcsg) + { + ERR("Failed to allocate PCSG memory.\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + + hr = d3dcompiler_parse_signature(reflection->pcsg, section, reflection->target); + if (FAILED(hr)) + { + WARN("Failed to parse section PCSG.\n"); + goto err_out; + } + break; + + case TAG_SHEX: + case TAG_SHDR: + hr = d3dcompiler_parse_shdr(reflection, section->data, section->data_size); + if (FAILED(hr)) + { + WARN("Failed to parse SHDR section.\n"); + goto err_out; + } + break; + + case TAG_STAT: + hr = d3dcompiler_parse_stat(reflection, section->data, section->data_size); + if (FAILED(hr)) + { + WARN("Failed to parse section STAT.\n"); + goto err_out; + } + break; + + default: + FIXME("Unhandled section %s!\n", debugstr_an((const char *)§ion->tag, 4)); + break; + } + } + + dxbc_destroy(&src_dxbc); + + return hr; + +err_out: + reflection_cleanup(reflection); + dxbc_destroy(&src_dxbc); + + return hr; +} + +HRESULT WINAPI D3DReflect(const void *data, SIZE_T data_size, REFIID riid, void **reflector) +{ + struct d3dcompiler_shader_reflection *object; + HRESULT hr; + const DWORD *temp = data; + + TRACE("data %p, data_size %lu, riid %s, blob %p\n", data, data_size, debugstr_guid(riid), reflector); + + if (!data || data_size < 32) + { + WARN("Invalid argument supplied.\n"); + return D3DERR_INVALIDCALL; + } + + if (temp[6] != data_size) + { + WARN("Wrong size supplied.\n"); + return E_FAIL; + } + + if (!IsEqualGUID(riid, &IID_ID3D11ShaderReflection)) + { + WARN("Wrong riid %s, accept only %s!\n", debugstr_guid(riid), debugstr_guid(&IID_ID3D11ShaderReflection)); + return E_NOINTERFACE; + } + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + return E_OUTOFMEMORY; + + hr = d3dcompiler_shader_reflection_init(object, data, data_size); + if (FAILED(hr)) + { + WARN("Failed to initialize shader reflection\n"); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + + *reflector = object; + + TRACE("Created ID3D11ShaderReflection %p\n", object); + + return S_OK; +} diff --git a/dll/directx/wine/d3dcompiler_43/utils.c b/dll/directx/wine/d3dcompiler_43/utils.c new file mode 100644 index 00000000000..0f61f61746b --- /dev/null +++ b/dll/directx/wine/d3dcompiler_43/utils.c @@ -0,0 +1,2538 @@ +/* + * Copyright 2008 Stefan Dösinger + * Copyright 2009 Matteo Bruni + * Copyright 2008-2009 Henri Verbeet for CodeWeavers + * Copyright 2010 Rico Schüller + * Copyright 2012 Matteo Bruni for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "config.h" +#include "wine/port.h" + +#include + +#include "d3dcompiler_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(d3dcompiler); + +#define WINE_D3DCOMPILER_TO_STR(x) case x: return #x + +const char *debug_d3dcompiler_shader_variable_class(D3D_SHADER_VARIABLE_CLASS c) +{ + switch (c) + { + WINE_D3DCOMPILER_TO_STR(D3D_SVC_SCALAR); + WINE_D3DCOMPILER_TO_STR(D3D_SVC_VECTOR); + WINE_D3DCOMPILER_TO_STR(D3D_SVC_MATRIX_ROWS); + WINE_D3DCOMPILER_TO_STR(D3D_SVC_MATRIX_COLUMNS); + WINE_D3DCOMPILER_TO_STR(D3D_SVC_OBJECT); + WINE_D3DCOMPILER_TO_STR(D3D_SVC_STRUCT); + WINE_D3DCOMPILER_TO_STR(D3D_SVC_INTERFACE_CLASS); + WINE_D3DCOMPILER_TO_STR(D3D_SVC_INTERFACE_POINTER); + default: + FIXME("Unrecognized D3D_SHADER_VARIABLE_CLASS %#x.\n", c); + return "unrecognized"; + } +} + +const char *debug_d3dcompiler_shader_variable_type(D3D_SHADER_VARIABLE_TYPE t) +{ + switch (t) + { + WINE_D3DCOMPILER_TO_STR(D3D_SVT_VOID); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_BOOL); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_INT); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_FLOAT); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_STRING); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_TEXTURE); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_TEXTURE1D); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_TEXTURE2D); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_TEXTURE3D); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_TEXTURECUBE); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_SAMPLER); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_PIXELSHADER); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_VERTEXSHADER); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_UINT); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_UINT8); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_GEOMETRYSHADER); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_RASTERIZER); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_DEPTHSTENCIL); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_BLEND); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_BUFFER); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_CBUFFER); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_TBUFFER); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_TEXTURE1DARRAY); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_TEXTURE2DARRAY); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_RENDERTARGETVIEW); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_DEPTHSTENCILVIEW); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_TEXTURE2DMS); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_TEXTURE2DMSARRAY); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_TEXTURECUBEARRAY); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_HULLSHADER); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_DOMAINSHADER); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_INTERFACE_POINTER); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_COMPUTESHADER); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_DOUBLE); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_RWTEXTURE1D); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_RWTEXTURE1DARRAY); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_RWTEXTURE2D); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_RWTEXTURE2DARRAY); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_RWTEXTURE3D); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_RWBUFFER); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_BYTEADDRESS_BUFFER); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_RWBYTEADDRESS_BUFFER); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_STRUCTURED_BUFFER); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_RWSTRUCTURED_BUFFER); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_APPEND_STRUCTURED_BUFFER); + WINE_D3DCOMPILER_TO_STR(D3D_SVT_CONSUME_STRUCTURED_BUFFER); + default: + FIXME("Unrecognized D3D_SHADER_VARIABLE_TYPE %#x.\n", t); + return "unrecognized"; + } +} + +const char *debug_d3dcompiler_d3d_blob_part(D3D_BLOB_PART part) +{ + switch(part) + { + WINE_D3DCOMPILER_TO_STR(D3D_BLOB_INPUT_SIGNATURE_BLOB); + WINE_D3DCOMPILER_TO_STR(D3D_BLOB_OUTPUT_SIGNATURE_BLOB); + WINE_D3DCOMPILER_TO_STR(D3D_BLOB_INPUT_AND_OUTPUT_SIGNATURE_BLOB); + WINE_D3DCOMPILER_TO_STR(D3D_BLOB_PATCH_CONSTANT_SIGNATURE_BLOB); + WINE_D3DCOMPILER_TO_STR(D3D_BLOB_ALL_SIGNATURE_BLOB); + WINE_D3DCOMPILER_TO_STR(D3D_BLOB_DEBUG_INFO); + WINE_D3DCOMPILER_TO_STR(D3D_BLOB_LEGACY_SHADER); + WINE_D3DCOMPILER_TO_STR(D3D_BLOB_XNA_PREPASS_SHADER); + WINE_D3DCOMPILER_TO_STR(D3D_BLOB_XNA_SHADER); + WINE_D3DCOMPILER_TO_STR(D3D_BLOB_TEST_ALTERNATE_SHADER); + WINE_D3DCOMPILER_TO_STR(D3D_BLOB_TEST_COMPILE_DETAILS); + WINE_D3DCOMPILER_TO_STR(D3D_BLOB_TEST_COMPILE_PERF); + default: + FIXME("Unrecognized D3D_BLOB_PART %#x\n", part); + return "unrecognized"; + } +} + +const char *debug_print_srcmod(DWORD mod) +{ + switch (mod) + { + WINE_D3DCOMPILER_TO_STR(BWRITERSPSM_NEG); + WINE_D3DCOMPILER_TO_STR(BWRITERSPSM_BIAS); + WINE_D3DCOMPILER_TO_STR(BWRITERSPSM_BIASNEG); + WINE_D3DCOMPILER_TO_STR(BWRITERSPSM_SIGN); + WINE_D3DCOMPILER_TO_STR(BWRITERSPSM_SIGNNEG); + WINE_D3DCOMPILER_TO_STR(BWRITERSPSM_COMP); + WINE_D3DCOMPILER_TO_STR(BWRITERSPSM_X2); + WINE_D3DCOMPILER_TO_STR(BWRITERSPSM_X2NEG); + WINE_D3DCOMPILER_TO_STR(BWRITERSPSM_DZ); + WINE_D3DCOMPILER_TO_STR(BWRITERSPSM_DW); + WINE_D3DCOMPILER_TO_STR(BWRITERSPSM_ABS); + WINE_D3DCOMPILER_TO_STR(BWRITERSPSM_ABSNEG); + WINE_D3DCOMPILER_TO_STR(BWRITERSPSM_NOT); + default: + FIXME("Unrecognized source modifier %#x.\n", mod); + return "unrecognized_src_mod"; + } +} + +#undef WINE_D3DCOMPILER_TO_STR + +const char *debug_print_dstmod(DWORD mod) +{ + switch (mod) + { + case 0: + return ""; + case BWRITERSPDM_SATURATE: + return "_sat"; + case BWRITERSPDM_PARTIALPRECISION: + return "_pp"; + case BWRITERSPDM_MSAMPCENTROID: + return "_centroid"; + case BWRITERSPDM_SATURATE | BWRITERSPDM_PARTIALPRECISION: + return "_sat_pp"; + case BWRITERSPDM_SATURATE | BWRITERSPDM_MSAMPCENTROID: + return "_sat_centroid"; + case BWRITERSPDM_PARTIALPRECISION | BWRITERSPDM_MSAMPCENTROID: + return "_pp_centroid"; + case BWRITERSPDM_SATURATE | BWRITERSPDM_PARTIALPRECISION | BWRITERSPDM_MSAMPCENTROID: + return "_sat_pp_centroid"; + default: + return "Unexpected modifier\n"; + } +} + +const char *debug_print_shift(DWORD shift) +{ + static const char * const shiftstrings[] = + { + "", + "_x2", + "_x4", + "_x8", + "_x16", + "_x32", + "", + "", + "", + "", + "", + "", + "_d16", + "_d8", + "_d4", + "_d2", + }; + return shiftstrings[shift]; +} + +static const char *get_regname(const struct shader_reg *reg) +{ + switch (reg->type) + { + case BWRITERSPR_TEMP: + return wine_dbg_sprintf("r%u", reg->regnum); + case BWRITERSPR_INPUT: + return wine_dbg_sprintf("v%u", reg->regnum); + case BWRITERSPR_CONST: + return wine_dbg_sprintf("c%u", reg->regnum); + case BWRITERSPR_ADDR: + return wine_dbg_sprintf("a%u", reg->regnum); + case BWRITERSPR_TEXTURE: + return wine_dbg_sprintf("t%u", reg->regnum); + case BWRITERSPR_RASTOUT: + switch (reg->regnum) + { + case BWRITERSRO_POSITION: return "oPos"; + case BWRITERSRO_FOG: return "oFog"; + case BWRITERSRO_POINT_SIZE: return "oPts"; + default: return "Unexpected RASTOUT"; + } + case BWRITERSPR_ATTROUT: + return wine_dbg_sprintf("oD%u", reg->regnum); + case BWRITERSPR_TEXCRDOUT: + return wine_dbg_sprintf("oT%u", reg->regnum); + case BWRITERSPR_OUTPUT: + return wine_dbg_sprintf("o%u", reg->regnum); + case BWRITERSPR_CONSTINT: + return wine_dbg_sprintf("i%u", reg->regnum); + case BWRITERSPR_COLOROUT: + return wine_dbg_sprintf("oC%u", reg->regnum); + case BWRITERSPR_DEPTHOUT: + return "oDepth"; + case BWRITERSPR_SAMPLER: + return wine_dbg_sprintf("s%u", reg->regnum); + case BWRITERSPR_CONSTBOOL: + return wine_dbg_sprintf("b%u", reg->regnum); + case BWRITERSPR_LOOP: + return "aL"; + case BWRITERSPR_MISCTYPE: + switch (reg->regnum) + { + case 0: return "vPos"; + case 1: return "vFace"; + default: return "unexpected misctype"; + } + case BWRITERSPR_LABEL: + return wine_dbg_sprintf("l%u", reg->regnum); + case BWRITERSPR_PREDICATE: + return wine_dbg_sprintf("p%u", reg->regnum); + default: + return wine_dbg_sprintf("unknown regname %#x", reg->type); + } +} + +static const char *debug_print_writemask(DWORD mask) +{ + char ret[6]; + unsigned char pos = 1; + + if(mask == BWRITERSP_WRITEMASK_ALL) return ""; + ret[0] = '.'; + if(mask & BWRITERSP_WRITEMASK_0) ret[pos++] = 'x'; + if(mask & BWRITERSP_WRITEMASK_1) ret[pos++] = 'y'; + if(mask & BWRITERSP_WRITEMASK_2) ret[pos++] = 'z'; + if(mask & BWRITERSP_WRITEMASK_3) ret[pos++] = 'w'; + ret[pos] = 0; + + return wine_dbg_sprintf("%s", ret); +} + +static const char *debug_print_swizzle(DWORD arg) +{ + char ret[6]; + unsigned int i; + DWORD swizzle[4]; + + switch (arg) + { + case BWRITERVS_NOSWIZZLE: + return ""; + case BWRITERVS_SWIZZLE_X: + return ".x"; + case BWRITERVS_SWIZZLE_Y: + return ".y"; + case BWRITERVS_SWIZZLE_Z: + return ".z"; + case BWRITERVS_SWIZZLE_W: + return ".w"; + } + + swizzle[0] = (arg >> (BWRITERVS_SWIZZLE_SHIFT + 0)) & 0x03; + swizzle[1] = (arg >> (BWRITERVS_SWIZZLE_SHIFT + 2)) & 0x03; + swizzle[2] = (arg >> (BWRITERVS_SWIZZLE_SHIFT + 4)) & 0x03; + swizzle[3] = (arg >> (BWRITERVS_SWIZZLE_SHIFT + 6)) & 0x03; + + ret[0] = '.'; + for (i = 0; i < 4; ++i) + { + switch (swizzle[i]) + { + case 0: ret[1 + i] = 'x'; break; + case 1: ret[1 + i] = 'y'; break; + case 2: ret[1 + i] = 'z'; break; + case 3: ret[1 + i] = 'w'; break; + } + } + ret[5] = '\0'; + + return wine_dbg_sprintf("%s", ret); +} + +static const char *debug_print_relarg(const struct shader_reg *reg) +{ + const char *short_swizzle; + if (!reg->rel_reg) return ""; + + short_swizzle = debug_print_swizzle(reg->rel_reg->u.swizzle); + + if (reg->rel_reg->type == BWRITERSPR_ADDR) + return wine_dbg_sprintf("[a%u%s]", reg->rel_reg->regnum, short_swizzle); + else if(reg->rel_reg->type == BWRITERSPR_LOOP && reg->rel_reg->regnum == 0) + return wine_dbg_sprintf("[aL%s]", short_swizzle); + else + return "Unexpected relative addressing argument"; +} + +const char *debug_print_dstreg(const struct shader_reg *reg) +{ + return wine_dbg_sprintf("%s%s%s", get_regname(reg), + debug_print_relarg(reg), + debug_print_writemask(reg->u.writemask)); +} + +const char *debug_print_srcreg(const struct shader_reg *reg) +{ + switch (reg->srcmod) + { + case BWRITERSPSM_NONE: + return wine_dbg_sprintf("%s%s%s", get_regname(reg), + debug_print_relarg(reg), + debug_print_swizzle(reg->u.swizzle)); + case BWRITERSPSM_NEG: + return wine_dbg_sprintf("-%s%s%s", get_regname(reg), + debug_print_relarg(reg), + debug_print_swizzle(reg->u.swizzle)); + case BWRITERSPSM_BIAS: + return wine_dbg_sprintf("%s%s_bias%s", get_regname(reg), + debug_print_relarg(reg), + debug_print_swizzle(reg->u.swizzle)); + case BWRITERSPSM_BIASNEG: + return wine_dbg_sprintf("-%s%s_bias%s", get_regname(reg), + debug_print_relarg(reg), + debug_print_swizzle(reg->u.swizzle)); + case BWRITERSPSM_SIGN: + return wine_dbg_sprintf("%s%s_bx2%s", get_regname(reg), + debug_print_relarg(reg), + debug_print_swizzle(reg->u.swizzle)); + case BWRITERSPSM_SIGNNEG: + return wine_dbg_sprintf("-%s%s_bx2%s", get_regname(reg), + debug_print_relarg(reg), + debug_print_swizzle(reg->u.swizzle)); + case BWRITERSPSM_COMP: + return wine_dbg_sprintf("1 - %s%s%s", get_regname(reg), + debug_print_relarg(reg), + debug_print_swizzle(reg->u.swizzle)); + case BWRITERSPSM_X2: + return wine_dbg_sprintf("%s%s_x2%s", get_regname(reg), + debug_print_relarg(reg), + debug_print_swizzle(reg->u.swizzle)); + case BWRITERSPSM_X2NEG: + return wine_dbg_sprintf("-%s%s_x2%s", get_regname(reg), + debug_print_relarg(reg), + debug_print_swizzle(reg->u.swizzle)); + case BWRITERSPSM_DZ: + return wine_dbg_sprintf("%s%s_dz%s", get_regname(reg), + debug_print_relarg(reg), + debug_print_swizzle(reg->u.swizzle)); + case BWRITERSPSM_DW: + return wine_dbg_sprintf("%s%s_dw%s", get_regname(reg), + debug_print_relarg(reg), + debug_print_swizzle(reg->u.swizzle)); + case BWRITERSPSM_ABS: + return wine_dbg_sprintf("%s%s_abs%s", get_regname(reg), + debug_print_relarg(reg), + debug_print_swizzle(reg->u.swizzle)); + case BWRITERSPSM_ABSNEG: + return wine_dbg_sprintf("-%s%s_abs%s", get_regname(reg), + debug_print_relarg(reg), + debug_print_swizzle(reg->u.swizzle)); + case BWRITERSPSM_NOT: + return wine_dbg_sprintf("!%s%s%s", get_regname(reg), + debug_print_relarg(reg), + debug_print_swizzle(reg->u.swizzle)); + } + return "Unknown modifier"; +} + +const char *debug_print_comp(DWORD comp) +{ + switch (comp) + { + case BWRITER_COMPARISON_NONE: return ""; + case BWRITER_COMPARISON_GT: return "_gt"; + case BWRITER_COMPARISON_EQ: return "_eq"; + case BWRITER_COMPARISON_GE: return "_ge"; + case BWRITER_COMPARISON_LT: return "_lt"; + case BWRITER_COMPARISON_NE: return "_ne"; + case BWRITER_COMPARISON_LE: return "_le"; + default: return "_unknown"; + } +} + +const char *debug_print_opcode(DWORD opcode) +{ + switch (opcode) + { + case BWRITERSIO_NOP: return "nop"; + case BWRITERSIO_MOV: return "mov"; + case BWRITERSIO_ADD: return "add"; + case BWRITERSIO_SUB: return "sub"; + case BWRITERSIO_MAD: return "mad"; + case BWRITERSIO_MUL: return "mul"; + case BWRITERSIO_RCP: return "rcp"; + case BWRITERSIO_RSQ: return "rsq"; + case BWRITERSIO_DP3: return "dp3"; + case BWRITERSIO_DP4: return "dp4"; + case BWRITERSIO_MIN: return "min"; + case BWRITERSIO_MAX: return "max"; + case BWRITERSIO_SLT: return "slt"; + case BWRITERSIO_SGE: return "sge"; + case BWRITERSIO_EXP: return "exp"; + case BWRITERSIO_LOG: return "log"; + case BWRITERSIO_LIT: return "lit"; + case BWRITERSIO_DST: return "dst"; + case BWRITERSIO_LRP: return "lrp"; + case BWRITERSIO_FRC: return "frc"; + case BWRITERSIO_M4x4: return "m4x4"; + case BWRITERSIO_M4x3: return "m4x3"; + case BWRITERSIO_M3x4: return "m3x4"; + case BWRITERSIO_M3x3: return "m3x3"; + case BWRITERSIO_M3x2: return "m3x2"; + case BWRITERSIO_CALL: return "call"; + case BWRITERSIO_CALLNZ: return "callnz"; + case BWRITERSIO_LOOP: return "loop"; + case BWRITERSIO_RET: return "ret"; + case BWRITERSIO_ENDLOOP: return "endloop"; + case BWRITERSIO_LABEL: return "label"; + case BWRITERSIO_DCL: return "dcl"; + case BWRITERSIO_POW: return "pow"; + case BWRITERSIO_CRS: return "crs"; + case BWRITERSIO_SGN: return "sgn"; + case BWRITERSIO_ABS: return "abs"; + case BWRITERSIO_NRM: return "nrm"; + case BWRITERSIO_SINCOS: return "sincos"; + case BWRITERSIO_REP: return "rep"; + case BWRITERSIO_ENDREP: return "endrep"; + case BWRITERSIO_IF: return "if"; + case BWRITERSIO_IFC: return "ifc"; + case BWRITERSIO_ELSE: return "else"; + case BWRITERSIO_ENDIF: return "endif"; + case BWRITERSIO_BREAK: return "break"; + case BWRITERSIO_BREAKC: return "breakc"; + case BWRITERSIO_MOVA: return "mova"; + case BWRITERSIO_DEFB: return "defb"; + case BWRITERSIO_DEFI: return "defi"; + case BWRITERSIO_TEXCOORD: return "texcoord"; + case BWRITERSIO_TEXKILL: return "texkill"; + case BWRITERSIO_TEX: return "tex"; + case BWRITERSIO_TEXBEM: return "texbem"; + case BWRITERSIO_TEXBEML: return "texbeml"; + case BWRITERSIO_TEXREG2AR: return "texreg2ar"; + case BWRITERSIO_TEXREG2GB: return "texreg2gb"; + case BWRITERSIO_TEXM3x2PAD: return "texm3x2pad"; + case BWRITERSIO_TEXM3x2TEX: return "texm3x2tex"; + case BWRITERSIO_TEXM3x3PAD: return "texm3x3pad"; + case BWRITERSIO_TEXM3x3TEX: return "texm3x3tex"; + case BWRITERSIO_TEXM3x3SPEC: return "texm3x3vspec"; + case BWRITERSIO_TEXM3x3VSPEC: return "texm3x3vspec"; + case BWRITERSIO_EXPP: return "expp"; + case BWRITERSIO_LOGP: return "logp"; + case BWRITERSIO_CND: return "cnd"; + case BWRITERSIO_DEF: return "def"; + case BWRITERSIO_TEXREG2RGB: return "texreg2rgb"; + case BWRITERSIO_TEXDP3TEX: return "texdp3tex"; + case BWRITERSIO_TEXM3x2DEPTH: return "texm3x2depth"; + case BWRITERSIO_TEXDP3: return "texdp3"; + case BWRITERSIO_TEXM3x3: return "texm3x3"; + case BWRITERSIO_TEXDEPTH: return "texdepth"; + case BWRITERSIO_CMP: return "cmp"; + case BWRITERSIO_BEM: return "bem"; + case BWRITERSIO_DP2ADD: return "dp2add"; + case BWRITERSIO_DSX: return "dsx"; + case BWRITERSIO_DSY: return "dsy"; + case BWRITERSIO_TEXLDD: return "texldd"; + case BWRITERSIO_SETP: return "setp"; + case BWRITERSIO_TEXLDL: return "texldl"; + case BWRITERSIO_BREAKP: return "breakp"; + case BWRITERSIO_PHASE: return "phase"; + + case BWRITERSIO_TEXLDP: return "texldp"; + case BWRITERSIO_TEXLDB: return "texldb"; + + default: return "unknown"; + } +} + +void skip_dword_unknown(const char **ptr, unsigned int count) +{ + unsigned int i; + DWORD d; + + FIXME("Skipping %u unknown DWORDs:\n", count); + for (i = 0; i < count; ++i) + { + read_dword(ptr, &d); + FIXME("\t0x%08x\n", d); + } +} + +static void write_dword_unknown(char **ptr, DWORD d) +{ + FIXME("Writing unknown DWORD 0x%08x\n", d); + write_dword(ptr, d); +} + +HRESULT dxbc_add_section(struct dxbc *dxbc, DWORD tag, const char *data, DWORD data_size) +{ + TRACE("dxbc %p, tag %s, size %#x.\n", dxbc, debugstr_an((const char *)&tag, 4), data_size); + + if (dxbc->count >= dxbc->size) + { + struct dxbc_section *new_sections; + DWORD new_size = dxbc->size << 1; + + new_sections = HeapReAlloc(GetProcessHeap(), 0, dxbc->sections, new_size * sizeof(*dxbc->sections)); + if (!new_sections) + { + ERR("Failed to allocate dxbc section memory\n"); + return E_OUTOFMEMORY; + } + + dxbc->sections = new_sections; + dxbc->size = new_size; + } + + dxbc->sections[dxbc->count].tag = tag; + dxbc->sections[dxbc->count].data_size = data_size; + dxbc->sections[dxbc->count].data = data; + ++dxbc->count; + + return S_OK; +} + +HRESULT dxbc_init(struct dxbc *dxbc, UINT size) +{ + TRACE("dxbc %p, size %u.\n", dxbc, size); + + /* use a good starting value for the size if none specified */ + if (!size) size = 2; + + dxbc->sections = HeapAlloc(GetProcessHeap(), 0, size * sizeof(*dxbc->sections)); + if (!dxbc->sections) + { + ERR("Failed to allocate dxbc section memory\n"); + return E_OUTOFMEMORY; + } + + dxbc->size = size; + dxbc->count = 0; + + return S_OK; +} + +HRESULT dxbc_parse(const char *data, SIZE_T data_size, struct dxbc *dxbc) +{ + const char *ptr = data; + HRESULT hr; + unsigned int i; + DWORD tag, total_size, chunk_count; + + if (!data) + { + WARN("No data supplied.\n"); + return E_FAIL; + } + + read_dword(&ptr, &tag); + TRACE("tag: %s.\n", debugstr_an((const char *)&tag, 4)); + + if (tag != TAG_DXBC) + { + WARN("Wrong tag.\n"); + return E_FAIL; + } + + /* checksum? */ + skip_dword_unknown(&ptr, 4); + + skip_dword_unknown(&ptr, 1); + + read_dword(&ptr, &total_size); + TRACE("total size: %#x\n", total_size); + + if (data_size != total_size) + { + WARN("Wrong size supplied.\n"); + return D3DERR_INVALIDCALL; + } + + read_dword(&ptr, &chunk_count); + TRACE("chunk count: %#x\n", chunk_count); + + hr = dxbc_init(dxbc, chunk_count); + if (FAILED(hr)) + { + WARN("Failed to init dxbc\n"); + return hr; + } + + for (i = 0; i < chunk_count; ++i) + { + DWORD chunk_tag, chunk_size; + const char *chunk_ptr; + DWORD chunk_offset; + + read_dword(&ptr, &chunk_offset); + TRACE("chunk %u at offset %#x\n", i, chunk_offset); + + chunk_ptr = data + chunk_offset; + + read_dword(&chunk_ptr, &chunk_tag); + read_dword(&chunk_ptr, &chunk_size); + + hr = dxbc_add_section(dxbc, chunk_tag, chunk_ptr, chunk_size); + if (FAILED(hr)) + { + WARN("Failed to add section to dxbc\n"); + return hr; + } + } + + return hr; +} + +void dxbc_destroy(struct dxbc *dxbc) +{ + TRACE("dxbc %p.\n", dxbc); + + HeapFree(GetProcessHeap(), 0, dxbc->sections); +} + +HRESULT dxbc_write_blob(struct dxbc *dxbc, ID3DBlob **blob) +{ + DWORD size = 32, offset = size + 4 * dxbc->count; + ID3DBlob *object; + HRESULT hr; + char *ptr; + unsigned int i; + + TRACE("dxbc %p, blob %p.\n", dxbc, blob); + + for (i = 0; i < dxbc->count; ++i) + { + size += 12 + dxbc->sections[i].data_size; + } + + hr = D3DCreateBlob(size, &object); + if (FAILED(hr)) + { + WARN("Failed to create blob\n"); + return hr; + } + + ptr = ID3D10Blob_GetBufferPointer(object); + + write_dword(&ptr, TAG_DXBC); + + /* signature(?) */ + write_dword_unknown(&ptr, 0); + write_dword_unknown(&ptr, 0); + write_dword_unknown(&ptr, 0); + write_dword_unknown(&ptr, 0); + + /* seems to be always 1 */ + write_dword_unknown(&ptr, 1); + + /* DXBC size */ + write_dword(&ptr, size); + + /* chunk count */ + write_dword(&ptr, dxbc->count); + + /* write the chunk offsets */ + for (i = 0; i < dxbc->count; ++i) + { + write_dword(&ptr, offset); + offset += 8 + dxbc->sections[i].data_size; + } + + /* write the chunks */ + for (i = 0; i < dxbc->count; ++i) + { + write_dword(&ptr, dxbc->sections[i].tag); + write_dword(&ptr, dxbc->sections[i].data_size); + memcpy(ptr, dxbc->sections[i].data, dxbc->sections[i].data_size); + ptr += dxbc->sections[i].data_size; + } + + TRACE("Created ID3DBlob %p\n", object); + + *blob = object; + + return S_OK; +} + +void compilation_message(struct compilation_messages *msg, const char *fmt, va_list args) +{ + char* buffer; + int rc, size; + + if (msg->capacity == 0) + { + msg->string = d3dcompiler_alloc(MESSAGEBUFFER_INITIAL_SIZE); + if (msg->string == NULL) + { + ERR("Error allocating memory for parser messages\n"); + return; + } + msg->capacity = MESSAGEBUFFER_INITIAL_SIZE; + } + + while (1) + { + rc = vsnprintf(msg->string + msg->size, + msg->capacity - msg->size, fmt, args); + + if (rc < 0 || rc >= msg->capacity - msg->size) + { + size = msg->capacity * 2; + buffer = d3dcompiler_realloc(msg->string, size); + if (buffer == NULL) + { + ERR("Error reallocating memory for parser messages\n"); + return; + } + msg->string = buffer; + msg->capacity = size; + } + else + { + TRACE("%s", msg->string + msg->size); + msg->size += rc; + return; + } + } +} + +BOOL add_declaration(struct hlsl_scope *scope, struct hlsl_ir_var *decl, BOOL local_var) +{ + struct hlsl_ir_var *var; + + LIST_FOR_EACH_ENTRY(var, &scope->vars, struct hlsl_ir_var, scope_entry) + { + if (!strcmp(decl->name, var->name)) + return FALSE; + } + if (local_var && scope->upper->upper == hlsl_ctx.globals) + { + /* Check whether the variable redefines a function parameter. */ + LIST_FOR_EACH_ENTRY(var, &scope->upper->vars, struct hlsl_ir_var, scope_entry) + { + if (!strcmp(decl->name, var->name)) + return FALSE; + } + } + + list_add_tail(&scope->vars, &decl->scope_entry); + return TRUE; +} + +struct hlsl_ir_var *get_variable(struct hlsl_scope *scope, const char *name) +{ + struct hlsl_ir_var *var; + + LIST_FOR_EACH_ENTRY(var, &scope->vars, struct hlsl_ir_var, scope_entry) + { + if (!strcmp(name, var->name)) + return var; + } + if (!scope->upper) + return NULL; + return get_variable(scope->upper, name); +} + +void free_declaration(struct hlsl_ir_var *decl) +{ + d3dcompiler_free((void *)decl->name); + d3dcompiler_free((void *)decl->semantic); + d3dcompiler_free(decl); +} + +BOOL add_func_parameter(struct list *list, struct parse_parameter *param, const struct source_location *loc) +{ + struct hlsl_ir_var *decl = d3dcompiler_alloc(sizeof(*decl)); + + if (!decl) + { + ERR("Out of memory.\n"); + return FALSE; + } + decl->node.type = HLSL_IR_VAR; + decl->node.data_type = param->type; + decl->node.loc = *loc; + decl->name = param->name; + decl->semantic = param->semantic; + decl->modifiers = param->modifiers; + + if (!add_declaration(hlsl_ctx.cur_scope, decl, FALSE)) + { + free_declaration(decl); + return FALSE; + } + list_add_tail(list, &decl->node.entry); + return TRUE; +} + +struct hlsl_type *new_hlsl_type(const char *name, enum hlsl_type_class type_class, + enum hlsl_base_type base_type, unsigned dimx, unsigned dimy) +{ + struct hlsl_type *type; + + type = d3dcompiler_alloc(sizeof(*type)); + if (!type) + { + ERR("Out of memory\n"); + return NULL; + } + type->name = name; + type->type = type_class; + type->base_type = base_type; + type->dimx = dimx; + type->dimy = dimy; + + list_add_tail(&hlsl_ctx.types, &type->entry); + + return type; +} + +struct hlsl_type *new_array_type(struct hlsl_type *basic_type, unsigned int array_size) +{ + struct hlsl_type *type = new_hlsl_type(NULL, HLSL_CLASS_ARRAY, HLSL_TYPE_FLOAT, 1, 1); + + if (!type) + return NULL; + + type->modifiers = basic_type->modifiers; + type->e.array.elements_count = array_size; + type->e.array.type = basic_type; + return type; +} + +struct hlsl_type *get_type(struct hlsl_scope *scope, const char *name, BOOL recursive) +{ + struct wine_rb_entry *entry = wine_rb_get(&scope->types, name); + if (entry) + return WINE_RB_ENTRY_VALUE(entry, struct hlsl_type, scope_entry); + + if (recursive && scope->upper) + return get_type(scope->upper, name, recursive); + return NULL; +} + +BOOL find_function(const char *name) +{ + return wine_rb_get(&hlsl_ctx.functions, name) != NULL; +} + +unsigned int components_count_type(struct hlsl_type *type) +{ + unsigned int count = 0; + struct hlsl_struct_field *field; + + if (type->type <= HLSL_CLASS_LAST_NUMERIC) + { + return type->dimx * type->dimy; + } + if (type->type == HLSL_CLASS_ARRAY) + { + return components_count_type(type->e.array.type) * type->e.array.elements_count; + } + if (type->type != HLSL_CLASS_STRUCT) + { + ERR("Unexpected data type %s.\n", debug_hlsl_type(type)); + return 0; + } + + LIST_FOR_EACH_ENTRY(field, type->e.elements, struct hlsl_struct_field, entry) + { + count += components_count_type(field->type); + } + return count; +} + +BOOL compare_hlsl_types(const struct hlsl_type *t1, const struct hlsl_type *t2) +{ + if (t1 == t2) + return TRUE; + + if (t1->type != t2->type) + return FALSE; + if (t1->base_type != t2->base_type) + return FALSE; + if (t1->base_type == HLSL_TYPE_SAMPLER && t1->sampler_dim != t2->sampler_dim) + return FALSE; + if ((t1->modifiers & HLSL_MODIFIERS_COMPARISON_MASK) + != (t2->modifiers & HLSL_MODIFIERS_COMPARISON_MASK)) + return FALSE; + if (t1->dimx != t2->dimx) + return FALSE; + if (t1->dimy != t2->dimy) + return FALSE; + if (t1->type == HLSL_CLASS_STRUCT) + { + struct list *t1cur, *t2cur; + struct hlsl_struct_field *t1field, *t2field; + + t1cur = list_head(t1->e.elements); + t2cur = list_head(t2->e.elements); + while (t1cur && t2cur) + { + t1field = LIST_ENTRY(t1cur, struct hlsl_struct_field, entry); + t2field = LIST_ENTRY(t2cur, struct hlsl_struct_field, entry); + if (!compare_hlsl_types(t1field->type, t2field->type)) + return FALSE; + if (strcmp(t1field->name, t2field->name)) + return FALSE; + t1cur = list_next(t1->e.elements, t1cur); + t2cur = list_next(t2->e.elements, t2cur); + } + if (t1cur != t2cur) + return FALSE; + } + if (t1->type == HLSL_CLASS_ARRAY) + return t1->e.array.elements_count == t2->e.array.elements_count + && compare_hlsl_types(t1->e.array.type, t2->e.array.type); + + return TRUE; +} + +struct hlsl_type *clone_hlsl_type(struct hlsl_type *old) +{ + struct hlsl_type *type; + struct hlsl_struct_field *old_field, *field; + + type = d3dcompiler_alloc(sizeof(*type)); + if (!type) + { + ERR("Out of memory\n"); + return NULL; + } + if (old->name) + { + type->name = d3dcompiler_strdup(old->name); + if (!type->name) + { + d3dcompiler_free(type); + return NULL; + } + } + type->type = old->type; + type->base_type = old->base_type; + type->dimx = old->dimx; + type->dimy = old->dimy; + type->modifiers = old->modifiers; + type->sampler_dim = old->sampler_dim; + switch (old->type) + { + case HLSL_CLASS_ARRAY: + type->e.array.type = old->e.array.type; + type->e.array.elements_count = old->e.array.elements_count; + break; + case HLSL_CLASS_STRUCT: + type->e.elements = d3dcompiler_alloc(sizeof(*type->e.elements)); + if (!type->e.elements) + { + d3dcompiler_free((void *)type->name); + d3dcompiler_free(type); + return NULL; + } + list_init(type->e.elements); + LIST_FOR_EACH_ENTRY(old_field, old->e.elements, struct hlsl_struct_field, entry) + { + field = d3dcompiler_alloc(sizeof(*field)); + if (!field) + { + LIST_FOR_EACH_ENTRY_SAFE(field, old_field, type->e.elements, struct hlsl_struct_field, entry) + { + d3dcompiler_free((void *)field->semantic); + d3dcompiler_free((void *)field->name); + d3dcompiler_free(field); + } + d3dcompiler_free(type->e.elements); + d3dcompiler_free((void *)type->name); + d3dcompiler_free(type); + return NULL; + } + field->type = clone_hlsl_type(old_field->type); + field->name = d3dcompiler_strdup(old_field->name); + if (old_field->semantic) + field->semantic = d3dcompiler_strdup(old_field->semantic); + field->modifiers = old_field->modifiers; + list_add_tail(type->e.elements, &field->entry); + } + break; + default: + break; + } + + list_add_tail(&hlsl_ctx.types, &type->entry); + return type; +} + +static BOOL convertible_data_type(struct hlsl_type *type) +{ + return type->type != HLSL_CLASS_OBJECT; +} + +BOOL compatible_data_types(struct hlsl_type *t1, struct hlsl_type *t2) +{ + if (!convertible_data_type(t1) || !convertible_data_type(t2)) + return FALSE; + + if (t1->type <= HLSL_CLASS_LAST_NUMERIC) + { + /* Scalar vars can be cast to pretty much everything */ + if (t1->dimx == 1 && t1->dimy == 1) + return TRUE; + + if (t1->type == HLSL_CLASS_VECTOR && t2->type == HLSL_CLASS_VECTOR) + return t1->dimx >= t2->dimx; + } + + /* The other way around is true too i.e. whatever to scalar */ + if (t2->type <= HLSL_CLASS_LAST_NUMERIC && t2->dimx == 1 && t2->dimy == 1) + return TRUE; + + if (t1->type == HLSL_CLASS_ARRAY) + { + if (compare_hlsl_types(t1->e.array.type, t2)) + /* e.g. float4[3] to float4 is allowed */ + return TRUE; + + if (t2->type == HLSL_CLASS_ARRAY || t2->type == HLSL_CLASS_STRUCT) + return components_count_type(t1) >= components_count_type(t2); + else + return components_count_type(t1) == components_count_type(t2); + } + + if (t1->type == HLSL_CLASS_STRUCT) + return components_count_type(t1) >= components_count_type(t2); + + if (t2->type == HLSL_CLASS_ARRAY || t2->type == HLSL_CLASS_STRUCT) + return components_count_type(t1) == components_count_type(t2); + + if (t1->type == HLSL_CLASS_MATRIX || t2->type == HLSL_CLASS_MATRIX) + { + if (t1->type == HLSL_CLASS_MATRIX && t2->type == HLSL_CLASS_MATRIX && t1->dimx >= t2->dimx && t1->dimy >= t2->dimy) + return TRUE; + + /* Matrix-vector conversion is apparently allowed if they have the same components count */ + if ((t1->type == HLSL_CLASS_VECTOR || t2->type == HLSL_CLASS_VECTOR) + && components_count_type(t1) == components_count_type(t2)) + return TRUE; + return FALSE; + } + + if (components_count_type(t1) >= components_count_type(t2)) + return TRUE; + return FALSE; +} + +static BOOL implicit_compatible_data_types(struct hlsl_type *t1, struct hlsl_type *t2) +{ + if (!convertible_data_type(t1) || !convertible_data_type(t2)) + return FALSE; + + if (t1->type <= HLSL_CLASS_LAST_NUMERIC) + { + /* Scalar vars can be converted to any other numeric data type */ + if (t1->dimx == 1 && t1->dimy == 1 && t2->type <= HLSL_CLASS_LAST_NUMERIC) + return TRUE; + /* The other way around is true too */ + if (t2->dimx == 1 && t2->dimy == 1 && t2->type <= HLSL_CLASS_LAST_NUMERIC) + return TRUE; + } + + if (t1->type == HLSL_CLASS_ARRAY && t2->type == HLSL_CLASS_ARRAY) + { + return components_count_type(t1) == components_count_type(t2); + } + + if ((t1->type == HLSL_CLASS_ARRAY && t2->type <= HLSL_CLASS_LAST_NUMERIC) + || (t1->type <= HLSL_CLASS_LAST_NUMERIC && t2->type == HLSL_CLASS_ARRAY)) + { + /* e.g. float4[3] to float4 is allowed */ + if (t1->type == HLSL_CLASS_ARRAY && compare_hlsl_types(t1->e.array.type, t2)) + return TRUE; + if (components_count_type(t1) == components_count_type(t2)) + return TRUE; + return FALSE; + } + + if (t1->type <= HLSL_CLASS_VECTOR && t2->type <= HLSL_CLASS_VECTOR) + { + if (t1->dimx >= t2->dimx) + return TRUE; + return FALSE; + } + + if (t1->type == HLSL_CLASS_MATRIX || t2->type == HLSL_CLASS_MATRIX) + { + if (t1->type == HLSL_CLASS_MATRIX && t2->type == HLSL_CLASS_MATRIX + && t1->dimx >= t2->dimx && t1->dimy >= t2->dimy) + return TRUE; + + /* Matrix-vector conversion is apparently allowed if they have the same components count */ + if ((t1->type == HLSL_CLASS_VECTOR || t2->type == HLSL_CLASS_VECTOR) + && components_count_type(t1) == components_count_type(t2)) + return TRUE; + return FALSE; + } + + if (t1->type == HLSL_CLASS_STRUCT && t2->type == HLSL_CLASS_STRUCT) + return compare_hlsl_types(t1, t2); + + return FALSE; +} + +static BOOL expr_compatible_data_types(struct hlsl_type *t1, struct hlsl_type *t2) +{ + if (t1->base_type > HLSL_TYPE_LAST_SCALAR || t2->base_type > HLSL_TYPE_LAST_SCALAR) + return FALSE; + + /* Scalar vars can be converted to pretty much everything */ + if ((t1->dimx == 1 && t1->dimy == 1) || (t2->dimx == 1 && t2->dimy == 1)) + return TRUE; + + if (t1->type == HLSL_CLASS_VECTOR && t2->type == HLSL_CLASS_VECTOR) + return TRUE; + + if (t1->type == HLSL_CLASS_MATRIX || t2->type == HLSL_CLASS_MATRIX) + { + /* Matrix-vector conversion is apparently allowed if either they have the same components + count or the matrix is nx1 or 1xn */ + if (t1->type == HLSL_CLASS_VECTOR || t2->type == HLSL_CLASS_VECTOR) + { + if (components_count_type(t1) == components_count_type(t2)) + return TRUE; + + return (t1->type == HLSL_CLASS_MATRIX && (t1->dimx == 1 || t1->dimy == 1)) + || (t2->type == HLSL_CLASS_MATRIX && (t2->dimx == 1 || t2->dimy == 1)); + } + + /* Both matrices */ + if ((t1->dimx >= t2->dimx && t1->dimy >= t2->dimy) + || (t1->dimx <= t2->dimx && t1->dimy <= t2->dimy)) + return TRUE; + } + + return FALSE; +} + +static enum hlsl_base_type expr_common_base_type(enum hlsl_base_type t1, enum hlsl_base_type t2) +{ + enum hlsl_base_type types[] = + { + HLSL_TYPE_BOOL, + HLSL_TYPE_INT, + HLSL_TYPE_UINT, + HLSL_TYPE_HALF, + HLSL_TYPE_FLOAT, + HLSL_TYPE_DOUBLE, + }; + int t1_idx = -1, t2_idx = -1, i; + + for (i = 0; i < sizeof(types) / sizeof(types[0]); ++i) + { + /* Always convert away from HLSL_TYPE_HALF */ + if (t1 == types[i]) + t1_idx = t1 == HLSL_TYPE_HALF ? i + 1 : i; + if (t2 == types[i]) + t2_idx = t2 == HLSL_TYPE_HALF ? i + 1 : i; + + if (t1_idx != -1 && t2_idx != -1) + break; + } + if (t1_idx == -1 || t2_idx == -1) + { + FIXME("Unexpected base type.\n"); + return HLSL_TYPE_FLOAT; + } + return t1_idx >= t2_idx ? t1 : t2; +} + +static struct hlsl_type *expr_common_type(struct hlsl_type *t1, struct hlsl_type *t2, + struct source_location *loc) +{ + enum hlsl_type_class type; + enum hlsl_base_type base; + unsigned int dimx, dimy; + + if (t1->type > HLSL_CLASS_LAST_NUMERIC || t2->type > HLSL_CLASS_LAST_NUMERIC) + { + hlsl_report_message(loc->file, loc->line, loc->col, HLSL_LEVEL_ERROR, + "non scalar/vector/matrix data type in expression"); + return NULL; + } + + if (compare_hlsl_types(t1, t2)) + return t1; + + if (!expr_compatible_data_types(t1, t2)) + { + hlsl_report_message(loc->file, loc->line, loc->col, HLSL_LEVEL_ERROR, + "expression data types are incompatible"); + return NULL; + } + + if (t1->base_type == t2->base_type) + base = t1->base_type; + else + base = expr_common_base_type(t1->base_type, t2->base_type); + + if (t1->dimx == 1 && t1->dimy == 1) + { + type = t2->type; + dimx = t2->dimx; + dimy = t2->dimy; + } + else if (t2->dimx == 1 && t2->dimy == 1) + { + type = t1->type; + dimx = t1->dimx; + dimy = t1->dimy; + } + else if (t1->type == HLSL_CLASS_MATRIX && t2->type == HLSL_CLASS_MATRIX) + { + type = HLSL_CLASS_MATRIX; + dimx = min(t1->dimx, t2->dimx); + dimy = min(t1->dimy, t2->dimy); + } + else + { + /* Two vectors or a vector and a matrix (matrix must be 1xn or nx1) */ + unsigned int max_dim_1, max_dim_2; + + max_dim_1 = max(t1->dimx, t1->dimy); + max_dim_2 = max(t2->dimx, t2->dimy); + if (t1->dimx * t1->dimy == t2->dimx * t2->dimy) + { + type = HLSL_CLASS_VECTOR; + dimx = max(t1->dimx, t2->dimx); + dimy = 1; + } + else if (max_dim_1 <= max_dim_2) + { + type = t1->type; + if (type == HLSL_CLASS_VECTOR) + { + dimx = max_dim_1; + dimy = 1; + } + else + { + dimx = t1->dimx; + dimy = t1->dimy; + } + } + else + { + type = t2->type; + if (type == HLSL_CLASS_VECTOR) + { + dimx = max_dim_2; + dimy = 1; + } + else + { + dimx = t2->dimx; + dimy = t2->dimy; + } + } + } + + return new_hlsl_type(NULL, type, base, dimx, dimy); +} + +static struct hlsl_ir_node *implicit_conversion(struct hlsl_ir_node *node, struct hlsl_type *type, + struct source_location *loc) +{ + struct hlsl_ir_expr *cast; + struct hlsl_ir_node *operands[3]; + + if (compare_hlsl_types(node->data_type, type)) + return node; + TRACE("Implicit conversion of expression to %s\n", debug_hlsl_type(type)); + operands[0] = node; + operands[1] = operands[2] = NULL; + cast = new_expr(HLSL_IR_UNOP_CAST, operands, loc); + if (!cast) + return NULL; + cast->node.data_type = type; + return &cast->node; +} + +struct hlsl_ir_expr *new_expr(enum hlsl_ir_expr_op op, struct hlsl_ir_node **operands, + struct source_location *loc) +{ + struct hlsl_ir_expr *expr = d3dcompiler_alloc(sizeof(*expr)); + struct hlsl_type *type; + unsigned int i; + + if (!expr) + { + ERR("Out of memory\n"); + return NULL; + } + expr->node.type = HLSL_IR_EXPR; + expr->node.loc = *loc; + type = operands[0]->data_type; + for (i = 1; i <= 2; ++i) + { + if (!operands[i]) + break; + type = expr_common_type(type, operands[i]->data_type, loc); + if (!type) + { + d3dcompiler_free(expr); + return NULL; + } + } + for (i = 0; i <= 2; ++i) + { + if (!operands[i]) + break; + if (compare_hlsl_types(operands[i]->data_type, type)) + continue; + TRACE("Implicitly converting %s into %s in an expression\n", debug_hlsl_type(operands[i]->data_type), debug_hlsl_type(type)); + if (operands[i]->data_type->dimx * operands[i]->data_type->dimy != 1 + && operands[i]->data_type->dimx * operands[i]->data_type->dimy != type->dimx * type->dimy) + { + hlsl_report_message(operands[i]->loc.file, + operands[i]->loc.line, operands[i]->loc.col, HLSL_LEVEL_WARNING, + "implicit truncation of vector/matrix type"); + } + operands[i] = implicit_conversion(operands[i], type, &operands[i]->loc); + if (!operands[i]) + { + ERR("Impossible to convert expression operand %u to %s\n", i + 1, debug_hlsl_type(type)); + d3dcompiler_free(expr); + return NULL; + } + } + expr->node.data_type = type; + expr->op = op; + expr->operands[0] = operands[0]; + expr->operands[1] = operands[1]; + expr->operands[2] = operands[2]; + + return expr; +} + +struct hlsl_ir_expr *new_cast(struct hlsl_ir_node *node, struct hlsl_type *type, + struct source_location *loc) +{ + struct hlsl_ir_expr *cast; + struct hlsl_ir_node *operands[3]; + + operands[0] = node; + operands[1] = operands[2] = NULL; + cast = new_expr(HLSL_IR_UNOP_CAST, operands, loc); + if (cast) + cast->node.data_type = type; + return cast; +} + +struct hlsl_ir_expr *hlsl_mul(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) +{ + struct hlsl_ir_expr *expr; + struct hlsl_ir_node *ops[3]; + + ops[0] = op1; + ops[1] = op2; + ops[2] = NULL; + expr = new_expr(HLSL_IR_BINOP_MUL, ops, loc); + return expr; +} + +struct hlsl_ir_expr *hlsl_div(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) +{ + struct hlsl_ir_expr *expr; + struct hlsl_ir_node *ops[3]; + + ops[0] = op1; + ops[1] = op2; + ops[2] = NULL; + expr = new_expr(HLSL_IR_BINOP_DIV, ops, loc); + return expr; +} + +struct hlsl_ir_expr *hlsl_mod(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) +{ + struct hlsl_ir_expr *expr; + struct hlsl_ir_node *ops[3]; + + ops[0] = op1; + ops[1] = op2; + ops[2] = NULL; + expr = new_expr(HLSL_IR_BINOP_MOD, ops, loc); + return expr; +} + +struct hlsl_ir_expr *hlsl_add(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) +{ + struct hlsl_ir_expr *expr; + struct hlsl_ir_node *ops[3]; + + ops[0] = op1; + ops[1] = op2; + ops[2] = NULL; + expr = new_expr(HLSL_IR_BINOP_ADD, ops, loc); + return expr; +} + +struct hlsl_ir_expr *hlsl_sub(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) +{ + struct hlsl_ir_expr *expr; + struct hlsl_ir_node *ops[3]; + + ops[0] = op1; + ops[1] = op2; + ops[2] = NULL; + expr = new_expr(HLSL_IR_BINOP_SUB, ops, loc); + return expr; +} + +struct hlsl_ir_expr *hlsl_lt(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) +{ + struct hlsl_ir_expr *expr; + struct hlsl_ir_node *ops[3]; + + ops[0] = op1; + ops[1] = op2; + ops[2] = NULL; + expr = new_expr(HLSL_IR_BINOP_LESS, ops, loc); + return expr; +} + +struct hlsl_ir_expr *hlsl_gt(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) +{ + struct hlsl_ir_expr *expr; + struct hlsl_ir_node *ops[3]; + + ops[0] = op1; + ops[1] = op2; + ops[2] = NULL; + expr = new_expr(HLSL_IR_BINOP_GREATER, ops, loc); + return expr; +} + +struct hlsl_ir_expr *hlsl_le(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) +{ + struct hlsl_ir_expr *expr; + struct hlsl_ir_node *ops[3]; + + ops[0] = op1; + ops[1] = op2; + ops[2] = NULL; + expr = new_expr(HLSL_IR_BINOP_LEQUAL, ops, loc); + return expr; +} + +struct hlsl_ir_expr *hlsl_ge(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) +{ + struct hlsl_ir_expr *expr; + struct hlsl_ir_node *ops[3]; + + ops[0] = op1; + ops[1] = op2; + ops[2] = NULL; + expr = new_expr(HLSL_IR_BINOP_GEQUAL, ops, loc); + return expr; +} + +struct hlsl_ir_expr *hlsl_eq(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) +{ + struct hlsl_ir_expr *expr; + struct hlsl_ir_node *ops[3]; + + ops[0] = op1; + ops[1] = op2; + ops[2] = NULL; + expr = new_expr(HLSL_IR_BINOP_EQUAL, ops, loc); + return expr; +} + +struct hlsl_ir_expr *hlsl_ne(struct hlsl_ir_node *op1, struct hlsl_ir_node *op2, + struct source_location *loc) +{ + struct hlsl_ir_expr *expr; + struct hlsl_ir_node *ops[3]; + + ops[0] = op1; + ops[1] = op2; + ops[2] = NULL; + expr = new_expr(HLSL_IR_BINOP_NEQUAL, ops, loc); + return expr; +} + +struct hlsl_ir_deref *new_var_deref(struct hlsl_ir_var *var) +{ + struct hlsl_ir_deref *deref = d3dcompiler_alloc(sizeof(*deref)); + + if (!deref) + { + ERR("Out of memory.\n"); + return NULL; + } + deref->node.type = HLSL_IR_DEREF; + deref->node.data_type = var->node.data_type; + deref->type = HLSL_IR_DEREF_VAR; + deref->v.var = var; + return deref; +} + +struct hlsl_ir_deref *new_record_deref(struct hlsl_ir_node *record, struct hlsl_struct_field *field) +{ + struct hlsl_ir_deref *deref = d3dcompiler_alloc(sizeof(*deref)); + + if (!deref) + { + ERR("Out of memory.\n"); + return NULL; + } + deref->node.type = HLSL_IR_DEREF; + deref->node.data_type = field->type; + deref->type = HLSL_IR_DEREF_RECORD; + if (record->type == HLSL_IR_VAR) + deref->v.record.record = &new_var_deref(var_from_node(record))->node; + else + deref->v.record.record = record; + deref->v.record.field = field; + return deref; +} + +static enum hlsl_ir_expr_op op_from_assignment(enum parse_assign_op op) +{ + static const enum hlsl_ir_expr_op ops[] = + { + 0, + HLSL_IR_BINOP_ADD, + HLSL_IR_BINOP_SUB, + HLSL_IR_BINOP_MUL, + HLSL_IR_BINOP_DIV, + HLSL_IR_BINOP_MOD, + HLSL_IR_BINOP_LSHIFT, + HLSL_IR_BINOP_RSHIFT, + HLSL_IR_BINOP_BIT_AND, + HLSL_IR_BINOP_BIT_OR, + HLSL_IR_BINOP_BIT_XOR, + }; + + return ops[op]; +} + +struct hlsl_ir_node *make_assignment(struct hlsl_ir_node *left, enum parse_assign_op assign_op, + DWORD writemask, struct hlsl_ir_node *right) +{ + struct hlsl_ir_expr *expr; + struct hlsl_ir_assignment *assign = d3dcompiler_alloc(sizeof(*assign)); + struct hlsl_type *type; + struct hlsl_ir_node *lhs, *rhs; + + if (!assign) + { + ERR("Out of memory\n"); + return NULL; + } + + TRACE("Creating proper assignment expression.\n"); + rhs = right; + if (writemask == BWRITERSP_WRITEMASK_ALL) + type = left->data_type; + else + { + FIXME("Assignments with writemasks not supported yet.\n"); + type = NULL; + } + assign->node.type = HLSL_IR_ASSIGNMENT; + assign->node.loc = left->loc; + assign->node.data_type = type; + assign->writemask = writemask; + FIXME("Check for casts in the lhs.\n"); + + lhs = left; + if (lhs->type == HLSL_IR_VAR) + { + struct hlsl_ir_deref *lhs_deref = new_var_deref(var_from_node(lhs)); + lhs = &lhs_deref->node; + } + /* FIXME: check for invalid writemasks on the lhs. */ + + if (!compare_hlsl_types(type, rhs->data_type)) + { + struct hlsl_ir_node *converted_rhs; + + if (!implicit_compatible_data_types(rhs->data_type, type)) + { + hlsl_report_message(rhs->loc.file, rhs->loc.line, rhs->loc.col, HLSL_LEVEL_ERROR, + "can't implicitly convert %s to %s", + debug_hlsl_type(rhs->data_type), debug_hlsl_type(type)); + free_instr(lhs); + free_instr(rhs); + d3dcompiler_free(assign); + return NULL; + } + if (lhs->data_type->dimx * lhs->data_type->dimy < rhs->data_type->dimx * rhs->data_type->dimy) + hlsl_report_message(rhs->loc.file, rhs->loc.line, rhs->loc.col, HLSL_LEVEL_WARNING, + "implicit truncation of vector type"); + + converted_rhs = implicit_conversion(rhs, type, &rhs->loc); + if (!converted_rhs) + { + ERR("Couldn't implicitly convert expression to %s.\n", debug_hlsl_type(type)); + free_instr(lhs); + free_instr(rhs); + d3dcompiler_free(assign); + return NULL; + } + rhs = converted_rhs; + } + + assign->lhs = lhs; + if (assign_op != ASSIGN_OP_ASSIGN) + { + struct hlsl_ir_node *operands[3]; + enum hlsl_ir_expr_op op = op_from_assignment(assign_op); + + if (lhs->type != HLSL_IR_DEREF || deref_from_node(lhs)->type != HLSL_IR_DEREF_VAR) + { + FIXME("LHS expression not supported in compound assignments yet.\n"); + assign->rhs = rhs; + } + else + { + struct hlsl_ir_deref *lhs_deref = deref_from_node(lhs), *new_deref; + + TRACE("Adding an expression for the compound assignment.\n"); + new_deref = new_var_deref(lhs_deref->v.var); + operands[0] = &new_deref->node; + operands[1] = rhs; + operands[2] = NULL; + expr = new_expr(op, operands, &left->loc); + assign->rhs = &expr->node; + } + } + else + assign->rhs = rhs; + + return &assign->node; +} + +static int compare_hlsl_types_rb(const void *key, const struct wine_rb_entry *entry) +{ + const char *name = (const char *)key; + const struct hlsl_type *type = WINE_RB_ENTRY_VALUE(entry, const struct hlsl_type, scope_entry); + + if (name == type->name) + return 0; + + if (!name || !type->name) + { + ERR("hlsl_type without a name in a scope?\n"); + return -1; + } + return strcmp(name, type->name); +} + +static inline void *d3dcompiler_alloc_rb(size_t size) +{ + return d3dcompiler_alloc(size); +} + +static inline void *d3dcompiler_realloc_rb(void *ptr, size_t size) +{ + return d3dcompiler_realloc(ptr, size); +} + +static inline void d3dcompiler_free_rb(void *ptr) +{ + d3dcompiler_free(ptr); +} +static const struct wine_rb_functions hlsl_type_rb_funcs = +{ + d3dcompiler_alloc_rb, + d3dcompiler_realloc_rb, + d3dcompiler_free_rb, + compare_hlsl_types_rb, +}; + +void push_scope(struct hlsl_parse_ctx *ctx) +{ + struct hlsl_scope *new_scope = d3dcompiler_alloc(sizeof(*new_scope)); + + if (!new_scope) + { + ERR("Out of memory!\n"); + return; + } + TRACE("Pushing a new scope\n"); + list_init(&new_scope->vars); + if (wine_rb_init(&new_scope->types, &hlsl_type_rb_funcs) == -1) + { + ERR("Failed to initialize types rbtree.\n"); + d3dcompiler_free(new_scope); + return; + } + new_scope->upper = ctx->cur_scope; + ctx->cur_scope = new_scope; + list_add_tail(&ctx->scopes, &new_scope->entry); +} + +BOOL pop_scope(struct hlsl_parse_ctx *ctx) +{ + struct hlsl_scope *prev_scope = ctx->cur_scope->upper; + if (!prev_scope) + return FALSE; + + TRACE("Popping current scope\n"); + ctx->cur_scope = prev_scope; + return TRUE; +} + +struct hlsl_ir_function_decl *new_func_decl(struct hlsl_type *return_type, struct list *parameters) +{ + struct hlsl_ir_function_decl *decl; + + decl = d3dcompiler_alloc(sizeof(*decl)); + if (!decl) + { + ERR("Out of memory.\n"); + return NULL; + } + decl->node.type = HLSL_IR_FUNCTION_DECL; + decl->node.data_type = return_type; + decl->parameters = parameters; + + return decl; +} + +static int compare_param_hlsl_types(const struct hlsl_type *t1, const struct hlsl_type *t2) +{ + if (t1->type != t2->type) + { + if (!((t1->type == HLSL_CLASS_SCALAR && t2->type == HLSL_CLASS_VECTOR) + || (t1->type == HLSL_CLASS_VECTOR && t2->type == HLSL_CLASS_SCALAR))) + return t1->type - t2->type; + } + if (t1->base_type != t2->base_type) + return t1->base_type - t2->base_type; + if (t1->base_type == HLSL_TYPE_SAMPLER && t1->sampler_dim != t2->sampler_dim) + return t1->sampler_dim - t2->sampler_dim; + if (t1->dimx != t2->dimx) + return t1->dimx - t2->dimx; + if (t1->dimy != t2->dimy) + return t1->dimx - t2->dimx; + if (t1->type == HLSL_CLASS_STRUCT) + { + struct list *t1cur, *t2cur; + struct hlsl_struct_field *t1field, *t2field; + int r; + + t1cur = list_head(t1->e.elements); + t2cur = list_head(t2->e.elements); + while (t1cur && t2cur) + { + t1field = LIST_ENTRY(t1cur, struct hlsl_struct_field, entry); + t2field = LIST_ENTRY(t2cur, struct hlsl_struct_field, entry); + if ((r = compare_param_hlsl_types(t1field->type, t2field->type))) + return r; + if ((r = strcmp(t1field->name, t2field->name))) + return r; + t1cur = list_next(t1->e.elements, t1cur); + t2cur = list_next(t2->e.elements, t2cur); + } + if (t1cur != t2cur) + return t1cur ? 1 : -1; + return 0; + } + if (t1->type == HLSL_CLASS_ARRAY) + { + if (t1->e.array.elements_count != t2->e.array.elements_count) + return t1->e.array.elements_count - t2->e.array.elements_count; + return compare_param_hlsl_types(t1->e.array.type, t2->e.array.type); + } + + return 0; +} + +static int compare_function_decl_rb(const void *key, const struct wine_rb_entry *entry) +{ + const struct list *params = (const struct list *)key; + const struct hlsl_ir_function_decl *decl = WINE_RB_ENTRY_VALUE(entry, const struct hlsl_ir_function_decl, entry); + int params_count = params ? list_count(params) : 0; + int decl_params_count = decl->parameters ? list_count(decl->parameters) : 0; + int r; + struct list *p1cur, *p2cur; + + if (params_count != decl_params_count) + return params_count - decl_params_count; + + p1cur = params ? list_head(params) : NULL; + p2cur = decl->parameters ? list_head(decl->parameters) : NULL; + while (p1cur && p2cur) + { + struct hlsl_ir_var *p1, *p2; + p1 = LIST_ENTRY(p1cur, struct hlsl_ir_var, node.entry); + p2 = LIST_ENTRY(p2cur, struct hlsl_ir_var, node.entry); + if ((r = compare_param_hlsl_types(p1->node.data_type, p2->node.data_type))) + return r; + p1cur = list_next(params, p1cur); + p2cur = list_next(decl->parameters, p2cur); + } + return 0; +} + +static const struct wine_rb_functions hlsl_ir_function_decl_rb_funcs = +{ + d3dcompiler_alloc_rb, + d3dcompiler_realloc_rb, + d3dcompiler_free_rb, + compare_function_decl_rb, +}; + +static int compare_function_rb(const void *key, const struct wine_rb_entry *entry) +{ + const char *name = (const char *)key; + const struct hlsl_ir_function *func = WINE_RB_ENTRY_VALUE(entry, const struct hlsl_ir_function,entry); + + return strcmp(name, func->name); +} + +static const struct wine_rb_functions function_rb_funcs = +{ + d3dcompiler_alloc_rb, + d3dcompiler_realloc_rb, + d3dcompiler_free_rb, + compare_function_rb, +}; + +void init_functions_tree(struct wine_rb_tree *funcs) +{ + if (wine_rb_init(&hlsl_ctx.functions, &function_rb_funcs) == -1) + ERR("Failed to initialize functions rbtree.\n"); +} + +static const char *debug_base_type(const struct hlsl_type *type) +{ + const char *name = "(unknown)"; + + switch (type->base_type) + { + case HLSL_TYPE_FLOAT: name = "float"; break; + case HLSL_TYPE_HALF: name = "half"; break; + case HLSL_TYPE_DOUBLE: name = "double"; break; + case HLSL_TYPE_INT: name = "int"; break; + case HLSL_TYPE_UINT: name = "uint"; break; + case HLSL_TYPE_BOOL: name = "bool"; break; + case HLSL_TYPE_SAMPLER: + switch (type->sampler_dim) + { + case HLSL_SAMPLER_DIM_GENERIC: name = "sampler"; break; + case HLSL_SAMPLER_DIM_1D: name = "sampler1D"; break; + case HLSL_SAMPLER_DIM_2D: name = "sampler2D"; break; + case HLSL_SAMPLER_DIM_3D: name = "sampler3D"; break; + case HLSL_SAMPLER_DIM_CUBE: name = "samplerCUBE"; break; + } + break; + default: + FIXME("Unhandled case %u\n", type->base_type); + } + return name; +} + +const char *debug_hlsl_type(const struct hlsl_type *type) +{ + const char *name; + + if (type->name) + return debugstr_a(type->name); + + if (type->type == HLSL_CLASS_STRUCT) + return ""; + + if (type->type == HLSL_CLASS_ARRAY) + { + name = debug_base_type(type->e.array.type); + return wine_dbg_sprintf("%s[%u]", name, type->e.array.elements_count); + } + + name = debug_base_type(type); + + if (type->type == HLSL_CLASS_SCALAR) + return wine_dbg_sprintf("%s", name); + if (type->type == HLSL_CLASS_VECTOR) + return wine_dbg_sprintf("%s%u", name, type->dimx); + if (type->type == HLSL_CLASS_MATRIX) + return wine_dbg_sprintf("%s%ux%u", name, type->dimx, type->dimy); + return "unexpected_type"; +} + +const char *debug_modifiers(DWORD modifiers) +{ + char string[110]; + + string[0] = 0; + if (modifiers & HLSL_STORAGE_EXTERN) + strcat(string, " extern"); /* 7 */ + if (modifiers & HLSL_STORAGE_NOINTERPOLATION) + strcat(string, " nointerpolation"); /* 16 */ + if (modifiers & HLSL_MODIFIER_PRECISE) + strcat(string, " precise"); /* 8 */ + if (modifiers & HLSL_STORAGE_SHARED) + strcat(string, " shared"); /* 7 */ + if (modifiers & HLSL_STORAGE_GROUPSHARED) + strcat(string, " groupshared"); /* 12 */ + if (modifiers & HLSL_STORAGE_STATIC) + strcat(string, " static"); /* 7 */ + if (modifiers & HLSL_STORAGE_UNIFORM) + strcat(string, " uniform"); /* 8 */ + if (modifiers & HLSL_STORAGE_VOLATILE) + strcat(string, " volatile"); /* 9 */ + if (modifiers & HLSL_MODIFIER_CONST) + strcat(string, " const"); /* 6 */ + if (modifiers & HLSL_MODIFIER_ROW_MAJOR) + strcat(string, " row_major"); /* 10 */ + if (modifiers & HLSL_MODIFIER_COLUMN_MAJOR) + strcat(string, " column_major"); /* 13 */ + if ((modifiers & (HLSL_MODIFIER_IN | HLSL_MODIFIER_OUT)) == (HLSL_MODIFIER_IN | HLSL_MODIFIER_OUT)) + strcat(string, " inout"); /* 6 */ + else if (modifiers & HLSL_MODIFIER_IN) + strcat(string, " in"); /* 3 */ + else if (modifiers & HLSL_MODIFIER_OUT) + strcat(string, " out"); /* 4 */ + + return wine_dbg_sprintf("%s", string[0] ? string + 1 : ""); +} + +static const char *debug_node_type(enum hlsl_ir_node_type type) +{ + const char *names[] = + { + "HLSL_IR_VAR", + "HLSL_IR_ASSIGNMENT", + "HLSL_IR_CONSTANT", + "HLSL_IR_CONSTRUCTOR", + "HLSL_IR_DEREF", + "HLSL_IR_EXPR", + "HLSL_IR_FUNCTION_DECL", + "HLSL_IR_IF", + "HLSL_IR_JUMP", + "HLSL_IR_SWIZZLE", + }; + + if (type >= sizeof(names) / sizeof(names[0])) + return "Unexpected node type"; + return names[type]; +} + +static void debug_dump_instr(const struct hlsl_ir_node *instr); + +static void debug_dump_instr_list(const struct list *list) +{ + struct hlsl_ir_node *instr; + + LIST_FOR_EACH_ENTRY(instr, list, struct hlsl_ir_node, entry) + { + debug_dump_instr(instr); + TRACE("\n"); + } +} + +static void debug_dump_ir_var(const struct hlsl_ir_var *var) +{ + if (var->modifiers) + TRACE("%s ", debug_modifiers(var->modifiers)); + TRACE("%s %s", debug_hlsl_type(var->node.data_type), var->name); + if (var->semantic) + TRACE(" : %s", debugstr_a(var->semantic)); +} + +static void debug_dump_ir_deref(const struct hlsl_ir_deref *deref) +{ + switch (deref->type) + { + case HLSL_IR_DEREF_VAR: + TRACE("deref("); + debug_dump_ir_var(deref->v.var); + TRACE(")"); + break; + case HLSL_IR_DEREF_ARRAY: + debug_dump_instr(deref->v.array.array); + TRACE("["); + debug_dump_instr(deref->v.array.index); + TRACE("]"); + break; + case HLSL_IR_DEREF_RECORD: + debug_dump_instr(deref->v.record.record); + TRACE(".%s", debugstr_a(deref->v.record.field->name)); + break; + } +} + +static void debug_dump_ir_constant(const struct hlsl_ir_constant *constant) +{ + struct hlsl_type *type = constant->node.data_type; + unsigned int x, y; + + if (type->dimy != 1) + TRACE("{"); + for (y = 0; y < type->dimy; ++y) + { + if (type->dimx != 1) + TRACE("{"); + for (x = 0; x < type->dimx; ++x) + { + switch (type->base_type) + { + case HLSL_TYPE_FLOAT: + TRACE("%g ", (double)constant->v.value.f[y * type->dimx + x]); + break; + case HLSL_TYPE_DOUBLE: + TRACE("%g ", constant->v.value.d[y * type->dimx + x]); + break; + case HLSL_TYPE_INT: + TRACE("%d ", constant->v.value.i[y * type->dimx + x]); + break; + case HLSL_TYPE_UINT: + TRACE("%u ", constant->v.value.u[y * type->dimx + x]); + break; + case HLSL_TYPE_BOOL: + TRACE("%s ", constant->v.value.b[y * type->dimx + x] == FALSE ? "false" : "true"); + break; + default: + TRACE("Constants of type %s not supported\n", debug_base_type(type)); + } + } + if (type->dimx != 1) + TRACE("}"); + } + if (type->dimy != 1) + TRACE("}"); +} + +static const char *debug_expr_op(const struct hlsl_ir_expr *expr) +{ + static const char *op_names[] = + { + "~", + "!", + "-", + "abs", + "sign", + "rcp", + "rsq", + "sqrt", + "nrm", + "exp2", + "log2", + + "cast", + + "fract", + + "sin", + "cos", + "sin_reduced", + "cos_reduced", + + "dsx", + "dsy", + + "sat", + + "+", + "-", + "*", + "/", + + "%", + + "<", + ">", + "<=", + ">=", + "==", + "!=", + + "&&", + "||", + + "<<", + ">>", + "&", + "|", + "^", + + "dot", + "crs", + "min", + "max", + + "pow", + + "pre++", + "pre--", + "post++", + "post--", + + "lerp", + + ",", + }; + + if (expr->op == HLSL_IR_UNOP_CAST) + return debug_hlsl_type(expr->node.data_type); + + return op_names[expr->op]; +} + +/* Dumps the expression in a prefix "operator (operands)" form */ +static void debug_dump_ir_expr(const struct hlsl_ir_expr *expr) +{ + unsigned int i; + + TRACE("%s (", debug_expr_op(expr)); + for (i = 0; i < 3 && expr->operands[i]; ++i) + { + debug_dump_instr(expr->operands[i]); + TRACE(" "); + } + TRACE(")"); +} + +static void debug_dump_ir_constructor(const struct hlsl_ir_constructor *constructor) +{ + struct hlsl_ir_node *arg; + + TRACE("%s (", debug_hlsl_type(constructor->node.data_type)); + LIST_FOR_EACH_ENTRY(arg, constructor->arguments, struct hlsl_ir_node, entry) + { + debug_dump_instr(arg); + TRACE(" "); + } + TRACE(")"); +} + +static const char *debug_writemask(DWORD writemask) +{ + char string[5], components[] = {'x', 'y', 'z', 'w'}; + unsigned int i = 0, pos = 0; + + while (writemask) + { + if (writemask & 1) + string[pos++] = components[i]; + writemask >>= 1; + i++; + } + string[pos] = '\0'; + return wine_dbg_sprintf(".%s", string); +} + +static void debug_dump_ir_assignment(const struct hlsl_ir_assignment *assign) +{ + TRACE("= ("); + debug_dump_instr(assign->lhs); + if (assign->writemask != BWRITERSP_WRITEMASK_ALL) + TRACE("%s", debug_writemask(assign->writemask)); + TRACE(" "); + debug_dump_instr(assign->rhs); + TRACE(")"); +} + +static void debug_dump_ir_swizzle(const struct hlsl_ir_swizzle *swizzle) +{ + unsigned int i; + + debug_dump_instr(swizzle->val); + TRACE("."); + if (swizzle->val->data_type->dimy > 1) + { + for (i = 0; i < swizzle->node.data_type->dimx; ++i) + TRACE("_m%u%u", (swizzle->swizzle >> i * 8) & 0xf, (swizzle->swizzle >> (i * 8 + 4)) & 0xf); + } + else + { + char c[] = {'x', 'y', 'z', 'w'}; + + for (i = 0; i < swizzle->node.data_type->dimx; ++i) + TRACE("%c", c[(swizzle->swizzle >> i * 2) & 0x3]); + } +} + +static void debug_dump_ir_jump(const struct hlsl_ir_jump *jump) +{ + switch (jump->type) + { + case HLSL_IR_JUMP_BREAK: + TRACE("break"); + break; + case HLSL_IR_JUMP_CONTINUE: + TRACE("continue"); + break; + case HLSL_IR_JUMP_DISCARD: + TRACE("discard"); + break; + case HLSL_IR_JUMP_RETURN: + TRACE("return "); + if (jump->return_value) + debug_dump_instr(jump->return_value); + TRACE(";"); + break; + } +} + +static void debug_dump_ir_if(const struct hlsl_ir_if *if_node) +{ + TRACE("if ("); + debug_dump_instr(if_node->condition); + TRACE(")\n{\n"); + debug_dump_instr_list(if_node->then_instrs); + TRACE("}\n"); + if (if_node->else_instrs) + { + TRACE("else\n{\n"); + debug_dump_instr_list(if_node->else_instrs); + TRACE("}\n"); + } +} + +static void debug_dump_instr(const struct hlsl_ir_node *instr) +{ + switch (instr->type) + { + case HLSL_IR_EXPR: + debug_dump_ir_expr(expr_from_node(instr)); + break; + case HLSL_IR_DEREF: + debug_dump_ir_deref(deref_from_node(instr)); + break; + case HLSL_IR_CONSTANT: + debug_dump_ir_constant(constant_from_node(instr)); + break; + case HLSL_IR_ASSIGNMENT: + debug_dump_ir_assignment(assignment_from_node(instr)); + break; + case HLSL_IR_SWIZZLE: + debug_dump_ir_swizzle(swizzle_from_node(instr)); + break; + case HLSL_IR_CONSTRUCTOR: + debug_dump_ir_constructor(constructor_from_node(instr)); + break; + case HLSL_IR_JUMP: + debug_dump_ir_jump(jump_from_node(instr)); + break; + case HLSL_IR_IF: + debug_dump_ir_if(if_from_node(instr)); + break; + default: + TRACE("", debug_node_type(instr->type)); + } +} + +void debug_dump_ir_function_decl(const struct hlsl_ir_function_decl *func) +{ + struct hlsl_ir_var *param; + + TRACE("Dumping function %s.\n", debugstr_a(func->func->name)); + TRACE("Function parameters:\n"); + LIST_FOR_EACH_ENTRY(param, func->parameters, struct hlsl_ir_var, node.entry) + { + debug_dump_ir_var(param); + TRACE("\n"); + } + if (func->semantic) + TRACE("Function semantic: %s\n", debugstr_a(func->semantic)); + if (func->body) + { + debug_dump_instr_list(func->body); + } +} + +void free_hlsl_type(struct hlsl_type *type) +{ + struct hlsl_struct_field *field, *next_field; + + d3dcompiler_free((void *)type->name); + if (type->type == HLSL_CLASS_STRUCT) + { + LIST_FOR_EACH_ENTRY_SAFE(field, next_field, type->e.elements, struct hlsl_struct_field, entry) + { + d3dcompiler_free((void *)field->name); + d3dcompiler_free((void *)field->semantic); + d3dcompiler_free(field); + } + } + d3dcompiler_free(type); +} + +void free_instr_list(struct list *list) +{ + struct hlsl_ir_node *node, *next_node; + + if (!list) + return; + LIST_FOR_EACH_ENTRY_SAFE(node, next_node, list, struct hlsl_ir_node, entry) + free_instr(node); + d3dcompiler_free(list); +} + +static void free_ir_constant(struct hlsl_ir_constant *constant) +{ + struct hlsl_type *type = constant->node.data_type; + unsigned int i; + struct hlsl_ir_constant *field, *next_field; + + switch (type->type) + { + case HLSL_CLASS_ARRAY: + for (i = 0; i < type->e.array.elements_count; ++i) + free_ir_constant(&constant->v.array_elements[i]); + d3dcompiler_free(constant->v.array_elements); + break; + case HLSL_CLASS_STRUCT: + LIST_FOR_EACH_ENTRY_SAFE(field, next_field, constant->v.struct_elements, struct hlsl_ir_constant, node.entry) + free_ir_constant(field); + break; + default: + break; + } + d3dcompiler_free(constant); +} + +static void free_ir_deref(struct hlsl_ir_deref *deref) +{ + switch (deref->type) + { + case HLSL_IR_DEREF_VAR: + /* Variables are shared among nodes in the tree. */ + break; + case HLSL_IR_DEREF_ARRAY: + free_instr(deref->v.array.array); + free_instr(deref->v.array.index); + break; + case HLSL_IR_DEREF_RECORD: + free_instr(deref->v.record.record); + break; + } + d3dcompiler_free(deref); +} + +static void free_ir_swizzle(struct hlsl_ir_swizzle *swizzle) +{ + free_instr(swizzle->val); + d3dcompiler_free(swizzle); +} + +static void free_ir_constructor(struct hlsl_ir_constructor *constructor) +{ + free_instr_list(constructor->arguments); + d3dcompiler_free(constructor); +} + +static void free_ir_expr(struct hlsl_ir_expr *expr) +{ + unsigned int i; + + for (i = 0; i < 3; ++i) + { + if (!expr->operands[i]) + break; + free_instr(expr->operands[i]); + } + free_instr_list(expr->subexpressions); + d3dcompiler_free(expr); +} + +static void free_ir_assignment(struct hlsl_ir_assignment *assignment) +{ + free_instr(assignment->lhs); + free_instr(assignment->rhs); + d3dcompiler_free(assignment); +} + +static void free_ir_if(struct hlsl_ir_if *if_node) +{ + free_instr(if_node->condition); + free_instr_list(if_node->then_instrs); + free_instr_list(if_node->else_instrs); + d3dcompiler_free(if_node); +} + +static void free_ir_jump(struct hlsl_ir_jump *jump) +{ + if (jump->type == HLSL_IR_JUMP_RETURN) + free_instr(jump->return_value); + d3dcompiler_free(jump); +} + +void free_instr(struct hlsl_ir_node *node) +{ + switch (node->type) + { + case HLSL_IR_VAR: + /* These are freed later on from the scopes. */ + break; + case HLSL_IR_CONSTANT: + free_ir_constant(constant_from_node(node)); + break; + case HLSL_IR_DEREF: + free_ir_deref(deref_from_node(node)); + break; + case HLSL_IR_SWIZZLE: + free_ir_swizzle(swizzle_from_node(node)); + break; + case HLSL_IR_CONSTRUCTOR: + free_ir_constructor(constructor_from_node(node)); + break; + case HLSL_IR_EXPR: + free_ir_expr(expr_from_node(node)); + break; + case HLSL_IR_ASSIGNMENT: + free_ir_assignment(assignment_from_node(node)); + break; + case HLSL_IR_IF: + free_ir_if(if_from_node(node)); + break; + case HLSL_IR_JUMP: + free_ir_jump(jump_from_node(node)); + break; + default: + FIXME("Unsupported node type %s\n", debug_node_type(node->type)); + } +} + +static void free_function_decl(struct hlsl_ir_function_decl *func) +{ + d3dcompiler_free((void *)func->semantic); + d3dcompiler_free(func->parameters); + free_instr_list(func->body); + d3dcompiler_free(func); +} + +static void free_function_decl_rb(struct wine_rb_entry *entry, void *context) +{ + free_function_decl(WINE_RB_ENTRY_VALUE(entry, struct hlsl_ir_function_decl, entry)); +} + +static void free_function(struct hlsl_ir_function *func) +{ + wine_rb_destroy(&func->overloads, free_function_decl_rb, NULL); + d3dcompiler_free((void *)func->name); +} + +void free_function_rb(struct wine_rb_entry *entry, void *context) +{ + free_function(WINE_RB_ENTRY_VALUE(entry, struct hlsl_ir_function, entry)); +} + +void add_function_decl(struct wine_rb_tree *funcs, char *name, struct hlsl_ir_function_decl *decl, BOOL intrinsic) +{ + struct hlsl_ir_function *func; + struct wine_rb_entry *func_entry, *old_entry; + + func_entry = wine_rb_get(funcs, name); + if (func_entry) + { + func = WINE_RB_ENTRY_VALUE(func_entry, struct hlsl_ir_function, entry); + decl->func = func; + if ((old_entry = wine_rb_get(&func->overloads, decl->parameters))) + { + struct hlsl_ir_function_decl *old_decl = + WINE_RB_ENTRY_VALUE(old_entry, struct hlsl_ir_function_decl, entry); + + if (!decl->body) + { + free_function_decl(decl); + d3dcompiler_free(name); + return; + } + wine_rb_remove(&func->overloads, decl->parameters); + free_function_decl(old_decl); + } + wine_rb_put(&func->overloads, decl->parameters, &decl->entry); + d3dcompiler_free(name); + return; + } + func = d3dcompiler_alloc(sizeof(*func)); + func->name = name; + if (wine_rb_init(&func->overloads, &hlsl_ir_function_decl_rb_funcs) == -1) + { + ERR("Failed to initialize function rbtree.\n"); + d3dcompiler_free(name); + d3dcompiler_free(func); + return; + } + decl->func = func; + wine_rb_put(&func->overloads, decl->parameters, &decl->entry); + func->intrinsic = intrinsic; + wine_rb_put(funcs, func->name, &func->entry); +} diff --git a/dll/win32/crypt32/version.rc b/dll/directx/wine/d3dcompiler_43/version.rc similarity index 69% rename from dll/win32/crypt32/version.rc rename to dll/directx/wine/d3dcompiler_43/version.rc index 647c766c05d..5603735acf7 100644 --- a/dll/win32/crypt32/version.rc +++ b/dll/directx/wine/d3dcompiler_43/version.rc @@ -1,7 +1,5 @@ /* - * crypt32 dll version resources - * - * Copyright (C) 2006 Juan Lang + * Copyright 2010 Matteo Bruni for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,11 +16,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WINE_FILEDESCRIPTION_STR "Wine CryptoAPI Library" -#define WINE_FILENAME_STR "crypt32.dll" -#define WINE_FILEVERSION 5,131,2600,1243 -#define WINE_FILEVERSION_STR "5.131.2600.1243" -#define WINE_PRODUCTVERSION 5,131,2600,1243 -#define WINE_PRODUCTVERSION_STR "5.131.2600.1243" +#define WINE_FILEDESCRIPTION_STR "Wine D3DCompiler" +#define WINE_FILENAME_STR "d3dcompiler_43.dll" +#define WINE_FILEVERSION 9,29,952,3111 +#define WINE_FILEVERSION_STR "9.29.952.3111" +#define WINE_PRODUCTVERSION 9,29,952,3111 +#define WINE_PRODUCTVERSION_STR "9.29.952.3111" #include "wine/wine_common_ver.rc" diff --git a/dll/directx/wine/d3dx9_24/CMakeLists.txt b/dll/directx/wine/d3dx9_24/CMakeLists.txt index a3c47aecc27..72ea5481440 100644 --- a/dll/directx/wine/d3dx9_24/CMakeLists.txt +++ b/dll/directx/wine/d3dx9_24/CMakeLists.txt @@ -1,27 +1,16 @@ -spec2def(d3dx9_24.dll d3dx9_24.spec ADD_IMPORTLIB) - -list(APPEND SOURCE - d3dx9_24_main.c - version.rc - ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_24_stubs.c - ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_24.def) - add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_library(d3dx9_24 SHARED ${SOURCE}) + +spec2def(d3dx9_24.dll d3dx9_24.spec) + +list(APPEND SOURCE + d3dx9_24_main.c + ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_24_stubs.c + ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_24.def) + +add_library(d3dx9_24 SHARED ${SOURCE} version.rc) set_module_type(d3dx9_24 win32dll) target_link_libraries(d3dx9_24 wine) - -add_importlibs(d3dx9_24 - d3dx9_36 - d3d9 - user32 - gdi32 - advapi32 - msvcrt - kernel32 - ntdll) - -add_dependencies(d3dx9_24 wineheaders) +add_importlibs(d3dx9_24 d3dx9_30 msvcrt kernel32 ntdll) add_cd_file(TARGET d3dx9_24 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_24/d3dx9_24.spec b/dll/directx/wine/d3dx9_24/d3dx9_24.spec index 3a7e007e873..a59311e8fc3 100644 --- a/dll/directx/wine/d3dx9_24/d3dx9_24.spec +++ b/dll/directx/wine/d3dx9_24/d3dx9_24.spec @@ -1,21 +1,21 @@ @ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShader -@ stdcall D3DXAssembleShaderFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA -@ stdcall D3DXAssembleShaderFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW -@ stdcall D3DXAssembleShaderFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA -@ stdcall D3DXAssembleShaderFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW +@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA +@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW +@ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA +@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW @ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) d3dx9_36.D3DXBoxBoundProbe -@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckCubeTextureRequirements -@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckTextureRequirements +@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckCubeTextureRequirements +@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckTextureRequirements @ stdcall D3DXCheckVersion(long long) -@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckVolumeTextureRequirements -@ stdcall D3DXCleanMesh(ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh -@ stdcall D3DXColorAdjustContrast(ptr ptr long) d3dx9_36.D3DXColorAdjustContrast -@ stdcall D3DXColorAdjustSaturation(ptr ptr long) d3dx9_36.D3DXColorAdjustSaturation -@ stdcall D3DXCompileShader(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShader -@ stdcall D3DXCompileShaderFromFileA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA -@ stdcall D3DXCompileShaderFromFileW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW -@ stdcall D3DXCompileShaderFromResourceA(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA -@ stdcall D3DXCompileShaderFromResourceW(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW +@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckVolumeTextureRequirements +@ stdcall D3DXCleanMesh(long ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh +@ stdcall D3DXColorAdjustContrast(ptr ptr float) d3dx9_36.D3DXColorAdjustContrast +@ stdcall D3DXColorAdjustSaturation(ptr ptr float) d3dx9_36.D3DXColorAdjustSaturation +@ stdcall D3DXCompileShader(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShader +@ stdcall D3DXCompileShaderFromFileA(str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA +@ stdcall D3DXCompileShaderFromFileW(wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW +@ stdcall D3DXCompileShaderFromResourceA(ptr str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA +@ stdcall D3DXCompileShaderFromResourceW(ptr wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW @ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingBox @ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingSphere @ stdcall D3DXComputeNormalMap(ptr ptr ptr long long long) d3dx9_36.D3DXComputeNormalMap @@ -26,9 +26,9 @@ @ stdcall D3DXConcatenateMeshes(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXConcatenateMeshes @ stdcall D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToSingleStrip @ stdcall D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToStrips -@ stub D3DXCpuOptimizations +@ stdcall D3DXCpuOptimizations(long) d3dx9_30.D3DXCpuOptimizations @ stdcall D3DXCreateAnimationController(long long long long ptr) d3dx9_36.D3DXCreateAnimationController -@ stdcall D3DXCreateBox(ptr long long long ptr ptr) d3dx9_36.D3DXCreateBox +@ stdcall D3DXCreateBox(ptr float float float ptr ptr) d3dx9_36.D3DXCreateBox @ stdcall D3DXCreateBuffer(long ptr) d3dx9_36.D3DXCreateBuffer @ stdcall D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr) d3dx9_36.D3DXCreateCompressedAnimationSet @ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr) d3dx9_36.D3DXCreateCubeTexture @@ -45,24 +45,24 @@ @ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder @ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffect @ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler -@ stdcall D3DXCreateEffectCompilerFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA -@ stdcall D3DXCreateEffectCompilerFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW -@ stdcall D3DXCreateEffectCompilerFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA -@ stdcall D3DXCreateEffectCompilerFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW -@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx -@ stdcall D3DXCreateEffectFromFileA(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA -@ stdcall D3DXCreateEffectFromFileExA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA -@ stdcall D3DXCreateEffectFromFileExW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW -@ stdcall D3DXCreateEffectFromFileW(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW -@ stdcall D3DXCreateEffectFromResourceA(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA -@ stdcall D3DXCreateEffectFromResourceExA(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA -@ stdcall D3DXCreateEffectFromResourceExW(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW -@ stdcall D3DXCreateEffectFromResourceW(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW +@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA +@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW +@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA +@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW +@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx +@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA +@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA +@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW +@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW +@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA +@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA +@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW +@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW @ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool -@ stdcall D3DXCreateFontA(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontA +@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectW -@ stdcall D3DXCreateFontW(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontW +@ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) d3dx9_36.D3DXCreateFontW @ stdcall D3DXCreateFragmentLinker(ptr long ptr) d3dx9_36.D3DXCreateFragmentLinker @ stdcall D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateKeyframedAnimationSet @ stdcall D3DXCreateLine(ptr ptr) d3dx9_36.D3DXCreateLine @@ -83,22 +83,22 @@ @ stdcall D3DXCreateSkinInfo(long ptr long ptr) d3dx9_36.D3DXCreateSkinInfo @ stdcall D3DXCreateSkinInfoFromBlendedMesh(ptr long ptr ptr) d3dx9_36.D3DXCreateSkinInfoFromBlendedMesh @ stdcall D3DXCreateSkinInfoFVF(long long long ptr) d3dx9_36.D3DXCreateSkinInfoFVF -@ stdcall D3DXCreateSphere(ptr long long long ptr ptr) d3dx9_36.D3DXCreateSphere +@ stdcall D3DXCreateSphere(ptr float long long ptr ptr) d3dx9_36.D3DXCreateSphere @ stdcall D3DXCreateSprite(ptr ptr) d3dx9_36.D3DXCreateSprite @ stdcall D3DXCreateTeapot(ptr ptr ptr) d3dx9_36.D3DXCreateTeapot -@ stdcall D3DXCreateTextA(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextA -@ stdcall D3DXCreateTextW(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextW +@ stdcall D3DXCreateTextA(ptr long str float float ptr ptr ptr) d3dx9_36.D3DXCreateTextA +@ stdcall D3DXCreateTextW(ptr long wstr float float ptr ptr ptr) d3dx9_36.D3DXCreateTextW @ stdcall D3DXCreateTexture(ptr long long long long long long ptr) d3dx9_36.D3DXCreateTexture -@ stdcall D3DXCreateTextureFromFileA(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileA -@ stdcall D3DXCreateTextureFromFileExA(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA -@ stdcall D3DXCreateTextureFromFileExW(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW +@ stdcall D3DXCreateTextureFromFileA(ptr str ptr) d3dx9_36.D3DXCreateTextureFromFileA +@ stdcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA +@ stdcall D3DXCreateTextureFromFileExW(ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW @ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateTextureFromFileInMemory @ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileInMemoryEx -@ stdcall D3DXCreateTextureFromFileW(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileW -@ stdcall D3DXCreateTextureFromResourceA(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceA -@ stdcall D3DXCreateTextureFromResourceExA(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA -@ stdcall D3DXCreateTextureFromResourceExW(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW -@ stdcall D3DXCreateTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceW +@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromFileW +@ stdcall D3DXCreateTextureFromResourceA(ptr ptr str ptr) d3dx9_36.D3DXCreateTextureFromResourceA +@ stdcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA +@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW +@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromResourceW @ stdcall D3DXCreateTextureGutterHelper(long long ptr long ptr) d3dx9_36.D3DXCreateTextureGutterHelper @ stdcall D3DXCreateTextureShader(ptr ptr) d3dx9_36.D3DXCreateTextureShader @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateTorus @@ -134,7 +134,7 @@ @ stdcall D3DXFrameFind(ptr ptr) d3dx9_36.D3DXFrameFind @ stdcall D3DXFrameNumNamedMatrices(ptr) d3dx9_36.D3DXFrameNumNamedMatrices @ stdcall D3DXFrameRegisterNamedMatrices(ptr ptr) d3dx9_36.D3DXFrameRegisterNamedMatrices -@ stdcall D3DXFresnelTerm(long long) d3dx9_36.D3DXFresnelTerm +@ stdcall D3DXFresnelTerm(float float) d3dx9_36.D3DXFresnelTerm @ stdcall D3DXFVFFromDeclarator(ptr ptr) d3dx9_36.D3DXFVFFromDeclarator @ stdcall D3DXGatherFragments(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragments @ stdcall D3DXGatherFragmentsFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragmentsFromFileA @@ -147,11 +147,11 @@ @ stdcall D3DXGetDeclVertexSize(ptr long) d3dx9_36.D3DXGetDeclVertexSize @ stdcall D3DXGetDriverLevel(ptr) d3dx9_36.D3DXGetDriverLevel @ stdcall D3DXGetFVFVertexSize(long) d3dx9_36.D3DXGetFVFVertexSize -@ stdcall D3DXGetImageInfoFromFileA(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileA +@ stdcall D3DXGetImageInfoFromFileA(str ptr) d3dx9_36.D3DXGetImageInfoFromFileA @ stdcall D3DXGetImageInfoFromFileInMemory(ptr long ptr) d3dx9_36.D3DXGetImageInfoFromFileInMemory -@ stdcall D3DXGetImageInfoFromFileW(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileW -@ stdcall D3DXGetImageInfoFromResourceA(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceA -@ stdcall D3DXGetImageInfoFromResourceW(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW +@ stdcall D3DXGetImageInfoFromFileW(wstr ptr) d3dx9_36.D3DXGetImageInfoFromFileW +@ stdcall D3DXGetImageInfoFromResourceA(long str ptr) d3dx9_36.D3DXGetImageInfoFromResourceA +@ stdcall D3DXGetImageInfoFromResourceW(long wstr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW @ stdcall D3DXGetPixelShaderProfile(ptr) d3dx9_36.D3DXGetPixelShaderProfile @ stdcall D3DXGetShaderConstantTable(ptr ptr) d3dx9_36.D3DXGetShaderConstantTable @ stdcall D3DXGetShaderInputSemantics(ptr ptr ptr) d3dx9_36.D3DXGetShaderInputSemantics @@ -165,27 +165,27 @@ @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersect @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectSubset @ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectTri -@ stdcall D3DXLoadMeshFromXA(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA +@ stdcall D3DXLoadMeshFromXA(str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA @ stdcall D3DXLoadMeshFromXInMemory(ptr long long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXInMemory -@ stdcall D3DXLoadMeshFromXResource(long ptr ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource -@ stdcall D3DXLoadMeshFromXW(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW +@ stdcall D3DXLoadMeshFromXResource(long str str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource +@ stdcall D3DXLoadMeshFromXW(wstr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW @ stdcall D3DXLoadMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXof -@ stdcall D3DXLoadMeshHierarchyFromXA(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA +@ stdcall D3DXLoadMeshHierarchyFromXA(str long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA @ stdcall D3DXLoadMeshHierarchyFromXInMemory(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXInMemory -@ stdcall D3DXLoadMeshHierarchyFromXW(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW +@ stdcall D3DXLoadMeshHierarchyFromXW(wstr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW @ stdcall D3DXLoadPatchMeshFromXof(ptr long ptr ptr ptr long ptr) d3dx9_36.D3DXLoadPatchMeshFromXof @ stdcall D3DXLoadPRTBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileA @ stdcall D3DXLoadPRTBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileW @ stdcall D3DXLoadPRTCompBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileA @ stdcall D3DXLoadPRTCompBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileW @ stdcall D3DXLoadSkinMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadSkinMeshFromXof -@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA +@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA @ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileInMemory -@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW +@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW @ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromMemory -@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA -@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW -@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long) d3dx9_36.D3DXLoadSurfaceFromSurface +@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA +@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW +@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromSurface @ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileA @ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileInMemory @ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileW @@ -193,8 +193,8 @@ @ stdcall D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceA @ stdcall D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceW @ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadVolumeFromVolume -@ stdcall D3DXMatrixAffineTransformation(ptr long ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation -@ stdcall D3DXMatrixAffineTransformation2D(ptr long ptr long ptr) d3dx9_36.D3DXMatrixAffineTransformation2D +@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation +@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr) d3dx9_36.D3DXMatrixAffineTransformation2D @ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixDecompose @ stdcall D3DXMatrixDeterminant(ptr) d3dx9_36.D3DXMatrixDeterminant @ stdcall D3DXMatrixInverse(ptr ptr ptr) d3dx9_36.D3DXMatrixInverse @@ -202,28 +202,28 @@ @ stdcall D3DXMatrixLookAtRH(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixLookAtRH @ stdcall D3DXMatrixMultiply(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiply @ stdcall D3DXMatrixMultiplyTranspose(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiplyTranspose -@ stdcall D3DXMatrixOrthoLH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoLH -@ stdcall D3DXMatrixOrthoOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterLH -@ stdcall D3DXMatrixOrthoOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterRH -@ stdcall D3DXMatrixOrthoRH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoRH -@ stdcall D3DXMatrixPerspectiveFovLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovLH -@ stdcall D3DXMatrixPerspectiveFovRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovRH -@ stdcall D3DXMatrixPerspectiveLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveLH -@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH -@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH -@ stdcall D3DXMatrixPerspectiveRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveRH +@ stdcall D3DXMatrixOrthoLH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoLH +@ stdcall D3DXMatrixOrthoOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterLH +@ stdcall D3DXMatrixOrthoOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterRH +@ stdcall D3DXMatrixOrthoRH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoRH +@ stdcall D3DXMatrixPerspectiveFovLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovLH +@ stdcall D3DXMatrixPerspectiveFovRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovRH +@ stdcall D3DXMatrixPerspectiveLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveLH +@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH +@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH +@ stdcall D3DXMatrixPerspectiveRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveRH @ stdcall D3DXMatrixReflect(ptr ptr) d3dx9_36.D3DXMatrixReflect -@ stdcall D3DXMatrixRotationAxis(ptr ptr long) d3dx9_36.D3DXMatrixRotationAxis +@ stdcall D3DXMatrixRotationAxis(ptr ptr float) d3dx9_36.D3DXMatrixRotationAxis @ stdcall D3DXMatrixRotationQuaternion(ptr ptr) d3dx9_36.D3DXMatrixRotationQuaternion -@ stdcall D3DXMatrixRotationX(ptr long) d3dx9_36.D3DXMatrixRotationX -@ stdcall D3DXMatrixRotationY(ptr long) d3dx9_36.D3DXMatrixRotationY -@ stdcall D3DXMatrixRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXMatrixRotationYawPitchRoll -@ stdcall D3DXMatrixRotationZ(ptr long) d3dx9_36.D3DXMatrixRotationZ -@ stdcall D3DXMatrixScaling(ptr long long long) d3dx9_36.D3DXMatrixScaling +@ stdcall D3DXMatrixRotationX(ptr float) d3dx9_36.D3DXMatrixRotationX +@ stdcall D3DXMatrixRotationY(ptr float) d3dx9_36.D3DXMatrixRotationY +@ stdcall D3DXMatrixRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXMatrixRotationYawPitchRoll +@ stdcall D3DXMatrixRotationZ(ptr float) d3dx9_36.D3DXMatrixRotationZ +@ stdcall D3DXMatrixScaling(ptr float float float) d3dx9_36.D3DXMatrixScaling @ stdcall D3DXMatrixShadow(ptr ptr ptr) d3dx9_36.D3DXMatrixShadow @ stdcall D3DXMatrixTransformation(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXMatrixTransformation -@ stdcall D3DXMatrixTransformation2D(ptr ptr long ptr ptr long ptr) d3dx9_36.D3DXMatrixTransformation2D -@ stdcall D3DXMatrixTranslation(ptr long long long) d3dx9_36.D3DXMatrixTranslation +@ stdcall D3DXMatrixTransformation2D(ptr ptr float ptr ptr float ptr) d3dx9_36.D3DXMatrixTransformation2D +@ stdcall D3DXMatrixTranslation(ptr float float float) d3dx9_36.D3DXMatrixTranslation @ stdcall D3DXMatrixTranspose(ptr ptr) d3dx9_36.D3DXMatrixTranspose @ stdcall D3DXOptimizeFaces(ptr long long long ptr) d3dx9_36.D3DXOptimizeFaces @ stdcall D3DXOptimizeVertices(ptr long long long ptr) d3dx9_36.D3DXOptimizeVertices @@ -233,17 +233,17 @@ @ stdcall D3DXPlaneNormalize(ptr ptr) d3dx9_36.D3DXPlaneNormalize @ stdcall D3DXPlaneTransform(ptr ptr ptr) d3dx9_36.D3DXPlaneTransform @ stdcall D3DXPlaneTransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXPlaneTransformArray -@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXQuaternionBaryCentric +@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXQuaternionBaryCentric @ stdcall D3DXQuaternionExp(ptr ptr) d3dx9_36.D3DXQuaternionExp @ stdcall D3DXQuaternionInverse(ptr ptr) d3dx9_36.D3DXQuaternionInverse @ stdcall D3DXQuaternionLn(ptr ptr) d3dx9_36.D3DXQuaternionLn @ stdcall D3DXQuaternionMultiply(ptr ptr ptr) d3dx9_36.D3DXQuaternionMultiply @ stdcall D3DXQuaternionNormalize(ptr ptr) d3dx9_36.D3DXQuaternionNormalize -@ stdcall D3DXQuaternionRotationAxis(ptr ptr long) d3dx9_36.D3DXQuaternionRotationAxis +@ stdcall D3DXQuaternionRotationAxis(ptr ptr float) d3dx9_36.D3DXQuaternionRotationAxis @ stdcall D3DXQuaternionRotationMatrix(ptr ptr) d3dx9_36.D3DXQuaternionRotationMatrix -@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXQuaternionRotationYawPitchRoll -@ stdcall D3DXQuaternionSlerp(ptr ptr ptr long) d3dx9_36.D3DXQuaternionSlerp -@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXQuaternionSquad +@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXQuaternionRotationYawPitchRoll +@ stdcall D3DXQuaternionSlerp(ptr ptr ptr float) d3dx9_36.D3DXQuaternionSlerp +@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXQuaternionSquad @ stdcall D3DXQuaternionSquadSetup(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXQuaternionSquadSetup @ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr) d3dx9_36.D3DXQuaternionToAxisAngle @ stdcall D3DXRectPatchSize(ptr ptr ptr) d3dx9_36.D3DXRectPatchSize @@ -266,19 +266,19 @@ @ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW @ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd @ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot -@ stdcall D3DXSHEvalConeLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight +@ stdcall D3DXSHEvalConeLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight @ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection -@ stdcall D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight -@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight -@ stdcall D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight +@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight +@ stdcall D3DXSHEvalHemisphereLight(long ptr int128 int128 ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight +@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight @ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr) d3dx9_36.D3DXSHProjectCubeMap @ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC @ stdcall D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr) d3dx9_36.D3DXSHPRTCompSuperCluster @ stdcall D3DXSHRotate(ptr long ptr ptr) d3dx9_36.D3DXSHRotate -@ stdcall D3DXSHRotateZ(ptr long long ptr) d3dx9_36.D3DXSHRotateZ -@ stdcall D3DXSHScale(ptr long ptr ptr) d3dx9_36.D3DXSHScale +@ stdcall D3DXSHRotateZ(ptr long float ptr) d3dx9_36.D3DXSHRotateZ +@ stdcall D3DXSHScale(ptr long ptr float) d3dx9_36.D3DXSHScale @ stdcall D3DXSimplifyMesh(ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXSimplifyMesh -@ stdcall D3DXSphereBoundProbe(ptr long ptr ptr) d3dx9_36.D3DXSphereBoundProbe +@ stdcall D3DXSphereBoundProbe(ptr float ptr ptr) d3dx9_36.D3DXSphereBoundProbe @ stdcall D3DXSplitMesh(ptr ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSplitMesh @ stdcall D3DXTessellateNPatches(ptr ptr long long ptr ptr) d3dx9_36.D3DXTessellateNPatches @ stdcall D3DXTessellateRectPatch(ptr ptr ptr ptr ptr) d3dx9_36.D3DXTessellateRectPatch @@ -286,9 +286,9 @@ @ stdcall D3DXTriPatchSize(ptr ptr ptr) d3dx9_36.D3DXTriPatchSize @ stdcall D3DXValidMesh(ptr ptr ptr) d3dx9_36.D3DXValidMesh @ stdcall D3DXValidPatchMesh(ptr ptr ptr ptr) d3dx9_36.D3DXValidPatchMesh -@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec2BaryCentric -@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2CatmullRom -@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2Hermite +@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec2BaryCentric +@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2CatmullRom +@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2Hermite @ stdcall D3DXVec2Normalize(ptr ptr) d3dx9_36.D3DXVec2Normalize @ stdcall D3DXVec2Transform(ptr ptr ptr) d3dx9_36.D3DXVec2Transform @ stdcall D3DXVec2TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformArray @@ -296,9 +296,9 @@ @ stdcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformCoordArray @ stdcall D3DXVec2TransformNormal(ptr ptr ptr) d3dx9_36.D3DXVec2TransformNormal @ stdcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformNormalArray -@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec3BaryCentric -@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3CatmullRom -@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3Hermite +@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec3BaryCentric +@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3CatmullRom +@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3Hermite @ stdcall D3DXVec3Normalize(ptr ptr) d3dx9_36.D3DXVec3Normalize @ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Project @ stdcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3ProjectArray @@ -310,10 +310,10 @@ @ stdcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformNormalArray @ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Unproject @ stdcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3UnprojectArray -@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec4BaryCentric -@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4CatmullRom +@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec4BaryCentric +@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4CatmullRom @ stdcall D3DXVec4Cross(ptr ptr ptr ptr) d3dx9_36.D3DXVec4Cross -@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4Hermite +@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4Hermite @ stdcall D3DXVec4Normalize(ptr ptr) d3dx9_36.D3DXVec4Normalize @ stdcall D3DXVec4Transform(ptr ptr ptr) d3dx9_36.D3DXVec4Transform @ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec4TransformArray diff --git a/dll/directx/wine/d3dx9_24/d3dx9_24_main.c b/dll/directx/wine/d3dx9_24/d3dx9_24_main.c index 07293304e50..dad9f1cd95f 100644 --- a/dll/directx/wine/d3dx9_24/d3dx9_24_main.c +++ b/dll/directx/wine/d3dx9_24/d3dx9_24_main.c @@ -47,8 +47,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } diff --git a/dll/directx/wine/d3dx9_25/CMakeLists.txt b/dll/directx/wine/d3dx9_25/CMakeLists.txt index fc51ea71420..36b42f28e78 100644 --- a/dll/directx/wine/d3dx9_25/CMakeLists.txt +++ b/dll/directx/wine/d3dx9_25/CMakeLists.txt @@ -1,28 +1,16 @@ +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) + spec2def(d3dx9_25.dll d3dx9_25.spec) list(APPEND SOURCE d3dx9_25_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_25_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_25.def) -add_definitions(-D__WINESRC__) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_library(d3dx9_25 SHARED ${SOURCE}) +add_library(d3dx9_25 SHARED ${SOURCE} version.rc) set_module_type(d3dx9_25 win32dll) target_link_libraries(d3dx9_25 wine) - -add_importlibs(d3dx9_25 - d3dx9_36 - d3dx9_24 - d3d9 - user32 - gdi32 - advapi32 - msvcrt - kernel32 - ntdll) - -add_dependencies(d3dx9_25 wineheaders) +add_importlibs(d3dx9_25 d3dx9_30 msvcrt kernel32 ntdll) add_cd_file(TARGET d3dx9_25 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_25/d3dx9_25.spec b/dll/directx/wine/d3dx9_25/d3dx9_25.spec index 849d0ababe4..bd1ab6ac954 100644 --- a/dll/directx/wine/d3dx9_25/d3dx9_25.spec +++ b/dll/directx/wine/d3dx9_25/d3dx9_25.spec @@ -1,21 +1,21 @@ @ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShader -@ stdcall D3DXAssembleShaderFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA -@ stdcall D3DXAssembleShaderFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW -@ stdcall D3DXAssembleShaderFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA -@ stdcall D3DXAssembleShaderFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW +@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA +@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW +@ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA +@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW @ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) d3dx9_36.D3DXBoxBoundProbe -@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckCubeTextureRequirements -@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckTextureRequirements +@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckCubeTextureRequirements +@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckTextureRequirements @ stdcall D3DXCheckVersion(long long) -@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckVolumeTextureRequirements -@ stdcall D3DXCleanMesh(ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh -@ stdcall D3DXColorAdjustContrast(ptr ptr long) d3dx9_36.D3DXColorAdjustContrast -@ stdcall D3DXColorAdjustSaturation(ptr ptr long) d3dx9_36.D3DXColorAdjustSaturation -@ stdcall D3DXCompileShader(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShader -@ stdcall D3DXCompileShaderFromFileA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA -@ stdcall D3DXCompileShaderFromFileW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW -@ stdcall D3DXCompileShaderFromResourceA(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA -@ stdcall D3DXCompileShaderFromResourceW(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW +@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckVolumeTextureRequirements +@ stdcall D3DXCleanMesh(long ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh +@ stdcall D3DXColorAdjustContrast(ptr ptr float) d3dx9_36.D3DXColorAdjustContrast +@ stdcall D3DXColorAdjustSaturation(ptr ptr float) d3dx9_36.D3DXColorAdjustSaturation +@ stdcall D3DXCompileShader(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShader +@ stdcall D3DXCompileShaderFromFileA(str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA +@ stdcall D3DXCompileShaderFromFileW(wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW +@ stdcall D3DXCompileShaderFromResourceA(ptr str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA +@ stdcall D3DXCompileShaderFromResourceW(ptr wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW @ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingBox @ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingSphere @ stdcall D3DXComputeNormalMap(ptr ptr ptr long long long) d3dx9_36.D3DXComputeNormalMap @@ -26,9 +26,9 @@ @ stdcall D3DXConcatenateMeshes(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXConcatenateMeshes @ stdcall D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToSingleStrip @ stdcall D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToStrips -@ stdcall D3DXCpuOptimizations(long) d3dx9_24.D3DXCpuOptimizations +@ stdcall D3DXCpuOptimizations(long) d3dx9_30.D3DXCpuOptimizations @ stdcall D3DXCreateAnimationController(long long long long ptr) d3dx9_36.D3DXCreateAnimationController -@ stdcall D3DXCreateBox(ptr long long long ptr ptr) d3dx9_36.D3DXCreateBox +@ stdcall D3DXCreateBox(ptr float float float ptr ptr) d3dx9_36.D3DXCreateBox @ stdcall D3DXCreateBuffer(long ptr) d3dx9_36.D3DXCreateBuffer @ stdcall D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr) d3dx9_36.D3DXCreateCompressedAnimationSet @ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr) d3dx9_36.D3DXCreateCubeTexture @@ -45,24 +45,24 @@ @ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder @ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffect @ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler -@ stdcall D3DXCreateEffectCompilerFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA -@ stdcall D3DXCreateEffectCompilerFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW -@ stdcall D3DXCreateEffectCompilerFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA -@ stdcall D3DXCreateEffectCompilerFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW -@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx -@ stdcall D3DXCreateEffectFromFileA(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA -@ stdcall D3DXCreateEffectFromFileExA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA -@ stdcall D3DXCreateEffectFromFileExW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW -@ stdcall D3DXCreateEffectFromFileW(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW -@ stdcall D3DXCreateEffectFromResourceA(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA -@ stdcall D3DXCreateEffectFromResourceExA(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA -@ stdcall D3DXCreateEffectFromResourceExW(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW -@ stdcall D3DXCreateEffectFromResourceW(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW +@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA +@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW +@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA +@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW +@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx +@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA +@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA +@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW +@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW +@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA +@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA +@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW +@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW @ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool -@ stdcall D3DXCreateFontA(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontA +@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectW -@ stdcall D3DXCreateFontW(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontW +@ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) d3dx9_36.D3DXCreateFontW @ stdcall D3DXCreateFragmentLinker(ptr long ptr) d3dx9_36.D3DXCreateFragmentLinker @ stdcall D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateKeyframedAnimationSet @ stdcall D3DXCreateLine(ptr ptr) d3dx9_36.D3DXCreateLine @@ -83,22 +83,22 @@ @ stdcall D3DXCreateSkinInfo(long ptr long ptr) d3dx9_36.D3DXCreateSkinInfo @ stdcall D3DXCreateSkinInfoFromBlendedMesh(ptr long ptr ptr) d3dx9_36.D3DXCreateSkinInfoFromBlendedMesh @ stdcall D3DXCreateSkinInfoFVF(long long long ptr) d3dx9_36.D3DXCreateSkinInfoFVF -@ stdcall D3DXCreateSphere(ptr long long long ptr ptr) d3dx9_36.D3DXCreateSphere +@ stdcall D3DXCreateSphere(ptr float long long ptr ptr) d3dx9_36.D3DXCreateSphere @ stdcall D3DXCreateSprite(ptr ptr) d3dx9_36.D3DXCreateSprite @ stdcall D3DXCreateTeapot(ptr ptr ptr) d3dx9_36.D3DXCreateTeapot -@ stdcall D3DXCreateTextA(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextA -@ stdcall D3DXCreateTextW(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextW +@ stdcall D3DXCreateTextA(ptr long str float float ptr ptr ptr) d3dx9_36.D3DXCreateTextA +@ stdcall D3DXCreateTextW(ptr long wstr float float ptr ptr ptr) d3dx9_36.D3DXCreateTextW @ stdcall D3DXCreateTexture(ptr long long long long long long ptr) d3dx9_36.D3DXCreateTexture -@ stdcall D3DXCreateTextureFromFileA(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileA -@ stdcall D3DXCreateTextureFromFileExA(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA -@ stdcall D3DXCreateTextureFromFileExW(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW +@ stdcall D3DXCreateTextureFromFileA(ptr str ptr) d3dx9_36.D3DXCreateTextureFromFileA +@ stdcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA +@ stdcall D3DXCreateTextureFromFileExW(ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW @ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateTextureFromFileInMemory @ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileInMemoryEx -@ stdcall D3DXCreateTextureFromFileW(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileW -@ stdcall D3DXCreateTextureFromResourceA(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceA -@ stdcall D3DXCreateTextureFromResourceExA(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA -@ stdcall D3DXCreateTextureFromResourceExW(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW -@ stdcall D3DXCreateTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceW +@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromFileW +@ stdcall D3DXCreateTextureFromResourceA(ptr ptr str ptr) d3dx9_36.D3DXCreateTextureFromResourceA +@ stdcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA +@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW +@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromResourceW @ stdcall D3DXCreateTextureGutterHelper(long long ptr long ptr) d3dx9_36.D3DXCreateTextureGutterHelper @ stdcall D3DXCreateTextureShader(ptr ptr) d3dx9_36.D3DXCreateTextureShader @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateTorus @@ -134,7 +134,7 @@ @ stdcall D3DXFrameFind(ptr ptr) d3dx9_36.D3DXFrameFind @ stdcall D3DXFrameNumNamedMatrices(ptr) d3dx9_36.D3DXFrameNumNamedMatrices @ stdcall D3DXFrameRegisterNamedMatrices(ptr ptr) d3dx9_36.D3DXFrameRegisterNamedMatrices -@ stdcall D3DXFresnelTerm(long long) d3dx9_36.D3DXFresnelTerm +@ stdcall D3DXFresnelTerm(float float) d3dx9_36.D3DXFresnelTerm @ stdcall D3DXFVFFromDeclarator(ptr ptr) d3dx9_36.D3DXFVFFromDeclarator @ stdcall D3DXGatherFragments(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragments @ stdcall D3DXGatherFragmentsFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragmentsFromFileA @@ -147,11 +147,11 @@ @ stdcall D3DXGetDeclVertexSize(ptr long) d3dx9_36.D3DXGetDeclVertexSize @ stdcall D3DXGetDriverLevel(ptr) d3dx9_36.D3DXGetDriverLevel @ stdcall D3DXGetFVFVertexSize(long) d3dx9_36.D3DXGetFVFVertexSize -@ stdcall D3DXGetImageInfoFromFileA(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileA +@ stdcall D3DXGetImageInfoFromFileA(str ptr) d3dx9_36.D3DXGetImageInfoFromFileA @ stdcall D3DXGetImageInfoFromFileInMemory(ptr long ptr) d3dx9_36.D3DXGetImageInfoFromFileInMemory -@ stdcall D3DXGetImageInfoFromFileW(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileW -@ stdcall D3DXGetImageInfoFromResourceA(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceA -@ stdcall D3DXGetImageInfoFromResourceW(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW +@ stdcall D3DXGetImageInfoFromFileW(wstr ptr) d3dx9_36.D3DXGetImageInfoFromFileW +@ stdcall D3DXGetImageInfoFromResourceA(long str ptr) d3dx9_36.D3DXGetImageInfoFromResourceA +@ stdcall D3DXGetImageInfoFromResourceW(long wstr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW @ stdcall D3DXGetPixelShaderProfile(ptr) d3dx9_36.D3DXGetPixelShaderProfile @ stdcall D3DXGetShaderConstantTable(ptr ptr) d3dx9_36.D3DXGetShaderConstantTable @ stdcall D3DXGetShaderInputSemantics(ptr ptr ptr) d3dx9_36.D3DXGetShaderInputSemantics @@ -165,27 +165,27 @@ @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersect @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectSubset @ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectTri -@ stdcall D3DXLoadMeshFromXA(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA +@ stdcall D3DXLoadMeshFromXA(str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA @ stdcall D3DXLoadMeshFromXInMemory(ptr long long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXInMemory -@ stdcall D3DXLoadMeshFromXResource(long ptr ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource -@ stdcall D3DXLoadMeshFromXW(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW +@ stdcall D3DXLoadMeshFromXResource(long str str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource +@ stdcall D3DXLoadMeshFromXW(wstr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW @ stdcall D3DXLoadMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXof -@ stdcall D3DXLoadMeshHierarchyFromXA(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA +@ stdcall D3DXLoadMeshHierarchyFromXA(str long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA @ stdcall D3DXLoadMeshHierarchyFromXInMemory(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXInMemory -@ stdcall D3DXLoadMeshHierarchyFromXW(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW +@ stdcall D3DXLoadMeshHierarchyFromXW(wstr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW @ stdcall D3DXLoadPatchMeshFromXof(ptr long ptr ptr ptr long ptr) d3dx9_36.D3DXLoadPatchMeshFromXof @ stdcall D3DXLoadPRTBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileA @ stdcall D3DXLoadPRTBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileW @ stdcall D3DXLoadPRTCompBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileA @ stdcall D3DXLoadPRTCompBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileW @ stdcall D3DXLoadSkinMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadSkinMeshFromXof -@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA +@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA @ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileInMemory -@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW +@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW @ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromMemory -@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA -@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW -@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long) d3dx9_36.D3DXLoadSurfaceFromSurface +@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA +@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW +@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromSurface @ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileA @ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileInMemory @ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileW @@ -193,8 +193,8 @@ @ stdcall D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceA @ stdcall D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceW @ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadVolumeFromVolume -@ stdcall D3DXMatrixAffineTransformation(ptr long ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation -@ stdcall D3DXMatrixAffineTransformation2D(ptr long ptr long ptr) d3dx9_36.D3DXMatrixAffineTransformation2D +@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation +@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr) d3dx9_36.D3DXMatrixAffineTransformation2D @ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixDecompose @ stdcall D3DXMatrixDeterminant(ptr) d3dx9_36.D3DXMatrixDeterminant @ stdcall D3DXMatrixInverse(ptr ptr ptr) d3dx9_36.D3DXMatrixInverse @@ -202,28 +202,28 @@ @ stdcall D3DXMatrixLookAtRH(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixLookAtRH @ stdcall D3DXMatrixMultiply(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiply @ stdcall D3DXMatrixMultiplyTranspose(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiplyTranspose -@ stdcall D3DXMatrixOrthoLH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoLH -@ stdcall D3DXMatrixOrthoOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterLH -@ stdcall D3DXMatrixOrthoOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterRH -@ stdcall D3DXMatrixOrthoRH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoRH -@ stdcall D3DXMatrixPerspectiveFovLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovLH -@ stdcall D3DXMatrixPerspectiveFovRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovRH -@ stdcall D3DXMatrixPerspectiveLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveLH -@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH -@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH -@ stdcall D3DXMatrixPerspectiveRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveRH +@ stdcall D3DXMatrixOrthoLH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoLH +@ stdcall D3DXMatrixOrthoOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterLH +@ stdcall D3DXMatrixOrthoOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterRH +@ stdcall D3DXMatrixOrthoRH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoRH +@ stdcall D3DXMatrixPerspectiveFovLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovLH +@ stdcall D3DXMatrixPerspectiveFovRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovRH +@ stdcall D3DXMatrixPerspectiveLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveLH +@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH +@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH +@ stdcall D3DXMatrixPerspectiveRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveRH @ stdcall D3DXMatrixReflect(ptr ptr) d3dx9_36.D3DXMatrixReflect -@ stdcall D3DXMatrixRotationAxis(ptr ptr long) d3dx9_36.D3DXMatrixRotationAxis +@ stdcall D3DXMatrixRotationAxis(ptr ptr float) d3dx9_36.D3DXMatrixRotationAxis @ stdcall D3DXMatrixRotationQuaternion(ptr ptr) d3dx9_36.D3DXMatrixRotationQuaternion -@ stdcall D3DXMatrixRotationX(ptr long) d3dx9_36.D3DXMatrixRotationX -@ stdcall D3DXMatrixRotationY(ptr long) d3dx9_36.D3DXMatrixRotationY -@ stdcall D3DXMatrixRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXMatrixRotationYawPitchRoll -@ stdcall D3DXMatrixRotationZ(ptr long) d3dx9_36.D3DXMatrixRotationZ -@ stdcall D3DXMatrixScaling(ptr long long long) d3dx9_36.D3DXMatrixScaling +@ stdcall D3DXMatrixRotationX(ptr float) d3dx9_36.D3DXMatrixRotationX +@ stdcall D3DXMatrixRotationY(ptr float) d3dx9_36.D3DXMatrixRotationY +@ stdcall D3DXMatrixRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXMatrixRotationYawPitchRoll +@ stdcall D3DXMatrixRotationZ(ptr float) d3dx9_36.D3DXMatrixRotationZ +@ stdcall D3DXMatrixScaling(ptr float float float) d3dx9_36.D3DXMatrixScaling @ stdcall D3DXMatrixShadow(ptr ptr ptr) d3dx9_36.D3DXMatrixShadow @ stdcall D3DXMatrixTransformation(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXMatrixTransformation -@ stdcall D3DXMatrixTransformation2D(ptr ptr long ptr ptr long ptr) d3dx9_36.D3DXMatrixTransformation2D -@ stdcall D3DXMatrixTranslation(ptr long long long) d3dx9_36.D3DXMatrixTranslation +@ stdcall D3DXMatrixTransformation2D(ptr ptr float ptr ptr float ptr) d3dx9_36.D3DXMatrixTransformation2D +@ stdcall D3DXMatrixTranslation(ptr float float float) d3dx9_36.D3DXMatrixTranslation @ stdcall D3DXMatrixTranspose(ptr ptr) d3dx9_36.D3DXMatrixTranspose @ stdcall D3DXOptimizeFaces(ptr long long long ptr) d3dx9_36.D3DXOptimizeFaces @ stdcall D3DXOptimizeVertices(ptr long long long ptr) d3dx9_36.D3DXOptimizeVertices @@ -233,17 +233,17 @@ @ stdcall D3DXPlaneNormalize(ptr ptr) d3dx9_36.D3DXPlaneNormalize @ stdcall D3DXPlaneTransform(ptr ptr ptr) d3dx9_36.D3DXPlaneTransform @ stdcall D3DXPlaneTransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXPlaneTransformArray -@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXQuaternionBaryCentric +@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXQuaternionBaryCentric @ stdcall D3DXQuaternionExp(ptr ptr) d3dx9_36.D3DXQuaternionExp @ stdcall D3DXQuaternionInverse(ptr ptr) d3dx9_36.D3DXQuaternionInverse @ stdcall D3DXQuaternionLn(ptr ptr) d3dx9_36.D3DXQuaternionLn @ stdcall D3DXQuaternionMultiply(ptr ptr ptr) d3dx9_36.D3DXQuaternionMultiply @ stdcall D3DXQuaternionNormalize(ptr ptr) d3dx9_36.D3DXQuaternionNormalize -@ stdcall D3DXQuaternionRotationAxis(ptr ptr long) d3dx9_36.D3DXQuaternionRotationAxis +@ stdcall D3DXQuaternionRotationAxis(ptr ptr float) d3dx9_36.D3DXQuaternionRotationAxis @ stdcall D3DXQuaternionRotationMatrix(ptr ptr) d3dx9_36.D3DXQuaternionRotationMatrix -@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXQuaternionRotationYawPitchRoll -@ stdcall D3DXQuaternionSlerp(ptr ptr ptr long) d3dx9_36.D3DXQuaternionSlerp -@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXQuaternionSquad +@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXQuaternionRotationYawPitchRoll +@ stdcall D3DXQuaternionSlerp(ptr ptr ptr float) d3dx9_36.D3DXQuaternionSlerp +@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXQuaternionSquad @ stdcall D3DXQuaternionSquadSetup(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXQuaternionSquadSetup @ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr) d3dx9_36.D3DXQuaternionToAxisAngle @ stdcall D3DXRectPatchSize(ptr ptr ptr) d3dx9_36.D3DXRectPatchSize @@ -266,19 +266,19 @@ @ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW @ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd @ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot -@ stdcall D3DXSHEvalConeLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight +@ stdcall D3DXSHEvalConeLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight @ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection -@ stdcall D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight -@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight -@ stdcall D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight +@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight +@ stdcall D3DXSHEvalHemisphereLight(long ptr int128 int128 ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight +@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight @ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr) d3dx9_36.D3DXSHProjectCubeMap @ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC @ stdcall D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr) d3dx9_36.D3DXSHPRTCompSuperCluster @ stdcall D3DXSHRotate(ptr long ptr ptr) d3dx9_36.D3DXSHRotate -@ stdcall D3DXSHRotateZ(ptr long long ptr) d3dx9_36.D3DXSHRotateZ -@ stdcall D3DXSHScale(ptr long ptr ptr) d3dx9_36.D3DXSHScale +@ stdcall D3DXSHRotateZ(ptr long float ptr) d3dx9_36.D3DXSHRotateZ +@ stdcall D3DXSHScale(ptr long ptr float) d3dx9_36.D3DXSHScale @ stdcall D3DXSimplifyMesh(ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXSimplifyMesh -@ stdcall D3DXSphereBoundProbe(ptr long ptr ptr) d3dx9_36.D3DXSphereBoundProbe +@ stdcall D3DXSphereBoundProbe(ptr float ptr ptr) d3dx9_36.D3DXSphereBoundProbe @ stdcall D3DXSplitMesh(ptr ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSplitMesh @ stdcall D3DXTessellateNPatches(ptr ptr long long ptr ptr) d3dx9_36.D3DXTessellateNPatches @ stdcall D3DXTessellateRectPatch(ptr ptr ptr ptr ptr) d3dx9_36.D3DXTessellateRectPatch @@ -289,9 +289,9 @@ @ stdcall D3DXUVAtlasPartition(ptr long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXUVAtlasPartition @ stdcall D3DXValidMesh(ptr ptr ptr) d3dx9_36.D3DXValidMesh @ stdcall D3DXValidPatchMesh(ptr ptr ptr ptr) d3dx9_36.D3DXValidPatchMesh -@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec2BaryCentric -@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2CatmullRom -@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2Hermite +@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec2BaryCentric +@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2CatmullRom +@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2Hermite @ stdcall D3DXVec2Normalize(ptr ptr) d3dx9_36.D3DXVec2Normalize @ stdcall D3DXVec2Transform(ptr ptr ptr) d3dx9_36.D3DXVec2Transform @ stdcall D3DXVec2TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformArray @@ -299,9 +299,9 @@ @ stdcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformCoordArray @ stdcall D3DXVec2TransformNormal(ptr ptr ptr) d3dx9_36.D3DXVec2TransformNormal @ stdcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformNormalArray -@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec3BaryCentric -@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3CatmullRom -@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3Hermite +@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec3BaryCentric +@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3CatmullRom +@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3Hermite @ stdcall D3DXVec3Normalize(ptr ptr) d3dx9_36.D3DXVec3Normalize @ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Project @ stdcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3ProjectArray @@ -313,10 +313,10 @@ @ stdcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformNormalArray @ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Unproject @ stdcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3UnprojectArray -@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec4BaryCentric -@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4CatmullRom +@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec4BaryCentric +@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4CatmullRom @ stdcall D3DXVec4Cross(ptr ptr ptr ptr) d3dx9_36.D3DXVec4Cross -@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4Hermite +@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4Hermite @ stdcall D3DXVec4Normalize(ptr ptr) d3dx9_36.D3DXVec4Normalize @ stdcall D3DXVec4Transform(ptr ptr ptr) d3dx9_36.D3DXVec4Transform @ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec4TransformArray diff --git a/dll/directx/wine/d3dx9_25/d3dx9_25_main.c b/dll/directx/wine/d3dx9_25/d3dx9_25_main.c index 5d436825ccc..d306b1cb9a1 100644 --- a/dll/directx/wine/d3dx9_25/d3dx9_25_main.c +++ b/dll/directx/wine/d3dx9_25/d3dx9_25_main.c @@ -47,8 +47,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } diff --git a/dll/directx/wine/d3dx9_26/CMakeLists.txt b/dll/directx/wine/d3dx9_26/CMakeLists.txt index c6efb92b2ae..ba17b989de7 100644 --- a/dll/directx/wine/d3dx9_26/CMakeLists.txt +++ b/dll/directx/wine/d3dx9_26/CMakeLists.txt @@ -1,28 +1,16 @@ +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) + spec2def(d3dx9_26.dll d3dx9_26.spec) list(APPEND SOURCE d3dx9_26_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_26_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_26.def) -add_definitions(-D__WINESRC__) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_library(d3dx9_26 SHARED ${SOURCE}) +add_library(d3dx9_26 SHARED ${SOURCE} version.rc) set_module_type(d3dx9_26 win32dll) target_link_libraries(d3dx9_26 wine) - -add_importlibs(d3dx9_26 - d3d9 - d3dx9_36 - d3dx9_24 - user32 - gdi32 - advapi32 - msvcrt - kernel32 - ntdll) - -add_dependencies(d3dx9_26 wineheaders) +add_importlibs(d3dx9_26 d3dx9_30 msvcrt kernel32 ntdll) add_cd_file(TARGET d3dx9_26 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_26/d3dx9_26.spec b/dll/directx/wine/d3dx9_26/d3dx9_26.spec index 55d40425803..6ea2cea0b94 100644 --- a/dll/directx/wine/d3dx9_26/d3dx9_26.spec +++ b/dll/directx/wine/d3dx9_26/d3dx9_26.spec @@ -1,21 +1,21 @@ @ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShader -@ stdcall D3DXAssembleShaderFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA -@ stdcall D3DXAssembleShaderFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW -@ stdcall D3DXAssembleShaderFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA -@ stdcall D3DXAssembleShaderFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW +@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA +@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW +@ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA +@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW @ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) d3dx9_36.D3DXBoxBoundProbe -@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckCubeTextureRequirements -@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckTextureRequirements +@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckCubeTextureRequirements +@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckTextureRequirements @ stdcall D3DXCheckVersion(long long) -@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckVolumeTextureRequirements -@ stdcall D3DXCleanMesh(ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh -@ stdcall D3DXColorAdjustContrast(ptr ptr long) d3dx9_36.D3DXColorAdjustContrast -@ stdcall D3DXColorAdjustSaturation(ptr ptr long) d3dx9_36.D3DXColorAdjustSaturation -@ stdcall D3DXCompileShader(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShader -@ stdcall D3DXCompileShaderFromFileA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA -@ stdcall D3DXCompileShaderFromFileW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW -@ stdcall D3DXCompileShaderFromResourceA(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA -@ stdcall D3DXCompileShaderFromResourceW(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW +@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckVolumeTextureRequirements +@ stdcall D3DXCleanMesh(long ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh +@ stdcall D3DXColorAdjustContrast(ptr ptr float) d3dx9_36.D3DXColorAdjustContrast +@ stdcall D3DXColorAdjustSaturation(ptr ptr float) d3dx9_36.D3DXColorAdjustSaturation +@ stdcall D3DXCompileShader(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShader +@ stdcall D3DXCompileShaderFromFileA(str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA +@ stdcall D3DXCompileShaderFromFileW(wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW +@ stdcall D3DXCompileShaderFromResourceA(ptr str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA +@ stdcall D3DXCompileShaderFromResourceW(ptr wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW @ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingBox @ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingSphere @ stdcall D3DXComputeIMTFromPerVertexSignal(ptr ptr long long long ptr ptr ptr) d3dx9_36.D3DXComputeIMTFromPerVertexSignal @@ -30,9 +30,9 @@ @ stdcall D3DXConcatenateMeshes(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXConcatenateMeshes @ stdcall D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToSingleStrip @ stdcall D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToStrips -@ stdcall D3DXCpuOptimizations(long) d3dx9_24.D3DXCpuOptimizations +@ stdcall D3DXCpuOptimizations(long) d3dx9_30.D3DXCpuOptimizations @ stdcall D3DXCreateAnimationController(long long long long ptr) d3dx9_36.D3DXCreateAnimationController -@ stdcall D3DXCreateBox(ptr long long long ptr ptr) d3dx9_36.D3DXCreateBox +@ stdcall D3DXCreateBox(ptr float float float ptr ptr) d3dx9_36.D3DXCreateBox @ stdcall D3DXCreateBuffer(long ptr) d3dx9_36.D3DXCreateBuffer @ stdcall D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr) d3dx9_36.D3DXCreateCompressedAnimationSet @ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr) d3dx9_36.D3DXCreateCubeTexture @@ -49,24 +49,24 @@ @ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder @ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffect @ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler -@ stdcall D3DXCreateEffectCompilerFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA -@ stdcall D3DXCreateEffectCompilerFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW -@ stdcall D3DXCreateEffectCompilerFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA -@ stdcall D3DXCreateEffectCompilerFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW -@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx -@ stdcall D3DXCreateEffectFromFileA(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA -@ stdcall D3DXCreateEffectFromFileExA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA -@ stdcall D3DXCreateEffectFromFileExW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW -@ stdcall D3DXCreateEffectFromFileW(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW -@ stdcall D3DXCreateEffectFromResourceA(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA -@ stdcall D3DXCreateEffectFromResourceExA(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA -@ stdcall D3DXCreateEffectFromResourceExW(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW -@ stdcall D3DXCreateEffectFromResourceW(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW +@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA +@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW +@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA +@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW +@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx +@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA +@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA +@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW +@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW +@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA +@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA +@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW +@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW @ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool -@ stdcall D3DXCreateFontA(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontA +@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectW -@ stdcall D3DXCreateFontW(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontW +@ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) d3dx9_36.D3DXCreateFontW @ stdcall D3DXCreateFragmentLinker(ptr long ptr) d3dx9_36.D3DXCreateFragmentLinker @ stdcall D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateKeyframedAnimationSet @ stdcall D3DXCreateLine(ptr ptr) d3dx9_36.D3DXCreateLine @@ -87,22 +87,22 @@ @ stdcall D3DXCreateSkinInfo(long ptr long ptr) d3dx9_36.D3DXCreateSkinInfo @ stdcall D3DXCreateSkinInfoFromBlendedMesh(ptr long ptr ptr) d3dx9_36.D3DXCreateSkinInfoFromBlendedMesh @ stdcall D3DXCreateSkinInfoFVF(long long long ptr) d3dx9_36.D3DXCreateSkinInfoFVF -@ stdcall D3DXCreateSphere(ptr long long long ptr ptr) d3dx9_36.D3DXCreateSphere +@ stdcall D3DXCreateSphere(ptr float long long ptr ptr) d3dx9_36.D3DXCreateSphere @ stdcall D3DXCreateSprite(ptr ptr) d3dx9_36.D3DXCreateSprite @ stdcall D3DXCreateTeapot(ptr ptr ptr) d3dx9_36.D3DXCreateTeapot -@ stdcall D3DXCreateTextA(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextA -@ stdcall D3DXCreateTextW(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextW +@ stdcall D3DXCreateTextA(ptr long str float float ptr ptr ptr) d3dx9_36.D3DXCreateTextA +@ stdcall D3DXCreateTextW(ptr long wstr float float ptr ptr ptr) d3dx9_36.D3DXCreateTextW @ stdcall D3DXCreateTexture(ptr long long long long long long ptr) d3dx9_36.D3DXCreateTexture -@ stdcall D3DXCreateTextureFromFileA(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileA -@ stdcall D3DXCreateTextureFromFileExA(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA -@ stdcall D3DXCreateTextureFromFileExW(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW +@ stdcall D3DXCreateTextureFromFileA(ptr str ptr) d3dx9_36.D3DXCreateTextureFromFileA +@ stdcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA +@ stdcall D3DXCreateTextureFromFileExW(ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW @ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateTextureFromFileInMemory @ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileInMemoryEx -@ stdcall D3DXCreateTextureFromFileW(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileW -@ stdcall D3DXCreateTextureFromResourceA(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceA -@ stdcall D3DXCreateTextureFromResourceExA(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA -@ stdcall D3DXCreateTextureFromResourceExW(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW -@ stdcall D3DXCreateTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceW +@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromFileW +@ stdcall D3DXCreateTextureFromResourceA(ptr ptr str ptr) d3dx9_36.D3DXCreateTextureFromResourceA +@ stdcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA +@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW +@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromResourceW @ stdcall D3DXCreateTextureGutterHelper(long long ptr long ptr) d3dx9_36.D3DXCreateTextureGutterHelper @ stdcall D3DXCreateTextureShader(ptr ptr) d3dx9_36.D3DXCreateTextureShader @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateTorus @@ -138,7 +138,7 @@ @ stdcall D3DXFrameFind(ptr ptr) d3dx9_36.D3DXFrameFind @ stdcall D3DXFrameNumNamedMatrices(ptr) d3dx9_36.D3DXFrameNumNamedMatrices @ stdcall D3DXFrameRegisterNamedMatrices(ptr ptr) d3dx9_36.D3DXFrameRegisterNamedMatrices -@ stdcall D3DXFresnelTerm(long long) d3dx9_36.D3DXFresnelTerm +@ stdcall D3DXFresnelTerm(float float) d3dx9_36.D3DXFresnelTerm @ stdcall D3DXFVFFromDeclarator(ptr ptr) d3dx9_36.D3DXFVFFromDeclarator @ stdcall D3DXGatherFragments(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragments @ stdcall D3DXGatherFragmentsFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragmentsFromFileA @@ -151,11 +151,11 @@ @ stdcall D3DXGetDeclVertexSize(ptr long) d3dx9_36.D3DXGetDeclVertexSize @ stdcall D3DXGetDriverLevel(ptr) d3dx9_36.D3DXGetDriverLevel @ stdcall D3DXGetFVFVertexSize(long) d3dx9_36.D3DXGetFVFVertexSize -@ stdcall D3DXGetImageInfoFromFileA(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileA +@ stdcall D3DXGetImageInfoFromFileA(str ptr) d3dx9_36.D3DXGetImageInfoFromFileA @ stdcall D3DXGetImageInfoFromFileInMemory(ptr long ptr) d3dx9_36.D3DXGetImageInfoFromFileInMemory -@ stdcall D3DXGetImageInfoFromFileW(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileW -@ stdcall D3DXGetImageInfoFromResourceA(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceA -@ stdcall D3DXGetImageInfoFromResourceW(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW +@ stdcall D3DXGetImageInfoFromFileW(wstr ptr) d3dx9_36.D3DXGetImageInfoFromFileW +@ stdcall D3DXGetImageInfoFromResourceA(long str ptr) d3dx9_36.D3DXGetImageInfoFromResourceA +@ stdcall D3DXGetImageInfoFromResourceW(long wstr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW @ stdcall D3DXGetPixelShaderProfile(ptr) d3dx9_36.D3DXGetPixelShaderProfile @ stdcall D3DXGetShaderConstantTable(ptr ptr) d3dx9_36.D3DXGetShaderConstantTable @ stdcall D3DXGetShaderInputSemantics(ptr ptr ptr) d3dx9_36.D3DXGetShaderInputSemantics @@ -169,27 +169,27 @@ @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersect @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectSubset @ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectTri -@ stdcall D3DXLoadMeshFromXA(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA +@ stdcall D3DXLoadMeshFromXA(str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA @ stdcall D3DXLoadMeshFromXInMemory(ptr long long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXInMemory -@ stdcall D3DXLoadMeshFromXResource(long ptr ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource -@ stdcall D3DXLoadMeshFromXW(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW +@ stdcall D3DXLoadMeshFromXResource(long str str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource +@ stdcall D3DXLoadMeshFromXW(wstr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW @ stdcall D3DXLoadMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXof -@ stdcall D3DXLoadMeshHierarchyFromXA(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA +@ stdcall D3DXLoadMeshHierarchyFromXA(str long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA @ stdcall D3DXLoadMeshHierarchyFromXInMemory(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXInMemory -@ stdcall D3DXLoadMeshHierarchyFromXW(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW +@ stdcall D3DXLoadMeshHierarchyFromXW(wstr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW @ stdcall D3DXLoadPatchMeshFromXof(ptr long ptr ptr ptr long ptr) d3dx9_36.D3DXLoadPatchMeshFromXof @ stdcall D3DXLoadPRTBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileA @ stdcall D3DXLoadPRTBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileW @ stdcall D3DXLoadPRTCompBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileA @ stdcall D3DXLoadPRTCompBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileW @ stdcall D3DXLoadSkinMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadSkinMeshFromXof -@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA +@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA @ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileInMemory -@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW +@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW @ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromMemory -@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA -@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW -@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long) d3dx9_36.D3DXLoadSurfaceFromSurface +@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA +@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW +@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromSurface @ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileA @ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileInMemory @ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileW @@ -197,8 +197,8 @@ @ stdcall D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceA @ stdcall D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceW @ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadVolumeFromVolume -@ stdcall D3DXMatrixAffineTransformation(ptr long ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation -@ stdcall D3DXMatrixAffineTransformation2D(ptr long ptr long ptr) d3dx9_36.D3DXMatrixAffineTransformation2D +@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation +@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr) d3dx9_36.D3DXMatrixAffineTransformation2D @ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixDecompose @ stdcall D3DXMatrixDeterminant(ptr) d3dx9_36.D3DXMatrixDeterminant @ stdcall D3DXMatrixInverse(ptr ptr ptr) d3dx9_36.D3DXMatrixInverse @@ -206,28 +206,28 @@ @ stdcall D3DXMatrixLookAtRH(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixLookAtRH @ stdcall D3DXMatrixMultiply(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiply @ stdcall D3DXMatrixMultiplyTranspose(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiplyTranspose -@ stdcall D3DXMatrixOrthoLH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoLH -@ stdcall D3DXMatrixOrthoOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterLH -@ stdcall D3DXMatrixOrthoOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterRH -@ stdcall D3DXMatrixOrthoRH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoRH -@ stdcall D3DXMatrixPerspectiveFovLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovLH -@ stdcall D3DXMatrixPerspectiveFovRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovRH -@ stdcall D3DXMatrixPerspectiveLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveLH -@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH -@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH -@ stdcall D3DXMatrixPerspectiveRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveRH +@ stdcall D3DXMatrixOrthoLH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoLH +@ stdcall D3DXMatrixOrthoOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterLH +@ stdcall D3DXMatrixOrthoOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterRH +@ stdcall D3DXMatrixOrthoRH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoRH +@ stdcall D3DXMatrixPerspectiveFovLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovLH +@ stdcall D3DXMatrixPerspectiveFovRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovRH +@ stdcall D3DXMatrixPerspectiveLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveLH +@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH +@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH +@ stdcall D3DXMatrixPerspectiveRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveRH @ stdcall D3DXMatrixReflect(ptr ptr) d3dx9_36.D3DXMatrixReflect -@ stdcall D3DXMatrixRotationAxis(ptr ptr long) d3dx9_36.D3DXMatrixRotationAxis +@ stdcall D3DXMatrixRotationAxis(ptr ptr float) d3dx9_36.D3DXMatrixRotationAxis @ stdcall D3DXMatrixRotationQuaternion(ptr ptr) d3dx9_36.D3DXMatrixRotationQuaternion -@ stdcall D3DXMatrixRotationX(ptr long) d3dx9_36.D3DXMatrixRotationX -@ stdcall D3DXMatrixRotationY(ptr long) d3dx9_36.D3DXMatrixRotationY -@ stdcall D3DXMatrixRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXMatrixRotationYawPitchRoll -@ stdcall D3DXMatrixRotationZ(ptr long) d3dx9_36.D3DXMatrixRotationZ -@ stdcall D3DXMatrixScaling(ptr long long long) d3dx9_36.D3DXMatrixScaling +@ stdcall D3DXMatrixRotationX(ptr float) d3dx9_36.D3DXMatrixRotationX +@ stdcall D3DXMatrixRotationY(ptr float) d3dx9_36.D3DXMatrixRotationY +@ stdcall D3DXMatrixRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXMatrixRotationYawPitchRoll +@ stdcall D3DXMatrixRotationZ(ptr float) d3dx9_36.D3DXMatrixRotationZ +@ stdcall D3DXMatrixScaling(ptr float float float) d3dx9_36.D3DXMatrixScaling @ stdcall D3DXMatrixShadow(ptr ptr ptr) d3dx9_36.D3DXMatrixShadow @ stdcall D3DXMatrixTransformation(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXMatrixTransformation -@ stdcall D3DXMatrixTransformation2D(ptr ptr long ptr ptr long ptr) d3dx9_36.D3DXMatrixTransformation2D -@ stdcall D3DXMatrixTranslation(ptr long long long) d3dx9_36.D3DXMatrixTranslation +@ stdcall D3DXMatrixTransformation2D(ptr ptr float ptr ptr float ptr) d3dx9_36.D3DXMatrixTransformation2D +@ stdcall D3DXMatrixTranslation(ptr float float float) d3dx9_36.D3DXMatrixTranslation @ stdcall D3DXMatrixTranspose(ptr ptr) d3dx9_36.D3DXMatrixTranspose @ stdcall D3DXOptimizeFaces(ptr long long long ptr) d3dx9_36.D3DXOptimizeFaces @ stdcall D3DXOptimizeVertices(ptr long long long ptr) d3dx9_36.D3DXOptimizeVertices @@ -237,17 +237,17 @@ @ stdcall D3DXPlaneNormalize(ptr ptr) d3dx9_36.D3DXPlaneNormalize @ stdcall D3DXPlaneTransform(ptr ptr ptr) d3dx9_36.D3DXPlaneTransform @ stdcall D3DXPlaneTransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXPlaneTransformArray -@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXQuaternionBaryCentric +@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXQuaternionBaryCentric @ stdcall D3DXQuaternionExp(ptr ptr) d3dx9_36.D3DXQuaternionExp @ stdcall D3DXQuaternionInverse(ptr ptr) d3dx9_36.D3DXQuaternionInverse @ stdcall D3DXQuaternionLn(ptr ptr) d3dx9_36.D3DXQuaternionLn @ stdcall D3DXQuaternionMultiply(ptr ptr ptr) d3dx9_36.D3DXQuaternionMultiply @ stdcall D3DXQuaternionNormalize(ptr ptr) d3dx9_36.D3DXQuaternionNormalize -@ stdcall D3DXQuaternionRotationAxis(ptr ptr long) d3dx9_36.D3DXQuaternionRotationAxis +@ stdcall D3DXQuaternionRotationAxis(ptr ptr float) d3dx9_36.D3DXQuaternionRotationAxis @ stdcall D3DXQuaternionRotationMatrix(ptr ptr) d3dx9_36.D3DXQuaternionRotationMatrix -@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXQuaternionRotationYawPitchRoll -@ stdcall D3DXQuaternionSlerp(ptr ptr ptr long) d3dx9_36.D3DXQuaternionSlerp -@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXQuaternionSquad +@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXQuaternionRotationYawPitchRoll +@ stdcall D3DXQuaternionSlerp(ptr ptr ptr float) d3dx9_36.D3DXQuaternionSlerp +@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXQuaternionSquad @ stdcall D3DXQuaternionSquadSetup(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXQuaternionSquadSetup @ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr) d3dx9_36.D3DXQuaternionToAxisAngle @ stdcall D3DXRectPatchSize(ptr ptr ptr) d3dx9_36.D3DXRectPatchSize @@ -270,19 +270,19 @@ @ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW @ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd @ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot -@ stdcall D3DXSHEvalConeLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight +@ stdcall D3DXSHEvalConeLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight @ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection -@ stdcall D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight -@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight -@ stdcall D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight +@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight +@ stdcall D3DXSHEvalHemisphereLight(long ptr int128 int128 ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight +@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight @ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr) d3dx9_36.D3DXSHProjectCubeMap @ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC @ stdcall D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr) d3dx9_36.D3DXSHPRTCompSuperCluster @ stdcall D3DXSHRotate(ptr long ptr ptr) d3dx9_36.D3DXSHRotate -@ stdcall D3DXSHRotateZ(ptr long long ptr) d3dx9_36.D3DXSHRotateZ -@ stdcall D3DXSHScale(ptr long ptr ptr) d3dx9_36.D3DXSHScale +@ stdcall D3DXSHRotateZ(ptr long float ptr) d3dx9_36.D3DXSHRotateZ +@ stdcall D3DXSHScale(ptr long ptr float) d3dx9_36.D3DXSHScale @ stdcall D3DXSimplifyMesh(ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXSimplifyMesh -@ stdcall D3DXSphereBoundProbe(ptr long ptr ptr) d3dx9_36.D3DXSphereBoundProbe +@ stdcall D3DXSphereBoundProbe(ptr float ptr ptr) d3dx9_36.D3DXSphereBoundProbe @ stdcall D3DXSplitMesh(ptr ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSplitMesh @ stdcall D3DXTessellateNPatches(ptr ptr long long ptr ptr) d3dx9_36.D3DXTessellateNPatches @ stdcall D3DXTessellateRectPatch(ptr ptr ptr ptr ptr) d3dx9_36.D3DXTessellateRectPatch @@ -293,9 +293,9 @@ @ stdcall D3DXUVAtlasPartition(ptr long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXUVAtlasPartition @ stdcall D3DXValidMesh(ptr ptr ptr) d3dx9_36.D3DXValidMesh @ stdcall D3DXValidPatchMesh(ptr ptr ptr ptr) d3dx9_36.D3DXValidPatchMesh -@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec2BaryCentric -@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2CatmullRom -@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2Hermite +@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec2BaryCentric +@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2CatmullRom +@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2Hermite @ stdcall D3DXVec2Normalize(ptr ptr) d3dx9_36.D3DXVec2Normalize @ stdcall D3DXVec2Transform(ptr ptr ptr) d3dx9_36.D3DXVec2Transform @ stdcall D3DXVec2TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformArray @@ -303,9 +303,9 @@ @ stdcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformCoordArray @ stdcall D3DXVec2TransformNormal(ptr ptr ptr) d3dx9_36.D3DXVec2TransformNormal @ stdcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformNormalArray -@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec3BaryCentric -@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3CatmullRom -@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3Hermite +@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec3BaryCentric +@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3CatmullRom +@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3Hermite @ stdcall D3DXVec3Normalize(ptr ptr) d3dx9_36.D3DXVec3Normalize @ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Project @ stdcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3ProjectArray @@ -317,10 +317,10 @@ @ stdcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformNormalArray @ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Unproject @ stdcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3UnprojectArray -@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec4BaryCentric -@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4CatmullRom +@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec4BaryCentric +@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4CatmullRom @ stdcall D3DXVec4Cross(ptr ptr ptr ptr) d3dx9_36.D3DXVec4Cross -@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4Hermite +@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4Hermite @ stdcall D3DXVec4Normalize(ptr ptr) d3dx9_36.D3DXVec4Normalize @ stdcall D3DXVec4Transform(ptr ptr ptr) d3dx9_36.D3DXVec4Transform @ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec4TransformArray diff --git a/dll/directx/wine/d3dx9_26/d3dx9_26_main.c b/dll/directx/wine/d3dx9_26/d3dx9_26_main.c index 267339614db..c88ced59fcd 100644 --- a/dll/directx/wine/d3dx9_26/d3dx9_26_main.c +++ b/dll/directx/wine/d3dx9_26/d3dx9_26_main.c @@ -47,8 +47,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } diff --git a/dll/directx/wine/d3dx9_27/CMakeLists.txt b/dll/directx/wine/d3dx9_27/CMakeLists.txt index a79898a8a4f..239cec6d611 100644 --- a/dll/directx/wine/d3dx9_27/CMakeLists.txt +++ b/dll/directx/wine/d3dx9_27/CMakeLists.txt @@ -1,28 +1,16 @@ +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) + spec2def(d3dx9_27.dll d3dx9_27.spec) list(APPEND SOURCE d3dx9_27_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_27_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_27.def) -add_definitions(-D__WINESRC__) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_library(d3dx9_27 SHARED ${SOURCE}) +add_library(d3dx9_27 SHARED ${SOURCE} version.rc) set_module_type(d3dx9_27 win32dll) target_link_libraries(d3dx9_27 wine) - -add_importlibs(d3dx9_27 - d3d9 - d3dx9_24 - d3dx9_36 - user32 - gdi32 - advapi32 - msvcrt - kernel32 - ntdll) - -add_dependencies(d3dx9_27 wineheaders) +add_importlibs(d3dx9_27 d3dx9_30 msvcrt kernel32 ntdll) add_cd_file(TARGET d3dx9_27 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_27/d3dx9_27.spec b/dll/directx/wine/d3dx9_27/d3dx9_27.spec index 55d40425803..6ea2cea0b94 100644 --- a/dll/directx/wine/d3dx9_27/d3dx9_27.spec +++ b/dll/directx/wine/d3dx9_27/d3dx9_27.spec @@ -1,21 +1,21 @@ @ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShader -@ stdcall D3DXAssembleShaderFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA -@ stdcall D3DXAssembleShaderFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW -@ stdcall D3DXAssembleShaderFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA -@ stdcall D3DXAssembleShaderFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW +@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA +@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW +@ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA +@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW @ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) d3dx9_36.D3DXBoxBoundProbe -@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckCubeTextureRequirements -@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckTextureRequirements +@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckCubeTextureRequirements +@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckTextureRequirements @ stdcall D3DXCheckVersion(long long) -@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckVolumeTextureRequirements -@ stdcall D3DXCleanMesh(ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh -@ stdcall D3DXColorAdjustContrast(ptr ptr long) d3dx9_36.D3DXColorAdjustContrast -@ stdcall D3DXColorAdjustSaturation(ptr ptr long) d3dx9_36.D3DXColorAdjustSaturation -@ stdcall D3DXCompileShader(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShader -@ stdcall D3DXCompileShaderFromFileA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA -@ stdcall D3DXCompileShaderFromFileW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW -@ stdcall D3DXCompileShaderFromResourceA(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA -@ stdcall D3DXCompileShaderFromResourceW(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW +@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckVolumeTextureRequirements +@ stdcall D3DXCleanMesh(long ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh +@ stdcall D3DXColorAdjustContrast(ptr ptr float) d3dx9_36.D3DXColorAdjustContrast +@ stdcall D3DXColorAdjustSaturation(ptr ptr float) d3dx9_36.D3DXColorAdjustSaturation +@ stdcall D3DXCompileShader(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShader +@ stdcall D3DXCompileShaderFromFileA(str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA +@ stdcall D3DXCompileShaderFromFileW(wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW +@ stdcall D3DXCompileShaderFromResourceA(ptr str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA +@ stdcall D3DXCompileShaderFromResourceW(ptr wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW @ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingBox @ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingSphere @ stdcall D3DXComputeIMTFromPerVertexSignal(ptr ptr long long long ptr ptr ptr) d3dx9_36.D3DXComputeIMTFromPerVertexSignal @@ -30,9 +30,9 @@ @ stdcall D3DXConcatenateMeshes(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXConcatenateMeshes @ stdcall D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToSingleStrip @ stdcall D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToStrips -@ stdcall D3DXCpuOptimizations(long) d3dx9_24.D3DXCpuOptimizations +@ stdcall D3DXCpuOptimizations(long) d3dx9_30.D3DXCpuOptimizations @ stdcall D3DXCreateAnimationController(long long long long ptr) d3dx9_36.D3DXCreateAnimationController -@ stdcall D3DXCreateBox(ptr long long long ptr ptr) d3dx9_36.D3DXCreateBox +@ stdcall D3DXCreateBox(ptr float float float ptr ptr) d3dx9_36.D3DXCreateBox @ stdcall D3DXCreateBuffer(long ptr) d3dx9_36.D3DXCreateBuffer @ stdcall D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr) d3dx9_36.D3DXCreateCompressedAnimationSet @ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr) d3dx9_36.D3DXCreateCubeTexture @@ -49,24 +49,24 @@ @ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder @ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffect @ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler -@ stdcall D3DXCreateEffectCompilerFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA -@ stdcall D3DXCreateEffectCompilerFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW -@ stdcall D3DXCreateEffectCompilerFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA -@ stdcall D3DXCreateEffectCompilerFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW -@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx -@ stdcall D3DXCreateEffectFromFileA(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA -@ stdcall D3DXCreateEffectFromFileExA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA -@ stdcall D3DXCreateEffectFromFileExW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW -@ stdcall D3DXCreateEffectFromFileW(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW -@ stdcall D3DXCreateEffectFromResourceA(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA -@ stdcall D3DXCreateEffectFromResourceExA(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA -@ stdcall D3DXCreateEffectFromResourceExW(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW -@ stdcall D3DXCreateEffectFromResourceW(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW +@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA +@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW +@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA +@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW +@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx +@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA +@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA +@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW +@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW +@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA +@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA +@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW +@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW @ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool -@ stdcall D3DXCreateFontA(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontA +@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectW -@ stdcall D3DXCreateFontW(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontW +@ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) d3dx9_36.D3DXCreateFontW @ stdcall D3DXCreateFragmentLinker(ptr long ptr) d3dx9_36.D3DXCreateFragmentLinker @ stdcall D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateKeyframedAnimationSet @ stdcall D3DXCreateLine(ptr ptr) d3dx9_36.D3DXCreateLine @@ -87,22 +87,22 @@ @ stdcall D3DXCreateSkinInfo(long ptr long ptr) d3dx9_36.D3DXCreateSkinInfo @ stdcall D3DXCreateSkinInfoFromBlendedMesh(ptr long ptr ptr) d3dx9_36.D3DXCreateSkinInfoFromBlendedMesh @ stdcall D3DXCreateSkinInfoFVF(long long long ptr) d3dx9_36.D3DXCreateSkinInfoFVF -@ stdcall D3DXCreateSphere(ptr long long long ptr ptr) d3dx9_36.D3DXCreateSphere +@ stdcall D3DXCreateSphere(ptr float long long ptr ptr) d3dx9_36.D3DXCreateSphere @ stdcall D3DXCreateSprite(ptr ptr) d3dx9_36.D3DXCreateSprite @ stdcall D3DXCreateTeapot(ptr ptr ptr) d3dx9_36.D3DXCreateTeapot -@ stdcall D3DXCreateTextA(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextA -@ stdcall D3DXCreateTextW(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextW +@ stdcall D3DXCreateTextA(ptr long str float float ptr ptr ptr) d3dx9_36.D3DXCreateTextA +@ stdcall D3DXCreateTextW(ptr long wstr float float ptr ptr ptr) d3dx9_36.D3DXCreateTextW @ stdcall D3DXCreateTexture(ptr long long long long long long ptr) d3dx9_36.D3DXCreateTexture -@ stdcall D3DXCreateTextureFromFileA(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileA -@ stdcall D3DXCreateTextureFromFileExA(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA -@ stdcall D3DXCreateTextureFromFileExW(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW +@ stdcall D3DXCreateTextureFromFileA(ptr str ptr) d3dx9_36.D3DXCreateTextureFromFileA +@ stdcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA +@ stdcall D3DXCreateTextureFromFileExW(ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW @ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateTextureFromFileInMemory @ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileInMemoryEx -@ stdcall D3DXCreateTextureFromFileW(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileW -@ stdcall D3DXCreateTextureFromResourceA(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceA -@ stdcall D3DXCreateTextureFromResourceExA(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA -@ stdcall D3DXCreateTextureFromResourceExW(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW -@ stdcall D3DXCreateTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceW +@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromFileW +@ stdcall D3DXCreateTextureFromResourceA(ptr ptr str ptr) d3dx9_36.D3DXCreateTextureFromResourceA +@ stdcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA +@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW +@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromResourceW @ stdcall D3DXCreateTextureGutterHelper(long long ptr long ptr) d3dx9_36.D3DXCreateTextureGutterHelper @ stdcall D3DXCreateTextureShader(ptr ptr) d3dx9_36.D3DXCreateTextureShader @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateTorus @@ -138,7 +138,7 @@ @ stdcall D3DXFrameFind(ptr ptr) d3dx9_36.D3DXFrameFind @ stdcall D3DXFrameNumNamedMatrices(ptr) d3dx9_36.D3DXFrameNumNamedMatrices @ stdcall D3DXFrameRegisterNamedMatrices(ptr ptr) d3dx9_36.D3DXFrameRegisterNamedMatrices -@ stdcall D3DXFresnelTerm(long long) d3dx9_36.D3DXFresnelTerm +@ stdcall D3DXFresnelTerm(float float) d3dx9_36.D3DXFresnelTerm @ stdcall D3DXFVFFromDeclarator(ptr ptr) d3dx9_36.D3DXFVFFromDeclarator @ stdcall D3DXGatherFragments(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragments @ stdcall D3DXGatherFragmentsFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragmentsFromFileA @@ -151,11 +151,11 @@ @ stdcall D3DXGetDeclVertexSize(ptr long) d3dx9_36.D3DXGetDeclVertexSize @ stdcall D3DXGetDriverLevel(ptr) d3dx9_36.D3DXGetDriverLevel @ stdcall D3DXGetFVFVertexSize(long) d3dx9_36.D3DXGetFVFVertexSize -@ stdcall D3DXGetImageInfoFromFileA(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileA +@ stdcall D3DXGetImageInfoFromFileA(str ptr) d3dx9_36.D3DXGetImageInfoFromFileA @ stdcall D3DXGetImageInfoFromFileInMemory(ptr long ptr) d3dx9_36.D3DXGetImageInfoFromFileInMemory -@ stdcall D3DXGetImageInfoFromFileW(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileW -@ stdcall D3DXGetImageInfoFromResourceA(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceA -@ stdcall D3DXGetImageInfoFromResourceW(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW +@ stdcall D3DXGetImageInfoFromFileW(wstr ptr) d3dx9_36.D3DXGetImageInfoFromFileW +@ stdcall D3DXGetImageInfoFromResourceA(long str ptr) d3dx9_36.D3DXGetImageInfoFromResourceA +@ stdcall D3DXGetImageInfoFromResourceW(long wstr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW @ stdcall D3DXGetPixelShaderProfile(ptr) d3dx9_36.D3DXGetPixelShaderProfile @ stdcall D3DXGetShaderConstantTable(ptr ptr) d3dx9_36.D3DXGetShaderConstantTable @ stdcall D3DXGetShaderInputSemantics(ptr ptr ptr) d3dx9_36.D3DXGetShaderInputSemantics @@ -169,27 +169,27 @@ @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersect @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectSubset @ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectTri -@ stdcall D3DXLoadMeshFromXA(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA +@ stdcall D3DXLoadMeshFromXA(str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA @ stdcall D3DXLoadMeshFromXInMemory(ptr long long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXInMemory -@ stdcall D3DXLoadMeshFromXResource(long ptr ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource -@ stdcall D3DXLoadMeshFromXW(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW +@ stdcall D3DXLoadMeshFromXResource(long str str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource +@ stdcall D3DXLoadMeshFromXW(wstr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW @ stdcall D3DXLoadMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXof -@ stdcall D3DXLoadMeshHierarchyFromXA(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA +@ stdcall D3DXLoadMeshHierarchyFromXA(str long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA @ stdcall D3DXLoadMeshHierarchyFromXInMemory(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXInMemory -@ stdcall D3DXLoadMeshHierarchyFromXW(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW +@ stdcall D3DXLoadMeshHierarchyFromXW(wstr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW @ stdcall D3DXLoadPatchMeshFromXof(ptr long ptr ptr ptr long ptr) d3dx9_36.D3DXLoadPatchMeshFromXof @ stdcall D3DXLoadPRTBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileA @ stdcall D3DXLoadPRTBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileW @ stdcall D3DXLoadPRTCompBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileA @ stdcall D3DXLoadPRTCompBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileW @ stdcall D3DXLoadSkinMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadSkinMeshFromXof -@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA +@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA @ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileInMemory -@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW +@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW @ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromMemory -@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA -@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW -@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long) d3dx9_36.D3DXLoadSurfaceFromSurface +@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA +@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW +@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromSurface @ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileA @ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileInMemory @ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileW @@ -197,8 +197,8 @@ @ stdcall D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceA @ stdcall D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceW @ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadVolumeFromVolume -@ stdcall D3DXMatrixAffineTransformation(ptr long ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation -@ stdcall D3DXMatrixAffineTransformation2D(ptr long ptr long ptr) d3dx9_36.D3DXMatrixAffineTransformation2D +@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation +@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr) d3dx9_36.D3DXMatrixAffineTransformation2D @ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixDecompose @ stdcall D3DXMatrixDeterminant(ptr) d3dx9_36.D3DXMatrixDeterminant @ stdcall D3DXMatrixInverse(ptr ptr ptr) d3dx9_36.D3DXMatrixInverse @@ -206,28 +206,28 @@ @ stdcall D3DXMatrixLookAtRH(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixLookAtRH @ stdcall D3DXMatrixMultiply(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiply @ stdcall D3DXMatrixMultiplyTranspose(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiplyTranspose -@ stdcall D3DXMatrixOrthoLH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoLH -@ stdcall D3DXMatrixOrthoOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterLH -@ stdcall D3DXMatrixOrthoOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterRH -@ stdcall D3DXMatrixOrthoRH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoRH -@ stdcall D3DXMatrixPerspectiveFovLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovLH -@ stdcall D3DXMatrixPerspectiveFovRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovRH -@ stdcall D3DXMatrixPerspectiveLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveLH -@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH -@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH -@ stdcall D3DXMatrixPerspectiveRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveRH +@ stdcall D3DXMatrixOrthoLH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoLH +@ stdcall D3DXMatrixOrthoOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterLH +@ stdcall D3DXMatrixOrthoOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterRH +@ stdcall D3DXMatrixOrthoRH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoRH +@ stdcall D3DXMatrixPerspectiveFovLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovLH +@ stdcall D3DXMatrixPerspectiveFovRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovRH +@ stdcall D3DXMatrixPerspectiveLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveLH +@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH +@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH +@ stdcall D3DXMatrixPerspectiveRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveRH @ stdcall D3DXMatrixReflect(ptr ptr) d3dx9_36.D3DXMatrixReflect -@ stdcall D3DXMatrixRotationAxis(ptr ptr long) d3dx9_36.D3DXMatrixRotationAxis +@ stdcall D3DXMatrixRotationAxis(ptr ptr float) d3dx9_36.D3DXMatrixRotationAxis @ stdcall D3DXMatrixRotationQuaternion(ptr ptr) d3dx9_36.D3DXMatrixRotationQuaternion -@ stdcall D3DXMatrixRotationX(ptr long) d3dx9_36.D3DXMatrixRotationX -@ stdcall D3DXMatrixRotationY(ptr long) d3dx9_36.D3DXMatrixRotationY -@ stdcall D3DXMatrixRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXMatrixRotationYawPitchRoll -@ stdcall D3DXMatrixRotationZ(ptr long) d3dx9_36.D3DXMatrixRotationZ -@ stdcall D3DXMatrixScaling(ptr long long long) d3dx9_36.D3DXMatrixScaling +@ stdcall D3DXMatrixRotationX(ptr float) d3dx9_36.D3DXMatrixRotationX +@ stdcall D3DXMatrixRotationY(ptr float) d3dx9_36.D3DXMatrixRotationY +@ stdcall D3DXMatrixRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXMatrixRotationYawPitchRoll +@ stdcall D3DXMatrixRotationZ(ptr float) d3dx9_36.D3DXMatrixRotationZ +@ stdcall D3DXMatrixScaling(ptr float float float) d3dx9_36.D3DXMatrixScaling @ stdcall D3DXMatrixShadow(ptr ptr ptr) d3dx9_36.D3DXMatrixShadow @ stdcall D3DXMatrixTransformation(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXMatrixTransformation -@ stdcall D3DXMatrixTransformation2D(ptr ptr long ptr ptr long ptr) d3dx9_36.D3DXMatrixTransformation2D -@ stdcall D3DXMatrixTranslation(ptr long long long) d3dx9_36.D3DXMatrixTranslation +@ stdcall D3DXMatrixTransformation2D(ptr ptr float ptr ptr float ptr) d3dx9_36.D3DXMatrixTransformation2D +@ stdcall D3DXMatrixTranslation(ptr float float float) d3dx9_36.D3DXMatrixTranslation @ stdcall D3DXMatrixTranspose(ptr ptr) d3dx9_36.D3DXMatrixTranspose @ stdcall D3DXOptimizeFaces(ptr long long long ptr) d3dx9_36.D3DXOptimizeFaces @ stdcall D3DXOptimizeVertices(ptr long long long ptr) d3dx9_36.D3DXOptimizeVertices @@ -237,17 +237,17 @@ @ stdcall D3DXPlaneNormalize(ptr ptr) d3dx9_36.D3DXPlaneNormalize @ stdcall D3DXPlaneTransform(ptr ptr ptr) d3dx9_36.D3DXPlaneTransform @ stdcall D3DXPlaneTransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXPlaneTransformArray -@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXQuaternionBaryCentric +@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXQuaternionBaryCentric @ stdcall D3DXQuaternionExp(ptr ptr) d3dx9_36.D3DXQuaternionExp @ stdcall D3DXQuaternionInverse(ptr ptr) d3dx9_36.D3DXQuaternionInverse @ stdcall D3DXQuaternionLn(ptr ptr) d3dx9_36.D3DXQuaternionLn @ stdcall D3DXQuaternionMultiply(ptr ptr ptr) d3dx9_36.D3DXQuaternionMultiply @ stdcall D3DXQuaternionNormalize(ptr ptr) d3dx9_36.D3DXQuaternionNormalize -@ stdcall D3DXQuaternionRotationAxis(ptr ptr long) d3dx9_36.D3DXQuaternionRotationAxis +@ stdcall D3DXQuaternionRotationAxis(ptr ptr float) d3dx9_36.D3DXQuaternionRotationAxis @ stdcall D3DXQuaternionRotationMatrix(ptr ptr) d3dx9_36.D3DXQuaternionRotationMatrix -@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXQuaternionRotationYawPitchRoll -@ stdcall D3DXQuaternionSlerp(ptr ptr ptr long) d3dx9_36.D3DXQuaternionSlerp -@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXQuaternionSquad +@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXQuaternionRotationYawPitchRoll +@ stdcall D3DXQuaternionSlerp(ptr ptr ptr float) d3dx9_36.D3DXQuaternionSlerp +@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXQuaternionSquad @ stdcall D3DXQuaternionSquadSetup(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXQuaternionSquadSetup @ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr) d3dx9_36.D3DXQuaternionToAxisAngle @ stdcall D3DXRectPatchSize(ptr ptr ptr) d3dx9_36.D3DXRectPatchSize @@ -270,19 +270,19 @@ @ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW @ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd @ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot -@ stdcall D3DXSHEvalConeLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight +@ stdcall D3DXSHEvalConeLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight @ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection -@ stdcall D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight -@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight -@ stdcall D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight +@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight +@ stdcall D3DXSHEvalHemisphereLight(long ptr int128 int128 ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight +@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight @ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr) d3dx9_36.D3DXSHProjectCubeMap @ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC @ stdcall D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr) d3dx9_36.D3DXSHPRTCompSuperCluster @ stdcall D3DXSHRotate(ptr long ptr ptr) d3dx9_36.D3DXSHRotate -@ stdcall D3DXSHRotateZ(ptr long long ptr) d3dx9_36.D3DXSHRotateZ -@ stdcall D3DXSHScale(ptr long ptr ptr) d3dx9_36.D3DXSHScale +@ stdcall D3DXSHRotateZ(ptr long float ptr) d3dx9_36.D3DXSHRotateZ +@ stdcall D3DXSHScale(ptr long ptr float) d3dx9_36.D3DXSHScale @ stdcall D3DXSimplifyMesh(ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXSimplifyMesh -@ stdcall D3DXSphereBoundProbe(ptr long ptr ptr) d3dx9_36.D3DXSphereBoundProbe +@ stdcall D3DXSphereBoundProbe(ptr float ptr ptr) d3dx9_36.D3DXSphereBoundProbe @ stdcall D3DXSplitMesh(ptr ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSplitMesh @ stdcall D3DXTessellateNPatches(ptr ptr long long ptr ptr) d3dx9_36.D3DXTessellateNPatches @ stdcall D3DXTessellateRectPatch(ptr ptr ptr ptr ptr) d3dx9_36.D3DXTessellateRectPatch @@ -293,9 +293,9 @@ @ stdcall D3DXUVAtlasPartition(ptr long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXUVAtlasPartition @ stdcall D3DXValidMesh(ptr ptr ptr) d3dx9_36.D3DXValidMesh @ stdcall D3DXValidPatchMesh(ptr ptr ptr ptr) d3dx9_36.D3DXValidPatchMesh -@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec2BaryCentric -@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2CatmullRom -@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2Hermite +@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec2BaryCentric +@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2CatmullRom +@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2Hermite @ stdcall D3DXVec2Normalize(ptr ptr) d3dx9_36.D3DXVec2Normalize @ stdcall D3DXVec2Transform(ptr ptr ptr) d3dx9_36.D3DXVec2Transform @ stdcall D3DXVec2TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformArray @@ -303,9 +303,9 @@ @ stdcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformCoordArray @ stdcall D3DXVec2TransformNormal(ptr ptr ptr) d3dx9_36.D3DXVec2TransformNormal @ stdcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformNormalArray -@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec3BaryCentric -@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3CatmullRom -@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3Hermite +@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec3BaryCentric +@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3CatmullRom +@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3Hermite @ stdcall D3DXVec3Normalize(ptr ptr) d3dx9_36.D3DXVec3Normalize @ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Project @ stdcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3ProjectArray @@ -317,10 +317,10 @@ @ stdcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformNormalArray @ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Unproject @ stdcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3UnprojectArray -@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec4BaryCentric -@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4CatmullRom +@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec4BaryCentric +@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4CatmullRom @ stdcall D3DXVec4Cross(ptr ptr ptr ptr) d3dx9_36.D3DXVec4Cross -@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4Hermite +@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4Hermite @ stdcall D3DXVec4Normalize(ptr ptr) d3dx9_36.D3DXVec4Normalize @ stdcall D3DXVec4Transform(ptr ptr ptr) d3dx9_36.D3DXVec4Transform @ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec4TransformArray diff --git a/dll/directx/wine/d3dx9_27/d3dx9_27_main.c b/dll/directx/wine/d3dx9_27/d3dx9_27_main.c index f989f761299..a9cc3ee5b54 100644 --- a/dll/directx/wine/d3dx9_27/d3dx9_27_main.c +++ b/dll/directx/wine/d3dx9_27/d3dx9_27_main.c @@ -47,8 +47,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } diff --git a/dll/directx/wine/d3dx9_28/CMakeLists.txt b/dll/directx/wine/d3dx9_28/CMakeLists.txt index 9f8996bb2c0..84f5615804f 100644 --- a/dll/directx/wine/d3dx9_28/CMakeLists.txt +++ b/dll/directx/wine/d3dx9_28/CMakeLists.txt @@ -1,28 +1,16 @@ +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) + spec2def(d3dx9_28.dll d3dx9_28.spec) list(APPEND SOURCE d3dx9_28_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_28_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_28.def) -add_definitions(-D__WINESRC__) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_library(d3dx9_28 SHARED ${SOURCE}) +add_library(d3dx9_28 SHARED ${SOURCE} version.rc) set_module_type(d3dx9_28 win32dll) target_link_libraries(d3dx9_28 wine) - -add_importlibs(d3dx9_28 - d3d9 - d3dx9_24 - d3dx9_36 - user32 - gdi32 - advapi32 - msvcrt - kernel32 - ntdll) - -add_dependencies(d3dx9_28 wineheaders) +add_importlibs(d3dx9_28 d3dx9_30 msvcrt kernel32 ntdll) add_cd_file(TARGET d3dx9_28 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_28/d3dx9_28.spec b/dll/directx/wine/d3dx9_28/d3dx9_28.spec index e6648b86480..2b80322137b 100644 --- a/dll/directx/wine/d3dx9_28/d3dx9_28.spec +++ b/dll/directx/wine/d3dx9_28/d3dx9_28.spec @@ -1,21 +1,21 @@ @ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShader -@ stdcall D3DXAssembleShaderFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA -@ stdcall D3DXAssembleShaderFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW -@ stdcall D3DXAssembleShaderFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA -@ stdcall D3DXAssembleShaderFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW +@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA +@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW +@ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA +@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW @ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) d3dx9_36.D3DXBoxBoundProbe -@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckCubeTextureRequirements -@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckTextureRequirements +@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckCubeTextureRequirements +@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckTextureRequirements @ stdcall D3DXCheckVersion(long long) -@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckVolumeTextureRequirements -@ stdcall D3DXCleanMesh(ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh -@ stdcall D3DXColorAdjustContrast(ptr ptr long) d3dx9_36.D3DXColorAdjustContrast -@ stdcall D3DXColorAdjustSaturation(ptr ptr long) d3dx9_36.D3DXColorAdjustSaturation -@ stdcall D3DXCompileShader(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShader -@ stdcall D3DXCompileShaderFromFileA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA -@ stdcall D3DXCompileShaderFromFileW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW -@ stdcall D3DXCompileShaderFromResourceA(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA -@ stdcall D3DXCompileShaderFromResourceW(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW +@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckVolumeTextureRequirements +@ stdcall D3DXCleanMesh(long ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh +@ stdcall D3DXColorAdjustContrast(ptr ptr float) d3dx9_36.D3DXColorAdjustContrast +@ stdcall D3DXColorAdjustSaturation(ptr ptr float) d3dx9_36.D3DXColorAdjustSaturation +@ stdcall D3DXCompileShader(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShader +@ stdcall D3DXCompileShaderFromFileA(str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA +@ stdcall D3DXCompileShaderFromFileW(wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW +@ stdcall D3DXCompileShaderFromResourceA(ptr str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA +@ stdcall D3DXCompileShaderFromResourceW(ptr wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW @ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingBox @ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingSphere @ stdcall D3DXComputeIMTFromPerVertexSignal(ptr ptr long long long ptr ptr ptr) d3dx9_36.D3DXComputeIMTFromPerVertexSignal @@ -30,9 +30,9 @@ @ stdcall D3DXConcatenateMeshes(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXConcatenateMeshes @ stdcall D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToSingleStrip @ stdcall D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToStrips -@ stdcall D3DXCpuOptimizations(long) d3dx9_24.D3DXCpuOptimizations +@ stdcall D3DXCpuOptimizations(long) d3dx9_30.D3DXCpuOptimizations @ stdcall D3DXCreateAnimationController(long long long long ptr) d3dx9_36.D3DXCreateAnimationController -@ stdcall D3DXCreateBox(ptr long long long ptr ptr) d3dx9_36.D3DXCreateBox +@ stdcall D3DXCreateBox(ptr float float float ptr ptr) d3dx9_36.D3DXCreateBox @ stdcall D3DXCreateBuffer(long ptr) d3dx9_36.D3DXCreateBuffer @ stdcall D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr) d3dx9_36.D3DXCreateCompressedAnimationSet @ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr) d3dx9_36.D3DXCreateCubeTexture @@ -49,24 +49,24 @@ @ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder @ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffect @ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler -@ stdcall D3DXCreateEffectCompilerFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA -@ stdcall D3DXCreateEffectCompilerFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW -@ stdcall D3DXCreateEffectCompilerFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA -@ stdcall D3DXCreateEffectCompilerFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW -@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx -@ stdcall D3DXCreateEffectFromFileA(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA -@ stdcall D3DXCreateEffectFromFileExA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA -@ stdcall D3DXCreateEffectFromFileExW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW -@ stdcall D3DXCreateEffectFromFileW(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW -@ stdcall D3DXCreateEffectFromResourceA(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA -@ stdcall D3DXCreateEffectFromResourceExA(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA -@ stdcall D3DXCreateEffectFromResourceExW(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW -@ stdcall D3DXCreateEffectFromResourceW(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW +@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA +@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW +@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA +@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW +@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx +@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA +@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA +@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW +@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW +@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA +@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA +@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW +@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW @ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool -@ stdcall D3DXCreateFontA(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontA +@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectW -@ stdcall D3DXCreateFontW(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontW +@ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) d3dx9_36.D3DXCreateFontW @ stdcall D3DXCreateFragmentLinker(ptr long ptr) d3dx9_36.D3DXCreateFragmentLinker @ stdcall D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateKeyframedAnimationSet @ stdcall D3DXCreateLine(ptr ptr) d3dx9_36.D3DXCreateLine @@ -87,22 +87,22 @@ @ stdcall D3DXCreateSkinInfo(long ptr long ptr) d3dx9_36.D3DXCreateSkinInfo @ stdcall D3DXCreateSkinInfoFromBlendedMesh(ptr long ptr ptr) d3dx9_36.D3DXCreateSkinInfoFromBlendedMesh @ stdcall D3DXCreateSkinInfoFVF(long long long ptr) d3dx9_36.D3DXCreateSkinInfoFVF -@ stdcall D3DXCreateSphere(ptr long long long ptr ptr) d3dx9_36.D3DXCreateSphere +@ stdcall D3DXCreateSphere(ptr float long long ptr ptr) d3dx9_36.D3DXCreateSphere @ stdcall D3DXCreateSprite(ptr ptr) d3dx9_36.D3DXCreateSprite @ stdcall D3DXCreateTeapot(ptr ptr ptr) d3dx9_36.D3DXCreateTeapot -@ stdcall D3DXCreateTextA(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextA -@ stdcall D3DXCreateTextW(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextW +@ stdcall D3DXCreateTextA(ptr long str float float ptr ptr ptr) d3dx9_36.D3DXCreateTextA +@ stdcall D3DXCreateTextW(ptr long wstr float float ptr ptr ptr) d3dx9_36.D3DXCreateTextW @ stdcall D3DXCreateTexture(ptr long long long long long long ptr) d3dx9_36.D3DXCreateTexture -@ stdcall D3DXCreateTextureFromFileA(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileA -@ stdcall D3DXCreateTextureFromFileExA(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA -@ stdcall D3DXCreateTextureFromFileExW(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW +@ stdcall D3DXCreateTextureFromFileA(ptr str ptr) d3dx9_36.D3DXCreateTextureFromFileA +@ stdcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA +@ stdcall D3DXCreateTextureFromFileExW(ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW @ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateTextureFromFileInMemory @ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileInMemoryEx -@ stdcall D3DXCreateTextureFromFileW(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileW -@ stdcall D3DXCreateTextureFromResourceA(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceA -@ stdcall D3DXCreateTextureFromResourceExA(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA -@ stdcall D3DXCreateTextureFromResourceExW(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW -@ stdcall D3DXCreateTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceW +@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromFileW +@ stdcall D3DXCreateTextureFromResourceA(ptr ptr str ptr) d3dx9_36.D3DXCreateTextureFromResourceA +@ stdcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA +@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW +@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromResourceW @ stdcall D3DXCreateTextureGutterHelper(long long ptr long ptr) d3dx9_36.D3DXCreateTextureGutterHelper @ stdcall D3DXCreateTextureShader(ptr ptr) d3dx9_36.D3DXCreateTextureShader @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateTorus @@ -138,7 +138,7 @@ @ stdcall D3DXFrameFind(ptr ptr) d3dx9_36.D3DXFrameFind @ stdcall D3DXFrameNumNamedMatrices(ptr) d3dx9_36.D3DXFrameNumNamedMatrices @ stdcall D3DXFrameRegisterNamedMatrices(ptr ptr) d3dx9_36.D3DXFrameRegisterNamedMatrices -@ stdcall D3DXFresnelTerm(long long) d3dx9_36.D3DXFresnelTerm +@ stdcall D3DXFresnelTerm(float float) d3dx9_36.D3DXFresnelTerm @ stdcall D3DXFVFFromDeclarator(ptr ptr) d3dx9_36.D3DXFVFFromDeclarator @ stdcall D3DXGatherFragments(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragments @ stdcall D3DXGatherFragmentsFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragmentsFromFileA @@ -151,11 +151,11 @@ @ stdcall D3DXGetDeclVertexSize(ptr long) d3dx9_36.D3DXGetDeclVertexSize @ stdcall D3DXGetDriverLevel(ptr) d3dx9_36.D3DXGetDriverLevel @ stdcall D3DXGetFVFVertexSize(long) d3dx9_36.D3DXGetFVFVertexSize -@ stdcall D3DXGetImageInfoFromFileA(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileA +@ stdcall D3DXGetImageInfoFromFileA(str ptr) d3dx9_36.D3DXGetImageInfoFromFileA @ stdcall D3DXGetImageInfoFromFileInMemory(ptr long ptr) d3dx9_36.D3DXGetImageInfoFromFileInMemory -@ stdcall D3DXGetImageInfoFromFileW(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileW -@ stdcall D3DXGetImageInfoFromResourceA(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceA -@ stdcall D3DXGetImageInfoFromResourceW(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW +@ stdcall D3DXGetImageInfoFromFileW(wstr ptr) d3dx9_36.D3DXGetImageInfoFromFileW +@ stdcall D3DXGetImageInfoFromResourceA(long str ptr) d3dx9_36.D3DXGetImageInfoFromResourceA +@ stdcall D3DXGetImageInfoFromResourceW(long wstr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW @ stdcall D3DXGetPixelShaderProfile(ptr) d3dx9_36.D3DXGetPixelShaderProfile @ stdcall D3DXGetShaderConstantTable(ptr ptr) d3dx9_36.D3DXGetShaderConstantTable @ stdcall D3DXGetShaderInputSemantics(ptr ptr ptr) d3dx9_36.D3DXGetShaderInputSemantics @@ -169,27 +169,27 @@ @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersect @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectSubset @ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectTri -@ stdcall D3DXLoadMeshFromXA(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA +@ stdcall D3DXLoadMeshFromXA(str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA @ stdcall D3DXLoadMeshFromXInMemory(ptr long long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXInMemory -@ stdcall D3DXLoadMeshFromXResource(long ptr ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource -@ stdcall D3DXLoadMeshFromXW(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW +@ stdcall D3DXLoadMeshFromXResource(long str str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource +@ stdcall D3DXLoadMeshFromXW(wstr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW @ stdcall D3DXLoadMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXof -@ stdcall D3DXLoadMeshHierarchyFromXA(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA +@ stdcall D3DXLoadMeshHierarchyFromXA(str long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA @ stdcall D3DXLoadMeshHierarchyFromXInMemory(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXInMemory -@ stdcall D3DXLoadMeshHierarchyFromXW(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW +@ stdcall D3DXLoadMeshHierarchyFromXW(wstr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW @ stdcall D3DXLoadPatchMeshFromXof(ptr long ptr ptr ptr long ptr) d3dx9_36.D3DXLoadPatchMeshFromXof @ stdcall D3DXLoadPRTBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileA @ stdcall D3DXLoadPRTBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileW @ stdcall D3DXLoadPRTCompBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileA @ stdcall D3DXLoadPRTCompBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileW @ stdcall D3DXLoadSkinMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadSkinMeshFromXof -@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA +@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA @ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileInMemory -@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW +@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW @ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromMemory -@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA -@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW -@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long) d3dx9_36.D3DXLoadSurfaceFromSurface +@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA +@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW +@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromSurface @ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileA @ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileInMemory @ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileW @@ -197,8 +197,8 @@ @ stdcall D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceA @ stdcall D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceW @ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadVolumeFromVolume -@ stdcall D3DXMatrixAffineTransformation(ptr long ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation -@ stdcall D3DXMatrixAffineTransformation2D(ptr long ptr long ptr) d3dx9_36.D3DXMatrixAffineTransformation2D +@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation +@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr) d3dx9_36.D3DXMatrixAffineTransformation2D @ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixDecompose @ stdcall D3DXMatrixDeterminant(ptr) d3dx9_36.D3DXMatrixDeterminant @ stdcall D3DXMatrixInverse(ptr ptr ptr) d3dx9_36.D3DXMatrixInverse @@ -206,28 +206,28 @@ @ stdcall D3DXMatrixLookAtRH(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixLookAtRH @ stdcall D3DXMatrixMultiply(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiply @ stdcall D3DXMatrixMultiplyTranspose(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiplyTranspose -@ stdcall D3DXMatrixOrthoLH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoLH -@ stdcall D3DXMatrixOrthoOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterLH -@ stdcall D3DXMatrixOrthoOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterRH -@ stdcall D3DXMatrixOrthoRH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoRH -@ stdcall D3DXMatrixPerspectiveFovLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovLH -@ stdcall D3DXMatrixPerspectiveFovRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovRH -@ stdcall D3DXMatrixPerspectiveLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveLH -@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH -@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH -@ stdcall D3DXMatrixPerspectiveRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveRH +@ stdcall D3DXMatrixOrthoLH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoLH +@ stdcall D3DXMatrixOrthoOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterLH +@ stdcall D3DXMatrixOrthoOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterRH +@ stdcall D3DXMatrixOrthoRH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoRH +@ stdcall D3DXMatrixPerspectiveFovLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovLH +@ stdcall D3DXMatrixPerspectiveFovRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovRH +@ stdcall D3DXMatrixPerspectiveLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveLH +@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH +@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH +@ stdcall D3DXMatrixPerspectiveRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveRH @ stdcall D3DXMatrixReflect(ptr ptr) d3dx9_36.D3DXMatrixReflect -@ stdcall D3DXMatrixRotationAxis(ptr ptr long) d3dx9_36.D3DXMatrixRotationAxis +@ stdcall D3DXMatrixRotationAxis(ptr ptr float) d3dx9_36.D3DXMatrixRotationAxis @ stdcall D3DXMatrixRotationQuaternion(ptr ptr) d3dx9_36.D3DXMatrixRotationQuaternion -@ stdcall D3DXMatrixRotationX(ptr long) d3dx9_36.D3DXMatrixRotationX -@ stdcall D3DXMatrixRotationY(ptr long) d3dx9_36.D3DXMatrixRotationY -@ stdcall D3DXMatrixRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXMatrixRotationYawPitchRoll -@ stdcall D3DXMatrixRotationZ(ptr long) d3dx9_36.D3DXMatrixRotationZ -@ stdcall D3DXMatrixScaling(ptr long long long) d3dx9_36.D3DXMatrixScaling +@ stdcall D3DXMatrixRotationX(ptr float) d3dx9_36.D3DXMatrixRotationX +@ stdcall D3DXMatrixRotationY(ptr float) d3dx9_36.D3DXMatrixRotationY +@ stdcall D3DXMatrixRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXMatrixRotationYawPitchRoll +@ stdcall D3DXMatrixRotationZ(ptr float) d3dx9_36.D3DXMatrixRotationZ +@ stdcall D3DXMatrixScaling(ptr float float float) d3dx9_36.D3DXMatrixScaling @ stdcall D3DXMatrixShadow(ptr ptr ptr) d3dx9_36.D3DXMatrixShadow @ stdcall D3DXMatrixTransformation(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXMatrixTransformation -@ stdcall D3DXMatrixTransformation2D(ptr ptr long ptr ptr long ptr) d3dx9_36.D3DXMatrixTransformation2D -@ stdcall D3DXMatrixTranslation(ptr long long long) d3dx9_36.D3DXMatrixTranslation +@ stdcall D3DXMatrixTransformation2D(ptr ptr float ptr ptr float ptr) d3dx9_36.D3DXMatrixTransformation2D +@ stdcall D3DXMatrixTranslation(ptr float float float) d3dx9_36.D3DXMatrixTranslation @ stdcall D3DXMatrixTranspose(ptr ptr) d3dx9_36.D3DXMatrixTranspose @ stdcall D3DXOptimizeFaces(ptr long long long ptr) d3dx9_36.D3DXOptimizeFaces @ stdcall D3DXOptimizeVertices(ptr long long long ptr) d3dx9_36.D3DXOptimizeVertices @@ -238,21 +238,21 @@ @ stdcall D3DXPlaneTransform(ptr ptr ptr) d3dx9_36.D3DXPlaneTransform @ stdcall D3DXPlaneTransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXPlaneTransformArray @ stdcall D3DXPreprocessShader(ptr long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShader -@ stdcall D3DXPreprocessShaderFromFileA(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA -@ stdcall D3DXPreprocessShaderFromFileW(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW -@ stdcall D3DXPreprocessShaderFromResourceA(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA -@ stdcall D3DXPreprocessShaderFromResourceW(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW -@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXQuaternionBaryCentric +@ stdcall D3DXPreprocessShaderFromFileA(str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA +@ stdcall D3DXPreprocessShaderFromFileW(wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW +@ stdcall D3DXPreprocessShaderFromResourceA(long str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA +@ stdcall D3DXPreprocessShaderFromResourceW(long wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW +@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXQuaternionBaryCentric @ stdcall D3DXQuaternionExp(ptr ptr) d3dx9_36.D3DXQuaternionExp @ stdcall D3DXQuaternionInverse(ptr ptr) d3dx9_36.D3DXQuaternionInverse @ stdcall D3DXQuaternionLn(ptr ptr) d3dx9_36.D3DXQuaternionLn @ stdcall D3DXQuaternionMultiply(ptr ptr ptr) d3dx9_36.D3DXQuaternionMultiply @ stdcall D3DXQuaternionNormalize(ptr ptr) d3dx9_36.D3DXQuaternionNormalize -@ stdcall D3DXQuaternionRotationAxis(ptr ptr long) d3dx9_36.D3DXQuaternionRotationAxis +@ stdcall D3DXQuaternionRotationAxis(ptr ptr float) d3dx9_36.D3DXQuaternionRotationAxis @ stdcall D3DXQuaternionRotationMatrix(ptr ptr) d3dx9_36.D3DXQuaternionRotationMatrix -@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXQuaternionRotationYawPitchRoll -@ stdcall D3DXQuaternionSlerp(ptr ptr ptr long) d3dx9_36.D3DXQuaternionSlerp -@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXQuaternionSquad +@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXQuaternionRotationYawPitchRoll +@ stdcall D3DXQuaternionSlerp(ptr ptr ptr float) d3dx9_36.D3DXQuaternionSlerp +@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXQuaternionSquad @ stdcall D3DXQuaternionSquadSetup(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXQuaternionSquadSetup @ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr) d3dx9_36.D3DXQuaternionToAxisAngle @ stdcall D3DXRectPatchSize(ptr ptr ptr) d3dx9_36.D3DXRectPatchSize @@ -275,19 +275,19 @@ @ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW @ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd @ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot -@ stdcall D3DXSHEvalConeLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight +@ stdcall D3DXSHEvalConeLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight @ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection -@ stdcall D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight -@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight -@ stdcall D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight +@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight +@ stdcall D3DXSHEvalHemisphereLight(long ptr int128 int128 ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight +@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight @ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr) d3dx9_36.D3DXSHProjectCubeMap @ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC @ stdcall D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr) d3dx9_36.D3DXSHPRTCompSuperCluster @ stdcall D3DXSHRotate(ptr long ptr ptr) d3dx9_36.D3DXSHRotate -@ stdcall D3DXSHRotateZ(ptr long long ptr) d3dx9_36.D3DXSHRotateZ -@ stdcall D3DXSHScale(ptr long ptr ptr) d3dx9_36.D3DXSHScale +@ stdcall D3DXSHRotateZ(ptr long float ptr) d3dx9_36.D3DXSHRotateZ +@ stdcall D3DXSHScale(ptr long ptr float) d3dx9_36.D3DXSHScale @ stdcall D3DXSimplifyMesh(ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXSimplifyMesh -@ stdcall D3DXSphereBoundProbe(ptr long ptr ptr) d3dx9_36.D3DXSphereBoundProbe +@ stdcall D3DXSphereBoundProbe(ptr float ptr ptr) d3dx9_36.D3DXSphereBoundProbe @ stdcall D3DXSplitMesh(ptr ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSplitMesh @ stdcall D3DXTessellateNPatches(ptr ptr long long ptr ptr) d3dx9_36.D3DXTessellateNPatches @ stdcall D3DXTessellateRectPatch(ptr ptr ptr ptr ptr) d3dx9_36.D3DXTessellateRectPatch @@ -298,9 +298,9 @@ @ stdcall D3DXUVAtlasPartition(ptr long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXUVAtlasPartition @ stdcall D3DXValidMesh(ptr ptr ptr) d3dx9_36.D3DXValidMesh @ stdcall D3DXValidPatchMesh(ptr ptr ptr ptr) d3dx9_36.D3DXValidPatchMesh -@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec2BaryCentric -@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2CatmullRom -@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2Hermite +@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec2BaryCentric +@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2CatmullRom +@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2Hermite @ stdcall D3DXVec2Normalize(ptr ptr) d3dx9_36.D3DXVec2Normalize @ stdcall D3DXVec2Transform(ptr ptr ptr) d3dx9_36.D3DXVec2Transform @ stdcall D3DXVec2TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformArray @@ -308,9 +308,9 @@ @ stdcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformCoordArray @ stdcall D3DXVec2TransformNormal(ptr ptr ptr) d3dx9_36.D3DXVec2TransformNormal @ stdcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformNormalArray -@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec3BaryCentric -@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3CatmullRom -@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3Hermite +@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec3BaryCentric +@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3CatmullRom +@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3Hermite @ stdcall D3DXVec3Normalize(ptr ptr) d3dx9_36.D3DXVec3Normalize @ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Project @ stdcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3ProjectArray @@ -322,10 +322,10 @@ @ stdcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformNormalArray @ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Unproject @ stdcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3UnprojectArray -@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec4BaryCentric -@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4CatmullRom +@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec4BaryCentric +@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4CatmullRom @ stdcall D3DXVec4Cross(ptr ptr ptr ptr) d3dx9_36.D3DXVec4Cross -@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4Hermite +@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4Hermite @ stdcall D3DXVec4Normalize(ptr ptr) d3dx9_36.D3DXVec4Normalize @ stdcall D3DXVec4Transform(ptr ptr ptr) d3dx9_36.D3DXVec4Transform @ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec4TransformArray diff --git a/dll/directx/wine/d3dx9_28/d3dx9_28_main.c b/dll/directx/wine/d3dx9_28/d3dx9_28_main.c index cbe18f221e6..8ac2a136de1 100644 --- a/dll/directx/wine/d3dx9_28/d3dx9_28_main.c +++ b/dll/directx/wine/d3dx9_28/d3dx9_28_main.c @@ -47,8 +47,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } diff --git a/dll/directx/wine/d3dx9_29/CMakeLists.txt b/dll/directx/wine/d3dx9_29/CMakeLists.txt index 171b54a571e..9ed14f7eeda 100644 --- a/dll/directx/wine/d3dx9_29/CMakeLists.txt +++ b/dll/directx/wine/d3dx9_29/CMakeLists.txt @@ -1,28 +1,16 @@ +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) + spec2def(d3dx9_29.dll d3dx9_29.spec) list(APPEND SOURCE d3dx9_29_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_29_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_29.def) -add_definitions(-D__WINESRC__) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_library(d3dx9_29 SHARED ${SOURCE}) +add_library(d3dx9_29 SHARED ${SOURCE} version.rc) set_module_type(d3dx9_29 win32dll) target_link_libraries(d3dx9_29 wine) - -add_importlibs(d3dx9_29 - d3d9 - d3dx9_24 - d3dx9_36 - user32 - gdi32 - advapi32 - msvcrt - kernel32 - ntdll) - -add_dependencies(d3dx9_29 wineheaders) +add_importlibs(d3dx9_29 d3dx9_30 msvcrt kernel32 ntdll) add_cd_file(TARGET d3dx9_29 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_29/d3dx9_29.spec b/dll/directx/wine/d3dx9_29/d3dx9_29.spec index e6648b86480..2b80322137b 100644 --- a/dll/directx/wine/d3dx9_29/d3dx9_29.spec +++ b/dll/directx/wine/d3dx9_29/d3dx9_29.spec @@ -1,21 +1,21 @@ @ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShader -@ stdcall D3DXAssembleShaderFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA -@ stdcall D3DXAssembleShaderFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW -@ stdcall D3DXAssembleShaderFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA -@ stdcall D3DXAssembleShaderFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW +@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA +@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW +@ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA +@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW @ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) d3dx9_36.D3DXBoxBoundProbe -@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckCubeTextureRequirements -@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckTextureRequirements +@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckCubeTextureRequirements +@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckTextureRequirements @ stdcall D3DXCheckVersion(long long) -@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckVolumeTextureRequirements -@ stdcall D3DXCleanMesh(ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh -@ stdcall D3DXColorAdjustContrast(ptr ptr long) d3dx9_36.D3DXColorAdjustContrast -@ stdcall D3DXColorAdjustSaturation(ptr ptr long) d3dx9_36.D3DXColorAdjustSaturation -@ stdcall D3DXCompileShader(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShader -@ stdcall D3DXCompileShaderFromFileA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA -@ stdcall D3DXCompileShaderFromFileW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW -@ stdcall D3DXCompileShaderFromResourceA(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA -@ stdcall D3DXCompileShaderFromResourceW(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW +@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckVolumeTextureRequirements +@ stdcall D3DXCleanMesh(long ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh +@ stdcall D3DXColorAdjustContrast(ptr ptr float) d3dx9_36.D3DXColorAdjustContrast +@ stdcall D3DXColorAdjustSaturation(ptr ptr float) d3dx9_36.D3DXColorAdjustSaturation +@ stdcall D3DXCompileShader(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShader +@ stdcall D3DXCompileShaderFromFileA(str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA +@ stdcall D3DXCompileShaderFromFileW(wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW +@ stdcall D3DXCompileShaderFromResourceA(ptr str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA +@ stdcall D3DXCompileShaderFromResourceW(ptr wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW @ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingBox @ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingSphere @ stdcall D3DXComputeIMTFromPerVertexSignal(ptr ptr long long long ptr ptr ptr) d3dx9_36.D3DXComputeIMTFromPerVertexSignal @@ -30,9 +30,9 @@ @ stdcall D3DXConcatenateMeshes(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXConcatenateMeshes @ stdcall D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToSingleStrip @ stdcall D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToStrips -@ stdcall D3DXCpuOptimizations(long) d3dx9_24.D3DXCpuOptimizations +@ stdcall D3DXCpuOptimizations(long) d3dx9_30.D3DXCpuOptimizations @ stdcall D3DXCreateAnimationController(long long long long ptr) d3dx9_36.D3DXCreateAnimationController -@ stdcall D3DXCreateBox(ptr long long long ptr ptr) d3dx9_36.D3DXCreateBox +@ stdcall D3DXCreateBox(ptr float float float ptr ptr) d3dx9_36.D3DXCreateBox @ stdcall D3DXCreateBuffer(long ptr) d3dx9_36.D3DXCreateBuffer @ stdcall D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr) d3dx9_36.D3DXCreateCompressedAnimationSet @ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr) d3dx9_36.D3DXCreateCubeTexture @@ -49,24 +49,24 @@ @ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder @ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffect @ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler -@ stdcall D3DXCreateEffectCompilerFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA -@ stdcall D3DXCreateEffectCompilerFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW -@ stdcall D3DXCreateEffectCompilerFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA -@ stdcall D3DXCreateEffectCompilerFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW -@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx -@ stdcall D3DXCreateEffectFromFileA(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA -@ stdcall D3DXCreateEffectFromFileExA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA -@ stdcall D3DXCreateEffectFromFileExW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW -@ stdcall D3DXCreateEffectFromFileW(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW -@ stdcall D3DXCreateEffectFromResourceA(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA -@ stdcall D3DXCreateEffectFromResourceExA(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA -@ stdcall D3DXCreateEffectFromResourceExW(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW -@ stdcall D3DXCreateEffectFromResourceW(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW +@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA +@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW +@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA +@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW +@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx +@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA +@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA +@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW +@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW +@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA +@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA +@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW +@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW @ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool -@ stdcall D3DXCreateFontA(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontA +@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectW -@ stdcall D3DXCreateFontW(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontW +@ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) d3dx9_36.D3DXCreateFontW @ stdcall D3DXCreateFragmentLinker(ptr long ptr) d3dx9_36.D3DXCreateFragmentLinker @ stdcall D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateKeyframedAnimationSet @ stdcall D3DXCreateLine(ptr ptr) d3dx9_36.D3DXCreateLine @@ -87,22 +87,22 @@ @ stdcall D3DXCreateSkinInfo(long ptr long ptr) d3dx9_36.D3DXCreateSkinInfo @ stdcall D3DXCreateSkinInfoFromBlendedMesh(ptr long ptr ptr) d3dx9_36.D3DXCreateSkinInfoFromBlendedMesh @ stdcall D3DXCreateSkinInfoFVF(long long long ptr) d3dx9_36.D3DXCreateSkinInfoFVF -@ stdcall D3DXCreateSphere(ptr long long long ptr ptr) d3dx9_36.D3DXCreateSphere +@ stdcall D3DXCreateSphere(ptr float long long ptr ptr) d3dx9_36.D3DXCreateSphere @ stdcall D3DXCreateSprite(ptr ptr) d3dx9_36.D3DXCreateSprite @ stdcall D3DXCreateTeapot(ptr ptr ptr) d3dx9_36.D3DXCreateTeapot -@ stdcall D3DXCreateTextA(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextA -@ stdcall D3DXCreateTextW(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextW +@ stdcall D3DXCreateTextA(ptr long str float float ptr ptr ptr) d3dx9_36.D3DXCreateTextA +@ stdcall D3DXCreateTextW(ptr long wstr float float ptr ptr ptr) d3dx9_36.D3DXCreateTextW @ stdcall D3DXCreateTexture(ptr long long long long long long ptr) d3dx9_36.D3DXCreateTexture -@ stdcall D3DXCreateTextureFromFileA(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileA -@ stdcall D3DXCreateTextureFromFileExA(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA -@ stdcall D3DXCreateTextureFromFileExW(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW +@ stdcall D3DXCreateTextureFromFileA(ptr str ptr) d3dx9_36.D3DXCreateTextureFromFileA +@ stdcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA +@ stdcall D3DXCreateTextureFromFileExW(ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW @ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateTextureFromFileInMemory @ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileInMemoryEx -@ stdcall D3DXCreateTextureFromFileW(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileW -@ stdcall D3DXCreateTextureFromResourceA(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceA -@ stdcall D3DXCreateTextureFromResourceExA(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA -@ stdcall D3DXCreateTextureFromResourceExW(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW -@ stdcall D3DXCreateTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceW +@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromFileW +@ stdcall D3DXCreateTextureFromResourceA(ptr ptr str ptr) d3dx9_36.D3DXCreateTextureFromResourceA +@ stdcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA +@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW +@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromResourceW @ stdcall D3DXCreateTextureGutterHelper(long long ptr long ptr) d3dx9_36.D3DXCreateTextureGutterHelper @ stdcall D3DXCreateTextureShader(ptr ptr) d3dx9_36.D3DXCreateTextureShader @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateTorus @@ -138,7 +138,7 @@ @ stdcall D3DXFrameFind(ptr ptr) d3dx9_36.D3DXFrameFind @ stdcall D3DXFrameNumNamedMatrices(ptr) d3dx9_36.D3DXFrameNumNamedMatrices @ stdcall D3DXFrameRegisterNamedMatrices(ptr ptr) d3dx9_36.D3DXFrameRegisterNamedMatrices -@ stdcall D3DXFresnelTerm(long long) d3dx9_36.D3DXFresnelTerm +@ stdcall D3DXFresnelTerm(float float) d3dx9_36.D3DXFresnelTerm @ stdcall D3DXFVFFromDeclarator(ptr ptr) d3dx9_36.D3DXFVFFromDeclarator @ stdcall D3DXGatherFragments(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragments @ stdcall D3DXGatherFragmentsFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragmentsFromFileA @@ -151,11 +151,11 @@ @ stdcall D3DXGetDeclVertexSize(ptr long) d3dx9_36.D3DXGetDeclVertexSize @ stdcall D3DXGetDriverLevel(ptr) d3dx9_36.D3DXGetDriverLevel @ stdcall D3DXGetFVFVertexSize(long) d3dx9_36.D3DXGetFVFVertexSize -@ stdcall D3DXGetImageInfoFromFileA(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileA +@ stdcall D3DXGetImageInfoFromFileA(str ptr) d3dx9_36.D3DXGetImageInfoFromFileA @ stdcall D3DXGetImageInfoFromFileInMemory(ptr long ptr) d3dx9_36.D3DXGetImageInfoFromFileInMemory -@ stdcall D3DXGetImageInfoFromFileW(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileW -@ stdcall D3DXGetImageInfoFromResourceA(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceA -@ stdcall D3DXGetImageInfoFromResourceW(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW +@ stdcall D3DXGetImageInfoFromFileW(wstr ptr) d3dx9_36.D3DXGetImageInfoFromFileW +@ stdcall D3DXGetImageInfoFromResourceA(long str ptr) d3dx9_36.D3DXGetImageInfoFromResourceA +@ stdcall D3DXGetImageInfoFromResourceW(long wstr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW @ stdcall D3DXGetPixelShaderProfile(ptr) d3dx9_36.D3DXGetPixelShaderProfile @ stdcall D3DXGetShaderConstantTable(ptr ptr) d3dx9_36.D3DXGetShaderConstantTable @ stdcall D3DXGetShaderInputSemantics(ptr ptr ptr) d3dx9_36.D3DXGetShaderInputSemantics @@ -169,27 +169,27 @@ @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersect @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectSubset @ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectTri -@ stdcall D3DXLoadMeshFromXA(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA +@ stdcall D3DXLoadMeshFromXA(str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA @ stdcall D3DXLoadMeshFromXInMemory(ptr long long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXInMemory -@ stdcall D3DXLoadMeshFromXResource(long ptr ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource -@ stdcall D3DXLoadMeshFromXW(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW +@ stdcall D3DXLoadMeshFromXResource(long str str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource +@ stdcall D3DXLoadMeshFromXW(wstr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW @ stdcall D3DXLoadMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXof -@ stdcall D3DXLoadMeshHierarchyFromXA(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA +@ stdcall D3DXLoadMeshHierarchyFromXA(str long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA @ stdcall D3DXLoadMeshHierarchyFromXInMemory(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXInMemory -@ stdcall D3DXLoadMeshHierarchyFromXW(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW +@ stdcall D3DXLoadMeshHierarchyFromXW(wstr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW @ stdcall D3DXLoadPatchMeshFromXof(ptr long ptr ptr ptr long ptr) d3dx9_36.D3DXLoadPatchMeshFromXof @ stdcall D3DXLoadPRTBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileA @ stdcall D3DXLoadPRTBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileW @ stdcall D3DXLoadPRTCompBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileA @ stdcall D3DXLoadPRTCompBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileW @ stdcall D3DXLoadSkinMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadSkinMeshFromXof -@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA +@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA @ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileInMemory -@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW +@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW @ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromMemory -@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA -@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW -@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long) d3dx9_36.D3DXLoadSurfaceFromSurface +@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA +@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW +@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromSurface @ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileA @ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileInMemory @ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileW @@ -197,8 +197,8 @@ @ stdcall D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceA @ stdcall D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceW @ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadVolumeFromVolume -@ stdcall D3DXMatrixAffineTransformation(ptr long ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation -@ stdcall D3DXMatrixAffineTransformation2D(ptr long ptr long ptr) d3dx9_36.D3DXMatrixAffineTransformation2D +@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation +@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr) d3dx9_36.D3DXMatrixAffineTransformation2D @ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixDecompose @ stdcall D3DXMatrixDeterminant(ptr) d3dx9_36.D3DXMatrixDeterminant @ stdcall D3DXMatrixInverse(ptr ptr ptr) d3dx9_36.D3DXMatrixInverse @@ -206,28 +206,28 @@ @ stdcall D3DXMatrixLookAtRH(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixLookAtRH @ stdcall D3DXMatrixMultiply(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiply @ stdcall D3DXMatrixMultiplyTranspose(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiplyTranspose -@ stdcall D3DXMatrixOrthoLH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoLH -@ stdcall D3DXMatrixOrthoOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterLH -@ stdcall D3DXMatrixOrthoOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterRH -@ stdcall D3DXMatrixOrthoRH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoRH -@ stdcall D3DXMatrixPerspectiveFovLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovLH -@ stdcall D3DXMatrixPerspectiveFovRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovRH -@ stdcall D3DXMatrixPerspectiveLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveLH -@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH -@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH -@ stdcall D3DXMatrixPerspectiveRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveRH +@ stdcall D3DXMatrixOrthoLH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoLH +@ stdcall D3DXMatrixOrthoOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterLH +@ stdcall D3DXMatrixOrthoOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterRH +@ stdcall D3DXMatrixOrthoRH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoRH +@ stdcall D3DXMatrixPerspectiveFovLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovLH +@ stdcall D3DXMatrixPerspectiveFovRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovRH +@ stdcall D3DXMatrixPerspectiveLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveLH +@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH +@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH +@ stdcall D3DXMatrixPerspectiveRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveRH @ stdcall D3DXMatrixReflect(ptr ptr) d3dx9_36.D3DXMatrixReflect -@ stdcall D3DXMatrixRotationAxis(ptr ptr long) d3dx9_36.D3DXMatrixRotationAxis +@ stdcall D3DXMatrixRotationAxis(ptr ptr float) d3dx9_36.D3DXMatrixRotationAxis @ stdcall D3DXMatrixRotationQuaternion(ptr ptr) d3dx9_36.D3DXMatrixRotationQuaternion -@ stdcall D3DXMatrixRotationX(ptr long) d3dx9_36.D3DXMatrixRotationX -@ stdcall D3DXMatrixRotationY(ptr long) d3dx9_36.D3DXMatrixRotationY -@ stdcall D3DXMatrixRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXMatrixRotationYawPitchRoll -@ stdcall D3DXMatrixRotationZ(ptr long) d3dx9_36.D3DXMatrixRotationZ -@ stdcall D3DXMatrixScaling(ptr long long long) d3dx9_36.D3DXMatrixScaling +@ stdcall D3DXMatrixRotationX(ptr float) d3dx9_36.D3DXMatrixRotationX +@ stdcall D3DXMatrixRotationY(ptr float) d3dx9_36.D3DXMatrixRotationY +@ stdcall D3DXMatrixRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXMatrixRotationYawPitchRoll +@ stdcall D3DXMatrixRotationZ(ptr float) d3dx9_36.D3DXMatrixRotationZ +@ stdcall D3DXMatrixScaling(ptr float float float) d3dx9_36.D3DXMatrixScaling @ stdcall D3DXMatrixShadow(ptr ptr ptr) d3dx9_36.D3DXMatrixShadow @ stdcall D3DXMatrixTransformation(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXMatrixTransformation -@ stdcall D3DXMatrixTransformation2D(ptr ptr long ptr ptr long ptr) d3dx9_36.D3DXMatrixTransformation2D -@ stdcall D3DXMatrixTranslation(ptr long long long) d3dx9_36.D3DXMatrixTranslation +@ stdcall D3DXMatrixTransformation2D(ptr ptr float ptr ptr float ptr) d3dx9_36.D3DXMatrixTransformation2D +@ stdcall D3DXMatrixTranslation(ptr float float float) d3dx9_36.D3DXMatrixTranslation @ stdcall D3DXMatrixTranspose(ptr ptr) d3dx9_36.D3DXMatrixTranspose @ stdcall D3DXOptimizeFaces(ptr long long long ptr) d3dx9_36.D3DXOptimizeFaces @ stdcall D3DXOptimizeVertices(ptr long long long ptr) d3dx9_36.D3DXOptimizeVertices @@ -238,21 +238,21 @@ @ stdcall D3DXPlaneTransform(ptr ptr ptr) d3dx9_36.D3DXPlaneTransform @ stdcall D3DXPlaneTransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXPlaneTransformArray @ stdcall D3DXPreprocessShader(ptr long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShader -@ stdcall D3DXPreprocessShaderFromFileA(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA -@ stdcall D3DXPreprocessShaderFromFileW(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW -@ stdcall D3DXPreprocessShaderFromResourceA(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA -@ stdcall D3DXPreprocessShaderFromResourceW(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW -@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXQuaternionBaryCentric +@ stdcall D3DXPreprocessShaderFromFileA(str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA +@ stdcall D3DXPreprocessShaderFromFileW(wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW +@ stdcall D3DXPreprocessShaderFromResourceA(long str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA +@ stdcall D3DXPreprocessShaderFromResourceW(long wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW +@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXQuaternionBaryCentric @ stdcall D3DXQuaternionExp(ptr ptr) d3dx9_36.D3DXQuaternionExp @ stdcall D3DXQuaternionInverse(ptr ptr) d3dx9_36.D3DXQuaternionInverse @ stdcall D3DXQuaternionLn(ptr ptr) d3dx9_36.D3DXQuaternionLn @ stdcall D3DXQuaternionMultiply(ptr ptr ptr) d3dx9_36.D3DXQuaternionMultiply @ stdcall D3DXQuaternionNormalize(ptr ptr) d3dx9_36.D3DXQuaternionNormalize -@ stdcall D3DXQuaternionRotationAxis(ptr ptr long) d3dx9_36.D3DXQuaternionRotationAxis +@ stdcall D3DXQuaternionRotationAxis(ptr ptr float) d3dx9_36.D3DXQuaternionRotationAxis @ stdcall D3DXQuaternionRotationMatrix(ptr ptr) d3dx9_36.D3DXQuaternionRotationMatrix -@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXQuaternionRotationYawPitchRoll -@ stdcall D3DXQuaternionSlerp(ptr ptr ptr long) d3dx9_36.D3DXQuaternionSlerp -@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXQuaternionSquad +@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXQuaternionRotationYawPitchRoll +@ stdcall D3DXQuaternionSlerp(ptr ptr ptr float) d3dx9_36.D3DXQuaternionSlerp +@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXQuaternionSquad @ stdcall D3DXQuaternionSquadSetup(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXQuaternionSquadSetup @ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr) d3dx9_36.D3DXQuaternionToAxisAngle @ stdcall D3DXRectPatchSize(ptr ptr ptr) d3dx9_36.D3DXRectPatchSize @@ -275,19 +275,19 @@ @ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW @ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd @ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot -@ stdcall D3DXSHEvalConeLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight +@ stdcall D3DXSHEvalConeLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight @ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection -@ stdcall D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight -@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight -@ stdcall D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight +@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight +@ stdcall D3DXSHEvalHemisphereLight(long ptr int128 int128 ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight +@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight @ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr) d3dx9_36.D3DXSHProjectCubeMap @ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC @ stdcall D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr) d3dx9_36.D3DXSHPRTCompSuperCluster @ stdcall D3DXSHRotate(ptr long ptr ptr) d3dx9_36.D3DXSHRotate -@ stdcall D3DXSHRotateZ(ptr long long ptr) d3dx9_36.D3DXSHRotateZ -@ stdcall D3DXSHScale(ptr long ptr ptr) d3dx9_36.D3DXSHScale +@ stdcall D3DXSHRotateZ(ptr long float ptr) d3dx9_36.D3DXSHRotateZ +@ stdcall D3DXSHScale(ptr long ptr float) d3dx9_36.D3DXSHScale @ stdcall D3DXSimplifyMesh(ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXSimplifyMesh -@ stdcall D3DXSphereBoundProbe(ptr long ptr ptr) d3dx9_36.D3DXSphereBoundProbe +@ stdcall D3DXSphereBoundProbe(ptr float ptr ptr) d3dx9_36.D3DXSphereBoundProbe @ stdcall D3DXSplitMesh(ptr ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSplitMesh @ stdcall D3DXTessellateNPatches(ptr ptr long long ptr ptr) d3dx9_36.D3DXTessellateNPatches @ stdcall D3DXTessellateRectPatch(ptr ptr ptr ptr ptr) d3dx9_36.D3DXTessellateRectPatch @@ -298,9 +298,9 @@ @ stdcall D3DXUVAtlasPartition(ptr long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXUVAtlasPartition @ stdcall D3DXValidMesh(ptr ptr ptr) d3dx9_36.D3DXValidMesh @ stdcall D3DXValidPatchMesh(ptr ptr ptr ptr) d3dx9_36.D3DXValidPatchMesh -@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec2BaryCentric -@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2CatmullRom -@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2Hermite +@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec2BaryCentric +@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2CatmullRom +@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2Hermite @ stdcall D3DXVec2Normalize(ptr ptr) d3dx9_36.D3DXVec2Normalize @ stdcall D3DXVec2Transform(ptr ptr ptr) d3dx9_36.D3DXVec2Transform @ stdcall D3DXVec2TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformArray @@ -308,9 +308,9 @@ @ stdcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformCoordArray @ stdcall D3DXVec2TransformNormal(ptr ptr ptr) d3dx9_36.D3DXVec2TransformNormal @ stdcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformNormalArray -@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec3BaryCentric -@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3CatmullRom -@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3Hermite +@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec3BaryCentric +@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3CatmullRom +@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3Hermite @ stdcall D3DXVec3Normalize(ptr ptr) d3dx9_36.D3DXVec3Normalize @ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Project @ stdcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3ProjectArray @@ -322,10 +322,10 @@ @ stdcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformNormalArray @ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Unproject @ stdcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3UnprojectArray -@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec4BaryCentric -@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4CatmullRom +@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec4BaryCentric +@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4CatmullRom @ stdcall D3DXVec4Cross(ptr ptr ptr ptr) d3dx9_36.D3DXVec4Cross -@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4Hermite +@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4Hermite @ stdcall D3DXVec4Normalize(ptr ptr) d3dx9_36.D3DXVec4Normalize @ stdcall D3DXVec4Transform(ptr ptr ptr) d3dx9_36.D3DXVec4Transform @ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec4TransformArray diff --git a/dll/directx/wine/d3dx9_29/d3dx9_29_main.c b/dll/directx/wine/d3dx9_29/d3dx9_29_main.c index 59a7971a463..003c4a8efa6 100644 --- a/dll/directx/wine/d3dx9_29/d3dx9_29_main.c +++ b/dll/directx/wine/d3dx9_29/d3dx9_29_main.c @@ -47,8 +47,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } diff --git a/dll/directx/wine/d3dx9_30/CMakeLists.txt b/dll/directx/wine/d3dx9_30/CMakeLists.txt index f51c40bb9d5..caa2af16bfb 100644 --- a/dll/directx/wine/d3dx9_30/CMakeLists.txt +++ b/dll/directx/wine/d3dx9_30/CMakeLists.txt @@ -1,28 +1,16 @@ -spec2def(d3dx9_30.dll d3dx9_30.spec) - -list(APPEND SOURCE - d3dx9_30_main.c - version.rc - ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_30_stubs.c - ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_30.def) - add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_library(d3dx9_30 SHARED ${SOURCE}) + +spec2def(d3dx9_30.dll d3dx9_30.spec ADD_IMPORTLIB) + +list(APPEND SOURCE + d3dx9_30_main.c + ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_30_stubs.c + ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_30.def) + +add_library(d3dx9_30 SHARED ${SOURCE} version.rc) set_module_type(d3dx9_30 win32dll) target_link_libraries(d3dx9_30 wine) - -add_importlibs(d3dx9_30 - d3d9 - d3dx9_24 - d3dx9_36 - user32 - gdi32 - advapi32 - msvcrt - kernel32 - ntdll) - -add_dependencies(d3dx9_30 wineheaders) +add_importlibs(d3dx9_30 d3dx9_36 msvcrt kernel32 ntdll) add_cd_file(TARGET d3dx9_30 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_30/d3dx9_30.spec b/dll/directx/wine/d3dx9_30/d3dx9_30.spec index e6648b86480..82d8592d973 100644 --- a/dll/directx/wine/d3dx9_30/d3dx9_30.spec +++ b/dll/directx/wine/d3dx9_30/d3dx9_30.spec @@ -1,21 +1,21 @@ @ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShader -@ stdcall D3DXAssembleShaderFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA -@ stdcall D3DXAssembleShaderFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW -@ stdcall D3DXAssembleShaderFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA -@ stdcall D3DXAssembleShaderFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW +@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA +@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW +@ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA +@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW @ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) d3dx9_36.D3DXBoxBoundProbe -@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckCubeTextureRequirements -@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckTextureRequirements +@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckCubeTextureRequirements +@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckTextureRequirements @ stdcall D3DXCheckVersion(long long) -@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckVolumeTextureRequirements -@ stdcall D3DXCleanMesh(ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh -@ stdcall D3DXColorAdjustContrast(ptr ptr long) d3dx9_36.D3DXColorAdjustContrast -@ stdcall D3DXColorAdjustSaturation(ptr ptr long) d3dx9_36.D3DXColorAdjustSaturation -@ stdcall D3DXCompileShader(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShader -@ stdcall D3DXCompileShaderFromFileA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA -@ stdcall D3DXCompileShaderFromFileW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW -@ stdcall D3DXCompileShaderFromResourceA(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA -@ stdcall D3DXCompileShaderFromResourceW(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW +@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckVolumeTextureRequirements +@ stdcall D3DXCleanMesh(long ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh +@ stdcall D3DXColorAdjustContrast(ptr ptr float) d3dx9_36.D3DXColorAdjustContrast +@ stdcall D3DXColorAdjustSaturation(ptr ptr float) d3dx9_36.D3DXColorAdjustSaturation +@ stdcall D3DXCompileShader(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShader +@ stdcall D3DXCompileShaderFromFileA(str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA +@ stdcall D3DXCompileShaderFromFileW(wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW +@ stdcall D3DXCompileShaderFromResourceA(ptr str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA +@ stdcall D3DXCompileShaderFromResourceW(ptr wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW @ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingBox @ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingSphere @ stdcall D3DXComputeIMTFromPerVertexSignal(ptr ptr long long long ptr ptr ptr) d3dx9_36.D3DXComputeIMTFromPerVertexSignal @@ -30,9 +30,9 @@ @ stdcall D3DXConcatenateMeshes(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXConcatenateMeshes @ stdcall D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToSingleStrip @ stdcall D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToStrips -@ stdcall D3DXCpuOptimizations(long) d3dx9_24.D3DXCpuOptimizations +@ stdcall -stub D3DXCpuOptimizations(long) @ stdcall D3DXCreateAnimationController(long long long long ptr) d3dx9_36.D3DXCreateAnimationController -@ stdcall D3DXCreateBox(ptr long long long ptr ptr) d3dx9_36.D3DXCreateBox +@ stdcall D3DXCreateBox(ptr float float float ptr ptr) d3dx9_36.D3DXCreateBox @ stdcall D3DXCreateBuffer(long ptr) d3dx9_36.D3DXCreateBuffer @ stdcall D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr) d3dx9_36.D3DXCreateCompressedAnimationSet @ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr) d3dx9_36.D3DXCreateCubeTexture @@ -49,24 +49,24 @@ @ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder @ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffect @ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler -@ stdcall D3DXCreateEffectCompilerFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA -@ stdcall D3DXCreateEffectCompilerFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW -@ stdcall D3DXCreateEffectCompilerFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA -@ stdcall D3DXCreateEffectCompilerFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW -@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx -@ stdcall D3DXCreateEffectFromFileA(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA -@ stdcall D3DXCreateEffectFromFileExA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA -@ stdcall D3DXCreateEffectFromFileExW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW -@ stdcall D3DXCreateEffectFromFileW(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW -@ stdcall D3DXCreateEffectFromResourceA(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA -@ stdcall D3DXCreateEffectFromResourceExA(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA -@ stdcall D3DXCreateEffectFromResourceExW(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW -@ stdcall D3DXCreateEffectFromResourceW(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW +@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA +@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW +@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA +@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW +@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx +@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA +@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA +@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW +@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW +@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA +@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA +@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW +@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW @ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool -@ stdcall D3DXCreateFontA(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontA +@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectW -@ stdcall D3DXCreateFontW(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontW +@ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) d3dx9_36.D3DXCreateFontW @ stdcall D3DXCreateFragmentLinker(ptr long ptr) d3dx9_36.D3DXCreateFragmentLinker @ stdcall D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateKeyframedAnimationSet @ stdcall D3DXCreateLine(ptr ptr) d3dx9_36.D3DXCreateLine @@ -87,22 +87,22 @@ @ stdcall D3DXCreateSkinInfo(long ptr long ptr) d3dx9_36.D3DXCreateSkinInfo @ stdcall D3DXCreateSkinInfoFromBlendedMesh(ptr long ptr ptr) d3dx9_36.D3DXCreateSkinInfoFromBlendedMesh @ stdcall D3DXCreateSkinInfoFVF(long long long ptr) d3dx9_36.D3DXCreateSkinInfoFVF -@ stdcall D3DXCreateSphere(ptr long long long ptr ptr) d3dx9_36.D3DXCreateSphere +@ stdcall D3DXCreateSphere(ptr float long long ptr ptr) d3dx9_36.D3DXCreateSphere @ stdcall D3DXCreateSprite(ptr ptr) d3dx9_36.D3DXCreateSprite @ stdcall D3DXCreateTeapot(ptr ptr ptr) d3dx9_36.D3DXCreateTeapot -@ stdcall D3DXCreateTextA(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextA -@ stdcall D3DXCreateTextW(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextW +@ stdcall D3DXCreateTextA(ptr long str float float ptr ptr ptr) d3dx9_36.D3DXCreateTextA +@ stdcall D3DXCreateTextW(ptr long wstr float float ptr ptr ptr) d3dx9_36.D3DXCreateTextW @ stdcall D3DXCreateTexture(ptr long long long long long long ptr) d3dx9_36.D3DXCreateTexture -@ stdcall D3DXCreateTextureFromFileA(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileA -@ stdcall D3DXCreateTextureFromFileExA(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA -@ stdcall D3DXCreateTextureFromFileExW(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW +@ stdcall D3DXCreateTextureFromFileA(ptr str ptr) d3dx9_36.D3DXCreateTextureFromFileA +@ stdcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA +@ stdcall D3DXCreateTextureFromFileExW(ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW @ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateTextureFromFileInMemory @ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileInMemoryEx -@ stdcall D3DXCreateTextureFromFileW(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileW -@ stdcall D3DXCreateTextureFromResourceA(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceA -@ stdcall D3DXCreateTextureFromResourceExA(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA -@ stdcall D3DXCreateTextureFromResourceExW(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW -@ stdcall D3DXCreateTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceW +@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromFileW +@ stdcall D3DXCreateTextureFromResourceA(ptr ptr str ptr) d3dx9_36.D3DXCreateTextureFromResourceA +@ stdcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA +@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW +@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromResourceW @ stdcall D3DXCreateTextureGutterHelper(long long ptr long ptr) d3dx9_36.D3DXCreateTextureGutterHelper @ stdcall D3DXCreateTextureShader(ptr ptr) d3dx9_36.D3DXCreateTextureShader @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateTorus @@ -138,7 +138,7 @@ @ stdcall D3DXFrameFind(ptr ptr) d3dx9_36.D3DXFrameFind @ stdcall D3DXFrameNumNamedMatrices(ptr) d3dx9_36.D3DXFrameNumNamedMatrices @ stdcall D3DXFrameRegisterNamedMatrices(ptr ptr) d3dx9_36.D3DXFrameRegisterNamedMatrices -@ stdcall D3DXFresnelTerm(long long) d3dx9_36.D3DXFresnelTerm +@ stdcall D3DXFresnelTerm(float float) d3dx9_36.D3DXFresnelTerm @ stdcall D3DXFVFFromDeclarator(ptr ptr) d3dx9_36.D3DXFVFFromDeclarator @ stdcall D3DXGatherFragments(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragments @ stdcall D3DXGatherFragmentsFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragmentsFromFileA @@ -151,11 +151,11 @@ @ stdcall D3DXGetDeclVertexSize(ptr long) d3dx9_36.D3DXGetDeclVertexSize @ stdcall D3DXGetDriverLevel(ptr) d3dx9_36.D3DXGetDriverLevel @ stdcall D3DXGetFVFVertexSize(long) d3dx9_36.D3DXGetFVFVertexSize -@ stdcall D3DXGetImageInfoFromFileA(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileA +@ stdcall D3DXGetImageInfoFromFileA(str ptr) d3dx9_36.D3DXGetImageInfoFromFileA @ stdcall D3DXGetImageInfoFromFileInMemory(ptr long ptr) d3dx9_36.D3DXGetImageInfoFromFileInMemory -@ stdcall D3DXGetImageInfoFromFileW(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileW -@ stdcall D3DXGetImageInfoFromResourceA(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceA -@ stdcall D3DXGetImageInfoFromResourceW(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW +@ stdcall D3DXGetImageInfoFromFileW(wstr ptr) d3dx9_36.D3DXGetImageInfoFromFileW +@ stdcall D3DXGetImageInfoFromResourceA(long str ptr) d3dx9_36.D3DXGetImageInfoFromResourceA +@ stdcall D3DXGetImageInfoFromResourceW(long wstr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW @ stdcall D3DXGetPixelShaderProfile(ptr) d3dx9_36.D3DXGetPixelShaderProfile @ stdcall D3DXGetShaderConstantTable(ptr ptr) d3dx9_36.D3DXGetShaderConstantTable @ stdcall D3DXGetShaderInputSemantics(ptr ptr ptr) d3dx9_36.D3DXGetShaderInputSemantics @@ -169,27 +169,27 @@ @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersect @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectSubset @ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectTri -@ stdcall D3DXLoadMeshFromXA(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA +@ stdcall D3DXLoadMeshFromXA(str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA @ stdcall D3DXLoadMeshFromXInMemory(ptr long long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXInMemory -@ stdcall D3DXLoadMeshFromXResource(long ptr ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource -@ stdcall D3DXLoadMeshFromXW(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW +@ stdcall D3DXLoadMeshFromXResource(long str str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource +@ stdcall D3DXLoadMeshFromXW(wstr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW @ stdcall D3DXLoadMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXof -@ stdcall D3DXLoadMeshHierarchyFromXA(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA +@ stdcall D3DXLoadMeshHierarchyFromXA(str long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA @ stdcall D3DXLoadMeshHierarchyFromXInMemory(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXInMemory -@ stdcall D3DXLoadMeshHierarchyFromXW(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW +@ stdcall D3DXLoadMeshHierarchyFromXW(wstr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW @ stdcall D3DXLoadPatchMeshFromXof(ptr long ptr ptr ptr long ptr) d3dx9_36.D3DXLoadPatchMeshFromXof @ stdcall D3DXLoadPRTBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileA @ stdcall D3DXLoadPRTBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileW @ stdcall D3DXLoadPRTCompBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileA @ stdcall D3DXLoadPRTCompBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileW @ stdcall D3DXLoadSkinMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadSkinMeshFromXof -@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA +@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA @ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileInMemory -@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW +@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW @ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromMemory -@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA -@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW -@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long) d3dx9_36.D3DXLoadSurfaceFromSurface +@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA +@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW +@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromSurface @ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileA @ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileInMemory @ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileW @@ -197,8 +197,8 @@ @ stdcall D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceA @ stdcall D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceW @ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadVolumeFromVolume -@ stdcall D3DXMatrixAffineTransformation(ptr long ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation -@ stdcall D3DXMatrixAffineTransformation2D(ptr long ptr long ptr) d3dx9_36.D3DXMatrixAffineTransformation2D +@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation +@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr) d3dx9_36.D3DXMatrixAffineTransformation2D @ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixDecompose @ stdcall D3DXMatrixDeterminant(ptr) d3dx9_36.D3DXMatrixDeterminant @ stdcall D3DXMatrixInverse(ptr ptr ptr) d3dx9_36.D3DXMatrixInverse @@ -206,28 +206,28 @@ @ stdcall D3DXMatrixLookAtRH(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixLookAtRH @ stdcall D3DXMatrixMultiply(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiply @ stdcall D3DXMatrixMultiplyTranspose(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiplyTranspose -@ stdcall D3DXMatrixOrthoLH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoLH -@ stdcall D3DXMatrixOrthoOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterLH -@ stdcall D3DXMatrixOrthoOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterRH -@ stdcall D3DXMatrixOrthoRH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoRH -@ stdcall D3DXMatrixPerspectiveFovLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovLH -@ stdcall D3DXMatrixPerspectiveFovRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovRH -@ stdcall D3DXMatrixPerspectiveLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveLH -@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH -@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH -@ stdcall D3DXMatrixPerspectiveRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveRH +@ stdcall D3DXMatrixOrthoLH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoLH +@ stdcall D3DXMatrixOrthoOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterLH +@ stdcall D3DXMatrixOrthoOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterRH +@ stdcall D3DXMatrixOrthoRH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoRH +@ stdcall D3DXMatrixPerspectiveFovLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovLH +@ stdcall D3DXMatrixPerspectiveFovRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovRH +@ stdcall D3DXMatrixPerspectiveLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveLH +@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH +@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH +@ stdcall D3DXMatrixPerspectiveRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveRH @ stdcall D3DXMatrixReflect(ptr ptr) d3dx9_36.D3DXMatrixReflect -@ stdcall D3DXMatrixRotationAxis(ptr ptr long) d3dx9_36.D3DXMatrixRotationAxis +@ stdcall D3DXMatrixRotationAxis(ptr ptr float) d3dx9_36.D3DXMatrixRotationAxis @ stdcall D3DXMatrixRotationQuaternion(ptr ptr) d3dx9_36.D3DXMatrixRotationQuaternion -@ stdcall D3DXMatrixRotationX(ptr long) d3dx9_36.D3DXMatrixRotationX -@ stdcall D3DXMatrixRotationY(ptr long) d3dx9_36.D3DXMatrixRotationY -@ stdcall D3DXMatrixRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXMatrixRotationYawPitchRoll -@ stdcall D3DXMatrixRotationZ(ptr long) d3dx9_36.D3DXMatrixRotationZ -@ stdcall D3DXMatrixScaling(ptr long long long) d3dx9_36.D3DXMatrixScaling +@ stdcall D3DXMatrixRotationX(ptr float) d3dx9_36.D3DXMatrixRotationX +@ stdcall D3DXMatrixRotationY(ptr float) d3dx9_36.D3DXMatrixRotationY +@ stdcall D3DXMatrixRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXMatrixRotationYawPitchRoll +@ stdcall D3DXMatrixRotationZ(ptr float) d3dx9_36.D3DXMatrixRotationZ +@ stdcall D3DXMatrixScaling(ptr float float float) d3dx9_36.D3DXMatrixScaling @ stdcall D3DXMatrixShadow(ptr ptr ptr) d3dx9_36.D3DXMatrixShadow @ stdcall D3DXMatrixTransformation(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXMatrixTransformation -@ stdcall D3DXMatrixTransformation2D(ptr ptr long ptr ptr long ptr) d3dx9_36.D3DXMatrixTransformation2D -@ stdcall D3DXMatrixTranslation(ptr long long long) d3dx9_36.D3DXMatrixTranslation +@ stdcall D3DXMatrixTransformation2D(ptr ptr float ptr ptr float ptr) d3dx9_36.D3DXMatrixTransformation2D +@ stdcall D3DXMatrixTranslation(ptr float float float) d3dx9_36.D3DXMatrixTranslation @ stdcall D3DXMatrixTranspose(ptr ptr) d3dx9_36.D3DXMatrixTranspose @ stdcall D3DXOptimizeFaces(ptr long long long ptr) d3dx9_36.D3DXOptimizeFaces @ stdcall D3DXOptimizeVertices(ptr long long long ptr) d3dx9_36.D3DXOptimizeVertices @@ -238,21 +238,21 @@ @ stdcall D3DXPlaneTransform(ptr ptr ptr) d3dx9_36.D3DXPlaneTransform @ stdcall D3DXPlaneTransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXPlaneTransformArray @ stdcall D3DXPreprocessShader(ptr long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShader -@ stdcall D3DXPreprocessShaderFromFileA(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA -@ stdcall D3DXPreprocessShaderFromFileW(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW -@ stdcall D3DXPreprocessShaderFromResourceA(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA -@ stdcall D3DXPreprocessShaderFromResourceW(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW -@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXQuaternionBaryCentric +@ stdcall D3DXPreprocessShaderFromFileA(str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA +@ stdcall D3DXPreprocessShaderFromFileW(wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW +@ stdcall D3DXPreprocessShaderFromResourceA(long str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA +@ stdcall D3DXPreprocessShaderFromResourceW(long wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW +@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXQuaternionBaryCentric @ stdcall D3DXQuaternionExp(ptr ptr) d3dx9_36.D3DXQuaternionExp @ stdcall D3DXQuaternionInverse(ptr ptr) d3dx9_36.D3DXQuaternionInverse @ stdcall D3DXQuaternionLn(ptr ptr) d3dx9_36.D3DXQuaternionLn @ stdcall D3DXQuaternionMultiply(ptr ptr ptr) d3dx9_36.D3DXQuaternionMultiply @ stdcall D3DXQuaternionNormalize(ptr ptr) d3dx9_36.D3DXQuaternionNormalize -@ stdcall D3DXQuaternionRotationAxis(ptr ptr long) d3dx9_36.D3DXQuaternionRotationAxis +@ stdcall D3DXQuaternionRotationAxis(ptr ptr float) d3dx9_36.D3DXQuaternionRotationAxis @ stdcall D3DXQuaternionRotationMatrix(ptr ptr) d3dx9_36.D3DXQuaternionRotationMatrix -@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXQuaternionRotationYawPitchRoll -@ stdcall D3DXQuaternionSlerp(ptr ptr ptr long) d3dx9_36.D3DXQuaternionSlerp -@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXQuaternionSquad +@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXQuaternionRotationYawPitchRoll +@ stdcall D3DXQuaternionSlerp(ptr ptr ptr float) d3dx9_36.D3DXQuaternionSlerp +@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXQuaternionSquad @ stdcall D3DXQuaternionSquadSetup(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXQuaternionSquadSetup @ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr) d3dx9_36.D3DXQuaternionToAxisAngle @ stdcall D3DXRectPatchSize(ptr ptr ptr) d3dx9_36.D3DXRectPatchSize @@ -275,19 +275,19 @@ @ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW @ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd @ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot -@ stdcall D3DXSHEvalConeLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight +@ stdcall D3DXSHEvalConeLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight @ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection -@ stdcall D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight -@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight -@ stdcall D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight +@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight +@ stdcall D3DXSHEvalHemisphereLight(long ptr int128 int128 ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight +@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight @ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr) d3dx9_36.D3DXSHProjectCubeMap @ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC @ stdcall D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr) d3dx9_36.D3DXSHPRTCompSuperCluster @ stdcall D3DXSHRotate(ptr long ptr ptr) d3dx9_36.D3DXSHRotate -@ stdcall D3DXSHRotateZ(ptr long long ptr) d3dx9_36.D3DXSHRotateZ -@ stdcall D3DXSHScale(ptr long ptr ptr) d3dx9_36.D3DXSHScale +@ stdcall D3DXSHRotateZ(ptr long float ptr) d3dx9_36.D3DXSHRotateZ +@ stdcall D3DXSHScale(ptr long ptr float) d3dx9_36.D3DXSHScale @ stdcall D3DXSimplifyMesh(ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXSimplifyMesh -@ stdcall D3DXSphereBoundProbe(ptr long ptr ptr) d3dx9_36.D3DXSphereBoundProbe +@ stdcall D3DXSphereBoundProbe(ptr float ptr ptr) d3dx9_36.D3DXSphereBoundProbe @ stdcall D3DXSplitMesh(ptr ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSplitMesh @ stdcall D3DXTessellateNPatches(ptr ptr long long ptr ptr) d3dx9_36.D3DXTessellateNPatches @ stdcall D3DXTessellateRectPatch(ptr ptr ptr ptr ptr) d3dx9_36.D3DXTessellateRectPatch @@ -298,9 +298,9 @@ @ stdcall D3DXUVAtlasPartition(ptr long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXUVAtlasPartition @ stdcall D3DXValidMesh(ptr ptr ptr) d3dx9_36.D3DXValidMesh @ stdcall D3DXValidPatchMesh(ptr ptr ptr ptr) d3dx9_36.D3DXValidPatchMesh -@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec2BaryCentric -@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2CatmullRom -@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2Hermite +@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec2BaryCentric +@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2CatmullRom +@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2Hermite @ stdcall D3DXVec2Normalize(ptr ptr) d3dx9_36.D3DXVec2Normalize @ stdcall D3DXVec2Transform(ptr ptr ptr) d3dx9_36.D3DXVec2Transform @ stdcall D3DXVec2TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformArray @@ -308,9 +308,9 @@ @ stdcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformCoordArray @ stdcall D3DXVec2TransformNormal(ptr ptr ptr) d3dx9_36.D3DXVec2TransformNormal @ stdcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformNormalArray -@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec3BaryCentric -@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3CatmullRom -@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3Hermite +@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec3BaryCentric +@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3CatmullRom +@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3Hermite @ stdcall D3DXVec3Normalize(ptr ptr) d3dx9_36.D3DXVec3Normalize @ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Project @ stdcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3ProjectArray @@ -322,10 +322,10 @@ @ stdcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformNormalArray @ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Unproject @ stdcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3UnprojectArray -@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec4BaryCentric -@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4CatmullRom +@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec4BaryCentric +@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4CatmullRom @ stdcall D3DXVec4Cross(ptr ptr ptr ptr) d3dx9_36.D3DXVec4Cross -@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4Hermite +@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4Hermite @ stdcall D3DXVec4Normalize(ptr ptr) d3dx9_36.D3DXVec4Normalize @ stdcall D3DXVec4Transform(ptr ptr ptr) d3dx9_36.D3DXVec4Transform @ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec4TransformArray diff --git a/dll/directx/wine/d3dx9_30/d3dx9_30_main.c b/dll/directx/wine/d3dx9_30/d3dx9_30_main.c index 1bb0ce35657..e81aac210fc 100644 --- a/dll/directx/wine/d3dx9_30/d3dx9_30_main.c +++ b/dll/directx/wine/d3dx9_30/d3dx9_30_main.c @@ -47,8 +47,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } diff --git a/dll/directx/wine/d3dx9_31/CMakeLists.txt b/dll/directx/wine/d3dx9_31/CMakeLists.txt index f3ae270408a..c693b9fc5ab 100644 --- a/dll/directx/wine/d3dx9_31/CMakeLists.txt +++ b/dll/directx/wine/d3dx9_31/CMakeLists.txt @@ -1,27 +1,16 @@ +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) + spec2def(d3dx9_31.dll d3dx9_31.spec) list(APPEND SOURCE d3dx9_31_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_31_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_31.def) -add_definitions(-D__WINESRC__) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_library(d3dx9_31 SHARED ${SOURCE}) +add_library(d3dx9_31 SHARED ${SOURCE} version.rc) set_module_type(d3dx9_31 win32dll) target_link_libraries(d3dx9_31 wine) - -add_importlibs(d3dx9_31 - d3d9 - d3dx9_36 - user32 - gdi32 - advapi32 - msvcrt - kernel32 - ntdll) - -add_dependencies(d3dx9_31 wineheaders) +add_importlibs(d3dx9_31 d3dx9_36 msvcrt kernel32 ntdll) add_cd_file(TARGET d3dx9_31 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_31/d3dx9_31.spec b/dll/directx/wine/d3dx9_31/d3dx9_31.spec index 807b7a90b74..1e670284320 100644 --- a/dll/directx/wine/d3dx9_31/d3dx9_31.spec +++ b/dll/directx/wine/d3dx9_31/d3dx9_31.spec @@ -1,21 +1,21 @@ @ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShader -@ stdcall D3DXAssembleShaderFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA -@ stdcall D3DXAssembleShaderFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW -@ stdcall D3DXAssembleShaderFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA -@ stdcall D3DXAssembleShaderFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW +@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA +@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW +@ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA +@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW @ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) d3dx9_36.D3DXBoxBoundProbe -@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckCubeTextureRequirements -@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckTextureRequirements +@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckCubeTextureRequirements +@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckTextureRequirements @ stdcall D3DXCheckVersion(long long) -@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckVolumeTextureRequirements -@ stdcall D3DXCleanMesh(ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh -@ stdcall D3DXColorAdjustContrast(ptr ptr long) d3dx9_36.D3DXColorAdjustContrast -@ stdcall D3DXColorAdjustSaturation(ptr ptr long) d3dx9_36.D3DXColorAdjustSaturation -@ stdcall D3DXCompileShader(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShader -@ stdcall D3DXCompileShaderFromFileA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA -@ stdcall D3DXCompileShaderFromFileW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW -@ stdcall D3DXCompileShaderFromResourceA(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA -@ stdcall D3DXCompileShaderFromResourceW(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW +@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckVolumeTextureRequirements +@ stdcall D3DXCleanMesh(long ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh +@ stdcall D3DXColorAdjustContrast(ptr ptr float) d3dx9_36.D3DXColorAdjustContrast +@ stdcall D3DXColorAdjustSaturation(ptr ptr float) d3dx9_36.D3DXColorAdjustSaturation +@ stdcall D3DXCompileShader(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShader +@ stdcall D3DXCompileShaderFromFileA(str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA +@ stdcall D3DXCompileShaderFromFileW(wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW +@ stdcall D3DXCompileShaderFromResourceA(ptr str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA +@ stdcall D3DXCompileShaderFromResourceW(ptr wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW @ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingBox @ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingSphere @ stdcall D3DXComputeIMTFromPerVertexSignal(ptr ptr long long long ptr ptr ptr) d3dx9_36.D3DXComputeIMTFromPerVertexSignal @@ -31,7 +31,7 @@ @ stdcall D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToSingleStrip @ stdcall D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToStrips @ stdcall D3DXCreateAnimationController(long long long long ptr) d3dx9_36.D3DXCreateAnimationController -@ stdcall D3DXCreateBox(ptr long long long ptr ptr) d3dx9_36.D3DXCreateBox +@ stdcall D3DXCreateBox(ptr float float float ptr ptr) d3dx9_36.D3DXCreateBox @ stdcall D3DXCreateBuffer(long ptr) d3dx9_36.D3DXCreateBuffer @ stdcall D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr) d3dx9_36.D3DXCreateCompressedAnimationSet @ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr) d3dx9_36.D3DXCreateCubeTexture @@ -48,24 +48,24 @@ @ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder @ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffect @ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler -@ stdcall D3DXCreateEffectCompilerFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA -@ stdcall D3DXCreateEffectCompilerFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW -@ stdcall D3DXCreateEffectCompilerFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA -@ stdcall D3DXCreateEffectCompilerFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW -@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx -@ stdcall D3DXCreateEffectFromFileA(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA -@ stdcall D3DXCreateEffectFromFileExA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA -@ stdcall D3DXCreateEffectFromFileExW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW -@ stdcall D3DXCreateEffectFromFileW(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW -@ stdcall D3DXCreateEffectFromResourceA(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA -@ stdcall D3DXCreateEffectFromResourceExA(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA -@ stdcall D3DXCreateEffectFromResourceExW(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW -@ stdcall D3DXCreateEffectFromResourceW(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW +@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA +@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW +@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA +@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW +@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx +@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA +@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA +@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW +@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW +@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA +@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA +@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW +@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW @ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool -@ stdcall D3DXCreateFontA(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontA +@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectW -@ stdcall D3DXCreateFontW(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontW +@ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) d3dx9_36.D3DXCreateFontW @ stdcall D3DXCreateFragmentLinker(ptr long ptr) d3dx9_36.D3DXCreateFragmentLinker @ stdcall D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateKeyframedAnimationSet @ stdcall D3DXCreateLine(ptr ptr) d3dx9_36.D3DXCreateLine @@ -86,22 +86,22 @@ @ stdcall D3DXCreateSkinInfo(long ptr long ptr) d3dx9_36.D3DXCreateSkinInfo @ stdcall D3DXCreateSkinInfoFromBlendedMesh(ptr long ptr ptr) d3dx9_36.D3DXCreateSkinInfoFromBlendedMesh @ stdcall D3DXCreateSkinInfoFVF(long long long ptr) d3dx9_36.D3DXCreateSkinInfoFVF -@ stdcall D3DXCreateSphere(ptr long long long ptr ptr) d3dx9_36.D3DXCreateSphere +@ stdcall D3DXCreateSphere(ptr float long long ptr ptr) d3dx9_36.D3DXCreateSphere @ stdcall D3DXCreateSprite(ptr ptr) d3dx9_36.D3DXCreateSprite @ stdcall D3DXCreateTeapot(ptr ptr ptr) d3dx9_36.D3DXCreateTeapot -@ stdcall D3DXCreateTextA(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextA -@ stdcall D3DXCreateTextW(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextW +@ stdcall D3DXCreateTextA(ptr long str float float ptr ptr ptr) d3dx9_36.D3DXCreateTextA +@ stdcall D3DXCreateTextW(ptr long wstr float float ptr ptr ptr) d3dx9_36.D3DXCreateTextW @ stdcall D3DXCreateTexture(ptr long long long long long long ptr) d3dx9_36.D3DXCreateTexture -@ stdcall D3DXCreateTextureFromFileA(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileA -@ stdcall D3DXCreateTextureFromFileExA(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA -@ stdcall D3DXCreateTextureFromFileExW(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW +@ stdcall D3DXCreateTextureFromFileA(ptr str ptr) d3dx9_36.D3DXCreateTextureFromFileA +@ stdcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA +@ stdcall D3DXCreateTextureFromFileExW(ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW @ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateTextureFromFileInMemory @ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileInMemoryEx -@ stdcall D3DXCreateTextureFromFileW(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileW -@ stdcall D3DXCreateTextureFromResourceA(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceA -@ stdcall D3DXCreateTextureFromResourceExA(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA -@ stdcall D3DXCreateTextureFromResourceExW(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW -@ stdcall D3DXCreateTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceW +@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromFileW +@ stdcall D3DXCreateTextureFromResourceA(ptr ptr str ptr) d3dx9_36.D3DXCreateTextureFromResourceA +@ stdcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA +@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW +@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromResourceW @ stdcall D3DXCreateTextureGutterHelper(long long ptr long ptr) d3dx9_36.D3DXCreateTextureGutterHelper @ stdcall D3DXCreateTextureShader(ptr ptr) d3dx9_36.D3DXCreateTextureShader @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateTorus @@ -137,7 +137,7 @@ @ stdcall D3DXFrameFind(ptr ptr) d3dx9_36.D3DXFrameFind @ stdcall D3DXFrameNumNamedMatrices(ptr) d3dx9_36.D3DXFrameNumNamedMatrices @ stdcall D3DXFrameRegisterNamedMatrices(ptr ptr) d3dx9_36.D3DXFrameRegisterNamedMatrices -@ stdcall D3DXFresnelTerm(long long) d3dx9_36.D3DXFresnelTerm +@ stdcall D3DXFresnelTerm(float float) d3dx9_36.D3DXFresnelTerm @ stdcall D3DXFVFFromDeclarator(ptr ptr) d3dx9_36.D3DXFVFFromDeclarator @ stdcall D3DXGatherFragments(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragments @ stdcall D3DXGatherFragmentsFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragmentsFromFileA @@ -150,11 +150,11 @@ @ stdcall D3DXGetDeclVertexSize(ptr long) d3dx9_36.D3DXGetDeclVertexSize @ stdcall D3DXGetDriverLevel(ptr) d3dx9_36.D3DXGetDriverLevel @ stdcall D3DXGetFVFVertexSize(long) d3dx9_36.D3DXGetFVFVertexSize -@ stdcall D3DXGetImageInfoFromFileA(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileA +@ stdcall D3DXGetImageInfoFromFileA(str ptr) d3dx9_36.D3DXGetImageInfoFromFileA @ stdcall D3DXGetImageInfoFromFileInMemory(ptr long ptr) d3dx9_36.D3DXGetImageInfoFromFileInMemory -@ stdcall D3DXGetImageInfoFromFileW(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileW -@ stdcall D3DXGetImageInfoFromResourceA(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceA -@ stdcall D3DXGetImageInfoFromResourceW(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW +@ stdcall D3DXGetImageInfoFromFileW(wstr ptr) d3dx9_36.D3DXGetImageInfoFromFileW +@ stdcall D3DXGetImageInfoFromResourceA(long str ptr) d3dx9_36.D3DXGetImageInfoFromResourceA +@ stdcall D3DXGetImageInfoFromResourceW(long wstr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW @ stdcall D3DXGetPixelShaderProfile(ptr) d3dx9_36.D3DXGetPixelShaderProfile @ stdcall D3DXGetShaderConstantTable(ptr ptr) d3dx9_36.D3DXGetShaderConstantTable @ stdcall D3DXGetShaderInputSemantics(ptr ptr ptr) d3dx9_36.D3DXGetShaderInputSemantics @@ -166,27 +166,27 @@ @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersect @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectSubset @ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectTri -@ stdcall D3DXLoadMeshFromXA(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA +@ stdcall D3DXLoadMeshFromXA(str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA @ stdcall D3DXLoadMeshFromXInMemory(ptr long long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXInMemory -@ stdcall D3DXLoadMeshFromXResource(long ptr ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource -@ stdcall D3DXLoadMeshFromXW(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW +@ stdcall D3DXLoadMeshFromXResource(long str str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource +@ stdcall D3DXLoadMeshFromXW(wstr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW @ stdcall D3DXLoadMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXof -@ stdcall D3DXLoadMeshHierarchyFromXA(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA +@ stdcall D3DXLoadMeshHierarchyFromXA(str long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA @ stdcall D3DXLoadMeshHierarchyFromXInMemory(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXInMemory -@ stdcall D3DXLoadMeshHierarchyFromXW(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW +@ stdcall D3DXLoadMeshHierarchyFromXW(wstr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW @ stdcall D3DXLoadPatchMeshFromXof(ptr long ptr ptr ptr long ptr) d3dx9_36.D3DXLoadPatchMeshFromXof @ stdcall D3DXLoadPRTBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileA @ stdcall D3DXLoadPRTBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileW @ stdcall D3DXLoadPRTCompBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileA @ stdcall D3DXLoadPRTCompBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileW @ stdcall D3DXLoadSkinMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadSkinMeshFromXof -@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA +@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA @ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileInMemory -@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW +@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW @ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromMemory -@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA -@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW -@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long) d3dx9_36.D3DXLoadSurfaceFromSurface +@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA +@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW +@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromSurface @ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileA @ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileInMemory @ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileW @@ -194,8 +194,8 @@ @ stdcall D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceA @ stdcall D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceW @ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadVolumeFromVolume -@ stdcall D3DXMatrixAffineTransformation(ptr long ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation -@ stdcall D3DXMatrixAffineTransformation2D(ptr long ptr long ptr) d3dx9_36.D3DXMatrixAffineTransformation2D +@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation +@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr) d3dx9_36.D3DXMatrixAffineTransformation2D @ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixDecompose @ stdcall D3DXMatrixDeterminant(ptr) d3dx9_36.D3DXMatrixDeterminant @ stdcall D3DXMatrixInverse(ptr ptr ptr) d3dx9_36.D3DXMatrixInverse @@ -203,28 +203,28 @@ @ stdcall D3DXMatrixLookAtRH(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixLookAtRH @ stdcall D3DXMatrixMultiply(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiply @ stdcall D3DXMatrixMultiplyTranspose(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiplyTranspose -@ stdcall D3DXMatrixOrthoLH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoLH -@ stdcall D3DXMatrixOrthoOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterLH -@ stdcall D3DXMatrixOrthoOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterRH -@ stdcall D3DXMatrixOrthoRH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoRH -@ stdcall D3DXMatrixPerspectiveFovLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovLH -@ stdcall D3DXMatrixPerspectiveFovRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovRH -@ stdcall D3DXMatrixPerspectiveLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveLH -@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH -@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH -@ stdcall D3DXMatrixPerspectiveRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveRH +@ stdcall D3DXMatrixOrthoLH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoLH +@ stdcall D3DXMatrixOrthoOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterLH +@ stdcall D3DXMatrixOrthoOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterRH +@ stdcall D3DXMatrixOrthoRH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoRH +@ stdcall D3DXMatrixPerspectiveFovLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovLH +@ stdcall D3DXMatrixPerspectiveFovRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovRH +@ stdcall D3DXMatrixPerspectiveLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveLH +@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH +@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH +@ stdcall D3DXMatrixPerspectiveRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveRH @ stdcall D3DXMatrixReflect(ptr ptr) d3dx9_36.D3DXMatrixReflect -@ stdcall D3DXMatrixRotationAxis(ptr ptr long) d3dx9_36.D3DXMatrixRotationAxis +@ stdcall D3DXMatrixRotationAxis(ptr ptr float) d3dx9_36.D3DXMatrixRotationAxis @ stdcall D3DXMatrixRotationQuaternion(ptr ptr) d3dx9_36.D3DXMatrixRotationQuaternion -@ stdcall D3DXMatrixRotationX(ptr long) d3dx9_36.D3DXMatrixRotationX -@ stdcall D3DXMatrixRotationY(ptr long) d3dx9_36.D3DXMatrixRotationY -@ stdcall D3DXMatrixRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXMatrixRotationYawPitchRoll -@ stdcall D3DXMatrixRotationZ(ptr long) d3dx9_36.D3DXMatrixRotationZ -@ stdcall D3DXMatrixScaling(ptr long long long) d3dx9_36.D3DXMatrixScaling +@ stdcall D3DXMatrixRotationX(ptr float) d3dx9_36.D3DXMatrixRotationX +@ stdcall D3DXMatrixRotationY(ptr float) d3dx9_36.D3DXMatrixRotationY +@ stdcall D3DXMatrixRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXMatrixRotationYawPitchRoll +@ stdcall D3DXMatrixRotationZ(ptr float) d3dx9_36.D3DXMatrixRotationZ +@ stdcall D3DXMatrixScaling(ptr float float float) d3dx9_36.D3DXMatrixScaling @ stdcall D3DXMatrixShadow(ptr ptr ptr) d3dx9_36.D3DXMatrixShadow @ stdcall D3DXMatrixTransformation(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXMatrixTransformation -@ stdcall D3DXMatrixTransformation2D(ptr ptr long ptr ptr long ptr) d3dx9_36.D3DXMatrixTransformation2D -@ stdcall D3DXMatrixTranslation(ptr long long long) d3dx9_36.D3DXMatrixTranslation +@ stdcall D3DXMatrixTransformation2D(ptr ptr float ptr ptr float ptr) d3dx9_36.D3DXMatrixTransformation2D +@ stdcall D3DXMatrixTranslation(ptr float float float) d3dx9_36.D3DXMatrixTranslation @ stdcall D3DXMatrixTranspose(ptr ptr) d3dx9_36.D3DXMatrixTranspose @ stdcall D3DXOptimizeFaces(ptr long long long ptr) d3dx9_36.D3DXOptimizeFaces @ stdcall D3DXOptimizeVertices(ptr long long long ptr) d3dx9_36.D3DXOptimizeVertices @@ -235,21 +235,21 @@ @ stdcall D3DXPlaneTransform(ptr ptr ptr) d3dx9_36.D3DXPlaneTransform @ stdcall D3DXPlaneTransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXPlaneTransformArray @ stdcall D3DXPreprocessShader(ptr long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShader -@ stdcall D3DXPreprocessShaderFromFileA(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA -@ stdcall D3DXPreprocessShaderFromFileW(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW -@ stdcall D3DXPreprocessShaderFromResourceA(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA -@ stdcall D3DXPreprocessShaderFromResourceW(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW -@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXQuaternionBaryCentric +@ stdcall D3DXPreprocessShaderFromFileA(str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA +@ stdcall D3DXPreprocessShaderFromFileW(wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW +@ stdcall D3DXPreprocessShaderFromResourceA(long str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA +@ stdcall D3DXPreprocessShaderFromResourceW(long wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW +@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXQuaternionBaryCentric @ stdcall D3DXQuaternionExp(ptr ptr) d3dx9_36.D3DXQuaternionExp @ stdcall D3DXQuaternionInverse(ptr ptr) d3dx9_36.D3DXQuaternionInverse @ stdcall D3DXQuaternionLn(ptr ptr) d3dx9_36.D3DXQuaternionLn @ stdcall D3DXQuaternionMultiply(ptr ptr ptr) d3dx9_36.D3DXQuaternionMultiply @ stdcall D3DXQuaternionNormalize(ptr ptr) d3dx9_36.D3DXQuaternionNormalize -@ stdcall D3DXQuaternionRotationAxis(ptr ptr long) d3dx9_36.D3DXQuaternionRotationAxis +@ stdcall D3DXQuaternionRotationAxis(ptr ptr float) d3dx9_36.D3DXQuaternionRotationAxis @ stdcall D3DXQuaternionRotationMatrix(ptr ptr) d3dx9_36.D3DXQuaternionRotationMatrix -@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXQuaternionRotationYawPitchRoll -@ stdcall D3DXQuaternionSlerp(ptr ptr ptr long) d3dx9_36.D3DXQuaternionSlerp -@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXQuaternionSquad +@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXQuaternionRotationYawPitchRoll +@ stdcall D3DXQuaternionSlerp(ptr ptr ptr float) d3dx9_36.D3DXQuaternionSlerp +@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXQuaternionSquad @ stdcall D3DXQuaternionSquadSetup(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXQuaternionSquadSetup @ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr) d3dx9_36.D3DXQuaternionToAxisAngle @ stdcall D3DXRectPatchSize(ptr ptr ptr) d3dx9_36.D3DXRectPatchSize @@ -272,19 +272,19 @@ @ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW @ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd @ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot -@ stdcall D3DXSHEvalConeLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight +@ stdcall D3DXSHEvalConeLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight @ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection -@ stdcall D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight -@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight -@ stdcall D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight +@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight +@ stdcall D3DXSHEvalHemisphereLight(long ptr int128 int128 ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight +@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight @ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr) d3dx9_36.D3DXSHProjectCubeMap @ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC @ stdcall D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr) d3dx9_36.D3DXSHPRTCompSuperCluster @ stdcall D3DXSHRotate(ptr long ptr ptr) d3dx9_36.D3DXSHRotate -@ stdcall D3DXSHRotateZ(ptr long long ptr) d3dx9_36.D3DXSHRotateZ -@ stdcall D3DXSHScale(ptr long ptr ptr) d3dx9_36.D3DXSHScale +@ stdcall D3DXSHRotateZ(ptr long float ptr) d3dx9_36.D3DXSHRotateZ +@ stdcall D3DXSHScale(ptr long ptr float) d3dx9_36.D3DXSHScale @ stdcall D3DXSimplifyMesh(ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXSimplifyMesh -@ stdcall D3DXSphereBoundProbe(ptr long ptr ptr) d3dx9_36.D3DXSphereBoundProbe +@ stdcall D3DXSphereBoundProbe(ptr float ptr ptr) d3dx9_36.D3DXSphereBoundProbe @ stdcall D3DXSplitMesh(ptr ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSplitMesh @ stdcall D3DXTessellateNPatches(ptr ptr long long ptr ptr) d3dx9_36.D3DXTessellateNPatches @ stdcall D3DXTessellateRectPatch(ptr ptr ptr ptr ptr) d3dx9_36.D3DXTessellateRectPatch @@ -295,9 +295,9 @@ @ stdcall D3DXUVAtlasPartition(ptr long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXUVAtlasPartition @ stdcall D3DXValidMesh(ptr ptr ptr) d3dx9_36.D3DXValidMesh @ stdcall D3DXValidPatchMesh(ptr ptr ptr ptr) d3dx9_36.D3DXValidPatchMesh -@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec2BaryCentric -@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2CatmullRom -@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2Hermite +@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec2BaryCentric +@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2CatmullRom +@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2Hermite @ stdcall D3DXVec2Normalize(ptr ptr) d3dx9_36.D3DXVec2Normalize @ stdcall D3DXVec2Transform(ptr ptr ptr) d3dx9_36.D3DXVec2Transform @ stdcall D3DXVec2TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformArray @@ -305,9 +305,9 @@ @ stdcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformCoordArray @ stdcall D3DXVec2TransformNormal(ptr ptr ptr) d3dx9_36.D3DXVec2TransformNormal @ stdcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformNormalArray -@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec3BaryCentric -@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3CatmullRom -@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3Hermite +@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec3BaryCentric +@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3CatmullRom +@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3Hermite @ stdcall D3DXVec3Normalize(ptr ptr) d3dx9_36.D3DXVec3Normalize @ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Project @ stdcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3ProjectArray @@ -319,10 +319,10 @@ @ stdcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformNormalArray @ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Unproject @ stdcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3UnprojectArray -@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec4BaryCentric -@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4CatmullRom +@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec4BaryCentric +@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4CatmullRom @ stdcall D3DXVec4Cross(ptr ptr ptr ptr) d3dx9_36.D3DXVec4Cross -@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4Hermite +@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4Hermite @ stdcall D3DXVec4Normalize(ptr ptr) d3dx9_36.D3DXVec4Normalize @ stdcall D3DXVec4Transform(ptr ptr ptr) d3dx9_36.D3DXVec4Transform @ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec4TransformArray diff --git a/dll/directx/wine/d3dx9_31/d3dx9_31_main.c b/dll/directx/wine/d3dx9_31/d3dx9_31_main.c index 9338dc61239..36541931510 100644 --- a/dll/directx/wine/d3dx9_31/d3dx9_31_main.c +++ b/dll/directx/wine/d3dx9_31/d3dx9_31_main.c @@ -47,8 +47,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } diff --git a/dll/directx/wine/d3dx9_32/CMakeLists.txt b/dll/directx/wine/d3dx9_32/CMakeLists.txt index 1430a053918..e9e35147c34 100644 --- a/dll/directx/wine/d3dx9_32/CMakeLists.txt +++ b/dll/directx/wine/d3dx9_32/CMakeLists.txt @@ -1,27 +1,16 @@ +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) + spec2def(d3dx9_32.dll d3dx9_32.spec) list(APPEND SOURCE d3dx9_32_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_32_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_32.def) -add_definitions(-D__WINESRC__) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_library(d3dx9_32 SHARED ${SOURCE}) +add_library(d3dx9_32 SHARED ${SOURCE} version.rc) set_module_type(d3dx9_32 win32dll) target_link_libraries(d3dx9_32 wine) - -add_importlibs(d3dx9_32 - d3d9 - d3dx9_36 - user32 - gdi32 - advapi32 - msvcrt - kernel32 - ntdll) - -add_dependencies(d3dx9_32 wineheaders) +add_importlibs(d3dx9_32 d3dx9_36 msvcrt kernel32 ntdll) add_cd_file(TARGET d3dx9_32 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_32/d3dx9_32.spec b/dll/directx/wine/d3dx9_32/d3dx9_32.spec index 5a152aeeef8..8a224467b32 100644 --- a/dll/directx/wine/d3dx9_32/d3dx9_32.spec +++ b/dll/directx/wine/d3dx9_32/d3dx9_32.spec @@ -1,21 +1,21 @@ @ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShader -@ stdcall D3DXAssembleShaderFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA -@ stdcall D3DXAssembleShaderFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW -@ stdcall D3DXAssembleShaderFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA -@ stdcall D3DXAssembleShaderFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW +@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA +@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW +@ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA +@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW @ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) d3dx9_36.D3DXBoxBoundProbe -@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckCubeTextureRequirements -@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckTextureRequirements +@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckCubeTextureRequirements +@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckTextureRequirements @ stdcall D3DXCheckVersion(long long) -@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckVolumeTextureRequirements -@ stdcall D3DXCleanMesh(ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh -@ stdcall D3DXColorAdjustContrast(ptr ptr long) d3dx9_36.D3DXColorAdjustContrast -@ stdcall D3DXColorAdjustSaturation(ptr ptr long) d3dx9_36.D3DXColorAdjustSaturation -@ stdcall D3DXCompileShader(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShader -@ stdcall D3DXCompileShaderFromFileA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA -@ stdcall D3DXCompileShaderFromFileW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW -@ stdcall D3DXCompileShaderFromResourceA(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA -@ stdcall D3DXCompileShaderFromResourceW(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW +@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckVolumeTextureRequirements +@ stdcall D3DXCleanMesh(long ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh +@ stdcall D3DXColorAdjustContrast(ptr ptr float) d3dx9_36.D3DXColorAdjustContrast +@ stdcall D3DXColorAdjustSaturation(ptr ptr float) d3dx9_36.D3DXColorAdjustSaturation +@ stdcall D3DXCompileShader(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShader +@ stdcall D3DXCompileShaderFromFileA(str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA +@ stdcall D3DXCompileShaderFromFileW(wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW +@ stdcall D3DXCompileShaderFromResourceA(ptr str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA +@ stdcall D3DXCompileShaderFromResourceW(ptr wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW @ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingBox @ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingSphere @ stdcall D3DXComputeIMTFromPerVertexSignal(ptr ptr long long long ptr ptr ptr) d3dx9_36.D3DXComputeIMTFromPerVertexSignal @@ -31,7 +31,7 @@ @ stdcall D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToSingleStrip @ stdcall D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToStrips @ stdcall D3DXCreateAnimationController(long long long long ptr) d3dx9_36.D3DXCreateAnimationController -@ stdcall D3DXCreateBox(ptr long long long ptr ptr) d3dx9_36.D3DXCreateBox +@ stdcall D3DXCreateBox(ptr float float float ptr ptr) d3dx9_36.D3DXCreateBox @ stdcall D3DXCreateBuffer(long ptr) d3dx9_36.D3DXCreateBuffer @ stdcall D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr) d3dx9_36.D3DXCreateCompressedAnimationSet @ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr) d3dx9_36.D3DXCreateCubeTexture @@ -48,24 +48,24 @@ @ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder @ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffect @ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler -@ stdcall D3DXCreateEffectCompilerFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA -@ stdcall D3DXCreateEffectCompilerFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW -@ stdcall D3DXCreateEffectCompilerFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA -@ stdcall D3DXCreateEffectCompilerFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW -@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx -@ stdcall D3DXCreateEffectFromFileA(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA -@ stdcall D3DXCreateEffectFromFileExA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA -@ stdcall D3DXCreateEffectFromFileExW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW -@ stdcall D3DXCreateEffectFromFileW(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW -@ stdcall D3DXCreateEffectFromResourceA(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA -@ stdcall D3DXCreateEffectFromResourceExA(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA -@ stdcall D3DXCreateEffectFromResourceExW(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW -@ stdcall D3DXCreateEffectFromResourceW(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW +@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA +@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW +@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA +@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW +@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx +@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA +@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA +@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW +@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW +@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA +@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA +@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW +@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW @ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool -@ stdcall D3DXCreateFontA(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontA +@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectW -@ stdcall D3DXCreateFontW(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontW +@ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) d3dx9_36.D3DXCreateFontW @ stdcall D3DXCreateFragmentLinker(ptr long ptr) d3dx9_36.D3DXCreateFragmentLinker @ stdcall D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateKeyframedAnimationSet @ stdcall D3DXCreateLine(ptr ptr) d3dx9_36.D3DXCreateLine @@ -86,22 +86,22 @@ @ stdcall D3DXCreateSkinInfo(long ptr long ptr) d3dx9_36.D3DXCreateSkinInfo @ stdcall D3DXCreateSkinInfoFromBlendedMesh(ptr long ptr ptr) d3dx9_36.D3DXCreateSkinInfoFromBlendedMesh @ stdcall D3DXCreateSkinInfoFVF(long long long ptr) d3dx9_36.D3DXCreateSkinInfoFVF -@ stdcall D3DXCreateSphere(ptr long long long ptr ptr) d3dx9_36.D3DXCreateSphere +@ stdcall D3DXCreateSphere(ptr float long long ptr ptr) d3dx9_36.D3DXCreateSphere @ stdcall D3DXCreateSprite(ptr ptr) d3dx9_36.D3DXCreateSprite @ stdcall D3DXCreateTeapot(ptr ptr ptr) d3dx9_36.D3DXCreateTeapot -@ stdcall D3DXCreateTextA(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextA -@ stdcall D3DXCreateTextW(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextW +@ stdcall D3DXCreateTextA(ptr long str float float ptr ptr ptr) d3dx9_36.D3DXCreateTextA +@ stdcall D3DXCreateTextW(ptr long wstr float float ptr ptr ptr) d3dx9_36.D3DXCreateTextW @ stdcall D3DXCreateTexture(ptr long long long long long long ptr) d3dx9_36.D3DXCreateTexture -@ stdcall D3DXCreateTextureFromFileA(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileA -@ stdcall D3DXCreateTextureFromFileExA(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA -@ stdcall D3DXCreateTextureFromFileExW(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW +@ stdcall D3DXCreateTextureFromFileA(ptr str ptr) d3dx9_36.D3DXCreateTextureFromFileA +@ stdcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA +@ stdcall D3DXCreateTextureFromFileExW(ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW @ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateTextureFromFileInMemory @ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileInMemoryEx -@ stdcall D3DXCreateTextureFromFileW(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileW -@ stdcall D3DXCreateTextureFromResourceA(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceA -@ stdcall D3DXCreateTextureFromResourceExA(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA -@ stdcall D3DXCreateTextureFromResourceExW(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW -@ stdcall D3DXCreateTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceW +@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromFileW +@ stdcall D3DXCreateTextureFromResourceA(ptr ptr str ptr) d3dx9_36.D3DXCreateTextureFromResourceA +@ stdcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA +@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW +@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromResourceW @ stdcall D3DXCreateTextureGutterHelper(long long ptr long ptr) d3dx9_36.D3DXCreateTextureGutterHelper @ stdcall D3DXCreateTextureShader(ptr ptr) d3dx9_36.D3DXCreateTextureShader @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateTorus @@ -137,7 +137,7 @@ @ stdcall D3DXFrameFind(ptr ptr) d3dx9_36.D3DXFrameFind @ stdcall D3DXFrameNumNamedMatrices(ptr) d3dx9_36.D3DXFrameNumNamedMatrices @ stdcall D3DXFrameRegisterNamedMatrices(ptr ptr) d3dx9_36.D3DXFrameRegisterNamedMatrices -@ stdcall D3DXFresnelTerm(long long) d3dx9_36.D3DXFresnelTerm +@ stdcall D3DXFresnelTerm(float float) d3dx9_36.D3DXFresnelTerm @ stdcall D3DXFVFFromDeclarator(ptr ptr) d3dx9_36.D3DXFVFFromDeclarator @ stdcall D3DXGatherFragments(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragments @ stdcall D3DXGatherFragmentsFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragmentsFromFileA @@ -150,11 +150,11 @@ @ stdcall D3DXGetDeclVertexSize(ptr long) d3dx9_36.D3DXGetDeclVertexSize @ stdcall D3DXGetDriverLevel(ptr) d3dx9_36.D3DXGetDriverLevel @ stdcall D3DXGetFVFVertexSize(long) d3dx9_36.D3DXGetFVFVertexSize -@ stdcall D3DXGetImageInfoFromFileA(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileA +@ stdcall D3DXGetImageInfoFromFileA(str ptr) d3dx9_36.D3DXGetImageInfoFromFileA @ stdcall D3DXGetImageInfoFromFileInMemory(ptr long ptr) d3dx9_36.D3DXGetImageInfoFromFileInMemory -@ stdcall D3DXGetImageInfoFromFileW(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileW -@ stdcall D3DXGetImageInfoFromResourceA(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceA -@ stdcall D3DXGetImageInfoFromResourceW(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW +@ stdcall D3DXGetImageInfoFromFileW(wstr ptr) d3dx9_36.D3DXGetImageInfoFromFileW +@ stdcall D3DXGetImageInfoFromResourceA(long str ptr) d3dx9_36.D3DXGetImageInfoFromResourceA +@ stdcall D3DXGetImageInfoFromResourceW(long wstr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW @ stdcall D3DXGetPixelShaderProfile(ptr) d3dx9_36.D3DXGetPixelShaderProfile @ stdcall D3DXGetShaderConstantTable(ptr ptr) d3dx9_36.D3DXGetShaderConstantTable @ stdcall D3DXGetShaderInputSemantics(ptr ptr ptr) d3dx9_36.D3DXGetShaderInputSemantics @@ -166,27 +166,27 @@ @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersect @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectSubset @ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectTri -@ stdcall D3DXLoadMeshFromXA(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA +@ stdcall D3DXLoadMeshFromXA(str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA @ stdcall D3DXLoadMeshFromXInMemory(ptr long long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXInMemory -@ stdcall D3DXLoadMeshFromXResource(long ptr ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource -@ stdcall D3DXLoadMeshFromXW(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW +@ stdcall D3DXLoadMeshFromXResource(long str str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource +@ stdcall D3DXLoadMeshFromXW(wstr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW @ stdcall D3DXLoadMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXof -@ stdcall D3DXLoadMeshHierarchyFromXA(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA +@ stdcall D3DXLoadMeshHierarchyFromXA(str long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA @ stdcall D3DXLoadMeshHierarchyFromXInMemory(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXInMemory -@ stdcall D3DXLoadMeshHierarchyFromXW(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW +@ stdcall D3DXLoadMeshHierarchyFromXW(wstr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW @ stdcall D3DXLoadPatchMeshFromXof(ptr long ptr ptr ptr long ptr) d3dx9_36.D3DXLoadPatchMeshFromXof @ stdcall D3DXLoadPRTBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileA @ stdcall D3DXLoadPRTBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileW @ stdcall D3DXLoadPRTCompBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileA @ stdcall D3DXLoadPRTCompBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileW @ stdcall D3DXLoadSkinMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadSkinMeshFromXof -@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA +@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA @ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileInMemory -@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW +@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW @ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromMemory -@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA -@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW -@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long) d3dx9_36.D3DXLoadSurfaceFromSurface +@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA +@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW +@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromSurface @ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileA @ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileInMemory @ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileW @@ -194,8 +194,8 @@ @ stdcall D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceA @ stdcall D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceW @ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadVolumeFromVolume -@ stdcall D3DXMatrixAffineTransformation(ptr long ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation -@ stdcall D3DXMatrixAffineTransformation2D(ptr long ptr long ptr) d3dx9_36.D3DXMatrixAffineTransformation2D +@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation +@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr) d3dx9_36.D3DXMatrixAffineTransformation2D @ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixDecompose @ stdcall D3DXMatrixDeterminant(ptr) d3dx9_36.D3DXMatrixDeterminant @ stdcall D3DXMatrixInverse(ptr ptr ptr) d3dx9_36.D3DXMatrixInverse @@ -203,28 +203,28 @@ @ stdcall D3DXMatrixLookAtRH(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixLookAtRH @ stdcall D3DXMatrixMultiply(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiply @ stdcall D3DXMatrixMultiplyTranspose(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiplyTranspose -@ stdcall D3DXMatrixOrthoLH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoLH -@ stdcall D3DXMatrixOrthoOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterLH -@ stdcall D3DXMatrixOrthoOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterRH -@ stdcall D3DXMatrixOrthoRH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoRH -@ stdcall D3DXMatrixPerspectiveFovLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovLH -@ stdcall D3DXMatrixPerspectiveFovRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovRH -@ stdcall D3DXMatrixPerspectiveLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveLH -@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH -@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH -@ stdcall D3DXMatrixPerspectiveRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveRH +@ stdcall D3DXMatrixOrthoLH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoLH +@ stdcall D3DXMatrixOrthoOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterLH +@ stdcall D3DXMatrixOrthoOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterRH +@ stdcall D3DXMatrixOrthoRH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoRH +@ stdcall D3DXMatrixPerspectiveFovLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovLH +@ stdcall D3DXMatrixPerspectiveFovRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovRH +@ stdcall D3DXMatrixPerspectiveLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveLH +@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH +@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH +@ stdcall D3DXMatrixPerspectiveRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveRH @ stdcall D3DXMatrixReflect(ptr ptr) d3dx9_36.D3DXMatrixReflect -@ stdcall D3DXMatrixRotationAxis(ptr ptr long) d3dx9_36.D3DXMatrixRotationAxis +@ stdcall D3DXMatrixRotationAxis(ptr ptr float) d3dx9_36.D3DXMatrixRotationAxis @ stdcall D3DXMatrixRotationQuaternion(ptr ptr) d3dx9_36.D3DXMatrixRotationQuaternion -@ stdcall D3DXMatrixRotationX(ptr long) d3dx9_36.D3DXMatrixRotationX -@ stdcall D3DXMatrixRotationY(ptr long) d3dx9_36.D3DXMatrixRotationY -@ stdcall D3DXMatrixRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXMatrixRotationYawPitchRoll -@ stdcall D3DXMatrixRotationZ(ptr long) d3dx9_36.D3DXMatrixRotationZ -@ stdcall D3DXMatrixScaling(ptr long long long) d3dx9_36.D3DXMatrixScaling +@ stdcall D3DXMatrixRotationX(ptr float) d3dx9_36.D3DXMatrixRotationX +@ stdcall D3DXMatrixRotationY(ptr float) d3dx9_36.D3DXMatrixRotationY +@ stdcall D3DXMatrixRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXMatrixRotationYawPitchRoll +@ stdcall D3DXMatrixRotationZ(ptr float) d3dx9_36.D3DXMatrixRotationZ +@ stdcall D3DXMatrixScaling(ptr float float float) d3dx9_36.D3DXMatrixScaling @ stdcall D3DXMatrixShadow(ptr ptr ptr) d3dx9_36.D3DXMatrixShadow @ stdcall D3DXMatrixTransformation(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXMatrixTransformation -@ stdcall D3DXMatrixTransformation2D(ptr ptr long ptr ptr long ptr) d3dx9_36.D3DXMatrixTransformation2D -@ stdcall D3DXMatrixTranslation(ptr long long long) d3dx9_36.D3DXMatrixTranslation +@ stdcall D3DXMatrixTransformation2D(ptr ptr float ptr ptr float ptr) d3dx9_36.D3DXMatrixTransformation2D +@ stdcall D3DXMatrixTranslation(ptr float float float) d3dx9_36.D3DXMatrixTranslation @ stdcall D3DXMatrixTranspose(ptr ptr) d3dx9_36.D3DXMatrixTranspose @ stdcall D3DXOptimizeFaces(ptr long long long ptr) d3dx9_36.D3DXOptimizeFaces @ stdcall D3DXOptimizeVertices(ptr long long long ptr) d3dx9_36.D3DXOptimizeVertices @@ -235,21 +235,21 @@ @ stdcall D3DXPlaneTransform(ptr ptr ptr) d3dx9_36.D3DXPlaneTransform @ stdcall D3DXPlaneTransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXPlaneTransformArray @ stdcall D3DXPreprocessShader(ptr long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShader -@ stdcall D3DXPreprocessShaderFromFileA(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA -@ stdcall D3DXPreprocessShaderFromFileW(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW -@ stdcall D3DXPreprocessShaderFromResourceA(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA -@ stdcall D3DXPreprocessShaderFromResourceW(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW -@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXQuaternionBaryCentric +@ stdcall D3DXPreprocessShaderFromFileA(str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA +@ stdcall D3DXPreprocessShaderFromFileW(wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW +@ stdcall D3DXPreprocessShaderFromResourceA(long str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA +@ stdcall D3DXPreprocessShaderFromResourceW(long wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW +@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXQuaternionBaryCentric @ stdcall D3DXQuaternionExp(ptr ptr) d3dx9_36.D3DXQuaternionExp @ stdcall D3DXQuaternionInverse(ptr ptr) d3dx9_36.D3DXQuaternionInverse @ stdcall D3DXQuaternionLn(ptr ptr) d3dx9_36.D3DXQuaternionLn @ stdcall D3DXQuaternionMultiply(ptr ptr ptr) d3dx9_36.D3DXQuaternionMultiply @ stdcall D3DXQuaternionNormalize(ptr ptr) d3dx9_36.D3DXQuaternionNormalize -@ stdcall D3DXQuaternionRotationAxis(ptr ptr long) d3dx9_36.D3DXQuaternionRotationAxis +@ stdcall D3DXQuaternionRotationAxis(ptr ptr float) d3dx9_36.D3DXQuaternionRotationAxis @ stdcall D3DXQuaternionRotationMatrix(ptr ptr) d3dx9_36.D3DXQuaternionRotationMatrix -@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXQuaternionRotationYawPitchRoll -@ stdcall D3DXQuaternionSlerp(ptr ptr ptr long) d3dx9_36.D3DXQuaternionSlerp -@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXQuaternionSquad +@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXQuaternionRotationYawPitchRoll +@ stdcall D3DXQuaternionSlerp(ptr ptr ptr float) d3dx9_36.D3DXQuaternionSlerp +@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXQuaternionSquad @ stdcall D3DXQuaternionSquadSetup(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXQuaternionSquadSetup @ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr) d3dx9_36.D3DXQuaternionToAxisAngle @ stdcall D3DXRectPatchSize(ptr ptr ptr) d3dx9_36.D3DXRectPatchSize @@ -272,11 +272,11 @@ @ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW @ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd @ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot -@ stdcall D3DXSHEvalConeLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight +@ stdcall D3DXSHEvalConeLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight @ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection -@ stdcall D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight -@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight -@ stdcall D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight +@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight +@ stdcall D3DXSHEvalHemisphereLight(long ptr int128 int128 ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight +@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight @ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2 @ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3 @ stdcall D3DXSHMultiply4(ptr ptr ptr) d3dx9_36.D3DXSHMultiply4 @@ -286,10 +286,10 @@ @ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC @ stdcall D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr) d3dx9_36.D3DXSHPRTCompSuperCluster @ stdcall D3DXSHRotate(ptr long ptr ptr) d3dx9_36.D3DXSHRotate -@ stdcall D3DXSHRotateZ(ptr long long ptr) d3dx9_36.D3DXSHRotateZ -@ stdcall D3DXSHScale(ptr long ptr ptr) d3dx9_36.D3DXSHScale +@ stdcall D3DXSHRotateZ(ptr long float ptr) d3dx9_36.D3DXSHRotateZ +@ stdcall D3DXSHScale(ptr long ptr float) d3dx9_36.D3DXSHScale @ stdcall D3DXSimplifyMesh(ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXSimplifyMesh -@ stdcall D3DXSphereBoundProbe(ptr long ptr ptr) d3dx9_36.D3DXSphereBoundProbe +@ stdcall D3DXSphereBoundProbe(ptr float ptr ptr) d3dx9_36.D3DXSphereBoundProbe @ stdcall D3DXSplitMesh(ptr ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSplitMesh @ stdcall D3DXTessellateNPatches(ptr ptr long long ptr ptr) d3dx9_36.D3DXTessellateNPatches @ stdcall D3DXTessellateRectPatch(ptr ptr ptr ptr ptr) d3dx9_36.D3DXTessellateRectPatch @@ -300,9 +300,9 @@ @ stdcall D3DXUVAtlasPartition(ptr long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXUVAtlasPartition @ stdcall D3DXValidMesh(ptr ptr ptr) d3dx9_36.D3DXValidMesh @ stdcall D3DXValidPatchMesh(ptr ptr ptr ptr) d3dx9_36.D3DXValidPatchMesh -@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec2BaryCentric -@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2CatmullRom -@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2Hermite +@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec2BaryCentric +@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2CatmullRom +@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2Hermite @ stdcall D3DXVec2Normalize(ptr ptr) d3dx9_36.D3DXVec2Normalize @ stdcall D3DXVec2Transform(ptr ptr ptr) d3dx9_36.D3DXVec2Transform @ stdcall D3DXVec2TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformArray @@ -310,9 +310,9 @@ @ stdcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformCoordArray @ stdcall D3DXVec2TransformNormal(ptr ptr ptr) d3dx9_36.D3DXVec2TransformNormal @ stdcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformNormalArray -@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec3BaryCentric -@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3CatmullRom -@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3Hermite +@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec3BaryCentric +@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3CatmullRom +@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3Hermite @ stdcall D3DXVec3Normalize(ptr ptr) d3dx9_36.D3DXVec3Normalize @ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Project @ stdcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3ProjectArray @@ -324,10 +324,10 @@ @ stdcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformNormalArray @ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Unproject @ stdcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3UnprojectArray -@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec4BaryCentric -@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4CatmullRom +@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec4BaryCentric +@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4CatmullRom @ stdcall D3DXVec4Cross(ptr ptr ptr ptr) d3dx9_36.D3DXVec4Cross -@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4Hermite +@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4Hermite @ stdcall D3DXVec4Normalize(ptr ptr) d3dx9_36.D3DXVec4Normalize @ stdcall D3DXVec4Transform(ptr ptr ptr) d3dx9_36.D3DXVec4Transform @ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec4TransformArray diff --git a/dll/directx/wine/d3dx9_32/d3dx9_32_main.c b/dll/directx/wine/d3dx9_32/d3dx9_32_main.c index f5751c9e895..ccd0b598946 100644 --- a/dll/directx/wine/d3dx9_32/d3dx9_32_main.c +++ b/dll/directx/wine/d3dx9_32/d3dx9_32_main.c @@ -47,8 +47,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } diff --git a/dll/directx/wine/d3dx9_33/CMakeLists.txt b/dll/directx/wine/d3dx9_33/CMakeLists.txt index 29c9ba03e71..2476260ede7 100644 --- a/dll/directx/wine/d3dx9_33/CMakeLists.txt +++ b/dll/directx/wine/d3dx9_33/CMakeLists.txt @@ -1,27 +1,16 @@ +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) + spec2def(d3dx9_33.dll d3dx9_33.spec) list(APPEND SOURCE d3dx9_33_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_33_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_33.def) -add_definitions(-D__WINESRC__) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_library(d3dx9_33 SHARED ${SOURCE}) +add_library(d3dx9_33 SHARED ${SOURCE} version.rc) set_module_type(d3dx9_33 win32dll) target_link_libraries(d3dx9_33 wine) - -add_importlibs(d3dx9_33 - d3d9 - d3dx9_36 - user32 - gdi32 - advapi32 - msvcrt - kernel32 - ntdll) - -add_dependencies(d3dx9_33 wineheaders) +add_importlibs(d3dx9_33 d3dx9_36 msvcrt kernel32 ntdll) add_cd_file(TARGET d3dx9_33 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_33/d3dx9_33.spec b/dll/directx/wine/d3dx9_33/d3dx9_33.spec index 5a152aeeef8..8a224467b32 100644 --- a/dll/directx/wine/d3dx9_33/d3dx9_33.spec +++ b/dll/directx/wine/d3dx9_33/d3dx9_33.spec @@ -1,21 +1,21 @@ @ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShader -@ stdcall D3DXAssembleShaderFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA -@ stdcall D3DXAssembleShaderFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW -@ stdcall D3DXAssembleShaderFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA -@ stdcall D3DXAssembleShaderFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW +@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA +@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW +@ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA +@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW @ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) d3dx9_36.D3DXBoxBoundProbe -@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckCubeTextureRequirements -@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckTextureRequirements +@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckCubeTextureRequirements +@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckTextureRequirements @ stdcall D3DXCheckVersion(long long) -@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckVolumeTextureRequirements -@ stdcall D3DXCleanMesh(ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh -@ stdcall D3DXColorAdjustContrast(ptr ptr long) d3dx9_36.D3DXColorAdjustContrast -@ stdcall D3DXColorAdjustSaturation(ptr ptr long) d3dx9_36.D3DXColorAdjustSaturation -@ stdcall D3DXCompileShader(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShader -@ stdcall D3DXCompileShaderFromFileA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA -@ stdcall D3DXCompileShaderFromFileW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW -@ stdcall D3DXCompileShaderFromResourceA(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA -@ stdcall D3DXCompileShaderFromResourceW(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW +@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckVolumeTextureRequirements +@ stdcall D3DXCleanMesh(long ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh +@ stdcall D3DXColorAdjustContrast(ptr ptr float) d3dx9_36.D3DXColorAdjustContrast +@ stdcall D3DXColorAdjustSaturation(ptr ptr float) d3dx9_36.D3DXColorAdjustSaturation +@ stdcall D3DXCompileShader(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShader +@ stdcall D3DXCompileShaderFromFileA(str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA +@ stdcall D3DXCompileShaderFromFileW(wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW +@ stdcall D3DXCompileShaderFromResourceA(ptr str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA +@ stdcall D3DXCompileShaderFromResourceW(ptr wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW @ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingBox @ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingSphere @ stdcall D3DXComputeIMTFromPerVertexSignal(ptr ptr long long long ptr ptr ptr) d3dx9_36.D3DXComputeIMTFromPerVertexSignal @@ -31,7 +31,7 @@ @ stdcall D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToSingleStrip @ stdcall D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToStrips @ stdcall D3DXCreateAnimationController(long long long long ptr) d3dx9_36.D3DXCreateAnimationController -@ stdcall D3DXCreateBox(ptr long long long ptr ptr) d3dx9_36.D3DXCreateBox +@ stdcall D3DXCreateBox(ptr float float float ptr ptr) d3dx9_36.D3DXCreateBox @ stdcall D3DXCreateBuffer(long ptr) d3dx9_36.D3DXCreateBuffer @ stdcall D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr) d3dx9_36.D3DXCreateCompressedAnimationSet @ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr) d3dx9_36.D3DXCreateCubeTexture @@ -48,24 +48,24 @@ @ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder @ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffect @ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler -@ stdcall D3DXCreateEffectCompilerFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA -@ stdcall D3DXCreateEffectCompilerFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW -@ stdcall D3DXCreateEffectCompilerFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA -@ stdcall D3DXCreateEffectCompilerFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW -@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx -@ stdcall D3DXCreateEffectFromFileA(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA -@ stdcall D3DXCreateEffectFromFileExA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA -@ stdcall D3DXCreateEffectFromFileExW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW -@ stdcall D3DXCreateEffectFromFileW(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW -@ stdcall D3DXCreateEffectFromResourceA(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA -@ stdcall D3DXCreateEffectFromResourceExA(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA -@ stdcall D3DXCreateEffectFromResourceExW(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW -@ stdcall D3DXCreateEffectFromResourceW(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW +@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA +@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW +@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA +@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW +@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx +@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA +@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA +@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW +@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW +@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA +@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA +@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW +@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW @ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool -@ stdcall D3DXCreateFontA(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontA +@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectW -@ stdcall D3DXCreateFontW(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontW +@ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) d3dx9_36.D3DXCreateFontW @ stdcall D3DXCreateFragmentLinker(ptr long ptr) d3dx9_36.D3DXCreateFragmentLinker @ stdcall D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateKeyframedAnimationSet @ stdcall D3DXCreateLine(ptr ptr) d3dx9_36.D3DXCreateLine @@ -86,22 +86,22 @@ @ stdcall D3DXCreateSkinInfo(long ptr long ptr) d3dx9_36.D3DXCreateSkinInfo @ stdcall D3DXCreateSkinInfoFromBlendedMesh(ptr long ptr ptr) d3dx9_36.D3DXCreateSkinInfoFromBlendedMesh @ stdcall D3DXCreateSkinInfoFVF(long long long ptr) d3dx9_36.D3DXCreateSkinInfoFVF -@ stdcall D3DXCreateSphere(ptr long long long ptr ptr) d3dx9_36.D3DXCreateSphere +@ stdcall D3DXCreateSphere(ptr float long long ptr ptr) d3dx9_36.D3DXCreateSphere @ stdcall D3DXCreateSprite(ptr ptr) d3dx9_36.D3DXCreateSprite @ stdcall D3DXCreateTeapot(ptr ptr ptr) d3dx9_36.D3DXCreateTeapot -@ stdcall D3DXCreateTextA(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextA -@ stdcall D3DXCreateTextW(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextW +@ stdcall D3DXCreateTextA(ptr long str float float ptr ptr ptr) d3dx9_36.D3DXCreateTextA +@ stdcall D3DXCreateTextW(ptr long wstr float float ptr ptr ptr) d3dx9_36.D3DXCreateTextW @ stdcall D3DXCreateTexture(ptr long long long long long long ptr) d3dx9_36.D3DXCreateTexture -@ stdcall D3DXCreateTextureFromFileA(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileA -@ stdcall D3DXCreateTextureFromFileExA(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA -@ stdcall D3DXCreateTextureFromFileExW(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW +@ stdcall D3DXCreateTextureFromFileA(ptr str ptr) d3dx9_36.D3DXCreateTextureFromFileA +@ stdcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA +@ stdcall D3DXCreateTextureFromFileExW(ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW @ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateTextureFromFileInMemory @ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileInMemoryEx -@ stdcall D3DXCreateTextureFromFileW(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileW -@ stdcall D3DXCreateTextureFromResourceA(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceA -@ stdcall D3DXCreateTextureFromResourceExA(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA -@ stdcall D3DXCreateTextureFromResourceExW(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW -@ stdcall D3DXCreateTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceW +@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromFileW +@ stdcall D3DXCreateTextureFromResourceA(ptr ptr str ptr) d3dx9_36.D3DXCreateTextureFromResourceA +@ stdcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA +@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW +@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromResourceW @ stdcall D3DXCreateTextureGutterHelper(long long ptr long ptr) d3dx9_36.D3DXCreateTextureGutterHelper @ stdcall D3DXCreateTextureShader(ptr ptr) d3dx9_36.D3DXCreateTextureShader @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateTorus @@ -137,7 +137,7 @@ @ stdcall D3DXFrameFind(ptr ptr) d3dx9_36.D3DXFrameFind @ stdcall D3DXFrameNumNamedMatrices(ptr) d3dx9_36.D3DXFrameNumNamedMatrices @ stdcall D3DXFrameRegisterNamedMatrices(ptr ptr) d3dx9_36.D3DXFrameRegisterNamedMatrices -@ stdcall D3DXFresnelTerm(long long) d3dx9_36.D3DXFresnelTerm +@ stdcall D3DXFresnelTerm(float float) d3dx9_36.D3DXFresnelTerm @ stdcall D3DXFVFFromDeclarator(ptr ptr) d3dx9_36.D3DXFVFFromDeclarator @ stdcall D3DXGatherFragments(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragments @ stdcall D3DXGatherFragmentsFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragmentsFromFileA @@ -150,11 +150,11 @@ @ stdcall D3DXGetDeclVertexSize(ptr long) d3dx9_36.D3DXGetDeclVertexSize @ stdcall D3DXGetDriverLevel(ptr) d3dx9_36.D3DXGetDriverLevel @ stdcall D3DXGetFVFVertexSize(long) d3dx9_36.D3DXGetFVFVertexSize -@ stdcall D3DXGetImageInfoFromFileA(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileA +@ stdcall D3DXGetImageInfoFromFileA(str ptr) d3dx9_36.D3DXGetImageInfoFromFileA @ stdcall D3DXGetImageInfoFromFileInMemory(ptr long ptr) d3dx9_36.D3DXGetImageInfoFromFileInMemory -@ stdcall D3DXGetImageInfoFromFileW(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileW -@ stdcall D3DXGetImageInfoFromResourceA(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceA -@ stdcall D3DXGetImageInfoFromResourceW(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW +@ stdcall D3DXGetImageInfoFromFileW(wstr ptr) d3dx9_36.D3DXGetImageInfoFromFileW +@ stdcall D3DXGetImageInfoFromResourceA(long str ptr) d3dx9_36.D3DXGetImageInfoFromResourceA +@ stdcall D3DXGetImageInfoFromResourceW(long wstr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW @ stdcall D3DXGetPixelShaderProfile(ptr) d3dx9_36.D3DXGetPixelShaderProfile @ stdcall D3DXGetShaderConstantTable(ptr ptr) d3dx9_36.D3DXGetShaderConstantTable @ stdcall D3DXGetShaderInputSemantics(ptr ptr ptr) d3dx9_36.D3DXGetShaderInputSemantics @@ -166,27 +166,27 @@ @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersect @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectSubset @ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectTri -@ stdcall D3DXLoadMeshFromXA(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA +@ stdcall D3DXLoadMeshFromXA(str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA @ stdcall D3DXLoadMeshFromXInMemory(ptr long long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXInMemory -@ stdcall D3DXLoadMeshFromXResource(long ptr ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource -@ stdcall D3DXLoadMeshFromXW(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW +@ stdcall D3DXLoadMeshFromXResource(long str str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource +@ stdcall D3DXLoadMeshFromXW(wstr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW @ stdcall D3DXLoadMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXof -@ stdcall D3DXLoadMeshHierarchyFromXA(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA +@ stdcall D3DXLoadMeshHierarchyFromXA(str long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA @ stdcall D3DXLoadMeshHierarchyFromXInMemory(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXInMemory -@ stdcall D3DXLoadMeshHierarchyFromXW(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW +@ stdcall D3DXLoadMeshHierarchyFromXW(wstr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW @ stdcall D3DXLoadPatchMeshFromXof(ptr long ptr ptr ptr long ptr) d3dx9_36.D3DXLoadPatchMeshFromXof @ stdcall D3DXLoadPRTBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileA @ stdcall D3DXLoadPRTBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileW @ stdcall D3DXLoadPRTCompBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileA @ stdcall D3DXLoadPRTCompBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileW @ stdcall D3DXLoadSkinMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadSkinMeshFromXof -@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA +@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA @ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileInMemory -@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW +@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW @ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromMemory -@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA -@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW -@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long) d3dx9_36.D3DXLoadSurfaceFromSurface +@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA +@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW +@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromSurface @ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileA @ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileInMemory @ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileW @@ -194,8 +194,8 @@ @ stdcall D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceA @ stdcall D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceW @ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadVolumeFromVolume -@ stdcall D3DXMatrixAffineTransformation(ptr long ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation -@ stdcall D3DXMatrixAffineTransformation2D(ptr long ptr long ptr) d3dx9_36.D3DXMatrixAffineTransformation2D +@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation +@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr) d3dx9_36.D3DXMatrixAffineTransformation2D @ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixDecompose @ stdcall D3DXMatrixDeterminant(ptr) d3dx9_36.D3DXMatrixDeterminant @ stdcall D3DXMatrixInverse(ptr ptr ptr) d3dx9_36.D3DXMatrixInverse @@ -203,28 +203,28 @@ @ stdcall D3DXMatrixLookAtRH(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixLookAtRH @ stdcall D3DXMatrixMultiply(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiply @ stdcall D3DXMatrixMultiplyTranspose(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiplyTranspose -@ stdcall D3DXMatrixOrthoLH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoLH -@ stdcall D3DXMatrixOrthoOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterLH -@ stdcall D3DXMatrixOrthoOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterRH -@ stdcall D3DXMatrixOrthoRH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoRH -@ stdcall D3DXMatrixPerspectiveFovLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovLH -@ stdcall D3DXMatrixPerspectiveFovRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovRH -@ stdcall D3DXMatrixPerspectiveLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveLH -@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH -@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH -@ stdcall D3DXMatrixPerspectiveRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveRH +@ stdcall D3DXMatrixOrthoLH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoLH +@ stdcall D3DXMatrixOrthoOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterLH +@ stdcall D3DXMatrixOrthoOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterRH +@ stdcall D3DXMatrixOrthoRH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoRH +@ stdcall D3DXMatrixPerspectiveFovLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovLH +@ stdcall D3DXMatrixPerspectiveFovRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovRH +@ stdcall D3DXMatrixPerspectiveLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveLH +@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH +@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH +@ stdcall D3DXMatrixPerspectiveRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveRH @ stdcall D3DXMatrixReflect(ptr ptr) d3dx9_36.D3DXMatrixReflect -@ stdcall D3DXMatrixRotationAxis(ptr ptr long) d3dx9_36.D3DXMatrixRotationAxis +@ stdcall D3DXMatrixRotationAxis(ptr ptr float) d3dx9_36.D3DXMatrixRotationAxis @ stdcall D3DXMatrixRotationQuaternion(ptr ptr) d3dx9_36.D3DXMatrixRotationQuaternion -@ stdcall D3DXMatrixRotationX(ptr long) d3dx9_36.D3DXMatrixRotationX -@ stdcall D3DXMatrixRotationY(ptr long) d3dx9_36.D3DXMatrixRotationY -@ stdcall D3DXMatrixRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXMatrixRotationYawPitchRoll -@ stdcall D3DXMatrixRotationZ(ptr long) d3dx9_36.D3DXMatrixRotationZ -@ stdcall D3DXMatrixScaling(ptr long long long) d3dx9_36.D3DXMatrixScaling +@ stdcall D3DXMatrixRotationX(ptr float) d3dx9_36.D3DXMatrixRotationX +@ stdcall D3DXMatrixRotationY(ptr float) d3dx9_36.D3DXMatrixRotationY +@ stdcall D3DXMatrixRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXMatrixRotationYawPitchRoll +@ stdcall D3DXMatrixRotationZ(ptr float) d3dx9_36.D3DXMatrixRotationZ +@ stdcall D3DXMatrixScaling(ptr float float float) d3dx9_36.D3DXMatrixScaling @ stdcall D3DXMatrixShadow(ptr ptr ptr) d3dx9_36.D3DXMatrixShadow @ stdcall D3DXMatrixTransformation(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXMatrixTransformation -@ stdcall D3DXMatrixTransformation2D(ptr ptr long ptr ptr long ptr) d3dx9_36.D3DXMatrixTransformation2D -@ stdcall D3DXMatrixTranslation(ptr long long long) d3dx9_36.D3DXMatrixTranslation +@ stdcall D3DXMatrixTransformation2D(ptr ptr float ptr ptr float ptr) d3dx9_36.D3DXMatrixTransformation2D +@ stdcall D3DXMatrixTranslation(ptr float float float) d3dx9_36.D3DXMatrixTranslation @ stdcall D3DXMatrixTranspose(ptr ptr) d3dx9_36.D3DXMatrixTranspose @ stdcall D3DXOptimizeFaces(ptr long long long ptr) d3dx9_36.D3DXOptimizeFaces @ stdcall D3DXOptimizeVertices(ptr long long long ptr) d3dx9_36.D3DXOptimizeVertices @@ -235,21 +235,21 @@ @ stdcall D3DXPlaneTransform(ptr ptr ptr) d3dx9_36.D3DXPlaneTransform @ stdcall D3DXPlaneTransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXPlaneTransformArray @ stdcall D3DXPreprocessShader(ptr long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShader -@ stdcall D3DXPreprocessShaderFromFileA(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA -@ stdcall D3DXPreprocessShaderFromFileW(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW -@ stdcall D3DXPreprocessShaderFromResourceA(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA -@ stdcall D3DXPreprocessShaderFromResourceW(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW -@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXQuaternionBaryCentric +@ stdcall D3DXPreprocessShaderFromFileA(str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA +@ stdcall D3DXPreprocessShaderFromFileW(wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW +@ stdcall D3DXPreprocessShaderFromResourceA(long str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA +@ stdcall D3DXPreprocessShaderFromResourceW(long wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW +@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXQuaternionBaryCentric @ stdcall D3DXQuaternionExp(ptr ptr) d3dx9_36.D3DXQuaternionExp @ stdcall D3DXQuaternionInverse(ptr ptr) d3dx9_36.D3DXQuaternionInverse @ stdcall D3DXQuaternionLn(ptr ptr) d3dx9_36.D3DXQuaternionLn @ stdcall D3DXQuaternionMultiply(ptr ptr ptr) d3dx9_36.D3DXQuaternionMultiply @ stdcall D3DXQuaternionNormalize(ptr ptr) d3dx9_36.D3DXQuaternionNormalize -@ stdcall D3DXQuaternionRotationAxis(ptr ptr long) d3dx9_36.D3DXQuaternionRotationAxis +@ stdcall D3DXQuaternionRotationAxis(ptr ptr float) d3dx9_36.D3DXQuaternionRotationAxis @ stdcall D3DXQuaternionRotationMatrix(ptr ptr) d3dx9_36.D3DXQuaternionRotationMatrix -@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXQuaternionRotationYawPitchRoll -@ stdcall D3DXQuaternionSlerp(ptr ptr ptr long) d3dx9_36.D3DXQuaternionSlerp -@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXQuaternionSquad +@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXQuaternionRotationYawPitchRoll +@ stdcall D3DXQuaternionSlerp(ptr ptr ptr float) d3dx9_36.D3DXQuaternionSlerp +@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXQuaternionSquad @ stdcall D3DXQuaternionSquadSetup(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXQuaternionSquadSetup @ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr) d3dx9_36.D3DXQuaternionToAxisAngle @ stdcall D3DXRectPatchSize(ptr ptr ptr) d3dx9_36.D3DXRectPatchSize @@ -272,11 +272,11 @@ @ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW @ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd @ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot -@ stdcall D3DXSHEvalConeLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight +@ stdcall D3DXSHEvalConeLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight @ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection -@ stdcall D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight -@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight -@ stdcall D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight +@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight +@ stdcall D3DXSHEvalHemisphereLight(long ptr int128 int128 ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight +@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight @ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2 @ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3 @ stdcall D3DXSHMultiply4(ptr ptr ptr) d3dx9_36.D3DXSHMultiply4 @@ -286,10 +286,10 @@ @ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC @ stdcall D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr) d3dx9_36.D3DXSHPRTCompSuperCluster @ stdcall D3DXSHRotate(ptr long ptr ptr) d3dx9_36.D3DXSHRotate -@ stdcall D3DXSHRotateZ(ptr long long ptr) d3dx9_36.D3DXSHRotateZ -@ stdcall D3DXSHScale(ptr long ptr ptr) d3dx9_36.D3DXSHScale +@ stdcall D3DXSHRotateZ(ptr long float ptr) d3dx9_36.D3DXSHRotateZ +@ stdcall D3DXSHScale(ptr long ptr float) d3dx9_36.D3DXSHScale @ stdcall D3DXSimplifyMesh(ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXSimplifyMesh -@ stdcall D3DXSphereBoundProbe(ptr long ptr ptr) d3dx9_36.D3DXSphereBoundProbe +@ stdcall D3DXSphereBoundProbe(ptr float ptr ptr) d3dx9_36.D3DXSphereBoundProbe @ stdcall D3DXSplitMesh(ptr ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSplitMesh @ stdcall D3DXTessellateNPatches(ptr ptr long long ptr ptr) d3dx9_36.D3DXTessellateNPatches @ stdcall D3DXTessellateRectPatch(ptr ptr ptr ptr ptr) d3dx9_36.D3DXTessellateRectPatch @@ -300,9 +300,9 @@ @ stdcall D3DXUVAtlasPartition(ptr long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXUVAtlasPartition @ stdcall D3DXValidMesh(ptr ptr ptr) d3dx9_36.D3DXValidMesh @ stdcall D3DXValidPatchMesh(ptr ptr ptr ptr) d3dx9_36.D3DXValidPatchMesh -@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec2BaryCentric -@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2CatmullRom -@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2Hermite +@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec2BaryCentric +@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2CatmullRom +@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2Hermite @ stdcall D3DXVec2Normalize(ptr ptr) d3dx9_36.D3DXVec2Normalize @ stdcall D3DXVec2Transform(ptr ptr ptr) d3dx9_36.D3DXVec2Transform @ stdcall D3DXVec2TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformArray @@ -310,9 +310,9 @@ @ stdcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformCoordArray @ stdcall D3DXVec2TransformNormal(ptr ptr ptr) d3dx9_36.D3DXVec2TransformNormal @ stdcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformNormalArray -@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec3BaryCentric -@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3CatmullRom -@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3Hermite +@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec3BaryCentric +@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3CatmullRom +@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3Hermite @ stdcall D3DXVec3Normalize(ptr ptr) d3dx9_36.D3DXVec3Normalize @ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Project @ stdcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3ProjectArray @@ -324,10 +324,10 @@ @ stdcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformNormalArray @ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Unproject @ stdcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3UnprojectArray -@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec4BaryCentric -@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4CatmullRom +@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec4BaryCentric +@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4CatmullRom @ stdcall D3DXVec4Cross(ptr ptr ptr ptr) d3dx9_36.D3DXVec4Cross -@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4Hermite +@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4Hermite @ stdcall D3DXVec4Normalize(ptr ptr) d3dx9_36.D3DXVec4Normalize @ stdcall D3DXVec4Transform(ptr ptr ptr) d3dx9_36.D3DXVec4Transform @ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec4TransformArray diff --git a/dll/directx/wine/d3dx9_33/d3dx9_33_main.c b/dll/directx/wine/d3dx9_33/d3dx9_33_main.c index 180edf777e0..3387655ce38 100644 --- a/dll/directx/wine/d3dx9_33/d3dx9_33_main.c +++ b/dll/directx/wine/d3dx9_33/d3dx9_33_main.c @@ -47,8 +47,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } diff --git a/dll/directx/wine/d3dx9_34/CMakeLists.txt b/dll/directx/wine/d3dx9_34/CMakeLists.txt index 25e493fd948..049cdcfa2e1 100644 --- a/dll/directx/wine/d3dx9_34/CMakeLists.txt +++ b/dll/directx/wine/d3dx9_34/CMakeLists.txt @@ -1,27 +1,16 @@ +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) + spec2def(d3dx9_34.dll d3dx9_34.spec) list(APPEND SOURCE d3dx9_34_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_34_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_34.def) -add_definitions(-D__WINESRC__) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_library(d3dx9_34 SHARED ${SOURCE}) +add_library(d3dx9_34 SHARED ${SOURCE} version.rc) set_module_type(d3dx9_34 win32dll) target_link_libraries(d3dx9_34 wine) - -add_importlibs(d3dx9_34 - d3d9 - d3dx9_36 - user32 - gdi32 - advapi32 - msvcrt - kernel32 - ntdll) - -add_dependencies(d3dx9_34 wineheaders) +add_importlibs(d3dx9_34 d3dx9_36 msvcrt kernel32 ntdll) add_cd_file(TARGET d3dx9_34 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_34/d3dx9_34.spec b/dll/directx/wine/d3dx9_34/d3dx9_34.spec index 5a152aeeef8..8a224467b32 100644 --- a/dll/directx/wine/d3dx9_34/d3dx9_34.spec +++ b/dll/directx/wine/d3dx9_34/d3dx9_34.spec @@ -1,21 +1,21 @@ @ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShader -@ stdcall D3DXAssembleShaderFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA -@ stdcall D3DXAssembleShaderFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW -@ stdcall D3DXAssembleShaderFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA -@ stdcall D3DXAssembleShaderFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW +@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA +@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW +@ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA +@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW @ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) d3dx9_36.D3DXBoxBoundProbe -@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckCubeTextureRequirements -@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckTextureRequirements +@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckCubeTextureRequirements +@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckTextureRequirements @ stdcall D3DXCheckVersion(long long) -@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckVolumeTextureRequirements -@ stdcall D3DXCleanMesh(ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh -@ stdcall D3DXColorAdjustContrast(ptr ptr long) d3dx9_36.D3DXColorAdjustContrast -@ stdcall D3DXColorAdjustSaturation(ptr ptr long) d3dx9_36.D3DXColorAdjustSaturation -@ stdcall D3DXCompileShader(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShader -@ stdcall D3DXCompileShaderFromFileA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA -@ stdcall D3DXCompileShaderFromFileW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW -@ stdcall D3DXCompileShaderFromResourceA(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA -@ stdcall D3DXCompileShaderFromResourceW(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW +@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckVolumeTextureRequirements +@ stdcall D3DXCleanMesh(long ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh +@ stdcall D3DXColorAdjustContrast(ptr ptr float) d3dx9_36.D3DXColorAdjustContrast +@ stdcall D3DXColorAdjustSaturation(ptr ptr float) d3dx9_36.D3DXColorAdjustSaturation +@ stdcall D3DXCompileShader(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShader +@ stdcall D3DXCompileShaderFromFileA(str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA +@ stdcall D3DXCompileShaderFromFileW(wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW +@ stdcall D3DXCompileShaderFromResourceA(ptr str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA +@ stdcall D3DXCompileShaderFromResourceW(ptr wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW @ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingBox @ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingSphere @ stdcall D3DXComputeIMTFromPerVertexSignal(ptr ptr long long long ptr ptr ptr) d3dx9_36.D3DXComputeIMTFromPerVertexSignal @@ -31,7 +31,7 @@ @ stdcall D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToSingleStrip @ stdcall D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToStrips @ stdcall D3DXCreateAnimationController(long long long long ptr) d3dx9_36.D3DXCreateAnimationController -@ stdcall D3DXCreateBox(ptr long long long ptr ptr) d3dx9_36.D3DXCreateBox +@ stdcall D3DXCreateBox(ptr float float float ptr ptr) d3dx9_36.D3DXCreateBox @ stdcall D3DXCreateBuffer(long ptr) d3dx9_36.D3DXCreateBuffer @ stdcall D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr) d3dx9_36.D3DXCreateCompressedAnimationSet @ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr) d3dx9_36.D3DXCreateCubeTexture @@ -48,24 +48,24 @@ @ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder @ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffect @ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler -@ stdcall D3DXCreateEffectCompilerFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA -@ stdcall D3DXCreateEffectCompilerFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW -@ stdcall D3DXCreateEffectCompilerFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA -@ stdcall D3DXCreateEffectCompilerFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW -@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx -@ stdcall D3DXCreateEffectFromFileA(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA -@ stdcall D3DXCreateEffectFromFileExA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA -@ stdcall D3DXCreateEffectFromFileExW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW -@ stdcall D3DXCreateEffectFromFileW(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW -@ stdcall D3DXCreateEffectFromResourceA(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA -@ stdcall D3DXCreateEffectFromResourceExA(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA -@ stdcall D3DXCreateEffectFromResourceExW(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW -@ stdcall D3DXCreateEffectFromResourceW(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW +@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA +@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW +@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA +@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW +@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx +@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA +@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA +@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW +@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW +@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA +@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA +@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW +@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW @ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool -@ stdcall D3DXCreateFontA(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontA +@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectW -@ stdcall D3DXCreateFontW(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontW +@ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) d3dx9_36.D3DXCreateFontW @ stdcall D3DXCreateFragmentLinker(ptr long ptr) d3dx9_36.D3DXCreateFragmentLinker @ stdcall D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateKeyframedAnimationSet @ stdcall D3DXCreateLine(ptr ptr) d3dx9_36.D3DXCreateLine @@ -86,22 +86,22 @@ @ stdcall D3DXCreateSkinInfo(long ptr long ptr) d3dx9_36.D3DXCreateSkinInfo @ stdcall D3DXCreateSkinInfoFromBlendedMesh(ptr long ptr ptr) d3dx9_36.D3DXCreateSkinInfoFromBlendedMesh @ stdcall D3DXCreateSkinInfoFVF(long long long ptr) d3dx9_36.D3DXCreateSkinInfoFVF -@ stdcall D3DXCreateSphere(ptr long long long ptr ptr) d3dx9_36.D3DXCreateSphere +@ stdcall D3DXCreateSphere(ptr float long long ptr ptr) d3dx9_36.D3DXCreateSphere @ stdcall D3DXCreateSprite(ptr ptr) d3dx9_36.D3DXCreateSprite @ stdcall D3DXCreateTeapot(ptr ptr ptr) d3dx9_36.D3DXCreateTeapot -@ stdcall D3DXCreateTextA(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextA -@ stdcall D3DXCreateTextW(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextW +@ stdcall D3DXCreateTextA(ptr long str float float ptr ptr ptr) d3dx9_36.D3DXCreateTextA +@ stdcall D3DXCreateTextW(ptr long wstr float float ptr ptr ptr) d3dx9_36.D3DXCreateTextW @ stdcall D3DXCreateTexture(ptr long long long long long long ptr) d3dx9_36.D3DXCreateTexture -@ stdcall D3DXCreateTextureFromFileA(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileA -@ stdcall D3DXCreateTextureFromFileExA(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA -@ stdcall D3DXCreateTextureFromFileExW(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW +@ stdcall D3DXCreateTextureFromFileA(ptr str ptr) d3dx9_36.D3DXCreateTextureFromFileA +@ stdcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA +@ stdcall D3DXCreateTextureFromFileExW(ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW @ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateTextureFromFileInMemory @ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileInMemoryEx -@ stdcall D3DXCreateTextureFromFileW(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileW -@ stdcall D3DXCreateTextureFromResourceA(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceA -@ stdcall D3DXCreateTextureFromResourceExA(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA -@ stdcall D3DXCreateTextureFromResourceExW(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW -@ stdcall D3DXCreateTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceW +@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromFileW +@ stdcall D3DXCreateTextureFromResourceA(ptr ptr str ptr) d3dx9_36.D3DXCreateTextureFromResourceA +@ stdcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA +@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW +@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromResourceW @ stdcall D3DXCreateTextureGutterHelper(long long ptr long ptr) d3dx9_36.D3DXCreateTextureGutterHelper @ stdcall D3DXCreateTextureShader(ptr ptr) d3dx9_36.D3DXCreateTextureShader @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateTorus @@ -137,7 +137,7 @@ @ stdcall D3DXFrameFind(ptr ptr) d3dx9_36.D3DXFrameFind @ stdcall D3DXFrameNumNamedMatrices(ptr) d3dx9_36.D3DXFrameNumNamedMatrices @ stdcall D3DXFrameRegisterNamedMatrices(ptr ptr) d3dx9_36.D3DXFrameRegisterNamedMatrices -@ stdcall D3DXFresnelTerm(long long) d3dx9_36.D3DXFresnelTerm +@ stdcall D3DXFresnelTerm(float float) d3dx9_36.D3DXFresnelTerm @ stdcall D3DXFVFFromDeclarator(ptr ptr) d3dx9_36.D3DXFVFFromDeclarator @ stdcall D3DXGatherFragments(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragments @ stdcall D3DXGatherFragmentsFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragmentsFromFileA @@ -150,11 +150,11 @@ @ stdcall D3DXGetDeclVertexSize(ptr long) d3dx9_36.D3DXGetDeclVertexSize @ stdcall D3DXGetDriverLevel(ptr) d3dx9_36.D3DXGetDriverLevel @ stdcall D3DXGetFVFVertexSize(long) d3dx9_36.D3DXGetFVFVertexSize -@ stdcall D3DXGetImageInfoFromFileA(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileA +@ stdcall D3DXGetImageInfoFromFileA(str ptr) d3dx9_36.D3DXGetImageInfoFromFileA @ stdcall D3DXGetImageInfoFromFileInMemory(ptr long ptr) d3dx9_36.D3DXGetImageInfoFromFileInMemory -@ stdcall D3DXGetImageInfoFromFileW(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileW -@ stdcall D3DXGetImageInfoFromResourceA(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceA -@ stdcall D3DXGetImageInfoFromResourceW(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW +@ stdcall D3DXGetImageInfoFromFileW(wstr ptr) d3dx9_36.D3DXGetImageInfoFromFileW +@ stdcall D3DXGetImageInfoFromResourceA(long str ptr) d3dx9_36.D3DXGetImageInfoFromResourceA +@ stdcall D3DXGetImageInfoFromResourceW(long wstr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW @ stdcall D3DXGetPixelShaderProfile(ptr) d3dx9_36.D3DXGetPixelShaderProfile @ stdcall D3DXGetShaderConstantTable(ptr ptr) d3dx9_36.D3DXGetShaderConstantTable @ stdcall D3DXGetShaderInputSemantics(ptr ptr ptr) d3dx9_36.D3DXGetShaderInputSemantics @@ -166,27 +166,27 @@ @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersect @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectSubset @ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectTri -@ stdcall D3DXLoadMeshFromXA(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA +@ stdcall D3DXLoadMeshFromXA(str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA @ stdcall D3DXLoadMeshFromXInMemory(ptr long long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXInMemory -@ stdcall D3DXLoadMeshFromXResource(long ptr ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource -@ stdcall D3DXLoadMeshFromXW(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW +@ stdcall D3DXLoadMeshFromXResource(long str str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource +@ stdcall D3DXLoadMeshFromXW(wstr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW @ stdcall D3DXLoadMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXof -@ stdcall D3DXLoadMeshHierarchyFromXA(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA +@ stdcall D3DXLoadMeshHierarchyFromXA(str long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA @ stdcall D3DXLoadMeshHierarchyFromXInMemory(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXInMemory -@ stdcall D3DXLoadMeshHierarchyFromXW(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW +@ stdcall D3DXLoadMeshHierarchyFromXW(wstr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW @ stdcall D3DXLoadPatchMeshFromXof(ptr long ptr ptr ptr long ptr) d3dx9_36.D3DXLoadPatchMeshFromXof @ stdcall D3DXLoadPRTBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileA @ stdcall D3DXLoadPRTBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileW @ stdcall D3DXLoadPRTCompBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileA @ stdcall D3DXLoadPRTCompBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileW @ stdcall D3DXLoadSkinMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadSkinMeshFromXof -@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA +@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA @ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileInMemory -@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW +@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW @ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromMemory -@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA -@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW -@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long) d3dx9_36.D3DXLoadSurfaceFromSurface +@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA +@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW +@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromSurface @ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileA @ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileInMemory @ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileW @@ -194,8 +194,8 @@ @ stdcall D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceA @ stdcall D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceW @ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadVolumeFromVolume -@ stdcall D3DXMatrixAffineTransformation(ptr long ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation -@ stdcall D3DXMatrixAffineTransformation2D(ptr long ptr long ptr) d3dx9_36.D3DXMatrixAffineTransformation2D +@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation +@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr) d3dx9_36.D3DXMatrixAffineTransformation2D @ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixDecompose @ stdcall D3DXMatrixDeterminant(ptr) d3dx9_36.D3DXMatrixDeterminant @ stdcall D3DXMatrixInverse(ptr ptr ptr) d3dx9_36.D3DXMatrixInverse @@ -203,28 +203,28 @@ @ stdcall D3DXMatrixLookAtRH(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixLookAtRH @ stdcall D3DXMatrixMultiply(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiply @ stdcall D3DXMatrixMultiplyTranspose(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiplyTranspose -@ stdcall D3DXMatrixOrthoLH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoLH -@ stdcall D3DXMatrixOrthoOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterLH -@ stdcall D3DXMatrixOrthoOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterRH -@ stdcall D3DXMatrixOrthoRH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoRH -@ stdcall D3DXMatrixPerspectiveFovLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovLH -@ stdcall D3DXMatrixPerspectiveFovRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovRH -@ stdcall D3DXMatrixPerspectiveLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveLH -@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH -@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH -@ stdcall D3DXMatrixPerspectiveRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveRH +@ stdcall D3DXMatrixOrthoLH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoLH +@ stdcall D3DXMatrixOrthoOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterLH +@ stdcall D3DXMatrixOrthoOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterRH +@ stdcall D3DXMatrixOrthoRH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoRH +@ stdcall D3DXMatrixPerspectiveFovLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovLH +@ stdcall D3DXMatrixPerspectiveFovRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovRH +@ stdcall D3DXMatrixPerspectiveLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveLH +@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH +@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH +@ stdcall D3DXMatrixPerspectiveRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveRH @ stdcall D3DXMatrixReflect(ptr ptr) d3dx9_36.D3DXMatrixReflect -@ stdcall D3DXMatrixRotationAxis(ptr ptr long) d3dx9_36.D3DXMatrixRotationAxis +@ stdcall D3DXMatrixRotationAxis(ptr ptr float) d3dx9_36.D3DXMatrixRotationAxis @ stdcall D3DXMatrixRotationQuaternion(ptr ptr) d3dx9_36.D3DXMatrixRotationQuaternion -@ stdcall D3DXMatrixRotationX(ptr long) d3dx9_36.D3DXMatrixRotationX -@ stdcall D3DXMatrixRotationY(ptr long) d3dx9_36.D3DXMatrixRotationY -@ stdcall D3DXMatrixRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXMatrixRotationYawPitchRoll -@ stdcall D3DXMatrixRotationZ(ptr long) d3dx9_36.D3DXMatrixRotationZ -@ stdcall D3DXMatrixScaling(ptr long long long) d3dx9_36.D3DXMatrixScaling +@ stdcall D3DXMatrixRotationX(ptr float) d3dx9_36.D3DXMatrixRotationX +@ stdcall D3DXMatrixRotationY(ptr float) d3dx9_36.D3DXMatrixRotationY +@ stdcall D3DXMatrixRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXMatrixRotationYawPitchRoll +@ stdcall D3DXMatrixRotationZ(ptr float) d3dx9_36.D3DXMatrixRotationZ +@ stdcall D3DXMatrixScaling(ptr float float float) d3dx9_36.D3DXMatrixScaling @ stdcall D3DXMatrixShadow(ptr ptr ptr) d3dx9_36.D3DXMatrixShadow @ stdcall D3DXMatrixTransformation(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXMatrixTransformation -@ stdcall D3DXMatrixTransformation2D(ptr ptr long ptr ptr long ptr) d3dx9_36.D3DXMatrixTransformation2D -@ stdcall D3DXMatrixTranslation(ptr long long long) d3dx9_36.D3DXMatrixTranslation +@ stdcall D3DXMatrixTransformation2D(ptr ptr float ptr ptr float ptr) d3dx9_36.D3DXMatrixTransformation2D +@ stdcall D3DXMatrixTranslation(ptr float float float) d3dx9_36.D3DXMatrixTranslation @ stdcall D3DXMatrixTranspose(ptr ptr) d3dx9_36.D3DXMatrixTranspose @ stdcall D3DXOptimizeFaces(ptr long long long ptr) d3dx9_36.D3DXOptimizeFaces @ stdcall D3DXOptimizeVertices(ptr long long long ptr) d3dx9_36.D3DXOptimizeVertices @@ -235,21 +235,21 @@ @ stdcall D3DXPlaneTransform(ptr ptr ptr) d3dx9_36.D3DXPlaneTransform @ stdcall D3DXPlaneTransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXPlaneTransformArray @ stdcall D3DXPreprocessShader(ptr long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShader -@ stdcall D3DXPreprocessShaderFromFileA(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA -@ stdcall D3DXPreprocessShaderFromFileW(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW -@ stdcall D3DXPreprocessShaderFromResourceA(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA -@ stdcall D3DXPreprocessShaderFromResourceW(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW -@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXQuaternionBaryCentric +@ stdcall D3DXPreprocessShaderFromFileA(str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA +@ stdcall D3DXPreprocessShaderFromFileW(wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW +@ stdcall D3DXPreprocessShaderFromResourceA(long str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA +@ stdcall D3DXPreprocessShaderFromResourceW(long wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW +@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXQuaternionBaryCentric @ stdcall D3DXQuaternionExp(ptr ptr) d3dx9_36.D3DXQuaternionExp @ stdcall D3DXQuaternionInverse(ptr ptr) d3dx9_36.D3DXQuaternionInverse @ stdcall D3DXQuaternionLn(ptr ptr) d3dx9_36.D3DXQuaternionLn @ stdcall D3DXQuaternionMultiply(ptr ptr ptr) d3dx9_36.D3DXQuaternionMultiply @ stdcall D3DXQuaternionNormalize(ptr ptr) d3dx9_36.D3DXQuaternionNormalize -@ stdcall D3DXQuaternionRotationAxis(ptr ptr long) d3dx9_36.D3DXQuaternionRotationAxis +@ stdcall D3DXQuaternionRotationAxis(ptr ptr float) d3dx9_36.D3DXQuaternionRotationAxis @ stdcall D3DXQuaternionRotationMatrix(ptr ptr) d3dx9_36.D3DXQuaternionRotationMatrix -@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXQuaternionRotationYawPitchRoll -@ stdcall D3DXQuaternionSlerp(ptr ptr ptr long) d3dx9_36.D3DXQuaternionSlerp -@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXQuaternionSquad +@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXQuaternionRotationYawPitchRoll +@ stdcall D3DXQuaternionSlerp(ptr ptr ptr float) d3dx9_36.D3DXQuaternionSlerp +@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXQuaternionSquad @ stdcall D3DXQuaternionSquadSetup(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXQuaternionSquadSetup @ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr) d3dx9_36.D3DXQuaternionToAxisAngle @ stdcall D3DXRectPatchSize(ptr ptr ptr) d3dx9_36.D3DXRectPatchSize @@ -272,11 +272,11 @@ @ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW @ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd @ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot -@ stdcall D3DXSHEvalConeLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight +@ stdcall D3DXSHEvalConeLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight @ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection -@ stdcall D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight -@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight -@ stdcall D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight +@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight +@ stdcall D3DXSHEvalHemisphereLight(long ptr int128 int128 ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight +@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight @ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2 @ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3 @ stdcall D3DXSHMultiply4(ptr ptr ptr) d3dx9_36.D3DXSHMultiply4 @@ -286,10 +286,10 @@ @ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC @ stdcall D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr) d3dx9_36.D3DXSHPRTCompSuperCluster @ stdcall D3DXSHRotate(ptr long ptr ptr) d3dx9_36.D3DXSHRotate -@ stdcall D3DXSHRotateZ(ptr long long ptr) d3dx9_36.D3DXSHRotateZ -@ stdcall D3DXSHScale(ptr long ptr ptr) d3dx9_36.D3DXSHScale +@ stdcall D3DXSHRotateZ(ptr long float ptr) d3dx9_36.D3DXSHRotateZ +@ stdcall D3DXSHScale(ptr long ptr float) d3dx9_36.D3DXSHScale @ stdcall D3DXSimplifyMesh(ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXSimplifyMesh -@ stdcall D3DXSphereBoundProbe(ptr long ptr ptr) d3dx9_36.D3DXSphereBoundProbe +@ stdcall D3DXSphereBoundProbe(ptr float ptr ptr) d3dx9_36.D3DXSphereBoundProbe @ stdcall D3DXSplitMesh(ptr ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSplitMesh @ stdcall D3DXTessellateNPatches(ptr ptr long long ptr ptr) d3dx9_36.D3DXTessellateNPatches @ stdcall D3DXTessellateRectPatch(ptr ptr ptr ptr ptr) d3dx9_36.D3DXTessellateRectPatch @@ -300,9 +300,9 @@ @ stdcall D3DXUVAtlasPartition(ptr long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXUVAtlasPartition @ stdcall D3DXValidMesh(ptr ptr ptr) d3dx9_36.D3DXValidMesh @ stdcall D3DXValidPatchMesh(ptr ptr ptr ptr) d3dx9_36.D3DXValidPatchMesh -@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec2BaryCentric -@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2CatmullRom -@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2Hermite +@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec2BaryCentric +@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2CatmullRom +@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2Hermite @ stdcall D3DXVec2Normalize(ptr ptr) d3dx9_36.D3DXVec2Normalize @ stdcall D3DXVec2Transform(ptr ptr ptr) d3dx9_36.D3DXVec2Transform @ stdcall D3DXVec2TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformArray @@ -310,9 +310,9 @@ @ stdcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformCoordArray @ stdcall D3DXVec2TransformNormal(ptr ptr ptr) d3dx9_36.D3DXVec2TransformNormal @ stdcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformNormalArray -@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec3BaryCentric -@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3CatmullRom -@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3Hermite +@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec3BaryCentric +@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3CatmullRom +@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3Hermite @ stdcall D3DXVec3Normalize(ptr ptr) d3dx9_36.D3DXVec3Normalize @ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Project @ stdcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3ProjectArray @@ -324,10 +324,10 @@ @ stdcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformNormalArray @ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Unproject @ stdcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3UnprojectArray -@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec4BaryCentric -@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4CatmullRom +@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec4BaryCentric +@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4CatmullRom @ stdcall D3DXVec4Cross(ptr ptr ptr ptr) d3dx9_36.D3DXVec4Cross -@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4Hermite +@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4Hermite @ stdcall D3DXVec4Normalize(ptr ptr) d3dx9_36.D3DXVec4Normalize @ stdcall D3DXVec4Transform(ptr ptr ptr) d3dx9_36.D3DXVec4Transform @ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec4TransformArray diff --git a/dll/directx/wine/d3dx9_34/d3dx9_34_main.c b/dll/directx/wine/d3dx9_34/d3dx9_34_main.c index 324d2f1b017..3e8bdbc61db 100644 --- a/dll/directx/wine/d3dx9_34/d3dx9_34_main.c +++ b/dll/directx/wine/d3dx9_34/d3dx9_34_main.c @@ -47,8 +47,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } diff --git a/dll/directx/wine/d3dx9_35/CMakeLists.txt b/dll/directx/wine/d3dx9_35/CMakeLists.txt index 4edb196219e..b02b02b985b 100644 --- a/dll/directx/wine/d3dx9_35/CMakeLists.txt +++ b/dll/directx/wine/d3dx9_35/CMakeLists.txt @@ -1,26 +1,15 @@ +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) + spec2def(d3dx9_35.dll d3dx9_35.spec) list(APPEND SOURCE d3dx9_35_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_35.def) -add_definitions(-D__WINESRC__) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_library(d3dx9_35 SHARED ${SOURCE}) +add_library(d3dx9_35 SHARED ${SOURCE} version.rc) set_module_type(d3dx9_35 win32dll) target_link_libraries(d3dx9_35 wine) - -add_importlibs(d3dx9_35 - d3dx9_36 - d3d9 - user32 - gdi32 - advapi32 - msvcrt - kernel32 - ntdll) - -add_dependencies(d3dx9_35 wineheaders) +add_importlibs(d3dx9_35 d3dx9_36 msvcrt kernel32 ntdll) add_cd_file(TARGET d3dx9_35 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_35/d3dx9_35.spec b/dll/directx/wine/d3dx9_35/d3dx9_35.spec index 5a152aeeef8..8a224467b32 100644 --- a/dll/directx/wine/d3dx9_35/d3dx9_35.spec +++ b/dll/directx/wine/d3dx9_35/d3dx9_35.spec @@ -1,21 +1,21 @@ @ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShader -@ stdcall D3DXAssembleShaderFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA -@ stdcall D3DXAssembleShaderFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW -@ stdcall D3DXAssembleShaderFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA -@ stdcall D3DXAssembleShaderFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW +@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA +@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW +@ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA +@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW @ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) d3dx9_36.D3DXBoxBoundProbe -@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckCubeTextureRequirements -@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckTextureRequirements +@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckCubeTextureRequirements +@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckTextureRequirements @ stdcall D3DXCheckVersion(long long) -@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckVolumeTextureRequirements -@ stdcall D3DXCleanMesh(ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh -@ stdcall D3DXColorAdjustContrast(ptr ptr long) d3dx9_36.D3DXColorAdjustContrast -@ stdcall D3DXColorAdjustSaturation(ptr ptr long) d3dx9_36.D3DXColorAdjustSaturation -@ stdcall D3DXCompileShader(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShader -@ stdcall D3DXCompileShaderFromFileA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA -@ stdcall D3DXCompileShaderFromFileW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW -@ stdcall D3DXCompileShaderFromResourceA(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA -@ stdcall D3DXCompileShaderFromResourceW(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW +@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckVolumeTextureRequirements +@ stdcall D3DXCleanMesh(long ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh +@ stdcall D3DXColorAdjustContrast(ptr ptr float) d3dx9_36.D3DXColorAdjustContrast +@ stdcall D3DXColorAdjustSaturation(ptr ptr float) d3dx9_36.D3DXColorAdjustSaturation +@ stdcall D3DXCompileShader(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShader +@ stdcall D3DXCompileShaderFromFileA(str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA +@ stdcall D3DXCompileShaderFromFileW(wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW +@ stdcall D3DXCompileShaderFromResourceA(ptr str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA +@ stdcall D3DXCompileShaderFromResourceW(ptr wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW @ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingBox @ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingSphere @ stdcall D3DXComputeIMTFromPerVertexSignal(ptr ptr long long long ptr ptr ptr) d3dx9_36.D3DXComputeIMTFromPerVertexSignal @@ -31,7 +31,7 @@ @ stdcall D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToSingleStrip @ stdcall D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToStrips @ stdcall D3DXCreateAnimationController(long long long long ptr) d3dx9_36.D3DXCreateAnimationController -@ stdcall D3DXCreateBox(ptr long long long ptr ptr) d3dx9_36.D3DXCreateBox +@ stdcall D3DXCreateBox(ptr float float float ptr ptr) d3dx9_36.D3DXCreateBox @ stdcall D3DXCreateBuffer(long ptr) d3dx9_36.D3DXCreateBuffer @ stdcall D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr) d3dx9_36.D3DXCreateCompressedAnimationSet @ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr) d3dx9_36.D3DXCreateCubeTexture @@ -48,24 +48,24 @@ @ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder @ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffect @ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler -@ stdcall D3DXCreateEffectCompilerFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA -@ stdcall D3DXCreateEffectCompilerFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW -@ stdcall D3DXCreateEffectCompilerFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA -@ stdcall D3DXCreateEffectCompilerFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW -@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx -@ stdcall D3DXCreateEffectFromFileA(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA -@ stdcall D3DXCreateEffectFromFileExA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA -@ stdcall D3DXCreateEffectFromFileExW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW -@ stdcall D3DXCreateEffectFromFileW(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW -@ stdcall D3DXCreateEffectFromResourceA(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA -@ stdcall D3DXCreateEffectFromResourceExA(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA -@ stdcall D3DXCreateEffectFromResourceExW(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW -@ stdcall D3DXCreateEffectFromResourceW(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW +@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA +@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW +@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA +@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW +@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx +@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA +@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA +@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW +@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW +@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA +@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA +@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW +@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW @ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool -@ stdcall D3DXCreateFontA(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontA +@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectW -@ stdcall D3DXCreateFontW(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontW +@ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) d3dx9_36.D3DXCreateFontW @ stdcall D3DXCreateFragmentLinker(ptr long ptr) d3dx9_36.D3DXCreateFragmentLinker @ stdcall D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateKeyframedAnimationSet @ stdcall D3DXCreateLine(ptr ptr) d3dx9_36.D3DXCreateLine @@ -86,22 +86,22 @@ @ stdcall D3DXCreateSkinInfo(long ptr long ptr) d3dx9_36.D3DXCreateSkinInfo @ stdcall D3DXCreateSkinInfoFromBlendedMesh(ptr long ptr ptr) d3dx9_36.D3DXCreateSkinInfoFromBlendedMesh @ stdcall D3DXCreateSkinInfoFVF(long long long ptr) d3dx9_36.D3DXCreateSkinInfoFVF -@ stdcall D3DXCreateSphere(ptr long long long ptr ptr) d3dx9_36.D3DXCreateSphere +@ stdcall D3DXCreateSphere(ptr float long long ptr ptr) d3dx9_36.D3DXCreateSphere @ stdcall D3DXCreateSprite(ptr ptr) d3dx9_36.D3DXCreateSprite @ stdcall D3DXCreateTeapot(ptr ptr ptr) d3dx9_36.D3DXCreateTeapot -@ stdcall D3DXCreateTextA(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextA -@ stdcall D3DXCreateTextW(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextW +@ stdcall D3DXCreateTextA(ptr long str float float ptr ptr ptr) d3dx9_36.D3DXCreateTextA +@ stdcall D3DXCreateTextW(ptr long wstr float float ptr ptr ptr) d3dx9_36.D3DXCreateTextW @ stdcall D3DXCreateTexture(ptr long long long long long long ptr) d3dx9_36.D3DXCreateTexture -@ stdcall D3DXCreateTextureFromFileA(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileA -@ stdcall D3DXCreateTextureFromFileExA(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA -@ stdcall D3DXCreateTextureFromFileExW(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW +@ stdcall D3DXCreateTextureFromFileA(ptr str ptr) d3dx9_36.D3DXCreateTextureFromFileA +@ stdcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA +@ stdcall D3DXCreateTextureFromFileExW(ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW @ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateTextureFromFileInMemory @ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileInMemoryEx -@ stdcall D3DXCreateTextureFromFileW(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileW -@ stdcall D3DXCreateTextureFromResourceA(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceA -@ stdcall D3DXCreateTextureFromResourceExA(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA -@ stdcall D3DXCreateTextureFromResourceExW(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW -@ stdcall D3DXCreateTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceW +@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromFileW +@ stdcall D3DXCreateTextureFromResourceA(ptr ptr str ptr) d3dx9_36.D3DXCreateTextureFromResourceA +@ stdcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA +@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW +@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromResourceW @ stdcall D3DXCreateTextureGutterHelper(long long ptr long ptr) d3dx9_36.D3DXCreateTextureGutterHelper @ stdcall D3DXCreateTextureShader(ptr ptr) d3dx9_36.D3DXCreateTextureShader @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateTorus @@ -137,7 +137,7 @@ @ stdcall D3DXFrameFind(ptr ptr) d3dx9_36.D3DXFrameFind @ stdcall D3DXFrameNumNamedMatrices(ptr) d3dx9_36.D3DXFrameNumNamedMatrices @ stdcall D3DXFrameRegisterNamedMatrices(ptr ptr) d3dx9_36.D3DXFrameRegisterNamedMatrices -@ stdcall D3DXFresnelTerm(long long) d3dx9_36.D3DXFresnelTerm +@ stdcall D3DXFresnelTerm(float float) d3dx9_36.D3DXFresnelTerm @ stdcall D3DXFVFFromDeclarator(ptr ptr) d3dx9_36.D3DXFVFFromDeclarator @ stdcall D3DXGatherFragments(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragments @ stdcall D3DXGatherFragmentsFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragmentsFromFileA @@ -150,11 +150,11 @@ @ stdcall D3DXGetDeclVertexSize(ptr long) d3dx9_36.D3DXGetDeclVertexSize @ stdcall D3DXGetDriverLevel(ptr) d3dx9_36.D3DXGetDriverLevel @ stdcall D3DXGetFVFVertexSize(long) d3dx9_36.D3DXGetFVFVertexSize -@ stdcall D3DXGetImageInfoFromFileA(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileA +@ stdcall D3DXGetImageInfoFromFileA(str ptr) d3dx9_36.D3DXGetImageInfoFromFileA @ stdcall D3DXGetImageInfoFromFileInMemory(ptr long ptr) d3dx9_36.D3DXGetImageInfoFromFileInMemory -@ stdcall D3DXGetImageInfoFromFileW(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileW -@ stdcall D3DXGetImageInfoFromResourceA(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceA -@ stdcall D3DXGetImageInfoFromResourceW(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW +@ stdcall D3DXGetImageInfoFromFileW(wstr ptr) d3dx9_36.D3DXGetImageInfoFromFileW +@ stdcall D3DXGetImageInfoFromResourceA(long str ptr) d3dx9_36.D3DXGetImageInfoFromResourceA +@ stdcall D3DXGetImageInfoFromResourceW(long wstr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW @ stdcall D3DXGetPixelShaderProfile(ptr) d3dx9_36.D3DXGetPixelShaderProfile @ stdcall D3DXGetShaderConstantTable(ptr ptr) d3dx9_36.D3DXGetShaderConstantTable @ stdcall D3DXGetShaderInputSemantics(ptr ptr ptr) d3dx9_36.D3DXGetShaderInputSemantics @@ -166,27 +166,27 @@ @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersect @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectSubset @ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectTri -@ stdcall D3DXLoadMeshFromXA(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA +@ stdcall D3DXLoadMeshFromXA(str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA @ stdcall D3DXLoadMeshFromXInMemory(ptr long long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXInMemory -@ stdcall D3DXLoadMeshFromXResource(long ptr ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource -@ stdcall D3DXLoadMeshFromXW(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW +@ stdcall D3DXLoadMeshFromXResource(long str str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource +@ stdcall D3DXLoadMeshFromXW(wstr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW @ stdcall D3DXLoadMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXof -@ stdcall D3DXLoadMeshHierarchyFromXA(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA +@ stdcall D3DXLoadMeshHierarchyFromXA(str long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA @ stdcall D3DXLoadMeshHierarchyFromXInMemory(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXInMemory -@ stdcall D3DXLoadMeshHierarchyFromXW(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW +@ stdcall D3DXLoadMeshHierarchyFromXW(wstr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW @ stdcall D3DXLoadPatchMeshFromXof(ptr long ptr ptr ptr long ptr) d3dx9_36.D3DXLoadPatchMeshFromXof @ stdcall D3DXLoadPRTBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileA @ stdcall D3DXLoadPRTBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileW @ stdcall D3DXLoadPRTCompBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileA @ stdcall D3DXLoadPRTCompBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileW @ stdcall D3DXLoadSkinMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadSkinMeshFromXof -@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA +@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA @ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileInMemory -@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW +@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW @ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromMemory -@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA -@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW -@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long) d3dx9_36.D3DXLoadSurfaceFromSurface +@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA +@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW +@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromSurface @ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileA @ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileInMemory @ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileW @@ -194,8 +194,8 @@ @ stdcall D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceA @ stdcall D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceW @ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadVolumeFromVolume -@ stdcall D3DXMatrixAffineTransformation(ptr long ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation -@ stdcall D3DXMatrixAffineTransformation2D(ptr long ptr long ptr) d3dx9_36.D3DXMatrixAffineTransformation2D +@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation +@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr) d3dx9_36.D3DXMatrixAffineTransformation2D @ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixDecompose @ stdcall D3DXMatrixDeterminant(ptr) d3dx9_36.D3DXMatrixDeterminant @ stdcall D3DXMatrixInverse(ptr ptr ptr) d3dx9_36.D3DXMatrixInverse @@ -203,28 +203,28 @@ @ stdcall D3DXMatrixLookAtRH(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixLookAtRH @ stdcall D3DXMatrixMultiply(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiply @ stdcall D3DXMatrixMultiplyTranspose(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiplyTranspose -@ stdcall D3DXMatrixOrthoLH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoLH -@ stdcall D3DXMatrixOrthoOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterLH -@ stdcall D3DXMatrixOrthoOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterRH -@ stdcall D3DXMatrixOrthoRH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoRH -@ stdcall D3DXMatrixPerspectiveFovLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovLH -@ stdcall D3DXMatrixPerspectiveFovRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovRH -@ stdcall D3DXMatrixPerspectiveLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveLH -@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH -@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH -@ stdcall D3DXMatrixPerspectiveRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveRH +@ stdcall D3DXMatrixOrthoLH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoLH +@ stdcall D3DXMatrixOrthoOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterLH +@ stdcall D3DXMatrixOrthoOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterRH +@ stdcall D3DXMatrixOrthoRH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoRH +@ stdcall D3DXMatrixPerspectiveFovLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovLH +@ stdcall D3DXMatrixPerspectiveFovRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovRH +@ stdcall D3DXMatrixPerspectiveLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveLH +@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH +@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH +@ stdcall D3DXMatrixPerspectiveRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveRH @ stdcall D3DXMatrixReflect(ptr ptr) d3dx9_36.D3DXMatrixReflect -@ stdcall D3DXMatrixRotationAxis(ptr ptr long) d3dx9_36.D3DXMatrixRotationAxis +@ stdcall D3DXMatrixRotationAxis(ptr ptr float) d3dx9_36.D3DXMatrixRotationAxis @ stdcall D3DXMatrixRotationQuaternion(ptr ptr) d3dx9_36.D3DXMatrixRotationQuaternion -@ stdcall D3DXMatrixRotationX(ptr long) d3dx9_36.D3DXMatrixRotationX -@ stdcall D3DXMatrixRotationY(ptr long) d3dx9_36.D3DXMatrixRotationY -@ stdcall D3DXMatrixRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXMatrixRotationYawPitchRoll -@ stdcall D3DXMatrixRotationZ(ptr long) d3dx9_36.D3DXMatrixRotationZ -@ stdcall D3DXMatrixScaling(ptr long long long) d3dx9_36.D3DXMatrixScaling +@ stdcall D3DXMatrixRotationX(ptr float) d3dx9_36.D3DXMatrixRotationX +@ stdcall D3DXMatrixRotationY(ptr float) d3dx9_36.D3DXMatrixRotationY +@ stdcall D3DXMatrixRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXMatrixRotationYawPitchRoll +@ stdcall D3DXMatrixRotationZ(ptr float) d3dx9_36.D3DXMatrixRotationZ +@ stdcall D3DXMatrixScaling(ptr float float float) d3dx9_36.D3DXMatrixScaling @ stdcall D3DXMatrixShadow(ptr ptr ptr) d3dx9_36.D3DXMatrixShadow @ stdcall D3DXMatrixTransformation(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXMatrixTransformation -@ stdcall D3DXMatrixTransformation2D(ptr ptr long ptr ptr long ptr) d3dx9_36.D3DXMatrixTransformation2D -@ stdcall D3DXMatrixTranslation(ptr long long long) d3dx9_36.D3DXMatrixTranslation +@ stdcall D3DXMatrixTransformation2D(ptr ptr float ptr ptr float ptr) d3dx9_36.D3DXMatrixTransformation2D +@ stdcall D3DXMatrixTranslation(ptr float float float) d3dx9_36.D3DXMatrixTranslation @ stdcall D3DXMatrixTranspose(ptr ptr) d3dx9_36.D3DXMatrixTranspose @ stdcall D3DXOptimizeFaces(ptr long long long ptr) d3dx9_36.D3DXOptimizeFaces @ stdcall D3DXOptimizeVertices(ptr long long long ptr) d3dx9_36.D3DXOptimizeVertices @@ -235,21 +235,21 @@ @ stdcall D3DXPlaneTransform(ptr ptr ptr) d3dx9_36.D3DXPlaneTransform @ stdcall D3DXPlaneTransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXPlaneTransformArray @ stdcall D3DXPreprocessShader(ptr long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShader -@ stdcall D3DXPreprocessShaderFromFileA(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA -@ stdcall D3DXPreprocessShaderFromFileW(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW -@ stdcall D3DXPreprocessShaderFromResourceA(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA -@ stdcall D3DXPreprocessShaderFromResourceW(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW -@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXQuaternionBaryCentric +@ stdcall D3DXPreprocessShaderFromFileA(str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA +@ stdcall D3DXPreprocessShaderFromFileW(wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW +@ stdcall D3DXPreprocessShaderFromResourceA(long str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA +@ stdcall D3DXPreprocessShaderFromResourceW(long wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW +@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXQuaternionBaryCentric @ stdcall D3DXQuaternionExp(ptr ptr) d3dx9_36.D3DXQuaternionExp @ stdcall D3DXQuaternionInverse(ptr ptr) d3dx9_36.D3DXQuaternionInverse @ stdcall D3DXQuaternionLn(ptr ptr) d3dx9_36.D3DXQuaternionLn @ stdcall D3DXQuaternionMultiply(ptr ptr ptr) d3dx9_36.D3DXQuaternionMultiply @ stdcall D3DXQuaternionNormalize(ptr ptr) d3dx9_36.D3DXQuaternionNormalize -@ stdcall D3DXQuaternionRotationAxis(ptr ptr long) d3dx9_36.D3DXQuaternionRotationAxis +@ stdcall D3DXQuaternionRotationAxis(ptr ptr float) d3dx9_36.D3DXQuaternionRotationAxis @ stdcall D3DXQuaternionRotationMatrix(ptr ptr) d3dx9_36.D3DXQuaternionRotationMatrix -@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXQuaternionRotationYawPitchRoll -@ stdcall D3DXQuaternionSlerp(ptr ptr ptr long) d3dx9_36.D3DXQuaternionSlerp -@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXQuaternionSquad +@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXQuaternionRotationYawPitchRoll +@ stdcall D3DXQuaternionSlerp(ptr ptr ptr float) d3dx9_36.D3DXQuaternionSlerp +@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXQuaternionSquad @ stdcall D3DXQuaternionSquadSetup(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXQuaternionSquadSetup @ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr) d3dx9_36.D3DXQuaternionToAxisAngle @ stdcall D3DXRectPatchSize(ptr ptr ptr) d3dx9_36.D3DXRectPatchSize @@ -272,11 +272,11 @@ @ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW @ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd @ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot -@ stdcall D3DXSHEvalConeLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight +@ stdcall D3DXSHEvalConeLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight @ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection -@ stdcall D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight -@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight -@ stdcall D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight +@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight +@ stdcall D3DXSHEvalHemisphereLight(long ptr int128 int128 ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight +@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight @ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2 @ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3 @ stdcall D3DXSHMultiply4(ptr ptr ptr) d3dx9_36.D3DXSHMultiply4 @@ -286,10 +286,10 @@ @ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC @ stdcall D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr) d3dx9_36.D3DXSHPRTCompSuperCluster @ stdcall D3DXSHRotate(ptr long ptr ptr) d3dx9_36.D3DXSHRotate -@ stdcall D3DXSHRotateZ(ptr long long ptr) d3dx9_36.D3DXSHRotateZ -@ stdcall D3DXSHScale(ptr long ptr ptr) d3dx9_36.D3DXSHScale +@ stdcall D3DXSHRotateZ(ptr long float ptr) d3dx9_36.D3DXSHRotateZ +@ stdcall D3DXSHScale(ptr long ptr float) d3dx9_36.D3DXSHScale @ stdcall D3DXSimplifyMesh(ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXSimplifyMesh -@ stdcall D3DXSphereBoundProbe(ptr long ptr ptr) d3dx9_36.D3DXSphereBoundProbe +@ stdcall D3DXSphereBoundProbe(ptr float ptr ptr) d3dx9_36.D3DXSphereBoundProbe @ stdcall D3DXSplitMesh(ptr ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSplitMesh @ stdcall D3DXTessellateNPatches(ptr ptr long long ptr ptr) d3dx9_36.D3DXTessellateNPatches @ stdcall D3DXTessellateRectPatch(ptr ptr ptr ptr ptr) d3dx9_36.D3DXTessellateRectPatch @@ -300,9 +300,9 @@ @ stdcall D3DXUVAtlasPartition(ptr long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXUVAtlasPartition @ stdcall D3DXValidMesh(ptr ptr ptr) d3dx9_36.D3DXValidMesh @ stdcall D3DXValidPatchMesh(ptr ptr ptr ptr) d3dx9_36.D3DXValidPatchMesh -@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec2BaryCentric -@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2CatmullRom -@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2Hermite +@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec2BaryCentric +@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2CatmullRom +@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2Hermite @ stdcall D3DXVec2Normalize(ptr ptr) d3dx9_36.D3DXVec2Normalize @ stdcall D3DXVec2Transform(ptr ptr ptr) d3dx9_36.D3DXVec2Transform @ stdcall D3DXVec2TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformArray @@ -310,9 +310,9 @@ @ stdcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformCoordArray @ stdcall D3DXVec2TransformNormal(ptr ptr ptr) d3dx9_36.D3DXVec2TransformNormal @ stdcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformNormalArray -@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec3BaryCentric -@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3CatmullRom -@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3Hermite +@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec3BaryCentric +@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3CatmullRom +@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3Hermite @ stdcall D3DXVec3Normalize(ptr ptr) d3dx9_36.D3DXVec3Normalize @ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Project @ stdcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3ProjectArray @@ -324,10 +324,10 @@ @ stdcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformNormalArray @ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Unproject @ stdcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3UnprojectArray -@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec4BaryCentric -@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4CatmullRom +@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec4BaryCentric +@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4CatmullRom @ stdcall D3DXVec4Cross(ptr ptr ptr ptr) d3dx9_36.D3DXVec4Cross -@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4Hermite +@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4Hermite @ stdcall D3DXVec4Normalize(ptr ptr) d3dx9_36.D3DXVec4Normalize @ stdcall D3DXVec4Transform(ptr ptr ptr) d3dx9_36.D3DXVec4Transform @ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec4TransformArray diff --git a/dll/directx/wine/d3dx9_35/d3dx9_35_main.c b/dll/directx/wine/d3dx9_35/d3dx9_35_main.c index e21899ac771..25fe4a394eb 100644 --- a/dll/directx/wine/d3dx9_35/d3dx9_35_main.c +++ b/dll/directx/wine/d3dx9_35/d3dx9_35_main.c @@ -47,8 +47,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } diff --git a/dll/directx/wine/d3dx9_36/CMakeLists.txt b/dll/directx/wine/d3dx9_36/CMakeLists.txt index cadec7efd41..72df0342ea7 100644 --- a/dll/directx/wine/d3dx9_36/CMakeLists.txt +++ b/dll/directx/wine/d3dx9_36/CMakeLists.txt @@ -1,35 +1,31 @@ +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) + spec2def(d3dx9_36.dll d3dx9_36.spec ADD_IMPORTLIB) list(APPEND SOURCE core.c d3dx9_36_main.c + effect.c font.c + line.c math.c mesh.c + render.c shader.c + skin.c sprite.c surface.c texture.c util.c - version.rc + volume.c + xfile.c ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_36_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_36.def) -add_definitions(-D__WINESRC__) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_library(d3dx9_36 SHARED ${SOURCE}) +add_library(d3dx9_36 SHARED ${SOURCE} version.rc) set_module_type(d3dx9_36 win32dll) -target_link_libraries(d3dx9_36 uuid wine) - -add_importlibs(d3dx9_36 - d3d9 - user32 - gdi32 - advapi32 - msvcrt - kernel32 - ntdll) - -add_dependencies(d3dx9_36 wineheaders) +target_link_libraries(d3dx9_36 dxguid wine) +add_importlibs(d3dx9_36 d3dcompiler_43 d3dxof user32 ole32 gdi32 msvcrt kernel32 ntdll) add_cd_file(TARGET d3dx9_36 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_36/core.c b/dll/directx/wine/d3dx9_36/core.c index ee47c0ad4c9..adcd54f921d 100644 --- a/dll/directx/wine/d3dx9_36/core.c +++ b/dll/directx/wine/d3dx9_36/core.c @@ -30,91 +30,134 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dx); -/* ID3DXBuffer IUnknown parts follow: */ -static HRESULT WINAPI ID3DXBufferImpl_QueryInterface(LPD3DXBUFFER iface, REFIID riid, LPVOID* ppobj) +struct ID3DXBufferImpl { - ID3DXBufferImpl *This = (ID3DXBufferImpl *)iface; + ID3DXBuffer ID3DXBuffer_iface; + LONG ref; + + void *buffer; + DWORD size; +}; + +static inline struct ID3DXBufferImpl *impl_from_ID3DXBuffer(ID3DXBuffer *iface) +{ + return CONTAINING_RECORD(iface, struct ID3DXBufferImpl, ID3DXBuffer_iface); +} + +static HRESULT WINAPI ID3DXBufferImpl_QueryInterface(ID3DXBuffer *iface, REFIID riid, void **ppobj) +{ + TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), ppobj); if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_ID3DXBuffer)) { IUnknown_AddRef(iface); - *ppobj = This; + *ppobj = iface; return D3D_OK; } - WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj); + WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid)); + return E_NOINTERFACE; } -static ULONG WINAPI ID3DXBufferImpl_AddRef(LPD3DXBUFFER iface) +static ULONG WINAPI ID3DXBufferImpl_AddRef(ID3DXBuffer *iface) { - ID3DXBufferImpl *This = (ID3DXBufferImpl *)iface; + struct ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface); ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p) : AddRef from %d\n", This, ref - 1); + TRACE("%p increasing refcount to %u\n", This, ref); return ref; } -static ULONG WINAPI ID3DXBufferImpl_Release(LPD3DXBUFFER iface) +static ULONG WINAPI ID3DXBufferImpl_Release(ID3DXBuffer *iface) { - ID3DXBufferImpl *This = (ID3DXBufferImpl *)iface; + struct ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p) : ReleaseRef to %d\n", This, ref); + TRACE("%p decreasing refcount to %u\n", This, ref); if (ref == 0) { HeapFree(GetProcessHeap(), 0, This->buffer); HeapFree(GetProcessHeap(), 0, This); } + return ref; } -/* ID3DXBuffer Interface follow: */ -static LPVOID WINAPI ID3DXBufferImpl_GetBufferPointer(LPD3DXBUFFER iface) +static LPVOID WINAPI ID3DXBufferImpl_GetBufferPointer(ID3DXBuffer *iface) { - ID3DXBufferImpl *This = (ID3DXBufferImpl *)iface; + struct ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface); + + TRACE("iface %p\n", iface); + return This->buffer; } -static DWORD WINAPI ID3DXBufferImpl_GetBufferSize(LPD3DXBUFFER iface) +static DWORD WINAPI ID3DXBufferImpl_GetBufferSize(ID3DXBuffer *iface) { - ID3DXBufferImpl *This = (ID3DXBufferImpl *)iface; - return This->bufferSize; + struct ID3DXBufferImpl *This = impl_from_ID3DXBuffer(iface); + + TRACE("iface %p\n", iface); + + return This->size; } -const ID3DXBufferVtbl D3DXBuffer_Vtbl = +static const struct ID3DXBufferVtbl ID3DXBufferImpl_Vtbl = { + /* IUnknown methods */ ID3DXBufferImpl_QueryInterface, ID3DXBufferImpl_AddRef, ID3DXBufferImpl_Release, + /* ID3DXBuffer methods */ ID3DXBufferImpl_GetBufferPointer, ID3DXBufferImpl_GetBufferSize }; -HRESULT WINAPI D3DXCreateBuffer(DWORD NumBytes, LPD3DXBUFFER* ppBuffer) +static HRESULT d3dx9_buffer_init(struct ID3DXBufferImpl *buffer, DWORD size) { - ID3DXBufferImpl *object; + buffer->ID3DXBuffer_iface.lpVtbl = &ID3DXBufferImpl_Vtbl; + buffer->ref = 1; + buffer->size = size; - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ID3DXBufferImpl)); - if (object == NULL) + buffer->buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); + if (!buffer->buffer) { - *ppBuffer = NULL; - return E_OUTOFMEMORY; - } - object->lpVtbl = &D3DXBuffer_Vtbl; - object->ref = 1; - object->bufferSize = NumBytes; - object->buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, NumBytes); - if (object->buffer == NULL) - { - HeapFree(GetProcessHeap(), 0, object); - *ppBuffer = NULL; + ERR("Failed to allocate buffer memory\n"); return E_OUTOFMEMORY; } - *ppBuffer = (LPD3DXBUFFER)object; + return D3D_OK; +} + +HRESULT WINAPI D3DXCreateBuffer(DWORD size, ID3DXBuffer **buffer) +{ + struct ID3DXBufferImpl *object; + HRESULT hr; + + if (!buffer) + { + WARN("Invalid buffer specified.\n"); + return D3DERR_INVALIDCALL; + } + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + return E_OUTOFMEMORY; + + hr = d3dx9_buffer_init(object, size); + if (FAILED(hr)) + { + WARN("Failed to initialize buffer, hr %#x.\n", hr); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + + *buffer = &object->ID3DXBuffer_iface; + + TRACE("Created ID3DBuffer %p\n", *buffer); + return D3D_OK; } diff --git a/dll/directx/wine/d3dx9_36/d3dx9_36.spec b/dll/directx/wine/d3dx9_36/d3dx9_36.spec index 792408194d2..e88b7b00e33 100644 --- a/dll/directx/wine/d3dx9_36/d3dx9_36.spec +++ b/dll/directx/wine/d3dx9_36/d3dx9_36.spec @@ -4,150 +4,150 @@ @ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr) @ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr) @ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) -@ stub D3DXCheckCubeTextureRequirements -@ stub D3DXCheckTextureRequirements +@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr ptr) +@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr ptr) @ stdcall D3DXCheckVersion(long long) -@ stub D3DXCheckVolumeTextureRequirements -@ stub D3DXCleanMesh -@ stdcall D3DXColorAdjustContrast(ptr ptr long) -@ stdcall D3DXColorAdjustSaturation(ptr ptr long) -@ stdcall D3DXCompileShader(ptr long ptr ptr ptr ptr long ptr ptr ptr) -@ stub D3DXCompileShaderFromFileA -@ stub D3DXCompileShaderFromFileW -@ stub D3DXCompileShaderFromResourceA -@ stub D3DXCompileShaderFromResourceW +@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr ptr) +@ stdcall D3DXCleanMesh(long ptr ptr ptr ptr ptr) +@ stdcall D3DXColorAdjustContrast(ptr ptr float) +@ stdcall D3DXColorAdjustSaturation(ptr ptr float) +@ stdcall D3DXCompileShader(ptr long ptr ptr str str long ptr ptr ptr) +@ stdcall D3DXCompileShaderFromFileA(str ptr ptr str str long ptr ptr ptr) +@ stdcall D3DXCompileShaderFromFileW(wstr ptr ptr str str long ptr ptr ptr) +@ stdcall D3DXCompileShaderFromResourceA(ptr str ptr ptr str str long ptr ptr ptr) +@ stdcall D3DXCompileShaderFromResourceW(ptr wstr ptr ptr str str long ptr ptr ptr) @ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) @ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) -@ stub D3DXComputeIMTFromPerTexelSignal -@ stub D3DXComputeIMTFromPerVertexSignal -@ stub D3DXComputeIMTFromSignal -@ stub D3DXComputeIMTFromTexture -@ stub D3DXComputeNormalMap -@ stub D3DXComputeNormals -@ stub D3DXComputeTangent -@ stub D3DXComputeTangentFrame -@ stub D3DXComputeTangentFrameEx -@ stub D3DXConcatenateMeshes -@ stub D3DXConvertMeshSubsetToSingleStrip -@ stub D3DXConvertMeshSubsetToStrips -@ stub D3DXCreateAnimationController -@ stub D3DXCreateBox +@ stdcall -stub D3DXComputeIMTFromPerVertexSignal(ptr ptr long long long ptr ptr ptr) +@ stdcall -stub D3DXComputeIMTFromPerTexelSignal(ptr long ptr long long long long long ptr ptr ptr) +@ stdcall -stub D3DXComputeIMTFromSignal(ptr long long long long ptr ptr ptr ptr ptr) +@ stdcall -stub D3DXComputeIMTFromTexture(ptr ptr long long ptr ptr ptr) +@ stdcall -stub D3DXComputeNormalMap(ptr ptr ptr long long long) +@ stdcall -stub D3DXComputeNormals(ptr ptr) +@ stdcall -stub D3DXComputeTangent(ptr long long long long ptr) +@ stdcall -stub D3DXComputeTangentFrame(ptr long) +@ stdcall -stub D3DXComputeTangentFrameEx(ptr long long long long long long long long long ptr long long long ptr ptr) +@ stdcall -stub D3DXConcatenateMeshes(ptr long long ptr ptr ptr ptr ptr) +@ stdcall -stub D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr) +@ stdcall -stub D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr) +@ stdcall -stub D3DXCreateAnimationController(long long long long ptr) +@ stdcall D3DXCreateBox(ptr float float float ptr ptr) @ stdcall D3DXCreateBuffer(long ptr) -@ stub D3DXCreateCompressedAnimationSet -@ stub D3DXCreateCubeTexture -@ stub D3DXCreateCubeTextureFromFileA -@ stub D3DXCreateCubeTextureFromFileExA -@ stub D3DXCreateCubeTextureFromFileExW -@ stub D3DXCreateCubeTextureFromFileInMemory -@ stub D3DXCreateCubeTextureFromFileInMemoryEx -@ stub D3DXCreateCubeTextureFromFileW -@ stub D3DXCreateCubeTextureFromResourceA -@ stub D3DXCreateCubeTextureFromResourceExA -@ stub D3DXCreateCubeTextureFromResourceExW -@ stub D3DXCreateCubeTextureFromResourceW -@ stub D3DXCreateCylinder -@ stub D3DXCreateEffect -@ stub D3DXCreateEffectCompiler -@ stub D3DXCreateEffectCompilerFromFileA -@ stub D3DXCreateEffectCompilerFromFileW -@ stub D3DXCreateEffectCompilerFromResourceA -@ stub D3DXCreateEffectCompilerFromResourceW -@ stub D3DXCreateEffectEx -@ stub D3DXCreateEffectFromFileA -@ stub D3DXCreateEffectFromFileExA -@ stub D3DXCreateEffectFromFileExW -@ stub D3DXCreateEffectFromFileW -@ stub D3DXCreateEffectFromResourceA -@ stub D3DXCreateEffectFromResourceExA -@ stub D3DXCreateEffectFromResourceExW -@ stub D3DXCreateEffectFromResourceW -@ stub D3DXCreateEffectPool +@ stdcall -stub D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr) +@ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr) +@ stdcall D3DXCreateCubeTextureFromFileA(ptr ptr ptr) +@ stdcall D3DXCreateCubeTextureFromFileExA(ptr ptr long long long long long long long long ptr ptr ptr) +@ stdcall D3DXCreateCubeTextureFromFileExW(ptr ptr long long long long long long long long ptr ptr ptr) +@ stdcall D3DXCreateCubeTextureFromFileInMemory(ptr ptr long ptr) +@ stdcall D3DXCreateCubeTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long ptr ptr ptr) +@ stdcall D3DXCreateCubeTextureFromFileW(ptr ptr ptr) +@ stdcall -stub D3DXCreateCubeTextureFromResourceA(ptr long ptr ptr) +@ stdcall -stub D3DXCreateCubeTextureFromResourceExA(ptr long long long long long long long long long long ptr ptr ptr) +@ stdcall -stub D3DXCreateCubeTextureFromResourceExW(ptr long long long long long long long long long long ptr ptr ptr) +@ stdcall -stub D3DXCreateCubeTextureFromResourceW(ptr long ptr ptr) +@ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) +@ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) +@ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) +@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) +@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) +@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) +@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) +@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) +@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) +@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) +@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) +@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) +@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) +@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) +@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) +@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) +@ stdcall D3DXCreateEffectPool(ptr) @ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) @ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) -@ stub D3DXCreateFragmentLinker -@ stub D3DXCreateFragmentLinkerEx -@ stub D3DXCreateKeyframedAnimationSet -@ stub D3DXCreateLine +@ stdcall -stub D3DXCreateFragmentLinker(ptr long ptr) +@ stdcall -stub D3DXCreateFragmentLinkerEx(ptr long long ptr) +@ stdcall -stub D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) +@ stdcall D3DXCreateLine(ptr ptr) @ stdcall D3DXCreateMatrixStack(long ptr) -@ stub D3DXCreateMesh -@ stub D3DXCreateMeshFVF -@ stub D3DXCreateNPatchMesh -@ stub D3DXCreatePMeshFromStream -@ stub D3DXCreatePatchMesh -@ stub D3DXCreatePolygon -@ stub D3DXCreatePRTBuffer -@ stub D3DXCreatePRTBufferTex -@ stub D3DXCreatePRTCompBuffer -@ stub D3DXCreatePRTEngine -@ stub D3DXCreateRenderToEnvMap -@ stub D3DXCreateRenderToSurface -@ stub D3DXCreateSPMesh -@ stub D3DXCreateSkinInfo -@ stub D3DXCreateSkinInfoFromBlendedMesh -@ stub D3DXCreateSkinInfoFVF -@ stub D3DXCreateSphere +@ stdcall D3DXCreateMesh(long long long ptr ptr ptr) +@ stdcall D3DXCreateMeshFVF(long long long long ptr ptr) +@ stdcall -stub D3DXCreateNPatchMesh(ptr ptr) +@ stdcall -stub D3DXCreatePMeshFromStream(ptr long ptr ptr ptr ptr ptr) +@ stdcall -stub D3DXCreatePatchMesh(ptr long long long ptr ptr ptr) +@ stdcall -stub D3DXCreatePolygon(ptr long long ptr ptr) +@ stdcall -stub D3DXCreatePRTBuffer(long long long ptr) +@ stdcall -stub D3DXCreatePRTBufferTex(long long long long ptr) +@ stdcall -stub D3DXCreatePRTCompBuffer(long long long ptr ptr ptr ptr) +@ stdcall -stub D3DXCreatePRTEngine(ptr ptr long ptr ptr) +@ stdcall D3DXCreateRenderToEnvMap(ptr long long long long long ptr) +@ stdcall D3DXCreateRenderToSurface(ptr long long long long long ptr) +@ stdcall -stub D3DXCreateSPMesh(ptr ptr ptr ptr ptr) +@ stdcall D3DXCreateSkinInfo(long ptr long ptr) +@ stdcall -stub D3DXCreateSkinInfoFromBlendedMesh(ptr long ptr ptr) +@ stdcall D3DXCreateSkinInfoFVF(long long long ptr) +@ stdcall D3DXCreateSphere(ptr float long long ptr ptr) @ stdcall D3DXCreateSprite(ptr ptr) -@ stub D3DXCreateTeapot -@ stub D3DXCreateTextA -@ stub D3DXCreateTextW +@ stdcall D3DXCreateTeapot(ptr ptr ptr) +@ stdcall D3DXCreateTextA(ptr long str float float ptr ptr ptr) +@ stdcall D3DXCreateTextW(ptr long wstr float float ptr ptr ptr) @ stdcall D3DXCreateTexture(ptr long long long long long long ptr) -@ stub D3DXCreateTextureFromFileA -@ stub D3DXCreateTextureFromFileExA -@ stub D3DXCreateTextureFromFileExW -@ stub D3DXCreateTextureFromFileInMemory -@ stub D3DXCreateTextureFromFileInMemoryEx -@ stub D3DXCreateTextureFromFileW -@ stub D3DXCreateTextureFromResourceA -@ stub D3DXCreateTextureFromResourceExA -@ stub D3DXCreateTextureFromResourceExW -@ stub D3DXCreateTextureFromResourceW -@ stub D3DXCreateTextureGutterHelper -@ stub D3DXCreateTextureShader -@ stub D3DXCreateTorus -@ stub D3DXCreateVolumeTexture -@ stub D3DXCreateVolumeTextureFromFileA -@ stub D3DXCreateVolumeTextureFromFileExA -@ stub D3DXCreateVolumeTextureFromFileExW -@ stub D3DXCreateVolumeTextureFromFileInMemory -@ stub D3DXCreateVolumeTextureFromFileInMemoryEx -@ stub D3DXCreateVolumeTextureFromFileW -@ stub D3DXCreateVolumeTextureFromResourceA -@ stub D3DXCreateVolumeTextureFromResourceExA -@ stub D3DXCreateVolumeTextureFromResourceExW -@ stub D3DXCreateVolumeTextureFromResourceW +@ stdcall D3DXCreateTextureFromFileA(ptr str ptr) +@ stdcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr) +@ stdcall D3DXCreateTextureFromFileExW(ptr wstr long long long long long long long long long ptr ptr ptr) +@ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr) +@ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) +@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr) +@ stdcall D3DXCreateTextureFromResourceA(ptr ptr str ptr) +@ stdcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr) +@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) +@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) +@ stdcall -stub D3DXCreateTextureGutterHelper(long long ptr long ptr) +@ stdcall -stub D3DXCreateTextureShader(ptr ptr) +@ stdcall -stub D3DXCreateTorus(ptr long long long long ptr ptr) +@ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) +@ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) +@ stdcall D3DXCreateVolumeTextureFromFileExA(ptr ptr long long long long long long long long long long ptr ptr ptr) +@ stdcall D3DXCreateVolumeTextureFromFileExW(ptr ptr long long long long long long long long long long ptr ptr ptr) +@ stdcall D3DXCreateVolumeTextureFromFileInMemory(ptr ptr long ptr) +@ stdcall D3DXCreateVolumeTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long long ptr ptr ptr) +@ stdcall D3DXCreateVolumeTextureFromFileW(ptr ptr ptr) +@ stdcall -stub D3DXCreateVolumeTextureFromResourceA(ptr long ptr ptr) +@ stdcall -stub D3DXCreateVolumeTextureFromResourceExA(ptr long ptr long long long long long long long long long long ptr ptr ptr) +@ stdcall -stub D3DXCreateVolumeTextureFromResourceExW(ptr long ptr long long long long long long long long long long ptr ptr ptr) +@ stdcall -stub D3DXCreateVolumeTextureFromResourceW(ptr long ptr ptr) @ stdcall D3DXDebugMute(long) -@ stub D3DXDeclaratorFromFVF -@ stub D3DXDisassembleEffect -@ stub D3DXDisassembleShader -@ stub D3DXFileCreate -@ stub D3DXFillCubeTexture -@ stub D3DXFillCubeTextureTX -@ stub D3DXFillTexture -@ stub D3DXFillTextureTX -@ stub D3DXFillVolumeTexture -@ stub D3DXFillVolumeTextureTX -@ stub D3DXFilterTexture +@ stdcall D3DXDeclaratorFromFVF(long ptr) +@ stdcall D3DXDisassembleEffect(ptr long ptr) +@ stdcall -stub D3DXDisassembleShader(ptr long ptr ptr) +@ stdcall D3DXFileCreate(ptr) +@ stdcall D3DXFillCubeTexture(ptr ptr ptr) +@ stdcall -stub D3DXFillCubeTextureTX(ptr ptr) +@ stdcall D3DXFillTexture(ptr ptr ptr) +@ stdcall -stub D3DXFillTextureTX(ptr ptr) +@ stdcall D3DXFillVolumeTexture(ptr ptr ptr) +@ stdcall -stub D3DXFillVolumeTextureTX(ptr ptr) +@ stdcall D3DXFilterTexture(ptr ptr long long) @ stdcall D3DXFindShaderComment(ptr long ptr ptr) -@ stub D3DXFloat16To32Array -@ stub D3DXFloat32To16Array -@ stub D3DXFrameAppendChild -@ stub D3DXFrameCalculateBoundingSphere -@ stub D3DXFrameDestroy -@ stub D3DXFrameFind -@ stub D3DXFrameNumNamedMatrices -@ stub D3DXFrameRegisterNamedMatrices -@ stdcall D3DXFresnelTerm(long long) -@ stub D3DXFVFFromDeclarator -@ stub D3DXGatherFragments -@ stub D3DXGatherFragmentsFromFileA -@ stub D3DXGatherFragmentsFromFileW -@ stub D3DXGatherFragmentsFromResourceA -@ stub D3DXGatherFragmentsFromResourceW -@ stub D3DXGenerateOutputDecl -@ stub D3DXGeneratePMesh -@ stub D3DXGetDeclLength +@ stdcall D3DXFloat16To32Array(ptr ptr long) +@ stdcall D3DXFloat32To16Array(ptr ptr long) +@ stdcall -stub D3DXFrameAppendChild(ptr ptr) +@ stdcall -stub D3DXFrameCalculateBoundingSphere(ptr ptr ptr) +@ stdcall D3DXFrameDestroy(ptr ptr) +@ stdcall -stub D3DXFrameFind(ptr ptr) +@ stdcall -stub D3DXFrameNumNamedMatrices(ptr) +@ stdcall -stub D3DXFrameRegisterNamedMatrices(ptr ptr) +@ stdcall D3DXFresnelTerm(float float) +@ stdcall D3DXFVFFromDeclarator(ptr ptr) +@ stdcall -stub D3DXGatherFragments(ptr long ptr ptr long ptr ptr) +@ stdcall -stub D3DXGatherFragmentsFromFileA(ptr ptr ptr long ptr ptr) +@ stdcall -stub D3DXGatherFragmentsFromFileW(ptr ptr ptr long ptr ptr) +@ stdcall -stub D3DXGatherFragmentsFromResourceA(long ptr ptr ptr long ptr ptr) +@ stdcall -stub D3DXGatherFragmentsFromResourceW(long ptr ptr ptr long ptr ptr) +@ stdcall -stub D3DXGenerateOutputDecl(ptr ptr) +@ stdcall -stub D3DXGeneratePMesh(ptr ptr ptr ptr long long ptr) +@ stdcall D3DXGetDeclLength(ptr) @ stdcall D3DXGetDeclVertexSize(ptr long) @ stdcall D3DXGetDriverLevel(ptr) @ stdcall D3DXGetFVFVertexSize(long) @@ -159,29 +159,29 @@ @ stdcall D3DXGetPixelShaderProfile(ptr) @ stdcall D3DXGetShaderConstantTable(ptr ptr) @ stdcall D3DXGetShaderConstantTableEx(ptr long ptr) -@ stub D3DXGetShaderInputSemantics -@ stub D3DXGetShaderOutputSemantics -@ stub D3DXGetShaderSamplers +@ stdcall -stub D3DXGetShaderInputSemantics(ptr ptr ptr) +@ stdcall -stub D3DXGetShaderOutputSemantics(ptr ptr ptr) +@ stdcall D3DXGetShaderSamplers(ptr ptr ptr) @ stdcall D3DXGetShaderSize(ptr) @ stdcall D3DXGetShaderVersion(ptr) @ stdcall D3DXGetVertexShaderProfile(ptr) -@ stub D3DXIntersect -@ stub D3DXIntersectSubset +@ stdcall -stub D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) +@ stdcall -stub D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) @ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) -@ stub D3DXLoadMeshFromXA -@ stub D3DXLoadMeshFromXInMemory -@ stub D3DXLoadMeshFromXResource -@ stub D3DXLoadMeshFromXW -@ stub D3DXLoadMeshFromXof -@ stub D3DXLoadMeshHierarchyFromXA -@ stub D3DXLoadMeshHierarchyFromXInMemory -@ stub D3DXLoadMeshHierarchyFromXW -@ stub D3DXLoadPatchMeshFromXof -@ stub D3DXLoadPRTBufferFromFileA -@ stub D3DXLoadPRTBufferFromFileW -@ stub D3DXLoadPRTCompBufferFromFileA -@ stub D3DXLoadPRTCompBufferFromFileW -@ stub D3DXLoadSkinMeshFromXof +@ stdcall D3DXLoadMeshFromXA(str long ptr ptr ptr ptr ptr ptr) +@ stdcall D3DXLoadMeshFromXInMemory(ptr long long ptr ptr ptr ptr ptr ptr) +@ stdcall D3DXLoadMeshFromXResource(long str str long ptr ptr ptr ptr ptr ptr) +@ stdcall D3DXLoadMeshFromXW(wstr long ptr ptr ptr ptr ptr ptr) +@ stdcall -stub D3DXLoadMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr) +@ stdcall D3DXLoadMeshHierarchyFromXA(str long ptr ptr ptr ptr ptr) +@ stdcall D3DXLoadMeshHierarchyFromXInMemory(ptr long long ptr ptr ptr ptr ptr) +@ stdcall D3DXLoadMeshHierarchyFromXW(wstr long ptr ptr ptr ptr ptr) +@ stdcall -stub D3DXLoadPatchMeshFromXof(ptr long ptr ptr ptr long ptr) +@ stdcall -stub D3DXLoadPRTBufferFromFileA(ptr ptr) +@ stdcall -stub D3DXLoadPRTBufferFromFileW(ptr ptr) +@ stdcall -stub D3DXLoadPRTCompBufferFromFileA(ptr ptr) +@ stdcall -stub D3DXLoadPRTCompBufferFromFileW(ptr ptr) +@ stdcall D3DXLoadSkinMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr ptr) @ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) @ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) @ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) @@ -189,15 +189,15 @@ @ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) @ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) @ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) -@ stub D3DXLoadVolumeFromFileA -@ stub D3DXLoadVolumeFromFileInMemory -@ stub D3DXLoadVolumeFromFileW -@ stub D3DXLoadVolumeFromMemory -@ stub D3DXLoadVolumeFromResourceA -@ stub D3DXLoadVolumeFromResourceW -@ stub D3DXLoadVolumeFromVolume -@ stdcall D3DXMatrixAffineTransformation(ptr long ptr ptr ptr) -@ stdcall D3DXMatrixAffineTransformation2D(ptr long ptr long ptr) +@ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) +@ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) +@ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) +@ stdcall D3DXLoadVolumeFromMemory(ptr ptr ptr ptr long long long ptr ptr long long) +@ stdcall -stub D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) +@ stdcall -stub D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) +@ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long) +@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr) +@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr) @ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr) @ stdcall D3DXMatrixDeterminant(ptr) @ stdcall D3DXMatrixInverse(ptr ptr ptr) @@ -205,106 +205,106 @@ @ stdcall D3DXMatrixLookAtRH(ptr ptr ptr ptr) @ stdcall D3DXMatrixMultiply(ptr ptr ptr) @ stdcall D3DXMatrixMultiplyTranspose(ptr ptr ptr) -@ stdcall D3DXMatrixOrthoLH(ptr long long long long) -@ stdcall D3DXMatrixOrthoOffCenterLH(ptr long long long long long long) -@ stdcall D3DXMatrixOrthoOffCenterRH(ptr long long long long long long) -@ stdcall D3DXMatrixOrthoRH(ptr long long long long) -@ stdcall D3DXMatrixPerspectiveFovLH(ptr long long long long) -@ stdcall D3DXMatrixPerspectiveFovRH(ptr long long long long) -@ stdcall D3DXMatrixPerspectiveLH(ptr long long long long) -@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr long long long long long long) -@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr long long long long long long) -@ stdcall D3DXMatrixPerspectiveRH(ptr long long long long) +@ stdcall D3DXMatrixOrthoLH(ptr float float float float) +@ stdcall D3DXMatrixOrthoOffCenterLH(ptr float float float float float float) +@ stdcall D3DXMatrixOrthoOffCenterRH(ptr float float float float float float) +@ stdcall D3DXMatrixOrthoRH(ptr float float float float) +@ stdcall D3DXMatrixPerspectiveFovLH(ptr float float float float) +@ stdcall D3DXMatrixPerspectiveFovRH(ptr float float float float) +@ stdcall D3DXMatrixPerspectiveLH(ptr float float float float) +@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr float float float float float float) +@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr float float float float float float) +@ stdcall D3DXMatrixPerspectiveRH(ptr float float float float) @ stdcall D3DXMatrixReflect(ptr ptr) -@ stdcall D3DXMatrixRotationAxis(ptr ptr long) +@ stdcall D3DXMatrixRotationAxis(ptr ptr float) @ stdcall D3DXMatrixRotationQuaternion(ptr ptr) -@ stdcall D3DXMatrixRotationX(ptr long) -@ stdcall D3DXMatrixRotationY(ptr long) -@ stdcall D3DXMatrixRotationYawPitchRoll(ptr long long long) -@ stdcall D3DXMatrixRotationZ(ptr long) -@ stdcall D3DXMatrixScaling(ptr long long long) +@ stdcall D3DXMatrixRotationX(ptr float) +@ stdcall D3DXMatrixRotationY(ptr float) +@ stdcall D3DXMatrixRotationYawPitchRoll(ptr float float float) +@ stdcall D3DXMatrixRotationZ(ptr float) +@ stdcall D3DXMatrixScaling(ptr float float float) @ stdcall D3DXMatrixShadow(ptr ptr ptr) @ stdcall D3DXMatrixTransformation(ptr ptr ptr ptr ptr ptr ptr) -@ stdcall D3DXMatrixTransformation2D(ptr ptr long ptr ptr long ptr) -@ stdcall D3DXMatrixTranslation(ptr long long long) +@ stdcall D3DXMatrixTransformation2D(ptr ptr float ptr ptr float ptr) +@ stdcall D3DXMatrixTranslation(ptr float float float) @ stdcall D3DXMatrixTranspose(ptr ptr) -@ stub D3DXOptimizeFaces -@ stub D3DXOptimizeVertices +@ stdcall D3DXOptimizeFaces(ptr long long long ptr) +@ stdcall -stub D3DXOptimizeVertices(ptr long long long ptr) @ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) @ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) @ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) @ stdcall D3DXPlaneNormalize(ptr ptr) @ stdcall D3DXPlaneTransform(ptr ptr ptr) @ stdcall D3DXPlaneTransformArray(ptr long ptr long ptr long) -@ stub D3DXPreprocessShader -@ stub D3DXPreprocessShaderFromFileA -@ stub D3DXPreprocessShaderFromFileW -@ stub D3DXPreprocessShaderFromResourceA -@ stub D3DXPreprocessShaderFromResourceW -@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr long long) +@ stdcall D3DXPreprocessShader(ptr long ptr ptr ptr ptr) +@ stdcall D3DXPreprocessShaderFromFileA(str ptr ptr ptr ptr) +@ stdcall D3DXPreprocessShaderFromFileW(wstr ptr ptr ptr ptr) +@ stdcall D3DXPreprocessShaderFromResourceA(long str ptr ptr ptr ptr) +@ stdcall D3DXPreprocessShaderFromResourceW(long wstr ptr ptr ptr ptr) +@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr float float) @ stdcall D3DXQuaternionExp(ptr ptr) @ stdcall D3DXQuaternionInverse(ptr ptr) @ stdcall D3DXQuaternionLn(ptr ptr) @ stdcall D3DXQuaternionMultiply(ptr ptr ptr) @ stdcall D3DXQuaternionNormalize(ptr ptr) -@ stdcall D3DXQuaternionRotationAxis(ptr ptr long) +@ stdcall D3DXQuaternionRotationAxis(ptr ptr float) @ stdcall D3DXQuaternionRotationMatrix(ptr ptr) -@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr long long long) -@ stdcall D3DXQuaternionSlerp(ptr ptr ptr long) -@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr long) -@ stub D3DXQuaternionSquadSetup +@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr float float float) +@ stdcall D3DXQuaternionSlerp(ptr ptr ptr float) +@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr float) +@ stdcall D3DXQuaternionSquadSetup(ptr ptr ptr ptr ptr ptr ptr) @ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr) -@ stub D3DXRectPatchSize -@ stub D3DXSaveMeshHierarchyToFileA -@ stub D3DXSaveMeshHierarchyToFileW -@ stub D3DXSaveMeshToXA -@ stub D3DXSaveMeshToXW -@ stub D3DXSavePRTBufferToFileA -@ stub D3DXSavePRTBufferToFileW -@ stub D3DXSavePRTCompBufferToFileA -@ stub D3DXSavePRTCompBufferToFileW -@ stub D3DXSaveSurfaceToFileA -@ stub D3DXSaveSurfaceToFileInMemory -@ stub D3DXSaveSurfaceToFileW -@ stub D3DXSaveTextureToFileA -@ stub D3DXSaveTextureToFileInMemory -@ stub D3DXSaveTextureToFileW -@ stub D3DXSaveVolumeToFileA -@ stub D3DXSaveVolumeToFileInMemory -@ stub D3DXSaveVolumeToFileW -@ stub D3DXSHAdd -@ stub D3DXSHDot -@ stub D3DXSHEvalConeLight -@ stub D3DXSHEvalDirection -@ stub D3DXSHEvalDirectionalLight -@ stub D3DXSHEvalHemisphereLight -@ stub D3DXSHEvalSphericalLight -@ stub D3DXSHMultiply2 -@ stub D3DXSHMultiply3 -@ stub D3DXSHMultiply4 -@ stub D3DXSHMultiply5 -@ stub D3DXSHMultiply6 -@ stub D3DXSHProjectCubeMap -@ stub D3DXSHPRTCompSplitMeshSC -@ stub D3DXSHPRTCompSuperCluster -@ stub D3DXSHRotate -@ stub D3DXSHRotateZ -@ stub D3DXSHScale -@ stub D3DXSimplifyMesh -@ stdcall D3DXSphereBoundProbe(ptr long ptr ptr) -@ stub D3DXSplitMesh -@ stub D3DXTessellateNPatches -@ stub D3DXTessellateRectPatch -@ stub D3DXTessellateTriPatch -@ stub D3DXTriPatchSize -@ stub D3DXUVAtlasCreate -@ stub D3DXUVAtlasPack -@ stub D3DXUVAtlasPartition -@ stub D3DXValidMesh -@ stub D3DXValidPatchMesh -@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr long long) -@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr long) -@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr long) +@ stdcall -stub D3DXRectPatchSize(ptr ptr ptr) +@ stdcall -stub D3DXSaveMeshHierarchyToFileA(ptr long ptr ptr ptr) +@ stdcall -stub D3DXSaveMeshHierarchyToFileW(ptr long ptr ptr ptr) +@ stdcall -stub D3DXSaveMeshToXA(ptr ptr ptr ptr ptr long long) +@ stdcall -stub D3DXSaveMeshToXW(ptr ptr ptr ptr ptr long long) +@ stdcall -stub D3DXSavePRTBufferToFileA(ptr ptr) +@ stdcall -stub D3DXSavePRTBufferToFileW(ptr ptr) +@ stdcall -stub D3DXSavePRTCompBufferToFileA(ptr ptr) +@ stdcall -stub D3DXSavePRTCompBufferToFileW(ptr ptr) +@ stdcall D3DXSaveSurfaceToFileA(ptr long ptr ptr ptr) +@ stdcall D3DXSaveSurfaceToFileInMemory(ptr long ptr ptr ptr) +@ stdcall D3DXSaveSurfaceToFileW(ptr long ptr ptr ptr) +@ stdcall D3DXSaveTextureToFileA(ptr long ptr ptr) +@ stdcall D3DXSaveTextureToFileInMemory(ptr long ptr ptr) +@ stdcall D3DXSaveTextureToFileW(ptr long ptr ptr) +@ stdcall -stub D3DXSaveVolumeToFileA(ptr long ptr ptr ptr) +@ stdcall -stub D3DXSaveVolumeToFileInMemory(ptr long ptr ptr ptr) +@ stdcall -stub D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) +@ stdcall D3DXSHAdd(ptr long ptr ptr) +@ stdcall D3DXSHDot(long ptr ptr) +@ stdcall D3DXSHEvalConeLight(long ptr float float float float ptr ptr ptr) +@ stdcall D3DXSHEvalDirection(ptr long ptr) +@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) +@ stdcall D3DXSHEvalHemisphereLight(long ptr int128 int128 ptr ptr ptr) +@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) +@ stdcall D3DXSHMultiply2(ptr ptr ptr) +@ stdcall D3DXSHMultiply3(ptr ptr ptr) +@ stdcall D3DXSHMultiply4(ptr ptr ptr) +@ stdcall -stub D3DXSHMultiply5(ptr ptr ptr) +@ stdcall -stub D3DXSHMultiply6(ptr ptr ptr) +@ stdcall -stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr) +@ stdcall -stub D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) +@ stdcall -stub D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr) +@ stdcall D3DXSHRotate(ptr long ptr ptr) +@ stdcall D3DXSHRotateZ(ptr long float ptr) +@ stdcall D3DXSHScale(ptr long ptr float) +@ stdcall -stub D3DXSimplifyMesh(ptr ptr ptr ptr long long ptr) +@ stdcall D3DXSphereBoundProbe(ptr float ptr ptr) +@ stdcall -stub D3DXSplitMesh(ptr ptr long long ptr ptr ptr ptr ptr) +@ stdcall -stub D3DXTessellateNPatches(ptr ptr long long ptr ptr) +@ stdcall -stub D3DXTessellateRectPatch(ptr ptr ptr ptr ptr) +@ stdcall -stub D3DXTessellateTriPatch(ptr ptr ptr ptr ptr) +@ stdcall -stub D3DXTriPatchSize(ptr ptr ptr) +@ stdcall -stub D3DXUVAtlasCreate(ptr long long long long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr) +@ stdcall -stub D3DXUVAtlasPack(ptr long long long long ptr ptr long ptr long ptr) +@ stdcall -stub D3DXUVAtlasPartition(ptr long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr ptr) +@ stdcall D3DXValidMesh(ptr ptr ptr) +@ stdcall -stub D3DXValidPatchMesh(ptr ptr ptr ptr) +@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr float float) +@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr float) +@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr float) @ stdcall D3DXVec2Normalize(ptr ptr) @ stdcall D3DXVec2Transform(ptr ptr ptr) @ stdcall D3DXVec2TransformArray(ptr long ptr long ptr long) @@ -312,9 +312,9 @@ @ stdcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long) @ stdcall D3DXVec2TransformNormal(ptr ptr ptr) @ stdcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long) -@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long) -@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr long) -@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long) +@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr float float) +@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr float) +@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr float) @ stdcall D3DXVec3Normalize(ptr ptr) @ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) @ stdcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long) @@ -326,11 +326,11 @@ @ stdcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long) @ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) @ stdcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long) -@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr long long) -@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr long) +@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr float float) +@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr float) @ stdcall D3DXVec4Cross(ptr ptr ptr ptr) -@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr long) +@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr float) @ stdcall D3DXVec4Normalize(ptr ptr) @ stdcall D3DXVec4Transform(ptr ptr ptr) @ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long) -@ stub D3DXWeldVertices +@ stdcall D3DXWeldVertices(ptr long ptr ptr ptr ptr ptr) diff --git a/dll/directx/wine/d3dx9_36/d3dx9_36_main.c b/dll/directx/wine/d3dx9_36/d3dx9_36_main.c index 6bc93a7302e..4980f7dd446 100644 --- a/dll/directx/wine/d3dx9_36/d3dx9_36_main.c +++ b/dll/directx/wine/d3dx9_36/d3dx9_36_main.c @@ -49,8 +49,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } @@ -80,7 +78,7 @@ BOOL WINAPI D3DXDebugMute(BOOL mute) * D3DXGetDriverLevel. * Returns always 900 (DX 9) for us */ -UINT WINAPI D3DXGetDriverLevel(LPDIRECT3DDEVICE9 device) +UINT WINAPI D3DXGetDriverLevel(struct IDirect3DDevice9 *device) { return 900; } diff --git a/dll/directx/wine/d3dx9_36/d3dx9_36_private.h b/dll/directx/wine/d3dx9_36/d3dx9_36_private.h index ff396b48bc8..9a1a6ab40f0 100644 --- a/dll/directx/wine/d3dx9_36/d3dx9_36_private.h +++ b/dll/directx/wine/d3dx9_36/d3dx9_36_private.h @@ -36,103 +36,81 @@ #include #include -/* for internal use */ -typedef enum _FormatType { - FORMAT_ARGB, /* unsigned */ - FORMAT_UNKNOWN -} FormatType; +#define ARRAY_SIZE(array) (sizeof(array)/sizeof(*array)) -typedef struct _PixelFormatDesc { +struct vec4 +{ + float x, y, z, w; +}; + +struct volume +{ + UINT width; + UINT height; + UINT depth; +}; + +/* for internal use */ +enum format_type { + FORMAT_ARGB, /* unsigned */ + FORMAT_ARGBF16,/* float 16 */ + FORMAT_ARGBF, /* float */ + FORMAT_DXT, + FORMAT_INDEX, + FORMAT_UNKNOWN +}; + +struct pixel_format_desc { D3DFORMAT format; BYTE bits[4]; BYTE shift[4]; UINT bytes_per_pixel; - FormatType type; -} PixelFormatDesc; + UINT block_width; + UINT block_height; + UINT block_byte_count; + enum format_type type; + void (*from_rgba)(const struct vec4 *src, struct vec4 *dst); + void (*to_rgba)(const struct vec4 *src, struct vec4 *dst, const PALETTEENTRY *palette); +}; -HRESULT map_view_of_file(LPCWSTR filename, LPVOID *buffer, DWORD *length); -HRESULT load_resource_into_memory(HMODULE module, HRSRC resinfo, LPVOID *buffer, DWORD *length); +HRESULT map_view_of_file(const WCHAR *filename, void **buffer, DWORD *length) DECLSPEC_HIDDEN; +HRESULT load_resource_into_memory(HMODULE module, HRSRC resinfo, LPVOID *buffer, DWORD *length) DECLSPEC_HIDDEN; -const PixelFormatDesc *get_format_info(D3DFORMAT format); +HRESULT write_buffer_to_file(const WCHAR *filename, ID3DXBuffer *buffer) DECLSPEC_HIDDEN; +const struct pixel_format_desc *get_format_info(D3DFORMAT format) DECLSPEC_HIDDEN; +const struct pixel_format_desc *get_format_info_idx(int idx) DECLSPEC_HIDDEN; -extern const ID3DXBufferVtbl D3DXBuffer_Vtbl; +void copy_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pitch, + BYTE *dst, UINT dst_row_pitch, UINT dst_slice_pitch, const struct volume *size, + const struct pixel_format_desc *format) DECLSPEC_HIDDEN; +void convert_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pitch, + const struct volume *src_size, const struct pixel_format_desc *src_format, + BYTE *dst, UINT dst_row_pitch, UINT dst_slice_pitch, const struct volume *dst_size, + const struct pixel_format_desc *dst_format, D3DCOLOR color_key, const PALETTEENTRY *palette) DECLSPEC_HIDDEN; +void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pitch, + const struct volume *src_size, const struct pixel_format_desc *src_format, + BYTE *dst, UINT dst_row_pitch, UINT dst_slice_pitch, const struct volume *dst_size, + const struct pixel_format_desc *dst_format, D3DCOLOR color_key, const PALETTEENTRY *palette) DECLSPEC_HIDDEN; -/* ID3DXBUFFER */ -typedef struct ID3DXBufferImpl -{ - /* IUnknown fields */ - const ID3DXBufferVtbl *lpVtbl; - LONG ref; +HRESULT load_texture_from_dds(IDirect3DTexture9 *texture, const void *src_data, const PALETTEENTRY *palette, + DWORD filter, D3DCOLOR color_key, const D3DXIMAGE_INFO *src_info) DECLSPEC_HIDDEN; +HRESULT load_cube_texture_from_dds(IDirect3DCubeTexture9 *cube_texture, const void *src_data, + const PALETTEENTRY *palette, DWORD filter, D3DCOLOR color_key, const D3DXIMAGE_INFO *src_info) DECLSPEC_HIDDEN; +HRESULT load_volume_from_dds(IDirect3DVolume9 *dst_volume, const PALETTEENTRY *dst_palette, + const D3DBOX *dst_box, const void *src_data, const D3DBOX *src_box, DWORD filter, D3DCOLOR color_key, + const D3DXIMAGE_INFO *src_info) DECLSPEC_HIDDEN; +HRESULT load_volume_texture_from_dds(IDirect3DVolumeTexture9 *volume_texture, const void *src_data, + const PALETTEENTRY *palette, DWORD filter, DWORD color_key, const D3DXIMAGE_INFO *src_info) DECLSPEC_HIDDEN; - /* ID3DXBuffer fields */ - DWORD *buffer; - DWORD bufferSize; -} ID3DXBufferImpl; +unsigned short float_32_to_16(const float in) DECLSPEC_HIDDEN; +/* debug helpers */ +const char *debug_d3dxparameter_class(D3DXPARAMETER_CLASS c) DECLSPEC_HIDDEN; +const char *debug_d3dxparameter_type(D3DXPARAMETER_TYPE t) DECLSPEC_HIDDEN; +const char *debug_d3dxparameter_registerset(D3DXREGISTER_SET r) DECLSPEC_HIDDEN; -/* ID3DXFont */ -typedef struct ID3DXFontImpl -{ - /* IUnknown fields */ - const ID3DXFontVtbl *lpVtbl; - LONG ref; - - /* ID3DXFont fields */ - IDirect3DDevice9 *device; - D3DXFONT_DESCW desc; - - HDC hdc; - HFONT hfont; -} ID3DXFontImpl; - -/* ID3DXMatrixStack */ -typedef struct ID3DXMatrixStackImpl -{ - /* IUnknown fields */ - const ID3DXMatrixStackVtbl *lpVtbl; - LONG ref; - - /* ID3DXMatrixStack fields */ - unsigned int current; - unsigned int stack_size; - D3DXMATRIX *stack; -} ID3DXMatrixStackImpl; - -/*ID3DXSprite */ -typedef struct _SPRITE { - LPDIRECT3DTEXTURE9 texture; - UINT texw, texh; - RECT rect; - D3DXVECTOR3 center; - D3DXVECTOR3 pos; - D3DCOLOR color; -} SPRITE; - -typedef struct ID3DXSpriteImpl -{ - /* IUnknown fields */ - const ID3DXSpriteVtbl *lpVtbl; - LONG ref; - - /* ID3DXSprite fields */ - IDirect3DDevice9 *device; - IDirect3DVertexDeclaration9 *vdecl; - IDirect3DStateBlock9 *stateblock; - D3DXMATRIX transform; - D3DXMATRIX view; - DWORD flags; - BOOL ready; - - /* Store the relevant caps to prevent multiple GetDeviceCaps calls */ - DWORD texfilter_caps; - DWORD maxanisotropy; - DWORD alphacmp_caps; - - SPRITE *sprites; - int sprite_count; /* number of sprites to be drawn */ - int allocated_sprites; /* number of (pre-)allocated sprites */ -} ID3DXSpriteImpl; - +/* parameter type conversion helpers */ +void set_number(LPVOID outdata, D3DXPARAMETER_TYPE outtype, LPCVOID indata, D3DXPARAMETER_TYPE intype) DECLSPEC_HIDDEN; #endif /* __WINE_D3DX9_36_PRIVATE_H */ diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c new file mode 100644 index 00000000000..465d96a44b6 --- /dev/null +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -0,0 +1,5727 @@ +/* + * Copyright 2010 Christian Costa + * Copyright 2011 Rico Schأ¼ller + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" +#include "wine/port.h" +#define NONAMELESSUNION +#include "wine/debug.h" +#include "wine/unicode.h" + +#include "windef.h" +#include "wingdi.h" +#include "d3dx9_36_private.h" + +/* Constants for special INT/FLOAT conversation */ +#define INT_FLOAT_MULTI 255.0f +#define INT_FLOAT_MULTI_INVERSE (1/INT_FLOAT_MULTI) + +WINE_DEFAULT_DEBUG_CHANNEL(d3dx); + +enum STATE_CLASS +{ + SC_LIGHTENABLE, + SC_FVF, + SC_LIGHT, + SC_MATERIAL, + SC_NPATCHMODE, + SC_PIXELSHADER, + SC_RENDERSTATE, + SC_SETSAMPLER, + SC_SAMPLERSTATE, + SC_TEXTURE, + SC_TEXTURESTAGE, + SC_TRANSFORM, + SC_VERTEXSHADER, + SC_SHADERCONST, + SC_UNKNOWN, +}; + +enum MATERIAL_TYPE +{ + MT_DIFFUSE, + MT_AMBIENT, + MT_SPECULAR, + MT_EMISSIVE, + MT_POWER, +}; + +enum LIGHT_TYPE +{ + LT_TYPE, + LT_DIFFUSE, + LT_SPECULAR, + LT_AMBIENT, + LT_POSITION, + LT_DIRECTION, + LT_RANGE, + LT_FALLOFF, + LT_ATTENUATION0, + LT_ATTENUATION1, + LT_ATTENUATION2, + LT_THETA, + LT_PHI, +}; + +enum SHADER_CONSTANT_TYPE +{ + SCT_VSFLOAT, + SCT_VSBOOL, + SCT_VSINT, + SCT_PSFLOAT, + SCT_PSBOOL, + SCT_PSINT, +}; + +enum STATE_TYPE +{ + ST_CONSTANT, + ST_PARAMETER, + ST_FXLC, +}; + +struct d3dx_parameter +{ + char *name; + char *semantic; + void *data; + D3DXPARAMETER_CLASS class; + D3DXPARAMETER_TYPE type; + UINT rows; + UINT columns; + UINT element_count; + UINT annotation_count; + UINT member_count; + DWORD flags; + UINT bytes; + + struct d3dx_parameter *annotations; + struct d3dx_parameter *members; +}; + +struct d3dx_state +{ + UINT operation; + UINT index; + enum STATE_TYPE type; + struct d3dx_parameter *parameter; +}; + +struct d3dx_sampler +{ + UINT state_count; + struct d3dx_state *states; +}; + +struct d3dx_pass +{ + char *name; + UINT state_count; + UINT annotation_count; + + struct d3dx_state *states; + struct d3dx_parameter *annotations; +}; + +struct d3dx_technique +{ + char *name; + UINT pass_count; + UINT annotation_count; + + struct d3dx_parameter *annotations; + struct d3dx_pass *passes; +}; + +struct d3dx9_base_effect +{ + struct ID3DXEffectImpl *effect; + + UINT parameter_count; + UINT technique_count; + + struct d3dx_parameter *parameters; + struct d3dx_technique *techniques; +}; + +struct ID3DXEffectImpl +{ + ID3DXEffect ID3DXEffect_iface; + LONG ref; + + struct d3dx9_base_effect base_effect; + + struct ID3DXEffectStateManager *manager; + struct IDirect3DDevice9 *device; + struct ID3DXEffectPool *pool; + struct d3dx_technique *active_technique; + struct d3dx_pass *active_pass; + BOOL started; + DWORD flags; +}; + +struct ID3DXEffectCompilerImpl +{ + ID3DXEffectCompiler ID3DXEffectCompiler_iface; + LONG ref; + + struct d3dx9_base_effect base_effect; +}; + +static struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base, + struct d3dx_parameter *parameter, const char *name); +static struct d3dx_parameter *get_annotation_by_name(UINT count, struct d3dx_parameter *parameters, + const char *name); +static HRESULT d3dx9_parse_state(struct d3dx_state *state, const char *data, const char **ptr, D3DXHANDLE *objects); +static void free_parameter_state(struct d3dx_parameter *param, BOOL element, BOOL child, enum STATE_TYPE st); + +static const struct +{ + enum STATE_CLASS class; + UINT op; + const char *name; +} +state_table[] = +{ + /* Render sates */ + {SC_RENDERSTATE, D3DRS_ZENABLE, "D3DRS_ZENABLE"}, /* 0x0 */ + {SC_RENDERSTATE, D3DRS_FILLMODE, "D3DRS_FILLMODE"}, + {SC_RENDERSTATE, D3DRS_SHADEMODE, "D3DRS_SHADEMODE"}, + {SC_RENDERSTATE, D3DRS_ZWRITEENABLE, "D3DRS_ZWRITEENABLE"}, + {SC_RENDERSTATE, D3DRS_ALPHATESTENABLE, "D3DRS_ALPHATESTENABLE"}, + {SC_RENDERSTATE, D3DRS_LASTPIXEL, "D3DRS_LASTPIXEL"}, + {SC_RENDERSTATE, D3DRS_SRCBLEND, "D3DRS_SRCBLEND"}, + {SC_RENDERSTATE, D3DRS_DESTBLEND, "D3DRS_DESTBLEND"}, + {SC_RENDERSTATE, D3DRS_CULLMODE, "D3DRS_CULLMODE"}, + {SC_RENDERSTATE, D3DRS_ZFUNC, "D3DRS_ZFUNC"}, + {SC_RENDERSTATE, D3DRS_ALPHAREF, "D3DRS_ALPHAREF"}, + {SC_RENDERSTATE, D3DRS_ALPHAFUNC, "D3DRS_ALPHAFUNC"}, + {SC_RENDERSTATE, D3DRS_DITHERENABLE, "D3DRS_DITHERENABLE"}, + {SC_RENDERSTATE, D3DRS_ALPHABLENDENABLE, "D3DRS_ALPHABLENDENABLE"}, + {SC_RENDERSTATE, D3DRS_FOGENABLE, "D3DRS_FOGENABLE"}, + {SC_RENDERSTATE, D3DRS_SPECULARENABLE, "D3DRS_SPECULARENABLE"}, + {SC_RENDERSTATE, D3DRS_FOGCOLOR, "D3DRS_FOGCOLOR"}, /* 0x10 */ + {SC_RENDERSTATE, D3DRS_FOGTABLEMODE, "D3DRS_FOGTABLEMODE"}, + {SC_RENDERSTATE, D3DRS_FOGSTART, "D3DRS_FOGSTART"}, + {SC_RENDERSTATE, D3DRS_FOGEND, "D3DRS_FOGEND"}, + {SC_RENDERSTATE, D3DRS_FOGDENSITY, "D3DRS_FOGDENSITY"}, + {SC_RENDERSTATE, D3DRS_RANGEFOGENABLE, "D3DRS_RANGEFOGENABLE"}, + {SC_RENDERSTATE, D3DRS_STENCILENABLE, "D3DRS_STENCILENABLE"}, + {SC_RENDERSTATE, D3DRS_STENCILFAIL, "D3DRS_STENCILFAIL"}, + {SC_RENDERSTATE, D3DRS_STENCILZFAIL, "D3DRS_STENCILZFAIL"}, + {SC_RENDERSTATE, D3DRS_STENCILPASS, "D3DRS_STENCILPASS"}, + {SC_RENDERSTATE, D3DRS_STENCILFUNC, "D3DRS_STENCILFUNC"}, + {SC_RENDERSTATE, D3DRS_STENCILREF, "D3DRS_STENCILREF"}, + {SC_RENDERSTATE, D3DRS_STENCILMASK, "D3DRS_STENCILMASK"}, + {SC_RENDERSTATE, D3DRS_STENCILWRITEMASK, "D3DRS_STENCILWRITEMASK"}, + {SC_RENDERSTATE, D3DRS_TEXTUREFACTOR, "D3DRS_TEXTUREFACTOR"}, + {SC_RENDERSTATE, D3DRS_WRAP0, "D3DRS_WRAP0"}, + {SC_RENDERSTATE, D3DRS_WRAP1, "D3DRS_WRAP1"}, /* 0x20 */ + {SC_RENDERSTATE, D3DRS_WRAP2, "D3DRS_WRAP2"}, + {SC_RENDERSTATE, D3DRS_WRAP3, "D3DRS_WRAP3"}, + {SC_RENDERSTATE, D3DRS_WRAP4, "D3DRS_WRAP4"}, + {SC_RENDERSTATE, D3DRS_WRAP5, "D3DRS_WRAP5"}, + {SC_RENDERSTATE, D3DRS_WRAP6, "D3DRS_WRAP6"}, + {SC_RENDERSTATE, D3DRS_WRAP7, "D3DRS_WRAP7"}, + {SC_RENDERSTATE, D3DRS_WRAP8, "D3DRS_WRAP8"}, + {SC_RENDERSTATE, D3DRS_WRAP9, "D3DRS_WRAP9"}, + {SC_RENDERSTATE, D3DRS_WRAP10, "D3DRS_WRAP10"}, + {SC_RENDERSTATE, D3DRS_WRAP11, "D3DRS_WRAP11"}, + {SC_RENDERSTATE, D3DRS_WRAP12, "D3DRS_WRAP12"}, + {SC_RENDERSTATE, D3DRS_WRAP13, "D3DRS_WRAP13"}, + {SC_RENDERSTATE, D3DRS_WRAP14, "D3DRS_WRAP14"}, + {SC_RENDERSTATE, D3DRS_WRAP15, "D3DRS_WRAP15"}, + {SC_RENDERSTATE, D3DRS_CLIPPING, "D3DRS_CLIPPING"}, + {SC_RENDERSTATE, D3DRS_LIGHTING, "D3DRS_LIGHTING"}, /* 0x30 */ + {SC_RENDERSTATE, D3DRS_AMBIENT, "D3DRS_AMBIENT"}, + {SC_RENDERSTATE, D3DRS_FOGVERTEXMODE, "D3DRS_FOGVERTEXMODE"}, + {SC_RENDERSTATE, D3DRS_COLORVERTEX, "D3DRS_COLORVERTEX"}, + {SC_RENDERSTATE, D3DRS_LOCALVIEWER, "D3DRS_LOCALVIEWER"}, + {SC_RENDERSTATE, D3DRS_NORMALIZENORMALS, "D3DRS_NORMALIZENORMALS"}, + {SC_RENDERSTATE, D3DRS_DIFFUSEMATERIALSOURCE, "D3DRS_DIFFUSEMATERIALSOURCE"}, + {SC_RENDERSTATE, D3DRS_SPECULARMATERIALSOURCE, "D3DRS_SPECULARMATERIALSOURCE"}, + {SC_RENDERSTATE, D3DRS_AMBIENTMATERIALSOURCE, "D3DRS_AMBIENTMATERIALSOURCE"}, + {SC_RENDERSTATE, D3DRS_EMISSIVEMATERIALSOURCE, "D3DRS_EMISSIVEMATERIALSOURCE"}, + {SC_RENDERSTATE, D3DRS_VERTEXBLEND, "D3DRS_VERTEXBLEND"}, + {SC_RENDERSTATE, D3DRS_CLIPPLANEENABLE, "D3DRS_CLIPPLANEENABLE"}, + {SC_RENDERSTATE, D3DRS_POINTSIZE, "D3DRS_POINTSIZE"}, + {SC_RENDERSTATE, D3DRS_POINTSIZE_MIN, "D3DRS_POINTSIZE_MIN"}, + {SC_RENDERSTATE, D3DRS_POINTSIZE_MAX, "D3DRS_POINTSIZE_MAX"}, + {SC_RENDERSTATE, D3DRS_POINTSPRITEENABLE, "D3DRS_POINTSPRITEENABLE"}, + {SC_RENDERSTATE, D3DRS_POINTSCALEENABLE, "D3DRS_POINTSCALEENABLE"}, /* 0x40 */ + {SC_RENDERSTATE, D3DRS_POINTSCALE_A, "D3DRS_POINTSCALE_A"}, + {SC_RENDERSTATE, D3DRS_POINTSCALE_B, "D3DRS_POINTSCALE_B"}, + {SC_RENDERSTATE, D3DRS_POINTSCALE_C, "D3DRS_POINTSCALE_C"}, + {SC_RENDERSTATE, D3DRS_MULTISAMPLEANTIALIAS, "D3DRS_MULTISAMPLEANTIALIAS"}, + {SC_RENDERSTATE, D3DRS_MULTISAMPLEMASK, "D3DRS_MULTISAMPLEMASK"}, + {SC_RENDERSTATE, D3DRS_PATCHEDGESTYLE, "D3DRS_PATCHEDGESTYLE"}, + {SC_RENDERSTATE, D3DRS_DEBUGMONITORTOKEN, "D3DRS_DEBUGMONITORTOKEN"}, + {SC_RENDERSTATE, D3DRS_INDEXEDVERTEXBLENDENABLE, "D3DRS_INDEXEDVERTEXBLENDENABLE"}, + {SC_RENDERSTATE, D3DRS_COLORWRITEENABLE, "D3DRS_COLORWRITEENABLE"}, + {SC_RENDERSTATE, D3DRS_TWEENFACTOR, "D3DRS_TWEENFACTOR"}, + {SC_RENDERSTATE, D3DRS_BLENDOP, "D3DRS_BLENDOP"}, + {SC_RENDERSTATE, D3DRS_POSITIONDEGREE, "D3DRS_POSITIONDEGREE"}, + {SC_RENDERSTATE, D3DRS_NORMALDEGREE, "D3DRS_NORMALDEGREE"}, + {SC_RENDERSTATE, D3DRS_SCISSORTESTENABLE, "D3DRS_SCISSORTESTENABLE"}, + {SC_RENDERSTATE, D3DRS_SLOPESCALEDEPTHBIAS, "D3DRS_SLOPESCALEDEPTHBIAS"}, + {SC_RENDERSTATE, D3DRS_ANTIALIASEDLINEENABLE, "D3DRS_ANTIALIASEDLINEENABLE"}, /* 0x50 */ + {SC_RENDERSTATE, D3DRS_MINTESSELLATIONLEVEL, "D3DRS_MINTESSELLATIONLEVEL"}, + {SC_RENDERSTATE, D3DRS_MAXTESSELLATIONLEVEL, "D3DRS_MAXTESSELLATIONLEVEL"}, + {SC_RENDERSTATE, D3DRS_ADAPTIVETESS_X, "D3DRS_ADAPTIVETESS_X"}, + {SC_RENDERSTATE, D3DRS_ADAPTIVETESS_Y, "D3DRS_ADAPTIVETESS_Y"}, + {SC_RENDERSTATE, D3DRS_ADAPTIVETESS_Z, "D3DRS_ADAPTIVETESS_Z"}, + {SC_RENDERSTATE, D3DRS_ADAPTIVETESS_W, "D3DRS_ADAPTIVETESS_W"}, + {SC_RENDERSTATE, D3DRS_ENABLEADAPTIVETESSELLATION, "D3DRS_ENABLEADAPTIVETESSELLATION"}, + {SC_RENDERSTATE, D3DRS_TWOSIDEDSTENCILMODE, "D3DRS_TWOSIDEDSTENCILMODE"}, + {SC_RENDERSTATE, D3DRS_CCW_STENCILFAIL, "D3DRS_CCW_STENCILFAIL"}, + {SC_RENDERSTATE, D3DRS_CCW_STENCILZFAIL, "D3DRS_CCW_STENCILZFAIL"}, + {SC_RENDERSTATE, D3DRS_CCW_STENCILPASS, "D3DRS_CCW_STENCILPASS"}, + {SC_RENDERSTATE, D3DRS_CCW_STENCILFUNC, "D3DRS_CCW_STENCILFUNC"}, + {SC_RENDERSTATE, D3DRS_COLORWRITEENABLE1, "D3DRS_COLORWRITEENABLE1"}, + {SC_RENDERSTATE, D3DRS_COLORWRITEENABLE2, "D3DRS_COLORWRITEENABLE2"}, + {SC_RENDERSTATE, D3DRS_COLORWRITEENABLE3, "D3DRS_COLORWRITEENABLE3"}, + {SC_RENDERSTATE, D3DRS_BLENDFACTOR, "D3DRS_BLENDFACTOR"}, /* 0x60 */ + {SC_RENDERSTATE, D3DRS_SRGBWRITEENABLE, "D3DRS_SRGBWRITEENABLE"}, + {SC_RENDERSTATE, D3DRS_DEPTHBIAS, "D3DRS_DEPTHBIAS"}, + {SC_RENDERSTATE, D3DRS_SEPARATEALPHABLENDENABLE, "D3DRS_SEPARATEALPHABLENDENABLE"}, + {SC_RENDERSTATE, D3DRS_SRCBLENDALPHA, "D3DRS_SRCBLENDALPHA"}, + {SC_RENDERSTATE, D3DRS_DESTBLENDALPHA, "D3DRS_DESTBLENDALPHA"}, + {SC_RENDERSTATE, D3DRS_BLENDOPALPHA, "D3DRS_BLENDOPALPHA"}, + /* Texture stages */ + {SC_TEXTURESTAGE, D3DTSS_COLOROP, "D3DTSS_COLOROP"}, + {SC_TEXTURESTAGE, D3DTSS_COLORARG0, "D3DTSS_COLORARG0"}, + {SC_TEXTURESTAGE, D3DTSS_COLORARG1, "D3DTSS_COLORARG1"}, + {SC_TEXTURESTAGE, D3DTSS_COLORARG2, "D3DTSS_COLORARG2"}, + {SC_TEXTURESTAGE, D3DTSS_ALPHAOP, "D3DTSS_ALPHAOP"}, + {SC_TEXTURESTAGE, D3DTSS_ALPHAARG0, "D3DTSS_ALPHAARG0"}, + {SC_TEXTURESTAGE, D3DTSS_ALPHAARG1, "D3DTSS_ALPHAARG1"}, + {SC_TEXTURESTAGE, D3DTSS_ALPHAARG2, "D3DTSS_ALPHAARG2"}, + {SC_TEXTURESTAGE, D3DTSS_RESULTARG, "D3DTSS_RESULTARG"}, + {SC_TEXTURESTAGE, D3DTSS_BUMPENVMAT00, "D3DTSS_BUMPENVMAT00"}, /* 0x70 */ + {SC_TEXTURESTAGE, D3DTSS_BUMPENVMAT01, "D3DTSS_BUMPENVMAT01"}, + {SC_TEXTURESTAGE, D3DTSS_BUMPENVMAT10, "D3DTSS_BUMPENVMAT10"}, + {SC_TEXTURESTAGE, D3DTSS_BUMPENVMAT11, "D3DTSS_BUMPENVMAT11"}, + {SC_TEXTURESTAGE, D3DTSS_TEXCOORDINDEX, "D3DTSS_TEXCOORDINDEX"}, + {SC_TEXTURESTAGE, D3DTSS_BUMPENVLSCALE, "D3DTSS_BUMPENVLSCALE"}, + {SC_TEXTURESTAGE, D3DTSS_BUMPENVLOFFSET, "D3DTSS_BUMPENVLOFFSET"}, + {SC_TEXTURESTAGE, D3DTSS_TEXTURETRANSFORMFLAGS, "D3DTSS_TEXTURETRANSFORMFLAGS"}, + {SC_TEXTURESTAGE, D3DTSS_CONSTANT, "D3DTSS_CONSTANT"}, + /* NPatchMode */ + {SC_NPATCHMODE, 0, "NPatchMode"}, + /* FVF */ + {SC_FVF, 0, "FVF"}, + /* Transform */ + {SC_TRANSFORM, D3DTS_PROJECTION, "D3DTS_PROJECTION"}, + {SC_TRANSFORM, D3DTS_VIEW, "D3DTS_VIEW"}, + {SC_TRANSFORM, D3DTS_WORLD, "D3DTS_WORLD"}, + {SC_TRANSFORM, D3DTS_TEXTURE0, "D3DTS_TEXTURE0"}, + /* Material */ + {SC_MATERIAL, MT_DIFFUSE, "MaterialDiffuse"}, + {SC_MATERIAL, MT_AMBIENT, "MaterialAmbient"}, /* 0x80 */ + {SC_MATERIAL, MT_SPECULAR, "MaterialSpecular"}, + {SC_MATERIAL, MT_EMISSIVE, "MaterialEmissive"}, + {SC_MATERIAL, MT_POWER, "MaterialPower"}, + /* Light */ + {SC_LIGHT, LT_TYPE, "LightType"}, + {SC_LIGHT, LT_DIFFUSE, "LightDiffuse"}, + {SC_LIGHT, LT_SPECULAR, "LightSpecular"}, + {SC_LIGHT, LT_AMBIENT, "LightAmbient"}, + {SC_LIGHT, LT_POSITION, "LightPosition"}, + {SC_LIGHT, LT_DIRECTION, "LightDirection"}, + {SC_LIGHT, LT_RANGE, "LightRange"}, + {SC_LIGHT, LT_FALLOFF, "LightFallOff"}, + {SC_LIGHT, LT_ATTENUATION0, "LightAttenuation0"}, + {SC_LIGHT, LT_ATTENUATION1, "LightAttenuation1"}, + {SC_LIGHT, LT_ATTENUATION2, "LightAttenuation2"}, + {SC_LIGHT, LT_THETA, "LightTheta"}, + {SC_LIGHT, LT_PHI, "LightPhi"}, /* 0x90 */ + /* Ligthenable */ + {SC_LIGHTENABLE, 0, "LightEnable"}, + /* Vertexshader */ + {SC_VERTEXSHADER, 0, "Vertexshader"}, + /* Pixelshader */ + {SC_PIXELSHADER, 0, "Pixelshader"}, + /* Shader constants */ + {SC_SHADERCONST, SCT_VSFLOAT, "VertexShaderConstantF"}, + {SC_SHADERCONST, SCT_VSBOOL, "VertexShaderConstantB"}, + {SC_SHADERCONST, SCT_VSINT, "VertexShaderConstantI"}, + {SC_SHADERCONST, SCT_VSFLOAT, "VertexShaderConstant"}, + {SC_SHADERCONST, SCT_VSFLOAT, "VertexShaderConstant1"}, + {SC_SHADERCONST, SCT_VSFLOAT, "VertexShaderConstant2"}, + {SC_SHADERCONST, SCT_VSFLOAT, "VertexShaderConstant3"}, + {SC_SHADERCONST, SCT_VSFLOAT, "VertexShaderConstant4"}, + {SC_SHADERCONST, SCT_PSFLOAT, "PixelShaderConstantF"}, + {SC_SHADERCONST, SCT_PSBOOL, "PixelShaderConstantB"}, + {SC_SHADERCONST, SCT_PSINT, "PixelShaderConstantI"}, + {SC_SHADERCONST, SCT_PSFLOAT, "PixelShaderConstant"}, + {SC_SHADERCONST, SCT_PSFLOAT, "PixelShaderConstant1"}, /* 0xa0 */ + {SC_SHADERCONST, SCT_PSFLOAT, "PixelShaderConstant2"}, + {SC_SHADERCONST, SCT_PSFLOAT, "PixelShaderConstant3"}, + {SC_SHADERCONST, SCT_PSFLOAT, "PixelShaderConstant4"}, + /* Texture */ + {SC_TEXTURE, 0, "Texture"}, + /* Sampler states */ + {SC_SAMPLERSTATE, D3DSAMP_ADDRESSU, "AddressU"}, + {SC_SAMPLERSTATE, D3DSAMP_ADDRESSV, "AddressV"}, + {SC_SAMPLERSTATE, D3DSAMP_ADDRESSW, "AddressW"}, + {SC_SAMPLERSTATE, D3DSAMP_BORDERCOLOR, "BorderColor"}, + {SC_SAMPLERSTATE, D3DSAMP_MAGFILTER, "MagFilter"}, + {SC_SAMPLERSTATE, D3DSAMP_MINFILTER, "MinFilter"}, + {SC_SAMPLERSTATE, D3DSAMP_MIPFILTER, "MipFilter"}, + {SC_SAMPLERSTATE, D3DSAMP_MIPMAPLODBIAS, "MipMapLodBias"}, + {SC_SAMPLERSTATE, D3DSAMP_MAXMIPLEVEL, "MaxMipLevel"}, + {SC_SAMPLERSTATE, D3DSAMP_MAXANISOTROPY, "MaxAnisotropy"}, + {SC_SAMPLERSTATE, D3DSAMP_SRGBTEXTURE, "SRGBTexture"}, + {SC_SAMPLERSTATE, D3DSAMP_ELEMENTINDEX, "ElementIndex"}, /* 0xb0 */ + {SC_SAMPLERSTATE, D3DSAMP_DMAPOFFSET, "DMAPOffset"}, + /* Set sampler */ + {SC_SETSAMPLER, 0, "Sampler"}, +}; + +static inline void read_dword(const char **ptr, DWORD *d) +{ + memcpy(d, *ptr, sizeof(*d)); + *ptr += sizeof(*d); +} + +static void skip_dword_unknown(const char **ptr, unsigned int count) +{ + unsigned int i; + DWORD d; + + FIXME("Skipping %u unknown DWORDs:\n", count); + for (i = 0; i < count; ++i) + { + read_dword(ptr, &d); + FIXME("\t0x%08x\n", d); + } +} + +static inline struct d3dx_parameter *get_parameter_struct(D3DXHANDLE handle) +{ + return (struct d3dx_parameter *) handle; +} + +static inline D3DXHANDLE get_parameter_handle(struct d3dx_parameter *parameter) +{ + return (D3DXHANDLE) parameter; +} + +static inline D3DXHANDLE get_technique_handle(struct d3dx_technique *technique) +{ + return (D3DXHANDLE) technique; +} + +static inline D3DXHANDLE get_pass_handle(struct d3dx_pass *pass) +{ + return (D3DXHANDLE) pass; +} + +static struct d3dx_technique *get_technique_by_name(struct d3dx9_base_effect *base, const char *name) +{ + UINT i; + + if (!name) return NULL; + + for (i = 0; i < base->technique_count; ++i) + { + if (!strcmp(base->techniques[i].name, name)) + return &base->techniques[i]; + } + + return NULL; +} + +static struct d3dx_technique *get_valid_technique(struct d3dx9_base_effect *base, D3DXHANDLE technique) +{ + unsigned int i; + + for (i = 0; i < base->technique_count; ++i) + { + if (get_technique_handle(&base->techniques[i]) == technique) + return &base->techniques[i]; + } + + return get_technique_by_name(base, technique); +} + +static struct d3dx_pass *get_valid_pass(struct d3dx9_base_effect *base, D3DXHANDLE pass) +{ + unsigned int i, k; + + for (i = 0; i < base->technique_count; ++i) + { + struct d3dx_technique *technique = &base->techniques[i]; + + for (k = 0; k < technique->pass_count; ++k) + { + if (get_pass_handle(&technique->passes[k]) == pass) + return &technique->passes[k]; + } + } + + return NULL; +} + +static struct d3dx_parameter *get_valid_sub_parameter(struct d3dx_parameter *param, D3DXHANDLE parameter) +{ + unsigned int i, count; + struct d3dx_parameter *p; + + for (i = 0; i < param->annotation_count; ++i) + { + if (get_parameter_handle(¶m->annotations[i]) == parameter) + return ¶m->annotations[i]; + + p = get_valid_sub_parameter(¶m->annotations[i], parameter); + if (p) return p; + } + + count = param->element_count ? param->element_count : param->member_count; + for (i = 0; i < count; ++i) + { + if (get_parameter_handle(¶m->members[i]) == parameter) + return ¶m->members[i]; + + p = get_valid_sub_parameter(¶m->members[i], parameter); + if (p) return p; + } + + return NULL; +} + +static struct d3dx_parameter *get_valid_parameter(struct d3dx9_base_effect *base, D3DXHANDLE parameter) +{ + unsigned int i, k, m; + struct d3dx_parameter *p; + + for (i = 0; i < base->parameter_count; ++i) + { + if (get_parameter_handle(&base->parameters[i]) == parameter) + return &base->parameters[i]; + + p = get_valid_sub_parameter(&base->parameters[i], parameter); + if (p) return p; + } + + for (i = 0; i < base->technique_count; ++i) + { + struct d3dx_technique *technique = &base->techniques[i]; + + for (k = 0; k < technique->pass_count; ++k) + { + struct d3dx_pass *pass = &technique->passes[k]; + + for (m = 0; m < pass->annotation_count; ++m) + { + if (get_parameter_handle(&pass->annotations[m]) == parameter) + return &pass->annotations[m]; + + p = get_valid_sub_parameter(&pass->annotations[m], parameter); + if (p) return p; + } + } + + for (k = 0; k < technique->annotation_count; ++k) + { + if (get_parameter_handle(&technique->annotations[k]) == parameter) + return &technique->annotations[k]; + + p = get_valid_sub_parameter(&technique->annotations[k], parameter); + if (p) return p; + } + } + + return get_parameter_by_name(base, NULL, parameter); +} + +static void free_state(struct d3dx_state *state) +{ + free_parameter_state(state->parameter, FALSE, FALSE, state->type); +} + +static void free_sampler(struct d3dx_sampler *sampler) +{ + UINT i; + + for (i = 0; i < sampler->state_count; ++i) + { + free_state(&sampler->states[i]); + } + HeapFree(GetProcessHeap(), 0, sampler->states); +} + +static void free_parameter(struct d3dx_parameter *param, BOOL element, BOOL child) +{ + free_parameter_state(param, element, child, ST_CONSTANT); +} + +static void free_parameter_state(struct d3dx_parameter *param, BOOL element, BOOL child, enum STATE_TYPE st) +{ + unsigned int i; + + TRACE("Free parameter %p, name %s, type %s, child %s, state_type %x\n", param, param->name, + debug_d3dxparameter_type(param->type), child ? "yes" : "no", st); + + if (!param) + return; + + if (param->annotations) + { + for (i = 0; i < param->annotation_count; ++i) + free_parameter(¶m->annotations[i], FALSE, FALSE); + HeapFree(GetProcessHeap(), 0, param->annotations); + param->annotations = NULL; + } + + if (param->members) + { + unsigned int count = param->element_count ? param->element_count : param->member_count; + + for (i = 0; i < count; ++i) + free_parameter(¶m->members[i], param->element_count != 0, TRUE); + HeapFree(GetProcessHeap(), 0, param->members); + param->members = NULL; + } + + if (param->class == D3DXPC_OBJECT && !param->element_count) + { + switch (param->type) + { + case D3DXPT_STRING: + HeapFree(GetProcessHeap(), 0, *(LPSTR *)param->data); + if (!child) HeapFree(GetProcessHeap(), 0, param->data); + break; + + case D3DXPT_TEXTURE: + case D3DXPT_TEXTURE1D: + case D3DXPT_TEXTURE2D: + case D3DXPT_TEXTURE3D: + case D3DXPT_TEXTURECUBE: + case D3DXPT_PIXELSHADER: + case D3DXPT_VERTEXSHADER: + if (st == ST_CONSTANT) + { + if (*(IUnknown **)param->data) IUnknown_Release(*(IUnknown **)param->data); + } + else + { + HeapFree(GetProcessHeap(), 0, *(LPSTR *)param->data); + } + if (!child) HeapFree(GetProcessHeap(), 0, param->data); + break; + + case D3DXPT_SAMPLER: + case D3DXPT_SAMPLER1D: + case D3DXPT_SAMPLER2D: + case D3DXPT_SAMPLER3D: + case D3DXPT_SAMPLERCUBE: + if (st == ST_CONSTANT) + { + free_sampler((struct d3dx_sampler *)param->data); + } + else + { + HeapFree(GetProcessHeap(), 0, *(LPSTR *)param->data); + } + /* samplers have always own data, so free that */ + HeapFree(GetProcessHeap(), 0, param->data); + break; + + default: + FIXME("Unhandled type %s\n", debug_d3dxparameter_type(param->type)); + break; + } + } + else + { + if (!child) + { + if (st != ST_CONSTANT) + { + HeapFree(GetProcessHeap(), 0, *(LPSTR *)param->data); + } + HeapFree(GetProcessHeap(), 0, param->data); + } + } + + /* only the parent has to release name and semantic */ + if (!element) + { + HeapFree(GetProcessHeap(), 0, param->name); + HeapFree(GetProcessHeap(), 0, param->semantic); + } +} + +static void free_pass(struct d3dx_pass *pass) +{ + unsigned int i; + + TRACE("Free pass %p\n", pass); + + if (!pass) + return; + + if (pass->annotations) + { + for (i = 0; i < pass->annotation_count; ++i) + free_parameter(&pass->annotations[i], FALSE, FALSE); + HeapFree(GetProcessHeap(), 0, pass->annotations); + pass->annotations = NULL; + } + + if (pass->states) + { + for (i = 0; i < pass->state_count; ++i) + free_state(&pass->states[i]); + HeapFree(GetProcessHeap(), 0, pass->states); + pass->states = NULL; + } + + HeapFree(GetProcessHeap(), 0, pass->name); + pass->name = NULL; +} + +static void free_technique(struct d3dx_technique *technique) +{ + unsigned int i; + + TRACE("Free technique %p\n", technique); + + if (!technique) + return; + + if (technique->annotations) + { + for (i = 0; i < technique->annotation_count; ++i) + free_parameter(&technique->annotations[i], FALSE, FALSE); + HeapFree(GetProcessHeap(), 0, technique->annotations); + technique->annotations = NULL; + } + + if (technique->passes) + { + for (i = 0; i < technique->pass_count; ++i) + free_pass(&technique->passes[i]); + HeapFree(GetProcessHeap(), 0, technique->passes); + technique->passes = NULL; + } + + HeapFree(GetProcessHeap(), 0, technique->name); + technique->name = NULL; +} + +static void d3dx9_base_effect_cleanup(struct d3dx9_base_effect *base) +{ + unsigned int i; + + TRACE("base %p.\n", base); + + if (base->parameters) + { + for (i = 0; i < base->parameter_count; ++i) + free_parameter(&base->parameters[i], FALSE, FALSE); + HeapFree(GetProcessHeap(), 0, base->parameters); + base->parameters = NULL; + } + + if (base->techniques) + { + for (i = 0; i < base->technique_count; ++i) + free_technique(&base->techniques[i]); + HeapFree(GetProcessHeap(), 0, base->techniques); + base->techniques = NULL; + } +} + +static void free_effect(struct ID3DXEffectImpl *effect) +{ + TRACE("Free effect %p\n", effect); + + d3dx9_base_effect_cleanup(&effect->base_effect); + + if (effect->pool) + { + effect->pool->lpVtbl->Release(effect->pool); + } + + if (effect->manager) + { + IUnknown_Release(effect->manager); + } + + IDirect3DDevice9_Release(effect->device); +} + +static void free_effect_compiler(struct ID3DXEffectCompilerImpl *compiler) +{ + TRACE("Free effect compiler %p\n", compiler); + + d3dx9_base_effect_cleanup(&compiler->base_effect); +} + +static void get_vector(struct d3dx_parameter *param, D3DXVECTOR4 *vector) +{ + UINT i; + + for (i = 0; i < 4; ++i) + { + if (i < param->columns) + set_number((FLOAT *)vector + i, D3DXPT_FLOAT, (DWORD *)param->data + i, param->type); + else + ((FLOAT *)vector)[i] = 0.0f; + } +} + +static void set_vector(struct d3dx_parameter *param, CONST D3DXVECTOR4 *vector) +{ + UINT i; + + for (i = 0; i < param->columns; ++i) + { + set_number((FLOAT *)param->data + i, param->type, (FLOAT *)vector + i, D3DXPT_FLOAT); + } +} + +static void get_matrix(struct d3dx_parameter *param, D3DXMATRIX *matrix, BOOL transpose) +{ + UINT i, k; + + for (i = 0; i < 4; ++i) + { + for (k = 0; k < 4; ++k) + { + FLOAT *tmp = transpose ? (FLOAT *)&matrix->u.m[k][i] : (FLOAT *)&matrix->u.m[i][k]; + + if ((i < param->rows) && (k < param->columns)) + set_number(tmp, D3DXPT_FLOAT, (DWORD *)param->data + i * param->columns + k, param->type); + else + *tmp = 0.0f; + } + } +} + +static void set_matrix(struct d3dx_parameter *param, const D3DXMATRIX *matrix, BOOL transpose) +{ + UINT i, k; + + for (i = 0; i < param->rows; ++i) + { + for (k = 0; k < param->columns; ++k) + { + set_number((FLOAT *)param->data + i * param->columns + k, param->type, + transpose ? &matrix->u.m[k][i] : &matrix->u.m[i][k], D3DXPT_FLOAT); + } + } +} + +static struct d3dx_parameter *get_parameter_element_by_name(struct d3dx_parameter *parameter, const char *name) +{ + UINT element; + struct d3dx_parameter *temp_parameter; + const char *part; + + TRACE("parameter %p, name %s\n", parameter, debugstr_a(name)); + + if (!name || !*name) return NULL; + + element = atoi(name); + part = strchr(name, ']') + 1; + + /* check for empty [] && element range */ + if ((part - name) > 1 && parameter->element_count > element) + { + temp_parameter = ¶meter->members[element]; + + switch (*part++) + { + case '.': + return get_parameter_by_name(NULL, temp_parameter, part); + + case '@': + return get_annotation_by_name(temp_parameter->annotation_count, temp_parameter->annotations, part); + + case '\0': + TRACE("Returning parameter %p\n", temp_parameter); + return temp_parameter; + + default: + FIXME("Unhandled case \"%c\"\n", *--part); + break; + } + } + + TRACE("Parameter not found\n"); + return NULL; +} + +static struct d3dx_parameter *get_annotation_by_name(UINT count, struct d3dx_parameter *annotations, + const char *name) +{ + UINT i, length; + struct d3dx_parameter *temp_parameter; + const char *part; + + TRACE("count %u, annotations %p, name %s\n", count, annotations, debugstr_a(name)); + + if (!name || !*name) return NULL; + + length = strcspn( name, "[.@" ); + part = name + length; + + for (i = 0; i < count; ++i) + { + temp_parameter = &annotations[i]; + + if (!strcmp(temp_parameter->name, name)) + { + TRACE("Returning annotation %p\n", temp_parameter); + return temp_parameter; + } + else if (strlen(temp_parameter->name) == length && !strncmp(temp_parameter->name, name, length)) + { + switch (*part++) + { + case '.': + return get_parameter_by_name(NULL, temp_parameter, part); + + case '[': + return get_parameter_element_by_name(temp_parameter, part); + + default: + FIXME("Unhandled case \"%c\"\n", *--part); + break; + } + } + } + + TRACE("Annotation not found\n"); + return NULL; +} + +static struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base, + struct d3dx_parameter *parameter, const char *name) +{ + UINT i, count, length; + struct d3dx_parameter *temp_parameter; + struct d3dx_parameter *parameters; + const char *part; + + TRACE("base %p, parameter %p, name %s\n", base, parameter, debugstr_a(name)); + + if (!name || !*name) return NULL; + + if (!parameter) + { + count = base->parameter_count; + parameters = base->parameters; + } + else + { + count = parameter->member_count; + parameters = parameter->members; + } + + length = strcspn( name, "[.@" ); + part = name + length; + + for (i = 0; i < count; i++) + { + temp_parameter = ¶meters[i]; + + if (!strcmp(temp_parameter->name, name)) + { + TRACE("Returning parameter %p\n", temp_parameter); + return temp_parameter; + } + else if (strlen(temp_parameter->name) == length && !strncmp(temp_parameter->name, name, length)) + { + switch (*part++) + { + case '.': + return get_parameter_by_name(NULL, temp_parameter, part); + + case '@': + return get_annotation_by_name(temp_parameter->annotation_count, temp_parameter->annotations, part); + + case '[': + return get_parameter_element_by_name(temp_parameter, part); + + default: + FIXME("Unhandled case \"%c\"\n", *--part); + break; + } + } + } + + TRACE("Parameter not found\n"); + return NULL; +} + +static inline DWORD d3dx9_effect_version(DWORD major, DWORD minor) +{ + return (0xfeff0000 | ((major) << 8) | (minor)); +} + +static HRESULT d3dx9_base_effect_get_desc(struct d3dx9_base_effect *base, D3DXEFFECT_DESC *desc) +{ + if (!desc) + { + WARN("Invalid argument specified.\n"); + return D3DERR_INVALIDCALL; + } + + FIXME("partial stub!\n"); + + /* TODO: add creator and function count. */ + desc->Creator = NULL; + desc->Functions = 0; + desc->Parameters = base->parameter_count; + desc->Techniques = base->technique_count; + + return D3D_OK; +} + +static HRESULT d3dx9_base_effect_get_parameter_desc(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, D3DXPARAMETER_DESC *desc) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (!desc || !param) + { + WARN("Invalid argument specified.\n"); + return D3DERR_INVALIDCALL; + } + + desc->Name = param->name; + desc->Semantic = param->semantic; + desc->Class = param->class; + desc->Type = param->type; + desc->Rows = param->rows; + desc->Columns = param->columns; + desc->Elements = param->element_count; + desc->Annotations = param->annotation_count; + desc->StructMembers = param->member_count; + desc->Flags = param->flags; + desc->Bytes = param->bytes; + + return D3D_OK; +} + +static HRESULT d3dx9_base_effect_get_technique_desc(struct d3dx9_base_effect *base, + D3DXHANDLE technique, D3DXTECHNIQUE_DESC *desc) +{ + struct d3dx_technique *tech = technique ? get_valid_technique(base, technique) : &base->techniques[0]; + + if (!desc || !tech) + { + WARN("Invalid argument specified.\n"); + return D3DERR_INVALIDCALL; + } + + desc->Name = tech->name; + desc->Passes = tech->pass_count; + desc->Annotations = tech->annotation_count; + + return D3D_OK; +} + +static HRESULT d3dx9_base_effect_get_pass_desc(struct d3dx9_base_effect *base, + D3DXHANDLE pass, D3DXPASS_DESC *desc) +{ + struct d3dx_pass *p = get_valid_pass(base, pass); + + if (!desc || !p) + { + WARN("Invalid argument specified.\n"); + return D3DERR_INVALIDCALL; + } + + desc->Name = p->name; + desc->Annotations = p->annotation_count; + + FIXME("Pixel shader and vertex shader are not supported, yet.\n"); + desc->pVertexShaderFunction = NULL; + desc->pPixelShaderFunction = NULL; + + return D3D_OK; +} + +static HRESULT d3dx9_base_effect_get_function_desc(struct d3dx9_base_effect *base, + D3DXHANDLE shader, D3DXFUNCTION_DESC *desc) +{ + FIXME("stub!\n"); + + return E_NOTIMPL; +} + +static D3DXHANDLE d3dx9_base_effect_get_parameter(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, UINT index) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (!parameter) + { + if (index < base->parameter_count) + { + TRACE("Returning parameter %p.\n", &base->parameters[index]); + return get_parameter_handle(&base->parameters[index]); + } + } + else + { + if (param && !param->element_count && index < param->member_count) + { + TRACE("Returning parameter %p.\n", ¶m->members[index]); + return get_parameter_handle(¶m->members[index]); + } + } + + WARN("Invalid argument specified.\n"); + + return NULL; +} + +static D3DXHANDLE d3dx9_base_effect_get_parameter_by_name(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, const char *name) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + D3DXHANDLE handle; + + if (!name) + { + handle = get_parameter_handle(param); + TRACE("Returning parameter %p.\n", handle); + return handle; + } + + handle = get_parameter_handle(get_parameter_by_name(base, param, name)); + TRACE("Returning parameter %p.\n", handle); + + return handle; +} + +static D3DXHANDLE d3dx9_base_effect_get_parameter_by_semantic(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, const char *semantic) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + struct d3dx_parameter *temp_param; + UINT i; + + if (!parameter) + { + for (i = 0; i < base->parameter_count; ++i) + { + temp_param = &base->parameters[i]; + + if (!temp_param->semantic) + { + if (!semantic) + { + TRACE("Returning parameter %p\n", temp_param); + return get_parameter_handle(temp_param); + } + continue; + } + + if (!strcasecmp(temp_param->semantic, semantic)) + { + TRACE("Returning parameter %p\n", temp_param); + return get_parameter_handle(temp_param); + } + } + } + else if (param) + { + for (i = 0; i < param->member_count; ++i) + { + temp_param = ¶m->members[i]; + + if (!temp_param->semantic) + { + if (!semantic) + { + TRACE("Returning parameter %p\n", temp_param); + return get_parameter_handle(temp_param); + } + continue; + } + + if (!strcasecmp(temp_param->semantic, semantic)) + { + TRACE("Returning parameter %p\n", temp_param); + return get_parameter_handle(temp_param); + } + } + } + + WARN("Invalid argument specified\n"); + + return NULL; +} + +static D3DXHANDLE d3dx9_base_effect_get_parameter_element(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, UINT index) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (!param) + { + if (index < base->parameter_count) + { + TRACE("Returning parameter %p.\n", &base->parameters[index]); + return get_parameter_handle(&base->parameters[index]); + } + } + else + { + if (index < param->element_count) + { + TRACE("Returning parameter %p.\n", ¶m->members[index]); + return get_parameter_handle(¶m->members[index]); + } + } + + WARN("Invalid argument specified\n"); + + return NULL; +} + +static D3DXHANDLE d3dx9_base_effect_get_technique(struct d3dx9_base_effect *base, UINT index) +{ + if (index >= base->technique_count) + { + WARN("Invalid argument specified.\n"); + return NULL; + } + + TRACE("Returning technique %p.\n", &base->techniques[index]); + + return get_technique_handle(&base->techniques[index]); +} + +static D3DXHANDLE d3dx9_base_effect_get_technique_by_name(struct d3dx9_base_effect *base, const char *name) +{ + struct d3dx_technique *tech = get_technique_by_name(base, name); + + if (tech) + { + D3DXHANDLE t = get_technique_handle(tech); + TRACE("Returning technique %p\n", t); + return t; + } + + WARN("Invalid argument specified.\n"); + + return NULL; +} + +static D3DXHANDLE d3dx9_base_effect_get_pass(struct d3dx9_base_effect *base, + D3DXHANDLE technique, UINT index) +{ + struct d3dx_technique *tech = get_valid_technique(base, technique); + + if (tech && index < tech->pass_count) + { + TRACE("Returning pass %p\n", &tech->passes[index]); + return get_pass_handle(&tech->passes[index]); + } + + WARN("Invalid argument specified.\n"); + + return NULL; +} + +static D3DXHANDLE d3dx9_base_effect_get_pass_by_name(struct d3dx9_base_effect *base, + D3DXHANDLE technique, const char *name) +{ + struct d3dx_technique *tech = get_valid_technique(base, technique); + + if (tech && name) + { + unsigned int i; + + for (i = 0; i < tech->pass_count; ++i) + { + struct d3dx_pass *pass = &tech->passes[i]; + + if (!strcmp(pass->name, name)) + { + TRACE("Returning pass %p\n", pass); + return get_pass_handle(pass); + } + } + } + + WARN("Invalid argument specified.\n"); + + return NULL; +} + +static D3DXHANDLE d3dx9_base_effect_get_function(struct d3dx9_base_effect *base, UINT index) +{ + FIXME("stub!\n"); + + return NULL; +} + +static D3DXHANDLE d3dx9_base_effect_get_function_by_name(struct d3dx9_base_effect *base, const char *name) +{ + FIXME("stub!\n"); + + return NULL; +} + +static UINT get_annotation_from_object(struct d3dx9_base_effect *base, + D3DXHANDLE object, struct d3dx_parameter **annotations) +{ + struct d3dx_parameter *param = get_valid_parameter(base, object); + struct d3dx_pass *pass = get_valid_pass(base, object); + struct d3dx_technique *technique = get_valid_technique(base, object); + + if (pass) + { + *annotations = pass->annotations; + return pass->annotation_count; + } + else if (technique) + { + *annotations = technique->annotations; + return technique->annotation_count; + } + else if (param) + { + *annotations = param->annotations; + return param->annotation_count; + } + else + { + FIXME("Functions are not handled, yet!\n"); + return 0; + } +} + +static D3DXHANDLE d3dx9_base_effect_get_annotation(struct d3dx9_base_effect *base, + D3DXHANDLE object, UINT index) +{ + struct d3dx_parameter *annotations = NULL; + UINT annotation_count = 0; + + annotation_count = get_annotation_from_object(base, object, &annotations); + + if (index < annotation_count) + { + TRACE("Returning parameter %p\n", &annotations[index]); + return get_parameter_handle(&annotations[index]); + } + + WARN("Invalid argument specified\n"); + + return NULL; +} + +static D3DXHANDLE d3dx9_base_effect_get_annotation_by_name(struct d3dx9_base_effect *base, + D3DXHANDLE object, const char *name) +{ + struct d3dx_parameter *annotation = NULL; + struct d3dx_parameter *annotations = NULL; + UINT annotation_count = 0; + + if (!name) + { + WARN("Invalid argument specified\n"); + return NULL; + } + + annotation_count = get_annotation_from_object(base, object, &annotations); + + annotation = get_annotation_by_name(annotation_count, annotations, name); + if (annotation) + { + TRACE("Returning parameter %p\n", annotation); + return get_parameter_handle(annotation); + } + + WARN("Invalid argument specified\n"); + + return NULL; +} + +static HRESULT d3dx9_base_effect_set_value(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, const void *data, UINT bytes) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (!param) + { + WARN("Invalid parameter %p specified\n", parameter); + return D3DERR_INVALIDCALL; + } + + /* samplers don't touch data */ + if (param->class == D3DXPC_OBJECT && (param->type == D3DXPT_SAMPLER + || param->type == D3DXPT_SAMPLER1D || param->type == D3DXPT_SAMPLER2D + || param->type == D3DXPT_SAMPLER3D || param->type == D3DXPT_SAMPLERCUBE)) + { + TRACE("Sampler: returning E_FAIL\n"); + return E_FAIL; + } + + if (data && param->bytes <= bytes) + { + switch (param->type) + { + case D3DXPT_VOID: + case D3DXPT_BOOL: + case D3DXPT_INT: + case D3DXPT_FLOAT: + TRACE("Copy %u bytes\n", param->bytes); + memcpy(param->data, data, param->bytes); + break; + + default: + FIXME("Unhandled type %s\n", debug_d3dxparameter_type(param->type)); + break; + } + + return D3D_OK; + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_get_value(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, void *data, UINT bytes) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (!param) + { + WARN("Invalid parameter %p specified\n", parameter); + return D3DERR_INVALIDCALL; + } + + /* samplers don't touch data */ + if (param->class == D3DXPC_OBJECT && (param->type == D3DXPT_SAMPLER + || param->type == D3DXPT_SAMPLER1D || param->type == D3DXPT_SAMPLER2D + || param->type == D3DXPT_SAMPLER3D || param->type == D3DXPT_SAMPLERCUBE)) + { + TRACE("Sampler: returning E_FAIL\n"); + return E_FAIL; + } + + if (data && param->bytes <= bytes) + { + TRACE("Type %s\n", debug_d3dxparameter_type(param->type)); + + switch (param->type) + { + case D3DXPT_VOID: + case D3DXPT_BOOL: + case D3DXPT_INT: + case D3DXPT_FLOAT: + case D3DXPT_STRING: + break; + + case D3DXPT_VERTEXSHADER: + case D3DXPT_PIXELSHADER: + case D3DXPT_TEXTURE: + case D3DXPT_TEXTURE1D: + case D3DXPT_TEXTURE2D: + case D3DXPT_TEXTURE3D: + case D3DXPT_TEXTURECUBE: + { + UINT i; + + for (i = 0; i < (param->element_count ? param->element_count : 1); ++i) + { + IUnknown *unk = ((IUnknown **)param->data)[i]; + if (unk) IUnknown_AddRef(unk); + } + break; + } + + default: + FIXME("Unhandled type %s\n", debug_d3dxparameter_type(param->type)); + break; + } + + TRACE("Copy %u bytes\n", param->bytes); + memcpy(data, param->data, param->bytes); + return D3D_OK; + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_set_bool(struct d3dx9_base_effect *base, D3DXHANDLE parameter, BOOL b) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (param && !param->element_count && param->rows == 1 && param->columns == 1) + { + set_number(param->data, param->type, &b, D3DXPT_BOOL); + return D3D_OK; + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_get_bool(struct d3dx9_base_effect *base, D3DXHANDLE parameter, BOOL *b) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (b && param && !param->element_count && param->rows == 1 && param->columns == 1) + { + set_number(b, D3DXPT_BOOL, param->data, param->type); + TRACE("Returning %s\n", *b ? "TRUE" : "FALSE"); + return D3D_OK; + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_set_bool_array(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, const BOOL *b, UINT count) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (param) + { + UINT i, size = min(count, param->bytes / sizeof(DWORD)); + + TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_MATRIX_ROWS: + for (i = 0; i < size; ++i) + { + /* don't crop the input, use D3DXPT_INT instead of D3DXPT_BOOL */ + set_number((DWORD *)param->data + i, param->type, &b[i], D3DXPT_INT); + } + return D3D_OK; + + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_get_bool_array(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, BOOL *b, UINT count) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (b && param && (param->class == D3DXPC_SCALAR + || param->class == D3DXPC_VECTOR + || param->class == D3DXPC_MATRIX_ROWS + || param->class == D3DXPC_MATRIX_COLUMNS)) + { + UINT i, size = min(count, param->bytes / sizeof(DWORD)); + + for (i = 0; i < size; ++i) + { + set_number(&b[i], D3DXPT_BOOL, (DWORD *)param->data + i, param->type); + } + return D3D_OK; + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_set_int(struct d3dx9_base_effect *base, D3DXHANDLE parameter, INT n) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (param && !param->element_count) + { + if (param->rows == 1 && param->columns == 1) + { + set_number(param->data, param->type, &n, D3DXPT_INT); + return D3D_OK; + } + + /* + * Split the value, if parameter is a vector with dimension 3 or 4. + */ + if (param->type == D3DXPT_FLOAT && + ((param->class == D3DXPC_VECTOR && param->columns != 2) || + (param->class == D3DXPC_MATRIX_ROWS && param->rows != 2 && param->columns == 1))) + { + TRACE("Vector fixup\n"); + + *(FLOAT *)param->data = ((n & 0xff0000) >> 16) * INT_FLOAT_MULTI_INVERSE; + ((FLOAT *)param->data)[1] = ((n & 0xff00) >> 8) * INT_FLOAT_MULTI_INVERSE; + ((FLOAT *)param->data)[2] = (n & 0xff) * INT_FLOAT_MULTI_INVERSE; + if (param->rows * param->columns > 3) + { + ((FLOAT *)param->data)[3] = ((n & 0xff000000) >> 24) * INT_FLOAT_MULTI_INVERSE; + } + return D3D_OK; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_get_int(struct d3dx9_base_effect *base, D3DXHANDLE parameter, INT *n) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (n && param && !param->element_count) + { + if (param->columns == 1 && param->rows == 1) + { + set_number(n, D3DXPT_INT, param->data, param->type); + TRACE("Returning %i\n", *n); + return D3D_OK; + } + + if (param->type == D3DXPT_FLOAT && + ((param->class == D3DXPC_VECTOR && param->columns != 2) + || (param->class == D3DXPC_MATRIX_ROWS && param->rows != 2 && param->columns == 1))) + { + TRACE("Vector fixup\n"); + + /* all components (3,4) are clamped (0,255) and put in the INT */ + *n = (INT)(min(max(0.0f, *((FLOAT *)param->data + 2)), 1.0f) * INT_FLOAT_MULTI); + *n += ((INT)(min(max(0.0f, *((FLOAT *)param->data + 1)), 1.0f) * INT_FLOAT_MULTI)) << 8; + *n += ((INT)(min(max(0.0f, *((FLOAT *)param->data + 0)), 1.0f) * INT_FLOAT_MULTI)) << 16; + if (param->columns * param->rows > 3) + { + *n += ((INT)(min(max(0.0f, *((FLOAT *)param->data + 3)), 1.0f) * INT_FLOAT_MULTI)) << 24; + } + + TRACE("Returning %i\n", *n); + return D3D_OK; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_set_int_array(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, const INT *n, UINT count) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (param) + { + UINT i, size = min(count, param->bytes / sizeof(DWORD)); + + TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_MATRIX_ROWS: + for (i = 0; i < size; ++i) + { + set_number((DWORD *)param->data + i, param->type, &n[i], D3DXPT_INT); + } + return D3D_OK; + + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_get_int_array(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, INT *n, UINT count) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (n && param && (param->class == D3DXPC_SCALAR + || param->class == D3DXPC_VECTOR + || param->class == D3DXPC_MATRIX_ROWS + || param->class == D3DXPC_MATRIX_COLUMNS)) + { + UINT i, size = min(count, param->bytes / sizeof(DWORD)); + + for (i = 0; i < size; ++i) + { + set_number(&n[i], D3DXPT_INT, (DWORD *)param->data + i, param->type); + } + return D3D_OK; + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_set_float(struct d3dx9_base_effect *base, D3DXHANDLE parameter, float f) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (param && !param->element_count && param->rows == 1 && param->columns == 1) + { + set_number((DWORD *)param->data, param->type, &f, D3DXPT_FLOAT); + return D3D_OK; + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_get_float(struct d3dx9_base_effect *base, D3DXHANDLE parameter, float *f) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (f && param && !param->element_count && param->columns == 1 && param->rows == 1) + { + set_number(f, D3DXPT_FLOAT, (DWORD *)param->data, param->type); + TRACE("Returning %f\n", *f); + return D3D_OK; + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_set_float_array(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, const float *f, UINT count) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (param) + { + UINT i, size = min(count, param->bytes / sizeof(DWORD)); + + TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_MATRIX_ROWS: + for (i = 0; i < size; ++i) + { + set_number((DWORD *)param->data + i, param->type, &f[i], D3DXPT_FLOAT); + } + return D3D_OK; + + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_get_float_array(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, float *f, UINT count) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (f && param && (param->class == D3DXPC_SCALAR + || param->class == D3DXPC_VECTOR + || param->class == D3DXPC_MATRIX_ROWS + || param->class == D3DXPC_MATRIX_COLUMNS)) + { + UINT i, size = min(count, param->bytes / sizeof(DWORD)); + + for (i = 0; i < size; ++i) + { + set_number(&f[i], D3DXPT_FLOAT, (DWORD *)param->data + i, param->type); + } + return D3D_OK; + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_set_vector(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, const D3DXVECTOR4 *vector) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (param && !param->element_count) + { + TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + if (param->type == D3DXPT_INT && param->bytes == 4) + { + DWORD tmp; + + TRACE("INT fixup\n"); + tmp = (DWORD)(max(min(vector->z, 1.0f), 0.0f) * INT_FLOAT_MULTI); + tmp += ((DWORD)(max(min(vector->y, 1.0f), 0.0f) * INT_FLOAT_MULTI)) << 8; + tmp += ((DWORD)(max(min(vector->x, 1.0f), 0.0f) * INT_FLOAT_MULTI)) << 16; + tmp += ((DWORD)(max(min(vector->w, 1.0f), 0.0f) * INT_FLOAT_MULTI)) << 24; + + *(INT *)param->data = tmp; + return D3D_OK; + } + set_vector(param, vector); + return D3D_OK; + + case D3DXPC_MATRIX_ROWS: + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_get_vector(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, D3DXVECTOR4 *vector) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (vector && param && !param->element_count) + { + TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + if (param->type == D3DXPT_INT && param->bytes == 4) + { + TRACE("INT fixup\n"); + vector->x = (((*(INT *)param->data) & 0xff0000) >> 16) * INT_FLOAT_MULTI_INVERSE; + vector->y = (((*(INT *)param->data) & 0xff00) >> 8) * INT_FLOAT_MULTI_INVERSE; + vector->z = ((*(INT *)param->data) & 0xff) * INT_FLOAT_MULTI_INVERSE; + vector->w = (((*(INT *)param->data) & 0xff000000) >> 24) * INT_FLOAT_MULTI_INVERSE; + return D3D_OK; + } + get_vector(param, vector); + return D3D_OK; + + case D3DXPC_MATRIX_ROWS: + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_set_vector_array(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, const D3DXVECTOR4 *vector, UINT count) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (param && param->element_count && param->element_count >= count) + { + UINT i; + + TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_VECTOR: + for (i = 0; i < count; ++i) + { + set_vector(¶m->members[i], &vector[i]); + } + return D3D_OK; + + case D3DXPC_SCALAR: + case D3DXPC_MATRIX_ROWS: + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_get_vector_array(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, D3DXVECTOR4 *vector, UINT count) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (!count) return D3D_OK; + + if (vector && param && count <= param->element_count) + { + UINT i; + + TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_VECTOR: + for (i = 0; i < count; ++i) + { + get_vector(¶m->members[i], &vector[i]); + } + return D3D_OK; + + case D3DXPC_SCALAR: + case D3DXPC_MATRIX_ROWS: + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_set_matrix(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, const D3DXMATRIX *matrix) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (param && !param->element_count) + { + TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_MATRIX_ROWS: + set_matrix(param, matrix, FALSE); + return D3D_OK; + + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_get_matrix(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, D3DXMATRIX *matrix) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (matrix && param && !param->element_count) + { + TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_MATRIX_ROWS: + get_matrix(param, matrix, FALSE); + return D3D_OK; + + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_set_matrix_array(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (param && param->element_count >= count) + { + UINT i; + + TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_MATRIX_ROWS: + for (i = 0; i < count; ++i) + { + set_matrix(¶m->members[i], &matrix[i], FALSE); + } + return D3D_OK; + + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_get_matrix_array(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, D3DXMATRIX *matrix, UINT count) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (!count) return D3D_OK; + + if (matrix && param && count <= param->element_count) + { + UINT i; + + TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_MATRIX_ROWS: + for (i = 0; i < count; ++i) + { + get_matrix(¶m->members[i], &matrix[i], FALSE); + } + return D3D_OK; + + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_set_matrix_pointer_array(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (param && count <= param->element_count) + { + UINT i; + + switch (param->class) + { + case D3DXPC_MATRIX_ROWS: + for (i = 0; i < count; ++i) + { + set_matrix(¶m->members[i], matrix[i], FALSE); + } + return D3D_OK; + + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_OBJECT: + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_get_matrix_pointer_array(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, D3DXMATRIX **matrix, UINT count) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (!count) return D3D_OK; + + if (param && matrix && count <= param->element_count) + { + UINT i; + + TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_MATRIX_ROWS: + for (i = 0; i < count; ++i) + { + get_matrix(¶m->members[i], matrix[i], FALSE); + } + return D3D_OK; + + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_OBJECT: + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_set_matrix_transpose(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, const D3DXMATRIX *matrix) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (param && !param->element_count) + { + TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_MATRIX_ROWS: + set_matrix(param, matrix, TRUE); + return D3D_OK; + + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_get_matrix_transpose(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, D3DXMATRIX *matrix) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (matrix && param && !param->element_count) + { + TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + get_matrix(param, matrix, FALSE); + return D3D_OK; + + case D3DXPC_MATRIX_ROWS: + get_matrix(param, matrix, TRUE); + return D3D_OK; + + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_set_matrix_transpose_array(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (param && param->element_count >= count) + { + UINT i; + + TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_MATRIX_ROWS: + for (i = 0; i < count; ++i) + { + set_matrix(¶m->members[i], &matrix[i], TRUE); + } + return D3D_OK; + + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_get_matrix_transpose_array(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, D3DXMATRIX *matrix, UINT count) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (!count) return D3D_OK; + + if (matrix && param && count <= param->element_count) + { + UINT i; + + TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_MATRIX_ROWS: + for (i = 0; i < count; ++i) + { + get_matrix(¶m->members[i], &matrix[i], TRUE); + } + return D3D_OK; + + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_OBJECT: + case D3DXPC_STRUCT: + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_set_matrix_transpose_pointer_array(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (param && count <= param->element_count) + { + UINT i; + + switch (param->class) + { + case D3DXPC_MATRIX_ROWS: + for (i = 0; i < count; ++i) + { + set_matrix(¶m->members[i], matrix[i], TRUE); + } + return D3D_OK; + + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_OBJECT: + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_get_matrix_transpose_pointer_array(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, D3DXMATRIX **matrix, UINT count) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (!count) return D3D_OK; + + if (matrix && param && count <= param->element_count) + { + UINT i; + + TRACE("Class %s\n", debug_d3dxparameter_class(param->class)); + + switch (param->class) + { + case D3DXPC_MATRIX_ROWS: + for (i = 0; i < count; ++i) + { + get_matrix(¶m->members[i], matrix[i], TRUE); + } + return D3D_OK; + + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_OBJECT: + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_set_string(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, const char *string) +{ + FIXME("stub!\n"); + + return E_NOTIMPL; +} + +static HRESULT d3dx9_base_effect_get_string(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, const char **string) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (string && param && !param->element_count && param->type == D3DXPT_STRING) + { + *string = *(LPCSTR *)param->data; + TRACE("Returning %s\n", debugstr_a(*string)); + return D3D_OK; + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_set_texture(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (param && !param->element_count && + (param->type == D3DXPT_TEXTURE || param->type == D3DXPT_TEXTURE1D + || param->type == D3DXPT_TEXTURE2D || param->type == D3DXPT_TEXTURE3D + || param->type == D3DXPT_TEXTURECUBE)) + { + struct IDirect3DBaseTexture9 *oltexture = *(struct IDirect3DBaseTexture9 **)param->data; + + if (texture) IDirect3DBaseTexture9_AddRef(texture); + if (oltexture) IDirect3DBaseTexture9_Release(oltexture); + + *(struct IDirect3DBaseTexture9 **)param->data = texture; + + return D3D_OK; + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_get_texture(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, struct IDirect3DBaseTexture9 **texture) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (texture && param && !param->element_count && + (param->type == D3DXPT_TEXTURE || param->type == D3DXPT_TEXTURE1D + || param->type == D3DXPT_TEXTURE2D || param->type == D3DXPT_TEXTURE3D + || param->type == D3DXPT_TEXTURECUBE)) + { + *texture = *(struct IDirect3DBaseTexture9 **)param->data; + if (*texture) IDirect3DBaseTexture9_AddRef(*texture); + TRACE("Returning %p\n", *texture); + return D3D_OK; + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_get_pixel_shader(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, struct IDirect3DPixelShader9 **shader) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (shader && param && !param->element_count && param->type == D3DXPT_PIXELSHADER) + { + if ((*shader = *(struct IDirect3DPixelShader9 **)param->data)) + IDirect3DPixelShader9_AddRef(*shader); + TRACE("Returning %p.\n", *shader); + return D3D_OK; + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_get_vertex_shader(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader) +{ + struct d3dx_parameter *param = get_valid_parameter(base, parameter); + + if (shader && param && !param->element_count && param->type == D3DXPT_VERTEXSHADER) + { + if ((*shader = *(struct IDirect3DVertexShader9 **)param->data)) + IDirect3DVertexShader9_AddRef(*shader); + TRACE("Returning %p.\n", *shader); + return D3D_OK; + } + + WARN("Invalid argument specified\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT d3dx9_base_effect_set_array_range(struct d3dx9_base_effect *base, + D3DXHANDLE parameter, UINT start, UINT end) +{ + FIXME("stub!\n"); + + return E_NOTIMPL; +} + +static inline struct ID3DXEffectImpl *impl_from_ID3DXEffect(ID3DXEffect *iface) +{ + return CONTAINING_RECORD(iface, struct ID3DXEffectImpl, ID3DXEffect_iface); +} + +/*** IUnknown methods ***/ +static HRESULT WINAPI ID3DXEffectImpl_QueryInterface(ID3DXEffect *iface, REFIID riid, void **object) +{ + TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), object); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_ID3DXEffect)) + { + iface->lpVtbl->AddRef(iface); + *object = iface; + return S_OK; + } + + ERR("Interface %s not found\n", debugstr_guid(riid)); + + return E_NOINTERFACE; +} + +static ULONG WINAPI ID3DXEffectImpl_AddRef(ID3DXEffect *iface) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + + TRACE("(%p)->(): AddRef from %u\n", This, This->ref); + + return InterlockedIncrement(&This->ref); +} + +static ULONG WINAPI ID3DXEffectImpl_Release(ID3DXEffect *iface) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(): Release from %u\n", This, ref + 1); + + if (!ref) + { + free_effect(This); + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + +/*** ID3DXBaseEffect methods ***/ +static HRESULT WINAPI ID3DXEffectImpl_GetDesc(ID3DXEffect *iface, D3DXEFFECT_DESC *desc) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, desc %p.\n", iface, desc); + + return d3dx9_base_effect_get_desc(&effect->base_effect, desc); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetParameterDesc(ID3DXEffect *iface, + D3DXHANDLE parameter, D3DXPARAMETER_DESC *desc) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, desc %p.\n", iface, parameter, desc); + + return d3dx9_base_effect_get_parameter_desc(&effect->base_effect, parameter, desc); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetTechniqueDesc(ID3DXEffect *iface, + D3DXHANDLE technique, D3DXTECHNIQUE_DESC *desc) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, technique %p, desc %p.\n", iface, technique, desc); + + return d3dx9_base_effect_get_technique_desc(&effect->base_effect, technique, desc); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetPassDesc(ID3DXEffect *iface, D3DXHANDLE pass, D3DXPASS_DESC *desc) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, pass %p, desc %p.\n", iface, pass, desc); + + return d3dx9_base_effect_get_pass_desc(&effect->base_effect, pass, desc); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetFunctionDesc(ID3DXEffect *iface, D3DXHANDLE shader, D3DXFUNCTION_DESC *desc) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, shader %p, desc %p.\n", iface, shader, desc); + + return d3dx9_base_effect_get_function_desc(&effect->base_effect, shader, desc); +} + +static D3DXHANDLE WINAPI ID3DXEffectImpl_GetParameter(ID3DXEffect *iface, D3DXHANDLE parameter, UINT index) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, index %u.\n", iface, parameter, index); + + return d3dx9_base_effect_get_parameter(&effect->base_effect, parameter, index); +} + +static D3DXHANDLE WINAPI ID3DXEffectImpl_GetParameterByName(ID3DXEffect *iface, + D3DXHANDLE parameter, const char *name) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, name %s.\n", iface, parameter, debugstr_a(name)); + + return d3dx9_base_effect_get_parameter_by_name(&effect->base_effect, parameter, name); +} + +static D3DXHANDLE WINAPI ID3DXEffectImpl_GetParameterBySemantic(ID3DXEffect *iface, + D3DXHANDLE parameter, const char *semantic) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, semantic %s.\n", iface, parameter, debugstr_a(semantic)); + + return d3dx9_base_effect_get_parameter_by_semantic(&effect->base_effect, parameter, semantic); +} + +static D3DXHANDLE WINAPI ID3DXEffectImpl_GetParameterElement(ID3DXEffect *iface, D3DXHANDLE parameter, UINT index) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, index %u.\n", iface, parameter, index); + + return d3dx9_base_effect_get_parameter_element(&effect->base_effect, parameter, index); +} + +static D3DXHANDLE WINAPI ID3DXEffectImpl_GetTechnique(ID3DXEffect *iface, UINT index) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, index %u.\n", iface, index); + + return d3dx9_base_effect_get_technique(&effect->base_effect, index); +} + +static D3DXHANDLE WINAPI ID3DXEffectImpl_GetTechniqueByName(ID3DXEffect *iface, const char *name) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, name %s.\n", iface, debugstr_a(name)); + + return d3dx9_base_effect_get_technique_by_name(&effect->base_effect, name); +} + +static D3DXHANDLE WINAPI ID3DXEffectImpl_GetPass(ID3DXEffect *iface, D3DXHANDLE technique, UINT index) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, technique %p, index %u.\n", iface, technique, index); + + return d3dx9_base_effect_get_pass(&effect->base_effect, technique, index); +} + +static D3DXHANDLE WINAPI ID3DXEffectImpl_GetPassByName(ID3DXEffect *iface, + D3DXHANDLE technique, const char *name) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, technique %p, name %s.\n", iface, technique, debugstr_a(name)); + + return d3dx9_base_effect_get_pass_by_name(&effect->base_effect, technique, name); +} + +static D3DXHANDLE WINAPI ID3DXEffectImpl_GetFunction(ID3DXEffect *iface, UINT index) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, index %u.\n", iface, index); + + return d3dx9_base_effect_get_function(&effect->base_effect, index); +} + +static D3DXHANDLE WINAPI ID3DXEffectImpl_GetFunctionByName(ID3DXEffect *iface, const char *name) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, name %s.\n", iface, debugstr_a(name)); + + return d3dx9_base_effect_get_function_by_name(&effect->base_effect, name); +} + +static D3DXHANDLE WINAPI ID3DXEffectImpl_GetAnnotation(ID3DXEffect *iface, D3DXHANDLE object, UINT index) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, object %p, index %u.\n", iface, object, index); + + return d3dx9_base_effect_get_annotation(&effect->base_effect, object, index); +} + +static D3DXHANDLE WINAPI ID3DXEffectImpl_GetAnnotationByName(ID3DXEffect *iface, + D3DXHANDLE object, const char *name) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, object %p, name %s.\n", iface, object, debugstr_a(name)); + + return d3dx9_base_effect_get_annotation_by_name(&effect->base_effect, object, name); +} + +static HRESULT WINAPI ID3DXEffectImpl_SetValue(ID3DXEffect *iface, + D3DXHANDLE parameter, const void *data, UINT bytes) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, data %p, bytes %u.\n", iface, parameter, data, bytes); + + return d3dx9_base_effect_set_value(&effect->base_effect, parameter, data, bytes); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetValue(ID3DXEffect *iface, + D3DXHANDLE parameter, void *data, UINT bytes) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, data %p, bytes %u.\n", iface, parameter, data, bytes); + + return d3dx9_base_effect_get_value(&effect->base_effect, parameter, data, bytes); +} + +static HRESULT WINAPI ID3DXEffectImpl_SetBool(ID3DXEffect *iface, D3DXHANDLE parameter, BOOL b) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, b %#x.\n", iface, parameter, b); + + return d3dx9_base_effect_set_bool(&effect->base_effect, parameter, b); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetBool(ID3DXEffect *iface, D3DXHANDLE parameter, BOOL *b) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, b %p.\n", iface, parameter, b); + + return d3dx9_base_effect_get_bool(&effect->base_effect, parameter, b); +} + +static HRESULT WINAPI ID3DXEffectImpl_SetBoolArray(ID3DXEffect *iface, + D3DXHANDLE parameter, const BOOL *b, UINT count) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, b %p, count %u.\n", iface, parameter, b, count); + + return d3dx9_base_effect_set_bool_array(&effect->base_effect, parameter, b, count); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetBoolArray(ID3DXEffect *iface, + D3DXHANDLE parameter, BOOL *b, UINT count) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, b %p, count %u.\n", iface, parameter, b, count); + + return d3dx9_base_effect_get_bool_array(&effect->base_effect, parameter, b, count); +} + +static HRESULT WINAPI ID3DXEffectImpl_SetInt(ID3DXEffect *iface, D3DXHANDLE parameter, INT n) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, n %d.\n", iface, parameter, n); + + return d3dx9_base_effect_set_int(&effect->base_effect, parameter, n); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetInt(ID3DXEffect *iface, D3DXHANDLE parameter, INT *n) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, n %p.\n", iface, parameter, n); + + return d3dx9_base_effect_get_int(&effect->base_effect, parameter, n); +} + +static HRESULT WINAPI ID3DXEffectImpl_SetIntArray(ID3DXEffect *iface, + D3DXHANDLE parameter, const INT *n, UINT count) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, n %p, count %u.\n", iface, parameter, n, count); + + return d3dx9_base_effect_set_int_array(&effect->base_effect, parameter, n, count); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetIntArray(ID3DXEffect *iface, + D3DXHANDLE parameter, INT *n, UINT count) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, n %p, count %u.\n", iface, parameter, n, count); + + return d3dx9_base_effect_get_int_array(&effect->base_effect, parameter, n, count); +} + +static HRESULT WINAPI ID3DXEffectImpl_SetFloat(ID3DXEffect *iface, D3DXHANDLE parameter, float f) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, f %.8e.\n", iface, parameter, f); + + return d3dx9_base_effect_set_float(&effect->base_effect, parameter, f); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetFloat(ID3DXEffect *iface, D3DXHANDLE parameter, float *f) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, f %p.\n", iface, parameter, f); + + return d3dx9_base_effect_get_float(&effect->base_effect, parameter, f); +} + +static HRESULT WINAPI ID3DXEffectImpl_SetFloatArray(ID3DXEffect *iface, + D3DXHANDLE parameter, const float *f, UINT count) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, f %p, count %u.\n", iface, parameter, f, count); + + return d3dx9_base_effect_set_float_array(&effect->base_effect, parameter, f, count); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetFloatArray(ID3DXEffect *iface, + D3DXHANDLE parameter, float *f, UINT count) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, f %p, count %u.\n", iface, parameter, f, count); + + return d3dx9_base_effect_get_float_array(&effect->base_effect, parameter, f, count); +} + +static HRESULT WINAPI ID3DXEffectImpl_SetVector(ID3DXEffect *iface, + D3DXHANDLE parameter, const D3DXVECTOR4 *vector) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, vector %p.\n", iface, parameter, vector); + + return d3dx9_base_effect_set_vector(&effect->base_effect, parameter, vector); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetVector(ID3DXEffect *iface, + D3DXHANDLE parameter, D3DXVECTOR4 *vector) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, vector %p.\n", iface, parameter, vector); + + return d3dx9_base_effect_get_vector(&effect->base_effect, parameter, vector); +} + +static HRESULT WINAPI ID3DXEffectImpl_SetVectorArray(ID3DXEffect *iface, + D3DXHANDLE parameter, const D3DXVECTOR4 *vector, UINT count) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, vector %p, count %u.\n", iface, parameter, vector, count); + + return d3dx9_base_effect_set_vector_array(&effect->base_effect, parameter, vector, count); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetVectorArray(ID3DXEffect *iface, + D3DXHANDLE parameter, D3DXVECTOR4 *vector, UINT count) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, vector %p, count %u.\n", iface, parameter, vector, count); + + return d3dx9_base_effect_get_vector_array(&effect->base_effect, parameter, vector, count); +} + +static HRESULT WINAPI ID3DXEffectImpl_SetMatrix(ID3DXEffect *iface, + D3DXHANDLE parameter, const D3DXMATRIX *matrix) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, matrix %p.\n", iface, parameter, matrix); + + return d3dx9_base_effect_set_matrix(&effect->base_effect, parameter, matrix); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetMatrix(ID3DXEffect *iface, + D3DXHANDLE parameter, D3DXMATRIX *matrix) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, matrix %p.\n", iface, parameter, matrix); + + return d3dx9_base_effect_get_matrix(&effect->base_effect, parameter, matrix); +} + +static HRESULT WINAPI ID3DXEffectImpl_SetMatrixArray(ID3DXEffect *iface, + D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); + + return d3dx9_base_effect_set_matrix_array(&effect->base_effect, parameter, matrix, count); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetMatrixArray(ID3DXEffect *iface, + D3DXHANDLE parameter, D3DXMATRIX *matrix, UINT count) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); + + return d3dx9_base_effect_get_matrix_array(&effect->base_effect, parameter, matrix, count); +} + +static HRESULT WINAPI ID3DXEffectImpl_SetMatrixPointerArray(ID3DXEffect *iface, + D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); + + return d3dx9_base_effect_set_matrix_pointer_array(&effect->base_effect, parameter, matrix, count); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetMatrixPointerArray(ID3DXEffect *iface, + D3DXHANDLE parameter, D3DXMATRIX **matrix, UINT count) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); + + return d3dx9_base_effect_get_matrix_pointer_array(&effect->base_effect, parameter, matrix, count); +} + +static HRESULT WINAPI ID3DXEffectImpl_SetMatrixTranspose(ID3DXEffect *iface, + D3DXHANDLE parameter, const D3DXMATRIX *matrix) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, matrix %p.\n", iface, parameter, matrix); + + return d3dx9_base_effect_set_matrix_transpose(&effect->base_effect, parameter, matrix); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetMatrixTranspose(ID3DXEffect *iface, + D3DXHANDLE parameter, D3DXMATRIX *matrix) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, matrix %p.\n", iface, parameter, matrix); + + return d3dx9_base_effect_get_matrix_transpose(&effect->base_effect, parameter, matrix); +} + +static HRESULT WINAPI ID3DXEffectImpl_SetMatrixTransposeArray(ID3DXEffect *iface, + D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); + + return d3dx9_base_effect_set_matrix_transpose_array(&effect->base_effect, parameter, matrix, count); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetMatrixTransposeArray(ID3DXEffect *iface, + D3DXHANDLE parameter, D3DXMATRIX *matrix, UINT count) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); + + return d3dx9_base_effect_get_matrix_transpose_array(&effect->base_effect, parameter, matrix, count); +} + +static HRESULT WINAPI ID3DXEffectImpl_SetMatrixTransposePointerArray(ID3DXEffect *iface, + D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); + + return d3dx9_base_effect_set_matrix_transpose_pointer_array(&effect->base_effect, parameter, matrix, count); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetMatrixTransposePointerArray(ID3DXEffect *iface, + D3DXHANDLE parameter, D3DXMATRIX **matrix, UINT count) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); + + return d3dx9_base_effect_get_matrix_transpose_pointer_array(&effect->base_effect, parameter, matrix, count); +} + +static HRESULT WINAPI ID3DXEffectImpl_SetString(ID3DXEffect *iface, D3DXHANDLE parameter, const char *string) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, string %s.\n", iface, parameter, debugstr_a(string)); + + return d3dx9_base_effect_set_string(&effect->base_effect, parameter, string); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetString(ID3DXEffect *iface, D3DXHANDLE parameter, const char **string) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, string %p.\n", iface, parameter, string); + + return d3dx9_base_effect_get_string(&effect->base_effect, parameter, string); +} + +static HRESULT WINAPI ID3DXEffectImpl_SetTexture(struct ID3DXEffect *iface, + D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, texture %p.\n", iface, parameter, texture); + + return d3dx9_base_effect_set_texture(&effect->base_effect, parameter, texture); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetTexture(struct ID3DXEffect *iface, + D3DXHANDLE parameter, struct IDirect3DBaseTexture9 **texture) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, texture %p.\n", iface, parameter, texture); + + return d3dx9_base_effect_get_texture(&effect->base_effect, parameter, texture); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetPixelShader(ID3DXEffect *iface, + D3DXHANDLE parameter, struct IDirect3DPixelShader9 **shader) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, shader %p.\n", iface, parameter, shader); + + return d3dx9_base_effect_get_pixel_shader(&effect->base_effect, parameter, shader); +} + +static HRESULT WINAPI ID3DXEffectImpl_GetVertexShader(struct ID3DXEffect *iface, + D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, shader %p.\n", iface, parameter, shader); + + return d3dx9_base_effect_get_vertex_shader(&effect->base_effect, parameter, shader); +} + +static HRESULT WINAPI ID3DXEffectImpl_SetArrayRange(ID3DXEffect *iface, D3DXHANDLE parameter, UINT start, UINT end) +{ + struct ID3DXEffectImpl *effect = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, parameter %p, start %u, end %u.\n", iface, parameter, start, end); + + return d3dx9_base_effect_set_array_range(&effect->base_effect, parameter, start, end); +} + +/*** ID3DXEffect methods ***/ +static HRESULT WINAPI ID3DXEffectImpl_GetPool(ID3DXEffect *iface, ID3DXEffectPool **pool) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, pool %p\n", This, pool); + + if (!pool) + { + WARN("Invalid argument supplied.\n"); + return D3DERR_INVALIDCALL; + } + + if (This->pool) + { + This->pool->lpVtbl->AddRef(This->pool); + } + + *pool = This->pool; + + TRACE("Returning pool %p\n", *pool); + + return S_OK; +} + +static HRESULT WINAPI ID3DXEffectImpl_SetTechnique(ID3DXEffect *iface, D3DXHANDLE technique) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + struct d3dx9_base_effect *base = &This->base_effect; + struct d3dx_technique *tech = get_valid_technique(base, technique); + + TRACE("iface %p, technique %p\n", This, technique); + + if (tech) + { + This->active_technique = tech; + TRACE("Technique %p\n", tech); + return D3D_OK; + } + + WARN("Invalid argument supplied.\n"); + + return D3DERR_INVALIDCALL; +} + +static D3DXHANDLE WINAPI ID3DXEffectImpl_GetCurrentTechnique(ID3DXEffect *iface) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + + TRACE("iface %p\n", This); + + return get_technique_handle(This->active_technique); +} + +static HRESULT WINAPI ID3DXEffectImpl_ValidateTechnique(ID3DXEffect* iface, D3DXHANDLE technique) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + + FIXME("(%p)->(%p): stub\n", This, technique); + + return D3D_OK; +} + +static HRESULT WINAPI ID3DXEffectImpl_FindNextValidTechnique(ID3DXEffect* iface, D3DXHANDLE technique, D3DXHANDLE* next_technique) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + + FIXME("(%p)->(%p, %p): stub\n", This, technique, next_technique); + + return E_NOTIMPL; +} + +static BOOL WINAPI ID3DXEffectImpl_IsParameterUsed(ID3DXEffect* iface, D3DXHANDLE parameter, D3DXHANDLE technique) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + + FIXME("(%p)->(%p, %p): stub\n", This, parameter, technique); + + return FALSE; +} + +static HRESULT WINAPI ID3DXEffectImpl_Begin(ID3DXEffect *iface, UINT *passes, DWORD flags) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + struct d3dx_technique *technique = This->active_technique; + + FIXME("iface %p, passes %p, flags %#x partial stub\n", iface, passes, flags); + + if (passes && technique) + { + if (flags & ~(D3DXFX_DONOTSAVESTATE | D3DXFX_DONOTSAVESAMPLERSTATE | D3DXFX_DONOTSAVESHADERSTATE)) + WARN("Invalid flags (%#x) specified.\n", flags); + + if (This->manager || flags & D3DXFX_DONOTSAVESTATE) + { + TRACE("State capturing disabled.\n"); + } + else + { + FIXME("State capturing not supported, yet!\n"); + } + + *passes = technique->pass_count; + This->started = TRUE; + This->flags = flags; + + return D3D_OK; + } + + WARN("Invalid argument supplied.\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT WINAPI ID3DXEffectImpl_BeginPass(ID3DXEffect *iface, UINT pass) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + struct d3dx_technique *technique = This->active_technique; + + TRACE("iface %p, pass %u\n", This, pass); + + if (technique && pass < technique->pass_count && !This->active_pass) + { + This->active_pass = &technique->passes[pass]; + + FIXME("No states applied, yet!\n"); + + return D3D_OK; + } + + WARN("Invalid argument supplied.\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT WINAPI ID3DXEffectImpl_CommitChanges(ID3DXEffect* iface) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + + FIXME("(%p)->(): stub\n", This); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ID3DXEffectImpl_EndPass(ID3DXEffect *iface) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + + TRACE("iface %p\n", This); + + if (This->active_pass) + { + This->active_pass = NULL; + return D3D_OK; + } + + WARN("Invalid call.\n"); + + return D3DERR_INVALIDCALL; +} + +static HRESULT WINAPI ID3DXEffectImpl_End(ID3DXEffect *iface) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + + FIXME("iface %p partial stub\n", iface); + + if (!This->started) + return D3D_OK; + + if (This->manager || This->flags & D3DXFX_DONOTSAVESTATE) + { + TRACE("State restoring disabled.\n"); + } + else + { + FIXME("State restoring not supported, yet!\n"); + } + + This->started = FALSE; + + return D3D_OK; +} + +static HRESULT WINAPI ID3DXEffectImpl_GetDevice(ID3DXEffect *iface, struct IDirect3DDevice9 **device) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, device %p\n", This, device); + + if (!device) + { + WARN("Invalid argument supplied.\n"); + return D3DERR_INVALIDCALL; + } + + IDirect3DDevice9_AddRef(This->device); + + *device = This->device; + + TRACE("Returning device %p\n", *device); + + return S_OK; +} + +static HRESULT WINAPI ID3DXEffectImpl_OnLostDevice(ID3DXEffect* iface) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + + FIXME("(%p)->(): stub\n", This); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ID3DXEffectImpl_OnResetDevice(ID3DXEffect* iface) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + + FIXME("(%p)->(): stub\n", This); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ID3DXEffectImpl_SetStateManager(ID3DXEffect *iface, ID3DXEffectStateManager *manager) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, manager %p\n", This, manager); + + if (manager) IUnknown_AddRef(manager); + if (This->manager) IUnknown_Release(This->manager); + + This->manager = manager; + + return D3D_OK; +} + +static HRESULT WINAPI ID3DXEffectImpl_GetStateManager(ID3DXEffect *iface, ID3DXEffectStateManager **manager) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + + TRACE("iface %p, manager %p\n", This, manager); + + if (!manager) + { + WARN("Invalid argument supplied.\n"); + return D3DERR_INVALIDCALL; + } + + if (This->manager) IUnknown_AddRef(This->manager); + *manager = This->manager; + + return D3D_OK; +} + +static HRESULT WINAPI ID3DXEffectImpl_BeginParameterBlock(ID3DXEffect* iface) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + + FIXME("(%p)->(): stub\n", This); + + return E_NOTIMPL; +} + +static D3DXHANDLE WINAPI ID3DXEffectImpl_EndParameterBlock(ID3DXEffect* iface) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + + FIXME("(%p)->(): stub\n", This); + + return NULL; +} + +static HRESULT WINAPI ID3DXEffectImpl_ApplyParameterBlock(ID3DXEffect* iface, D3DXHANDLE parameter_block) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + + FIXME("(%p)->(%p): stub\n", This, parameter_block); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ID3DXEffectImpl_DeleteParameterBlock(ID3DXEffect* iface, D3DXHANDLE parameter_block) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + + FIXME("(%p)->(%p): stub\n", This, parameter_block); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ID3DXEffectImpl_CloneEffect(ID3DXEffect *iface, + struct IDirect3DDevice9 *device, struct ID3DXEffect **effect) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + + FIXME("(%p)->(%p, %p): stub\n", This, device, effect); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ID3DXEffectImpl_SetRawValue(ID3DXEffect* iface, D3DXHANDLE parameter, LPCVOID data, UINT byte_offset, UINT bytes) +{ + struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface); + + FIXME("(%p)->(%p, %p, %u, %u): stub\n", This, parameter, data, byte_offset, bytes); + + return E_NOTIMPL; +} + +static const struct ID3DXEffectVtbl ID3DXEffect_Vtbl = +{ + /*** IUnknown methods ***/ + ID3DXEffectImpl_QueryInterface, + ID3DXEffectImpl_AddRef, + ID3DXEffectImpl_Release, + /*** ID3DXBaseEffect methods ***/ + ID3DXEffectImpl_GetDesc, + ID3DXEffectImpl_GetParameterDesc, + ID3DXEffectImpl_GetTechniqueDesc, + ID3DXEffectImpl_GetPassDesc, + ID3DXEffectImpl_GetFunctionDesc, + ID3DXEffectImpl_GetParameter, + ID3DXEffectImpl_GetParameterByName, + ID3DXEffectImpl_GetParameterBySemantic, + ID3DXEffectImpl_GetParameterElement, + ID3DXEffectImpl_GetTechnique, + ID3DXEffectImpl_GetTechniqueByName, + ID3DXEffectImpl_GetPass, + ID3DXEffectImpl_GetPassByName, + ID3DXEffectImpl_GetFunction, + ID3DXEffectImpl_GetFunctionByName, + ID3DXEffectImpl_GetAnnotation, + ID3DXEffectImpl_GetAnnotationByName, + ID3DXEffectImpl_SetValue, + ID3DXEffectImpl_GetValue, + ID3DXEffectImpl_SetBool, + ID3DXEffectImpl_GetBool, + ID3DXEffectImpl_SetBoolArray, + ID3DXEffectImpl_GetBoolArray, + ID3DXEffectImpl_SetInt, + ID3DXEffectImpl_GetInt, + ID3DXEffectImpl_SetIntArray, + ID3DXEffectImpl_GetIntArray, + ID3DXEffectImpl_SetFloat, + ID3DXEffectImpl_GetFloat, + ID3DXEffectImpl_SetFloatArray, + ID3DXEffectImpl_GetFloatArray, + ID3DXEffectImpl_SetVector, + ID3DXEffectImpl_GetVector, + ID3DXEffectImpl_SetVectorArray, + ID3DXEffectImpl_GetVectorArray, + ID3DXEffectImpl_SetMatrix, + ID3DXEffectImpl_GetMatrix, + ID3DXEffectImpl_SetMatrixArray, + ID3DXEffectImpl_GetMatrixArray, + ID3DXEffectImpl_SetMatrixPointerArray, + ID3DXEffectImpl_GetMatrixPointerArray, + ID3DXEffectImpl_SetMatrixTranspose, + ID3DXEffectImpl_GetMatrixTranspose, + ID3DXEffectImpl_SetMatrixTransposeArray, + ID3DXEffectImpl_GetMatrixTransposeArray, + ID3DXEffectImpl_SetMatrixTransposePointerArray, + ID3DXEffectImpl_GetMatrixTransposePointerArray, + ID3DXEffectImpl_SetString, + ID3DXEffectImpl_GetString, + ID3DXEffectImpl_SetTexture, + ID3DXEffectImpl_GetTexture, + ID3DXEffectImpl_GetPixelShader, + ID3DXEffectImpl_GetVertexShader, + ID3DXEffectImpl_SetArrayRange, + /*** ID3DXEffect methods ***/ + ID3DXEffectImpl_GetPool, + ID3DXEffectImpl_SetTechnique, + ID3DXEffectImpl_GetCurrentTechnique, + ID3DXEffectImpl_ValidateTechnique, + ID3DXEffectImpl_FindNextValidTechnique, + ID3DXEffectImpl_IsParameterUsed, + ID3DXEffectImpl_Begin, + ID3DXEffectImpl_BeginPass, + ID3DXEffectImpl_CommitChanges, + ID3DXEffectImpl_EndPass, + ID3DXEffectImpl_End, + ID3DXEffectImpl_GetDevice, + ID3DXEffectImpl_OnLostDevice, + ID3DXEffectImpl_OnResetDevice, + ID3DXEffectImpl_SetStateManager, + ID3DXEffectImpl_GetStateManager, + ID3DXEffectImpl_BeginParameterBlock, + ID3DXEffectImpl_EndParameterBlock, + ID3DXEffectImpl_ApplyParameterBlock, + ID3DXEffectImpl_DeleteParameterBlock, + ID3DXEffectImpl_CloneEffect, + ID3DXEffectImpl_SetRawValue +}; + +static inline struct ID3DXEffectCompilerImpl *impl_from_ID3DXEffectCompiler(ID3DXEffectCompiler *iface) +{ + return CONTAINING_RECORD(iface, struct ID3DXEffectCompilerImpl, ID3DXEffectCompiler_iface); +} + +/*** IUnknown methods ***/ +static HRESULT WINAPI ID3DXEffectCompilerImpl_QueryInterface(ID3DXEffectCompiler *iface, REFIID riid, void **object) +{ + TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_ID3DXEffectCompiler)) + { + iface->lpVtbl->AddRef(iface); + *object = iface; + return S_OK; + } + + ERR("Interface %s not found\n", debugstr_guid(riid)); + + return E_NOINTERFACE; +} + +static ULONG WINAPI ID3DXEffectCompilerImpl_AddRef(ID3DXEffectCompiler *iface) +{ + struct ID3DXEffectCompilerImpl *This = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p: AddRef from %u\n", iface, This->ref); + + return InterlockedIncrement(&This->ref); +} + +static ULONG WINAPI ID3DXEffectCompilerImpl_Release(ID3DXEffectCompiler *iface) +{ + struct ID3DXEffectCompilerImpl *This = impl_from_ID3DXEffectCompiler(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("iface %p: Release from %u\n", iface, ref + 1); + + if (!ref) + { + free_effect_compiler(This); + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + +/*** ID3DXBaseEffect methods ***/ +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetDesc(ID3DXEffectCompiler *iface, D3DXEFFECT_DESC *desc) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, desc %p.\n", iface, desc); + + return d3dx9_base_effect_get_desc(&compiler->base_effect, desc); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetParameterDesc(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, D3DXPARAMETER_DESC *desc) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, desc %p.\n", iface, parameter, desc); + + return d3dx9_base_effect_get_parameter_desc(&compiler->base_effect, parameter, desc); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetTechniqueDesc(ID3DXEffectCompiler *iface, + D3DXHANDLE technique, D3DXTECHNIQUE_DESC *desc) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, technique %p, desc %p.\n", iface, technique, desc); + + return d3dx9_base_effect_get_technique_desc(&compiler->base_effect, technique, desc); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetPassDesc(ID3DXEffectCompiler *iface, + D3DXHANDLE pass, D3DXPASS_DESC *desc) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, pass %p, desc %p.\n", iface, pass, desc); + + return d3dx9_base_effect_get_pass_desc(&compiler->base_effect, pass, desc); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetFunctionDesc(ID3DXEffectCompiler *iface, + D3DXHANDLE shader, D3DXFUNCTION_DESC *desc) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, shader %p, desc %p.\n", iface, shader, desc); + + return d3dx9_base_effect_get_function_desc(&compiler->base_effect, shader, desc); +} + +static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetParameter(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, UINT index) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, index %u.\n", iface, parameter, index); + + return d3dx9_base_effect_get_parameter(&compiler->base_effect, parameter, index); +} + +static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetParameterByName(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, const char *name) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, name %s.\n", iface, parameter, debugstr_a(name)); + + return d3dx9_base_effect_get_parameter_by_name(&compiler->base_effect, parameter, name); +} + +static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetParameterBySemantic(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, const char *semantic) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, semantic %s.\n", iface, parameter, debugstr_a(semantic)); + + return d3dx9_base_effect_get_parameter_by_semantic(&compiler->base_effect, parameter, semantic); +} + +static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetParameterElement(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, UINT index) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, index %u.\n", iface, parameter, index); + + return d3dx9_base_effect_get_parameter_element(&compiler->base_effect, parameter, index); +} + +static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetTechnique(ID3DXEffectCompiler *iface, UINT index) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, index %u.\n", iface, index); + + return d3dx9_base_effect_get_technique(&compiler->base_effect, index); +} + +static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetTechniqueByName(ID3DXEffectCompiler *iface, const char *name) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, name %s.\n", iface, debugstr_a(name)); + + return d3dx9_base_effect_get_technique_by_name(&compiler->base_effect, name); +} + +static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetPass(ID3DXEffectCompiler *iface, D3DXHANDLE technique, UINT index) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, technique %p, index %u.\n", iface, technique, index); + + return d3dx9_base_effect_get_pass(&compiler->base_effect, technique, index); +} + +static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetPassByName(ID3DXEffectCompiler *iface, + D3DXHANDLE technique, const char *name) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, technique %p, name %s.\n", iface, technique, debugstr_a(name)); + + return d3dx9_base_effect_get_pass_by_name(&compiler->base_effect, technique, name); +} + +static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetFunction(ID3DXEffectCompiler *iface, UINT index) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, index %u.\n", iface, index); + + return d3dx9_base_effect_get_function(&compiler->base_effect, index); +} + +static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetFunctionByName(ID3DXEffectCompiler *iface, const char *name) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, name %s.\n", iface, debugstr_a(name)); + + return d3dx9_base_effect_get_function_by_name(&compiler->base_effect, name); +} + +static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetAnnotation(ID3DXEffectCompiler *iface, + D3DXHANDLE object, UINT index) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, object %p, index %u.\n", iface, object, index); + + return d3dx9_base_effect_get_annotation(&compiler->base_effect, object, index); +} + +static D3DXHANDLE WINAPI ID3DXEffectCompilerImpl_GetAnnotationByName(ID3DXEffectCompiler *iface, + D3DXHANDLE object, const char *name) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, object %p, name %s.\n", iface, object, debugstr_a(name)); + + return d3dx9_base_effect_get_annotation_by_name(&compiler->base_effect, object, name); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_SetValue(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, const void *data, UINT bytes) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, data %p, bytes %u.\n", iface, parameter, data, bytes); + + return d3dx9_base_effect_set_value(&compiler->base_effect, parameter, data, bytes); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetValue(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, void *data, UINT bytes) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, data %p, bytes %u.\n", iface, parameter, data, bytes); + + return d3dx9_base_effect_get_value(&compiler->base_effect, parameter, data, bytes); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_SetBool(ID3DXEffectCompiler *iface, D3DXHANDLE parameter, BOOL b) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, b %#x.\n", iface, parameter, b); + + return d3dx9_base_effect_set_bool(&compiler->base_effect, parameter, b); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetBool(ID3DXEffectCompiler *iface, D3DXHANDLE parameter, BOOL *b) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, b %p.\n", iface, parameter, b); + + return d3dx9_base_effect_get_bool(&compiler->base_effect, parameter, b); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_SetBoolArray(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, const BOOL *b, UINT count) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, b %p, count %u.\n", iface, parameter, b, count); + + return d3dx9_base_effect_set_bool_array(&compiler->base_effect, parameter, b, count); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetBoolArray(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, BOOL *b, UINT count) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, b %p, count %u.\n", iface, parameter, b, count); + + return d3dx9_base_effect_get_bool_array(&compiler->base_effect, parameter, b, count); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_SetInt(ID3DXEffectCompiler *iface, D3DXHANDLE parameter, INT n) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, n %d.\n", iface, parameter, n); + + return d3dx9_base_effect_set_int(&compiler->base_effect, parameter, n); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetInt(ID3DXEffectCompiler *iface, D3DXHANDLE parameter, INT *n) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, n %p.\n", iface, parameter, n); + + return d3dx9_base_effect_get_int(&compiler->base_effect, parameter, n); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_SetIntArray(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, const INT *n, UINT count) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, n %p, count %u.\n", iface, parameter, n, count); + + return d3dx9_base_effect_set_int_array(&compiler->base_effect, parameter, n, count); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetIntArray(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, INT *n, UINT count) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, n %p, count %u.\n", iface, parameter, n, count); + + return d3dx9_base_effect_get_int_array(&compiler->base_effect, parameter, n, count); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_SetFloat(ID3DXEffectCompiler *iface, D3DXHANDLE parameter, float f) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, f %.8e.\n", iface, parameter, f); + + return d3dx9_base_effect_set_float(&compiler->base_effect, parameter, f); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetFloat(ID3DXEffectCompiler *iface, D3DXHANDLE parameter, float *f) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, f %p.\n", iface, parameter, f); + + return d3dx9_base_effect_get_float(&compiler->base_effect, parameter, f); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_SetFloatArray(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, const float *f, UINT count) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, f %p, count %u.\n", iface, parameter, f, count); + + return d3dx9_base_effect_set_float_array(&compiler->base_effect, parameter, f, count); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetFloatArray(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, float *f, UINT count) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, f %p, count %u.\n", iface, parameter, f, count); + + return d3dx9_base_effect_get_float_array(&compiler->base_effect, parameter, f, count); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_SetVector(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, const D3DXVECTOR4 *vector) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, vector %p.\n", iface, parameter, vector); + + return d3dx9_base_effect_set_vector(&compiler->base_effect, parameter, vector); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetVector(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, D3DXVECTOR4 *vector) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, vector %p.\n", iface, parameter, vector); + + return d3dx9_base_effect_get_vector(&compiler->base_effect, parameter, vector); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_SetVectorArray(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, const D3DXVECTOR4 *vector, UINT count) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, vector %p, count %u.\n", iface, parameter, vector, count); + + return d3dx9_base_effect_set_vector_array(&compiler->base_effect, parameter, vector, count); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetVectorArray(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, D3DXVECTOR4 *vector, UINT count) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, vector %p, count %u.\n", iface, parameter, vector, count); + + return d3dx9_base_effect_get_vector_array(&compiler->base_effect, parameter, vector, count); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_SetMatrix(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, const D3DXMATRIX *matrix) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, matrix %p.\n", iface, parameter, matrix); + + return d3dx9_base_effect_set_matrix(&compiler->base_effect, parameter, matrix); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetMatrix(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, D3DXMATRIX *matrix) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, matrix %p.\n", iface, parameter, matrix); + + return d3dx9_base_effect_get_matrix(&compiler->base_effect, parameter, matrix); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_SetMatrixArray(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); + + return d3dx9_base_effect_set_matrix_array(&compiler->base_effect, parameter, matrix, count); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetMatrixArray(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, D3DXMATRIX *matrix, UINT count) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); + + return d3dx9_base_effect_get_matrix_array(&compiler->base_effect, parameter, matrix, count); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_SetMatrixPointerArray(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); + + return d3dx9_base_effect_set_matrix_pointer_array(&compiler->base_effect, parameter, matrix, count); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetMatrixPointerArray(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, D3DXMATRIX **matrix, UINT count) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); + + return d3dx9_base_effect_get_matrix_pointer_array(&compiler->base_effect, parameter, matrix, count); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_SetMatrixTranspose(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, const D3DXMATRIX *matrix) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, matrix %p.\n", iface, parameter, matrix); + + return d3dx9_base_effect_set_matrix_transpose(&compiler->base_effect, parameter, matrix); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetMatrixTranspose(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, D3DXMATRIX *matrix) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, matrix %p.\n", iface, parameter, matrix); + + return d3dx9_base_effect_get_matrix_transpose(&compiler->base_effect, parameter, matrix); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_SetMatrixTransposeArray(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, const D3DXMATRIX *matrix, UINT count) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); + + return d3dx9_base_effect_set_matrix_transpose_array(&compiler->base_effect, parameter, matrix, count); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetMatrixTransposeArray(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, D3DXMATRIX *matrix, UINT count) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); + + return d3dx9_base_effect_get_matrix_transpose_array(&compiler->base_effect, parameter, matrix, count); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_SetMatrixTransposePointerArray(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, const D3DXMATRIX **matrix, UINT count) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); + + return d3dx9_base_effect_set_matrix_transpose_pointer_array(&compiler->base_effect, parameter, matrix, count); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetMatrixTransposePointerArray(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, D3DXMATRIX **matrix, UINT count) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, matrix %p, count %u.\n", iface, parameter, matrix, count); + + return d3dx9_base_effect_get_matrix_transpose_pointer_array(&compiler->base_effect, parameter, matrix, count); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_SetString(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, const char *string) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, string %s.\n", iface, parameter, debugstr_a(string)); + + return d3dx9_base_effect_set_string(&compiler->base_effect, parameter, string); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetString(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, const char **string) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, string %p.\n", iface, parameter, string); + + return d3dx9_base_effect_get_string(&compiler->base_effect, parameter, string); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_SetTexture(struct ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, struct IDirect3DBaseTexture9 *texture) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, texture %p.\n", iface, parameter, texture); + + return d3dx9_base_effect_set_texture(&compiler->base_effect, parameter, texture); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetTexture(struct ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, struct IDirect3DBaseTexture9 **texture) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, texture %p.\n", iface, parameter, texture); + + return d3dx9_base_effect_get_texture(&compiler->base_effect, parameter, texture); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetPixelShader(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, struct IDirect3DPixelShader9 **shader) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, shader %p.\n", iface, parameter, shader); + + return d3dx9_base_effect_get_pixel_shader(&compiler->base_effect, parameter, shader); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetVertexShader(struct ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, struct IDirect3DVertexShader9 **shader) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, shader %p.\n", iface, parameter, shader); + + return d3dx9_base_effect_get_vertex_shader(&compiler->base_effect, parameter, shader); +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_SetArrayRange(ID3DXEffectCompiler *iface, + D3DXHANDLE parameter, UINT start, UINT end) +{ + struct ID3DXEffectCompilerImpl *compiler = impl_from_ID3DXEffectCompiler(iface); + + TRACE("iface %p, parameter %p, start %u, end %u.\n", iface, parameter, start, end); + + return d3dx9_base_effect_set_array_range(&compiler->base_effect, parameter, start, end); +} + +/*** ID3DXEffectCompiler methods ***/ +static HRESULT WINAPI ID3DXEffectCompilerImpl_SetLiteral(ID3DXEffectCompiler *iface, D3DXHANDLE parameter, BOOL literal) +{ + struct ID3DXEffectCompilerImpl *This = impl_from_ID3DXEffectCompiler(iface); + + FIXME("iface %p, parameter %p, literal %u\n", This, parameter, literal); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_GetLiteral(ID3DXEffectCompiler *iface, D3DXHANDLE parameter, BOOL *literal) +{ + struct ID3DXEffectCompilerImpl *This = impl_from_ID3DXEffectCompiler(iface); + + FIXME("iface %p, parameter %p, literal %p\n", This, parameter, literal); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_CompileEffect(ID3DXEffectCompiler *iface, DWORD flags, + ID3DXBuffer **effect, ID3DXBuffer **error_msgs) +{ + struct ID3DXEffectCompilerImpl *This = impl_from_ID3DXEffectCompiler(iface); + + FIXME("iface %p, flags %#x, effect %p, error_msgs %p stub\n", This, flags, effect, error_msgs); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ID3DXEffectCompilerImpl_CompileShader(ID3DXEffectCompiler *iface, D3DXHANDLE function, + const char *target, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_msgs, + ID3DXConstantTable **constant_table) +{ + struct ID3DXEffectCompilerImpl *This = impl_from_ID3DXEffectCompiler(iface); + + FIXME("iface %p, function %p, target %p, flags %#x, shader %p, error_msgs %p, constant_table %p stub\n", + This, function, target, flags, shader, error_msgs, constant_table); + + return E_NOTIMPL; +} + +static const struct ID3DXEffectCompilerVtbl ID3DXEffectCompiler_Vtbl = +{ + /*** IUnknown methods ***/ + ID3DXEffectCompilerImpl_QueryInterface, + ID3DXEffectCompilerImpl_AddRef, + ID3DXEffectCompilerImpl_Release, + /*** ID3DXBaseEffect methods ***/ + ID3DXEffectCompilerImpl_GetDesc, + ID3DXEffectCompilerImpl_GetParameterDesc, + ID3DXEffectCompilerImpl_GetTechniqueDesc, + ID3DXEffectCompilerImpl_GetPassDesc, + ID3DXEffectCompilerImpl_GetFunctionDesc, + ID3DXEffectCompilerImpl_GetParameter, + ID3DXEffectCompilerImpl_GetParameterByName, + ID3DXEffectCompilerImpl_GetParameterBySemantic, + ID3DXEffectCompilerImpl_GetParameterElement, + ID3DXEffectCompilerImpl_GetTechnique, + ID3DXEffectCompilerImpl_GetTechniqueByName, + ID3DXEffectCompilerImpl_GetPass, + ID3DXEffectCompilerImpl_GetPassByName, + ID3DXEffectCompilerImpl_GetFunction, + ID3DXEffectCompilerImpl_GetFunctionByName, + ID3DXEffectCompilerImpl_GetAnnotation, + ID3DXEffectCompilerImpl_GetAnnotationByName, + ID3DXEffectCompilerImpl_SetValue, + ID3DXEffectCompilerImpl_GetValue, + ID3DXEffectCompilerImpl_SetBool, + ID3DXEffectCompilerImpl_GetBool, + ID3DXEffectCompilerImpl_SetBoolArray, + ID3DXEffectCompilerImpl_GetBoolArray, + ID3DXEffectCompilerImpl_SetInt, + ID3DXEffectCompilerImpl_GetInt, + ID3DXEffectCompilerImpl_SetIntArray, + ID3DXEffectCompilerImpl_GetIntArray, + ID3DXEffectCompilerImpl_SetFloat, + ID3DXEffectCompilerImpl_GetFloat, + ID3DXEffectCompilerImpl_SetFloatArray, + ID3DXEffectCompilerImpl_GetFloatArray, + ID3DXEffectCompilerImpl_SetVector, + ID3DXEffectCompilerImpl_GetVector, + ID3DXEffectCompilerImpl_SetVectorArray, + ID3DXEffectCompilerImpl_GetVectorArray, + ID3DXEffectCompilerImpl_SetMatrix, + ID3DXEffectCompilerImpl_GetMatrix, + ID3DXEffectCompilerImpl_SetMatrixArray, + ID3DXEffectCompilerImpl_GetMatrixArray, + ID3DXEffectCompilerImpl_SetMatrixPointerArray, + ID3DXEffectCompilerImpl_GetMatrixPointerArray, + ID3DXEffectCompilerImpl_SetMatrixTranspose, + ID3DXEffectCompilerImpl_GetMatrixTranspose, + ID3DXEffectCompilerImpl_SetMatrixTransposeArray, + ID3DXEffectCompilerImpl_GetMatrixTransposeArray, + ID3DXEffectCompilerImpl_SetMatrixTransposePointerArray, + ID3DXEffectCompilerImpl_GetMatrixTransposePointerArray, + ID3DXEffectCompilerImpl_SetString, + ID3DXEffectCompilerImpl_GetString, + ID3DXEffectCompilerImpl_SetTexture, + ID3DXEffectCompilerImpl_GetTexture, + ID3DXEffectCompilerImpl_GetPixelShader, + ID3DXEffectCompilerImpl_GetVertexShader, + ID3DXEffectCompilerImpl_SetArrayRange, + /*** ID3DXEffectCompiler methods ***/ + ID3DXEffectCompilerImpl_SetLiteral, + ID3DXEffectCompilerImpl_GetLiteral, + ID3DXEffectCompilerImpl_CompileEffect, + ID3DXEffectCompilerImpl_CompileShader, +}; + +static HRESULT d3dx9_parse_sampler(struct d3dx_sampler *sampler, const char *data, const char **ptr, D3DXHANDLE *objects) +{ + HRESULT hr; + UINT i; + struct d3dx_state *states; + + read_dword(ptr, &sampler->state_count); + TRACE("Count: %u\n", sampler->state_count); + + states = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*states) * sampler->state_count); + if (!states) + { + ERR("Out of memory\n"); + return E_OUTOFMEMORY; + } + + for (i = 0; i < sampler->state_count; ++i) + { + hr = d3dx9_parse_state(&states[i], data, ptr, objects); + if (hr != D3D_OK) + { + WARN("Failed to parse state %u\n", i); + goto err_out; + } + } + + sampler->states = states; + + return D3D_OK; + +err_out: + + for (i = 0; i < sampler->state_count; ++i) + { + free_state(&states[i]); + } + + HeapFree(GetProcessHeap(), 0, states); + + return hr; +} + +static HRESULT d3dx9_parse_value(struct d3dx_parameter *param, void *value, const char *data, const char **ptr, D3DXHANDLE *objects) +{ + unsigned int i; + HRESULT hr; + UINT old_size = 0; + DWORD id; + + if (param->element_count) + { + param->data = value; + + for (i = 0; i < param->element_count; ++i) + { + struct d3dx_parameter *member = ¶m->members[i]; + + hr = d3dx9_parse_value(member, value ? (char *)value + old_size : NULL, data, ptr, objects); + if (hr != D3D_OK) + { + WARN("Failed to parse value %u\n", i); + return hr; + } + + old_size += member->bytes; + } + + return D3D_OK; + } + + switch(param->class) + { + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_MATRIX_ROWS: + case D3DXPC_MATRIX_COLUMNS: + param->data = value; + break; + + case D3DXPC_STRUCT: + param->data = value; + + for (i = 0; i < param->member_count; ++i) + { + struct d3dx_parameter *member = ¶m->members[i]; + + hr = d3dx9_parse_value(member, (char *)value + old_size, data, ptr, objects); + if (hr != D3D_OK) + { + WARN("Failed to parse value %u\n", i); + return hr; + } + + old_size += member->bytes; + } + break; + + case D3DXPC_OBJECT: + switch (param->type) + { + case D3DXPT_STRING: + case D3DXPT_TEXTURE: + case D3DXPT_TEXTURE1D: + case D3DXPT_TEXTURE2D: + case D3DXPT_TEXTURE3D: + case D3DXPT_TEXTURECUBE: + case D3DXPT_PIXELSHADER: + case D3DXPT_VERTEXSHADER: + read_dword(ptr, &id); + TRACE("Id: %u\n", id); + objects[id] = get_parameter_handle(param); + param->data = value; + break; + + case D3DXPT_SAMPLER: + case D3DXPT_SAMPLER1D: + case D3DXPT_SAMPLER2D: + case D3DXPT_SAMPLER3D: + case D3DXPT_SAMPLERCUBE: + { + struct d3dx_sampler *sampler; + + sampler = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*sampler)); + if (!sampler) + return E_OUTOFMEMORY; + + hr = d3dx9_parse_sampler(sampler, data, ptr, objects); + if (hr != D3D_OK) + { + HeapFree(GetProcessHeap(), 0, sampler); + WARN("Failed to parse sampler\n"); + return hr; + } + + param->data = sampler; + break; + } + + default: + FIXME("Unhandled type %s\n", debug_d3dxparameter_type(param->type)); + break; + } + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + + return D3D_OK; +} + +static HRESULT d3dx9_parse_init_value(struct d3dx_parameter *param, const char *data, const char *ptr, D3DXHANDLE *objects) +{ + UINT size = param->bytes; + HRESULT hr; + void *value = NULL; + + TRACE("param size: %u\n", size); + + if (size) + { + value = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); + if (!value) + { + ERR("Failed to allocate data memory.\n"); + return E_OUTOFMEMORY; + } + + switch(param->class) + { + case D3DXPC_OBJECT: + break; + + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_MATRIX_ROWS: + case D3DXPC_MATRIX_COLUMNS: + case D3DXPC_STRUCT: + TRACE("Data: %s.\n", debugstr_an(ptr, size)); + memcpy(value, ptr, size); + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + + hr = d3dx9_parse_value(param, value, data, &ptr, objects); + if (hr != D3D_OK) + { + WARN("Failed to parse value\n"); + HeapFree(GetProcessHeap(), 0, value); + return hr; + } + + return D3D_OK; +} + +static HRESULT d3dx9_parse_name(char **name, const char *ptr) +{ + DWORD size; + + read_dword(&ptr, &size); + TRACE("Name size: %#x\n", size); + + if (!size) + { + return D3D_OK; + } + + *name = HeapAlloc(GetProcessHeap(), 0, size); + if (!*name) + { + ERR("Failed to allocate name memory.\n"); + return E_OUTOFMEMORY; + } + + TRACE("Name: %s.\n", debugstr_an(ptr, size)); + memcpy(*name, ptr, size); + + return D3D_OK; +} + +static HRESULT d3dx9_copy_data(char **str, const char **ptr) +{ + DWORD size; + + read_dword(ptr, &size); + TRACE("Data size: %#x\n", size); + + *str = HeapAlloc(GetProcessHeap(), 0, size); + if (!*str) + { + ERR("Failed to allocate name memory.\n"); + return E_OUTOFMEMORY; + } + + TRACE("Data: %s.\n", debugstr_an(*ptr, size)); + memcpy(*str, *ptr, size); + + *ptr += ((size + 3) & ~3); + + return D3D_OK; +} + +static HRESULT d3dx9_parse_data(struct d3dx_parameter *param, const char **ptr, struct IDirect3DDevice9 *device) +{ + DWORD size; + HRESULT hr; + + TRACE("Parse data for parameter %s, type %s\n", debugstr_a(param->name), debug_d3dxparameter_type(param->type)); + + read_dword(ptr, &size); + TRACE("Data size: %#x\n", size); + + if (!size) + { + TRACE("Size is 0\n"); + *(void **)param->data = NULL; + return D3D_OK; + } + + switch (param->type) + { + case D3DXPT_STRING: + /* re-read with size (sizeof(DWORD) = 4) */ + hr = d3dx9_parse_name((LPSTR *)param->data, *ptr - 4); + if (hr != D3D_OK) + { + WARN("Failed to parse string data\n"); + return hr; + } + break; + + case D3DXPT_VERTEXSHADER: + if (FAILED(hr = IDirect3DDevice9_CreateVertexShader(device, (DWORD *)*ptr, param->data))) + { + WARN("Failed to create vertex shader\n"); + return hr; + } + break; + + case D3DXPT_PIXELSHADER: + if (FAILED(hr = IDirect3DDevice9_CreatePixelShader(device, (DWORD *)*ptr, param->data))) + { + WARN("Failed to create pixel shader\n"); + return hr; + } + break; + + default: + FIXME("Unhandled type %s\n", debug_d3dxparameter_type(param->type)); + break; + } + + + *ptr += ((size + 3) & ~3); + + return D3D_OK; +} + +static HRESULT d3dx9_parse_effect_typedef(struct d3dx_parameter *param, const char *data, const char **ptr, + struct d3dx_parameter *parent, UINT flags) +{ + DWORD offset; + HRESULT hr; + UINT i; + + param->flags = flags; + + if (!parent) + { + read_dword(ptr, ¶m->type); + TRACE("Type: %s\n", debug_d3dxparameter_type(param->type)); + + read_dword(ptr, ¶m->class); + TRACE("Class: %s\n", debug_d3dxparameter_class(param->class)); + + read_dword(ptr, &offset); + TRACE("Type name offset: %#x\n", offset); + hr = d3dx9_parse_name(¶m->name, data + offset); + if (hr != D3D_OK) + { + WARN("Failed to parse name\n"); + goto err_out; + } + + read_dword(ptr, &offset); + TRACE("Type semantic offset: %#x\n", offset); + hr = d3dx9_parse_name(¶m->semantic, data + offset); + if (hr != D3D_OK) + { + WARN("Failed to parse semantic\n"); + goto err_out; + } + + read_dword(ptr, ¶m->element_count); + TRACE("Elements: %u\n", param->element_count); + + switch (param->class) + { + case D3DXPC_VECTOR: + read_dword(ptr, ¶m->columns); + TRACE("Columns: %u\n", param->columns); + + read_dword(ptr, ¶m->rows); + TRACE("Rows: %u\n", param->rows); + + /* sizeof(DWORD) * rows * columns */ + param->bytes = 4 * param->rows * param->columns; + break; + + case D3DXPC_SCALAR: + case D3DXPC_MATRIX_ROWS: + case D3DXPC_MATRIX_COLUMNS: + read_dword(ptr, ¶m->rows); + TRACE("Rows: %u\n", param->rows); + + read_dword(ptr, ¶m->columns); + TRACE("Columns: %u\n", param->columns); + + /* sizeof(DWORD) * rows * columns */ + param->bytes = 4 * param->rows * param->columns; + break; + + case D3DXPC_STRUCT: + read_dword(ptr, ¶m->member_count); + TRACE("Members: %u\n", param->member_count); + break; + + case D3DXPC_OBJECT: + switch (param->type) + { + case D3DXPT_STRING: + case D3DXPT_PIXELSHADER: + case D3DXPT_VERTEXSHADER: + case D3DXPT_TEXTURE: + case D3DXPT_TEXTURE1D: + case D3DXPT_TEXTURE2D: + case D3DXPT_TEXTURE3D: + case D3DXPT_TEXTURECUBE: + param->bytes = sizeof(void *); + break; + + case D3DXPT_SAMPLER: + case D3DXPT_SAMPLER1D: + case D3DXPT_SAMPLER2D: + case D3DXPT_SAMPLER3D: + case D3DXPT_SAMPLERCUBE: + param->bytes = 0; + break; + + default: + FIXME("Unhandled type %s\n", debug_d3dxparameter_type(param->type)); + break; + } + break; + + default: + FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class)); + break; + } + } + else + { + /* elements */ + param->type = parent->type; + param->class = parent->class; + param->name = parent->name; + param->semantic = parent->semantic; + param->element_count = 0; + param->annotation_count = 0; + param->member_count = parent->member_count; + param->bytes = parent->bytes; + param->rows = parent->rows; + param->columns = parent->columns; + } + + if (param->element_count) + { + unsigned int param_bytes = 0; + const char *save_ptr = *ptr; + + param->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*param->members) * param->element_count); + if (!param->members) + { + ERR("Out of memory\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + + for (i = 0; i < param->element_count; ++i) + { + *ptr = save_ptr; + + hr = d3dx9_parse_effect_typedef(¶m->members[i], data, ptr, param, flags); + if (hr != D3D_OK) + { + WARN("Failed to parse member %u\n", i); + goto err_out; + } + + param_bytes += param->members[i].bytes; + } + + param->bytes = param_bytes; + } + else if (param->member_count) + { + param->members = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*param->members) * param->member_count); + if (!param->members) + { + ERR("Out of memory\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + + for (i = 0; i < param->member_count; ++i) + { + hr = d3dx9_parse_effect_typedef(¶m->members[i], data, ptr, NULL, flags); + if (hr != D3D_OK) + { + WARN("Failed to parse member %u\n", i); + goto err_out; + } + + param->bytes += param->members[i].bytes; + } + } + return D3D_OK; + +err_out: + + if (param->members) + { + unsigned int count = param->element_count ? param->element_count : param->member_count; + + for (i = 0; i < count; ++i) + free_parameter(¶m->members[i], param->element_count != 0, TRUE); + HeapFree(GetProcessHeap(), 0, param->members); + param->members = NULL; + } + + if (!parent) + { + HeapFree(GetProcessHeap(), 0, param->name); + HeapFree(GetProcessHeap(), 0, param->semantic); + } + param->name = NULL; + param->semantic = NULL; + + return hr; +} + +static HRESULT d3dx9_parse_effect_annotation(struct d3dx_parameter *anno, const char *data, const char **ptr, D3DXHANDLE *objects) +{ + DWORD offset; + const char *ptr2; + HRESULT hr; + + anno->flags = D3DX_PARAMETER_ANNOTATION; + + read_dword(ptr, &offset); + TRACE("Typedef offset: %#x\n", offset); + ptr2 = data + offset; + hr = d3dx9_parse_effect_typedef(anno, data, &ptr2, NULL, D3DX_PARAMETER_ANNOTATION); + if (hr != D3D_OK) + { + WARN("Failed to parse type definition\n"); + return hr; + } + + read_dword(ptr, &offset); + TRACE("Value offset: %#x\n", offset); + hr = d3dx9_parse_init_value(anno, data, data + offset, objects); + if (hr != D3D_OK) + { + WARN("Failed to parse value\n"); + return hr; + } + + return D3D_OK; +} + +static HRESULT d3dx9_parse_state(struct d3dx_state *state, const char *data, const char **ptr, D3DXHANDLE *objects) +{ + DWORD offset; + const char *ptr2; + HRESULT hr; + struct d3dx_parameter *parameter; + + parameter = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*parameter)); + if (!parameter) + return E_OUTOFMEMORY; + + state->type = ST_CONSTANT; + + read_dword(ptr, &state->operation); + TRACE("Operation: %#x (%s)\n", state->operation, state_table[state->operation].name); + + read_dword(ptr, &state->index); + TRACE("Index: %#x\n", state->index); + + read_dword(ptr, &offset); + TRACE("Typedef offset: %#x\n", offset); + ptr2 = data + offset; + hr = d3dx9_parse_effect_typedef(parameter, data, &ptr2, NULL, 0); + if (hr != D3D_OK) + { + WARN("Failed to parse type definition\n"); + goto err_out; + } + + read_dword(ptr, &offset); + TRACE("Value offset: %#x\n", offset); + hr = d3dx9_parse_init_value(parameter, data, data + offset, objects); + if (hr != D3D_OK) + { + WARN("Failed to parse value\n"); + goto err_out; + } + + state->parameter = parameter; + + return D3D_OK; + +err_out: + + free_parameter(parameter, FALSE, FALSE); + + return hr; +} + +static HRESULT d3dx9_parse_effect_parameter(struct d3dx_parameter *param, const char *data, const char **ptr, D3DXHANDLE *objects) +{ + DWORD offset; + HRESULT hr; + unsigned int i; + const char *ptr2; + + read_dword(ptr, &offset); + TRACE("Typedef offset: %#x\n", offset); + ptr2 = data + offset; + + read_dword(ptr, &offset); + TRACE("Value offset: %#x\n", offset); + + read_dword(ptr, ¶m->flags); + TRACE("Flags: %#x\n", param->flags); + + read_dword(ptr, ¶m->annotation_count); + TRACE("Annotation count: %u\n", param->annotation_count); + + hr = d3dx9_parse_effect_typedef(param, data, &ptr2, NULL, param->flags); + if (hr != D3D_OK) + { + WARN("Failed to parse type definition\n"); + return hr; + } + + hr = d3dx9_parse_init_value(param, data, data + offset, objects); + if (hr != D3D_OK) + { + WARN("Failed to parse value\n"); + return hr; + } + + if (param->annotation_count) + { + param->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + sizeof(*param->annotations) * param->annotation_count); + if (!param->annotations) + { + ERR("Out of memory\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + + for (i = 0; i < param->annotation_count; ++i) + { + hr = d3dx9_parse_effect_annotation(¶m->annotations[i], data, ptr, objects); + if (hr != D3D_OK) + { + WARN("Failed to parse annotation\n"); + goto err_out; + } + } + } + + return D3D_OK; + +err_out: + + if (param->annotations) + { + for (i = 0; i < param->annotation_count; ++i) + free_parameter(¶m->annotations[i], FALSE, FALSE); + HeapFree(GetProcessHeap(), 0, param->annotations); + param->annotations = NULL; + } + + return hr; +} + +static HRESULT d3dx9_parse_effect_pass(struct d3dx_pass *pass, const char *data, const char **ptr, D3DXHANDLE *objects) +{ + DWORD offset; + HRESULT hr; + unsigned int i; + struct d3dx_state *states = NULL; + char *name = NULL; + + read_dword(ptr, &offset); + TRACE("Pass name offset: %#x\n", offset); + hr = d3dx9_parse_name(&name, data + offset); + if (hr != D3D_OK) + { + WARN("Failed to parse name\n"); + goto err_out; + } + + read_dword(ptr, &pass->annotation_count); + TRACE("Annotation count: %u\n", pass->annotation_count); + + read_dword(ptr, &pass->state_count); + TRACE("State count: %u\n", pass->state_count); + + if (pass->annotation_count) + { + pass->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + sizeof(*pass->annotations) * pass->annotation_count); + if (!pass->annotations) + { + ERR("Out of memory\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + + for (i = 0; i < pass->annotation_count; ++i) + { + hr = d3dx9_parse_effect_annotation(&pass->annotations[i], data, ptr, objects); + if (hr != D3D_OK) + { + WARN("Failed to parse annotation %u\n", i); + goto err_out; + } + } + } + + if (pass->state_count) + { + states = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*states) * pass->state_count); + if (!states) + { + ERR("Out of memory\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + + for (i = 0; i < pass->state_count; ++i) + { + hr = d3dx9_parse_state(&states[i], data, ptr, objects); + if (hr != D3D_OK) + { + WARN("Failed to parse annotation %u\n", i); + goto err_out; + } + } + } + + pass->name = name; + pass->states = states; + + return D3D_OK; + +err_out: + + if (pass->annotations) + { + for (i = 0; i < pass->annotation_count; ++i) + free_parameter(&pass->annotations[i], FALSE, FALSE); + HeapFree(GetProcessHeap(), 0, pass->annotations); + pass->annotations = NULL; + } + + if (states) + { + for (i = 0; i < pass->state_count; ++i) + { + free_state(&states[i]); + } + HeapFree(GetProcessHeap(), 0, states); + } + + HeapFree(GetProcessHeap(), 0, name); + + return hr; +} + +static HRESULT d3dx9_parse_effect_technique(struct d3dx_technique *technique, const char *data, const char **ptr, D3DXHANDLE *objects) +{ + DWORD offset; + HRESULT hr; + unsigned int i; + char *name = NULL; + + read_dword(ptr, &offset); + TRACE("Technique name offset: %#x\n", offset); + hr = d3dx9_parse_name(&name, data + offset); + if (hr != D3D_OK) + { + WARN("Failed to parse name\n"); + goto err_out; + } + + read_dword(ptr, &technique->annotation_count); + TRACE("Annotation count: %u\n", technique->annotation_count); + + read_dword(ptr, &technique->pass_count); + TRACE("Pass count: %u\n", technique->pass_count); + + if (technique->annotation_count) + { + technique->annotations = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + sizeof(*technique->annotations) * technique->annotation_count); + if (!technique->annotations) + { + ERR("Out of memory\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + + for (i = 0; i < technique->annotation_count; ++i) + { + hr = d3dx9_parse_effect_annotation(&technique->annotations[i], data, ptr, objects); + if (hr != D3D_OK) + { + WARN("Failed to parse annotation %u\n", i); + goto err_out; + } + } + } + + if (technique->pass_count) + { + technique->passes = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + sizeof(*technique->passes) * technique->pass_count); + if (!technique->passes) + { + ERR("Out of memory\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + + for (i = 0; i < technique->pass_count; ++i) + { + hr = d3dx9_parse_effect_pass(&technique->passes[i], data, ptr, objects); + if (hr != D3D_OK) + { + WARN("Failed to parse pass %u\n", i); + goto err_out; + } + } + } + + technique->name = name; + + return D3D_OK; + +err_out: + + if (technique->passes) + { + for (i = 0; i < technique->pass_count; ++i) + free_pass(&technique->passes[i]); + HeapFree(GetProcessHeap(), 0, technique->passes); + technique->passes = NULL; + } + + if (technique->annotations) + { + for (i = 0; i < technique->annotation_count; ++i) + free_parameter(&technique->annotations[i], FALSE, FALSE); + HeapFree(GetProcessHeap(), 0, technique->annotations); + technique->annotations = NULL; + } + + HeapFree(GetProcessHeap(), 0, name); + + return hr; +} + +static HRESULT d3dx9_parse_resource(struct d3dx9_base_effect *base, const char *data, const char **ptr) +{ + DWORD technique_index; + DWORD index, state_index, usage, element_index; + struct d3dx_state *state; + struct d3dx_parameter *param; + HRESULT hr = E_FAIL; + + read_dword(ptr, &technique_index); + TRACE("techn: %u\n", technique_index); + + read_dword(ptr, &index); + TRACE("index: %u\n", index); + + read_dword(ptr, &element_index); + TRACE("element_index: %u\n", element_index); + + read_dword(ptr, &state_index); + TRACE("state_index: %u\n", state_index); + + read_dword(ptr, &usage); + TRACE("usage: %u\n", usage); + + if (technique_index == 0xffffffff) + { + struct d3dx_parameter *parameter; + struct d3dx_sampler *sampler; + + if (index >= base->parameter_count) + { + FIXME("Index out of bounds: index %u >= parameter_count %u\n", index, base->parameter_count); + return E_FAIL; + } + + parameter = &base->parameters[index]; + if (element_index != 0xffffffff) + { + if (element_index >= parameter->element_count && parameter->element_count != 0) + { + FIXME("Index out of bounds: element_index %u >= element_count %u\n", element_index, parameter->element_count); + return E_FAIL; + } + + if (parameter->element_count != 0) parameter = ¶meter->members[element_index]; + } + + sampler = parameter->data; + if (state_index >= sampler->state_count) + { + FIXME("Index out of bounds: state_index %u >= state_count %u\n", state_index, sampler->state_count); + return E_FAIL; + } + + state = &sampler->states[state_index]; + } + else + { + struct d3dx_technique *technique; + struct d3dx_pass *pass; + + if (technique_index >= base->technique_count) + { + FIXME("Index out of bounds: technique_index %u >= technique_count %u\n", technique_index, base->technique_count); + return E_FAIL; + } + + technique = &base->techniques[technique_index]; + if (index >= technique->pass_count) + { + FIXME("Index out of bounds: index %u >= pass_count %u\n", index, technique->pass_count); + return E_FAIL; + } + + pass = &technique->passes[index]; + if (state_index >= pass->state_count) + { + FIXME("Index out of bounds: state_index %u >= state_count %u\n", state_index, pass->state_count); + return E_FAIL; + } + + state = &pass->states[state_index]; + } + + param = state->parameter; + + switch (usage) + { + case 0: + TRACE("usage 0: type %s\n", debug_d3dxparameter_type(param->type)); + switch (param->type) + { + case D3DXPT_VERTEXSHADER: + case D3DXPT_PIXELSHADER: + state->type = ST_CONSTANT; + hr = d3dx9_parse_data(param, ptr, base->effect->device); + break; + + case D3DXPT_BOOL: + case D3DXPT_INT: + case D3DXPT_FLOAT: + case D3DXPT_STRING: + state->type = ST_FXLC; + hr = d3dx9_copy_data(param->data, ptr); + break; + + default: + FIXME("Unhandled type %s\n", debug_d3dxparameter_type(param->type)); + break; + } + break; + + case 1: + state->type = ST_PARAMETER; + hr = d3dx9_copy_data(param->data, ptr); + if (hr == D3D_OK) + { + TRACE("Mapping to parameter %s\n", *(char **)param->data); + } + break; + + default: + FIXME("Unknown usage %x\n", usage); + break; + } + + return hr; +} + +static HRESULT d3dx9_parse_effect(struct d3dx9_base_effect *base, const char *data, UINT data_size, DWORD start) +{ + const char *ptr = data + start; + D3DXHANDLE *objects = NULL; + UINT stringcount, objectcount, resourcecount; + HRESULT hr; + UINT i; + + read_dword(&ptr, &base->parameter_count); + TRACE("Parameter count: %u\n", base->parameter_count); + + read_dword(&ptr, &base->technique_count); + TRACE("Technique count: %u\n", base->technique_count); + + skip_dword_unknown(&ptr, 1); + + read_dword(&ptr, &objectcount); + TRACE("Object count: %u\n", objectcount); + + objects = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*objects) * objectcount); + if (!objects) + { + ERR("Out of memory\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + + if (base->parameter_count) + { + base->parameters = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + sizeof(*base->parameters) * base->parameter_count); + if (!base->parameters) + { + ERR("Out of memory\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + + for (i = 0; i < base->parameter_count; ++i) + { + hr = d3dx9_parse_effect_parameter(&base->parameters[i], data, &ptr, objects); + if (hr != D3D_OK) + { + WARN("Failed to parse parameter %u\n", i); + goto err_out; + } + } + } + + if (base->technique_count) + { + base->techniques = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + sizeof(*base->techniques) * base->technique_count); + if (!base->techniques) + { + ERR("Out of memory\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + + for (i = 0; i < base->technique_count; ++i) + { + hr = d3dx9_parse_effect_technique(&base->techniques[i], data, &ptr, objects); + if (hr != D3D_OK) + { + WARN("Failed to parse technique %u\n", i); + goto err_out; + } + } + } + + read_dword(&ptr, &stringcount); + TRACE("String count: %u\n", stringcount); + + read_dword(&ptr, &resourcecount); + TRACE("Resource count: %u\n", resourcecount); + + for (i = 0; i < stringcount; ++i) + { + DWORD id; + struct d3dx_parameter *param; + + read_dword(&ptr, &id); + TRACE("Id: %u\n", id); + + param = get_parameter_struct(objects[id]); + + hr = d3dx9_parse_data(param, &ptr, base->effect->device); + if (hr != D3D_OK) + { + WARN("Failed to parse data %u\n", i); + goto err_out; + } + } + + for (i = 0; i < resourcecount; ++i) + { + TRACE("parse resource %u\n", i); + + hr = d3dx9_parse_resource(base, data, &ptr); + if (hr != D3D_OK) + { + WARN("Failed to parse resource %u\n", i); + goto err_out; + } + } + + HeapFree(GetProcessHeap(), 0, objects); + + return D3D_OK; + +err_out: + + if (base->techniques) + { + for (i = 0; i < base->technique_count; ++i) + free_technique(&base->techniques[i]); + HeapFree(GetProcessHeap(), 0, base->techniques); + base->techniques = NULL; + } + + if (base->parameters) + { + for (i = 0; i < base->parameter_count; ++i) + { + free_parameter(&base->parameters[i], FALSE, FALSE); + } + HeapFree(GetProcessHeap(), 0, base->parameters); + base->parameters = NULL; + } + + HeapFree(GetProcessHeap(), 0, objects); + + return hr; +} + +static HRESULT d3dx9_base_effect_init(struct d3dx9_base_effect *base, + const char *data, SIZE_T data_size, struct ID3DXEffectImpl *effect) +{ + DWORD tag, offset; + const char *ptr = data; + HRESULT hr; + + TRACE("base %p, data %p, data_size %lu, effect %p\n", base, data, data_size, effect); + + base->effect = effect; + + read_dword(&ptr, &tag); + TRACE("Tag: %x\n", tag); + + if (tag != d3dx9_effect_version(9, 1)) + { + /* todo: compile hlsl ascii code */ + FIXME("HLSL ascii effects not supported, yet\n"); + + /* Show the start of the shader for debugging info. */ + TRACE("effect:\n%s\n", debugstr_an(data, data_size > 40 ? 40 : data_size)); + } + else + { + read_dword(&ptr, &offset); + TRACE("Offset: %x\n", offset); + + hr = d3dx9_parse_effect(base, ptr, data_size, offset); + if (hr != D3D_OK) + { + FIXME("Failed to parse effect.\n"); + return hr; + } + } + + return D3D_OK; +} + +static HRESULT d3dx9_effect_init(struct ID3DXEffectImpl *effect, struct IDirect3DDevice9 *device, + const char *data, SIZE_T data_size, struct ID3DXEffectPool *pool) +{ + HRESULT hr; + + TRACE("effect %p, device %p, data %p, data_size %lu, pool %p\n", effect, device, data, data_size, pool); + + effect->ID3DXEffect_iface.lpVtbl = &ID3DXEffect_Vtbl; + effect->ref = 1; + + if (pool) pool->lpVtbl->AddRef(pool); + effect->pool = pool; + + IDirect3DDevice9_AddRef(device); + effect->device = device; + + if (FAILED(hr = d3dx9_base_effect_init(&effect->base_effect, data, data_size, effect))) + { + FIXME("Failed to parse effect, hr %#x.\n", hr); + free_effect(effect); + return hr; + } + + /* initialize defaults - check because of unsupported ascii effects */ + if (effect->base_effect.techniques) + { + effect->active_technique = &effect->base_effect.techniques[0]; + effect->active_pass = NULL; + } + + return D3D_OK; +} + +HRESULT WINAPI D3DXCreateEffectEx(struct IDirect3DDevice9 *device, const void *srcdata, UINT srcdatalen, + const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skip_constants, DWORD flags, + struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors) +{ + struct ID3DXEffectImpl *object; + HRESULT hr; + + FIXME("(%p, %p, %u, %p, %p, %p, %#x, %p, %p, %p): semi-stub\n", device, srcdata, srcdatalen, defines, include, + skip_constants, flags, pool, effect, compilation_errors); + + if (compilation_errors) + *compilation_errors = NULL; + + if (!device || !srcdata) + return D3DERR_INVALIDCALL; + + if (!srcdatalen) + return E_FAIL; + + /* Native dll allows effect to be null so just return D3D_OK after doing basic checks */ + if (!effect) + return D3D_OK; + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + return E_OUTOFMEMORY; + + hr = d3dx9_effect_init(object, device, srcdata, srcdatalen, pool); + if (FAILED(hr)) + { + WARN("Failed to initialize shader reflection\n"); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + + *effect = &object->ID3DXEffect_iface; + + TRACE("Created ID3DXEffect %p\n", object); + + return D3D_OK; +} + +HRESULT WINAPI D3DXCreateEffect(struct IDirect3DDevice9 *device, const void *srcdata, UINT srcdatalen, + const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags, + struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilation_errors) +{ + TRACE("(%p, %p, %u, %p, %p, %#x, %p, %p, %p): Forwarded to D3DXCreateEffectEx\n", device, srcdata, srcdatalen, defines, + include, flags, pool, effect, compilation_errors); + + return D3DXCreateEffectEx(device, srcdata, srcdatalen, defines, include, NULL, flags, pool, effect, compilation_errors); +} + +static HRESULT d3dx9_effect_compiler_init(struct ID3DXEffectCompilerImpl *compiler, const char *data, SIZE_T data_size) +{ + HRESULT hr; + + TRACE("effect %p, data %p, data_size %lu\n", compiler, data, data_size); + + compiler->ID3DXEffectCompiler_iface.lpVtbl = &ID3DXEffectCompiler_Vtbl; + compiler->ref = 1; + + if (FAILED(hr = d3dx9_base_effect_init(&compiler->base_effect, data, data_size, NULL))) + { + FIXME("Failed to parse effect, hr %#x.\n", hr); + free_effect_compiler(compiler); + return hr; + } + + return D3D_OK; +} + +HRESULT WINAPI D3DXCreateEffectCompiler(const char *srcdata, UINT srcdatalen, const D3DXMACRO *defines, + ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **compiler, ID3DXBuffer **parse_errors) +{ + struct ID3DXEffectCompilerImpl *object; + HRESULT hr; + + TRACE("srcdata %p, srcdatalen %u, defines %p, include %p, flags %#x, compiler %p, parse_errors %p\n", + srcdata, srcdatalen, defines, include, flags, compiler, parse_errors); + + if (!srcdata || !compiler) + { + WARN("Invalid arguments supplied\n"); + return D3DERR_INVALIDCALL; + } + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + return E_OUTOFMEMORY; + + hr = d3dx9_effect_compiler_init(object, srcdata, srcdatalen); + if (FAILED(hr)) + { + WARN("Failed to initialize effect compiler\n"); + HeapFree(GetProcessHeap(), 0, object); + return hr; + } + + *compiler = &object->ID3DXEffectCompiler_iface; + + TRACE("Created ID3DXEffectCompiler %p\n", object); + + return D3D_OK; +} + +struct ID3DXEffectPoolImpl +{ + ID3DXEffectPool ID3DXEffectPool_iface; + LONG ref; +}; + +static inline struct ID3DXEffectPoolImpl *impl_from_ID3DXEffectPool(ID3DXEffectPool *iface) +{ + return CONTAINING_RECORD(iface, struct ID3DXEffectPoolImpl, ID3DXEffectPool_iface); +} + +/*** IUnknown methods ***/ +static HRESULT WINAPI ID3DXEffectPoolImpl_QueryInterface(ID3DXEffectPool *iface, REFIID riid, void **object) +{ + TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), object); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_ID3DXEffectPool)) + { + iface->lpVtbl->AddRef(iface); + *object = iface; + return S_OK; + } + + WARN("Interface %s not found\n", debugstr_guid(riid)); + + return E_NOINTERFACE; +} + +static ULONG WINAPI ID3DXEffectPoolImpl_AddRef(ID3DXEffectPool *iface) +{ + struct ID3DXEffectPoolImpl *This = impl_from_ID3DXEffectPool(iface); + + TRACE("(%p)->(): AddRef from %u\n", This, This->ref); + + return InterlockedIncrement(&This->ref); +} + +static ULONG WINAPI ID3DXEffectPoolImpl_Release(ID3DXEffectPool *iface) +{ + struct ID3DXEffectPoolImpl *This = impl_from_ID3DXEffectPool(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(): Release from %u\n", This, ref + 1); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +static const struct ID3DXEffectPoolVtbl ID3DXEffectPool_Vtbl = +{ + /*** IUnknown methods ***/ + ID3DXEffectPoolImpl_QueryInterface, + ID3DXEffectPoolImpl_AddRef, + ID3DXEffectPoolImpl_Release +}; + +HRESULT WINAPI D3DXCreateEffectPool(ID3DXEffectPool **pool) +{ + struct ID3DXEffectPoolImpl *object; + + TRACE("(%p)\n", pool); + + if (!pool) + return D3DERR_INVALIDCALL; + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + return E_OUTOFMEMORY; + + object->ID3DXEffectPool_iface.lpVtbl = &ID3DXEffectPool_Vtbl; + object->ref = 1; + + *pool = &object->ID3DXEffectPool_iface; + + return S_OK; +} + +HRESULT WINAPI D3DXCreateEffectFromFileExW(struct IDirect3DDevice9 *device, const WCHAR *srcfile, + const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skipconstants, DWORD flags, + struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors) +{ + LPVOID buffer; + HRESULT ret; + DWORD size; + + TRACE("(%s): relay\n", debugstr_w(srcfile)); + + if (!device || !srcfile) + return D3DERR_INVALIDCALL; + + ret = map_view_of_file(srcfile, &buffer, &size); + + if (FAILED(ret)) + return D3DXERR_INVALIDDATA; + + ret = D3DXCreateEffectEx(device, buffer, size, defines, include, skipconstants, flags, pool, effect, compilationerrors); + UnmapViewOfFile(buffer); + + return ret; +} + +HRESULT WINAPI D3DXCreateEffectFromFileExA(struct IDirect3DDevice9 *device, const char *srcfile, + const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skipconstants, DWORD flags, + struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors) +{ + LPWSTR srcfileW; + HRESULT ret; + DWORD len; + + TRACE("(void): relay\n"); + + if (!srcfile) + return D3DERR_INVALIDCALL; + + len = MultiByteToWideChar(CP_ACP, 0, srcfile, -1, NULL, 0); + srcfileW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(*srcfileW)); + MultiByteToWideChar(CP_ACP, 0, srcfile, -1, srcfileW, len); + + ret = D3DXCreateEffectFromFileExW(device, srcfileW, defines, include, skipconstants, flags, pool, effect, compilationerrors); + HeapFree(GetProcessHeap(), 0, srcfileW); + + return ret; +} + +HRESULT WINAPI D3DXCreateEffectFromFileW(struct IDirect3DDevice9 *device, const WCHAR *srcfile, + const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags, struct ID3DXEffectPool *pool, + struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors) +{ + TRACE("(void): relay\n"); + return D3DXCreateEffectFromFileExW(device, srcfile, defines, include, NULL, flags, pool, effect, compilationerrors); +} + +HRESULT WINAPI D3DXCreateEffectFromFileA(struct IDirect3DDevice9 *device, const char *srcfile, + const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags, struct ID3DXEffectPool *pool, + struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors) +{ + TRACE("(void): relay\n"); + return D3DXCreateEffectFromFileExA(device, srcfile, defines, include, NULL, flags, pool, effect, compilationerrors); +} + +HRESULT WINAPI D3DXCreateEffectFromResourceExW(struct IDirect3DDevice9 *device, HMODULE srcmodule, + const WCHAR *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skipconstants, + DWORD flags, struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors) +{ + HRSRC resinfo; + void *buffer; + DWORD size; + + TRACE("device %p, srcmodule %p, srcresource %s, defines %p, include %p, skipconstants %s, " + "flags %#x, pool %p, effect %p, compilationerrors %p.\n", + device, srcmodule, debugstr_w(srcresource), defines, include, debugstr_a(skipconstants), + flags, pool, effect, compilationerrors); + + if (!device) + return D3DERR_INVALIDCALL; + + if (!(resinfo = FindResourceW(srcmodule, srcresource, (const WCHAR *)RT_RCDATA))) + return D3DXERR_INVALIDDATA; + + if (FAILED(load_resource_into_memory(srcmodule, resinfo, &buffer, &size))) + return D3DXERR_INVALIDDATA; + + return D3DXCreateEffectEx(device, buffer, size, defines, include, + skipconstants, flags, pool, effect, compilationerrors); +} + +HRESULT WINAPI D3DXCreateEffectFromResourceExA(struct IDirect3DDevice9 *device, HMODULE srcmodule, + const char *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, const char *skipconstants, + DWORD flags, struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors) +{ + HRSRC resinfo; + void *buffer; + DWORD size; + + TRACE("device %p, srcmodule %p, srcresource %s, defines %p, include %p, skipconstants %s, " + "flags %#x, pool %p, effect %p, compilationerrors %p.\n", + device, srcmodule, debugstr_a(srcresource), defines, include, debugstr_a(skipconstants), + flags, pool, effect, compilationerrors); + + if (!device) + return D3DERR_INVALIDCALL; + + if (!(resinfo = FindResourceA(srcmodule, srcresource, (const char *)RT_RCDATA))) + return D3DXERR_INVALIDDATA; + + if (FAILED(load_resource_into_memory(srcmodule, resinfo, &buffer, &size))) + return D3DXERR_INVALIDDATA; + + return D3DXCreateEffectEx(device, buffer, size, defines, include, + skipconstants, flags, pool, effect, compilationerrors); +} + +HRESULT WINAPI D3DXCreateEffectFromResourceW(struct IDirect3DDevice9 *device, HMODULE srcmodule, + const WCHAR *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags, + struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors) +{ + TRACE("(void): relay\n"); + return D3DXCreateEffectFromResourceExW(device, srcmodule, srcresource, defines, include, NULL, flags, pool, effect, compilationerrors); +} + +HRESULT WINAPI D3DXCreateEffectFromResourceA(struct IDirect3DDevice9 *device, HMODULE srcmodule, + const char *srcresource, const D3DXMACRO *defines, struct ID3DXInclude *include, DWORD flags, + struct ID3DXEffectPool *pool, struct ID3DXEffect **effect, struct ID3DXBuffer **compilationerrors) +{ + TRACE("(void): relay\n"); + return D3DXCreateEffectFromResourceExA(device, srcmodule, srcresource, defines, include, NULL, flags, pool, effect, compilationerrors); +} + +HRESULT WINAPI D3DXCreateEffectCompilerFromFileW(const WCHAR *srcfile, const D3DXMACRO *defines, + ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors) +{ + LPVOID buffer; + HRESULT ret; + DWORD size; + + TRACE("(%s): relay\n", debugstr_w(srcfile)); + + if (!srcfile) + return D3DERR_INVALIDCALL; + + ret = map_view_of_file(srcfile, &buffer, &size); + + if (FAILED(ret)) + return D3DXERR_INVALIDDATA; + + ret = D3DXCreateEffectCompiler(buffer, size, defines, include, flags, effectcompiler, parseerrors); + UnmapViewOfFile(buffer); + + return ret; +} + +HRESULT WINAPI D3DXCreateEffectCompilerFromFileA(const char *srcfile, const D3DXMACRO *defines, + ID3DXInclude *include, DWORD flags, ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors) +{ + LPWSTR srcfileW; + HRESULT ret; + DWORD len; + + TRACE("(void): relay\n"); + + if (!srcfile) + return D3DERR_INVALIDCALL; + + len = MultiByteToWideChar(CP_ACP, 0, srcfile, -1, NULL, 0); + srcfileW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(*srcfileW)); + MultiByteToWideChar(CP_ACP, 0, srcfile, -1, srcfileW, len); + + ret = D3DXCreateEffectCompilerFromFileW(srcfileW, defines, include, flags, effectcompiler, parseerrors); + HeapFree(GetProcessHeap(), 0, srcfileW); + + return ret; +} + +HRESULT WINAPI D3DXCreateEffectCompilerFromResourceA(HMODULE srcmodule, const char *srcresource, + const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, + ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors) +{ + HRSRC resinfo; + void *buffer; + DWORD size; + + TRACE("srcmodule %p, srcresource %s, defines %p, include %p, flags %#x, effectcompiler %p, parseerrors %p.\n", + srcmodule, debugstr_a(srcresource), defines, include, flags, effectcompiler, parseerrors); + + if (!(resinfo = FindResourceA(srcmodule, srcresource, (const char *)RT_RCDATA))) + return D3DXERR_INVALIDDATA; + + if (FAILED(load_resource_into_memory(srcmodule, resinfo, &buffer, &size))) + return D3DXERR_INVALIDDATA; + + return D3DXCreateEffectCompiler(buffer, size, defines, include, flags, effectcompiler, parseerrors); +} + +HRESULT WINAPI D3DXCreateEffectCompilerFromResourceW(HMODULE srcmodule, const WCHAR *srcresource, + const D3DXMACRO *defines, ID3DXInclude *include, DWORD flags, + ID3DXEffectCompiler **effectcompiler, ID3DXBuffer **parseerrors) +{ + HRSRC resinfo; + void *buffer; + DWORD size; + + TRACE("srcmodule %p, srcresource %s, defines %p, include %p, flags %#x, effectcompiler %p, parseerrors %p.\n", + srcmodule, debugstr_w(srcresource), defines, include, flags, effectcompiler, parseerrors); + + if (!(resinfo = FindResourceW(srcmodule, srcresource, (const WCHAR *)RT_RCDATA))) + return D3DXERR_INVALIDDATA; + + if (FAILED(load_resource_into_memory(srcmodule, resinfo, &buffer, &size))) + return D3DXERR_INVALIDDATA; + + return D3DXCreateEffectCompiler(buffer, size, defines, include, flags, effectcompiler, parseerrors); +} + +HRESULT WINAPI D3DXDisassembleEffect(ID3DXEffect *effect, BOOL enable_color_code, ID3DXBuffer **disassembly) +{ + FIXME("(%p, %u, %p): stub\n", effect, enable_color_code, disassembly); + + return D3DXERR_INVALIDDATA; +} diff --git a/dll/directx/wine/d3dx9_36/font.c b/dll/directx/wine/d3dx9_36/font.c index 0ba65d23617..bfe82c697ea 100644 --- a/dll/directx/wine/d3dx9_36/font.c +++ b/dll/directx/wine/d3dx9_36/font.c @@ -26,33 +26,55 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dx); -static HRESULT WINAPI ID3DXFontImpl_QueryInterface(LPD3DXFONT iface, REFIID riid, LPVOID *object) +struct d3dx_font { - ID3DXFontImpl *This=(ID3DXFontImpl*)iface; + ID3DXFont ID3DXFont_iface; + LONG ref; - TRACE("(%p): QueryInterface from %s\n", This, debugstr_guid(riid)); - if(IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_ID3DXFont)) { + IDirect3DDevice9 *device; + D3DXFONT_DESCW desc; + + HDC hdc; + HFONT hfont; +}; + +static inline struct d3dx_font *impl_from_ID3DXFont(ID3DXFont *iface) +{ + return CONTAINING_RECORD(iface, struct d3dx_font, ID3DXFont_iface); +} + +static HRESULT WINAPI ID3DXFontImpl_QueryInterface(ID3DXFont *iface, REFIID riid, void **out) +{ + TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out); + + if (IsEqualGUID(riid, &IID_ID3DXFont) + || IsEqualGUID(riid, &IID_IUnknown)) + { IUnknown_AddRef(iface); - *object=This; + *out = iface; return S_OK; } - WARN("(%p)->(%s, %p): not found\n", iface, debugstr_guid(riid), *object); + + WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); + + *out = NULL; return E_NOINTERFACE; } -static ULONG WINAPI ID3DXFontImpl_AddRef(LPD3DXFONT iface) +static ULONG WINAPI ID3DXFontImpl_AddRef(ID3DXFont *iface) { - ID3DXFontImpl *This=(ID3DXFontImpl*)iface; + struct d3dx_font *This = impl_from_ID3DXFont(iface); ULONG ref=InterlockedIncrement(&This->ref); - TRACE("(%p): AddRef from %d\n", This, ref-1); + TRACE("%p increasing refcount to %u\n", iface, ref); return ref; } -static ULONG WINAPI ID3DXFontImpl_Release(LPD3DXFONT iface) +static ULONG WINAPI ID3DXFontImpl_Release(ID3DXFont *iface) { - ID3DXFontImpl *This=(ID3DXFontImpl*)iface; + struct d3dx_font *This = impl_from_ID3DXFont(iface); ULONG ref=InterlockedDecrement(&This->ref); - TRACE("(%p): ReleaseRef to %d\n", This, ref); + + TRACE("%p decreasing refcount to %u\n", iface, ref); if(ref==0) { DeleteObject(This->hfont); @@ -63,10 +85,11 @@ static ULONG WINAPI ID3DXFontImpl_Release(LPD3DXFONT iface) return ref; } -static HRESULT WINAPI ID3DXFontImpl_GetDevice(LPD3DXFONT iface, LPDIRECT3DDEVICE9 *device) +static HRESULT WINAPI ID3DXFontImpl_GetDevice(ID3DXFont *iface, IDirect3DDevice9 **device) { - ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - TRACE("(%p)\n", This); + struct d3dx_font *This = impl_from_ID3DXFont(iface); + + TRACE("iface %p, device %p\n", iface, device); if( !device ) return D3DERR_INVALIDCALL; *device = This->device; @@ -75,10 +98,11 @@ static HRESULT WINAPI ID3DXFontImpl_GetDevice(LPD3DXFONT iface, LPDIRECT3DDEVICE return D3D_OK; } -static HRESULT WINAPI ID3DXFontImpl_GetDescA(LPD3DXFONT iface, D3DXFONT_DESCA *desc) +static HRESULT WINAPI ID3DXFontImpl_GetDescA(ID3DXFont *iface, D3DXFONT_DESCA *desc) { - ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - TRACE("(%p)\n", This); + struct d3dx_font *This = impl_from_ID3DXFont(iface); + + TRACE("iface %p, desc %p\n", iface, desc); if( !desc ) return D3DERR_INVALIDCALL; memcpy(desc, &This->desc, FIELD_OFFSET(D3DXFONT_DESCA, FaceName)); @@ -87,10 +111,11 @@ static HRESULT WINAPI ID3DXFontImpl_GetDescA(LPD3DXFONT iface, D3DXFONT_DESCA *d return D3D_OK; } -static HRESULT WINAPI ID3DXFontImpl_GetDescW(LPD3DXFONT iface, D3DXFONT_DESCW *desc) +static HRESULT WINAPI ID3DXFontImpl_GetDescW(ID3DXFont *iface, D3DXFONT_DESCW *desc) { - ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - TRACE("(%p)\n", This); + struct d3dx_font *This = impl_from_ID3DXFont(iface); + + TRACE("iface %p, desc %p\n", iface, desc); if( !desc ) return D3DERR_INVALIDCALL; *desc = This->desc; @@ -98,87 +123,84 @@ static HRESULT WINAPI ID3DXFontImpl_GetDescW(LPD3DXFONT iface, D3DXFONT_DESCW *d return D3D_OK; } -static BOOL WINAPI ID3DXFontImpl_GetTextMetricsA(LPD3DXFONT iface, TEXTMETRICA *metrics) +static BOOL WINAPI ID3DXFontImpl_GetTextMetricsA(ID3DXFont *iface, TEXTMETRICA *metrics) { - ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - TRACE("(%p)\n", This); + struct d3dx_font *This = impl_from_ID3DXFont(iface); + TRACE("iface %p, metrics %p\n", iface, metrics); return GetTextMetricsA(This->hdc, metrics); } -static BOOL WINAPI ID3DXFontImpl_GetTextMetricsW(LPD3DXFONT iface, TEXTMETRICW *metrics) +static BOOL WINAPI ID3DXFontImpl_GetTextMetricsW(ID3DXFont *iface, TEXTMETRICW *metrics) { - ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - TRACE("(%p)\n", This); + struct d3dx_font *This = impl_from_ID3DXFont(iface); + TRACE("iface %p, metrics %p\n", iface, metrics); return GetTextMetricsW(This->hdc, metrics); } -static HDC WINAPI ID3DXFontImpl_GetDC(LPD3DXFONT iface) +static HDC WINAPI ID3DXFontImpl_GetDC(ID3DXFont *iface) { - ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - TRACE("(%p)\n", This); + struct d3dx_font *This = impl_from_ID3DXFont(iface); + TRACE("iface %p\n", iface); return This->hdc; } -static HRESULT WINAPI ID3DXFontImpl_GetGlyphData(LPD3DXFONT iface, UINT glyph, LPDIRECT3DTEXTURE9 *texture, RECT *blackbox, POINT *cellinc) +static HRESULT WINAPI ID3DXFontImpl_GetGlyphData(ID3DXFont *iface, UINT glyph, + IDirect3DTexture9 **texture, RECT *blackbox, POINT *cellinc) { - ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - FIXME("(%p): stub\n", This); - return D3D_OK; + FIXME("iface %p, glyph %#x, texture %p, blackbox %s, cellinc %s stub!\n", + iface, glyph, texture, wine_dbgstr_rect(blackbox), wine_dbgstr_point(cellinc)); + return E_NOTIMPL; } -static HRESULT WINAPI ID3DXFontImpl_PreloadCharacters(LPD3DXFONT iface, UINT first, UINT last) +static HRESULT WINAPI ID3DXFontImpl_PreloadCharacters(ID3DXFont *iface, UINT first, UINT last) { - ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - FIXME("(%p): stub\n", This); - return D3D_OK; + FIXME("iface %p, first %u, last %u stub!\n", iface, first, last); + return E_NOTIMPL; } -static HRESULT WINAPI ID3DXFontImpl_PreloadGlyphs(LPD3DXFONT iface, UINT first, UINT last) +static HRESULT WINAPI ID3DXFontImpl_PreloadGlyphs(ID3DXFont *iface, UINT first, UINT last) { - ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - FIXME("(%p): stub\n", This); - return D3D_OK; + FIXME("iface %p, first %u, last %u stub!\n", iface, first, last); + return E_NOTIMPL; } -static HRESULT WINAPI ID3DXFontImpl_PreloadTextA(LPD3DXFONT iface, LPCSTR string, INT count) +static HRESULT WINAPI ID3DXFontImpl_PreloadTextA(ID3DXFont *iface, const char *string, INT count) { - ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - FIXME("(%p): stub\n", This); - return D3D_OK; + FIXME("iface %p, string %s, count %d stub!\n", iface, debugstr_a(string), count); + return E_NOTIMPL; } -static HRESULT WINAPI ID3DXFontImpl_PreloadTextW(LPD3DXFONT iface, LPCWSTR string, INT count) +static HRESULT WINAPI ID3DXFontImpl_PreloadTextW(ID3DXFont *iface, const WCHAR *string, INT count) { - ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - FIXME("(%p): stub\n", This); - return D3D_OK; + FIXME("iface %p, string %s, count %d stub!\n", iface, debugstr_w(string), count); + return E_NOTIMPL; } -static INT WINAPI ID3DXFontImpl_DrawTextA(LPD3DXFONT iface, LPD3DXSPRITE sprite, LPCSTR string, INT count, LPRECT rect, DWORD format, D3DCOLOR color) +static INT WINAPI ID3DXFontImpl_DrawTextA(ID3DXFont *iface, ID3DXSprite *sprite, + const char *string, INT count, RECT *rect, DWORD format, D3DCOLOR color) { - ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - FIXME("(%p): stub\n", This); + FIXME("iface %p, sprite %p, string %s, count %d, rect %s, format %#x, color 0x%08x stub!\n", + iface, sprite, debugstr_a(string), count, wine_dbgstr_rect(rect), format, color); return 1; } -static INT WINAPI ID3DXFontImpl_DrawTextW(LPD3DXFONT iface, LPD3DXSPRITE sprite, LPCWSTR string, INT count, LPRECT rect, DWORD format, D3DCOLOR color) +static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite, + const WCHAR *string, INT count, RECT *rect, DWORD format, D3DCOLOR color) { - ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - FIXME("(%p): stub\n", This); + FIXME("iface %p, sprite %p, string %s, count %d, rect %s, format %#x, color 0x%08x stub!\n", + iface, sprite, debugstr_w(string), count, wine_dbgstr_rect(rect), format, color); return 1; } -static HRESULT WINAPI ID3DXFontImpl_OnLostDevice(LPD3DXFONT iface) +static HRESULT WINAPI ID3DXFontImpl_OnLostDevice(ID3DXFont *iface) { - ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - FIXME("(%p): stub\n", This); + FIXME("iface %p stub!\n", iface); return D3D_OK; } -static HRESULT WINAPI ID3DXFontImpl_OnResetDevice(LPD3DXFONT iface) +static HRESULT WINAPI ID3DXFontImpl_OnResetDevice(ID3DXFont *iface) { - ID3DXFontImpl *This=(ID3DXFontImpl*)iface; - FIXME("(%p): stub\n", This); + FIXME("iface %p stub\n", iface); return D3D_OK; } @@ -206,8 +228,9 @@ static const ID3DXFontVtbl D3DXFont_Vtbl = ID3DXFontImpl_OnResetDevice }; -HRESULT WINAPI D3DXCreateFontA(LPDIRECT3DDEVICE9 device, INT height, UINT width, UINT weight, UINT miplevels, BOOL italic, DWORD charset, - DWORD precision, DWORD quality, DWORD pitchandfamily, LPCSTR facename, LPD3DXFONT *font) +HRESULT WINAPI D3DXCreateFontA(struct IDirect3DDevice9 *device, INT height, UINT width, + UINT weight, UINT miplevels, BOOL italic, DWORD charset, DWORD precision, DWORD quality, + DWORD pitchandfamily, const char *facename, struct ID3DXFont **font) { D3DXFONT_DESCA desc; @@ -228,8 +251,8 @@ HRESULT WINAPI D3DXCreateFontA(LPDIRECT3DDEVICE9 device, INT height, UINT width, return D3DXCreateFontIndirectA(device, &desc, font); } -HRESULT WINAPI D3DXCreateFontW(LPDIRECT3DDEVICE9 device, INT height, UINT width, UINT weight, UINT miplevels, BOOL italic, DWORD charset, - DWORD precision, DWORD quality, DWORD pitchandfamily, LPCWSTR facename, LPD3DXFONT *font) +HRESULT WINAPI D3DXCreateFontW(IDirect3DDevice9 *device, INT height, UINT width, UINT weight, UINT miplevels, BOOL italic, DWORD charset, + DWORD precision, DWORD quality, DWORD pitchandfamily, const WCHAR *facename, ID3DXFont **font) { D3DXFONT_DESCW desc; @@ -253,7 +276,7 @@ HRESULT WINAPI D3DXCreateFontW(LPDIRECT3DDEVICE9 device, INT height, UINT width, /*********************************************************************** * D3DXCreateFontIndirectA (D3DX9_36.@) */ -HRESULT WINAPI D3DXCreateFontIndirectA(LPDIRECT3DDEVICE9 device, CONST D3DXFONT_DESCA *desc, LPD3DXFONT *font) +HRESULT WINAPI D3DXCreateFontIndirectA(IDirect3DDevice9 *device, const D3DXFONT_DESCA *desc, ID3DXFont **font) { D3DXFONT_DESCW widedesc; @@ -270,14 +293,15 @@ HRESULT WINAPI D3DXCreateFontIndirectA(LPDIRECT3DDEVICE9 device, CONST D3DXFONT_ /*********************************************************************** * D3DXCreateFontIndirectW (D3DX9_36.@) */ -HRESULT WINAPI D3DXCreateFontIndirectW(LPDIRECT3DDEVICE9 device, CONST D3DXFONT_DESCW *desc, LPD3DXFONT *font) +HRESULT WINAPI D3DXCreateFontIndirectW(IDirect3DDevice9 *device, const D3DXFONT_DESCW *desc, ID3DXFont **font) { D3DDEVICE_CREATION_PARAMETERS cpars; D3DDISPLAYMODE mode; - ID3DXFontImpl *object; + struct d3dx_font *object; IDirect3D9 *d3d; HRESULT hr; - FIXME("stub\n"); + + TRACE("(%p, %p, %p)\n", device, desc, font); if( !device || !desc || !font ) return D3DERR_INVALIDCALL; @@ -292,12 +316,12 @@ HRESULT WINAPI D3DXCreateFontIndirectW(LPDIRECT3DDEVICE9 device, CONST D3DXFONT_ } IDirect3D9_Release(d3d); - object=HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ID3DXFontImpl)); + object = HeapAlloc(GetProcessHeap(), 0, sizeof(struct d3dx_font)); if(object==NULL) { *font=NULL; return E_OUTOFMEMORY; } - object->lpVtbl=&D3DXFont_Vtbl; + object->ID3DXFont_iface.lpVtbl = &D3DXFont_Vtbl; object->ref=1; object->device=device; object->desc=*desc; @@ -318,7 +342,7 @@ HRESULT WINAPI D3DXCreateFontIndirectW(LPDIRECT3DDEVICE9 device, CONST D3DXFONT_ SelectObject(object->hdc, object->hfont); IDirect3DDevice9_AddRef(device); - *font=(LPD3DXFONT)object; + *font=&object->ID3DXFont_iface; return D3D_OK; } diff --git a/dll/directx/wine/d3dx9_36/line.c b/dll/directx/wine/d3dx9_36/line.c new file mode 100644 index 00000000000..a9f53a79a50 --- /dev/null +++ b/dll/directx/wine/d3dx9_36/line.c @@ -0,0 +1,351 @@ +/* + * Copyright 2010 Christian Costa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "wine/debug.h" +#include "d3dx9_36_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(d3dx); + +typedef struct ID3DXLineImpl { + ID3DXLine ID3DXLine_iface; + LONG ref; + + IDirect3DDevice9 *device; + IDirect3DStateBlock9 *state; +} ID3DXLineImpl; + +static inline ID3DXLineImpl *impl_from_ID3DXLine(ID3DXLine *iface) +{ + return CONTAINING_RECORD(iface, ID3DXLineImpl, ID3DXLine_iface); +} + +/*** IUnknown methods ***/ +static HRESULT WINAPI ID3DXLineImpl_QueryInterface(ID3DXLine* iface, REFIID riid, LPVOID* object) +{ + TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), object); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_ID3DXLine)) + { + ID3DXLine_AddRef(iface); + *object = iface; + return S_OK; + } + + ERR("Interface %s not found\n", debugstr_guid(riid)); + + return E_NOINTERFACE; +} + +static ULONG WINAPI ID3DXLineImpl_AddRef(ID3DXLine* iface) +{ + ID3DXLineImpl *This = impl_from_ID3DXLine(iface); + + TRACE("(%p)->(): AddRef from %u\n", This, This->ref); + + return InterlockedIncrement(&This->ref); +} + +static ULONG WINAPI ID3DXLineImpl_Release(ID3DXLine* iface) +{ + ID3DXLineImpl *This = impl_from_ID3DXLine(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(): Release from %u\n", This, ref + 1); + + if (!ref) + { + IDirect3DDevice9_Release(This->device); + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + +/*** ID3DXLine methods ***/ +static HRESULT WINAPI ID3DXLineImpl_GetDevice(struct ID3DXLine *iface, struct IDirect3DDevice9 **device) +{ + ID3DXLineImpl *This = impl_from_ID3DXLine(iface); + + TRACE ("(%p)->(%p)\n", This, device); + + if (device == NULL) return D3DERR_INVALIDCALL; + + *device = This->device; + IDirect3DDevice9_AddRef(This->device); + + return D3D_OK; +} + +static HRESULT WINAPI ID3DXLineImpl_Begin(ID3DXLine* iface) +{ + ID3DXLineImpl *This = impl_from_ID3DXLine(iface); + + HRESULT hr; + D3DXMATRIX identity, projection; + D3DVIEWPORT9 vp; + + TRACE ("(%p)->()\n", This); + + if (This->state != NULL) /* We already began. Return error. */ + return D3DERR_INVALIDCALL; + + hr = IDirect3DDevice9_CreateStateBlock(This->device, D3DSBT_ALL, &This->state); + if (FAILED(hr)) return D3DXERR_INVALIDDATA; + + hr = IDirect3DDevice9_GetViewport(This->device, &vp); + if (FAILED(hr)) goto failed; + + D3DXMatrixIdentity(&identity); + D3DXMatrixOrthoOffCenterLH(&projection, + 0.0, vp.Width, /* Min and max x */ + vp.Height, 0.0, /* Min and max y. Screen y is on top so this is inverted */ + 0.0, 1.0); /* Min and max z */ + + hr = IDirect3DDevice9_SetTransform(This->device, D3DTS_WORLD, &identity); + if (FAILED(hr)) goto failed; + + hr = IDirect3DDevice9_SetTransform(This->device, D3DTS_VIEW, &identity); + if (FAILED(hr)) goto failed; + + hr = IDirect3DDevice9_SetTransform(This->device, D3DTS_PROJECTION, &projection); + if (FAILED(hr)) goto failed; + + /* Windows sets similar states so we do the same */ + + hr = IDirect3DDevice9_SetRenderState(This->device, D3DRS_LIGHTING, FALSE); + if (FAILED(hr)) goto failed; + + hr = IDirect3DDevice9_SetRenderState(This->device, D3DRS_FOGENABLE, FALSE); + if (FAILED(hr)) goto failed; + + hr = IDirect3DDevice9_SetRenderState(This->device, D3DRS_SHADEMODE, D3DSHADE_FLAT); + if (FAILED(hr)) goto failed; + + hr = IDirect3DDevice9_SetRenderState(This->device, D3DRS_ALPHABLENDENABLE, TRUE); + if (FAILED(hr)) goto failed; + + hr = IDirect3DDevice9_SetRenderState(This->device, D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); + if (FAILED(hr)) goto failed; + + hr = IDirect3DDevice9_SetRenderState(This->device, D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); + if (FAILED(hr)) goto failed; + + return D3D_OK; +failed: + IDirect3DStateBlock9_Apply(This->state); + IDirect3DStateBlock9_Release(This->state); + This->state = NULL; + return D3DXERR_INVALIDDATA; +} + +static HRESULT WINAPI ID3DXLineImpl_Draw(ID3DXLine* iface, CONST D3DXVECTOR2* vertexlist, DWORD vertexlistcount, D3DCOLOR color) +{ + ID3DXLineImpl *This = impl_from_ID3DXLine(iface); + + FIXME("(%p)->(%p, %u, %#x): stub\n", This, vertexlist, vertexlistcount, color); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ID3DXLineImpl_DrawTransform(ID3DXLine* iface, CONST D3DXVECTOR3* vertexlist, DWORD vertexlistcount, + CONST D3DXMATRIX* transform, D3DCOLOR color) +{ + ID3DXLineImpl *This = impl_from_ID3DXLine(iface); + + FIXME("(%p)->(%p, %u, %p, %#x): stub\n", This, vertexlist, vertexlistcount, transform, color); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ID3DXLineImpl_SetPattern(ID3DXLine* iface, DWORD pattern) +{ + ID3DXLineImpl *This = impl_from_ID3DXLine(iface); + + FIXME("(%p)->(%#x): stub\n", This, pattern); + + return E_NOTIMPL; +} + +static DWORD WINAPI ID3DXLineImpl_GetPattern(ID3DXLine* iface) +{ + ID3DXLineImpl *This = impl_from_ID3DXLine(iface); + + FIXME("(%p)->(): stub\n", This); + + return 0xFFFFFFFF; +} + +static HRESULT WINAPI ID3DXLineImpl_SetPatternScale(ID3DXLine* iface, FLOAT scale) +{ + ID3DXLineImpl *This = impl_from_ID3DXLine(iface); + + FIXME("(%p)->(%f): stub\n", This, scale); + + return E_NOTIMPL; +} + +static FLOAT WINAPI ID3DXLineImpl_GetPatternScale(ID3DXLine* iface) +{ + ID3DXLineImpl *This = impl_from_ID3DXLine(iface); + + FIXME("(%p)->(): stub\n", This); + + return 1.0f; +} + +static HRESULT WINAPI ID3DXLineImpl_SetWidth(ID3DXLine* iface, FLOAT width) +{ + ID3DXLineImpl *This = impl_from_ID3DXLine(iface); + + FIXME("(%p)->(%f): stub\n", This, width); + + return E_NOTIMPL; +} + +static FLOAT WINAPI ID3DXLineImpl_GetWidth(ID3DXLine* iface) +{ + ID3DXLineImpl *This = impl_from_ID3DXLine(iface); + + FIXME("(%p)->(): stub\n", This); + + return 1.0f; +} + +static HRESULT WINAPI ID3DXLineImpl_SetAntialias(ID3DXLine* iface, BOOL antialias) +{ + ID3DXLineImpl *This = impl_from_ID3DXLine(iface); + + FIXME("(%p)->(%u): stub\n", This, antialias); + + return E_NOTIMPL; +} + +static BOOL WINAPI ID3DXLineImpl_GetAntialias(ID3DXLine* iface) +{ + ID3DXLineImpl *This = impl_from_ID3DXLine(iface); + + FIXME("(%p)->(): stub\n", This); + + return FALSE; +} + +static HRESULT WINAPI ID3DXLineImpl_SetGLLines(ID3DXLine* iface, BOOL gl_lines) +{ + ID3DXLineImpl *This = impl_from_ID3DXLine(iface); + + FIXME("(%p)->(%u): stub\n", This, gl_lines); + + return E_NOTIMPL; +} + +static BOOL WINAPI ID3DXLineImpl_GetGLLines(ID3DXLine* iface) +{ + ID3DXLineImpl *This = impl_from_ID3DXLine(iface); + + FIXME("(%p)->(): stub\n", This); + + return FALSE; +} + +static HRESULT WINAPI ID3DXLineImpl_End(ID3DXLine* iface) +{ + ID3DXLineImpl *This = impl_from_ID3DXLine(iface); + + HRESULT hr; + + TRACE ("(%p)->()\n", This); + + if (This->state == NULL) /* We haven't begun yet. */ + return D3DERR_INVALIDCALL; + + hr = IDirect3DStateBlock9_Apply(This->state); + IDirect3DStateBlock9_Release(This->state); + This->state = NULL; + + if (FAILED(hr)) return D3DXERR_INVALIDDATA; + else return D3D_OK; +} + +static HRESULT WINAPI ID3DXLineImpl_OnLostDevice(ID3DXLine* iface) +{ + ID3DXLineImpl *This = impl_from_ID3DXLine(iface); + + FIXME("(%p)->(): stub\n", This); + + return E_NOTIMPL; +} +static HRESULT WINAPI ID3DXLineImpl_OnResetDevice(ID3DXLine* iface) +{ + ID3DXLineImpl *This = impl_from_ID3DXLine(iface); + + FIXME("(%p)->(): stub\n", This); + + return E_NOTIMPL; +} + +static const struct ID3DXLineVtbl ID3DXLine_Vtbl = +{ + /*** IUnknown methods ***/ + ID3DXLineImpl_QueryInterface, + ID3DXLineImpl_AddRef, + ID3DXLineImpl_Release, + /*** ID3DXLine methods ***/ + ID3DXLineImpl_GetDevice, + ID3DXLineImpl_Begin, + ID3DXLineImpl_Draw, + ID3DXLineImpl_DrawTransform, + ID3DXLineImpl_SetPattern, + ID3DXLineImpl_GetPattern, + ID3DXLineImpl_SetPatternScale, + ID3DXLineImpl_GetPatternScale, + ID3DXLineImpl_SetWidth, + ID3DXLineImpl_GetWidth, + ID3DXLineImpl_SetAntialias, + ID3DXLineImpl_GetAntialias, + ID3DXLineImpl_SetGLLines, + ID3DXLineImpl_GetGLLines, + ID3DXLineImpl_End, + ID3DXLineImpl_OnLostDevice, + ID3DXLineImpl_OnResetDevice +}; + +HRESULT WINAPI D3DXCreateLine(struct IDirect3DDevice9 *device, struct ID3DXLine **line) +{ + ID3DXLineImpl* object; + + TRACE("(%p, %p)\n", device, line); + + if (!device || !line) + return D3DERR_INVALIDCALL; + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ID3DXLineImpl)); + if (!object) + return E_OUTOFMEMORY; + + object->ID3DXLine_iface.lpVtbl = &ID3DXLine_Vtbl; + object->ref = 1; + object->device = device; + object->state = NULL; /* We only initialize it on Begin */ + IDirect3DDevice9_AddRef(device); + + *line = &object->ID3DXLine_iface; + + return D3D_OK; +} diff --git a/dll/directx/wine/d3dx9_36/math.c b/dll/directx/wine/d3dx9_36/math.c index ed5696554fb..72a75169c32 100644 --- a/dll/directx/wine/d3dx9_36/math.c +++ b/dll/directx/wine/d3dx9_36/math.c @@ -33,12 +33,28 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dx); -static const ID3DXMatrixStackVtbl ID3DXMatrixStack_Vtbl; +#ifdef _MSC_VER +#define copysignf(x, y) ((x) < 0.0f ? -fabsf(y) : fabsf(y)) +#endif + +struct ID3DXMatrixStackImpl +{ + ID3DXMatrixStack ID3DXMatrixStack_iface; + LONG ref; + + unsigned int current; + unsigned int stack_size; + D3DXMATRIX *stack; +}; + +static const unsigned int INITIAL_STACK_SIZE = 32; /*_________________D3DXColor____________________*/ -D3DXCOLOR* WINAPI D3DXColorAdjustContrast(D3DXCOLOR *pout, CONST D3DXCOLOR *pc, FLOAT s) +D3DXCOLOR* WINAPI D3DXColorAdjustContrast(D3DXCOLOR *pout, const D3DXCOLOR *pc, FLOAT s) { + TRACE("pout %p, pc %p, s %f\n", pout, pc, s); + pout->r = 0.5f + s * (pc->r - 0.5f); pout->g = 0.5f + s * (pc->g - 0.5f); pout->b = 0.5f + s * (pc->b - 0.5f); @@ -46,10 +62,12 @@ D3DXCOLOR* WINAPI D3DXColorAdjustContrast(D3DXCOLOR *pout, CONST D3DXCOLOR *pc, return pout; } -D3DXCOLOR* WINAPI D3DXColorAdjustSaturation(D3DXCOLOR *pout, CONST D3DXCOLOR *pc, FLOAT s) +D3DXCOLOR* WINAPI D3DXColorAdjustSaturation(D3DXCOLOR *pout, const D3DXCOLOR *pc, FLOAT s) { FLOAT grey; + TRACE("pout %p, pc %p, s %f\n", pout, pc, s); + grey = pc->r * 0.2125f + pc->g * 0.7154f + pc->b * 0.0721f; pout->r = grey + s * (pc->r - grey); pout->g = grey + s * (pc->g - grey); @@ -64,102 +82,123 @@ FLOAT WINAPI D3DXFresnelTerm(FLOAT costheta, FLOAT refractionindex) { FLOAT a, d, g, result; - g = sqrt(refractionindex * refractionindex + costheta * costheta - 1.0f); + TRACE("costheta %f, refractionindex %f\n", costheta, refractionindex); + + g = sqrtf(refractionindex * refractionindex + costheta * costheta - 1.0f); a = g + costheta; d = g - costheta; - result = ( costheta * a - 1.0f ) * ( costheta * a - 1.0f ) / ( ( costheta * d + 1.0f ) * ( costheta * d + 1.0f ) ) + 1.0f; - result = result * 0.5f * d * d / ( a * a ); + result = (costheta * a - 1.0f) * (costheta * a - 1.0f) / ((costheta * d + 1.0f) * (costheta * d + 1.0f)) + 1.0f; + result *= 0.5f * d * d / (a * a); + return result; } /*_________________D3DXMatrix____________________*/ -D3DXMATRIX* WINAPI D3DXMatrixAffineTransformation(D3DXMATRIX *pout, FLOAT scaling, CONST D3DXVECTOR3 *rotationcenter, CONST D3DXQUATERNION *rotation, CONST D3DXVECTOR3 *translation) +D3DXMATRIX * WINAPI D3DXMatrixAffineTransformation(D3DXMATRIX *out, FLOAT scaling, const D3DXVECTOR3 *rotationcenter, + const D3DXQUATERNION *rotation, const D3DXVECTOR3 *translation) { - D3DXMATRIX m1, m2, m3, m4, m5; + TRACE("out %p, scaling %f, rotationcenter %p, rotation %p, translation %p\n", + out, scaling, rotationcenter, rotation, translation); - D3DXMatrixScaling(&m1, scaling, scaling, scaling); + D3DXMatrixIdentity(out); - if ( !rotationcenter ) + if (rotation) { - D3DXMatrixIdentity(&m2); - D3DXMatrixIdentity(&m4); + FLOAT temp00, temp01, temp02, temp10, temp11, temp12, temp20, temp21, temp22; + + temp00 = 1.0f - 2.0f * (rotation->y * rotation->y + rotation->z * rotation->z); + temp01 = 2.0f * (rotation->x * rotation->y + rotation->z * rotation->w); + temp02 = 2.0f * (rotation->x * rotation->z - rotation->y * rotation->w); + temp10 = 2.0f * (rotation->x * rotation->y - rotation->z * rotation->w); + temp11 = 1.0f - 2.0f * (rotation->x * rotation->x + rotation->z * rotation->z); + temp12 = 2.0f * (rotation->y * rotation->z + rotation->x * rotation->w); + temp20 = 2.0f * (rotation->x * rotation->z + rotation->y * rotation->w); + temp21 = 2.0f * (rotation->y * rotation->z - rotation->x * rotation->w); + temp22 = 1.0f - 2.0f * (rotation->x * rotation->x + rotation->y * rotation->y); + + out->u.m[0][0] = scaling * temp00; + out->u.m[0][1] = scaling * temp01; + out->u.m[0][2] = scaling * temp02; + out->u.m[1][0] = scaling * temp10; + out->u.m[1][1] = scaling * temp11; + out->u.m[1][2] = scaling * temp12; + out->u.m[2][0] = scaling * temp20; + out->u.m[2][1] = scaling * temp21; + out->u.m[2][2] = scaling * temp22; + + if (rotationcenter) + { + out->u.m[3][0] = rotationcenter->x * (1.0f - temp00) - rotationcenter->y * temp10 + - rotationcenter->z * temp20; + out->u.m[3][1] = rotationcenter->y * (1.0f - temp11) - rotationcenter->x * temp01 + - rotationcenter->z * temp21; + out->u.m[3][2] = rotationcenter->z * (1.0f - temp22) - rotationcenter->x * temp02 + - rotationcenter->y * temp12; + } } else { - D3DXMatrixTranslation(&m2, -rotationcenter->x, -rotationcenter->y, -rotationcenter->z); - D3DXMatrixTranslation(&m4, rotationcenter->x, rotationcenter->y, rotationcenter->z); + out->u.m[0][0] = scaling; + out->u.m[1][1] = scaling; + out->u.m[2][2] = scaling; } - if ( !rotation ) D3DXMatrixIdentity(&m3); - else D3DXMatrixRotationQuaternion(&m3, rotation); + if (translation) + { + out->u.m[3][0] += translation->x; + out->u.m[3][1] += translation->y; + out->u.m[3][2] += translation->z; + } - if ( !translation ) D3DXMatrixIdentity(&m5); - else D3DXMatrixTranslation(&m5, translation->x, translation->y, translation->z); - - D3DXMatrixMultiply(&m1, &m1, &m2); - D3DXMatrixMultiply(&m1, &m1, &m3); - D3DXMatrixMultiply(&m1, &m1, &m4); - D3DXMatrixMultiply(pout, &m1, &m5); - return pout; + return out; } -D3DXMATRIX* WINAPI D3DXMatrixAffineTransformation2D(D3DXMATRIX *pout, FLOAT scaling, CONST D3DXVECTOR2 *protationcenter, FLOAT rotation, CONST D3DXVECTOR2 *ptranslation) +D3DXMATRIX * WINAPI D3DXMatrixAffineTransformation2D(D3DXMATRIX *out, FLOAT scaling, + const D3DXVECTOR2 *rotationcenter, FLOAT rotation, const D3DXVECTOR2 *translation) { - D3DXMATRIX m1, m2, m3, m4, m5; - D3DXQUATERNION rot; - D3DXVECTOR3 rot_center, trans; + FLOAT tmp1, tmp2, s; - rot.w=cos(rotation/2.0f); - rot.x=0.0f; - rot.y=0.0f; - rot.z=sin(rotation/2.0f); + TRACE("out %p, scaling %f, rotationcenter %p, rotation %f, translation %p\n", + out, scaling, rotationcenter, rotation, translation); - if ( protationcenter ) + s = sinf(rotation / 2.0f); + tmp1 = 1.0f - 2.0f * s * s; + tmp2 = 2.0 * s * cosf(rotation / 2.0f); + + D3DXMatrixIdentity(out); + out->u.m[0][0] = scaling * tmp1; + out->u.m[0][1] = scaling * tmp2; + out->u.m[1][0] = -scaling * tmp2; + out->u.m[1][1] = scaling * tmp1; + + if (rotationcenter) { - rot_center.x=protationcenter->x; - rot_center.y=protationcenter->y; - rot_center.z=0.0f; - } - else - { - rot_center.x=0.0f; - rot_center.y=0.0f; - rot_center.z=0.0f; + FLOAT x, y; + + x = rotationcenter->x; + y = rotationcenter->y; + + out->u.m[3][0] = y * tmp2 - x * tmp1 + x; + out->u.m[3][1] = -x * tmp2 - y * tmp1 + y; } - if ( ptranslation ) + if (translation) { - trans.x=ptranslation->x; - trans.y=ptranslation->y; - trans.z=0.0f; - } - else - { - trans.x=0.0f; - trans.y=0.0f; - trans.z=0.0f; + out->u.m[3][0] += translation->x; + out->u.m[3][1] += translation->y; } - D3DXMatrixScaling(&m1, scaling, scaling, 1.0f); - D3DXMatrixTranslation(&m2, -rot_center.x, -rot_center.y, -rot_center.z); - D3DXMatrixTranslation(&m4, rot_center.x, rot_center.y, rot_center.z); - D3DXMatrixRotationQuaternion(&m3, &rot); - D3DXMatrixTranslation(&m5, trans.x, trans.y, trans.z); - - D3DXMatrixMultiply(&m1, &m1, &m2); - D3DXMatrixMultiply(&m1, &m1, &m3); - D3DXMatrixMultiply(&m1, &m1, &m4); - D3DXMatrixMultiply(pout, &m1, &m5); - - return pout; + return out; } -HRESULT WINAPI D3DXMatrixDecompose(D3DXVECTOR3 *poutscale, D3DXQUATERNION *poutrotation, D3DXVECTOR3 *pouttranslation, CONST D3DXMATRIX *pm) +HRESULT WINAPI D3DXMatrixDecompose(D3DXVECTOR3 *poutscale, D3DXQUATERNION *poutrotation, D3DXVECTOR3 *pouttranslation, const D3DXMATRIX *pm) { D3DXMATRIX normalized; D3DXVECTOR3 vec; + TRACE("poutscale %p, poutrotation %p, pouttranslation %p, pm %p\n", poutscale, poutrotation, pouttranslation, pm); + /*Compute the scaling part.*/ vec.x=pm->u.m[0][0]; vec.y=pm->u.m[0][1]; @@ -198,117 +237,174 @@ HRESULT WINAPI D3DXMatrixDecompose(D3DXVECTOR3 *poutscale, D3DXQUATERNION *poutr return S_OK; } -FLOAT WINAPI D3DXMatrixDeterminant(CONST D3DXMATRIX *pm) +FLOAT WINAPI D3DXMatrixDeterminant(const D3DXMATRIX *pm) { - D3DXVECTOR4 minor, v1, v2, v3; - FLOAT det; + FLOAT t[3], v[4]; - v1.x = pm->u.m[0][0]; v1.y = pm->u.m[1][0]; v1.z = pm->u.m[2][0]; v1.w = pm->u.m[3][0]; - v2.x = pm->u.m[0][1]; v2.y = pm->u.m[1][1]; v2.z = pm->u.m[2][1]; v2.w = pm->u.m[3][1]; - v3.x = pm->u.m[0][2]; v3.y = pm->u.m[1][2]; v3.z = pm->u.m[2][2]; v3.w = pm->u.m[3][2]; - D3DXVec4Cross(&minor, &v1, &v2, &v3); - det = - (pm->u.m[0][3] * minor.x + pm->u.m[1][3] * minor.y + pm->u.m[2][3] * minor.z + pm->u.m[3][3] * minor.w); - return det; + TRACE("pm %p\n", pm); + + t[0] = pm->u.m[2][2] * pm->u.m[3][3] - pm->u.m[2][3] * pm->u.m[3][2]; + t[1] = pm->u.m[1][2] * pm->u.m[3][3] - pm->u.m[1][3] * pm->u.m[3][2]; + t[2] = pm->u.m[1][2] * pm->u.m[2][3] - pm->u.m[1][3] * pm->u.m[2][2]; + v[0] = pm->u.m[1][1] * t[0] - pm->u.m[2][1] * t[1] + pm->u.m[3][1] * t[2]; + v[1] = -pm->u.m[1][0] * t[0] + pm->u.m[2][0] * t[1] - pm->u.m[3][0] * t[2]; + + t[0] = pm->u.m[1][0] * pm->u.m[2][1] - pm->u.m[2][0] * pm->u.m[1][1]; + t[1] = pm->u.m[1][0] * pm->u.m[3][1] - pm->u.m[3][0] * pm->u.m[1][1]; + t[2] = pm->u.m[2][0] * pm->u.m[3][1] - pm->u.m[3][0] * pm->u.m[2][1]; + v[2] = pm->u.m[3][3] * t[0] - pm->u.m[2][3] * t[1] + pm->u.m[1][3] * t[2]; + v[3] = -pm->u.m[3][2] * t[0] + pm->u.m[2][2] * t[1] - pm->u.m[1][2] * t[2]; + + return pm->u.m[0][0] * v[0] + pm->u.m[0][1] * v[1] + + pm->u.m[0][2] * v[2] + pm->u.m[0][3] * v[3]; } -D3DXMATRIX* WINAPI D3DXMatrixInverse(D3DXMATRIX *pout, FLOAT *pdeterminant, CONST D3DXMATRIX *pm) +D3DXMATRIX* WINAPI D3DXMatrixInverse(D3DXMATRIX *pout, FLOAT *pdeterminant, const D3DXMATRIX *pm) { - int a, i, j; - D3DXMATRIX out; - D3DXVECTOR4 v, vec[3]; - FLOAT det; + FLOAT det, t[3], v[16]; + UINT i, j; - det = D3DXMatrixDeterminant(pm); - if ( !det ) return NULL; - if ( pdeterminant ) *pdeterminant = det; - for (i=0; i<4; i++) - { - for (j=0; j<4; j++) - { - if (j != i ) - { - a = j; - if ( j > i ) a = a-1; - vec[a].x = pm->u.m[j][0]; - vec[a].y = pm->u.m[j][1]; - vec[a].z = pm->u.m[j][2]; - vec[a].w = pm->u.m[j][3]; - } - } - D3DXVec4Cross(&v, &vec[0], &vec[1], &vec[2]); - out.u.m[0][i] = pow(-1.0f, i) * v.x / det; - out.u.m[1][i] = pow(-1.0f, i) * v.y / det; - out.u.m[2][i] = pow(-1.0f, i) * v.z / det; - out.u.m[3][i] = pow(-1.0f, i) * v.w / det; - } + TRACE("pout %p, pdeterminant %p, pm %p\n", pout, pdeterminant, pm); - *pout = out; - return pout; -} + t[0] = pm->u.m[2][2] * pm->u.m[3][3] - pm->u.m[2][3] * pm->u.m[3][2]; + t[1] = pm->u.m[1][2] * pm->u.m[3][3] - pm->u.m[1][3] * pm->u.m[3][2]; + t[2] = pm->u.m[1][2] * pm->u.m[2][3] - pm->u.m[1][3] * pm->u.m[2][2]; + v[0] = pm->u.m[1][1] * t[0] - pm->u.m[2][1] * t[1] + pm->u.m[3][1] * t[2]; + v[4] = -pm->u.m[1][0] * t[0] + pm->u.m[2][0] * t[1] - pm->u.m[3][0] * t[2]; -D3DXMATRIX* WINAPI D3DXMatrixLookAtLH(D3DXMATRIX *pout, CONST D3DXVECTOR3 *peye, CONST D3DXVECTOR3 *pat, CONST D3DXVECTOR3 *pup) -{ - D3DXVECTOR3 right, rightn, up, upn, vec, vec2; + t[0] = pm->u.m[1][0] * pm->u.m[2][1] - pm->u.m[2][0] * pm->u.m[1][1]; + t[1] = pm->u.m[1][0] * pm->u.m[3][1] - pm->u.m[3][0] * pm->u.m[1][1]; + t[2] = pm->u.m[2][0] * pm->u.m[3][1] - pm->u.m[3][0] * pm->u.m[2][1]; + v[8] = pm->u.m[3][3] * t[0] - pm->u.m[2][3] * t[1] + pm->u.m[1][3] * t[2]; + v[12] = -pm->u.m[3][2] * t[0] + pm->u.m[2][2] * t[1] - pm->u.m[1][2] * t[2]; + + det = pm->u.m[0][0] * v[0] + pm->u.m[0][1] * v[4] + + pm->u.m[0][2] * v[8] + pm->u.m[0][3] * v[12]; + if (det == 0.0f) + return NULL; + if (pdeterminant) + *pdeterminant = det; + + t[0] = pm->u.m[2][2] * pm->u.m[3][3] - pm->u.m[2][3] * pm->u.m[3][2]; + t[1] = pm->u.m[0][2] * pm->u.m[3][3] - pm->u.m[0][3] * pm->u.m[3][2]; + t[2] = pm->u.m[0][2] * pm->u.m[2][3] - pm->u.m[0][3] * pm->u.m[2][2]; + v[1] = -pm->u.m[0][1] * t[0] + pm->u.m[2][1] * t[1] - pm->u.m[3][1] * t[2]; + v[5] = pm->u.m[0][0] * t[0] - pm->u.m[2][0] * t[1] + pm->u.m[3][0] * t[2]; + + t[0] = pm->u.m[0][0] * pm->u.m[2][1] - pm->u.m[2][0] * pm->u.m[0][1]; + t[1] = pm->u.m[3][0] * pm->u.m[0][1] - pm->u.m[0][0] * pm->u.m[3][1]; + t[2] = pm->u.m[2][0] * pm->u.m[3][1] - pm->u.m[3][0] * pm->u.m[2][1]; + v[9] = -pm->u.m[3][3] * t[0] - pm->u.m[2][3] * t[1]- pm->u.m[0][3] * t[2]; + v[13] = pm->u.m[3][2] * t[0] + pm->u.m[2][2] * t[1] + pm->u.m[0][2] * t[2]; + + t[0] = pm->u.m[1][2] * pm->u.m[3][3] - pm->u.m[1][3] * pm->u.m[3][2]; + t[1] = pm->u.m[0][2] * pm->u.m[3][3] - pm->u.m[0][3] * pm->u.m[3][2]; + t[2] = pm->u.m[0][2] * pm->u.m[1][3] - pm->u.m[0][3] * pm->u.m[1][2]; + v[2] = pm->u.m[0][1] * t[0] - pm->u.m[1][1] * t[1] + pm->u.m[3][1] * t[2]; + v[6] = -pm->u.m[0][0] * t[0] + pm->u.m[1][0] * t[1] - pm->u.m[3][0] * t[2]; + + t[0] = pm->u.m[0][0] * pm->u.m[1][1] - pm->u.m[1][0] * pm->u.m[0][1]; + t[1] = pm->u.m[3][0] * pm->u.m[0][1] - pm->u.m[0][0] * pm->u.m[3][1]; + t[2] = pm->u.m[1][0] * pm->u.m[3][1] - pm->u.m[3][0] * pm->u.m[1][1]; + v[10] = pm->u.m[3][3] * t[0] + pm->u.m[1][3] * t[1] + pm->u.m[0][3] * t[2]; + v[14] = -pm->u.m[3][2] * t[0] - pm->u.m[1][2] * t[1] - pm->u.m[0][2] * t[2]; + + t[0] = pm->u.m[1][2] * pm->u.m[2][3] - pm->u.m[1][3] * pm->u.m[2][2]; + t[1] = pm->u.m[0][2] * pm->u.m[2][3] - pm->u.m[0][3] * pm->u.m[2][2]; + t[2] = pm->u.m[0][2] * pm->u.m[1][3] - pm->u.m[0][3] * pm->u.m[1][2]; + v[3] = -pm->u.m[0][1] * t[0] + pm->u.m[1][1] * t[1] - pm->u.m[2][1] * t[2]; + v[7] = pm->u.m[0][0] * t[0] - pm->u.m[1][0] * t[1] + pm->u.m[2][0] * t[2]; + + v[11] = -pm->u.m[0][0] * (pm->u.m[1][1] * pm->u.m[2][3] - pm->u.m[1][3] * pm->u.m[2][1]) + + pm->u.m[1][0] * (pm->u.m[0][1] * pm->u.m[2][3] - pm->u.m[0][3] * pm->u.m[2][1]) - + pm->u.m[2][0] * (pm->u.m[0][1] * pm->u.m[1][3] - pm->u.m[0][3] * pm->u.m[1][1]); + + v[15] = pm->u.m[0][0] * (pm->u.m[1][1] * pm->u.m[2][2] - pm->u.m[1][2] * pm->u.m[2][1]) - + pm->u.m[1][0] * (pm->u.m[0][1] * pm->u.m[2][2] - pm->u.m[0][2] * pm->u.m[2][1]) + + pm->u.m[2][0] * (pm->u.m[0][1] * pm->u.m[1][2] - pm->u.m[0][2] * pm->u.m[1][1]); + + det = 1.0f / det; + + for (i = 0; i < 4; i++) + for (j = 0; j < 4; j++) + pout->u.m[i][j] = v[4 * i + j] * det; - D3DXVec3Subtract(&vec2, pat, peye); - D3DXVec3Normalize(&vec, &vec2); - D3DXVec3Cross(&right, pup, &vec); - D3DXVec3Cross(&up, &vec, &right); - D3DXVec3Normalize(&rightn, &right); - D3DXVec3Normalize(&upn, &up); - pout->u.m[0][0] = rightn.x; - pout->u.m[1][0] = rightn.y; - pout->u.m[2][0] = rightn.z; - pout->u.m[3][0] = -D3DXVec3Dot(&rightn,peye); - pout->u.m[0][1] = upn.x; - pout->u.m[1][1] = upn.y; - pout->u.m[2][1] = upn.z; - pout->u.m[3][1] = -D3DXVec3Dot(&upn, peye); - pout->u.m[0][2] = vec.x; - pout->u.m[1][2] = vec.y; - pout->u.m[2][2] = vec.z; - pout->u.m[3][2] = -D3DXVec3Dot(&vec, peye); - pout->u.m[0][3] = 0.0f; - pout->u.m[1][3] = 0.0f; - pout->u.m[2][3] = 0.0f; - pout->u.m[3][3] = 1.0f; return pout; } -D3DXMATRIX* WINAPI D3DXMatrixLookAtRH(D3DXMATRIX *pout, CONST D3DXVECTOR3 *peye, CONST D3DXVECTOR3 *pat, CONST D3DXVECTOR3 *pup) +D3DXMATRIX * WINAPI D3DXMatrixLookAtLH(D3DXMATRIX *out, const D3DXVECTOR3 *eye, const D3DXVECTOR3 *at, + const D3DXVECTOR3 *up) { - D3DXVECTOR3 right, rightn, up, upn, vec, vec2; + D3DXVECTOR3 right, upn, vec; - D3DXVec3Subtract(&vec2, pat, peye); - D3DXVec3Normalize(&vec, &vec2); - D3DXVec3Cross(&right, pup, &vec); - D3DXVec3Cross(&up, &vec, &right); - D3DXVec3Normalize(&rightn, &right); - D3DXVec3Normalize(&upn, &up); - pout->u.m[0][0] = -rightn.x; - pout->u.m[1][0] = -rightn.y; - pout->u.m[2][0] = -rightn.z; - pout->u.m[3][0] = D3DXVec3Dot(&rightn,peye); - pout->u.m[0][1] = upn.x; - pout->u.m[1][1] = upn.y; - pout->u.m[2][1] = upn.z; - pout->u.m[3][1] = -D3DXVec3Dot(&upn, peye); - pout->u.m[0][2] = -vec.x; - pout->u.m[1][2] = -vec.y; - pout->u.m[2][2] = -vec.z; - pout->u.m[3][2] = D3DXVec3Dot(&vec, peye); - pout->u.m[0][3] = 0.0f; - pout->u.m[1][3] = 0.0f; - pout->u.m[2][3] = 0.0f; - pout->u.m[3][3] = 1.0f; - return pout; + TRACE("out %p, eye %p, at %p, up %p\n", out, eye, at, up); + + D3DXVec3Subtract(&vec, at, eye); + D3DXVec3Normalize(&vec, &vec); + D3DXVec3Cross(&right, up, &vec); + D3DXVec3Cross(&upn, &vec, &right); + D3DXVec3Normalize(&right, &right); + D3DXVec3Normalize(&upn, &upn); + out->u.m[0][0] = right.x; + out->u.m[1][0] = right.y; + out->u.m[2][0] = right.z; + out->u.m[3][0] = -D3DXVec3Dot(&right, eye); + out->u.m[0][1] = upn.x; + out->u.m[1][1] = upn.y; + out->u.m[2][1] = upn.z; + out->u.m[3][1] = -D3DXVec3Dot(&upn, eye); + out->u.m[0][2] = vec.x; + out->u.m[1][2] = vec.y; + out->u.m[2][2] = vec.z; + out->u.m[3][2] = -D3DXVec3Dot(&vec, eye); + out->u.m[0][3] = 0.0f; + out->u.m[1][3] = 0.0f; + out->u.m[2][3] = 0.0f; + out->u.m[3][3] = 1.0f; + + return out; } -D3DXMATRIX* WINAPI D3DXMatrixMultiply(D3DXMATRIX *pout, CONST D3DXMATRIX *pm1, CONST D3DXMATRIX *pm2) +D3DXMATRIX * WINAPI D3DXMatrixLookAtRH(D3DXMATRIX *out, const D3DXVECTOR3 *eye, const D3DXVECTOR3 *at, + const D3DXVECTOR3 *up) +{ + D3DXVECTOR3 right, upn, vec; + + TRACE("out %p, eye %p, at %p, up %p\n", out, eye, at, up); + + D3DXVec3Subtract(&vec, at, eye); + D3DXVec3Normalize(&vec, &vec); + D3DXVec3Cross(&right, up, &vec); + D3DXVec3Cross(&upn, &vec, &right); + D3DXVec3Normalize(&right, &right); + D3DXVec3Normalize(&upn, &upn); + out->u.m[0][0] = -right.x; + out->u.m[1][0] = -right.y; + out->u.m[2][0] = -right.z; + out->u.m[3][0] = D3DXVec3Dot(&right, eye); + out->u.m[0][1] = upn.x; + out->u.m[1][1] = upn.y; + out->u.m[2][1] = upn.z; + out->u.m[3][1] = -D3DXVec3Dot(&upn, eye); + out->u.m[0][2] = -vec.x; + out->u.m[1][2] = -vec.y; + out->u.m[2][2] = -vec.z; + out->u.m[3][2] = D3DXVec3Dot(&vec, eye); + out->u.m[0][3] = 0.0f; + out->u.m[1][3] = 0.0f; + out->u.m[2][3] = 0.0f; + out->u.m[3][3] = 1.0f; + + return out; +} + +D3DXMATRIX* WINAPI D3DXMatrixMultiply(D3DXMATRIX *pout, const D3DXMATRIX *pm1, const D3DXMATRIX *pm2) { D3DXMATRIX out; int i,j; + TRACE("pout %p, pm1 %p, pm2 %p\n", pout, pm1, pm2); + for (i=0; i<4; i++) { for (j=0; j<4; j++) @@ -321,15 +417,25 @@ D3DXMATRIX* WINAPI D3DXMatrixMultiply(D3DXMATRIX *pout, CONST D3DXMATRIX *pm1, C return pout; } -D3DXMATRIX* WINAPI D3DXMatrixMultiplyTranspose(D3DXMATRIX *pout, CONST D3DXMATRIX *pm1, CONST D3DXMATRIX *pm2) +D3DXMATRIX* WINAPI D3DXMatrixMultiplyTranspose(D3DXMATRIX *pout, const D3DXMATRIX *pm1, const D3DXMATRIX *pm2) { - D3DXMatrixMultiply(pout, pm1, pm2); - D3DXMatrixTranspose(pout, pout); + D3DXMATRIX temp; + int i, j; + + TRACE("pout %p, pm1 %p, pm2 %p\n", pout, pm1, pm2); + + for (i = 0; i < 4; i++) + for (j = 0; j < 4; j++) + temp.u.m[j][i] = pm1->u.m[i][0] * pm2->u.m[0][j] + pm1->u.m[i][1] * pm2->u.m[1][j] + pm1->u.m[i][2] * pm2->u.m[2][j] + pm1->u.m[i][3] * pm2->u.m[3][j]; + + *pout = temp; return pout; } D3DXMATRIX* WINAPI D3DXMatrixOrthoLH(D3DXMATRIX *pout, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf) { + TRACE("pout %p, w %f, h %f, zn %f, zf %f\n", pout, w, h, zn, zf); + D3DXMatrixIdentity(pout); pout->u.m[0][0] = 2.0f / w; pout->u.m[1][1] = 2.0f / h; @@ -340,6 +446,8 @@ D3DXMATRIX* WINAPI D3DXMatrixOrthoLH(D3DXMATRIX *pout, FLOAT w, FLOAT h, FLOAT z D3DXMATRIX* WINAPI D3DXMatrixOrthoOffCenterLH(D3DXMATRIX *pout, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, FLOAT zf) { + TRACE("pout %p, l %f, r %f, b %f, t %f, zn %f, zf %f\n", pout, l, r, b, t, zn, zf); + D3DXMatrixIdentity(pout); pout->u.m[0][0] = 2.0f / (r - l); pout->u.m[1][1] = 2.0f / (t - b); @@ -352,6 +460,8 @@ D3DXMATRIX* WINAPI D3DXMatrixOrthoOffCenterLH(D3DXMATRIX *pout, FLOAT l, FLOAT r D3DXMATRIX* WINAPI D3DXMatrixOrthoOffCenterRH(D3DXMATRIX *pout, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, FLOAT zf) { + TRACE("pout %p, l %f, r %f, b %f, t %f, zn %f, zf %f\n", pout, l, r, b, t, zn, zf); + D3DXMatrixIdentity(pout); pout->u.m[0][0] = 2.0f / (r - l); pout->u.m[1][1] = 2.0f / (t - b); @@ -364,6 +474,8 @@ D3DXMATRIX* WINAPI D3DXMatrixOrthoOffCenterRH(D3DXMATRIX *pout, FLOAT l, FLOAT r D3DXMATRIX* WINAPI D3DXMatrixOrthoRH(D3DXMATRIX *pout, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf) { + TRACE("pout %p, w %f, h %f, zn %f, zf %f\n", pout, w, h, zn, zf); + D3DXMatrixIdentity(pout); pout->u.m[0][0] = 2.0f / w; pout->u.m[1][1] = 2.0f / h; @@ -374,6 +486,8 @@ D3DXMATRIX* WINAPI D3DXMatrixOrthoRH(D3DXMATRIX *pout, FLOAT w, FLOAT h, FLOAT z D3DXMATRIX* WINAPI D3DXMatrixPerspectiveFovLH(D3DXMATRIX *pout, FLOAT fovy, FLOAT aspect, FLOAT zn, FLOAT zf) { + TRACE("pout %p, fovy %f, aspect %f, zn %f, zf %f\n", pout, fovy, aspect, zn, zf); + D3DXMatrixIdentity(pout); pout->u.m[0][0] = 1.0f / (aspect * tan(fovy/2.0f)); pout->u.m[1][1] = 1.0f / tan(fovy/2.0f); @@ -386,6 +500,8 @@ D3DXMATRIX* WINAPI D3DXMatrixPerspectiveFovLH(D3DXMATRIX *pout, FLOAT fovy, FLOA D3DXMATRIX* WINAPI D3DXMatrixPerspectiveFovRH(D3DXMATRIX *pout, FLOAT fovy, FLOAT aspect, FLOAT zn, FLOAT zf) { + TRACE("pout %p, fovy %f, aspect %f, zn %f, zf %f\n", pout, fovy, aspect, zn, zf); + D3DXMatrixIdentity(pout); pout->u.m[0][0] = 1.0f / (aspect * tan(fovy/2.0f)); pout->u.m[1][1] = 1.0f / tan(fovy/2.0f); @@ -398,6 +514,8 @@ D3DXMATRIX* WINAPI D3DXMatrixPerspectiveFovRH(D3DXMATRIX *pout, FLOAT fovy, FLOA D3DXMATRIX* WINAPI D3DXMatrixPerspectiveLH(D3DXMATRIX *pout, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf) { + TRACE("pout %p, w %f, h %f, zn %f, zf %f\n", pout, w, h, zn, zf); + D3DXMatrixIdentity(pout); pout->u.m[0][0] = 2.0f * zn / w; pout->u.m[1][1] = 2.0f * zn / h; @@ -410,6 +528,8 @@ D3DXMATRIX* WINAPI D3DXMatrixPerspectiveLH(D3DXMATRIX *pout, FLOAT w, FLOAT h, F D3DXMATRIX* WINAPI D3DXMatrixPerspectiveOffCenterLH(D3DXMATRIX *pout, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, FLOAT zf) { + TRACE("pout %p, l %f, r %f, b %f, t %f, zn %f, zf %f\n", pout, l, r, b, t, zn, zf); + D3DXMatrixIdentity(pout); pout->u.m[0][0] = 2.0f * zn / (r - l); pout->u.m[1][1] = -2.0f * zn / (b - t); @@ -424,6 +544,8 @@ D3DXMATRIX* WINAPI D3DXMatrixPerspectiveOffCenterLH(D3DXMATRIX *pout, FLOAT l, F D3DXMATRIX* WINAPI D3DXMatrixPerspectiveOffCenterRH(D3DXMATRIX *pout, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, FLOAT zf) { + TRACE("pout %p, l %f, r %f, b %f, t %f, zn %f, zf %f\n", pout, l, r, b, t, zn, zf); + D3DXMatrixIdentity(pout); pout->u.m[0][0] = 2.0f * zn / (r - l); pout->u.m[1][1] = -2.0f * zn / (b - t); @@ -438,6 +560,8 @@ D3DXMATRIX* WINAPI D3DXMatrixPerspectiveOffCenterRH(D3DXMATRIX *pout, FLOAT l, F D3DXMATRIX* WINAPI D3DXMatrixPerspectiveRH(D3DXMATRIX *pout, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf) { + TRACE("pout %p, w %f, h %f, zn %f, zf %f\n", pout, w, h, zn, zf); + D3DXMatrixIdentity(pout); pout->u.m[0][0] = 2.0f * zn / w; pout->u.m[1][1] = 2.0f * zn / h; @@ -448,10 +572,12 @@ D3DXMATRIX* WINAPI D3DXMatrixPerspectiveRH(D3DXMATRIX *pout, FLOAT w, FLOAT h, F return pout; } -D3DXMATRIX* WINAPI D3DXMatrixReflect(D3DXMATRIX *pout, CONST D3DXPLANE *pplane) +D3DXMATRIX* WINAPI D3DXMatrixReflect(D3DXMATRIX *pout, const D3DXPLANE *pplane) { D3DXPLANE Nplane; + TRACE("pout %p, pplane %p\n", pout, pplane); + D3DXPlaneNormalize(&Nplane, pplane); D3DXMatrixIdentity(pout); pout->u.m[0][0] = 1.0f - 2.0f * Nplane.a * Nplane.a; @@ -469,26 +595,42 @@ D3DXMATRIX* WINAPI D3DXMatrixReflect(D3DXMATRIX *pout, CONST D3DXPLANE *pplane) return pout; } -D3DXMATRIX* WINAPI D3DXMatrixRotationAxis(D3DXMATRIX *pout, CONST D3DXVECTOR3 *pv, FLOAT angle) +D3DXMATRIX * WINAPI D3DXMatrixRotationAxis(D3DXMATRIX *out, const D3DXVECTOR3 *v, FLOAT angle) { - D3DXVECTOR3 v; + D3DXVECTOR3 nv; + FLOAT sangle, cangle, cdiff; - D3DXVec3Normalize(&v,pv); - D3DXMatrixIdentity(pout); - pout->u.m[0][0] = (1.0f - cos(angle)) * v.x * v.x + cos(angle); - pout->u.m[1][0] = (1.0f - cos(angle)) * v.x * v.y - sin(angle) * v.z; - pout->u.m[2][0] = (1.0f - cos(angle)) * v.x * v.z + sin(angle) * v.y; - pout->u.m[0][1] = (1.0f - cos(angle)) * v.y * v.x + sin(angle) * v.z; - pout->u.m[1][1] = (1.0f - cos(angle)) * v.y * v.y + cos(angle); - pout->u.m[2][1] = (1.0f - cos(angle)) * v.y * v.z - sin(angle) * v.x; - pout->u.m[0][2] = (1.0f - cos(angle)) * v.z * v.x - sin(angle) * v.y; - pout->u.m[1][2] = (1.0f - cos(angle)) * v.z * v.y + sin(angle) * v.x; - pout->u.m[2][2] = (1.0f - cos(angle)) * v.z * v.z + cos(angle); - return pout; + TRACE("out %p, v %p, angle %f\n", out, v, angle); + + D3DXVec3Normalize(&nv, v); + sangle = sinf(angle); + cangle = cosf(angle); + cdiff = 1.0f - cangle; + + out->u.m[0][0] = cdiff * nv.x * nv.x + cangle; + out->u.m[1][0] = cdiff * nv.x * nv.y - sangle * nv.z; + out->u.m[2][0] = cdiff * nv.x * nv.z + sangle * nv.y; + out->u.m[3][0] = 0.0f; + out->u.m[0][1] = cdiff * nv.y * nv.x + sangle * nv.z; + out->u.m[1][1] = cdiff * nv.y * nv.y + cangle; + out->u.m[2][1] = cdiff * nv.y * nv.z - sangle * nv.x; + out->u.m[3][1] = 0.0f; + out->u.m[0][2] = cdiff * nv.z * nv.x - sangle * nv.y; + out->u.m[1][2] = cdiff * nv.z * nv.y + sangle * nv.x; + out->u.m[2][2] = cdiff * nv.z * nv.z + cangle; + out->u.m[3][2] = 0.0f; + out->u.m[0][3] = 0.0f; + out->u.m[1][3] = 0.0f; + out->u.m[2][3] = 0.0f; + out->u.m[3][3] = 1.0f; + + return out; } -D3DXMATRIX* WINAPI D3DXMatrixRotationQuaternion(D3DXMATRIX *pout, CONST D3DXQUATERNION *pq) +D3DXMATRIX* WINAPI D3DXMatrixRotationQuaternion(D3DXMATRIX *pout, const D3DXQUATERNION *pq) { + TRACE("pout %p, pq %p\n", pout, pq); + D3DXMatrixIdentity(pout); pout->u.m[0][0] = 1.0f - 2.0f * (pq->y * pq->y + pq->z * pq->z); pout->u.m[0][1] = 2.0f * (pq->x *pq->y + pq->z * pq->w); @@ -504,6 +646,8 @@ D3DXMATRIX* WINAPI D3DXMatrixRotationQuaternion(D3DXMATRIX *pout, CONST D3DXQUAT D3DXMATRIX* WINAPI D3DXMatrixRotationX(D3DXMATRIX *pout, FLOAT angle) { + TRACE("pout %p, angle %f\n", pout, angle); + D3DXMatrixIdentity(pout); pout->u.m[1][1] = cos(angle); pout->u.m[2][2] = cos(angle); @@ -514,6 +658,8 @@ D3DXMATRIX* WINAPI D3DXMatrixRotationX(D3DXMATRIX *pout, FLOAT angle) D3DXMATRIX* WINAPI D3DXMatrixRotationY(D3DXMATRIX *pout, FLOAT angle) { + TRACE("pout %p, angle %f\n", pout, angle); + D3DXMatrixIdentity(pout); pout->u.m[0][0] = cos(angle); pout->u.m[2][2] = cos(angle); @@ -522,21 +668,43 @@ D3DXMATRIX* WINAPI D3DXMatrixRotationY(D3DXMATRIX *pout, FLOAT angle) return pout; } -D3DXMATRIX* WINAPI D3DXMatrixRotationYawPitchRoll(D3DXMATRIX *pout, FLOAT yaw, FLOAT pitch, FLOAT roll) +D3DXMATRIX * WINAPI D3DXMatrixRotationYawPitchRoll(D3DXMATRIX *out, FLOAT yaw, FLOAT pitch, FLOAT roll) { - D3DXMATRIX m; + FLOAT sroll, croll, spitch, cpitch, syaw, cyaw; - D3DXMatrixIdentity(pout); - D3DXMatrixRotationZ(&m, roll); - D3DXMatrixMultiply(pout, pout, &m); - D3DXMatrixRotationX(&m, pitch); - D3DXMatrixMultiply(pout, pout, &m); - D3DXMatrixRotationY(&m, yaw); - D3DXMatrixMultiply(pout, pout, &m); - return pout; + TRACE("out %p, yaw %f, pitch %f, roll %f\n", out, yaw, pitch, roll); + + sroll = sinf(roll); + croll = cosf(roll); + spitch = sinf(pitch); + cpitch = cosf(pitch); + syaw = sinf(yaw); + cyaw = cosf(yaw); + + out->u.m[0][0] = sroll * spitch * syaw + croll * cyaw; + out->u.m[0][1] = sroll * cpitch; + out->u.m[0][2] = sroll * spitch * cyaw - croll * syaw; + out->u.m[0][3] = 0.0f; + out->u.m[1][0] = croll * spitch * syaw - sroll * cyaw; + out->u.m[1][1] = croll * cpitch; + out->u.m[1][2] = croll * spitch * cyaw + sroll * syaw; + out->u.m[1][3] = 0.0f; + out->u.m[2][0] = cpitch * syaw; + out->u.m[2][1] = -spitch; + out->u.m[2][2] = cpitch * cyaw; + out->u.m[2][3] = 0.0f; + out->u.m[3][0] = 0.0f; + out->u.m[3][1] = 0.0f; + out->u.m[3][2] = 0.0f; + out->u.m[3][3] = 1.0f; + + return out; } + D3DXMATRIX* WINAPI D3DXMatrixRotationZ(D3DXMATRIX *pout, FLOAT angle) { + TRACE("pout %p, angle %f\n", pout, angle); + D3DXMatrixIdentity(pout); pout->u.m[0][0] = cos(angle); pout->u.m[1][1] = cos(angle); @@ -547,6 +715,8 @@ D3DXMATRIX* WINAPI D3DXMatrixRotationZ(D3DXMATRIX *pout, FLOAT angle) D3DXMATRIX* WINAPI D3DXMatrixScaling(D3DXMATRIX *pout, FLOAT sx, FLOAT sy, FLOAT sz) { + TRACE("pout %p, sx %f, sy %f, sz %f\n", pout, sx, sy, sz); + D3DXMatrixIdentity(pout); pout->u.m[0][0] = sx; pout->u.m[1][1] = sy; @@ -554,11 +724,13 @@ D3DXMATRIX* WINAPI D3DXMatrixScaling(D3DXMATRIX *pout, FLOAT sx, FLOAT sy, FLOAT return pout; } -D3DXMATRIX* WINAPI D3DXMatrixShadow(D3DXMATRIX *pout, CONST D3DXVECTOR4 *plight, CONST D3DXPLANE *pplane) +D3DXMATRIX* WINAPI D3DXMatrixShadow(D3DXMATRIX *pout, const D3DXVECTOR4 *plight, const D3DXPLANE *pplane) { D3DXPLANE Nplane; FLOAT dot; + TRACE("pout %p, plight %p, pplane %p\n", pout, plight, pplane); + D3DXPlaneNormalize(&Nplane, pplane); dot = D3DXPlaneDot(&Nplane, plight); pout->u.m[0][0] = dot - Nplane.a * plight->x; @@ -580,12 +752,15 @@ D3DXMATRIX* WINAPI D3DXMatrixShadow(D3DXMATRIX *pout, CONST D3DXVECTOR4 *plight, return pout; } -D3DXMATRIX* WINAPI D3DXMatrixTransformation(D3DXMATRIX *pout, CONST D3DXVECTOR3 *pscalingcenter, CONST D3DXQUATERNION *pscalingrotation, CONST D3DXVECTOR3 *pscaling, CONST D3DXVECTOR3 *protationcenter, CONST D3DXQUATERNION *protation, CONST D3DXVECTOR3 *ptranslation) +D3DXMATRIX* WINAPI D3DXMatrixTransformation(D3DXMATRIX *pout, const D3DXVECTOR3 *pscalingcenter, const D3DXQUATERNION *pscalingrotation, const D3DXVECTOR3 *pscaling, const D3DXVECTOR3 *protationcenter, const D3DXQUATERNION *protation, const D3DXVECTOR3 *ptranslation) { D3DXMATRIX m1, m2, m3, m4, m5, m6, m7; D3DXQUATERNION prc; D3DXVECTOR3 psc, pt; + TRACE("pout %p, pscalingcenter %p, pscalingrotation %p, pscaling %p, protationcentr %p, protation %p, ptranslation %p\n", + pout, pscalingcenter, pscalingrotation, pscaling, protationcenter, protation, ptranslation); + if ( !pscalingcenter ) { psc.x = 0.0f; @@ -654,11 +829,15 @@ D3DXMATRIX* WINAPI D3DXMatrixTransformation(D3DXMATRIX *pout, CONST D3DXVECTOR3 D3DXMatrixMultiply(pout, &m1, &m7); return pout; } -D3DXMATRIX* WINAPI D3DXMatrixTransformation2D(D3DXMATRIX *pout, CONST D3DXVECTOR2 *pscalingcenter, FLOAT scalingrotation, CONST D3DXVECTOR2 *pscaling, CONST D3DXVECTOR2 *protationcenter, FLOAT rotation, CONST D3DXVECTOR2 *ptranslation) + +D3DXMATRIX* WINAPI D3DXMatrixTransformation2D(D3DXMATRIX *pout, const D3DXVECTOR2 *pscalingcenter, FLOAT scalingrotation, const D3DXVECTOR2 *pscaling, const D3DXVECTOR2 *protationcenter, FLOAT rotation, const D3DXVECTOR2 *ptranslation) { D3DXQUATERNION rot, sca_rot; D3DXVECTOR3 rot_center, sca, sca_center, trans; + TRACE("pout %p, pscalingcenter %p, scalingrotation %f, pscaling %p, protztioncenter %p, rotation %f, ptranslation %p\n", + pout, pscalingcenter, scalingrotation, pscaling, protationcenter, rotation, ptranslation); + if ( pscalingcenter ) { sca_center.x=pscalingcenter->x; @@ -728,6 +907,8 @@ D3DXMATRIX* WINAPI D3DXMatrixTransformation2D(D3DXMATRIX *pout, CONST D3DXVECTOR D3DXMATRIX* WINAPI D3DXMatrixTranslation(D3DXMATRIX *pout, FLOAT x, FLOAT y, FLOAT z) { + TRACE("pout %p, x %f, y %f, z %f\n", pout, x, y, z); + D3DXMatrixIdentity(pout); pout->u.m[3][0] = x; pout->u.m[3][1] = y; @@ -735,11 +916,13 @@ D3DXMATRIX* WINAPI D3DXMatrixTranslation(D3DXMATRIX *pout, FLOAT x, FLOAT y, FLO return pout; } -D3DXMATRIX* WINAPI D3DXMatrixTranspose(D3DXMATRIX *pout, CONST D3DXMATRIX *pm) +D3DXMATRIX* WINAPI D3DXMatrixTranspose(D3DXMATRIX *pout, const D3DXMATRIX *pm) { - CONST D3DXMATRIX m = *pm; + const D3DXMATRIX m = *pm; int i,j; + TRACE("pout %p, pm %p\n", pout, pm); + for (i=0; i<4; i++) for (j=0; j<4; j++) pout->u.m[i][j] = m.u.m[j][i]; @@ -748,66 +931,41 @@ D3DXMATRIX* WINAPI D3DXMatrixTranspose(D3DXMATRIX *pout, CONST D3DXMATRIX *pm) /*_________________D3DXMatrixStack____________________*/ -static const unsigned int INITIAL_STACK_SIZE = 32; -HRESULT WINAPI D3DXCreateMatrixStack(DWORD flags, LPD3DXMATRIXSTACK* ppstack) +static inline struct ID3DXMatrixStackImpl *impl_from_ID3DXMatrixStack(ID3DXMatrixStack *iface) { - ID3DXMatrixStackImpl* object; - - TRACE("flags %#x, ppstack %p\n", flags, ppstack); - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ID3DXMatrixStackImpl)); - if ( object == NULL ) - { - *ppstack = NULL; - return E_OUTOFMEMORY; - } - object->lpVtbl = &ID3DXMatrixStack_Vtbl; - object->ref = 1; - - object->stack = HeapAlloc(GetProcessHeap(), 0, INITIAL_STACK_SIZE * sizeof(D3DXMATRIX)); - if (!object->stack) - { - HeapFree(GetProcessHeap(), 0, object); - *ppstack = NULL; - return E_OUTOFMEMORY; - } - - object->current = 0; - object->stack_size = INITIAL_STACK_SIZE; - D3DXMatrixIdentity(&object->stack[0]); - - TRACE("Created matrix stack %p\n", object); - - *ppstack = (LPD3DXMATRIXSTACK)object; - return D3D_OK; + return CONTAINING_RECORD(iface, struct ID3DXMatrixStackImpl, ID3DXMatrixStack_iface); } -static HRESULT WINAPI ID3DXMatrixStackImpl_QueryInterface(ID3DXMatrixStack *iface, REFIID riid, void **ppobj) +static HRESULT WINAPI ID3DXMatrixStackImpl_QueryInterface(ID3DXMatrixStack *iface, REFIID riid, void **out) { - ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface; - if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_ID3DXMatrixStack)) + TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out); + + if (IsEqualGUID(riid, &IID_ID3DXMatrixStack) + || IsEqualGUID(riid, &IID_IUnknown)) { - ID3DXMatrixStack_AddRef(iface); - *ppobj = This; - return S_OK; + ID3DXMatrixStack_AddRef(iface); + *out = iface; + return S_OK; } - *ppobj = NULL; - ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj); + + WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); + + *out = NULL; return E_NOINTERFACE; } static ULONG WINAPI ID3DXMatrixStackImpl_AddRef(ID3DXMatrixStack *iface) { - ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface; + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("(%p) : AddRef from %d\n", This, ref - 1); return ref; } -static ULONG WINAPI ID3DXMatrixStackImpl_Release(ID3DXMatrixStack* iface) +static ULONG WINAPI ID3DXMatrixStackImpl_Release(ID3DXMatrixStack *iface) { - ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface; + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); ULONG ref = InterlockedDecrement(&This->ref); if (!ref) { @@ -820,7 +978,7 @@ static ULONG WINAPI ID3DXMatrixStackImpl_Release(ID3DXMatrixStack* iface) static D3DXMATRIX* WINAPI ID3DXMatrixStackImpl_GetTop(ID3DXMatrixStack *iface) { - ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface; + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); TRACE("iface %p\n", iface); @@ -829,7 +987,7 @@ static D3DXMATRIX* WINAPI ID3DXMatrixStackImpl_GetTop(ID3DXMatrixStack *iface) static HRESULT WINAPI ID3DXMatrixStackImpl_LoadIdentity(ID3DXMatrixStack *iface) { - ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface; + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); TRACE("iface %p\n", iface); @@ -838,33 +996,33 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_LoadIdentity(ID3DXMatrixStack *iface) return D3D_OK; } -static HRESULT WINAPI ID3DXMatrixStackImpl_LoadMatrix(ID3DXMatrixStack *iface, CONST D3DXMATRIX *pm) +static HRESULT WINAPI ID3DXMatrixStackImpl_LoadMatrix(ID3DXMatrixStack *iface, const D3DXMATRIX *pm) { - ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface; + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); - TRACE("iface %p\n", iface); + TRACE("iface %p, pm %p\n", iface, pm); This->stack[This->current] = *pm; return D3D_OK; } -static HRESULT WINAPI ID3DXMatrixStackImpl_MultMatrix(ID3DXMatrixStack *iface, CONST D3DXMATRIX *pm) +static HRESULT WINAPI ID3DXMatrixStackImpl_MultMatrix(ID3DXMatrixStack *iface, const D3DXMATRIX *pm) { - ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface; + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); - TRACE("iface %p\n", iface); + TRACE("iface %p, pm %p\n", iface, pm); D3DXMatrixMultiply(&This->stack[This->current], &This->stack[This->current], pm); return D3D_OK; } -static HRESULT WINAPI ID3DXMatrixStackImpl_MultMatrixLocal(ID3DXMatrixStack *iface, CONST D3DXMATRIX *pm) +static HRESULT WINAPI ID3DXMatrixStackImpl_MultMatrixLocal(ID3DXMatrixStack *iface, const D3DXMATRIX *pm) { - ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface; + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); - TRACE("iface %p\n", iface); + TRACE("iface %p, pm %p\n", iface, pm); D3DXMatrixMultiply(&This->stack[This->current], pm, &This->stack[This->current]); @@ -873,7 +1031,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_MultMatrixLocal(ID3DXMatrixStack *ifa static HRESULT WINAPI ID3DXMatrixStackImpl_Pop(ID3DXMatrixStack *iface) { - ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface; + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); TRACE("iface %p\n", iface); @@ -886,7 +1044,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_Pop(ID3DXMatrixStack *iface) D3DXMATRIX *new_stack; new_size = This->stack_size / 2; - new_stack = HeapReAlloc(GetProcessHeap(), 0, This->stack, new_size * sizeof(D3DXMATRIX)); + new_stack = HeapReAlloc(GetProcessHeap(), 0, This->stack, new_size * sizeof(*new_stack)); if (new_stack) { This->stack_size = new_size; @@ -901,7 +1059,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_Pop(ID3DXMatrixStack *iface) static HRESULT WINAPI ID3DXMatrixStackImpl_Push(ID3DXMatrixStack *iface) { - ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface; + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); TRACE("iface %p\n", iface); @@ -913,7 +1071,7 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_Push(ID3DXMatrixStack *iface) if (This->stack_size > UINT_MAX / 2) return E_OUTOFMEMORY; new_size = This->stack_size * 2; - new_stack = HeapReAlloc(GetProcessHeap(), 0, This->stack, new_size * sizeof(D3DXMATRIX)); + new_stack = HeapReAlloc(GetProcessHeap(), 0, This->stack, new_size * sizeof(*new_stack)); if (!new_stack) return E_OUTOFMEMORY; This->stack_size = new_size; @@ -926,12 +1084,12 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_Push(ID3DXMatrixStack *iface) return D3D_OK; } -static HRESULT WINAPI ID3DXMatrixStackImpl_RotateAxis(ID3DXMatrixStack *iface, CONST D3DXVECTOR3 *pv, FLOAT angle) +static HRESULT WINAPI ID3DXMatrixStackImpl_RotateAxis(ID3DXMatrixStack *iface, const D3DXVECTOR3 *pv, FLOAT angle) { D3DXMATRIX temp; - ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface; + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); - TRACE("iface %p\n", iface); + TRACE("iface %p, pv %p, angle %f\n", iface, pv, angle); D3DXMatrixRotationAxis(&temp, pv, angle); D3DXMatrixMultiply(&This->stack[This->current], &This->stack[This->current], &temp); @@ -939,12 +1097,12 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_RotateAxis(ID3DXMatrixStack *iface, C return D3D_OK; } -static HRESULT WINAPI ID3DXMatrixStackImpl_RotateAxisLocal(ID3DXMatrixStack *iface, CONST D3DXVECTOR3 *pv, FLOAT angle) +static HRESULT WINAPI ID3DXMatrixStackImpl_RotateAxisLocal(ID3DXMatrixStack *iface, const D3DXVECTOR3 *pv, FLOAT angle) { D3DXMATRIX temp; - ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface; + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); - TRACE("iface %p\n", iface); + TRACE("iface %p, pv %p, angle %f\n", iface, pv, angle); D3DXMatrixRotationAxis(&temp, pv, angle); D3DXMatrixMultiply(&This->stack[This->current], &temp, &This->stack[This->current]); @@ -955,9 +1113,9 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_RotateAxisLocal(ID3DXMatrixStack *ifa static HRESULT WINAPI ID3DXMatrixStackImpl_RotateYawPitchRoll(ID3DXMatrixStack *iface, FLOAT x, FLOAT y, FLOAT z) { D3DXMATRIX temp; - ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface; + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); - TRACE("iface %p\n", iface); + TRACE("iface %p, x %f, y %f, z %f\n", iface, x, y, z); D3DXMatrixRotationYawPitchRoll(&temp, x, y, z); D3DXMatrixMultiply(&This->stack[This->current], &This->stack[This->current], &temp); @@ -968,9 +1126,9 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_RotateYawPitchRoll(ID3DXMatrixStack * static HRESULT WINAPI ID3DXMatrixStackImpl_RotateYawPitchRollLocal(ID3DXMatrixStack *iface, FLOAT x, FLOAT y, FLOAT z) { D3DXMATRIX temp; - ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface; + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); - TRACE("iface %p\n", iface); + TRACE("iface %p, x %f, y %f, z %f\n", iface, x, y, z); D3DXMatrixRotationYawPitchRoll(&temp, x, y, z); D3DXMatrixMultiply(&This->stack[This->current], &temp, &This->stack[This->current]); @@ -981,9 +1139,9 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_RotateYawPitchRollLocal(ID3DXMatrixSt static HRESULT WINAPI ID3DXMatrixStackImpl_Scale(ID3DXMatrixStack *iface, FLOAT x, FLOAT y, FLOAT z) { D3DXMATRIX temp; - ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface; + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); - TRACE("iface %p\n", iface); + TRACE("iface %p,x %f, y %f, z %f\n", iface, x, y, z); D3DXMatrixScaling(&temp, x, y, z); D3DXMatrixMultiply(&This->stack[This->current], &This->stack[This->current], &temp); @@ -994,9 +1152,9 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_Scale(ID3DXMatrixStack *iface, FLOAT static HRESULT WINAPI ID3DXMatrixStackImpl_ScaleLocal(ID3DXMatrixStack *iface, FLOAT x, FLOAT y, FLOAT z) { D3DXMATRIX temp; - ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface; + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); - TRACE("iface %p\n", iface); + TRACE("iface %p, x %f, y %f, z %f\n", iface, x, y, z); D3DXMatrixScaling(&temp, x, y, z); D3DXMatrixMultiply(&This->stack[This->current], &temp, &This->stack[This->current]); @@ -1007,9 +1165,9 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_ScaleLocal(ID3DXMatrixStack *iface, F static HRESULT WINAPI ID3DXMatrixStackImpl_Translate(ID3DXMatrixStack *iface, FLOAT x, FLOAT y, FLOAT z) { D3DXMATRIX temp; - ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface; + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); - TRACE("iface %p\n", iface); + TRACE("iface %p, x %f, y %f, z %f\n", iface, x, y, z); D3DXMatrixTranslation(&temp, x, y, z); D3DXMatrixMultiply(&This->stack[This->current], &This->stack[This->current], &temp); @@ -1020,9 +1178,9 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_Translate(ID3DXMatrixStack *iface, FL static HRESULT WINAPI ID3DXMatrixStackImpl_TranslateLocal(ID3DXMatrixStack *iface, FLOAT x, FLOAT y, FLOAT z) { D3DXMATRIX temp; - ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface; + struct ID3DXMatrixStackImpl *This = impl_from_ID3DXMatrixStack(iface); - TRACE("iface %p\n", iface); + TRACE("iface %p, x %f, y %f, z %f\n", iface, x, y, z); D3DXMatrixTranslation(&temp, x, y, z); D3DXMatrixMultiply(&This->stack[This->current], &temp,&This->stack[This->current]); @@ -1052,10 +1210,43 @@ static const ID3DXMatrixStackVtbl ID3DXMatrixStack_Vtbl = ID3DXMatrixStackImpl_GetTop }; +HRESULT WINAPI D3DXCreateMatrixStack(DWORD flags, ID3DXMatrixStack **stack) +{ + struct ID3DXMatrixStackImpl *object; + + TRACE("flags %#x, stack %p.\n", flags, stack); + + if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)))) + { + *stack = NULL; + return E_OUTOFMEMORY; + } + object->ID3DXMatrixStack_iface.lpVtbl = &ID3DXMatrixStack_Vtbl; + object->ref = 1; + + if (!(object->stack = HeapAlloc(GetProcessHeap(), 0, INITIAL_STACK_SIZE * sizeof(*object->stack)))) + { + HeapFree(GetProcessHeap(), 0, object); + *stack = NULL; + return E_OUTOFMEMORY; + } + + object->current = 0; + object->stack_size = INITIAL_STACK_SIZE; + D3DXMatrixIdentity(&object->stack[0]); + + TRACE("Created matrix stack %p.\n", object); + + *stack = &object->ID3DXMatrixStack_iface; + return D3D_OK; +} + /*_________________D3DXPLANE________________*/ -D3DXPLANE* WINAPI D3DXPlaneFromPointNormal(D3DXPLANE *pout, CONST D3DXVECTOR3 *pvpoint, CONST D3DXVECTOR3 *pvnormal) +D3DXPLANE* WINAPI D3DXPlaneFromPointNormal(D3DXPLANE *pout, const D3DXVECTOR3 *pvpoint, const D3DXVECTOR3 *pvnormal) { + TRACE("pout %p, pvpoint %p, pvnormal %p\n", pout, pvpoint, pvnormal); + pout->a = pvnormal->x; pout->b = pvnormal->y; pout->c = pvnormal->z; @@ -1063,10 +1254,12 @@ D3DXPLANE* WINAPI D3DXPlaneFromPointNormal(D3DXPLANE *pout, CONST D3DXVECTOR3 *p return pout; } -D3DXPLANE* WINAPI D3DXPlaneFromPoints(D3DXPLANE *pout, CONST D3DXVECTOR3 *pv1, CONST D3DXVECTOR3 *pv2, CONST D3DXVECTOR3 *pv3) +D3DXPLANE* WINAPI D3DXPlaneFromPoints(D3DXPLANE *pout, const D3DXVECTOR3 *pv1, const D3DXVECTOR3 *pv2, const D3DXVECTOR3 *pv3) { D3DXVECTOR3 edge1, edge2, normal, Nnormal; + TRACE("pout %p, pv1 %p, pv2 %p, pv3 %p\n", pout, pv1, pv2, pv3); + edge1.x = 0.0f; edge1.y = 0.0f; edge1.z = 0.0f; edge2.x = 0.0f; edge2.y = 0.0f; edge2.z = 0.0f; D3DXVec3Subtract(&edge1, pv2, pv1); @@ -1077,11 +1270,13 @@ D3DXPLANE* WINAPI D3DXPlaneFromPoints(D3DXPLANE *pout, CONST D3DXVECTOR3 *pv1, C return pout; } -D3DXVECTOR3* WINAPI D3DXPlaneIntersectLine(D3DXVECTOR3 *pout, CONST D3DXPLANE *pp, CONST D3DXVECTOR3 *pv1, CONST D3DXVECTOR3 *pv2) +D3DXVECTOR3* WINAPI D3DXPlaneIntersectLine(D3DXVECTOR3 *pout, const D3DXPLANE *pp, const D3DXVECTOR3 *pv1, const D3DXVECTOR3 *pv2) { D3DXVECTOR3 direction, normal; FLOAT dot, temp; + TRACE("pout %p, pp %p, pv1 %p, pv2 %p\n", pout, pp, pv1, pv2); + normal.x = pp->a; normal.y = pp->b; normal.z = pp->c; @@ -1097,33 +1292,37 @@ D3DXVECTOR3* WINAPI D3DXPlaneIntersectLine(D3DXVECTOR3 *pout, CONST D3DXPLANE *p return pout; } -D3DXPLANE* WINAPI D3DXPlaneNormalize(D3DXPLANE *pout, CONST D3DXPLANE *pp) +D3DXPLANE * WINAPI D3DXPlaneNormalize(D3DXPLANE *out, const D3DXPLANE *p) { - D3DXPLANE out; FLOAT norm; - norm = sqrt(pp->a * pp->a + pp->b * pp->b + pp->c * pp->c); - if ( norm ) + TRACE("out %p, p %p\n", out, p); + + norm = sqrtf(p->a * p->a + p->b * p->b + p->c * p->c); + if (norm) { - out.a = pp->a / norm; - out.b = pp->b / norm; - out.c = pp->c / norm; - out.d = pp->d / norm; + out->a = p->a / norm; + out->b = p->b / norm; + out->c = p->c / norm; + out->d = p->d / norm; } else { - out.a = 0.0f; - out.b = 0.0f; - out.c = 0.0f; - out.d = 0.0f; + out->a = 0.0f; + out->b = 0.0f; + out->c = 0.0f; + out->d = 0.0f; } - *pout = out; - return pout; + + return out; } -D3DXPLANE* WINAPI D3DXPlaneTransform(D3DXPLANE *pout, CONST D3DXPLANE *pplane, CONST D3DXMATRIX *pm) +D3DXPLANE* WINAPI D3DXPlaneTransform(D3DXPLANE *pout, const D3DXPLANE *pplane, const D3DXMATRIX *pm) { - CONST D3DXPLANE plane = *pplane; + const D3DXPLANE plane = *pplane; + + TRACE("pout %p, pplane %p, pm %p\n", pout, pplane, pm); + pout->a = pm->u.m[0][0] * plane.a + pm->u.m[1][0] * plane.b + pm->u.m[2][0] * plane.c + pm->u.m[3][0] * plane.d; pout->b = pm->u.m[0][1] * plane.a + pm->u.m[1][1] * plane.b + pm->u.m[2][1] * plane.c + pm->u.m[3][1] * plane.d; pout->c = pm->u.m[0][2] * plane.a + pm->u.m[1][2] * plane.b + pm->u.m[2][2] * plane.c + pm->u.m[3][2] * plane.d; @@ -1131,14 +1330,16 @@ D3DXPLANE* WINAPI D3DXPlaneTransform(D3DXPLANE *pout, CONST D3DXPLANE *pplane, C return pout; } -D3DXPLANE* WINAPI D3DXPlaneTransformArray(D3DXPLANE* out, UINT outstride, CONST D3DXPLANE* in, UINT instride, CONST D3DXMATRIX* matrix, UINT elements) +D3DXPLANE* WINAPI D3DXPlaneTransformArray(D3DXPLANE* out, UINT outstride, const D3DXPLANE* in, UINT instride, const D3DXMATRIX* matrix, UINT elements) { UINT i; + TRACE("out %p, outstride %u, in %p, instride %u, matrix %p, elements %u\n", out, outstride, in, instride, matrix, elements); + for (i = 0; i < elements; ++i) { D3DXPlaneTransform( (D3DXPLANE*)((char*)out + outstride * i), - (CONST D3DXPLANE*)((const char*)in + instride * i), + (const D3DXPLANE*)((const char*)in + instride * i), matrix); } return out; @@ -1146,40 +1347,48 @@ D3DXPLANE* WINAPI D3DXPlaneTransformArray(D3DXPLANE* out, UINT outstride, CONST /*_________________D3DXQUATERNION________________*/ -D3DXQUATERNION* WINAPI D3DXQuaternionBaryCentric(D3DXQUATERNION *pout, CONST D3DXQUATERNION *pq1, CONST D3DXQUATERNION *pq2, CONST D3DXQUATERNION *pq3, FLOAT f, FLOAT g) +D3DXQUATERNION* WINAPI D3DXQuaternionBaryCentric(D3DXQUATERNION *pout, const D3DXQUATERNION *pq1, const D3DXQUATERNION *pq2, const D3DXQUATERNION *pq3, FLOAT f, FLOAT g) { D3DXQUATERNION temp1, temp2; + + TRACE("pout %p, pq1 %p, pq2 %p, pq3 %p, f %f, g %f\n", pout, pq1, pq2, pq3, f, g); + D3DXQuaternionSlerp(pout, D3DXQuaternionSlerp(&temp1, pq1, pq2, f + g), D3DXQuaternionSlerp(&temp2, pq1, pq3, f+g), g / (f + g)); return pout; } -D3DXQUATERNION* WINAPI D3DXQuaternionExp(D3DXQUATERNION *pout, CONST D3DXQUATERNION *pq) +D3DXQUATERNION * WINAPI D3DXQuaternionExp(D3DXQUATERNION *out, const D3DXQUATERNION *q) { FLOAT norm; - norm = sqrt(pq->x * pq->x + pq->y * pq->y + pq->z * pq->z); - if (norm ) + TRACE("out %p, q %p\n", out, q); + + norm = sqrtf(q->x * q->x + q->y * q->y + q->z * q->z); + if (norm) { - pout->x = sin(norm) * pq->x / norm; - pout->y = sin(norm) * pq->y / norm; - pout->z = sin(norm) * pq->z / norm; - pout->w = cos(norm); + out->x = sinf(norm) * q->x / norm; + out->y = sinf(norm) * q->y / norm; + out->z = sinf(norm) * q->z / norm; + out->w = cosf(norm); } else { - pout->x = 0.0f; - pout->y = 0.0f; - pout->z = 0.0f; - pout->w = 1.0f; + out->x = 0.0f; + out->y = 0.0f; + out->z = 0.0f; + out->w = 1.0f; } - return pout; + + return out; } -D3DXQUATERNION* WINAPI D3DXQuaternionInverse(D3DXQUATERNION *pout, CONST D3DXQUATERNION *pq) +D3DXQUATERNION* WINAPI D3DXQuaternionInverse(D3DXQUATERNION *pout, const D3DXQUATERNION *pq) { D3DXQUATERNION out; FLOAT norm; + TRACE("pout %p, pq %p\n", pout, pq); + norm = D3DXQuaternionLengthSq(pq); out.x = -pq->x / norm; @@ -1191,37 +1400,31 @@ D3DXQUATERNION* WINAPI D3DXQuaternionInverse(D3DXQUATERNION *pout, CONST D3DXQUA return pout; } -D3DXQUATERNION* WINAPI D3DXQuaternionLn(D3DXQUATERNION *pout, CONST D3DXQUATERNION *pq) +D3DXQUATERNION * WINAPI D3DXQuaternionLn(D3DXQUATERNION *out, const D3DXQUATERNION *q) { - FLOAT norm, normvec, theta; + FLOAT t; - norm = D3DXQuaternionLengthSq(pq); - if ( norm > 1.0001f ) - { - pout->x = pq->x; - pout->y = pq->y; - pout->z = pq->z; - pout->w = 0.0f; - } - else if( norm > 0.99999f) - { - normvec = sqrt( pq->x * pq->x + pq->y * pq->y + pq->z * pq->z ); - theta = atan2(normvec, pq->w) / normvec; - pout->x = theta * pq->x; - pout->y = theta * pq->y; - pout->z = theta * pq->z; - pout->w = 0.0f; - } + TRACE("out %p, q %p\n", out, q); + + if ((q->w >= 1.0f) || (q->w == -1.0f)) + t = 1.0f; else - { - FIXME("The quaternion (%f, %f, %f, %f) has a norm <1. This should not happen. Windows returns a result anyway. This case is not implemented yet.\n", pq->x, pq->y, pq->z, pq->w); - } - return pout; + t = acosf(q->w) / sqrtf(1.0f - q->w * q->w); + + out->x = t * q->x; + out->y = t * q->y; + out->z = t * q->z; + out->w = 0.0f; + + return out; } -D3DXQUATERNION* WINAPI D3DXQuaternionMultiply(D3DXQUATERNION *pout, CONST D3DXQUATERNION *pq1, CONST D3DXQUATERNION *pq2) +D3DXQUATERNION* WINAPI D3DXQuaternionMultiply(D3DXQUATERNION *pout, const D3DXQUATERNION *pq1, const D3DXQUATERNION *pq2) { D3DXQUATERNION out; + + TRACE("pout %p, pq1 %p, pq2 %p\n", pout, pq1, pq2); + out.x = pq2->w * pq1->x + pq2->x * pq1->w + pq2->y * pq1->z - pq2->z * pq1->y; out.y = pq2->w * pq1->y - pq2->x * pq1->z + pq2->y * pq1->w + pq2->z * pq1->x; out.z = pq2->w * pq1->z + pq2->x * pq1->y - pq2->y * pq1->x + pq2->z * pq1->w; @@ -1230,131 +1433,227 @@ D3DXQUATERNION* WINAPI D3DXQuaternionMultiply(D3DXQUATERNION *pout, CONST D3DXQU return pout; } -D3DXQUATERNION* WINAPI D3DXQuaternionNormalize(D3DXQUATERNION *pout, CONST D3DXQUATERNION *pq) +D3DXQUATERNION * WINAPI D3DXQuaternionNormalize(D3DXQUATERNION *out, const D3DXQUATERNION *q) { - D3DXQUATERNION out; FLOAT norm; - norm = D3DXQuaternionLength(pq); + TRACE("out %p, q %p\n", out, q); - out.x = pq->x / norm; - out.y = pq->y / norm; - out.z = pq->z / norm; - out.w = pq->w / norm; + norm = D3DXQuaternionLength(q); - *pout=out; + out->x = q->x / norm; + out->y = q->y / norm; + out->z = q->z / norm; + out->w = q->w / norm; - return pout; + return out; } -D3DXQUATERNION* WINAPI D3DXQuaternionRotationAxis(D3DXQUATERNION *pout, CONST D3DXVECTOR3 *pv, FLOAT angle) +D3DXQUATERNION * WINAPI D3DXQuaternionRotationAxis(D3DXQUATERNION *out, const D3DXVECTOR3 *v, FLOAT angle) { D3DXVECTOR3 temp; - D3DXVec3Normalize(&temp, pv); - pout->x = sin( angle / 2.0f ) * temp.x; - pout->y = sin( angle / 2.0f ) * temp.y; - pout->z = sin( angle / 2.0f ) * temp.z; - pout->w = cos( angle / 2.0f ); - return pout; + TRACE("out %p, v %p, angle %f\n", out, v, angle); + + D3DXVec3Normalize(&temp, v); + + out->x = sinf(angle / 2.0f) * temp.x; + out->y = sinf(angle / 2.0f) * temp.y; + out->z = sinf(angle / 2.0f) * temp.z; + out->w = cosf(angle / 2.0f); + + return out; } -D3DXQUATERNION* WINAPI D3DXQuaternionRotationMatrix(D3DXQUATERNION *pout, CONST D3DXMATRIX *pm) +D3DXQUATERNION * WINAPI D3DXQuaternionRotationMatrix(D3DXQUATERNION *out, const D3DXMATRIX *m) { - int i, maxi; - FLOAT maxdiag, S, trace; + FLOAT s, trace; - trace = pm->u.m[0][0] + pm->u.m[1][1] + pm->u.m[2][2] + 1.0f; - if ( trace > 1.0f) + TRACE("out %p, m %p\n", out, m); + + trace = m->u.m[0][0] + m->u.m[1][1] + m->u.m[2][2] + 1.0f; + if (trace > 1.0f) { - pout->x = ( pm->u.m[1][2] - pm->u.m[2][1] ) / ( 2.0f * sqrt(trace) ); - pout->y = ( pm->u.m[2][0] - pm->u.m[0][2] ) / ( 2.0f * sqrt(trace) ); - pout->z = ( pm->u.m[0][1] - pm->u.m[1][0] ) / ( 2.0f * sqrt(trace) ); - pout->w = sqrt(trace) / 2.0f; - return pout; - } - maxi = 0; - maxdiag = pm->u.m[0][0]; - for (i=1; i<3; i++) - { - if ( pm->u.m[i][i] > maxdiag ) - { - maxi = i; - maxdiag = pm->u.m[i][i]; - } + s = 2.0f * sqrtf(trace); + out->x = (m->u.m[1][2] - m->u.m[2][1]) / s; + out->y = (m->u.m[2][0] - m->u.m[0][2]) / s; + out->z = (m->u.m[0][1] - m->u.m[1][0]) / s; + out->w = 0.25f * s; } - switch( maxi ) + else { - case 0: - S = 2.0f * sqrt(1.0f + pm->u.m[0][0] - pm->u.m[1][1] - pm->u.m[2][2]); - pout->x = 0.25f * S; - pout->y = ( pm->u.m[0][1] + pm->u.m[1][0] ) / S; - pout->z = ( pm->u.m[0][2] + pm->u.m[2][0] ) / S; - pout->w = ( pm->u.m[1][2] - pm->u.m[2][1] ) / S; - break; - case 1: - S = 2.0f * sqrt(1.0f + pm->u.m[1][1] - pm->u.m[0][0] - pm->u.m[2][2]); - pout->x = ( pm->u.m[0][1] + pm->u.m[1][0] ) / S; - pout->y = 0.25f * S; - pout->z = ( pm->u.m[1][2] + pm->u.m[2][1] ) / S; - pout->w = ( pm->u.m[2][0] - pm->u.m[0][2] ) / S; - break; - case 2: - S = 2.0f * sqrt(1.0f + pm->u.m[2][2] - pm->u.m[0][0] - pm->u.m[1][1]); - pout->x = ( pm->u.m[0][2] + pm->u.m[2][0] ) / S; - pout->y = ( pm->u.m[1][2] + pm->u.m[2][1] ) / S; - pout->z = 0.25f * S; - pout->w = ( pm->u.m[0][1] - pm->u.m[1][0] ) / S; - break; + int i, maxi = 0; + + for (i = 1; i < 3; i++) + { + if (m->u.m[i][i] > m->u.m[maxi][maxi]) + maxi = i; + } + + switch (maxi) + { + case 0: + s = 2.0f * sqrtf(1.0f + m->u.m[0][0] - m->u.m[1][1] - m->u.m[2][2]); + out->x = 0.25f * s; + out->y = (m->u.m[0][1] + m->u.m[1][0]) / s; + out->z = (m->u.m[0][2] + m->u.m[2][0]) / s; + out->w = (m->u.m[1][2] - m->u.m[2][1]) / s; + break; + + case 1: + s = 2.0f * sqrtf(1.0f + m->u.m[1][1] - m->u.m[0][0] - m->u.m[2][2]); + out->x = (m->u.m[0][1] + m->u.m[1][0]) / s; + out->y = 0.25f * s; + out->z = (m->u.m[1][2] + m->u.m[2][1]) / s; + out->w = (m->u.m[2][0] - m->u.m[0][2]) / s; + break; + + case 2: + s = 2.0f * sqrtf(1.0f + m->u.m[2][2] - m->u.m[0][0] - m->u.m[1][1]); + out->x = (m->u.m[0][2] + m->u.m[2][0]) / s; + out->y = (m->u.m[1][2] + m->u.m[2][1]) / s; + out->z = 0.25f * s; + out->w = (m->u.m[0][1] - m->u.m[1][0]) / s; + break; + } } - return pout; + + return out; } -D3DXQUATERNION* WINAPI D3DXQuaternionRotationYawPitchRoll(D3DXQUATERNION *pout, FLOAT yaw, FLOAT pitch, FLOAT roll) +D3DXQUATERNION * WINAPI D3DXQuaternionRotationYawPitchRoll(D3DXQUATERNION *out, FLOAT yaw, FLOAT pitch, FLOAT roll) { - pout->x = sin( yaw / 2.0f) * cos(pitch / 2.0f) * sin(roll / 2.0f) + cos(yaw / 2.0f) * sin(pitch / 2.0f) * cos(roll / 2.0f); - pout->y = sin( yaw / 2.0f) * cos(pitch / 2.0f) * cos(roll / 2.0f) - cos(yaw / 2.0f) * sin(pitch / 2.0f) * sin(roll / 2.0f); - pout->z = cos(yaw / 2.0f) * cos(pitch / 2.0f) * sin(roll / 2.0f) - sin( yaw / 2.0f) * sin(pitch / 2.0f) * cos(roll / 2.0f); - pout->w = cos( yaw / 2.0f) * cos(pitch / 2.0f) * cos(roll / 2.0f) + sin(yaw / 2.0f) * sin(pitch / 2.0f) * sin(roll / 2.0f); - return pout; + FLOAT syaw, cyaw, spitch, cpitch, sroll, croll; + + TRACE("out %p, yaw %f, pitch %f, roll %f\n", out, yaw, pitch, roll); + + syaw = sinf(yaw / 2.0f); + cyaw = cosf(yaw / 2.0f); + spitch = sinf(pitch / 2.0f); + cpitch = cosf(pitch / 2.0f); + sroll = sinf(roll / 2.0f); + croll = cosf(roll / 2.0f); + + out->x = syaw * cpitch * sroll + cyaw * spitch * croll; + out->y = syaw * cpitch * croll - cyaw * spitch * sroll; + out->z = cyaw * cpitch * sroll - syaw * spitch * croll; + out->w = cyaw * cpitch * croll + syaw * spitch * sroll; + + return out; } -D3DXQUATERNION* WINAPI D3DXQuaternionSlerp(D3DXQUATERNION *pout, CONST D3DXQUATERNION *pq1, CONST D3DXQUATERNION *pq2, FLOAT t) +D3DXQUATERNION * WINAPI D3DXQuaternionSlerp(D3DXQUATERNION *out, const D3DXQUATERNION *q1, + const D3DXQUATERNION *q2, FLOAT t) { - FLOAT dot, epsilon, temp, theta, u; + FLOAT dot, temp; + + TRACE("out %p, q1 %p, q2 %p, t %f\n", out, q1, q2, t); - epsilon = 1.0f; temp = 1.0f - t; - u = t; - dot = D3DXQuaternionDot(pq1, pq2); - if ( dot < 0.0f ) + dot = D3DXQuaternionDot(q1, q2); + if (dot < 0.0f) { - epsilon = -1.0f; + t = -t; dot = -dot; } - if( 1.0f - dot > 0.001f ) + + if (1.0f - dot > 0.001f) { - theta = acos(dot); - temp = sin(theta * temp) / sin(theta); - u = sin(theta * u) / sin(theta); + FLOAT theta = acosf(dot); + + temp = sinf(theta * temp) / sinf(theta); + t = sinf(theta * t) / sinf(theta); } - pout->x = temp * pq1->x + epsilon * u * pq2->x; - pout->y = temp * pq1->y + epsilon * u * pq2->y; - pout->z = temp * pq1->z + epsilon * u * pq2->z; - pout->w = temp * pq1->w + epsilon * u * pq2->w; - return pout; + + out->x = temp * q1->x + t * q2->x; + out->y = temp * q1->y + t * q2->y; + out->z = temp * q1->z + t * q2->z; + out->w = temp * q1->w + t * q2->w; + + return out; } -D3DXQUATERNION* WINAPI D3DXQuaternionSquad(D3DXQUATERNION *pout, CONST D3DXQUATERNION *pq1, CONST D3DXQUATERNION *pq2, CONST D3DXQUATERNION *pq3, CONST D3DXQUATERNION *pq4, FLOAT t) +D3DXQUATERNION* WINAPI D3DXQuaternionSquad(D3DXQUATERNION *pout, const D3DXQUATERNION *pq1, const D3DXQUATERNION *pq2, const D3DXQUATERNION *pq3, const D3DXQUATERNION *pq4, FLOAT t) { D3DXQUATERNION temp1, temp2; + TRACE("pout %p, pq1 %p, pq2 %p, pq3 %p, pq4 %p, t %f\n", pout, pq1, pq2, pq3, pq4, t); + D3DXQuaternionSlerp(pout, D3DXQuaternionSlerp(&temp1, pq1, pq4, t), D3DXQuaternionSlerp(&temp2, pq2, pq3, t), 2.0f * t * (1.0f - t)); return pout; } -void WINAPI D3DXQuaternionToAxisAngle(CONST D3DXQUATERNION *pq, D3DXVECTOR3 *paxis, FLOAT *pangle) +static D3DXQUATERNION add_diff(const D3DXQUATERNION *q1, const D3DXQUATERNION *q2, const FLOAT add) { + D3DXQUATERNION temp; + + temp.x = q1->x + add * q2->x; + temp.y = q1->y + add * q2->y; + temp.z = q1->z + add * q2->z; + temp.w = q1->w + add * q2->w; + + return temp; +} + +void WINAPI D3DXQuaternionSquadSetup(D3DXQUATERNION *paout, D3DXQUATERNION *pbout, D3DXQUATERNION *pcout, const D3DXQUATERNION *pq0, const D3DXQUATERNION *pq1, const D3DXQUATERNION *pq2, const D3DXQUATERNION *pq3) +{ + D3DXQUATERNION q, temp1, temp2, temp3, zero; + + TRACE("paout %p, pbout %p, pcout %p, pq0 %p, pq1 %p, pq2 %p, pq3 %p\n", paout, pbout, pcout, pq0, pq1, pq2, pq3); + + zero.x = 0.0f; + zero.y = 0.0f; + zero.z = 0.0f; + zero.w = 0.0f; + + if ( D3DXQuaternionDot(pq0, pq1) < 0.0f ) + temp2 = add_diff(&zero, pq0, -1.0f); + else + temp2 = *pq0; + + if ( D3DXQuaternionDot(pq1, pq2) < 0.0f ) + *pcout = add_diff(&zero, pq2, -1.0f); + else + *pcout = *pq2; + + if ( D3DXQuaternionDot(pcout, pq3) < 0.0f ) + temp3 = add_diff(&zero, pq3, -1.0f); + else + temp3 = *pq3; + + D3DXQuaternionInverse(&temp1, pq1); + D3DXQuaternionMultiply(&temp2, &temp1, &temp2); + D3DXQuaternionLn(&temp2, &temp2); + D3DXQuaternionMultiply(&q, &temp1, pcout); + D3DXQuaternionLn(&q, &q); + temp1 = add_diff(&temp2, &q, 1.0f); + temp1.x *= -0.25f; + temp1.y *= -0.25f; + temp1.z *= -0.25f; + temp1.w *= -0.25f; + D3DXQuaternionExp(&temp1, &temp1); + D3DXQuaternionMultiply(paout, pq1, &temp1); + + D3DXQuaternionInverse(&temp1, pcout); + D3DXQuaternionMultiply(&temp2, &temp1, pq1); + D3DXQuaternionLn(&temp2, &temp2); + D3DXQuaternionMultiply(&q, &temp1, &temp3); + D3DXQuaternionLn(&q, &q); + temp1 = add_diff(&temp2, &q, 1.0f); + temp1.x *= -0.25f; + temp1.y *= -0.25f; + temp1.z *= -0.25f; + temp1.w *= -0.25f; + D3DXQuaternionExp(&temp1, &temp1); + D3DXQuaternionMultiply(pbout, pcout, &temp1); + + return; +} + +void WINAPI D3DXQuaternionToAxisAngle(const D3DXQUATERNION *pq, D3DXVECTOR3 *paxis, FLOAT *pangle) +{ + TRACE("pq %p, paxis %p, pangle %p\n", pq, paxis, pangle); + paxis->x = pq->x; paxis->y = pq->y; paxis->z = pq->z; @@ -1363,24 +1662,30 @@ void WINAPI D3DXQuaternionToAxisAngle(CONST D3DXQUATERNION *pq, D3DXVECTOR3 *pax /*_________________D3DXVec2_____________________*/ -D3DXVECTOR2* WINAPI D3DXVec2BaryCentric(D3DXVECTOR2 *pout, CONST D3DXVECTOR2 *pv1, CONST D3DXVECTOR2 *pv2, CONST D3DXVECTOR2 *pv3, FLOAT f, FLOAT g) +D3DXVECTOR2* WINAPI D3DXVec2BaryCentric(D3DXVECTOR2 *pout, const D3DXVECTOR2 *pv1, const D3DXVECTOR2 *pv2, const D3DXVECTOR2 *pv3, FLOAT f, FLOAT g) { + TRACE("pout %p, pv1 %p, pv2 %p, pv3 %p, f %f, g %f\n", pout, pv1, pv2, pv3, f, g); + pout->x = (1.0f-f-g) * (pv1->x) + f * (pv2->x) + g * (pv3->x); pout->y = (1.0f-f-g) * (pv1->y) + f * (pv2->y) + g * (pv3->y); return pout; } -D3DXVECTOR2* WINAPI D3DXVec2CatmullRom(D3DXVECTOR2 *pout, CONST D3DXVECTOR2 *pv0, CONST D3DXVECTOR2 *pv1, CONST D3DXVECTOR2 *pv2, CONST D3DXVECTOR2 *pv3, FLOAT s) +D3DXVECTOR2* WINAPI D3DXVec2CatmullRom(D3DXVECTOR2 *pout, const D3DXVECTOR2 *pv0, const D3DXVECTOR2 *pv1, const D3DXVECTOR2 *pv2, const D3DXVECTOR2 *pv3, FLOAT s) { + TRACE("pout %p, pv0 %p, pv1 %p, pv2 %p, pv3 %p, s %f\n", pout, pv0, pv1, pv2, pv3, s); + pout->x = 0.5f * (2.0f * pv1->x + (pv2->x - pv0->x) *s + (2.0f *pv0->x - 5.0f * pv1->x + 4.0f * pv2->x - pv3->x) * s * s + (pv3->x -3.0f * pv2->x + 3.0f * pv1->x - pv0->x) * s * s * s); pout->y = 0.5f * (2.0f * pv1->y + (pv2->y - pv0->y) *s + (2.0f *pv0->y - 5.0f * pv1->y + 4.0f * pv2->y - pv3->y) * s * s + (pv3->y -3.0f * pv2->y + 3.0f * pv1->y - pv0->y) * s * s * s); return pout; } -D3DXVECTOR2* WINAPI D3DXVec2Hermite(D3DXVECTOR2 *pout, CONST D3DXVECTOR2 *pv1, CONST D3DXVECTOR2 *pt1, CONST D3DXVECTOR2 *pv2, CONST D3DXVECTOR2 *pt2, FLOAT s) +D3DXVECTOR2* WINAPI D3DXVec2Hermite(D3DXVECTOR2 *pout, const D3DXVECTOR2 *pv1, const D3DXVECTOR2 *pt1, const D3DXVECTOR2 *pv2, const D3DXVECTOR2 *pt2, FLOAT s) { FLOAT h1, h2, h3, h4; + TRACE("pout %p, pv1 %p, pt1 %p, pv2 %p, pt2 %p, s %f\n", pout, pv1, pt1, pv2, pt2, s); + h1 = 2.0f * s * s * s - 3.0f * s * s + 1.0f; h2 = s * s * s - 2.0f * s * s + s; h3 = -2.0f * s * s * s + 3.0f * s * s; @@ -1391,28 +1696,31 @@ D3DXVECTOR2* WINAPI D3DXVec2Hermite(D3DXVECTOR2 *pout, CONST D3DXVECTOR2 *pv1, C return pout; } -D3DXVECTOR2* WINAPI D3DXVec2Normalize(D3DXVECTOR2 *pout, CONST D3DXVECTOR2 *pv) +D3DXVECTOR2* WINAPI D3DXVec2Normalize(D3DXVECTOR2 *pout, const D3DXVECTOR2 *pv) { - D3DXVECTOR2 out; FLOAT norm; + TRACE("pout %p, pv %p\n", pout, pv); + norm = D3DXVec2Length(pv); if ( !norm ) { - out.x = 0.0f; - out.y = 0.0f; + pout->x = 0.0f; + pout->y = 0.0f; } else { - out.x = pv->x / norm; - out.y = pv->y / norm; + pout->x = pv->x / norm; + pout->y = pv->y / norm; } - *pout=out; + return pout; } -D3DXVECTOR4* WINAPI D3DXVec2Transform(D3DXVECTOR4 *pout, CONST D3DXVECTOR2 *pv, CONST D3DXMATRIX *pm) +D3DXVECTOR4* WINAPI D3DXVec2Transform(D3DXVECTOR4 *pout, const D3DXVECTOR2 *pv, const D3DXMATRIX *pm) { + TRACE("pout %p, pv %p, pm %p\n", pout, pv, pm); + pout->x = pm->u.m[0][0] * pv->x + pm->u.m[1][0] * pv->y + pm->u.m[3][0]; pout->y = pm->u.m[0][1] * pv->x + pm->u.m[1][1] * pv->y + pm->u.m[3][1]; pout->z = pm->u.m[0][2] * pv->x + pm->u.m[1][2] * pv->y + pm->u.m[3][2]; @@ -1420,24 +1728,28 @@ D3DXVECTOR4* WINAPI D3DXVec2Transform(D3DXVECTOR4 *pout, CONST D3DXVECTOR2 *pv, return pout; } -D3DXVECTOR4* WINAPI D3DXVec2TransformArray(D3DXVECTOR4* out, UINT outstride, CONST D3DXVECTOR2* in, UINT instride, CONST D3DXMATRIX* matrix, UINT elements) +D3DXVECTOR4* WINAPI D3DXVec2TransformArray(D3DXVECTOR4* out, UINT outstride, const D3DXVECTOR2* in, UINT instride, const D3DXMATRIX* matrix, UINT elements) { UINT i; + TRACE("out %p, outstride %u, in %p, instride %u, matrix %p, elements %u\n", out, outstride, in, instride, matrix, elements); + for (i = 0; i < elements; ++i) { D3DXVec2Transform( (D3DXVECTOR4*)((char*)out + outstride * i), - (CONST D3DXVECTOR2*)((const char*)in + instride * i), + (const D3DXVECTOR2*)((const char*)in + instride * i), matrix); } return out; } -D3DXVECTOR2* WINAPI D3DXVec2TransformCoord(D3DXVECTOR2 *pout, CONST D3DXVECTOR2 *pv, CONST D3DXMATRIX *pm) +D3DXVECTOR2* WINAPI D3DXVec2TransformCoord(D3DXVECTOR2 *pout, const D3DXVECTOR2 *pv, const D3DXMATRIX *pm) { D3DXVECTOR2 v; FLOAT norm; + TRACE("pout %p, pv %p, pm %p\n", pout, pv, pm); + v = *pv; norm = pm->u.m[0][3] * pv->x + pm->u.m[1][3] * pv->y + pm->u.m[3][3]; @@ -1447,35 +1759,42 @@ D3DXVECTOR2* WINAPI D3DXVec2TransformCoord(D3DXVECTOR2 *pout, CONST D3DXVECTOR2 return pout; } -D3DXVECTOR2* WINAPI D3DXVec2TransformCoordArray(D3DXVECTOR2* out, UINT outstride, CONST D3DXVECTOR2* in, UINT instride, CONST D3DXMATRIX* matrix, UINT elements) +D3DXVECTOR2* WINAPI D3DXVec2TransformCoordArray(D3DXVECTOR2* out, UINT outstride, const D3DXVECTOR2* in, UINT instride, const D3DXMATRIX* matrix, UINT elements) { UINT i; + TRACE("out %p, outstride %u, in %p, instride %u, matrix %p, elements %u\n", out, outstride, in, instride, matrix, elements); + for (i = 0; i < elements; ++i) { D3DXVec2TransformCoord( (D3DXVECTOR2*)((char*)out + outstride * i), - (CONST D3DXVECTOR2*)((const char*)in + instride * i), + (const D3DXVECTOR2*)((const char*)in + instride * i), matrix); } return out; } -D3DXVECTOR2* WINAPI D3DXVec2TransformNormal(D3DXVECTOR2 *pout, CONST D3DXVECTOR2 *pv, CONST D3DXMATRIX *pm) +D3DXVECTOR2* WINAPI D3DXVec2TransformNormal(D3DXVECTOR2 *pout, const D3DXVECTOR2 *pv, const D3DXMATRIX *pm) { - CONST D3DXVECTOR2 v = *pv; + const D3DXVECTOR2 v = *pv; + + TRACE("pout %p, pv %p, pm %p\n", pout, pv, pm); + pout->x = pm->u.m[0][0] * v.x + pm->u.m[1][0] * v.y; pout->y = pm->u.m[0][1] * v.x + pm->u.m[1][1] * v.y; return pout; } -D3DXVECTOR2* WINAPI D3DXVec2TransformNormalArray(D3DXVECTOR2* out, UINT outstride, CONST D3DXVECTOR2 *in, UINT instride, CONST D3DXMATRIX *matrix, UINT elements) +D3DXVECTOR2* WINAPI D3DXVec2TransformNormalArray(D3DXVECTOR2* out, UINT outstride, const D3DXVECTOR2 *in, UINT instride, const D3DXMATRIX *matrix, UINT elements) { UINT i; + TRACE("out %p, outstride %u, in %p, instride %u, matrix %p, elements %u\n", out, outstride, in, instride, matrix, elements); + for (i = 0; i < elements; ++i) { D3DXVec2TransformNormal( (D3DXVECTOR2*)((char*)out + outstride * i), - (CONST D3DXVECTOR2*)((const char*)in + instride * i), + (const D3DXVECTOR2*)((const char*)in + instride * i), matrix); } return out; @@ -1483,26 +1802,32 @@ D3DXVECTOR2* WINAPI D3DXVec2TransformNormalArray(D3DXVECTOR2* out, UINT outstrid /*_________________D3DXVec3_____________________*/ -D3DXVECTOR3* WINAPI D3DXVec3BaryCentric(D3DXVECTOR3 *pout, CONST D3DXVECTOR3 *pv1, CONST D3DXVECTOR3 *pv2, CONST D3DXVECTOR3 *pv3, FLOAT f, FLOAT g) +D3DXVECTOR3* WINAPI D3DXVec3BaryCentric(D3DXVECTOR3 *pout, const D3DXVECTOR3 *pv1, const D3DXVECTOR3 *pv2, const D3DXVECTOR3 *pv3, FLOAT f, FLOAT g) { + TRACE("pout %p, pv1 %p, pv2 %p, pv3 %p, f %f, g %f\n", pout, pv1, pv2, pv3, f, g); + pout->x = (1.0f-f-g) * (pv1->x) + f * (pv2->x) + g * (pv3->x); pout->y = (1.0f-f-g) * (pv1->y) + f * (pv2->y) + g * (pv3->y); pout->z = (1.0f-f-g) * (pv1->z) + f * (pv2->z) + g * (pv3->z); return pout; } -D3DXVECTOR3* WINAPI D3DXVec3CatmullRom( D3DXVECTOR3 *pout, CONST D3DXVECTOR3 *pv0, CONST D3DXVECTOR3 *pv1, CONST D3DXVECTOR3 *pv2, CONST D3DXVECTOR3 *pv3, FLOAT s) +D3DXVECTOR3* WINAPI D3DXVec3CatmullRom( D3DXVECTOR3 *pout, const D3DXVECTOR3 *pv0, const D3DXVECTOR3 *pv1, const D3DXVECTOR3 *pv2, const D3DXVECTOR3 *pv3, FLOAT s) { + TRACE("pout %p, pv0 %p, pv1 %p, pv2 %p, pv3 %p, s %f\n", pout, pv0, pv1, pv2, pv3, s); + pout->x = 0.5f * (2.0f * pv1->x + (pv2->x - pv0->x) *s + (2.0f *pv0->x - 5.0f * pv1->x + 4.0f * pv2->x - pv3->x) * s * s + (pv3->x -3.0f * pv2->x + 3.0f * pv1->x - pv0->x) * s * s * s); pout->y = 0.5f * (2.0f * pv1->y + (pv2->y - pv0->y) *s + (2.0f *pv0->y - 5.0f * pv1->y + 4.0f * pv2->y - pv3->y) * s * s + (pv3->y -3.0f * pv2->y + 3.0f * pv1->y - pv0->y) * s * s * s); pout->z = 0.5f * (2.0f * pv1->z + (pv2->z - pv0->z) *s + (2.0f *pv0->z - 5.0f * pv1->z + 4.0f * pv2->z - pv3->z) * s * s + (pv3->z -3.0f * pv2->z + 3.0f * pv1->z - pv0->z) * s * s * s); return pout; } -D3DXVECTOR3* WINAPI D3DXVec3Hermite(D3DXVECTOR3 *pout, CONST D3DXVECTOR3 *pv1, CONST D3DXVECTOR3 *pt1, CONST D3DXVECTOR3 *pv2, CONST D3DXVECTOR3 *pt2, FLOAT s) +D3DXVECTOR3* WINAPI D3DXVec3Hermite(D3DXVECTOR3 *pout, const D3DXVECTOR3 *pv1, const D3DXVECTOR3 *pt1, const D3DXVECTOR3 *pv2, const D3DXVECTOR3 *pt2, FLOAT s) { FLOAT h1, h2, h3, h4; + TRACE("pout %p, pv1 %p, pt1 %p, pv2 %p, pt2 %p, s %f\n", pout, pv1, pt1, pv2, pt2, s); + h1 = 2.0f * s * s * s - 3.0f * s * s + 1.0f; h2 = s * s * s - 2.0f * s * s + s; h3 = -2.0f * s * s * s + 3.0f * s * s; @@ -1514,58 +1839,71 @@ D3DXVECTOR3* WINAPI D3DXVec3Hermite(D3DXVECTOR3 *pout, CONST D3DXVECTOR3 *pv1, C return pout; } -D3DXVECTOR3* WINAPI D3DXVec3Normalize(D3DXVECTOR3 *pout, CONST D3DXVECTOR3 *pv) +D3DXVECTOR3* WINAPI D3DXVec3Normalize(D3DXVECTOR3 *pout, const D3DXVECTOR3 *pv) { - D3DXVECTOR3 out; FLOAT norm; + TRACE("pout %p, pv %p\n", pout, pv); + norm = D3DXVec3Length(pv); if ( !norm ) { - out.x = 0.0f; - out.y = 0.0f; - out.z = 0.0f; + pout->x = 0.0f; + pout->y = 0.0f; + pout->z = 0.0f; } else { - out.x = pv->x / norm; - out.y = pv->y / norm; - out.z = pv->z / norm; + pout->x = pv->x / norm; + pout->y = pv->y / norm; + pout->z = pv->z / norm; } - *pout = out; + return pout; } -D3DXVECTOR3* WINAPI D3DXVec3Project(D3DXVECTOR3 *pout, CONST D3DXVECTOR3 *pv, CONST D3DVIEWPORT9 *pviewport, CONST D3DXMATRIX *pprojection, CONST D3DXMATRIX *pview, CONST D3DXMATRIX *pworld) +D3DXVECTOR3* WINAPI D3DXVec3Project(D3DXVECTOR3 *pout, const D3DXVECTOR3 *pv, const D3DVIEWPORT9 *pviewport, const D3DXMATRIX *pprojection, const D3DXMATRIX *pview, const D3DXMATRIX *pworld) { D3DXMATRIX m; - D3DXVECTOR3 out; - D3DXMatrixMultiply(&m, pworld, pview); - D3DXMatrixMultiply(&m, &m, pprojection); - D3DXVec3TransformCoord(&out, pv, &m); - out.x = pviewport->X + ( 1.0f + out.x ) * pviewport->Width / 2.0f; - out.y = pviewport->Y + ( 1.0f - out.y ) * pviewport->Height / 2.0f; - out.z = pviewport->MinZ + out.z * ( pviewport->MaxZ - pviewport->MinZ ); - *pout = out; + TRACE("pout %p, pv %p, pviewport %p, pprojection %p, pview %p, pworld %p\n", pout, pv, pviewport, pprojection, pview, pworld); + + D3DXMatrixIdentity(&m); + if (pworld) D3DXMatrixMultiply(&m, &m, pworld); + if (pview) D3DXMatrixMultiply(&m, &m, pview); + if (pprojection) D3DXMatrixMultiply(&m, &m, pprojection); + + D3DXVec3TransformCoord(pout, pv, &m); + + if (pviewport) + { + pout->x = pviewport->X + ( 1.0f + pout->x ) * pviewport->Width / 2.0f; + pout->y = pviewport->Y + ( 1.0f - pout->y ) * pviewport->Height / 2.0f; + pout->z = pviewport->MinZ + pout->z * ( pviewport->MaxZ - pviewport->MinZ ); + } return pout; } -D3DXVECTOR3* WINAPI D3DXVec3ProjectArray(D3DXVECTOR3* out, UINT outstride, CONST D3DXVECTOR3* in, UINT instride, CONST D3DVIEWPORT9* viewport, CONST D3DXMATRIX* projection, CONST D3DXMATRIX* view, CONST D3DXMATRIX* world, UINT elements) +D3DXVECTOR3* WINAPI D3DXVec3ProjectArray(D3DXVECTOR3* out, UINT outstride, const D3DXVECTOR3* in, UINT instride, const D3DVIEWPORT9* viewport, const D3DXMATRIX* projection, const D3DXMATRIX* view, const D3DXMATRIX* world, UINT elements) { UINT i; + TRACE("out %p, outstride %u, in %p, instride %u, viewport %p, projection %p, view %p, world %p, elements %u\n", + out, outstride, in, instride, viewport, projection, view, world, elements); + for (i = 0; i < elements; ++i) { D3DXVec3Project( (D3DXVECTOR3*)((char*)out + outstride * i), - (CONST D3DXVECTOR3*)((const char*)in + instride * i), + (const D3DXVECTOR3*)((const char*)in + instride * i), viewport, projection, view, world); } return out; } -D3DXVECTOR4* WINAPI D3DXVec3Transform(D3DXVECTOR4 *pout, CONST D3DXVECTOR3 *pv, CONST D3DXMATRIX *pm) +D3DXVECTOR4* WINAPI D3DXVec3Transform(D3DXVECTOR4 *pout, const D3DXVECTOR3 *pv, const D3DXMATRIX *pm) { + TRACE("pout %p, pv %p, pm %p\n", pout, pv, pm); + pout->x = pm->u.m[0][0] * pv->x + pm->u.m[1][0] * pv->y + pm->u.m[2][0] * pv->z + pm->u.m[3][0]; pout->y = pm->u.m[0][1] * pv->x + pm->u.m[1][1] * pv->y + pm->u.m[2][1] * pv->z + pm->u.m[3][1]; pout->z = pm->u.m[0][2] * pv->x + pm->u.m[1][2] * pv->y + pm->u.m[2][2] * pv->z + pm->u.m[3][2]; @@ -1573,24 +1911,28 @@ D3DXVECTOR4* WINAPI D3DXVec3Transform(D3DXVECTOR4 *pout, CONST D3DXVECTOR3 *pv, return pout; } -D3DXVECTOR4* WINAPI D3DXVec3TransformArray(D3DXVECTOR4* out, UINT outstride, CONST D3DXVECTOR3* in, UINT instride, CONST D3DXMATRIX* matrix, UINT elements) +D3DXVECTOR4* WINAPI D3DXVec3TransformArray(D3DXVECTOR4* out, UINT outstride, const D3DXVECTOR3* in, UINT instride, const D3DXMATRIX* matrix, UINT elements) { UINT i; + TRACE("out %p, outstride %u, in %p, instride %u, matrix %p, elements %u\n", out, outstride, in, instride, matrix, elements); + for (i = 0; i < elements; ++i) { D3DXVec3Transform( (D3DXVECTOR4*)((char*)out + outstride * i), - (CONST D3DXVECTOR3*)((const char*)in + instride * i), + (const D3DXVECTOR3*)((const char*)in + instride * i), matrix); } return out; } -D3DXVECTOR3* WINAPI D3DXVec3TransformCoord(D3DXVECTOR3 *pout, CONST D3DXVECTOR3 *pv, CONST D3DXMATRIX *pm) +D3DXVECTOR3* WINAPI D3DXVec3TransformCoord(D3DXVECTOR3 *pout, const D3DXVECTOR3 *pv, const D3DXMATRIX *pm) { D3DXVECTOR3 out; FLOAT norm; + TRACE("pout %p, pv %p, pm %p\n", pout, pv, pm); + norm = pm->u.m[0][3] * pv->x + pm->u.m[1][3] * pv->y + pm->u.m[2][3] *pv->z + pm->u.m[3][3]; out.x = (pm->u.m[0][0] * pv->x + pm->u.m[1][0] * pv->y + pm->u.m[2][0] * pv->z + pm->u.m[3][0]) / norm; @@ -1602,22 +1944,27 @@ D3DXVECTOR3* WINAPI D3DXVec3TransformCoord(D3DXVECTOR3 *pout, CONST D3DXVECTOR3 return pout; } -D3DXVECTOR3* WINAPI D3DXVec3TransformCoordArray(D3DXVECTOR3* out, UINT outstride, CONST D3DXVECTOR3* in, UINT instride, CONST D3DXMATRIX* matrix, UINT elements) +D3DXVECTOR3* WINAPI D3DXVec3TransformCoordArray(D3DXVECTOR3* out, UINT outstride, const D3DXVECTOR3* in, UINT instride, const D3DXMATRIX* matrix, UINT elements) { UINT i; + TRACE("out %p, outstride %u, in %p, instride %u, matrix %p, elements %u\n", out, outstride, in, instride, matrix, elements); + for (i = 0; i < elements; ++i) { D3DXVec3TransformCoord( (D3DXVECTOR3*)((char*)out + outstride * i), - (CONST D3DXVECTOR3*)((const char*)in + instride * i), + (const D3DXVECTOR3*)((const char*)in + instride * i), matrix); } return out; } -D3DXVECTOR3* WINAPI D3DXVec3TransformNormal(D3DXVECTOR3 *pout, CONST D3DXVECTOR3 *pv, CONST D3DXMATRIX *pm) +D3DXVECTOR3* WINAPI D3DXVec3TransformNormal(D3DXVECTOR3 *pout, const D3DXVECTOR3 *pv, const D3DXMATRIX *pm) { - CONST D3DXVECTOR3 v = *pv; + const D3DXVECTOR3 v = *pv; + + TRACE("pout %p, pv %p, pm %p\n", pout, pv, pm); + pout->x = pm->u.m[0][0] * v.x + pm->u.m[1][0] * v.y + pm->u.m[2][0] * v.z; pout->y = pm->u.m[0][1] * v.x + pm->u.m[1][1] * v.y + pm->u.m[2][1] * v.z; pout->z = pm->u.m[0][2] * v.x + pm->u.m[1][2] * v.y + pm->u.m[2][2] * v.z; @@ -1625,43 +1972,55 @@ D3DXVECTOR3* WINAPI D3DXVec3TransformNormal(D3DXVECTOR3 *pout, CONST D3DXVECTOR3 } -D3DXVECTOR3* WINAPI D3DXVec3TransformNormalArray(D3DXVECTOR3* out, UINT outstride, CONST D3DXVECTOR3* in, UINT instride, CONST D3DXMATRIX* matrix, UINT elements) +D3DXVECTOR3* WINAPI D3DXVec3TransformNormalArray(D3DXVECTOR3* out, UINT outstride, const D3DXVECTOR3* in, UINT instride, const D3DXMATRIX* matrix, UINT elements) { UINT i; + TRACE("out %p, outstride %u, in %p, instride %u, matrix %p, elements %u\n", out, outstride, in, instride, matrix, elements); + for (i = 0; i < elements; ++i) { D3DXVec3TransformNormal( (D3DXVECTOR3*)((char*)out + outstride * i), - (CONST D3DXVECTOR3*)((const char*)in + instride * i), + (const D3DXVECTOR3*)((const char*)in + instride * i), matrix); } return out; } -D3DXVECTOR3* WINAPI D3DXVec3Unproject(D3DXVECTOR3 *pout, CONST D3DXVECTOR3 *pv, CONST D3DVIEWPORT9 *pviewport, CONST D3DXMATRIX *pprojection, CONST D3DXMATRIX *pview, CONST D3DXMATRIX *pworld) +D3DXVECTOR3* WINAPI D3DXVec3Unproject(D3DXVECTOR3 *pout, const D3DXVECTOR3 *pv, const D3DVIEWPORT9 *pviewport, const D3DXMATRIX *pprojection, const D3DXMATRIX *pview, const D3DXMATRIX *pworld) { D3DXMATRIX m; - D3DXVECTOR3 out; - D3DXMatrixMultiply(&m, pworld, pview); - D3DXMatrixMultiply(&m, &m, pprojection); + TRACE("pout %p, pv %p, pviewport %p, pprojection %p, pview %p, pworlds %p\n", pout, pv, pviewport, pprojection, pview, pworld); + + D3DXMatrixIdentity(&m); + if (pworld) D3DXMatrixMultiply(&m, &m, pworld); + if (pview) D3DXMatrixMultiply(&m, &m, pview); + if (pprojection) D3DXMatrixMultiply(&m, &m, pprojection); D3DXMatrixInverse(&m, NULL, &m); - out.x = 2.0f * ( pv->x - pviewport->X ) / pviewport->Width - 1.0f; - out.y = 1.0f - 2.0f * ( pv->y - pviewport->Y ) / pviewport->Height; - out.z = ( pv->z - pviewport->MinZ) / ( pviewport->MaxZ - pviewport->MinZ ); - D3DXVec3TransformCoord(&out, &out, &m); - *pout = out; + + *pout = *pv; + if (pviewport) + { + pout->x = 2.0f * ( pout->x - pviewport->X ) / pviewport->Width - 1.0f; + pout->y = 1.0f - 2.0f * ( pout->y - pviewport->Y ) / pviewport->Height; + pout->z = ( pout->z - pviewport->MinZ) / ( pviewport->MaxZ - pviewport->MinZ ); + } + D3DXVec3TransformCoord(pout, pout, &m); return pout; } -D3DXVECTOR3* WINAPI D3DXVec3UnprojectArray(D3DXVECTOR3* out, UINT outstride, CONST D3DXVECTOR3* in, UINT instride, CONST D3DVIEWPORT9* viewport, CONST D3DXMATRIX* projection, CONST D3DXMATRIX* view, CONST D3DXMATRIX* world, UINT elements) +D3DXVECTOR3* WINAPI D3DXVec3UnprojectArray(D3DXVECTOR3* out, UINT outstride, const D3DXVECTOR3* in, UINT instride, const D3DVIEWPORT9* viewport, const D3DXMATRIX* projection, const D3DXMATRIX* view, const D3DXMATRIX* world, UINT elements) { UINT i; + TRACE("out %p, outstride %u, in %p, instride %u, viewport %p, projection %p, view %p, world %p, elements %u\n", + out, outstride, in, instride, viewport, projection, view, world, elements); + for (i = 0; i < elements; ++i) { D3DXVec3Unproject( (D3DXVECTOR3*)((char*)out + outstride * i), - (CONST D3DXVECTOR3*)((const char*)in + instride * i), + (const D3DXVECTOR3*)((const char*)in + instride * i), viewport, projection, view, world); } return out; @@ -1669,8 +2028,10 @@ D3DXVECTOR3* WINAPI D3DXVec3UnprojectArray(D3DXVECTOR3* out, UINT outstride, CON /*_________________D3DXVec4_____________________*/ -D3DXVECTOR4* WINAPI D3DXVec4BaryCentric(D3DXVECTOR4 *pout, CONST D3DXVECTOR4 *pv1, CONST D3DXVECTOR4 *pv2, CONST D3DXVECTOR4 *pv3, FLOAT f, FLOAT g) +D3DXVECTOR4* WINAPI D3DXVec4BaryCentric(D3DXVECTOR4 *pout, const D3DXVECTOR4 *pv1, const D3DXVECTOR4 *pv2, const D3DXVECTOR4 *pv3, FLOAT f, FLOAT g) { + TRACE("pout %p, pv1 %p, pv2 %p, pv3 %p, f %f, g %f\n", pout, pv1, pv2, pv3, f, g); + pout->x = (1.0f-f-g) * (pv1->x) + f * (pv2->x) + g * (pv3->x); pout->y = (1.0f-f-g) * (pv1->y) + f * (pv2->y) + g * (pv3->y); pout->z = (1.0f-f-g) * (pv1->z) + f * (pv2->z) + g * (pv3->z); @@ -1678,8 +2039,10 @@ D3DXVECTOR4* WINAPI D3DXVec4BaryCentric(D3DXVECTOR4 *pout, CONST D3DXVECTOR4 *pv return pout; } -D3DXVECTOR4* WINAPI D3DXVec4CatmullRom(D3DXVECTOR4 *pout, CONST D3DXVECTOR4 *pv0, CONST D3DXVECTOR4 *pv1, CONST D3DXVECTOR4 *pv2, CONST D3DXVECTOR4 *pv3, FLOAT s) +D3DXVECTOR4* WINAPI D3DXVec4CatmullRom(D3DXVECTOR4 *pout, const D3DXVECTOR4 *pv0, const D3DXVECTOR4 *pv1, const D3DXVECTOR4 *pv2, const D3DXVECTOR4 *pv3, FLOAT s) { + TRACE("pout %p, pv0 %p, pv1 %p, pv2 %p, pv3 %p, s %f\n", pout, pv0, pv1, pv2, pv3, s); + pout->x = 0.5f * (2.0f * pv1->x + (pv2->x - pv0->x) *s + (2.0f *pv0->x - 5.0f * pv1->x + 4.0f * pv2->x - pv3->x) * s * s + (pv3->x -3.0f * pv2->x + 3.0f * pv1->x - pv0->x) * s * s * s); pout->y = 0.5f * (2.0f * pv1->y + (pv2->y - pv0->y) *s + (2.0f *pv0->y - 5.0f * pv1->y + 4.0f * pv2->y - pv3->y) * s * s + (pv3->y -3.0f * pv2->y + 3.0f * pv1->y - pv0->y) * s * s * s); pout->z = 0.5f * (2.0f * pv1->z + (pv2->z - pv0->z) *s + (2.0f *pv0->z - 5.0f * pv1->z + 4.0f * pv2->z - pv3->z) * s * s + (pv3->z -3.0f * pv2->z + 3.0f * pv1->z - pv0->z) * s * s * s); @@ -1687,9 +2050,12 @@ D3DXVECTOR4* WINAPI D3DXVec4CatmullRom(D3DXVECTOR4 *pout, CONST D3DXVECTOR4 *pv0 return pout; } -D3DXVECTOR4* WINAPI D3DXVec4Cross(D3DXVECTOR4 *pout, CONST D3DXVECTOR4 *pv1, CONST D3DXVECTOR4 *pv2, CONST D3DXVECTOR4 *pv3) +D3DXVECTOR4* WINAPI D3DXVec4Cross(D3DXVECTOR4 *pout, const D3DXVECTOR4 *pv1, const D3DXVECTOR4 *pv2, const D3DXVECTOR4 *pv3) { D3DXVECTOR4 out; + + TRACE("pout %p, pv1 %p, pv2 %p, pv3 %p\n", pout, pv1, pv2, pv3); + out.x = pv1->y * (pv2->z * pv3->w - pv3->z * pv2->w) - pv1->z * (pv2->y * pv3->w - pv3->y * pv2->w) + pv1->w * (pv2->y * pv3->z - pv2->z *pv3->y); out.y = -(pv1->x * (pv2->z * pv3->w - pv3->z * pv2->w) - pv1->z * (pv2->x * pv3->w - pv3->x * pv2->w) + pv1->w * (pv2->x * pv3->z - pv3->x * pv2->z)); out.z = pv1->x * (pv2->y * pv3->w - pv3->y * pv2->w) - pv1->y * (pv2->x *pv3->w - pv3->x * pv2->w) + pv1->w * (pv2->x * pv3->y - pv3->x * pv2->y); @@ -1698,10 +2064,12 @@ D3DXVECTOR4* WINAPI D3DXVec4Cross(D3DXVECTOR4 *pout, CONST D3DXVECTOR4 *pv1, CON return pout; } -D3DXVECTOR4* WINAPI D3DXVec4Hermite(D3DXVECTOR4 *pout, CONST D3DXVECTOR4 *pv1, CONST D3DXVECTOR4 *pt1, CONST D3DXVECTOR4 *pv2, CONST D3DXVECTOR4 *pt2, FLOAT s) +D3DXVECTOR4* WINAPI D3DXVec4Hermite(D3DXVECTOR4 *pout, const D3DXVECTOR4 *pv1, const D3DXVECTOR4 *pt1, const D3DXVECTOR4 *pv2, const D3DXVECTOR4 *pt2, FLOAT s) { FLOAT h1, h2, h3, h4; + TRACE("pout %p, pv1 %p, pt1 %p, pv2 %p, pt2 %p, s %f\n", pout, pv1, pt1, pv2, pt2, s); + h1 = 2.0f * s * s * s - 3.0f * s * s + 1.0f; h2 = s * s * s - 2.0f * s * s + s; h3 = -2.0f * s * s * s + 3.0f * s * s; @@ -1714,25 +2082,28 @@ D3DXVECTOR4* WINAPI D3DXVec4Hermite(D3DXVECTOR4 *pout, CONST D3DXVECTOR4 *pv1, C return pout; } -D3DXVECTOR4* WINAPI D3DXVec4Normalize(D3DXVECTOR4 *pout, CONST D3DXVECTOR4 *pv) +D3DXVECTOR4* WINAPI D3DXVec4Normalize(D3DXVECTOR4 *pout, const D3DXVECTOR4 *pv) { - D3DXVECTOR4 out; FLOAT norm; + TRACE("pout %p, pv %p\n", pout, pv); + norm = D3DXVec4Length(pv); - out.x = pv->x / norm; - out.y = pv->y / norm; - out.z = pv->z / norm; - out.w = pv->w / norm; + pout->x = pv->x / norm; + pout->y = pv->y / norm; + pout->z = pv->z / norm; + pout->w = pv->w / norm; - *pout = out; return pout; } -D3DXVECTOR4* WINAPI D3DXVec4Transform(D3DXVECTOR4 *pout, CONST D3DXVECTOR4 *pv, CONST D3DXMATRIX *pm) +D3DXVECTOR4* WINAPI D3DXVec4Transform(D3DXVECTOR4 *pout, const D3DXVECTOR4 *pv, const D3DXMATRIX *pm) { D3DXVECTOR4 out; + + TRACE("pout %p, pv %p, pm %p\n", pout, pv, pm); + out.x = pm->u.m[0][0] * pv->x + pm->u.m[1][0] * pv->y + pm->u.m[2][0] * pv->z + pm->u.m[3][0] * pv->w; out.y = pm->u.m[0][1] * pv->x + pm->u.m[1][1] * pv->y + pm->u.m[2][1] * pv->z + pm->u.m[3][1] * pv->w; out.z = pm->u.m[0][2] * pv->x + pm->u.m[1][2] * pv->y + pm->u.m[2][2] * pv->z + pm->u.m[3][2] * pv->w; @@ -1741,15 +2112,1034 @@ D3DXVECTOR4* WINAPI D3DXVec4Transform(D3DXVECTOR4 *pout, CONST D3DXVECTOR4 *pv, return pout; } -D3DXVECTOR4* WINAPI D3DXVec4TransformArray(D3DXVECTOR4* out, UINT outstride, CONST D3DXVECTOR4* in, UINT instride, CONST D3DXMATRIX* matrix, UINT elements) +D3DXVECTOR4* WINAPI D3DXVec4TransformArray(D3DXVECTOR4* out, UINT outstride, const D3DXVECTOR4* in, UINT instride, const D3DXMATRIX* matrix, UINT elements) { UINT i; + TRACE("out %p, outstride %u, in %p, instride %u, matrix %p, elements %u\n", out, outstride, in, instride, matrix, elements); + for (i = 0; i < elements; ++i) { D3DXVec4Transform( (D3DXVECTOR4*)((char*)out + outstride * i), - (CONST D3DXVECTOR4*)((const char*)in + instride * i), + (const D3DXVECTOR4*)((const char*)in + instride * i), matrix); } return out; } + +unsigned short float_32_to_16(const float in) +{ + int exp = 0, origexp; + float tmp = fabs(in); + int sign = (copysignf(1, in) < 0); + unsigned int mantissa; + unsigned short ret; + + /* Deal with special numbers */ + if (isinf(in)) return (sign ? 0xffff : 0x7fff); + if (isnan(in)) return (sign ? 0xffff : 0x7fff); + if (in == 0.0f) return (sign ? 0x8000 : 0x0000); + + if (tmp < powf(2, 10)) + { + do + { + tmp *= 2.0f; + exp--; + } while (tmp < powf(2, 10)); + } + else if (tmp >= powf(2, 11)) + { + do + { + tmp /= 2.0f; + exp++; + } while (tmp >= powf(2, 11)); + } + + exp += 10; /* Normalize the mantissa */ + exp += 15; /* Exponent is encoded with excess 15 */ + + origexp = exp; + + mantissa = (unsigned int) tmp; + if ((tmp - mantissa == 0.5f && mantissa % 2 == 1) || /* round half to even */ + (tmp - mantissa > 0.5f)) + { + mantissa++; /* round to nearest, away from zero */ + } + if (mantissa == 2048) + { + mantissa = 1024; + exp++; + } + + if (exp > 31) + { + /* too big */ + ret = 0x7fff; /* INF */ + } + else if (exp <= 0) + { + unsigned int rounding = 0; + + /* Denormalized half float */ + + /* return 0x0000 (=0.0) for numbers too small to represent in half floats */ + if (exp < -11) + return (sign ? 0x8000 : 0x0000); + + exp = origexp; + + /* the 13 extra bits from single precision are used for rounding */ + mantissa = (unsigned int)(tmp * powf(2, 13)); + mantissa >>= 1 - exp; /* denormalize */ + + mantissa -= ~(mantissa >> 13) & 1; /* round half to even */ + /* remove 13 least significant bits to get half float precision */ + mantissa >>= 12; + rounding = mantissa & 1; + mantissa >>= 1; + + ret = mantissa + rounding; + } + else + { + ret = (exp << 10) | (mantissa & 0x3ff); + } + + ret |= ((sign ? 1 : 0) << 15); /* Add the sign */ + return ret; +} + +D3DXFLOAT16 *WINAPI D3DXFloat32To16Array(D3DXFLOAT16 *pout, const FLOAT *pin, UINT n) +{ + unsigned int i; + + TRACE("pout %p, pin %p, n %u\n", pout, pin, n); + + for (i = 0; i < n; ++i) + { + pout[i].value = float_32_to_16(pin[i]); + } + + return pout; +} + +/* Native d3dx9's D3DXFloat16to32Array lacks support for NaN and Inf. Specifically, e = 16 is treated as a + * regular number - e.g., 0x7fff is converted to 131008.0 and 0xffff to -131008.0. */ +static inline float float_16_to_32(const unsigned short in) +{ + const unsigned short s = (in & 0x8000); + const unsigned short e = (in & 0x7C00) >> 10; + const unsigned short m = in & 0x3FF; + const float sgn = (s ? -1.0f : 1.0f); + + if (e == 0) + { + if (m == 0) return sgn * 0.0f; /* +0.0 or -0.0 */ + else return sgn * powf(2, -14.0f) * (m / 1024.0f); + } + else + { + return sgn * powf(2, e - 15.0f) * (1.0f + (m / 1024.0f)); + } +} + +FLOAT *WINAPI D3DXFloat16To32Array(FLOAT *pout, const D3DXFLOAT16 *pin, UINT n) +{ + unsigned int i; + + TRACE("pout %p, pin %p, n %u\n", pout, pin, n); + + for (i = 0; i < n; ++i) + { + pout[i] = float_16_to_32(pin[i].value); + } + + return pout; +} + +/*_________________D3DXSH________________*/ + +FLOAT* WINAPI D3DXSHAdd(FLOAT *out, UINT order, const FLOAT *a, const FLOAT *b) +{ + UINT i; + + TRACE("out %p, order %u, a %p, b %p\n", out, order, a, b); + + for (i = 0; i < order * order; i++) + out[i] = a[i] + b[i]; + + return out; +} + +FLOAT WINAPI D3DXSHDot(UINT order, const FLOAT *a, const FLOAT *b) +{ + FLOAT s; + UINT i; + + TRACE("order %u, a %p, b %p\n", order, a, b); + + s = a[0] * b[0]; + for (i = 1; i < order * order; i++) + s += a[i] * b[i]; + + return s; +} + +static void weightedcapintegrale(FLOAT *out, FLOAT order, FLOAT angle) +{ + FLOAT coeff[3]; + + coeff[0] = cosf(angle); + + out[0] = 2.0f * D3DX_PI * (1.0f - coeff[0]); + out[1] = D3DX_PI * sinf(angle) * sinf(angle); + if (order <= 2) + return; + + out[2] = coeff[0] * out[1]; + if (order == 3) + return; + + coeff[1] = coeff[0] * coeff[0]; + coeff[2] = coeff[1] * coeff[1]; + + out[3] = D3DX_PI * (-1.25f * coeff[2] + 1.5f * coeff[1] - 0.25f); + if (order == 4) + return; + + out[4] = -0.25f * D3DX_PI * coeff[0] * (7.0f * coeff[2] - 10.0f * coeff[1] + 3.0f); + if (order == 5) + return; + + out[5] = D3DX_PI * (-2.625f * coeff[2] * coeff[1] + 4.375f * coeff[2] - 1.875f * coeff[1] + 0.125f); +} + +HRESULT WINAPI D3DXSHEvalConeLight(UINT order, const D3DXVECTOR3 *dir, FLOAT radius, + FLOAT Rintensity, FLOAT Gintensity, FLOAT Bintensity, FLOAT *rout, FLOAT *gout, FLOAT *bout) +{ + FLOAT cap[6], clamped_angle, norm, scale, temp; + UINT i, index, j; + + TRACE("order %u, dir %p, radius %f, red %f, green %f, blue %f, rout %p, gout %p, bout %p\n", + order, dir, radius, Rintensity, Gintensity, Bintensity, rout, gout, bout); + + if (radius <= 0.0f) + return D3DXSHEvalDirectionalLight(order, dir, Rintensity, Gintensity, Bintensity, rout, gout, bout); + + clamped_angle = (radius > D3DX_PI / 2.0f) ? (D3DX_PI / 2.0f) : radius; + norm = sinf(clamped_angle) * sinf(clamped_angle); + + if (order > D3DXSH_MAXORDER) + { + WARN("Order clamped at D3DXSH_MAXORDER\n"); + order = D3DXSH_MAXORDER; + } + + weightedcapintegrale(cap, order, radius); + D3DXSHEvalDirection(rout, order, dir); + + for (i = 0; i < order; i++) + { + scale = cap[i] / norm; + + for (j = 0; j < 2 * i + 1; j++) + { + index = i * i + j; + temp = rout[index] * scale; + + rout[index] = temp * Rintensity; + if (gout) + gout[index] = temp * Gintensity; + if (bout) + bout[index] = temp * Bintensity; + } + } + + return D3D_OK; +} + +FLOAT* WINAPI D3DXSHEvalDirection(FLOAT *out, UINT order, const D3DXVECTOR3 *dir) +{ + const FLOAT dirxx = dir->x * dir->x; + const FLOAT dirxy = dir->x * dir->y; + const FLOAT dirxz = dir->x * dir->z; + const FLOAT diryy = dir->y * dir->y; + const FLOAT diryz = dir->y * dir->z; + const FLOAT dirzz = dir->z * dir->z; + const FLOAT dirxxxx = dirxx * dirxx; + const FLOAT diryyyy = diryy * diryy; + const FLOAT dirzzzz = dirzz * dirzz; + const FLOAT dirxyxy = dirxy * dirxy; + + TRACE("out %p, order %u, dir %p\n", out, order, dir); + + if ((order < D3DXSH_MINORDER) || (order > D3DXSH_MAXORDER)) + return out; + + out[0] = 0.5f / sqrtf(D3DX_PI); + out[1] = -0.5f / sqrtf(D3DX_PI / 3.0f) * dir->y; + out[2] = 0.5f / sqrtf(D3DX_PI / 3.0f) * dir->z; + out[3] = -0.5f / sqrtf(D3DX_PI / 3.0f) * dir->x; + if (order == 2) + return out; + + out[4] = 0.5f / sqrtf(D3DX_PI / 15.0f) * dirxy; + out[5] = -0.5f / sqrtf(D3DX_PI / 15.0f) * diryz; + out[6] = 0.25f / sqrtf(D3DX_PI / 5.0f) * (3.0f * dirzz - 1.0f); + out[7] = -0.5f / sqrtf(D3DX_PI / 15.0f) * dirxz; + out[8] = 0.25f / sqrtf(D3DX_PI / 15.0f) * (dirxx - diryy); + if (order == 3) + return out; + + out[9] = -sqrtf(70.0f / D3DX_PI) / 8.0f * dir->y * (3.0f * dirxx - diryy); + out[10] = sqrtf(105.0f / D3DX_PI) / 2.0f * dirxy * dir->z; + out[11] = -sqrtf(42.0 / D3DX_PI) / 8.0f * dir->y * (-1.0f + 5.0f * dirzz); + out[12] = sqrtf(7.0f / D3DX_PI) / 4.0f * dir->z * (5.0f * dirzz - 3.0f); + out[13] = sqrtf(42.0 / D3DX_PI) / 8.0f * dir->x * (1.0f - 5.0f * dirzz); + out[14] = sqrtf(105.0f / D3DX_PI) / 4.0f * dir->z * (dirxx - diryy); + out[15] = -sqrtf(70.0f / D3DX_PI) / 8.0f * dir->x * (dirxx - 3.0f * diryy); + if (order == 4) + return out; + + out[16] = 0.75f * sqrtf(35.0f / D3DX_PI) * dirxy * (dirxx - diryy); + out[17] = 3.0f * dir->z * out[9]; + out[18] = 0.75f * sqrtf(5.0f / D3DX_PI) * dirxy * (7.0f * dirzz - 1.0f); + out[19] = 0.375f * sqrtf(10.0f / D3DX_PI) * diryz * (3.0f - 7.0f * dirzz); + out[20] = 3.0f / (16.0f * sqrtf(D3DX_PI)) * (35.0f * dirzzzz - 30.f * dirzz + 3.0f); + out[21] = 0.375f * sqrtf(10.0f / D3DX_PI) * dirxz * (3.0f - 7.0f * dirzz); + out[22] = 0.375f * sqrtf(5.0f / D3DX_PI) * (dirxx - diryy) * (7.0f * dirzz - 1.0f); + out[23] = 3.0 * dir->z * out[15]; + out[24] = 3.0f / 16.0f * sqrtf(35.0f / D3DX_PI) * (dirxxxx - 6.0f * dirxyxy + diryyyy); + if (order == 5) + return out; + + out[25] = -3.0f/ 32.0f * sqrtf(154.0f / D3DX_PI) * dir->y * (5.0f * dirxxxx - 10.0f * dirxyxy + diryyyy); + out[26] = 0.75f * sqrtf(385.0f / D3DX_PI) * dirxy * dir->z * (dirxx - diryy); + out[27] = sqrtf(770.0f / D3DX_PI) / 32.0f * dir->y * (3.0f * dirxx - diryy) * (1.0f - 9.0f * dirzz); + out[28] = sqrtf(1155.0f / D3DX_PI) / 4.0f * dirxy * dir->z * (3.0f * dirzz - 1.0f); + out[29] = sqrtf(165.0f / D3DX_PI) / 16.0f * dir->y * (14.0f * dirzz - 21.0f * dirzzzz - 1.0f); + out[30] = sqrtf(11.0f / D3DX_PI) / 16.0f * dir->z * (63.0f * dirzzzz - 70.0f * dirzz + 15.0f); + out[31] = sqrtf(165.0f / D3DX_PI) / 16.0f * dir->x * (14.0f * dirzz - 21.0f * dirzzzz - 1.0f); + out[32] = sqrtf(1155.0f / D3DX_PI) / 8.0f * dir->z * (dirxx - diryy) * (3.0f * dirzz - 1.0f); + out[33] = sqrtf(770.0f / D3DX_PI) / 32.0f * dir->x * (dirxx - 3.0f * diryy) * (1.0f - 9.0f * dirzz); + out[34] = 3.0f / 16.0f * sqrtf(385.0f / D3DX_PI) * dir->z * (dirxxxx - 6.0 * dirxyxy + diryyyy); + out[35] = -3.0f/ 32.0f * sqrtf(154.0f / D3DX_PI) * dir->x * (dirxxxx - 10.0f * dirxyxy + 5.0f * diryyyy); + + return out; +} + +HRESULT WINAPI D3DXSHEvalDirectionalLight(UINT order, const D3DXVECTOR3 *dir, FLOAT Rintensity, FLOAT Gintensity, FLOAT Bintensity, FLOAT *Rout, FLOAT *Gout, FLOAT *Bout) +{ + FLOAT s, temp; + UINT j; + + TRACE("Order %u, Vector %p, Red %f, Green %f, Blue %f, Rout %p, Gout %p, Bout %p\n", order, dir, Rintensity, Gintensity, Bintensity, Rout, Gout, Bout); + + s = 0.75f; + if ( order > 2 ) + s += 5.0f / 16.0f; + if ( order > 4 ) + s -= 3.0f / 32.0f; + s /= D3DX_PI; + + D3DXSHEvalDirection(Rout, order, dir); + for (j = 0; j < order * order; j++) + { + temp = Rout[j] / s; + + Rout[j] = Rintensity * temp; + if ( Gout ) + Gout[j] = Gintensity * temp; + if ( Bout ) + Bout[j] = Bintensity * temp; + } + + return D3D_OK; +} + +HRESULT WINAPI D3DXSHEvalHemisphereLight(UINT order, const D3DXVECTOR3 *dir, D3DXCOLOR top, D3DXCOLOR bottom, + FLOAT *rout, FLOAT *gout, FLOAT *bout) +{ + FLOAT a[2], temp[4]; + UINT i, j; + + TRACE("order %u, dir %p, rout %p, gout %p, bout %p\n", order, dir, rout, gout, bout); + + D3DXSHEvalDirection(temp, 2, dir); + + a[0] = (top.r + bottom.r) * 3.0f * D3DX_PI; + a[1] = (top.r - bottom.r) * D3DX_PI; + for (i = 0; i < order; i++) + for (j = 0; j < 2 * i + 1; j++) + if (i < 2) + rout[i * i + j] = temp[i * i + j] * a[i]; + else + rout[i * i + j] = 0.0f; + + if (gout) + { + a[0] = (top.g + bottom.g) * 3.0f * D3DX_PI; + a[1] = (top.g - bottom.g) * D3DX_PI; + for (i = 0; i < order; i++) + for (j = 0; j < 2 * i + 1; j++) + if (i < 2) + gout[i * i + j] = temp[i * i + j] * a[i]; + else + gout[i * i + j] = 0.0f; + } + + if (bout) + { + a[0] = (top.b + bottom.b) * 3.0f * D3DX_PI; + a[1] = (top.b - bottom.b) * D3DX_PI; + for (i = 0; i < order; i++) + for (j = 0; j < 2 * i + 1; j++) + if (i < 2) + bout[i * i + j] = temp[i * i + j] * a[i]; + else + bout[i * i + j] = 0.0f; + } + + return D3D_OK; +} + +HRESULT WINAPI D3DXSHEvalSphericalLight(UINT order, const D3DXVECTOR3 *dir, FLOAT radius, + FLOAT Rintensity, FLOAT Gintensity, FLOAT Bintensity, FLOAT *rout, FLOAT *gout, FLOAT *bout) +{ + D3DXVECTOR3 normal; + FLOAT cap[6], clamped_angle, dist, temp; + UINT i, index, j; + + TRACE("order %u, dir %p, radius %f, red %f, green %f, blue %f, rout %p, gout %p, bout %p\n", + order, dir, radius, Rintensity, Gintensity, Bintensity, rout, gout, bout); + + if (order > D3DXSH_MAXORDER) + { + WARN("Order clamped at D3DXSH_MAXORDER\n"); + order = D3DXSH_MAXORDER; + } + + if (radius < 0.0f) + radius = -radius; + + dist = D3DXVec3Length(dir); + clamped_angle = (dist <= radius) ? D3DX_PI / 2.0f : asinf(radius / dist); + + weightedcapintegrale(cap, order, clamped_angle); + D3DXVec3Normalize(&normal, dir); + D3DXSHEvalDirection(rout, order, &normal); + + for (i = 0; i < order; i++) + for (j = 0; j < 2 * i + 1; j++) + { + index = i * i + j; + temp = rout[index] * cap[i]; + + rout[index] = temp * Rintensity; + if (gout) + gout[index] = temp * Gintensity; + if (bout) + bout[index] = temp * Bintensity; + } + + return D3D_OK; +} + +FLOAT * WINAPI D3DXSHMultiply2(FLOAT *out, const FLOAT *a, const FLOAT *b) +{ + FLOAT ta, tb; + + TRACE("out %p, a %p, b %p\n", out, a, b); + + ta = 0.28209479f * a[0]; + tb = 0.28209479f * b[0]; + + out[0] = 0.28209479f * D3DXSHDot(2, a, b); + out[1] = ta * b[1] + tb * a[1]; + out[2] = ta * b[2] + tb * a[2]; + out[3] = ta * b[3] + tb * a[3]; + + return out; +} + +FLOAT * WINAPI D3DXSHMultiply3(FLOAT *out, const FLOAT *a, const FLOAT *b) +{ + FLOAT t, ta, tb; + + TRACE("out %p, a %p, b %p\n", out, a, b); + + out[0] = 0.28209479f * a[0] * b[0]; + + ta = 0.28209479f * a[0] - 0.12615662f * a[6] - 0.21850968f * a[8]; + tb = 0.28209479f * b[0] - 0.12615662f * b[6] - 0.21850968f * b[8]; + out[1] = ta * b[1] + tb * a[1]; + t = a[1] * b[1]; + out[0] += 0.28209479f * t; + out[6] = -0.12615662f * t; + out[8] = -0.21850968f * t; + + ta = 0.21850968f * a[5]; + tb = 0.21850968f * b[5]; + out[1] += ta * b[2] + tb * a[2]; + out[2] = ta * b[1] + tb * a[1]; + t = a[1] * b[2] +a[2] * b[1]; + out[5] = 0.21850968f * t; + + ta = 0.21850968f * a[4]; + tb = 0.21850968f * b[4]; + out[1] += ta * b[3] + tb * a[3]; + out[3] = ta * b[1] + tb * a[1]; + t = a[1] * b[3] + a[3] * b[1]; + out[4] = 0.21850968f * t; + + ta = 0.28209480f * a[0] + 0.25231326f * a[6]; + tb = 0.28209480f * b[0] + 0.25231326f * b[6]; + out[2] += ta * b[2] + tb * a[2]; + t = a[2] * b[2]; + out[0] += 0.28209480f * t; + out[6] += 0.25231326f * t; + + ta = 0.21850969f * a[7]; + tb = 0.21850969f * b[7]; + out[2] += ta * b[3] + tb * a[3]; + out[3] += ta * b[2] + tb * a[2]; + t = a[2] * b[3] + a[3] * b[2]; + out[7] = 0.21850969f * t; + + ta = 0.28209479f * a[0] - 0.12615663f * a[6] + 0.21850969f * a[8]; + tb = 0.28209479f * b[0] - 0.12615663f * b[6] + 0.21850969f * b[8]; + out[3] += ta * b[3] + tb * a[3]; + t = a[3] * b[3]; + out[0] += 0.28209479f * t; + out[6] -= 0.12615663f * t; + out[8] += 0.21850969f * t; + + ta = 0.28209479f * a[0] - 0.18022375f * a[6]; + tb = 0.28209479f * b[0] - 0.18022375f * b[6]; + out[4] += ta * b[4] + tb * a[4]; + t = a[4] * b[4]; + out[0] += 0.28209479f * t; + out[6] -= 0.18022375f * t; + + ta = 0.15607835f * a[7]; + tb = 0.15607835f * b[7]; + out[4] += ta * b[5] + tb * a[5]; + out[5] += ta * b[4] + tb * a[4]; + t = a[4] * b[5] + a[5] * b[4]; + out[7] += 0.15607834f * t; + + ta = 0.28209479f * a[0] + 0.09011186 * a[6] - 0.15607835f * a[8]; + tb = 0.28209479f * b[0] + 0.09011186 * b[6] - 0.15607835f * b[8]; + out[5] += ta * b[5] + tb * a[5]; + t = a[5] * b[5]; + out[0] += 0.28209479f * t; + out[6] += 0.09011186f * t; + out[8] -= 0.15607835f * t; + + ta = 0.28209480f * a[0]; + tb = 0.28209480f * b[0]; + out[6] += ta * b[6] + tb * a[6]; + t = a[6] * b[6]; + out[0] += 0.28209480f * t; + out[6] += 0.18022376f * t; + + ta = 0.28209479f * a[0] + 0.09011186 * a[6] + 0.15607835f * a[8]; + tb = 0.28209479f * b[0] + 0.09011186 * b[6] + 0.15607835f * b[8]; + out[7] += ta * b[7] + tb * a[7]; + t = a[7] * b[7]; + out[0] += 0.28209479f * t; + out[6] += 0.09011186f * t; + out[8] += 0.15607835f * t; + + ta = 0.28209479f * a[0] - 0.18022375f * a[6]; + tb = 0.28209479f * b[0] - 0.18022375f * b[6]; + out[8] += ta * b[8] + tb * a[8]; + t = a[8] * b[8]; + out[0] += 0.28209479f * t; + out[6] -= 0.18022375f * t; + + return out; +} + +FLOAT * WINAPI D3DXSHMultiply4(FLOAT *out, const FLOAT *a, const FLOAT *b) +{ + FLOAT ta, tb, t; + + TRACE("out %p, a %p, b %p\n", out, a, b); + + out[0] = 0.28209479f * a[0] * b[0]; + + ta = 0.28209479f * a[0] - 0.12615663f * a[6] - 0.21850969f * a[8]; + tb = 0.28209479f * b[0] - 0.12615663f * b[6] - 0.21850969f * b[8]; + out[1] = ta * b[1] + tb * a[1]; + t = a[1] * b[1]; + out[0] += 0.28209479f * t; + out[6] = -0.12615663f * t; + out[8] = -0.21850969f * t; + + ta = 0.21850969f * a[3] - 0.05839917f * a[13] - 0.22617901f * a[15]; + tb = 0.21850969f * b[3] - 0.05839917f * b[13] - 0.22617901f * b[15]; + out[1] += ta * b[4] + tb * a[4]; + out[4] = ta * b[1] + tb * a[1]; + t = a[1] * b[4] + a[4] * b[1]; + out[3] = 0.21850969f * t; + out[13] = -0.05839917f * t; + out[15] = -0.22617901f * t; + + ta = 0.21850969f * a[2] - 0.14304817f * a[12] - 0.18467439f * a[14]; + tb = 0.21850969f * b[2] - 0.14304817f * b[12] - 0.18467439f * b[14]; + out[1] += ta * b[5] + tb * a[5]; + out[5] = ta * b[1] + tb * a[1]; + t = a[1] * b[5] + a[5] * b[1]; + out[2] = 0.21850969f * t; + out[12] = -0.14304817f * t; + out[14] = -0.18467439f * t; + + ta = 0.20230066f * a[11]; + tb = 0.20230066f * b[11]; + out[1] += ta * b[6] + tb * a[6]; + out[6] += ta * b[1] + tb * a[1]; + t = a[1] * b[6] + a[6] * b[1]; + out[11] = 0.20230066f * t; + + ta = 0.22617901f * a[9] + 0.05839917f * a[11]; + tb = 0.22617901f * b[9] + 0.05839917f * b[11]; + out[1] += ta * b[8] + tb * a[8]; + out[8] += ta * b[1] + tb * a[1]; + t = a[1] * b[8] + a[8] * b[1]; + out[9] = 0.22617901f * t; + out[11] += 0.05839917f * t; + + ta = 0.28209480f * a[0] + 0.25231326f * a[6]; + tb = 0.28209480f * b[0] + 0.25231326f * b[6]; + out[2] += ta * b[2] + tb * a[2]; + t = a[2] * b[2]; + out[0] += 0.28209480f * t; + out[6] += 0.25231326f * t; + + ta = 0.24776671f * a[12]; + tb = 0.24776671f * b[12]; + out[2] += ta * b[6] + tb * a[6]; + out[6] += ta * b[2] + tb * a[2]; + t = a[2] * b[6] + a[6] * b[2]; + out[12] += 0.24776671f * t; + + ta = 0.28209480f * a[0] - 0.12615663f * a[6] + 0.21850969f * a[8]; + tb = 0.28209480f * b[0] - 0.12615663f * b[6] + 0.21850969f * b[8]; + out[3] += ta * b[3] + tb * a[3]; + t = a[3] * b[3]; + out[0] += 0.28209480f * t; + out[6] -= 0.12615663f * t; + out[8] += 0.21850969f * t; + + ta = 0.20230066f * a[13]; + tb = 0.20230066f * b[13]; + out[3] += ta * b[6] + tb * a[6]; + out[6] += ta * b[3] + tb * a[3]; + t = a[3] * b[6] + a[6] * b[3]; + out[13] += 0.20230066f * t; + + ta = 0.21850969f * a[2] - 0.14304817f * a[12] + 0.18467439f * a[14]; + tb = 0.21850969f * b[2] - 0.14304817f * b[12] + 0.18467439f * b[14]; + out[3] += ta * b[7] + tb * a[7]; + out[7] = ta * b[3] + tb * a[3]; + t = a[3] * b[7] + a[7] * b[3]; + out[2] += 0.21850969f * t; + out[12] -= 0.14304817f * t; + out[14] += 0.18467439f * t; + + ta = -0.05839917f * a[13] + 0.22617901f * a[15]; + tb = -0.05839917f * b[13] + 0.22617901f * b[15]; + out[3] += ta * b[8] + tb * a[8]; + out[8] += ta * b[3] + tb * a[3]; + t = a[3] * b[8] + a[8] * b[3]; + out[13] -= 0.05839917f * t; + out[15] += 0.22617901f * t; + + ta = 0.28209479f * a[0] - 0.18022375f * a[6]; + tb = 0.28209479f * b[0] - 0.18022375f * b[6]; + out[4] += ta * b[4] + tb * a[4]; + t = a[4] * b[4]; + out[0] += 0.28209479f * t; + out[6] -= 0.18022375f * t; + + ta = 0.15607835f * a[7]; + tb = 0.15607835f * b[7]; + out[4] += ta * b[5] + tb * a[5]; + out[5] += ta * b[4] + tb * a[4]; + t = a[4] * b[5] + a[5] * b[4]; + out[7] += 0.15607835f * t; + + ta = 0.22617901f * a[3] - 0.09403160f * a[13]; + tb = 0.22617901f * b[3] - 0.09403160f * b[13]; + out[4] += ta * b[9] + tb * a[9]; + out[9] += ta * b[4] + tb * a[4]; + t = a[4] * b[9] + a[9] * b[4]; + out[3] += 0.22617901f * t; + out[13] -= 0.09403160f * t; + + ta = 0.18467439f * a[2] - 0.18806319f * a[12]; + tb = 0.18467439f * b[2] - 0.18806319f * b[12]; + out[4] += ta * b[10] + tb * a [10]; + out[10] = ta * b[4] + tb * a[4]; + t = a[4] * b[10] + a[10] * b[4]; + out[2] += 0.18467439f * t; + out[12] -= 0.18806319f * t; + + ta = -0.05839917f * a[3] + 0.14567312f * a[13] + 0.09403160f * a[15]; + tb = -0.05839917f * b[3] + 0.14567312f * b[13] + 0.09403160f * b[15]; + out[4] += ta * b[11] + tb * a[11]; + out[11] += ta * b[4] + tb * a[4]; + t = a[4] * b[11] + a[11] * b[4]; + out[3] -= 0.05839917f * t; + out[13] += 0.14567312f * t; + out[15] += 0.09403160f * t; + + ta = 0.28209479f * a[0] + 0.09011186f * a[6] - 0.15607835f * a[8]; + tb = 0.28209479f * b[0] + 0.09011186f * b[6] - 0.15607835f * b[8]; + out[5] += ta * b[5] + tb * a[5]; + t = a[5] * b[5]; + out[0] += 0.28209479f * t; + out[6] += 0.09011186f * t; + out[8] -= 0.15607835f * t; + + ta = 0.14867701f * a[14]; + tb = 0.14867701f * b[14]; + out[5] += ta * b[9] + tb * a[9]; + out[9] += ta * b[5] + tb * a[5]; + t = a[5] * b[9] + a[9] * b[5]; + out[14] += 0.14867701f * t; + + ta = 0.18467439f * a[3] + 0.11516472f * a[13] - 0.14867701f * a[15]; + tb = 0.18467439f * b[3] + 0.11516472f * b[13] - 0.14867701f * b[15]; + out[5] += ta * b[10] + tb * a[10]; + out[10] += ta * b[5] + tb * a[5]; + t = a[5] * b[10] + a[10] * b[5]; + out[3] += 0.18467439f * t; + out[13] += 0.11516472f * t; + out[15] -= 0.14867701f * t; + + ta = 0.23359668f * a[2] + 0.05947080f * a[12] - 0.11516472f * a[14]; + tb = 0.23359668f * b[2] + 0.05947080f * b[12] - 0.11516472f * b[14]; + out[5] += ta * b[11] + tb * a[11]; + out[11] += ta * b[5] + tb * a[5]; + t = a[5] * b[11] + a[11] * b[5]; + out[2] += 0.23359668f * t; + out[12] += 0.05947080f * t; + out[14] -= 0.11516472f * t; + + ta = 0.28209479f * a[0]; + tb = 0.28209479f * b[0]; + out[6] += ta * b[6] + tb * a[6]; + t = a[6] * b[6]; + out[0] += 0.28209479f * t; + out[6] += 0.18022376f * t; + + ta = 0.09011186f * a[6] + 0.28209479f * a[0] + 0.15607835f * a[8]; + tb = 0.09011186f * b[6] + 0.28209479f * b[0] + 0.15607835f * b[8]; + out[7] += ta * b[7] + tb * a[7]; + t = a[7] * b[7]; + out[6] += 0.09011186f * t; + out[0] += 0.28209479f * t; + out[8] += 0.15607835f * t; + + ta = 0.14867701f * a[9] + 0.18467439f * a[1] + 0.11516472f * a[11]; + tb = 0.14867701f * b[9] + 0.18467439f * b[1] + 0.11516472f * b[11]; + out[7] += ta * b[10] + tb * a[10]; + out[10] += ta * b[7] + tb * a[7]; + t = a[7] * b[10] + a[10] * b[7]; + out[9] += 0.14867701f * t; + out[1] += 0.18467439f * t; + out[11] += 0.11516472f * t; + + ta = 0.05947080f * a[12] + 0.23359668f * a[2] + 0.11516472f * a[14]; + tb = 0.05947080f * b[12] + 0.23359668f * b[2] + 0.11516472f * b[14]; + out[7] += ta * b[13] + tb * a[13]; + out[13] += ta * b[7]+ tb * a[7]; + t = a[7] * b[13] + a[13] * b[7]; + out[12] += 0.05947080f * t; + out[2] += 0.23359668f * t; + out[14] += 0.11516472f * t; + + ta = 0.14867701f * a[15]; + tb = 0.14867701f * b[15]; + out[7] += ta * b[14] + tb * a[14]; + out[14] += ta * b[7] + tb * a[7]; + t = a[7] * b[14] + a[14] * b[7]; + out[15] += 0.14867701f * t; + + ta = 0.28209479f * a[0] - 0.18022375f * a[6]; + tb = 0.28209479f * b[0] - 0.18022375f * b[6]; + out[8] += ta * b[8] + tb * a[8]; + t = a[8] * b[8]; + out[0] += 0.28209479f * t; + out[6] -= 0.18022375f * t; + + ta = -0.09403160f * a[11]; + tb = -0.09403160f * b[11]; + out[8] += ta * b[9] + tb * a[9]; + out[9] += ta * b[8] + tb * a[8]; + t = a[8] * b[9] + a[9] * b[8]; + out[11] -= 0.09403160f * t; + + ta = -0.09403160f * a[15]; + tb = -0.09403160f * b[15]; + out[8] += ta * b[13] + tb * a[13]; + out[13] += ta * b[8] + tb * a[8]; + t = a[8] * b[13] + a[13] * b[8]; + out[15] -= 0.09403160f * t; + + ta = 0.18467439f * a[2] - 0.18806319f * a[12]; + tb = 0.18467439f * b[2] - 0.18806319f * b[12]; + out[8] += ta * b[14] + tb * a[14]; + out[14] += ta * b[8] + tb * a[8]; + t = a[8] * b[14] + a[14] * b[8]; + out[2] += 0.18467439f * t; + out[12] -= 0.18806319f * t; + + ta = -0.21026104f * a[6] + 0.28209479f * a[0]; + tb = -0.21026104f * b[6] + 0.28209479f * b[0]; + out[9] += ta * b[9] + tb * a[9]; + t = a[9] * b[9]; + out[6] -= 0.21026104f * t; + out[0] += 0.28209479f * t; + + ta = 0.28209479f * a[0]; + tb = 0.28209479f * b[0]; + out[10] += ta * b[10] + tb * a[10]; + t = a[10] * b[10]; + out[0] += 0.28209479f * t; + + ta = 0.28209479f * a[0] + 0.12615663f * a[6] - 0.14567312f * a[8]; + tb = 0.28209479f * b[0] + 0.12615663f * b[6] - 0.14567312f * b[8]; + out[11] += ta * b[11] + tb * a[11]; + t = a[11] * b[11]; + out[0] += 0.28209479f * t; + out[6] += 0.12615663f * t; + out[8] -= 0.14567312f * t; + + ta = 0.28209479f * a[0] + 0.16820885f * a[6]; + tb = 0.28209479f * b[0] + 0.16820885f * b[6]; + out[12] += ta * b[12] + tb * a[12]; + t = a[12] * b[12]; + out[0] += 0.28209479f * t; + out[6] += 0.16820885f * t; + + ta =0.28209479f * a[0] + 0.14567312f * a[8] + 0.12615663f * a[6]; + tb =0.28209479f * b[0] + 0.14567312f * b[8] + 0.12615663f * b[6]; + out[13] += ta * b[13] + tb * a[13]; + t = a[13] * b[13]; + out[0] += 0.28209479f * t; + out[8] += 0.14567312f * t; + out[6] += 0.12615663f * t; + + ta = 0.28209479f * a[0]; + tb = 0.28209479f * b[0]; + out[14] += ta * b[14] + tb * a[14]; + t = a[14] * b[14]; + out[0] += 0.28209479f * t; + + ta = 0.28209479f * a[0] - 0.21026104f * a[6]; + tb = 0.28209479f * b[0] - 0.21026104f * b[6]; + out[15] += ta * b[15] + tb * a[15]; + t = a[15] * b[15]; + out[0] += 0.28209479f * t; + out[6] -= 0.21026104f * t; + + return out; +} + +static void rotate_X(FLOAT *out, UINT order, FLOAT a, FLOAT *in) +{ + out[0] = in[0]; + + out[1] = a * in[2]; + out[2] = -a * in[1]; + out[3] = in[3]; + + out[4] = a * in[7]; + out[5] = -in[5]; + out[6] = -0.5f * in[6] - 0.8660253882f * in[8]; + out[7] = -a * in[4]; + out[8] = -0.8660253882f * in[6] + 0.5f * in[8]; + out[9] = -a * 0.7905694842f * in[12] + a * 0.6123724580f * in[14]; + + out[10] = -in[10]; + out[11] = -a * 0.6123724580f * in[12] - a * 0.7905694842f * in[14]; + out[12] = a * 0.7905694842f * in[9] + a * 0.6123724580f * in[11]; + out[13] = -0.25f * in[13] - 0.9682458639f * in[15]; + out[14] = -a * 0.6123724580f * in[9] + a * 0.7905694842f * in[11]; + out[15] = -0.9682458639f * in[13] + 0.25f * in[15]; + if (order == 4) + return; + + out[16] = -a * 0.9354143739f * in[21] + a * 0.3535533845f * in[23]; + out[17] = -0.75f * in[17] + 0.6614378095f * in[19]; + out[18] = -a * 0.3535533845f * in[21] - a * 0.9354143739f * in[23]; + out[19] = 0.6614378095f * in[17] + 0.75f * in[19]; + out[20] = 0.375f * in[20] + 0.5590170026f * in[22] + 0.7395099998f * in[24]; + out[21] = a * 0.9354143739f * in[16] + a * 0.3535533845f * in[18]; + out[22] = 0.5590170026f * in[20] + 0.5f * in[22] - 0.6614378691f * in[24]; + out[23] = -a * 0.3535533845f * in[16] + a * 0.9354143739f * in[18]; + out[24] = 0.7395099998f * in[20] - 0.6614378691f * in[22] + 0.125f * in[24]; + if (order == 5) + return; + + out[25] = a * 0.7015607357f * in[30] - a * 0.6846531630f * in[32] + a * 0.1976423711f * in[34]; + out[26] = -0.5f * in[26] + 0.8660253882f * in[28]; + out[27] = a * 0.5229125023f * in[30] + a * 0.3061861992f * in[32] - a * 0.7954951525 * in[34]; + out[28] = 0.8660253882f * in[26] + 0.5f * in[28]; + out[29] = a * 0.4841229022f * in[30] + a * 0.6614378691f * in[32] + a * 0.5728219748f * in[34]; + out[30] = -a * 0.7015607357f * in[25] - a * 0.5229125023f * in[27] - a * 0.4841229022f * in[29]; + out[31] = 0.125f * in[31] + 0.4050463140f * in[33] + 0.9057110548f * in[35]; + out[32] = a * 0.6846531630f * in[25] - a * 0.3061861992f * in[27] - a * 0.6614378691f * in[29]; + out[33] = 0.4050463140f * in[31] + 0.8125f * in[33] - 0.4192627370f * in[35]; + out[34] = -a * 0.1976423711f * in[25] + a * 0.7954951525f * in[27] - a * 0.5728219748f * in[29]; + out[35] = 0.9057110548f * in[31] - 0.4192627370f * in[33] + 0.0624999329f * in[35]; +} + +FLOAT* WINAPI D3DXSHRotate(FLOAT *out, UINT order, const D3DXMATRIX *matrix, const FLOAT *in) +{ + FLOAT alpha, beta, gamma, sinb, temp[36], temp1[36]; + + TRACE("out %p, order %u, matrix %p, in %p\n", out, order, matrix, in); + + out[0] = in[0]; + + if ((order > D3DXSH_MAXORDER) || (order < D3DXSH_MINORDER)) + return out; + + if (order <= 3) + { + out[1] = matrix->u.m[1][1] * in[1] - matrix->u.m[2][1] * in[2] + matrix->u.m[0][1] * in[3]; + out[2] = -matrix->u.m[1][2] * in[1] + matrix->u.m[2][2] * in[2] - matrix->u.m[0][2] * in[3]; + out[3] = matrix->u.m[1][0] * in[1] - matrix->u.m[2][0] * in[2] + matrix->u.m[0][0] * in[3]; + + if (order == 3) + { + FLOAT coeff[]={ + matrix->u.m[1][0] * matrix->u.m[0][0], matrix->u.m[1][1] * matrix->u.m[0][1], + matrix->u.m[1][1] * matrix->u.m[2][1], matrix->u.m[1][0] * matrix->u.m[2][0], + matrix->u.m[2][0] * matrix->u.m[2][0], matrix->u.m[2][1] * matrix->u.m[2][1], + matrix->u.m[0][0] * matrix->u.m[2][0], matrix->u.m[0][1] * matrix->u.m[2][1], + matrix->u.m[0][1] * matrix->u.m[0][1], matrix->u.m[1][0] * matrix->u.m[1][0], + matrix->u.m[1][1] * matrix->u.m[1][1], matrix->u.m[0][0] * matrix->u.m[0][0], }; + + out[4] = (matrix->u.m[1][1] * matrix->u.m[0][0] + matrix->u.m[0][1] * matrix->u.m[1][0]) * in[4]; + out[4] -= (matrix->u.m[1][0] * matrix->u.m[2][1] + matrix->u.m[1][1] * matrix->u.m[2][0]) * in[5]; + out[4] += 1.7320508076f * matrix->u.m[2][0] * matrix->u.m[2][1] * in[6]; + out[4] -= (matrix->u.m[0][1] * matrix->u.m[2][0] + matrix->u.m[0][0] * matrix->u.m[2][1]) * in[7]; + out[4] += (matrix->u.m[0][0] * matrix->u.m[0][1] - matrix->u.m[1][0] * matrix->u.m[1][1]) * in[8]; + + out[5] = (matrix->u.m[1][1] * matrix->u.m[2][2] + matrix->u.m[1][2] * matrix->u.m[2][1]) * in[5]; + out[5] -= (matrix->u.m[1][1] * matrix->u.m[0][2] + matrix->u.m[1][2] * matrix->u.m[0][1]) * in[4]; + out[5] -= 1.7320508076f * matrix->u.m[2][2] * matrix->u.m[2][1] * in[6]; + out[5] += (matrix->u.m[0][2] * matrix->u.m[2][1] + matrix->u.m[0][1] * matrix->u.m[2][2]) * in[7]; + out[5] -= (matrix->u.m[0][1] * matrix->u.m[0][2] - matrix->u.m[1][1] * matrix->u.m[1][2]) * in[8]; + + out[6] = (matrix->u.m[2][2] * matrix->u.m[2][2] - 0.5f * (coeff[4] + coeff[5])) * in[6]; + out[6] -= (0.5773502692f * (coeff[0] + coeff[1]) - 1.1547005384f * matrix->u.m[1][2] * matrix->u.m[0][2]) * in[4]; + out[6] += (0.5773502692f * (coeff[2] + coeff[3]) - 1.1547005384f * matrix->u.m[1][2] * matrix->u.m[2][2]) * in[5]; + out[6] += (0.5773502692f * (coeff[6] + coeff[7]) - 1.1547005384f * matrix->u.m[0][2] * matrix->u.m[2][2]) * in[7]; + out[6] += (0.2886751347f * (coeff[9] - coeff[8] + coeff[10] - coeff[11]) - 0.5773502692f * + (matrix->u.m[1][2] * matrix->u.m[1][2] - matrix->u.m[0][2] * matrix->u.m[0][2])) * in[8]; + + out[7] = (matrix->u.m[0][0] * matrix->u.m[2][2] + matrix->u.m[0][2] * matrix->u.m[2][0]) * in[7]; + out[7] -= (matrix->u.m[1][0] * matrix->u.m[0][2] + matrix->u.m[1][2] * matrix->u.m[0][0]) * in[4]; + out[7] += (matrix->u.m[1][0] * matrix->u.m[2][2] + matrix->u.m[1][2] * matrix->u.m[2][0]) * in[5]; + out[7] -= 1.7320508076f * matrix->u.m[2][2] * matrix->u.m[2][0] * in[6]; + out[7] -= (matrix->u.m[0][0] * matrix->u.m[0][2] - matrix->u.m[1][0] * matrix->u.m[1][2]) * in[8]; + + out[8] = 0.5f * (coeff[11] - coeff[8] - coeff[9] + coeff[10]) * in[8]; + out[8] += (coeff[0] - coeff[1]) * in[4]; + out[8] += (coeff[2] - coeff[3]) * in[5]; + out[8] += 0.86602540f * (coeff[4] - coeff[5]) * in[6]; + out[8] += (coeff[7] - coeff[6]) * in[7]; + } + + return out; + } + + if (fabsf(matrix->u.m[2][2]) != 1.0f) + { + sinb = sqrtf(1.0f - matrix->u.m[2][2] * matrix->u.m[2][2]); + alpha = atan2f(matrix->u.m[2][1] / sinb, matrix->u.m[2][0] / sinb); + beta = atan2f(sinb, matrix->u.m[2][2]); + gamma = atan2f(matrix->u.m[1][2] / sinb, -matrix->u.m[0][2] / sinb); + } + else + { + alpha = atan2f(matrix->u.m[0][1], matrix->u.m[0][0]); + beta = 0.0f; + gamma = 0.0f; + } + + D3DXSHRotateZ(temp, order, gamma, in); + rotate_X(temp1, order, 1.0f, temp); + D3DXSHRotateZ(temp, order, beta, temp1); + rotate_X(temp1, order, -1.0f, temp); + D3DXSHRotateZ(out, order, alpha, temp1); + + return out; +} + +FLOAT * WINAPI D3DXSHRotateZ(FLOAT *out, UINT order, FLOAT angle, const FLOAT *in) +{ + UINT i, sum = 0; + FLOAT c[5], s[5]; + + TRACE("out %p, order %u, angle %f, in %p\n", out, order, angle, in); + + order = min(max(order, D3DXSH_MINORDER), D3DXSH_MAXORDER); + + out[0] = in[0]; + + for (i = 1; i < order; i++) + { + UINT j; + + c[i - 1] = cosf(i * angle); + s[i - 1] = sinf(i * angle); + sum += i * 2; + + out[sum - i] = c[i - 1] * in[sum - i]; + out[sum - i] += s[i - 1] * in[sum + i]; + for (j = i - 1; j > 0; j--) + { + out[sum - j] = 0.0f; + out[sum - j] = c[j - 1] * in[sum - j]; + out[sum - j] += s[j - 1] * in[sum + j]; + } + + if (in == out) + out[sum] = 0.0f; + else + out[sum] = in[sum]; + + for (j = 1; j < i; j++) + { + out[sum + j] = 0.0f; + out[sum + j] = -s[j - 1] * in[sum - j]; + out[sum + j] += c[j - 1] * in[sum + j]; + } + out[sum + i] = -s[i - 1] * in[sum - i]; + out[sum + i] += c[i - 1] * in[sum + i]; + } + + return out; +} + +FLOAT* WINAPI D3DXSHScale(FLOAT *out, UINT order, const FLOAT *a, const FLOAT scale) +{ + UINT i; + + TRACE("out %p, order %u, a %p, scale %f\n", out, order, a, scale); + + for (i = 0; i < order * order; i++) + out[i] = a[i] * scale; + + return out; +} diff --git a/dll/directx/wine/d3dx9_36/mesh.c b/dll/directx/wine/d3dx9_36/mesh.c index b945f820fce..779d2e5819e 100644 --- a/dll/directx/wine/d3dx9_36/mesh.c +++ b/dll/directx/wine/d3dx9_36/mesh.c @@ -1,7 +1,13 @@ /* * Mesh operations specific to D3DX9. * + * Copyright (C) 2005 Henri Verbeet + * Copyright (C) 2006 Ivan Gyurdiev * Copyright (C) 2009 David Adam + * Copyright (C) 2010 Tony Wasserka + * Copyright (C) 2011 Dylan Smith + * Copyright (C) 2011 Michael Mc Donnell + * Copyright (C) 2013 Christian Costa * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -23,24 +29,1878 @@ #define COM_NO_WINDOWS_H #include -//#include "wine/port.h" +#include +#define COBJMACROS #define NONAMELESSUNION #include +#include +#ifdef HAVE_FLOAT_H +# include +#endif #include #include #include #include -#include +#undef MAKE_DDHRESULT +#include "dxfile.h" +#include "rmxfguid.h" +#include "rmxftmpl.h" +#include "wine/debug.h" +#include "wine/unicode.h" +#include "wine/list.h" +#include "d3dx9_36_private.h" + +#define fmax(a, b) ((a) > (b) ? (a) : (b)) WINE_DEFAULT_DEBUG_CHANNEL(d3dx); +typedef struct ID3DXMeshImpl +{ + ID3DXMesh ID3DXMesh_iface; + LONG ref; + + DWORD numfaces; + DWORD numvertices; + DWORD options; + DWORD fvf; + IDirect3DDevice9 *device; + D3DVERTEXELEMENT9 cached_declaration[MAX_FVF_DECL_SIZE]; + IDirect3DVertexDeclaration9 *vertex_declaration; + UINT vertex_declaration_size; + UINT num_elem; + IDirect3DVertexBuffer9 *vertex_buffer; + IDirect3DIndexBuffer9 *index_buffer; + DWORD *attrib_buffer; + int attrib_buffer_lock_count; + DWORD attrib_table_size; + D3DXATTRIBUTERANGE *attrib_table; +} ID3DXMeshImpl; + +const UINT d3dx_decltype_size[] = +{ + /* D3DDECLTYPE_FLOAT1 */ sizeof(FLOAT), + /* D3DDECLTYPE_FLOAT2 */ sizeof(D3DXVECTOR2), + /* D3DDECLTYPE_FLOAT3 */ sizeof(D3DXVECTOR3), + /* D3DDECLTYPE_FLOAT4 */ sizeof(D3DXVECTOR4), + /* D3DDECLTYPE_D3DCOLOR */ sizeof(D3DCOLOR), + /* D3DDECLTYPE_UBYTE4 */ 4 * sizeof(BYTE), + /* D3DDECLTYPE_SHORT2 */ 2 * sizeof(SHORT), + /* D3DDECLTYPE_SHORT4 */ 4 * sizeof(SHORT), + /* D3DDECLTYPE_UBYTE4N */ 4 * sizeof(BYTE), + /* D3DDECLTYPE_SHORT2N */ 2 * sizeof(SHORT), + /* D3DDECLTYPE_SHORT4N */ 4 * sizeof(SHORT), + /* D3DDECLTYPE_USHORT2N */ 2 * sizeof(USHORT), + /* D3DDECLTYPE_USHORT4N */ 4 * sizeof(USHORT), + /* D3DDECLTYPE_UDEC3 */ 4, /* 3 * 10 bits + 2 padding */ + /* D3DDECLTYPE_DEC3N */ 4, + /* D3DDECLTYPE_FLOAT16_2 */ 2 * sizeof(D3DXFLOAT16), + /* D3DDECLTYPE_FLOAT16_4 */ 4 * sizeof(D3DXFLOAT16), +}; + +static inline ID3DXMeshImpl *impl_from_ID3DXMesh(ID3DXMesh *iface) +{ + return CONTAINING_RECORD(iface, ID3DXMeshImpl, ID3DXMesh_iface); +} + +static HRESULT WINAPI ID3DXMeshImpl_QueryInterface(ID3DXMesh *iface, REFIID riid, LPVOID *object) +{ + TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), object); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_ID3DXBaseMesh) || + IsEqualGUID(riid, &IID_ID3DXMesh)) + { + iface->lpVtbl->AddRef(iface); + *object = iface; + return S_OK; + } + + WARN("Interface %s not found.\n", debugstr_guid(riid)); + + return E_NOINTERFACE; +} + +static ULONG WINAPI ID3DXMeshImpl_AddRef(ID3DXMesh *iface) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + + TRACE("(%p)->(): AddRef from %d\n", This, This->ref); + + return InterlockedIncrement(&This->ref); +} + +static ULONG WINAPI ID3DXMeshImpl_Release(ID3DXMesh *iface) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(): Release from %d\n", This, ref + 1); + + if (!ref) + { + IDirect3DIndexBuffer9_Release(This->index_buffer); + IDirect3DVertexBuffer9_Release(This->vertex_buffer); + if (This->vertex_declaration) + IDirect3DVertexDeclaration9_Release(This->vertex_declaration); + IDirect3DDevice9_Release(This->device); + HeapFree(GetProcessHeap(), 0, This->attrib_buffer); + HeapFree(GetProcessHeap(), 0, This->attrib_table); + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + +/*** ID3DXBaseMesh ***/ +static HRESULT WINAPI ID3DXMeshImpl_DrawSubset(ID3DXMesh *iface, DWORD attrib_id) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + HRESULT hr; + DWORD face_start; + DWORD face_end = 0; + DWORD vertex_size; + + TRACE("(%p)->(%u)\n", This, attrib_id); + + if (!This->vertex_declaration) + { + WARN("Can't draw a mesh with an invalid vertex declaration.\n"); + return E_FAIL; + } + + vertex_size = iface->lpVtbl->GetNumBytesPerVertex(iface); + + hr = IDirect3DDevice9_SetVertexDeclaration(This->device, This->vertex_declaration); + if (FAILED(hr)) return hr; + hr = IDirect3DDevice9_SetStreamSource(This->device, 0, This->vertex_buffer, 0, vertex_size); + if (FAILED(hr)) return hr; + hr = IDirect3DDevice9_SetIndices(This->device, This->index_buffer); + if (FAILED(hr)) return hr; + + while (face_end < This->numfaces) + { + for (face_start = face_end; face_start < This->numfaces; face_start++) + { + if (This->attrib_buffer[face_start] == attrib_id) + break; + } + if (face_start >= This->numfaces) + break; + for (face_end = face_start + 1; face_end < This->numfaces; face_end++) + { + if (This->attrib_buffer[face_end] != attrib_id) + break; + } + + hr = IDirect3DDevice9_DrawIndexedPrimitive(This->device, D3DPT_TRIANGLELIST, + 0, 0, This->numvertices, face_start * 3, face_end - face_start); + if (FAILED(hr)) return hr; + } + + return D3D_OK; +} + +static DWORD WINAPI ID3DXMeshImpl_GetNumFaces(ID3DXMesh *iface) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + + TRACE("(%p)\n", This); + + return This->numfaces; +} + +static DWORD WINAPI ID3DXMeshImpl_GetNumVertices(ID3DXMesh *iface) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + + TRACE("(%p)\n", This); + + return This->numvertices; +} + +static DWORD WINAPI ID3DXMeshImpl_GetFVF(ID3DXMesh *iface) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + + TRACE("(%p)\n", This); + + return This->fvf; +} + +static void copy_declaration(D3DVERTEXELEMENT9 *dst, const D3DVERTEXELEMENT9 *src, UINT num_elem) +{ + memcpy(dst, src, num_elem * sizeof(*src)); +} + +static HRESULT WINAPI ID3DXMeshImpl_GetDeclaration(ID3DXMesh *iface, D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + + TRACE("(%p)\n", This); + + if (declaration == NULL) return D3DERR_INVALIDCALL; + + copy_declaration(declaration, This->cached_declaration, This->num_elem); + + return D3D_OK; +} + +static DWORD WINAPI ID3DXMeshImpl_GetNumBytesPerVertex(ID3DXMesh *iface) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + + TRACE("iface (%p)\n", This); + + return This->vertex_declaration_size; +} + +static DWORD WINAPI ID3DXMeshImpl_GetOptions(ID3DXMesh *iface) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + + TRACE("(%p)\n", This); + + return This->options; +} + +static HRESULT WINAPI ID3DXMeshImpl_GetDevice(struct ID3DXMesh *iface, struct IDirect3DDevice9 **device) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + + TRACE("(%p)->(%p)\n", This, device); + + if (device == NULL) return D3DERR_INVALIDCALL; + *device = This->device; + IDirect3DDevice9_AddRef(This->device); + + return D3D_OK; +} + +static HRESULT WINAPI ID3DXMeshImpl_CloneMeshFVF(struct ID3DXMesh *iface, DWORD options, DWORD fvf, + struct IDirect3DDevice9 *device, struct ID3DXMesh **clone_mesh) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + HRESULT hr; + D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]; + + TRACE("(%p)->(%x,%x,%p,%p)\n", This, options, fvf, device, clone_mesh); + + hr = D3DXDeclaratorFromFVF(fvf, declaration); + if (FAILED(hr)) return hr; + + return iface->lpVtbl->CloneMesh(iface, options, declaration, device, clone_mesh); +} + +static FLOAT scale_clamp_ubyten(FLOAT value) +{ + value = value * UCHAR_MAX; + + if (value < 0.0f) + { + return 0.0f; + } + else + { + if (value > UCHAR_MAX) /* Clamp at 255 */ + return UCHAR_MAX; + else + return value; + } +} + +static FLOAT scale_clamp_shortn(FLOAT value) +{ + value = value * SHRT_MAX; + + /* The tests show that the range is SHRT_MIN + 1 to SHRT_MAX. */ + if (value <= SHRT_MIN) + { + return SHRT_MIN + 1; + } + else if (value > SHRT_MAX) + { + return SHRT_MAX; + } + else + { + return value; + } +} + +static FLOAT scale_clamp_ushortn(FLOAT value) +{ + value = value * USHRT_MAX; + + if (value < 0.0f) + { + return 0.0f; + } + else + { + if (value > USHRT_MAX) /* Clamp at 65535 */ + return USHRT_MAX; + else + return value; + } +} + +static INT simple_round(FLOAT value) +{ + int res = (INT)(value + 0.5f); + + return res; +} + +static void convert_float4(BYTE *dst, CONST D3DXVECTOR4 *src, D3DDECLTYPE type_dst) +{ + BOOL fixme_once = FALSE; + + switch (type_dst) + { + case D3DDECLTYPE_FLOAT1: + { + FLOAT *dst_ptr = (FLOAT*)dst; + *dst_ptr = src->x; + break; + } + case D3DDECLTYPE_FLOAT2: + { + D3DXVECTOR2 *dst_ptr = (D3DXVECTOR2*)dst; + dst_ptr->x = src->x; + dst_ptr->y = src->y; + break; + } + case D3DDECLTYPE_FLOAT3: + { + D3DXVECTOR3 *dst_ptr = (D3DXVECTOR3*)dst; + dst_ptr->x = src->x; + dst_ptr->y = src->y; + dst_ptr->z = src->z; + break; + } + case D3DDECLTYPE_FLOAT4: + { + D3DXVECTOR4 *dst_ptr = (D3DXVECTOR4*)dst; + dst_ptr->x = src->x; + dst_ptr->y = src->y; + dst_ptr->z = src->z; + dst_ptr->w = src->w; + break; + } + case D3DDECLTYPE_D3DCOLOR: + { + dst[0] = (BYTE)simple_round(scale_clamp_ubyten(src->z)); + dst[1] = (BYTE)simple_round(scale_clamp_ubyten(src->y)); + dst[2] = (BYTE)simple_round(scale_clamp_ubyten(src->x)); + dst[3] = (BYTE)simple_round(scale_clamp_ubyten(src->w)); + break; + } + case D3DDECLTYPE_UBYTE4: + { + dst[0] = src->x < 0.0f ? 0 : (BYTE)simple_round(src->x); + dst[1] = src->y < 0.0f ? 0 : (BYTE)simple_round(src->y); + dst[2] = src->z < 0.0f ? 0 : (BYTE)simple_round(src->z); + dst[3] = src->w < 0.0f ? 0 : (BYTE)simple_round(src->w); + break; + } + case D3DDECLTYPE_SHORT2: + { + SHORT *dst_ptr = (SHORT*)dst; + dst_ptr[0] = (SHORT)simple_round(src->x); + dst_ptr[1] = (SHORT)simple_round(src->y); + break; + } + case D3DDECLTYPE_SHORT4: + { + SHORT *dst_ptr = (SHORT*)dst; + dst_ptr[0] = (SHORT)simple_round(src->x); + dst_ptr[1] = (SHORT)simple_round(src->y); + dst_ptr[2] = (SHORT)simple_round(src->z); + dst_ptr[3] = (SHORT)simple_round(src->w); + break; + } + case D3DDECLTYPE_UBYTE4N: + { + dst[0] = (BYTE)simple_round(scale_clamp_ubyten(src->x)); + dst[1] = (BYTE)simple_round(scale_clamp_ubyten(src->y)); + dst[2] = (BYTE)simple_round(scale_clamp_ubyten(src->z)); + dst[3] = (BYTE)simple_round(scale_clamp_ubyten(src->w)); + break; + } + case D3DDECLTYPE_SHORT2N: + { + SHORT *dst_ptr = (SHORT*)dst; + dst_ptr[0] = (SHORT)simple_round(scale_clamp_shortn(src->x)); + dst_ptr[1] = (SHORT)simple_round(scale_clamp_shortn(src->y)); + break; + } + case D3DDECLTYPE_SHORT4N: + { + SHORT *dst_ptr = (SHORT*)dst; + dst_ptr[0] = (SHORT)simple_round(scale_clamp_shortn(src->x)); + dst_ptr[1] = (SHORT)simple_round(scale_clamp_shortn(src->y)); + dst_ptr[2] = (SHORT)simple_round(scale_clamp_shortn(src->z)); + dst_ptr[3] = (SHORT)simple_round(scale_clamp_shortn(src->w)); + break; + } + case D3DDECLTYPE_USHORT2N: + { + USHORT *dst_ptr = (USHORT*)dst; + dst_ptr[0] = (USHORT)simple_round(scale_clamp_ushortn(src->x)); + dst_ptr[1] = (USHORT)simple_round(scale_clamp_ushortn(src->y)); + break; + } + case D3DDECLTYPE_USHORT4N: + { + USHORT *dst_ptr = (USHORT*)dst; + dst_ptr[0] = (USHORT)simple_round(scale_clamp_ushortn(src->x)); + dst_ptr[1] = (USHORT)simple_round(scale_clamp_ushortn(src->y)); + dst_ptr[2] = (USHORT)simple_round(scale_clamp_ushortn(src->z)); + dst_ptr[3] = (USHORT)simple_round(scale_clamp_ushortn(src->w)); + break; + } + case D3DDECLTYPE_FLOAT16_2: + { + D3DXFloat32To16Array((D3DXFLOAT16*)dst, (FLOAT*)src, 2); + break; + } + case D3DDECLTYPE_FLOAT16_4: + { + D3DXFloat32To16Array((D3DXFLOAT16*)dst, (FLOAT*)src, 4); + break; + } + default: + if (!fixme_once++) + FIXME("Conversion from D3DDECLTYPE_FLOAT4 to %d not implemented.\n", type_dst); + break; + } +} + +static void convert_component(BYTE *dst, BYTE *src, D3DDECLTYPE type_dst, D3DDECLTYPE type_src) +{ + BOOL fixme_once = FALSE; + + switch (type_src) + { + case D3DDECLTYPE_FLOAT1: + { + FLOAT *src_ptr = (FLOAT*)src; + D3DXVECTOR4 src_float4 = {*src_ptr, 0.0f, 0.0f, 1.0f}; + convert_float4(dst, &src_float4, type_dst); + break; + } + case D3DDECLTYPE_FLOAT2: + { + D3DXVECTOR2 *src_ptr = (D3DXVECTOR2*)src; + D3DXVECTOR4 src_float4 = {src_ptr->x, src_ptr->y, 0.0f, 1.0f}; + convert_float4(dst, &src_float4, type_dst); + break; + } + case D3DDECLTYPE_FLOAT3: + { + D3DXVECTOR3 *src_ptr = (D3DXVECTOR3*)src; + D3DXVECTOR4 src_float4 = {src_ptr->x, src_ptr->y, src_ptr->z, 1.0f}; + convert_float4(dst, &src_float4, type_dst); + break; + } + case D3DDECLTYPE_FLOAT4: + { + D3DXVECTOR4 *src_ptr = (D3DXVECTOR4*)src; + D3DXVECTOR4 src_float4 = {src_ptr->x, src_ptr->y, src_ptr->z, src_ptr->w}; + convert_float4(dst, &src_float4, type_dst); + break; + } + case D3DDECLTYPE_D3DCOLOR: + { + D3DXVECTOR4 src_float4 = + { + (FLOAT)src[2]/UCHAR_MAX, + (FLOAT)src[1]/UCHAR_MAX, + (FLOAT)src[0]/UCHAR_MAX, + (FLOAT)src[3]/UCHAR_MAX + }; + convert_float4(dst, &src_float4, type_dst); + break; + } + case D3DDECLTYPE_UBYTE4: + { + D3DXVECTOR4 src_float4 = {src[0], src[1], src[2], src[3]}; + convert_float4(dst, &src_float4, type_dst); + break; + } + case D3DDECLTYPE_SHORT2: + { + SHORT *src_ptr = (SHORT*)src; + D3DXVECTOR4 src_float4 = {src_ptr[0], src_ptr[1], 0.0f, 1.0f}; + convert_float4(dst, &src_float4, type_dst); + break; + } + case D3DDECLTYPE_SHORT4: + { + SHORT *src_ptr = (SHORT*)src; + D3DXVECTOR4 src_float4 = {src_ptr[0], src_ptr[1], src_ptr[2], src_ptr[3]}; + convert_float4(dst, &src_float4, type_dst); + break; + } + case D3DDECLTYPE_UBYTE4N: + { + D3DXVECTOR4 src_float4 = + { + (FLOAT)src[0]/UCHAR_MAX, + (FLOAT)src[1]/UCHAR_MAX, + (FLOAT)src[2]/UCHAR_MAX, + (FLOAT)src[3]/UCHAR_MAX + }; + convert_float4(dst, &src_float4, type_dst); + break; + } + case D3DDECLTYPE_SHORT2N: + { + SHORT *src_ptr = (SHORT*)src; + D3DXVECTOR4 src_float4 = {(FLOAT)src_ptr[0]/SHRT_MAX, (FLOAT)src_ptr[1]/SHRT_MAX, 0.0f, 1.0f}; + convert_float4(dst, &src_float4, type_dst); + break; + } + case D3DDECLTYPE_SHORT4N: + { + SHORT *src_ptr = (SHORT*)src; + D3DXVECTOR4 src_float4 = + { + (FLOAT)src_ptr[0]/SHRT_MAX, + (FLOAT)src_ptr[1]/SHRT_MAX, + (FLOAT)src_ptr[2]/SHRT_MAX, + (FLOAT)src_ptr[3]/SHRT_MAX + }; + convert_float4(dst, &src_float4, type_dst); + break; + } + case D3DDECLTYPE_FLOAT16_2: + { + D3DXVECTOR4 src_float4 = {0.0f, 0.0f, 0.0f, 1.0f}; + D3DXFloat16To32Array((FLOAT*)&src_float4, (D3DXFLOAT16*)src, 2); + convert_float4(dst, &src_float4, type_dst); + break; + } + case D3DDECLTYPE_FLOAT16_4: + { + D3DXVECTOR4 src_float4; + D3DXFloat16To32Array((FLOAT*)&src_float4, (D3DXFLOAT16*)src, 4); + convert_float4(dst, &src_float4, type_dst); + break; + } + default: + if (!fixme_once++) + FIXME("Conversion of D3DDECLTYPE %d to %d not implemented.\n", type_src, type_dst); + break; + } +} + +static INT get_equivalent_declaration_index(D3DVERTEXELEMENT9 orig_declaration, D3DVERTEXELEMENT9 *declaration) +{ + INT i; + + for (i = 0; declaration[i].Stream != 0xff; i++) + { + if (orig_declaration.Usage == declaration[i].Usage + && orig_declaration.UsageIndex == declaration[i].UsageIndex) + { + return i; + } + } + + return -1; +} + +static HRESULT convert_vertex_buffer(ID3DXMesh *mesh_dst, ID3DXMesh *mesh_src) +{ + HRESULT hr; + D3DVERTEXELEMENT9 orig_declaration[MAX_FVF_DECL_SIZE] = {D3DDECL_END()}; + D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE] = {D3DDECL_END()}; + BYTE *vb_dst = NULL; + BYTE *vb_src = NULL; + UINT i; + UINT num_vertices = mesh_src->lpVtbl->GetNumVertices(mesh_src); + UINT dst_vertex_size = mesh_dst->lpVtbl->GetNumBytesPerVertex(mesh_dst); + UINT src_vertex_size = mesh_src->lpVtbl->GetNumBytesPerVertex(mesh_src); + + hr = mesh_src->lpVtbl->GetDeclaration(mesh_src, orig_declaration); + if (FAILED(hr)) return hr; + hr = mesh_dst->lpVtbl->GetDeclaration(mesh_dst, declaration); + if (FAILED(hr)) return hr; + + hr = mesh_src->lpVtbl->LockVertexBuffer(mesh_src, D3DLOCK_READONLY, (void**)&vb_src); + if (FAILED(hr)) goto cleanup; + hr = mesh_dst->lpVtbl->LockVertexBuffer(mesh_dst, 0, (void**)&vb_dst); + if (FAILED(hr)) goto cleanup; + + /* Clear all new fields by clearing the entire vertex buffer. */ + memset(vb_dst, 0, num_vertices * dst_vertex_size); + + for (i = 0; orig_declaration[i].Stream != 0xff; i++) + { + INT eq_idx = get_equivalent_declaration_index(orig_declaration[i], declaration); + + if (eq_idx >= 0) + { + UINT j; + for (j = 0; j < num_vertices; j++) + { + UINT idx_dst = dst_vertex_size * j + declaration[eq_idx].Offset; + UINT idx_src = src_vertex_size * j + orig_declaration[i].Offset; + UINT type_size = d3dx_decltype_size[orig_declaration[i].Type]; + + if (orig_declaration[i].Type == declaration[eq_idx].Type) + memcpy(&vb_dst[idx_dst], &vb_src[idx_src], type_size); + else + convert_component(&vb_dst[idx_dst], &vb_src[idx_src], declaration[eq_idx].Type, orig_declaration[i].Type); + } + } + } + + hr = D3D_OK; +cleanup: + if (vb_dst) mesh_dst->lpVtbl->UnlockVertexBuffer(mesh_dst); + if (vb_src) mesh_src->lpVtbl->UnlockVertexBuffer(mesh_src); + + return hr; +} + +static BOOL declaration_equals(CONST D3DVERTEXELEMENT9 *declaration1, CONST D3DVERTEXELEMENT9 *declaration2) +{ + UINT size1 = 0, size2 = 0; + + /* Find the size of each declaration */ + while (declaration1[size1].Stream != 0xff) size1++; + while (declaration2[size2].Stream != 0xff) size2++; + + /* If not same size then they are definitely not equal */ + if (size1 != size2) + return FALSE; + + /* Check that all components are the same */ + if (memcmp(declaration1, declaration2, size1*sizeof(*declaration1)) == 0) + return TRUE; + + return FALSE; +} + +static HRESULT WINAPI ID3DXMeshImpl_CloneMesh(struct ID3DXMesh *iface, DWORD options, + const D3DVERTEXELEMENT9 *declaration, struct IDirect3DDevice9 *device, struct ID3DXMesh **clone_mesh_out) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + ID3DXMeshImpl *cloned_this; + ID3DXMesh *clone_mesh; + D3DVERTEXELEMENT9 orig_declaration[MAX_FVF_DECL_SIZE] = { D3DDECL_END() }; + void *data_in, *data_out; + DWORD vertex_size; + HRESULT hr; + BOOL same_declaration; + + TRACE("(%p)->(%x,%p,%p,%p)\n", This, options, declaration, device, clone_mesh_out); + + if (!clone_mesh_out) + return D3DERR_INVALIDCALL; + + hr = iface->lpVtbl->GetDeclaration(iface, orig_declaration); + if (FAILED(hr)) return hr; + + hr = D3DXCreateMesh(This->numfaces, This->numvertices, options & ~D3DXMESH_VB_SHARE, + declaration, device, &clone_mesh); + if (FAILED(hr)) return hr; + + cloned_this = impl_from_ID3DXMesh(clone_mesh); + vertex_size = clone_mesh->lpVtbl->GetNumBytesPerVertex(clone_mesh); + same_declaration = declaration_equals(declaration, orig_declaration); + + if (options & D3DXMESH_VB_SHARE) { + if (!same_declaration) { + hr = D3DERR_INVALIDCALL; + goto error; + } + IDirect3DVertexBuffer9_AddRef(This->vertex_buffer); + /* FIXME: refactor to avoid creating a new vertex buffer */ + IDirect3DVertexBuffer9_Release(cloned_this->vertex_buffer); + cloned_this->vertex_buffer = This->vertex_buffer; + } else if (same_declaration) { + hr = iface->lpVtbl->LockVertexBuffer(iface, D3DLOCK_READONLY, &data_in); + if (FAILED(hr)) goto error; + hr = clone_mesh->lpVtbl->LockVertexBuffer(clone_mesh, 0, &data_out); + if (FAILED(hr)) { + iface->lpVtbl->UnlockVertexBuffer(iface); + goto error; + } + memcpy(data_out, data_in, This->numvertices * vertex_size); + clone_mesh->lpVtbl->UnlockVertexBuffer(clone_mesh); + iface->lpVtbl->UnlockVertexBuffer(iface); + } else { + hr = convert_vertex_buffer(clone_mesh, iface); + if (FAILED(hr)) goto error; + } + + hr = iface->lpVtbl->LockIndexBuffer(iface, D3DLOCK_READONLY, &data_in); + if (FAILED(hr)) goto error; + hr = clone_mesh->lpVtbl->LockIndexBuffer(clone_mesh, 0, &data_out); + if (FAILED(hr)) { + iface->lpVtbl->UnlockIndexBuffer(iface); + goto error; + } + if ((options ^ This->options) & D3DXMESH_32BIT) { + DWORD i; + if (options & D3DXMESH_32BIT) { + for (i = 0; i < This->numfaces * 3; i++) + ((DWORD*)data_out)[i] = ((WORD*)data_in)[i]; + } else { + for (i = 0; i < This->numfaces * 3; i++) + ((WORD*)data_out)[i] = ((DWORD*)data_in)[i]; + } + } else { + memcpy(data_out, data_in, This->numfaces * 3 * (options & D3DXMESH_32BIT ? 4 : 2)); + } + clone_mesh->lpVtbl->UnlockIndexBuffer(clone_mesh); + iface->lpVtbl->UnlockIndexBuffer(iface); + + memcpy(cloned_this->attrib_buffer, This->attrib_buffer, This->numfaces * sizeof(*This->attrib_buffer)); + + if (This->attrib_table_size) + { + cloned_this->attrib_table_size = This->attrib_table_size; + cloned_this->attrib_table = HeapAlloc(GetProcessHeap(), 0, This->attrib_table_size * sizeof(*This->attrib_table)); + if (!cloned_this->attrib_table) { + hr = E_OUTOFMEMORY; + goto error; + } + memcpy(cloned_this->attrib_table, This->attrib_table, This->attrib_table_size * sizeof(*This->attrib_table)); + } + + *clone_mesh_out = clone_mesh; + + return D3D_OK; +error: + IUnknown_Release(clone_mesh); + return hr; +} + +static HRESULT WINAPI ID3DXMeshImpl_GetVertexBuffer(struct ID3DXMesh *iface, + struct IDirect3DVertexBuffer9 **vertex_buffer) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + + TRACE("(%p)->(%p)\n", This, vertex_buffer); + + if (vertex_buffer == NULL) return D3DERR_INVALIDCALL; + *vertex_buffer = This->vertex_buffer; + IDirect3DVertexBuffer9_AddRef(This->vertex_buffer); + + return D3D_OK; +} + +static HRESULT WINAPI ID3DXMeshImpl_GetIndexBuffer(struct ID3DXMesh *iface, + struct IDirect3DIndexBuffer9 **index_buffer) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + + TRACE("(%p)->(%p)\n", This, index_buffer); + + if (index_buffer == NULL) return D3DERR_INVALIDCALL; + *index_buffer = This->index_buffer; + IDirect3DIndexBuffer9_AddRef(This->index_buffer); + + return D3D_OK; +} + +static HRESULT WINAPI ID3DXMeshImpl_LockVertexBuffer(ID3DXMesh *iface, DWORD flags, LPVOID *data) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + + TRACE("(%p)->(%u,%p)\n", This, flags, data); + + return IDirect3DVertexBuffer9_Lock(This->vertex_buffer, 0, 0, data, flags); +} + +static HRESULT WINAPI ID3DXMeshImpl_UnlockVertexBuffer(ID3DXMesh *iface) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + + TRACE("(%p)\n", This); + + return IDirect3DVertexBuffer9_Unlock(This->vertex_buffer); +} + +static HRESULT WINAPI ID3DXMeshImpl_LockIndexBuffer(ID3DXMesh *iface, DWORD flags, LPVOID *data) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + + TRACE("(%p)->(%u,%p)\n", This, flags, data); + + return IDirect3DIndexBuffer9_Lock(This->index_buffer, 0, 0, data, flags); +} + +static HRESULT WINAPI ID3DXMeshImpl_UnlockIndexBuffer(ID3DXMesh *iface) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + + TRACE("(%p)\n", This); + + return IDirect3DIndexBuffer9_Unlock(This->index_buffer); +} + +static HRESULT WINAPI ID3DXMeshImpl_GetAttributeTable(ID3DXMesh *iface, D3DXATTRIBUTERANGE *attrib_table, DWORD *attrib_table_size) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + + TRACE("(%p)->(%p,%p)\n", This, attrib_table, attrib_table_size); + + if (attrib_table_size) + *attrib_table_size = This->attrib_table_size; + + if (attrib_table) + CopyMemory(attrib_table, This->attrib_table, This->attrib_table_size * sizeof(*attrib_table)); + + return D3D_OK; +} + +struct edge_face +{ + struct list entry; + DWORD v2; + DWORD face; +}; + +struct edge_face_map +{ + struct list *lists; + struct edge_face *entries; +}; + +/* Builds up a map of which face a new edge belongs to. That way the adjacency + * of another edge can be looked up. An edge has an adjacent face if there + * is an edge going in the opposite direction in the map. For example if the + * edge (v1, v2) belongs to face 4, and there is a mapping (v2, v1)->7, then + * face 4 and 7 are adjacent. + * + * Each edge might have been replaced with another edge, or none at all. There + * is at most one edge to face mapping, i.e. an edge can only belong to one + * face. + */ +static HRESULT init_edge_face_map(struct edge_face_map *edge_face_map, CONST DWORD *index_buffer, CONST DWORD *point_reps, CONST DWORD num_faces) +{ + DWORD face, edge; + DWORD i; + + edge_face_map->lists = HeapAlloc(GetProcessHeap(), 0, 3 * num_faces * sizeof(*edge_face_map->lists)); + if (!edge_face_map->lists) return E_OUTOFMEMORY; + + edge_face_map->entries = HeapAlloc(GetProcessHeap(), 0, 3 * num_faces * sizeof(*edge_face_map->entries)); + if (!edge_face_map->entries) return E_OUTOFMEMORY; + + + /* Initialize all lists */ + for (i = 0; i < 3 * num_faces; i++) + { + list_init(&edge_face_map->lists[i]); + } + /* Build edge face mapping */ + for (face = 0; face < num_faces; face++) + { + for (edge = 0; edge < 3; edge++) + { + DWORD v1 = index_buffer[3*face + edge]; + DWORD v2 = index_buffer[3*face + (edge+1)%3]; + DWORD new_v1 = point_reps[v1]; /* What v1 has been replaced with */ + DWORD new_v2 = point_reps[v2]; + + if (v1 != v2) /* Only map non-collapsed edges */ + { + i = 3*face + edge; + edge_face_map->entries[i].v2 = new_v2; + edge_face_map->entries[i].face = face; + list_add_head(&edge_face_map->lists[new_v1], &edge_face_map->entries[i].entry); + } + } + } + + return D3D_OK; +} + +static DWORD find_adjacent_face(struct edge_face_map *edge_face_map, DWORD vertex1, DWORD vertex2, CONST DWORD num_faces) +{ + struct edge_face *edge_face_ptr; + + LIST_FOR_EACH_ENTRY(edge_face_ptr, &edge_face_map->lists[vertex2], struct edge_face, entry) + { + if (edge_face_ptr->v2 == vertex1) + return edge_face_ptr->face; + } + + return -1; +} + +static DWORD *generate_identity_point_reps(DWORD num_vertices) +{ + DWORD *id_point_reps; + DWORD i; + + id_point_reps = HeapAlloc(GetProcessHeap(), 0, num_vertices * sizeof(*id_point_reps)); + if (!id_point_reps) + return NULL; + + for (i = 0; i < num_vertices; i++) + { + id_point_reps[i] = i; + } + + return id_point_reps; +} + +static HRESULT WINAPI ID3DXMeshImpl_ConvertPointRepsToAdjacency(ID3DXMesh *iface, CONST DWORD *point_reps, DWORD *adjacency) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + HRESULT hr; + DWORD num_faces = iface->lpVtbl->GetNumFaces(iface); + DWORD num_vertices = iface->lpVtbl->GetNumVertices(iface); + DWORD options = iface->lpVtbl->GetOptions(iface); + BOOL indices_are_16_bit = !(options & D3DXMESH_32BIT); + DWORD *ib = NULL; + void *ib_ptr = NULL; + DWORD face; + DWORD edge; + struct edge_face_map edge_face_map = {0}; + CONST DWORD *point_reps_ptr = NULL; + DWORD *id_point_reps = NULL; + + TRACE("(%p)->(%p,%p)\n", This, point_reps, adjacency); + + if (!adjacency) return D3DERR_INVALIDCALL; + + if (!point_reps) /* Identity point reps */ + { + id_point_reps = generate_identity_point_reps(num_vertices); + if (!id_point_reps) + { + hr = E_OUTOFMEMORY; + goto cleanup; + } + + point_reps_ptr = id_point_reps; + } + else + { + point_reps_ptr = point_reps; + } + + hr = iface->lpVtbl->LockIndexBuffer(iface, D3DLOCK_READONLY, &ib_ptr); + if (FAILED(hr)) goto cleanup; + + if (indices_are_16_bit) + { + /* Widen 16 bit to 32 bit */ + DWORD i; + WORD *ib_16bit = ib_ptr; + ib = HeapAlloc(GetProcessHeap(), 0, 3 * num_faces * sizeof(DWORD)); + if (!ib) + { + hr = E_OUTOFMEMORY; + goto cleanup; + } + for (i = 0; i < 3 * num_faces; i++) + { + ib[i] = ib_16bit[i]; + } + } + else + { + ib = ib_ptr; + } + + hr = init_edge_face_map(&edge_face_map, ib, point_reps_ptr, num_faces); + if (FAILED(hr)) goto cleanup; + + /* Create adjacency */ + for (face = 0; face < num_faces; face++) + { + for (edge = 0; edge < 3; edge++) + { + DWORD v1 = ib[3*face + edge]; + DWORD v2 = ib[3*face + (edge+1)%3]; + DWORD new_v1 = point_reps_ptr[v1]; + DWORD new_v2 = point_reps_ptr[v2]; + DWORD adj_face; + + adj_face = find_adjacent_face(&edge_face_map, new_v1, new_v2, num_faces); + adjacency[3*face + edge] = adj_face; + } + } + + hr = D3D_OK; +cleanup: + HeapFree(GetProcessHeap(), 0, id_point_reps); + if (indices_are_16_bit) HeapFree(GetProcessHeap(), 0, ib); + HeapFree(GetProcessHeap(), 0, edge_face_map.lists); + HeapFree(GetProcessHeap(), 0, edge_face_map.entries); + if(ib_ptr) iface->lpVtbl->UnlockIndexBuffer(iface); + return hr; +} + +/* ConvertAdjacencyToPointReps helper function. + * + * Goes around the edges of each face and replaces the vertices in any adjacent + * face's edge with its own vertices(if its vertices have a lower index). This + * way as few as possible low index vertices are shared among the faces. The + * re-ordered index buffer is stored in new_indices. + * + * The vertices in a point representation must be ordered sequentially, e.g. + * index 5 holds the index of the vertex that replaces vertex 5, i.e. if + * vertex 5 is replaced by vertex 3 then index 5 would contain 3. If no vertex + * replaces it, then it contains the same number as the index itself, e.g. + * index 5 would contain 5. */ +static HRESULT propagate_face_vertices(CONST DWORD *adjacency, DWORD *point_reps, + CONST DWORD *indices, DWORD *new_indices, + CONST DWORD face, CONST DWORD numfaces) +{ + const unsigned int VERTS_PER_FACE = 3; + DWORD edge, opp_edge; + DWORD face_base = VERTS_PER_FACE * face; + + for (edge = 0; edge < VERTS_PER_FACE; edge++) + { + DWORD adj_face = adjacency[face_base + edge]; + DWORD adj_face_base; + DWORD i; + if (adj_face == -1) /* No adjacent face. */ + continue; + else if (adj_face >= numfaces) + { + /* This throws exception on Windows */ + WARN("Index out of bounds. Got %d expected less than %d.\n", + adj_face, numfaces); + return D3DERR_INVALIDCALL; + } + adj_face_base = 3 * adj_face; + + /* Find opposite edge in adjacent face. */ + for (opp_edge = 0; opp_edge < VERTS_PER_FACE; opp_edge++) + { + DWORD opp_edge_index = adj_face_base + opp_edge; + if (adjacency[opp_edge_index] == face) + break; /* Found opposite edge. */ + } + + /* Replaces vertices in opposite edge with vertices from current edge. */ + for (i = 0; i < 2; i++) + { + DWORD from = face_base + (edge + (1 - i)) % VERTS_PER_FACE; + DWORD to = adj_face_base + (opp_edge + i) % VERTS_PER_FACE; + + /* Propagate lowest index. */ + if (new_indices[to] > new_indices[from]) + { + new_indices[to] = new_indices[from]; + point_reps[indices[to]] = new_indices[from]; + } + } + } + + return D3D_OK; +} + +static HRESULT WINAPI ID3DXMeshImpl_ConvertAdjacencyToPointReps(ID3DXMesh *iface, CONST DWORD *adjacency, DWORD *point_reps) +{ + HRESULT hr; + DWORD face; + DWORD i; + DWORD *indices = NULL; + WORD *indices_16bit = NULL; + DWORD *new_indices = NULL; + const unsigned int VERTS_PER_FACE = 3; + + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + + TRACE("(%p)->(%p,%p)\n", This, adjacency, point_reps); + + if (!adjacency) + { + WARN("NULL adjacency.\n"); + hr = D3DERR_INVALIDCALL; + goto cleanup; + } + + if (!point_reps) + { + WARN("NULL point_reps.\n"); + hr = D3DERR_INVALIDCALL; + goto cleanup; + } + + /* Should never happen as CreateMesh does not allow meshes with 0 faces */ + if (This->numfaces == 0) + { + ERR("Number of faces was zero.\n"); + hr = D3DERR_INVALIDCALL; + goto cleanup; + } + + new_indices = HeapAlloc(GetProcessHeap(), 0, VERTS_PER_FACE * This->numfaces * sizeof(*indices)); + if (!new_indices) + { + hr = E_OUTOFMEMORY; + goto cleanup; + } + + if (This->options & D3DXMESH_32BIT) + { + hr = iface->lpVtbl->LockIndexBuffer(iface, D3DLOCK_READONLY, (void**)&indices); + if (FAILED(hr)) goto cleanup; + memcpy(new_indices, indices, VERTS_PER_FACE * This->numfaces * sizeof(*indices)); + } + else + { + /* Make a widening copy of indices_16bit into indices and new_indices + * in order to re-use the helper function */ + hr = iface->lpVtbl->LockIndexBuffer(iface, D3DLOCK_READONLY, (void**)&indices_16bit); + if (FAILED(hr)) goto cleanup; + indices = HeapAlloc(GetProcessHeap(), 0, VERTS_PER_FACE * This->numfaces * sizeof(*indices)); + if (!indices) + { + hr = E_OUTOFMEMORY; + goto cleanup; + } + for (i = 0; i < VERTS_PER_FACE * This->numfaces; i++) + { + new_indices[i] = indices_16bit[i]; + indices[i] = indices_16bit[i]; + } + } + + /* Vertices are ordered sequentially in the point representation. */ + for (i = 0; i < This->numvertices; i++) + { + point_reps[i] = i; + } + + /* Propagate vertices with low indices so as few vertices as possible + * are used in the mesh. + */ + for (face = 0; face < This->numfaces; face++) + { + hr = propagate_face_vertices(adjacency, point_reps, indices, new_indices, face, This->numfaces); + if (FAILED(hr)) goto cleanup; + } + /* Go in opposite direction to catch all face orderings */ + for (face = 0; face < This->numfaces; face++) + { + hr = propagate_face_vertices(adjacency, point_reps, + indices, new_indices, + (This->numfaces - 1) - face, This->numfaces); + if (FAILED(hr)) goto cleanup; + } + + hr = D3D_OK; +cleanup: + if (This->options & D3DXMESH_32BIT) + { + if (indices) iface->lpVtbl->UnlockIndexBuffer(iface); + } + else + { + if (indices_16bit) iface->lpVtbl->UnlockIndexBuffer(iface); + HeapFree(GetProcessHeap(), 0, indices); + } + HeapFree(GetProcessHeap(), 0, new_indices); + return hr; +} + +struct vertex_metadata { + float key; + DWORD vertex_index; + DWORD first_shared_index; +}; + +static int compare_vertex_keys(const void *a, const void *b) +{ + const struct vertex_metadata *left = a; + const struct vertex_metadata *right = b; + if (left->key == right->key) + return 0; + return left->key < right->key ? -1 : 1; +} + +static HRESULT WINAPI ID3DXMeshImpl_GenerateAdjacency(ID3DXMesh *iface, FLOAT epsilon, DWORD *adjacency) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + HRESULT hr; + BYTE *vertices = NULL; + const DWORD *indices = NULL; + DWORD vertex_size; + DWORD buffer_size; + /* sort the vertices by (x + y + z) to quickly find coincident vertices */ + struct vertex_metadata *sorted_vertices; + /* shared_indices links together identical indices in the index buffer so + * that adjacency checks can be limited to faces sharing a vertex */ + DWORD *shared_indices = NULL; + const FLOAT epsilon_sq = epsilon * epsilon; + DWORD i; + + TRACE("(%p)->(%f,%p)\n", This, epsilon, adjacency); + + if (!adjacency) + return D3DERR_INVALIDCALL; + + buffer_size = This->numfaces * 3 * sizeof(*shared_indices) + This->numvertices * sizeof(*sorted_vertices); + if (!(This->options & D3DXMESH_32BIT)) + buffer_size += This->numfaces * 3 * sizeof(*indices); + shared_indices = HeapAlloc(GetProcessHeap(), 0, buffer_size); + if (!shared_indices) + return E_OUTOFMEMORY; + sorted_vertices = (struct vertex_metadata*)(shared_indices + This->numfaces * 3); + + hr = iface->lpVtbl->LockVertexBuffer(iface, D3DLOCK_READONLY, (void**)&vertices); + if (FAILED(hr)) goto cleanup; + hr = iface->lpVtbl->LockIndexBuffer(iface, D3DLOCK_READONLY, (void**)&indices); + if (FAILED(hr)) goto cleanup; + + if (!(This->options & D3DXMESH_32BIT)) { + const WORD *word_indices = (const WORD*)indices; + DWORD *dword_indices = (DWORD*)(sorted_vertices + This->numvertices); + indices = dword_indices; + for (i = 0; i < This->numfaces * 3; i++) + *dword_indices++ = *word_indices++; + } + + vertex_size = iface->lpVtbl->GetNumBytesPerVertex(iface); + for (i = 0; i < This->numvertices; i++) { + D3DXVECTOR3 *vertex = (D3DXVECTOR3*)(vertices + vertex_size * i); + sorted_vertices[i].first_shared_index = -1; + sorted_vertices[i].key = vertex->x + vertex->y + vertex->z; + sorted_vertices[i].vertex_index = i; + } + for (i = 0; i < This->numfaces * 3; i++) { + DWORD *first_shared_index = &sorted_vertices[indices[i]].first_shared_index; + shared_indices[i] = *first_shared_index; + *first_shared_index = i; + adjacency[i] = -1; + } + qsort(sorted_vertices, This->numvertices, sizeof(*sorted_vertices), compare_vertex_keys); + + for (i = 0; i < This->numvertices; i++) { + struct vertex_metadata *sorted_vertex_a = &sorted_vertices[i]; + D3DXVECTOR3 *vertex_a = (D3DXVECTOR3*)(vertices + sorted_vertex_a->vertex_index * vertex_size); + DWORD shared_index_a = sorted_vertex_a->first_shared_index; + + while (shared_index_a != -1) { + DWORD j = i; + DWORD shared_index_b = shared_indices[shared_index_a]; + struct vertex_metadata *sorted_vertex_b = sorted_vertex_a; + + while (TRUE) { + while (shared_index_b != -1) { + /* faces are adjacent if they have another coincident vertex */ + DWORD base_a = (shared_index_a / 3) * 3; + DWORD base_b = (shared_index_b / 3) * 3; + BOOL adjacent = FALSE; + int k; + + for (k = 0; k < 3; k++) { + if (adjacency[base_b + k] == shared_index_a / 3) { + adjacent = TRUE; + break; + } + } + if (!adjacent) { + for (k = 1; k <= 2; k++) { + DWORD vertex_index_a = base_a + (shared_index_a + k) % 3; + DWORD vertex_index_b = base_b + (shared_index_b + (3 - k)) % 3; + adjacent = indices[vertex_index_a] == indices[vertex_index_b]; + if (!adjacent && epsilon >= 0.0f) { + D3DXVECTOR3 delta = {0.0f, 0.0f, 0.0f}; + FLOAT length_sq; + + D3DXVec3Subtract(&delta, + (D3DXVECTOR3*)(vertices + indices[vertex_index_a] * vertex_size), + (D3DXVECTOR3*)(vertices + indices[vertex_index_b] * vertex_size)); + length_sq = D3DXVec3LengthSq(&delta); + adjacent = epsilon == 0.0f ? length_sq == 0.0f : length_sq < epsilon_sq; + } + if (adjacent) { + DWORD adj_a = base_a + 2 - (vertex_index_a + shared_index_a + 1) % 3; + DWORD adj_b = base_b + 2 - (vertex_index_b + shared_index_b + 1) % 3; + if (adjacency[adj_a] == -1 && adjacency[adj_b] == -1) { + adjacency[adj_a] = base_b / 3; + adjacency[adj_b] = base_a / 3; + break; + } + } + } + } + + shared_index_b = shared_indices[shared_index_b]; + } + while (++j < This->numvertices) { + D3DXVECTOR3 *vertex_b; + + sorted_vertex_b++; + if (sorted_vertex_b->key - sorted_vertex_a->key > epsilon * 3.0f) { + /* no more coincident vertices to try */ + j = This->numvertices; + break; + } + /* check for coincidence */ + vertex_b = (D3DXVECTOR3*)(vertices + sorted_vertex_b->vertex_index * vertex_size); + if (fabsf(vertex_a->x - vertex_b->x) <= epsilon && + fabsf(vertex_a->y - vertex_b->y) <= epsilon && + fabsf(vertex_a->z - vertex_b->z) <= epsilon) + { + break; + } + } + if (j >= This->numvertices) + break; + shared_index_b = sorted_vertex_b->first_shared_index; + } + + sorted_vertex_a->first_shared_index = shared_indices[sorted_vertex_a->first_shared_index]; + shared_index_a = sorted_vertex_a->first_shared_index; + } + } + + hr = D3D_OK; +cleanup: + if (indices) iface->lpVtbl->UnlockIndexBuffer(iface); + if (vertices) iface->lpVtbl->UnlockVertexBuffer(iface); + HeapFree(GetProcessHeap(), 0, shared_indices); + return hr; +} + +static HRESULT WINAPI ID3DXMeshImpl_UpdateSemantics(ID3DXMesh *iface, D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) +{ + HRESULT hr; + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + UINT vertex_declaration_size; + int i; + + TRACE("(%p)->(%p)\n", This, declaration); + + if (!declaration) + { + WARN("Invalid declaration. Can't use NULL declaration.\n"); + return D3DERR_INVALIDCALL; + } + + /* New declaration must be same size as original */ + vertex_declaration_size = D3DXGetDeclVertexSize(declaration, declaration[0].Stream); + if (vertex_declaration_size != This->vertex_declaration_size) + { + WARN("Invalid declaration. New vertex size does not match the original vertex size.\n"); + return D3DERR_INVALIDCALL; + } + + /* New declaration must not contain non-zero Stream value */ + for (i = 0; declaration[i].Stream != 0xff; i++) + { + if (declaration[i].Stream != 0) + { + WARN("Invalid declaration. New declaration contains non-zero Stream value.\n"); + return D3DERR_INVALIDCALL; + } + } + + This->num_elem = i + 1; + copy_declaration(This->cached_declaration, declaration, This->num_elem); + + if (This->vertex_declaration) + IDirect3DVertexDeclaration9_Release(This->vertex_declaration); + + /* An application can pass an invalid declaration to UpdateSemantics and + * still expect D3D_OK (see tests). If the declaration is invalid, then + * subsequent calls to DrawSubset will fail. This is handled by setting the + * vertex declaration to NULL. + * GetDeclaration, GetNumBytesPerVertex must, however, use the new + * invalid declaration. This is handled by them using the cached vertex + * declaration instead of the actual vertex declaration. + */ + hr = IDirect3DDevice9_CreateVertexDeclaration(This->device, + declaration, + &This->vertex_declaration); + if (FAILED(hr)) + { + WARN("Using invalid declaration. Calls to DrawSubset will fail.\n"); + This->vertex_declaration = NULL; + } + + return D3D_OK; +} + +/*** ID3DXMesh ***/ +static HRESULT WINAPI ID3DXMeshImpl_LockAttributeBuffer(ID3DXMesh *iface, DWORD flags, DWORD **data) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + + TRACE("(%p)->(%u,%p)\n", This, flags, data); + + InterlockedIncrement(&This->attrib_buffer_lock_count); + + if (!(flags & D3DLOCK_READONLY)) { + D3DXATTRIBUTERANGE *attrib_table = This->attrib_table; + This->attrib_table_size = 0; + This->attrib_table = NULL; + HeapFree(GetProcessHeap(), 0, attrib_table); + } + + *data = This->attrib_buffer; + + return D3D_OK; +} + +static HRESULT WINAPI ID3DXMeshImpl_UnlockAttributeBuffer(ID3DXMesh *iface) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + int lock_count; + + TRACE("(%p)\n", This); + + lock_count = InterlockedDecrement(&This->attrib_buffer_lock_count); + + if (lock_count < 0) { + InterlockedIncrement(&This->attrib_buffer_lock_count); + return D3DERR_INVALIDCALL; + } + + return D3D_OK; +} + +static HRESULT WINAPI ID3DXMeshImpl_Optimize(ID3DXMesh *iface, DWORD flags, const DWORD *adjacency_in, + DWORD *adjacency_out, DWORD *face_remap, ID3DXBuffer **vertex_remap, ID3DXMesh **opt_mesh) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + HRESULT hr; + D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE] = { D3DDECL_END() }; + ID3DXMesh *optimized_mesh; + + TRACE("(%p)->(%x,%p,%p,%p,%p,%p)\n", This, flags, adjacency_in, adjacency_out, face_remap, vertex_remap, opt_mesh); + + if (!opt_mesh) + return D3DERR_INVALIDCALL; + + hr = iface->lpVtbl->GetDeclaration(iface, declaration); + if (FAILED(hr)) return hr; + + hr = iface->lpVtbl->CloneMesh(iface, This->options, declaration, This->device, &optimized_mesh); + if (FAILED(hr)) return hr; + + hr = optimized_mesh->lpVtbl->OptimizeInplace(optimized_mesh, flags, adjacency_in, adjacency_out, face_remap, vertex_remap); + if (SUCCEEDED(hr)) + *opt_mesh = optimized_mesh; + else + IUnknown_Release(optimized_mesh); + return hr; +} + +/* Creates a vertex_remap that removes unused vertices. + * Indices are updated according to the vertex_remap. */ +static HRESULT compact_mesh(ID3DXMeshImpl *This, DWORD *indices, DWORD *new_num_vertices, ID3DXBuffer **vertex_remap) +{ + HRESULT hr; + DWORD *vertex_remap_ptr; + DWORD num_used_vertices; + DWORD i; + + hr = D3DXCreateBuffer(This->numvertices * sizeof(DWORD), vertex_remap); + if (FAILED(hr)) return hr; + vertex_remap_ptr = ID3DXBuffer_GetBufferPointer(*vertex_remap); + + for (i = 0; i < This->numfaces * 3; i++) + vertex_remap_ptr[indices[i]] = 1; + + /* create old->new vertex mapping */ + num_used_vertices = 0; + for (i = 0; i < This->numvertices; i++) { + if (vertex_remap_ptr[i]) + vertex_remap_ptr[i] = num_used_vertices++; + else + vertex_remap_ptr[i] = -1; + } + /* convert indices */ + for (i = 0; i < This->numfaces * 3; i++) + indices[i] = vertex_remap_ptr[indices[i]]; + + /* create new->old vertex mapping */ + num_used_vertices = 0; + for (i = 0; i < This->numvertices; i++) { + if (vertex_remap_ptr[i] != -1) + vertex_remap_ptr[num_used_vertices++] = i; + } + for (i = num_used_vertices; i < This->numvertices; i++) + vertex_remap_ptr[i] = -1; + + *new_num_vertices = num_used_vertices; + + return D3D_OK; +} + +/* count the number of unique attribute values in a sorted attribute buffer */ +static DWORD count_attributes(const DWORD *attrib_buffer, DWORD numfaces) +{ + DWORD last_attribute = attrib_buffer[0]; + DWORD attrib_table_size = 1; + DWORD i; + for (i = 1; i < numfaces; i++) { + if (attrib_buffer[i] != last_attribute) { + last_attribute = attrib_buffer[i]; + attrib_table_size++; + } + } + return attrib_table_size; +} + +static void fill_attribute_table(DWORD *attrib_buffer, DWORD numfaces, void *indices, + BOOL is_32bit_indices, D3DXATTRIBUTERANGE *attrib_table) +{ + DWORD attrib_table_size = 0; + DWORD last_attribute = attrib_buffer[0]; + DWORD min_vertex, max_vertex; + DWORD i; + + attrib_table[0].AttribId = last_attribute; + attrib_table[0].FaceStart = 0; + min_vertex = (DWORD)-1; + max_vertex = 0; + for (i = 0; i < numfaces; i++) { + DWORD j; + + if (attrib_buffer[i] != last_attribute) { + last_attribute = attrib_buffer[i]; + attrib_table[attrib_table_size].FaceCount = i - attrib_table[attrib_table_size].FaceStart; + attrib_table[attrib_table_size].VertexStart = min_vertex; + attrib_table[attrib_table_size].VertexCount = max_vertex - min_vertex + 1; + attrib_table_size++; + attrib_table[attrib_table_size].AttribId = attrib_buffer[i]; + attrib_table[attrib_table_size].FaceStart = i; + min_vertex = (DWORD)-1; + max_vertex = 0; + } + for (j = 0; j < 3; j++) { + DWORD vertex_index = is_32bit_indices ? ((DWORD*)indices)[i * 3 + j] : ((WORD*)indices)[i * 3 + j]; + if (vertex_index < min_vertex) + min_vertex = vertex_index; + if (vertex_index > max_vertex) + max_vertex = vertex_index; + } + } + attrib_table[attrib_table_size].FaceCount = i - attrib_table[attrib_table_size].FaceStart; + attrib_table[attrib_table_size].VertexStart = min_vertex; + attrib_table[attrib_table_size].VertexCount = max_vertex - min_vertex + 1; + attrib_table_size++; +} + +static int attrib_entry_compare(const DWORD **a, const DWORD **b) +{ + const DWORD *ptr_a = *a; + const DWORD *ptr_b = *b; + int delta = *ptr_a - *ptr_b; + + if (delta) + return delta; + + delta = ptr_a - ptr_b; /* for stable sort */ + return delta; +} + +/* Create face_remap, a new attribute buffer for attribute sort optimization. */ +static HRESULT remap_faces_for_attrsort(ID3DXMeshImpl *This, const DWORD *indices, + const DWORD *attrib_buffer, DWORD **sorted_attrib_buffer, DWORD **face_remap) +{ + const DWORD **sorted_attrib_ptr_buffer = NULL; + DWORD i; + + *face_remap = HeapAlloc(GetProcessHeap(), 0, This->numfaces * sizeof(**face_remap)); + sorted_attrib_ptr_buffer = HeapAlloc(GetProcessHeap(), 0, This->numfaces * sizeof(*sorted_attrib_ptr_buffer)); + if (!*face_remap || !sorted_attrib_ptr_buffer) { + HeapFree(GetProcessHeap(), 0, sorted_attrib_ptr_buffer); + return E_OUTOFMEMORY; + } + for (i = 0; i < This->numfaces; i++) + sorted_attrib_ptr_buffer[i] = &attrib_buffer[i]; + qsort(sorted_attrib_ptr_buffer, This->numfaces, sizeof(*sorted_attrib_ptr_buffer), + (int(*)(const void *, const void *))attrib_entry_compare); + + for (i = 0; i < This->numfaces; i++) + { + DWORD old_face = sorted_attrib_ptr_buffer[i] - attrib_buffer; + (*face_remap)[old_face] = i; + } + + /* overwrite sorted_attrib_ptr_buffer with the values themselves */ + *sorted_attrib_buffer = (DWORD*)sorted_attrib_ptr_buffer; + for (i = 0; i < This->numfaces; i++) + (*sorted_attrib_buffer)[(*face_remap)[i]] = attrib_buffer[i]; + + return D3D_OK; +} + +static HRESULT WINAPI ID3DXMeshImpl_OptimizeInplace(ID3DXMesh *iface, DWORD flags, const DWORD *adjacency_in, + DWORD *adjacency_out, DWORD *face_remap_out, ID3DXBuffer **vertex_remap_out) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + void *indices = NULL; + DWORD *attrib_buffer = NULL; + HRESULT hr; + ID3DXBuffer *vertex_remap = NULL; + DWORD *face_remap = NULL; /* old -> new mapping */ + DWORD *dword_indices = NULL; + DWORD new_num_vertices = 0; + DWORD new_num_alloc_vertices = 0; + IDirect3DVertexBuffer9 *vertex_buffer = NULL; + DWORD *sorted_attrib_buffer = NULL; + DWORD i; + + TRACE("(%p)->(%x,%p,%p,%p,%p)\n", This, flags, adjacency_in, adjacency_out, face_remap_out, vertex_remap_out); + + if (!flags) + return D3DERR_INVALIDCALL; + if (!adjacency_in && (flags & (D3DXMESHOPT_VERTEXCACHE | D3DXMESHOPT_STRIPREORDER))) + return D3DERR_INVALIDCALL; + if ((flags & (D3DXMESHOPT_VERTEXCACHE | D3DXMESHOPT_STRIPREORDER)) == (D3DXMESHOPT_VERTEXCACHE | D3DXMESHOPT_STRIPREORDER)) + return D3DERR_INVALIDCALL; + + if (flags & (D3DXMESHOPT_VERTEXCACHE | D3DXMESHOPT_STRIPREORDER)) + { + if (flags & D3DXMESHOPT_VERTEXCACHE) + FIXME("D3DXMESHOPT_VERTEXCACHE not implemented.\n"); + if (flags & D3DXMESHOPT_STRIPREORDER) + FIXME("D3DXMESHOPT_STRIPREORDER not implemented.\n"); + return E_NOTIMPL; + } + + hr = iface->lpVtbl->LockIndexBuffer(iface, 0, &indices); + if (FAILED(hr)) goto cleanup; + + dword_indices = HeapAlloc(GetProcessHeap(), 0, This->numfaces * 3 * sizeof(DWORD)); + if (!dword_indices) return E_OUTOFMEMORY; + if (This->options & D3DXMESH_32BIT) { + memcpy(dword_indices, indices, This->numfaces * 3 * sizeof(DWORD)); + } else { + WORD *word_indices = indices; + for (i = 0; i < This->numfaces * 3; i++) + dword_indices[i] = *word_indices++; + } + + if ((flags & (D3DXMESHOPT_COMPACT | D3DXMESHOPT_IGNOREVERTS | D3DXMESHOPT_ATTRSORT)) == D3DXMESHOPT_COMPACT) + { + new_num_alloc_vertices = This->numvertices; + hr = compact_mesh(This, dword_indices, &new_num_vertices, &vertex_remap); + if (FAILED(hr)) goto cleanup; + } else if (flags & D3DXMESHOPT_ATTRSORT) { + if (!(flags & D3DXMESHOPT_IGNOREVERTS)) + { + FIXME("D3DXMESHOPT_ATTRSORT vertex reordering not implemented.\n"); + hr = E_NOTIMPL; + goto cleanup; + } + + hr = iface->lpVtbl->LockAttributeBuffer(iface, 0, &attrib_buffer); + if (FAILED(hr)) goto cleanup; + + hr = remap_faces_for_attrsort(This, dword_indices, attrib_buffer, &sorted_attrib_buffer, &face_remap); + if (FAILED(hr)) goto cleanup; + } + + if (vertex_remap) + { + /* reorder the vertices using vertex_remap */ + D3DVERTEXBUFFER_DESC vertex_desc; + DWORD *vertex_remap_ptr = ID3DXBuffer_GetBufferPointer(vertex_remap); + DWORD vertex_size = iface->lpVtbl->GetNumBytesPerVertex(iface); + BYTE *orig_vertices; + BYTE *new_vertices; + + hr = IDirect3DVertexBuffer9_GetDesc(This->vertex_buffer, &vertex_desc); + if (FAILED(hr)) goto cleanup; + + hr = IDirect3DDevice9_CreateVertexBuffer(This->device, new_num_alloc_vertices * vertex_size, + vertex_desc.Usage, This->fvf, vertex_desc.Pool, &vertex_buffer, NULL); + if (FAILED(hr)) goto cleanup; + + hr = IDirect3DVertexBuffer9_Lock(This->vertex_buffer, 0, 0, (void**)&orig_vertices, D3DLOCK_READONLY); + if (FAILED(hr)) goto cleanup; + + hr = IDirect3DVertexBuffer9_Lock(vertex_buffer, 0, 0, (void**)&new_vertices, 0); + if (FAILED(hr)) { + IDirect3DVertexBuffer9_Unlock(This->vertex_buffer); + goto cleanup; + } + + for (i = 0; i < new_num_vertices; i++) + memcpy(new_vertices + i * vertex_size, orig_vertices + vertex_remap_ptr[i] * vertex_size, vertex_size); + + IDirect3DVertexBuffer9_Unlock(This->vertex_buffer); + IDirect3DVertexBuffer9_Unlock(vertex_buffer); + } else if (vertex_remap_out) { + DWORD *vertex_remap_ptr; + + hr = D3DXCreateBuffer(This->numvertices * sizeof(DWORD), &vertex_remap); + if (FAILED(hr)) goto cleanup; + vertex_remap_ptr = ID3DXBuffer_GetBufferPointer(vertex_remap); + for (i = 0; i < This->numvertices; i++) + *vertex_remap_ptr++ = i; + } + + if (flags & D3DXMESHOPT_ATTRSORT) + { + D3DXATTRIBUTERANGE *attrib_table; + DWORD attrib_table_size; + + attrib_table_size = count_attributes(sorted_attrib_buffer, This->numfaces); + attrib_table = HeapAlloc(GetProcessHeap(), 0, attrib_table_size * sizeof(*attrib_table)); + if (!attrib_table) { + hr = E_OUTOFMEMORY; + goto cleanup; + } + + memcpy(attrib_buffer, sorted_attrib_buffer, This->numfaces * sizeof(*attrib_buffer)); + + /* reorder the indices using face_remap */ + if (This->options & D3DXMESH_32BIT) { + for (i = 0; i < This->numfaces; i++) + memcpy((DWORD*)indices + face_remap[i] * 3, dword_indices + i * 3, 3 * sizeof(DWORD)); + } else { + WORD *word_indices = indices; + for (i = 0; i < This->numfaces; i++) { + DWORD new_pos = face_remap[i] * 3; + DWORD old_pos = i * 3; + word_indices[new_pos++] = dword_indices[old_pos++]; + word_indices[new_pos++] = dword_indices[old_pos++]; + word_indices[new_pos] = dword_indices[old_pos]; + } + } + + fill_attribute_table(attrib_buffer, This->numfaces, indices, + This->options & D3DXMESH_32BIT, attrib_table); + + HeapFree(GetProcessHeap(), 0, This->attrib_table); + This->attrib_table = attrib_table; + This->attrib_table_size = attrib_table_size; + } else { + if (This->options & D3DXMESH_32BIT) { + memcpy(indices, dword_indices, This->numfaces * 3 * sizeof(DWORD)); + } else { + WORD *word_indices = indices; + for (i = 0; i < This->numfaces * 3; i++) + *word_indices++ = dword_indices[i]; + } + } + + if (adjacency_out) { + if (face_remap) { + for (i = 0; i < This->numfaces; i++) { + DWORD old_pos = i * 3; + DWORD new_pos = face_remap[i] * 3; + adjacency_out[new_pos++] = face_remap[adjacency_in[old_pos++]]; + adjacency_out[new_pos++] = face_remap[adjacency_in[old_pos++]]; + adjacency_out[new_pos++] = face_remap[adjacency_in[old_pos++]]; + } + } else { + memcpy(adjacency_out, adjacency_in, This->numfaces * 3 * sizeof(*adjacency_out)); + } + } + if (face_remap_out) { + if (face_remap) { + for (i = 0; i < This->numfaces; i++) + face_remap_out[face_remap[i]] = i; + } else { + for (i = 0; i < This->numfaces; i++) + face_remap_out[i] = i; + } + } + if (vertex_remap_out) + *vertex_remap_out = vertex_remap; + vertex_remap = NULL; + + if (vertex_buffer) { + IDirect3DVertexBuffer9_Release(This->vertex_buffer); + This->vertex_buffer = vertex_buffer; + vertex_buffer = NULL; + This->numvertices = new_num_vertices; + } + + hr = D3D_OK; +cleanup: + HeapFree(GetProcessHeap(), 0, sorted_attrib_buffer); + HeapFree(GetProcessHeap(), 0, face_remap); + HeapFree(GetProcessHeap(), 0, dword_indices); + if (vertex_remap) ID3DXBuffer_Release(vertex_remap); + if (vertex_buffer) IDirect3DVertexBuffer9_Release(vertex_buffer); + if (attrib_buffer) iface->lpVtbl->UnlockAttributeBuffer(iface); + if (indices) iface->lpVtbl->UnlockIndexBuffer(iface); + return hr; +} + +static HRESULT WINAPI ID3DXMeshImpl_SetAttributeTable(ID3DXMesh *iface, CONST D3DXATTRIBUTERANGE *attrib_table, DWORD attrib_table_size) +{ + ID3DXMeshImpl *This = impl_from_ID3DXMesh(iface); + D3DXATTRIBUTERANGE *new_table = NULL; + + TRACE("(%p)->(%p,%u)\n", This, attrib_table, attrib_table_size); + + if (attrib_table_size) { + size_t size = attrib_table_size * sizeof(*attrib_table); + + new_table = HeapAlloc(GetProcessHeap(), 0, size); + if (!new_table) + return E_OUTOFMEMORY; + + CopyMemory(new_table, attrib_table, size); + } else if (attrib_table) { + return D3DERR_INVALIDCALL; + } + HeapFree(GetProcessHeap(), 0, This->attrib_table); + This->attrib_table = new_table; + This->attrib_table_size = attrib_table_size; + + return D3D_OK; +} + +static const struct ID3DXMeshVtbl D3DXMesh_Vtbl = +{ + /*** IUnknown methods ***/ + ID3DXMeshImpl_QueryInterface, + ID3DXMeshImpl_AddRef, + ID3DXMeshImpl_Release, + /*** ID3DXBaseMesh ***/ + ID3DXMeshImpl_DrawSubset, + ID3DXMeshImpl_GetNumFaces, + ID3DXMeshImpl_GetNumVertices, + ID3DXMeshImpl_GetFVF, + ID3DXMeshImpl_GetDeclaration, + ID3DXMeshImpl_GetNumBytesPerVertex, + ID3DXMeshImpl_GetOptions, + ID3DXMeshImpl_GetDevice, + ID3DXMeshImpl_CloneMeshFVF, + ID3DXMeshImpl_CloneMesh, + ID3DXMeshImpl_GetVertexBuffer, + ID3DXMeshImpl_GetIndexBuffer, + ID3DXMeshImpl_LockVertexBuffer, + ID3DXMeshImpl_UnlockVertexBuffer, + ID3DXMeshImpl_LockIndexBuffer, + ID3DXMeshImpl_UnlockIndexBuffer, + ID3DXMeshImpl_GetAttributeTable, + ID3DXMeshImpl_ConvertPointRepsToAdjacency, + ID3DXMeshImpl_ConvertAdjacencyToPointReps, + ID3DXMeshImpl_GenerateAdjacency, + ID3DXMeshImpl_UpdateSemantics, + /*** ID3DXMesh ***/ + ID3DXMeshImpl_LockAttributeBuffer, + ID3DXMeshImpl_UnlockAttributeBuffer, + ID3DXMeshImpl_Optimize, + ID3DXMeshImpl_OptimizeInplace, + ID3DXMeshImpl_SetAttributeTable +}; + /************************************************************************* * D3DXBoxBoundProbe */ BOOL WINAPI D3DXBoxBoundProbe(CONST D3DXVECTOR3 *pmin, CONST D3DXVECTOR3 *pmax, CONST D3DXVECTOR3 *prayposition, CONST D3DXVECTOR3 *praydirection) -/* Algorithm taken from the article: An Efficient and Robust Ray-Box Intersection Algoritm +/* Algorithm taken from the article: An Efficient and Robust Ray-Box Intersection Algorithm Amy Williams University of Utah Steve Barrus University of Utah R. Keith Morley University of Utah @@ -63,13 +1923,13 @@ done we've got an intersection of the ray with the box. div = 1.0f / praydirection->x; if ( div >= 0.0f ) { - tmin = ( pmin->x - prayposition->x ) * div; - tmax = ( pmax->x - prayposition->x ) * div; + tmin = ( pmin->x - prayposition->x ) * div; + tmax = ( pmax->x - prayposition->x ) * div; } else { - tmin = ( pmax->x - prayposition->x ) * div; - tmax = ( pmin->x - prayposition->x ) * div; + tmin = ( pmax->x - prayposition->x ) * div; + tmax = ( pmin->x - prayposition->x ) * div; } if ( tmax < 0.0f ) return FALSE; @@ -77,13 +1937,13 @@ done we've got an intersection of the ray with the box. div = 1.0f / praydirection->y; if ( div >= 0.0f ) { - tymin = ( pmin->y - prayposition->y ) * div; - tymax = ( pmax->y - prayposition->y ) * div; + tymin = ( pmin->y - prayposition->y ) * div; + tymax = ( pmax->y - prayposition->y ) * div; } else { - tymin = ( pmax->y - prayposition->y ) * div; - tymax = ( pmin->y - prayposition->y ) * div; + tymin = ( pmax->y - prayposition->y ) * div; + tymax = ( pmin->y - prayposition->y ) * div; } if ( ( tymax < 0.0f ) || ( tmin > tymax ) || ( tymin > tmax ) ) return FALSE; @@ -94,13 +1954,13 @@ done we've got an intersection of the ray with the box. div = 1.0f / praydirection->z; if ( div >= 0.0f ) { - tzmin = ( pmin->z - prayposition->z ) * div; - tzmax = ( pmax->z - prayposition->z ) * div; + tzmin = ( pmin->z - prayposition->z ) * div; + tzmax = ( pmax->z - prayposition->z ) * div; } else { - tzmin = ( pmax->z - prayposition->z ) * div; - tzmax = ( pmin->z - prayposition->z ) * div; + tzmin = ( pmax->z - prayposition->z ) * div; + tzmax = ( pmin->z - prayposition->z ) * div; } if ( (tzmax < 0.0f ) || ( tmin > tzmax ) || ( tzmin > tmax ) ) return FALSE; @@ -123,7 +1983,7 @@ HRESULT WINAPI D3DXComputeBoundingBox(CONST D3DXVECTOR3 *pfirstposition, DWORD n for(i=0; ix ) pmin->x = vec.x; if ( vec.x > pmax->x ) pmax->x = vec.x; @@ -143,7 +2003,7 @@ HRESULT WINAPI D3DXComputeBoundingBox(CONST D3DXVECTOR3 *pfirstposition, DWORD n */ HRESULT WINAPI D3DXComputeBoundingSphere(CONST D3DXVECTOR3* pfirstposition, DWORD numvertices, DWORD dwstride, D3DXVECTOR3 *pcenter, FLOAT *pradius) { - D3DXVECTOR3 temp, temp1; + D3DXVECTOR3 temp; FLOAT d; unsigned int i; @@ -152,26 +2012,283 @@ HRESULT WINAPI D3DXComputeBoundingSphere(CONST D3DXVECTOR3* pfirstposition, DWOR temp.x = 0.0f; temp.y = 0.0f; temp.z = 0.0f; - temp1 = temp; - d = 0.0f; *pradius = 0.0f; for(i=0; i *pradius ) *pradius = d; } return D3D_OK; } +static void append_decl_element(D3DVERTEXELEMENT9 *declaration, UINT *idx, UINT *offset, + D3DDECLTYPE type, D3DDECLUSAGE usage, UINT usage_idx) +{ + declaration[*idx].Stream = 0; + declaration[*idx].Offset = *offset; + declaration[*idx].Type = type; + declaration[*idx].Method = D3DDECLMETHOD_DEFAULT; + declaration[*idx].Usage = usage; + declaration[*idx].UsageIndex = usage_idx; + + *offset += d3dx_decltype_size[type]; + ++(*idx); +} + +/************************************************************************* + * D3DXDeclaratorFromFVF + */ +HRESULT WINAPI D3DXDeclaratorFromFVF(DWORD fvf, D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) +{ + static const D3DVERTEXELEMENT9 end_element = D3DDECL_END(); + DWORD tex_count = (fvf & D3DFVF_TEXCOUNT_MASK) >> D3DFVF_TEXCOUNT_SHIFT; + unsigned int offset = 0; + unsigned int idx = 0; + unsigned int i; + + TRACE("fvf %#x, declaration %p.\n", fvf, declaration); + + if (fvf & (D3DFVF_RESERVED0 | D3DFVF_RESERVED2)) return D3DERR_INVALIDCALL; + + if (fvf & D3DFVF_POSITION_MASK) + { + BOOL has_blend = (fvf & D3DFVF_XYZB5) >= D3DFVF_XYZB1; + DWORD blend_count = 1 + (((fvf & D3DFVF_XYZB5) - D3DFVF_XYZB1) >> 1); + BOOL has_blend_idx = (fvf & D3DFVF_LASTBETA_D3DCOLOR) || (fvf & D3DFVF_LASTBETA_UBYTE4); + + if (has_blend_idx) --blend_count; + + if ((fvf & D3DFVF_POSITION_MASK) == D3DFVF_XYZW + || (has_blend && blend_count > 4)) + return D3DERR_INVALIDCALL; + + if ((fvf & D3DFVF_POSITION_MASK) == D3DFVF_XYZRHW) + append_decl_element(declaration, &idx, &offset, D3DDECLTYPE_FLOAT4, D3DDECLUSAGE_POSITIONT, 0); + else + append_decl_element(declaration, &idx, &offset, D3DDECLTYPE_FLOAT3, D3DDECLUSAGE_POSITION, 0); + + if (has_blend) + { + switch (blend_count) + { + case 0: + break; + case 1: + append_decl_element(declaration, &idx, &offset, D3DDECLTYPE_FLOAT1, D3DDECLUSAGE_BLENDWEIGHT, 0); + break; + case 2: + append_decl_element(declaration, &idx, &offset, D3DDECLTYPE_FLOAT2, D3DDECLUSAGE_BLENDWEIGHT, 0); + break; + case 3: + append_decl_element(declaration, &idx, &offset, D3DDECLTYPE_FLOAT3, D3DDECLUSAGE_BLENDWEIGHT, 0); + break; + case 4: + append_decl_element(declaration, &idx, &offset, D3DDECLTYPE_FLOAT4, D3DDECLUSAGE_BLENDWEIGHT, 0); + break; + default: + ERR("Invalid blend count %u.\n", blend_count); + break; + } + + if (has_blend_idx) + { + if (fvf & D3DFVF_LASTBETA_UBYTE4) + append_decl_element(declaration, &idx, &offset, D3DDECLTYPE_UBYTE4, D3DDECLUSAGE_BLENDINDICES, 0); + else if (fvf & D3DFVF_LASTBETA_D3DCOLOR) + append_decl_element(declaration, &idx, &offset, D3DDECLTYPE_D3DCOLOR, D3DDECLUSAGE_BLENDINDICES, 0); + } + } + } + + if (fvf & D3DFVF_NORMAL) + append_decl_element(declaration, &idx, &offset, D3DDECLTYPE_FLOAT3, D3DDECLUSAGE_NORMAL, 0); + if (fvf & D3DFVF_PSIZE) + append_decl_element(declaration, &idx, &offset, D3DDECLTYPE_FLOAT1, D3DDECLUSAGE_PSIZE, 0); + if (fvf & D3DFVF_DIFFUSE) + append_decl_element(declaration, &idx, &offset, D3DDECLTYPE_D3DCOLOR, D3DDECLUSAGE_COLOR, 0); + if (fvf & D3DFVF_SPECULAR) + append_decl_element(declaration, &idx, &offset, D3DDECLTYPE_D3DCOLOR, D3DDECLUSAGE_COLOR, 1); + + for (i = 0; i < tex_count; ++i) + { + switch ((fvf >> (16 + 2 * i)) & 0x03) + { + case D3DFVF_TEXTUREFORMAT1: + append_decl_element(declaration, &idx, &offset, D3DDECLTYPE_FLOAT1, D3DDECLUSAGE_TEXCOORD, i); + break; + case D3DFVF_TEXTUREFORMAT2: + append_decl_element(declaration, &idx, &offset, D3DDECLTYPE_FLOAT2, D3DDECLUSAGE_TEXCOORD, i); + break; + case D3DFVF_TEXTUREFORMAT3: + append_decl_element(declaration, &idx, &offset, D3DDECLTYPE_FLOAT3, D3DDECLUSAGE_TEXCOORD, i); + break; + case D3DFVF_TEXTUREFORMAT4: + append_decl_element(declaration, &idx, &offset, D3DDECLTYPE_FLOAT4, D3DDECLUSAGE_TEXCOORD, i); + break; + } + } + + declaration[idx] = end_element; + + return D3D_OK; +} + +/************************************************************************* + * D3DXFVFFromDeclarator + */ +HRESULT WINAPI D3DXFVFFromDeclarator(const D3DVERTEXELEMENT9 *declaration, DWORD *fvf) +{ + unsigned int i = 0, texture, offset; + + TRACE("(%p, %p)\n", declaration, fvf); + + *fvf = 0; + if (declaration[0].Type == D3DDECLTYPE_FLOAT3 && declaration[0].Usage == D3DDECLUSAGE_POSITION) + { + if ((declaration[1].Type == D3DDECLTYPE_FLOAT4 && declaration[1].Usage == D3DDECLUSAGE_BLENDWEIGHT && + declaration[1].UsageIndex == 0) && + (declaration[2].Type == D3DDECLTYPE_FLOAT1 && declaration[2].Usage == D3DDECLUSAGE_BLENDINDICES && + declaration[2].UsageIndex == 0)) + { + return D3DERR_INVALIDCALL; + } + else if ((declaration[1].Type == D3DDECLTYPE_UBYTE4 || declaration[1].Type == D3DDECLTYPE_D3DCOLOR) && + declaration[1].Usage == D3DDECLUSAGE_BLENDINDICES && declaration[1].UsageIndex == 0) + { + if (declaration[1].Type == D3DDECLTYPE_UBYTE4) + { + *fvf |= D3DFVF_XYZB1 | D3DFVF_LASTBETA_UBYTE4; + } + else + { + *fvf |= D3DFVF_XYZB1 | D3DFVF_LASTBETA_D3DCOLOR; + } + i = 2; + } + else if (declaration[1].Type <= D3DDECLTYPE_FLOAT4 && declaration[1].Usage == D3DDECLUSAGE_BLENDWEIGHT && + declaration[1].UsageIndex == 0) + { + if ((declaration[2].Type == D3DDECLTYPE_UBYTE4 || declaration[2].Type == D3DDECLTYPE_D3DCOLOR) && + declaration[2].Usage == D3DDECLUSAGE_BLENDINDICES && declaration[2].UsageIndex == 0) + { + if (declaration[2].Type == D3DDECLTYPE_UBYTE4) + { + *fvf |= D3DFVF_LASTBETA_UBYTE4; + } + else + { + *fvf |= D3DFVF_LASTBETA_D3DCOLOR; + } + switch (declaration[1].Type) + { + case D3DDECLTYPE_FLOAT1: *fvf |= D3DFVF_XYZB2; break; + case D3DDECLTYPE_FLOAT2: *fvf |= D3DFVF_XYZB3; break; + case D3DDECLTYPE_FLOAT3: *fvf |= D3DFVF_XYZB4; break; + case D3DDECLTYPE_FLOAT4: *fvf |= D3DFVF_XYZB5; break; + } + i = 3; + } + else + { + switch (declaration[1].Type) + { + case D3DDECLTYPE_FLOAT1: *fvf |= D3DFVF_XYZB1; break; + case D3DDECLTYPE_FLOAT2: *fvf |= D3DFVF_XYZB2; break; + case D3DDECLTYPE_FLOAT3: *fvf |= D3DFVF_XYZB3; break; + case D3DDECLTYPE_FLOAT4: *fvf |= D3DFVF_XYZB4; break; + } + i = 2; + } + } + else + { + *fvf |= D3DFVF_XYZ; + i = 1; + } + } + else if (declaration[0].Type == D3DDECLTYPE_FLOAT4 && declaration[0].Usage == D3DDECLUSAGE_POSITIONT && + declaration[0].UsageIndex == 0) + { + *fvf |= D3DFVF_XYZRHW; + i = 1; + } + + if (declaration[i].Type == D3DDECLTYPE_FLOAT3 && declaration[i].Usage == D3DDECLUSAGE_NORMAL) + { + *fvf |= D3DFVF_NORMAL; + i++; + } + if (declaration[i].Type == D3DDECLTYPE_FLOAT1 && declaration[i].Usage == D3DDECLUSAGE_PSIZE && + declaration[i].UsageIndex == 0) + { + *fvf |= D3DFVF_PSIZE; + i++; + } + if (declaration[i].Type == D3DDECLTYPE_D3DCOLOR && declaration[i].Usage == D3DDECLUSAGE_COLOR && + declaration[i].UsageIndex == 0) + { + *fvf |= D3DFVF_DIFFUSE; + i++; + } + if (declaration[i].Type == D3DDECLTYPE_D3DCOLOR && declaration[i].Usage == D3DDECLUSAGE_COLOR && + declaration[i].UsageIndex == 1) + { + *fvf |= D3DFVF_SPECULAR; + i++; + } + + for (texture = 0; texture < D3DDP_MAXTEXCOORD; i++, texture++) + { + if (declaration[i].Stream == 0xFF) + { + break; + } + else if (declaration[i].Type == D3DDECLTYPE_FLOAT1 && declaration[i].Usage == D3DDECLUSAGE_TEXCOORD && + declaration[i].UsageIndex == texture) + { + *fvf |= D3DFVF_TEXCOORDSIZE1(declaration[i].UsageIndex); + } + else if (declaration[i].Type == D3DDECLTYPE_FLOAT2 && declaration[i].Usage == D3DDECLUSAGE_TEXCOORD && + declaration[i].UsageIndex == texture) + { + *fvf |= D3DFVF_TEXCOORDSIZE2(declaration[i].UsageIndex); + } + else if (declaration[i].Type == D3DDECLTYPE_FLOAT3 && declaration[i].Usage == D3DDECLUSAGE_TEXCOORD && + declaration[i].UsageIndex == texture) + { + *fvf |= D3DFVF_TEXCOORDSIZE3(declaration[i].UsageIndex); + } + else if (declaration[i].Type == D3DDECLTYPE_FLOAT4 && declaration[i].Usage == D3DDECLUSAGE_TEXCOORD && + declaration[i].UsageIndex == texture) + { + *fvf |= D3DFVF_TEXCOORDSIZE4(declaration[i].UsageIndex); + } + else + { + return D3DERR_INVALIDCALL; + } + } + + *fvf |= (texture << D3DFVF_TEXCOUNT_SHIFT); + + for (offset = 0, i = 0; declaration[i].Stream != 0xFF; + offset += d3dx_decltype_size[declaration[i].Type], i++) + { + if (declaration[i].Offset != offset) + { + return D3DERR_INVALIDCALL; + } + } + + return D3D_OK; +} + /************************************************************************* * D3DXGetFVFVertexSize */ @@ -186,7 +2303,7 @@ UINT WINAPI D3DXGetFVFVertexSize(DWORD FVF) UINT i; UINT numTextures = (FVF & D3DFVF_TEXCOUNT_MASK) >> D3DFVF_TEXCOUNT_SHIFT; - if (FVF & D3DFVF_NORMAL) size += sizeof(D3DXVECTOR3); + if (FVF & D3DFVF_NORMAL) size += sizeof(D3DXVECTOR3); if (FVF & D3DFVF_DIFFUSE) size += sizeof(DWORD); if (FVF & D3DFVF_SPECULAR) size += sizeof(DWORD); if (FVF & D3DFVF_PSIZE) size += sizeof(DWORD); @@ -229,37 +2346,35 @@ UINT WINAPI D3DXGetDeclVertexSize(const D3DVERTEXELEMENT9 *decl, DWORD stream_id if (element->Stream != stream_idx) continue; - switch (element->Type) + if (element->Type >= sizeof(d3dx_decltype_size) / sizeof(*d3dx_decltype_size)) { - case D3DDECLTYPE_FLOAT1: type_size = 1 * 4; break; - case D3DDECLTYPE_FLOAT2: type_size = 2 * 4; break; - case D3DDECLTYPE_FLOAT3: type_size = 3 * 4; break; - case D3DDECLTYPE_FLOAT4: type_size = 4 * 4; break; - case D3DDECLTYPE_D3DCOLOR: type_size = 4 * 1; break; - case D3DDECLTYPE_UBYTE4: type_size = 4 * 1; break; - case D3DDECLTYPE_SHORT2: type_size = 2 * 2; break; - case D3DDECLTYPE_SHORT4: type_size = 4 * 2; break; - case D3DDECLTYPE_UBYTE4N: type_size = 4 * 1; break; - case D3DDECLTYPE_SHORT2N: type_size = 2 * 2; break; - case D3DDECLTYPE_SHORT4N: type_size = 4 * 2; break; - case D3DDECLTYPE_USHORT2N: type_size = 2 * 2; break; - case D3DDECLTYPE_USHORT4N: type_size = 4 * 2; break; - case D3DDECLTYPE_UDEC3: type_size = 4; break; /* 3 * 10 bits + 2 padding */ - case D3DDECLTYPE_DEC3N: type_size = 4; break; - case D3DDECLTYPE_FLOAT16_2: type_size = 2 * 2; break; - case D3DDECLTYPE_FLOAT16_4: type_size = 4 * 2; break; - default: - FIXME("Unhandled element type %#x, size will be incorrect.\n", element->Type); - type_size = 0; - break; + FIXME("Unhandled element type %#x, size will be incorrect.\n", element->Type); + continue; } + type_size = d3dx_decltype_size[element->Type]; if (element->Offset + type_size > size) size = element->Offset + type_size; } return size; } +/************************************************************************* + * D3DXGetDeclLength + */ +UINT WINAPI D3DXGetDeclLength(const D3DVERTEXELEMENT9 *decl) +{ + const D3DVERTEXELEMENT9 *element; + + TRACE("decl %p\n", decl); + + /* null decl results in exception on Windows XP */ + + for (element = decl; element->Stream != 0xff; ++element); + + return element - decl; +} + /************************************************************************* * D3DXIntersectTri */ @@ -322,3 +2437,4487 @@ BOOL WINAPI D3DXSphereBoundProbe(CONST D3DXVECTOR3 *pcenter, FLOAT radius, CONST if ( ( d <= 0.0f ) || ( sqrt(d) <= b ) ) return FALSE; return TRUE; } + +/************************************************************************* + * D3DXCreateMesh + */ +HRESULT WINAPI D3DXCreateMesh(DWORD numfaces, DWORD numvertices, DWORD options, + const D3DVERTEXELEMENT9 *declaration, struct IDirect3DDevice9 *device, struct ID3DXMesh **mesh) +{ + HRESULT hr; + DWORD fvf; + IDirect3DVertexDeclaration9 *vertex_declaration; + UINT vertex_declaration_size; + UINT num_elem; + IDirect3DVertexBuffer9 *vertex_buffer; + IDirect3DIndexBuffer9 *index_buffer; + DWORD *attrib_buffer; + ID3DXMeshImpl *object; + DWORD index_usage = 0; + D3DPOOL index_pool = D3DPOOL_DEFAULT; + D3DFORMAT index_format = D3DFMT_INDEX16; + DWORD vertex_usage = 0; + D3DPOOL vertex_pool = D3DPOOL_DEFAULT; + int i; + + TRACE("(%d, %d, %x, %p, %p, %p)\n", numfaces, numvertices, options, declaration, device, mesh); + + if (numfaces == 0 || numvertices == 0 || declaration == NULL || device == NULL || mesh == NULL || + /* D3DXMESH_VB_SHARE is for cloning, and D3DXMESH_USEHWONLY is for ConvertToBlendedMesh */ + (options & (D3DXMESH_VB_SHARE | D3DXMESH_USEHWONLY | 0xfffe0000))) + { + return D3DERR_INVALIDCALL; + } + for (i = 0; declaration[i].Stream != 0xff; i++) + if (declaration[i].Stream != 0) + return D3DERR_INVALIDCALL; + num_elem = i + 1; + + if (options & D3DXMESH_32BIT) + index_format = D3DFMT_INDEX32; + + if (options & D3DXMESH_DONOTCLIP) { + index_usage |= D3DUSAGE_DONOTCLIP; + vertex_usage |= D3DUSAGE_DONOTCLIP; + } + if (options & D3DXMESH_POINTS) { + index_usage |= D3DUSAGE_POINTS; + vertex_usage |= D3DUSAGE_POINTS; + } + if (options & D3DXMESH_RTPATCHES) { + index_usage |= D3DUSAGE_RTPATCHES; + vertex_usage |= D3DUSAGE_RTPATCHES; + } + if (options & D3DXMESH_NPATCHES) { + index_usage |= D3DUSAGE_NPATCHES; + vertex_usage |= D3DUSAGE_NPATCHES; + } + + if (options & D3DXMESH_VB_SYSTEMMEM) + vertex_pool = D3DPOOL_SYSTEMMEM; + else if (options & D3DXMESH_VB_MANAGED) + vertex_pool = D3DPOOL_MANAGED; + + if (options & D3DXMESH_VB_WRITEONLY) + vertex_usage |= D3DUSAGE_WRITEONLY; + if (options & D3DXMESH_VB_DYNAMIC) + vertex_usage |= D3DUSAGE_DYNAMIC; + if (options & D3DXMESH_VB_SOFTWAREPROCESSING) + vertex_usage |= D3DUSAGE_SOFTWAREPROCESSING; + + if (options & D3DXMESH_IB_SYSTEMMEM) + index_pool = D3DPOOL_SYSTEMMEM; + else if (options & D3DXMESH_IB_MANAGED) + index_pool = D3DPOOL_MANAGED; + + if (options & D3DXMESH_IB_WRITEONLY) + index_usage |= D3DUSAGE_WRITEONLY; + if (options & D3DXMESH_IB_DYNAMIC) + index_usage |= D3DUSAGE_DYNAMIC; + if (options & D3DXMESH_IB_SOFTWAREPROCESSING) + index_usage |= D3DUSAGE_SOFTWAREPROCESSING; + + hr = D3DXFVFFromDeclarator(declaration, &fvf); + if (hr != D3D_OK) + { + fvf = 0; + } + + /* Create vertex declaration */ + hr = IDirect3DDevice9_CreateVertexDeclaration(device, + declaration, + &vertex_declaration); + if (FAILED(hr)) + { + WARN("Unexpected return value %x from IDirect3DDevice9_CreateVertexDeclaration.\n",hr); + return hr; + } + vertex_declaration_size = D3DXGetDeclVertexSize(declaration, declaration[0].Stream); + + /* Create vertex buffer */ + hr = IDirect3DDevice9_CreateVertexBuffer(device, + numvertices * vertex_declaration_size, + vertex_usage, + fvf, + vertex_pool, + &vertex_buffer, + NULL); + if (FAILED(hr)) + { + WARN("Unexpected return value %x from IDirect3DDevice9_CreateVertexBuffer.\n",hr); + IDirect3DVertexDeclaration9_Release(vertex_declaration); + return hr; + } + + /* Create index buffer */ + hr = IDirect3DDevice9_CreateIndexBuffer(device, + numfaces * 3 * ((index_format == D3DFMT_INDEX16) ? 2 : 4), + index_usage, + index_format, + index_pool, + &index_buffer, + NULL); + if (FAILED(hr)) + { + WARN("Unexpected return value %x from IDirect3DDevice9_CreateVertexBuffer.\n",hr); + IDirect3DVertexBuffer9_Release(vertex_buffer); + IDirect3DVertexDeclaration9_Release(vertex_declaration); + return hr; + } + + attrib_buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, numfaces * sizeof(*attrib_buffer)); + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ID3DXMeshImpl)); + if (object == NULL || attrib_buffer == NULL) + { + HeapFree(GetProcessHeap(), 0, object); + HeapFree(GetProcessHeap(), 0, attrib_buffer); + IDirect3DIndexBuffer9_Release(index_buffer); + IDirect3DVertexBuffer9_Release(vertex_buffer); + IDirect3DVertexDeclaration9_Release(vertex_declaration); + *mesh = NULL; + return E_OUTOFMEMORY; + } + object->ID3DXMesh_iface.lpVtbl = &D3DXMesh_Vtbl; + object->ref = 1; + + object->numfaces = numfaces; + object->numvertices = numvertices; + object->options = options; + object->fvf = fvf; + object->device = device; + IDirect3DDevice9_AddRef(device); + + copy_declaration(object->cached_declaration, declaration, num_elem); + object->vertex_declaration = vertex_declaration; + object->vertex_declaration_size = vertex_declaration_size; + object->num_elem = num_elem; + object->vertex_buffer = vertex_buffer; + object->index_buffer = index_buffer; + object->attrib_buffer = attrib_buffer; + + *mesh = &object->ID3DXMesh_iface; + + return D3D_OK; +} + +/************************************************************************* + * D3DXCreateMeshFVF + */ +HRESULT WINAPI D3DXCreateMeshFVF(DWORD numfaces, DWORD numvertices, DWORD options, + DWORD fvf, struct IDirect3DDevice9 *device, struct ID3DXMesh **mesh) +{ + HRESULT hr; + D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]; + + TRACE("(%u, %u, %u, %u, %p, %p)\n", numfaces, numvertices, options, fvf, device, mesh); + + hr = D3DXDeclaratorFromFVF(fvf, declaration); + if (FAILED(hr)) return hr; + + return D3DXCreateMesh(numfaces, numvertices, options, declaration, device, mesh); +} + + +struct mesh_data { + DWORD num_vertices; + DWORD num_poly_faces; + DWORD num_tri_faces; + D3DXVECTOR3 *vertices; + DWORD *num_tri_per_face; + DWORD *indices; + + DWORD fvf; + + /* optional mesh data */ + + DWORD num_normals; + D3DXVECTOR3 *normals; + DWORD *normal_indices; + + D3DXVECTOR2 *tex_coords; + + DWORD *vertex_colors; + + DWORD num_materials; + D3DXMATERIAL *materials; + DWORD *material_indices; + + struct ID3DXSkinInfo *skin_info; + DWORD nb_bones; +}; + +static HRESULT parse_texture_filename(ID3DXFileData *filedata, LPSTR *filename_out) +{ + HRESULT hr; + SIZE_T data_size; + BYTE *data; + char *filename_in; + char *filename = NULL; + + /* template TextureFilename { + * STRING filename; + * } + */ + + HeapFree(GetProcessHeap(), 0, *filename_out); + *filename_out = NULL; + + hr = filedata->lpVtbl->Lock(filedata, &data_size, (const void**)&data); + if (FAILED(hr)) return hr; + + /* FIXME: String must be retrieved directly instead of through a pointer once ID3DXFILE is fixed */ + if (data_size < sizeof(LPSTR)) { + WARN("truncated data (%lu bytes)\n", data_size); + filedata->lpVtbl->Unlock(filedata); + return E_FAIL; + } + filename_in = *(LPSTR*)data; + + filename = HeapAlloc(GetProcessHeap(), 0, strlen(filename_in) + 1); + if (!filename) { + filedata->lpVtbl->Unlock(filedata); + return E_OUTOFMEMORY; + } + + strcpy(filename, filename_in); + *filename_out = filename; + + filedata->lpVtbl->Unlock(filedata); + + return D3D_OK; +} + +static HRESULT parse_material(ID3DXFileData *filedata, D3DXMATERIAL *material) +{ + HRESULT hr; + SIZE_T data_size; + const BYTE *data; + GUID type; + ID3DXFileData *child; + SIZE_T nb_children; + int i; + + material->pTextureFilename = NULL; + + hr = filedata->lpVtbl->Lock(filedata, &data_size, (const void**)&data); + if (FAILED(hr)) return hr; + + /* + * template ColorRGBA { + * FLOAT red; + * FLOAT green; + * FLOAT blue; + * FLOAT alpha; + * } + * template ColorRGB { + * FLOAT red; + * FLOAT green; + * FLOAT blue; + * } + * template Material { + * ColorRGBA faceColor; + * FLOAT power; + * ColorRGB specularColor; + * ColorRGB emissiveColor; + * [ ... ] + * } + */ + if (data_size != sizeof(FLOAT) * 11) { + WARN("incorrect data size (%ld bytes)\n", data_size); + filedata->lpVtbl->Unlock(filedata); + return E_FAIL; + } + + memcpy(&material->MatD3D.Diffuse, data, sizeof(D3DCOLORVALUE)); + data += sizeof(D3DCOLORVALUE); + material->MatD3D.Power = *(FLOAT*)data; + data += sizeof(FLOAT); + memcpy(&material->MatD3D.Specular, data, sizeof(FLOAT) * 3); + material->MatD3D.Specular.a = 1.0f; + data += 3 * sizeof(FLOAT); + memcpy(&material->MatD3D.Emissive, data, sizeof(FLOAT) * 3); + material->MatD3D.Emissive.a = 1.0f; + material->MatD3D.Ambient.r = 0.0f; + material->MatD3D.Ambient.g = 0.0f; + material->MatD3D.Ambient.b = 0.0f; + material->MatD3D.Ambient.a = 1.0f; + + filedata->lpVtbl->Unlock(filedata); + + hr = filedata->lpVtbl->GetChildren(filedata, &nb_children); + if (FAILED(hr)) + return hr; + + for (i = 0; i < nb_children; i++) + { + hr = filedata->lpVtbl->GetChild(filedata, i, &child); + if (FAILED(hr)) + return hr; + hr = child->lpVtbl->GetType(child, &type); + if (FAILED(hr)) + return hr; + + if (IsEqualGUID(&type, &TID_D3DRMTextureFilename)) { + hr = parse_texture_filename(child, &material->pTextureFilename); + if (FAILED(hr)) + return hr; + } + } + + return D3D_OK; +} + +static void destroy_materials(struct mesh_data *mesh) +{ + DWORD i; + for (i = 0; i < mesh->num_materials; i++) + HeapFree(GetProcessHeap(), 0, mesh->materials[i].pTextureFilename); + HeapFree(GetProcessHeap(), 0, mesh->materials); + HeapFree(GetProcessHeap(), 0, mesh->material_indices); + mesh->num_materials = 0; + mesh->materials = NULL; + mesh->material_indices = NULL; +} + +static HRESULT parse_material_list(ID3DXFileData *filedata, struct mesh_data *mesh) +{ + HRESULT hr; + SIZE_T data_size; + const DWORD *data, *in_ptr; + GUID type; + ID3DXFileData *child; + DWORD num_materials; + DWORD i; + SIZE_T nb_children; + + destroy_materials(mesh); + + hr = filedata->lpVtbl->Lock(filedata, &data_size, (const void**)&data); + if (FAILED(hr)) return hr; + + /* template MeshMaterialList { + * DWORD nMaterials; + * DWORD nFaceIndexes; + * array DWORD faceIndexes[nFaceIndexes]; + * [ Material ] + * } + */ + + in_ptr = data; + hr = E_FAIL; + + if (data_size < sizeof(DWORD)) { + WARN("truncated data (%ld bytes)\n", data_size); + goto end; + } + num_materials = *in_ptr++; + if (!num_materials) { + hr = D3D_OK; + goto end; + } + + if (data_size < 2 * sizeof(DWORD)) { + WARN("truncated data (%ld bytes)\n", data_size); + goto end; + } + if (*in_ptr++ != mesh->num_poly_faces) { + WARN("number of material face indices (%u) doesn't match number of faces (%u)\n", + *(in_ptr - 1), mesh->num_poly_faces); + goto end; + } + if (data_size < 2 * sizeof(DWORD) + mesh->num_poly_faces * sizeof(DWORD)) { + WARN("truncated data (%ld bytes)\n", data_size); + goto end; + } + for (i = 0; i < mesh->num_poly_faces; i++) { + if (*in_ptr++ >= num_materials) { + WARN("face %u: reference to undefined material %u (only %u materials)\n", + i, *(in_ptr - 1), num_materials); + goto end; + } + } + + mesh->materials = HeapAlloc(GetProcessHeap(), 0, num_materials * sizeof(*mesh->materials)); + mesh->material_indices = HeapAlloc(GetProcessHeap(), 0, mesh->num_poly_faces * sizeof(*mesh->material_indices)); + if (!mesh->materials || !mesh->material_indices) { + hr = E_OUTOFMEMORY; + goto end; + } + memcpy(mesh->material_indices, data + 2, mesh->num_poly_faces * sizeof(DWORD)); + + hr = filedata->lpVtbl->GetChildren(filedata, &nb_children); + if (FAILED(hr)) + goto end; + + for (i = 0; i < nb_children; i++) + { + hr = filedata->lpVtbl->GetChild(filedata, i, &child); + if (FAILED(hr)) + goto end; + hr = child->lpVtbl->GetType(child, &type); + if (FAILED(hr)) + goto end; + + if (IsEqualGUID(&type, &TID_D3DRMMaterial)) { + if (mesh->num_materials >= num_materials) { + WARN("more materials defined than declared\n"); + hr = E_FAIL; + goto end; + } + hr = parse_material(child, &mesh->materials[mesh->num_materials++]); + if (FAILED(hr)) + goto end; + } + } + if (num_materials != mesh->num_materials) { + WARN("only %u of %u materials defined\n", num_materials, mesh->num_materials); + hr = E_FAIL; + } + +end: + filedata->lpVtbl->Unlock(filedata); + return hr; +} + +static HRESULT parse_texture_coords(ID3DXFileData *filedata, struct mesh_data *mesh) +{ + HRESULT hr; + SIZE_T data_size; + const BYTE *data; + + HeapFree(GetProcessHeap(), 0, mesh->tex_coords); + mesh->tex_coords = NULL; + + hr = filedata->lpVtbl->Lock(filedata, &data_size, (const void**)&data); + if (FAILED(hr)) return hr; + + /* template Coords2d { + * FLOAT u; + * FLOAT v; + * } + * template MeshTextureCoords { + * DWORD nTextureCoords; + * array Coords2d textureCoords[nTextureCoords]; + * } + */ + + hr = E_FAIL; + + if (data_size < sizeof(DWORD)) { + WARN("truncated data (%ld bytes)\n", data_size); + goto end; + } + if (*(DWORD*)data != mesh->num_vertices) { + WARN("number of texture coordinates (%u) doesn't match number of vertices (%u)\n", + *(DWORD*)data, mesh->num_vertices); + goto end; + } + data += sizeof(DWORD); + if (data_size < sizeof(DWORD) + mesh->num_vertices * sizeof(*mesh->tex_coords)) { + WARN("truncated data (%ld bytes)\n", data_size); + goto end; + } + + mesh->tex_coords = HeapAlloc(GetProcessHeap(), 0, mesh->num_vertices * sizeof(*mesh->tex_coords)); + if (!mesh->tex_coords) { + hr = E_OUTOFMEMORY; + goto end; + } + memcpy(mesh->tex_coords, data, mesh->num_vertices * sizeof(*mesh->tex_coords)); + + mesh->fvf |= D3DFVF_TEX1; + + hr = D3D_OK; + +end: + filedata->lpVtbl->Unlock(filedata); + return hr; +} + +static HRESULT parse_vertex_colors(ID3DXFileData *filedata, struct mesh_data *mesh) +{ + HRESULT hr; + SIZE_T data_size; + const BYTE *data; + DWORD num_colors; + DWORD i; + + HeapFree(GetProcessHeap(), 0, mesh->vertex_colors); + mesh->vertex_colors = NULL; + + hr = filedata->lpVtbl->Lock(filedata, &data_size, (const void**)&data); + if (FAILED(hr)) return hr; + + /* template IndexedColor { + * DWORD index; + * ColorRGBA indexColor; + * } + * template MeshVertexColors { + * DWORD nVertexColors; + * array IndexedColor vertexColors[nVertexColors]; + * } + */ + + hr = E_FAIL; + + if (data_size < sizeof(DWORD)) { + WARN("truncated data (%ld bytes)\n", data_size); + goto end; + } + num_colors = *(DWORD*)data; + data += sizeof(DWORD); + if (data_size < sizeof(DWORD) + num_colors * (sizeof(DWORD) + sizeof(D3DCOLORVALUE))) { + WARN("truncated data (%ld bytes)\n", data_size); + goto end; + } + + mesh->vertex_colors = HeapAlloc(GetProcessHeap(), 0, mesh->num_vertices * sizeof(DWORD)); + if (!mesh->vertex_colors) { + hr = E_OUTOFMEMORY; + goto end; + } + + for (i = 0; i < mesh->num_vertices; i++) + mesh->vertex_colors[i] = D3DCOLOR_ARGB(0, 0xff, 0xff, 0xff); + for (i = 0; i < num_colors; i++) + { + D3DCOLORVALUE color; + DWORD index = *(DWORD*)data; + data += sizeof(DWORD); + if (index >= mesh->num_vertices) { + WARN("vertex color %u references undefined vertex %u (only %u vertices)\n", + i, index, mesh->num_vertices); + goto end; + } + memcpy(&color, data, sizeof(color)); + data += sizeof(color); + color.r = min(1.0f, max(0.0f, color.r)); + color.g = min(1.0f, max(0.0f, color.g)); + color.b = min(1.0f, max(0.0f, color.b)); + color.a = min(1.0f, max(0.0f, color.a)); + mesh->vertex_colors[index] = D3DCOLOR_ARGB((BYTE)(color.a * 255.0f + 0.5f), + (BYTE)(color.r * 255.0f + 0.5f), + (BYTE)(color.g * 255.0f + 0.5f), + (BYTE)(color.b * 255.0f + 0.5f)); + } + + mesh->fvf |= D3DFVF_DIFFUSE; + + hr = D3D_OK; + +end: + filedata->lpVtbl->Unlock(filedata); + return hr; +} + +static HRESULT parse_normals(ID3DXFileData *filedata, struct mesh_data *mesh) +{ + HRESULT hr; + SIZE_T data_size; + const BYTE *data; + DWORD *index_out_ptr; + DWORD i; + DWORD num_face_indices = mesh->num_poly_faces * 2 + mesh->num_tri_faces; + + HeapFree(GetProcessHeap(), 0, mesh->normals); + mesh->num_normals = 0; + mesh->normals = NULL; + mesh->normal_indices = NULL; + mesh->fvf |= D3DFVF_NORMAL; + + hr = filedata->lpVtbl->Lock(filedata, &data_size, (const void**)&data); + if (FAILED(hr)) return hr; + + /* template Vector { + * FLOAT x; + * FLOAT y; + * FLOAT z; + * } + * template MeshFace { + * DWORD nFaceVertexIndices; + * array DWORD faceVertexIndices[nFaceVertexIndices]; + * } + * template MeshNormals { + * DWORD nNormals; + * array Vector normals[nNormals]; + * DWORD nFaceNormals; + * array MeshFace faceNormals[nFaceNormals]; + * } + */ + + hr = E_FAIL; + + if (data_size < sizeof(DWORD) * 2) { + WARN("truncated data (%ld bytes)\n", data_size); + goto end; + } + mesh->num_normals = *(DWORD*)data; + data += sizeof(DWORD); + if (data_size < sizeof(DWORD) * 2 + mesh->num_normals * sizeof(D3DXVECTOR3) + + num_face_indices * sizeof(DWORD)) { + WARN("truncated data (%ld bytes)\n", data_size); + goto end; + } + + mesh->normals = HeapAlloc(GetProcessHeap(), 0, mesh->num_normals * sizeof(D3DXVECTOR3)); + mesh->normal_indices = HeapAlloc(GetProcessHeap(), 0, num_face_indices * sizeof(DWORD)); + if (!mesh->normals || !mesh->normal_indices) { + hr = E_OUTOFMEMORY; + goto end; + } + + memcpy(mesh->normals, data, mesh->num_normals * sizeof(D3DXVECTOR3)); + data += mesh->num_normals * sizeof(D3DXVECTOR3); + for (i = 0; i < mesh->num_normals; i++) + D3DXVec3Normalize(&mesh->normals[i], &mesh->normals[i]); + + if (*(DWORD*)data != mesh->num_poly_faces) { + WARN("number of face normals (%u) doesn't match number of faces (%u)\n", + *(DWORD*)data, mesh->num_poly_faces); + goto end; + } + data += sizeof(DWORD); + index_out_ptr = mesh->normal_indices; + for (i = 0; i < mesh->num_poly_faces; i++) + { + DWORD j; + DWORD count = *(DWORD*)data; + if (count != mesh->num_tri_per_face[i] + 2) { + WARN("face %u: number of normals (%u) doesn't match number of vertices (%u)\n", + i, count, mesh->num_tri_per_face[i] + 2); + goto end; + } + data += sizeof(DWORD); + + for (j = 0; j < count; j++) { + DWORD normal_index = *(DWORD*)data; + if (normal_index >= mesh->num_normals) { + WARN("face %u, normal index %u: reference to undefined normal %u (only %u normals)\n", + i, j, normal_index, mesh->num_normals); + goto end; + } + *index_out_ptr++ = normal_index; + data += sizeof(DWORD); + } + } + + hr = D3D_OK; + +end: + filedata->lpVtbl->Unlock(filedata); + return hr; +} + +static HRESULT parse_skin_mesh_info(ID3DXFileData *filedata, struct mesh_data *mesh_data, DWORD index) +{ + HRESULT hr; + SIZE_T data_size; + const BYTE *data; + + TRACE("(%p, %p, %u)\n", filedata, mesh_data, index); + + hr = filedata->lpVtbl->Lock(filedata, &data_size, (const void**)&data); + if (FAILED(hr)) return hr; + + hr = E_FAIL; + + if (!mesh_data->skin_info) { + if (data_size < sizeof(WORD) * 3) { + WARN("truncated data (%ld bytes)\n", data_size); + goto end; + } + /* Skip nMaxSkinWeightsPerVertex and nMaxSkinWeightsPerFace */ + data += 2 * sizeof(WORD); + mesh_data->nb_bones = *(WORD*)data; + hr = D3DXCreateSkinInfoFVF(mesh_data->num_vertices, mesh_data->fvf, mesh_data->nb_bones, &mesh_data->skin_info); + } else { + const char *name; + DWORD nb_influences; + + /* FIXME: String must be retrieved directly instead of through a pointer once ID3DXFILE is fixed */ + name = *(const char**)data; + data += sizeof(char*); + + nb_influences = *(DWORD*)data; + data += sizeof(DWORD); + + if (data_size < (sizeof(char*) + sizeof(DWORD) + nb_influences * (sizeof(DWORD) + sizeof(FLOAT)) + 16 * sizeof(FLOAT))) { + WARN("truncated data (%ld bytes)\n", data_size); + goto end; + } + + hr = mesh_data->skin_info->lpVtbl->SetBoneName(mesh_data->skin_info, index, name); + if (SUCCEEDED(hr)) + hr = mesh_data->skin_info->lpVtbl->SetBoneInfluence(mesh_data->skin_info, index, nb_influences, + (const DWORD*)data, (const FLOAT*)(data + nb_influences * sizeof(DWORD))); + if (SUCCEEDED(hr)) + hr = mesh_data->skin_info->lpVtbl->SetBoneOffsetMatrix(mesh_data->skin_info, index, + (const D3DMATRIX*)(data + nb_influences * (sizeof(DWORD) + sizeof(FLOAT)))); + } + +end: + filedata->lpVtbl->Unlock(filedata); + return hr; +} + +/* for provide_flags parameters */ +#define PROVIDE_MATERIALS 0x1 +#define PROVIDE_SKININFO 0x2 +#define PROVIDE_ADJACENCY 0x4 + +static HRESULT parse_mesh(ID3DXFileData *filedata, struct mesh_data *mesh_data, DWORD provide_flags) +{ + HRESULT hr; + SIZE_T data_size; + const BYTE *data, *in_ptr; + DWORD *index_out_ptr; + GUID type; + ID3DXFileData *child; + DWORD i; + SIZE_T nb_children; + DWORD nb_skin_weigths_info = 0; + + /* + * template Mesh { + * DWORD nVertices; + * array Vector vertices[nVertices]; + * DWORD nFaces; + * array MeshFace faces[nFaces]; + * [ ... ] + * } + */ + + hr = filedata->lpVtbl->Lock(filedata, &data_size, (const void**)&data); + if (FAILED(hr)) return hr; + + in_ptr = data; + hr = E_FAIL; + + if (data_size < sizeof(DWORD) * 2) { + WARN("truncated data (%ld bytes)\n", data_size); + goto end; + } + mesh_data->num_vertices = *(DWORD*)in_ptr; + if (data_size < sizeof(DWORD) * 2 + mesh_data->num_vertices * sizeof(D3DXVECTOR3)) { + WARN("truncated data (%ld bytes)\n", data_size); + goto end; + } + in_ptr += sizeof(DWORD) + mesh_data->num_vertices * sizeof(D3DXVECTOR3); + + mesh_data->num_poly_faces = *(DWORD*)in_ptr; + in_ptr += sizeof(DWORD); + + mesh_data->num_tri_faces = 0; + for (i = 0; i < mesh_data->num_poly_faces; i++) + { + DWORD num_poly_vertices; + DWORD j; + + if (data_size - (in_ptr - data) < sizeof(DWORD)) { + WARN("truncated data (%ld bytes)\n", data_size); + goto end; + } + num_poly_vertices = *(DWORD*)in_ptr; + in_ptr += sizeof(DWORD); + if (data_size - (in_ptr - data) < num_poly_vertices * sizeof(DWORD)) { + WARN("truncated data (%ld bytes)\n", data_size); + goto end; + } + if (num_poly_vertices < 3) { + WARN("face %u has only %u vertices\n", i, num_poly_vertices); + goto end; + } + for (j = 0; j < num_poly_vertices; j++) { + if (*(DWORD*)in_ptr >= mesh_data->num_vertices) { + WARN("face %u, index %u: undefined vertex %u (only %u vertices)\n", + i, j, *(DWORD*)in_ptr, mesh_data->num_vertices); + goto end; + } + in_ptr += sizeof(DWORD); + } + mesh_data->num_tri_faces += num_poly_vertices - 2; + } + + mesh_data->fvf = D3DFVF_XYZ; + + mesh_data->vertices = HeapAlloc(GetProcessHeap(), 0, + mesh_data->num_vertices * sizeof(*mesh_data->vertices)); + mesh_data->num_tri_per_face = HeapAlloc(GetProcessHeap(), 0, + mesh_data->num_poly_faces * sizeof(*mesh_data->num_tri_per_face)); + mesh_data->indices = HeapAlloc(GetProcessHeap(), 0, + (mesh_data->num_tri_faces + mesh_data->num_poly_faces * 2) * sizeof(*mesh_data->indices)); + if (!mesh_data->vertices || !mesh_data->num_tri_per_face || !mesh_data->indices) { + hr = E_OUTOFMEMORY; + goto end; + } + + in_ptr = data + sizeof(DWORD); + memcpy(mesh_data->vertices, in_ptr, mesh_data->num_vertices * sizeof(D3DXVECTOR3)); + in_ptr += mesh_data->num_vertices * sizeof(D3DXVECTOR3) + sizeof(DWORD); + + index_out_ptr = mesh_data->indices; + for (i = 0; i < mesh_data->num_poly_faces; i++) + { + DWORD count; + + count = *(DWORD*)in_ptr; + in_ptr += sizeof(DWORD); + mesh_data->num_tri_per_face[i] = count - 2; + + while (count--) { + *index_out_ptr++ = *(DWORD*)in_ptr; + in_ptr += sizeof(DWORD); + } + } + + hr = filedata->lpVtbl->GetChildren(filedata, &nb_children); + if (FAILED(hr)) + goto end; + + for (i = 0; i < nb_children; i++) + { + hr = filedata->lpVtbl->GetChild(filedata, i, &child); + if (FAILED(hr)) + goto end; + hr = child->lpVtbl->GetType(child, &type); + if (FAILED(hr)) + goto end; + + if (IsEqualGUID(&type, &TID_D3DRMMeshNormals)) { + hr = parse_normals(child, mesh_data); + } else if (IsEqualGUID(&type, &TID_D3DRMMeshVertexColors)) { + hr = parse_vertex_colors(child, mesh_data); + } else if (IsEqualGUID(&type, &TID_D3DRMMeshTextureCoords)) { + hr = parse_texture_coords(child, mesh_data); + hr = filedata->lpVtbl->GetChild(filedata, i, &child); + if (FAILED(hr)) + goto end; + } else if (IsEqualGUID(&type, &TID_D3DRMMeshMaterialList) && + (provide_flags & PROVIDE_MATERIALS)) + { + hr = parse_material_list(child, mesh_data); + } else if (provide_flags & PROVIDE_SKININFO) { + if (IsEqualGUID(&type, &DXFILEOBJ_XSkinMeshHeader)) { + if (mesh_data->skin_info) { + WARN("Skin mesh header already encountered\n"); + hr = E_FAIL; + goto end; + } + hr = parse_skin_mesh_info(child, mesh_data, 0); + if (FAILED(hr)) + goto end; + } else if (IsEqualGUID(&type, &DXFILEOBJ_SkinWeights)) { + if (!mesh_data->skin_info) { + WARN("Skin weigths found but skin mesh header not encountered yet\n"); + hr = E_FAIL; + goto end; + } + hr = parse_skin_mesh_info(child, mesh_data, nb_skin_weigths_info); + if (FAILED(hr)) + goto end; + nb_skin_weigths_info++; + } + } + if (FAILED(hr)) + goto end; + } + + if (mesh_data->skin_info && (nb_skin_weigths_info != mesh_data->nb_bones)) { + WARN("Mismatch between nb skin weights info %u encountered and nb bones %u from skin mesh header\n", + nb_skin_weigths_info, mesh_data->nb_bones); + hr = E_FAIL; + goto end; + } + + hr = D3D_OK; + +end: + filedata->lpVtbl->Unlock(filedata); + return hr; +} + +static HRESULT generate_effects(ID3DXBuffer *materials, DWORD num_materials, + ID3DXBuffer **effects) +{ + HRESULT hr; + D3DXEFFECTINSTANCE *effect_ptr; + BYTE *out_ptr; + const D3DXMATERIAL *material_ptr = ID3DXBuffer_GetBufferPointer(materials); + static const struct { + const char *param_name; + DWORD name_size; + DWORD num_bytes; + DWORD value_offset; + } material_effects[] = { +#define EFFECT_TABLE_ENTRY(str, field) \ + {str, sizeof(str), sizeof(material_ptr->MatD3D.field), offsetof(D3DXMATERIAL, MatD3D.field)} + EFFECT_TABLE_ENTRY("Diffuse", Diffuse), + EFFECT_TABLE_ENTRY("Power", Power), + EFFECT_TABLE_ENTRY("Specular", Specular), + EFFECT_TABLE_ENTRY("Emissive", Emissive), + EFFECT_TABLE_ENTRY("Ambient", Ambient), +#undef EFFECT_TABLE_ENTRY + }; + static const char texture_paramname[] = "Texture0@Name"; + DWORD buffer_size; + DWORD i; + + /* effects buffer layout: + * + * D3DXEFFECTINSTANCE effects[num_materials]; + * for (effect in effects) + * { + * D3DXEFFECTDEFAULT defaults[effect.NumDefaults]; + * for (default in defaults) + * { + * *default.pParamName; + * *default.pValue; + * } + * } + */ + buffer_size = sizeof(D3DXEFFECTINSTANCE); + buffer_size += sizeof(D3DXEFFECTDEFAULT) * ARRAY_SIZE(material_effects); + for (i = 0; i < ARRAY_SIZE(material_effects); i++) { + buffer_size += material_effects[i].name_size; + buffer_size += material_effects[i].num_bytes; + } + buffer_size *= num_materials; + for (i = 0; i < num_materials; i++) { + if (material_ptr[i].pTextureFilename) { + buffer_size += sizeof(D3DXEFFECTDEFAULT); + buffer_size += sizeof(texture_paramname); + buffer_size += strlen(material_ptr[i].pTextureFilename) + 1; + } + } + + hr = D3DXCreateBuffer(buffer_size, effects); + if (FAILED(hr)) return hr; + effect_ptr = ID3DXBuffer_GetBufferPointer(*effects); + out_ptr = (BYTE*)(effect_ptr + num_materials); + + for (i = 0; i < num_materials; i++) + { + DWORD j; + D3DXEFFECTDEFAULT *defaults = (D3DXEFFECTDEFAULT*)out_ptr; + + effect_ptr->pDefaults = defaults; + effect_ptr->NumDefaults = material_ptr->pTextureFilename ? 6 : 5; + out_ptr = (BYTE*)(effect_ptr->pDefaults + effect_ptr->NumDefaults); + + for (j = 0; j < ARRAY_SIZE(material_effects); j++) + { + defaults->pParamName = (LPSTR)out_ptr; + strcpy(defaults->pParamName, material_effects[j].param_name); + defaults->pValue = defaults->pParamName + material_effects[j].name_size; + defaults->Type = D3DXEDT_FLOATS; + defaults->NumBytes = material_effects[j].num_bytes; + memcpy(defaults->pValue, (BYTE*)material_ptr + material_effects[j].value_offset, defaults->NumBytes); + out_ptr = (BYTE*)defaults->pValue + defaults->NumBytes; + defaults++; + } + + if (material_ptr->pTextureFilename) { + defaults->pParamName = (LPSTR)out_ptr; + strcpy(defaults->pParamName, texture_paramname); + defaults->pValue = defaults->pParamName + sizeof(texture_paramname); + defaults->Type = D3DXEDT_STRING; + defaults->NumBytes = strlen(material_ptr->pTextureFilename) + 1; + strcpy(defaults->pValue, material_ptr->pTextureFilename); + out_ptr = (BYTE*)defaults->pValue + defaults->NumBytes; + } + material_ptr++; + effect_ptr++; + } + assert(out_ptr - (BYTE*)ID3DXBuffer_GetBufferPointer(*effects) == buffer_size); + + return D3D_OK; +} + +HRESULT WINAPI D3DXLoadSkinMeshFromXof(struct ID3DXFileData *filedata, DWORD options, + struct IDirect3DDevice9 *device, struct ID3DXBuffer **adjacency_out, struct ID3DXBuffer **materials_out, + struct ID3DXBuffer **effects_out, DWORD *num_materials_out, struct ID3DXSkinInfo **skin_info_out, + struct ID3DXMesh **mesh_out) +{ + HRESULT hr; + DWORD *index_in_ptr; + struct mesh_data mesh_data; + DWORD total_vertices; + ID3DXMesh *d3dxmesh = NULL; + ID3DXBuffer *adjacency = NULL; + ID3DXBuffer *materials = NULL; + ID3DXBuffer *effects = NULL; + struct vertex_duplication { + DWORD normal_index; + struct list entry; + } *duplications = NULL; + DWORD i; + void *vertices = NULL; + void *indices = NULL; + BYTE *out_ptr; + DWORD provide_flags = 0; + + TRACE("(%p, %x, %p, %p, %p, %p, %p, %p, %p)\n", filedata, options, device, adjacency_out, materials_out, + effects_out, num_materials_out, skin_info_out, mesh_out); + + ZeroMemory(&mesh_data, sizeof(mesh_data)); + + if (num_materials_out || materials_out || effects_out) + provide_flags |= PROVIDE_MATERIALS; + if (skin_info_out) + provide_flags |= PROVIDE_SKININFO; + + hr = parse_mesh(filedata, &mesh_data, provide_flags); + if (FAILED(hr)) goto cleanup; + + total_vertices = mesh_data.num_vertices; + if (mesh_data.fvf & D3DFVF_NORMAL) { + /* duplicate vertices with multiple normals */ + DWORD num_face_indices = mesh_data.num_poly_faces * 2 + mesh_data.num_tri_faces; + duplications = HeapAlloc(GetProcessHeap(), 0, (mesh_data.num_vertices + num_face_indices) * sizeof(*duplications)); + if (!duplications) { + hr = E_OUTOFMEMORY; + goto cleanup; + } + for (i = 0; i < total_vertices; i++) + { + duplications[i].normal_index = -1; + list_init(&duplications[i].entry); + } + for (i = 0; i < num_face_indices; i++) { + DWORD vertex_index = mesh_data.indices[i]; + DWORD normal_index = mesh_data.normal_indices[i]; + struct vertex_duplication *dup_ptr = &duplications[vertex_index]; + + if (dup_ptr->normal_index == -1) { + dup_ptr->normal_index = normal_index; + } else { + D3DXVECTOR3 *new_normal = &mesh_data.normals[normal_index]; + struct list *dup_list = &dup_ptr->entry; + while (TRUE) { + D3DXVECTOR3 *cur_normal = &mesh_data.normals[dup_ptr->normal_index]; + if (new_normal->x == cur_normal->x && + new_normal->y == cur_normal->y && + new_normal->z == cur_normal->z) + { + mesh_data.indices[i] = dup_ptr - duplications; + break; + } else if (!list_next(dup_list, &dup_ptr->entry)) { + dup_ptr = &duplications[total_vertices++]; + dup_ptr->normal_index = normal_index; + list_add_tail(dup_list, &dup_ptr->entry); + mesh_data.indices[i] = dup_ptr - duplications; + break; + } else { + dup_ptr = LIST_ENTRY(list_next(dup_list, &dup_ptr->entry), + struct vertex_duplication, entry); + } + } + } + } + } + + hr = D3DXCreateMeshFVF(mesh_data.num_tri_faces, total_vertices, options, mesh_data.fvf, device, &d3dxmesh); + if (FAILED(hr)) goto cleanup; + + hr = d3dxmesh->lpVtbl->LockVertexBuffer(d3dxmesh, 0, &vertices); + if (FAILED(hr)) goto cleanup; + + out_ptr = vertices; + for (i = 0; i < mesh_data.num_vertices; i++) { + *(D3DXVECTOR3*)out_ptr = mesh_data.vertices[i]; + out_ptr += sizeof(D3DXVECTOR3); + if (mesh_data.fvf & D3DFVF_NORMAL) { + if (duplications[i].normal_index == -1) + ZeroMemory(out_ptr, sizeof(D3DXVECTOR3)); + else + *(D3DXVECTOR3*)out_ptr = mesh_data.normals[duplications[i].normal_index]; + out_ptr += sizeof(D3DXVECTOR3); + } + if (mesh_data.fvf & D3DFVF_DIFFUSE) { + *(DWORD*)out_ptr = mesh_data.vertex_colors[i]; + out_ptr += sizeof(DWORD); + } + if (mesh_data.fvf & D3DFVF_TEX1) { + *(D3DXVECTOR2*)out_ptr = mesh_data.tex_coords[i]; + out_ptr += sizeof(D3DXVECTOR2); + } + } + if (mesh_data.fvf & D3DFVF_NORMAL) { + DWORD vertex_size = D3DXGetFVFVertexSize(mesh_data.fvf); + out_ptr = vertices; + for (i = 0; i < mesh_data.num_vertices; i++) { + struct vertex_duplication *dup_ptr; + LIST_FOR_EACH_ENTRY(dup_ptr, &duplications[i].entry, struct vertex_duplication, entry) + { + int j = dup_ptr - duplications; + BYTE *dest_vertex = (BYTE*)vertices + j * vertex_size; + + memcpy(dest_vertex, out_ptr, vertex_size); + dest_vertex += sizeof(D3DXVECTOR3); + *(D3DXVECTOR3*)dest_vertex = mesh_data.normals[dup_ptr->normal_index]; + } + out_ptr += vertex_size; + } + } + d3dxmesh->lpVtbl->UnlockVertexBuffer(d3dxmesh); + + hr = d3dxmesh->lpVtbl->LockIndexBuffer(d3dxmesh, 0, &indices); + if (FAILED(hr)) goto cleanup; + + index_in_ptr = mesh_data.indices; +#define FILL_INDEX_BUFFER(indices_var) \ + for (i = 0; i < mesh_data.num_poly_faces; i++) \ + { \ + DWORD count = mesh_data.num_tri_per_face[i]; \ + WORD first_index = *index_in_ptr++; \ + while (count--) { \ + *indices_var++ = first_index; \ + *indices_var++ = *index_in_ptr; \ + index_in_ptr++; \ + *indices_var++ = *index_in_ptr; \ + } \ + index_in_ptr++; \ + } + if (options & D3DXMESH_32BIT) { + DWORD *dword_indices = indices; + FILL_INDEX_BUFFER(dword_indices) + } else { + WORD *word_indices = indices; + FILL_INDEX_BUFFER(word_indices) + } +#undef FILL_INDEX_BUFFER + d3dxmesh->lpVtbl->UnlockIndexBuffer(d3dxmesh); + + if (mesh_data.material_indices) { + DWORD *attrib_buffer = NULL; + hr = d3dxmesh->lpVtbl->LockAttributeBuffer(d3dxmesh, 0, &attrib_buffer); + if (FAILED(hr)) goto cleanup; + for (i = 0; i < mesh_data.num_poly_faces; i++) + { + DWORD count = mesh_data.num_tri_per_face[i]; + while (count--) + *attrib_buffer++ = mesh_data.material_indices[i]; + } + d3dxmesh->lpVtbl->UnlockAttributeBuffer(d3dxmesh); + + hr = d3dxmesh->lpVtbl->OptimizeInplace(d3dxmesh, + D3DXMESHOPT_ATTRSORT | D3DXMESHOPT_IGNOREVERTS | D3DXMESHOPT_DONOTSPLIT, + NULL, NULL, NULL, NULL); + if (FAILED(hr)) goto cleanup; + } + + if (mesh_data.num_materials && (materials_out || effects_out)) { + DWORD buffer_size = mesh_data.num_materials * sizeof(D3DXMATERIAL); + char *strings_out_ptr; + D3DXMATERIAL *materials_ptr; + + for (i = 0; i < mesh_data.num_materials; i++) { + if (mesh_data.materials[i].pTextureFilename) + buffer_size += strlen(mesh_data.materials[i].pTextureFilename) + 1; + } + + hr = D3DXCreateBuffer(buffer_size, &materials); + if (FAILED(hr)) goto cleanup; + + materials_ptr = ID3DXBuffer_GetBufferPointer(materials); + memcpy(materials_ptr, mesh_data.materials, mesh_data.num_materials * sizeof(D3DXMATERIAL)); + strings_out_ptr = (char*)(materials_ptr + mesh_data.num_materials); + for (i = 0; i < mesh_data.num_materials; i++) { + if (materials_ptr[i].pTextureFilename) { + strcpy(strings_out_ptr, mesh_data.materials[i].pTextureFilename); + materials_ptr[i].pTextureFilename = strings_out_ptr; + strings_out_ptr += strlen(mesh_data.materials[i].pTextureFilename) + 1; + } + } + } + + if (mesh_data.num_materials && effects_out) { + hr = generate_effects(materials, mesh_data.num_materials, &effects); + if (FAILED(hr)) goto cleanup; + + if (!materials_out) { + ID3DXBuffer_Release(materials); + materials = NULL; + } + } + + if (adjacency_out) { + hr = D3DXCreateBuffer(mesh_data.num_tri_faces * 3 * sizeof(DWORD), &adjacency); + if (FAILED(hr)) goto cleanup; + hr = d3dxmesh->lpVtbl->GenerateAdjacency(d3dxmesh, 0.0f, ID3DXBuffer_GetBufferPointer(adjacency)); + if (FAILED(hr)) goto cleanup; + } + + *mesh_out = d3dxmesh; + if (adjacency_out) *adjacency_out = adjacency; + if (num_materials_out) *num_materials_out = mesh_data.num_materials; + if (materials_out) *materials_out = materials; + if (effects_out) *effects_out = effects; + if (skin_info_out) *skin_info_out = mesh_data.skin_info; + + hr = D3D_OK; +cleanup: + if (FAILED(hr)) { + if (d3dxmesh) IUnknown_Release(d3dxmesh); + if (adjacency) ID3DXBuffer_Release(adjacency); + if (materials) ID3DXBuffer_Release(materials); + if (effects) ID3DXBuffer_Release(effects); + if (mesh_data.skin_info) mesh_data.skin_info->lpVtbl->Release(mesh_data.skin_info); + if (skin_info_out) *skin_info_out = NULL; + } + HeapFree(GetProcessHeap(), 0, mesh_data.vertices); + HeapFree(GetProcessHeap(), 0, mesh_data.num_tri_per_face); + HeapFree(GetProcessHeap(), 0, mesh_data.indices); + HeapFree(GetProcessHeap(), 0, mesh_data.normals); + HeapFree(GetProcessHeap(), 0, mesh_data.normal_indices); + destroy_materials(&mesh_data); + HeapFree(GetProcessHeap(), 0, mesh_data.tex_coords); + HeapFree(GetProcessHeap(), 0, mesh_data.vertex_colors); + HeapFree(GetProcessHeap(), 0, duplications); + return hr; +} + +HRESULT WINAPI D3DXLoadMeshHierarchyFromXA(const char *filename, DWORD options, struct IDirect3DDevice9 *device, + struct ID3DXAllocateHierarchy *alloc_hier, struct ID3DXLoadUserData *load_user_data, + D3DXFRAME **frame_hierarchy, struct ID3DXAnimationController **anim_controller) +{ + HRESULT hr; + int len; + LPWSTR filenameW; + + TRACE("(%s, %x, %p, %p, %p, %p, %p)\n", debugstr_a(filename), options, + device, alloc_hier, load_user_data, frame_hierarchy, anim_controller); + + if (!filename) + return D3DERR_INVALIDCALL; + + len = MultiByteToWideChar(CP_ACP, 0, filename, -1, NULL, 0); + filenameW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (!filenameW) return E_OUTOFMEMORY; + MultiByteToWideChar(CP_ACP, 0, filename, -1, filenameW, len); + + hr = D3DXLoadMeshHierarchyFromXW(filenameW, options, device, + alloc_hier, load_user_data, frame_hierarchy, anim_controller); + HeapFree(GetProcessHeap(), 0, filenameW); + + return hr; +} + +HRESULT WINAPI D3DXLoadMeshHierarchyFromXW(const WCHAR *filename, DWORD options, struct IDirect3DDevice9 *device, + struct ID3DXAllocateHierarchy *alloc_hier, struct ID3DXLoadUserData *load_user_data, + D3DXFRAME **frame_hierarchy, struct ID3DXAnimationController **anim_controller) +{ + HRESULT hr; + DWORD size; + LPVOID buffer; + + TRACE("(%s, %x, %p, %p, %p, %p, %p)\n", debugstr_w(filename), options, + device, alloc_hier, load_user_data, frame_hierarchy, anim_controller); + + if (!filename) + return D3DERR_INVALIDCALL; + + hr = map_view_of_file(filename, &buffer, &size); + if (FAILED(hr)) + return D3DXERR_INVALIDDATA; + + hr = D3DXLoadMeshHierarchyFromXInMemory(buffer, size, options, device, + alloc_hier, load_user_data, frame_hierarchy, anim_controller); + + UnmapViewOfFile(buffer); + + return hr; +} + +static HRESULT filedata_get_name(ID3DXFileData *filedata, char **name) +{ + HRESULT hr; + SIZE_T name_len; + + hr = filedata->lpVtbl->GetName(filedata, NULL, &name_len); + if (FAILED(hr)) return hr; + + if (!name_len) + name_len++; + *name = HeapAlloc(GetProcessHeap(), 0, name_len); + if (!*name) return E_OUTOFMEMORY; + + hr = filedata->lpVtbl->GetName(filedata, *name, &name_len); + if (FAILED(hr)) + HeapFree(GetProcessHeap(), 0, *name); + else if (!name_len) + (*name)[0] = 0; + + return hr; +} + +static HRESULT load_mesh_container(struct ID3DXFileData *filedata, DWORD options, struct IDirect3DDevice9 *device, + struct ID3DXAllocateHierarchy *alloc_hier, D3DXMESHCONTAINER **mesh_container) +{ + HRESULT hr; + ID3DXBuffer *adjacency = NULL; + ID3DXBuffer *materials = NULL; + ID3DXBuffer *effects = NULL; + ID3DXSkinInfo *skin_info = NULL; + D3DXMESHDATA mesh_data; + DWORD num_materials = 0; + char *name = NULL; + + mesh_data.Type = D3DXMESHTYPE_MESH; + mesh_data.u.pMesh = NULL; + + hr = D3DXLoadSkinMeshFromXof(filedata, options, device, + &adjacency, &materials, &effects, &num_materials, + &skin_info, &mesh_data.u.pMesh); + if (FAILED(hr)) return hr; + + hr = filedata_get_name(filedata, &name); + if (FAILED(hr)) goto cleanup; + + hr = alloc_hier->lpVtbl->CreateMeshContainer(alloc_hier, name, &mesh_data, + materials ? ID3DXBuffer_GetBufferPointer(materials) : NULL, + effects ? ID3DXBuffer_GetBufferPointer(effects) : NULL, + num_materials, + adjacency ? ID3DXBuffer_GetBufferPointer(adjacency) : NULL, + skin_info, mesh_container); + +cleanup: + if (materials) ID3DXBuffer_Release(materials); + if (effects) ID3DXBuffer_Release(effects); + if (adjacency) ID3DXBuffer_Release(adjacency); + if (skin_info) IUnknown_Release(skin_info); + if (mesh_data.u.pMesh) IUnknown_Release(mesh_data.u.pMesh); + HeapFree(GetProcessHeap(), 0, name); + return hr; +} + +static HRESULT parse_transform_matrix(ID3DXFileData *filedata, D3DXMATRIX *transform) +{ + HRESULT hr; + SIZE_T data_size; + const BYTE *data; + + /* template Matrix4x4 { + * array FLOAT matrix[16]; + * } + * template FrameTransformMatrix { + * Matrix4x4 frameMatrix; + * } + */ + + hr = filedata->lpVtbl->Lock(filedata, &data_size, (const void**)&data); + if (FAILED(hr)) return hr; + + if (data_size != sizeof(D3DXMATRIX)) { + WARN("incorrect data size (%ld bytes)\n", data_size); + filedata->lpVtbl->Unlock(filedata); + return E_FAIL; + } + + memcpy(transform, data, sizeof(D3DXMATRIX)); + + filedata->lpVtbl->Unlock(filedata); + return D3D_OK; +} + +static HRESULT load_frame(struct ID3DXFileData *filedata, DWORD options, struct IDirect3DDevice9 *device, + struct ID3DXAllocateHierarchy *alloc_hier, D3DXFRAME **frame_out) +{ + HRESULT hr; + GUID type; + ID3DXFileData *child; + char *name = NULL; + D3DXFRAME *frame = NULL; + D3DXMESHCONTAINER **next_container; + D3DXFRAME **next_child; + SIZE_T nb_children; + int i; + + hr = filedata_get_name(filedata, &name); + if (FAILED(hr)) return hr; + + hr = alloc_hier->lpVtbl->CreateFrame(alloc_hier, name, frame_out); + HeapFree(GetProcessHeap(), 0, name); + if (FAILED(hr)) return E_FAIL; + + frame = *frame_out; + D3DXMatrixIdentity(&frame->TransformationMatrix); + next_child = &frame->pFrameFirstChild; + next_container = &frame->pMeshContainer; + + hr = filedata->lpVtbl->GetChildren(filedata, &nb_children); + if (FAILED(hr)) + return hr; + + for (i = 0; i < nb_children; i++) + { + hr = filedata->lpVtbl->GetChild(filedata, i, &child); + if (FAILED(hr)) + return hr; + hr = child->lpVtbl->GetType(child, &type); + if (FAILED(hr)) + return hr; + + if (IsEqualGUID(&type, &TID_D3DRMMesh)) { + hr = load_mesh_container(child, options, device, alloc_hier, next_container); + if (SUCCEEDED(hr)) + next_container = &(*next_container)->pNextMeshContainer; + } else if (IsEqualGUID(&type, &TID_D3DRMFrameTransformMatrix)) { + hr = parse_transform_matrix(child, &frame->TransformationMatrix); + } else if (IsEqualGUID(&type, &TID_D3DRMFrame)) { + hr = load_frame(child, options, device, alloc_hier, next_child); + if (SUCCEEDED(hr)) + next_child = &(*next_child)->pFrameSibling; + } + if (FAILED(hr)) + return hr; + } + + return D3D_OK; +} + +HRESULT WINAPI D3DXLoadMeshHierarchyFromXInMemory(const void *memory, DWORD memory_size, DWORD options, + struct IDirect3DDevice9 *device, struct ID3DXAllocateHierarchy *alloc_hier, + struct ID3DXLoadUserData *load_user_data, D3DXFRAME **frame_hierarchy, + struct ID3DXAnimationController **anim_controller) +{ + HRESULT hr; + ID3DXFile *d3dxfile = NULL; + ID3DXFileEnumObject *enumobj = NULL; + ID3DXFileData *filedata = NULL; + D3DXF_FILELOADMEMORY source; + D3DXFRAME *first_frame = NULL; + D3DXFRAME **next_frame = &first_frame; + SIZE_T nb_children; + GUID guid; + int i; + + TRACE("(%p, %u, %x, %p, %p, %p, %p, %p)\n", memory, memory_size, options, + device, alloc_hier, load_user_data, frame_hierarchy, anim_controller); + + if (!memory || !memory_size || !device || !frame_hierarchy || !alloc_hier) + return D3DERR_INVALIDCALL; + if (load_user_data || anim_controller) { + if (load_user_data) + FIXME("Loading user data not implemented\n"); + if (anim_controller) + FIXME("Animation controller creation not implemented\n"); + return E_NOTIMPL; + } + + hr = D3DXFileCreate(&d3dxfile); + if (FAILED(hr)) goto cleanup; + + hr = d3dxfile->lpVtbl->RegisterTemplates(d3dxfile, D3DRM_XTEMPLATES, D3DRM_XTEMPLATE_BYTES); + if (FAILED(hr)) goto cleanup; + + source.lpMemory = (void*)memory; + source.dSize = memory_size; + hr = d3dxfile->lpVtbl->CreateEnumObject(d3dxfile, &source, D3DXF_FILELOAD_FROMMEMORY, &enumobj); + if (FAILED(hr)) goto cleanup; + + hr = enumobj->lpVtbl->GetChildren(enumobj, &nb_children); + if (FAILED(hr)) + goto cleanup; + + for (i = 0; i < nb_children; i++) + { + hr = enumobj->lpVtbl->GetChild(enumobj, i, &filedata); + if (FAILED(hr)) + goto cleanup; + + hr = filedata->lpVtbl->GetType(filedata, &guid); + if (SUCCEEDED(hr)) { + if (IsEqualGUID(&guid, &TID_D3DRMMesh)) { + hr = alloc_hier->lpVtbl->CreateFrame(alloc_hier, NULL, next_frame); + if (FAILED(hr)) { + hr = E_FAIL; + goto cleanup; + } + + D3DXMatrixIdentity(&(*next_frame)->TransformationMatrix); + + hr = load_mesh_container(filedata, options, device, alloc_hier, &(*next_frame)->pMeshContainer); + if (FAILED(hr)) goto cleanup; + } else if (IsEqualGUID(&guid, &TID_D3DRMFrame)) { + hr = load_frame(filedata, options, device, alloc_hier, next_frame); + if (FAILED(hr)) goto cleanup; + } + while (*next_frame) + next_frame = &(*next_frame)->pFrameSibling; + } + + filedata->lpVtbl->Release(filedata); + filedata = NULL; + if (FAILED(hr)) + goto cleanup; + } + + if (!first_frame) { + hr = E_FAIL; + } else if (first_frame->pFrameSibling) { + D3DXFRAME *root_frame = NULL; + hr = alloc_hier->lpVtbl->CreateFrame(alloc_hier, NULL, &root_frame); + if (FAILED(hr)) { + hr = E_FAIL; + goto cleanup; + } + D3DXMatrixIdentity(&root_frame->TransformationMatrix); + root_frame->pFrameFirstChild = first_frame; + *frame_hierarchy = root_frame; + hr = D3D_OK; + } else { + *frame_hierarchy = first_frame; + hr = D3D_OK; + } + +cleanup: + if (FAILED(hr) && first_frame) D3DXFrameDestroy(first_frame, alloc_hier); + if (filedata) filedata->lpVtbl->Release(filedata); + if (enumobj) enumobj->lpVtbl->Release(enumobj); + if (d3dxfile) d3dxfile->lpVtbl->Release(d3dxfile); + return hr; +} + +HRESULT WINAPI D3DXCleanMesh(D3DXCLEANTYPE clean_type, ID3DXMesh *mesh_in, const DWORD *adjacency_in, + ID3DXMesh **mesh_out, DWORD *adjacency_out, ID3DXBuffer **errors_and_warnings) +{ + FIXME("(%u, %p, %p, %p, %p, %p)\n", clean_type, mesh_in, adjacency_in, mesh_out, adjacency_out, errors_and_warnings); + + return E_NOTIMPL; +} + +HRESULT WINAPI D3DXFrameDestroy(D3DXFRAME *frame, ID3DXAllocateHierarchy *alloc_hier) +{ + HRESULT hr; + BOOL last = FALSE; + + TRACE("(%p, %p)\n", frame, alloc_hier); + + if (!frame || !alloc_hier) + return D3DERR_INVALIDCALL; + + while (!last) { + D3DXMESHCONTAINER *container; + D3DXFRAME *current_frame; + + if (frame->pFrameSibling) { + current_frame = frame->pFrameSibling; + frame->pFrameSibling = current_frame->pFrameSibling; + current_frame->pFrameSibling = NULL; + } else { + current_frame = frame; + last = TRUE; + } + + if (current_frame->pFrameFirstChild) { + hr = D3DXFrameDestroy(current_frame->pFrameFirstChild, alloc_hier); + if (FAILED(hr)) return hr; + current_frame->pFrameFirstChild = NULL; + } + + container = current_frame->pMeshContainer; + while (container) { + D3DXMESHCONTAINER *next_container = container->pNextMeshContainer; + hr = alloc_hier->lpVtbl->DestroyMeshContainer(alloc_hier, container); + if (FAILED(hr)) return hr; + container = next_container; + } + hr = alloc_hier->lpVtbl->DestroyFrame(alloc_hier, current_frame); + if (FAILED(hr)) return hr; + } + return D3D_OK; +} + +HRESULT WINAPI D3DXLoadMeshFromXA(const char *filename, DWORD options, struct IDirect3DDevice9 *device, + struct ID3DXBuffer **adjacency, struct ID3DXBuffer **materials, struct ID3DXBuffer **effect_instances, + DWORD *num_materials, struct ID3DXMesh **mesh) +{ + HRESULT hr; + int len; + LPWSTR filenameW; + + TRACE("(%s, %x, %p, %p, %p, %p, %p, %p)\n", debugstr_a(filename), options, + device, adjacency, materials, effect_instances, num_materials, mesh); + + if (!filename) + return D3DERR_INVALIDCALL; + + len = MultiByteToWideChar(CP_ACP, 0, filename, -1, NULL, 0); + filenameW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (!filenameW) return E_OUTOFMEMORY; + MultiByteToWideChar(CP_ACP, 0, filename, -1, filenameW, len); + + hr = D3DXLoadMeshFromXW(filenameW, options, device, adjacency, materials, + effect_instances, num_materials, mesh); + HeapFree(GetProcessHeap(), 0, filenameW); + + return hr; +} + +HRESULT WINAPI D3DXLoadMeshFromXW(const WCHAR *filename, DWORD options, struct IDirect3DDevice9 *device, + struct ID3DXBuffer **adjacency, struct ID3DXBuffer **materials, struct ID3DXBuffer **effect_instances, + DWORD *num_materials, struct ID3DXMesh **mesh) +{ + HRESULT hr; + DWORD size; + LPVOID buffer; + + TRACE("(%s, %x, %p, %p, %p, %p, %p, %p)\n", debugstr_w(filename), options, + device, adjacency, materials, effect_instances, num_materials, mesh); + + if (!filename) + return D3DERR_INVALIDCALL; + + hr = map_view_of_file(filename, &buffer, &size); + if (FAILED(hr)) + return D3DXERR_INVALIDDATA; + + hr = D3DXLoadMeshFromXInMemory(buffer, size, options, device, adjacency, + materials, effect_instances, num_materials, mesh); + + UnmapViewOfFile(buffer); + + return hr; +} + +HRESULT WINAPI D3DXLoadMeshFromXResource(HMODULE module, const char *name, const char *type, DWORD options, + struct IDirect3DDevice9 *device, struct ID3DXBuffer **adjacency, struct ID3DXBuffer **materials, + struct ID3DXBuffer **effect_instances, DWORD *num_materials, struct ID3DXMesh **mesh) +{ + HRESULT hr; + HRSRC resinfo; + DWORD size; + LPVOID buffer; + + TRACE("(%p, %s, %s, %x, %p, %p, %p, %p, %p, %p)\n", + module, debugstr_a(name), debugstr_a(type), options, device, + adjacency, materials, effect_instances, num_materials, mesh); + + resinfo = FindResourceA(module, name, type); + if (!resinfo) return D3DXERR_INVALIDDATA; + + hr = load_resource_into_memory(module, resinfo, &buffer, &size); + if (FAILED(hr)) return D3DXERR_INVALIDDATA; + + return D3DXLoadMeshFromXInMemory(buffer, size, options, device, adjacency, + materials, effect_instances, num_materials, mesh); +} + +struct mesh_container +{ + struct list entry; + ID3DXMesh *mesh; + ID3DXBuffer *adjacency; + ID3DXBuffer *materials; + ID3DXBuffer *effects; + DWORD num_materials; + D3DXMATRIX transform; +}; + +static HRESULT parse_frame(struct ID3DXFileData *filedata, DWORD options, struct IDirect3DDevice9 *device, + const D3DXMATRIX *parent_transform, struct list *container_list, DWORD provide_flags) +{ + HRESULT hr; + D3DXMATRIX transform = *parent_transform; + ID3DXFileData *child; + GUID type; + SIZE_T nb_children; + int i; + + hr = filedata->lpVtbl->GetChildren(filedata, &nb_children); + if (FAILED(hr)) + return hr; + + for (i = 0; i < nb_children; i++) + { + hr = filedata->lpVtbl->GetChild(filedata, i, &child); + if (FAILED(hr)) + return hr; + hr = child->lpVtbl->GetType(child, &type); + if (FAILED(hr)) + return hr; + + if (IsEqualGUID(&type, &TID_D3DRMMesh)) { + struct mesh_container *container = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*container)); + if (!container) + return E_OUTOFMEMORY; + list_add_tail(container_list, &container->entry); + container->transform = transform; + + hr = D3DXLoadSkinMeshFromXof(child, options, device, + (provide_flags & PROVIDE_ADJACENCY) ? &container->adjacency : NULL, + (provide_flags & PROVIDE_MATERIALS) ? &container->materials : NULL, + NULL, &container->num_materials, NULL, &container->mesh); + } else if (IsEqualGUID(&type, &TID_D3DRMFrameTransformMatrix)) { + D3DXMATRIX new_transform; + hr = parse_transform_matrix(child, &new_transform); + D3DXMatrixMultiply(&transform, &transform, &new_transform); + } else if (IsEqualGUID(&type, &TID_D3DRMFrame)) { + hr = parse_frame(child, options, device, &transform, container_list, provide_flags); + } + if (FAILED(hr)) + return hr; + } + + return D3D_OK; +} + +HRESULT WINAPI D3DXLoadMeshFromXInMemory(const void *memory, DWORD memory_size, DWORD options, + struct IDirect3DDevice9 *device, struct ID3DXBuffer **adjacency_out, struct ID3DXBuffer **materials_out, + struct ID3DXBuffer **effects_out, DWORD *num_materials_out, struct ID3DXMesh **mesh_out) +{ + HRESULT hr; + ID3DXFile *d3dxfile = NULL; + ID3DXFileEnumObject *enumobj = NULL; + ID3DXFileData *filedata = NULL; + D3DXF_FILELOADMEMORY source; + ID3DXBuffer *materials = NULL; + ID3DXBuffer *effects = NULL; + ID3DXBuffer *adjacency = NULL; + struct list container_list = LIST_INIT(container_list); + struct mesh_container *container_ptr, *next_container_ptr; + DWORD num_materials; + DWORD num_faces, num_vertices; + D3DXMATRIX identity; + DWORD provide_flags = 0; + DWORD fvf; + ID3DXMesh *concat_mesh = NULL; + D3DVERTEXELEMENT9 concat_decl[MAX_FVF_DECL_SIZE]; + BYTE *concat_vertices = NULL; + void *concat_indices = NULL; + DWORD index_offset; + DWORD concat_vertex_size; + SIZE_T nb_children; + GUID guid; + int i; + + TRACE("(%p, %u, %x, %p, %p, %p, %p, %p, %p)\n", memory, memory_size, options, + device, adjacency_out, materials_out, effects_out, num_materials_out, mesh_out); + + if (!memory || !memory_size || !device || !mesh_out) + return D3DERR_INVALIDCALL; + + hr = D3DXFileCreate(&d3dxfile); + if (FAILED(hr)) goto cleanup; + + hr = d3dxfile->lpVtbl->RegisterTemplates(d3dxfile, D3DRM_XTEMPLATES, D3DRM_XTEMPLATE_BYTES); + if (FAILED(hr)) goto cleanup; + + source.lpMemory = (void*)memory; + source.dSize = memory_size; + hr = d3dxfile->lpVtbl->CreateEnumObject(d3dxfile, &source, D3DXF_FILELOAD_FROMMEMORY, &enumobj); + if (FAILED(hr)) goto cleanup; + + D3DXMatrixIdentity(&identity); + if (adjacency_out) provide_flags |= PROVIDE_ADJACENCY; + if (materials_out || effects_out) provide_flags |= PROVIDE_MATERIALS; + + hr = enumobj->lpVtbl->GetChildren(enumobj, &nb_children); + if (FAILED(hr)) + goto cleanup; + + for (i = 0; i < nb_children; i++) + { + hr = enumobj->lpVtbl->GetChild(enumobj, i, &filedata); + if (FAILED(hr)) + goto cleanup; + + hr = filedata->lpVtbl->GetType(filedata, &guid); + if (SUCCEEDED(hr)) { + if (IsEqualGUID(&guid, &TID_D3DRMMesh)) { + container_ptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*container_ptr)); + if (!container_ptr) { + hr = E_OUTOFMEMORY; + goto cleanup; + } + list_add_tail(&container_list, &container_ptr->entry); + D3DXMatrixIdentity(&container_ptr->transform); + + hr = D3DXLoadSkinMeshFromXof(filedata, options, device, + (provide_flags & PROVIDE_ADJACENCY) ? &container_ptr->adjacency : NULL, + (provide_flags & PROVIDE_MATERIALS) ? &container_ptr->materials : NULL, + NULL, &container_ptr->num_materials, NULL, &container_ptr->mesh); + } else if (IsEqualGUID(&guid, &TID_D3DRMFrame)) { + hr = parse_frame(filedata, options, device, &identity, &container_list, provide_flags); + } + if (FAILED(hr)) goto cleanup; + } + filedata->lpVtbl->Release(filedata); + filedata = NULL; + if (FAILED(hr)) + goto cleanup; + } + + enumobj->lpVtbl->Release(enumobj); + enumobj = NULL; + d3dxfile->lpVtbl->Release(d3dxfile); + d3dxfile = NULL; + + if (list_empty(&container_list)) { + hr = E_FAIL; + goto cleanup; + } + + fvf = D3DFVF_XYZ; + num_faces = 0; + num_vertices = 0; + num_materials = 0; + LIST_FOR_EACH_ENTRY(container_ptr, &container_list, struct mesh_container, entry) + { + ID3DXMesh *mesh = container_ptr->mesh; + fvf |= mesh->lpVtbl->GetFVF(mesh); + num_faces += mesh->lpVtbl->GetNumFaces(mesh); + num_vertices += mesh->lpVtbl->GetNumVertices(mesh); + num_materials += container_ptr->num_materials; + } + + hr = D3DXCreateMeshFVF(num_faces, num_vertices, options, fvf, device, &concat_mesh); + if (FAILED(hr)) goto cleanup; + + hr = concat_mesh->lpVtbl->GetDeclaration(concat_mesh, concat_decl); + if (FAILED(hr)) goto cleanup; + + concat_vertex_size = D3DXGetDeclVertexSize(concat_decl, 0); + + hr = concat_mesh->lpVtbl->LockVertexBuffer(concat_mesh, 0, (void**)&concat_vertices); + if (FAILED(hr)) goto cleanup; + + LIST_FOR_EACH_ENTRY(container_ptr, &container_list, struct mesh_container, entry) + { + D3DVERTEXELEMENT9 mesh_decl[MAX_FVF_DECL_SIZE]; + ID3DXMesh *mesh = container_ptr->mesh; + DWORD num_mesh_vertices = mesh->lpVtbl->GetNumVertices(mesh); + DWORD mesh_vertex_size; + const BYTE *mesh_vertices; + DWORD i; + + hr = mesh->lpVtbl->GetDeclaration(mesh, mesh_decl); + if (FAILED(hr)) goto cleanup; + + mesh_vertex_size = D3DXGetDeclVertexSize(mesh_decl, 0); + + hr = mesh->lpVtbl->LockVertexBuffer(mesh, D3DLOCK_READONLY, (void**)&mesh_vertices); + if (FAILED(hr)) goto cleanup; + + for (i = 0; i < num_mesh_vertices; i++) { + int j; + int k = 1; + + D3DXVec3TransformCoord((D3DXVECTOR3*)concat_vertices, + (D3DXVECTOR3*)mesh_vertices, + &container_ptr->transform); + for (j = 1; concat_decl[j].Stream != 0xff; j++) + { + if (concat_decl[j].Usage == mesh_decl[k].Usage && + concat_decl[j].UsageIndex == mesh_decl[k].UsageIndex) + { + if (concat_decl[j].Usage == D3DDECLUSAGE_NORMAL) { + D3DXVec3TransformCoord((D3DXVECTOR3*)(concat_vertices + concat_decl[j].Offset), + (D3DXVECTOR3*)(mesh_vertices + mesh_decl[k].Offset), + &container_ptr->transform); + } else { + memcpy(concat_vertices + concat_decl[j].Offset, + mesh_vertices + mesh_decl[k].Offset, + d3dx_decltype_size[mesh_decl[k].Type]); + } + k++; + } + } + mesh_vertices += mesh_vertex_size; + concat_vertices += concat_vertex_size; + } + + mesh->lpVtbl->UnlockVertexBuffer(mesh); + } + + concat_mesh->lpVtbl->UnlockVertexBuffer(concat_mesh); + concat_vertices = NULL; + + hr = concat_mesh->lpVtbl->LockIndexBuffer(concat_mesh, 0, &concat_indices); + if (FAILED(hr)) goto cleanup; + + index_offset = 0; + LIST_FOR_EACH_ENTRY(container_ptr, &container_list, struct mesh_container, entry) + { + ID3DXMesh *mesh = container_ptr->mesh; + const void *mesh_indices; + DWORD num_mesh_faces = mesh->lpVtbl->GetNumFaces(mesh); + DWORD i; + + hr = mesh->lpVtbl->LockIndexBuffer(mesh, D3DLOCK_READONLY, (void**)&mesh_indices); + if (FAILED(hr)) goto cleanup; + + if (options & D3DXMESH_32BIT) { + DWORD *dest = concat_indices; + const DWORD *src = mesh_indices; + for (i = 0; i < num_mesh_faces * 3; i++) + *dest++ = index_offset + *src++; + concat_indices = dest; + } else { + WORD *dest = concat_indices; + const WORD *src = mesh_indices; + for (i = 0; i < num_mesh_faces * 3; i++) + *dest++ = index_offset + *src++; + concat_indices = dest; + } + mesh->lpVtbl->UnlockIndexBuffer(mesh); + + index_offset += num_mesh_faces * 3; + } + + concat_mesh->lpVtbl->UnlockIndexBuffer(concat_mesh); + concat_indices = NULL; + + if (num_materials) { + DWORD *concat_attrib_buffer = NULL; + DWORD offset = 0; + + hr = concat_mesh->lpVtbl->LockAttributeBuffer(concat_mesh, 0, &concat_attrib_buffer); + if (FAILED(hr)) goto cleanup; + + LIST_FOR_EACH_ENTRY(container_ptr, &container_list, struct mesh_container, entry) + { + ID3DXMesh *mesh = container_ptr->mesh; + const DWORD *mesh_attrib_buffer = NULL; + DWORD count = mesh->lpVtbl->GetNumFaces(mesh); + + hr = mesh->lpVtbl->LockAttributeBuffer(mesh, D3DLOCK_READONLY, (DWORD**)&mesh_attrib_buffer); + if (FAILED(hr)) { + concat_mesh->lpVtbl->UnlockAttributeBuffer(concat_mesh); + goto cleanup; + } + + while (count--) + *concat_attrib_buffer++ = offset + *mesh_attrib_buffer++; + + mesh->lpVtbl->UnlockAttributeBuffer(mesh); + offset += container_ptr->num_materials; + } + concat_mesh->lpVtbl->UnlockAttributeBuffer(concat_mesh); + } + + if (materials_out || effects_out) { + D3DXMATERIAL *out_ptr; + if (!num_materials) { + /* create default material */ + hr = D3DXCreateBuffer(sizeof(D3DXMATERIAL), &materials); + if (FAILED(hr)) goto cleanup; + + out_ptr = ID3DXBuffer_GetBufferPointer(materials); + out_ptr->MatD3D.Diffuse.r = 0.5f; + out_ptr->MatD3D.Diffuse.g = 0.5f; + out_ptr->MatD3D.Diffuse.b = 0.5f; + out_ptr->MatD3D.Specular.r = 0.5f; + out_ptr->MatD3D.Specular.g = 0.5f; + out_ptr->MatD3D.Specular.b = 0.5f; + /* D3DXCreateBuffer initializes the rest to zero */ + } else { + DWORD buffer_size = num_materials * sizeof(D3DXMATERIAL); + char *strings_out_ptr; + + LIST_FOR_EACH_ENTRY(container_ptr, &container_list, struct mesh_container, entry) + { + if (container_ptr->materials) { + DWORD i; + const D3DXMATERIAL *in_ptr = ID3DXBuffer_GetBufferPointer(container_ptr->materials); + for (i = 0; i < container_ptr->num_materials; i++) + { + if (in_ptr->pTextureFilename) + buffer_size += strlen(in_ptr->pTextureFilename) + 1; + in_ptr++; + } + } + } + + hr = D3DXCreateBuffer(buffer_size, &materials); + if (FAILED(hr)) goto cleanup; + out_ptr = ID3DXBuffer_GetBufferPointer(materials); + strings_out_ptr = (char*)(out_ptr + num_materials); + + LIST_FOR_EACH_ENTRY(container_ptr, &container_list, struct mesh_container, entry) + { + if (container_ptr->materials) { + DWORD i; + const D3DXMATERIAL *in_ptr = ID3DXBuffer_GetBufferPointer(container_ptr->materials); + for (i = 0; i < container_ptr->num_materials; i++) + { + out_ptr->MatD3D = in_ptr->MatD3D; + if (in_ptr->pTextureFilename) { + out_ptr->pTextureFilename = strings_out_ptr; + strcpy(out_ptr->pTextureFilename, in_ptr->pTextureFilename); + strings_out_ptr += strlen(in_ptr->pTextureFilename) + 1; + } + in_ptr++; + out_ptr++; + } + } + } + } + } + if (!num_materials) + num_materials = 1; + + if (effects_out) { + generate_effects(materials, num_materials, &effects); + if (!materials_out) { + ID3DXBuffer_Release(materials); + materials = NULL; + } + } + + if (adjacency_out) { + if (!list_next(&container_list, list_head(&container_list))) { + container_ptr = LIST_ENTRY(list_head(&container_list), struct mesh_container, entry); + adjacency = container_ptr->adjacency; + container_ptr->adjacency = NULL; + } else { + DWORD offset = 0; + DWORD *out_ptr; + + hr = D3DXCreateBuffer(num_faces * 3 * sizeof(DWORD), &adjacency); + if (FAILED(hr)) goto cleanup; + + out_ptr = ID3DXBuffer_GetBufferPointer(adjacency); + LIST_FOR_EACH_ENTRY(container_ptr, &container_list, struct mesh_container, entry) + { + DWORD i; + DWORD count = 3 * container_ptr->mesh->lpVtbl->GetNumFaces(container_ptr->mesh); + DWORD *in_ptr = ID3DXBuffer_GetBufferPointer(container_ptr->adjacency); + + for (i = 0; i < count; i++) + *out_ptr++ = offset + *in_ptr++; + + offset += count; + } + } + } + + *mesh_out = concat_mesh; + if (adjacency_out) *adjacency_out = adjacency; + if (materials_out) *materials_out = materials; + if (effects_out) *effects_out = effects; + if (num_materials_out) *num_materials_out = num_materials; + + hr = D3D_OK; +cleanup: + if (concat_indices) concat_mesh->lpVtbl->UnlockIndexBuffer(concat_mesh); + if (concat_vertices) concat_mesh->lpVtbl->UnlockVertexBuffer(concat_mesh); + if (filedata) filedata->lpVtbl->Release(filedata); + if (enumobj) enumobj->lpVtbl->Release(enumobj); + if (d3dxfile) d3dxfile->lpVtbl->Release(d3dxfile); + if (FAILED(hr)) { + if (concat_mesh) IUnknown_Release(concat_mesh); + if (materials) ID3DXBuffer_Release(materials); + if (effects) ID3DXBuffer_Release(effects); + if (adjacency) ID3DXBuffer_Release(adjacency); + } + LIST_FOR_EACH_ENTRY_SAFE(container_ptr, next_container_ptr, &container_list, struct mesh_container, entry) + { + if (container_ptr->mesh) IUnknown_Release(container_ptr->mesh); + if (container_ptr->adjacency) ID3DXBuffer_Release(container_ptr->adjacency); + if (container_ptr->materials) ID3DXBuffer_Release(container_ptr->materials); + if (container_ptr->effects) ID3DXBuffer_Release(container_ptr->effects); + HeapFree(GetProcessHeap(), 0, container_ptr); + } + return hr; +} + +HRESULT WINAPI D3DXCreateBox(struct IDirect3DDevice9 *device, float width, float height, + float depth, struct ID3DXMesh **mesh, struct ID3DXBuffer **adjacency) +{ + FIXME("(%p, %f, %f, %f, %p, %p): stub\n", device, width, height, depth, mesh, adjacency); + + return E_NOTIMPL; +} + +struct vertex +{ + D3DXVECTOR3 position; + D3DXVECTOR3 normal; +}; + +typedef WORD face[3]; + +struct sincos_table +{ + float *sin; + float *cos; +}; + +static void free_sincos_table(struct sincos_table *sincos_table) +{ + HeapFree(GetProcessHeap(), 0, sincos_table->cos); + HeapFree(GetProcessHeap(), 0, sincos_table->sin); +} + +/* pre compute sine and cosine tables; caller must free */ +static BOOL compute_sincos_table(struct sincos_table *sincos_table, float angle_start, float angle_step, int n) +{ + float angle; + int i; + + sincos_table->sin = HeapAlloc(GetProcessHeap(), 0, n * sizeof(*sincos_table->sin)); + if (!sincos_table->sin) + { + return FALSE; + } + sincos_table->cos = HeapAlloc(GetProcessHeap(), 0, n * sizeof(*sincos_table->cos)); + if (!sincos_table->cos) + { + HeapFree(GetProcessHeap(), 0, sincos_table->sin); + return FALSE; + } + + angle = angle_start; + for (i = 0; i < n; i++) + { + sincos_table->sin[i] = sin(angle); + sincos_table->cos[i] = cos(angle); + angle += angle_step; + } + + return TRUE; +} + +static WORD vertex_index(UINT slices, int slice, int stack) +{ + return stack*slices+slice+1; +} + +HRESULT WINAPI D3DXCreateSphere(struct IDirect3DDevice9 *device, float radius, UINT slices, + UINT stacks, struct ID3DXMesh **mesh, struct ID3DXBuffer **adjacency) +{ + DWORD number_of_vertices, number_of_faces; + HRESULT hr; + ID3DXMesh *sphere; + struct vertex *vertices; + face *faces; + float phi_step, phi_start; + struct sincos_table phi; + float theta_step, theta, sin_theta, cos_theta; + DWORD vertex, face, stack, slice; + + TRACE("(%p, %f, %u, %u, %p, %p)\n", device, radius, slices, stacks, mesh, adjacency); + + if (!device || radius < 0.0f || slices < 2 || stacks < 2 || !mesh) + { + return D3DERR_INVALIDCALL; + } + + if (adjacency) + { + FIXME("Case of adjacency != NULL not implemented.\n"); + return E_NOTIMPL; + } + + number_of_vertices = 2 + slices * (stacks-1); + number_of_faces = 2 * slices + (stacks - 2) * (2 * slices); + + hr = D3DXCreateMeshFVF(number_of_faces, number_of_vertices, D3DXMESH_MANAGED, + D3DFVF_XYZ | D3DFVF_NORMAL, device, &sphere); + if (FAILED(hr)) + { + return hr; + } + + hr = sphere->lpVtbl->LockVertexBuffer(sphere, 0, (LPVOID *)&vertices); + if (FAILED(hr)) + { + sphere->lpVtbl->Release(sphere); + return hr; + } + + hr = sphere->lpVtbl->LockIndexBuffer(sphere, 0, (LPVOID *)&faces); + if (FAILED(hr)) + { + sphere->lpVtbl->UnlockVertexBuffer(sphere); + sphere->lpVtbl->Release(sphere); + return hr; + } + + /* phi = angle on xz plane wrt z axis */ + phi_step = -2 * M_PI / slices; + phi_start = M_PI / 2; + + if (!compute_sincos_table(&phi, phi_start, phi_step, slices)) + { + sphere->lpVtbl->UnlockIndexBuffer(sphere); + sphere->lpVtbl->UnlockVertexBuffer(sphere); + sphere->lpVtbl->Release(sphere); + return E_OUTOFMEMORY; + } + + /* theta = angle on xy plane wrt x axis */ + theta_step = M_PI / stacks; + theta = theta_step; + + vertex = 0; + face = 0; + + vertices[vertex].normal.x = 0.0f; + vertices[vertex].normal.y = 0.0f; + vertices[vertex].normal.z = 1.0f; + vertices[vertex].position.x = 0.0f; + vertices[vertex].position.y = 0.0f; + vertices[vertex].position.z = radius; + vertex++; + + for (stack = 0; stack < stacks - 1; stack++) + { + sin_theta = sin(theta); + cos_theta = cos(theta); + + for (slice = 0; slice < slices; slice++) + { + vertices[vertex].normal.x = sin_theta * phi.cos[slice]; + vertices[vertex].normal.y = sin_theta * phi.sin[slice]; + vertices[vertex].normal.z = cos_theta; + vertices[vertex].position.x = radius * sin_theta * phi.cos[slice]; + vertices[vertex].position.y = radius * sin_theta * phi.sin[slice]; + vertices[vertex].position.z = radius * cos_theta; + vertex++; + + if (slice > 0) + { + if (stack == 0) + { + /* top stack is triangle fan */ + faces[face][0] = 0; + faces[face][1] = slice + 1; + faces[face][2] = slice; + face++; + } + else + { + /* stacks in between top and bottom are quad strips */ + faces[face][0] = vertex_index(slices, slice-1, stack-1); + faces[face][1] = vertex_index(slices, slice, stack-1); + faces[face][2] = vertex_index(slices, slice-1, stack); + face++; + + faces[face][0] = vertex_index(slices, slice, stack-1); + faces[face][1] = vertex_index(slices, slice, stack); + faces[face][2] = vertex_index(slices, slice-1, stack); + face++; + } + } + } + + theta += theta_step; + + if (stack == 0) + { + faces[face][0] = 0; + faces[face][1] = 1; + faces[face][2] = slice; + face++; + } + else + { + faces[face][0] = vertex_index(slices, slice-1, stack-1); + faces[face][1] = vertex_index(slices, 0, stack-1); + faces[face][2] = vertex_index(slices, slice-1, stack); + face++; + + faces[face][0] = vertex_index(slices, 0, stack-1); + faces[face][1] = vertex_index(slices, 0, stack); + faces[face][2] = vertex_index(slices, slice-1, stack); + face++; + } + } + + vertices[vertex].position.x = 0.0f; + vertices[vertex].position.y = 0.0f; + vertices[vertex].position.z = -radius; + vertices[vertex].normal.x = 0.0f; + vertices[vertex].normal.y = 0.0f; + vertices[vertex].normal.z = -1.0f; + + /* bottom stack is triangle fan */ + for (slice = 1; slice < slices; slice++) + { + faces[face][0] = vertex_index(slices, slice-1, stack-1); + faces[face][1] = vertex_index(slices, slice, stack-1); + faces[face][2] = vertex; + face++; + } + + faces[face][0] = vertex_index(slices, slice-1, stack-1); + faces[face][1] = vertex_index(slices, 0, stack-1); + faces[face][2] = vertex; + + free_sincos_table(&phi); + sphere->lpVtbl->UnlockIndexBuffer(sphere); + sphere->lpVtbl->UnlockVertexBuffer(sphere); + *mesh = sphere; + + return D3D_OK; +} + +HRESULT WINAPI D3DXCreateCylinder(struct IDirect3DDevice9 *device, float radius1, float radius2, + float length, UINT slices, UINT stacks, struct ID3DXMesh **mesh, struct ID3DXBuffer **adjacency) +{ + DWORD number_of_vertices, number_of_faces; + HRESULT hr; + ID3DXMesh *cylinder; + struct vertex *vertices; + face *faces; + float theta_step, theta_start; + struct sincos_table theta; + float delta_radius, radius, radius_step; + float z, z_step, z_normal; + DWORD vertex, face, slice, stack; + + TRACE("(%p, %f, %f, %f, %u, %u, %p, %p)\n", device, radius1, radius2, length, slices, stacks, mesh, adjacency); + + if (device == NULL || radius1 < 0.0f || radius2 < 0.0f || length < 0.0f || slices < 2 || stacks < 1 || mesh == NULL) + { + return D3DERR_INVALIDCALL; + } + + if (adjacency) + { + FIXME("Case of adjacency != NULL not implemented.\n"); + return E_NOTIMPL; + } + + number_of_vertices = 2 + (slices * (3 + stacks)); + number_of_faces = 2 * slices + stacks * (2 * slices); + + hr = D3DXCreateMeshFVF(number_of_faces, number_of_vertices, D3DXMESH_MANAGED, + D3DFVF_XYZ | D3DFVF_NORMAL, device, &cylinder); + if (FAILED(hr)) + { + return hr; + } + + hr = cylinder->lpVtbl->LockVertexBuffer(cylinder, 0, (LPVOID *)&vertices); + if (FAILED(hr)) + { + cylinder->lpVtbl->Release(cylinder); + return hr; + } + + hr = cylinder->lpVtbl->LockIndexBuffer(cylinder, 0, (LPVOID *)&faces); + if (FAILED(hr)) + { + cylinder->lpVtbl->UnlockVertexBuffer(cylinder); + cylinder->lpVtbl->Release(cylinder); + return hr; + } + + /* theta = angle on xy plane wrt x axis */ + theta_step = -2 * M_PI / slices; + theta_start = M_PI / 2; + + if (!compute_sincos_table(&theta, theta_start, theta_step, slices)) + { + cylinder->lpVtbl->UnlockIndexBuffer(cylinder); + cylinder->lpVtbl->UnlockVertexBuffer(cylinder); + cylinder->lpVtbl->Release(cylinder); + return E_OUTOFMEMORY; + } + + vertex = 0; + face = 0; + + delta_radius = radius1 - radius2; + radius = radius1; + radius_step = delta_radius / stacks; + + z = -length / 2; + z_step = length / stacks; + z_normal = delta_radius / length; + if (isnan(z_normal)) + { + z_normal = 0.0f; + } + + vertices[vertex].normal.x = 0.0f; + vertices[vertex].normal.y = 0.0f; + vertices[vertex].normal.z = -1.0f; + vertices[vertex].position.x = 0.0f; + vertices[vertex].position.y = 0.0f; + vertices[vertex++].position.z = z; + + for (slice = 0; slice < slices; slice++, vertex++) + { + vertices[vertex].normal.x = 0.0f; + vertices[vertex].normal.y = 0.0f; + vertices[vertex].normal.z = -1.0f; + vertices[vertex].position.x = radius * theta.cos[slice]; + vertices[vertex].position.y = radius * theta.sin[slice]; + vertices[vertex].position.z = z; + + if (slice > 0) + { + faces[face][0] = 0; + faces[face][1] = slice; + faces[face++][2] = slice + 1; + } + } + + faces[face][0] = 0; + faces[face][1] = slice; + faces[face++][2] = 1; + + for (stack = 1; stack <= stacks+1; stack++) + { + for (slice = 0; slice < slices; slice++, vertex++) + { + vertices[vertex].normal.x = theta.cos[slice]; + vertices[vertex].normal.y = theta.sin[slice]; + vertices[vertex].normal.z = z_normal; + D3DXVec3Normalize(&vertices[vertex].normal, &vertices[vertex].normal); + vertices[vertex].position.x = radius * theta.cos[slice]; + vertices[vertex].position.y = radius * theta.sin[slice]; + vertices[vertex].position.z = z; + + if (stack > 1 && slice > 0) + { + faces[face][0] = vertex_index(slices, slice-1, stack-1); + faces[face][1] = vertex_index(slices, slice-1, stack); + faces[face++][2] = vertex_index(slices, slice, stack-1); + + faces[face][0] = vertex_index(slices, slice, stack-1); + faces[face][1] = vertex_index(slices, slice-1, stack); + faces[face++][2] = vertex_index(slices, slice, stack); + } + } + + if (stack > 1) + { + faces[face][0] = vertex_index(slices, slice-1, stack-1); + faces[face][1] = vertex_index(slices, slice-1, stack); + faces[face++][2] = vertex_index(slices, 0, stack-1); + + faces[face][0] = vertex_index(slices, 0, stack-1); + faces[face][1] = vertex_index(slices, slice-1, stack); + faces[face++][2] = vertex_index(slices, 0, stack); + } + + if (stack < stacks + 1) + { + z += z_step; + radius -= radius_step; + } + } + + for (slice = 0; slice < slices; slice++, vertex++) + { + vertices[vertex].normal.x = 0.0f; + vertices[vertex].normal.y = 0.0f; + vertices[vertex].normal.z = 1.0f; + vertices[vertex].position.x = radius * theta.cos[slice]; + vertices[vertex].position.y = radius * theta.sin[slice]; + vertices[vertex].position.z = z; + + if (slice > 0) + { + faces[face][0] = vertex_index(slices, slice-1, stack); + faces[face][1] = number_of_vertices - 1; + faces[face++][2] = vertex_index(slices, slice, stack); + } + } + + vertices[vertex].position.x = 0.0f; + vertices[vertex].position.y = 0.0f; + vertices[vertex].position.z = z; + vertices[vertex].normal.x = 0.0f; + vertices[vertex].normal.y = 0.0f; + vertices[vertex].normal.z = 1.0f; + + faces[face][0] = vertex_index(slices, slice-1, stack); + faces[face][1] = number_of_vertices - 1; + faces[face][2] = vertex_index(slices, 0, stack); + + free_sincos_table(&theta); + cylinder->lpVtbl->UnlockIndexBuffer(cylinder); + cylinder->lpVtbl->UnlockVertexBuffer(cylinder); + *mesh = cylinder; + + return D3D_OK; +} + +HRESULT WINAPI D3DXCreateTeapot(struct IDirect3DDevice9 *device, + struct ID3DXMesh **mesh, struct ID3DXBuffer **adjacency) +{ + FIXME("(%p, %p, %p): stub\n", device, mesh, adjacency); + + return E_NOTIMPL; +} + +HRESULT WINAPI D3DXCreateTextA(struct IDirect3DDevice9 *device, HDC hdc, const char *text, float deviation, + float extrusion, struct ID3DXMesh **mesh, struct ID3DXBuffer **adjacency, GLYPHMETRICSFLOAT *glyphmetrics) +{ + HRESULT hr; + int len; + LPWSTR textW; + + TRACE("(%p, %p, %s, %f, %f, %p, %p, %p)\n", device, hdc, + debugstr_a(text), deviation, extrusion, mesh, adjacency, glyphmetrics); + + if (!text) + return D3DERR_INVALIDCALL; + + len = MultiByteToWideChar(CP_ACP, 0, text, -1, NULL, 0); + textW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, text, -1, textW, len); + + hr = D3DXCreateTextW(device, hdc, textW, deviation, extrusion, + mesh, adjacency, glyphmetrics); + HeapFree(GetProcessHeap(), 0, textW); + + return hr; +} + +enum pointtype { + POINTTYPE_CURVE = 0, + POINTTYPE_CORNER, + POINTTYPE_CURVE_START, + POINTTYPE_CURVE_END, + POINTTYPE_CURVE_MIDDLE, +}; + +struct point2d +{ + D3DXVECTOR2 pos; + enum pointtype corner; +}; + +struct dynamic_array +{ + int count, capacity; + void *items; +}; + +/* is a dynamic_array */ +struct outline +{ + int count, capacity; + struct point2d *items; +}; + +/* is a dynamic_array */ +struct outline_array +{ + int count, capacity; + struct outline *items; +}; + +struct face_array +{ + int count; + face *items; +}; + +struct point2d_index +{ + struct outline *outline; + int vertex; +}; + +struct point2d_index_array +{ + int count; + struct point2d_index *items; +}; + +struct glyphinfo +{ + struct outline_array outlines; + struct face_array faces; + struct point2d_index_array ordered_vertices; + float offset_x; +}; + +/* is an dynamic_array */ +struct word_array +{ + int count, capacity; + WORD *items; +}; + +/* complex polygons are split into monotone polygons, which have + * at most 2 intersections with the vertical sweep line */ +struct triangulation +{ + struct word_array vertex_stack; + BOOL last_on_top, merging; +}; + +/* is an dynamic_array */ +struct triangulation_array +{ + int count, capacity; + struct triangulation *items; + + struct glyphinfo *glyph; +}; + +static BOOL reserve(struct dynamic_array *array, int count, int itemsize) +{ + if (count > array->capacity) { + void *new_buffer; + int new_capacity; + if (array->items && array->capacity) { + new_capacity = max(array->capacity * 2, count); + new_buffer = HeapReAlloc(GetProcessHeap(), 0, array->items, new_capacity * itemsize); + } else { + new_capacity = max(16, count); + new_buffer = HeapAlloc(GetProcessHeap(), 0, new_capacity * itemsize); + } + if (!new_buffer) + return FALSE; + array->items = new_buffer; + array->capacity = new_capacity; + } + return TRUE; +} + +static struct point2d *add_points(struct outline *array, int num) +{ + struct point2d *item; + + if (!reserve((struct dynamic_array *)array, array->count + num, sizeof(array->items[0]))) + return NULL; + + item = &array->items[array->count]; + array->count += num; + return item; +} + +static struct outline *add_outline(struct outline_array *array) +{ + struct outline *item; + + if (!reserve((struct dynamic_array *)array, array->count + 1, sizeof(array->items[0]))) + return NULL; + + item = &array->items[array->count++]; + ZeroMemory(item, sizeof(*item)); + return item; +} + +static inline face *add_face(struct face_array *array) +{ + return &array->items[array->count++]; +} + +static struct triangulation *add_triangulation(struct triangulation_array *array) +{ + struct triangulation *item; + + if (!reserve((struct dynamic_array *)array, array->count + 1, sizeof(array->items[0]))) + return NULL; + + item = &array->items[array->count++]; + ZeroMemory(item, sizeof(*item)); + return item; +} + +static HRESULT add_vertex_index(struct word_array *array, WORD vertex_index) +{ + if (!reserve((struct dynamic_array *)array, array->count + 1, sizeof(array->items[0]))) + return E_OUTOFMEMORY; + + array->items[array->count++] = vertex_index; + return S_OK; +} + +/* assume fixed point numbers can be converted to float point in place */ +C_ASSERT(sizeof(FIXED) == sizeof(float)); +C_ASSERT(sizeof(POINTFX) == sizeof(D3DXVECTOR2)); + +static inline D3DXVECTOR2 *convert_fixed_to_float(POINTFX *pt, int count, float emsquare) +{ + D3DXVECTOR2 *ret = (D3DXVECTOR2*)pt; + while (count--) { + D3DXVECTOR2 *pt_flt = (D3DXVECTOR2*)pt; + pt_flt->x = (pt->x.value + pt->x.fract / (float)0x10000) / emsquare; + pt_flt->y = (pt->y.value + pt->y.fract / (float)0x10000) / emsquare; + pt++; + } + return ret; +} + +static HRESULT add_bezier_points(struct outline *outline, const D3DXVECTOR2 *p1, + const D3DXVECTOR2 *p2, const D3DXVECTOR2 *p3, + float max_deviation_sq) +{ + D3DXVECTOR2 split1 = {0, 0}, split2 = {0, 0}, middle, vec; + float deviation_sq; + + D3DXVec2Scale(&split1, D3DXVec2Add(&split1, p1, p2), 0.5f); + D3DXVec2Scale(&split2, D3DXVec2Add(&split2, p2, p3), 0.5f); + D3DXVec2Scale(&middle, D3DXVec2Add(&middle, &split1, &split2), 0.5f); + + deviation_sq = D3DXVec2LengthSq(D3DXVec2Subtract(&vec, &middle, p2)); + if (deviation_sq < max_deviation_sq) { + struct point2d *pt = add_points(outline, 1); + if (!pt) return E_OUTOFMEMORY; + pt->pos = *p2; + pt->corner = POINTTYPE_CURVE; + /* the end point is omitted because the end line merges into the next segment of + * the split bezier curve, and the end of the split bezier curve is added outside + * this recursive function. */ + } else { + HRESULT hr = add_bezier_points(outline, p1, &split1, &middle, max_deviation_sq); + if (hr != S_OK) return hr; + hr = add_bezier_points(outline, &middle, &split2, p3, max_deviation_sq); + if (hr != S_OK) return hr; + } + + return S_OK; +} + +static inline BOOL is_direction_similar(D3DXVECTOR2 *dir1, D3DXVECTOR2 *dir2, float cos_theta) +{ + /* dot product = cos(theta) */ + return D3DXVec2Dot(dir1, dir2) > cos_theta; +} + +static inline D3DXVECTOR2 *unit_vec2(D3DXVECTOR2 *dir, const D3DXVECTOR2 *pt1, const D3DXVECTOR2 *pt2) +{ + return D3DXVec2Normalize(D3DXVec2Subtract(dir, pt2, pt1), dir); +} + +struct cos_table +{ + float cos_half; + float cos_45; + float cos_90; +}; + +static BOOL attempt_line_merge(struct outline *outline, + int pt_index, + const D3DXVECTOR2 *nextpt, + BOOL to_curve, + const struct cos_table *table) +{ + D3DXVECTOR2 curdir, lastdir; + struct point2d *prevpt, *pt; + BOOL ret = FALSE; + + pt = &outline->items[pt_index]; + pt_index = (pt_index - 1 + outline->count) % outline->count; + prevpt = &outline->items[pt_index]; + + if (to_curve) + pt->corner = pt->corner != POINTTYPE_CORNER ? POINTTYPE_CURVE_MIDDLE : POINTTYPE_CURVE_START; + + if (outline->count < 2) + return FALSE; + + /* remove last point if the next line continues the last line */ + unit_vec2(&lastdir, &prevpt->pos, &pt->pos); + unit_vec2(&curdir, &pt->pos, nextpt); + if (is_direction_similar(&lastdir, &curdir, table->cos_half)) + { + outline->count--; + if (pt->corner == POINTTYPE_CURVE_END) + prevpt->corner = pt->corner; + if (prevpt->corner == POINTTYPE_CURVE_END && to_curve) + prevpt->corner = POINTTYPE_CURVE_MIDDLE; + pt = prevpt; + + ret = TRUE; + if (outline->count < 2) + return ret; + + pt_index = (pt_index - 1 + outline->count) % outline->count; + prevpt = &outline->items[pt_index]; + unit_vec2(&lastdir, &prevpt->pos, &pt->pos); + unit_vec2(&curdir, &pt->pos, nextpt); + } + return ret; +} + +static HRESULT create_outline(struct glyphinfo *glyph, void *raw_outline, int datasize, + float max_deviation_sq, float emsquare, const struct cos_table *cos_table) +{ + TTPOLYGONHEADER *header = (TTPOLYGONHEADER *)raw_outline; + + while ((char *)header < (char *)raw_outline + datasize) + { + TTPOLYCURVE *curve = (TTPOLYCURVE *)(header + 1); + struct point2d *lastpt, *pt; + D3DXVECTOR2 lastdir; + D3DXVECTOR2 *pt_flt; + int j; + struct outline *outline = add_outline(&glyph->outlines); + + if (!outline) + return E_OUTOFMEMORY; + + pt = add_points(outline, 1); + if (!pt) + return E_OUTOFMEMORY; + pt_flt = convert_fixed_to_float(&header->pfxStart, 1, emsquare); + pt->pos = *pt_flt; + pt->corner = POINTTYPE_CORNER; + + if (header->dwType != TT_POLYGON_TYPE) + FIXME("Unknown header type %d\n", header->dwType); + + while ((char *)curve < (char *)header + header->cb) + { + D3DXVECTOR2 bezier_start = outline->items[outline->count - 1].pos; + BOOL to_curve = curve->wType != TT_PRIM_LINE && curve->cpfx > 1; + unsigned int j2 = 0; + + if (!curve->cpfx) { + curve = (TTPOLYCURVE *)&curve->apfx[curve->cpfx]; + continue; + } + + pt_flt = convert_fixed_to_float(curve->apfx, curve->cpfx, emsquare); + + attempt_line_merge(outline, outline->count - 1, &pt_flt[0], to_curve, cos_table); + + if (to_curve) + { + HRESULT hr; + int count = curve->cpfx; + + while (count > 2) + { + D3DXVECTOR2 bezier_end; + + D3DXVec2Scale(&bezier_end, D3DXVec2Add(&bezier_end, &pt_flt[j2], &pt_flt[j2+1]), 0.5f); + hr = add_bezier_points(outline, &bezier_start, &pt_flt[j2], &bezier_end, max_deviation_sq); + if (hr != S_OK) + return hr; + bezier_start = bezier_end; + count--; + j2++; + } + hr = add_bezier_points(outline, &bezier_start, &pt_flt[j2], &pt_flt[j2+1], max_deviation_sq); + if (hr != S_OK) + return hr; + + pt = add_points(outline, 1); + if (!pt) + return E_OUTOFMEMORY; + j2++; + pt->pos = pt_flt[j2]; + pt->corner = POINTTYPE_CURVE_END; + } else { + pt = add_points(outline, curve->cpfx); + if (!pt) + return E_OUTOFMEMORY; + for (j2 = 0; j2 < curve->cpfx; j2++) + { + pt->pos = pt_flt[j2]; + pt->corner = POINTTYPE_CORNER; + pt++; + } + } + + curve = (TTPOLYCURVE *)&curve->apfx[curve->cpfx]; + } + + /* remove last point if the next line continues the last line */ + if (outline->count >= 3) { + BOOL to_curve; + + lastpt = &outline->items[outline->count - 1]; + pt = &outline->items[0]; + if (pt->pos.x == lastpt->pos.x && pt->pos.y == lastpt->pos.y) { + if (lastpt->corner == POINTTYPE_CURVE_END) + { + if (pt->corner == POINTTYPE_CURVE_START) + pt->corner = POINTTYPE_CURVE_MIDDLE; + else + pt->corner = POINTTYPE_CURVE_END; + } + outline->count--; + lastpt = &outline->items[outline->count - 1]; + } else { + /* outline closed with a line from end to start point */ + attempt_line_merge(outline, outline->count - 1, &pt->pos, FALSE, cos_table); + } + lastpt = &outline->items[0]; + to_curve = lastpt->corner != POINTTYPE_CORNER && lastpt->corner != POINTTYPE_CURVE_END; + if (lastpt->corner == POINTTYPE_CURVE_START) + lastpt->corner = POINTTYPE_CORNER; + pt = &outline->items[1]; + if (attempt_line_merge(outline, 0, &pt->pos, to_curve, cos_table)) + *lastpt = outline->items[outline->count]; + } + + lastpt = &outline->items[outline->count - 1]; + pt = &outline->items[0]; + unit_vec2(&lastdir, &lastpt->pos, &pt->pos); + for (j = 0; j < outline->count; j++) + { + D3DXVECTOR2 curdir; + + lastpt = pt; + pt = &outline->items[(j + 1) % outline->count]; + unit_vec2(&curdir, &lastpt->pos, &pt->pos); + + switch (lastpt->corner) + { + case POINTTYPE_CURVE_START: + case POINTTYPE_CURVE_END: + if (!is_direction_similar(&lastdir, &curdir, cos_table->cos_45)) + lastpt->corner = POINTTYPE_CORNER; + break; + case POINTTYPE_CURVE_MIDDLE: + if (!is_direction_similar(&lastdir, &curdir, cos_table->cos_90)) + lastpt->corner = POINTTYPE_CORNER; + else + lastpt->corner = POINTTYPE_CURVE; + break; + default: + break; + } + lastdir = curdir; + } + + header = (TTPOLYGONHEADER *)((char *)header + header->cb); + } + return S_OK; +} + +/* Get the y-distance from a line to a point */ +static float get_line_to_point_y_distance(D3DXVECTOR2 *line_pt1, + D3DXVECTOR2 *line_pt2, + D3DXVECTOR2 *point) +{ + D3DXVECTOR2 line_vec = {0, 0}; + float line_pt_dx; + float line_y; + + D3DXVec2Subtract(&line_vec, line_pt2, line_pt1); + line_pt_dx = point->x - line_pt1->x; + line_y = line_pt1->y + (line_vec.y * line_pt_dx) / line_vec.x; + return point->y - line_y; +} + +static D3DXVECTOR2 *get_indexed_point(struct point2d_index *pt_idx) +{ + return &pt_idx->outline->items[pt_idx->vertex].pos; +} + +static D3DXVECTOR2 *get_ordered_vertex(struct glyphinfo *glyph, WORD index) +{ + return get_indexed_point(&glyph->ordered_vertices.items[index]); +} + +static void remove_triangulation(struct triangulation_array *array, struct triangulation *item) +{ + HeapFree(GetProcessHeap(), 0, item->vertex_stack.items); + MoveMemory(item, item + 1, (char*)&array->items[array->count] - (char*)(item + 1)); + array->count--; +} + +static HRESULT triangulation_add_point(struct triangulation **t_ptr, + struct triangulation_array *triangulations, + WORD vtx_idx, + BOOL to_top) +{ + struct glyphinfo *glyph = triangulations->glyph; + struct triangulation *t = *t_ptr; + HRESULT hr; + face *face; + int f1, f2; + + if (t->last_on_top) { + f1 = 1; + f2 = 2; + } else { + f1 = 2; + f2 = 1; + } + + if (t->last_on_top != to_top && t->vertex_stack.count > 1) { + /* consume all vertices on the stack */ + WORD last_pt = t->vertex_stack.items[0]; + int i; + for (i = 1; i < t->vertex_stack.count; i++) + { + face = add_face(&glyph->faces); + if (!face) return E_OUTOFMEMORY; + (*face)[0] = vtx_idx; + (*face)[f1] = last_pt; + (*face)[f2] = last_pt = t->vertex_stack.items[i]; + } + t->vertex_stack.items[0] = last_pt; + t->vertex_stack.count = 1; + } else if (t->vertex_stack.count > 1) { + int i = t->vertex_stack.count - 1; + D3DXVECTOR2 *point = get_ordered_vertex(glyph, vtx_idx); + WORD top_idx = t->vertex_stack.items[i--]; + D3DXVECTOR2 *top_pt = get_ordered_vertex(glyph, top_idx); + + while (i >= 0) + { + WORD prev_idx = t->vertex_stack.items[i--]; + D3DXVECTOR2 *prev_pt = get_ordered_vertex(glyph, prev_idx); + + if (prev_pt->x != top_pt->x && + ((to_top && get_line_to_point_y_distance(prev_pt, top_pt, point) > 0) || + (!to_top && get_line_to_point_y_distance(prev_pt, top_pt, point) < 0))) + break; + + face = add_face(&glyph->faces); + if (!face) return E_OUTOFMEMORY; + (*face)[0] = vtx_idx; + (*face)[f1] = prev_idx; + (*face)[f2] = top_idx; + + top_pt = prev_pt; + top_idx = prev_idx; + t->vertex_stack.count--; + } + } + t->last_on_top = to_top; + + hr = add_vertex_index(&t->vertex_stack, vtx_idx); + + if (hr == S_OK && t->merging) { + struct triangulation *t2; + + t2 = to_top ? t - 1 : t + 1; + t2->merging = FALSE; + hr = triangulation_add_point(&t2, triangulations, vtx_idx, to_top); + if (hr != S_OK) return hr; + remove_triangulation(triangulations, t); + if (t2 > t) + t2--; + *t_ptr = t2; + } + return hr; +} + +/* check if the point is next on the outline for either the top or bottom */ +static D3DXVECTOR2 *triangulation_get_next_point(struct triangulation *t, struct glyphinfo *glyph, BOOL on_top) +{ + int i = t->last_on_top == on_top ? t->vertex_stack.count - 1 : 0; + WORD idx = t->vertex_stack.items[i]; + struct point2d_index *pt_idx = &glyph->ordered_vertices.items[idx]; + struct outline *outline = pt_idx->outline; + + if (on_top) + i = (pt_idx->vertex + outline->count - 1) % outline->count; + else + i = (pt_idx->vertex + 1) % outline->count; + + return &outline->items[i].pos; +} + +static int compare_vertex_indices(const void *a, const void *b) +{ + const struct point2d_index *idx1 = a, *idx2 = b; + const D3DXVECTOR2 *p1 = &idx1->outline->items[idx1->vertex].pos; + const D3DXVECTOR2 *p2 = &idx2->outline->items[idx2->vertex].pos; + float diff = p1->x - p2->x; + + if (diff == 0.0f) + diff = p1->y - p2->y; + + return diff == 0.0f ? 0 : (diff > 0.0f ? -1 : 1); +} + +static HRESULT triangulate(struct triangulation_array *triangulations) +{ + int sweep_idx; + HRESULT hr; + struct glyphinfo *glyph = triangulations->glyph; + int nb_vertices = 0; + int i; + struct point2d_index *idx_ptr; + + for (i = 0; i < glyph->outlines.count; i++) + nb_vertices += glyph->outlines.items[i].count; + + glyph->ordered_vertices.items = HeapAlloc(GetProcessHeap(), 0, + nb_vertices * sizeof(*glyph->ordered_vertices.items)); + if (!glyph->ordered_vertices.items) + return E_OUTOFMEMORY; + + idx_ptr = glyph->ordered_vertices.items; + for (i = 0; i < glyph->outlines.count; i++) + { + struct outline *outline = &glyph->outlines.items[i]; + int j; + + idx_ptr->outline = outline; + idx_ptr->vertex = 0; + idx_ptr++; + for (j = outline->count - 1; j > 0; j--) + { + idx_ptr->outline = outline; + idx_ptr->vertex = j; + idx_ptr++; + } + } + glyph->ordered_vertices.count = nb_vertices; + + /* Native implementation seems to try to create a triangle fan from + * the first outline point if the glyph only has one outline. */ + if (glyph->outlines.count == 1) + { + struct outline *outline = glyph->outlines.items; + D3DXVECTOR2 *base = &outline->items[0].pos; + D3DXVECTOR2 *last = &outline->items[1].pos; + float ccw = 0; + + for (i = 2; i < outline->count; i++) + { + D3DXVECTOR2 *next = &outline->items[i].pos; + D3DXVECTOR2 v1 = {0.0f, 0.0f}; + D3DXVECTOR2 v2 = {0.0f, 0.0f}; + + D3DXVec2Subtract(&v1, base, last); + D3DXVec2Subtract(&v2, last, next); + ccw = D3DXVec2CCW(&v1, &v2); + if (ccw > 0.0f) + break; + + last = next; + } + if (ccw <= 0) + { + glyph->faces.items = HeapAlloc(GetProcessHeap(), 0, + (outline->count - 2) * sizeof(glyph->faces.items[0])); + if (!glyph->faces.items) + return E_OUTOFMEMORY; + + glyph->faces.count = outline->count - 2; + for (i = 0; i < glyph->faces.count; i++) + { + glyph->faces.items[i][0] = 0; + glyph->faces.items[i][1] = i + 1; + glyph->faces.items[i][2] = i + 2; + } + return S_OK; + } + } + + /* Perform 2D polygon triangulation for complex glyphs. + * Triangulation is performed using a sweep line concept, from right to left, + * by processing vertices in sorted order. Complex polygons are split into + * monotone polygons which are triangulated separately. */ + /* FIXME: The order of the faces is not consistent with the native implementation. */ + + /* Reserve space for maximum possible faces from triangulation. + * # faces for outer outlines = outline->count - 2 + * # faces for inner outlines = outline->count + 2 + * There must be at least 1 outer outline. */ + glyph->faces.items = HeapAlloc(GetProcessHeap(), 0, + (nb_vertices + glyph->outlines.count * 2 - 4) * sizeof(glyph->faces.items[0])); + if (!glyph->faces.items) + return E_OUTOFMEMORY; + + qsort(glyph->ordered_vertices.items, nb_vertices, + sizeof(glyph->ordered_vertices.items[0]), compare_vertex_indices); + for (sweep_idx = 0; sweep_idx < glyph->ordered_vertices.count; sweep_idx++) + { + int start = 0; + int end = triangulations->count; + + while (start < end) + { + D3DXVECTOR2 *sweep_vtx = get_ordered_vertex(glyph, sweep_idx); + int current = (start + end) / 2; + struct triangulation *t = &triangulations->items[current]; + BOOL on_top_outline = FALSE; + D3DXVECTOR2 *top_next, *bottom_next; + WORD top_idx, bottom_idx; + + if (t->merging && t->last_on_top) + top_next = triangulation_get_next_point(t + 1, glyph, TRUE); + else + top_next = triangulation_get_next_point(t, glyph, TRUE); + if (sweep_vtx == top_next) + { + if (t->merging && t->last_on_top) + t++; + hr = triangulation_add_point(&t, triangulations, sweep_idx, TRUE); + if (hr != S_OK) return hr; + + if (t + 1 < &triangulations->items[triangulations->count] && + triangulation_get_next_point(t + 1, glyph, FALSE) == sweep_vtx) + { + /* point also on bottom outline of higher triangulation */ + struct triangulation *t2 = t + 1; + hr = triangulation_add_point(&t2, triangulations, sweep_idx, FALSE); + if (hr != S_OK) return hr; + + t->merging = TRUE; + t2->merging = TRUE; + } + on_top_outline = TRUE; + } + + if (t->merging && !t->last_on_top) + bottom_next = triangulation_get_next_point(t - 1, glyph, FALSE); + else + bottom_next = triangulation_get_next_point(t, glyph, FALSE); + if (sweep_vtx == bottom_next) + { + if (t->merging && !t->last_on_top) + t--; + if (on_top_outline) { + /* outline finished */ + remove_triangulation(triangulations, t); + break; + } + + hr = triangulation_add_point(&t, triangulations, sweep_idx, FALSE); + if (hr != S_OK) return hr; + + if (t > triangulations->items && + triangulation_get_next_point(t - 1, glyph, TRUE) == sweep_vtx) + { + struct triangulation *t2 = t - 1; + /* point also on top outline of lower triangulation */ + hr = triangulation_add_point(&t2, triangulations, sweep_idx, TRUE); + if (hr != S_OK) return hr; + t = t2 + 1; /* t may be invalidated by triangulation merging */ + + t->merging = TRUE; + t2->merging = TRUE; + } + break; + } + if (on_top_outline) + break; + + if (t->last_on_top) { + top_idx = t->vertex_stack.items[t->vertex_stack.count - 1]; + bottom_idx = t->vertex_stack.items[0]; + } else { + top_idx = t->vertex_stack.items[0]; + bottom_idx = t->vertex_stack.items[t->vertex_stack.count - 1]; + } + + /* check if the point is inside or outside this polygon */ + if (get_line_to_point_y_distance(get_ordered_vertex(glyph, top_idx), + top_next, sweep_vtx) > 0) + { /* above */ + start = current + 1; + } else if (get_line_to_point_y_distance(get_ordered_vertex(glyph, bottom_idx), + bottom_next, sweep_vtx) < 0) + { /* below */ + end = current; + } else if (t->merging) { + /* inside, so cancel merging */ + struct triangulation *t2 = t->last_on_top ? t + 1 : t - 1; + t->merging = FALSE; + t2->merging = FALSE; + hr = triangulation_add_point(&t, triangulations, sweep_idx, t->last_on_top); + if (hr != S_OK) return hr; + hr = triangulation_add_point(&t2, triangulations, sweep_idx, t2->last_on_top); + if (hr != S_OK) return hr; + break; + } else { + /* inside, so split polygon into two monotone parts */ + struct triangulation *t2 = add_triangulation(triangulations); + if (!t2) return E_OUTOFMEMORY; + MoveMemory(t + 1, t, (char*)(t2 + 1) - (char*)t); + if (t->last_on_top) { + t2 = t + 1; + } else { + t2 = t; + t++; + } + + ZeroMemory(&t2->vertex_stack, sizeof(t2->vertex_stack)); + hr = add_vertex_index(&t2->vertex_stack, t->vertex_stack.items[t->vertex_stack.count - 1]); + if (hr != S_OK) return hr; + hr = add_vertex_index(&t2->vertex_stack, sweep_idx); + if (hr != S_OK) return hr; + t2->last_on_top = !t->last_on_top; + + hr = triangulation_add_point(&t, triangulations, sweep_idx, t->last_on_top); + if (hr != S_OK) return hr; + break; + } + } + if (start >= end) + { + struct triangulation *t; + struct triangulation *t2 = add_triangulation(triangulations); + if (!t2) return E_OUTOFMEMORY; + t = &triangulations->items[start]; + MoveMemory(t + 1, t, (char*)(t2 + 1) - (char*)t); + ZeroMemory(t, sizeof(*t)); + hr = add_vertex_index(&t->vertex_stack, sweep_idx); + if (hr != S_OK) return hr; + } + } + return S_OK; +} + +HRESULT WINAPI D3DXCreateTextW(struct IDirect3DDevice9 *device, HDC hdc, const WCHAR *text, float deviation, + float extrusion, struct ID3DXMesh **mesh_ptr, struct ID3DXBuffer **adjacency, GLYPHMETRICSFLOAT *glyphmetrics) +{ + HRESULT hr; + ID3DXMesh *mesh = NULL; + DWORD nb_vertices, nb_faces; + DWORD nb_front_faces, nb_corners, nb_outline_points; + struct vertex *vertices = NULL; + face *faces = NULL; + int textlen = 0; + float offset_x; + LOGFONTW lf; + OUTLINETEXTMETRICW otm; + HFONT font = NULL, oldfont = NULL; + const MAT2 identity = {{0, 1}, {0, 0}, {0, 0}, {0, 1}}; + void *raw_outline = NULL; + int bufsize = 0; + struct glyphinfo *glyphs = NULL; + GLYPHMETRICS gm; + struct triangulation_array triangulations = {0, 0, NULL}; + int i; + struct vertex *vertex_ptr; + face *face_ptr; + float max_deviation_sq; + const struct cos_table cos_table = { + cos(D3DXToRadian(0.5f)), + cos(D3DXToRadian(45.0f)), + cos(D3DXToRadian(90.0f)), + }; + int f1, f2; + + TRACE("(%p, %p, %s, %f, %f, %p, %p, %p)\n", device, hdc, + debugstr_w(text), deviation, extrusion, mesh_ptr, adjacency, glyphmetrics); + + if (!device || !hdc || !text || !*text || deviation < 0.0f || extrusion < 0.0f || !mesh_ptr) + return D3DERR_INVALIDCALL; + + if (adjacency) + { + FIXME("Case of adjacency != NULL not implemented.\n"); + return E_NOTIMPL; + } + + if (!GetObjectW(GetCurrentObject(hdc, OBJ_FONT), sizeof(lf), &lf) || + !GetOutlineTextMetricsW(hdc, sizeof(otm), &otm)) + { + return D3DERR_INVALIDCALL; + } + + if (deviation == 0.0f) + deviation = 1.0f / otm.otmEMSquare; + max_deviation_sq = deviation * deviation; + + lf.lfHeight = otm.otmEMSquare; + lf.lfWidth = 0; + font = CreateFontIndirectW(&lf); + if (!font) { + hr = E_OUTOFMEMORY; + goto error; + } + oldfont = SelectObject(hdc, font); + + textlen = strlenW(text); + for (i = 0; i < textlen; i++) + { + int datasize = GetGlyphOutlineW(hdc, text[i], GGO_NATIVE, &gm, 0, NULL, &identity); + if (datasize < 0) + return D3DERR_INVALIDCALL; + if (bufsize < datasize) + bufsize = datasize; + } + if (!bufsize) { /* e.g. text == " " */ + hr = D3DERR_INVALIDCALL; + goto error; + } + + glyphs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, textlen * sizeof(*glyphs)); + raw_outline = HeapAlloc(GetProcessHeap(), 0, bufsize); + if (!glyphs || !raw_outline) { + hr = E_OUTOFMEMORY; + goto error; + } + + offset_x = 0.0f; + for (i = 0; i < textlen; i++) + { + /* get outline points from data returned from GetGlyphOutline */ + int datasize; + + glyphs[i].offset_x = offset_x; + + datasize = GetGlyphOutlineW(hdc, text[i], GGO_NATIVE, &gm, bufsize, raw_outline, &identity); + hr = create_outline(&glyphs[i], raw_outline, datasize, + max_deviation_sq, otm.otmEMSquare, &cos_table); + if (hr != S_OK) goto error; + + triangulations.glyph = &glyphs[i]; + hr = triangulate(&triangulations); + if (hr != S_OK) goto error; + if (triangulations.count) { + ERR("%d incomplete triangulations of glyph (%u).\n", triangulations.count, text[i]); + triangulations.count = 0; + } + + if (glyphmetrics) + { + glyphmetrics[i].gmfBlackBoxX = gm.gmBlackBoxX / (float)otm.otmEMSquare; + glyphmetrics[i].gmfBlackBoxY = gm.gmBlackBoxY / (float)otm.otmEMSquare; + glyphmetrics[i].gmfptGlyphOrigin.x = gm.gmptGlyphOrigin.x / (float)otm.otmEMSquare; + glyphmetrics[i].gmfptGlyphOrigin.y = gm.gmptGlyphOrigin.y / (float)otm.otmEMSquare; + glyphmetrics[i].gmfCellIncX = gm.gmCellIncX / (float)otm.otmEMSquare; + glyphmetrics[i].gmfCellIncY = gm.gmCellIncY / (float)otm.otmEMSquare; + } + offset_x += gm.gmCellIncX / (float)otm.otmEMSquare; + } + + /* corner points need an extra vertex for the different side faces normals */ + nb_corners = 0; + nb_outline_points = 0; + nb_front_faces = 0; + for (i = 0; i < textlen; i++) + { + int j; + nb_outline_points += glyphs[i].ordered_vertices.count; + nb_front_faces += glyphs[i].faces.count; + for (j = 0; j < glyphs[i].outlines.count; j++) + { + int k; + struct outline *outline = &glyphs[i].outlines.items[j]; + nb_corners++; /* first outline point always repeated as a corner */ + for (k = 1; k < outline->count; k++) + if (outline->items[k].corner) + nb_corners++; + } + } + + nb_vertices = (nb_outline_points + nb_corners) * 2 + nb_outline_points * 2; + nb_faces = nb_outline_points * 2 + nb_front_faces * 2; + + + hr = D3DXCreateMeshFVF(nb_faces, nb_vertices, D3DXMESH_MANAGED, + D3DFVF_XYZ | D3DFVF_NORMAL, device, &mesh); + if (FAILED(hr)) + goto error; + + hr = mesh->lpVtbl->LockVertexBuffer(mesh, 0, (LPVOID *)&vertices); + if (FAILED(hr)) + goto error; + + hr = mesh->lpVtbl->LockIndexBuffer(mesh, 0, (LPVOID *)&faces); + if (FAILED(hr)) + goto error; + + /* convert 2D vertices and faces into 3D mesh */ + vertex_ptr = vertices; + face_ptr = faces; + if (extrusion == 0.0f) { + f1 = 1; + f2 = 2; + } else { + f1 = 2; + f2 = 1; + } + for (i = 0; i < textlen; i++) + { + int j; + int count; + struct vertex *back_vertices; + face *back_faces; + + /* side vertices and faces */ + for (j = 0; j < glyphs[i].outlines.count; j++) + { + struct vertex *outline_vertices = vertex_ptr; + struct outline *outline = &glyphs[i].outlines.items[j]; + int k; + struct point2d *prevpt = &outline->items[outline->count - 1]; + struct point2d *pt = &outline->items[0]; + + for (k = 1; k <= outline->count; k++) + { + struct vertex vtx; + struct point2d *nextpt = &outline->items[k % outline->count]; + WORD vtx_idx = vertex_ptr - vertices; + D3DXVECTOR2 vec; + + if (pt->corner == POINTTYPE_CURVE_START) + D3DXVec2Subtract(&vec, &pt->pos, &prevpt->pos); + else if (pt->corner) + D3DXVec2Subtract(&vec, &nextpt->pos, &pt->pos); + else + D3DXVec2Subtract(&vec, &nextpt->pos, &prevpt->pos); + D3DXVec2Normalize(&vec, &vec); + vtx.normal.x = -vec.y; + vtx.normal.y = vec.x; + vtx.normal.z = 0; + + vtx.position.x = pt->pos.x + glyphs[i].offset_x; + vtx.position.y = pt->pos.y; + vtx.position.z = 0; + *vertex_ptr++ = vtx; + + vtx.position.z = -extrusion; + *vertex_ptr++ = vtx; + + vtx.position.x = nextpt->pos.x + glyphs[i].offset_x; + vtx.position.y = nextpt->pos.y; + if (pt->corner && nextpt->corner && nextpt->corner != POINTTYPE_CURVE_END) { + vtx.position.z = -extrusion; + *vertex_ptr++ = vtx; + vtx.position.z = 0; + *vertex_ptr++ = vtx; + + (*face_ptr)[0] = vtx_idx; + (*face_ptr)[1] = vtx_idx + 2; + (*face_ptr)[2] = vtx_idx + 1; + face_ptr++; + + (*face_ptr)[0] = vtx_idx; + (*face_ptr)[1] = vtx_idx + 3; + (*face_ptr)[2] = vtx_idx + 2; + face_ptr++; + } else { + if (nextpt->corner) { + if (nextpt->corner == POINTTYPE_CURVE_END) { + D3DXVECTOR2 *nextpt2 = &outline->items[(k + 1) % outline->count].pos; + D3DXVec2Subtract(&vec, nextpt2, &nextpt->pos); + } else { + D3DXVec2Subtract(&vec, &nextpt->pos, &pt->pos); + } + D3DXVec2Normalize(&vec, &vec); + vtx.normal.x = -vec.y; + vtx.normal.y = vec.x; + + vtx.position.z = 0; + *vertex_ptr++ = vtx; + vtx.position.z = -extrusion; + *vertex_ptr++ = vtx; + } + + (*face_ptr)[0] = vtx_idx; + (*face_ptr)[1] = vtx_idx + 3; + (*face_ptr)[2] = vtx_idx + 1; + face_ptr++; + + (*face_ptr)[0] = vtx_idx; + (*face_ptr)[1] = vtx_idx + 2; + (*face_ptr)[2] = vtx_idx + 3; + face_ptr++; + } + + prevpt = pt; + pt = nextpt; + } + if (!pt->corner) { + *vertex_ptr++ = *outline_vertices++; + *vertex_ptr++ = *outline_vertices++; + } + } + + /* back vertices and faces */ + back_faces = face_ptr; + back_vertices = vertex_ptr; + for (j = 0; j < glyphs[i].ordered_vertices.count; j++) + { + D3DXVECTOR2 *pt = get_ordered_vertex(&glyphs[i], j); + vertex_ptr->position.x = pt->x + glyphs[i].offset_x; + vertex_ptr->position.y = pt->y; + vertex_ptr->position.z = 0; + vertex_ptr->normal.x = 0; + vertex_ptr->normal.y = 0; + vertex_ptr->normal.z = 1; + vertex_ptr++; + } + count = back_vertices - vertices; + for (j = 0; j < glyphs[i].faces.count; j++) + { + face *f = &glyphs[i].faces.items[j]; + (*face_ptr)[0] = (*f)[0] + count; + (*face_ptr)[1] = (*f)[1] + count; + (*face_ptr)[2] = (*f)[2] + count; + face_ptr++; + } + + /* front vertices and faces */ + j = count = vertex_ptr - back_vertices; + while (j--) + { + vertex_ptr->position.x = back_vertices->position.x; + vertex_ptr->position.y = back_vertices->position.y; + vertex_ptr->position.z = -extrusion; + vertex_ptr->normal.x = 0; + vertex_ptr->normal.y = 0; + vertex_ptr->normal.z = extrusion == 0.0f ? 1.0f : -1.0f; + vertex_ptr++; + back_vertices++; + } + j = face_ptr - back_faces; + while (j--) + { + (*face_ptr)[0] = (*back_faces)[0] + count; + (*face_ptr)[1] = (*back_faces)[f1] + count; + (*face_ptr)[2] = (*back_faces)[f2] + count; + face_ptr++; + back_faces++; + } + } + + *mesh_ptr = mesh; + hr = D3D_OK; +error: + if (mesh) { + if (faces) mesh->lpVtbl->UnlockIndexBuffer(mesh); + if (vertices) mesh->lpVtbl->UnlockVertexBuffer(mesh); + if (hr != D3D_OK) mesh->lpVtbl->Release(mesh); + } + if (glyphs) { + for (i = 0; i < textlen; i++) + { + int j; + for (j = 0; j < glyphs[i].outlines.count; j++) + HeapFree(GetProcessHeap(), 0, glyphs[i].outlines.items[j].items); + HeapFree(GetProcessHeap(), 0, glyphs[i].outlines.items); + HeapFree(GetProcessHeap(), 0, glyphs[i].faces.items); + HeapFree(GetProcessHeap(), 0, glyphs[i].ordered_vertices.items); + } + HeapFree(GetProcessHeap(), 0, glyphs); + } + if (triangulations.items) { + int i; + for (i = 0; i < triangulations.count; i++) + HeapFree(GetProcessHeap(), 0, triangulations.items[i].vertex_stack.items); + HeapFree(GetProcessHeap(), 0, triangulations.items); + } + HeapFree(GetProcessHeap(), 0, raw_outline); + if (oldfont) SelectObject(hdc, oldfont); + if (font) DeleteObject(font); + + return hr; +} + +HRESULT WINAPI D3DXValidMesh(ID3DXMesh *mesh, const DWORD *adjacency, ID3DXBuffer **errors_and_warnings) +{ + FIXME("(%p, %p, %p): stub\n", mesh, adjacency, *errors_and_warnings); + + return E_NOTIMPL; +} + +static BOOL weld_float1(void *to, void *from, FLOAT epsilon) +{ + FLOAT *v1 = to; + FLOAT *v2 = from; + + if (fabsf(*v1 - *v2) <= epsilon) + { + *v1 = *v2; + + return TRUE; + } + + return FALSE; +} + +static BOOL weld_float2(void *to, void *from, FLOAT epsilon) +{ + D3DXVECTOR2 *v1 = to; + D3DXVECTOR2 *v2 = from; + FLOAT diff_x = fabsf(v1->x - v2->x); + FLOAT diff_y = fabsf(v1->y - v2->y); + FLOAT max_abs_diff = max(diff_x, diff_y); + + if (max_abs_diff <= epsilon) + { + memcpy(to, from, sizeof(D3DXVECTOR2)); + + return TRUE; + } + + return FALSE; +} + +static BOOL weld_float3(void *to, void *from, FLOAT epsilon) +{ + D3DXVECTOR3 *v1 = to; + D3DXVECTOR3 *v2 = from; + FLOAT diff_x = fabsf(v1->x - v2->x); + FLOAT diff_y = fabsf(v1->y - v2->y); + FLOAT diff_z = fabsf(v1->z - v2->z); + FLOAT max_abs_diff = max(diff_x, diff_y); + max_abs_diff = max(diff_z, max_abs_diff); + + if (max_abs_diff <= epsilon) + { + memcpy(to, from, sizeof(D3DXVECTOR3)); + + return TRUE; + } + + return FALSE; +} + +static BOOL weld_float4(void *to, void *from, FLOAT epsilon) +{ + D3DXVECTOR4 *v1 = to; + D3DXVECTOR4 *v2 = from; + FLOAT diff_x = fabsf(v1->x - v2->x); + FLOAT diff_y = fabsf(v1->y - v2->y); + FLOAT diff_z = fabsf(v1->z - v2->z); + FLOAT diff_w = fabsf(v1->w - v2->w); + FLOAT max_abs_diff = fmax(diff_x, diff_y); + max_abs_diff = max(diff_z, max_abs_diff); + max_abs_diff = max(diff_w, max_abs_diff); + + if (max_abs_diff <= epsilon) + { + memcpy(to, from, sizeof(D3DXVECTOR4)); + + return TRUE; + } + + return FALSE; +} + +static BOOL weld_ubyte4(void *to, void *from, FLOAT epsilon) +{ + BYTE *b1 = to; + BYTE *b2 = from; + BYTE truncated_epsilon = (BYTE)epsilon; + BYTE diff_x = b1[0] > b2[0] ? b1[0] - b2[0] : b2[0] - b1[0]; + BYTE diff_y = b1[1] > b2[1] ? b1[1] - b2[1] : b2[1] - b1[1]; + BYTE diff_z = b1[2] > b2[2] ? b1[2] - b2[2] : b2[2] - b1[2]; + BYTE diff_w = b1[3] > b2[3] ? b1[3] - b2[3] : b2[3] - b1[3]; + BYTE max_diff = max(diff_x, diff_y); + max_diff = max(diff_z, max_diff); + max_diff = max(diff_w, max_diff); + + if (max_diff <= truncated_epsilon) + { + memcpy(to, from, 4 * sizeof(BYTE)); + + return TRUE; + } + + return FALSE; +} + +static BOOL weld_ubyte4n(void *to, void *from, FLOAT epsilon) +{ + return weld_ubyte4(to, from, epsilon * UCHAR_MAX); +} + +static BOOL weld_d3dcolor(void *to, void *from, FLOAT epsilon) +{ + return weld_ubyte4n(to, from, epsilon); +} + +static BOOL weld_short2(void *to, void *from, FLOAT epsilon) +{ + SHORT *s1 = to; + SHORT *s2 = from; + SHORT truncated_epsilon = (SHORT)epsilon; + SHORT diff_x = abs(s1[0] - s2[0]); + SHORT diff_y = abs(s1[1] - s2[1]); + SHORT max_abs_diff = max(diff_x, diff_y); + + if (max_abs_diff <= truncated_epsilon) + { + memcpy(to, from, 2 * sizeof(SHORT)); + + return TRUE; + } + + return FALSE; +} + +static BOOL weld_short2n(void *to, void *from, FLOAT epsilon) +{ + return weld_short2(to, from, epsilon * SHRT_MAX); +} + +static BOOL weld_short4(void *to, void *from, FLOAT epsilon) +{ + SHORT *s1 = to; + SHORT *s2 = from; + SHORT truncated_epsilon = (SHORT)epsilon; + SHORT diff_x = abs(s1[0] - s2[0]); + SHORT diff_y = abs(s1[1] - s2[1]); + SHORT diff_z = abs(s1[2] - s2[2]); + SHORT diff_w = abs(s1[3] - s2[3]); + SHORT max_abs_diff = max(diff_x, diff_y); + max_abs_diff = max(diff_z, max_abs_diff); + max_abs_diff = max(diff_w, max_abs_diff); + + if (max_abs_diff <= truncated_epsilon) + { + memcpy(to, from, 4 * sizeof(SHORT)); + + return TRUE; + } + + return FALSE; +} + +static BOOL weld_short4n(void *to, void *from, FLOAT epsilon) +{ + return weld_short4(to, from, epsilon * SHRT_MAX); +} + +static BOOL weld_ushort2n(void *to, void *from, FLOAT epsilon) +{ + USHORT *s1 = to; + USHORT *s2 = from; + USHORT scaled_epsilon = (USHORT)(epsilon * USHRT_MAX); + USHORT diff_x = s1[0] > s2[0] ? s1[0] - s2[0] : s2[0] - s1[0]; + USHORT diff_y = s1[1] > s2[1] ? s1[1] - s2[1] : s2[1] - s1[1]; + USHORT max_diff = max(diff_x, diff_y); + + if (max_diff <= scaled_epsilon) + { + memcpy(to, from, 2 * sizeof(USHORT)); + + return TRUE; + } + + return FALSE; +} + +static BOOL weld_ushort4n(void *to, void *from, FLOAT epsilon) +{ + USHORT *s1 = to; + USHORT *s2 = from; + USHORT scaled_epsilon = (USHORT)(epsilon * USHRT_MAX); + USHORT diff_x = s1[0] > s2[0] ? s1[0] - s2[0] : s2[0] - s1[0]; + USHORT diff_y = s1[1] > s2[1] ? s1[1] - s2[1] : s2[1] - s1[1]; + USHORT diff_z = s1[2] > s2[2] ? s1[2] - s2[2] : s2[2] - s1[2]; + USHORT diff_w = s1[3] > s2[3] ? s1[3] - s2[3] : s2[3] - s1[3]; + USHORT max_diff = max(diff_x, diff_y); + max_diff = max(diff_z, max_diff); + max_diff = max(diff_w, max_diff); + + if (max_diff <= scaled_epsilon) + { + memcpy(to, from, 4 * sizeof(USHORT)); + + return TRUE; + } + + return FALSE; +} + +struct udec3 +{ + UINT x; + UINT y; + UINT z; + UINT w; +}; + +static struct udec3 dword_to_udec3(DWORD d) +{ + struct udec3 v; + + v.x = d & 0x3ff; + v.y = (d & 0xffc00) >> 10; + v.z = (d & 0x3ff00000) >> 20; + v.w = (d & 0xc0000000) >> 30; + + return v; +} + +static BOOL weld_udec3(void *to, void *from, FLOAT epsilon) +{ + DWORD *d1 = to; + DWORD *d2 = from; + struct udec3 v1 = dword_to_udec3(*d1); + struct udec3 v2 = dword_to_udec3(*d2); + UINT truncated_epsilon = (UINT)epsilon; + UINT diff_x = v1.x > v2.x ? v1.x - v2.x : v2.x - v1.x; + UINT diff_y = v1.y > v2.y ? v1.y - v2.y : v2.y - v1.y; + UINT diff_z = v1.z > v2.z ? v1.z - v2.z : v2.z - v1.z; + UINT diff_w = v1.w > v2.w ? v1.w - v2.w : v2.w - v1.w; + UINT max_diff = max(diff_x, diff_y); + max_diff = max(diff_z, max_diff); + max_diff = max(diff_w, max_diff); + + if (max_diff <= truncated_epsilon) + { + memcpy(to, from, sizeof(DWORD)); + + return TRUE; + } + + return FALSE; +} + +struct dec3n +{ + INT x; + INT y; + INT z; + INT w; +}; + +static struct dec3n dword_to_dec3n(DWORD d) +{ + struct dec3n v; + + v.x = d & 0x3ff; + v.y = (d & 0xffc00) >> 10; + v.z = (d & 0x3ff00000) >> 20; + v.w = (d & 0xc0000000) >> 30; + + return v; +} + +static BOOL weld_dec3n(void *to, void *from, FLOAT epsilon) +{ + const UINT MAX_DEC3N = 511; + DWORD *d1 = to; + DWORD *d2 = from; + struct dec3n v1 = dword_to_dec3n(*d1); + struct dec3n v2 = dword_to_dec3n(*d2); + INT scaled_epsilon = (INT)(epsilon * MAX_DEC3N); + INT diff_x = abs(v1.x - v2.x); + INT diff_y = abs(v1.y - v2.y); + INT diff_z = abs(v1.z - v2.z); + INT diff_w = abs(v1.w - v2.w); + INT max_abs_diff = max(diff_x, diff_y); + max_abs_diff = max(diff_z, max_abs_diff); + max_abs_diff = max(diff_w, max_abs_diff); + + if (max_abs_diff <= scaled_epsilon) + { + memcpy(to, from, sizeof(DWORD)); + + return TRUE; + } + + return FALSE; +} + +static BOOL weld_float16_2(void *to, void *from, FLOAT epsilon) +{ + D3DXFLOAT16 *v1_float16 = to; + D3DXFLOAT16 *v2_float16 = from; + FLOAT diff_x; + FLOAT diff_y; + FLOAT max_abs_diff; + const UINT NUM_ELEM = 2; + FLOAT v1[2]; + FLOAT v2[2]; + + D3DXFloat16To32Array(v1, v1_float16, NUM_ELEM); + D3DXFloat16To32Array(v2, v2_float16, NUM_ELEM); + + diff_x = fabsf(v1[0] - v2[0]); + diff_y = fabsf(v1[1] - v2[1]); + max_abs_diff = max(diff_x, diff_y); + + if (max_abs_diff <= epsilon) + { + memcpy(to, from, NUM_ELEM * sizeof(D3DXFLOAT16)); + + return TRUE; + } + + return FALSE; +} + +static BOOL weld_float16_4(void *to, void *from, FLOAT epsilon) +{ + D3DXFLOAT16 *v1_float16 = to; + D3DXFLOAT16 *v2_float16 = from; + FLOAT diff_x; + FLOAT diff_y; + FLOAT diff_z; + FLOAT diff_w; + FLOAT max_abs_diff; + const UINT NUM_ELEM = 4; + FLOAT v1[4]; + FLOAT v2[4]; + + D3DXFloat16To32Array(v1, v1_float16, NUM_ELEM); + D3DXFloat16To32Array(v2, v2_float16, NUM_ELEM); + + diff_x = fabsf(v1[0] - v2[0]); + diff_y = fabsf(v1[1] - v2[1]); + diff_z = fabsf(v1[2] - v2[2]); + diff_w = fabsf(v1[3] - v2[3]); + max_abs_diff = max(diff_x, diff_y); + max_abs_diff = max(diff_z, max_abs_diff); + max_abs_diff = max(diff_w, max_abs_diff); + + if (max_abs_diff <= epsilon) + { + memcpy(to, from, NUM_ELEM * sizeof(D3DXFLOAT16)); + + return TRUE; + } + + return FALSE; +} + +/* Sets the vertex components to the same value if they are within epsilon. */ +static BOOL weld_component(void *to, void *from, D3DDECLTYPE type, FLOAT epsilon) +{ + /* Quiet FIXMEs as this is in a loop with potentially thousand of iterations. */ + BOOL fixme_once_unused = FALSE; + BOOL fixme_once_unknown = FALSE; + + switch (type) + { + case D3DDECLTYPE_FLOAT1: + return weld_float1(to, from, epsilon); + + case D3DDECLTYPE_FLOAT2: + return weld_float2(to, from, epsilon); + + case D3DDECLTYPE_FLOAT3: + return weld_float3(to, from, epsilon); + + case D3DDECLTYPE_FLOAT4: + return weld_float4(to, from, epsilon); + + case D3DDECLTYPE_D3DCOLOR: + return weld_d3dcolor(to, from, epsilon); + + case D3DDECLTYPE_UBYTE4: + return weld_ubyte4(to, from, epsilon); + + case D3DDECLTYPE_SHORT2: + return weld_short2(to, from, epsilon); + + case D3DDECLTYPE_SHORT4: + return weld_short4(to, from, epsilon); + + case D3DDECLTYPE_UBYTE4N: + return weld_ubyte4n(to, from, epsilon); + + case D3DDECLTYPE_SHORT2N: + return weld_short2n(to, from, epsilon); + + case D3DDECLTYPE_SHORT4N: + return weld_short4n(to, from, epsilon); + + case D3DDECLTYPE_USHORT2N: + return weld_ushort2n(to, from, epsilon); + + case D3DDECLTYPE_USHORT4N: + return weld_ushort4n(to, from, epsilon); + + case D3DDECLTYPE_UDEC3: + return weld_udec3(to, from, epsilon); + + case D3DDECLTYPE_DEC3N: + return weld_dec3n(to, from, epsilon); + + case D3DDECLTYPE_FLOAT16_2: + return weld_float16_2(to, from, epsilon); + + case D3DDECLTYPE_FLOAT16_4: + return weld_float16_4(to, from, epsilon); + + case D3DDECLTYPE_UNUSED: + if (!fixme_once_unused++) + FIXME("D3DDECLTYPE_UNUSED welding not implemented.\n"); + break; + + default: + if (!fixme_once_unknown++) + FIXME("Welding of unknown declaration type %d is not implemented.\n", type); + break; + } + + return FALSE; +} + +static FLOAT get_component_epsilon(const D3DVERTEXELEMENT9 *decl_ptr, const D3DXWELDEPSILONS *epsilons) +{ + FLOAT epsilon = 0.0f; + /* Quiet FIXMEs as this is in a loop with potentially thousand of iterations. */ + static BOOL fixme_once_blendindices = FALSE; + static BOOL fixme_once_positiont = FALSE; + static BOOL fixme_once_fog = FALSE; + static BOOL fixme_once_depth = FALSE; + static BOOL fixme_once_sample = FALSE; + static BOOL fixme_once_unknown = FALSE; + + switch (decl_ptr->Usage) + { + case D3DDECLUSAGE_POSITION: + epsilon = epsilons->Position; + break; + case D3DDECLUSAGE_BLENDWEIGHT: + epsilon = epsilons->BlendWeights; + break; + case D3DDECLUSAGE_NORMAL: + epsilon = epsilons->Normals; + break; + case D3DDECLUSAGE_PSIZE: + epsilon = epsilons->PSize; + break; + case D3DDECLUSAGE_TEXCOORD: + { + BYTE usage_index = decl_ptr->UsageIndex; + if (usage_index > 7) + usage_index = 7; + epsilon = epsilons->Texcoords[usage_index]; + break; + } + case D3DDECLUSAGE_TANGENT: + epsilon = epsilons->Tangent; + break; + case D3DDECLUSAGE_BINORMAL: + epsilon = epsilons->Binormal; + break; + case D3DDECLUSAGE_TESSFACTOR: + epsilon = epsilons->TessFactor; + break; + case D3DDECLUSAGE_COLOR: + if (decl_ptr->UsageIndex == 0) + epsilon = epsilons->Diffuse; + else if (decl_ptr->UsageIndex == 1) + epsilon = epsilons->Specular; + else + epsilon = 1e-6f; + break; + case D3DDECLUSAGE_BLENDINDICES: + if (!fixme_once_blendindices++) + FIXME("D3DDECLUSAGE_BLENDINDICES welding not implemented.\n"); + break; + case D3DDECLUSAGE_POSITIONT: + if (!fixme_once_positiont++) + FIXME("D3DDECLUSAGE_POSITIONT welding not implemented.\n"); + break; + case D3DDECLUSAGE_FOG: + if (!fixme_once_fog++) + FIXME("D3DDECLUSAGE_FOG welding not implemented.\n"); + break; + case D3DDECLUSAGE_DEPTH: + if (!fixme_once_depth++) + FIXME("D3DDECLUSAGE_DEPTH welding not implemented.\n"); + break; + case D3DDECLUSAGE_SAMPLE: + if (!fixme_once_sample++) + FIXME("D3DDECLUSAGE_SAMPLE welding not implemented.\n"); + break; + default: + if (!fixme_once_unknown++) + FIXME("Unknown usage %x\n", decl_ptr->Usage); + break; + } + + return epsilon; +} + +/* Helper function for reading a 32-bit index buffer. */ +static inline DWORD read_ib(void *index_buffer, BOOL indices_are_32bit, + DWORD index) +{ + if (indices_are_32bit) + { + DWORD *indices = index_buffer; + return indices[index]; + } + else + { + WORD *indices = index_buffer; + return indices[index]; + } +} + +/* Helper function for writing to a 32-bit index buffer. */ +static inline void write_ib(void *index_buffer, BOOL indices_are_32bit, + DWORD index, DWORD value) +{ + if (indices_are_32bit) + { + DWORD *indices = index_buffer; + indices[index] = value; + } + else + { + WORD *indices = index_buffer; + indices[index] = value; + } +} + +/************************************************************************* + * D3DXWeldVertices (D3DX9_36.@) + * + * Welds together similar vertices. The similarity between vert- + * ices can be the position and other components such as + * normal and color. + * + * PARAMS + * mesh [I] Mesh which vertices will be welded together. + * flags [I] D3DXWELDEPSILONSFLAGS specifying how to weld. + * epsilons [I] How similar a component needs to be for welding. + * adjacency [I] Which faces are adjacent to other faces. + * adjacency_out [O] Updated adjacency after welding. + * face_remap_out [O] Which faces the old faces have been mapped to. + * vertex_remap_out [O] Which vertices the old vertices have been mapped to. + * + * RETURNS + * Success: D3D_OK. + * Failure: D3DERR_INVALIDCALL, E_OUTOFMEMORY. + * + * BUGS + * Attribute sorting not implemented. + * + */ +HRESULT WINAPI D3DXWeldVertices(ID3DXMesh *mesh, DWORD flags, const D3DXWELDEPSILONS *epsilons, + const DWORD *adjacency, DWORD *adjacency_out, DWORD *face_remap_out, ID3DXBuffer **vertex_remap_out) +{ + DWORD *adjacency_generated = NULL; + const DWORD *adjacency_ptr; + DWORD *attributes = NULL; + const FLOAT DEFAULT_EPSILON = 1.0e-6f; + HRESULT hr; + DWORD i; + void *indices = NULL; + BOOL indices_are_32bit = mesh->lpVtbl->GetOptions(mesh) & D3DXMESH_32BIT; + DWORD optimize_flags; + DWORD *point_reps = NULL; + ID3DXMeshImpl *This = impl_from_ID3DXMesh(mesh); + DWORD *vertex_face_map = NULL; + ID3DXBuffer *vertex_remap = NULL; + BYTE *vertices = NULL; + + TRACE("(%p, %x, %p, %p, %p, %p, %p)\n", mesh, flags, epsilons, + adjacency, adjacency_out, face_remap_out, vertex_remap_out); + + if (flags == 0) + { + WARN("No flags is undefined. Using D3DXWELDEPSILONS_WELDPARTIALMATCHES instead.\n"); + flags = D3DXWELDEPSILONS_WELDPARTIALMATCHES; + } + + if (adjacency) /* Use supplied adjacency. */ + { + adjacency_ptr = adjacency; + } + else /* Adjacency has to be generated. */ + { + adjacency_generated = HeapAlloc(GetProcessHeap(), 0, 3 * This->numfaces * sizeof(*adjacency_generated)); + if (!adjacency_generated) + { + ERR("Couldn't allocate memory for adjacency_generated.\n"); + hr = E_OUTOFMEMORY; + goto cleanup; + } + hr = mesh->lpVtbl->GenerateAdjacency(mesh, DEFAULT_EPSILON, adjacency_generated); + if (FAILED(hr)) + { + ERR("Couldn't generate adjacency.\n"); + goto cleanup; + } + adjacency_ptr = adjacency_generated; + } + + /* Point representation says which vertices can be replaced. */ + point_reps = HeapAlloc(GetProcessHeap(), 0, This->numvertices * sizeof(*point_reps)); + if (!point_reps) + { + hr = E_OUTOFMEMORY; + ERR("Couldn't allocate memory for point_reps.\n"); + goto cleanup; + } + hr = mesh->lpVtbl->ConvertAdjacencyToPointReps(mesh, adjacency_ptr, point_reps); + if (FAILED(hr)) + { + ERR("ConvertAdjacencyToPointReps failed.\n"); + goto cleanup; + } + + hr = mesh->lpVtbl->LockIndexBuffer(mesh, 0, &indices); + if (FAILED(hr)) + { + ERR("Couldn't lock index buffer.\n"); + goto cleanup; + } + + hr = mesh->lpVtbl->LockAttributeBuffer(mesh, 0, &attributes); + if (FAILED(hr)) + { + ERR("Couldn't lock attribute buffer.\n"); + goto cleanup; + } + vertex_face_map = HeapAlloc(GetProcessHeap(), 0, This->numvertices * sizeof(*vertex_face_map)); + if (!vertex_face_map) + { + hr = E_OUTOFMEMORY; + ERR("Couldn't allocate memory for vertex_face_map.\n"); + goto cleanup; + } + /* Build vertex face map, so that a vertex's face can be looked up. */ + for (i = 0; i < This->numfaces; i++) + { + DWORD j; + for (j = 0; j < 3; j++) + { + DWORD index = read_ib(indices, indices_are_32bit, 3*i + j); + vertex_face_map[index] = i; + } + } + + if (flags & D3DXWELDEPSILONS_WELDPARTIALMATCHES) + { + hr = mesh->lpVtbl->LockVertexBuffer(mesh, 0, (void**)&vertices); + if (FAILED(hr)) + { + ERR("Couldn't lock vertex buffer.\n"); + goto cleanup; + } + /* For each vertex that can be removed, compare its vertex components + * with the vertex components from the vertex that can replace it. A + * vertex is only fully replaced if all the components match and the + * flag D3DXWELDEPSILONS_DONOTREMOVEVERTICES is not set, and they + * belong to the same attribute group. Otherwise the vertex components + * that are within epsilon are set to the same value. + */ + for (i = 0; i < 3 * This->numfaces; i++) + { + D3DVERTEXELEMENT9 *decl_ptr; + DWORD vertex_size = mesh->lpVtbl->GetNumBytesPerVertex(mesh); + DWORD num_vertex_components; + INT matches = 0; + BOOL all_match; + DWORD index = read_ib(indices, indices_are_32bit, i); + + for (decl_ptr = This->cached_declaration, num_vertex_components = 0; decl_ptr->Stream != 0xFF; decl_ptr++, num_vertex_components++) + { + BYTE *to = &vertices[vertex_size*index + decl_ptr->Offset]; + BYTE *from = &vertices[vertex_size*point_reps[index] + decl_ptr->Offset]; + FLOAT epsilon = get_component_epsilon(decl_ptr, epsilons); + + /* Don't weld self */ + if (index == point_reps[index]) + { + matches++; + continue; + } + + if (weld_component(to, from, decl_ptr->Type, epsilon)) + matches++; + } + + all_match = (num_vertex_components == matches); + if (all_match && !(flags & D3DXWELDEPSILONS_DONOTREMOVEVERTICES)) + { + DWORD to_face = vertex_face_map[index]; + DWORD from_face = vertex_face_map[point_reps[index]]; + if(attributes[to_face] != attributes[from_face] && !(flags & D3DXWELDEPSILONS_DONOTSPLIT)) + continue; + write_ib(indices, indices_are_32bit, i, point_reps[index]); + } + } + mesh->lpVtbl->UnlockVertexBuffer(mesh); + vertices = NULL; + } + else if (flags & D3DXWELDEPSILONS_WELDALL) + { + for (i = 0; i < 3 * This->numfaces; i++) + { + DWORD index = read_ib(indices, indices_are_32bit, i); + DWORD to_face = vertex_face_map[index]; + DWORD from_face = vertex_face_map[point_reps[index]]; + if(attributes[to_face] != attributes[from_face] && !(flags & D3DXWELDEPSILONS_DONOTSPLIT)) + continue; + write_ib(indices, indices_are_32bit, i, point_reps[index]); + } + } + mesh->lpVtbl->UnlockAttributeBuffer(mesh); + attributes = NULL; + mesh->lpVtbl->UnlockIndexBuffer(mesh); + indices = NULL; + + /* Compact mesh using OptimizeInplace */ + optimize_flags = D3DXMESHOPT_COMPACT; + hr = mesh->lpVtbl->OptimizeInplace(mesh, optimize_flags, adjacency_ptr, adjacency_out, face_remap_out, vertex_remap_out); + if (FAILED(hr)) + { + ERR("Couldn't compact mesh.\n"); + goto cleanup; + } + + hr = D3D_OK; +cleanup: + HeapFree(GetProcessHeap(), 0, adjacency_generated); + HeapFree(GetProcessHeap(), 0, point_reps); + HeapFree(GetProcessHeap(), 0, vertex_face_map); + if (attributes) mesh->lpVtbl->UnlockAttributeBuffer(mesh); + if (indices) mesh->lpVtbl->UnlockIndexBuffer(mesh); + if (vertex_remap) ID3DXBuffer_Release(vertex_remap); + if (vertices) mesh->lpVtbl->UnlockVertexBuffer(mesh); + + return hr; +} + +/************************************************************************* + * D3DXOptimizeFaces (D3DX9_36.@) + * + * Re-orders the faces so the vertex cache is used optimally. + * + * PARAMS + * indices [I] Pointer to an index buffer belonging to a mesh. + * num_faces [I] Number of faces in the mesh. + * num_vertices [I] Number of vertices in the mesh. + * indices_are_32bit [I] Specifies whether indices are 32- or 16-bit. + * face_remap [I/O] The new order the faces should be drawn in. + * + * RETURNS + * Success: D3D_OK. + * Failure: D3DERR_INVALIDCALL. + * + * BUGS + * The face re-ordering does not use the vertex cache optimally. + * + */ +HRESULT WINAPI D3DXOptimizeFaces(LPCVOID indices, + UINT num_faces, + UINT num_vertices, + BOOL indices_are_32bit, + DWORD *face_remap) +{ + UINT i; + UINT j = num_faces - 1; + UINT limit_16_bit = 2 << 15; /* According to MSDN */ + HRESULT hr = D3D_OK; + + FIXME("(%p, %u, %u, %s, %p): semi-stub. Face order will not be optimal.\n", + indices, num_faces, num_vertices, + indices_are_32bit ? "TRUE" : "FALSE", face_remap); + + if (!indices_are_32bit && num_faces >= limit_16_bit) + { + WARN("Number of faces must be less than %d when using 16-bit indices.\n", + limit_16_bit); + hr = D3DERR_INVALIDCALL; + goto error; + } + + if (!face_remap) + { + WARN("Face remap pointer is NULL.\n"); + hr = D3DERR_INVALIDCALL; + goto error; + } + + /* The faces are drawn in reverse order for simple meshes. This ordering + * is not optimal for complicated meshes, but will not break anything + * either. The ordering should be changed to take advantage of the vertex + * cache on the graphics card. + * + * TODO Re-order to take advantage of vertex cache. + */ + for (i = 0; i < num_faces; i++) + { + face_remap[i] = j--; + } + + return D3D_OK; + +error: + return hr; +} diff --git a/dll/directx/wine/d3dx9_36/render.c b/dll/directx/wine/d3dx9_36/render.c new file mode 100644 index 00000000000..9a28e6394c0 --- /dev/null +++ b/dll/directx/wine/d3dx9_36/render.c @@ -0,0 +1,794 @@ +/* + * Copyright (C) 2012 Jأ³zef Kucia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "wine/debug.h" +#include "d3dx9_36_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(d3dx); + +struct device_state +{ + DWORD num_render_targets; + IDirect3DSurface9 **render_targets; + IDirect3DSurface9 *depth_stencil; + D3DVIEWPORT9 viewport; +}; + +static HRESULT device_state_init(IDirect3DDevice9 *device, struct device_state *state) +{ + HRESULT hr; + D3DCAPS9 caps; + unsigned int i; + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + if (FAILED(hr)) return hr; + + state->num_render_targets = caps.NumSimultaneousRTs; + state->render_targets = HeapAlloc(GetProcessHeap(), 0, + state->num_render_targets * sizeof(IDirect3DSurface9 *)); + if (!state->render_targets) + return E_OUTOFMEMORY; + + for (i = 0; i < state->num_render_targets; i++) + state->render_targets[i] = NULL; + state->depth_stencil = NULL; + return D3D_OK; +} + +static void device_state_capture(IDirect3DDevice9 *device, struct device_state *state) +{ + HRESULT hr; + unsigned int i; + + IDirect3DDevice9_GetViewport(device, &state->viewport); + + for (i = 0; i < state->num_render_targets; i++) + { + hr = IDirect3DDevice9_GetRenderTarget(device, i, &state->render_targets[i]); + if (FAILED(hr)) state->render_targets[i] = NULL; + } + + hr = IDirect3DDevice9_GetDepthStencilSurface(device, &state->depth_stencil); + if (FAILED(hr)) state->depth_stencil = NULL; +} + +static void device_state_restore(IDirect3DDevice9 *device, struct device_state *state) +{ + unsigned int i; + + for (i = 0; i < state->num_render_targets; i++) + { + IDirect3DDevice9_SetRenderTarget(device, i, state->render_targets[i]); + if (state->render_targets[i]) + IDirect3DSurface9_Release(state->render_targets[i]); + state->render_targets[i] = NULL; + } + + IDirect3DDevice9_SetDepthStencilSurface(device, state->depth_stencil); + if (state->depth_stencil) + { + IDirect3DSurface9_Release(state->depth_stencil); + state->depth_stencil = NULL; + } + + IDirect3DDevice9_SetViewport(device, &state->viewport); +} + +static void device_state_release(struct device_state *state) +{ + unsigned int i; + + for (i = 0; i < state->num_render_targets; i++) + { + if (state->render_targets[i]) + IDirect3DSurface9_Release(state->render_targets[i]); + } + + HeapFree(GetProcessHeap(), 0, state->render_targets); + + if (state->depth_stencil) IDirect3DSurface9_Release(state->depth_stencil); +} + +struct render_to_surface +{ + ID3DXRenderToSurface ID3DXRenderToSurface_iface; + LONG ref; + + IDirect3DDevice9 *device; + D3DXRTS_DESC desc; + + IDirect3DSurface9 *dst_surface; + + IDirect3DSurface9 *render_target; + IDirect3DSurface9 *depth_stencil; + + struct device_state previous_state; +}; + +static inline struct render_to_surface *impl_from_ID3DXRenderToSurface(ID3DXRenderToSurface *iface) +{ + return CONTAINING_RECORD(iface, struct render_to_surface, ID3DXRenderToSurface_iface); +} + +static HRESULT WINAPI D3DXRenderToSurface_QueryInterface(ID3DXRenderToSurface *iface, + REFIID riid, + void **out) +{ + TRACE("iface %p, riid %s, out %p\n", iface, debugstr_guid(riid), out); + + if (IsEqualGUID(riid, &IID_ID3DXRenderToSurface) + || IsEqualGUID(riid, &IID_IUnknown)) + { + IUnknown_AddRef(iface); + *out = iface; + return S_OK; + } + + WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid)); + + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI D3DXRenderToSurface_AddRef(ID3DXRenderToSurface *iface) +{ + struct render_to_surface *render = impl_from_ID3DXRenderToSurface(iface); + ULONG ref = InterlockedIncrement(&render->ref); + + TRACE("%p increasing refcount to %u\n", iface, ref); + + return ref; +} + +static ULONG WINAPI D3DXRenderToSurface_Release(ID3DXRenderToSurface *iface) +{ + struct render_to_surface *render = impl_from_ID3DXRenderToSurface(iface); + ULONG ref = InterlockedDecrement(&render->ref); + + TRACE("%p decreasing refcount to %u\n", iface, ref); + + if (!ref) + { + if (render->dst_surface) IDirect3DSurface9_Release(render->dst_surface); + + if (render->render_target) IDirect3DSurface9_Release(render->render_target); + if (render->depth_stencil) IDirect3DSurface9_Release(render->depth_stencil); + + device_state_release(&render->previous_state); + + IDirect3DDevice9_Release(render->device); + + HeapFree(GetProcessHeap(), 0, render); + } + + return ref; +} + +static HRESULT WINAPI D3DXRenderToSurface_GetDevice(ID3DXRenderToSurface *iface, + IDirect3DDevice9 **device) +{ + struct render_to_surface *render = impl_from_ID3DXRenderToSurface(iface); + + TRACE("(%p)->(%p)\n", iface, device); + + if (!device) return D3DERR_INVALIDCALL; + + IDirect3DDevice9_AddRef(render->device); + *device = render->device; + return D3D_OK; +} + +static HRESULT WINAPI D3DXRenderToSurface_GetDesc(ID3DXRenderToSurface *iface, + D3DXRTS_DESC *desc) +{ + struct render_to_surface *render = impl_from_ID3DXRenderToSurface(iface); + + TRACE("(%p)->(%p)\n", iface, desc); + + if (!desc) return D3DERR_INVALIDCALL; + + *desc = render->desc; + return D3D_OK; +} + +static HRESULT WINAPI D3DXRenderToSurface_BeginScene(ID3DXRenderToSurface *iface, + IDirect3DSurface9 *surface, + const D3DVIEWPORT9 *viewport) +{ + struct render_to_surface *render = impl_from_ID3DXRenderToSurface(iface); + unsigned int i; + IDirect3DDevice9 *device; + D3DSURFACE_DESC surface_desc; + HRESULT hr = D3DERR_INVALIDCALL; + D3DMULTISAMPLE_TYPE multi_sample_type = D3DMULTISAMPLE_NONE; + DWORD multi_sample_quality = 0; + + TRACE("(%p)->(%p, %p)\n", iface, surface, viewport); + + if (!surface || render->dst_surface) return D3DERR_INVALIDCALL; + + IDirect3DSurface9_GetDesc(surface, &surface_desc); + if (surface_desc.Format != render->desc.Format + || surface_desc.Width != render->desc.Width + || surface_desc.Height != render->desc.Height) + return D3DERR_INVALIDCALL; + + if (viewport) + { + if (viewport->X > render->desc.Width || viewport->Y > render->desc.Height + || viewport->X + viewport->Width > render->desc.Width + || viewport->Y + viewport->Height > render->desc.Height) + return D3DERR_INVALIDCALL; + + if (!(surface_desc.Usage & D3DUSAGE_RENDERTARGET) + && (viewport->X != 0 || viewport->Y != 0 + || viewport->Width != render->desc.Width + || viewport->Height != render->desc.Height)) + return D3DERR_INVALIDCALL; + } + + device = render->device; + + device_state_capture(device, &render->previous_state); + + /* prepare for rendering to surface */ + for (i = 1; i < render->previous_state.num_render_targets; i++) + IDirect3DDevice9_SetRenderTarget(device, i, NULL); + + if (surface_desc.Usage & D3DUSAGE_RENDERTARGET) + { + hr = IDirect3DDevice9_SetRenderTarget(device, 0, surface); + multi_sample_type = surface_desc.MultiSampleType; + multi_sample_quality = surface_desc.MultiSampleQuality; + } + else + { + hr = IDirect3DDevice9_CreateRenderTarget(device, render->desc.Width, render->desc.Height, + render->desc.Format, multi_sample_type, multi_sample_quality, FALSE, + &render->render_target, NULL); + if (FAILED(hr)) goto cleanup; + hr = IDirect3DDevice9_SetRenderTarget(device, 0, render->render_target); + } + + if (FAILED(hr)) goto cleanup; + + if (render->desc.DepthStencil) + { + hr = IDirect3DDevice9_CreateDepthStencilSurface(device, render->desc.Width, render->desc.Height, + render->desc.DepthStencilFormat, multi_sample_type, multi_sample_quality, TRUE, + &render->depth_stencil, NULL); + } + else render->depth_stencil = NULL; + + if (FAILED(hr)) goto cleanup; + + hr = IDirect3DDevice9_SetDepthStencilSurface(device, render->depth_stencil); + if (FAILED(hr)) goto cleanup; + + if (viewport) IDirect3DDevice9_SetViewport(device, viewport); + + IDirect3DSurface9_AddRef(surface); + render->dst_surface = surface; + return IDirect3DDevice9_BeginScene(device); + +cleanup: + device_state_restore(device, &render->previous_state); + + if (render->dst_surface) IDirect3DSurface9_Release(render->dst_surface); + render->dst_surface = NULL; + + if (render->render_target) IDirect3DSurface9_Release(render->render_target); + render->render_target = NULL; + if (render->depth_stencil) IDirect3DSurface9_Release(render->depth_stencil); + render->depth_stencil = NULL; + + return hr; +} + +static HRESULT WINAPI D3DXRenderToSurface_EndScene(ID3DXRenderToSurface *iface, + DWORD filter) +{ + struct render_to_surface *render = impl_from_ID3DXRenderToSurface(iface); + HRESULT hr; + + TRACE("(%p)->(%#x)\n", iface, filter); + + if (!render->dst_surface) return D3DERR_INVALIDCALL; + + hr = IDirect3DDevice9_EndScene(render->device); + + /* copy render target data to destination surface, if needed */ + if (render->render_target) + { + hr = D3DXLoadSurfaceFromSurface(render->dst_surface, NULL, NULL, + render->render_target, NULL, NULL, filter, 0); + if (FAILED(hr)) ERR("Copying render target data to surface failed %#x\n", hr); + } + + device_state_restore(render->device, &render->previous_state); + + /* release resources */ + if (render->render_target) + { + IDirect3DSurface9_Release(render->render_target); + render->render_target = NULL; + } + + if (render->depth_stencil) + { + IDirect3DSurface9_Release(render->depth_stencil); + render->depth_stencil = NULL; + } + + IDirect3DSurface9_Release(render->dst_surface); + render->dst_surface = NULL; + + return hr; +} + +static HRESULT WINAPI D3DXRenderToSurface_OnLostDevice(ID3DXRenderToSurface *iface) +{ + FIXME("(%p)->(): stub\n", iface); + return D3D_OK; +} + +static HRESULT WINAPI D3DXRenderToSurface_OnResetDevice(ID3DXRenderToSurface *iface) +{ + FIXME("(%p)->(): stub\n", iface); + return D3D_OK; +} + +static const ID3DXRenderToSurfaceVtbl render_to_surface_vtbl = +{ + /* IUnknown methods */ + D3DXRenderToSurface_QueryInterface, + D3DXRenderToSurface_AddRef, + D3DXRenderToSurface_Release, + /* ID3DXRenderToSurface methods */ + D3DXRenderToSurface_GetDevice, + D3DXRenderToSurface_GetDesc, + D3DXRenderToSurface_BeginScene, + D3DXRenderToSurface_EndScene, + D3DXRenderToSurface_OnLostDevice, + D3DXRenderToSurface_OnResetDevice +}; + +HRESULT WINAPI D3DXCreateRenderToSurface(IDirect3DDevice9 *device, + UINT width, + UINT height, + D3DFORMAT format, + BOOL depth_stencil, + D3DFORMAT depth_stencil_format, + ID3DXRenderToSurface **out) +{ + HRESULT hr; + struct render_to_surface *render; + + TRACE("(%p, %u, %u, %#x, %d, %#x, %p)\n", device, width, height, format, + depth_stencil, depth_stencil_format, out); + + if (!device || !out) return D3DERR_INVALIDCALL; + + render = HeapAlloc(GetProcessHeap(), 0, sizeof(struct render_to_surface)); + if (!render) return E_OUTOFMEMORY; + + render->ID3DXRenderToSurface_iface.lpVtbl = &render_to_surface_vtbl; + render->ref = 1; + + render->desc.Width = width; + render->desc.Height = height; + render->desc.Format = format; + render->desc.DepthStencil = depth_stencil; + render->desc.DepthStencilFormat = depth_stencil_format; + + render->dst_surface = NULL; + render->render_target = NULL; + render->depth_stencil = NULL; + + hr = device_state_init(device, &render->previous_state); + if (FAILED(hr)) + { + HeapFree(GetProcessHeap(), 0, render); + return hr; + } + + IDirect3DDevice9_AddRef(device); + render->device = device; + + *out = &render->ID3DXRenderToSurface_iface; + return D3D_OK; +} + + +enum render_state +{ + INITIAL, + + CUBE_BEGIN, + CUBE_FACE +}; + +struct render_to_envmap +{ + ID3DXRenderToEnvMap ID3DXRenderToEnvMap_iface; + LONG ref; + + IDirect3DDevice9 *device; + D3DXRTE_DESC desc; + + enum render_state state; + struct device_state previous_device_state; + + D3DCUBEMAP_FACES face; + DWORD filter; + + IDirect3DSurface9 *render_target; + IDirect3DSurface9 *depth_stencil; + + IDirect3DCubeTexture9 *dst_cube_texture; +}; + +static void copy_render_target_to_cube_texture_face(IDirect3DCubeTexture9 *cube_texture, + D3DCUBEMAP_FACES face, IDirect3DSurface9 *render_target, DWORD filter) +{ + HRESULT hr; + IDirect3DSurface9 *cube_surface; + + IDirect3DCubeTexture9_GetCubeMapSurface(cube_texture, face, 0, &cube_surface); + + hr = D3DXLoadSurfaceFromSurface(cube_surface, NULL, NULL, render_target, NULL, NULL, filter, 0); + if (FAILED(hr)) ERR("Copying render target data to surface failed %#x\n", hr); + + IDirect3DSurface9_Release(cube_surface); +} + +static inline struct render_to_envmap *impl_from_ID3DXRenderToEnvMap(ID3DXRenderToEnvMap *iface) +{ + return CONTAINING_RECORD(iface, struct render_to_envmap, ID3DXRenderToEnvMap_iface); +} + +static HRESULT WINAPI D3DXRenderToEnvMap_QueryInterface(ID3DXRenderToEnvMap *iface, + REFIID riid, + void **out) +{ + TRACE("iface %p, riid %s, out %p\n", iface, debugstr_guid(riid), out); + + if (IsEqualGUID(riid, &IID_ID3DXRenderToEnvMap) + || IsEqualGUID(riid, &IID_IUnknown)) + { + IUnknown_AddRef(iface); + *out = iface; + return S_OK; + } + + WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid)); + + *out = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI D3DXRenderToEnvMap_AddRef(ID3DXRenderToEnvMap *iface) +{ + struct render_to_envmap *render = impl_from_ID3DXRenderToEnvMap(iface); + ULONG ref = InterlockedIncrement(&render->ref); + + TRACE("%p increasing refcount to %u\n", iface, ref); + + return ref; +} + +static ULONG WINAPI D3DXRenderToEnvMap_Release(ID3DXRenderToEnvMap *iface) +{ + struct render_to_envmap *render = impl_from_ID3DXRenderToEnvMap(iface); + ULONG ref = InterlockedDecrement(&render->ref); + + TRACE("%p decreasing refcount to %u\n", iface, ref); + + if (!ref) + { + if (render->dst_cube_texture) IDirect3DSurface9_Release(render->dst_cube_texture); + + if (render->render_target) IDirect3DSurface9_Release(render->render_target); + if (render->depth_stencil) IDirect3DSurface9_Release(render->depth_stencil); + + device_state_release(&render->previous_device_state); + + IDirect3DDevice9_Release(render->device); + + HeapFree(GetProcessHeap(), 0, render); + } + + return ref; +} + +static HRESULT WINAPI D3DXRenderToEnvMap_GetDevice(ID3DXRenderToEnvMap *iface, + IDirect3DDevice9 **device) +{ + struct render_to_envmap *render = impl_from_ID3DXRenderToEnvMap(iface); + + TRACE("(%p)->(%p)\n", iface, device); + + if (!device) return D3DERR_INVALIDCALL; + + IDirect3DDevice9_AddRef(render->device); + *device = render->device; + return D3D_OK; +} + +static HRESULT WINAPI D3DXRenderToEnvMap_GetDesc(ID3DXRenderToEnvMap *iface, + D3DXRTE_DESC *desc) +{ + struct render_to_envmap *render = impl_from_ID3DXRenderToEnvMap(iface); + + TRACE("(%p)->(%p)\n", iface, desc); + + if (!desc) return D3DERR_INVALIDCALL; + + *desc = render->desc; + return D3D_OK; +} + +static HRESULT WINAPI D3DXRenderToEnvMap_BeginCube(ID3DXRenderToEnvMap *iface, + IDirect3DCubeTexture9 *texture) +{ + struct render_to_envmap *render = impl_from_ID3DXRenderToEnvMap(iface); + HRESULT hr; + D3DSURFACE_DESC level_desc; + + TRACE("(%p)->(%p)\n", iface, texture); + + if (!texture) return D3DERR_INVALIDCALL; + + if (render->state != INITIAL) return D3DERR_INVALIDCALL; + + IDirect3DCubeTexture9_GetLevelDesc(texture, 0, &level_desc); + if (level_desc.Format != render->desc.Format || level_desc.Width != render->desc.Size) + return D3DERR_INVALIDCALL; + + if (!(level_desc.Usage & D3DUSAGE_RENDERTARGET)) + { + hr = IDirect3DDevice9_CreateRenderTarget(render->device, level_desc.Width, level_desc.Height, + level_desc.Format, level_desc.MultiSampleType, level_desc.MultiSampleQuality, + TRUE, &render->render_target, NULL); + if (FAILED(hr)) goto cleanup; + IDirect3DCubeTexture9_GetLevelDesc(texture, 0, &level_desc); + } + + if (render->desc.DepthStencil) + { + hr = IDirect3DDevice9_CreateDepthStencilSurface(render->device, level_desc.Width, level_desc.Height, + render->desc.DepthStencilFormat, level_desc.MultiSampleType, level_desc.MultiSampleQuality, + TRUE, &render->depth_stencil, NULL); + if (FAILED(hr)) goto cleanup; + } + + IDirect3DCubeTexture9_AddRef(texture); + render->dst_cube_texture = texture; + render->state = CUBE_BEGIN; + return D3D_OK; + +cleanup: + if (render->dst_cube_texture) IDirect3DSurface9_Release(render->dst_cube_texture); + render->dst_cube_texture = NULL; + + if (render->render_target) IDirect3DSurface9_Release(render->render_target); + render->render_target = NULL; + if (render->depth_stencil) IDirect3DSurface9_Release(render->depth_stencil); + render->depth_stencil = NULL; + + return hr; +} + +static HRESULT WINAPI D3DXRenderToEnvMap_BeginSphere(ID3DXRenderToEnvMap *iface, + IDirect3DTexture9 *texture) +{ + FIXME("(%p)->(%p): stub\n", iface, texture); + return E_NOTIMPL; +} + +static HRESULT WINAPI D3DXRenderToEnvMap_BeginHemisphere(ID3DXRenderToEnvMap *iface, + IDirect3DTexture9 *pos_z_texture, + IDirect3DTexture9 *neg_z_texture) +{ + FIXME("(%p)->(%p, %p): stub\n", iface, pos_z_texture, neg_z_texture); + return E_NOTIMPL; +} + +static HRESULT WINAPI D3DXRenderToEnvMap_BeginParabolic(ID3DXRenderToEnvMap *iface, + IDirect3DTexture9 *pos_z_texture, + IDirect3DTexture9 *neg_z_texture) +{ + FIXME("(%p)->(%p, %p): stub\n", iface, pos_z_texture, neg_z_texture); + return E_NOTIMPL; +} + +static HRESULT WINAPI D3DXRenderToEnvMap_Face(ID3DXRenderToEnvMap *iface, + D3DCUBEMAP_FACES face, + DWORD filter) +{ + struct render_to_envmap *render = impl_from_ID3DXRenderToEnvMap(iface); + HRESULT hr; + unsigned int i; + + TRACE("(%p)->(%u, %#x)\n", iface, face, filter); + + if (render->state == CUBE_FACE) + { + IDirect3DDevice9_EndScene(render->device); + if (render->render_target) + copy_render_target_to_cube_texture_face(render->dst_cube_texture, render->face, + render->render_target, render->filter); + + device_state_restore(render->device, &render->previous_device_state); + + render->state = CUBE_BEGIN; + } + else if (render->state != CUBE_BEGIN) + return D3DERR_INVALIDCALL; + + device_state_capture(render->device, &render->previous_device_state); + + for (i = 1; i < render->previous_device_state.num_render_targets; i++) + IDirect3DDevice9_SetRenderTarget(render->device, i, NULL); + + if (!render->render_target) + { + IDirect3DSurface9 *render_target; + IDirect3DCubeTexture9_GetCubeMapSurface(render->dst_cube_texture, face, 0, &render_target); + hr = IDirect3DDevice9_SetRenderTarget(render->device, 0, render_target); + IDirect3DSurface9_Release(render_target); + } + else hr = IDirect3DDevice9_SetRenderTarget(render->device, 0, render->render_target); + + if (FAILED(hr)) goto cleanup; + + hr = IDirect3DDevice9_SetDepthStencilSurface(render->device, render->depth_stencil); + if (FAILED(hr)) goto cleanup; + + render->state = CUBE_FACE; + render->face = face; + render->filter = filter; + return IDirect3DDevice9_BeginScene(render->device); + +cleanup: + device_state_restore(render->device, &render->previous_device_state); + return hr; +} + +static HRESULT WINAPI D3DXRenderToEnvMap_End(ID3DXRenderToEnvMap *iface, + DWORD filter) +{ + struct render_to_envmap *render = impl_from_ID3DXRenderToEnvMap(iface); + + TRACE("(%p)->(%#x)\n", iface, filter); + + if (render->state == INITIAL) return D3DERR_INVALIDCALL; + + if (render->state == CUBE_FACE) + { + IDirect3DDevice9_EndScene(render->device); + if (render->render_target) + copy_render_target_to_cube_texture_face(render->dst_cube_texture, render->face, + render->render_target, render->filter); + + device_state_restore(render->device, &render->previous_device_state); + } + + D3DXFilterTexture((IDirect3DBaseTexture9 *)render->dst_cube_texture, NULL, 0, filter); + + if (render->render_target) + { + IDirect3DSurface9_Release(render->render_target); + render->render_target = NULL; + } + + if (render->depth_stencil) + { + IDirect3DSurface9_Release(render->depth_stencil); + render->depth_stencil = NULL; + } + + IDirect3DSurface9_Release(render->dst_cube_texture); + render->dst_cube_texture = NULL; + + render->state = INITIAL; + return D3D_OK; +} + +static HRESULT WINAPI D3DXRenderToEnvMap_OnLostDevice(ID3DXRenderToEnvMap *iface) +{ + FIXME("(%p)->(): stub\n", iface); + return D3D_OK; +} + +static HRESULT WINAPI D3DXRenderToEnvMap_OnResetDevice(ID3DXRenderToEnvMap *iface) +{ + FIXME("(%p)->(): stub\n", iface); + return D3D_OK; +} + +static const ID3DXRenderToEnvMapVtbl render_to_envmap_vtbl = +{ + /* IUnknown methods */ + D3DXRenderToEnvMap_QueryInterface, + D3DXRenderToEnvMap_AddRef, + D3DXRenderToEnvMap_Release, + /* ID3DXRenderToEnvMap methods */ + D3DXRenderToEnvMap_GetDevice, + D3DXRenderToEnvMap_GetDesc, + D3DXRenderToEnvMap_BeginCube, + D3DXRenderToEnvMap_BeginSphere, + D3DXRenderToEnvMap_BeginHemisphere, + D3DXRenderToEnvMap_BeginParabolic, + D3DXRenderToEnvMap_Face, + D3DXRenderToEnvMap_End, + D3DXRenderToEnvMap_OnLostDevice, + D3DXRenderToEnvMap_OnResetDevice +}; + +HRESULT WINAPI D3DXCreateRenderToEnvMap(IDirect3DDevice9 *device, + UINT size, + UINT mip_levels, + D3DFORMAT format, + BOOL depth_stencil, + D3DFORMAT depth_stencil_format, + ID3DXRenderToEnvMap **out) +{ + HRESULT hr; + struct render_to_envmap *render; + + TRACE("(%p, %u, %u, %#x, %d, %#x, %p)\n", device, size, mip_levels, + format, depth_stencil, depth_stencil_format, out); + + if (!device || !out) return D3DERR_INVALIDCALL; + + hr = D3DXCheckTextureRequirements(device, &size, &size, &mip_levels, + D3DUSAGE_RENDERTARGET, &format, D3DPOOL_DEFAULT); + if (FAILED(hr)) return hr; + + render = HeapAlloc(GetProcessHeap(), 0, sizeof(struct render_to_envmap)); + if (!render) return E_OUTOFMEMORY; + + render->ID3DXRenderToEnvMap_iface.lpVtbl = &render_to_envmap_vtbl; + render->ref = 1; + + render->desc.Size = size; + render->desc.MipLevels = mip_levels; + render->desc.Format = format; + render->desc.DepthStencil = depth_stencil; + render->desc.DepthStencilFormat = depth_stencil_format; + + render->state = INITIAL; + render->render_target = NULL; + render->depth_stencil = NULL; + render->dst_cube_texture = NULL; + + hr = device_state_init(device, &render->previous_device_state); + if (FAILED(hr)) + { + HeapFree(GetProcessHeap(), 0, render); + return hr; + } + + IDirect3DDevice9_AddRef(device); + render->device = device; + + *out = &render->ID3DXRenderToEnvMap_iface; + return D3D_OK; +} diff --git a/dll/directx/wine/d3dx9_36/shader.c b/dll/directx/wine/d3dx9_36/shader.c index 9b41c59d23f..ef2d3cd2dd9 100644 --- a/dll/directx/wine/d3dx9_36/shader.c +++ b/dll/directx/wine/d3dx9_36/shader.c @@ -1,5 +1,7 @@ /* * Copyright 2008 Luis Busquets + * Copyright 2009 Matteo Bruni + * Copyright 2011 Travis Athougies * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,17 +20,30 @@ #include //#include "wine/port.h" +#define NONAMELESSUNION +#define NONAMELESSSTRUCT #include //#include "wine/unicode.h" //#include "windef.h" //#include "wingdi.h" //#include "d3dx9.h" -//#include "d3dx9shader.h" +#include "d3dcompiler.h" #include "d3dx9_36_private.h" WINE_DEFAULT_DEBUG_CHANNEL(d3dx); -LPCSTR WINAPI D3DXGetPixelShaderProfile(LPDIRECT3DDEVICE9 device) +/* This function is not declared in the SDK headers yet */ +HRESULT WINAPI D3DAssemble(LPCVOID data, SIZE_T datasize, LPCSTR filename, + const D3D_SHADER_MACRO *defines, ID3DInclude *include, + UINT flags, + ID3DBlob **shader, ID3DBlob **error_messages); + +static inline BOOL is_valid_bytecode(DWORD token) +{ + return (token & 0xfffe0000) == 0xfffe0000; +} + +const char * WINAPI D3DXGetPixelShaderProfile(struct IDirect3DDevice9 *device) { D3DCAPS9 caps; @@ -106,7 +121,7 @@ DWORD WINAPI D3DXGetShaderVersion(const DWORD *byte_code) return byte_code ? *byte_code : 0; } -LPCSTR WINAPI D3DXGetVertexShaderProfile(LPDIRECT3DDEVICE9 device) +const char * WINAPI D3DXGetVertexShaderProfile(struct IDirect3DDevice9 *device) { D3DCAPS9 caps; @@ -135,14 +150,17 @@ LPCSTR WINAPI D3DXGetVertexShaderProfile(LPDIRECT3DDEVICE9 device) return NULL; } -HRESULT WINAPI D3DXFindShaderComment(CONST DWORD* byte_code, DWORD fourcc, LPCVOID* data, UINT* size) +HRESULT WINAPI D3DXFindShaderComment(const DWORD *byte_code, DWORD fourcc, const void **data, UINT *size) { - CONST DWORD *ptr = byte_code; + const DWORD *ptr = byte_code; - TRACE("(%p, %x, %p, %p)", byte_code, fourcc, data, size); + TRACE("byte_code %p, fourcc %x, data %p, size %p\n", byte_code, fourcc, data, size); - if (!byte_code) - return D3DERR_INVALIDCALL; + if (data) *data = NULL; + if (size) *size = 0; + + if (!byte_code) return D3DERR_INVALIDCALL; + if (!is_valid_bytecode(*byte_code)) return D3DXERR_INVALIDDATA; while (*++ptr != D3DSIO_END) { @@ -170,24 +188,99 @@ HRESULT WINAPI D3DXFindShaderComment(CONST DWORD* byte_code, DWORD fourcc, LPCVO return S_FALSE; } -HRESULT WINAPI D3DXAssembleShader(LPCSTR data, - UINT data_len, - CONST D3DXMACRO* defines, - LPD3DXINCLUDE include, - DWORD flags, - LPD3DXBUFFER* shader, - LPD3DXBUFFER* error_messages) +HRESULT WINAPI D3DXAssembleShader(const char *data, UINT data_len, const D3DXMACRO *defines, + ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages) { - FIXME("(%p, %d, %p, %p, %x, %p, %p): stub\n", data, data_len, defines, include, flags, shader, error_messages); - return D3DERR_INVALIDCALL; + HRESULT hr; + + TRACE("data %p, data_len %u, defines %p, include %p, flags %#x, shader %p, error_messages %p\n", + data, data_len, defines, include, flags, shader, error_messages); + + /* Forward to d3dcompiler: the parameter types aren't really different, + the actual data types are equivalent */ + hr = D3DAssemble(data, data_len, NULL, (D3D_SHADER_MACRO *)defines, + (ID3DInclude *)include, flags, (ID3DBlob **)shader, + (ID3DBlob **)error_messages); + + if(hr == E_FAIL) hr = D3DXERR_INVALIDDATA; + return hr; } -HRESULT WINAPI D3DXAssembleShaderFromFileA(LPCSTR filename, - CONST D3DXMACRO* defines, - LPD3DXINCLUDE include, - DWORD flags, - LPD3DXBUFFER* shader, - LPD3DXBUFFER* error_messages) +/* D3DXInclude private implementation, used to implement + D3DXAssembleShaderFromFile from D3DXAssembleShader */ +/* To be able to correctly resolve include search paths we have to store + the pathname of each include file. We store the pathname pointer right + before the file data. */ +static HRESULT WINAPI d3dincludefromfile_open(ID3DXInclude *iface, + D3DXINCLUDE_TYPE include_type, + LPCSTR filename, LPCVOID parent_data, + LPCVOID *data, UINT *bytes) { + const char *p, *parent_name = ""; + char *pathname = NULL; + char **buffer = NULL; + HANDLE file; + UINT size; + + if(parent_data != NULL) + parent_name = *((const char **)parent_data - 1); + + TRACE("Looking up for include file %s, parent %s\n", debugstr_a(filename), debugstr_a(parent_name)); + + if ((p = strrchr(parent_name, '\\')) || (p = strrchr(parent_name, '/'))) p++; + else p = parent_name; + pathname = HeapAlloc(GetProcessHeap(), 0, (p - parent_name) + strlen(filename) + 1); + if(!pathname) + return HRESULT_FROM_WIN32(GetLastError()); + + memcpy(pathname, parent_name, p - parent_name); + strcpy(pathname + (p - parent_name), filename); + + file = CreateFileA(pathname, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0); + if(file == INVALID_HANDLE_VALUE) + goto error; + + TRACE("Include file found at pathname = %s\n", debugstr_a(pathname)); + + size = GetFileSize(file, NULL); + if(size == INVALID_FILE_SIZE) + goto error; + + buffer = HeapAlloc(GetProcessHeap(), 0, size + sizeof(char *)); + if(!buffer) + goto error; + *buffer = pathname; + if(!ReadFile(file, buffer + 1, size, bytes, NULL)) + goto error; + + *data = buffer + 1; + + CloseHandle(file); + return S_OK; + +error: + CloseHandle(file); + HeapFree(GetProcessHeap(), 0, pathname); + HeapFree(GetProcessHeap(), 0, buffer); + return HRESULT_FROM_WIN32(GetLastError()); +} + +static HRESULT WINAPI d3dincludefromfile_close(ID3DXInclude *iface, LPCVOID data) { + HeapFree(GetProcessHeap(), 0, *((char **)data - 1)); + HeapFree(GetProcessHeap(), 0, (char **)data - 1); + return S_OK; +} + +static const struct ID3DXIncludeVtbl D3DXInclude_Vtbl = { + d3dincludefromfile_open, + d3dincludefromfile_close +}; + +struct D3DXIncludeImpl { + ID3DXInclude ID3DXInclude_iface; +}; + +HRESULT WINAPI D3DXAssembleShaderFromFileA(const char *filename, const D3DXMACRO *defines, + ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages) { LPWSTR filename_w = NULL; DWORD len; @@ -206,122 +299,499 @@ HRESULT WINAPI D3DXAssembleShaderFromFileA(LPCSTR filename, return ret; } -HRESULT WINAPI D3DXAssembleShaderFromFileW(LPCWSTR filename, - CONST D3DXMACRO* defines, - LPD3DXINCLUDE include, - DWORD flags, - LPD3DXBUFFER* shader, - LPD3DXBUFFER* error_messages) +HRESULT WINAPI D3DXAssembleShaderFromFileW(const WCHAR *filename, const D3DXMACRO *defines, + ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages) { - FIXME("(%s, %p, %p, %x, %p, %p): stub\n", debugstr_w(filename), defines, include, flags, shader, error_messages); - return D3DERR_INVALIDCALL; + void *buffer; + DWORD len; + HRESULT hr; + struct D3DXIncludeImpl includefromfile; + + if(FAILED(map_view_of_file(filename, &buffer, &len))) + return D3DXERR_INVALIDDATA; + + if(!include) + { + includefromfile.ID3DXInclude_iface.lpVtbl = &D3DXInclude_Vtbl; + include = &includefromfile.ID3DXInclude_iface; + } + + hr = D3DXAssembleShader(buffer, len, defines, include, flags, + shader, error_messages); + + UnmapViewOfFile(buffer); + return hr; } -HRESULT WINAPI D3DXAssembleShaderFromResourceA(HMODULE module, - LPCSTR resource, - CONST D3DXMACRO* defines, - LPD3DXINCLUDE include, - DWORD flags, - LPD3DXBUFFER* shader, - LPD3DXBUFFER* error_messages) +HRESULT WINAPI D3DXAssembleShaderFromResourceA(HMODULE module, const char *resource, const D3DXMACRO *defines, + ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages) { + void *buffer; HRSRC res; - LPCSTR buffer; DWORD len; if (!(res = FindResourceA(module, resource, (LPCSTR)RT_RCDATA))) return D3DXERR_INVALIDDATA; - if (FAILED(load_resource_into_memory(module, res, (LPVOID *)&buffer, &len))) + if (FAILED(load_resource_into_memory(module, res, &buffer, &len))) return D3DXERR_INVALIDDATA; return D3DXAssembleShader(buffer, len, defines, include, flags, shader, error_messages); } -HRESULT WINAPI D3DXAssembleShaderFromResourceW(HMODULE module, - LPCWSTR resource, - CONST D3DXMACRO* defines, - LPD3DXINCLUDE include, - DWORD flags, - LPD3DXBUFFER* shader, - LPD3DXBUFFER* error_messages) +HRESULT WINAPI D3DXAssembleShaderFromResourceW(HMODULE module, const WCHAR *resource, const D3DXMACRO *defines, + ID3DXInclude *include, DWORD flags, ID3DXBuffer **shader, ID3DXBuffer **error_messages) { + void *buffer; HRSRC res; - LPCSTR buffer; DWORD len; - if (!(res = FindResourceW(module, resource, (LPCWSTR)RT_RCDATA))) + TRACE("module %p, resource %s, defines %p, include %p, flags %#x, shader %p, error_messages %p.\n", + module, debugstr_w(resource), defines, include, flags, shader, error_messages); + + if (!(res = FindResourceW(module, resource, (const WCHAR *)RT_RCDATA))) return D3DXERR_INVALIDDATA; - if (FAILED(load_resource_into_memory(module, res, (LPVOID *)&buffer, &len))) + if (FAILED(load_resource_into_memory(module, res, &buffer, &len))) return D3DXERR_INVALIDDATA; return D3DXAssembleShader(buffer, len, defines, include, flags, shader, error_messages); } -HRESULT WINAPI D3DXCompileShader(LPCSTR pSrcData, - UINT srcDataLen, - CONST D3DXMACRO* pDefines, - LPD3DXINCLUDE pInclude, - LPCSTR pFunctionName, - LPCSTR pProfile, - DWORD Flags, - LPD3DXBUFFER* ppShader, - LPD3DXBUFFER* ppErrorMsgs, - LPD3DXCONSTANTTABLE * ppConstantTable) +HRESULT WINAPI D3DXCompileShader(const char *data, UINT length, const D3DXMACRO *defines, + ID3DXInclude *include, const char *function, const char *profile, DWORD flags, + ID3DXBuffer **shader, ID3DXBuffer **error_msgs, ID3DXConstantTable **constant_table) { - FIXME("(%p, %d, %p, %p, %p, %p, %d, %p, %p, %p): stub\n", - pSrcData, srcDataLen, pDefines, pInclude, pFunctionName, - pProfile, Flags, ppShader, ppErrorMsgs, ppConstantTable); - return D3DERR_INVALIDCALL; + HRESULT hr; + + TRACE("data %p, length %u, defines %p, include %p, function %s, profile %s, flags %#x, shader %p, error_msgs %p, constant_table %p\n", + data, length, defines, include, function, profile, flags, shader, error_msgs, constant_table); + + hr = D3DCompile(data, length, NULL, (D3D_SHADER_MACRO *)defines, (ID3DInclude *)include, + function, profile, flags, 0, (ID3DBlob **)shader, (ID3DBlob **)error_msgs); + + if (SUCCEEDED(hr) && constant_table) + { + hr = D3DXGetShaderConstantTable(ID3DXBuffer_GetBufferPointer(*shader), constant_table); + if (FAILED(hr)) + { + ID3DXBuffer_Release(*shader); + *shader = NULL; + } + } + + return hr; } -static const struct ID3DXConstantTableVtbl ID3DXConstantTable_Vtbl; +HRESULT WINAPI D3DXCompileShaderFromFileA(const char *filename, const D3DXMACRO *defines, + ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags, + ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table) +{ + LPWSTR filename_w = NULL; + DWORD len; + HRESULT ret; -typedef struct ID3DXConstantTableImpl { - const ID3DXConstantTableVtbl *lpVtbl; + if (!filename) return D3DXERR_INVALIDDATA; + + len = MultiByteToWideChar(CP_ACP, 0, filename, -1, NULL, 0); + filename_w = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (!filename_w) return E_OUTOFMEMORY; + MultiByteToWideChar(CP_ACP, 0, filename, -1, filename_w, len); + + ret = D3DXCompileShaderFromFileW(filename_w, defines, include, + entrypoint, profile, flags, + shader, error_messages, constant_table); + + HeapFree(GetProcessHeap(), 0, filename_w); + return ret; +} + +HRESULT WINAPI D3DXCompileShaderFromFileW(const WCHAR *filename, const D3DXMACRO *defines, + ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags, + ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table) +{ + void *buffer; + DWORD len, filename_len; + HRESULT hr; + struct D3DXIncludeImpl includefromfile; + char *filename_a; + + if (FAILED(map_view_of_file(filename, &buffer, &len))) + return D3DXERR_INVALIDDATA; + + if (!include) + { + includefromfile.ID3DXInclude_iface.lpVtbl = &D3DXInclude_Vtbl; + include = &includefromfile.ID3DXInclude_iface; + } + + filename_len = WideCharToMultiByte(CP_ACP, 0, filename, -1, NULL, 0, NULL, NULL); + filename_a = HeapAlloc(GetProcessHeap(), 0, filename_len * sizeof(char)); + if (!filename_a) + { + UnmapViewOfFile(buffer); + return E_OUTOFMEMORY; + } + WideCharToMultiByte(CP_ACP, 0, filename, -1, filename_a, filename_len, NULL, NULL); + + hr = D3DCompile(buffer, len, filename_a, (const D3D_SHADER_MACRO *)defines, + (ID3DInclude *)include, entrypoint, profile, flags, 0, + (ID3DBlob **)shader, (ID3DBlob **)error_messages); + + if (SUCCEEDED(hr) && constant_table) + hr = D3DXGetShaderConstantTable(ID3DXBuffer_GetBufferPointer(*shader), + constant_table); + + HeapFree(GetProcessHeap(), 0, filename_a); + UnmapViewOfFile(buffer); + return hr; +} + +HRESULT WINAPI D3DXCompileShaderFromResourceA(HMODULE module, const char *resource, const D3DXMACRO *defines, + ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags, + ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table) +{ + void *buffer; + HRSRC res; + DWORD len; + + if (!(res = FindResourceA(module, resource, (LPCSTR)RT_RCDATA))) + return D3DXERR_INVALIDDATA; + if (FAILED(load_resource_into_memory(module, res, &buffer, &len))) + return D3DXERR_INVALIDDATA; + return D3DXCompileShader(buffer, len, defines, include, entrypoint, profile, + flags, shader, error_messages, constant_table); +} + +HRESULT WINAPI D3DXCompileShaderFromResourceW(HMODULE module, const WCHAR *resource, const D3DXMACRO *defines, + ID3DXInclude *include, const char *entrypoint, const char *profile, DWORD flags, + ID3DXBuffer **shader, ID3DXBuffer **error_messages, ID3DXConstantTable **constant_table) +{ + void *buffer; + HRSRC res; + DWORD len; + + TRACE("module %p, resource %s, defines %p, include %p, entrypoint %s, profile %s, " + "flags %#x, shader %p, error_messages %p, constant_table %p.\n", + module, debugstr_w(resource), defines, include, debugstr_a(entrypoint), debugstr_a(profile), + flags, shader, error_messages, constant_table); + + if (!(res = FindResourceW(module, resource, (const WCHAR *)RT_RCDATA))) + return D3DXERR_INVALIDDATA; + if (FAILED(load_resource_into_memory(module, res, &buffer, &len))) + return D3DXERR_INVALIDDATA; + return D3DXCompileShader(buffer, len, defines, include, entrypoint, profile, + flags, shader, error_messages, constant_table); +} + +HRESULT WINAPI D3DXPreprocessShader(const char *data, UINT data_len, const D3DXMACRO *defines, + ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages) +{ + TRACE("Forward to D3DPreprocess\n"); + return D3DPreprocess(data, data_len, NULL, + (const D3D_SHADER_MACRO *)defines, (ID3DInclude *)include, + (ID3DBlob **)shader, (ID3DBlob **)error_messages); +} + +HRESULT WINAPI D3DXPreprocessShaderFromFileA(const char *filename, const D3DXMACRO *defines, + ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages) +{ + WCHAR *filename_w = NULL; + DWORD len; + HRESULT ret; + + if (!filename) return D3DXERR_INVALIDDATA; + + len = MultiByteToWideChar(CP_ACP, 0, filename, -1, NULL, 0); + filename_w = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (!filename_w) return E_OUTOFMEMORY; + MultiByteToWideChar(CP_ACP, 0, filename, -1, filename_w, len); + + ret = D3DXPreprocessShaderFromFileW(filename_w, defines, include, shader, error_messages); + + HeapFree(GetProcessHeap(), 0, filename_w); + return ret; +} + +HRESULT WINAPI D3DXPreprocessShaderFromFileW(const WCHAR *filename, const D3DXMACRO *defines, + ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages) +{ + void *buffer; + DWORD len; + HRESULT hr; + struct D3DXIncludeImpl includefromfile; + + if (FAILED(map_view_of_file(filename, &buffer, &len))) + return D3DXERR_INVALIDDATA; + + if (!include) + { + includefromfile.ID3DXInclude_iface.lpVtbl = &D3DXInclude_Vtbl; + include = &includefromfile.ID3DXInclude_iface; + } + + hr = D3DPreprocess(buffer, len, NULL, + (const D3D_SHADER_MACRO *)defines, + (ID3DInclude *) include, + (ID3DBlob **)shader, (ID3DBlob **)error_messages); + + UnmapViewOfFile(buffer); + return hr; +} + +HRESULT WINAPI D3DXPreprocessShaderFromResourceA(HMODULE module, const char *resource, const D3DXMACRO *defines, + ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages) +{ + void *buffer; + HRSRC res; + DWORD len; + + if (!(res = FindResourceA(module, resource, (LPCSTR)RT_RCDATA))) + return D3DXERR_INVALIDDATA; + if (FAILED(load_resource_into_memory(module, res, &buffer, &len))) + return D3DXERR_INVALIDDATA; + return D3DXPreprocessShader(buffer, len, defines, include, + shader, error_messages); +} + +HRESULT WINAPI D3DXPreprocessShaderFromResourceW(HMODULE module, const WCHAR *resource, const D3DXMACRO *defines, + ID3DXInclude *include, ID3DXBuffer **shader, ID3DXBuffer **error_messages) +{ + void *buffer; + HRSRC res; + DWORD len; + + if (!(res = FindResourceW(module, resource, (const WCHAR *)RT_RCDATA))) + return D3DXERR_INVALIDDATA; + if (FAILED(load_resource_into_memory(module, res, &buffer, &len))) + return D3DXERR_INVALIDDATA; + return D3DXPreprocessShader(buffer, len, defines, include, + shader, error_messages); + +} + +struct ctab_constant { + D3DXCONSTANT_DESC desc; + struct ctab_constant *constants; +}; + +struct ID3DXConstantTableImpl { + ID3DXConstantTable ID3DXConstantTable_iface; LONG ref; - LPVOID ctab; + char *ctab; DWORD size; -} ID3DXConstantTableImpl; + D3DXCONSTANTTABLE_DESC desc; + struct ctab_constant *constants; +}; + +static void free_constant(struct ctab_constant *constant) +{ + if (constant->constants) + { + UINT i, count = constant->desc.Elements > 1 ? constant->desc.Elements : constant->desc.StructMembers; + + for (i = 0; i < count; ++i) + { + free_constant(&constant->constants[i]); + } + HeapFree(GetProcessHeap(), 0, constant->constants); + } +} + +static void free_constant_table(struct ID3DXConstantTableImpl *table) +{ + if (table->constants) + { + UINT i; + + for (i = 0; i < table->desc.Constants; ++i) + { + free_constant(&table->constants[i]); + } + HeapFree(GetProcessHeap(), 0, table->constants); + } + HeapFree(GetProcessHeap(), 0, table->ctab); +} + +static inline struct ID3DXConstantTableImpl *impl_from_ID3DXConstantTable(ID3DXConstantTable *iface) +{ + return CONTAINING_RECORD(iface, struct ID3DXConstantTableImpl, ID3DXConstantTable_iface); +} + +static inline BOOL is_vertex_shader(DWORD version) +{ + return (version & 0xffff0000) == 0xfffe0000; +} + +static inline D3DXHANDLE handle_from_constant(struct ctab_constant *constant) +{ + return (D3DXHANDLE)constant; +} + +static struct ctab_constant *get_constant_by_name(struct ID3DXConstantTableImpl *, struct ctab_constant *, LPCSTR); + +static struct ctab_constant *get_constant_element_by_name(struct ctab_constant *constant, LPCSTR name) +{ + UINT element; + LPCSTR part; + + TRACE("constant %p, name %s\n", constant, debugstr_a(name)); + + if (!name || !*name) return NULL; + + element = atoi(name); + part = strchr(name, ']') + 1; + + if (constant->desc.Elements > element) + { + struct ctab_constant *c = constant->constants ? &constant->constants[element] : constant; + + switch (*part++) + { + case '.': + return get_constant_by_name(NULL, c, part); + + case '[': + return get_constant_element_by_name(c, part); + + case '\0': + TRACE("Returning parameter %p\n", c); + return c; + + default: + FIXME("Unhandled case \"%c\"\n", *--part); + break; + } + } + + TRACE("Constant not found\n"); + return NULL; +} + +static struct ctab_constant *get_constant_by_name(struct ID3DXConstantTableImpl *table, + struct ctab_constant *constant, LPCSTR name) +{ + UINT i, count, length; + struct ctab_constant *handles; + LPCSTR part; + + TRACE("table %p, constant %p, name %s\n", table, constant, debugstr_a(name)); + + if (!name || !*name) return NULL; + + if (!constant) + { + count = table->desc.Constants; + handles = table->constants; + } + else + { + count = constant->desc.StructMembers; + handles = constant->constants; + } + + length = strcspn(name, "[."); + part = name + length; + + for (i = 0; i < count; i++) + { + if (strlen(handles[i].desc.Name) == length && !strncmp(handles[i].desc.Name, name, length)) + { + switch (*part++) + { + case '.': + return get_constant_by_name(NULL, &handles[i], part); + + case '[': + return get_constant_element_by_name(&handles[i], part); + + default: + TRACE("Returning parameter %p\n", &handles[i]); + return &handles[i]; + } + } + } + + TRACE("Constant not found\n"); + return NULL; +} + +static struct ctab_constant *is_valid_sub_constant(struct ctab_constant *parent, D3DXHANDLE handle) +{ + struct ctab_constant *c; + UINT i, count; + + /* all variable have at least elements = 1, but not always elements */ + if (!parent->constants) return NULL; + + count = parent->desc.Elements > 1 ? parent->desc.Elements : parent->desc.StructMembers; + for (i = 0; i < count; ++i) + { + if (handle_from_constant(&parent->constants[i]) == handle) + return &parent->constants[i]; + + c = is_valid_sub_constant(&parent->constants[i], handle); + if (c) return c; + } + + return NULL; +} + +static inline struct ctab_constant *get_valid_constant(struct ID3DXConstantTableImpl *table, D3DXHANDLE handle) +{ + struct ctab_constant *c; + UINT i; + + if (!handle) return NULL; + + for (i = 0; i < table->desc.Constants; ++i) + { + if (handle_from_constant(&table->constants[i]) == handle) + return &table->constants[i]; + + c = is_valid_sub_constant(&table->constants[i], handle); + if (c) return c; + } + + return get_constant_by_name(table, NULL, handle); +} /*** IUnknown methods ***/ -static HRESULT WINAPI ID3DXConstantTableImpl_QueryInterface(ID3DXConstantTable* iface, REFIID riid, void** ppvObject) +static HRESULT WINAPI ID3DXConstantTableImpl_QueryInterface(ID3DXConstantTable *iface, REFIID riid, void **out) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; - - TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppvObject); + TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out); if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_ID3DXBuffer) || IsEqualGUID(riid, &IID_ID3DXConstantTable)) { ID3DXConstantTable_AddRef(iface); - *ppvObject = This; + *out = iface; return S_OK; } - ERR("Interface %s not found\n", debugstr_guid(riid)); + WARN("Interface %s not found.\n", debugstr_guid(riid)); return E_NOINTERFACE; } -static ULONG WINAPI ID3DXConstantTableImpl_AddRef(ID3DXConstantTable* iface) +static ULONG WINAPI ID3DXConstantTableImpl_AddRef(ID3DXConstantTable *iface) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); TRACE("(%p)->(): AddRef from %d\n", This, This->ref); return InterlockedIncrement(&This->ref); } -static ULONG WINAPI ID3DXConstantTableImpl_Release(ID3DXConstantTable* iface) +static ULONG WINAPI ID3DXConstantTableImpl_Release(ID3DXConstantTable *iface) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p)->(): Release from %d\n", This, ref + 1); if (!ref) { - HeapFree(GetProcessHeap(), 0, This->ctab); + free_constant_table(This); HeapFree(GetProcessHeap(), 0, This); } @@ -329,18 +799,18 @@ static ULONG WINAPI ID3DXConstantTableImpl_Release(ID3DXConstantTable* iface) } /*** ID3DXBuffer methods ***/ -static LPVOID WINAPI ID3DXConstantTableImpl_GetBufferPointer(ID3DXConstantTable* iface) +static LPVOID WINAPI ID3DXConstantTableImpl_GetBufferPointer(ID3DXConstantTable *iface) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); TRACE("(%p)->()\n", This); return This->ctab; } -static DWORD WINAPI ID3DXConstantTableImpl_GetBufferSize(ID3DXConstantTable* iface) +static DWORD WINAPI ID3DXConstantTableImpl_GetBufferSize(ID3DXConstantTable *iface) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); TRACE("(%p)->()\n", This); @@ -348,208 +818,847 @@ static DWORD WINAPI ID3DXConstantTableImpl_GetBufferSize(ID3DXConstantTable* ifa } /*** ID3DXConstantTable methods ***/ -static HRESULT WINAPI ID3DXConstantTableImpl_GetDesc(ID3DXConstantTable* iface, D3DXCONSTANTTABLE_DESC *desc) +static HRESULT WINAPI ID3DXConstantTableImpl_GetDesc(ID3DXConstantTable *iface, D3DXCONSTANTTABLE_DESC *desc) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); - FIXME("(%p)->(%p): stub\n", This, desc); + TRACE("(%p)->(%p)\n", This, desc); - return E_NOTIMPL; + if (!desc) + return D3DERR_INVALIDCALL; + + *desc = This->desc; + + return D3D_OK; } -static HRESULT WINAPI ID3DXConstantTableImpl_GetConstantDesc(ID3DXConstantTable* iface, D3DXHANDLE constant, +static HRESULT WINAPI ID3DXConstantTableImpl_GetConstantDesc(ID3DXConstantTable *iface, D3DXHANDLE constant, D3DXCONSTANT_DESC *desc, UINT *count) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); + struct ctab_constant *c = get_valid_constant(This, constant); - FIXME("(%p)->(%p, %p, %p): stub\n", This, constant, desc, count); + TRACE("(%p)->(%p, %p, %p)\n", This, constant, desc, count); - return E_NOTIMPL; + if (!c) + { + WARN("Invalid argument specified\n"); + return D3DERR_INVALIDCALL; + } + + if (desc) *desc = c->desc; + if (count) *count = 1; + + return D3D_OK; } -static D3DXHANDLE WINAPI ID3DXConstantTableImpl_GetConstant(ID3DXConstantTable* iface, D3DXHANDLE constant, UINT index) +static UINT WINAPI ID3DXConstantTableImpl_GetSamplerIndex(ID3DXConstantTable *iface, D3DXHANDLE constant) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); + struct ctab_constant *c = get_valid_constant(This, constant); - FIXME("(%p)->(%p, %d): stub\n", This, constant, index); + TRACE("(%p)->(%p)\n", This, constant); + if (!c || c->desc.RegisterSet != D3DXRS_SAMPLER) + { + WARN("Invalid argument specified\n"); + return (UINT)-1; + } + + TRACE("Returning RegisterIndex %u\n", c->desc.RegisterIndex); + return c->desc.RegisterIndex; +} + +static D3DXHANDLE WINAPI ID3DXConstantTableImpl_GetConstant(ID3DXConstantTable *iface, D3DXHANDLE constant, UINT index) +{ + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); + struct ctab_constant *c; + + TRACE("(%p)->(%p, %d)\n", This, constant, index); + + if (constant) + { + c = get_valid_constant(This, constant); + if (c && index < c->desc.StructMembers) + { + c = &c->constants[index]; + TRACE("Returning constant %p\n", c); + return handle_from_constant(c); + } + } + else + { + if (index < This->desc.Constants) + { + c = &This->constants[index]; + TRACE("Returning constant %p\n", c); + return handle_from_constant(c); + } + } + + WARN("Index out of range\n"); return NULL; } -static D3DXHANDLE WINAPI ID3DXConstantTableImpl_GetConstantByName(ID3DXConstantTable* iface, D3DXHANDLE constant, LPCSTR name) +static D3DXHANDLE WINAPI ID3DXConstantTableImpl_GetConstantByName(ID3DXConstantTable *iface, D3DXHANDLE constant, LPCSTR name) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); + struct ctab_constant *c = get_valid_constant(This, constant); - FIXME("(%p)->(%p, %s): stub\n", This, constant, name); + TRACE("(%p)->(%p, %s)\n", This, constant, name); + c = get_constant_by_name(This, c, name); + TRACE("Returning constant %p\n", c); + + return handle_from_constant(c); +} + +static D3DXHANDLE WINAPI ID3DXConstantTableImpl_GetConstantElement(ID3DXConstantTable *iface, D3DXHANDLE constant, UINT index) +{ + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); + struct ctab_constant *c = get_valid_constant(This, constant); + + TRACE("(%p)->(%p, %d)\n", This, constant, index); + + if (c && index < c->desc.Elements) + { + if (c->desc.Elements > 1) c = &c->constants[index]; + TRACE("Returning constant %p\n", c); + return handle_from_constant(c); + } + + WARN("Invalid argument specified\n"); return NULL; } -static D3DXHANDLE WINAPI ID3DXConstantTableImpl_GetConstantByElement(ID3DXConstantTable* iface, D3DXHANDLE constant, UINT index) +static inline DWORD get_index(const void **indata, UINT index, BOOL is_pointer) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + if (!indata) + return 0; - FIXME("(%p)->(%p, %d): stub\n", This, constant, index); + if (is_pointer) + return ((DWORD **)indata)[index / 16][index % 16]; - return NULL; + return (*((DWORD **)indata))[index]; } -static HRESULT WINAPI ID3DXConstantTableImpl_SetDefaults(ID3DXConstantTable* iface, LPDIRECT3DDEVICE9 device) +static UINT set(struct ID3DXConstantTableImpl *table, IDirect3DDevice9 *device, struct ctab_constant *constant, + const void **indata, D3DXPARAMETER_TYPE intype, UINT *size, UINT incol, D3DXPARAMETER_CLASS inclass, UINT index, + BOOL is_pointer) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + D3DXCONSTANT_DESC *desc = &constant->desc; + UINT l, i, regcount = 1, regsize = 1, cin = 1, rin = 1, ret, last = 0; + DWORD tmp; - FIXME("(%p)->(%p): stub\n", This, device); + /* size to small to set anything */ + if (*size < desc->Rows * desc->Columns) + { + *size = 0; + return 0; + } - return E_NOTIMPL; + /* D3DXPC_STRUCT is somewhat special */ + if (desc->Class == D3DXPC_STRUCT) + { + /* + * Struct array sets the last complete input to the first struct element, all other + * elements are not set. + * E.g.: struct {int i;} s1[2]; + * SetValue(device, "s1", [1, 2], 8) => s1 = {2, x}; + * + * struct {int i; int n} s2[2]; + * SetValue(device, "s2", [1, 2, 3, 4, 5], 20) => s1 = {{3, 4}, {x, x}}; + */ + if (desc->Elements > 1) + { + UINT offset = *size / (desc->Rows * desc->Columns) - 1; + + offset = min(desc->Elements - 1, offset); + last = offset * desc->Rows * desc->Columns; + + if ((is_pointer || (!is_pointer && inclass == D3DXPC_MATRIX_ROWS)) && desc->RegisterSet != D3DXRS_BOOL) + { + set(table, device, &constant->constants[0], NULL, intype, size, incol, inclass, 0, is_pointer); + } + else + { + last += set(table, device, &constant->constants[0], indata, intype, size, incol, inclass, + index + last, is_pointer); + } + } + else + { + /* + * D3DXRS_BOOL is always set. As there are only 16 bools and there are + * exactly 16 input values, use matrix transpose. + */ + if (inclass == D3DXPC_MATRIX_ROWS && desc->RegisterSet == D3DXRS_BOOL) + { + D3DXMATRIX mat, *m, min; + D3DXMatrixTranspose(&mat, &min); + + if (is_pointer) + min = *(D3DXMATRIX *)(indata[index / 16]); + else + min = **(D3DXMATRIX **)indata; + + D3DXMatrixTranspose(&mat, &min); + m = &mat; + for (i = 0; i < desc->StructMembers; ++i) + { + last += set(table, device, &constant->constants[i], (const void **)&m, intype, size, incol, + D3DXPC_SCALAR, index + last, is_pointer); + } + } + /* + * For pointers or for matrix rows, only the first member is set. + * All other members are set to 0. This is not true for D3DXRS_BOOL. + * E.g.: struct {int i; int n} s; + * SetValue(device, "s", [1, 2], 8) => s = {1, 0}; + */ + else if ((is_pointer || (!is_pointer && inclass == D3DXPC_MATRIX_ROWS)) && desc->RegisterSet != D3DXRS_BOOL) + { + last = set(table, device, &constant->constants[0], indata, intype, size, incol, inclass, + index + last, is_pointer); + + for (i = 1; i < desc->StructMembers; ++i) + { + set(table, device, &constant->constants[i], NULL, intype, size, incol, inclass, 0, is_pointer); + } + } + else + { + for (i = 0; i < desc->StructMembers; ++i) + { + last += set(table, device, &constant->constants[i], indata, intype, size, incol, D3DXPC_SCALAR, + index + last, is_pointer); + } + } + } + + return last; + } + + /* elements */ + if (desc->Elements > 1) + { + for (i = 0; i < desc->Elements && *size > 0; ++i) + { + last += set(table, device, &constant->constants[i], indata, intype, size, incol, inclass, + index + last, is_pointer); + + /* adjust the vector size for matrix rows */ + if (inclass == D3DXPC_MATRIX_ROWS && desc->Class == D3DXPC_VECTOR && (i % 4) == 3) + { + last += 12; + *size = *size < 12 ? 0 : *size - 12; + } + } + + return last; + } + + switch (desc->Class) + { + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_MATRIX_ROWS: + regcount = min(desc->RegisterCount, desc->Rows); + if (inclass == D3DXPC_MATRIX_ROWS) cin = incol; + else rin = incol; + regsize = desc->Columns; + break; + + case D3DXPC_MATRIX_COLUMNS: + regcount = desc->Columns; + if (inclass == D3DXPC_MATRIX_ROWS) rin = incol; + else cin = incol; + regsize = desc->Rows; + break; + + default: + FIXME("Unhandled variable class %s\n", debug_d3dxparameter_class(desc->Class)); + return 0; + } + + /* specific stuff for different in types */ + switch (inclass) + { + case D3DXPC_SCALAR: + ret = desc->Columns * desc->Rows; + *size -= desc->Columns * desc->Rows; + break; + + case D3DXPC_VECTOR: + switch (desc->Class) + { + case D3DXPC_MATRIX_ROWS: + if (*size < regcount * 4) + { + *size = 0; + return 0; + } + ret = 4 * regcount; + *size -= 4 * regcount; + break; + + case D3DXPC_MATRIX_COLUMNS: + ret = 4 * regsize; + *size -= 4 * regcount; + break; + + case D3DXPC_SCALAR: + ret = 1; + *size -= ret; + break; + + case D3DXPC_VECTOR: + ret = 4; + *size -= ret; + break; + + default: + FIXME("Unhandled variable class %s\n", debug_d3dxparameter_class(desc->Class)); + return 0; + } + break; + + case D3DXPC_MATRIX_ROWS: + switch (desc->Class) + { + case D3DXPC_MATRIX_ROWS: + case D3DXPC_MATRIX_COLUMNS: + if (*size < 16) + { + *size = 0; + return 0; + } + ret = 16; + break; + + case D3DXPC_SCALAR: + ret = 4; + break; + + case D3DXPC_VECTOR: + ret = 1; + break; + + default: + FIXME("Unhandled variable class %s\n", debug_d3dxparameter_class(desc->Class)); + return 0; + } + *size -= ret; + break; + + case D3DXPC_MATRIX_COLUMNS: + switch (desc->Class) + { + case D3DXPC_MATRIX_ROWS: + case D3DXPC_MATRIX_COLUMNS: + if (*size < 16) + { + *size = 0; + return 0; + } + ret = 16; + break; + + case D3DXPC_SCALAR: + ret = 1; + break; + + case D3DXPC_VECTOR: + ret = 4; + break; + + default: + FIXME("Unhandled variable class %s\n", debug_d3dxparameter_class(desc->Class)); + return 0; + } + *size -= ret; + break; + + default: + FIXME("Unhandled variable class %s\n", debug_d3dxparameter_class(inclass)); + return 0; + } + + /* set the registers */ + switch (desc->RegisterSet) + { + case D3DXRS_BOOL: + regcount = min(desc->RegisterCount, desc->Columns * desc->Rows); + l = 0; + for (i = 0; i < regcount; ++i) + { + BOOL out; + DWORD t = get_index(indata, index + i / regsize * rin + l * cin, is_pointer); + + set_number(&tmp, desc->Type, &t, intype); + set_number(&out, D3DXPT_BOOL, &tmp, desc->Type); + if (is_vertex_shader(table->desc.Version)) + IDirect3DDevice9_SetVertexShaderConstantB(device, desc->RegisterIndex + i, &out, 1); + else + IDirect3DDevice9_SetPixelShaderConstantB(device, desc->RegisterIndex + i, &out, 1); + + if (++l >= regsize) l = 0; + } + return ret; + + case D3DXRS_INT4: + for (i = 0; i < regcount; ++i) + { + INT vec[4] = {0, 0, 1, 0}; + + for (l = 0; l < regsize; ++l) + { + DWORD t = get_index(indata, index + i * rin + l * cin, is_pointer); + + set_number(&tmp, desc->Type, &t, intype); + set_number(&vec[l], D3DXPT_INT, &tmp, desc->Type); + } + if (is_vertex_shader(table->desc.Version)) + IDirect3DDevice9_SetVertexShaderConstantI(device, desc->RegisterIndex + i, vec, 1); + else + IDirect3DDevice9_SetPixelShaderConstantI(device, desc->RegisterIndex + i, vec, 1); + } + return ret; + + case D3DXRS_FLOAT4: + for (i = 0; i < regcount; ++i) + { + FLOAT vec[4] = {0}; + + for (l = 0; l < regsize; ++l) + { + DWORD t = get_index(indata, index + i * rin + l * cin, is_pointer); + + set_number(&tmp, desc->Type, &t, intype); + set_number(&vec[l], D3DXPT_FLOAT, &tmp, desc->Type); + } + if (is_vertex_shader(table->desc.Version)) + IDirect3DDevice9_SetVertexShaderConstantF(device, desc->RegisterIndex + i, vec, 1); + else + IDirect3DDevice9_SetPixelShaderConstantF(device, desc->RegisterIndex + i, vec, 1); + } + return ret; + + default: + FIXME("Unhandled register set %s\n", debug_d3dxparameter_registerset(desc->RegisterSet)); + return 0; + } } -static HRESULT WINAPI ID3DXConstantTableImpl_SetValue(ID3DXConstantTable* iface, LPDIRECT3DDEVICE9 device, - D3DXHANDLE constant, LPCVOID data, UINT bytes) +static HRESULT set_scalar(struct ID3DXConstantTableImpl *table, IDirect3DDevice9 *device, D3DXHANDLE constant, + const void *indata, D3DXPARAMETER_TYPE intype) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ctab_constant *c = get_valid_constant(table, constant); + UINT count = 1; - FIXME("(%p)->(%p, %p, %p, %d): stub\n", This, device, constant, data, bytes); + if (!c) + { + WARN("Invalid argument specified\n"); + return D3DERR_INVALIDCALL; + } - return E_NOTIMPL; + switch (c->desc.Class) + { + case D3DXPC_SCALAR: + set(table, device, c, &indata, intype, &count, c->desc.Columns, D3DXPC_SCALAR, 0, FALSE); + return D3D_OK; + + case D3DXPC_VECTOR: + case D3DXPC_MATRIX_ROWS: + case D3DXPC_MATRIX_COLUMNS: + case D3DXPC_STRUCT: + return D3D_OK; + + default: + FIXME("Unhandled parameter class %s\n", debug_d3dxparameter_class(c->desc.Class)); + return D3DERR_INVALIDCALL; + } } -static HRESULT WINAPI ID3DXConstantTableImpl_SetBool(ID3DXConstantTable* iface, LPDIRECT3DDEVICE9 device, - D3DXHANDLE constant, BOOL b) +static HRESULT set_scalar_array(struct ID3DXConstantTableImpl *table, IDirect3DDevice9 *device, D3DXHANDLE constant, + const void *indata, UINT count, D3DXPARAMETER_TYPE intype) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ctab_constant *c = get_valid_constant(table, constant); - FIXME("(%p)->(%p, %p, %d): stub\n", This, device, constant, b); + if (!c) + { + WARN("Invalid argument specified\n"); + return D3DERR_INVALIDCALL; + } - return E_NOTIMPL; + switch (c->desc.Class) + { + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_MATRIX_ROWS: + case D3DXPC_MATRIX_COLUMNS: + case D3DXPC_STRUCT: + set(table, device, c, &indata, intype, &count, c->desc.Columns, D3DXPC_SCALAR, 0, FALSE); + return D3D_OK; + + default: + FIXME("Unhandled parameter class %s\n", debug_d3dxparameter_class(c->desc.Class)); + return D3DERR_INVALIDCALL; + } } -static HRESULT WINAPI ID3DXConstantTableImpl_SetBoolArray(ID3DXConstantTable* iface, LPDIRECT3DDEVICE9 device, - D3DXHANDLE constant, CONST BOOL* b, UINT count) +static HRESULT set_vector(struct ID3DXConstantTableImpl *table, IDirect3DDevice9 *device, D3DXHANDLE constant, + const void *indata, D3DXPARAMETER_TYPE intype) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ctab_constant *c = get_valid_constant(table, constant); + UINT count = 4; - FIXME("(%p)->(%p, %p, %p, %d): stub\n", This, device, constant, b, count); + if (!c) + { + WARN("Invalid argument specified\n"); + return D3DERR_INVALIDCALL; + } - return E_NOTIMPL; + switch (c->desc.Class) + { + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_STRUCT: + set(table, device, c, &indata, intype, &count, 4, D3DXPC_VECTOR, 0, FALSE); + return D3D_OK; + + case D3DXPC_MATRIX_ROWS: + case D3DXPC_MATRIX_COLUMNS: + return D3D_OK; + + default: + FIXME("Unhandled parameter class %s\n", debug_d3dxparameter_class(c->desc.Class)); + return D3DERR_INVALIDCALL; + } } -static HRESULT WINAPI ID3DXConstantTableImpl_SetInt(ID3DXConstantTable* iface, LPDIRECT3DDEVICE9 device, D3DXHANDLE constant, INT n) +static HRESULT set_vector_array(struct ID3DXConstantTableImpl *table, IDirect3DDevice9 *device, D3DXHANDLE constant, + const void *indata, UINT count, D3DXPARAMETER_TYPE intype) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ctab_constant *c = get_valid_constant(table, constant); - FIXME("(%p)->(%p, %p, %d): stub\n", This, device, constant, n); + if (!c) + { + WARN("Invalid argument specified\n"); + return D3DERR_INVALIDCALL; + } - return E_NOTIMPL; + switch (c->desc.Class) + { + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_MATRIX_ROWS: + case D3DXPC_MATRIX_COLUMNS: + case D3DXPC_STRUCT: + count *= 4; + set(table, device, c, &indata, intype, &count, 4, D3DXPC_VECTOR, 0, FALSE); + return D3D_OK; + + default: + FIXME("Unhandled parameter class %s\n", debug_d3dxparameter_class(c->desc.Class)); + return D3DERR_INVALIDCALL; + } } -static HRESULT WINAPI ID3DXConstantTableImpl_SetIntArray(ID3DXConstantTable* iface, LPDIRECT3DDEVICE9 device, - D3DXHANDLE constant, CONST INT* n, UINT count) +static HRESULT set_matrix_array(struct ID3DXConstantTableImpl *table, IDirect3DDevice9 *device, D3DXHANDLE constant, + const void *indata, UINT count, BOOL transpose) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ctab_constant *c = get_valid_constant(table, constant); - FIXME("(%p)->(%p, %p, %p, %d): stub\n", This, device, constant, n, count); + if (!c) + { + WARN("Invalid argument specified\n"); + return D3DERR_INVALIDCALL; + } - return E_NOTIMPL; + switch (c->desc.Class) + { + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_MATRIX_ROWS: + case D3DXPC_MATRIX_COLUMNS: + case D3DXPC_STRUCT: + count *= 16; + set(table, device, c, &indata, D3DXPT_FLOAT, &count, 4, + transpose ? D3DXPC_MATRIX_ROWS : D3DXPC_MATRIX_COLUMNS, 0, FALSE); + return D3D_OK; + + default: + FIXME("Unhandled parameter class %s\n", debug_d3dxparameter_class(c->desc.Class)); + return D3DERR_INVALIDCALL; + } } -static HRESULT WINAPI ID3DXConstantTableImpl_SetFloat(ID3DXConstantTable* iface, LPDIRECT3DDEVICE9 device, - D3DXHANDLE constant, FLOAT f) +static HRESULT set_matrix_pointer_array(struct ID3DXConstantTableImpl *table, IDirect3DDevice9 *device, + D3DXHANDLE constant, const void **indata, UINT count, BOOL transpose) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ctab_constant *c = get_valid_constant(table, constant); - FIXME("(%p)->(%p, %p, %f): stub\n", This, device, constant, f); + if (!c) + { + WARN("Invalid argument specified\n"); + return D3DERR_INVALIDCALL; + } - return E_NOTIMPL; + switch (c->desc.Class) + { + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_MATRIX_ROWS: + case D3DXPC_MATRIX_COLUMNS: + case D3DXPC_STRUCT: + count *= 16; + set(table, device, c, indata, D3DXPT_FLOAT, &count, 4, + transpose ? D3DXPC_MATRIX_ROWS : D3DXPC_MATRIX_COLUMNS, 0, TRUE); + return D3D_OK; + + default: + FIXME("Unhandled parameter class %s\n", debug_d3dxparameter_class(c->desc.Class)); + return D3DERR_INVALIDCALL; + } } -static HRESULT WINAPI ID3DXConstantTableImpl_SetFloatArray(ID3DXConstantTable* iface, LPDIRECT3DDEVICE9 device, - D3DXHANDLE constant, CONST FLOAT* f, UINT count) +static HRESULT WINAPI ID3DXConstantTableImpl_SetDefaults(struct ID3DXConstantTable *iface, + struct IDirect3DDevice9 *device) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); + UINT i; - FIXME("(%p)->(%p, %p, %p, %d): stub\n", This, device, constant, f, count); + TRACE("iface %p, device %p\n", iface, device); - return E_NOTIMPL; + if (!device) + { + WARN("Invalid argument specified\n"); + return D3DERR_INVALIDCALL; + } + + for (i = 0; i < This->desc.Constants; i++) + { + D3DXCONSTANT_DESC *desc = &This->constants[i].desc; + HRESULT hr; + + if (!desc->DefaultValue) + continue; + + switch (desc->RegisterSet) + { + case D3DXRS_BOOL: + if (is_vertex_shader(This->desc.Version)) + hr = IDirect3DDevice9_SetVertexShaderConstantB(device, desc->RegisterIndex, desc->DefaultValue, + desc->RegisterCount); + else + hr = IDirect3DDevice9_SetPixelShaderConstantB(device, desc->RegisterIndex, desc->DefaultValue, + desc->RegisterCount); + break; + + case D3DXRS_INT4: + if (is_vertex_shader(This->desc.Version)) + hr = IDirect3DDevice9_SetVertexShaderConstantI(device, desc->RegisterIndex, desc->DefaultValue, + desc->RegisterCount); + else + hr = IDirect3DDevice9_SetPixelShaderConstantI(device, desc->RegisterIndex, desc->DefaultValue, + desc->RegisterCount); + break; + + case D3DXRS_FLOAT4: + if (is_vertex_shader(This->desc.Version)) + hr = IDirect3DDevice9_SetVertexShaderConstantF(device, desc->RegisterIndex, desc->DefaultValue, + desc->RegisterCount); + else + hr = IDirect3DDevice9_SetPixelShaderConstantF(device, desc->RegisterIndex, desc->DefaultValue, + desc->RegisterCount); + break; + + default: + FIXME("Unhandled register set %s\n", debug_d3dxparameter_registerset(desc->RegisterSet)); + hr = E_NOTIMPL; + break; + } + + if (hr != D3D_OK) + return hr; + } + + return D3D_OK; } -static HRESULT WINAPI ID3DXConstantTableImpl_SetVector(ID3DXConstantTable* iface, LPDIRECT3DDEVICE9 device, - D3DXHANDLE constant, CONST D3DXVECTOR4* vector) +static HRESULT WINAPI ID3DXConstantTableImpl_SetValue(struct ID3DXConstantTable *iface, + struct IDirect3DDevice9 *device, D3DXHANDLE constant, const void *data, unsigned int bytes) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ID3DXConstantTableImpl *table = impl_from_ID3DXConstantTable(iface); + struct ctab_constant *c = get_valid_constant(table, constant); + D3DXCONSTANT_DESC *desc; - FIXME("(%p)->(%p, %p, %p): stub\n", This, device, constant, vector); + TRACE("iface %p, device %p, constant %p, data %p, bytes %u\n", iface, device, constant, data, bytes); - return E_NOTIMPL; + if (!device || !c || !data) + { + WARN("Invalid argument specified\n"); + return D3DERR_INVALIDCALL; + } + + desc = &c->desc; + + switch (desc->Class) + { + case D3DXPC_SCALAR: + case D3DXPC_VECTOR: + case D3DXPC_MATRIX_ROWS: + case D3DXPC_MATRIX_COLUMNS: + case D3DXPC_STRUCT: + bytes /= 4; + set(table, device, c, &data, desc->Type, &bytes, desc->Columns, D3DXPC_SCALAR, 0, FALSE); + return D3D_OK; + + default: + FIXME("Unhandled parameter class %s\n", debug_d3dxparameter_class(desc->Class)); + return D3DERR_INVALIDCALL; + } } -static HRESULT WINAPI ID3DXConstantTableImpl_SetVectorArray(ID3DXConstantTable* iface, LPDIRECT3DDEVICE9 device, - D3DXHANDLE constant, CONST D3DXVECTOR4* vector, UINT count) +static HRESULT WINAPI ID3DXConstantTableImpl_SetBool(struct ID3DXConstantTable *iface, + struct IDirect3DDevice9 *device, D3DXHANDLE constant, BOOL b) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); - FIXME("(%p)->(%p, %p, %p, %d): stub\n", This, device, constant, vector, count); + TRACE("iface %p, device %p, constant %p, b %d\n", iface, device, constant, b); - return E_NOTIMPL; + return set_scalar(This, device, constant, &b, D3DXPT_BOOL); } -static HRESULT WINAPI ID3DXConstantTableImpl_SetMatrix(ID3DXConstantTable* iface, LPDIRECT3DDEVICE9 device, - D3DXHANDLE constant, CONST D3DXMATRIX* matrix) +static HRESULT WINAPI ID3DXConstantTableImpl_SetBoolArray(struct ID3DXConstantTable *iface, + struct IDirect3DDevice9 *device, D3DXHANDLE constant, const BOOL *b, UINT count) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); - FIXME("(%p)->(%p, %p, %p): stub\n", This, device, constant, matrix); + TRACE("iface %p, device %p, constant %p, b %p, count %d\n", iface, device, constant, b, count); - return E_NOTIMPL; + return set_scalar_array(This, device, constant, b, count, D3DXPT_BOOL); } -static HRESULT WINAPI ID3DXConstantTableImpl_SetMatrixArray(ID3DXConstantTable* iface, LPDIRECT3DDEVICE9 device, - D3DXHANDLE constant, CONST D3DXMATRIX* matrix, UINT count) +static HRESULT WINAPI ID3DXConstantTableImpl_SetInt(struct ID3DXConstantTable *iface, + struct IDirect3DDevice9 *device, D3DXHANDLE constant, INT n) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); - FIXME("(%p)->(%p, %p, %p, %d): stub\n", This, device, constant, matrix, count); + TRACE("iface %p, device %p, constant %p, n %d\n", iface, device, constant, n); - return E_NOTIMPL; + return set_scalar(This, device, constant, &n, D3DXPT_INT); } -static HRESULT WINAPI ID3DXConstantTableImpl_SetMatrixPointerArray(ID3DXConstantTable* iface, LPDIRECT3DDEVICE9 device, - D3DXHANDLE constant, CONST D3DXMATRIX** matrix, UINT count) +static HRESULT WINAPI ID3DXConstantTableImpl_SetIntArray(struct ID3DXConstantTable *iface, + struct IDirect3DDevice9 *device, D3DXHANDLE constant, const INT *n, UINT count) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); - FIXME("(%p)->(%p, %p, %p, %d): stub\n", This, device, constant, matrix, count); + TRACE("iface %p, device %p, constant %p, n %p, count %d\n", iface, device, constant, n, count); - return E_NOTIMPL; + return set_scalar_array(This, device, constant, n, count, D3DXPT_INT); } -static HRESULT WINAPI ID3DXConstantTableImpl_SetMatrixTranspose(ID3DXConstantTable* iface, LPDIRECT3DDEVICE9 device, - D3DXHANDLE constant, CONST D3DXMATRIX* matrix) +static HRESULT WINAPI ID3DXConstantTableImpl_SetFloat(struct ID3DXConstantTable *iface, + struct IDirect3DDevice9 *device, D3DXHANDLE constant, float f) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); - FIXME("(%p)->(%p, %p, %p): stub\n", This, device, constant, matrix); + TRACE("iface %p, device %p, constant %p, f %f\n", iface, device, constant, f); - return E_NOTIMPL; + return set_scalar(This, device, constant, &f, D3DXPT_FLOAT); } -static HRESULT WINAPI ID3DXConstantTableImpl_SetMatrixTransposeArray(ID3DXConstantTable* iface, LPDIRECT3DDEVICE9 device, - D3DXHANDLE constant, CONST D3DXMATRIX* matrix, UINT count) +static HRESULT WINAPI ID3DXConstantTableImpl_SetFloatArray(struct ID3DXConstantTable *iface, + struct IDirect3DDevice9 *device, D3DXHANDLE constant, const float *f, UINT count) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); - FIXME("(%p)->(%p, %p, %p, %d): stub\n", This, device, constant, matrix, count); + TRACE("iface %p, device %p, constant %p, f %p, count %d\n", iface, device, constant, f, count); - return E_NOTIMPL; + return set_scalar_array(This, device, constant, f, count, D3DXPT_FLOAT); } -static HRESULT WINAPI ID3DXConstantTableImpl_SetMatrixTransposePointerArray(ID3DXConstantTable* iface, LPDIRECT3DDEVICE9 device, - D3DXHANDLE constant, CONST D3DXMATRIX** matrix, UINT count) +static HRESULT WINAPI ID3DXConstantTableImpl_SetVector(struct ID3DXConstantTable *iface, + struct IDirect3DDevice9 *device, D3DXHANDLE constant, const D3DXVECTOR4 *vector) { - ID3DXConstantTableImpl *This = (ID3DXConstantTableImpl *)iface; + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); - FIXME("(%p)->(%p, %p, %p, %d): stub\n", This, device, constant, matrix, count); + TRACE("iface %p, device %p, constant %p, vector %p\n", iface, device, constant, vector); - return E_NOTIMPL; + return set_vector(This, device, constant, vector, D3DXPT_FLOAT); +} + +static HRESULT WINAPI ID3DXConstantTableImpl_SetVectorArray(struct ID3DXConstantTable *iface, + struct IDirect3DDevice9 *device, D3DXHANDLE constant, const D3DXVECTOR4 *vector, UINT count) +{ + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); + + TRACE("iface %p, device %p, constant %p, vector %p, count %u\n", iface, device, constant, vector, count); + + return set_vector_array(This, device, constant, vector, count, D3DXPT_FLOAT); +} + +static HRESULT WINAPI ID3DXConstantTableImpl_SetMatrix(struct ID3DXConstantTable *iface, + struct IDirect3DDevice9 *device, D3DXHANDLE constant, const D3DXMATRIX *matrix) +{ + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); + + TRACE("iface %p, device %p, constant %p, matrix %p\n", iface, device, constant, matrix); + + return set_matrix_array(This, device, constant, matrix, 1, FALSE); +} + +static HRESULT WINAPI ID3DXConstantTableImpl_SetMatrixArray(struct ID3DXConstantTable *iface, + struct IDirect3DDevice9 *device, D3DXHANDLE constant, const D3DXMATRIX *matrix, UINT count) +{ + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); + + TRACE("iface %p, device %p, constant %p, matrix %p, count %u\n", iface, device, constant, matrix, count); + + return set_matrix_array(This, device, constant, matrix, count, FALSE); +} + +static HRESULT WINAPI ID3DXConstantTableImpl_SetMatrixPointerArray(struct ID3DXConstantTable *iface, + struct IDirect3DDevice9 *device, D3DXHANDLE constant, const D3DXMATRIX **matrix, UINT count) +{ + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); + + TRACE("iface %p, device %p, constant %p, matrix %p, count %u)\n", iface, device, constant, matrix, count); + + return set_matrix_pointer_array(This, device, constant, (const void **)matrix, count, FALSE); +} + +static HRESULT WINAPI ID3DXConstantTableImpl_SetMatrixTranspose(struct ID3DXConstantTable *iface, + struct IDirect3DDevice9 *device, D3DXHANDLE constant, const D3DXMATRIX *matrix) +{ + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); + + TRACE("iface %p, device %p, constant %p, matrix %p\n", iface, device, constant, matrix); + + return set_matrix_array(This, device, constant, matrix, 1, TRUE); +} + +static HRESULT WINAPI ID3DXConstantTableImpl_SetMatrixTransposeArray(struct ID3DXConstantTable *iface, + struct IDirect3DDevice9 *device, D3DXHANDLE constant, const D3DXMATRIX *matrix, UINT count) +{ + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); + + TRACE("iface %p, device %p, constant %p, matrix %p, count %u\n", iface, device, constant, matrix, count); + + return set_matrix_array(This, device, constant, matrix, count, TRUE); +} + +static HRESULT WINAPI ID3DXConstantTableImpl_SetMatrixTransposePointerArray(struct ID3DXConstantTable *iface, + struct IDirect3DDevice9 *device, D3DXHANDLE constant, const D3DXMATRIX **matrix, UINT count) +{ + struct ID3DXConstantTableImpl *This = impl_from_ID3DXConstantTable(iface); + + TRACE("iface %p, device %p, constant %p, matrix %p, count %u)\n", iface, device, constant, matrix, count); + + return set_matrix_pointer_array(This, device, constant, (const void **)matrix, count, TRUE); } static const struct ID3DXConstantTableVtbl ID3DXConstantTable_Vtbl = @@ -564,9 +1673,10 @@ static const struct ID3DXConstantTableVtbl ID3DXConstantTable_Vtbl = /*** ID3DXConstantTable methods ***/ ID3DXConstantTableImpl_GetDesc, ID3DXConstantTableImpl_GetConstantDesc, + ID3DXConstantTableImpl_GetSamplerIndex, ID3DXConstantTableImpl_GetConstant, ID3DXConstantTableImpl_GetConstantByName, - ID3DXConstantTableImpl_GetConstantByElement, + ID3DXConstantTableImpl_GetConstantElement, ID3DXConstantTableImpl_SetDefaults, ID3DXConstantTableImpl_SetValue, ID3DXConstantTableImpl_SetBool, @@ -585,53 +1695,312 @@ static const struct ID3DXConstantTableVtbl ID3DXConstantTable_Vtbl = ID3DXConstantTableImpl_SetMatrixTransposePointerArray }; -HRESULT WINAPI D3DXGetShaderConstantTableEx(CONST DWORD* pFunction, - DWORD flags, - LPD3DXCONSTANTTABLE* ppConstantTable) +static HRESULT parse_ctab_constant_type(const char *ctab, DWORD typeoffset, struct ctab_constant *constant, + BOOL is_element, WORD index, WORD max, DWORD *offset, DWORD nameoffset, UINT regset) { - ID3DXConstantTableImpl* object; + const D3DXSHADER_TYPEINFO *type = (LPD3DXSHADER_TYPEINFO)(ctab + typeoffset); + const D3DXSHADER_STRUCTMEMBERINFO *memberinfo = NULL; + HRESULT hr = D3D_OK; + UINT i, count = 0; + WORD size = 0; + + constant->desc.DefaultValue = offset ? ctab + *offset : NULL; + constant->desc.Class = type->Class; + constant->desc.Type = type->Type; + constant->desc.Rows = type->Rows; + constant->desc.Columns = type->Columns; + constant->desc.Elements = is_element ? 1 : type->Elements; + constant->desc.StructMembers = type->StructMembers; + constant->desc.Name = ctab + nameoffset; + constant->desc.RegisterSet = regset; + constant->desc.RegisterIndex = index; + + TRACE("name %s, elements %u, index %u, defaultvalue %p, regset %s\n", constant->desc.Name, + constant->desc.Elements, index, constant->desc.DefaultValue, + debug_d3dxparameter_registerset(regset)); + TRACE("class %s, type %s, rows %d, columns %d, elements %d, struct_members %d\n", + debug_d3dxparameter_class(type->Class), debug_d3dxparameter_type(type->Type), + type->Rows, type->Columns, type->Elements, type->StructMembers); + + if (type->Elements > 1 && !is_element) + { + count = type->Elements; + } + else if ((type->Class == D3DXPC_STRUCT) && type->StructMembers) + { + memberinfo = (D3DXSHADER_STRUCTMEMBERINFO*)(ctab + type->StructMemberInfo); + count = type->StructMembers; + } + + if (count) + { + constant->constants = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*constant->constants) * count); + if (!constant->constants) + { + ERR("Out of memory\n"); + hr = E_OUTOFMEMORY; + goto error; + } + + for (i = 0; i < count; ++i) + { + hr = parse_ctab_constant_type(ctab, memberinfo ? memberinfo[i].TypeInfo : typeoffset, + &constant->constants[i], memberinfo == NULL, index + size, max, offset, + memberinfo ? memberinfo[i].Name : nameoffset, regset); + if (hr != D3D_OK) + goto error; + + size += constant->constants[i].desc.RegisterCount; + } + } + else + { + WORD offsetdiff = type->Columns * type->Rows; + BOOL fail = FALSE; + + size = type->Columns * type->Rows; + + switch (regset) + { + case D3DXRS_BOOL: + fail = type->Class != D3DXPC_SCALAR && type->Class != D3DXPC_VECTOR + && type->Class != D3DXPC_MATRIX_ROWS && type->Class != D3DXPC_MATRIX_COLUMNS; + break; + + case D3DXRS_FLOAT4: + case D3DXRS_INT4: + switch (type->Class) + { + case D3DXPC_VECTOR: + size = 1; + /* fall through */ + case D3DXPC_SCALAR: + offsetdiff = type->Rows * 4; + break; + + case D3DXPC_MATRIX_ROWS: + offsetdiff = type->Rows * 4; + size = is_element ? type->Rows : max(type->Rows, type->Columns); + break; + + case D3DXPC_MATRIX_COLUMNS: + offsetdiff = type->Columns * 4; + size = type->Columns; + break; + + default: + fail = TRUE; + break; + } + break; + + case D3DXRS_SAMPLER: + size = 1; + fail = type->Class != D3DXPC_OBJECT; + break; + + default: + fail = TRUE; + break; + } + + if (fail) + { + FIXME("Unhandled register set %s, type class %s\n", debug_d3dxparameter_registerset(regset), + debug_d3dxparameter_class(type->Class)); + } + + /* offset in bytes => offsetdiff * sizeof(DWORD) */ + if (offset) *offset += offsetdiff * 4; + } + + constant->desc.RegisterCount = max(0, min(max - index, size)); + constant->desc.Bytes = 4 * constant->desc.Elements * type->Rows * type->Columns; + + return D3D_OK; + +error: + if (constant->constants) + { + for (i = 0; i < count; ++i) + { + free_constant(&constant->constants[i]); + } + HeapFree(GetProcessHeap(), 0, constant->constants); + constant->constants = NULL; + } + + return hr; +} + +HRESULT WINAPI D3DXGetShaderConstantTableEx(const DWORD *byte_code, DWORD flags, ID3DXConstantTable **constant_table) +{ + struct ID3DXConstantTableImpl *object = NULL; HRESULT hr; LPCVOID data; UINT size; + const D3DXSHADER_CONSTANTTABLE *ctab_header; + const D3DXSHADER_CONSTANTINFO *constant_info; + DWORD i; - FIXME("(%p, %x, %p): semi-stub\n", pFunction, flags, ppConstantTable); + TRACE("byte_code %p, flags %x, constant_table %p\n", byte_code, flags, constant_table); - if (!pFunction || !ppConstantTable) - return D3DERR_INVALIDCALL; + if (constant_table) *constant_table = NULL; - hr = D3DXFindShaderComment(pFunction, MAKEFOURCC('C','T','A','B'), &data, &size); - if (hr != D3D_OK) - return D3DXERR_INVALIDDATA; - - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ID3DXConstantTableImpl)); - if (!object) + if (!byte_code || !constant_table) { - ERR("Out of memory\n"); - return E_OUTOFMEMORY; + WARN("Invalid argument specified.\n"); + return D3DERR_INVALIDCALL; } - object->lpVtbl = &ID3DXConstantTable_Vtbl; + if (!is_valid_bytecode(*byte_code)) + { + WARN("Invalid byte_code specified.\n"); + return D3D_OK; + } + + if (flags) FIXME("Flags (%#x) are not handled, yet!\n", flags); + + hr = D3DXFindShaderComment(byte_code, MAKEFOURCC('C','T','A','B'), &data, &size); + if (hr != D3D_OK) + { + WARN("CTAB not found.\n"); + return D3DXERR_INVALIDDATA; + } + + if (size < sizeof(*ctab_header)) + { + WARN("Invalid CTAB size.\n"); + return D3DXERR_INVALIDDATA; + } + + ctab_header = (const D3DXSHADER_CONSTANTTABLE *)data; + if (ctab_header->Size != sizeof(*ctab_header)) + { + WARN("Invalid D3DXSHADER_CONSTANTTABLE size.\n"); + return D3DXERR_INVALIDDATA; + } + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + return E_OUTOFMEMORY; + + object->ID3DXConstantTable_iface.lpVtbl = &ID3DXConstantTable_Vtbl; object->ref = 1; object->ctab = HeapAlloc(GetProcessHeap(), 0, size); if (!object->ctab) { - HeapFree(GetProcessHeap(), 0, object); ERR("Out of memory\n"); + HeapFree(GetProcessHeap(), 0, object); return E_OUTOFMEMORY; } object->size = size; memcpy(object->ctab, data, object->size); - *ppConstantTable = (LPD3DXCONSTANTTABLE)object; + object->desc.Creator = ctab_header->Creator ? object->ctab + ctab_header->Creator : NULL; + object->desc.Version = ctab_header->Version; + object->desc.Constants = ctab_header->Constants; + TRACE("Creator %s, Version %x, Constants %u, Target %s\n", + debugstr_a(object->desc.Creator), object->desc.Version, object->desc.Constants, + debugstr_a(ctab_header->Target ? object->ctab + ctab_header->Target : NULL)); + + object->constants = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + sizeof(*object->constants) * object->desc.Constants); + if (!object->constants) + { + ERR("Out of memory\n"); + hr = E_OUTOFMEMORY; + goto error; + } + + constant_info = (const D3DXSHADER_CONSTANTINFO *)(object->ctab + ctab_header->ConstantInfo); + for (i = 0; i < ctab_header->Constants; i++) + { + DWORD offset = constant_info[i].DefaultValue; + + hr = parse_ctab_constant_type(object->ctab, constant_info[i].TypeInfo, + &object->constants[i], FALSE, constant_info[i].RegisterIndex, + constant_info[i].RegisterIndex + constant_info[i].RegisterCount, + offset ? &offset : NULL, constant_info[i].Name, constant_info[i].RegisterSet); + if (hr != D3D_OK) + goto error; + + /* + * Set the register count, it may differ for D3DXRS_INT4, because somehow + * it makes the assumption that the register size is 1 instead of 4, so the + * count is 4 times bigger. This holds true only for toplevel shader + * constants. The count of elements and members is always based on a + * register size of 4. + */ + if (object->constants[i].desc.RegisterSet == D3DXRS_INT4) + { + object->constants[i].desc.RegisterCount = constant_info[i].RegisterCount; + } + } + + *constant_table = &object->ID3DXConstantTable_iface; + + return D3D_OK; + +error: + free_constant_table(object); + HeapFree(GetProcessHeap(), 0, object); + + return hr; +} + +HRESULT WINAPI D3DXGetShaderConstantTable(const DWORD *byte_code, ID3DXConstantTable **constant_table) +{ + TRACE("(%p, %p): Forwarded to D3DXGetShaderConstantTableEx\n", byte_code, constant_table); + + return D3DXGetShaderConstantTableEx(byte_code, 0, constant_table); +} + +HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **samplers, UINT *count) +{ + UINT i, sampler_count = 0; + UINT size; + const char *data; + const D3DXSHADER_CONSTANTTABLE *ctab_header; + const D3DXSHADER_CONSTANTINFO *constant_info; + + TRACE("byte_code %p, samplers %p, count %p\n", byte_code, samplers, count); + + if (count) *count = 0; + + if (D3DXFindShaderComment(byte_code, MAKEFOURCC('C','T','A','B'), (const void **)&data, &size) != D3D_OK) + return D3D_OK; + + if (size < sizeof(*ctab_header)) return D3D_OK; + + ctab_header = (const D3DXSHADER_CONSTANTTABLE *)data; + if (ctab_header->Size != sizeof(*ctab_header)) return D3D_OK; + + constant_info = (const D3DXSHADER_CONSTANTINFO *)(data + ctab_header->ConstantInfo); + for (i = 0; i < ctab_header->Constants; i++) + { + const D3DXSHADER_TYPEINFO *type; + + TRACE("name = %s\n", data + constant_info[i].Name); + + type = (const D3DXSHADER_TYPEINFO *)(data + constant_info[i].TypeInfo); + + if (type->Type == D3DXPT_SAMPLER + || type->Type == D3DXPT_SAMPLER1D + || type->Type == D3DXPT_SAMPLER2D + || type->Type == D3DXPT_SAMPLER3D + || type->Type == D3DXPT_SAMPLERCUBE) + { + if (samplers) samplers[sampler_count] = data + constant_info[i].Name; + + ++sampler_count; + } + } + + TRACE("Found %u samplers\n", sampler_count); + + if (count) *count = sampler_count; return D3D_OK; } - -HRESULT WINAPI D3DXGetShaderConstantTable(CONST DWORD* pFunction, - LPD3DXCONSTANTTABLE* ppConstantTable) -{ - TRACE("(%p, %p): Forwarded to D3DXGetShaderConstantTableEx\n", pFunction, ppConstantTable); - - return D3DXGetShaderConstantTableEx(pFunction, 0, ppConstantTable); -} diff --git a/dll/directx/wine/d3dx9_36/skin.c b/dll/directx/wine/d3dx9_36/skin.c new file mode 100644 index 00000000000..85c4d64a63e --- /dev/null +++ b/dll/directx/wine/d3dx9_36/skin.c @@ -0,0 +1,505 @@ +/* + * Skin Info operations specific to D3DX9. + * + * Copyright (C) 2011 Dylan Smith + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "wine/debug.h" +#include "d3dx9_36_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(d3dx); + +struct bone +{ + char *name; + D3DXMATRIX transform; + DWORD num_influences; + DWORD *vertices; + FLOAT *weights; +}; + +typedef struct ID3DXSkinInfoImpl +{ + ID3DXSkinInfo ID3DXSkinInfo_iface; + LONG ref; + + DWORD fvf; + D3DVERTEXELEMENT9 vertex_declaration[MAX_FVF_DECL_SIZE]; + DWORD num_vertices; + DWORD num_bones; + struct bone *bones; +} ID3DXSkinInfoImpl; + +static inline struct ID3DXSkinInfoImpl *impl_from_ID3DXSkinInfo(ID3DXSkinInfo *iface) +{ + return CONTAINING_RECORD(iface, struct ID3DXSkinInfoImpl, ID3DXSkinInfo_iface); +} + +static HRESULT WINAPI ID3DXSkinInfoImpl_QueryInterface(ID3DXSkinInfo *iface, REFIID riid, void **ppobj) +{ + TRACE("(%p, %s, %p)\n", iface, debugstr_guid(riid), ppobj); + + if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_ID3DXSkinInfo)) + { + IUnknown_AddRef(iface); + *ppobj = iface; + return D3D_OK; + } + + WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid)); + + return E_NOINTERFACE; +} + +static ULONG WINAPI ID3DXSkinInfoImpl_AddRef(ID3DXSkinInfo *iface) +{ + struct ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("%p increasing refcount to %u\n", This, ref); + + return ref; +} + +static ULONG WINAPI ID3DXSkinInfoImpl_Release(ID3DXSkinInfo *iface) +{ + struct ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("%p decreasing refcount to %u\n", This, ref); + + if (ref == 0) { + DWORD i; + for (i = 0; i < This->num_bones; i++) { + HeapFree(GetProcessHeap(), 0, This->bones[i].name); + HeapFree(GetProcessHeap(), 0, This->bones[i].vertices); + HeapFree(GetProcessHeap(), 0, This->bones[i].weights); + } + HeapFree(GetProcessHeap(), 0, This->bones); + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + +static HRESULT WINAPI ID3DXSkinInfoImpl_SetBoneInfluence(ID3DXSkinInfo *iface, DWORD bone_num, DWORD num_influences, CONST DWORD *vertices, CONST FLOAT *weights) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + struct bone *bone; + DWORD *new_vertices = NULL; + FLOAT *new_weights = NULL; + + TRACE("(%p, %u, %u, %p, %p)\n", This, bone_num, num_influences, vertices, weights); + + if (bone_num >= This->num_bones || !vertices || !weights) + return D3DERR_INVALIDCALL; + + if (num_influences) { + new_vertices = HeapAlloc(GetProcessHeap(), 0, num_influences * sizeof(*vertices)); + if (!new_vertices) + return E_OUTOFMEMORY; + new_weights = HeapAlloc(GetProcessHeap(), 0, num_influences * sizeof(*weights)); + if (!new_weights) { + HeapFree(GetProcessHeap(), 0, new_vertices); + return E_OUTOFMEMORY; + } + memcpy(new_vertices, vertices, num_influences * sizeof(*vertices)); + memcpy(new_weights, weights, num_influences * sizeof(*weights)); + } + bone = &This->bones[bone_num]; + bone->num_influences = num_influences; + HeapFree(GetProcessHeap(), 0, bone->vertices); + HeapFree(GetProcessHeap(), 0, bone->weights); + bone->vertices = new_vertices; + bone->weights = new_weights; + + return D3D_OK; +} + +static HRESULT WINAPI ID3DXSkinInfoImpl_SetBoneVertexInfluence(ID3DXSkinInfo *iface, DWORD bone_num, DWORD influence_num, float weight) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + + FIXME("(%p, %u, %u, %g): stub\n", This, bone_num, influence_num, weight); + + return E_NOTIMPL; +} + +static DWORD WINAPI ID3DXSkinInfoImpl_GetNumBoneInfluences(ID3DXSkinInfo *iface, DWORD bone_num) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + + TRACE("(%p, %u)\n", This, bone_num); + + if (bone_num >= This->num_bones) + return 0; + + return This->bones[bone_num].num_influences; +} + +static HRESULT WINAPI ID3DXSkinInfoImpl_GetBoneInfluence(ID3DXSkinInfo *iface, DWORD bone_num, DWORD *vertices, FLOAT *weights) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + struct bone *bone; + + TRACE("(%p, %u, %p, %p)\n", This, bone_num, vertices, weights); + + if (bone_num >= This->num_bones || !vertices) + return D3DERR_INVALIDCALL; + + bone = &This->bones[bone_num]; + if (!bone->num_influences) + return D3D_OK; + + memcpy(vertices, bone->vertices, bone->num_influences * sizeof(*vertices)); + if (weights) + memcpy(weights, bone->weights, bone->num_influences * sizeof(*weights)); + + return D3D_OK; +} + +static HRESULT WINAPI ID3DXSkinInfoImpl_GetBoneVertexInfluence(ID3DXSkinInfo *iface, DWORD bone_num, + DWORD influence_num, float *weight, DWORD *vertex_num) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + + FIXME("(%p, %u, %u, %p, %p): stub\n", This, bone_num, influence_num, weight, vertex_num); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ID3DXSkinInfoImpl_GetMaxVertexInfluences(ID3DXSkinInfo *iface, DWORD *max_vertex_influences) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + + FIXME("(%p, %p): stub\n", This, max_vertex_influences); + + return E_NOTIMPL; +} + +static DWORD WINAPI ID3DXSkinInfoImpl_GetNumBones(ID3DXSkinInfo *iface) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + + TRACE("(%p)\n", This); + + return This->num_bones; +} + +static HRESULT WINAPI ID3DXSkinInfoImpl_FindBoneVertexInfluenceIndex(ID3DXSkinInfo *iface, DWORD bone_num, + DWORD vertex_num, DWORD *influence_index) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + + FIXME("(%p, %u, %u, %p): stub\n", This, bone_num, vertex_num, influence_index); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ID3DXSkinInfoImpl_GetMaxFaceInfluences(struct ID3DXSkinInfo *iface, + struct IDirect3DIndexBuffer9 *index_buffer, DWORD num_faces, DWORD *max_face_influences) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + + FIXME("(%p, %p, %u, %p): stub\n", This, index_buffer, num_faces, max_face_influences); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ID3DXSkinInfoImpl_SetMinBoneInfluence(ID3DXSkinInfo *iface, FLOAT min_influence) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + + FIXME("(%p, %g): stub\n", This, min_influence); + + return E_NOTIMPL; +} + +static FLOAT WINAPI ID3DXSkinInfoImpl_GetMinBoneInfluence(ID3DXSkinInfo *iface) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + + FIXME("(%p): stub\n", This); + + return 0.0f; +} + +static HRESULT WINAPI ID3DXSkinInfoImpl_SetBoneName(ID3DXSkinInfo *iface, DWORD bone_num, LPCSTR name) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + char *new_name; + size_t size; + + TRACE("(%p, %u, %s)\n", This, bone_num, debugstr_a(name)); + + if (bone_num >= This->num_bones || !name) + return D3DERR_INVALIDCALL; + + size = strlen(name) + 1; + new_name = HeapAlloc(GetProcessHeap(), 0, size); + if (!new_name) + return E_OUTOFMEMORY; + memcpy(new_name, name, size); + HeapFree(GetProcessHeap(), 0, This->bones[bone_num].name); + This->bones[bone_num].name = new_name; + + return D3D_OK; +} + +static LPCSTR WINAPI ID3DXSkinInfoImpl_GetBoneName(ID3DXSkinInfo *iface, DWORD bone_num) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + + TRACE("(%p, %u)\n", This, bone_num); + + if (bone_num >= This->num_bones) + return NULL; + + return This->bones[bone_num].name; +} + +static HRESULT WINAPI ID3DXSkinInfoImpl_SetBoneOffsetMatrix(ID3DXSkinInfo *iface, DWORD bone_num, CONST D3DXMATRIX *bone_transform) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + + TRACE("(%p, %u, %p)\n", This, bone_num, bone_transform); + + if (bone_num >= This->num_bones || !bone_transform) + return D3DERR_INVALIDCALL; + + This->bones[bone_num].transform = *bone_transform; + return D3D_OK; +} + +static D3DXMATRIX * WINAPI ID3DXSkinInfoImpl_GetBoneOffsetMatrix(ID3DXSkinInfo *iface, DWORD bone_num) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + + TRACE("(%p, %u)\n", This, bone_num); + + if (bone_num >= This->num_bones) + return NULL; + + return &This->bones[bone_num].transform; +} + +static HRESULT WINAPI ID3DXSkinInfoImpl_Clone(ID3DXSkinInfo *iface, ID3DXSkinInfo **skin_info) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + + FIXME("(%p, %p): stub\n", This, skin_info); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ID3DXSkinInfoImpl_Remap(ID3DXSkinInfo *iface, DWORD num_vertices, DWORD *vertex_remap) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + + FIXME("(%p, %u, %p): stub\n", This, num_vertices, vertex_remap); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ID3DXSkinInfoImpl_SetFVF(ID3DXSkinInfo *iface, DWORD fvf) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + HRESULT hr; + D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]; + + TRACE("(%p, %x)\n", This, fvf); + + hr = D3DXDeclaratorFromFVF(fvf, declaration); + if (FAILED(hr)) return hr; + + return iface->lpVtbl->SetDeclaration(iface, declaration); +} + +static HRESULT WINAPI ID3DXSkinInfoImpl_SetDeclaration(ID3DXSkinInfo *iface, CONST D3DVERTEXELEMENT9 *declaration) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + HRESULT hr; + int count; + + TRACE("(%p, %p)\n", This, declaration); + + if (!declaration) + return D3DERR_INVALIDCALL; + for (count = 0; declaration[count].Stream != 0xff; count++) { + if (declaration[count].Stream != 0) { + WARN("Invalid vertex element %u; contains non-zero stream %u\n", + count, declaration[count].Stream); + return D3DERR_INVALIDCALL; + } + } + count++; + + memcpy(This->vertex_declaration, declaration, count * sizeof(*declaration)); + + hr = D3DXFVFFromDeclarator(This->vertex_declaration, &This->fvf); + if (FAILED(hr)) + This->fvf = 0; + + return D3D_OK; +} + +static DWORD WINAPI ID3DXSkinInfoImpl_GetFVF(ID3DXSkinInfo *iface) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + + TRACE("(%p)\n", This); + + return This->fvf; +} + +static HRESULT WINAPI ID3DXSkinInfoImpl_GetDeclaration(ID3DXSkinInfo *iface, D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + UINT count = 0; + + TRACE("(%p)\n", This); + + while (This->vertex_declaration[count++].Stream != 0xff); + memcpy(declaration, This->vertex_declaration, count * sizeof(declaration[0])); + return D3D_OK; +} + +static HRESULT WINAPI ID3DXSkinInfoImpl_UpdateSkinnedMesh(ID3DXSkinInfo *iface, CONST D3DXMATRIX *bone_transforms, + CONST D3DXMATRIX *bone_inv_transpose_transforms, LPCVOID vertices_src, PVOID vertices_dest) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + + FIXME("(%p, %p, %p, %p, %p): stub\n", This, bone_transforms, bone_inv_transpose_transforms, vertices_src, vertices_dest); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ID3DXSkinInfoImpl_ConvertToBlendedMesh(ID3DXSkinInfo *iface, ID3DXMesh *mesh_in, + DWORD options, const DWORD *adjacency_in, DWORD *adjacency_out, DWORD *face_remap, + ID3DXBuffer **vertex_remap, DWORD *max_face_infl, DWORD *num_bone_combinations, + ID3DXBuffer **bone_combination_table, ID3DXMesh **mesh_out) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + + FIXME("(%p, %p, %x, %p, %p, %p, %p, %p, %p, %p, %p): stub\n", + This, mesh_in, options, adjacency_in, adjacency_out, face_remap, vertex_remap, + max_face_infl, num_bone_combinations, bone_combination_table, mesh_out); + + return E_NOTIMPL; +} + +static HRESULT WINAPI ID3DXSkinInfoImpl_ConvertToIndexedBlendedMesh(ID3DXSkinInfo *iface, ID3DXMesh *mesh_in, + DWORD options, const DWORD *adjacency_in, DWORD *adjacency_out, DWORD *face_remap, + ID3DXBuffer **vertex_remap, DWORD *max_face_infl, DWORD *num_bone_combinations, + ID3DXBuffer **bone_combination_table, ID3DXMesh **mesh_out) +{ + ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface); + + FIXME("(%p, %p, %x, %p, %p, %p, %p, %p, %p, %p, %p): stub\n", + This, mesh_in, options, adjacency_in, adjacency_out, face_remap, vertex_remap, + max_face_infl, num_bone_combinations, bone_combination_table, mesh_out); + + return E_NOTIMPL; +} + +static const struct ID3DXSkinInfoVtbl ID3DXSkinInfoImpl_Vtbl = +{ + /* IUnknown methods */ + ID3DXSkinInfoImpl_QueryInterface, + ID3DXSkinInfoImpl_AddRef, + ID3DXSkinInfoImpl_Release, + /* ID3DXSkinInfo */ + ID3DXSkinInfoImpl_SetBoneInfluence, + ID3DXSkinInfoImpl_SetBoneVertexInfluence, + ID3DXSkinInfoImpl_GetNumBoneInfluences, + ID3DXSkinInfoImpl_GetBoneInfluence, + ID3DXSkinInfoImpl_GetBoneVertexInfluence, + ID3DXSkinInfoImpl_GetMaxVertexInfluences, + ID3DXSkinInfoImpl_GetNumBones, + ID3DXSkinInfoImpl_FindBoneVertexInfluenceIndex, + ID3DXSkinInfoImpl_GetMaxFaceInfluences, + ID3DXSkinInfoImpl_SetMinBoneInfluence, + ID3DXSkinInfoImpl_GetMinBoneInfluence, + ID3DXSkinInfoImpl_SetBoneName, + ID3DXSkinInfoImpl_GetBoneName, + ID3DXSkinInfoImpl_SetBoneOffsetMatrix, + ID3DXSkinInfoImpl_GetBoneOffsetMatrix, + ID3DXSkinInfoImpl_Clone, + ID3DXSkinInfoImpl_Remap, + ID3DXSkinInfoImpl_SetFVF, + ID3DXSkinInfoImpl_SetDeclaration, + ID3DXSkinInfoImpl_GetFVF, + ID3DXSkinInfoImpl_GetDeclaration, + ID3DXSkinInfoImpl_UpdateSkinnedMesh, + ID3DXSkinInfoImpl_ConvertToBlendedMesh, + ID3DXSkinInfoImpl_ConvertToIndexedBlendedMesh +}; + +HRESULT WINAPI D3DXCreateSkinInfo(DWORD num_vertices, const D3DVERTEXELEMENT9 *declaration, + DWORD num_bones, ID3DXSkinInfo **skin_info) +{ + HRESULT hr; + ID3DXSkinInfoImpl *object = NULL; + static const D3DVERTEXELEMENT9 empty_declaration = D3DDECL_END(); + + TRACE("(%u, %p, %u, %p)\n", num_vertices, declaration, num_bones, skin_info); + + if (!skin_info || !declaration) + return D3DERR_INVALIDCALL; + + object = HeapAlloc(GetProcessHeap(), 0, sizeof(*object)); + if (!object) + return E_OUTOFMEMORY; + + object->ID3DXSkinInfo_iface.lpVtbl = &ID3DXSkinInfoImpl_Vtbl; + object->ref = 1; + object->num_vertices = num_vertices; + object->num_bones = num_bones; + object->vertex_declaration[0] = empty_declaration; + object->fvf = 0; + + object->bones = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, num_bones * sizeof(*object->bones)); + if (!object->bones) { + hr = E_OUTOFMEMORY; + goto error; + } + + hr = ID3DXSkinInfoImpl_SetDeclaration(&object->ID3DXSkinInfo_iface, declaration); + if (FAILED(hr)) goto error; + + *skin_info = &object->ID3DXSkinInfo_iface; + + return D3D_OK; +error: + HeapFree(GetProcessHeap(), 0, object->bones); + HeapFree(GetProcessHeap(), 0, object); + return hr; +} + +HRESULT WINAPI D3DXCreateSkinInfoFVF(DWORD num_vertices, DWORD fvf, DWORD num_bones, ID3DXSkinInfo **skin_info) +{ + HRESULT hr; + D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]; + + TRACE("(%u, %x, %u, %p)\n", num_vertices, fvf, num_bones, skin_info); + + hr = D3DXDeclaratorFromFVF(fvf, declaration); + if (FAILED(hr)) + return hr; + + return D3DXCreateSkinInfo(num_vertices, declaration, num_bones, skin_info); +} diff --git a/dll/directx/wine/d3dx9_36/sprite.c b/dll/directx/wine/d3dx9_36/sprite.c index f625b814c33..6465633798b 100644 --- a/dll/directx/wine/d3dx9_36/sprite.c +++ b/dll/directx/wine/d3dx9_36/sprite.c @@ -31,33 +31,76 @@ typedef struct _SPRITEVERTEX { D3DXVECTOR2 tex; } SPRITEVERTEX; -static HRESULT WINAPI ID3DXSpriteImpl_QueryInterface(LPD3DXSPRITE iface, REFIID riid, LPVOID *object) -{ - ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; +typedef struct _SPRITE { + IDirect3DTexture9 *texture; + UINT texw, texh; + RECT rect; + D3DXVECTOR3 center; + D3DXVECTOR3 pos; + D3DCOLOR color; + D3DXMATRIX transform; +} SPRITE; - TRACE("(%p): QueryInterface from %s\n", This, debugstr_guid(riid)); - if(IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_ID3DXSprite)) { +typedef struct ID3DXSpriteImpl +{ + ID3DXSprite ID3DXSprite_iface; + LONG ref; + + IDirect3DDevice9 *device; + IDirect3DVertexDeclaration9 *vdecl; + IDirect3DStateBlock9 *stateblock; + D3DXMATRIX transform; + D3DXMATRIX view; + DWORD flags; + BOOL ready; + + /* Store the relevant caps to prevent multiple GetDeviceCaps calls */ + DWORD texfilter_caps; + DWORD maxanisotropy; + DWORD alphacmp_caps; + + SPRITE *sprites; + int sprite_count; /* number of sprites to be drawn */ + int allocated_sprites; /* number of (pre-)allocated sprites */ +} ID3DXSpriteImpl; + +static inline ID3DXSpriteImpl *impl_from_ID3DXSprite(ID3DXSprite *iface) +{ + return CONTAINING_RECORD(iface, ID3DXSpriteImpl, ID3DXSprite_iface); +} + +static HRESULT WINAPI ID3DXSpriteImpl_QueryInterface(ID3DXSprite *iface, REFIID riid, void **out) +{ + TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out); + + if (IsEqualGUID(riid, &IID_ID3DXSprite) + || IsEqualGUID(riid, &IID_IUnknown)) + { IUnknown_AddRef(iface); - *object=This; + *out = iface; return S_OK; } - WARN("(%p)->(%s, %p): not found\n", iface, debugstr_guid(riid), *object); + + WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid)); + + *out = NULL; return E_NOINTERFACE; } -static ULONG WINAPI ID3DXSpriteImpl_AddRef(LPD3DXSPRITE iface) +static ULONG WINAPI ID3DXSpriteImpl_AddRef(ID3DXSprite *iface) { - ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; + ID3DXSpriteImpl *This = impl_from_ID3DXSprite(iface); ULONG ref=InterlockedIncrement(&This->ref); - TRACE("(%p): AddRef from %d\n", This, ref-1); + TRACE("(%p)->(): AddRef from %d\n", This, ref-1); return ref; } -static ULONG WINAPI ID3DXSpriteImpl_Release(LPD3DXSPRITE iface) +static ULONG WINAPI ID3DXSpriteImpl_Release(ID3DXSprite *iface) { - ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; + ID3DXSpriteImpl *This = impl_from_ID3DXSprite(iface); ULONG ref=InterlockedDecrement(&This->ref); - TRACE("(%p): ReleaseRef to %d\n", This, ref); + + TRACE("(%p)->(): ReleaseRef to %d\n", This, ref); if(ref==0) { if(This->sprites) { @@ -76,10 +119,11 @@ static ULONG WINAPI ID3DXSpriteImpl_Release(LPD3DXSPRITE iface) return ref; } -static HRESULT WINAPI ID3DXSpriteImpl_GetDevice(LPD3DXSPRITE iface, LPDIRECT3DDEVICE9 *device) +static HRESULT WINAPI ID3DXSpriteImpl_GetDevice(struct ID3DXSprite *iface, struct IDirect3DDevice9 **device) { - ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; - TRACE("(%p): relay\n", This); + ID3DXSpriteImpl *This = impl_from_ID3DXSprite(iface); + + TRACE("(%p)->(%p)\n", This, device); if(device==NULL) return D3DERR_INVALIDCALL; *device=This->device; @@ -88,10 +132,11 @@ static HRESULT WINAPI ID3DXSpriteImpl_GetDevice(LPD3DXSPRITE iface, LPDIRECT3DDE return D3D_OK; } -static HRESULT WINAPI ID3DXSpriteImpl_GetTransform(LPD3DXSPRITE iface, D3DXMATRIX *transform) +static HRESULT WINAPI ID3DXSpriteImpl_GetTransform(ID3DXSprite *iface, D3DXMATRIX *transform) { - ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; - TRACE("(%p)\n", This); + ID3DXSpriteImpl *This = impl_from_ID3DXSprite(iface); + + TRACE("(%p)->(%p)\n", This, transform); if(transform==NULL) return D3DERR_INVALIDCALL; *transform=This->transform; @@ -99,10 +144,11 @@ static HRESULT WINAPI ID3DXSpriteImpl_GetTransform(LPD3DXSPRITE iface, D3DXMATRI return D3D_OK; } -static HRESULT WINAPI ID3DXSpriteImpl_SetTransform(LPD3DXSPRITE iface, CONST D3DXMATRIX *transform) +static HRESULT WINAPI ID3DXSpriteImpl_SetTransform(ID3DXSprite *iface, CONST D3DXMATRIX *transform) { - ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; - TRACE("(%p)\n", This); + ID3DXSpriteImpl *This = impl_from_ID3DXSprite(iface); + + TRACE("(%p)->(%p)\n", This, transform); if(transform==NULL) return D3DERR_INVALIDCALL; This->transform=*transform; @@ -110,17 +156,19 @@ static HRESULT WINAPI ID3DXSpriteImpl_SetTransform(LPD3DXSPRITE iface, CONST D3D return D3D_OK; } -static HRESULT WINAPI ID3DXSpriteImpl_SetWorldViewRH(LPD3DXSPRITE iface, CONST D3DXMATRIX *world, CONST D3DXMATRIX *view) +static HRESULT WINAPI ID3DXSpriteImpl_SetWorldViewRH(ID3DXSprite *iface, CONST D3DXMATRIX *world, + CONST D3DXMATRIX *view) { - ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; - FIXME("(%p): stub\n", This); + ID3DXSpriteImpl *This = impl_from_ID3DXSprite(iface); + FIXME("(%p)->(%p, %p): stub\n", This, world, view); return E_NOTIMPL; } -static HRESULT WINAPI ID3DXSpriteImpl_SetWorldViewLH(LPD3DXSPRITE iface, CONST D3DXMATRIX *world, CONST D3DXMATRIX *view) +static HRESULT WINAPI ID3DXSpriteImpl_SetWorldViewLH(ID3DXSprite *iface, CONST D3DXMATRIX *world, + CONST D3DXMATRIX *view) { - ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; - FIXME("(%p): stub\n", This); + ID3DXSpriteImpl *This = impl_from_ID3DXSprite(iface); + FIXME("(%p)->(%p, %p): stub\n", This, world, view); return E_NOTIMPL; } @@ -130,7 +178,7 @@ static void set_states(ID3DXSpriteImpl *object) D3DXMATRIX mat; D3DVIEWPORT9 vp; - /* Miscelaneous stuff */ + /* Miscellaneous stuff */ IDirect3DDevice9_SetVertexShader(object->device, NULL); IDirect3DDevice9_SetPixelShader(object->device, NULL); IDirect3DDevice9_SetNPatchMode(object->device, 0.0f); @@ -200,22 +248,22 @@ static void set_states(ID3DXSpriteImpl *object) /* Matrices */ D3DXMatrixIdentity(&mat); IDirect3DDevice9_SetTransform(object->device, D3DTS_WORLD, &mat); - IDirect3DDevice9_SetTransform(object->device, D3DTS_VIEW, &mat); + IDirect3DDevice9_SetTransform(object->device, D3DTS_VIEW, &object->view); IDirect3DDevice9_GetViewport(object->device, &vp); D3DXMatrixOrthoOffCenterLH(&mat, vp.X+0.5f, (float)vp.Width+vp.X+0.5f, (float)vp.Height+vp.Y+0.5f, vp.Y+0.5f, vp.MinZ, vp.MaxZ); IDirect3DDevice9_SetTransform(object->device, D3DTS_PROJECTION, &mat); } -static HRESULT WINAPI ID3DXSpriteImpl_Begin(LPD3DXSPRITE iface, DWORD flags) +static HRESULT WINAPI ID3DXSpriteImpl_Begin(ID3DXSprite *iface, DWORD flags) { - ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; + ID3DXSpriteImpl *This = impl_from_ID3DXSprite(iface); HRESULT hr; - TRACE("(%p): relay\n", This); + + TRACE("(%p)->(%#x)\n", This, flags); if(flags>D3DXSPRITE_FLAGLIMIT || This->ready) return D3DERR_INVALIDCALL; /* TODO: Implement flags: -D3DXSPRITE_ALPHABLEND: enables alpha blending D3DXSPRITE_BILLBOARD: makes the sprite always face the camera D3DXSPRITE_DONOTMODIFY_RENDERSTATE: name says it all D3DXSPRITE_OBJECTSPACE: do not change device transforms @@ -223,6 +271,15 @@ D3DXSPRITE_SORT_DEPTH_BACKTOFRONT: sort by position D3DXSPRITE_SORT_DEPTH_FRONTTOBACK: sort by position D3DXSPRITE_SORT_TEXTURE: sort by texture (so that it doesn't change too often) */ +/* Seems like alpha blending is always enabled, regardless of D3DXSPRITE_ALPHABLEND flag */ + if(flags & (D3DXSPRITE_BILLBOARD | + D3DXSPRITE_DONOTMODIFY_RENDERSTATE | D3DXSPRITE_OBJECTSPACE | + D3DXSPRITE_SORT_DEPTH_BACKTOFRONT)) + FIXME("Flags unsupported: %#x\n", flags); + /* These flags should only matter to performances */ + else if(flags & (D3DXSPRITE_SORT_DEPTH_FRONTTOBACK | D3DXSPRITE_SORT_TEXTURE)) + TRACE("Flags unsupported: %#x\n", flags); + if(This->vdecl==NULL) { static const D3DVERTEXELEMENT9 elements[] = { @@ -255,21 +312,20 @@ D3DXSPRITE_SORT_TEXTURE: sort by texture (so that it doesn't change too often) /* Apply device state */ set_states(This); - D3DXMatrixIdentity(&This->transform); - D3DXMatrixIdentity(&This->view); - This->flags=flags; This->ready=TRUE; return D3D_OK; } -static HRESULT WINAPI ID3DXSpriteImpl_Draw(LPD3DXSPRITE iface, LPDIRECT3DTEXTURE9 texture, CONST RECT *rect, CONST D3DXVECTOR3 *center, - CONST D3DXVECTOR3 *position, D3DCOLOR color) +static HRESULT WINAPI ID3DXSpriteImpl_Draw(ID3DXSprite *iface, IDirect3DTexture9 *texture, + const RECT *rect, const D3DXVECTOR3 *center, const D3DXVECTOR3 *position, D3DCOLOR color) { - ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; + ID3DXSpriteImpl *This = impl_from_ID3DXSprite(iface); D3DSURFACE_DESC texdesc; - TRACE("(%p): relay\n", This); + + TRACE("iface %p, texture %p, rect %s, center %p, position %p, color 0x%08x.\n", + iface, texture, wine_dbgstr_rect(rect), center, position, color); if(texture==NULL) return D3DERR_INVALIDCALL; if(!This->ready) return D3DERR_INVALIDCALL; @@ -318,66 +374,72 @@ static HRESULT WINAPI ID3DXSpriteImpl_Draw(LPD3DXSPRITE iface, LPDIRECT3DTEXTURE } else This->sprites[This->sprite_count].pos=*position; This->sprites[This->sprite_count].color=color; + This->sprites[This->sprite_count].transform=This->transform; This->sprite_count++; return D3D_OK; } -static HRESULT WINAPI ID3DXSpriteImpl_Flush(LPD3DXSPRITE iface) +static HRESULT WINAPI ID3DXSpriteImpl_Flush(ID3DXSprite *iface) { - ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; + ID3DXSpriteImpl *This = impl_from_ID3DXSprite(iface); SPRITEVERTEX *vertices; - int i; - TRACE("(%p): relay\n", This); + int i, count=0, start; + + TRACE("(%p)->()\n", This); if(!This->ready) return D3DERR_INVALIDCALL; if(!This->sprite_count) return D3D_OK; /* TODO: use of a vertex buffer here */ - vertices=HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SPRITEVERTEX)*4*This->sprite_count); + vertices=HeapAlloc(GetProcessHeap(), 0, sizeof(SPRITEVERTEX)*6*This->sprite_count); - for(i=0;isprite_count;i++) { - float spritewidth=(float)This->sprites[i].rect.right-(float)This->sprites[i].rect.left; - float spriteheight=(float)This->sprites[i].rect.bottom-(float)This->sprites[i].rect.top; + for(start=0;startsprite_count;start+=count,count=0) { + i=start; + while(isprite_count && + (count==0 || This->sprites[i].texture==This->sprites[i-1].texture)) { + float spritewidth=(float)This->sprites[i].rect.right-(float)This->sprites[i].rect.left; + float spriteheight=(float)This->sprites[i].rect.bottom-(float)This->sprites[i].rect.top; - vertices[4*i ].pos.x = This->sprites[i].pos.x - This->sprites[i].center.x; - vertices[4*i ].pos.y = This->sprites[i].pos.y - This->sprites[i].center.y; - vertices[4*i ].pos.z = This->sprites[i].pos.z - This->sprites[i].center.z; - vertices[4*i+1].pos.x = spritewidth + This->sprites[i].pos.x - This->sprites[i].center.x; - vertices[4*i+1].pos.y = This->sprites[i].pos.y - This->sprites[i].center.y; - vertices[4*i+1].pos.z = This->sprites[i].pos.z - This->sprites[i].center.z; - vertices[4*i+2].pos.x = spritewidth + This->sprites[i].pos.x - This->sprites[i].center.x; - vertices[4*i+2].pos.y = spriteheight + This->sprites[i].pos.y - This->sprites[i].center.y; - vertices[4*i+2].pos.z = This->sprites[i].pos.z - This->sprites[i].center.z; - vertices[4*i+3].pos.x = This->sprites[i].pos.x - This->sprites[i].center.x; - vertices[4*i+3].pos.y = spriteheight + This->sprites[i].pos.y - This->sprites[i].center.y; - vertices[4*i+3].pos.z = This->sprites[i].pos.z - This->sprites[i].center.z; - vertices[4*i ].col = This->sprites[i].color; - vertices[4*i+1].col = This->sprites[i].color; - vertices[4*i+2].col = This->sprites[i].color; - vertices[4*i+3].col = This->sprites[i].color; - vertices[4*i ].tex.x = (float)This->sprites[i].rect.left / (float)This->sprites[i].texw; - vertices[4*i ].tex.y = (float)This->sprites[i].rect.top / (float)This->sprites[i].texh; - vertices[4*i+1].tex.x = (float)This->sprites[i].rect.right / (float)This->sprites[i].texw; - vertices[4*i+1].tex.y = (float)This->sprites[i].rect.top / (float)This->sprites[i].texh; - vertices[4*i+2].tex.x = (float)This->sprites[i].rect.right / (float)This->sprites[i].texw; - vertices[4*i+2].tex.y = (float)This->sprites[i].rect.bottom / (float)This->sprites[i].texh; - vertices[4*i+3].tex.x = (float)This->sprites[i].rect.left / (float)This->sprites[i].texw; - vertices[4*i+3].tex.y = (float)This->sprites[i].rect.bottom / (float)This->sprites[i].texh; - } + vertices[6*i ].pos.x = This->sprites[i].pos.x - This->sprites[i].center.x; + vertices[6*i ].pos.y = This->sprites[i].pos.y - This->sprites[i].center.y; + vertices[6*i ].pos.z = This->sprites[i].pos.z - This->sprites[i].center.z; + vertices[6*i+1].pos.x = spritewidth + This->sprites[i].pos.x - This->sprites[i].center.x; + vertices[6*i+1].pos.y = This->sprites[i].pos.y - This->sprites[i].center.y; + vertices[6*i+1].pos.z = This->sprites[i].pos.z - This->sprites[i].center.z; + vertices[6*i+2].pos.x = spritewidth + This->sprites[i].pos.x - This->sprites[i].center.x; + vertices[6*i+2].pos.y = spriteheight + This->sprites[i].pos.y - This->sprites[i].center.y; + vertices[6*i+2].pos.z = This->sprites[i].pos.z - This->sprites[i].center.z; + vertices[6*i+3].pos.x = This->sprites[i].pos.x - This->sprites[i].center.x; + vertices[6*i+3].pos.y = spriteheight + This->sprites[i].pos.y - This->sprites[i].center.y; + vertices[6*i+3].pos.z = This->sprites[i].pos.z - This->sprites[i].center.z; + vertices[6*i ].col = This->sprites[i].color; + vertices[6*i+1].col = This->sprites[i].color; + vertices[6*i+2].col = This->sprites[i].color; + vertices[6*i+3].col = This->sprites[i].color; + vertices[6*i ].tex.x = (float)This->sprites[i].rect.left / (float)This->sprites[i].texw; + vertices[6*i ].tex.y = (float)This->sprites[i].rect.top / (float)This->sprites[i].texh; + vertices[6*i+1].tex.x = (float)This->sprites[i].rect.right / (float)This->sprites[i].texw; + vertices[6*i+1].tex.y = (float)This->sprites[i].rect.top / (float)This->sprites[i].texh; + vertices[6*i+2].tex.x = (float)This->sprites[i].rect.right / (float)This->sprites[i].texw; + vertices[6*i+2].tex.y = (float)This->sprites[i].rect.bottom / (float)This->sprites[i].texh; + vertices[6*i+3].tex.x = (float)This->sprites[i].rect.left / (float)This->sprites[i].texw; + vertices[6*i+3].tex.y = (float)This->sprites[i].rect.bottom / (float)This->sprites[i].texh; - D3DXVec3TransformCoordArray(&vertices[0].pos, sizeof(SPRITEVERTEX), &vertices[0].pos, sizeof(SPRITEVERTEX), &This->transform, 4*This->sprite_count); - D3DXVec3TransformCoordArray(&vertices[0].pos, sizeof(SPRITEVERTEX), &vertices[0].pos, sizeof(SPRITEVERTEX), &This->view, 4*This->sprite_count); + vertices[6*i+4]=vertices[6*i]; + vertices[6*i+5]=vertices[6*i+2]; - IDirect3DDevice9_SetVertexDeclaration(This->device, This->vdecl); + D3DXVec3TransformCoordArray(&vertices[6*i].pos, sizeof(SPRITEVERTEX), + &vertices[6*i].pos, sizeof(SPRITEVERTEX), + &This->sprites[i].transform, 6); + count++; + i++; + } - for(i=0;isprite_count;i++) { - if(!i) - IDirect3DDevice9_SetTexture(This->device, 0, (LPDIRECT3DBASETEXTURE9)(This->sprites[i].texture)); - else if(This->sprites[i].texture!=This->sprites[i-1].texture) - IDirect3DDevice9_SetTexture(This->device, 0, (LPDIRECT3DBASETEXTURE9)(This->sprites[i].texture)); + IDirect3DDevice9_SetTexture(This->device, 0, (struct IDirect3DBaseTexture9 *)This->sprites[start].texture); + IDirect3DDevice9_SetVertexDeclaration(This->device, This->vdecl); - IDirect3DDevice9_DrawPrimitiveUP(This->device, D3DPT_TRIANGLEFAN, 2, vertices+4*i, sizeof(SPRITEVERTEX)); + IDirect3DDevice9_DrawPrimitiveUP(This->device, D3DPT_TRIANGLELIST, 2*count, vertices+6*start, sizeof(SPRITEVERTEX)); } HeapFree(GetProcessHeap(), 0, vertices); @@ -392,10 +454,11 @@ static HRESULT WINAPI ID3DXSpriteImpl_Flush(LPD3DXSPRITE iface) return D3D_OK; } -static HRESULT WINAPI ID3DXSpriteImpl_End(LPD3DXSPRITE iface) +static HRESULT WINAPI ID3DXSpriteImpl_End(ID3DXSprite *iface) { - ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; - TRACE("(%p): relay\n", This); + ID3DXSpriteImpl *This = impl_from_ID3DXSprite(iface); + + TRACE("(%p)->()\n", This); if(!This->ready) return D3DERR_INVALIDCALL; @@ -409,10 +472,11 @@ static HRESULT WINAPI ID3DXSpriteImpl_End(LPD3DXSPRITE iface) return D3D_OK; } -static HRESULT WINAPI ID3DXSpriteImpl_OnLostDevice(LPD3DXSPRITE iface) +static HRESULT WINAPI ID3DXSpriteImpl_OnLostDevice(ID3DXSprite *iface) { - ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; - TRACE("(%p)\n", This); + ID3DXSpriteImpl *This = impl_from_ID3DXSprite(iface); + + TRACE("(%p)->()\n", This); if(This->stateblock) IDirect3DStateBlock9_Release(This->stateblock); if(This->vdecl) IDirect3DVertexDeclaration9_Release(This->vdecl); @@ -425,12 +489,12 @@ static HRESULT WINAPI ID3DXSpriteImpl_OnLostDevice(LPD3DXSPRITE iface) return D3D_OK; } -static HRESULT WINAPI ID3DXSpriteImpl_OnResetDevice(LPD3DXSPRITE iface) +static HRESULT WINAPI ID3DXSpriteImpl_OnResetDevice(ID3DXSprite *iface) { - ID3DXSpriteImpl *This=(ID3DXSpriteImpl*)iface; + ID3DXSpriteImpl *This = impl_from_ID3DXSprite(iface); int i; - TRACE("(%p)\n", This); + TRACE("(%p)->()\n", This); for(i=0;isprite_count;i++) if(This->sprites[i].texture) @@ -467,11 +531,12 @@ static const ID3DXSpriteVtbl D3DXSprite_Vtbl = ID3DXSpriteImpl_OnResetDevice }; -HRESULT WINAPI D3DXCreateSprite(LPDIRECT3DDEVICE9 device, LPD3DXSPRITE *sprite) +HRESULT WINAPI D3DXCreateSprite(struct IDirect3DDevice9 *device, struct ID3DXSprite **sprite) { ID3DXSpriteImpl *object; D3DCAPS9 caps; - TRACE("(void): relay\n"); + + TRACE("(%p, %p)\n", device, sprite); if(device==NULL || sprite==NULL) return D3DERR_INVALIDCALL; @@ -480,7 +545,7 @@ HRESULT WINAPI D3DXCreateSprite(LPDIRECT3DDEVICE9 device, LPD3DXSPRITE *sprite) *sprite=NULL; return E_OUTOFMEMORY; } - object->lpVtbl=&D3DXSprite_Vtbl; + object->ID3DXSprite_iface.lpVtbl = &D3DXSprite_Vtbl; object->ref=1; object->device=device; IUnknown_AddRef(device); @@ -496,11 +561,11 @@ HRESULT WINAPI D3DXCreateSprite(LPDIRECT3DDEVICE9 device, LPD3DXSPRITE *sprite) object->maxanisotropy=caps.MaxAnisotropy; object->alphacmp_caps=caps.AlphaCmpCaps; - ID3DXSprite_OnResetDevice((ID3DXSprite*)object); + ID3DXSprite_OnResetDevice(&object->ID3DXSprite_iface); object->sprites=NULL; object->allocated_sprites=0; - *sprite=(ID3DXSprite*)object; + *sprite=&object->ID3DXSprite_iface; return D3D_OK; } diff --git a/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c index e1d5203c76d..a3ba192e4e6 100644 --- a/dll/directx/wine/d3dx9_36/surface.c +++ b/dll/directx/wine/d3dx9_36/surface.c @@ -1,5 +1,6 @@ /* - * Copyright (C) 2009 Tony Wasserka + * Copyright (C) 2009-2010 Tony Wasserka + * Copyright (C) 2012 Jأ³zef Kucia * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -21,9 +22,724 @@ //#include "wine/unicode.h" #include "d3dx9_36_private.h" +#include +#include +#include + WINE_DEFAULT_DEBUG_CHANNEL(d3dx); +/* Wine-specific WIC GUIDs */ +DEFINE_GUID(GUID_WineContainerFormatTga, 0x0c44fda1,0xa5c5,0x4298,0x96,0x85,0x47,0x3f,0xc1,0x7c,0xd3,0x22); + +static const struct +{ + const GUID *wic_guid; + D3DFORMAT d3dformat; +} wic_pixel_formats[] = { + { &GUID_WICPixelFormat8bppIndexed, D3DFMT_P8 }, + { &GUID_WICPixelFormat1bppIndexed, D3DFMT_P8 }, + { &GUID_WICPixelFormat4bppIndexed, D3DFMT_P8 }, + { &GUID_WICPixelFormat16bppBGR555, D3DFMT_X1R5G5B5 }, + { &GUID_WICPixelFormat16bppBGR565, D3DFMT_R5G6B5 }, + { &GUID_WICPixelFormat24bppBGR, D3DFMT_R8G8B8 }, + { &GUID_WICPixelFormat32bppBGR, D3DFMT_X8R8G8B8 }, + { &GUID_WICPixelFormat32bppBGRA, D3DFMT_A8R8G8B8 } +}; + +static D3DFORMAT wic_guid_to_d3dformat(const GUID *guid) +{ + unsigned int i; + + for (i = 0; i < sizeof(wic_pixel_formats) / sizeof(wic_pixel_formats[0]); i++) + { + if (IsEqualGUID(wic_pixel_formats[i].wic_guid, guid)) + return wic_pixel_formats[i].d3dformat; + } + + return D3DFMT_UNKNOWN; +} + +static const GUID *d3dformat_to_wic_guid(D3DFORMAT format) +{ + unsigned int i; + + for (i = 0; i < sizeof(wic_pixel_formats) / sizeof(wic_pixel_formats[0]); i++) + { + if (wic_pixel_formats[i].d3dformat == format) + return wic_pixel_formats[i].wic_guid; + } + + return NULL; +} + +/* dds_header.flags */ +#define DDS_CAPS 0x1 +#define DDS_HEIGHT 0x2 +#define DDS_WIDTH 0x2 +#define DDS_PITCH 0x8 +#define DDS_PIXELFORMAT 0x1000 +#define DDS_MIPMAPCOUNT 0x20000 +#define DDS_LINEARSIZE 0x80000 +#define DDS_DEPTH 0x800000 + +/* dds_header.caps */ +#define DDS_CAPS_COMPLEX 0x8 +#define DDS_CAPS_TEXTURE 0x1000 +#define DDS_CAPS_MIPMAP 0x400000 + +/* dds_header.caps2 */ +#define DDS_CAPS2_CUBEMAP 0x200 +#define DDS_CAPS2_CUBEMAP_POSITIVEX 0x400 +#define DDS_CAPS2_CUBEMAP_NEGATIVEX 0x800 +#define DDS_CAPS2_CUBEMAP_POSITIVEY 0x1000 +#define DDS_CAPS2_CUBEMAP_NEGATIVEY 0x2000 +#define DDS_CAPS2_CUBEMAP_POSITIVEZ 0x4000 +#define DDS_CAPS2_CUBEMAP_NEGATIVEZ 0x8000 +#define DDS_CAPS2_CUBEMAP_ALL_FACES ( DDS_CAPS2_CUBEMAP_POSITIVEX | DDS_CAPS2_CUBEMAP_NEGATIVEX \ + | DDS_CAPS2_CUBEMAP_POSITIVEY | DDS_CAPS2_CUBEMAP_NEGATIVEY \ + | DDS_CAPS2_CUBEMAP_POSITIVEZ | DDS_CAPS2_CUBEMAP_NEGATIVEZ ) +#define DDS_CAPS2_VOLUME 0x200000 + +/* dds_pixel_format.flags */ +#define DDS_PF_ALPHA 0x1 +#define DDS_PF_ALPHA_ONLY 0x2 +#define DDS_PF_FOURCC 0x4 +#define DDS_PF_RGB 0x40 +#define DDS_PF_YUV 0x200 +#define DDS_PF_LUMINANCE 0x20000 +#define DDS_PF_BUMPDUDV 0x80000 + +struct dds_pixel_format +{ + DWORD size; + DWORD flags; + DWORD fourcc; + DWORD bpp; + DWORD rmask; + DWORD gmask; + DWORD bmask; + DWORD amask; +}; + +struct dds_header +{ + DWORD signature; + DWORD size; + DWORD flags; + DWORD height; + DWORD width; + DWORD pitch_or_linear_size; + DWORD depth; + DWORD miplevels; + DWORD reserved[11]; + struct dds_pixel_format pixel_format; + DWORD caps; + DWORD caps2; + DWORD caps3; + DWORD caps4; + DWORD reserved2; +}; + +static D3DFORMAT dds_fourcc_to_d3dformat(DWORD fourcc) +{ + unsigned int i; + static const DWORD known_fourcc[] = { + MAKEFOURCC('U','Y','V','Y'), + MAKEFOURCC('Y','U','Y','2'), + MAKEFOURCC('R','G','B','G'), + MAKEFOURCC('G','R','G','B'), + MAKEFOURCC('D','X','T','1'), + MAKEFOURCC('D','X','T','2'), + MAKEFOURCC('D','X','T','3'), + MAKEFOURCC('D','X','T','4'), + MAKEFOURCC('D','X','T','5') + }; + + for (i = 0; i < sizeof(known_fourcc) / sizeof(known_fourcc[0]); i++) + { + if (known_fourcc[i] == fourcc) + return fourcc; + } + + WARN("Unknown FourCC %#x\n", fourcc); + return D3DFMT_UNKNOWN; +} + +static const struct { + DWORD bpp; + DWORD rmask; + DWORD gmask; + DWORD bmask; + DWORD amask; + D3DFORMAT format; +} rgb_pixel_formats[] = { + { 8, 0xe0, 0x1c, 0x03, 0, D3DFMT_R3G3B2 }, + { 16, 0xf800, 0x07e0, 0x001f, 0x0000, D3DFMT_R5G6B5 }, + { 16, 0x7c00, 0x03e0, 0x001f, 0x8000, D3DFMT_A1R5G5B5 }, + { 16, 0x7c00, 0x03e0, 0x001f, 0x0000, D3DFMT_X1R5G5B5 }, + { 16, 0x0f00, 0x00f0, 0x000f, 0xf000, D3DFMT_A4R4G4B4 }, + { 16, 0x0f00, 0x00f0, 0x000f, 0x0000, D3DFMT_X4R4G4B4 }, + { 16, 0x00e0, 0x001c, 0x0003, 0xff00, D3DFMT_A8R3G3B2 }, + { 24, 0xff0000, 0x00ff00, 0x0000ff, 0x000000, D3DFMT_R8G8B8 }, + { 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000, D3DFMT_A8R8G8B8 }, + { 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000, D3DFMT_X8R8G8B8 }, + { 32, 0x3ff00000, 0x000ffc00, 0x000003ff, 0xc0000000, D3DFMT_A2B10G10R10 }, + { 32, 0x000003ff, 0x000ffc00, 0x3ff00000, 0xc0000000, D3DFMT_A2R10G10B10 }, + { 32, 0x0000ffff, 0xffff0000, 0x00000000, 0x00000000, D3DFMT_G16R16 }, + { 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000, D3DFMT_A8B8G8R8 }, + { 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0x00000000, D3DFMT_X8B8G8R8 }, +}; + +static D3DFORMAT dds_rgb_to_d3dformat(const struct dds_pixel_format *pixel_format) +{ + unsigned int i; + + for (i = 0; i < sizeof(rgb_pixel_formats) / sizeof(rgb_pixel_formats[0]); i++) + { + if (rgb_pixel_formats[i].bpp == pixel_format->bpp + && rgb_pixel_formats[i].rmask == pixel_format->rmask + && rgb_pixel_formats[i].gmask == pixel_format->gmask + && rgb_pixel_formats[i].bmask == pixel_format->bmask) + { + if ((pixel_format->flags & DDS_PF_ALPHA) && rgb_pixel_formats[i].amask == pixel_format->amask) + return rgb_pixel_formats[i].format; + if (rgb_pixel_formats[i].amask == 0) + return rgb_pixel_formats[i].format; + } + } + + WARN("Unknown RGB pixel format (%#x, %#x, %#x, %#x)\n", + pixel_format->rmask, pixel_format->gmask, pixel_format->bmask, pixel_format->amask); + return D3DFMT_UNKNOWN; +} + +static D3DFORMAT dds_luminance_to_d3dformat(const struct dds_pixel_format *pixel_format) +{ + if (pixel_format->bpp == 8) + { + if (pixel_format->rmask == 0xff) + return D3DFMT_L8; + if ((pixel_format->flags & DDS_PF_ALPHA) && pixel_format->rmask == 0x0f && pixel_format->amask == 0xf0) + return D3DFMT_A4L4; + } + if (pixel_format->bpp == 16) + { + if (pixel_format->rmask == 0xffff) + return D3DFMT_L16; + if ((pixel_format->flags & DDS_PF_ALPHA) && pixel_format->rmask == 0x00ff && pixel_format->amask == 0xff00) + return D3DFMT_A8L8; + } + + WARN("Unknown luminance pixel format (bpp %u, l %#x, a %#x)\n", + pixel_format->bpp, pixel_format->rmask, pixel_format->amask); + return D3DFMT_UNKNOWN; +} + +static D3DFORMAT dds_alpha_to_d3dformat(const struct dds_pixel_format *pixel_format) +{ + if (pixel_format->bpp == 8 && pixel_format->amask == 0xff) + return D3DFMT_A8; + + WARN("Unknown Alpha pixel format (%u, %#x)\n", pixel_format->bpp, pixel_format->rmask); + return D3DFMT_UNKNOWN; +} + +static D3DFORMAT dds_bump_to_d3dformat(const struct dds_pixel_format *pixel_format) +{ + if (pixel_format->bpp == 16 && pixel_format->rmask == 0x00ff && pixel_format->gmask == 0xff00) + return D3DFMT_V8U8; + if (pixel_format->bpp == 32 && pixel_format->rmask == 0x0000ffff && pixel_format->gmask == 0xffff0000) + return D3DFMT_V16U16; + + WARN("Unknown bump pixel format (%u, %#x, %#x, %#x, %#x)\n", pixel_format->bpp, + pixel_format->rmask, pixel_format->gmask, pixel_format->bmask, pixel_format->amask); + return D3DFMT_UNKNOWN; +} + +static D3DFORMAT dds_pixel_format_to_d3dformat(const struct dds_pixel_format *pixel_format) +{ + if (pixel_format->flags & DDS_PF_FOURCC) + return dds_fourcc_to_d3dformat(pixel_format->fourcc); + if (pixel_format->flags & DDS_PF_RGB) + return dds_rgb_to_d3dformat(pixel_format); + if (pixel_format->flags & DDS_PF_LUMINANCE) + return dds_luminance_to_d3dformat(pixel_format); + if (pixel_format->flags & DDS_PF_ALPHA_ONLY) + return dds_alpha_to_d3dformat(pixel_format); + if (pixel_format->flags & DDS_PF_BUMPDUDV) + return dds_bump_to_d3dformat(pixel_format); + + WARN("Unknown pixel format (flags %#x, fourcc %#x, bpp %u, r %#x, g %#x, b %#x, a %#x)\n", + pixel_format->flags, pixel_format->fourcc, pixel_format->bpp, + pixel_format->rmask, pixel_format->gmask, pixel_format->bmask, pixel_format->amask); + return D3DFMT_UNKNOWN; +} + +static HRESULT d3dformat_to_dds_pixel_format(struct dds_pixel_format *pixel_format, D3DFORMAT d3dformat) +{ + unsigned int i; + + memset(pixel_format, 0, sizeof(*pixel_format)); + + pixel_format->size = sizeof(*pixel_format); + + for (i = 0; i < sizeof(rgb_pixel_formats) / sizeof(rgb_pixel_formats[0]); i++) + { + if (rgb_pixel_formats[i].format == d3dformat) + { + pixel_format->flags |= DDS_PF_RGB; + pixel_format->bpp = rgb_pixel_formats[i].bpp; + pixel_format->rmask = rgb_pixel_formats[i].rmask; + pixel_format->gmask = rgb_pixel_formats[i].gmask; + pixel_format->bmask = rgb_pixel_formats[i].bmask; + pixel_format->amask = rgb_pixel_formats[i].amask; + if (pixel_format->amask) pixel_format->flags |= DDS_PF_ALPHA; + return D3D_OK; + } + } + + WARN("Unknown pixel format %#x\n", d3dformat); + return E_NOTIMPL; +} + +static HRESULT calculate_dds_surface_size(D3DFORMAT format, UINT width, UINT height, + UINT *pitch, UINT *size) +{ + const struct pixel_format_desc *format_desc = get_format_info(format); + if (format_desc->type == FORMAT_UNKNOWN) + return E_NOTIMPL; + + if (format_desc->block_width != 1 || format_desc->block_height != 1) + { + *pitch = format_desc->block_byte_count + * max(1, (width + format_desc->block_width - 1) / format_desc->block_width); + *size = *pitch + * max(1, (height + format_desc->block_height - 1) / format_desc->block_height); + } + else + { + *pitch = width * format_desc->bytes_per_pixel; + *size = *pitch * height; + } + + return D3D_OK; +} + +static UINT calculate_dds_file_size(D3DFORMAT format, UINT width, UINT height, UINT depth, + UINT miplevels, UINT faces) +{ + UINT i, file_size = 0; + + for (i = 0; i < miplevels; i++) + { + UINT pitch, size = 0; + calculate_dds_surface_size(format, width, height, &pitch, &size); + size *= depth; + file_size += size; + width = max(1, width / 2); + height = max(1, height / 2); + depth = max(1, depth / 2); + } + + file_size *= faces; + file_size += sizeof(struct dds_header); + return file_size; +} + +/************************************************************ +* get_image_info_from_dds +* +* Fills a D3DXIMAGE_INFO structure with information +* about a DDS file stored in the memory. +* +* PARAMS +* buffer [I] pointer to DDS data +* length [I] size of DDS data +* info [O] pointer to D3DXIMAGE_INFO structure +* +* RETURNS +* Success: D3D_OK +* Failure: D3DXERR_INVALIDDATA +* +*/ +static HRESULT get_image_info_from_dds(const void *buffer, UINT length, D3DXIMAGE_INFO *info) +{ + UINT faces = 1; + UINT expected_length; + const struct dds_header *header = buffer; + + if (length < sizeof(*header) || !info) + return D3DXERR_INVALIDDATA; + + if (header->pixel_format.size != sizeof(header->pixel_format)) + return D3DXERR_INVALIDDATA; + + info->Width = header->width; + info->Height = header->height; + info->Depth = 1; + info->MipLevels = (header->flags & DDS_MIPMAPCOUNT) ? header->miplevels : 1; + + info->Format = dds_pixel_format_to_d3dformat(&header->pixel_format); + if (info->Format == D3DFMT_UNKNOWN) + return D3DXERR_INVALIDDATA; + + TRACE("Pixel format is %#x\n", info->Format); + + if (header->caps2 & DDS_CAPS2_VOLUME) + { + info->Depth = header->depth; + info->ResourceType = D3DRTYPE_VOLUMETEXTURE; + } + else if (header->caps2 & DDS_CAPS2_CUBEMAP) + { + DWORD face; + faces = 0; + for (face = DDS_CAPS2_CUBEMAP_POSITIVEX; face <= DDS_CAPS2_CUBEMAP_NEGATIVEZ; face <<= 1) + { + if (header->caps2 & face) + faces++; + } + info->ResourceType = D3DRTYPE_CUBETEXTURE; + } + else + { + info->ResourceType = D3DRTYPE_TEXTURE; + } + + expected_length = calculate_dds_file_size(info->Format, info->Width, info->Height, info->Depth, + info->MipLevels, faces); + if (length < expected_length) + { + WARN("File is too short %u, expected at least %u bytes\n", length, expected_length); + return D3DXERR_INVALIDDATA; + } + + info->ImageFileFormat = D3DXIFF_DDS; + return D3D_OK; +} + +static HRESULT load_surface_from_dds(IDirect3DSurface9 *dst_surface, const PALETTEENTRY *dst_palette, + const RECT *dst_rect, const void *src_data, const RECT *src_rect, DWORD filter, D3DCOLOR color_key, + const D3DXIMAGE_INFO *src_info) +{ + UINT size; + UINT src_pitch; + const struct dds_header *header = src_data; + const BYTE *pixels = (BYTE *)(header + 1); + + if (src_info->ResourceType != D3DRTYPE_TEXTURE) + return D3DXERR_INVALIDDATA; + + if (FAILED(calculate_dds_surface_size(src_info->Format, src_info->Width, src_info->Height, &src_pitch, &size))) + return E_NOTIMPL; + + return D3DXLoadSurfaceFromMemory(dst_surface, dst_palette, dst_rect, pixels, src_info->Format, + src_pitch, NULL, src_rect, filter, color_key); +} + +static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSurface9 *src_surface, const RECT *src_rect) +{ + HRESULT hr; + UINT dst_pitch, surface_size, file_size; + D3DSURFACE_DESC src_desc; + D3DLOCKED_RECT locked_rect; + ID3DXBuffer *buffer; + struct dds_header *header; + BYTE *pixels; + struct volume volume; + const struct pixel_format_desc *pixel_format; + + if (src_rect) + { + FIXME("Saving a part of a surface to a DDS file is not implemented yet\n"); + return E_NOTIMPL; + } + + hr = IDirect3DSurface9_GetDesc(src_surface, &src_desc); + if (FAILED(hr)) return hr; + + pixel_format = get_format_info(src_desc.Format); + if (pixel_format->type == FORMAT_UNKNOWN) return E_NOTIMPL; + + file_size = calculate_dds_file_size(src_desc.Format, src_desc.Width, src_desc.Height, 1, 1, 1); + + hr = calculate_dds_surface_size(src_desc.Format, src_desc.Width, src_desc.Height, &dst_pitch, &surface_size); + if (FAILED(hr)) return hr; + + hr = D3DXCreateBuffer(file_size, &buffer); + if (FAILED(hr)) return hr; + + header = ID3DXBuffer_GetBufferPointer(buffer); + pixels = (BYTE *)(header + 1); + + memset(header, 0, sizeof(*header)); + header->signature = MAKEFOURCC('D','D','S',' '); + header->size = sizeof(*header); + header->flags = DDS_CAPS | DDS_HEIGHT | DDS_WIDTH | DDS_PITCH | DDS_PIXELFORMAT | DDS_MIPMAPCOUNT; + header->height = src_desc.Height; + header->width = src_desc.Width; + header->pitch_or_linear_size = dst_pitch; + header->depth = 1; + header->miplevels = 1; + header->caps = DDS_CAPS_TEXTURE; + hr = d3dformat_to_dds_pixel_format(&header->pixel_format, src_desc.Format); + if (FAILED(hr)) + { + ID3DXBuffer_Release(buffer); + return hr; + } + + hr = IDirect3DSurface9_LockRect(src_surface, &locked_rect, NULL, D3DLOCK_READONLY); + if (FAILED(hr)) + { + ID3DXBuffer_Release(buffer); + return hr; + } + + volume.width = src_desc.Width; + volume.height = src_desc.Height; + volume.depth = 1; + copy_pixels(locked_rect.pBits, locked_rect.Pitch, 0, pixels, dst_pitch, 0, + &volume, pixel_format); + + IDirect3DSurface9_UnlockRect(src_surface); + + *dst_buffer = buffer; + return D3D_OK; +} + +HRESULT load_volume_from_dds(IDirect3DVolume9 *dst_volume, const PALETTEENTRY *dst_palette, + const D3DBOX *dst_box, const void *src_data, const D3DBOX *src_box, DWORD filter, D3DCOLOR color_key, + const D3DXIMAGE_INFO *src_info) +{ + UINT row_pitch, slice_pitch; + const struct dds_header *header = src_data; + const BYTE *pixels = (BYTE *)(header + 1); + + if (src_info->ResourceType != D3DRTYPE_VOLUMETEXTURE) + return D3DXERR_INVALIDDATA; + + if (FAILED(calculate_dds_surface_size(src_info->Format, src_info->Width, src_info->Height, &row_pitch, &slice_pitch))) + return E_NOTIMPL; + + return D3DXLoadVolumeFromMemory(dst_volume, dst_palette, dst_box, pixels, src_info->Format, + row_pitch, slice_pitch, NULL, src_box, filter, color_key); +} + +HRESULT load_texture_from_dds(IDirect3DTexture9 *texture, const void *src_data, const PALETTEENTRY *palette, + DWORD filter, D3DCOLOR color_key, const D3DXIMAGE_INFO *src_info) + +{ + HRESULT hr; + RECT src_rect; + UINT src_pitch; + UINT mip_level; + UINT mip_levels; + UINT mip_level_size; + UINT width, height; + IDirect3DSurface9 *surface; + const struct dds_header *header = src_data; + const BYTE *pixels = (BYTE *)(header + 1); + + /* Loading a cube texture as a simple texture is also supported (only first face texture is taken) */ + if ((src_info->ResourceType != D3DRTYPE_TEXTURE) && (src_info->ResourceType != D3DRTYPE_CUBETEXTURE)) + return D3DXERR_INVALIDDATA; + + width = src_info->Width; + height = src_info->Height; + mip_levels = min(src_info->MipLevels, IDirect3DTexture9_GetLevelCount(texture)); + for (mip_level = 0; mip_level < mip_levels; mip_level++) + { + hr = calculate_dds_surface_size(src_info->Format, width, height, &src_pitch, &mip_level_size); + if (FAILED(hr)) return hr; + + SetRect(&src_rect, 0, 0, width, height); + + IDirect3DTexture9_GetSurfaceLevel(texture, mip_level, &surface); + hr = D3DXLoadSurfaceFromMemory(surface, palette, NULL, pixels, src_info->Format, src_pitch, + NULL, &src_rect, filter, color_key); + IDirect3DSurface9_Release(surface); + if (FAILED(hr)) return hr; + + pixels += mip_level_size; + width = max(1, width / 2); + height = max(1, height / 2); + } + + return D3D_OK; +} + +HRESULT load_cube_texture_from_dds(IDirect3DCubeTexture9 *cube_texture, const void *src_data, + const PALETTEENTRY *palette, DWORD filter, DWORD color_key, const D3DXIMAGE_INFO *src_info) +{ + HRESULT hr; + int face; + UINT mip_level; + UINT size; + RECT src_rect; + UINT src_pitch; + UINT mip_levels; + UINT mip_level_size; + IDirect3DSurface9 *surface; + const struct dds_header *header = src_data; + const BYTE *pixels = (BYTE *)(header + 1); + + if (src_info->ResourceType != D3DRTYPE_CUBETEXTURE) + return D3DXERR_INVALIDDATA; + + if ((header->caps2 & DDS_CAPS2_CUBEMAP_ALL_FACES) != DDS_CAPS2_CUBEMAP_ALL_FACES) + { + WARN("Only full cubemaps are supported\n"); + return D3DXERR_INVALIDDATA; + } + + mip_levels = min(src_info->MipLevels, IDirect3DCubeTexture9_GetLevelCount(cube_texture)); + for (face = D3DCUBEMAP_FACE_POSITIVE_X; face <= D3DCUBEMAP_FACE_NEGATIVE_Z; face++) + { + size = src_info->Width; + for (mip_level = 0; mip_level < src_info->MipLevels; mip_level++) + { + hr = calculate_dds_surface_size(src_info->Format, size, size, &src_pitch, &mip_level_size); + if (FAILED(hr)) return hr; + + /* if texture has fewer mip levels than DDS file, skip excessive mip levels */ + if (mip_level < mip_levels) + { + SetRect(&src_rect, 0, 0, size, size); + + IDirect3DCubeTexture9_GetCubeMapSurface(cube_texture, face, mip_level, &surface); + hr = D3DXLoadSurfaceFromMemory(surface, palette, NULL, pixels, src_info->Format, src_pitch, + NULL, &src_rect, filter, color_key); + IDirect3DSurface9_Release(surface); + if (FAILED(hr)) return hr; + } + + pixels += mip_level_size; + size = max(1, size / 2); + } + } + + return D3D_OK; +} + +HRESULT load_volume_texture_from_dds(IDirect3DVolumeTexture9 *volume_texture, const void *src_data, + const PALETTEENTRY *palette, DWORD filter, DWORD color_key, const D3DXIMAGE_INFO *src_info) +{ + HRESULT hr; + UINT mip_level; + UINT mip_levels; + UINT src_slice_pitch; + UINT src_row_pitch; + D3DBOX src_box; + UINT width, height, depth; + IDirect3DVolume9 *volume; + const struct dds_header *header = src_data; + const BYTE *pixels = (BYTE *)(header + 1); + + if (src_info->ResourceType != D3DRTYPE_VOLUMETEXTURE) + return D3DXERR_INVALIDDATA; + + width = src_info->Width; + height = src_info->Height; + depth = src_info->Depth; + mip_levels = min(src_info->MipLevels, IDirect3DVolumeTexture9_GetLevelCount(volume_texture)); + + for (mip_level = 0; mip_level < mip_levels; mip_level++) + { + hr = calculate_dds_surface_size(src_info->Format, width, height, &src_row_pitch, &src_slice_pitch); + if (FAILED(hr)) return hr; + + hr = IDirect3DVolumeTexture9_GetVolumeLevel(volume_texture, mip_level, &volume); + if (FAILED(hr)) return hr; + + src_box.Left = 0; + src_box.Top = 0; + src_box.Right = width; + src_box.Bottom = height; + src_box.Front = 0; + src_box.Back = depth; + + hr = D3DXLoadVolumeFromMemory(volume, palette, NULL, pixels, src_info->Format, + src_row_pitch, src_slice_pitch, NULL, &src_box, filter, color_key); + + IDirect3DVolume9_Release(volume); + if (FAILED(hr)) return hr; + + pixels += depth * src_slice_pitch; + width = max(1, width / 2); + height = max(1, height / 2); + depth = max(1, depth / 2); + } + + return D3D_OK; +} + +static BOOL convert_dib_to_bmp(void **data, UINT *size) +{ + ULONG header_size; + ULONG count = 0; + ULONG offset; + BITMAPFILEHEADER *header; + BYTE *new_data; + UINT new_size; + + if ((*size < 4) || (*size < (header_size = *(ULONG*)*data))) + return FALSE; + + if ((header_size == sizeof(BITMAPINFOHEADER)) || + (header_size == sizeof(BITMAPV4HEADER)) || + (header_size == sizeof(BITMAPV5HEADER)) || + (header_size == 64 /* sizeof(BITMAPCOREHEADER2) */)) + { + /* All structures begin with the same memory layout as BITMAPINFOHEADER */ + BITMAPINFOHEADER *info_header = (BITMAPINFOHEADER*)*data; + count = info_header->biClrUsed; + + if (!count && info_header->biBitCount <= 8) + count = 1 << info_header->biBitCount; + + offset = sizeof(BITMAPFILEHEADER) + header_size + sizeof(RGBQUAD) * count; + + /* For BITMAPINFOHEADER with BI_BITFIELDS compression, there are 3 additional color masks after header */ + if ((info_header->biSize == sizeof(BITMAPINFOHEADER)) && (info_header->biCompression == BI_BITFIELDS)) + offset += 3 * sizeof(DWORD); + } + else if (header_size == sizeof(BITMAPCOREHEADER)) + { + BITMAPCOREHEADER *core_header = (BITMAPCOREHEADER*)*data; + + if (core_header->bcBitCount <= 8) + count = 1 << core_header->bcBitCount; + + offset = sizeof(BITMAPFILEHEADER) + header_size + sizeof(RGBTRIPLE) * count; + } + else + { + return FALSE; + } + + TRACE("Converting DIB file to BMP\n"); + + new_size = *size + sizeof(BITMAPFILEHEADER); + new_data = HeapAlloc(GetProcessHeap(), 0, new_size); + CopyMemory(new_data + sizeof(BITMAPFILEHEADER), *data, *size); + + /* Add BMP header */ + header = (BITMAPFILEHEADER*)new_data; + header->bfType = 0x4d42; /* BM */ + header->bfSize = new_size; + header->bfReserved1 = 0; + header->bfReserved2 = 0; + header->bfOffBits = offset; + + /* Update input data */ + *data = new_data; + *size = new_size; + + return TRUE; +} + /************************************************************ * D3DXGetImageInfoFromFileInMemory * @@ -45,14 +761,131 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dx); * datasize may be bigger than the actual file size * */ -HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(LPCVOID data, UINT datasize, D3DXIMAGE_INFO *info) +HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(const void *data, UINT datasize, D3DXIMAGE_INFO *info) { - FIXME("(%p, %d, %p): stub\n", data, datasize, info); + IWICImagingFactory *factory; + IWICBitmapDecoder *decoder = NULL; + IWICStream *stream; + HRESULT hr; + HRESULT initresult; + BOOL dib; - if(data && datasize && !info) return D3D_OK; - if( !data || !datasize ) return D3DERR_INVALIDCALL; + TRACE("(%p, %d, %p)\n", data, datasize, info); - return E_NOTIMPL; + if (!data || !datasize) + return D3DERR_INVALIDCALL; + + if (!info) + return D3D_OK; + + if ((datasize >= 4) && !strncmp(data, "DDS ", 4)) { + TRACE("File type is DDS\n"); + return get_image_info_from_dds(data, datasize, info); + } + + /* In case of DIB file, convert it to BMP */ + dib = convert_dib_to_bmp((void**)&data, &datasize); + + initresult = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + + hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER, &IID_IWICImagingFactory, (void**)&factory); + + if (SUCCEEDED(hr)) { + IWICImagingFactory_CreateStream(factory, &stream); + IWICStream_InitializeFromMemory(stream, (BYTE*)data, datasize); + hr = IWICImagingFactory_CreateDecoderFromStream(factory, (IStream*)stream, NULL, 0, &decoder); + IWICStream_Release(stream); + IWICImagingFactory_Release(factory); + } + + if (FAILED(hr)) { + if ((datasize >= 2) && (!strncmp(data, "P3", 2) || !strncmp(data, "P6", 2))) + FIXME("File type PPM is not supported yet\n"); + else if ((datasize >= 10) && !strncmp(data, "#?RADIANCE", 10)) + FIXME("File type HDR is not supported yet\n"); + else if ((datasize >= 2) && (!strncmp(data, "PF", 2) || !strncmp(data, "Pf", 2))) + FIXME("File type PFM is not supported yet\n"); + } + + if (SUCCEEDED(hr)) { + GUID container_format; + UINT frame_count; + + hr = IWICBitmapDecoder_GetContainerFormat(decoder, &container_format); + if (SUCCEEDED(hr)) { + if (IsEqualGUID(&container_format, &GUID_ContainerFormatBmp)) { + if (dib) { + TRACE("File type is DIB\n"); + info->ImageFileFormat = D3DXIFF_DIB; + } else { + TRACE("File type is BMP\n"); + info->ImageFileFormat = D3DXIFF_BMP; + } + } else if (IsEqualGUID(&container_format, &GUID_ContainerFormatPng)) { + TRACE("File type is PNG\n"); + info->ImageFileFormat = D3DXIFF_PNG; + } else if(IsEqualGUID(&container_format, &GUID_ContainerFormatJpeg)) { + TRACE("File type is JPG\n"); + info->ImageFileFormat = D3DXIFF_JPG; + } else if(IsEqualGUID(&container_format, &GUID_WineContainerFormatTga)) { + TRACE("File type is TGA\n"); + info->ImageFileFormat = D3DXIFF_TGA; + } else { + WARN("Unsupported image file format %s\n", debugstr_guid(&container_format)); + hr = D3DXERR_INVALIDDATA; + } + } + + if (SUCCEEDED(hr)) + hr = IWICBitmapDecoder_GetFrameCount(decoder, &frame_count); + if (SUCCEEDED(hr) && !frame_count) + hr = D3DXERR_INVALIDDATA; + + if (SUCCEEDED(hr)) { + IWICBitmapFrameDecode *frame = NULL; + + hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame); + + if (SUCCEEDED(hr)) + hr = IWICBitmapFrameDecode_GetSize(frame, &info->Width, &info->Height); + + if (SUCCEEDED(hr)) { + WICPixelFormatGUID pixel_format; + + hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &pixel_format); + if (SUCCEEDED(hr)) { + info->Format = wic_guid_to_d3dformat(&pixel_format); + if (info->Format == D3DFMT_UNKNOWN) { + WARN("Unsupported pixel format %s\n", debugstr_guid(&pixel_format)); + hr = D3DXERR_INVALIDDATA; + } + } + } + + if (frame) + IWICBitmapFrameDecode_Release(frame); + + info->Depth = 1; + info->MipLevels = 1; + info->ResourceType = D3DRTYPE_TEXTURE; + } + } + + if (decoder) + IWICBitmapDecoder_Release(decoder); + + if (SUCCEEDED(initresult)) + CoUninitialize(); + + if (dib) + HeapFree(GetProcessHeap(), 0, (void*)data); + + if (FAILED(hr)) { + TRACE("Invalid or unsupported image file\n"); + return D3DXERR_INVALIDDATA; + } + + return D3D_OK; } /************************************************************ @@ -71,12 +904,13 @@ HRESULT WINAPI D3DXGetImageInfoFromFileA(LPCSTR file, D3DXIMAGE_INFO *info) LPWSTR widename; HRESULT hr; int strlength; - TRACE("(void): relay\n"); + + TRACE("(%s, %p): relay\n", debugstr_a(file), info); if( !file ) return D3DERR_INVALIDCALL; strlength = MultiByteToWideChar(CP_ACP, 0, file, -1, NULL, 0); - widename = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, strlength * sizeof(WCHAR)); + widename = HeapAlloc(GetProcessHeap(), 0, strlength * sizeof(*widename)); MultiByteToWideChar(CP_ACP, 0, file, -1, widename, strlength); hr = D3DXGetImageInfoFromFileW(widename, info); @@ -85,17 +919,19 @@ HRESULT WINAPI D3DXGetImageInfoFromFileA(LPCSTR file, D3DXIMAGE_INFO *info) return hr; } -HRESULT WINAPI D3DXGetImageInfoFromFileW(LPCWSTR file, D3DXIMAGE_INFO *info) +HRESULT WINAPI D3DXGetImageInfoFromFileW(const WCHAR *file, D3DXIMAGE_INFO *info) { + void *buffer; HRESULT hr; DWORD size; - LPVOID buffer; - TRACE("(void): relay\n"); - if( !file ) return D3DERR_INVALIDCALL; + TRACE("file %s, info %p.\n", debugstr_w(file), info); - hr = map_view_of_file(file, &buffer, &size); - if(FAILED(hr)) return D3DXERR_INVALIDDATA; + if (!file) + return D3DERR_INVALIDCALL; + + if (FAILED(map_view_of_file(file, &buffer, &size))) + return D3DXERR_INVALIDDATA; hr = D3DXGetImageInfoFromFileInMemory(buffer, size, info); UnmapViewOfFile(buffer); @@ -112,52 +948,42 @@ HRESULT WINAPI D3DXGetImageInfoFromFileW(LPCWSTR file, D3DXIMAGE_INFO *info) * if we fail to load resource * */ -HRESULT WINAPI D3DXGetImageInfoFromResourceA(HMODULE module, LPCSTR resource, D3DXIMAGE_INFO *info) +HRESULT WINAPI D3DXGetImageInfoFromResourceA(HMODULE module, const char *resource, D3DXIMAGE_INFO *info) { HRSRC resinfo; - TRACE("(void)\n"); + void *buffer; + DWORD size; - resinfo = FindResourceA(module, resource, (LPCSTR)RT_RCDATA); - if(resinfo) { - LPVOID buffer; - HRESULT hr; - DWORD size; + TRACE("module %p, resource %s, info %p.\n", module, debugstr_a(resource), info); - hr = load_resource_into_memory(module, resinfo, &buffer, &size); - if(FAILED(hr)) return D3DXERR_INVALIDDATA; - return D3DXGetImageInfoFromFileInMemory(buffer, size, info); - } + if (!(resinfo = FindResourceA(module, resource, (const char *)RT_RCDATA)) + /* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */ + && !(resinfo = FindResourceA(module, resource, (const char *)RT_BITMAP))) + return D3DXERR_INVALIDDATA; - resinfo = FindResourceA(module, resource, (LPCSTR)RT_BITMAP); - if(resinfo) { - FIXME("Implement loading bitmaps from resource type RT_BITMAP\n"); - return E_NOTIMPL; - } - return D3DXERR_INVALIDDATA; + if (FAILED(load_resource_into_memory(module, resinfo, &buffer, &size))) + return D3DXERR_INVALIDDATA; + + return D3DXGetImageInfoFromFileInMemory(buffer, size, info); } -HRESULT WINAPI D3DXGetImageInfoFromResourceW(HMODULE module, LPCWSTR resource, D3DXIMAGE_INFO *info) +HRESULT WINAPI D3DXGetImageInfoFromResourceW(HMODULE module, const WCHAR *resource, D3DXIMAGE_INFO *info) { HRSRC resinfo; - TRACE("(void)\n"); + void *buffer; + DWORD size; - resinfo = FindResourceW(module, resource, (LPCWSTR)RT_RCDATA); - if(resinfo) { - LPVOID buffer; - HRESULT hr; - DWORD size; + TRACE("module %p, resource %s, info %p.\n", module, debugstr_w(resource), info); - hr = load_resource_into_memory(module, resinfo, &buffer, &size); - if(FAILED(hr)) return D3DXERR_INVALIDDATA; - return D3DXGetImageInfoFromFileInMemory(buffer, size, info); - } + if (!(resinfo = FindResourceW(module, resource, (const WCHAR *)RT_RCDATA)) + /* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */ + && !(resinfo = FindResourceW(module, resource, (const WCHAR *)RT_BITMAP))) + return D3DXERR_INVALIDDATA; - resinfo = FindResourceW(module, resource, (LPCWSTR)RT_BITMAP); - if(resinfo) { - FIXME("Implement loading bitmaps from resource type RT_BITMAP\n"); - return E_NOTIMPL; - } - return D3DXERR_INVALIDDATA; + if (FAILED(load_resource_into_memory(module, resinfo, &buffer, &size))) + return D3DXERR_INVALIDDATA; + + return D3DXGetImageInfoFromFileInMemory(buffer, size, info); } /************************************************************ @@ -183,222 +1009,664 @@ HRESULT WINAPI D3DXGetImageInfoFromResourceW(HMODULE module, LPCWSTR resource, D * D3DXERR_INVALIDDATA, if pSrcData is no valid image file * */ -HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory(LPDIRECT3DSURFACE9 pDestSurface, - CONST PALETTEENTRY *pDestPalette, - CONST RECT *pDestRect, - LPCVOID pSrcData, - UINT SrcDataSize, - CONST RECT *pSrcRect, - DWORD dwFilter, - D3DCOLOR Colorkey, - D3DXIMAGE_INFO *pSrcInfo) +HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory(IDirect3DSurface9 *pDestSurface, + const PALETTEENTRY *pDestPalette, const RECT *pDestRect, const void *pSrcData, UINT SrcDataSize, + const RECT *pSrcRect, DWORD dwFilter, D3DCOLOR Colorkey, D3DXIMAGE_INFO *pSrcInfo) { - FIXME("(%p, %p, %p, %p, %d, %p, %d, %x, %p): stub\n", pDestSurface, pDestPalette, - pDestRect, pSrcData, SrcDataSize, pSrcRect, dwFilter, Colorkey, pSrcInfo); + D3DXIMAGE_INFO imginfo; + HRESULT hr; - if( !pDestSurface || !pSrcData | !SrcDataSize ) return D3DERR_INVALIDCALL; - return E_NOTIMPL; + IWICImagingFactory *factory = NULL; + IWICBitmapDecoder *decoder; + IWICBitmapFrameDecode *bitmapframe; + IWICStream *stream; + + const struct pixel_format_desc *formatdesc; + WICRect wicrect; + RECT rect; + + TRACE("dst_surface %p, dst_palette %p, dst_rect %s, src_data %p, src_data_size %u, " + "src_rect %s, filter %#x, color_key 0x%08x, src_info %p.\n", + pDestSurface, pDestPalette, wine_dbgstr_rect(pDestRect), pSrcData, SrcDataSize, + wine_dbgstr_rect(pSrcRect), dwFilter, Colorkey, pSrcInfo); + + if (!pDestSurface || !pSrcData || !SrcDataSize) + return D3DERR_INVALIDCALL; + + hr = D3DXGetImageInfoFromFileInMemory(pSrcData, SrcDataSize, &imginfo); + + if (FAILED(hr)) + return hr; + + if (pSrcRect) + { + wicrect.X = pSrcRect->left; + wicrect.Y = pSrcRect->top; + wicrect.Width = pSrcRect->right - pSrcRect->left; + wicrect.Height = pSrcRect->bottom - pSrcRect->top; + } + else + { + wicrect.X = 0; + wicrect.Y = 0; + wicrect.Width = imginfo.Width; + wicrect.Height = imginfo.Height; + } + + SetRect(&rect, 0, 0, wicrect.Width, wicrect.Height); + + if (imginfo.ImageFileFormat == D3DXIFF_DDS) + { + hr = load_surface_from_dds(pDestSurface, pDestPalette, pDestRect, pSrcData, &rect, + dwFilter, Colorkey, &imginfo); + if (SUCCEEDED(hr) && pSrcInfo) + *pSrcInfo = imginfo; + return hr; + } + + if (imginfo.ImageFileFormat == D3DXIFF_DIB) + convert_dib_to_bmp((void**)&pSrcData, &SrcDataSize); + + CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + + if (FAILED(CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER, &IID_IWICImagingFactory, (void**)&factory))) + goto cleanup_err; + + if (FAILED(IWICImagingFactory_CreateStream(factory, &stream))) + { + IWICImagingFactory_Release(factory); + factory = NULL; + goto cleanup_err; + } + + IWICStream_InitializeFromMemory(stream, (BYTE*)pSrcData, SrcDataSize); + + hr = IWICImagingFactory_CreateDecoderFromStream(factory, (IStream*)stream, NULL, 0, &decoder); + + IWICStream_Release(stream); + + if (FAILED(hr)) + goto cleanup_err; + + hr = IWICBitmapDecoder_GetFrame(decoder, 0, &bitmapframe); + + if (FAILED(hr)) + goto cleanup_bmp; + + formatdesc = get_format_info(imginfo.Format); + + if (formatdesc->type == FORMAT_UNKNOWN) + { + FIXME("Unsupported pixel format\n"); + hr = D3DXERR_INVALIDDATA; + } + else + { + BYTE *buffer; + DWORD pitch; + PALETTEENTRY *palette = NULL; + WICColor *colors = NULL; + + pitch = formatdesc->bytes_per_pixel * wicrect.Width; + buffer = HeapAlloc(GetProcessHeap(), 0, pitch * wicrect.Height); + + hr = IWICBitmapFrameDecode_CopyPixels(bitmapframe, &wicrect, pitch, + pitch * wicrect.Height, buffer); + + if (SUCCEEDED(hr) && (formatdesc->type == FORMAT_INDEX)) + { + IWICPalette *wic_palette = NULL; + UINT nb_colors; + + hr = IWICImagingFactory_CreatePalette(factory, &wic_palette); + if (SUCCEEDED(hr)) + hr = IWICBitmapFrameDecode_CopyPalette(bitmapframe, wic_palette); + if (SUCCEEDED(hr)) + hr = IWICPalette_GetColorCount(wic_palette, &nb_colors); + if (SUCCEEDED(hr)) + { + colors = HeapAlloc(GetProcessHeap(), 0, nb_colors * sizeof(colors[0])); + palette = HeapAlloc(GetProcessHeap(), 0, nb_colors * sizeof(palette[0])); + if (!colors || !palette) + hr = E_OUTOFMEMORY; + } + if (SUCCEEDED(hr)) + hr = IWICPalette_GetColors(wic_palette, nb_colors, colors, &nb_colors); + if (SUCCEEDED(hr)) + { + UINT i; + + /* Convert colors from WICColor (ARGB) to PALETTEENTRY (ABGR) */ + for (i = 0; i < nb_colors; i++) + { + palette[i].peRed = (colors[i] >> 16) & 0xff; + palette[i].peGreen = (colors[i] >> 8) & 0xff; + palette[i].peBlue = colors[i] & 0xff; + palette[i].peFlags = (colors[i] >> 24) & 0xff; /* peFlags is the alpha component in DX8 and higher */ + } + } + if (wic_palette) + IWICPalette_Release(wic_palette); + } + + if (SUCCEEDED(hr)) + { + hr = D3DXLoadSurfaceFromMemory(pDestSurface, pDestPalette, pDestRect, + buffer, imginfo.Format, pitch, + palette, &rect, dwFilter, Colorkey); + } + + HeapFree(GetProcessHeap(), 0, colors); + HeapFree(GetProcessHeap(), 0, palette); + HeapFree(GetProcessHeap(), 0, buffer); + } + + IWICBitmapFrameDecode_Release(bitmapframe); + +cleanup_bmp: + IWICBitmapDecoder_Release(decoder); + +cleanup_err: + if (factory) + IWICImagingFactory_Release(factory); + + CoUninitialize(); + + if (imginfo.ImageFileFormat == D3DXIFF_DIB) + HeapFree(GetProcessHeap(), 0, (void*)pSrcData); + + if (FAILED(hr)) + return D3DXERR_INVALIDDATA; + + if (pSrcInfo) + *pSrcInfo = imginfo; + + return D3D_OK; } -/************************************************************ - * D3DXLoadSurfaceFromFile - */ -HRESULT WINAPI D3DXLoadSurfaceFromFileA(LPDIRECT3DSURFACE9 pDestSurface, - CONST PALETTEENTRY *pDestPalette, - CONST RECT *pDestRect, - LPCSTR pSrcFile, - CONST RECT *pSrcRect, - DWORD dwFilter, - D3DCOLOR Colorkey, - D3DXIMAGE_INFO *pSrcInfo) +HRESULT WINAPI D3DXLoadSurfaceFromFileA(IDirect3DSurface9 *dst_surface, + const PALETTEENTRY *dst_palette, const RECT *dst_rect, const char *src_file, + const RECT *src_rect, DWORD filter, D3DCOLOR color_key, D3DXIMAGE_INFO *src_info) { LPWSTR pWidename; HRESULT hr; int strlength; - TRACE("(void): relay\n"); - if( !pSrcFile || !pDestSurface ) return D3DERR_INVALIDCALL; + TRACE("dst_surface %p, dst_palette %p, dst_rect %s, src_file %s, " + "src_rect %s, filter %#x, color_key 0x%08x, src_info %p.\n", + dst_surface, dst_palette, wine_dbgstr_rect(dst_rect), debugstr_a(src_file), + wine_dbgstr_rect(src_rect), filter, color_key, src_info); - strlength = MultiByteToWideChar(CP_ACP, 0, pSrcFile, -1, NULL, 0); - pWidename = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, strlength * sizeof(WCHAR)); - MultiByteToWideChar(CP_ACP, 0, pSrcFile, -1, pWidename, strlength); + if (!src_file || !dst_surface) + return D3DERR_INVALIDCALL; - hr = D3DXLoadSurfaceFromFileW(pDestSurface, pDestPalette, pDestRect, pWidename, pSrcRect, dwFilter, Colorkey, pSrcInfo); + strlength = MultiByteToWideChar(CP_ACP, 0, src_file, -1, NULL, 0); + pWidename = HeapAlloc(GetProcessHeap(), 0, strlength * sizeof(*pWidename)); + MultiByteToWideChar(CP_ACP, 0, src_file, -1, pWidename, strlength); + + hr = D3DXLoadSurfaceFromFileW(dst_surface, dst_palette, dst_rect, + pWidename, src_rect, filter, color_key, src_info); HeapFree(GetProcessHeap(), 0, pWidename); return hr; } -HRESULT WINAPI D3DXLoadSurfaceFromFileW(LPDIRECT3DSURFACE9 pDestSurface, - CONST PALETTEENTRY *pDestPalette, - CONST RECT *pDestRect, - LPCWSTR pSrcFile, - CONST RECT *pSrcRect, - DWORD Filter, - D3DCOLOR Colorkey, - D3DXIMAGE_INFO *pSrcInfo) +HRESULT WINAPI D3DXLoadSurfaceFromFileW(IDirect3DSurface9 *dst_surface, + const PALETTEENTRY *dst_palette, const RECT *dst_rect, const WCHAR *src_file, + const RECT *src_rect, DWORD filter, D3DCOLOR color_key, D3DXIMAGE_INFO *src_info) { + UINT data_size; + void *data; HRESULT hr; - DWORD dwSize; - LPVOID pBuffer; - TRACE("(void): relay\n"); - if( !pSrcFile || !pDestSurface ) return D3DERR_INVALIDCALL; + TRACE("dst_surface %p, dst_palette %p, dst_rect %s, src_file %s, " + "src_rect %s, filter %#x, color_key 0x%08x, src_info %p.\n", + dst_surface, dst_palette, wine_dbgstr_rect(dst_rect), debugstr_w(src_file), + wine_dbgstr_rect(src_rect), filter, color_key, src_info); - hr = map_view_of_file(pSrcFile, &pBuffer, &dwSize); - if(FAILED(hr)) return D3DXERR_INVALIDDATA; + if (!src_file || !dst_surface) + return D3DERR_INVALIDCALL; - hr = D3DXLoadSurfaceFromFileInMemory(pDestSurface, pDestPalette, pDestRect, pBuffer, dwSize, pSrcRect, Filter, Colorkey, pSrcInfo); - UnmapViewOfFile(pBuffer); + if (FAILED(map_view_of_file(src_file, &data, &data_size))) + return D3DXERR_INVALIDDATA; + + hr = D3DXLoadSurfaceFromFileInMemory(dst_surface, dst_palette, dst_rect, + data, data_size, src_rect, filter, color_key, src_info); + UnmapViewOfFile(data); return hr; } -/************************************************************ - * D3DXLoadSurfaceFromResource - */ -HRESULT WINAPI D3DXLoadSurfaceFromResourceA(LPDIRECT3DSURFACE9 pDestSurface, - CONST PALETTEENTRY *pDestPalette, - CONST RECT *pDestRect, - HMODULE hSrcModule, - LPCSTR pResource, - CONST RECT *pSrcRect, - DWORD dwFilter, - D3DCOLOR Colorkey, - D3DXIMAGE_INFO *pSrcInfo) +HRESULT WINAPI D3DXLoadSurfaceFromResourceA(IDirect3DSurface9 *dst_surface, + const PALETTEENTRY *dst_palette, const RECT *dst_rect, HMODULE src_module, const char *resource, + const RECT *src_rect, DWORD filter, D3DCOLOR color_key, D3DXIMAGE_INFO *src_info) { - HRSRC hResInfo; - TRACE("(void): relay\n"); + UINT data_size; + HRSRC resinfo; + void *data; - if( !pDestSurface ) return D3DERR_INVALIDCALL; + TRACE("dst_surface %p, dst_palette %p, dst_rect %s, src_module %p, resource %s, " + "src_rect %s, filter %#x, color_key 0x%08x, src_info %p.\n", + dst_surface, dst_palette, wine_dbgstr_rect(dst_rect), src_module, debugstr_a(resource), + wine_dbgstr_rect(src_rect), filter, color_key, src_info); - hResInfo = FindResourceA(hSrcModule, pResource, (LPCSTR)RT_RCDATA); - if(hResInfo) { - LPVOID pBuffer; - HRESULT hr; - DWORD dwSize; + if (!dst_surface) + return D3DERR_INVALIDCALL; - hr = load_resource_into_memory(hSrcModule, hResInfo, &pBuffer, &dwSize); - if(FAILED(hr)) return D3DXERR_INVALIDDATA; - return D3DXLoadSurfaceFromFileInMemory(pDestSurface, pDestPalette, pDestRect, pBuffer, dwSize, pSrcRect, dwFilter, Colorkey, pSrcInfo); - } + if (!(resinfo = FindResourceA(src_module, resource, (const char *)RT_RCDATA)) + /* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */ + && !(resinfo = FindResourceA(src_module, resource, (const char *)RT_BITMAP))) + return D3DXERR_INVALIDDATA; - hResInfo = FindResourceA(hSrcModule, pResource, (LPCSTR)RT_BITMAP); - if(hResInfo) { - FIXME("Implement loading bitmaps from resource type RT_BITMAP\n"); - return E_NOTIMPL; - } - return D3DXERR_INVALIDDATA; + if (FAILED(load_resource_into_memory(src_module, resinfo, &data, &data_size))) + return D3DXERR_INVALIDDATA; + + return D3DXLoadSurfaceFromFileInMemory(dst_surface, dst_palette, dst_rect, + data, data_size, src_rect, filter, color_key, src_info); } -HRESULT WINAPI D3DXLoadSurfaceFromResourceW(LPDIRECT3DSURFACE9 pDestSurface, - CONST PALETTEENTRY *pDestPalette, - CONST RECT *pDestRect, - HMODULE hSrcModule, - LPCWSTR pResource, - CONST RECT *pSrcRect, - DWORD dwFilter, - D3DCOLOR Colorkey, - D3DXIMAGE_INFO *pSrcInfo) +HRESULT WINAPI D3DXLoadSurfaceFromResourceW(IDirect3DSurface9 *dst_surface, + const PALETTEENTRY *dst_palette, const RECT *dst_rect, HMODULE src_module, const WCHAR *resource, + const RECT *src_rect, DWORD filter, D3DCOLOR color_key, D3DXIMAGE_INFO *src_info) { - HRSRC hResInfo; - TRACE("(void): relay\n"); + UINT data_size; + HRSRC resinfo; + void *data; - if( !pDestSurface ) return D3DERR_INVALIDCALL; + TRACE("dst_surface %p, dst_palette %p, dst_rect %s, src_module %p, resource %s, " + "src_rect %s, filter %#x, color_key 0x%08x, src_info %p.\n", + dst_surface, dst_palette, wine_dbgstr_rect(dst_rect), src_module, debugstr_w(resource), + wine_dbgstr_rect(src_rect), filter, color_key, src_info); - hResInfo = FindResourceW(hSrcModule, pResource, (LPCWSTR)RT_RCDATA); - if(hResInfo) { - LPVOID pBuffer; - HRESULT hr; - DWORD dwSize; + if (!dst_surface) + return D3DERR_INVALIDCALL; - hr = load_resource_into_memory(hSrcModule, hResInfo, &pBuffer, &dwSize); - if(FAILED(hr)) return D3DXERR_INVALIDDATA; - return D3DXLoadSurfaceFromFileInMemory(pDestSurface, pDestPalette, pDestRect, pBuffer, dwSize, pSrcRect, dwFilter, Colorkey, pSrcInfo); - } + if (!(resinfo = FindResourceW(src_module, resource, (const WCHAR *)RT_RCDATA)) + /* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */ + && !(resinfo = FindResourceW(src_module, resource, (const WCHAR *)RT_BITMAP))) + return D3DXERR_INVALIDDATA; - hResInfo = FindResourceW(hSrcModule, pResource, (LPCWSTR)RT_BITMAP); - if(hResInfo) { - FIXME("Implement loading bitmaps from resource type RT_BITMAP\n"); - return E_NOTIMPL; - } - return D3DXERR_INVALIDDATA; + if (FAILED(load_resource_into_memory(src_module, resinfo, &data, &data_size))) + return D3DXERR_INVALIDDATA; + + return D3DXLoadSurfaceFromFileInMemory(dst_surface, dst_palette, dst_rect, + data, data_size, src_rect, filter, color_key, src_info); } /************************************************************ - * copy_simple_data - * - * Copies the source buffer to the destination buffer, performing - * any necessary format conversion and color keying. - * Works only for ARGB formats with 1 - 4 bytes per pixel. + * helper functions for D3DXLoadSurfaceFromMemory */ -static void copy_simple_data(CONST BYTE *src, UINT srcpitch, POINT srcsize, CONST PixelFormatDesc *srcformat, - CONST BYTE *dest, UINT destpitch, POINT destsize, CONST PixelFormatDesc *destformat, - DWORD dwFilter) +struct argb_conversion_info { + const struct pixel_format_desc *srcformat; + const struct pixel_format_desc *destformat; DWORD srcshift[4], destshift[4]; DWORD srcmask[4], destmask[4]; BOOL process_channel[4]; - DWORD channels[4]; - DWORD channelmask = 0; + DWORD channelmask; +}; - UINT minwidth, minheight; - BYTE *srcptr, *destptr; - UINT i, x, y; +static void init_argb_conversion_info(const struct pixel_format_desc *srcformat, const struct pixel_format_desc *destformat, struct argb_conversion_info *info) +{ + UINT i; + ZeroMemory(info->process_channel, 4 * sizeof(BOOL)); + info->channelmask = 0; - ZeroMemory(channels, sizeof(channels)); - ZeroMemory(process_channel, sizeof(process_channel)); + info->srcformat = srcformat; + info->destformat = destformat; for(i = 0;i < 4;i++) { /* srcshift is used to extract the _relevant_ components */ - srcshift[i] = srcformat->shift[i] + max( srcformat->bits[i] - destformat->bits[i], 0); + info->srcshift[i] = srcformat->shift[i] + max( srcformat->bits[i] - destformat->bits[i], 0); /* destshift is used to move the components to the correct position */ - destshift[i] = destformat->shift[i] + max(destformat->bits[i] - srcformat->bits[i], 0); + info->destshift[i] = destformat->shift[i] + max(destformat->bits[i] - srcformat->bits[i], 0); - srcmask[i] = ((1 << srcformat->bits[i]) - 1) << srcformat->shift[i]; - destmask[i] = ((1 << destformat->bits[i]) - 1) << destformat->shift[i]; + info->srcmask[i] = ((1 << srcformat->bits[i]) - 1) << srcformat->shift[i]; + info->destmask[i] = ((1 << destformat->bits[i]) - 1) << destformat->shift[i]; /* channelmask specifies bits which aren't used in the source format but in the destination one */ if(destformat->bits[i]) { - if(srcformat->bits[i]) process_channel[i] = TRUE; - else channelmask |= destmask[i]; + if(srcformat->bits[i]) info->process_channel[i] = TRUE; + else info->channelmask |= info->destmask[i]; } } +} - minwidth = (srcsize.x < destsize.x) ? srcsize.x : destsize.x; - minheight = (srcsize.y < destsize.y) ? srcsize.y : destsize.y; +static DWORD dword_from_bytes(CONST BYTE *src, UINT bytes_per_pixel) +{ + DWORD ret = 0; + static BOOL fixme_once; - for(y = 0;y < minheight;y++) { - srcptr = (BYTE*)( src + y * srcpitch); - destptr = (BYTE*)(dest + y * destpitch); - for(x = 0;x < minwidth;x++) { - /* extract source color components */ - if(srcformat->type == FORMAT_ARGB) { - const DWORD col = *(DWORD*)srcptr; - for(i = 0;i < 4;i++) - if(process_channel[i]) - channels[i] = (col & srcmask[i]) >> srcshift[i]; - } + if(bytes_per_pixel > sizeof(DWORD)) { + if(!fixme_once++) FIXME("Unsupported image: %u bytes per pixel\n", bytes_per_pixel); + bytes_per_pixel = sizeof(DWORD); + } - /* recombine the components */ - if(destformat->type == FORMAT_ARGB) { - DWORD* const pixel = (DWORD*)destptr; - *pixel = 0; + memcpy(&ret, src, bytes_per_pixel); + return ret; +} - for(i = 0;i < 4;i++) { - if(process_channel[i]) { - /* necessary to make sure that e.g. an X4R4G4B4 white maps to an R8G8B8 white instead of 0xf0f0f0 */ - signed int shift; - for(shift = destshift[i]; shift > destformat->shift[i]; shift -= srcformat->bits[i]) *pixel |= channels[i] << shift; - *pixel |= (channels[i] >> (destformat->shift[i] - shift)) << destformat->shift[i]; +static void dword_to_bytes(BYTE *dst, DWORD dword, UINT bytes_per_pixel) +{ + static BOOL fixme_once; + + if(bytes_per_pixel > sizeof(DWORD)) { + if(!fixme_once++) FIXME("Unsupported image: %u bytes per pixel\n", bytes_per_pixel); + ZeroMemory(dst, bytes_per_pixel); + bytes_per_pixel = sizeof(DWORD); + } + + memcpy(dst, &dword, bytes_per_pixel); +} + +/************************************************************ + * get_relevant_argb_components + * + * Extracts the relevant components from the source color and + * drops the less significant bits if they aren't used by the destination format. + */ +static void get_relevant_argb_components(CONST struct argb_conversion_info *info, CONST DWORD col, DWORD *out) +{ + UINT i = 0; + for(;i < 4;i++) + if(info->process_channel[i]) + out[i] = (col & info->srcmask[i]) >> info->srcshift[i]; +} + +/************************************************************ + * make_argb_color + * + * Recombines the output of get_relevant_argb_components and converts + * it to the destination format. + */ +static DWORD make_argb_color(CONST struct argb_conversion_info *info, CONST DWORD *in) +{ + UINT i; + DWORD val = 0; + + for(i = 0;i < 4;i++) { + if(info->process_channel[i]) { + /* necessary to make sure that e.g. an X4R4G4B4 white maps to an R8G8B8 white instead of 0xf0f0f0 */ + signed int shift; + for(shift = info->destshift[i]; shift > info->destformat->shift[i]; shift -= info->srcformat->bits[i]) val |= in[i] << shift; + val |= (in[i] >> (info->destformat->shift[i] - shift)) << info->destformat->shift[i]; + } + } + val |= info->channelmask; /* new channels are set to their maximal value */ + return val; +} + +static void format_to_vec4(const struct pixel_format_desc *format, const DWORD *src, struct vec4 *dst) +{ + DWORD mask; + + if (format->bits[1]) + { + mask = (1 << format->bits[1]) - 1; + dst->x = (float)((*src >> format->shift[1]) & mask) / mask; + } + else + dst->x = 1.0f; + + if (format->bits[2]) + { + mask = (1 << format->bits[2]) - 1; + dst->y = (float)((*src >> format->shift[2]) & mask) / mask; + } + else + dst->y = 1.0f; + + if (format->bits[3]) + { + mask = (1 << format->bits[3]) - 1; + dst->z = (float)((*src >> format->shift[3]) & mask) / mask; + } + else + dst->z = 1.0f; + + if (format->bits[0]) + { + mask = (1 << format->bits[0]) - 1; + dst->w = (float)((*src >> format->shift[0]) & mask) / mask; + } + else + dst->w = 1.0f; +} + +static void format_from_vec4(const struct pixel_format_desc *format, const struct vec4 *src, DWORD *dst) +{ + *dst = 0; + + if (format->bits[1]) + *dst |= (DWORD)(src->x * ((1 << format->bits[1]) - 1) + 0.5f) << format->shift[1]; + if (format->bits[2]) + *dst |= (DWORD)(src->y * ((1 << format->bits[2]) - 1) + 0.5f) << format->shift[2]; + if (format->bits[3]) + *dst |= (DWORD)(src->z * ((1 << format->bits[3]) - 1) + 0.5f) << format->shift[3]; + if (format->bits[0]) + *dst |= (DWORD)(src->w * ((1 << format->bits[0]) - 1) + 0.5f) << format->shift[0]; +} + +/************************************************************ + * copy_pixels + * + * Copies the source buffer to the destination buffer. + * Works for any pixel format. + * The source and the destination must be block-aligned. + */ +void copy_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pitch, + BYTE *dst, UINT dst_row_pitch, UINT dst_slice_pitch, const struct volume *size, + const struct pixel_format_desc *format) +{ + UINT row, slice; + BYTE *dst_addr; + const BYTE *src_addr; + UINT row_block_count = (size->width + format->block_width - 1) / format->block_width; + UINT row_count = (size->height + format->block_height - 1) / format->block_height; + + for (slice = 0; slice < size->depth; slice++) + { + src_addr = src + slice * src_slice_pitch; + dst_addr = dst + slice * dst_slice_pitch; + + for (row = 0; row < row_count; row++) + { + memcpy(dst_addr, src_addr, row_block_count * format->block_byte_count); + src_addr += src_row_pitch; + dst_addr += dst_row_pitch; + } + } +} + +/************************************************************ + * convert_argb_pixels + * + * Copies the source buffer to the destination buffer, performing + * any necessary format conversion and color keying. + * Pixels outsize the source rect are blacked out. + * Works only for ARGB formats with 1 - 4 bytes per pixel. + */ +void convert_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pitch, const struct volume *src_size, + const struct pixel_format_desc *src_format, BYTE *dst, UINT dst_row_pitch, UINT dst_slice_pitch, + const struct volume *dst_size, const struct pixel_format_desc *dst_format, D3DCOLOR color_key, + const PALETTEENTRY *palette) +{ + struct argb_conversion_info conv_info, ck_conv_info; + const struct pixel_format_desc *ck_format = NULL; + DWORD channels[4], pixel; + UINT min_width, min_height, min_depth; + UINT x, y, z; + + ZeroMemory(channels, sizeof(channels)); + init_argb_conversion_info(src_format, dst_format, &conv_info); + + min_width = min(src_size->width, dst_size->width); + min_height = min(src_size->height, dst_size->height); + min_depth = min(src_size->depth, dst_size->depth); + + if (color_key) + { + /* Color keys are always represented in D3DFMT_A8R8G8B8 format. */ + ck_format = get_format_info(D3DFMT_A8R8G8B8); + init_argb_conversion_info(src_format, ck_format, &ck_conv_info); + } + + for (z = 0; z < min_depth; z++) { + const BYTE *src_slice_ptr = src + z * src_slice_pitch; + BYTE *dst_slice_ptr = dst + z * dst_slice_pitch; + + for (y = 0; y < min_height; y++) { + const BYTE *src_ptr = src_slice_ptr + y * src_row_pitch; + BYTE *dst_ptr = dst_slice_ptr + y * dst_row_pitch; + DWORD val; + + for (x = 0; x < min_width; x++) { + /* extract source color components */ + pixel = dword_from_bytes(src_ptr, src_format->bytes_per_pixel); + + if (!src_format->to_rgba && !dst_format->from_rgba) + { + get_relevant_argb_components(&conv_info, pixel, channels); + val = make_argb_color(&conv_info, channels); + + if (color_key) + { + get_relevant_argb_components(&ck_conv_info, pixel, channels); + pixel = make_argb_color(&ck_conv_info, channels); + if (pixel == color_key) + val &= ~conv_info.destmask[0]; } } - *pixel |= channelmask; /* new channels are set to their maximal value */ + else + { + struct vec4 color, tmp; + + format_to_vec4(src_format, &pixel, &color); + if (src_format->to_rgba) + src_format->to_rgba(&color, &tmp, palette); + else + tmp = color; + + if (ck_format) + { + format_from_vec4(ck_format, &tmp, &pixel); + if (pixel == color_key) + tmp.w = 0.0f; + } + + if (dst_format->from_rgba) + dst_format->from_rgba(&tmp, &color); + else + color = tmp; + + format_from_vec4(dst_format, &color, &val); + } + + dword_to_bytes(dst_ptr, val, dst_format->bytes_per_pixel); + src_ptr += src_format->bytes_per_pixel; + dst_ptr += dst_format->bytes_per_pixel; + } + + if (src_size->width < dst_size->width) /* black out remaining pixels */ + memset(dst_ptr, 0, dst_format->bytes_per_pixel * (dst_size->width - src_size->width)); + } + + if (src_size->height < dst_size->height) /* black out remaining pixels */ + memset(dst + src_size->height * dst_row_pitch, 0, dst_row_pitch * (dst_size->height - src_size->height)); + } + if (src_size->depth < dst_size->depth) /* black out remaining pixels */ + memset(dst + src_size->depth * dst_slice_pitch, 0, dst_slice_pitch * (dst_size->depth - src_size->depth)); +} + +/************************************************************ + * point_filter_argb_pixels + * + * Copies the source buffer to the destination buffer, performing + * any necessary format conversion, color keying and stretching + * using a point filter. + * Works only for ARGB formats with 1 - 4 bytes per pixel. + */ +void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pitch, const struct volume *src_size, + const struct pixel_format_desc *src_format, BYTE *dst, UINT dst_row_pitch, UINT dst_slice_pitch, + const struct volume *dst_size, const struct pixel_format_desc *dst_format, D3DCOLOR color_key, + const PALETTEENTRY *palette) +{ + struct argb_conversion_info conv_info, ck_conv_info; + const struct pixel_format_desc *ck_format = NULL; + DWORD channels[4], pixel; + UINT x, y, z; + + ZeroMemory(channels, sizeof(channels)); + init_argb_conversion_info(src_format, dst_format, &conv_info); + + if (color_key) + { + /* Color keys are always represented in D3DFMT_A8R8G8B8 format. */ + ck_format = get_format_info(D3DFMT_A8R8G8B8); + init_argb_conversion_info(src_format, ck_format, &ck_conv_info); + } + + for (z = 0; z < dst_size->depth; z++) + { + BYTE *dst_slice_ptr = dst + z * dst_slice_pitch; + const BYTE *src_slice_ptr = src + src_slice_pitch * (z * src_size->depth / dst_size->depth); + + for (y = 0; y < dst_size->height; y++) + { + BYTE *dst_ptr = dst_slice_ptr + y * dst_row_pitch; + const BYTE *src_row_ptr = src_slice_ptr + src_row_pitch * (y * src_size->height / dst_size->height); + + for (x = 0; x < dst_size->width; x++) + { + const BYTE *src_ptr = src_row_ptr + (x * src_size->width / dst_size->width) * src_format->bytes_per_pixel; + DWORD val; + + /* extract source color components */ + pixel = dword_from_bytes(src_ptr, src_format->bytes_per_pixel); + + if (!src_format->to_rgba && !dst_format->from_rgba) + { + get_relevant_argb_components(&conv_info, pixel, channels); + val = make_argb_color(&conv_info, channels); + + if (color_key) + { + get_relevant_argb_components(&ck_conv_info, pixel, channels); + pixel = make_argb_color(&ck_conv_info, channels); + if (pixel == color_key) + val &= ~conv_info.destmask[0]; + } + } + else + { + struct vec4 color, tmp; + + format_to_vec4(src_format, &pixel, &color); + if (src_format->to_rgba) + src_format->to_rgba(&color, &tmp, palette); + else + tmp = color; + + if (ck_format) + { + format_from_vec4(ck_format, &tmp, &pixel); + if (pixel == color_key) + tmp.w = 0.0f; + } + + if (dst_format->from_rgba) + dst_format->from_rgba(&tmp, &color); + else + color = tmp; + + format_from_vec4(dst_format, &color, &val); + } + + dword_to_bytes(dst_ptr, val, dst_format->bytes_per_pixel); + dst_ptr += dst_format->bytes_per_pixel; } - srcptr += srcformat->bytes_per_pixel; - destptr += destformat->bytes_per_pixel; } } } @@ -425,7 +1693,8 @@ static void copy_simple_data(CONST BYTE *src, UINT srcpitch, POINT srcsize, C * Success: D3D_OK, if we successfully load the pixel data into our surface or * if pSrcMemory is NULL but the other parameters are valid * Failure: D3DERR_INVALIDCALL, if pDestSurface, SrcPitch or pSrcRect are NULL or - * if SrcFormat is an invalid format (other than D3DFMT_UNKNOWN) + * if SrcFormat is an invalid format (other than D3DFMT_UNKNOWN) or + * if DestRect is invalid * D3DXERR_INVALIDDATA, if we fail to lock pDestSurface * E_FAIL, if SrcFormat is D3DFMT_UNKNOWN or the dimensions of pSrcRect are invalid * @@ -434,54 +1703,125 @@ static void copy_simple_data(CONST BYTE *src, UINT srcpitch, POINT srcsize, C * negative values for pSrcRect are allowed as we're only looking at the width and height anyway. * */ -HRESULT WINAPI D3DXLoadSurfaceFromMemory(LPDIRECT3DSURFACE9 pDestSurface, - CONST PALETTEENTRY *pDestPalette, - CONST RECT *pDestRect, - LPCVOID pSrcMemory, - D3DFORMAT SrcFormat, - UINT SrcPitch, - CONST PALETTEENTRY *pSrcPalette, - CONST RECT *pSrcRect, - DWORD dwFilter, - D3DCOLOR Colorkey) +HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, + const PALETTEENTRY *dst_palette, const RECT *dst_rect, const void *src_memory, + D3DFORMAT src_format, UINT src_pitch, const PALETTEENTRY *src_palette, const RECT *src_rect, + DWORD filter, D3DCOLOR color_key) { - CONST PixelFormatDesc *srcformatdesc, *destformatdesc; + const struct pixel_format_desc *srcformatdesc, *destformatdesc; D3DSURFACE_DESC surfdesc; D3DLOCKED_RECT lockrect; - POINT srcsize, destsize; - HRESULT hr; - TRACE("(void)\n"); + struct volume src_size, dst_size; - if( !pDestSurface || !pSrcMemory || !pSrcRect ) return D3DERR_INVALIDCALL; - if(SrcFormat == D3DFMT_UNKNOWN || pSrcRect->left >= pSrcRect->right || pSrcRect->top >= pSrcRect->bottom) return E_FAIL; + TRACE("(%p, %p, %s, %p, %#x, %u, %p, %s %#x, 0x%08x)\n", + dst_surface, dst_palette, wine_dbgstr_rect(dst_rect), src_memory, src_format, + src_pitch, src_palette, wine_dbgstr_rect(src_rect), filter, color_key); - if(dwFilter != D3DX_FILTER_NONE) return E_NOTIMPL; - - IDirect3DSurface9_GetDesc(pDestSurface, &surfdesc); - - srcformatdesc = get_format_info(SrcFormat); - destformatdesc = get_format_info(surfdesc.Format); - if( srcformatdesc->type == FORMAT_UNKNOWN || srcformatdesc->bytes_per_pixel > 4) return E_NOTIMPL; - if(destformatdesc->type == FORMAT_UNKNOWN || destformatdesc->bytes_per_pixel > 4) return E_NOTIMPL; - - srcsize.x = pSrcRect->right - pSrcRect->left; - srcsize.y = pSrcRect->bottom - pSrcRect->top; - if( !pDestRect ) { - destsize.x = surfdesc.Width; - destsize.y = surfdesc.Height; - } else { - destsize.x = pDestRect->right - pDestRect->left; - destsize.y = pDestRect->bottom - pDestRect->top; + if (!dst_surface || !src_memory || !src_rect) + { + WARN("Invalid argument specified.\n"); + return D3DERR_INVALIDCALL; + } + if (src_format == D3DFMT_UNKNOWN + || src_rect->left >= src_rect->right + || src_rect->top >= src_rect->bottom) + { + WARN("Invalid src_format or src_rect.\n"); + return E_FAIL; } - hr = IDirect3DSurface9_LockRect(pDestSurface, &lockrect, pDestRect, 0); - if(FAILED(hr)) return D3DXERR_INVALIDDATA; + if (filter == D3DX_DEFAULT) + filter = D3DX_FILTER_TRIANGLE | D3DX_FILTER_DITHER; - copy_simple_data((CONST BYTE*)pSrcMemory, SrcPitch, srcsize, srcformatdesc, - (CONST BYTE*)lockrect.pBits, lockrect.Pitch, destsize, destformatdesc, - dwFilter); + IDirect3DSurface9_GetDesc(dst_surface, &surfdesc); + + src_size.width = src_rect->right - src_rect->left; + src_size.height = src_rect->bottom - src_rect->top; + src_size.depth = 1; + if (!dst_rect) + { + dst_size.width = surfdesc.Width; + dst_size.height = surfdesc.Height; + } + else + { + if (dst_rect->left > dst_rect->right || dst_rect->right > surfdesc.Width + || dst_rect->top > dst_rect->bottom || dst_rect->bottom > surfdesc.Height + || dst_rect->left < 0 || dst_rect->top < 0) + { + WARN("Invalid dst_rect specified.\n"); + return D3DERR_INVALIDCALL; + } + dst_size.width = dst_rect->right - dst_rect->left; + dst_size.height = dst_rect->bottom - dst_rect->top; + if (!dst_size.width || !dst_size.height) + return D3D_OK; + } + dst_size.depth = 1; + + srcformatdesc = get_format_info(src_format); + destformatdesc = get_format_info(surfdesc.Format); + if (srcformatdesc->type == FORMAT_UNKNOWN || destformatdesc->type == FORMAT_UNKNOWN) + { + FIXME("Unsupported pixel format conversion %#x -> %#x\n", src_format, surfdesc.Format); + return E_NOTIMPL; + } + + if (src_format == surfdesc.Format + && dst_size.width == src_size.width + && dst_size.height == src_size.height + && color_key == 0) /* Simple copy. */ + { + if (src_rect->left & (srcformatdesc->block_width - 1) + || src_rect->top & (srcformatdesc->block_height - 1) + || (src_rect->right & (srcformatdesc->block_width - 1) + && src_size.width != surfdesc.Width) + || (src_rect->bottom & (srcformatdesc->block_height - 1) + && src_size.height != surfdesc.Height)) + { + WARN("Source rect %s is misaligned.\n", wine_dbgstr_rect(src_rect)); + return D3DXERR_INVALIDDATA; + } + + if (FAILED(IDirect3DSurface9_LockRect(dst_surface, &lockrect, dst_rect, 0))) + return D3DXERR_INVALIDDATA; + + copy_pixels(src_memory, src_pitch, 0, lockrect.pBits, lockrect.Pitch, 0, + &src_size, srcformatdesc); + + IDirect3DSurface9_UnlockRect(dst_surface); + } + else /* Stretching or format conversion. */ + { + if (((srcformatdesc->type != FORMAT_ARGB) && (srcformatdesc->type != FORMAT_INDEX)) || + (destformatdesc->type != FORMAT_ARGB)) + { + FIXME("Format conversion missing %#x -> %#x\n", src_format, surfdesc.Format); + return E_NOTIMPL; + } + + if (FAILED(IDirect3DSurface9_LockRect(dst_surface, &lockrect, dst_rect, 0))) + return D3DXERR_INVALIDDATA; + + if ((filter & 0xf) == D3DX_FILTER_NONE) + { + convert_argb_pixels(src_memory, src_pitch, 0, &src_size, srcformatdesc, + lockrect.pBits, lockrect.Pitch, 0, &dst_size, destformatdesc, color_key, src_palette); + } + else /* if ((filter & 0xf) == D3DX_FILTER_POINT) */ + { + if ((filter & 0xf) != D3DX_FILTER_POINT) + FIXME("Unhandled filter %#x.\n", filter); + + /* Always apply a point filter until D3DX_FILTER_LINEAR, + * D3DX_FILTER_TRIANGLE and D3DX_FILTER_BOX are implemented. */ + point_filter_argb_pixels(src_memory, src_pitch, 0, &src_size, srcformatdesc, + lockrect.pBits, lockrect.Pitch, 0, &dst_size, destformatdesc, color_key, src_palette); + } + + IDirect3DSurface9_UnlockRect(dst_surface); + } - IDirect3DSurface9_UnlockRect(pDestSurface); return D3D_OK; } @@ -507,35 +1847,308 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(LPDIRECT3DSURFACE9 pDestSurface, * D3DXERR_INVALIDDATA, if one of the surfaces is not lockable * */ -HRESULT WINAPI D3DXLoadSurfaceFromSurface(LPDIRECT3DSURFACE9 pDestSurface, - CONST PALETTEENTRY *pDestPalette, - CONST RECT *pDestRect, - LPDIRECT3DSURFACE9 pSrcSurface, - CONST PALETTEENTRY *pSrcPalette, - CONST RECT *pSrcRect, - DWORD dwFilter, - D3DCOLOR Colorkey) +HRESULT WINAPI D3DXLoadSurfaceFromSurface(IDirect3DSurface9 *dst_surface, + const PALETTEENTRY *dst_palette, const RECT *dst_rect, IDirect3DSurface9 *src_surface, + const PALETTEENTRY *src_palette, const RECT *src_rect, DWORD filter, D3DCOLOR color_key) { RECT rect; D3DLOCKED_RECT lock; D3DSURFACE_DESC SrcDesc; HRESULT hr; - TRACE("(void): relay\n"); - if( !pDestSurface || !pSrcSurface ) return D3DERR_INVALIDCALL; + TRACE("dst_surface %p, dst_palette %p, dst_rect %s, src_surface %p, " + "src_palette %p, src_rect %s, filter %#x, color_key 0x%08x.\n", + dst_surface, dst_palette, wine_dbgstr_rect(dst_rect), src_surface, + src_palette, wine_dbgstr_rect(src_rect), filter, color_key); - IDirect3DSurface9_GetDesc(pSrcSurface, &SrcDesc); + if (!dst_surface || !src_surface) + return D3DERR_INVALIDCALL; - if( !pSrcRect ) SetRect(&rect, 0, 0, SrcDesc.Width, SrcDesc.Height); - else rect = *pSrcRect; + IDirect3DSurface9_GetDesc(src_surface, &SrcDesc); - hr = IDirect3DSurface9_LockRect(pSrcSurface, &lock, NULL, D3DLOCK_READONLY); - if(FAILED(hr)) return D3DXERR_INVALIDDATA; + if (!src_rect) + SetRect(&rect, 0, 0, SrcDesc.Width, SrcDesc.Height); + else + rect = *src_rect; - hr = D3DXLoadSurfaceFromMemory(pDestSurface, pDestPalette, pDestRect, - lock.pBits, SrcDesc.Format, lock.Pitch, - pSrcPalette, &rect, dwFilter, Colorkey); + if (FAILED(IDirect3DSurface9_LockRect(src_surface, &lock, NULL, D3DLOCK_READONLY))) + return D3DXERR_INVALIDDATA; + + hr = D3DXLoadSurfaceFromMemory(dst_surface, dst_palette, dst_rect, + lock.pBits, SrcDesc.Format, lock.Pitch, src_palette, &rect, filter, color_key); + + IDirect3DSurface9_UnlockRect(src_surface); + + return hr; +} + + +HRESULT WINAPI D3DXSaveSurfaceToFileA(const char *dst_filename, D3DXIMAGE_FILEFORMAT file_format, + IDirect3DSurface9 *src_surface, const PALETTEENTRY *src_palette, const RECT *src_rect) +{ + int len; + WCHAR *filename; + HRESULT hr; + ID3DXBuffer *buffer; + + TRACE("(%s, %#x, %p, %p, %s): relay\n", + wine_dbgstr_a(dst_filename), file_format, src_surface, src_palette, wine_dbgstr_rect(src_rect)); + + if (!dst_filename) return D3DERR_INVALIDCALL; + + len = MultiByteToWideChar(CP_ACP, 0, dst_filename, -1, NULL, 0); + filename = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (!filename) return E_OUTOFMEMORY; + MultiByteToWideChar(CP_ACP, 0, dst_filename, -1, filename, len); + + hr = D3DXSaveSurfaceToFileInMemory(&buffer, file_format, src_surface, src_palette, src_rect); + if (SUCCEEDED(hr)) + { + hr = write_buffer_to_file(filename, buffer); + ID3DXBuffer_Release(buffer); + } + + HeapFree(GetProcessHeap(), 0, filename); + return hr; +} + +HRESULT WINAPI D3DXSaveSurfaceToFileW(const WCHAR *dst_filename, D3DXIMAGE_FILEFORMAT file_format, + IDirect3DSurface9 *src_surface, const PALETTEENTRY *src_palette, const RECT *src_rect) +{ + HRESULT hr; + ID3DXBuffer *buffer; + + TRACE("(%s, %#x, %p, %p, %s): relay\n", + wine_dbgstr_w(dst_filename), file_format, src_surface, src_palette, wine_dbgstr_rect(src_rect)); + + if (!dst_filename) return D3DERR_INVALIDCALL; + + hr = D3DXSaveSurfaceToFileInMemory(&buffer, file_format, src_surface, src_palette, src_rect); + if (SUCCEEDED(hr)) + { + hr = write_buffer_to_file(dst_filename, buffer); + ID3DXBuffer_Release(buffer); + } + + return hr; +} + +HRESULT WINAPI D3DXSaveSurfaceToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE_FILEFORMAT file_format, + IDirect3DSurface9 *src_surface, const PALETTEENTRY *src_palette, const RECT *src_rect) +{ + IWICBitmapEncoder *encoder = NULL; + IWICBitmapFrameEncode *frame = NULL; + IPropertyBag2 *encoder_options = NULL; + IStream *stream = NULL; + HRESULT hr; + HRESULT initresult; + const CLSID *encoder_clsid; + const GUID *pixel_format_guid; + WICPixelFormatGUID wic_pixel_format; + D3DFORMAT d3d_pixel_format; + D3DSURFACE_DESC src_surface_desc; + D3DLOCKED_RECT locked_rect; + int width, height; + STATSTG stream_stats; + HGLOBAL stream_hglobal; + ID3DXBuffer *buffer; + DWORD size; + + TRACE("(%p, %#x, %p, %p, %s)\n", + dst_buffer, file_format, src_surface, src_palette, wine_dbgstr_rect(src_rect)); + + if (!dst_buffer || !src_surface) return D3DERR_INVALIDCALL; + + if (src_palette) + { + FIXME("Saving surfaces with palettized pixel formats not implemented yet\n"); + return D3DERR_INVALIDCALL; + } + + switch (file_format) + { + case D3DXIFF_BMP: + case D3DXIFF_DIB: + encoder_clsid = &CLSID_WICBmpEncoder; + break; + case D3DXIFF_PNG: + encoder_clsid = &CLSID_WICPngEncoder; + break; + case D3DXIFF_JPG: + encoder_clsid = &CLSID_WICJpegEncoder; + break; + case D3DXIFF_DDS: + return save_dds_surface_to_memory(dst_buffer, src_surface, src_rect); + case D3DXIFF_HDR: + case D3DXIFF_PFM: + case D3DXIFF_TGA: + case D3DXIFF_PPM: + FIXME("File format %#x is not supported yet\n", file_format); + return E_NOTIMPL; + default: + return D3DERR_INVALIDCALL; + } + + IDirect3DSurface9_GetDesc(src_surface, &src_surface_desc); + if (src_rect) + { + if (src_rect->left == src_rect->right || src_rect->top == src_rect->bottom) + { + WARN("Invalid rectangle with 0 area\n"); + return D3DXCreateBuffer(64, dst_buffer); + } + if (src_rect->left < 0 || src_rect->top < 0) + return D3DERR_INVALIDCALL; + if (src_rect->left > src_rect->right || src_rect->top > src_rect->bottom) + return D3DERR_INVALIDCALL; + if (src_rect->right > src_surface_desc.Width || src_rect->bottom > src_surface_desc.Height) + return D3DERR_INVALIDCALL; + + width = src_rect->right - src_rect->left; + height = src_rect->bottom - src_rect->top; + } + else + { + width = src_surface_desc.Width; + height = src_surface_desc.Height; + } + + initresult = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + + hr = CoCreateInstance(encoder_clsid, NULL, CLSCTX_INPROC_SERVER, + &IID_IWICBitmapEncoder, (void **)&encoder); + if (FAILED(hr)) goto cleanup_err; + + hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); + if (FAILED(hr)) goto cleanup_err; + + hr = IWICBitmapEncoder_Initialize(encoder, stream, WICBitmapEncoderNoCache); + if (FAILED(hr)) goto cleanup_err; + + hr = IWICBitmapEncoder_CreateNewFrame(encoder, &frame, &encoder_options); + if (FAILED(hr)) goto cleanup_err; + + hr = IWICBitmapFrameEncode_Initialize(frame, encoder_options); + if (FAILED(hr)) goto cleanup_err; + + hr = IWICBitmapFrameEncode_SetSize(frame, width, height); + if (FAILED(hr)) goto cleanup_err; + + pixel_format_guid = d3dformat_to_wic_guid(src_surface_desc.Format); + if (!pixel_format_guid) + { + FIXME("Pixel format %#x is not supported yet\n", src_surface_desc.Format); + hr = E_NOTIMPL; + goto cleanup; + } + + memcpy(&wic_pixel_format, pixel_format_guid, sizeof(GUID)); + hr = IWICBitmapFrameEncode_SetPixelFormat(frame, &wic_pixel_format); + d3d_pixel_format = wic_guid_to_d3dformat(&wic_pixel_format); + if (SUCCEEDED(hr) && d3d_pixel_format != D3DFMT_UNKNOWN) + { + TRACE("Using pixel format %s %#x\n", debugstr_guid(&wic_pixel_format), d3d_pixel_format); + + if (src_surface_desc.Format == d3d_pixel_format) /* Simple copy */ + { + hr = IDirect3DSurface9_LockRect(src_surface, &locked_rect, src_rect, D3DLOCK_READONLY); + if (SUCCEEDED(hr)) + { + IWICBitmapFrameEncode_WritePixels(frame, height, + locked_rect.Pitch, height * locked_rect.Pitch, locked_rect.pBits); + IDirect3DSurface9_UnlockRect(src_surface); + } + } + else /* Pixel format conversion */ + { + const struct pixel_format_desc *src_format_desc, *dst_format_desc; + struct volume size; + DWORD dst_pitch; + void *dst_data; + + src_format_desc = get_format_info(src_surface_desc.Format); + dst_format_desc = get_format_info(d3d_pixel_format); + if (src_format_desc->type != FORMAT_ARGB || dst_format_desc->type != FORMAT_ARGB) + { + FIXME("Unsupported pixel format conversion %#x -> %#x\n", + src_surface_desc.Format, d3d_pixel_format); + hr = E_NOTIMPL; + goto cleanup; + } + + size.width = width; + size.height = height; + size.depth = 1; + dst_pitch = width * dst_format_desc->bytes_per_pixel; + dst_data = HeapAlloc(GetProcessHeap(), 0, dst_pitch * height); + if (!dst_data) + { + hr = E_OUTOFMEMORY; + goto cleanup; + } + + hr = IDirect3DSurface9_LockRect(src_surface, &locked_rect, src_rect, D3DLOCK_READONLY); + if (SUCCEEDED(hr)) + { + convert_argb_pixels(locked_rect.pBits, locked_rect.Pitch, 0, &size, src_format_desc, + dst_data, dst_pitch, 0, &size, dst_format_desc, 0, NULL); + IDirect3DSurface9_UnlockRect(src_surface); + } + + IWICBitmapFrameEncode_WritePixels(frame, height, dst_pitch, dst_pitch * height, dst_data); + HeapFree(GetProcessHeap(), 0, dst_data); + } + + hr = IWICBitmapFrameEncode_Commit(frame); + if (SUCCEEDED(hr)) hr = IWICBitmapEncoder_Commit(encoder); + } + else WARN("Unsupported pixel format %#x\n", src_surface_desc.Format); + + /* copy data from stream to ID3DXBuffer */ + hr = IStream_Stat(stream, &stream_stats, STATFLAG_NONAME); + if (FAILED(hr)) goto cleanup_err; + + if (stream_stats.cbSize.u.HighPart != 0) + { + hr = D3DXERR_INVALIDDATA; + goto cleanup; + } + size = stream_stats.cbSize.u.LowPart; + + /* Remove BMP header for DIB */ + if (file_format == D3DXIFF_DIB) + size -= sizeof(BITMAPFILEHEADER); + + hr = D3DXCreateBuffer(size, &buffer); + if (FAILED(hr)) goto cleanup; + + hr = GetHGlobalFromStream(stream, &stream_hglobal); + if (SUCCEEDED(hr)) + { + void *buffer_pointer = ID3DXBuffer_GetBufferPointer(buffer); + void *stream_data = GlobalLock(stream_hglobal); + /* Remove BMP header for DIB */ + if (file_format == D3DXIFF_DIB) + stream_data = (void*)((BYTE*)stream_data + sizeof(BITMAPFILEHEADER)); + memcpy(buffer_pointer, stream_data, size); + GlobalUnlock(stream_hglobal); + *dst_buffer = buffer; + } + else ID3DXBuffer_Release(buffer); + +cleanup_err: + if (FAILED(hr) && hr != E_OUTOFMEMORY) + hr = D3DERR_INVALIDCALL; + +cleanup: + if (stream) IStream_Release(stream); + + if (frame) IWICBitmapFrameEncode_Release(frame); + if (encoder_options) IPropertyBag2_Release(encoder_options); + + if (encoder) IWICBitmapEncoder_Release(encoder); + + if (SUCCEEDED(initresult)) CoUninitialize(); - IDirect3DSurface9_UnlockRect(pSrcSurface); return hr; } diff --git a/dll/directx/wine/d3dx9_36/texture.c b/dll/directx/wine/d3dx9_36/texture.c index ea6882424f1..0b0b106a4d8 100644 --- a/dll/directx/wine/d3dx9_36/texture.c +++ b/dll/directx/wine/d3dx9_36/texture.c @@ -1,5 +1,8 @@ /* + * Copyright 2009 Tony Wasserka * Copyright 2010 Christian Costa + * Copyright 2010 Owen Rudge for CodeWeavers + * Copyright 2010 Matteo Bruni for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -21,17 +24,1806 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dx); -HRESULT WINAPI D3DXCreateTexture(LPDIRECT3DDEVICE9 pDevice, - UINT width, - UINT height, - UINT miplevels, - DWORD usage, - D3DFORMAT format, - D3DPOOL pool, - LPDIRECT3DTEXTURE9 *ppTexture) +/* Returns TRUE if num is a power of 2, FALSE if not, or if 0 */ +static BOOL is_pow2(UINT num) { - FIXME("(%p, %d, %d, %d, %x, %x, %x, %p): semi-stub\n", pDevice, width, height, miplevels, usage, format, - pool, ppTexture); - - return IDirect3DDevice9_CreateTexture(pDevice, width, height, miplevels, usage, format, pool, ppTexture, NULL); + return !(num & (num - 1)); +} + +/* Returns the smallest power of 2 which is greater than or equal to num */ +static UINT make_pow2(UINT num) +{ + UINT result = 1; + + /* In the unlikely event somebody passes a large value, make sure we don't enter an infinite loop */ + if (num >= 0x80000000) + return 0x80000000; + + while (result < num) + result <<= 1; + + return result; +} + +static HRESULT get_surface(D3DRESOURCETYPE type, struct IDirect3DBaseTexture9 *tex, + int face, UINT level, struct IDirect3DSurface9 **surf) +{ + switch (type) + { + case D3DRTYPE_TEXTURE: + return IDirect3DTexture9_GetSurfaceLevel((IDirect3DTexture9*) tex, level, surf); + case D3DRTYPE_CUBETEXTURE: + return IDirect3DCubeTexture9_GetCubeMapSurface((IDirect3DCubeTexture9*) tex, face, level, surf); + default: + ERR("Unexpected texture type\n"); + return E_NOTIMPL; + } +} + +HRESULT WINAPI D3DXFilterTexture(IDirect3DBaseTexture9 *texture, + const PALETTEENTRY *palette, + UINT srclevel, + DWORD filter) +{ + UINT level; + HRESULT hr; + D3DRESOURCETYPE type; + + TRACE("(%p, %p, %u, %#x)\n", texture, palette, srclevel, filter); + + if (!texture) + return D3DERR_INVALIDCALL; + + if ((filter & 0xFFFF) > D3DX_FILTER_BOX && filter != D3DX_DEFAULT) + return D3DERR_INVALIDCALL; + + if (srclevel == D3DX_DEFAULT) + srclevel = 0; + else if (srclevel >= IDirect3DBaseTexture9_GetLevelCount(texture)) + return D3DERR_INVALIDCALL; + + switch (type = IDirect3DBaseTexture9_GetType(texture)) + { + case D3DRTYPE_TEXTURE: + case D3DRTYPE_CUBETEXTURE: + { + IDirect3DSurface9 *topsurf, *mipsurf; + D3DSURFACE_DESC desc; + int i, numfaces; + + if (type == D3DRTYPE_TEXTURE) + { + numfaces = 1; + IDirect3DTexture9_GetLevelDesc((IDirect3DTexture9*) texture, srclevel, &desc); + } + else + { + numfaces = 6; + IDirect3DCubeTexture9_GetLevelDesc((IDirect3DTexture9*) texture, srclevel, &desc); + } + + if (filter == D3DX_DEFAULT) + { + if (is_pow2(desc.Width) && is_pow2(desc.Height)) + filter = D3DX_FILTER_BOX; + else + filter = D3DX_FILTER_BOX | D3DX_FILTER_DITHER; + } + + for (i = 0; i < numfaces; i++) + { + level = srclevel + 1; + hr = get_surface(type, texture, i, srclevel, &topsurf); + + if (FAILED(hr)) + return D3DERR_INVALIDCALL; + + while (get_surface(type, texture, i, level, &mipsurf) == D3D_OK) + { + hr = D3DXLoadSurfaceFromSurface(mipsurf, palette, NULL, topsurf, palette, NULL, filter, 0); + IDirect3DSurface9_Release(topsurf); + topsurf = mipsurf; + + if (FAILED(hr)) + break; + + level++; + } + + IDirect3DSurface9_Release(topsurf); + if (FAILED(hr)) + return hr; + } + + return D3D_OK; + } + + case D3DRTYPE_VOLUMETEXTURE: + { + D3DVOLUME_DESC desc; + int level, level_count; + IDirect3DVolume9 *top_volume, *mip_volume; + IDirect3DVolumeTexture9 *volume_texture = (IDirect3DVolumeTexture9*) texture; + + IDirect3DVolumeTexture9_GetLevelDesc(volume_texture, srclevel, &desc); + + if (filter == D3DX_DEFAULT) + { + if (is_pow2(desc.Width) && is_pow2(desc.Height) && is_pow2(desc.Depth)) + filter = D3DX_FILTER_BOX; + else + filter = D3DX_FILTER_BOX | D3DX_FILTER_DITHER; + } + + hr = IDirect3DVolumeTexture9_GetVolumeLevel(volume_texture, srclevel, &top_volume); + if (FAILED(hr)) + return hr; + + level_count = IDirect3DVolumeTexture9_GetLevelCount(volume_texture); + for (level = srclevel + 1; level < level_count; level++) + { + IDirect3DVolumeTexture9_GetVolumeLevel(volume_texture, level, &mip_volume); + hr = D3DXLoadVolumeFromVolume(mip_volume, palette, NULL, top_volume, palette, NULL, filter, 0); + IDirect3DVolume9_Release(top_volume); + top_volume = mip_volume; + + if (FAILED(hr)) + break; + } + + IDirect3DVolume9_Release(top_volume); + if (FAILED(hr)) + return hr; + + return D3D_OK; + } + + default: + return D3DERR_INVALIDCALL; + } +} + +HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UINT *width, UINT *height, + UINT *miplevels, DWORD usage, D3DFORMAT *format, D3DPOOL pool) +{ + UINT w = (width && *width) ? *width : 1; + UINT h = (height && *height) ? *height : 1; + D3DCAPS9 caps; + D3DDEVICE_CREATION_PARAMETERS params; + IDirect3D9 *d3d = NULL; + D3DDISPLAYMODE mode; + HRESULT hr; + D3DFORMAT usedformat = D3DFMT_UNKNOWN; + + TRACE("(%p, %p, %p, %p, %u, %p, %u)\n", device, width, height, miplevels, usage, format, pool); + + if (!device) + return D3DERR_INVALIDCALL; + + /* usage */ + if (usage == D3DX_DEFAULT) + usage = 0; + if (usage & (D3DUSAGE_WRITEONLY | D3DUSAGE_DONOTCLIP | D3DUSAGE_POINTS | D3DUSAGE_RTPATCHES | D3DUSAGE_NPATCHES)) + return D3DERR_INVALIDCALL; + + /* pool */ + if ((pool != D3DPOOL_DEFAULT) && (pool != D3DPOOL_MANAGED) && (pool != D3DPOOL_SYSTEMMEM) && (pool != D3DPOOL_SCRATCH)) + return D3DERR_INVALIDCALL; + + /* width and height */ + if (FAILED(IDirect3DDevice9_GetDeviceCaps(device, &caps))) + return D3DERR_INVALIDCALL; + + /* 256 x 256 default width/height */ + if ((w == D3DX_DEFAULT) && (h == D3DX_DEFAULT)) + w = h = 256; + else if (w == D3DX_DEFAULT) + w = (height ? h : 256); + else if (h == D3DX_DEFAULT) + h = (width ? w : 256); + + /* ensure width/height is power of 2 */ + if ((caps.TextureCaps & D3DPTEXTURECAPS_POW2) && (!is_pow2(w))) + w = make_pow2(w); + + if (w > caps.MaxTextureWidth) + w = caps.MaxTextureWidth; + + if ((caps.TextureCaps & D3DPTEXTURECAPS_POW2) && (!is_pow2(h))) + h = make_pow2(h); + + if (h > caps.MaxTextureHeight) + h = caps.MaxTextureHeight; + + /* texture must be square? */ + if (caps.TextureCaps & D3DPTEXTURECAPS_SQUAREONLY) + { + if (w > h) + h = w; + else + w = h; + } + + if (width) + *width = w; + + if (height) + *height = h; + + /* miplevels */ + if (miplevels && (usage & D3DUSAGE_AUTOGENMIPMAP)) + { + if (*miplevels > 1) + *miplevels = 0; + } + else if (miplevels) + { + UINT max_mipmaps = 1; + + if (!width && !height) + max_mipmaps = 9; /* number of mipmaps in a 256x256 texture */ + else + { + UINT max_dimen = max(w, h); + + while (max_dimen > 1) + { + max_dimen >>= 1; + max_mipmaps++; + } + } + + if (*miplevels == 0 || *miplevels > max_mipmaps) + *miplevels = max_mipmaps; + } + + /* format */ + if (format) + { + TRACE("Requested format %x\n", *format); + usedformat = *format; + } + + hr = IDirect3DDevice9_GetDirect3D(device, &d3d); + + if (FAILED(hr)) + goto cleanup; + + hr = IDirect3DDevice9_GetCreationParameters(device, ¶ms); + + if (FAILED(hr)) + goto cleanup; + + hr = IDirect3DDevice9_GetDisplayMode(device, 0, &mode); + + if (FAILED(hr)) + goto cleanup; + + if ((usedformat == D3DFMT_UNKNOWN) || (usedformat == D3DX_DEFAULT)) + usedformat = D3DFMT_A8R8G8B8; + + hr = IDirect3D9_CheckDeviceFormat(d3d, params.AdapterOrdinal, params.DeviceType, mode.Format, + usage, D3DRTYPE_TEXTURE, usedformat); + + if (FAILED(hr)) + { + /* Heuristic to choose the fallback format */ + const struct pixel_format_desc *fmt = get_format_info(usedformat); + BOOL allow_24bits; + int bestscore = INT_MIN, i = 0, j; + unsigned int channels; + const struct pixel_format_desc *curfmt; + + if (!fmt) + { + FIXME("Pixel format %x not handled\n", usedformat); + goto cleanup; + } + + allow_24bits = fmt->bytes_per_pixel == 3; + channels = (fmt->bits[0] ? 1 : 0) + (fmt->bits[1] ? 1 : 0) + + (fmt->bits[2] ? 1 : 0) + (fmt->bits[3] ? 1 : 0); + usedformat = D3DFMT_UNKNOWN; + + while ((curfmt = get_format_info_idx(i))) + { + unsigned int curchannels = (curfmt->bits[0] ? 1 : 0) + (curfmt->bits[1] ? 1 : 0) + + (curfmt->bits[2] ? 1 : 0) + (curfmt->bits[3] ? 1 : 0); + int score; + + i++; + + if (curchannels < channels) + continue; + if (curfmt->bytes_per_pixel == 3 && !allow_24bits) + continue; + + hr = IDirect3D9_CheckDeviceFormat(d3d, params.AdapterOrdinal, params.DeviceType, + mode.Format, usage, D3DRTYPE_TEXTURE, curfmt->format); + if (FAILED(hr)) + continue; + + /* This format can be used, let's evaluate it. + Weights chosen quite arbitrarily... */ + score = 16 - 4 * (curchannels - channels); + + for (j = 0; j < 4; j++) + { + int diff = curfmt->bits[j] - fmt->bits[j]; + score += 16 - (diff < 0 ? -diff * 4 : diff); + } + + if (score > bestscore) + { + bestscore = score; + usedformat = curfmt->format; + } + } + hr = D3D_OK; + } + +cleanup: + + if (d3d) + IDirect3D9_Release(d3d); + + if (FAILED(hr)) + return hr; + + if (usedformat == D3DFMT_UNKNOWN) + { + WARN("Couldn't find a suitable pixel format\n"); + return D3DERR_NOTAVAILABLE; + } + + TRACE("Format chosen: %x\n", usedformat); + if (format) + *format = usedformat; + + return D3D_OK; +} + +HRESULT WINAPI D3DXCheckCubeTextureRequirements(struct IDirect3DDevice9 *device, UINT *size, + UINT *miplevels, DWORD usage, D3DFORMAT *format, D3DPOOL pool) +{ + D3DCAPS9 caps; + UINT s = (size && *size) ? *size : 256; + HRESULT hr; + + TRACE("(%p, %p, %p, %u, %p, %u)\n", device, size, miplevels, usage, format, pool); + + if (s == D3DX_DEFAULT) + s = 256; + + if (!device || FAILED(IDirect3DDevice9_GetDeviceCaps(device, &caps))) + return D3DERR_INVALIDCALL; + + if (!(caps.TextureCaps & D3DPTEXTURECAPS_CUBEMAP)) + return D3DERR_NOTAVAILABLE; + + /* ensure width/height is power of 2 */ + if ((caps.TextureCaps & D3DPTEXTURECAPS_CUBEMAP_POW2) && (!is_pow2(s))) + s = make_pow2(s); + + hr = D3DXCheckTextureRequirements(device, &s, &s, miplevels, usage, format, pool); + + if (!(caps.TextureCaps & D3DPTEXTURECAPS_MIPCUBEMAP)) + { + if(miplevels) + *miplevels = 1; + } + + if (size) + *size = s; + + return hr; +} + +HRESULT WINAPI D3DXCheckVolumeTextureRequirements(struct IDirect3DDevice9 *device, UINT *width, UINT *height, + UINT *depth, UINT *miplevels, DWORD usage, D3DFORMAT *format, D3DPOOL pool) +{ + D3DCAPS9 caps; + UINT w = width ? *width : D3DX_DEFAULT; + UINT h = height ? *height : D3DX_DEFAULT; + UINT d = (depth && *depth) ? *depth : 1; + HRESULT hr; + + TRACE("(%p, %p, %p, %p, %p, %u, %p, %u)\n", device, width, height, depth, miplevels, + usage, format, pool); + + if (!device || FAILED(IDirect3DDevice9_GetDeviceCaps(device, &caps))) + return D3DERR_INVALIDCALL; + + if (!(caps.TextureCaps & D3DPTEXTURECAPS_VOLUMEMAP)) + return D3DERR_NOTAVAILABLE; + + hr = D3DXCheckTextureRequirements(device, &w, &h, NULL, usage, format, pool); + if (d == D3DX_DEFAULT) + d = 1; + + /* ensure width/height is power of 2 */ + if ((caps.TextureCaps & D3DPTEXTURECAPS_VOLUMEMAP_POW2) && + (!is_pow2(w) || !is_pow2(h) || !is_pow2(d))) + { + w = make_pow2(w); + h = make_pow2(h); + d = make_pow2(d); + } + + if (w > caps.MaxVolumeExtent) + w = caps.MaxVolumeExtent; + if (h > caps.MaxVolumeExtent) + h = caps.MaxVolumeExtent; + if (d > caps.MaxVolumeExtent) + d = caps.MaxVolumeExtent; + + if (miplevels) + { + if (!(caps.TextureCaps & D3DPTEXTURECAPS_MIPVOLUMEMAP)) + *miplevels = 1; + else if ((usage & D3DUSAGE_AUTOGENMIPMAP)) + { + if (*miplevels > 1) + *miplevels = 0; + } + else + { + UINT max_mipmaps = 1; + UINT max_dimen = max(max(w, h), d); + + while (max_dimen > 1) + { + max_dimen >>= 1; + max_mipmaps++; + } + + if (*miplevels == 0 || *miplevels > max_mipmaps) + *miplevels = max_mipmaps; + } + } + + if (width) + *width = w; + if (height) + *height = h; + if (depth) + *depth = d; + + return hr; +} + +HRESULT WINAPI D3DXCreateTexture(struct IDirect3DDevice9 *device, UINT width, UINT height, + UINT miplevels, DWORD usage, D3DFORMAT format, D3DPOOL pool, struct IDirect3DTexture9 **texture) +{ + HRESULT hr; + + TRACE("device %p, width %u, height %u, miplevels %u, usage %#x, format %#x, pool %#x, texture %p.\n", + device, width, height, miplevels, usage, format, pool, texture); + + if (!device || !texture) + return D3DERR_INVALIDCALL; + + if (FAILED(hr = D3DXCheckTextureRequirements(device, &width, &height, &miplevels, usage, &format, pool))) + return hr; + + return IDirect3DDevice9_CreateTexture(device, width, height, miplevels, usage, format, pool, texture, NULL); +} + +HRESULT WINAPI D3DXCreateTextureFromFileInMemoryEx(struct IDirect3DDevice9 *device, const void *srcdata, + UINT srcdatasize, UINT width, UINT height, UINT miplevels, DWORD usage, D3DFORMAT format, + D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, + PALETTEENTRY *palette, struct IDirect3DTexture9 **texture) +{ + IDirect3DTexture9 **texptr; + IDirect3DTexture9 *buftex; + IDirect3DSurface9 *surface; + BOOL file_width = FALSE, file_height = FALSE; + BOOL file_format = FALSE, file_miplevels = FALSE; + BOOL dynamic_texture; + D3DXIMAGE_INFO imginfo; + UINT loaded_miplevels; + D3DCAPS9 caps; + HRESULT hr; + + TRACE("(%p, %p, %u, %u, %u, %u, %x, %x, %x, %u, %u, %x, %p, %p, %p)\n", device, srcdata, srcdatasize, width, + height, miplevels, usage, format, pool, filter, mipfilter, colorkey, srcinfo, palette, texture); + + /* check for invalid parameters */ + if (!device || !texture || !srcdata || !srcdatasize) + return D3DERR_INVALIDCALL; + + hr = D3DXGetImageInfoFromFileInMemory(srcdata, srcdatasize, &imginfo); + + if (FAILED(hr)) + { + *texture = NULL; + return hr; + } + + /* handle default values */ + if (width == 0 || width == D3DX_DEFAULT_NONPOW2) + width = imginfo.Width; + + if (height == 0 || height == D3DX_DEFAULT_NONPOW2) + height = imginfo.Height; + + if (width == D3DX_DEFAULT) + width = make_pow2(imginfo.Width); + + if (height == D3DX_DEFAULT) + height = make_pow2(imginfo.Height); + + if (format == D3DFMT_UNKNOWN || format == D3DX_DEFAULT) + format = imginfo.Format; + + if (width == D3DX_FROM_FILE) + { + file_width = TRUE; + width = imginfo.Width; + } + + if (height == D3DX_FROM_FILE) + { + file_height = TRUE; + height = imginfo.Height; + } + + if (format == D3DFMT_FROM_FILE) + { + file_format = TRUE; + format = imginfo.Format; + } + + if (miplevels == D3DX_FROM_FILE) + { + file_miplevels = TRUE; + miplevels = imginfo.MipLevels; + } + + /* fix texture creation parameters */ + hr = D3DXCheckTextureRequirements(device, &width, &height, &miplevels, usage, &format, pool); + + if (FAILED(hr)) + { + *texture = NULL; + return hr; + } + + if (imginfo.MipLevels < miplevels && (D3DFMT_DXT1 <= imginfo.Format && imginfo.Format <= D3DFMT_DXT5)) + { + FIXME("Generation of mipmaps for compressed pixel formats is not implemented yet\n"); + miplevels = imginfo.MipLevels; + } + + if (((file_width) && (width != imginfo.Width)) || + ((file_height) && (height != imginfo.Height)) || + ((file_format) && (format != imginfo.Format)) || + ((file_miplevels) && (miplevels != imginfo.MipLevels))) + { + return D3DERR_NOTAVAILABLE; + } + + if (FAILED(IDirect3DDevice9_GetDeviceCaps(device, &caps))) + return D3DERR_INVALIDCALL; + + /* Create the to-be-filled texture */ + dynamic_texture = (caps.Caps2 & D3DCAPS2_DYNAMICTEXTURES) && (usage & D3DUSAGE_DYNAMIC); + if (pool == D3DPOOL_DEFAULT && !dynamic_texture) + { + hr = D3DXCreateTexture(device, width, height, miplevels, usage, format, D3DPOOL_SYSTEMMEM, &buftex); + texptr = &buftex; + } + else + { + hr = D3DXCreateTexture(device, width, height, miplevels, usage, format, pool, texture); + texptr = texture; + } + + if (FAILED(hr)) + { + *texture = NULL; + return hr; + } + + /* Load the file */ + if (imginfo.ImageFileFormat != D3DXIFF_DDS) + { + IDirect3DTexture9_GetSurfaceLevel(*texptr, 0, &surface); + hr = D3DXLoadSurfaceFromFileInMemory(surface, palette, NULL, srcdata, srcdatasize, NULL, filter, colorkey, NULL); + IDirect3DSurface9_Release(surface); + } + else + { + hr = load_texture_from_dds(*texptr, srcdata, palette, filter, colorkey, &imginfo); + } + + if (FAILED(hr)) + { + IDirect3DTexture9_Release(*texptr); + *texture = NULL; + return hr; + } + + loaded_miplevels = min(IDirect3DTexture9_GetLevelCount(*texptr), imginfo.MipLevels); + hr = D3DXFilterTexture((IDirect3DBaseTexture9*) *texptr, palette, loaded_miplevels - 1, mipfilter); + + if (FAILED(hr)) + { + IDirect3DTexture9_Release(*texptr); + *texture = NULL; + return hr; + } + + /* Move the data to the actual texture if necessary */ + if (texptr == &buftex) + { + hr = D3DXCreateTexture(device, width, height, miplevels, usage, format, pool, texture); + + if (FAILED(hr)) + { + IDirect3DTexture9_Release(buftex); + *texture = NULL; + return hr; + } + + IDirect3DDevice9_UpdateTexture(device, (IDirect3DBaseTexture9*)buftex, (IDirect3DBaseTexture9*)(*texture)); + IDirect3DTexture9_Release(buftex); + } + + if (srcinfo) + *srcinfo = imginfo; + + return D3D_OK; +} + +HRESULT WINAPI D3DXCreateTextureFromFileInMemory(struct IDirect3DDevice9 *device, + const void *srcdata, UINT srcdatasize, struct IDirect3DTexture9 **texture) +{ + TRACE("(%p, %p, %d, %p)\n", device, srcdata, srcdatasize, texture); + + return D3DXCreateTextureFromFileInMemoryEx(device, srcdata, srcdatasize, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, + D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, texture); +} + +HRESULT WINAPI D3DXCreateTextureFromFileExW(struct IDirect3DDevice9 *device, const WCHAR *srcfile, + UINT width, UINT height, UINT miplevels, DWORD usage, D3DFORMAT format, + D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, + PALETTEENTRY *palette, struct IDirect3DTexture9 **texture) +{ + HRESULT hr; + DWORD size; + LPVOID buffer; + + TRACE("(%p, %s, %u, %u, %u, %x, %x, %x, %u, %u, %x, %p, %p, %p): relay\n", + device, debugstr_w(srcfile), width, height, miplevels, usage, format, pool, filter, + mipfilter, colorkey, srcinfo, palette, texture); + + if (!srcfile) + return D3DERR_INVALIDCALL; + + hr = map_view_of_file(srcfile, &buffer, &size); + if (FAILED(hr)) + return D3DXERR_INVALIDDATA; + + hr = D3DXCreateTextureFromFileInMemoryEx(device, buffer, size, width, height, miplevels, usage, format, pool, + filter, mipfilter, colorkey, srcinfo, palette, texture); + + UnmapViewOfFile(buffer); + + return hr; +} + +HRESULT WINAPI D3DXCreateTextureFromFileExA(struct IDirect3DDevice9 *device, const char *srcfile, + UINT width, UINT height, UINT miplevels, DWORD usage, D3DFORMAT format, + D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, + PALETTEENTRY *palette, struct IDirect3DTexture9 **texture) +{ + LPWSTR widename; + HRESULT hr; + DWORD len; + + TRACE("(%p, %s, %u, %u, %u, %x, %x, %x, %u, %u, %x, %p, %p, %p): relay\n", + device, debugstr_a(srcfile), width, height, miplevels, usage, format, pool, filter, + mipfilter, colorkey, srcinfo, palette, texture); + + if (!device || !srcfile || !texture) + return D3DERR_INVALIDCALL; + + len = MultiByteToWideChar(CP_ACP, 0, srcfile, -1, NULL, 0); + widename = HeapAlloc(GetProcessHeap(), 0, len * sizeof(*widename)); + MultiByteToWideChar(CP_ACP, 0, srcfile, -1, widename, len); + + hr = D3DXCreateTextureFromFileExW(device, widename, width, height, miplevels, + usage, format, pool, filter, mipfilter, + colorkey, srcinfo, palette, texture); + + HeapFree(GetProcessHeap(), 0, widename); + return hr; +} + +HRESULT WINAPI D3DXCreateTextureFromFileA(struct IDirect3DDevice9 *device, + const char *srcfile, struct IDirect3DTexture9 **texture) +{ + TRACE("(%p, %s, %p)\n", device, debugstr_a(srcfile), texture); + + return D3DXCreateTextureFromFileExA(device, srcfile, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, + D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, texture); +} + +HRESULT WINAPI D3DXCreateTextureFromFileW(struct IDirect3DDevice9 *device, + const WCHAR *srcfile, struct IDirect3DTexture9 **texture) +{ + TRACE("(%p, %s, %p)\n", device, debugstr_w(srcfile), texture); + + return D3DXCreateTextureFromFileExW(device, srcfile, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, + D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, texture); +} + + +HRESULT WINAPI D3DXCreateTextureFromResourceA(struct IDirect3DDevice9 *device, + HMODULE srcmodule, const char *resource, struct IDirect3DTexture9 **texture) +{ + TRACE("(%p, %s): relay\n", srcmodule, debugstr_a(resource)); + + return D3DXCreateTextureFromResourceExA(device, srcmodule, resource, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, + D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, texture); +} + +HRESULT WINAPI D3DXCreateTextureFromResourceW(struct IDirect3DDevice9 *device, + HMODULE srcmodule, const WCHAR *resource, struct IDirect3DTexture9 **texture) +{ + TRACE("(%p, %s): relay\n", srcmodule, debugstr_w(resource)); + + return D3DXCreateTextureFromResourceExW(device, srcmodule, resource, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, + D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, texture); +} + +HRESULT WINAPI D3DXCreateTextureFromResourceExA(struct IDirect3DDevice9 *device, HMODULE srcmodule, + const char *resource, UINT width, UINT height, UINT miplevels, DWORD usage, D3DFORMAT format, + D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, + PALETTEENTRY *palette, struct IDirect3DTexture9 **texture) +{ + HRSRC resinfo; + void *buffer; + DWORD size; + + TRACE("device %p, srcmodule %p, resource %s, width %u, height %u, miplevels %u, usage %#x, format %#x, " + "pool %#x, filter %#x, mipfilter %#x, colorkey 0x%08x, srcinfo %p, palette %p, texture %p.\n", + device, srcmodule, debugstr_a(resource), width, height, miplevels, usage, format, + pool, filter, mipfilter, colorkey, srcinfo, palette, texture); + + if (!device || !texture) + return D3DERR_INVALIDCALL; + + if (!(resinfo = FindResourceA(srcmodule, resource, (const char *)RT_RCDATA)) + /* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */ + && !(resinfo = FindResourceA(srcmodule, resource, (const char *)RT_BITMAP))) + return D3DXERR_INVALIDDATA; + + if (FAILED(load_resource_into_memory(srcmodule, resinfo, &buffer, &size))) + return D3DXERR_INVALIDDATA; + + return D3DXCreateTextureFromFileInMemoryEx(device, buffer, size, width, height, miplevels, + usage, format, pool, filter, mipfilter, colorkey, srcinfo, palette, texture); +} + +HRESULT WINAPI D3DXCreateTextureFromResourceExW(struct IDirect3DDevice9 *device, HMODULE srcmodule, + const WCHAR *resource, UINT width, UINT height, UINT miplevels, DWORD usage, D3DFORMAT format, + D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, + PALETTEENTRY *palette, struct IDirect3DTexture9 **texture) +{ + HRSRC resinfo; + void *buffer; + DWORD size; + + TRACE("device %p, srcmodule %p, resource %s, width %u, height %u, miplevels %u, usage %#x, format %#x, " + "pool %#x, filter %#x, mipfilter %#x, colorkey 0x%08x, srcinfo %p, palette %p, texture %p.\n", + device, srcmodule, debugstr_w(resource), width, height, miplevels, usage, format, + pool, filter, mipfilter, colorkey, srcinfo, palette, texture); + + if (!device || !texture) + return D3DERR_INVALIDCALL; + + if (!(resinfo = FindResourceW(srcmodule, resource, (const WCHAR *)RT_RCDATA)) + /* Try loading the resource as bitmap data (which is in DIB format D3DXIFF_DIB) */ + && !(resinfo = FindResourceW(srcmodule, resource, (const WCHAR *)RT_BITMAP))) + return D3DXERR_INVALIDDATA; + + if (FAILED(load_resource_into_memory(srcmodule, resinfo, &buffer, &size))) + return D3DXERR_INVALIDDATA; + + return D3DXCreateTextureFromFileInMemoryEx(device, buffer, size, width, height, miplevels, + usage, format, pool, filter, mipfilter, colorkey, srcinfo, palette, texture); +} + +HRESULT WINAPI D3DXCreateCubeTexture(struct IDirect3DDevice9 *device, UINT size, UINT miplevels, + DWORD usage, D3DFORMAT format, D3DPOOL pool, struct IDirect3DCubeTexture9 **texture) +{ + HRESULT hr; + + TRACE("(%p, %u, %u, %#x, %#x, %#x, %p)\n", device, size, miplevels, usage, format, + pool, texture); + + if (!device || !texture) + return D3DERR_INVALIDCALL; + + hr = D3DXCheckCubeTextureRequirements(device, &size, &miplevels, usage, &format, pool); + + if (FAILED(hr)) + { + TRACE("D3DXCheckCubeTextureRequirements failed\n"); + return hr; + } + + return IDirect3DDevice9_CreateCubeTexture(device, size, miplevels, usage, format, pool, texture, NULL); +} + +HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemory(struct IDirect3DDevice9 *device, + const void *data, UINT datasize, struct IDirect3DCubeTexture9 **texture) +{ + TRACE("(%p, %p, %u, %p)\n", device, data, datasize, texture); + + return D3DXCreateCubeTextureFromFileInMemoryEx(device, data, datasize, D3DX_DEFAULT, D3DX_DEFAULT, + 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, texture); +} + +HRESULT WINAPI D3DXCreateVolumeTexture(struct IDirect3DDevice9 *device, UINT width, UINT height, UINT depth, + UINT miplevels, DWORD usage, D3DFORMAT format, D3DPOOL pool, struct IDirect3DVolumeTexture9 **texture) +{ + HRESULT hr; + + TRACE("(%p, %u, %u, %u, %u, %#x, %#x, %#x, %p)\n", device, width, height, depth, + miplevels, usage, format, pool, texture); + + if (!device || !texture) + return D3DERR_INVALIDCALL; + + hr = D3DXCheckVolumeTextureRequirements(device, &width, &height, &depth, + &miplevels, usage, &format, pool); + + if (FAILED(hr)) + { + TRACE("D3DXCheckVolumeTextureRequirements failed\n"); + return hr; + } + + return IDirect3DDevice9_CreateVolumeTexture(device, width, height, depth, miplevels, + usage, format, pool, texture, NULL); +} + +HRESULT WINAPI D3DXCreateVolumeTextureFromFileA(IDirect3DDevice9 *device, + const char *filename, + IDirect3DVolumeTexture9 **volume_texture) +{ + int len; + HRESULT hr; + void *data; + DWORD data_size; + WCHAR *filenameW; + + TRACE("(%p, %s, %p): relay\n", + device, debugstr_a(filename), volume_texture); + + if (!filename) return D3DERR_INVALIDCALL; + + len = MultiByteToWideChar(CP_ACP, 0, filename, -1, NULL, 0); + filenameW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (!filenameW) return E_OUTOFMEMORY; + MultiByteToWideChar(CP_ACP, 0, filename, -1, filenameW, len); + + hr = map_view_of_file(filenameW, &data, &data_size); + HeapFree(GetProcessHeap(), 0, filenameW); + if (FAILED(hr)) return D3DXERR_INVALIDDATA; + + hr = D3DXCreateVolumeTextureFromFileInMemoryEx(device, data, data_size, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, + D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, volume_texture); + + UnmapViewOfFile(data); + return hr; +} + +HRESULT WINAPI D3DXCreateVolumeTextureFromFileW(IDirect3DDevice9 *device, + const WCHAR *filename, + IDirect3DVolumeTexture9 **volume_texture) +{ + HRESULT hr; + void *data; + DWORD data_size; + + TRACE("(%p, %s, %p): relay\n", + device, debugstr_w(filename), volume_texture); + + if (!filename) return D3DERR_INVALIDCALL; + + hr = map_view_of_file(filename, &data, &data_size); + if (FAILED(hr)) return D3DXERR_INVALIDDATA; + + hr = D3DXCreateVolumeTextureFromFileInMemoryEx(device, data, data_size, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, + D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, volume_texture); + + UnmapViewOfFile(data); + return hr; +} + +HRESULT WINAPI D3DXCreateVolumeTextureFromFileExA(IDirect3DDevice9 *device, + const char *filename, + UINT width, + UINT height, + UINT depth, + UINT mip_levels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mip_filter, + D3DCOLOR color_key, + D3DXIMAGE_INFO *src_info, + PALETTEENTRY *palette, + IDirect3DVolumeTexture9 **volume_texture) +{ + int len; + HRESULT hr; + WCHAR *filenameW; + void *data; + DWORD data_size; + + TRACE("(%p, %s, %u, %u, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p): relay\n", + device, debugstr_a(filename), width, height, depth, mip_levels, + usage, format, pool, filter, mip_filter, color_key, src_info, + palette, volume_texture); + + if (!filename) return D3DERR_INVALIDCALL; + + len = MultiByteToWideChar(CP_ACP, 0, filename, -1, NULL, 0); + filenameW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (!filenameW) return E_OUTOFMEMORY; + MultiByteToWideChar(CP_ACP, 0, filename, -1, filenameW, len); + + hr = map_view_of_file(filenameW, &data, &data_size); + HeapFree(GetProcessHeap(), 0, filenameW); + if (FAILED(hr)) return D3DXERR_INVALIDDATA; + + hr = D3DXCreateVolumeTextureFromFileInMemoryEx(device, data, data_size, width, height, depth, + mip_levels, usage, format, pool, filter, mip_filter, color_key, src_info, palette, + volume_texture); + + UnmapViewOfFile(data); + return hr; +} + +HRESULT WINAPI D3DXCreateVolumeTextureFromFileExW(IDirect3DDevice9 *device, + const WCHAR *filename, + UINT width, + UINT height, + UINT depth, + UINT mip_levels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mip_filter, + D3DCOLOR color_key, + D3DXIMAGE_INFO *src_info, + PALETTEENTRY *palette, + IDirect3DVolumeTexture9 **volume_texture) +{ + HRESULT hr; + void *data; + DWORD data_size; + + TRACE("(%p, %s, %u, %u, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p): relay\n", + device, debugstr_w(filename), width, height, depth, mip_levels, + usage, format, pool, filter, mip_filter, color_key, src_info, + palette, volume_texture); + + if (!filename) return D3DERR_INVALIDCALL; + + hr = map_view_of_file(filename, &data, &data_size); + if (FAILED(hr)) return D3DXERR_INVALIDDATA; + + hr = D3DXCreateVolumeTextureFromFileInMemoryEx(device, data, data_size, width, height, depth, + mip_levels, usage, format, pool, filter, mip_filter, color_key, src_info, palette, + volume_texture); + + UnmapViewOfFile(data); + return hr; +} + +HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemory(IDirect3DDevice9 *device, + const void *data, + UINT data_size, + IDirect3DVolumeTexture9 **volume_texture) +{ + TRACE("(%p, %p, %u, %p): relay\n", device, data, data_size, volume_texture); + + return D3DXCreateVolumeTextureFromFileInMemoryEx(device, data, data_size, D3DX_DEFAULT, D3DX_DEFAULT, + D3DX_DEFAULT, D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, + 0, NULL, NULL, volume_texture); +} + +HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemoryEx(IDirect3DDevice9 *device, + const void *data, + UINT data_size, + UINT width, + UINT height, + UINT depth, + UINT mip_levels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mip_filter, + D3DCOLOR color_key, + D3DXIMAGE_INFO *info, + PALETTEENTRY *palette, + IDirect3DVolumeTexture9 **volume_texture) +{ + HRESULT hr; + D3DCAPS9 caps; + D3DXIMAGE_INFO image_info; + BOOL dynamic_texture; + BOOL file_width = FALSE; + BOOL file_height = FALSE; + BOOL file_depth = FALSE; + BOOL file_format = FALSE; + BOOL file_mip_levels = FALSE; + IDirect3DVolumeTexture9 *tex, *buftex; + + TRACE("(%p, %p, %u, %u, %u, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p)\n", + device, data, data_size, width, height, depth, mip_levels, usage, format, pool, + filter, mip_filter, color_key, info, palette, volume_texture); + + if (!device || !data || !data_size || !volume_texture) + return D3DERR_INVALIDCALL; + + hr = D3DXGetImageInfoFromFileInMemory(data, data_size, &image_info); + if (FAILED(hr)) return hr; + + if (image_info.ImageFileFormat != D3DXIFF_DDS) + return D3DXERR_INVALIDDATA; + + if (width == 0 || width == D3DX_DEFAULT_NONPOW2) + width = image_info.Width; + if (width == D3DX_DEFAULT) + width = make_pow2(image_info.Width); + + if (height == 0 || height == D3DX_DEFAULT_NONPOW2) + height = image_info.Height; + if (height == D3DX_DEFAULT) + height = make_pow2(image_info.Height); + + if (depth == 0 || depth == D3DX_DEFAULT_NONPOW2) + depth = image_info.Depth; + if (depth == D3DX_DEFAULT) + depth = make_pow2(image_info.Depth); + + if (format == D3DFMT_UNKNOWN || format == D3DX_DEFAULT) + format = image_info.Format; + + if (width == D3DX_FROM_FILE) + { + file_width = TRUE; + width = image_info.Width; + } + + if (height == D3DX_FROM_FILE) + { + file_height = TRUE; + height = image_info.Height; + } + + if (depth == D3DX_FROM_FILE) + { + file_depth = TRUE; + depth = image_info.Depth; + } + + if (format == D3DFMT_FROM_FILE) + { + file_format = TRUE; + format = image_info.Format; + } + + if (mip_levels == D3DX_FROM_FILE) + { + file_mip_levels = TRUE; + mip_levels = image_info.MipLevels; + } + + hr = D3DXCheckVolumeTextureRequirements(device, &width, &height, &depth, &mip_levels, usage, &format, pool); + if (FAILED(hr)) return hr; + + if ((file_width && width != image_info.Width) + || (file_height && height != image_info.Height) + || (file_depth && depth != image_info.Depth) + || (file_format && format != image_info.Format) + || (file_mip_levels && mip_levels != image_info.MipLevels)) + return D3DERR_NOTAVAILABLE; + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + if (FAILED(hr)) + return D3DERR_INVALIDCALL; + + if (mip_levels > image_info.MipLevels) + { + FIXME("Generation of mipmaps for volume textures is not implemented yet\n"); + mip_levels = image_info.MipLevels; + } + + dynamic_texture = (caps.Caps2 & D3DCAPS2_DYNAMICTEXTURES) && (usage & D3DUSAGE_DYNAMIC); + if (pool == D3DPOOL_DEFAULT && !dynamic_texture) + { + hr = D3DXCreateVolumeTexture(device, width, height, depth, mip_levels, usage, format, D3DPOOL_SYSTEMMEM, &buftex); + tex = buftex; + } + else + { + hr = D3DXCreateVolumeTexture(device, width, height, depth, mip_levels, usage, format, pool, &tex); + buftex = NULL; + } + + if (FAILED(hr)) return hr; + + hr = load_volume_texture_from_dds(tex, data, palette, filter, color_key, &image_info); + if (FAILED(hr)) + { + IDirect3DVolumeTexture9_Release(tex); + return hr; + } + + if (buftex) + { + hr = D3DXCreateVolumeTexture(device, width, height, depth, mip_levels, usage, format, pool, &tex); + if (FAILED(hr)) + { + IDirect3DVolumeTexture9_Release(buftex); + return hr; + } + + IDirect3DDevice9_UpdateTexture(device, (IDirect3DBaseTexture9 *)buftex, (IDirect3DBaseTexture9 *)tex); + IDirect3DVolumeTexture9_Release(buftex); + } + + if (info) + *info = image_info; + + *volume_texture = tex; + return D3D_OK; +} + +static inline void fill_texture(const struct pixel_format_desc *format, BYTE *pos, const D3DXVECTOR4 *value) +{ + DWORD c; + + for (c = 0; c < format->bytes_per_pixel; c++) + pos[c] = 0; + + for (c = 0; c < 4; c++) + { + float comp_value; + DWORD i, v = 0, mask32 = format->bits[c] == 32 ? ~0U : ((1 << format->bits[c]) - 1); + + switch (c) + { + case 0: /* Alpha */ + comp_value = value->w; + break; + case 1: /* Red */ + comp_value = value->x; + break; + case 2: /* Green */ + comp_value = value->y; + break; + case 3: /* Blue */ + comp_value = value->z; + break; + } + + if (format->type == FORMAT_ARGBF16) + v = float_32_to_16(comp_value); + else if (format->type == FORMAT_ARGBF) + v = *(DWORD *)&comp_value; + else if (format->type == FORMAT_ARGB) + v = comp_value * ((1 << format->bits[c]) - 1) + 0.5f; + else + FIXME("Unhandled format type %#x\n", format->type); + + for (i = 0; i < format->bits[c] + format->shift[c]; i += 8) + { + BYTE byte, mask; + + if (format->shift[c] > i) + { + mask = mask32 << (format->shift[c] - i); + byte = (v << (format->shift[c] - i)) & mask; + } + else + { + mask = mask32 >> (i - format->shift[c]); + byte = (v >> (i - format->shift[c])) & mask; + } + pos[i / 8] |= byte; + } + } +} + +HRESULT WINAPI D3DXFillTexture(struct IDirect3DTexture9 *texture, LPD3DXFILL2D function, void *funcdata) +{ + DWORD miplevels; + DWORD m, x, y; + D3DSURFACE_DESC desc; + D3DLOCKED_RECT lock_rect; + D3DXVECTOR4 value; + D3DXVECTOR2 coord, size; + const struct pixel_format_desc *format; + BYTE *data; + + if (texture == NULL || function == NULL) + return D3DERR_INVALIDCALL; + + miplevels = IDirect3DBaseTexture9_GetLevelCount(texture); + + for (m = 0; m < miplevels; m++) + { + if (FAILED(IDirect3DTexture9_GetLevelDesc(texture, m, &desc))) + return D3DERR_INVALIDCALL; + + format = get_format_info(desc.Format); + if (format->type != FORMAT_ARGB && format->type != FORMAT_ARGBF16 && format->type != FORMAT_ARGBF) + { + FIXME("Unsupported texture format %#x\n", desc.Format); + return D3DERR_INVALIDCALL; + } + + if (FAILED(IDirect3DTexture9_LockRect(texture, m, &lock_rect, NULL, D3DLOCK_DISCARD))) + return D3DERR_INVALIDCALL; + + size.x = 1.0f / desc.Width; + size.y = 1.0f / desc.Height; + + data = lock_rect.pBits; + + for (y = 0; y < desc.Height; y++) + { + /* The callback function expects the coordinates of the center + of the texel */ + coord.y = (y + 0.5f) / desc.Height; + + for (x = 0; x < desc.Width; x++) + { + coord.x = (x + 0.5f) / desc.Width; + + function(&value, &coord, &size, funcdata); + + fill_texture(format, data + y * lock_rect.Pitch + x * format->bytes_per_pixel, &value); + } + } + IDirect3DTexture9_UnlockRect(texture, m); + } + + return D3D_OK; +} + +HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemoryEx(IDirect3DDevice9 *device, + const void *src_data, + UINT src_data_size, + UINT size, + UINT mip_levels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mip_filter, + D3DCOLOR color_key, + D3DXIMAGE_INFO *src_info, + PALETTEENTRY *palette, + IDirect3DCubeTexture9 **cube_texture) +{ + HRESULT hr; + D3DCAPS9 caps; + UINT loaded_miplevels; + D3DXIMAGE_INFO img_info; + BOOL dynamic_texture; + BOOL file_size = FALSE; + BOOL file_format = FALSE; + BOOL file_mip_levels = FALSE; + IDirect3DCubeTexture9 *tex, *buftex; + + TRACE("(%p, %p, %u, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p)\n", device, + src_data, src_data_size, size, mip_levels, usage, format, pool, filter, mip_filter, + color_key, src_info, palette, cube_texture); + + if (!device || !cube_texture || !src_data || !src_data_size) + return D3DERR_INVALIDCALL; + + hr = D3DXGetImageInfoFromFileInMemory(src_data, src_data_size, &img_info); + if (FAILED(hr)) + return hr; + + if (img_info.ImageFileFormat != D3DXIFF_DDS) + return D3DXERR_INVALIDDATA; + + if (img_info.Width != img_info.Height) + return D3DXERR_INVALIDDATA; + + if (size == 0 || size == D3DX_DEFAULT_NONPOW2) + size = img_info.Width; + if (size == D3DX_DEFAULT) + size = make_pow2(img_info.Width); + + if (format == D3DFMT_UNKNOWN || format == D3DX_DEFAULT) + format = img_info.Format; + + if (size == D3DX_FROM_FILE) + { + file_size = TRUE; + size = img_info.Width; + } + + if (format == D3DFMT_FROM_FILE) + { + file_format = TRUE; + format = img_info.Format; + } + + if (mip_levels == D3DX_FROM_FILE) + { + file_mip_levels = TRUE; + mip_levels = img_info.MipLevels; + } + + hr = D3DXCheckCubeTextureRequirements(device, &size, &mip_levels, usage, &format, pool); + if (FAILED(hr)) + return hr; + + if ((file_size && size != img_info.Width) + || (file_format && format != img_info.Format) + || (file_mip_levels && mip_levels != img_info.MipLevels)) + return D3DERR_NOTAVAILABLE; + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + if (FAILED(hr)) + return D3DERR_INVALIDCALL; + + if (mip_levels > img_info.MipLevels && (D3DFMT_DXT1 <= img_info.Format && img_info.Format <= D3DFMT_DXT5)) + { + FIXME("Generation of mipmaps for compressed pixel formats not supported yet\n"); + mip_levels = img_info.MipLevels; + } + + dynamic_texture = (caps.Caps2 & D3DCAPS2_DYNAMICTEXTURES) && (usage & D3DUSAGE_DYNAMIC); + if (pool == D3DPOOL_DEFAULT && !dynamic_texture) + { + hr = D3DXCreateCubeTexture(device, size, mip_levels, usage, format, D3DPOOL_SYSTEMMEM, &buftex); + tex = buftex; + } + else + { + hr = D3DXCreateCubeTexture(device, size, mip_levels, usage, format, pool, &tex); + buftex = NULL; + } + if (FAILED(hr)) + return hr; + + hr = load_cube_texture_from_dds(tex, src_data, palette, filter, color_key, &img_info); + if (FAILED(hr)) + { + IDirect3DCubeTexture9_Release(tex); + return hr; + } + + loaded_miplevels = min(IDirect3DCubeTexture9_GetLevelCount(tex), img_info.MipLevels); + hr = D3DXFilterTexture((IDirect3DBaseTexture9*) tex, palette, loaded_miplevels - 1, mip_filter); + if (FAILED(hr)) + { + IDirect3DCubeTexture9_Release(tex); + return hr; + } + + if (buftex) + { + hr = D3DXCreateCubeTexture(device, size, mip_levels, usage, format, pool, &tex); + if (FAILED(hr)) + { + IDirect3DCubeTexture9_Release(buftex); + return hr; + } + + IDirect3DDevice9_UpdateTexture(device, (IDirect3DBaseTexture9 *)buftex, (IDirect3DBaseTexture9 *)tex); + IDirect3DCubeTexture9_Release(buftex); + } + + if (src_info) + *src_info = img_info; + + *cube_texture = tex; + return D3D_OK; +} + + +HRESULT WINAPI D3DXCreateCubeTextureFromFileA(IDirect3DDevice9 *device, + const char *src_filename, + IDirect3DCubeTexture9 **cube_texture) +{ + int len; + HRESULT hr; + WCHAR *filename; + void *data; + DWORD data_size; + + TRACE("(%p, %s, %p): relay\n", device, wine_dbgstr_a(src_filename), cube_texture); + + if (!src_filename) return D3DERR_INVALIDCALL; + + len = MultiByteToWideChar(CP_ACP, 0, src_filename, -1, NULL, 0); + filename = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (!filename) return E_OUTOFMEMORY; + MultiByteToWideChar(CP_ACP, 0, src_filename, -1, filename, len); + + hr = map_view_of_file(filename, &data, &data_size); + if (FAILED(hr)) + { + HeapFree(GetProcessHeap(), 0, filename); + return D3DXERR_INVALIDDATA; + } + + hr = D3DXCreateCubeTextureFromFileInMemoryEx(device, data, data_size, D3DX_DEFAULT, D3DX_DEFAULT, + 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, cube_texture); + + UnmapViewOfFile(data); + HeapFree(GetProcessHeap(), 0, filename); + return hr; +} + +HRESULT WINAPI D3DXCreateCubeTextureFromFileW(IDirect3DDevice9 *device, + const WCHAR *src_filename, + IDirect3DCubeTexture9 **cube_texture) +{ + HRESULT hr; + void *data; + DWORD data_size; + + TRACE("(%p, %s, %p): relay\n", device, wine_dbgstr_w(src_filename), cube_texture); + + hr = map_view_of_file(src_filename, &data, &data_size); + if (FAILED(hr)) return D3DXERR_INVALIDDATA; + + hr = D3DXCreateCubeTextureFromFileInMemoryEx(device, data, data_size, D3DX_DEFAULT, D3DX_DEFAULT, + 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, cube_texture); + + UnmapViewOfFile(data); + return hr; +} + +HRESULT WINAPI D3DXCreateCubeTextureFromFileExA(IDirect3DDevice9 *device, + const char *src_filename, + UINT size, + UINT mip_levels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mip_filter, + D3DCOLOR color_key, + D3DXIMAGE_INFO *image_info, + PALETTEENTRY *palette, + IDirect3DCubeTexture9 **cube_texture) +{ + int len; + HRESULT hr; + WCHAR *filename; + void *data; + DWORD data_size; + + TRACE("(%p, %s, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p): relay\n", + device, wine_dbgstr_a(src_filename), size, mip_levels, usage, format, + pool, filter, mip_filter, color_key, image_info, palette, cube_texture); + + if (!src_filename) return D3DERR_INVALIDCALL; + + len = MultiByteToWideChar(CP_ACP, 0, src_filename, -1, NULL, 0); + filename = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (!filename) return E_OUTOFMEMORY; + MultiByteToWideChar(CP_ACP, 0, src_filename, -1, filename, len); + + hr = map_view_of_file(filename, &data, &data_size); + if (FAILED(hr)) + { + HeapFree(GetProcessHeap(), 0, filename); + return D3DXERR_INVALIDDATA; + } + + hr = D3DXCreateCubeTextureFromFileInMemoryEx(device, data, data_size, size, mip_levels, + usage, format, pool, filter, mip_filter, color_key, image_info, palette, cube_texture); + + UnmapViewOfFile(data); + HeapFree(GetProcessHeap(), 0, filename); + return hr; +} + +HRESULT WINAPI D3DXCreateCubeTextureFromFileExW(IDirect3DDevice9 *device, + const WCHAR *src_filename, + UINT size, + UINT mip_levels, + DWORD usage, + D3DFORMAT format, + D3DPOOL pool, + DWORD filter, + DWORD mip_filter, + D3DCOLOR color_key, + D3DXIMAGE_INFO *image_info, + PALETTEENTRY *palette, + IDirect3DCubeTexture9 **cube_texture) +{ + HRESULT hr; + void *data; + DWORD data_size; + + TRACE("(%p, %s, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p): relay\n", + device, wine_dbgstr_w(src_filename), size, mip_levels, usage, format, + pool, filter, mip_filter, color_key, image_info, palette, cube_texture); + + hr = map_view_of_file(src_filename, &data, &data_size); + if (FAILED(hr)) return D3DXERR_INVALIDDATA; + + hr = D3DXCreateCubeTextureFromFileInMemoryEx(device, data, data_size, size, mip_levels, + usage, format, pool, filter, mip_filter, color_key, image_info, palette, cube_texture); + + UnmapViewOfFile(data); + return hr; +} + +enum cube_coord +{ + XCOORD = 0, + XCOORDINV = 1, + YCOORD = 2, + YCOORDINV = 3, + ZERO = 4, + ONE = 5 +}; + +static float get_cube_coord(enum cube_coord coord, unsigned int x, unsigned int y, unsigned int size) +{ + switch (coord) + { + case XCOORD: + return x + 0.5f; + case XCOORDINV: + return size - x - 0.5f; + case YCOORD: + return y + 0.5f; + case YCOORDINV: + return size - y - 0.5f; + case ZERO: + return 0.0f; + case ONE: + return size; + default: + ERR("Unexpected coordinate value\n"); + return 0.0f; + } +} + +HRESULT WINAPI D3DXFillCubeTexture(struct IDirect3DCubeTexture9 *texture, LPD3DXFILL3D function, void *funcdata) +{ + DWORD miplevels; + DWORD m, x, y, f; + D3DSURFACE_DESC desc; + D3DLOCKED_RECT lock_rect; + D3DXVECTOR4 value; + D3DXVECTOR3 coord, size; + const struct pixel_format_desc *format; + BYTE *data; + static const enum cube_coord coordmap[6][3] = + { + {ONE, YCOORDINV, XCOORDINV}, + {ZERO, YCOORDINV, XCOORD}, + {XCOORD, ONE, YCOORD}, + {XCOORD, ZERO, YCOORDINV}, + {XCOORD, YCOORDINV, ONE}, + {XCOORDINV, YCOORDINV, ZERO} + }; + + if (texture == NULL || function == NULL) + return D3DERR_INVALIDCALL; + + miplevels = IDirect3DBaseTexture9_GetLevelCount(texture); + + for (m = 0; m < miplevels; m++) + { + if (FAILED(IDirect3DCubeTexture9_GetLevelDesc(texture, m, &desc))) + return D3DERR_INVALIDCALL; + + format = get_format_info(desc.Format); + if (format->type != FORMAT_ARGB && format->type != FORMAT_ARGBF16 && format->type != FORMAT_ARGBF) + { + FIXME("Unsupported texture format %#x\n", desc.Format); + return D3DERR_INVALIDCALL; + } + + for (f = 0; f < 6; f++) + { + if (FAILED(IDirect3DCubeTexture9_LockRect(texture, f, m, &lock_rect, NULL, D3DLOCK_DISCARD))) + return D3DERR_INVALIDCALL; + + size.x = (f == 0) || (f == 1) ? 0.0f : 2.0f / desc.Width; + size.y = (f == 2) || (f == 3) ? 0.0f : 2.0f / desc.Width; + size.z = (f == 4) || (f == 5) ? 0.0f : 2.0f / desc.Width; + + data = lock_rect.pBits; + + for (y = 0; y < desc.Height; y++) + { + for (x = 0; x < desc.Width; x++) + { + coord.x = get_cube_coord(coordmap[f][0], x, y, desc.Width) / desc.Width * 2.0f - 1.0f; + coord.y = get_cube_coord(coordmap[f][1], x, y, desc.Width) / desc.Width * 2.0f - 1.0f; + coord.z = get_cube_coord(coordmap[f][2], x, y, desc.Width) / desc.Width * 2.0f - 1.0f; + + function(&value, &coord, &size, funcdata); + + fill_texture(format, data + y * lock_rect.Pitch + x * format->bytes_per_pixel, &value); + } + } + IDirect3DCubeTexture9_UnlockRect(texture, f, m); + } + } + + return D3D_OK; +} + +HRESULT WINAPI D3DXFillVolumeTexture(struct IDirect3DVolumeTexture9 *texture, LPD3DXFILL3D function, void *funcdata) +{ + DWORD miplevels; + DWORD m, x, y, z; + D3DVOLUME_DESC desc; + D3DLOCKED_BOX lock_box; + D3DXVECTOR4 value; + D3DXVECTOR3 coord, size; + const struct pixel_format_desc *format; + BYTE *data; + + if (texture == NULL || function == NULL) + return D3DERR_INVALIDCALL; + + miplevels = IDirect3DBaseTexture9_GetLevelCount(texture); + + for (m = 0; m < miplevels; m++) + { + if (FAILED(IDirect3DVolumeTexture9_GetLevelDesc(texture, m, &desc))) + return D3DERR_INVALIDCALL; + + format = get_format_info(desc.Format); + if (format->type != FORMAT_ARGB && format->type != FORMAT_ARGBF16 && format->type != FORMAT_ARGBF) + { + FIXME("Unsupported texture format %#x\n", desc.Format); + return D3DERR_INVALIDCALL; + } + + if (FAILED(IDirect3DVolumeTexture9_LockBox(texture, m, &lock_box, NULL, D3DLOCK_DISCARD))) + return D3DERR_INVALIDCALL; + + size.x = 1.0f / desc.Width; + size.y = 1.0f / desc.Height; + size.z = 1.0f / desc.Depth; + + data = lock_box.pBits; + + for (z = 0; z < desc.Depth; z++) + { + /* The callback function expects the coordinates of the center + of the texel */ + coord.z = (z + 0.5f) / desc.Depth; + + for (y = 0; y < desc.Height; y++) + { + coord.y = (y + 0.5f) / desc.Height; + + for (x = 0; x < desc.Width; x++) + { + coord.x = (x + 0.5f) / desc.Width; + + function(&value, &coord, &size, funcdata); + + fill_texture(format, data + z * lock_box.SlicePitch + y * lock_box.RowPitch + + x * format->bytes_per_pixel, &value); + } + } + } + IDirect3DVolumeTexture9_UnlockBox(texture, m); + } + + return D3D_OK; +} + +HRESULT WINAPI D3DXSaveTextureToFileA(const char *dst_filename, D3DXIMAGE_FILEFORMAT file_format, + IDirect3DBaseTexture9 *src_texture, const PALETTEENTRY *src_palette) +{ + int len; + WCHAR *filename; + HRESULT hr; + ID3DXBuffer *buffer; + + TRACE("(%s, %#x, %p, %p): relay\n", + wine_dbgstr_a(dst_filename), file_format, src_texture, src_palette); + + if (!dst_filename) return D3DERR_INVALIDCALL; + + len = MultiByteToWideChar(CP_ACP, 0, dst_filename, -1, NULL, 0); + filename = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (!filename) return E_OUTOFMEMORY; + MultiByteToWideChar(CP_ACP, 0, dst_filename, -1, filename, len); + + hr = D3DXSaveTextureToFileInMemory(&buffer, file_format, src_texture, src_palette); + if (SUCCEEDED(hr)) + { + hr = write_buffer_to_file(filename, buffer); + ID3DXBuffer_Release(buffer); + } + + HeapFree(GetProcessHeap(), 0, filename); + return hr; +} + +HRESULT WINAPI D3DXSaveTextureToFileW(const WCHAR *dst_filename, D3DXIMAGE_FILEFORMAT file_format, + IDirect3DBaseTexture9 *src_texture, const PALETTEENTRY *src_palette) +{ + HRESULT hr; + ID3DXBuffer *buffer; + + TRACE("(%s, %#x, %p, %p): relay\n", + wine_dbgstr_w(dst_filename), file_format, src_texture, src_palette); + + if (!dst_filename) return D3DERR_INVALIDCALL; + + hr = D3DXSaveTextureToFileInMemory(&buffer, file_format, src_texture, src_palette); + if (SUCCEEDED(hr)) + { + hr = write_buffer_to_file(dst_filename, buffer); + ID3DXBuffer_Release(buffer); + } + + return hr; +} + +HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE_FILEFORMAT file_format, + IDirect3DBaseTexture9 *src_texture, const PALETTEENTRY *src_palette) +{ + HRESULT hr; + D3DRESOURCETYPE type; + IDirect3DSurface9 *surface; + + TRACE("(%p, %#x, %p, %p)\n", + dst_buffer, file_format, src_texture, src_palette); + + if (!dst_buffer || !src_texture) return D3DERR_INVALIDCALL; + + if (file_format == D3DXIFF_DDS) + { + FIXME("DDS file format isn't supported yet\n"); + return E_NOTIMPL; + } + + type = IDirect3DBaseTexture9_GetType(src_texture); + switch (type) + { + case D3DRTYPE_TEXTURE: + case D3DRTYPE_CUBETEXTURE: + hr = get_surface(type, src_texture, D3DCUBEMAP_FACE_POSITIVE_X, 0, &surface); + break; + case D3DRTYPE_VOLUMETEXTURE: + FIXME("Volume textures aren't supported yet\n"); + return E_NOTIMPL; + default: + return D3DERR_INVALIDCALL; + } + + if (SUCCEEDED(hr)) + { + hr = D3DXSaveSurfaceToFileInMemory(dst_buffer, file_format, surface, src_palette, NULL); + IDirect3DSurface9_Release(surface); + } + + return hr; } diff --git a/dll/directx/wine/d3dx9_36/util.c b/dll/directx/wine/d3dx9_36/util.c index 7acc41a4e11..a97161425aa 100644 --- a/dll/directx/wine/d3dx9_36/util.c +++ b/dll/directx/wine/d3dx9_36/util.c @@ -20,6 +20,31 @@ #include #include "d3dx9_36_private.h" +WINE_DEFAULT_DEBUG_CHANNEL(d3dx); + +static void la_from_rgba(const struct vec4 *rgba, struct vec4 *la) +{ + la->x = rgba->x * 0.2125f + rgba->y * 0.7154f + rgba->z * 0.0721f; + la->w = rgba->w; +} + +static void la_to_rgba(const struct vec4 *la, struct vec4 *rgba, const PALETTEENTRY *palette) +{ + rgba->x = la->x; + rgba->y = la->x; + rgba->z = la->x; + rgba->w = la->w; +} + +static void index_to_rgba(const struct vec4 *index, struct vec4 *rgba, const PALETTEENTRY *palette) +{ + ULONG idx = (ULONG)(index->x * 255.0f + 0.5f); + + rgba->x = palette[idx].peRed / 255.0f; + rgba->y = palette[idx].peGreen / 255.0f; + rgba->z = palette[idx].peBlue / 255.0f; + rgba->w = palette[idx].peFlags / 255.0f; /* peFlags is the alpha component in DX8 and higher */ +} /************************************************************ * pixel format table providing info about number of bytes per pixel, @@ -27,27 +52,40 @@ * * Call get_format_info to request information about a specific format. */ -static const PixelFormatDesc formats[] = +static const struct pixel_format_desc formats[] = { - /* format bits per channel shifts per channel bpp type */ - { D3DFMT_R8G8B8, { 0, 8, 8, 8 }, { 0, 16, 8, 0 }, 3, FORMAT_ARGB }, - { D3DFMT_A8R8G8B8, { 8, 8, 8, 8 }, { 24, 16, 8, 0 }, 4, FORMAT_ARGB }, - { D3DFMT_X8R8G8B8, { 0, 8, 8, 8 }, { 0, 16, 8, 0 }, 4, FORMAT_ARGB }, - { D3DFMT_A8B8G8R8, { 8, 8, 8, 8 }, { 24, 0, 8, 16 }, 4, FORMAT_ARGB }, - { D3DFMT_X8B8G8R8, { 0, 8, 8, 8 }, { 0, 0, 8, 16 }, 4, FORMAT_ARGB }, - { D3DFMT_R5G6B5, { 0, 5, 6, 5 }, { 0, 11, 5, 0 }, 2, FORMAT_ARGB }, - { D3DFMT_X1R5G5B5, { 0, 5, 5, 5 }, { 0, 10, 5, 0 }, 2, FORMAT_ARGB }, - { D3DFMT_A1R5G5B5, { 1, 5, 5, 5 }, { 15, 10, 5, 0 }, 2, FORMAT_ARGB }, - { D3DFMT_R3G3B2, { 0, 3, 3, 2 }, { 0, 5, 2, 0 }, 1, FORMAT_ARGB }, - { D3DFMT_A8R3G3B2, { 8, 3, 3, 2 }, { 8, 5, 2, 0 }, 2, FORMAT_ARGB }, - { D3DFMT_A4R4G4B4, { 4, 4, 4, 4 }, { 12, 8, 4, 0 }, 2, FORMAT_ARGB }, - { D3DFMT_X4R4G4B4, { 0, 4, 4, 4 }, { 0, 8, 4, 0 }, 2, FORMAT_ARGB }, - { D3DFMT_A2R10G10B10, { 2, 10, 10, 10 }, { 30, 20, 10, 0 }, 4, FORMAT_ARGB }, - { D3DFMT_A2B10G10R10, { 2, 10, 10, 10 }, { 30, 0, 10, 20 }, 4, FORMAT_ARGB }, - { D3DFMT_G16R16, { 0, 16, 16, 0 }, { 0, 0, 16, 0 }, 4, FORMAT_ARGB }, - { D3DFMT_A8, { 8, 0, 0, 0 }, { 0, 0, 0, 0 }, 1, FORMAT_ARGB }, - - { D3DFMT_UNKNOWN, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, 0, FORMAT_UNKNOWN }, /* marks last element */ + /* format bpc shifts bpp blocks type from_rgba to_rgba */ + {D3DFMT_R8G8B8, { 0, 8, 8, 8}, { 0, 16, 8, 0}, 3, 1, 1, 3, FORMAT_ARGB, NULL, NULL }, + {D3DFMT_A8R8G8B8, { 8, 8, 8, 8}, {24, 16, 8, 0}, 4, 1, 1, 4, FORMAT_ARGB, NULL, NULL }, + {D3DFMT_X8R8G8B8, { 0, 8, 8, 8}, { 0, 16, 8, 0}, 4, 1, 1, 4, FORMAT_ARGB, NULL, NULL }, + {D3DFMT_A8B8G8R8, { 8, 8, 8, 8}, {24, 0, 8, 16}, 4, 1, 1, 4, FORMAT_ARGB, NULL, NULL }, + {D3DFMT_X8B8G8R8, { 0, 8, 8, 8}, { 0, 0, 8, 16}, 4, 1, 1, 4, FORMAT_ARGB, NULL, NULL }, + {D3DFMT_R5G6B5, { 0, 5, 6, 5}, { 0, 11, 5, 0}, 2, 1, 1, 2, FORMAT_ARGB, NULL, NULL }, + {D3DFMT_X1R5G5B5, { 0, 5, 5, 5}, { 0, 10, 5, 0}, 2, 1, 1, 2, FORMAT_ARGB, NULL, NULL }, + {D3DFMT_A1R5G5B5, { 1, 5, 5, 5}, {15, 10, 5, 0}, 2, 1, 1, 2, FORMAT_ARGB, NULL, NULL }, + {D3DFMT_R3G3B2, { 0, 3, 3, 2}, { 0, 5, 2, 0}, 1, 1, 1, 1, FORMAT_ARGB, NULL, NULL }, + {D3DFMT_A8R3G3B2, { 8, 3, 3, 2}, { 8, 5, 2, 0}, 2, 1, 1, 2, FORMAT_ARGB, NULL, NULL }, + {D3DFMT_A4R4G4B4, { 4, 4, 4, 4}, {12, 8, 4, 0}, 2, 1, 1, 2, FORMAT_ARGB, NULL, NULL }, + {D3DFMT_X4R4G4B4, { 0, 4, 4, 4}, { 0, 8, 4, 0}, 2, 1, 1, 2, FORMAT_ARGB, NULL, NULL }, + {D3DFMT_A2R10G10B10, { 2, 10, 10, 10}, {30, 20, 10, 0}, 4, 1, 1, 4, FORMAT_ARGB, NULL, NULL }, + {D3DFMT_A2B10G10R10, { 2, 10, 10, 10}, {30, 0, 10, 20}, 4, 1, 1, 4, FORMAT_ARGB, NULL, NULL }, + {D3DFMT_A16B16G16R16, {16, 16, 16, 16}, {48, 0, 16, 32}, 8, 1, 1, 8, FORMAT_ARGB, NULL, NULL }, + {D3DFMT_G16R16, { 0, 16, 16, 0}, { 0, 0, 16, 0}, 4, 1, 1, 4, FORMAT_ARGB, NULL, NULL }, + {D3DFMT_A8, { 8, 0, 0, 0}, { 0, 0, 0, 0}, 1, 1, 1, 1, FORMAT_ARGB, NULL, NULL }, + {D3DFMT_A8L8, { 8, 8, 0, 0}, { 8, 0, 0, 0}, 2, 1, 1, 2, FORMAT_ARGB, la_from_rgba, la_to_rgba}, + {D3DFMT_A4L4, { 4, 4, 0, 0}, { 4, 0, 0, 0}, 1, 1, 1, 1, FORMAT_ARGB, la_from_rgba, la_to_rgba}, + {D3DFMT_L8, { 0, 8, 0, 0}, { 0, 0, 0, 0}, 1, 1, 1, 1, FORMAT_ARGB, la_from_rgba, la_to_rgba}, + {D3DFMT_L16, { 0, 16, 0, 0}, { 0, 0, 0, 0}, 2, 1, 1, 2, FORMAT_ARGB, la_from_rgba, la_to_rgba}, + {D3DFMT_DXT1, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 1, 4, 4, 8, FORMAT_DXT, NULL, NULL }, + {D3DFMT_DXT2, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 1, 4, 4, 16, FORMAT_DXT, NULL, NULL }, + {D3DFMT_DXT3, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 1, 4, 4, 16, FORMAT_DXT, NULL, NULL }, + {D3DFMT_DXT4, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 1, 4, 4, 16, FORMAT_DXT, NULL, NULL }, + {D3DFMT_DXT5, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 1, 4, 4, 16, FORMAT_DXT, NULL, NULL }, + {D3DFMT_A16B16G16R16F, {16, 16, 16, 16}, {48, 0, 16, 32}, 8, 1, 1, 8, FORMAT_ARGBF16, NULL, NULL }, + {D3DFMT_A32B32G32R32F, {32, 32, 32, 32}, {96, 0, 32, 64}, 16, 1, 1, 16, FORMAT_ARGBF, NULL, NULL }, + {D3DFMT_P8, { 8, 8, 8, 8}, { 0, 0, 0, 0}, 1, 1, 1, 1, FORMAT_INDEX, NULL, index_to_rgba}, + /* marks last element */ + {D3DFMT_UNKNOWN, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 0, 1, 1, 0, FORMAT_UNKNOWN, NULL, NULL }, }; @@ -70,7 +108,7 @@ static const PixelFormatDesc formats[] = * The caller must UnmapViewOfFile when it doesn't need the data anymore * */ -HRESULT map_view_of_file(LPCWSTR filename, LPVOID *buffer, DWORD *length) +HRESULT map_view_of_file(const WCHAR *filename, void **buffer, DWORD *length) { HANDLE hfile, hmapping = NULL; @@ -134,6 +172,25 @@ HRESULT load_resource_into_memory(HMODULE module, HRSRC resinfo, LPVOID *buffer, return S_OK; } +HRESULT write_buffer_to_file(const WCHAR *dst_filename, ID3DXBuffer *buffer) +{ + HRESULT hr = S_OK; + void *buffer_pointer; + DWORD buffer_size; + HANDLE file = CreateFileW(dst_filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + if (file == INVALID_HANDLE_VALUE) + return HRESULT_FROM_WIN32(GetLastError()); + + buffer_pointer = ID3DXBuffer_GetBufferPointer(buffer); + buffer_size = ID3DXBuffer_GetBufferSize(buffer); + + if (!WriteFile(file, buffer_pointer, buffer_size, NULL, NULL)) + hr = HRESULT_FROM_WIN32(GetLastError()); + + CloseHandle(file); + return hr; +} + /************************************************************ * get_format_info @@ -143,12 +200,176 @@ HRESULT load_resource_into_memory(HMODULE module, HRSRC resinfo, LPVOID *buffer, * * PARAMS * format [I] format whose description is queried - * desc [O] pointer to a StaticPixelFormatDesc structure * */ -const PixelFormatDesc *get_format_info(D3DFORMAT format) +const struct pixel_format_desc *get_format_info(D3DFORMAT format) { unsigned int i = 0; while(formats[i].format != format && formats[i].format != D3DFMT_UNKNOWN) i++; + if (formats[i].format == D3DFMT_UNKNOWN) + FIXME("Unknown format %#x (as FOURCC %s).\n", format, debugstr_an((const char *)&format, 4)); return &formats[i]; } + +const struct pixel_format_desc *get_format_info_idx(int idx) +{ + if(idx >= sizeof(formats) / sizeof(formats[0])) + return NULL; + if(formats[idx].format == D3DFMT_UNKNOWN) + return NULL; + return &formats[idx]; +} + +#define WINE_D3DX_TO_STR(x) case x: return #x + +const char *debug_d3dxparameter_class(D3DXPARAMETER_CLASS c) +{ + switch (c) + { + WINE_D3DX_TO_STR(D3DXPC_SCALAR); + WINE_D3DX_TO_STR(D3DXPC_VECTOR); + WINE_D3DX_TO_STR(D3DXPC_MATRIX_ROWS); + WINE_D3DX_TO_STR(D3DXPC_MATRIX_COLUMNS); + WINE_D3DX_TO_STR(D3DXPC_OBJECT); + WINE_D3DX_TO_STR(D3DXPC_STRUCT); + default: + FIXME("Unrecognized D3DXPARAMETER_CLASS %#x.\n", c); + return "unrecognized"; + } +} + +const char *debug_d3dxparameter_type(D3DXPARAMETER_TYPE t) +{ + switch (t) + { + WINE_D3DX_TO_STR(D3DXPT_VOID); + WINE_D3DX_TO_STR(D3DXPT_BOOL); + WINE_D3DX_TO_STR(D3DXPT_INT); + WINE_D3DX_TO_STR(D3DXPT_FLOAT); + WINE_D3DX_TO_STR(D3DXPT_STRING); + WINE_D3DX_TO_STR(D3DXPT_TEXTURE); + WINE_D3DX_TO_STR(D3DXPT_TEXTURE1D); + WINE_D3DX_TO_STR(D3DXPT_TEXTURE2D); + WINE_D3DX_TO_STR(D3DXPT_TEXTURE3D); + WINE_D3DX_TO_STR(D3DXPT_TEXTURECUBE); + WINE_D3DX_TO_STR(D3DXPT_SAMPLER); + WINE_D3DX_TO_STR(D3DXPT_SAMPLER1D); + WINE_D3DX_TO_STR(D3DXPT_SAMPLER2D); + WINE_D3DX_TO_STR(D3DXPT_SAMPLER3D); + WINE_D3DX_TO_STR(D3DXPT_SAMPLERCUBE); + WINE_D3DX_TO_STR(D3DXPT_PIXELSHADER); + WINE_D3DX_TO_STR(D3DXPT_VERTEXSHADER); + WINE_D3DX_TO_STR(D3DXPT_PIXELFRAGMENT); + WINE_D3DX_TO_STR(D3DXPT_VERTEXFRAGMENT); + WINE_D3DX_TO_STR(D3DXPT_UNSUPPORTED); + default: + FIXME("Unrecognized D3DXPARAMETER_TYP %#x.\n", t); + return "unrecognized"; + } +} + +const char *debug_d3dxparameter_registerset(D3DXREGISTER_SET r) +{ + switch (r) + { + WINE_D3DX_TO_STR(D3DXRS_BOOL); + WINE_D3DX_TO_STR(D3DXRS_INT4); + WINE_D3DX_TO_STR(D3DXRS_FLOAT4); + WINE_D3DX_TO_STR(D3DXRS_SAMPLER); + default: + FIXME("Unrecognized D3DXREGISTER_SET %#x.\n", r); + return "unrecognized"; + } +} + +#undef WINE_D3DX_TO_STR + +/* parameter type conversion helpers */ +static BOOL get_bool(D3DXPARAMETER_TYPE type, LPCVOID data) +{ + switch (type) + { + case D3DXPT_FLOAT: + case D3DXPT_INT: + case D3DXPT_BOOL: + return *(DWORD *)data != 0; + + case D3DXPT_VOID: + return *(BOOL *)data; + + default: + FIXME("Unhandled type %s.\n", debug_d3dxparameter_type(type)); + return FALSE; + } +} + +static INT get_int(D3DXPARAMETER_TYPE type, LPCVOID data) +{ + switch (type) + { + case D3DXPT_FLOAT: + return *(FLOAT *)data; + + case D3DXPT_INT: + case D3DXPT_VOID: + return *(INT *)data; + + case D3DXPT_BOOL: + return get_bool(type, data); + + default: + FIXME("Unhandled type %s.\n", debug_d3dxparameter_type(type)); + return 0; + } +} + +static FLOAT get_float(D3DXPARAMETER_TYPE type, LPCVOID data) +{ + switch (type) + { + case D3DXPT_FLOAT: + case D3DXPT_VOID: + return *(FLOAT *)data; + + case D3DXPT_INT: + return *(INT *)data; + + case D3DXPT_BOOL: + return get_bool(type, data); + + default: + FIXME("Unhandled type %s.\n", debug_d3dxparameter_type(type)); + return 0.0f; + } +} + +void set_number(LPVOID outdata, D3DXPARAMETER_TYPE outtype, LPCVOID indata, D3DXPARAMETER_TYPE intype) +{ + TRACE("Changing from type %s to type %s\n", debug_d3dxparameter_type(intype), debug_d3dxparameter_type(outtype)); + + if (outtype == intype) + { + *(DWORD *)outdata = *(DWORD *)indata; + return; + } + + switch (outtype) + { + case D3DXPT_FLOAT: + *(FLOAT *)outdata = get_float(intype, indata); + break; + + case D3DXPT_BOOL: + *(BOOL *)outdata = get_bool(intype, indata); + break; + + case D3DXPT_INT: + *(INT *)outdata = get_int(intype, indata); + break; + + default: + FIXME("Unhandled type %s.\n", debug_d3dxparameter_type(outtype)); + *(DWORD *)outdata = 0; + break; + } +} diff --git a/dll/directx/wine/d3dx9_36/volume.c b/dll/directx/wine/d3dx9_36/volume.c new file mode 100644 index 00000000000..6ba758feca3 --- /dev/null +++ b/dll/directx/wine/d3dx9_36/volume.c @@ -0,0 +1,323 @@ +/* + * Copyright 2010 Christian Costa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "wine/debug.h" +#include "d3dx9_36_private.h" + +WINE_DEFAULT_DEBUG_CHANNEL(d3dx); + +HRESULT WINAPI D3DXLoadVolumeFromFileA(IDirect3DVolume9 *dst_volume, + const PALETTEENTRY *dst_palette, + const D3DBOX *dst_box, + const char *filename, + const D3DBOX *src_box, + DWORD filter, + D3DCOLOR color_key, + D3DXIMAGE_INFO *info) +{ + HRESULT hr; + int length; + WCHAR *filenameW; + + TRACE("(%p, %p, %p, %s, %p, %#x, %#x, %p)\n", + dst_volume, dst_palette, dst_box, debugstr_a(filename), src_box, + filter, color_key, info); + + if (!dst_volume || !filename) return D3DERR_INVALIDCALL; + + length = MultiByteToWideChar(CP_ACP, 0, filename, -1, NULL, 0); + filenameW = HeapAlloc(GetProcessHeap(), 0, length * sizeof(*filenameW)); + if (!filenameW) return E_OUTOFMEMORY; + + hr = D3DXLoadVolumeFromFileW(dst_volume, dst_palette, dst_box, filenameW, + src_box, filter, color_key, info); + HeapFree(GetProcessHeap(), 0, filenameW); + + return hr; +} + +HRESULT WINAPI D3DXLoadVolumeFromFileW(IDirect3DVolume9 *dst_volume, + const PALETTEENTRY *dst_palette, + const D3DBOX *dst_box, + const WCHAR *filename, + const D3DBOX *src_box, + DWORD filter, + D3DCOLOR color_key, + D3DXIMAGE_INFO *info) +{ + HRESULT hr; + void *data; + UINT data_size; + + TRACE("(%p, %p, %p, %s, %p, %#x, %#x, %p)\n", + dst_volume, dst_palette, dst_box, debugstr_w(filename), src_box, + filter, color_key, info); + + if (!dst_volume || !filename) return D3DERR_INVALIDCALL; + + if (FAILED(map_view_of_file(filename, &data, &data_size))) + return D3DXERR_INVALIDDATA; + + hr = D3DXLoadVolumeFromFileInMemory(dst_volume, dst_palette, dst_box, + data, data_size, src_box, filter, color_key, info); + UnmapViewOfFile(data); + + return hr; +} + +HRESULT WINAPI D3DXLoadVolumeFromMemory(IDirect3DVolume9 *dst_volume, + const PALETTEENTRY *dst_palette, + const D3DBOX *dst_box, + const void *src_memory, + D3DFORMAT src_format, + UINT src_row_pitch, + UINT src_slice_pitch, + const PALETTEENTRY *src_palette, + const D3DBOX *src_box, + DWORD filter, + D3DCOLOR color_key) +{ + HRESULT hr; + D3DVOLUME_DESC desc; + D3DLOCKED_BOX locked_box; + struct volume dst_size, src_size; + const struct pixel_format_desc *src_format_desc, *dst_format_desc; + + TRACE("(%p, %p, %p, %p, %#x, %u, %u, %p, %p, %x, %x)\n", dst_volume, dst_palette, dst_box, + src_memory, src_format, src_row_pitch, src_slice_pitch, src_palette, src_box, + filter, color_key); + + if (!dst_volume || !src_memory || !src_box) return D3DERR_INVALIDCALL; + + if (src_format == D3DFMT_UNKNOWN + || src_box->Left >= src_box->Right + || src_box->Top >= src_box->Bottom + || src_box->Front >= src_box->Back) + return E_FAIL; + + if (filter == D3DX_DEFAULT) + filter = D3DX_FILTER_TRIANGLE | D3DX_FILTER_DITHER; + + IDirect3DVolume9_GetDesc(dst_volume, &desc); + + src_size.width = src_box->Right - src_box->Left; + src_size.height = src_box->Bottom - src_box->Top; + src_size.depth = src_box->Back - src_box->Front; + + if (!dst_box) + { + dst_size.width = desc.Width; + dst_size.height = desc.Height; + dst_size.depth = desc.Depth; + } + else + { + if (dst_box->Left >= dst_box->Right || dst_box->Right > desc.Width) + return D3DERR_INVALIDCALL; + if (dst_box->Top >= dst_box->Bottom || dst_box->Bottom > desc.Height) + return D3DERR_INVALIDCALL; + if (dst_box->Front >= dst_box->Back || dst_box->Back > desc.Depth) + return D3DERR_INVALIDCALL; + + dst_size.width = dst_box->Right - dst_box->Left; + dst_size.height = dst_box->Bottom - dst_box->Top; + dst_size.depth = dst_box->Back - dst_box->Front; + } + + src_format_desc = get_format_info(src_format); + if (src_format_desc->type == FORMAT_UNKNOWN) + return E_NOTIMPL; + + dst_format_desc = get_format_info(desc.Format); + if (dst_format_desc->type == FORMAT_UNKNOWN) + return E_NOTIMPL; + + if (desc.Format == src_format + && dst_size.width == src_size.width + && dst_size.height == src_size.height + && dst_size.depth == src_size.depth + && color_key == 0) + { + const BYTE *src_addr; + + if (src_box->Left & (src_format_desc->block_width - 1) + || src_box->Top & (src_format_desc->block_height - 1) + || (src_box->Right & (src_format_desc->block_width - 1) + && src_size.width != desc.Width) + || (src_box->Bottom & (src_format_desc->block_height - 1) + && src_size.height != desc.Height)) + { + FIXME("Source box (%u, %u, %u, %u) is misaligned\n", + src_box->Left, src_box->Top, src_box->Right, src_box->Bottom); + return E_NOTIMPL; + } + + src_addr = src_memory; + src_addr += src_box->Front * src_slice_pitch; + src_addr += (src_box->Top / src_format_desc->block_height) * src_row_pitch; + src_addr += (src_box->Left / src_format_desc->block_width) * src_format_desc->block_byte_count; + + hr = IDirect3DVolume9_LockBox(dst_volume, &locked_box, dst_box, 0); + if (FAILED(hr)) return hr; + + copy_pixels(src_addr, src_row_pitch, src_slice_pitch, + locked_box.pBits, locked_box.RowPitch, locked_box.SlicePitch, + &dst_size, dst_format_desc); + + IDirect3DVolume9_UnlockBox(dst_volume); + } + else + { + const BYTE *src_addr; + + + if (((src_format_desc->type != FORMAT_ARGB) && (src_format_desc->type != FORMAT_INDEX)) || + (dst_format_desc->type != FORMAT_ARGB)) + { + FIXME("Pixel format conversion not implemented %#x -> %#x\n", + src_format_desc->format, dst_format_desc->format); + return E_NOTIMPL; + } + + src_addr = src_memory; + src_addr += src_box->Front * src_slice_pitch; + src_addr += src_box->Top * src_row_pitch; + src_addr += src_box->Left * src_format_desc->bytes_per_pixel; + + hr = IDirect3DVolume9_LockBox(dst_volume, &locked_box, dst_box, 0); + if (FAILED(hr)) return hr; + + if ((filter & 0xf) == D3DX_FILTER_NONE) + { + convert_argb_pixels(src_memory, src_row_pitch, src_slice_pitch, &src_size, src_format_desc, + locked_box.pBits, locked_box.RowPitch, locked_box.SlicePitch, &dst_size, dst_format_desc, color_key, + src_palette); + } + else + { + if ((filter & 0xf) != D3DX_FILTER_POINT) + FIXME("Unhandled filter %#x.\n", filter); + + point_filter_argb_pixels(src_addr, src_row_pitch, src_slice_pitch, &src_size, src_format_desc, + locked_box.pBits, locked_box.RowPitch, locked_box.SlicePitch, &dst_size, dst_format_desc, color_key, + src_palette); + } + + IDirect3DVolume9_UnlockBox(dst_volume); + } + + return D3D_OK; +} + +HRESULT WINAPI D3DXLoadVolumeFromFileInMemory(IDirect3DVolume9 *dst_volume, + const PALETTEENTRY *dst_palette, + const D3DBOX *dst_box, + const void *src_data, + UINT src_data_size, + const D3DBOX *src_box, + DWORD filter, + D3DCOLOR color_key, + D3DXIMAGE_INFO *src_info) +{ + HRESULT hr; + D3DBOX box; + D3DXIMAGE_INFO image_info; + + if (!dst_volume || !src_data) return D3DERR_INVALIDCALL; + + hr = D3DXGetImageInfoFromFileInMemory(src_data, src_data_size, &image_info); + if (FAILED(hr)) return hr; + + if (src_box) + { + if (src_box->Right > image_info.Width + || src_box->Bottom > image_info.Height + || src_box->Back > image_info.Depth) + return D3DERR_INVALIDCALL; + + box = *src_box; + } + else + { + box.Left = 0; + box.Top = 0; + box.Right = image_info.Width; + box.Bottom = image_info.Height; + box.Front = 0; + box.Back = image_info.Depth; + + } + + if (image_info.ImageFileFormat != D3DXIFF_DDS) + { + FIXME("File format %#x is not supported yet\n", image_info.ImageFileFormat); + return E_NOTIMPL; + } + + hr = load_volume_from_dds(dst_volume, dst_palette, dst_box, src_data, &box, + filter, color_key, &image_info); + if (FAILED(hr)) return hr; + + if (src_info) + *src_info = image_info; + + return D3D_OK; +} + +HRESULT WINAPI D3DXLoadVolumeFromVolume(IDirect3DVolume9 *dst_volume, + const PALETTEENTRY *dst_palette, + const D3DBOX *dst_box, + IDirect3DVolume9 *src_volume, + const PALETTEENTRY *src_palette, + const D3DBOX *src_box, + DWORD filter, + D3DCOLOR color_key) +{ + HRESULT hr; + D3DBOX box; + D3DVOLUME_DESC desc; + D3DLOCKED_BOX locked_box; + + TRACE("(%p, %p, %p, %p, %p, %p, %#x, %#x)\n", + dst_volume, dst_palette, dst_box, src_volume, src_palette, src_box, + filter, color_key); + + if (!dst_volume || !src_volume) return D3DERR_INVALIDCALL; + + IDirect3DVolume9_GetDesc(src_volume, &desc); + + if (!src_box) + { + box.Left = box.Top = 0; + box.Right = desc.Width; + box.Bottom = desc.Height; + box.Front = 0; + box.Back = desc.Depth; + } + else box = *src_box; + + hr = IDirect3DVolume9_LockBox(src_volume, &locked_box, NULL, D3DLOCK_READONLY); + if (FAILED(hr)) return hr; + + hr = D3DXLoadVolumeFromMemory(dst_volume, dst_palette, dst_box, + locked_box.pBits, desc.Format, locked_box.RowPitch, locked_box.SlicePitch, + src_palette, &box, filter, color_key); + + IDirect3DVolume9_UnlockBox(src_volume); + return hr; +} diff --git a/dll/directx/wine/d3dx9_36/xfile.c b/dll/directx/wine/d3dx9_36/xfile.c new file mode 100644 index 00000000000..9c57277f8ad --- /dev/null +++ b/dll/directx/wine/d3dx9_36/xfile.c @@ -0,0 +1,718 @@ +/* + * Copyright (C) 2012 Christian Costa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "wine/debug.h" + +#include "d3dx9.h" +#include "d3dx9xof.h" +#undef MAKE_DDHRESULT +#include "dxfile.h" + +WINE_DEFAULT_DEBUG_CHANNEL(d3dx); + +static HRESULT error_dxfile_to_d3dxfile(HRESULT error) +{ + switch (error) + { + case DXFILEERR_BADFILETYPE: + return D3DXFERR_BADFILETYPE; + case DXFILEERR_BADFILEVERSION: + return D3DXFERR_BADFILEVERSION; + case DXFILEERR_BADFILEFLOATSIZE: + return D3DXFERR_BADFILEFLOATSIZE; + case DXFILEERR_PARSEERROR: + return D3DXFERR_PARSEERROR; + case DXFILEERR_BADVALUE: + return D3DXFERR_BADVALUE; + default: + FIXME("Cannot map error %#x\n", error); + return E_FAIL; + } +} + +typedef struct { + ID3DXFile ID3DXFile_iface; + LONG ref; + IDirectXFile *dxfile; +} ID3DXFileImpl; + +typedef struct { + ID3DXFileEnumObject ID3DXFileEnumObject_iface; + LONG ref; + ULONG nb_children; + ID3DXFileData **children; +} ID3DXFileEnumObjectImpl; + +typedef struct { + ID3DXFileData ID3DXFileData_iface; + LONG ref; + BOOL reference; + IDirectXFileData *dxfile_data; + ULONG nb_children; + ID3DXFileData **children; +} ID3DXFileDataImpl; + + +static inline ID3DXFileImpl* impl_from_ID3DXFile(ID3DXFile *iface) +{ + return CONTAINING_RECORD(iface, ID3DXFileImpl, ID3DXFile_iface); +} + +static inline ID3DXFileEnumObjectImpl* impl_from_ID3DXFileEnumObject(ID3DXFileEnumObject *iface) +{ + return CONTAINING_RECORD(iface, ID3DXFileEnumObjectImpl, ID3DXFileEnumObject_iface); +} + +static inline ID3DXFileDataImpl* impl_from_ID3DXFileData(ID3DXFileData *iface) +{ + return CONTAINING_RECORD(iface, ID3DXFileDataImpl, ID3DXFileData_iface); +} + +/*** IUnknown methods ***/ + +static HRESULT WINAPI ID3DXFileDataImpl_QueryInterface(ID3DXFileData *iface, REFIID riid, void **ret_iface) +{ + TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ret_iface); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_ID3DXFileData)) + { + iface->lpVtbl->AddRef(iface); + *ret_iface = iface; + return S_OK; + } + + WARN("(%p)->(%s, %p), not found\n", iface, debugstr_guid(riid), ret_iface); + *ret_iface = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI ID3DXFileDataImpl_AddRef(ID3DXFileData *iface) +{ + ID3DXFileDataImpl *This = impl_from_ID3DXFileData(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p)->(): new ref = %u\n", iface, ref); + + return ref; +} + +static ULONG WINAPI ID3DXFileDataImpl_Release(ID3DXFileData *iface) +{ + ID3DXFileDataImpl *This = impl_from_ID3DXFileData(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(): new ref = %u\n", iface, ref); + + if (!ref) + { + ULONG i; + + for (i = 0; i < This->nb_children; i++) + (This->children[i])->lpVtbl->Release(This->children[i]); + HeapFree(GetProcessHeap(), 0, This->children); + IDirectXFileData_Release(This->dxfile_data); + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + + +/*** ID3DXFileData methods ***/ + +static HRESULT WINAPI ID3DXFileDataImpl_GetEnum(ID3DXFileData *iface, ID3DXFileEnumObject **enum_object) +{ + FIXME("(%p)->(%p): stub\n", iface, enum_object); + + return E_NOTIMPL; +} + + +static HRESULT WINAPI ID3DXFileDataImpl_GetName(ID3DXFileData *iface, char *name, SIZE_T *size) +{ + ID3DXFileDataImpl *This = impl_from_ID3DXFileData(iface); + DWORD dxfile_size; + HRESULT ret; + + TRACE("(%p)->(%p, %p)\n", iface, name, size); + + if (!size) + return D3DXFERR_BADVALUE; + + dxfile_size = *size; + + ret = IDirectXFileData_GetName(This->dxfile_data, name, &dxfile_size); + if (ret != DXFILE_OK) + return error_dxfile_to_d3dxfile(ret); + + if (!dxfile_size) + { + /* Contrary to d3dxof, d3dx9_36 returns an empty string with a null byte when no name is available. + * If the input size is 0, it returns a length of 1 without touching the buffer */ + dxfile_size = 1; + if (name && *size) + name[0] = 0; + } + + *size = dxfile_size; + + return S_OK; +} + + +static HRESULT WINAPI ID3DXFileDataImpl_GetId(ID3DXFileData *iface, GUID *guid) +{ + ID3DXFileDataImpl *This = impl_from_ID3DXFileData(iface); + HRESULT ret; + + TRACE("(%p)->(%p)\n", iface, guid); + + if (!guid) + return E_POINTER; + + ret = IDirectXFileData_GetId(This->dxfile_data, guid); + if (ret != DXFILE_OK) + return error_dxfile_to_d3dxfile(ret); + + return S_OK; +} + + +static HRESULT WINAPI ID3DXFileDataImpl_Lock(ID3DXFileData *iface, SIZE_T *size, const void **data) +{ + ID3DXFileDataImpl *This = impl_from_ID3DXFileData(iface); + DWORD dxfile_size; + HRESULT ret; + + TRACE("(%p)->(%p, %p)\n", iface, size, data); + + if (!size || !data) + return E_POINTER; + + ret = IDirectXFileData_GetData(This->dxfile_data, NULL, &dxfile_size, (void**)data); + if (ret != DXFILE_OK) + return error_dxfile_to_d3dxfile(ret); + + *size = dxfile_size; + + return S_OK; +} + + +static HRESULT WINAPI ID3DXFileDataImpl_Unlock(ID3DXFileData *iface) +{ + TRACE("(%p)->()\n", iface); + + /* Nothing to do */ + + return S_OK; +} + + +static HRESULT WINAPI ID3DXFileDataImpl_GetType(ID3DXFileData *iface, GUID *guid) +{ + ID3DXFileDataImpl *This = impl_from_ID3DXFileData(iface); + const GUID *dxfile_guid; + HRESULT ret; + + TRACE("(%p)->(%p)\n", iface, guid); + + ret = IDirectXFileData_GetType(This->dxfile_data, &dxfile_guid); + if (ret != DXFILE_OK) + return error_dxfile_to_d3dxfile(ret); + + *guid = *dxfile_guid; + + return S_OK; +} + + +static BOOL WINAPI ID3DXFileDataImpl_IsReference(ID3DXFileData *iface) +{ + ID3DXFileDataImpl *This = impl_from_ID3DXFileData(iface); + + TRACE("(%p)->()\n", iface); + + return This->reference; +} + + +static HRESULT WINAPI ID3DXFileDataImpl_GetChildren(ID3DXFileData *iface, SIZE_T *children) +{ + ID3DXFileDataImpl *This = impl_from_ID3DXFileData(iface); + + TRACE("(%p)->(%p)\n", iface, children); + + if (!children) + return E_POINTER; + + *children = This->nb_children; + + return S_OK; +} + + +static HRESULT WINAPI ID3DXFileDataImpl_GetChild(ID3DXFileData *iface, SIZE_T id, ID3DXFileData **object) +{ + ID3DXFileDataImpl *This = impl_from_ID3DXFileData(iface); + + TRACE("(%p)->(%lu, %p)\n", iface, id, object); + + if (!object) + return E_POINTER; + + *object = This->children[id]; + (*object)->lpVtbl->AddRef(*object); + + return S_OK; +} + + +static const ID3DXFileDataVtbl ID3DXFileData_Vtbl = +{ + ID3DXFileDataImpl_QueryInterface, + ID3DXFileDataImpl_AddRef, + ID3DXFileDataImpl_Release, + ID3DXFileDataImpl_GetEnum, + ID3DXFileDataImpl_GetName, + ID3DXFileDataImpl_GetId, + ID3DXFileDataImpl_Lock, + ID3DXFileDataImpl_Unlock, + ID3DXFileDataImpl_GetType, + ID3DXFileDataImpl_IsReference, + ID3DXFileDataImpl_GetChildren, + ID3DXFileDataImpl_GetChild +}; + + +static HRESULT ID3DXFileDataImpl_Create(IDirectXFileObject *dxfile_object, ID3DXFileData **ret_iface) +{ + ID3DXFileDataImpl *object; + IDirectXFileObject *data_object; + HRESULT ret; + + TRACE("(%p, %p)\n", dxfile_object, ret_iface); + + *ret_iface = NULL; + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + return E_OUTOFMEMORY; + + object->ID3DXFileData_iface.lpVtbl = &ID3DXFileData_Vtbl; + object->ref = 1; + + ret = IDirectXFileObject_QueryInterface(dxfile_object, &IID_IDirectXFileData, (void **)&object->dxfile_data); + if (FAILED(ret)) + { + IDirectXFileDataReference *reference; + + ret = IDirectXFileObject_QueryInterface(dxfile_object, &IID_IDirectXFileDataReference, (void **)&reference); + if (SUCCEEDED(ret)) + { + ret = IDirectXFileDataReference_Resolve(reference, &object->dxfile_data); + if (FAILED(ret)) + { + HeapFree(GetProcessHeap(), 0, object); + return E_FAIL; + } + object->reference = TRUE; + } + else + { + FIXME("Don't known what to do with binary object\n"); + HeapFree(GetProcessHeap(), 0, object); + return E_FAIL; + } + } + + while (SUCCEEDED(ret = IDirectXFileData_GetNextObject(object->dxfile_data, &data_object))) + { + if (object->children) + object->children = HeapReAlloc(GetProcessHeap(), 0, object->children, sizeof(ID3DXFileData*) * (object->nb_children + 1)); + else + object->children = HeapAlloc(GetProcessHeap(), 0, sizeof(ID3DXFileData*)); + if (!object->children) + { + ret = E_OUTOFMEMORY; + break; + } + ret = ID3DXFileDataImpl_Create(data_object, &object->children[object->nb_children]); + if (ret != S_OK) + break; + object->nb_children++; + } + + if (ret != DXFILEERR_NOMOREOBJECTS) + { + (&object->ID3DXFileData_iface)->lpVtbl->Release(&object->ID3DXFileData_iface); + return ret; + } + + TRACE("Found %u children\n", object->nb_children); + + *ret_iface = &object->ID3DXFileData_iface; + + return S_OK; +} + + +/*** IUnknown methods ***/ + +static HRESULT WINAPI ID3DXFileEnumObjectImpl_QueryInterface(ID3DXFileEnumObject *iface, REFIID riid, void **ret_iface) +{ + TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ret_iface); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_ID3DXFileEnumObject)) + { + iface->lpVtbl->AddRef(iface); + *ret_iface = iface; + return S_OK; + } + + WARN("(%p)->(%s, %p), not found\n", iface, debugstr_guid(riid), ret_iface); + *ret_iface = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI ID3DXFileEnumObjectImpl_AddRef(ID3DXFileEnumObject *iface) +{ + ID3DXFileEnumObjectImpl *This = impl_from_ID3DXFileEnumObject(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p)->(): new ref = %u\n", iface, ref); + + return ref; +} + +static ULONG WINAPI ID3DXFileEnumObjectImpl_Release(ID3DXFileEnumObject *iface) +{ + ID3DXFileEnumObjectImpl *This = impl_from_ID3DXFileEnumObject(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(): new ref = %u\n", iface, ref); + + if (!ref) + { + ULONG i; + + for (i = 0; i < This->nb_children; i++) + (This->children[i])->lpVtbl->Release(This->children[i]); + HeapFree(GetProcessHeap(), 0, This->children); + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + + +/*** ID3DXFileEnumObject methods ***/ + +static HRESULT WINAPI ID3DXFileEnumObjectImpl_GetFile(ID3DXFileEnumObject *iface, ID3DXFile **file) +{ + FIXME("(%p)->(%p): stub\n", iface, file); + + return E_NOTIMPL; +} + + +static HRESULT WINAPI ID3DXFileEnumObjectImpl_GetChildren(ID3DXFileEnumObject *iface, SIZE_T *children) +{ + ID3DXFileEnumObjectImpl *This = impl_from_ID3DXFileEnumObject(iface); + + TRACE("(%p)->(%p)\n", iface, children); + + if (!children) + return E_POINTER; + + *children = This->nb_children; + + return S_OK; +} + + +static HRESULT WINAPI ID3DXFileEnumObjectImpl_GetChild(ID3DXFileEnumObject *iface, SIZE_T id, ID3DXFileData **object) +{ + ID3DXFileEnumObjectImpl *This = impl_from_ID3DXFileEnumObject(iface); + + TRACE("(%p)->(%lu, %p)\n", iface, id, object); + + if (!object) + return E_POINTER; + + *object = This->children[id]; + (*object)->lpVtbl->AddRef(*object); + + return S_OK; +} + + +static HRESULT WINAPI ID3DXFileEnumObjectImpl_GetDataObjectById(ID3DXFileEnumObject *iface, REFGUID guid, ID3DXFileData **object) +{ + FIXME("(%p)->(%s, %p): stub\n", iface, debugstr_guid(guid), object); + + return E_NOTIMPL; +} + + +static HRESULT WINAPI ID3DXFileEnumObjectImpl_GetDataObjectByName(ID3DXFileEnumObject *iface, const char *name, ID3DXFileData **object) +{ + FIXME("(%p)->(%s, %p): stub\n", iface, debugstr_a(name), object); + + return E_NOTIMPL; +} + + +static const ID3DXFileEnumObjectVtbl ID3DXFileEnumObject_Vtbl = +{ + ID3DXFileEnumObjectImpl_QueryInterface, + ID3DXFileEnumObjectImpl_AddRef, + ID3DXFileEnumObjectImpl_Release, + ID3DXFileEnumObjectImpl_GetFile, + ID3DXFileEnumObjectImpl_GetChildren, + ID3DXFileEnumObjectImpl_GetChild, + ID3DXFileEnumObjectImpl_GetDataObjectById, + ID3DXFileEnumObjectImpl_GetDataObjectByName +}; + + +/*** IUnknown methods ***/ + +static HRESULT WINAPI ID3DXFileImpl_QueryInterface(ID3DXFile *iface, REFIID riid, void **ret_iface) +{ + TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ret_iface); + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_ID3DXFile)) + { + iface->lpVtbl->AddRef(iface); + *ret_iface = iface; + return S_OK; + } + + WARN("(%p)->(%s, %p), not found\n", iface, debugstr_guid(riid), ret_iface); + *ret_iface = NULL; + return E_NOINTERFACE; +} + + +static ULONG WINAPI ID3DXFileImpl_AddRef(ID3DXFile *iface) +{ + ID3DXFileImpl *This = impl_from_ID3DXFile(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p)->(): new ref = %u\n", iface, ref); + + return ref; +} + + +static ULONG WINAPI ID3DXFileImpl_Release(ID3DXFile *iface) +{ + ID3DXFileImpl *This = impl_from_ID3DXFile(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(): new ref = %u\n", iface, ref); + + if (!ref) + { + IDirectXFile_Release(This->dxfile); + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + + +/*** ID3DXFile methods ***/ + +static HRESULT WINAPI ID3DXFileImpl_CreateEnumObject(ID3DXFile *iface, const void *source, D3DXF_FILELOADOPTIONS options, ID3DXFileEnumObject **enum_object) +{ + ID3DXFileImpl *This = impl_from_ID3DXFile(iface); + ID3DXFileEnumObjectImpl *object; + IDirectXFileEnumObject *dxfile_enum_object; + void *dxfile_source; + DXFILELOADOPTIONS dxfile_options; + DXFILELOADRESOURCE dxfile_resource; + DXFILELOADMEMORY dxfile_memory; + IDirectXFileData *data_object; + HRESULT ret; + + TRACE("(%p)->(%p, %x, %p)\n", iface, source, options, enum_object); + + if (!enum_object) + return E_POINTER; + + *enum_object = NULL; + + if (options == D3DXF_FILELOAD_FROMFILE) + { + dxfile_source = (void*)source; + dxfile_options = DXFILELOAD_FROMFILE; + } + else if (options == D3DXF_FILELOAD_FROMRESOURCE) + { + D3DXF_FILELOADRESOURCE *resource = (D3DXF_FILELOADRESOURCE*)source; + + dxfile_resource.hModule = resource->hModule; + dxfile_resource.lpName = resource->lpName; + dxfile_resource.lpType = resource->lpType; + dxfile_source = &dxfile_resource; + dxfile_options = DXFILELOAD_FROMRESOURCE; + } + else if (options == D3DXF_FILELOAD_FROMMEMORY) + { + D3DXF_FILELOADMEMORY *memory = (D3DXF_FILELOADMEMORY*)source; + + dxfile_memory.lpMemory = memory->lpMemory; + dxfile_memory.dSize = memory->dSize; + dxfile_source = &dxfile_memory; + dxfile_options = DXFILELOAD_FROMMEMORY; + } + else + { + FIXME("Source type %u is not handled yet\n", options); + return E_NOTIMPL; + } + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + return E_OUTOFMEMORY; + + object->ID3DXFileEnumObject_iface.lpVtbl = &ID3DXFileEnumObject_Vtbl; + object->ref = 1; + + ret = IDirectXFile_CreateEnumObject(This->dxfile, dxfile_source, dxfile_options, &dxfile_enum_object); + + if (ret != S_OK) + { + HeapFree(GetProcessHeap(), 0, object); + return ret; + } + + /* Fill enum object with top level data objects */ + while (SUCCEEDED(ret = IDirectXFileEnumObject_GetNextDataObject(dxfile_enum_object, &data_object))) + { + if (object->children) + object->children = HeapReAlloc(GetProcessHeap(), 0, object->children, sizeof(*object->children) * (object->nb_children + 1)); + else + object->children = HeapAlloc(GetProcessHeap(), 0, sizeof(*object->children)); + if (!object->children) + { + ret = E_OUTOFMEMORY; + break; + } + ret = ID3DXFileDataImpl_Create((IDirectXFileObject*)data_object, &object->children[object->nb_children]); + if (ret != S_OK) + break; + object->nb_children++; + } + + IDirectXFileEnumObject_Release(dxfile_enum_object); + + if (ret != DXFILEERR_NOMOREOBJECTS) + WARN("Cannot get all top level data objects\n"); + + TRACE("Found %u children\n", object->nb_children); + + *enum_object = &object->ID3DXFileEnumObject_iface; + + return S_OK; +} + + +static HRESULT WINAPI ID3DXFileImpl_CreateSaveObject(ID3DXFile *iface, const void *data, D3DXF_FILESAVEOPTIONS options, D3DXF_FILEFORMAT format, ID3DXFileSaveObject **save_object) +{ + FIXME("(%p)->(%p, %x, %u, %p): stub\n", iface, data, options, format, save_object); + + return E_NOTIMPL; +} + + +static HRESULT WINAPI ID3DXFileImpl_RegisterTemplates(ID3DXFile *iface, const void *data, SIZE_T size) +{ + ID3DXFileImpl *This = impl_from_ID3DXFile(iface); + HRESULT ret; + + TRACE("(%p)->(%p, %lu)\n", iface, data, size); + + ret = IDirectXFile_RegisterTemplates(This->dxfile, (void*)data, size); + if (ret != DXFILE_OK) + { + WARN("Error %#x\n", ret); + return error_dxfile_to_d3dxfile(ret); + } + + return S_OK; +} + + +static HRESULT WINAPI ID3DXFileImpl_RegisterEnumTemplates(ID3DXFile *iface, ID3DXFileEnumObject *enum_object) +{ + FIXME("(%p)->(%p): stub\n", iface, enum_object); + + return E_NOTIMPL; +} + + +static const ID3DXFileVtbl ID3DXFile_Vtbl = +{ + ID3DXFileImpl_QueryInterface, + ID3DXFileImpl_AddRef, + ID3DXFileImpl_Release, + ID3DXFileImpl_CreateEnumObject, + ID3DXFileImpl_CreateSaveObject, + ID3DXFileImpl_RegisterTemplates, + ID3DXFileImpl_RegisterEnumTemplates +}; + +HRESULT WINAPI D3DXFileCreate(ID3DXFile **d3dxfile) +{ + ID3DXFileImpl *object; + HRESULT ret; + + TRACE("(%p)\n", d3dxfile); + + if (!d3dxfile) + return E_POINTER; + + *d3dxfile = NULL; + + object = HeapAlloc(GetProcessHeap(), 0, sizeof(*object)); + if (!object) + return E_OUTOFMEMORY; + + ret = DirectXFileCreate(&object->dxfile); + if (ret != S_OK) + { + HeapFree(GetProcessHeap(), 0, object); + if (ret == E_OUTOFMEMORY) + return ret; + return E_FAIL; + } + + object->ID3DXFile_iface.lpVtbl = &ID3DXFile_Vtbl; + object->ref = 1; + + *d3dxfile = &object->ID3DXFile_iface; + + return S_OK; +} diff --git a/dll/directx/wine/d3dx9_37/CMakeLists.txt b/dll/directx/wine/d3dx9_37/CMakeLists.txt index f6b45d84070..4ba990dd30b 100644 --- a/dll/directx/wine/d3dx9_37/CMakeLists.txt +++ b/dll/directx/wine/d3dx9_37/CMakeLists.txt @@ -1,26 +1,15 @@ +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) + spec2def(d3dx9_37.dll d3dx9_37.spec) list(APPEND SOURCE d3dx9_37_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_37.def) -add_definitions(-D__WINESRC__) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_library(d3dx9_37 SHARED ${SOURCE}) +add_library(d3dx9_37 SHARED ${SOURCE} version.rc) set_module_type(d3dx9_37 win32dll) target_link_libraries(d3dx9_37 wine) - -add_importlibs(d3dx9_37 - d3dx9_36 - d3d9 - user32 - gdi32 - advapi32 - msvcrt - kernel32 - ntdll) - -add_dependencies(d3dx9_37 wineheaders) +add_importlibs(d3dx9_37 d3dx9_36 msvcrt kernel32 ntdll) add_cd_file(TARGET d3dx9_37 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_37/d3dx9_37.spec b/dll/directx/wine/d3dx9_37/d3dx9_37.spec index bdd1c73fdcc..777c03529fa 100644 --- a/dll/directx/wine/d3dx9_37/d3dx9_37.spec +++ b/dll/directx/wine/d3dx9_37/d3dx9_37.spec @@ -1,21 +1,21 @@ @ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShader -@ stdcall D3DXAssembleShaderFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA -@ stdcall D3DXAssembleShaderFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW -@ stdcall D3DXAssembleShaderFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA -@ stdcall D3DXAssembleShaderFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW +@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA +@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW +@ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA +@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW @ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) d3dx9_36.D3DXBoxBoundProbe -@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckCubeTextureRequirements -@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckTextureRequirements +@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckCubeTextureRequirements +@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckTextureRequirements @ stdcall D3DXCheckVersion(long long) -@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckVolumeTextureRequirements -@ stdcall D3DXCleanMesh(ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh -@ stdcall D3DXColorAdjustContrast(ptr ptr long) d3dx9_36.D3DXColorAdjustContrast -@ stdcall D3DXColorAdjustSaturation(ptr ptr long) d3dx9_36.D3DXColorAdjustSaturation -@ stdcall D3DXCompileShader(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShader -@ stdcall D3DXCompileShaderFromFileA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA -@ stdcall D3DXCompileShaderFromFileW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW -@ stdcall D3DXCompileShaderFromResourceA(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA -@ stdcall D3DXCompileShaderFromResourceW(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW +@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckVolumeTextureRequirements +@ stdcall D3DXCleanMesh(long ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh +@ stdcall D3DXColorAdjustContrast(ptr ptr float) d3dx9_36.D3DXColorAdjustContrast +@ stdcall D3DXColorAdjustSaturation(ptr ptr float) d3dx9_36.D3DXColorAdjustSaturation +@ stdcall D3DXCompileShader(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShader +@ stdcall D3DXCompileShaderFromFileA(str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA +@ stdcall D3DXCompileShaderFromFileW(wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW +@ stdcall D3DXCompileShaderFromResourceA(ptr str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA +@ stdcall D3DXCompileShaderFromResourceW(ptr wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW @ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingBox @ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingSphere @ stdcall D3DXComputeIMTFromPerVertexSignal(ptr ptr long long long ptr ptr ptr) d3dx9_36.D3DXComputeIMTFromPerVertexSignal @@ -31,7 +31,7 @@ @ stdcall D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToSingleStrip @ stdcall D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToStrips @ stdcall D3DXCreateAnimationController(long long long long ptr) d3dx9_36.D3DXCreateAnimationController -@ stdcall D3DXCreateBox(ptr long long long ptr ptr) d3dx9_36.D3DXCreateBox +@ stdcall D3DXCreateBox(ptr float float float ptr ptr) d3dx9_36.D3DXCreateBox @ stdcall D3DXCreateBuffer(long ptr) d3dx9_36.D3DXCreateBuffer @ stdcall D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr) d3dx9_36.D3DXCreateCompressedAnimationSet @ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr) d3dx9_36.D3DXCreateCubeTexture @@ -48,24 +48,24 @@ @ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder @ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffect @ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler -@ stdcall D3DXCreateEffectCompilerFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA -@ stdcall D3DXCreateEffectCompilerFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW -@ stdcall D3DXCreateEffectCompilerFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA -@ stdcall D3DXCreateEffectCompilerFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW -@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx -@ stdcall D3DXCreateEffectFromFileA(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA -@ stdcall D3DXCreateEffectFromFileExA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA -@ stdcall D3DXCreateEffectFromFileExW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW -@ stdcall D3DXCreateEffectFromFileW(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW -@ stdcall D3DXCreateEffectFromResourceA(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA -@ stdcall D3DXCreateEffectFromResourceExA(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA -@ stdcall D3DXCreateEffectFromResourceExW(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW -@ stdcall D3DXCreateEffectFromResourceW(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW +@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA +@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW +@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA +@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW +@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx +@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA +@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA +@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW +@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW +@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA +@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA +@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW +@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW @ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool -@ stdcall D3DXCreateFontA(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontA +@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectW -@ stdcall D3DXCreateFontW(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontW +@ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) d3dx9_36.D3DXCreateFontW @ stdcall D3DXCreateFragmentLinker(ptr long ptr) d3dx9_36.D3DXCreateFragmentLinker @ stdcall D3DXCreateFragmentLinkerEx(ptr long long ptr) d3dx9_36.D3DXCreateFragmentLinkerEx @ stdcall D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateKeyframedAnimationSet @@ -87,22 +87,22 @@ @ stdcall D3DXCreateSkinInfo(long ptr long ptr) d3dx9_36.D3DXCreateSkinInfo @ stdcall D3DXCreateSkinInfoFromBlendedMesh(ptr long ptr ptr) d3dx9_36.D3DXCreateSkinInfoFromBlendedMesh @ stdcall D3DXCreateSkinInfoFVF(long long long ptr) d3dx9_36.D3DXCreateSkinInfoFVF -@ stdcall D3DXCreateSphere(ptr long long long ptr ptr) d3dx9_36.D3DXCreateSphere +@ stdcall D3DXCreateSphere(ptr float long long ptr ptr) d3dx9_36.D3DXCreateSphere @ stdcall D3DXCreateSprite(ptr ptr) d3dx9_36.D3DXCreateSprite @ stdcall D3DXCreateTeapot(ptr ptr ptr) d3dx9_36.D3DXCreateTeapot -@ stdcall D3DXCreateTextA(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextA -@ stdcall D3DXCreateTextW(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextW +@ stdcall D3DXCreateTextA(ptr long str float float ptr ptr ptr) d3dx9_36.D3DXCreateTextA +@ stdcall D3DXCreateTextW(ptr long wstr float float ptr ptr ptr) d3dx9_36.D3DXCreateTextW @ stdcall D3DXCreateTexture(ptr long long long long long long ptr) d3dx9_36.D3DXCreateTexture -@ stdcall D3DXCreateTextureFromFileA(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileA -@ stdcall D3DXCreateTextureFromFileExA(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA -@ stdcall D3DXCreateTextureFromFileExW(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW +@ stdcall D3DXCreateTextureFromFileA(ptr str ptr) d3dx9_36.D3DXCreateTextureFromFileA +@ stdcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA +@ stdcall D3DXCreateTextureFromFileExW(ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW @ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateTextureFromFileInMemory @ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileInMemoryEx -@ stdcall D3DXCreateTextureFromFileW(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileW -@ stdcall D3DXCreateTextureFromResourceA(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceA -@ stdcall D3DXCreateTextureFromResourceExA(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA -@ stdcall D3DXCreateTextureFromResourceExW(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW -@ stdcall D3DXCreateTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceW +@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromFileW +@ stdcall D3DXCreateTextureFromResourceA(ptr ptr str ptr) d3dx9_36.D3DXCreateTextureFromResourceA +@ stdcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA +@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW +@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromResourceW @ stdcall D3DXCreateTextureGutterHelper(long long ptr long ptr) d3dx9_36.D3DXCreateTextureGutterHelper @ stdcall D3DXCreateTextureShader(ptr ptr) d3dx9_36.D3DXCreateTextureShader @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateTorus @@ -138,7 +138,7 @@ @ stdcall D3DXFrameFind(ptr ptr) d3dx9_36.D3DXFrameFind @ stdcall D3DXFrameNumNamedMatrices(ptr) d3dx9_36.D3DXFrameNumNamedMatrices @ stdcall D3DXFrameRegisterNamedMatrices(ptr ptr) d3dx9_36.D3DXFrameRegisterNamedMatrices -@ stdcall D3DXFresnelTerm(long long) d3dx9_36.D3DXFresnelTerm +@ stdcall D3DXFresnelTerm(float float) d3dx9_36.D3DXFresnelTerm @ stdcall D3DXFVFFromDeclarator(ptr ptr) d3dx9_36.D3DXFVFFromDeclarator @ stdcall D3DXGatherFragments(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragments @ stdcall D3DXGatherFragmentsFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragmentsFromFileA @@ -151,11 +151,11 @@ @ stdcall D3DXGetDeclVertexSize(ptr long) d3dx9_36.D3DXGetDeclVertexSize @ stdcall D3DXGetDriverLevel(ptr) d3dx9_36.D3DXGetDriverLevel @ stdcall D3DXGetFVFVertexSize(long) d3dx9_36.D3DXGetFVFVertexSize -@ stdcall D3DXGetImageInfoFromFileA(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileA +@ stdcall D3DXGetImageInfoFromFileA(str ptr) d3dx9_36.D3DXGetImageInfoFromFileA @ stdcall D3DXGetImageInfoFromFileInMemory(ptr long ptr) d3dx9_36.D3DXGetImageInfoFromFileInMemory -@ stdcall D3DXGetImageInfoFromFileW(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileW -@ stdcall D3DXGetImageInfoFromResourceA(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceA -@ stdcall D3DXGetImageInfoFromResourceW(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW +@ stdcall D3DXGetImageInfoFromFileW(wstr ptr) d3dx9_36.D3DXGetImageInfoFromFileW +@ stdcall D3DXGetImageInfoFromResourceA(long str ptr) d3dx9_36.D3DXGetImageInfoFromResourceA +@ stdcall D3DXGetImageInfoFromResourceW(long wstr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW @ stdcall D3DXGetPixelShaderProfile(ptr) d3dx9_36.D3DXGetPixelShaderProfile @ stdcall D3DXGetShaderConstantTable(ptr ptr) d3dx9_36.D3DXGetShaderConstantTable @ stdcall D3DXGetShaderConstantTableEx(ptr long ptr) d3dx9_36.D3DXGetShaderConstantTableEx @@ -168,27 +168,27 @@ @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersect @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectSubset @ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectTri -@ stdcall D3DXLoadMeshFromXA(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA +@ stdcall D3DXLoadMeshFromXA(str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA @ stdcall D3DXLoadMeshFromXInMemory(ptr long long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXInMemory -@ stdcall D3DXLoadMeshFromXResource(long ptr ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource -@ stdcall D3DXLoadMeshFromXW(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW +@ stdcall D3DXLoadMeshFromXResource(long str str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource +@ stdcall D3DXLoadMeshFromXW(wstr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW @ stdcall D3DXLoadMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXof -@ stdcall D3DXLoadMeshHierarchyFromXA(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA +@ stdcall D3DXLoadMeshHierarchyFromXA(str long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA @ stdcall D3DXLoadMeshHierarchyFromXInMemory(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXInMemory -@ stdcall D3DXLoadMeshHierarchyFromXW(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW +@ stdcall D3DXLoadMeshHierarchyFromXW(wstr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW @ stdcall D3DXLoadPatchMeshFromXof(ptr long ptr ptr ptr long ptr) d3dx9_36.D3DXLoadPatchMeshFromXof @ stdcall D3DXLoadPRTBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileA @ stdcall D3DXLoadPRTBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileW @ stdcall D3DXLoadPRTCompBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileA @ stdcall D3DXLoadPRTCompBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileW @ stdcall D3DXLoadSkinMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadSkinMeshFromXof -@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA +@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA @ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileInMemory -@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW +@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW @ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromMemory -@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA -@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW -@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long) d3dx9_36.D3DXLoadSurfaceFromSurface +@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA +@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW +@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromSurface @ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileA @ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileInMemory @ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileW @@ -196,8 +196,8 @@ @ stdcall D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceA @ stdcall D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceW @ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadVolumeFromVolume -@ stdcall D3DXMatrixAffineTransformation(ptr long ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation -@ stdcall D3DXMatrixAffineTransformation2D(ptr long ptr long ptr) d3dx9_36.D3DXMatrixAffineTransformation2D +@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation +@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr) d3dx9_36.D3DXMatrixAffineTransformation2D @ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixDecompose @ stdcall D3DXMatrixDeterminant(ptr) d3dx9_36.D3DXMatrixDeterminant @ stdcall D3DXMatrixInverse(ptr ptr ptr) d3dx9_36.D3DXMatrixInverse @@ -205,28 +205,28 @@ @ stdcall D3DXMatrixLookAtRH(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixLookAtRH @ stdcall D3DXMatrixMultiply(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiply @ stdcall D3DXMatrixMultiplyTranspose(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiplyTranspose -@ stdcall D3DXMatrixOrthoLH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoLH -@ stdcall D3DXMatrixOrthoOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterLH -@ stdcall D3DXMatrixOrthoOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterRH -@ stdcall D3DXMatrixOrthoRH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoRH -@ stdcall D3DXMatrixPerspectiveFovLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovLH -@ stdcall D3DXMatrixPerspectiveFovRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovRH -@ stdcall D3DXMatrixPerspectiveLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveLH -@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH -@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH -@ stdcall D3DXMatrixPerspectiveRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveRH +@ stdcall D3DXMatrixOrthoLH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoLH +@ stdcall D3DXMatrixOrthoOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterLH +@ stdcall D3DXMatrixOrthoOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterRH +@ stdcall D3DXMatrixOrthoRH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoRH +@ stdcall D3DXMatrixPerspectiveFovLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovLH +@ stdcall D3DXMatrixPerspectiveFovRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovRH +@ stdcall D3DXMatrixPerspectiveLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveLH +@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH +@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH +@ stdcall D3DXMatrixPerspectiveRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveRH @ stdcall D3DXMatrixReflect(ptr ptr) d3dx9_36.D3DXMatrixReflect -@ stdcall D3DXMatrixRotationAxis(ptr ptr long) d3dx9_36.D3DXMatrixRotationAxis +@ stdcall D3DXMatrixRotationAxis(ptr ptr float) d3dx9_36.D3DXMatrixRotationAxis @ stdcall D3DXMatrixRotationQuaternion(ptr ptr) d3dx9_36.D3DXMatrixRotationQuaternion -@ stdcall D3DXMatrixRotationX(ptr long) d3dx9_36.D3DXMatrixRotationX -@ stdcall D3DXMatrixRotationY(ptr long) d3dx9_36.D3DXMatrixRotationY -@ stdcall D3DXMatrixRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXMatrixRotationYawPitchRoll -@ stdcall D3DXMatrixRotationZ(ptr long) d3dx9_36.D3DXMatrixRotationZ -@ stdcall D3DXMatrixScaling(ptr long long long) d3dx9_36.D3DXMatrixScaling +@ stdcall D3DXMatrixRotationX(ptr float) d3dx9_36.D3DXMatrixRotationX +@ stdcall D3DXMatrixRotationY(ptr float) d3dx9_36.D3DXMatrixRotationY +@ stdcall D3DXMatrixRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXMatrixRotationYawPitchRoll +@ stdcall D3DXMatrixRotationZ(ptr float) d3dx9_36.D3DXMatrixRotationZ +@ stdcall D3DXMatrixScaling(ptr float float float) d3dx9_36.D3DXMatrixScaling @ stdcall D3DXMatrixShadow(ptr ptr ptr) d3dx9_36.D3DXMatrixShadow @ stdcall D3DXMatrixTransformation(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXMatrixTransformation -@ stdcall D3DXMatrixTransformation2D(ptr ptr long ptr ptr long ptr) d3dx9_36.D3DXMatrixTransformation2D -@ stdcall D3DXMatrixTranslation(ptr long long long) d3dx9_36.D3DXMatrixTranslation +@ stdcall D3DXMatrixTransformation2D(ptr ptr float ptr ptr float ptr) d3dx9_36.D3DXMatrixTransformation2D +@ stdcall D3DXMatrixTranslation(ptr float float float) d3dx9_36.D3DXMatrixTranslation @ stdcall D3DXMatrixTranspose(ptr ptr) d3dx9_36.D3DXMatrixTranspose @ stdcall D3DXOptimizeFaces(ptr long long long ptr) d3dx9_36.D3DXOptimizeFaces @ stdcall D3DXOptimizeVertices(ptr long long long ptr) d3dx9_36.D3DXOptimizeVertices @@ -237,21 +237,21 @@ @ stdcall D3DXPlaneTransform(ptr ptr ptr) d3dx9_36.D3DXPlaneTransform @ stdcall D3DXPlaneTransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXPlaneTransformArray @ stdcall D3DXPreprocessShader(ptr long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShader -@ stdcall D3DXPreprocessShaderFromFileA(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA -@ stdcall D3DXPreprocessShaderFromFileW(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW -@ stdcall D3DXPreprocessShaderFromResourceA(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA -@ stdcall D3DXPreprocessShaderFromResourceW(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW -@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXQuaternionBaryCentric +@ stdcall D3DXPreprocessShaderFromFileA(str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA +@ stdcall D3DXPreprocessShaderFromFileW(wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW +@ stdcall D3DXPreprocessShaderFromResourceA(long str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA +@ stdcall D3DXPreprocessShaderFromResourceW(long wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW +@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXQuaternionBaryCentric @ stdcall D3DXQuaternionExp(ptr ptr) d3dx9_36.D3DXQuaternionExp @ stdcall D3DXQuaternionInverse(ptr ptr) d3dx9_36.D3DXQuaternionInverse @ stdcall D3DXQuaternionLn(ptr ptr) d3dx9_36.D3DXQuaternionLn @ stdcall D3DXQuaternionMultiply(ptr ptr ptr) d3dx9_36.D3DXQuaternionMultiply @ stdcall D3DXQuaternionNormalize(ptr ptr) d3dx9_36.D3DXQuaternionNormalize -@ stdcall D3DXQuaternionRotationAxis(ptr ptr long) d3dx9_36.D3DXQuaternionRotationAxis +@ stdcall D3DXQuaternionRotationAxis(ptr ptr float) d3dx9_36.D3DXQuaternionRotationAxis @ stdcall D3DXQuaternionRotationMatrix(ptr ptr) d3dx9_36.D3DXQuaternionRotationMatrix -@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXQuaternionRotationYawPitchRoll -@ stdcall D3DXQuaternionSlerp(ptr ptr ptr long) d3dx9_36.D3DXQuaternionSlerp -@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXQuaternionSquad +@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXQuaternionRotationYawPitchRoll +@ stdcall D3DXQuaternionSlerp(ptr ptr ptr float) d3dx9_36.D3DXQuaternionSlerp +@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXQuaternionSquad @ stdcall D3DXQuaternionSquadSetup(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXQuaternionSquadSetup @ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr) d3dx9_36.D3DXQuaternionToAxisAngle @ stdcall D3DXRectPatchSize(ptr ptr ptr) d3dx9_36.D3DXRectPatchSize @@ -274,11 +274,11 @@ @ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW @ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd @ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot -@ stdcall D3DXSHEvalConeLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight +@ stdcall D3DXSHEvalConeLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight @ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection -@ stdcall D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight -@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight -@ stdcall D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight +@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight +@ stdcall D3DXSHEvalHemisphereLight(long ptr int128 int128 ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight +@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight @ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2 @ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3 @ stdcall D3DXSHMultiply4(ptr ptr ptr) d3dx9_36.D3DXSHMultiply4 @@ -288,10 +288,10 @@ @ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC @ stdcall D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr) d3dx9_36.D3DXSHPRTCompSuperCluster @ stdcall D3DXSHRotate(ptr long ptr ptr) d3dx9_36.D3DXSHRotate -@ stdcall D3DXSHRotateZ(ptr long long ptr) d3dx9_36.D3DXSHRotateZ -@ stdcall D3DXSHScale(ptr long ptr ptr) d3dx9_36.D3DXSHScale +@ stdcall D3DXSHRotateZ(ptr long float ptr) d3dx9_36.D3DXSHRotateZ +@ stdcall D3DXSHScale(ptr long ptr float) d3dx9_36.D3DXSHScale @ stdcall D3DXSimplifyMesh(ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXSimplifyMesh -@ stdcall D3DXSphereBoundProbe(ptr long ptr ptr) d3dx9_36.D3DXSphereBoundProbe +@ stdcall D3DXSphereBoundProbe(ptr float ptr ptr) d3dx9_36.D3DXSphereBoundProbe @ stdcall D3DXSplitMesh(ptr ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSplitMesh @ stdcall D3DXTessellateNPatches(ptr ptr long long ptr ptr) d3dx9_36.D3DXTessellateNPatches @ stdcall D3DXTessellateRectPatch(ptr ptr ptr ptr ptr) d3dx9_36.D3DXTessellateRectPatch @@ -302,9 +302,9 @@ @ stdcall D3DXUVAtlasPartition(ptr long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXUVAtlasPartition @ stdcall D3DXValidMesh(ptr ptr ptr) d3dx9_36.D3DXValidMesh @ stdcall D3DXValidPatchMesh(ptr ptr ptr ptr) d3dx9_36.D3DXValidPatchMesh -@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec2BaryCentric -@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2CatmullRom -@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2Hermite +@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec2BaryCentric +@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2CatmullRom +@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2Hermite @ stdcall D3DXVec2Normalize(ptr ptr) d3dx9_36.D3DXVec2Normalize @ stdcall D3DXVec2Transform(ptr ptr ptr) d3dx9_36.D3DXVec2Transform @ stdcall D3DXVec2TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformArray @@ -312,9 +312,9 @@ @ stdcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformCoordArray @ stdcall D3DXVec2TransformNormal(ptr ptr ptr) d3dx9_36.D3DXVec2TransformNormal @ stdcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformNormalArray -@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec3BaryCentric -@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3CatmullRom -@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3Hermite +@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec3BaryCentric +@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3CatmullRom +@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3Hermite @ stdcall D3DXVec3Normalize(ptr ptr) d3dx9_36.D3DXVec3Normalize @ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Project @ stdcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3ProjectArray @@ -326,10 +326,10 @@ @ stdcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformNormalArray @ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Unproject @ stdcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3UnprojectArray -@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec4BaryCentric -@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4CatmullRom +@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec4BaryCentric +@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4CatmullRom @ stdcall D3DXVec4Cross(ptr ptr ptr ptr) d3dx9_36.D3DXVec4Cross -@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4Hermite +@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4Hermite @ stdcall D3DXVec4Normalize(ptr ptr) d3dx9_36.D3DXVec4Normalize @ stdcall D3DXVec4Transform(ptr ptr ptr) d3dx9_36.D3DXVec4Transform @ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec4TransformArray diff --git a/dll/directx/wine/d3dx9_37/d3dx9_37_main.c b/dll/directx/wine/d3dx9_37/d3dx9_37_main.c index 9600afab7ba..d84dc99d947 100644 --- a/dll/directx/wine/d3dx9_37/d3dx9_37_main.c +++ b/dll/directx/wine/d3dx9_37/d3dx9_37_main.c @@ -47,8 +47,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } diff --git a/dll/directx/wine/d3dx9_38/CMakeLists.txt b/dll/directx/wine/d3dx9_38/CMakeLists.txt index bb6212ff722..8ffd5ade4c1 100644 --- a/dll/directx/wine/d3dx9_38/CMakeLists.txt +++ b/dll/directx/wine/d3dx9_38/CMakeLists.txt @@ -1,26 +1,15 @@ +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) + spec2def(d3dx9_38.dll d3dx9_38.spec) list(APPEND SOURCE d3dx9_38_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_38.def) -add_definitions(-D__WINESRC__) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_library(d3dx9_38 SHARED ${SOURCE}) +add_library(d3dx9_38 SHARED ${SOURCE} version.rc) set_module_type(d3dx9_38 win32dll) target_link_libraries(d3dx9_38 wine) - -add_importlibs(d3dx9_38 - d3dx9_36 - d3d9 - user32 - gdi32 - advapi32 - msvcrt - kernel32 - ntdll) - -add_dependencies(d3dx9_38 wineheaders) +add_importlibs(d3dx9_38 d3dx9_36 msvcrt kernel32 ntdll) add_cd_file(TARGET d3dx9_38 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_38/d3dx9_38.spec b/dll/directx/wine/d3dx9_38/d3dx9_38.spec index bdd1c73fdcc..777c03529fa 100644 --- a/dll/directx/wine/d3dx9_38/d3dx9_38.spec +++ b/dll/directx/wine/d3dx9_38/d3dx9_38.spec @@ -1,21 +1,21 @@ @ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShader -@ stdcall D3DXAssembleShaderFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA -@ stdcall D3DXAssembleShaderFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW -@ stdcall D3DXAssembleShaderFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA -@ stdcall D3DXAssembleShaderFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW +@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA +@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW +@ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA +@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW @ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) d3dx9_36.D3DXBoxBoundProbe -@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckCubeTextureRequirements -@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckTextureRequirements +@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckCubeTextureRequirements +@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckTextureRequirements @ stdcall D3DXCheckVersion(long long) -@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckVolumeTextureRequirements -@ stdcall D3DXCleanMesh(ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh -@ stdcall D3DXColorAdjustContrast(ptr ptr long) d3dx9_36.D3DXColorAdjustContrast -@ stdcall D3DXColorAdjustSaturation(ptr ptr long) d3dx9_36.D3DXColorAdjustSaturation -@ stdcall D3DXCompileShader(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShader -@ stdcall D3DXCompileShaderFromFileA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA -@ stdcall D3DXCompileShaderFromFileW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW -@ stdcall D3DXCompileShaderFromResourceA(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA -@ stdcall D3DXCompileShaderFromResourceW(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW +@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckVolumeTextureRequirements +@ stdcall D3DXCleanMesh(long ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh +@ stdcall D3DXColorAdjustContrast(ptr ptr float) d3dx9_36.D3DXColorAdjustContrast +@ stdcall D3DXColorAdjustSaturation(ptr ptr float) d3dx9_36.D3DXColorAdjustSaturation +@ stdcall D3DXCompileShader(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShader +@ stdcall D3DXCompileShaderFromFileA(str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA +@ stdcall D3DXCompileShaderFromFileW(wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW +@ stdcall D3DXCompileShaderFromResourceA(ptr str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA +@ stdcall D3DXCompileShaderFromResourceW(ptr wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW @ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingBox @ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingSphere @ stdcall D3DXComputeIMTFromPerVertexSignal(ptr ptr long long long ptr ptr ptr) d3dx9_36.D3DXComputeIMTFromPerVertexSignal @@ -31,7 +31,7 @@ @ stdcall D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToSingleStrip @ stdcall D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToStrips @ stdcall D3DXCreateAnimationController(long long long long ptr) d3dx9_36.D3DXCreateAnimationController -@ stdcall D3DXCreateBox(ptr long long long ptr ptr) d3dx9_36.D3DXCreateBox +@ stdcall D3DXCreateBox(ptr float float float ptr ptr) d3dx9_36.D3DXCreateBox @ stdcall D3DXCreateBuffer(long ptr) d3dx9_36.D3DXCreateBuffer @ stdcall D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr) d3dx9_36.D3DXCreateCompressedAnimationSet @ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr) d3dx9_36.D3DXCreateCubeTexture @@ -48,24 +48,24 @@ @ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder @ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffect @ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler -@ stdcall D3DXCreateEffectCompilerFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA -@ stdcall D3DXCreateEffectCompilerFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW -@ stdcall D3DXCreateEffectCompilerFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA -@ stdcall D3DXCreateEffectCompilerFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW -@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx -@ stdcall D3DXCreateEffectFromFileA(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA -@ stdcall D3DXCreateEffectFromFileExA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA -@ stdcall D3DXCreateEffectFromFileExW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW -@ stdcall D3DXCreateEffectFromFileW(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW -@ stdcall D3DXCreateEffectFromResourceA(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA -@ stdcall D3DXCreateEffectFromResourceExA(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA -@ stdcall D3DXCreateEffectFromResourceExW(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW -@ stdcall D3DXCreateEffectFromResourceW(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW +@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA +@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW +@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA +@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW +@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx +@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA +@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA +@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW +@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW +@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA +@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA +@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW +@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW @ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool -@ stdcall D3DXCreateFontA(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontA +@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectW -@ stdcall D3DXCreateFontW(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontW +@ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) d3dx9_36.D3DXCreateFontW @ stdcall D3DXCreateFragmentLinker(ptr long ptr) d3dx9_36.D3DXCreateFragmentLinker @ stdcall D3DXCreateFragmentLinkerEx(ptr long long ptr) d3dx9_36.D3DXCreateFragmentLinkerEx @ stdcall D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateKeyframedAnimationSet @@ -87,22 +87,22 @@ @ stdcall D3DXCreateSkinInfo(long ptr long ptr) d3dx9_36.D3DXCreateSkinInfo @ stdcall D3DXCreateSkinInfoFromBlendedMesh(ptr long ptr ptr) d3dx9_36.D3DXCreateSkinInfoFromBlendedMesh @ stdcall D3DXCreateSkinInfoFVF(long long long ptr) d3dx9_36.D3DXCreateSkinInfoFVF -@ stdcall D3DXCreateSphere(ptr long long long ptr ptr) d3dx9_36.D3DXCreateSphere +@ stdcall D3DXCreateSphere(ptr float long long ptr ptr) d3dx9_36.D3DXCreateSphere @ stdcall D3DXCreateSprite(ptr ptr) d3dx9_36.D3DXCreateSprite @ stdcall D3DXCreateTeapot(ptr ptr ptr) d3dx9_36.D3DXCreateTeapot -@ stdcall D3DXCreateTextA(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextA -@ stdcall D3DXCreateTextW(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextW +@ stdcall D3DXCreateTextA(ptr long str float float ptr ptr ptr) d3dx9_36.D3DXCreateTextA +@ stdcall D3DXCreateTextW(ptr long wstr float float ptr ptr ptr) d3dx9_36.D3DXCreateTextW @ stdcall D3DXCreateTexture(ptr long long long long long long ptr) d3dx9_36.D3DXCreateTexture -@ stdcall D3DXCreateTextureFromFileA(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileA -@ stdcall D3DXCreateTextureFromFileExA(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA -@ stdcall D3DXCreateTextureFromFileExW(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW +@ stdcall D3DXCreateTextureFromFileA(ptr str ptr) d3dx9_36.D3DXCreateTextureFromFileA +@ stdcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA +@ stdcall D3DXCreateTextureFromFileExW(ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW @ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateTextureFromFileInMemory @ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileInMemoryEx -@ stdcall D3DXCreateTextureFromFileW(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileW -@ stdcall D3DXCreateTextureFromResourceA(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceA -@ stdcall D3DXCreateTextureFromResourceExA(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA -@ stdcall D3DXCreateTextureFromResourceExW(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW -@ stdcall D3DXCreateTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceW +@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromFileW +@ stdcall D3DXCreateTextureFromResourceA(ptr ptr str ptr) d3dx9_36.D3DXCreateTextureFromResourceA +@ stdcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA +@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW +@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromResourceW @ stdcall D3DXCreateTextureGutterHelper(long long ptr long ptr) d3dx9_36.D3DXCreateTextureGutterHelper @ stdcall D3DXCreateTextureShader(ptr ptr) d3dx9_36.D3DXCreateTextureShader @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateTorus @@ -138,7 +138,7 @@ @ stdcall D3DXFrameFind(ptr ptr) d3dx9_36.D3DXFrameFind @ stdcall D3DXFrameNumNamedMatrices(ptr) d3dx9_36.D3DXFrameNumNamedMatrices @ stdcall D3DXFrameRegisterNamedMatrices(ptr ptr) d3dx9_36.D3DXFrameRegisterNamedMatrices -@ stdcall D3DXFresnelTerm(long long) d3dx9_36.D3DXFresnelTerm +@ stdcall D3DXFresnelTerm(float float) d3dx9_36.D3DXFresnelTerm @ stdcall D3DXFVFFromDeclarator(ptr ptr) d3dx9_36.D3DXFVFFromDeclarator @ stdcall D3DXGatherFragments(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragments @ stdcall D3DXGatherFragmentsFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragmentsFromFileA @@ -151,11 +151,11 @@ @ stdcall D3DXGetDeclVertexSize(ptr long) d3dx9_36.D3DXGetDeclVertexSize @ stdcall D3DXGetDriverLevel(ptr) d3dx9_36.D3DXGetDriverLevel @ stdcall D3DXGetFVFVertexSize(long) d3dx9_36.D3DXGetFVFVertexSize -@ stdcall D3DXGetImageInfoFromFileA(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileA +@ stdcall D3DXGetImageInfoFromFileA(str ptr) d3dx9_36.D3DXGetImageInfoFromFileA @ stdcall D3DXGetImageInfoFromFileInMemory(ptr long ptr) d3dx9_36.D3DXGetImageInfoFromFileInMemory -@ stdcall D3DXGetImageInfoFromFileW(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileW -@ stdcall D3DXGetImageInfoFromResourceA(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceA -@ stdcall D3DXGetImageInfoFromResourceW(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW +@ stdcall D3DXGetImageInfoFromFileW(wstr ptr) d3dx9_36.D3DXGetImageInfoFromFileW +@ stdcall D3DXGetImageInfoFromResourceA(long str ptr) d3dx9_36.D3DXGetImageInfoFromResourceA +@ stdcall D3DXGetImageInfoFromResourceW(long wstr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW @ stdcall D3DXGetPixelShaderProfile(ptr) d3dx9_36.D3DXGetPixelShaderProfile @ stdcall D3DXGetShaderConstantTable(ptr ptr) d3dx9_36.D3DXGetShaderConstantTable @ stdcall D3DXGetShaderConstantTableEx(ptr long ptr) d3dx9_36.D3DXGetShaderConstantTableEx @@ -168,27 +168,27 @@ @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersect @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectSubset @ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectTri -@ stdcall D3DXLoadMeshFromXA(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA +@ stdcall D3DXLoadMeshFromXA(str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA @ stdcall D3DXLoadMeshFromXInMemory(ptr long long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXInMemory -@ stdcall D3DXLoadMeshFromXResource(long ptr ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource -@ stdcall D3DXLoadMeshFromXW(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW +@ stdcall D3DXLoadMeshFromXResource(long str str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource +@ stdcall D3DXLoadMeshFromXW(wstr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW @ stdcall D3DXLoadMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXof -@ stdcall D3DXLoadMeshHierarchyFromXA(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA +@ stdcall D3DXLoadMeshHierarchyFromXA(str long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA @ stdcall D3DXLoadMeshHierarchyFromXInMemory(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXInMemory -@ stdcall D3DXLoadMeshHierarchyFromXW(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW +@ stdcall D3DXLoadMeshHierarchyFromXW(wstr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW @ stdcall D3DXLoadPatchMeshFromXof(ptr long ptr ptr ptr long ptr) d3dx9_36.D3DXLoadPatchMeshFromXof @ stdcall D3DXLoadPRTBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileA @ stdcall D3DXLoadPRTBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileW @ stdcall D3DXLoadPRTCompBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileA @ stdcall D3DXLoadPRTCompBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileW @ stdcall D3DXLoadSkinMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadSkinMeshFromXof -@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA +@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA @ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileInMemory -@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW +@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW @ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromMemory -@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA -@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW -@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long) d3dx9_36.D3DXLoadSurfaceFromSurface +@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA +@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW +@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromSurface @ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileA @ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileInMemory @ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileW @@ -196,8 +196,8 @@ @ stdcall D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceA @ stdcall D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceW @ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadVolumeFromVolume -@ stdcall D3DXMatrixAffineTransformation(ptr long ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation -@ stdcall D3DXMatrixAffineTransformation2D(ptr long ptr long ptr) d3dx9_36.D3DXMatrixAffineTransformation2D +@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation +@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr) d3dx9_36.D3DXMatrixAffineTransformation2D @ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixDecompose @ stdcall D3DXMatrixDeterminant(ptr) d3dx9_36.D3DXMatrixDeterminant @ stdcall D3DXMatrixInverse(ptr ptr ptr) d3dx9_36.D3DXMatrixInverse @@ -205,28 +205,28 @@ @ stdcall D3DXMatrixLookAtRH(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixLookAtRH @ stdcall D3DXMatrixMultiply(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiply @ stdcall D3DXMatrixMultiplyTranspose(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiplyTranspose -@ stdcall D3DXMatrixOrthoLH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoLH -@ stdcall D3DXMatrixOrthoOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterLH -@ stdcall D3DXMatrixOrthoOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterRH -@ stdcall D3DXMatrixOrthoRH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoRH -@ stdcall D3DXMatrixPerspectiveFovLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovLH -@ stdcall D3DXMatrixPerspectiveFovRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovRH -@ stdcall D3DXMatrixPerspectiveLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveLH -@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH -@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH -@ stdcall D3DXMatrixPerspectiveRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveRH +@ stdcall D3DXMatrixOrthoLH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoLH +@ stdcall D3DXMatrixOrthoOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterLH +@ stdcall D3DXMatrixOrthoOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterRH +@ stdcall D3DXMatrixOrthoRH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoRH +@ stdcall D3DXMatrixPerspectiveFovLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovLH +@ stdcall D3DXMatrixPerspectiveFovRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovRH +@ stdcall D3DXMatrixPerspectiveLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveLH +@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH +@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH +@ stdcall D3DXMatrixPerspectiveRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveRH @ stdcall D3DXMatrixReflect(ptr ptr) d3dx9_36.D3DXMatrixReflect -@ stdcall D3DXMatrixRotationAxis(ptr ptr long) d3dx9_36.D3DXMatrixRotationAxis +@ stdcall D3DXMatrixRotationAxis(ptr ptr float) d3dx9_36.D3DXMatrixRotationAxis @ stdcall D3DXMatrixRotationQuaternion(ptr ptr) d3dx9_36.D3DXMatrixRotationQuaternion -@ stdcall D3DXMatrixRotationX(ptr long) d3dx9_36.D3DXMatrixRotationX -@ stdcall D3DXMatrixRotationY(ptr long) d3dx9_36.D3DXMatrixRotationY -@ stdcall D3DXMatrixRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXMatrixRotationYawPitchRoll -@ stdcall D3DXMatrixRotationZ(ptr long) d3dx9_36.D3DXMatrixRotationZ -@ stdcall D3DXMatrixScaling(ptr long long long) d3dx9_36.D3DXMatrixScaling +@ stdcall D3DXMatrixRotationX(ptr float) d3dx9_36.D3DXMatrixRotationX +@ stdcall D3DXMatrixRotationY(ptr float) d3dx9_36.D3DXMatrixRotationY +@ stdcall D3DXMatrixRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXMatrixRotationYawPitchRoll +@ stdcall D3DXMatrixRotationZ(ptr float) d3dx9_36.D3DXMatrixRotationZ +@ stdcall D3DXMatrixScaling(ptr float float float) d3dx9_36.D3DXMatrixScaling @ stdcall D3DXMatrixShadow(ptr ptr ptr) d3dx9_36.D3DXMatrixShadow @ stdcall D3DXMatrixTransformation(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXMatrixTransformation -@ stdcall D3DXMatrixTransformation2D(ptr ptr long ptr ptr long ptr) d3dx9_36.D3DXMatrixTransformation2D -@ stdcall D3DXMatrixTranslation(ptr long long long) d3dx9_36.D3DXMatrixTranslation +@ stdcall D3DXMatrixTransformation2D(ptr ptr float ptr ptr float ptr) d3dx9_36.D3DXMatrixTransformation2D +@ stdcall D3DXMatrixTranslation(ptr float float float) d3dx9_36.D3DXMatrixTranslation @ stdcall D3DXMatrixTranspose(ptr ptr) d3dx9_36.D3DXMatrixTranspose @ stdcall D3DXOptimizeFaces(ptr long long long ptr) d3dx9_36.D3DXOptimizeFaces @ stdcall D3DXOptimizeVertices(ptr long long long ptr) d3dx9_36.D3DXOptimizeVertices @@ -237,21 +237,21 @@ @ stdcall D3DXPlaneTransform(ptr ptr ptr) d3dx9_36.D3DXPlaneTransform @ stdcall D3DXPlaneTransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXPlaneTransformArray @ stdcall D3DXPreprocessShader(ptr long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShader -@ stdcall D3DXPreprocessShaderFromFileA(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA -@ stdcall D3DXPreprocessShaderFromFileW(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW -@ stdcall D3DXPreprocessShaderFromResourceA(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA -@ stdcall D3DXPreprocessShaderFromResourceW(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW -@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXQuaternionBaryCentric +@ stdcall D3DXPreprocessShaderFromFileA(str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA +@ stdcall D3DXPreprocessShaderFromFileW(wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW +@ stdcall D3DXPreprocessShaderFromResourceA(long str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA +@ stdcall D3DXPreprocessShaderFromResourceW(long wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW +@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXQuaternionBaryCentric @ stdcall D3DXQuaternionExp(ptr ptr) d3dx9_36.D3DXQuaternionExp @ stdcall D3DXQuaternionInverse(ptr ptr) d3dx9_36.D3DXQuaternionInverse @ stdcall D3DXQuaternionLn(ptr ptr) d3dx9_36.D3DXQuaternionLn @ stdcall D3DXQuaternionMultiply(ptr ptr ptr) d3dx9_36.D3DXQuaternionMultiply @ stdcall D3DXQuaternionNormalize(ptr ptr) d3dx9_36.D3DXQuaternionNormalize -@ stdcall D3DXQuaternionRotationAxis(ptr ptr long) d3dx9_36.D3DXQuaternionRotationAxis +@ stdcall D3DXQuaternionRotationAxis(ptr ptr float) d3dx9_36.D3DXQuaternionRotationAxis @ stdcall D3DXQuaternionRotationMatrix(ptr ptr) d3dx9_36.D3DXQuaternionRotationMatrix -@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXQuaternionRotationYawPitchRoll -@ stdcall D3DXQuaternionSlerp(ptr ptr ptr long) d3dx9_36.D3DXQuaternionSlerp -@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXQuaternionSquad +@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXQuaternionRotationYawPitchRoll +@ stdcall D3DXQuaternionSlerp(ptr ptr ptr float) d3dx9_36.D3DXQuaternionSlerp +@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXQuaternionSquad @ stdcall D3DXQuaternionSquadSetup(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXQuaternionSquadSetup @ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr) d3dx9_36.D3DXQuaternionToAxisAngle @ stdcall D3DXRectPatchSize(ptr ptr ptr) d3dx9_36.D3DXRectPatchSize @@ -274,11 +274,11 @@ @ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW @ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd @ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot -@ stdcall D3DXSHEvalConeLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight +@ stdcall D3DXSHEvalConeLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight @ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection -@ stdcall D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight -@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight -@ stdcall D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight +@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight +@ stdcall D3DXSHEvalHemisphereLight(long ptr int128 int128 ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight +@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight @ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2 @ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3 @ stdcall D3DXSHMultiply4(ptr ptr ptr) d3dx9_36.D3DXSHMultiply4 @@ -288,10 +288,10 @@ @ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC @ stdcall D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr) d3dx9_36.D3DXSHPRTCompSuperCluster @ stdcall D3DXSHRotate(ptr long ptr ptr) d3dx9_36.D3DXSHRotate -@ stdcall D3DXSHRotateZ(ptr long long ptr) d3dx9_36.D3DXSHRotateZ -@ stdcall D3DXSHScale(ptr long ptr ptr) d3dx9_36.D3DXSHScale +@ stdcall D3DXSHRotateZ(ptr long float ptr) d3dx9_36.D3DXSHRotateZ +@ stdcall D3DXSHScale(ptr long ptr float) d3dx9_36.D3DXSHScale @ stdcall D3DXSimplifyMesh(ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXSimplifyMesh -@ stdcall D3DXSphereBoundProbe(ptr long ptr ptr) d3dx9_36.D3DXSphereBoundProbe +@ stdcall D3DXSphereBoundProbe(ptr float ptr ptr) d3dx9_36.D3DXSphereBoundProbe @ stdcall D3DXSplitMesh(ptr ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSplitMesh @ stdcall D3DXTessellateNPatches(ptr ptr long long ptr ptr) d3dx9_36.D3DXTessellateNPatches @ stdcall D3DXTessellateRectPatch(ptr ptr ptr ptr ptr) d3dx9_36.D3DXTessellateRectPatch @@ -302,9 +302,9 @@ @ stdcall D3DXUVAtlasPartition(ptr long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXUVAtlasPartition @ stdcall D3DXValidMesh(ptr ptr ptr) d3dx9_36.D3DXValidMesh @ stdcall D3DXValidPatchMesh(ptr ptr ptr ptr) d3dx9_36.D3DXValidPatchMesh -@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec2BaryCentric -@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2CatmullRom -@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2Hermite +@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec2BaryCentric +@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2CatmullRom +@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2Hermite @ stdcall D3DXVec2Normalize(ptr ptr) d3dx9_36.D3DXVec2Normalize @ stdcall D3DXVec2Transform(ptr ptr ptr) d3dx9_36.D3DXVec2Transform @ stdcall D3DXVec2TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformArray @@ -312,9 +312,9 @@ @ stdcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformCoordArray @ stdcall D3DXVec2TransformNormal(ptr ptr ptr) d3dx9_36.D3DXVec2TransformNormal @ stdcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformNormalArray -@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec3BaryCentric -@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3CatmullRom -@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3Hermite +@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec3BaryCentric +@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3CatmullRom +@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3Hermite @ stdcall D3DXVec3Normalize(ptr ptr) d3dx9_36.D3DXVec3Normalize @ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Project @ stdcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3ProjectArray @@ -326,10 +326,10 @@ @ stdcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformNormalArray @ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Unproject @ stdcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3UnprojectArray -@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec4BaryCentric -@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4CatmullRom +@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec4BaryCentric +@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4CatmullRom @ stdcall D3DXVec4Cross(ptr ptr ptr ptr) d3dx9_36.D3DXVec4Cross -@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4Hermite +@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4Hermite @ stdcall D3DXVec4Normalize(ptr ptr) d3dx9_36.D3DXVec4Normalize @ stdcall D3DXVec4Transform(ptr ptr ptr) d3dx9_36.D3DXVec4Transform @ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec4TransformArray diff --git a/dll/directx/wine/d3dx9_38/d3dx9_38_main.c b/dll/directx/wine/d3dx9_38/d3dx9_38_main.c index 665440a4456..2910e393289 100644 --- a/dll/directx/wine/d3dx9_38/d3dx9_38_main.c +++ b/dll/directx/wine/d3dx9_38/d3dx9_38_main.c @@ -47,8 +47,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } diff --git a/dll/directx/wine/d3dx9_39/CMakeLists.txt b/dll/directx/wine/d3dx9_39/CMakeLists.txt index d538bb8ead8..d4775d73bf2 100644 --- a/dll/directx/wine/d3dx9_39/CMakeLists.txt +++ b/dll/directx/wine/d3dx9_39/CMakeLists.txt @@ -1,26 +1,15 @@ +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) + spec2def(d3dx9_39.dll d3dx9_39.spec) list(APPEND SOURCE d3dx9_39_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_39.def) -add_definitions(-D__WINESRC__) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_library(d3dx9_39 SHARED ${SOURCE}) +add_library(d3dx9_39 SHARED ${SOURCE} version.rc) set_module_type(d3dx9_39 win32dll) target_link_libraries(d3dx9_39 wine) - -add_importlibs(d3dx9_39 - d3dx9_36 - d3d9 - user32 - gdi32 - advapi32 - msvcrt - kernel32 - ntdll) - -add_dependencies(d3dx9_39 wineheaders) +add_importlibs(d3dx9_39 d3dx9_36 msvcrt kernel32 ntdll) add_cd_file(TARGET d3dx9_39 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_39/d3dx9_39.spec b/dll/directx/wine/d3dx9_39/d3dx9_39.spec index bdd1c73fdcc..777c03529fa 100644 --- a/dll/directx/wine/d3dx9_39/d3dx9_39.spec +++ b/dll/directx/wine/d3dx9_39/d3dx9_39.spec @@ -1,21 +1,21 @@ @ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShader -@ stdcall D3DXAssembleShaderFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA -@ stdcall D3DXAssembleShaderFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW -@ stdcall D3DXAssembleShaderFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA -@ stdcall D3DXAssembleShaderFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW +@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA +@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW +@ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA +@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW @ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) d3dx9_36.D3DXBoxBoundProbe -@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckCubeTextureRequirements -@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckTextureRequirements +@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckCubeTextureRequirements +@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckTextureRequirements @ stdcall D3DXCheckVersion(long long) -@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckVolumeTextureRequirements -@ stdcall D3DXCleanMesh(ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh -@ stdcall D3DXColorAdjustContrast(ptr ptr long) d3dx9_36.D3DXColorAdjustContrast -@ stdcall D3DXColorAdjustSaturation(ptr ptr long) d3dx9_36.D3DXColorAdjustSaturation -@ stdcall D3DXCompileShader(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShader -@ stdcall D3DXCompileShaderFromFileA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA -@ stdcall D3DXCompileShaderFromFileW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW -@ stdcall D3DXCompileShaderFromResourceA(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA -@ stdcall D3DXCompileShaderFromResourceW(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW +@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckVolumeTextureRequirements +@ stdcall D3DXCleanMesh(long ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh +@ stdcall D3DXColorAdjustContrast(ptr ptr float) d3dx9_36.D3DXColorAdjustContrast +@ stdcall D3DXColorAdjustSaturation(ptr ptr float) d3dx9_36.D3DXColorAdjustSaturation +@ stdcall D3DXCompileShader(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShader +@ stdcall D3DXCompileShaderFromFileA(str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA +@ stdcall D3DXCompileShaderFromFileW(wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW +@ stdcall D3DXCompileShaderFromResourceA(ptr str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA +@ stdcall D3DXCompileShaderFromResourceW(ptr wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW @ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingBox @ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingSphere @ stdcall D3DXComputeIMTFromPerVertexSignal(ptr ptr long long long ptr ptr ptr) d3dx9_36.D3DXComputeIMTFromPerVertexSignal @@ -31,7 +31,7 @@ @ stdcall D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToSingleStrip @ stdcall D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToStrips @ stdcall D3DXCreateAnimationController(long long long long ptr) d3dx9_36.D3DXCreateAnimationController -@ stdcall D3DXCreateBox(ptr long long long ptr ptr) d3dx9_36.D3DXCreateBox +@ stdcall D3DXCreateBox(ptr float float float ptr ptr) d3dx9_36.D3DXCreateBox @ stdcall D3DXCreateBuffer(long ptr) d3dx9_36.D3DXCreateBuffer @ stdcall D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr) d3dx9_36.D3DXCreateCompressedAnimationSet @ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr) d3dx9_36.D3DXCreateCubeTexture @@ -48,24 +48,24 @@ @ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder @ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffect @ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler -@ stdcall D3DXCreateEffectCompilerFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA -@ stdcall D3DXCreateEffectCompilerFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW -@ stdcall D3DXCreateEffectCompilerFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA -@ stdcall D3DXCreateEffectCompilerFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW -@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx -@ stdcall D3DXCreateEffectFromFileA(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA -@ stdcall D3DXCreateEffectFromFileExA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA -@ stdcall D3DXCreateEffectFromFileExW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW -@ stdcall D3DXCreateEffectFromFileW(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW -@ stdcall D3DXCreateEffectFromResourceA(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA -@ stdcall D3DXCreateEffectFromResourceExA(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA -@ stdcall D3DXCreateEffectFromResourceExW(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW -@ stdcall D3DXCreateEffectFromResourceW(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW +@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA +@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW +@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA +@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW +@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx +@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA +@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA +@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW +@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW +@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA +@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA +@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW +@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW @ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool -@ stdcall D3DXCreateFontA(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontA +@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectW -@ stdcall D3DXCreateFontW(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontW +@ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) d3dx9_36.D3DXCreateFontW @ stdcall D3DXCreateFragmentLinker(ptr long ptr) d3dx9_36.D3DXCreateFragmentLinker @ stdcall D3DXCreateFragmentLinkerEx(ptr long long ptr) d3dx9_36.D3DXCreateFragmentLinkerEx @ stdcall D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateKeyframedAnimationSet @@ -87,22 +87,22 @@ @ stdcall D3DXCreateSkinInfo(long ptr long ptr) d3dx9_36.D3DXCreateSkinInfo @ stdcall D3DXCreateSkinInfoFromBlendedMesh(ptr long ptr ptr) d3dx9_36.D3DXCreateSkinInfoFromBlendedMesh @ stdcall D3DXCreateSkinInfoFVF(long long long ptr) d3dx9_36.D3DXCreateSkinInfoFVF -@ stdcall D3DXCreateSphere(ptr long long long ptr ptr) d3dx9_36.D3DXCreateSphere +@ stdcall D3DXCreateSphere(ptr float long long ptr ptr) d3dx9_36.D3DXCreateSphere @ stdcall D3DXCreateSprite(ptr ptr) d3dx9_36.D3DXCreateSprite @ stdcall D3DXCreateTeapot(ptr ptr ptr) d3dx9_36.D3DXCreateTeapot -@ stdcall D3DXCreateTextA(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextA -@ stdcall D3DXCreateTextW(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextW +@ stdcall D3DXCreateTextA(ptr long str float float ptr ptr ptr) d3dx9_36.D3DXCreateTextA +@ stdcall D3DXCreateTextW(ptr long wstr float float ptr ptr ptr) d3dx9_36.D3DXCreateTextW @ stdcall D3DXCreateTexture(ptr long long long long long long ptr) d3dx9_36.D3DXCreateTexture -@ stdcall D3DXCreateTextureFromFileA(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileA -@ stdcall D3DXCreateTextureFromFileExA(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA -@ stdcall D3DXCreateTextureFromFileExW(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW +@ stdcall D3DXCreateTextureFromFileA(ptr str ptr) d3dx9_36.D3DXCreateTextureFromFileA +@ stdcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA +@ stdcall D3DXCreateTextureFromFileExW(ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW @ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateTextureFromFileInMemory @ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileInMemoryEx -@ stdcall D3DXCreateTextureFromFileW(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileW -@ stdcall D3DXCreateTextureFromResourceA(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceA -@ stdcall D3DXCreateTextureFromResourceExA(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA -@ stdcall D3DXCreateTextureFromResourceExW(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW -@ stdcall D3DXCreateTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceW +@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromFileW +@ stdcall D3DXCreateTextureFromResourceA(ptr ptr str ptr) d3dx9_36.D3DXCreateTextureFromResourceA +@ stdcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA +@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW +@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromResourceW @ stdcall D3DXCreateTextureGutterHelper(long long ptr long ptr) d3dx9_36.D3DXCreateTextureGutterHelper @ stdcall D3DXCreateTextureShader(ptr ptr) d3dx9_36.D3DXCreateTextureShader @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateTorus @@ -138,7 +138,7 @@ @ stdcall D3DXFrameFind(ptr ptr) d3dx9_36.D3DXFrameFind @ stdcall D3DXFrameNumNamedMatrices(ptr) d3dx9_36.D3DXFrameNumNamedMatrices @ stdcall D3DXFrameRegisterNamedMatrices(ptr ptr) d3dx9_36.D3DXFrameRegisterNamedMatrices -@ stdcall D3DXFresnelTerm(long long) d3dx9_36.D3DXFresnelTerm +@ stdcall D3DXFresnelTerm(float float) d3dx9_36.D3DXFresnelTerm @ stdcall D3DXFVFFromDeclarator(ptr ptr) d3dx9_36.D3DXFVFFromDeclarator @ stdcall D3DXGatherFragments(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragments @ stdcall D3DXGatherFragmentsFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragmentsFromFileA @@ -151,11 +151,11 @@ @ stdcall D3DXGetDeclVertexSize(ptr long) d3dx9_36.D3DXGetDeclVertexSize @ stdcall D3DXGetDriverLevel(ptr) d3dx9_36.D3DXGetDriverLevel @ stdcall D3DXGetFVFVertexSize(long) d3dx9_36.D3DXGetFVFVertexSize -@ stdcall D3DXGetImageInfoFromFileA(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileA +@ stdcall D3DXGetImageInfoFromFileA(str ptr) d3dx9_36.D3DXGetImageInfoFromFileA @ stdcall D3DXGetImageInfoFromFileInMemory(ptr long ptr) d3dx9_36.D3DXGetImageInfoFromFileInMemory -@ stdcall D3DXGetImageInfoFromFileW(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileW -@ stdcall D3DXGetImageInfoFromResourceA(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceA -@ stdcall D3DXGetImageInfoFromResourceW(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW +@ stdcall D3DXGetImageInfoFromFileW(wstr ptr) d3dx9_36.D3DXGetImageInfoFromFileW +@ stdcall D3DXGetImageInfoFromResourceA(long str ptr) d3dx9_36.D3DXGetImageInfoFromResourceA +@ stdcall D3DXGetImageInfoFromResourceW(long wstr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW @ stdcall D3DXGetPixelShaderProfile(ptr) d3dx9_36.D3DXGetPixelShaderProfile @ stdcall D3DXGetShaderConstantTable(ptr ptr) d3dx9_36.D3DXGetShaderConstantTable @ stdcall D3DXGetShaderConstantTableEx(ptr long ptr) d3dx9_36.D3DXGetShaderConstantTableEx @@ -168,27 +168,27 @@ @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersect @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectSubset @ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectTri -@ stdcall D3DXLoadMeshFromXA(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA +@ stdcall D3DXLoadMeshFromXA(str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA @ stdcall D3DXLoadMeshFromXInMemory(ptr long long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXInMemory -@ stdcall D3DXLoadMeshFromXResource(long ptr ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource -@ stdcall D3DXLoadMeshFromXW(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW +@ stdcall D3DXLoadMeshFromXResource(long str str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource +@ stdcall D3DXLoadMeshFromXW(wstr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW @ stdcall D3DXLoadMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXof -@ stdcall D3DXLoadMeshHierarchyFromXA(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA +@ stdcall D3DXLoadMeshHierarchyFromXA(str long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA @ stdcall D3DXLoadMeshHierarchyFromXInMemory(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXInMemory -@ stdcall D3DXLoadMeshHierarchyFromXW(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW +@ stdcall D3DXLoadMeshHierarchyFromXW(wstr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW @ stdcall D3DXLoadPatchMeshFromXof(ptr long ptr ptr ptr long ptr) d3dx9_36.D3DXLoadPatchMeshFromXof @ stdcall D3DXLoadPRTBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileA @ stdcall D3DXLoadPRTBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileW @ stdcall D3DXLoadPRTCompBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileA @ stdcall D3DXLoadPRTCompBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileW @ stdcall D3DXLoadSkinMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadSkinMeshFromXof -@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA +@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA @ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileInMemory -@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW +@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW @ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromMemory -@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA -@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW -@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long) d3dx9_36.D3DXLoadSurfaceFromSurface +@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA +@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW +@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromSurface @ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileA @ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileInMemory @ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileW @@ -196,8 +196,8 @@ @ stdcall D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceA @ stdcall D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceW @ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadVolumeFromVolume -@ stdcall D3DXMatrixAffineTransformation(ptr long ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation -@ stdcall D3DXMatrixAffineTransformation2D(ptr long ptr long ptr) d3dx9_36.D3DXMatrixAffineTransformation2D +@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation +@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr) d3dx9_36.D3DXMatrixAffineTransformation2D @ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixDecompose @ stdcall D3DXMatrixDeterminant(ptr) d3dx9_36.D3DXMatrixDeterminant @ stdcall D3DXMatrixInverse(ptr ptr ptr) d3dx9_36.D3DXMatrixInverse @@ -205,28 +205,28 @@ @ stdcall D3DXMatrixLookAtRH(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixLookAtRH @ stdcall D3DXMatrixMultiply(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiply @ stdcall D3DXMatrixMultiplyTranspose(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiplyTranspose -@ stdcall D3DXMatrixOrthoLH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoLH -@ stdcall D3DXMatrixOrthoOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterLH -@ stdcall D3DXMatrixOrthoOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterRH -@ stdcall D3DXMatrixOrthoRH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoRH -@ stdcall D3DXMatrixPerspectiveFovLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovLH -@ stdcall D3DXMatrixPerspectiveFovRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovRH -@ stdcall D3DXMatrixPerspectiveLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveLH -@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH -@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH -@ stdcall D3DXMatrixPerspectiveRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveRH +@ stdcall D3DXMatrixOrthoLH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoLH +@ stdcall D3DXMatrixOrthoOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterLH +@ stdcall D3DXMatrixOrthoOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterRH +@ stdcall D3DXMatrixOrthoRH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoRH +@ stdcall D3DXMatrixPerspectiveFovLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovLH +@ stdcall D3DXMatrixPerspectiveFovRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovRH +@ stdcall D3DXMatrixPerspectiveLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveLH +@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH +@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH +@ stdcall D3DXMatrixPerspectiveRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveRH @ stdcall D3DXMatrixReflect(ptr ptr) d3dx9_36.D3DXMatrixReflect -@ stdcall D3DXMatrixRotationAxis(ptr ptr long) d3dx9_36.D3DXMatrixRotationAxis +@ stdcall D3DXMatrixRotationAxis(ptr ptr float) d3dx9_36.D3DXMatrixRotationAxis @ stdcall D3DXMatrixRotationQuaternion(ptr ptr) d3dx9_36.D3DXMatrixRotationQuaternion -@ stdcall D3DXMatrixRotationX(ptr long) d3dx9_36.D3DXMatrixRotationX -@ stdcall D3DXMatrixRotationY(ptr long) d3dx9_36.D3DXMatrixRotationY -@ stdcall D3DXMatrixRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXMatrixRotationYawPitchRoll -@ stdcall D3DXMatrixRotationZ(ptr long) d3dx9_36.D3DXMatrixRotationZ -@ stdcall D3DXMatrixScaling(ptr long long long) d3dx9_36.D3DXMatrixScaling +@ stdcall D3DXMatrixRotationX(ptr float) d3dx9_36.D3DXMatrixRotationX +@ stdcall D3DXMatrixRotationY(ptr float) d3dx9_36.D3DXMatrixRotationY +@ stdcall D3DXMatrixRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXMatrixRotationYawPitchRoll +@ stdcall D3DXMatrixRotationZ(ptr float) d3dx9_36.D3DXMatrixRotationZ +@ stdcall D3DXMatrixScaling(ptr float float float) d3dx9_36.D3DXMatrixScaling @ stdcall D3DXMatrixShadow(ptr ptr ptr) d3dx9_36.D3DXMatrixShadow @ stdcall D3DXMatrixTransformation(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXMatrixTransformation -@ stdcall D3DXMatrixTransformation2D(ptr ptr long ptr ptr long ptr) d3dx9_36.D3DXMatrixTransformation2D -@ stdcall D3DXMatrixTranslation(ptr long long long) d3dx9_36.D3DXMatrixTranslation +@ stdcall D3DXMatrixTransformation2D(ptr ptr float ptr ptr float ptr) d3dx9_36.D3DXMatrixTransformation2D +@ stdcall D3DXMatrixTranslation(ptr float float float) d3dx9_36.D3DXMatrixTranslation @ stdcall D3DXMatrixTranspose(ptr ptr) d3dx9_36.D3DXMatrixTranspose @ stdcall D3DXOptimizeFaces(ptr long long long ptr) d3dx9_36.D3DXOptimizeFaces @ stdcall D3DXOptimizeVertices(ptr long long long ptr) d3dx9_36.D3DXOptimizeVertices @@ -237,21 +237,21 @@ @ stdcall D3DXPlaneTransform(ptr ptr ptr) d3dx9_36.D3DXPlaneTransform @ stdcall D3DXPlaneTransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXPlaneTransformArray @ stdcall D3DXPreprocessShader(ptr long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShader -@ stdcall D3DXPreprocessShaderFromFileA(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA -@ stdcall D3DXPreprocessShaderFromFileW(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW -@ stdcall D3DXPreprocessShaderFromResourceA(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA -@ stdcall D3DXPreprocessShaderFromResourceW(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW -@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXQuaternionBaryCentric +@ stdcall D3DXPreprocessShaderFromFileA(str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA +@ stdcall D3DXPreprocessShaderFromFileW(wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW +@ stdcall D3DXPreprocessShaderFromResourceA(long str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA +@ stdcall D3DXPreprocessShaderFromResourceW(long wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW +@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXQuaternionBaryCentric @ stdcall D3DXQuaternionExp(ptr ptr) d3dx9_36.D3DXQuaternionExp @ stdcall D3DXQuaternionInverse(ptr ptr) d3dx9_36.D3DXQuaternionInverse @ stdcall D3DXQuaternionLn(ptr ptr) d3dx9_36.D3DXQuaternionLn @ stdcall D3DXQuaternionMultiply(ptr ptr ptr) d3dx9_36.D3DXQuaternionMultiply @ stdcall D3DXQuaternionNormalize(ptr ptr) d3dx9_36.D3DXQuaternionNormalize -@ stdcall D3DXQuaternionRotationAxis(ptr ptr long) d3dx9_36.D3DXQuaternionRotationAxis +@ stdcall D3DXQuaternionRotationAxis(ptr ptr float) d3dx9_36.D3DXQuaternionRotationAxis @ stdcall D3DXQuaternionRotationMatrix(ptr ptr) d3dx9_36.D3DXQuaternionRotationMatrix -@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXQuaternionRotationYawPitchRoll -@ stdcall D3DXQuaternionSlerp(ptr ptr ptr long) d3dx9_36.D3DXQuaternionSlerp -@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXQuaternionSquad +@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXQuaternionRotationYawPitchRoll +@ stdcall D3DXQuaternionSlerp(ptr ptr ptr float) d3dx9_36.D3DXQuaternionSlerp +@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXQuaternionSquad @ stdcall D3DXQuaternionSquadSetup(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXQuaternionSquadSetup @ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr) d3dx9_36.D3DXQuaternionToAxisAngle @ stdcall D3DXRectPatchSize(ptr ptr ptr) d3dx9_36.D3DXRectPatchSize @@ -274,11 +274,11 @@ @ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW @ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd @ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot -@ stdcall D3DXSHEvalConeLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight +@ stdcall D3DXSHEvalConeLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight @ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection -@ stdcall D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight -@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight -@ stdcall D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight +@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight +@ stdcall D3DXSHEvalHemisphereLight(long ptr int128 int128 ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight +@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight @ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2 @ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3 @ stdcall D3DXSHMultiply4(ptr ptr ptr) d3dx9_36.D3DXSHMultiply4 @@ -288,10 +288,10 @@ @ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC @ stdcall D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr) d3dx9_36.D3DXSHPRTCompSuperCluster @ stdcall D3DXSHRotate(ptr long ptr ptr) d3dx9_36.D3DXSHRotate -@ stdcall D3DXSHRotateZ(ptr long long ptr) d3dx9_36.D3DXSHRotateZ -@ stdcall D3DXSHScale(ptr long ptr ptr) d3dx9_36.D3DXSHScale +@ stdcall D3DXSHRotateZ(ptr long float ptr) d3dx9_36.D3DXSHRotateZ +@ stdcall D3DXSHScale(ptr long ptr float) d3dx9_36.D3DXSHScale @ stdcall D3DXSimplifyMesh(ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXSimplifyMesh -@ stdcall D3DXSphereBoundProbe(ptr long ptr ptr) d3dx9_36.D3DXSphereBoundProbe +@ stdcall D3DXSphereBoundProbe(ptr float ptr ptr) d3dx9_36.D3DXSphereBoundProbe @ stdcall D3DXSplitMesh(ptr ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSplitMesh @ stdcall D3DXTessellateNPatches(ptr ptr long long ptr ptr) d3dx9_36.D3DXTessellateNPatches @ stdcall D3DXTessellateRectPatch(ptr ptr ptr ptr ptr) d3dx9_36.D3DXTessellateRectPatch @@ -302,9 +302,9 @@ @ stdcall D3DXUVAtlasPartition(ptr long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXUVAtlasPartition @ stdcall D3DXValidMesh(ptr ptr ptr) d3dx9_36.D3DXValidMesh @ stdcall D3DXValidPatchMesh(ptr ptr ptr ptr) d3dx9_36.D3DXValidPatchMesh -@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec2BaryCentric -@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2CatmullRom -@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2Hermite +@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec2BaryCentric +@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2CatmullRom +@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2Hermite @ stdcall D3DXVec2Normalize(ptr ptr) d3dx9_36.D3DXVec2Normalize @ stdcall D3DXVec2Transform(ptr ptr ptr) d3dx9_36.D3DXVec2Transform @ stdcall D3DXVec2TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformArray @@ -312,9 +312,9 @@ @ stdcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformCoordArray @ stdcall D3DXVec2TransformNormal(ptr ptr ptr) d3dx9_36.D3DXVec2TransformNormal @ stdcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformNormalArray -@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec3BaryCentric -@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3CatmullRom -@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3Hermite +@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec3BaryCentric +@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3CatmullRom +@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3Hermite @ stdcall D3DXVec3Normalize(ptr ptr) d3dx9_36.D3DXVec3Normalize @ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Project @ stdcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3ProjectArray @@ -326,10 +326,10 @@ @ stdcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformNormalArray @ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Unproject @ stdcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3UnprojectArray -@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec4BaryCentric -@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4CatmullRom +@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec4BaryCentric +@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4CatmullRom @ stdcall D3DXVec4Cross(ptr ptr ptr ptr) d3dx9_36.D3DXVec4Cross -@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4Hermite +@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4Hermite @ stdcall D3DXVec4Normalize(ptr ptr) d3dx9_36.D3DXVec4Normalize @ stdcall D3DXVec4Transform(ptr ptr ptr) d3dx9_36.D3DXVec4Transform @ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec4TransformArray diff --git a/dll/directx/wine/d3dx9_39/d3dx9_39_main.c b/dll/directx/wine/d3dx9_39/d3dx9_39_main.c index e9f999a876f..7ee8cb2c66b 100644 --- a/dll/directx/wine/d3dx9_39/d3dx9_39_main.c +++ b/dll/directx/wine/d3dx9_39/d3dx9_39_main.c @@ -47,8 +47,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } diff --git a/dll/directx/wine/d3dx9_40/CMakeLists.txt b/dll/directx/wine/d3dx9_40/CMakeLists.txt index 17bf896a146..0e6e4e991ca 100644 --- a/dll/directx/wine/d3dx9_40/CMakeLists.txt +++ b/dll/directx/wine/d3dx9_40/CMakeLists.txt @@ -1,26 +1,15 @@ +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) + spec2def(d3dx9_40.dll d3dx9_40.spec) list(APPEND SOURCE d3dx9_40_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_40.def) -add_definitions(-D__WINESRC__) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_library(d3dx9_40 SHARED ${SOURCE}) +add_library(d3dx9_40 SHARED ${SOURCE} version.rc) set_module_type(d3dx9_40 win32dll) target_link_libraries(d3dx9_40 wine) - -add_importlibs(d3dx9_40 - d3dx9_36 - d3d9 - user32 - gdi32 - advapi32 - msvcrt - kernel32 - ntdll) - -add_dependencies(d3dx9_40 wineheaders) +add_importlibs(d3dx9_40 d3dx9_36 msvcrt kernel32 ntdll) add_cd_file(TARGET d3dx9_40 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_40/d3dx9_40.spec b/dll/directx/wine/d3dx9_40/d3dx9_40.spec index bdd1c73fdcc..777c03529fa 100644 --- a/dll/directx/wine/d3dx9_40/d3dx9_40.spec +++ b/dll/directx/wine/d3dx9_40/d3dx9_40.spec @@ -1,21 +1,21 @@ @ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShader -@ stdcall D3DXAssembleShaderFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA -@ stdcall D3DXAssembleShaderFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW -@ stdcall D3DXAssembleShaderFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA -@ stdcall D3DXAssembleShaderFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW +@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA +@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW +@ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA +@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW @ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) d3dx9_36.D3DXBoxBoundProbe -@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckCubeTextureRequirements -@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckTextureRequirements +@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckCubeTextureRequirements +@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckTextureRequirements @ stdcall D3DXCheckVersion(long long) -@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckVolumeTextureRequirements -@ stdcall D3DXCleanMesh(ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh -@ stdcall D3DXColorAdjustContrast(ptr ptr long) d3dx9_36.D3DXColorAdjustContrast -@ stdcall D3DXColorAdjustSaturation(ptr ptr long) d3dx9_36.D3DXColorAdjustSaturation -@ stdcall D3DXCompileShader(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShader -@ stdcall D3DXCompileShaderFromFileA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA -@ stdcall D3DXCompileShaderFromFileW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW -@ stdcall D3DXCompileShaderFromResourceA(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA -@ stdcall D3DXCompileShaderFromResourceW(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW +@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckVolumeTextureRequirements +@ stdcall D3DXCleanMesh(long ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh +@ stdcall D3DXColorAdjustContrast(ptr ptr float) d3dx9_36.D3DXColorAdjustContrast +@ stdcall D3DXColorAdjustSaturation(ptr ptr float) d3dx9_36.D3DXColorAdjustSaturation +@ stdcall D3DXCompileShader(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShader +@ stdcall D3DXCompileShaderFromFileA(str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA +@ stdcall D3DXCompileShaderFromFileW(wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW +@ stdcall D3DXCompileShaderFromResourceA(ptr str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA +@ stdcall D3DXCompileShaderFromResourceW(ptr wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW @ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingBox @ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingSphere @ stdcall D3DXComputeIMTFromPerVertexSignal(ptr ptr long long long ptr ptr ptr) d3dx9_36.D3DXComputeIMTFromPerVertexSignal @@ -31,7 +31,7 @@ @ stdcall D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToSingleStrip @ stdcall D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToStrips @ stdcall D3DXCreateAnimationController(long long long long ptr) d3dx9_36.D3DXCreateAnimationController -@ stdcall D3DXCreateBox(ptr long long long ptr ptr) d3dx9_36.D3DXCreateBox +@ stdcall D3DXCreateBox(ptr float float float ptr ptr) d3dx9_36.D3DXCreateBox @ stdcall D3DXCreateBuffer(long ptr) d3dx9_36.D3DXCreateBuffer @ stdcall D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr) d3dx9_36.D3DXCreateCompressedAnimationSet @ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr) d3dx9_36.D3DXCreateCubeTexture @@ -48,24 +48,24 @@ @ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder @ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffect @ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler -@ stdcall D3DXCreateEffectCompilerFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA -@ stdcall D3DXCreateEffectCompilerFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW -@ stdcall D3DXCreateEffectCompilerFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA -@ stdcall D3DXCreateEffectCompilerFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW -@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx -@ stdcall D3DXCreateEffectFromFileA(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA -@ stdcall D3DXCreateEffectFromFileExA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA -@ stdcall D3DXCreateEffectFromFileExW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW -@ stdcall D3DXCreateEffectFromFileW(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW -@ stdcall D3DXCreateEffectFromResourceA(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA -@ stdcall D3DXCreateEffectFromResourceExA(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA -@ stdcall D3DXCreateEffectFromResourceExW(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW -@ stdcall D3DXCreateEffectFromResourceW(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW +@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA +@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW +@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA +@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW +@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx +@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA +@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA +@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW +@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW +@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA +@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA +@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW +@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW @ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool -@ stdcall D3DXCreateFontA(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontA +@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectW -@ stdcall D3DXCreateFontW(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontW +@ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) d3dx9_36.D3DXCreateFontW @ stdcall D3DXCreateFragmentLinker(ptr long ptr) d3dx9_36.D3DXCreateFragmentLinker @ stdcall D3DXCreateFragmentLinkerEx(ptr long long ptr) d3dx9_36.D3DXCreateFragmentLinkerEx @ stdcall D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateKeyframedAnimationSet @@ -87,22 +87,22 @@ @ stdcall D3DXCreateSkinInfo(long ptr long ptr) d3dx9_36.D3DXCreateSkinInfo @ stdcall D3DXCreateSkinInfoFromBlendedMesh(ptr long ptr ptr) d3dx9_36.D3DXCreateSkinInfoFromBlendedMesh @ stdcall D3DXCreateSkinInfoFVF(long long long ptr) d3dx9_36.D3DXCreateSkinInfoFVF -@ stdcall D3DXCreateSphere(ptr long long long ptr ptr) d3dx9_36.D3DXCreateSphere +@ stdcall D3DXCreateSphere(ptr float long long ptr ptr) d3dx9_36.D3DXCreateSphere @ stdcall D3DXCreateSprite(ptr ptr) d3dx9_36.D3DXCreateSprite @ stdcall D3DXCreateTeapot(ptr ptr ptr) d3dx9_36.D3DXCreateTeapot -@ stdcall D3DXCreateTextA(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextA -@ stdcall D3DXCreateTextW(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextW +@ stdcall D3DXCreateTextA(ptr long str float float ptr ptr ptr) d3dx9_36.D3DXCreateTextA +@ stdcall D3DXCreateTextW(ptr long wstr float float ptr ptr ptr) d3dx9_36.D3DXCreateTextW @ stdcall D3DXCreateTexture(ptr long long long long long long ptr) d3dx9_36.D3DXCreateTexture -@ stdcall D3DXCreateTextureFromFileA(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileA -@ stdcall D3DXCreateTextureFromFileExA(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA -@ stdcall D3DXCreateTextureFromFileExW(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW +@ stdcall D3DXCreateTextureFromFileA(ptr str ptr) d3dx9_36.D3DXCreateTextureFromFileA +@ stdcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA +@ stdcall D3DXCreateTextureFromFileExW(ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW @ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateTextureFromFileInMemory @ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileInMemoryEx -@ stdcall D3DXCreateTextureFromFileW(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileW -@ stdcall D3DXCreateTextureFromResourceA(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceA -@ stdcall D3DXCreateTextureFromResourceExA(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA -@ stdcall D3DXCreateTextureFromResourceExW(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW -@ stdcall D3DXCreateTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceW +@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromFileW +@ stdcall D3DXCreateTextureFromResourceA(ptr ptr str ptr) d3dx9_36.D3DXCreateTextureFromResourceA +@ stdcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA +@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW +@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromResourceW @ stdcall D3DXCreateTextureGutterHelper(long long ptr long ptr) d3dx9_36.D3DXCreateTextureGutterHelper @ stdcall D3DXCreateTextureShader(ptr ptr) d3dx9_36.D3DXCreateTextureShader @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateTorus @@ -138,7 +138,7 @@ @ stdcall D3DXFrameFind(ptr ptr) d3dx9_36.D3DXFrameFind @ stdcall D3DXFrameNumNamedMatrices(ptr) d3dx9_36.D3DXFrameNumNamedMatrices @ stdcall D3DXFrameRegisterNamedMatrices(ptr ptr) d3dx9_36.D3DXFrameRegisterNamedMatrices -@ stdcall D3DXFresnelTerm(long long) d3dx9_36.D3DXFresnelTerm +@ stdcall D3DXFresnelTerm(float float) d3dx9_36.D3DXFresnelTerm @ stdcall D3DXFVFFromDeclarator(ptr ptr) d3dx9_36.D3DXFVFFromDeclarator @ stdcall D3DXGatherFragments(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragments @ stdcall D3DXGatherFragmentsFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragmentsFromFileA @@ -151,11 +151,11 @@ @ stdcall D3DXGetDeclVertexSize(ptr long) d3dx9_36.D3DXGetDeclVertexSize @ stdcall D3DXGetDriverLevel(ptr) d3dx9_36.D3DXGetDriverLevel @ stdcall D3DXGetFVFVertexSize(long) d3dx9_36.D3DXGetFVFVertexSize -@ stdcall D3DXGetImageInfoFromFileA(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileA +@ stdcall D3DXGetImageInfoFromFileA(str ptr) d3dx9_36.D3DXGetImageInfoFromFileA @ stdcall D3DXGetImageInfoFromFileInMemory(ptr long ptr) d3dx9_36.D3DXGetImageInfoFromFileInMemory -@ stdcall D3DXGetImageInfoFromFileW(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileW -@ stdcall D3DXGetImageInfoFromResourceA(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceA -@ stdcall D3DXGetImageInfoFromResourceW(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW +@ stdcall D3DXGetImageInfoFromFileW(wstr ptr) d3dx9_36.D3DXGetImageInfoFromFileW +@ stdcall D3DXGetImageInfoFromResourceA(long str ptr) d3dx9_36.D3DXGetImageInfoFromResourceA +@ stdcall D3DXGetImageInfoFromResourceW(long wstr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW @ stdcall D3DXGetPixelShaderProfile(ptr) d3dx9_36.D3DXGetPixelShaderProfile @ stdcall D3DXGetShaderConstantTable(ptr ptr) d3dx9_36.D3DXGetShaderConstantTable @ stdcall D3DXGetShaderConstantTableEx(ptr long ptr) d3dx9_36.D3DXGetShaderConstantTableEx @@ -168,27 +168,27 @@ @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersect @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectSubset @ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectTri -@ stdcall D3DXLoadMeshFromXA(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA +@ stdcall D3DXLoadMeshFromXA(str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA @ stdcall D3DXLoadMeshFromXInMemory(ptr long long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXInMemory -@ stdcall D3DXLoadMeshFromXResource(long ptr ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource -@ stdcall D3DXLoadMeshFromXW(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW +@ stdcall D3DXLoadMeshFromXResource(long str str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource +@ stdcall D3DXLoadMeshFromXW(wstr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW @ stdcall D3DXLoadMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXof -@ stdcall D3DXLoadMeshHierarchyFromXA(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA +@ stdcall D3DXLoadMeshHierarchyFromXA(str long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA @ stdcall D3DXLoadMeshHierarchyFromXInMemory(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXInMemory -@ stdcall D3DXLoadMeshHierarchyFromXW(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW +@ stdcall D3DXLoadMeshHierarchyFromXW(wstr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW @ stdcall D3DXLoadPatchMeshFromXof(ptr long ptr ptr ptr long ptr) d3dx9_36.D3DXLoadPatchMeshFromXof @ stdcall D3DXLoadPRTBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileA @ stdcall D3DXLoadPRTBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileW @ stdcall D3DXLoadPRTCompBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileA @ stdcall D3DXLoadPRTCompBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileW @ stdcall D3DXLoadSkinMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadSkinMeshFromXof -@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA +@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA @ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileInMemory -@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW +@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW @ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromMemory -@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA -@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW -@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long) d3dx9_36.D3DXLoadSurfaceFromSurface +@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA +@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW +@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromSurface @ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileA @ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileInMemory @ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileW @@ -196,8 +196,8 @@ @ stdcall D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceA @ stdcall D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceW @ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadVolumeFromVolume -@ stdcall D3DXMatrixAffineTransformation(ptr long ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation -@ stdcall D3DXMatrixAffineTransformation2D(ptr long ptr long ptr) d3dx9_36.D3DXMatrixAffineTransformation2D +@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation +@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr) d3dx9_36.D3DXMatrixAffineTransformation2D @ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixDecompose @ stdcall D3DXMatrixDeterminant(ptr) d3dx9_36.D3DXMatrixDeterminant @ stdcall D3DXMatrixInverse(ptr ptr ptr) d3dx9_36.D3DXMatrixInverse @@ -205,28 +205,28 @@ @ stdcall D3DXMatrixLookAtRH(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixLookAtRH @ stdcall D3DXMatrixMultiply(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiply @ stdcall D3DXMatrixMultiplyTranspose(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiplyTranspose -@ stdcall D3DXMatrixOrthoLH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoLH -@ stdcall D3DXMatrixOrthoOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterLH -@ stdcall D3DXMatrixOrthoOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterRH -@ stdcall D3DXMatrixOrthoRH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoRH -@ stdcall D3DXMatrixPerspectiveFovLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovLH -@ stdcall D3DXMatrixPerspectiveFovRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovRH -@ stdcall D3DXMatrixPerspectiveLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveLH -@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH -@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH -@ stdcall D3DXMatrixPerspectiveRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveRH +@ stdcall D3DXMatrixOrthoLH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoLH +@ stdcall D3DXMatrixOrthoOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterLH +@ stdcall D3DXMatrixOrthoOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterRH +@ stdcall D3DXMatrixOrthoRH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoRH +@ stdcall D3DXMatrixPerspectiveFovLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovLH +@ stdcall D3DXMatrixPerspectiveFovRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovRH +@ stdcall D3DXMatrixPerspectiveLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveLH +@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH +@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH +@ stdcall D3DXMatrixPerspectiveRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveRH @ stdcall D3DXMatrixReflect(ptr ptr) d3dx9_36.D3DXMatrixReflect -@ stdcall D3DXMatrixRotationAxis(ptr ptr long) d3dx9_36.D3DXMatrixRotationAxis +@ stdcall D3DXMatrixRotationAxis(ptr ptr float) d3dx9_36.D3DXMatrixRotationAxis @ stdcall D3DXMatrixRotationQuaternion(ptr ptr) d3dx9_36.D3DXMatrixRotationQuaternion -@ stdcall D3DXMatrixRotationX(ptr long) d3dx9_36.D3DXMatrixRotationX -@ stdcall D3DXMatrixRotationY(ptr long) d3dx9_36.D3DXMatrixRotationY -@ stdcall D3DXMatrixRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXMatrixRotationYawPitchRoll -@ stdcall D3DXMatrixRotationZ(ptr long) d3dx9_36.D3DXMatrixRotationZ -@ stdcall D3DXMatrixScaling(ptr long long long) d3dx9_36.D3DXMatrixScaling +@ stdcall D3DXMatrixRotationX(ptr float) d3dx9_36.D3DXMatrixRotationX +@ stdcall D3DXMatrixRotationY(ptr float) d3dx9_36.D3DXMatrixRotationY +@ stdcall D3DXMatrixRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXMatrixRotationYawPitchRoll +@ stdcall D3DXMatrixRotationZ(ptr float) d3dx9_36.D3DXMatrixRotationZ +@ stdcall D3DXMatrixScaling(ptr float float float) d3dx9_36.D3DXMatrixScaling @ stdcall D3DXMatrixShadow(ptr ptr ptr) d3dx9_36.D3DXMatrixShadow @ stdcall D3DXMatrixTransformation(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXMatrixTransformation -@ stdcall D3DXMatrixTransformation2D(ptr ptr long ptr ptr long ptr) d3dx9_36.D3DXMatrixTransformation2D -@ stdcall D3DXMatrixTranslation(ptr long long long) d3dx9_36.D3DXMatrixTranslation +@ stdcall D3DXMatrixTransformation2D(ptr ptr float ptr ptr float ptr) d3dx9_36.D3DXMatrixTransformation2D +@ stdcall D3DXMatrixTranslation(ptr float float float) d3dx9_36.D3DXMatrixTranslation @ stdcall D3DXMatrixTranspose(ptr ptr) d3dx9_36.D3DXMatrixTranspose @ stdcall D3DXOptimizeFaces(ptr long long long ptr) d3dx9_36.D3DXOptimizeFaces @ stdcall D3DXOptimizeVertices(ptr long long long ptr) d3dx9_36.D3DXOptimizeVertices @@ -237,21 +237,21 @@ @ stdcall D3DXPlaneTransform(ptr ptr ptr) d3dx9_36.D3DXPlaneTransform @ stdcall D3DXPlaneTransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXPlaneTransformArray @ stdcall D3DXPreprocessShader(ptr long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShader -@ stdcall D3DXPreprocessShaderFromFileA(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA -@ stdcall D3DXPreprocessShaderFromFileW(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW -@ stdcall D3DXPreprocessShaderFromResourceA(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA -@ stdcall D3DXPreprocessShaderFromResourceW(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW -@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXQuaternionBaryCentric +@ stdcall D3DXPreprocessShaderFromFileA(str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA +@ stdcall D3DXPreprocessShaderFromFileW(wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW +@ stdcall D3DXPreprocessShaderFromResourceA(long str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA +@ stdcall D3DXPreprocessShaderFromResourceW(long wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW +@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXQuaternionBaryCentric @ stdcall D3DXQuaternionExp(ptr ptr) d3dx9_36.D3DXQuaternionExp @ stdcall D3DXQuaternionInverse(ptr ptr) d3dx9_36.D3DXQuaternionInverse @ stdcall D3DXQuaternionLn(ptr ptr) d3dx9_36.D3DXQuaternionLn @ stdcall D3DXQuaternionMultiply(ptr ptr ptr) d3dx9_36.D3DXQuaternionMultiply @ stdcall D3DXQuaternionNormalize(ptr ptr) d3dx9_36.D3DXQuaternionNormalize -@ stdcall D3DXQuaternionRotationAxis(ptr ptr long) d3dx9_36.D3DXQuaternionRotationAxis +@ stdcall D3DXQuaternionRotationAxis(ptr ptr float) d3dx9_36.D3DXQuaternionRotationAxis @ stdcall D3DXQuaternionRotationMatrix(ptr ptr) d3dx9_36.D3DXQuaternionRotationMatrix -@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXQuaternionRotationYawPitchRoll -@ stdcall D3DXQuaternionSlerp(ptr ptr ptr long) d3dx9_36.D3DXQuaternionSlerp -@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXQuaternionSquad +@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXQuaternionRotationYawPitchRoll +@ stdcall D3DXQuaternionSlerp(ptr ptr ptr float) d3dx9_36.D3DXQuaternionSlerp +@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXQuaternionSquad @ stdcall D3DXQuaternionSquadSetup(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXQuaternionSquadSetup @ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr) d3dx9_36.D3DXQuaternionToAxisAngle @ stdcall D3DXRectPatchSize(ptr ptr ptr) d3dx9_36.D3DXRectPatchSize @@ -274,11 +274,11 @@ @ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW @ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd @ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot -@ stdcall D3DXSHEvalConeLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight +@ stdcall D3DXSHEvalConeLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight @ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection -@ stdcall D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight -@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight -@ stdcall D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight +@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight +@ stdcall D3DXSHEvalHemisphereLight(long ptr int128 int128 ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight +@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight @ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2 @ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3 @ stdcall D3DXSHMultiply4(ptr ptr ptr) d3dx9_36.D3DXSHMultiply4 @@ -288,10 +288,10 @@ @ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC @ stdcall D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr) d3dx9_36.D3DXSHPRTCompSuperCluster @ stdcall D3DXSHRotate(ptr long ptr ptr) d3dx9_36.D3DXSHRotate -@ stdcall D3DXSHRotateZ(ptr long long ptr) d3dx9_36.D3DXSHRotateZ -@ stdcall D3DXSHScale(ptr long ptr ptr) d3dx9_36.D3DXSHScale +@ stdcall D3DXSHRotateZ(ptr long float ptr) d3dx9_36.D3DXSHRotateZ +@ stdcall D3DXSHScale(ptr long ptr float) d3dx9_36.D3DXSHScale @ stdcall D3DXSimplifyMesh(ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXSimplifyMesh -@ stdcall D3DXSphereBoundProbe(ptr long ptr ptr) d3dx9_36.D3DXSphereBoundProbe +@ stdcall D3DXSphereBoundProbe(ptr float ptr ptr) d3dx9_36.D3DXSphereBoundProbe @ stdcall D3DXSplitMesh(ptr ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSplitMesh @ stdcall D3DXTessellateNPatches(ptr ptr long long ptr ptr) d3dx9_36.D3DXTessellateNPatches @ stdcall D3DXTessellateRectPatch(ptr ptr ptr ptr ptr) d3dx9_36.D3DXTessellateRectPatch @@ -302,9 +302,9 @@ @ stdcall D3DXUVAtlasPartition(ptr long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXUVAtlasPartition @ stdcall D3DXValidMesh(ptr ptr ptr) d3dx9_36.D3DXValidMesh @ stdcall D3DXValidPatchMesh(ptr ptr ptr ptr) d3dx9_36.D3DXValidPatchMesh -@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec2BaryCentric -@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2CatmullRom -@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2Hermite +@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec2BaryCentric +@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2CatmullRom +@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2Hermite @ stdcall D3DXVec2Normalize(ptr ptr) d3dx9_36.D3DXVec2Normalize @ stdcall D3DXVec2Transform(ptr ptr ptr) d3dx9_36.D3DXVec2Transform @ stdcall D3DXVec2TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformArray @@ -312,9 +312,9 @@ @ stdcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformCoordArray @ stdcall D3DXVec2TransformNormal(ptr ptr ptr) d3dx9_36.D3DXVec2TransformNormal @ stdcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformNormalArray -@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec3BaryCentric -@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3CatmullRom -@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3Hermite +@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec3BaryCentric +@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3CatmullRom +@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3Hermite @ stdcall D3DXVec3Normalize(ptr ptr) d3dx9_36.D3DXVec3Normalize @ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Project @ stdcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3ProjectArray @@ -326,10 +326,10 @@ @ stdcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformNormalArray @ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Unproject @ stdcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3UnprojectArray -@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec4BaryCentric -@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4CatmullRom +@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec4BaryCentric +@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4CatmullRom @ stdcall D3DXVec4Cross(ptr ptr ptr ptr) d3dx9_36.D3DXVec4Cross -@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4Hermite +@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4Hermite @ stdcall D3DXVec4Normalize(ptr ptr) d3dx9_36.D3DXVec4Normalize @ stdcall D3DXVec4Transform(ptr ptr ptr) d3dx9_36.D3DXVec4Transform @ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec4TransformArray diff --git a/dll/directx/wine/d3dx9_40/d3dx9_40_main.c b/dll/directx/wine/d3dx9_40/d3dx9_40_main.c index 220b76115cb..f4ab612aaff 100644 --- a/dll/directx/wine/d3dx9_40/d3dx9_40_main.c +++ b/dll/directx/wine/d3dx9_40/d3dx9_40_main.c @@ -48,8 +48,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } diff --git a/dll/directx/wine/d3dx9_41/CMakeLists.txt b/dll/directx/wine/d3dx9_41/CMakeLists.txt index c30de705f62..108e25a7a1f 100644 --- a/dll/directx/wine/d3dx9_41/CMakeLists.txt +++ b/dll/directx/wine/d3dx9_41/CMakeLists.txt @@ -1,26 +1,15 @@ +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) + spec2def(d3dx9_41.dll d3dx9_41.spec) list(APPEND SOURCE d3dx9_41_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_41.def) -add_definitions(-D__WINESRC__) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_library(d3dx9_41 SHARED ${SOURCE}) +add_library(d3dx9_41 SHARED ${SOURCE} version.rc) set_module_type(d3dx9_41 win32dll) target_link_libraries(d3dx9_41 wine) - -add_importlibs(d3dx9_41 - d3dx9_36 - d3d9 - user32 - gdi32 - advapi32 - msvcrt - kernel32 - ntdll) - -add_dependencies(d3dx9_41 wineheaders) +add_importlibs(d3dx9_41 d3dx9_36 msvcrt kernel32 ntdll) add_cd_file(TARGET d3dx9_41 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_41/d3dx9_41.spec b/dll/directx/wine/d3dx9_41/d3dx9_41.spec index bdd1c73fdcc..777c03529fa 100644 --- a/dll/directx/wine/d3dx9_41/d3dx9_41.spec +++ b/dll/directx/wine/d3dx9_41/d3dx9_41.spec @@ -1,21 +1,21 @@ @ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShader -@ stdcall D3DXAssembleShaderFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA -@ stdcall D3DXAssembleShaderFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW -@ stdcall D3DXAssembleShaderFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA -@ stdcall D3DXAssembleShaderFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW +@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA +@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW +@ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA +@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW @ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) d3dx9_36.D3DXBoxBoundProbe -@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckCubeTextureRequirements -@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckTextureRequirements +@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckCubeTextureRequirements +@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckTextureRequirements @ stdcall D3DXCheckVersion(long long) -@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckVolumeTextureRequirements -@ stdcall D3DXCleanMesh(ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh -@ stdcall D3DXColorAdjustContrast(ptr ptr long) d3dx9_36.D3DXColorAdjustContrast -@ stdcall D3DXColorAdjustSaturation(ptr ptr long) d3dx9_36.D3DXColorAdjustSaturation -@ stdcall D3DXCompileShader(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShader -@ stdcall D3DXCompileShaderFromFileA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA -@ stdcall D3DXCompileShaderFromFileW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW -@ stdcall D3DXCompileShaderFromResourceA(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA -@ stdcall D3DXCompileShaderFromResourceW(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW +@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckVolumeTextureRequirements +@ stdcall D3DXCleanMesh(long ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh +@ stdcall D3DXColorAdjustContrast(ptr ptr float) d3dx9_36.D3DXColorAdjustContrast +@ stdcall D3DXColorAdjustSaturation(ptr ptr float) d3dx9_36.D3DXColorAdjustSaturation +@ stdcall D3DXCompileShader(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShader +@ stdcall D3DXCompileShaderFromFileA(str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA +@ stdcall D3DXCompileShaderFromFileW(wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW +@ stdcall D3DXCompileShaderFromResourceA(ptr str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA +@ stdcall D3DXCompileShaderFromResourceW(ptr wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW @ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingBox @ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingSphere @ stdcall D3DXComputeIMTFromPerVertexSignal(ptr ptr long long long ptr ptr ptr) d3dx9_36.D3DXComputeIMTFromPerVertexSignal @@ -31,7 +31,7 @@ @ stdcall D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToSingleStrip @ stdcall D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToStrips @ stdcall D3DXCreateAnimationController(long long long long ptr) d3dx9_36.D3DXCreateAnimationController -@ stdcall D3DXCreateBox(ptr long long long ptr ptr) d3dx9_36.D3DXCreateBox +@ stdcall D3DXCreateBox(ptr float float float ptr ptr) d3dx9_36.D3DXCreateBox @ stdcall D3DXCreateBuffer(long ptr) d3dx9_36.D3DXCreateBuffer @ stdcall D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr) d3dx9_36.D3DXCreateCompressedAnimationSet @ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr) d3dx9_36.D3DXCreateCubeTexture @@ -48,24 +48,24 @@ @ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder @ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffect @ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler -@ stdcall D3DXCreateEffectCompilerFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA -@ stdcall D3DXCreateEffectCompilerFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW -@ stdcall D3DXCreateEffectCompilerFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA -@ stdcall D3DXCreateEffectCompilerFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW -@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx -@ stdcall D3DXCreateEffectFromFileA(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA -@ stdcall D3DXCreateEffectFromFileExA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA -@ stdcall D3DXCreateEffectFromFileExW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW -@ stdcall D3DXCreateEffectFromFileW(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW -@ stdcall D3DXCreateEffectFromResourceA(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA -@ stdcall D3DXCreateEffectFromResourceExA(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA -@ stdcall D3DXCreateEffectFromResourceExW(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW -@ stdcall D3DXCreateEffectFromResourceW(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW +@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA +@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW +@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA +@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW +@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx +@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA +@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA +@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW +@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW +@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA +@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA +@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW +@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW @ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool -@ stdcall D3DXCreateFontA(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontA +@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectW -@ stdcall D3DXCreateFontW(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontW +@ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) d3dx9_36.D3DXCreateFontW @ stdcall D3DXCreateFragmentLinker(ptr long ptr) d3dx9_36.D3DXCreateFragmentLinker @ stdcall D3DXCreateFragmentLinkerEx(ptr long long ptr) d3dx9_36.D3DXCreateFragmentLinkerEx @ stdcall D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateKeyframedAnimationSet @@ -87,22 +87,22 @@ @ stdcall D3DXCreateSkinInfo(long ptr long ptr) d3dx9_36.D3DXCreateSkinInfo @ stdcall D3DXCreateSkinInfoFromBlendedMesh(ptr long ptr ptr) d3dx9_36.D3DXCreateSkinInfoFromBlendedMesh @ stdcall D3DXCreateSkinInfoFVF(long long long ptr) d3dx9_36.D3DXCreateSkinInfoFVF -@ stdcall D3DXCreateSphere(ptr long long long ptr ptr) d3dx9_36.D3DXCreateSphere +@ stdcall D3DXCreateSphere(ptr float long long ptr ptr) d3dx9_36.D3DXCreateSphere @ stdcall D3DXCreateSprite(ptr ptr) d3dx9_36.D3DXCreateSprite @ stdcall D3DXCreateTeapot(ptr ptr ptr) d3dx9_36.D3DXCreateTeapot -@ stdcall D3DXCreateTextA(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextA -@ stdcall D3DXCreateTextW(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextW +@ stdcall D3DXCreateTextA(ptr long str float float ptr ptr ptr) d3dx9_36.D3DXCreateTextA +@ stdcall D3DXCreateTextW(ptr long wstr float float ptr ptr ptr) d3dx9_36.D3DXCreateTextW @ stdcall D3DXCreateTexture(ptr long long long long long long ptr) d3dx9_36.D3DXCreateTexture -@ stdcall D3DXCreateTextureFromFileA(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileA -@ stdcall D3DXCreateTextureFromFileExA(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA -@ stdcall D3DXCreateTextureFromFileExW(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW +@ stdcall D3DXCreateTextureFromFileA(ptr str ptr) d3dx9_36.D3DXCreateTextureFromFileA +@ stdcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA +@ stdcall D3DXCreateTextureFromFileExW(ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW @ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateTextureFromFileInMemory @ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileInMemoryEx -@ stdcall D3DXCreateTextureFromFileW(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileW -@ stdcall D3DXCreateTextureFromResourceA(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceA -@ stdcall D3DXCreateTextureFromResourceExA(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA -@ stdcall D3DXCreateTextureFromResourceExW(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW -@ stdcall D3DXCreateTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceW +@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromFileW +@ stdcall D3DXCreateTextureFromResourceA(ptr ptr str ptr) d3dx9_36.D3DXCreateTextureFromResourceA +@ stdcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA +@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW +@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromResourceW @ stdcall D3DXCreateTextureGutterHelper(long long ptr long ptr) d3dx9_36.D3DXCreateTextureGutterHelper @ stdcall D3DXCreateTextureShader(ptr ptr) d3dx9_36.D3DXCreateTextureShader @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateTorus @@ -138,7 +138,7 @@ @ stdcall D3DXFrameFind(ptr ptr) d3dx9_36.D3DXFrameFind @ stdcall D3DXFrameNumNamedMatrices(ptr) d3dx9_36.D3DXFrameNumNamedMatrices @ stdcall D3DXFrameRegisterNamedMatrices(ptr ptr) d3dx9_36.D3DXFrameRegisterNamedMatrices -@ stdcall D3DXFresnelTerm(long long) d3dx9_36.D3DXFresnelTerm +@ stdcall D3DXFresnelTerm(float float) d3dx9_36.D3DXFresnelTerm @ stdcall D3DXFVFFromDeclarator(ptr ptr) d3dx9_36.D3DXFVFFromDeclarator @ stdcall D3DXGatherFragments(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragments @ stdcall D3DXGatherFragmentsFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragmentsFromFileA @@ -151,11 +151,11 @@ @ stdcall D3DXGetDeclVertexSize(ptr long) d3dx9_36.D3DXGetDeclVertexSize @ stdcall D3DXGetDriverLevel(ptr) d3dx9_36.D3DXGetDriverLevel @ stdcall D3DXGetFVFVertexSize(long) d3dx9_36.D3DXGetFVFVertexSize -@ stdcall D3DXGetImageInfoFromFileA(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileA +@ stdcall D3DXGetImageInfoFromFileA(str ptr) d3dx9_36.D3DXGetImageInfoFromFileA @ stdcall D3DXGetImageInfoFromFileInMemory(ptr long ptr) d3dx9_36.D3DXGetImageInfoFromFileInMemory -@ stdcall D3DXGetImageInfoFromFileW(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileW -@ stdcall D3DXGetImageInfoFromResourceA(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceA -@ stdcall D3DXGetImageInfoFromResourceW(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW +@ stdcall D3DXGetImageInfoFromFileW(wstr ptr) d3dx9_36.D3DXGetImageInfoFromFileW +@ stdcall D3DXGetImageInfoFromResourceA(long str ptr) d3dx9_36.D3DXGetImageInfoFromResourceA +@ stdcall D3DXGetImageInfoFromResourceW(long wstr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW @ stdcall D3DXGetPixelShaderProfile(ptr) d3dx9_36.D3DXGetPixelShaderProfile @ stdcall D3DXGetShaderConstantTable(ptr ptr) d3dx9_36.D3DXGetShaderConstantTable @ stdcall D3DXGetShaderConstantTableEx(ptr long ptr) d3dx9_36.D3DXGetShaderConstantTableEx @@ -168,27 +168,27 @@ @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersect @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectSubset @ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectTri -@ stdcall D3DXLoadMeshFromXA(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA +@ stdcall D3DXLoadMeshFromXA(str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA @ stdcall D3DXLoadMeshFromXInMemory(ptr long long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXInMemory -@ stdcall D3DXLoadMeshFromXResource(long ptr ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource -@ stdcall D3DXLoadMeshFromXW(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW +@ stdcall D3DXLoadMeshFromXResource(long str str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource +@ stdcall D3DXLoadMeshFromXW(wstr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW @ stdcall D3DXLoadMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXof -@ stdcall D3DXLoadMeshHierarchyFromXA(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA +@ stdcall D3DXLoadMeshHierarchyFromXA(str long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA @ stdcall D3DXLoadMeshHierarchyFromXInMemory(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXInMemory -@ stdcall D3DXLoadMeshHierarchyFromXW(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW +@ stdcall D3DXLoadMeshHierarchyFromXW(wstr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW @ stdcall D3DXLoadPatchMeshFromXof(ptr long ptr ptr ptr long ptr) d3dx9_36.D3DXLoadPatchMeshFromXof @ stdcall D3DXLoadPRTBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileA @ stdcall D3DXLoadPRTBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileW @ stdcall D3DXLoadPRTCompBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileA @ stdcall D3DXLoadPRTCompBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileW @ stdcall D3DXLoadSkinMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadSkinMeshFromXof -@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA +@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA @ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileInMemory -@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW +@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW @ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromMemory -@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA -@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW -@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long) d3dx9_36.D3DXLoadSurfaceFromSurface +@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA +@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW +@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromSurface @ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileA @ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileInMemory @ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileW @@ -196,8 +196,8 @@ @ stdcall D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceA @ stdcall D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceW @ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadVolumeFromVolume -@ stdcall D3DXMatrixAffineTransformation(ptr long ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation -@ stdcall D3DXMatrixAffineTransformation2D(ptr long ptr long ptr) d3dx9_36.D3DXMatrixAffineTransformation2D +@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation +@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr) d3dx9_36.D3DXMatrixAffineTransformation2D @ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixDecompose @ stdcall D3DXMatrixDeterminant(ptr) d3dx9_36.D3DXMatrixDeterminant @ stdcall D3DXMatrixInverse(ptr ptr ptr) d3dx9_36.D3DXMatrixInverse @@ -205,28 +205,28 @@ @ stdcall D3DXMatrixLookAtRH(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixLookAtRH @ stdcall D3DXMatrixMultiply(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiply @ stdcall D3DXMatrixMultiplyTranspose(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiplyTranspose -@ stdcall D3DXMatrixOrthoLH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoLH -@ stdcall D3DXMatrixOrthoOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterLH -@ stdcall D3DXMatrixOrthoOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterRH -@ stdcall D3DXMatrixOrthoRH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoRH -@ stdcall D3DXMatrixPerspectiveFovLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovLH -@ stdcall D3DXMatrixPerspectiveFovRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovRH -@ stdcall D3DXMatrixPerspectiveLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveLH -@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH -@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH -@ stdcall D3DXMatrixPerspectiveRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveRH +@ stdcall D3DXMatrixOrthoLH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoLH +@ stdcall D3DXMatrixOrthoOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterLH +@ stdcall D3DXMatrixOrthoOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterRH +@ stdcall D3DXMatrixOrthoRH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoRH +@ stdcall D3DXMatrixPerspectiveFovLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovLH +@ stdcall D3DXMatrixPerspectiveFovRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovRH +@ stdcall D3DXMatrixPerspectiveLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveLH +@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH +@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH +@ stdcall D3DXMatrixPerspectiveRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveRH @ stdcall D3DXMatrixReflect(ptr ptr) d3dx9_36.D3DXMatrixReflect -@ stdcall D3DXMatrixRotationAxis(ptr ptr long) d3dx9_36.D3DXMatrixRotationAxis +@ stdcall D3DXMatrixRotationAxis(ptr ptr float) d3dx9_36.D3DXMatrixRotationAxis @ stdcall D3DXMatrixRotationQuaternion(ptr ptr) d3dx9_36.D3DXMatrixRotationQuaternion -@ stdcall D3DXMatrixRotationX(ptr long) d3dx9_36.D3DXMatrixRotationX -@ stdcall D3DXMatrixRotationY(ptr long) d3dx9_36.D3DXMatrixRotationY -@ stdcall D3DXMatrixRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXMatrixRotationYawPitchRoll -@ stdcall D3DXMatrixRotationZ(ptr long) d3dx9_36.D3DXMatrixRotationZ -@ stdcall D3DXMatrixScaling(ptr long long long) d3dx9_36.D3DXMatrixScaling +@ stdcall D3DXMatrixRotationX(ptr float) d3dx9_36.D3DXMatrixRotationX +@ stdcall D3DXMatrixRotationY(ptr float) d3dx9_36.D3DXMatrixRotationY +@ stdcall D3DXMatrixRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXMatrixRotationYawPitchRoll +@ stdcall D3DXMatrixRotationZ(ptr float) d3dx9_36.D3DXMatrixRotationZ +@ stdcall D3DXMatrixScaling(ptr float float float) d3dx9_36.D3DXMatrixScaling @ stdcall D3DXMatrixShadow(ptr ptr ptr) d3dx9_36.D3DXMatrixShadow @ stdcall D3DXMatrixTransformation(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXMatrixTransformation -@ stdcall D3DXMatrixTransformation2D(ptr ptr long ptr ptr long ptr) d3dx9_36.D3DXMatrixTransformation2D -@ stdcall D3DXMatrixTranslation(ptr long long long) d3dx9_36.D3DXMatrixTranslation +@ stdcall D3DXMatrixTransformation2D(ptr ptr float ptr ptr float ptr) d3dx9_36.D3DXMatrixTransformation2D +@ stdcall D3DXMatrixTranslation(ptr float float float) d3dx9_36.D3DXMatrixTranslation @ stdcall D3DXMatrixTranspose(ptr ptr) d3dx9_36.D3DXMatrixTranspose @ stdcall D3DXOptimizeFaces(ptr long long long ptr) d3dx9_36.D3DXOptimizeFaces @ stdcall D3DXOptimizeVertices(ptr long long long ptr) d3dx9_36.D3DXOptimizeVertices @@ -237,21 +237,21 @@ @ stdcall D3DXPlaneTransform(ptr ptr ptr) d3dx9_36.D3DXPlaneTransform @ stdcall D3DXPlaneTransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXPlaneTransformArray @ stdcall D3DXPreprocessShader(ptr long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShader -@ stdcall D3DXPreprocessShaderFromFileA(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA -@ stdcall D3DXPreprocessShaderFromFileW(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW -@ stdcall D3DXPreprocessShaderFromResourceA(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA -@ stdcall D3DXPreprocessShaderFromResourceW(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW -@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXQuaternionBaryCentric +@ stdcall D3DXPreprocessShaderFromFileA(str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA +@ stdcall D3DXPreprocessShaderFromFileW(wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW +@ stdcall D3DXPreprocessShaderFromResourceA(long str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA +@ stdcall D3DXPreprocessShaderFromResourceW(long wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW +@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXQuaternionBaryCentric @ stdcall D3DXQuaternionExp(ptr ptr) d3dx9_36.D3DXQuaternionExp @ stdcall D3DXQuaternionInverse(ptr ptr) d3dx9_36.D3DXQuaternionInverse @ stdcall D3DXQuaternionLn(ptr ptr) d3dx9_36.D3DXQuaternionLn @ stdcall D3DXQuaternionMultiply(ptr ptr ptr) d3dx9_36.D3DXQuaternionMultiply @ stdcall D3DXQuaternionNormalize(ptr ptr) d3dx9_36.D3DXQuaternionNormalize -@ stdcall D3DXQuaternionRotationAxis(ptr ptr long) d3dx9_36.D3DXQuaternionRotationAxis +@ stdcall D3DXQuaternionRotationAxis(ptr ptr float) d3dx9_36.D3DXQuaternionRotationAxis @ stdcall D3DXQuaternionRotationMatrix(ptr ptr) d3dx9_36.D3DXQuaternionRotationMatrix -@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXQuaternionRotationYawPitchRoll -@ stdcall D3DXQuaternionSlerp(ptr ptr ptr long) d3dx9_36.D3DXQuaternionSlerp -@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXQuaternionSquad +@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXQuaternionRotationYawPitchRoll +@ stdcall D3DXQuaternionSlerp(ptr ptr ptr float) d3dx9_36.D3DXQuaternionSlerp +@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXQuaternionSquad @ stdcall D3DXQuaternionSquadSetup(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXQuaternionSquadSetup @ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr) d3dx9_36.D3DXQuaternionToAxisAngle @ stdcall D3DXRectPatchSize(ptr ptr ptr) d3dx9_36.D3DXRectPatchSize @@ -274,11 +274,11 @@ @ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW @ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd @ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot -@ stdcall D3DXSHEvalConeLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight +@ stdcall D3DXSHEvalConeLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight @ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection -@ stdcall D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight -@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight -@ stdcall D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight +@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight +@ stdcall D3DXSHEvalHemisphereLight(long ptr int128 int128 ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight +@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight @ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2 @ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3 @ stdcall D3DXSHMultiply4(ptr ptr ptr) d3dx9_36.D3DXSHMultiply4 @@ -288,10 +288,10 @@ @ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC @ stdcall D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr) d3dx9_36.D3DXSHPRTCompSuperCluster @ stdcall D3DXSHRotate(ptr long ptr ptr) d3dx9_36.D3DXSHRotate -@ stdcall D3DXSHRotateZ(ptr long long ptr) d3dx9_36.D3DXSHRotateZ -@ stdcall D3DXSHScale(ptr long ptr ptr) d3dx9_36.D3DXSHScale +@ stdcall D3DXSHRotateZ(ptr long float ptr) d3dx9_36.D3DXSHRotateZ +@ stdcall D3DXSHScale(ptr long ptr float) d3dx9_36.D3DXSHScale @ stdcall D3DXSimplifyMesh(ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXSimplifyMesh -@ stdcall D3DXSphereBoundProbe(ptr long ptr ptr) d3dx9_36.D3DXSphereBoundProbe +@ stdcall D3DXSphereBoundProbe(ptr float ptr ptr) d3dx9_36.D3DXSphereBoundProbe @ stdcall D3DXSplitMesh(ptr ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSplitMesh @ stdcall D3DXTessellateNPatches(ptr ptr long long ptr ptr) d3dx9_36.D3DXTessellateNPatches @ stdcall D3DXTessellateRectPatch(ptr ptr ptr ptr ptr) d3dx9_36.D3DXTessellateRectPatch @@ -302,9 +302,9 @@ @ stdcall D3DXUVAtlasPartition(ptr long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXUVAtlasPartition @ stdcall D3DXValidMesh(ptr ptr ptr) d3dx9_36.D3DXValidMesh @ stdcall D3DXValidPatchMesh(ptr ptr ptr ptr) d3dx9_36.D3DXValidPatchMesh -@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec2BaryCentric -@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2CatmullRom -@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2Hermite +@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec2BaryCentric +@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2CatmullRom +@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2Hermite @ stdcall D3DXVec2Normalize(ptr ptr) d3dx9_36.D3DXVec2Normalize @ stdcall D3DXVec2Transform(ptr ptr ptr) d3dx9_36.D3DXVec2Transform @ stdcall D3DXVec2TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformArray @@ -312,9 +312,9 @@ @ stdcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformCoordArray @ stdcall D3DXVec2TransformNormal(ptr ptr ptr) d3dx9_36.D3DXVec2TransformNormal @ stdcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformNormalArray -@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec3BaryCentric -@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3CatmullRom -@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3Hermite +@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec3BaryCentric +@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3CatmullRom +@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3Hermite @ stdcall D3DXVec3Normalize(ptr ptr) d3dx9_36.D3DXVec3Normalize @ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Project @ stdcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3ProjectArray @@ -326,10 +326,10 @@ @ stdcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformNormalArray @ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Unproject @ stdcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3UnprojectArray -@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec4BaryCentric -@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4CatmullRom +@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec4BaryCentric +@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4CatmullRom @ stdcall D3DXVec4Cross(ptr ptr ptr ptr) d3dx9_36.D3DXVec4Cross -@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4Hermite +@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4Hermite @ stdcall D3DXVec4Normalize(ptr ptr) d3dx9_36.D3DXVec4Normalize @ stdcall D3DXVec4Transform(ptr ptr ptr) d3dx9_36.D3DXVec4Transform @ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec4TransformArray diff --git a/dll/directx/wine/d3dx9_41/d3dx9_41_main.c b/dll/directx/wine/d3dx9_41/d3dx9_41_main.c index 36fbbf4287c..a3a47a47f3e 100644 --- a/dll/directx/wine/d3dx9_41/d3dx9_41_main.c +++ b/dll/directx/wine/d3dx9_41/d3dx9_41_main.c @@ -48,8 +48,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } diff --git a/dll/directx/wine/d3dx9_42/CMakeLists.txt b/dll/directx/wine/d3dx9_42/CMakeLists.txt index ac7b09bf175..30748e913b8 100644 --- a/dll/directx/wine/d3dx9_42/CMakeLists.txt +++ b/dll/directx/wine/d3dx9_42/CMakeLists.txt @@ -1,26 +1,15 @@ +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) + spec2def(d3dx9_42.dll d3dx9_42.spec) list(APPEND SOURCE d3dx9_42_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_42.def) -add_definitions(-D__WINESRC__) -include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) -add_library(d3dx9_42 SHARED ${SOURCE}) +add_library(d3dx9_42 SHARED ${SOURCE} version.rc) set_module_type(d3dx9_42 win32dll) target_link_libraries(d3dx9_42 wine) - -add_importlibs(d3dx9_42 - d3dx9_36 - d3d9 - user32 - gdi32 - advapi32 - msvcrt - kernel32 - ntdll) - -add_dependencies(d3dx9_42 wineheaders) +add_importlibs(d3dx9_42 d3dx9_36 msvcrt kernel32 ntdll) add_cd_file(TARGET d3dx9_42 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_42/d3dx9_42.spec b/dll/directx/wine/d3dx9_42/d3dx9_42.spec index bdd1c73fdcc..777c03529fa 100644 --- a/dll/directx/wine/d3dx9_42/d3dx9_42.spec +++ b/dll/directx/wine/d3dx9_42/d3dx9_42.spec @@ -1,21 +1,21 @@ @ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShader -@ stdcall D3DXAssembleShaderFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA -@ stdcall D3DXAssembleShaderFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW -@ stdcall D3DXAssembleShaderFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA -@ stdcall D3DXAssembleShaderFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW +@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA +@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW +@ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA +@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW @ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) d3dx9_36.D3DXBoxBoundProbe -@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckCubeTextureRequirements -@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckTextureRequirements +@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckCubeTextureRequirements +@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckTextureRequirements @ stdcall D3DXCheckVersion(long long) -@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr long) d3dx9_36.D3DXCheckVolumeTextureRequirements -@ stdcall D3DXCleanMesh(ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh -@ stdcall D3DXColorAdjustContrast(ptr ptr long) d3dx9_36.D3DXColorAdjustContrast -@ stdcall D3DXColorAdjustSaturation(ptr ptr long) d3dx9_36.D3DXColorAdjustSaturation -@ stdcall D3DXCompileShader(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShader -@ stdcall D3DXCompileShaderFromFileA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA -@ stdcall D3DXCompileShaderFromFileW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW -@ stdcall D3DXCompileShaderFromResourceA(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA -@ stdcall D3DXCompileShaderFromResourceW(long ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW +@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckVolumeTextureRequirements +@ stdcall D3DXCleanMesh(long ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh +@ stdcall D3DXColorAdjustContrast(ptr ptr float) d3dx9_36.D3DXColorAdjustContrast +@ stdcall D3DXColorAdjustSaturation(ptr ptr float) d3dx9_36.D3DXColorAdjustSaturation +@ stdcall D3DXCompileShader(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShader +@ stdcall D3DXCompileShaderFromFileA(str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA +@ stdcall D3DXCompileShaderFromFileW(wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW +@ stdcall D3DXCompileShaderFromResourceA(ptr str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA +@ stdcall D3DXCompileShaderFromResourceW(ptr wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW @ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingBox @ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingSphere @ stdcall D3DXComputeIMTFromPerVertexSignal(ptr ptr long long long ptr ptr ptr) d3dx9_36.D3DXComputeIMTFromPerVertexSignal @@ -31,7 +31,7 @@ @ stdcall D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToSingleStrip @ stdcall D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToStrips @ stdcall D3DXCreateAnimationController(long long long long ptr) d3dx9_36.D3DXCreateAnimationController -@ stdcall D3DXCreateBox(ptr long long long ptr ptr) d3dx9_36.D3DXCreateBox +@ stdcall D3DXCreateBox(ptr float float float ptr ptr) d3dx9_36.D3DXCreateBox @ stdcall D3DXCreateBuffer(long ptr) d3dx9_36.D3DXCreateBuffer @ stdcall D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr) d3dx9_36.D3DXCreateCompressedAnimationSet @ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr) d3dx9_36.D3DXCreateCubeTexture @@ -48,24 +48,24 @@ @ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder @ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffect @ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler -@ stdcall D3DXCreateEffectCompilerFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA -@ stdcall D3DXCreateEffectCompilerFromFileW(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW -@ stdcall D3DXCreateEffectCompilerFromResourceA(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA -@ stdcall D3DXCreateEffectCompilerFromResourceW(long ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW -@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx -@ stdcall D3DXCreateEffectFromFileA(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA -@ stdcall D3DXCreateEffectFromFileExA(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA -@ stdcall D3DXCreateEffectFromFileExW(ptr ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW -@ stdcall D3DXCreateEffectFromFileW(ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW -@ stdcall D3DXCreateEffectFromResourceA(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA -@ stdcall D3DXCreateEffectFromResourceExA(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA -@ stdcall D3DXCreateEffectFromResourceExW(ptr long ptr ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW -@ stdcall D3DXCreateEffectFromResourceW(ptr long ptr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW +@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA +@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW +@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA +@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW +@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx +@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA +@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA +@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW +@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW +@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA +@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA +@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW +@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW @ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool -@ stdcall D3DXCreateFontA(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontA +@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectW -@ stdcall D3DXCreateFontW(ptr long long long long long long long long long ptr ptr) d3dx9_36.D3DXCreateFontW +@ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) d3dx9_36.D3DXCreateFontW @ stdcall D3DXCreateFragmentLinker(ptr long ptr) d3dx9_36.D3DXCreateFragmentLinker @ stdcall D3DXCreateFragmentLinkerEx(ptr long long ptr) d3dx9_36.D3DXCreateFragmentLinkerEx @ stdcall D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateKeyframedAnimationSet @@ -87,22 +87,22 @@ @ stdcall D3DXCreateSkinInfo(long ptr long ptr) d3dx9_36.D3DXCreateSkinInfo @ stdcall D3DXCreateSkinInfoFromBlendedMesh(ptr long ptr ptr) d3dx9_36.D3DXCreateSkinInfoFromBlendedMesh @ stdcall D3DXCreateSkinInfoFVF(long long long ptr) d3dx9_36.D3DXCreateSkinInfoFVF -@ stdcall D3DXCreateSphere(ptr long long long ptr ptr) d3dx9_36.D3DXCreateSphere +@ stdcall D3DXCreateSphere(ptr float long long ptr ptr) d3dx9_36.D3DXCreateSphere @ stdcall D3DXCreateSprite(ptr ptr) d3dx9_36.D3DXCreateSprite @ stdcall D3DXCreateTeapot(ptr ptr ptr) d3dx9_36.D3DXCreateTeapot -@ stdcall D3DXCreateTextA(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextA -@ stdcall D3DXCreateTextW(ptr long ptr long long ptr ptr ptr) d3dx9_36.D3DXCreateTextW +@ stdcall D3DXCreateTextA(ptr long str float float ptr ptr ptr) d3dx9_36.D3DXCreateTextA +@ stdcall D3DXCreateTextW(ptr long wstr float float ptr ptr ptr) d3dx9_36.D3DXCreateTextW @ stdcall D3DXCreateTexture(ptr long long long long long long ptr) d3dx9_36.D3DXCreateTexture -@ stdcall D3DXCreateTextureFromFileA(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileA -@ stdcall D3DXCreateTextureFromFileExA(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA -@ stdcall D3DXCreateTextureFromFileExW(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW +@ stdcall D3DXCreateTextureFromFileA(ptr str ptr) d3dx9_36.D3DXCreateTextureFromFileA +@ stdcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA +@ stdcall D3DXCreateTextureFromFileExW(ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW @ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateTextureFromFileInMemory @ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileInMemoryEx -@ stdcall D3DXCreateTextureFromFileW(ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileW -@ stdcall D3DXCreateTextureFromResourceA(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceA -@ stdcall D3DXCreateTextureFromResourceExA(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA -@ stdcall D3DXCreateTextureFromResourceExW(ptr long ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW -@ stdcall D3DXCreateTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceW +@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromFileW +@ stdcall D3DXCreateTextureFromResourceA(ptr ptr str ptr) d3dx9_36.D3DXCreateTextureFromResourceA +@ stdcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA +@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW +@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromResourceW @ stdcall D3DXCreateTextureGutterHelper(long long ptr long ptr) d3dx9_36.D3DXCreateTextureGutterHelper @ stdcall D3DXCreateTextureShader(ptr ptr) d3dx9_36.D3DXCreateTextureShader @ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateTorus @@ -138,7 +138,7 @@ @ stdcall D3DXFrameFind(ptr ptr) d3dx9_36.D3DXFrameFind @ stdcall D3DXFrameNumNamedMatrices(ptr) d3dx9_36.D3DXFrameNumNamedMatrices @ stdcall D3DXFrameRegisterNamedMatrices(ptr ptr) d3dx9_36.D3DXFrameRegisterNamedMatrices -@ stdcall D3DXFresnelTerm(long long) d3dx9_36.D3DXFresnelTerm +@ stdcall D3DXFresnelTerm(float float) d3dx9_36.D3DXFresnelTerm @ stdcall D3DXFVFFromDeclarator(ptr ptr) d3dx9_36.D3DXFVFFromDeclarator @ stdcall D3DXGatherFragments(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragments @ stdcall D3DXGatherFragmentsFromFileA(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXGatherFragmentsFromFileA @@ -151,11 +151,11 @@ @ stdcall D3DXGetDeclVertexSize(ptr long) d3dx9_36.D3DXGetDeclVertexSize @ stdcall D3DXGetDriverLevel(ptr) d3dx9_36.D3DXGetDriverLevel @ stdcall D3DXGetFVFVertexSize(long) d3dx9_36.D3DXGetFVFVertexSize -@ stdcall D3DXGetImageInfoFromFileA(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileA +@ stdcall D3DXGetImageInfoFromFileA(str ptr) d3dx9_36.D3DXGetImageInfoFromFileA @ stdcall D3DXGetImageInfoFromFileInMemory(ptr long ptr) d3dx9_36.D3DXGetImageInfoFromFileInMemory -@ stdcall D3DXGetImageInfoFromFileW(ptr ptr) d3dx9_36.D3DXGetImageInfoFromFileW -@ stdcall D3DXGetImageInfoFromResourceA(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceA -@ stdcall D3DXGetImageInfoFromResourceW(long ptr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW +@ stdcall D3DXGetImageInfoFromFileW(wstr ptr) d3dx9_36.D3DXGetImageInfoFromFileW +@ stdcall D3DXGetImageInfoFromResourceA(long str ptr) d3dx9_36.D3DXGetImageInfoFromResourceA +@ stdcall D3DXGetImageInfoFromResourceW(long wstr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW @ stdcall D3DXGetPixelShaderProfile(ptr) d3dx9_36.D3DXGetPixelShaderProfile @ stdcall D3DXGetShaderConstantTable(ptr ptr) d3dx9_36.D3DXGetShaderConstantTable @ stdcall D3DXGetShaderConstantTableEx(ptr long ptr) d3dx9_36.D3DXGetShaderConstantTableEx @@ -168,27 +168,27 @@ @ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersect @ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectSubset @ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectTri -@ stdcall D3DXLoadMeshFromXA(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA +@ stdcall D3DXLoadMeshFromXA(str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA @ stdcall D3DXLoadMeshFromXInMemory(ptr long long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXInMemory -@ stdcall D3DXLoadMeshFromXResource(long ptr ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource -@ stdcall D3DXLoadMeshFromXW(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW +@ stdcall D3DXLoadMeshFromXResource(long str str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource +@ stdcall D3DXLoadMeshFromXW(wstr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW @ stdcall D3DXLoadMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXof -@ stdcall D3DXLoadMeshHierarchyFromXA(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA +@ stdcall D3DXLoadMeshHierarchyFromXA(str long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA @ stdcall D3DXLoadMeshHierarchyFromXInMemory(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXInMemory -@ stdcall D3DXLoadMeshHierarchyFromXW(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW +@ stdcall D3DXLoadMeshHierarchyFromXW(wstr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW @ stdcall D3DXLoadPatchMeshFromXof(ptr long ptr ptr ptr long ptr) d3dx9_36.D3DXLoadPatchMeshFromXof @ stdcall D3DXLoadPRTBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileA @ stdcall D3DXLoadPRTBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileW @ stdcall D3DXLoadPRTCompBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileA @ stdcall D3DXLoadPRTCompBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileW @ stdcall D3DXLoadSkinMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadSkinMeshFromXof -@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA +@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA @ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileInMemory -@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW +@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW @ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromMemory -@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA -@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW -@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long) d3dx9_36.D3DXLoadSurfaceFromSurface +@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA +@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW +@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromSurface @ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileA @ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileInMemory @ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileW @@ -196,8 +196,8 @@ @ stdcall D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceA @ stdcall D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceW @ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadVolumeFromVolume -@ stdcall D3DXMatrixAffineTransformation(ptr long ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation -@ stdcall D3DXMatrixAffineTransformation2D(ptr long ptr long ptr) d3dx9_36.D3DXMatrixAffineTransformation2D +@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation +@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr) d3dx9_36.D3DXMatrixAffineTransformation2D @ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixDecompose @ stdcall D3DXMatrixDeterminant(ptr) d3dx9_36.D3DXMatrixDeterminant @ stdcall D3DXMatrixInverse(ptr ptr ptr) d3dx9_36.D3DXMatrixInverse @@ -205,28 +205,28 @@ @ stdcall D3DXMatrixLookAtRH(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixLookAtRH @ stdcall D3DXMatrixMultiply(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiply @ stdcall D3DXMatrixMultiplyTranspose(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiplyTranspose -@ stdcall D3DXMatrixOrthoLH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoLH -@ stdcall D3DXMatrixOrthoOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterLH -@ stdcall D3DXMatrixOrthoOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixOrthoOffCenterRH -@ stdcall D3DXMatrixOrthoRH(ptr long long long long) d3dx9_36.D3DXMatrixOrthoRH -@ stdcall D3DXMatrixPerspectiveFovLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovLH -@ stdcall D3DXMatrixPerspectiveFovRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveFovRH -@ stdcall D3DXMatrixPerspectiveLH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveLH -@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH -@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr long long long long long long) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH -@ stdcall D3DXMatrixPerspectiveRH(ptr long long long long) d3dx9_36.D3DXMatrixPerspectiveRH +@ stdcall D3DXMatrixOrthoLH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoLH +@ stdcall D3DXMatrixOrthoOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterLH +@ stdcall D3DXMatrixOrthoOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterRH +@ stdcall D3DXMatrixOrthoRH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoRH +@ stdcall D3DXMatrixPerspectiveFovLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovLH +@ stdcall D3DXMatrixPerspectiveFovRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovRH +@ stdcall D3DXMatrixPerspectiveLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveLH +@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH +@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH +@ stdcall D3DXMatrixPerspectiveRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveRH @ stdcall D3DXMatrixReflect(ptr ptr) d3dx9_36.D3DXMatrixReflect -@ stdcall D3DXMatrixRotationAxis(ptr ptr long) d3dx9_36.D3DXMatrixRotationAxis +@ stdcall D3DXMatrixRotationAxis(ptr ptr float) d3dx9_36.D3DXMatrixRotationAxis @ stdcall D3DXMatrixRotationQuaternion(ptr ptr) d3dx9_36.D3DXMatrixRotationQuaternion -@ stdcall D3DXMatrixRotationX(ptr long) d3dx9_36.D3DXMatrixRotationX -@ stdcall D3DXMatrixRotationY(ptr long) d3dx9_36.D3DXMatrixRotationY -@ stdcall D3DXMatrixRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXMatrixRotationYawPitchRoll -@ stdcall D3DXMatrixRotationZ(ptr long) d3dx9_36.D3DXMatrixRotationZ -@ stdcall D3DXMatrixScaling(ptr long long long) d3dx9_36.D3DXMatrixScaling +@ stdcall D3DXMatrixRotationX(ptr float) d3dx9_36.D3DXMatrixRotationX +@ stdcall D3DXMatrixRotationY(ptr float) d3dx9_36.D3DXMatrixRotationY +@ stdcall D3DXMatrixRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXMatrixRotationYawPitchRoll +@ stdcall D3DXMatrixRotationZ(ptr float) d3dx9_36.D3DXMatrixRotationZ +@ stdcall D3DXMatrixScaling(ptr float float float) d3dx9_36.D3DXMatrixScaling @ stdcall D3DXMatrixShadow(ptr ptr ptr) d3dx9_36.D3DXMatrixShadow @ stdcall D3DXMatrixTransformation(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXMatrixTransformation -@ stdcall D3DXMatrixTransformation2D(ptr ptr long ptr ptr long ptr) d3dx9_36.D3DXMatrixTransformation2D -@ stdcall D3DXMatrixTranslation(ptr long long long) d3dx9_36.D3DXMatrixTranslation +@ stdcall D3DXMatrixTransformation2D(ptr ptr float ptr ptr float ptr) d3dx9_36.D3DXMatrixTransformation2D +@ stdcall D3DXMatrixTranslation(ptr float float float) d3dx9_36.D3DXMatrixTranslation @ stdcall D3DXMatrixTranspose(ptr ptr) d3dx9_36.D3DXMatrixTranspose @ stdcall D3DXOptimizeFaces(ptr long long long ptr) d3dx9_36.D3DXOptimizeFaces @ stdcall D3DXOptimizeVertices(ptr long long long ptr) d3dx9_36.D3DXOptimizeVertices @@ -237,21 +237,21 @@ @ stdcall D3DXPlaneTransform(ptr ptr ptr) d3dx9_36.D3DXPlaneTransform @ stdcall D3DXPlaneTransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXPlaneTransformArray @ stdcall D3DXPreprocessShader(ptr long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShader -@ stdcall D3DXPreprocessShaderFromFileA(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA -@ stdcall D3DXPreprocessShaderFromFileW(ptr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW -@ stdcall D3DXPreprocessShaderFromResourceA(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA -@ stdcall D3DXPreprocessShaderFromResourceW(long long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW -@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXQuaternionBaryCentric +@ stdcall D3DXPreprocessShaderFromFileA(str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA +@ stdcall D3DXPreprocessShaderFromFileW(wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW +@ stdcall D3DXPreprocessShaderFromResourceA(long str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA +@ stdcall D3DXPreprocessShaderFromResourceW(long wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW +@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXQuaternionBaryCentric @ stdcall D3DXQuaternionExp(ptr ptr) d3dx9_36.D3DXQuaternionExp @ stdcall D3DXQuaternionInverse(ptr ptr) d3dx9_36.D3DXQuaternionInverse @ stdcall D3DXQuaternionLn(ptr ptr) d3dx9_36.D3DXQuaternionLn @ stdcall D3DXQuaternionMultiply(ptr ptr ptr) d3dx9_36.D3DXQuaternionMultiply @ stdcall D3DXQuaternionNormalize(ptr ptr) d3dx9_36.D3DXQuaternionNormalize -@ stdcall D3DXQuaternionRotationAxis(ptr ptr long) d3dx9_36.D3DXQuaternionRotationAxis +@ stdcall D3DXQuaternionRotationAxis(ptr ptr float) d3dx9_36.D3DXQuaternionRotationAxis @ stdcall D3DXQuaternionRotationMatrix(ptr ptr) d3dx9_36.D3DXQuaternionRotationMatrix -@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr long long long) d3dx9_36.D3DXQuaternionRotationYawPitchRoll -@ stdcall D3DXQuaternionSlerp(ptr ptr ptr long) d3dx9_36.D3DXQuaternionSlerp -@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXQuaternionSquad +@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXQuaternionRotationYawPitchRoll +@ stdcall D3DXQuaternionSlerp(ptr ptr ptr float) d3dx9_36.D3DXQuaternionSlerp +@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXQuaternionSquad @ stdcall D3DXQuaternionSquadSetup(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXQuaternionSquadSetup @ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr) d3dx9_36.D3DXQuaternionToAxisAngle @ stdcall D3DXRectPatchSize(ptr ptr ptr) d3dx9_36.D3DXRectPatchSize @@ -274,11 +274,11 @@ @ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW @ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd @ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot -@ stdcall D3DXSHEvalConeLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight +@ stdcall D3DXSHEvalConeLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight @ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection -@ stdcall D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight -@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight -@ stdcall D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight +@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight +@ stdcall D3DXSHEvalHemisphereLight(long ptr int128 int128 ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight +@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight @ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2 @ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3 @ stdcall D3DXSHMultiply4(ptr ptr ptr) d3dx9_36.D3DXSHMultiply4 @@ -288,10 +288,10 @@ @ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC @ stdcall D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr) d3dx9_36.D3DXSHPRTCompSuperCluster @ stdcall D3DXSHRotate(ptr long ptr ptr) d3dx9_36.D3DXSHRotate -@ stdcall D3DXSHRotateZ(ptr long long ptr) d3dx9_36.D3DXSHRotateZ -@ stdcall D3DXSHScale(ptr long ptr ptr) d3dx9_36.D3DXSHScale +@ stdcall D3DXSHRotateZ(ptr long float ptr) d3dx9_36.D3DXSHRotateZ +@ stdcall D3DXSHScale(ptr long ptr float) d3dx9_36.D3DXSHScale @ stdcall D3DXSimplifyMesh(ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXSimplifyMesh -@ stdcall D3DXSphereBoundProbe(ptr long ptr ptr) d3dx9_36.D3DXSphereBoundProbe +@ stdcall D3DXSphereBoundProbe(ptr float ptr ptr) d3dx9_36.D3DXSphereBoundProbe @ stdcall D3DXSplitMesh(ptr ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSplitMesh @ stdcall D3DXTessellateNPatches(ptr ptr long long ptr ptr) d3dx9_36.D3DXTessellateNPatches @ stdcall D3DXTessellateRectPatch(ptr ptr ptr ptr ptr) d3dx9_36.D3DXTessellateRectPatch @@ -302,9 +302,9 @@ @ stdcall D3DXUVAtlasPartition(ptr long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXUVAtlasPartition @ stdcall D3DXValidMesh(ptr ptr ptr) d3dx9_36.D3DXValidMesh @ stdcall D3DXValidPatchMesh(ptr ptr ptr ptr) d3dx9_36.D3DXValidPatchMesh -@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec2BaryCentric -@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2CatmullRom -@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec2Hermite +@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec2BaryCentric +@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2CatmullRom +@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2Hermite @ stdcall D3DXVec2Normalize(ptr ptr) d3dx9_36.D3DXVec2Normalize @ stdcall D3DXVec2Transform(ptr ptr ptr) d3dx9_36.D3DXVec2Transform @ stdcall D3DXVec2TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformArray @@ -312,9 +312,9 @@ @ stdcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformCoordArray @ stdcall D3DXVec2TransformNormal(ptr ptr ptr) d3dx9_36.D3DXVec2TransformNormal @ stdcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformNormalArray -@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec3BaryCentric -@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3CatmullRom -@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec3Hermite +@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec3BaryCentric +@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3CatmullRom +@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3Hermite @ stdcall D3DXVec3Normalize(ptr ptr) d3dx9_36.D3DXVec3Normalize @ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Project @ stdcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3ProjectArray @@ -326,10 +326,10 @@ @ stdcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformNormalArray @ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Unproject @ stdcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3UnprojectArray -@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr long long) d3dx9_36.D3DXVec4BaryCentric -@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4CatmullRom +@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec4BaryCentric +@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4CatmullRom @ stdcall D3DXVec4Cross(ptr ptr ptr ptr) d3dx9_36.D3DXVec4Cross -@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr long) d3dx9_36.D3DXVec4Hermite +@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4Hermite @ stdcall D3DXVec4Normalize(ptr ptr) d3dx9_36.D3DXVec4Normalize @ stdcall D3DXVec4Transform(ptr ptr ptr) d3dx9_36.D3DXVec4Transform @ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec4TransformArray diff --git a/dll/directx/wine/d3dx9_42/d3dx9_42_main.c b/dll/directx/wine/d3dx9_42/d3dx9_42_main.c index 744eb6014f3..7797babe680 100644 --- a/dll/directx/wine/d3dx9_42/d3dx9_42_main.c +++ b/dll/directx/wine/d3dx9_42/d3dx9_42_main.c @@ -49,8 +49,6 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(inst); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } diff --git a/dll/directx/wine/d3dx9_43/CMakeLists.txt b/dll/directx/wine/d3dx9_43/CMakeLists.txt new file mode 100644 index 00000000000..2aa91917d8d --- /dev/null +++ b/dll/directx/wine/d3dx9_43/CMakeLists.txt @@ -0,0 +1,14 @@ + +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) + +spec2def(d3dx9_43.dll d3dx9_43.spec) + +list(APPEND SOURCE + d3dx9_43_main.c + ${CMAKE_CURRENT_BINARY_DIR}/d3dx9_43.def) + +add_library(d3dx9_43 SHARED ${SOURCE} version.rc) +set_module_type(d3dx9_43 win32dll) +add_importlibs(d3dx9_43 d3dx9_36 msvcrt kernel32) +add_cd_file(TARGET d3dx9_43 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_43/d3dx9_43.spec b/dll/directx/wine/d3dx9_43/d3dx9_43.spec new file mode 100644 index 00000000000..d97b81f0b25 --- /dev/null +++ b/dll/directx/wine/d3dx9_43/d3dx9_43.spec @@ -0,0 +1,329 @@ +@ stdcall D3DXAssembleShader(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShader +@ stdcall D3DXAssembleShaderFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileA +@ stdcall D3DXAssembleShaderFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromFileW +@ stdcall D3DXAssembleShaderFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceA +@ stdcall D3DXAssembleShaderFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXAssembleShaderFromResourceW +@ stdcall D3DXBoxBoundProbe(ptr ptr ptr ptr) d3dx9_36.D3DXBoxBoundProbe +@ stdcall D3DXCheckCubeTextureRequirements(ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckCubeTextureRequirements +@ stdcall D3DXCheckTextureRequirements(ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckTextureRequirements +@ stdcall D3DXCheckVersion(long long) +@ stdcall D3DXCheckVolumeTextureRequirements(ptr ptr ptr ptr ptr long ptr ptr) d3dx9_36.D3DXCheckVolumeTextureRequirements +@ stdcall D3DXCleanMesh(long ptr ptr ptr ptr ptr) d3dx9_36.D3DXCleanMesh +@ stdcall D3DXColorAdjustContrast(ptr ptr float) d3dx9_36.D3DXColorAdjustContrast +@ stdcall D3DXColorAdjustSaturation(ptr ptr float) d3dx9_36.D3DXColorAdjustSaturation +@ stdcall D3DXCompileShader(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShader +@ stdcall D3DXCompileShaderFromFileA(str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileA +@ stdcall D3DXCompileShaderFromFileW(wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromFileW +@ stdcall D3DXCompileShaderFromResourceA(ptr str ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceA +@ stdcall D3DXCompileShaderFromResourceW(ptr wstr ptr ptr str str long ptr ptr ptr) d3dx9_36.D3DXCompileShaderFromResourceW +@ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingBox +@ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingSphere +@ stdcall D3DXComputeIMTFromPerTexelSignal(ptr long ptr long long long long long ptr ptr ptr) d3dx9_36.D3DXComputeIMTFromPerTexelSignal +@ stdcall D3DXComputeIMTFromPerVertexSignal(ptr ptr long long long ptr ptr ptr) d3dx9_36.D3DXComputeIMTFromPerVertexSignal +@ stdcall D3DXComputeIMTFromSignal(ptr long long long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXComputeIMTFromSignal +@ stdcall D3DXComputeIMTFromTexture(ptr ptr long long ptr ptr ptr) d3dx9_36.D3DXComputeIMTFromTexture +@ stdcall D3DXComputeNormalMap(ptr ptr ptr long long long) d3dx9_36.D3DXComputeNormalMap +@ stdcall D3DXComputeNormals(ptr ptr) d3dx9_36.D3DXComputeNormals +@ stdcall D3DXComputeTangent(ptr long long long long ptr) d3dx9_36.D3DXComputeTangent +@ stdcall D3DXComputeTangentFrame(ptr long) d3dx9_36.D3DXComputeTangentFrame +@ stdcall D3DXComputeTangentFrameEx(ptr long long long long long long long long long ptr long long long ptr ptr) d3dx9_36.D3DXComputeTangentFrameEx +@ stdcall D3DXConcatenateMeshes(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXConcatenateMeshes +@ stdcall D3DXConvertMeshSubsetToSingleStrip(ptr long long ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToSingleStrip +@ stdcall D3DXConvertMeshSubsetToStrips(ptr long long ptr ptr ptr ptr) d3dx9_36.D3DXConvertMeshSubsetToStrips +@ stdcall D3DXCreateAnimationController(long long long long ptr) d3dx9_36.D3DXCreateAnimationController +@ stdcall D3DXCreateBox(ptr float float float ptr ptr) d3dx9_36.D3DXCreateBox +@ stdcall D3DXCreateBuffer(long ptr) d3dx9_36.D3DXCreateBuffer +@ stdcall D3DXCreateCompressedAnimationSet(ptr long long ptr long ptr ptr) d3dx9_36.D3DXCreateCompressedAnimationSet +@ stdcall D3DXCreateCubeTexture(ptr long long long long long ptr) d3dx9_36.D3DXCreateCubeTexture +@ stdcall D3DXCreateCubeTextureFromFileA(ptr ptr ptr) d3dx9_36.D3DXCreateCubeTextureFromFileA +@ stdcall D3DXCreateCubeTextureFromFileExA(ptr ptr long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateCubeTextureFromFileExA +@ stdcall D3DXCreateCubeTextureFromFileExW(ptr ptr long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateCubeTextureFromFileExW +@ stdcall D3DXCreateCubeTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateCubeTextureFromFileInMemory +@ stdcall D3DXCreateCubeTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateCubeTextureFromFileInMemoryEx +@ stdcall D3DXCreateCubeTextureFromFileW(ptr ptr ptr) d3dx9_36.D3DXCreateCubeTextureFromFileW +@ stdcall D3DXCreateCubeTextureFromResourceA(ptr long ptr ptr) d3dx9_36.D3DXCreateCubeTextureFromResourceA +@ stdcall D3DXCreateCubeTextureFromResourceExA(ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateCubeTextureFromResourceExA +@ stdcall D3DXCreateCubeTextureFromResourceExW(ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateCubeTextureFromResourceExW +@ stdcall D3DXCreateCubeTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateCubeTextureFromResourceW +@ stdcall D3DXCreateCylinder(ptr long long long long long ptr ptr) d3dx9_36.D3DXCreateCylinder +@ stdcall D3DXCreateEffect(ptr ptr long ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffect +@ stdcall D3DXCreateEffectCompiler(ptr long ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompiler +@ stdcall D3DXCreateEffectCompilerFromFileA(str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileA +@ stdcall D3DXCreateEffectCompilerFromFileW(wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromFileW +@ stdcall D3DXCreateEffectCompilerFromResourceA(long str ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceA +@ stdcall D3DXCreateEffectCompilerFromResourceW(long wstr ptr ptr long ptr ptr) d3dx9_36.D3DXCreateEffectCompilerFromResourceW +@ stdcall D3DXCreateEffectEx(ptr ptr long ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectEx +@ stdcall D3DXCreateEffectFromFileA(ptr str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileA +@ stdcall D3DXCreateEffectFromFileExA(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExA +@ stdcall D3DXCreateEffectFromFileExW(ptr str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileExW +@ stdcall D3DXCreateEffectFromFileW(ptr wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromFileW +@ stdcall D3DXCreateEffectFromResourceA(ptr long str ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceA +@ stdcall D3DXCreateEffectFromResourceExA(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExA +@ stdcall D3DXCreateEffectFromResourceExW(ptr long str ptr ptr str long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceExW +@ stdcall D3DXCreateEffectFromResourceW(ptr long wstr ptr ptr long ptr ptr ptr) d3dx9_36.D3DXCreateEffectFromResourceW +@ stdcall D3DXCreateEffectPool(ptr) d3dx9_36.D3DXCreateEffectPool +@ stdcall D3DXCreateFontA(ptr long long long long long long long long long str ptr) d3dx9_36.D3DXCreateFontA +@ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA +@ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectW +@ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) d3dx9_36.D3DXCreateFontW +@ stdcall D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateKeyframedAnimationSet +@ stdcall D3DXCreateLine(ptr ptr) d3dx9_36.D3DXCreateLine +@ stdcall D3DXCreateMatrixStack(long ptr) d3dx9_36.D3DXCreateMatrixStack +@ stdcall D3DXCreateMesh(long long long ptr ptr ptr) d3dx9_36.D3DXCreateMesh +@ stdcall D3DXCreateMeshFVF(long long long long ptr ptr) d3dx9_36.D3DXCreateMeshFVF +@ stdcall D3DXCreateNPatchMesh(ptr ptr) d3dx9_36.D3DXCreateNPatchMesh +@ stdcall D3DXCreatePMeshFromStream(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXCreatePMeshFromStream +@ stdcall D3DXCreatePatchMesh(ptr long long long ptr ptr ptr) d3dx9_36.D3DXCreatePatchMesh +@ stdcall D3DXCreatePolygon(ptr long long ptr ptr) d3dx9_36.D3DXCreatePolygon +@ stdcall D3DXCreatePRTBuffer(long long long ptr) d3dx9_36.D3DXCreatePRTBuffer +@ stdcall D3DXCreatePRTBufferTex(long long long long ptr) d3dx9_36.D3DXCreatePRTBufferTex +@ stdcall D3DXCreatePRTCompBuffer(long long long ptr ptr ptr ptr) d3dx9_36.D3DXCreatePRTCompBuffer +@ stdcall D3DXCreatePRTEngine(ptr ptr long ptr ptr) d3dx9_36.D3DXCreatePRTEngine +@ stdcall D3DXCreateRenderToEnvMap(ptr long long long long long ptr) d3dx9_36.D3DXCreateRenderToEnvMap +@ stdcall D3DXCreateRenderToSurface(ptr long long long long long ptr) d3dx9_36.D3DXCreateRenderToSurface +@ stdcall D3DXCreateSPMesh(ptr ptr ptr ptr ptr) d3dx9_36.D3DXCreateSPMesh +@ stdcall D3DXCreateSkinInfo(long ptr long ptr) d3dx9_36.D3DXCreateSkinInfo +@ stdcall D3DXCreateSkinInfoFromBlendedMesh(ptr long ptr ptr) d3dx9_36.D3DXCreateSkinInfoFromBlendedMesh +@ stdcall D3DXCreateSkinInfoFVF(long long long ptr) d3dx9_36.D3DXCreateSkinInfoFVF +@ stdcall D3DXCreateSphere(ptr float long long ptr ptr) d3dx9_36.D3DXCreateSphere +@ stdcall D3DXCreateSprite(ptr ptr) d3dx9_36.D3DXCreateSprite +@ stdcall D3DXCreateTeapot(ptr ptr ptr) d3dx9_36.D3DXCreateTeapot +@ stdcall D3DXCreateTextA(ptr long str float float ptr ptr ptr) d3dx9_36.D3DXCreateTextA +@ stdcall D3DXCreateTextW(ptr long wstr float float ptr ptr ptr) d3dx9_36.D3DXCreateTextW +@ stdcall D3DXCreateTexture(ptr long long long long long long ptr) d3dx9_36.D3DXCreateTexture +@ stdcall D3DXCreateTextureFromFileA(ptr str ptr) d3dx9_36.D3DXCreateTextureFromFileA +@ stdcall D3DXCreateTextureFromFileExA(ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExA +@ stdcall D3DXCreateTextureFromFileExW(ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileExW +@ stdcall D3DXCreateTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateTextureFromFileInMemory +@ stdcall D3DXCreateTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromFileInMemoryEx +@ stdcall D3DXCreateTextureFromFileW(ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromFileW +@ stdcall D3DXCreateTextureFromResourceA(ptr ptr str ptr) d3dx9_36.D3DXCreateTextureFromResourceA +@ stdcall D3DXCreateTextureFromResourceExA(ptr ptr str long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExA +@ stdcall D3DXCreateTextureFromResourceExW(ptr ptr wstr long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateTextureFromResourceExW +@ stdcall D3DXCreateTextureFromResourceW(ptr ptr wstr ptr) d3dx9_36.D3DXCreateTextureFromResourceW +@ stdcall D3DXCreateTextureGutterHelper(long long ptr long ptr) d3dx9_36.D3DXCreateTextureGutterHelper +@ stdcall D3DXCreateTextureShader(ptr ptr) d3dx9_36.D3DXCreateTextureShader +@ stdcall D3DXCreateTorus(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateTorus +@ stdcall D3DXCreateVolumeTexture(ptr long long long long long long long ptr) d3dx9_36.D3DXCreateVolumeTexture +@ stdcall D3DXCreateVolumeTextureFromFileA(ptr ptr ptr) d3dx9_36.D3DXCreateVolumeTextureFromFileA +@ stdcall D3DXCreateVolumeTextureFromFileExA(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateVolumeTextureFromFileExA +@ stdcall D3DXCreateVolumeTextureFromFileExW(ptr ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateVolumeTextureFromFileExW +@ stdcall D3DXCreateVolumeTextureFromFileInMemory(ptr ptr long ptr) d3dx9_36.D3DXCreateVolumeTextureFromFileInMemory +@ stdcall D3DXCreateVolumeTextureFromFileInMemoryEx(ptr ptr long long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateVolumeTextureFromFileInMemoryEx +@ stdcall D3DXCreateVolumeTextureFromFileW(ptr ptr ptr) d3dx9_36.D3DXCreateVolumeTextureFromFileW +@ stdcall D3DXCreateVolumeTextureFromResourceA(ptr long ptr ptr) d3dx9_36.D3DXCreateVolumeTextureFromResourceA +@ stdcall D3DXCreateVolumeTextureFromResourceExA(ptr long ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateVolumeTextureFromResourceExA +@ stdcall D3DXCreateVolumeTextureFromResourceExW(ptr long ptr long long long long long long long long long long ptr ptr ptr) d3dx9_36.D3DXCreateVolumeTextureFromResourceExW +@ stdcall D3DXCreateVolumeTextureFromResourceW(ptr long ptr ptr) d3dx9_36.D3DXCreateVolumeTextureFromResourceW +@ stdcall D3DXDebugMute(long) d3dx9_36.D3DXDebugMute +@ stdcall D3DXDeclaratorFromFVF(long ptr) d3dx9_36.D3DXDeclaratorFromFVF +@ stdcall D3DXDisassembleEffect(ptr long ptr) d3dx9_36.D3DXDisassembleEffect +@ stdcall D3DXDisassembleShader(ptr long ptr ptr) d3dx9_36.D3DXDisassembleShader +@ stdcall D3DXFileCreate(ptr) d3dx9_36.D3DXFileCreate +@ stdcall D3DXFillCubeTexture(ptr ptr ptr) d3dx9_36.D3DXFillCubeTexture +@ stdcall D3DXFillCubeTextureTX(ptr ptr) d3dx9_36.D3DXFillCubeTextureTX +@ stdcall D3DXFillTexture(ptr ptr ptr) d3dx9_36.D3DXFillTexture +@ stdcall D3DXFillTextureTX(ptr ptr) d3dx9_36.D3DXFillTextureTX +@ stdcall D3DXFillVolumeTexture(ptr ptr ptr) d3dx9_36.D3DXFillVolumeTexture +@ stdcall D3DXFillVolumeTextureTX(ptr ptr) d3dx9_36.D3DXFillVolumeTextureTX +@ stdcall D3DXFilterTexture(ptr ptr long long) d3dx9_36.D3DXFilterTexture +@ stdcall D3DXFindShaderComment(ptr long ptr ptr) d3dx9_36.D3DXFindShaderComment +@ stdcall D3DXFloat16To32Array(ptr ptr long) d3dx9_36.D3DXFloat16To32Array +@ stdcall D3DXFloat32To16Array(ptr ptr long) d3dx9_36.D3DXFloat32To16Array +@ stdcall D3DXFrameAppendChild(ptr ptr) d3dx9_36.D3DXFrameAppendChild +@ stdcall D3DXFrameCalculateBoundingSphere(ptr ptr ptr) d3dx9_36.D3DXFrameCalculateBoundingSphere +@ stdcall D3DXFrameDestroy(ptr ptr) d3dx9_36.D3DXFrameDestroy +@ stdcall D3DXFrameFind(ptr ptr) d3dx9_36.D3DXFrameFind +@ stdcall D3DXFrameNumNamedMatrices(ptr) d3dx9_36.D3DXFrameNumNamedMatrices +@ stdcall D3DXFrameRegisterNamedMatrices(ptr ptr) d3dx9_36.D3DXFrameRegisterNamedMatrices +@ stdcall D3DXFresnelTerm(float float) d3dx9_36.D3DXFresnelTerm +@ stdcall D3DXFVFFromDeclarator(ptr ptr) d3dx9_36.D3DXFVFFromDeclarator +@ stdcall D3DXGenerateOutputDecl(ptr ptr) d3dx9_36.D3DXGenerateOutputDecl +@ stdcall D3DXGeneratePMesh(ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXGeneratePMesh +@ stdcall D3DXGetDeclLength(ptr) d3dx9_36.D3DXGetDeclLength +@ stdcall D3DXGetDeclVertexSize(ptr long) d3dx9_36.D3DXGetDeclVertexSize +@ stdcall D3DXGetDriverLevel(ptr) d3dx9_36.D3DXGetDriverLevel +@ stdcall D3DXGetFVFVertexSize(long) d3dx9_36.D3DXGetFVFVertexSize +@ stdcall D3DXGetImageInfoFromFileA(str ptr) d3dx9_36.D3DXGetImageInfoFromFileA +@ stdcall D3DXGetImageInfoFromFileInMemory(ptr long ptr) d3dx9_36.D3DXGetImageInfoFromFileInMemory +@ stdcall D3DXGetImageInfoFromFileW(wstr ptr) d3dx9_36.D3DXGetImageInfoFromFileW +@ stdcall D3DXGetImageInfoFromResourceA(long str ptr) d3dx9_36.D3DXGetImageInfoFromResourceA +@ stdcall D3DXGetImageInfoFromResourceW(long wstr ptr) d3dx9_36.D3DXGetImageInfoFromResourceW +@ stdcall D3DXGetPixelShaderProfile(ptr) d3dx9_36.D3DXGetPixelShaderProfile +@ stdcall D3DXGetShaderConstantTable(ptr ptr) d3dx9_36.D3DXGetShaderConstantTable +@ stdcall D3DXGetShaderConstantTableEx(ptr long ptr) d3dx9_36.D3DXGetShaderConstantTableEx +@ stdcall D3DXGetShaderInputSemantics(ptr ptr ptr) d3dx9_36.D3DXGetShaderInputSemantics +@ stdcall D3DXGetShaderOutputSemantics(ptr ptr ptr) d3dx9_36.D3DXGetShaderOutputSemantics +@ stdcall D3DXGetShaderSamplers(ptr ptr ptr) d3dx9_36.D3DXGetShaderSamplers +@ stdcall D3DXGetShaderSize(ptr) d3dx9_36.D3DXGetShaderSize +@ stdcall D3DXGetShaderVersion(ptr) d3dx9_36.D3DXGetShaderVersion +@ stdcall D3DXGetVertexShaderProfile(ptr) d3dx9_36.D3DXGetVertexShaderProfile +@ stdcall D3DXIntersect(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersect +@ stdcall D3DXIntersectSubset(ptr long ptr ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectSubset +@ stdcall D3DXIntersectTri(ptr ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXIntersectTri +@ stdcall D3DXLoadMeshFromXA(str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXA +@ stdcall D3DXLoadMeshFromXInMemory(ptr long long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXInMemory +@ stdcall D3DXLoadMeshFromXResource(long str str long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXResource +@ stdcall D3DXLoadMeshFromXW(wstr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXW +@ stdcall D3DXLoadMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshFromXof +@ stdcall D3DXLoadMeshHierarchyFromXA(str long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXA +@ stdcall D3DXLoadMeshHierarchyFromXInMemory(ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXInMemory +@ stdcall D3DXLoadMeshHierarchyFromXW(wstr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadMeshHierarchyFromXW +@ stdcall D3DXLoadPatchMeshFromXof(ptr long ptr ptr ptr long ptr) d3dx9_36.D3DXLoadPatchMeshFromXof +@ stdcall D3DXLoadPRTBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileA +@ stdcall D3DXLoadPRTBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTBufferFromFileW +@ stdcall D3DXLoadPRTCompBufferFromFileA(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileA +@ stdcall D3DXLoadPRTCompBufferFromFileW(ptr ptr) d3dx9_36.D3DXLoadPRTCompBufferFromFileW +@ stdcall D3DXLoadSkinMeshFromXof(ptr long ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXLoadSkinMeshFromXof +@ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileA +@ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileInMemory +@ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromFileW +@ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromMemory +@ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceA +@ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) d3dx9_36.D3DXLoadSurfaceFromResourceW +@ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromSurface +@ stdcall D3DXLoadVolumeFromFileA(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileA +@ stdcall D3DXLoadVolumeFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileInMemory +@ stdcall D3DXLoadVolumeFromFileW(ptr ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromFileW +@ stdcall D3DXLoadVolumeFromMemory(ptr ptr ptr ptr long long long ptr ptr long long) d3dx9_36.D3DXLoadVolumeFromMemory +@ stdcall D3DXLoadVolumeFromResourceA(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceA +@ stdcall D3DXLoadVolumeFromResourceW(ptr ptr ptr long ptr ptr long long ptr) d3dx9_36.D3DXLoadVolumeFromResourceW +@ stdcall D3DXLoadVolumeFromVolume(ptr ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXLoadVolumeFromVolume +@ stdcall D3DXMatrixAffineTransformation(ptr float ptr ptr ptr) d3dx9_36.D3DXMatrixAffineTransformation +@ stdcall D3DXMatrixAffineTransformation2D(ptr float ptr float ptr) d3dx9_36.D3DXMatrixAffineTransformation2D +@ stdcall D3DXMatrixDecompose(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixDecompose +@ stdcall D3DXMatrixDeterminant(ptr) d3dx9_36.D3DXMatrixDeterminant +@ stdcall D3DXMatrixInverse(ptr ptr ptr) d3dx9_36.D3DXMatrixInverse +@ stdcall D3DXMatrixLookAtLH(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixLookAtLH +@ stdcall D3DXMatrixLookAtRH(ptr ptr ptr ptr) d3dx9_36.D3DXMatrixLookAtRH +@ stdcall D3DXMatrixMultiply(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiply +@ stdcall D3DXMatrixMultiplyTranspose(ptr ptr ptr) d3dx9_36.D3DXMatrixMultiplyTranspose +@ stdcall D3DXMatrixOrthoLH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoLH +@ stdcall D3DXMatrixOrthoOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterLH +@ stdcall D3DXMatrixOrthoOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixOrthoOffCenterRH +@ stdcall D3DXMatrixOrthoRH(ptr float float float float) d3dx9_36.D3DXMatrixOrthoRH +@ stdcall D3DXMatrixPerspectiveFovLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovLH +@ stdcall D3DXMatrixPerspectiveFovRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveFovRH +@ stdcall D3DXMatrixPerspectiveLH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveLH +@ stdcall D3DXMatrixPerspectiveOffCenterLH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterLH +@ stdcall D3DXMatrixPerspectiveOffCenterRH(ptr float float float float float float) d3dx9_36.D3DXMatrixPerspectiveOffCenterRH +@ stdcall D3DXMatrixPerspectiveRH(ptr float float float float) d3dx9_36.D3DXMatrixPerspectiveRH +@ stdcall D3DXMatrixReflect(ptr ptr) d3dx9_36.D3DXMatrixReflect +@ stdcall D3DXMatrixRotationAxis(ptr ptr float) d3dx9_36.D3DXMatrixRotationAxis +@ stdcall D3DXMatrixRotationQuaternion(ptr ptr) d3dx9_36.D3DXMatrixRotationQuaternion +@ stdcall D3DXMatrixRotationX(ptr float) d3dx9_36.D3DXMatrixRotationX +@ stdcall D3DXMatrixRotationY(ptr float) d3dx9_36.D3DXMatrixRotationY +@ stdcall D3DXMatrixRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXMatrixRotationYawPitchRoll +@ stdcall D3DXMatrixRotationZ(ptr float) d3dx9_36.D3DXMatrixRotationZ +@ stdcall D3DXMatrixScaling(ptr float float float) d3dx9_36.D3DXMatrixScaling +@ stdcall D3DXMatrixShadow(ptr ptr ptr) d3dx9_36.D3DXMatrixShadow +@ stdcall D3DXMatrixTransformation(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXMatrixTransformation +@ stdcall D3DXMatrixTransformation2D(ptr ptr float ptr ptr float ptr) d3dx9_36.D3DXMatrixTransformation2D +@ stdcall D3DXMatrixTranslation(ptr float float float) d3dx9_36.D3DXMatrixTranslation +@ stdcall D3DXMatrixTranspose(ptr ptr) d3dx9_36.D3DXMatrixTranspose +@ stdcall D3DXOptimizeFaces(ptr long long long ptr) d3dx9_36.D3DXOptimizeFaces +@ stdcall D3DXOptimizeVertices(ptr long long long ptr) d3dx9_36.D3DXOptimizeVertices +@ stdcall D3DXPlaneFromPointNormal(ptr ptr ptr) d3dx9_36.D3DXPlaneFromPointNormal +@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr) d3dx9_36.D3DXPlaneFromPoints +@ stdcall D3DXPlaneIntersectLine(ptr ptr ptr ptr) d3dx9_36.D3DXPlaneIntersectLine +@ stdcall D3DXPlaneNormalize(ptr ptr) d3dx9_36.D3DXPlaneNormalize +@ stdcall D3DXPlaneTransform(ptr ptr ptr) d3dx9_36.D3DXPlaneTransform +@ stdcall D3DXPlaneTransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXPlaneTransformArray +@ stdcall D3DXPreprocessShader(ptr long ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShader +@ stdcall D3DXPreprocessShaderFromFileA(str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileA +@ stdcall D3DXPreprocessShaderFromFileW(wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromFileW +@ stdcall D3DXPreprocessShaderFromResourceA(long str ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceA +@ stdcall D3DXPreprocessShaderFromResourceW(long wstr ptr ptr ptr ptr) d3dx9_36.D3DXPreprocessShaderFromResourceW +@ stdcall D3DXQuaternionBaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXQuaternionBaryCentric +@ stdcall D3DXQuaternionExp(ptr ptr) d3dx9_36.D3DXQuaternionExp +@ stdcall D3DXQuaternionInverse(ptr ptr) d3dx9_36.D3DXQuaternionInverse +@ stdcall D3DXQuaternionLn(ptr ptr) d3dx9_36.D3DXQuaternionLn +@ stdcall D3DXQuaternionMultiply(ptr ptr ptr) d3dx9_36.D3DXQuaternionMultiply +@ stdcall D3DXQuaternionNormalize(ptr ptr) d3dx9_36.D3DXQuaternionNormalize +@ stdcall D3DXQuaternionRotationAxis(ptr ptr float) d3dx9_36.D3DXQuaternionRotationAxis +@ stdcall D3DXQuaternionRotationMatrix(ptr ptr) d3dx9_36.D3DXQuaternionRotationMatrix +@ stdcall D3DXQuaternionRotationYawPitchRoll(ptr float float float) d3dx9_36.D3DXQuaternionRotationYawPitchRoll +@ stdcall D3DXQuaternionSlerp(ptr ptr ptr float) d3dx9_36.D3DXQuaternionSlerp +@ stdcall D3DXQuaternionSquad(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXQuaternionSquad +@ stdcall D3DXQuaternionSquadSetup(ptr ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXQuaternionSquadSetup +@ stdcall D3DXQuaternionToAxisAngle(ptr ptr ptr) d3dx9_36.D3DXQuaternionToAxisAngle +@ stdcall D3DXRectPatchSize(ptr ptr ptr) d3dx9_36.D3DXRectPatchSize +@ stdcall D3DXSaveMeshHierarchyToFileA(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveMeshHierarchyToFileA +@ stdcall D3DXSaveMeshHierarchyToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveMeshHierarchyToFileW +@ stdcall D3DXSaveMeshToXA(ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXSaveMeshToXA +@ stdcall D3DXSaveMeshToXW(ptr ptr ptr ptr ptr long long) d3dx9_36.D3DXSaveMeshToXW +@ stdcall D3DXSavePRTBufferToFileA(ptr ptr) d3dx9_36.D3DXSavePRTBufferToFileA +@ stdcall D3DXSavePRTBufferToFileW(ptr ptr) d3dx9_36.D3DXSavePRTBufferToFileW +@ stdcall D3DXSavePRTCompBufferToFileA(ptr ptr) d3dx9_36.D3DXSavePRTCompBufferToFileA +@ stdcall D3DXSavePRTCompBufferToFileW(ptr ptr) d3dx9_36.D3DXSavePRTCompBufferToFileW +@ stdcall D3DXSaveSurfaceToFileA(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveSurfaceToFileA +@ stdcall D3DXSaveSurfaceToFileInMemory(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveSurfaceToFileInMemory +@ stdcall D3DXSaveSurfaceToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveSurfaceToFileW +@ stdcall D3DXSaveTextureToFileA(ptr long ptr ptr) d3dx9_36.D3DXSaveTextureToFileA +@ stdcall D3DXSaveTextureToFileInMemory(ptr long ptr ptr) d3dx9_36.D3DXSaveTextureToFileInMemory +@ stdcall D3DXSaveTextureToFileW(ptr long ptr ptr) d3dx9_36.D3DXSaveTextureToFileW +@ stdcall D3DXSaveVolumeToFileA(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileA +@ stdcall D3DXSaveVolumeToFileInMemory(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileInMemory +@ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW +@ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd +@ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot +@ stdcall D3DXSHEvalConeLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight +@ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection +@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight +@ stdcall D3DXSHEvalHemisphereLight(long ptr int128 int128 ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight +@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight +@ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2 +@ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3 +@ stdcall D3DXSHMultiply4(ptr ptr ptr) d3dx9_36.D3DXSHMultiply4 +@ stdcall D3DXSHMultiply5(ptr ptr ptr) d3dx9_36.D3DXSHMultiply5 +@ stdcall D3DXSHMultiply6(ptr ptr ptr) d3dx9_36.D3DXSHMultiply6 +@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr) d3dx9_36.D3DXSHProjectCubeMap +@ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC +@ stdcall D3DXSHPRTCompSuperCluster(ptr ptr long long ptr ptr) d3dx9_36.D3DXSHPRTCompSuperCluster +@ stdcall D3DXSHRotate(ptr long ptr ptr) d3dx9_36.D3DXSHRotate +@ stdcall D3DXSHRotateZ(ptr long float ptr) d3dx9_36.D3DXSHRotateZ +@ stdcall D3DXSHScale(ptr long ptr float) d3dx9_36.D3DXSHScale +@ stdcall D3DXSimplifyMesh(ptr ptr ptr ptr long long ptr) d3dx9_36.D3DXSimplifyMesh +@ stdcall D3DXSphereBoundProbe(ptr float ptr ptr) d3dx9_36.D3DXSphereBoundProbe +@ stdcall D3DXSplitMesh(ptr ptr long long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSplitMesh +@ stdcall D3DXTessellateNPatches(ptr ptr long long ptr ptr) d3dx9_36.D3DXTessellateNPatches +@ stdcall D3DXTessellateRectPatch(ptr ptr ptr ptr ptr) d3dx9_36.D3DXTessellateRectPatch +@ stdcall D3DXTessellateTriPatch(ptr ptr ptr ptr ptr) d3dx9_36.D3DXTessellateTriPatch +@ stdcall D3DXTriPatchSize(ptr ptr ptr) d3dx9_36.D3DXTriPatchSize +@ stdcall D3DXUVAtlasCreate(ptr long long long long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXUVAtlasCreate +@ stdcall D3DXUVAtlasPack(ptr long long long long ptr ptr long ptr long ptr) d3dx9_36.D3DXUVAtlasPack +@ stdcall D3DXUVAtlasPartition(ptr long long long ptr ptr ptr ptr long ptr long ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXUVAtlasPartition +@ stdcall D3DXValidMesh(ptr ptr ptr) d3dx9_36.D3DXValidMesh +@ stdcall D3DXValidPatchMesh(ptr ptr ptr ptr) d3dx9_36.D3DXValidPatchMesh +@ stdcall D3DXVec2BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec2BaryCentric +@ stdcall D3DXVec2CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2CatmullRom +@ stdcall D3DXVec2Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec2Hermite +@ stdcall D3DXVec2Normalize(ptr ptr) d3dx9_36.D3DXVec2Normalize +@ stdcall D3DXVec2Transform(ptr ptr ptr) d3dx9_36.D3DXVec2Transform +@ stdcall D3DXVec2TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformArray +@ stdcall D3DXVec2TransformCoord(ptr ptr ptr) d3dx9_36.D3DXVec2TransformCoord +@ stdcall D3DXVec2TransformCoordArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformCoordArray +@ stdcall D3DXVec2TransformNormal(ptr ptr ptr) d3dx9_36.D3DXVec2TransformNormal +@ stdcall D3DXVec2TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec2TransformNormalArray +@ stdcall D3DXVec3BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec3BaryCentric +@ stdcall D3DXVec3CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3CatmullRom +@ stdcall D3DXVec3Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec3Hermite +@ stdcall D3DXVec3Normalize(ptr ptr) d3dx9_36.D3DXVec3Normalize +@ stdcall D3DXVec3Project(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Project +@ stdcall D3DXVec3ProjectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3ProjectArray +@ stdcall D3DXVec3Transform(ptr ptr ptr) d3dx9_36.D3DXVec3Transform +@ stdcall D3DXVec3TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformArray +@ stdcall D3DXVec3TransformCoord(ptr ptr ptr) d3dx9_36.D3DXVec3TransformCoord +@ stdcall D3DXVec3TransformCoordArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformCoordArray +@ stdcall D3DXVec3TransformNormal(ptr ptr ptr) d3dx9_36.D3DXVec3TransformNormal +@ stdcall D3DXVec3TransformNormalArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec3TransformNormalArray +@ stdcall D3DXVec3Unproject(ptr ptr ptr ptr ptr ptr) d3dx9_36.D3DXVec3Unproject +@ stdcall D3DXVec3UnprojectArray(ptr long ptr long ptr ptr ptr ptr long) d3dx9_36.D3DXVec3UnprojectArray +@ stdcall D3DXVec4BaryCentric(ptr ptr ptr ptr float float) d3dx9_36.D3DXVec4BaryCentric +@ stdcall D3DXVec4CatmullRom(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4CatmullRom +@ stdcall D3DXVec4Cross(ptr ptr ptr ptr) d3dx9_36.D3DXVec4Cross +@ stdcall D3DXVec4Hermite(ptr ptr ptr ptr ptr float) d3dx9_36.D3DXVec4Hermite +@ stdcall D3DXVec4Normalize(ptr ptr) d3dx9_36.D3DXVec4Normalize +@ stdcall D3DXVec4Transform(ptr ptr ptr) d3dx9_36.D3DXVec4Transform +@ stdcall D3DXVec4TransformArray(ptr long ptr long ptr long) d3dx9_36.D3DXVec4TransformArray +@ stdcall D3DXWeldVertices(ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXWeldVertices diff --git a/dll/directx/wine/d3dx9_43/d3dx9_43_main.c b/dll/directx/wine/d3dx9_43/d3dx9_43_main.c new file mode 100644 index 00000000000..b3d74cbf56d --- /dev/null +++ b/dll/directx/wine/d3dx9_43/d3dx9_43_main.c @@ -0,0 +1,61 @@ +/* + * Direct3D X 9 main file + * + * Copyright (C) 2007 David Adam + * Copyright (C) 2009 Rico Schأ¼ller + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include "config.h" +#include "wine/port.h" + +#include + +#include "windef.h" +#include "winbase.h" +#include "wingdi.h" +#include "winuser.h" + +#include "d3dx9.h" + +/*********************************************************************** + * DllMain. + */ +BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) +{ + switch(reason) + { + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(inst); + break; + } + return TRUE; +} + +/*********************************************************************** + * D3DXCheckVersion + * Checks whether we are compiling against the correct d3d and d3dx library. + */ +BOOL WINAPI D3DXCheckVersion(UINT d3dsdkvers, UINT d3dxsdkvers) +{ + if(d3dsdkvers==D3D_SDK_VERSION && d3dxsdkvers==43) + return TRUE; + else + return FALSE; +} diff --git a/dll/directx/wine/d3dx9_43/version.rc b/dll/directx/wine/d3dx9_43/version.rc new file mode 100644 index 00000000000..90a4c2b62d0 --- /dev/null +++ b/dll/directx/wine/d3dx9_43/version.rc @@ -0,0 +1,27 @@ +/* + * Copyright 2008 Louis Lenders + * Copyright 2009 Rico Schأ¼ller + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define WINE_FILEDESCRIPTION_STR "Wine D3DX9" +#define WINE_FILENAME_STR "d3dx9.dll" +#define WINE_FILEVERSION 9,29,952,3111 +#define WINE_FILEVERSION_STR "9.29.952.3111" +#define WINE_PRODUCTVERSION 9,29,952,3111 +#define WINE_PRODUCTVERSION_STR "9.29.952.3111" + +#include "wine/wine_common_ver.rc" diff --git a/dll/directx/wine/d3dxof/CMakeLists.txt b/dll/directx/wine/d3dxof/CMakeLists.txt new file mode 100644 index 00000000000..0cf261b1397 --- /dev/null +++ b/dll/directx/wine/d3dxof/CMakeLists.txt @@ -0,0 +1,18 @@ + +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) + +spec2def(d3dxof.dll d3dxof.spec ADD_IMPORTLIB) + +list(APPEND SOURCE + d3dxof.c + main.c + mszip.c + parsing.c + ${CMAKE_CURRENT_BINARY_DIR}/d3dxof.def) + +add_library(d3dxof SHARED ${SOURCE} version.rc) +set_module_type(d3dxof win32dll) +target_link_libraries(d3dxof dxguid uuid wine) +add_importlibs(d3dxof msvcrt kernel32 ntdll) +add_cd_file(TARGET d3dxof DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dxof/d3dxof.c b/dll/directx/wine/d3dxof/d3dxof.c new file mode 100644 index 00000000000..f72617068f4 --- /dev/null +++ b/dll/directx/wine/d3dxof/d3dxof.c @@ -0,0 +1,1222 @@ +/* + * Implementation of DirectX File Interfaces + * + * Copyright 2004, 2008, 2010 Christian Costa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" +#include "wine/debug.h" + +#define COBJMACROS + +#include "winbase.h" +#include "wingdi.h" + +#include "d3dxof_private.h" +#include "dxfile.h" + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(d3dxof); +WINE_DECLARE_DEBUG_CHANNEL(d3dxof_dump); + +static const struct IDirectXFileVtbl IDirectXFile_Vtbl; +static const struct IDirectXFileBinaryVtbl IDirectXFileBinary_Vtbl; +static const struct IDirectXFileDataVtbl IDirectXFileData_Vtbl; +static const struct IDirectXFileDataReferenceVtbl IDirectXFileDataReference_Vtbl; +static const struct IDirectXFileEnumObjectVtbl IDirectXFileEnumObject_Vtbl; +static const struct IDirectXFileObjectVtbl IDirectXFileObject_Vtbl; +static const struct IDirectXFileSaveObjectVtbl IDirectXFileSaveObject_Vtbl; + +static HRESULT IDirectXFileDataReferenceImpl_Create(IDirectXFileDataReferenceImpl** ppObj); +static HRESULT IDirectXFileEnumObjectImpl_Create(IDirectXFileEnumObjectImpl** ppObj); +static HRESULT IDirectXFileSaveObjectImpl_Create(IDirectXFileSaveObjectImpl** ppObj); + +#define TOKEN_DWORD 41 +#define TOKEN_FLOAT 42 + +HRESULT IDirectXFileImpl_Create(IUnknown* pUnkOuter, LPVOID* ppObj) +{ + IDirectXFileImpl* object; + + TRACE("(%p,%p)\n", pUnkOuter, ppObj); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileImpl)); + if (!object) + { + ERR("Out of memory\n"); + return DXFILEERR_BADALLOC; + } + + object->IDirectXFile_iface.lpVtbl = &IDirectXFile_Vtbl; + object->ref = 1; + + /* Reserve first template to handle the case sensitive legacy type indexColor */ + object->nb_xtemplates = 1; + strcpy(object->xtemplates[0].name, "indexColor"); + object->xtemplates[0].nb_members = 2; + object->xtemplates[0].members[0].type = TOKEN_DWORD; + object->xtemplates[0].members[0].nb_dims = 0; + object->xtemplates[0].members[1].type = TOKEN_FLOAT; + object->xtemplates[0].members[1].nb_dims = 1; + object->xtemplates[0].members[1].dim_fixed[0] = TRUE; + object->xtemplates[0].members[1].dim_value[0] = 4; + + *ppObj = &object->IDirectXFile_iface; + + return S_OK; +} + +static inline IDirectXFileImpl *impl_from_IDirectXFile(IDirectXFile *iface) +{ + return CONTAINING_RECORD(iface, IDirectXFileImpl, IDirectXFile_iface); +} + +/*** IUnknown methods ***/ +static HRESULT WINAPI IDirectXFileImpl_QueryInterface(IDirectXFile* iface, REFIID riid, void** ppvObject) +{ + IDirectXFileImpl *This = impl_from_IDirectXFile(iface); + + TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject); + + if (IsEqualGUID(riid, &IID_IUnknown) + || IsEqualGUID(riid, &IID_IDirectXFile)) + { + IUnknown_AddRef(iface); + *ppvObject = &This->IDirectXFile_iface; + return S_OK; + } + + ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject); + return E_NOINTERFACE; +} + +static ULONG WINAPI IDirectXFileImpl_AddRef(IDirectXFile* iface) +{ + IDirectXFileImpl *This = impl_from_IDirectXFile(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref); + + return ref; +} + +static ULONG WINAPI IDirectXFileImpl_Release(IDirectXFile* iface) +{ + IDirectXFileImpl *This = impl_from_IDirectXFile(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +/*** IDirectXFile methods ***/ +static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPVOID pvSource, DXFILELOADOPTIONS dwLoadOptions, LPDIRECTXFILEENUMOBJECT* ppEnumObj) +{ + IDirectXFileImpl *This = impl_from_IDirectXFile(iface); + IDirectXFileEnumObjectImpl* object; + HRESULT hr; + LPBYTE file_buffer; + DWORD file_size; + + TRACE("(%p/%p)->(%p,%x,%p)\n", This, iface, pvSource, dwLoadOptions, ppEnumObj); + + if (!ppEnumObj) + return DXFILEERR_BADVALUE; + + /* Only lowest 4 bits are relevant in DXFILELOADOPTIONS */ + dwLoadOptions &= 0xF; + + hr = IDirectXFileEnumObjectImpl_Create(&object); + if (FAILED(hr)) + return hr; + + if (dwLoadOptions == DXFILELOAD_FROMFILE) + { + HANDLE hFile, file_mapping; + + TRACE("Open source file '%s'\n", (char*)pvSource); + + hFile = CreateFileA(pvSource, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); + if (hFile == INVALID_HANDLE_VALUE) + { + TRACE("File '%s' not found\n", (char*)pvSource); + return DXFILEERR_FILENOTFOUND; + } + + file_size = GetFileSize(hFile, NULL); + + file_mapping = CreateFileMappingA(hFile, NULL, PAGE_READONLY, 0, 0, NULL); + CloseHandle(hFile); + if (!file_mapping) + { + hr = DXFILEERR_BADFILETYPE; + goto error; + } + + object->mapped_memory = MapViewOfFile(file_mapping, FILE_MAP_READ, 0, 0, 0); + CloseHandle(file_mapping); + if (!object->mapped_memory) + { + hr = DXFILEERR_BADFILETYPE; + goto error; + } + file_buffer = object->mapped_memory; + } + else if (dwLoadOptions == DXFILELOAD_FROMRESOURCE) + { + HRSRC resource_info; + HGLOBAL resource_data; + LPDXFILELOADRESOURCE lpdxflr = pvSource; + + TRACE("Source in resource (module = %p, name = %s, type = %s\n", lpdxflr->hModule, debugstr_a(lpdxflr->lpName), debugstr_a(lpdxflr->lpType)); + + resource_info = FindResourceA(lpdxflr->hModule, lpdxflr->lpName, lpdxflr->lpType); + if (!resource_info) + { + hr = DXFILEERR_RESOURCENOTFOUND; + goto error; + } + + file_size = SizeofResource(lpdxflr->hModule, resource_info); + + resource_data = LoadResource(lpdxflr->hModule, resource_info); + if (!resource_data) + { + hr = DXFILEERR_BADRESOURCE; + goto error; + } + + file_buffer = LockResource(resource_data); + if (!file_buffer) + { + hr = DXFILEERR_BADRESOURCE; + goto error; + } + } + else if (dwLoadOptions == DXFILELOAD_FROMMEMORY) + { + LPDXFILELOADMEMORY lpdxflm = pvSource; + + TRACE("Source in memory at %p with size %d\n", lpdxflm->lpMemory, lpdxflm->dSize); + + file_buffer = lpdxflm->lpMemory; + file_size = lpdxflm->dSize; + } + else + { + FIXME("Source type %d is not handled yet\n", dwLoadOptions); + hr = DXFILEERR_NOTDONEYET; + goto error; + } + + TRACE("File size is %d bytes\n", file_size); + + if (TRACE_ON(d3dxof_dump)) + { + static USHORT num; + char tmp[12]; + HANDLE file; + sprintf(tmp, "file%05u.x", num++); + + file = CreateFileA(tmp, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, 0, NULL); + if (file != INVALID_HANDLE_VALUE) + { + WriteFile(file, file_buffer, file_size, NULL, NULL); + CloseHandle(file); + } + } + + object->pDirectXFile = This; + + object->buf.pdxf = This; + object->buf.token_present = FALSE; + object->buf.buffer = file_buffer; + object->buf.rem_bytes = file_size; + hr = parse_header(&object->buf, &object->decomp_buffer); + if (FAILED(hr)) + goto error; + + /* Check if there are templates defined before the object */ + if (!parse_templates(&object->buf, TRUE)) + { + hr = DXFILEERR_PARSEERROR; + goto error; + } + + if (TRACE_ON(d3dxof)) + { + ULONG i; + TRACE("Registered templates (%d):\n", This->nb_xtemplates); + for (i = 1; i < This->nb_xtemplates; i++) + DPRINTF("%s - %s\n", This->xtemplates[i].name, debugstr_guid(&This->xtemplates[i].class_id)); + } + + *ppEnumObj = &object->IDirectXFileEnumObject_iface; + + return DXFILE_OK; + +error: + IDirectXFileEnumObject_Release(&object->IDirectXFileEnumObject_iface); + *ppEnumObj = NULL; + + return hr; +} + +static HRESULT WINAPI IDirectXFileImpl_CreateSaveObject(IDirectXFile* iface, LPCSTR szFileName, DXFILEFORMAT dwFileFormat, LPDIRECTXFILESAVEOBJECT* ppSaveObj) +{ + IDirectXFileImpl *This = impl_from_IDirectXFile(iface); + IDirectXFileSaveObjectImpl *object; + HRESULT hr; + + FIXME("(%p/%p)->(%s,%x,%p) partial stub!\n", This, iface, szFileName, dwFileFormat, ppSaveObj); + + if (!szFileName || !ppSaveObj) + return E_POINTER; + + hr = IDirectXFileSaveObjectImpl_Create(&object); + if (SUCCEEDED(hr)) + *ppSaveObj = &object->IDirectXFileSaveObject_iface; + return hr; +} + +static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile* iface, LPVOID pvData, DWORD cbSize) +{ + IDirectXFileImpl *This = impl_from_IDirectXFile(iface); + parse_buffer buf; + HRESULT hr; + LPBYTE decomp_buffer = NULL; + + ZeroMemory(&buf, sizeof(buf)); + buf.buffer = pvData; + buf.rem_bytes = cbSize; + buf.pdxf = This; + + TRACE("(%p/%p)->(%p,%d)\n", This, iface, pvData, cbSize); + + if (!pvData) + return DXFILEERR_BADVALUE; + + if (TRACE_ON(d3dxof_dump)) + { + static USHORT num; + char tmp[16]; + HANDLE file; + sprintf(tmp, "template%05u.x", num++); + + file = CreateFileA(tmp, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, 0, NULL); + if (file != INVALID_HANDLE_VALUE) + { + WriteFile(file, pvData, cbSize, NULL, NULL); + CloseHandle(file); + } + } + + hr = parse_header(&buf, &decomp_buffer); + if (FAILED(hr)) + goto cleanup; + + if (!parse_templates(&buf, FALSE)) + { + hr = DXFILEERR_PARSEERROR; + goto cleanup; + } + + if (TRACE_ON(d3dxof)) + { + ULONG i; + TRACE("Registered templates (%d):\n", This->nb_xtemplates); + for (i = 1; i < This->nb_xtemplates; i++) + DPRINTF("%s - %s\n", This->xtemplates[i].name, debugstr_guid(&This->xtemplates[i].class_id)); + } + + hr = DXFILE_OK; +cleanup: + HeapFree(GetProcessHeap(), 0, decomp_buffer); + return hr; +} + +static const IDirectXFileVtbl IDirectXFile_Vtbl = +{ + IDirectXFileImpl_QueryInterface, + IDirectXFileImpl_AddRef, + IDirectXFileImpl_Release, + IDirectXFileImpl_CreateEnumObject, + IDirectXFileImpl_CreateSaveObject, + IDirectXFileImpl_RegisterTemplates +}; + +static HRESULT IDirectXFileBinaryImpl_Create(IDirectXFileBinaryImpl** ppObj) +{ + IDirectXFileBinaryImpl* object; + + TRACE("(%p)\n", ppObj); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileBinaryImpl)); + if (!object) + { + ERR("Out of memory\n"); + return DXFILEERR_BADALLOC; + } + + object->IDirectXFileBinary_iface.lpVtbl = &IDirectXFileBinary_Vtbl; + object->ref = 1; + + *ppObj = object; + + return DXFILE_OK; +} + +static inline IDirectXFileBinaryImpl *impl_from_IDirectXFileBinary(IDirectXFileBinary *iface) +{ + return CONTAINING_RECORD(iface, IDirectXFileBinaryImpl, IDirectXFileBinary_iface); +} + +/*** IUnknown methods ***/ +static HRESULT WINAPI IDirectXFileBinaryImpl_QueryInterface(IDirectXFileBinary* iface, REFIID riid, void** ppvObject) +{ + IDirectXFileBinaryImpl *This = impl_from_IDirectXFileBinary(iface); + + TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject); + + if (IsEqualGUID(riid, &IID_IUnknown) + || IsEqualGUID(riid, &IID_IDirectXFileObject) + || IsEqualGUID(riid, &IID_IDirectXFileBinary)) + { + IUnknown_AddRef(iface); + *ppvObject = &This->IDirectXFileBinary_iface; + return S_OK; + } + + /* Do not print an error for interfaces that can be queried to retrieve the type of the object */ + if (!IsEqualGUID(riid, &IID_IDirectXFileData) + && !IsEqualGUID(riid, &IID_IDirectXFileDataReference)) + ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject); + + return E_NOINTERFACE; +} + +static ULONG WINAPI IDirectXFileBinaryImpl_AddRef(IDirectXFileBinary* iface) +{ + IDirectXFileBinaryImpl *This = impl_from_IDirectXFileBinary(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref); + + return ref; +} + +static ULONG WINAPI IDirectXFileBinaryImpl_Release(IDirectXFileBinary* iface) +{ + IDirectXFileBinaryImpl *This = impl_from_IDirectXFileBinary(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +/*** IDirectXFileObject methods ***/ +static HRESULT WINAPI IDirectXFileBinaryImpl_GetName(IDirectXFileBinary* iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen) + +{ + IDirectXFileBinaryImpl *This = impl_from_IDirectXFileBinary(iface); + + FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, pstrNameBuf, pdwBufLen); + + return DXFILEERR_BADVALUE; +} + +static HRESULT WINAPI IDirectXFileBinaryImpl_GetId(IDirectXFileBinary* iface, LPGUID pGuid) +{ + IDirectXFileBinaryImpl *This = impl_from_IDirectXFileBinary(iface); + + FIXME("(%p/%p)->(%p) stub!\n", This, iface, pGuid); + + return DXFILEERR_BADVALUE; +} + +/*** IDirectXFileBinary methods ***/ +static HRESULT WINAPI IDirectXFileBinaryImpl_GetSize(IDirectXFileBinary* iface, DWORD* pcbSize) +{ + IDirectXFileBinaryImpl *This = impl_from_IDirectXFileBinary(iface); + + FIXME("(%p/%p)->(%p) stub!\n", This, iface, pcbSize); + + return DXFILEERR_BADVALUE; +} + +static HRESULT WINAPI IDirectXFileBinaryImpl_GetMimeType(IDirectXFileBinary* iface, LPCSTR* pszMimeType) +{ + IDirectXFileBinaryImpl *This = impl_from_IDirectXFileBinary(iface); + + FIXME("(%p/%p)->(%p) stub!\n", This, iface, pszMimeType); + + return DXFILEERR_BADVALUE; +} + +static HRESULT WINAPI IDirectXFileBinaryImpl_Read(IDirectXFileBinary* iface, LPVOID pvData, DWORD cbSize, LPDWORD pcbRead) +{ + IDirectXFileBinaryImpl *This = impl_from_IDirectXFileBinary(iface); + + FIXME("(%p/%p)->(%p, %d, %p) stub!\n", This, iface, pvData, cbSize, pcbRead); + + return DXFILEERR_BADVALUE; +} + +static const IDirectXFileBinaryVtbl IDirectXFileBinary_Vtbl = +{ + IDirectXFileBinaryImpl_QueryInterface, + IDirectXFileBinaryImpl_AddRef, + IDirectXFileBinaryImpl_Release, + IDirectXFileBinaryImpl_GetName, + IDirectXFileBinaryImpl_GetId, + IDirectXFileBinaryImpl_GetSize, + IDirectXFileBinaryImpl_GetMimeType, + IDirectXFileBinaryImpl_Read +}; + +static HRESULT IDirectXFileDataImpl_Create(IDirectXFileDataImpl** ppObj) +{ + IDirectXFileDataImpl* object; + + TRACE("(%p)\n", ppObj); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileDataImpl)); + if (!object) + { + ERR("Out of memory\n"); + return DXFILEERR_BADALLOC; + } + + object->IDirectXFileData_iface.lpVtbl = &IDirectXFileData_Vtbl; + object->ref = 1; + + *ppObj = object; + + return S_OK; +} + +static inline IDirectXFileDataImpl *impl_from_IDirectXFileData(IDirectXFileData *iface) +{ + return CONTAINING_RECORD(iface, IDirectXFileDataImpl, IDirectXFileData_iface); +} + +/*** IUnknown methods ***/ +static HRESULT WINAPI IDirectXFileDataImpl_QueryInterface(IDirectXFileData* iface, REFIID riid, void** ppvObject) +{ + IDirectXFileDataImpl *This = impl_from_IDirectXFileData(iface); + + TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject); + + if (IsEqualGUID(riid, &IID_IUnknown) + || IsEqualGUID(riid, &IID_IDirectXFileObject) + || IsEqualGUID(riid, &IID_IDirectXFileData)) + { + IUnknown_AddRef(iface); + *ppvObject = &This->IDirectXFileData_iface; + return S_OK; + } + + /* Do not print an error for interfaces that can be queried to retrieve the type of the object */ + if (!IsEqualGUID(riid, &IID_IDirectXFileBinary) + && !IsEqualGUID(riid, &IID_IDirectXFileDataReference)) + ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject); + + return E_NOINTERFACE; +} + +static ULONG WINAPI IDirectXFileDataImpl_AddRef(IDirectXFileData* iface) +{ + IDirectXFileDataImpl *This = impl_from_IDirectXFileData(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref); + + return ref; +} + +static ULONG WINAPI IDirectXFileDataImpl_Release(IDirectXFileData* iface) +{ + IDirectXFileDataImpl *This = impl_from_IDirectXFileData(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref); + + if (!ref) + { + if (!This->level && !This->from_ref) + { + HeapFree(GetProcessHeap(), 0, This->pstrings); + if (This->pobj) + { + HeapFree(GetProcessHeap(), 0, This->pobj->pdata); + HeapFree(GetProcessHeap(), 0, This->pobj); + } + } + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + +/*** IDirectXFileObject methods ***/ +static HRESULT WINAPI IDirectXFileDataImpl_GetName(IDirectXFileData* iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen) +{ + IDirectXFileDataImpl *This = impl_from_IDirectXFileData(iface); + DWORD len; + + TRACE("(%p/%p)->(%p,%p)\n", This, iface, pstrNameBuf, pdwBufLen); + + if (!pdwBufLen) + return DXFILEERR_BADVALUE; + + len = strlen(This->pobj->name); + if (len) + len++; + + if (pstrNameBuf) { + if (*pdwBufLen < len) + return DXFILEERR_BADVALUE; + CopyMemory(pstrNameBuf, This->pobj->name, len); + /* Even if we return a size of 0, an empty string with a null byte must be returned */ + if (*pdwBufLen && !len) + pstrNameBuf[0] = 0; + } + *pdwBufLen = len; + + return DXFILE_OK; +} + +static HRESULT WINAPI IDirectXFileDataImpl_GetId(IDirectXFileData* iface, LPGUID pGuid) +{ + IDirectXFileDataImpl *This = impl_from_IDirectXFileData(iface); + + TRACE("(%p/%p)->(%p)\n", This, iface, pGuid); + + if (!pGuid) + return DXFILEERR_BADVALUE; + + memcpy(pGuid, &This->pobj->class_id, 16); + + return DXFILE_OK; +} + +/*** IDirectXFileData methods ***/ +static HRESULT WINAPI IDirectXFileDataImpl_GetData(IDirectXFileData* iface, LPCSTR szMember, DWORD* pcbSize, void** ppvData) +{ + IDirectXFileDataImpl *This = impl_from_IDirectXFileData(iface); + + TRACE("(%p/%p)->(%s,%p,%p)\n", This, iface, debugstr_a(szMember), pcbSize, ppvData); + + if (!pcbSize || !ppvData) + return DXFILEERR_BADVALUE; + + if (szMember) + { + ULONG i; + for (i = 0; i < This->pobj->nb_members; i++) + if (!strcmp(This->pobj->members[i].name, szMember)) + break; + if (i == This->pobj->nb_members) + { + WARN("Unknown member '%s'\n", szMember); + return DXFILEERR_BADDATAREFERENCE; + } + *pcbSize = This->pobj->members[i].size; + *ppvData = This->pobj->root->pdata + This->pobj->members[i].start; + } + else + { + *pcbSize = This->pobj->size; + *ppvData = This->pobj->root->pdata + This->pobj->pos_data; + } + + return DXFILE_OK; +} + +static HRESULT WINAPI IDirectXFileDataImpl_GetType(IDirectXFileData* iface, const GUID** pguid) +{ + IDirectXFileDataImpl *This = impl_from_IDirectXFileData(iface); + static GUID guid; + + TRACE("(%p/%p)->(%p)\n", This, iface, pguid); + + if (!pguid) + return DXFILEERR_BADVALUE; + + memcpy(&guid, &This->pobj->type, 16); + *pguid = &guid; + + return DXFILE_OK; +} + +static HRESULT WINAPI IDirectXFileDataImpl_GetNextObject(IDirectXFileData* iface, LPDIRECTXFILEOBJECT* ppChildObj) +{ + HRESULT hr; + IDirectXFileDataImpl *This = impl_from_IDirectXFileData(iface); + + TRACE("(%p/%p)->(%p)\n", This, iface, ppChildObj); + + if (This->cur_enum_object >= This->pobj->nb_children) + { + *ppChildObj = NULL; + return DXFILEERR_NOMOREOBJECTS; + } + + if (This->from_ref && (This->level >= 1)) + { + /* Only 2 levels can be enumerated if the object is obtained from a reference */ + *ppChildObj = NULL; + return DXFILEERR_NOMOREOBJECTS; + } + + if (This->pobj->children[This->cur_enum_object]->binary) + { + IDirectXFileBinaryImpl *object; + + hr = IDirectXFileBinaryImpl_Create(&object); + if (FAILED(hr)) + return hr; + + *ppChildObj = (LPDIRECTXFILEOBJECT)&object->IDirectXFileBinary_iface; + } + else if (This->pobj->children[This->cur_enum_object]->ptarget) + { + IDirectXFileDataReferenceImpl *object; + + hr = IDirectXFileDataReferenceImpl_Create(&object); + if (FAILED(hr)) + return hr; + + object->ptarget = This->pobj->children[This->cur_enum_object++]->ptarget; + + *ppChildObj = (LPDIRECTXFILEOBJECT)&object->IDirectXFileDataReference_iface; + } + else + { + IDirectXFileDataImpl *object; + + hr = IDirectXFileDataImpl_Create(&object); + if (FAILED(hr)) + return hr; + + object->pobj = This->pobj->children[This->cur_enum_object++]; + object->cur_enum_object = 0; + object->from_ref = This->from_ref; + object->level = This->level + 1; + + *ppChildObj = (LPDIRECTXFILEOBJECT)&object->IDirectXFileData_iface; + } + + return DXFILE_OK; +} + +static HRESULT WINAPI IDirectXFileDataImpl_AddDataObject(IDirectXFileData* iface, LPDIRECTXFILEDATA pDataObj) +{ + IDirectXFileDataImpl *This = impl_from_IDirectXFileData(iface); + + FIXME("(%p/%p)->(%p) stub!\n", This, iface, pDataObj); + + return DXFILEERR_BADVALUE; +} + +static HRESULT WINAPI IDirectXFileDataImpl_AddDataReference(IDirectXFileData* iface, LPCSTR szRef, const GUID* pguidRef) +{ + IDirectXFileDataImpl *This = impl_from_IDirectXFileData(iface); + + FIXME("(%p/%p)->(%s,%p) stub!\n", This, iface, szRef, pguidRef); + + return DXFILEERR_BADVALUE; +} + +static HRESULT WINAPI IDirectXFileDataImpl_AddBinaryObject(IDirectXFileData* iface, LPCSTR szName, const GUID* pguid, LPCSTR szMimeType, LPVOID pvData, DWORD cbSize) +{ + IDirectXFileDataImpl *This = impl_from_IDirectXFileData(iface); + + FIXME("(%p/%p)->(%s,%p,%s,%p,%d) stub!\n", This, iface, szName, pguid, szMimeType, pvData, cbSize); + + return DXFILEERR_BADVALUE; +} + +static const IDirectXFileDataVtbl IDirectXFileData_Vtbl = +{ + IDirectXFileDataImpl_QueryInterface, + IDirectXFileDataImpl_AddRef, + IDirectXFileDataImpl_Release, + IDirectXFileDataImpl_GetName, + IDirectXFileDataImpl_GetId, + IDirectXFileDataImpl_GetData, + IDirectXFileDataImpl_GetType, + IDirectXFileDataImpl_GetNextObject, + IDirectXFileDataImpl_AddDataObject, + IDirectXFileDataImpl_AddDataReference, + IDirectXFileDataImpl_AddBinaryObject +}; + +static HRESULT IDirectXFileDataReferenceImpl_Create(IDirectXFileDataReferenceImpl** ppObj) +{ + IDirectXFileDataReferenceImpl* object; + + TRACE("(%p)\n", ppObj); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileDataReferenceImpl)); + if (!object) + { + ERR("Out of memory\n"); + return DXFILEERR_BADALLOC; + } + + object->IDirectXFileDataReference_iface.lpVtbl = &IDirectXFileDataReference_Vtbl; + object->ref = 1; + + *ppObj = object; + + return S_OK; +} + +static inline IDirectXFileDataReferenceImpl *impl_from_IDirectXFileDataReference(IDirectXFileDataReference *iface) +{ + return CONTAINING_RECORD(iface, IDirectXFileDataReferenceImpl, IDirectXFileDataReference_iface); +} + +/*** IUnknown methods ***/ +static HRESULT WINAPI IDirectXFileDataReferenceImpl_QueryInterface(IDirectXFileDataReference* iface, REFIID riid, void** ppvObject) +{ + IDirectXFileDataReferenceImpl *This = impl_from_IDirectXFileDataReference(iface); + + TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject); + + if (IsEqualGUID(riid, &IID_IUnknown) + || IsEqualGUID(riid, &IID_IDirectXFileObject) + || IsEqualGUID(riid, &IID_IDirectXFileDataReference)) + { + IUnknown_AddRef(iface); + *ppvObject = &This->IDirectXFileDataReference_iface; + return S_OK; + } + + /* Do not print an error for interfaces that can be queried to retrieve the type of the object */ + if (!IsEqualGUID(riid, &IID_IDirectXFileData) + && !IsEqualGUID(riid, &IID_IDirectXFileBinary)) + ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject); + + return E_NOINTERFACE; +} + +static ULONG WINAPI IDirectXFileDataReferenceImpl_AddRef(IDirectXFileDataReference* iface) +{ + IDirectXFileDataReferenceImpl *This = impl_from_IDirectXFileDataReference(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref); + + return ref; +} + +static ULONG WINAPI IDirectXFileDataReferenceImpl_Release(IDirectXFileDataReference* iface) +{ + IDirectXFileDataReferenceImpl *This = impl_from_IDirectXFileDataReference(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +/*** IDirectXFileObject methods ***/ +static HRESULT WINAPI IDirectXFileDataReferenceImpl_GetName(IDirectXFileDataReference* iface, LPSTR pstrNameBuf, LPDWORD pdwBufLen) +{ + IDirectXFileDataReferenceImpl *This = impl_from_IDirectXFileDataReference(iface); + DWORD len; + + TRACE("(%p/%p)->(%p,%p)\n", This, iface, pstrNameBuf, pdwBufLen); + + if (!pdwBufLen) + return DXFILEERR_BADVALUE; + + len = strlen(This->ptarget->name); + if (len) + len++; + + if (pstrNameBuf) { + if (*pdwBufLen < len) + return DXFILEERR_BADVALUE; + CopyMemory(pstrNameBuf, This->ptarget->name, len); + /* Even if we return a size of 0, an empty string with a null byte must be returned */ + if (*pdwBufLen && !len) + pstrNameBuf[0] = 0; + } + *pdwBufLen = len; + + return DXFILE_OK; +} + +static HRESULT WINAPI IDirectXFileDataReferenceImpl_GetId(IDirectXFileDataReference* iface, LPGUID pGuid) +{ + IDirectXFileDataReferenceImpl *This = impl_from_IDirectXFileDataReference(iface); + + TRACE("(%p/%p)->(%p)\n", This, iface, pGuid); + + if (!pGuid) + return DXFILEERR_BADVALUE; + + memcpy(pGuid, &This->ptarget->class_id, 16); + + return DXFILE_OK; +} + +/*** IDirectXFileDataReference ***/ +static HRESULT WINAPI IDirectXFileDataReferenceImpl_Resolve(IDirectXFileDataReference* iface, LPDIRECTXFILEDATA* ppDataObj) +{ + IDirectXFileDataReferenceImpl *This = impl_from_IDirectXFileDataReference(iface); + IDirectXFileDataImpl *object; + HRESULT hr; + + TRACE("(%p/%p)->(%p)\n", This, iface, ppDataObj); + + if (!ppDataObj) + return DXFILEERR_BADVALUE; + + hr = IDirectXFileDataImpl_Create(&object); + if (FAILED(hr)) + return hr; + + object->pobj = This->ptarget; + object->cur_enum_object = 0; + object->level = 0; + object->from_ref = TRUE; + + *ppDataObj = (LPDIRECTXFILEDATA)object; + + return DXFILE_OK; +} + +static const IDirectXFileDataReferenceVtbl IDirectXFileDataReference_Vtbl = +{ + IDirectXFileDataReferenceImpl_QueryInterface, + IDirectXFileDataReferenceImpl_AddRef, + IDirectXFileDataReferenceImpl_Release, + IDirectXFileDataReferenceImpl_GetName, + IDirectXFileDataReferenceImpl_GetId, + IDirectXFileDataReferenceImpl_Resolve +}; + +static HRESULT IDirectXFileEnumObjectImpl_Create(IDirectXFileEnumObjectImpl** ppObj) +{ + IDirectXFileEnumObjectImpl* object; + + TRACE("(%p)\n", ppObj); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileEnumObjectImpl)); + if (!object) + { + ERR("Out of memory\n"); + return DXFILEERR_BADALLOC; + } + + object->IDirectXFileEnumObject_iface.lpVtbl = &IDirectXFileEnumObject_Vtbl; + object->ref = 1; + + *ppObj = object; + + return S_OK; +} + +static inline IDirectXFileEnumObjectImpl *impl_from_IDirectXFileEnumObject(IDirectXFileEnumObject *iface) +{ + return CONTAINING_RECORD(iface, IDirectXFileEnumObjectImpl, IDirectXFileEnumObject_iface); +} + +/*** IUnknown methods ***/ +static HRESULT WINAPI IDirectXFileEnumObjectImpl_QueryInterface(IDirectXFileEnumObject* iface, REFIID riid, void** ppvObject) +{ + IDirectXFileEnumObjectImpl *This = impl_from_IDirectXFileEnumObject(iface); + + TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject); + + if (IsEqualGUID(riid, &IID_IUnknown) + || IsEqualGUID(riid, &IID_IDirectXFileEnumObject)) + { + IUnknown_AddRef(iface); + *ppvObject = &This->IDirectXFileEnumObject_iface; + return S_OK; + } + + ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject); + return E_NOINTERFACE; +} + +static ULONG WINAPI IDirectXFileEnumObjectImpl_AddRef(IDirectXFileEnumObject* iface) +{ + IDirectXFileEnumObjectImpl *This = impl_from_IDirectXFileEnumObject(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref); + + return ref; +} + +static ULONG WINAPI IDirectXFileEnumObjectImpl_Release(IDirectXFileEnumObject* iface) +{ + IDirectXFileEnumObjectImpl *This = impl_from_IDirectXFileEnumObject(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref); + + if (!ref) + { + ULONG i; + for (i = 0; i < This->nb_xobjects; i++) + IDirectXFileData_Release(This->pRefObjects[i]); + if (This->mapped_memory) + UnmapViewOfFile(This->mapped_memory); + HeapFree(GetProcessHeap(), 0, This->decomp_buffer); + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + +/*** IDirectXFileEnumObject methods ***/ +static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileEnumObject* iface, LPDIRECTXFILEDATA* ppDataObj) +{ + IDirectXFileEnumObjectImpl *This = impl_from_IDirectXFileEnumObject(iface); + IDirectXFileDataImpl* object; + HRESULT hr; + + if (!ppDataObj) + return E_POINTER; + + *ppDataObj = NULL; + + TRACE("(%p/%p)->(%p)\n", This, iface, ppDataObj); + + if (This->nb_xobjects >= MAX_OBJECTS) + { + ERR("Too many objects\n"); + return DXFILEERR_NOMOREOBJECTS; + } + + /* Check if there are templates defined before the object */ + if (!parse_templates(&This->buf, TRUE)) + return DXFILEERR_PARSEERROR; + + if (!This->buf.rem_bytes) + return DXFILEERR_NOMOREOBJECTS; + + hr = IDirectXFileDataImpl_Create(&object); + if (FAILED(hr)) + return hr; + + object->pobj = HeapAlloc(GetProcessHeap(), 0, sizeof(xobject)*MAX_SUBOBJECTS); + if (!object->pobj) + { + ERR("Out of memory\n"); + hr = DXFILEERR_BADALLOC; + goto error; + } + + object->pstrings = HeapAlloc(GetProcessHeap(), 0, MAX_STRINGS_BUFFER); + if (!object->pstrings) + { + ERR("Out of memory\n"); + hr = DXFILEERR_BADALLOC; + goto error; + } + + object->cur_enum_object = 0; + object->level = 0; + object->from_ref = FALSE; + + This->buf.pxo_globals = This->xobjects; + This->buf.nb_pxo_globals = This->nb_xobjects; + This->buf.level = 0; + This->buf.pdata = NULL; + This->buf.capacity = 0; + This->buf.cur_pos_data = 0; + This->buf.cur_pstrings = This->buf.pstrings = object->pstrings; + This->buf.pxo = This->xobjects[This->nb_xobjects] = This->buf.pxo_tab = object->pobj; + This->buf.pxo->pdata = NULL; + This->buf.pxo->nb_subobjects = 1; + + if (!parse_object(&This->buf)) + { + WARN("Object is not correct\n"); + hr = DXFILEERR_PARSEERROR; + goto error; + } + + *ppDataObj = (LPDIRECTXFILEDATA)object; + + /* Get a reference to created object */ + This->pRefObjects[This->nb_xobjects] = (LPDIRECTXFILEDATA)object; + IDirectXFileData_AddRef(This->pRefObjects[This->nb_xobjects]); + + This->nb_xobjects++; + + return DXFILE_OK; + +error: + + IDirectXFileData_Release(&object->IDirectXFileData_iface); + + return hr; +} + +static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetDataObjectById(IDirectXFileEnumObject* iface, REFGUID rguid, LPDIRECTXFILEDATA* ppDataObj) +{ + IDirectXFileEnumObjectImpl *This = impl_from_IDirectXFileEnumObject(iface); + + FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, rguid, ppDataObj); + + return DXFILEERR_BADVALUE; +} + +static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetDataObjectByName(IDirectXFileEnumObject* iface, LPCSTR szName, LPDIRECTXFILEDATA* ppDataObj) +{ + IDirectXFileEnumObjectImpl *This = impl_from_IDirectXFileEnumObject(iface); + + FIXME("(%p/%p)->(%s,%p) stub!\n", This, iface, szName, ppDataObj); + + return DXFILEERR_BADVALUE; +} + +static const IDirectXFileEnumObjectVtbl IDirectXFileEnumObject_Vtbl = +{ + IDirectXFileEnumObjectImpl_QueryInterface, + IDirectXFileEnumObjectImpl_AddRef, + IDirectXFileEnumObjectImpl_Release, + IDirectXFileEnumObjectImpl_GetNextDataObject, + IDirectXFileEnumObjectImpl_GetDataObjectById, + IDirectXFileEnumObjectImpl_GetDataObjectByName +}; + +static HRESULT IDirectXFileSaveObjectImpl_Create(IDirectXFileSaveObjectImpl** ppObj) +{ + IDirectXFileSaveObjectImpl* object; + + TRACE("(%p)\n", ppObj); + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileSaveObjectImpl)); + if (!object) + { + ERR("Out of memory\n"); + return DXFILEERR_BADALLOC; + } + + object->IDirectXFileSaveObject_iface.lpVtbl = &IDirectXFileSaveObject_Vtbl; + object->ref = 1; + + *ppObj = object; + + return S_OK; +} + +static inline IDirectXFileSaveObjectImpl *impl_from_IDirectXFileSaveObject(IDirectXFileSaveObject *iface) +{ + return CONTAINING_RECORD(iface, IDirectXFileSaveObjectImpl, IDirectXFileSaveObject_iface); +} + +/*** IUnknown methods ***/ +static HRESULT WINAPI IDirectXFileSaveObjectImpl_QueryInterface(IDirectXFileSaveObject* iface, REFIID riid, void** ppvObject) +{ + IDirectXFileSaveObjectImpl *This = impl_from_IDirectXFileSaveObject(iface); + + TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject); + + if (IsEqualGUID(riid, &IID_IUnknown) + || IsEqualGUID(riid, &IID_IDirectXFileSaveObject)) + { + IUnknown_AddRef(iface); + *ppvObject = &This->IDirectXFileSaveObject_iface; + return S_OK; + } + + ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject); + return E_NOINTERFACE; +} + +static ULONG WINAPI IDirectXFileSaveObjectImpl_AddRef(IDirectXFileSaveObject* iface) +{ + IDirectXFileSaveObjectImpl *This = impl_from_IDirectXFileSaveObject(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref); + + return ref; +} + +static ULONG WINAPI IDirectXFileSaveObjectImpl_Release(IDirectXFileSaveObject* iface) +{ + IDirectXFileSaveObjectImpl *This = impl_from_IDirectXFileSaveObject(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p/%p)->(): new ref %d\n", iface, This, ref); + + if (!ref) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +static HRESULT WINAPI IDirectXFileSaveObjectImpl_SaveTemplates(IDirectXFileSaveObject* iface, DWORD cTemplates, const GUID** ppguidTemplates) +{ + IDirectXFileSaveObjectImpl *This = impl_from_IDirectXFileSaveObject(iface); + + FIXME("(%p/%p)->(%d,%p) stub!\n", This, iface, cTemplates, ppguidTemplates); + + return DXFILE_OK; +} + +static HRESULT WINAPI IDirectXFileSaveObjectImpl_CreateDataObject(IDirectXFileSaveObject* iface, REFGUID rguidTemplate, LPCSTR szName, const GUID* pguid, DWORD cbSize, LPVOID pvData, LPDIRECTXFILEDATA* ppDataObj) +{ + IDirectXFileSaveObjectImpl *This = impl_from_IDirectXFileSaveObject(iface); + + FIXME("(%p/%p)->(%p,%s,%p,%d,%p,%p) stub!\n", This, iface, rguidTemplate, szName, pguid, cbSize, pvData, ppDataObj); + + return DXFILEERR_BADVALUE; +} + +static HRESULT WINAPI IDirectXFileSaveObjectImpl_SaveData(IDirectXFileSaveObject* iface, LPDIRECTXFILEDATA ppDataObj) +{ + IDirectXFileSaveObjectImpl *This = impl_from_IDirectXFileSaveObject(iface); + + FIXME("(%p/%p)->(%p) stub!\n", This, iface, ppDataObj); + + return DXFILEERR_BADVALUE; +} + +static const IDirectXFileSaveObjectVtbl IDirectXFileSaveObject_Vtbl = +{ + IDirectXFileSaveObjectImpl_QueryInterface, + IDirectXFileSaveObjectImpl_AddRef, + IDirectXFileSaveObjectImpl_Release, + IDirectXFileSaveObjectImpl_SaveTemplates, + IDirectXFileSaveObjectImpl_CreateDataObject, + IDirectXFileSaveObjectImpl_SaveData +}; diff --git a/dll/directx/wine/d3dxof/d3dxof.idl b/dll/directx/wine/d3dxof/d3dxof.idl new file mode 100644 index 00000000000..ea72a6e36e0 --- /dev/null +++ b/dll/directx/wine/d3dxof/d3dxof.idl @@ -0,0 +1,26 @@ +/* + * COM Classes for d3dxof + * + * Copyright 2010 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +[ + helpstring("DirectX File"), + threading(both), + uuid(4516ec43-8f20-11d0-9b6d-0000c0781bc3) +] +coclass CDirectXFile { interface IDirectXFile; } diff --git a/dll/directx/wine/d3dxof/d3dxof.spec b/dll/directx/wine/d3dxof/d3dxof.spec new file mode 100644 index 00000000000..2eee2fd9728 --- /dev/null +++ b/dll/directx/wine/d3dxof/d3dxof.spec @@ -0,0 +1,5 @@ +@ stdcall DirectXFileCreate(ptr) +@ stdcall -private DllCanUnloadNow() +@ stdcall -private DllGetClassObject(ptr ptr ptr) +@ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() diff --git a/dll/directx/wine/d3dxof/d3dxof_private.h b/dll/directx/wine/d3dxof/d3dxof_private.h new file mode 100644 index 00000000000..cf33ed21cea --- /dev/null +++ b/dll/directx/wine/d3dxof/d3dxof_private.h @@ -0,0 +1,171 @@ +/* + * DirectX File private interfaces (D3DXOF.DLL) + * + * Copyright 2004, 2008 Christian Costa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __D3DXOF_PRIVATE_INCLUDED__ +#define __D3DXOF_PRIVATE_INCLUDED__ + +#include + +#include "windef.h" +#include "winbase.h" +#include "wtypes.h" +#include "wingdi.h" +#include "winuser.h" +#include "dxfile.h" + +#define MAX_NAME_LEN 40 +#define MAX_ARRAY_DIM 4 +#define MAX_MEMBERS 50 +#define MAX_CHILDREN 200 +#define MAX_TEMPLATES 200 +#define MAX_OBJECTS 500 +#define MAX_SUBOBJECTS 2000 +#define MAX_STRINGS_BUFFER 10000 + +typedef struct { + DWORD type; + LONG idx_template; + char name[MAX_NAME_LEN]; + ULONG nb_dims; + BOOL dim_fixed[MAX_ARRAY_DIM]; /* fixed or variable */ + ULONG dim_value[MAX_ARRAY_DIM]; /* fixed value or member index */ +} member; + +typedef struct { + char name[MAX_NAME_LEN]; + GUID class_id; + BOOL open; + BOOL binary; + ULONG nb_children; + char children[MAX_CHILDREN][MAX_NAME_LEN]; + ULONG nb_members; + member members[MAX_MEMBERS]; +} xtemplate; + +typedef struct { + char* name; + ULONG start; + ULONG size; +} xobject_member; + +struct _xobject { + BOOL binary; + struct _xobject* ptarget; + char name[MAX_NAME_LEN]; + GUID class_id; + GUID type; + LPBYTE pdata; + ULONG pos_data; + DWORD size; + ULONG nb_members; + xobject_member members[MAX_MEMBERS]; + ULONG nb_children; + ULONG nb_subobjects; + struct _xobject * children[MAX_CHILDREN]; + struct _xobject * root; +}; + +typedef struct _xobject xobject; + +typedef struct { + IDirectXFile IDirectXFile_iface; + LONG ref; + ULONG nb_xtemplates; + xtemplate xtemplates[MAX_TEMPLATES]; +} IDirectXFileImpl; + +typedef struct { + IDirectXFileBinary IDirectXFileBinary_iface; + LONG ref; +} IDirectXFileBinaryImpl; + +typedef struct { + IDirectXFileData IDirectXFileData_iface; + LONG ref; + xobject* pobj; + int cur_enum_object; + BOOL from_ref; + ULONG level; + LPBYTE pstrings; +} IDirectXFileDataImpl; + +typedef struct { + IDirectXFileDataReference IDirectXFileDataReference_iface; + LONG ref; + xobject* ptarget; +} IDirectXFileDataReferenceImpl; + +typedef struct { + IDirectXFileObject IDirectXFileObject_iface; + LONG ref; +} IDirectXFileObjectImpl; + +typedef struct { + /* Buffer to parse */ + LPBYTE buffer; + DWORD rem_bytes; + /* Misc info */ + WORD current_token; + BOOL token_present; + BOOL txt; + DWORD list_nb_elements; + BOOL list_type_float; + BOOL list_separator; + ULONG cur_pos_data; + LPBYTE cur_pstrings; + BYTE value[100]; + xobject** pxo_globals; + ULONG nb_pxo_globals; + xobject* pxo_tab; + IDirectXFileImpl* pdxf; + xobject* pxo; + xtemplate* pxt[MAX_SUBOBJECTS]; + ULONG level; + LPBYTE pdata; + ULONG capacity; + LPBYTE pstrings; +} parse_buffer; + +typedef struct { + IDirectXFileEnumObject IDirectXFileEnumObject_iface; + LONG ref; + LPBYTE mapped_memory; + LPBYTE decomp_buffer; + parse_buffer buf; + IDirectXFileImpl* pDirectXFile; + ULONG nb_xobjects; + xobject* xobjects[MAX_OBJECTS]; + IDirectXFileData* pRefObjects[MAX_OBJECTS]; +} IDirectXFileEnumObjectImpl; + +typedef struct { + IDirectXFileSaveObject IDirectXFileSaveObject_iface; + LONG ref; +} IDirectXFileSaveObjectImpl; + +HRESULT IDirectXFileImpl_Create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN; + +HRESULT parse_header(parse_buffer *buf, BYTE **decomp_buffer_ptr) DECLSPEC_HIDDEN; +BOOL parse_object(parse_buffer * buf) DECLSPEC_HIDDEN; +BOOL parse_templates(parse_buffer * buf, BOOL templates_only) DECLSPEC_HIDDEN; + +int mszip_decompress(int inlen, int outlen, char* inbuffer, char* outbuffer) DECLSPEC_HIDDEN; + +#endif /* __D3DXOF_PRIVATE_INCLUDED__ */ diff --git a/dll/directx/wine/d3dxof/main.c b/dll/directx/wine/d3dxof/main.c new file mode 100644 index 00000000000..48ee22bb60f --- /dev/null +++ b/dll/directx/wine/d3dxof/main.c @@ -0,0 +1,245 @@ +/* + * DirectX Files Functions (D3DXOF.DLL) + * + * Copyright 2004 Christian Costa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winreg.h" +#include "winerror.h" + +#include "ole2.h" +#include "rpcproxy.h" +#include "uuids.h" + +#include "d3dxof_private.h" +#include "dxfile.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(d3dxof); + +static HINSTANCE instance; +static LONG dll_ref = 0; + +/* For the moment, do nothing here. */ +BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) +{ + switch(fdwReason) { + case DLL_PROCESS_ATTACH: + instance = hInstDLL; + DisableThreadLibraryCalls(hInstDLL); + break; + } + return TRUE; +} + +/****************************************************************************** + * DirectX File ClassFactory + */ +typedef struct { + IClassFactory IClassFactory_iface; + + LONG ref; + HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj); +} IClassFactoryImpl; + +static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface) +{ + return CONTAINING_RECORD(iface, IClassFactoryImpl, IClassFactory_iface); +} + +struct object_creation_info +{ + const CLSID *clsid; + HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj); +}; + +static const struct object_creation_info object_creation[] = +{ + { &CLSID_CDirectXFile, IDirectXFileImpl_Create }, +}; + +static HRESULT WINAPI XFCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid, LPVOID *ppobj) +{ + IClassFactoryImpl *This = impl_from_IClassFactory(iface); + + if (IsEqualGUID(riid, &IID_IUnknown) + || IsEqualGUID(riid, &IID_IClassFactory)) + { + IClassFactory_AddRef(iface); + *ppobj = &This->IClassFactory_iface; + return S_OK; + } + + WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj); + return E_NOINTERFACE; +} + +static ULONG WINAPI XFCF_AddRef(LPCLASSFACTORY iface) +{ + IClassFactoryImpl *This = impl_from_IClassFactory(iface); + return InterlockedIncrement(&This->ref); +} + +static ULONG WINAPI XFCF_Release(LPCLASSFACTORY iface) +{ + IClassFactoryImpl *This = impl_from_IClassFactory(iface); + + ULONG ref = InterlockedDecrement(&This->ref); + + if (ref == 0) + HeapFree(GetProcessHeap(), 0, This); + + return ref; +} + +static HRESULT WINAPI XFCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) +{ + IClassFactoryImpl *This = impl_from_IClassFactory(iface); + HRESULT hres; + LPUNKNOWN punk; + + TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj); + + *ppobj = NULL; + hres = This->pfnCreateInstance(pOuter, (LPVOID *) &punk); + if (SUCCEEDED(hres)) { + hres = IUnknown_QueryInterface(punk, riid, ppobj); + IUnknown_Release(punk); + } + return hres; +} + +static HRESULT WINAPI XFCF_LockServer(LPCLASSFACTORY iface, BOOL dolock) +{ + IClassFactoryImpl *This = impl_from_IClassFactory(iface); + FIXME("(%p)->(%d),stub!\n",This,dolock); + return S_OK; +} + +static const IClassFactoryVtbl XFCF_Vtbl = +{ + XFCF_QueryInterface, + XFCF_AddRef, + XFCF_Release, + XFCF_CreateInstance, + XFCF_LockServer +}; + +/*********************************************************************** + * DirectXFileCreate (D3DXOF.@) + */ +HRESULT WINAPI DirectXFileCreate(LPDIRECTXFILE* lplpDirectXFile) +{ + HRESULT hr; + + TRACE("(%p)\n", lplpDirectXFile); + + if (!lplpDirectXFile) + return DXFILEERR_BADVALUE; + + hr = IDirectXFileImpl_Create(NULL, (LPVOID)lplpDirectXFile); + + if (FAILED(hr)) + return DXFILEERR_BADALLOC; + + return S_OK; +} + +/******************************************************************************* + * DllGetClassObject [D3DXOF.@] + * Retrieves class object from a DLL object + * + * NOTES + * Docs say returns STDAPI + * + * PARAMS + * rclsid [I] CLSID for the class object + * riid [I] Reference to identifier of interface for class object + * ppv [O] Address of variable to receive interface pointer for riid + * + * RETURNS + * Success: S_OK + * Failure: CLASS_E_CLASSNOTAVAILABLE, E_OUTOFMEMORY, E_INVALIDARG, + * E_UNEXPECTED + */ +HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) +{ + unsigned int i; + IClassFactoryImpl *factory; + + TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + + if ( !IsEqualGUID( &IID_IClassFactory, riid ) + && ! IsEqualGUID( &IID_IUnknown, riid) ) + return E_NOINTERFACE; + + for (i=0; i < sizeof(object_creation)/sizeof(object_creation[0]); i++) + { + if (IsEqualGUID(object_creation[i].clsid, rclsid)) + break; + } + + if (i == sizeof(object_creation)/sizeof(object_creation[0])) + { + FIXME("%s: no class found.\n", debugstr_guid(rclsid)); + return CLASS_E_CLASSNOTAVAILABLE; + } + + factory = HeapAlloc(GetProcessHeap(), 0, sizeof(*factory)); + if (factory == NULL) return E_OUTOFMEMORY; + + factory->IClassFactory_iface.lpVtbl = &XFCF_Vtbl; + factory->ref = 1; + + factory->pfnCreateInstance = object_creation[i].pfnCreateInstance; + + *ppv = &(factory->IClassFactory_iface); + return S_OK; +} + +/*********************************************************************** + * DllCanUnloadNow (D3DXOF.@) + */ +HRESULT WINAPI DllCanUnloadNow(void) +{ + return dll_ref != 0 ? S_FALSE : S_OK; +} + +/*********************************************************************** + * DllRegisterServer (D3DXOF.@) + */ +HRESULT WINAPI DllRegisterServer(void) +{ + return __wine_register_resources( instance ); +} + +/*********************************************************************** + * DllUnregisterServer (D3DXOF.@) + */ +HRESULT WINAPI DllUnregisterServer(void) +{ + return __wine_unregister_resources( instance ); +} diff --git a/dll/directx/wine/d3dxof/mszip.c b/dll/directx/wine/d3dxof/mszip.c new file mode 100644 index 00000000000..179661634f7 --- /dev/null +++ b/dll/directx/wine/d3dxof/mszip.c @@ -0,0 +1,645 @@ +/* + * MSZIP decompression (taken from fdi.c of cabinet dll) + * + * Copyright 2000-2002 Stuart Caie + * Copyright 2002 Patrik Stridvall + * Copyright 2003 Greg Turner + * Copyright 2010 Christian Costa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +#include "windef.h" +#include "winbase.h" + +#include "wine/debug.h" + +#include "mszip.h" + +WINE_DEFAULT_DEBUG_CHANNEL(d3dxof); + +THOSE_ZIP_CONSTS; + +/******************************************************** + * Ziphuft_free (internal) + */ +static void fdi_Ziphuft_free(HFDI hfdi, struct Ziphuft *t) +{ + register struct Ziphuft *p, *q; + + /* Go through linked list, freeing from the allocated (t[-1]) address. */ + p = t; + while (p != NULL) + { + q = (--p)->v.t; + PFDI_FREE(hfdi, p); + p = q; + } +} + +/********************************************************* + * fdi_Ziphuft_build (internal) + */ +static cab_LONG fdi_Ziphuft_build(cab_ULONG *b, cab_ULONG n, cab_ULONG s, const cab_UWORD *d, const cab_UWORD *e, +struct Ziphuft **t, cab_LONG *m, fdi_decomp_state *decomp_state) +{ + cab_ULONG a; /* counter for codes of length k */ + cab_ULONG el; /* length of EOB code (value 256) */ + cab_ULONG f; /* i repeats in table every f entries */ + cab_LONG g; /* maximum code length */ + cab_LONG h; /* table level */ + register cab_ULONG i; /* counter, current code */ + register cab_ULONG j; /* counter */ + register cab_LONG k; /* number of bits in current code */ + cab_LONG *l; /* stack of bits per table */ + register cab_ULONG *p; /* pointer into ZIP(c)[],ZIP(b)[],ZIP(v)[] */ + register struct Ziphuft *q; /* points to current table */ + struct Ziphuft r; /* table entry for structure assignment */ + register cab_LONG w; /* bits before this table == (l * h) */ + cab_ULONG *xp; /* pointer into x */ + cab_LONG y; /* number of dummy codes added */ + cab_ULONG z; /* number of entries in current table */ + + l = ZIP(lx)+1; + + /* Generate counts for each bit length */ + el = n > 256 ? b[256] : ZIPBMAX; /* set length of EOB code, if any */ + + for(i = 0; i < ZIPBMAX+1; ++i) + ZIP(c)[i] = 0; + p = b; i = n; + do + { + ZIP(c)[*p]++; p++; /* assume all entries <= ZIPBMAX */ + } while (--i); + if (ZIP(c)[0] == n) /* null input--all zero length codes */ + { + *t = NULL; + *m = 0; + return 0; + } + + /* Find minimum and maximum length, bound *m by those */ + for (j = 1; j <= ZIPBMAX; j++) + if (ZIP(c)[j]) + break; + k = j; /* minimum code length */ + if ((cab_ULONG)*m < j) + *m = j; + for (i = ZIPBMAX; i; i--) + if (ZIP(c)[i]) + break; + g = i; /* maximum code length */ + if ((cab_ULONG)*m > i) + *m = i; + + /* Adjust last length count to fill out codes, if needed */ + for (y = 1 << j; j < i; j++, y <<= 1) + if ((y -= ZIP(c)[j]) < 0) + return 2; /* bad input: more codes than bits */ + if ((y -= ZIP(c)[i]) < 0) + return 2; + ZIP(c)[i] += y; + + /* Generate starting offsets LONGo the value table for each length */ + ZIP(x)[1] = j = 0; + p = ZIP(c) + 1; xp = ZIP(x) + 2; + while (--i) + { /* note that i == g from above */ + *xp++ = (j += *p++); + } + + /* Make a table of values in order of bit lengths */ + p = b; i = 0; + do{ + if ((j = *p++) != 0) + ZIP(v)[ZIP(x)[j]++] = i; + } while (++i < n); + + + /* Generate the Huffman codes and for each, make the table entries */ + ZIP(x)[0] = i = 0; /* first Huffman code is zero */ + p = ZIP(v); /* grab values in bit order */ + h = -1; /* no tables yet--level -1 */ + w = l[-1] = 0; /* no bits decoded yet */ + ZIP(u)[0] = NULL; /* just to keep compilers happy */ + q = NULL; /* ditto */ + z = 0; /* ditto */ + + /* go through the bit lengths (k already is bits in shortest code) */ + for (; k <= g; k++) + { + a = ZIP(c)[k]; + while (a--) + { + /* here i is the Huffman code of length k bits for value *p */ + /* make tables up to required level */ + while (k > w + l[h]) + { + w += l[h++]; /* add bits already decoded */ + + /* compute minimum size table less than or equal to *m bits */ + if ((z = g - w) > (cab_ULONG)*m) /* upper limit */ + z = *m; + if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */ + { /* too few codes for k-w bit table */ + f -= a + 1; /* deduct codes from patterns left */ + xp = ZIP(c) + k; + while (++j < z) /* try smaller tables up to z bits */ + { + if ((f <<= 1) <= *++xp) + break; /* enough codes to use up j bits */ + f -= *xp; /* else deduct codes from patterns */ + } + } + if ((cab_ULONG)w + j > el && (cab_ULONG)w < el) + j = el - w; /* make EOB code end at table */ + z = 1 << j; /* table entries for j-bit table */ + l[h] = j; /* set table size in stack */ + + /* allocate and link in new table */ + if (!(q = PFDI_ALLOC(CAB(hfdi), (z + 1)*sizeof(struct Ziphuft)))) + { + if(h) + fdi_Ziphuft_free(CAB(hfdi), ZIP(u)[0]); + return 3; /* not enough memory */ + } + *t = q + 1; /* link to list for Ziphuft_free() */ + *(t = &(q->v.t)) = NULL; + ZIP(u)[h] = ++q; /* table starts after link */ + + /* connect to last table, if there is one */ + if (h) + { + ZIP(x)[h] = i; /* save pattern for backing up */ + r.b = (cab_UBYTE)l[h-1]; /* bits to dump before this table */ + r.e = (cab_UBYTE)(16 + j); /* bits in this table */ + r.v.t = q; /* pointer to this table */ + j = (i & ((1 << w) - 1)) >> (w - l[h-1]); + ZIP(u)[h-1][j] = r; /* connect to last table */ + } + } + + /* set up table entry in r */ + r.b = (cab_UBYTE)(k - w); + if (p >= ZIP(v) + n) + r.e = 99; /* out of values--invalid code */ + else if (*p < s) + { + r.e = (cab_UBYTE)(*p < 256 ? 16 : 15); /* 256 is end-of-block code */ + r.v.n = *p++; /* simple code is just the value */ + } + else + { + r.e = (cab_UBYTE)e[*p - s]; /* non-simple--look up in lists */ + r.v.n = d[*p++ - s]; + } + + /* fill code-like entries with r */ + f = 1 << (k - w); + for (j = i >> w; j < z; j += f) + q[j] = r; + + /* backwards increment the k-bit code i */ + for (j = 1 << (k - 1); i & j; j >>= 1) + i ^= j; + i ^= j; + + /* backup over finished tables */ + while ((i & ((1 << w) - 1)) != ZIP(x)[h]) + w -= l[--h]; /* don't need to update q */ + } + } + + /* return actual size of base table */ + *m = l[0]; + + /* Return true (1) if we were given an incomplete table */ + return y != 0 && g != 1; +} + +/********************************************************* + * fdi_Zipinflate_codes (internal) + */ +static cab_LONG fdi_Zipinflate_codes(const struct Ziphuft *tl, const struct Ziphuft *td, + cab_LONG bl, cab_LONG bd, fdi_decomp_state *decomp_state) +{ + register cab_ULONG e; /* table entry flag/number of extra bits */ + cab_ULONG n, d; /* length and index for copy */ + cab_ULONG w; /* current window position */ + const struct Ziphuft *t; /* pointer to table entry */ + cab_ULONG ml, md; /* masks for bl and bd bits */ + register cab_ULONG b; /* bit buffer */ + register cab_ULONG k; /* number of bits in bit buffer */ + + /* make local copies of globals */ + b = ZIP(bb); /* initialize bit buffer */ + k = ZIP(bk); + w = ZIP(window_posn); /* initialize window position */ + + /* inflate the coded data */ + ml = Zipmask[bl]; /* precompute masks for speed */ + md = Zipmask[bd]; + + for(;;) + { + ZIPNEEDBITS((cab_ULONG)bl) + if((e = (t = tl + (b & ml))->e) > 16) + do + { + if (e == 99) + return 1; + ZIPDUMPBITS(t->b) + e -= 16; + ZIPNEEDBITS(e) + } while ((e = (t = t->v.t + (b & Zipmask[e]))->e) > 16); + ZIPDUMPBITS(t->b) + if (e == 16) /* then it's a literal */ + CAB(outbuf)[w++] = (cab_UBYTE)t->v.n; + else /* it's an EOB or a length */ + { + /* exit if end of block */ + if(e == 15) + break; + + /* get length of block to copy */ + ZIPNEEDBITS(e) + n = t->v.n + (b & Zipmask[e]); + ZIPDUMPBITS(e); + + /* decode distance of block to copy */ + ZIPNEEDBITS((cab_ULONG)bd) + if ((e = (t = td + (b & md))->e) > 16) + do { + if (e == 99) + return 1; + ZIPDUMPBITS(t->b) + e -= 16; + ZIPNEEDBITS(e) + } while ((e = (t = t->v.t + (b & Zipmask[e]))->e) > 16); + ZIPDUMPBITS(t->b) + ZIPNEEDBITS(e) + d = w - t->v.n - (b & Zipmask[e]); + ZIPDUMPBITS(e) + do + { + d &= ZIPWSIZE - 1; + e = ZIPWSIZE - max(d, w); + e = min(e, n); + n -= e; + do + { + CAB(outbuf)[w++] = CAB(outbuf)[d++]; + } while (--e); + } while (n); + } + } + + /* restore the globals from the locals */ + ZIP(window_posn) = w; /* restore global window pointer */ + ZIP(bb) = b; /* restore global bit buffer */ + ZIP(bk) = k; + + /* done */ + return 0; +} + +/*********************************************************** + * Zipinflate_stored (internal) + */ +static cab_LONG fdi_Zipinflate_stored(fdi_decomp_state *decomp_state) +/* "decompress" an inflated type 0 (stored) block. */ +{ + cab_ULONG n; /* number of bytes in block */ + cab_ULONG w; /* current window position */ + register cab_ULONG b; /* bit buffer */ + register cab_ULONG k; /* number of bits in bit buffer */ + + /* make local copies of globals */ + b = ZIP(bb); /* initialize bit buffer */ + k = ZIP(bk); + w = ZIP(window_posn); /* initialize window position */ + + /* go to byte boundary */ + n = k & 7; + ZIPDUMPBITS(n); + + /* get the length and its complement */ + ZIPNEEDBITS(16) + n = (b & 0xffff); + ZIPDUMPBITS(16) + ZIPNEEDBITS(16) + if (n != ((~b) & 0xffff)) + return 1; /* error in compressed data */ + ZIPDUMPBITS(16) + + /* read and output the compressed data */ + while(n--) + { + ZIPNEEDBITS(8) + CAB(outbuf)[w++] = (cab_UBYTE)b; + ZIPDUMPBITS(8) + } + + /* restore the globals from the locals */ + ZIP(window_posn) = w; /* restore global window pointer */ + ZIP(bb) = b; /* restore global bit buffer */ + ZIP(bk) = k; + return 0; +} + +/****************************************************** + * fdi_Zipinflate_fixed (internal) + */ +static cab_LONG fdi_Zipinflate_fixed(fdi_decomp_state *decomp_state) +{ + struct Ziphuft *fixed_tl; + struct Ziphuft *fixed_td; + cab_LONG fixed_bl, fixed_bd; + cab_LONG i; /* temporary variable */ + cab_ULONG *l; + + l = ZIP(ll); + + /* literal table */ + for(i = 0; i < 144; i++) + l[i] = 8; + for(; i < 256; i++) + l[i] = 9; + for(; i < 280; i++) + l[i] = 7; + for(; i < 288; i++) /* make a complete, but wrong code set */ + l[i] = 8; + fixed_bl = 7; + if((i = fdi_Ziphuft_build(l, 288, 257, Zipcplens, Zipcplext, &fixed_tl, &fixed_bl, decomp_state))) + return i; + + /* distance table */ + for(i = 0; i < 30; i++) /* make an incomplete code set */ + l[i] = 5; + fixed_bd = 5; + if((i = fdi_Ziphuft_build(l, 30, 0, Zipcpdist, Zipcpdext, &fixed_td, &fixed_bd, decomp_state)) > 1) + { + fdi_Ziphuft_free(CAB(hfdi), fixed_tl); + return i; + } + + /* decompress until an end-of-block code */ + i = fdi_Zipinflate_codes(fixed_tl, fixed_td, fixed_bl, fixed_bd, decomp_state); + + fdi_Ziphuft_free(CAB(hfdi), fixed_td); + fdi_Ziphuft_free(CAB(hfdi), fixed_tl); + return i; +} + +/************************************************************** + * fdi_Zipinflate_dynamic (internal) + */ +static cab_LONG fdi_Zipinflate_dynamic(fdi_decomp_state *decomp_state) + /* decompress an inflated type 2 (dynamic Huffman codes) block. */ +{ + cab_LONG i; /* temporary variables */ + cab_ULONG j; + cab_ULONG *ll; + cab_ULONG l; /* last length */ + cab_ULONG m; /* mask for bit lengths table */ + cab_ULONG n; /* number of lengths to get */ + struct Ziphuft *tl; /* literal/length code table */ + struct Ziphuft *td; /* distance code table */ + cab_LONG bl; /* lookup bits for tl */ + cab_LONG bd; /* lookup bits for td */ + cab_ULONG nb; /* number of bit length codes */ + cab_ULONG nl; /* number of literal/length codes */ + cab_ULONG nd; /* number of distance codes */ + register cab_ULONG b; /* bit buffer */ + register cab_ULONG k; /* number of bits in bit buffer */ + + /* make local bit buffer */ + b = ZIP(bb); + k = ZIP(bk); + ll = ZIP(ll); + + /* read in table lengths */ + ZIPNEEDBITS(5) + nl = 257 + (b & 0x1f); /* number of literal/length codes */ + ZIPDUMPBITS(5) + ZIPNEEDBITS(5) + nd = 1 + (b & 0x1f); /* number of distance codes */ + ZIPDUMPBITS(5) + ZIPNEEDBITS(4) + nb = 4 + (b & 0xf); /* number of bit length codes */ + ZIPDUMPBITS(4) + if(nl > 288 || nd > 32) + return 1; /* bad lengths */ + + /* read in bit-length-code lengths */ + for(j = 0; j < nb; j++) + { + ZIPNEEDBITS(3) + ll[Zipborder[j]] = b & 7; + ZIPDUMPBITS(3) + } + for(; j < 19; j++) + ll[Zipborder[j]] = 0; + + /* build decoding table for trees--single level, 7 bit lookup */ + bl = 7; + if((i = fdi_Ziphuft_build(ll, 19, 19, NULL, NULL, &tl, &bl, decomp_state)) != 0) + { + if(i == 1) + fdi_Ziphuft_free(CAB(hfdi), tl); + return i; /* incomplete code set */ + } + + /* read in literal and distance code lengths */ + n = nl + nd; + m = Zipmask[bl]; + i = l = 0; + while((cab_ULONG)i < n) + { + ZIPNEEDBITS((cab_ULONG)bl) + j = (td = tl + (b & m))->b; + ZIPDUMPBITS(j) + j = td->v.n; + if (j < 16) /* length of code in bits (0..15) */ + ll[i++] = l = j; /* save last length in l */ + else if (j == 16) /* repeat last length 3 to 6 times */ + { + ZIPNEEDBITS(2) + j = 3 + (b & 3); + ZIPDUMPBITS(2) + if((cab_ULONG)i + j > n) + return 1; + while (j--) + ll[i++] = l; + } + else if (j == 17) /* 3 to 10 zero length codes */ + { + ZIPNEEDBITS(3) + j = 3 + (b & 7); + ZIPDUMPBITS(3) + if ((cab_ULONG)i + j > n) + return 1; + while (j--) + ll[i++] = 0; + l = 0; + } + else /* j == 18: 11 to 138 zero length codes */ + { + ZIPNEEDBITS(7) + j = 11 + (b & 0x7f); + ZIPDUMPBITS(7) + if ((cab_ULONG)i + j > n) + return 1; + while (j--) + ll[i++] = 0; + l = 0; + } + } + + /* free decoding table for trees */ + fdi_Ziphuft_free(CAB(hfdi), tl); + + /* restore the global bit buffer */ + ZIP(bb) = b; + ZIP(bk) = k; + + /* build the decoding tables for literal/length and distance codes */ + bl = ZIPLBITS; + if((i = fdi_Ziphuft_build(ll, nl, 257, Zipcplens, Zipcplext, &tl, &bl, decomp_state)) != 0) + { + if(i == 1) + fdi_Ziphuft_free(CAB(hfdi), tl); + return i; /* incomplete code set */ + } + bd = ZIPDBITS; + fdi_Ziphuft_build(ll + nl, nd, 0, Zipcpdist, Zipcpdext, &td, &bd, decomp_state); + + /* decompress until an end-of-block code */ + if(fdi_Zipinflate_codes(tl, td, bl, bd, decomp_state)) + return 1; + + /* free the decoding tables, return */ + fdi_Ziphuft_free(CAB(hfdi), tl); + fdi_Ziphuft_free(CAB(hfdi), td); + return 0; +} + +/***************************************************** + * fdi_Zipinflate_block (internal) + */ +static cab_LONG fdi_Zipinflate_block(cab_LONG *e, fdi_decomp_state *decomp_state) /* e == last block flag */ +{ /* decompress an inflated block */ + cab_ULONG t; /* block type */ + register cab_ULONG b; /* bit buffer */ + register cab_ULONG k; /* number of bits in bit buffer */ + + /* make local bit buffer */ + b = ZIP(bb); + k = ZIP(bk); + + /* read in last block bit */ + ZIPNEEDBITS(1) + *e = (cab_LONG)b & 1; + ZIPDUMPBITS(1) + + /* read in block type */ + ZIPNEEDBITS(2) + t = b & 3; + ZIPDUMPBITS(2) + + /* restore the global bit buffer */ + ZIP(bb) = b; + ZIP(bk) = k; + + /* inflate that block type */ + if(t == 2) + return fdi_Zipinflate_dynamic(decomp_state); + if(t == 0) + return fdi_Zipinflate_stored(decomp_state); + if(t == 1) + return fdi_Zipinflate_fixed(decomp_state); + /* bad block type */ + return 2; +} + +/**************************************************** + * ZIPfdi_decomp(internal) + */ +static int ZIPfdi_decomp(int inlen, int outlen, fdi_decomp_state *decomp_state) +{ + cab_LONG e; /* last block flag */ + + TRACE("(inlen == %d, outlen == %d)\n", inlen, outlen); + + ZIP(inpos) = CAB(inbuf); + ZIP(bb) = ZIP(bk) = ZIP(window_posn) = 0; + + if(outlen > ZIPWSIZE) + return DECR_DATAFORMAT; + + /* CK = Chris Kirmse, official Microsoft purloiner */ + if(ZIP(inpos)[0] != 0x43 || ZIP(inpos)[1] != 0x4B) + return DECR_ILLEGALDATA; + + ZIP(inpos) += 2; + + do { + if(fdi_Zipinflate_block(&e, decomp_state)) + return DECR_ILLEGALDATA; + } while(!e); + + /* return success */ + return DECR_OK; +} + +static void * __cdecl fdi_alloc(ULONG cb) +{ + return HeapAlloc(GetProcessHeap(), 0, cb); +} + +static void __cdecl fdi_free(void *pv) +{ + HeapFree(GetProcessHeap(), 0, pv); +} + +int mszip_decompress(unsigned int inlen, unsigned int outlen, char* inbuffer, char* outbuffer) +{ + int ret; + fdi_decomp_state decomp_state; + FDI_Int fdi; + + TRACE("(%u, %u, %p, %p)\n", inlen, outlen, inbuffer, outbuffer); + + if ((inlen > CAB_INPUTMAX) || (outlen > CAB_BLOCKMAX)) + { + FIXME("Big file not supported yet (inlen = %u, outlen = %u)\n", inlen, outlen); + return DECR_DATAFORMAT; + } + + fdi.pfnalloc = fdi_alloc; + fdi.pfnfree = fdi_free; + decomp_state.hfdi = (void*)&fdi; + + memcpy(decomp_state.inbuf, inbuffer, inlen); + + ret = ZIPfdi_decomp(inlen, outlen, &decomp_state); + + memcpy(outbuffer, decomp_state.outbuf, outlen); + + return ret; +} diff --git a/dll/directx/wine/d3dxof/mszip.h b/dll/directx/wine/d3dxof/mszip.h new file mode 100644 index 00000000000..23ff677caa2 --- /dev/null +++ b/dll/directx/wine/d3dxof/mszip.h @@ -0,0 +1,130 @@ +/* + * MSZIP decompression header (taken from cabinet.h of cabinet dll) + * + * Copyright 2002 Greg Turner + * Copyright 2005 Gerold Jens Wucherpfennig + * Copyright 2010 Christian Costa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "fdi.h" + +typedef unsigned char cab_UBYTE; /* 8 bits */ +typedef UINT16 cab_UWORD; /* 16 bits */ +typedef UINT32 cab_ULONG; /* 32 bits */ +typedef INT32 cab_LONG; /* 32 bits */ + +typedef struct { + unsigned int FDI_Intmagic; + PFNALLOC pfnalloc; + PFNFREE pfnfree; + PFNOPEN pfnopen; + PFNREAD pfnread; + PFNWRITE pfnwrite; + PFNCLOSE pfnclose; + PFNSEEK pfnseek; + PERF perf; +} FDI_Int, *PFDI_Int; + +/* cast an HFDI into a PFDI_Int */ +#define PFDI_INT(hfdi) ((PFDI_Int)(hfdi)) + +#define PFDI_ALLOC(hfdi, size) ((*PFDI_INT(hfdi)->pfnalloc) (size)) +#define PFDI_FREE(hfdi, ptr) ((*PFDI_INT(hfdi)->pfnfree) (ptr)) + +/* MSZIP stuff */ +#define ZIPWSIZE 0x8000 /* window size */ +#define ZIPLBITS 9 /* bits in base literal/length lookup table */ +#define ZIPDBITS 6 /* bits in base distance lookup table */ +#define ZIPBMAX 16 /* maximum bit length of any code */ +#define ZIPN_MAX 288 /* maximum number of codes in any set */ + +struct Ziphuft { + cab_UBYTE e; /* number of extra bits or operation */ + cab_UBYTE b; /* number of bits in this code or subcode */ + union { + cab_UWORD n; /* literal, length base, or distance base */ + struct Ziphuft *t; /* pointer to next level of table */ + } v; +}; + +struct ZIPstate { + cab_ULONG window_posn; /* current offset within the window */ + cab_ULONG bb; /* bit buffer */ + cab_ULONG bk; /* bits in bit buffer */ + cab_ULONG ll[288+32]; /* literal/length and distance code lengths */ + cab_ULONG c[ZIPBMAX+1]; /* bit length count table */ + cab_LONG lx[ZIPBMAX+1]; /* memory for l[-1..ZIPBMAX-1] */ + struct Ziphuft *u[ZIPBMAX]; /* table stack */ + cab_ULONG v[ZIPN_MAX]; /* values in order of bit length */ + cab_ULONG x[ZIPBMAX+1]; /* bit offsets, then code stack */ + cab_UBYTE *inpos; +}; + +#define CAB(x) (decomp_state->x) +#define ZIP(x) (decomp_state->methods.zip.x) +#define DECR_OK (0) +#define DECR_DATAFORMAT (1) +#define DECR_ILLEGALDATA (2) +#define DECR_NOMEMORY (3) +#define DECR_CHECKSUM (4) +#define DECR_INPUT (5) +#define DECR_OUTPUT (6) +#define DECR_USERABORT (7) + +#define ZIPNEEDBITS(n) {while(k<(n)){cab_LONG c=*(ZIP(inpos)++);\ + b|=((cab_ULONG)c)<>=(n);k-=(n);} + +/* CAB data blocks are <= 32768 bytes in uncompressed form. Uncompressed + * blocks have zero growth. MSZIP guarantees that it won't grow above + * uncompressed size by more than 12 bytes. LZX guarantees it won't grow + * more than 6144 bytes. + */ +#define CAB_BLOCKMAX (32768) +#define CAB_INPUTMAX (CAB_BLOCKMAX+6144) + +typedef struct fdi_cds_fwd { + void *hfdi; /* the hfdi we are using */ + cab_UBYTE inbuf[CAB_INPUTMAX+2]; /* +2 for lzx bitbuffer overflows! */ + cab_UBYTE outbuf[CAB_BLOCKMAX]; + union { + struct ZIPstate zip; + } methods; +} fdi_decomp_state; + +/* Tables for deflate from PKZIP's appnote.txt. */ + +#define THOSE_ZIP_CONSTS \ +static const cab_UBYTE Zipborder[] = /* Order of the bit length code lengths */ \ +{ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; \ +static const cab_UWORD Zipcplens[] = /* Copy lengths for literal codes 257..285 */ \ +{ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, \ + 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; \ +static const cab_UWORD Zipcplext[] = /* Extra bits for literal codes 257..285 */ \ +{ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, \ + 4, 5, 5, 5, 5, 0, 99, 99}; /* 99==invalid */ \ +static const cab_UWORD Zipcpdist[] = /* Copy offsets for distance codes 0..29 */ \ +{ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, \ +513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577}; \ +static const cab_UWORD Zipcpdext[] = /* Extra bits for distance codes */ \ +{ 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, \ +10, 11, 11, 12, 12, 13, 13}; \ +/* And'ing with Zipmask[n] masks the lower n bits */ \ +static const cab_UWORD Zipmask[17] = { \ + 0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, \ + 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff \ +} diff --git a/dll/directx/wine/d3dxof/parsing.c b/dll/directx/wine/d3dxof/parsing.c new file mode 100644 index 00000000000..fa992ced71e --- /dev/null +++ b/dll/directx/wine/d3dxof/parsing.c @@ -0,0 +1,1433 @@ +/* + * X Files parsing + * + * Copyright 2008 Christian Costa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" +#include "wine/debug.h" + +#define COBJMACROS + +#include "winbase.h" +#include "wingdi.h" + +#include "d3dxof_private.h" +#include "dxfile.h" + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(d3dxof_parsing); + +#define MAKEFOUR(a,b,c,d) ((DWORD)a + ((DWORD)b << 8) + ((DWORD)c << 16) + ((DWORD)d << 24)) +#define XOFFILE_FORMAT_MAGIC MAKEFOUR('x','o','f',' ') +#define XOFFILE_FORMAT_VERSION_302 MAKEFOUR('0','3','0','2') +#define XOFFILE_FORMAT_VERSION_303 MAKEFOUR('0','3','0','3') +#define XOFFILE_FORMAT_BINARY MAKEFOUR('b','i','n',' ') +#define XOFFILE_FORMAT_TEXT MAKEFOUR('t','x','t',' ') +#define XOFFILE_FORMAT_BINARY_MSZIP MAKEFOUR('b','z','i','p') +#define XOFFILE_FORMAT_TEXT_MSZIP MAKEFOUR('t','z','i','p') +#define XOFFILE_FORMAT_COMPRESSED MAKEFOUR('c','m','p',' ') +#define XOFFILE_FORMAT_FLOAT_BITS_32 MAKEFOUR('0','0','3','2') +#define XOFFILE_FORMAT_FLOAT_BITS_64 MAKEFOUR('0','0','6','4') + +#define TOKEN_ERROR 0xffff +#define TOKEN_NONE 0 +#define TOKEN_NAME 1 +#define TOKEN_STRING 2 +#define TOKEN_INTEGER 3 +#define TOKEN_GUID 5 +#define TOKEN_INTEGER_LIST 6 +#define TOKEN_FLOAT_LIST 7 +#define TOKEN_OBRACE 10 +#define TOKEN_CBRACE 11 +#define TOKEN_OPAREN 12 +#define TOKEN_CPAREN 13 +#define TOKEN_OBRACKET 14 +#define TOKEN_CBRACKET 15 +#define TOKEN_OANGLE 16 +#define TOKEN_CANGLE 17 +#define TOKEN_DOT 18 +#define TOKEN_COMMA 19 +#define TOKEN_SEMICOLON 20 +#define TOKEN_TEMPLATE 31 +#define TOKEN_WORD 40 +#define TOKEN_DWORD 41 +#define TOKEN_FLOAT 42 +#define TOKEN_DOUBLE 43 +#define TOKEN_CHAR 44 +#define TOKEN_UCHAR 45 +#define TOKEN_SWORD 46 +#define TOKEN_SDWORD 47 +#define TOKEN_VOID 48 +#define TOKEN_LPSTR 49 +#define TOKEN_UNICODE 50 +#define TOKEN_CSTRING 51 +#define TOKEN_ARRAY 52 + +#define CLSIDFMT "<%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X>" + +/* FOURCC to string conversion for debug messages */ +static const char *debugstr_fourcc(DWORD fourcc) +{ + if (!fourcc) return "'null'"; + return wine_dbg_sprintf ("\'%c%c%c%c\'", + (char)(fourcc), (char)(fourcc >> 8), + (char)(fourcc >> 16), (char)(fourcc >> 24)); +} + +static const char* get_primitive_string(WORD token) +{ + switch(token) + { + case TOKEN_WORD: + return "WORD"; + case TOKEN_DWORD: + return "DWORD"; + case TOKEN_FLOAT: + return "FLOAT"; + case TOKEN_DOUBLE: + return "DOUBLE"; + case TOKEN_CHAR: + return "CHAR"; + case TOKEN_UCHAR: + return "UCHAR"; + case TOKEN_SWORD: + return "SWORD"; + case TOKEN_SDWORD: + return "SDWORD"; + case TOKEN_VOID: + return "VOID"; + case TOKEN_LPSTR: + return "STRING"; + case TOKEN_UNICODE: + return "UNICODE"; + case TOKEN_CSTRING: + return "CSTRING "; + default: + break; + } + return NULL; +} + +static void dump_template(xtemplate* templates_array, xtemplate* ptemplate) +{ + ULONG j, k; + GUID* clsid; + + clsid = &ptemplate->class_id; + + DPRINTF("template %s\n", ptemplate->name); + DPRINTF("{\n"); + DPRINTF(CLSIDFMT "\n", clsid->Data1, clsid->Data2, clsid->Data3, clsid->Data4[0], + clsid->Data4[1], clsid->Data4[2], clsid->Data4[3], clsid->Data4[4], clsid->Data4[5], clsid->Data4[6], clsid->Data4[7]); + for (j = 0; j < ptemplate->nb_members; j++) + { + if (ptemplate->members[j].nb_dims) + DPRINTF("array "); + if (ptemplate->members[j].type == TOKEN_NAME) + DPRINTF("%s ", templates_array[ptemplate->members[j].idx_template].name); + else + DPRINTF("%s ", get_primitive_string(ptemplate->members[j].type)); + DPRINTF("%s", ptemplate->members[j].name); + for (k = 0; k < ptemplate->members[j].nb_dims; k++) + { + if (ptemplate->members[j].dim_fixed[k]) + DPRINTF("[%d]", ptemplate->members[j].dim_value[k]); + else + DPRINTF("[%s]", ptemplate->members[ptemplate->members[j].dim_value[k]].name); + } + DPRINTF(";\n"); + } + if (ptemplate->open) + DPRINTF("[...]\n"); + else if (ptemplate->nb_children) + { + DPRINTF("[%s", ptemplate->children[0]); + for (j = 1; j < ptemplate->nb_children; j++) + DPRINTF(",%s", ptemplate->children[j]); + DPRINTF("]\n"); + } + DPRINTF("}\n"); +} + +static BOOL read_bytes(parse_buffer * buf, LPVOID data, DWORD size) +{ + if (buf->rem_bytes < size) + return FALSE; + memcpy(data, buf->buffer, size); + buf->buffer += size; + buf->rem_bytes -= size; + return TRUE; +} + +static void rewind_bytes(parse_buffer * buf, DWORD size) +{ + buf->buffer -= size; + buf->rem_bytes += size; +} + +HRESULT parse_header(parse_buffer * buf, BYTE ** decomp_buffer_ptr) +{ + /* X File common header: + * 0-3 -> Magic Number (format identifier) + * 4-7 -> Format Version + * 8-11 -> Format Type (text or binary, decompressed or compressed) + * 12-15 -> Float Size (32 or 64 bits) */ + DWORD header[4]; + + if (!read_bytes(buf, header, sizeof(header))) + return DXFILEERR_BADFILETYPE; + + if (TRACE_ON(d3dxof_parsing)) + { + char string[17]; + memcpy(string, header, 16); + string[16] = 0; + TRACE("header = '%s'\n", string); + } + + if (header[0] != XOFFILE_FORMAT_MAGIC) + return DXFILEERR_BADFILETYPE; + + if (header[1] != XOFFILE_FORMAT_VERSION_302 && header[1] != XOFFILE_FORMAT_VERSION_303) + return DXFILEERR_BADFILEVERSION; + + if (header[2] != XOFFILE_FORMAT_BINARY && header[2] != XOFFILE_FORMAT_TEXT && + header[2] != XOFFILE_FORMAT_BINARY_MSZIP && header[2] != XOFFILE_FORMAT_TEXT_MSZIP) + { + WARN("File type %s unknown\n", debugstr_fourcc(header[2])); + return DXFILEERR_BADFILETYPE; + } + + if (header[3] != XOFFILE_FORMAT_FLOAT_BITS_32 && header[3] != XOFFILE_FORMAT_FLOAT_BITS_64) + return DXFILEERR_BADFILEFLOATSIZE; + + buf->txt = header[2] == XOFFILE_FORMAT_TEXT || header[2] == XOFFILE_FORMAT_TEXT_MSZIP; + + if (header[2] == XOFFILE_FORMAT_BINARY_MSZIP || header[2] == XOFFILE_FORMAT_TEXT_MSZIP) + { + /* Extended header for compressed data: + * 16-19 -> size of decompressed file including xof header, + * 20-21 -> size of first decompressed MSZIP chunk, 22-23 -> size of first compressed MSZIP chunk + * 24-xx -> compressed MSZIP data chunk + * xx-xx -> size of next decompressed MSZIP chunk, xx-xx -> size of next compressed MSZIP chunk + * xx-xx -> compressed MSZIP data chunk + * .............................................................................................. */ + int err; + DWORD decomp_file_size; + WORD decomp_chunk_size; + WORD comp_chunk_size; + LPBYTE decomp_buffer; + + if (!read_bytes(buf, &decomp_file_size, sizeof(decomp_file_size))) + return DXFILEERR_BADFILETYPE; + + TRACE("Compressed format %s detected: decompressed file size with xof header = %d\n", + debugstr_fourcc(header[2]), decomp_file_size); + + /* Does not take xof header into account */ + decomp_file_size -= 16; + + decomp_buffer = HeapAlloc(GetProcessHeap(), 0, decomp_file_size); + if (!decomp_buffer) + { + ERR("Out of memory\n"); + return DXFILEERR_BADALLOC; + } + *decomp_buffer_ptr = decomp_buffer; + + while (buf->rem_bytes) + { + if (!read_bytes(buf, &decomp_chunk_size, sizeof(decomp_chunk_size))) + return DXFILEERR_BADFILETYPE; + if (!read_bytes(buf, &comp_chunk_size, sizeof(comp_chunk_size))) + return DXFILEERR_BADFILETYPE; + + TRACE("Process chunk: compressed_size = %d, decompressed_size = %d\n", + comp_chunk_size, decomp_chunk_size); + + err = mszip_decompress(comp_chunk_size, decomp_chunk_size, (char*)buf->buffer, (char*)decomp_buffer); + if (err) + { + WARN("Error while decompressing MSZIP chunk %d\n", err); + HeapFree(GetProcessHeap(), 0, decomp_buffer); + return DXFILEERR_BADALLOC; + } + buf->rem_bytes -= comp_chunk_size; + buf->buffer += comp_chunk_size; + decomp_buffer += decomp_chunk_size; + } + + if ((decomp_buffer - *decomp_buffer_ptr) != decomp_file_size) + ERR("Size of all decompressed chunks (%u) does not match decompressed file size (%u)\n", + (DWORD)(decomp_buffer - *decomp_buffer_ptr), decomp_file_size); + + /* Use decompressed data */ + buf->buffer = *decomp_buffer_ptr; + buf->rem_bytes = decomp_file_size; + } + + TRACE("Header is correct\n"); + + return S_OK; +} + +static void dump_TOKEN(WORD token) +{ +#define DUMP_TOKEN(t) case t: TRACE(#t "\n"); break + switch(token) + { + DUMP_TOKEN(TOKEN_NAME); + DUMP_TOKEN(TOKEN_STRING); + DUMP_TOKEN(TOKEN_INTEGER); + DUMP_TOKEN(TOKEN_GUID); + DUMP_TOKEN(TOKEN_INTEGER_LIST); + DUMP_TOKEN(TOKEN_FLOAT_LIST); + DUMP_TOKEN(TOKEN_OBRACE); + DUMP_TOKEN(TOKEN_CBRACE); + DUMP_TOKEN(TOKEN_OPAREN); + DUMP_TOKEN(TOKEN_CPAREN); + DUMP_TOKEN(TOKEN_OBRACKET); + DUMP_TOKEN(TOKEN_CBRACKET); + DUMP_TOKEN(TOKEN_OANGLE); + DUMP_TOKEN(TOKEN_CANGLE); + DUMP_TOKEN(TOKEN_DOT); + DUMP_TOKEN(TOKEN_COMMA); + DUMP_TOKEN(TOKEN_SEMICOLON); + DUMP_TOKEN(TOKEN_TEMPLATE); + DUMP_TOKEN(TOKEN_WORD); + DUMP_TOKEN(TOKEN_DWORD); + DUMP_TOKEN(TOKEN_FLOAT); + DUMP_TOKEN(TOKEN_DOUBLE); + DUMP_TOKEN(TOKEN_CHAR); + DUMP_TOKEN(TOKEN_UCHAR); + DUMP_TOKEN(TOKEN_SWORD); + DUMP_TOKEN(TOKEN_SDWORD); + DUMP_TOKEN(TOKEN_VOID); + DUMP_TOKEN(TOKEN_LPSTR); + DUMP_TOKEN(TOKEN_UNICODE); + DUMP_TOKEN(TOKEN_CSTRING); + DUMP_TOKEN(TOKEN_ARRAY); + default: + if (0) + TRACE("Unknown token %d\n", token); + break; + } +#undef DUMP_TOKEN +} + +static BOOL is_space(char c) +{ + switch (c) + { + case 0x00: + case 0x0D: + case 0x0A: + case ' ': + case '\t': + return TRUE; + } + return FALSE; +} + +static BOOL is_operator(char c) +{ + switch(c) + { + case '{': + case '}': + case '[': + case ']': + case '(': + case ')': + case '<': + case '>': + case ',': + case ';': + return TRUE; + } + return FALSE; +} + +static inline BOOL is_separator(char c) +{ + return is_space(c) || is_operator(c); +} + +static WORD get_operator_token(char c) +{ + switch(c) + { + case '{': + return TOKEN_OBRACE; + case '}': + return TOKEN_CBRACE; + case '[': + return TOKEN_OBRACKET; + case ']': + return TOKEN_CBRACKET; + case '(': + return TOKEN_OPAREN; + case ')': + return TOKEN_CPAREN; + case '<': + return TOKEN_OANGLE; + case '>': + return TOKEN_CANGLE; + case ',': + return TOKEN_COMMA; + case ';': + return TOKEN_SEMICOLON; + } + return 0; +} + +static BOOL is_keyword(parse_buffer* buf, const char* keyword) +{ + char tmp[8]; /* longest keyword size (template) */ + DWORD len = strlen(keyword); + + if (!read_bytes(buf, tmp, len)) + return FALSE; + if (strncasecmp(tmp, keyword, len)) + { + rewind_bytes(buf, len); + return FALSE; + } + + if (!read_bytes(buf, tmp, 1)) + return TRUE; + if (is_separator(tmp[0])) + { + rewind_bytes(buf, 1); + return TRUE; + } + rewind_bytes(buf, len+1); + return FALSE; +} + +static WORD get_keyword_token(parse_buffer* buf) +{ + if (is_keyword(buf, "template")) + return TOKEN_TEMPLATE; + if (is_keyword(buf, "WORD")) + return TOKEN_WORD; + if (is_keyword(buf, "DWORD")) + return TOKEN_DWORD; + if (is_keyword(buf, "FLOAT")) + return TOKEN_FLOAT; + if (is_keyword(buf, "DOUBLE")) + return TOKEN_DOUBLE; + if (is_keyword(buf, "CHAR")) + return TOKEN_CHAR; + if (is_keyword(buf, "UCHAR")) + return TOKEN_UCHAR; + if (is_keyword(buf, "SWORD")) + return TOKEN_SWORD; + if (is_keyword(buf, "SDWORD")) + return TOKEN_SDWORD; + if (is_keyword(buf, "VOID")) + return TOKEN_VOID; + if (is_keyword(buf, "STRING")) + return TOKEN_LPSTR; + if (is_keyword(buf, "UNICODE")) + return TOKEN_UNICODE; + if (is_keyword(buf, "CSTRING")) + return TOKEN_CSTRING; + if (is_keyword(buf, "array")) + return TOKEN_ARRAY; + + return 0; +} + +static BOOL is_guid(parse_buffer* buf) +{ + char tmp[50]; + DWORD pos = 1; + GUID class_id; + DWORD tab[10]; + int ret; + + if (buf->rem_bytes < 38 || *buf->buffer != '<') + return FALSE; + tmp[0] = '<'; + while (pos < sizeof(tmp) - 2 && *(buf->buffer+pos) != '>') + { + tmp[pos] = *(buf->buffer+pos); + pos++; + } + tmp[pos++] = '>'; + tmp[pos] = 0; + if (pos != 38 /* <+36+> */) + { + TRACE("Wrong guid %s (%d)\n", tmp, pos); + return FALSE; + } + buf->buffer += pos; + buf->rem_bytes -= pos; + + ret = sscanf(tmp, CLSIDFMT, &class_id.Data1, tab, tab+1, tab+2, tab+3, tab+4, tab+5, tab+6, tab+7, tab+8, tab+9); + if (ret != 11) + { + TRACE("Wrong guid %s (%d)\n", tmp, pos); + return FALSE; + } + TRACE("Found guid %s (%d)\n", tmp, pos); + + class_id.Data2 = tab[0]; + class_id.Data3 = tab[1]; + class_id.Data4[0] = tab[2]; + class_id.Data4[1] = tab[3]; + class_id.Data4[2] = tab[4]; + class_id.Data4[3] = tab[5]; + class_id.Data4[4] = tab[6]; + class_id.Data4[5] = tab[7]; + class_id.Data4[6] = tab[8]; + class_id.Data4[7] = tab[9]; + + *(GUID*)buf->value = class_id; + + return TRUE; +} + +static BOOL is_name(parse_buffer* buf) +{ + char tmp[512]; + DWORD pos = 0; + char c; + BOOL error = 0; + while (pos < buf->rem_bytes && !is_separator(c = *(buf->buffer+pos))) + { + if (!(((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) || ((c >= '0') && (c <= '9')) || (c == '_') || (c == '-'))) + error = 1; + if (pos < sizeof(tmp)) + tmp[pos] = c; + pos++; + } + tmp[min(pos, sizeof(tmp) - 1)] = 0; + + if (error) + { + TRACE("Wrong name %s\n", tmp); + return FALSE; + } + + buf->buffer += pos; + buf->rem_bytes -= pos; + + TRACE("Found name %s\n", tmp); + strcpy((char*)buf->value, tmp); + + return TRUE; +} + +static BOOL is_float(parse_buffer* buf) +{ + char tmp[512]; + DWORD pos = 0; + char c; + float decimal; + BOOL dot = 0; + + while (pos < buf->rem_bytes && !is_separator(c = *(buf->buffer+pos))) + { + if (!((!pos && (c == '-')) || ((c >= '0') && (c <= '9')) || (!dot && (c == '.')))) + return FALSE; + if (c == '.') + dot = TRUE; + if (pos < sizeof(tmp)) + tmp[pos] = c; + pos++; + } + tmp[min(pos, sizeof(tmp) - 1)] = 0; + + buf->buffer += pos; + buf->rem_bytes -= pos; + + sscanf(tmp, "%f", &decimal); + + TRACE("Found float %s - %f\n", tmp, decimal); + + *(float*)buf->value = decimal; + + return TRUE; +} + +static BOOL is_integer(parse_buffer* buf) +{ + char tmp[512]; + DWORD pos = 0; + char c; + DWORD integer; + + while (pos < buf->rem_bytes && !is_separator(c = *(buf->buffer+pos))) + { + if (!((c >= '0') && (c <= '9'))) + return FALSE; + if (pos < sizeof(tmp)) + tmp[pos] = c; + pos++; + } + tmp[min(pos, sizeof(tmp) - 1)] = 0; + + buf->buffer += pos; + buf->rem_bytes -= pos; + + sscanf(tmp, "%d", &integer); + + TRACE("Found integer %s - %d\n", tmp, integer); + + *(DWORD*)buf->value = integer; + + return TRUE; +} + +static BOOL is_string(parse_buffer* buf) +{ + char tmp[512]; + DWORD pos = 0; + char c; + BOOL ok = 0; + + if (*buf->buffer != '"') + return FALSE; + + while ((pos+1) < buf->rem_bytes) + { + c = *(buf->buffer+pos+1); + if (c == '"') + { + ok = 1; + break; + } + if (pos < sizeof(tmp)) + tmp[pos] = c; + pos++; + } + tmp[min(pos, sizeof(tmp) - 1)] = 0; + + if (!ok) + { + TRACE("Wrong string %s\n", tmp); + return FALSE; + } + + buf->buffer += pos + 2; + buf->rem_bytes -= pos + 2; + + TRACE("Found string %s\n", tmp); + strcpy((char*)buf->value, tmp); + + return TRUE; +} + +static WORD parse_TOKEN(parse_buffer * buf) +{ + WORD token; + + if (buf->txt) + { + while(1) + { + char c; + if (!read_bytes(buf, &c, 1)) + return TOKEN_NONE; + if ((c == '#') || (c == '/')) + { + /* Handle comment (# or //) */ + if (c == '/') + { + if (!read_bytes(buf, &c, 1)) + return TOKEN_ERROR; + if (c != '/') + return TOKEN_ERROR; + } + c = 0; + while (c != 0x0A) + { + if (!read_bytes(buf, &c, 1)) + return TOKEN_NONE; + } + continue; + } + if (is_space(c)) + continue; + if (is_operator(c) && (c != '<')) + { + token = get_operator_token(c); + break; + } + else if (c == '.') + { + token = TOKEN_DOT; + break; + } + else + { + rewind_bytes(buf, 1); + + if ((token = get_keyword_token(buf))) + break; + + if (is_guid(buf)) + { + token = TOKEN_GUID; + break; + } + if (is_integer(buf)) + { + token = TOKEN_INTEGER; + break; + } + if (is_float(buf)) + { + token = TOKEN_FLOAT; + break; + } + if (is_string(buf)) + { + token = TOKEN_LPSTR; + break; + } + if (is_name(buf)) + { + token = TOKEN_NAME; + break; + } + + FIXME("Unrecognize element\n"); + return TOKEN_ERROR; + } + } + } + else + { + if (!buf->list_nb_elements) + { + if (!read_bytes(buf, &token, 2)) + return TOKEN_NONE; + + /* Convert integer and float list into separate elements */ + if (token == TOKEN_INTEGER_LIST) + { + if (!read_bytes(buf, &buf->list_nb_elements, 4)) + return TOKEN_ERROR; + token = TOKEN_INTEGER; + buf->list_type_float = FALSE; + TRACE("Integer list (TOKEN_INTEGER_LIST) of size %d\n", buf->list_nb_elements); + } + else if (token == TOKEN_FLOAT_LIST) + { + if (!read_bytes(buf, &buf->list_nb_elements, 4)) + return TOKEN_ERROR; + token = TOKEN_FLOAT; + buf->list_type_float = TRUE; + TRACE("Float list (TOKEN_FLOAT_LIST) of size %d\n", buf->list_nb_elements); + } + } + + if (buf->list_nb_elements) + { + if (buf->list_separator) + { + buf->list_nb_elements--; + buf->list_separator = FALSE; + /* Insert separarator between each values and since list does not accept separator at the end + use a comma so any extra separator will generate an error */ + token = TOKEN_COMMA; + } + else + { + DWORD value; + + if (!read_bytes(buf, &value, 4)) + return TOKEN_ERROR; + *(DWORD*)buf->value = value; + + buf->list_separator = TRUE; + /* Convert list into a serie of their basic type counterpart */ + token = buf->list_type_float ? TOKEN_FLOAT : TOKEN_INTEGER; + } + dump_TOKEN(token); + return token; + } + + switch (token) + { + case TOKEN_NAME: + { + DWORD count; + char *name = (char*)buf->value; + + if (!read_bytes(buf, &count, 4)) + return TOKEN_ERROR; + if (!read_bytes(buf, name, count)) + return TOKEN_ERROR; + name[count] = 0; + TRACE("name = %s\n", name); + } + break; + case TOKEN_INTEGER: + { + DWORD integer; + + if (!read_bytes(buf, &integer, 4)) + return TOKEN_ERROR; + TRACE("integer = %u\n", integer); + + *(DWORD*)buf->value = integer; + } + break; + case TOKEN_GUID: + { + char strguid[39]; + GUID class_id; + + if (!read_bytes(buf, &class_id, 16)) + return TOKEN_ERROR; + sprintf(strguid, CLSIDFMT, class_id.Data1, class_id.Data2, class_id.Data3, class_id.Data4[0], + class_id.Data4[1], class_id.Data4[2], class_id.Data4[3], class_id.Data4[4], class_id.Data4[5], + class_id.Data4[6], class_id.Data4[7]); + TRACE("guid = %s\n", strguid); + + *(GUID*)buf->value = class_id; + } + break; + case TOKEN_STRING: + { + DWORD count; + char *string = (char*)buf->value; + + if (!read_bytes(buf, &count, 4)) + return TOKEN_ERROR; + if (!read_bytes(buf, string, count)) + return TOKEN_ERROR; + string[count] = 0; + TRACE("string = %s\n", string); + + token = TOKEN_LPSTR; + } + break; + case TOKEN_OBRACE: + case TOKEN_CBRACE: + case TOKEN_OPAREN: + case TOKEN_CPAREN: + case TOKEN_OBRACKET: + case TOKEN_CBRACKET: + case TOKEN_OANGLE: + case TOKEN_CANGLE: + case TOKEN_DOT: + case TOKEN_COMMA: + case TOKEN_SEMICOLON: + case TOKEN_TEMPLATE: + case TOKEN_WORD: + case TOKEN_DWORD: + case TOKEN_FLOAT: + case TOKEN_DOUBLE: + case TOKEN_CHAR: + case TOKEN_UCHAR: + case TOKEN_SWORD: + case TOKEN_SDWORD: + case TOKEN_VOID: + case TOKEN_LPSTR: + case TOKEN_UNICODE: + case TOKEN_CSTRING: + case TOKEN_ARRAY: + break; + default: + return TOKEN_ERROR; + } + } + + dump_TOKEN(token); + + return token; +} + +static WORD get_TOKEN(parse_buffer * buf) +{ + if (buf->token_present) + { + buf->token_present = FALSE; + return buf->current_token; + } + + buf->current_token = parse_TOKEN(buf); + + return buf->current_token; +} + +static WORD check_TOKEN(parse_buffer * buf) +{ + if (buf->token_present) + return buf->current_token; + + buf->current_token = parse_TOKEN(buf); + buf->token_present = TRUE; + + return buf->current_token; +} + +static inline BOOL is_primitive_type(WORD token) +{ + BOOL ret; + switch(token) + { + case TOKEN_WORD: + case TOKEN_DWORD: + case TOKEN_FLOAT: + case TOKEN_DOUBLE: + case TOKEN_CHAR: + case TOKEN_UCHAR: + case TOKEN_SWORD: + case TOKEN_SDWORD: + case TOKEN_LPSTR: + case TOKEN_UNICODE: + case TOKEN_CSTRING: + ret = 1; + break; + default: + ret = 0; + break; + } + return ret; +} + +static BOOL parse_template_option_info(parse_buffer * buf) +{ + xtemplate* cur_template = &buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates]; + + if (check_TOKEN(buf) == TOKEN_DOT) + { + get_TOKEN(buf); + if (get_TOKEN(buf) != TOKEN_DOT) + return FALSE; + if (get_TOKEN(buf) != TOKEN_DOT) + return FALSE; + cur_template->open = TRUE; + } + else + { + while (1) + { + if (get_TOKEN(buf) != TOKEN_NAME) + return FALSE; + strcpy(cur_template->children[cur_template->nb_children], (char*)buf->value); + if (check_TOKEN(buf) == TOKEN_GUID) + get_TOKEN(buf); + cur_template->nb_children++; + if (check_TOKEN(buf) != TOKEN_COMMA) + break; + get_TOKEN(buf); + } + cur_template->open = FALSE; + } + + return TRUE; +} + +static BOOL parse_template_members_list(parse_buffer * buf) +{ + int idx_member = 0; + member* cur_member; + + while (1) + { + BOOL array = 0; + int nb_dims = 0; + cur_member = &buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].members[idx_member]; + + if (check_TOKEN(buf) == TOKEN_ARRAY) + { + get_TOKEN(buf); + array = 1; + } + + if (check_TOKEN(buf) == TOKEN_NAME) + { + cur_member->type = get_TOKEN(buf); + if (!strcmp((char*)buf->value, "indexColor")) + { + /* Case sensitive legacy type indexColor is described in the first template */ + cur_member->idx_template = 0; + } + else + { + cur_member->idx_template = 1; + while (cur_member->idx_template < buf->pdxf->nb_xtemplates) + { + if (!strcasecmp((char*)buf->value, buf->pdxf->xtemplates[cur_member->idx_template].name)) + break; + cur_member->idx_template++; + } + if (cur_member->idx_template == buf->pdxf->nb_xtemplates) + { + WARN("Reference to a nonexistent template '%s'\n", (char*)buf->value); + return FALSE; + } + } + } + else if (is_primitive_type(check_TOKEN(buf))) + cur_member->type = get_TOKEN(buf); + else + break; + + if (get_TOKEN(buf) != TOKEN_NAME) + return FALSE; + strcpy(cur_member->name, (char*)buf->value); + + if (array) + { + while (check_TOKEN(buf) == TOKEN_OBRACKET) + { + if (nb_dims >= MAX_ARRAY_DIM) + { + FIXME("Too many dimensions (%d) for multi-dimensional array\n", nb_dims + 1); + return FALSE; + } + get_TOKEN(buf); + if (check_TOKEN(buf) == TOKEN_INTEGER) + { + get_TOKEN(buf); + cur_member->dim_fixed[nb_dims] = TRUE; + cur_member->dim_value[nb_dims] = *(DWORD*)buf->value; + } + else + { + int i; + if (get_TOKEN(buf) != TOKEN_NAME) + return FALSE; + for (i = 0; i < idx_member; i++) + { + if (!strcmp((char*)buf->value, buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].members[i].name)) + { + if (buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].members[i].nb_dims) + { + ERR("Array cannot be used to specify variable array size\n"); + return FALSE; + } + if (buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].members[i].type != TOKEN_DWORD) + { + FIXME("Only DWORD supported to specify variable array size\n"); + return FALSE; + } + break; + } + } + if (i == idx_member) + { + ERR("Reference to unknown member %s\n", (char*)buf->value); + return FALSE; + } + cur_member->dim_fixed[nb_dims] = FALSE; + cur_member->dim_value[nb_dims] = i; + } + if (get_TOKEN(buf) != TOKEN_CBRACKET) + return FALSE; + nb_dims++; + } + if (!nb_dims) + return FALSE; + cur_member->nb_dims = nb_dims; + } + if (get_TOKEN(buf) != TOKEN_SEMICOLON) + return FALSE; + + idx_member++; + } + + buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].nb_members = idx_member; + + return TRUE; +} + +static BOOL parse_template_parts(parse_buffer * buf) +{ + if (!parse_template_members_list(buf)) + return FALSE; + if (check_TOKEN(buf) == TOKEN_OBRACKET) + { + get_TOKEN(buf); + if (!parse_template_option_info(buf)) + return FALSE; + if (get_TOKEN(buf) != TOKEN_CBRACKET) + return FALSE; + } + + return TRUE; +} + +static BOOL parse_template(parse_buffer * buf) +{ + if (get_TOKEN(buf) != TOKEN_TEMPLATE) + return FALSE; + if (get_TOKEN(buf) != TOKEN_NAME) + return FALSE; + strcpy(buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].name, (char*)buf->value); + if (get_TOKEN(buf) != TOKEN_OBRACE) + return FALSE; + if (get_TOKEN(buf) != TOKEN_GUID) + return FALSE; + buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].class_id = *(GUID*)buf->value; + if (!parse_template_parts(buf)) + return FALSE; + if (get_TOKEN(buf) != TOKEN_CBRACE) + return FALSE; + + TRACE("%d - %s - %s\n", buf->pdxf->nb_xtemplates, buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].name, debugstr_guid(&buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates].class_id)); + buf->pdxf->nb_xtemplates++; + + return TRUE; +} + +BOOL parse_templates(parse_buffer * buf, BOOL templates_only) +{ + while (check_TOKEN(buf) != TOKEN_NONE) + { + if (templates_only && (check_TOKEN(buf) != TOKEN_TEMPLATE)) + return TRUE; + if (!parse_template(buf)) + { + WARN("Template is not correct\n"); + return FALSE; + } + else + { + TRACE("Template successfully parsed:\n"); + if (TRACE_ON(d3dxof_parsing)) + dump_template(buf->pdxf->xtemplates, &buf->pdxf->xtemplates[buf->pdxf->nb_xtemplates - 1]); + } + } + return TRUE; +} + +static BOOL check_buffer(parse_buffer * buf, ULONG size) +{ + if ((buf->cur_pos_data + size) > buf->capacity) + { + LPBYTE pdata; + ULONG new_capacity = buf->capacity ? 2 * buf->capacity : 100000; + + pdata = HeapAlloc(GetProcessHeap(), 0, new_capacity); + if (!pdata) + return FALSE; + memcpy(pdata, buf->pdata, buf->cur_pos_data); + HeapFree(GetProcessHeap(), 0, buf->pdata); + buf->capacity = new_capacity; + buf->pdata = pdata; + buf->pxo->root->pdata = pdata; + } + return TRUE; +} + +static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional); +static BOOL parse_object_members_list(parse_buffer * buf) +{ + DWORD token; + ULONG i; + xtemplate* pt = buf->pxt[buf->level]; + + buf->pxo->nb_members = pt->nb_members; + + for (i = 0; i < pt->nb_members; i++) + { + ULONG k; + ULONG nb_elems = 1; + BOOL basic_type = TRUE; + + buf->pxo->members[i].name = pt->members[i].name; + buf->pxo->members[i].start = buf->cur_pos_data; + + for (k = 0; k < pt->members[i].nb_dims; k++) + { + if (pt->members[i].dim_fixed[k]) + nb_elems *= pt->members[i].dim_value[k]; + else + nb_elems *= *(DWORD*)(buf->pxo->root->pdata + buf->pxo->members[pt->members[i].dim_value[k]].start); + } + + TRACE("Elements to consider: %u\n", nb_elems); + + for (k = 0; k < nb_elems; k++) + { + if (pt->members[i].type == TOKEN_NAME) + { + ULONG j; + + TRACE("Found sub-object %s\n", buf->pdxf->xtemplates[pt->members[i].idx_template].name); + basic_type = FALSE; + buf->level++; + /* To do template lookup */ + for (j = 0; j < buf->pdxf->nb_xtemplates; j++) + { + if (!strcasecmp(buf->pdxf->xtemplates[pt->members[i].idx_template].name, buf->pdxf->xtemplates[j].name)) + { + buf->pxt[buf->level] = &buf->pdxf->xtemplates[j]; + break; + } + } + if (j == buf->pdxf->nb_xtemplates) + { + ERR("Unknown template %s\n", (char*)buf->value); + buf->level--; + return FALSE; + } + TRACE("Enter %s\n", buf->pdxf->xtemplates[pt->members[i].idx_template].name); + if (!parse_object_parts(buf, FALSE)) + { + buf->level--; + return FALSE; + } + buf->level--; + } + else + { + token = check_TOKEN(buf); + if (token == TOKEN_INTEGER) + { + get_TOKEN(buf); + TRACE("%s = %d\n", pt->members[i].name, *(DWORD*)buf->value); + /* Assume larger size */ + if (!check_buffer(buf, 4)) + return FALSE; + if (pt->members[i].type == TOKEN_WORD) + { + *(((WORD*)(buf->pdata + buf->cur_pos_data))) = (WORD)(*(DWORD*)buf->value); + buf->cur_pos_data += 2; + } + else if (pt->members[i].type == TOKEN_DWORD) + { + *(((DWORD*)(buf->pdata + buf->cur_pos_data))) = (DWORD)(*(DWORD*)buf->value); + buf->cur_pos_data += 4; + } + else + { + FIXME("Token %d not supported\n", pt->members[i].type); + return FALSE; + } + } + else if (token == TOKEN_FLOAT) + { + get_TOKEN(buf); + TRACE("%s = %f\n", pt->members[i].name, *(float*)buf->value); + if (!check_buffer(buf, 4)) + return FALSE; + if (pt->members[i].type == TOKEN_FLOAT) + { + *(((float*)(buf->pdata + buf->cur_pos_data))) = (float)(*(float*)buf->value); + buf->cur_pos_data += 4; + } + else + { + FIXME("Token %d not supported\n", pt->members[i].type); + return FALSE; + } + } + else if (token == TOKEN_LPSTR) + { + get_TOKEN(buf); + TRACE("%s = %s\n", pt->members[i].name, (char*)buf->value); + if (!check_buffer(buf, sizeof(LPSTR))) + return FALSE; + if (pt->members[i].type == TOKEN_LPSTR) + { + int len = strlen((char*)buf->value) + 1; + if ((buf->cur_pstrings - buf->pstrings + len) > MAX_STRINGS_BUFFER) + { + FIXME("Buffer too small %p %p %d\n", buf->cur_pstrings, buf->pstrings, len); + return FALSE; + } + strcpy((char*)buf->cur_pstrings, (char*)buf->value); + *(((LPCSTR*)(buf->pdata + buf->cur_pos_data))) = (char*)buf->cur_pstrings; + buf->cur_pstrings += len; + buf->cur_pos_data += sizeof(LPSTR); + } + else + { + FIXME("Token %d not supported\n", pt->members[i].type); + return FALSE; + } + } + else + { + WARN("Unexpected token %d\n", token); + return FALSE; + } + } + + if (basic_type) + { + /* Handle separator only for basic types */ + token = check_TOKEN(buf); + if ((token != TOKEN_COMMA) && (token != TOKEN_SEMICOLON)) + return FALSE; + /* Allow multi-semicolons + single comma separator */ + while (check_TOKEN(buf) == TOKEN_SEMICOLON) + get_TOKEN(buf); + if (check_TOKEN(buf) == TOKEN_COMMA) + get_TOKEN(buf); + } + } + + buf->pxo->members[i].size = buf->cur_pos_data - buf->pxo->members[i].start; + } + + return TRUE; +} + +static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional) +{ + buf->pxo->nb_children = 0; + + if (!parse_object_members_list(buf)) + return FALSE; + + if (allow_optional) + { + buf->pxo->size = buf->cur_pos_data - buf->pxo->pos_data; + + while (1) + { + if (check_TOKEN(buf) == TOKEN_OBRACE) + { + ULONG i, j; + get_TOKEN(buf); + if (get_TOKEN(buf) != TOKEN_NAME) + return FALSE; + if (get_TOKEN(buf) != TOKEN_CBRACE) + return FALSE; + TRACE("Found optional reference %s\n", (char*)buf->value); + for (i = 0; i < (buf->nb_pxo_globals+1); i++) + { + for (j = 0; j < (buf->pxo_globals[i])[0].nb_subobjects; j++) + { + if (!strcmp((buf->pxo_globals[i])[j].name, (char*)buf->value)) + goto _exit; + } + } +_exit: + if (i == (buf->nb_pxo_globals+1)) + { + ERR("Reference to unknown object %s\n", (char*)buf->value); + return FALSE; + } + + if (buf->pxo->root->nb_subobjects >= MAX_SUBOBJECTS) + { + FIXME("Too many sub-objects\n"); + return FALSE; + } + + buf->pxo->children[buf->pxo->nb_children] = &buf->pxo_tab[buf->pxo->root->nb_subobjects++]; + buf->pxo->children[buf->pxo->nb_children]->ptarget = &(buf->pxo_globals[i])[j]; + buf->pxo->children[buf->pxo->nb_children]->binary = FALSE; + buf->pxo->nb_children++; + } + else if (check_TOKEN(buf) == TOKEN_NAME) + { + xobject* pxo = buf->pxo; + + if (buf->pxo->root->nb_subobjects >= MAX_SUBOBJECTS) + { + FIXME("Too many sub-objects\n"); + return FALSE; + } + + buf->pxo = buf->pxo->children[buf->pxo->nb_children] = &buf->pxo_tab[buf->pxo->root->nb_subobjects++]; + + TRACE("Enter optional %s\n", (char*)buf->value); + buf->level++; + if (!parse_object(buf)) + { + buf->level--; + return FALSE; + } + buf->level--; + buf->pxo = pxo; + buf->pxo->nb_children++; + } + else + break; + } + } + + if (buf->pxo->nb_children > MAX_CHILDREN) + { + FIXME("Too many children %d\n", buf->pxo->nb_children); + return FALSE; + } + + return TRUE; +} + +BOOL parse_object(parse_buffer * buf) +{ + ULONG i; + + buf->pxo->pos_data = buf->cur_pos_data; + buf->pxo->ptarget = NULL; + buf->pxo->binary = FALSE; + buf->pxo->root = buf->pxo_tab; + + if (get_TOKEN(buf) != TOKEN_NAME) + return FALSE; + + /* To do template lookup */ + for (i = 0; i < buf->pdxf->nb_xtemplates; i++) + { + if (!strcasecmp((char*)buf->value, buf->pdxf->xtemplates[i].name)) + { + buf->pxt[buf->level] = &buf->pdxf->xtemplates[i]; + memcpy(&buf->pxo->type, &buf->pdxf->xtemplates[i].class_id, 16); + break; + } + } + if (i == buf->pdxf->nb_xtemplates) + { + ERR("Unknown template %s\n", (char*)buf->value); + return FALSE; + } + + if (check_TOKEN(buf) == TOKEN_NAME) + { + get_TOKEN(buf); + strcpy(buf->pxo->name, (char*)buf->value); + } + else + buf->pxo->name[0] = 0; + + if (get_TOKEN(buf) != TOKEN_OBRACE) + return FALSE; + if (check_TOKEN(buf) == TOKEN_GUID) + { + get_TOKEN(buf); + memcpy(&buf->pxo->class_id, buf->value, 16); + } + else + memset(&buf->pxo->class_id, 0, 16); + + if (!parse_object_parts(buf, TRUE)) + return FALSE; + if (get_TOKEN(buf) != TOKEN_CBRACE) + return FALSE; + + /* For seeking to a possibly eof to avoid parsing another object next time */ + check_TOKEN(buf); + + return TRUE; +} diff --git a/dll/directx/wine/d3dxof/version.rc b/dll/directx/wine/d3dxof/version.rc new file mode 100644 index 00000000000..93c1371c7c0 --- /dev/null +++ b/dll/directx/wine/d3dxof/version.rc @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2004 Christian Costa + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define WINE_FILEDESCRIPTION_STR "DirectX Files dll" +#define WINE_FILENAME_STR "d3dxof.dll" +#define WINE_FILEVERSION 5,0,2135,1 +#define WINE_FILEVERSION_STR "5.0.2135.1" +#define WINE_PRODUCTVERSION 5,0,2135,1 +#define WINE_PRODUCTVERSION_STR "5.0.2135.1" + +#include "wine/wine_common_ver.rc" diff --git a/dll/directx/wine/ddraw/CMakeLists.txt b/dll/directx/wine/ddraw/CMakeLists.txt index 897a9c0f96a..19f87562fbd 100644 --- a/dll/directx/wine/ddraw/CMakeLists.txt +++ b/dll/directx/wine/ddraw/CMakeLists.txt @@ -16,7 +16,6 @@ list(APPEND SOURCE main.c material.c palette.c - stubs.c surface.c utils.c vertexbuffer.c @@ -24,34 +23,16 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/ddraw_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/ddraw.def) -add_library(ddraw SHARED - ${SOURCE} - ddraw.rc) - if(MSVC) # FIXME: http://www.cmake.org/Bug/view.php?id=12998 #add_target_compile_flags(ddraw "/FIwine/typeof.h") set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/FIwine/typeof.h") endif() +add_library(ddraw SHARED ${SOURCE} ddraw.rc) set_module_type(ddraw win32dll) - -target_link_libraries(ddraw - wine - uuid - dxguid - ${PSEH_LIB}) - -add_importlibs(ddraw - advapi32 - gdi32 - ole32 - user32 - wined3d - msvcrt - kernel32 - ntdll) - +target_link_libraries(ddraw wine uuid dxguid ${PSEH_LIB}) +add_importlibs(ddraw advapi32 gdi32 ole32 user32 wined3d msvcrt kernel32 ntdll) add_dependencies(ddraw wineheaders) add_pch(ddraw ddraw_private.h) add_cd_file(TARGET ddraw DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/ddraw/ddraw.c b/dll/directx/wine/ddraw/ddraw.c index 337aab0f5de..3f903771047 100644 --- a/dll/directx/wine/ddraw/ddraw.c +++ b/dll/directx/wine/ddraw/ddraw.c @@ -4,6 +4,7 @@ * Copyright 2000-2001 TransGaming Technologies Inc. * Copyright 2006 Stefan Dösinger * Copyright 2008 Denver Gingerich + * Copyright 2007-2008, 2011, 2013 Stefan Dösinger for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -366,7 +367,7 @@ void ddraw_destroy_swapchain(struct ddraw *ddraw) wined3d_swapchain_decref(ddraw->wined3d_swapchain); ddraw->wined3d_swapchain = NULL; - if (DefaultSurfaceType == DDRAW_SURFACE_TYPE_OPENGL) + if (!(ddraw->flags & DDRAW_NO3D)) { UINT i; @@ -392,7 +393,7 @@ void ddraw_destroy_swapchain(struct ddraw *ddraw) } } - ddraw->d3d_initialized = FALSE; + ddraw->flags &= ~DDRAW_D3D_INITIALIZED; } else { @@ -586,11 +587,11 @@ static HRESULT ddraw_attach_d3d_device(struct ddraw *ddraw, /* Set this NOW, otherwise creating the depth stencil surface will cause a * recursive loop until ram or emulated video memory is full. */ - ddraw->d3d_initialized = TRUE; + ddraw->flags |= DDRAW_D3D_INITIALIZED; hr = wined3d_device_init_3d(ddraw->wined3d_device, swapchain_desc); if (FAILED(hr)) { - ddraw->d3d_initialized = FALSE; + ddraw->flags &= ~DDRAW_D3D_INITIALIZED; return hr; } @@ -629,7 +630,7 @@ static HRESULT ddraw_create_swapchain(struct ddraw *ddraw, HWND window, BOOL win swapchain_desc.device_window = window; swapchain_desc.windowed = windowed; - if (DefaultSurfaceType == DDRAW_SURFACE_TYPE_OPENGL) + if (!(ddraw->flags & DDRAW_NO3D)) hr = ddraw_attach_d3d_device(ddraw, &swapchain_desc); else hr = wined3d_device_init_gdi(ddraw->wined3d_device, &swapchain_desc); @@ -652,6 +653,75 @@ static HRESULT ddraw_create_swapchain(struct ddraw *ddraw, HWND window, BOOL win return DD_OK; } +/***************************************************************************** + * IDirectDraw7::RestoreDisplayMode + * + * Restores the display mode to what it was at creation time. Basically. + * + * Returns + * DD_OK on success + * DDERR_NOEXCLUSIVE mode if the device isn't in fullscreen mode + * + *****************************************************************************/ +static HRESULT WINAPI ddraw7_RestoreDisplayMode(IDirectDraw7 *iface) +{ + struct ddraw *ddraw = impl_from_IDirectDraw7(iface); + HRESULT hr; + + TRACE("iface %p.\n", iface); + + wined3d_mutex_lock(); + + if (!(ddraw->flags & DDRAW_RESTORE_MODE)) + { + wined3d_mutex_unlock(); + return DD_OK; + } + + if (exclusive_ddraw && exclusive_ddraw != ddraw) + { + wined3d_mutex_unlock(); + return DDERR_NOEXCLUSIVEMODE; + } + + if (SUCCEEDED(hr = wined3d_set_adapter_display_mode(ddraw->wined3d, WINED3DADAPTER_DEFAULT, &original_mode))) + { + ddraw->flags &= ~DDRAW_RESTORE_MODE; + restore_mode = FALSE; + } + + wined3d_mutex_unlock(); + + return hr; +} + +static HRESULT WINAPI ddraw4_RestoreDisplayMode(IDirectDraw4 *iface) +{ + struct ddraw *ddraw = impl_from_IDirectDraw4(iface); + + TRACE("iface %p.\n", iface); + + return ddraw7_RestoreDisplayMode(&ddraw->IDirectDraw7_iface); +} + +static HRESULT WINAPI ddraw2_RestoreDisplayMode(IDirectDraw2 *iface) +{ + struct ddraw *ddraw = impl_from_IDirectDraw2(iface); + + TRACE("iface %p.\n", iface); + + return ddraw7_RestoreDisplayMode(&ddraw->IDirectDraw7_iface); +} + +static HRESULT WINAPI ddraw1_RestoreDisplayMode(IDirectDraw *iface) +{ + struct ddraw *ddraw = impl_from_IDirectDraw(iface); + + TRACE("iface %p.\n", iface); + + return ddraw7_RestoreDisplayMode(&ddraw->IDirectDraw7_iface); +} + /***************************************************************************** * IDirectDraw7::SetCooperativeLevel * @@ -668,23 +738,21 @@ static HRESULT ddraw_create_swapchain(struct ddraw *ddraw, HWND window, BOOL win * fixme, be sure to run again with a +ddraw trace. * * What is known about cooperative levels (See the ddraw modes test): - * DDSCL_EXCLUSIVE and DDSCL_FULLSCREEN must be used with each other - * DDSCL_NORMAL is not compatible with DDSCL_EXCLUSIVE or DDSCL_FULLSCREEN + * DDSCL_EXCLUSIVE requires DDSCL_FULLSCREEN. + * DDSCL_NORMAL is not compatible with DDSCL_EXCLUSIVE. + * Unlike what msdn claims, DDSCL_NORMAL | DDSCL_FULLSCREEN is allowed. * DDSCL_SETFOCUSWINDOW can be passed only in DDSCL_NORMAL mode, but after that - * DDSCL_FULLSCREEN can be activated - * DDSCL_SETFOCUSWINDOW may only be used with DDSCL_NOWINDOWCHANGES + * DDSCL_EXCLUSIVE can be activated. + * DDSCL_SETFOCUSWINDOW may only be used with DDSCL_NOWINDOWCHANGES or + * DDSCL_CREATEDEVICEWINDOW. * * Handled flags: DDSCL_NORMAL, DDSCL_FULLSCREEN, DDSCL_EXCLUSIVE, + * DDSCL_CREATEDEVICEWINDOW, DDSCL_SETDEVICEWINDOW * DDSCL_SETFOCUSWINDOW (partially), * DDSCL_MULTITHREADED (work in progress) + * DDSCL_FPUPRESERVE (see device.c) * - * Unhandled flags, which should be implemented - * DDSCL_SETDEVICEWINDOW: Sets a window specially used for rendering (I don't - * expect any difference to a normal window for wine) - * DDSCL_CREATEDEVICEWINDOW: Tells ddraw to create its own window for - * rendering (Possible test case: Half-Life) - * - * Unsure about these: DDSCL_FPUSETUP DDSCL_FPURESERVE + * Unsure about this: DDSCL_FPUSETUP * * These don't seem very important for wine: * DDSCL_ALLOWREBOOT, DDSCL_NOWINDOWCHANGES, DDSCL_ALLOWMODEX @@ -696,15 +764,16 @@ static HRESULT ddraw_create_swapchain(struct ddraw *ddraw, HWND window, BOOL win * (Probably others too, have to investigate) * *****************************************************************************/ -static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND window, DWORD cooplevel) +static HRESULT ddraw_set_cooperative_level(struct ddraw *ddraw, HWND window, + DWORD cooplevel, BOOL restore_mode_on_normal) { - struct ddraw *This = impl_from_IDirectDraw7(iface); struct wined3d_surface *rt = NULL, *ds = NULL; struct wined3d_stateblock *stateblock; BOOL restore_state = FALSE; HRESULT hr; - TRACE("iface %p, window %p, flags %#x.\n", iface, window, cooplevel); + TRACE("ddraw %p, window %p, flags %#x, restore_mode_on_normal %x.\n", ddraw, window, cooplevel, + restore_mode_on_normal); DDRAW_dump_cooperativelevel(cooplevel); wined3d_mutex_lock(); @@ -745,7 +814,7 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND windo return DDERR_INVALIDPARAMS; } - hr = ddraw_set_focus_window(This, window); + hr = ddraw_set_focus_window(ddraw, window); wined3d_mutex_unlock(); return hr; } @@ -763,7 +832,7 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND windo { HWND device_window; - if (!This->focuswindow && !(cooplevel & DDSCL_SETFOCUSWINDOW)) + if (!ddraw->focuswindow && !(cooplevel & DDSCL_SETFOCUSWINDOW)) { WARN("No focus window set.\n"); wined3d_mutex_unlock(); @@ -785,8 +854,8 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND windo /* Native apparently leaks the created device window if setting the * focus window below fails. */ - This->cooperative_level |= DDSCL_CREATEDEVICEWINDOW; - This->devicewindow = device_window; + ddraw->cooperative_level |= DDSCL_CREATEDEVICEWINDOW; + ddraw->devicewindow = device_window; if (cooplevel & DDSCL_SETFOCUSWINDOW) { @@ -796,7 +865,7 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND windo return DDERR_NOHWND; } - if (FAILED(hr = ddraw_set_focus_window(This, window))) + if (FAILED(hr = ddraw_set_focus_window(ddraw, window))) { wined3d_mutex_unlock(); return hr; @@ -808,35 +877,94 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND windo } else { - if (This->cooperative_level & DDSCL_CREATEDEVICEWINDOW) - DestroyWindow(This->devicewindow); - This->devicewindow = NULL; - This->focuswindow = NULL; + if (ddraw->cooperative_level & DDSCL_CREATEDEVICEWINDOW) + DestroyWindow(ddraw->devicewindow); + ddraw->devicewindow = NULL; + ddraw->focuswindow = NULL; } - if ((This->cooperative_level & DDSCL_EXCLUSIVE) - && (window != This->dest_window || !(cooplevel & DDSCL_EXCLUSIVE))) - wined3d_device_release_focus_window(This->wined3d_device); - - if ((cooplevel & DDSCL_FULLSCREEN) != (This->cooperative_level & DDSCL_FULLSCREEN) || window != This->dest_window) + if ((cooplevel & DDSCL_FULLSCREEN) != (ddraw->cooperative_level & DDSCL_FULLSCREEN) || window != ddraw->dest_window) { - if (This->cooperative_level & DDSCL_FULLSCREEN) - wined3d_device_restore_fullscreen_window(This->wined3d_device, This->dest_window); + if (ddraw->cooperative_level & DDSCL_FULLSCREEN) + wined3d_device_restore_fullscreen_window(ddraw->wined3d_device, ddraw->dest_window); if (cooplevel & DDSCL_FULLSCREEN) { struct wined3d_display_mode display_mode; - wined3d_get_adapter_display_mode(This->wined3d, WINED3DADAPTER_DEFAULT, &display_mode, NULL); - wined3d_device_setup_fullscreen_window(This->wined3d_device, window, + wined3d_get_adapter_display_mode(ddraw->wined3d, WINED3DADAPTER_DEFAULT, &display_mode, NULL); + wined3d_device_setup_fullscreen_window(ddraw->wined3d_device, window, display_mode.width, display_mode.height); } } - if ((cooplevel & DDSCL_EXCLUSIVE) - && (window != This->dest_window || !(This->cooperative_level & DDSCL_EXCLUSIVE))) + if (cooplevel & DDSCL_MULTITHREADED && !(ddraw->cooperative_level & DDSCL_MULTITHREADED)) + wined3d_device_set_multithreaded(ddraw->wined3d_device); + + if (ddraw->wined3d_swapchain) { - hr = wined3d_device_acquire_focus_window(This->wined3d_device, window); + if (!(ddraw->flags & DDRAW_NO3D)) + { + restore_state = TRUE; + + if (FAILED(hr = wined3d_stateblock_create(ddraw->wined3d_device, WINED3D_SBT_ALL, &stateblock))) + { + ERR("Failed to create stateblock, hr %#x.\n", hr); + wined3d_mutex_unlock(); + return hr; + } + + wined3d_stateblock_capture(stateblock); + rt = wined3d_device_get_render_target(ddraw->wined3d_device, 0); + if (rt == ddraw->wined3d_frontbuffer) + rt = NULL; + else if (rt) + wined3d_surface_incref(rt); + + if ((ds = wined3d_device_get_depth_stencil(ddraw->wined3d_device))) + wined3d_surface_incref(ds); + } + + ddraw_destroy_swapchain(ddraw); + } + + if (FAILED(hr = ddraw_create_swapchain(ddraw, window, !(cooplevel & DDSCL_FULLSCREEN)))) + ERR("Failed to create swapchain, hr %#x.\n", hr); + + if (restore_state) + { + if (ds) + { + wined3d_device_set_depth_stencil(ddraw->wined3d_device, ds); + wined3d_surface_decref(ds); + } + + if (rt) + { + wined3d_device_set_render_target(ddraw->wined3d_device, 0, rt, FALSE); + wined3d_surface_decref(rt); + } + + wined3d_stateblock_apply(stateblock); + wined3d_stateblock_decref(stateblock); + } + + if (!(cooplevel & DDSCL_EXCLUSIVE) && (ddraw->cooperative_level & DDSCL_EXCLUSIVE) + && restore_mode_on_normal) + { + hr = ddraw7_RestoreDisplayMode(&ddraw->IDirectDraw7_iface); + if (FAILED(hr)) + ERR("RestoreDisplayMode failed\n"); + } + + if ((ddraw->cooperative_level & DDSCL_EXCLUSIVE) + && (window != ddraw->dest_window || !(cooplevel & DDSCL_EXCLUSIVE))) + wined3d_device_release_focus_window(ddraw->wined3d_device); + + if ((cooplevel & DDSCL_EXCLUSIVE) + && (window != ddraw->dest_window || !(ddraw->cooperative_level & DDSCL_EXCLUSIVE))) + { + hr = wined3d_device_acquire_focus_window(ddraw->wined3d_device, window); if (FAILED(hr)) { ERR("Failed to acquire focus window, hr %#x.\n", hr); @@ -845,86 +973,45 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND windo } } - if (cooplevel & DDSCL_MULTITHREADED && !(This->cooperative_level & DDSCL_MULTITHREADED)) - wined3d_device_set_multithreaded(This->wined3d_device); - - if (This->wined3d_swapchain) - { - if (DefaultSurfaceType != DDRAW_SURFACE_TYPE_GDI) - { - restore_state = TRUE; - - if (FAILED(hr = wined3d_stateblock_create(This->wined3d_device, WINED3D_SBT_ALL, &stateblock))) - { - ERR("Failed to create stateblock, hr %#x.\n", hr); - wined3d_mutex_unlock(); - return hr; - } - - wined3d_stateblock_capture(stateblock); - rt = wined3d_device_get_render_target(This->wined3d_device, 0); - if (rt == This->wined3d_frontbuffer) - rt = NULL; - else if (rt) - wined3d_surface_incref(rt); - - if ((ds = wined3d_device_get_depth_stencil(This->wined3d_device))) - wined3d_surface_incref(ds); - } - - ddraw_destroy_swapchain(This); - } - - if (FAILED(hr = ddraw_create_swapchain(This, window, !(cooplevel & DDSCL_FULLSCREEN)))) - ERR("Failed to create swapchain, hr %#x.\n", hr); - - if (restore_state) - { - if (ds) - { - wined3d_device_set_depth_stencil(This->wined3d_device, ds); - wined3d_surface_decref(ds); - } - - if (rt) - { - wined3d_device_set_render_target(This->wined3d_device, 0, rt, FALSE); - wined3d_surface_decref(rt); - } - - wined3d_stateblock_apply(stateblock); - wined3d_stateblock_decref(stateblock); - } - /* Unhandled flags */ - if(cooplevel & DDSCL_ALLOWREBOOT) - WARN("(%p) Unhandled flag DDSCL_ALLOWREBOOT, harmless\n", This); - if(cooplevel & DDSCL_ALLOWMODEX) - WARN("(%p) Unhandled flag DDSCL_ALLOWMODEX, harmless\n", This); - if(cooplevel & DDSCL_FPUSETUP) - WARN("(%p) Unhandled flag DDSCL_FPUSETUP, harmless\n", This); + if (cooplevel & DDSCL_ALLOWREBOOT) + WARN("Unhandled flag DDSCL_ALLOWREBOOT, harmless\n"); + if (cooplevel & DDSCL_ALLOWMODEX) + WARN("Unhandled flag DDSCL_ALLOWMODEX, harmless\n"); + if (cooplevel & DDSCL_FPUSETUP) + WARN("Unhandled flag DDSCL_FPUSETUP, harmless\n"); if (cooplevel & DDSCL_EXCLUSIVE) - exclusive_ddraw = This; - else if (exclusive_ddraw == This) + exclusive_ddraw = ddraw; + else if (exclusive_ddraw == ddraw) exclusive_ddraw = NULL; /* Store the cooperative_level */ - This->cooperative_level = cooplevel; - This->dest_window = window; + ddraw->cooperative_level = cooplevel; + ddraw->dest_window = window; + TRACE("SetCooperativeLevel retuning DD_OK\n"); wined3d_mutex_unlock(); return DD_OK; } +static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND window, DWORD flags) +{ + struct ddraw *ddraw = impl_from_IDirectDraw7(iface); + + TRACE("iface %p, window %p, flags %#x.\n", iface, window, flags); + + return ddraw_set_cooperative_level(ddraw, window, flags, !(ddraw->flags & DDRAW_SCL_DDRAW1)); +} + static HRESULT WINAPI ddraw4_SetCooperativeLevel(IDirectDraw4 *iface, HWND window, DWORD flags) { struct ddraw *ddraw = impl_from_IDirectDraw4(iface); TRACE("iface %p, window %p, flags %#x.\n", iface, window, flags); - return ddraw7_SetCooperativeLevel(&ddraw->IDirectDraw7_iface, window, flags); + return ddraw_set_cooperative_level(ddraw, window, flags, !(ddraw->flags & DDRAW_SCL_DDRAW1)); } static HRESULT WINAPI ddraw2_SetCooperativeLevel(IDirectDraw2 *iface, HWND window, DWORD flags) @@ -933,16 +1020,20 @@ static HRESULT WINAPI ddraw2_SetCooperativeLevel(IDirectDraw2 *iface, HWND windo TRACE("iface %p, window %p, flags %#x.\n", iface, window, flags); - return ddraw7_SetCooperativeLevel(&ddraw->IDirectDraw7_iface, window, flags); + return ddraw_set_cooperative_level(ddraw, window, flags, !(ddraw->flags & DDRAW_SCL_DDRAW1)); } static HRESULT WINAPI ddraw1_SetCooperativeLevel(IDirectDraw *iface, HWND window, DWORD flags) { struct ddraw *ddraw = impl_from_IDirectDraw(iface); + HRESULT hr; TRACE("iface %p, window %p, flags %#x.\n", iface, window, flags); - return ddraw7_SetCooperativeLevel(&ddraw->IDirectDraw7_iface, window, flags); + hr = ddraw_set_cooperative_level(ddraw, window, flags, FALSE); + if (SUCCEEDED(hr)) + ddraw->flags |= DDRAW_SCL_DDRAW1; + return hr; } /***************************************************************************** @@ -1025,7 +1116,7 @@ static HRESULT WINAPI ddraw7_SetDisplayMode(IDirectDraw7 *iface, DWORD width, DW /* TODO: Lose the primary surface. */ if (SUCCEEDED(hr = wined3d_set_adapter_display_mode(ddraw->wined3d, WINED3DADAPTER_DEFAULT, &mode))) { - ddraw->restore_mode = TRUE; + ddraw->flags |= DDRAW_RESTORE_MODE; restore_mode = TRUE; } @@ -1069,75 +1160,6 @@ static HRESULT WINAPI ddraw1_SetDisplayMode(IDirectDraw *iface, DWORD width, DWO return ddraw7_SetDisplayMode(&ddraw->IDirectDraw7_iface, width, height, bpp, 0, 0); } -/***************************************************************************** - * IDirectDraw7::RestoreDisplayMode - * - * Restores the display mode to what it was at creation time. Basically. - * - * Returns - * DD_OK on success - * DDERR_NOEXCLUSIVE mode if the device isn't in fullscreen mode - * - *****************************************************************************/ -static HRESULT WINAPI ddraw7_RestoreDisplayMode(IDirectDraw7 *iface) -{ - struct ddraw *ddraw = impl_from_IDirectDraw7(iface); - HRESULT hr; - - TRACE("iface %p.\n", iface); - - wined3d_mutex_lock(); - - if (!ddraw->restore_mode) - { - wined3d_mutex_unlock(); - return DD_OK; - } - - if (exclusive_ddraw && exclusive_ddraw != ddraw) - { - wined3d_mutex_unlock(); - return DDERR_NOEXCLUSIVEMODE; - } - - if (SUCCEEDED(hr = wined3d_set_adapter_display_mode(ddraw->wined3d, WINED3DADAPTER_DEFAULT, &original_mode))) - { - ddraw->restore_mode = FALSE; - restore_mode = FALSE; - } - - wined3d_mutex_unlock(); - - return hr; -} - -static HRESULT WINAPI ddraw4_RestoreDisplayMode(IDirectDraw4 *iface) -{ - struct ddraw *ddraw = impl_from_IDirectDraw4(iface); - - TRACE("iface %p.\n", iface); - - return ddraw7_RestoreDisplayMode(&ddraw->IDirectDraw7_iface); -} - -static HRESULT WINAPI ddraw2_RestoreDisplayMode(IDirectDraw2 *iface) -{ - struct ddraw *ddraw = impl_from_IDirectDraw2(iface); - - TRACE("iface %p.\n", iface); - - return ddraw7_RestoreDisplayMode(&ddraw->IDirectDraw7_iface); -} - -static HRESULT WINAPI ddraw1_RestoreDisplayMode(IDirectDraw *iface) -{ - struct ddraw *ddraw = impl_from_IDirectDraw(iface); - - TRACE("iface %p.\n", iface); - - return ddraw7_RestoreDisplayMode(&ddraw->IDirectDraw7_iface); -} - /***************************************************************************** * IDirectDraw7::GetCaps * @@ -1206,18 +1228,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD caps.dwSSBCKeyCaps = winecaps.ddraw_caps.ssb_color_key_caps; caps.dwSSBFXCaps = winecaps.ddraw_caps.ssb_fx_caps; - /* Even if wined3d supports 3D rendering, remove the cap if ddraw is - * configured not to use it. */ - if (DefaultSurfaceType == DDRAW_SURFACE_TYPE_GDI) - { - caps.dwCaps &= ~DDCAPS_3D; - caps.ddsCaps.dwCaps &= ~(DDSCAPS_3DDEVICE | DDSCAPS_MIPMAP | DDSCAPS_TEXTURE | DDSCAPS_ZBUFFER); - } - if (winecaps.ddraw_caps.stride_align) - { - caps.dwCaps |= DDCAPS_ALIGNSTRIDE; - caps.dwAlignStrideAlign = winecaps.ddraw_caps.stride_align; - } + caps.dwCaps |= DDCAPS_ALIGNSTRIDE; + caps.dwAlignStrideAlign = DDRAW_STRIDE_ALIGNMENT; if(DriverCaps) { @@ -1360,7 +1372,7 @@ static HRESULT WINAPI ddraw7_GetDisplayMode(IDirectDraw7 *iface, DDSURFACEDESC2 DDSD->u2.dwRefreshRate = 60; DDSD->ddsCaps.dwCaps = 0; DDSD->u4.ddpfPixelFormat.dwSize = sizeof(DDSD->u4.ddpfPixelFormat); - PixelFormat_WineD3DtoDD(&DDSD->u4.ddpfPixelFormat, mode.format_id); + ddrawformat_from_wined3dformat(&DDSD->u4.ddpfPixelFormat, mode.format_id); DDSD->u1.lPitch = mode.width * DDSD->u4.ddpfPixelFormat.u1.dwRGBBitCount / 8; if(TRACE_ON(ddraw)) @@ -1687,7 +1699,7 @@ static HRESULT WINAPI ddraw7_Initialize(IDirectDraw7 *iface, GUID *guid) TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid)); - if (ddraw->initialized) + if (ddraw->flags & DDRAW_INITIALIZED) return DDERR_ALREADYINITIALIZED; /* FIXME: To properly take the GUID into account we should call @@ -1695,7 +1707,7 @@ static HRESULT WINAPI ddraw7_Initialize(IDirectDraw7 *iface, GUID *guid) if (guid) FIXME("Ignoring guid %s.\n", debugstr_guid(guid)); - ddraw->initialized = TRUE; + ddraw->flags |= DDRAW_INITIALIZED; return DD_OK; } @@ -2069,7 +2081,7 @@ static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags, struct wined3d_display_mode mode; unsigned int modenum, fmt; DDSURFACEDESC2 callback_sd; - unsigned enum_mode_count = 0, enum_mode_array_size = 0; + unsigned enum_mode_count = 0, enum_mode_array_size = 16; DDPIXELFORMAT pixelformat; static const enum wined3d_format_id checkFormatList[] = @@ -2085,18 +2097,10 @@ static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags, if (!cb) return DDERR_INVALIDPARAMS; + enum_modes = HeapAlloc(GetProcessHeap(), 0, sizeof(*enum_modes) * enum_mode_array_size); + if (!enum_modes) return DDERR_OUTOFMEMORY; + wined3d_mutex_lock(); - if(!(Flags & DDEDM_REFRESHRATES)) - { - enum_mode_array_size = 16; - enum_modes = HeapAlloc(GetProcessHeap(), 0, sizeof(*enum_modes) * enum_mode_array_size); - if (!enum_modes) - { - ERR("Out of memory\n"); - wined3d_mutex_unlock(); - return DDERR_OUTOFMEMORY; - } - } pixelformat.dwSize = sizeof(pixelformat); for(fmt = 0; fmt < (sizeof(checkFormatList) / sizeof(checkFormatList[0])); fmt++) @@ -2105,7 +2109,10 @@ static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags, while (wined3d_enum_adapter_modes(ddraw->wined3d, WINED3DADAPTER_DEFAULT, checkFormatList[fmt], WINED3D_SCANLINE_ORDERING_UNKNOWN, modenum++, &mode) == WINED3D_OK) { - PixelFormat_WineD3DtoDD(&pixelformat, mode.format_id); + BOOL found = FALSE; + unsigned i; + + ddrawformat_from_wined3dformat(&pixelformat, mode.format_id); if (DDSD) { if (DDSD->dwFlags & DDSD_WIDTH && mode.width != DDSD->dwWidth) @@ -2119,27 +2126,18 @@ static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags, continue; } - if(!(Flags & DDEDM_REFRESHRATES)) + /* DX docs state EnumDisplayMode should return only unique modes */ + for (i = 0; i < enum_mode_count; i++) { - /* DX docs state EnumDisplayMode should return only unique modes. If DDEDM_REFRESHRATES is not set, refresh - * rate doesn't matter when determining if the mode is unique. So modes only differing in refresh rate have - * to be reduced to a single unique result in such case. - */ - BOOL found = FALSE; - unsigned i; - - for (i = 0; i < enum_mode_count; i++) + if (enum_modes[i].width == mode.width && enum_modes[i].height == mode.height + && enum_modes[i].format_id == mode.format_id + && (enum_modes[i].refresh_rate == mode.refresh_rate || !(Flags & DDEDM_REFRESHRATES))) { - if (enum_modes[i].width == mode.width && enum_modes[i].height == mode.height - && enum_modes[i].format_id == mode.format_id) - { - found = TRUE; - break; - } + found = TRUE; + break; } - - if(found) continue; } + if(found) continue; memset(&callback_sd, 0, sizeof(callback_sd)); callback_sd.dwSize = sizeof(callback_sd); @@ -2169,28 +2167,23 @@ static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags, return DD_OK; } - if(!(Flags & DDEDM_REFRESHRATES)) + if (enum_mode_count == enum_mode_array_size) { - if (enum_mode_count == enum_mode_array_size) + struct wined3d_display_mode *new_enum_modes; + + enum_mode_array_size *= 2; + new_enum_modes = HeapReAlloc(GetProcessHeap(), 0, enum_modes, + sizeof(*new_enum_modes) * enum_mode_array_size); + if (!new_enum_modes) { - struct wined3d_display_mode *new_enum_modes; - - enum_mode_array_size *= 2; - new_enum_modes = HeapReAlloc(GetProcessHeap(), 0, enum_modes, - sizeof(*new_enum_modes) * enum_mode_array_size); - if (!new_enum_modes) - { - ERR("Out of memory\n"); - HeapFree(GetProcessHeap(), 0, enum_modes); - wined3d_mutex_unlock(); - return DDERR_OUTOFMEMORY; - } - - enum_modes = new_enum_modes; + HeapFree(GetProcessHeap(), 0, enum_modes); + wined3d_mutex_unlock(); + return DDERR_OUTOFMEMORY; } - enum_modes[enum_mode_count++] = mode; + enum_modes = new_enum_modes; } + enum_modes[enum_mode_count++] = mode; } } @@ -2475,22 +2468,22 @@ static HRESULT WINAPI ddraw7_StartModeTest(IDirectDraw7 *iface, SIZE *Modes, DWO * DD_OK on success * *****************************************************************************/ -static HRESULT ddraw_create_surface(struct ddraw *ddraw, DDSURFACEDESC2 *pDDSD, - struct ddraw_surface **surface, UINT version) +static HRESULT ddraw_create_surface(struct ddraw *ddraw, DDSURFACEDESC2 *desc, + DWORD flags, struct ddraw_surface **surface, UINT version) { HRESULT hr; - TRACE("ddraw %p, surface_desc %p, surface %p.\n", ddraw, pDDSD, surface); + TRACE("ddraw %p, desc %p, flags %#x, surface %p.\n", ddraw, desc, flags, surface); if (TRACE_ON(ddraw)) { TRACE("Requesting surface desc:\n"); - DDRAW_dump_surface_desc(pDDSD); + DDRAW_dump_surface_desc(desc); } - if ((pDDSD->ddsCaps.dwCaps & DDSCAPS_3DDEVICE) && DefaultSurfaceType != DDRAW_SURFACE_TYPE_OPENGL) + if ((desc->ddsCaps.dwCaps & DDSCAPS_3DDEVICE) && (ddraw->flags & DDRAW_NO3D)) { - WARN("The application requests a 3D capable surface, but a non-OpenGL surface type was set in the registry.\n"); + WARN("The application requests a 3D capable surface, but the ddraw object was created without 3D support.\n"); /* Do not fail surface creation, only fail 3D device creation. */ } @@ -2502,7 +2495,7 @@ static HRESULT ddraw_create_surface(struct ddraw *ddraw, DDSURFACEDESC2 *pDDSD, return DDERR_OUTOFVIDEOMEMORY; } - if (FAILED(hr = ddraw_surface_init(*surface, ddraw, pDDSD, version))) + if (FAILED(hr = ddraw_surface_init(*surface, ddraw, desc, flags, version))) { WARN("Failed to initialize surface, hr %#x.\n", hr); HeapFree(GetProcessHeap(), 0, *surface); @@ -2607,6 +2600,12 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD, HRESULT hr; DDSURFACEDESC2 desc2; const DWORD sysvidmem = DDSCAPS_VIDEOMEMORY | DDSCAPS_SYSTEMMEMORY; + /* Some applications assume surfaces will always be mapped at the same + * address. Some of those also assume that this address is valid even when + * the surface isn't mapped, and that updates done this way will be + * visible on the screen. The game Nox is such an application, + * Commandos: Behind Enemy Lines is another. */ + const DWORD flags = WINED3D_SURFACE_MAPPABLE | WINED3D_SURFACE_PIN_SYSMEM; TRACE("ddraw %p, surface_desc %p, surface %p, outer_unknown %p.\n", ddraw, DDSD, surface, UnkOuter); @@ -2715,7 +2714,7 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD, desc2.dwFlags |= DDSD_PIXELFORMAT; desc2.u4.ddpfPixelFormat.dwSize=sizeof(DDPIXELFORMAT); - PixelFormat_WineD3DtoDD(&desc2.u4.ddpfPixelFormat, mode.format_id); + ddrawformat_from_wined3dformat(&desc2.u4.ddpfPixelFormat, mode.format_id); } /* No Width or no Height? Use the original screen size @@ -2808,7 +2807,7 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD, } /* Create the first surface */ - if (FAILED(hr = ddraw_create_surface(ddraw, &desc2, &object, version))) + if (FAILED(hr = ddraw_create_surface(ddraw, &desc2, flags, &object, version))) { WARN("ddraw_create_surface failed, hr %#x.\n", hr); return hr; @@ -2835,7 +2834,7 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD, { struct ddraw_surface *object2 = NULL; - if (FAILED(hr = ddraw_create_surface(ddraw, &desc2, &object2, version))) + if (FAILED(hr = ddraw_create_surface(ddraw, &desc2, flags, &object2, version))) { if (version == 7) IDirectDrawSurface7_Release(&object->IDirectDrawSurface7_iface); @@ -2864,7 +2863,7 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD, /* Create a WineD3DTexture if a texture was requested */ if (desc2.ddsCaps.dwCaps & DDSCAPS_TEXTURE) - ddraw_surface_create_texture(object); + ddraw_surface_create_texture(object, flags); return hr; } @@ -4426,7 +4425,7 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device memset(&pformat, 0, sizeof(pformat)); pformat.dwSize = sizeof(pformat); - PixelFormat_WineD3DtoDD(&pformat, formats[i]); + ddrawformat_from_wined3dformat(&pformat, formats[i]); TRACE("Enumerating wined3d format %#x.\n", formats[i]); hr = callback(&pformat, context); @@ -4492,7 +4491,7 @@ static HRESULT WINAPI d3d7_EvictManagedTextures(IDirect3D7 *iface) TRACE("iface %p!\n", iface); wined3d_mutex_lock(); - if (ddraw->d3d_initialized) + if (ddraw->flags & DDRAW_D3D_INITIALIZED) wined3d_device_evict_managed_resources(ddraw->wined3d_device); wined3d_mutex_unlock(); @@ -5120,8 +5119,8 @@ static void CDECL device_parent_mode_changed(struct wined3d_device_parent *devic } static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_parent *device_parent, - void *container_parent, UINT width, UINT height, enum wined3d_format_id format, DWORD usage, - enum wined3d_pool pool, UINT sub_resource_idx, struct wined3d_surface **surface) + void *container_parent, const struct wined3d_resource_desc *wined3d_desc, UINT sub_resource_idx, + DWORD flags, struct wined3d_surface **surface) { struct ddraw *ddraw = ddraw_from_device_parent(device_parent); struct ddraw_surface *tex_root = container_parent; @@ -5129,9 +5128,8 @@ static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_ struct ddraw_surface *ddraw_surface; HRESULT hr; - TRACE("device_parent %p, container_parent %p, width %u, height %u, format %#x, usage %#x,\n" - "\tpool %#x, sub_resource_idx %u, surface %p.\n", - device_parent, container_parent, width, height, format, usage, pool, sub_resource_idx, surface); + TRACE("device_parent %p, container_parent %p, wined3d_desc %p, sub_resource_idx %u, flags %#x, surface %p.\n", + device_parent, container_parent, wined3d_desc, sub_resource_idx, flags, surface); /* The ddraw root surface is created before the wined3d texture. */ if (!sub_resource_idx) @@ -5140,11 +5138,11 @@ static HRESULT CDECL device_parent_create_texture_surface(struct wined3d_device_ goto done; } - desc.dwWidth = width; - desc.dwHeight = height; + desc.dwWidth = wined3d_desc->width; + desc.dwHeight = wined3d_desc->height; /* FIXME: Validate that format, usage, pool, etc. really make sense. */ - if (FAILED(hr = ddraw_create_surface(ddraw, &desc, &ddraw_surface, tex_root->version))) + if (FAILED(hr = ddraw_create_surface(ddraw, &desc, flags, &ddraw_surface, tex_root->version))) return hr; done: @@ -5166,16 +5164,13 @@ static const struct wined3d_parent_ops ddraw_frontbuffer_parent_ops = }; static HRESULT CDECL device_parent_create_swapchain_surface(struct wined3d_device_parent *device_parent, - void *container_parent, UINT width, UINT height, enum wined3d_format_id format_id, DWORD usage, - enum wined3d_multisample_type multisample_type, DWORD multisample_quality, struct wined3d_surface **surface) + void *container_parent, const struct wined3d_resource_desc *desc, struct wined3d_surface **surface) { struct ddraw *ddraw = ddraw_from_device_parent(device_parent); HRESULT hr; - TRACE("device_parent %p, container_parent %p, width %u, height %u, format_id %#x, usage %#x,\n" - "\tmultisample_type %#x, multisample_quality %u, surface %p.\n", - device_parent, container_parent, width, height, format_id, usage, - multisample_type, multisample_quality, surface); + TRACE("device_parent %p, container_parent %p, desc %p, surface %p.\n", + device_parent, container_parent, desc, surface); if (ddraw->wined3d_frontbuffer) { @@ -5183,8 +5178,8 @@ static HRESULT CDECL device_parent_create_swapchain_surface(struct wined3d_devic return E_FAIL; } - if (SUCCEEDED(hr = wined3d_surface_create(ddraw->wined3d_device, width, height, format_id, usage, - WINED3D_POOL_DEFAULT, multisample_type, multisample_quality, WINED3D_SURFACE_MAPPABLE, + if (SUCCEEDED(hr = wined3d_surface_create(ddraw->wined3d_device, desc->width, desc->height, desc->format, + desc->usage, desc->pool, desc->multisample_type, desc->multisample_quality, WINED3D_SURFACE_MAPPABLE, ddraw, &ddraw_frontbuffer_parent_ops, surface))) ddraw->wined3d_frontbuffer = *surface; @@ -5192,8 +5187,9 @@ static HRESULT CDECL device_parent_create_swapchain_surface(struct wined3d_devic } static HRESULT CDECL device_parent_create_volume(struct wined3d_device_parent *device_parent, - void *container_parent, UINT width, UINT height, UINT depth, enum wined3d_format_id format, - enum wined3d_pool pool, DWORD usage, struct wined3d_volume **volume) + void *container_parent, UINT width, UINT height, UINT depth, UINT level, + enum wined3d_format_id format, enum wined3d_pool pool, DWORD usage, + struct wined3d_volume **volume) { TRACE("device_parent %p, container_parent %p, width %u, height %u, depth %u, " "format %#x, pool %#x, usage %#x, volume %p.\n", @@ -5238,6 +5234,7 @@ static const struct wined3d_device_parent_ops ddraw_wined3d_device_parent_ops = HRESULT ddraw_init(struct ddraw *ddraw, enum wined3d_device_type device_type) { + WINED3DCAPS caps; DWORD flags; HRESULT hr; @@ -5253,25 +5250,31 @@ HRESULT ddraw_init(struct ddraw *ddraw, enum wined3d_device_type device_type) ddraw->numIfaces = 1; ddraw->ref7 = 1; - flags = WINED3D_LEGACY_DEPTH_BIAS; - if (DefaultSurfaceType != DDRAW_SURFACE_TYPE_OPENGL) - flags |= WINED3D_NO3D; - + flags = WINED3D_LEGACY_DEPTH_BIAS | WINED3D_VIDMEM_ACCOUNTING; if (!(ddraw->wined3d = wined3d_create(7, flags))) { - if ((flags & WINED3D_NO3D) || !(ddraw->wined3d = wined3d_create(7, flags | WINED3D_NO3D))) + if (!(ddraw->wined3d = wined3d_create(7, flags | WINED3D_NO3D))) { WARN("Failed to create a wined3d object.\n"); return E_FAIL; } - - WARN("Created a wined3d object without 3D support.\n"); - DefaultSurfaceType = DDRAW_SURFACE_TYPE_GDI; } - hr = wined3d_device_create(ddraw->wined3d, WINED3DADAPTER_DEFAULT, device_type, - NULL, 0, 8, &ddraw->device_parent, &ddraw->wined3d_device); - if (FAILED(hr)) + if (FAILED(hr = wined3d_get_device_caps(ddraw->wined3d, WINED3DADAPTER_DEFAULT, device_type, &caps))) + { + ERR("Failed to get device caps, hr %#x.\n", hr); + wined3d_decref(ddraw->wined3d); + return E_FAIL; + } + + if (!(caps.ddraw_caps.caps & WINEDDCAPS_3D)) + { + WARN("Created a wined3d object without 3D support.\n"); + ddraw->flags |= DDRAW_NO3D; + } + + if (FAILED(hr = wined3d_device_create(ddraw->wined3d, WINED3DADAPTER_DEFAULT, device_type, + NULL, 0, DDRAW_STRIDE_ALIGNMENT, &ddraw->device_parent, &ddraw->wined3d_device))) { WARN("Failed to create a wined3d device, hr %#x.\n", hr); wined3d_decref(ddraw->wined3d); diff --git a/dll/directx/wine/ddraw/ddraw_private.h b/dll/directx/wine/ddraw/ddraw_private.h index b64e1782479..63b05322b36 100644 --- a/dll/directx/wine/ddraw/ddraw_private.h +++ b/dll/directx/wine/ddraw/ddraw_private.h @@ -30,7 +30,6 @@ #include #include -#include "winuser.h" #include #include @@ -41,14 +40,7 @@ #include #include -enum ddraw_surface_type -{ - DDRAW_SURFACE_TYPE_OPENGL, - DDRAW_SURFACE_TYPE_GDI, -}; - extern const struct wined3d_parent_ops ddraw_null_wined3d_parent_ops DECLSPEC_HIDDEN; -extern enum ddraw_surface_type DefaultSurfaceType DECLSPEC_HIDDEN; extern DWORD force_refresh_rate DECLSPEC_HIDDEN; /***************************************************************************** @@ -60,6 +52,14 @@ struct FvfToDecl struct wined3d_vertex_declaration *decl; }; +#define DDRAW_INITIALIZED 0x00000001 +#define DDRAW_D3D_INITIALIZED 0x00000002 +#define DDRAW_RESTORE_MODE 0x00000004 +#define DDRAW_NO3D 0x00000008 +#define DDRAW_SCL_DDRAW1 0x00000010 + +#define DDRAW_STRIDE_ALIGNMENT 8 + struct ddraw { /* Interfaces */ @@ -75,12 +75,10 @@ struct ddraw /* See comment in IDirectDraw::AddRef */ LONG ref7, ref4, ref2, ref3, ref1, numIfaces; - BOOL initialized; struct wined3d *wined3d; struct wined3d_device *wined3d_device; - BOOL d3d_initialized; - BOOL restore_mode; + DWORD flags; struct ddraw_surface *primary; RECT primary_lock; @@ -187,9 +185,9 @@ struct ddraw_surface DWORD Handle; }; -HRESULT ddraw_surface_create_texture(struct ddraw_surface *surface) DECLSPEC_HIDDEN; +HRESULT ddraw_surface_create_texture(struct ddraw_surface *surface, DWORD surface_flags) DECLSPEC_HIDDEN; HRESULT ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, - DDSURFACEDESC2 *desc, UINT version) DECLSPEC_HIDDEN; + DDSURFACEDESC2 *desc, DWORD flags, UINT version) DECLSPEC_HIDDEN; ULONG ddraw_surface_release_iface(struct ddraw_surface *This) DECLSPEC_HIDDEN; static inline struct ddraw_surface *impl_from_IDirect3DTexture(IDirect3DTexture *iface) @@ -558,8 +556,9 @@ struct d3d_vertex_buffer *unsafe_impl_from_IDirect3DVertexBuffer7(IDirect3DVerte #define GET_TEXCOORD_SIZE_FROM_FVF(d3dvtVertexType, tex_num) \ (((((d3dvtVertexType) >> (16 + (2 * (tex_num)))) + 1) & 0x03) + 1) -void PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat, enum wined3d_format_id WineD3DFormat) DECLSPEC_HIDDEN; -enum wined3d_format_id PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat) DECLSPEC_HIDDEN; +void ddrawformat_from_wined3dformat(DDPIXELFORMAT *ddraw_format, + enum wined3d_format_id wined3d_format) DECLSPEC_HIDDEN; +enum wined3d_format_id wined3dformat_from_ddrawformat(const DDPIXELFORMAT *format) DECLSPEC_HIDDEN; void DDRAW_dump_surface_desc(const DDSURFACEDESC2 *lpddsd) DECLSPEC_HIDDEN; void dump_D3DMATRIX(const D3DMATRIX *mat) DECLSPEC_HIDDEN; void DDRAW_dump_DDCAPS(const DDCAPS *lpcaps) DECLSPEC_HIDDEN; diff --git a/dll/directx/wine/ddraw/device.c b/dll/directx/wine/ddraw/device.c index 7724c8b50c0..8b8006c782d 100644 --- a/dll/directx/wine/ddraw/device.c +++ b/dll/directx/wine/ddraw/device.c @@ -1,7 +1,7 @@ /* * Copyright (c) 1998-2004 Lionel Ulmer * Copyright (c) 2002-2005 Christian Costa - * Copyright (c) 2006-2009, 2011-2012 Stefan Dösinger + * Copyright (c) 2006-2009, 2011-2013 Stefan Dösinger * Copyright (c) 2008 Alexander Dorofeyev * * This library is free software; you can redistribute it and/or @@ -1111,7 +1111,7 @@ static HRESULT d3d_device7_EnumTextureFormats(IDirect3DDevice7 *iface, memset(&pformat, 0, sizeof(pformat)); pformat.dwSize = sizeof(pformat); - PixelFormat_WineD3DtoDD(&pformat, FormatList[i]); + ddrawformat_from_wined3dformat(&pformat, FormatList[i]); TRACE("Enumerating WineD3DFormat %d\n", FormatList[i]); hr = callback(&pformat, context); @@ -1134,7 +1134,7 @@ static HRESULT d3d_device7_EnumTextureFormats(IDirect3DDevice7 *iface, memset(&pformat, 0, sizeof(pformat)); pformat.dwSize = sizeof(pformat); - PixelFormat_WineD3DtoDD(&pformat, BumpFormatList[i]); + ddrawformat_from_wined3dformat(&pformat, BumpFormatList[i]); TRACE("Enumerating WineD3DFormat %d\n", BumpFormatList[i]); hr = callback(&pformat, context); @@ -1242,7 +1242,7 @@ static HRESULT WINAPI d3d_device2_EnumTextureFormats(IDirect3DDevice2 *iface, sdesc.dwFlags = DDSD_PIXELFORMAT | DDSD_CAPS; sdesc.ddsCaps.dwCaps = DDSCAPS_TEXTURE; sdesc.ddpfPixelFormat.dwSize = sizeof(sdesc.ddpfPixelFormat); - PixelFormat_WineD3DtoDD(&sdesc.ddpfPixelFormat, FormatList[i]); + ddrawformat_from_wined3dformat(&sdesc.ddpfPixelFormat, FormatList[i]); TRACE("Enumerating WineD3DFormat %d\n", FormatList[i]); hr = callback(&sdesc, context); @@ -2189,43 +2189,6 @@ static HRESULT WINAPI d3d_device2_Index(IDirect3DDevice2 *iface, WORD index) return d3d_device3_Index(&device->IDirect3DDevice3_iface, index); } -/***************************************************************************** - * IDirect3DDevice3::End - * - * Ends a draw begun with IDirect3DDevice3::Begin or - * IDirect3DDevice::BeginIndexed. The vertices specified with - * IDirect3DDevice::Vertex or IDirect3DDevice::Index are drawn using - * the IDirect3DDevice7::DrawPrimitive method. So far only - * non-indexed mode is supported - * - * Version 2 and 3 - * - * Params: - * Flags: Some flags, as usual. Don't know which are defined - * - * Returns: - * The return value of IDirect3DDevice7::DrawPrimitive - * - *****************************************************************************/ -static HRESULT WINAPI d3d_device3_End(IDirect3DDevice3 *iface, DWORD flags) -{ - struct d3d_device *device = impl_from_IDirect3DDevice3(iface); - - TRACE("iface %p, flags %#x.\n", iface, flags); - - return IDirect3DDevice7_DrawPrimitive(&device->IDirect3DDevice7_iface, device->primitive_type, - device->vertex_type, device->sysmem_vertex_buffer, device->nb_vertices, device->render_flags); -} - -static HRESULT WINAPI d3d_device2_End(IDirect3DDevice2 *iface, DWORD flags) -{ - struct d3d_device *device = impl_from_IDirect3DDevice2(iface); - - TRACE("iface %p, flags %#x.\n", iface, flags); - - return d3d_device3_End(&device->IDirect3DDevice3_iface, flags); -} - /***************************************************************************** * IDirect3DDevice7::GetRenderState * @@ -2463,7 +2426,7 @@ static HRESULT WINAPI d3d_device3_GetRenderState(IDirect3DDevice3 *iface, wined3d_resource_get_desc(sub_resource, &desc); ddfmt.dwSize = sizeof(ddfmt); - PixelFormat_WineD3DtoDD(&ddfmt, desc.format); + ddrawformat_from_wined3dformat(&ddfmt, desc.format); if (ddfmt.u5.dwRGBAlphaBitMask) tex_alpha = TRUE; } } @@ -2482,6 +2445,10 @@ static HRESULT WINAPI d3d_device3_GetRenderState(IDirect3DDevice3 *iface, return D3D_OK; } + case D3DRENDERSTATE_LIGHTING: + *value = 0xffffffff; + return D3D_OK; + default: return IDirect3DDevice7_GetRenderState(&device->IDirect3DDevice7_iface, state, value); } @@ -2752,7 +2719,7 @@ static HRESULT WINAPI d3d_device3_SetRenderState(IDirect3DDevice3 *iface, wined3d_resource_get_desc(sub_resource, &desc); ddfmt.dwSize = sizeof(ddfmt); - PixelFormat_WineD3DtoDD(&ddfmt, desc.format); + ddrawformat_from_wined3dformat(&ddfmt, desc.format); if (ddfmt.u5.dwRGBAlphaBitMask) tex_alpha = TRUE; } } @@ -2837,6 +2804,10 @@ static HRESULT WINAPI d3d_device3_SetRenderState(IDirect3DDevice3 *iface, break; } + case D3DRENDERSTATE_LIGHTING: + hr = D3D_OK; + break; + default: hr = IDirect3DDevice7_SetRenderState(&device->IDirect3DDevice7_iface, state, value); break; @@ -3512,6 +3483,22 @@ static HRESULT WINAPI d3d_device7_DrawPrimitive_FPUPreserve(IDirect3DDevice7 *if return hr; } +static void setup_lighting(const struct d3d_device *device, DWORD fvf, DWORD flags) +{ + BOOL enable; + + /* Ignore the D3DFVF_XYZRHW case here, wined3d takes care of that */ + if (flags & D3DDP_DONOTLIGHT) + enable = FALSE; + else if (!(fvf & D3DFVF_NORMAL)) + enable = FALSE; + else + enable = TRUE; + + wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_LIGHTING, enable); +} + + static HRESULT WINAPI d3d_device3_DrawPrimitive(IDirect3DDevice3 *iface, D3DPRIMITIVETYPE primitive_type, DWORD fvf, void *vertices, DWORD vertex_count, DWORD flags) @@ -3521,6 +3508,8 @@ static HRESULT WINAPI d3d_device3_DrawPrimitive(IDirect3DDevice3 *iface, TRACE("iface %p, primitive_type %#x, fvf %#x, vertices %p, vertex_count %u, flags %#x.\n", iface, primitive_type, fvf, vertices, vertex_count, flags); + setup_lighting(device, fvf, flags); + return IDirect3DDevice7_DrawPrimitive(&device->IDirect3DDevice7_iface, primitive_type, fvf, vertices, vertex_count, flags); } @@ -3545,7 +3534,7 @@ static HRESULT WINAPI d3d_device2_DrawPrimitive(IDirect3DDevice2 *iface, return DDERR_INVALIDPARAMS; /* Should never happen */ } - return IDirect3DDevice7_DrawPrimitive(&device->IDirect3DDevice7_iface, + return d3d_device3_DrawPrimitive(&device->IDirect3DDevice3_iface, primitive_type, fvf, vertices, vertex_count, flags); } @@ -3703,6 +3692,8 @@ static HRESULT WINAPI d3d_device3_DrawIndexedPrimitive(IDirect3DDevice3 *iface, "indices %p, index_count %u, flags %#x.\n", iface, primitive_type, fvf, vertices, vertex_count, indices, index_count, flags); + setup_lighting(device, fvf, flags); + return IDirect3DDevice7_DrawIndexedPrimitive(&device->IDirect3DDevice7_iface, primitive_type, fvf, vertices, vertex_count, indices, index_count, flags); } @@ -3728,10 +3719,47 @@ static HRESULT WINAPI d3d_device2_DrawIndexedPrimitive(IDirect3DDevice2 *iface, return DDERR_INVALIDPARAMS; /* Should never happen */ } - return IDirect3DDevice7_DrawIndexedPrimitive(&device->IDirect3DDevice7_iface, + return d3d_device3_DrawIndexedPrimitive(&device->IDirect3DDevice3_iface, primitive_type, fvf, vertices, vertex_count, indices, index_count, flags); } +/***************************************************************************** + * IDirect3DDevice3::End + * + * Ends a draw begun with IDirect3DDevice3::Begin or + * IDirect3DDevice::BeginIndexed. The vertices specified with + * IDirect3DDevice::Vertex or IDirect3DDevice::Index are drawn using + * the IDirect3DDevice3::DrawPrimitive method. So far only + * non-indexed mode is supported + * + * Version 2 and 3 + * + * Params: + * Flags: Some flags, as usual. Don't know which are defined + * + * Returns: + * The return value of IDirect3DDevice3::DrawPrimitive + * + *****************************************************************************/ +static HRESULT WINAPI d3d_device3_End(IDirect3DDevice3 *iface, DWORD flags) +{ + struct d3d_device *device = impl_from_IDirect3DDevice3(iface); + + TRACE("iface %p, flags %#x.\n", iface, flags); + + return d3d_device3_DrawPrimitive(&device->IDirect3DDevice3_iface, device->primitive_type, + device->vertex_type, device->sysmem_vertex_buffer, device->nb_vertices, device->render_flags); +} + +static HRESULT WINAPI d3d_device2_End(IDirect3DDevice2 *iface, DWORD flags) +{ + struct d3d_device *device = impl_from_IDirect3DDevice2(iface); + + TRACE("iface %p, flags %#x.\n", iface, flags); + + return d3d_device3_End(&device->IDirect3DDevice3_iface, flags); +} + /***************************************************************************** * IDirect3DDevice7::SetClipStatus * @@ -3972,6 +4000,8 @@ static HRESULT WINAPI d3d_device3_DrawPrimitiveStrided(IDirect3DDevice3 *iface, TRACE("iface %p, primitive_type %#x, FVF %#x, strided_data %p, vertex_count %u, flags %#x.\n", iface, PrimitiveType, VertexType, D3DDrawPrimStrideData, VertexCount, Flags); + setup_lighting(device, VertexType, Flags); + return IDirect3DDevice7_DrawPrimitiveStrided(&device->IDirect3DDevice7_iface, PrimitiveType, VertexType, D3DDrawPrimStrideData, VertexCount, Flags); } @@ -4097,6 +4127,8 @@ static HRESULT WINAPI d3d_device3_DrawIndexedPrimitiveStrided(IDirect3DDevice3 * TRACE("iface %p, primitive_type %#x, FVF %#x, strided_data %p, vertex_count %u, indices %p, index_count %u, flags %#x.\n", iface, PrimitiveType, VertexType, D3DDrawPrimStrideData, VertexCount, Indices, IndexCount, Flags); + setup_lighting(device, VertexType, Flags); + return IDirect3DDevice7_DrawIndexedPrimitiveStrided(&device->IDirect3DDevice7_iface, PrimitiveType, VertexType, D3DDrawPrimStrideData, VertexCount, Indices, IndexCount, Flags); } @@ -4189,6 +4221,8 @@ static HRESULT WINAPI d3d_device3_DrawPrimitiveVB(IDirect3DDevice3 *iface, D3DPR TRACE("iface %p, primitive_type %#x, vb %p, start_vertex %u, vertex_count %u, flags %#x.\n", iface, PrimitiveType, D3DVertexBuf, StartVertex, NumVertices, Flags); + setup_lighting(device, vb->fvf, Flags); + return IDirect3DDevice7_DrawPrimitiveVB(&device->IDirect3DDevice7_iface, PrimitiveType, &vb->IDirect3DVertexBuffer7_iface, StartVertex, NumVertices, Flags); } @@ -4320,6 +4354,8 @@ static HRESULT WINAPI d3d_device3_DrawIndexedPrimitiveVB(IDirect3DDevice3 *iface TRACE("iface %p, primitive_type %#x, vb %p, indices %p, index_count %u, flags %#x.\n", iface, PrimitiveType, D3DVertexBuf, Indices, IndexCount, Flags); + setup_lighting(device, vb->fvf, Flags); + return IDirect3DDevice7_DrawIndexedPrimitiveVB(&device->IDirect3DDevice7_iface, PrimitiveType, &vb->IDirect3DVertexBuffer7_iface, 0, IndexCount, Indices, IndexCount, Flags); } @@ -4355,7 +4391,7 @@ static DWORD in_plane(UINT plane, D3DVECTOR normal, D3DVALUE origin_plane, D3DVE { float distance, norm; - norm = sqrt( normal.u1.x * normal.u1.x + normal.u2.y * normal.u2.y + normal.u3.z * normal.u3.z ); + norm = sqrtf(normal.u1.x * normal.u1.x + normal.u2.y * normal.u2.y + normal.u3.z * normal.u3.z); distance = ( origin_plane + normal.u1.x * center.u1.x + normal.u2.y * center.u2.y + normal.u3.z * center.u3.z ) / norm; if ( fabs( distance ) < radius ) return D3DSTATUS_CLIPUNIONLEFT << plane; @@ -4616,7 +4652,7 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface, wined3d_resource_get_desc(sub_resource, &desc); ddfmt.dwSize = sizeof(ddfmt); - PixelFormat_WineD3DtoDD(&ddfmt, desc.format); + ddrawformat_from_wined3dformat(&ddfmt, desc.format); if (ddfmt.u5.dwRGBAlphaBitMask) tex_alpha = TRUE; } } @@ -6728,6 +6764,8 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw, d3d_device_update_depth_stencil(device)); if (version == 1) /* Color keying is initially enabled for version 1 devices. */ wined3d_device_set_render_state(ddraw->wined3d_device, WINED3D_RS_COLORKEYENABLE, TRUE); + else if (version == 2) + wined3d_device_set_render_state(ddraw->wined3d_device, WINED3D_RS_SPECULARENABLE, TRUE); return D3D_OK; } @@ -6741,7 +6779,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, TRACE("ddraw %p, target %p, version %u, device %p, outer_unknown %p.\n", ddraw, target, version, device, outer_unknown); - if (DefaultSurfaceType != DDRAW_SURFACE_TYPE_OPENGL) + if (ddraw->flags & DDRAW_NO3D) { ERR_(winediag)("The application wants to create a Direct3D device, " "but the current DirectDrawRenderer does not support this.\n"); diff --git a/dll/directx/wine/ddraw/executebuffer.c b/dll/directx/wine/ddraw/executebuffer.c index 7c7cd731668..696db492a60 100644 --- a/dll/directx/wine/ddraw/executebuffer.c +++ b/dll/directx/wine/ddraw/executebuffer.c @@ -381,11 +381,10 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, dst->u7.tu = src->u7.tu; dst->u8.tv = src->u8.tv; - /* Now, the matrix multiplication */ - dst->u1.sx = (src->u1.x * mat._11) + (src->u2.y * mat._21) + (src->u3.z * mat._31) + (1.0 * mat._41); - dst->u2.sy = (src->u1.x * mat._12) + (src->u2.y * mat._22) + (src->u3.z * mat._32) + (1.0 * mat._42); - dst->u3.sz = (src->u1.x * mat._13) + (src->u2.y * mat._23) + (src->u3.z * mat._33) + (1.0 * mat._43); - dst->u4.rhw = (src->u1.x * mat._14) + (src->u2.y * mat._24) + (src->u3.z * mat._34) + (1.0 * mat._44); + dst->u1.sx = (src->u1.x * mat._11) + (src->u2.y * mat._21) + (src->u3.z * mat._31) + mat._41; + dst->u2.sy = (src->u1.x * mat._12) + (src->u2.y * mat._22) + (src->u3.z * mat._32) + mat._42; + dst->u3.sz = (src->u1.x * mat._13) + (src->u2.y * mat._23) + (src->u3.z * mat._33) + mat._43; + dst->u4.rhw = (src->u1.x * mat._14) + (src->u2.y * mat._24) + (src->u3.z * mat._34) + mat._44; dst->u1.sx = dst->u1.sx / dst->u4.rhw * Viewport->dvScaleX + Viewport->dwX + Viewport->dwWidth / 2; @@ -424,11 +423,10 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, dst->u7.tu = src->u6.tu; dst->u8.tv = src->u7.tv; - /* Now, the matrix multiplication */ - dst->u1.sx = (src->u1.x * mat._11) + (src->u2.y * mat._21) + (src->u3.z * mat._31) + (1.0 * mat._41); - dst->u2.sy = (src->u1.x * mat._12) + (src->u2.y * mat._22) + (src->u3.z * mat._32) + (1.0 * mat._42); - dst->u3.sz = (src->u1.x * mat._13) + (src->u2.y * mat._23) + (src->u3.z * mat._33) + (1.0 * mat._43); - dst->u4.rhw = (src->u1.x * mat._14) + (src->u2.y * mat._24) + (src->u3.z * mat._34) + (1.0 * mat._44); + dst->u1.sx = (src->u1.x * mat._11) + (src->u2.y * mat._21) + (src->u3.z * mat._31) + mat._41; + dst->u2.sy = (src->u1.x * mat._12) + (src->u2.y * mat._22) + (src->u3.z * mat._32) + mat._42; + dst->u3.sz = (src->u1.x * mat._13) + (src->u2.y * mat._23) + (src->u3.z * mat._33) + mat._43; + dst->u4.rhw = (src->u1.x * mat._14) + (src->u2.y * mat._24) + (src->u3.z * mat._34) + mat._44; dst->u1.sx = dst->u1.sx / dst->u4.rhw * Viewport->dvScaleX + Viewport->dwX + Viewport->dwWidth / 2; diff --git a/dll/directx/wine/ddraw/legacy.h b/dll/directx/wine/ddraw/legacy.h deleted file mode 100644 index c9da1e7d5f9..00000000000 --- a/dll/directx/wine/ddraw/legacy.h +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Copyright (C) the Wine project -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; either -* version 2.1 of the License, or (at your option) any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA -*/ - - -#ifdef __cplusplus -extern "C" { -#endif - - /***************************************************************************** - * IDirectDraw3 interface - */ - -#if defined( _WIN32 ) && !defined( _NO_COM ) - #define INTERFACE IDirectDraw3 - DECLARE_INTERFACE_(IDirectDraw3,IUnknown) - { - /*** IUnknown methods ***/ - /*00*/ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; - /*04*/ STDMETHOD_(ULONG,AddRef)(THIS) PURE; - /*08*/ STDMETHOD_(ULONG,Release)(THIS) PURE; - /*** IDirectDraw2 methods ***/ - /*0c*/ STDMETHOD(Compact)(THIS) PURE; - /*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER *lplpDDClipper, IUnknown *pUnkOuter) PURE; - /*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE *lplpDDPalette, IUnknown *pUnkOuter) PURE; - /*18*/ STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc, LPDIRECTDRAWSURFACE *lplpDDSurface, IUnknown *pUnkOuter) PURE; - /*1c*/ STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDSurface, LPDIRECTDRAWSURFACE *lplpDupDDSurface) PURE; - /*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK lpEnumModesCallback) PURE; - /*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE; - /*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE; - /*2c*/ STDMETHOD(GetCaps)(THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE; - /*30*/ STDMETHOD(GetDisplayMode)(THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE; - /*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE; - /*38*/ STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE *lplpGDIDDSurface) PURE; - /*3c*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD lpdwFrequency) PURE; - /*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD lpdwScanLine) PURE; - /*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL *lpbIsInVB) PURE; - /*48*/ STDMETHOD(Initialize)(THIS_ GUID *lpGUID) PURE; - /*4c*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE; - /*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND hWnd, DWORD dwFlags) PURE; - /*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE; - /*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD dwFlags, HANDLE hEvent) PURE; - /* added in v2 */ - /*5c*/ STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree) PURE; - /* added in v3 */ - /*60*/ STDMETHOD(GetSurfaceFromDC)(THIS_ HDC hdc, LPDIRECTDRAWSURFACE *pSurf) PURE; - }; - #undef INTERFACE - - #if !defined(__cplusplus) || defined(CINTERFACE) - /*** IUnknown methods ***/ - #define IDirectDraw3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) - #define IDirectDraw3_AddRef(p) (p)->lpVtbl->AddRef(p) - #define IDirectDraw3_Release(p) (p)->lpVtbl->Release(p) - /*** IDirectDraw methods ***/ - #define IDirectDraw3_Compact(p) (p)->lpVtbl->Compact(p) - #define IDirectDraw3_CreateClipper(p,a,b,c) (p)->lpVtbl->CreateClipper(p,a,b,c) - #define IDirectDraw3_CreatePalette(p,a,b,c,d) (p)->lpVtbl->CreatePalette(p,a,b,c,d) - #define IDirectDraw3_CreateSurface(p,a,b,c) (p)->lpVtbl->CreateSurface(p,a,b,c) - #define IDirectDraw3_DuplicateSurface(p,a,b) (p)->lpVtbl->DuplicateSurface(p,a,b) - #define IDirectDraw3_EnumDisplayModes(p,a,b,c,d) (p)->lpVtbl->EnumDisplayModes(p,a,b,c,d) - #define IDirectDraw3_EnumSurfaces(p,a,b,c,d) (p)->lpVtbl->EnumSurfaces(p,a,b,c,d) - #define IDirectDraw3_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p) - #define IDirectDraw3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) - #define IDirectDraw3_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a) - #define IDirectDraw3_GetFourCCCodes(p,a,b) (p)->lpVtbl->GetFourCCCodes(p,a,b) - #define IDirectDraw3_GetGDISurface(p,a) (p)->lpVtbl->GetGDISurface(p,a) - #define IDirectDraw3_GetMonitorFrequency(p,a) (p)->lpVtbl->GetMonitorFrequency(p,a) - #define IDirectDraw3_GetScanLine(p,a) (p)->lpVtbl->GetScanLine(p,a) - #define IDirectDraw3_GetVerticalBlankStatus(p,a) (p)->lpVtbl->GetVerticalBlankStatus(p,a) - #define IDirectDraw3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) - #define IDirectDraw3_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p) - #define IDirectDraw3_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b) - #define IDirectDraw3_SetDisplayMode(p,a,b,c,d,e) (p)->lpVtbl->SetDisplayMode(p,a,b,c,d,e) - #define IDirectDraw3_WaitForVerticalBlank(p,a,b) (p)->lpVtbl->WaitForVerticalBlank(p,a,b) - /*** IDirectDraw2 methods ***/ - #define IDirectDraw3_GetAvailableVidMem(p,a,b,c) (p)->lpVtbl->GetAvailableVidMem(p,a,b,c) - /*** IDirectDraw3 methods ***/ - #define IDirectDraw3_GetSurfaceFromDC(p,a,b) (p)->lpVtbl->GetSurfaceFromDC(p,a,b) - #else - /*** IUnknown methods ***/ - #define IDirectDraw3_QueryInterface(p,a,b) (p)->QueryInterface(a,b) - #define IDirectDraw3_AddRef(p) (p)->AddRef() - #define IDirectDraw3_Release(p) (p)->Release() - /*** IDirectDraw methods ***/ - #define IDirectDraw3_Compact(p) (p)->Compact() - #define IDirectDraw3_CreateClipper(p,a,b,c) (p)->CreateClipper(a,b,c) - #define IDirectDraw3_CreatePalette(p,a,b,c,d) (p)->CreatePalette(a,b,c,d) - #define IDirectDraw3_CreateSurface(p,a,b,c) (p)->CreateSurface(a,b,c) - #define IDirectDraw3_DuplicateSurface(p,a,b) (p)->DuplicateSurface(a,b) - #define IDirectDraw3_EnumDisplayModes(p,a,b,c,d) (p)->EnumDisplayModes(a,b,c,d) - #define IDirectDraw3_EnumSurfaces(p,a,b,c,d) (p)->EnumSurfaces(a,b,c,d) - #define IDirectDraw3_FlipToGDISurface(p) (p)->FlipToGDISurface() - #define IDirectDraw3_GetCaps(p,a,b) (p)->GetCaps(a,b) - #define IDirectDraw3_GetDisplayMode(p,a) (p)->GetDisplayMode(a) - #define IDirectDraw3_GetFourCCCodes(p,a,b) (p)->GetFourCCCodes(a,b) - #define IDirectDraw3_GetGDISurface(p,a) (p)->GetGDISurface(a) - #define IDirectDraw3_GetMonitorFrequency(p,a) (p)->GetMonitorFrequency(a) - #define IDirectDraw3_GetScanLine(p,a) (p)->GetScanLine(a) - #define IDirectDraw3_GetVerticalBlankStatus(p,a) (p)->GetVerticalBlankStatus(a) - #define IDirectDraw3_Initialize(p,a) (p)->Initialize(a) - #define IDirectDraw3_RestoreDisplayMode(p) (p)->RestoreDisplayMode() - #define IDirectDraw3_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b) - #define IDirectDraw3_SetDisplayMode(p,a,b,c,d,e) (p)->SetDisplayMode(a,b,c,d,e) - #define IDirectDraw3_WaitForVerticalBlank(p,a,b) (p)->WaitForVerticalBlank(a,b) - /*** IDirectDraw2 methods ***/ - #define IDirectDraw3_GetAvailableVidMem(p,a,b,c) (p)->GetAvailableVidMem(a,b,c) - /*** IDirectDraw3 methods ***/ - #define IDirectDraw3_GetSurfaceFromDC(p,a,b) (p)->GetSurfaceFromDC(a,b) - #endif -#undef INTERFACE -#endif - -#ifdef __cplusplus -} -#endif diff --git a/dll/directx/wine/ddraw/main.c b/dll/directx/wine/ddraw/main.c index 1d8030a7bb4..6778b2fd87d 100644 --- a/dll/directx/wine/ddraw/main.c +++ b/dll/directx/wine/ddraw/main.c @@ -36,9 +36,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw); -/* The configured default surface */ -enum ddraw_surface_type DefaultSurfaceType = DDRAW_SURFACE_TYPE_OPENGL; - static struct list global_ddraw_list = LIST_INIT(global_ddraw_list); static HINSTANCE instance; @@ -371,7 +368,6 @@ HRESULT WINAPI DirectDrawEnumerateA(LPDDENUMCALLBACKA callback, void *context) HRESULT WINAPI DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA callback, void *context, DWORD flags) { struct wined3d *wined3d; - DWORD wined3d_flags; TRACE("callback %p, context %p, flags %#x.\n", callback, context, flags); @@ -383,21 +379,16 @@ HRESULT WINAPI DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA callback, void *contex if (flags) FIXME("flags 0x%08x not handled\n", flags); - wined3d_flags = WINED3D_LEGACY_DEPTH_BIAS; - if (DefaultSurfaceType != DDRAW_SURFACE_TYPE_OPENGL) - wined3d_flags |= WINED3D_NO3D; - TRACE("Enumerating ddraw interfaces\n"); - if (!(wined3d = wined3d_create(7, wined3d_flags))) + if (!(wined3d = wined3d_create(7, WINED3D_LEGACY_DEPTH_BIAS))) { - if ((wined3d_flags & WINED3D_NO3D) || !(wined3d = wined3d_create(7, wined3d_flags | WINED3D_NO3D))) + if (!(wined3d = wined3d_create(7, WINED3D_LEGACY_DEPTH_BIAS | WINED3D_NO3D))) { WARN("Failed to create a wined3d object.\n"); return E_FAIL; } WARN("Created a wined3d object without 3D support.\n"); - DefaultSurfaceType = DDRAW_SURFACE_TYPE_GDI; } __TRY @@ -848,21 +839,16 @@ static inline DWORD get_config_key(HKEY defkey, HKEY appkey, const char* name, c * app didn't release them properly(Gothic 2, Diablo 2, Moto racer, ...) * ***********************************************************************/ -BOOL WINAPI -DllMain(HINSTANCE hInstDLL, - DWORD Reason, - LPVOID lpv) +BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD reason, LPVOID reserved) { - TRACE("(%p,%x,%p)\n", hInstDLL, Reason, lpv); - if (Reason == DLL_PROCESS_ATTACH) + TRACE("(%p,%x,%p)\n", hInstDLL, reason, reserved); + switch (reason) + { + case DLL_PROCESS_ATTACH: { static HMODULE ddraw_self; - char buffer[MAX_PATH+10]; - DWORD size = sizeof(buffer); HKEY hkey = 0; - HKEY appkey = 0; WNDCLASSA wc; - DWORD len; /* Register the window class. This is used to create a hidden window * for D3D rendering, if the application didn't pass one. It can also @@ -883,47 +869,6 @@ DllMain(HINSTANCE hInstDLL, return FALSE; } - /* @@ Wine registry key: HKCU\Software\Wine\Direct3D */ - if ( RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\Direct3D", &hkey ) ) hkey = 0; - - len = GetModuleFileNameA( 0, buffer, MAX_PATH ); - if (len && len < MAX_PATH) - { - HKEY tmpkey; - /* @@ Wine registry key: HKCU\Software\Wine\AppDefaults\app.exe\Direct3D */ - if (!RegOpenKeyA( HKEY_CURRENT_USER, "Software\\Wine\\AppDefaults", &tmpkey )) - { - char *p, *appname = buffer; - if ((p = strrchr( appname, '/' ))) appname = p + 1; - if ((p = strrchr( appname, '\\' ))) appname = p + 1; - strcat( appname, "\\Direct3D" ); - TRACE("appname = [%s]\n", appname); - if (RegOpenKeyA( tmpkey, appname, &appkey )) appkey = 0; - RegCloseKey( tmpkey ); - } - } - - if ( 0 != hkey || 0 != appkey ) - { - if ( !get_config_key( hkey, appkey, "DirectDrawRenderer", buffer, size) ) - { - if (!strcmp(buffer,"gdi")) - { - TRACE("Defaulting to GDI surfaces\n"); - DefaultSurfaceType = DDRAW_SURFACE_TYPE_GDI; - } - else if (!strcmp(buffer,"opengl")) - { - TRACE("Defaulting to opengl surfaces\n"); - DefaultSurfaceType = DDRAW_SURFACE_TYPE_OPENGL; - } - else - { - ERR("Unknown default surface type. Supported are:\n gdi, opengl\n"); - } - } - } - /* On Windows one can force the refresh rate that DirectDraw uses by * setting an override value in dxdiag. This is documented in KB315614 * (main article), KB230002, and KB217348. By comparing registry dumps @@ -946,7 +891,8 @@ DllMain(HINSTANCE hInstDLL, */ if ( !RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Microsoft\\DirectDraw", &hkey ) ) { - DWORD type, data; + DWORD type, data, size; + size = sizeof(data); if (!RegQueryValueExA( hkey, "ForceRefreshRate", NULL, &type, (LPBYTE)&data, &size ) && type == REG_DWORD) { @@ -968,9 +914,10 @@ DllMain(HINSTANCE hInstDLL, instance = hInstDLL; DisableThreadLibraryCalls(hInstDLL); + break; } - else if (Reason == DLL_PROCESS_DETACH) - { + + case DLL_PROCESS_DETACH: if(!list_empty(&global_ddraw_list)) { struct list *entry, *entry2; @@ -1034,7 +981,7 @@ DllMain(HINSTANCE hInstDLL, } } - /* Unregister the window class. */ + if (reserved) break; UnregisterClassA(DDRAW_WINDOW_CLASS_NAME, hInstDLL); } diff --git a/dll/directx/wine/ddraw/stubs.c b/dll/directx/wine/ddraw/stubs.c deleted file mode 100644 index 5edfb31f28b..00000000000 --- a/dll/directx/wine/ddraw/stubs.c +++ /dev/null @@ -1,8 +0,0 @@ -#include "ddraw_private.h" - -HRESULT WINAPI -D3DParseUnknownCommand( LPVOID lpCmd, - LPVOID *lpRetCmd) -{ - return DD_OK; -} diff --git a/dll/directx/wine/ddraw/surface.c b/dll/directx/wine/ddraw/surface.c index 2091bd2c2e6..fb8beb081c4 100644 --- a/dll/directx/wine/ddraw/surface.c +++ b/dll/directx/wine/ddraw/surface.c @@ -4233,7 +4233,7 @@ static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc(IDirectDrawSurface7 *iface, | DDSD_HEIGHT | DDSD_PITCH | DDSD_CAPS; enum wined3d_format_id format_id; BOOL update_wined3d = FALSE; - UINT width, height; + UINT pitch, width, height; TRACE("iface %p, surface_desc %p, flags %#x.\n", iface, DDSD, Flags); @@ -4293,6 +4293,7 @@ static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc(IDirectDrawSurface7 *iface, TRACE("Surface pitch changed from %u to %u.\n", This->surface_desc.u1.lPitch, DDSD->u1.lPitch); update_wined3d = TRUE; } + pitch = DDSD->u1.lPitch; width = DDSD->dwWidth; } else if (DDSD->dwFlags & DDSD_PITCH) @@ -4302,6 +4303,7 @@ static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc(IDirectDrawSurface7 *iface, } else { + pitch = This->surface_desc.u1.lPitch; width = This->surface_desc.dwWidth; } @@ -4328,7 +4330,7 @@ static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc(IDirectDrawSurface7 *iface, if (DDSD->dwFlags & DDSD_PIXELFORMAT) { enum wined3d_format_id current_format_id; - format_id = PixelFormat_DD2WineD3D(&DDSD->u4.ddpfPixelFormat); + format_id = wined3dformat_from_ddrawformat(&DDSD->u4.ddpfPixelFormat); if (format_id == WINED3DFMT_UNKNOWN) { @@ -4336,7 +4338,7 @@ static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc(IDirectDrawSurface7 *iface, wined3d_mutex_unlock(); return DDERR_INVALIDPARAMS; } - current_format_id = PixelFormat_DD2WineD3D(&This->surface_desc.u4.ddpfPixelFormat); + current_format_id = wined3dformat_from_ddrawformat(&This->surface_desc.u4.ddpfPixelFormat); if (format_id != current_format_id) { TRACE("Surface format changed from %#x to %#x.\n", current_format_id, format_id); @@ -4345,7 +4347,7 @@ static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc(IDirectDrawSurface7 *iface, } else { - format_id = PixelFormat_DD2WineD3D(&This->surface_desc.u4.ddpfPixelFormat); + format_id = wined3dformat_from_ddrawformat(&This->surface_desc.u4.ddpfPixelFormat); } if (update_wined3d) @@ -4370,8 +4372,7 @@ static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc(IDirectDrawSurface7 *iface, if (DDSD->dwFlags & DDSD_LPSURFACE && DDSD->lpSurface) { - hr = wined3d_surface_set_mem(This->wined3d_surface, DDSD->lpSurface); - if (FAILED(hr)) + if (FAILED(hr = wined3d_surface_set_mem(This->wined3d_surface, DDSD->lpSurface, pitch))) { /* No need for a trace here, wined3d does that for us */ switch(hr) @@ -5585,12 +5586,12 @@ static const struct wined3d_parent_ops ddraw_texture_wined3d_parent_ops = ddraw_texture_wined3d_object_destroyed, }; -HRESULT ddraw_surface_create_texture(struct ddraw_surface *surface) +HRESULT ddraw_surface_create_texture(struct ddraw_surface *surface, DWORD surface_flags) { const DDSURFACEDESC2 *desc = &surface->surface_desc; + struct wined3d_resource_desc wined3d_desc; struct ddraw_surface *mip, **attach; struct wined3d_resource *resource; - enum wined3d_format_id format; UINT layers, levels, i, j; DDSURFACEDESC2 *mip_desc; enum wined3d_pool pool; @@ -5613,13 +5614,28 @@ HRESULT ddraw_surface_create_texture(struct ddraw_surface *surface) else pool = WINED3D_POOL_DEFAULT; - format = PixelFormat_DD2WineD3D(&surface->surface_desc.u4.ddpfPixelFormat); + wined3d_desc.format = wined3dformat_from_ddrawformat(&surface->surface_desc.u4.ddpfPixelFormat); + wined3d_desc.multisample_type = WINED3D_MULTISAMPLE_NONE; + wined3d_desc.multisample_quality = 0; + wined3d_desc.usage = 0; + wined3d_desc.pool = pool; + wined3d_desc.width = desc->dwWidth; + wined3d_desc.height = desc->dwHeight; + wined3d_desc.depth = 1; + wined3d_desc.size = 0; + if (desc->ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP) - hr = wined3d_texture_create_cube(surface->ddraw->wined3d_device, desc->dwWidth, - levels, 0, format, pool, surface, &ddraw_texture_wined3d_parent_ops, &surface->wined3d_texture); + { + wined3d_desc.resource_type = WINED3D_RTYPE_CUBE_TEXTURE; + hr = wined3d_texture_create_cube(surface->ddraw->wined3d_device, &wined3d_desc, levels, + surface_flags, surface, &ddraw_texture_wined3d_parent_ops, &surface->wined3d_texture); + } else - hr = wined3d_texture_create_2d(surface->ddraw->wined3d_device, desc->dwWidth, desc->dwHeight, - levels, 0, format, pool, surface, &ddraw_texture_wined3d_parent_ops, &surface->wined3d_texture); + { + wined3d_desc.resource_type = WINED3D_RTYPE_TEXTURE; + hr = wined3d_texture_create_2d(surface->ddraw->wined3d_device, &wined3d_desc, levels, + surface_flags, surface, &ddraw_texture_wined3d_parent_ops, &surface->wined3d_texture); + } if (FAILED(hr)) { @@ -5682,10 +5698,10 @@ HRESULT ddraw_surface_create_texture(struct ddraw_surface *surface) return DD_OK; } -HRESULT ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, DDSURFACEDESC2 *desc, UINT version) +HRESULT ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, + DDSURFACEDESC2 *desc, DWORD flags, UINT version) { enum wined3d_pool pool = WINED3D_POOL_DEFAULT; - DWORD flags = WINED3D_SURFACE_MAPPABLE; enum wined3d_format_id format; DWORD usage = 0; HRESULT hr; @@ -5699,13 +5715,6 @@ HRESULT ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, D desc->ddsCaps.dwCaps |= DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY; } - /* Some applications assume surfaces will always be mapped at the same - * address. Some of those also assume that this address is valid even when - * the surface isn't mapped, and that updates done this way will be - * visible on the screen. The game Nox is such an application, - * Commandos: Behind Enemy Lines is another. */ - flags |= WINED3D_SURFACE_PIN_SYSMEM; - if (desc->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) { usage |= WINED3DUSAGE_RENDERTARGET; @@ -5745,7 +5754,7 @@ HRESULT ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, D desc->ddsCaps.dwCaps |= DDSCAPS_LOCALVIDMEM; } - format = PixelFormat_DD2WineD3D(&desc->u4.ddpfPixelFormat); + format = wined3dformat_from_ddrawformat(&desc->u4.ddpfPixelFormat); if (format == WINED3DFMT_UNKNOWN) { WARN("Unsupported / unknown pixelformat.\n"); @@ -5835,8 +5844,15 @@ HRESULT ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, D } if (desc->dwFlags & DDSD_LPSURFACE) { - hr = wined3d_surface_set_mem(surface->wined3d_surface, desc->lpSurface); - if (FAILED(hr)) + UINT pitch = 0; + + if (desc->dwFlags & DDSD_PITCH) + { + pitch = desc->u1.lPitch; + surface->surface_desc.u1.lPitch = pitch; + } + + if (FAILED(hr = wined3d_surface_set_mem(surface->wined3d_surface, desc->lpSurface, pitch))) { ERR("Failed to set surface memory, hr %#x.\n", hr); wined3d_surface_decref(surface->wined3d_surface); diff --git a/dll/directx/wine/ddraw/utils.c b/dll/directx/wine/ddraw/utils.c index 74e35ddfe34..6308ee5c25f 100644 --- a/dll/directx/wine/ddraw/utils.c +++ b/dll/directx/wine/ddraw/utils.c @@ -30,26 +30,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw); static void DDRAW_dump_pixelformat(const DDPIXELFORMAT *pf); -/***************************************************************************** - * PixelFormat_WineD3DtoDD - * - * Converts an wined3d format ID into a DDPIXELFORMAT structure - * - * Params: - * DDPixelFormat: Address of the structure to write the pixel format to - * WineD3DFormat: Source format - * - *****************************************************************************/ -void PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat, enum wined3d_format_id WineD3DFormat) +void ddrawformat_from_wined3dformat(DDPIXELFORMAT *DDPixelFormat, enum wined3d_format_id wined3d_format) { DWORD Size = DDPixelFormat->dwSize; - TRACE("Converting wined3d format %#x to DDRAW.\n", WineD3DFormat); if(Size==0) return; memset(DDPixelFormat, 0x00, Size); DDPixelFormat->dwSize = Size; - switch(WineD3DFormat) + switch (wined3d_format) { case WINED3DFMT_B8G8R8_UNORM: DDPixelFormat->dwFlags = DDPF_RGB; @@ -247,13 +236,13 @@ void PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat, enum wined3d_format_i case WINED3DFMT_YUY2: DDPixelFormat->u1.dwYUVBitCount = 16; DDPixelFormat->dwFlags = DDPF_FOURCC; - DDPixelFormat->dwFourCC = WineD3DFormat; + DDPixelFormat->dwFourCC = wined3d_format; break; case WINED3DFMT_YV12: DDPixelFormat->u1.dwYUVBitCount = 12; DDPixelFormat->dwFlags = DDPF_FOURCC; - DDPixelFormat->dwFourCC = WineD3DFormat; + DDPixelFormat->dwFourCC = wined3d_format; break; case WINED3DFMT_DXT1: @@ -265,7 +254,7 @@ void PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat, enum wined3d_format_i case WINED3DFMT_G8R8_G8B8: case WINED3DFMT_R8G8_B8G8: DDPixelFormat->dwFlags = DDPF_FOURCC; - DDPixelFormat->dwFourCC = WineD3DFormat; + DDPixelFormat->dwFourCC = wined3d_format; break; /* Luminance */ @@ -341,7 +330,8 @@ void PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat, enum wined3d_format_i break; default: - ERR("Can't translate this Pixelformat %d\n", WineD3DFormat); + FIXME("Unhandled wined3d format %#x.\n", wined3d_format); + break; } if(TRACE_ON(ddraw)) { @@ -349,20 +339,8 @@ void PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat, enum wined3d_format_i DDRAW_dump_pixelformat(DDPixelFormat); } } -/***************************************************************************** - * PixelFormat_DD2WineD3D - * - * Reads a DDPIXELFORMAT structure and returns the equivalent wined3d - * format ID. - * - * Params: - * DDPixelFormat: The source format - * - * Returns: - * The wined3d format ID equivalent to the DDraw format - * WINED3DFMT_UNKNOWN if a matching format wasn't found - *****************************************************************************/ -enum wined3d_format_id PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat) + +enum wined3d_format_id wined3dformat_from_ddrawformat(const DDPIXELFORMAT *DDPixelFormat) { TRACE("Convert a DirectDraw Pixelformat to a WineD3D Pixelformat\n"); if(TRACE_ON(ddraw)) diff --git a/dll/directx/wine/ddraw/viewport.c b/dll/directx/wine/ddraw/viewport.c index 22365c8da81..38bd21d33c8 100644 --- a/dll/directx/wine/ddraw/viewport.c +++ b/dll/directx/wine/ddraw/viewport.c @@ -428,10 +428,10 @@ static HRESULT WINAPI d3d_viewport_TransformVertices(IDirect3DViewport3 *iface, outH = lpData->lpHOut; for(i = 0; i < dwVertexCount; i++) { - x = (in[0] * mat._11) + (in[1] * mat._21) + (in[2] * mat._31) + (1.0 * mat._41); - y = (in[0] * mat._12) + (in[1] * mat._22) + (in[2] * mat._32) + (1.0 * mat._42); - z = (in[0] * mat._13) + (in[1] * mat._23) + (in[2] * mat._33) + (1.0 * mat._43); - w = (in[0] * mat._14) + (in[1] * mat._24) + (in[2] * mat._34) + (1.0 * mat._44); + x = (in[0] * mat._11) + (in[1] * mat._21) + (in[2] * mat._31) + mat._41; + y = (in[0] * mat._12) + (in[1] * mat._22) + (in[2] * mat._32) + mat._42; + z = (in[0] * mat._13) + (in[1] * mat._23) + (in[2] * mat._33) + mat._43; + w = (in[0] * mat._14) + (in[1] * mat._24) + (in[2] * mat._34) + mat._44; if(dwFlags & D3DTRANSFORM_CLIPPED) { diff --git a/dll/directx/devenum/CMakeLists.txt b/dll/directx/wine/devenum/CMakeLists.txt similarity index 73% rename from dll/directx/devenum/CMakeLists.txt rename to dll/directx/wine/devenum/CMakeLists.txt index 73373558419..2c1aa600929 100644 --- a/dll/directx/devenum/CMakeLists.txt +++ b/dll/directx/wine/devenum/CMakeLists.txt @@ -2,22 +2,22 @@ remove_definitions(-D_WIN32_WINNT=0x502) add_definitions(-D_WIN32_WINNT=0x600) +add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - spec2def(devenum.dll devenum.spec) -add_library(devenum SHARED +list(APPEND SOURCE createdevenum.c devenum_main.c factory.c mediacatenum.c parsedisplayname.c - devenum.rc ${CMAKE_CURRENT_BINARY_DIR}/devenum.def) +add_library(devenum SHARED ${SOURCE} devenum.rc) +set_source_files_properties(devenum.rc PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/devenum_classes.rgs) set_module_type(devenum win32dll UNICODE) target_link_libraries(devenum strmiids uuid wine) add_importlibs(devenum advapi32 ole32 oleaut32 winmm user32 avicap32 msvcrt kernel32 ntdll) add_pch(devenum devenum_private.h) -add_dependencies(devenum dxsdk) add_cd_file(TARGET devenum DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/devenum/createdevenum.c b/dll/directx/wine/devenum/createdevenum.c similarity index 91% rename from dll/directx/devenum/createdevenum.c rename to dll/directx/wine/devenum/createdevenum.c index bbe93523ddb..b0a930127f2 100644 --- a/dll/directx/devenum/createdevenum.c +++ b/dll/directx/wine/devenum/createdevenum.c @@ -52,6 +52,9 @@ static const WCHAR wszAllowedZero[] = {'A','l','l','o','w','e','d','Z','e','r',' static const WCHAR wszDirection[] = {'D','i','r','e','c','t','i','o','n',0}; static const WCHAR wszIsRendered[] = {'I','s','R','e','n','d','e','r','e','d',0}; static const WCHAR wszTypes[] = {'T','y','p','e','s',0}; +static const WCHAR wszFriendlyName[] = {'F','r','i','e','n','d','l','y','N','a','m','e',0}; +static const WCHAR wszWaveInID[] = {'W','a','v','e','I','n','I','D',0}; +static const WCHAR wszWaveOutID[] = {'W','a','v','e','O','u','t','I','D',0}; static ULONG WINAPI DEVENUM_ICreateDevEnum_AddRef(ICreateDevEnum * iface); static HRESULT DEVENUM_CreateSpecialCategories(void); @@ -59,24 +62,24 @@ static HRESULT DEVENUM_CreateSpecialCategories(void); /********************************************************************** * DEVENUM_ICreateDevEnum_QueryInterface (also IUnknown) */ -static HRESULT WINAPI DEVENUM_ICreateDevEnum_QueryInterface( - ICreateDevEnum * iface, - REFIID riid, - LPVOID *ppvObj) +static HRESULT WINAPI DEVENUM_ICreateDevEnum_QueryInterface(ICreateDevEnum *iface, REFIID riid, + void **ppv) { - TRACE("\n\tIID:\t%s\n",debugstr_guid(riid)); + TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv); - if (ppvObj == NULL) return E_POINTER; + if (!ppv) + return E_POINTER; if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_ICreateDevEnum)) { - *ppvObj = iface; + *ppv = iface; DEVENUM_ICreateDevEnum_AddRef(iface); return S_OK; } FIXME("- no interface IID: %s\n", debugstr_guid(riid)); + *ppv = NULL; return E_NOINTERFACE; } @@ -171,10 +174,10 @@ static void DEVENUM_ReadPinTypes(HKEY hkeyPinKey, REGFILTERPINS *rgPin) for (i1 = 0; i1 < dwMinorTypes; i1++) { WCHAR wszMinorTypeName[64]; - DWORD cName = sizeof(wszMinorTypeName) / sizeof(WCHAR); CLSID *clsMajorType = NULL, *clsMinorType = NULL; HRESULT hr; + cName = sizeof(wszMinorTypeName) / sizeof(WCHAR); if (RegEnumKeyExW(hkeyMajorType, i1, wszMinorTypeName, &cName, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) continue; clsMinorType = CoTaskMemAlloc(sizeof(CLSID)); @@ -349,7 +352,6 @@ static HRESULT DEVENUM_RegisterLegacyAmFilters(void) HKEY hkeyCategoryBaseKey; WCHAR wszRegKey[MAX_PATH]; HKEY hkeyInstance = NULL; - HRESULT hr; if (RegEnumKeyExW(hkeyFilter, i, wszFilterSubkeyName, &cName, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) continue; @@ -463,9 +465,8 @@ static HRESULT WINAPI DEVENUM_ICreateDevEnum_CreateClassEnumerator( HKEY hkey; HKEY hbasekey; HRESULT hr; - CreateDevEnumImpl *This = (CreateDevEnumImpl *)iface; - TRACE("(%p)->(%s, %p, %x)\n\tDeviceClass:\t%s\n", This, debugstr_guid(clsidDeviceClass), ppEnumMoniker, dwFlags, debugstr_guid(clsidDeviceClass)); + TRACE("(%p)->(%s, %p, %x)\n", iface, debugstr_guid(clsidDeviceClass), ppEnumMoniker, dwFlags); if (!ppEnumMoniker) return E_POINTER; @@ -519,7 +520,7 @@ static const ICreateDevEnumVtbl ICreateDevEnum_Vtbl = /********************************************************************** * static CreateDevEnum instance */ -CreateDevEnumImpl DEVENUM_CreateDevEnum = { &ICreateDevEnum_Vtbl }; +ICreateDevEnum DEVENUM_CreateDevEnum = { &ICreateDevEnum_Vtbl }; /********************************************************************** * DEVENUM_CreateAMCategoryKey (INTERNAL) @@ -631,6 +632,7 @@ static HRESULT DEVENUM_CreateSpecialCategories(void) WAVEINCAPSW wicaps; MIDIOUTCAPSW mocaps; REGPINTYPES * pTypes; + IPropertyBag * pPropBag = NULL; numDevs = waveOutGetNumDevs(); @@ -668,10 +670,27 @@ static HRESULT DEVENUM_CreateSpecialCategories(void) wocaps.szPname, &rf2); - /* FIXME: do additional stuff with IMoniker here, depending on what RegisterFilter does */ + if (pMoniker) + { + VARIANT var; - if (pMoniker) - IMoniker_Release(pMoniker); + V_VT(&var) = VT_I4; + V_UNION(&var, ulVal) = i; + res = IMoniker_BindToStorage(pMoniker, NULL, NULL, &IID_IPropertyBag, (LPVOID)&pPropBag); + if (SUCCEEDED(res)) + res = IPropertyBag_Write(pPropBag, wszWaveOutID, &var); + else + pPropBag = NULL; + + V_VT(&var) = VT_LPWSTR; + V_UNION(&var, bstrVal) = wocaps.szPname; + if (SUCCEEDED(res)) + res = IPropertyBag_Write(pPropBag, wszFriendlyName, &var); + if (pPropBag) + IPropertyBag_Release(pPropBag); + IMoniker_Release(pMoniker); + pMoniker = NULL; + } wsprintfW(szDSoundName, szDSoundNameFormat, wocaps.szPname); res = IFilterMapper2_RegisterFilter(pMapper, @@ -724,7 +743,7 @@ static HRESULT DEVENUM_CreateSpecialCategories(void) rfp2.lpMediaType = pTypes; - res = IFilterMapper2_RegisterFilter(pMapper, + res = IFilterMapper2_RegisterFilter(pMapper, &CLSID_AudioRecord, wicaps.szPname, &pMoniker, @@ -732,10 +751,27 @@ static HRESULT DEVENUM_CreateSpecialCategories(void) wicaps.szPname, &rf2); - /* FIXME: do additional stuff with IMoniker here, depending on what RegisterFilter does */ - if (pMoniker) - IMoniker_Release(pMoniker); + if (pMoniker) { + VARIANT var; + + V_VT(&var) = VT_I4; + V_UNION(&var, ulVal) = i; + res = IMoniker_BindToStorage(pMoniker, NULL, NULL, &IID_IPropertyBag, (LPVOID)&pPropBag); + if (SUCCEEDED(res)) + res = IPropertyBag_Write(pPropBag, wszWaveInID, &var); + else + pPropBag = NULL; + + V_VT(&var) = VT_LPWSTR; + V_UNION(&var, bstrVal) = wicaps.szPname; + if (SUCCEEDED(res)) + res = IPropertyBag_Write(pPropBag, wszFriendlyName, &var); + + if (pPropBag) + IPropertyBag_Release(pPropBag); + IMoniker_Release(pMoniker); + } CoTaskMemFree(pTypes); } @@ -802,7 +838,6 @@ static HRESULT DEVENUM_CreateSpecialCategories(void) szDeviceVersion, sizeof(szDeviceVersion)/sizeof(WCHAR))) { IMoniker * pMoniker = NULL; - IPropertyBag * pPropBag = NULL; WCHAR dprintf[] = { 'v','i','d','e','o','%','d',0 }; snprintfW(szDevicePath, sizeof(szDevicePath)/sizeof(WCHAR), dprintf, i); /* The above code prevents 1 device with a different ID overwriting another */ @@ -833,8 +868,10 @@ static HRESULT DEVENUM_CreateSpecialCategories(void) V_VT(&var) = VT_I4; V_UNION(&var, ulVal) = i; res = IMoniker_BindToStorage(pMoniker, NULL, NULL, &IID_IPropertyBag, (LPVOID)&pPropBag); - if (SUCCEEDED(res)) - res = IPropertyBag_Write(pPropBag, wszVfwIndex, &var); + if (SUCCEEDED(res)) { + res = IPropertyBag_Write(pPropBag, wszVfwIndex, &var); + IPropertyBag_Release(pPropBag); + } IMoniker_Release(pMoniker); } diff --git a/dll/directx/devenum/devenum.rc b/dll/directx/wine/devenum/devenum.rc similarity index 75% rename from dll/directx/devenum/devenum.rc rename to dll/directx/wine/devenum/devenum.rc index af706a3fafe..c958b403c0a 100644 --- a/dll/directx/devenum/devenum.rc +++ b/dll/directx/wine/devenum/devenum.rc @@ -20,9 +20,20 @@ #pragma code_page(65001) -#include "windef.h" +//#include "windef.h" //#include "winbase.h" //#include "winnls.h" +#include "devenum_private.h" + +LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT + +STRINGTABLE +{ + IDS_DEVENUM_DSDEFAULT "Default DirectSound" + IDS_DEVENUM_DS "DirectSound: %s" + IDS_DEVENUM_WODEFAULT "Default WaveOut Device" + IDS_DEVENUM_MIDEFAULT "Default MidiOut Device" +} LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL @@ -33,4 +44,6 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #define WINE_PRODUCTVERSION 6,5,1,902 #define WINE_PRODUCTVERSION_STR "6.5" -#include "wine/wine_common_ver.rc" +#include + +1 WINE_REGISTRY devenum_classes.rgs diff --git a/dll/directx/devenum/devenum.spec b/dll/directx/wine/devenum/devenum.spec similarity index 100% rename from dll/directx/devenum/devenum.spec rename to dll/directx/wine/devenum/devenum.spec diff --git a/dll/directx/wine/devenum/devenum_classes.idl b/dll/directx/wine/devenum/devenum_classes.idl new file mode 100644 index 00000000000..872291026e8 --- /dev/null +++ b/dll/directx/wine/devenum/devenum_classes.idl @@ -0,0 +1,90 @@ +/* + * COM Classes for devenum + * + * Copyright 2010 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +[ + helpstring("System Device Enum"), + threading(both), + uuid(62be5d10-60eb-11d0-bd3b-00a0c911ce86) +] +coclass SystemDeviceEnum { interface ICreateDevEnum; } + +[ + threading(both), + progid("device.1"), + vi_progid("device"), + uuid(4315d437-5b8c-11d0-bd3b-00a0c911ce86) +] +coclass DeviceMoniker { interface IParseDisplayName; } + +[ + helpstring("ACM Class Manager"), + threading(both), + uuid(33d9a761-90c8-11d0-bd43-00a0c911ce86) +] +coclass AudioCompressorCategory { } + +[ + helpstring("ICM Class Manager"), + threading(both), + uuid(33d9a760-90c8-11d0-bd43-00a0c911ce86) +] +coclass VideoCompressorCategory { } + +[ + helpstring("ActiveMovie Filter Class Manager"), + threading(both), + uuid(083863f1-70de-11d0-bd40-00a0c911ce86) +] +coclass LegacyAmFilterCategory { } + +[ + helpstring("VFW Capture Class Manager"), + threading(both), + uuid(860bb310-5d01-11d0-bd3b-00a0c911ce86) +] +coclass VideoInputDeviceCategory { } + +[ + helpstring("WaveIn Class Manager"), + threading(both), + uuid(33d9a762-90c8-11d0-bd43-00a0c911ce86) +] +coclass AudioInputDeviceCategory { } + +[ + helpstring("WaveOut and DSound Class Manager"), + threading(both), + uuid(e0f158e1-cb04-11d0-bd4e-00a0c911ce86) +] +coclass AudioRendererCategory { } + +[ + helpstring("MidiOut Class Manager"), + threading(both), + uuid(4efe2452-168a-11d1-bc76-00c04fb9453b) +] +coclass MidiRendererCategory { } + +[ + helpstring("ActiveMovie Filter Categories"), + threading(both), + uuid(da4e3da0-d07d-11d0-bd50-00a0c911ce86) +] +coclass ActiveMovieCategories { } diff --git a/dll/directx/wine/devenum/devenum_classes.rgs b/dll/directx/wine/devenum/devenum_classes.rgs new file mode 100644 index 00000000000..85ca69ef0d3 --- /dev/null +++ b/dll/directx/wine/devenum/devenum_classes.rgs @@ -0,0 +1,60 @@ +HKCR +{ + NoRemove Interface + { + } + NoRemove CLSID + { + '{62BE5D10-60EB-11D0-BD3B-00A0C911CE86}' = s 'System Device Enum' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{4315D437-5B8C-11D0-BD3B-00A0C911CE86}' = s 'DeviceMoniker' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + ProgId = s 'device.1' + VersionIndependentProgId = s 'device' + } + '{33D9A761-90C8-11D0-BD43-00A0C911CE86}' = s 'ACM Class Manager' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{33D9A760-90C8-11D0-BD43-00A0C911CE86}' = s 'ICM Class Manager' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{083863F1-70DE-11D0-BD40-00A0C911CE86}' = s 'ActiveMovie Filter Class Manager' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{860BB310-5D01-11D0-BD3B-00A0C911CE86}' = s 'VFW Capture Class Manager' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{33D9A762-90C8-11D0-BD43-00A0C911CE86}' = s 'WaveIn Class Manager' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{E0F158E1-CB04-11D0-BD4E-00A0C911CE86}' = s 'WaveOut and DSound Class Manager' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{4EFE2452-168A-11D1-BC76-00C04FB9453B}' = s 'MidiOut Class Manager' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{DA4E3DA0-D07D-11D0-BD50-00A0C911CE86}' = s 'ActiveMovie Filter Categories' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + } + 'device.1' = s 'DeviceMoniker' + { + CLSID = s '{4315D437-5B8C-11D0-BD3B-00A0C911CE86}' + } + 'device' = s 'DeviceMoniker' + { + CLSID = s '{4315D437-5B8C-11D0-BD3B-00A0C911CE86}' + CurVer = s 'device.1' + } +} diff --git a/dll/directx/wine/devenum/devenum_main.c b/dll/directx/wine/devenum/devenum_main.c new file mode 100644 index 00000000000..45314a775c0 --- /dev/null +++ b/dll/directx/wine/devenum/devenum_main.c @@ -0,0 +1,166 @@ +/* + * exported dll functions for devenum.dll + * + * Copyright (C) 2002 John K. Hohm + * Copyright (C) 2002 Robert Shearman + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "devenum_private.h" +#include +#include + +WINE_DEFAULT_DEBUG_CHANNEL(devenum); + +DECLSPEC_HIDDEN LONG dll_refs; +DECLSPEC_HIDDEN HINSTANCE DEVENUM_hInstance; + +typedef struct +{ + REFCLSID clsid; + LPCWSTR friendly_name; + BOOL instance; +} register_info; + +static void DEVENUM_RegisterQuartz(void); + +/*********************************************************************** + * Global string constant definitions + */ +const WCHAR clsid_keyname[6] = { 'C', 'L', 'S', 'I', 'D', 0 }; + +/*********************************************************************** + * DllEntryPoint + */ +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) +{ + TRACE("%p 0x%x %p\n", hinstDLL, fdwReason, fImpLoad); + + switch(fdwReason) { + case DLL_PROCESS_ATTACH: + DEVENUM_hInstance = hinstDLL; + DisableThreadLibraryCalls(hinstDLL); + break; + } + return TRUE; +} + +/*********************************************************************** + * DllGetClassObject (DEVENUM.@) + */ +HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv) +{ + TRACE("(%s, %s, %p)\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv); + + *ppv = NULL; + + /* FIXME: we should really have two class factories. + * Oh well - works just fine as it is */ + if (IsEqualGUID(rclsid, &CLSID_SystemDeviceEnum) || + IsEqualGUID(rclsid, &CLSID_CDeviceMoniker)) + return IClassFactory_QueryInterface(&DEVENUM_ClassFactory.IClassFactory_iface, iid, ppv); + + FIXME("CLSID: %s, IID: %s\n", debugstr_guid(rclsid), debugstr_guid(iid)); + return CLASS_E_CLASSNOTAVAILABLE; +} + +/*********************************************************************** + * DllCanUnloadNow (DEVENUM.@) + */ +HRESULT WINAPI DllCanUnloadNow(void) +{ + return dll_refs != 0 ? S_FALSE : S_OK; +} + +/*********************************************************************** + * DllRegisterServer (DEVENUM.@) + */ +HRESULT WINAPI DllRegisterServer(void) +{ + HRESULT res; + IFilterMapper2 * pMapper = NULL; + LPVOID mapvptr; + + TRACE("\n"); + + res = __wine_register_resources( DEVENUM_hInstance ); + + /* Quartz is needed for IFilterMapper2 */ + DEVENUM_RegisterQuartz(); + +/*** ActiveMovieFilter Categories ***/ + + CoInitialize(NULL); + + res = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC, + &IID_IFilterMapper2, &mapvptr); + if (SUCCEEDED(res)) + { + static const WCHAR friendlyvidcap[] = {'V','i','d','e','o',' ','C','a','p','t','u','r','e',' ','S','o','u','r','c','e','s',0}; + static const WCHAR friendlydshow[] = {'D','i','r','e','c','t','S','h','o','w',' ','F','i','l','t','e','r','s',0}; + static const WCHAR friendlyvidcomp[] = {'V','i','d','e','o',' ','C','o','m','p','r','e','s','s','o','r','s',0}; + static const WCHAR friendlyaudcap[] = {'A','u','d','i','o',' ','C','a','p','t','u','r','e',' ','S','o','u','r','c','e','s',0}; + static const WCHAR friendlyaudcomp[] = {'A','u','d','i','o',' ','C','o','m','p','r','e','s','s','o','r','s',0}; + static const WCHAR friendlyaudrend[] = {'A','u','d','i','o',' ','R','e','n','d','e','r','e','r','s',0}; + static const WCHAR friendlymidirend[] = {'M','i','d','i',' ','R','e','n','d','e','r','e','r','s',0}; + static const WCHAR friendlyextrend[] = {'E','x','t','e','r','n','a','l',' ','R','e','n','d','e','r','e','r','s',0}; + static const WCHAR friendlydevctrl[] = {'D','e','v','i','c','e',' ','C','o','n','t','r','o','l',' ','F','i','l','t','e','r','s',0}; + + pMapper = mapvptr; + + IFilterMapper2_CreateCategory(pMapper, &CLSID_VideoInputDeviceCategory, MERIT_DO_NOT_USE, friendlyvidcap); + IFilterMapper2_CreateCategory(pMapper, &CLSID_LegacyAmFilterCategory, MERIT_NORMAL, friendlydshow); + IFilterMapper2_CreateCategory(pMapper, &CLSID_VideoCompressorCategory, MERIT_DO_NOT_USE, friendlyvidcomp); + IFilterMapper2_CreateCategory(pMapper, &CLSID_AudioInputDeviceCategory, MERIT_DO_NOT_USE, friendlyaudcap); + IFilterMapper2_CreateCategory(pMapper, &CLSID_AudioCompressorCategory, MERIT_DO_NOT_USE, friendlyaudcomp); + IFilterMapper2_CreateCategory(pMapper, &CLSID_AudioRendererCategory, MERIT_NORMAL, friendlyaudrend); + IFilterMapper2_CreateCategory(pMapper, &CLSID_MidiRendererCategory, MERIT_NORMAL, friendlymidirend); + IFilterMapper2_CreateCategory(pMapper, &CLSID_TransmitCategory, MERIT_DO_NOT_USE, friendlyextrend); + IFilterMapper2_CreateCategory(pMapper, &CLSID_DeviceControlCategory, MERIT_DO_NOT_USE, friendlydevctrl); + + IFilterMapper2_Release(pMapper); + } + + CoUninitialize(); + + return res; +} + +/*********************************************************************** + * DllUnregisterServer (DEVENUM.@) + */ +HRESULT WINAPI DllUnregisterServer(void) +{ + FIXME("stub!\n"); + return __wine_unregister_resources( DEVENUM_hInstance ); +} + +typedef HRESULT (WINAPI *DllRegisterServer_func)(void); + +/* calls DllRegisterServer() for the Quartz DLL */ +static void DEVENUM_RegisterQuartz(void) +{ + HANDLE hDLL = LoadLibraryA("quartz.dll"); + DllRegisterServer_func pDllRegisterServer = NULL; + if (hDLL) + pDllRegisterServer = (DllRegisterServer_func)GetProcAddress(hDLL, "DllRegisterServer"); + if (pDllRegisterServer) + { + HRESULT hr = pDllRegisterServer(); + if (FAILED(hr)) + ERR("Failed to register Quartz. Error was 0x%x)\n", hr); + } +} diff --git a/dll/directx/devenum/devenum_private.h b/dll/directx/wine/devenum/devenum_private.h similarity index 80% rename from dll/directx/devenum/devenum_private.h rename to dll/directx/wine/devenum/devenum_private.h index d508cd23314..5ad7cc312d4 100644 --- a/dll/directx/devenum/devenum_private.h +++ b/dll/directx/wine/devenum/devenum_private.h @@ -51,7 +51,7 @@ /********************************************************************** * Dll lifetime tracking declaration for devenum.dll */ -extern LONG dll_refs; +extern LONG dll_refs DECLSPEC_HIDDEN; static inline void DEVENUM_LockModule(void) { InterlockedIncrement(&dll_refs); } static inline void DEVENUM_UnlockModule(void) { InterlockedDecrement(&dll_refs); } @@ -61,45 +61,27 @@ static inline void DEVENUM_UnlockModule(void) { InterlockedDecrement(&dll_refs); */ typedef struct { - const IClassFactoryVtbl *lpVtbl; + IClassFactory IClassFactory_iface; } ClassFactoryImpl; typedef struct { - const ICreateDevEnumVtbl *lpVtbl; -} CreateDevEnumImpl; - -typedef struct -{ - const IParseDisplayNameVtbl *lpVtbl; -} ParseDisplayNameImpl; - -typedef struct -{ - const IEnumMonikerVtbl *lpVtbl; - LONG ref; - DWORD index; - HKEY hkey; -} EnumMonikerImpl; - -typedef struct -{ - const IMonikerVtbl *lpVtbl; + IMoniker IMoniker_iface; LONG ref; HKEY hkey; } MediaCatMoniker; -MediaCatMoniker * DEVENUM_IMediaCatMoniker_Construct(void); -HRESULT DEVENUM_IEnumMoniker_Construct(HKEY hkey, IEnumMoniker ** ppEnumMoniker); +MediaCatMoniker * DEVENUM_IMediaCatMoniker_Construct(void) DECLSPEC_HIDDEN; +HRESULT DEVENUM_IEnumMoniker_Construct(HKEY hkey, IEnumMoniker ** ppEnumMoniker) DECLSPEC_HIDDEN; -extern ClassFactoryImpl DEVENUM_ClassFactory; -extern CreateDevEnumImpl DEVENUM_CreateDevEnum; -extern ParseDisplayNameImpl DEVENUM_ParseDisplayName; +extern ClassFactoryImpl DEVENUM_ClassFactory DECLSPEC_HIDDEN; +extern ICreateDevEnum DEVENUM_CreateDevEnum DECLSPEC_HIDDEN; +extern IParseDisplayName DEVENUM_ParseDisplayName DECLSPEC_HIDDEN; /********************************************************************** * Private helper function to get AM filter category key location */ -HRESULT DEVENUM_GetCategoryKey(REFCLSID clsidDeviceClass, HKEY *pBaseKey, WCHAR *wszRegKeyName, UINT maxLen); +HRESULT DEVENUM_GetCategoryKey(REFCLSID clsidDeviceClass, HKEY *pBaseKey, WCHAR *wszRegKeyName, UINT maxLen) DECLSPEC_HIDDEN; /********************************************************************** * Global string constant declarations diff --git a/dll/directx/devenum/factory.c b/dll/directx/wine/devenum/factory.c similarity index 82% rename from dll/directx/devenum/factory.c rename to dll/directx/wine/devenum/factory.c index 29d86ee0348..7338e6d91ff 100644 --- a/dll/directx/devenum/factory.c +++ b/dll/directx/wine/devenum/factory.c @@ -28,12 +28,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(devenum); /********************************************************************** * DEVENUM_IClassFactory_QueryInterface (also IUnknown) */ -static HRESULT WINAPI DEVENUM_IClassFactory_QueryInterface( - LPCLASSFACTORY iface, - REFIID riid, - LPVOID *ppvObj) +static HRESULT WINAPI DEVENUM_IClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, + void **ppvObj) { - TRACE("\n\tIID:\t%s\n",debugstr_guid(riid)); + TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppvObj); if (ppvObj == NULL) return E_POINTER; @@ -56,7 +54,7 @@ static HRESULT WINAPI DEVENUM_IClassFactory_QueryInterface( /********************************************************************** * DEVENUM_IClassFactory_AddRef (also IUnknown) */ -static ULONG WINAPI DEVENUM_IClassFactory_AddRef(LPCLASSFACTORY iface) +static ULONG WINAPI DEVENUM_IClassFactory_AddRef(IClassFactory *iface) { TRACE("\n"); @@ -68,7 +66,7 @@ static ULONG WINAPI DEVENUM_IClassFactory_AddRef(LPCLASSFACTORY iface) /********************************************************************** * DEVENUM_IClassFactory_Release (also IUnknown) */ -static ULONG WINAPI DEVENUM_IClassFactory_Release(LPCLASSFACTORY iface) +static ULONG WINAPI DEVENUM_IClassFactory_Release(IClassFactory *iface) { TRACE("\n"); @@ -80,13 +78,10 @@ static ULONG WINAPI DEVENUM_IClassFactory_Release(LPCLASSFACTORY iface) /********************************************************************** * DEVENUM_IClassFactory_CreateInstance */ -static HRESULT WINAPI DEVENUM_IClassFactory_CreateInstance( - LPCLASSFACTORY iface, - LPUNKNOWN pUnkOuter, - REFIID riid, - LPVOID *ppvObj) +static HRESULT WINAPI DEVENUM_IClassFactory_CreateInstance(IClassFactory *iface, + IUnknown *pUnkOuter, REFIID riid, void **ppvObj) { - TRACE("\n\tIID:\t%s\n",debugstr_guid(riid)); + TRACE("(%p)->(%p, %s, %p)\n", iface, pUnkOuter, debugstr_guid(riid), ppvObj); if (ppvObj == NULL) return E_POINTER; @@ -110,9 +105,7 @@ static HRESULT WINAPI DEVENUM_IClassFactory_CreateInstance( /********************************************************************** * DEVENUM_IClassFactory_LockServer */ -static HRESULT WINAPI DEVENUM_IClassFactory_LockServer( - LPCLASSFACTORY iface, - BOOL fLock) +static HRESULT WINAPI DEVENUM_IClassFactory_LockServer(IClassFactory *iface, BOOL fLock) { TRACE("\n"); @@ -138,4 +131,4 @@ static const IClassFactoryVtbl IClassFactory_Vtbl = /********************************************************************** * static ClassFactory instance */ -ClassFactoryImpl DEVENUM_ClassFactory = { &IClassFactory_Vtbl }; +ClassFactoryImpl DEVENUM_ClassFactory = { { &IClassFactory_Vtbl } }; diff --git a/dll/directx/devenum/mediacatenum.c b/dll/directx/wine/devenum/mediacatenum.c similarity index 73% rename from dll/directx/devenum/mediacatenum.c rename to dll/directx/wine/devenum/mediacatenum.c index c360684d8f8..6076e43fb48 100644 --- a/dll/directx/devenum/mediacatenum.c +++ b/dll/directx/wine/devenum/mediacatenum.c @@ -30,24 +30,33 @@ WINE_DEFAULT_DEBUG_CHANNEL(devenum); -static ULONG WINAPI DEVENUM_IEnumMoniker_AddRef(LPENUMMONIKER iface); -static ULONG WINAPI DEVENUM_IMediaCatMoniker_AddRef(LPMONIKER iface); -static ULONG WINAPI DEVENUM_IPropertyBag_AddRef(LPPROPERTYBAG iface); +typedef struct +{ + IEnumMoniker IEnumMoniker_iface; + LONG ref; + DWORD index; + HKEY hkey; +} EnumMonikerImpl; typedef struct { - const IPropertyBagVtbl *lpVtbl; + IPropertyBag IPropertyBag_iface; LONG ref; HKEY hkey; } RegPropBagImpl; +static inline RegPropBagImpl *impl_from_IPropertyBag(IPropertyBag *iface) +{ + return CONTAINING_RECORD(iface, RegPropBagImpl, IPropertyBag_iface); +} + static HRESULT WINAPI DEVENUM_IPropertyBag_QueryInterface( LPPROPERTYBAG iface, REFIID riid, LPVOID *ppvObj) { - RegPropBagImpl *This = (RegPropBagImpl *)iface; + RegPropBagImpl *This = impl_from_IPropertyBag(iface); TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppvObj); @@ -57,7 +66,7 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_QueryInterface( IsEqualGUID(riid, &IID_IPropertyBag)) { *ppvObj = iface; - DEVENUM_IPropertyBag_AddRef(iface); + IPropertyBag_AddRef(iface); return S_OK; } @@ -70,7 +79,7 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_QueryInterface( */ static ULONG WINAPI DEVENUM_IPropertyBag_AddRef(LPPROPERTYBAG iface) { - RegPropBagImpl *This = (RegPropBagImpl *)iface; + RegPropBagImpl *This = impl_from_IPropertyBag(iface); TRACE("(%p)->() AddRef from %d\n", iface, This->ref); @@ -82,7 +91,7 @@ static ULONG WINAPI DEVENUM_IPropertyBag_AddRef(LPPROPERTYBAG iface) */ static ULONG WINAPI DEVENUM_IPropertyBag_Release(LPPROPERTYBAG iface) { - RegPropBagImpl *This = (RegPropBagImpl *)iface; + RegPropBagImpl *This = impl_from_IPropertyBag(iface); ULONG ref; TRACE("(%p)->() ReleaseThis->ref from %d\n", iface, This->ref); @@ -105,7 +114,7 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_Read( LPVOID pData = NULL; DWORD received; DWORD type = 0; - RegPropBagImpl *This = (RegPropBagImpl *)iface; + RegPropBagImpl *This = impl_from_IPropertyBag(iface); HRESULT res = S_OK; LONG reswin32; @@ -212,7 +221,7 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_Write( LPCOLESTR pszPropName, VARIANT* pVar) { - RegPropBagImpl *This = (RegPropBagImpl *)iface; + RegPropBagImpl *This = impl_from_IPropertyBag(iface); LPVOID lpData = NULL; DWORD cbData = 0; DWORD dwType = 0; @@ -223,6 +232,7 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_Write( switch (V_VT(pVar)) { case VT_BSTR: + case VT_LPWSTR: TRACE("writing %s\n", debugstr_w(V_UNION(pVar, bstrVal))); lpData = V_UNION(pVar, bstrVal); dwType = REG_SZ; @@ -277,62 +287,60 @@ static HRESULT DEVENUM_IPropertyBag_Construct(HANDLE hkey, IPropertyBag **ppBag) RegPropBagImpl * rpb = CoTaskMemAlloc(sizeof(RegPropBagImpl)); if (!rpb) return E_OUTOFMEMORY; - rpb->lpVtbl = &IPropertyBag_Vtbl; + rpb->IPropertyBag_iface.lpVtbl = &IPropertyBag_Vtbl; rpb->ref = 1; rpb->hkey = hkey; - *ppBag = (IPropertyBag*)rpb; + *ppBag = &rpb->IPropertyBag_iface; DEVENUM_LockModule(); return S_OK; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_QueryInterface( - LPMONIKER iface, - REFIID riid, - LPVOID *ppvObj) +static inline MediaCatMoniker *impl_from_IMoniker(IMoniker *iface) +{ + return CONTAINING_RECORD(iface, MediaCatMoniker, IMoniker_iface); +} + +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_QueryInterface(IMoniker *iface, REFIID riid, + void **ppv) { - MediaCatMoniker *This = (MediaCatMoniker *)iface; TRACE("\n\tIID:\t%s\n",debugstr_guid(riid)); - if (This == NULL || ppvObj == NULL) return E_POINTER; - - *ppvObj = NULL; + if (!ppv) + return E_POINTER; if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IPersist) || IsEqualGUID(riid, &IID_IPersistStream) || IsEqualGUID(riid, &IID_IMoniker)) { - *ppvObj = iface; - DEVENUM_IMediaCatMoniker_AddRef(iface); + *ppv = iface; + IMoniker_AddRef(iface); return S_OK; } FIXME("- no interface IID: %s\n", debugstr_guid(riid)); + *ppv = NULL; return E_NOINTERFACE; } -/********************************************************************** - * DEVENUM_IMediaCatMoniker_AddRef (also IUnknown) - */ -static ULONG WINAPI DEVENUM_IMediaCatMoniker_AddRef(LPMONIKER iface) +static ULONG WINAPI DEVENUM_IMediaCatMoniker_AddRef(IMoniker *iface) { - MediaCatMoniker *This = (MediaCatMoniker *)iface; - TRACE("\n"); + MediaCatMoniker *This = impl_from_IMoniker(iface); + ULONG ref = InterlockedIncrement(&This->ref); - return InterlockedIncrement(&This->ref); + TRACE("(%p) ref=%d\n", This, ref); + + return ref; } -/********************************************************************** - * DEVENUM_IMediaCatMoniker_Release (also IUnknown) - */ -static ULONG WINAPI DEVENUM_IMediaCatMoniker_Release(LPMONIKER iface) +static ULONG WINAPI DEVENUM_IMediaCatMoniker_Release(IMoniker *iface) { - MediaCatMoniker *This = (MediaCatMoniker *)iface; - ULONG ref; - TRACE("\n"); + MediaCatMoniker *This = impl_from_IMoniker(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p) ref=%d\n", This, ref); - ref = InterlockedDecrement(&This->ref); if (ref == 0) { RegCloseKey(This->hkey); CoTaskMemFree(This); @@ -341,11 +349,10 @@ static ULONG WINAPI DEVENUM_IMediaCatMoniker_Release(LPMONIKER iface) return ref; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_GetClassID( - LPMONIKER iface, - CLSID* pClassID) +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_GetClassID(IMoniker *iface, CLSID *pClassID) { - MediaCatMoniker *This = (MediaCatMoniker *)iface; + MediaCatMoniker *This = impl_from_IMoniker(iface); + FIXME("(%p)->(%p): stub\n", This, pClassID); if (pClassID == NULL) @@ -354,30 +361,28 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_GetClassID( return E_NOTIMPL; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_IsDirty(LPMONIKER iface) +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_IsDirty(IMoniker *iface) { FIXME("(%p)->(): stub\n", iface); return S_FALSE; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_Load(LPMONIKER iface, IStream* pStm) +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_Load(IMoniker *iface, IStream *pStm) { FIXME("(%p)->(%p): stub\n", iface, pStm); return E_NOTIMPL; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_Save(LPMONIKER iface, IStream* pStm, BOOL fClearDirty) +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_Save(IMoniker *iface, IStream *pStm, BOOL fClearDirty) { FIXME("(%p)->(%p, %s): stub\n", iface, pStm, fClearDirty ? "true" : "false"); return STG_E_CANTSAVE; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_GetSizeMax( - LPMONIKER iface, - ULARGE_INTEGER* pcbSize) +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_GetSizeMax(IMoniker *iface, ULARGE_INTEGER *pcbSize) { FIXME("(%p)->(%p): stub\n", iface, pcbSize); @@ -386,25 +391,19 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_GetSizeMax( return S_OK; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToObject( - LPMONIKER iface, - IBindCtx* pbc, - IMoniker* pmkToLeft, - REFIID riidResult, - void** ppvResult) +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToObject(IMoniker *iface, IBindCtx *pbc, + IMoniker *pmkToLeft, REFIID riidResult, void **ppvResult) { + MediaCatMoniker *This = impl_from_IMoniker(iface); IUnknown * pObj = NULL; IPropertyBag * pProp = NULL; CLSID clsID; VARIANT var; HRESULT res = E_FAIL; - MediaCatMoniker *This = (MediaCatMoniker *)iface; - - VariantInit(&var); - TRACE("(%p)->(%p, %p, %s, %p)\n", This, pbc, pmkToLeft, debugstr_guid(riidResult), ppvResult); + VariantInit(&var); *ppvResult = NULL; if(pmkToLeft==NULL) @@ -458,21 +457,28 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToObject( return res; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToStorage( - LPMONIKER iface, - IBindCtx* pbc, - IMoniker* pmkToLeft, - REFIID riid, - void** ppvObj) +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToStorage(IMoniker *iface, IBindCtx *pbc, + IMoniker *pmkToLeft, REFIID riid, void **ppvObj) { - MediaCatMoniker *This = (MediaCatMoniker *)iface; + MediaCatMoniker *This = impl_from_IMoniker(iface); + TRACE("(%p)->(%p, %p, %s, %p)\n", This, pbc, pmkToLeft, debugstr_guid(riid), ppvObj); *ppvObj = NULL; - if (pbc || pmkToLeft) + if (pmkToLeft) return MK_E_NOSTORAGE; + if (pbc != NULL) + { + static DWORD reported; + if (!reported) + { + FIXME("ignoring IBindCtx %p\n", pbc); + reported++; + } + } + if (IsEqualGUID(riid, &IID_IPropertyBag)) { HANDLE hkey; @@ -483,12 +489,8 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToStorage( return MK_E_NOSTORAGE; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_Reduce( - LPMONIKER iface, - IBindCtx* pbc, - DWORD dwReduceHowFar, - IMoniker** ppmkToLeft, - IMoniker** ppmkReduced) +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_Reduce(IMoniker *iface, IBindCtx *pbc, + DWORD dwReduceHowFar, IMoniker **ppmkToLeft, IMoniker **ppmkReduced) { TRACE("(%p)->(%p, %d, %p, %p)\n", iface, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced); @@ -499,11 +501,8 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_Reduce( return MK_S_REDUCED_TO_SELF; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_ComposeWith( - LPMONIKER iface, - IMoniker* pmkRight, - BOOL fOnlyIfNotGeneric, - IMoniker** ppmkComposite) +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_ComposeWith(IMoniker *iface, IMoniker *pmkRight, + BOOL fOnlyIfNotGeneric, IMoniker **ppmkComposite) { FIXME("(%p)->(%p, %s, %p): stub\n", iface, pmkRight, fOnlyIfNotGeneric ? "true" : "false", ppmkComposite); @@ -513,10 +512,8 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_ComposeWith( return E_NOTIMPL; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_Enum( - LPMONIKER iface, - BOOL fForward, - IEnumMoniker** ppenumMoniker) +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_Enum(IMoniker *iface, BOOL fForward, + IEnumMoniker **ppenumMoniker) { FIXME("(%p)->(%s, %p): stub\n", iface, fForward ? "true" : "false", ppenumMoniker); @@ -525,18 +522,14 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_Enum( return S_OK; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_IsEqual( - LPMONIKER iface, - IMoniker* pmkOtherMoniker) +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_IsEqual(IMoniker *iface, IMoniker *pmkOtherMoniker) { FIXME("(%p)->(%p): stub\n", iface, pmkOtherMoniker); return E_NOTIMPL; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_Hash( - LPMONIKER iface, - DWORD* pdwHash) +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_Hash(IMoniker *iface, DWORD *pdwHash) { TRACE("(%p)->(%p)\n", iface, pdwHash); @@ -545,22 +538,16 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_Hash( return S_OK; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_IsRunning( - LPMONIKER iface, - IBindCtx* pbc, - IMoniker* pmkToLeft, - IMoniker* pmkNewlyRunning) +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_IsRunning(IMoniker *iface, IBindCtx *pbc, + IMoniker *pmkToLeft, IMoniker *pmkNewlyRunning) { FIXME("(%p)->(%p, %p, %p): stub\n", iface, pbc, pmkToLeft, pmkNewlyRunning); return S_FALSE; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_GetTimeOfLastChange( - LPMONIKER iface, - IBindCtx* pbc, - IMoniker* pmkToLeft, - FILETIME* pFileTime) +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_GetTimeOfLastChange(IMoniker *iface, IBindCtx *pbc, + IMoniker *pmkToLeft, FILETIME *pFileTime) { TRACE("(%p)->(%p, %p, %p)\n", iface, pbc, pmkToLeft, pFileTime); @@ -570,9 +557,7 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_GetTimeOfLastChange( return MK_E_UNAVAILABLE; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_Inverse( - LPMONIKER iface, - IMoniker** ppmk) +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_Inverse(IMoniker *iface, IMoniker **ppmk) { TRACE("(%p)->(%p)\n", iface, ppmk); @@ -581,10 +566,8 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_Inverse( return MK_E_NOINVERSE; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_CommonPrefixWith( - LPMONIKER iface, - IMoniker* pmkOtherMoniker, - IMoniker** ppmkPrefix) +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_CommonPrefixWith(IMoniker *iface, + IMoniker *pmkOtherMoniker, IMoniker **ppmkPrefix) { TRACE("(%p)->(%p, %p)\n", iface, pmkOtherMoniker, ppmkPrefix); @@ -593,10 +576,8 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_CommonPrefixWith( return MK_E_NOPREFIX; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_RelativePathTo( - LPMONIKER iface, - IMoniker* pmkOther, - IMoniker** ppmkRelPath) +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_RelativePathTo(IMoniker *iface, IMoniker *pmkOther, + IMoniker **ppmkRelPath) { TRACE("(%p)->(%p, %p)\n", iface, pmkOther, ppmkRelPath); @@ -605,13 +586,10 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_RelativePathTo( return MK_S_HIM; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_GetDisplayName( - LPMONIKER iface, - IBindCtx* pbc, - IMoniker* pmkToLeft, - LPOLESTR* ppszDisplayName) +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_GetDisplayName(IMoniker *iface, IBindCtx *pbc, + IMoniker *pmkToLeft, LPOLESTR *ppszDisplayName) { - MediaCatMoniker *This = (MediaCatMoniker *)iface; + MediaCatMoniker *This = impl_from_IMoniker(iface); WCHAR wszBuffer[MAX_PATH]; static const WCHAR wszFriendlyName[] = {'F','r','i','e','n','d','l','y','N','a','m','e',0}; LONG received = sizeof(wszFriendlyName); @@ -631,13 +609,8 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_GetDisplayName( return E_FAIL; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_ParseDisplayName( - LPMONIKER iface, - IBindCtx* pbc, - IMoniker* pmkToLeft, - LPOLESTR pszDisplayName, - ULONG* pchEaten, - IMoniker** ppmkOut) +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_ParseDisplayName(IMoniker *iface, IBindCtx *pbc, + IMoniker *pmkToLeft, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut) { FIXME("(%p)->(%p, %p, %s, %p, %p)\n", iface, pbc, pmkToLeft, debugstr_w(pszDisplayName), pchEaten, ppmkOut); @@ -647,9 +620,7 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_ParseDisplayName( return MK_E_SYNTAX; } -static HRESULT WINAPI DEVENUM_IMediaCatMoniker_IsSystemMoniker( - LPMONIKER iface, - DWORD* pdwMksys) +static HRESULT WINAPI DEVENUM_IMediaCatMoniker_IsSystemMoniker(IMoniker *iface, DWORD *pdwMksys) { TRACE("(%p)->(%p)\n", iface, pdwMksys); @@ -690,65 +661,59 @@ MediaCatMoniker * DEVENUM_IMediaCatMoniker_Construct(void) if (!pMoniker) return NULL; - pMoniker->lpVtbl = &IMoniker_Vtbl; + pMoniker->IMoniker_iface.lpVtbl = &IMoniker_Vtbl; pMoniker->ref = 0; pMoniker->hkey = NULL; - DEVENUM_IMediaCatMoniker_AddRef((LPMONIKER)pMoniker); + DEVENUM_IMediaCatMoniker_AddRef(&pMoniker->IMoniker_iface); DEVENUM_LockModule(); return pMoniker; } -/********************************************************************** - * DEVENUM_IEnumMoniker_QueryInterface (also IUnknown) - */ -static HRESULT WINAPI DEVENUM_IEnumMoniker_QueryInterface( - LPENUMMONIKER iface, - REFIID riid, - LPVOID *ppvObj) +static inline EnumMonikerImpl *impl_from_IEnumMoniker(IEnumMoniker *iface) { - EnumMonikerImpl *This = (EnumMonikerImpl *)iface; + return CONTAINING_RECORD(iface, EnumMonikerImpl, IEnumMoniker_iface); +} - TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppvObj); +static HRESULT WINAPI DEVENUM_IEnumMoniker_QueryInterface(IEnumMoniker *iface, REFIID riid, + void **ppv) +{ + TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv); - if (This == NULL || ppvObj == NULL) return E_POINTER; + if (!ppv) + return E_POINTER; if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IEnumMoniker)) { - *ppvObj = iface; - DEVENUM_IEnumMoniker_AddRef(iface); + *ppv = iface; + IEnumMoniker_AddRef(iface); return S_OK; } FIXME("- no interface IID: %s\n", debugstr_guid(riid)); + *ppv = NULL; return E_NOINTERFACE; } -/********************************************************************** - * DEVENUM_IEnumMoniker_AddRef (also IUnknown) - */ -static ULONG WINAPI DEVENUM_IEnumMoniker_AddRef(LPENUMMONIKER iface) +static ULONG WINAPI DEVENUM_IEnumMoniker_AddRef(IEnumMoniker *iface) { - EnumMonikerImpl *This = (EnumMonikerImpl *)iface; + EnumMonikerImpl *This = impl_from_IEnumMoniker(iface); ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p)->() AddRef from %d\n", iface, ref - 1); + TRACE("(%p) ref=%d\n", This, ref); return ref; } -/********************************************************************** - * DEVENUM_IEnumMoniker_Release (also IUnknown) - */ -static ULONG WINAPI DEVENUM_IEnumMoniker_Release(LPENUMMONIKER iface) +static ULONG WINAPI DEVENUM_IEnumMoniker_Release(IEnumMoniker *iface) { - EnumMonikerImpl *This = (EnumMonikerImpl *)iface; + EnumMonikerImpl *This = impl_from_IEnumMoniker(iface); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p)->() Release from %d\n", iface, ref + 1); + TRACE("(%p) ref=%d\n", This, ref); if (!ref) { @@ -760,13 +725,14 @@ static ULONG WINAPI DEVENUM_IEnumMoniker_Release(LPENUMMONIKER iface) return ref; } -static HRESULT WINAPI DEVENUM_IEnumMoniker_Next(LPENUMMONIKER iface, ULONG celt, IMoniker ** rgelt, ULONG * pceltFetched) +static HRESULT WINAPI DEVENUM_IEnumMoniker_Next(IEnumMoniker *iface, ULONG celt, IMoniker **rgelt, + ULONG *pceltFetched) { + EnumMonikerImpl *This = impl_from_IEnumMoniker(iface); WCHAR buffer[MAX_PATH + 1]; LONG res; ULONG fetched = 0; MediaCatMoniker * pMoniker; - EnumMonikerImpl *This = (EnumMonikerImpl *)iface; TRACE("(%p)->(%d, %p, %p)\n", iface, celt, rgelt, pceltFetched); @@ -783,10 +749,10 @@ static HRESULT WINAPI DEVENUM_IEnumMoniker_Next(LPENUMMONIKER iface, ULONG celt, if (RegOpenKeyW(This->hkey, buffer, &pMoniker->hkey) != ERROR_SUCCESS) { - DEVENUM_IMediaCatMoniker_Release((LPMONIKER)pMoniker); + IMoniker_Release(&pMoniker->IMoniker_iface); break; } - rgelt[fetched] = (LPMONIKER)pMoniker; + rgelt[fetched] = &pMoniker->IMoniker_iface; fetched++; } @@ -803,15 +769,15 @@ static HRESULT WINAPI DEVENUM_IEnumMoniker_Next(LPENUMMONIKER iface, ULONG celt, return S_OK; } -static HRESULT WINAPI DEVENUM_IEnumMoniker_Skip(LPENUMMONIKER iface, ULONG celt) +static HRESULT WINAPI DEVENUM_IEnumMoniker_Skip(IEnumMoniker *iface, ULONG celt) { - EnumMonikerImpl *This = (EnumMonikerImpl *)iface; + EnumMonikerImpl *This = impl_from_IEnumMoniker(iface); DWORD subKeys; TRACE("(%p)->(%d)\n", iface, celt); - /* Before incrementing, check if there are any more values to run thru. - Some programs use the Skip() function to get the amount of devices */ + /* Before incrementing, check if there are any more values to run through. + Some programs use the Skip() function to get the number of devices */ if(RegQueryInfoKeyW(This->hkey, NULL, NULL, NULL, &subKeys, NULL, NULL, NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) { return S_FALSE; @@ -826,9 +792,9 @@ static HRESULT WINAPI DEVENUM_IEnumMoniker_Skip(LPENUMMONIKER iface, ULONG celt) return S_OK; } -static HRESULT WINAPI DEVENUM_IEnumMoniker_Reset(LPENUMMONIKER iface) +static HRESULT WINAPI DEVENUM_IEnumMoniker_Reset(IEnumMoniker *iface) { - EnumMonikerImpl *This = (EnumMonikerImpl *)iface; + EnumMonikerImpl *This = impl_from_IEnumMoniker(iface); TRACE("(%p)->()\n", iface); @@ -837,7 +803,7 @@ static HRESULT WINAPI DEVENUM_IEnumMoniker_Reset(LPENUMMONIKER iface) return S_OK; } -static HRESULT WINAPI DEVENUM_IEnumMoniker_Clone(LPENUMMONIKER iface, IEnumMoniker ** ppenum) +static HRESULT WINAPI DEVENUM_IEnumMoniker_Clone(IEnumMoniker *iface, IEnumMoniker **ppenum) { FIXME("(%p)->(%p): stub\n", iface, ppenum); @@ -864,12 +830,12 @@ HRESULT DEVENUM_IEnumMoniker_Construct(HKEY hkey, IEnumMoniker ** ppEnumMoniker) if (!pEnumMoniker) return E_OUTOFMEMORY; - pEnumMoniker->lpVtbl = &IEnumMoniker_Vtbl; + pEnumMoniker->IEnumMoniker_iface.lpVtbl = &IEnumMoniker_Vtbl; pEnumMoniker->ref = 1; pEnumMoniker->index = 0; pEnumMoniker->hkey = hkey; - *ppEnumMoniker = (IEnumMoniker *)pEnumMoniker; + *ppEnumMoniker = &pEnumMoniker->IEnumMoniker_iface; DEVENUM_LockModule(); diff --git a/dll/directx/devenum/parsedisplayname.c b/dll/directx/wine/devenum/parsedisplayname.c similarity index 80% rename from dll/directx/devenum/parsedisplayname.c rename to dll/directx/wine/devenum/parsedisplayname.c index 05db97eb091..cb7ab073d24 100644 --- a/dll/directx/devenum/parsedisplayname.c +++ b/dll/directx/wine/devenum/parsedisplayname.c @@ -27,31 +27,28 @@ WINE_DEFAULT_DEBUG_CHANNEL(devenum); -static HRESULT WINAPI DEVENUM_IParseDisplayName_QueryInterface( - LPPARSEDISPLAYNAME iface, - REFIID riid, - LPVOID *ppvObj) +static HRESULT WINAPI DEVENUM_IParseDisplayName_QueryInterface(IParseDisplayName *iface, + REFIID riid, void **ppv) { TRACE("\n\tIID:\t%s\n",debugstr_guid(riid)); - if (ppvObj == NULL) return E_POINTER; + if (!ppv) + return E_POINTER; if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IParseDisplayName)) { - *ppvObj = iface; - IParseDisplayName_AddRef(iface); - return S_OK; + *ppv = iface; + IParseDisplayName_AddRef(iface); + return S_OK; } FIXME("- no interface IID: %s\n", debugstr_guid(riid)); + *ppv = NULL; return E_NOINTERFACE; } -/********************************************************************** - * DEVENUM_IParseDisplayName_AddRef (also IUnknown) - */ -static ULONG WINAPI DEVENUM_IParseDisplayName_AddRef(LPPARSEDISPLAYNAME iface) +static ULONG WINAPI DEVENUM_IParseDisplayName_AddRef(IParseDisplayName *iface) { TRACE("\n"); @@ -60,10 +57,7 @@ static ULONG WINAPI DEVENUM_IParseDisplayName_AddRef(LPPARSEDISPLAYNAME iface) return 2; /* non-heap based object */ } -/********************************************************************** - * DEVENUM_IParseDisplayName_Release (also IUnknown) - */ -static ULONG WINAPI DEVENUM_IParseDisplayName_Release(LPPARSEDISPLAYNAME iface) +static ULONG WINAPI DEVENUM_IParseDisplayName_Release(IParseDisplayName *iface) { TRACE("\n"); @@ -81,12 +75,8 @@ static ULONG WINAPI DEVENUM_IParseDisplayName_Release(LPPARSEDISPLAYNAME iface) * Might not handle more complicated strings properly (ie anything * not in "@device:sw:{CLSID1}\" format */ -static HRESULT WINAPI DEVENUM_IParseDisplayName_ParseDisplayName( - LPPARSEDISPLAYNAME iface, - IBindCtx *pbc, - LPOLESTR pszDisplayName, - ULONG *pchEaten, - IMoniker **ppmkOut) +static HRESULT WINAPI DEVENUM_IParseDisplayName_ParseDisplayName(IParseDisplayName *iface, + IBindCtx *pbc, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut) { LPOLESTR pszBetween = NULL; LPOLESTR pszClass = NULL; @@ -136,10 +126,10 @@ static HRESULT WINAPI DEVENUM_IParseDisplayName_ParseDisplayName( strcatW(wszRegKeyName, pszBetween); if (RegCreateKeyW(hbasekey, wszRegKeyName, &pMoniker->hkey) == ERROR_SUCCESS) - *ppmkOut = (LPMONIKER)pMoniker; + *ppmkOut = &pMoniker->IMoniker_iface; else { - IMoniker_Release((LPMONIKER)pMoniker); + IMoniker_Release(&pMoniker->IMoniker_iface); res = MK_E_NOOBJECT; } } @@ -163,4 +153,4 @@ static const IParseDisplayNameVtbl IParseDisplayName_Vtbl = }; /* The one instance of this class */ -ParseDisplayNameImpl DEVENUM_ParseDisplayName = { &IParseDisplayName_Vtbl }; +IParseDisplayName DEVENUM_ParseDisplayName = { &IParseDisplayName_Vtbl }; diff --git a/dll/directx/dinput/CMakeLists.txt b/dll/directx/wine/dinput/CMakeLists.txt similarity index 80% rename from dll/directx/dinput/CMakeLists.txt rename to dll/directx/wine/dinput/CMakeLists.txt index 7a626fc6540..c7d9ed2bf5d 100644 --- a/dll/directx/dinput/CMakeLists.txt +++ b/dll/directx/wine/dinput/CMakeLists.txt @@ -1,13 +1,9 @@ -remove_definitions(-D_WIN32_WINNT=0x502) -add_definitions(-D_WIN32_WINNT=0x600) - add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - spec2def(dinput.dll dinput.spec ADD_IMPORTLIB) -add_library(dinput SHARED +list(APPEND SOURCE config.c data_formats.c device.c @@ -19,12 +15,12 @@ add_library(dinput SHARED joystick_osx.c keyboard.c mouse.c - dinput.rc ${CMAKE_CURRENT_BINARY_DIR}/dinput.def) +add_library(dinput SHARED ${SOURCE} dinput.rc) add_library(dinput_data_formats data_formats.c) add_dependencies(dinput_data_formats psdk) -set_module_type(dinput win32dll UNICODE) +set_module_type(dinput win32dll) target_link_libraries(dinput dxguid uuid wine) add_importlibs(dinput comctl32 ole32 user32 advapi32 msvcrt kernel32 ntdll) add_cd_file(TARGET dinput DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/dinput/config.c b/dll/directx/wine/dinput/config.c similarity index 100% rename from dll/directx/dinput/config.c rename to dll/directx/wine/dinput/config.c diff --git a/dll/directx/dinput/data_formats.c b/dll/directx/wine/dinput/data_formats.c similarity index 100% rename from dll/directx/dinput/data_formats.c rename to dll/directx/wine/dinput/data_formats.c diff --git a/dll/directx/dinput/device.c b/dll/directx/wine/dinput/device.c similarity index 99% rename from dll/directx/dinput/device.c rename to dll/directx/wine/dinput/device.c index d5f6a319686..bb9eae80672 100644 --- a/dll/directx/dinput/device.c +++ b/dll/directx/wine/dinput/device.c @@ -145,13 +145,13 @@ void _dump_DIPROPHEADER(LPCDIPROPHEADER diph) { } void _dump_OBJECTINSTANCEA(const DIDEVICEOBJECTINSTANCEA *ddoi) { - TRACE(" - enumerating : %s ('%s') - %2d - 0x%08x - %s\n", - debugstr_guid(&ddoi->guidType), _dump_dinput_GUID(&ddoi->guidType), ddoi->dwOfs, ddoi->dwType, ddoi->tszName); + TRACE(" - enumerating : %s ('%s') - %2d - 0x%08x - %s - 0x%x\n", + debugstr_guid(&ddoi->guidType), _dump_dinput_GUID(&ddoi->guidType), ddoi->dwOfs, ddoi->dwType, ddoi->tszName, ddoi->dwFlags); } void _dump_OBJECTINSTANCEW(const DIDEVICEOBJECTINSTANCEW *ddoi) { - TRACE(" - enumerating : %s ('%s'), - %2d - 0x%08x - %s\n", - debugstr_guid(&ddoi->guidType), _dump_dinput_GUID(&ddoi->guidType), ddoi->dwOfs, ddoi->dwType, debugstr_w(ddoi->tszName)); + TRACE(" - enumerating : %s ('%s'), - %2d - 0x%08x - %s - 0x%x\n", + debugstr_guid(&ddoi->guidType), _dump_dinput_GUID(&ddoi->guidType), ddoi->dwOfs, ddoi->dwType, debugstr_w(ddoi->tszName), ddoi->dwFlags); } /* This function is a helper to convert a GUID into any possible DInput GUID out there */ diff --git a/dll/directx/dinput/device_private.h b/dll/directx/wine/dinput/device_private.h similarity index 100% rename from dll/directx/dinput/device_private.h rename to dll/directx/wine/dinput/device_private.h diff --git a/dll/directx/dinput/dinput.rc b/dll/directx/wine/dinput/dinput.rc similarity index 100% rename from dll/directx/dinput/dinput.rc rename to dll/directx/wine/dinput/dinput.rc diff --git a/dll/directx/dinput/dinput.spec b/dll/directx/wine/dinput/dinput.spec similarity index 100% rename from dll/directx/dinput/dinput.spec rename to dll/directx/wine/dinput/dinput.spec diff --git a/dll/directx/dinput/dinput_classes.idl b/dll/directx/wine/dinput/dinput_classes.idl similarity index 100% rename from dll/directx/dinput/dinput_classes.idl rename to dll/directx/wine/dinput/dinput_classes.idl diff --git a/dll/directx/dinput/dinput_classes.rgs b/dll/directx/wine/dinput/dinput_classes.rgs similarity index 100% rename from dll/directx/dinput/dinput_classes.rgs rename to dll/directx/wine/dinput/dinput_classes.rgs diff --git a/dll/directx/dinput/dinput_main.c b/dll/directx/wine/dinput/dinput_main.c similarity index 97% rename from dll/directx/dinput/dinput_main.c rename to dll/directx/wine/dinput/dinput_main.c index 4d6b56aff70..6beed0ea1c2 100644 --- a/dll/directx/dinput/dinput_main.c +++ b/dll/directx/wine/dinput/dinput_main.c @@ -375,17 +375,17 @@ static HRESULT WINAPI IDirectInputAImpl_EnumDevices( for (i = 0; i < NB_DINPUT_DEVICES; i++) { if (!dinput_devices[i]->enum_deviceA) continue; - for (j = 0, r = -1; r != 0; j++) { - devInstance.dwSize = sizeof(devInstance); - TRACE(" - checking device %u ('%s')\n", i, dinput_devices[i]->name); - if ((r = dinput_devices[i]->enum_deviceA(dwDevType, dwFlags, &devInstance, This->dwVersion, j))) { - if (lpCallback(&devInstance,pvRef) == DIENUM_STOP) - return 0; - } - } + for (j = 0, r = S_OK; SUCCEEDED(r); j++) { + devInstance.dwSize = sizeof(devInstance); + TRACE(" - checking device %u ('%s')\n", i, dinput_devices[i]->name); + r = dinput_devices[i]->enum_deviceA(dwDevType, dwFlags, &devInstance, This->dwVersion, j); + if (r == S_OK) + if (lpCallback(&devInstance,pvRef) == DIENUM_STOP) + return S_OK; + } } - - return 0; + + return S_OK; } /****************************************************************************** * IDirectInputW_EnumDevices @@ -397,7 +397,8 @@ static HRESULT WINAPI IDirectInputWImpl_EnumDevices( IDirectInputImpl *This = impl_from_IDirectInput7W( iface ); DIDEVICEINSTANCEW devInstance; unsigned int i; - int j, r; + int j; + HRESULT r; TRACE("(this=%p,0x%04x '%s',%p,%p,%04x)\n", This, dwDevType, _dump_DIDEVTYPE_value(dwDevType), @@ -414,17 +415,17 @@ static HRESULT WINAPI IDirectInputWImpl_EnumDevices( for (i = 0; i < NB_DINPUT_DEVICES; i++) { if (!dinput_devices[i]->enum_deviceW) continue; - for (j = 0, r = -1; r != 0; j++) { - devInstance.dwSize = sizeof(devInstance); - TRACE(" - checking device %u ('%s')\n", i, dinput_devices[i]->name); - if ((r = dinput_devices[i]->enum_deviceW(dwDevType, dwFlags, &devInstance, This->dwVersion, j))) { - if (lpCallback(&devInstance,pvRef) == DIENUM_STOP) - return 0; - } - } + for (j = 0, r = S_OK; SUCCEEDED(r); j++) { + devInstance.dwSize = sizeof(devInstance); + TRACE(" - checking device %u ('%s')\n", i, dinput_devices[i]->name); + r = dinput_devices[i]->enum_deviceW(dwDevType, dwFlags, &devInstance, This->dwVersion, j); + if (r == S_OK) + if (lpCallback(&devInstance,pvRef) == DIENUM_STOP) + return S_OK; + } } - - return 0; + + return S_OK; } static ULONG WINAPI IDirectInputAImpl_AddRef(LPDIRECTINPUT7A iface) @@ -913,18 +914,18 @@ static HRESULT WINAPI IDirectInput8AImpl_EnumDevicesBySemantics( /* Enumerate all the joysticks */ for (i = 0; i < NB_DINPUT_DEVICES; i++) { - BOOL enumSuccess; + HRESULT enumSuccess; if (!dinput_devices[i]->enum_deviceA) continue; - for (j = 0, enumSuccess = -1; enumSuccess != 0; j++) + for (j = 0, enumSuccess = S_OK; SUCCEEDED(enumSuccess); j++) { TRACE(" - checking device %u ('%s')\n", i, dinput_devices[i]->name); callbackFlags = diactionformat_priorityA(lpdiActionFormat, lpdiActionFormat->dwGenre); /* Default behavior is to enumerate attached game controllers */ enumSuccess = dinput_devices[i]->enum_deviceA(DI8DEVCLASS_GAMECTRL, DIEDFL_ATTACHEDONLY | dwFlags, &didevi, This->dwVersion, j); - if (enumSuccess) + if (enumSuccess == S_OK) { IDirectInput_CreateDevice(iface, &didevi.guidInstance, &lpdid, NULL); @@ -973,18 +974,18 @@ static HRESULT WINAPI IDirectInput8WImpl_EnumDevicesBySemantics( /* Enumerate all the joysticks */ for (i = 0; i < NB_DINPUT_DEVICES; i++) { - BOOL enumSuccess; + HRESULT enumSuccess; if (!dinput_devices[i]->enum_deviceW) continue; - for (j = 0, enumSuccess = -1; enumSuccess != 0; j++) + for (j = 0, enumSuccess = S_OK; SUCCEEDED(enumSuccess); j++) { TRACE(" - checking device %u ('%s')\n", i, dinput_devices[i]->name); callbackFlags = diactionformat_priorityW(lpdiActionFormat, lpdiActionFormat->dwGenre); /* Default behavior is to enumerate attached game controllers */ enumSuccess = dinput_devices[i]->enum_deviceW(DI8DEVCLASS_GAMECTRL, DIEDFL_ATTACHEDONLY | dwFlags, &didevi, This->dwVersion, j); - if (enumSuccess) + if (enumSuccess == S_OK) { IDirectInput_CreateDevice(iface, &didevi.guidInstance, &lpdid, NULL); @@ -1152,7 +1153,8 @@ static HRESULT WINAPI JoyConfig8Impl_GetConfig(IDirectInputJoyConfig8 *iface, UI { IDirectInputImpl *di = impl_from_IDirectInputJoyConfig8(iface); UINT found = 0; - int i, j, r; + int i, j; + HRESULT r; FIXME("(%p)->(%d, %p, 0x%08x): semi-stub!\n", iface, id, info, flags); @@ -1168,11 +1170,11 @@ static HRESULT WINAPI JoyConfig8Impl_GetConfig(IDirectInputJoyConfig8 *iface, UI { if (!dinput_devices[i]->enum_deviceA) continue; - for (j = 0, r = -1; r != 0; j++) + for (j = 0, r = S_OK; SUCCEEDED(r); j++) { DIDEVICEINSTANCEA dev; dev.dwSize = sizeof(dev); - if ((r = dinput_devices[i]->enum_deviceA(DI8DEVCLASS_GAMECTRL, 0, &dev, di->dwVersion, j))) + if ((r = dinput_devices[i]->enum_deviceA(DI8DEVCLASS_GAMECTRL, 0, &dev, di->dwVersion, j)) == S_OK) { /* Only take into account the chosen id */ if (found == id) @@ -1639,7 +1641,7 @@ void check_dinput_hooks(LPDIRECTINPUTDEVICE8W iface) LeaveCriticalSection(&dinput_hook_crit); } -BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserv) +BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved) { switch(reason) { @@ -1648,6 +1650,7 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserv) DINPUT_instance = inst; break; case DLL_PROCESS_DETACH: + if (reserved) break; DeleteCriticalSection(&dinput_hook_crit); break; } diff --git a/dll/directx/dinput/dinput_private.h b/dll/directx/wine/dinput/dinput_private.h similarity index 93% rename from dll/directx/dinput/dinput_private.h rename to dll/directx/wine/dinput/dinput_private.h index f270ce95a1d..e7b2c079e92 100644 --- a/dll/directx/dinput/dinput_private.h +++ b/dll/directx/wine/dinput/dinput_private.h @@ -55,8 +55,8 @@ struct IDirectInputImpl /* Function called by all devices that Wine supports */ struct dinput_device { const char *name; - BOOL (*enum_deviceA)(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id); - BOOL (*enum_deviceW)(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id); + HRESULT (*enum_deviceA)(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id); + HRESULT (*enum_deviceW)(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id); HRESULT (*create_device)(IDirectInputImpl *dinput, REFGUID rguid, REFIID riid, LPVOID *pdev, int unicode); }; diff --git a/dll/directx/dinput/effect_linuxinput.c b/dll/directx/wine/dinput/effect_linuxinput.c similarity index 79% rename from dll/directx/dinput/effect_linuxinput.c rename to dll/directx/wine/dinput/effect_linuxinput.c index 0fb183fe8f9..da1fb85dff5 100644 --- a/dll/directx/dinput/effect_linuxinput.c +++ b/dll/directx/wine/dinput/effect_linuxinput.c @@ -43,6 +43,7 @@ #include "dinput.h" #include "device_private.h" +#include "joystick_private.h" WINE_DEFAULT_DEBUG_CHANNEL(dinput); @@ -66,194 +67,6 @@ static inline LinuxInputEffectImpl *impl_from_IDirectInputEffect(IDirectInputEff return CONTAINING_RECORD(iface, LinuxInputEffectImpl, IDirectInputEffect_iface); } -/****************************************************************************** - * DirectInputEffect Functional Helper - */ - -static DWORD _typeFromGUID(REFGUID guid) -{ - if (IsEqualGUID(guid, &GUID_ConstantForce)) { - return DIEFT_CONSTANTFORCE; - } else if (IsEqualGUID(guid, &GUID_Square) - || IsEqualGUID(guid, &GUID_Sine) - || IsEqualGUID(guid, &GUID_Triangle) - || IsEqualGUID(guid, &GUID_SawtoothUp) - || IsEqualGUID(guid, &GUID_SawtoothDown)) { - return DIEFT_PERIODIC; - } else if (IsEqualGUID(guid, &GUID_RampForce)) { - return DIEFT_RAMPFORCE; - } else if (IsEqualGUID(guid, &GUID_Spring) - || IsEqualGUID(guid, &GUID_Damper) - || IsEqualGUID(guid, &GUID_Inertia) - || IsEqualGUID(guid, &GUID_Friction)) { - return DIEFT_CONDITION; - } else if (IsEqualGUID(guid, &GUID_CustomForce)) { - return DIEFT_CUSTOMFORCE; - } else { - WARN("GUID (%s) is not a known force type\n", _dump_dinput_GUID(guid)); - return 0; - } -} - - -/****************************************************************************** - * DirectInputEffect debug helpers - */ - -static void _dump_DIEFFECT_flags(DWORD dwFlags) -{ - if (TRACE_ON(dinput)) { - unsigned int i; - static const struct { - DWORD mask; - const char *name; - } flags[] = { -#define FE(x) { x, #x} - FE(DIEFF_CARTESIAN), - FE(DIEFF_OBJECTIDS), - FE(DIEFF_OBJECTOFFSETS), - FE(DIEFF_POLAR), - FE(DIEFF_SPHERICAL) -#undef FE - }; - for (i = 0; i < (sizeof(flags) / sizeof(flags[0])); i++) - if (flags[i].mask & dwFlags) - TRACE("%s ", flags[i].name); - TRACE("\n"); - } -} - -static void _dump_DIENVELOPE(LPCDIENVELOPE env) -{ - if (env->dwSize != sizeof(DIENVELOPE)) { - WARN("Non-standard DIENVELOPE structure size %d.\n", env->dwSize); - } - TRACE("Envelope has attack (level: %d time: %d), fade (level: %d time: %d)\n", - env->dwAttackLevel, env->dwAttackTime, env->dwFadeLevel, env->dwFadeTime); -} - -static void _dump_DICONSTANTFORCE(LPCDICONSTANTFORCE frc) -{ - TRACE("Constant force has magnitude %d\n", frc->lMagnitude); -} - -static void _dump_DIPERIODIC(LPCDIPERIODIC frc) -{ - TRACE("Periodic force has magnitude %d, offset %d, phase %d, period %d\n", - frc->dwMagnitude, frc->lOffset, frc->dwPhase, frc->dwPeriod); -} - -static void _dump_DIRAMPFORCE(LPCDIRAMPFORCE frc) -{ - TRACE("Ramp force has start %d, end %d\n", - frc->lStart, frc->lEnd); -} - -static void _dump_DICONDITION(LPCDICONDITION frc) -{ - TRACE("Condition has offset %d, pos/neg coefficients %d and %d, pos/neg saturations %d and %d, deadband %d\n", - frc->lOffset, frc->lPositiveCoefficient, frc->lNegativeCoefficient, - frc->dwPositiveSaturation, frc->dwNegativeSaturation, frc->lDeadBand); -} - -static void _dump_DICUSTOMFORCE(LPCDICUSTOMFORCE frc) -{ - unsigned int i; - TRACE("Custom force uses %d channels, sample period %d. Has %d samples at %p.\n", - frc->cChannels, frc->dwSamplePeriod, frc->cSamples, frc->rglForceData); - if (frc->cSamples % frc->cChannels != 0) - WARN("Custom force has a non-integral samples-per-channel count!\n"); - if (TRACE_ON(dinput)) { - TRACE("Custom force data (time aligned, axes in order):\n"); - for (i = 1; i <= frc->cSamples; ++i) { - TRACE("%d ", frc->rglForceData[i]); - if (i % frc->cChannels == 0) - TRACE("\n"); - } - } -} - -static void _dump_DIEFFECT(LPCDIEFFECT eff, REFGUID guid, DWORD dwFlags) -{ - unsigned int i; - DWORD type = _typeFromGUID(guid); - - TRACE("Dumping DIEFFECT structure:\n"); - TRACE(" - dwSize: %d\n", eff->dwSize); - if ((eff->dwSize != sizeof(DIEFFECT)) && (eff->dwSize != sizeof(DIEFFECT_DX5))) { - WARN("Non-standard DIEFFECT structure size %d\n", eff->dwSize); - } - TRACE(" - dwFlags: %d\n", eff->dwFlags); - TRACE(" "); - _dump_DIEFFECT_flags(eff->dwFlags); - TRACE(" - dwDuration: %d\n", eff->dwDuration); - TRACE(" - dwGain: %d\n", eff->dwGain); - - if (eff->dwGain > 10000) - WARN("dwGain is out of range (>10,000)\n"); - - TRACE(" - dwTriggerButton: %d\n", eff->dwTriggerButton); - TRACE(" - dwTriggerRepeatInterval: %d\n", eff->dwTriggerRepeatInterval); - TRACE(" - rglDirection: %p\n", eff->rglDirection); - TRACE(" - cbTypeSpecificParams: %d\n", eff->cbTypeSpecificParams); - TRACE(" - lpvTypeSpecificParams: %p\n", eff->lpvTypeSpecificParams); - - /* Only trace some members if dwFlags indicates they have data */ - if (dwFlags & DIEP_AXES) { - TRACE(" - cAxes: %d\n", eff->cAxes); - TRACE(" - rgdwAxes: %p\n", eff->rgdwAxes); - - if (TRACE_ON(dinput) && eff->rgdwAxes) { - TRACE(" "); - for (i = 0; i < eff->cAxes; ++i) - TRACE("%d ", eff->rgdwAxes[i]); - TRACE("\n"); - } - } - - if (dwFlags & DIEP_ENVELOPE) { - TRACE(" - lpEnvelope: %p\n", eff->lpEnvelope); - if (eff->lpEnvelope != NULL) - _dump_DIENVELOPE(eff->lpEnvelope); - } - - if (eff->dwSize > sizeof(DIEFFECT_DX5)) - TRACE(" - dwStartDelay: %d\n", eff->dwStartDelay); - - if (type == DIEFT_CONSTANTFORCE) { - if (eff->cbTypeSpecificParams != sizeof(DICONSTANTFORCE)) { - WARN("Effect claims to be a constant force but the type-specific params are the wrong size!\n"); - } else { - _dump_DICONSTANTFORCE(eff->lpvTypeSpecificParams); - } - } else if (type == DIEFT_PERIODIC) { - if (eff->cbTypeSpecificParams != sizeof(DIPERIODIC)) { - WARN("Effect claims to be a periodic force but the type-specific params are the wrong size!\n"); - } else { - _dump_DIPERIODIC(eff->lpvTypeSpecificParams); - } - } else if (type == DIEFT_RAMPFORCE) { - if (eff->cbTypeSpecificParams != sizeof(DIRAMPFORCE)) { - WARN("Effect claims to be a ramp force but the type-specific params are the wrong size!\n"); - } else { - _dump_DIRAMPFORCE(eff->lpvTypeSpecificParams); - } - } else if (type == DIEFT_CONDITION) { - if (eff->cbTypeSpecificParams != sizeof(DICONDITION)) { - WARN("Effect claims to be a condition but the type-specific params are the wrong size!\n"); - } else { - _dump_DICONDITION(eff->lpvTypeSpecificParams); - } - } else if (type == DIEFT_CUSTOMFORCE) { - if (eff->cbTypeSpecificParams != sizeof(DICUSTOMFORCE)) { - WARN("Effect claims to be a custom force but the type-specific params are the wrong size!\n"); - } else { - _dump_DICUSTOMFORCE(eff->lpvTypeSpecificParams); - } - } -} - - /****************************************************************************** * LinuxInputEffectImpl */ @@ -546,12 +359,12 @@ static HRESULT WINAPI LinuxInputEffectImpl_SetParameters( DWORD dwFlags) { LinuxInputEffectImpl *This = impl_from_IDirectInputEffect(iface); - DWORD type = _typeFromGUID(&This->guid); + DWORD type = typeFromGUID(&This->guid); HRESULT retval = DI_OK; TRACE("(this=%p,%p,%d)\n", This, peff, dwFlags); - _dump_DIEFFECT(peff, &This->guid, dwFlags); + dump_DIEFFECT(peff, &This->guid, dwFlags); if ((dwFlags & ~DIEP_NORESTART & ~DIEP_NODOWNLOAD & ~DIEP_START) == 0) { /* set everything */ @@ -800,7 +613,7 @@ DECLSPEC_HIDDEN HRESULT linuxinput_create_effect( { LinuxInputEffectImpl* newEffect = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(LinuxInputEffectImpl)); - DWORD type = _typeFromGUID(rguid); + DWORD type = typeFromGUID(rguid); newEffect->IDirectInputEffect_iface.lpVtbl = &LinuxInputEffectVtbl; newEffect->ref = 1; @@ -869,7 +682,7 @@ DECLSPEC_HIDDEN HRESULT linuxinput_get_info_A( REFGUID rguid, LPDIEFFECTINFOA info) { - DWORD type = _typeFromGUID(rguid); + DWORD type = typeFromGUID(rguid); TRACE("(%d, %s, %p) type=%d\n", fd, _dump_dinput_GUID(rguid), info, type); @@ -903,7 +716,7 @@ DECLSPEC_HIDDEN HRESULT linuxinput_get_info_W( REFGUID rguid, LPDIEFFECTINFOW info) { - DWORD type = _typeFromGUID(rguid); + DWORD type = typeFromGUID(rguid); TRACE("(%d, %s, %p) type=%d\n", fd, _dump_dinput_GUID(rguid), info, type); diff --git a/dll/directx/dinput/joystick.c b/dll/directx/wine/dinput/joystick.c similarity index 74% rename from dll/directx/dinput/joystick.c rename to dll/directx/wine/dinput/joystick.c index 539334c553b..875d8ac7523 100644 --- a/dll/directx/dinput/joystick.c +++ b/dll/directx/wine/dinput/joystick.c @@ -49,6 +49,184 @@ static inline IDirectInputDevice8W *IDirectInputDevice8W_from_impl(JoystickGener return &This->base.IDirectInputDevice8W_iface; } +DWORD typeFromGUID(REFGUID guid) +{ + if (IsEqualGUID(guid, &GUID_ConstantForce)) { + return DIEFT_CONSTANTFORCE; + } else if (IsEqualGUID(guid, &GUID_Square) + || IsEqualGUID(guid, &GUID_Sine) + || IsEqualGUID(guid, &GUID_Triangle) + || IsEqualGUID(guid, &GUID_SawtoothUp) + || IsEqualGUID(guid, &GUID_SawtoothDown)) { + return DIEFT_PERIODIC; + } else if (IsEqualGUID(guid, &GUID_RampForce)) { + return DIEFT_RAMPFORCE; + } else if (IsEqualGUID(guid, &GUID_Spring) + || IsEqualGUID(guid, &GUID_Damper) + || IsEqualGUID(guid, &GUID_Inertia) + || IsEqualGUID(guid, &GUID_Friction)) { + return DIEFT_CONDITION; + } else if (IsEqualGUID(guid, &GUID_CustomForce)) { + return DIEFT_CUSTOMFORCE; + } else { + WARN("GUID (%s) is not a known force type\n", _dump_dinput_GUID(guid)); + return 0; + } +} + +static void _dump_DIEFFECT_flags(DWORD dwFlags) +{ + if (TRACE_ON(dinput)) { + unsigned int i; + static const struct { + DWORD mask; + const char *name; + } flags[] = { +#define FE(x) { x, #x} + FE(DIEFF_CARTESIAN), + FE(DIEFF_OBJECTIDS), + FE(DIEFF_OBJECTOFFSETS), + FE(DIEFF_POLAR), + FE(DIEFF_SPHERICAL) +#undef FE + }; + for (i = 0; i < (sizeof(flags) / sizeof(flags[0])); i++) + if (flags[i].mask & dwFlags) + TRACE("%s ", flags[i].name); + TRACE("\n"); + } +} + +static void _dump_DIENVELOPE(LPCDIENVELOPE env) +{ + if (env->dwSize != sizeof(DIENVELOPE)) { + WARN("Non-standard DIENVELOPE structure size %d.\n", env->dwSize); + } + TRACE("Envelope has attack (level: %d time: %d), fade (level: %d time: %d)\n", + env->dwAttackLevel, env->dwAttackTime, env->dwFadeLevel, env->dwFadeTime); +} + +static void _dump_DICONSTANTFORCE(LPCDICONSTANTFORCE frc) +{ + TRACE("Constant force has magnitude %d\n", frc->lMagnitude); +} + +static void _dump_DIPERIODIC(LPCDIPERIODIC frc) +{ + TRACE("Periodic force has magnitude %d, offset %d, phase %d, period %d\n", + frc->dwMagnitude, frc->lOffset, frc->dwPhase, frc->dwPeriod); +} + +static void _dump_DIRAMPFORCE(LPCDIRAMPFORCE frc) +{ + TRACE("Ramp force has start %d, end %d\n", + frc->lStart, frc->lEnd); +} + +static void _dump_DICONDITION(LPCDICONDITION frc) +{ + TRACE("Condition has offset %d, pos/neg coefficients %d and %d, pos/neg saturations %d and %d, deadband %d\n", + frc->lOffset, frc->lPositiveCoefficient, frc->lNegativeCoefficient, + frc->dwPositiveSaturation, frc->dwNegativeSaturation, frc->lDeadBand); +} + +static void _dump_DICUSTOMFORCE(LPCDICUSTOMFORCE frc) +{ + unsigned int i; + TRACE("Custom force uses %d channels, sample period %d. Has %d samples at %p.\n", + frc->cChannels, frc->dwSamplePeriod, frc->cSamples, frc->rglForceData); + if (frc->cSamples % frc->cChannels != 0) + WARN("Custom force has a non-integral samples-per-channel count!\n"); + if (TRACE_ON(dinput)) { + TRACE("Custom force data (time aligned, axes in order):\n"); + for (i = 1; i <= frc->cSamples; ++i) { + TRACE("%d ", frc->rglForceData[i]); + if (i % frc->cChannels == 0) + TRACE("\n"); + } + } +} + +void dump_DIEFFECT(LPCDIEFFECT eff, REFGUID guid, DWORD dwFlags) +{ + DWORD type = typeFromGUID(guid); + unsigned int i; + + TRACE("Dumping DIEFFECT structure:\n"); + TRACE(" - dwSize: %d\n", eff->dwSize); + if ((eff->dwSize != sizeof(DIEFFECT)) && (eff->dwSize != sizeof(DIEFFECT_DX5))) { + WARN("Non-standard DIEFFECT structure size %d\n", eff->dwSize); + } + TRACE(" - dwFlags: %d\n", eff->dwFlags); + TRACE(" "); + _dump_DIEFFECT_flags(eff->dwFlags); + TRACE(" - dwDuration: %d\n", eff->dwDuration); + TRACE(" - dwGain: %d\n", eff->dwGain); + + if (eff->dwGain > 10000) + WARN("dwGain is out of range (>10,000)\n"); + + TRACE(" - dwTriggerButton: %d\n", eff->dwTriggerButton); + TRACE(" - dwTriggerRepeatInterval: %d\n", eff->dwTriggerRepeatInterval); + TRACE(" - rglDirection: %p\n", eff->rglDirection); + TRACE(" - cbTypeSpecificParams: %d\n", eff->cbTypeSpecificParams); + TRACE(" - lpvTypeSpecificParams: %p\n", eff->lpvTypeSpecificParams); + + /* Only trace some members if dwFlags indicates they have data */ + if (dwFlags & DIEP_AXES) { + TRACE(" - cAxes: %d\n", eff->cAxes); + TRACE(" - rgdwAxes: %p\n", eff->rgdwAxes); + + if (TRACE_ON(dinput) && eff->rgdwAxes) { + TRACE(" "); + for (i = 0; i < eff->cAxes; ++i) + TRACE("%d ", eff->rgdwAxes[i]); + TRACE("\n"); + } + } + + if (dwFlags & DIEP_ENVELOPE) { + TRACE(" - lpEnvelope: %p\n", eff->lpEnvelope); + if (eff->lpEnvelope != NULL) + _dump_DIENVELOPE(eff->lpEnvelope); + } + + if (eff->dwSize > sizeof(DIEFFECT_DX5)) + TRACE(" - dwStartDelay: %d\n", eff->dwStartDelay); + + if (type == DIEFT_CONSTANTFORCE) { + if (eff->cbTypeSpecificParams != sizeof(DICONSTANTFORCE)) { + WARN("Effect claims to be a constant force but the type-specific params are the wrong size!\n"); + } else { + _dump_DICONSTANTFORCE(eff->lpvTypeSpecificParams); + } + } else if (type == DIEFT_PERIODIC) { + if (eff->cbTypeSpecificParams != sizeof(DIPERIODIC)) { + WARN("Effect claims to be a periodic force but the type-specific params are the wrong size!\n"); + } else { + _dump_DIPERIODIC(eff->lpvTypeSpecificParams); + } + } else if (type == DIEFT_RAMPFORCE) { + if (eff->cbTypeSpecificParams != sizeof(DIRAMPFORCE)) { + WARN("Effect claims to be a ramp force but the type-specific params are the wrong size!\n"); + } else { + _dump_DIRAMPFORCE(eff->lpvTypeSpecificParams); + } + } else if (type == DIEFT_CONDITION) { + if (eff->cbTypeSpecificParams != sizeof(DICONDITION)) { + WARN("Effect claims to be a condition but the type-specific params are the wrong size!\n"); + } else { + _dump_DICONDITION(eff->lpvTypeSpecificParams); + } + } else if (type == DIEFT_CUSTOMFORCE) { + if (eff->cbTypeSpecificParams != sizeof(DICUSTOMFORCE)) { + WARN("Effect claims to be a custom force but the type-specific params are the wrong size!\n"); + } else { + _dump_DICUSTOMFORCE(eff->lpvTypeSpecificParams); + } + } +} + BOOL device_disabled_registry(const char* name) { static const char disabled_str[] = "disabled"; @@ -94,6 +272,7 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF { JoystickGenericImpl *This = impl_from_IDirectInputDevice8W(iface); DWORD i; + ObjProps remap_props; TRACE("(%p,%s,%p)\n",This,debugstr_guid(rguid),ph); @@ -112,6 +291,28 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF if (ph->dwHow == DIPH_DEVICE) { TRACE("proprange(%d,%d) all\n", pr->lMin, pr->lMax); for (i = 0; i < This->base.data_format.wine_df->dwNumObjs; i++) { + + remap_props.lDevMin = This->props[i].lMin; + remap_props.lDevMax = This->props[i].lMax; + + remap_props.lDeadZone = This->props[i].lDeadZone; + remap_props.lSaturation = This->props[i].lSaturation; + + remap_props.lMin = pr->lMin; + remap_props.lMax = pr->lMax; + + switch (This->base.data_format.wine_df->rgodf[i].dwOfs) { + case DIJOFS_X : This->js.lX = joystick_map_axis(&remap_props, This->js.lX); break; + case DIJOFS_Y : This->js.lY = joystick_map_axis(&remap_props, This->js.lY); break; + case DIJOFS_Z : This->js.lZ = joystick_map_axis(&remap_props, This->js.lZ); break; + case DIJOFS_RX : This->js.lRx = joystick_map_axis(&remap_props, This->js.lRx); break; + case DIJOFS_RY : This->js.lRy = joystick_map_axis(&remap_props, This->js.lRy); break; + case DIJOFS_RZ : This->js.lRz = joystick_map_axis(&remap_props, This->js.lRz); break; + case DIJOFS_SLIDER(0): This->js.rglSlider[0] = joystick_map_axis(&remap_props, This->js.rglSlider[0]); break; + case DIJOFS_SLIDER(1): This->js.rglSlider[1] = joystick_map_axis(&remap_props, This->js.rglSlider[1]); break; + default: break; + } + This->props[i].lMin = pr->lMin; This->props[i].lMax = pr->lMax; } @@ -120,6 +321,30 @@ HRESULT WINAPI JoystickWGenericImpl_SetProperty(LPDIRECTINPUTDEVICE8W iface, REF TRACE("proprange(%d,%d) obj=%d\n", pr->lMin, pr->lMax, obj); if (obj >= 0) { + + /*ePSXe polls the joystick immediately after setting the range for calibration purposes, so the old values need to be remapped to the new range before it does so*/ + + remap_props.lDevMin = This->props[obj].lMin; + remap_props.lDevMax = This->props[obj].lMax; + + remap_props.lDeadZone = This->props[obj].lDeadZone; + remap_props.lSaturation = This->props[obj].lSaturation; + + remap_props.lMin = pr->lMin; + remap_props.lMax = pr->lMax; + + switch (ph->dwObj) { + case DIJOFS_X : This->js.lX = joystick_map_axis(&remap_props, This->js.lX); break; + case DIJOFS_Y : This->js.lY = joystick_map_axis(&remap_props, This->js.lY); break; + case DIJOFS_Z : This->js.lZ = joystick_map_axis(&remap_props, This->js.lZ); break; + case DIJOFS_RX : This->js.lRx = joystick_map_axis(&remap_props, This->js.lRx); break; + case DIJOFS_RY : This->js.lRy = joystick_map_axis(&remap_props, This->js.lRy); break; + case DIJOFS_RZ : This->js.lRz = joystick_map_axis(&remap_props, This->js.lRz); break; + case DIJOFS_SLIDER(0): This->js.rglSlider[0] = joystick_map_axis(&remap_props, This->js.rglSlider[0]); break; + case DIJOFS_SLIDER(1): This->js.rglSlider[1] = joystick_map_axis(&remap_props, This->js.rglSlider[1]); break; + default: break; + } + This->props[obj].lMin = pr->lMin; This->props[obj].lMax = pr->lMax; return DI_OK; diff --git a/dll/directx/dinput/joystick_linux.c b/dll/directx/wine/dinput/joystick_linux.c similarity index 97% rename from dll/directx/dinput/joystick_linux.c rename to dll/directx/wine/dinput/joystick_linux.c index 6e444a8e3e6..f8c36d5c288 100644 --- a/dll/directx/dinput/joystick_linux.c +++ b/dll/directx/wine/dinput/joystick_linux.c @@ -220,15 +220,15 @@ static INT find_joystick_devices(void) return joystick_devices_count; } -static BOOL joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) +static HRESULT joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) { int fd = -1; - if (id >= find_joystick_devices()) return FALSE; + if (id >= find_joystick_devices()) return E_FAIL; if (dwFlags & DIEDFL_FORCEFEEDBACK) { WARN("force feedback not supported\n"); - return FALSE; + return S_FALSE; } if ((dwDevType == 0) || @@ -238,7 +238,7 @@ static BOOL joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTAN if ((fd = open(joystick_devices[id].device, O_RDONLY)) < 0) { WARN("open(%s, O_RDONLY) failed: %s\n", joystick_devices[id].name, strerror(errno)); - return FALSE; + return S_FALSE; } /* Return joystick */ @@ -257,21 +257,21 @@ static BOOL joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTAN lpddi->guidFFDriver = GUID_NULL; close(fd); TRACE("Enumerating the linux Joystick device: %s (%s)\n", joystick_devices[id].device, lpddi->tszProductName); - return TRUE; + return S_OK; } - return FALSE; + return S_FALSE; } -static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) +static HRESULT joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) { int fd = -1; - if (id >= find_joystick_devices()) return FALSE; + if (id >= find_joystick_devices()) return E_FAIL; if (dwFlags & DIEDFL_FORCEFEEDBACK) { WARN("force feedback not supported\n"); - return FALSE; + return S_FALSE; } if ((dwDevType == 0) || @@ -281,7 +281,7 @@ static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTAN if ((fd = open(joystick_devices[id].device, O_RDONLY)) < 0) { WARN("open(%s,O_RDONLY) failed: %s\n", joystick_devices[id].device, strerror(errno)); - return FALSE; + return S_FALSE; } /* Return joystick */ @@ -299,10 +299,10 @@ static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTAN lpddi->guidFFDriver = GUID_NULL; close(fd); TRACE("Enumerating the linux Joystick device: %s (%s)\n", joystick_devices[id].device, joystick_devices[id].name); - return TRUE; + return S_OK; } - return FALSE; + return S_FALSE; } static HRESULT alloc_device(REFGUID rguid, IDirectInputImpl *dinput, diff --git a/dll/directx/dinput/joystick_linuxinput.c b/dll/directx/wine/dinput/joystick_linuxinput.c similarity index 98% rename from dll/directx/dinput/joystick_linuxinput.c rename to dll/directx/wine/dinput/joystick_linuxinput.c index 441097d8e21..c40f44279fd 100644 --- a/dll/directx/dinput/joystick_linuxinput.c +++ b/dll/directx/wine/dinput/joystick_linuxinput.c @@ -43,7 +43,7 @@ # include # undef SW_MAX # if defined(EVIOCGBIT) && defined(EV_ABS) && defined(BTN_PINKIE) -# define HAVE_CORRECT_LINUXINPUT_H +# define HAS_PROPER_HEADER # endif #endif #ifdef HAVE_SYS_POLL_H @@ -65,7 +65,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dinput); -#ifdef HAVE_CORRECT_LINUXINPUT_H +#ifdef HAS_PROPER_HEADER #define EVDEVPREFIX "/dev/input/event" #define EVDEVDRIVER " (event)" @@ -363,54 +363,54 @@ static void fill_joystick_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD ver MultiByteToWideChar(CP_ACP, 0, joydevs[id].name, -1, lpddi->tszProductName, MAX_PATH); } -static BOOL joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) +static HRESULT joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) { find_joydevs(); if (id >= have_joydevs) { - return FALSE; + return E_FAIL; } if (!((dwDevType == 0) || ((dwDevType == DIDEVTYPE_JOYSTICK) && (version > 0x0300 && version < 0x0800)) || (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 0x0800)))) - return FALSE; + return S_FALSE; #ifndef HAVE_STRUCT_FF_EFFECT_DIRECTION if (dwFlags & DIEDFL_FORCEFEEDBACK) - return FALSE; + return S_FALSE; #endif if (!(dwFlags & DIEDFL_FORCEFEEDBACK) || joydevs[id].has_ff) { fill_joystick_dideviceinstanceA(lpddi, version, id); - return TRUE; + return S_OK; } - return FALSE; + return S_FALSE; } -static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) +static HRESULT joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) { find_joydevs(); if (id >= have_joydevs) { - return FALSE; + return E_FAIL; } if (!((dwDevType == 0) || ((dwDevType == DIDEVTYPE_JOYSTICK) && (version > 0x0300 && version < 0x0800)) || (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 0x0800)))) - return FALSE; + return S_FALSE; #ifndef HAVE_STRUCT_FF_EFFECT_DIRECTION if (dwFlags & DIEDFL_FORCEFEEDBACK) - return FALSE; + return S_FALSE; #endif if (!(dwFlags & DIEDFL_FORCEFEEDBACK) || joydevs[id].has_ff) { fill_joystick_dideviceinstanceW(lpddi, version, id); - return TRUE; + return S_OK; } - return FALSE; + return S_FALSE; } static JoystickImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput, unsigned short index) @@ -445,9 +445,10 @@ static JoystickImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput, unsig newDevice->generic.base.crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": JoystickImpl*->base.crit"); /* Count number of available axes - supported Axis & POVs */ - for (i = 0; i < WINE_JOYSTICK_MAX_AXES; i++) + for (i = 0; i < ABS_MAX; i++) { - if (test_bit(newDevice->joydev->absbits, i)) + if (i < WINE_JOYSTICK_MAX_AXES && + test_bit(newDevice->joydev->absbits, i)) { newDevice->generic.device_axis_count++; newDevice->dev_axes_to_di[i] = idx; @@ -1477,7 +1478,7 @@ static const IDirectInputDevice8WVtbl JoystickWvt = IDirectInputDevice8WImpl_GetImageInfo }; -#else /* HAVE_CORRECT_LINUXINPUT_H */ +#else /* HAS_PROPER_HEADER */ const struct dinput_device joystick_linuxinput_device = { "Wine Linux-input joystick driver", @@ -1486,4 +1487,4 @@ const struct dinput_device joystick_linuxinput_device = { NULL }; -#endif /* HAVE_CORRECT_LINUXINPUT_H */ +#endif /* HAS_PROPER_HEADER */ diff --git a/dll/directx/dinput/joystick_osx.c b/dll/directx/wine/dinput/joystick_osx.c similarity index 68% rename from dll/directx/dinput/joystick_osx.c rename to dll/directx/wine/dinput/joystick_osx.c index 8dad41bcec3..6058cc06482 100644 --- a/dll/directx/dinput/joystick_osx.c +++ b/dll/directx/wine/dinput/joystick_osx.c @@ -24,6 +24,11 @@ //#include "wine/port.h" #if defined(HAVE_IOKIT_HID_IOHIDLIB_H) +#define DWORD UInt32 +#define LPDWORD UInt32* +#define LONG SInt32 +#define LPLONG SInt32* +#define E_PENDING __carbon_E_PENDING #define ULONG __carbon_ULONG #define E_INVALIDARG __carbon_E_INVALIDARG #define E_OUTOFMEMORY __carbon_E_OUTOFMEMORY @@ -44,7 +49,9 @@ #define MAKE_HRESULT __carbon_MAKE_HRESULT #define HRESULT __carbon_HRESULT #define STDMETHODCALLTYPE __carbon_STDMETHODCALLTYPE +#include #include +#include #undef ULONG #undef E_INVALIDARG #undef E_OUTOFMEMORY @@ -65,6 +72,11 @@ #undef MAKE_HRESULT #undef HRESULT #undef STDMETHODCALLTYPE +#undef DWORD +#undef LPDWORD +#undef LONG +#undef LPLONG +#undef E_PENDING #endif /* HAVE_IOKIT_HID_IOHIDLIB_H */ //#include "wine/debug.h" @@ -98,6 +110,8 @@ struct JoystickImpl int id; CFMutableArrayRef elementCFArrayRef; ObjProps **propmap; + FFDeviceObjectReference ff; + struct list effects; }; static inline JoystickImpl *impl_from_IDirectInputDevice8A(IDirectInputDevice8A *iface) @@ -111,15 +125,116 @@ static inline JoystickImpl *impl_from_IDirectInputDevice8W(IDirectInputDevice8W JoystickGenericImpl, base), JoystickImpl, generic); } +typedef struct _EffectImpl { + IDirectInputEffect IDirectInputEffect_iface; + LONG ref; + + JoystickImpl *device; + FFEffectObjectReference effect; + GUID guid; + + struct list entry; +} EffectImpl; + +static EffectImpl *impl_from_IDirectInputEffect(IDirectInputEffect *iface) +{ + return CONTAINING_RECORD(iface, EffectImpl, IDirectInputEffect_iface); +} + +static const IDirectInputEffectVtbl EffectVtbl; + static const GUID DInput_Wine_OsX_Joystick_GUID = { /* 59CAD8F6-E617-41E2-8EB7-47B23EEEDC5A */ 0x59CAD8F6, 0xE617, 0x41E2, {0x8E, 0xB7, 0x47, 0xB2, 0x3E, 0xEE, 0xDC, 0x5A} }; +static HRESULT osx_to_win32_hresult(HRESULT in) +{ + /* OSX returns 16-bit COM runtime errors, which we should + * convert to win32 */ + switch(in){ + case 0x80000001: + return E_NOTIMPL; + case 0x80000002: + return E_OUTOFMEMORY; + case 0x80000003: + return E_INVALIDARG; + case 0x80000004: + return E_NOINTERFACE; + case 0x80000005: + return E_POINTER; + case 0x80000006: + return E_HANDLE; + case 0x80000007: + return E_ABORT; + case 0x80000008: + return E_FAIL; + case 0x80000009: + return E_ACCESSDENIED; + case 0x8000FFFF: + return E_UNEXPECTED; + } + return in; +} + static void CFSetApplierFunctionCopyToCFArray(const void *value, void *context) { CFArrayAppendValue( ( CFMutableArrayRef ) context, value ); } +static IOHIDDeviceRef get_device_ref(int id) +{ + IOHIDElementRef tIOHIDElementRef; + IOHIDDeviceRef tIOHIDDeviceRef; + + if (!gCollections) + return 0; + + tIOHIDElementRef = (IOHIDElementRef)CFArrayGetValueAtIndex(gCollections, id); + if (!tIOHIDElementRef) + { + ERR("Invalid Element requested %i\n",id); + return 0; + } + + tIOHIDDeviceRef = IOHIDElementGetDevice(tIOHIDElementRef); + if (!tIOHIDDeviceRef) + { + ERR("Invalid Device requested %i\n",id); + return 0; + } + + return tIOHIDDeviceRef; +} + +static HRESULT get_ff(IOHIDDeviceRef device, FFDeviceObjectReference *ret) +{ + io_service_t service; + CFMutableDictionaryRef matching; + CFTypeRef type; + + matching = IOServiceMatching(kIOHIDDeviceKey); + if(!matching){ + WARN("IOServiceMatching failed, force feedback disabled\n"); + return DIERR_DEVICENOTREG; + } + + type = IOHIDDeviceGetProperty(device, CFSTR(kIOHIDLocationIDKey)); + if(!matching){ + CFRelease(matching); + WARN("IOHIDDeviceGetProperty failed, force feedback disabled\n"); + return DIERR_DEVICENOTREG; + } + + CFDictionaryAddValue(matching, CFSTR(kIOHIDLocationIDKey), type); + + service = IOServiceGetMatchingService(kIOMasterPortDefault, matching); + + if(!ret) + return FFIsForceFeedback(service) == FF_OK ? S_OK : S_FALSE; + + return osx_to_win32_hresult(FFCreateDevice(service, ret)); +} + static CFMutableDictionaryRef creates_osx_device_match(int usage) { CFMutableDictionaryRef result; @@ -298,30 +413,15 @@ static int find_osx_devices(void) static int get_osx_device_name(int id, char *name, int length) { CFStringRef str; - IOHIDElementRef tIOHIDElementRef; IOHIDDeviceRef tIOHIDDeviceRef; - if (!gCollections) - return 0; - - tIOHIDElementRef = (IOHIDElementRef)CFArrayGetValueAtIndex(gCollections, id); - - if (!tIOHIDElementRef) - { - ERR("Invalid Element requested %i\n",id); - return 0; - } - - tIOHIDDeviceRef = IOHIDElementGetDevice(tIOHIDElementRef); + tIOHIDDeviceRef = get_device_ref(id); if (name) name[0] = 0; if (!tIOHIDDeviceRef) - { - ERR("Invalid Device requested %i\n",id); return 0; - } str = IOHIDDeviceGetProperty(tIOHIDDeviceRef, CFSTR( kIOHIDProductKey )); if (str) @@ -651,19 +751,21 @@ static INT find_joystick_devices(void) return joystick_devices_count; } -static BOOL joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) +static HRESULT joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) { - if (id >= find_joystick_devices()) return FALSE; - - if (dwFlags & DIEDFL_FORCEFEEDBACK) { - WARN("force feedback not supported\n"); - return FALSE; - } + if (id >= find_joystick_devices()) return E_FAIL; if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_JOYSTICK) && (version > 0x0300 && version < 0x0800)) || (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 0x0800))) { + if (dwFlags & DIEDFL_FORCEFEEDBACK) { + IOHIDDeviceRef device = get_device_ref(id); + if(!device) + return S_FALSE; + if(get_ff(device, NULL) != S_OK) + return S_FALSE; + } /* Return joystick */ lpddi->guidInstance = DInput_Wine_OsX_Joystick_GUID; lpddi->guidInstance.Data3 = id; @@ -679,27 +781,29 @@ static BOOL joydev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTAN get_osx_device_name(id, lpddi->tszProductName, MAX_PATH); lpddi->guidFFDriver = GUID_NULL; - return TRUE; + return S_OK; } - return FALSE; + return S_FALSE; } -static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) +static HRESULT joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) { char name[MAX_PATH]; char friendly[32]; - if (id >= find_joystick_devices()) return FALSE; - - if (dwFlags & DIEDFL_FORCEFEEDBACK) { - WARN("force feedback not supported\n"); - return FALSE; - } + if (id >= find_joystick_devices()) return E_FAIL; if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_JOYSTICK) && (version > 0x0300 && version < 0x0800)) || (((dwDevType == DI8DEVCLASS_GAMECTRL) || (dwDevType == DI8DEVTYPE_JOYSTICK)) && (version >= 0x0800))) { + if (dwFlags & DIEDFL_FORCEFEEDBACK) { + IOHIDDeviceRef device = get_device_ref(id); + if(!device) + return S_FALSE; + if(get_ff(device, NULL) != S_OK) + return S_FALSE; + } /* Return joystick */ lpddi->guidInstance = DInput_Wine_OsX_Joystick_GUID; lpddi->guidInstance.Data3 = id; @@ -716,16 +820,41 @@ static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTAN MultiByteToWideChar(CP_ACP, 0, name, -1, lpddi->tszProductName, MAX_PATH); lpddi->guidFFDriver = GUID_NULL; - return TRUE; + return S_OK; } - return FALSE; + return S_FALSE; +} + +static const char *osx_ff_axis_name(UInt8 axis) +{ + static char ret[6]; + switch(axis){ + case FFJOFS_X: + return "FFJOFS_X"; + case FFJOFS_Y: + return "FFJOFS_Y"; + case FFJOFS_Z: + return "FFJOFS_Z"; + } + sprintf(ret, "%u", (unsigned int)axis); + return ret; +} + +static int osx_axis_has_ff(FFCAPABILITIES *ffcaps, UInt8 axis) +{ + int i; + for(i = 0; i < ffcaps->numFfAxes; ++i) + if(ffcaps->ffAxes[i] == axis) + return 1; + return 0; } static HRESULT alloc_device(REFGUID rguid, IDirectInputImpl *dinput, JoystickImpl **pdev, unsigned short index) { DWORD i; + IOHIDDeviceRef device; JoystickImpl* newDevice; char name[MAX_PATH]; HRESULT hr; @@ -733,6 +862,7 @@ static HRESULT alloc_device(REFGUID rguid, IDirectInputImpl *dinput, int idx = 0; int axis_map[8]; /* max axes */ int slider_count = 0; + FFCAPABILITIES ffcaps; TRACE("%s %p %p %hu\n", debugstr_guid(rguid), dinput, pdev, index); @@ -758,6 +888,38 @@ static HRESULT alloc_device(REFGUID rguid, IDirectInputImpl *dinput, newDevice->generic.name = HeapAlloc(GetProcessHeap(),0,strlen(name) + 1); strcpy(newDevice->generic.name, name); + list_init(&newDevice->effects); + device = get_device_ref(index); + if(get_ff(device, &newDevice->ff) == S_OK){ + newDevice->generic.devcaps.dwFlags |= DIDC_FORCEFEEDBACK; + + hr = FFDeviceGetForceFeedbackCapabilities(newDevice->ff, &ffcaps); + if(SUCCEEDED(hr)){ + TRACE("FF Capabilities:\n"); + TRACE("\tsupportedEffects: 0x%x\n", (unsigned int)ffcaps.supportedEffects); + TRACE("\temulatedEffects: 0x%x\n", (unsigned int)ffcaps.emulatedEffects); + TRACE("\tsubType: 0x%x\n", (unsigned int)ffcaps.subType); + TRACE("\tnumFfAxes: %u\n", (unsigned int)ffcaps.numFfAxes); + TRACE("\tffAxes: ["); + for(i = 0; i < ffcaps.numFfAxes; ++i){ + TRACE("%s", osx_ff_axis_name(ffcaps.ffAxes[i])); + if(i < ffcaps.numFfAxes - 1) + TRACE(", "); + } + TRACE("]\n"); + TRACE("\tstorageCapacity: %u\n", (unsigned int)ffcaps.storageCapacity); + TRACE("\tplaybackCapacity: %u\n", (unsigned int)ffcaps.playbackCapacity); + } + + hr = FFDeviceSendForceFeedbackCommand(newDevice->ff, FFSFFC_RESET); + if(FAILED(hr)) + WARN("FFDeviceSendForceFeedbackCommand(FFSFFC_RESET) failed: %08x\n", hr); + + hr = FFDeviceSendForceFeedbackCommand(newDevice->ff, FFSFFC_SETACTUATORSON); + if(FAILED(hr)) + WARN("FFDeviceSendForceFeedbackCommand(FFSFFC_SETACTUATORSON) failed: %08x\n", hr); + } + memset(axis_map, 0, sizeof(axis_map)); get_osx_device_elements(newDevice, axis_map); @@ -786,24 +948,46 @@ static HRESULT alloc_device(REFGUID rguid, IDirectInputImpl *dinput, for (i = 0; i < newDevice->generic.devcaps.dwAxes; i++) { - int wine_obj = -1; + int wine_obj = -1, has_ff = 0; switch (axis_map[i]) { - case kHIDUsage_GD_X: wine_obj = 0; break; - case kHIDUsage_GD_Y: wine_obj = 1; break; - case kHIDUsage_GD_Z: wine_obj = 2; break; - case kHIDUsage_GD_Rx: wine_obj = 3; break; - case kHIDUsage_GD_Ry: wine_obj = 4; break; - case kHIDUsage_GD_Rz: wine_obj = 5; break; + case kHIDUsage_GD_X: + wine_obj = 0; + has_ff = (newDevice->ff != 0) && osx_axis_has_ff(&ffcaps, FFJOFS_X); + break; + case kHIDUsage_GD_Y: + wine_obj = 1; + has_ff = (newDevice->ff != 0) && osx_axis_has_ff(&ffcaps, FFJOFS_Y); + break; + case kHIDUsage_GD_Z: + wine_obj = 2; + has_ff = (newDevice->ff != 0) && osx_axis_has_ff(&ffcaps, FFJOFS_Z); + break; + case kHIDUsage_GD_Rx: + wine_obj = 3; + has_ff = (newDevice->ff != 0) && osx_axis_has_ff(&ffcaps, FFJOFS_RX); + break; + case kHIDUsage_GD_Ry: + wine_obj = 4; + has_ff = (newDevice->ff != 0) && osx_axis_has_ff(&ffcaps, FFJOFS_RY); + break; + case kHIDUsage_GD_Rz: + wine_obj = 5; + has_ff = (newDevice->ff != 0) && osx_axis_has_ff(&ffcaps, FFJOFS_RZ); + break; case kHIDUsage_GD_Slider: wine_obj = 6 + slider_count; + has_ff = (newDevice->ff != 0) && osx_axis_has_ff(&ffcaps, FFJOFS_SLIDER(slider_count)); slider_count++; break; } if (wine_obj < 0 ) continue; memcpy(&df->rgodf[idx], &c_dfDIJoystick2.rgodf[wine_obj], df->dwObjSize); - df->rgodf[idx++].dwType = DIDFT_MAKEINSTANCE(wine_obj) | DIDFT_ABSAXIS; + df->rgodf[idx].dwType = DIDFT_MAKEINSTANCE(wine_obj) | DIDFT_ABSAXIS; + if(has_ff) + df->rgodf[idx].dwFlags |= DIDOI_FFACTUATOR; + ++idx; } for (i = 0; i < newDevice->generic.devcaps.dwPOVs; i++) @@ -830,7 +1014,7 @@ static HRESULT alloc_device(REFGUID rguid, IDirectInputImpl *dinput, LeaveCriticalSection(&dinput->crit); newDevice->generic.devcaps.dwSize = sizeof(newDevice->generic.devcaps); - newDevice->generic.devcaps.dwFlags = DIDC_ATTACHED; + newDevice->generic.devcaps.dwFlags |= DIDC_ATTACHED; if (newDevice->generic.base.dinput->dwVersion >= 0x0800) newDevice->generic.devcaps.dwDevType = DI8DEVTYPE_JOYSTICK | (DI8DEVTYPEJOYSTICK_STANDARD << 8); else @@ -934,6 +1118,174 @@ static HRESULT joydev_create_device(IDirectInputImpl *dinput, REFGUID rguid, REF return DIERR_DEVICENOTREG; } +static HRESULT osx_set_autocenter(JoystickImpl *This, + const DIPROPDWORD *header) +{ + UInt32 v; + HRESULT hr; + if(!This->ff) + return DIERR_UNSUPPORTED; + v = header->dwData; + hr = osx_to_win32_hresult(FFDeviceSetForceFeedbackProperty(This->ff, FFPROP_AUTOCENTER, &v)); + TRACE("returning: %08x\n", hr); + return hr; +} + +static HRESULT osx_set_ffgain(JoystickImpl *This, const DIPROPDWORD *header) +{ + UInt32 v; + HRESULT hr; + if(!This->ff) + return DIERR_UNSUPPORTED; + v = header->dwData; + hr = osx_to_win32_hresult(FFDeviceSetForceFeedbackProperty(This->ff, FFPROP_FFGAIN, &v)); + TRACE("returning: %08x\n", hr); + return hr; +} + +static HRESULT WINAPI JoystickWImpl_SetProperty(IDirectInputDevice8W *iface, + const GUID *prop, const DIPROPHEADER *header) +{ + JoystickImpl *This = impl_from_IDirectInputDevice8W(iface); + + TRACE("%p %s %p\n", This, debugstr_guid(prop), header); + + switch(LOWORD(prop)) + { + case (DWORD_PTR)DIPROP_AUTOCENTER: + return osx_set_autocenter(This, (const DIPROPDWORD *)header); + case (DWORD_PTR)DIPROP_FFGAIN: + return osx_set_ffgain(This, (const DIPROPDWORD *)header); + } + + return JoystickWGenericImpl_SetProperty(iface, prop, header); +} + +static HRESULT WINAPI JoystickAImpl_SetProperty(IDirectInputDevice8A *iface, + const GUID *prop, const DIPROPHEADER *header) +{ + JoystickImpl *This = impl_from_IDirectInputDevice8A(iface); + + TRACE("%p %s %p\n", This, debugstr_guid(prop), header); + + switch(LOWORD(prop)) + { + case (DWORD_PTR)DIPROP_AUTOCENTER: + return osx_set_autocenter(This, (const DIPROPDWORD *)header); + case (DWORD_PTR)DIPROP_FFGAIN: + return osx_set_ffgain(This, (const DIPROPDWORD *)header); + } + + return JoystickAGenericImpl_SetProperty(iface, prop, header); +} + +static CFUUIDRef effect_win_to_mac(const GUID *effect) +{ +#define DO_MAP(X) \ + if(IsEqualGUID(&GUID_##X, effect)) \ + return kFFEffectType_##X##_ID; + DO_MAP(ConstantForce) + DO_MAP(RampForce) + DO_MAP(Square) + DO_MAP(Sine) + DO_MAP(Triangle) + DO_MAP(SawtoothUp) + DO_MAP(SawtoothDown) + DO_MAP(Spring) + DO_MAP(Damper) + DO_MAP(Inertia) + DO_MAP(Friction) + DO_MAP(CustomForce) +#undef DO_MAP + WARN("Unknown effect GUID! %s\n", debugstr_guid(effect)); + return 0; +} + +static HRESULT WINAPI JoystickWImpl_CreateEffect(IDirectInputDevice8W *iface, + const GUID *type, const DIEFFECT *params, IDirectInputEffect **out, + IUnknown *outer) +{ + JoystickImpl *This = impl_from_IDirectInputDevice8W(iface); + EffectImpl *effect; + HRESULT hr; + + TRACE("%p %s %p %p %p\n", iface, debugstr_guid(type), params, out, outer); + dump_DIEFFECT(params, type, 0); + + if(!This->ff){ + TRACE("No force feedback support\n"); + *out = NULL; + return S_OK; + } + + if(outer) + WARN("aggregation not implemented\n"); + + effect = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*This)); + effect->IDirectInputEffect_iface.lpVtbl = &EffectVtbl; + effect->ref = 1; + effect->guid = *type; + effect->device = This; + + /* Mac's FFEFFECT and Win's DIEFFECT are binary identical. */ + hr = osx_to_win32_hresult(FFDeviceCreateEffect(This->ff, + effect_win_to_mac(type), (FFEFFECT*)params, &effect->effect)); + if(FAILED(hr)){ + WARN("FFDeviceCreateEffect failed: %08x\n", hr); + HeapFree(GetProcessHeap(), 0, effect); + return hr; + } + + list_add_tail(&This->effects, &effect->entry); + *out = &effect->IDirectInputEffect_iface; + + TRACE("allocated effect: %p\n", effect); + + return S_OK; +} + +static HRESULT WINAPI JoystickAImpl_CreateEffect(IDirectInputDevice8A *iface, + const GUID *type, const DIEFFECT *params, IDirectInputEffect **out, + IUnknown *outer) +{ + JoystickImpl *This = impl_from_IDirectInputDevice8A(iface); + + TRACE("%p %s %p %p %p\n", iface, debugstr_guid(type), params, out, outer); + + return JoystickWImpl_CreateEffect(&This->generic.base.IDirectInputDevice8W_iface, + type, params, out, outer); +} + +static HRESULT WINAPI JoystickWImpl_SendForceFeedbackCommand(IDirectInputDevice8W *iface, + DWORD flags) +{ + JoystickImpl *This = impl_from_IDirectInputDevice8W(iface); + HRESULT hr; + + TRACE("%p 0x%x\n", This, flags); + + if(!This->ff) + return DI_NOEFFECT; + + hr = osx_to_win32_hresult(FFDeviceSendForceFeedbackCommand(This->ff, flags)); + if(FAILED(hr)){ + WARN("FFDeviceSendForceFeedbackCommand failed: %08x\n", hr); + return hr; + } + + return S_OK; +} + +static HRESULT WINAPI JoystickAImpl_SendForceFeedbackCommand(IDirectInputDevice8A *iface, + DWORD flags) +{ + JoystickImpl *This = impl_from_IDirectInputDevice8A(iface); + + TRACE("%p 0x%x\n", This, flags); + + return JoystickWImpl_SendForceFeedbackCommand(&This->generic.base.IDirectInputDevice8W_iface, flags); +} + const struct dinput_device joystick_osx_device = { "Wine OS X joystick driver", joydev_enum_deviceA, @@ -949,7 +1301,7 @@ static const IDirectInputDevice8AVtbl JoystickAvt = JoystickAGenericImpl_GetCapabilities, IDirectInputDevice2AImpl_EnumObjects, JoystickAGenericImpl_GetProperty, - JoystickAGenericImpl_SetProperty, + JoystickAImpl_SetProperty, IDirectInputDevice2AImpl_Acquire, IDirectInputDevice2AImpl_Unacquire, JoystickAGenericImpl_GetDeviceState, @@ -961,11 +1313,11 @@ static const IDirectInputDevice8AVtbl JoystickAvt = JoystickAGenericImpl_GetDeviceInfo, IDirectInputDevice2AImpl_RunControlPanel, IDirectInputDevice2AImpl_Initialize, - IDirectInputDevice2AImpl_CreateEffect, + JoystickAImpl_CreateEffect, IDirectInputDevice2AImpl_EnumEffects, IDirectInputDevice2AImpl_GetEffectInfo, IDirectInputDevice2AImpl_GetForceFeedbackState, - IDirectInputDevice2AImpl_SendForceFeedbackCommand, + JoystickAImpl_SendForceFeedbackCommand, IDirectInputDevice2AImpl_EnumCreatedEffectObjects, IDirectInputDevice2AImpl_Escape, JoystickAGenericImpl_Poll, @@ -985,7 +1337,7 @@ static const IDirectInputDevice8WVtbl JoystickWvt = JoystickWGenericImpl_GetCapabilities, IDirectInputDevice2WImpl_EnumObjects, JoystickWGenericImpl_GetProperty, - JoystickWGenericImpl_SetProperty, + JoystickWImpl_SetProperty, IDirectInputDevice2WImpl_Acquire, IDirectInputDevice2WImpl_Unacquire, JoystickWGenericImpl_GetDeviceState, @@ -997,11 +1349,11 @@ static const IDirectInputDevice8WVtbl JoystickWvt = JoystickWGenericImpl_GetDeviceInfo, IDirectInputDevice2WImpl_RunControlPanel, IDirectInputDevice2WImpl_Initialize, - IDirectInputDevice2WImpl_CreateEffect, + JoystickWImpl_CreateEffect, IDirectInputDevice2WImpl_EnumEffects, IDirectInputDevice2WImpl_GetEffectInfo, IDirectInputDevice2WImpl_GetForceFeedbackState, - IDirectInputDevice2WImpl_SendForceFeedbackCommand, + JoystickWImpl_SendForceFeedbackCommand, IDirectInputDevice2WImpl_EnumCreatedEffectObjects, IDirectInputDevice2WImpl_Escape, JoystickWGenericImpl_Poll, @@ -1013,6 +1365,137 @@ static const IDirectInputDevice8WVtbl JoystickWvt = IDirectInputDevice8WImpl_GetImageInfo }; +static HRESULT WINAPI effect_QueryInterface(IDirectInputEffect *iface, + const GUID *guid, void **out) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + + TRACE("%p %s %p\n", This, debugstr_guid(guid), out); + + if(IsEqualIID(guid, &IID_IDirectInputEffect)){ + *out = iface; + IDirectInputEffect_AddRef(iface); + return S_OK; + } + + return E_NOINTERFACE; +} + +static ULONG WINAPI effect_AddRef(IDirectInputEffect *iface) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + ULONG ref = InterlockedIncrement(&This->ref); + TRACE("%p, ref is now: %u\n", This, ref); + return ref; +} + +static ULONG WINAPI effect_Release(IDirectInputEffect *iface) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + ULONG ref = InterlockedDecrement(&This->ref); + TRACE("%p, ref is now: %u\n", This, ref); + + if(!ref){ + list_remove(&This->entry); + FFDeviceReleaseEffect(This->device->ff, This->effect); + HeapFree(GetProcessHeap(), 0, This); + } + + return ref; +} + +static HRESULT WINAPI effect_Initialize(IDirectInputEffect *iface, HINSTANCE hinst, + DWORD version, const GUID *guid) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + TRACE("%p %p 0x%x, %s\n", This, hinst, version, debugstr_guid(guid)); + return S_OK; +} + +static HRESULT WINAPI effect_GetEffectGuid(IDirectInputEffect *iface, GUID *out) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + TRACE("%p %p\n", This, out); + *out = This->guid; + return S_OK; +} + +static HRESULT WINAPI effect_GetParameters(IDirectInputEffect *iface, + DIEFFECT *effect, DWORD flags) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + TRACE("%p %p 0x%x\n", This, effect, flags); + return osx_to_win32_hresult(FFEffectGetParameters(This->effect, (FFEFFECT*)effect, flags)); +} + +static HRESULT WINAPI effect_SetParameters(IDirectInputEffect *iface, + const DIEFFECT *effect, DWORD flags) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + TRACE("%p %p 0x%x\n", This, effect, flags); + dump_DIEFFECT(effect, &This->guid, flags); + return osx_to_win32_hresult(FFEffectSetParameters(This->effect, (FFEFFECT*)effect, flags)); +} + +static HRESULT WINAPI effect_Start(IDirectInputEffect *iface, DWORD iterations, + DWORD flags) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + TRACE("%p 0x%x 0x%x\n", This, iterations, flags); + return osx_to_win32_hresult(FFEffectStart(This->effect, iterations, flags)); +} + +static HRESULT WINAPI effect_Stop(IDirectInputEffect *iface) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + TRACE("%p\n", This); + return osx_to_win32_hresult(FFEffectStop(This->effect)); +} + +static HRESULT WINAPI effect_GetEffectStatus(IDirectInputEffect *iface, DWORD *flags) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + TRACE("%p %p\n", This, flags); + return osx_to_win32_hresult(FFEffectGetEffectStatus(This->effect, (UInt32*)flags)); +} + +static HRESULT WINAPI effect_Download(IDirectInputEffect *iface) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + TRACE("%p\n", This); + return osx_to_win32_hresult(FFEffectDownload(This->effect)); +} + +static HRESULT WINAPI effect_Unload(IDirectInputEffect *iface) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + TRACE("%p\n", This); + return osx_to_win32_hresult(FFEffectUnload(This->effect)); +} + +static HRESULT WINAPI effect_Escape(IDirectInputEffect *iface, DIEFFESCAPE *escape) +{ + EffectImpl *This = impl_from_IDirectInputEffect(iface); + TRACE("%p %p\n", This, escape); + return osx_to_win32_hresult(FFEffectEscape(This->effect, (FFEFFESCAPE*)escape)); +} + +static const IDirectInputEffectVtbl EffectVtbl = { + effect_QueryInterface, + effect_AddRef, + effect_Release, + effect_Initialize, + effect_GetEffectGuid, + effect_GetParameters, + effect_SetParameters, + effect_Start, + effect_Stop, + effect_GetEffectStatus, + effect_Download, + effect_Unload, + effect_Escape +}; + #else /* HAVE_IOHIDMANAGERCREATE */ const struct dinput_device joystick_osx_device = { diff --git a/dll/directx/dinput/joystick_private.h b/dll/directx/wine/dinput/joystick_private.h similarity index 97% rename from dll/directx/dinput/joystick_private.h rename to dll/directx/wine/dinput/joystick_private.h index 8388f4e3c30..947e2df4778 100644 --- a/dll/directx/dinput/joystick_private.h +++ b/dll/directx/wine/dinput/joystick_private.h @@ -98,4 +98,7 @@ HRESULT WINAPI JoystickWGenericImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface, HRESULT WINAPI JoystickAGenericImpl_SetActionMap(LPDIRECTINPUTDEVICE8A iface, LPDIACTIONFORMATA lpdiaf, LPCSTR lpszUserName, DWORD dwFlags) DECLSPEC_HIDDEN; HRESULT WINAPI JoystickWGenericImpl_SetActionMap(LPDIRECTINPUTDEVICE8W iface, LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags) DECLSPEC_HIDDEN; +DWORD typeFromGUID(REFGUID guid) DECLSPEC_HIDDEN; +void dump_DIEFFECT(LPCDIEFFECT eff, REFGUID guid, DWORD dwFlags) DECLSPEC_HIDDEN; + #endif /* __WINE_DLLS_DINPUT_JOYSTICK_PRIVATE_H */ diff --git a/dll/directx/dinput/keyboard.c b/dll/directx/wine/dinput/keyboard.c similarity index 98% rename from dll/directx/dinput/keyboard.c rename to dll/directx/wine/dinput/keyboard.c index f7cef15abc0..27e8769024e 100644 --- a/dll/directx/dinput/keyboard.c +++ b/dll/directx/wine/dinput/keyboard.c @@ -185,10 +185,10 @@ static void fill_keyboard_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD ver memcpy(lpddi, &ddi, (dwSize < sizeof(ddi) ? dwSize : sizeof(ddi))); } -static BOOL keyboarddev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) +static HRESULT keyboarddev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) { if (id != 0) - return FALSE; + return E_FAIL; if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_KEYBOARD) && (version < 0x0800)) || @@ -197,16 +197,16 @@ static BOOL keyboarddev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEI fill_keyboard_dideviceinstanceA(lpddi, version); - return TRUE; + return S_OK; } - return FALSE; + return S_FALSE; } -static BOOL keyboarddev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) +static HRESULT keyboarddev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) { if (id != 0) - return FALSE; + return E_FAIL; if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_KEYBOARD) && (version < 0x0800)) || @@ -215,10 +215,10 @@ static BOOL keyboarddev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEI fill_keyboard_dideviceinstanceW(lpddi, version); - return TRUE; + return S_OK; } - return FALSE; + return S_FALSE; } static SysKeyboardImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput) @@ -440,7 +440,7 @@ static HRESULT WINAPI SysKeyboardWImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface scan = DIDFT_GETINSTANCE(pdidoi->dwType); if (scan == DIK_PAUSE || scan == DIK_NUMLOCK) scan ^= 0x80; if (!GetKeyNameTextW((scan & 0x80) << 17 | (scan & 0x7f) << 16, - pdidoi->tszName, sizeof(pdidoi->tszName))) + pdidoi->tszName, sizeof(pdidoi->tszName)/sizeof(pdidoi->tszName[0]))) return DIERR_OBJECTNOTFOUND; _dump_OBJECTINSTANCEW(pdidoi); diff --git a/dll/directx/dinput/mouse.c b/dll/directx/wine/dinput/mouse.c similarity index 98% rename from dll/directx/dinput/mouse.c rename to dll/directx/wine/dinput/mouse.c index f5bfa5216e1..6192556a0e6 100644 --- a/dll/directx/dinput/mouse.c +++ b/dll/directx/wine/dinput/mouse.c @@ -159,10 +159,10 @@ static void fill_mouse_dideviceinstanceW(LPDIDEVICEINSTANCEW lpddi, DWORD versio memcpy(lpddi, &ddi, (dwSize < sizeof(ddi) ? dwSize : sizeof(ddi))); } -static BOOL mousedev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) +static HRESULT mousedev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEA lpddi, DWORD version, int id) { if (id != 0) - return FALSE; + return E_FAIL; if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_MOUSE) && (version < 0x0800)) || @@ -171,16 +171,16 @@ static BOOL mousedev_enum_deviceA(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINST fill_mouse_dideviceinstanceA(lpddi, version); - return TRUE; + return S_OK; } - return FALSE; + return S_FALSE; } -static BOOL mousedev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) +static HRESULT mousedev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTANCEW lpddi, DWORD version, int id) { if (id != 0) - return FALSE; + return E_FAIL; if ((dwDevType == 0) || ((dwDevType == DIDEVTYPE_MOUSE) && (version < 0x0800)) || @@ -189,10 +189,10 @@ static BOOL mousedev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINST fill_mouse_dideviceinstanceW(lpddi, version); - return TRUE; + return S_OK; } - return FALSE; + return S_FALSE; } static SysMouseImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput) diff --git a/dll/directx/dinput/resource.h b/dll/directx/wine/dinput/resource.h similarity index 100% rename from dll/directx/dinput/resource.h rename to dll/directx/wine/dinput/resource.h diff --git a/dll/directx/dinput8/CMakeLists.txt b/dll/directx/wine/dinput8/CMakeLists.txt similarity index 58% rename from dll/directx/dinput8/CMakeLists.txt rename to dll/directx/wine/dinput8/CMakeLists.txt index 375a6f5ed4c..804d97b1c17 100644 --- a/dll/directx/dinput8/CMakeLists.txt +++ b/dll/directx/wine/dinput8/CMakeLists.txt @@ -1,17 +1,14 @@ -remove_definitions(-D_WIN32_WINNT=0x502) -add_definitions(-D_WIN32_WINNT=0x600) - add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) spec2def(dinput8.dll dinput8.spec ADD_IMPORTLIB) -add_library(dinput8 SHARED +list(APPEND SOURCE dinput8_main.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/dinput8.def) -set_module_type(dinput8 win32dll UNICODE) +add_library(dinput8 SHARED ${SOURCE} version.rc) +set_module_type(dinput8 win32dll) target_link_libraries(dinput8 dxguid uuid wine) -add_importlibs(dinput8 dinput ole32 advapi32 msvcrt kernel32 ntdll) +add_importlibs(dinput8 ole32 msvcrt kernel32 ntdll) add_cd_file(TARGET dinput8 DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/dinput8/dinput8.idl b/dll/directx/wine/dinput8/dinput8.idl similarity index 100% rename from dll/directx/dinput8/dinput8.idl rename to dll/directx/wine/dinput8/dinput8.idl diff --git a/dll/directx/dinput8/dinput8.rgs b/dll/directx/wine/dinput8/dinput8.rgs similarity index 100% rename from dll/directx/dinput8/dinput8.rgs rename to dll/directx/wine/dinput8/dinput8.rgs diff --git a/dll/directx/dinput8/dinput8.spec b/dll/directx/wine/dinput8/dinput8.spec similarity index 100% rename from dll/directx/dinput8/dinput8.spec rename to dll/directx/wine/dinput8/dinput8.spec diff --git a/dll/directx/dinput8/dinput8_main.c b/dll/directx/wine/dinput8/dinput8_main.c similarity index 100% rename from dll/directx/dinput8/dinput8_main.c rename to dll/directx/wine/dinput8/dinput8_main.c diff --git a/dll/directx/dinput8/version.rc b/dll/directx/wine/dinput8/version.rc similarity index 100% rename from dll/directx/dinput8/version.rc rename to dll/directx/wine/dinput8/version.rc diff --git a/dll/directx/dmusic/CMakeLists.txt b/dll/directx/wine/dmusic/CMakeLists.txt similarity index 71% rename from dll/directx/dmusic/CMakeLists.txt rename to dll/directx/wine/dmusic/CMakeLists.txt index 754ef2afa3b..1ed48641bdb 100644 --- a/dll/directx/dmusic/CMakeLists.txt +++ b/dll/directx/wine/dmusic/CMakeLists.txt @@ -1,7 +1,4 @@ -remove_definitions(-D_WIN32_WINNT=0x502) -add_definitions(-D_WIN32_WINNT=0x600) - add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) spec2def(dmusic.dll dmusic.spec) @@ -15,13 +12,11 @@ list(APPEND SOURCE download.c instrument.c port.c - version.rc ${CMAKE_CURRENT_BINARY_DIR}/dmusic.def) -add_library(dmusic SHARED ${SOURCE}) -set_module_type(dmusic win32dll UNICODE) +add_library(dmusic SHARED ${SOURCE} version.rc) +set_module_type(dmusic win32dll) target_link_libraries(dmusic dxguid uuid wine) add_importlibs(dmusic ole32 advapi32 winmm msvcrt kernel32 ntdll) -add_dependencies(dmusic psdk) add_pch(dmusic dmusic_private.h) add_cd_file(TARGET dmusic DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/dmusic/buffer.c b/dll/directx/wine/dmusic/buffer.c similarity index 99% rename from dll/directx/dmusic/buffer.c rename to dll/directx/wine/dmusic/buffer.c index f6156f366ff..221100d84fc 100644 --- a/dll/directx/dmusic/buffer.c +++ b/dll/directx/wine/dmusic/buffer.c @@ -21,7 +21,7 @@ #include "dmusic_private.h" //#include "initguid.h" -#include "dmksctrl.h" +#include WINE_DEFAULT_DEBUG_CHANNEL(dmusic); diff --git a/dll/directx/dmusic/clock.c b/dll/directx/wine/dmusic/clock.c similarity index 100% rename from dll/directx/dmusic/clock.c rename to dll/directx/wine/dmusic/clock.c diff --git a/dll/directx/dmusic/collection.c b/dll/directx/wine/dmusic/collection.c similarity index 100% rename from dll/directx/dmusic/collection.c rename to dll/directx/wine/dmusic/collection.c diff --git a/dll/directx/dmusic/dmusic.c b/dll/directx/wine/dmusic/dmusic.c similarity index 100% rename from dll/directx/dmusic/dmusic.c rename to dll/directx/wine/dmusic/dmusic.c diff --git a/dll/directx/dmusic/dmusic.idl b/dll/directx/wine/dmusic/dmusic.idl similarity index 100% rename from dll/directx/dmusic/dmusic.idl rename to dll/directx/wine/dmusic/dmusic.idl diff --git a/dll/directx/dmusic/dmusic.rgs b/dll/directx/wine/dmusic/dmusic.rgs similarity index 100% rename from dll/directx/dmusic/dmusic.rgs rename to dll/directx/wine/dmusic/dmusic.rgs diff --git a/dll/directx/dmusic/dmusic.spec b/dll/directx/wine/dmusic/dmusic.spec similarity index 100% rename from dll/directx/dmusic/dmusic.spec rename to dll/directx/wine/dmusic/dmusic.spec diff --git a/dll/directx/dmusic/dmusic_main.c b/dll/directx/wine/dmusic/dmusic_main.c similarity index 99% rename from dll/directx/dmusic/dmusic_main.c rename to dll/directx/wine/dmusic/dmusic_main.c index 6ad4ed5c059..80e4a2db165 100644 --- a/dll/directx/dmusic/dmusic_main.c +++ b/dll/directx/wine/dmusic/dmusic_main.c @@ -120,9 +120,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { if (fdwReason == DLL_PROCESS_ATTACH) { instance = hinstDLL; DisableThreadLibraryCalls(hinstDLL); - /* FIXME: Initialisation */ - } else if (fdwReason == DLL_PROCESS_DETACH) { - /* FIXME: Cleanup */ } return TRUE; diff --git a/dll/directx/dmusic/dmusic_private.h b/dll/directx/wine/dmusic/dmusic_private.h similarity index 100% rename from dll/directx/dmusic/dmusic_private.h rename to dll/directx/wine/dmusic/dmusic_private.h diff --git a/dll/directx/dmusic/download.c b/dll/directx/wine/dmusic/download.c similarity index 100% rename from dll/directx/dmusic/download.c rename to dll/directx/wine/dmusic/download.c diff --git a/dll/directx/dmusic/instrument.c b/dll/directx/wine/dmusic/instrument.c similarity index 100% rename from dll/directx/dmusic/instrument.c rename to dll/directx/wine/dmusic/instrument.c diff --git a/dll/directx/dmusic/port.c b/dll/directx/wine/dmusic/port.c similarity index 99% rename from dll/directx/dmusic/port.c rename to dll/directx/wine/dmusic/port.c index 459fdb8cd5c..2e60828dcb3 100644 --- a/dll/directx/dmusic/port.c +++ b/dll/directx/wine/dmusic/port.c @@ -108,7 +108,7 @@ static inline IDirectMusicDownloadedInstrumentImpl* unsafe_impl_from_IDirectMusi return impl_from_IDirectMusicDownloadedInstrument(iface); } -HRESULT DMUSIC_CreateDirectMusicDownloadedInstrumentImpl(IDirectMusicDownloadedInstrument **instrument) +static HRESULT DMUSIC_CreateDirectMusicDownloadedInstrumentImpl(IDirectMusicDownloadedInstrument **instrument) { IDirectMusicDownloadedInstrumentImpl *object; @@ -263,7 +263,7 @@ static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_DownloadInstrument(LPDIRECT nb_regions = instrument_object->header.cRegions; size = sizeof(DMUS_DOWNLOADINFO) + sizeof(ULONG) * (1 + nb_regions) + sizeof(DMUS_INSTRUMENT) + sizeof(DMUS_REGION) * nb_regions; - data = (BYTE*)HeapAlloc(GetProcessHeap(), 0, size); + data = HeapAlloc(GetProcessHeap(), 0, size); if (!data) return E_OUTOFMEMORY; diff --git a/dll/directx/dmusic/regsvr.c b/dll/directx/wine/dmusic/regsvr.c similarity index 100% rename from dll/directx/dmusic/regsvr.c rename to dll/directx/wine/dmusic/regsvr.c diff --git a/dll/directx/dmusic/version.rc b/dll/directx/wine/dmusic/version.rc similarity index 100% rename from dll/directx/dmusic/version.rc rename to dll/directx/wine/dmusic/version.rc diff --git a/dll/directx/dplay/CMakeLists.txt b/dll/directx/wine/dplay/CMakeLists.txt similarity index 77% rename from dll/directx/dplay/CMakeLists.txt rename to dll/directx/wine/dplay/CMakeLists.txt index fd1e6e4bc59..fca39c38090 100644 --- a/dll/directx/dplay/CMakeLists.txt +++ b/dll/directx/wine/dplay/CMakeLists.txt @@ -1,14 +1,11 @@ include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - spec2def(dplay.dll dplay.spec) add_library(dplay SHARED - dplay_main.c version.rc ${CMAKE_CURRENT_BINARY_DIR}/dplay.def) -set_module_type(dplay win32dll UNICODE) +set_module_type(dplay win32dll) add_importlibs(dplay dplayx msvcrt kernel32 ntdll) -add_dependencies(dplay psdk) add_cd_file(TARGET dplay DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/dplay/dplay.spec b/dll/directx/wine/dplay/dplay.spec similarity index 100% rename from dll/directx/dplay/dplay.spec rename to dll/directx/wine/dplay/dplay.spec diff --git a/dll/directx/dplay/version.rc b/dll/directx/wine/dplay/version.rc similarity index 100% rename from dll/directx/dplay/version.rc rename to dll/directx/wine/dplay/version.rc diff --git a/dll/directx/dplayx/CMakeLists.txt b/dll/directx/wine/dplayx/CMakeLists.txt similarity index 100% rename from dll/directx/dplayx/CMakeLists.txt rename to dll/directx/wine/dplayx/CMakeLists.txt diff --git a/dll/directx/dplayx/dpclassfactory.c b/dll/directx/wine/dplayx/dpclassfactory.c similarity index 50% rename from dll/directx/dplayx/dpclassfactory.c rename to dll/directx/wine/dplayx/dpclassfactory.c index 0f80b627780..67f36ca7bbe 100644 --- a/dll/directx/dplayx/dpclassfactory.c +++ b/dll/directx/wine/dplayx/dpclassfactory.c @@ -30,20 +30,15 @@ //#include "dplay.h" //#include "dplobby.h" //#include "initguid.h" -#include "dpinit.h" +#include "dplay_global.h" WINE_DEFAULT_DEBUG_CHANNEL(dplay); -/******************************************************************************* - * DirectPlayLobby ClassFactory - */ - typedef struct { - /* IUnknown fields */ IClassFactory IClassFactory_iface; - LONG ref; + HRESULT (*createinstance)(REFIID riid, void **ppv); } IClassFactoryImpl; static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface) @@ -51,61 +46,62 @@ static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface) return CONTAINING_RECORD(iface, IClassFactoryImpl, IClassFactory_iface); } -static HRESULT WINAPI -DP_and_DPL_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) { - IClassFactoryImpl *This = impl_from_IClassFactory(iface); +static HRESULT WINAPI IClassFactoryImpl_QueryInterface(IClassFactory *iface, REFIID riid, + void **ppv) +{ + TRACE("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv); - FIXME("(%p)->(%s,%p),stub!\n",This,debugstr_guid(riid),ppobj); - - return E_NOINTERFACE; -} - -static ULONG WINAPI -DP_and_DPL_AddRef(LPCLASSFACTORY iface) { - IClassFactoryImpl *This = impl_from_IClassFactory(iface); - return InterlockedIncrement(&This->ref); -} - -static ULONG WINAPI DP_and_DPL_Release(LPCLASSFACTORY iface) { - IClassFactoryImpl *This = impl_from_IClassFactory(iface); - /* static class (reference starts @ 1), won't ever be freed */ - return InterlockedDecrement(&This->ref); -} - -static HRESULT WINAPI DP_and_DPL_CreateInstance( - LPCLASSFACTORY iface,LPUNKNOWN pOuter,REFIID riid,LPVOID *ppobj -) { - IClassFactoryImpl *This = impl_from_IClassFactory(iface); - - TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj); - - if ( DPL_CreateInterface( riid, ppobj ) == S_OK ) - { - return S_OK; - } - else if ( DP_CreateInterface( riid, ppobj ) == S_OK ) - { - return S_OK; - } - - return E_NOINTERFACE; -} - -static HRESULT WINAPI DP_and_DPL_LockServer(LPCLASSFACTORY iface,BOOL dolock) { - IClassFactoryImpl *This = impl_from_IClassFactory(iface); - FIXME("(%p)->(%d),stub!\n",This,dolock); + if (IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IClassFactory, riid)) + { + *ppv = iface; + IClassFactory_AddRef(iface); return S_OK; + } + + *ppv = NULL; + WARN("no interface for %s\n", debugstr_guid(riid)); + return E_NOINTERFACE; } -static const IClassFactoryVtbl DP_and_DPL_Vtbl = { - DP_and_DPL_QueryInterface, - DP_and_DPL_AddRef, - DP_and_DPL_Release, - DP_and_DPL_CreateInstance, - DP_and_DPL_LockServer +static ULONG WINAPI IClassFactoryImpl_AddRef(IClassFactory *iface) +{ + return 2; /* non-heap based object */ +} + +static ULONG WINAPI IClassFactoryImpl_Release(IClassFactory *iface) +{ + return 1; /* non-heap based object */ +} + +static HRESULT WINAPI IClassFactoryImpl_CreateInstance(IClassFactory *iface, IUnknown *pOuter, + REFIID riid, void **ppv) +{ + IClassFactoryImpl *This = impl_from_IClassFactory(iface); + + TRACE("(%p)->(%p,%s,%p)\n", iface, pOuter, debugstr_guid(riid), ppv); + + if (pOuter) + return CLASS_E_NOAGGREGATION; + + return This->createinstance(riid, ppv); +} + +static HRESULT WINAPI IClassFactoryImpl_LockServer(IClassFactory *iface, BOOL dolock) +{ + FIXME("(%p)->(%d),stub!\n", iface, dolock); + return S_OK; +} + +static const IClassFactoryVtbl cf_vt = { + IClassFactoryImpl_QueryInterface, + IClassFactoryImpl_AddRef, + IClassFactoryImpl_Release, + IClassFactoryImpl_CreateInstance, + IClassFactoryImpl_LockServer }; -static IClassFactoryImpl DP_and_DPL_CF = {{&DP_and_DPL_Vtbl}, 1 }; +static IClassFactoryImpl dplay_cf = {{&cf_vt}, dplay_create}; +static IClassFactoryImpl dplaylobby_cf = {{&cf_vt}, dplobby_create}; /******************************************************************************* @@ -129,14 +125,12 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) { TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); - if ( IsEqualCLSID( riid, &IID_IClassFactory ) ) - { - *ppv = &DP_and_DPL_CF; - IClassFactory_AddRef( (IClassFactory*)*ppv ); + if (IsEqualCLSID(&CLSID_DirectPlay, rclsid)) + return IClassFactory_QueryInterface(&dplay_cf.IClassFactory_iface, riid, ppv); - return S_OK; - } + if (IsEqualCLSID(&CLSID_DirectPlayLobby, rclsid)) + return IClassFactory_QueryInterface(&dplaylobby_cf.IClassFactory_iface, riid, ppv); - ERR("(%s,%s,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + FIXME("(%s,%s,%p): no class found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); return CLASS_E_CLASSNOTAVAILABLE; } diff --git a/dll/directx/wine/dplayx/dplay.c b/dll/directx/wine/dplayx/dplay.c new file mode 100644 index 00000000000..e4514bf9d5c --- /dev/null +++ b/dll/directx/wine/dplayx/dplay.c @@ -0,0 +1,6053 @@ +/* Direct Play 2,3,4 Implementation + * + * Copyright 1998,1999,2000,2001 - Peter Hunnisett + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS +#include +//#include "wine/port.h" + +//#include +//#include + +#define NONAMELESSUNION +#define NONAMELESSSTRUCT +#include +//#include "winerror.h" +//#include "winbase.h" +//#include "winnt.h" +#include +//#include "winnls.h" +#include +#include + +#include "dplayx_global.h" +#include "name_server.h" +//#include "dplayx_queue.h" +//#include "dplaysp.h" +//#include "dplay_global.h" + +WINE_DEFAULT_DEBUG_CHANNEL(dplay); + +/* FIXME: Should this be externed? */ +extern HRESULT DPL_CreateCompoundAddress +( LPCDPCOMPOUNDADDRESSELEMENT lpElements, DWORD dwElementCount, + LPVOID lpAddress, LPDWORD lpdwAddressSize, BOOL bAnsiInterface ); + + +/* Local function prototypes */ +static lpPlayerList DP_FindPlayer( IDirectPlayImpl *This, DPID dpid ); +static BOOL DP_CopyDPNAMEStruct( LPDPNAME lpDst, const DPNAME *lpSrc, BOOL bAnsi ); +static void DP_SetGroupData( lpGroupData lpGData, DWORD dwFlags, + LPVOID lpData, DWORD dwDataSize ); +static void DP_DeleteDPNameStruct( LPDPNAME lpDPName ); +static BOOL CALLBACK cbDeletePlayerFromAllGroups( DPID dpId, + DWORD dwPlayerType, + LPCDPNAME lpName, + DWORD dwFlags, + LPVOID lpContext ); +static lpGroupData DP_FindAnyGroup( IDirectPlayImpl *This, DPID dpid ); + +/* Helper methods for player/group interfaces */ +static HRESULT DP_SetSessionDesc( IDirectPlayImpl *This, const DPSESSIONDESC2 *lpSessDesc, + DWORD dwFlags, BOOL bInitial, BOOL bAnsi ); +static HRESULT DP_SP_SendEx( IDirectPlayImpl *This, DWORD dwFlags, void *lpData, DWORD dwDataSize, + DWORD dwPriority, DWORD dwTimeout, void *lpContext, DWORD *lpdwMsgID ); +static BOOL DP_BuildSPCompoundAddr( LPGUID lpcSpGuid, LPVOID* lplpAddrBuf, + LPDWORD lpdwBufSize ); + +static DPID DP_GetRemoteNextObjectId(void); + +static DWORD DP_CalcSessionDescSize( LPCDPSESSIONDESC2 lpSessDesc, BOOL bAnsi ); +static void DP_CopySessionDesc( LPDPSESSIONDESC2 destSessionDesc, + LPCDPSESSIONDESC2 srcSessDesc, BOOL bAnsi ); + + +#define DPID_NOPARENT_GROUP 0 /* Magic number to indicate no parent of group */ +#define DPID_SYSTEM_GROUP DPID_NOPARENT_GROUP /* If system group is supported + we don't have to change much */ +#define DPID_NAME_SERVER 0x19a9d65b /* Don't ask me why */ + +/* Strip out dwFlag values which cannot be sent in the CREATEGROUP msg */ +#define DPMSG_CREATEGROUP_DWFLAGS(x) ( (x) & DPGROUP_HIDDEN ) + +/* Strip out all dwFlags values for CREATEPLAYER msg */ +#define DPMSG_CREATEPLAYER_DWFLAGS(x) 0 + +static LONG kludgePlayerGroupId = 1000; + + +static inline IDirectPlayImpl *impl_from_IDirectPlay( IDirectPlay *iface ) +{ + return CONTAINING_RECORD( iface, IDirectPlayImpl, IDirectPlay_iface ); +} + +static inline IDirectPlayImpl *impl_from_IDirectPlay2( IDirectPlay2 *iface ) +{ + return CONTAINING_RECORD( iface, IDirectPlayImpl, IDirectPlay2_iface ); +} + +static inline IDirectPlayImpl *impl_from_IDirectPlay2A( IDirectPlay2A *iface ) +{ + return CONTAINING_RECORD( iface, IDirectPlayImpl, IDirectPlay2A_iface ); +} + +static inline IDirectPlayImpl *impl_from_IDirectPlay3A( IDirectPlay3A *iface ) +{ + return CONTAINING_RECORD( iface, IDirectPlayImpl, IDirectPlay3A_iface ); +} + +static inline IDirectPlayImpl *impl_from_IDirectPlay3( IDirectPlay3 *iface ) +{ + return CONTAINING_RECORD( iface, IDirectPlayImpl, IDirectPlay3_iface ); +} + +static inline IDirectPlayImpl *impl_from_IDirectPlay4A( IDirectPlay4A *iface ) +{ + return CONTAINING_RECORD( iface, IDirectPlayImpl, IDirectPlay4A_iface ); +} + +static inline IDirectPlayImpl *impl_from_IDirectPlay4( IDirectPlay4 *iface ) +{ + return CONTAINING_RECORD( iface, IDirectPlayImpl, IDirectPlay4_iface ); +} + +static BOOL DP_CreateDirectPlay2( LPVOID lpDP ) +{ + IDirectPlayImpl *This = lpDP; + + This->dp2 = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *(This->dp2) ) ); + if ( This->dp2 == NULL ) + { + return FALSE; + } + + This->dp2->bConnectionOpen = FALSE; + + This->dp2->hEnumSessionThread = INVALID_HANDLE_VALUE; + This->dp2->dwEnumSessionLock = 0; + + This->dp2->bHostInterface = FALSE; + + DPQ_INIT(This->dp2->receiveMsgs); + DPQ_INIT(This->dp2->sendMsgs); + DPQ_INIT(This->dp2->repliesExpected); + + if( !NS_InitializeSessionCache( &This->dp2->lpNameServerData ) ) + { + /* FIXME: Memory leak */ + return FALSE; + } + + /* Provide an initial session desc with nothing in it */ + This->dp2->lpSessionDesc = HeapAlloc( GetProcessHeap(), + HEAP_ZERO_MEMORY, + sizeof( *This->dp2->lpSessionDesc ) ); + if( This->dp2->lpSessionDesc == NULL ) + { + /* FIXME: Memory leak */ + return FALSE; + } + This->dp2->lpSessionDesc->dwSize = sizeof( *This->dp2->lpSessionDesc ); + + /* We are emulating a dp 6 implementation */ + This->dp2->spData.dwSPVersion = DPSP_MAJORVERSION; + + This->dp2->spData.lpCB = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, + sizeof( *This->dp2->spData.lpCB ) ); + This->dp2->spData.lpCB->dwSize = sizeof( *This->dp2->spData.lpCB ); + This->dp2->spData.lpCB->dwVersion = DPSP_MAJORVERSION; + + /* This is the pointer to the service provider */ + if( FAILED( DPSP_CreateInterface( &IID_IDirectPlaySP, + (LPVOID*)&This->dp2->spData.lpISP, This ) ) + ) + { + /* FIXME: Memory leak */ + return FALSE; + } + + /* Setup lobby provider information */ + This->dp2->dplspData.dwSPVersion = DPSP_MAJORVERSION; + This->dp2->dplspData.lpCB = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, + sizeof( *This->dp2->dplspData.lpCB ) ); + This->dp2->dplspData.lpCB->dwSize = sizeof( *This->dp2->dplspData.lpCB ); + + if( FAILED( DPLSP_CreateInterface( &IID_IDPLobbySP, + (LPVOID*)&This->dp2->dplspData.lpISP, This ) ) + ) + { + /* FIXME: Memory leak */ + return FALSE; + } + + return TRUE; +} + +/* Definition of the global function in dplayx_queue.h. # + * FIXME: Would it be better to have a dplayx_queue.c for this function? */ +DPQ_DECL_DELETECB( cbDeleteElemFromHeap, LPVOID ) +{ + HeapFree( GetProcessHeap(), 0, elem ); +} + +static BOOL DP_DestroyDirectPlay2( LPVOID lpDP ) +{ + IDirectPlayImpl *This = lpDP; + + if( This->dp2->hEnumSessionThread != INVALID_HANDLE_VALUE ) + { + TerminateThread( This->dp2->hEnumSessionThread, 0 ); + CloseHandle( This->dp2->hEnumSessionThread ); + } + + /* Finish with the SP - have it shutdown */ + if( This->dp2->spData.lpCB->ShutdownEx ) + { + DPSP_SHUTDOWNDATA data; + + TRACE( "Calling SP ShutdownEx\n" ); + + data.lpISP = This->dp2->spData.lpISP; + + (*This->dp2->spData.lpCB->ShutdownEx)( &data ); + } + else if (This->dp2->spData.lpCB->Shutdown ) /* obsolete interface */ + { + TRACE( "Calling obsolete SP Shutdown\n" ); + (*This->dp2->spData.lpCB->Shutdown)(); + } + + /* Unload the SP (if it exists) */ + if( This->dp2->hServiceProvider != 0 ) + { + FreeLibrary( This->dp2->hServiceProvider ); + } + + /* Unload the Lobby Provider (if it exists) */ + if( This->dp2->hDPLobbyProvider != 0 ) + { + FreeLibrary( This->dp2->hDPLobbyProvider ); + } + + /* FIXME: Need to delete receive and send msgs queue contents */ + + NS_DeleteSessionCache( This->dp2->lpNameServerData ); + + HeapFree( GetProcessHeap(), 0, This->dp2->lpSessionDesc ); + + IDirectPlaySP_Release( This->dp2->spData.lpISP ); + + /* Delete the contents */ + HeapFree( GetProcessHeap(), 0, This->dp2 ); + + return TRUE; +} + +static void dplay_destroy(IDirectPlayImpl *obj) +{ + DP_DestroyDirectPlay2( obj ); + obj->lock.DebugInfo->Spare[0] = 0; + DeleteCriticalSection( &obj->lock ); + HeapFree( GetProcessHeap(), 0, obj ); +} + +static inline DPID DP_NextObjectId(void) +{ + return (DPID)InterlockedIncrement( &kludgePlayerGroupId ); +} + +/* *lplpReply will be non NULL iff there is something to reply */ +HRESULT DP_HandleMessage( IDirectPlayImpl *This, const void *lpcMessageBody, + DWORD dwMessageBodySize, const void *lpcMessageHeader, WORD wCommandId, WORD wVersion, + void **lplpReply, DWORD *lpdwMsgSize ) +{ + TRACE( "(%p)->(%p,0x%08x,%p,%u,%u)\n", + This, lpcMessageBody, dwMessageBodySize, lpcMessageHeader, wCommandId, + wVersion ); + + switch( wCommandId ) + { + /* Name server needs to handle this request */ + case DPMSGCMD_ENUMSESSIONSREQUEST: + /* Reply expected */ + NS_ReplyToEnumSessionsRequest( lpcMessageBody, lplpReply, lpdwMsgSize, This ); + break; + + /* Name server needs to handle this request */ + case DPMSGCMD_ENUMSESSIONSREPLY: + /* No reply expected */ + NS_AddRemoteComputerAsNameServer( lpcMessageHeader, + This->dp2->spData.dwSPHeaderSize, + lpcMessageBody, + This->dp2->lpNameServerData ); + break; + + case DPMSGCMD_REQUESTNEWPLAYERID: + { + LPCDPMSG_REQUESTNEWPLAYERID lpcMsg = lpcMessageBody; + + LPDPMSG_NEWPLAYERIDREPLY lpReply; + + *lpdwMsgSize = This->dp2->spData.dwSPHeaderSize + sizeof( *lpReply ); + + *lplpReply = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, *lpdwMsgSize ); + + FIXME( "Ignoring dwFlags 0x%08x in request msg\n", + lpcMsg->dwFlags ); + + /* Setup the reply */ + lpReply = (LPDPMSG_NEWPLAYERIDREPLY)( (BYTE*)(*lplpReply) + + This->dp2->spData.dwSPHeaderSize ); + + lpReply->envelope.dwMagic = DPMSGMAGIC_DPLAYMSG; + lpReply->envelope.wCommandId = DPMSGCMD_NEWPLAYERIDREPLY; + lpReply->envelope.wVersion = DPMSGVER_DP6; + + lpReply->dpidNewPlayerId = DP_NextObjectId(); + + TRACE( "Allocating new playerid 0x%08x from remote request\n", + lpReply->dpidNewPlayerId ); + break; + } + + case DPMSGCMD_GETNAMETABLEREPLY: + case DPMSGCMD_NEWPLAYERIDREPLY: +#if 0 + if( wCommandId == DPMSGCMD_NEWPLAYERIDREPLY ) + DebugBreak(); +#endif + DP_MSG_ReplyReceived( This, wCommandId, lpcMessageBody, dwMessageBodySize ); + break; + +#if 1 + case DPMSGCMD_JUSTENVELOPE: + TRACE( "GOT THE SELF MESSAGE: %p -> 0x%08x\n", lpcMessageHeader, ((const DWORD *)lpcMessageHeader)[1] ); + NS_SetLocalAddr( This->dp2->lpNameServerData, lpcMessageHeader, 20 ); + DP_MSG_ReplyReceived( This, wCommandId, lpcMessageBody, dwMessageBodySize ); +#endif + + case DPMSGCMD_FORWARDADDPLAYER: +#if 0 + DebugBreak(); +#endif +#if 1 + TRACE( "Sending message to self to get my addr\n" ); + DP_MSG_ToSelf( This, 1 ); /* This is a hack right now */ +#endif + break; + + case DPMSGCMD_FORWARDADDPLAYERNACK: + DP_MSG_ErrorReceived( This, wCommandId, lpcMessageBody, dwMessageBodySize ); + break; + + default: + FIXME( "Unknown wCommandId %u. Ignoring message\n", wCommandId ); + DebugBreak(); + break; + } + + /* FIXME: There is code in dplaysp.c to handle dplay commands. Move to here. */ + + return DP_OK; +} + + +static HRESULT WINAPI IDirectPlayImpl_QueryInterface( IDirectPlay *iface, REFIID riid, void **ppv ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + return IDirectPlayX_QueryInterface( &This->IDirectPlay4_iface, riid, ppv ); +} + +static ULONG WINAPI IDirectPlayImpl_AddRef( IDirectPlay *iface ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + ULONG ref = InterlockedIncrement( &This->ref ); + + TRACE( "(%p) ref=%d\n", This, ref ); + + if ( ref == 1 ) + InterlockedIncrement( &This->numIfaces ); + + return ref; +} + +static ULONG WINAPI IDirectPlayImpl_Release( IDirectPlay *iface ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + ULONG ref = InterlockedDecrement( &This->ref ); + + TRACE( "(%p) ref=%d\n", This, ref ); + + if ( !ref && !InterlockedDecrement( &This->numIfaces ) ) + dplay_destroy( This ); + + return ref; +} + +static HRESULT WINAPI IDirectPlayImpl_AddPlayerToGroup( IDirectPlay *iface, DPID group, + DPID player ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(0x%08x,0x%08x): stub\n", This, group, player ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_Close( IDirectPlay *iface ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p): stub\n", This ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_CreatePlayer( IDirectPlay *iface, DPID *player, + LPSTR name, LPSTR fullname, HANDLE *event ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(%p,%s,%s,%p): stub\n", This, player, debugstr_a( name ), debugstr_a( fullname ), + event ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_CreateGroup( IDirectPlay *iface, DPID *group, LPSTR name, + LPSTR fullname ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(%p,%s,%s): stub\n", This, group, debugstr_a( name ), debugstr_a( fullname ) ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_DeletePlayerFromGroup( IDirectPlay *iface, DPID group, + DPID player ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(0x%08x,0x%08x): stub\n", This, group, player ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_DestroyPlayer( IDirectPlay *iface, DPID player ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(0x%08x): stub\n", This, player ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_DestroyGroup( IDirectPlay *iface, DPID group ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(0x%08x): stub\n", This, group ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_EnableNewPlayers( IDirectPlay *iface, BOOL enable ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(%d): stub\n", This, enable ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_EnumGroupPlayers( IDirectPlay *iface, DPID group, + LPDPENUMPLAYERSCALLBACK enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(0x%08x,%p,%p,0x%08x): stub\n", This, group, enumplayercb, context, flags ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_EnumGroups( IDirectPlay *iface, DWORD session, + LPDPENUMPLAYERSCALLBACK enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(0x%08x,%p,%p,0x%08x): stub\n", This, session, enumplayercb, context, flags ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_EnumPlayers( IDirectPlay *iface, DWORD session, + LPDPENUMPLAYERSCALLBACK enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(0x%08x,%p,%p,0x%08x): stub\n", This, session, enumplayercb, context, flags ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_EnumSessions( IDirectPlay *iface, DPSESSIONDESC *sdesc, + DWORD timeout, LPDPENUMSESSIONSCALLBACK enumsessioncb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(%p,%u,%p,%p,0x%08x): stub\n", This, sdesc, timeout, enumsessioncb, context, + flags ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_GetCaps( IDirectPlay *iface, DPCAPS *caps ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(%p): stub\n", This, caps ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_GetMessageCount( IDirectPlay *iface, DPID player, + DWORD *count ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(0x%08x,%p): stub\n", This, player, count ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_GetPlayerCaps( IDirectPlay *iface, DPID player, DPCAPS *caps ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(0x%08x,%p): stub\n", This, player, caps ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_GetPlayerName( IDirectPlay *iface, DPID player, LPSTR name, + DWORD *size_name, LPSTR fullname, DWORD *size_fullname ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(0x%08x,%p,%p,%p,%p): stub\n", This, player, name, size_name, fullname, + size_fullname ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_Initialize( IDirectPlay *iface, GUID *guid ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(%p): stub\n", This, guid ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_Open( IDirectPlay *iface, DPSESSIONDESC *sdesc ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(%p): stub\n", This, sdesc ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_Receive( IDirectPlay *iface, DPID *from, DPID *to, + DWORD flags, void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(%p,%p,0x%08x,%p,%p): stub\n", This, from, to, flags, data, size ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_SaveSession( IDirectPlay *iface, LPSTR reserved ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(%p): stub\n", This, reserved ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_Send( IDirectPlay *iface, DPID from, DPID to, DWORD flags, + void *data, DWORD size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(0x%08x,0x%08x,0x%08x,%p,%u): stub\n", This, from, to, flags, data, size ); + return E_NOTIMPL; +} + +static HRESULT WINAPI IDirectPlayImpl_SetPlayerName( IDirectPlay *iface, DPID player, LPSTR name, + LPSTR fullname ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay( iface ); + FIXME( "(%p)->(0x%08x,%s,%s): stub\n", This, player, debugstr_a( name ), + debugstr_a ( fullname ) ); + return E_NOTIMPL; +} + +static const IDirectPlayVtbl dp_vt = +{ + IDirectPlayImpl_QueryInterface, + IDirectPlayImpl_AddRef, + IDirectPlayImpl_Release, + IDirectPlayImpl_AddPlayerToGroup, + IDirectPlayImpl_Close, + IDirectPlayImpl_CreatePlayer, + IDirectPlayImpl_CreateGroup, + IDirectPlayImpl_DeletePlayerFromGroup, + IDirectPlayImpl_DestroyPlayer, + IDirectPlayImpl_DestroyGroup, + IDirectPlayImpl_EnableNewPlayers, + IDirectPlayImpl_EnumGroupPlayers, + IDirectPlayImpl_EnumGroups, + IDirectPlayImpl_EnumPlayers, + IDirectPlayImpl_EnumSessions, + IDirectPlayImpl_GetCaps, + IDirectPlayImpl_GetMessageCount, + IDirectPlayImpl_GetPlayerCaps, + IDirectPlayImpl_GetPlayerName, + IDirectPlayImpl_Initialize, + IDirectPlayImpl_Open, + IDirectPlayImpl_Receive, + IDirectPlayImpl_SaveSession, + IDirectPlayImpl_Send, + IDirectPlayImpl_SetPlayerName, +}; + + +static HRESULT WINAPI IDirectPlay2AImpl_QueryInterface( IDirectPlay2A *iface, REFIID riid, + void **ppv ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_QueryInterface( &This->IDirectPlay4_iface, riid, ppv ); +} + +static HRESULT WINAPI IDirectPlay2Impl_QueryInterface( IDirectPlay2 *iface, REFIID riid, + void **ppv ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_QueryInterface( &This->IDirectPlay4_iface, riid, ppv ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_QueryInterface( IDirectPlay3A *iface, REFIID riid, + void **ppv ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_QueryInterface( &This->IDirectPlay4_iface, riid, ppv ); +} + +static HRESULT WINAPI IDirectPlay3Impl_QueryInterface( IDirectPlay3 *iface, REFIID riid, + void **ppv ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_QueryInterface( &This->IDirectPlay4_iface, riid, ppv ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_QueryInterface( IDirectPlay4A *iface, REFIID riid, + void **ppv ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_QueryInterface( &This->IDirectPlay4_iface, riid, ppv ); +} + +static HRESULT WINAPI IDirectPlay4Impl_QueryInterface( IDirectPlay4 *iface, REFIID riid, + void **ppv ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + + if ( IsEqualGUID( &IID_IUnknown, riid ) ) + { + TRACE( "(%p)->(IID_IUnknown %p)\n", This, ppv ); + *ppv = &This->IDirectPlay_iface; + } + else if ( IsEqualGUID( &IID_IDirectPlay, riid ) ) + { + TRACE( "(%p)->(IID_IDirectPlay %p)\n", This, ppv ); + *ppv = &This->IDirectPlay_iface; + } + else if ( IsEqualGUID( &IID_IDirectPlay2A, riid ) ) + { + TRACE( "(%p)->(IID_IDirectPlay2A %p)\n", This, ppv ); + *ppv = &This->IDirectPlay2A_iface; + } + else if ( IsEqualGUID( &IID_IDirectPlay2, riid ) ) + { + TRACE( "(%p)->(IID_IDirectPlay2 %p)\n", This, ppv ); + *ppv = &This->IDirectPlay2_iface; + } + else if ( IsEqualGUID( &IID_IDirectPlay3A, riid ) ) + { + TRACE( "(%p)->(IID_IDirectPlay3A %p)\n", This, ppv ); + *ppv = &This->IDirectPlay3A_iface; + } + else if ( IsEqualGUID( &IID_IDirectPlay3, riid ) ) + { + TRACE( "(%p)->(IID_IDirectPlay3 %p)\n", This, ppv ); + *ppv = &This->IDirectPlay3_iface; + } + else if ( IsEqualGUID( &IID_IDirectPlay4A, riid ) ) + { + TRACE( "(%p)->(IID_IDirectPlay4A %p)\n", This, ppv ); + *ppv = &This->IDirectPlay4A_iface; + } + else if ( IsEqualGUID( &IID_IDirectPlay4, riid ) ) + { + TRACE( "(%p)->(IID_IDirectPlay4 %p)\n", This, ppv ); + *ppv = &This->IDirectPlay4_iface; + } + else + { + WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); + *ppv = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; +} + +static ULONG WINAPI IDirectPlay2AImpl_AddRef( IDirectPlay2A *iface ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + ULONG ref = InterlockedIncrement( &This->ref2A ); + + TRACE( "(%p) ref2A=%d\n", This, ref ); + + if ( ref == 1 ) + InterlockedIncrement( &This->numIfaces ); + + return ref; +} + +static ULONG WINAPI IDirectPlay2Impl_AddRef( IDirectPlay2 *iface ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + ULONG ref = InterlockedIncrement( &This->ref2 ); + + TRACE( "(%p) ref2=%d\n", This, ref ); + + if ( ref == 1 ) + InterlockedIncrement( &This->numIfaces ); + + return ref; +} + +static ULONG WINAPI IDirectPlay3AImpl_AddRef( IDirectPlay3A *iface ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + ULONG ref = InterlockedIncrement( &This->ref3A ); + + TRACE( "(%p) ref3A=%d\n", This, ref ); + + if ( ref == 1 ) + InterlockedIncrement( &This->numIfaces ); + + return ref; +} + +static ULONG WINAPI IDirectPlay3Impl_AddRef( IDirectPlay3 *iface ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + ULONG ref = InterlockedIncrement( &This->ref3 ); + + TRACE( "(%p) ref3=%d\n", This, ref ); + + if ( ref == 1 ) + InterlockedIncrement( &This->numIfaces ); + + return ref; +} + +static ULONG WINAPI IDirectPlay4AImpl_AddRef(IDirectPlay4A *iface) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + ULONG ref = InterlockedIncrement( &This->ref4A ); + + TRACE( "(%p) ref4A=%d\n", This, ref ); + + if ( ref == 1 ) + InterlockedIncrement( &This->numIfaces ); + + return ref; +} + +static ULONG WINAPI IDirectPlay4Impl_AddRef(IDirectPlay4 *iface) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + ULONG ref = InterlockedIncrement( &This->ref4 ); + + TRACE( "(%p) ref4=%d\n", This, ref ); + + if ( ref == 1 ) + InterlockedIncrement( &This->numIfaces ); + + return ref; +} + +static ULONG WINAPI IDirectPlay2AImpl_Release( IDirectPlay2A *iface ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + ULONG ref = InterlockedDecrement( &This->ref2A ); + + TRACE( "(%p) ref2A=%d\n", This, ref ); + + if ( !ref && !InterlockedDecrement( &This->numIfaces ) ) + dplay_destroy( This ); + + return ref; +} + +static ULONG WINAPI IDirectPlay2Impl_Release( IDirectPlay2 *iface ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + ULONG ref = InterlockedDecrement( &This->ref2 ); + + TRACE( "(%p) ref2=%d\n", This, ref ); + + if ( !ref && !InterlockedDecrement( &This->numIfaces ) ) + dplay_destroy( This ); + + return ref; +} + +static ULONG WINAPI IDirectPlay3AImpl_Release( IDirectPlay3A *iface ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + ULONG ref = InterlockedDecrement( &This->ref3A ); + + TRACE( "(%p) ref3A=%d\n", This, ref ); + + if ( !ref && !InterlockedDecrement( &This->numIfaces ) ) + dplay_destroy( This ); + + return ref; +} + +static ULONG WINAPI IDirectPlay3Impl_Release( IDirectPlay3 *iface ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + ULONG ref = InterlockedDecrement( &This->ref3 ); + + TRACE( "(%p) ref3=%d\n", This, ref ); + + if ( !ref && !InterlockedDecrement( &This->numIfaces ) ) + dplay_destroy( This ); + + return ref; +} + +static ULONG WINAPI IDirectPlay4AImpl_Release(IDirectPlay4A *iface) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + ULONG ref = InterlockedDecrement( &This->ref4A ); + + TRACE( "(%p) ref4A=%d\n", This, ref ); + + if ( !ref && !InterlockedDecrement( &This->numIfaces ) ) + dplay_destroy( This ); + + return ref; +} + +static ULONG WINAPI IDirectPlay4Impl_Release(IDirectPlay4 *iface) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + ULONG ref = InterlockedDecrement( &This->ref4 ); + + TRACE( "(%p) ref4=%d\n", This, ref ); + + if ( !ref && !InterlockedDecrement( &This->numIfaces ) ) + dplay_destroy( This ); + + return ref; +} + +static HRESULT WINAPI IDirectPlay2AImpl_AddPlayerToGroup( IDirectPlay2A *iface, DPID group, + DPID player ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_AddPlayerToGroup( &This->IDirectPlay4A_iface, group, player ); +} + +static HRESULT WINAPI IDirectPlay2Impl_AddPlayerToGroup( IDirectPlay2 *iface, DPID group, + DPID player ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_AddPlayerToGroup( &This->IDirectPlay4_iface, group, player ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_AddPlayerToGroup( IDirectPlay3A *iface, DPID group, + DPID player ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_AddPlayerToGroup( &This->IDirectPlay4_iface, group, player ); +} + +static HRESULT WINAPI IDirectPlay3Impl_AddPlayerToGroup( IDirectPlay3 *iface, DPID group, + DPID player ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_AddPlayerToGroup( &This->IDirectPlay4_iface, group, player ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_AddPlayerToGroup( IDirectPlay4A *iface, DPID group, + DPID player ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_AddPlayerToGroup( &This->IDirectPlay4_iface, group, player ); +} + +static HRESULT WINAPI IDirectPlay4Impl_AddPlayerToGroup( IDirectPlay4 *iface, DPID group, + DPID player ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + lpGroupData gdata; + lpPlayerList plist; + lpPlayerList newplist; + + TRACE( "(%p)->(0x%08x,0x%08x)\n", This, group, player ); + + if ( This->dp2->connectionInitialized == NO_PROVIDER ) + return DPERR_UNINITIALIZED; + + /* Find the group */ + if ( ( gdata = DP_FindAnyGroup( This, group ) ) == NULL ) + return DPERR_INVALIDGROUP; + + /* Find the player */ + if ( ( plist = DP_FindPlayer( This, player ) ) == NULL ) + return DPERR_INVALIDPLAYER; + + /* Create a player list (ie "shortcut" ) */ + newplist = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *newplist ) ); + if ( !newplist ) + return DPERR_CANTADDPLAYER; + + /* Add the shortcut */ + plist->lpPData->uRef++; + newplist->lpPData = plist->lpPData; + + /* Add the player to the list of players for this group */ + DPQ_INSERT(gdata->players, newplist, players); + + /* Let the SP know that we've added a player to the group */ + if ( This->dp2->spData.lpCB->AddPlayerToGroup ) + { + DPSP_ADDPLAYERTOGROUPDATA data; + + TRACE( "Calling SP AddPlayerToGroup\n" ); + + data.idPlayer = player; + data.idGroup = group; + data.lpISP = This->dp2->spData.lpISP; + + (*This->dp2->spData.lpCB->AddPlayerToGroup)( &data ); + } + + /* Inform all other peers of the addition of player to the group. If there are + * no peers keep this event quiet. + * Also, if this event was the result of another machine sending it to us, + * don't bother rebroadcasting it. + */ + if ( This->dp2->lpSessionDesc && + ( This->dp2->lpSessionDesc->dwFlags & DPSESSION_MULTICASTSERVER ) ) + { + DPMSG_ADDPLAYERTOGROUP msg; + msg.dwType = DPSYS_ADDPLAYERTOGROUP; + + msg.dpIdGroup = group; + msg.dpIdPlayer = player; + + /* FIXME: Correct to just use send effectively? */ + /* FIXME: Should size include data w/ message or just message "header" */ + /* FIXME: Check return code */ + IDirectPlayX_SendEx( iface, DPID_SERVERPLAYER, DPID_ALLPLAYERS, 0, &msg, sizeof( msg ), + 0, 0, NULL, NULL ); + } + + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay2AImpl_Close( IDirectPlay2A *iface ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_Close( &This->IDirectPlay4A_iface ); +} + +static HRESULT WINAPI IDirectPlay2Impl_Close( IDirectPlay2 *iface ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_Close( &This->IDirectPlay4_iface ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_Close( IDirectPlay3A *iface ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_Close( &This->IDirectPlay4_iface ); +} + +static HRESULT WINAPI IDirectPlay3Impl_Close( IDirectPlay3 *iface ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_Close( &This->IDirectPlay4_iface ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_Close( IDirectPlay4A *iface ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_Close( &This->IDirectPlay4_iface); +} + +static HRESULT WINAPI IDirectPlay4Impl_Close( IDirectPlay4 *iface ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + HRESULT hr = DP_OK; + + TRACE( "(%p)\n", This ); + + /* FIXME: Need to find a new host I assume (how?) */ + /* FIXME: Need to destroy all local groups */ + /* FIXME: Need to migrate all remotely visible players to the new host */ + + /* Invoke the SP callback to inform of session close */ + if( This->dp2->spData.lpCB->CloseEx ) + { + DPSP_CLOSEDATA data; + + TRACE( "Calling SP CloseEx\n" ); + data.lpISP = This->dp2->spData.lpISP; + hr = (*This->dp2->spData.lpCB->CloseEx)( &data ); + } + else if ( This->dp2->spData.lpCB->Close ) /* Try obsolete version */ + { + TRACE( "Calling SP Close (obsolete interface)\n" ); + hr = (*This->dp2->spData.lpCB->Close)(); + } + + return hr; +} + +static lpGroupData DP_CreateGroup( IDirectPlayImpl *This, const DPID *lpid, const DPNAME *lpName, + DWORD dwFlags, DPID idParent, BOOL bAnsi ) +{ + lpGroupData lpGData; + + /* Allocate the new space and add to end of high level group list */ + lpGData = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *lpGData ) ); + + if( lpGData == NULL ) + { + return NULL; + } + + DPQ_INIT(lpGData->groups); + DPQ_INIT(lpGData->players); + + /* Set the desired player ID - no sanity checking to see if it exists */ + lpGData->dpid = *lpid; + + DP_CopyDPNAMEStruct( &lpGData->name, lpName, bAnsi ); + + /* FIXME: Should we check that the parent exists? */ + lpGData->parent = idParent; + + /* FIXME: Should we validate the dwFlags? */ + lpGData->dwFlags = dwFlags; + + TRACE( "Created group id 0x%08x\n", *lpid ); + + return lpGData; +} + +/* This method assumes that all links to it are already deleted */ +static void DP_DeleteGroup( IDirectPlayImpl *This, DPID dpid ) +{ + lpGroupList lpGList; + + TRACE( "(%p)->(0x%08x)\n", This, dpid ); + + DPQ_REMOVE_ENTRY( This->dp2->lpSysGroup->groups, groups, lpGData->dpid, ==, dpid, lpGList ); + + if( lpGList == NULL ) + { + ERR( "DPID 0x%08x not found\n", dpid ); + return; + } + + if( --(lpGList->lpGData->uRef) ) + { + FIXME( "Why is this not the last reference to group?\n" ); + DebugBreak(); + } + + /* Delete player */ + DP_DeleteDPNameStruct( &lpGList->lpGData->name ); + HeapFree( GetProcessHeap(), 0, lpGList->lpGData ); + + /* Remove and Delete Player List object */ + HeapFree( GetProcessHeap(), 0, lpGList ); + +} + +static lpGroupData DP_FindAnyGroup( IDirectPlayImpl *This, DPID dpid ) +{ + lpGroupList lpGroups; + + TRACE( "(%p)->(0x%08x)\n", This, dpid ); + + if( dpid == DPID_SYSTEM_GROUP ) + { + return This->dp2->lpSysGroup; + } + else + { + DPQ_FIND_ENTRY( This->dp2->lpSysGroup->groups, groups, lpGData->dpid, ==, dpid, lpGroups ); + } + + if( lpGroups == NULL ) + { + return NULL; + } + + return lpGroups->lpGData; +} + +static HRESULT DP_IF_CreateGroup( IDirectPlayImpl *This, void *lpMsgHdr, DPID *lpidGroup, + DPNAME *lpGroupName, void *lpData, DWORD dwDataSize, DWORD dwFlags, BOOL bAnsi ) +{ + lpGroupData lpGData; + + TRACE( "(%p)->(%p,%p,%p,%p,0x%08x,0x%08x,%u)\n", + This, lpMsgHdr, lpidGroup, lpGroupName, lpData, dwDataSize, + dwFlags, bAnsi ); + + if( This->dp2->connectionInitialized == NO_PROVIDER ) + { + return DPERR_UNINITIALIZED; + } + + /* If the name is not specified, we must provide one */ + if( DPID_UNKNOWN == *lpidGroup ) + { + /* If we are the name server, we decide on the group ids. If not, we + * must ask for one before attempting a creation. + */ + if( This->dp2->bHostInterface ) + { + *lpidGroup = DP_NextObjectId(); + } + else + { + *lpidGroup = DP_GetRemoteNextObjectId(); + } + } + + lpGData = DP_CreateGroup( This, lpidGroup, lpGroupName, dwFlags, + DPID_NOPARENT_GROUP, bAnsi ); + + if( lpGData == NULL ) + { + return DPERR_CANTADDPLAYER; /* yes player not group */ + } + + if( DPID_SYSTEM_GROUP == *lpidGroup ) + { + This->dp2->lpSysGroup = lpGData; + TRACE( "Inserting system group\n" ); + } + else + { + /* Insert into the system group */ + lpGroupList lpGroup = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *lpGroup ) ); + lpGroup->lpGData = lpGData; + + DPQ_INSERT( This->dp2->lpSysGroup->groups, lpGroup, groups ); + } + + /* Something is now referencing this data */ + lpGData->uRef++; + + /* Set all the important stuff for the group */ + DP_SetGroupData( lpGData, DPSET_REMOTE, lpData, dwDataSize ); + + /* FIXME: We should only create the system group if GetCaps returns + * DPCAPS_GROUPOPTIMIZED. + */ + + /* Let the SP know that we've created this group */ + if( This->dp2->spData.lpCB->CreateGroup ) + { + DPSP_CREATEGROUPDATA data; + DWORD dwCreateFlags = 0; + + TRACE( "Calling SP CreateGroup\n" ); + + if( *lpidGroup == DPID_NOPARENT_GROUP ) + dwCreateFlags |= DPLAYI_GROUP_SYSGROUP; + + if( lpMsgHdr == NULL ) + dwCreateFlags |= DPLAYI_PLAYER_PLAYERLOCAL; + + if( dwFlags & DPGROUP_HIDDEN ) + dwCreateFlags |= DPLAYI_GROUP_HIDDEN; + + data.idGroup = *lpidGroup; + data.dwFlags = dwCreateFlags; + data.lpSPMessageHeader = lpMsgHdr; + data.lpISP = This->dp2->spData.lpISP; + + (*This->dp2->spData.lpCB->CreateGroup)( &data ); + } + + /* Inform all other peers of the creation of a new group. If there are + * no peers keep this event quiet. + * Also if this message was sent to us, don't rebroadcast. + */ + if( ( lpMsgHdr == NULL ) && + This->dp2->lpSessionDesc && + ( This->dp2->lpSessionDesc->dwFlags & DPSESSION_MULTICASTSERVER ) ) + { + DPMSG_CREATEPLAYERORGROUP msg; + msg.dwType = DPSYS_CREATEPLAYERORGROUP; + + msg.dwPlayerType = DPPLAYERTYPE_GROUP; + msg.dpId = *lpidGroup; + msg.dwCurrentPlayers = 0; /* FIXME: Incorrect? */ + msg.lpData = lpData; + msg.dwDataSize = dwDataSize; + msg.dpnName = *lpGroupName; + msg.dpIdParent = DPID_NOPARENT_GROUP; + msg.dwFlags = DPMSG_CREATEGROUP_DWFLAGS( dwFlags ); + + /* FIXME: Correct to just use send effectively? */ + /* FIXME: Should size include data w/ message or just message "header" */ + /* FIXME: Check return code */ + IDirectPlayX_SendEx( &This->IDirectPlay4_iface, DPID_SERVERPLAYER, DPID_ALLPLAYERS, 0, &msg, + sizeof( msg ), 0, 0, NULL, NULL ); + } + + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay2AImpl_CreateGroup( IDirectPlay2A *iface, DPID *lpidGroup, + DPNAME *name, void *data, DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_CreateGroup( &This->IDirectPlay4A_iface, lpidGroup, name, data, size, + flags ); +} + +static HRESULT WINAPI IDirectPlay2Impl_CreateGroup( IDirectPlay2 *iface, DPID *lpidGroup, + DPNAME *name, void *data, DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_CreateGroup( &This->IDirectPlay4_iface, lpidGroup, name, data, size, + flags ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_CreateGroup( IDirectPlay3A *iface, DPID *group, + DPNAME *name, void *data, DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_CreateGroup( &This->IDirectPlay4_iface, group, name, data, size, + flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_CreateGroup( IDirectPlay3 *iface, DPID *lpidGroup, + DPNAME *name, void *data, DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_CreateGroup( &This->IDirectPlay4_iface, lpidGroup, name, data, size, + flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_CreateGroup( IDirectPlay4A *iface, DPID *lpidGroup, + DPNAME *lpGroupName, void *lpData, DWORD dwDataSize, DWORD dwFlags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + + *lpidGroup = DPID_UNKNOWN; + + return DP_IF_CreateGroup( This, NULL, lpidGroup, lpGroupName, lpData, dwDataSize, dwFlags, + TRUE ); +} + +static HRESULT WINAPI IDirectPlay4Impl_CreateGroup( IDirectPlay4 *iface, DPID *lpidGroup, + DPNAME *lpGroupName, void *lpData, DWORD dwDataSize, DWORD dwFlags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + + *lpidGroup = DPID_UNKNOWN; + + return DP_IF_CreateGroup( This, NULL, lpidGroup, lpGroupName, lpData, dwDataSize, dwFlags, + FALSE ); +} + + +static void +DP_SetGroupData( lpGroupData lpGData, DWORD dwFlags, + LPVOID lpData, DWORD dwDataSize ) +{ + /* Clear out the data with this player */ + if( dwFlags & DPSET_LOCAL ) + { + if ( lpGData->dwLocalDataSize != 0 ) + { + HeapFree( GetProcessHeap(), 0, lpGData->lpLocalData ); + lpGData->lpLocalData = NULL; + lpGData->dwLocalDataSize = 0; + } + } + else + { + if( lpGData->dwRemoteDataSize != 0 ) + { + HeapFree( GetProcessHeap(), 0, lpGData->lpRemoteData ); + lpGData->lpRemoteData = NULL; + lpGData->dwRemoteDataSize = 0; + } + } + + /* Reallocate for new data */ + if( lpData != NULL ) + { + if( dwFlags & DPSET_LOCAL ) + { + lpGData->lpLocalData = lpData; + lpGData->dwLocalDataSize = dwDataSize; + } + else + { + lpGData->lpRemoteData = HeapAlloc( GetProcessHeap(), 0, dwDataSize ); + CopyMemory( lpGData->lpRemoteData, lpData, dwDataSize ); + lpGData->dwRemoteDataSize = dwDataSize; + } + } + +} + +/* This function will just create the storage for the new player. */ +static lpPlayerData DP_CreatePlayer( IDirectPlayImpl *This, DPID *lpid, DPNAME *lpName, + DWORD dwFlags, HANDLE hEvent, BOOL bAnsi ) +{ + lpPlayerData lpPData; + + TRACE( "(%p)->(%p,%p,%u)\n", This, lpid, lpName, bAnsi ); + + /* Allocate the storage for the player and associate it with list element */ + lpPData = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *lpPData ) ); + if( lpPData == NULL ) + { + return NULL; + } + + /* Set the desired player ID */ + lpPData->dpid = *lpid; + + DP_CopyDPNAMEStruct( &lpPData->name, lpName, bAnsi ); + + lpPData->dwFlags = dwFlags; + + /* If we were given an event handle, duplicate it */ + if( hEvent != 0 ) + { + if( !DuplicateHandle( GetCurrentProcess(), hEvent, + GetCurrentProcess(), &lpPData->hEvent, + 0, FALSE, DUPLICATE_SAME_ACCESS ) + ) + { + /* FIXME: Memory leak */ + ERR( "Can't duplicate player msg handle %p\n", hEvent ); + } + } + + /* Initialize the SP data section */ + lpPData->lpSPPlayerData = DPSP_CreateSPPlayerData(); + + TRACE( "Created player id 0x%08x\n", *lpid ); + + if( ~dwFlags & DPLAYI_PLAYER_SYSPLAYER ) + This->dp2->lpSessionDesc->dwCurrentPlayers++; + + return lpPData; +} + +/* Delete the contents of the DPNAME struct */ +static void +DP_DeleteDPNameStruct( LPDPNAME lpDPName ) +{ + HeapFree( GetProcessHeap(), HEAP_ZERO_MEMORY, lpDPName->u1.lpszShortNameA ); + HeapFree( GetProcessHeap(), HEAP_ZERO_MEMORY, lpDPName->u2.lpszLongNameA ); +} + +/* This method assumes that all links to it are already deleted */ +static void DP_DeletePlayer( IDirectPlayImpl *This, DPID dpid ) +{ + lpPlayerList lpPList; + + TRACE( "(%p)->(0x%08x)\n", This, dpid ); + + DPQ_REMOVE_ENTRY( This->dp2->lpSysGroup->players, players, lpPData->dpid, ==, dpid, lpPList ); + + if( lpPList == NULL ) + { + ERR( "DPID 0x%08x not found\n", dpid ); + return; + } + + /* Verify that this is the last reference to the data */ + if( --(lpPList->lpPData->uRef) ) + { + FIXME( "Why is this not the last reference to player?\n" ); + DebugBreak(); + } + + /* Delete player */ + DP_DeleteDPNameStruct( &lpPList->lpPData->name ); + + CloseHandle( lpPList->lpPData->hEvent ); + HeapFree( GetProcessHeap(), 0, lpPList->lpPData ); + + /* Delete Player List object */ + HeapFree( GetProcessHeap(), 0, lpPList ); +} + +static lpPlayerList DP_FindPlayer( IDirectPlayImpl *This, DPID dpid ) +{ + lpPlayerList lpPlayers; + + TRACE( "(%p)->(0x%08x)\n", This, dpid ); + + if(This->dp2->lpSysGroup == NULL) + return NULL; + + DPQ_FIND_ENTRY( This->dp2->lpSysGroup->players, players, lpPData->dpid, ==, dpid, lpPlayers ); + + return lpPlayers; +} + +/* Basic area for Dst must already be allocated */ +static BOOL DP_CopyDPNAMEStruct( LPDPNAME lpDst, const DPNAME *lpSrc, BOOL bAnsi ) +{ + if( lpSrc == NULL ) + { + ZeroMemory( lpDst, sizeof( *lpDst ) ); + lpDst->dwSize = sizeof( *lpDst ); + return TRUE; + } + + if( lpSrc->dwSize != sizeof( *lpSrc) ) + { + return FALSE; + } + + /* Delete any existing pointers */ + HeapFree( GetProcessHeap(), 0, lpDst->u1.lpszShortNameA ); + HeapFree( GetProcessHeap(), 0, lpDst->u2.lpszLongNameA ); + + /* Copy as required */ + CopyMemory( lpDst, lpSrc, lpSrc->dwSize ); + + if( bAnsi ) + { + if( lpSrc->u1.lpszShortNameA ) + { + lpDst->u1.lpszShortNameA = HeapAlloc( GetProcessHeap(), 0, + strlen(lpSrc->u1.lpszShortNameA)+1 ); + strcpy( lpDst->u1.lpszShortNameA, lpSrc->u1.lpszShortNameA ); + } + if( lpSrc->u2.lpszLongNameA ) + { + lpDst->u2.lpszLongNameA = HeapAlloc( GetProcessHeap(), 0, + strlen(lpSrc->u2.lpszLongNameA)+1 ); + strcpy( lpDst->u2.lpszLongNameA, lpSrc->u2.lpszLongNameA ); + } + } + else + { + if( lpSrc->u1.lpszShortNameA ) + { + lpDst->u1.lpszShortName = HeapAlloc( GetProcessHeap(), 0, + (strlenW(lpSrc->u1.lpszShortName)+1)*sizeof(WCHAR) ); + strcpyW( lpDst->u1.lpszShortName, lpSrc->u1.lpszShortName ); + } + if( lpSrc->u2.lpszLongNameA ) + { + lpDst->u2.lpszLongName = HeapAlloc( GetProcessHeap(), 0, + (strlenW(lpSrc->u2.lpszLongName)+1)*sizeof(WCHAR) ); + strcpyW( lpDst->u2.lpszLongName, lpSrc->u2.lpszLongName ); + } + } + + return TRUE; +} + +static void +DP_SetPlayerData( lpPlayerData lpPData, DWORD dwFlags, + LPVOID lpData, DWORD dwDataSize ) +{ + /* Clear out the data with this player */ + if( dwFlags & DPSET_LOCAL ) + { + if ( lpPData->dwLocalDataSize != 0 ) + { + HeapFree( GetProcessHeap(), 0, lpPData->lpLocalData ); + lpPData->lpLocalData = NULL; + lpPData->dwLocalDataSize = 0; + } + } + else + { + if( lpPData->dwRemoteDataSize != 0 ) + { + HeapFree( GetProcessHeap(), 0, lpPData->lpRemoteData ); + lpPData->lpRemoteData = NULL; + lpPData->dwRemoteDataSize = 0; + } + } + + /* Reallocate for new data */ + if( lpData != NULL ) + { + + if( dwFlags & DPSET_LOCAL ) + { + lpPData->lpLocalData = lpData; + lpPData->dwLocalDataSize = dwDataSize; + } + else + { + lpPData->lpRemoteData = HeapAlloc( GetProcessHeap(), 0, dwDataSize ); + CopyMemory( lpPData->lpRemoteData, lpData, dwDataSize ); + lpPData->dwRemoteDataSize = dwDataSize; + } + } + +} + +/* Note: lpMsgHdr is NULL for local creation, non NULL for remote creation */ +static HRESULT DP_IF_CreatePlayer( IDirectPlayImpl *This, void *lpMsgHdr, DPID *lpidPlayer, + DPNAME *lpPlayerName, HANDLE hEvent, void *lpData, DWORD dwDataSize, DWORD dwFlags, + BOOL bAnsi ) +{ + HRESULT hr = DP_OK; + lpPlayerData lpPData; + lpPlayerList lpPList; + DWORD dwCreateFlags = 0; + + TRACE( "(%p)->(%p,%p,%p,%p,0x%08x,0x%08x,%u)\n", + This, lpidPlayer, lpPlayerName, hEvent, lpData, + dwDataSize, dwFlags, bAnsi ); + if( This->dp2->connectionInitialized == NO_PROVIDER ) + { + return DPERR_UNINITIALIZED; + } + + if( dwFlags == 0 ) + { + dwFlags = DPPLAYER_SPECTATOR; + } + + if( lpidPlayer == NULL ) + { + return DPERR_INVALIDPARAMS; + } + + + /* Determine the creation flags for the player. These will be passed + * to the name server if requesting a player id and to the SP when + * informing it of the player creation + */ + { + if( dwFlags & DPPLAYER_SERVERPLAYER ) + { + if( *lpidPlayer == DPID_SERVERPLAYER ) + { + /* Server player for the host interface */ + dwCreateFlags |= DPLAYI_PLAYER_APPSERVER; + } + else if( *lpidPlayer == DPID_NAME_SERVER ) + { + /* Name server - master of everything */ + dwCreateFlags |= (DPLAYI_PLAYER_NAMESRVR|DPLAYI_PLAYER_SYSPLAYER); + } + else + { + /* Server player for a non host interface */ + dwCreateFlags |= DPLAYI_PLAYER_SYSPLAYER; + } + } + + if( lpMsgHdr == NULL ) + dwCreateFlags |= DPLAYI_PLAYER_PLAYERLOCAL; + } + + /* Verify we know how to handle all the flags */ + if( !( ( dwFlags & DPPLAYER_SERVERPLAYER ) || + ( dwFlags & DPPLAYER_SPECTATOR ) + ) + ) + { + /* Assume non fatal failure */ + ERR( "unknown dwFlags = 0x%08x\n", dwFlags ); + } + + /* If the name is not specified, we must provide one */ + if( *lpidPlayer == DPID_UNKNOWN ) + { + /* If we are the session master, we dish out the group/player ids */ + if( This->dp2->bHostInterface ) + { + *lpidPlayer = DP_NextObjectId(); + } + else + { + hr = DP_MSG_SendRequestPlayerId( This, dwCreateFlags, lpidPlayer ); + + if( FAILED(hr) ) + { + ERR( "Request for ID failed: %s\n", DPLAYX_HresultToString( hr ) ); + return hr; + } + } + } + else + { + /* FIXME: Would be nice to perhaps verify that we don't already have + * this player. + */ + } + + /* We pass creation flags, so we can distinguish sysplayers and not count them in the current + player total */ + lpPData = DP_CreatePlayer( This, lpidPlayer, lpPlayerName, dwCreateFlags, + hEvent, bAnsi ); + + if( lpPData == NULL ) + { + return DPERR_CANTADDPLAYER; + } + + /* Create the list object and link it in */ + lpPList = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *lpPList ) ); + if( lpPList == NULL ) + { + FIXME( "Memory leak\n" ); + return DPERR_CANTADDPLAYER; + } + + lpPData->uRef = 1; + lpPList->lpPData = lpPData; + + /* Add the player to the system group */ + DPQ_INSERT( This->dp2->lpSysGroup->players, lpPList, players ); + + /* Update the information and send it to all players in the session */ + DP_SetPlayerData( lpPData, DPSET_REMOTE, lpData, dwDataSize ); + + /* Let the SP know that we've created this player */ + if( This->dp2->spData.lpCB->CreatePlayer ) + { + DPSP_CREATEPLAYERDATA data; + + data.idPlayer = *lpidPlayer; + data.dwFlags = dwCreateFlags; + data.lpSPMessageHeader = lpMsgHdr; + data.lpISP = This->dp2->spData.lpISP; + + TRACE( "Calling SP CreatePlayer 0x%08x: dwFlags: 0x%08x lpMsgHdr: %p\n", + *lpidPlayer, data.dwFlags, data.lpSPMessageHeader ); + + hr = (*This->dp2->spData.lpCB->CreatePlayer)( &data ); + } + + if( FAILED(hr) ) + { + ERR( "Failed to create player with sp: %s\n", DPLAYX_HresultToString(hr) ); + return hr; + } + + /* Now let the SP know that this player is a member of the system group */ + if( This->dp2->spData.lpCB->AddPlayerToGroup ) + { + DPSP_ADDPLAYERTOGROUPDATA data; + + data.idPlayer = *lpidPlayer; + data.idGroup = DPID_SYSTEM_GROUP; + data.lpISP = This->dp2->spData.lpISP; + + TRACE( "Calling SP AddPlayerToGroup (sys group)\n" ); + + hr = (*This->dp2->spData.lpCB->AddPlayerToGroup)( &data ); + } + + if( FAILED(hr) ) + { + ERR( "Failed to add player to sys group with sp: %s\n", + DPLAYX_HresultToString(hr) ); + return hr; + } + +#if 1 + if( This->dp2->bHostInterface == FALSE ) + { + /* Let the name server know about the creation of this player */ + /* FIXME: Is this only to be done for the creation of a server player or + * is this used for regular players? If only for server players, move + * this call to DP_SecureOpen(...); + */ +#if 0 + TRACE( "Sending message to self to get my addr\n" ); + DP_MSG_ToSelf( This, *lpidPlayer ); /* This is a hack right now */ +#endif + + hr = DP_MSG_ForwardPlayerCreation( This, *lpidPlayer); + } +#else + /* Inform all other peers of the creation of a new player. If there are + * no peers keep this quiet. + * Also, if this was a remote event, no need to rebroadcast it. + */ + if( ( lpMsgHdr == NULL ) && + This->dp2->lpSessionDesc && + ( This->dp2->lpSessionDesc->dwFlags & DPSESSION_MULTICASTSERVER ) ) + { + DPMSG_CREATEPLAYERORGROUP msg; + msg.dwType = DPSYS_CREATEPLAYERORGROUP; + + msg.dwPlayerType = DPPLAYERTYPE_PLAYER; + msg.dpId = *lpidPlayer; + msg.dwCurrentPlayers = 0; /* FIXME: Incorrect */ + msg.lpData = lpData; + msg.dwDataSize = dwDataSize; + msg.dpnName = *lpPlayerName; + msg.dpIdParent = DPID_NOPARENT_GROUP; + msg.dwFlags = DPMSG_CREATEPLAYER_DWFLAGS( dwFlags ); + + /* FIXME: Correct to just use send effectively? */ + /* FIXME: Should size include data w/ message or just message "header" */ + /* FIXME: Check return code */ + hr = IDirectPlayX_SendEx( &This->IDirectPlay4_iface, DPID_SERVERPLAYER, DPID_ALLPLAYERS, 0, + &msg, sizeof( msg ), 0, 0, NULL, NULL ); + } +#endif + + return hr; +} + +static HRESULT WINAPI IDirectPlay2AImpl_CreatePlayer( IDirectPlay2A *iface, DPID *lpidPlayer, + DPNAME *name, HANDLE event, void *data, DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_CreatePlayer( &This->IDirectPlay4A_iface, lpidPlayer, name, event, data, + size, flags ); +} + +static HRESULT WINAPI IDirectPlay2Impl_CreatePlayer( IDirectPlay2 *iface, DPID *lpidPlayer, + DPNAME *name, HANDLE event, void *data, DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_CreatePlayer( &This->IDirectPlay4_iface, lpidPlayer, name, event, data, + size, flags ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_CreatePlayer( IDirectPlay3A *iface, DPID *lpidPlayer, + DPNAME *name, HANDLE event, void *data, DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_CreatePlayer( &This->IDirectPlay4_iface, lpidPlayer, name, event, data, + size, flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_CreatePlayer( IDirectPlay3 *iface, DPID *lpidPlayer, + DPNAME *name, HANDLE event, void *data, DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_CreatePlayer( &This->IDirectPlay4_iface, lpidPlayer, name, event, data, + size, flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_CreatePlayer( IDirectPlay4A *iface, DPID *lpidPlayer, + DPNAME *lpPlayerName, HANDLE hEvent, void *lpData, DWORD dwDataSize, DWORD dwFlags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + + if( lpidPlayer == NULL ) + { + return DPERR_INVALIDPARAMS; + } + + if( dwFlags & DPPLAYER_SERVERPLAYER ) + { + *lpidPlayer = DPID_SERVERPLAYER; + } + else + { + *lpidPlayer = DPID_UNKNOWN; + } + + return DP_IF_CreatePlayer( This, NULL, lpidPlayer, lpPlayerName, hEvent, + lpData, dwDataSize, dwFlags, TRUE ); +} + +static HRESULT WINAPI IDirectPlay4Impl_CreatePlayer( IDirectPlay4 *iface, DPID *lpidPlayer, + DPNAME *lpPlayerName, HANDLE hEvent, void *lpData, DWORD dwDataSize, DWORD dwFlags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + + if( lpidPlayer == NULL ) + { + return DPERR_INVALIDPARAMS; + } + + if( dwFlags & DPPLAYER_SERVERPLAYER ) + { + *lpidPlayer = DPID_SERVERPLAYER; + } + else + { + *lpidPlayer = DPID_UNKNOWN; + } + + return DP_IF_CreatePlayer( This, NULL, lpidPlayer, lpPlayerName, hEvent, + lpData, dwDataSize, dwFlags, FALSE ); +} + +static DPID DP_GetRemoteNextObjectId(void) +{ + FIXME( ":stub\n" ); + + /* Hack solution */ + return DP_NextObjectId(); +} + +static HRESULT WINAPI IDirectPlay2AImpl_DeletePlayerFromGroup( IDirectPlay2A *iface, DPID group, + DPID player ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_DeletePlayerFromGroup( &This->IDirectPlay4A_iface, group, player ); +} + +static HRESULT WINAPI IDirectPlay2Impl_DeletePlayerFromGroup( IDirectPlay2 *iface, DPID group, + DPID player ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_DeletePlayerFromGroup( &This->IDirectPlay4_iface, group, player ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_DeletePlayerFromGroup( IDirectPlay3A *iface, DPID group, + DPID player ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_DeletePlayerFromGroup( &This->IDirectPlay4_iface, group, player ); +} + +static HRESULT WINAPI IDirectPlay3Impl_DeletePlayerFromGroup( IDirectPlay3 *iface, DPID group, + DPID player ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_DeletePlayerFromGroup( &This->IDirectPlay4_iface, group, player ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_DeletePlayerFromGroup( IDirectPlay4A *iface, DPID group, + DPID player ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_DeletePlayerFromGroup( &This->IDirectPlay4_iface, group, player ); +} + +static HRESULT WINAPI IDirectPlay4Impl_DeletePlayerFromGroup( IDirectPlay4 *iface, DPID group, + DPID player ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + HRESULT hr = DP_OK; + + lpGroupData gdata; + lpPlayerList plist; + + TRACE( "(%p)->(0x%08x,0x%08x)\n", This, group, player ); + + /* Find the group */ + if ( ( gdata = DP_FindAnyGroup( This, group ) ) == NULL ) + return DPERR_INVALIDGROUP; + + /* Find the player */ + if ( DP_FindPlayer( This, player ) == NULL ) + return DPERR_INVALIDPLAYER; + + /* Remove the player shortcut from the group */ + DPQ_REMOVE_ENTRY( gdata->players, players, lpPData->dpid, ==, player, plist ); + + if ( !plist ) + return DPERR_INVALIDPLAYER; + + /* One less reference */ + plist->lpPData->uRef--; + + /* Delete the Player List element */ + HeapFree( GetProcessHeap(), 0, plist ); + + /* Inform the SP if they care */ + if ( This->dp2->spData.lpCB->RemovePlayerFromGroup ) + { + DPSP_REMOVEPLAYERFROMGROUPDATA data; + + TRACE( "Calling SP RemovePlayerFromGroup\n" ); + data.idPlayer = player; + data.idGroup = group; + data.lpISP = This->dp2->spData.lpISP; + hr = (*This->dp2->spData.lpCB->RemovePlayerFromGroup)( &data ); + } + + /* Need to send a DELETEPLAYERFROMGROUP message */ + FIXME( "Need to send a message\n" ); + + return hr; +} + +typedef struct _DPRGOPContext +{ + IDirectPlayImpl *This; + BOOL bAnsi; + DPID idGroup; +} DPRGOPContext, *lpDPRGOPContext; + +static BOOL CALLBACK +cbRemoveGroupOrPlayer( + DPID dpId, + DWORD dwPlayerType, + LPCDPNAME lpName, + DWORD dwFlags, + LPVOID lpContext ) +{ + lpDPRGOPContext lpCtxt = (lpDPRGOPContext)lpContext; + + TRACE( "Removing element:0x%08x (type:0x%08x) from element:0x%08x\n", + dpId, dwPlayerType, lpCtxt->idGroup ); + + if( dwPlayerType == DPPLAYERTYPE_GROUP ) + { + if ( FAILED( IDirectPlayX_DeleteGroupFromGroup( &lpCtxt->This->IDirectPlay4_iface, + lpCtxt->idGroup, dpId ) ) ) + ERR( "Unable to delete group 0x%08x from group 0x%08x\n", dpId, lpCtxt->idGroup ); + } + else if ( FAILED( IDirectPlayX_DeletePlayerFromGroup( &lpCtxt->This->IDirectPlay4_iface, + lpCtxt->idGroup, dpId ) ) ) + ERR( "Unable to delete player 0x%08x from grp 0x%08x\n", dpId, lpCtxt->idGroup ); + + return TRUE; /* Continue enumeration */ +} + +static HRESULT DP_IF_DestroyGroup( IDirectPlayImpl *This, void *lpMsgHdr, DPID idGroup, BOOL bAnsi ) +{ + lpGroupData lpGData; + DPRGOPContext context; + + FIXME( "(%p)->(%p,0x%08x,%u): semi stub\n", + This, lpMsgHdr, idGroup, bAnsi ); + + /* Find the group */ + if( ( lpGData = DP_FindAnyGroup( This, idGroup ) ) == NULL ) + { + return DPERR_INVALIDPLAYER; /* yes player */ + } + + context.This = This; + context.bAnsi = bAnsi; + context.idGroup = idGroup; + + /* Remove all players that this group has */ + IDirectPlayX_EnumGroupPlayers( &This->IDirectPlay4_iface, idGroup, NULL, cbRemoveGroupOrPlayer, + &context, 0 ); + + /* Remove all links to groups that this group has since this is dp3 */ + IDirectPlayX_EnumGroupsInGroup( &This->IDirectPlay4_iface, idGroup, NULL, cbRemoveGroupOrPlayer, + (void*)&context, 0 ); + + /* Remove this group from the parent group - if it has one */ + if( ( idGroup != DPID_SYSTEM_GROUP ) && ( lpGData->parent != DPID_SYSTEM_GROUP ) ) + IDirectPlayX_DeleteGroupFromGroup( &This->IDirectPlay4_iface, lpGData->parent, idGroup ); + + /* Now delete this group data and list from the system group */ + DP_DeleteGroup( This, idGroup ); + + /* Let the SP know that we've destroyed this group */ + if( This->dp2->spData.lpCB->DeleteGroup ) + { + DPSP_DELETEGROUPDATA data; + + FIXME( "data.dwFlags is incorrect\n" ); + + data.idGroup = idGroup; + data.dwFlags = 0; + data.lpISP = This->dp2->spData.lpISP; + + (*This->dp2->spData.lpCB->DeleteGroup)( &data ); + } + + FIXME( "Send out a DESTORYPLAYERORGROUP message\n" ); + + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay2AImpl_DestroyGroup( IDirectPlay2A *iface, DPID group ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_DestroyGroup( &This->IDirectPlay4A_iface, group ); +} + +static HRESULT WINAPI IDirectPlay2Impl_DestroyGroup( IDirectPlay2 *iface, DPID group ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_DestroyGroup( &This->IDirectPlay4_iface, group ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_DestroyGroup( IDirectPlay3A *iface, DPID group ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_DestroyGroup( &This->IDirectPlay4_iface, group ); +} + +static HRESULT WINAPI IDirectPlay3Impl_DestroyGroup( IDirectPlay3 *iface, DPID group ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_DestroyGroup( &This->IDirectPlay4_iface, group ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_DestroyGroup( IDirectPlay4A *iface, DPID idGroup ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return DP_IF_DestroyGroup( This, NULL, idGroup, TRUE ); +} + +static HRESULT WINAPI IDirectPlay4Impl_DestroyGroup( IDirectPlay4 *iface, DPID idGroup ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + return DP_IF_DestroyGroup( This, NULL, idGroup, FALSE ); +} + +typedef struct _DPFAGContext +{ + IDirectPlayImpl *This; + DPID idPlayer; + BOOL bAnsi; +} DPFAGContext, *lpDPFAGContext; + +static HRESULT DP_IF_DestroyPlayer( IDirectPlayImpl *This, void *lpMsgHdr, DPID idPlayer, + BOOL bAnsi ) +{ + DPFAGContext cbContext; + + FIXME( "(%p)->(%p,0x%08x,%u): semi stub\n", + This, lpMsgHdr, idPlayer, bAnsi ); + + if( This->dp2->connectionInitialized == NO_PROVIDER ) + { + return DPERR_UNINITIALIZED; + } + + if( DP_FindPlayer( This, idPlayer ) == NULL ) + { + return DPERR_INVALIDPLAYER; + } + + /* FIXME: If the player is remote, we must be the host to delete this */ + + cbContext.This = This; + cbContext.idPlayer = idPlayer; + cbContext.bAnsi = bAnsi; + + /* Find each group and call DeletePlayerFromGroup if the player is a + member of the group */ + IDirectPlayX_EnumGroups( &This->IDirectPlay4_iface, NULL, cbDeletePlayerFromAllGroups, &cbContext, + DPENUMGROUPS_ALL ); + + /* Now delete player and player list from the sys group */ + DP_DeletePlayer( This, idPlayer ); + + /* Let the SP know that we've destroyed this group */ + if( This->dp2->spData.lpCB->DeletePlayer ) + { + DPSP_DELETEPLAYERDATA data; + + FIXME( "data.dwFlags is incorrect\n" ); + + data.idPlayer = idPlayer; + data.dwFlags = 0; + data.lpISP = This->dp2->spData.lpISP; + + (*This->dp2->spData.lpCB->DeletePlayer)( &data ); + } + + FIXME( "Send a DELETEPLAYERORGROUP msg\n" ); + + return DP_OK; +} + +static BOOL CALLBACK +cbDeletePlayerFromAllGroups( + DPID dpId, + DWORD dwPlayerType, + LPCDPNAME lpName, + DWORD dwFlags, + LPVOID lpContext ) +{ + lpDPFAGContext lpCtxt = (lpDPFAGContext)lpContext; + + if( dwPlayerType == DPPLAYERTYPE_GROUP ) + { + IDirectPlayX_DeletePlayerFromGroup( &lpCtxt->This->IDirectPlay4_iface, dpId, lpCtxt->idPlayer ); + + /* Enumerate all groups in this group since this will normally only + * be called for top level groups + */ + IDirectPlayX_EnumGroupsInGroup( &lpCtxt->This->IDirectPlay4_iface, dpId, NULL, + cbDeletePlayerFromAllGroups, lpContext, DPENUMGROUPS_ALL); + + } + else + { + ERR( "Group callback has dwPlayerType = 0x%08x\n", dwPlayerType ); + } + + return TRUE; +} + +static HRESULT WINAPI IDirectPlay2AImpl_DestroyPlayer( IDirectPlay2A *iface, DPID player ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_DestroyPlayer( &This->IDirectPlay4A_iface, player ); +} + +static HRESULT WINAPI IDirectPlay2Impl_DestroyPlayer( IDirectPlay2 *iface, DPID player ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_DestroyPlayer( &This->IDirectPlay4_iface, player ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_DestroyPlayer( IDirectPlay3A *iface, DPID player ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_DestroyPlayer( &This->IDirectPlay4_iface, player ); +} + +static HRESULT WINAPI IDirectPlay3Impl_DestroyPlayer( IDirectPlay3 *iface, DPID player ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_DestroyPlayer( &This->IDirectPlay4_iface, player ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_DestroyPlayer( IDirectPlay4A *iface, DPID idPlayer ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return DP_IF_DestroyPlayer( This, NULL, idPlayer, TRUE ); +} + +static HRESULT WINAPI IDirectPlay4Impl_DestroyPlayer( IDirectPlay4 *iface, DPID idPlayer ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + return DP_IF_DestroyPlayer( This, NULL, idPlayer, FALSE ); +} + +static HRESULT WINAPI IDirectPlay2AImpl_EnumGroupPlayers( IDirectPlay2A *iface, DPID group, + GUID *instance, LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_EnumGroupPlayers( &This->IDirectPlay4A_iface, group, instance, + enumplayercb, context, flags ); +} + +static HRESULT WINAPI IDirectPlay2Impl_EnumGroupPlayers( IDirectPlay2 *iface, DPID group, + GUID *instance, LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_EnumGroupPlayers( &This->IDirectPlay4_iface, group, instance, + enumplayercb, context, flags ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_EnumGroupPlayers( IDirectPlay3A *iface, DPID group, + GUID *instance, LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_EnumGroupPlayers( &This->IDirectPlay4_iface, group, instance, + enumplayercb, context, flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_EnumGroupPlayers( IDirectPlay3 *iface, DPID group, + GUID *instance, LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_EnumGroupPlayers( &This->IDirectPlay4_iface, group, instance, + enumplayercb, context, flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_EnumGroupPlayers( IDirectPlay4A *iface, DPID group, + GUID *instance, LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_EnumGroupPlayers( &This->IDirectPlay4_iface, group, instance, enumplayercb, + context, flags ); +} + +static HRESULT WINAPI IDirectPlay4Impl_EnumGroupPlayers( IDirectPlay4 *iface, DPID group, + GUID *instance, LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + lpGroupData gdata; + lpPlayerList plist; + + FIXME( "(%p)->(0x%08x,%p,%p,%p,0x%08x): semi stub\n", This, group, instance, enumplayercb, + context, flags ); + + if ( This->dp2->connectionInitialized == NO_PROVIDER ) + return DPERR_UNINITIALIZED; + + /* Find the group */ + if ( ( gdata = DP_FindAnyGroup( This, group ) ) == NULL ) + return DPERR_INVALIDGROUP; + + if ( DPQ_IS_EMPTY( gdata->players ) ) + return DP_OK; + + /* Walk the players in this group */ + for( plist = DPQ_FIRST( gdata->players ); ; plist = DPQ_NEXT( plist->players ) ) + { + /* We do not enum the name server or app server as they are of no + * consequence to the end user. + */ + if ( ( plist->lpPData->dpid != DPID_NAME_SERVER ) && + ( plist->lpPData->dpid != DPID_SERVERPLAYER ) ) + { + /* FIXME: Need to add stuff for flags checking */ + if ( !enumplayercb( plist->lpPData->dpid, DPPLAYERTYPE_PLAYER, + &plist->lpPData->name, plist->lpPData->dwFlags, context ) ) + /* User requested break */ + return DP_OK; + } + + if ( DPQ_IS_ENDOFLIST( plist->players ) ) + break; + } + return DP_OK; +} + +/* NOTE: This only enumerates top level groups (created with CreateGroup) */ +static HRESULT WINAPI IDirectPlay2AImpl_EnumGroups( IDirectPlay2A *iface, GUID *instance, + LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_EnumGroups( &This->IDirectPlay4A_iface, instance, enumplayercb, context, + flags ); +} + +static HRESULT WINAPI IDirectPlay2Impl_EnumGroups( IDirectPlay2 *iface, GUID *instance, + LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_EnumGroups( &This->IDirectPlay4_iface, instance, enumplayercb, context, + flags ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_EnumGroups( IDirectPlay3A *iface, GUID *instance, + LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_EnumGroups( &This->IDirectPlay4_iface, instance, enumplayercb, context, + flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_EnumGroups( IDirectPlay3 *iface, GUID *instance, + LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_EnumGroups( &This->IDirectPlay4_iface, instance, enumplayercb, context, + flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_EnumGroups( IDirectPlay4A *iface, GUID *instance, + LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + return IDirectPlayX_EnumGroupsInGroup( iface, DPID_SYSTEM_GROUP, instance, enumplayercb, + context, flags ); +} + +static HRESULT WINAPI IDirectPlay4Impl_EnumGroups ( IDirectPlay4 *iface, GUID *instance, + LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + return IDirectPlayX_EnumGroupsInGroup( iface, DPID_SYSTEM_GROUP, instance, enumplayercb, + context, flags ); +} + +static HRESULT WINAPI IDirectPlay2AImpl_EnumPlayers( IDirectPlay2A *iface, GUID *instance, + LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_EnumPlayers( &This->IDirectPlay4A_iface, instance, enumplayercb, context, + flags ); +} + +static HRESULT WINAPI IDirectPlay2Impl_EnumPlayers( IDirectPlay2 *iface, GUID *instance, + LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_EnumPlayers( &This->IDirectPlay4_iface, instance, enumplayercb, context, + flags ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_EnumPlayers( IDirectPlay3A *iface, GUID *instance, + LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_EnumPlayers( &This->IDirectPlay4_iface, instance, enumplayercb, context, + flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_EnumPlayers( IDirectPlay3 *iface, GUID *instance, + LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_EnumPlayers( &This->IDirectPlay4_iface, instance, enumplayercb, context, + flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_EnumPlayers( IDirectPlay4A *iface, GUID *instance, + LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + return IDirectPlayX_EnumGroupPlayers( iface, DPID_SYSTEM_GROUP, instance, enumplayercb, + context, flags ); +} + +static HRESULT WINAPI IDirectPlay4Impl_EnumPlayers( IDirectPlay4 *iface, GUID *instance, + LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + return IDirectPlayX_EnumGroupPlayers( iface, DPID_SYSTEM_GROUP, instance, enumplayercb, + context, flags ); +} + +/* This function should call the registered callback function that the user + passed into EnumSessions for each entry available. + */ +static void DP_InvokeEnumSessionCallbacks + ( LPDPENUMSESSIONSCALLBACK2 lpEnumSessionsCallback2, + LPVOID lpNSInfo, + DWORD dwTimeout, + LPVOID lpContext ) +{ + LPDPSESSIONDESC2 lpSessionDesc; + + FIXME( ": not checking for conditions\n" ); + + /* Not sure if this should be pruning but it's convenient */ + NS_PruneSessionCache( lpNSInfo ); + + NS_ResetSessionEnumeration( lpNSInfo ); + + /* Enumerate all sessions */ + /* FIXME: Need to indicate ANSI */ + while( (lpSessionDesc = NS_WalkSessions( lpNSInfo ) ) != NULL ) + { + TRACE( "EnumSessionsCallback2 invoked\n" ); + if( !lpEnumSessionsCallback2( lpSessionDesc, &dwTimeout, 0, lpContext ) ) + { + return; + } + } + + /* Invoke one last time to indicate that there is no more to come */ + lpEnumSessionsCallback2( NULL, &dwTimeout, DPESC_TIMEDOUT, lpContext ); +} + +static DWORD CALLBACK DP_EnumSessionsSendAsyncRequestThread( LPVOID lpContext ) +{ + EnumSessionAsyncCallbackData* data = lpContext; + HANDLE hSuicideRequest = data->hSuicideRequest; + DWORD dwTimeout = data->dwTimeout; + + TRACE( "Thread started with timeout = 0x%08x\n", dwTimeout ); + + for( ;; ) + { + HRESULT hr; + + /* Sleep up to dwTimeout waiting for request to terminate thread */ + if( WaitForSingleObject( hSuicideRequest, dwTimeout ) == WAIT_OBJECT_0 ) + { + TRACE( "Thread terminating on terminate request\n" ); + break; + } + + /* Now resend the enum request */ + hr = NS_SendSessionRequestBroadcast( &data->requestGuid, + data->dwEnumSessionFlags, + data->lpSpData ); + + if( FAILED(hr) ) + { + ERR( "Enum broadcase request failed: %s\n", DPLAYX_HresultToString(hr) ); + /* FIXME: Should we kill this thread? How to inform the main thread? */ + } + + } + + TRACE( "Thread terminating\n" ); + + /* Clean up the thread data */ + CloseHandle( hSuicideRequest ); + HeapFree( GetProcessHeap(), 0, lpContext ); + + /* FIXME: Need to have some notification to main app thread that this is + * dead. It would serve two purposes. 1) allow sync on termination + * so that we don't actually send something to ourselves when we + * become name server (race condition) and 2) so that if we die + * abnormally something else will be able to tell. + */ + + return 1; +} + +static void DP_KillEnumSessionThread( IDirectPlayImpl *This ) +{ + /* Does a thread exist? If so we were doing an async enum session */ + if( This->dp2->hEnumSessionThread != INVALID_HANDLE_VALUE ) + { + TRACE( "Killing EnumSession thread %p\n", + This->dp2->hEnumSessionThread ); + + /* Request that the thread kill itself nicely */ + SetEvent( This->dp2->hKillEnumSessionThreadEvent ); + CloseHandle( This->dp2->hKillEnumSessionThreadEvent ); + + /* We no longer need to know about the thread */ + CloseHandle( This->dp2->hEnumSessionThread ); + + This->dp2->hEnumSessionThread = INVALID_HANDLE_VALUE; + } +} + +static HRESULT WINAPI IDirectPlay2AImpl_EnumSessions( IDirectPlay2A *iface, DPSESSIONDESC2 *sdesc, + DWORD timeout, LPDPENUMSESSIONSCALLBACK2 enumsessioncb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_EnumSessions( &This->IDirectPlay4A_iface, sdesc, timeout, enumsessioncb, + context, flags ); +} + +static HRESULT WINAPI IDirectPlay2Impl_EnumSessions( IDirectPlay2 *iface, DPSESSIONDESC2 *sdesc, + DWORD timeout, LPDPENUMSESSIONSCALLBACK2 enumsessioncb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_EnumSessions( &This->IDirectPlay4_iface, sdesc, timeout, enumsessioncb, + context, flags ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_EnumSessions( IDirectPlay3A *iface, DPSESSIONDESC2 *sdesc, + DWORD timeout, LPDPENUMSESSIONSCALLBACK2 enumsessioncb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_EnumSessions( &This->IDirectPlay4_iface, sdesc, timeout, enumsessioncb, + context, flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_EnumSessions( IDirectPlay3 *iface, DPSESSIONDESC2 *sdesc, + DWORD timeout, LPDPENUMSESSIONSCALLBACK2 enumsessioncb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_EnumSessions( &This->IDirectPlay4_iface, sdesc, timeout, enumsessioncb, + context, flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_EnumSessions( IDirectPlay4A *iface, DPSESSIONDESC2 *sdesc, + DWORD timeout, LPDPENUMSESSIONSCALLBACK2 enumsessioncb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_EnumSessions( &This->IDirectPlay4_iface, sdesc, timeout, enumsessioncb, + context, flags ); +} + +static HRESULT WINAPI IDirectPlay4Impl_EnumSessions( IDirectPlay4 *iface, DPSESSIONDESC2 *sdesc, + DWORD timeout, LPDPENUMSESSIONSCALLBACK2 enumsessioncb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + void *connection; + DWORD size; + HRESULT hr = DP_OK; + + TRACE( "(%p)->(%p,0x%08x,%p,%p,0x%08x)\n", This, sdesc, timeout, enumsessioncb, + context, flags ); + + if ( This->dp2->connectionInitialized == NO_PROVIDER ) + return DPERR_UNINITIALIZED; + + /* Can't enumerate if the interface is already open */ + if ( This->dp2->bConnectionOpen ) + return DPERR_GENERIC; + + /* The loading of a lobby provider _seems_ to require a backdoor loading + * of the service provider to also associate with this DP object. This is + * because the app doesn't seem to have to call EnumConnections and + * InitializeConnection for the SP before calling this method. As such + * we'll do their dirty work for them with a quick hack so as to always + * load the TCP/IP service provider. + * + * The correct solution would seem to involve creating a dialog box which + * contains the possible SPs. These dialog boxes most likely follow SDK + * examples. + */ + if ( This->dp2->bDPLSPInitialized && !This->dp2->bSPInitialized ) + { + WARN( "Hack providing TCP/IP SP for lobby provider activated\n" ); + + if ( !DP_BuildSPCompoundAddr( (GUID*)&DPSPGUID_TCPIP, &connection, &size ) ) + { + ERR( "Can't build compound addr\n" ); + return DPERR_GENERIC; + } + + hr = IDirectPlayX_InitializeConnection( &This->IDirectPlay4_iface, connection, 0 ); + if ( FAILED(hr) ) + return hr; + + HeapFree( GetProcessHeap(), 0, connection ); + This->dp2->bSPInitialized = TRUE; + } + + + /* Use the service provider default? */ + if ( !timeout ) + { + DPCAPS caps; + caps.dwSize = sizeof( caps ); + + IDirectPlayX_GetCaps( &This->IDirectPlay4_iface, &caps, 0 ); + timeout = caps.dwTimeout; + if ( !timeout ) + timeout = DPMSG_WAIT_5_SECS; /* Provide the TCP/IP default */ + } + + if ( flags & DPENUMSESSIONS_STOPASYNC ) + { + DP_KillEnumSessionThread( This ); + return hr; + } + + if ( flags & DPENUMSESSIONS_ASYNC ) + { + /* Enumerate everything presently in the local session cache */ + DP_InvokeEnumSessionCallbacks( enumsessioncb, This->dp2->lpNameServerData, timeout, + context ); + + if ( This->dp2->dwEnumSessionLock ) + return DPERR_CONNECTING; + + /* See if we've already created a thread to service this interface */ + if ( This->dp2->hEnumSessionThread == INVALID_HANDLE_VALUE ) + { + DWORD tid; + This->dp2->dwEnumSessionLock++; + + /* Send the first enum request inline since the user may cancel a dialog + * if one is presented. Also, may also have a connecting return code. + */ + hr = NS_SendSessionRequestBroadcast( &sdesc->guidApplication, flags, + &This->dp2->spData ); + + if ( SUCCEEDED(hr) ) + { + EnumSessionAsyncCallbackData* data = HeapAlloc( GetProcessHeap(), + HEAP_ZERO_MEMORY, sizeof( *data ) ); + /* FIXME: need to kill the thread on object deletion */ + data->lpSpData = &This->dp2->spData; + data->requestGuid = sdesc->guidApplication; + data->dwEnumSessionFlags = flags; + data->dwTimeout = timeout; + + This->dp2->hKillEnumSessionThreadEvent = CreateEventW( NULL, TRUE, FALSE, NULL ); + if ( !DuplicateHandle( GetCurrentProcess(), This->dp2->hKillEnumSessionThreadEvent, + GetCurrentProcess(), &data->hSuicideRequest, 0, FALSE, + DUPLICATE_SAME_ACCESS ) ) + ERR( "Can't duplicate thread killing handle\n" ); + + TRACE( ": creating EnumSessionsRequest thread\n" ); + This->dp2->hEnumSessionThread = CreateThread( NULL, 0, + DP_EnumSessionsSendAsyncRequestThread, data, 0, &tid ); + } + This->dp2->dwEnumSessionLock--; + } + } + else + { + /* Invalidate the session cache for the interface */ + NS_InvalidateSessionCache( This->dp2->lpNameServerData ); + /* Send the broadcast for session enumeration */ + hr = NS_SendSessionRequestBroadcast( &sdesc->guidApplication, flags, &This->dp2->spData ); + SleepEx( timeout, FALSE ); + DP_InvokeEnumSessionCallbacks( enumsessioncb, This->dp2->lpNameServerData, timeout, + context ); + } + + return hr; +} + +static HRESULT WINAPI IDirectPlay2AImpl_GetCaps( IDirectPlay2A *iface, DPCAPS *caps, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_GetCaps( &This->IDirectPlay4A_iface, caps, flags ); +} + +static HRESULT WINAPI IDirectPlay2Impl_GetCaps( IDirectPlay2 *iface, DPCAPS *caps, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_GetCaps( &This->IDirectPlay4_iface, caps, flags ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_GetCaps( IDirectPlay3A *iface, DPCAPS *caps, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_GetCaps( &This->IDirectPlay4_iface, caps, flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_GetCaps( IDirectPlay3 *iface, DPCAPS *caps, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_GetCaps( &This->IDirectPlay4_iface, caps, flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_GetCaps( IDirectPlay4A *iface, DPCAPS *caps, DWORD flags ) +{ + return IDirectPlayX_GetPlayerCaps( iface, DPID_ALLPLAYERS, caps, flags ); +} + +static HRESULT WINAPI IDirectPlay4Impl_GetCaps( IDirectPlay4 *iface, DPCAPS *caps, DWORD flags ) +{ + return IDirectPlayX_GetPlayerCaps( iface, DPID_ALLPLAYERS, caps, flags ); +} + +static HRESULT WINAPI IDirectPlay2AImpl_GetGroupData( IDirectPlay2A *iface, DPID group, void *data, + DWORD *size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_GetGroupData( &This->IDirectPlay4A_iface, group, data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay2Impl_GetGroupData( IDirectPlay2 *iface, DPID group, void *data, + DWORD *size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_GetGroupData( &This->IDirectPlay4_iface, group, data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_GetGroupData( IDirectPlay3A *iface, DPID group, void *data, + DWORD *size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_GetGroupData( &This->IDirectPlay4_iface, group, data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_GetGroupData( IDirectPlay3 *iface, DPID group, void *data, + DWORD *size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_GetGroupData( &This->IDirectPlay4_iface, group, data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_GetGroupData( IDirectPlay4A *iface, DPID group, + void *data, DWORD *size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_GetGroupData( &This->IDirectPlay4_iface, group, data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay4Impl_GetGroupData( IDirectPlay4 *iface, DPID group, + void *data, DWORD *size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + lpGroupData gdata; + DWORD bufsize; + void *src; + + TRACE( "(%p)->(0x%08x,%p,%p,0x%08x)\n", This, group, data, size, flags ); + + if ( ( gdata = DP_FindAnyGroup( This, group ) ) == NULL ) + return DPERR_INVALIDGROUP; + + /* How much buffer is required? */ + if ( flags & DPSET_LOCAL ) + { + bufsize = gdata->dwLocalDataSize; + src = gdata->lpLocalData; + } + else + { + bufsize = gdata->dwRemoteDataSize; + src = gdata->lpRemoteData; + } + + /* Is the user requesting to know how big a buffer is required? */ + if ( !data || *size < bufsize ) + { + *size = bufsize; + return DPERR_BUFFERTOOSMALL; + } + + CopyMemory( data, src, bufsize ); + + return DP_OK; +} + +static HRESULT DP_IF_GetGroupName( IDirectPlayImpl *This, DPID idGroup, void *lpData, + DWORD *lpdwDataSize, BOOL bAnsi ) +{ + lpGroupData lpGData; + LPDPNAME lpName = lpData; + DWORD dwRequiredDataSize; + + FIXME("(%p)->(0x%08x,%p,%p,%u) ANSI ignored\n", + This, idGroup, lpData, lpdwDataSize, bAnsi ); + + if( ( lpGData = DP_FindAnyGroup( This, idGroup ) ) == NULL ) + { + return DPERR_INVALIDGROUP; + } + + dwRequiredDataSize = lpGData->name.dwSize; + + if( lpGData->name.u1.lpszShortNameA ) + { + dwRequiredDataSize += strlen( lpGData->name.u1.lpszShortNameA ) + 1; + } + + if( lpGData->name.u2.lpszLongNameA ) + { + dwRequiredDataSize += strlen( lpGData->name.u2.lpszLongNameA ) + 1; + } + + if( ( lpData == NULL ) || + ( *lpdwDataSize < dwRequiredDataSize ) + ) + { + *lpdwDataSize = dwRequiredDataSize; + return DPERR_BUFFERTOOSMALL; + } + + /* Copy the structure */ + CopyMemory( lpName, &lpGData->name, lpGData->name.dwSize ); + + if( lpGData->name.u1.lpszShortNameA ) + { + strcpy( ((char*)lpName)+lpGData->name.dwSize, + lpGData->name.u1.lpszShortNameA ); + } + else + { + lpName->u1.lpszShortNameA = NULL; + } + + if( lpGData->name.u1.lpszShortNameA ) + { + strcpy( ((char*)lpName)+lpGData->name.dwSize, + lpGData->name.u2.lpszLongNameA ); + } + else + { + lpName->u2.lpszLongNameA = NULL; + } + + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay2AImpl_GetGroupName( IDirectPlay2A *iface, DPID group, void *data, + DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_GetGroupName( &This->IDirectPlay4A_iface, group, data, size ); +} + +static HRESULT WINAPI IDirectPlay2Impl_GetGroupName( IDirectPlay2 *iface, DPID group, void *data, + DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_GetGroupName( &This->IDirectPlay4_iface, group, data, size ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_GetGroupName( IDirectPlay3A *iface, DPID group, void *data, + DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_GetGroupName( &This->IDirectPlay4_iface, group, data, size ); +} + +static HRESULT WINAPI IDirectPlay3Impl_GetGroupName( IDirectPlay3 *iface, DPID group, void *data, + DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_GetGroupName( &This->IDirectPlay4_iface, group, data, size ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_GetGroupName( IDirectPlay4A *iface, DPID idGroup, + void *lpData, DWORD *lpdwDataSize ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return DP_IF_GetGroupName( This, idGroup, lpData, lpdwDataSize, TRUE ); +} + +static HRESULT WINAPI IDirectPlay4Impl_GetGroupName( IDirectPlay4 *iface, DPID idGroup, + void *lpData, DWORD *lpdwDataSize ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + return DP_IF_GetGroupName( This, idGroup, lpData, lpdwDataSize, FALSE ); +} + +static HRESULT WINAPI IDirectPlay2AImpl_GetMessageCount( IDirectPlay2A *iface, DPID player, + DWORD *count ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_GetMessageCount( &This->IDirectPlay4A_iface, player, count ); +} + +static HRESULT WINAPI IDirectPlay2Impl_GetMessageCount( IDirectPlay2 *iface, DPID player, + DWORD *count ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_GetMessageCount( &This->IDirectPlay4_iface, player, count ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_GetMessageCount( IDirectPlay3A *iface, DPID player, + DWORD *count ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_GetMessageCount( &This->IDirectPlay4_iface, player, count ); +} + +static HRESULT WINAPI IDirectPlay3Impl_GetMessageCount( IDirectPlay3 *iface, DPID player, + DWORD *count ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_GetMessageCount( &This->IDirectPlay4_iface, player, count ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_GetMessageCount( IDirectPlay4A *iface, DPID player, + DWORD *count ) +{ + return IDirectPlayX_GetMessageQueue( iface, 0, player, DPMESSAGEQUEUE_RECEIVE, count, NULL ); +} + +static HRESULT WINAPI IDirectPlay4Impl_GetMessageCount( IDirectPlay4 *iface, DPID player, + DWORD *count ) +{ + return IDirectPlayX_GetMessageQueue( iface, 0, player, DPMESSAGEQUEUE_RECEIVE, count, NULL ); +} + +static HRESULT WINAPI IDirectPlay2AImpl_GetPlayerAddress( IDirectPlay2A *iface, DPID player, + void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_GetPlayerAddress( &This->IDirectPlay4A_iface, player, data, size ); +} + +static HRESULT WINAPI IDirectPlay2Impl_GetPlayerAddress( IDirectPlay2 *iface, DPID player, + void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_GetPlayerAddress( &This->IDirectPlay4_iface, player, data, size ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_GetPlayerAddress( IDirectPlay3A *iface, DPID player, + void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_GetPlayerAddress( &This->IDirectPlay4_iface, player, data, size ); +} + +static HRESULT WINAPI IDirectPlay3Impl_GetPlayerAddress( IDirectPlay3 *iface, DPID player, + void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_GetPlayerAddress( &This->IDirectPlay4_iface, player, data, size ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_GetPlayerAddress( IDirectPlay4A *iface, DPID player, + void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + FIXME("(%p)->(0x%08x,%p,%p): stub\n", This, player, data, size ); + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay4Impl_GetPlayerAddress( IDirectPlay4 *iface, DPID player, + void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + FIXME( "(%p)->(0x%08x,%p,%p): stub\n", This, player, data, size ); + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay2AImpl_GetPlayerCaps( IDirectPlay2A *iface, DPID player, + DPCAPS *caps, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_GetPlayerCaps( &This->IDirectPlay4A_iface, player, caps, flags ); +} + +static HRESULT WINAPI IDirectPlay2Impl_GetPlayerCaps( IDirectPlay2 *iface, DPID player, + DPCAPS *caps, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_GetPlayerCaps( &This->IDirectPlay4_iface, player, caps, flags ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_GetPlayerCaps( IDirectPlay3A *iface, DPID player, + DPCAPS *caps, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_GetPlayerCaps( &This->IDirectPlay4_iface, player, caps, flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_GetPlayerCaps( IDirectPlay3 *iface, DPID player, + DPCAPS *caps, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_GetPlayerCaps( &This->IDirectPlay4_iface, player, caps, flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_GetPlayerCaps( IDirectPlay4A *iface, DPID player, + DPCAPS *caps, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_GetPlayerCaps( &This->IDirectPlay4_iface, player, caps, flags ); +} + +static HRESULT WINAPI IDirectPlay4Impl_GetPlayerCaps( IDirectPlay4 *iface, DPID player, + DPCAPS *caps, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + DPSP_GETCAPSDATA data; + + TRACE( "(%p)->(0x%08x,%p,0x%08x)\n", This, player, caps, flags); + + if ( This->dp2->connectionInitialized == NO_PROVIDER ) + return DPERR_UNINITIALIZED; + + /* Query the service provider */ + data.idPlayer = player; + data.dwFlags = flags; + data.lpCaps = caps; + data.lpISP = This->dp2->spData.lpISP; + + return (*This->dp2->spData.lpCB->GetCaps)( &data ); +} + +static HRESULT WINAPI IDirectPlay2AImpl_GetPlayerData( IDirectPlay2A *iface, DPID player, + void *data, DWORD *size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_GetPlayerData( &This->IDirectPlay4A_iface, player, data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay2Impl_GetPlayerData( IDirectPlay2 *iface, DPID player, + void *data, DWORD *size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_GetPlayerData( &This->IDirectPlay4_iface, player, data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_GetPlayerData( IDirectPlay3A *iface, DPID player, + void *data, DWORD *size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_GetPlayerData( &This->IDirectPlay4_iface, player, data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_GetPlayerData( IDirectPlay3 *iface, DPID player, + void *data, DWORD *size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_GetPlayerData( &This->IDirectPlay4_iface, player, data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_GetPlayerData( IDirectPlay4A *iface, DPID player, + void *data, DWORD *size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_GetPlayerData( &This->IDirectPlay4_iface, player, data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay4Impl_GetPlayerData( IDirectPlay4 *iface, DPID player, + void *data, DWORD *size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + lpPlayerList plist; + DWORD bufsize; + void *src; + + TRACE( "(%p)->(0x%08x,%p,%p,0x%08x)\n", This, player, data, size, flags ); + + if ( This->dp2->connectionInitialized == NO_PROVIDER ) + return DPERR_UNINITIALIZED; + + if ( ( plist = DP_FindPlayer( This, player ) ) == NULL ) + return DPERR_INVALIDPLAYER; + + if ( flags & DPSET_LOCAL ) + { + bufsize = plist->lpPData->dwLocalDataSize; + src = plist->lpPData->lpLocalData; + } + else + { + bufsize = plist->lpPData->dwRemoteDataSize; + src = plist->lpPData->lpRemoteData; + } + + /* Is the user requesting to know how big a buffer is required? */ + if ( !data || *size < bufsize ) + { + *size = bufsize; + return DPERR_BUFFERTOOSMALL; + } + + CopyMemory( data, src, bufsize ); + + return DP_OK; +} + +static HRESULT DP_IF_GetPlayerName( IDirectPlayImpl *This, DPID idPlayer, void *lpData, + DWORD *lpdwDataSize, BOOL bAnsi ) +{ + lpPlayerList lpPList; + LPDPNAME lpName = lpData; + DWORD dwRequiredDataSize; + + FIXME( "(%p)->(0x%08x,%p,%p,%u): ANSI\n", + This, idPlayer, lpData, lpdwDataSize, bAnsi ); + + if( This->dp2->connectionInitialized == NO_PROVIDER ) + { + return DPERR_UNINITIALIZED; + } + + if( ( lpPList = DP_FindPlayer( This, idPlayer ) ) == NULL ) + { + return DPERR_INVALIDPLAYER; + } + + dwRequiredDataSize = lpPList->lpPData->name.dwSize; + + if( lpPList->lpPData->name.u1.lpszShortNameA ) + { + dwRequiredDataSize += strlen( lpPList->lpPData->name.u1.lpszShortNameA ) + 1; + } + + if( lpPList->lpPData->name.u2.lpszLongNameA ) + { + dwRequiredDataSize += strlen( lpPList->lpPData->name.u2.lpszLongNameA ) + 1; + } + + if( ( lpData == NULL ) || + ( *lpdwDataSize < dwRequiredDataSize ) + ) + { + *lpdwDataSize = dwRequiredDataSize; + return DPERR_BUFFERTOOSMALL; + } + + /* Copy the structure */ + CopyMemory( lpName, &lpPList->lpPData->name, lpPList->lpPData->name.dwSize ); + + if( lpPList->lpPData->name.u1.lpszShortNameA ) + { + strcpy( ((char*)lpName)+lpPList->lpPData->name.dwSize, + lpPList->lpPData->name.u1.lpszShortNameA ); + } + else + { + lpName->u1.lpszShortNameA = NULL; + } + + if( lpPList->lpPData->name.u1.lpszShortNameA ) + { + strcpy( ((char*)lpName)+lpPList->lpPData->name.dwSize, + lpPList->lpPData->name.u2.lpszLongNameA ); + } + else + { + lpName->u2.lpszLongNameA = NULL; + } + + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay2AImpl_GetPlayerName( IDirectPlay2A *iface, DPID player, + void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_GetPlayerName( &This->IDirectPlay4A_iface, player, data, size ); +} + +static HRESULT WINAPI IDirectPlay2Impl_GetPlayerName( IDirectPlay2 *iface, DPID player, + void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_GetPlayerName( &This->IDirectPlay4_iface, player, data, size ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_GetPlayerName( IDirectPlay3A *iface, DPID player, + void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_GetPlayerName( &This->IDirectPlay4_iface, player, data, size ); +} + +static HRESULT WINAPI IDirectPlay3Impl_GetPlayerName( IDirectPlay3 *iface, DPID player, + void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_GetPlayerName( &This->IDirectPlay4_iface, player, data, size ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_GetPlayerName( IDirectPlay4A *iface, DPID idPlayer, + void *lpData, DWORD *lpdwDataSize ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return DP_IF_GetPlayerName( This, idPlayer, lpData, lpdwDataSize, TRUE ); +} + +static HRESULT WINAPI IDirectPlay4Impl_GetPlayerName( IDirectPlay4 *iface, DPID idPlayer, + void *lpData, DWORD *lpdwDataSize ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + return DP_IF_GetPlayerName( This, idPlayer, lpData, lpdwDataSize, FALSE ); +} + +static HRESULT DP_GetSessionDesc( IDirectPlayImpl *This, void *lpData, DWORD *lpdwDataSize, + BOOL bAnsi ) +{ + DWORD dwRequiredSize; + + TRACE( "(%p)->(%p,%p,%u)\n", This, lpData, lpdwDataSize, bAnsi ); + + if( This->dp2->connectionInitialized == NO_PROVIDER ) + { + return DPERR_UNINITIALIZED; + } + + if( ( lpData == NULL ) && ( lpdwDataSize == NULL ) ) + { + return DPERR_INVALIDPARAMS; + } + + /* FIXME: Get from This->dp2->lpSessionDesc */ + dwRequiredSize = DP_CalcSessionDescSize( This->dp2->lpSessionDesc, bAnsi ); + + if ( ( lpData == NULL ) || + ( *lpdwDataSize < dwRequiredSize ) + ) + { + *lpdwDataSize = dwRequiredSize; + return DPERR_BUFFERTOOSMALL; + } + + DP_CopySessionDesc( lpData, This->dp2->lpSessionDesc, bAnsi ); + + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay2AImpl_GetSessionDesc( IDirectPlay2A *iface, void *data, + DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_GetSessionDesc( &This->IDirectPlay4A_iface, data, size ); +} + +static HRESULT WINAPI IDirectPlay2Impl_GetSessionDesc( IDirectPlay2 *iface, void *data, + DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_GetSessionDesc( &This->IDirectPlay4_iface, data, size ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_GetSessionDesc( IDirectPlay3A *iface, void *data, + DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_GetSessionDesc( &This->IDirectPlay4_iface, data, size ); +} + +static HRESULT WINAPI IDirectPlay3Impl_GetSessionDesc( IDirectPlay3 *iface, void *data, + DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_GetSessionDesc( &This->IDirectPlay4_iface, data, size ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_GetSessionDesc( IDirectPlay4A *iface, void *lpData, + DWORD *lpdwDataSize ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return DP_GetSessionDesc( This, lpData, lpdwDataSize, TRUE ); +} + +static HRESULT WINAPI IDirectPlay4Impl_GetSessionDesc( IDirectPlay4 *iface, void *lpData, + DWORD *lpdwDataSize ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + return DP_GetSessionDesc( This, lpData, lpdwDataSize, TRUE ); +} + +static HRESULT WINAPI IDirectPlay2AImpl_Initialize( IDirectPlay2A *iface, GUID *guid ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_Initialize( &This->IDirectPlay4A_iface, guid ); +} + +static HRESULT WINAPI IDirectPlay2Impl_Initialize( IDirectPlay2 *iface, GUID *guid ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_Initialize( &This->IDirectPlay4_iface, guid ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_Initialize( IDirectPlay3A *iface, GUID *guid ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_Initialize( &This->IDirectPlay4_iface, guid ); +} + +static HRESULT WINAPI IDirectPlay3Impl_Initialize( IDirectPlay3 *iface, GUID *guid ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_Initialize( &This->IDirectPlay4_iface, guid ); +} + +/* Intended only for COM compatibility. Always returns an error. */ +static HRESULT WINAPI IDirectPlay4AImpl_Initialize( IDirectPlay4A *iface, GUID *guid ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + TRACE("(%p)->(%p): no-op\n", This, guid ); + return DPERR_ALREADYINITIALIZED; +} + +static HRESULT WINAPI IDirectPlay4Impl_Initialize( IDirectPlay4 *iface, GUID *guid ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + TRACE( "(%p)->(%p): no-op\n", This, guid ); + return DPERR_ALREADYINITIALIZED; +} + + +static HRESULT DP_SecureOpen( IDirectPlayImpl *This, const DPSESSIONDESC2 *lpsd, DWORD dwFlags, + const DPSECURITYDESC *lpSecurity, const DPCREDENTIALS *lpCredentials, BOOL bAnsi ) +{ + HRESULT hr = DP_OK; + + FIXME( "(%p)->(%p,0x%08x,%p,%p): partial stub\n", + This, lpsd, dwFlags, lpSecurity, lpCredentials ); + + if( This->dp2->connectionInitialized == NO_PROVIDER ) + { + return DPERR_UNINITIALIZED; + } + + if( lpsd->dwSize != sizeof(DPSESSIONDESC2) ) + { + TRACE( ": rejecting invalid dpsd size (%d).\n", lpsd->dwSize ); + return DPERR_INVALIDPARAMS; + } + + if( This->dp2->bConnectionOpen ) + { + TRACE( ": rejecting already open connection.\n" ); + return DPERR_ALREADYINITIALIZED; + } + + /* If we're enumerating, kill the thread */ + DP_KillEnumSessionThread( This ); + + if( dwFlags & DPOPEN_CREATE ) + { + /* Rightoo - this computer is the host and the local computer needs to be + the name server so that others can join this session */ + NS_SetLocalComputerAsNameServer( lpsd, This->dp2->lpNameServerData ); + + This->dp2->bHostInterface = TRUE; + + hr = DP_SetSessionDesc( This, lpsd, 0, TRUE, bAnsi ); + if( FAILED( hr ) ) + { + ERR( "Unable to set session desc: %s\n", DPLAYX_HresultToString( hr ) ); + return hr; + } + } + + /* Invoke the conditional callback for the service provider */ + if( This->dp2->spData.lpCB->Open ) + { + DPSP_OPENDATA data; + + FIXME( "Not all data fields are correct. Need new parameter\n" ); + + data.bCreate = (dwFlags & DPOPEN_CREATE ) != 0; + data.lpSPMessageHeader = (dwFlags & DPOPEN_CREATE ) ? NULL + : NS_GetNSAddr( This->dp2->lpNameServerData ); + data.lpISP = This->dp2->spData.lpISP; + data.bReturnStatus = (dwFlags & DPOPEN_RETURNSTATUS) != 0; + data.dwOpenFlags = dwFlags; + data.dwSessionFlags = This->dp2->lpSessionDesc->dwFlags; + + hr = (*This->dp2->spData.lpCB->Open)(&data); + if( FAILED( hr ) ) + { + ERR( "Unable to open session: %s\n", DPLAYX_HresultToString( hr ) ); + return hr; + } + } + + { + /* Create the system group of which everything is a part of */ + DPID systemGroup = DPID_SYSTEM_GROUP; + + hr = DP_IF_CreateGroup( This, NULL, &systemGroup, NULL, + NULL, 0, 0, TRUE ); + + } + + if( dwFlags & DPOPEN_JOIN ) + { + DPID dpidServerId = DPID_UNKNOWN; + + /* Create the server player for this interface. This way we can receive + * messages for this session. + */ + /* FIXME: I suppose that we should be setting an event for a receive + * type of thing. That way the messaging thread could know to wake + * up. DPlay would then trigger the hEvent for the player the + * message is directed to. + */ + hr = DP_IF_CreatePlayer( This, NULL, &dpidServerId, NULL, 0, NULL, + 0, + DPPLAYER_SERVERPLAYER | DPPLAYER_LOCAL , bAnsi ); + + } + else if( dwFlags & DPOPEN_CREATE ) + { + DPID dpidNameServerId = DPID_NAME_SERVER; + + hr = DP_IF_CreatePlayer( This, NULL, &dpidNameServerId, NULL, 0, NULL, + 0, DPPLAYER_SERVERPLAYER, bAnsi ); + } + + if( FAILED(hr) ) + { + ERR( "Couldn't create name server/system player: %s\n", + DPLAYX_HresultToString(hr) ); + } + + return hr; +} + +static HRESULT WINAPI IDirectPlay2AImpl_Open( IDirectPlay2A *iface, DPSESSIONDESC2 *sdesc, + DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_Open( &This->IDirectPlay4A_iface, sdesc, flags ); +} + +static HRESULT WINAPI IDirectPlay2Impl_Open( IDirectPlay2 *iface, DPSESSIONDESC2 *sdesc, + DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_Open( &This->IDirectPlay4_iface, sdesc, flags ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_Open( IDirectPlay3A *iface, DPSESSIONDESC2 *sdesc, + DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_Open( &This->IDirectPlay4_iface, sdesc, flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_Open( IDirectPlay3 *iface, DPSESSIONDESC2 *sdesc, + DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_Open( &This->IDirectPlay4_iface, sdesc, flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_Open( IDirectPlay4A *iface, DPSESSIONDESC2 *sdesc, + DWORD flags ) +{ + return IDirectPlayX_SecureOpen( iface, sdesc, flags, NULL, NULL ); +} + +static HRESULT WINAPI IDirectPlay4Impl_Open( IDirectPlay4 *iface, DPSESSIONDESC2 *sdesc, + DWORD flags ) +{ + return IDirectPlayX_SecureOpen( iface, sdesc, flags, NULL, NULL ); +} + +static HRESULT DP_IF_Receive( IDirectPlayImpl *This, DPID *lpidFrom, DPID *lpidTo, DWORD dwFlags, + void *lpData, DWORD *lpdwDataSize, BOOL bAnsi ) +{ + LPDPMSG lpMsg = NULL; + + FIXME( "(%p)->(%p,%p,0x%08x,%p,%p,%u): stub\n", + This, lpidFrom, lpidTo, dwFlags, lpData, lpdwDataSize, bAnsi ); + + if( This->dp2->connectionInitialized == NO_PROVIDER ) + { + return DPERR_UNINITIALIZED; + } + + if( dwFlags == 0 ) + { + dwFlags = DPRECEIVE_ALL; + } + + /* If the lpData is NULL, we must be peeking the message */ + if( ( lpData == NULL ) && + !( dwFlags & DPRECEIVE_PEEK ) + ) + { + return DPERR_INVALIDPARAMS; + } + + if( dwFlags & DPRECEIVE_ALL ) + { + lpMsg = This->dp2->receiveMsgs.lpQHFirst; + + if( !( dwFlags & DPRECEIVE_PEEK ) ) + { + FIXME( "Remove from queue\n" ); + } + } + else if( ( dwFlags & DPRECEIVE_TOPLAYER ) || + ( dwFlags & DPRECEIVE_FROMPLAYER ) + ) + { + FIXME( "Find matching message 0x%08x\n", dwFlags ); + } + else + { + ERR( "Hmmm..dwFlags 0x%08x\n", dwFlags ); + } + + if( lpMsg == NULL ) + { + return DPERR_NOMESSAGES; + } + + /* Copy into the provided buffer */ + if (lpData) CopyMemory( lpData, lpMsg->msg, *lpdwDataSize ); + + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay2AImpl_Receive( IDirectPlay2A *iface, DPID *from, DPID *to, + DWORD flags, void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_Receive( &This->IDirectPlay4A_iface, from, to, flags, data, size ); +} + +static HRESULT WINAPI IDirectPlay2Impl_Receive( IDirectPlay2 *iface, DPID *from, DPID *to, + DWORD flags, void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_Receive( &This->IDirectPlay4_iface, from, to, flags, data, size ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_Receive( IDirectPlay3A *iface, DPID *from, DPID *to, + DWORD flags, void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_Receive( &This->IDirectPlay4_iface, from, to, flags, data, size ); +} + +static HRESULT WINAPI IDirectPlay3Impl_Receive( IDirectPlay3 *iface, DPID *from, DPID *to, + DWORD flags, void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_Receive( &This->IDirectPlay4_iface, from, to, flags, data, size ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_Receive( IDirectPlay4A *iface, DPID *lpidFrom, + DPID *lpidTo, DWORD dwFlags, void *lpData, DWORD *lpdwDataSize ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return DP_IF_Receive( This, lpidFrom, lpidTo, dwFlags, lpData, lpdwDataSize, TRUE ); +} + +static HRESULT WINAPI IDirectPlay4Impl_Receive( IDirectPlay4 *iface, DPID *lpidFrom, + DPID *lpidTo, DWORD dwFlags, void *lpData, DWORD *lpdwDataSize ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + return DP_IF_Receive( This, lpidFrom, lpidTo, dwFlags, lpData, lpdwDataSize, FALSE ); +} + +static HRESULT WINAPI IDirectPlay2AImpl_Send( IDirectPlay2A *iface, DPID from, DPID to, + DWORD flags, void *data, DWORD size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_Send( &This->IDirectPlay4A_iface, from, to, flags, data, size ); +} + +static HRESULT WINAPI IDirectPlay2Impl_Send( IDirectPlay2 *iface, DPID from, DPID to, + DWORD flags, void *data, DWORD size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_Send( &This->IDirectPlay4_iface, from, to, flags, data, size ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_Send( IDirectPlay3A *iface, DPID from, DPID to, + DWORD flags, void *data, DWORD size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_Send( &This->IDirectPlay4_iface, from, to, flags, data, size ); +} + +static HRESULT WINAPI IDirectPlay3Impl_Send( IDirectPlay3 *iface, DPID from, DPID to, + DWORD flags, void *data, DWORD size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_Send( &This->IDirectPlay4_iface, from, to, flags, data, size ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_Send( IDirectPlay4A *iface, DPID from, DPID to, + DWORD flags, void *data, DWORD size ) +{ + return IDirectPlayX_SendEx( iface, from, to, flags, data, size, 0, 0, NULL, NULL ); +} + +static HRESULT WINAPI IDirectPlay4Impl_Send( IDirectPlay4 *iface, DPID from, DPID to, + DWORD flags, void *data, DWORD size ) +{ + return IDirectPlayX_SendEx( iface, from, to, flags, data, size, 0, 0, NULL, NULL ); +} + +static HRESULT WINAPI IDirectPlay2AImpl_SetGroupData( IDirectPlay2A *iface, DPID group, void *data, + DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_SetGroupData( &This->IDirectPlay4A_iface, group, data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay2Impl_SetGroupData( IDirectPlay2 *iface, DPID group, void *data, + DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_SetGroupData( &This->IDirectPlay4_iface, group, data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_SetGroupData( IDirectPlay3A *iface, DPID group, void *data, + DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_SetGroupData( &This->IDirectPlay4_iface, group, data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_SetGroupData( IDirectPlay3 *iface, DPID group, void *data, + DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_SetGroupData( &This->IDirectPlay4_iface, group, data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_SetGroupData( IDirectPlay4A *iface, DPID group, void *data, + DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_SetGroupData( &This->IDirectPlay4_iface, group, data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay4Impl_SetGroupData( IDirectPlay4 *iface, DPID group, void *data, + DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + lpGroupData gdata; + + TRACE( "(%p)->(0x%08x,%p,0x%08x,0x%08x)\n", This, group, data, size, flags ); + + /* Parameter check */ + if ( !data && size ) + return DPERR_INVALIDPARAMS; + + /* Find the pointer to the data for this player */ + if ( ( gdata = DP_FindAnyGroup( This, group ) ) == NULL ) + return DPERR_INVALIDOBJECT; + + if ( !(flags & DPSET_LOCAL) ) + { + FIXME( "Was this group created by this interface?\n" ); + /* FIXME: If this is a remote update need to allow it but not + * send a message. + */ + } + + DP_SetGroupData( gdata, flags, data, size ); + + /* FIXME: Only send a message if this group is local to the session otherwise + * it will have been rejected above + */ + if ( !(flags & DPSET_LOCAL) ) + FIXME( "Send msg?\n" ); + + return DP_OK; +} + +static HRESULT DP_IF_SetGroupName( IDirectPlayImpl *This, DPID idGroup, DPNAME *lpGroupName, + DWORD dwFlags, BOOL bAnsi ) +{ + lpGroupData lpGData; + + TRACE( "(%p)->(0x%08x,%p,0x%08x,%u)\n", This, idGroup, + lpGroupName, dwFlags, bAnsi ); + + if( ( lpGData = DP_FindAnyGroup( This, idGroup ) ) == NULL ) + { + return DPERR_INVALIDGROUP; + } + + DP_CopyDPNAMEStruct( &lpGData->name, lpGroupName, bAnsi ); + + /* Should send a DPMSG_SETPLAYERORGROUPNAME message */ + FIXME( "Message not sent and dwFlags ignored\n" ); + + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay2AImpl_SetGroupName( IDirectPlay2A *iface, DPID group, + DPNAME *name, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_SetGroupName( &This->IDirectPlay4A_iface, group, name, flags ); +} + +static HRESULT WINAPI IDirectPlay2Impl_SetGroupName( IDirectPlay2 *iface, DPID group, + DPNAME *name, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_SetGroupName( &This->IDirectPlay4_iface, group, name, flags ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_SetGroupName( IDirectPlay3A *iface, DPID group, + DPNAME *name, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_SetGroupName( &This->IDirectPlay4_iface, group, name, flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_SetGroupName( IDirectPlay3 *iface, DPID group, + DPNAME *name, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_SetGroupName( &This->IDirectPlay4_iface, group, name, flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_SetGroupName( IDirectPlay4A *iface, DPID idGroup, + DPNAME *lpGroupName, DWORD dwFlags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return DP_IF_SetGroupName( This, idGroup, lpGroupName, dwFlags, TRUE ); +} + +static HRESULT WINAPI IDirectPlay4Impl_SetGroupName( IDirectPlay4 *iface, DPID idGroup, + DPNAME *lpGroupName, DWORD dwFlags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + return DP_IF_SetGroupName( This, idGroup, lpGroupName, dwFlags, FALSE ); +} + +static HRESULT WINAPI IDirectPlay2AImpl_SetPlayerData( IDirectPlay2A *iface, DPID player, + void *data, DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_SetPlayerData( &This->IDirectPlay4A_iface, player, data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay2Impl_SetPlayerData( IDirectPlay2 *iface, DPID player, + void *data, DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_SetPlayerData( &This->IDirectPlay4_iface, player, data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_SetPlayerData( IDirectPlay3A *iface, DPID player, + void *data, DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_SetPlayerData( &This->IDirectPlay4_iface, player, data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_SetPlayerData( IDirectPlay3 *iface, DPID player, + void *data, DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_SetPlayerData( &This->IDirectPlay4_iface, player, data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_SetPlayerData( IDirectPlay4A *iface, DPID player, + void *data, DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_SetPlayerData( &This->IDirectPlay4_iface, player, data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay4Impl_SetPlayerData( IDirectPlay4 *iface, DPID player, + void *data, DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + lpPlayerList plist; + + TRACE( "(%p)->(0x%08x,%p,0x%08x,0x%08x)\n", This, player, data, size, flags ); + + if ( This->dp2->connectionInitialized == NO_PROVIDER ) + return DPERR_UNINITIALIZED; + + /* Parameter check */ + if ( !data && size ) + return DPERR_INVALIDPARAMS; + + /* Find the pointer to the data for this player */ + if ( (plist = DP_FindPlayer( This, player )) == NULL ) + return DPERR_INVALIDPLAYER; + + if ( !(flags & DPSET_LOCAL) ) + { + FIXME( "Was this group created by this interface?\n" ); + /* FIXME: If this is a remote update need to allow it but not + * send a message. + */ + } + + DP_SetPlayerData( plist->lpPData, flags, data, size ); + + if ( !(flags & DPSET_LOCAL) ) + FIXME( "Send msg?\n" ); + + return DP_OK; +} + +static HRESULT DP_IF_SetPlayerName( IDirectPlayImpl *This, DPID idPlayer, DPNAME *lpPlayerName, + DWORD dwFlags, BOOL bAnsi ) +{ + lpPlayerList lpPList; + + TRACE( "(%p)->(0x%08x,%p,0x%08x,%u)\n", + This, idPlayer, lpPlayerName, dwFlags, bAnsi ); + + if( This->dp2->connectionInitialized == NO_PROVIDER ) + { + return DPERR_UNINITIALIZED; + } + + if( ( lpPList = DP_FindPlayer( This, idPlayer ) ) == NULL ) + { + return DPERR_INVALIDGROUP; + } + + DP_CopyDPNAMEStruct( &lpPList->lpPData->name, lpPlayerName, bAnsi ); + + /* Should send a DPMSG_SETPLAYERORGROUPNAME message */ + FIXME( "Message not sent and dwFlags ignored\n" ); + + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay2AImpl_SetPlayerName( IDirectPlay2A *iface, DPID player, + DPNAME *name, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_SetPlayerName( &This->IDirectPlay4A_iface, player, name, flags ); +} + +static HRESULT WINAPI IDirectPlay2Impl_SetPlayerName( IDirectPlay2 *iface, DPID player, + DPNAME *name, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_SetPlayerName( &This->IDirectPlay4_iface, player, name, flags ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_SetPlayerName( IDirectPlay3A *iface, DPID player, + DPNAME *name, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_SetPlayerName( &This->IDirectPlay4_iface, player, name, flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_SetPlayerName( IDirectPlay3 *iface, DPID player, + DPNAME *name, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_SetPlayerName( &This->IDirectPlay4_iface, player, name, flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_SetPlayerName( IDirectPlay4A *iface, DPID idPlayer, + DPNAME *lpPlayerName, DWORD dwFlags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return DP_IF_SetPlayerName( This, idPlayer, lpPlayerName, dwFlags, TRUE ); +} + +static HRESULT WINAPI IDirectPlay4Impl_SetPlayerName( IDirectPlay4 *iface, DPID idPlayer, + DPNAME *lpPlayerName, DWORD dwFlags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + return DP_IF_SetPlayerName( This, idPlayer, lpPlayerName, dwFlags, FALSE ); +} + +static HRESULT DP_SetSessionDesc( IDirectPlayImpl *This, const DPSESSIONDESC2 *lpSessDesc, + DWORD dwFlags, BOOL bInitial, BOOL bAnsi ) +{ + DWORD dwRequiredSize; + LPDPSESSIONDESC2 lpTempSessDesc; + + TRACE( "(%p)->(%p,0x%08x,%u,%u)\n", + This, lpSessDesc, dwFlags, bInitial, bAnsi ); + + if( This->dp2->connectionInitialized == NO_PROVIDER ) + { + return DPERR_UNINITIALIZED; + } + + if( dwFlags ) + { + return DPERR_INVALIDPARAMS; + } + + /* Only the host is allowed to update the session desc */ + if( !This->dp2->bHostInterface ) + { + return DPERR_ACCESSDENIED; + } + + /* FIXME: Copy into This->dp2->lpSessionDesc */ + dwRequiredSize = DP_CalcSessionDescSize( lpSessDesc, bAnsi ); + lpTempSessDesc = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwRequiredSize ); + + if( lpTempSessDesc == NULL ) + { + return DPERR_OUTOFMEMORY; + } + + /* Free the old */ + HeapFree( GetProcessHeap(), 0, This->dp2->lpSessionDesc ); + + This->dp2->lpSessionDesc = lpTempSessDesc; + /* Set the new */ + DP_CopySessionDesc( This->dp2->lpSessionDesc, lpSessDesc, bAnsi ); + if( bInitial ) + { + /*Initializing session GUID*/ + CoCreateGuid( &(This->dp2->lpSessionDesc->guidInstance) ); + } + /* If this is an external invocation of the interface, we should be + * letting everyone know that things have changed. Otherwise this is + * just an initialization and it doesn't need to be propagated. + */ + if( !bInitial ) + { + FIXME( "Need to send a DPMSG_SETSESSIONDESC msg to everyone\n" ); + } + + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay2AImpl_SetSessionDesc( IDirectPlay2A *iface, DPSESSIONDESC2 *sdesc, + DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2A( iface ); + return IDirectPlayX_SetSessionDesc( &This->IDirectPlay4A_iface, sdesc, flags ); +} + +static HRESULT WINAPI IDirectPlay2Impl_SetSessionDesc( IDirectPlay2 *iface, DPSESSIONDESC2 *sdesc, + DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay2( iface ); + return IDirectPlayX_SetSessionDesc( &This->IDirectPlay4_iface, sdesc, flags ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_SetSessionDesc( IDirectPlay3A *iface, DPSESSIONDESC2 *sdesc, + DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_SetSessionDesc( &This->IDirectPlay4_iface, sdesc, flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_SetSessionDesc( IDirectPlay3 *iface, DPSESSIONDESC2 *sdesc, + DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_SetSessionDesc( &This->IDirectPlay4_iface, sdesc, flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_SetSessionDesc( IDirectPlay4A *iface, + DPSESSIONDESC2 *lpSessDesc, DWORD dwFlags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return DP_SetSessionDesc( This, lpSessDesc, dwFlags, FALSE, TRUE ); +} + +static HRESULT WINAPI IDirectPlay4Impl_SetSessionDesc( IDirectPlay4 *iface, + DPSESSIONDESC2 *lpSessDesc, DWORD dwFlags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + return DP_SetSessionDesc( This, lpSessDesc, dwFlags, FALSE, TRUE ); +} + +/* FIXME: See about merging some of this stuff with dplayx_global.c stuff */ +static DWORD DP_CalcSessionDescSize( LPCDPSESSIONDESC2 lpSessDesc, BOOL bAnsi ) +{ + DWORD dwSize = 0; + + if( lpSessDesc == NULL ) + { + /* Hmmm..don't need any size? */ + ERR( "NULL lpSessDesc\n" ); + return dwSize; + } + + dwSize += sizeof( *lpSessDesc ); + + if( bAnsi ) + { + if( lpSessDesc->u1.lpszSessionNameA ) + { + dwSize += lstrlenA( lpSessDesc->u1.lpszSessionNameA ) + 1; + } + + if( lpSessDesc->u2.lpszPasswordA ) + { + dwSize += lstrlenA( lpSessDesc->u2.lpszPasswordA ) + 1; + } + } + else /* UNICODE */ + { + if( lpSessDesc->u1.lpszSessionName ) + { + dwSize += sizeof( WCHAR ) * + ( lstrlenW( lpSessDesc->u1.lpszSessionName ) + 1 ); + } + + if( lpSessDesc->u2.lpszPassword ) + { + dwSize += sizeof( WCHAR ) * + ( lstrlenW( lpSessDesc->u2.lpszPassword ) + 1 ); + } + } + + return dwSize; +} + +/* Assumes that contiguous buffers are already allocated. */ +static void DP_CopySessionDesc( LPDPSESSIONDESC2 lpSessionDest, + LPCDPSESSIONDESC2 lpSessionSrc, BOOL bAnsi ) +{ + BYTE* lpStartOfFreeSpace; + + if( lpSessionDest == NULL ) + { + ERR( "NULL lpSessionDest\n" ); + return; + } + + CopyMemory( lpSessionDest, lpSessionSrc, sizeof( *lpSessionSrc ) ); + + lpStartOfFreeSpace = ((BYTE*)lpSessionDest) + sizeof( *lpSessionSrc ); + + if( bAnsi ) + { + if( lpSessionSrc->u1.lpszSessionNameA ) + { + lstrcpyA( (LPSTR)lpStartOfFreeSpace, + lpSessionDest->u1.lpszSessionNameA ); + lpSessionDest->u1.lpszSessionNameA = (LPSTR)lpStartOfFreeSpace; + lpStartOfFreeSpace += + lstrlenA( lpSessionDest->u1.lpszSessionNameA ) + 1; + } + + if( lpSessionSrc->u2.lpszPasswordA ) + { + lstrcpyA( (LPSTR)lpStartOfFreeSpace, + lpSessionDest->u2.lpszPasswordA ); + lpSessionDest->u2.lpszPasswordA = (LPSTR)lpStartOfFreeSpace; + } + } + else /* UNICODE */ + { + if( lpSessionSrc->u1.lpszSessionName ) + { + lstrcpyW( (LPWSTR)lpStartOfFreeSpace, + lpSessionDest->u1.lpszSessionName ); + lpSessionDest->u1.lpszSessionName = (LPWSTR)lpStartOfFreeSpace; + lpStartOfFreeSpace += sizeof(WCHAR) * + ( lstrlenW( lpSessionDest->u1.lpszSessionName ) + 1 ); + } + + if( lpSessionSrc->u2.lpszPassword ) + { + lstrcpyW( (LPWSTR)lpStartOfFreeSpace, + lpSessionDest->u2.lpszPassword ); + lpSessionDest->u2.lpszPassword = (LPWSTR)lpStartOfFreeSpace; + } + } +} + +static HRESULT WINAPI IDirectPlay3AImpl_AddGroupToGroup( IDirectPlay3A *iface, DPID parent, + DPID group ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_AddGroupToGroup( &This->IDirectPlay4A_iface, parent, group ); +} + +static HRESULT WINAPI IDirectPlay3Impl_AddGroupToGroup( IDirectPlay3 *iface, DPID parent, + DPID group ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_AddGroupToGroup( &This->IDirectPlay4_iface, parent, group ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_AddGroupToGroup( IDirectPlay4A *iface, DPID parent, + DPID group ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_AddGroupToGroup( &This->IDirectPlay4_iface, parent, group ); +} + +static HRESULT WINAPI IDirectPlay4Impl_AddGroupToGroup( IDirectPlay4 *iface, DPID parent, + DPID group ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + lpGroupData gdata; + lpGroupList glist; + + TRACE( "(%p)->(0x%08x,0x%08x)\n", This, parent, group ); + + if ( This->dp2->connectionInitialized == NO_PROVIDER ) + return DPERR_UNINITIALIZED; + + if ( !DP_FindAnyGroup(This, parent ) ) + return DPERR_INVALIDGROUP; + + if ( ( gdata = DP_FindAnyGroup(This, group ) ) == NULL ) + return DPERR_INVALIDGROUP; + + /* Create a player list (ie "shortcut" ) */ + glist = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *glist ) ); + if ( !glist ) + return DPERR_CANTADDPLAYER; + + /* Add the shortcut */ + gdata->uRef++; + glist->lpGData = gdata; + + /* Add the player to the list of players for this group */ + DPQ_INSERT( gdata->groups, glist, groups ); + + /* Send a ADDGROUPTOGROUP message */ + FIXME( "Not sending message\n" ); + + return DP_OK; +} + +static HRESULT DP_IF_CreateGroupInGroup( IDirectPlayImpl *This, void *lpMsgHdr, DPID idParentGroup, + DPID *lpidGroup, DPNAME *lpGroupName, void *lpData, DWORD dwDataSize, DWORD dwFlags, + BOOL bAnsi ) +{ + lpGroupData lpGParentData; + lpGroupList lpGList; + lpGroupData lpGData; + + TRACE( "(%p)->(0x%08x,%p,%p,%p,0x%08x,0x%08x,%u)\n", + This, idParentGroup, lpidGroup, lpGroupName, lpData, + dwDataSize, dwFlags, bAnsi ); + + if( This->dp2->connectionInitialized == NO_PROVIDER ) + { + return DPERR_UNINITIALIZED; + } + + /* Verify that the specified parent is valid */ + if( ( lpGParentData = DP_FindAnyGroup(This, idParentGroup ) ) == NULL ) + return DPERR_INVALIDGROUP; + + lpGData = DP_CreateGroup(This, lpidGroup, lpGroupName, dwFlags, idParentGroup, bAnsi ); + + if( lpGData == NULL ) + { + return DPERR_CANTADDPLAYER; /* yes player not group */ + } + + /* Something else is referencing this data */ + lpGData->uRef++; + + DP_SetGroupData( lpGData, DPSET_REMOTE, lpData, dwDataSize ); + + /* The list has now been inserted into the interface group list. We now + need to put a "shortcut" to this group in the parent group */ + lpGList = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *lpGList ) ); + if( lpGList == NULL ) + { + FIXME( "Memory leak\n" ); + return DPERR_CANTADDPLAYER; /* yes player not group */ + } + + lpGList->lpGData = lpGData; + + DPQ_INSERT( lpGParentData->groups, lpGList, groups ); + + /* Let the SP know that we've created this group */ + if( This->dp2->spData.lpCB->CreateGroup ) + { + DPSP_CREATEGROUPDATA data; + + TRACE( "Calling SP CreateGroup\n" ); + + data.idGroup = *lpidGroup; + data.dwFlags = dwFlags; + data.lpSPMessageHeader = lpMsgHdr; + data.lpISP = This->dp2->spData.lpISP; + + (*This->dp2->spData.lpCB->CreateGroup)( &data ); + } + + /* Inform all other peers of the creation of a new group. If there are + * no peers keep this quiet. + */ + if( This->dp2->lpSessionDesc && + ( This->dp2->lpSessionDesc->dwFlags & DPSESSION_MULTICASTSERVER ) ) + { + DPMSG_CREATEPLAYERORGROUP msg; + + msg.dwType = DPSYS_CREATEPLAYERORGROUP; + msg.dwPlayerType = DPPLAYERTYPE_GROUP; + msg.dpId = *lpidGroup; + msg.dwCurrentPlayers = idParentGroup; /* FIXME: Incorrect? */ + msg.lpData = lpData; + msg.dwDataSize = dwDataSize; + msg.dpnName = *lpGroupName; + + /* FIXME: Correct to just use send effectively? */ + /* FIXME: Should size include data w/ message or just message "header" */ + /* FIXME: Check return code */ + IDirectPlayX_SendEx( &This->IDirectPlay4_iface, DPID_SERVERPLAYER, DPID_ALLPLAYERS, 0, &msg, + sizeof( msg ), 0, 0, NULL, NULL ); + } + + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay3AImpl_CreateGroupInGroup( IDirectPlay3A *iface, DPID parent, + DPID *group, DPNAME *name, void *data, DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_CreateGroupInGroup( &This->IDirectPlay4A_iface, parent, group, name, + data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_CreateGroupInGroup( IDirectPlay3 *iface, DPID parent, + DPID *group, DPNAME *name, void *data, DWORD size, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_CreateGroupInGroup( &This->IDirectPlay4_iface, parent, group, name, + data, size, flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_CreateGroupInGroup( IDirectPlay4A *iface, + DPID idParentGroup, DPID *lpidGroup, DPNAME *lpGroupName, void *lpData, DWORD dwDataSize, + DWORD dwFlags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + + *lpidGroup = DPID_UNKNOWN; + + return DP_IF_CreateGroupInGroup( This, NULL, idParentGroup, lpidGroup, lpGroupName, lpData, + dwDataSize, dwFlags, TRUE ); +} + +static HRESULT WINAPI IDirectPlay4Impl_CreateGroupInGroup( IDirectPlay4 *iface, DPID idParentGroup, + DPID *lpidGroup, DPNAME *lpGroupName, void *lpData, DWORD dwDataSize, DWORD dwFlags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + + *lpidGroup = DPID_UNKNOWN; + + return DP_IF_CreateGroupInGroup( This, NULL, idParentGroup, lpidGroup, lpGroupName, lpData, + dwDataSize, dwFlags, FALSE ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_DeleteGroupFromGroup( IDirectPlay3A *iface, DPID parent, + DPID group ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_DeleteGroupFromGroup( &This->IDirectPlay4A_iface, parent, group ); +} + +static HRESULT WINAPI IDirectPlay3Impl_DeleteGroupFromGroup( IDirectPlay3 *iface, DPID parent, + DPID group ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_DeleteGroupFromGroup( &This->IDirectPlay4_iface, parent, group ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_DeleteGroupFromGroup( IDirectPlay4A *iface, DPID parent, + DPID group ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_DeleteGroupFromGroup( &This->IDirectPlay4_iface, parent, group ); +} + +static HRESULT WINAPI IDirectPlay4Impl_DeleteGroupFromGroup( IDirectPlay4 *iface, DPID parent, + DPID group ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + lpGroupList glist; + lpGroupData parentdata; + + TRACE("(%p)->(0x%08x,0x%08x)\n", This, parent, group ); + + /* Is the parent group valid? */ + if ( ( parentdata = DP_FindAnyGroup(This, parent ) ) == NULL ) + return DPERR_INVALIDGROUP; + + /* Remove the group from the parent group queue */ + DPQ_REMOVE_ENTRY( parentdata->groups, groups, lpGData->dpid, ==, group, glist ); + + if ( glist == NULL ) + return DPERR_INVALIDGROUP; + + /* Decrement the ref count */ + glist->lpGData->uRef--; + + /* Free up the list item */ + HeapFree( GetProcessHeap(), 0, glist ); + + /* Should send a DELETEGROUPFROMGROUP message */ + FIXME( "message not sent\n" ); + + return DP_OK; +} + +static BOOL DP_BuildSPCompoundAddr( LPGUID lpcSpGuid, LPVOID* lplpAddrBuf, + LPDWORD lpdwBufSize ) +{ + DPCOMPOUNDADDRESSELEMENT dpCompoundAddress; + HRESULT hr; + + dpCompoundAddress.dwDataSize = sizeof( GUID ); + dpCompoundAddress.guidDataType = DPAID_ServiceProvider; + dpCompoundAddress.lpData = lpcSpGuid; + + *lplpAddrBuf = NULL; + *lpdwBufSize = 0; + + hr = DPL_CreateCompoundAddress( &dpCompoundAddress, 1, *lplpAddrBuf, + lpdwBufSize, TRUE ); + + if( hr != DPERR_BUFFERTOOSMALL ) + { + ERR( "can't get buffer size: %s\n", DPLAYX_HresultToString( hr ) ); + return FALSE; + } + + /* Now allocate the buffer */ + *lplpAddrBuf = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, + *lpdwBufSize ); + + hr = DPL_CreateCompoundAddress( &dpCompoundAddress, 1, *lplpAddrBuf, + lpdwBufSize, TRUE ); + if( FAILED(hr) ) + { + ERR( "can't create address: %s\n", DPLAYX_HresultToString( hr ) ); + return FALSE; + } + + return TRUE; +} + +static HRESULT WINAPI IDirectPlay3AImpl_EnumConnections( IDirectPlay3A *iface, + const GUID *application, LPDPENUMCONNECTIONSCALLBACK enumcb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_EnumConnections( &This->IDirectPlay4A_iface, application, enumcb, context, + flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_EnumConnections( IDirectPlay3 *iface, + const GUID *application, LPDPENUMCONNECTIONSCALLBACK enumcb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_EnumConnections( &This->IDirectPlay4_iface, application, enumcb, context, + flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_EnumConnections( IDirectPlay4A *iface, + const GUID *lpguidApplication, LPDPENUMCONNECTIONSCALLBACK lpEnumCallback, void *lpContext, + DWORD dwFlags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + TRACE("(%p)->(%p,%p,%p,0x%08x)\n", This, lpguidApplication, lpEnumCallback, lpContext, dwFlags ); + + /* A default dwFlags (0) is backwards compatible -- DPCONNECTION_DIRECTPLAY */ + if( dwFlags == 0 ) + { + dwFlags = DPCONNECTION_DIRECTPLAY; + } + + if( ! ( ( dwFlags & DPCONNECTION_DIRECTPLAY ) || + ( dwFlags & DPCONNECTION_DIRECTPLAYLOBBY ) ) + ) + { + return DPERR_INVALIDFLAGS; + } + + if( !lpEnumCallback ) + { + return DPERR_INVALIDPARAMS; + } + + /* Enumerate DirectPlay service providers */ + if( dwFlags & DPCONNECTION_DIRECTPLAY ) + { + HKEY hkResult; + LPCSTR searchSubKey = "SOFTWARE\\Microsoft\\DirectPlay\\Service Providers"; + LPCSTR guidDataSubKey = "Guid"; + char subKeyName[51]; + DWORD dwIndex, sizeOfSubKeyName=50; + FILETIME filetime; + + /* Need to loop over the service providers in the registry */ + if( RegOpenKeyExA( HKEY_LOCAL_MACHINE, searchSubKey, + 0, KEY_READ, &hkResult ) != ERROR_SUCCESS ) + { + /* Hmmm. Does this mean that there are no service providers? */ + ERR(": no service providers?\n"); + return DP_OK; + } + + + /* Traverse all the service providers we have available */ + for( dwIndex=0; + RegEnumKeyExA( hkResult, dwIndex, subKeyName, &sizeOfSubKeyName, + NULL, NULL, NULL, &filetime ) != ERROR_NO_MORE_ITEMS; + ++dwIndex, sizeOfSubKeyName=51 ) + { + + HKEY hkServiceProvider; + GUID serviceProviderGUID; + DWORD returnTypeGUID, sizeOfReturnBuffer = 50; + char returnBuffer[51]; + WCHAR buff[51]; + DPNAME dpName; + BOOL bBuildPass; + + LPVOID lpAddressBuffer = NULL; + DWORD dwAddressBufferSize = 0; + + TRACE(" this time through: %s\n", subKeyName ); + + /* Get a handle for this particular service provider */ + if( RegOpenKeyExA( hkResult, subKeyName, 0, KEY_READ, + &hkServiceProvider ) != ERROR_SUCCESS ) + { + ERR(": what the heck is going on?\n" ); + continue; + } + + if( RegQueryValueExA( hkServiceProvider, guidDataSubKey, + NULL, &returnTypeGUID, (LPBYTE)returnBuffer, + &sizeOfReturnBuffer ) != ERROR_SUCCESS ) + { + ERR(": missing GUID registry data members\n" ); + RegCloseKey(hkServiceProvider); + continue; + } + RegCloseKey(hkServiceProvider); + + /* FIXME: Check return types to ensure we're interpreting data right */ + MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) ); + CLSIDFromString( buff, &serviceProviderGUID ); + /* FIXME: Have I got a memory leak on the serviceProviderGUID? */ + + /* Fill in the DPNAME struct for the service provider */ + dpName.dwSize = sizeof( dpName ); + dpName.dwFlags = 0; + dpName.u1.lpszShortNameA = subKeyName; + dpName.u2.lpszLongNameA = NULL; + + /* Create the compound address for the service provider. + * NOTE: This is a gruesome architectural scar right now. DP + * uses DPL and DPL uses DP. Nasty stuff. This may be why the + * native dll just gets around this little bit by allocating an + * 80 byte buffer which isn't even filled with a valid compound + * address. Oh well. Creating a proper compound address is the + * way to go anyways despite this method taking slightly more + * heap space and realtime :) */ + + bBuildPass = DP_BuildSPCompoundAddr( &serviceProviderGUID, + &lpAddressBuffer, + &dwAddressBufferSize ); + if( !bBuildPass ) + { + ERR( "Can't build compound addr\n" ); + return DPERR_GENERIC; + } + + /* The enumeration will return FALSE if we are not to continue */ + if( !lpEnumCallback( &serviceProviderGUID, lpAddressBuffer, dwAddressBufferSize, + &dpName, dwFlags, lpContext ) ) + { + return DP_OK; + } + } + } + + /* Enumerate DirectPlayLobby service providers */ + if( dwFlags & DPCONNECTION_DIRECTPLAYLOBBY ) + { + HKEY hkResult; + LPCSTR searchSubKey = "SOFTWARE\\Microsoft\\DirectPlay\\Lobby Providers"; + LPCSTR guidDataSubKey = "Guid"; + char subKeyName[51]; + DWORD dwIndex, sizeOfSubKeyName=50; + FILETIME filetime; + + /* Need to loop over the service providers in the registry */ + if( RegOpenKeyExA( HKEY_LOCAL_MACHINE, searchSubKey, + 0, KEY_READ, &hkResult ) != ERROR_SUCCESS ) + { + /* Hmmm. Does this mean that there are no service providers? */ + ERR(": no service providers?\n"); + return DP_OK; + } + + + /* Traverse all the lobby providers we have available */ + for( dwIndex=0; + RegEnumKeyExA( hkResult, dwIndex, subKeyName, &sizeOfSubKeyName, + NULL, NULL, NULL, &filetime ) != ERROR_NO_MORE_ITEMS; + ++dwIndex, sizeOfSubKeyName=51 ) + { + + HKEY hkServiceProvider; + GUID serviceProviderGUID; + DWORD returnTypeGUID, sizeOfReturnBuffer = 50; + char returnBuffer[51]; + WCHAR buff[51]; + DPNAME dpName; + HRESULT hr; + + DPCOMPOUNDADDRESSELEMENT dpCompoundAddress; + LPVOID lpAddressBuffer = NULL; + DWORD dwAddressBufferSize = 0; + + TRACE(" this time through: %s\n", subKeyName ); + + /* Get a handle for this particular service provider */ + if( RegOpenKeyExA( hkResult, subKeyName, 0, KEY_READ, + &hkServiceProvider ) != ERROR_SUCCESS ) + { + ERR(": what the heck is going on?\n" ); + continue; + } + + if( RegQueryValueExA( hkServiceProvider, guidDataSubKey, + NULL, &returnTypeGUID, (LPBYTE)returnBuffer, + &sizeOfReturnBuffer ) != ERROR_SUCCESS ) + { + ERR(": missing GUID registry data members\n" ); + RegCloseKey(hkServiceProvider); + continue; + } + RegCloseKey(hkServiceProvider); + + /* FIXME: Check return types to ensure we're interpreting data right */ + MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) ); + CLSIDFromString( buff, &serviceProviderGUID ); + /* FIXME: Have I got a memory leak on the serviceProviderGUID? */ + + /* Fill in the DPNAME struct for the service provider */ + dpName.dwSize = sizeof( dpName ); + dpName.dwFlags = 0; + dpName.u1.lpszShortNameA = subKeyName; + dpName.u2.lpszLongNameA = NULL; + + /* Create the compound address for the service provider. + NOTE: This is a gruesome architectural scar right now. DP uses DPL and DPL uses DP + nast stuff. This may be why the native dll just gets around this little bit by + allocating an 80 byte buffer which isn't even a filled with a valid compound + address. Oh well. Creating a proper compound address is the way to go anyways + despite this method taking slightly more heap space and realtime :) */ + + dpCompoundAddress.guidDataType = DPAID_LobbyProvider; + dpCompoundAddress.dwDataSize = sizeof( GUID ); + dpCompoundAddress.lpData = &serviceProviderGUID; + + if( ( hr = DPL_CreateCompoundAddress( &dpCompoundAddress, 1, lpAddressBuffer, + &dwAddressBufferSize, TRUE ) ) != DPERR_BUFFERTOOSMALL ) + { + ERR( "can't get buffer size: %s\n", DPLAYX_HresultToString( hr ) ); + return hr; + } + + /* Now allocate the buffer */ + lpAddressBuffer = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwAddressBufferSize ); + + if( ( hr = DPL_CreateCompoundAddress( &dpCompoundAddress, 1, lpAddressBuffer, + &dwAddressBufferSize, TRUE ) ) != DP_OK ) + { + ERR( "can't create address: %s\n", DPLAYX_HresultToString( hr ) ); + HeapFree( GetProcessHeap(), 0, lpAddressBuffer ); + return hr; + } + + /* The enumeration will return FALSE if we are not to continue */ + if( !lpEnumCallback( &serviceProviderGUID, lpAddressBuffer, dwAddressBufferSize, + &dpName, dwFlags, lpContext ) ) + { + HeapFree( GetProcessHeap(), 0, lpAddressBuffer ); + return DP_OK; + } + HeapFree( GetProcessHeap(), 0, lpAddressBuffer ); + } + } + + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay4Impl_EnumConnections( IDirectPlay4 *iface, + const GUID *application, LPDPENUMCONNECTIONSCALLBACK enumcb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + FIXME( "(%p)->(%p,%p,%p,0x%08x): stub\n", This, application, enumcb, context, flags ); + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay3AImpl_EnumGroupsInGroup( IDirectPlay3A *iface, DPID group, + GUID *instance, LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_EnumGroupsInGroup( &This->IDirectPlay4A_iface, group, instance, + enumplayercb, context, flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_EnumGroupsInGroup( IDirectPlay3 *iface, DPID group, + GUID *instance, LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_EnumGroupsInGroup( &This->IDirectPlay4_iface, group, instance, + enumplayercb, context, flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_EnumGroupsInGroup( IDirectPlay4A *iface, DPID group, + GUID *instance, LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_EnumGroupsInGroup( &This->IDirectPlay4_iface, group, instance, + enumplayercb, context, flags ); +} + +static HRESULT WINAPI IDirectPlay4Impl_EnumGroupsInGroup( IDirectPlay4 *iface, DPID group, + GUID *instance, LPDPENUMPLAYERSCALLBACK2 enumplayercb, void *context, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + lpGroupList glist; + lpGroupData gdata; + + FIXME( "(%p)->(0x%08x,%p,%p,%p,0x%08x): semi stub\n", This, group, instance, enumplayercb, + context, flags ); + + if ( This->dp2->connectionInitialized == NO_PROVIDER ) + return DPERR_UNINITIALIZED; + + if ( ( gdata = DP_FindAnyGroup(This, group ) ) == NULL ) + return DPERR_INVALIDGROUP; + + if ( DPQ_IS_EMPTY( gdata->groups ) ) + return DP_OK; + + + for( glist = DPQ_FIRST( gdata->groups ); ; glist = DPQ_NEXT( glist->groups ) ) + { + /* FIXME: Should check flags for match here */ + if ( !(*enumplayercb)( glist->lpGData->dpid, DPPLAYERTYPE_GROUP, &glist->lpGData->name, + flags, context ) ) + return DP_OK; /* User requested break */ + + if ( DPQ_IS_ENDOFLIST( glist->groups ) ) + break; + } + + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay3AImpl_GetGroupConnectionSettings( IDirectPlay3A *iface, + DWORD flags, DPID group, void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_GetGroupConnectionSettings( &This->IDirectPlay4A_iface, flags, group, + data, size ); +} + +static HRESULT WINAPI IDirectPlay3Impl_GetGroupConnectionSettings( IDirectPlay3 *iface, + DWORD flags, DPID group, void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_GetGroupConnectionSettings( &This->IDirectPlay4_iface, flags, group, + data, size ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_GetGroupConnectionSettings( IDirectPlay4A *iface, + DWORD flags, DPID group, void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + FIXME("(%p)->(0x%08x,0x%08x,%p,%p): stub\n", This, flags, group, data, size ); + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay4Impl_GetGroupConnectionSettings( IDirectPlay4 *iface, DWORD flags, + DPID group, void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + FIXME( "(%p)->(0x%08x,0x%08x,%p,%p): stub\n", This, flags, group, data, size ); + return DP_OK; +} + +static BOOL CALLBACK DP_GetSpLpGuidFromCompoundAddress( + REFGUID guidDataType, + DWORD dwDataSize, + LPCVOID lpData, + LPVOID lpContext ) +{ + /* Looking for the GUID of the provider to load */ + if( ( IsEqualGUID( guidDataType, &DPAID_ServiceProvider ) ) || + ( IsEqualGUID( guidDataType, &DPAID_LobbyProvider ) ) + ) + { + TRACE( "Found SP/LP (%s) %s (data size = 0x%08x)\n", + debugstr_guid( guidDataType ), debugstr_guid( lpData ), dwDataSize ); + + if( dwDataSize != sizeof( GUID ) ) + { + ERR( "Invalid sp/lp guid size 0x%08x\n", dwDataSize ); + } + + memcpy( lpContext, lpData, dwDataSize ); + + /* There shouldn't be more than 1 GUID/compound address */ + return FALSE; + } + + /* Still waiting for what we want */ + return TRUE; +} + + +/* Find and perform a LoadLibrary on the requested SP or LP GUID */ +static HMODULE DP_LoadSP( LPCGUID lpcGuid, LPSPINITDATA lpSpData, LPBOOL lpbIsDpSp ) +{ + UINT i; + LPCSTR spSubKey = "SOFTWARE\\Microsoft\\DirectPlay\\Service Providers"; + LPCSTR lpSubKey = "SOFTWARE\\Microsoft\\DirectPlay\\Lobby Providers"; + LPCSTR guidDataSubKey = "Guid"; + LPCSTR majVerDataSubKey = "dwReserved1"; + LPCSTR minVerDataSubKey = "dwReserved2"; + LPCSTR pathSubKey = "Path"; + + TRACE( " request to load %s\n", debugstr_guid( lpcGuid ) ); + + /* FIXME: Cloned code with a quick hack. */ + for( i=0; i<2; i++ ) + { + HKEY hkResult; + LPCSTR searchSubKey; + char subKeyName[51]; + DWORD dwIndex, sizeOfSubKeyName=50; + FILETIME filetime; + + (i == 0) ? (searchSubKey = spSubKey ) : (searchSubKey = lpSubKey ); + *lpbIsDpSp = (i == 0) ? TRUE : FALSE; + + + /* Need to loop over the service providers in the registry */ + if( RegOpenKeyExA( HKEY_LOCAL_MACHINE, searchSubKey, + 0, KEY_READ, &hkResult ) != ERROR_SUCCESS ) + { + /* Hmmm. Does this mean that there are no service providers? */ + ERR(": no service providers?\n"); + return 0; + } + + /* Traverse all the service providers we have available */ + for( dwIndex=0; + RegEnumKeyExA( hkResult, dwIndex, subKeyName, &sizeOfSubKeyName, + NULL, NULL, NULL, &filetime ) != ERROR_NO_MORE_ITEMS; + ++dwIndex, sizeOfSubKeyName=51 ) + { + + HKEY hkServiceProvider; + GUID serviceProviderGUID; + DWORD returnType, sizeOfReturnBuffer = 255; + char returnBuffer[256]; + WCHAR buff[51]; + DWORD dwTemp, len; + + TRACE(" this time through: %s\n", subKeyName ); + + /* Get a handle for this particular service provider */ + if( RegOpenKeyExA( hkResult, subKeyName, 0, KEY_READ, + &hkServiceProvider ) != ERROR_SUCCESS ) + { + ERR(": what the heck is going on?\n" ); + continue; + } + + if( RegQueryValueExA( hkServiceProvider, guidDataSubKey, + NULL, &returnType, (LPBYTE)returnBuffer, + &sizeOfReturnBuffer ) != ERROR_SUCCESS ) + { + ERR(": missing GUID registry data members\n" ); + continue; + } + + /* FIXME: Check return types to ensure we're interpreting data right */ + MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) ); + CLSIDFromString( buff, &serviceProviderGUID ); + /* FIXME: Have I got a memory leak on the serviceProviderGUID? */ + + /* Determine if this is the Service Provider that the user asked for */ + if( !IsEqualGUID( &serviceProviderGUID, lpcGuid ) ) + { + continue; + } + + if( i == 0 ) /* DP SP */ + { + len = MultiByteToWideChar( CP_ACP, 0, subKeyName, -1, NULL, 0 ); + lpSpData->lpszName = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) ); + MultiByteToWideChar( CP_ACP, 0, subKeyName, -1, lpSpData->lpszName, len ); + } + + sizeOfReturnBuffer = 255; + + /* Get dwReserved1 */ + if( RegQueryValueExA( hkServiceProvider, majVerDataSubKey, + NULL, &returnType, (LPBYTE)returnBuffer, + &sizeOfReturnBuffer ) != ERROR_SUCCESS ) + { + ERR(": missing dwReserved1 registry data members\n") ; + continue; + } + + if( i == 0 ) + memcpy( &lpSpData->dwReserved1, returnBuffer, sizeof(lpSpData->dwReserved1) ); + + sizeOfReturnBuffer = 255; + + /* Get dwReserved2 */ + if( RegQueryValueExA( hkServiceProvider, minVerDataSubKey, + NULL, &returnType, (LPBYTE)returnBuffer, + &sizeOfReturnBuffer ) != ERROR_SUCCESS ) + { + ERR(": missing dwReserved1 registry data members\n") ; + continue; + } + + if( i == 0 ) + memcpy( &lpSpData->dwReserved2, returnBuffer, sizeof(lpSpData->dwReserved2) ); + + sizeOfReturnBuffer = 255; + + /* Get the path for this service provider */ + if( ( dwTemp = RegQueryValueExA( hkServiceProvider, pathSubKey, + NULL, NULL, (LPBYTE)returnBuffer, + &sizeOfReturnBuffer ) ) != ERROR_SUCCESS ) + { + ERR(": missing PATH registry data members: 0x%08x\n", dwTemp ); + continue; + } + + TRACE( "Loading %s\n", returnBuffer ); + return LoadLibraryA( returnBuffer ); + } + } + + return 0; +} + +static HRESULT DP_InitializeDPSP( IDirectPlayImpl *This, HMODULE hServiceProvider ) +{ + HRESULT hr; + LPDPSP_SPINIT SPInit; + + /* Initialize the service provider by calling SPInit */ + SPInit = (LPDPSP_SPINIT)GetProcAddress( hServiceProvider, "SPInit" ); + + if( SPInit == NULL ) + { + ERR( "Service provider doesn't provide SPInit interface?\n" ); + FreeLibrary( hServiceProvider ); + return DPERR_UNAVAILABLE; + } + + TRACE( "Calling SPInit (DP SP entry point)\n" ); + + hr = (*SPInit)( &This->dp2->spData ); + + if( FAILED(hr) ) + { + ERR( "DP SP Initialization failed: %s\n", DPLAYX_HresultToString(hr) ); + FreeLibrary( hServiceProvider ); + return hr; + } + + /* FIXME: Need to verify the sanity of the returned callback table + * using IsBadCodePtr */ + This->dp2->bSPInitialized = TRUE; + + /* This interface is now initialized as a DP object */ + This->dp2->connectionInitialized = DP_SERVICE_PROVIDER; + + /* Store the handle of the module so that we can unload it later */ + This->dp2->hServiceProvider = hServiceProvider; + + return hr; +} + +static HRESULT DP_InitializeDPLSP( IDirectPlayImpl *This, HMODULE hLobbyProvider ) +{ + HRESULT hr; + LPSP_INIT DPLSPInit; + + /* Initialize the service provider by calling SPInit */ + DPLSPInit = (LPSP_INIT)GetProcAddress( hLobbyProvider, "DPLSPInit" ); + + if( DPLSPInit == NULL ) + { + ERR( "Service provider doesn't provide DPLSPInit interface?\n" ); + FreeLibrary( hLobbyProvider ); + return DPERR_UNAVAILABLE; + } + + TRACE( "Calling DPLSPInit (DPL SP entry point)\n" ); + + hr = (*DPLSPInit)( &This->dp2->dplspData ); + + if( FAILED(hr) ) + { + ERR( "DPL SP Initialization failed: %s\n", DPLAYX_HresultToString(hr) ); + FreeLibrary( hLobbyProvider ); + return hr; + } + + /* FIXME: Need to verify the sanity of the returned callback table + * using IsBadCodePtr */ + + This->dp2->bDPLSPInitialized = TRUE; + + /* This interface is now initialized as a lobby object */ + This->dp2->connectionInitialized = DP_LOBBY_PROVIDER; + + /* Store the handle of the module so that we can unload it later */ + This->dp2->hDPLobbyProvider = hLobbyProvider; + + return hr; +} + +static HRESULT WINAPI IDirectPlay3AImpl_InitializeConnection( IDirectPlay3A *iface, + void *connection, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_InitializeConnection( &This->IDirectPlay4A_iface, connection, flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_InitializeConnection( IDirectPlay3 *iface, + void *connection, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_InitializeConnection( &This->IDirectPlay4_iface, connection, flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_InitializeConnection( IDirectPlay4A *iface, + void *connection, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_InitializeConnection( &This->IDirectPlay4_iface, connection, flags ); +} + +static HRESULT WINAPI IDirectPlay4Impl_InitializeConnection( IDirectPlay4 *iface, + void *connection, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + HMODULE servprov; + GUID sp; + const DWORD size = 80; /* FIXME: Need to calculate it correctly */ + BOOL is_dp_sp; /* TRUE if Direct Play SP, FALSE if Direct Play Lobby SP */ + HRESULT hr; + + TRACE( "(%p)->(%p,0x%08x)\n", This, connection, flags ); + + if ( !connection ) + return DPERR_INVALIDPARAMS; + + if ( flags ) + return DPERR_INVALIDFLAGS; + + if ( This->dp2->connectionInitialized != NO_PROVIDER ) + return DPERR_ALREADYINITIALIZED; + + /* Find out what the requested SP is and how large this buffer is */ + hr = DPL_EnumAddress( DP_GetSpLpGuidFromCompoundAddress, connection, size, &sp ); + + if ( FAILED(hr) ) + { + ERR( "Invalid compound address?\n" ); + return DPERR_UNAVAILABLE; + } + + /* Load the service provider */ + servprov = DP_LoadSP( &sp, &This->dp2->spData, &is_dp_sp ); + + if ( !servprov ) + { + ERR( "Unable to load service provider %s\n", debugstr_guid(&sp) ); + return DPERR_UNAVAILABLE; + } + + if ( is_dp_sp ) + { + /* Fill in what we can of the Service Provider required information. + * The rest was be done in DP_LoadSP + */ + This->dp2->spData.lpAddress = connection; + This->dp2->spData.dwAddressSize = size; + This->dp2->spData.lpGuid = &sp; + hr = DP_InitializeDPSP( This, servprov ); + } + else + { + This->dp2->dplspData.lpAddress = connection; + hr = DP_InitializeDPLSP( This, servprov ); + } + + if ( FAILED(hr) ) + return hr; + + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay3AImpl_SecureOpen( IDirectPlay3A *iface, + const DPSESSIONDESC2 *sdesc, DWORD flags, const DPSECURITYDESC *security, + const DPCREDENTIALS *credentials ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_SecureOpen( &This->IDirectPlay4A_iface, sdesc, flags, security, + credentials ); +} + +static HRESULT WINAPI IDirectPlay3Impl_SecureOpen( IDirectPlay3 *iface, + const DPSESSIONDESC2 *sdesc, DWORD flags, const DPSECURITYDESC *security, + const DPCREDENTIALS *credentials ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_SecureOpen( &This->IDirectPlay4_iface, sdesc, flags, security, + credentials ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_SecureOpen( IDirectPlay4A *iface, + const DPSESSIONDESC2 *lpsd, DWORD dwFlags, const DPSECURITYDESC *lpSecurity, + const DPCREDENTIALS *lpCredentials ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return DP_SecureOpen( This, lpsd, dwFlags, lpSecurity, lpCredentials, TRUE ); +} + +static HRESULT WINAPI IDirectPlay4Impl_SecureOpen( IDirectPlay4 *iface, + const DPSESSIONDESC2 *lpsd, DWORD dwFlags, const DPSECURITYDESC *lpSecurity, + const DPCREDENTIALS *lpCredentials ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + return DP_SecureOpen( This, lpsd, dwFlags, lpSecurity, lpCredentials, FALSE ); +} + +static HRESULT WINAPI IDirectPlay3AImpl_SendChatMessage( IDirectPlay3A *iface, DPID from, DPID to, + DWORD flags, DPCHAT *chatmsg ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_SendChatMessage( &This->IDirectPlay4A_iface, from, to, flags, chatmsg ); +} + +static HRESULT WINAPI IDirectPlay3Impl_SendChatMessage( IDirectPlay3 *iface, DPID from, DPID to, + DWORD flags, DPCHAT *chatmsg ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_SendChatMessage( &This->IDirectPlay4_iface, from, to, flags, chatmsg ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_SendChatMessage( IDirectPlay4A *iface, DPID from, + DPID to, DWORD flags, DPCHAT *chatmsg ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + FIXME("(%p)->(0x%08x,0x%08x,0x%08x,%p): stub\n", This, from, to, flags, chatmsg ); + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay4Impl_SendChatMessage( IDirectPlay4 *iface, DPID from, DPID to, + DWORD flags, DPCHAT *chatmsg ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + FIXME( "(%p)->(0x%08x,0x%08x,0x%08x,%p): stub\n", This, from, to, flags, chatmsg ); + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay3AImpl_SetGroupConnectionSettings( IDirectPlay3A *iface, + DWORD flags, DPID group, DPLCONNECTION *connection ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_SetGroupConnectionSettings( &This->IDirectPlay4A_iface, flags, group, + connection ); +} + +static HRESULT WINAPI IDirectPlay3Impl_SetGroupConnectionSettings( IDirectPlay3 *iface, + DWORD flags, DPID group, DPLCONNECTION *connection ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_SetGroupConnectionSettings( &This->IDirectPlay4_iface, flags, group, + connection ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_SetGroupConnectionSettings( IDirectPlay4A *iface, + DWORD flags, DPID group, DPLCONNECTION *connection ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + FIXME("(%p)->(0x%08x,0x%08x,%p): stub\n", This, flags, group, connection ); + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay4Impl_SetGroupConnectionSettings( IDirectPlay4 *iface, DWORD flags, + DPID group, DPLCONNECTION *connection ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + FIXME( "(%p)->(0x%08x,0x%08x,%p): stub\n", This, flags, group, connection ); + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay3AImpl_StartSession( IDirectPlay3A *iface, DWORD flags, + DPID group ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_StartSession( &This->IDirectPlay4A_iface, flags, group ); +} + +static HRESULT WINAPI IDirectPlay3Impl_StartSession( IDirectPlay3 *iface, DWORD flags, + DPID group ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_StartSession( &This->IDirectPlay4_iface, flags, group ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_StartSession( IDirectPlay4A *iface, DWORD flags, + DPID group ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_StartSession( &This->IDirectPlay4_iface, flags, group ); +} + +static HRESULT WINAPI IDirectPlay4Impl_StartSession( IDirectPlay4 *iface, DWORD flags, DPID group ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + FIXME( "(%p)->(0x%08x,0x%08x): stub\n", This, flags, group ); + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay3AImpl_GetGroupFlags( IDirectPlay3A *iface, DPID group, + DWORD *flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_GetGroupFlags( &This->IDirectPlay4A_iface, group, flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_GetGroupFlags( IDirectPlay3 *iface, DPID group, + DWORD *flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_GetGroupFlags( &This->IDirectPlay4_iface, group, flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_GetGroupFlags( IDirectPlay4A *iface, DPID group, + DWORD *flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_GetGroupFlags( &This->IDirectPlay4_iface, group, flags ); +} + +static HRESULT WINAPI IDirectPlay4Impl_GetGroupFlags( IDirectPlay4 *iface, DPID group, + DWORD *flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + FIXME( "(%p)->(0x%08x,%p): stub\n", This, group, flags ); + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay3AImpl_GetGroupParent( IDirectPlay3A *iface, DPID group, + DPID *parent ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_GetGroupParent( &This->IDirectPlay4A_iface, group, parent ); +} + +static HRESULT WINAPI IDirectPlay3Impl_GetGroupParent( IDirectPlay3 *iface, DPID group, + DPID *parent ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_GetGroupParent( &This->IDirectPlay4_iface, group, parent ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_GetGroupParent( IDirectPlay4A *iface, DPID group, + DPID *parent ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_GetGroupParent( &This->IDirectPlay4_iface, group, parent ); +} + +static HRESULT WINAPI IDirectPlay4Impl_GetGroupParent( IDirectPlay4 *iface, DPID group, + DPID *parent ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + lpGroupData gdata; + + TRACE( "(%p)->(0x%08x,%p)\n", This, group, parent ); + + if ( ( gdata = DP_FindAnyGroup( This, group ) ) == NULL ) + return DPERR_INVALIDGROUP; + + *parent = gdata->dpid; + + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay3AImpl_GetPlayerAccount( IDirectPlay3A *iface, DPID player, + DWORD flags, void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_GetPlayerAccount( &This->IDirectPlay4A_iface, player, flags, data, size ); +} + +static HRESULT WINAPI IDirectPlay3Impl_GetPlayerAccount( IDirectPlay3 *iface, DPID player, + DWORD flags, void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_GetPlayerAccount( &This->IDirectPlay4_iface, player, flags, data, size ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_GetPlayerAccount( IDirectPlay4A *iface, DPID player, + DWORD flags, void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + FIXME("(%p)->(0x%08x,0x%08x,%p,%p): stub\n", This, player, flags, data, size ); + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay4Impl_GetPlayerAccount( IDirectPlay4 *iface, DPID player, + DWORD flags, void *data, DWORD *size ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + FIXME( "(%p)->(0x%08x,0x%08x,%p,%p): stub\n", This, player, flags, data, size ); + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay3AImpl_GetPlayerFlags( IDirectPlay3A *iface, DPID player, + DWORD *flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3A( iface ); + return IDirectPlayX_GetPlayerFlags( &This->IDirectPlay4A_iface, player, flags ); +} + +static HRESULT WINAPI IDirectPlay3Impl_GetPlayerFlags( IDirectPlay3 *iface, DPID player, + DWORD *flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay3( iface ); + return IDirectPlayX_GetPlayerFlags( &This->IDirectPlay4_iface, player, flags ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_GetPlayerFlags( IDirectPlay4A *iface, DPID player, + DWORD *flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_GetPlayerFlags( &This->IDirectPlay4_iface, player, flags ); +} + +static HRESULT WINAPI IDirectPlay4Impl_GetPlayerFlags( IDirectPlay4 *iface, DPID player, + DWORD *flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + FIXME( "(%p)->(0x%08x,%p): stub\n", This, player, flags ); + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay4AImpl_GetGroupOwner( IDirectPlay4A *iface, DPID group, + DPID *owner ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_GetGroupOwner( &This->IDirectPlay4_iface, group, owner ); +} + +static HRESULT WINAPI IDirectPlay4Impl_GetGroupOwner( IDirectPlay4 *iface, DPID group, + DPID *owner ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + FIXME( "(%p)->(0x%08x,%p): stub\n", This, group, owner ); + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay4AImpl_SetGroupOwner( IDirectPlay4A *iface, DPID group, + DPID owner ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_SetGroupOwner( &This->IDirectPlay4_iface, group, owner ); +} + +static HRESULT WINAPI IDirectPlay4Impl_SetGroupOwner( IDirectPlay4 *iface, DPID group , + DPID owner ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + FIXME( "(%p)->(0x%08x,0x%08x): stub\n", This, group, owner ); + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay4AImpl_SendEx( IDirectPlay4A *iface, DPID from, DPID to, + DWORD flags, void *data, DWORD size, DWORD priority, DWORD timeout, void *context, + DWORD *msgid ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_SendEx( &This->IDirectPlay4_iface, from, to, flags, data, size, priority, + timeout, context, msgid ); +} + +static HRESULT WINAPI IDirectPlay4Impl_SendEx( IDirectPlay4 *iface, DPID from, DPID to, + DWORD flags, void *data, DWORD size, DWORD priority, DWORD timeout, void *context, + DWORD *msgid ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + + FIXME( "(%p)->(0x%08x,0x%08x,0x%08x,%p,0x%08x,0x%08x,0x%08x,%p,%p): semi-stub\n", + This, from, to, flags, data, size, priority, timeout, context, msgid ); + + if ( This->dp2->connectionInitialized == NO_PROVIDER ) + return DPERR_UNINITIALIZED; + + /* FIXME: Add parameter checking */ + /* FIXME: First call to this needs to acquire a message id which will be + * used for multiple sends + */ + + /* NOTE: Can't send messages to yourself - this will be trapped in receive */ + + /* Verify that the message is being sent from a valid local player. The + * from player may be anonymous DPID_UNKNOWN + */ + if ( from != DPID_UNKNOWN && !DP_FindPlayer( This, from ) ) + { + WARN( "INFO: Invalid from player 0x%08x\n", from ); + return DPERR_INVALIDPLAYER; + } + + /* Verify that the message is being sent to a valid player, group or to + * everyone. If it's valid, send it to those players. + */ + if ( to == DPID_ALLPLAYERS ) + { + /* See if SP has the ability to multicast. If so, use it */ + if ( This->dp2->spData.lpCB->SendToGroupEx ) + FIXME( "Use group sendex to group 0\n" ); + else if ( This->dp2->spData.lpCB->SendToGroup ) /* obsolete interface */ + FIXME( "Use obsolete group send to group 0\n" ); + else /* No multicast, multiplicate */ + FIXME( "Send to all players using EnumPlayersInGroup\n" ); + } + else if ( DP_FindPlayer( This, to ) ) + { + /* Have the service provider send this message */ + /* FIXME: Could optimize for local interface sends */ + return DP_SP_SendEx( This, flags, data, size, priority, timeout, context, msgid ); + } + else if ( DP_FindAnyGroup( This, to ) ) + { + /* See if SP has the ability to multicast. If so, use it */ + if ( This->dp2->spData.lpCB->SendToGroupEx ) + FIXME( "Use group sendex\n" ); + else if ( This->dp2->spData.lpCB->SendToGroup ) /* obsolete interface */ + FIXME( "Use obsolete group send to group\n" ); + else /* No multicast, multiplicate */ + FIXME( "Send to all players using EnumPlayersInGroup\n" ); + + } + else + return DPERR_INVALIDPLAYER; + + /* FIXME: Should return what the send returned */ + return DP_OK; +} + +static HRESULT DP_SP_SendEx( IDirectPlayImpl *This, DWORD dwFlags, void *lpData, DWORD dwDataSize, + DWORD dwPriority, DWORD dwTimeout, void *lpContext, DWORD *lpdwMsgID ) +{ + LPDPMSG lpMElem; + + FIXME( ": stub\n" ); + + /* FIXME: This queuing should only be for async messages */ + + lpMElem = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *lpMElem ) ); + lpMElem->msg = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwDataSize ); + + CopyMemory( lpMElem->msg, lpData, dwDataSize ); + + /* FIXME: Need to queue based on priority */ + DPQ_INSERT( This->dp2->sendMsgs, lpMElem, msgs ); + + return DP_OK; +} + +static HRESULT WINAPI IDirectPlay4AImpl_GetMessageQueue( IDirectPlay4A *iface, DPID from, DPID to, + DWORD flags, DWORD *msgs, DWORD *bytes ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_GetMessageQueue( &This->IDirectPlay4_iface, from, to, flags, msgs, bytes ); +} + +static HRESULT WINAPI IDirectPlay4Impl_GetMessageQueue( IDirectPlay4 *iface, DPID from, DPID to, + DWORD flags, DWORD *msgs, DWORD *bytes ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + HRESULT hr = DP_OK; + + FIXME( "(%p)->(0x%08x,0x%08x,0x%08x,%p,%p): semi-stub\n", This, from, to, flags, msgs, bytes ); + + /* FIXME: Do we need to do from and to sanity checking here? */ + /* FIXME: What about sends which are not immediate? */ + + if ( This->dp2->spData.lpCB->GetMessageQueue ) + { + DPSP_GETMESSAGEQUEUEDATA data; + + FIXME( "Calling SP GetMessageQueue - is it right?\n" ); + + /* FIXME: None of this is documented :( */ + data.lpISP = This->dp2->spData.lpISP; + data.dwFlags = flags; + data.idFrom = from; + data.idTo = to; + data.lpdwNumMsgs = msgs; + data.lpdwNumBytes = bytes; + + hr = (*This->dp2->spData.lpCB->GetMessageQueue)( &data ); + } + else + FIXME( "No SP for GetMessageQueue - fake some data\n" ); + + return hr; +} + +static HRESULT dplay_cancelmsg ( IDirectPlayImpl* This, DWORD msgid, DWORD flags, DWORD minprio, + DWORD maxprio ) +{ + HRESULT hr = DP_OK; + + FIXME( "(%p)->(0x%08x,0x%08x): semi stub\n", This, msgid, flags ); + + if ( This->dp2->spData.lpCB->Cancel ) + { + DPSP_CANCELDATA data; + + TRACE( "Calling SP Cancel\n" ); + + /* FIXME: Undocumented callback */ + + data.lpISP = This->dp2->spData.lpISP; + data.dwFlags = flags; + data.lprglpvSPMsgID = NULL; + data.cSPMsgID = msgid; + data.dwMinPriority = minprio; + data.dwMaxPriority = maxprio; + + hr = (*This->dp2->spData.lpCB->Cancel)( &data ); + } + else + FIXME( "SP doesn't implement Cancel\n" ); + + return hr; +} + +static HRESULT WINAPI IDirectPlay4AImpl_CancelMessage( IDirectPlay4A *iface, DWORD msgid, + DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_CancelMessage( &This->IDirectPlay4_iface, msgid, flags ); +} + +static HRESULT WINAPI IDirectPlay4Impl_CancelMessage( IDirectPlay4 *iface, DWORD msgid, + DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + + if ( flags != 0 ) + return DPERR_INVALIDFLAGS; + + if ( msgid == 0 ) + flags |= DPCANCELSEND_ALL; + + return dplay_cancelmsg( This, msgid, flags, 0, 0 ); +} + +static HRESULT WINAPI IDirectPlay4AImpl_CancelPriority( IDirectPlay4A *iface, DWORD minprio, + DWORD maxprio, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4A( iface ); + return IDirectPlayX_CancelPriority( &This->IDirectPlay4_iface, minprio, maxprio, flags ); +} + +static HRESULT WINAPI IDirectPlay4Impl_CancelPriority( IDirectPlay4 *iface, DWORD minprio, + DWORD maxprio, DWORD flags ) +{ + IDirectPlayImpl *This = impl_from_IDirectPlay4( iface ); + + if ( flags != 0 ) + return DPERR_INVALIDFLAGS; + + return dplay_cancelmsg( This, 0, DPCANCELSEND_PRIORITY, minprio, maxprio ); +} + +static const IDirectPlay2Vtbl dp2_vt = +{ + IDirectPlay2Impl_QueryInterface, + IDirectPlay2Impl_AddRef, + IDirectPlay2Impl_Release, + IDirectPlay2Impl_AddPlayerToGroup, + IDirectPlay2Impl_Close, + IDirectPlay2Impl_CreateGroup, + IDirectPlay2Impl_CreatePlayer, + IDirectPlay2Impl_DeletePlayerFromGroup, + IDirectPlay2Impl_DestroyGroup, + IDirectPlay2Impl_DestroyPlayer, + IDirectPlay2Impl_EnumGroupPlayers, + IDirectPlay2Impl_EnumGroups, + IDirectPlay2Impl_EnumPlayers, + IDirectPlay2Impl_EnumSessions, + IDirectPlay2Impl_GetCaps, + IDirectPlay2Impl_GetGroupData, + IDirectPlay2Impl_GetGroupName, + IDirectPlay2Impl_GetMessageCount, + IDirectPlay2Impl_GetPlayerAddress, + IDirectPlay2Impl_GetPlayerCaps, + IDirectPlay2Impl_GetPlayerData, + IDirectPlay2Impl_GetPlayerName, + IDirectPlay2Impl_GetSessionDesc, + IDirectPlay2Impl_Initialize, + IDirectPlay2Impl_Open, + IDirectPlay2Impl_Receive, + IDirectPlay2Impl_Send, + IDirectPlay2Impl_SetGroupData, + IDirectPlay2Impl_SetGroupName, + IDirectPlay2Impl_SetPlayerData, + IDirectPlay2Impl_SetPlayerName, + IDirectPlay2Impl_SetSessionDesc +}; + +static const IDirectPlay2Vtbl dp2A_vt = +{ + IDirectPlay2AImpl_QueryInterface, + IDirectPlay2AImpl_AddRef, + IDirectPlay2AImpl_Release, + IDirectPlay2AImpl_AddPlayerToGroup, + IDirectPlay2AImpl_Close, + IDirectPlay2AImpl_CreateGroup, + IDirectPlay2AImpl_CreatePlayer, + IDirectPlay2AImpl_DeletePlayerFromGroup, + IDirectPlay2AImpl_DestroyGroup, + IDirectPlay2AImpl_DestroyPlayer, + IDirectPlay2AImpl_EnumGroupPlayers, + IDirectPlay2AImpl_EnumGroups, + IDirectPlay2AImpl_EnumPlayers, + IDirectPlay2AImpl_EnumSessions, + IDirectPlay2AImpl_GetCaps, + IDirectPlay2AImpl_GetGroupData, + IDirectPlay2AImpl_GetGroupName, + IDirectPlay2AImpl_GetMessageCount, + IDirectPlay2AImpl_GetPlayerAddress, + IDirectPlay2AImpl_GetPlayerCaps, + IDirectPlay2AImpl_GetPlayerData, + IDirectPlay2AImpl_GetPlayerName, + IDirectPlay2AImpl_GetSessionDesc, + IDirectPlay2AImpl_Initialize, + IDirectPlay2AImpl_Open, + IDirectPlay2AImpl_Receive, + IDirectPlay2AImpl_Send, + IDirectPlay2AImpl_SetGroupData, + IDirectPlay2AImpl_SetGroupName, + IDirectPlay2AImpl_SetPlayerData, + IDirectPlay2AImpl_SetPlayerName, + IDirectPlay2AImpl_SetSessionDesc +}; + +static const IDirectPlay3Vtbl dp3_vt = +{ + IDirectPlay3Impl_QueryInterface, + IDirectPlay3Impl_AddRef, + IDirectPlay3Impl_Release, + IDirectPlay3Impl_AddPlayerToGroup, + IDirectPlay3Impl_Close, + IDirectPlay3Impl_CreateGroup, + IDirectPlay3Impl_CreatePlayer, + IDirectPlay3Impl_DeletePlayerFromGroup, + IDirectPlay3Impl_DestroyGroup, + IDirectPlay3Impl_DestroyPlayer, + IDirectPlay3Impl_EnumGroupPlayers, + IDirectPlay3Impl_EnumGroups, + IDirectPlay3Impl_EnumPlayers, + IDirectPlay3Impl_EnumSessions, + IDirectPlay3Impl_GetCaps, + IDirectPlay3Impl_GetGroupData, + IDirectPlay3Impl_GetGroupName, + IDirectPlay3Impl_GetMessageCount, + IDirectPlay3Impl_GetPlayerAddress, + IDirectPlay3Impl_GetPlayerCaps, + IDirectPlay3Impl_GetPlayerData, + IDirectPlay3Impl_GetPlayerName, + IDirectPlay3Impl_GetSessionDesc, + IDirectPlay3Impl_Initialize, + IDirectPlay3Impl_Open, + IDirectPlay3Impl_Receive, + IDirectPlay3Impl_Send, + IDirectPlay3Impl_SetGroupData, + IDirectPlay3Impl_SetGroupName, + IDirectPlay3Impl_SetPlayerData, + IDirectPlay3Impl_SetPlayerName, + IDirectPlay3Impl_SetSessionDesc, + IDirectPlay3Impl_AddGroupToGroup, + IDirectPlay3Impl_CreateGroupInGroup, + IDirectPlay3Impl_DeleteGroupFromGroup, + IDirectPlay3Impl_EnumConnections, + IDirectPlay3Impl_EnumGroupsInGroup, + IDirectPlay3Impl_GetGroupConnectionSettings, + IDirectPlay3Impl_InitializeConnection, + IDirectPlay3Impl_SecureOpen, + IDirectPlay3Impl_SendChatMessage, + IDirectPlay3Impl_SetGroupConnectionSettings, + IDirectPlay3Impl_StartSession, + IDirectPlay3Impl_GetGroupFlags, + IDirectPlay3Impl_GetGroupParent, + IDirectPlay3Impl_GetPlayerAccount, + IDirectPlay3Impl_GetPlayerFlags +}; + +static const IDirectPlay3Vtbl dp3A_vt = +{ + IDirectPlay3AImpl_QueryInterface, + IDirectPlay3AImpl_AddRef, + IDirectPlay3AImpl_Release, + IDirectPlay3AImpl_AddPlayerToGroup, + IDirectPlay3AImpl_Close, + IDirectPlay3AImpl_CreateGroup, + IDirectPlay3AImpl_CreatePlayer, + IDirectPlay3AImpl_DeletePlayerFromGroup, + IDirectPlay3AImpl_DestroyGroup, + IDirectPlay3AImpl_DestroyPlayer, + IDirectPlay3AImpl_EnumGroupPlayers, + IDirectPlay3AImpl_EnumGroups, + IDirectPlay3AImpl_EnumPlayers, + IDirectPlay3AImpl_EnumSessions, + IDirectPlay3AImpl_GetCaps, + IDirectPlay3AImpl_GetGroupData, + IDirectPlay3AImpl_GetGroupName, + IDirectPlay3AImpl_GetMessageCount, + IDirectPlay3AImpl_GetPlayerAddress, + IDirectPlay3AImpl_GetPlayerCaps, + IDirectPlay3AImpl_GetPlayerData, + IDirectPlay3AImpl_GetPlayerName, + IDirectPlay3AImpl_GetSessionDesc, + IDirectPlay3AImpl_Initialize, + IDirectPlay3AImpl_Open, + IDirectPlay3AImpl_Receive, + IDirectPlay3AImpl_Send, + IDirectPlay3AImpl_SetGroupData, + IDirectPlay3AImpl_SetGroupName, + IDirectPlay3AImpl_SetPlayerData, + IDirectPlay3AImpl_SetPlayerName, + IDirectPlay3AImpl_SetSessionDesc, + IDirectPlay3AImpl_AddGroupToGroup, + IDirectPlay3AImpl_CreateGroupInGroup, + IDirectPlay3AImpl_DeleteGroupFromGroup, + IDirectPlay3AImpl_EnumConnections, + IDirectPlay3AImpl_EnumGroupsInGroup, + IDirectPlay3AImpl_GetGroupConnectionSettings, + IDirectPlay3AImpl_InitializeConnection, + IDirectPlay3AImpl_SecureOpen, + IDirectPlay3AImpl_SendChatMessage, + IDirectPlay3AImpl_SetGroupConnectionSettings, + IDirectPlay3AImpl_StartSession, + IDirectPlay3AImpl_GetGroupFlags, + IDirectPlay3AImpl_GetGroupParent, + IDirectPlay3AImpl_GetPlayerAccount, + IDirectPlay3AImpl_GetPlayerFlags +}; + +static const IDirectPlay4Vtbl dp4_vt = +{ + IDirectPlay4Impl_QueryInterface, + IDirectPlay4Impl_AddRef, + IDirectPlay4Impl_Release, + IDirectPlay4Impl_AddPlayerToGroup, + IDirectPlay4Impl_Close, + IDirectPlay4Impl_CreateGroup, + IDirectPlay4Impl_CreatePlayer, + IDirectPlay4Impl_DeletePlayerFromGroup, + IDirectPlay4Impl_DestroyGroup, + IDirectPlay4Impl_DestroyPlayer, + IDirectPlay4Impl_EnumGroupPlayers, + IDirectPlay4Impl_EnumGroups, + IDirectPlay4Impl_EnumPlayers, + IDirectPlay4Impl_EnumSessions, + IDirectPlay4Impl_GetCaps, + IDirectPlay4Impl_GetGroupData, + IDirectPlay4Impl_GetGroupName, + IDirectPlay4Impl_GetMessageCount, + IDirectPlay4Impl_GetPlayerAddress, + IDirectPlay4Impl_GetPlayerCaps, + IDirectPlay4Impl_GetPlayerData, + IDirectPlay4Impl_GetPlayerName, + IDirectPlay4Impl_GetSessionDesc, + IDirectPlay4Impl_Initialize, + IDirectPlay4Impl_Open, + IDirectPlay4Impl_Receive, + IDirectPlay4Impl_Send, + IDirectPlay4Impl_SetGroupData, + IDirectPlay4Impl_SetGroupName, + IDirectPlay4Impl_SetPlayerData, + IDirectPlay4Impl_SetPlayerName, + IDirectPlay4Impl_SetSessionDesc, + IDirectPlay4Impl_AddGroupToGroup, + IDirectPlay4Impl_CreateGroupInGroup, + IDirectPlay4Impl_DeleteGroupFromGroup, + IDirectPlay4Impl_EnumConnections, + IDirectPlay4Impl_EnumGroupsInGroup, + IDirectPlay4Impl_GetGroupConnectionSettings, + IDirectPlay4Impl_InitializeConnection, + IDirectPlay4Impl_SecureOpen, + IDirectPlay4Impl_SendChatMessage, + IDirectPlay4Impl_SetGroupConnectionSettings, + IDirectPlay4Impl_StartSession, + IDirectPlay4Impl_GetGroupFlags, + IDirectPlay4Impl_GetGroupParent, + IDirectPlay4Impl_GetPlayerAccount, + IDirectPlay4Impl_GetPlayerFlags, + IDirectPlay4Impl_GetGroupOwner, + IDirectPlay4Impl_SetGroupOwner, + IDirectPlay4Impl_SendEx, + IDirectPlay4Impl_GetMessageQueue, + IDirectPlay4Impl_CancelMessage, + IDirectPlay4Impl_CancelPriority +}; + +static const IDirectPlay4Vtbl dp4A_vt = +{ + IDirectPlay4AImpl_QueryInterface, + IDirectPlay4AImpl_AddRef, + IDirectPlay4AImpl_Release, + IDirectPlay4AImpl_AddPlayerToGroup, + IDirectPlay4AImpl_Close, + IDirectPlay4AImpl_CreateGroup, + IDirectPlay4AImpl_CreatePlayer, + IDirectPlay4AImpl_DeletePlayerFromGroup, + IDirectPlay4AImpl_DestroyGroup, + IDirectPlay4AImpl_DestroyPlayer, + IDirectPlay4AImpl_EnumGroupPlayers, + IDirectPlay4AImpl_EnumGroups, + IDirectPlay4AImpl_EnumPlayers, + IDirectPlay4AImpl_EnumSessions, + IDirectPlay4AImpl_GetCaps, + IDirectPlay4AImpl_GetGroupData, + IDirectPlay4AImpl_GetGroupName, + IDirectPlay4AImpl_GetMessageCount, + IDirectPlay4AImpl_GetPlayerAddress, + IDirectPlay4AImpl_GetPlayerCaps, + IDirectPlay4AImpl_GetPlayerData, + IDirectPlay4AImpl_GetPlayerName, + IDirectPlay4AImpl_GetSessionDesc, + IDirectPlay4AImpl_Initialize, + IDirectPlay4AImpl_Open, + IDirectPlay4AImpl_Receive, + IDirectPlay4AImpl_Send, + IDirectPlay4AImpl_SetGroupData, + IDirectPlay4AImpl_SetGroupName, + IDirectPlay4AImpl_SetPlayerData, + IDirectPlay4AImpl_SetPlayerName, + IDirectPlay4AImpl_SetSessionDesc, + IDirectPlay4AImpl_AddGroupToGroup, + IDirectPlay4AImpl_CreateGroupInGroup, + IDirectPlay4AImpl_DeleteGroupFromGroup, + IDirectPlay4AImpl_EnumConnections, + IDirectPlay4AImpl_EnumGroupsInGroup, + IDirectPlay4AImpl_GetGroupConnectionSettings, + IDirectPlay4AImpl_InitializeConnection, + IDirectPlay4AImpl_SecureOpen, + IDirectPlay4AImpl_SendChatMessage, + IDirectPlay4AImpl_SetGroupConnectionSettings, + IDirectPlay4AImpl_StartSession, + IDirectPlay4AImpl_GetGroupFlags, + IDirectPlay4AImpl_GetGroupParent, + IDirectPlay4AImpl_GetPlayerAccount, + IDirectPlay4AImpl_GetPlayerFlags, + IDirectPlay4AImpl_GetGroupOwner, + IDirectPlay4AImpl_SetGroupOwner, + IDirectPlay4AImpl_SendEx, + IDirectPlay4AImpl_GetMessageQueue, + IDirectPlay4AImpl_CancelMessage, + IDirectPlay4AImpl_CancelPriority +}; + +HRESULT dplay_create( REFIID riid, void **ppv ) +{ + IDirectPlayImpl *obj; + HRESULT hr; + + TRACE( "(%s, %p)\n", debugstr_guid( riid ), ppv ); + + *ppv = NULL; + obj = HeapAlloc( GetProcessHeap(), 0, sizeof( *obj ) ); + if ( !obj ) + return DPERR_OUTOFMEMORY; + + obj->IDirectPlay_iface.lpVtbl = &dp_vt; + obj->IDirectPlay2A_iface.lpVtbl = &dp2A_vt; + obj->IDirectPlay2_iface.lpVtbl = &dp2_vt; + obj->IDirectPlay3A_iface.lpVtbl = &dp3A_vt; + obj->IDirectPlay3_iface.lpVtbl = &dp3_vt; + obj->IDirectPlay4A_iface.lpVtbl = &dp4A_vt; + obj->IDirectPlay4_iface.lpVtbl = &dp4_vt; + obj->numIfaces = 1; + obj->ref = 0; + obj->ref2A = 0; + obj->ref2 = 0; + obj->ref3A = 0; + obj->ref3 = 0; + obj->ref4A = 0; + obj->ref4 = 1; + + InitializeCriticalSection( &obj->lock ); + obj->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IDirectPlayImpl.lock"); + + if ( DP_CreateDirectPlay2( obj ) ) + hr = IDirectPlayX_QueryInterface( &obj->IDirectPlay4_iface, riid, ppv ); + else + hr = DPERR_NOMEMORY; + IDirectPlayX_Release( &obj->IDirectPlay4_iface ); + + return hr; +} + + +HRESULT DP_GetSPPlayerData( IDirectPlayImpl *lpDP, DPID idPlayer, void **lplpData ) +{ + lpPlayerList lpPlayer = DP_FindPlayer( lpDP, idPlayer ); + + if( lpPlayer == NULL ) + { + return DPERR_INVALIDPLAYER; + } + + *lplpData = lpPlayer->lpPData->lpSPPlayerData; + + return DP_OK; +} + +HRESULT DP_SetSPPlayerData( IDirectPlayImpl *lpDP, DPID idPlayer, void *lpData ) +{ + lpPlayerList lpPlayer = DP_FindPlayer( lpDP, idPlayer ); + + if( lpPlayer == NULL ) + { + return DPERR_INVALIDPLAYER; + } + + lpPlayer->lpPData->lpSPPlayerData = lpData; + + return DP_OK; +} + +/*************************************************************************** + * DirectPlayEnumerateAW + * + * The pointer to the structure lpContext will be filled with the + * appropriate data for each service offered by the OS. These services are + * not necessarily available on this particular machine but are defined + * as simple service providers under the "Service Providers" registry key. + * This structure is then passed to lpEnumCallback for each of the different + * services. + * + * This API is useful only for applications written using DirectX3 or + * worse. It is superseded by IDirectPlay3::EnumConnections which also + * gives information on the actual connections. + * + * defn of a service provider: + * A dynamic-link library used by DirectPlay to communicate over a network. + * The service provider contains all the network-specific code required + * to send and receive messages. Online services and network operators can + * supply service providers to use specialized hardware, protocols, communications + * media, and network resources. + * + */ +static HRESULT DirectPlayEnumerateAW(LPDPENUMDPCALLBACKA lpEnumCallbackA, + LPDPENUMDPCALLBACKW lpEnumCallbackW, + LPVOID lpContext) +{ + HKEY hkResult; + static const WCHAR searchSubKey[] = { + 'S', 'O', 'F', 'T', 'W', 'A', 'R', 'E', '\\', + 'M', 'i', 'c', 'r', 'o', 's', 'o', 'f', 't', '\\', + 'D', 'i', 'r', 'e', 'c', 't', 'P', 'l', 'a', 'y', '\\', + 'S', 'e', 'r', 'v', 'i', 'c', 'e', ' ', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', 's', 0 }; + static const WCHAR guidKey[] = { 'G', 'u', 'i', 'd', 0 }; + static const WCHAR descW[] = { 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'i', 'o', 'n', 'W', 0 }; + + DWORD dwIndex; + FILETIME filetime; + + char *descriptionA = NULL; + DWORD max_sizeOfDescriptionA = 0; + WCHAR *descriptionW = NULL; + DWORD max_sizeOfDescriptionW = 0; + + if (!lpEnumCallbackA && !lpEnumCallbackW) + { + return DPERR_INVALIDPARAMS; + } + + /* Need to loop over the service providers in the registry */ + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, searchSubKey, + 0, KEY_READ, &hkResult) != ERROR_SUCCESS) + { + /* Hmmm. Does this mean that there are no service providers? */ + ERR(": no service provider key in the registry - check your Wine installation !!!\n"); + return DPERR_GENERIC; + } + + /* Traverse all the service providers we have available */ + dwIndex = 0; + while (1) + { + WCHAR subKeyName[255]; /* 255 is the maximum key size according to MSDN */ + DWORD sizeOfSubKeyName = sizeof(subKeyName) / sizeof(WCHAR); + HKEY hkServiceProvider; + GUID serviceProviderGUID; + WCHAR guidKeyContent[(2 * 16) + 1 + 6 /* This corresponds to '{....-..-..-..-......}' */ ]; + DWORD sizeOfGuidKeyContent = sizeof(guidKeyContent); + LONG ret_value; + + ret_value = RegEnumKeyExW(hkResult, dwIndex, subKeyName, &sizeOfSubKeyName, + NULL, NULL, NULL, &filetime); + if (ret_value == ERROR_NO_MORE_ITEMS) + break; + else if (ret_value != ERROR_SUCCESS) + { + ERR(": could not enumerate on service provider key.\n"); + return DPERR_EXCEPTION; + } + TRACE(" this time through sub-key %s.\n", debugstr_w(subKeyName)); + + /* Open the key for this service provider */ + if (RegOpenKeyExW(hkResult, subKeyName, 0, KEY_READ, &hkServiceProvider) != ERROR_SUCCESS) + { + ERR(": could not open registry key for service provider %s.\n", debugstr_w(subKeyName)); + continue; + } + + /* Get the GUID from the registry */ + if (RegQueryValueExW(hkServiceProvider, guidKey, + NULL, NULL, (LPBYTE) guidKeyContent, &sizeOfGuidKeyContent) != ERROR_SUCCESS) + { + ERR(": missing GUID registry data member for service provider %s.\n", debugstr_w(subKeyName)); + continue; + } + if (sizeOfGuidKeyContent != sizeof(guidKeyContent)) + { + ERR(": invalid format for the GUID registry data member for service provider %s (%s).\n", debugstr_w(subKeyName), debugstr_w(guidKeyContent)); + continue; + } + CLSIDFromString(guidKeyContent, &serviceProviderGUID ); + + /* The enumeration will return FALSE if we are not to continue. + * + * Note: on my windows box, major / minor version is 6 / 0 for all service providers + * and have no relation to any of the two dwReserved1 and dwReserved2 keys. + * I think that it simply means that they are in-line with DirectX 6.0 + */ + if (lpEnumCallbackA) + { + DWORD sizeOfDescription = 0; + + /* Note that this is the A case of this function, so use the A variant to get the description string */ + if (RegQueryValueExA(hkServiceProvider, "DescriptionA", + NULL, NULL, NULL, &sizeOfDescription) != ERROR_SUCCESS) + { + ERR(": missing 'DescriptionA' registry data member for service provider %s.\n", debugstr_w(subKeyName)); + continue; + } + if (sizeOfDescription > max_sizeOfDescriptionA) + { + HeapFree(GetProcessHeap(), 0, descriptionA); + max_sizeOfDescriptionA = sizeOfDescription; + } + descriptionA = HeapAlloc(GetProcessHeap(), 0, sizeOfDescription); + RegQueryValueExA(hkServiceProvider, "DescriptionA", + NULL, NULL, (LPBYTE) descriptionA, &sizeOfDescription); + + if (!lpEnumCallbackA(&serviceProviderGUID, descriptionA, 6, 0, lpContext)) + goto end; + } + else + { + DWORD sizeOfDescription = 0; + + if (RegQueryValueExW(hkServiceProvider, descW, + NULL, NULL, NULL, &sizeOfDescription) != ERROR_SUCCESS) + { + ERR(": missing 'DescriptionW' registry data member for service provider %s.\n", debugstr_w(subKeyName)); + continue; + } + if (sizeOfDescription > max_sizeOfDescriptionW) + { + HeapFree(GetProcessHeap(), 0, descriptionW); + max_sizeOfDescriptionW = sizeOfDescription; + } + descriptionW = HeapAlloc(GetProcessHeap(), 0, sizeOfDescription); + RegQueryValueExW(hkServiceProvider, descW, + NULL, NULL, (LPBYTE) descriptionW, &sizeOfDescription); + + if (!lpEnumCallbackW(&serviceProviderGUID, descriptionW, 6, 0, lpContext)) + goto end; + } + + dwIndex++; + } + + end: + HeapFree(GetProcessHeap(), 0, descriptionA); + HeapFree(GetProcessHeap(), 0, descriptionW); + + return DP_OK; +} + +/*************************************************************************** + * DirectPlayEnumerate [DPLAYX.9] + * DirectPlayEnumerateA [DPLAYX.2] + */ +HRESULT WINAPI DirectPlayEnumerateA(LPDPENUMDPCALLBACKA lpEnumCallback, LPVOID lpContext ) +{ + TRACE("(%p,%p)\n", lpEnumCallback, lpContext); + + return DirectPlayEnumerateAW(lpEnumCallback, NULL, lpContext); +} + +/*************************************************************************** + * DirectPlayEnumerateW [DPLAYX.3] + */ +HRESULT WINAPI DirectPlayEnumerateW(LPDPENUMDPCALLBACKW lpEnumCallback, LPVOID lpContext ) +{ + TRACE("(%p,%p)\n", lpEnumCallback, lpContext); + + return DirectPlayEnumerateAW(NULL, lpEnumCallback, lpContext); +} + +typedef struct tagCreateEnum +{ + LPVOID lpConn; + LPCGUID lpGuid; +} CreateEnumData, *lpCreateEnumData; + +/* Find and copy the matching connection for the SP guid */ +static BOOL CALLBACK cbDPCreateEnumConnections( + LPCGUID lpguidSP, + LPVOID lpConnection, + DWORD dwConnectionSize, + LPCDPNAME lpName, + DWORD dwFlags, + LPVOID lpContext) +{ + lpCreateEnumData lpData = (lpCreateEnumData)lpContext; + + if( IsEqualGUID( lpguidSP, lpData->lpGuid ) ) + { + TRACE( "Found SP entry with guid %s\n", debugstr_guid(lpData->lpGuid) ); + + lpData->lpConn = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, + dwConnectionSize ); + CopyMemory( lpData->lpConn, lpConnection, dwConnectionSize ); + + /* Found the record that we were looking for */ + return FALSE; + } + + /* Haven't found what were looking for yet */ + return TRUE; +} + + +/*************************************************************************** + * DirectPlayCreate [DPLAYX.1] + * + */ +HRESULT WINAPI DirectPlayCreate +( LPGUID lpGUID, LPDIRECTPLAY *lplpDP, IUnknown *pUnk ) +{ + HRESULT hr; + LPDIRECTPLAY3A lpDP3A; + CreateEnumData cbData; + + TRACE( "lpGUID=%s lplpDP=%p pUnk=%p\n", debugstr_guid(lpGUID), lplpDP, pUnk ); + + if( pUnk != NULL ) + { + return CLASS_E_NOAGGREGATION; + } + + if( (lplpDP == NULL) || (lpGUID == NULL) ) + { + return DPERR_INVALIDPARAMS; + } + + if ( dplay_create( &IID_IDirectPlay, (void**)lplpDP ) != DP_OK ) + return DPERR_UNAVAILABLE; + + if( IsEqualGUID( &GUID_NULL, lpGUID ) ) + { + /* The GUID_NULL means don't bind a service provider. Just return the + interface as is */ + return DP_OK; + } + + /* Bind the desired service provider since lpGUID is non NULL */ + TRACE( "Service Provider binding for %s\n", debugstr_guid(lpGUID) ); + + /* We're going to use a DP3 interface */ + hr = IDirectPlayX_QueryInterface( *lplpDP, &IID_IDirectPlay3A, + (LPVOID*)&lpDP3A ); + if( FAILED(hr) ) + { + ERR( "Failed to get DP3 interface: %s\n", DPLAYX_HresultToString(hr) ); + return hr; + } + + cbData.lpConn = NULL; + cbData.lpGuid = lpGUID; + + /* We were given a service provider, find info about it... */ + hr = IDirectPlayX_EnumConnections( lpDP3A, NULL, cbDPCreateEnumConnections, + &cbData, DPCONNECTION_DIRECTPLAY ); + if( ( FAILED(hr) ) || + ( cbData.lpConn == NULL ) + ) + { + ERR( "Failed to get Enum for SP: %s\n", DPLAYX_HresultToString(hr) ); + IDirectPlayX_Release( lpDP3A ); + return DPERR_UNAVAILABLE; + } + + /* Initialize the service provider */ + hr = IDirectPlayX_InitializeConnection( lpDP3A, cbData.lpConn, 0 ); + if( FAILED(hr) ) + { + ERR( "Failed to Initialize SP: %s\n", DPLAYX_HresultToString(hr) ); + HeapFree( GetProcessHeap(), 0, cbData.lpConn ); + IDirectPlayX_Release( lpDP3A ); + return hr; + } + + /* Release our version of the interface now that we're done with it */ + IDirectPlayX_Release( lpDP3A ); + HeapFree( GetProcessHeap(), 0, cbData.lpConn ); + + return DP_OK; +} diff --git a/dll/directx/dplayx/dplay_global.h b/dll/directx/wine/dplayx/dplay_global.h similarity index 74% rename from dll/directx/dplayx/dplay_global.h rename to dll/directx/wine/dplayx/dplay_global.h index 086801e29cd..7e4177e50ce 100644 --- a/dll/directx/dplayx/dplay_global.h +++ b/dll/directx/wine/dplayx/dplay_global.h @@ -34,22 +34,6 @@ extern HRESULT DPL_EnumAddress( LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, LPCVOID lpAddress, DWORD dwAddressSize, LPVOID lpContext ) DECLSPEC_HIDDEN; -/***************************************************************************** - * Predeclare the interface implementation structures - */ -typedef struct IDirectPlay2Impl IDirectPlay2AImpl; -typedef struct IDirectPlay2Impl IDirectPlay2Impl; -typedef struct IDirectPlay3Impl IDirectPlay3AImpl; -typedef struct IDirectPlay3Impl IDirectPlay3Impl; -typedef struct IDirectPlay4Impl IDirectPlay4AImpl; -typedef struct IDirectPlay4Impl IDirectPlay4Impl; - -typedef struct tagDirectPlayIUnknownData -{ - LONG ulObjRef; - CRITICAL_SECTION DP_lock; -} DirectPlayIUnknownData; - typedef struct tagEnumSessionAsyncCallbackData { LPSPINITDATA lpSpData; @@ -199,50 +183,35 @@ typedef struct tagDirectPlay2Data DPQ_HEAD( tagDP_MSG_REPLY_STRUCT_LIST ) repliesExpected; } DirectPlay2Data; -typedef struct tagDirectPlay3Data +typedef struct IDirectPlayImpl { - BOOL dummy; -} DirectPlay3Data; -typedef struct tagDirectPlay4Data -{ - BOOL dummy; -} DirectPlay4Data; + IDirectPlay IDirectPlay_iface; + IDirectPlay2A IDirectPlay2A_iface; + IDirectPlay2 IDirectPlay2_iface; + IDirectPlay3A IDirectPlay3A_iface; + IDirectPlay3 IDirectPlay3_iface; + IDirectPlay4A IDirectPlay4A_iface; + IDirectPlay4 IDirectPlay4_iface; + LONG numIfaces; /* "in use interfaces" refcount */ + LONG ref, ref2A, ref2, ref3A, ref3, ref4A, ref4; + CRITICAL_SECTION lock; + DirectPlay2Data *dp2; +} IDirectPlayImpl; -#define DP_IMPL_FIELDS \ - LONG ulInterfaceRef; \ - DirectPlayIUnknownData* unk; \ - DirectPlay2Data* dp2; \ - DirectPlay3Data* dp3; \ - DirectPlay4Data* dp4; - -struct IDirectPlay2Impl -{ - const IDirectPlay2Vtbl *lpVtbl; - DP_IMPL_FIELDS -}; - -struct IDirectPlay3Impl -{ - const IDirectPlay3Vtbl *lpVtbl; - DP_IMPL_FIELDS -}; - -struct IDirectPlay4Impl -{ - const IDirectPlay4Vtbl *lpVtbl; - DP_IMPL_FIELDS -}; - -HRESULT DP_HandleMessage( IDirectPlay2Impl* This, LPCVOID lpMessageBody, - DWORD dwMessageBodySize, LPCVOID lpMessageHeader, - WORD wCommandId, WORD wVersion, - LPVOID* lplpReply, LPDWORD lpdwMsgSize ) DECLSPEC_HIDDEN; +HRESULT DP_HandleMessage( IDirectPlayImpl *This, const void *lpMessageBody, + DWORD dwMessageBodySize, const void *lpMessageHeader, WORD wCommandId, WORD wVersion, + void **lplpReply, DWORD *lpdwMsgSize ) DECLSPEC_HIDDEN; /* DP SP external interfaces into DirectPlay */ -extern HRESULT DP_GetSPPlayerData( IDirectPlay2Impl* lpDP, DPID idPlayer, LPVOID* lplpData ) DECLSPEC_HIDDEN; -extern HRESULT DP_SetSPPlayerData( IDirectPlay2Impl* lpDP, DPID idPlayer, LPVOID lpData ) DECLSPEC_HIDDEN; +extern HRESULT DP_GetSPPlayerData( IDirectPlayImpl *lpDP, DPID idPlayer, void **lplpData ) DECLSPEC_HIDDEN; +extern HRESULT DP_SetSPPlayerData( IDirectPlayImpl *lpDP, DPID idPlayer, void *lpData ) DECLSPEC_HIDDEN; /* DP external interfaces to call into DPSP interface */ extern LPVOID DPSP_CreateSPPlayerData(void) DECLSPEC_HIDDEN; +extern HRESULT dplay_create( REFIID riid, void **ppv ) DECLSPEC_HIDDEN; +extern HRESULT dplobby_create( REFIID riid, void **ppv ) DECLSPEC_HIDDEN; +extern HRESULT DPSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) DECLSPEC_HIDDEN; +extern HRESULT DPLSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) DECLSPEC_HIDDEN; + #endif /* __WINE_DPLAY_GLOBAL_INCLUDED */ diff --git a/dll/directx/dplayx/dplaysp.c b/dll/directx/wine/dplayx/dplaysp.c similarity index 93% rename from dll/directx/dplayx/dplaysp.c rename to dll/directx/wine/dplayx/dplaysp.c index e4f458c9ad6..56aa7e629a0 100644 --- a/dll/directx/dplayx/dplaysp.c +++ b/dll/directx/wine/dplayx/dplaysp.c @@ -22,7 +22,6 @@ //#include "winerror.h" #include -//#include "dpinit.h" //#include "dplaysp.h" //#include "dplay_global.h" #include "name_server.h" @@ -37,7 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dplay); /* Prototypes */ static BOOL DPSP_CreateIUnknown( LPVOID lpSP ); static BOOL DPSP_DestroyIUnknown( LPVOID lpSP ); -static BOOL DPSP_CreateDirectPlaySP( LPVOID lpSP, IDirectPlay2Impl* dp ); +static BOOL DPSP_CreateDirectPlaySP( void *lpSP, IDirectPlayImpl *dp ); static BOOL DPSP_DestroyDirectPlaySP( LPVOID lpSP ); /* Predefine the interface */ @@ -57,7 +56,7 @@ typedef struct tagDirectPlaySPData LPVOID lpSpLocalData; DWORD dwSpLocalDataSize; /* Size of data pointed to by lpSpLocalData */ - IDirectPlay2Impl* dplay; /* FIXME: This should perhaps be iface not impl */ + IDirectPlayImpl *dplay; /* FIXME: This should perhaps be iface not impl */ } DirectPlaySPData; @@ -86,7 +85,7 @@ typedef struct tagDP_SPPLAYERDATA } DP_SPPLAYERDATA, *LPDP_SPPLAYERDATA; /* Create the SP interface */ -HRESULT DPSP_CreateInterface( REFIID riid, LPVOID* ppvObj, IDirectPlay2Impl* dp ) +HRESULT DPSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) { TRACE( " for %s\n", debugstr_guid( riid ) ); @@ -160,7 +159,7 @@ static BOOL DPSP_DestroyIUnknown( LPVOID lpSP ) } -static BOOL DPSP_CreateDirectPlaySP( LPVOID lpSP, IDirectPlay2Impl* dp ) +static BOOL DPSP_CreateDirectPlaySP( void *lpSP, IDirectPlayImpl *dp ) { IDirectPlaySPImpl *This = lpSP; @@ -173,21 +172,6 @@ static BOOL DPSP_CreateDirectPlaySP( LPVOID lpSP, IDirectPlay2Impl* dp ) This->sp->dplay = dp; - /* Normally we should be keeping a reference, but since only the dplay - * interface that created us can destroy us, we do not keep a reference - * to it (ie we'd be stuck with always having one reference to the dplay - * object, and hence us, around). - * NOTE: The dp object does reference count us. - * - * FIXME: This is a kludge to get around a problem where a queryinterface - * is used to get a new interface and then is closed. We will then - * reference garbage. However, with this we will never deallocate - * the interface we store. The correct fix is to require all - * DP internal interfaces to use the This->dp2 interface which - * should be changed to This->dp - */ - IDirectPlayX_AddRef( (LPDIRECTPLAY2)dp ); - return TRUE; } @@ -195,14 +179,6 @@ static BOOL DPSP_DestroyDirectPlaySP( LPVOID lpSP ) { IDirectPlaySPImpl *This = lpSP; - /* Normally we should be keeping a reference, but since only the dplay - * interface that created us can destroy us, we do not keep a reference - * to it (ie we'd be stuck with always having one reference to the dplay - * object, and hence us, around). - * NOTE: The dp object does reference count us. - */ - /*IDirectPlayX_Release( (LPDIRECTPLAY2)This->sp->dplay ); */ - HeapFree( GetProcessHeap(), 0, This->sp->lpSpRemoteData ); HeapFree( GetProcessHeap(), 0, This->sp->lpSpLocalData ); @@ -408,13 +384,11 @@ static HRESULT WINAPI IDirectPlaySPImpl_GetSPPlayerData /* What to do in the case where there is nothing set yet? */ if( dwFlags == DPSET_LOCAL ) { - HeapFree( GetProcessHeap(), 0, lpPlayerData->lpPlayerLocalData ); *lplpData = lpPlayerData->lpPlayerLocalData; *lpdwDataSize = lpPlayerData->dwPlayerLocalDataSize; } else if( dwFlags == DPSET_REMOTE ) { - HeapFree( GetProcessHeap(), 0, lpPlayerData->lpPlayerRemoteData ); *lplpData = lpPlayerData->lpPlayerRemoteData; *lpdwDataSize = lpPlayerData->dwPlayerRemoteDataSize; } diff --git a/dll/directx/dplayx/dplayx.idl b/dll/directx/wine/dplayx/dplayx.idl similarity index 100% rename from dll/directx/dplayx/dplayx.idl rename to dll/directx/wine/dplayx/dplayx.idl diff --git a/dll/directx/dplayx/dplayx.rgs b/dll/directx/wine/dplayx/dplayx.rgs similarity index 100% rename from dll/directx/dplayx/dplayx.rgs rename to dll/directx/wine/dplayx/dplayx.rgs diff --git a/dll/directx/dplayx/dplayx.spec b/dll/directx/wine/dplayx/dplayx.spec similarity index 100% rename from dll/directx/dplayx/dplayx.spec rename to dll/directx/wine/dplayx/dplayx.spec diff --git a/dll/directx/dplayx/dplayx_global.c b/dll/directx/wine/dplayx/dplayx_global.c similarity index 100% rename from dll/directx/dplayx/dplayx_global.c rename to dll/directx/wine/dplayx/dplayx_global.c diff --git a/dll/directx/dplayx/dplayx_global.h b/dll/directx/wine/dplayx/dplayx_global.h similarity index 100% rename from dll/directx/dplayx/dplayx_global.h rename to dll/directx/wine/dplayx/dplayx_global.h diff --git a/dll/directx/dplayx/dplayx_main.c b/dll/directx/wine/dplayx/dplayx_main.c similarity index 100% rename from dll/directx/dplayx/dplayx_main.c rename to dll/directx/wine/dplayx/dplayx_main.c diff --git a/dll/directx/dplayx/dplayx_messages.c b/dll/directx/wine/dplayx/dplayx_messages.c similarity index 89% rename from dll/directx/dplayx/dplayx_messages.c rename to dll/directx/wine/dplayx/dplayx_messages.c index ed3ddebb699..952e480d529 100644 --- a/dll/directx/dplayx/dplayx_messages.c +++ b/dll/directx/wine/dplayx/dplayx_messages.c @@ -45,9 +45,8 @@ typedef struct tagMSGTHREADINFO } MSGTHREADINFO, *LPMSGTHREADINFO; static DWORD CALLBACK DPL_MSG_ThreadMain( LPVOID lpContext ); -static LPVOID DP_MSG_ExpectReply( IDirectPlay2AImpl* This, LPDPSP_SENDDATA data, - DWORD dwWaitTime, WORD wReplyCommandId, - LPVOID* lplpReplyMsg, LPDWORD lpdwMsgBodySize ); +static void *DP_MSG_ExpectReply( IDirectPlayImpl *This, DPSP_SENDDATA *data, DWORD dwWaitTime, + WORD wReplyCommandId, void **lplpReplyMsg, DWORD *lpdwMsgBodySize ); /* Create the message reception thread to allow the application to receive @@ -154,16 +153,8 @@ end_of_thread: } /* DP messaging stuff */ -static HANDLE DP_MSG_BuildAndLinkReplyStruct( IDirectPlay2Impl* This, - LPDP_MSG_REPLY_STRUCT_LIST lpReplyStructList, - WORD wReplyCommandId ); -static LPVOID DP_MSG_CleanReplyStruct( LPDP_MSG_REPLY_STRUCT_LIST lpReplyStructList, - LPVOID* lplpReplyMsg, LPDWORD lpdwMsgBodySize ); - - -static -HANDLE DP_MSG_BuildAndLinkReplyStruct( IDirectPlay2Impl* This, - LPDP_MSG_REPLY_STRUCT_LIST lpReplyStructList, WORD wReplyCommandId ) +static HANDLE DP_MSG_BuildAndLinkReplyStruct( IDirectPlayImpl *This, + DP_MSG_REPLY_STRUCT_LIST *lpReplyStructList, WORD wReplyCommandId ) { lpReplyStructList->replyExpected.hReceipt = CreateEventW( NULL, FALSE, FALSE, NULL ); lpReplyStructList->replyExpected.wExpectedReply = wReplyCommandId; @@ -171,9 +162,9 @@ HANDLE DP_MSG_BuildAndLinkReplyStruct( IDirectPlay2Impl* This, lpReplyStructList->replyExpected.dwMsgBodySize = 0; /* Insert into the message queue while locked */ - EnterCriticalSection( &This->unk->DP_lock ); + EnterCriticalSection( &This->lock ); DPQ_INSERT( This->dp2->repliesExpected, lpReplyStructList, repliesExpected ); - LeaveCriticalSection( &This->unk->DP_lock ); + LeaveCriticalSection( &This->lock ); return lpReplyStructList->replyExpected.hReceipt; } @@ -190,8 +181,7 @@ LPVOID DP_MSG_CleanReplyStruct( LPDP_MSG_REPLY_STRUCT_LIST lpReplyStructList, return lpReplyStructList->replyExpected.lpReplyMsg; } -HRESULT DP_MSG_SendRequestPlayerId( IDirectPlay2AImpl* This, DWORD dwFlags, - LPDPID lpdpidAllocatedId ) +HRESULT DP_MSG_SendRequestPlayerId( IDirectPlayImpl *This, DWORD dwFlags, DPID *lpdpidAllocatedId ) { LPVOID lpMsg; LPDPMSG_REQUESTNEWPLAYERID lpMsgBody; @@ -257,7 +247,7 @@ HRESULT DP_MSG_SendRequestPlayerId( IDirectPlay2AImpl* This, DWORD dwFlags, return hr; } -HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlay2AImpl* This, DPID dpidServer ) +HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlayImpl *This, DPID dpidServer ) { LPVOID lpMsg; LPDPMSG_FORWARDADDPLAYER lpMsgBody; @@ -375,10 +365,8 @@ HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlay2AImpl* This, DPID dpidServer ) * ordering issues on sends and receives from the opposite machine. No wonder MS is not * a networking company. */ -static -LPVOID DP_MSG_ExpectReply( IDirectPlay2AImpl* This, LPDPSP_SENDDATA lpData, - DWORD dwWaitTime, WORD wReplyCommandId, - LPVOID* lplpReplyMsg, LPDWORD lpdwMsgBodySize ) +static void *DP_MSG_ExpectReply( IDirectPlayImpl *This, DPSP_SENDDATA *lpData, DWORD dwWaitTime, + WORD wReplyCommandId, void **lplpReplyMsg, DWORD *lpdwMsgBodySize ) { HRESULT hr; HANDLE hMsgReceipt; @@ -417,8 +405,8 @@ LPVOID DP_MSG_ExpectReply( IDirectPlay2AImpl* This, LPDPSP_SENDDATA lpData, * all important data. It is quite silly to have to copy the message, but the documents * indicate that a copy is taken. Silly really. */ -void DP_MSG_ReplyReceived( IDirectPlay2AImpl* This, WORD wCommandId, - LPCVOID lpcMsgBody, DWORD dwMsgBodySize ) +void DP_MSG_ReplyReceived( IDirectPlayImpl *This, WORD wCommandId, const void *lpcMsgBody, + DWORD dwMsgBodySize ) { LPDP_MSG_REPLY_STRUCT_LIST lpReplyList; @@ -432,10 +420,10 @@ void DP_MSG_ReplyReceived( IDirectPlay2AImpl* This, WORD wCommandId, /* Find, and immediately remove (to avoid double triggering), the appropriate entry. Call locked to * avoid problems. */ - EnterCriticalSection( &This->unk->DP_lock ); + EnterCriticalSection( &This->lock ); DPQ_REMOVE_ENTRY( This->dp2->repliesExpected, repliesExpected, replyExpected.wExpectedReply, ==, wCommandId, lpReplyList ); - LeaveCriticalSection( &This->unk->DP_lock ); + LeaveCriticalSection( &This->lock ); if( lpReplyList != NULL ) { @@ -456,7 +444,7 @@ void DP_MSG_ReplyReceived( IDirectPlay2AImpl* This, WORD wCommandId, } } -void DP_MSG_ToSelf( IDirectPlay2AImpl* This, DPID dpidSelf ) +void DP_MSG_ToSelf( IDirectPlayImpl *This, DPID dpidSelf ) { LPVOID lpMsg; LPDPMSG_SENDENVELOPE lpMsgBody; @@ -493,8 +481,8 @@ void DP_MSG_ToSelf( IDirectPlay2AImpl* This, DPID dpidSelf ) } } -void DP_MSG_ErrorReceived( IDirectPlay2AImpl* This, WORD wCommandId, - LPCVOID lpMsgBody, DWORD dwMsgBodySize ) +void DP_MSG_ErrorReceived( IDirectPlayImpl *This, WORD wCommandId, const void *lpMsgBody, + DWORD dwMsgBodySize ) { LPCDPMSG_FORWARDADDPLAYERNACK lpcErrorMsg; diff --git a/dll/directx/dplayx/dplayx_messages.h b/dll/directx/wine/dplayx/dplayx_messages.h similarity index 94% rename from dll/directx/dplayx/dplayx_messages.h rename to dll/directx/wine/dplayx/dplayx_messages.h index fbf6b33be6e..5bba7fc114c 100644 --- a/dll/directx/dplayx/dplayx_messages.h +++ b/dll/directx/wine/dplayx/dplayx_messages.h @@ -31,15 +31,15 @@ DWORD CreateLobbyMessageReceptionThread( HANDLE hNotifyEvent, HANDLE hStart, HANDLE hDeath, HANDLE hConnRead ) DECLSPEC_HIDDEN; -HRESULT DP_MSG_SendRequestPlayerId( IDirectPlay2AImpl* This, DWORD dwFlags, +HRESULT DP_MSG_SendRequestPlayerId( IDirectPlayImpl *This, DWORD dwFlags, LPDPID lpdipidAllocatedId ) DECLSPEC_HIDDEN; -HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlay2AImpl* This, DPID dpidServer ) DECLSPEC_HIDDEN; +HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlayImpl *This, DPID dpidServer ) DECLSPEC_HIDDEN; -void DP_MSG_ReplyReceived( IDirectPlay2AImpl* This, WORD wCommandId, +void DP_MSG_ReplyReceived( IDirectPlayImpl *This, WORD wCommandId, LPCVOID lpMsgBody, DWORD dwMsgBodySize ) DECLSPEC_HIDDEN; -void DP_MSG_ErrorReceived( IDirectPlay2AImpl* This, WORD wCommandId, +void DP_MSG_ErrorReceived( IDirectPlayImpl *This, WORD wCommandId, LPCVOID lpMsgBody, DWORD dwMsgBodySize ) DECLSPEC_HIDDEN; -void DP_MSG_ToSelf( IDirectPlay2AImpl* This, DPID dpidSelf ) DECLSPEC_HIDDEN; +void DP_MSG_ToSelf( IDirectPlayImpl *This, DPID dpidSelf ) DECLSPEC_HIDDEN; /* Timings -> 1000 ticks/sec */ #define DPMSG_WAIT_5_SECS 5000 diff --git a/dll/directx/dplayx/dplayx_queue.h b/dll/directx/wine/dplayx/dplayx_queue.h similarity index 100% rename from dll/directx/dplayx/dplayx_queue.h rename to dll/directx/wine/dplayx/dplayx_queue.h diff --git a/dll/directx/wine/dplayx/dplobby.c b/dll/directx/wine/dplayx/dplobby.c new file mode 100644 index 00000000000..f8ccc6aeea2 --- /dev/null +++ b/dll/directx/wine/dplayx/dplobby.c @@ -0,0 +1,2123 @@ +/* Direct Play Lobby 2 & 3 Implementation + * + * Copyright 1998,1999,2000 - Peter Hunnisett + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#include +//#include + +#define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT +#include +#include +//#include "winerror.h" +#include +#include +#include + +#include "dplayx_global.h" +#include "dplayx_messages.h" +//#include "dplayx_queue.h" +//#include "dplobby.h" + +WINE_DEFAULT_DEBUG_CHANNEL(dplay); + +/* Forward declarations for this module helper methods */ +HRESULT DPL_CreateCompoundAddress ( LPCDPCOMPOUNDADDRESSELEMENT lpElements, DWORD dwElementCount, + LPVOID lpAddress, LPDWORD lpdwAddressSize, BOOL bAnsiInterface )DECLSPEC_HIDDEN; + +static HRESULT DPL_CreateAddress( REFGUID guidSP, REFGUID guidDataType, LPCVOID lpData, DWORD dwDataSize, + LPVOID lpAddress, LPDWORD lpdwAddressSize, BOOL bAnsiInterface ); + + +/***************************************************************************** + * IDirectPlayLobby {1,2,3} implementation structure + * + * The philosophy behind this extra pointer dereference is that I wanted to + * have the same structure for all types of objects without having to do + * a lot of casting. I also only wanted to implement an interface in the + * object it was "released" with IUnknown interface being implemented in the 1 version. + * Of course, with these new interfaces comes the data required to keep the state required + * by these interfaces. So, basically, the pointers contain the data associated with + * a release. If you use the data associated with release 3 in a release 2 object, you'll + * get a run time trap, as that won't have any data. + * + */ +struct DPLMSG +{ + DPQ_ENTRY( DPLMSG ) msgs; /* Link to next queued message */ +}; +typedef struct DPLMSG* LPDPLMSG; + +typedef struct IDirectPlayLobbyImpl +{ + IDirectPlayLobby IDirectPlayLobby_iface; + IDirectPlayLobbyA IDirectPlayLobbyA_iface; + IDirectPlayLobby2 IDirectPlayLobby2_iface; + IDirectPlayLobby2A IDirectPlayLobby2A_iface; + IDirectPlayLobby3 IDirectPlayLobby3_iface; + IDirectPlayLobby3A IDirectPlayLobby3A_iface; + LONG numIfaces; /* "in use interfaces" refcount */ + LONG ref, refA, ref2, ref2A, ref3, ref3A; + CRITICAL_SECTION lock; + HKEY cbkeyhack; + DWORD msgtid; + DPQ_HEAD( DPLMSG ) msgs; /* List of messages received */ +} IDirectPlayLobbyImpl; + +static inline IDirectPlayLobbyImpl *impl_from_IDirectPlayLobby( IDirectPlayLobby *iface ) +{ + return CONTAINING_RECORD( iface, IDirectPlayLobbyImpl, IDirectPlayLobby_iface ); +} + +static inline IDirectPlayLobbyImpl *impl_from_IDirectPlayLobbyA( IDirectPlayLobbyA *iface ) +{ + return CONTAINING_RECORD( iface, IDirectPlayLobbyImpl, IDirectPlayLobbyA_iface ); +} + +static inline IDirectPlayLobbyImpl *impl_from_IDirectPlayLobby2( IDirectPlayLobby2 *iface ) +{ + return CONTAINING_RECORD( iface, IDirectPlayLobbyImpl, IDirectPlayLobby2_iface ); +} + +static inline IDirectPlayLobbyImpl *impl_from_IDirectPlayLobby2A( IDirectPlayLobby2A *iface ) +{ + return CONTAINING_RECORD( iface, IDirectPlayLobbyImpl, IDirectPlayLobby2A_iface ); +} + +static inline IDirectPlayLobbyImpl *impl_from_IDirectPlayLobby3( IDirectPlayLobby3 *iface ) +{ + return CONTAINING_RECORD( iface, IDirectPlayLobbyImpl, IDirectPlayLobby3_iface ); +} + +static inline IDirectPlayLobbyImpl *impl_from_IDirectPlayLobby3A( IDirectPlayLobby3A *iface ) +{ + return CONTAINING_RECORD( iface, IDirectPlayLobbyImpl, IDirectPlayLobby3A_iface ); +} + +static void dplobby_destroy(IDirectPlayLobbyImpl *obj) +{ + if ( obj->msgtid ) + FIXME( "Should kill the msg thread\n" ); + + DPQ_DELETEQ( obj->msgs, msgs, LPDPLMSG, cbDeleteElemFromHeap ); + obj->lock.DebugInfo->Spare[0] = 0; + DeleteCriticalSection( &obj->lock ); + HeapFree( GetProcessHeap(), 0, obj ); +} + +static HRESULT WINAPI IDirectPlayLobbyAImpl_QueryInterface( IDirectPlayLobbyA *iface, REFIID riid, + void **ppv ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobbyA( iface ); + return IDirectPlayLobby_QueryInterface( &This->IDirectPlayLobby3_iface, riid, ppv ); +} + +static HRESULT WINAPI IDirectPlayLobbyImpl_QueryInterface( IDirectPlayLobby *iface, REFIID riid, + void **ppv ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby( iface ); + return IDirectPlayLobby_QueryInterface( &This->IDirectPlayLobby3_iface, riid, ppv ); +} + +static HRESULT WINAPI IDirectPlayLobby2AImpl_QueryInterface( IDirectPlayLobby2A *iface, REFIID riid, + void **ppv ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2A( iface ); + return IDirectPlayLobby_QueryInterface( &This->IDirectPlayLobby3_iface, riid, ppv ); +} + +static HRESULT WINAPI IDirectPlayLobby2Impl_QueryInterface( IDirectPlayLobby2 *iface, REFIID riid, + void **ppv ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2( iface ); + return IDirectPlayLobby_QueryInterface( &This->IDirectPlayLobby3_iface, riid, ppv ); +} + +static HRESULT WINAPI IDirectPlayLobby3AImpl_QueryInterface( IDirectPlayLobby3A *iface, REFIID riid, + void **ppv ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3A( iface ); + return IDirectPlayLobby_QueryInterface( &This->IDirectPlayLobby3_iface, riid, ppv ); +} + +static HRESULT WINAPI IDirectPlayLobby3Impl_QueryInterface( IDirectPlayLobby3 *iface, REFIID riid, + void **ppv ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3( iface ); + + if ( IsEqualGUID( &IID_IUnknown, riid ) ) + { + TRACE( "(%p)->(IID_IUnknown %p)\n", This, ppv ); + *ppv = &This->IDirectPlayLobby_iface; + } + else if ( IsEqualGUID( &IID_IDirectPlayLobby, riid ) ) + { + TRACE( "(%p)->(IID_IDirectPlayLobby %p)\n", This, ppv ); + *ppv = &This->IDirectPlayLobby_iface; + } + else if ( IsEqualGUID( &IID_IDirectPlayLobbyA, riid ) ) + { + TRACE( "(%p)->(IID_IDirectPlayLobbyA %p)\n", This, ppv ); + *ppv = &This->IDirectPlayLobbyA_iface; + } + else if ( IsEqualGUID( &IID_IDirectPlayLobby2, riid ) ) + { + TRACE( "(%p)->(IID_IDirectPlayLobby2 %p)\n", This, ppv ); + *ppv = &This->IDirectPlayLobby2_iface; + } + else if ( IsEqualGUID( &IID_IDirectPlayLobby2A, riid ) ) + { + TRACE( "(%p)->(IID_IDirectPlayLobby2A %p)\n", This, ppv ); + *ppv = &This->IDirectPlayLobby2A_iface; + } + else if ( IsEqualGUID( &IID_IDirectPlayLobby3, riid ) ) + { + TRACE( "(%p)->(IID_IDirectPlay3 %p)\n", This, ppv ); + *ppv = &This->IDirectPlayLobby3_iface; + } + else if ( IsEqualGUID( &IID_IDirectPlayLobby3A, riid ) ) + { + TRACE( "(%p)->(IID_IDirectPlayLobby3A %p)\n", This, ppv ); + *ppv = &This->IDirectPlayLobby3A_iface; + } + else + { + WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); + *ppv = NULL; + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; +} + +static ULONG WINAPI IDirectPlayLobbyAImpl_AddRef( IDirectPlayLobbyA *iface ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobbyA( iface ); + ULONG ref = InterlockedIncrement( &This->refA ); + + TRACE( "(%p) refA=%d\n", This, ref ); + + if ( ref == 1 ) + InterlockedIncrement( &This->numIfaces ); + + return ref; +} + +static ULONG WINAPI IDirectPlayLobbyImpl_AddRef( IDirectPlayLobby *iface ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby( iface ); + ULONG ref = InterlockedIncrement( &This->ref ); + + TRACE( "(%p) ref=%d\n", This, ref ); + + if ( ref == 1 ) + InterlockedIncrement( &This->numIfaces ); + + return ref; +} + +static ULONG WINAPI IDirectPlayLobby2AImpl_AddRef(IDirectPlayLobby2A *iface) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2A( iface ); + ULONG ref = InterlockedIncrement( &This->ref2A ); + + TRACE( "(%p) ref2A=%d\n", This, ref ); + + if ( ref == 1 ) + InterlockedIncrement( &This->numIfaces ); + + return ref; +} + +static ULONG WINAPI IDirectPlayLobby2Impl_AddRef(IDirectPlayLobby2 *iface) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2( iface ); + ULONG ref = InterlockedIncrement( &This->ref2 ); + + TRACE( "(%p) ref2=%d\n", This, ref ); + + if ( ref == 1 ) + InterlockedIncrement( &This->numIfaces ); + + return ref; +} + +static ULONG WINAPI IDirectPlayLobby3AImpl_AddRef(IDirectPlayLobby3A *iface) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3A( iface ); + ULONG ref = InterlockedIncrement( &This->ref3A ); + + TRACE( "(%p) ref3A=%d\n", This, ref ); + + if ( ref == 1 ) + InterlockedIncrement( &This->numIfaces ); + + return ref; +} + +static ULONG WINAPI IDirectPlayLobby3Impl_AddRef(IDirectPlayLobby3 *iface) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3( iface ); + ULONG ref = InterlockedIncrement( &This->ref3 ); + + TRACE( "(%p) ref3=%d\n", This, ref ); + + if ( ref == 1 ) + InterlockedIncrement( &This->numIfaces ); + + return ref; +} + +static ULONG WINAPI IDirectPlayLobbyAImpl_Release( IDirectPlayLobbyA *iface ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobbyA( iface ); + ULONG ref = InterlockedDecrement( &This->refA ); + + TRACE( "(%p) refA=%d\n", This, ref ); + + if ( !ref && !InterlockedDecrement( &This->numIfaces ) ) + dplobby_destroy( This ); + + return ref; +} + +static ULONG WINAPI IDirectPlayLobbyImpl_Release( IDirectPlayLobby *iface ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby( iface ); + ULONG ref = InterlockedDecrement( &This->ref ); + + TRACE( "(%p) ref=%d\n", This, ref ); + + if ( !ref && !InterlockedDecrement( &This->numIfaces ) ) + dplobby_destroy( This ); + + return ref; +} + +static ULONG WINAPI IDirectPlayLobby2AImpl_Release(IDirectPlayLobby2A *iface) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2A( iface ); + ULONG ref = InterlockedDecrement( &This->ref2A ); + + TRACE( "(%p) ref2A=%d\n", This, ref ); + + if ( !ref && !InterlockedDecrement( &This->numIfaces ) ) + dplobby_destroy( This ); + + return ref; +} + +static ULONG WINAPI IDirectPlayLobby2Impl_Release(IDirectPlayLobby2 *iface) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2( iface ); + ULONG ref = InterlockedDecrement( &This->ref2 ); + + TRACE( "(%p) ref2=%d\n", This, ref ); + + if ( !ref && !InterlockedDecrement( &This->numIfaces ) ) + dplobby_destroy( This ); + + return ref; +} + +static ULONG WINAPI IDirectPlayLobby3AImpl_Release(IDirectPlayLobby3A *iface) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3A( iface ); + ULONG ref = InterlockedDecrement( &This->ref3A ); + + TRACE( "(%p) ref3A=%d\n", This, ref ); + + if ( !ref && !InterlockedDecrement( &This->numIfaces ) ) + dplobby_destroy( This ); + + return ref; +} + +static ULONG WINAPI IDirectPlayLobby3Impl_Release(IDirectPlayLobby3 *iface) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3( iface ); + ULONG ref = InterlockedDecrement( &This->ref3 ); + + TRACE( "(%p) ref3=%d\n", This, ref ); + + if ( !ref && !InterlockedDecrement( &This->numIfaces ) ) + dplobby_destroy( This ); + + return ref; +} + + +/******************************************************************** + * + * Connects an application to the session specified by the DPLCONNECTION + * structure currently stored with the DirectPlayLobby object. + * + * Returns an IDirectPlay interface. + * + */ +static HRESULT DPL_ConnectEx( IDirectPlayLobbyImpl *This, DWORD dwFlags, REFIID riid, void **lplpDP, + IUnknown* pUnk) +{ + HRESULT hr; + DWORD dwOpenFlags = 0; + DWORD dwConnSize = 0; + LPDPLCONNECTION lpConn; + + FIXME("(%p)->(0x%08x,%p,%p): semi stub\n", This, dwFlags, lplpDP, pUnk ); + + if( pUnk ) + { + return DPERR_INVALIDPARAMS; + } + + /* Backwards compatibility */ + if( dwFlags == 0 ) + { + dwFlags = DPCONNECT_RETURNSTATUS; + } + + if ( ( hr = dplay_create( riid, lplpDP ) ) != DP_OK ) + { + ERR( "error creating interface for %s:%s.\n", + debugstr_guid( riid ), DPLAYX_HresultToString( hr ) ); + return hr; + } + + /* FIXME: Is it safe/correct to use appID of 0? */ + hr = IDirectPlayLobby_GetConnectionSettings( &This->IDirectPlayLobby3_iface, + 0, NULL, &dwConnSize ); + if( hr != DPERR_BUFFERTOOSMALL ) + { + return hr; + } + + lpConn = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwConnSize ); + + if( lpConn == NULL ) + { + return DPERR_NOMEMORY; + } + + /* FIXME: Is it safe/correct to use appID of 0? */ + hr = IDirectPlayLobby_GetConnectionSettings( &This->IDirectPlayLobby3_iface, + 0, lpConn, &dwConnSize ); + if( FAILED( hr ) ) + { + HeapFree( GetProcessHeap(), 0, lpConn ); + return hr; + } + +#if 0 + /* - Need to call IDirectPlay::EnumConnections with the service provider to get that good information + * - Need to call CreateAddress to create the lpConnection param for IDirectPlay::InitializeConnection + * - Call IDirectPlay::InitializeConnection + */ + + /* Now initialize the Service Provider */ + hr = IDirectPlayX_InitializeConnection( (*(LPDIRECTPLAY2*)lplpDP), +#endif + + + /* Setup flags to pass into DirectPlay::Open */ + if( dwFlags & DPCONNECT_RETURNSTATUS ) + { + dwOpenFlags |= DPOPEN_RETURNSTATUS; + } + dwOpenFlags |= lpConn->dwFlags; + + hr = IDirectPlayX_Open( (*(LPDIRECTPLAY2*)lplpDP), lpConn->lpSessionDesc, + dwOpenFlags ); + + HeapFree( GetProcessHeap(), 0, lpConn ); + + return hr; +} + +static HRESULT WINAPI IDirectPlayLobbyAImpl_Connect( IDirectPlayLobbyA *iface, DWORD flags, + IDirectPlay2A **dp, IUnknown *unk ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobbyA( iface ); + return IDirectPlayLobby_Connect( &This->IDirectPlayLobby3A_iface, flags, dp, unk ); +} + +static HRESULT WINAPI IDirectPlayLobbyImpl_Connect( IDirectPlayLobby *iface, DWORD flags, + IDirectPlay2A **dp, IUnknown *unk ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby( iface ); + return IDirectPlayLobby_Connect( &This->IDirectPlayLobby3_iface, flags, dp, unk ); +} + +static HRESULT WINAPI IDirectPlayLobby2AImpl_Connect( IDirectPlayLobby2A *iface, DWORD flags, + IDirectPlay2A **dp, IUnknown *unk ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2A( iface ); + return IDirectPlayLobby_Connect( &This->IDirectPlayLobby3A_iface, flags, dp, unk ); +} + +static HRESULT WINAPI IDirectPlayLobby2Impl_Connect( IDirectPlayLobby2 *iface, DWORD flags, + IDirectPlay2A **dp, IUnknown *unk ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2( iface ); + return IDirectPlayLobby_Connect( &This->IDirectPlayLobby3_iface, flags, dp, unk ); +} + +static HRESULT WINAPI IDirectPlayLobby3AImpl_Connect( IDirectPlayLobby3A *iface, DWORD flags, + IDirectPlay2A **dp, IUnknown *unk) +{ + return IDirectPlayLobby_ConnectEx( iface, flags, &IID_IDirectPlay2A, (void**)dp, unk ); +} + +static HRESULT WINAPI IDirectPlayLobby3Impl_Connect( IDirectPlayLobby3 *iface, DWORD flags, + IDirectPlay2 **dp, IUnknown *unk) +{ + return IDirectPlayLobby_ConnectEx( iface, flags, &IID_IDirectPlay2A, (void**)dp, unk ); +} + +/******************************************************************** + * + * Creates a DirectPlay Address, given a service provider-specific network + * address. + * Returns an address contains the globally unique identifier + * (GUID) of the service provider and data that the service provider can + * interpret as a network address. + * + * NOTE: It appears that this method is supposed to be really really stupid + * with no error checking on the contents. + */ +static HRESULT WINAPI IDirectPlayLobbyAImpl_CreateAddress( IDirectPlayLobbyA *iface, REFGUID sp, + REFGUID datatype, const void *data, DWORD datasize, void *address, DWORD *addrsize ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobbyA( iface ); + return IDirectPlayLobby_CreateAddress( &This->IDirectPlayLobby3A_iface, sp, datatype, data, + datasize, address, addrsize ); +} + +static HRESULT WINAPI IDirectPlayLobbyImpl_CreateAddress( IDirectPlayLobby *iface, REFGUID sp, + REFGUID datatype, const void *data, DWORD datasize, void *address, DWORD *addrsize ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby( iface ); + return IDirectPlayLobby_CreateAddress( &This->IDirectPlayLobby3_iface, sp, datatype, data, + datasize, address, addrsize ); +} + +static HRESULT WINAPI IDirectPlayLobby2AImpl_CreateAddress( IDirectPlayLobby2A *iface, REFGUID sp, + REFGUID datatype, const void *data, DWORD datasize, void *address, DWORD *addrsize ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2A( iface ); + return IDirectPlayLobby_CreateAddress( &This->IDirectPlayLobby3A_iface, sp, datatype, data, + datasize, address, addrsize ); +} + +static HRESULT WINAPI IDirectPlayLobby2Impl_CreateAddress( IDirectPlayLobby2 *iface, REFGUID sp, + REFGUID datatype, const void *data, DWORD datasize, void *address, DWORD *addrsize ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2( iface ); + return IDirectPlayLobby_CreateAddress( &This->IDirectPlayLobby3_iface, sp, datatype, data, + datasize, address, addrsize ); +} + +static HRESULT WINAPI IDirectPlayLobby3AImpl_CreateAddress( IDirectPlayLobby3A *iface, + REFGUID guidSP, REFGUID guidDataType, const void *lpData, DWORD dwDataSize, void *lpAddress, + DWORD *lpdwAddressSize ) +{ + return DPL_CreateAddress( guidSP, guidDataType, lpData, dwDataSize, + lpAddress, lpdwAddressSize, TRUE ); +} + +static HRESULT WINAPI IDirectPlayLobby3Impl_CreateAddress( IDirectPlayLobby3 *iface, REFGUID guidSP, + REFGUID guidDataType, const void *lpData, DWORD dwDataSize, void *lpAddress, + DWORD *lpdwAddressSize ) +{ + return DPL_CreateAddress( guidSP, guidDataType, lpData, dwDataSize, + lpAddress, lpdwAddressSize, FALSE ); +} + +static HRESULT DPL_CreateAddress( + REFGUID guidSP, + REFGUID guidDataType, + LPCVOID lpData, + DWORD dwDataSize, + LPVOID lpAddress, + LPDWORD lpdwAddressSize, + BOOL bAnsiInterface ) +{ + const DWORD dwNumAddElements = 2; /* Service Provide & address data type */ + DPCOMPOUNDADDRESSELEMENT addressElements[ 2 /* dwNumAddElements */ ]; + + TRACE( "(%p)->(%p,%p,0x%08x,%p,%p,%d)\n", guidSP, guidDataType, lpData, dwDataSize, + lpAddress, lpdwAddressSize, bAnsiInterface ); + + addressElements[ 0 ].guidDataType = DPAID_ServiceProvider; + addressElements[ 0 ].dwDataSize = sizeof( GUID ); + addressElements[ 0 ].lpData = (LPVOID)guidSP; + + addressElements[ 1 ].guidDataType = *guidDataType; + addressElements[ 1 ].dwDataSize = dwDataSize; + addressElements[ 1 ].lpData = (LPVOID)lpData; + + /* Call CreateCompoundAddress to cut down on code. + NOTE: We can do this because we don't support DPL 1 interfaces! */ + return DPL_CreateCompoundAddress( addressElements, dwNumAddElements, + lpAddress, lpdwAddressSize, bAnsiInterface ); +} + + + +/******************************************************************** + * + * Parses out chunks from the DirectPlay Address buffer by calling the + * given callback function, with lpContext, for each of the chunks. + * + */ +static HRESULT WINAPI IDirectPlayLobbyAImpl_EnumAddress( IDirectPlayLobbyA *iface, + LPDPENUMADDRESSCALLBACK enumaddrcb, const void *address, DWORD size, void *context ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobbyA( iface ); + return IDirectPlayLobby_EnumAddress( &This->IDirectPlayLobby3A_iface, enumaddrcb, address, size, + context ); +} + +static HRESULT WINAPI IDirectPlayLobbyImpl_EnumAddress( IDirectPlayLobby *iface, + LPDPENUMADDRESSCALLBACK enumaddrcb, const void *address, DWORD size, void *context ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby( iface ); + return IDirectPlayLobby_EnumAddress( &This->IDirectPlayLobby3_iface, enumaddrcb, address, size, + context ); +} + +static HRESULT WINAPI IDirectPlayLobby2AImpl_EnumAddress( IDirectPlayLobby2A *iface, + LPDPENUMADDRESSCALLBACK enumaddrcb, const void *address, DWORD size, void *context ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2A( iface ); + return IDirectPlayLobby_EnumAddress( &This->IDirectPlayLobby3A_iface, enumaddrcb, address, size, + context ); +} + +static HRESULT WINAPI IDirectPlayLobby2Impl_EnumAddress( IDirectPlayLobby2 *iface, + LPDPENUMADDRESSCALLBACK enumaddrcb, const void *address, DWORD size, void *context ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2( iface ); + return IDirectPlayLobby_EnumAddress( &This->IDirectPlayLobby3_iface, enumaddrcb, address, size, + context ); +} + +static HRESULT WINAPI IDirectPlayLobby3AImpl_EnumAddress( IDirectPlayLobby3A *iface, + LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, const void *lpAddress, DWORD dwAddressSize, + void *lpContext ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3A( iface ); + + TRACE("(%p)->(%p,%p,0x%08x,%p)\n", This, lpEnumAddressCallback, lpAddress, + dwAddressSize, lpContext ); + + return DPL_EnumAddress( lpEnumAddressCallback, lpAddress, dwAddressSize, lpContext ); +} + +static HRESULT WINAPI IDirectPlayLobby3Impl_EnumAddress( IDirectPlayLobby3 *iface, + LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, const void *lpAddress, DWORD dwAddressSize, + void *lpContext ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3( iface ); + + TRACE("(%p)->(%p,%p,0x%08x,%p)\n", This, lpEnumAddressCallback, lpAddress, + dwAddressSize, lpContext ); + + return DPL_EnumAddress( lpEnumAddressCallback, lpAddress, dwAddressSize, lpContext ); +} + +HRESULT DPL_EnumAddress( LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, LPCVOID lpAddress, + DWORD dwAddressSize, LPVOID lpContext ) +{ + DWORD dwTotalSizeEnumerated = 0; + + /* FIXME: First chunk is always the total size chunk - Should we report it? */ + + while ( dwTotalSizeEnumerated < dwAddressSize ) + { + const DPADDRESS* lpElements = lpAddress; + DWORD dwSizeThisEnumeration; + + /* Invoke the enum method. If false is returned, stop enumeration */ + if ( !lpEnumAddressCallback( &lpElements->guidDataType, + lpElements->dwDataSize, + (const BYTE *)lpElements + sizeof( DPADDRESS ), + lpContext ) ) + { + break; + } + + dwSizeThisEnumeration = sizeof( DPADDRESS ) + lpElements->dwDataSize; + lpAddress = (const BYTE*) lpAddress + dwSizeThisEnumeration; + dwTotalSizeEnumerated += dwSizeThisEnumeration; + } + + return DP_OK; +} + +/******************************************************************** + * + * Enumerates all the address types that a given service provider needs to + * build the DirectPlay Address. + * + */ +static HRESULT WINAPI IDirectPlayLobbyAImpl_EnumAddressTypes( IDirectPlayLobbyA *iface, + LPDPLENUMADDRESSTYPESCALLBACK enumaddrtypecb, REFGUID sp, void *context, DWORD flags ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobbyA( iface ); + return IDirectPlayLobby_EnumAddressTypes( &This->IDirectPlayLobby3A_iface, enumaddrtypecb, sp, + context, flags ); +} + +static HRESULT WINAPI IDirectPlayLobbyImpl_EnumAddressTypes( IDirectPlayLobby *iface, + LPDPLENUMADDRESSTYPESCALLBACK enumaddrtypecb, REFGUID sp, void *context, DWORD flags ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby( iface ); + return IDirectPlayLobby_EnumAddressTypes( &This->IDirectPlayLobby3_iface, enumaddrtypecb, sp, + context, flags ); +} + +static HRESULT WINAPI IDirectPlayLobby2AImpl_EnumAddressTypes( IDirectPlayLobby2A *iface, + LPDPLENUMADDRESSTYPESCALLBACK enumaddrtypecb, REFGUID sp, void *context, DWORD flags ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2A( iface ); + return IDirectPlayLobby_EnumAddressTypes( &This->IDirectPlayLobby3A_iface, enumaddrtypecb, sp, + context, flags ); +} + +static HRESULT WINAPI IDirectPlayLobby2Impl_EnumAddressTypes( IDirectPlayLobby2 *iface, + LPDPLENUMADDRESSTYPESCALLBACK enumaddrtypecb, REFGUID sp, void *context, DWORD flags ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2( iface ); + return IDirectPlayLobby_EnumAddressTypes( &This->IDirectPlayLobby3_iface, enumaddrtypecb, sp, + context, flags ); +} + +static HRESULT WINAPI IDirectPlayLobby3AImpl_EnumAddressTypes( IDirectPlayLobby3A *iface, + LPDPLENUMADDRESSTYPESCALLBACK lpEnumAddressTypeCallback, REFGUID guidSP, void *lpContext, + DWORD dwFlags ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3A( iface ); + + HKEY hkResult; + LPCSTR searchSubKey = "SOFTWARE\\Microsoft\\DirectPlay\\Service Providers"; + DWORD dwIndex, sizeOfSubKeyName=50; + char subKeyName[51]; + FILETIME filetime; + + TRACE(" (%p)->(%p,%p,%p,0x%08x)\n", This, lpEnumAddressTypeCallback, guidSP, lpContext, dwFlags ); + + if( dwFlags != 0 ) + { + return DPERR_INVALIDPARAMS; + } + + if( !lpEnumAddressTypeCallback ) + { + return DPERR_INVALIDPARAMS; + } + + if( guidSP == NULL ) + { + return DPERR_INVALIDOBJECT; + } + + /* Need to loop over the service providers in the registry */ + if( RegOpenKeyExA( HKEY_LOCAL_MACHINE, searchSubKey, + 0, KEY_READ, &hkResult ) != ERROR_SUCCESS ) + { + /* Hmmm. Does this mean that there are no service providers? */ + ERR(": no service providers?\n"); + return DP_OK; + } + + /* Traverse all the service providers we have available */ + for( dwIndex=0; + RegEnumKeyExA( hkResult, dwIndex, subKeyName, &sizeOfSubKeyName, + NULL, NULL, NULL, &filetime ) != ERROR_NO_MORE_ITEMS; + ++dwIndex, sizeOfSubKeyName=50 ) + { + + HKEY hkServiceProvider, hkServiceProviderAt; + GUID serviceProviderGUID; + DWORD returnTypeGUID, sizeOfReturnBuffer = 50; + char atSubKey[51]; + char returnBuffer[51]; + WCHAR buff[51]; + DWORD dwAtIndex; + LPCSTR atKey = "Address Types"; + LPCSTR guidDataSubKey = "Guid"; + FILETIME filetime; + + + TRACE(" this time through: %s\n", subKeyName ); + + /* Get a handle for this particular service provider */ + if( RegOpenKeyExA( hkResult, subKeyName, 0, KEY_READ, + &hkServiceProvider ) != ERROR_SUCCESS ) + { + ERR(": what the heck is going on?\n" ); + continue; + } + + if( RegQueryValueExA( hkServiceProvider, guidDataSubKey, + NULL, &returnTypeGUID, (LPBYTE)returnBuffer, + &sizeOfReturnBuffer ) != ERROR_SUCCESS ) + { + ERR(": missing GUID registry data members\n" ); + continue; + } + + /* FIXME: Check return types to ensure we're interpreting data right */ + MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) ); + CLSIDFromString( buff, &serviceProviderGUID ); + /* FIXME: Have I got a memory leak on the serviceProviderGUID? */ + + /* Determine if this is the Service Provider that the user asked for */ + if( !IsEqualGUID( &serviceProviderGUID, guidSP ) ) + { + continue; + } + + /* Get a handle for this particular service provider */ + if( RegOpenKeyExA( hkServiceProvider, atKey, 0, KEY_READ, + &hkServiceProviderAt ) != ERROR_SUCCESS ) + { + TRACE(": No Address Types registry data sub key/members\n" ); + break; + } + + /* Traverse all the address type we have available */ + for( dwAtIndex=0; + RegEnumKeyExA( hkServiceProviderAt, dwAtIndex, atSubKey, &sizeOfSubKeyName, + NULL, NULL, NULL, &filetime ) != ERROR_NO_MORE_ITEMS; + ++dwAtIndex, sizeOfSubKeyName=50 ) + { + TRACE( "Found Address Type GUID %s\n", atSubKey ); + + /* FIXME: Check return types to ensure we're interpreting data right */ + MultiByteToWideChar( CP_ACP, 0, atSubKey, -1, buff, sizeof(buff)/sizeof(WCHAR) ); + CLSIDFromString( buff, &serviceProviderGUID ); + /* FIXME: Have I got a memory leak on the serviceProviderGUID? */ + + /* The enumeration will return FALSE if we are not to continue */ + if( !lpEnumAddressTypeCallback( &serviceProviderGUID, lpContext, 0 ) ) + { + WARN("lpEnumCallback returning FALSE\n" ); + break; /* FIXME: This most likely has to break from the procedure...*/ + } + + } + + /* We only enumerate address types for 1 GUID. We've found it, so quit looking */ + break; + } + + return DP_OK; +} + +static HRESULT WINAPI IDirectPlayLobby3Impl_EnumAddressTypes( IDirectPlayLobby3 *iface, + LPDPLENUMADDRESSTYPESCALLBACK enumaddrtypecb, REFGUID sp, void *context, DWORD flags ) +{ + FIXME(":stub\n"); + return DPERR_OUTOFMEMORY; +} + +/******************************************************************** + * + * Enumerates what applications are registered with DirectPlay by + * invoking the callback function with lpContext. + * + */ +static HRESULT WINAPI IDirectPlayLobby3Impl_EnumLocalApplications( IDirectPlayLobby3 *iface, + LPDPLENUMLOCALAPPLICATIONSCALLBACK lpEnumLocalAppCallback, void *lpContext, DWORD dwFlags ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3( iface ); + + FIXME("(%p)->(%p,%p,0x%08x):stub\n", This, lpEnumLocalAppCallback, lpContext, dwFlags ); + + return DPERR_OUTOFMEMORY; +} + +static HRESULT WINAPI IDirectPlayLobbyAImpl_EnumLocalApplications( IDirectPlayLobbyA *iface, + LPDPLENUMLOCALAPPLICATIONSCALLBACK enumlocalappcb, void *context, DWORD flags ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobbyA( iface ); + return IDirectPlayLobby_EnumLocalApplications( &This->IDirectPlayLobby3A_iface, enumlocalappcb, + context, flags ); +} + +static HRESULT WINAPI IDirectPlayLobbyImpl_EnumLocalApplications( IDirectPlayLobby *iface, + LPDPLENUMLOCALAPPLICATIONSCALLBACK enumlocalappcb, void *context, DWORD flags ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby( iface ); + return IDirectPlayLobby_EnumLocalApplications( &This->IDirectPlayLobby3_iface, enumlocalappcb, + context, flags ); +} + +static HRESULT WINAPI IDirectPlayLobby2AImpl_EnumLocalApplications( IDirectPlayLobby2A *iface, + LPDPLENUMLOCALAPPLICATIONSCALLBACK enumlocalappcb, void *context, DWORD flags ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2A( iface ); + return IDirectPlayLobby_EnumLocalApplications( &This->IDirectPlayLobby3A_iface, enumlocalappcb, + context, flags ); +} + +static HRESULT WINAPI IDirectPlayLobby2Impl_EnumLocalApplications( IDirectPlayLobby2 *iface, + LPDPLENUMLOCALAPPLICATIONSCALLBACK enumlocalappcb, void *context, DWORD flags ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2( iface ); + return IDirectPlayLobby_EnumLocalApplications( &This->IDirectPlayLobby3_iface, enumlocalappcb, + context, flags ); +} + +static HRESULT WINAPI IDirectPlayLobby3AImpl_EnumLocalApplications( IDirectPlayLobby3A *iface, + LPDPLENUMLOCALAPPLICATIONSCALLBACK lpEnumLocalAppCallback, void *lpContext, DWORD dwFlags ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3A( iface ); + + HKEY hkResult; + LPCSTR searchSubKey = "SOFTWARE\\Microsoft\\DirectPlay\\Applications"; + LPCSTR guidDataSubKey = "Guid"; + DWORD dwIndex, sizeOfSubKeyName=50; + char subKeyName[51]; + FILETIME filetime; + + TRACE("(%p)->(%p,%p,0x%08x)\n", This, lpEnumLocalAppCallback, lpContext, dwFlags ); + + if( dwFlags != 0 ) + { + return DPERR_INVALIDPARAMS; + } + + if( !lpEnumLocalAppCallback ) + { + return DPERR_INVALIDPARAMS; + } + + /* Need to loop over the service providers in the registry */ + if( RegOpenKeyExA( HKEY_LOCAL_MACHINE, searchSubKey, + 0, KEY_READ, &hkResult ) != ERROR_SUCCESS ) + { + /* Hmmm. Does this mean that there are no service providers? */ + ERR(": no service providers?\n"); + return DP_OK; + } + + /* Traverse all registered applications */ + for( dwIndex=0; + RegEnumKeyExA( hkResult, dwIndex, subKeyName, &sizeOfSubKeyName, NULL, NULL, NULL, &filetime ) != ERROR_NO_MORE_ITEMS; + ++dwIndex, sizeOfSubKeyName=50 ) + { + + HKEY hkServiceProvider; + GUID serviceProviderGUID; + DWORD returnTypeGUID, sizeOfReturnBuffer = 50; + char returnBuffer[51]; + WCHAR buff[51]; + DPLAPPINFO dplAppInfo; + + TRACE(" this time through: %s\n", subKeyName ); + + /* Get a handle for this particular service provider */ + if( RegOpenKeyExA( hkResult, subKeyName, 0, KEY_READ, + &hkServiceProvider ) != ERROR_SUCCESS ) + { + ERR(": what the heck is going on?\n" ); + continue; + } + + if( RegQueryValueExA( hkServiceProvider, guidDataSubKey, + NULL, &returnTypeGUID, (LPBYTE)returnBuffer, + &sizeOfReturnBuffer ) != ERROR_SUCCESS ) + { + ERR(": missing GUID registry data members\n" ); + continue; + } + + /* FIXME: Check return types to ensure we're interpreting data right */ + MultiByteToWideChar( CP_ACP, 0, returnBuffer, -1, buff, sizeof(buff)/sizeof(WCHAR) ); + CLSIDFromString( buff, &serviceProviderGUID ); + /* FIXME: Have I got a memory leak on the serviceProviderGUID? */ + + dplAppInfo.dwSize = sizeof( dplAppInfo ); + dplAppInfo.guidApplication = serviceProviderGUID; + dplAppInfo.u.lpszAppNameA = subKeyName; + + EnterCriticalSection( &This->lock ); + + memcpy( &This->cbkeyhack, &hkServiceProvider, sizeof( hkServiceProvider ) ); + + if( !lpEnumLocalAppCallback( &dplAppInfo, lpContext, dwFlags ) ) + { + LeaveCriticalSection( &This->lock ); + break; + } + + LeaveCriticalSection( &This->lock ); + } + + return DP_OK; +} + +/******************************************************************** + * + * Retrieves the DPLCONNECTION structure that contains all the information + * needed to start and connect an application. This was generated using + * either the RunApplication or SetConnectionSettings methods. + * + * NOTES: If lpData is NULL then just return lpdwDataSize. This allows + * the data structure to be allocated by our caller which can then + * call this procedure/method again with a valid data pointer. + */ +static HRESULT WINAPI IDirectPlayLobbyAImpl_GetConnectionSettings( IDirectPlayLobbyA *iface, + DWORD appid, void *data, DWORD *size ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobbyA( iface ); + return IDirectPlayLobby_GetConnectionSettings( &This->IDirectPlayLobby3A_iface, appid, data, + size ); +} + +static HRESULT WINAPI IDirectPlayLobbyImpl_GetConnectionSettings( IDirectPlayLobby *iface, + DWORD appid, void *data, DWORD *size ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby( iface ); + return IDirectPlayLobby_GetConnectionSettings( &This->IDirectPlayLobby3_iface, appid, data, + size ); +} + +static HRESULT WINAPI IDirectPlayLobby2AImpl_GetConnectionSettings( IDirectPlayLobby2A *iface, + DWORD appid, void *data, DWORD *size ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2A( iface ); + return IDirectPlayLobby_GetConnectionSettings( &This->IDirectPlayLobby3A_iface, appid, data, + size ); +} + +static HRESULT WINAPI IDirectPlayLobby2Impl_GetConnectionSettings( IDirectPlayLobby2 *iface, + DWORD appid, void *data, DWORD *size ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2( iface ); + return IDirectPlayLobby_GetConnectionSettings( &This->IDirectPlayLobby3_iface, appid, data, + size ); +} + +static HRESULT WINAPI IDirectPlayLobby3AImpl_GetConnectionSettings( IDirectPlayLobby3A *iface, + DWORD dwAppID, void *lpData, DWORD *lpdwDataSize ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3A( iface ); + HRESULT hr; + + TRACE("(%p)->(0x%08x,%p,%p)\n", This, dwAppID, lpData, lpdwDataSize ); + + EnterCriticalSection( &This->lock ); + + hr = DPLAYX_GetConnectionSettingsA( dwAppID, + lpData, + lpdwDataSize + ); + + LeaveCriticalSection( &This->lock ); + + return hr; +} + +static HRESULT WINAPI IDirectPlayLobby3Impl_GetConnectionSettings( IDirectPlayLobby3 *iface, + DWORD dwAppID, void *lpData, DWORD *lpdwDataSize ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3( iface ); + HRESULT hr; + + TRACE("(%p)->(0x%08x,%p,%p)\n", This, dwAppID, lpData, lpdwDataSize ); + + EnterCriticalSection( &This->lock ); + + hr = DPLAYX_GetConnectionSettingsW( dwAppID, + lpData, + lpdwDataSize + ); + + LeaveCriticalSection( &This->lock ); + + return hr; +} + +/******************************************************************** + * + * Retrieves the message sent between a lobby client and a DirectPlay + * application. All messages are queued until received. + * + */ +static HRESULT WINAPI IDirectPlayLobbyAImpl_ReceiveLobbyMessage( IDirectPlayLobbyA *iface, + DWORD flags, DWORD appid, DWORD *msgflags, void *data, DWORD *size ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobbyA( iface ); + return IDirectPlayLobby_ReceiveLobbyMessage( &This->IDirectPlayLobby3A_iface, flags, appid, + msgflags, data, size ); +} + +static HRESULT WINAPI IDirectPlayLobbyImpl_ReceiveLobbyMessage( IDirectPlayLobby *iface, + DWORD flags, DWORD appid, DWORD *msgflags, void *data, DWORD *size ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby( iface ); + return IDirectPlayLobby_ReceiveLobbyMessage( &This->IDirectPlayLobby3_iface, flags, appid, + msgflags, data, size ); +} + +static HRESULT WINAPI IDirectPlayLobby2AImpl_ReceiveLobbyMessage( IDirectPlayLobby2A *iface, + DWORD flags, DWORD appid, DWORD *msgflags, void *data, DWORD *size ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2A( iface ); + return IDirectPlayLobby_ReceiveLobbyMessage( &This->IDirectPlayLobby3A_iface, flags, appid, + msgflags, data, size ); +} + +static HRESULT WINAPI IDirectPlayLobby2Impl_ReceiveLobbyMessage( IDirectPlayLobby2 *iface, + DWORD flags, DWORD appid, DWORD *msgflags, void *data, DWORD *size ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2( iface ); + return IDirectPlayLobby_ReceiveLobbyMessage( &This->IDirectPlayLobby3_iface, flags, appid, + msgflags, data, size ); +} + +static HRESULT WINAPI IDirectPlayLobby3AImpl_ReceiveLobbyMessage( IDirectPlayLobby3A *iface, + DWORD dwFlags, DWORD dwAppID, DWORD *lpdwMessageFlags, void *lpData, + DWORD *lpdwDataSize ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3A( iface ); + FIXME(":stub %p %08x %08x %p %p %p\n", This, dwFlags, dwAppID, lpdwMessageFlags, lpData, + lpdwDataSize ); + return DPERR_OUTOFMEMORY; +} + +static HRESULT WINAPI IDirectPlayLobby3Impl_ReceiveLobbyMessage( IDirectPlayLobby3 *iface, + DWORD dwFlags, DWORD dwAppID, DWORD *lpdwMessageFlags, void *lpData, + DWORD *lpdwDataSize ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3( iface ); + FIXME(":stub %p %08x %08x %p %p %p\n", This, dwFlags, dwAppID, lpdwMessageFlags, lpData, + lpdwDataSize ); + return DPERR_OUTOFMEMORY; +} + +typedef struct tagRunApplicationEnumStruct +{ + IDirectPlayLobbyImpl *This; + + GUID appGUID; + LPSTR lpszPath; + LPSTR lpszFileName; + LPSTR lpszCommandLine; + LPSTR lpszCurrentDirectory; +} RunApplicationEnumStruct, *lpRunApplicationEnumStruct; + +/* To be called by RunApplication to find how to invoke the function */ +static BOOL CALLBACK RunApplicationA_EnumLocalApplications +( LPCDPLAPPINFO lpAppInfo, + LPVOID lpContext, + DWORD dwFlags ) +{ + lpRunApplicationEnumStruct lpData = (lpRunApplicationEnumStruct)lpContext; + + if( IsEqualGUID( &lpAppInfo->guidApplication, &lpData->appGUID ) ) + { + char returnBuffer[200]; + DWORD returnType, sizeOfReturnBuffer; + LPCSTR clSubKey = "CommandLine"; + LPCSTR cdSubKey = "CurrentDirectory"; + LPCSTR fileSubKey = "File"; + LPCSTR pathSubKey = "Path"; + + /* FIXME: Lazy man hack - dplay struct has the present reg key saved */ + + sizeOfReturnBuffer = 200; + + /* Get all the appropriate data from the registry */ + if( RegQueryValueExA( lpData->This->cbkeyhack, clSubKey, + NULL, &returnType, (LPBYTE)returnBuffer, + &sizeOfReturnBuffer ) != ERROR_SUCCESS ) + { + ERR( ": missing CommandLine registry data member\n" ); + } + else + { + if ((lpData->lpszCommandLine = HeapAlloc( GetProcessHeap(), 0, strlen(returnBuffer)+1 ))) + strcpy( lpData->lpszCommandLine, returnBuffer ); + } + + sizeOfReturnBuffer = 200; + + if( RegQueryValueExA( lpData->This->cbkeyhack, cdSubKey, + NULL, &returnType, (LPBYTE)returnBuffer, + &sizeOfReturnBuffer ) != ERROR_SUCCESS ) + { + ERR( ": missing CurrentDirectory registry data member\n" ); + } + else + { + if ((lpData->lpszCurrentDirectory = HeapAlloc( GetProcessHeap(), 0, strlen(returnBuffer)+1 ))) + strcpy( lpData->lpszCurrentDirectory, returnBuffer ); + } + + sizeOfReturnBuffer = 200; + + if( RegQueryValueExA( lpData->This->cbkeyhack, fileSubKey, + NULL, &returnType, (LPBYTE)returnBuffer, + &sizeOfReturnBuffer ) != ERROR_SUCCESS ) + { + ERR( ": missing File registry data member\n" ); + } + else + { + if ((lpData->lpszFileName = HeapAlloc( GetProcessHeap(), 0, strlen(returnBuffer)+1 ))) + strcpy( lpData->lpszFileName, returnBuffer ); + } + + sizeOfReturnBuffer = 200; + + if( RegQueryValueExA( lpData->This->cbkeyhack, pathSubKey, + NULL, &returnType, (LPBYTE)returnBuffer, + &sizeOfReturnBuffer ) != ERROR_SUCCESS ) + { + ERR( ": missing Path registry data member\n" ); + } + else + { + if ((lpData->lpszPath = HeapAlloc( GetProcessHeap(), 0, strlen(returnBuffer)+1 ))) + strcpy( lpData->lpszPath, returnBuffer ); + } + + return FALSE; /* No need to keep going as we found what we wanted */ + } + + return TRUE; /* Keep enumerating, haven't found the application yet */ +} + +static BOOL DPL_CreateAndSetLobbyHandles( DWORD dwDestProcessId, HANDLE hDestProcess, + LPHANDLE lphStart, LPHANDLE lphDeath, + LPHANDLE lphRead ) +{ + /* These are the handles for the created process */ + HANDLE hAppStart = 0, hAppDeath = 0, hAppRead = 0; + SECURITY_ATTRIBUTES s_attrib; + + s_attrib.nLength = sizeof( s_attrib ); + s_attrib.lpSecurityDescriptor = NULL; + s_attrib.bInheritHandle = TRUE; + + *lphStart = CreateEventW( &s_attrib, TRUE, FALSE, NULL ); + *lphDeath = CreateEventW( &s_attrib, TRUE, FALSE, NULL ); + *lphRead = CreateEventW( &s_attrib, TRUE, FALSE, NULL ); + + if( ( !DuplicateHandle( GetCurrentProcess(), *lphStart, + hDestProcess, &hAppStart, + 0, FALSE, DUPLICATE_SAME_ACCESS ) ) || + ( !DuplicateHandle( GetCurrentProcess(), *lphDeath, + hDestProcess, &hAppDeath, + 0, FALSE, DUPLICATE_SAME_ACCESS ) ) || + ( !DuplicateHandle( GetCurrentProcess(), *lphRead, + hDestProcess, &hAppRead, + 0, FALSE, DUPLICATE_SAME_ACCESS ) ) + ) + { + if (*lphStart) { CloseHandle(*lphStart); *lphStart = 0; } + if (*lphDeath) { CloseHandle(*lphDeath); *lphDeath = 0; } + if (*lphRead) { CloseHandle(*lphRead); *lphRead = 0; } + /* FIXME: Handle leak... */ + ERR( "Unable to dup handles\n" ); + return FALSE; + } + + if( !DPLAYX_SetLobbyHandles( dwDestProcessId, + hAppStart, hAppDeath, hAppRead ) ) + { + /* FIXME: Handle leak... */ + return FALSE; + } + + return TRUE; +} + + +/******************************************************************** + * + * Starts an application and passes to it all the information to + * connect to a session. + * + */ +static HRESULT WINAPI IDirectPlayLobbyAImpl_RunApplication( IDirectPlayLobbyA *iface, DWORD flags, + DWORD *appid, DPLCONNECTION *conn, HANDLE event ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobbyA( iface ); + return IDirectPlayLobby_RunApplication( &This->IDirectPlayLobby3A_iface, flags, appid, conn, + event ); +} + +static HRESULT WINAPI IDirectPlayLobbyImpl_RunApplication( IDirectPlayLobby *iface, DWORD flags, + DWORD *appid, DPLCONNECTION *conn, HANDLE event ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby( iface ); + return IDirectPlayLobby_RunApplication( &This->IDirectPlayLobby3_iface, flags, appid, conn, + event ); +} + +static HRESULT WINAPI IDirectPlayLobby2AImpl_RunApplication( IDirectPlayLobby2A *iface, DWORD flags, + DWORD *appid, DPLCONNECTION *conn, HANDLE event ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2A( iface ); + return IDirectPlayLobby_RunApplication( &This->IDirectPlayLobby3A_iface, flags, appid, conn, + event ); +} + +static HRESULT WINAPI IDirectPlayLobby2Impl_RunApplication( IDirectPlayLobby2 *iface, DWORD flags, + DWORD *appid, DPLCONNECTION *conn, HANDLE event ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2( iface ); + return IDirectPlayLobby_RunApplication( &This->IDirectPlayLobby3_iface, flags, appid, conn, + event ); +} + +static HRESULT WINAPI IDirectPlayLobby3AImpl_RunApplication( IDirectPlayLobby3A *iface, + DWORD dwFlags, DWORD *lpdwAppID, DPLCONNECTION *lpConn, HANDLE hReceiveEvent ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3A( iface ); + HRESULT hr; + RunApplicationEnumStruct enumData; + char temp[200]; + STARTUPINFOA startupInfo; + PROCESS_INFORMATION newProcessInfo; + LPSTR appName; + DWORD dwSuspendCount; + HANDLE hStart, hDeath, hSettingRead; + + TRACE( "(%p)->(0x%08x,%p,%p,%p)\n", + This, dwFlags, lpdwAppID, lpConn, hReceiveEvent ); + + if( dwFlags != 0 ) + { + return DPERR_INVALIDPARAMS; + } + + if( DPLAYX_AnyLobbiesWaitingForConnSettings() ) + { + FIXME( "Waiting lobby not being handled correctly\n" ); + } + + EnterCriticalSection( &This->lock ); + + ZeroMemory( &enumData, sizeof( enumData ) ); + enumData.This = This; + enumData.appGUID = lpConn->lpSessionDesc->guidApplication; + + /* Our callback function will fill up the enumData structure with all the information + required to start a new process */ + IDirectPlayLobby_EnumLocalApplications( iface, RunApplicationA_EnumLocalApplications, + (&enumData), 0 ); + + /* First the application name */ + strcpy( temp, enumData.lpszPath ); + strcat( temp, "\\" ); + strcat( temp, enumData.lpszFileName ); + HeapFree( GetProcessHeap(), 0, enumData.lpszPath ); + HeapFree( GetProcessHeap(), 0, enumData.lpszFileName ); + if ((appName = HeapAlloc( GetProcessHeap(), 0, strlen(temp)+1 ))) strcpy( appName, temp ); + + /* Now the command line */ + strcat( temp, " " ); + strcat( temp, enumData.lpszCommandLine ); + HeapFree( GetProcessHeap(), 0, enumData.lpszCommandLine ); + if ((enumData.lpszCommandLine = HeapAlloc( GetProcessHeap(), 0, strlen(temp)+1 ))) + strcpy( enumData.lpszCommandLine, temp ); + + ZeroMemory( &startupInfo, sizeof( startupInfo ) ); + startupInfo.cb = sizeof( startupInfo ); + /* FIXME: Should any fields be filled in? */ + + ZeroMemory( &newProcessInfo, sizeof( newProcessInfo ) ); + + if( !CreateProcessA( appName, + enumData.lpszCommandLine, + NULL, + NULL, + FALSE, + CREATE_DEFAULT_ERROR_MODE | CREATE_NEW_CONSOLE | CREATE_SUSPENDED, /* Creation Flags */ + NULL, + enumData.lpszCurrentDirectory, + &startupInfo, + &newProcessInfo + ) + ) + { + ERR( "Failed to create process for app %s\n", appName ); + + HeapFree( GetProcessHeap(), 0, appName ); + HeapFree( GetProcessHeap(), 0, enumData.lpszCommandLine ); + HeapFree( GetProcessHeap(), 0, enumData.lpszCurrentDirectory ); + + LeaveCriticalSection( &This->lock ); + return DPERR_CANTCREATEPROCESS; + } + + HeapFree( GetProcessHeap(), 0, appName ); + HeapFree( GetProcessHeap(), 0, enumData.lpszCommandLine ); + HeapFree( GetProcessHeap(), 0, enumData.lpszCurrentDirectory ); + + /* Reserve this global application id! */ + if( !DPLAYX_CreateLobbyApplication( newProcessInfo.dwProcessId ) ) + { + ERR( "Unable to create global application data for 0x%08x\n", + newProcessInfo.dwProcessId ); + } + + hr = IDirectPlayLobby_SetConnectionSettings( iface, 0, newProcessInfo.dwProcessId, lpConn ); + + if( hr != DP_OK ) + { + ERR( "SetConnectionSettings failure %s\n", DPLAYX_HresultToString( hr ) ); + LeaveCriticalSection( &This->lock ); + return hr; + } + + /* Setup the handles for application notification */ + DPL_CreateAndSetLobbyHandles( newProcessInfo.dwProcessId, + newProcessInfo.hProcess, + &hStart, &hDeath, &hSettingRead ); + + /* Setup the message thread ID */ + This->msgtid = CreateLobbyMessageReceptionThread( hReceiveEvent, hStart, hDeath, hSettingRead ); + + DPLAYX_SetLobbyMsgThreadId( newProcessInfo.dwProcessId, This->msgtid ); + + LeaveCriticalSection( &This->lock ); + + /* Everything seems to have been set correctly, update the dwAppID */ + *lpdwAppID = newProcessInfo.dwProcessId; + + /* Unsuspend the process - should return the prev suspension count */ + if( ( dwSuspendCount = ResumeThread( newProcessInfo.hThread ) ) != 1 ) + { + ERR( "ResumeThread failed with 0x%08x\n", dwSuspendCount ); + } + + return DP_OK; +} + +static HRESULT WINAPI IDirectPlayLobby3Impl_RunApplication( IDirectPlayLobby3 *iface, DWORD dwFlags, + DWORD *lpdwAppID, DPLCONNECTION *lpConn, HANDLE hReceiveEvent ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3( iface ); + FIXME( "(%p)->(0x%08x,%p,%p,%p):stub\n", This, dwFlags, lpdwAppID, lpConn, hReceiveEvent ); + return DPERR_OUTOFMEMORY; +} + +/******************************************************************** + * + * Sends a message between the application and the lobby client. + * All messages are queued until received. + * + */ +static HRESULT WINAPI IDirectPlayLobbyAImpl_SendLobbyMessage( IDirectPlayLobbyA *iface, DWORD flags, + DWORD appid, void *data, DWORD size ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobbyA( iface ); + return IDirectPlayLobby_SendLobbyMessage( &This->IDirectPlayLobby3A_iface, flags, appid, data, + size ); +} + +static HRESULT WINAPI IDirectPlayLobbyImpl_SendLobbyMessage( IDirectPlayLobby *iface, DWORD flags, + DWORD appid, void *data, DWORD size ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby( iface ); + return IDirectPlayLobby_SendLobbyMessage( &This->IDirectPlayLobby3_iface, flags, appid, data, + size ); +} + +static HRESULT WINAPI IDirectPlayLobby2AImpl_SendLobbyMessage( IDirectPlayLobby2A *iface, + DWORD flags, DWORD appid, void *data, DWORD size ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2A( iface ); + return IDirectPlayLobby_SendLobbyMessage( &This->IDirectPlayLobby3A_iface, flags, appid, data, + size ); +} + +static HRESULT WINAPI IDirectPlayLobby2Impl_SendLobbyMessage( IDirectPlayLobby2 *iface, DWORD flags, + DWORD appid, void *data, DWORD size ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2( iface ); + return IDirectPlayLobby_SendLobbyMessage( &This->IDirectPlayLobby3_iface, flags, appid, data, + size ); +} + +static HRESULT WINAPI IDirectPlayLobby3AImpl_SendLobbyMessage( IDirectPlayLobby3A *iface, + DWORD flags, DWORD appid, void *data, DWORD size ) +{ + FIXME(":stub\n"); + return DPERR_OUTOFMEMORY; +} + +static HRESULT WINAPI IDirectPlayLobby3Impl_SendLobbyMessage( IDirectPlayLobby3 *iface, + DWORD flags, DWORD appid, void *data, DWORD size ) +{ + FIXME(":stub\n"); + return DPERR_OUTOFMEMORY; +} + +/******************************************************************** + * + * Modifies the DPLCONNECTION structure to contain all information + * needed to start and connect an application. + * + */ +static HRESULT WINAPI IDirectPlayLobby3Impl_SetConnectionSettings( IDirectPlayLobby3 *iface, + DWORD dwFlags, DWORD dwAppID, DPLCONNECTION *lpConn ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3( iface ); + HRESULT hr; + + TRACE("(%p)->(0x%08x,0x%08x,%p)\n", This, dwFlags, dwAppID, lpConn ); + + EnterCriticalSection( &This->lock ); + + hr = DPLAYX_SetConnectionSettingsW( dwFlags, dwAppID, lpConn ); + + /* FIXME: Don't think that this is supposed to fail, but the documentation + is somewhat sketchy. I'll try creating a lobby application + for this... */ + if( hr == DPERR_NOTLOBBIED ) + { + FIXME( "Unlobbied app setting connections. Is this correct behavior?\n" ); + if( dwAppID == 0 ) + { + dwAppID = GetCurrentProcessId(); + } + DPLAYX_CreateLobbyApplication( dwAppID ); + hr = DPLAYX_SetConnectionSettingsW( dwFlags, dwAppID, lpConn ); + } + + LeaveCriticalSection( &This->lock ); + + return hr; +} + +static HRESULT WINAPI IDirectPlayLobbyAImpl_SetConnectionSettings( IDirectPlayLobbyA *iface, + DWORD flags, DWORD appid, DPLCONNECTION *conn ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobbyA( iface ); + return IDirectPlayLobby_SetConnectionSettings( &This->IDirectPlayLobby3A_iface, flags, + appid, conn ); +} + +static HRESULT WINAPI IDirectPlayLobbyImpl_SetConnectionSettings( IDirectPlayLobby *iface, + DWORD flags, DWORD appid, DPLCONNECTION *conn ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby( iface ); + return IDirectPlayLobby_SetConnectionSettings( &This->IDirectPlayLobby3_iface, flags, + appid, conn ); +} + +static HRESULT WINAPI IDirectPlayLobby2AImpl_SetConnectionSettings( IDirectPlayLobby2A *iface, + DWORD flags, DWORD appid, DPLCONNECTION *conn ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2A( iface ); + return IDirectPlayLobby_SetConnectionSettings( &This->IDirectPlayLobby3A_iface, flags, + appid, conn ); +} + +static HRESULT WINAPI IDirectPlayLobby2Impl_SetConnectionSettings( IDirectPlayLobby2 *iface, + DWORD flags, DWORD appid, DPLCONNECTION *conn ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2( iface ); + return IDirectPlayLobby_SetConnectionSettings( &This->IDirectPlayLobby3_iface, flags, + appid, conn ); +} + +static HRESULT WINAPI IDirectPlayLobby3AImpl_SetConnectionSettings( IDirectPlayLobby3A *iface, + DWORD dwFlags, DWORD dwAppID, DPLCONNECTION *lpConn ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3A( iface ); + HRESULT hr; + + TRACE("(%p)->(0x%08x,0x%08x,%p)\n", This, dwFlags, dwAppID, lpConn ); + + EnterCriticalSection( &This->lock ); + + hr = DPLAYX_SetConnectionSettingsA( dwFlags, dwAppID, lpConn ); + + /* FIXME: Don't think that this is supposed to fail, but the documentation + is somewhat sketchy. I'll try creating a lobby application + for this... */ + if( hr == DPERR_NOTLOBBIED ) + { + FIXME( "Unlobbied app setting connections. Is this correct behavior?\n" ); + dwAppID = GetCurrentProcessId(); + DPLAYX_CreateLobbyApplication( dwAppID ); + hr = DPLAYX_SetConnectionSettingsA( dwFlags, dwAppID, lpConn ); + } + + LeaveCriticalSection( &This->lock ); + + return hr; +} + +/******************************************************************** + * + * Registers an event that will be set when a lobby message is received. + * + */ +static HRESULT WINAPI IDirectPlayLobbyAImpl_SetLobbyMessageEvent( IDirectPlayLobbyA *iface, + DWORD flags, DWORD appid, HANDLE event ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobbyA( iface ); + return IDirectPlayLobby_SetLobbyMessageEvent( &This->IDirectPlayLobby3A_iface, flags, appid, + event ); +} + +static HRESULT WINAPI IDirectPlayLobbyImpl_SetLobbyMessageEvent( IDirectPlayLobby *iface, + DWORD flags, DWORD appid, HANDLE event ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby( iface ); + return IDirectPlayLobby_SetLobbyMessageEvent( &This->IDirectPlayLobby3_iface, flags, appid, + event ); +} + +static HRESULT WINAPI IDirectPlayLobby2AImpl_SetLobbyMessageEvent( IDirectPlayLobby2A *iface, + DWORD flags, DWORD appid, HANDLE event ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2A( iface ); + return IDirectPlayLobby_SetLobbyMessageEvent( &This->IDirectPlayLobby3A_iface, flags, appid, + event ); +} + +static HRESULT WINAPI IDirectPlayLobby2Impl_SetLobbyMessageEvent( IDirectPlayLobby2 *iface, + DWORD flags, DWORD appid, HANDLE event ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2( iface ); + return IDirectPlayLobby_SetLobbyMessageEvent( &This->IDirectPlayLobby3_iface, flags, appid, + event ); +} + +static HRESULT WINAPI IDirectPlayLobby3AImpl_SetLobbyMessageEvent( IDirectPlayLobby3A *iface, + DWORD flags, DWORD appid, HANDLE event ) +{ + FIXME(":stub\n"); + return DPERR_OUTOFMEMORY; +} + +static HRESULT WINAPI IDirectPlayLobby3Impl_SetLobbyMessageEvent( IDirectPlayLobby3 *iface, + DWORD flags, DWORD appid, HANDLE event ) +{ + FIXME(":stub\n"); + return DPERR_OUTOFMEMORY; +} + + +/* DPL 2 methods */ +static HRESULT WINAPI IDirectPlayLobby2AImpl_CreateCompoundAddress( IDirectPlayLobby2A *iface, + const DPCOMPOUNDADDRESSELEMENT *elements, DWORD count, void *address, DWORD *size ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2A( iface ); + return IDirectPlayLobby_CreateCompoundAddress( &This->IDirectPlayLobby3A_iface, elements, + count, address, size ); +} + +static HRESULT WINAPI IDirectPlayLobby2Impl_CreateCompoundAddress( IDirectPlayLobby2 *iface, + const DPCOMPOUNDADDRESSELEMENT *elements, DWORD count, void *address, DWORD *size ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby2( iface ); + return IDirectPlayLobby_CreateCompoundAddress( &This->IDirectPlayLobby3_iface, elements, + count, address, size ); +} + +static HRESULT WINAPI IDirectPlayLobby3Impl_CreateCompoundAddress( IDirectPlayLobby3 *iface, + const DPCOMPOUNDADDRESSELEMENT *lpElements, DWORD dwElementCount, void *lpAddress, + DWORD *lpdwAddressSize ) +{ + return DPL_CreateCompoundAddress( lpElements, dwElementCount, lpAddress, lpdwAddressSize, FALSE ); +} + +static HRESULT WINAPI IDirectPlayLobby3AImpl_CreateCompoundAddress( IDirectPlayLobby3A *iface, + const DPCOMPOUNDADDRESSELEMENT *lpElements, DWORD dwElementCount, void *lpAddress, + DWORD *lpdwAddressSize ) +{ + return DPL_CreateCompoundAddress( lpElements, dwElementCount, lpAddress, lpdwAddressSize, TRUE ); +} + +HRESULT DPL_CreateCompoundAddress +( LPCDPCOMPOUNDADDRESSELEMENT lpElements, + DWORD dwElementCount, + LPVOID lpAddress, + LPDWORD lpdwAddressSize, + BOOL bAnsiInterface ) +{ + DWORD dwSizeRequired = 0; + DWORD dwElements; + LPCDPCOMPOUNDADDRESSELEMENT lpOrigElements = lpElements; + + TRACE("(%p,0x%08x,%p,%p)\n", lpElements, dwElementCount, lpAddress, lpdwAddressSize ); + + /* Parameter check */ + if( ( lpElements == NULL ) || + ( dwElementCount == 0 ) /* FIXME: Not sure if this is a failure case */ + ) + { + return DPERR_INVALIDPARAMS; + } + + /* Add the total size chunk */ + dwSizeRequired += sizeof( DPADDRESS ) + sizeof( DWORD ); + + /* Calculate the size of the buffer required */ + for ( dwElements = dwElementCount; dwElements > 0; --dwElements, ++lpElements ) + { + if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_ServiceProvider ) ) || + ( IsEqualGUID( &lpElements->guidDataType, &DPAID_LobbyProvider ) ) + ) + { + dwSizeRequired += sizeof( DPADDRESS ) + sizeof( GUID ); + } + else if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_Phone ) ) || + ( IsEqualGUID( &lpElements->guidDataType, &DPAID_Modem ) ) || + ( IsEqualGUID( &lpElements->guidDataType, &DPAID_INet ) ) + ) + { + if( !bAnsiInterface ) + { + ERR( "Ansi GUIDs used for unicode interface\n" ); + return DPERR_INVALIDFLAGS; + } + + dwSizeRequired += sizeof( DPADDRESS ) + lpElements->dwDataSize; + } + else if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_PhoneW ) ) || + ( IsEqualGUID( &lpElements->guidDataType, &DPAID_ModemW ) ) || + ( IsEqualGUID( &lpElements->guidDataType, &DPAID_INetW ) ) + ) + { + if( bAnsiInterface ) + { + ERR( "Unicode GUIDs used for ansi interface\n" ); + return DPERR_INVALIDFLAGS; + } + + FIXME( "Right size for unicode interface?\n" ); + dwSizeRequired += sizeof( DPADDRESS ) + lpElements->dwDataSize * sizeof( WCHAR ); + } + else if ( IsEqualGUID( &lpElements->guidDataType, &DPAID_INetPort ) ) + { + dwSizeRequired += sizeof( DPADDRESS ) + sizeof( WORD ); + } + else if ( IsEqualGUID( &lpElements->guidDataType, &DPAID_ComPort ) ) + { + FIXME( "Right size for unicode interface?\n" ); + dwSizeRequired += sizeof( DPADDRESS ) + sizeof( DPCOMPORTADDRESS ); /* FIXME: Right size? */ + } + else + { + ERR( "Unknown GUID %s\n", debugstr_guid(&lpElements->guidDataType) ); + return DPERR_INVALIDFLAGS; + } + } + + /* The user wants to know how big a buffer to allocate for us */ + if( ( lpAddress == NULL ) || + ( *lpdwAddressSize < dwSizeRequired ) + ) + { + *lpdwAddressSize = dwSizeRequired; + return DPERR_BUFFERTOOSMALL; + } + + /* Add the total size chunk */ + { + LPDPADDRESS lpdpAddress = lpAddress; + + lpdpAddress->guidDataType = DPAID_TotalSize; + lpdpAddress->dwDataSize = sizeof( DWORD ); + lpAddress = (char *) lpAddress + sizeof( DPADDRESS ); + + *(LPDWORD)lpAddress = dwSizeRequired; + lpAddress = (char *) lpAddress + sizeof( DWORD ); + } + + /* Calculate the size of the buffer required */ + for( dwElements = dwElementCount, lpElements = lpOrigElements; + dwElements > 0; + --dwElements, ++lpElements ) + { + if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_ServiceProvider ) ) || + ( IsEqualGUID( &lpElements->guidDataType, &DPAID_LobbyProvider ) ) + ) + { + LPDPADDRESS lpdpAddress = lpAddress; + + lpdpAddress->guidDataType = lpElements->guidDataType; + lpdpAddress->dwDataSize = sizeof( GUID ); + lpAddress = (char *) lpAddress + sizeof( DPADDRESS ); + + CopyMemory( lpAddress, lpElements->lpData, sizeof( GUID ) ); + lpAddress = (char *) lpAddress + sizeof( GUID ); + } + else if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_Phone ) ) || + ( IsEqualGUID( &lpElements->guidDataType, &DPAID_Modem ) ) || + ( IsEqualGUID( &lpElements->guidDataType, &DPAID_INet ) ) + ) + { + LPDPADDRESS lpdpAddress = lpAddress; + + lpdpAddress->guidDataType = lpElements->guidDataType; + lpdpAddress->dwDataSize = lpElements->dwDataSize; + lpAddress = (char *) lpAddress + sizeof( DPADDRESS ); + + lstrcpynA( lpAddress, lpElements->lpData, lpElements->dwDataSize ); + lpAddress = (char *) lpAddress + lpElements->dwDataSize; + } + else if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_PhoneW ) ) || + ( IsEqualGUID( &lpElements->guidDataType, &DPAID_ModemW ) ) || + ( IsEqualGUID( &lpElements->guidDataType, &DPAID_INetW ) ) + ) + { + LPDPADDRESS lpdpAddress = lpAddress; + + lpdpAddress->guidDataType = lpElements->guidDataType; + lpdpAddress->dwDataSize = lpElements->dwDataSize; + lpAddress = (char *) lpAddress + sizeof( DPADDRESS ); + + lstrcpynW( lpAddress, lpElements->lpData, lpElements->dwDataSize ); + lpAddress = (char *) lpAddress + lpElements->dwDataSize * sizeof( WCHAR ); + } + else if ( IsEqualGUID( &lpElements->guidDataType, &DPAID_INetPort ) ) + { + LPDPADDRESS lpdpAddress = lpAddress; + + lpdpAddress->guidDataType = lpElements->guidDataType; + lpdpAddress->dwDataSize = lpElements->dwDataSize; + lpAddress = (char *) lpAddress + sizeof( DPADDRESS ); + + *((LPWORD)lpAddress) = *((LPWORD)lpElements->lpData); + lpAddress = (char *) lpAddress + sizeof( WORD ); + } + else if ( IsEqualGUID( &lpElements->guidDataType, &DPAID_ComPort ) ) + { + LPDPADDRESS lpdpAddress = lpAddress; + + lpdpAddress->guidDataType = lpElements->guidDataType; + lpdpAddress->dwDataSize = lpElements->dwDataSize; + lpAddress = (char *) lpAddress + sizeof( DPADDRESS ); + + CopyMemory( lpAddress, lpElements->lpData, sizeof( DPADDRESS ) ); + lpAddress = (char *) lpAddress + sizeof( DPADDRESS ); + } + } + + return DP_OK; +} + +/* DPL 3 methods */ + +static HRESULT WINAPI IDirectPlayLobby3Impl_ConnectEx( IDirectPlayLobby3 *iface, DWORD dwFlags, + REFIID riid, LPVOID* lplpDP, IUnknown* pUnk ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3( iface ); + return DPL_ConnectEx( This, dwFlags, riid, lplpDP, pUnk ); +} + +static HRESULT WINAPI IDirectPlayLobby3AImpl_ConnectEx( IDirectPlayLobby3A *iface, DWORD dwFlags, + REFIID riid, void **lplpDP, IUnknown *pUnk ) +{ + IDirectPlayLobbyImpl *This = impl_from_IDirectPlayLobby3A( iface ); + return DPL_ConnectEx( This, dwFlags, riid, lplpDP, pUnk ); +} + +static HRESULT WINAPI IDirectPlayLobby3Impl_RegisterApplication( IDirectPlayLobby3 *iface, + DWORD flags, DPAPPLICATIONDESC *appdesc ) +{ + FIXME(":stub\n"); + return DP_OK; +} + +static HRESULT WINAPI IDirectPlayLobby3AImpl_RegisterApplication( IDirectPlayLobby3A *iface, + DWORD flags, DPAPPLICATIONDESC *appdesc ) +{ + FIXME(":stub\n"); + return DP_OK; +} + +static HRESULT WINAPI IDirectPlayLobby3Impl_UnregisterApplication( IDirectPlayLobby3 *iface, + DWORD flags, REFGUID appdesc ) +{ + FIXME(":stub\n"); + return DP_OK; +} + +static HRESULT WINAPI IDirectPlayLobby3AImpl_UnregisterApplication( IDirectPlayLobby3A *iface, + DWORD flags, REFGUID appdesc ) +{ + FIXME(":stub\n"); + return DP_OK; +} + +static HRESULT WINAPI IDirectPlayLobby3Impl_WaitForConnectionSettings( IDirectPlayLobby3 *iface, + DWORD dwFlags ) +{ + HRESULT hr = DP_OK; + BOOL bStartWait = !(dwFlags & DPLWAIT_CANCEL); + + TRACE( "(%p)->(0x%08x)\n", iface, dwFlags ); + + if( DPLAYX_WaitForConnectionSettings( bStartWait ) ) + { + /* FIXME: What is the correct error return code? */ + hr = DPERR_NOTLOBBIED; + } + + return hr; +} + +static HRESULT WINAPI IDirectPlayLobby3AImpl_WaitForConnectionSettings( IDirectPlayLobby3A *iface, + DWORD dwFlags ) +{ + HRESULT hr = DP_OK; + BOOL bStartWait = !(dwFlags & DPLWAIT_CANCEL); + + TRACE( "(%p)->(0x%08x)\n", iface, dwFlags ); + + if( DPLAYX_WaitForConnectionSettings( bStartWait ) ) + { + /* FIXME: What is the correct error return code? */ + hr = DPERR_NOTLOBBIED; + } + + return hr; +} + +static const IDirectPlayLobbyVtbl dplA_vt = +{ + IDirectPlayLobbyAImpl_QueryInterface, + IDirectPlayLobbyAImpl_AddRef, + IDirectPlayLobbyAImpl_Release, + IDirectPlayLobbyAImpl_Connect, + IDirectPlayLobbyAImpl_CreateAddress, + IDirectPlayLobbyAImpl_EnumAddress, + IDirectPlayLobbyAImpl_EnumAddressTypes, + IDirectPlayLobbyAImpl_EnumLocalApplications, + IDirectPlayLobbyAImpl_GetConnectionSettings, + IDirectPlayLobbyAImpl_ReceiveLobbyMessage, + IDirectPlayLobbyAImpl_RunApplication, + IDirectPlayLobbyAImpl_SendLobbyMessage, + IDirectPlayLobbyAImpl_SetConnectionSettings, + IDirectPlayLobbyAImpl_SetLobbyMessageEvent +}; + +static const IDirectPlayLobbyVtbl dpl_vt = +{ + IDirectPlayLobbyImpl_QueryInterface, + IDirectPlayLobbyImpl_AddRef, + IDirectPlayLobbyImpl_Release, + IDirectPlayLobbyImpl_Connect, + IDirectPlayLobbyImpl_CreateAddress, + IDirectPlayLobbyImpl_EnumAddress, + IDirectPlayLobbyImpl_EnumAddressTypes, + IDirectPlayLobbyImpl_EnumLocalApplications, + IDirectPlayLobbyImpl_GetConnectionSettings, + IDirectPlayLobbyImpl_ReceiveLobbyMessage, + IDirectPlayLobbyImpl_RunApplication, + IDirectPlayLobbyImpl_SendLobbyMessage, + IDirectPlayLobbyImpl_SetConnectionSettings, + IDirectPlayLobbyImpl_SetLobbyMessageEvent +}; + +static const IDirectPlayLobby2Vtbl dpl2A_vt = +{ + IDirectPlayLobby2AImpl_QueryInterface, + IDirectPlayLobby2AImpl_AddRef, + IDirectPlayLobby2AImpl_Release, + IDirectPlayLobby2AImpl_Connect, + IDirectPlayLobby2AImpl_CreateAddress, + IDirectPlayLobby2AImpl_EnumAddress, + IDirectPlayLobby2AImpl_EnumAddressTypes, + IDirectPlayLobby2AImpl_EnumLocalApplications, + IDirectPlayLobby2AImpl_GetConnectionSettings, + IDirectPlayLobby2AImpl_ReceiveLobbyMessage, + IDirectPlayLobby2AImpl_RunApplication, + IDirectPlayLobby2AImpl_SendLobbyMessage, + IDirectPlayLobby2AImpl_SetConnectionSettings, + IDirectPlayLobby2AImpl_SetLobbyMessageEvent, + IDirectPlayLobby2AImpl_CreateCompoundAddress +}; + +static const IDirectPlayLobby2Vtbl dpl2_vt = +{ + IDirectPlayLobby2Impl_QueryInterface, + IDirectPlayLobby2Impl_AddRef, + IDirectPlayLobby2Impl_Release, + IDirectPlayLobby2Impl_Connect, + IDirectPlayLobby2Impl_CreateAddress, + IDirectPlayLobby2Impl_EnumAddress, + IDirectPlayLobby2Impl_EnumAddressTypes, + IDirectPlayLobby2Impl_EnumLocalApplications, + IDirectPlayLobby2Impl_GetConnectionSettings, + IDirectPlayLobby2Impl_ReceiveLobbyMessage, + IDirectPlayLobby2Impl_RunApplication, + IDirectPlayLobby2Impl_SendLobbyMessage, + IDirectPlayLobby2Impl_SetConnectionSettings, + IDirectPlayLobby2Impl_SetLobbyMessageEvent, + IDirectPlayLobby2Impl_CreateCompoundAddress +}; + +static const IDirectPlayLobby3Vtbl dpl3A_vt = +{ + IDirectPlayLobby3AImpl_QueryInterface, + IDirectPlayLobby3AImpl_AddRef, + IDirectPlayLobby3AImpl_Release, + IDirectPlayLobby3AImpl_Connect, + IDirectPlayLobby3AImpl_CreateAddress, + IDirectPlayLobby3AImpl_EnumAddress, + IDirectPlayLobby3AImpl_EnumAddressTypes, + IDirectPlayLobby3AImpl_EnumLocalApplications, + IDirectPlayLobby3AImpl_GetConnectionSettings, + IDirectPlayLobby3AImpl_ReceiveLobbyMessage, + IDirectPlayLobby3AImpl_RunApplication, + IDirectPlayLobby3AImpl_SendLobbyMessage, + IDirectPlayLobby3AImpl_SetConnectionSettings, + IDirectPlayLobby3AImpl_SetLobbyMessageEvent, + IDirectPlayLobby3AImpl_CreateCompoundAddress, + IDirectPlayLobby3AImpl_ConnectEx, + IDirectPlayLobby3AImpl_RegisterApplication, + IDirectPlayLobby3AImpl_UnregisterApplication, + IDirectPlayLobby3AImpl_WaitForConnectionSettings +}; + +static const IDirectPlayLobby3Vtbl dpl3_vt = +{ + IDirectPlayLobby3Impl_QueryInterface, + IDirectPlayLobby3Impl_AddRef, + IDirectPlayLobby3Impl_Release, + IDirectPlayLobby3Impl_Connect, + IDirectPlayLobby3Impl_CreateAddress, + IDirectPlayLobby3Impl_EnumAddress, + IDirectPlayLobby3Impl_EnumAddressTypes, + IDirectPlayLobby3Impl_EnumLocalApplications, + IDirectPlayLobby3Impl_GetConnectionSettings, + IDirectPlayLobby3Impl_ReceiveLobbyMessage, + IDirectPlayLobby3Impl_RunApplication, + IDirectPlayLobby3Impl_SendLobbyMessage, + IDirectPlayLobby3Impl_SetConnectionSettings, + IDirectPlayLobby3Impl_SetLobbyMessageEvent, + IDirectPlayLobby3Impl_CreateCompoundAddress, + IDirectPlayLobby3Impl_ConnectEx, + IDirectPlayLobby3Impl_RegisterApplication, + IDirectPlayLobby3Impl_UnregisterApplication, + IDirectPlayLobby3Impl_WaitForConnectionSettings +}; + +HRESULT dplobby_create( REFIID riid, void **ppv ) +{ + IDirectPlayLobbyImpl *obj; + HRESULT hr; + + TRACE( "(%s, %p)\n", debugstr_guid( riid ), ppv ); + + *ppv = NULL; + obj = HeapAlloc( GetProcessHeap(), 0, sizeof( *obj ) ); + if ( !obj ) + return DPERR_OUTOFMEMORY; + + obj->IDirectPlayLobby_iface.lpVtbl = &dpl_vt; + obj->IDirectPlayLobbyA_iface.lpVtbl = &dplA_vt; + obj->IDirectPlayLobby2_iface.lpVtbl = &dpl2_vt; + obj->IDirectPlayLobby2A_iface.lpVtbl = &dpl2A_vt; + obj->IDirectPlayLobby3_iface.lpVtbl = &dpl3_vt; + obj->IDirectPlayLobby3A_iface.lpVtbl = &dpl3A_vt; + obj->numIfaces = 1; + obj->ref = 0; + obj->refA = 0; + obj->ref2 = 0; + obj->ref2A = 0; + obj->ref3 = 1; + obj->ref3A = 0; + + InitializeCriticalSection( &obj->lock ); + obj->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IDirectPlayLobbyImpl.lock"); + DPQ_INIT( obj->msgs ); + + hr = IDirectPlayLobby_QueryInterface( &obj->IDirectPlayLobby3_iface, riid, ppv ); + IDirectPlayLobby_Release( &obj->IDirectPlayLobby3_iface ); + + return hr; +} + + + +/*************************************************************************** + * DirectPlayLobbyCreateA (DPLAYX.4) + * + */ +HRESULT WINAPI DirectPlayLobbyCreateA( GUID *lpGUIDDSP, IDirectPlayLobbyA **lplpDPL, + IUnknown *lpUnk, void *lpData, DWORD dwDataSize ) +{ + TRACE("lpGUIDDSP=%p lplpDPL=%p lpUnk=%p lpData=%p dwDataSize=%08x\n", + lpGUIDDSP,lplpDPL,lpUnk,lpData,dwDataSize); + + /* Parameter Check: lpGUIDSP, lpUnk & lpData must be NULL. dwDataSize must + * equal 0. These fields are mostly for future expansion. + */ + if ( lpGUIDDSP || lpData || dwDataSize ) + { + *lplpDPL = NULL; + return DPERR_INVALIDPARAMS; + } + + if( lpUnk ) + { + *lplpDPL = NULL; + ERR("Bad parameters!\n" ); + return CLASS_E_NOAGGREGATION; + } + + return dplobby_create( &IID_IDirectPlayLobbyA, (void**)lplpDPL ); +} + +/*************************************************************************** + * DirectPlayLobbyCreateW (DPLAYX.5) + * + */ +HRESULT WINAPI DirectPlayLobbyCreateW( GUID *lpGUIDDSP, IDirectPlayLobby **lplpDPL, + IUnknown *lpUnk, void *lpData, DWORD dwDataSize ) +{ + TRACE("lpGUIDDSP=%p lplpDPL=%p lpUnk=%p lpData=%p dwDataSize=%08x\n", + lpGUIDDSP,lplpDPL,lpUnk,lpData,dwDataSize); + + /* Parameter Check: lpGUIDSP, lpUnk & lpData must be NULL. dwDataSize must + * equal 0. These fields are mostly for future expansion. + */ + if ( lpGUIDDSP || lpData || dwDataSize ) + { + *lplpDPL = NULL; + ERR("Bad parameters!\n" ); + return DPERR_INVALIDPARAMS; + } + + if( lpUnk ) + { + *lplpDPL = NULL; + ERR("Bad parameters!\n" ); + return CLASS_E_NOAGGREGATION; + } + + return dplobby_create( &IID_IDirectPlayLobby, (void**)lplpDPL ); +} diff --git a/dll/directx/dplayx/lobbysp.c b/dll/directx/wine/dplayx/lobbysp.c similarity index 90% rename from dll/directx/dplayx/lobbysp.c rename to dll/directx/wine/dplayx/lobbysp.c index 4574d154e54..40f17fa7846 100644 --- a/dll/directx/dplayx/lobbysp.c +++ b/dll/directx/wine/dplayx/lobbysp.c @@ -22,15 +22,14 @@ #include //#include "lobbysp.h" -//#include "dplay_global.h" -#include "dpinit.h" +#include "dplay_global.h" WINE_DEFAULT_DEBUG_CHANNEL(dplay); /* Prototypes */ static BOOL DPLSP_CreateIUnknown( LPVOID lpSP ); static BOOL DPLSP_DestroyIUnknown( LPVOID lpSP ); -static BOOL DPLSP_CreateDPLobbySP( LPVOID lpSP, IDirectPlay2Impl* dp ); +static BOOL DPLSP_CreateDPLobbySP( void *lpSP, IDirectPlayImpl *dp ); static BOOL DPLSP_DestroyDPLobbySP( LPVOID lpSP ); @@ -45,7 +44,7 @@ typedef struct tagDPLobbySPIUnknownData typedef struct tagDPLobbySPData { - IDirectPlay2Impl* dplay; + IDirectPlayImpl *dplay; } DPLobbySPData; #define DPLSP_IMPL_FIELDS \ @@ -62,7 +61,7 @@ struct IDPLobbySPImpl /* Forward declaration of virtual tables */ static const IDPLobbySPVtbl dpLobbySPVT; -HRESULT DPLSP_CreateInterface( REFIID riid, LPVOID* ppvObj, IDirectPlay2Impl* dp ) +HRESULT DPLSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp ) { TRACE( " for %s\n", debugstr_guid( riid ) ); @@ -135,7 +134,7 @@ static BOOL DPLSP_DestroyIUnknown( LPVOID lpSP ) return TRUE; } -static BOOL DPLSP_CreateDPLobbySP( LPVOID lpSP, IDirectPlay2Impl* dp ) +static BOOL DPLSP_CreateDPLobbySP( void *lpSP, IDirectPlayImpl *dp ) { IDPLobbySPImpl *This = lpSP; @@ -148,22 +147,6 @@ static BOOL DPLSP_CreateDPLobbySP( LPVOID lpSP, IDirectPlay2Impl* dp ) This->sp->dplay = dp; - /* Normally we should be keeping a reference, but since only the dplay - * interface that created us can destroy us, we do not keep a reference - * to it (ie we'd be stuck with always having one reference to the dplay - * object, and hence us, around). - * NOTE: The dp object does reference count us. - * - * FIXME: This is a kludge to get around a problem where a queryinterface - * is used to get a new interface and then is closed. We will then - * reference garbage. However, with this we will never deallocate - * the interface we store. The correct fix is to require all - * DP internal interfaces to use the This->dp2 interface which - * should be changed to This->dp - */ - IDirectPlayX_AddRef( (LPDIRECTPLAY2)dp ); - - return TRUE; } diff --git a/dll/directx/dplayx/lobbysp.h b/dll/directx/wine/dplayx/lobbysp.h similarity index 99% rename from dll/directx/dplayx/lobbysp.h rename to dll/directx/wine/dplayx/lobbysp.h index df446da010b..e24d94beba7 100644 --- a/dll/directx/dplayx/lobbysp.h +++ b/dll/directx/wine/dplayx/lobbysp.h @@ -458,7 +458,6 @@ typedef struct SPDATA_INIT } SPDATA_INIT, *LPSPDATA_INIT; typedef HRESULT (WINAPI *LPSP_INIT)(LPSPDATA_INIT); -HRESULT WINAPI DPLSPInit(LPSPDATA_INIT) DECLSPEC_HIDDEN; /* Define the COM interface */ #define INTERFACE IDPLobbySP diff --git a/dll/directx/dplayx/name_server.c b/dll/directx/wine/dplayx/name_server.c similarity index 98% rename from dll/directx/dplayx/name_server.c rename to dll/directx/wine/dplayx/name_server.c index fee13cd72a3..63a101387df 100644 --- a/dll/directx/dplayx/name_server.c +++ b/dll/directx/wine/dplayx/name_server.c @@ -353,10 +353,8 @@ void NS_PruneSessionCache( LPVOID lpNSInfo ) } /* NAME SERVER Message stuff */ -void NS_ReplyToEnumSessionsRequest( LPCVOID lpcMsg, - LPVOID* lplpReplyData, - LPDWORD lpdwReplySize, - IDirectPlay2Impl* lpDP ) +void NS_ReplyToEnumSessionsRequest( const void *lpcMsg, void **lplpReplyData, DWORD *lpdwReplySize, + IDirectPlayImpl *lpDP ) { LPDPMSG_ENUMSESSIONSREPLY rmsg; DWORD dwVariableSize; diff --git a/dll/directx/dplayx/name_server.h b/dll/directx/wine/dplayx/name_server.h similarity index 96% rename from dll/directx/dplayx/name_server.h rename to dll/directx/wine/dplayx/name_server.h index ab39e3c724b..b4a9406f63f 100644 --- a/dll/directx/dplayx/name_server.h +++ b/dll/directx/wine/dplayx/name_server.h @@ -40,7 +40,7 @@ void NS_SetLocalAddr( LPVOID lpNSInfo, LPCVOID lpHdr, DWORD dwHdrSize ) DECLSPEC void NS_ReplyToEnumSessionsRequest( LPCVOID lpcMsg, LPVOID* lplpReplyData, LPDWORD lpdwReplySize, - IDirectPlay2Impl* lpDP ) DECLSPEC_HIDDEN; + IDirectPlayImpl *lpDP ) DECLSPEC_HIDDEN; HRESULT NS_SendSessionRequestBroadcast( LPCGUID lpcGuid, DWORD dwFlags, diff --git a/dll/directx/dplayx/version.rc b/dll/directx/wine/dplayx/version.rc similarity index 100% rename from dll/directx/dplayx/version.rc rename to dll/directx/wine/dplayx/version.rc diff --git a/dll/directx/dsound/CMakeLists.txt b/dll/directx/wine/dsound/CMakeLists.txt similarity index 88% rename from dll/directx/dsound/CMakeLists.txt rename to dll/directx/wine/dsound/CMakeLists.txt index 37a695a2034..ca2fe9e28bc 100644 --- a/dll/directx/dsound/CMakeLists.txt +++ b/dll/directx/wine/dsound/CMakeLists.txt @@ -5,7 +5,6 @@ add_definitions( -D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - spec2def(dsound.dll dsound.spec ADD_IMPORTLIB) add_library(dsound SHARED @@ -24,5 +23,5 @@ add_library(dsound SHARED set_module_type(dsound win32dll) target_link_libraries(dsound dxguid uuid wine) -add_importlibs(dsound winmm ole32 advapi32 user32 msvcrt kernel32 ntdll) +add_importlibs(dsound ole32 advapi32 user32 msvcrt kernel32 ntdll) add_cd_file(TARGET dsound DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/dsound/buffer.c b/dll/directx/wine/dsound/buffer.c similarity index 100% rename from dll/directx/dsound/buffer.c rename to dll/directx/wine/dsound/buffer.c diff --git a/dll/directx/dsound/capture.c b/dll/directx/wine/dsound/capture.c similarity index 94% rename from dll/directx/dsound/capture.c rename to dll/directx/wine/dsound/capture.c index df3fdcf7476..fcee0b8e866 100644 --- a/dll/directx/dsound/capture.c +++ b/dll/directx/wine/dsound/capture.c @@ -62,6 +62,8 @@ typedef struct IDirectSoundCaptureBufferImpl /* IDirectSoundNotify fields */ DSBPOSITIONNOTIFY *notifies; int nrofnotifies; + HANDLE thread; + HANDLE sleepev; } IDirectSoundCaptureBufferImpl; /* DirectSoundCaptureDevice implementation structure */ @@ -75,7 +77,6 @@ struct DirectSoundCaptureDevice WAVEFORMATEX *pwfx; IDirectSoundCaptureBufferImpl *capture_buffer; DWORD state; - UINT timerID; CRITICAL_SECTION lock; IMMDevice *mmdevice; IAudioClient *client; @@ -83,12 +84,20 @@ struct DirectSoundCaptureDevice struct list entry; }; +static DWORD WINAPI DSOUND_capture_thread(void *user); static void capturebuffer_destroy(IDirectSoundCaptureBufferImpl *This) { if (This->device->state == STATE_CAPTURING) This->device->state = STATE_STOPPING; + if(This->thread){ + SetEvent(This->sleepev); + WaitForSingleObject(This->thread, INFINITE); + CloseHandle(This->thread); + } + CloseHandle(This->sleepev); + HeapFree(GetProcessHeap(),0, This->pdscbd); if (This->device->client) { @@ -742,8 +751,8 @@ static HRESULT IDirectSoundCaptureBufferImpl_Create( } err = IAudioClient_Initialize(device->client, - AUDCLNT_SHAREMODE_SHARED, AUDCLNT_STREAMFLAGS_NOPERSIST, - 200 * 100000, 50000, device->pwfx, NULL); + AUDCLNT_SHAREMODE_SHARED, AUDCLNT_STREAMFLAGS_NOPERSIST | AUDCLNT_STREAMFLAGS_EVENTCALLBACK, + 200 * 100000, 0, device->pwfx, NULL); if(FAILED(err)){ WARN("Initialize failed: %08x\n", err); IAudioClient_Release(device->client); @@ -756,12 +765,27 @@ static HRESULT IDirectSoundCaptureBufferImpl_Create( return err; } + This->sleepev = CreateEventW(NULL, 0, 0, NULL); + + err = IAudioClient_SetEventHandle(device->client, This->sleepev); + if(FAILED(err)){ + WARN("SetEventHandle failed: %08x\n", err); + IAudioClient_Release(device->client); + device->client = NULL; + CloseHandle(This->sleepev); + HeapFree(GetProcessHeap(), 0, This->pdscbd); + This->device->capture_buffer = 0; + HeapFree( GetProcessHeap(), 0, This ); + return err; + } + err = IAudioClient_GetService(device->client, &IID_IAudioCaptureClient, (void**)&device->capture); if(FAILED(err)){ WARN("GetService failed: %08x\n", err); IAudioClient_Release(device->client); device->client = NULL; + CloseHandle(This->sleepev); HeapFree(GetProcessHeap(), 0, This->pdscbd); This->device->capture_buffer = 0; HeapFree( GetProcessHeap(), 0, This ); @@ -779,6 +803,7 @@ static HRESULT IDirectSoundCaptureBufferImpl_Create( device->client = NULL; IAudioCaptureClient_Release(device->capture); device->capture = NULL; + CloseHandle(This->sleepev); HeapFree(GetProcessHeap(), 0, This->pdscbd); This->device->capture_buffer = 0; HeapFree( GetProcessHeap(), 0, This ); @@ -786,6 +811,7 @@ static HRESULT IDirectSoundCaptureBufferImpl_Create( } device->buffer = newbuf; device->buflen = buflen; + This->thread = CreateThread(NULL, 0, DSOUND_capture_thread, This, 0, NULL); } IDirectSoundCaptureBuffer_AddRef(&This->IDirectSoundCaptureBuffer8_iface); @@ -833,9 +859,6 @@ static ULONG DirectSoundCaptureDevice_Release( if (!ref) { TRACE("deleting object\n"); - timeKillEvent(device->timerID); - timeEndPeriod(DS_TIME_RES); - EnterCriticalSection(&DSOUND_capturers_lock); list_remove(&device->entry); LeaveCriticalSection(&DSOUND_capturers_lock); @@ -854,29 +877,19 @@ static ULONG DirectSoundCaptureDevice_Release( return ref; } -static void CALLBACK DSOUND_capture_timer(UINT timerID, UINT msg, DWORD_PTR user, - DWORD_PTR dw1, DWORD_PTR dw2) +static HRESULT DSOUND_capture_data(DirectSoundCaptureDevice *device) { - DirectSoundCaptureDevice *device = (DirectSoundCaptureDevice*)user; - UINT32 packet_frames, packet_bytes, avail_bytes; + HRESULT hr; + UINT32 packet_frames, packet_bytes, avail_bytes, skip_bytes = 0; DWORD flags; BYTE *buf; - HRESULT hr; - if(!device->ref) - return; - - EnterCriticalSection(&device->lock); - - if(!device->capture_buffer || device->state == STATE_STOPPED){ - LeaveCriticalSection(&device->lock); - return; - } + if(!device->capture_buffer || device->state == STATE_STOPPED) + return S_FALSE; if(device->state == STATE_STOPPING){ device->state = STATE_STOPPED; - LeaveCriticalSection(&device->lock); - return; + return S_FALSE; } if(device->state == STATE_STARTING) @@ -885,24 +898,28 @@ static void CALLBACK DSOUND_capture_timer(UINT timerID, UINT msg, DWORD_PTR user hr = IAudioCaptureClient_GetBuffer(device->capture, &buf, &packet_frames, &flags, NULL, NULL); if(FAILED(hr)){ - LeaveCriticalSection(&device->lock); WARN("GetBuffer failed: %08x\n", hr); - return; + return hr; } packet_bytes = packet_frames * device->pwfx->nBlockAlign; + if(packet_bytes > device->buflen){ + TRACE("audio glitch: dsound buffer too small for data\n"); + skip_bytes = packet_bytes - device->buflen; + packet_bytes = device->buflen; + } avail_bytes = device->buflen - device->write_pos_bytes; if(avail_bytes > packet_bytes) avail_bytes = packet_bytes; - memcpy(device->buffer + device->write_pos_bytes, buf, avail_bytes); + memcpy(device->buffer + device->write_pos_bytes, buf + skip_bytes, avail_bytes); capture_CheckNotify(device->capture_buffer, device->write_pos_bytes, avail_bytes); packet_bytes -= avail_bytes; if(packet_bytes > 0){ if(device->capture_buffer->flags & DSCBSTART_LOOPING){ - memcpy(device->buffer, buf + avail_bytes, packet_bytes); + memcpy(device->buffer, buf + skip_bytes + avail_bytes, packet_bytes); capture_CheckNotify(device->capture_buffer, 0, packet_bytes); }else{ device->state = STATE_STOPPED; @@ -915,12 +932,44 @@ static void CALLBACK DSOUND_capture_timer(UINT timerID, UINT msg, DWORD_PTR user hr = IAudioCaptureClient_ReleaseBuffer(device->capture, packet_frames); if(FAILED(hr)){ - LeaveCriticalSection(&device->lock); WARN("ReleaseBuffer failed: %08x\n", hr); - return; + return hr; } - LeaveCriticalSection(&device->lock); + return S_OK; +} + +static DWORD WINAPI DSOUND_capture_thread(void *user) +{ + IDirectSoundCaptureBufferImpl *buffer = user; + HRESULT hr; + DWORD ret, wait_ms; + REFERENCE_TIME period; + + hr = IAudioClient_GetDevicePeriod(buffer->device->client, &period, NULL); + if(FAILED(hr)){ + WARN("GetDevicePeriod failed: %08x\n", hr); + wait_ms = 5; + }else + wait_ms = MulDiv(5, period, 10000); + + while(buffer->ref){ + ret = WaitForSingleObject(buffer->sleepev, wait_ms); + + if(!buffer->device->ref) + break; + + if(ret == WAIT_OBJECT_0){ + EnterCriticalSection(&buffer->device->lock); + + DSOUND_capture_data(buffer->device); + + LeaveCriticalSection(&buffer->device->lock); + }else if(ret != WAIT_TIMEOUT) + WARN("WaitForSingleObject failed: %u\n", GetLastError()); + } + + return 0; } static struct _TestFormat { @@ -984,14 +1033,6 @@ static HRESULT DirectSoundCaptureDevice_Initialize( EnterCriticalSection(&DSOUND_capturers_lock); - LIST_FOR_EACH_ENTRY(device, &DSOUND_capturers, DirectSoundCaptureDevice, entry){ - if(IsEqualGUID(&device->guid, &devGUID)){ - IMMDevice_Release(mmdevice); - LeaveCriticalSection(&DSOUND_capturers_lock); - return DSERR_ALLOCATED; - } - } - hr = DirectSoundCaptureDevice_Create(&device); if (hr != DS_OK) { WARN("DirectSoundCaptureDevice_Create failed\n"); @@ -1026,8 +1067,6 @@ static HRESULT DirectSoundCaptureDevice_Initialize( } IAudioClient_Release(client); - device->timerID = DSOUND_create_timer(DSOUND_capture_timer, (DWORD_PTR)device); - list_add_tail(&DSOUND_capturers, &device->entry); *ppDevice = device; diff --git a/dll/directx/dsound/dsound.c b/dll/directx/wine/dsound/dsound.c similarity index 97% rename from dll/directx/dsound/dsound.c rename to dll/directx/wine/dsound/dsound.c index 3de24e57eb6..13f6a5d5c64 100644 --- a/dll/directx/dsound/dsound.c +++ b/dll/directx/wine/dsound/dsound.c @@ -738,30 +738,6 @@ BOOL DSOUND_check_supported(IAudioClient *client, DWORD rate, return hr == S_OK; } -UINT DSOUND_create_timer(LPTIMECALLBACK cb, DWORD_PTR user) -{ - UINT triggertime = DS_TIME_DEL, res = DS_TIME_RES, id; - TIMECAPS time; - - timeGetDevCaps(&time, sizeof(TIMECAPS)); - TRACE("Minimum timer resolution: %u, max timer: %u\n", time.wPeriodMin, time.wPeriodMax); - if (triggertime < time.wPeriodMin) - triggertime = time.wPeriodMin; - if (res < time.wPeriodMin) - res = time.wPeriodMin; - if (timeBeginPeriod(res) == TIMERR_NOCANDO) - WARN("Could not set minimum resolution, don't expect sound\n"); - id = timeSetEvent(triggertime, res, cb, user, TIME_PERIODIC | TIME_KILL_SYNCHRONOUS); - if (!id) - { - WARN("Timer not created! Retrying without TIME_KILL_SYNCHRONOUS\n"); - id = timeSetEvent(triggertime, res, cb, user, TIME_PERIODIC); - if (!id) - ERR("Could not create timer, sound playback will not occur\n"); - } - return id; -} - HRESULT DirectSoundDevice_Initialize(DirectSoundDevice ** ppDevice, LPCGUID lpcGUID) { HRESULT hr = DS_OK; diff --git a/dll/directx/dsound/dsound.spec b/dll/directx/wine/dsound/dsound.spec similarity index 100% rename from dll/directx/dsound/dsound.spec rename to dll/directx/wine/dsound/dsound.spec diff --git a/dll/directx/dsound/dsound_classes.idl b/dll/directx/wine/dsound/dsound_classes.idl similarity index 100% rename from dll/directx/dsound/dsound_classes.idl rename to dll/directx/wine/dsound/dsound_classes.idl diff --git a/dll/directx/dsound/dsound_classes.rgs b/dll/directx/wine/dsound/dsound_classes.rgs similarity index 100% rename from dll/directx/dsound/dsound_classes.rgs rename to dll/directx/wine/dsound/dsound_classes.rgs diff --git a/dll/directx/dsound/dsound_convert.c b/dll/directx/wine/dsound/dsound_convert.c similarity index 97% rename from dll/directx/dsound/dsound_convert.c rename to dll/directx/wine/dsound/dsound_convert.c index 5617a746879..1e8e25d2181 100644 --- a/dll/directx/dsound/dsound_convert.c +++ b/dll/directx/wine/dsound/dsound_convert.c @@ -64,17 +64,26 @@ WINE_DEFAULT_DEBUG_CHANNEL(dsound); #endif /* This is an inlined version of lrintf. */ -#if defined(_M_IX86) && defined(_MSC_VER) +#if defined(_MSC_VER) +#if defined(_M_AMD64) +#include +#endif + FORCEINLINE int lrintf(float f) { +#if defined(_M_IX86) int result; __asm { fld f; fistp result; } + return result; +#elif defined(_M_AMD64) + return _mm_cvtss_si32(_mm_load_ss(&f)); +#endif } #endif diff --git a/dll/directx/dsound/dsound_main.c b/dll/directx/wine/dsound/dsound_main.c similarity index 99% rename from dll/directx/dsound/dsound_main.c rename to dll/directx/wine/dsound/dsound_main.c index a4e5e7125bb..aa75c558eeb 100644 --- a/dll/directx/dsound/dsound_main.c +++ b/dll/directx/wine/dsound/dsound_main.c @@ -800,20 +800,16 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) switch (fdwReason) { case DLL_PROCESS_ATTACH: - TRACE("DLL_PROCESS_ATTACH\n"); instance = hInstDLL; DisableThreadLibraryCalls(hInstDLL); /* Increase refcount on dsound by 1 */ GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, (LPCWSTR)hInstDLL, &hInstDLL); break; case DLL_PROCESS_DETACH: - TRACE("DLL_PROCESS_DETACH\n"); + if (lpvReserved) break; DeleteCriticalSection(&DSOUND_renderers_lock); DeleteCriticalSection(&DSOUND_capturers_lock); break; - default: - TRACE("UNKNOWN REASON\n"); - break; } return TRUE; } diff --git a/dll/directx/dsound/dsound_private.h b/dll/directx/wine/dsound/dsound_private.h similarity index 99% rename from dll/directx/dsound/dsound_private.h rename to dll/directx/wine/dsound/dsound_private.h index 1a3900c4870..a8f5f42a7f1 100644 --- a/dll/directx/dsound/dsound_private.h +++ b/dll/directx/wine/dsound/dsound_private.h @@ -261,6 +261,5 @@ HRESULT get_mmdevice(EDataFlow flow, const GUID *tgt, IMMDevice **device) DECLSP BOOL DSOUND_check_supported(IAudioClient *client, DWORD rate, DWORD depth, WORD channels) DECLSPEC_HIDDEN; -UINT DSOUND_create_timer(LPTIMECALLBACK cb, DWORD_PTR user) DECLSPEC_HIDDEN; HRESULT enumerate_mmdevices(EDataFlow flow, GUID *guids, LPDSENUMCALLBACKW cb, void *user) DECLSPEC_HIDDEN; diff --git a/dll/directx/dsound/duplex.c b/dll/directx/wine/dsound/duplex.c similarity index 100% rename from dll/directx/dsound/duplex.c rename to dll/directx/wine/dsound/duplex.c diff --git a/dll/directx/dsound/fir.h b/dll/directx/wine/dsound/fir.h similarity index 100% rename from dll/directx/dsound/fir.h rename to dll/directx/wine/dsound/fir.h diff --git a/dll/directx/dsound/mixer.c b/dll/directx/wine/dsound/mixer.c similarity index 100% rename from dll/directx/dsound/mixer.c rename to dll/directx/wine/dsound/mixer.c diff --git a/dll/directx/dsound/primary.c b/dll/directx/wine/dsound/primary.c similarity index 95% rename from dll/directx/dsound/primary.c rename to dll/directx/wine/dsound/primary.c index 15a97896d12..93962a0a963 100644 --- a/dll/directx/dsound/primary.c +++ b/dll/directx/wine/dsound/primary.c @@ -443,35 +443,24 @@ HRESULT DSOUND_PrimaryGetPosition(DirectSoundDevice *device, LPDWORD playpos, LP return DS_OK; } -static DWORD DSOUND_GetFormatSize(LPCWAVEFORMATEX wfex) +WAVEFORMATEX *DSOUND_CopyFormat(const WAVEFORMATEX *wfex) { - if (wfex->wFormatTag == WAVE_FORMAT_PCM) - return sizeof(WAVEFORMATEX); - else - return sizeof(WAVEFORMATEX) + wfex->cbSize; -} + WAVEFORMATEX *pwfx; + if(wfex->wFormatTag == WAVE_FORMAT_PCM){ + pwfx = HeapAlloc(GetProcessHeap(), 0, sizeof(WAVEFORMATEX)); + CopyMemory(pwfx, wfex, sizeof(PCMWAVEFORMAT)); + pwfx->cbSize = 0; + }else{ + pwfx = HeapAlloc(GetProcessHeap(), 0, sizeof(WAVEFORMATEX) + wfex->cbSize); + CopyMemory(pwfx, wfex, sizeof(WAVEFORMATEX) + wfex->cbSize); + } -LPWAVEFORMATEX DSOUND_CopyFormat(LPCWAVEFORMATEX wfex) -{ - DWORD size = DSOUND_GetFormatSize(wfex); - LPWAVEFORMATEX pwfx = HeapAlloc(GetProcessHeap(),0,size); - if (pwfx == NULL) { - WARN("out of memory\n"); - } else if (wfex->wFormatTag != WAVE_FORMAT_PCM) { - CopyMemory(pwfx, wfex, size); - } else { - CopyMemory(pwfx, wfex, sizeof(PCMWAVEFORMAT)); - pwfx->cbSize=0; - if (pwfx->nBlockAlign != pwfx->nChannels * pwfx->wBitsPerSample/8) { - WARN("Fixing bad nBlockAlign (%u)\n", pwfx->nBlockAlign); - pwfx->nBlockAlign = pwfx->nChannels * pwfx->wBitsPerSample/8; - } - if (pwfx->nAvgBytesPerSec != pwfx->nSamplesPerSec * pwfx->nBlockAlign) { - WARN("Fixing bad nAvgBytesPerSec (%u)\n", pwfx->nAvgBytesPerSec); - pwfx->nAvgBytesPerSec = pwfx->nSamplesPerSec * pwfx->nBlockAlign; - } - } - return pwfx; + if(pwfx->wFormatTag == WAVE_FORMAT_PCM || + (pwfx->wFormatTag == WAVE_FORMAT_EXTENSIBLE && + IsEqualGUID(&((const WAVEFORMATEXTENSIBLE*)pwfx)->SubFormat, &KSDATAFORMAT_SUBTYPE_PCM))) + pwfx->nBlockAlign = (pwfx->nChannels * pwfx->wBitsPerSample) / 8; + + return pwfx; } HRESULT primarybuffer_SetFormat(DirectSoundDevice *device, LPCWAVEFORMATEX passed_fmt) @@ -548,27 +537,9 @@ done: device->primary_pwfx = old_fmt; else HeapFree(GetProcessHeap(), 0, old_fmt); - } else if (passed_fmt->wFormatTag == WAVE_FORMAT_PCM || - passed_fmt->wFormatTag == WAVE_FORMAT_IEEE_FLOAT) { - /* Fill in "real" values to primary_pwfx */ - WAVEFORMATEX *fmt = device->primary_pwfx; - - *fmt = *device->pwfx; - fmtex = (void*)device->pwfx; - - if (IsEqualGUID(&fmtex->SubFormat, &KSDATAFORMAT_SUBTYPE_IEEE_FLOAT) && - passed_fmt->wFormatTag == WAVE_FORMAT_IEEE_FLOAT) { - fmt->wFormatTag = WAVE_FORMAT_IEEE_FLOAT; - } else { - fmt->wFormatTag = WAVE_FORMAT_PCM; - fmt->wBitsPerSample = 16; - } - fmt->nBlockAlign = fmt->nChannels * fmt->wBitsPerSample / 8; - fmt->nAvgBytesPerSec = fmt->nBlockAlign * fmt->nSamplesPerSec; - fmt->cbSize = 0; } else { - device->primary_pwfx = HeapReAlloc(GetProcessHeap(), 0, device->primary_pwfx, sizeof(*fmtex)); - memcpy(device->primary_pwfx, device->pwfx, sizeof(*fmtex)); + HeapFree(GetProcessHeap(), 0, device->primary_pwfx); + device->primary_pwfx = DSOUND_CopyFormat(passed_fmt); } out: diff --git a/dll/directx/dsound/propset.c b/dll/directx/wine/dsound/propset.c similarity index 100% rename from dll/directx/dsound/propset.c rename to dll/directx/wine/dsound/propset.c diff --git a/dll/directx/dsound/sound3d.c b/dll/directx/wine/dsound/sound3d.c similarity index 100% rename from dll/directx/dsound/sound3d.c rename to dll/directx/wine/dsound/sound3d.c diff --git a/dll/directx/dsound/version.rc b/dll/directx/wine/dsound/version.rc similarity index 100% rename from dll/directx/dsound/version.rc rename to dll/directx/wine/dsound/version.rc diff --git a/dll/directx/wine/dxdiagn/CMakeLists.txt b/dll/directx/wine/dxdiagn/CMakeLists.txt new file mode 100644 index 00000000000..182b0045b33 --- /dev/null +++ b/dll/directx/wine/dxdiagn/CMakeLists.txt @@ -0,0 +1,19 @@ + +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) +spec2def(dxdiagn.dll dxdiagn.spec) + +list(APPEND SOURCE + container.c + dxdiag_main.c + provider.c + ${CMAKE_CURRENT_BINARY_DIR}/dxdiagn.def) + +add_idl_headers(dxdiagn_idlheader fil_data.idl) +add_library(dxdiagn SHARED ${SOURCE} dxdiagn.rc) +set_module_type(dxdiagn win32dll) +target_link_libraries(dxdiagn strmiids dxguid uuid wine) +add_dependencies(dxdiagn dxdiagn_idlheader) +add_importlibs(dxdiagn d3d9 ddraw version ole32 oleaut32 psapi user32 msvcrt kernel32 ntdll) +add_pch(dxdiagn dxdiag_private.h) +add_cd_file(TARGET dxdiagn DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/dxdiagn/container.c b/dll/directx/wine/dxdiagn/container.c new file mode 100644 index 00000000000..9b7591a00a0 --- /dev/null +++ b/dll/directx/wine/dxdiagn/container.c @@ -0,0 +1,285 @@ +/* + * IDxDiagContainer Implementation + * + * Copyright 2004 Raphael Junqueira + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include + +#define COBJMACROS +#include "dxdiag_private.h" +#include +#include + +WINE_DEFAULT_DEBUG_CHANNEL(dxdiag); + +static inline IDxDiagContainerImpl *impl_from_IDxDiagContainer(IDxDiagContainer *iface) +{ + return CONTAINING_RECORD(iface, IDxDiagContainerImpl, IDxDiagContainer_iface); +} + +/* IDxDiagContainer IUnknown parts follow: */ +static HRESULT WINAPI IDxDiagContainerImpl_QueryInterface(IDxDiagContainer *iface, REFIID riid, + void **ppobj) +{ + IDxDiagContainerImpl *This = impl_from_IDxDiagContainer(iface); + + if (!ppobj) return E_INVALIDARG; + + if (IsEqualGUID(riid, &IID_IUnknown) + || IsEqualGUID(riid, &IID_IDxDiagContainer)) { + IUnknown_AddRef(iface); + *ppobj = This; + return S_OK; + } + + WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj); + *ppobj = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI IDxDiagContainerImpl_AddRef(IDxDiagContainer *iface) +{ + IDxDiagContainerImpl *This = impl_from_IDxDiagContainer(iface); + ULONG refCount = InterlockedIncrement(&This->ref); + + TRACE("(%p)->(ref before=%u)\n", This, refCount - 1); + + DXDIAGN_LockModule(); + + return refCount; +} + +static ULONG WINAPI IDxDiagContainerImpl_Release(IDxDiagContainer *iface) +{ + IDxDiagContainerImpl *This = impl_from_IDxDiagContainer(iface); + ULONG refCount = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(ref before=%u)\n", This, refCount + 1); + + if (!refCount) { + IDxDiagProvider_Release(This->pProv); + HeapFree(GetProcessHeap(), 0, This); + } + + DXDIAGN_UnlockModule(); + + return refCount; +} + +/* IDxDiagContainer Interface follow: */ +static HRESULT WINAPI IDxDiagContainerImpl_GetNumberOfChildContainers(IDxDiagContainer *iface, + DWORD *pdwCount) +{ + IDxDiagContainerImpl *This = impl_from_IDxDiagContainer(iface); + + TRACE("(%p)\n", iface); + if (NULL == pdwCount) { + return E_INVALIDARG; + } + *pdwCount = This->cont->nSubContainers; + return S_OK; +} + +static HRESULT WINAPI IDxDiagContainerImpl_EnumChildContainerNames(IDxDiagContainer *iface, + DWORD dwIndex, LPWSTR pwszContainer, DWORD cchContainer) +{ + IDxDiagContainerImpl *This = impl_from_IDxDiagContainer(iface); + IDxDiagContainerImpl_Container *p; + DWORD i = 0; + + TRACE("(%p, %u, %p, %u)\n", iface, dwIndex, pwszContainer, cchContainer); + + if (NULL == pwszContainer || 0 == cchContainer) { + return E_INVALIDARG; + } + + LIST_FOR_EACH_ENTRY(p, &This->cont->subContainers, IDxDiagContainerImpl_Container, entry) + { + if (dwIndex == i) { + TRACE("Found container name %s, copying string\n", debugstr_w(p->contName)); + lstrcpynW(pwszContainer, p->contName, cchContainer); + return (cchContainer <= strlenW(p->contName)) ? + DXDIAG_E_INSUFFICIENT_BUFFER : S_OK; + } + ++i; + } + + TRACE("Failed to find container name at specified index\n"); + *pwszContainer = '\0'; + return E_INVALIDARG; +} + +static HRESULT IDxDiagContainerImpl_GetChildContainerInternal(IDxDiagContainerImpl_Container *cont, LPCWSTR pwszContainer, IDxDiagContainerImpl_Container **subcont) { + IDxDiagContainerImpl_Container *p; + + LIST_FOR_EACH_ENTRY(p, &cont->subContainers, IDxDiagContainerImpl_Container, entry) + { + if (0 == lstrcmpW(p->contName, pwszContainer)) { + *subcont = p; + return S_OK; + } + } + + return E_INVALIDARG; +} + +static HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(IDxDiagContainer *iface, + LPCWSTR pwszContainer, IDxDiagContainer **ppInstance) +{ + IDxDiagContainerImpl *This = impl_from_IDxDiagContainer(iface); + IDxDiagContainerImpl_Container *pContainer = This->cont; + LPWSTR tmp, orig_tmp; + INT tmp_len; + WCHAR* cur; + HRESULT hr = E_INVALIDARG; + + TRACE("(%p, %s, %p)\n", iface, debugstr_w(pwszContainer), ppInstance); + + if (NULL == ppInstance || NULL == pwszContainer) { + return E_INVALIDARG; + } + + *ppInstance = NULL; + + tmp_len = strlenW(pwszContainer) + 1; + orig_tmp = tmp = HeapAlloc(GetProcessHeap(), 0, tmp_len * sizeof(WCHAR)); + if (NULL == tmp) return E_FAIL; + lstrcpynW(tmp, pwszContainer, tmp_len); + + cur = strchrW(tmp, '.'); + while (NULL != cur) { + *cur = '\0'; /* cut tmp string to '.' */ + if (!*(cur + 1)) break; /* Account for a lone terminating period, as in "cont1.cont2.". */ + TRACE("Trying to get parent container %s\n", debugstr_w(tmp)); + hr = IDxDiagContainerImpl_GetChildContainerInternal(pContainer, tmp, &pContainer); + if (FAILED(hr)) + goto on_error; + cur++; /* go after '.' (just replaced by \0) */ + tmp = cur; + cur = strchrW(tmp, '.'); + } + + TRACE("Trying to get container %s\n", debugstr_w(tmp)); + hr = IDxDiagContainerImpl_GetChildContainerInternal(pContainer, tmp, &pContainer); + if (SUCCEEDED(hr)) { + hr = DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, pContainer, This->pProv, (void **)ppInstance); + if (SUCCEEDED(hr)) + TRACE("Succeeded in getting the container instance\n"); + } + +on_error: + HeapFree(GetProcessHeap(), 0, orig_tmp); + return hr; +} + +static HRESULT WINAPI IDxDiagContainerImpl_GetNumberOfProps(IDxDiagContainer *iface, + DWORD *pdwCount) +{ + IDxDiagContainerImpl *This = impl_from_IDxDiagContainer(iface); + + TRACE("(%p)\n", iface); + if (NULL == pdwCount) { + return E_INVALIDARG; + } + *pdwCount = This->cont->nProperties; + return S_OK; +} + +static HRESULT WINAPI IDxDiagContainerImpl_EnumPropNames(IDxDiagContainer *iface, DWORD dwIndex, + LPWSTR pwszPropName, DWORD cchPropName) +{ + IDxDiagContainerImpl *This = impl_from_IDxDiagContainer(iface); + IDxDiagContainerImpl_Property *p; + DWORD i = 0; + + TRACE("(%p, %u, %p, %u)\n", iface, dwIndex, pwszPropName, cchPropName); + + if (NULL == pwszPropName || 0 == cchPropName) { + return E_INVALIDARG; + } + + LIST_FOR_EACH_ENTRY(p, &This->cont->properties, IDxDiagContainerImpl_Property, entry) + { + if (dwIndex == i) { + TRACE("Found property name %s, copying string\n", debugstr_w(p->propName)); + lstrcpynW(pwszPropName, p->propName, cchPropName); + return (cchPropName <= strlenW(p->propName)) ? + DXDIAG_E_INSUFFICIENT_BUFFER : S_OK; + } + ++i; + } + + TRACE("Failed to find property name at specified index\n"); + return E_INVALIDARG; +} + +static HRESULT WINAPI IDxDiagContainerImpl_GetProp(IDxDiagContainer *iface, LPCWSTR pwszPropName, + VARIANT *pvarProp) +{ + IDxDiagContainerImpl *This = impl_from_IDxDiagContainer(iface); + IDxDiagContainerImpl_Property *p; + + TRACE("(%p, %s, %p)\n", iface, debugstr_w(pwszPropName), pvarProp); + + if (NULL == pvarProp || NULL == pwszPropName) { + return E_INVALIDARG; + } + + LIST_FOR_EACH_ENTRY(p, &This->cont->properties, IDxDiagContainerImpl_Property, entry) + { + if (0 == lstrcmpW(p->propName, pwszPropName)) { + VariantInit(pvarProp); + return VariantCopy(pvarProp, &p->vProp); + } + } + + return E_INVALIDARG; +} + +static const IDxDiagContainerVtbl DxDiagContainer_Vtbl = +{ + IDxDiagContainerImpl_QueryInterface, + IDxDiagContainerImpl_AddRef, + IDxDiagContainerImpl_Release, + IDxDiagContainerImpl_GetNumberOfChildContainers, + IDxDiagContainerImpl_EnumChildContainerNames, + IDxDiagContainerImpl_GetChildContainer, + IDxDiagContainerImpl_GetNumberOfProps, + IDxDiagContainerImpl_EnumPropNames, + IDxDiagContainerImpl_GetProp +}; + + +HRESULT DXDiag_CreateDXDiagContainer(REFIID riid, IDxDiagContainerImpl_Container *cont, IDxDiagProvider *pProv, LPVOID *ppobj) { + IDxDiagContainerImpl* container; + + TRACE("(%s, %p)\n", debugstr_guid(riid), ppobj); + + container = HeapAlloc(GetProcessHeap(), 0, sizeof(IDxDiagContainerImpl)); + if (NULL == container) { + *ppobj = NULL; + return E_OUTOFMEMORY; + } + container->IDxDiagContainer_iface.lpVtbl = &DxDiagContainer_Vtbl; + container->ref = 0; /* will be inited with QueryInterface */ + container->cont = cont; + container->pProv = pProv; + IDxDiagProvider_AddRef(pProv); + return IDxDiagContainerImpl_QueryInterface(&container->IDxDiagContainer_iface, riid, ppobj); +} diff --git a/dll/directx/wine/dxdiagn/dxdiag_main.c b/dll/directx/wine/dxdiagn/dxdiag_main.c new file mode 100644 index 00000000000..58f89179737 --- /dev/null +++ b/dll/directx/wine/dxdiagn/dxdiag_main.c @@ -0,0 +1,164 @@ +/* + * DXDiag + * + * Copyright 2004 Raphael Junqueira + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#define COBJMACROS + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include "dxdiag_private.h" +#include + +WINE_DEFAULT_DEBUG_CHANNEL(dxdiag); + +HINSTANCE dxdiagn_instance = 0; + +LONG DXDIAGN_refCount = 0; + +/* At process attach */ +BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + TRACE("%p,%x,%p\n", hInstDLL, fdwReason, lpvReserved); + if (fdwReason == DLL_PROCESS_ATTACH) { + dxdiagn_instance = hInstDLL; + DisableThreadLibraryCalls(hInstDLL); + } + return TRUE; +} + +/******************************************************************************* + * DXDiag ClassFactory + */ +typedef struct { + IClassFactory IClassFactory_iface; +} IClassFactoryImpl; + +static HRESULT WINAPI DXDiagCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) +{ + if (ppv == NULL) + return E_POINTER; + + if (IsEqualGUID(&IID_IUnknown, riid)) + TRACE("(%p)->(IID_IUnknown %p)\n", iface, ppv); + else if (IsEqualGUID(&IID_IClassFactory, riid)) + TRACE("(%p)->(IID_IClassFactory %p)\n", iface, ppv); + else { + FIXME("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv); + *ppv = NULL; + return E_NOINTERFACE; + } + + *ppv = iface; + IClassFactory_AddRef(iface); + return S_OK; +} + +static ULONG WINAPI DXDiagCF_AddRef(IClassFactory *iface) +{ + DXDIAGN_LockModule(); + + return 2; /* non-heap based object */ +} + +static ULONG WINAPI DXDiagCF_Release(IClassFactory * iface) +{ + DXDIAGN_UnlockModule(); + + return 1; /* non-heap based object */ +} + +static HRESULT WINAPI DXDiagCF_CreateInstance(IClassFactory *iface, IUnknown *pOuter, REFIID riid, + void **ppv) +{ + TRACE("(%p)->(%p,%s,%p)\n", iface, pOuter, debugstr_guid(riid), ppv); + + return DXDiag_CreateDXDiagProvider(iface, pOuter, riid, ppv); +} + +static HRESULT WINAPI DXDiagCF_LockServer(IClassFactory *iface, BOOL dolock) +{ + TRACE("(%d)\n", dolock); + + if (dolock) + DXDIAGN_LockModule(); + else + DXDIAGN_UnlockModule(); + + return S_OK; +} + +static const IClassFactoryVtbl DXDiagCF_Vtbl = { + DXDiagCF_QueryInterface, + DXDiagCF_AddRef, + DXDiagCF_Release, + DXDiagCF_CreateInstance, + DXDiagCF_LockServer +}; + +static IClassFactoryImpl DXDiag_CF = { { &DXDiagCF_Vtbl } }; + +/*********************************************************************** + * DllCanUnloadNow (DXDIAGN.@) + */ +HRESULT WINAPI DllCanUnloadNow(void) +{ + return DXDIAGN_refCount != 0 ? S_FALSE : S_OK; +} + +/*********************************************************************** + * DllGetClassObject (DXDIAGN.@) + */ +HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) +{ + TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + + if (IsEqualGUID(rclsid, &CLSID_DxDiagProvider)) { + IClassFactory_AddRef(&DXDiag_CF.IClassFactory_iface); + *ppv = &DXDiag_CF.IClassFactory_iface; + return S_OK; + } + + FIXME("(%s,%s,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + return CLASS_E_CLASSNOTAVAILABLE; +} + +/*********************************************************************** + * DllRegisterServer (DXDIAGN.@) + */ +HRESULT WINAPI DllRegisterServer(void) +{ + return __wine_register_resources( dxdiagn_instance ); +} + +/*********************************************************************** + * DllUnregisterServer (DXDIAGN.@) + */ +HRESULT WINAPI DllUnregisterServer(void) +{ + return __wine_unregister_resources( dxdiagn_instance ); +} diff --git a/dll/directx/wine/dxdiagn/dxdiag_private.h b/dll/directx/wine/dxdiagn/dxdiag_private.h new file mode 100644 index 00000000000..ae73a0f6372 --- /dev/null +++ b/dll/directx/wine/dxdiagn/dxdiag_private.h @@ -0,0 +1,92 @@ +/* + * DXDiag private include file + * + * Copyright 2004 Raphael Junqueira + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_DXDIAG_PRIVATE_H +#define __WINE_DXDIAG_PRIVATE_H + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#include + +#include +#include +#include + +#include +#include + +#include "resource.h" + +/* DXDiag Interfaces: */ +typedef struct IDxDiagProviderImpl IDxDiagProviderImpl; +typedef struct IDxDiagContainerImpl IDxDiagContainerImpl; +typedef struct IDxDiagContainerImpl_Container IDxDiagContainerImpl_Container; + +/* ---------------- */ +/* IDxDiagContainer */ +/* ---------------- */ + +struct IDxDiagContainerImpl_Container { + struct list entry; + WCHAR *contName; + + struct list subContainers; + DWORD nSubContainers; + struct list properties; + DWORD nProperties; +}; + +typedef struct IDxDiagContainerImpl_Property { + struct list entry; + WCHAR *propName; + VARIANT vProp; +} IDxDiagContainerImpl_Property; + + +/***************************************************************************** + * IDxDiagContainer implementation structure + */ +struct IDxDiagContainerImpl { + IDxDiagContainer IDxDiagContainer_iface; + LONG ref; + IDxDiagContainerImpl_Container *cont; + IDxDiagProvider *pProv; +}; + +/** + * factories + */ +extern HRESULT DXDiag_CreateDXDiagProvider(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) DECLSPEC_HIDDEN; + +/** internal factory */ +extern HRESULT DXDiag_CreateDXDiagContainer(REFIID riid, IDxDiagContainerImpl_Container *cont, IDxDiagProvider *pProv, LPVOID *ppobj) DECLSPEC_HIDDEN; + +/********************************************************************** + * Dll lifetime tracking declaration for dxdiagn.dll + */ +extern LONG DXDIAGN_refCount DECLSPEC_HIDDEN; +static inline void DXDIAGN_LockModule(void) { InterlockedIncrement( &DXDIAGN_refCount ); } +static inline void DXDIAGN_UnlockModule(void) { InterlockedDecrement( &DXDIAGN_refCount ); } + +extern HINSTANCE dxdiagn_instance DECLSPEC_HIDDEN; + +#endif diff --git a/dll/directx/wine/dxdiagn/dxdiagn.idl b/dll/directx/wine/dxdiagn/dxdiagn.idl new file mode 100644 index 00000000000..3a6b88fe04b --- /dev/null +++ b/dll/directx/wine/dxdiagn/dxdiagn.idl @@ -0,0 +1,28 @@ +/* + * COM Classes for dxdiagn + * + * Copyright 2010 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +[ + helpstring("DxDiagProvider Class"), + threading(apartment), + progid("DxDiag.DxDiagProvider.1"), + vi_progid("DxDiag.DxDiagProvider"), + uuid(a65b8071-3bfe-4213-9a5b-491da4461ca7) +] +coclass DxDiagProvider { interface IDxDiagProvider; } diff --git a/dll/directx/dxdiagn/version.rc b/dll/directx/wine/dxdiagn/dxdiagn.rc similarity index 60% rename from dll/directx/dxdiagn/version.rc rename to dll/directx/wine/dxdiagn/dxdiagn.rc index e4e973d3a93..2661737f25c 100644 --- a/dll/directx/dxdiagn/version.rc +++ b/dll/directx/wine/dxdiagn/dxdiagn.rc @@ -13,14 +13,28 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "resource.h" + +LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT + +STRINGTABLE +{ + IDS_REGIONAL_SETTING "Regional Setting" + IDS_PAGE_FILE_FORMAT "%1!u!MB used, %2!u!MB available" +} + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + #define WINE_FILEDESCRIPTION_STR "Wine DxDiag 8" #define WINE_FILENAME_STR "dxdiagn.dll" -#define WINE_FILEVERSION 5,3,1,902 -#define WINE_FILEVERSION_STR "5.3.1.902" -#define WINE_PRODUCTVERSION 5,3,1,902 -#define WINE_PRODUCTVERSION_STR "5.3" +#define WINE_FILEVERSION 5,3,1,904 +#define WINE_FILEVERSION_STR "5.3.1.904" +#define WINE_PRODUCTVERSION 5,3,1,904 +#define WINE_PRODUCTVERSION_STR "5.3.1.904" -#include "wine/wine_common_ver.rc" +#include + +1 WINE_REGISTRY dxdiagn.rgs diff --git a/dll/directx/wine/dxdiagn/dxdiagn.rgs b/dll/directx/wine/dxdiagn/dxdiagn.rgs new file mode 100644 index 00000000000..80d609b058f --- /dev/null +++ b/dll/directx/wine/dxdiagn/dxdiagn.rgs @@ -0,0 +1,24 @@ +HKCR +{ + NoRemove Interface + { + } + NoRemove CLSID + { + '{A65B8071-3BFE-4213-9A5B-491DA4461CA7}' = s 'DxDiagProvider Class' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Apartment' } + ProgId = s 'DxDiag.DxDiagProvider.1' + VersionIndependentProgId = s 'DxDiag.DxDiagProvider' + } + } + 'DxDiag.DxDiagProvider.1' = s 'DxDiagProvider Class' + { + CLSID = s '{A65B8071-3BFE-4213-9A5B-491DA4461CA7}' + } + 'DxDiag.DxDiagProvider' = s 'DxDiagProvider Class' + { + CLSID = s '{A65B8071-3BFE-4213-9A5B-491DA4461CA7}' + CurVer = s 'DxDiag.DxDiagProvider.1' + } +} diff --git a/dll/directx/dxdiagn/dxdiagn.spec b/dll/directx/wine/dxdiagn/dxdiagn.spec similarity index 100% rename from dll/directx/dxdiagn/dxdiagn.spec rename to dll/directx/wine/dxdiagn/dxdiagn.spec diff --git a/dll/directx/wine/dxdiagn/fil_data.idl b/dll/directx/wine/dxdiagn/fil_data.idl new file mode 100644 index 00000000000..806c053429f --- /dev/null +++ b/dll/directx/wine/dxdiagn/fil_data.idl @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2009 Vitaliy Margolen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "objidl.idl"; +import "strmif.idl"; +import "unknwn.idl"; + + +/***************************************************************************** + * IAMFilterData interface + */ +[ + object, + uuid(97f7c4d4-547b-4a5f-8332-536430ad2e4d), + pointer_default(unique) +] +interface IAMFilterData : IUnknown +{ + typedef [unique] IAMFilterData *LPIAMFILTERDATA; + + HRESULT ParseFilterData( + [in] BYTE * rgbFilterData, + [in] ULONG cb, + [out] BYTE ** prgbRegFilter2); + + HRESULT CreateFilterData( + [in] REGFILTER2 * prf2, + [out] BYTE ** prgbFilterData, + [out] ULONG * pcb); +} diff --git a/dll/directx/wine/dxdiagn/provider.c b/dll/directx/wine/dxdiagn/provider.c new file mode 100644 index 00000000000..cb4efff6e71 --- /dev/null +++ b/dll/directx/wine/dxdiagn/provider.c @@ -0,0 +1,1716 @@ +/* + * IDxDiagProvider Implementation + * + * Copyright 2004-2005 Raphael Junqueira + * Copyright 2010 Andrew Nguyen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include + +#define COBJMACROS +#define NONAMELESSUNION +#define NONAMELESSSTRUCT +#include "dxdiag_private.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +WINE_DEFAULT_DEBUG_CHANNEL(dxdiag); + +static const WCHAR szEmpty[] = {0}; + +static HRESULT build_information_tree(IDxDiagContainerImpl_Container **pinfo_root); +static void free_information_tree(IDxDiagContainerImpl_Container *node); + +static const WCHAR szDescription[] = {'s','z','D','e','s','c','r','i','p','t','i','o','n',0}; +static const WCHAR szDeviceName[] = {'s','z','D','e','v','i','c','e','N','a','m','e',0}; +static const WCHAR szKeyDeviceID[] = {'s','z','K','e','y','D','e','v','i','c','e','I','D',0}; +static const WCHAR szKeyDeviceKey[] = {'s','z','K','e','y','D','e','v','i','c','e','K','e','y',0}; +static const WCHAR szVendorId[] = {'s','z','V','e','n','d','o','r','I','d',0}; +static const WCHAR szDeviceId[] = {'s','z','D','e','v','i','c','e','I','d',0}; +static const WCHAR szDeviceIdentifier[] = {'s','z','D','e','v','i','c','e','I','d','e','n','t','i','f','i','e','r',0}; +static const WCHAR dwWidth[] = {'d','w','W','i','d','t','h',0}; +static const WCHAR dwHeight[] = {'d','w','H','e','i','g','h','t',0}; +static const WCHAR dwBpp[] = {'d','w','B','p','p',0}; +static const WCHAR szDisplayMemoryLocalized[] = {'s','z','D','i','s','p','l','a','y','M','e','m','o','r','y','L','o','c','a','l','i','z','e','d',0}; +static const WCHAR szDisplayMemoryEnglish[] = {'s','z','D','i','s','p','l','a','y','M','e','m','o','r','y','E','n','g','l','i','s','h',0}; +static const WCHAR szDriverName[] = {'s','z','D','r','i','v','e','r','N','a','m','e',0}; +static const WCHAR szDriverVersion[] = {'s','z','D','r','i','v','e','r','V','e','r','s','i','o','n',0}; +static const WCHAR szSubSysId[] = {'s','z','S','u','b','S','y','s','I','d',0}; +static const WCHAR szRevisionId[] = {'s','z','R','e','v','i','s','i','o','n','I','d',0}; +static const WCHAR dwRefreshRate[] = {'d','w','R','e','f','r','e','s','h','R','a','t','e',0}; +static const WCHAR szManufacturer[] = {'s','z','M','a','n','u','f','a','c','t','u','r','e','r',0}; + +struct IDxDiagProviderImpl +{ + IDxDiagProvider IDxDiagProvider_iface; + LONG ref; + BOOL init; + DXDIAG_INIT_PARAMS params; + IDxDiagContainerImpl_Container *info_root; +}; + +static inline IDxDiagProviderImpl *impl_from_IDxDiagProvider(IDxDiagProvider *iface) +{ + return CONTAINING_RECORD(iface, IDxDiagProviderImpl, IDxDiagProvider_iface); +} + +/* IDxDiagProvider IUnknown parts follow: */ +static HRESULT WINAPI IDxDiagProviderImpl_QueryInterface(IDxDiagProvider *iface, REFIID riid, + void **ppobj) +{ + IDxDiagProviderImpl *This = impl_from_IDxDiagProvider(iface); + + if (!ppobj) return E_INVALIDARG; + + if (IsEqualGUID(riid, &IID_IUnknown) + || IsEqualGUID(riid, &IID_IDxDiagProvider)) { + IUnknown_AddRef(iface); + *ppobj = This; + return S_OK; + } + + WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj); + *ppobj = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI IDxDiagProviderImpl_AddRef(IDxDiagProvider *iface) +{ + IDxDiagProviderImpl *This = impl_from_IDxDiagProvider(iface); + ULONG refCount = InterlockedIncrement(&This->ref); + + TRACE("(%p)->(ref before=%u)\n", This, refCount - 1); + + DXDIAGN_LockModule(); + + return refCount; +} + +static ULONG WINAPI IDxDiagProviderImpl_Release(IDxDiagProvider *iface) +{ + IDxDiagProviderImpl *This = impl_from_IDxDiagProvider(iface); + ULONG refCount = InterlockedDecrement(&This->ref); + + TRACE("(%p)->(ref before=%u)\n", This, refCount + 1); + + if (!refCount) { + free_information_tree(This->info_root); + HeapFree(GetProcessHeap(), 0, This); + } + + DXDIAGN_UnlockModule(); + + return refCount; +} + +/* IDxDiagProvider Interface follow: */ +static HRESULT WINAPI IDxDiagProviderImpl_Initialize(IDxDiagProvider *iface, + DXDIAG_INIT_PARAMS *pParams) +{ + IDxDiagProviderImpl *This = impl_from_IDxDiagProvider(iface); + HRESULT hr; + + TRACE("(%p,%p)\n", iface, pParams); + + if (NULL == pParams) { + return E_POINTER; + } + if (pParams->dwSize != sizeof(DXDIAG_INIT_PARAMS) || + pParams->dwDxDiagHeaderVersion != DXDIAG_DX9_SDK_VERSION) { + return E_INVALIDARG; + } + + if (!This->info_root) + { + hr = build_information_tree(&This->info_root); + if (FAILED(hr)) + return hr; + } + + This->init = TRUE; + memcpy(&This->params, pParams, pParams->dwSize); + return S_OK; +} + +static HRESULT WINAPI IDxDiagProviderImpl_GetRootContainer(IDxDiagProvider *iface, + IDxDiagContainer **ppInstance) +{ + IDxDiagProviderImpl *This = impl_from_IDxDiagProvider(iface); + + TRACE("(%p,%p)\n", iface, ppInstance); + + if (FALSE == This->init) { + return CO_E_NOTINITIALIZED; + } + + return DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, This->info_root, + &This->IDxDiagProvider_iface, (void **)ppInstance); +} + +static const IDxDiagProviderVtbl DxDiagProvider_Vtbl = +{ + IDxDiagProviderImpl_QueryInterface, + IDxDiagProviderImpl_AddRef, + IDxDiagProviderImpl_Release, + IDxDiagProviderImpl_Initialize, + IDxDiagProviderImpl_GetRootContainer +}; + +HRESULT DXDiag_CreateDXDiagProvider(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) { + IDxDiagProviderImpl* provider; + + TRACE("(%p, %s, %p)\n", punkOuter, debugstr_guid(riid), ppobj); + + *ppobj = NULL; + if (punkOuter) return CLASS_E_NOAGGREGATION; + + provider = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDxDiagProviderImpl)); + if (NULL == provider) return E_OUTOFMEMORY; + provider->IDxDiagProvider_iface.lpVtbl = &DxDiagProvider_Vtbl; + provider->ref = 0; /* will be inited with QueryInterface */ + return IDxDiagProviderImpl_QueryInterface(&provider->IDxDiagProvider_iface, riid, ppobj); +} + +static void free_property_information(IDxDiagContainerImpl_Property *prop) +{ + VariantClear(&prop->vProp); + HeapFree(GetProcessHeap(), 0, prop->propName); + HeapFree(GetProcessHeap(), 0, prop); +} + +static void free_information_tree(IDxDiagContainerImpl_Container *node) +{ + IDxDiagContainerImpl_Container *ptr, *cursor2; + + if (!node) + return; + + HeapFree(GetProcessHeap(), 0, node->contName); + + LIST_FOR_EACH_ENTRY_SAFE(ptr, cursor2, &node->subContainers, IDxDiagContainerImpl_Container, entry) + { + IDxDiagContainerImpl_Property *prop, *prop_cursor2; + + LIST_FOR_EACH_ENTRY_SAFE(prop, prop_cursor2, &ptr->properties, IDxDiagContainerImpl_Property, entry) + { + list_remove(&prop->entry); + free_property_information(prop); + } + + list_remove(&ptr->entry); + free_information_tree(ptr); + } + + HeapFree(GetProcessHeap(), 0, node); +} + +static IDxDiagContainerImpl_Container *allocate_information_node(const WCHAR *name) +{ + IDxDiagContainerImpl_Container *ret; + + ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ret)); + if (!ret) + return NULL; + + if (name) + { + ret->contName = HeapAlloc(GetProcessHeap(), 0, (strlenW(name) + 1) * sizeof(*name)); + if (!ret->contName) + { + HeapFree(GetProcessHeap(), 0, ret); + return NULL; + } + strcpyW(ret->contName, name); + } + + list_init(&ret->subContainers); + list_init(&ret->properties); + + return ret; +} + +static IDxDiagContainerImpl_Property *allocate_property_information(const WCHAR *name) +{ + IDxDiagContainerImpl_Property *ret; + + ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ret)); + if (!ret) + return NULL; + + ret->propName = HeapAlloc(GetProcessHeap(), 0, (strlenW(name) + 1) * sizeof(*name)); + if (!ret->propName) + { + HeapFree(GetProcessHeap(), 0, ret); + return NULL; + } + strcpyW(ret->propName, name); + + return ret; +} + +static inline void add_subcontainer(IDxDiagContainerImpl_Container *node, IDxDiagContainerImpl_Container *subCont) +{ + list_add_tail(&node->subContainers, &subCont->entry); + ++node->nSubContainers; +} + +static inline HRESULT add_bstr_property(IDxDiagContainerImpl_Container *node, const WCHAR *propName, const WCHAR *str) +{ + IDxDiagContainerImpl_Property *prop; + BSTR bstr; + + prop = allocate_property_information(propName); + if (!prop) + return E_OUTOFMEMORY; + + bstr = SysAllocString(str); + if (!bstr) + { + free_property_information(prop); + return E_OUTOFMEMORY; + } + + V_VT(&prop->vProp) = VT_BSTR; + V_BSTR(&prop->vProp) = bstr; + + list_add_tail(&node->properties, &prop->entry); + ++node->nProperties; + + return S_OK; +} + +static inline HRESULT add_ui4_property(IDxDiagContainerImpl_Container *node, const WCHAR *propName, DWORD data) +{ + IDxDiagContainerImpl_Property *prop; + + prop = allocate_property_information(propName); + if (!prop) + return E_OUTOFMEMORY; + + V_VT(&prop->vProp) = VT_UI4; + V_UI4(&prop->vProp) = data; + + list_add_tail(&node->properties, &prop->entry); + ++node->nProperties; + + return S_OK; +} + +static inline HRESULT add_bool_property(IDxDiagContainerImpl_Container *node, const WCHAR *propName, BOOL data) +{ + IDxDiagContainerImpl_Property *prop; + + prop = allocate_property_information(propName); + if (!prop) + return E_OUTOFMEMORY; + + V_VT(&prop->vProp) = VT_BOOL; + V_BOOL(&prop->vProp) = data; + + list_add_tail(&node->properties, &prop->entry); + ++node->nProperties; + + return S_OK; +} + +static inline HRESULT add_ull_as_bstr_property(IDxDiagContainerImpl_Container *node, const WCHAR *propName, ULONGLONG data ) +{ + IDxDiagContainerImpl_Property *prop; + + prop = allocate_property_information(propName); + if (!prop) + return E_OUTOFMEMORY; + + V_VT(&prop->vProp) = VT_UI8; + V_UI8(&prop->vProp) = data; + + VariantChangeType(&prop->vProp, &prop->vProp, 0, VT_BSTR); + + list_add_tail(&node->properties, &prop->entry); + ++node->nProperties; + + return S_OK; +} + +/* Copied from programs/taskkill/taskkill.c. */ +static DWORD *enumerate_processes(DWORD *list_count) +{ + DWORD *pid_list, alloc_bytes = 1024 * sizeof(*pid_list), needed_bytes; + + pid_list = HeapAlloc(GetProcessHeap(), 0, alloc_bytes); + if (!pid_list) + return NULL; + + for (;;) + { + DWORD *realloc_list; + + if (!EnumProcesses(pid_list, alloc_bytes, &needed_bytes)) + { + HeapFree(GetProcessHeap(), 0, pid_list); + return NULL; + } + + /* EnumProcesses can't signal an insufficient buffer condition, so the + * only way to possibly determine whether a larger buffer is required + * is to see whether the written number of bytes is the same as the + * buffer size. If so, the buffer will be reallocated to twice the + * size. */ + if (alloc_bytes != needed_bytes) + break; + + alloc_bytes *= 2; + realloc_list = HeapReAlloc(GetProcessHeap(), 0, pid_list, alloc_bytes); + if (!realloc_list) + { + HeapFree(GetProcessHeap(), 0, pid_list); + return NULL; + } + pid_list = realloc_list; + } + + *list_count = needed_bytes / sizeof(*pid_list); + return pid_list; +} + +/* Copied from programs/taskkill/taskkill.c. */ +static BOOL get_process_name_from_pid(DWORD pid, WCHAR *buf, DWORD chars) +{ + HANDLE process; + HMODULE module; + DWORD required_size; + + process = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid); + if (!process) + return FALSE; + + if (!EnumProcessModules(process, &module, sizeof(module), &required_size)) + { + CloseHandle(process); + return FALSE; + } + + if (!GetModuleBaseNameW(process, module, buf, chars)) + { + CloseHandle(process); + return FALSE; + } + + CloseHandle(process); + return TRUE; +} + +/* dxdiagn's detection scheme is simply to look for a process called conf.exe. */ +static BOOL is_netmeeting_running(void) +{ + static const WCHAR conf_exe[] = {'c','o','n','f','.','e','x','e',0}; + + DWORD list_count; + DWORD *pid_list = enumerate_processes(&list_count); + + if (pid_list) + { + DWORD i; + WCHAR process_name[MAX_PATH]; + + for (i = 0; i < list_count; i++) + { + if (get_process_name_from_pid(pid_list[i], process_name, sizeof(process_name)/sizeof(WCHAR)) && + !lstrcmpW(conf_exe, process_name)) + { + HeapFree(GetProcessHeap(), 0, pid_list); + return TRUE; + } + } + HeapFree(GetProcessHeap(), 0, pid_list); + } + + return FALSE; +} + +static HRESULT fill_language_information(IDxDiagContainerImpl_Container *node) +{ + static const WCHAR regional_setting_engW[] = {'R','e','g','i','o','n','a','l',' ','S','e','t','t','i','n','g',0}; + static const WCHAR languages_fmtW[] = {'%','s',' ','(','%','s',':',' ','%','s',')',0}; + static const WCHAR szLanguagesLocalized[] = {'s','z','L','a','n','g','u','a','g','e','s','L','o','c','a','l','i','z','e','d',0}; + static const WCHAR szLanguagesEnglish[] = {'s','z','L','a','n','g','u','a','g','e','s','E','n','g','l','i','s','h',0}; + + WCHAR system_lang[80], regional_setting[100], user_lang[80], language_str[300]; + HRESULT hr; + + /* szLanguagesLocalized */ + GetLocaleInfoW(LOCALE_SYSTEM_DEFAULT, LOCALE_SNATIVELANGNAME, system_lang, sizeof(system_lang)/sizeof(WCHAR)); + LoadStringW(dxdiagn_instance, IDS_REGIONAL_SETTING, regional_setting, sizeof(regional_setting)/sizeof(WCHAR)); + GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SNATIVELANGNAME, user_lang, sizeof(user_lang)/sizeof(WCHAR)); + + snprintfW(language_str, sizeof(language_str)/sizeof(WCHAR), languages_fmtW, system_lang, regional_setting, user_lang); + + hr = add_bstr_property(node, szLanguagesLocalized, language_str); + if (FAILED(hr)) + return hr; + + /* szLanguagesEnglish */ + GetLocaleInfoW(LOCALE_SYSTEM_DEFAULT, LOCALE_SENGLANGUAGE, system_lang, sizeof(system_lang)/sizeof(WCHAR)); + GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SENGLANGUAGE, user_lang, sizeof(user_lang)/sizeof(WCHAR)); + + snprintfW(language_str, sizeof(language_str)/sizeof(WCHAR), languages_fmtW, system_lang, regional_setting_engW, user_lang); + + hr = add_bstr_property(node, szLanguagesEnglish, language_str); + if (FAILED(hr)) + return hr; + + return S_OK; +} + +static HRESULT fill_datetime_information(IDxDiagContainerImpl_Container *node) +{ + static const WCHAR date_fmtW[] = {'M','\'','/','\'','d','\'','/','\'','y','y','y','y',0}; + static const WCHAR time_fmtW[] = {'H','H','\'',':','\'','m','m','\'',':','\'','s','s',0}; + static const WCHAR datetime_fmtW[] = {'%','s',',',' ','%','s',0}; + static const WCHAR szTimeLocalized[] = {'s','z','T','i','m','e','L','o','c','a','l','i','z','e','d',0}; + static const WCHAR szTimeEnglish[] = {'s','z','T','i','m','e','E','n','g','l','i','s','h',0}; + + SYSTEMTIME curtime; + WCHAR date_str[80], time_str[80], datetime_str[200]; + HRESULT hr; + + GetLocalTime(&curtime); + + GetTimeFormatW(LOCALE_NEUTRAL, 0, &curtime, time_fmtW, time_str, sizeof(time_str)/sizeof(WCHAR)); + + /* szTimeLocalized */ + GetDateFormatW(LOCALE_USER_DEFAULT, DATE_LONGDATE, &curtime, NULL, date_str, sizeof(date_str)/sizeof(WCHAR)); + + snprintfW(datetime_str, sizeof(datetime_str)/sizeof(WCHAR), datetime_fmtW, date_str, time_str); + + hr = add_bstr_property(node, szTimeLocalized, datetime_str); + if (FAILED(hr)) + return hr; + + /* szTimeEnglish */ + GetDateFormatW(LOCALE_NEUTRAL, 0, &curtime, date_fmtW, date_str, sizeof(date_str)/sizeof(WCHAR)); + + snprintfW(datetime_str, sizeof(datetime_str)/sizeof(WCHAR), datetime_fmtW, date_str, time_str); + + hr = add_bstr_property(node, szTimeEnglish, datetime_str); + if (FAILED(hr)) + return hr; + + return S_OK; +} + +static HRESULT fill_os_string_information(IDxDiagContainerImpl_Container *node, OSVERSIONINFOW *info) +{ + static const WCHAR winxpW[] = {'W','i','n','d','o','w','s',' ','X','P',' ','P','r','o','f','e','s','s','i','o','n','a','l',0}; + static const WCHAR szOSLocalized[] = {'s','z','O','S','L','o','c','a','l','i','z','e','d',0}; + static const WCHAR szOSExLocalized[] = {'s','z','O','S','E','x','L','o','c','a','l','i','z','e','d',0}; + static const WCHAR szOSExLongLocalized[] = {'s','z','O','S','E','x','L','o','n','g','L','o','c','a','l','i','z','e','d',0}; + static const WCHAR szOSEnglish[] = {'s','z','O','S','E','n','g','l','i','s','h',0}; + static const WCHAR szOSExEnglish[] = {'s','z','O','S','E','x','E','n','g','l','i','s','h',0}; + static const WCHAR szOSExLongEnglish[] = {'s','z','O','S','E','x','L','o','n','g','E','n','g','l','i','s','h',0}; + + static const WCHAR *prop_list[] = {szOSLocalized, szOSExLocalized, szOSExLongLocalized, + szOSEnglish, szOSExEnglish, szOSExLongEnglish}; + + size_t i; + HRESULT hr; + + /* FIXME: OS detection should be performed, and localized OS strings + * should contain translated versions of the "build" phrase. */ + for (i = 0; i < sizeof(prop_list)/sizeof(prop_list[0]); i++) + { + hr = add_bstr_property(node, prop_list[i], winxpW); + if (FAILED(hr)) + return hr; + } + + return S_OK; +} + +static HRESULT fill_processor_information(IDxDiagContainerImpl_Container *node) +{ + static const WCHAR szProcessorEnglish[] = {'s','z','P','r','o','c','e','s','s','o','r','E','n','g','l','i','s','h',0}; + + static const WCHAR cimv2W[] = {'\\','\\','.','\\','r','o','o','t','\\','c','i','m','v','2',0}; + static const WCHAR proc_classW[] = {'W','i','n','3','2','_','P','r','o','c','e','s','s','o','r',0}; + static const WCHAR nameW[] = {'N','a','m','e',0}; + static const WCHAR max_clock_speedW[] = {'M','a','x','C','l','o','c','k','S','p','e','e','d',0}; + static const WCHAR cpu_noW[] = {'N','u','m','b','e','r','O','f','L','o','g','i','c','a','l','P','r','o','c','e','s','s','o','r','s',0}; + + static const WCHAR processor_fmtW[] = {'%','s','(','%','d',' ','C','P','U','s',')',',',' ','~','%','d','M','H','z',0}; + + IWbemLocator *wbem_locator; + IWbemServices *wbem_service; + IWbemClassObject *wbem_class; + IEnumWbemClassObject *wbem_enum; + VARIANT cpu_name, cpu_no, clock_speed; + WCHAR print_buf[200]; + BSTR bstr; + ULONG no; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_WbemLocator, NULL, CLSCTX_INPROC_SERVER, &IID_IWbemLocator, (void**)&wbem_locator); + if(FAILED(hr)) + return hr; + + bstr = SysAllocString(cimv2W); + if(!bstr) { + IWbemLocator_Release(wbem_locator); + return E_OUTOFMEMORY; + } + hr = IWbemLocator_ConnectServer(wbem_locator, bstr, NULL, NULL, NULL, 0, NULL, NULL, &wbem_service); + IWbemLocator_Release(wbem_locator); + SysFreeString(bstr); + if(FAILED(hr)) + return hr; + + bstr = SysAllocString(proc_classW); + if(!bstr) { + IWbemServices_Release(wbem_service); + return E_OUTOFMEMORY; + } + hr = IWbemServices_CreateInstanceEnum(wbem_service, bstr, WBEM_FLAG_SYSTEM_ONLY, NULL, &wbem_enum); + IWbemServices_Release(wbem_service); + SysFreeString(bstr); + if(FAILED(hr)) + return hr; + + hr = IEnumWbemClassObject_Next(wbem_enum, 1000, 1, &wbem_class, &no); + IEnumWbemClassObject_Release(wbem_enum); + if(FAILED(hr)) + return hr; + + hr = IWbemClassObject_Get(wbem_class, cpu_noW, 0, &cpu_no, NULL, NULL); + if(FAILED(hr)) { + IWbemClassObject_Release(wbem_class); + return hr; + } + hr = IWbemClassObject_Get(wbem_class, max_clock_speedW, 0, &clock_speed, NULL, NULL); + if(FAILED(hr)) { + IWbemClassObject_Release(wbem_class); + return hr; + } + hr = IWbemClassObject_Get(wbem_class, nameW, 0, &cpu_name, NULL, NULL); + IWbemClassObject_Release(wbem_class); + if(FAILED(hr)) + return hr; + + sprintfW(print_buf, processor_fmtW, V_BSTR(&cpu_name), V_I4(&cpu_no), V_I4(&clock_speed)); + VariantClear(&cpu_name); + VariantClear(&cpu_no); + VariantClear(&clock_speed); + + return add_bstr_property(node, szProcessorEnglish, print_buf); +} + +static HRESULT build_systeminfo_tree(IDxDiagContainerImpl_Container *node) +{ + static const WCHAR dwDirectXVersionMajor[] = {'d','w','D','i','r','e','c','t','X','V','e','r','s','i','o','n','M','a','j','o','r',0}; + static const WCHAR dwDirectXVersionMinor[] = {'d','w','D','i','r','e','c','t','X','V','e','r','s','i','o','n','M','i','n','o','r',0}; + static const WCHAR szDirectXVersionLetter[] = {'s','z','D','i','r','e','c','t','X','V','e','r','s','i','o','n','L','e','t','t','e','r',0}; + static const WCHAR szDirectXVersionLetter_v[] = {'c',0}; + static const WCHAR bDebug[] = {'b','D','e','b','u','g',0}; + static const WCHAR bNECPC98[] = {'b','N','E','C','P','C','9','8',0}; + static const WCHAR szDirectXVersionEnglish[] = {'s','z','D','i','r','e','c','t','X','V','e','r','s','i','o','n','E','n','g','l','i','s','h',0}; + static const WCHAR szDirectXVersionEnglish_v[] = {'4','.','0','9','.','0','0','0','0','.','0','9','0','4',0}; + static const WCHAR szDirectXVersionLongEnglish[] = {'s','z','D','i','r','e','c','t','X','V','e','r','s','i','o','n','L','o','n','g','E','n','g','l','i','s','h',0}; + static const WCHAR szDirectXVersionLongEnglish_v[] = {'=',' ','"','D','i','r','e','c','t','X',' ','9','.','0','c',' ','(','4','.','0','9','.','0','0','0','0','.','0','9','0','4',')',0}; + static const WCHAR ullPhysicalMemory[] = {'u','l','l','P','h','y','s','i','c','a','l','M','e','m','o','r','y',0}; + static const WCHAR ullUsedPageFile[] = {'u','l','l','U','s','e','d','P','a','g','e','F','i','l','e',0}; + static const WCHAR ullAvailPageFile[] = {'u','l','l','A','v','a','i','l','P','a','g','e','F','i','l','e',0}; + static const WCHAR bNetMeetingRunning[] = {'b','N','e','t','M','e','e','t','i','n','g','R','u','n','n','i','n','g',0}; + static const WCHAR szWindowsDir[] = {'s','z','W','i','n','d','o','w','s','D','i','r',0}; + static const WCHAR dwOSMajorVersion[] = {'d','w','O','S','M','a','j','o','r','V','e','r','s','i','o','n',0}; + static const WCHAR dwOSMinorVersion[] = {'d','w','O','S','M','i','n','o','r','V','e','r','s','i','o','n',0}; + static const WCHAR dwOSBuildNumber[] = {'d','w','O','S','B','u','i','l','d','N','u','m','b','e','r',0}; + static const WCHAR dwOSPlatformID[] = {'d','w','O','S','P','l','a','t','f','o','r','m','I','D',0}; + static const WCHAR szCSDVersion[] = {'s','z','C','S','D','V','e','r','s','i','o','n',0}; + static const WCHAR szPhysicalMemoryEnglish[] = {'s','z','P','h','y','s','i','c','a','l','M','e','m','o','r','y','E','n','g','l','i','s','h',0}; + static const WCHAR szPageFileLocalized[] = {'s','z','P','a','g','e','F','i','l','e','L','o','c','a','l','i','z','e','d',0}; + static const WCHAR szPageFileEnglish[] = {'s','z','P','a','g','e','F','i','l','e','E','n','g','l','i','s','h',0}; + static const WCHAR szMachineNameLocalized[] = {'s','z','M','a','c','h','i','n','e','N','a','m','e','L','o','c','a','l','i','z','e','d',0}; + static const WCHAR szMachineNameEnglish[] = {'s','z','M','a','c','h','i','n','e','N','a','m','e','E','n','g','l','i','s','h',0}; + static const WCHAR szSystemManufacturerEnglish[] = {'s','z','S','y','s','t','e','m','M','a','n','u','f','a','c','t','u','r','e','r','E','n','g','l','i','s','h',0}; + static const WCHAR szSystemModelEnglish[] = {'s','z','S','y','s','t','e','m','M','o','d','e','l','E','n','g','l','i','s','h',0}; + static const WCHAR szBIOSEnglish[] = {'s','z','B','I','O','S','E','n','g','l','i','s','h',0}; + static const WCHAR szSetupParamEnglish[] = {'s','z','S','e','t','u','p','P','a','r','a','m','E','n','g','l','i','s','h',0}; + static const WCHAR szDxDiagVersion[] = {'s','z','D','x','D','i','a','g','V','e','r','s','i','o','n',0}; + + static const WCHAR notpresentW[] = {'N','o','t',' ','p','r','e','s','e','n','t',0}; + + static const WCHAR pagefile_fmtW[] = {'%','u','M','B',' ','u','s','e','d',',',' ','%','u','M','B',' ','a','v','a','i','l','a','b','l','e',0}; + static const WCHAR physmem_fmtW[] = {'%','u','M','B',' ','R','A','M',0}; + + HRESULT hr; + MEMORYSTATUSEX msex; + OSVERSIONINFOW info; + DWORD count, usedpage_mb, availpage_mb; + WCHAR buffer[MAX_PATH], computer_name[MAX_COMPUTERNAME_LENGTH + 1], print_buf[200], localized_pagefile_fmt[200]; + DWORD_PTR args[2]; + + hr = add_ui4_property(node, dwDirectXVersionMajor, 9); + if (FAILED(hr)) + return hr; + + hr = add_ui4_property(node, dwDirectXVersionMinor, 0); + if (FAILED(hr)) + return hr; + + hr = add_bstr_property(node, szDirectXVersionLetter, szDirectXVersionLetter_v); + if (FAILED(hr)) + return hr; + + hr = add_bstr_property(node, szDirectXVersionEnglish, szDirectXVersionEnglish_v); + if (FAILED(hr)) + return hr; + + hr = add_bstr_property(node, szDirectXVersionLongEnglish, szDirectXVersionLongEnglish_v); + if (FAILED(hr)) + return hr; + + hr = add_bool_property(node, bDebug, FALSE); + if (FAILED(hr)) + return hr; + + hr = add_bool_property(node, bNECPC98, FALSE); + if (FAILED(hr)) + return hr; + + msex.dwLength = sizeof(msex); + GlobalMemoryStatusEx(&msex); + + hr = add_ull_as_bstr_property(node, ullPhysicalMemory, msex.ullTotalPhys); + if (FAILED(hr)) + return hr; + + hr = add_ull_as_bstr_property(node, ullUsedPageFile, msex.ullTotalPageFile - msex.ullAvailPageFile); + if (FAILED(hr)) + return hr; + + hr = add_ull_as_bstr_property(node, ullAvailPageFile, msex.ullAvailPageFile); + if (FAILED(hr)) + return hr; + + hr = add_bool_property(node, bNetMeetingRunning, is_netmeeting_running()); + if (FAILED(hr)) + return hr; + + info.dwOSVersionInfoSize = sizeof(info); + GetVersionExW(&info); + + hr = add_ui4_property(node, dwOSMajorVersion, info.dwMajorVersion); + if (FAILED(hr)) + return hr; + + hr = add_ui4_property(node, dwOSMinorVersion, info.dwMinorVersion); + if (FAILED(hr)) + return hr; + + hr = add_ui4_property(node, dwOSBuildNumber, info.dwBuildNumber); + if (FAILED(hr)) + return hr; + + hr = add_ui4_property(node, dwOSPlatformID, info.dwPlatformId); + if (FAILED(hr)) + return hr; + + hr = add_bstr_property(node, szCSDVersion, info.szCSDVersion); + if (FAILED(hr)) + return hr; + + /* FIXME: Roundoff should not be done with truncated division. */ + snprintfW(print_buf, sizeof(print_buf)/sizeof(WCHAR), physmem_fmtW, (DWORD)(msex.ullTotalPhys / (1024 * 1024))); + hr = add_bstr_property(node, szPhysicalMemoryEnglish, print_buf); + if (FAILED(hr)) + return hr; + + usedpage_mb = (DWORD)((msex.ullTotalPageFile - msex.ullAvailPageFile) / (1024 * 1024)); + availpage_mb = (DWORD)(msex.ullAvailPageFile / (1024 * 1024)); + LoadStringW(dxdiagn_instance, IDS_PAGE_FILE_FORMAT, localized_pagefile_fmt, sizeof(localized_pagefile_fmt)/sizeof(WCHAR)); + args[0] = usedpage_mb; + args[1] = availpage_mb; + FormatMessageW(FORMAT_MESSAGE_FROM_STRING|FORMAT_MESSAGE_ARGUMENT_ARRAY, + localized_pagefile_fmt, 0, 0, print_buf, + sizeof(print_buf)/sizeof(*print_buf), (__ms_va_list*)args); + + hr = add_bstr_property(node, szPageFileLocalized, print_buf); + if (FAILED(hr)) + return hr; + + snprintfW(print_buf, sizeof(print_buf)/sizeof(WCHAR), pagefile_fmtW, usedpage_mb, availpage_mb); + + hr = add_bstr_property(node, szPageFileEnglish, print_buf); + if (FAILED(hr)) + return hr; + + GetWindowsDirectoryW(buffer, MAX_PATH); + + hr = add_bstr_property(node, szWindowsDir, buffer); + if (FAILED(hr)) + return hr; + + count = sizeof(computer_name)/sizeof(WCHAR); + if (!GetComputerNameW(computer_name, &count)) + return E_FAIL; + + hr = add_bstr_property(node, szMachineNameLocalized, computer_name); + if (FAILED(hr)) + return hr; + + hr = add_bstr_property(node, szMachineNameEnglish, computer_name); + if (FAILED(hr)) + return hr; + + hr = add_bstr_property(node, szSystemManufacturerEnglish, szEmpty); + if (FAILED(hr)) + return hr; + + hr = add_bstr_property(node, szSystemModelEnglish, szEmpty); + if (FAILED(hr)) + return hr; + + hr = add_bstr_property(node, szBIOSEnglish, szEmpty); + if (FAILED(hr)) + return hr; + + hr = fill_processor_information(node); + if (FAILED(hr)) + return hr; + + hr = add_bstr_property(node, szSetupParamEnglish, notpresentW); + if (FAILED(hr)) + return hr; + + hr = add_bstr_property(node, szDxDiagVersion, szEmpty); + if (FAILED(hr)) + return hr; + + hr = fill_language_information(node); + if (FAILED(hr)) + return hr; + + hr = fill_datetime_information(node); + if (FAILED(hr)) + return hr; + + hr = fill_os_string_information(node, &info); + if (FAILED(hr)) + return hr; + + return S_OK; +} + +/* The logic from pixelformat_for_depth() in dlls/wined3d/utils.c is reversed. */ +static DWORD depth_for_pixelformat(D3DFORMAT format) +{ + switch (format) + { + case D3DFMT_P8: return 8; + case D3DFMT_X1R5G5B5: return 15; + case D3DFMT_R5G6B5: return 16; + /* This case will fail to distinguish an original bpp of 24. */ + case D3DFMT_X8R8G8B8: return 32; + default: + FIXME("Unknown D3DFORMAT %d, returning 32 bpp\n", format); + return 32; + } +} + +static BOOL get_texture_memory(GUID *adapter, DWORD *available_mem) +{ + IDirectDraw7 *pDirectDraw; + HRESULT hr; + DDSCAPS2 dd_caps; + + hr = DirectDrawCreateEx(adapter, (void **)&pDirectDraw, &IID_IDirectDraw7, NULL); + if (SUCCEEDED(hr)) + { + dd_caps.dwCaps = DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY; + dd_caps.dwCaps2 = dd_caps.dwCaps3 = dd_caps.u1.dwCaps4 = 0; + hr = IDirectDraw7_GetAvailableVidMem(pDirectDraw, &dd_caps, available_mem, NULL); + IDirectDraw7_Release(pDirectDraw); + if (SUCCEEDED(hr)) + return TRUE; + } + + return FALSE; +} + +static const WCHAR *vendor_id_to_manufacturer_string(DWORD vendor_id) +{ + static const WCHAR atiW[] = {'A','T','I',' ','T','e','c','h','n','o','l','o','g','i','e','s',' ','I','n','c','.',0}; + static const WCHAR nvidiaW[] = {'N','V','I','D','I','A',0}; + static const WCHAR intelW[] = {'I','n','t','e','l',' ','C','o','r','p','o','r','a','t','i','o','n',0}; + static const WCHAR unknownW[] = {'U','n','k','n','o','w','n',0}; + + /* Enumeration copied from dlls/wined3d/wined3d_private.h and slightly modified. */ + enum pci_vendor + { + HW_VENDOR_AMD = 0x1002, + HW_VENDOR_NVIDIA = 0x10de, + HW_VENDOR_INTEL = 0x8086, + }; + + switch (vendor_id) + { + case HW_VENDOR_AMD: + return atiW; + case HW_VENDOR_NVIDIA: + return nvidiaW; + case HW_VENDOR_INTEL: + return intelW; + default: + FIXME("Unknown PCI vendor ID 0x%04x\n", vendor_id); + return unknownW; + } +} + +static HRESULT fill_display_information_d3d(IDxDiagContainerImpl_Container *node) +{ + IDxDiagContainerImpl_Container *display_adapter; + HRESULT hr; + IDirect3D9 *pDirect3D9; + WCHAR buffer[256]; + UINT index, count; + + pDirect3D9 = Direct3DCreate9(D3D_SDK_VERSION); + if (!pDirect3D9) + return E_FAIL; + + count = IDirect3D9_GetAdapterCount(pDirect3D9); + for (index = 0; index < count; index++) + { + static const WCHAR adapterid_fmtW[] = {'%','u',0}; + static const WCHAR driverversion_fmtW[] = {'%','u','.','%','u','.','%','0','4','u','.','%','0','4','u',0}; + static const WCHAR id_fmtW[] = {'0','x','%','0','4','x',0}; + static const WCHAR subsysid_fmtW[] = {'0','x','%','0','8','x',0}; + static const WCHAR mem_fmt[] = {'%','.','1','f',' ','M','B',0}; + + D3DADAPTER_IDENTIFIER9 adapter_info; + D3DDISPLAYMODE adapter_mode; + DWORD available_mem = 0; + + snprintfW(buffer, sizeof(buffer)/sizeof(WCHAR), adapterid_fmtW, index); + display_adapter = allocate_information_node(buffer); + if (!display_adapter) + { + hr = E_OUTOFMEMORY; + goto cleanup; + } + + add_subcontainer(node, display_adapter); + + hr = IDirect3D9_GetAdapterIdentifier(pDirect3D9, index, 0, &adapter_info); + if (SUCCEEDED(hr)) + { + WCHAR driverW[sizeof(adapter_info.Driver)]; + WCHAR descriptionW[sizeof(adapter_info.Description)]; + WCHAR devicenameW[sizeof(adapter_info.DeviceName)]; + + MultiByteToWideChar(CP_ACP, 0, adapter_info.Driver, -1, driverW, sizeof(driverW)/sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, adapter_info.Description, -1, descriptionW, sizeof(descriptionW)/sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, adapter_info.DeviceName, -1, devicenameW, sizeof(devicenameW)/sizeof(WCHAR)); + + hr = add_bstr_property(display_adapter, szDriverName, driverW); + if (FAILED(hr)) + goto cleanup; + + hr = add_bstr_property(display_adapter, szDescription, descriptionW); + if (FAILED(hr)) + goto cleanup; + + hr = add_bstr_property(display_adapter, szDeviceName, devicenameW); + if (FAILED(hr)) + goto cleanup; + + snprintfW(buffer, sizeof(buffer)/sizeof(WCHAR), driverversion_fmtW, + HIWORD(adapter_info.DriverVersion.u.HighPart), LOWORD(adapter_info.DriverVersion.u.HighPart), + HIWORD(adapter_info.DriverVersion.u.LowPart), LOWORD(adapter_info.DriverVersion.u.LowPart)); + + hr = add_bstr_property(display_adapter, szDriverVersion, buffer); + if (FAILED(hr)) + goto cleanup; + + snprintfW(buffer, sizeof(buffer)/sizeof(WCHAR), id_fmtW, adapter_info.VendorId); + hr = add_bstr_property(display_adapter, szVendorId, buffer); + if (FAILED(hr)) + goto cleanup; + + snprintfW(buffer, sizeof(buffer)/sizeof(WCHAR), id_fmtW, adapter_info.DeviceId); + hr = add_bstr_property(display_adapter, szDeviceId, buffer); + if (FAILED(hr)) + goto cleanup; + + snprintfW(buffer, sizeof(buffer)/sizeof(WCHAR), subsysid_fmtW, adapter_info.SubSysId); + hr = add_bstr_property(display_adapter, szSubSysId, buffer); + if (FAILED(hr)) + goto cleanup; + + snprintfW(buffer, sizeof(buffer)/sizeof(WCHAR), id_fmtW, adapter_info.Revision); + hr = add_bstr_property(display_adapter, szRevisionId, buffer); + if (FAILED(hr)) + goto cleanup; + + StringFromGUID2(&adapter_info.DeviceIdentifier, buffer, 39); + hr = add_bstr_property(display_adapter, szDeviceIdentifier, buffer); + if (FAILED(hr)) + goto cleanup; + + hr = add_bstr_property(display_adapter, szManufacturer, vendor_id_to_manufacturer_string(adapter_info.VendorId)); + if (FAILED(hr)) + goto cleanup; + } + + hr = IDirect3D9_GetAdapterDisplayMode(pDirect3D9, index, &adapter_mode); + if (SUCCEEDED(hr)) + { + hr = add_ui4_property(display_adapter, dwWidth, adapter_mode.Width); + if (FAILED(hr)) + goto cleanup; + + hr = add_ui4_property(display_adapter, dwHeight, adapter_mode.Height); + if (FAILED(hr)) + goto cleanup; + + hr = add_ui4_property(display_adapter, dwRefreshRate, adapter_mode.RefreshRate); + if (FAILED(hr)) + goto cleanup; + + hr = add_ui4_property(display_adapter, dwBpp, depth_for_pixelformat(adapter_mode.Format)); + if (FAILED(hr)) + goto cleanup; + } + + hr = add_bstr_property(display_adapter, szKeyDeviceKey, szEmpty); + if (FAILED(hr)) + goto cleanup; + + hr = add_bstr_property(display_adapter, szKeyDeviceID, szEmpty); + if (FAILED(hr)) + goto cleanup; + + if (!get_texture_memory(&adapter_info.DeviceIdentifier, &available_mem)) + WARN("get_texture_memory helper failed\n"); + + snprintfW(buffer, sizeof(buffer)/sizeof(buffer[0]), mem_fmt, available_mem / 1000000.0f); + + hr = add_bstr_property(display_adapter, szDisplayMemoryLocalized, buffer); + if (FAILED(hr)) + goto cleanup; + + hr = add_bstr_property(display_adapter, szDisplayMemoryEnglish, buffer); + if (FAILED(hr)) + goto cleanup; + } + + hr = S_OK; +cleanup: + IDirect3D9_Release(pDirect3D9); + return hr; +} + +static HRESULT fill_display_information_fallback(IDxDiagContainerImpl_Container *node) +{ + static const WCHAR szAdapterID[] = {'0',0}; + static const WCHAR *empty_properties[] = {szDeviceIdentifier, szVendorId, szDeviceId, + szKeyDeviceKey, szKeyDeviceID, szDriverName, + szDriverVersion, szSubSysId, szRevisionId, + szManufacturer}; + + IDxDiagContainerImpl_Container *display_adapter; + HRESULT hr; + IDirectDraw7 *pDirectDraw; + DDSCAPS2 dd_caps; + DISPLAY_DEVICEW disp_dev; + DDSURFACEDESC2 surface_descr; + DWORD tmp; + WCHAR buffer[256]; + + display_adapter = allocate_information_node(szAdapterID); + if (!display_adapter) + return E_OUTOFMEMORY; + + add_subcontainer(node, display_adapter); + + disp_dev.cb = sizeof(disp_dev); + if (EnumDisplayDevicesW( NULL, 0, &disp_dev, 0 )) + { + hr = add_bstr_property(display_adapter, szDeviceName, disp_dev.DeviceName); + if (FAILED(hr)) + return hr; + + hr = add_bstr_property(display_adapter, szDescription, disp_dev.DeviceString); + if (FAILED(hr)) + return hr; + } + + /* Silently ignore a failure from DirectDrawCreateEx. */ + hr = DirectDrawCreateEx(NULL, (void **)&pDirectDraw, &IID_IDirectDraw7, NULL); + if (FAILED(hr)) + return S_OK; + + dd_caps.dwCaps = DDSCAPS_LOCALVIDMEM | DDSCAPS_VIDEOMEMORY; + dd_caps.dwCaps2 = dd_caps.dwCaps3 = dd_caps.u1.dwCaps4 = 0; + hr = IDirectDraw7_GetAvailableVidMem(pDirectDraw, &dd_caps, &tmp, NULL); + if (SUCCEEDED(hr)) + { + static const WCHAR mem_fmt[] = {'%','.','1','f',' ','M','B',0}; + + snprintfW(buffer, sizeof(buffer)/sizeof(buffer[0]), mem_fmt, tmp / 1000000.0f); + + hr = add_bstr_property(display_adapter, szDisplayMemoryLocalized, buffer); + if (FAILED(hr)) + goto cleanup; + + hr = add_bstr_property(display_adapter, szDisplayMemoryEnglish, buffer); + if (FAILED(hr)) + goto cleanup; + } + + surface_descr.dwSize = sizeof(surface_descr); + hr = IDirectDraw7_GetDisplayMode(pDirectDraw, &surface_descr); + if (SUCCEEDED(hr)) + { + if (surface_descr.dwFlags & DDSD_WIDTH) + { + hr = add_ui4_property(display_adapter, dwWidth, surface_descr.dwWidth); + if (FAILED(hr)) + goto cleanup; + } + + if (surface_descr.dwFlags & DDSD_HEIGHT) + { + hr = add_ui4_property(display_adapter, dwHeight, surface_descr.dwHeight); + if (FAILED(hr)) + goto cleanup; + } + + if (surface_descr.dwFlags & DDSD_PIXELFORMAT) + { + hr = add_ui4_property(display_adapter, dwBpp, surface_descr.u4.ddpfPixelFormat.u1.dwRGBBitCount); + if (FAILED(hr)) + goto cleanup; + } + } + + hr = add_ui4_property(display_adapter, dwRefreshRate, 60); + if (FAILED(hr)) + goto cleanup; + + for (tmp = 0; tmp < sizeof(empty_properties)/sizeof(empty_properties[0]); tmp++) + { + hr = add_bstr_property(display_adapter, empty_properties[tmp], szEmpty); + if (FAILED(hr)) + goto cleanup; + } + + hr = S_OK; +cleanup: + IDirectDraw7_Release(pDirectDraw); + return hr; +} + +static HRESULT build_displaydevices_tree(IDxDiagContainerImpl_Container *node) +{ + HRESULT hr; + + /* Try to use Direct3D to obtain the required information first. */ + hr = fill_display_information_d3d(node); + if (hr != E_FAIL) + return hr; + + return fill_display_information_fallback(node); +} + +static HRESULT build_directsound_tree(IDxDiagContainerImpl_Container *node) +{ + static const WCHAR DxDiag_SoundDevices[] = {'D','x','D','i','a','g','_','S','o','u','n','d','D','e','v','i','c','e','s',0}; + static const WCHAR DxDiag_SoundCaptureDevices[] = {'D','x','D','i','a','g','_','S','o','u','n','d','C','a','p','t','u','r','e','D','e','v','i','c','e','s',0}; + + IDxDiagContainerImpl_Container *cont; + + cont = allocate_information_node(DxDiag_SoundDevices); + if (!cont) + return E_OUTOFMEMORY; + + add_subcontainer(node, cont); + + cont = allocate_information_node(DxDiag_SoundCaptureDevices); + if (!cont) + return E_OUTOFMEMORY; + + add_subcontainer(node, cont); + + return S_OK; +} + +static HRESULT build_directmusic_tree(IDxDiagContainerImpl_Container *node) +{ + return S_OK; +} + +static HRESULT build_directinput_tree(IDxDiagContainerImpl_Container *node) +{ + return S_OK; +} + +static HRESULT build_directplay_tree(IDxDiagContainerImpl_Container *node) +{ + return S_OK; +} + +static HRESULT build_systemdevices_tree(IDxDiagContainerImpl_Container *node) +{ + return S_OK; +} + +static HRESULT fill_file_description(IDxDiagContainerImpl_Container *node, const WCHAR *szFilePath, const WCHAR *szFileName) +{ + static const WCHAR szSlashSep[] = {'\\',0}; + static const WCHAR szPath[] = {'s','z','P','a','t','h',0}; + static const WCHAR szName[] = {'s','z','N','a','m','e',0}; + static const WCHAR szVersion[] = {'s','z','V','e','r','s','i','o','n',0}; + static const WCHAR szAttributes[] = {'s','z','A','t','t','r','i','b','u','t','e','s',0}; + static const WCHAR szLanguageEnglish[] = {'s','z','L','a','n','g','u','a','g','e','E','n','g','l','i','s','h',0}; + static const WCHAR dwFileTimeHigh[] = {'d','w','F','i','l','e','T','i','m','e','H','i','g','h',0}; + static const WCHAR dwFileTimeLow[] = {'d','w','F','i','l','e','T','i','m','e','L','o','w',0}; + static const WCHAR bBeta[] = {'b','B','e','t','a',0}; + static const WCHAR bDebug[] = {'b','D','e','b','u','g',0}; + static const WCHAR bExists[] = {'b','E','x','i','s','t','s',0}; + + /* Values */ + static const WCHAR szFinal_Retail_v[] = {'F','i','n','a','l',' ','R','e','t','a','i','l',0}; + static const WCHAR szEnglish_v[] = {'E','n','g','l','i','s','h',0}; + static const WCHAR szVersionFormat[] = {'%','u','.','%','0','2','u','.','%','0','4','u','.','%','0','4','u',0}; + + HRESULT hr; + WCHAR *szFile; + WCHAR szVersion_v[1024]; + DWORD retval, hdl; + void *pVersionInfo = NULL; + BOOL boolret = FALSE; + UINT uiLength; + VS_FIXEDFILEINFO *pFileInfo; + + TRACE("Filling container %p for %s in %s\n", node, + debugstr_w(szFileName), debugstr_w(szFilePath)); + + szFile = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR) * (lstrlenW(szFilePath) + + lstrlenW(szFileName) + 2 /* slash + terminator */)); + if (!szFile) + return E_OUTOFMEMORY; + + lstrcpyW(szFile, szFilePath); + lstrcatW(szFile, szSlashSep); + lstrcatW(szFile, szFileName); + + retval = GetFileVersionInfoSizeW(szFile, &hdl); + if (retval) + { + pVersionInfo = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, retval); + if (!pVersionInfo) + { + hr = E_OUTOFMEMORY; + goto cleanup; + } + + if (GetFileVersionInfoW(szFile, 0, retval, pVersionInfo) && + VerQueryValueW(pVersionInfo, szSlashSep, (void **)&pFileInfo, &uiLength)) + boolret = TRUE; + } + + hr = add_bstr_property(node, szPath, szFile); + if (FAILED(hr)) + goto cleanup; + + hr = add_bstr_property(node, szName, szFileName); + if (FAILED(hr)) + goto cleanup; + + hr = add_bool_property(node, bExists, boolret); + if (FAILED(hr)) + goto cleanup; + + if (boolret) + { + snprintfW(szVersion_v, sizeof(szVersion_v)/sizeof(szVersion_v[0]), + szVersionFormat, + HIWORD(pFileInfo->dwFileVersionMS), + LOWORD(pFileInfo->dwFileVersionMS), + HIWORD(pFileInfo->dwFileVersionLS), + LOWORD(pFileInfo->dwFileVersionLS)); + + TRACE("Found version as (%s)\n", debugstr_w(szVersion_v)); + + hr = add_bstr_property(node, szVersion, szVersion_v); + if (FAILED(hr)) + goto cleanup; + + hr = add_bstr_property(node, szAttributes, szFinal_Retail_v); + if (FAILED(hr)) + goto cleanup; + + hr = add_bstr_property(node, szLanguageEnglish, szEnglish_v); + if (FAILED(hr)) + goto cleanup; + + hr = add_ui4_property(node, dwFileTimeHigh, pFileInfo->dwFileDateMS); + if (FAILED(hr)) + goto cleanup; + + hr = add_ui4_property(node, dwFileTimeLow, pFileInfo->dwFileDateLS); + if (FAILED(hr)) + goto cleanup; + + hr = add_bool_property(node, bBeta, ((pFileInfo->dwFileFlags & pFileInfo->dwFileFlagsMask) & VS_FF_PRERELEASE) != 0); + if (FAILED(hr)) + goto cleanup; + + hr = add_bool_property(node, bDebug, ((pFileInfo->dwFileFlags & pFileInfo->dwFileFlagsMask) & VS_FF_DEBUG) != 0); + if (FAILED(hr)) + goto cleanup; + } + + hr = S_OK; +cleanup: + HeapFree(GetProcessHeap(), 0, pVersionInfo); + HeapFree(GetProcessHeap(), 0, szFile); + + return hr; +} +static HRESULT build_directxfiles_tree(IDxDiagContainerImpl_Container *node) +{ + static const WCHAR dlls[][15] = + { + {'d','3','d','8','.','d','l','l',0}, + {'d','3','d','9','.','d','l','l',0}, + {'d','d','r','a','w','.','d','l','l',0}, + {'d','e','v','e','n','u','m','.','d','l','l',0}, + {'d','i','n','p','u','t','8','.','d','l','l',0}, + {'d','i','n','p','u','t','.','d','l','l',0}, + {'d','m','b','a','n','d','.','d','l','l',0}, + {'d','m','c','o','m','p','o','s','.','d','l','l',0}, + {'d','m','i','m','e','.','d','l','l',0}, + {'d','m','l','o','a','d','e','r','.','d','l','l',0}, + {'d','m','s','c','r','i','p','t','.','d','l','l',0}, + {'d','m','s','t','y','l','e','.','d','l','l',0}, + {'d','m','s','y','n','t','h','.','d','l','l',0}, + {'d','m','u','s','i','c','.','d','l','l',0}, + {'d','p','l','a','y','x','.','d','l','l',0}, + {'d','p','n','e','t','.','d','l','l',0}, + {'d','s','o','u','n','d','.','d','l','l',0}, + {'d','s','w','a','v','e','.','d','l','l',0}, + {'d','x','d','i','a','g','n','.','d','l','l',0}, + {'q','u','a','r','t','z','.','d','l','l',0} + }; + + HRESULT hr; + WCHAR szFilePath[MAX_PATH]; + INT i; + + GetSystemDirectoryW(szFilePath, MAX_PATH); + + for (i = 0; i < sizeof(dlls) / sizeof(dlls[0]); i++) + { + static const WCHAR szFormat[] = {'%','d',0}; + + WCHAR szFileID[5]; + IDxDiagContainerImpl_Container *file_container; + + snprintfW(szFileID, sizeof(szFileID)/sizeof(szFileID[0]), szFormat, i); + + file_container = allocate_information_node(szFileID); + if (!file_container) + return E_OUTOFMEMORY; + + hr = fill_file_description(file_container, szFilePath, dlls[i]); + if (FAILED(hr)) + { + free_information_tree(file_container); + continue; + } + + add_subcontainer(node, file_container); + } + + return S_OK; +} + +static HRESULT read_property_names(IPropertyBag *pPropBag, VARIANT *friendly_name, VARIANT *clsid_name) +{ + static const WCHAR wszFriendlyName[] = {'F','r','i','e','n','d','l','y','N','a','m','e',0}; + static const WCHAR wszClsidName[] = {'C','L','S','I','D',0}; + + HRESULT hr; + + VariantInit(friendly_name); + VariantInit(clsid_name); + + hr = IPropertyBag_Read(pPropBag, wszFriendlyName, friendly_name, 0); + if (FAILED(hr)) + return hr; + + hr = IPropertyBag_Read(pPropBag, wszClsidName, clsid_name, 0); + if (FAILED(hr)) + { + VariantClear(friendly_name); + return hr; + } + + return S_OK; +} + +static HRESULT fill_filter_data_information(IDxDiagContainerImpl_Container *subcont, BYTE *pData, ULONG cb) +{ + static const WCHAR szVersionW[] = {'s','z','V','e','r','s','i','o','n',0}; + static const WCHAR dwInputs[] = {'d','w','I','n','p','u','t','s',0}; + static const WCHAR dwOutputs[] = {'d','w','O','u','t','p','u','t','s',0}; + static const WCHAR dwMeritW[] = {'d','w','M','e','r','i','t',0}; + static const WCHAR szVersionFormat[] = {'v','%','d',0}; + + HRESULT hr; + IFilterMapper2 *pFileMapper = NULL; + IAMFilterData *pFilterData = NULL; + BYTE *ppRF = NULL; + REGFILTER2 *pRF = NULL; + WCHAR bufferW[10]; + ULONG j; + DWORD dwNOutputs = 0; + DWORD dwNInputs = 0; + + hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC, &IID_IFilterMapper2, + (void **)&pFileMapper); + if (FAILED(hr)) + return hr; + + hr = IFilterMapper2_QueryInterface(pFileMapper, &IID_IAMFilterData, (void **)&pFilterData); + if (FAILED(hr)) + goto cleanup; + + hr = IAMFilterData_ParseFilterData(pFilterData, pData, cb, (BYTE **)&ppRF); + if (FAILED(hr)) + goto cleanup; + pRF = ((REGFILTER2**)ppRF)[0]; + + snprintfW(bufferW, sizeof(bufferW)/sizeof(bufferW[0]), szVersionFormat, pRF->dwVersion); + hr = add_bstr_property(subcont, szVersionW, bufferW); + if (FAILED(hr)) + goto cleanup; + + if (pRF->dwVersion == 1) + { + for (j = 0; j < pRF->u.s1.cPins; j++) + if (pRF->u.s1.rgPins[j].bOutput) + dwNOutputs++; + else + dwNInputs++; + } + else if (pRF->dwVersion == 2) + { + for (j = 0; j < pRF->u.s2.cPins2; j++) + if (pRF->u.s2.rgPins2[j].dwFlags & REG_PINFLAG_B_OUTPUT) + dwNOutputs++; + else + dwNInputs++; + } + + hr = add_ui4_property(subcont, dwInputs, dwNInputs); + if (FAILED(hr)) + goto cleanup; + + hr = add_ui4_property(subcont, dwOutputs, dwNOutputs); + if (FAILED(hr)) + goto cleanup; + + hr = add_ui4_property(subcont, dwMeritW, pRF->dwMerit); + if (FAILED(hr)) + goto cleanup; + + hr = S_OK; +cleanup: + CoTaskMemFree(pRF); + if (pFilterData) IAMFilterData_Release(pFilterData); + if (pFileMapper) IFilterMapper2_Release(pFileMapper); + + return hr; +} + +static HRESULT fill_filter_container(IDxDiagContainerImpl_Container *subcont, IMoniker *pMoniker) +{ + static const WCHAR szName[] = {'s','z','N','a','m','e',0}; + static const WCHAR ClsidFilterW[] = {'C','l','s','i','d','F','i','l','t','e','r',0}; + static const WCHAR wszFilterDataName[] = {'F','i','l','t','e','r','D','a','t','a',0}; + + HRESULT hr; + IPropertyBag *pPropFilterBag = NULL; + BYTE *pData; + VARIANT friendly_name; + VARIANT clsid_name; + VARIANT v; + + VariantInit(&friendly_name); + VariantInit(&clsid_name); + VariantInit(&v); + + hr = IMoniker_BindToStorage(pMoniker, NULL, NULL, &IID_IPropertyBag, (void **)&pPropFilterBag); + if (FAILED(hr)) + return hr; + + hr = read_property_names(pPropFilterBag, &friendly_name, &clsid_name); + if (FAILED(hr)) + goto cleanup; + + TRACE("Name = %s\n", debugstr_w(V_BSTR(&friendly_name))); + TRACE("CLSID = %s\n", debugstr_w(V_BSTR(&clsid_name))); + + hr = add_bstr_property(subcont, szName, V_BSTR(&friendly_name)); + if (FAILED(hr)) + goto cleanup; + + hr = add_bstr_property(subcont, ClsidFilterW, V_BSTR(&clsid_name)); + if (FAILED(hr)) + goto cleanup; + + hr = IPropertyBag_Read(pPropFilterBag, wszFilterDataName, &v, NULL); + if (FAILED(hr)) + goto cleanup; + + hr = SafeArrayAccessData(V_ARRAY(&v), (void **)&pData); + if (FAILED(hr)) + goto cleanup; + + hr = fill_filter_data_information(subcont, pData, V_ARRAY(&v)->rgsabound->cElements); + SafeArrayUnaccessData(V_ARRAY(&v)); + if (FAILED(hr)) + goto cleanup; + + hr = S_OK; +cleanup: + VariantClear(&v); + VariantClear(&clsid_name); + VariantClear(&friendly_name); + if (pPropFilterBag) IPropertyBag_Release(pPropFilterBag); + + return hr; +} + +static HRESULT build_directshowfilters_tree(IDxDiagContainerImpl_Container *node) +{ + static const WCHAR szCatName[] = {'s','z','C','a','t','N','a','m','e',0}; + static const WCHAR ClsidCatW[] = {'C','l','s','i','d','C','a','t',0}; + static const WCHAR szIdFormat[] = {'%','d',0}; + + HRESULT hr; + int i = 0; + ICreateDevEnum *pCreateDevEnum; + IEnumMoniker *pEmCat = NULL; + IMoniker *pMCat = NULL; + IEnumMoniker *pEnum = NULL; + + hr = CoCreateInstance(&CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, + &IID_ICreateDevEnum, (void **)&pCreateDevEnum); + if (FAILED(hr)) + return hr; + + hr = ICreateDevEnum_CreateClassEnumerator(pCreateDevEnum, &CLSID_ActiveMovieCategories, &pEmCat, 0); + if (FAILED(hr)) + goto cleanup; + + while (IEnumMoniker_Next(pEmCat, 1, &pMCat, NULL) == S_OK) + { + VARIANT vCatName; + VARIANT vCatClsid; + IPropertyBag *pPropBag; + CLSID clsidCat; + IMoniker *pMoniker = NULL; + + hr = IMoniker_BindToStorage(pMCat, NULL, NULL, &IID_IPropertyBag, (void **)&pPropBag); + if (FAILED(hr)) + { + IMoniker_Release(pMCat); + break; + } + + hr = read_property_names(pPropBag, &vCatName, &vCatClsid); + IPropertyBag_Release(pPropBag); + if (FAILED(hr)) + { + IMoniker_Release(pMCat); + break; + } + + hr = CLSIDFromString(V_BSTR(&vCatClsid), &clsidCat); + if (FAILED(hr)) + { + IMoniker_Release(pMCat); + VariantClear(&vCatClsid); + VariantClear(&vCatName); + break; + } + + hr = ICreateDevEnum_CreateClassEnumerator(pCreateDevEnum, &clsidCat, &pEnum, 0); + if (hr != S_OK) + { + IMoniker_Release(pMCat); + VariantClear(&vCatClsid); + VariantClear(&vCatName); + continue; + } + + TRACE("Enumerating class %s\n", debugstr_guid(&clsidCat)); + + while (IEnumMoniker_Next(pEnum, 1, &pMoniker, NULL) == S_OK) + { + WCHAR bufferW[10]; + IDxDiagContainerImpl_Container *subcont; + + snprintfW(bufferW, sizeof(bufferW)/sizeof(bufferW[0]), szIdFormat, i); + subcont = allocate_information_node(bufferW); + if (!subcont) + { + hr = E_OUTOFMEMORY; + IMoniker_Release(pMoniker); + break; + } + + hr = add_bstr_property(subcont, szCatName, V_BSTR(&vCatName)); + if (FAILED(hr)) + { + free_information_tree(subcont); + IMoniker_Release(pMoniker); + break; + } + + hr = add_bstr_property(subcont, ClsidCatW, V_BSTR(&vCatClsid)); + if (FAILED(hr)) + { + free_information_tree(subcont); + IMoniker_Release(pMoniker); + break; + } + + hr = fill_filter_container(subcont, pMoniker); + if (FAILED(hr)) + { + free_information_tree(subcont); + IMoniker_Release(pMoniker); + break; + } + + add_subcontainer(node, subcont); + i++; + IMoniker_Release(pMoniker); + } + + IEnumMoniker_Release(pEnum); + IMoniker_Release(pMCat); + VariantClear(&vCatClsid); + VariantClear(&vCatName); + + if (FAILED(hr)) + break; + } + +cleanup: + if (pEmCat) IEnumMoniker_Release(pEmCat); + ICreateDevEnum_Release(pCreateDevEnum); + return hr; +} + +static HRESULT build_logicaldisks_tree(IDxDiagContainerImpl_Container *node) +{ + return S_OK; +} + +static HRESULT build_information_tree(IDxDiagContainerImpl_Container **pinfo_root) +{ + static const WCHAR DxDiag_SystemInfo[] = {'D','x','D','i','a','g','_','S','y','s','t','e','m','I','n','f','o',0}; + static const WCHAR DxDiag_DisplayDevices[] = {'D','x','D','i','a','g','_','D','i','s','p','l','a','y','D','e','v','i','c','e','s',0}; + static const WCHAR DxDiag_DirectSound[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','S','o','u','n','d',0}; + static const WCHAR DxDiag_DirectMusic[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','M','u','s','i','c',0}; + static const WCHAR DxDiag_DirectInput[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','I','n','p','u','t',0}; + static const WCHAR DxDiag_DirectPlay[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','P','l','a','y',0}; + static const WCHAR DxDiag_SystemDevices[] = {'D','x','D','i','a','g','_','S','y','s','t','e','m','D','e','v','i','c','e','s',0}; + static const WCHAR DxDiag_DirectXFiles[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','X','F','i','l','e','s',0}; + static const WCHAR DxDiag_DirectShowFilters[] = {'D','x','D','i','a','g','_','D','i','r','e','c','t','S','h','o','w','F','i','l','t','e','r','s',0}; + static const WCHAR DxDiag_LogicalDisks[] = {'D','x','D','i','a','g','_','L','o','g','i','c','a','l','D','i','s','k','s',0}; + + static const struct + { + const WCHAR *name; + HRESULT (*initfunc)(IDxDiagContainerImpl_Container *); + } root_children[] = + { + {DxDiag_SystemInfo, build_systeminfo_tree}, + {DxDiag_DisplayDevices, build_displaydevices_tree}, + {DxDiag_DirectSound, build_directsound_tree}, + {DxDiag_DirectMusic, build_directmusic_tree}, + {DxDiag_DirectInput, build_directinput_tree}, + {DxDiag_DirectPlay, build_directplay_tree}, + {DxDiag_SystemDevices, build_systemdevices_tree}, + {DxDiag_DirectXFiles, build_directxfiles_tree}, + {DxDiag_DirectShowFilters, build_directshowfilters_tree}, + {DxDiag_LogicalDisks, build_logicaldisks_tree}, + }; + + IDxDiagContainerImpl_Container *info_root; + size_t index; + + info_root = allocate_information_node(NULL); + if (!info_root) + return E_OUTOFMEMORY; + + for (index = 0; index < sizeof(root_children)/sizeof(root_children[0]); index++) + { + IDxDiagContainerImpl_Container *node; + HRESULT hr; + + node = allocate_information_node(root_children[index].name); + if (!node) + { + free_information_tree(info_root); + return E_OUTOFMEMORY; + } + + hr = root_children[index].initfunc(node); + if (FAILED(hr)) + { + free_information_tree(node); + free_information_tree(info_root); + return hr; + } + + add_subcontainer(info_root, node); + } + + *pinfo_root = info_root; + return S_OK; +} diff --git a/dll/win32/sti/sti_private.h b/dll/directx/wine/dxdiagn/resource.h similarity index 70% rename from dll/win32/sti/sti_private.h rename to dll/directx/wine/dxdiagn/resource.h index b5e106b60b6..dd6c1a3bd03 100644 --- a/dll/win32/sti/sti_private.h +++ b/dll/directx/wine/dxdiagn/resource.h @@ -1,7 +1,7 @@ /* - * STI private definitions + * Resource identifiers for dxdiagn * - * Copyright 2009 Damjan Jovanovic + * Copyright 2011 Andrew Nguyen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -18,15 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef __STI_PRIVATE__ -#define __STI_PRIVATE__ +#include -typedef struct _stillimage -{ - const struct IStillImageWVtbl *lpVtbl; - const struct IUnknownVtbl *lpInternalUnkVtbl; - IUnknown *pUnkOuter; - LONG ref; -} stillimage; - -#endif /* __STI_PRIVATE__ */ +#define IDS_REGIONAL_SETTING 1 +#define IDS_PAGE_FILE_FORMAT 2 diff --git a/dll/directx/dxgi/CMakeLists.txt b/dll/directx/wine/dxgi/CMakeLists.txt similarity index 100% rename from dll/directx/dxgi/CMakeLists.txt rename to dll/directx/wine/dxgi/CMakeLists.txt diff --git a/dll/directx/dxgi/adapter.c b/dll/directx/wine/dxgi/adapter.c similarity index 100% rename from dll/directx/dxgi/adapter.c rename to dll/directx/wine/dxgi/adapter.c diff --git a/dll/directx/dxgi/device.c b/dll/directx/wine/dxgi/device.c similarity index 94% rename from dll/directx/dxgi/device.c rename to dll/directx/wine/dxgi/device.c index b8e6692c3d0..e98a2c0dbd9 100644 --- a/dll/directx/dxgi/device.c +++ b/dll/directx/wine/dxgi/device.c @@ -156,6 +156,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_CreateSurface(IWineDXGIDevice *ifac const DXGI_SHARED_RESOURCE *shared_resource, IDXGISurface **surface) { struct wined3d_device_parent *device_parent; + struct wined3d_resource_desc surface_desc; IWineDXGIDeviceParent *dxgi_device_parent; HRESULT hr; UINT i; @@ -174,6 +175,16 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_CreateSurface(IWineDXGIDevice *ifac device_parent = IWineDXGIDeviceParent_get_wined3d_device_parent(dxgi_device_parent); FIXME("Implement DXGI<->wined3d usage conversion\n"); + surface_desc.resource_type = WINED3D_RTYPE_SURFACE; + surface_desc.format = wined3dformat_from_dxgi_format(desc->Format); + surface_desc.multisample_type = desc->SampleDesc.Count > 1 ? desc->SampleDesc.Count : WINED3D_MULTISAMPLE_NONE; + surface_desc.multisample_quality = desc->SampleDesc.Quality; + surface_desc.usage = usage; + surface_desc.pool = WINED3D_POOL_DEFAULT; + surface_desc.width = desc->Width; + surface_desc.height = desc->Height; + surface_desc.depth = 1; + surface_desc.size = 0; memset(surface, 0, surface_count * sizeof(*surface)); for (i = 0; i < surface_count; ++i) @@ -181,13 +192,10 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_CreateSurface(IWineDXGIDevice *ifac struct wined3d_surface *wined3d_surface; IUnknown *parent; - hr = device_parent->ops->create_swapchain_surface(device_parent, NULL, - desc->Width, desc->Height, wined3dformat_from_dxgi_format(desc->Format), usage, - desc->SampleDesc.Count > 1 ? desc->SampleDesc.Count : WINED3D_MULTISAMPLE_NONE, - desc->SampleDesc.Quality, &wined3d_surface); - if (FAILED(hr)) + if (FAILED(hr = device_parent->ops->create_swapchain_surface(device_parent, + NULL, &surface_desc, &wined3d_surface))) { - ERR("CreateSurface failed, returning %#x\n", hr); + ERR("Failed to create surface, hr %#x.\n", hr); goto fail; } diff --git a/dll/directx/dxgi/dxgi.spec b/dll/directx/wine/dxgi/dxgi.spec similarity index 100% rename from dll/directx/dxgi/dxgi.spec rename to dll/directx/wine/dxgi/dxgi.spec diff --git a/dll/directx/dxgi/dxgi_main.c b/dll/directx/wine/dxgi/dxgi_main.c similarity index 97% rename from dll/directx/dxgi/dxgi_main.c rename to dll/directx/wine/dxgi/dxgi_main.c index c9d6f2e6845..e9ed482aa56 100644 --- a/dll/directx/dxgi/dxgi_main.c +++ b/dll/directx/wine/dxgi/dxgi_main.c @@ -44,16 +44,8 @@ static struct dxgi_main dxgi_main; static void dxgi_main_cleanup(void) { - EnterCriticalSection(&dxgi_cs); - HeapFree(GetProcessHeap(), 0, dxgi_main.device_layers); - dxgi_main.device_layers = NULL; - dxgi_main.layer_count = 0; - FreeLibrary(dxgi_main.d3d10core); - dxgi_main.d3d10core = NULL; - - LeaveCriticalSection(&dxgi_cs); DeleteCriticalSection(&dxgi_cs); } @@ -68,6 +60,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) break; case DLL_PROCESS_DETACH: + if (lpv) break; dxgi_main_cleanup(); break; } diff --git a/dll/directx/dxgi/dxgi_private.h b/dll/directx/wine/dxgi/dxgi_private.h similarity index 100% rename from dll/directx/dxgi/dxgi_private.h rename to dll/directx/wine/dxgi/dxgi_private.h diff --git a/dll/directx/dxgi/factory.c b/dll/directx/wine/dxgi/factory.c similarity index 100% rename from dll/directx/dxgi/factory.c rename to dll/directx/wine/dxgi/factory.c diff --git a/dll/directx/dxgi/output.c b/dll/directx/wine/dxgi/output.c similarity index 100% rename from dll/directx/dxgi/output.c rename to dll/directx/wine/dxgi/output.c diff --git a/dll/directx/dxgi/surface.c b/dll/directx/wine/dxgi/surface.c similarity index 100% rename from dll/directx/dxgi/surface.c rename to dll/directx/wine/dxgi/surface.c diff --git a/dll/directx/dxgi/swapchain.c b/dll/directx/wine/dxgi/swapchain.c similarity index 100% rename from dll/directx/dxgi/swapchain.c rename to dll/directx/wine/dxgi/swapchain.c diff --git a/dll/directx/dxgi/utils.c b/dll/directx/wine/dxgi/utils.c similarity index 100% rename from dll/directx/dxgi/utils.c rename to dll/directx/wine/dxgi/utils.c diff --git a/dll/directx/dxgi/version.rc b/dll/directx/wine/dxgi/version.rc similarity index 100% rename from dll/directx/dxgi/version.rc rename to dll/directx/wine/dxgi/version.rc diff --git a/dll/directx/msdmo/CMakeLists.txt b/dll/directx/wine/msdmo/CMakeLists.txt similarity index 60% rename from dll/directx/msdmo/CMakeLists.txt rename to dll/directx/wine/msdmo/CMakeLists.txt index 346b5df10b8..a5ddd539f87 100644 --- a/dll/directx/msdmo/CMakeLists.txt +++ b/dll/directx/wine/msdmo/CMakeLists.txt @@ -1,29 +1,16 @@ - add_definitions(-D__WINESRC__) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) - spec2def(msdmo.dll msdmo.spec) -add_library(msdmo SHARED +list(APPEND SOURCE dmoreg.c dmort.c stubs.c - rsrc.rc ${CMAKE_CURRENT_BINARY_DIR}/msdmo.def) -set_module_type(msdmo win32dll UNICODE) - +add_library(msdmo SHARED ${SOURCE} rsrc.rc) +set_module_type(msdmo win32dll) target_link_libraries(msdmo uuid wine mediaobj_guid) - -add_importlibs(msdmo - msvcrt - user32 - advapi32 - ole32 - kernel32 - ntdll) - -add_dependencies(msdmo dxsdk psdk) - +add_importlibs(msdmo user32 advapi32 ole32 msvcrt kernel32 ntdll) add_cd_file(TARGET msdmo DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/msdmo/dmoreg.c b/dll/directx/wine/msdmo/dmoreg.c similarity index 95% rename from dll/directx/msdmo/dmoreg.c rename to dll/directx/wine/msdmo/dmoreg.c index 2a63452f820..967acd01b95 100644 --- a/dll/directx/msdmo/dmoreg.c +++ b/dll/directx/wine/msdmo/dmoreg.c @@ -89,7 +89,7 @@ static const WCHAR szToGuidFmt[] = typedef struct { - const IEnumDMOVtbl *lpVtbl; + IEnumDMO IEnumDMO_iface; LONG ref; DWORD index; const GUID* guidCategory; @@ -101,6 +101,11 @@ typedef struct HKEY hkey; } IEnumDMOImpl; +static inline IEnumDMOImpl *impl_from_IEnumDMO(IEnumDMO *iface) +{ + return CONTAINING_RECORD(iface, IEnumDMOImpl, IEnumDMO_iface); +} + static HRESULT read_types(HKEY root, LPCWSTR key, ULONG *supplied, ULONG requested, DMO_PARTIAL_MEDIATYPE* types); static const IEnumDMOVtbl edmovt; @@ -332,12 +337,10 @@ lend: /************************************************************************** -* IEnumDMO_Destructor +* IEnumDMOImpl_Destructor */ -static BOOL IEnumDMO_Destructor(IEnumDMO* iface) +static BOOL IEnumDMOImpl_Destructor(IEnumDMOImpl* This) { - IEnumDMOImpl *This = (IEnumDMOImpl *)iface; - TRACE("%p\n", This); if (This->hkey) @@ -370,7 +373,7 @@ static IEnumDMO * IEnumDMO_Constructor( if (lpedmo) { lpedmo->ref = 1; - lpedmo->lpVtbl = &edmovt; + lpedmo->IEnumDMO_iface.lpVtbl = &edmovt; lpedmo->index = -1; lpedmo->guidCategory = guidCategory; lpedmo->dwFlags = dwFlags; @@ -417,7 +420,7 @@ static IEnumDMO * IEnumDMO_Constructor( lerr: if(!ret) { - IEnumDMO_Destructor((IEnumDMO*)lpedmo); + IEnumDMOImpl_Destructor(lpedmo); HeapFree(GetProcessHeap(),0,lpedmo); lpedmo = NULL; } @@ -434,7 +437,7 @@ lerr: */ static ULONG WINAPI IEnumDMO_fnAddRef(IEnumDMO * iface) { - IEnumDMOImpl *This = (IEnumDMOImpl *)iface; + IEnumDMOImpl *This = impl_from_IEnumDMO(iface); return InterlockedIncrement(&This->ref); } @@ -447,7 +450,7 @@ static HRESULT WINAPI IEnumDMO_fnQueryInterface( REFIID riid, LPVOID *ppvObj) { - IEnumDMOImpl *This = (IEnumDMOImpl *)iface; + IEnumDMOImpl *This = impl_from_IEnumDMO(iface); *ppvObj = NULL; @@ -471,12 +474,12 @@ static HRESULT WINAPI IEnumDMO_fnQueryInterface( */ static ULONG WINAPI IEnumDMO_fnRelease(IEnumDMO * iface) { - IEnumDMOImpl *This = (IEnumDMOImpl *)iface; + IEnumDMOImpl *This = impl_from_IEnumDMO(iface); ULONG refCount = InterlockedDecrement(&This->ref); if (!refCount) { - IEnumDMO_Destructor((IEnumDMO*)This); + IEnumDMOImpl_Destructor(This); HeapFree(GetProcessHeap(),0,This); } return refCount; @@ -503,7 +506,7 @@ static HRESULT WINAPI IEnumDMO_fnNext( UINT count = 0; HRESULT hres = S_OK; - IEnumDMOImpl *This = (IEnumDMOImpl *)iface; + IEnumDMOImpl *This = impl_from_IEnumDMO(iface); TRACE("--> (%p) %d %p %p %p\n", iface, cItemsToFetch, pCLSID, Names, pcItemsFetched); @@ -642,7 +645,7 @@ static HRESULT WINAPI IEnumDMO_fnNext( */ static HRESULT WINAPI IEnumDMO_fnSkip(IEnumDMO * iface, DWORD cItemsToSkip) { - IEnumDMOImpl *This = (IEnumDMOImpl *)iface; + IEnumDMOImpl *This = impl_from_IEnumDMO(iface); This->index += cItemsToSkip; @@ -655,7 +658,7 @@ static HRESULT WINAPI IEnumDMO_fnSkip(IEnumDMO * iface, DWORD cItemsToSkip) */ static HRESULT WINAPI IEnumDMO_fnReset(IEnumDMO * iface) { - IEnumDMOImpl *This = (IEnumDMOImpl *)iface; + IEnumDMOImpl *This = impl_from_IEnumDMO(iface); This->index = -1; @@ -668,7 +671,7 @@ static HRESULT WINAPI IEnumDMO_fnReset(IEnumDMO * iface) */ static HRESULT WINAPI IEnumDMO_fnClone(IEnumDMO * iface, IEnumDMO **ppEnum) { - IEnumDMOImpl *This = (IEnumDMOImpl *)iface; + IEnumDMOImpl *This = impl_from_IEnumDMO(iface); FIXME("(%p)->() to (%p)->() E_NOTIMPL\n", This, ppEnum); @@ -802,9 +805,9 @@ HRESULT WINAPI DMOGetTypes(REFCLSID clsidDMO, HRESULT ret = S_OK; WCHAR szguid[64]; - TRACE ("(%s,%u,%p,%p,%u,%p,%p),stub!\n", debugstr_guid(clsidDMO), - ulInputTypesRequested, pulInputTypesSupplied, pInputTypes, - ulOutputTypesRequested, pulOutputTypesSupplied, pOutputTypes); + TRACE ("(%s,%u,%p,%p,%u,%p,%p)\n", debugstr_guid(clsidDMO), ulInputTypesRequested, + pulInputTypesSupplied, pInputTypes, ulOutputTypesRequested, pulOutputTypesSupplied, + pOutputTypes); if (ERROR_SUCCESS != RegOpenKeyExW(HKEY_CLASSES_ROOT, szDMORootKey, 0, KEY_READ, &root)) diff --git a/dll/directx/msdmo/dmort.c b/dll/directx/wine/msdmo/dmort.c similarity index 100% rename from dll/directx/msdmo/dmort.c rename to dll/directx/wine/msdmo/dmort.c diff --git a/dll/directx/msdmo/msdmo.spec b/dll/directx/wine/msdmo/msdmo.spec similarity index 100% rename from dll/directx/msdmo/msdmo.spec rename to dll/directx/wine/msdmo/msdmo.spec diff --git a/dll/directx/msdmo/rsrc.rc b/dll/directx/wine/msdmo/rsrc.rc similarity index 100% rename from dll/directx/msdmo/rsrc.rc rename to dll/directx/wine/msdmo/rsrc.rc diff --git a/dll/directx/msdmo/stubs.c b/dll/directx/wine/msdmo/stubs.c similarity index 100% rename from dll/directx/msdmo/stubs.c rename to dll/directx/wine/msdmo/stubs.c diff --git a/dll/directx/wine/qedit/CMakeLists.txt b/dll/directx/wine/qedit/CMakeLists.txt new file mode 100644 index 00000000000..54ef264792d --- /dev/null +++ b/dll/directx/wine/qedit/CMakeLists.txt @@ -0,0 +1,17 @@ + +add_definitions(-D__WINESRC__) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine) +spec2def(qedit.dll qedit.spec) + +list(APPEND SOURCE + main.c + mediadet.c + samplegrabber.c + ${CMAKE_CURRENT_BINARY_DIR}/qedit.def) + +add_library(qedit SHARED ${SOURCE} qedit.rc) +set_module_type(qedit win32dll) +target_link_libraries(qedit strmiids uuid wine) +add_importlibs(qedit ole32 oleaut32 msvcrt kernel32 ntdll) +add_pch(qedit qedit_private.h) +add_cd_file(TARGET qedit DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/qedit/main.c b/dll/directx/wine/qedit/main.c similarity index 72% rename from dll/directx/qedit/main.c rename to dll/directx/wine/qedit/main.c index 3fbfea98337..083451071ff 100644 --- a/dll/directx/qedit/main.c +++ b/dll/directx/wine/qedit/main.c @@ -18,18 +18,20 @@ */ #include "qedit_private.h" +#include #include WINE_DEFAULT_DEBUG_CHANNEL(qedit); +static HINSTANCE instance; + BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) { switch(fdwReason) { case DLL_PROCESS_ATTACH: + instance = hInstDLL; DisableThreadLibraryCalls(hInstDLL); break; - case DLL_PROCESS_DETACH: - break; } return TRUE; } @@ -38,12 +40,16 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) * DirectShow ClassFactory */ typedef struct { - IClassFactory ITF_IClassFactory; - + IClassFactory IClassFactory_iface; LONG ref; HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, LPVOID *ppObj); } IClassFactoryImpl; +static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface) +{ + return CONTAINING_RECORD(iface, IClassFactoryImpl, IClassFactory_iface); +} + struct object_creation_info { const CLSID *clsid; @@ -56,34 +62,30 @@ static const struct object_creation_info object_creation[] = { &CLSID_SampleGrabber, SampleGrabber_create }, }; -static HRESULT WINAPI -DSCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) +static HRESULT WINAPI DSCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppobj) { - IClassFactoryImpl *This = (IClassFactoryImpl *)iface; - if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IClassFactory)) { IClassFactory_AddRef(iface); - *ppobj = This; + *ppobj = iface; return S_OK; } *ppobj = NULL; - WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj); + WARN("(%p)->(%s,%p), not found\n", iface, debugstr_guid(riid), ppobj); return E_NOINTERFACE; } -static ULONG WINAPI DSCF_AddRef(LPCLASSFACTORY iface) +static ULONG WINAPI DSCF_AddRef(IClassFactory *iface) { - IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + IClassFactoryImpl *This = impl_from_IClassFactory(iface); return InterlockedIncrement(&This->ref); } -static ULONG WINAPI DSCF_Release(LPCLASSFACTORY iface) +static ULONG WINAPI DSCF_Release(IClassFactory *iface) { - IClassFactoryImpl *This = (IClassFactoryImpl *)iface; - + IClassFactoryImpl *This = impl_from_IClassFactory(iface); ULONG ref = InterlockedDecrement(&This->ref); if (ref == 0) @@ -92,15 +94,19 @@ static ULONG WINAPI DSCF_Release(LPCLASSFACTORY iface) return ref; } -static HRESULT WINAPI DSCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) +static HRESULT WINAPI DSCF_CreateInstance(IClassFactory *iface, IUnknown *pOuter, REFIID riid, + void **ppobj) { - IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + IClassFactoryImpl *This = impl_from_IClassFactory(iface); HRESULT hres; LPUNKNOWN punk; TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj); *ppobj = NULL; + if (pOuter && !IsEqualGUID(&IID_IUnknown, riid)) + return E_INVALIDARG; + hres = This->pfnCreateInstance(pOuter, (LPVOID *) &punk); if (SUCCEEDED(hres)) { hres = IUnknown_QueryInterface(punk, riid, ppobj); @@ -109,9 +115,9 @@ static HRESULT WINAPI DSCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter return hres; } -static HRESULT WINAPI DSCF_LockServer(LPCLASSFACTORY iface, BOOL dolock) +static HRESULT WINAPI DSCF_LockServer(IClassFactory *iface, BOOL dolock) { - IClassFactoryImpl *This = (IClassFactoryImpl *)iface; + IClassFactoryImpl *This = impl_from_IClassFactory(iface); FIXME("(%p)->(%d),stub!\n",This,dolock); return S_OK; } @@ -131,7 +137,7 @@ static const IClassFactoryVtbl DSCF_Vtbl = */ HRESULT WINAPI DllCanUnloadNow(void) { - return S_OK; + return S_FALSE; } /******************************************************************************* @@ -175,11 +181,27 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) factory = CoTaskMemAlloc(sizeof(*factory)); if (factory == NULL) return E_OUTOFMEMORY; - factory->ITF_IClassFactory.lpVtbl = &DSCF_Vtbl; + factory->IClassFactory_iface.lpVtbl = &DSCF_Vtbl; factory->ref = 1; factory->pfnCreateInstance = object_creation[i].pfnCreateInstance; - *ppv = &(factory->ITF_IClassFactory); + *ppv = &factory->IClassFactory_iface; return S_OK; } + +/*********************************************************************** + * DllRegisterServer (QEDIT.@) + */ +HRESULT WINAPI DllRegisterServer(void) +{ + return __wine_register_resources( instance ); +} + +/*********************************************************************** + * DllUnregisterServer (QEDIT.@) + */ +HRESULT WINAPI DllUnregisterServer(void) +{ + return __wine_unregister_resources( instance ); +} diff --git a/dll/directx/qedit/mediadet.c b/dll/directx/wine/qedit/mediadet.c similarity index 74% rename from dll/directx/qedit/mediadet.c rename to dll/directx/wine/qedit/mediadet.c index 3a2d880ae66..7ffa99173f8 100644 --- a/dll/directx/qedit/mediadet.c +++ b/dll/directx/wine/qedit/mediadet.c @@ -33,8 +33,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(qedit); typedef struct MediaDetImpl { - const IMediaDetVtbl *MediaDet_Vtbl; - LONG refCount; + IUnknown IUnknown_inner; + IMediaDet IMediaDet_iface; + IUnknown *outer_unk; + LONG ref; IGraphBuilder *graph; IBaseFilter *source; IBaseFilter *splitter; @@ -43,6 +45,16 @@ typedef struct MediaDetImpl { IPin *cur_pin; } MediaDetImpl; +static inline MediaDetImpl *impl_from_IUnknown(IUnknown *iface) +{ + return CONTAINING_RECORD(iface, MediaDetImpl, IUnknown_inner); +} + +static inline MediaDetImpl *impl_from_IMediaDet(IMediaDet *iface) +{ + return CONTAINING_RECORD(iface, MediaDetImpl, IMediaDet_iface); +} + static void MD_cleanup(MediaDetImpl *This) { if (This->cur_pin) IPin_Release(This->cur_pin); @@ -57,64 +69,98 @@ static void MD_cleanup(MediaDetImpl *This) This->cur_stream = 0; } -static ULONG WINAPI MediaDet_AddRef(IMediaDet* iface) +/* MediaDet inner IUnknown */ +static HRESULT WINAPI MediaDet_inner_QueryInterface(IUnknown *iface, REFIID riid, void **ppv) { - MediaDetImpl *This = (MediaDetImpl *)iface; - ULONG refCount = InterlockedIncrement(&This->refCount); - TRACE("(%p)->() AddRef from %d\n", This, refCount - 1); - return refCount; + MediaDetImpl *This = impl_from_IUnknown(iface); + + TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); + + *ppv = NULL; + if (IsEqualIID(riid, &IID_IUnknown)) + *ppv = &This->IUnknown_inner; + else if (IsEqualIID(riid, &IID_IMediaDet)) + *ppv = &This->IMediaDet_iface; + else + WARN("(%p, %s,%p): not found\n", This, debugstr_guid(riid), ppv); + + if (!*ppv) + return E_NOINTERFACE; + + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; } -static ULONG WINAPI MediaDet_Release(IMediaDet* iface) +static ULONG WINAPI MediaDet_inner_AddRef(IUnknown *iface) { - MediaDetImpl *This = (MediaDetImpl *)iface; - ULONG refCount = InterlockedDecrement(&This->refCount); - TRACE("(%p)->() Release from %d\n", This, refCount + 1); + MediaDetImpl *This = impl_from_IUnknown(iface); + ULONG ref = InterlockedIncrement(&This->ref); - if (refCount == 0) + TRACE("(%p) new ref = %u\n", This, ref); + + return ref; +} + +static ULONG WINAPI MediaDet_inner_Release(IUnknown *iface) +{ + MediaDetImpl *This = impl_from_IUnknown(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p) new ref = %u\n", This, ref); + + if (ref == 0) { MD_cleanup(This); CoTaskMemFree(This); return 0; } - return refCount; + return ref; } -static HRESULT WINAPI MediaDet_QueryInterface(IMediaDet* iface, REFIID riid, - void **ppvObject) +static const IUnknownVtbl mediadet_vtbl = { - MediaDetImpl *This = (MediaDetImpl *)iface; - TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject); + MediaDet_inner_QueryInterface, + MediaDet_inner_AddRef, + MediaDet_inner_Release, +}; - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IMediaDet)) { - MediaDet_AddRef(iface); - *ppvObject = This; - return S_OK; - } - *ppvObject = NULL; - WARN("(%p, %s,%p): not found\n", This, debugstr_guid(riid), ppvObject); - return E_NOINTERFACE; +/* IMediaDet implementation */ +static HRESULT WINAPI MediaDet_QueryInterface(IMediaDet *iface, REFIID riid, void **ppv) +{ + MediaDetImpl *This = impl_from_IMediaDet(iface); + return IUnknown_QueryInterface(This->outer_unk, riid, ppv); +} + +static ULONG WINAPI MediaDet_AddRef(IMediaDet *iface) +{ + MediaDetImpl *This = impl_from_IMediaDet(iface); + return IUnknown_AddRef(This->outer_unk); +} + +static ULONG WINAPI MediaDet_Release(IMediaDet *iface) +{ + MediaDetImpl *This = impl_from_IMediaDet(iface); + return IUnknown_Release(This->outer_unk); } static HRESULT WINAPI MediaDet_get_Filter(IMediaDet* iface, IUnknown **pVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); FIXME("(%p)->(%p): not implemented!\n", This, pVal); return E_NOTIMPL; } static HRESULT WINAPI MediaDet_put_Filter(IMediaDet* iface, IUnknown *newVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); FIXME("(%p)->(%p): not implemented!\n", This, newVal); return E_NOTIMPL; } static HRESULT WINAPI MediaDet_get_OutputStreams(IMediaDet* iface, LONG *pVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); IEnumPins *pins; IPin *pin; HRESULT hr; @@ -158,7 +204,7 @@ static HRESULT WINAPI MediaDet_get_OutputStreams(IMediaDet* iface, LONG *pVal) static HRESULT WINAPI MediaDet_get_CurrentStream(IMediaDet* iface, LONG *pVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); TRACE("(%p)\n", This); if (!pVal) @@ -211,7 +257,7 @@ static HRESULT SetCurPin(MediaDetImpl *This, LONG strm) static HRESULT WINAPI MediaDet_put_CurrentStream(IMediaDet* iface, LONG newVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); HRESULT hr; TRACE("(%p)->(%d)\n", This, newVal); @@ -237,28 +283,28 @@ static HRESULT WINAPI MediaDet_put_CurrentStream(IMediaDet* iface, LONG newVal) static HRESULT WINAPI MediaDet_get_StreamType(IMediaDet* iface, GUID *pVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; - FIXME("(%p)->(%p): not implemented!\n", This, debugstr_guid(pVal)); + MediaDetImpl *This = impl_from_IMediaDet(iface); + FIXME("(%p)->(%s): not implemented!\n", This, debugstr_guid(pVal)); return E_NOTIMPL; } static HRESULT WINAPI MediaDet_get_StreamTypeB(IMediaDet* iface, BSTR *pVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); FIXME("(%p)->(%p): not implemented!\n", This, pVal); return E_NOTIMPL; } static HRESULT WINAPI MediaDet_get_StreamLength(IMediaDet* iface, double *pVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); FIXME("(%p): stub!\n", This); return VFW_E_INVALIDMEDIATYPE; } static HRESULT WINAPI MediaDet_get_Filename(IMediaDet* iface, BSTR *pVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); IFileSourceFilter *file; LPOLESTR name; HRESULT hr; @@ -378,52 +424,56 @@ static HRESULT GetSplitter(MediaDetImpl *This) if (FAILED(hr)) return hr; - hr = IEnumMoniker_Next(filters, 1, &mon, NULL); - IEnumMoniker_Release(filters); - if (hr != S_OK) /* No matches, what do we do? */ - return E_NOINTERFACE; - - hr = GetFilterInfo(mon, &clsid, &var); - IMoniker_Release(mon); - if (FAILED(hr)) - return hr; - - hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER, - &IID_IBaseFilter, (void **) &splitter); - if (FAILED(hr)) + hr = E_NOINTERFACE; + while (IEnumMoniker_Next(filters, 1, &mon, NULL) == S_OK) { + hr = GetFilterInfo(mon, &clsid, &var); + IMoniker_Release(mon); + if (FAILED(hr)) + continue; + + hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER, + &IID_IBaseFilter, (void **) &splitter); + if (FAILED(hr)) + { + VariantClear(&var); + continue; + } + + hr = IGraphBuilder_AddFilter(This->graph, splitter, + V_UNION(&var, bstrVal)); VariantClear(&var); - return hr; - } + This->splitter = splitter; + if (FAILED(hr)) + goto retry; - hr = IGraphBuilder_AddFilter(This->graph, splitter, - V_UNION(&var, bstrVal)); - VariantClear(&var); - if (FAILED(hr)) - { - IBaseFilter_Release(splitter); - return hr; - } - This->splitter = splitter; + hr = IBaseFilter_EnumPins(This->source, &pins); + if (FAILED(hr)) + goto retry; + IEnumPins_Next(pins, 1, &source_pin, NULL); + IEnumPins_Release(pins); - hr = IBaseFilter_EnumPins(This->source, &pins); - if (FAILED(hr)) - return hr; - IEnumPins_Next(pins, 1, &source_pin, NULL); - IEnumPins_Release(pins); + hr = IBaseFilter_EnumPins(splitter, &pins); + if (FAILED(hr)) + { + IPin_Release(source_pin); + goto retry; + } + IEnumPins_Next(pins, 1, &splitter_pin, NULL); + IEnumPins_Release(pins); - hr = IBaseFilter_EnumPins(splitter, &pins); - if (FAILED(hr)) - { + hr = IPin_Connect(source_pin, splitter_pin, NULL); IPin_Release(source_pin); - return hr; - } - IEnumPins_Next(pins, 1, &splitter_pin, NULL); - IEnumPins_Release(pins); + IPin_Release(splitter_pin); + if (SUCCEEDED(hr)) + break; - hr = IPin_Connect(source_pin, splitter_pin, NULL); - IPin_Release(source_pin); - IPin_Release(splitter_pin); +retry: + IBaseFilter_Release(splitter); + This->splitter = NULL; + } + + IEnumMoniker_Release(filters); if (FAILED(hr)) return hr; @@ -433,7 +483,7 @@ static HRESULT GetSplitter(MediaDetImpl *This) static HRESULT WINAPI MediaDet_put_Filename(IMediaDet* iface, BSTR newVal) { static const WCHAR reader[] = {'R','e','a','d','e','r',0}; - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); IGraphBuilder *gb; IBaseFilter *bf; HRESULT hr; @@ -472,7 +522,7 @@ static HRESULT WINAPI MediaDet_GetBitmapBits(IMediaDet* iface, LONG *pBufferSize, char *pBuffer, LONG Width, LONG Height) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); FIXME("(%p)->(%f %p %p %d %d): not implemented!\n", This, StreamTime, pBufferSize, pBuffer, Width, Height); return E_NOTIMPL; @@ -482,7 +532,7 @@ static HRESULT WINAPI MediaDet_WriteBitmapBits(IMediaDet* iface, double StreamTime, LONG Width, LONG Height, BSTR Filename) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); FIXME("(%p)->(%f %d %d %p): not implemented!\n", This, StreamTime, Width, Height, Filename); return E_NOTIMPL; } @@ -490,7 +540,7 @@ static HRESULT WINAPI MediaDet_WriteBitmapBits(IMediaDet* iface, static HRESULT WINAPI MediaDet_get_StreamMediaType(IMediaDet* iface, AM_MEDIA_TYPE *pVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); IEnumMediaTypes *types; AM_MEDIA_TYPE *pmt; HRESULT hr; @@ -524,14 +574,14 @@ static HRESULT WINAPI MediaDet_get_StreamMediaType(IMediaDet* iface, static HRESULT WINAPI MediaDet_GetSampleGrabber(IMediaDet* iface, ISampleGrabber **ppVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); FIXME("(%p)->(%p): not implemented!\n", This, ppVal); return E_NOTIMPL; } static HRESULT WINAPI MediaDet_get_FrameRate(IMediaDet* iface, double *pVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); AM_MEDIA_TYPE mt; VIDEOINFOHEADER *vh; HRESULT hr; @@ -561,7 +611,7 @@ static HRESULT WINAPI MediaDet_get_FrameRate(IMediaDet* iface, double *pVal) static HRESULT WINAPI MediaDet_EnterBitmapGrabMode(IMediaDet* iface, double SeekTime) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); FIXME("(%p)->(%f): not implemented!\n", This, SeekTime); return E_NOTIMPL; } @@ -594,9 +644,6 @@ HRESULT MediaDet_create(IUnknown * pUnkOuter, LPVOID * ppv) { TRACE("(%p,%p)\n", ppv, pUnkOuter); - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - obj = CoTaskMemAlloc(sizeof(MediaDetImpl)); if (NULL == obj) { *ppv = NULL; @@ -604,8 +651,9 @@ HRESULT MediaDet_create(IUnknown * pUnkOuter, LPVOID * ppv) { } ZeroMemory(obj, sizeof(MediaDetImpl)); - obj->refCount = 1; - obj->MediaDet_Vtbl = &IMediaDet_VTable; + obj->ref = 1; + obj->IUnknown_inner.lpVtbl = &mediadet_vtbl; + obj->IMediaDet_iface.lpVtbl = &IMediaDet_VTable; obj->graph = NULL; obj->source = NULL; obj->splitter = NULL; @@ -614,5 +662,11 @@ HRESULT MediaDet_create(IUnknown * pUnkOuter, LPVOID * ppv) { obj->cur_stream = 0; *ppv = obj; + if (pUnkOuter) + obj->outer_unk = pUnkOuter; + else + obj->outer_unk = &obj->IUnknown_inner; + + *ppv = &obj->IUnknown_inner; return S_OK; } diff --git a/dll/directx/wine/qedit/qedit.rc b/dll/directx/wine/qedit/qedit.rc new file mode 100644 index 00000000000..96501491c67 --- /dev/null +++ b/dll/directx/wine/qedit/qedit.rc @@ -0,0 +1 @@ +1 WINE_REGISTRY qedit_classes.rgs diff --git a/dll/directx/qedit/qedit.spec b/dll/directx/wine/qedit/qedit.spec similarity index 100% rename from dll/directx/qedit/qedit.spec rename to dll/directx/wine/qedit/qedit.spec diff --git a/dll/directx/wine/qedit/qedit_classes.idl b/dll/directx/wine/qedit/qedit_classes.idl new file mode 100644 index 00000000000..3106f4c7426 --- /dev/null +++ b/dll/directx/wine/qedit/qedit_classes.idl @@ -0,0 +1,32 @@ +/* + * COM Classes for qedit + * + * Copyright 2010 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +[ + threading(both), + uuid(65bd0711-24d2-4ff7-9324-ed2e5d3abafa) +] +coclass MediaDet { interface IMediaDet; } + +[ + helpstring("Sample Grabber"), + threading(both), + uuid(c1f400a0-3f08-11d3-9f0b-006008039e37) +] +coclass SampleGrabber { interface ISampleGrabber; } diff --git a/dll/directx/wine/qedit/qedit_classes.rgs b/dll/directx/wine/qedit/qedit_classes.rgs new file mode 100644 index 00000000000..115d95070d0 --- /dev/null +++ b/dll/directx/wine/qedit/qedit_classes.rgs @@ -0,0 +1,17 @@ +HKCR +{ + NoRemove Interface + { + } + NoRemove CLSID + { + '{65BD0711-24D2-4FF7-9324-ED2E5D3ABAFA}' = s 'MediaDet' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + '{C1F400A0-3F08-11D3-9F0B-006008039E37}' = s 'Sample Grabber' + { + InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' } + } + } +} diff --git a/dll/directx/qedit/qedit_private.h b/dll/directx/wine/qedit/qedit_private.h similarity index 87% rename from dll/directx/qedit/qedit_private.h rename to dll/directx/wine/qedit/qedit_private.h index 66506d1ec9e..ea1230ca357 100644 --- a/dll/directx/qedit/qedit_private.h +++ b/dll/directx/wine/qedit/qedit_private.h @@ -2,9 +2,6 @@ * * Copyright 2008 Google (Lei Zhang) * - * This file contains the (internal) driver registration functions, - * driver enumeration APIs and DirectDraw creation functions. - * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either @@ -43,7 +40,7 @@ #define __WINE_DDRAW_H /* ROS HACK */ #include -HRESULT MediaDet_create(IUnknown *pUnkOuter, LPVOID *ppObj); -HRESULT SampleGrabber_create(IUnknown *pUnkOuter, LPVOID *ppObj); +HRESULT MediaDet_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN; +HRESULT SampleGrabber_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN; #endif /* __QEDIT_PRIVATE_INCLUDED__ */ diff --git a/dll/directx/qedit/samplegrabber.c b/dll/directx/wine/qedit/samplegrabber.c similarity index 84% rename from dll/directx/qedit/samplegrabber.c rename to dll/directx/wine/qedit/samplegrabber.c index 60e221b94d3..cadde7645e6 100644 --- a/dll/directx/qedit/samplegrabber.c +++ b/dll/directx/wine/qedit/samplegrabber.c @@ -32,12 +32,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(qedit); -static WCHAR const vendor_name[] = { 'W', 'i', 'n', 'e', 0 }; -static WCHAR const pin_in_name[] = { 'I', 'n', 0 }; -static WCHAR const pin_out_name[] = { 'O', 'u', 't', 0 }; +static const WCHAR vendor_name[] = { 'W', 'i', 'n', 'e', 0 }; +static const WCHAR pin_in_name[] = { 'I', 'n', 0 }; +static const WCHAR pin_out_name[] = { 'O', 'u', 't', 0 }; -IEnumPins *pinsenum_create(IBaseFilter *filter, IPin **pins, ULONG pinCount); -IEnumMediaTypes *mediaenum_create(const AM_MEDIA_TYPE *mtype); +static IEnumPins *pinsenum_create(IBaseFilter *filter, IPin **pins, ULONG pinCount); +static IEnumMediaTypes *mediaenum_create(const AM_MEDIA_TYPE *mtype); /* Fixed pins enumerator, holds filter referenced */ typedef struct _PE_Impl { @@ -88,7 +88,7 @@ Fixed_IEnumPins_QueryInterface(IEnumPins *iface, REFIID riid, void **ppvObject) if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IEnumPins)) { Fixed_IEnumPins_AddRef(iface); - *ppvObject = &(This->pins); + *ppvObject = This->pins; return S_OK; } *ppvObject = NULL; @@ -171,7 +171,7 @@ static const IEnumPinsVtbl IEnumPins_VTable = Fixed_IEnumPins_Clone, }; -IEnumPins *pinsenum_create(IBaseFilter *filter, IPin **pins, ULONG pinCount) +static IEnumPins *pinsenum_create(IBaseFilter *filter, IPin **pins, ULONG pinCount) { ULONG len = sizeof(PE_Impl) + (pinCount * sizeof(IPin *)); PE_Impl *obj = CoTaskMemAlloc(len); @@ -324,7 +324,7 @@ static const IEnumMediaTypesVtbl IEnumMediaTypes_VTable = Single_IEnumMediaTypes_Clone, }; -IEnumMediaTypes *mediaenum_create(const AM_MEDIA_TYPE *mtype) +static IEnumMediaTypes *mediaenum_create(const AM_MEDIA_TYPE *mtype) { ME_Impl *obj = CoTaskMemAlloc(sizeof(ME_Impl)); if (obj) { @@ -351,20 +351,29 @@ IEnumMediaTypes *mediaenum_create(const AM_MEDIA_TYPE *mtype) /* Sample Grabber pin implementation */ typedef struct _SG_Pin { - const IPinVtbl* lpVtbl; + IPin IPin_iface; PIN_DIRECTION dir; WCHAR const *name; struct _SG_Impl *sg; IPin *pair; } SG_Pin; +static inline SG_Pin *impl_from_IPin(IPin *iface) +{ + return CONTAINING_RECORD(iface, SG_Pin, IPin_iface); +} + /* Sample Grabber filter implementation */ typedef struct _SG_Impl { - const IBaseFilterVtbl* IBaseFilter_Vtbl; - const ISampleGrabberVtbl* ISampleGrabber_Vtbl; - const IMemInputPinVtbl* IMemInputPin_Vtbl; - /* TODO: IMediaPosition, IMediaSeeking, IQualityControl */ - LONG refCount; + IUnknown IUnknown_inner; + IBaseFilter IBaseFilter_iface; + ISampleGrabber ISampleGrabber_iface; + IMemInputPin IMemInputPin_iface; + /* IMediaSeeking and IMediaPosition are implemented by ISeekingPassThru */ + IUnknown* seekthru_unk; + /* TODO: IQualityControl */ + IUnknown *outer_unk; + LONG ref; CRITICAL_SECTION critSect; FILTER_INFO info; FILTER_STATE state; @@ -387,20 +396,24 @@ enum { OneShot_Past, }; -/* Get the SampleGrabber implementation This pointer from various interface pointers */ +static inline SG_Impl *impl_from_IUnknown(IUnknown *iface) +{ + return CONTAINING_RECORD(iface, SG_Impl, IUnknown_inner); +} + static inline SG_Impl *impl_from_IBaseFilter(IBaseFilter *iface) { - return (SG_Impl *)((char*)iface - FIELD_OFFSET(SG_Impl, IBaseFilter_Vtbl)); + return CONTAINING_RECORD(iface, SG_Impl, IBaseFilter_iface); } static inline SG_Impl *impl_from_ISampleGrabber(ISampleGrabber *iface) { - return (SG_Impl *)((char*)iface - FIELD_OFFSET(SG_Impl, ISampleGrabber_Vtbl)); + return CONTAINING_RECORD(iface, SG_Impl, ISampleGrabber_iface); } static inline SG_Impl *impl_from_IMemInputPin(IMemInputPin *iface) { - return (SG_Impl *)((char*)iface - FIELD_OFFSET(SG_Impl, IMemInputPin_Vtbl)); + return CONTAINING_RECORD(iface, SG_Impl, IMemInputPin_iface); } @@ -422,65 +435,77 @@ static void SampleGrabber_cleanup(SG_Impl *This) CoTaskMemFree(This->mtype.pbFormat); if (This->bufferData) CoTaskMemFree(This->bufferData); + if(This->seekthru_unk) + IUnknown_Release(This->seekthru_unk); This->critSect.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&This->critSect); } -/* Common helper AddRef called from all interfaces */ -static ULONG SampleGrabber_addref(SG_Impl *This) +/* SampleGrabber inner IUnknown */ +static HRESULT WINAPI SampleGrabber_QueryInterface(IUnknown *iface, REFIID riid, void **ppv) { - ULONG refCount = InterlockedIncrement(&This->refCount); - TRACE("(%p) new ref = %u\n", This, refCount); - return refCount; + SG_Impl *This = impl_from_IUnknown(iface); + + TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); + + *ppv = NULL; + if (IsEqualIID(riid, &IID_IUnknown)) + *ppv = &This->IUnknown_inner; + else if (IsEqualIID(riid, &IID_IPersist) || IsEqualIID(riid, &IID_IMediaFilter) || + IsEqualIID(riid, &IID_IBaseFilter)) + *ppv = &This->IBaseFilter_iface; + else if (IsEqualIID(riid, &IID_ISampleGrabber)) + *ppv = &This->ISampleGrabber_iface; + else if (IsEqualIID(riid, &IID_IMemInputPin)) + *ppv = &This->IMemInputPin_iface; + else if (IsEqualIID(riid, &IID_IMediaPosition)) + return IUnknown_QueryInterface(This->seekthru_unk, riid, ppv); + else if (IsEqualIID(riid, &IID_IMediaSeeking)) + return IUnknown_QueryInterface(This->seekthru_unk, riid, ppv); + else if (IsEqualIID(riid, &IID_IQualityControl)) + FIXME("IQualityControl not implemented\n"); + else + WARN("(%p, %s,%p): not found\n", This, debugstr_guid(riid), ppv); + + if (!*ppv) + return E_NOINTERFACE; + + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; } -/* Common helper Release called from all interfaces */ -static ULONG SampleGrabber_release(SG_Impl *This) +static ULONG WINAPI SampleGrabber_AddRef(IUnknown *iface) { - ULONG refCount = InterlockedDecrement(&This->refCount); - TRACE("(%p) new ref = %u\n", This, refCount); - if (refCount == 0) + SG_Impl *This = impl_from_IUnknown(iface); + ULONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p) new ref = %u\n", This, ref); + + return ref; +} + +static ULONG WINAPI SampleGrabber_Release(IUnknown *iface) +{ + SG_Impl *This = impl_from_IUnknown(iface); + ULONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p) new ref = %u\n", This, ref); + + if (ref == 0) { SampleGrabber_cleanup(This); CoTaskMemFree(This); return 0; } - return refCount; + return ref; } -/* Common helper QueryInterface called from all interfaces */ -static HRESULT SampleGrabber_query(SG_Impl *This, REFIID riid, void **ppvObject) +static const IUnknownVtbl samplegrabber_vtbl = { - TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject); - - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IPersist) || - IsEqualIID(riid, &IID_IMediaFilter) || - IsEqualIID(riid, &IID_IBaseFilter)) { - SampleGrabber_addref(This); - *ppvObject = &(This->IBaseFilter_Vtbl); - return S_OK; - } - else if (IsEqualIID(riid, &IID_ISampleGrabber)) { - SampleGrabber_addref(This); - *ppvObject = &(This->ISampleGrabber_Vtbl); - return S_OK; - } - else if (IsEqualIID(riid, &IID_IMemInputPin)) { - SampleGrabber_addref(This); - *ppvObject = &(This->IMemInputPin_Vtbl); - return S_OK; - } - else if (IsEqualIID(riid, &IID_IMediaPosition)) - FIXME("IMediaPosition not implemented\n"); - else if (IsEqualIID(riid, &IID_IMediaSeeking)) - FIXME("IMediaSeeking not implemented\n"); - else if (IsEqualIID(riid, &IID_IQualityControl)) - FIXME("IQualityControl not implemented\n"); - *ppvObject = NULL; - WARN("(%p, %s,%p): not found\n", This, debugstr_guid(riid), ppvObject); - return E_NOINTERFACE; -} + SampleGrabber_QueryInterface, + SampleGrabber_AddRef, + SampleGrabber_Release, +}; /* Helper that buffers data and/or calls installed sample callbacks */ static void SampleGrabber_callback(SG_Impl *This, IMediaSample *sample) @@ -546,23 +571,26 @@ static void SampleGrabber_callback(SG_Impl *This, IMediaSample *sample) /* IUnknown */ static HRESULT WINAPI -SampleGrabber_IBaseFilter_QueryInterface(IBaseFilter *iface, REFIID riid, void **ppvObject) +SampleGrabber_IBaseFilter_QueryInterface(IBaseFilter *iface, REFIID riid, void **ppv) { - return SampleGrabber_query(impl_from_IBaseFilter(iface), riid, ppvObject); + SG_Impl *This = impl_from_IBaseFilter(iface); + return IUnknown_QueryInterface(This->outer_unk, riid, ppv); } /* IUnknown */ static ULONG WINAPI SampleGrabber_IBaseFilter_AddRef(IBaseFilter *iface) { - return SampleGrabber_addref(impl_from_IBaseFilter(iface)); + SG_Impl *This = impl_from_IBaseFilter(iface); + return IUnknown_AddRef(This->outer_unk); } /* IUnknown */ static ULONG WINAPI SampleGrabber_IBaseFilter_Release(IBaseFilter *iface) { - return SampleGrabber_release(impl_from_IBaseFilter(iface)); + SG_Impl *This = impl_from_IBaseFilter(iface); + return IUnknown_Release(This->outer_unk); } /* IPersist */ @@ -658,8 +686,8 @@ SampleGrabber_IBaseFilter_EnumPins(IBaseFilter *iface, IEnumPins **pins) TRACE("(%p)->(%p)\n", This, pins); if (!pins) return E_POINTER; - pin[0] = (IPin*)&This->pin_in.lpVtbl; - pin[1] = (IPin*)&This->pin_out.lpVtbl; + pin[0] = &This->pin_in.IPin_iface; + pin[1] = &This->pin_out.IPin_iface; *pins = pinsenum_create(iface, pin, 2); return *pins ? S_OK : E_OUTOFMEMORY; } @@ -674,14 +702,14 @@ SampleGrabber_IBaseFilter_FindPin(IBaseFilter *iface, LPCWSTR id, IPin **pin) return E_POINTER; if (!lstrcmpiW(id,pin_in_name)) { - SampleGrabber_addref(This); - *pin = (IPin*)&(This->pin_in.lpVtbl); + *pin = &This->pin_in.IPin_iface; + IPin_AddRef(*pin); return S_OK; } else if (!lstrcmpiW(id,pin_out_name)) { - SampleGrabber_addref(This); - *pin = (IPin*)&(This->pin_out.lpVtbl); + *pin = &This->pin_out.IPin_iface; + IPin_AddRef(*pin); return S_OK; } *pin = NULL; @@ -732,23 +760,26 @@ SampleGrabber_IBaseFilter_QueryVendorInfo(IBaseFilter *iface, LPWSTR *vendor) /* IUnknown */ static HRESULT WINAPI -SampleGrabber_ISampleGrabber_QueryInterface(ISampleGrabber *iface, REFIID riid, void **ppvObject) +SampleGrabber_ISampleGrabber_QueryInterface(ISampleGrabber *iface, REFIID riid, void **ppv) { - return SampleGrabber_query(impl_from_ISampleGrabber(iface), riid, ppvObject); + SG_Impl *This = impl_from_ISampleGrabber(iface); + return IUnknown_QueryInterface(This->outer_unk, riid, ppv); } /* IUnknown */ static ULONG WINAPI SampleGrabber_ISampleGrabber_AddRef(ISampleGrabber *iface) { - return SampleGrabber_addref(impl_from_ISampleGrabber(iface)); + SG_Impl *This = impl_from_ISampleGrabber(iface); + return IUnknown_AddRef(This->outer_unk); } /* IUnknown */ static ULONG WINAPI SampleGrabber_ISampleGrabber_Release(ISampleGrabber *iface) { - return SampleGrabber_release(impl_from_ISampleGrabber(iface)); + SG_Impl *This = impl_from_ISampleGrabber(iface); + return IUnknown_Release(This->outer_unk); } /* ISampleGrabber */ @@ -879,23 +910,26 @@ SampleGrabber_ISampleGrabber_SetCallback(ISampleGrabber *iface, ISampleGrabberCB /* IUnknown */ static HRESULT WINAPI -SampleGrabber_IMemInputPin_QueryInterface(IMemInputPin *iface, REFIID riid, void **ppvObject) +SampleGrabber_IMemInputPin_QueryInterface(IMemInputPin *iface, REFIID riid, void **ppv) { - return SampleGrabber_query(impl_from_IMemInputPin(iface), riid, ppvObject); + SG_Impl *This = impl_from_IMemInputPin(iface); + return IUnknown_QueryInterface(This->outer_unk, riid, ppv); } /* IUnknown */ static ULONG WINAPI SampleGrabber_IMemInputPin_AddRef(IMemInputPin *iface) { - return SampleGrabber_addref(impl_from_IMemInputPin(iface)); + SG_Impl *This = impl_from_IMemInputPin(iface); + return IUnknown_AddRef(This->outer_unk); } /* IUnknown */ static ULONG WINAPI SampleGrabber_IMemInputPin_Release(IMemInputPin *iface) { - return SampleGrabber_release(impl_from_IMemInputPin(iface)); + SG_Impl *This = impl_from_IMemInputPin(iface); + return IUnknown_Release(This->outer_unk); } /* IMemInputPin */ @@ -994,37 +1028,41 @@ SampleGrabber_IMemInputPin_ReceiveCanBlock(IMemInputPin *iface) static ULONG WINAPI SampleGrabber_IPin_AddRef(IPin *iface) { - return SampleGrabber_addref(((SG_Pin *)iface)->sg); + SG_Pin *This = impl_from_IPin(iface); + return ISampleGrabber_AddRef(&This->sg->ISampleGrabber_iface); } /* IUnknown */ static ULONG WINAPI SampleGrabber_IPin_Release(IPin *iface) { - return SampleGrabber_release(((SG_Pin *)iface)->sg); + SG_Pin *This = impl_from_IPin(iface); + return ISampleGrabber_Release(&This->sg->ISampleGrabber_iface); } /* IUnknown */ static HRESULT WINAPI -SampleGrabber_IPin_QueryInterface(IPin *iface, REFIID riid, void **ppvObject) +SampleGrabber_IPin_QueryInterface(IPin *iface, REFIID riid, void **ppv) { - SG_Pin *This = (SG_Pin *)iface; - TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject); + SG_Pin *This = impl_from_IPin(iface); + TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); - if (IsEqualIID(riid, &IID_IUnknown) || - IsEqualIID(riid, &IID_IPin)) { - SampleGrabber_addref(This->sg); - *ppvObject = This; - return S_OK; + *ppv = NULL; + if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IPin)) + *ppv = iface; + else if (IsEqualIID(riid, &IID_IMemInputPin)) + *ppv = &This->sg->IMemInputPin_iface; + else if (IsEqualIID(riid, &IID_IMediaSeeking)) + return IUnknown_QueryInterface(&This->sg->IUnknown_inner, riid, ppv); + else if (IsEqualIID(riid, &IID_IMediaPosition)) + return IUnknown_QueryInterface(&This->sg->IUnknown_inner, riid, ppv); + else { + WARN("(%p, %s,%p): not found\n", This, debugstr_guid(riid), ppv); + return E_NOINTERFACE; } - else if (IsEqualIID(riid, &IID_IMemInputPin)) { - SampleGrabber_addref(This->sg); - *ppvObject = &(This->sg->IMemInputPin_Vtbl); - return S_OK; - } - *ppvObject = NULL; - WARN("(%p, %s,%p): not found\n", This, debugstr_guid(riid), ppvObject); - return E_NOINTERFACE; + + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; } /* IPin - input pin */ @@ -1039,8 +1077,9 @@ SampleGrabber_In_IPin_Connect(IPin *iface, IPin *receiver, const AM_MEDIA_TYPE * static HRESULT WINAPI SampleGrabber_Out_IPin_Connect(IPin *iface, IPin *receiver, const AM_MEDIA_TYPE *type) { - SG_Pin *This = (SG_Pin *)iface; + SG_Pin *This = impl_from_IPin(iface); HRESULT hr; + TRACE("(%p)->(%p, %p)\n", This, receiver, type); if (!receiver) return E_POINTER; @@ -1070,7 +1109,7 @@ SampleGrabber_Out_IPin_Connect(IPin *iface, IPin *receiver, const AM_MEDIA_TYPE !IsEqualGUID(&type->formattype, &GUID_NULL) && !type->pbFormat) return VFW_E_TYPE_NOT_ACCEPTED; - hr = IPin_ReceiveConnection(receiver,(IPin*)&This->lpVtbl,type); + hr = IPin_ReceiveConnection(receiver, &This->IPin_iface, type); if (FAILED(hr)) return hr; This->pair = receiver; @@ -1087,7 +1126,8 @@ SampleGrabber_Out_IPin_Connect(IPin *iface, IPin *receiver, const AM_MEDIA_TYPE static HRESULT WINAPI SampleGrabber_In_IPin_ReceiveConnection(IPin *iface, IPin *connector, const AM_MEDIA_TYPE *type) { - SG_Pin *This = (SG_Pin *)iface; + SG_Pin *This = impl_from_IPin(iface); + TRACE("(%p)->(%p, %p)\n", This, connector, type); if (!connector) return E_POINTER; @@ -1142,7 +1182,8 @@ SampleGrabber_Out_IPin_ReceiveConnection(IPin *iface, IPin *connector, const AM_ static HRESULT WINAPI SampleGrabber_In_IPin_Disconnect(IPin *iface) { - SG_Pin *This = (SG_Pin *)iface; + SG_Pin *This = impl_from_IPin(iface); + TRACE("(%p)->() pair = %p\n", This, This->pair); if (This->sg->state != State_Stopped) return VFW_E_NOT_STOPPED; @@ -1157,7 +1198,8 @@ SampleGrabber_In_IPin_Disconnect(IPin *iface) static HRESULT WINAPI SampleGrabber_Out_IPin_Disconnect(IPin *iface) { - SG_Pin *This = (SG_Pin *)iface; + SG_Pin *This = impl_from_IPin(iface); + TRACE("(%p)->() pair = %p\n", This, This->pair); if (This->sg->state != State_Stopped) return VFW_E_NOT_STOPPED; @@ -1176,7 +1218,8 @@ SampleGrabber_Out_IPin_Disconnect(IPin *iface) static HRESULT WINAPI SampleGrabber_IPin_ConnectedTo(IPin *iface, IPin **pin) { - SG_Pin *This = (SG_Pin *)iface; + SG_Pin *This = impl_from_IPin(iface); + TRACE("(%p)->(%p) pair = %p\n", This, pin, This->pair); if (!pin) return E_POINTER; @@ -1192,7 +1235,8 @@ SampleGrabber_IPin_ConnectedTo(IPin *iface, IPin **pin) static HRESULT WINAPI SampleGrabber_IPin_ConnectionMediaType(IPin *iface, AM_MEDIA_TYPE *mtype) { - SG_Pin *This = (SG_Pin *)iface; + SG_Pin *This = impl_from_IPin(iface); + TRACE("(%p)->(%p)\n", This, mtype); if (!mtype) return E_POINTER; @@ -1210,12 +1254,13 @@ SampleGrabber_IPin_ConnectionMediaType(IPin *iface, AM_MEDIA_TYPE *mtype) static HRESULT WINAPI SampleGrabber_IPin_QueryPinInfo(IPin *iface, PIN_INFO *info) { - SG_Pin *This = (SG_Pin *)iface; + SG_Pin *This = impl_from_IPin(iface); + TRACE("(%p)->(%p)\n", This, info); if (!info) return E_POINTER; - SampleGrabber_addref(This->sg); - info->pFilter = (IBaseFilter *)This->sg; + IBaseFilter_AddRef(&This->sg->IBaseFilter_iface); + info->pFilter = &This->sg->IBaseFilter_iface; info->dir = This->dir; lstrcpynW(info->achName,This->name,MAX_PIN_NAME); return S_OK; @@ -1225,7 +1270,8 @@ SampleGrabber_IPin_QueryPinInfo(IPin *iface, PIN_INFO *info) static HRESULT WINAPI SampleGrabber_IPin_QueryDirection(IPin *iface, PIN_DIRECTION *dir) { - SG_Pin *This = (SG_Pin *)iface; + SG_Pin *This = impl_from_IPin(iface); + TRACE("(%p)->(%p)\n", This, dir); if (!dir) return E_POINTER; @@ -1237,7 +1283,8 @@ SampleGrabber_IPin_QueryDirection(IPin *iface, PIN_DIRECTION *dir) static HRESULT WINAPI SampleGrabber_IPin_QueryId(IPin *iface, LPWSTR *id) { - SG_Pin *This = (SG_Pin *)iface; + SG_Pin *This = impl_from_IPin(iface); + int len; TRACE("(%p)->(%p)\n", This, id); if (!id) @@ -1260,7 +1307,8 @@ SampleGrabber_IPin_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *mtype) static HRESULT WINAPI SampleGrabber_IPin_EnumMediaTypes(IPin *iface, IEnumMediaTypes **mtypes) { - SG_Pin *This = (SG_Pin *)iface; + SG_Pin *This = impl_from_IPin(iface); + TRACE("(%p)->(%p)\n", This, mtypes); if (!mtypes) return E_POINTER; @@ -1272,15 +1320,16 @@ SampleGrabber_IPin_EnumMediaTypes(IPin *iface, IEnumMediaTypes **mtypes) static HRESULT WINAPI SampleGrabber_In_IPin_QueryInternalConnections(IPin *iface, IPin **pins, ULONG *nPins) { - SG_Pin *This = (SG_Pin *)iface; + SG_Pin *This = impl_from_IPin(iface); + TRACE("(%p)->(%p, %p) size = %u\n", This, pins, nPins, (nPins ? *nPins : 0)); if (!nPins) return E_POINTER; if (*nPins) { if (!pins) return E_POINTER; - IPin_AddRef((IPin*)&This->sg->pin_out.lpVtbl); - *pins = (IPin*)&This->sg->pin_out.lpVtbl; + IPin_AddRef(&This->sg->pin_out.IPin_iface); + *pins = &This->sg->pin_out.IPin_iface; *nPins = 1; return S_OK; } @@ -1426,12 +1475,11 @@ static const IPinVtbl IPin_Out_VTable = HRESULT SampleGrabber_create(IUnknown *pUnkOuter, LPVOID *ppv) { SG_Impl* obj = NULL; + ISeekingPassThru *passthru; + HRESULT hr; TRACE("(%p,%p)\n", ppv, pUnkOuter); - if (pUnkOuter) - return CLASS_E_NOAGGREGATION; - obj = CoTaskMemAlloc(sizeof(SG_Impl)); if (NULL == obj) { *ppv = NULL; @@ -1439,16 +1487,17 @@ HRESULT SampleGrabber_create(IUnknown *pUnkOuter, LPVOID *ppv) } ZeroMemory(obj, sizeof(SG_Impl)); - obj->refCount = 1; - obj->IBaseFilter_Vtbl = &IBaseFilter_VTable; - obj->ISampleGrabber_Vtbl = &ISampleGrabber_VTable; - obj->IMemInputPin_Vtbl = &IMemInputPin_VTable; - obj->pin_in.lpVtbl = &IPin_In_VTable; + obj->ref = 1; + obj->IUnknown_inner.lpVtbl = &samplegrabber_vtbl; + obj->IBaseFilter_iface.lpVtbl = &IBaseFilter_VTable; + obj->ISampleGrabber_iface.lpVtbl = &ISampleGrabber_VTable; + obj->IMemInputPin_iface.lpVtbl = &IMemInputPin_VTable; + obj->pin_in.IPin_iface.lpVtbl = &IPin_In_VTable; obj->pin_in.dir = PINDIR_INPUT; obj->pin_in.name = pin_in_name; obj->pin_in.sg = obj; obj->pin_in.pair = NULL; - obj->pin_out.lpVtbl = &IPin_Out_VTable; + obj->pin_out.IPin_iface.lpVtbl = &IPin_Out_VTable; obj->pin_out.dir = PINDIR_OUTPUT; obj->pin_out.name = pin_out_name; obj->pin_out.sg = obj; @@ -1469,7 +1518,19 @@ HRESULT SampleGrabber_create(IUnknown *pUnkOuter, LPVOID *ppv) obj->oneShot = OneShot_None; obj->bufferLen = -1; obj->bufferData = NULL; - *ppv = obj; + if (pUnkOuter) + obj->outer_unk = pUnkOuter; + else + obj->outer_unk = &obj->IUnknown_inner; + + hr = CoCreateInstance(&CLSID_SeekingPassThru, (IUnknown*)obj, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&obj->seekthru_unk); + if(hr) + return hr; + IUnknown_QueryInterface(obj->seekthru_unk, &IID_ISeekingPassThru, (void**)&passthru); + ISeekingPassThru_Init(passthru, FALSE, &obj->pin_in.IPin_iface); + ISeekingPassThru_Release(passthru); + + *ppv = &obj->IUnknown_inner; return S_OK; } diff --git a/dll/directx/quartz/CMakeLists.txt b/dll/directx/wine/quartz/CMakeLists.txt similarity index 100% rename from dll/directx/quartz/CMakeLists.txt rename to dll/directx/wine/quartz/CMakeLists.txt diff --git a/dll/directx/quartz/acmwrapper.c b/dll/directx/wine/quartz/acmwrapper.c similarity index 100% rename from dll/directx/quartz/acmwrapper.c rename to dll/directx/wine/quartz/acmwrapper.c diff --git a/dll/directx/quartz/avidec.c b/dll/directx/wine/quartz/avidec.c similarity index 100% rename from dll/directx/quartz/avidec.c rename to dll/directx/wine/quartz/avidec.c diff --git a/dll/directx/quartz/avisplit.c b/dll/directx/wine/quartz/avisplit.c similarity index 100% rename from dll/directx/quartz/avisplit.c rename to dll/directx/wine/quartz/avisplit.c diff --git a/dll/directx/quartz/control_tlb.idl b/dll/directx/wine/quartz/control_tlb.idl similarity index 100% rename from dll/directx/quartz/control_tlb.idl rename to dll/directx/wine/quartz/control_tlb.idl diff --git a/dll/directx/quartz/control_tlb.rgs b/dll/directx/wine/quartz/control_tlb.rgs similarity index 100% rename from dll/directx/quartz/control_tlb.rgs rename to dll/directx/wine/quartz/control_tlb.rgs diff --git a/dll/directx/quartz/dsoundrender.c b/dll/directx/wine/quartz/dsoundrender.c similarity index 100% rename from dll/directx/quartz/dsoundrender.c rename to dll/directx/wine/quartz/dsoundrender.c diff --git a/dll/directx/quartz/enumfilters.c b/dll/directx/wine/quartz/enumfilters.c similarity index 100% rename from dll/directx/quartz/enumfilters.c rename to dll/directx/wine/quartz/enumfilters.c diff --git a/dll/directx/quartz/enummedia.c b/dll/directx/wine/quartz/enummedia.c similarity index 100% rename from dll/directx/quartz/enummedia.c rename to dll/directx/wine/quartz/enummedia.c diff --git a/dll/directx/quartz/enummoniker.c b/dll/directx/wine/quartz/enummoniker.c similarity index 100% rename from dll/directx/quartz/enummoniker.c rename to dll/directx/wine/quartz/enummoniker.c diff --git a/dll/directx/quartz/enumregfilters.c b/dll/directx/wine/quartz/enumregfilters.c similarity index 100% rename from dll/directx/quartz/enumregfilters.c rename to dll/directx/wine/quartz/enumregfilters.c diff --git a/dll/directx/quartz/fil_data.idl b/dll/directx/wine/quartz/fil_data.idl similarity index 100% rename from dll/directx/quartz/fil_data.idl rename to dll/directx/wine/quartz/fil_data.idl diff --git a/dll/directx/quartz/filesource.c b/dll/directx/wine/quartz/filesource.c similarity index 100% rename from dll/directx/quartz/filesource.c rename to dll/directx/wine/quartz/filesource.c diff --git a/dll/directx/quartz/filtergraph.c b/dll/directx/wine/quartz/filtergraph.c similarity index 100% rename from dll/directx/quartz/filtergraph.c rename to dll/directx/wine/quartz/filtergraph.c diff --git a/dll/directx/quartz/filtermapper.c b/dll/directx/wine/quartz/filtermapper.c similarity index 99% rename from dll/directx/quartz/filtermapper.c rename to dll/directx/wine/quartz/filtermapper.c index f86c88e654f..634fcc5a0bd 100644 --- a/dll/directx/quartz/filtermapper.c +++ b/dll/directx/wine/quartz/filtermapper.c @@ -305,7 +305,7 @@ static HRESULT WINAPI FilterMapper3_CreateCategory( hr = HRESULT_FROM_WIN32(lRet); } - CloseHandle(hKey); + RegCloseKey(hKey); CoTaskMemFree(wClsidCategory); CoTaskMemFree(wClsidAMCat); @@ -1285,7 +1285,7 @@ static HRESULT WINAPI FilterMapper_RegisterFilter(IFilterMapper * iface, CLSID c { lRet = RegSetValueExW(hKey, NULL, 0, REG_SZ, (const BYTE*)szName, (strlenW(szName) + 1) * sizeof(WCHAR)); hr = HRESULT_FROM_WIN32(lRet); - CloseHandle(hKey); + RegCloseKey(hKey); } if (SUCCEEDED(hr)) @@ -1301,7 +1301,7 @@ static HRESULT WINAPI FilterMapper_RegisterFilter(IFilterMapper * iface, CLSID c { lRet = RegSetValueExW(hKey, wszMeritName, 0, REG_DWORD, (LPBYTE)&dwMerit, sizeof(dwMerit)); hr = HRESULT_FROM_WIN32(lRet); - CloseHandle(hKey); + RegCloseKey(hKey); } CoTaskMemFree(wszClsid); @@ -1405,9 +1405,9 @@ static HRESULT WINAPI FilterMapper_RegisterPin( CoTaskMemFree(wszClsid); if (hKey) - CloseHandle(hKey); + RegCloseKey(hKey); if (hPinsKey) - CloseHandle(hPinsKey); + RegCloseKey(hPinsKey); return hr; } @@ -1478,7 +1478,7 @@ static HRESULT WINAPI FilterMapper_RegisterPinType( lRet = RegCreateKeyExW(hKey, wszKeyName, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hkeyDummy, NULL); hr = HRESULT_FROM_WIN32(lRet); - CloseHandle(hKey); + RegCloseKey(hKey); if (hkeyDummy) RegCloseKey(hkeyDummy); } @@ -1512,7 +1512,7 @@ static HRESULT WINAPI FilterMapper_UnregisterFilter(IFilterMapper * iface, CLSID { lRet = RegDeleteKeyW(hKey, wszClsid); hr = HRESULT_FROM_WIN32(lRet); - CloseHandle(hKey); + RegCloseKey(hKey); } if (SUCCEEDED(hr)) @@ -1534,7 +1534,7 @@ static HRESULT WINAPI FilterMapper_UnregisterFilter(IFilterMapper * iface, CLSID if (lRet != ERROR_SUCCESS) hr = HRESULT_FROM_WIN32(lRet); - CloseHandle(hKey); + RegCloseKey(hKey); } CoTaskMemFree(wszClsid); @@ -1596,7 +1596,7 @@ static HRESULT WINAPI FilterMapper_UnregisterPin(IFilterMapper * iface, CLSID Fi CoTaskMemFree(wszClsid); if (hKey) - CloseHandle(hKey); + RegCloseKey(hKey); return hr; } diff --git a/dll/directx/quartz/main.c b/dll/directx/wine/quartz/main.c similarity index 100% rename from dll/directx/quartz/main.c rename to dll/directx/wine/quartz/main.c diff --git a/dll/directx/quartz/memallocator.c b/dll/directx/wine/quartz/memallocator.c similarity index 100% rename from dll/directx/quartz/memallocator.c rename to dll/directx/wine/quartz/memallocator.c diff --git a/dll/directx/quartz/mpegsplit.c b/dll/directx/wine/quartz/mpegsplit.c similarity index 100% rename from dll/directx/quartz/mpegsplit.c rename to dll/directx/wine/quartz/mpegsplit.c diff --git a/dll/directx/quartz/nullrenderer.c b/dll/directx/wine/quartz/nullrenderer.c similarity index 100% rename from dll/directx/quartz/nullrenderer.c rename to dll/directx/wine/quartz/nullrenderer.c diff --git a/dll/directx/quartz/parser.c b/dll/directx/wine/quartz/parser.c similarity index 100% rename from dll/directx/quartz/parser.c rename to dll/directx/wine/quartz/parser.c diff --git a/dll/directx/quartz/parser.h b/dll/directx/wine/quartz/parser.h similarity index 100% rename from dll/directx/quartz/parser.h rename to dll/directx/wine/quartz/parser.h diff --git a/dll/directx/quartz/pin.c b/dll/directx/wine/quartz/pin.c similarity index 100% rename from dll/directx/quartz/pin.c rename to dll/directx/wine/quartz/pin.c diff --git a/dll/directx/quartz/pin.h b/dll/directx/wine/quartz/pin.h similarity index 100% rename from dll/directx/quartz/pin.h rename to dll/directx/wine/quartz/pin.h diff --git a/dll/directx/quartz/quartz.spec b/dll/directx/wine/quartz/quartz.spec similarity index 100% rename from dll/directx/quartz/quartz.spec rename to dll/directx/wine/quartz/quartz.spec diff --git a/dll/directx/quartz/quartz_private.h b/dll/directx/wine/quartz/quartz_private.h similarity index 100% rename from dll/directx/quartz/quartz_private.h rename to dll/directx/wine/quartz/quartz_private.h diff --git a/dll/directx/quartz/quartz_strmif.idl b/dll/directx/wine/quartz/quartz_strmif.idl similarity index 100% rename from dll/directx/quartz/quartz_strmif.idl rename to dll/directx/wine/quartz/quartz_strmif.idl diff --git a/dll/directx/quartz/quartz_strmif.rgs b/dll/directx/wine/quartz/quartz_strmif.rgs similarity index 100% rename from dll/directx/quartz/quartz_strmif.rgs rename to dll/directx/wine/quartz/quartz_strmif.rgs diff --git a/dll/directx/quartz/regsvr.c b/dll/directx/wine/quartz/regsvr.c similarity index 100% rename from dll/directx/quartz/regsvr.c rename to dll/directx/wine/quartz/regsvr.c diff --git a/dll/directx/quartz/systemclock.c b/dll/directx/wine/quartz/systemclock.c similarity index 100% rename from dll/directx/quartz/systemclock.c rename to dll/directx/wine/quartz/systemclock.c diff --git a/dll/directx/quartz/version.rc b/dll/directx/wine/quartz/version.rc similarity index 100% rename from dll/directx/quartz/version.rc rename to dll/directx/wine/quartz/version.rc diff --git a/dll/directx/quartz/videorenderer.c b/dll/directx/wine/quartz/videorenderer.c similarity index 100% rename from dll/directx/quartz/videorenderer.c rename to dll/directx/wine/quartz/videorenderer.c diff --git a/dll/directx/quartz/vmr9.c b/dll/directx/wine/quartz/vmr9.c similarity index 100% rename from dll/directx/quartz/vmr9.c rename to dll/directx/wine/quartz/vmr9.c diff --git a/dll/directx/quartz/waveparser.c b/dll/directx/wine/quartz/waveparser.c similarity index 100% rename from dll/directx/quartz/waveparser.c rename to dll/directx/wine/quartz/waveparser.c diff --git a/dll/directx/wine/wined3d/CMakeLists.txt b/dll/directx/wine/wined3d/CMakeLists.txt index b5ac102275e..ad4913c3db5 100644 --- a/dll/directx/wine/wined3d/CMakeLists.txt +++ b/dll/directx/wine/wined3d/CMakeLists.txt @@ -38,28 +38,9 @@ list(APPEND SOURCE wined3d_main.c ${CMAKE_CURRENT_BINARY_DIR}/wined3d.def) -add_library(wined3d SHARED - ${SOURCE} - version.rc) +add_library(wined3d SHARED ${SOURCE} version.rc) set_module_type(wined3d win32dll) - target_link_libraries(wined3d wine) - -add_importlibs(wined3d - user32 - opengl32 - gdi32 - advapi32 - msvcrt - kernel32 - ntdll) - -add_dependencies(wined3d wineheaders) +add_importlibs(wined3d user32 opengl32 gdi32 advapi32 msvcrt kernel32 ntdll) add_pch(wined3d wined3d_private.h) add_cd_file(TARGET wined3d DESTINATION reactos/system32 FOR all) - -if(NOT MSVC) - # FIXME: http://www.cmake.org/Bug/view.php?id=12998 - #allow_warnings(wined3d) - set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error") -endif() diff --git a/dll/directx/wine/wined3d/arb_program_shader.c b/dll/directx/wine/wined3d/arb_program_shader.c index 885d0645d81..caa18dc5c43 100644 --- a/dll/directx/wine/wined3d/arb_program_shader.c +++ b/dll/directx/wine/wined3d/arb_program_shader.c @@ -9,7 +9,7 @@ * Copyright 2006 Ivan Gyurdiev * Copyright 2006 Jason Green * Copyright 2006 Henri Verbeet - * Copyright 2007-2008 Stefan Dösinger for CodeWeavers + * Copyright 2007-2011, 2013 Stefan Dösinger for CodeWeavers * Copyright 2009 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or @@ -39,6 +39,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_shader); WINE_DECLARE_DEBUG_CHANNEL(d3d_constants); WINE_DECLARE_DEBUG_CHANNEL(d3d); +/* sRGB correction constants */ +static const float srgb_cmp = 0.0031308f; +static const float srgb_mul_low = 12.92f; +static const float srgb_pow = 0.41666f; +static const float srgb_mul_high = 1.055f; +static const float srgb_sub_high = 0.055f; + static BOOL shader_is_pshader_version(enum wined3d_shader_type type) { return type == WINED3D_SHADER_TYPE_PIXEL; @@ -271,6 +278,7 @@ struct shader_arb_ctx_priv BOOL muted; unsigned int num_loops, loop_depth, num_ifcs; int aL; + BOOL ps_post_process; unsigned int vs_clipplanes; BOOL footer_written; @@ -327,6 +335,7 @@ struct shader_arb_priv char *vshader_const_dirty, *pshader_const_dirty; const struct wined3d_context *last_context; + const struct wined3d_vertex_pipe_ops *vertex_pipe; const struct fragment_pipeline *fragment_pipe; BOOL ffp_proj_control; }; @@ -496,52 +505,49 @@ static unsigned int shader_arb_load_constantsF(const struct wined3d_shader *shad } } -/** - * Loads the texture dimensions for NP2 fixup into the currently set ARB_[vertex/fragment]_programs. - */ -static void shader_arb_load_np2fixup_constants(void *shader_priv, +/* Loads the texture dimensions for NP2 fixup into the currently set + * ARB_[vertex/fragment]_programs. */ +static void shader_arb_load_np2fixup_constants(const struct arb_ps_np2fixup_info *fixup, const struct wined3d_gl_info *gl_info, const struct wined3d_state *state) { - const struct shader_arb_priv * priv = shader_priv; + GLfloat np2fixup_constants[4 * MAX_FRAGMENT_SAMPLERS]; + WORD active = fixup->super.active; + UINT i; - /* NP2 texcoord fixup is (currently) only done for pixelshaders. */ - if (!use_ps(state)) return; + if (!active) + return; - if (priv->compiled_fprog && priv->compiled_fprog->np2fixup_info.super.active) { - const struct arb_ps_np2fixup_info* const fixup = &priv->compiled_fprog->np2fixup_info; - UINT i; - WORD active = fixup->super.active; - GLfloat np2fixup_constants[4 * MAX_FRAGMENT_SAMPLERS]; + for (i = 0; active; active >>= 1, ++i) + { + const struct wined3d_texture *tex = state->textures[i]; + unsigned char idx = fixup->super.idx[i]; + GLfloat *tex_dim = &np2fixup_constants[(idx >> 1) * 4]; - for (i = 0; active; active >>= 1, ++i) + if (!(active & 1)) + continue; + + if (!tex) { - const struct wined3d_texture *tex = state->textures[i]; - const unsigned char idx = fixup->super.idx[i]; - GLfloat *tex_dim = &np2fixup_constants[(idx >> 1) * 4]; - - if (!(active & 1)) continue; - - if (!tex) { - FIXME("Nonexistent texture is flagged for NP2 texcoord fixup\n"); - continue; - } - - if (idx % 2) - { - tex_dim[2] = tex->pow2_matrix[0]; - tex_dim[3] = tex->pow2_matrix[5]; - } - else - { - tex_dim[0] = tex->pow2_matrix[0]; - tex_dim[1] = tex->pow2_matrix[5]; - } + ERR("Nonexistent texture is flagged for NP2 texcoord fixup.\n"); + continue; } - for (i = 0; i < fixup->super.num_consts; ++i) { - GL_EXTCALL(glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, - fixup->offset + i, &np2fixup_constants[i * 4])); + if (idx % 2) + { + tex_dim[2] = tex->pow2_matrix[0]; + tex_dim[3] = tex->pow2_matrix[5]; } + else + { + tex_dim[0] = tex->pow2_matrix[0]; + tex_dim[1] = tex->pow2_matrix[5]; + } + } + + for (i = 0; i < fixup->super.num_consts; ++i) + { + GL_EXTCALL(glProgramEnvParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, + fixup->offset + i, &np2fixup_constants[i * 4])); } } @@ -639,8 +645,8 @@ static void shader_arb_vs_local_constants(const struct arb_vs_compiled_shader *g checkGLcall("Load vs int consts"); } -static void shader_arb_select(const struct wined3d_context *context, enum wined3d_shader_mode vertex_mode, - enum wined3d_shader_mode fragment_mode); +static void shader_arb_select(void *shader_priv, struct wined3d_context *context, + const struct wined3d_state *state); /** * Loads the app-supplied constants into the currently set ARB_[vertex/fragment]_programs. @@ -649,51 +655,43 @@ static void shader_arb_select(const struct wined3d_context *context, enum wined3 * worry about the Integers or Booleans */ /* Context activation is done by the caller (state handler). */ -static void shader_arb_load_constants_internal(const struct wined3d_context *context, +static void shader_arb_load_constants_internal(struct shader_arb_priv *priv, + struct wined3d_context *context, const struct wined3d_state *state, BOOL usePixelShader, BOOL useVertexShader, BOOL from_shader_select) { - struct wined3d_device *device = context->swapchain->device; - const struct wined3d_stateblock *stateblock = device->stateBlock; - const struct wined3d_state *state = &stateblock->state; + const struct wined3d_d3d_info *d3d_info = context->d3d_info; const struct wined3d_gl_info *gl_info = context->gl_info; - struct shader_arb_priv *priv = device->shader_priv; if (!from_shader_select) { const struct wined3d_shader *vshader = state->vertex_shader, *pshader = state->pixel_shader; if (vshader - && (stateblock->changed.vertexShaderConstantsB & vshader->reg_maps.boolean_constants + && (vshader->reg_maps.boolean_constants || (!gl_info->supported[NV_VERTEX_PROGRAM2_OPTION] - && (stateblock->changed.vertexShaderConstantsI - & vshader->reg_maps.integer_constants & ~vshader->reg_maps.local_int_consts)))) + && (vshader->reg_maps.integer_constants & ~vshader->reg_maps.local_int_consts)))) { TRACE("bool/integer vertex shader constants potentially modified, forcing shader reselection.\n"); - shader_arb_select(context, - useVertexShader ? WINED3D_SHADER_MODE_SHADER : WINED3D_SHADER_MODE_FFP, - usePixelShader ? WINED3D_SHADER_MODE_SHADER : WINED3D_SHADER_MODE_FFP); + shader_arb_select(priv, context, state); } else if (pshader - && (stateblock->changed.pixelShaderConstantsB & pshader->reg_maps.boolean_constants + && (pshader->reg_maps.boolean_constants || (!gl_info->supported[NV_FRAGMENT_PROGRAM_OPTION] - && (stateblock->changed.pixelShaderConstantsI - & pshader->reg_maps.integer_constants & ~pshader->reg_maps.local_int_consts)))) + && (pshader->reg_maps.integer_constants & ~pshader->reg_maps.local_int_consts)))) { TRACE("bool/integer pixel shader constants potentially modified, forcing shader reselection.\n"); - shader_arb_select(context, - useVertexShader ? WINED3D_SHADER_MODE_SHADER : WINED3D_SHADER_MODE_FFP, - usePixelShader ? WINED3D_SHADER_MODE_SHADER : WINED3D_SHADER_MODE_FFP); + shader_arb_select(priv, context, state); } } if (context != priv->last_context) { memset(priv->vshader_const_dirty, 1, - sizeof(*priv->vshader_const_dirty) * device->d3d_vshader_constantF); - priv->highest_dirty_vs_const = device->d3d_vshader_constantF; + sizeof(*priv->vshader_const_dirty) * d3d_info->limits.vs_uniform_count); + priv->highest_dirty_vs_const = d3d_info->limits.vs_uniform_count; memset(priv->pshader_const_dirty, 1, - sizeof(*priv->pshader_const_dirty) * device->d3d_pshader_constantF); - priv->highest_dirty_ps_const = device->d3d_pshader_constantF; + sizeof(*priv->pshader_const_dirty) * d3d_info->limits.ps_uniform_count); + priv->highest_dirty_ps_const = d3d_info->limits.ps_uniform_count; priv->last_context = context; } @@ -719,18 +717,31 @@ static void shader_arb_load_constants_internal(const struct wined3d_context *con priv->highest_dirty_ps_const = shader_arb_load_constantsF(pshader, gl_info, GL_FRAGMENT_PROGRAM_ARB, priv->highest_dirty_ps_const, state->ps_consts_f, priv->pshader_const_dirty); shader_arb_ps_local_constants(gl_shader, context, state, rt_height); + + if (context->constant_update_mask & WINED3D_SHADER_CONST_PS_NP2_FIXUP) + shader_arb_load_np2fixup_constants(&gl_shader->np2fixup_info, gl_info, state); } } -static void shader_arb_load_constants(const struct wined3d_context *context, BOOL ps, BOOL vs) +static void shader_arb_load_constants(void *shader_priv, struct wined3d_context *context, + const struct wined3d_state *state) { - shader_arb_load_constants_internal(context, ps, vs, FALSE); + BOOL vs = use_vs(state); + BOOL ps = use_ps(state); + + shader_arb_load_constants_internal(shader_priv, context, state, ps, vs, FALSE); } static void shader_arb_update_float_vertex_constants(struct wined3d_device *device, UINT start, UINT count) { struct wined3d_context *context = context_get_current(); struct shader_arb_priv *priv = device->shader_priv; + unsigned int i; + + for (i = 0; i < device->context_count; ++i) + { + device->contexts[i]->constant_update_mask |= WINED3D_SHADER_CONST_VS_F; + } /* We don't want shader constant dirtification to be an O(contexts), so just dirtify the active * context. On a context switch the old context will be fully dirtified */ @@ -744,6 +755,12 @@ static void shader_arb_update_float_pixel_constants(struct wined3d_device *devic { struct wined3d_context *context = context_get_current(); struct shader_arb_priv *priv = device->shader_priv; + unsigned int i; + + for (i = 0; i < device->context_count; ++i) + { + device->contexts[i]->constant_update_mask |= WINED3D_SHADER_CONST_PS_F; + } /* We don't want shader constant dirtification to be an O(contexts), so just dirtify the active * context. On a context switch the old context will be fully dirtified */ @@ -753,36 +770,13 @@ static void shader_arb_update_float_pixel_constants(struct wined3d_device *devic priv->highest_dirty_ps_const = max(priv->highest_dirty_ps_const, start + count); } -static DWORD *local_const_mapping(const struct wined3d_shader *shader) -{ - const struct wined3d_shader_lconst *lconst; - DWORD *ret; - DWORD idx = 0; - - if (shader->load_local_constsF || list_empty(&shader->constantsF)) - return NULL; - - ret = HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD) * shader->limits.constant_float); - if (!ret) - { - ERR("Out of memory\n"); - return NULL; - } - - LIST_FOR_EACH_ENTRY(lconst, &shader->constantsF, struct wined3d_shader_lconst, entry) - { - ret[lconst->idx] = idx++; - } - return ret; -} - /* Generate the variable & register declarations for the ARB_vertex_program output target */ -static DWORD shader_generate_arb_declarations(const struct wined3d_shader *shader, +static void shader_generate_arb_declarations(const struct wined3d_shader *shader, const struct wined3d_shader_reg_maps *reg_maps, struct wined3d_shader_buffer *buffer, - const struct wined3d_gl_info *gl_info, const DWORD *lconst_map, - DWORD *num_clipplanes, const struct shader_arb_ctx_priv *ctx) + const struct wined3d_gl_info *gl_info, DWORD *num_clipplanes, + const struct shader_arb_ctx_priv *ctx) { - DWORD i, next_local = 0; + DWORD i; char pshader = shader_is_pshader_version(reg_maps->shader_version.type); const struct wined3d_shader_lconst *lconst; unsigned max_constantsF; @@ -874,16 +868,14 @@ static DWORD shader_generate_arb_declarations(const struct wined3d_shader *shade } } - /* Load local constants using the program-local space, - * this avoids reloading them each time the shader is used - */ - if (lconst_map) + if (!shader->load_local_constsF) { LIST_FOR_EACH_ENTRY(lconst, &shader->constantsF, struct wined3d_shader_lconst, entry) { - shader_addline(buffer, "PARAM C%u = program.local[%u];\n", lconst->idx, - lconst_map[lconst->idx]); - next_local = max(next_local, lconst_map[lconst->idx] + 1); + const float *value; + value = (const float *)lconst->value; + shader_addline(buffer, "PARAM C%u = {%.8e, %.8e, %.8e, %.8e};\n", lconst->idx, + value[0], value[1], value[2], value[3]); } } @@ -924,8 +916,6 @@ static DWORD shader_generate_arb_declarations(const struct wined3d_shader *shade } } } - - return next_local; } static const char * const shift_tab[] = { @@ -1183,7 +1173,7 @@ static void shader_arb_get_register_name(const struct wined3d_shader_instruction break; case WINED3DSPR_COLOROUT: - if (ctx->cur_ps_args->super.srgb_correction && !reg->idx[0].offset) + if (ctx->ps_post_process && !reg->idx[0].offset) { strcpy(register_name, "TMP_COLOR"); } @@ -1395,14 +1385,14 @@ static void shader_hw_sample(const struct wined3d_shader_instruction *ins, DWORD { struct wined3d_shader_buffer *buffer = ins->ctx->buffer; DWORD sampler_type = ins->ctx->reg_maps->sampler_type[sampler_idx]; - const struct wined3d_shader *shader = ins->ctx->shader; - const struct wined3d_texture *texture; const char *tex_type; BOOL np2_fixup = FALSE; - struct wined3d_device *device = shader->device; struct shader_arb_ctx_priv *priv = ins->ctx->backend_data; const char *mod; BOOL pshader = shader_is_pshader_version(ins->ctx->reg_maps->shader_version.type); + const struct wined3d_shader *shader; + const struct wined3d_device *device; + const struct wined3d_gl_info *gl_info; /* D3D vertex shader sampler IDs are vertex samplers(0-3), not global d3d samplers */ if(!pshader) sampler_idx += MAX_FRAGMENT_SAMPLERS; @@ -1413,13 +1403,15 @@ static void shader_hw_sample(const struct wined3d_shader_instruction *ins, DWORD break; case WINED3DSTT_2D: - texture = device->stateBlock->state.textures[sampler_idx]; - if (texture && texture->target == GL_TEXTURE_RECTANGLE_ARB) - { + shader = ins->ctx->shader; + device = shader->device; + gl_info = &device->adapter->gl_info; + + if (pshader && priv->cur_ps_args->super.np2_fixup & (1 << sampler_idx) + && gl_info->supported[ARB_TEXTURE_RECTANGLE]) tex_type = "RECT"; - } else { + else tex_type = "2D"; - } if (shader_is_pshader_version(ins->ctx->reg_maps->shader_version.type)) { if (priv->cur_np2fixup_info->super.active & (1 << sampler_idx)) @@ -1650,8 +1642,8 @@ static void pshader_hw_cnd(const struct wined3d_shader_instruction *ins) shader_arb_get_dst_param(ins, dst, dst_name); shader_arb_get_src_param(ins, &ins->src[1], 1, src_name[1]); - /* The coissue flag changes the semantic of the cnd instruction in <= 1.3 shaders */ - if (shader_version <= WINED3D_SHADER_VERSION(1, 3) && ins->coissue) + if (shader_version <= WINED3D_SHADER_VERSION(1, 3) && ins->coissue + && ins->dst->write_mask != WINED3DSP_WRITEMASK_3) { shader_addline(buffer, "MOV%s %s, %s;\n", shader_arb_get_modifier(ins), dst_name, src_name[1]); } @@ -1871,9 +1863,9 @@ static void shader_hw_mov(const struct wined3d_shader_instruction *ins) } else if (ins->dst[0].reg.type == WINED3DSPR_COLOROUT && !ins->dst[0].reg.idx[0].offset && pshader) { - if (ctx->cur_ps_args->super.srgb_correction && shader->u.ps.color0_mov) + if (ctx->ps_post_process && shader->u.ps.color0_mov) { - shader_addline(buffer, "#mov handled in srgb write code\n"); + shader_addline(buffer, "#mov handled in srgb write or fog code\n"); return; } shader_hw_map2gl(ins); @@ -3580,23 +3572,31 @@ static void init_ps_input(const struct wined3d_shader *shader, } } +static void arbfp_add_linear_fog(struct wined3d_shader_buffer *buffer, + const char *fragcolor, const char *tmp) +{ + shader_addline(buffer, "SUB %s.x, state.fog.params.z, fragment.fogcoord.x;\n", tmp); + shader_addline(buffer, "MUL_SAT %s.x, %s.x, state.fog.params.w;\n", tmp, tmp); + shader_addline(buffer, "LRP %s.rgb, %s.x, %s, state.fog.color;\n", fragcolor, tmp, fragcolor); +} + /* Context activation is done by the caller. */ static GLuint shader_arb_generate_pshader(const struct wined3d_shader *shader, const struct wined3d_gl_info *gl_info, struct wined3d_shader_buffer *buffer, const struct arb_ps_compile_args *args, struct arb_ps_compiled_shader *compiled) { const struct wined3d_shader_reg_maps *reg_maps = &shader->reg_maps; - const struct wined3d_shader_lconst *lconst; const DWORD *function = shader->function; GLuint retval; char fragcolor[16]; - DWORD *lconst_map = local_const_mapping(shader), next_local; + DWORD next_local = 0; struct shader_arb_ctx_priv priv_ctx; BOOL dcl_td = FALSE; BOOL want_nv_prog = FALSE; struct arb_pshader_private *shader_priv = shader->backend_data; GLint errPos; DWORD map; + BOOL custom_linear_fog = FALSE; char srgbtmp[4][4]; unsigned int i, found = 0; @@ -3644,6 +3644,7 @@ static GLuint shader_arb_generate_pshader(const struct wined3d_shader *shader, priv_ctx.cur_np2fixup_info = &compiled->np2fixup_info; init_ps_input(shader, args, &priv_ctx); list_init(&priv_ctx.control_frames); + priv_ctx.ps_post_process = args->super.srgb_correction; /* Avoid enabling NV_fragment_program* if we do not need it. * @@ -3691,16 +3692,23 @@ static GLuint shader_arb_generate_pshader(const struct wined3d_shader *shader, if (reg_maps->shader_version.major < 3) { - switch(args->super.fog) { - case FOG_OFF: + switch (args->super.fog) + { + case WINED3D_FFP_PS_FOG_OFF: break; - case FOG_LINEAR: + case WINED3D_FFP_PS_FOG_LINEAR: + if (gl_info->quirks & WINED3D_QUIRK_BROKEN_ARB_FOG) + { + custom_linear_fog = TRUE; + priv_ctx.ps_post_process = TRUE; + break; + } shader_addline(buffer, "OPTION ARB_fog_linear;\n"); break; - case FOG_EXP: + case WINED3D_FFP_PS_FOG_EXP: shader_addline(buffer, "OPTION ARB_fog_exp;\n"); break; - case FOG_EXP2: + case WINED3D_FFP_PS_FOG_EXP2: shader_addline(buffer, "OPTION ARB_fog_exp2;\n"); break; } @@ -3724,7 +3732,7 @@ static GLuint shader_arb_generate_pshader(const struct wined3d_shader *shader, } else { - if (args->super.srgb_correction) + if (priv_ctx.ps_post_process) { if (shader->u.ps.color0_mov) { @@ -3748,8 +3756,7 @@ static GLuint shader_arb_generate_pshader(const struct wined3d_shader *shader, } /* Base Declarations */ - next_local = shader_generate_arb_declarations(shader, reg_maps, - buffer, gl_info, lconst_map, NULL, &priv_ctx); + shader_generate_arb_declarations(shader, reg_maps, buffer, gl_info, NULL, &priv_ctx); for (i = 0, map = reg_maps->bumpmat; map; map >>= 1, ++i) { @@ -3876,6 +3883,9 @@ static GLuint shader_arb_generate_pshader(const struct wined3d_shader *shader, priv_ctx.target_version >= NV2); } + if (custom_linear_fog) + arbfp_add_linear_fog(buffer, fragcolor, "TA"); + if(strcmp(fragcolor, "result.color")) { shader_addline(buffer, "MOV result.color, %s;\n", fragcolor); } @@ -3890,7 +3900,7 @@ static GLuint shader_arb_generate_pshader(const struct wined3d_shader *shader, TRACE("Created hw pixel shader, prg=%d\n", retval); /* Create the program and check for errors */ GL_EXTCALL(glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, - buffer->bsize, buffer->buffer)); + buffer->content_size, buffer->buffer)); checkGLcall("glProgramStringARB()"); gl_info->gl_ops.gl.p_glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errPos); @@ -3910,18 +3920,6 @@ static GLuint shader_arb_generate_pshader(const struct wined3d_shader *shader, if (!native) WARN("Program exceeds native resource limits.\n"); } - /* Load immediate constants */ - if (lconst_map) - { - LIST_FOR_EACH_ENTRY(lconst, &shader->constantsF, struct wined3d_shader_lconst, entry) - { - const float *value = (const float *)lconst->value; - GL_EXTCALL(glProgramLocalParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, lconst_map[lconst->idx], value)); - checkGLcall("glProgramLocalParameter4fvARB"); - } - HeapFree(GetProcessHeap(), 0, lconst_map); - } - return retval; } @@ -3991,7 +3989,8 @@ static DWORD find_input_signature(struct shader_arb_priv *priv, const struct win return found_sig->idx; } -static void init_output_registers(const struct wined3d_shader *shader, DWORD sig_num, +static void init_output_registers(const struct wined3d_shader *shader, + const struct wined3d_shader_signature_element *ps_input_sig, struct shader_arb_ctx_priv *priv_ctx, struct arb_vs_compiled_shader *compiled) { unsigned int i, j; @@ -4000,8 +3999,6 @@ static void init_output_registers(const struct wined3d_shader *shader, DWORD sig "result.texcoord[0]", "result.texcoord[1]", "result.texcoord[2]", "result.texcoord[3]", "result.texcoord[4]", "result.texcoord[5]", "result.texcoord[6]", "result.texcoord[7]" }; - struct wined3d_device *device = shader->device; - const struct wined3d_shader_signature_element *sig; const char *semantic_name; DWORD semantic_idx, reg_idx; @@ -4015,7 +4012,7 @@ static void init_output_registers(const struct wined3d_shader *shader, DWORD sig "result.color.primary", "result.color.secondary" }; - if(sig_num == ~0) + if (!ps_input_sig) { TRACE("Pixel shader uses builtin varyings\n"); /* Map builtins to builtins */ @@ -4074,10 +4071,6 @@ static void init_output_registers(const struct wined3d_shader *shader, DWORD sig return; } - /* Instead of searching for the signature in the signature list, read the one from the current pixel shader. - * Its maybe not the shader where the signature came from, but it is the same signature and faster to find - */ - sig = device->stateBlock->state.pixel_shader->input_signature; TRACE("Pixel shader uses declared varyings\n"); /* Map builtin to declared. /dev/null the results by default to the TA temp reg */ @@ -4091,9 +4084,9 @@ static void init_output_registers(const struct wined3d_shader *shader, DWORD sig for(i = 0; i < MAX_REG_INPUT; i++) { - semantic_name = sig[i].semantic_name; - semantic_idx = sig[i].semantic_idx; - reg_idx = sig[i].register_idx; + semantic_name = ps_input_sig[i].semantic_name; + semantic_idx = ps_input_sig[i].semantic_idx; + reg_idx = ps_input_sig[i].register_idx; if (!semantic_name) continue; /* If a declared input register is not written by builtin arguments, don't write to it. @@ -4152,12 +4145,12 @@ static void init_output_registers(const struct wined3d_shader *shader, DWORD sig for(j = 0; j < MAX_REG_INPUT; j++) { - if (!sig[j].semantic_name) continue; + if (!ps_input_sig[j].semantic_name) continue; - if (!strcmp(sig[j].semantic_name, semantic_name) - && sig[j].semantic_idx == shader->output_signature[i].semantic_idx) + if (!strcmp(ps_input_sig[j].semantic_name, semantic_name) + && ps_input_sig[j].semantic_idx == shader->output_signature[i].semantic_idx) { - priv_ctx->vs_output[i] = decl_idx_to_string[sig[j].register_idx]; + priv_ctx->vs_output[i] = decl_idx_to_string[ps_input_sig[j].register_idx]; if (!strcmp(priv_ctx->vs_output[i], "result.color.primary") || !strcmp(priv_ctx->vs_output[i], "result.color.secondary")) @@ -4172,15 +4165,15 @@ static void init_output_registers(const struct wined3d_shader *shader, DWORD sig /* Context activation is done by the caller. */ static GLuint shader_arb_generate_vshader(const struct wined3d_shader *shader, const struct wined3d_gl_info *gl_info, struct wined3d_shader_buffer *buffer, - const struct arb_vs_compile_args *args, struct arb_vs_compiled_shader *compiled) + const struct arb_vs_compile_args *args, struct arb_vs_compiled_shader *compiled, + const struct wined3d_shader_signature_element *ps_input_sig) { const struct arb_vshader_private *shader_data = shader->backend_data; const struct wined3d_shader_reg_maps *reg_maps = &shader->reg_maps; struct shader_arb_priv *priv = shader->device->shader_priv; - const struct wined3d_shader_lconst *lconst; const DWORD *function = shader->function; GLuint ret; - DWORD next_local, *lconst_map = local_const_mapping(shader); + DWORD next_local = 0; struct shader_arb_ctx_priv priv_ctx; unsigned int i; GLint errPos; @@ -4188,7 +4181,7 @@ static GLuint shader_arb_generate_vshader(const struct wined3d_shader *shader, memset(&priv_ctx, 0, sizeof(priv_ctx)); priv_ctx.cur_vs_args = args; list_init(&priv_ctx.control_frames); - init_output_registers(shader, args->ps_signature, &priv_ctx, compiled); + init_output_registers(shader, ps_input_sig, &priv_ctx, compiled); /* Create the hw ARB shader */ shader_addline(buffer, "!!ARBvp1.0\n"); @@ -4228,8 +4221,8 @@ static GLuint shader_arb_generate_vshader(const struct wined3d_shader *shader, shader_addline(buffer, "TEMP TB;\n"); /* Base Declarations */ - next_local = shader_generate_arb_declarations(shader, reg_maps, buffer, - gl_info, lconst_map, &priv_ctx.vs_clipplanes, &priv_ctx); + shader_generate_arb_declarations(shader, reg_maps, buffer, gl_info, + &priv_ctx.vs_clipplanes, &priv_ctx); for(i = 0; i < MAX_CONST_I; i++) { @@ -4303,7 +4296,7 @@ static GLuint shader_arb_generate_vshader(const struct wined3d_shader *shader, TRACE("Created hw vertex shader, prg=%d\n", ret); /* Create the program and check for errors */ GL_EXTCALL(glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, - buffer->bsize, buffer->buffer)); + buffer->content_size, buffer->buffer)); checkGLcall("glProgramStringARB()"); gl_info->gl_ops.gl.p_glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errPos); @@ -4321,18 +4314,7 @@ static GLuint shader_arb_generate_vshader(const struct wined3d_shader *shader, GL_EXTCALL(glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB, &native)); checkGLcall("glGetProgramivARB()"); if (!native) WARN("Program exceeds native resource limits.\n"); - - /* Load immediate constants */ - if (lconst_map) - { - LIST_FOR_EACH_ENTRY(lconst, &shader->constantsF, struct wined3d_shader_lconst, entry) - { - const float *value = (const float *)lconst->value; - GL_EXTCALL(glProgramLocalParameter4fvARB(GL_VERTEX_PROGRAM_ARB, lconst_map[lconst->idx], value)); - } - } } - HeapFree(GetProcessHeap(), 0, lconst_map); return ret; } @@ -4343,6 +4325,7 @@ static struct arb_ps_compiled_shader *find_arb_pshader(struct wined3d_shader *sh { struct wined3d_device *device = shader->device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; UINT i; DWORD new_size; struct arb_ps_compiled_shader *new_array; @@ -4359,15 +4342,15 @@ static struct arb_ps_compiled_shader *find_arb_pshader(struct wined3d_shader *sh shader_data->clamp_consts = shader->reg_maps.shader_version.major == 1; if (shader->reg_maps.shader_version.major < 3) - shader_data->input_signature_idx = ~0; + shader_data->input_signature_idx = ~0U; else shader_data->input_signature_idx = find_input_signature(priv, shader->input_signature); TRACE("Shader got assigned input signature index %u\n", shader_data->input_signature_idx); - if (!device->vs_clipping) + if (!d3d_info->vs_clipping) shader_data->clipplane_emulation = shader_find_free_input_register(&shader->reg_maps, - gl_info->limits.texture_stages - 1); + d3d_info->limits.ffp_blend_stages - 1); else shader_data->clipplane_emulation = ~0U; } @@ -4405,7 +4388,7 @@ static struct arb_ps_compiled_shader *find_arb_pshader(struct wined3d_shader *sh shader_data->gl_shaders[shader_data->num_gl_shaders].args = *args; - pixelshader_update_samplers(&shader->reg_maps, device->stateBlock->state.textures); + pixelshader_update_samplers(shader, args->super.tex_types); if (!shader_buffer_init(&buffer)) { @@ -4435,11 +4418,12 @@ static inline BOOL vs_args_equal(const struct arb_vs_compile_args *stored, const } static struct arb_vs_compiled_shader *find_arb_vshader(struct wined3d_shader *shader, - const struct arb_vs_compile_args *args) + const struct arb_vs_compile_args *args, + const struct wined3d_shader_signature_element *ps_input_sig) { struct wined3d_device *device = shader->device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - DWORD use_map = device->strided_streams.use_map; + DWORD use_map = device->stream_info.use_map; UINT i; DWORD new_size; struct arb_vs_compiled_shader *new_array; @@ -4513,7 +4497,8 @@ static struct arb_vs_compiled_shader *find_arb_vshader(struct wined3d_shader *sh } ret = shader_arb_generate_vshader(shader, gl_info, &buffer, args, - &shader_data->gl_shaders[shader_data->num_gl_shaders]); + &shader_data->gl_shaders[shader_data->num_gl_shaders], + ps_input_sig); shader_buffer_free(&buffer); shader_data->gl_shaders[shader_data->num_gl_shaders].prgId = ret; @@ -4521,10 +4506,11 @@ static struct arb_vs_compiled_shader *find_arb_vshader(struct wined3d_shader *sh } static void find_arb_ps_compile_args(const struct wined3d_state *state, - const struct wined3d_shader *shader, struct arb_ps_compile_args *args) + const struct wined3d_context *context, const struct wined3d_shader *shader, + struct arb_ps_compile_args *args) { - struct wined3d_device *device = shader->device; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + const struct wined3d_gl_info *gl_info = context->gl_info; + const struct wined3d_d3d_info *d3d_info = context->d3d_info; int i; WORD int_skip; @@ -4543,7 +4529,7 @@ static void find_arb_ps_compile_args(const struct wined3d_state *state, * is quite expensive because it forces the driver to disable early Z discards. It is cheaper to * duplicate the shader than have a no-op KIL instruction in every shader */ - if (!device->vs_clipping && use_vs(state) + if (!d3d_info->vs_clipping && use_vs(state) && state->render_states[WINED3D_RS_CLIPPING] && state->render_states[WINED3D_RS_CLIPPLANEENABLE]) args->clip = 1; @@ -4576,10 +4562,13 @@ static void find_arb_ps_compile_args(const struct wined3d_state *state, } static void find_arb_vs_compile_args(const struct wined3d_state *state, - const struct wined3d_shader *shader, struct arb_vs_compile_args *args) + const struct wined3d_context *context, const struct wined3d_shader *shader, + struct arb_vs_compile_args *args) { struct wined3d_device *device = shader->device; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + const struct wined3d_adapter *adapter = device->adapter; + const struct wined3d_gl_info *gl_info = context->gl_info; + const struct wined3d_d3d_info *d3d_info = context->d3d_info; int i; WORD int_skip; @@ -4597,9 +4586,9 @@ static void find_arb_vs_compile_args(const struct wined3d_state *state, else { args->ps_signature = ~0; - if (!device->vs_clipping && device->adapter->fragment_pipe == &arbfp_fragment_pipeline) + if (!d3d_info->vs_clipping && adapter->fragment_pipe == &arbfp_fragment_pipeline) { - args->clip.boolclip.clip_texcoord = ffp_clip_emul(state) ? gl_info->limits.texture_stages : 0; + args->clip.boolclip.clip_texcoord = ffp_clip_emul(state) ? d3d_info->limits.ffp_blend_stages : 0; } /* Otherwise: Setting boolclip_compare set clip_texcoord to 0 */ } @@ -4652,24 +4641,22 @@ static void find_arb_vs_compile_args(const struct wined3d_state *state, } /* Context activation is done by the caller. */ -static void shader_arb_select(const struct wined3d_context *context, enum wined3d_shader_mode vertex_mode, - enum wined3d_shader_mode fragment_mode) +static void shader_arb_select(void *shader_priv, struct wined3d_context *context, + const struct wined3d_state *state) { - struct wined3d_device *device = context->swapchain->device; - struct shader_arb_priv *priv = device->shader_priv; + struct shader_arb_priv *priv = shader_priv; const struct wined3d_gl_info *gl_info = context->gl_info; - const struct wined3d_state *state = &device->stateBlock->state; int i; /* Deal with pixel shaders first so the vertex shader arg function has the input signature ready */ - if (fragment_mode == WINED3D_SHADER_MODE_SHADER) + if (use_ps(state)) { struct wined3d_shader *ps = state->pixel_shader; struct arb_ps_compile_args compile_args; struct arb_ps_compiled_shader *compiled; TRACE("Using pixel shader %p.\n", ps); - find_arb_ps_compile_args(state, ps, &compile_args); + find_arb_ps_compile_args(state, context, ps, &compile_args); compiled = find_arb_pshader(ps, &compile_args); priv->current_fprogram_id = compiled->prgId; priv->compiled_fprog = compiled; @@ -4685,8 +4672,7 @@ static void shader_arb_select(const struct wined3d_context *context, enum wined3 gl_info->gl_ops.gl.p_glEnable(GL_FRAGMENT_PROGRAM_ARB); checkGLcall("glEnable(GL_FRAGMENT_PROGRAM_ARB);"); - TRACE("(%p) : Bound fragment program %u and enabled GL_FRAGMENT_PROGRAM_ARB\n", - device, priv->current_fprogram_id); + TRACE("Bound fragment program %u and enabled GL_FRAGMENT_PROGRAM_ARB\n", priv->current_fprogram_id); /* Pixel Shader 1.x constants are clamped to [-1;1], Pixel Shader 2.0 constants are not. If switching between * a 1.x and newer shader, reload the first 8 constants @@ -4700,7 +4686,7 @@ static void shader_arb_select(const struct wined3d_context *context, enum wined3 priv->pshader_const_dirty[i] = 1; } /* Also takes care of loading local constants */ - shader_arb_load_constants_internal(context, TRUE, FALSE, TRUE); + shader_arb_load_constants_internal(shader_priv, context, state, TRUE, FALSE, TRUE); } else { @@ -4710,7 +4696,10 @@ static void shader_arb_select(const struct wined3d_context *context, enum wined3 /* Force constant reloading for the NP2 fixup (see comment in shader_glsl_select for more info) */ if (compiled->np2fixup_info.super.active) - shader_arb_load_np2fixup_constants(priv, gl_info, state); + context->constant_update_mask |= WINED3D_SHADER_CONST_PS_NP2_FIXUP; + + if (ps->load_local_constsF) + context->constant_update_mask |= WINED3D_SHADER_CONST_PS_F; } else { @@ -4724,18 +4713,28 @@ static void shader_arb_select(const struct wined3d_context *context, enum wined3 checkGLcall("glDisable(GL_FRAGMENT_PROGRAM_ARB)"); priv->current_fprogram_id = 0; } - priv->fragment_pipe->enable_extension(gl_info, fragment_mode == WINED3D_SHADER_MODE_FFP); + priv->fragment_pipe->enable_extension(gl_info, TRUE); } - if (vertex_mode == WINED3D_SHADER_MODE_SHADER) + if (use_vs(state)) { struct wined3d_shader *vs = state->vertex_shader; struct arb_vs_compile_args compile_args; struct arb_vs_compiled_shader *compiled; + const struct wined3d_shader_signature_element *ps_input_sig; TRACE("Using vertex shader %p\n", vs); - find_arb_vs_compile_args(state, vs, &compile_args); - compiled = find_arb_vshader(vs, &compile_args); + find_arb_vs_compile_args(state, context, vs, &compile_args); + + /* Instead of searching for the signature in the signature list, read the one from the + * current pixel shader. It's maybe not the shader where the signature came from, but it + * is the same signature and faster to find. */ + if (compile_args.ps_signature == ~0U) + ps_input_sig = NULL; + else + ps_input_sig = state->pixel_shader->input_signature; + + compiled = find_arb_vshader(vs, &compile_args, ps_input_sig); priv->current_vprogram_id = compiled->prgId; priv->compiled_vprog = compiled; @@ -4743,10 +4742,12 @@ static void shader_arb_select(const struct wined3d_context *context, enum wined3 GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, priv->current_vprogram_id)); checkGLcall("glBindProgramARB(GL_VERTEX_PROGRAM_ARB, priv->current_vprogram_id);"); + priv->vertex_pipe->vp_enable(gl_info, FALSE); + /* Enable OpenGL vertex programs */ gl_info->gl_ops.gl.p_glEnable(GL_VERTEX_PROGRAM_ARB); checkGLcall("glEnable(GL_VERTEX_PROGRAM_ARB);"); - TRACE("(%p) : Bound vertex program %u and enabled GL_VERTEX_PROGRAM_ARB\n", device, priv->current_vprogram_id); + TRACE("Bound vertex program %u and enabled GL_VERTEX_PROGRAM_ARB\n", priv->current_vprogram_id); shader_arb_vs_local_constants(compiled, context, state); if(priv->last_vs_color_unclamp != compiled->need_color_unclamp) { @@ -4760,13 +4761,55 @@ static void shader_arb_select(const struct wined3d_context *context, enum wined3 FIXME("vertex color clamp needs to be changed, but extension not supported.\n"); } } + + if (vs->load_local_constsF) + context->constant_update_mask |= WINED3D_SHADER_CONST_VS_F; } - else if (gl_info->supported[ARB_VERTEX_PROGRAM]) + else + { + if (gl_info->supported[ARB_VERTEX_PROGRAM]) + { + priv->current_vprogram_id = 0; + gl_info->gl_ops.gl.p_glDisable(GL_VERTEX_PROGRAM_ARB); + checkGLcall("glDisable(GL_VERTEX_PROGRAM_ARB)"); + } + priv->vertex_pipe->vp_enable(gl_info, TRUE); + } +} + + +/* Context activation is done by the caller. */ +static void shader_arb_disable(void *shader_priv, struct wined3d_context *context) +{ + const struct wined3d_gl_info *gl_info = context->gl_info; + struct shader_arb_priv *priv = shader_priv; + + if (gl_info->supported[ARB_FRAGMENT_PROGRAM]) + { + gl_info->gl_ops.gl.p_glDisable(GL_FRAGMENT_PROGRAM_ARB); + checkGLcall("glDisable(GL_FRAGMENT_PROGRAM_ARB)"); + priv->current_fprogram_id = 0; + } + priv->fragment_pipe->enable_extension(gl_info, FALSE); + + if (gl_info->supported[ARB_VERTEX_PROGRAM]) { priv->current_vprogram_id = 0; gl_info->gl_ops.gl.p_glDisable(GL_VERTEX_PROGRAM_ARB); checkGLcall("glDisable(GL_VERTEX_PROGRAM_ARB)"); } + priv->vertex_pipe->vp_enable(gl_info, FALSE); + + if (gl_info->supported[ARB_COLOR_BUFFER_FLOAT] && priv->last_vs_color_unclamp) + { + GL_EXTCALL(glClampColorARB(GL_CLAMP_VERTEX_COLOR_ARB, GL_FIXED_ONLY_ARB)); + checkGLcall("glClampColorARB"); + priv->last_vs_color_unclamp = FALSE; + } + + context->shader_update_mask = (1 << WINED3D_SHADER_TYPE_PIXEL) + | (1 << WINED3D_SHADER_TYPE_VERTEX) + | (1 << WINED3D_SHADER_TYPE_GEOMETRY); } /* Context activation is done by the caller. */ @@ -4888,32 +4931,42 @@ static const struct wine_rb_functions sig_tree_functions = sig_tree_compare }; -static HRESULT shader_arb_alloc(struct wined3d_device *device, const struct fragment_pipeline *fragment_pipe) +static HRESULT shader_arb_alloc(struct wined3d_device *device, const struct wined3d_vertex_pipe_ops *vertex_pipe, + const struct fragment_pipeline *fragment_pipe) { struct shader_arb_priv *priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*priv)); struct fragment_caps fragment_caps; - void *fragment_priv; + void *vertex_priv, *fragment_priv; + const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; + + if (!(vertex_priv = vertex_pipe->vp_alloc(&arb_program_shader_backend, priv))) + { + ERR("Failed to initialize vertex pipe.\n"); + HeapFree(GetProcessHeap(), 0, priv); + return E_FAIL; + } if (!(fragment_priv = fragment_pipe->alloc_private(&arb_program_shader_backend, priv))) { ERR("Failed to initialize fragment pipe.\n"); + vertex_pipe->vp_free(device); HeapFree(GetProcessHeap(), 0, priv); return E_FAIL; } priv->vshader_const_dirty = HeapAlloc(GetProcessHeap(), 0, - sizeof(*priv->vshader_const_dirty) * device->d3d_vshader_constantF); + sizeof(*priv->vshader_const_dirty) * d3d_info->limits.vs_uniform_count); if (!priv->vshader_const_dirty) goto fail; memset(priv->vshader_const_dirty, 1, - sizeof(*priv->vshader_const_dirty) * device->d3d_vshader_constantF); + sizeof(*priv->vshader_const_dirty) * d3d_info->limits.vs_uniform_count); priv->pshader_const_dirty = HeapAlloc(GetProcessHeap(), 0, - sizeof(*priv->pshader_const_dirty) * device->d3d_pshader_constantF); + sizeof(*priv->pshader_const_dirty) * d3d_info->limits.ps_uniform_count); if (!priv->pshader_const_dirty) goto fail; memset(priv->pshader_const_dirty, 1, - sizeof(*priv->pshader_const_dirty) * device->d3d_pshader_constantF); + sizeof(*priv->pshader_const_dirty) * d3d_info->limits.ps_uniform_count); if(wine_rb_init(&priv->signature_tree, &sig_tree_functions) == -1) { @@ -4921,17 +4974,22 @@ static HRESULT shader_arb_alloc(struct wined3d_device *device, const struct frag goto fail; } + priv->vertex_pipe = vertex_pipe; + priv->fragment_pipe = fragment_pipe; fragment_pipe->get_caps(&device->adapter->gl_info, &fragment_caps); priv->ffp_proj_control = fragment_caps.wined3d_caps & WINED3D_FRAGMENT_CAP_PROJ_CONTROL; + + device->vertex_priv = vertex_priv; device->fragment_priv = fragment_priv; - priv->fragment_pipe = fragment_pipe; device->shader_priv = priv; + return WINED3D_OK; fail: HeapFree(GetProcessHeap(), 0, priv->pshader_const_dirty); HeapFree(GetProcessHeap(), 0, priv->vshader_const_dirty); fragment_pipe->free_private(device); + vertex_pipe->vp_free(device); HeapFree(GetProcessHeap(), 0, priv); return E_OUTOFMEMORY; } @@ -4974,12 +5032,18 @@ static void shader_arb_free(struct wined3d_device *device) HeapFree(GetProcessHeap(), 0, priv->pshader_const_dirty); HeapFree(GetProcessHeap(), 0, priv->vshader_const_dirty); priv->fragment_pipe->free_private(device); + priv->vertex_pipe->vp_free(device); HeapFree(GetProcessHeap(), 0, device->shader_priv); } -static void shader_arb_context_destroyed(void *shader_priv, const struct wined3d_context *context) +static BOOL shader_arb_allocate_context_data(struct wined3d_context *context) { - struct shader_arb_priv *priv = shader_priv; + return TRUE; +} + +static void shader_arb_free_context_data(struct wined3d_context *context) +{ + struct shader_arb_priv *priv = context->swapchain->device->shader_priv; if (priv->last_context == context) priv->last_context = NULL; @@ -5648,16 +5712,17 @@ const struct wined3d_shader_backend_ops arb_program_shader_backend = { shader_arb_handle_instruction, shader_arb_select, + shader_arb_disable, shader_arb_select_depth_blt, shader_arb_deselect_depth_blt, shader_arb_update_float_vertex_constants, shader_arb_update_float_pixel_constants, shader_arb_load_constants, - shader_arb_load_np2fixup_constants, shader_arb_destroy, shader_arb_alloc, shader_arb_free, - shader_arb_context_destroyed, + shader_arb_allocate_context_data, + shader_arb_free_context_data, shader_arb_get_caps, shader_arb_color_fixup_supported, shader_arb_has_ffp_proj_control, @@ -5844,21 +5909,16 @@ static void set_bumpmat_arbfp(struct wined3d_context *context, const struct wine const struct wined3d_gl_info *gl_info = context->gl_info; float mat[2][2]; - if (use_ps(state)) - { - /* The pixel shader has to know the bump env matrix. Do a constants - * update. */ - if (stage && (state->pixel_shader->reg_maps.bumpmat & (1 << stage))) - context->load_constants = 1; + context->constant_update_mask |= WINED3D_SHADER_CONST_PS_BUMP_ENV; - if(device->shader_backend == &arb_program_shader_backend) { - /* Exit now, don't set the bumpmat below, otherwise we may overwrite pixel shader constants */ - return; - } - } - else if (device->shader_backend == &arb_program_shader_backend) + if (device->shader_backend == &arb_program_shader_backend) { struct shader_arb_priv *priv = device->shader_priv; + + /* Exit now, don't set the bumpmat below, otherwise we may overwrite pixel shader constants. */ + if (use_ps(state)) + return; + priv->pshader_const_dirty[ARB_FFP_CONST_BUMPMAT(stage)] = 1; priv->highest_dirty_ps_const = max(priv->highest_dirty_ps_const, ARB_FFP_CONST_BUMPMAT(stage) + 1); } @@ -5880,21 +5940,16 @@ static void tex_bumpenvlum_arbfp(struct wined3d_context *context, const struct wined3d_gl_info *gl_info = context->gl_info; float param[4]; - if (use_ps(state)) - { - /* The pixel shader has to know the luminance offset. Do a constants - * update. */ - if (stage && (state->pixel_shader->reg_maps.luminanceparams & (1 << stage))) - context->load_constants = 1; + context->constant_update_mask |= WINED3D_SHADER_CONST_PS_BUMP_ENV; - if(device->shader_backend == &arb_program_shader_backend) { - /* Exit now, don't set the bumpmat below, otherwise we may overwrite pixel shader constants */ - return; - } - } - else if (device->shader_backend == &arb_program_shader_backend) + if (device->shader_backend == &arb_program_shader_backend) { struct shader_arb_priv *priv = device->shader_priv; + + /* Exit now, don't set the bumpmat below, otherwise we may overwrite pixel shader constants. */ + if (use_ps(state)) + return; + priv->pshader_const_dirty[ARB_FFP_CONST_LUMINANCE(stage)] = 1; priv->highest_dirty_ps_const = max(priv->highest_dirty_ps_const, ARB_FFP_CONST_LUMINANCE(stage) + 1); } @@ -6129,6 +6184,7 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, con BOOL op_equal; const char *final_combiner_src = "ret"; GLint pos; + BOOL custom_linear_fog = FALSE; /* Find out which textures are read */ for (stage = 0; stage < MAX_TEXTURES; ++stage) @@ -6198,11 +6254,20 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, con shader_addline(&buffer, "!!ARBfp1.0\n"); - switch(settings->fog) { - case FOG_OFF: break; - case FOG_LINEAR: shader_addline(&buffer, "OPTION ARB_fog_linear;\n"); break; - case FOG_EXP: shader_addline(&buffer, "OPTION ARB_fog_exp;\n"); break; - case FOG_EXP2: shader_addline(&buffer, "OPTION ARB_fog_exp2;\n"); break; + switch (settings->fog) + { + case WINED3D_FFP_PS_FOG_OFF: break; + case WINED3D_FFP_PS_FOG_LINEAR: + if (gl_info->quirks & WINED3D_QUIRK_BROKEN_ARB_FOG) + { + custom_linear_fog = TRUE; + break; + } + shader_addline(&buffer, "OPTION ARB_fog_linear;\n"); + break; + + case WINED3D_FFP_PS_FOG_EXP: shader_addline(&buffer, "OPTION ARB_fog_exp;\n"); break; + case WINED3D_FFP_PS_FOG_EXP2: shader_addline(&buffer, "OPTION ARB_fog_exp2;\n"); break; default: FIXME("Unexpected fog setting %d\n", settings->fog); } @@ -6365,12 +6430,19 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, con } } - if(settings->sRGB_write) { + if (settings->sRGB_write || custom_linear_fog) + { shader_addline(&buffer, "MAD ret, fragment.color.secondary, specular_enable, %s;\n", final_combiner_src); - arbfp_add_sRGB_correction(&buffer, "ret", "arg0", "arg1", "arg2", "tempreg", FALSE); + if (settings->sRGB_write) + arbfp_add_sRGB_correction(&buffer, "ret", "arg0", "arg1", "arg2", "tempreg", FALSE); + if (custom_linear_fog) + arbfp_add_linear_fog(&buffer, "ret", "arg0"); shader_addline(&buffer, "MOV result.color, ret;\n"); - } else { - shader_addline(&buffer, "MAD result.color, fragment.color.secondary, specular_enable, %s;\n", final_combiner_src); + } + else + { + shader_addline(&buffer, "MAD result.color, fragment.color.secondary, specular_enable, %s;\n", + final_combiner_src); } /* Footer */ @@ -6430,7 +6502,7 @@ static void fragment_prog_arbfp(struct wined3d_context *context, const struct wi } else if (use_pshader) { - context->select_shader = 1; + context->shader_update_mask |= 1 << WINED3D_SHADER_TYPE_PIXEL; } return; } @@ -6439,7 +6511,7 @@ static void fragment_prog_arbfp(struct wined3d_context *context, const struct wi { /* Find or create a shader implementing the fixed function pipeline * settings, then activate it. */ - gen_ffp_frag_op(device, state, &settings, FALSE); + gen_ffp_frag_op(context, state, &settings, FALSE); desc = (const struct arbfp_ffp_desc *)find_ffp_frag_shader(&priv->fragment_shaders, &settings); if(!desc) { struct arbfp_ffp_desc *new_desc = HeapAlloc(GetProcessHeap(), 0, sizeof(*new_desc)); @@ -6480,8 +6552,7 @@ static void fragment_prog_arbfp(struct wined3d_context *context, const struct wi context->last_was_pshader = TRUE; } - context->select_shader = 1; - context->load_constants = 1; + context->shader_update_mask |= 1 << WINED3D_SHADER_TYPE_PIXEL; } /* We can't link the fog states to the fragment state directly since the @@ -6494,6 +6565,8 @@ static void fragment_prog_arbfp(struct wined3d_context *context, const struct wi static void state_arbfp_fog(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { enum fogsource new_source; + DWORD fogstart = state->render_states[WINED3D_RS_FOGSTART]; + DWORD fogend = state->render_states[WINED3D_RS_FOGEND]; TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id); @@ -6522,7 +6595,7 @@ static void state_arbfp_fog(struct wined3d_context *context, const struct wined3 new_source = FOGSOURCE_FFP; } - if (new_source != context->fog_source) + if (new_source != context->fog_source || fogstart == fogend) { context->fog_source = new_source; state_fogstartend(context, state, STATE_RENDER(WINED3D_RS_FOGSTART)); @@ -7032,18 +7105,12 @@ static void upload_palette(const struct wined3d_surface *surface, struct wined3d { BYTE table[256][4]; struct wined3d_device *device = surface->resource.device; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + const struct wined3d_gl_info *gl_info = context->gl_info; struct arbfp_blit_priv *priv = device->blit_priv; BOOL colorkey = (surface->CKeyFlags & WINEDDSD_CKSRCBLT) != 0; d3dfmt_p8_init_palette(surface, table, colorkey); - if (gl_info->supported[APPLE_CLIENT_STORAGE]) - { - gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE); - checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE)"); - } - if (!priv->palette_texture) gl_info->gl_ops.gl.p_glGenTextures(1, &priv->palette_texture); @@ -7060,12 +7127,6 @@ static void upload_palette(const struct wined3d_surface *surface, struct wined3d /* TODO: avoid unneeded uploads in the future by adding some SFLAG_PALETTE_DIRTY mechanism */ gl_info->gl_ops.gl.p_glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, table); - if (gl_info->supported[APPLE_CLIENT_STORAGE]) - { - gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE); - checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE)"); - } - /* Switch back to unit 0 in which the 2D texture will be stored. */ context_active_texture(context, gl_info, 0); } @@ -7233,8 +7294,8 @@ static HRESULT arbfp_blit_set(void *blit_priv, struct wined3d_context *context, const struct wined3d_gl_info *gl_info = context->gl_info; GLenum textype; - if (surface->container.type == WINED3D_CONTAINER_TEXTURE) - textype = surface->container.u.texture->target; + if (surface->container) + textype = surface->container->target; else textype = surface->texture_target; @@ -7417,8 +7478,7 @@ HRESULT arbfp_blit_surface(struct wined3d_device *device, DWORD filter, arbfp_blit_unset(context->gl_info); if (wined3d_settings.strict_draw_ordering - || (dst_surface->container.type == WINED3D_CONTAINER_SWAPCHAIN - && (dst_surface->container.u.swapchain->front_buffer == dst_surface))) + || (dst_surface->swapchain && (dst_surface->swapchain->front_buffer == dst_surface))) context->gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */ context_release(context); diff --git a/dll/directx/wine/wined3d/ati_fragment_shader.c b/dll/directx/wine/wined3d/ati_fragment_shader.c index a8e4dfb3dcd..be679ddc555 100644 --- a/dll/directx/wine/wined3d/ati_fragment_shader.c +++ b/dll/directx/wine/wined3d/ati_fragment_shader.c @@ -838,13 +838,14 @@ static void set_tex_op_atifs(struct wined3d_context *context, const struct wined { const struct wined3d_device *device = context->swapchain->device; const struct wined3d_gl_info *gl_info = context->gl_info; + const struct wined3d_d3d_info *d3d_info = context->d3d_info; const struct atifs_ffp_desc *desc; struct ffp_frag_settings settings; struct atifs_private_data *priv = device->fragment_priv; DWORD mapped_stage; unsigned int i; - gen_ffp_frag_op(device, state, &settings, TRUE); + gen_ffp_frag_op(context, state, &settings, TRUE); desc = (const struct atifs_ffp_desc *)find_ffp_frag_shader(&priv->fragment_shaders, &settings); if(!desc) { struct atifs_ffp_desc *new_desc = HeapAlloc(GetProcessHeap(), 0, sizeof(*new_desc)); @@ -854,7 +855,7 @@ static void set_tex_op_atifs(struct wined3d_context *context, const struct wined return; } new_desc->num_textures_used = 0; - for (i = 0; i < gl_info->limits.texture_stages; ++i) + for (i = 0; i < d3d_info->limits.ffp_blend_stages; ++i) { if (settings.op[i].cop == WINED3D_TOP_DISABLE) break; @@ -941,8 +942,7 @@ static void atifs_apply_pixelshader(struct wined3d_context *context, const struc * startup, and blitting disables all shaders and dirtifies all shader * states. If atifs can deal with this it keeps the rest of the code * simpler. */ - context->select_shader = 1; - context->load_constants = 1; + context->shader_update_mask |= 1 << WINED3D_SHADER_TYPE_PIXEL; } static void atifs_srgbwriteenable(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) @@ -1166,10 +1166,9 @@ static void *atifs_alloc(const struct wined3d_shader_backend_ops *shader_backend } /* Context activation is done by the caller. */ -static void atifs_free_ffpshader(struct wine_rb_entry *entry, void *context) +static void atifs_free_ffpshader(struct wine_rb_entry *entry, void *cb_ctx) { - struct wined3d_device *device = context; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + const struct wined3d_gl_info *gl_info = cb_ctx; struct atifs_ffp_desc *entry_ati = WINE_RB_ENTRY_VALUE(entry, struct atifs_ffp_desc, parent.entry); GL_EXTCALL(glDeleteFragmentShaderATI(entry_ati->shader)); @@ -1182,7 +1181,7 @@ static void atifs_free(struct wined3d_device *device) { struct atifs_private_data *priv = device->fragment_priv; - wine_rb_destroy(&priv->fragment_shaders, atifs_free_ffpshader, device); + wine_rb_destroy(&priv->fragment_shaders, atifs_free_ffpshader, &device->adapter->gl_info); HeapFree(GetProcessHeap(), 0, priv); device->fragment_priv = NULL; diff --git a/dll/directx/wine/wined3d/buffer.c b/dll/directx/wine/wined3d/buffer.c index 0fc122dbaa0..4e95fe2cc66 100644 --- a/dll/directx/wine/wined3d/buffer.c +++ b/dll/directx/wine/wined3d/buffer.c @@ -3,7 +3,7 @@ * Copyright 2002-2005 Raphael Junqueira * Copyright 2004 Christian Costa * Copyright 2005 Oliver Stieber - * Copyright 2007-2010 Stefan Dösinger for CodeWeavers + * Copyright 2007-2011, 2013 Stefan Dösinger for CodeWeavers * Copyright 2009-2010 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or @@ -29,46 +29,53 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d); +#define WINED3D_BUFFER_HASDESC 0x01 /* A vertex description has been found. */ +#define WINED3D_BUFFER_CREATEBO 0x02 /* Create a buffer object for this buffer. */ +#define WINED3D_BUFFER_DOUBLEBUFFER 0x04 /* Keep both a buffer object and a system memory copy for this buffer. */ +#define WINED3D_BUFFER_FLUSH 0x08 /* Manual unmap flushing. */ +#define WINED3D_BUFFER_DISCARD 0x10 /* A DISCARD lock has occurred since the last preload. */ +#define WINED3D_BUFFER_NOSYNC 0x20 /* All locks since the last preload had NOOVERWRITE set. */ +#define WINED3D_BUFFER_APPLESYNC 0x40 /* Using sync as in GL_APPLE_flush_buffer_range. */ + #define VB_MAXDECLCHANGES 100 /* After that number of decl changes we stop converting */ #define VB_RESETDECLCHANGE 1000 /* Reset the decl changecount after that number of draws */ #define VB_MAXFULLCONVERSIONS 5 /* Number of full conversions before we stop converting */ #define VB_RESETFULLCONVS 20 /* Reset full conversion counts after that number of draws */ -static inline BOOL buffer_add_dirty_area(struct wined3d_buffer *This, UINT offset, UINT size) +static void buffer_invalidate_bo_range(struct wined3d_buffer *buffer, UINT offset, UINT size) { - if (!This->buffer_object) return TRUE; + if (!offset && !size) + goto invalidate_all; - if (This->maps_size <= This->modified_areas) + if (offset > buffer->resource.size || offset + size > buffer->resource.size) { - void *new = HeapReAlloc(GetProcessHeap(), 0, This->maps, - This->maps_size * 2 * sizeof(*This->maps)); - if (!new) + WARN("Invalid range specified, invalidating entire buffer.\n"); + goto invalidate_all; + } + + if (buffer->modified_areas >= buffer->maps_size) + { + struct wined3d_map_range *new; + + if (!(new = HeapReAlloc(GetProcessHeap(), 0, buffer->maps, 2 * buffer->maps_size * sizeof(*buffer->maps)))) { - ERR("Out of memory\n"); - return FALSE; - } - else - { - This->maps = new; - This->maps_size *= 2; + ERR("Failed to allocate maps array, invalidating entire buffer.\n"); + goto invalidate_all; } + + buffer->maps = new; + buffer->maps_size *= 2; } - if(offset > This->resource.size || offset + size > This->resource.size) - { - WARN("Invalid range dirtified, marking entire buffer dirty\n"); - offset = 0; - size = This->resource.size; - } - else if(!offset && !size) - { - size = This->resource.size; - } + buffer->maps[buffer->modified_areas].offset = offset; + buffer->maps[buffer->modified_areas].size = size; + ++buffer->modified_areas; + return; - This->maps[This->modified_areas].offset = offset; - This->maps[This->modified_areas].size = size; - This->modified_areas++; - return TRUE; +invalidate_all: + buffer->modified_areas = 1; + buffer->maps[0].offset = 0; + buffer->maps[0].size = buffer->resource.size; } static inline void buffer_clear_dirty_areas(struct wined3d_buffer *This) @@ -113,7 +120,8 @@ static void delete_gl_buffer(struct wined3d_buffer *This, const struct wined3d_g /* Context activation is done by the caller. */ static void buffer_create_buffer_object(struct wined3d_buffer *This, const struct wined3d_gl_info *gl_info) { - GLenum error, gl_usage; + GLenum gl_usage = GL_STATIC_DRAW_ARB; + GLenum error; TRACE("Creating an OpenGL vertex buffer object for wined3d_buffer %p with usage %s.\n", This, debug_d3dusage(This->resource.usage)); @@ -149,12 +157,9 @@ static void buffer_create_buffer_object(struct wined3d_buffer *This, const struc goto fail; } - /* Don't use static, because dx apps tend to update the buffer - * quite often even if they specify 0 usage. - */ - if(This->resource.usage & WINED3DUSAGE_DYNAMIC) + if (This->resource.usage & WINED3DUSAGE_DYNAMIC) { - TRACE("Gl usage = GL_STREAM_DRAW_ARB\n"); + TRACE("Buffer has WINED3DUSAGE_DYNAMIC set.\n"); gl_usage = GL_STREAM_DRAW_ARB; if(gl_info->supported[APPLE_FLUSH_BUFFER_RANGE]) @@ -169,11 +174,6 @@ static void buffer_create_buffer_object(struct wined3d_buffer *This, const struc } /* No setup is needed here for GL_ARB_map_buffer_range */ } - else - { - TRACE("Gl usage = GL_DYNAMIC_DRAW_ARB\n"); - gl_usage = GL_DYNAMIC_DRAW_ARB; - } /* Reserve memory for the buffer. The amount of data won't change * so we are safe with calling glBufferData once and @@ -191,19 +191,15 @@ static void buffer_create_buffer_object(struct wined3d_buffer *This, const struc This->buffer_object_size = This->resource.size; This->buffer_object_usage = gl_usage; - if(This->flags & WINED3D_BUFFER_DOUBLEBUFFER) + if (This->flags & WINED3D_BUFFER_DOUBLEBUFFER) { - if(!buffer_add_dirty_area(This, 0, 0)) - { - ERR("buffer_add_dirty_area failed, this is not expected\n"); - goto fail; - } + buffer_invalidate_bo_range(This, 0, 0); } else { - HeapFree(GetProcessHeap(), 0, This->resource.heapMemory); + wined3d_resource_free_sysmem(This->resource.heap_memory); This->resource.allocatedMemory = NULL; - This->resource.heapMemory = NULL; + This->resource.heap_memory = NULL; } return; @@ -273,7 +269,7 @@ static BOOL buffer_process_converted_attribute(struct wined3d_buffer *This, } static BOOL buffer_check_attribute(struct wined3d_buffer *This, const struct wined3d_stream_info *si, - UINT attrib_idx, const BOOL check_d3dcolor, const BOOL is_ffp_position, const BOOL is_ffp_color, + UINT attrib_idx, const BOOL check_d3dcolor, const BOOL check_position, const BOOL is_ffp_color, DWORD *stride_this_run) { const struct wined3d_stream_info_element *attrib = &si->elements[attrib_idx]; @@ -295,7 +291,7 @@ static BOOL buffer_check_attribute(struct wined3d_buffer *This, const struct win if (!is_ffp_color) FIXME("Test for non-color fixed function WINED3DFMT_B8G8R8A8_UNORM format\n"); } - else if (is_ffp_position && si->position_transformed) + else if (check_position && si->position_transformed) { if (format != WINED3DFMT_R32G32B32A32_FLOAT) { @@ -316,12 +312,13 @@ static BOOL buffer_check_attribute(struct wined3d_buffer *This, const struct win static BOOL buffer_find_decl(struct wined3d_buffer *This) { struct wined3d_device *device = This->resource.device; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - const struct wined3d_stream_info *si = &device->strided_streams; - const struct wined3d_state *state = &device->stateBlock->state; + const struct wined3d_adapter *adapter = device->adapter; + const struct wined3d_stream_info *si = &device->stream_info; + const struct wined3d_state *state = &device->state; + BOOL support_d3dcolor = adapter->gl_info.supported[ARB_VERTEX_ARRAY_BGRA]; + BOOL support_xyzrhw = adapter->d3d_info.xyzrhw; UINT stride_this_run = 0; BOOL ret = FALSE; - BOOL support_d3dcolor = gl_info->supported[ARB_VERTEX_ARRAY_BGRA]; /* In d3d7 the vertex buffer declaration NEVER changes because it is stored in the d3d7 vertex buffer. * Once we have our declaration there is no need to look it up again. Index buffers also never need @@ -393,7 +390,7 @@ static BOOL buffer_find_decl(struct wined3d_buffer *This) */ ret = buffer_check_attribute(This, si, WINED3D_FFP_POSITION, - TRUE, TRUE, FALSE, &stride_this_run) || ret; + TRUE, !support_xyzrhw, FALSE, &stride_this_run) || ret; ret = buffer_check_attribute(This, si, WINED3D_FFP_NORMAL, TRUE, FALSE, FALSE, &stride_this_run) || ret; ret = buffer_check_attribute(This, si, WINED3D_FFP_DIFFUSE, @@ -503,8 +500,8 @@ BYTE *buffer_get_sysmem(struct wined3d_buffer *This, const struct wined3d_gl_inf /* AllocatedMemory exists if the buffer is double buffered or has no buffer object at all */ if(This->resource.allocatedMemory) return This->resource.allocatedMemory; - This->resource.heapMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->resource.size + RESOURCE_ALIGNMENT); - This->resource.allocatedMemory = (BYTE *)(((ULONG_PTR)This->resource.heapMemory + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1)); + This->resource.heap_memory = wined3d_resource_allocate_sysmem(This->resource.size); + This->resource.allocatedMemory = This->resource.heap_memory; if (This->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB) device_invalidate_state(This->resource.device, STATE_INDEXBUFFER); @@ -557,12 +554,21 @@ static void buffer_unload(struct wined3d_resource *resource) ULONG CDECL wined3d_buffer_decref(struct wined3d_buffer *buffer) { ULONG refcount = InterlockedDecrement(&buffer->resource.ref); + struct wined3d_context *context; TRACE("%p decreasing refcount to %u.\n", buffer, refcount); if (!refcount) { - buffer_unload(&buffer->resource); + if (buffer->buffer_object) + { + context = context_acquire(buffer->resource.device, NULL); + delete_gl_buffer(buffer, context->gl_info); + context_release(context); + + HeapFree(GetProcessHeap(), 0, buffer->conversion_map); + } + resource_cleanup(&buffer->resource); buffer->resource.parent_ops->wined3d_object_destroyed(buffer->resource.parent); HeapFree(GetProcessHeap(), 0, buffer->maps); @@ -805,14 +811,10 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer) return; } - /* The declaration changed, reload the whole buffer */ - WARN("Reloading buffer because of decl change\n"); - buffer_clear_dirty_areas(buffer); - if (!buffer_add_dirty_area(buffer, 0, 0)) - { - ERR("buffer_add_dirty_area failed, this is not expected\n"); - return; - } + /* The declaration changed, reload the whole buffer. */ + WARN("Reloading buffer because of a vertex declaration change.\n"); + buffer_invalidate_bo_range(buffer, 0, 0); + /* Avoid unfenced updates, we might overwrite more areas of the buffer than the application * cleared for unsynchronized updates */ @@ -928,56 +930,6 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer) context_release(context); } -static DWORD buffer_sanitize_flags(const struct wined3d_buffer *buffer, DWORD flags) -{ - /* Not all flags make sense together, but Windows never returns an error. - * Catch the cases that could cause issues. */ - if (flags & WINED3D_MAP_READONLY) - { - if (flags & WINED3D_MAP_DISCARD) - { - WARN("WINED3D_MAP_READONLY combined with WINED3D_MAP_DISCARD, ignoring flags.\n"); - return 0; - } - if (flags & WINED3D_MAP_NOOVERWRITE) - { - WARN("WINED3D_MAP_READONLY combined with WINED3D_MAP_NOOVERWRITE, ignoring flags.\n"); - return 0; - } - } - else if ((flags & (WINED3D_MAP_DISCARD | WINED3D_MAP_NOOVERWRITE)) - == (WINED3D_MAP_DISCARD | WINED3D_MAP_NOOVERWRITE)) - { - WARN("WINED3D_MAP_DISCARD and WINED3D_MAP_NOOVERWRITE used together, ignoring.\n"); - return 0; - } - else if (flags & (WINED3D_MAP_DISCARD | WINED3D_MAP_NOOVERWRITE) - && !(buffer->resource.usage & WINED3DUSAGE_DYNAMIC)) - { - WARN("DISCARD or NOOVERWRITE map on non-dynamic buffer, ignoring.\n"); - return 0; - } - - return flags; -} - -static GLbitfield buffer_gl_map_flags(DWORD d3d_flags) -{ - GLbitfield ret = 0; - - if (!(d3d_flags & WINED3D_MAP_READONLY)) - ret |= GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT; - if (!(d3d_flags & (WINED3D_MAP_DISCARD | WINED3D_MAP_NOOVERWRITE))) - ret |= GL_MAP_READ_BIT; - - if (d3d_flags & WINED3D_MAP_DISCARD) - ret |= GL_MAP_INVALIDATE_BUFFER_BIT; - if (d3d_flags & WINED3D_MAP_NOOVERWRITE) - ret |= GL_MAP_UNSYNCHRONIZED_BIT; - - return ret; -} - struct wined3d_resource * CDECL wined3d_buffer_get_resource(struct wined3d_buffer *buffer) { TRACE("buffer %p.\n", buffer); @@ -992,29 +944,20 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN TRACE("buffer %p, offset %u, size %u, data %p, flags %#x\n", buffer, offset, size, data, flags); - flags = buffer_sanitize_flags(buffer, flags); - if (!(flags & WINED3D_MAP_READONLY)) - { - if (flags & WINED3D_MAP_DISCARD) - { - /* DISCARD invalidates the entire buffer, regardless of the - * specified offset and size. Some applications also depend on the - * entire buffer being uploaded in that case. Two such - * applications are Port Royale and Darkstar One. */ - if (!buffer_add_dirty_area(buffer, 0, 0)) - return E_OUTOFMEMORY; - } - else - { - if (!buffer_add_dirty_area(buffer, offset, size)) - return E_OUTOFMEMORY; - } - } - + flags = wined3d_resource_sanitize_map_flags(&buffer->resource, flags); count = ++buffer->resource.map_count; if (buffer->buffer_object) { + /* DISCARD invalidates the entire buffer, regardless of the specified + * offset and size. Some applications also depend on the entire buffer + * being uploaded in that case. Two such applications are Port Royale + * and Darkstar One. */ + if (flags & WINED3D_MAP_DISCARD) + buffer_invalidate_bo_range(buffer, 0, 0); + else if (!(flags & WINED3D_MAP_READONLY)) + buffer_invalidate_bo_range(buffer, offset, size); + if (!(buffer->flags & WINED3D_BUFFER_DOUBLEBUFFER)) { if (count == 1) @@ -1032,7 +975,7 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) { - GLbitfield mapflags = buffer_gl_map_flags(flags); + GLbitfield mapflags = wined3d_resource_gl_map_flags(flags); buffer->resource.allocatedMemory = GL_EXTCALL(glMapBufferRange(buffer->buffer_type_hint, 0, buffer->resource.size, mapflags)); checkGLcall("glMapBufferRange"); diff --git a/dll/directx/wine/wined3d/context.c b/dll/directx/wine/wined3d/context.c index 43b87187fa8..84b5b587c08 100644 --- a/dll/directx/wine/wined3d/context.c +++ b/dll/directx/wine/wined3d/context.c @@ -1,7 +1,7 @@ /* * Context and render target management in wined3d * - * Copyright 2007-2008 Stefan Dösinger for CodeWeavers + * Copyright 2007-2011, 2013 Stefan Dösinger for CodeWeavers * Copyright 2009-2011 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or @@ -30,49 +30,37 @@ #include "wined3d_private.h" WINE_DEFAULT_DEBUG_CHANNEL(d3d); +WINE_DECLARE_DEBUG_CHANNEL(d3d_perf); +WINE_DECLARE_DEBUG_CHANNEL(d3d_synchronous); + +#define WINED3D_MAX_FBO_ENTRIES 64 static DWORD wined3d_context_tls_idx; /* FBO helper functions */ /* Context activation is done by the caller. */ -static void context_bind_fbo(struct wined3d_context *context, GLenum target, GLuint *fbo) +static void context_bind_fbo(struct wined3d_context *context, GLenum target, GLuint fbo) { const struct wined3d_gl_info *gl_info = context->gl_info; - GLuint f; - - if (!fbo) - { - f = 0; - } - else - { - if (!*fbo) - { - gl_info->fbo_ops.glGenFramebuffers(1, fbo); - checkGLcall("glGenFramebuffers()"); - TRACE("Created FBO %u.\n", *fbo); - } - f = *fbo; - } switch (target) { case GL_READ_FRAMEBUFFER: - if (context->fbo_read_binding == f) return; - context->fbo_read_binding = f; + if (context->fbo_read_binding == fbo) return; + context->fbo_read_binding = fbo; break; case GL_DRAW_FRAMEBUFFER: - if (context->fbo_draw_binding == f) return; - context->fbo_draw_binding = f; + if (context->fbo_draw_binding == fbo) return; + context->fbo_draw_binding = fbo; break; case GL_FRAMEBUFFER: - if (context->fbo_read_binding == f - && context->fbo_draw_binding == f) return; - context->fbo_read_binding = f; - context->fbo_draw_binding = f; + if (context->fbo_read_binding == fbo + && context->fbo_draw_binding == fbo) return; + context->fbo_read_binding = fbo; + context->fbo_draw_binding = fbo; break; default: @@ -80,7 +68,7 @@ static void context_bind_fbo(struct wined3d_context *context, GLenum target, GLu break; } - gl_info->fbo_ops.glBindFramebuffer(target, f); + gl_info->fbo_ops.glBindFramebuffer(target, fbo); checkGLcall("glBindFramebuffer()"); } @@ -102,15 +90,15 @@ static void context_clean_fbo_attachments(const struct wined3d_gl_info *gl_info, } /* Context activation is done by the caller. */ -static void context_destroy_fbo(struct wined3d_context *context, GLuint *fbo) +static void context_destroy_fbo(struct wined3d_context *context, GLuint fbo) { const struct wined3d_gl_info *gl_info = context->gl_info; context_bind_fbo(context, GL_FRAMEBUFFER, fbo); context_clean_fbo_attachments(gl_info, GL_FRAMEBUFFER); - context_bind_fbo(context, GL_FRAMEBUFFER, NULL); + context_bind_fbo(context, GL_FRAMEBUFFER, 0); - gl_info->fbo_ops.glDeleteFramebuffers(1, fbo); + gl_info->fbo_ops.glDeleteFramebuffers(1, &fbo); checkGLcall("glDeleteFramebuffers()"); } @@ -336,7 +324,9 @@ static struct fbo_entry *context_create_fbo_entry(const struct wined3d_context * entry->location = location; entry->rt_mask = context_generate_rt_mask(GL_COLOR_ATTACHMENT0); entry->attached = FALSE; - entry->id = 0; + gl_info->fbo_ops.glGenFramebuffers(1, &entry->id); + checkGLcall("glGenFramebuffers()"); + TRACE("Created FBO %u.\n", entry->id); return entry; } @@ -348,7 +338,7 @@ static void context_reuse_fbo_entry(struct wined3d_context *context, GLenum targ { const struct wined3d_gl_info *gl_info = context->gl_info; - context_bind_fbo(context, target, &entry->id); + context_bind_fbo(context, target, entry->id); context_clean_fbo_attachments(gl_info, target); memcpy(entry->render_targets, render_targets, gl_info->limits.buffers * sizeof(*entry->render_targets)); @@ -362,8 +352,8 @@ static void context_destroy_fbo_entry(struct wined3d_context *context, struct fb { if (entry->id) { - TRACE("Destroy FBO %d\n", entry->id); - context_destroy_fbo(context, &entry->id); + TRACE("Destroy FBO %u.\n", entry->id); + context_destroy_fbo(context, entry->id); } --context->fbo_entry_count; list_remove(&entry->entry); @@ -422,10 +412,17 @@ static void context_apply_fbo_entry(struct wined3d_context *context, GLenum targ { const struct wined3d_gl_info *gl_info = context->gl_info; unsigned int i; + GLuint read_binding, draw_binding; - context_bind_fbo(context, target, &entry->id); + if (entry->attached) + { + context_bind_fbo(context, target, entry->id); + return; + } - if (entry->attached) return; + read_binding = context->fbo_read_binding; + draw_binding = context->fbo_draw_binding; + context_bind_fbo(context, GL_FRAMEBUFFER, entry->id); /* Apply render targets */ for (i = 0; i < gl_info->limits.buffers; ++i) @@ -438,6 +435,18 @@ static void context_apply_fbo_entry(struct wined3d_context *context, GLenum targ surface_set_compatible_renderbuffer(entry->depth_stencil, entry->render_targets[0]); context_attach_depth_stencil_fbo(context, target, entry->depth_stencil, entry->location); + /* Set valid read and draw buffer bindings to satisfy pedantic pre-ES2_compatibility + * GL contexts requirements. */ + glReadBuffer(GL_NONE); + context_set_draw_buffer(context, GL_NONE); + if (target != GL_FRAMEBUFFER) + { + if (target == GL_READ_FRAMEBUFFER) + context_bind_fbo(context, GL_DRAW_FRAMEBUFFER, draw_binding); + else + context_bind_fbo(context, GL_READ_FRAMEBUFFER, read_binding); + } + entry->attached = TRUE; } @@ -454,14 +463,14 @@ static void context_apply_fbo_state(struct wined3d_context *context, GLenum targ if (context->rebind_fbo) { - context_bind_fbo(context, GL_FRAMEBUFFER, NULL); + context_bind_fbo(context, GL_FRAMEBUFFER, 0); context->rebind_fbo = FALSE; } if (location == SFLAG_INDRAWABLE) { context->current_fbo = NULL; - context_bind_fbo(context, target, NULL); + context_bind_fbo(context, target, 0); } else { @@ -1257,6 +1266,37 @@ static void bind_dummy_textures(const struct wined3d_device *device, const struc } } +BOOL context_debug_output_enabled(const struct wined3d_gl_info *gl_info) +{ + return gl_info->supported[ARB_DEBUG_OUTPUT] + && (ERR_ON(d3d) || FIXME_ON(d3d) || WARN_ON(d3d_perf)); +} + +static void WINE_GLAPI wined3d_debug_callback(GLenum source, GLenum type, GLuint id, + GLenum severity, GLsizei length, const char *message, void *ctx) +{ + switch (type) + { + case GL_DEBUG_TYPE_ERROR_ARB: + ERR("%p: %s.\n", ctx, debugstr_an(message, length)); + break; + + case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB: + case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB: + case GL_DEBUG_TYPE_PORTABILITY_ARB: + FIXME("%p: %s.\n", ctx, debugstr_an(message, length)); + break; + + case GL_DEBUG_TYPE_PERFORMANCE_ARB: + WARN_(d3d_perf)("%p: %s.\n", ctx, debugstr_an(message, length)); + break; + + default: + FIXME("ctx %p, type %#x: %s.\n", ctx, type, debugstr_an(message, length)); + break; + } +} + /* Do not call while under the GL lock. */ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, struct wined3d_surface *target, const struct wined3d_format *ds_format) @@ -1266,11 +1306,11 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, const struct wined3d_format *color_format; struct wined3d_context *ret; BOOL auxBuffers = FALSE; + HGLRC ctx, share_ctx; int pixel_format; unsigned int s; int swap_interval; DWORD state; - HGLRC ctx; HDC hdc; TRACE("swapchain %p, target %p, window %p.\n", swapchain, target, swapchain->win_handle); @@ -1307,6 +1347,12 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, list_init(&ret->fbo_list); list_init(&ret->fbo_destroy_list); + if (!device->shader_backend->shader_allocate_context_data(ret)) + { + ERR("Failed to allocate shader backend context data.\n"); + goto out; + } + if (!(hdc = GetDC(swapchain->win_handle))) { WARN("Failed to retireve device context, trying swapchain backup.\n"); @@ -1367,19 +1413,38 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, goto out; } - if (!(ctx = wglCreateContext(hdc))) + share_ctx = device->context_count ? device->contexts[0]->glCtx : NULL; + if (gl_info->p_wglCreateContextAttribsARB) { - ERR("Failed to create a WGL context.\n"); - context_release(ret); - goto out; - } + unsigned int ctx_attrib_idx = 0; + GLint ctx_attribs[3]; - if (device->context_count) - { - if (!wglShareLists(device->contexts[0]->glCtx, ctx)) + if (context_debug_output_enabled(gl_info)) { - ERR("wglShareLists(%p, %p) failed, last error %#x.\n", - device->contexts[0]->glCtx, ctx, GetLastError()); + ctx_attribs[ctx_attrib_idx++] = WGL_CONTEXT_FLAGS_ARB; + ctx_attribs[ctx_attrib_idx++] = WGL_CONTEXT_DEBUG_BIT_ARB; + } + ctx_attribs[ctx_attrib_idx] = 0; + + if (!(ctx = gl_info->p_wglCreateContextAttribsARB(hdc, share_ctx, ctx_attribs))) + { + ERR("Failed to create a WGL context.\n"); + context_release(ret); + goto out; + } + } + else + { + if (!(ctx = wglCreateContext(hdc))) + { + ERR("Failed to create a WGL context.\n"); + context_release(ret); + goto out; + } + + if (share_ctx && !wglShareLists(share_ctx, ctx)) + { + ERR("wglShareLists(%p, %p) failed, last error %#x.\n", share_ctx, ctx, GetLastError()); context_release(ret); if (!wglDeleteContext(ctx)) ERR("wglDeleteContext(%p) failed, last error %#x.\n", ctx, GetLastError()); @@ -1397,6 +1462,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, } ret->gl_info = gl_info; + ret->d3d_info = &device->adapter->d3d_info; ret->state_table = device->StateTable; /* Mark all states dirty to force a proper initialization of the states @@ -1431,6 +1497,33 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, goto out; } + if (context_debug_output_enabled(gl_info)) + { + GL_EXTCALL(glDebugMessageCallbackARB(wined3d_debug_callback, ret)); + if (TRACE_ON(d3d_synchronous)) + gl_info->gl_ops.gl.p_glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB); + GL_EXTCALL(glDebugMessageControlARB(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, NULL, GL_FALSE)); + if (ERR_ON(d3d)) + { + GL_EXTCALL(glDebugMessageControlARB(GL_DONT_CARE, GL_DEBUG_TYPE_ERROR_ARB, + GL_DONT_CARE, 0, NULL, GL_TRUE)); + } + if (FIXME_ON(d3d)) + { + GL_EXTCALL(glDebugMessageControlARB(GL_DONT_CARE, GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB, + GL_DONT_CARE, 0, NULL, GL_TRUE)); + GL_EXTCALL(glDebugMessageControlARB(GL_DONT_CARE, GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB, + GL_DONT_CARE, 0, NULL, GL_TRUE)); + GL_EXTCALL(glDebugMessageControlARB(GL_DONT_CARE, GL_DEBUG_TYPE_PORTABILITY_ARB, + GL_DONT_CARE, 0, NULL, GL_TRUE)); + } + if (WARN_ON(d3d_perf)) + { + GL_EXTCALL(glDebugMessageControlARB(GL_DONT_CARE, GL_DEBUG_TYPE_PERFORMANCE_ARB, + GL_DONT_CARE, 0, NULL, GL_TRUE)); + } + } + switch (swapchain->desc.swap_interval) { case WINED3DPRESENT_INTERVAL_IMMEDIATE: @@ -1464,14 +1557,6 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, gl_info->gl_ops.gl.p_glGetIntegerv(GL_AUX_BUFFERS, &ret->aux_buffers); TRACE("Setting up the screen\n"); - /* Clear the screen */ - gl_info->gl_ops.gl.p_glClearColor(1.0f, 0.0f, 0.0f, 0.0f); - checkGLcall("glClearColor"); - gl_info->gl_ops.gl.p_glClearIndex(0); - gl_info->gl_ops.gl.p_glClearDepth(1); - gl_info->gl_ops.gl.p_glClearStencil(0xffff); - - checkGLcall("glClear"); gl_info->gl_ops.gl.p_glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE); checkGLcall("glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE);"); @@ -1487,13 +1572,6 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_ALIGNMENT, device->surface_alignment); checkGLcall("glPixelStorei(GL_UNPACK_ALIGNMENT, device->surface_alignment);"); - if (gl_info->supported[APPLE_CLIENT_STORAGE]) - { - /* Most textures will use client storage if supported. Exceptions are - * non-native power of 2 textures and textures in DIB sections. */ - gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE); - checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE)"); - } if (gl_info->supported[ARB_VERTEX_BLEND]) { /* Direct3D always uses n-1 weights for n world matrices and uses @@ -1554,7 +1632,9 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, { GL_EXTCALL(glProvokingVertexEXT(GL_FIRST_VERTEX_CONVENTION_EXT)); } - ret->select_shader = 1; + ret->shader_update_mask = (1 << WINED3D_SHADER_TYPE_PIXEL) + | (1 << WINED3D_SHADER_TYPE_VERTEX) + | (1 << WINED3D_SHADER_TYPE_GEOMETRY); /* If this happens to be the first context for the device, dummy textures * are not created yet. In that case, they will be created (and bound) by @@ -1567,6 +1647,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, return ret; out: + device->shader_backend->shader_free_context_data(ret); HeapFree(GetProcessHeap(), 0, ret->free_event_queries); HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries); HeapFree(GetProcessHeap(), 0, ret->draw_buffers); @@ -1599,6 +1680,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont destroy = FALSE; } + device->shader_backend->shader_free_context_data(context); HeapFree(GetProcessHeap(), 0, context->draw_buffers); HeapFree(GetProcessHeap(), 0, context->blit_targets); device_context_remove(device, context); @@ -1628,8 +1710,7 @@ static void context_get_rt_size(const struct wined3d_context *context, SIZE *siz { const struct wined3d_surface *rt = context->current_rt; - if (rt->container.type == WINED3D_CONTAINER_SWAPCHAIN - && rt->container.u.swapchain->front_buffer == rt) + if (rt->swapchain && rt->swapchain->front_buffer == rt) { RECT window_size; @@ -1831,9 +1912,7 @@ static void SetupForBlit(const struct wined3d_device *device, struct wined3d_con set_blit_dimension(gl_info, rt_size.cx, rt_size.cy); /* Disable shaders */ - device->shader_backend->shader_select(context, WINED3D_SHADER_MODE_NONE, WINED3D_SHADER_MODE_NONE); - context->select_shader = 1; - context->load_constants = 1; + device->shader_backend->shader_disable(device->shader_priv, context); context->blit_w = rt_size.cx; context->blit_h = rt_size.cy; @@ -1905,13 +1984,16 @@ static void context_apply_draw_buffers(struct wined3d_context *context, DWORD rt void context_set_draw_buffer(struct wined3d_context *context, GLenum buffer) { const struct wined3d_gl_info *gl_info = context->gl_info; + DWORD *current_mask = context->current_fbo ? &context->current_fbo->rt_mask : &context->draw_buffers_mask; + DWORD new_mask = context_generate_rt_mask(buffer); + + if (new_mask == *current_mask) + return; gl_info->gl_ops.gl.p_glDrawBuffer(buffer); checkGLcall("glDrawBuffer()"); - if (context->current_fbo) - context->current_fbo->rt_mask = context_generate_rt_mask(buffer); - else - context->draw_buffers_mask = context_generate_rt_mask(buffer); + + *current_mask = new_mask; } /* Context activation is done by the caller. */ @@ -2006,7 +2088,7 @@ static void context_validate_onscreen_formats(struct wined3d_context *context, const struct wined3d_surface *depth_stencil) { /* Onscreen surfaces are always in a swapchain */ - struct wined3d_swapchain *swapchain = context->current_rt->container.u.swapchain; + struct wined3d_swapchain *swapchain = context->current_rt->swapchain; if (context->render_offscreen || !depth_stencil) return; if (match_depth_stencil_format(swapchain->ds_format, depth_stencil->resource.format)) return; @@ -2027,7 +2109,7 @@ static DWORD context_generate_rt_mask_no_fbo(const struct wined3d_device *device { if (!rt || rt->resource.format->id == WINED3DFMT_NULL) return 0; - else if (rt->container.type == WINED3D_CONTAINER_SWAPCHAIN) + else if (rt->swapchain) return context_generate_rt_mask_from_surface(rt); else return context_generate_rt_mask(device->offscreenBuffer); @@ -2055,7 +2137,8 @@ void context_apply_blit_state(struct wined3d_context *context, const struct wine } else { - context_bind_fbo(context, GL_FRAMEBUFFER, NULL); + context->current_fbo = NULL; + context_bind_fbo(context, GL_FRAMEBUFFER, 0); rt_mask = context_generate_rt_mask_from_surface(rt); } } @@ -2132,8 +2215,6 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win } context_apply_fbo_state(context, GL_FRAMEBUFFER, context->blit_targets, fb->depth_stencil, rt_count ? rts[0]->draw_binding : SFLAG_INTEXTURE); - gl_info->gl_ops.gl.p_glReadBuffer(GL_NONE); - checkGLcall("glReadBuffer"); } else { @@ -2197,7 +2278,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const struct wined3d_device *device) { - const struct wined3d_state *state = &device->stateBlock->state; + const struct wined3d_state *state = &device->state; struct wined3d_surface **rts = state->fb->render_targets; struct wined3d_shader *ps = state->pixel_shader; DWORD rt_mask, rt_mask_bits; @@ -2207,7 +2288,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const else if (!context->render_offscreen) return context_generate_rt_mask_from_surface(rts[0]); rt_mask = ps ? ps->reg_maps.rt_mask : 1; - rt_mask &= device->valid_rt_mask; + rt_mask &= context->d3d_info->valid_rt_mask; rt_mask_bits = rt_mask; i = 0; while (rt_mask_bits) @@ -2226,7 +2307,6 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_device *device = context->swapchain->device; - const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_fb_state *fb = state->fb; DWORD rt_mask = find_draw_buffers_mask(context, device); DWORD *cur_mask; @@ -2241,8 +2321,6 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat { context_apply_fbo_state(context, GL_FRAMEBUFFER, fb->render_targets, fb->depth_stencil, fb->render_targets[0]->draw_binding); - gl_info->gl_ops.gl.p_glReadBuffer(GL_NONE); - checkGLcall("glReadBuffer"); } } @@ -2274,7 +2352,7 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d /* Context activation is done by the caller. */ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_device *device) { - const struct wined3d_state *state = &device->stateBlock->state; + const struct wined3d_state *state = &device->state; const struct StateEntry *state_table = context->state_table; const struct wined3d_fb_state *fb = state->fb; unsigned int i; @@ -2297,7 +2375,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de device_update_stream_info(device, context->gl_info); if (state->index_buffer) { - if (device->strided_streams.all_vbo) + if (device->stream_info.all_vbo) wined3d_buffer_preload(state->index_buffer); else buffer_get_sysmem(state->index_buffer, context->gl_info); @@ -2312,18 +2390,16 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de state_table[rep].apply(context, state, rep); } - if (context->select_shader) + if (context->shader_update_mask) { - device->shader_backend->shader_select(context, - use_vs(state) ? WINED3D_SHADER_MODE_SHADER : WINED3D_SHADER_MODE_FFP, - use_ps(state) ? WINED3D_SHADER_MODE_SHADER : WINED3D_SHADER_MODE_FFP); - context->select_shader = 0; + device->shader_backend->shader_select(device->shader_priv, context, state); + context->shader_update_mask = 0; } - if (context->load_constants) + if (context->constant_update_mask) { - device->shader_backend->shader_load_constants(context, use_ps(state), use_vs(state)); - context->load_constants = 0; + device->shader_backend->shader_load_constants(device->shader_priv, context, state); + context->constant_update_mask = 0; } if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) @@ -2422,11 +2498,11 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str { context = current_context; } - else if (target->container.type == WINED3D_CONTAINER_SWAPCHAIN) + else if (target->swapchain) { TRACE("Rendering onscreen.\n"); - context = swapchain_get_context(target->container.u.swapchain); + context = swapchain_get_context(target->swapchain); } else { diff --git a/dll/directx/wine/wined3d/device.c b/dll/directx/wine/wined3d/device.c index 119ed283c91..d3d358c7fb2 100644 --- a/dll/directx/wine/wined3d/device.c +++ b/dll/directx/wine/wined3d/device.c @@ -35,6 +35,7 @@ #include "wined3d_private.h" WINE_DEFAULT_DEBUG_CHANNEL(d3d); +WINE_DECLARE_DEBUG_CHANNEL(d3d_perf); /* Define the default light parameters as specified by MSDN. */ const struct wined3d_light WINED3D_default_light = @@ -52,17 +53,6 @@ const struct wined3d_light WINED3D_default_light = 0.0f /* Phi */ }; -/********************************************************** - * Global variable / Constants follow - **********************************************************/ -const struct wined3d_matrix identity = -{{{ - 1.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 1.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 1.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 1.0f, -}}}; /* When needed for comparisons */ - /* Note that except for WINED3DPT_POINTLIST and WINED3DPT_LINELIST these * actually have the same values in GL and D3D. */ GLenum gl_primitive_type_from_d3d(enum wined3d_primitive_type primitive_type) @@ -176,7 +166,7 @@ static BOOL fixed_get_input(BYTE usage, BYTE usage_idx, unsigned int *regnum) /* Context activation is done by the caller. */ static void device_stream_info_from_declaration(struct wined3d_device *device, struct wined3d_stream_info *stream_info) { - const struct wined3d_state *state = &device->stateBlock->state; + const struct wined3d_state *state = &device->state; /* We need to deal with frequency data! */ struct wined3d_vertex_declaration *declaration = state->vertex_declaration; BOOL use_vshader; @@ -221,7 +211,7 @@ static void device_stream_info_from_declaration(struct wined3d_device *device, s * drawStridedSlow() is needed, including a vertex buffer path. */ if (state->load_base_vertex_index < 0) { - WARN("load_base_vertex_index is < 0 (%d), not using VBOs.\n", state->load_base_vertex_index); + WARN_(d3d_perf)("load_base_vertex_index is < 0 (%d), not using VBOs.\n", state->load_base_vertex_index); data.buffer_object = 0; data.addr = buffer_get_sysmem(buffer, &device->adapter->gl_info); if ((UINT_PTR)data.addr < -state->load_base_vertex_index * stride) @@ -317,8 +307,8 @@ static void device_stream_info_from_declaration(struct wined3d_device *device, s /* Context activation is done by the caller. */ void device_update_stream_info(struct wined3d_device *device, const struct wined3d_gl_info *gl_info) { - struct wined3d_stream_info *stream_info = &device->strided_streams; - const struct wined3d_state *state = &device->stateBlock->state; + struct wined3d_stream_info *stream_info = &device->stream_info; + const struct wined3d_state *state = &device->state; DWORD prev_all_vbo = stream_info->all_vbo; TRACE("============================= Vertex Declaration =============================\n"); @@ -342,14 +332,11 @@ void device_update_stream_info(struct wined3d_device *device, const struct wined slow_mask |= -!gl_info->supported[ARB_VERTEX_ARRAY_BGRA] & ((1 << WINED3D_FFP_DIFFUSE) | (1 << WINED3D_FFP_SPECULAR)); - if ((stream_info->position_transformed || (stream_info->use_map & slow_mask)) && !stream_info->all_vbo) - { + if (((stream_info->position_transformed && !device->adapter->d3d_info.xyzrhw) + || (stream_info->use_map & slow_mask)) && !stream_info->all_vbo) device->useDrawStridedSlow = TRUE; - } else - { device->useDrawStridedSlow = FALSE; - } } if (prev_all_vbo != stream_info->all_vbo) @@ -368,7 +355,7 @@ static void device_preload_texture(const struct wined3d_state *state, unsigned i void device_preload_textures(const struct wined3d_device *device) { - const struct wined3d_state *state = &device->stateBlock->state; + const struct wined3d_state *state = &device->state; unsigned int i; if (use_vs(state)) @@ -501,6 +488,14 @@ static void prepare_ds_clear(struct wined3d_surface *ds, struct wined3d_context { RECT current_rect, r; + if (ds->flags & SFLAG_DISCARDED) + { + /* Depth buffer was discarded, make it entirely current in its new location since + * there is no other place where we would get data anyway. */ + SetRect(out_rect, 0, 0, ds->resource.width, ds->resource.height); + return; + } + if (ds->flags & location) SetRect(¤t_rect, 0, 0, ds->ds_current_size.cx, @@ -717,8 +712,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c } if (wined3d_settings.strict_draw_ordering || (flags & WINED3DCLEAR_TARGET - && target->container.type == WINED3D_CONTAINER_SWAPCHAIN - && target->container.u.swapchain->front_buffer == target)) + && target->swapchain && target->swapchain->front_buffer == target)) gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */ context_release(context); @@ -741,18 +735,13 @@ ULONG CDECL wined3d_device_decref(struct wined3d_device *device) if (!refcount) { - struct wined3d_stateblock *stateblock; UINT i; - if (wined3d_stateblock_decref(device->updateStateBlock) - && device->updateStateBlock != device->stateBlock) - FIXME("Something's still holding the update stateblock.\n"); - device->updateStateBlock = NULL; + if (device->recording && wined3d_stateblock_decref(device->recording)) + FIXME("Something's still holding the recording stateblock.\n"); + device->recording = NULL; - stateblock = device->stateBlock; - device->stateBlock = NULL; - if (wined3d_stateblock_decref(stateblock)) - FIXME("Something's still holding the stateblock.\n"); + state_cleanup(&device->state); for (i = 0; i < sizeof(device->multistate_funcs) / sizeof(device->multistate_funcs[0]); ++i) { @@ -877,13 +866,6 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_ * We emulate this by creating dummy textures and binding them * to each texture stage when the currently set D3D texture is NULL. */ - if (gl_info->supported[APPLE_CLIENT_STORAGE]) - { - /* The dummy texture does not have client storage backing */ - gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE); - checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE)"); - } - count = min(MAX_COMBINED_SAMPLERS, gl_info->limits.combined_samplers); for (i = 0; i < count; ++i) { @@ -947,13 +929,6 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_ } } } - - if (gl_info->supported[APPLE_CLIENT_STORAGE]) - { - /* Re-enable because if supported it is enabled by default */ - gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE); - checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE)"); - } } /* Context activation is done by the caller. */ @@ -982,10 +957,10 @@ static void destroy_dummy_textures(struct wined3d_device *device, const struct w gl_info->gl_ops.gl.p_glDeleteTextures(count, device->dummy_texture_2d); checkGLcall("glDeleteTextures(count, device->dummy_texture_2d)"); - memset(device->dummy_texture_cube, 0, gl_info->limits.textures * sizeof(*device->dummy_texture_cube)); - memset(device->dummy_texture_3d, 0, gl_info->limits.textures * sizeof(*device->dummy_texture_3d)); - memset(device->dummy_texture_rect, 0, gl_info->limits.textures * sizeof(*device->dummy_texture_rect)); - memset(device->dummy_texture_2d, 0, gl_info->limits.textures * sizeof(*device->dummy_texture_2d)); + memset(device->dummy_texture_cube, 0, count * sizeof(*device->dummy_texture_cube)); + memset(device->dummy_texture_3d, 0, count * sizeof(*device->dummy_texture_3d)); + memset(device->dummy_texture_rect, 0, count * sizeof(*device->dummy_texture_rect)); + memset(device->dummy_texture_2d, 0, count * sizeof(*device->dummy_texture_2d)); } static LONG fullscreen_style(LONG style) @@ -1032,7 +1007,7 @@ void CDECL wined3d_device_setup_fullscreen_window(struct wined3d_device *device, SetWindowLongW(window, GWL_STYLE, style); SetWindowLongW(window, GWL_EXSTYLE, exstyle); - SetWindowPos(window, HWND_TOP, 0, 0, w, h, SWP_FRAMECHANGED | SWP_SHOWWINDOW | SWP_NOACTIVATE); + SetWindowPos(window, HWND_TOPMOST, 0, 0, w, h, SWP_FRAMECHANGED | SWP_SHOWWINDOW | SWP_NOACTIVATE); device->filter_messages = filter_messages; } @@ -1044,12 +1019,21 @@ void CDECL wined3d_device_restore_fullscreen_window(struct wined3d_device *devic if (!device->style && !device->exStyle) return; - TRACE("Restoring window style of window %p to %08x, %08x.\n", - window, device->style, device->exStyle); - style = GetWindowLongW(window, GWL_STYLE); exstyle = GetWindowLongW(window, GWL_EXSTYLE); + /* These flags are set by wined3d_device_setup_fullscreen_window, not the + * application, and we want to ignore them in the test below, since it's + * not the application's fault that they changed. Additionally, we want to + * preserve the current status of these flags (i.e. don't restore them) to + * more closely emulate the behavior of Direct3D, which leaves these flags + * alone when returning to windowed mode. */ + device->style ^= (device->style ^ style) & WS_VISIBLE; + device->exStyle ^= (device->exStyle ^ exstyle) & WS_EX_TOPMOST; + + TRACE("Restoring window style of window %p to %08x, %08x.\n", + window, device->style, device->exStyle); + filter_messages = device->filter_messages; device->filter_messages = TRUE; @@ -1104,7 +1088,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device, struct wined3d_context *context; HRESULT hr; DWORD state; - unsigned int i; TRACE("device %p, swapchain_desc %p.\n", device, swapchain_desc); @@ -1113,9 +1096,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device, if (device->wined3d->flags & WINED3D_NO3D) return WINED3DERR_INVALIDCALL; - device->valid_rt_mask = 0; - for (i = 0; i < gl_info->limits.buffers; ++i) - device->valid_rt_mask |= (1 << i); device->fb.render_targets = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*device->fb.render_targets) * gl_info->limits.buffers); @@ -1134,7 +1114,8 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device, } } - if (FAILED(hr = device->shader_backend->shader_alloc_private(device, device->adapter->fragment_pipe))) + if (FAILED(hr = device->shader_backend->shader_alloc_private(device, + device->adapter->vertex_pipe, device->adapter->fragment_pipe))) { TRACE("Shader private data couldn't be allocated\n"); goto err_out; @@ -1184,14 +1165,12 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device, /* Set up some starting GL setup */ /* Setup all the devices defaults */ - stateblock_init_default_state(device->stateBlock); + state_init_default(&device->state, device); context = context_acquire(device, swapchain->front_buffer); create_dummy_textures(device, context); - /* Initialize the current view state */ - device->view_ident = 1; device->contexts[0]->last_was_rhw = 0; switch (wined3d_settings.offscreen_rendering_mode) @@ -1302,7 +1281,7 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device) if (device->logo_surface) wined3d_surface_decref(device->logo_surface); - stateblock_unbind_resources(device->stateBlock); + state_unbind_resources(&device->state); /* Unload resources */ LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry) @@ -1331,6 +1310,7 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device) /* Destroy the shader backend. Note that this has to happen after all shaders are destroyed. */ device->blitter->free_private(device); device->shader_backend->shader_free_private(device); + destroy_dummy_textures(device, gl_info); /* Release the buffers (with sanity checks)*/ if (device->onscreen_depth_stencil) @@ -1445,11 +1425,11 @@ void CDECL wined3d_device_set_stream_output(struct wined3d_device *device, UINT return; } - prev_buffer = device->updateStateBlock->state.stream_output[idx].buffer; - device->updateStateBlock->state.stream_output[idx].buffer = buffer; - device->updateStateBlock->state.stream_output[idx].offset = offset; + prev_buffer = device->update_state->stream_output[idx].buffer; + device->update_state->stream_output[idx].buffer = buffer; + device->update_state->stream_output[idx].offset = offset; - if (device->isRecordingState) + if (device->recording) { if (buffer) wined3d_buffer_incref(buffer); @@ -1484,8 +1464,8 @@ struct wined3d_buffer * CDECL wined3d_device_get_stream_output(struct wined3d_de return NULL; } - *offset = device->stateBlock->state.stream_output[idx].offset; - return device->stateBlock->state.stream_output[idx].buffer; + *offset = device->state.stream_output[idx].offset; + return device->state.stream_output[idx].buffer; } HRESULT CDECL wined3d_device_set_stream_source(struct wined3d_device *device, UINT stream_idx, @@ -1508,10 +1488,11 @@ HRESULT CDECL wined3d_device_set_stream_source(struct wined3d_device *device, UI return WINED3DERR_INVALIDCALL; } - stream = &device->updateStateBlock->state.streams[stream_idx]; + stream = &device->update_state->streams[stream_idx]; prev_buffer = stream->buffer; - device->updateStateBlock->changed.streamSource |= 1 << stream_idx; + if (device->recording) + device->recording->changed.streamSource |= 1 << stream_idx; if (prev_buffer == buffer && stream->stride == stride @@ -1529,7 +1510,7 @@ HRESULT CDECL wined3d_device_set_stream_source(struct wined3d_device *device, UI } /* Handle recording of state blocks. */ - if (device->isRecordingState) + if (device->recording) { TRACE("Recording... not performing anything.\n"); if (buffer) @@ -1558,7 +1539,7 @@ HRESULT CDECL wined3d_device_set_stream_source(struct wined3d_device *device, UI HRESULT CDECL wined3d_device_get_stream_source(const struct wined3d_device *device, UINT stream_idx, struct wined3d_buffer **buffer, UINT *offset, UINT *stride) { - struct wined3d_stream_state *stream; + const struct wined3d_stream_state *stream; TRACE("device %p, stream_idx %u, buffer %p, offset %p, stride %p.\n", device, stream_idx, buffer, offset, stride); @@ -1569,7 +1550,7 @@ HRESULT CDECL wined3d_device_get_stream_source(const struct wined3d_device *devi return WINED3DERR_INVALIDCALL; } - stream = &device->stateBlock->state.streams[stream_idx]; + stream = &device->state.streams[stream_idx]; *buffer = stream->buffer; if (*buffer) wined3d_buffer_incref(*buffer); @@ -1604,16 +1585,16 @@ HRESULT CDECL wined3d_device_set_stream_source_freq(struct wined3d_device *devic return WINED3DERR_INVALIDCALL; } - stream = &device->updateStateBlock->state.streams[stream_idx]; + stream = &device->update_state->streams[stream_idx]; old_flags = stream->flags; old_freq = stream->frequency; stream->flags = divider & (WINED3DSTREAMSOURCE_INSTANCEDATA | WINED3DSTREAMSOURCE_INDEXEDDATA); stream->frequency = divider & 0x7fffff; - device->updateStateBlock->changed.streamFreq |= 1 << stream_idx; - - if (stream->frequency != old_freq || stream->flags != old_flags) + if (device->recording) + device->recording->changed.streamFreq |= 1 << stream_idx; + else if (stream->frequency != old_freq || stream->flags != old_flags) device_invalidate_state(device, STATE_STREAMSRC); return WINED3D_OK; @@ -1622,11 +1603,11 @@ HRESULT CDECL wined3d_device_set_stream_source_freq(struct wined3d_device *devic HRESULT CDECL wined3d_device_get_stream_source_freq(const struct wined3d_device *device, UINT stream_idx, UINT *divider) { - struct wined3d_stream_state *stream; + const struct wined3d_stream_state *stream; TRACE("device %p, stream_idx %u, divider %p.\n", device, stream_idx, divider); - stream = &device->updateStateBlock->state.streams[stream_idx]; + stream = &device->state.streams[stream_idx]; *divider = stream->flags | stream->frequency; TRACE("Returning %#x.\n", *divider); @@ -1645,11 +1626,11 @@ void CDECL wined3d_device_set_transform(struct wined3d_device *device, TRACE("%.8e %.8e %.8e %.8e\n", matrix->u.s._41, matrix->u.s._42, matrix->u.s._43, matrix->u.s._44); /* Handle recording of state blocks. */ - if (device->isRecordingState) + if (device->recording) { TRACE("Recording... not performing anything.\n"); - device->updateStateBlock->changed.transform[d3dts >> 5] |= 1 << (d3dts & 0x1f); - device->updateStateBlock->state.transforms[d3dts] = *matrix; + device->recording->changed.transform[d3dts >> 5] |= 1 << (d3dts & 0x1f); + device->update_state->transforms[d3dts] = *matrix; return; } @@ -1659,15 +1640,13 @@ void CDECL wined3d_device_set_transform(struct wined3d_device *device, * tend towards setting the same matrix repeatedly for some reason. * * From here on we assume that the new matrix is different, wherever it matters. */ - if (!memcmp(&device->stateBlock->state.transforms[d3dts].u.m[0][0], matrix, sizeof(*matrix))) + if (!memcmp(&device->state.transforms[d3dts].u.m[0][0], matrix, sizeof(*matrix))) { TRACE("The application is setting the same matrix over again.\n"); return; } - device->stateBlock->state.transforms[d3dts] = *matrix; - if (d3dts == WINED3D_TS_VIEW) - device->view_ident = !memcmp(matrix, &identity, sizeof(identity)); + device->state.transforms[d3dts] = *matrix; if (d3dts < WINED3D_TS_WORLD_MATRIX(device->adapter->gl_info.limits.blends)) device_invalidate_state(device, STATE_TRANSFORM(d3dts)); @@ -1678,7 +1657,7 @@ void CDECL wined3d_device_get_transform(const struct wined3d_device *device, { TRACE("device %p, state %s, matrix %p.\n", device, debug_d3dtstype(state), matrix); - *matrix = device->stateBlock->state.transforms[state]; + *matrix = device->state.transforms[state]; } void CDECL wined3d_device_multiply_transform(struct wined3d_device *device, @@ -1699,7 +1678,7 @@ void CDECL wined3d_device_multiply_transform(struct wined3d_device *device, return; } - mat = &device->updateStateBlock->state.transforms[state]; + mat = &device->update_state->transforms[state]; multiply_matrix(&temp, mat, matrix); /* Apply change via set transform - will reapply to eg. lights this way. */ @@ -1752,7 +1731,7 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device, return WINED3DERR_INVALIDCALL; } - LIST_FOR_EACH(e, &device->updateStateBlock->state.light_map[hash_idx]) + LIST_FOR_EACH(e, &device->update_state->light_map[hash_idx]) { object = LIST_ENTRY(e, struct wined3d_light_info, entry); if (object->OriginalIndex == light_idx) @@ -1767,7 +1746,7 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device, if (!object) return E_OUTOFMEMORY; - list_add_head(&device->updateStateBlock->state.light_map[hash_idx], &object->entry); + list_add_head(&device->update_state->light_map[hash_idx], &object->entry); object->glIndex = -1; object->OriginalIndex = light_idx; } @@ -1783,6 +1762,14 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device, TRACE("... Range(%f), Falloff(%f), Theta(%f), Phi(%f)\n", light->range, light->falloff, light->theta, light->phi); + /* Update the live definitions if the light is currently assigned a glIndex. */ + if (object->glIndex != -1 && !device->recording) + { + if (object->OriginalParms.type != light->type) + device_invalidate_state(device, STATE_LIGHT_TYPE); + device_invalidate_state(device, STATE_ACTIVELIGHT(object->glIndex)); + } + /* Save away the information. */ object->OriginalParms = *light; @@ -1855,10 +1842,6 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device, FIXME("Unrecognized light type %#x.\n", light->type); } - /* Update the live definitions if the light is currently assigned a glIndex. */ - if (object->glIndex != -1 && !device->isRecordingState) - device_invalidate_state(device, STATE_ACTIVELIGHT(object->glIndex)); - return WINED3D_OK; } @@ -1871,7 +1854,7 @@ HRESULT CDECL wined3d_device_get_light(const struct wined3d_device *device, TRACE("device %p, light_idx %u, light %p.\n", device, light_idx, light); - LIST_FOR_EACH(e, &device->stateBlock->state.light_map[hash_idx]) + LIST_FOR_EACH(e, &device->state.light_map[hash_idx]) { light_info = LIST_ENTRY(e, struct wined3d_light_info, entry); if (light_info->OriginalIndex == light_idx) @@ -1897,7 +1880,7 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN TRACE("device %p, light_idx %u, enable %#x.\n", device, light_idx, enable); - LIST_FOR_EACH(e, &device->updateStateBlock->state.light_map[hash_idx]) + LIST_FOR_EACH(e, &device->update_state->light_map[hash_idx]) { light_info = LIST_ENTRY(e, struct wined3d_light_info, entry); if (light_info->OriginalIndex == light_idx) @@ -1913,7 +1896,7 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN wined3d_device_set_light(device, light_idx, &WINED3D_default_light); /* Search for it again! Should be fairly quick as near head of list. */ - LIST_FOR_EACH(e, &device->updateStateBlock->state.light_map[hash_idx]) + LIST_FOR_EACH(e, &device->update_state->light_map[hash_idx]) { light_info = LIST_ENTRY(e, struct wined3d_light_info, entry); if (light_info->OriginalIndex == light_idx) @@ -1931,10 +1914,13 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN { if (light_info->glIndex != -1) { - if (!device->isRecordingState) + if (!device->recording) + { + device_invalidate_state(device, STATE_LIGHT_TYPE); device_invalidate_state(device, STATE_ACTIVELIGHT(light_info->glIndex)); + } - device->updateStateBlock->state.lights[light_info->glIndex] = NULL; + device->update_state->lights[light_info->glIndex] = NULL; light_info->glIndex = -1; } else @@ -1957,9 +1943,9 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN /* Find a free GL light. */ for (i = 0; i < gl_info->limits.lights; ++i) { - if (!device->updateStateBlock->state.lights[i]) + if (!device->update_state->lights[i]) { - device->updateStateBlock->state.lights[i] = light_info; + device->update_state->lights[i] = light_info; light_info->glIndex = i; break; } @@ -1977,8 +1963,11 @@ HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UIN } /* i == light_info->glIndex */ - if (!device->isRecordingState) + if (!device->recording) + { + device_invalidate_state(device, STATE_LIGHT_TYPE); device_invalidate_state(device, STATE_ACTIVELIGHT(i)); + } } } @@ -1993,7 +1982,7 @@ HRESULT CDECL wined3d_device_get_light_enable(const struct wined3d_device *devic TRACE("device %p, light_idx %u, enable %p.\n", device, light_idx, enable); - LIST_FOR_EACH(e, &device->stateBlock->state.light_map[hash_idx]) + LIST_FOR_EACH(e, &device->state.light_map[hash_idx]) { light_info = LIST_ENTRY(e, struct wined3d_light_info, entry); if (light_info->OriginalIndex == light_idx) @@ -2023,18 +2012,19 @@ HRESULT CDECL wined3d_device_set_clip_plane(struct wined3d_device *device, return WINED3DERR_INVALIDCALL; } - device->updateStateBlock->changed.clipplane |= 1 << plane_idx; + if (device->recording) + device->recording->changed.clipplane |= 1 << plane_idx; - if (!memcmp(&device->updateStateBlock->state.clip_planes[plane_idx], plane, sizeof(*plane))) + if (!memcmp(&device->update_state->clip_planes[plane_idx], plane, sizeof(*plane))) { TRACE("Application is setting old values over, nothing to do.\n"); return WINED3D_OK; } - device->updateStateBlock->state.clip_planes[plane_idx] = *plane; + device->update_state->clip_planes[plane_idx] = *plane; /* Handle recording of state blocks. */ - if (device->isRecordingState) + if (device->recording) { TRACE("Recording... not performing anything.\n"); return WINED3D_OK; @@ -2057,7 +2047,7 @@ HRESULT CDECL wined3d_device_get_clip_plane(const struct wined3d_device *device, return WINED3DERR_INVALIDCALL; } - *plane = device->stateBlock->state.clip_planes[plane_idx]; + *plane = device->state.clip_planes[plane_idx]; return WINED3D_OK; } @@ -2088,12 +2078,12 @@ void CDECL wined3d_device_set_material(struct wined3d_device *device, const stru { TRACE("device %p, material %p.\n", device, material); - device->updateStateBlock->changed.material = TRUE; - device->updateStateBlock->state.material = *material; + device->update_state->material = *material; /* Handle recording of state blocks */ - if (device->isRecordingState) + if (device->recording) { + device->recording->changed.material = TRUE; TRACE("Recording... not performing anything.\n"); return; } @@ -2105,7 +2095,7 @@ void CDECL wined3d_device_get_material(const struct wined3d_device *device, stru { TRACE("device %p, material %p.\n", device, material); - *material = device->updateStateBlock->state.material; + *material = device->state.material; TRACE("diffuse {%.8e, %.8e, %.8e, %.8e}\n", material->diffuse.r, material->diffuse.g, @@ -2130,16 +2120,16 @@ void CDECL wined3d_device_set_index_buffer(struct wined3d_device *device, TRACE("device %p, buffer %p, format %s.\n", device, buffer, debug_d3dformat(format_id)); - prev_buffer = device->updateStateBlock->state.index_buffer; + prev_buffer = device->update_state->index_buffer; - device->updateStateBlock->changed.indices = TRUE; - device->updateStateBlock->state.index_buffer = buffer; - device->updateStateBlock->state.index_format = format_id; + device->update_state->index_buffer = buffer; + device->update_state->index_format = format_id; /* Handle recording of state blocks. */ - if (device->isRecordingState) + if (device->recording) { TRACE("Recording... not performing anything.\n"); + device->recording->changed.indices = TRUE; if (buffer) wined3d_buffer_incref(buffer); if (prev_buffer) @@ -2168,22 +2158,22 @@ struct wined3d_buffer * CDECL wined3d_device_get_index_buffer(const struct wined { TRACE("device %p, format %p.\n", device, format); - *format = device->stateBlock->state.index_format; - return device->stateBlock->state.index_buffer; + *format = device->state.index_format; + return device->state.index_buffer; } void CDECL wined3d_device_set_base_vertex_index(struct wined3d_device *device, INT base_index) { TRACE("device %p, base_index %d.\n", device, base_index); - device->updateStateBlock->state.base_vertex_index = base_index; + device->update_state->base_vertex_index = base_index; } INT CDECL wined3d_device_get_base_vertex_index(const struct wined3d_device *device) { TRACE("device %p.\n", device); - return device->stateBlock->state.base_vertex_index; + return device->state.base_vertex_index; } void CDECL wined3d_device_set_viewport(struct wined3d_device *device, const struct wined3d_viewport *viewport) @@ -2192,13 +2182,13 @@ void CDECL wined3d_device_set_viewport(struct wined3d_device *device, const stru TRACE("x %u, y %u, w %u, h %u, min_z %.8e, max_z %.8e.\n", viewport->x, viewport->y, viewport->width, viewport->height, viewport->min_z, viewport->max_z); - device->updateStateBlock->changed.viewport = TRUE; - device->updateStateBlock->state.viewport = *viewport; + device->update_state->viewport = *viewport; /* Handle recording of state blocks */ - if (device->isRecordingState) + if (device->recording) { TRACE("Recording... not performing anything\n"); + device->recording->changed.viewport = TRUE; return; } @@ -2209,23 +2199,39 @@ void CDECL wined3d_device_get_viewport(const struct wined3d_device *device, stru { TRACE("device %p, viewport %p.\n", device, viewport); - *viewport = device->stateBlock->state.viewport; + *viewport = device->state.viewport; +} + +static void resolve_depth_buffer(struct wined3d_state *state) +{ + struct wined3d_texture *texture = state->textures[0]; + struct wined3d_surface *depth_stencil, *surface; + + if (!texture || texture->resource.type != WINED3D_RTYPE_TEXTURE + || !(texture->resource.format->flags & WINED3DFMT_FLAG_DEPTH)) + return; + surface = surface_from_resource(texture->sub_resources[0]); + depth_stencil = state->fb->depth_stencil; + if (!depth_stencil) + return; + + wined3d_surface_blt(surface, NULL, depth_stencil, NULL, 0, NULL, WINED3D_TEXF_POINT); } void CDECL wined3d_device_set_render_state(struct wined3d_device *device, enum wined3d_render_state state, DWORD value) { - DWORD old_value = device->stateBlock->state.render_states[state]; + DWORD old_value = device->state.render_states[state]; TRACE("device %p, state %s (%#x), value %#x.\n", device, debug_d3drenderstate(state), state, value); - device->updateStateBlock->changed.renderState[state >> 5] |= 1 << (state & 0x1f); - device->updateStateBlock->state.render_states[state] = value; + device->update_state->render_states[state] = value; /* Handle recording of state blocks. */ - if (device->isRecordingState) + if (device->recording) { TRACE("Recording... not performing anything.\n"); + device->recording->changed.renderState[state >> 5] |= 1 << (state & 0x1f); return; } @@ -2234,13 +2240,19 @@ void CDECL wined3d_device_set_render_state(struct wined3d_device *device, TRACE("Application is setting the old value over, nothing to do.\n"); else device_invalidate_state(device, STATE_RENDER(state)); + + if (state == WINED3D_RS_POINTSIZE && value == WINED3D_RESZ_CODE) + { + TRACE("RESZ multisampled depth buffer resolve triggered.\n"); + resolve_depth_buffer(&device->state); + } } DWORD CDECL wined3d_device_get_render_state(const struct wined3d_device *device, enum wined3d_render_state state) { TRACE("device %p, state %s (%#x).\n", device, debug_d3drenderstate(state), state); - return device->stateBlock->state.render_states[state]; + return device->state.render_states[state]; } void CDECL wined3d_device_set_sampler_state(struct wined3d_device *device, @@ -2254,21 +2266,20 @@ void CDECL wined3d_device_set_sampler_state(struct wined3d_device *device, if (sampler_idx >= WINED3DVERTEXTEXTURESAMPLER0 && sampler_idx <= WINED3DVERTEXTEXTURESAMPLER3) sampler_idx -= (WINED3DVERTEXTEXTURESAMPLER0 - MAX_FRAGMENT_SAMPLERS); - if (sampler_idx >= sizeof(device->stateBlock->state.sampler_states) - / sizeof(*device->stateBlock->state.sampler_states)) + if (sampler_idx >= sizeof(device->state.sampler_states) / sizeof(*device->state.sampler_states)) { WARN("Invalid sampler %u.\n", sampler_idx); return; /* Windows accepts overflowing this array ... we do not. */ } - old_value = device->stateBlock->state.sampler_states[sampler_idx][state]; - device->updateStateBlock->state.sampler_states[sampler_idx][state] = value; - device->updateStateBlock->changed.samplerState[sampler_idx] |= 1 << state; + old_value = device->state.sampler_states[sampler_idx][state]; + device->update_state->sampler_states[sampler_idx][state] = value; /* Handle recording of state blocks. */ - if (device->isRecordingState) + if (device->recording) { TRACE("Recording... not performing anything.\n"); + device->recording->changed.samplerState[sampler_idx] |= 1 << state; return; } @@ -2290,29 +2301,30 @@ DWORD CDECL wined3d_device_get_sampler_state(const struct wined3d_device *device if (sampler_idx >= WINED3DVERTEXTEXTURESAMPLER0 && sampler_idx <= WINED3DVERTEXTEXTURESAMPLER3) sampler_idx -= (WINED3DVERTEXTEXTURESAMPLER0 - MAX_FRAGMENT_SAMPLERS); - if (sampler_idx >= sizeof(device->stateBlock->state.sampler_states) - / sizeof(*device->stateBlock->state.sampler_states)) + if (sampler_idx >= sizeof(device->state.sampler_states) / sizeof(*device->state.sampler_states)) { WARN("Invalid sampler %u.\n", sampler_idx); return 0; /* Windows accepts overflowing this array ... we do not. */ } - return device->stateBlock->state.sampler_states[sampler_idx][state]; + return device->state.sampler_states[sampler_idx][state]; } void CDECL wined3d_device_set_scissor_rect(struct wined3d_device *device, const RECT *rect) { TRACE("device %p, rect %s.\n", device, wine_dbgstr_rect(rect)); - device->updateStateBlock->changed.scissorRect = TRUE; - if (EqualRect(&device->updateStateBlock->state.scissor_rect, rect)) + if (device->recording) + device->recording->changed.scissorRect = TRUE; + + if (EqualRect(&device->update_state->scissor_rect, rect)) { TRACE("App is setting the old scissor rectangle over, nothing to do.\n"); return; } - CopyRect(&device->updateStateBlock->state.scissor_rect, rect); + CopyRect(&device->update_state->scissor_rect, rect); - if (device->isRecordingState) + if (device->recording) { TRACE("Recording... not performing anything.\n"); return; @@ -2325,14 +2337,14 @@ void CDECL wined3d_device_get_scissor_rect(const struct wined3d_device *device, { TRACE("device %p, rect %p.\n", device, rect); - *rect = device->updateStateBlock->state.scissor_rect; + *rect = device->state.scissor_rect; TRACE("Returning rect %s.\n", wine_dbgstr_rect(rect)); } void CDECL wined3d_device_set_vertex_declaration(struct wined3d_device *device, struct wined3d_vertex_declaration *declaration) { - struct wined3d_vertex_declaration *prev = device->updateStateBlock->state.vertex_declaration; + struct wined3d_vertex_declaration *prev = device->update_state->vertex_declaration; TRACE("device %p, declaration %p.\n", device, declaration); @@ -2341,12 +2353,12 @@ void CDECL wined3d_device_set_vertex_declaration(struct wined3d_device *device, if (prev) wined3d_vertex_declaration_decref(prev); - device->updateStateBlock->state.vertex_declaration = declaration; - device->updateStateBlock->changed.vertexDecl = TRUE; + device->update_state->vertex_declaration = declaration; - if (device->isRecordingState) + if (device->recording) { TRACE("Recording... not performing anything.\n"); + device->recording->changed.vertexDecl = TRUE; return; } @@ -2364,12 +2376,12 @@ struct wined3d_vertex_declaration * CDECL wined3d_device_get_vertex_declaration( { TRACE("device %p.\n", device); - return device->stateBlock->state.vertex_declaration; + return device->state.vertex_declaration; } void CDECL wined3d_device_set_vertex_shader(struct wined3d_device *device, struct wined3d_shader *shader) { - struct wined3d_shader *prev = device->updateStateBlock->state.vertex_shader; + struct wined3d_shader *prev = device->update_state->vertex_shader; TRACE("device %p, shader %p.\n", device, shader); @@ -2378,12 +2390,12 @@ void CDECL wined3d_device_set_vertex_shader(struct wined3d_device *device, struc if (prev) wined3d_shader_decref(prev); - device->updateStateBlock->state.vertex_shader = shader; - device->updateStateBlock->changed.vertexShader = TRUE; + device->update_state->vertex_shader = shader; - if (device->isRecordingState) + if (device->recording) { TRACE("Recording... not performing anything.\n"); + device->recording->changed.vertexShader = TRUE; return; } @@ -2400,7 +2412,7 @@ struct wined3d_shader * CDECL wined3d_device_get_vertex_shader(const struct wine { TRACE("device %p.\n", device); - return device->stateBlock->state.vertex_shader; + return device->state.vertex_shader; } void CDECL wined3d_device_set_vs_cb(struct wined3d_device *device, UINT idx, struct wined3d_buffer *buffer) @@ -2415,10 +2427,10 @@ void CDECL wined3d_device_set_vs_cb(struct wined3d_device *device, UINT idx, str return; } - prev = device->updateStateBlock->state.vs_cb[idx]; - device->updateStateBlock->state.vs_cb[idx] = buffer; + prev = device->update_state->vs_cb[idx]; + device->update_state->vs_cb[idx] = buffer; - if (device->isRecordingState) + if (device->recording) { if (buffer) wined3d_buffer_incref(buffer); @@ -2452,7 +2464,7 @@ struct wined3d_buffer * CDECL wined3d_device_get_vs_cb(const struct wined3d_devi return NULL; } - return device->stateBlock->state.vs_cb[idx]; + return device->state.vs_cb[idx]; } void CDECL wined3d_device_set_vs_sampler(struct wined3d_device *device, UINT idx, struct wined3d_sampler *sampler) @@ -2467,8 +2479,8 @@ void CDECL wined3d_device_set_vs_sampler(struct wined3d_device *device, UINT idx return; } - prev = device->updateStateBlock->state.vs_sampler[idx]; - device->updateStateBlock->state.vs_sampler[idx] = sampler; + prev = device->update_state->vs_sampler[idx]; + device->update_state->vs_sampler[idx] = sampler; if (sampler) wined3d_sampler_incref(sampler); @@ -2486,7 +2498,17 @@ struct wined3d_sampler * CDECL wined3d_device_get_vs_sampler(const struct wined3 return NULL; } - return device->stateBlock->state.vs_sampler[idx]; + return device->state.vs_sampler[idx]; +} + +void device_invalidate_shader_constants(const struct wined3d_device *device, DWORD mask) +{ + UINT i; + + for (i = 0; i < device->context_count; ++i) + { + device->contexts[i]->constant_update_mask |= mask; + } } HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device, @@ -2501,15 +2523,19 @@ HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device, if (!constants || start_register >= MAX_CONST_B) return WINED3DERR_INVALIDCALL; - memcpy(&device->updateStateBlock->state.vs_consts_b[start_register], constants, count * sizeof(BOOL)); + memcpy(&device->update_state->vs_consts_b[start_register], constants, count * sizeof(BOOL)); for (i = 0; i < count; ++i) TRACE("Set BOOL constant %u to %s.\n", start_register + i, constants[i] ? "true" : "false"); - for (i = start_register; i < count + start_register; ++i) - device->updateStateBlock->changed.vertexShaderConstantsB |= (1 << i); - - if (!device->isRecordingState) - device_invalidate_state(device, STATE_VERTEXSHADERCONSTANT); + if (device->recording) + { + for (i = start_register; i < count + start_register; ++i) + device->recording->changed.vertexShaderConstantsB |= (1 << i); + } + else + { + device_invalidate_shader_constants(device, WINED3D_SHADER_CONST_VS_B); + } return WINED3D_OK; } @@ -2525,7 +2551,7 @@ HRESULT CDECL wined3d_device_get_vs_consts_b(const struct wined3d_device *device if (!constants || start_register >= MAX_CONST_B) return WINED3DERR_INVALIDCALL; - memcpy(constants, &device->stateBlock->state.vs_consts_b[start_register], count * sizeof(BOOL)); + memcpy(constants, &device->state.vs_consts_b[start_register], count * sizeof(BOOL)); return WINED3D_OK; } @@ -2542,17 +2568,21 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device, if (!constants || start_register >= MAX_CONST_I) return WINED3DERR_INVALIDCALL; - memcpy(&device->updateStateBlock->state.vs_consts_i[start_register * 4], constants, count * sizeof(int) * 4); + memcpy(&device->update_state->vs_consts_i[start_register * 4], constants, count * sizeof(int) * 4); for (i = 0; i < count; ++i) TRACE("Set INT constant %u to {%d, %d, %d, %d}.\n", start_register + i, constants[i * 4], constants[i * 4 + 1], constants[i * 4 + 2], constants[i * 4 + 3]); - for (i = start_register; i < count + start_register; ++i) - device->updateStateBlock->changed.vertexShaderConstantsI |= (1 << i); - - if (!device->isRecordingState) - device_invalidate_state(device, STATE_VERTEXSHADERCONSTANT); + if (device->recording) + { + for (i = start_register; i < count + start_register; ++i) + device->recording->changed.vertexShaderConstantsI |= (1 << i); + } + else + { + device_invalidate_shader_constants(device, WINED3D_SHADER_CONST_VS_I); + } return WINED3D_OK; } @@ -2568,7 +2598,7 @@ HRESULT CDECL wined3d_device_get_vs_consts_i(const struct wined3d_device *device if (!constants || start_register >= MAX_CONST_I) return WINED3DERR_INVALIDCALL; - memcpy(constants, &device->stateBlock->state.vs_consts_i[start_register * 4], count * sizeof(int) * 4); + memcpy(constants, &device->state.vs_consts_i[start_register * 4], count * sizeof(int) * 4); return WINED3D_OK; } @@ -2576,6 +2606,7 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device, UINT start_register, const float *constants, UINT vector4f_count) { UINT i; + const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; TRACE("device %p, start_register %u, constants %p, vector4f_count %u.\n", device, start_register, constants, vector4f_count); @@ -2583,11 +2614,11 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device, /* Specifically test start_register > limit to catch MAX_UINT overflows * when adding start_register + vector4f_count. */ if (!constants - || start_register + vector4f_count > device->d3d_vshader_constantF - || start_register > device->d3d_vshader_constantF) + || start_register + vector4f_count > d3d_info->limits.vs_uniform_count + || start_register > d3d_info->limits.vs_uniform_count) return WINED3DERR_INVALIDCALL; - memcpy(&device->updateStateBlock->state.vs_consts_f[start_register * 4], + memcpy(&device->update_state->vs_consts_f[start_register * 4], constants, vector4f_count * sizeof(float) * 4); if (TRACE_ON(d3d)) { @@ -2597,14 +2628,12 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device, constants[i * 4 + 2], constants[i * 4 + 3]); } - if (!device->isRecordingState) - { + if (device->recording) + memset(device->recording->changed.vertexShaderConstantsF + start_register, 1, + sizeof(*device->recording->changed.vertexShaderConstantsF) * vector4f_count); + else device->shader_backend->shader_update_float_vertex_constants(device, start_register, vector4f_count); - device_invalidate_state(device, STATE_VERTEXSHADERCONSTANT); - } - memset(device->updateStateBlock->changed.vertexShaderConstantsF + start_register, 1, - sizeof(*device->updateStateBlock->changed.vertexShaderConstantsF) * vector4f_count); return WINED3D_OK; } @@ -2612,7 +2641,8 @@ HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device, HRESULT CDECL wined3d_device_get_vs_consts_f(const struct wined3d_device *device, UINT start_register, float *constants, UINT vector4f_count) { - int count = min(vector4f_count, device->d3d_vshader_constantF - start_register); + const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; + int count = min(vector4f_count, d3d_info->limits.vs_uniform_count - start_register); TRACE("device %p, start_register %u, constants %p, vector4f_count %u.\n", device, start_register, constants, vector4f_count); @@ -2620,7 +2650,7 @@ HRESULT CDECL wined3d_device_get_vs_consts_f(const struct wined3d_device *device if (!constants || count < 0) return WINED3DERR_INVALIDCALL; - memcpy(constants, &device->stateBlock->state.vs_consts_f[start_register * 4], count * sizeof(float) * 4); + memcpy(constants, &device->state.vs_consts_f[start_register * 4], count * sizeof(float) * 4); return WINED3D_OK; } @@ -2656,7 +2686,7 @@ static void device_update_fixed_function_usage_map(struct wined3d_device *device device->fixed_function_usage_map = 0; for (i = 0; i < MAX_TEXTURES; ++i) { - const struct wined3d_state *state = &device->stateBlock->state; + const struct wined3d_state *state = &device->state; enum wined3d_texture_op color_op = state->texture_states[i][WINED3D_TSS_COLOR_OP]; enum wined3d_texture_op alpha_op = state->texture_states[i][WINED3D_TSS_ALPHA_OP]; DWORD color_arg1 = state->texture_states[i][WINED3D_TSS_COLOR_ARG1] & WINED3DTA_SELECTMASK; @@ -2686,7 +2716,7 @@ static void device_update_fixed_function_usage_map(struct wined3d_device *device } } -static void device_map_fixed_function_samplers(struct wined3d_device *device, const struct wined3d_gl_info *gl_info) +static void device_map_fixed_function_samplers(struct wined3d_device *device, const struct wined3d_d3d_info *d3d_info) { unsigned int i, tex; WORD ffu_map; @@ -2694,8 +2724,8 @@ static void device_map_fixed_function_samplers(struct wined3d_device *device, co device_update_fixed_function_usage_map(device); ffu_map = device->fixed_function_usage_map; - if (device->max_ffp_textures == gl_info->limits.texture_stages - || device->stateBlock->state.lowest_disabled_stage <= device->max_ffp_textures) + if (d3d_info->limits.ffp_textures == d3d_info->limits.ffp_blend_stages + || device->state.lowest_disabled_stage <= d3d_info->limits.ffp_textures) { for (i = 0; ffu_map; ffu_map >>= 1, ++i) { @@ -2728,10 +2758,10 @@ static void device_map_fixed_function_samplers(struct wined3d_device *device, co } } -static void device_map_psamplers(struct wined3d_device *device, const struct wined3d_gl_info *gl_info) +static void device_map_psamplers(struct wined3d_device *device, const struct wined3d_d3d_info *d3d_info) { const enum wined3d_sampler_texture_type *sampler_type = - device->stateBlock->state.pixel_shader->reg_maps.sampler_type; + device->state.pixel_shader->reg_maps.sampler_type; unsigned int i; for (i = 0; i < MAX_FRAGMENT_SAMPLERS; ++i) @@ -2740,7 +2770,7 @@ static void device_map_psamplers(struct wined3d_device *device, const struct win { device_map_stage(device, i, i); device_invalidate_state(device, STATE_SAMPLER(i)); - if (i < gl_info->limits.texture_stages) + if (i < d3d_info->limits.ffp_blend_stages) device_invalidate_texture_stage(device, i); } } @@ -2774,7 +2804,7 @@ static BOOL device_unit_free_for_vs(const struct wined3d_device *device, static void device_map_vsamplers(struct wined3d_device *device, BOOL ps, const struct wined3d_gl_info *gl_info) { const enum wined3d_sampler_texture_type *vshader_sampler_type = - device->stateBlock->state.vertex_shader->reg_maps.sampler_type; + device->state.vertex_shader->reg_maps.sampler_type; const enum wined3d_sampler_texture_type *pshader_sampler_type = NULL; int start = min(MAX_COMBINED_SAMPLERS, gl_info->limits.combined_samplers) - 1; int i; @@ -2783,7 +2813,7 @@ static void device_map_vsamplers(struct wined3d_device *device, BOOL ps, const s { /* Note that we only care if a sampler is sampled or not, not the sampler's specific type. * Otherwise we'd need to call shader_update_samplers() here for 1.x pixelshaders. */ - pshader_sampler_type = device->stateBlock->state.pixel_shader->reg_maps.sampler_type; + pshader_sampler_type = device->state.pixel_shader->reg_maps.sampler_type; } for (i = 0; i < MAX_VERTEX_SAMPLERS; ++i) { @@ -2816,7 +2846,8 @@ static void device_map_vsamplers(struct wined3d_device *device, BOOL ps, const s void device_update_tex_unit_map(struct wined3d_device *device) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - const struct wined3d_state *state = &device->stateBlock->state; + const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; + const struct wined3d_state *state = &device->state; BOOL vs = use_vs(state); BOOL ps = use_ps(state); /* @@ -2827,9 +2858,9 @@ void device_update_tex_unit_map(struct wined3d_device *device) * to be reset. Because of that try to work with a 1:1 mapping as much as possible */ if (ps) - device_map_psamplers(device, gl_info); + device_map_psamplers(device, d3d_info); else - device_map_fixed_function_samplers(device, gl_info); + device_map_fixed_function_samplers(device, d3d_info); if (vs) device_map_vsamplers(device, ps, gl_info); @@ -2837,7 +2868,7 @@ void device_update_tex_unit_map(struct wined3d_device *device) void CDECL wined3d_device_set_pixel_shader(struct wined3d_device *device, struct wined3d_shader *shader) { - struct wined3d_shader *prev = device->updateStateBlock->state.pixel_shader; + struct wined3d_shader *prev = device->update_state->pixel_shader; TRACE("device %p, shader %p.\n", device, shader); @@ -2846,12 +2877,12 @@ void CDECL wined3d_device_set_pixel_shader(struct wined3d_device *device, struct if (prev) wined3d_shader_decref(prev); - device->updateStateBlock->state.pixel_shader = shader; - device->updateStateBlock->changed.pixelShader = TRUE; + device->update_state->pixel_shader = shader; - if (device->isRecordingState) + if (device->recording) { TRACE("Recording... not performing anything.\n"); + device->recording->changed.pixelShader = TRUE; return; } @@ -2868,7 +2899,7 @@ struct wined3d_shader * CDECL wined3d_device_get_pixel_shader(const struct wined { TRACE("device %p.\n", device); - return device->stateBlock->state.pixel_shader; + return device->state.pixel_shader; } void CDECL wined3d_device_set_ps_cb(struct wined3d_device *device, UINT idx, struct wined3d_buffer *buffer) @@ -2883,10 +2914,10 @@ void CDECL wined3d_device_set_ps_cb(struct wined3d_device *device, UINT idx, str return; } - prev = device->updateStateBlock->state.ps_cb[idx]; - device->updateStateBlock->state.ps_cb[idx] = buffer; + prev = device->update_state->ps_cb[idx]; + device->update_state->ps_cb[idx] = buffer; - if (device->isRecordingState) + if (device->recording) { if (buffer) wined3d_buffer_incref(buffer); @@ -2920,7 +2951,7 @@ struct wined3d_buffer * CDECL wined3d_device_get_ps_cb(const struct wined3d_devi return NULL; } - return device->stateBlock->state.ps_cb[idx]; + return device->state.ps_cb[idx]; } void CDECL wined3d_device_set_ps_sampler(struct wined3d_device *device, UINT idx, struct wined3d_sampler *sampler) @@ -2935,8 +2966,8 @@ void CDECL wined3d_device_set_ps_sampler(struct wined3d_device *device, UINT idx return; } - prev = device->updateStateBlock->state.ps_sampler[idx]; - device->updateStateBlock->state.ps_sampler[idx] = sampler; + prev = device->update_state->ps_sampler[idx]; + device->update_state->ps_sampler[idx] = sampler; if (sampler) wined3d_sampler_incref(sampler); @@ -2954,7 +2985,7 @@ struct wined3d_sampler * CDECL wined3d_device_get_ps_sampler(const struct wined3 return NULL; } - return device->stateBlock->state.ps_sampler[idx]; + return device->state.ps_sampler[idx]; } HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device, @@ -2969,15 +3000,19 @@ HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device, if (!constants || start_register >= MAX_CONST_B) return WINED3DERR_INVALIDCALL; - memcpy(&device->updateStateBlock->state.ps_consts_b[start_register], constants, count * sizeof(BOOL)); + memcpy(&device->update_state->ps_consts_b[start_register], constants, count * sizeof(BOOL)); for (i = 0; i < count; ++i) TRACE("Set BOOL constant %u to %s.\n", start_register + i, constants[i] ? "true" : "false"); - for (i = start_register; i < count + start_register; ++i) - device->updateStateBlock->changed.pixelShaderConstantsB |= (1 << i); - - if (!device->isRecordingState) - device_invalidate_state(device, STATE_PIXELSHADERCONSTANT); + if (device->recording) + { + for (i = start_register; i < count + start_register; ++i) + device->recording->changed.pixelShaderConstantsB |= (1 << i); + } + else + { + device_invalidate_shader_constants(device, WINED3D_SHADER_CONST_PS_B); + } return WINED3D_OK; } @@ -2993,7 +3028,7 @@ HRESULT CDECL wined3d_device_get_ps_consts_b(const struct wined3d_device *device if (!constants || start_register >= MAX_CONST_B) return WINED3DERR_INVALIDCALL; - memcpy(constants, &device->stateBlock->state.ps_consts_b[start_register], count * sizeof(BOOL)); + memcpy(constants, &device->state.ps_consts_b[start_register], count * sizeof(BOOL)); return WINED3D_OK; } @@ -3010,17 +3045,21 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device, if (!constants || start_register >= MAX_CONST_I) return WINED3DERR_INVALIDCALL; - memcpy(&device->updateStateBlock->state.ps_consts_i[start_register * 4], constants, count * sizeof(int) * 4); + memcpy(&device->update_state->ps_consts_i[start_register * 4], constants, count * sizeof(int) * 4); for (i = 0; i < count; ++i) TRACE("Set INT constant %u to {%d, %d, %d, %d}.\n", start_register + i, constants[i * 4], constants[i * 4 + 1], constants[i * 4 + 2], constants[i * 4 + 3]); - for (i = start_register; i < count + start_register; ++i) - device->updateStateBlock->changed.pixelShaderConstantsI |= (1 << i); - - if (!device->isRecordingState) - device_invalidate_state(device, STATE_PIXELSHADERCONSTANT); + if (device->recording) + { + for (i = start_register; i < count + start_register; ++i) + device->recording->changed.pixelShaderConstantsI |= (1 << i); + } + else + { + device_invalidate_shader_constants(device, WINED3D_SHADER_CONST_PS_I); + } return WINED3D_OK; } @@ -3036,7 +3075,7 @@ HRESULT CDECL wined3d_device_get_ps_consts_i(const struct wined3d_device *device if (!constants || start_register >= MAX_CONST_I) return WINED3DERR_INVALIDCALL; - memcpy(constants, &device->stateBlock->state.ps_consts_i[start_register * 4], count * sizeof(int) * 4); + memcpy(constants, &device->state.ps_consts_i[start_register * 4], count * sizeof(int) * 4); return WINED3D_OK; } @@ -3045,6 +3084,7 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device, UINT start_register, const float *constants, UINT vector4f_count) { UINT i; + const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; TRACE("device %p, start_register %u, constants %p, vector4f_count %u.\n", device, start_register, constants, vector4f_count); @@ -3052,11 +3092,11 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device, /* Specifically test start_register > limit to catch MAX_UINT overflows * when adding start_register + vector4f_count. */ if (!constants - || start_register + vector4f_count > device->d3d_pshader_constantF - || start_register > device->d3d_pshader_constantF) + || start_register + vector4f_count > d3d_info->limits.ps_uniform_count + || start_register > d3d_info->limits.ps_uniform_count) return WINED3DERR_INVALIDCALL; - memcpy(&device->updateStateBlock->state.ps_consts_f[start_register * 4], + memcpy(&device->update_state->ps_consts_f[start_register * 4], constants, vector4f_count * sizeof(float) * 4); if (TRACE_ON(d3d)) { @@ -3066,14 +3106,11 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device, constants[i * 4 + 2], constants[i * 4 + 3]); } - if (!device->isRecordingState) - { + if (device->recording) + memset(device->recording->changed.pixelShaderConstantsF + start_register, 1, + sizeof(*device->recording->changed.pixelShaderConstantsF) * vector4f_count); + else device->shader_backend->shader_update_float_pixel_constants(device, start_register, vector4f_count); - device_invalidate_state(device, STATE_PIXELSHADERCONSTANT); - } - - memset(device->updateStateBlock->changed.pixelShaderConstantsF + start_register, 1, - sizeof(*device->updateStateBlock->changed.pixelShaderConstantsF) * vector4f_count); return WINED3D_OK; } @@ -3081,7 +3118,8 @@ HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device, HRESULT CDECL wined3d_device_get_ps_consts_f(const struct wined3d_device *device, UINT start_register, float *constants, UINT vector4f_count) { - int count = min(vector4f_count, device->d3d_pshader_constantF - start_register); + const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; + int count = min(vector4f_count, d3d_info->limits.ps_uniform_count - start_register); TRACE("device %p, start_register %u, constants %p, vector4f_count %u.\n", device, start_register, constants, vector4f_count); @@ -3089,14 +3127,14 @@ HRESULT CDECL wined3d_device_get_ps_consts_f(const struct wined3d_device *device if (!constants || count < 0) return WINED3DERR_INVALIDCALL; - memcpy(constants, &device->stateBlock->state.ps_consts_f[start_register * 4], count * sizeof(float) * 4); + memcpy(constants, &device->state.ps_consts_f[start_register * 4], count * sizeof(float) * 4); return WINED3D_OK; } void CDECL wined3d_device_set_geometry_shader(struct wined3d_device *device, struct wined3d_shader *shader) { - struct wined3d_shader *prev = device->updateStateBlock->state.geometry_shader; + struct wined3d_shader *prev = device->update_state->geometry_shader; TRACE("device %p, shader %p.\n", device, shader); @@ -3105,9 +3143,9 @@ void CDECL wined3d_device_set_geometry_shader(struct wined3d_device *device, str if (prev) wined3d_shader_decref(prev); - device->updateStateBlock->state.geometry_shader = shader; + device->update_state->geometry_shader = shader; - if (device->isRecordingState || shader == prev) + if (device->recording || shader == prev) return; device_invalidate_state(device, STATE_GEOMETRY_SHADER); @@ -3117,7 +3155,7 @@ struct wined3d_shader * CDECL wined3d_device_get_geometry_shader(const struct wi { TRACE("device %p.\n", device); - return device->stateBlock->state.geometry_shader; + return device->state.geometry_shader; } void CDECL wined3d_device_set_gs_cb(struct wined3d_device *device, UINT idx, struct wined3d_buffer *buffer) @@ -3132,10 +3170,10 @@ void CDECL wined3d_device_set_gs_cb(struct wined3d_device *device, UINT idx, str return; } - prev = device->updateStateBlock->state.gs_cb[idx]; - device->updateStateBlock->state.gs_cb[idx] = buffer; + prev = device->update_state->gs_cb[idx]; + device->update_state->gs_cb[idx] = buffer; - if (device->isRecordingState) + if (device->recording) { if (buffer) wined3d_buffer_incref(buffer); @@ -3169,7 +3207,7 @@ struct wined3d_buffer * CDECL wined3d_device_get_gs_cb(const struct wined3d_devi return NULL; } - return device->stateBlock->state.gs_cb[idx]; + return device->state.gs_cb[idx]; } void CDECL wined3d_device_set_gs_sampler(struct wined3d_device *device, UINT idx, struct wined3d_sampler *sampler) @@ -3184,8 +3222,8 @@ void CDECL wined3d_device_set_gs_sampler(struct wined3d_device *device, UINT idx return; } - prev = device->updateStateBlock->state.gs_sampler[idx]; - device->updateStateBlock->state.gs_sampler[idx] = sampler; + prev = device->update_state->gs_sampler[idx]; + device->update_state->gs_sampler[idx] = sampler; if (sampler) wined3d_sampler_incref(sampler); @@ -3203,7 +3241,7 @@ struct wined3d_sampler * CDECL wined3d_device_get_gs_sampler(const struct wined3 return NULL; } - return device->stateBlock->state.gs_sampler[idx]; + return device->state.gs_sampler[idx]; } /* Context activation is done by the caller. */ @@ -3233,7 +3271,7 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO return WINED3DERR_INVALIDCALL; } - if (device->stateBlock->state.render_states[WINED3D_RS_CLIPPING]) + if (device->state.render_states[WINED3D_RS_CLIPPING]) { static BOOL warned = FALSE; /* @@ -3479,7 +3517,7 @@ HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device, UINT src_start_idx, UINT dst_idx, UINT vertex_count, struct wined3d_buffer *dst_buffer, const struct wined3d_vertex_declaration *declaration, DWORD flags, DWORD dst_fvf) { - struct wined3d_state *state = &device->stateBlock->state; + struct wined3d_state *state = &device->state; struct wined3d_stream_info stream_info; const struct wined3d_gl_info *gl_info; struct wined3d_context *context; @@ -3540,7 +3578,7 @@ HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device, void CDECL wined3d_device_set_texture_stage_state(struct wined3d_device *device, UINT stage, enum wined3d_texture_stage_state state, DWORD value) { - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; DWORD old_value; TRACE("device %p, stage %u, state %s, value %#x.\n", @@ -3552,20 +3590,20 @@ void CDECL wined3d_device_set_texture_stage_state(struct wined3d_device *device, return; } - if (stage >= gl_info->limits.texture_stages) + if (stage >= d3d_info->limits.ffp_blend_stages) { WARN("Attempting to set stage %u which is higher than the max stage %u, ignoring.\n", - stage, gl_info->limits.texture_stages - 1); + stage, d3d_info->limits.ffp_blend_stages - 1); return; } - old_value = device->updateStateBlock->state.texture_states[stage][state]; - device->updateStateBlock->changed.textureState[stage] |= 1 << state; - device->updateStateBlock->state.texture_states[stage][state] = value; + old_value = device->update_state->texture_states[stage][state]; + device->update_state->texture_states[stage][state] = value; - if (device->isRecordingState) + if (device->recording) { TRACE("Recording... not performing anything.\n"); + device->recording->changed.textureState[stage] |= 1 << state; return; } @@ -3576,7 +3614,7 @@ void CDECL wined3d_device_set_texture_stage_state(struct wined3d_device *device, return; } - if (stage > device->stateBlock->state.lowest_disabled_stage + if (stage > device->state.lowest_disabled_stage && device->StateTable[STATE_TEXTURESTAGE(0, state)].representative == STATE_TEXTURESTAGE(0, WINED3D_TSS_COLOR_OP)) { @@ -3596,12 +3634,12 @@ void CDECL wined3d_device_set_texture_stage_state(struct wined3d_device *device, * all enabled stages above stage, they have to be disabled. * * The current stage is dirtified below. */ - for (i = stage + 1; i < device->stateBlock->state.lowest_disabled_stage; ++i) + for (i = stage + 1; i < device->state.lowest_disabled_stage; ++i) { TRACE("Additionally dirtifying stage %u.\n", i); device_invalidate_state(device, STATE_TEXTURESTAGE(i, WINED3D_TSS_COLOR_OP)); } - device->stateBlock->state.lowest_disabled_stage = stage; + device->state.lowest_disabled_stage = stage; TRACE("New lowest disabled: %u.\n", stage); } else if (value != WINED3D_TOP_DISABLE && old_value == WINED3D_TOP_DISABLE) @@ -3614,14 +3652,14 @@ void CDECL wined3d_device_set_texture_stage_state(struct wined3d_device *device, * * Again stage stage doesn't need to be dirtified here, it is * handled below. */ - for (i = stage + 1; i < gl_info->limits.texture_stages; ++i) + for (i = stage + 1; i < d3d_info->limits.ffp_blend_stages; ++i) { - if (device->updateStateBlock->state.texture_states[i][WINED3D_TSS_COLOR_OP] == WINED3D_TOP_DISABLE) + if (device->update_state->texture_states[i][WINED3D_TSS_COLOR_OP] == WINED3D_TOP_DISABLE) break; TRACE("Additionally dirtifying stage %u due to enable.\n", i); device_invalidate_state(device, STATE_TEXTURESTAGE(i, WINED3D_TSS_COLOR_OP)); } - device->stateBlock->state.lowest_disabled_stage = i; + device->state.lowest_disabled_stage = i; TRACE("New lowest disabled: %u.\n", i); } } @@ -3641,13 +3679,13 @@ DWORD CDECL wined3d_device_get_texture_stage_state(const struct wined3d_device * return 0; } - return device->updateStateBlock->state.texture_states[stage][state]; + return device->state.texture_states[stage][state]; } HRESULT CDECL wined3d_device_set_texture(struct wined3d_device *device, UINT stage, struct wined3d_texture *texture) { - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; struct wined3d_texture *prev; TRACE("device %p, stage %u, texture %p.\n", device, stage, texture); @@ -3656,7 +3694,7 @@ HRESULT CDECL wined3d_device_set_texture(struct wined3d_device *device, stage -= (WINED3DVERTEXTEXTURESAMPLER0 - MAX_FRAGMENT_SAMPLERS); /* Windows accepts overflowing this array... we do not. */ - if (stage >= sizeof(device->stateBlock->state.textures) / sizeof(*device->stateBlock->state.textures)) + if (stage >= sizeof(device->state.textures) / sizeof(*device->state.textures)) { WARN("Ignoring invalid stage %u.\n", stage); return WINED3D_OK; @@ -3668,9 +3706,10 @@ HRESULT CDECL wined3d_device_set_texture(struct wined3d_device *device, return WINED3DERR_INVALIDCALL; } - device->updateStateBlock->changed.textures |= 1 << stage; + if (device->recording) + device->recording->changed.textures |= 1 << stage; - prev = device->updateStateBlock->state.textures[stage]; + prev = device->update_state->textures[stage]; TRACE("Previous texture %p.\n", prev); if (texture == prev) @@ -3680,9 +3719,9 @@ HRESULT CDECL wined3d_device_set_texture(struct wined3d_device *device, } TRACE("Setting new texture to %p.\n", texture); - device->updateStateBlock->state.textures[stage] = texture; + device->update_state->textures[stage] = texture; - if (device->isRecordingState) + if (device->recording) { TRACE("Recording... not performing anything\n"); @@ -3701,7 +3740,7 @@ HRESULT CDECL wined3d_device_set_texture(struct wined3d_device *device, if (!prev || texture->target != prev->target) device_invalidate_state(device, STATE_PIXELSHADER); - if (!prev && stage < gl_info->limits.texture_stages) + if (!prev && stage < d3d_info->limits.ffp_blend_stages) { /* The source arguments for color and alpha ops have different * meanings when a NULL texture is bound, so the COLOR_OP and @@ -3718,7 +3757,7 @@ HRESULT CDECL wined3d_device_set_texture(struct wined3d_device *device, { LONG bind_count = InterlockedDecrement(&prev->resource.bind_count); - if (!texture && stage < gl_info->limits.texture_stages) + if (!texture && stage < d3d_info->limits.ffp_blend_stages) { device_invalidate_state(device, STATE_TEXTURESTAGE(stage, WINED3D_TSS_COLOR_OP)); device_invalidate_state(device, STATE_TEXTURESTAGE(stage, WINED3D_TSS_ALPHA_OP)); @@ -3733,7 +3772,7 @@ HRESULT CDECL wined3d_device_set_texture(struct wined3d_device *device, TRACE("Searching for other stages the texture is bound to.\n"); for (i = 0; i < MAX_COMBINED_SAMPLERS; ++i) { - if (device->updateStateBlock->state.textures[i] == prev) + if (device->update_state->textures[i] == prev) { TRACE("Texture is also bound to stage %u.\n", i); prev->sampler = i; @@ -3757,13 +3796,13 @@ struct wined3d_texture * CDECL wined3d_device_get_texture(const struct wined3d_d if (stage >= WINED3DVERTEXTEXTURESAMPLER0 && stage <= WINED3DVERTEXTEXTURESAMPLER3) stage -= (WINED3DVERTEXTEXTURESAMPLER0 - MAX_FRAGMENT_SAMPLERS); - if (stage >= sizeof(device->stateBlock->state.textures) / sizeof(*device->stateBlock->state.textures)) + if (stage >= sizeof(device->state.textures) / sizeof(*device->state.textures)) { WARN("Ignoring invalid stage %u.\n", stage); return NULL; /* Windows accepts overflowing this array ... we do not. */ } - return device->stateBlock->state.textures[stage]; + return device->state.textures[stage]; } HRESULT CDECL wined3d_device_get_back_buffer(const struct wined3d_device *device, UINT swapchain_idx, @@ -3811,16 +3850,15 @@ HRESULT CDECL wined3d_device_begin_stateblock(struct wined3d_device *device) TRACE("device %p.\n", device); - if (device->isRecordingState) + if (device->recording) return WINED3DERR_INVALIDCALL; hr = wined3d_stateblock_create(device, WINED3D_SBT_RECORDED, &stateblock); if (FAILED(hr)) return hr; - wined3d_stateblock_decref(device->updateStateBlock); - device->updateStateBlock = stateblock; - device->isRecordingState = TRUE; + device->recording = stateblock; + device->update_state = &stateblock->state; TRACE("Recording stateblock %p.\n", stateblock); @@ -3830,11 +3868,11 @@ HRESULT CDECL wined3d_device_begin_stateblock(struct wined3d_device *device) HRESULT CDECL wined3d_device_end_stateblock(struct wined3d_device *device, struct wined3d_stateblock **stateblock) { - struct wined3d_stateblock *object = device->updateStateBlock; + struct wined3d_stateblock *object = device->recording; TRACE("device %p, stateblock %p.\n", device, stateblock); - if (!device->isRecordingState) + if (!device->recording) { WARN("Not recording.\n"); *stateblock = NULL; @@ -3844,9 +3882,8 @@ HRESULT CDECL wined3d_device_end_stateblock(struct wined3d_device *device, stateblock_init_contained_states(object); *stateblock = object; - device->isRecordingState = FALSE; - device->updateStateBlock = device->stateBlock; - wined3d_stateblock_incref(device->updateStateBlock); + device->recording = NULL; + device->update_state = &device->state; TRACE("Returning stateblock %p.\n", *stateblock); @@ -3944,7 +3981,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou } } - wined3d_get_draw_rect(&device->stateBlock->state, &draw_rect); + wined3d_get_draw_rect(&device->state, &draw_rect); device_clear_render_targets(device, device->adapter->gl_info.limits.buffers, &device->fb, rect_count, rects, &draw_rect, flags, color, depth, stencil); @@ -3954,10 +3991,17 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device, enum wined3d_primitive_type primitive_type) { + GLenum gl_primitive_type, prev; + TRACE("device %p, primitive_type %s\n", device, debug_d3dprimitivetype(primitive_type)); - device->updateStateBlock->changed.primitive_type = TRUE; - device->updateStateBlock->state.gl_primitive_type = gl_primitive_type_from_d3d(primitive_type); + gl_primitive_type = gl_primitive_type_from_d3d(primitive_type); + prev = device->update_state->gl_primitive_type; + device->update_state->gl_primitive_type = gl_primitive_type; + if (device->recording) + device->recording->changed.primitive_type = TRUE; + else if (gl_primitive_type != prev && (gl_primitive_type == GL_POINTS || prev == GL_POINTS)) + device_invalidate_state(device, STATE_POINT_SIZE_ENABLE); } void CDECL wined3d_device_get_primitive_type(const struct wined3d_device *device, @@ -3965,7 +4009,7 @@ void CDECL wined3d_device_get_primitive_type(const struct wined3d_device *device { TRACE("device %p, primitive_type %p\n", device, primitive_type); - *primitive_type = d3d_primitive_type_from_gl(device->stateBlock->state.gl_primitive_type); + *primitive_type = d3d_primitive_type_from_gl(device->state.gl_primitive_type); TRACE("Returning %s\n", debug_d3dprimitivetype(*primitive_type)); } @@ -3974,21 +4018,21 @@ HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT { TRACE("device %p, start_vertex %u, vertex_count %u.\n", device, start_vertex, vertex_count); - if (!device->stateBlock->state.vertex_declaration) + if (!device->state.vertex_declaration) { WARN("Called without a valid vertex declaration set.\n"); return WINED3DERR_INVALIDCALL; } - if (device->stateBlock->state.load_base_vertex_index) + if (device->state.load_base_vertex_index) { - device->stateBlock->state.load_base_vertex_index = 0; + device->state.load_base_vertex_index = 0; device_invalidate_state(device, STATE_BASEVERTEXINDEX); } /* Account for the loading offset due to index buffers. Instead of * reloading all sources correct it with the startvertex parameter. */ - draw_primitive(device, start_vertex, vertex_count, 0, 0, FALSE, NULL); + draw_primitive(device, start_vertex, vertex_count, 0, 0, FALSE); return WINED3D_OK; } @@ -3998,7 +4042,7 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic TRACE("device %p, start_idx %u, index_count %u.\n", device, start_idx, index_count); - if (!device->stateBlock->state.index_buffer) + if (!device->state.index_buffer) { /* D3D9 returns D3DERR_INVALIDCALL when DrawIndexedPrimitive is called * without an index buffer set. (The first time at least...) @@ -4008,20 +4052,20 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *devic return WINED3DERR_INVALIDCALL; } - if (!device->stateBlock->state.vertex_declaration) + if (!device->state.vertex_declaration) { WARN("Called without a valid vertex declaration set.\n"); return WINED3DERR_INVALIDCALL; } if (!gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX] && - device->stateBlock->state.load_base_vertex_index != device->stateBlock->state.base_vertex_index) + device->state.load_base_vertex_index != device->state.base_vertex_index) { - device->stateBlock->state.load_base_vertex_index = device->stateBlock->state.base_vertex_index; + device->state.load_base_vertex_index = device->state.base_vertex_index; device_invalidate_state(device, STATE_BASEVERTEXINDEX); } - draw_primitive(device, start_idx, index_count, 0, 0, TRUE, NULL); + draw_primitive(device, start_idx, index_count, 0, 0, TRUE); return WINED3D_OK; } @@ -4031,7 +4075,7 @@ void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device { TRACE("device %p, start_idx %u, index_count %u.\n", device, start_idx, index_count); - draw_primitive(device, start_idx, index_count, start_instance, instance_count, TRUE, NULL); + draw_primitive(device, start_idx, index_count, start_instance, instance_count, TRUE); } /* This is a helper function for UpdateTexture, there is no UpdateVolume method in D3D. */ @@ -4039,29 +4083,41 @@ static HRESULT device_update_volume(struct wined3d_device *device, struct wined3d_volume *src_volume, struct wined3d_volume *dst_volume) { struct wined3d_map_desc src; - struct wined3d_map_desc dst; HRESULT hr; + struct wined3d_bo_address data; + struct wined3d_context *context; TRACE("device %p, src_volume %p, dst_volume %p.\n", device, src_volume, dst_volume); - /* TODO: Implement direct loading into the gl volume instead of using - * memcpy and dirtification to improve loading performance. */ - if (FAILED(hr = wined3d_volume_map(src_volume, &src, NULL, WINED3D_MAP_READONLY))) - return hr; - if (FAILED(hr = wined3d_volume_map(dst_volume, &dst, NULL, WINED3D_MAP_DISCARD))) + if (src_volume->resource.format != dst_volume->resource.format) { - wined3d_volume_unmap(src_volume); - return hr; + FIXME("Source and destination formats do not match.\n"); + return WINED3DERR_INVALIDCALL; + } + if (src_volume->resource.width != dst_volume->resource.width + || src_volume->resource.height != dst_volume->resource.height + || src_volume->resource.depth != dst_volume->resource.depth) + { + FIXME("Source and destination sizes do not match.\n"); + return WINED3DERR_INVALIDCALL; } - memcpy(dst.data, src.data, dst_volume->resource.size); + if (FAILED(hr = wined3d_volume_map(src_volume, &src, NULL, WINED3D_MAP_READONLY))) + return hr; - hr = wined3d_volume_unmap(dst_volume); - if (FAILED(hr)) - wined3d_volume_unmap(src_volume); - else - hr = wined3d_volume_unmap(src_volume); + context = context_acquire(device, NULL); + + wined3d_volume_load(dst_volume, context, FALSE); + + data.buffer_object = 0; + data.addr = src.data; + wined3d_volume_upload_data(dst_volume, context, &data); + wined3d_volume_invalidate_location(dst_volume, ~WINED3D_LOCATION_TEXTURE_RGB); + + context_release(context); + + hr = wined3d_volume_unmap(src_volume); return hr; } @@ -4082,9 +4138,14 @@ HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device, return WINED3DERR_INVALIDCALL; } - if (src_texture == dst_texture) + if (src_texture->resource.pool != WINED3D_POOL_SYSTEM_MEM) { - WARN("Source and destination are the same object, returning WINED3DERR_INVALIDCALL.\n"); + WARN("Source texture not in WINED3D_POOL_SYSTEM_MEM, returning WINED3DERR_INVALIDCALL.\n"); + return WINED3DERR_INVALIDCALL; + } + if (dst_texture->resource.pool != WINED3D_POOL_DEFAULT) + { + WARN("Destination texture not in WINED3D_POOL_DEFAULT, returning WINED3DERR_INVALIDCALL.\n"); return WINED3DERR_INVALIDCALL; } @@ -4187,7 +4248,7 @@ HRESULT CDECL wined3d_device_get_front_buffer_data(const struct wined3d_device * HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes) { - const struct wined3d_state *state = &device->stateBlock->state; + const struct wined3d_state *state = &device->state; struct wined3d_texture *texture; DWORD i; @@ -4211,18 +4272,18 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device if (state->sampler_states[i][WINED3D_SAMP_MAG_FILTER] != WINED3D_TEXF_POINT) { - WARN("Non-filterable texture and mag filter enabled on samper %u, returning E_FAIL\n", i); + WARN("Non-filterable texture and mag filter enabled on sampler %u, returning E_FAIL\n", i); return E_FAIL; } if (state->sampler_states[i][WINED3D_SAMP_MIN_FILTER] != WINED3D_TEXF_POINT) { - WARN("Non-filterable texture and min filter enabled on samper %u, returning E_FAIL\n", i); + WARN("Non-filterable texture and min filter enabled on sampler %u, returning E_FAIL\n", i); return E_FAIL; } if (state->sampler_states[i][WINED3D_SAMP_MIP_FILTER] != WINED3D_TEXF_NONE && state->sampler_states[i][WINED3D_SAMP_MIP_FILTER] != WINED3D_TEXF_POINT) { - WARN("Non-filterable texture and mip filter enabled on samper %u, returning E_FAIL\n", i); + WARN("Non-filterable texture and mip filter enabled on sampler %u, returning E_FAIL\n", i); return E_FAIL; } } @@ -4441,7 +4502,7 @@ HRESULT CDECL wined3d_device_set_render_target(struct wined3d_device *device, * primary stateblock. */ if (!render_target_idx && set_viewport) { - struct wined3d_state *state = &device->stateBlock->state; + struct wined3d_state *state = &device->state; state->viewport.x = 0; state->viewport.y = 0; @@ -4603,12 +4664,6 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device context = context_acquire(device, NULL); - if (gl_info->supported[APPLE_CLIENT_STORAGE]) - { - gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE); - checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE)"); - } - invalidate_active_texture(device, context); /* Create a new cursor texture */ gl_info->gl_ops.gl.p_glGenTextures(1, &device->cursorTexture); @@ -4619,12 +4674,6 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device checkGLcall("glTexImage2D"); HeapFree(GetProcessHeap(), 0, mem); - if (gl_info->supported[APPLE_CLIENT_STORAGE]) - { - gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE); - checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE)"); - } - context_release(context); } else @@ -4814,7 +4863,8 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, stru struct wined3d_surface *target; HRESULT hr; - if (FAILED(hr = device->shader_backend->shader_alloc_private(device, device->adapter->fragment_pipe))) + if (FAILED(hr = device->shader_backend->shader_alloc_private(device, + device->adapter->vertex_pipe, device->adapter->fragment_pipe))) { ERR("Failed to allocate shader private data, hr %#x.\n", hr); return hr; @@ -4865,6 +4915,8 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, struct wined3d_display_mode m; BOOL DisplayModeChanged = FALSE; BOOL update_desc = FALSE; + UINT backbuffer_width = swapchain_desc->backbuffer_width; + UINT backbuffer_height = swapchain_desc->backbuffer_height; HRESULT hr = WINED3D_OK; unsigned int i; @@ -4877,7 +4929,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, } if (reset_state) - stateblock_unbind_resources(device->stateBlock); + state_unbind_resources(&device->state); if (device->fb.render_targets) { @@ -4956,13 +5008,23 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, if (swapchain_desc->enable_auto_depth_stencil && !device->auto_depth_stencil) { + struct wined3d_resource_desc surface_desc; + TRACE("Creating the depth stencil buffer\n"); + surface_desc.resource_type = WINED3D_RTYPE_SURFACE; + surface_desc.format = swapchain_desc->auto_depth_stencil_format; + surface_desc.multisample_type = swapchain_desc->multisample_type; + surface_desc.multisample_quality = swapchain_desc->multisample_quality; + surface_desc.usage = WINED3DUSAGE_DEPTHSTENCIL; + surface_desc.pool = WINED3D_POOL_DEFAULT; + surface_desc.width = swapchain_desc->backbuffer_width; + surface_desc.height = swapchain_desc->backbuffer_height; + surface_desc.depth = 1; + surface_desc.size = 0; + if (FAILED(hr = device->device_parent->ops->create_swapchain_surface(device->device_parent, - device->device_parent, swapchain_desc->backbuffer_width, swapchain_desc->backbuffer_height, - swapchain_desc->auto_depth_stencil_format, WINED3DUSAGE_DEPTHSTENCIL, - swapchain_desc->multisample_type, swapchain_desc->multisample_quality, - &device->auto_depth_stencil))) + device->device_parent, &surface_desc, &device->auto_depth_stencil))) { ERR("Failed to create the depth stencil buffer, hr %#x.\n", hr); return WINED3DERR_INVALIDCALL; @@ -4980,11 +5042,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, } else if (swapchain_desc->windowed) { - m.width = swapchain->orig_width; - m.height = swapchain->orig_height; - m.refresh_rate = 0; - m.format_id = swapchain->desc.backbuffer_format; - m.scanline_ordering = WINED3D_SCANLINE_ORDERING_UNKNOWN; + m = swapchain->original_mode; } else { @@ -4995,16 +5053,38 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, m.scanline_ordering = WINED3D_SCANLINE_ORDERING_UNKNOWN; } - /* Should Width == 800 && Height == 0 set 800x600? */ - if (swapchain_desc->backbuffer_width && swapchain_desc->backbuffer_height - && (swapchain_desc->backbuffer_width != swapchain->desc.backbuffer_width - || swapchain_desc->backbuffer_height != swapchain->desc.backbuffer_height)) + if (!backbuffer_width || !backbuffer_height) + { + /* The application is requesting that either the swapchain width or + * height be set to the corresponding dimension in the window's + * client rect. */ + + RECT client_rect; + + if (!swapchain_desc->windowed) + return WINED3DERR_INVALIDCALL; + + if (!GetClientRect(swapchain->device_window, &client_rect)) + { + ERR("Failed to get client rect, last error %#x.\n", GetLastError()); + return WINED3DERR_INVALIDCALL; + } + + if (!backbuffer_width) + backbuffer_width = client_rect.right; + + if (!backbuffer_height) + backbuffer_height = client_rect.bottom; + } + + if (backbuffer_width != swapchain->desc.backbuffer_width + || backbuffer_height != swapchain->desc.backbuffer_height) { if (!swapchain_desc->windowed) DisplayModeChanged = TRUE; - swapchain->desc.backbuffer_width = swapchain_desc->backbuffer_width; - swapchain->desc.backbuffer_height = swapchain_desc->backbuffer_height; + swapchain->desc.backbuffer_width = backbuffer_width; + swapchain->desc.backbuffer_height = backbuffer_height; update_desc = TRUE; } @@ -5112,27 +5192,25 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, if (reset_state) { TRACE("Resetting stateblock.\n"); - wined3d_stateblock_decref(device->updateStateBlock); - wined3d_stateblock_decref(device->stateBlock); + if (device->recording) + { + wined3d_stateblock_decref(device->recording); + device->recording = NULL; + } + state_cleanup(&device->state); if (device->d3d_initialized) delete_opengl_contexts(device, swapchain); - /* Note: No parent needed for initial internal stateblock */ - hr = wined3d_stateblock_create(device, WINED3D_SBT_INIT, &device->stateBlock); - if (FAILED(hr)) - ERR("Resetting the stateblock failed with error %#x.\n", hr); - else - TRACE("Created stateblock %p.\n", device->stateBlock); - device->updateStateBlock = device->stateBlock; - wined3d_stateblock_incref(device->updateStateBlock); - - stateblock_init_default_state(device->stateBlock); + if (FAILED(hr = state_init(&device->state, &device->adapter->d3d_info))) + ERR("Failed to initialize device state, hr %#x.\n", hr); + state_init_default(&device->state, device); + device->update_state = &device->state; } else { struct wined3d_surface *rt = device->fb.render_targets[0]; - struct wined3d_state *state = &device->stateBlock->state; + struct wined3d_state *state = &device->state; /* Note the min_z / max_z is not reset. */ state->viewport.x = 0; @@ -5257,19 +5335,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso { struct wined3d_texture *texture = wined3d_texture_from_resource(resource); - if (device->stateBlock && device->stateBlock->state.textures[i] == texture) + if (device->state.textures[i] == texture) { - ERR("Texture %p is still in use by stateblock %p, stage %u.\n", - texture, device->stateBlock, i); - device->stateBlock->state.textures[i] = NULL; + ERR("Texture %p is still in use, stage %u.\n", texture, i); + device->state.textures[i] = NULL; } - if (device->updateStateBlock != device->stateBlock - && device->updateStateBlock->state.textures[i] == texture) + if (device->recording && device->update_state->textures[i] == texture) { - ERR("Texture %p is still in use by stateblock %p, stage %u.\n", - texture, device->updateStateBlock, i); - device->updateStateBlock->state.textures[i] = NULL; + ERR("Texture %p is still in use by recording stateblock %p, stage %u.\n", + texture, device->recording, i); + device->update_state->textures[i] = NULL; } } break; @@ -5280,36 +5356,31 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso for (i = 0; i < MAX_STREAMS; ++i) { - if (device->stateBlock && device->stateBlock->state.streams[i].buffer == buffer) + if (device->state.streams[i].buffer == buffer) { - ERR("Buffer %p is still in use by stateblock %p, stream %u.\n", - buffer, device->stateBlock, i); - device->stateBlock->state.streams[i].buffer = NULL; + ERR("Buffer %p is still in use, stream %u.\n", buffer, i); + device->state.streams[i].buffer = NULL; } - if (device->updateStateBlock != device->stateBlock - && device->updateStateBlock->state.streams[i].buffer == buffer) + if (device->recording && device->update_state->streams[i].buffer == buffer) { ERR("Buffer %p is still in use by stateblock %p, stream %u.\n", - buffer, device->updateStateBlock, i); - device->updateStateBlock->state.streams[i].buffer = NULL; + buffer, device->recording, i); + device->update_state->streams[i].buffer = NULL; } - } - if (device->stateBlock && device->stateBlock->state.index_buffer == buffer) + if (device->state.index_buffer == buffer) { - ERR("Buffer %p is still in use by stateblock %p as index buffer.\n", - buffer, device->stateBlock); - device->stateBlock->state.index_buffer = NULL; + ERR("Buffer %p is still in use as index buffer.\n", buffer); + device->state.index_buffer = NULL; } - if (device->updateStateBlock != device->stateBlock - && device->updateStateBlock->state.index_buffer == buffer) + if (device->recording && device->update_state->index_buffer == buffer) { ERR("Buffer %p is still in use by stateblock %p as index buffer.\n", - buffer, device->updateStateBlock); - device->updateStateBlock->state.index_buffer = NULL; + buffer, device->recording); + device->update_state->index_buffer = NULL; } } break; @@ -5356,8 +5427,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d, { struct wined3d_adapter *adapter = &wined3d->adapters[adapter_idx]; const struct fragment_pipeline *fragment_pipeline; - struct shader_caps shader_caps; - struct fragment_caps ffp_caps; + const struct wined3d_vertex_pipe_ops *vertex_pipeline; unsigned int i; HRESULT hr; @@ -5377,21 +5447,15 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d, device->create_parms.flags = flags; device->shader_backend = adapter->shader_backend; - device->shader_backend->shader_get_caps(&adapter->gl_info, &shader_caps); - device->vs_version = shader_caps.vs_version; - device->gs_version = shader_caps.gs_version; - device->ps_version = shader_caps.ps_version; - device->d3d_vshader_constantF = shader_caps.vs_uniform_count; - device->d3d_pshader_constantF = shader_caps.ps_uniform_count; - device->vs_clipping = shader_caps.wined3d_caps & WINED3D_SHADER_CAP_VS_CLIPPING; + + vertex_pipeline = adapter->vertex_pipe; fragment_pipeline = adapter->fragment_pipe; - fragment_pipeline->get_caps(&adapter->gl_info, &ffp_caps); - device->max_ffp_textures = ffp_caps.MaxSimultaneousTextures; - if (fragment_pipeline->states + if (vertex_pipeline->vp_states && fragment_pipeline->states && FAILED(hr = compile_state_table(device->StateTable, device->multistate_funcs, - &adapter->gl_info, ffp_vertexstate_template, fragment_pipeline, misc_state_template))) + &adapter->gl_info, &adapter->d3d_info, vertex_pipeline, + fragment_pipeline, misc_state_template))) { ERR("Failed to compile state table, hr %#x.\n", hr); wined3d_decref(device->wined3d); @@ -5400,10 +5464,9 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d, device->blitter = adapter->blitter; - hr = wined3d_stateblock_create(device, WINED3D_SBT_INIT, &device->stateBlock); - if (FAILED(hr)) + if (FAILED(hr = state_init(&device->state, &adapter->d3d_info))) { - WARN("Failed to create stateblock.\n"); + ERR("Failed to initialize device state, hr %#x.\n", hr); for (i = 0; i < sizeof(device->multistate_funcs) / sizeof(device->multistate_funcs[0]); ++i) { HeapFree(GetProcessHeap(), 0, device->multistate_funcs[i]); @@ -5411,10 +5474,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d, wined3d_decref(device->wined3d); return hr; } - - TRACE("Created stateblock %p.\n", device->stateBlock); - device->updateStateBlock = device->stateBlock; - wined3d_stateblock_incref(device->updateStateBlock); + device->update_state = &device->state; return WINED3D_OK; } diff --git a/dll/directx/wine/wined3d/directx.c b/dll/directx/wine/wined3d/directx.c index dd0ec430096..ad9f549b410 100644 --- a/dll/directx/wine/wined3d/directx.c +++ b/dll/directx/wine/wined3d/directx.c @@ -30,8 +30,10 @@ //#include "winternl.h" WINE_DEFAULT_DEBUG_CHANNEL(d3d); +WINE_DECLARE_DEBUG_CHANNEL(d3d_perf); #define WINE_DEFAULT_VIDMEM (64 * 1024 * 1024) +#define DEFAULT_REFRESH_RATE 0 /* The driver names reflect the lowest GPU supported * by a certain driver, so DRIVER_AMD_R300 supports @@ -92,6 +94,7 @@ static const struct wined3d_extension_map gl_extension_map[] = /* ARB */ {"GL_ARB_color_buffer_float", ARB_COLOR_BUFFER_FLOAT }, + {"GL_ARB_debug_output", ARB_DEBUG_OUTPUT }, {"GL_ARB_depth_buffer_float", ARB_DEPTH_BUFFER_FLOAT }, {"GL_ARB_depth_clamp", ARB_DEPTH_CLAMP }, {"GL_ARB_depth_texture", ARB_DEPTH_TEXTURE }, @@ -106,6 +109,7 @@ static const struct wined3d_extension_map gl_extension_map[] = {"GL_ARB_half_float_pixel", ARB_HALF_FLOAT_PIXEL }, {"GL_ARB_half_float_vertex", ARB_HALF_FLOAT_VERTEX }, {"GL_ARB_instanced_arrays", ARB_INSTANCED_ARRAYS, }, + {"GL_ARB_internalformat_query2", ARB_INTERNALFORMAT_QUERY2, }, {"GL_ARB_map_buffer_alignment", ARB_MAP_BUFFER_ALIGNMENT }, {"GL_ARB_map_buffer_range", ARB_MAP_BUFFER_RANGE }, {"GL_ARB_multisample", ARB_MULTISAMPLE }, /* needs GLX_ARB_MULTISAMPLE as well */ @@ -161,7 +165,6 @@ static const struct wined3d_extension_map gl_extension_map[] = {"GL_EXT_gpu_program_parameters", EXT_GPU_PROGRAM_PARAMETERS }, {"GL_EXT_gpu_shader4", EXT_GPU_SHADER4 }, {"GL_EXT_packed_depth_stencil", EXT_PACKED_DEPTH_STENCIL }, - {"GL_EXT_paletted_texture", EXT_PALETTED_TEXTURE }, {"GL_EXT_point_parameters", EXT_POINT_PARAMETERS }, {"GL_EXT_provoking_vertex", EXT_PROVOKING_VERTEX }, {"GL_EXT_secondary_color", EXT_SECONDARY_COLOR }, @@ -252,20 +255,6 @@ const GLenum magLookup_noFilter[] = GL_NEAREST, GL_NEAREST, GL_NEAREST, }; -/* drawStridedSlow attributes */ -glAttribFunc position_funcs[WINED3D_FFP_EMIT_COUNT]; -glAttribFunc diffuse_funcs[WINED3D_FFP_EMIT_COUNT]; -glAttribFunc specular_func_3ubv; -glAttribFunc specular_funcs[WINED3D_FFP_EMIT_COUNT]; -glAttribFunc normal_funcs[WINED3D_FFP_EMIT_COUNT]; -glMultiTexCoordFunc multi_texcoord_funcs[WINED3D_FFP_EMIT_COUNT]; - -/** - * Note: GL seems to trap if GetDeviceCaps is called before any HWND's created, - * i.e., there is no GL Context - Get a default rendering context to enable the - * function query some info from GL. - */ - struct wined3d_fake_gl_ctx { HDC dc; @@ -295,6 +284,35 @@ static void WineD3D_ReleaseFakeGLContext(const struct wined3d_fake_gl_ctx *ctx) ERR("Failed to restore previous GL context.\n"); } +static void wined3d_create_fake_gl_context_attribs(struct wined3d_fake_gl_ctx *fake_gl_ctx, + struct wined3d_gl_info *gl_info, const GLint *ctx_attribs) +{ + HGLRC new_ctx; + + if (!(gl_info->p_wglCreateContextAttribsARB = (void *)wglGetProcAddress("wglCreateContextAttribsARB"))) + return; + + if (!(new_ctx = gl_info->p_wglCreateContextAttribsARB(fake_gl_ctx->dc, NULL, ctx_attribs))) + { + ERR("Failed to create a context using wglCreateContextAttribsARB(), last error %#x.\n", GetLastError()); + gl_info->p_wglCreateContextAttribsARB = NULL; + return; + } + + if (!wglMakeCurrent(fake_gl_ctx->dc, new_ctx)) + { + ERR("Failed to make new context current, last error %#x.\n", GetLastError()); + if (!wglDeleteContext(new_ctx)) + ERR("Failed to delete new context, last error %#x.\n", GetLastError()); + gl_info->p_wglCreateContextAttribsARB = NULL; + return; + } + + if (!wglDeleteContext(fake_gl_ctx->gl_ctx)) + ERR("Failed to delete old context, last error %#x.\n", GetLastError()); + fake_gl_ctx->gl_ctx = new_ctx; +} + /* Do not call while under the GL lock. */ static BOOL WineD3D_CreateFakeGLContext(struct wined3d_fake_gl_ctx *ctx) { @@ -553,7 +571,7 @@ static void test_pbo_functionality(struct wined3d_gl_info *gl_info) if (memcmp(check, pattern, sizeof(check))) { - WARN("PBO test failed, read back data doesn't match original.\n" + WARN_(d3d_perf)("PBO test failed, read back data doesn't match original.\n" "Disabling PBOs. This may result in slower performance.\n"); gl_info->supported[ARB_PIXEL_BUFFER_OBJECT] = FALSE; } @@ -759,6 +777,101 @@ static BOOL match_r200(const struct wined3d_gl_info *gl_info, const char *gl_ren return FALSE; } +static BOOL match_broken_arb_fog(const struct wined3d_gl_info *gl_info, const char *gl_renderer, + enum wined3d_gl_vendor gl_vendor, enum wined3d_pci_vendor card_vendor, enum wined3d_pci_device device) +{ + DWORD data[4]; + GLuint tex, fbo; + GLenum status; + float color[4] = {0.0f, 1.0f, 0.0f, 0.0f}; + GLuint prog; + GLint err_pos; + static const char *program_code = + "!!ARBfp1.0\n" + "OPTION ARB_fog_linear;\n" + "MOV result.color, {1.0, 0.0, 0.0, 0.0};\n" + "END\n"; + + if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) + return FALSE; + if (!gl_info->supported[ARB_FRAGMENT_PROGRAM]) + return FALSE; + + gl_info->gl_ops.gl.p_glGenTextures(1, &tex); + gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, tex); + gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + gl_info->gl_ops.gl.p_glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, 4, 1, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, NULL); + checkGLcall("glTexImage2D"); + + gl_info->fbo_ops.glGenFramebuffers(1, &fbo); + gl_info->fbo_ops.glBindFramebuffer(GL_FRAMEBUFFER, fbo); + gl_info->fbo_ops.glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tex, 0); + checkGLcall("glFramebufferTexture2D"); + + status = gl_info->fbo_ops.glCheckFramebufferStatus(GL_FRAMEBUFFER); + if (status != GL_FRAMEBUFFER_COMPLETE) ERR("FBO status %#x\n", status); + checkGLcall("glCheckFramebufferStatus"); + + gl_info->gl_ops.gl.p_glClearColor(0.0f, 0.0f, 1.0f, 0.0f); + gl_info->gl_ops.gl.p_glClear(GL_COLOR_BUFFER_BIT); + checkGLcall("glClear"); + gl_info->gl_ops.gl.p_glViewport(0, 0, 4, 1); + checkGLcall("glViewport"); + + gl_info->gl_ops.gl.p_glEnable(GL_FOG); + gl_info->gl_ops.gl.p_glFogf(GL_FOG_START, 0.5f); + gl_info->gl_ops.gl.p_glFogf(GL_FOG_END, 0.5f); + gl_info->gl_ops.gl.p_glFogi(GL_FOG_MODE, GL_LINEAR); + gl_info->gl_ops.gl.p_glHint(GL_FOG_HINT, GL_NICEST); + gl_info->gl_ops.gl.p_glFogfv(GL_FOG_COLOR, color); + checkGLcall("fog setup"); + + GL_EXTCALL(glGenProgramsARB(1, &prog)); + GL_EXTCALL(glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, prog)); + GL_EXTCALL(glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, + strlen(program_code), program_code)); + gl_info->gl_ops.gl.p_glEnable(GL_FRAGMENT_PROGRAM_ARB); + checkGLcall("Test fragment program setup"); + + gl_info->gl_ops.gl.p_glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &err_pos); + if (err_pos != -1) + { + const char *error_str; + error_str = (const char *)gl_info->gl_ops.gl.p_glGetString(GL_PROGRAM_ERROR_STRING_ARB); + FIXME("Fog test program error at position %d: %s\n\n", err_pos, debugstr_a(error_str)); + } + + gl_info->gl_ops.gl.p_glBegin(GL_TRIANGLE_STRIP); + gl_info->gl_ops.gl.p_glVertex3f(-1.0f, -1.0f, 0.0f); + gl_info->gl_ops.gl.p_glVertex3f( 1.0f, -1.0f, 1.0f); + gl_info->gl_ops.gl.p_glVertex3f(-1.0f, 1.0f, 0.0f); + gl_info->gl_ops.gl.p_glVertex3f( 1.0f, 1.0f, 1.0f); + gl_info->gl_ops.gl.p_glEnd(); + checkGLcall("ARBfp fog test draw"); + + gl_info->gl_ops.gl.p_glGetTexImage(GL_TEXTURE_2D, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, data); + checkGLcall("glGetTexImage"); + data[0] &= 0x00ffffff; + data[1] &= 0x00ffffff; + data[2] &= 0x00ffffff; + data[3] &= 0x00ffffff; + + gl_info->fbo_ops.glBindFramebuffer(GL_FRAMEBUFFER, 0); + gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, 0); + + gl_info->fbo_ops.glDeleteFramebuffers(1, &fbo); + gl_info->gl_ops.gl.p_glDeleteTextures(1, &tex); + gl_info->gl_ops.gl.p_glDisable(GL_FOG); + GL_EXTCALL(glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, 0)); + gl_info->gl_ops.gl.p_glDisable(GL_FRAGMENT_PROGRAM_ARB); + GL_EXTCALL(glDeleteProgramsARB(1, &prog)); + checkGLcall("ARBfp fog test teardown"); + + TRACE("Fog test data: %08x %08x %08x %08x\n", data[0], data[1], data[2], data[3]); + return data[0] != 0x00ff0000 || data[3] != 0x0000ff00; +} + static void quirk_apple_glsl_constants(struct wined3d_gl_info *gl_info) { /* MacOS needs uniforms for relative addressing offsets. This can accumulate to quite a few uniforms. @@ -882,6 +995,11 @@ static void quirk_r200_constants(struct wined3d_gl_info *gl_info) gl_info->reserved_arb_constants = max(gl_info->reserved_arb_constants, 1); } +static void quirk_broken_arb_fog(struct wined3d_gl_info *gl_info) +{ + gl_info->quirks |= WINED3D_QUIRK_BROKEN_ARB_FOG; +} + struct driver_quirk { BOOL (*match)(const struct wined3d_gl_info *gl_info, const char *gl_renderer, @@ -967,6 +1085,11 @@ static const struct driver_quirk quirk_table[] = quirk_r200_constants, "r200 vertex shader constants" }, + { + match_broken_arb_fog, + quirk_broken_arb_fog, + "ARBfp fogstart == fogend workaround" + }, }; /* Certain applications (Steam) complain if we report an outdated driver version. In general, @@ -1097,7 +1220,9 @@ static const struct gpu_description gpu_description_table[] = {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX260, "NVIDIA GeForce GTX 260", DRIVER_NVIDIA_GEFORCE6, 1024}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX275, "NVIDIA GeForce GTX 275", DRIVER_NVIDIA_GEFORCE6, 896 }, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX280, "NVIDIA GeForce GTX 280", DRIVER_NVIDIA_GEFORCE6, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_315M, "NVIDIA GeForce 315M", DRIVER_NVIDIA_GEFORCE6, 512 }, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_320M, "NVIDIA GeForce 320M", DRIVER_NVIDIA_GEFORCE6, 256}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_410M, "NVIDIA GeForce 410M", DRIVER_NVIDIA_GEFORCE6, 512}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT320M, "NVIDIA GeForce GT 320M", DRIVER_NVIDIA_GEFORCE6, 1024}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT325M, "NVIDIA GeForce GT 325M", DRIVER_NVIDIA_GEFORCE6, 1024}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT330, "NVIDIA GeForce GT 330", DRIVER_NVIDIA_GEFORCE6, 1024}, @@ -1120,6 +1245,7 @@ static const struct gpu_description gpu_description_table[] = {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX570, "NVIDIA GeForce GTX 570", DRIVER_NVIDIA_GEFORCE6, 1280}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX580, "NVIDIA GeForce GTX 580", DRIVER_NVIDIA_GEFORCE6, 1536}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT610, "NVIDIA GeForce GT 610", DRIVER_NVIDIA_GEFORCE6, 1024}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT630, "NVIDIA GeForce GT 630", DRIVER_NVIDIA_GEFORCE6, 1024}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT630M, "NVIDIA GeForce GT 630M", DRIVER_NVIDIA_GEFORCE6, 1024}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT640M, "NVIDIA GeForce GT 640M", DRIVER_NVIDIA_GEFORCE6, 1024}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT650M, "NVIDIA GeForce GT 650M", DRIVER_NVIDIA_GEFORCE6, 2048}, @@ -1128,7 +1254,10 @@ static const struct gpu_description gpu_description_table[] = {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX660, "NVIDIA GeForce GTX 660", DRIVER_NVIDIA_GEFORCE6, 2048}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX660TI, "NVIDIA GeForce GTX 660 Ti", DRIVER_NVIDIA_GEFORCE6, 2048}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX670, "NVIDIA GeForce GTX 670", DRIVER_NVIDIA_GEFORCE6, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX670MX, "NVIDIA GeForce GTX 670MX", DRIVER_NVIDIA_GEFORCE6, 3072}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX680, "NVIDIA GeForce GTX 680", DRIVER_NVIDIA_GEFORCE6, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX770M, "NVIDIA GeForce GTX 770M", DRIVER_NVIDIA_GEFORCE6, 3072}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX770, "NVIDIA GeForce GTX 770", DRIVER_NVIDIA_GEFORCE6, 2048}, /* AMD cards */ {HW_VENDOR_AMD, CARD_AMD_RAGE_128PRO, "ATI Rage Fury", DRIVER_AMD_RAGE_128PRO, 16 }, @@ -1142,6 +1271,7 @@ static const struct gpu_description gpu_description_table[] = {HW_VENDOR_AMD, CARD_AMD_RADEON_HD2600, "ATI Mobility Radeon HD 2600", DRIVER_AMD_R600, 256 }, {HW_VENDOR_AMD, CARD_AMD_RADEON_HD2900, "ATI Radeon HD 2900 XT", DRIVER_AMD_R600, 512 }, {HW_VENDOR_AMD, CARD_AMD_RADEON_HD3200, "ATI Radeon HD 3200 Graphics", DRIVER_AMD_R600, 128 }, + {HW_VENDOR_AMD, CARD_AMD_RADEON_HD4200M, "ATI Mobility Radeon HD 4200", DRIVER_AMD_R600, 256 }, {HW_VENDOR_AMD, CARD_AMD_RADEON_HD4350, "ATI Radeon HD 4350", DRIVER_AMD_R600, 256 }, {HW_VENDOR_AMD, CARD_AMD_RADEON_HD4600, "ATI Radeon HD 4600 Series", DRIVER_AMD_R600, 512 }, {HW_VENDOR_AMD, CARD_AMD_RADEON_HD4700, "ATI Radeon HD 4700 Series", DRIVER_AMD_R600, 512 }, @@ -1280,14 +1410,19 @@ static void init_driver_info(struct wined3d_driver_info *driver_info, driver_os_version = 7; driver_model = DRIVER_MODEL_NT6X; } + else if (os_version.dwMinorVersion == 1) + { + driver_os_version = 8; + driver_model = DRIVER_MODEL_NT6X; + } else { - if (os_version.dwMinorVersion > 1) + if (os_version.dwMinorVersion > 2) { - FIXME("Unhandled OS version %u.%u, reporting Win 7.\n", + FIXME("Unhandled OS version %u.%u, reporting Win 8.\n", os_version.dwMajorVersion, os_version.dwMinorVersion); } - driver_os_version = 8; + driver_os_version = 9; driver_model = DRIVER_MODEL_NT6X; } break; @@ -1525,7 +1660,10 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl } cards[] = { + {"GTX 770M", CARD_NVIDIA_GEFORCE_GTX770M}, /* Geforce 700 - midend high mobile */ + {"GTX 770", CARD_NVIDIA_GEFORCE_GTX770}, /* Geforce 700 - highend */ {"GTX 680", CARD_NVIDIA_GEFORCE_GTX680}, /* Geforce 600 - highend */ + {"GTX 670MX", CARD_NVIDIA_GEFORCE_GTX670MX}, /* Geforce 600 - highend */ {"GTX 670", CARD_NVIDIA_GEFORCE_GTX670}, /* Geforce 600 - midend high */ {"GTX 660 Ti", CARD_NVIDIA_GEFORCE_GTX660TI}, /* Geforce 600 - midend high */ {"GTX 660", CARD_NVIDIA_GEFORCE_GTX660}, /* Geforce 600 - midend high */ @@ -1534,6 +1672,7 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl {"GT 650M", CARD_NVIDIA_GEFORCE_GT650M}, /* Geforce 600 - midend mobile */ {"GT 640M", CARD_NVIDIA_GEFORCE_GT640M}, /* Geforce 600 - midend mobile */ {"GT 630M", CARD_NVIDIA_GEFORCE_GT630M}, /* Geforce 600 - midend mobile */ + {"GT 630", CARD_NVIDIA_GEFORCE_GT630}, /* Geforce 600 - lowend */ {"GT 610", CARD_NVIDIA_GEFORCE_GT610}, /* Geforce 600 - lowend */ {"GTX 580", CARD_NVIDIA_GEFORCE_GTX580}, /* Geforce 500 - highend */ {"GTX 570", CARD_NVIDIA_GEFORCE_GTX570}, /* Geforce 500 - midend high */ @@ -1552,6 +1691,7 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl {"GT 440", CARD_NVIDIA_GEFORCE_GT440}, /* Geforce 400 - lowend */ {"GT 430", CARD_NVIDIA_GEFORCE_GT430}, /* Geforce 400 - lowend */ {"GT 420", CARD_NVIDIA_GEFORCE_GT420}, /* Geforce 400 - lowend */ + {"410M", CARD_NVIDIA_GEFORCE_410M}, /* Geforce 400 - lowend mobile */ {"GT 330", CARD_NVIDIA_GEFORCE_GT330}, /* Geforce 300 - highend */ {"GTS 360M", CARD_NVIDIA_GEFORCE_GTS350M}, /* Geforce 300 - highend mobile */ {"GTS 350M", CARD_NVIDIA_GEFORCE_GTS350M}, /* Geforce 300 - highend mobile */ @@ -1559,6 +1699,7 @@ static enum wined3d_pci_device select_card_nvidia_binary(const struct wined3d_gl {"GT 325M", CARD_NVIDIA_GEFORCE_GT325M}, /* Geforce 300 - midend mobile */ {"GT 320M", CARD_NVIDIA_GEFORCE_GT320M}, /* Geforce 300 - midend mobile */ {"320M", CARD_NVIDIA_GEFORCE_320M}, /* Geforce 300 - midend mobile */ + {"315M", CARD_NVIDIA_GEFORCE_315M}, /* Geforce 300 - midend mobile */ {"GTX 295", CARD_NVIDIA_GEFORCE_GTX280}, /* Geforce 200 - highend */ {"GTX 285", CARD_NVIDIA_GEFORCE_GTX280}, /* Geforce 200 - highend */ {"GTX 280", CARD_NVIDIA_GEFORCE_GTX280}, /* Geforce 200 - highend */ @@ -1769,6 +1910,7 @@ static enum wined3d_pci_device select_card_amd_binary(const struct wined3d_gl_in {"HD 4550", CARD_AMD_RADEON_HD4350}, /* Radeon RV710 */ {"HD 4350", CARD_AMD_RADEON_HD4350}, /* Radeon RV710 */ /* R600/R700 integrated */ + {"HD 4200M", CARD_AMD_RADEON_HD4200M}, {"HD 3300", CARD_AMD_RADEON_HD3200}, {"HD 3200", CARD_AMD_RADEON_HD3200}, {"HD 3100", CARD_AMD_RADEON_HD3200}, @@ -1944,7 +2086,7 @@ static enum wined3d_pci_device select_card_amd_mesa(const struct wined3d_gl_info {"RV730", CARD_AMD_RADEON_HD4600}, {"RV710", CARD_AMD_RADEON_HD4350}, /* R600/R700 integrated */ - {"RS880", CARD_AMD_RADEON_HD3200}, + {"RS880", CARD_AMD_RADEON_HD4200M}, {"RS780", CARD_AMD_RADEON_HD3200}, /* R600 */ {"R680", CARD_AMD_RADEON_HD2900}, @@ -2011,6 +2153,7 @@ static enum wined3d_pci_device select_card_nvidia_mesa(const struct wined3d_gl_i cards[] = { /* Kepler */ + {"NVE6", CARD_NVIDIA_GEFORCE_GTX770M}, {"NVE4", CARD_NVIDIA_GEFORCE_GTX680}, /* Fermi */ {"NVD9", CARD_NVIDIA_GEFORCE_GT520}, @@ -2247,7 +2390,7 @@ static enum wined3d_pci_device wined3d_guess_card(const struct wined3d_gl_info * * memory behind our backs if really needed. Note that the amount of video * memory can be overruled using a registry setting. */ - int i; + unsigned int i; enum wined3d_pci_device device; for (i = 0; i < (sizeof(card_vendor_table) / sizeof(*card_vendor_table)); ++i) @@ -2273,6 +2416,14 @@ static enum wined3d_pci_device wined3d_guess_card(const struct wined3d_gl_info * return select_card_fallback_nvidia(gl_info); } +static const struct wined3d_vertex_pipe_ops *select_vertex_implementation(const struct wined3d_gl_info *gl_info, + const struct wined3d_shader_backend_ops *shader_backend_ops) +{ + if (shader_backend_ops == &glsl_shader_backend) + return &glsl_vertex_pipe; + return &ffp_vertex_pipe; +} + static const struct fragment_pipeline *select_fragment_implementation(const struct wined3d_gl_info *gl_info, const struct wined3d_shader_backend_ops *shader_backend_ops) { @@ -2415,7 +2566,7 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info) } else { - WARN("Driver doesn't guarantee a minimum buffer map alignment.\n"); + WARN_(d3d_perf)("Driver doesn't guarantee a minimum buffer map alignment.\n"); } if (gl_info->supported[NV_REGISTER_COMBINERS]) { @@ -2582,14 +2733,17 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter) struct wined3d_driver_info *driver_info = &adapter->driver_info; const char *gl_vendor_str, *gl_renderer_str, *gl_version_str; struct wined3d_gl_info *gl_info = &adapter->gl_info; + struct wined3d_vertex_caps vertex_caps; enum wined3d_pci_vendor card_vendor; struct fragment_caps fragment_caps; + struct shader_caps shader_caps; const char *WGL_Extensions = NULL; const char *GL_Extensions = NULL; enum wined3d_gl_vendor gl_vendor; enum wined3d_pci_device device; DWORD gl_version; HDC hdc; + unsigned int i; TRACE("adapter %p.\n", adapter); @@ -2768,6 +2922,15 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter) * we never render to sRGB surfaces). */ gl_info->supported[ARB_FRAMEBUFFER_SRGB] = FALSE; } + if (gl_info->supported[ARB_OCCLUSION_QUERY]) + { + GLint counter_bits; + + GL_EXTCALL(glGetQueryivARB(GL_SAMPLES_PASSED_ARB, GL_QUERY_COUNTER_BITS_ARB, &counter_bits)); + TRACE("Occlusion query counter has %d bits.\n", counter_bits); + if (!counter_bits) + gl_info->supported[ARB_OCCLUSION_QUERY] = FALSE; + } wined3d_adapter_init_limits(gl_info); @@ -2789,12 +2952,25 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter) checkGLcall("extension detection"); adapter->shader_backend = select_shader_backend(gl_info); + adapter->vertex_pipe = select_vertex_implementation(gl_info, adapter->shader_backend); adapter->fragment_pipe = select_fragment_implementation(gl_info, adapter->shader_backend); adapter->blitter = select_blit_implementation(gl_info, adapter->shader_backend); + adapter->shader_backend->shader_get_caps(&adapter->gl_info, &shader_caps); + adapter->d3d_info.vs_clipping = shader_caps.wined3d_caps & WINED3D_SHADER_CAP_VS_CLIPPING; + adapter->d3d_info.limits.vs_version = shader_caps.vs_version; + adapter->d3d_info.limits.gs_version = shader_caps.gs_version; + adapter->d3d_info.limits.ps_version = shader_caps.ps_version; + adapter->d3d_info.limits.vs_uniform_count = shader_caps.vs_uniform_count; + adapter->d3d_info.limits.ps_uniform_count = shader_caps.ps_uniform_count; + + adapter->vertex_pipe->vp_get_caps(gl_info, &vertex_caps); + adapter->d3d_info.xyzrhw = vertex_caps.xyzrhw; + adapter->fragment_pipe->get_caps(gl_info, &fragment_caps); - gl_info->limits.texture_stages = fragment_caps.MaxTextureBlendStages; - TRACE("Max texture stages: %u.\n", gl_info->limits.texture_stages); + adapter->d3d_info.limits.ffp_blend_stages = fragment_caps.MaxTextureBlendStages; + adapter->d3d_info.limits.ffp_textures = fragment_caps.MaxSimultaneousTextures; + TRACE("Max texture stages: %u.\n", adapter->d3d_info.limits.ffp_blend_stages); if (gl_info->supported[ARB_FRAMEBUFFER_OBJECT]) { @@ -2844,7 +3020,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter) } else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { - WARN("Framebuffer objects not supported, falling back to backbuffer offscreen rendering mode.\n"); + WARN_(d3d_perf)("Framebuffer objects not supported, falling back to backbuffer offscreen rendering mode.\n"); wined3d_settings.offscreen_rendering_mode = ORM_BACKBUFFER; } if (gl_info->supported[EXT_FRAMEBUFFER_BLIT]) @@ -2874,6 +3050,10 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter) gl_info->wrap_lookup[WINED3D_TADDRESS_MIRROR_ONCE - WINED3D_TADDRESS_WRAP] = gl_info->supported[ATI_TEXTURE_MIRROR_ONCE] ? GL_MIRROR_CLAMP_TO_EDGE_ATI : GL_REPEAT; + adapter->d3d_info.valid_rt_mask = 0; + for (i = 0; i < gl_info->limits.buffers; ++i) + adapter->d3d_info.valid_rt_mask |= (1 << i); + fixup_extensions(gl_info, gl_renderer_str, gl_vendor, card_vendor, device); init_driver_info(driver_info, card_vendor, device); add_gl_compat_wrappers(gl_info); @@ -3599,6 +3779,14 @@ static BOOL CheckSurfaceCapability(const struct wined3d_adapter *adapter, return FALSE; } +/* OpenGL supports mipmapping on all formats. Wrapping is unsupported, but we + * have to report mipmapping so we cannot reject WRAPANDMIP. Tests show that + * Windows reports WRAPANDMIP on unfilterable surfaces as well, apparently to + * show that wrapping is supported. The lack of filtering will sort out the + * mipmapping capability anyway. + * + * For now lets report this on all formats, but in the future we may want to + * restrict it to some should applications need that. */ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT adapter_idx, enum wined3d_device_type device_type, enum wined3d_format_id adapter_format_id, DWORD usage, enum wined3d_resource_type resource_type, enum wined3d_format_id check_format_id) @@ -3607,7 +3795,8 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad const struct wined3d_gl_info *gl_info = &adapter->gl_info; const struct wined3d_format *adapter_format = wined3d_get_format(gl_info, adapter_format_id); const struct wined3d_format *format = wined3d_get_format(gl_info, check_format_id); - DWORD usage_caps = 0; + DWORD format_flags = 0; + DWORD allowed_usage; TRACE("wined3d %p, adapter_idx %u, device_type %s, adapter_format %s, usage %s, %s,\n" "resource_type %s, check_format %s.\n", @@ -3621,375 +3810,94 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad switch (resource_type) { case WINED3D_RTYPE_CUBE_TEXTURE: - /* Cubetexture allows: - * - WINED3DUSAGE_AUTOGENMIPMAP - * - WINED3DUSAGE_DEPTHSTENCIL - * - WINED3DUSAGE_DYNAMIC - * - WINED3DUSAGE_NONSECURE (d3d9ex) - * - WINED3DUSAGE_RENDERTARGET - * - WINED3DUSAGE_SOFTWAREPROCESSING - * - WINED3DUSAGE_QUERY_WRAPANDMIP - */ - if (wined3d->flags & WINED3D_NO3D) - { - TRACE("[FAILED]\n"); - return WINED3DERR_NOTAVAILABLE; - } - if (!gl_info->supported[ARB_TEXTURE_CUBE_MAP]) { TRACE("[FAILED] - No cube texture support.\n"); return WINED3DERR_NOTAVAILABLE; } - if (!(format->flags & WINED3DFMT_FLAG_TEXTURE)) - { - TRACE("[FAILED] - Cube texture format not supported.\n"); - return WINED3DERR_NOTAVAILABLE; - } - - if (usage & WINED3DUSAGE_AUTOGENMIPMAP) - { - if (!gl_info->supported[SGIS_GENERATE_MIPMAP]) - /* When autogenmipmap isn't around continue and return - * WINED3DOK_NOAUTOGEN instead of D3D_OK. */ - TRACE("[FAILED] - No autogenmipmap support, but continuing.\n"); - else - usage_caps |= WINED3DUSAGE_AUTOGENMIPMAP; - } - - /* Always report dynamic locking. */ - if (usage & WINED3DUSAGE_DYNAMIC) - usage_caps |= WINED3DUSAGE_DYNAMIC; - - if (usage & WINED3DUSAGE_RENDERTARGET) - { - if (!CheckRenderTargetCapability(adapter, adapter_format, format)) - { - TRACE("[FAILED] - No render target support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_RENDERTARGET; - } - - /* Always report software processing. */ - if (usage & WINED3DUSAGE_SOFTWAREPROCESSING) - usage_caps |= WINED3DUSAGE_SOFTWAREPROCESSING; - - if (usage & WINED3DUSAGE_QUERY_FILTER) - { - if (!(format->flags & WINED3DFMT_FLAG_FILTERING)) - { - TRACE("[FAILED] - No filter support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_QUERY_FILTER; - } - - if (usage & WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING) - { - if (!(format->flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING)) - { - TRACE("[FAILED] - No post pixelshader blending support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING; - } - - if (usage & WINED3DUSAGE_QUERY_SRGBREAD) - { - if (!(format->flags & WINED3DFMT_FLAG_SRGB_READ)) - { - TRACE("[FAILED] - No sRGB read support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_QUERY_SRGBREAD; - } - - if (usage & WINED3DUSAGE_QUERY_SRGBWRITE) - { - if (!(format->flags & WINED3DFMT_FLAG_SRGB_WRITE)) - { - TRACE("[FAILED] - No sRGB write support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_QUERY_SRGBWRITE; - } - - if (usage & WINED3DUSAGE_QUERY_VERTEXTEXTURE) - { - if (!(format->flags & WINED3DFMT_FLAG_VTF)) - { - TRACE("[FAILED] - No vertex texture support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_QUERY_VERTEXTEXTURE; - } - - /* OpenGL supports mipmapping on all formats. Wrapping is - * unsupported, but we have to report mipmapping so we cannot - * reject this flag. Tests show that Windows reports WRAPANDMIP on - * unfilterable surfaces as well, apparently to show that wrapping - * is supported. The lack of filtering will sort out the - * mipmapping capability anyway. - * - * For now lets report this on all formats, but in the future we - * may want to restrict it to some should applications need that. */ - if (usage & WINED3DUSAGE_QUERY_WRAPANDMIP) - usage_caps |= WINED3DUSAGE_QUERY_WRAPANDMIP; - + format_flags |= WINED3DFMT_FLAG_TEXTURE; + allowed_usage = WINED3DUSAGE_AUTOGENMIPMAP + | WINED3DUSAGE_DYNAMIC + | WINED3DUSAGE_RENDERTARGET + | WINED3DUSAGE_SOFTWAREPROCESSING + | WINED3DUSAGE_QUERY_FILTER + | WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING + | WINED3DUSAGE_QUERY_SRGBREAD + | WINED3DUSAGE_QUERY_SRGBWRITE + | WINED3DUSAGE_QUERY_VERTEXTEXTURE + | WINED3DUSAGE_QUERY_WRAPANDMIP; break; case WINED3D_RTYPE_SURFACE: - /* Surface allows: - * - WINED3DUSAGE_DEPTHSTENCIL - * - WINED3DUSAGE_NONSECURE (d3d9ex) - * - WINED3DUSAGE_RENDERTARGET - */ if (!CheckSurfaceCapability(adapter, adapter_format, format, wined3d->flags & WINED3D_NO3D)) { TRACE("[FAILED] - Not supported for plain surfaces.\n"); return WINED3DERR_NOTAVAILABLE; } - if (usage & WINED3DUSAGE_DEPTHSTENCIL) - { - if (!CheckDepthStencilCapability(adapter, adapter_format, format)) - { - TRACE("[FAILED] - No depth/stencil support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_DEPTHSTENCIL; - } - - if (usage & WINED3DUSAGE_RENDERTARGET) - { - if (!CheckRenderTargetCapability(adapter, adapter_format, format)) - { - TRACE("[FAILED] - No render target support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_RENDERTARGET; - } - - if (usage & WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING) - { - if (!(format->flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING)) - { - TRACE("[FAILED] - No post pixelshader blending support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING; - } + allowed_usage = WINED3DUSAGE_DEPTHSTENCIL + | WINED3DUSAGE_RENDERTARGET + | WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING; break; case WINED3D_RTYPE_TEXTURE: - /* Texture allows: - * - WINED3DUSAGE_AUTOGENMIPMAP - * - WINED3DUSAGE_DEPTHSTENCIL - * - WINED3DUSAGE_DMAP - * - WINED3DUSAGE_DYNAMIC - * - WINED3DUSAGE_NONSECURE (d3d9ex) - * - WINED3DUSAGE_RENDERTARGET - * - WINED3DUSAGE_SOFTWAREPROCESSING - * - WINED3DUSAGE_TEXTAPI (d3d9ex) - * - WINED3DUSAGE_QUERY_WRAPANDMIP - */ - if (wined3d->flags & WINED3D_NO3D) + if ((usage & WINED3DUSAGE_DEPTHSTENCIL) && (format->flags & WINED3DFMT_FLAG_SHADOW) + && !gl_info->supported[ARB_SHADOW]) { - TRACE("[FAILED]\n"); + TRACE("[FAILED] - No shadow sampler support.\n"); return WINED3DERR_NOTAVAILABLE; } - if (!(format->flags & WINED3DFMT_FLAG_TEXTURE)) - { - TRACE("[FAILED] - Texture format not supported.\n"); - return WINED3DERR_NOTAVAILABLE; - } - - if (usage & WINED3DUSAGE_AUTOGENMIPMAP) - { - if (!gl_info->supported[SGIS_GENERATE_MIPMAP]) - /* When autogenmipmap isn't around continue and return - * WINED3DOK_NOAUTOGEN instead of D3D_OK. */ - TRACE("[FAILED] - No autogenmipmap support, but continuing.\n"); - else - usage_caps |= WINED3DUSAGE_AUTOGENMIPMAP; - } - - /* Always report dynamic locking. */ - if (usage & WINED3DUSAGE_DYNAMIC) - usage_caps |= WINED3DUSAGE_DYNAMIC; - - if (usage & WINED3DUSAGE_RENDERTARGET) - { - if (!CheckRenderTargetCapability(adapter, adapter_format, format)) - { - TRACE("[FAILED] - No render target support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_RENDERTARGET; - } - - /* Always report software processing. */ - if (usage & WINED3DUSAGE_SOFTWAREPROCESSING) - usage_caps |= WINED3DUSAGE_SOFTWAREPROCESSING; - - if (usage & WINED3DUSAGE_QUERY_FILTER) - { - if (!(format->flags & WINED3DFMT_FLAG_FILTERING)) - { - TRACE("[FAILED] - No filter support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_QUERY_FILTER; - } - - if (usage & WINED3DUSAGE_QUERY_LEGACYBUMPMAP) - { - if (!(format->flags & WINED3DFMT_FLAG_BUMPMAP)) - { - TRACE("[FAILED] - No legacy bumpmap support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_QUERY_LEGACYBUMPMAP; - } - - if (usage & WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING) - { - if (!(format->flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING)) - { - TRACE("[FAILED] - No post pixelshader blending support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING; - } - - if (usage & WINED3DUSAGE_QUERY_SRGBREAD) - { - if (!(format->flags & WINED3DFMT_FLAG_SRGB_READ)) - { - TRACE("[FAILED] - No sRGB read support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_QUERY_SRGBREAD; - } - - if (usage & WINED3DUSAGE_QUERY_SRGBWRITE) - { - if (!(format->flags & WINED3DFMT_FLAG_SRGB_WRITE)) - { - TRACE("[FAILED] - No sRGB write support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_QUERY_SRGBWRITE; - } - - if (usage & WINED3DUSAGE_QUERY_VERTEXTEXTURE) - { - if (!(format->flags & WINED3DFMT_FLAG_VTF)) - { - TRACE("[FAILED] - No vertex texture support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_QUERY_VERTEXTEXTURE; - } - - if (usage & WINED3DUSAGE_QUERY_WRAPANDMIP) - usage_caps |= WINED3DUSAGE_QUERY_WRAPANDMIP; - - if (usage & WINED3DUSAGE_DEPTHSTENCIL) - { - if (!CheckDepthStencilCapability(adapter, adapter_format, format)) - { - TRACE("[FAILED] - No depth/stencil support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - if ((format->flags & WINED3DFMT_FLAG_SHADOW) && !gl_info->supported[ARB_SHADOW]) - { - TRACE("[FAILED] - No shadow sampler support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_DEPTHSTENCIL; - } + format_flags |= WINED3DFMT_FLAG_TEXTURE; + allowed_usage = WINED3DUSAGE_AUTOGENMIPMAP + | WINED3DUSAGE_DEPTHSTENCIL + | WINED3DUSAGE_DYNAMIC + | WINED3DUSAGE_RENDERTARGET + | WINED3DUSAGE_SOFTWAREPROCESSING + | WINED3DUSAGE_QUERY_FILTER + | WINED3DUSAGE_QUERY_LEGACYBUMPMAP + | WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING + | WINED3DUSAGE_QUERY_SRGBREAD + | WINED3DUSAGE_QUERY_SRGBWRITE + | WINED3DUSAGE_QUERY_VERTEXTEXTURE + | WINED3DUSAGE_QUERY_WRAPANDMIP; break; case WINED3D_RTYPE_VOLUME_TEXTURE: case WINED3D_RTYPE_VOLUME: /* Volume is to VolumeTexture what Surface is to Texture, but its * usage caps are not documented. Most driver seem to offer - * (nearly) the same on Volume and VolumeTexture, so do that too. - * - * Volumetexture allows: - * - D3DUSAGE_DYNAMIC - * - D3DUSAGE_NONSECURE (d3d9ex) - * - D3DUSAGE_SOFTWAREPROCESSING - * - D3DUSAGE_QUERY_WRAPANDMIP - */ - if (wined3d->flags & WINED3D_NO3D) - { - TRACE("[FAILED]\n"); - return WINED3DERR_NOTAVAILABLE; - } - + * (nearly) the same on Volume and VolumeTexture, so do that too. */ if (!gl_info->supported[EXT_TEXTURE3D]) { TRACE("[FAILED] - No volume texture support.\n"); return WINED3DERR_NOTAVAILABLE; } - if (!(format->flags & WINED3DFMT_FLAG_TEXTURE)) - { - TRACE("[FAILED] - Format not supported.\n"); - return WINED3DERR_NOTAVAILABLE; - } - /* Filter formats that need conversion; For one part, this * conversion is unimplemented, and volume textures are huge, so * it would be a big performance hit. Unless we hit an application * needing one of those formats, don't advertize them to avoid * leading applications into temptation. The windows drivers don't - * support most of those formats on volumes anyway, except for - * WINED3DFMT_R32_FLOAT. */ + * support most of those formats on volumes anyway. */ + if (format->convert) + { + TRACE("[FAILED] - No converted formats on volumes.\n"); + return WINED3DERR_NOTAVAILABLE; + } + + /* The GL_EXT_texture_compression_s3tc spec requires that loading + * an s3tc compressed texture results in an error. While the D3D + * refrast does support s3tc volumes, at least the nvidia Windows + * driver does not, so we're free not to support this format. */ switch (check_format_id) { - case WINED3DFMT_P8_UINT: - case WINED3DFMT_L4A4_UNORM: - case WINED3DFMT_R32_FLOAT: - case WINED3DFMT_R16_FLOAT: - case WINED3DFMT_R8G8_SNORM_L8X8_UNORM: - case WINED3DFMT_R5G5_SNORM_L6_UNORM: - case WINED3DFMT_R16G16_UNORM: - TRACE("[FAILED] - No converted formats on volumes.\n"); - return WINED3DERR_NOTAVAILABLE; - - case WINED3DFMT_R8G8B8A8_SNORM: - case WINED3DFMT_R16G16_SNORM: - if (!gl_info->supported[NV_TEXTURE_SHADER]) - { - TRACE("[FAILED] - No converted formats on volumes.\n"); - return WINED3DERR_NOTAVAILABLE; - } - break; - - case WINED3DFMT_R8G8_SNORM: - if (!gl_info->supported[NV_TEXTURE_SHADER]) - { - TRACE("[FAILED] - No converted formats on volumes.\n"); - return WINED3DERR_NOTAVAILABLE; - } - break; - case WINED3DFMT_DXT1: case WINED3DFMT_DXT2: case WINED3DFMT_DXT3: case WINED3DFMT_DXT4: case WINED3DFMT_DXT5: - /* The GL_EXT_texture_compression_s3tc spec requires that - * loading an s3tc compressed texture results in an error. - * While the D3D refrast does support s3tc volumes, at - * least the nvidia windows driver does not, so we're free - * not to support this format. */ TRACE("[FAILED] - DXTn does not support 3D textures.\n"); return WINED3DERR_NOTAVAILABLE; @@ -3998,67 +3906,15 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad break; } - /* Always report dynamic locking. */ - if (usage & WINED3DUSAGE_DYNAMIC) - usage_caps |= WINED3DUSAGE_DYNAMIC; - - /* Always report software processing. */ - if (usage & WINED3DUSAGE_SOFTWAREPROCESSING) - usage_caps |= WINED3DUSAGE_SOFTWAREPROCESSING; - - if (usage & WINED3DUSAGE_QUERY_FILTER) - { - if (!(format->flags & WINED3DFMT_FLAG_FILTERING)) - { - TRACE("[FAILED] - No filter support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_QUERY_FILTER; - } - - if (usage & WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING) - { - if (!(format->flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING)) - { - TRACE("[FAILED] - No post pixelshader blending support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING; - } - - if (usage & WINED3DUSAGE_QUERY_SRGBREAD) - { - if (!(format->flags & WINED3DFMT_FLAG_SRGB_READ)) - { - TRACE("[FAILED] - No sRGB read support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_QUERY_SRGBREAD; - } - - if (usage & WINED3DUSAGE_QUERY_SRGBWRITE) - { - if (!(format->flags & WINED3DFMT_FLAG_SRGB_WRITE)) - { - TRACE("[FAILED] - No sRGB write support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_QUERY_SRGBWRITE; - } - - if (usage & WINED3DUSAGE_QUERY_VERTEXTEXTURE) - { - if (!(format->flags & WINED3DFMT_FLAG_VTF)) - { - TRACE("[FAILED] - No vertex texture support.\n"); - return WINED3DERR_NOTAVAILABLE; - } - usage_caps |= WINED3DUSAGE_QUERY_VERTEXTEXTURE; - } - - if (usage & WINED3DUSAGE_QUERY_WRAPANDMIP) - usage_caps |= WINED3DUSAGE_QUERY_WRAPANDMIP; - + format_flags |= WINED3DFMT_FLAG_TEXTURE; + allowed_usage = WINED3DUSAGE_DYNAMIC + | WINED3DUSAGE_SOFTWAREPROCESSING + | WINED3DUSAGE_QUERY_FILTER + | WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING + | WINED3DUSAGE_QUERY_SRGBREAD + | WINED3DUSAGE_QUERY_SRGBWRITE + | WINED3DUSAGE_QUERY_VERTEXTEXTURE + | WINED3DUSAGE_QUERY_WRAPANDMIP; break; default: @@ -4066,18 +3922,62 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT ad return WINED3DERR_NOTAVAILABLE; } - /* When the usage_caps exactly matches usage return WINED3D_OK except for - * the situation in which WINED3DUSAGE_AUTOGENMIPMAP isn't around, then - * WINED3DOK_NOAUTOGEN is returned if all the other usage flags match. */ - if (usage_caps == usage) - return WINED3D_OK; - if (usage_caps == (usage & ~WINED3DUSAGE_AUTOGENMIPMAP)) + if ((usage & allowed_usage) != usage) + { + TRACE("Requested usage %#x, but resource type %s only allows %#x.\n", + usage, debug_d3dresourcetype(resource_type), allowed_usage); + return WINED3DERR_NOTAVAILABLE; + } + + if (usage & WINED3DUSAGE_QUERY_FILTER) + format_flags |= WINED3DFMT_FLAG_FILTERING; + if (usage & WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING) + format_flags |= WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING; + if (usage & WINED3DUSAGE_QUERY_SRGBREAD) + format_flags |= WINED3DFMT_FLAG_SRGB_READ; + if (usage & WINED3DUSAGE_QUERY_SRGBWRITE) + format_flags |= WINED3DFMT_FLAG_SRGB_WRITE; + if (usage & WINED3DUSAGE_QUERY_VERTEXTEXTURE) + format_flags |= WINED3DFMT_FLAG_VTF; + if (usage & WINED3DUSAGE_QUERY_LEGACYBUMPMAP) + format_flags |= WINED3DFMT_FLAG_BUMPMAP; + + if ((format->flags & format_flags) != format_flags) + { + TRACE("Requested format flags %#x, but format %s only has %#x.\n", + format_flags, debug_d3dformat(check_format_id), format->flags); + return WINED3DERR_NOTAVAILABLE; + } + + if ((format_flags & WINED3DFMT_FLAG_TEXTURE) && (wined3d->flags & WINED3D_NO3D)) + { + TRACE("Requested texturing support, but wined3d was created with WINED3D_NO3D.\n"); + return WINED3DERR_NOTAVAILABLE; + } + + if ((usage & WINED3DUSAGE_DEPTHSTENCIL) + && !CheckDepthStencilCapability(adapter, adapter_format, format)) + { + TRACE("Requested WINED3DUSAGE_DEPTHSTENCIL, but format %s is not supported for depth / stencil buffers.\n", + debug_d3dformat(check_format_id)); + return WINED3DERR_NOTAVAILABLE; + } + + if ((usage & WINED3DUSAGE_RENDERTARGET) + && !CheckRenderTargetCapability(adapter, adapter_format, format)) + { + TRACE("Requested WINED3DUSAGE_RENDERTARGET, but format %s is not supported for render targets.\n", + debug_d3dformat(check_format_id)); + return WINED3DERR_NOTAVAILABLE; + } + + if ((usage & WINED3DUSAGE_AUTOGENMIPMAP) && !gl_info->supported[SGIS_GENERATE_MIPMAP]) + { + TRACE("No WINED3DUSAGE_AUTOGENMIPMAP support, returning WINED3DOK_NOAUTOGEN.\n"); return WINED3DOK_NOAUTOGEN; + } - TRACE("[FAILED] - Usage %#x requested for format %s and resource_type %s but only %#x is available.\n", - usage, debug_d3dformat(check_format_id), debug_d3dresourcetype(resource_type), usage_caps); - - return WINED3DERR_NOTAVAILABLE; + return WINED3D_OK; } HRESULT CDECL wined3d_check_device_format_conversion(const struct wined3d *wined3d, UINT adapter_idx, @@ -4198,6 +4098,7 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte const struct wined3d_gl_info *gl_info = &adapter->gl_info; struct shader_caps shader_caps; struct fragment_caps fragment_caps; + struct wined3d_vertex_caps vertex_caps; DWORD ckey_caps, blit_caps, fx_caps, pal_caps; TRACE("wined3d %p, adapter_idx %u, device_type %s, caps %p.\n", @@ -4282,16 +4183,6 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte WINED3DPRASTERCAPS_ZBIAS | WINED3DPRASTERCAPS_MIPMAPLODBIAS; } - if (gl_info->supported[NV_FOG_DISTANCE]) - { - caps->RasterCaps |= WINED3DPRASTERCAPS_FOGRANGE; - } - /* FIXME Add: - WINED3DPRASTERCAPS_COLORPERSPECTIVE - WINED3DPRASTERCAPS_STRETCHBLTMULTISAMPLE - WINED3DPRASTERCAPS_ANTIALIASEDGES - WINED3DPRASTERCAPS_ZBUFFERLESSHSR - WINED3DPRASTERCAPS_WBUFFER */ caps->ZCmpCaps = WINED3DPCMPCAPS_ALWAYS | WINED3DPCMPCAPS_EQUAL | @@ -4541,26 +4432,9 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte caps->StencilCaps |= WINED3DSTENCILCAPS_TWOSIDED; } - caps->FVFCaps = WINED3DFVFCAPS_PSIZE | 0x0008; /* 8 texture coords */ - - caps->MaxUserClipPlanes = gl_info->limits.clipplanes; - caps->MaxActiveLights = gl_info->limits.lights; - - caps->MaxVertexBlendMatrices = gl_info->limits.blends; - caps->MaxVertexBlendMatrixIndex = 0; - caps->MaxAnisotropy = gl_info->limits.anisotropy; caps->MaxPointSize = gl_info->limits.pointsize_max; - - /* FIXME: Add D3DVTXPCAPS_TWEENING, D3DVTXPCAPS_TEXGEN_SPHEREMAP */ - caps->VertexProcessingCaps = WINED3DVTXPCAPS_DIRECTIONALLIGHTS | - WINED3DVTXPCAPS_MATERIALSOURCE7 | - WINED3DVTXPCAPS_POSITIONALLIGHTS | - WINED3DVTXPCAPS_LOCALVIEWER | - WINED3DVTXPCAPS_VERTEXFOG | - WINED3DVTXPCAPS_TEXGEN; - caps->MaxPrimitiveCount = 0xfffff; /* For now set 2^20-1 which is used by most >=Geforce3/Radeon8500 cards */ caps->MaxVertexIndex = 0xfffff; caps->MaxStreams = MAX_STREAMS; @@ -4584,6 +4458,7 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte adapter->shader_backend->shader_get_caps(&adapter->gl_info, &shader_caps); adapter->fragment_pipe->get_caps(&adapter->gl_info, &fragment_caps); + adapter->vertex_pipe->vp_get_caps(&adapter->gl_info, &vertex_caps); /* Add shader misc caps. Only some of them belong to the shader parts of the pipeline */ caps->PrimitiveMiscCaps |= fragment_caps.PrimitiveMiscCaps; @@ -4598,6 +4473,14 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte caps->MaxTextureBlendStages = fragment_caps.MaxTextureBlendStages; caps->MaxSimultaneousTextures = fragment_caps.MaxSimultaneousTextures; + caps->MaxUserClipPlanes = vertex_caps.max_user_clip_planes; + caps->MaxActiveLights = vertex_caps.max_active_lights; + caps->MaxVertexBlendMatrices = vertex_caps.max_vertex_blend_matrices; + caps->MaxVertexBlendMatrixIndex = vertex_caps.max_vertex_blend_matrix_index; + caps->VertexProcessingCaps = vertex_caps.vertex_processing_caps; + caps->FVFCaps = vertex_caps.fvf_caps; + caps->RasterCaps |= vertex_caps.raster_caps; + /* The following caps are shader specific, but they are things we cannot detect, or which * are the same among all shader models. So to avoid code duplication set the shader version * specific, but otherwise constant caps here @@ -4775,7 +4658,6 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte WINEDDSCAPS_SYSTEMMEMORY | WINEDDSCAPS_VIDEOMEMORY | WINEDDSCAPS_VISIBLE; - caps->ddraw_caps.stride_align = DDRAW_PITCH_ALIGNMENT; if (!(wined3d->flags & WINED3D_NO3D)) { @@ -4880,11 +4762,14 @@ static void WINE_GLAPI diffuse_d3dcolor(const void *data) static void WINE_GLAPI specular_d3dcolor(const void *data) { DWORD specularColor = *((const DWORD *)data); - GLbyte d[] = {D3DCOLOR_B_R(specularColor), - D3DCOLOR_B_G(specularColor), - D3DCOLOR_B_B(specularColor)}; + GLubyte d[] = + { + D3DCOLOR_B_R(specularColor), + D3DCOLOR_B_G(specularColor), + D3DCOLOR_B_B(specularColor) + }; - specular_func_3ubv(d); + context_get_current()->gl_info->gl_ops.ext.p_glSecondaryColor3ubvEXT(d); } static void WINE_GLAPI warn_no_specular_func(const void *data) @@ -4892,129 +4777,137 @@ static void WINE_GLAPI warn_no_specular_func(const void *data) WARN("GL_EXT_secondary_color not supported\n"); } -static void fillGLAttribFuncs(const struct wined3d_gl_info *gl_info) +static void wined3d_adapter_init_ffp_attrib_ops(struct wined3d_adapter *adapter) { - position_funcs[WINED3D_FFP_EMIT_FLOAT1] = invalid_func; - position_funcs[WINED3D_FFP_EMIT_FLOAT2] = invalid_func; - position_funcs[WINED3D_FFP_EMIT_FLOAT3] = (glAttribFunc)gl_info->gl_ops.gl.p_glVertex3fv; - position_funcs[WINED3D_FFP_EMIT_FLOAT4] = position_float4; - position_funcs[WINED3D_FFP_EMIT_D3DCOLOR] = position_d3dcolor; - position_funcs[WINED3D_FFP_EMIT_UBYTE4] = invalid_func; - position_funcs[WINED3D_FFP_EMIT_SHORT2] = invalid_func; - position_funcs[WINED3D_FFP_EMIT_SHORT4] = (glAttribFunc)gl_info->gl_ops.gl.p_glVertex2sv; - position_funcs[WINED3D_FFP_EMIT_UBYTE4N] = invalid_func; - position_funcs[WINED3D_FFP_EMIT_SHORT2N] = invalid_func; - position_funcs[WINED3D_FFP_EMIT_SHORT4N] = invalid_func; - position_funcs[WINED3D_FFP_EMIT_USHORT2N] = invalid_func; - position_funcs[WINED3D_FFP_EMIT_USHORT4N] = invalid_func; - position_funcs[WINED3D_FFP_EMIT_UDEC3] = invalid_func; - position_funcs[WINED3D_FFP_EMIT_DEC3N] = invalid_func; - position_funcs[WINED3D_FFP_EMIT_FLOAT16_2] = invalid_func; - position_funcs[WINED3D_FFP_EMIT_FLOAT16_4] = invalid_func; + const struct wined3d_gl_info *gl_info = &adapter->gl_info; + struct wined3d_d3d_info *d3d_info = &adapter->d3d_info; + struct wined3d_ffp_attrib_ops *ops = &d3d_info->ffp_attrib_ops; - diffuse_funcs[WINED3D_FFP_EMIT_FLOAT1] = invalid_func; - diffuse_funcs[WINED3D_FFP_EMIT_FLOAT2] = invalid_func; - diffuse_funcs[WINED3D_FFP_EMIT_FLOAT3] = (glAttribFunc)gl_info->gl_ops.gl.p_glColor3fv; - diffuse_funcs[WINED3D_FFP_EMIT_FLOAT4] = (glAttribFunc)gl_info->gl_ops.gl.p_glColor4fv; - diffuse_funcs[WINED3D_FFP_EMIT_D3DCOLOR] = diffuse_d3dcolor; - diffuse_funcs[WINED3D_FFP_EMIT_UBYTE4] = invalid_func; - diffuse_funcs[WINED3D_FFP_EMIT_SHORT2] = invalid_func; - diffuse_funcs[WINED3D_FFP_EMIT_SHORT4] = invalid_func; - diffuse_funcs[WINED3D_FFP_EMIT_UBYTE4N] = (glAttribFunc)gl_info->gl_ops.gl.p_glColor4ubv; - diffuse_funcs[WINED3D_FFP_EMIT_SHORT2N] = invalid_func; - diffuse_funcs[WINED3D_FFP_EMIT_SHORT4N] = (glAttribFunc)gl_info->gl_ops.gl.p_glColor4sv; - diffuse_funcs[WINED3D_FFP_EMIT_USHORT2N] = invalid_func; - diffuse_funcs[WINED3D_FFP_EMIT_USHORT4N] = (glAttribFunc)gl_info->gl_ops.gl.p_glColor4usv; - diffuse_funcs[WINED3D_FFP_EMIT_UDEC3] = invalid_func; - diffuse_funcs[WINED3D_FFP_EMIT_DEC3N] = invalid_func; - diffuse_funcs[WINED3D_FFP_EMIT_FLOAT16_2] = invalid_func; - diffuse_funcs[WINED3D_FFP_EMIT_FLOAT16_4] = invalid_func; - - /* No 4 component entry points here */ - specular_funcs[WINED3D_FFP_EMIT_FLOAT1] = invalid_func; - specular_funcs[WINED3D_FFP_EMIT_FLOAT2] = invalid_func; - if (gl_info->supported[EXT_SECONDARY_COLOR]) - { - specular_funcs[WINED3D_FFP_EMIT_FLOAT3] = (glAttribFunc)GL_EXTCALL(glSecondaryColor3fvEXT); - } + ops->position[WINED3D_FFP_EMIT_FLOAT1] = invalid_func; + ops->position[WINED3D_FFP_EMIT_FLOAT2] = invalid_func; + ops->position[WINED3D_FFP_EMIT_FLOAT3] = (wined3d_ffp_attrib_func)gl_info->gl_ops.gl.p_glVertex3fv; + if (!d3d_info->xyzrhw) + ops->position[WINED3D_FFP_EMIT_FLOAT4] = position_float4; else - { - specular_funcs[WINED3D_FFP_EMIT_FLOAT3] = warn_no_specular_func; - } - specular_funcs[WINED3D_FFP_EMIT_FLOAT4] = invalid_func; + ops->position[WINED3D_FFP_EMIT_FLOAT4] = (wined3d_ffp_attrib_func)gl_info->gl_ops.gl.p_glVertex4fv; + ops->position[WINED3D_FFP_EMIT_D3DCOLOR] = position_d3dcolor; + ops->position[WINED3D_FFP_EMIT_UBYTE4] = invalid_func; + ops->position[WINED3D_FFP_EMIT_SHORT2] = invalid_func; + ops->position[WINED3D_FFP_EMIT_SHORT4] = (wined3d_ffp_attrib_func)gl_info->gl_ops.gl.p_glVertex2sv; + ops->position[WINED3D_FFP_EMIT_UBYTE4N] = invalid_func; + ops->position[WINED3D_FFP_EMIT_SHORT2N] = invalid_func; + ops->position[WINED3D_FFP_EMIT_SHORT4N] = invalid_func; + ops->position[WINED3D_FFP_EMIT_USHORT2N] = invalid_func; + ops->position[WINED3D_FFP_EMIT_USHORT4N] = invalid_func; + ops->position[WINED3D_FFP_EMIT_UDEC3] = invalid_func; + ops->position[WINED3D_FFP_EMIT_DEC3N] = invalid_func; + ops->position[WINED3D_FFP_EMIT_FLOAT16_2] = invalid_func; + ops->position[WINED3D_FFP_EMIT_FLOAT16_4] = invalid_func; + ops->position[WINED3D_FFP_EMIT_INVALID] = invalid_func; + + ops->diffuse[WINED3D_FFP_EMIT_FLOAT1] = invalid_func; + ops->diffuse[WINED3D_FFP_EMIT_FLOAT2] = invalid_func; + ops->diffuse[WINED3D_FFP_EMIT_FLOAT3] = (wined3d_ffp_attrib_func)gl_info->gl_ops.gl.p_glColor3fv; + ops->diffuse[WINED3D_FFP_EMIT_FLOAT4] = (wined3d_ffp_attrib_func)gl_info->gl_ops.gl.p_glColor4fv; + ops->diffuse[WINED3D_FFP_EMIT_D3DCOLOR] = diffuse_d3dcolor; + ops->diffuse[WINED3D_FFP_EMIT_UBYTE4] = invalid_func; + ops->diffuse[WINED3D_FFP_EMIT_SHORT2] = invalid_func; + ops->diffuse[WINED3D_FFP_EMIT_SHORT4] = invalid_func; + ops->diffuse[WINED3D_FFP_EMIT_UBYTE4N] = (wined3d_ffp_attrib_func)gl_info->gl_ops.gl.p_glColor4ubv; + ops->diffuse[WINED3D_FFP_EMIT_SHORT2N] = invalid_func; + ops->diffuse[WINED3D_FFP_EMIT_SHORT4N] = (wined3d_ffp_attrib_func)gl_info->gl_ops.gl.p_glColor4sv; + ops->diffuse[WINED3D_FFP_EMIT_USHORT2N] = invalid_func; + ops->diffuse[WINED3D_FFP_EMIT_USHORT4N] = (wined3d_ffp_attrib_func)gl_info->gl_ops.gl.p_glColor4usv; + ops->diffuse[WINED3D_FFP_EMIT_UDEC3] = invalid_func; + ops->diffuse[WINED3D_FFP_EMIT_DEC3N] = invalid_func; + ops->diffuse[WINED3D_FFP_EMIT_FLOAT16_2] = invalid_func; + ops->diffuse[WINED3D_FFP_EMIT_FLOAT16_4] = invalid_func; + ops->diffuse[WINED3D_FFP_EMIT_INVALID] = invalid_func; + + /* No 4 component entry points here. */ + ops->specular[WINED3D_FFP_EMIT_FLOAT1] = invalid_func; + ops->specular[WINED3D_FFP_EMIT_FLOAT2] = invalid_func; if (gl_info->supported[EXT_SECONDARY_COLOR]) - { - specular_func_3ubv = (glAttribFunc)GL_EXTCALL(glSecondaryColor3ubvEXT); - specular_funcs[WINED3D_FFP_EMIT_D3DCOLOR] = specular_d3dcolor; - } + ops->specular[WINED3D_FFP_EMIT_FLOAT3] = (wined3d_ffp_attrib_func)GL_EXTCALL(glSecondaryColor3fvEXT); else - { - specular_funcs[WINED3D_FFP_EMIT_D3DCOLOR] = warn_no_specular_func; - } - specular_funcs[WINED3D_FFP_EMIT_UBYTE4] = invalid_func; - specular_funcs[WINED3D_FFP_EMIT_SHORT2] = invalid_func; - specular_funcs[WINED3D_FFP_EMIT_SHORT4] = invalid_func; - specular_funcs[WINED3D_FFP_EMIT_UBYTE4N] = invalid_func; - specular_funcs[WINED3D_FFP_EMIT_SHORT2N] = invalid_func; - specular_funcs[WINED3D_FFP_EMIT_SHORT4N] = invalid_func; - specular_funcs[WINED3D_FFP_EMIT_USHORT2N] = invalid_func; - specular_funcs[WINED3D_FFP_EMIT_USHORT4N] = invalid_func; - specular_funcs[WINED3D_FFP_EMIT_UDEC3] = invalid_func; - specular_funcs[WINED3D_FFP_EMIT_DEC3N] = invalid_func; - specular_funcs[WINED3D_FFP_EMIT_FLOAT16_2] = invalid_func; - specular_funcs[WINED3D_FFP_EMIT_FLOAT16_4] = invalid_func; + ops->specular[WINED3D_FFP_EMIT_FLOAT3] = warn_no_specular_func; + ops->specular[WINED3D_FFP_EMIT_FLOAT4] = invalid_func; + if (gl_info->supported[EXT_SECONDARY_COLOR]) + ops->specular[WINED3D_FFP_EMIT_D3DCOLOR] = specular_d3dcolor; + else + ops->specular[WINED3D_FFP_EMIT_D3DCOLOR] = warn_no_specular_func; + ops->specular[WINED3D_FFP_EMIT_UBYTE4] = invalid_func; + ops->specular[WINED3D_FFP_EMIT_SHORT2] = invalid_func; + ops->specular[WINED3D_FFP_EMIT_SHORT4] = invalid_func; + ops->specular[WINED3D_FFP_EMIT_UBYTE4N] = invalid_func; + ops->specular[WINED3D_FFP_EMIT_SHORT2N] = invalid_func; + ops->specular[WINED3D_FFP_EMIT_SHORT4N] = invalid_func; + ops->specular[WINED3D_FFP_EMIT_USHORT2N] = invalid_func; + ops->specular[WINED3D_FFP_EMIT_USHORT4N] = invalid_func; + ops->specular[WINED3D_FFP_EMIT_UDEC3] = invalid_func; + ops->specular[WINED3D_FFP_EMIT_DEC3N] = invalid_func; + ops->specular[WINED3D_FFP_EMIT_FLOAT16_2] = invalid_func; + ops->specular[WINED3D_FFP_EMIT_FLOAT16_4] = invalid_func; + ops->specular[WINED3D_FFP_EMIT_INVALID] = invalid_func; - /* Only 3 component entry points here. Test how others behave. Float4 normals are used - * by one of our tests, trying to pass it to the pixel shader, which fails on Windows. - */ - normal_funcs[WINED3D_FFP_EMIT_FLOAT1] = invalid_func; - normal_funcs[WINED3D_FFP_EMIT_FLOAT2] = invalid_func; - normal_funcs[WINED3D_FFP_EMIT_FLOAT3] = (glAttribFunc)gl_info->gl_ops.gl.p_glNormal3fv; - normal_funcs[WINED3D_FFP_EMIT_FLOAT4] = (glAttribFunc)gl_info->gl_ops.gl.p_glNormal3fv; /* Just ignore the 4th value */ - normal_funcs[WINED3D_FFP_EMIT_D3DCOLOR] = invalid_func; - normal_funcs[WINED3D_FFP_EMIT_UBYTE4] = invalid_func; - normal_funcs[WINED3D_FFP_EMIT_SHORT2] = invalid_func; - normal_funcs[WINED3D_FFP_EMIT_SHORT4] = invalid_func; - normal_funcs[WINED3D_FFP_EMIT_UBYTE4N] = invalid_func; - normal_funcs[WINED3D_FFP_EMIT_SHORT2N] = invalid_func; - normal_funcs[WINED3D_FFP_EMIT_SHORT4N] = invalid_func; - normal_funcs[WINED3D_FFP_EMIT_USHORT2N] = invalid_func; - normal_funcs[WINED3D_FFP_EMIT_USHORT4N] = invalid_func; - normal_funcs[WINED3D_FFP_EMIT_UDEC3] = invalid_func; - normal_funcs[WINED3D_FFP_EMIT_DEC3N] = invalid_func; - normal_funcs[WINED3D_FFP_EMIT_FLOAT16_2] = invalid_func; - normal_funcs[WINED3D_FFP_EMIT_FLOAT16_4] = invalid_func; + /* Only 3 component entry points here. Test how others behave. Float4 + * normals are used by one of our tests, trying to pass it to the pixel + * shader, which fails on Windows. */ + ops->normal[WINED3D_FFP_EMIT_FLOAT1] = invalid_func; + ops->normal[WINED3D_FFP_EMIT_FLOAT2] = invalid_func; + ops->normal[WINED3D_FFP_EMIT_FLOAT3] = (wined3d_ffp_attrib_func)gl_info->gl_ops.gl.p_glNormal3fv; + /* Just ignore the 4th value. */ + ops->normal[WINED3D_FFP_EMIT_FLOAT4] = (wined3d_ffp_attrib_func)gl_info->gl_ops.gl.p_glNormal3fv; + ops->normal[WINED3D_FFP_EMIT_D3DCOLOR] = invalid_func; + ops->normal[WINED3D_FFP_EMIT_UBYTE4] = invalid_func; + ops->normal[WINED3D_FFP_EMIT_SHORT2] = invalid_func; + ops->normal[WINED3D_FFP_EMIT_SHORT4] = invalid_func; + ops->normal[WINED3D_FFP_EMIT_UBYTE4N] = invalid_func; + ops->normal[WINED3D_FFP_EMIT_SHORT2N] = invalid_func; + ops->normal[WINED3D_FFP_EMIT_SHORT4N] = invalid_func; + ops->normal[WINED3D_FFP_EMIT_USHORT2N] = invalid_func; + ops->normal[WINED3D_FFP_EMIT_USHORT4N] = invalid_func; + ops->normal[WINED3D_FFP_EMIT_UDEC3] = invalid_func; + ops->normal[WINED3D_FFP_EMIT_DEC3N] = invalid_func; + ops->normal[WINED3D_FFP_EMIT_FLOAT16_2] = invalid_func; + ops->normal[WINED3D_FFP_EMIT_FLOAT16_4] = invalid_func; + ops->normal[WINED3D_FFP_EMIT_INVALID] = invalid_func; - multi_texcoord_funcs[WINED3D_FFP_EMIT_FLOAT1] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord1fvARB); - multi_texcoord_funcs[WINED3D_FFP_EMIT_FLOAT2] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord2fvARB); - multi_texcoord_funcs[WINED3D_FFP_EMIT_FLOAT3] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord3fvARB); - multi_texcoord_funcs[WINED3D_FFP_EMIT_FLOAT4] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord4fvARB); - multi_texcoord_funcs[WINED3D_FFP_EMIT_D3DCOLOR] = invalid_texcoord_func; - multi_texcoord_funcs[WINED3D_FFP_EMIT_UBYTE4] = invalid_texcoord_func; - multi_texcoord_funcs[WINED3D_FFP_EMIT_SHORT2] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord2svARB); - multi_texcoord_funcs[WINED3D_FFP_EMIT_SHORT4] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord4svARB); - multi_texcoord_funcs[WINED3D_FFP_EMIT_UBYTE4N] = invalid_texcoord_func; - multi_texcoord_funcs[WINED3D_FFP_EMIT_SHORT2N] = invalid_texcoord_func; - multi_texcoord_funcs[WINED3D_FFP_EMIT_SHORT4N] = invalid_texcoord_func; - multi_texcoord_funcs[WINED3D_FFP_EMIT_USHORT2N] = invalid_texcoord_func; - multi_texcoord_funcs[WINED3D_FFP_EMIT_USHORT4N] = invalid_texcoord_func; - multi_texcoord_funcs[WINED3D_FFP_EMIT_UDEC3] = invalid_texcoord_func; - multi_texcoord_funcs[WINED3D_FFP_EMIT_DEC3N] = invalid_texcoord_func; + ops->texcoord[WINED3D_FFP_EMIT_FLOAT1] = (wined3d_ffp_texcoord_func)gl_info->gl_ops.ext.p_glMultiTexCoord1fvARB; + ops->texcoord[WINED3D_FFP_EMIT_FLOAT2] = (wined3d_ffp_texcoord_func)gl_info->gl_ops.ext.p_glMultiTexCoord2fvARB; + ops->texcoord[WINED3D_FFP_EMIT_FLOAT3] = (wined3d_ffp_texcoord_func)gl_info->gl_ops.ext.p_glMultiTexCoord3fvARB; + ops->texcoord[WINED3D_FFP_EMIT_FLOAT4] = (wined3d_ffp_texcoord_func)gl_info->gl_ops.ext.p_glMultiTexCoord4fvARB; + ops->texcoord[WINED3D_FFP_EMIT_D3DCOLOR] = invalid_texcoord_func; + ops->texcoord[WINED3D_FFP_EMIT_UBYTE4] = invalid_texcoord_func; + ops->texcoord[WINED3D_FFP_EMIT_SHORT2] = (wined3d_ffp_texcoord_func)gl_info->gl_ops.ext.p_glMultiTexCoord2svARB; + ops->texcoord[WINED3D_FFP_EMIT_SHORT4] = (wined3d_ffp_texcoord_func)gl_info->gl_ops.ext.p_glMultiTexCoord4svARB; + ops->texcoord[WINED3D_FFP_EMIT_UBYTE4N] = invalid_texcoord_func; + ops->texcoord[WINED3D_FFP_EMIT_SHORT2N] = invalid_texcoord_func; + ops->texcoord[WINED3D_FFP_EMIT_SHORT4N] = invalid_texcoord_func; + ops->texcoord[WINED3D_FFP_EMIT_USHORT2N] = invalid_texcoord_func; + ops->texcoord[WINED3D_FFP_EMIT_USHORT4N] = invalid_texcoord_func; + ops->texcoord[WINED3D_FFP_EMIT_UDEC3] = invalid_texcoord_func; + ops->texcoord[WINED3D_FFP_EMIT_DEC3N] = invalid_texcoord_func; if (gl_info->supported[NV_HALF_FLOAT]) { - /* Not supported by ARB_HALF_FLOAT_VERTEX, so check for NV_HALF_FLOAT */ - multi_texcoord_funcs[WINED3D_FFP_EMIT_FLOAT16_2] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord2hvNV); - multi_texcoord_funcs[WINED3D_FFP_EMIT_FLOAT16_4] = (glMultiTexCoordFunc)GL_EXTCALL(glMultiTexCoord4hvNV); - } else { - multi_texcoord_funcs[WINED3D_FFP_EMIT_FLOAT16_2] = invalid_texcoord_func; - multi_texcoord_funcs[WINED3D_FFP_EMIT_FLOAT16_4] = invalid_texcoord_func; + /* Not supported by ARB_HALF_FLOAT_VERTEX, so check for NV_HALF_FLOAT. */ + ops->texcoord[WINED3D_FFP_EMIT_FLOAT16_2] = + (wined3d_ffp_texcoord_func)gl_info->gl_ops.ext.p_glMultiTexCoord2hvNV; + ops->texcoord[WINED3D_FFP_EMIT_FLOAT16_4] = + (wined3d_ffp_texcoord_func)gl_info->gl_ops.ext.p_glMultiTexCoord4hvNV; } + else + { + ops->texcoord[WINED3D_FFP_EMIT_FLOAT16_2] = invalid_texcoord_func; + ops->texcoord[WINED3D_FFP_EMIT_FLOAT16_4] = invalid_texcoord_func; + } + ops->texcoord[WINED3D_FFP_EMIT_INVALID] = invalid_texcoord_func; } static void wined3d_adapter_init_fb_cfgs(struct wined3d_adapter *adapter, HDC dc) { const struct wined3d_gl_info *gl_info = &adapter->gl_info; - unsigned int i; + int i; if (gl_info->supported[WGL_ARB_PIXEL_FORMAT]) { @@ -5143,7 +5036,9 @@ static BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, UINT ordinal) { struct wined3d_gl_info *gl_info = &adapter->gl_info; struct wined3d_fake_gl_ctx fake_gl_ctx = {0}; + unsigned int ctx_attrib_idx = 0; DISPLAY_DEVICEW display_device; + GLint ctx_attribs[3]; TRACE("adapter %p, ordinal %u.\n", adapter, ordinal); @@ -5189,6 +5084,14 @@ static BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, UINT ordinal) return FALSE; } + if (context_debug_output_enabled(gl_info)) + { + ctx_attribs[ctx_attrib_idx++] = WGL_CONTEXT_FLAGS_ARB; + ctx_attribs[ctx_attrib_idx++] = WGL_CONTEXT_DEBUG_BIT_ARB; + } + ctx_attribs[ctx_attrib_idx] = 0; + wined3d_create_fake_gl_context_attribs(&fake_gl_ctx, gl_info, ctx_attribs); + if (!wined3d_adapter_init_gl_caps(adapter)) { ERR("Failed to initialize GL caps for adapter %p.\n", adapter); @@ -5226,7 +5129,7 @@ static BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, UINT ordinal) WineD3D_ReleaseFakeGLContext(&fake_gl_ctx); - fillGLAttribFuncs(&adapter->gl_info); + wined3d_adapter_init_ffp_attrib_ops(adapter); return TRUE; } @@ -5249,10 +5152,11 @@ static void wined3d_adapter_init_nogl(struct wined3d_adapter *adapter, UINT ordi initPixelFormatsNoGL(&adapter->gl_info); + adapter->vertex_pipe = &none_vertex_pipe; adapter->fragment_pipe = &none_fragment_pipe; adapter->shader_backend = &none_shader_backend; adapter->blitter = &cpu_blit; - + display_device.cb = sizeof(display_device); EnumDisplayDevicesW(NULL, ordinal, &display_device, 0); TRACE("DeviceName: %s\n", debugstr_w(display_device.DeviceName)); diff --git a/dll/directx/wine/wined3d/drawprim.c b/dll/directx/wine/wined3d/drawprim.c index 1859b9943e1..89f2d7a5dd5 100644 --- a/dll/directx/wine/wined3d/drawprim.c +++ b/dll/directx/wine/wined3d/drawprim.c @@ -30,6 +30,7 @@ #include "wined3d_private.h" WINE_DEFAULT_DEBUG_CHANNEL(d3d_draw); +WINE_DECLARE_DEBUG_CHANNEL(d3d_perf); //#include //#include @@ -90,19 +91,21 @@ static void drawStridedSlow(const struct wined3d_device *device, const struct wi const WORD *pIdxBufS = NULL; const DWORD *pIdxBufL = NULL; UINT vx_index; - const struct wined3d_state *state = &device->stateBlock->state; + const struct wined3d_state *state = &device->state; LONG SkipnStrides = startIdx; BOOL pixelShader = use_ps(state); BOOL specular_fog = FALSE; const BYTE *texCoords[WINED3DDP_MAXTEXCOORD]; const BYTE *diffuse = NULL, *specular = NULL, *normal = NULL, *position = NULL; const struct wined3d_gl_info *gl_info = context->gl_info; - UINT texture_stages = gl_info->limits.texture_stages; + const struct wined3d_d3d_info *d3d_info = context->d3d_info; + const struct wined3d_ffp_attrib_ops *ops = &d3d_info->ffp_attrib_ops; + UINT texture_stages = d3d_info->limits.ffp_blend_stages; const struct wined3d_stream_info_element *element; UINT num_untracked_materials; DWORD tex_mask = 0; - TRACE("Using slow vertex array code\n"); + TRACE_(d3d_perf)("Using slow vertex array code\n"); /* Variable Initialization */ if (idxSize) @@ -264,15 +267,16 @@ static void drawStridedSlow(const struct wined3d_device *device, const struct wi ptr = texCoords[coord_idx] + (SkipnStrides * si->elements[WINED3D_FFP_TEXCOORD0 + coord_idx].stride); texture_idx = device->texUnitMap[texture]; - multi_texcoord_funcs[si->elements[WINED3D_FFP_TEXCOORD0 + coord_idx].format->emit_idx]( + ops->texcoord[si->elements[WINED3D_FFP_TEXCOORD0 + coord_idx].format->emit_idx]( GL_TEXTURE0_ARB + texture_idx, ptr); } /* Diffuse -------------------------------- */ - if (diffuse) { + if (diffuse) + { const void *ptrToCoords = diffuse + SkipnStrides * si->elements[WINED3D_FFP_DIFFUSE].stride; + ops->diffuse[si->elements[WINED3D_FFP_DIFFUSE].format->emit_idx](ptrToCoords); - diffuse_funcs[si->elements[WINED3D_FFP_DIFFUSE].format->emit_idx](ptrToCoords); if (num_untracked_materials) { DWORD diffuseColor = ((const DWORD *)ptrToCoords)[0]; @@ -292,10 +296,10 @@ static void drawStridedSlow(const struct wined3d_device *device, const struct wi } /* Specular ------------------------------- */ - if (specular) { + if (specular) + { const void *ptrToCoords = specular + SkipnStrides * si->elements[WINED3D_FFP_SPECULAR].stride; - - specular_funcs[si->elements[WINED3D_FFP_SPECULAR].format->emit_idx](ptrToCoords); + ops->specular[si->elements[WINED3D_FFP_SPECULAR].format->emit_idx](ptrToCoords); if (specular_fog) { @@ -308,13 +312,14 @@ static void drawStridedSlow(const struct wined3d_device *device, const struct wi if (normal) { const void *ptrToCoords = normal + SkipnStrides * si->elements[WINED3D_FFP_NORMAL].stride; - normal_funcs[si->elements[WINED3D_FFP_NORMAL].format->emit_idx](ptrToCoords); + ops->normal[si->elements[WINED3D_FFP_NORMAL].format->emit_idx](ptrToCoords); } /* Position -------------------------------- */ - if (position) { + if (position) + { const void *ptrToCoords = position + SkipnStrides * si->elements[WINED3D_FFP_POSITION].stride; - position_funcs[si->elements[WINED3D_FFP_POSITION].format->emit_idx](ptrToCoords); + ops->position[si->elements[WINED3D_FFP_POSITION].format->emit_idx](ptrToCoords); } /* For non indexed mode, step onto next parts */ @@ -577,15 +582,16 @@ static void remove_vbos(const struct wined3d_gl_info *gl_info, /* Routine common to the draw primitive and draw indexed primitive routines */ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_count, - UINT start_instance, UINT instance_count, BOOL indexed, const void *idx_data) + UINT start_instance, UINT instance_count, BOOL indexed) { - const struct wined3d_state *state = &device->stateBlock->state; + const struct wined3d_state *state = &device->state; const struct wined3d_stream_info *stream_info; struct wined3d_event_query *ib_query = NULL; struct wined3d_stream_info si_emulated; const struct wined3d_gl_info *gl_info; struct wined3d_context *context; BOOL emulation = FALSE; + const void *idx_data = NULL; UINT idx_size = 0; unsigned int i; @@ -670,7 +676,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co FIXME("Point sprite coordinate origin switching not supported.\n"); } - stream_info = &device->strided_streams; + stream_info = &device->stream_info; if (device->instance_count) instance_count = device->instance_count; @@ -701,7 +707,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co if (!warned++) FIXME("Using software emulation because not all material properties could be tracked.\n"); else - WARN("Using software emulation because not all material properties could be tracked.\n"); + WARN_(d3d_perf)("Using software emulation because not all material properties could be tracked.\n"); emulation = TRUE; } else if (context->fog_coord && state->render_states[WINED3D_RS_FOGENABLE]) @@ -714,13 +720,13 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co if (!warned++) FIXME("Using software emulation because manual fog coordinates are provided.\n"); else - WARN("Using software emulation because manual fog coordinates are provided.\n"); + WARN_(d3d_perf)("Using software emulation because manual fog coordinates are provided.\n"); emulation = TRUE; } if (emulation) { - si_emulated = device->strided_streams; + si_emulated = device->stream_info; remove_vbos(gl_info, state, &si_emulated); stream_info = &si_emulated; } @@ -736,7 +742,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co if (!warned++) FIXME("Using immediate mode with vertex shaders for half float emulation.\n"); else - WARN("Using immediate mode with vertex shaders for half float emulation.\n"); + WARN_(d3d_perf)("Using immediate mode with vertex shaders for half float emulation.\n"); drawStridedSlowVs(gl_info, state, stream_info, index_count, state->gl_primitive_type, idx_data, idx_size, start_idx); diff --git a/dll/directx/wine/wined3d/gl_compat.c b/dll/directx/wine/wined3d/gl_compat.c index b31b892ae4f..575743617d0 100644 --- a/dll/directx/wine/wined3d/gl_compat.c +++ b/dll/directx/wine/wined3d/gl_compat.c @@ -29,6 +29,7 @@ #include "wined3d_private.h" WINE_DEFAULT_DEBUG_CHANNEL(gl_compat); +WINE_DECLARE_DEBUG_CHANNEL(d3d_perf); /* Start GL_ARB_multitexture emulation */ static void WINE_GLAPI wine_glMultiTexCoord1fARB(GLenum target, GLfloat s) { @@ -176,7 +177,7 @@ static void WINE_GLAPI wine_glFogi(GLenum pname, GLint param) { if(param == GL_FRAGMENT_DEPTH_EXT) { if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG); } else { - WARN("Fog coords activated, but not supported. Using slow emulation\n"); + WARN_(d3d_perf)("Fog coords activated, but not supported. Using slow emulation\n"); old_fogcoord_glDisable(GL_FOG); } } else { @@ -197,7 +198,7 @@ static void WINE_GLAPI wine_glFogiv(GLenum pname, const GLint *param) { if(*param == GL_FRAGMENT_DEPTH_EXT) { if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG); } else { - WARN("Fog coords activated, but not supported. Using slow emulation\n"); + WARN_(d3d_perf)("Fog coords activated, but not supported. Using slow emulation\n"); old_fogcoord_glDisable(GL_FOG); } } else { @@ -218,7 +219,7 @@ static void WINE_GLAPI wine_glFogf(GLenum pname, GLfloat param) { if(param == GL_FRAGMENT_DEPTH_EXT) { if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG); } else { - WARN("Fog coords activated, but not supported. Using slow emulation\n"); + WARN_(d3d_perf)("Fog coords activated, but not supported. Using slow emulation\n"); old_fogcoord_glDisable(GL_FOG); } } else { @@ -239,7 +240,7 @@ static void WINE_GLAPI wine_glFogfv(GLenum pname, const GLfloat *param) { if(*param == GL_FRAGMENT_DEPTH_EXT) { if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG); } else { - WARN("Fog coords activated, but not supported. Using slow emulation\n"); + WARN_(d3d_perf)("Fog coords activated, but not supported. Using slow emulation\n"); old_fogcoord_glDisable(GL_FOG); } } else { diff --git a/dll/directx/wine/wined3d/glsl_shader.c b/dll/directx/wine/wined3d/glsl_shader.c index 7b11567ffd4..5ff98dd8942 100644 --- a/dll/directx/wine/wined3d/glsl_shader.c +++ b/dll/directx/wine/wined3d/glsl_shader.c @@ -3,7 +3,7 @@ * * Copyright 2006 Jason Green * Copyright 2006-2007 Henri Verbeet - * Copyright 2007-2008 Stefan Dösinger for CodeWeavers + * Copyright 2007-2009, 2013 Stefan Dösinger for CodeWeavers * Copyright 2009-2011 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or @@ -42,11 +42,18 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_constants); WINE_DECLARE_DEBUG_CHANNEL(d3d); WINE_DECLARE_DEBUG_CHANNEL(winediag); +#ifdef _MSC_VER +#define copysignf(x, y) ((x) < 0.0f ? -fabsf(y) : fabsf(y)) +#endif + #define WINED3D_GLSL_SAMPLE_PROJECTED 0x1 -#define WINED3D_GLSL_SAMPLE_RECT 0x2 +#define WINED3D_GLSL_SAMPLE_NPOT 0x2 #define WINED3D_GLSL_SAMPLE_LOD 0x4 #define WINED3D_GLSL_SAMPLE_GRAD 0x8 +static const float srgb_const0[] = {0.41666f, 1.055f, 0.055f, 12.92f}; /* pow, mul_high, sub_high, mul_low */ +static const float srgb_const1[] = {0.0031308f, 0.0f, 0.0f, 0.0f}; /* cmp */ + struct glsl_dst_param { char reg_name[150]; @@ -81,6 +88,7 @@ struct constant_entry struct constant_heap { struct constant_entry *entries; + BOOL *contained; unsigned int *positions; unsigned int size; }; @@ -89,7 +97,6 @@ struct constant_heap struct shader_glsl_priv { struct wined3d_shader_buffer shader_buffer; struct wine_rb_tree program_lookup; - struct glsl_shader_prog_link *glsl_program; struct constant_heap vconst_heap; struct constant_heap pconst_heap; unsigned char *stack; @@ -97,7 +104,9 @@ struct shader_glsl_priv { GLhandleARB depth_blt_program_masked[tex_type_count]; UINT next_constant_version; + const struct wined3d_vertex_pipe_ops *vertex_pipe; const struct fragment_pipeline *fragment_pipe; + struct wine_rb_tree ffp_vertex_shaders; struct wine_rb_tree ffp_fragment_shaders; BOOL ffp_proj_control; }; @@ -142,6 +151,7 @@ struct glsl_shader_prog_link struct glsl_gs_program gs; struct glsl_ps_program ps; GLhandleARB programId; + DWORD constant_update_mask; UINT constant_version; }; @@ -158,6 +168,11 @@ struct shader_glsl_ctx_priv { struct ps_np2fixup_info *cur_np2fixup_info; }; +struct glsl_context_data +{ + struct glsl_shader_prog_link *glsl_program; +}; + struct glsl_ps_compiled_shader { struct ps_compile_args args; @@ -187,6 +202,13 @@ struct glsl_shader_private UINT num_gl_shaders, shader_array_size; }; +struct glsl_ffp_vertex_shader +{ + struct wined3d_ffp_vs_desc desc; + GLhandleARB id; + struct list linked_programs; +}; + struct glsl_ffp_fragment_shader { struct ffp_frag_desc entry; @@ -194,6 +216,12 @@ struct glsl_ffp_fragment_shader struct list linked_programs; }; +struct glsl_ffp_destroy_ctx +{ + struct shader_glsl_priv *priv; + const struct wined3d_gl_info *gl_info; +}; + static const char *debug_gl_shader_type(GLenum type) { switch (type) @@ -227,6 +255,64 @@ static const char *shader_glsl_get_prefix(enum wined3d_shader_type type) } } +/* This should be equivalent to using the %.8e format specifier, but always + * using '.' as decimal separator. This doesn't handle +/-INF or NAN, since + * the GLSL parser wouldn't be able to handle those anyway. */ +static void shader_glsl_ftoa(float value, char *s) +{ + int x, frac, exponent; + const char *sign = ""; + double d; + + d = value; + if (copysignf(1.0f, value) < 0.0f) + { + d = -d; + sign = "-"; + } + + if (d == 0.0f) + { + x = 0; + frac = 0; + exponent = 0; + } + else + { + double t, diff; + + exponent = floorf(log10f(d)); + d /= pow(10.0, exponent); + + x = d; + t = (d - x) * 100000000; + frac = t; + diff = t - frac; + + if ((diff > 0.5) || (diff == 0.5 && (frac & 1))) + { + if (++frac >= 100000000) + { + frac = 0; + ++x; + } + } + } + + sprintf(s, "%s%d.%08de%+03d", sign, x, frac, exponent); +} + +static void shader_glsl_append_imm_vec4(struct wined3d_shader_buffer *buffer, const float *values) +{ + char str[4][16]; + + shader_glsl_ftoa(values[0], str[0]); + shader_glsl_ftoa(values[1], str[1]); + shader_glsl_ftoa(values[2], str[2]); + shader_glsl_ftoa(values[3], str[3]); + shader_addline(buffer, "vec4(%s, %s, %s, %s)", str[0], str[1], str[2], str[3]); +} + /* Extract a line from the info log. * Note that this modifies the source string. */ static char *get_info_log_line(char **ptr) @@ -430,6 +516,7 @@ static void shader_glsl_load_vsamplers(const struct wined3d_gl_info *gl_info, static inline void walk_constant_heap(const struct wined3d_gl_info *gl_info, const float *constants, const GLint *constant_locations, const struct constant_heap *heap, unsigned char *stack, DWORD version) { + unsigned int start = ~0U, end = 0; int stack_idx = 0; unsigned int heap_idx = 1; unsigned int idx; @@ -437,7 +524,8 @@ static inline void walk_constant_heap(const struct wined3d_gl_info *gl_info, con if (heap->entries[heap_idx].version <= version) return; idx = heap->entries[heap_idx].idx; - if (constant_locations[idx] != -1) GL_EXTCALL(glUniform4fvARB(constant_locations[idx], 1, &constants[idx * 4])); + if (constant_locations[idx] != -1) + start = end = idx; stack[stack_idx] = HEAP_NODE_TRAVERSE_LEFT; while (stack_idx >= 0) @@ -453,7 +541,12 @@ static inline void walk_constant_heap(const struct wined3d_gl_info *gl_info, con heap_idx = left_idx; idx = heap->entries[heap_idx].idx; if (constant_locations[idx] != -1) - GL_EXTCALL(glUniform4fvARB(constant_locations[idx], 1, &constants[idx * 4])); + { + if (start > idx) + start = idx; + if (end < idx) + end = idx; + } stack[stack_idx++] = HEAP_NODE_TRAVERSE_RIGHT; stack[stack_idx] = HEAP_NODE_TRAVERSE_LEFT; @@ -469,7 +562,12 @@ static inline void walk_constant_heap(const struct wined3d_gl_info *gl_info, con heap_idx = right_idx; idx = heap->entries[heap_idx].idx; if (constant_locations[idx] != -1) - GL_EXTCALL(glUniform4fvARB(constant_locations[idx], 1, &constants[idx * 4])); + { + if (start > idx) + start = idx; + if (end < idx) + end = idx; + } stack[stack_idx++] = HEAP_NODE_POP; stack[stack_idx] = HEAP_NODE_TRAVERSE_LEFT; @@ -483,6 +581,8 @@ static inline void walk_constant_heap(const struct wined3d_gl_info *gl_info, con break; } } + if (start <= end) + GL_EXTCALL(glUniform4fvARB(constant_locations[start], end - start + 1, &constants[start * 4])); checkGLcall("walk_constant_heap()"); } @@ -582,9 +682,7 @@ static void shader_glsl_load_constantsF(const struct wined3d_shader *shader, con /* Immediate constants are clamped to [-1;1] at shader creation time if needed */ LIST_FOR_EACH_ENTRY(lconst, &shader->constantsF, struct wined3d_shader_lconst, entry) { - GLint location = constant_locations[lconst->idx]; - /* We found this uniform name in the program - go ahead and send the data */ - if (location != -1) GL_EXTCALL(glUniform4fvARB(location, 1, (const GLfloat *)lconst->value)); + GL_EXTCALL(glUniform4fvARB(constant_locations[lconst->idx], 1, (const GLfloat *)lconst->value)); } checkGLcall("glUniform4fvARB()"); } @@ -650,12 +748,7 @@ static void shader_glsl_load_constantsB(const struct wined3d_shader *shader, con * locations of the constants to avoid looking up each time */ snprintf(tmp_name, sizeof(tmp_name), "%s_b[%i]", prefix, i); tmp_loc = GL_EXTCALL(glGetUniformLocationARB(programId, tmp_name)); - if (tmp_loc != -1) - { - /* We found this uniform name in the program - go ahead and send the data */ - GL_EXTCALL(glUniform1ivARB(tmp_loc, 1, &constants[i])); - checkGLcall("glUniform1ivARB"); - } + GL_EXTCALL(glUniform1ivARB(tmp_loc, 1, &constants[i])); } /* Load immediate constants */ @@ -670,13 +763,11 @@ static void shader_glsl_load_constantsB(const struct wined3d_shader *shader, con snprintf(tmp_name, sizeof(tmp_name), "%s_b[%i]", prefix, idx); tmp_loc = GL_EXTCALL(glGetUniformLocationARB(programId, tmp_name)); - if (tmp_loc != -1) { - /* We found this uniform name in the program - go ahead and send the data */ - GL_EXTCALL(glUniform1ivARB(tmp_loc, 1, values)); - checkGLcall("glUniform1ivARB"); - } + GL_EXTCALL(glUniform1ivARB(tmp_loc, 1, values)); ptr = list_next(&shader->constantsB, ptr); } + + checkGLcall("shader_glsl_load_constantsB()"); } static void reset_program_constant_version(struct wine_rb_entry *entry, void *context) @@ -685,66 +776,54 @@ static void reset_program_constant_version(struct wine_rb_entry *entry, void *co } /* Context activation is done by the caller (state handler). */ -static void shader_glsl_load_np2fixup_constants(void *shader_priv, +static void shader_glsl_load_np2fixup_constants(const struct glsl_ps_program *ps, const struct wined3d_gl_info *gl_info, const struct wined3d_state *state) { - struct shader_glsl_priv *glsl_priv = shader_priv; - const struct glsl_shader_prog_link *prog = glsl_priv->glsl_program; + GLfloat np2fixup_constants[4 * MAX_FRAGMENT_SAMPLERS]; + UINT fixup = ps->np2_fixup_info->active; + UINT i; - /* No GLSL program set - nothing to do. */ - if (!prog) return; - - /* NP2 texcoord fixup is (currently) only done for pixelshaders. */ - if (!use_ps(state)) return; - - if (prog->ps.np2_fixup_info && prog->ps.np2_fixup_location != -1) + for (i = 0; fixup; fixup >>= 1, ++i) { - UINT i; - UINT fixup = prog->ps.np2_fixup_info->active; - GLfloat np2fixup_constants[4 * MAX_FRAGMENT_SAMPLERS]; + const struct wined3d_texture *tex = state->textures[i]; + unsigned char idx = ps->np2_fixup_info->idx[i]; + GLfloat *tex_dim = &np2fixup_constants[(idx >> 1) * 4]; - for (i = 0; fixup; fixup >>= 1, ++i) + if (!tex) { - const struct wined3d_texture *tex = state->textures[i]; - const unsigned char idx = prog->ps.np2_fixup_info->idx[i]; - GLfloat *tex_dim = &np2fixup_constants[(idx >> 1) * 4]; - - if (!tex) - { - ERR("Nonexistent texture is flagged for NP2 texcoord fixup.\n"); - continue; - } - - if (idx % 2) - { - tex_dim[2] = tex->pow2_matrix[0]; - tex_dim[3] = tex->pow2_matrix[5]; - } - else - { - tex_dim[0] = tex->pow2_matrix[0]; - tex_dim[1] = tex->pow2_matrix[5]; - } + ERR("Nonexistent texture is flagged for NP2 texcoord fixup.\n"); + continue; } - GL_EXTCALL(glUniform4fvARB(prog->ps.np2_fixup_location, - prog->ps.np2_fixup_info->num_consts, np2fixup_constants)); + if (idx % 2) + { + tex_dim[2] = tex->pow2_matrix[0]; + tex_dim[3] = tex->pow2_matrix[5]; + } + else + { + tex_dim[0] = tex->pow2_matrix[0]; + tex_dim[1] = tex->pow2_matrix[5]; + } } + + GL_EXTCALL(glUniform4fvARB(ps->np2_fixup_location, ps->np2_fixup_info->num_consts, np2fixup_constants)); } /* Context activation is done by the caller (state handler). */ -static void shader_glsl_load_constants(const struct wined3d_context *context, - BOOL usePixelShader, BOOL useVertexShader) +static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context *context, + const struct wined3d_state *state) { + const struct glsl_context_data *ctx_data = context->shader_backend_data; + const struct wined3d_shader *vshader = state->vertex_shader; + const struct wined3d_shader *pshader = state->pixel_shader; const struct wined3d_gl_info *gl_info = context->gl_info; - struct wined3d_device *device = context->swapchain->device; - struct wined3d_stateblock *stateBlock = device->stateBlock; - const struct wined3d_state *state = &stateBlock->state; - struct shader_glsl_priv *priv = device->shader_priv; + struct shader_glsl_priv *priv = shader_priv; float position_fixup[4]; + DWORD update_mask = 0; GLhandleARB programId; - struct glsl_shader_prog_link *prog = priv->glsl_program; + struct glsl_shader_prog_link *prog = ctx_data->glsl_program; UINT constant_version; int i; @@ -754,107 +833,90 @@ static void shader_glsl_load_constants(const struct wined3d_context *context, } programId = prog->programId; constant_version = prog->constant_version; + update_mask = context->constant_update_mask & prog->constant_update_mask; - if (useVertexShader) - { - const struct wined3d_shader *vshader = state->vertex_shader; - - /* Load DirectX 9 float constants/uniforms for vertex shader */ + if (update_mask & WINED3D_SHADER_CONST_VS_F) shader_glsl_load_constantsF(vshader, gl_info, state->vs_consts_f, prog->vs.uniform_f_locations, &priv->vconst_heap, priv->stack, constant_version); - /* Load DirectX 9 integer constants/uniforms for vertex shader */ + if (update_mask & WINED3D_SHADER_CONST_VS_I) shader_glsl_load_constantsI(vshader, gl_info, prog->vs.uniform_i_locations, state->vs_consts_i, - stateBlock->changed.vertexShaderConstantsI & vshader->reg_maps.integer_constants); + vshader->reg_maps.integer_constants); - /* Load DirectX 9 boolean constants/uniforms for vertex shader */ + if (update_mask & WINED3D_SHADER_CONST_VS_B) shader_glsl_load_constantsB(vshader, gl_info, programId, state->vs_consts_b, - stateBlock->changed.vertexShaderConstantsB & vshader->reg_maps.boolean_constants); + vshader->reg_maps.boolean_constants); - /* Upload the position fixup params */ + if (update_mask & WINED3D_SHADER_CONST_VS_POS_FIXUP) + { shader_get_position_fixup(context, state, position_fixup); GL_EXTCALL(glUniform4fvARB(prog->vs.pos_fixup_location, 1, position_fixup)); checkGLcall("glUniform4fvARB"); } - if (usePixelShader) - { - const struct wined3d_shader *pshader = state->pixel_shader; - - /* Load DirectX 9 float constants/uniforms for pixel shader */ + if (update_mask & WINED3D_SHADER_CONST_PS_F) shader_glsl_load_constantsF(pshader, gl_info, state->ps_consts_f, prog->ps.uniform_f_locations, &priv->pconst_heap, priv->stack, constant_version); - /* Load DirectX 9 integer constants/uniforms for pixel shader */ + if (update_mask & WINED3D_SHADER_CONST_PS_I) shader_glsl_load_constantsI(pshader, gl_info, prog->ps.uniform_i_locations, state->ps_consts_i, - stateBlock->changed.pixelShaderConstantsI & pshader->reg_maps.integer_constants); + pshader->reg_maps.integer_constants); - /* Load DirectX 9 boolean constants/uniforms for pixel shader */ + if (update_mask & WINED3D_SHADER_CONST_PS_B) shader_glsl_load_constantsB(pshader, gl_info, programId, state->ps_consts_b, - stateBlock->changed.pixelShaderConstantsB & pshader->reg_maps.boolean_constants); + pshader->reg_maps.boolean_constants); - /* Upload the environment bump map matrix if needed. The needsbumpmat - * member specifies the texture stage to load the matrix from. It - * can't be 0 for a valid texbem instruction. */ + if (update_mask & WINED3D_SHADER_CONST_PS_BUMP_ENV) + { for (i = 0; i < MAX_TEXTURES; ++i) { - const float *data; - if (prog->ps.bumpenv_mat_location[i] == -1) continue; - data = (const float *)&state->texture_states[i][WINED3D_TSS_BUMPENV_MAT00]; - GL_EXTCALL(glUniformMatrix2fvARB(prog->ps.bumpenv_mat_location[i], 1, 0, data)); - checkGLcall("glUniformMatrix2fvARB"); + GL_EXTCALL(glUniformMatrix2fvARB(prog->ps.bumpenv_mat_location[i], 1, 0, + (const GLfloat *)&state->texture_states[i][WINED3D_TSS_BUMPENV_MAT00])); - /* texbeml needs the luminance scale and offset too. If texbeml - * is used, needsbumpmat is set too, so we can check that in the - * needsbumpmat check. */ if (prog->ps.bumpenv_lum_scale_location[i] != -1) { - const GLfloat *scale = (const GLfloat *)&state->texture_states[i][WINED3D_TSS_BUMPENV_LSCALE]; - const GLfloat *offset = (const GLfloat *)&state->texture_states[i][WINED3D_TSS_BUMPENV_LOFFSET]; - - GL_EXTCALL(glUniform1fvARB(prog->ps.bumpenv_lum_scale_location[i], 1, scale)); - checkGLcall("glUniform1fvARB"); - GL_EXTCALL(glUniform1fvARB(prog->ps.bumpenv_lum_offset_location[i], 1, offset)); - checkGLcall("glUniform1fvARB"); + GL_EXTCALL(glUniform1fvARB(prog->ps.bumpenv_lum_scale_location[i], 1, + (const GLfloat *)&state->texture_states[i][WINED3D_TSS_BUMPENV_LSCALE])); + GL_EXTCALL(glUniform1fvARB(prog->ps.bumpenv_lum_offset_location[i], 1, + (const GLfloat *)&state->texture_states[i][WINED3D_TSS_BUMPENV_LOFFSET])); } } - if (prog->ps.ycorrection_location != -1) - { - float correction_params[4]; - - if (context->render_offscreen) - { - correction_params[0] = 0.0f; - correction_params[1] = 1.0f; - } else { - /* position is window relative, not viewport relative */ - correction_params[0] = (float) context->current_rt->resource.height; - correction_params[1] = -1.0f; - } - GL_EXTCALL(glUniform4fvARB(prog->ps.ycorrection_location, 1, correction_params)); - } + checkGLcall("bump env uniforms"); } - else if (priv->fragment_pipe == &glsl_fragment_pipe) + + if (update_mask & WINED3D_SHADER_CONST_PS_Y_CORR) + { + float correction_params[4]; + + if (context->render_offscreen) + { + correction_params[0] = 0.0f; + correction_params[1] = 1.0f; + } else { + /* position is window relative, not viewport relative */ + correction_params[0] = (float) context->current_rt->resource.height; + correction_params[1] = -1.0f; + } + GL_EXTCALL(glUniform4fvARB(prog->ps.ycorrection_location, 1, correction_params)); + } + + if (update_mask & WINED3D_SHADER_CONST_PS_NP2_FIXUP) + shader_glsl_load_np2fixup_constants(&prog->ps, gl_info, state); + + if (update_mask & WINED3D_SHADER_CONST_FFP_PS) { float col[4]; - for (i = 0; i < MAX_TEXTURES; ++i) + if (prog->ps.tex_factor_location != -1) { - GL_EXTCALL(glUniformMatrix2fvARB(prog->ps.bumpenv_mat_location[i], 1, 0, - (const float *)&state->texture_states[i][WINED3D_TSS_BUMPENV_MAT00])); - GL_EXTCALL(glUniform1fARB(prog->ps.bumpenv_lum_scale_location[i], - *(const float *)&state->texture_states[i][WINED3D_TSS_BUMPENV_LSCALE])); - GL_EXTCALL(glUniform1fARB(prog->ps.bumpenv_lum_offset_location[i], - *(const float *)&state->texture_states[i][WINED3D_TSS_BUMPENV_LOFFSET])); + D3DCOLORTOGLFLOAT4(state->render_states[WINED3D_RS_TEXTUREFACTOR], col); + GL_EXTCALL(glUniform4fvARB(prog->ps.tex_factor_location, 1, col)); } - D3DCOLORTOGLFLOAT4(state->render_states[WINED3D_RS_TEXTUREFACTOR], col); - GL_EXTCALL(glUniform4fARB(prog->ps.tex_factor_location, col[0], col[1], col[2], col[3])); - if (state->render_states[WINED3D_RS_SPECULARENABLE]) GL_EXTCALL(glUniform4fARB(prog->ps.specular_enable_location, 1.0f, 1.0f, 1.0f, 0.0f)); else @@ -875,12 +937,21 @@ static void shader_glsl_load_constants(const struct wined3d_context *context, } } -static void update_heap_entry(const struct constant_heap *heap, unsigned int idx, - unsigned int heap_idx, DWORD new_version) +static void update_heap_entry(struct constant_heap *heap, unsigned int idx, DWORD new_version) { struct constant_entry *entries = heap->entries; unsigned int *positions = heap->positions; - unsigned int parent_idx; + unsigned int heap_idx, parent_idx; + + if (!heap->contained[idx]) + { + heap_idx = heap->size++; + heap->contained[idx] = TRUE; + } + else + { + heap_idx = positions[idx]; + } while (heap_idx > 1) { @@ -906,10 +977,12 @@ static void shader_glsl_update_float_vertex_constants(struct wined3d_device *dev for (i = start; i < count + start; ++i) { - if (!device->stateBlock->changed.vertexShaderConstantsF[i]) - update_heap_entry(heap, i, heap->size++, priv->next_constant_version); - else - update_heap_entry(heap, i, heap->positions[i], priv->next_constant_version); + update_heap_entry(heap, i, priv->next_constant_version); + } + + for (i = 0; i < device->context_count; ++i) + { + device->contexts[i]->constant_update_mask |= WINED3D_SHADER_CONST_VS_F; } } @@ -921,10 +994,12 @@ static void shader_glsl_update_float_pixel_constants(struct wined3d_device *devi for (i = start; i < count + start; ++i) { - if (!device->stateBlock->changed.pixelShaderConstantsF[i]) - update_heap_entry(heap, i, heap->size++, priv->next_constant_version); - else - update_heap_entry(heap, i, heap->positions[i], priv->next_constant_version); + update_heap_entry(heap, i, priv->next_constant_version); + } + + for (i = 0; i < device->context_count; ++i) + { + device->contexts[i]->constant_update_mask |= WINED3D_SHADER_CONST_PS_F; } } @@ -945,7 +1020,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont const struct wined3d_shader_reg_maps *reg_maps, const struct shader_glsl_ctx_priv *ctx_priv) { const struct wined3d_shader_version *version = ®_maps->shader_version; - const struct wined3d_state *state = &shader->device->stateBlock->state; + const struct wined3d_state *state = &shader->device->state; const struct ps_compile_args *ps_args = ctx_priv->cur_ps_args; const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_fb_state *fb = &shader->device->fb; @@ -1058,7 +1133,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont if (reg_maps->sampler_type[i]) { BOOL shadow_sampler = version->type == WINED3D_SHADER_TYPE_PIXEL && (ps_args->shadow & (1 << i)); - const struct wined3d_texture *texture; + BOOL tex_rect; switch (reg_maps->sampler_type[i]) { @@ -1069,17 +1144,18 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont shader_addline(buffer, "uniform sampler1D %s_sampler%u;\n", prefix, i); break; case WINED3DSTT_2D: - texture = state->textures[i]; + tex_rect = version->type == WINED3D_SHADER_TYPE_PIXEL && (ps_args->np2_fixup & (1 << i)); + tex_rect = tex_rect && gl_info->supported[ARB_TEXTURE_RECTANGLE]; if (shadow_sampler) { - if (texture && texture->target == GL_TEXTURE_RECTANGLE_ARB) + if (tex_rect) shader_addline(buffer, "uniform sampler2DRectShadow %s_sampler%u;\n", prefix, i); else shader_addline(buffer, "uniform sampler2DShadow %s_sampler%u;\n", prefix, i); } else { - if (texture && texture->target == GL_TEXTURE_RECTANGLE_ARB) + if (tex_rect) shader_addline(buffer, "uniform sampler2DRect %s_sampler%u;\n", prefix, i); else shader_addline(buffer, "uniform sampler2D %s_sampler%u;\n", prefix, i); @@ -1202,10 +1278,12 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont if (ps_args->srgb_correction) { - shader_addline(buffer, "const vec4 srgb_const0 = vec4(%.8e, %.8e, %.8e, %.8e);\n", - srgb_pow, srgb_mul_high, srgb_sub_high, srgb_mul_low); - shader_addline(buffer, "const vec4 srgb_const1 = vec4(%.8e, 0.0, 0.0, 0.0);\n", - srgb_cmp); + shader_addline(buffer, "const vec4 srgb_const0 = "); + shader_glsl_append_imm_vec4(buffer, srgb_const0); + shader_addline(buffer, ";\n"); + shader_addline(buffer, "const vec4 srgb_const1 = "); + shader_glsl_append_imm_vec4(buffer, srgb_const1); + shader_addline(buffer, ";\n"); } if (reg_maps->vpos || reg_maps->usesdsy) { @@ -1217,13 +1295,21 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont } else { - /* This happens because we do not have proper tracking of the constant registers that are - * actually used, only the max limit of the shader version - */ + float ycorrection[] = + { + context->render_offscreen ? 0.0f : fb->render_targets[0]->resource.height, + context->render_offscreen ? 1.0f : -1.0f, + 0.0f, + 0.0f, + }; + + /* This happens because we do not have proper tracking of the + * constant registers that are actually used, only the max + * limit of the shader version. */ FIXME("Cannot find a free uniform for vpos correction params\n"); - shader_addline(buffer, "const vec4 ycorrection = vec4(%f, %f, 0.0, 0.0);\n", - context->render_offscreen ? 0.0f : fb->render_targets[0]->resource.height, - context->render_offscreen ? 1.0f : -1.0f); + shader_addline(buffer, "const vec4 ycorrection = "); + shader_glsl_append_imm_vec4(buffer, ycorrection); + shader_addline(buffer, ";\n"); } shader_addline(buffer, "vec4 vpos;\n"); } @@ -1253,15 +1339,13 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont shader_addline(buffer, "vec4 tmp0;\n"); shader_addline(buffer, "vec4 tmp1;\n"); - /* Local constants use a different name so they can be loaded once at shader link time - * They can't be hardcoded into the shader text via LC = {x, y, z, w}; because the - * float -> string conversion can cause precision loss. - */ if (!shader->load_local_constsF) { LIST_FOR_EACH_ENTRY(lconst, &shader->constantsF, struct wined3d_shader_lconst, entry) { - shader_addline(buffer, "uniform vec4 %s_lc%u;\n", prefix, lconst->idx); + shader_addline(buffer, "const vec4 %s_lc%u = ", prefix, lconst->idx); + shader_glsl_append_imm_vec4(buffer, (const float *)lconst->value); + shader_addline(buffer, ";\n"); } } @@ -1385,6 +1469,7 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register * const struct wined3d_gl_info *gl_info = ins->ctx->gl_info; const char *prefix = shader_glsl_get_prefix(version->type); struct glsl_src_param rel_param0, rel_param1; + char imm_str[4][16]; if (reg->idx[0].offset != ~0U && reg->idx[0].rel_addr) shader_glsl_add_src_param(ins, reg->idx[0].rel_addr, WINED3DSP_WRITEMASK_0, &rel_param0); @@ -1580,7 +1665,7 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register * switch (reg->data_type) { case WINED3D_DATA_FLOAT: - sprintf(register_name, "%.8e", *(const float *)reg->immconst_data); + shader_glsl_ftoa(*(const float *)reg->immconst_data, register_name); break; case WINED3D_DATA_INT: sprintf(register_name, "%#x", reg->immconst_data[0]); @@ -1600,9 +1685,12 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register * switch (reg->data_type) { case WINED3D_DATA_FLOAT: - sprintf(register_name, "vec4(%.8e, %.8e, %.8e, %.8e)", - *(const float *)®->immconst_data[0], *(const float *)®->immconst_data[1], - *(const float *)®->immconst_data[2], *(const float *)®->immconst_data[3]); + shader_glsl_ftoa(*(const float *)®->immconst_data[0], imm_str[0]); + shader_glsl_ftoa(*(const float *)®->immconst_data[1], imm_str[1]); + shader_glsl_ftoa(*(const float *)®->immconst_data[2], imm_str[2]); + shader_glsl_ftoa(*(const float *)®->immconst_data[3], imm_str[3]); + sprintf(register_name, "vec4(%s, %s, %s, %s)", + imm_str[0], imm_str[1], imm_str[2], imm_str[3]); break; case WINED3D_DATA_INT: sprintf(register_name, "ivec4(%#x, %#x, %#x, %#x)", @@ -1870,7 +1958,7 @@ static void shader_glsl_get_sample_function(const struct wined3d_shader_context BOOL shadow = ctx->reg_maps->shader_version.type == WINED3D_SHADER_TYPE_PIXEL && (((const struct shader_glsl_ctx_priv *)ctx->backend_data)->cur_ps_args->shadow & (1 << sampler_idx)); BOOL projected = flags & WINED3D_GLSL_SAMPLE_PROJECTED; - BOOL texrect = flags & WINED3D_GLSL_SAMPLE_RECT; + BOOL texrect = flags & WINED3D_GLSL_SAMPLE_NPOT && gl_info->supported[ARB_TEXTURE_RECTANGLE]; BOOL lod = flags & WINED3D_GLSL_SAMPLE_LOD; BOOL grad = flags & WINED3D_GLSL_SAMPLE_GRAD; @@ -2952,14 +3040,11 @@ static void shader_glsl_cnd(const struct wined3d_shader_instruction *ins) shader_glsl_add_src_param(ins, &ins->src[1], write_mask, &src1_param); shader_glsl_add_src_param(ins, &ins->src[2], write_mask, &src2_param); - /* Fun: The D3DSI_COISSUE flag changes the semantic of the cnd instruction for < 1.4 shaders */ - if (ins->coissue) - { + if (ins->coissue && ins->dst->write_mask != WINED3DSP_WRITEMASK_3) shader_addline(ins->ctx->buffer, "%s /* COISSUE! */);\n", src1_param.param_str); - } else { + else shader_addline(ins->ctx->buffer, "%s > 0.5 ? %s : %s);\n", src0_param.param_str, src1_param.param_str, src2_param.param_str); - } return; } @@ -3458,15 +3543,13 @@ static void shader_glsl_ret(const struct wined3d_shader_instruction *ins) ********************************************/ static void shader_glsl_tex(const struct wined3d_shader_instruction *ins) { - const struct wined3d_shader *shader = ins->ctx->shader; - struct wined3d_device *device = shader->device; DWORD shader_version = WINED3D_SHADER_VERSION(ins->ctx->reg_maps->shader_version.major, ins->ctx->reg_maps->shader_version.minor); struct glsl_sample_function sample_function; - const struct wined3d_texture *texture; DWORD sample_flags = 0; DWORD sampler_idx; DWORD mask = 0, swizzle; + const struct shader_glsl_ctx_priv *priv = ins->ctx->backend_data; /* 1.0-1.4: Use destination register as sampler source. * 2.0+: Use provided sampler source. */ @@ -3474,11 +3557,9 @@ static void shader_glsl_tex(const struct wined3d_shader_instruction *ins) sampler_idx = ins->dst[0].reg.idx[0].offset; else sampler_idx = ins->src[1].reg.idx[0].offset; - texture = device->stateBlock->state.textures[sampler_idx]; if (shader_version < WINED3D_SHADER_VERSION(1,4)) { - const struct shader_glsl_ctx_priv *priv = ins->ctx->backend_data; DWORD flags = (priv->cur_ps_args->tex_transform >> sampler_idx * WINED3D_PSARGS_TEXTRANSFORM_SHIFT) & WINED3D_PSARGS_TEXTRANSFORM_MASK; enum wined3d_sampler_texture_type sampler_type = ins->ctx->reg_maps->sampler_type[sampler_idx]; @@ -3516,8 +3597,11 @@ static void shader_glsl_tex(const struct wined3d_shader_instruction *ins) sample_flags |= WINED3D_GLSL_SAMPLE_PROJECTED; mask = WINED3DSP_WRITEMASK_3; } - } else { - if (ins->flags & WINED3DSI_TEXLD_PROJECT) + } + else + { + if ((ins->flags & WINED3DSI_TEXLD_PROJECT) + && ins->ctx->reg_maps->sampler_type[sampler_idx] != WINED3DSTT_CUBE) { /* ps 2.0 texldp instruction always divides by the fourth component. */ sample_flags |= WINED3D_GLSL_SAMPLE_PROJECTED; @@ -3525,8 +3609,8 @@ static void shader_glsl_tex(const struct wined3d_shader_instruction *ins) } } - if (texture && texture->target == GL_TEXTURE_RECTANGLE_ARB) - sample_flags |= WINED3D_GLSL_SAMPLE_RECT; + if (priv->cur_ps_args->np2_fixup & (1 << sampler_idx)) + sample_flags |= WINED3D_GLSL_SAMPLE_NPOT; shader_glsl_get_sample_function(ins->ctx, sampler_idx, sample_flags, &sample_function); mask |= sample_function.coord_mask; @@ -3562,15 +3646,13 @@ static void shader_glsl_tex(const struct wined3d_shader_instruction *ins) static void shader_glsl_texldd(const struct wined3d_shader_instruction *ins) { - const struct wined3d_shader *shader = ins->ctx->shader; - struct wined3d_device *device = shader->device; const struct wined3d_gl_info *gl_info = ins->ctx->gl_info; struct glsl_src_param coord_param, dx_param, dy_param; DWORD sample_flags = WINED3D_GLSL_SAMPLE_GRAD; struct glsl_sample_function sample_function; DWORD sampler_idx; DWORD swizzle = ins->src[1].swizzle; - const struct wined3d_texture *texture; + const struct shader_glsl_ctx_priv *priv = ins->ctx->backend_data; if (!gl_info->supported[ARB_SHADER_TEXTURE_LOD] && !gl_info->supported[EXT_GPU_SHADER4]) { @@ -3580,9 +3662,8 @@ static void shader_glsl_texldd(const struct wined3d_shader_instruction *ins) } sampler_idx = ins->src[1].reg.idx[0].offset; - texture = device->stateBlock->state.textures[sampler_idx]; - if (texture && texture->target == GL_TEXTURE_RECTANGLE_ARB) - sample_flags |= WINED3D_GLSL_SAMPLE_RECT; + if (priv->cur_ps_args->np2_fixup & (1 << sampler_idx)) + sample_flags |= WINED3D_GLSL_SAMPLE_NPOT; shader_glsl_get_sample_function(ins->ctx, sampler_idx, sample_flags, &sample_function); shader_glsl_add_src_param(ins, &ins->src[0], sample_function.coord_mask, &coord_param); @@ -3595,20 +3676,18 @@ static void shader_glsl_texldd(const struct wined3d_shader_instruction *ins) static void shader_glsl_texldl(const struct wined3d_shader_instruction *ins) { - const struct wined3d_shader *shader = ins->ctx->shader; - struct wined3d_device *device = shader->device; const struct wined3d_gl_info *gl_info = ins->ctx->gl_info; struct glsl_src_param coord_param, lod_param; DWORD sample_flags = WINED3D_GLSL_SAMPLE_LOD; struct glsl_sample_function sample_function; DWORD sampler_idx; DWORD swizzle = ins->src[1].swizzle; - const struct wined3d_texture *texture; + const struct shader_glsl_ctx_priv *priv = ins->ctx->backend_data; sampler_idx = ins->src[1].reg.idx[0].offset; - texture = device->stateBlock->state.textures[sampler_idx]; - if (texture && texture->target == GL_TEXTURE_RECTANGLE_ARB) - sample_flags |= WINED3D_GLSL_SAMPLE_RECT; + if (ins->ctx->reg_maps->shader_version.type == WINED3D_SHADER_TYPE_PIXEL + && priv->cur_ps_args->np2_fixup & (1 << sampler_idx)) + sample_flags |= WINED3D_GLSL_SAMPLE_NPOT; shader_glsl_get_sample_function(ins->ctx, sampler_idx, sample_flags, &sample_function); shader_glsl_add_src_param(ins, &ins->src[0], sample_function.coord_mask, &coord_param); @@ -4426,24 +4505,23 @@ static void shader_glsl_generate_srgb_write_correction(struct wined3d_shader_buf shader_addline(buffer, "gl_FragData[0] = clamp(gl_FragData[0], 0.0, 1.0);\n"); } -static void shader_glsl_generate_fog_code(struct wined3d_shader_buffer *buffer, enum fogmode mode) +static void shader_glsl_generate_fog_code(struct wined3d_shader_buffer *buffer, enum wined3d_ffp_ps_fog_mode mode) { switch (mode) { - case FOG_OFF: + case WINED3D_FFP_PS_FOG_OFF: return; - case FOG_LINEAR: - /* Fog = (gl_Fog.end - gl_FogFragCoord) / (gl_Fog.end - gl_Fog.start) */ - shader_addline(buffer, "float Fog = (gl_Fog.end - gl_FogFragCoord) / (gl_Fog.end - gl_Fog.start);\n"); + case WINED3D_FFP_PS_FOG_LINEAR: + shader_addline(buffer, "float Fog = (gl_Fog.end - gl_FogFragCoord) * gl_Fog.scale;\n"); break; - case FOG_EXP: + case WINED3D_FFP_PS_FOG_EXP: /* Fog = e^-(gl_Fog.density * gl_FogFragCoord) */ shader_addline(buffer, "float Fog = exp(-gl_Fog.density * gl_FogFragCoord);\n"); break; - case FOG_EXP2: + case WINED3D_FFP_PS_FOG_EXP2: /* Fog = e^-((gl_Fog.density * gl_FogFragCoord)^2) */ shader_addline(buffer, "float Fog = exp(-gl_Fog.density * gl_Fog.density * gl_FogFragCoord * gl_FogFragCoord);\n"); break; @@ -4456,25 +4534,6 @@ static void shader_glsl_generate_fog_code(struct wined3d_shader_buffer *buffer, shader_addline(buffer, "gl_FragData[0].xyz = mix(gl_Fog.color.xyz, gl_FragData[0].xyz, clamp(Fog, 0.0, 1.0));\n"); } -/* Context activation is done by the caller. */ -static void hardcode_local_constants(const struct wined3d_shader *shader, - const struct wined3d_gl_info *gl_info, GLhandleARB programId, const char *prefix) -{ - const struct wined3d_shader_lconst *lconst; - GLint tmp_loc; - const float *value; - char glsl_name[10]; - - LIST_FOR_EACH_ENTRY(lconst, &shader->constantsF, struct wined3d_shader_lconst, entry) - { - value = (const float *)lconst->value; - snprintf(glsl_name, sizeof(glsl_name), "%s_lc%u", prefix, lconst->idx); - tmp_loc = GL_EXTCALL(glGetUniformLocationARB(programId, glsl_name)); - GL_EXTCALL(glUniform4fvARB(tmp_loc, 1, value)); - } - checkGLcall("Hardcoding local constants"); -} - /* Context activation is done by the caller. */ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context, struct wined3d_shader_buffer *buffer, const struct wined3d_shader *shader, @@ -4646,7 +4705,6 @@ static GLhandleARB find_glsl_pshader(const struct wined3d_context *context, struct wined3d_shader_buffer *buffer, struct wined3d_shader *shader, const struct ps_compile_args *args, const struct ps_np2fixup_info **np2fixup_info) { - struct wined3d_state *state = &shader->device->stateBlock->state; struct glsl_ps_compiled_shader *gl_shaders, *new_array; struct glsl_shader_private *shader_data; struct ps_np2fixup_info *np2fixup; @@ -4709,7 +4767,7 @@ static GLhandleARB find_glsl_pshader(const struct wined3d_context *context, memset(np2fixup, 0, sizeof(*np2fixup)); *np2fixup_info = args->np2_fixup ? np2fixup : NULL; - pixelshader_update_samplers(&shader->reg_maps, state->textures); + pixelshader_update_samplers(shader, args->tex_types); shader_buffer_clear(buffer); ret = shader_glsl_generate_pshader(context, buffer, shader, args, np2fixup); @@ -4731,7 +4789,7 @@ static GLhandleARB find_glsl_vshader(const struct wined3d_context *context, { UINT i; DWORD new_size; - DWORD use_map = shader->device->strided_streams.use_map; + DWORD use_map = shader->device->stream_info.use_map; struct glsl_vs_compiled_shader *gl_shaders, *new_array; struct glsl_shader_private *shader_data; GLhandleARB ret; @@ -4829,6 +4887,239 @@ static GLhandleARB find_glsl_geometry_shader(const struct wined3d_context *conte return ret; } +static const char *shader_glsl_ffp_mcs(enum wined3d_material_color_source mcs, const char *material) +{ + switch (mcs) + { + case WINED3D_MCS_MATERIAL: + return material; + case WINED3D_MCS_COLOR1: + return "gl_Color"; + case WINED3D_MCS_COLOR2: + return "gl_SecondaryColor"; + default: + ERR("Invalid material color source %#x.\n", mcs); + return ""; + } +} + +static void shader_glsl_ffp_vertex_lighting(struct wined3d_shader_buffer *buffer, + const struct wined3d_ffp_vs_settings *settings, const struct wined3d_gl_info *gl_info) +{ + const char *diffuse, *specular, *emission, *ambient; + enum wined3d_light_type light_type; + unsigned int i; + + if (!settings->lighting) + { + shader_addline(buffer, "gl_FrontColor = gl_Color;\n"); + shader_addline(buffer, "gl_FrontSecondaryColor = gl_SecondaryColor;\n"); + return; + } + + shader_addline(buffer, "vec3 ambient = gl_LightModel.ambient.xyz;\n"); + shader_addline(buffer, "vec3 diffuse = vec3(0.0);\n"); + shader_addline(buffer, "vec4 specular = vec4(0.0);\n"); + shader_addline(buffer, "vec3 dir, dst;\n"); + shader_addline(buffer, "float att, t;\n"); + + ambient = shader_glsl_ffp_mcs(settings->ambient_source, "gl_FrontMaterial.ambient"); + diffuse = shader_glsl_ffp_mcs(settings->diffuse_source, "gl_FrontMaterial.diffuse"); + specular = shader_glsl_ffp_mcs(settings->specular_source, "gl_FrontMaterial.specular"); + emission = shader_glsl_ffp_mcs(settings->emission_source, "gl_FrontMaterial.emission"); + + for (i = 0; i < MAX_ACTIVE_LIGHTS; ++i) + { + light_type = (settings->light_type >> WINED3D_FFP_LIGHT_TYPE_SHIFT(i)) & WINED3D_FFP_LIGHT_TYPE_MASK; + switch (light_type) + { + case WINED3D_LIGHT_POINT: + shader_addline(buffer, "dir = gl_LightSource[%u].position.xyz - ec_pos.xyz;\n", i); + shader_addline(buffer, "dst.z = dot(dir, dir);\n"); + shader_addline(buffer, "dst.y = sqrt(dst.z);\n"); + shader_addline(buffer, "dst.x = 1.0;\n"); + shader_addline(buffer, "att = dot(dst.xyz, vec3(gl_LightSource[%u].constantAttenuation," + " gl_LightSource[%u].linearAttenuation, gl_LightSource[%u].quadraticAttenuation));\n", i, i, i); + shader_addline(buffer, "ambient += gl_LightSource[%u].ambient.xyz / att;\n", i); + if (!settings->normal) + break; + shader_addline(buffer, "dir = normalize(dir);\n"); + shader_addline(buffer, "diffuse += (max(0.0, dot(dir, normal))" + " * gl_LightSource[%u].diffuse.xyz) / att;\n", i); + if (settings->localviewer) + shader_addline(buffer, "t = dot(normal, normalize(dir - normalize(ec_pos.xyz)));\n"); + else + shader_addline(buffer, "t = dot(normal, normalize(dir + vec3(0.0, 0.0, 1.0)));\n"); + shader_addline(buffer, "if (t > 0.0) specular += (pow(t, gl_FrontMaterial.shininess)" + " * gl_LightSource[%u].specular) / att;\n", i); + break; + + case WINED3D_LIGHT_SPOT: + shader_addline(buffer, "dir = gl_LightSource[%u].position.xyz - ec_pos.xyz;\n", i); + shader_addline(buffer, "dst.z = dot(dir, dir);\n"); + shader_addline(buffer, "dst.y = sqrt(dst.z);\n"); + shader_addline(buffer, "dst.x = 1.0;\n"); + shader_addline(buffer, "dir = normalize(dir);\n"); + shader_addline(buffer, "t = dot(-dir, normalize(gl_LightSource[%u].spotDirection));\n", i); + shader_addline(buffer, "if (t < gl_LightSource[%u].spotCosCutoff) att = 0.0;\n", i); + shader_addline(buffer, "else att = pow(t, gl_LightSource[%u].spotExponent)" + " / dot(dst.xyz, vec3(gl_LightSource[%u].constantAttenuation," + " gl_LightSource[%u].linearAttenuation, gl_LightSource[%u].quadraticAttenuation));\n", + i, i, i, i); + shader_addline(buffer, "ambient += gl_LightSource[%u].ambient.xyz * att;\n", i); + if (!settings->normal) + break; + shader_addline(buffer, "diffuse += (max(0.0, dot(dir, normal))" + " * gl_LightSource[%u].diffuse.xyz) * att;\n", i); + if (settings->localviewer) + shader_addline(buffer, "t = dot(normal, normalize(dir - normalize(ec_pos.xyz)));\n"); + else + shader_addline(buffer, "t = dot(normal, normalize(dir + vec3(0.0, 0.0, 1.0)));\n"); + shader_addline(buffer, "if (t > 0.0) specular += (pow(t, gl_FrontMaterial.shininess)" + " * gl_LightSource[%u].specular) * att;\n", i); + break; + + case WINED3D_LIGHT_DIRECTIONAL: + shader_addline(buffer, "ambient += gl_LightSource[%u].ambient.xyz;\n", i); + if (!settings->normal) + break; + shader_addline(buffer, "dir = normalize(gl_LightSource[%u].position.xyz);\n", i); + shader_addline(buffer, "diffuse += max(0.0, dot(dir, normal)) * gl_LightSource[%u].diffuse.xyz;\n", i); + shader_addline(buffer, "t = dot(normal, gl_LightSource[%u].halfVector.xyz);\n", i); + shader_addline(buffer, "if (t > 0.0) specular += pow(t, gl_FrontMaterial.shininess)" + " * gl_LightSource[%u].specular;\n", i); + break; + + default: + if (light_type) + FIXME("Unhandled light type %#x.\n", light_type); + continue; + } + } + + shader_addline(buffer, "gl_FrontColor.xyz = %s.xyz * ambient + %s.xyz * diffuse + %s.xyz;\n", + ambient, diffuse, emission); + shader_addline(buffer, "gl_FrontColor.w = %s.w;\n", diffuse); + shader_addline(buffer, "gl_FrontSecondaryColor = %s * specular;\n", specular); +} + +/* Context activation is done by the caller. */ +static GLhandleARB shader_glsl_generate_ffp_vertex_shader(struct wined3d_shader_buffer *buffer, + const struct wined3d_ffp_vs_settings *settings, const struct wined3d_gl_info *gl_info) +{ + GLhandleARB shader_obj; + unsigned int i; + + shader_buffer_clear(buffer); + + shader_addline(buffer, "#version 120\n"); + shader_addline(buffer, "\n"); + shader_addline(buffer, "void main()\n{\n"); + shader_addline(buffer, "float m;\n"); + shader_addline(buffer, "vec3 r;\n"); + + if (settings->transformed) + { + shader_addline(buffer, "vec4 ec_pos = vec4(gl_Vertex.xyz, 1.0);\n"); + shader_addline(buffer, "gl_Position = gl_ProjectionMatrix * ec_pos;\n"); + shader_addline(buffer, "if (gl_Vertex.w != 0.0) gl_Position /= gl_Vertex.w;\n"); + } + else + { + shader_addline(buffer, "vec4 ec_pos = gl_ModelViewMatrix * gl_Vertex;\n"); + shader_addline(buffer, "gl_Position = gl_ProjectionMatrix * ec_pos;\n"); + if (settings->clipping) + shader_addline(buffer, "gl_ClipVertex = ec_pos;\n"); + shader_addline(buffer, "ec_pos /= ec_pos.w;\n"); + } + + if (!settings->normal) + shader_addline(buffer, "vec3 normal = vec3(0.0);\n"); + else if (settings->normalize) + shader_addline(buffer, "vec3 normal = normalize(gl_NormalMatrix * gl_Normal);\n"); + else + shader_addline(buffer, "vec3 normal = gl_NormalMatrix * gl_Normal;\n"); + + shader_glsl_ffp_vertex_lighting(buffer, settings, gl_info); + + for (i = 0; i < MAX_TEXTURES; ++i) + { + switch (settings->texgen[i] << WINED3D_FFP_TCI_SHIFT) + { + case WINED3DTSS_TCI_PASSTHRU: + if (settings->texcoords & (1 << i)) + shader_addline(buffer, "gl_TexCoord[%u] = gl_TextureMatrix[%u] * gl_MultiTexCoord%d;\n", + i, i, i); + break; + + case WINED3DTSS_TCI_CAMERASPACENORMAL: + shader_addline(buffer, "gl_TexCoord[%u] = gl_TextureMatrix[%u] * vec4(normal, 1.0);\n", i, i); + break; + + case WINED3DTSS_TCI_CAMERASPACEPOSITION: + shader_addline(buffer, "gl_TexCoord[%u] = gl_TextureMatrix[%u] * ec_pos;\n", i, i); + break; + + case WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR: + shader_addline(buffer, "gl_TexCoord[%u] = gl_TextureMatrix[%u]" + " * vec4(reflect(normalize(ec_pos.xyz), normal), 1.0);\n", i, i); + break; + + case WINED3DTSS_TCI_SPHEREMAP: + shader_addline(buffer, "r = reflect(normalize(ec_pos.xyz), normal);\n"); + shader_addline(buffer, "m = 2.0 * length(vec3(r.x, r.y, r.z + 1.0));\n"); + shader_addline(buffer, "gl_TexCoord[%u] = gl_TextureMatrix[%u]" + " * vec4(r.x / m + 0.5, r.y / m + 0.5, 0.0, 1.0);\n", i, i); + break; + + default: + ERR("Unhandled texgen %#x.\n", settings->texgen[i]); + break; + } + } + + switch (settings->fog_mode) + { + case WINED3D_FFP_VS_FOG_OFF: + break; + + case WINED3D_FFP_VS_FOG_FOGCOORD: + shader_addline(buffer, "gl_FogFragCoord = gl_SecondaryColor.w * 255.0;\n"); + break; + + case WINED3D_FFP_VS_FOG_RANGE: + shader_addline(buffer, "gl_FogFragCoord = length(ec_pos.xyz);\n"); + break; + + case WINED3D_FFP_VS_FOG_DEPTH: + if (settings->ortho_fog) + /* Need to undo the [0.0 - 1.0] -> [-1.0 - 1.0] transformation from D3D to GL coordinates. */ + shader_addline(buffer, "gl_FogFragCoord = gl_Position.z * 0.5 + 0.5;\n"); + else + shader_addline(buffer, "gl_FogFragCoord = ec_pos.z;\n"); + break; + + default: + ERR("Unhandled fog mode %#x.\n", settings->fog_mode); + break; + } + + if (settings->point_size) + { + shader_addline(buffer, "gl_PointSize = gl_Point.size / sqrt(gl_Point.distanceConstantAttenuation" + " + gl_Point.distanceLinearAttenuation * length(ec_pos.xyz)" + " + gl_Point.distanceQuadraticAttenuation * dot(ec_pos.xyz, ec_pos.xyz));\n"); + shader_addline(buffer, "gl_PointSize = clamp(gl_PointSize, gl_Point.sizeMin, gl_Point.sizeMax);\n"); + } + + shader_addline(buffer, "}\n"); + + shader_obj = GL_EXTCALL(glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB)); + shader_glsl_compile(gl_info, shader_obj, buffer->buffer); + + return shader_obj; +} + static const char *shader_glsl_get_ffp_fragment_op_arg(struct wined3d_shader_buffer *buffer, DWORD argnum, unsigned int stage, DWORD arg) { @@ -5149,6 +5440,9 @@ static GLuint shader_glsl_generate_ffp_fragment_shader(struct wined3d_shader_buf shader_addline(buffer, "#version 120\n"); + if (gl_info->supported[ARB_TEXTURE_RECTANGLE]) + shader_addline(buffer, "#extension GL_ARB_texture_rectangle : enable\n"); + shader_addline(buffer, "vec4 tmp0, tmp1;\n"); shader_addline(buffer, "vec4 ret;\n"); if (tempreg_used || settings->sRGB_write) @@ -5199,16 +5493,18 @@ static GLuint shader_glsl_generate_ffp_fragment_shader(struct wined3d_shader_buf if (settings->sRGB_write) { - shader_addline(buffer, "const vec4 srgb_const0 = vec4(%.8e, %.8e, %.8e, %.8e);\n", - srgb_pow, srgb_mul_high, srgb_sub_high, srgb_mul_low); - shader_addline(buffer, "const vec4 srgb_const1 = vec4(%.8e, 0.0, 0.0, 0.0);\n", - srgb_cmp); + shader_addline(buffer, "const vec4 srgb_const0 = "); + shader_glsl_append_imm_vec4(buffer, srgb_const0); + shader_addline(buffer, ";\n"); + shader_addline(buffer, "const vec4 srgb_const1 = "); + shader_glsl_append_imm_vec4(buffer, srgb_const1); + shader_addline(buffer, ";\n"); } shader_addline(buffer, "void main()\n{\n"); if (lowest_disabled_stage < 7 && settings->emul_clipplanes) - shader_addline(buffer, "if (any(lessThan(gl_texCoord[7], vec4(0.0)))) discard;\n"); + shader_addline(buffer, "if (any(lessThan(gl_TexCoord[7], vec4(0.0)))) discard;\n"); /* Generate texture sampling instructions) */ for (stage = 0; stage < MAX_TEXTURES && settings->op[stage].cop != WINED3D_TOP_DISABLE; ++stage) @@ -5436,6 +5732,27 @@ static GLuint shader_glsl_generate_ffp_fragment_shader(struct wined3d_shader_buf return shader_obj; } +static struct glsl_ffp_vertex_shader *shader_glsl_find_ffp_vertex_shader(struct shader_glsl_priv *priv, + const struct wined3d_gl_info *gl_info, const struct wined3d_ffp_vs_settings *settings) +{ + struct glsl_ffp_vertex_shader *shader; + const struct wine_rb_entry *entry; + + if ((entry = wine_rb_get(&priv->ffp_vertex_shaders, settings))) + return WINE_RB_ENTRY_VALUE(entry, struct glsl_ffp_vertex_shader, desc.entry); + + if (!(shader = HeapAlloc(GetProcessHeap(), 0, sizeof(*shader)))) + return NULL; + + shader->desc.settings = *settings; + shader->id = shader_glsl_generate_ffp_vertex_shader(&priv->shader_buffer, settings, gl_info); + list_init(&shader->linked_programs); + if (wine_rb_put(&priv->ffp_vertex_shaders, &shader->desc.settings, &shader->desc.entry) == -1) + ERR("Failed to insert ffp vertex shader.\n"); + + return shader; +} + static struct glsl_ffp_fragment_shader *shader_glsl_find_ffp_fragment_shader(struct shader_glsl_priv *priv, const struct wined3d_gl_info *gl_info, const struct ffp_frag_settings *args) { @@ -5517,13 +5834,11 @@ static void shader_glsl_init_ps_uniform_locations(const struct wined3d_gl_info * } /* Context activation is done by the caller. */ -static void set_glsl_shader_program(const struct wined3d_context *context, struct wined3d_device *device, - enum wined3d_shader_mode vertex_mode, enum wined3d_shader_mode fragment_mode) +static void set_glsl_shader_program(const struct wined3d_context *context, const struct wined3d_state *state, + struct shader_glsl_priv *priv, struct glsl_context_data *ctx_data) { - const struct wined3d_state *state = &device->stateBlock->state; const struct wined3d_gl_info *gl_info = context->gl_info; const struct ps_np2fixup_info *np2fixup_info = NULL; - struct shader_glsl_priv *priv = device->shader_priv; struct glsl_shader_prog_link *entry = NULL; struct wined3d_shader *vshader = NULL; struct wined3d_shader *gshader = NULL; @@ -5531,54 +5846,83 @@ static void set_glsl_shader_program(const struct wined3d_context *context, struc GLhandleARB programId = 0; GLhandleARB reorder_shader_id = 0; unsigned int i; - struct ps_compile_args ps_compile_args; - struct vs_compile_args vs_compile_args; - GLhandleARB vs_id, gs_id, ps_id; - struct list *ps_list; + GLhandleARB vs_id = 0; + GLhandleARB gs_id = 0; + GLhandleARB ps_id = 0; + struct list *ps_list, *vs_list; + struct wined3d_device *device = context->swapchain->device; - if (vertex_mode == WINED3D_SHADER_MODE_SHADER) + if (!(context->shader_update_mask & (1 << WINED3D_SHADER_TYPE_VERTEX))) { + vs_id = ctx_data->glsl_program->vs.id; + vs_list = &ctx_data->glsl_program->vs.shader_entry; + + if (use_vs(state)) + { + vshader = state->vertex_shader; + gshader = state->geometry_shader; + + if (!(context->shader_update_mask & (1 << WINED3D_SHADER_TYPE_GEOMETRY)) + && ctx_data->glsl_program->gs.id) + gs_id = ctx_data->glsl_program->gs.id; + else if (gshader) + gs_id = find_glsl_geometry_shader(context, &priv->shader_buffer, gshader); + } + } + else if (use_vs(state)) + { + struct vs_compile_args vs_compile_args; vshader = state->vertex_shader; + find_vs_compile_args(state, vshader, &vs_compile_args); vs_id = find_glsl_vshader(context, &priv->shader_buffer, vshader, &vs_compile_args); + vs_list = &vshader->linked_programs; if ((gshader = state->geometry_shader)) gs_id = find_glsl_geometry_shader(context, &priv->shader_buffer, gshader); - else - gs_id = 0; } - else + else if (priv->vertex_pipe == &glsl_vertex_pipe) { - vs_id = 0; - gs_id = 0; + struct glsl_ffp_vertex_shader *ffp_shader; + struct wined3d_ffp_vs_settings settings; + + wined3d_ffp_get_vs_settings(state, &device->stream_info, &settings); + ffp_shader = shader_glsl_find_ffp_vertex_shader(priv, gl_info, &settings); + vs_id = ffp_shader->id; + vs_list = &ffp_shader->linked_programs; } - if (fragment_mode == WINED3D_SHADER_MODE_SHADER) + if (!(context->shader_update_mask & (1 << WINED3D_SHADER_TYPE_PIXEL))) { + ps_id = ctx_data->glsl_program->ps.id; + ps_list = &ctx_data->glsl_program->ps.shader_entry; + + if (use_ps(state)) + pshader = state->pixel_shader; + } + else if (use_ps(state)) + { + struct ps_compile_args ps_compile_args; pshader = state->pixel_shader; find_ps_compile_args(state, pshader, &ps_compile_args); ps_id = find_glsl_pshader(context, &priv->shader_buffer, pshader, &ps_compile_args, &np2fixup_info); ps_list = &pshader->linked_programs; } - else if (fragment_mode == WINED3D_SHADER_MODE_FFP && priv->fragment_pipe == &glsl_fragment_pipe) + else if (priv->fragment_pipe == &glsl_fragment_pipe) { struct glsl_ffp_fragment_shader *ffp_shader; struct ffp_frag_settings settings; - gen_ffp_frag_op(device, state, &settings, FALSE); + gen_ffp_frag_op(context, state, &settings, FALSE); ffp_shader = shader_glsl_find_ffp_fragment_shader(priv, gl_info, &settings); ps_id = ffp_shader->id; ps_list = &ffp_shader->linked_programs; } - else - { - ps_id = 0; - } if ((!vs_id && !gs_id && !ps_id) || (entry = get_glsl_program_entry(priv, vs_id, gs_id, ps_id))) { - priv->glsl_program = entry; + ctx_data->glsl_program = entry; return; } @@ -5598,9 +5942,18 @@ static void set_glsl_shader_program(const struct wined3d_context *context, struc add_glsl_program_entry(priv, entry); /* Set the current program */ - priv->glsl_program = entry; + ctx_data->glsl_program = entry; /* Attach GLSL vshader */ + if (vs_id) + { + TRACE("Attaching GLSL shader object %u to program %u.\n", vs_id, programId); + GL_EXTCALL(glAttachObjectARB(programId, vs_id)); + checkGLcall("glAttachObjectARB"); + + list_add_head(vs_list, &entry->vs.shader_entry); + } + if (vshader) { WORD map = vshader->reg_maps.input_registers; @@ -5615,10 +5968,6 @@ static void set_glsl_shader_program(const struct wined3d_context *context, struc */ GL_EXTCALL(glDeleteObjectARB(reorder_shader_id)); - TRACE("Attaching GLSL shader object %u to program %u.\n", vs_id, programId); - GL_EXTCALL(glAttachObjectARB(programId, vs_id)); - checkGLcall("glAttachObjectARB"); - /* Bind vertex attributes to a corresponding index number to match * the same index numbers as ARB_vertex_programs (makes loading * vertex attributes simpler). With this method, we can use the @@ -5636,8 +5985,6 @@ static void set_glsl_shader_program(const struct wined3d_context *context, struc GL_EXTCALL(glBindAttribLocationARB(programId, i, tmp_name)); } checkGLcall("glBindAttribLocationARB"); - - list_add_head(&vshader->linked_programs, &entry->vs.shader_entry); } if (gshader) @@ -5706,14 +6053,46 @@ static void set_glsl_shader_program(const struct wined3d_context *context, struc shader_glsl_load_vsamplers(gl_info, device->texUnitMap, programId); shader_glsl_load_psamplers(gl_info, device->texUnitMap, programId); - /* If the local constants do not have to be loaded with the environment constants, - * load them now to have them hardcoded in the GLSL program. This saves some CPU cycles - * later - */ - if (pshader && !pshader->load_local_constsF) - hardcode_local_constants(pshader, gl_info, programId, "ps"); - if (vshader && !vshader->load_local_constsF) - hardcode_local_constants(vshader, gl_info, programId, "vs"); + entry->constant_update_mask = 0; + if (vshader) + { + entry->constant_update_mask |= WINED3D_SHADER_CONST_VS_F; + if (vshader->reg_maps.integer_constants) + entry->constant_update_mask |= WINED3D_SHADER_CONST_VS_I; + if (vshader->reg_maps.boolean_constants) + entry->constant_update_mask |= WINED3D_SHADER_CONST_VS_B; + entry->constant_update_mask |= WINED3D_SHADER_CONST_VS_POS_FIXUP; + } + + if (ps_id) + { + if (pshader) + { + entry->constant_update_mask |= WINED3D_SHADER_CONST_PS_F; + if (pshader->reg_maps.integer_constants) + entry->constant_update_mask |= WINED3D_SHADER_CONST_PS_I; + if (pshader->reg_maps.boolean_constants) + entry->constant_update_mask |= WINED3D_SHADER_CONST_PS_B; + if (entry->ps.ycorrection_location != -1) + entry->constant_update_mask |= WINED3D_SHADER_CONST_PS_Y_CORR; + } + else + { + entry->constant_update_mask |= WINED3D_SHADER_CONST_FFP_PS; + } + + for (i = 0; i < MAX_TEXTURES; ++i) + { + if (entry->ps.bumpenv_mat_location[i] != -1) + { + entry->constant_update_mask |= WINED3D_SHADER_CONST_PS_BUMP_ENV; + break; + } + } + + if (entry->ps.np2_fixup_location != -1) + entry->constant_update_mask |= WINED3D_SHADER_CONST_PS_NP2_FIXUP; + } } /* Context activation is done by the caller. */ @@ -5827,18 +6206,42 @@ static GLhandleARB create_glsl_blt_shader(const struct wined3d_gl_info *gl_info, } /* Context activation is done by the caller. */ -static void shader_glsl_select(const struct wined3d_context *context, enum wined3d_shader_mode vertex_mode, - enum wined3d_shader_mode fragment_mode) +static void shader_glsl_select(void *shader_priv, struct wined3d_context *context, + const struct wined3d_state *state) { + struct glsl_context_data *ctx_data = context->shader_backend_data; const struct wined3d_gl_info *gl_info = context->gl_info; - struct wined3d_device *device = context->swapchain->device; - struct shader_glsl_priv *priv = device->shader_priv; - GLhandleARB program_id = 0; + struct shader_glsl_priv *priv = shader_priv; + GLhandleARB program_id = 0, prev_id = 0; GLenum old_vertex_color_clamp, current_vertex_color_clamp; - old_vertex_color_clamp = priv->glsl_program ? priv->glsl_program->vs.vertex_color_clamp : GL_FIXED_ONLY_ARB; - set_glsl_shader_program(context, device, vertex_mode, fragment_mode); - current_vertex_color_clamp = priv->glsl_program ? priv->glsl_program->vs.vertex_color_clamp : GL_FIXED_ONLY_ARB; + priv->vertex_pipe->vp_enable(gl_info, !use_vs(state)); + priv->fragment_pipe->enable_extension(gl_info, !use_ps(state)); + + if (ctx_data->glsl_program) + { + prev_id = ctx_data->glsl_program->programId; + old_vertex_color_clamp = ctx_data->glsl_program->vs.vertex_color_clamp; + } + else + { + prev_id = 0; + old_vertex_color_clamp = GL_FIXED_ONLY_ARB; + } + + set_glsl_shader_program(context, state, priv, ctx_data); + + if (ctx_data->glsl_program) + { + program_id = ctx_data->glsl_program->programId; + current_vertex_color_clamp = ctx_data->glsl_program->vs.vertex_color_clamp; + } + else + { + program_id = 0; + current_vertex_color_clamp = GL_FIXED_ONLY_ARB; + } + if (old_vertex_color_clamp != current_vertex_color_clamp) { if (gl_info->supported[ARB_COLOR_BUFFER_FLOAT]) @@ -5852,17 +6255,46 @@ static void shader_glsl_select(const struct wined3d_context *context, enum wined } } - program_id = priv->glsl_program ? priv->glsl_program->programId : 0; - if (program_id) TRACE("Using GLSL program %u\n", program_id); - GL_EXTCALL(glUseProgramObjectARB(program_id)); + TRACE("Using GLSL program %u.\n", program_id); + + if (prev_id != program_id) + { + GL_EXTCALL(glUseProgramObjectARB(program_id)); + checkGLcall("glUseProgramObjectARB"); + + if (program_id) + context->constant_update_mask |= ctx_data->glsl_program->constant_update_mask; + } +} + +/* "context" is not necessarily the currently active context. */ +static void shader_glsl_invalidate_current_program(struct wined3d_context *context) +{ + struct glsl_context_data *ctx_data = context->shader_backend_data; + + ctx_data->glsl_program = NULL; + context->shader_update_mask = (1 << WINED3D_SHADER_TYPE_PIXEL) + | (1 << WINED3D_SHADER_TYPE_VERTEX) + | (1 << WINED3D_SHADER_TYPE_GEOMETRY); +} + +/* Context activation is done by the caller. */ +static void shader_glsl_disable(void *shader_priv, struct wined3d_context *context) +{ + const struct wined3d_gl_info *gl_info = context->gl_info; + struct shader_glsl_priv *priv = shader_priv; + + shader_glsl_invalidate_current_program(context); + GL_EXTCALL(glUseProgramObjectARB(0)); checkGLcall("glUseProgramObjectARB"); - /* In case that NP2 texcoord fixup data is found for the selected program, trigger a reload of the - * constants. This has to be done because it can't be guaranteed that sampler() (from state.c) is - * called between selecting the shader and using it, which results in wrong fixup for some frames. */ - if (priv->glsl_program && priv->glsl_program->ps.np2_fixup_info) + priv->vertex_pipe->vp_enable(gl_info, FALSE); + priv->fragment_pipe->enable_extension(gl_info, FALSE); + + if (gl_info->supported[ARB_COLOR_BUFFER_FLOAT]) { - shader_glsl_load_np2fixup_constants(priv, gl_info, &device->stateBlock->state); + GL_EXTCALL(glClampColorARB(GL_CLAMP_VERTEX_COLOR_ARB, GL_FIXED_ONLY_ARB)); + checkGLcall("glClampColorARB"); } } @@ -5898,16 +6330,33 @@ static void shader_glsl_select_depth_blt(void *shader_priv, const struct wined3d /* Context activation is done by the caller. */ static void shader_glsl_deselect_depth_blt(void *shader_priv, const struct wined3d_gl_info *gl_info) { - struct shader_glsl_priv *priv = shader_priv; + const struct glsl_context_data *ctx_data = context_get_current()->shader_backend_data; GLhandleARB program_id; - program_id = priv->glsl_program ? priv->glsl_program->programId : 0; + program_id = ctx_data->glsl_program ? ctx_data->glsl_program->programId : 0; if (program_id) TRACE("Using GLSL program %u\n", program_id); GL_EXTCALL(glUseProgramObjectARB(program_id)); checkGLcall("glUseProgramObjectARB"); } +static void shader_glsl_invalidate_contexts_program(struct wined3d_device *device, + const struct glsl_shader_prog_link *program) +{ + const struct glsl_context_data *ctx_data; + struct wined3d_context *context; + unsigned int i; + + for (i = 0; i < device->context_count; ++i) + { + context = device->contexts[i]; + ctx_data = context->shader_backend_data; + + if (ctx_data->glsl_program == program) + shader_glsl_invalidate_current_program(context); + } +} + static void shader_glsl_destroy(struct wined3d_shader *shader) { struct glsl_shader_private *shader_data = shader->backend_data; @@ -5940,22 +6389,21 @@ static void shader_glsl_destroy(struct wined3d_shader *shader) { struct glsl_ps_compiled_shader *gl_shaders = shader_data->gl_shaders.ps; - LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, linked_programs, - struct glsl_shader_prog_link, ps.shader_entry) - { - delete_glsl_program_entry(priv, gl_info, entry); - } - for (i = 0; i < shader_data->num_gl_shaders; ++i) { TRACE("Deleting pixel shader %u.\n", gl_shaders[i].prgId); - if (priv->glsl_program && priv->glsl_program->ps.id == gl_shaders[i].prgId) - shader_glsl_select(context, WINED3D_SHADER_MODE_NONE, WINED3D_SHADER_MODE_NONE); GL_EXTCALL(glDeleteObjectARB(gl_shaders[i].prgId)); checkGLcall("glDeleteObjectARB"); } HeapFree(GetProcessHeap(), 0, shader_data->gl_shaders.ps); + LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, linked_programs, + struct glsl_shader_prog_link, ps.shader_entry) + { + shader_glsl_invalidate_contexts_program(device, entry); + delete_glsl_program_entry(priv, gl_info, entry); + } + break; } @@ -5963,22 +6411,21 @@ static void shader_glsl_destroy(struct wined3d_shader *shader) { struct glsl_vs_compiled_shader *gl_shaders = shader_data->gl_shaders.vs; - LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, linked_programs, - struct glsl_shader_prog_link, vs.shader_entry) - { - delete_glsl_program_entry(priv, gl_info, entry); - } - for (i = 0; i < shader_data->num_gl_shaders; ++i) { TRACE("Deleting vertex shader %u.\n", gl_shaders[i].prgId); - if (priv->glsl_program && priv->glsl_program->vs.id == gl_shaders[i].prgId) - shader_glsl_select(context, WINED3D_SHADER_MODE_NONE, WINED3D_SHADER_MODE_NONE); GL_EXTCALL(glDeleteObjectARB(gl_shaders[i].prgId)); checkGLcall("glDeleteObjectARB"); } HeapFree(GetProcessHeap(), 0, shader_data->gl_shaders.vs); + LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, linked_programs, + struct glsl_shader_prog_link, vs.shader_entry) + { + shader_glsl_invalidate_contexts_program(device, entry); + delete_glsl_program_entry(priv, gl_info, entry); + } + break; } @@ -5986,22 +6433,21 @@ static void shader_glsl_destroy(struct wined3d_shader *shader) { struct glsl_gs_compiled_shader *gl_shaders = shader_data->gl_shaders.gs; - LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, linked_programs, - struct glsl_shader_prog_link, gs.shader_entry) - { - delete_glsl_program_entry(priv, gl_info, entry); - } - for (i = 0; i < shader_data->num_gl_shaders; ++i) { TRACE("Deleting geometry shader %u.\n", gl_shaders[i].id); - if (priv->glsl_program && priv->glsl_program->gs.id == gl_shaders[i].id) - shader_glsl_select(context, WINED3D_SHADER_MODE_NONE, WINED3D_SHADER_MODE_NONE); GL_EXTCALL(glDeleteObjectARB(gl_shaders[i].id)); checkGLcall("glDeleteObjectARB"); } HeapFree(GetProcessHeap(), 0, shader_data->gl_shaders.gs); + LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, linked_programs, + struct glsl_shader_prog_link, gs.shader_entry) + { + shader_glsl_invalidate_contexts_program(device, entry); + delete_glsl_program_entry(priv, gl_info, entry); + } + break; } @@ -6037,7 +6483,9 @@ static int glsl_program_key_compare(const void *key, const struct wine_rb_entry static BOOL constant_heap_init(struct constant_heap *heap, unsigned int constant_count) { - SIZE_T size = (constant_count + 1) * sizeof(*heap->entries) + constant_count * sizeof(*heap->positions); + SIZE_T size = (constant_count + 1) * sizeof(*heap->entries) + + constant_count * sizeof(*heap->contained) + + constant_count * sizeof(*heap->positions); void *mem = HeapAlloc(GetProcessHeap(), 0, size); if (!mem) @@ -6048,7 +6496,9 @@ static BOOL constant_heap_init(struct constant_heap *heap, unsigned int constant heap->entries = mem; heap->entries[1].version = 0; - heap->positions = (unsigned int *)(heap->entries + constant_count + 1); + heap->contained = (BOOL *)(heap->entries + constant_count + 1); + memset(heap->contained, 0, constant_count * sizeof(*heap->contained)); + heap->positions = (unsigned int *)(heap->contained + constant_count); heap->size = 1; return TRUE; @@ -6067,18 +6517,27 @@ static const struct wine_rb_functions wined3d_glsl_program_rb_functions = glsl_program_key_compare, }; -static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct fragment_pipeline *fragment_pipe) +static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct wined3d_vertex_pipe_ops *vertex_pipe, + const struct fragment_pipeline *fragment_pipe) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; struct shader_glsl_priv *priv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct shader_glsl_priv)); SIZE_T stack_size = wined3d_log2i(max(gl_info->limits.glsl_vs_float_constants, gl_info->limits.glsl_ps_float_constants)) + 1; struct fragment_caps fragment_caps; - void *fragment_priv; + void *vertex_priv, *fragment_priv; + + if (!(vertex_priv = vertex_pipe->vp_alloc(&glsl_shader_backend, priv))) + { + ERR("Failed to initialize vertex pipe.\n"); + HeapFree(GetProcessHeap(), 0, priv); + return E_FAIL; + } if (!(fragment_priv = fragment_pipe->alloc_private(&glsl_shader_backend, priv))) { ERR("Failed to initialize fragment pipe.\n"); + vertex_pipe->vp_free(device); HeapFree(GetProcessHeap(), 0, priv); return E_FAIL; } @@ -6115,12 +6574,15 @@ static HRESULT shader_glsl_alloc(struct wined3d_device *device, const struct fra } priv->next_constant_version = 1; + priv->vertex_pipe = vertex_pipe; + priv->fragment_pipe = fragment_pipe; fragment_pipe->get_caps(gl_info, &fragment_caps); priv->ffp_proj_control = fragment_caps.wined3d_caps & WINED3D_FRAGMENT_CAP_PROJ_CONTROL; - device->fragment_priv = fragment_priv; - priv->fragment_pipe = fragment_pipe; + device->vertex_priv = vertex_priv; + device->fragment_priv = fragment_priv; device->shader_priv = priv; + return WINED3D_OK; fail: @@ -6129,6 +6591,7 @@ fail: HeapFree(GetProcessHeap(), 0, priv->stack); shader_buffer_free(&priv->shader_buffer); fragment_pipe->free_private(device); + vertex_pipe->vp_free(device); HeapFree(GetProcessHeap(), 0, priv); return E_OUTOFMEMORY; } @@ -6158,12 +6621,22 @@ static void shader_glsl_free(struct wined3d_device *device) HeapFree(GetProcessHeap(), 0, priv->stack); shader_buffer_free(&priv->shader_buffer); priv->fragment_pipe->free_private(device); + priv->vertex_pipe->vp_free(device); HeapFree(GetProcessHeap(), 0, device->shader_priv); device->shader_priv = NULL; } -static void shader_glsl_context_destroyed(void *shader_priv, const struct wined3d_context *context) {} +static BOOL shader_glsl_allocate_context_data(struct wined3d_context *context) +{ + return !!(context->shader_backend_data = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, sizeof(struct glsl_context_data))); +} + +static void shader_glsl_free_context_data(struct wined3d_context *context) +{ + HeapFree(GetProcessHeap(), 0, context->shader_backend_data); +} static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct shader_caps *caps) { @@ -6371,21 +6844,281 @@ const struct wined3d_shader_backend_ops glsl_shader_backend = { shader_glsl_handle_instruction, shader_glsl_select, + shader_glsl_disable, shader_glsl_select_depth_blt, shader_glsl_deselect_depth_blt, shader_glsl_update_float_vertex_constants, shader_glsl_update_float_pixel_constants, shader_glsl_load_constants, - shader_glsl_load_np2fixup_constants, shader_glsl_destroy, shader_glsl_alloc, shader_glsl_free, - shader_glsl_context_destroyed, + shader_glsl_allocate_context_data, + shader_glsl_free_context_data, shader_glsl_get_caps, shader_glsl_color_fixup_supported, shader_glsl_has_ffp_proj_control, }; +static void glsl_vertex_pipe_vp_enable(const struct wined3d_gl_info *gl_info, BOOL enable) +{ + if (enable) + gl_info->gl_ops.gl.p_glEnable(GL_VERTEX_PROGRAM_POINT_SIZE_ARB); + else + gl_info->gl_ops.gl.p_glDisable(GL_VERTEX_PROGRAM_POINT_SIZE_ARB); + checkGLcall("GL_VERTEX_PROGRAM_POINT_SIZE_ARB"); +} + +static void glsl_vertex_pipe_vp_get_caps(const struct wined3d_gl_info *gl_info, struct wined3d_vertex_caps *caps) +{ + caps->xyzrhw = TRUE; + caps->max_active_lights = gl_info->limits.lights; + caps->max_vertex_blend_matrices = 0; + caps->max_vertex_blend_matrix_index = 0; + caps->vertex_processing_caps = WINED3DVTXPCAPS_TEXGEN + | WINED3DVTXPCAPS_MATERIALSOURCE7 + | WINED3DVTXPCAPS_VERTEXFOG + | WINED3DVTXPCAPS_DIRECTIONALLIGHTS + | WINED3DVTXPCAPS_POSITIONALLIGHTS + | WINED3DVTXPCAPS_LOCALVIEWER + | WINED3DVTXPCAPS_TEXGEN_SPHEREMAP; + caps->fvf_caps = WINED3DFVFCAPS_PSIZE | 8; /* 8 texture coordinates. */ + caps->max_user_clip_planes = gl_info->limits.clipplanes; + caps->raster_caps = WINED3DPRASTERCAPS_FOGRANGE; +} + +static void *glsl_vertex_pipe_vp_alloc(const struct wined3d_shader_backend_ops *shader_backend, void *shader_priv) +{ + struct shader_glsl_priv *priv; + + if (shader_backend == &glsl_shader_backend) + { + priv = shader_priv; + + if (wine_rb_init(&priv->ffp_vertex_shaders, &wined3d_ffp_vertex_program_rb_functions) == -1) + { + ERR("Failed to initialize rbtree.\n"); + return NULL; + } + + return priv; + } + + FIXME("GLSL vertex pipe without GLSL shader backend not implemented.\n"); + + return NULL; +} + +static void shader_glsl_free_ffp_vertex_shader(struct wine_rb_entry *entry, void *context) +{ + struct glsl_ffp_vertex_shader *shader = WINE_RB_ENTRY_VALUE(entry, + struct glsl_ffp_vertex_shader, desc.entry); + struct glsl_shader_prog_link *program, *program2; + struct glsl_ffp_destroy_ctx *ctx = context; + + LIST_FOR_EACH_ENTRY_SAFE(program, program2, &shader->linked_programs, + struct glsl_shader_prog_link, vs.shader_entry) + { + delete_glsl_program_entry(ctx->priv, ctx->gl_info, program); + } + ctx->gl_info->gl_ops.ext.p_glDeleteObjectARB(shader->id); + HeapFree(GetProcessHeap(), 0, shader); +} + +/* Context activation is done by the caller. */ +static void glsl_vertex_pipe_vp_free(struct wined3d_device *device) +{ + struct shader_glsl_priv *priv = device->vertex_priv; + struct glsl_ffp_destroy_ctx ctx; + + ctx.priv = priv; + ctx.gl_info = &device->adapter->gl_info; + wine_rb_destroy(&priv->ffp_vertex_shaders, shader_glsl_free_ffp_vertex_shader, &ctx); +} + +static void glsl_vertex_pipe_shader(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) +{ + context->shader_update_mask |= 1 << WINED3D_SHADER_TYPE_VERTEX; +} + +static void glsl_vertex_pipe_projection(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) +{ + /* Table fog behavior depends on the projection matrix. */ + if (state->render_states[WINED3D_RS_FOGENABLE] + && state->render_states[WINED3D_RS_FOGTABLEMODE] != WINED3D_FOG_NONE) + context->shader_update_mask |= 1 << WINED3D_SHADER_TYPE_VERTEX; + transform_projection(context, state, state_id); +} + +static const struct StateEntryTemplate glsl_vertex_pipe_vp_states[] = +{ + {STATE_VDECL, {STATE_VDECL, vertexdeclaration }, WINED3D_GL_EXT_NONE }, + {STATE_VSHADER, {STATE_VDECL, NULL }, WINED3D_GL_EXT_NONE }, + {STATE_MATERIAL, {STATE_RENDER(WINED3D_RS_SPECULARENABLE), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_SPECULARENABLE), {STATE_RENDER(WINED3D_RS_SPECULARENABLE), state_specularenable }, WINED3D_GL_EXT_NONE }, + /* Clip planes */ + {STATE_CLIPPLANE(0), {STATE_CLIPPLANE(0), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(1), {STATE_CLIPPLANE(1), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(2), {STATE_CLIPPLANE(2), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(3), {STATE_CLIPPLANE(3), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(4), {STATE_CLIPPLANE(4), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(5), {STATE_CLIPPLANE(5), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(6), {STATE_CLIPPLANE(6), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(7), {STATE_CLIPPLANE(7), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(8), {STATE_CLIPPLANE(8), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(9), {STATE_CLIPPLANE(9), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(10), {STATE_CLIPPLANE(10), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(11), {STATE_CLIPPLANE(11), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(12), {STATE_CLIPPLANE(12), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(13), {STATE_CLIPPLANE(13), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(14), {STATE_CLIPPLANE(14), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(15), {STATE_CLIPPLANE(15), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(16), {STATE_CLIPPLANE(16), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(17), {STATE_CLIPPLANE(17), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(18), {STATE_CLIPPLANE(18), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(19), {STATE_CLIPPLANE(19), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(20), {STATE_CLIPPLANE(20), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(21), {STATE_CLIPPLANE(21), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(22), {STATE_CLIPPLANE(22), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(23), {STATE_CLIPPLANE(23), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(24), {STATE_CLIPPLANE(24), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(25), {STATE_CLIPPLANE(25), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(26), {STATE_CLIPPLANE(26), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(27), {STATE_CLIPPLANE(27), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(28), {STATE_CLIPPLANE(28), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(29), {STATE_CLIPPLANE(29), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(30), {STATE_CLIPPLANE(30), clipplane }, WINED3D_GL_EXT_NONE }, + {STATE_CLIPPLANE(31), {STATE_CLIPPLANE(31), clipplane }, WINED3D_GL_EXT_NONE }, + /* Lights */ + {STATE_LIGHT_TYPE, {STATE_RENDER(WINED3D_RS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_ACTIVELIGHT(0), {STATE_ACTIVELIGHT(0), light }, WINED3D_GL_EXT_NONE }, + {STATE_ACTIVELIGHT(1), {STATE_ACTIVELIGHT(1), light }, WINED3D_GL_EXT_NONE }, + {STATE_ACTIVELIGHT(2), {STATE_ACTIVELIGHT(2), light }, WINED3D_GL_EXT_NONE }, + {STATE_ACTIVELIGHT(3), {STATE_ACTIVELIGHT(3), light }, WINED3D_GL_EXT_NONE }, + {STATE_ACTIVELIGHT(4), {STATE_ACTIVELIGHT(4), light }, WINED3D_GL_EXT_NONE }, + {STATE_ACTIVELIGHT(5), {STATE_ACTIVELIGHT(5), light }, WINED3D_GL_EXT_NONE }, + {STATE_ACTIVELIGHT(6), {STATE_ACTIVELIGHT(6), light }, WINED3D_GL_EXT_NONE }, + {STATE_ACTIVELIGHT(7), {STATE_ACTIVELIGHT(7), light }, WINED3D_GL_EXT_NONE }, + /* Viewport */ + {STATE_VIEWPORT, {STATE_VIEWPORT, viewport_vertexpart }, WINED3D_GL_EXT_NONE }, + /* Transform states */ + {STATE_TRANSFORM(WINED3D_TS_VIEW), {STATE_TRANSFORM(WINED3D_TS_VIEW), transform_view }, WINED3D_GL_EXT_NONE }, + {STATE_TRANSFORM(WINED3D_TS_PROJECTION), {STATE_TRANSFORM(WINED3D_TS_PROJECTION), glsl_vertex_pipe_projection}, WINED3D_GL_EXT_NONE }, + {STATE_TRANSFORM(WINED3D_TS_TEXTURE0), {STATE_TEXTURESTAGE(0, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_TRANSFORM(WINED3D_TS_TEXTURE1), {STATE_TEXTURESTAGE(1, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_TRANSFORM(WINED3D_TS_TEXTURE2), {STATE_TEXTURESTAGE(2, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_TRANSFORM(WINED3D_TS_TEXTURE3), {STATE_TEXTURESTAGE(3, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_TRANSFORM(WINED3D_TS_TEXTURE4), {STATE_TEXTURESTAGE(4, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_TRANSFORM(WINED3D_TS_TEXTURE5), {STATE_TEXTURESTAGE(5, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_TRANSFORM(WINED3D_TS_TEXTURE6), {STATE_TEXTURESTAGE(6, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_TRANSFORM(WINED3D_TS_TEXTURE7), {STATE_TEXTURESTAGE(7, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(0)), {STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(0)), transform_world }, WINED3D_GL_EXT_NONE }, + {STATE_TEXTURESTAGE(0, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), {STATE_TEXTURESTAGE(0, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), transform_texture }, WINED3D_GL_EXT_NONE }, + {STATE_TEXTURESTAGE(1, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), {STATE_TEXTURESTAGE(1, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), transform_texture }, WINED3D_GL_EXT_NONE }, + {STATE_TEXTURESTAGE(2, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), {STATE_TEXTURESTAGE(2, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), transform_texture }, WINED3D_GL_EXT_NONE }, + {STATE_TEXTURESTAGE(3, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), {STATE_TEXTURESTAGE(3, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), transform_texture }, WINED3D_GL_EXT_NONE }, + {STATE_TEXTURESTAGE(4, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), {STATE_TEXTURESTAGE(4, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), transform_texture }, WINED3D_GL_EXT_NONE }, + {STATE_TEXTURESTAGE(5, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), {STATE_TEXTURESTAGE(5, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), transform_texture }, WINED3D_GL_EXT_NONE }, + {STATE_TEXTURESTAGE(6, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), {STATE_TEXTURESTAGE(6, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), transform_texture }, WINED3D_GL_EXT_NONE }, + {STATE_TEXTURESTAGE(7, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), {STATE_TEXTURESTAGE(7, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS), transform_texture }, WINED3D_GL_EXT_NONE }, + {STATE_TEXTURESTAGE(0, WINED3D_TSS_TEXCOORD_INDEX), {STATE_VDECL, NULL }, WINED3D_GL_EXT_NONE }, + {STATE_TEXTURESTAGE(1, WINED3D_TSS_TEXCOORD_INDEX), {STATE_VDECL, NULL }, WINED3D_GL_EXT_NONE }, + {STATE_TEXTURESTAGE(2, WINED3D_TSS_TEXCOORD_INDEX), {STATE_VDECL, NULL }, WINED3D_GL_EXT_NONE }, + {STATE_TEXTURESTAGE(3, WINED3D_TSS_TEXCOORD_INDEX), {STATE_VDECL, NULL }, WINED3D_GL_EXT_NONE }, + {STATE_TEXTURESTAGE(4, WINED3D_TSS_TEXCOORD_INDEX), {STATE_VDECL, NULL }, WINED3D_GL_EXT_NONE }, + {STATE_TEXTURESTAGE(5, WINED3D_TSS_TEXCOORD_INDEX), {STATE_VDECL, NULL }, WINED3D_GL_EXT_NONE }, + {STATE_TEXTURESTAGE(6, WINED3D_TSS_TEXCOORD_INDEX), {STATE_VDECL, NULL }, WINED3D_GL_EXT_NONE }, + {STATE_TEXTURESTAGE(7, WINED3D_TSS_TEXCOORD_INDEX), {STATE_VDECL, NULL }, WINED3D_GL_EXT_NONE }, + /* Fog */ + {STATE_RENDER(WINED3D_RS_FOGENABLE), {STATE_RENDER(WINED3D_RS_FOGENABLE), glsl_vertex_pipe_shader}, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_FOGTABLEMODE), {STATE_RENDER(WINED3D_RS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_FOGVERTEXMODE), {STATE_RENDER(WINED3D_RS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_RANGEFOGENABLE), {STATE_RENDER(WINED3D_RS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_CLIPPING), {STATE_RENDER(WINED3D_RS_CLIPPING), state_clipping }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_CLIPPLANEENABLE), {STATE_RENDER(WINED3D_RS_CLIPPING), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_LIGHTING), {STATE_VDECL, NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_AMBIENT), {STATE_RENDER(WINED3D_RS_AMBIENT), state_ambient }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_COLORVERTEX), {STATE_RENDER(WINED3D_RS_COLORVERTEX), glsl_vertex_pipe_shader}, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_LOCALVIEWER), {STATE_VDECL, NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_NORMALIZENORMALS), {STATE_VDECL, NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_DIFFUSEMATERIALSOURCE), {STATE_VDECL, NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_SPECULARMATERIALSOURCE), {STATE_VDECL, NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_AMBIENTMATERIALSOURCE), {STATE_VDECL, NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_EMISSIVEMATERIALSOURCE), {STATE_VDECL, NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_VERTEXBLEND), {STATE_VDECL, NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_POINTSIZE), {STATE_RENDER(WINED3D_RS_POINTSCALEENABLE), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_POINTSIZE_MIN), {STATE_RENDER(WINED3D_RS_POINTSIZE_MIN), state_psizemin_arb }, ARB_POINT_PARAMETERS }, + {STATE_RENDER(WINED3D_RS_POINTSIZE_MIN), {STATE_RENDER(WINED3D_RS_POINTSIZE_MIN), state_psizemin_ext }, EXT_POINT_PARAMETERS }, + {STATE_RENDER(WINED3D_RS_POINTSIZE_MIN), {STATE_RENDER(WINED3D_RS_POINTSIZE_MIN), state_psizemin_w }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_POINTSPRITEENABLE), {STATE_RENDER(WINED3D_RS_POINTSPRITEENABLE), state_pointsprite }, ARB_POINT_SPRITE }, + {STATE_RENDER(WINED3D_RS_POINTSPRITEENABLE), {STATE_RENDER(WINED3D_RS_POINTSPRITEENABLE), state_pointsprite_w }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_POINTSCALEENABLE), {STATE_RENDER(WINED3D_RS_POINTSCALEENABLE), state_pscale }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_POINTSCALE_A), {STATE_RENDER(WINED3D_RS_POINTSCALEENABLE), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_POINTSCALE_B), {STATE_RENDER(WINED3D_RS_POINTSCALEENABLE), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_POINTSCALE_C), {STATE_RENDER(WINED3D_RS_POINTSCALEENABLE), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_POINTSIZE_MAX), {STATE_RENDER(WINED3D_RS_POINTSIZE_MIN), NULL }, ARB_POINT_PARAMETERS }, + {STATE_RENDER(WINED3D_RS_POINTSIZE_MAX), {STATE_RENDER(WINED3D_RS_POINTSIZE_MIN), NULL }, EXT_POINT_PARAMETERS }, + {STATE_RENDER(WINED3D_RS_POINTSIZE_MAX), {STATE_RENDER(WINED3D_RS_POINTSIZE_MIN), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_TWEENFACTOR), {STATE_VDECL, NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_INDEXEDVERTEXBLENDENABLE), {STATE_VDECL, NULL }, WINED3D_GL_EXT_NONE }, + /* Samplers for NP2 texture matrix adjustions. They are not needed if + * GL_ARB_texture_non_power_of_two is supported, so register a NULL state + * handler in that case to get the vertex part of sampler() skipped (VTF + * is handled in the misc states). Otherwise, register + * sampler_texmatrix(), which takes care of updating the texture matrix. */ + {STATE_SAMPLER(0), {0, NULL }, ARB_TEXTURE_NON_POWER_OF_TWO }, + {STATE_SAMPLER(0), {0, NULL }, WINED3D_GL_NORMALIZED_TEXRECT}, + {STATE_SAMPLER(0), {STATE_SAMPLER(0), sampler_texmatrix }, WINED3D_GL_EXT_NONE }, + {STATE_SAMPLER(1), {0, NULL }, ARB_TEXTURE_NON_POWER_OF_TWO }, + {STATE_SAMPLER(1), {0, NULL }, WINED3D_GL_NORMALIZED_TEXRECT}, + {STATE_SAMPLER(1), {STATE_SAMPLER(1), sampler_texmatrix }, WINED3D_GL_EXT_NONE }, + {STATE_SAMPLER(2), {0, NULL }, ARB_TEXTURE_NON_POWER_OF_TWO }, + {STATE_SAMPLER(2), {0, NULL }, WINED3D_GL_NORMALIZED_TEXRECT}, + {STATE_SAMPLER(2), {STATE_SAMPLER(2), sampler_texmatrix }, WINED3D_GL_EXT_NONE }, + {STATE_SAMPLER(3), {0, NULL }, ARB_TEXTURE_NON_POWER_OF_TWO }, + {STATE_SAMPLER(3), {0, NULL }, WINED3D_GL_NORMALIZED_TEXRECT}, + {STATE_SAMPLER(3), {STATE_SAMPLER(3), sampler_texmatrix }, WINED3D_GL_EXT_NONE }, + {STATE_SAMPLER(4), {0, NULL }, ARB_TEXTURE_NON_POWER_OF_TWO }, + {STATE_SAMPLER(4), {0, NULL }, WINED3D_GL_NORMALIZED_TEXRECT}, + {STATE_SAMPLER(4), {STATE_SAMPLER(4), sampler_texmatrix }, WINED3D_GL_EXT_NONE }, + {STATE_SAMPLER(5), {0, NULL }, ARB_TEXTURE_NON_POWER_OF_TWO }, + {STATE_SAMPLER(5), {0, NULL }, WINED3D_GL_NORMALIZED_TEXRECT}, + {STATE_SAMPLER(5), {STATE_SAMPLER(5), sampler_texmatrix }, WINED3D_GL_EXT_NONE }, + {STATE_SAMPLER(6), {0, NULL }, ARB_TEXTURE_NON_POWER_OF_TWO }, + {STATE_SAMPLER(6), {0, NULL }, WINED3D_GL_NORMALIZED_TEXRECT}, + {STATE_SAMPLER(6), {STATE_SAMPLER(6), sampler_texmatrix }, WINED3D_GL_EXT_NONE }, + {STATE_SAMPLER(7), {0, NULL }, ARB_TEXTURE_NON_POWER_OF_TWO }, + {STATE_SAMPLER(7), {0, NULL }, WINED3D_GL_NORMALIZED_TEXRECT}, + {STATE_SAMPLER(7), {STATE_SAMPLER(7), sampler_texmatrix }, WINED3D_GL_EXT_NONE }, + {STATE_POINT_SIZE_ENABLE, {STATE_RENDER(WINED3D_RS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE }, + {0 /* Terminate */, {0, NULL }, WINED3D_GL_EXT_NONE }, +}; + +/* TODO: + * - This currently depends on GL fixed function functions to set things + * like light parameters. Ideally we'd use regular uniforms for that. + * - In part because of the previous point, much of this is modelled after + * GL fixed function, and has much of the same limitations. For example, + * D3D spot lights are slightly different from GL spot lights. + * - We can now implement drawing transformed vertices using the GLSL pipe, + * instead of using the immediate mode fallback. + * - Similarly, we don't need the fallback for certain combinations of + * material sources anymore. + * - Implement vertex blending and vertex tweening. + * - Handle WINED3D_TSS_TEXCOORD_INDEX in the shader, instead of duplicating + * attribute arrays in load_tex_coords(). + * - Per-vertex point sizes. */ +const struct wined3d_vertex_pipe_ops glsl_vertex_pipe = +{ + glsl_vertex_pipe_vp_enable, + glsl_vertex_pipe_vp_get_caps, + glsl_vertex_pipe_vp_alloc, + glsl_vertex_pipe_vp_free, + glsl_vertex_pipe_vp_states, +}; + static void glsl_fragment_pipe_enable(const struct wined3d_gl_info *gl_info, BOOL enable) { /* Nothing to do. */ @@ -6447,12 +7180,6 @@ static void *glsl_fragment_pipe_alloc(const struct wined3d_shader_backend_ops *s return NULL; } -struct glsl_ffp_destroy_ctx -{ - struct shader_glsl_priv *priv; - const struct wined3d_gl_info *gl_info; -}; - static void shader_glsl_free_ffp_fragment_shader(struct wine_rb_entry *entry, void *context) { struct glsl_ffp_fragment_shader *shader = WINE_RB_ENTRY_VALUE(entry, @@ -6485,8 +7212,7 @@ static void glsl_fragment_pipe_shader(struct wined3d_context *context, { context->last_was_pshader = use_ps(state); - context->select_shader = 1; - context->load_constants = 1; + context->shader_update_mask |= 1 << WINED3D_SHADER_TYPE_PIXEL; } static void glsl_fragment_pipe_fog(struct wined3d_context *context, @@ -6494,9 +7220,10 @@ static void glsl_fragment_pipe_fog(struct wined3d_context *context, { BOOL use_vshader = use_vs(state); enum fogsource new_source; + DWORD fogstart = state->render_states[WINED3D_RS_FOGSTART]; + DWORD fogend = state->render_states[WINED3D_RS_FOGEND]; - context->select_shader = 1; - context->load_constants = 1; + context->shader_update_mask |= 1 << WINED3D_SHADER_TYPE_PIXEL; if (!state->render_states[WINED3D_RS_FOGENABLE]) return; @@ -6515,7 +7242,7 @@ static void glsl_fragment_pipe_fog(struct wined3d_context *context, new_source = FOGSOURCE_FFP; } - if (new_source != context->fog_source) + if (new_source != context->fog_source || fogstart == fogend) { context->fog_source = new_source; state_fogstartend(context, state, STATE_RENDER(WINED3D_RS_FOGSTART)); @@ -6525,14 +7252,13 @@ static void glsl_fragment_pipe_fog(struct wined3d_context *context, static void glsl_fragment_pipe_tex_transform(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { - context->select_shader = 1; - context->load_constants = 1; + context->shader_update_mask |= 1 << WINED3D_SHADER_TYPE_PIXEL; } static void glsl_fragment_pipe_invalidate_constants(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { - context->load_constants = 1; + context->constant_update_mask |= WINED3D_SHADER_CONST_FFP_PS; } static const struct StateEntryTemplate glsl_fragment_pipe_state_template[] = @@ -6547,12 +7273,6 @@ static const struct StateEntryTemplate glsl_fragment_pipe_state_template[] = {STATE_TEXTURESTAGE(0, WINED3D_TSS_ALPHA_ARG2), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(0, WINED3D_TSS_ALPHA_ARG0), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(0, WINED3D_TSS_RESULT_ARG), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT00), {STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT00), glsl_fragment_pipe_invalidate_constants}, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT01), {STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT10), {STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT11), {STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_LSCALE), {STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_LSCALE), glsl_fragment_pipe_invalidate_constants}, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_LSCALE), NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(1, WINED3D_TSS_COLOR_OP), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(1, WINED3D_TSS_COLOR_ARG1), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(1, WINED3D_TSS_COLOR_ARG2), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, @@ -6562,12 +7282,6 @@ static const struct StateEntryTemplate glsl_fragment_pipe_state_template[] = {STATE_TEXTURESTAGE(1, WINED3D_TSS_ALPHA_ARG2), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(1, WINED3D_TSS_ALPHA_ARG0), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(1, WINED3D_TSS_RESULT_ARG), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT00), {STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT00), glsl_fragment_pipe_invalidate_constants}, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT01), {STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT10), {STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT11), {STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_LSCALE), {STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_LSCALE), glsl_fragment_pipe_invalidate_constants}, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_LSCALE), NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(2, WINED3D_TSS_COLOR_OP), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(2, WINED3D_TSS_COLOR_ARG1), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(2, WINED3D_TSS_COLOR_ARG2), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, @@ -6577,12 +7291,6 @@ static const struct StateEntryTemplate glsl_fragment_pipe_state_template[] = {STATE_TEXTURESTAGE(2, WINED3D_TSS_ALPHA_ARG2), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(2, WINED3D_TSS_ALPHA_ARG0), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(2, WINED3D_TSS_RESULT_ARG), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT00), {STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT00), glsl_fragment_pipe_invalidate_constants}, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT01), {STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT10), {STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT11), {STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_LSCALE), {STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_LSCALE), glsl_fragment_pipe_invalidate_constants}, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_LSCALE), NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(3, WINED3D_TSS_COLOR_OP), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(3, WINED3D_TSS_COLOR_ARG1), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(3, WINED3D_TSS_COLOR_ARG2), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, @@ -6592,12 +7300,6 @@ static const struct StateEntryTemplate glsl_fragment_pipe_state_template[] = {STATE_TEXTURESTAGE(3, WINED3D_TSS_ALPHA_ARG2), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(3, WINED3D_TSS_ALPHA_ARG0), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(3, WINED3D_TSS_RESULT_ARG), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT00), {STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT00), glsl_fragment_pipe_invalidate_constants}, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT01), {STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT10), {STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT11), {STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_LSCALE), {STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_LSCALE), glsl_fragment_pipe_invalidate_constants}, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_LSCALE), NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(4, WINED3D_TSS_COLOR_OP), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(4, WINED3D_TSS_COLOR_ARG1), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(4, WINED3D_TSS_COLOR_ARG2), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, @@ -6607,12 +7309,6 @@ static const struct StateEntryTemplate glsl_fragment_pipe_state_template[] = {STATE_TEXTURESTAGE(4, WINED3D_TSS_ALPHA_ARG2), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(4, WINED3D_TSS_ALPHA_ARG0), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(4, WINED3D_TSS_RESULT_ARG), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT00), {STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT00), glsl_fragment_pipe_invalidate_constants}, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT01), {STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT10), {STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT11), {STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_LSCALE), {STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_LSCALE), glsl_fragment_pipe_invalidate_constants}, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_LSCALE), NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(5, WINED3D_TSS_COLOR_OP), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(5, WINED3D_TSS_COLOR_ARG1), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(5, WINED3D_TSS_COLOR_ARG2), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, @@ -6622,12 +7318,6 @@ static const struct StateEntryTemplate glsl_fragment_pipe_state_template[] = {STATE_TEXTURESTAGE(5, WINED3D_TSS_ALPHA_ARG2), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(5, WINED3D_TSS_ALPHA_ARG0), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(5, WINED3D_TSS_RESULT_ARG), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT00), {STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT00), glsl_fragment_pipe_invalidate_constants}, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT01), {STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT10), {STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT11), {STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_LSCALE), {STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_LSCALE), glsl_fragment_pipe_invalidate_constants}, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_LSCALE), NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(6, WINED3D_TSS_COLOR_OP), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(6, WINED3D_TSS_COLOR_ARG1), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(6, WINED3D_TSS_COLOR_ARG2), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, @@ -6637,12 +7327,6 @@ static const struct StateEntryTemplate glsl_fragment_pipe_state_template[] = {STATE_TEXTURESTAGE(6, WINED3D_TSS_ALPHA_ARG2), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(6, WINED3D_TSS_ALPHA_ARG0), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(6, WINED3D_TSS_RESULT_ARG), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT00), {STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT00), glsl_fragment_pipe_invalidate_constants}, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT01), {STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT10), {STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT11), {STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_LSCALE), {STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_LSCALE), glsl_fragment_pipe_invalidate_constants}, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_LSCALE), NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(7, WINED3D_TSS_COLOR_OP), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(7, WINED3D_TSS_COLOR_ARG1), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(7, WINED3D_TSS_COLOR_ARG2), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, @@ -6652,12 +7336,6 @@ static const struct StateEntryTemplate glsl_fragment_pipe_state_template[] = {STATE_TEXTURESTAGE(7, WINED3D_TSS_ALPHA_ARG2), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(7, WINED3D_TSS_ALPHA_ARG0), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_TEXTURESTAGE(7, WINED3D_TSS_RESULT_ARG), {STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT00), {STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT00), glsl_fragment_pipe_invalidate_constants}, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT01), {STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT10), {STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT11), {STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_LSCALE), {STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_LSCALE), glsl_fragment_pipe_invalidate_constants}, WINED3D_GL_EXT_NONE }, - {STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_LOFFSET), {STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_LSCALE), NULL }, WINED3D_GL_EXT_NONE }, {STATE_PIXELSHADER, {STATE_PIXELSHADER, glsl_fragment_pipe_shader }, WINED3D_GL_EXT_NONE }, {STATE_RENDER(WINED3D_RS_FOGENABLE), {STATE_RENDER(WINED3D_RS_FOGENABLE), glsl_fragment_pipe_fog }, WINED3D_GL_EXT_NONE }, {STATE_RENDER(WINED3D_RS_FOGTABLEMODE), {STATE_RENDER(WINED3D_RS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE }, diff --git a/dll/directx/wine/wined3d/resource.c b/dll/directx/wine/wined3d/resource.c index 7059ca551f9..ff8e8b4983a 100644 --- a/dll/directx/wine/wined3d/resource.c +++ b/dll/directx/wine/wined3d/resource.c @@ -4,6 +4,7 @@ * Copyright 2004 Christian Costa * Copyright 2005 Oliver Stieber * Copyright 2009-2010 Henri Verbeet for CodeWeavers + * Copyright 2006-2008, 2013 Stefan Dösinger for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -52,12 +53,10 @@ static DWORD resource_access_from_pool(enum wined3d_pool pool) case WINED3D_POOL_MANAGED: return WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_CPU; + case WINED3D_POOL_SCRATCH: case WINED3D_POOL_SYSTEM_MEM: return WINED3D_RESOURCE_ACCESS_CPU; - case WINED3D_POOL_SCRATCH: - return WINED3D_RESOURCE_ACCESS_SCRATCH; - default: FIXME("Unhandled pool %#x.\n", pool); return 0; @@ -84,6 +83,8 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device * void *parent, const struct wined3d_parent_ops *parent_ops, const struct wined3d_resource_ops *resource_ops) { + const struct wined3d *d3d = device->wined3d; + resource->ref = 1; resource->device = device; resource->type = type; @@ -109,8 +110,8 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device * if (size) { - resource->heapMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size + RESOURCE_ALIGNMENT); - if (!resource->heapMemory) + resource->heap_memory = wined3d_resource_allocate_sysmem(size); + if (!resource->heap_memory) { ERR("Out of memory!\n"); return WINED3DERR_OUTOFVIDEOMEMORY; @@ -118,18 +119,17 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device * } else { - resource->heapMemory = NULL; + resource->heap_memory = NULL; } - resource->allocatedMemory = (BYTE *)(((ULONG_PTR)resource->heapMemory - + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1)); + resource->allocatedMemory = resource->heap_memory; /* Check that we have enough video ram left */ - if (pool == WINED3D_POOL_DEFAULT) + if (pool == WINED3D_POOL_DEFAULT && d3d->flags & WINED3D_VIDMEM_ACCOUNTING) { if (size > wined3d_device_get_available_texture_mem(device)) { ERR("Out of adapter memory\n"); - HeapFree(GetProcessHeap(), 0, resource->heapMemory); + wined3d_resource_free_sysmem(resource->heap_memory); return WINED3DERR_OUTOFVIDEOMEMORY; } adapter_adjust_memory(device->adapter, size); @@ -142,13 +142,14 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device * void resource_cleanup(struct wined3d_resource *resource) { + const struct wined3d *d3d = resource->device->wined3d; struct private_data *data; struct list *e1, *e2; HRESULT hr; TRACE("Cleaning up resource %p.\n", resource); - if (resource->pool == WINED3D_POOL_DEFAULT) + if (resource->pool == WINED3D_POOL_DEFAULT && d3d->flags & WINED3D_VIDMEM_ACCOUNTING) { TRACE("Decrementing device memory pool by %u.\n", resource->size); adapter_adjust_memory(resource->device->adapter, 0 - resource->size); @@ -162,12 +163,11 @@ void resource_cleanup(struct wined3d_resource *resource) ERR("Failed to free private data when destroying resource %p, hr = %#x.\n", resource, hr); } - HeapFree(GetProcessHeap(), 0, resource->heapMemory); - resource->allocatedMemory = 0; - resource->heapMemory = 0; + wined3d_resource_free_sysmem(resource->heap_memory); + resource->allocatedMemory = NULL; + resource->heap_memory = NULL; - if (resource->device) - device_resource_released(resource->device, resource); + device_resource_released(resource->device, resource); } void resource_unload(struct wined3d_resource *resource) @@ -333,3 +333,78 @@ void CDECL wined3d_resource_get_desc(const struct wined3d_resource *resource, st desc->depth = resource->depth; desc->size = resource->size; } + +void *wined3d_resource_allocate_sysmem(SIZE_T size) +{ + void **p; + SIZE_T align = RESOURCE_ALIGNMENT - 1 + sizeof(*p); + void *mem; + + if (!(mem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size + align))) + return NULL; + + p = (void **)(((ULONG_PTR)mem + align) & ~(RESOURCE_ALIGNMENT - 1)) - 1; + *p = mem; + + return ++p; +} + +void wined3d_resource_free_sysmem(void *mem) +{ + void **p = mem; + + if (!mem) + return; + + HeapFree(GetProcessHeap(), 0, *(--p)); +} + +DWORD wined3d_resource_sanitize_map_flags(const struct wined3d_resource *resource, DWORD flags) +{ + /* Not all flags make sense together, but Windows never returns an error. + * Catch the cases that could cause issues. */ + if (flags & WINED3D_MAP_READONLY) + { + if (flags & WINED3D_MAP_DISCARD) + { + WARN("WINED3D_MAP_READONLY combined with WINED3D_MAP_DISCARD, ignoring flags.\n"); + return 0; + } + if (flags & WINED3D_MAP_NOOVERWRITE) + { + WARN("WINED3D_MAP_READONLY combined with WINED3D_MAP_NOOVERWRITE, ignoring flags.\n"); + return 0; + } + } + else if ((flags & (WINED3D_MAP_DISCARD | WINED3D_MAP_NOOVERWRITE)) + == (WINED3D_MAP_DISCARD | WINED3D_MAP_NOOVERWRITE)) + { + WARN("WINED3D_MAP_DISCARD and WINED3D_MAP_NOOVERWRITE used together, ignoring.\n"); + return 0; + } + else if (flags & (WINED3D_MAP_DISCARD | WINED3D_MAP_NOOVERWRITE) + && !(resource->usage & WINED3DUSAGE_DYNAMIC)) + { + WARN("DISCARD or NOOVERWRITE map on non-dynamic buffer, ignoring.\n"); + return 0; + } + + return flags; +} + +GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags) +{ + GLbitfield ret = 0; + + if (!(d3d_flags & WINED3D_MAP_READONLY)) + ret |= GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT; + if (!(d3d_flags & (WINED3D_MAP_DISCARD | WINED3D_MAP_NOOVERWRITE))) + ret |= GL_MAP_READ_BIT; + + if (d3d_flags & WINED3D_MAP_DISCARD) + ret |= GL_MAP_INVALIDATE_BUFFER_BIT; + if (d3d_flags & WINED3D_MAP_NOOVERWRITE) + ret |= GL_MAP_UNSYNCHRONIZED_BIT; + + return ret; +} diff --git a/dll/directx/wine/wined3d/shader.c b/dll/directx/wine/wined3d/shader.c index 38a74bbc0d8..43a9bbe794f 100644 --- a/dll/directx/wine/wined3d/shader.c +++ b/dll/directx/wine/wined3d/shader.c @@ -4,7 +4,7 @@ * Copyright 2004 Christian Costa * Copyright 2005 Oliver Stieber * Copyright 2006 Ivan Gyurdiev - * Copyright 2007-2008 Stefan Dösinger for CodeWeavers + * Copyright 2007-2008, 2013 Stefan Dösinger for CodeWeavers * Copyright 2009-2011 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or @@ -238,15 +238,15 @@ static const struct wined3d_shader_frontend *shader_select_frontend(DWORD versio void shader_buffer_clear(struct wined3d_shader_buffer *buffer) { buffer->buffer[0] = '\0'; - buffer->bsize = 0; + buffer->content_size = 0; buffer->lineNo = 0; buffer->newline = TRUE; } BOOL shader_buffer_init(struct wined3d_shader_buffer *buffer) { - buffer->buffer = HeapAlloc(GetProcessHeap(), 0, SHADER_PGMSIZE); - if (!buffer->buffer) + buffer->buffer_size = 16384; + if (!(buffer->buffer = HeapAlloc(GetProcessHeap(), 0, buffer->buffer_size))) { ERR("Failed to allocate shader buffer memory.\n"); return FALSE; @@ -263,22 +263,35 @@ void shader_buffer_free(struct wined3d_shader_buffer *buffer) int shader_vaddline(struct wined3d_shader_buffer *buffer, const char *format, va_list args) { - char *base = buffer->buffer + buffer->bsize; + char *base = buffer->buffer + buffer->content_size; int rc; + char *new_buffer; - rc = vsnprintf(base, SHADER_PGMSIZE - 1 - buffer->bsize, format, args); - - if (rc < 0 /* C89 */ || (unsigned int)rc > SHADER_PGMSIZE - 1 - buffer->bsize /* C99 */) + while(1) { - ERR("The buffer allocated for the shader program string " - "is too small at %d bytes.\n", SHADER_PGMSIZE); - buffer->bsize = SHADER_PGMSIZE - 1; - return -1; + rc = vsnprintf(base, buffer->buffer_size - buffer->content_size, format, args); + if (rc < 0 /* C89 */ || (unsigned int)rc >= buffer->buffer_size - buffer->content_size /* C99 */) + { + new_buffer = HeapReAlloc(GetProcessHeap(), 0, buffer->buffer, buffer->buffer_size * 2); + if (!new_buffer) + { + ERR("The buffer allocated for the shader program string is too small at %d bytes.\n", buffer->buffer_size); + buffer->content_size = buffer->buffer_size - 1; + return -1; + } + buffer->buffer = new_buffer; + buffer->buffer_size = buffer->buffer_size * 2; + base = buffer->buffer + buffer->content_size; + } + else + { + break; + } } if (buffer->newline) { - TRACE("GL HW (%u, %u) : %s", buffer->lineNo + 1, buffer->bsize, base); + TRACE("GL HW (%u, %u) : %s", buffer->lineNo + 1, buffer->content_size, base); buffer->newline = FALSE; } else @@ -286,8 +299,8 @@ int shader_vaddline(struct wined3d_shader_buffer *buffer, const char *format, va TRACE("%s", base); } - buffer->bsize += rc; - if (buffer->buffer[buffer->bsize-1] == '\n') + buffer->content_size += rc; + if (buffer->buffer[buffer->content_size-1] == '\n') { ++buffer->lineNo; buffer->newline = TRUE; @@ -570,15 +583,16 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st else if (ins.handler_idx == WINED3DSIH_DEF) { struct wined3d_shader_lconst *lconst = HeapAlloc(GetProcessHeap(), 0, sizeof(*lconst)); + float *value; if (!lconst) return E_OUTOFMEMORY; lconst->idx = ins.dst[0].reg.idx[0].offset; memcpy(lconst->value, ins.src[0].reg.immconst_data, 4 * sizeof(DWORD)); + value = (float *)lconst->value; /* In pixel shader 1.X shaders, the constants are clamped between [-1;1] */ if (shader_version.major == 1 && shader_version.type == WINED3D_SHADER_TYPE_PIXEL) { - float *value = (float *)lconst->value; if (value[0] < -1.0f) value[0] = -1.0f; else if (value[0] > 1.0f) value[0] = 1.0f; if (value[1] < -1.0f) value[1] = -1.0f; @@ -590,6 +604,12 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st } list_add_head(&shader->constantsF, &lconst->entry); + + if (isinf(value[0]) || isnan(value[0]) || isinf(value[1]) || isnan(value[1]) + || isinf(value[2]) || isnan(value[2]) || isinf(value[3]) || isnan(value[3])) + { + shader->lconst_inf_or_nan = TRUE; + } } else if (ins.handler_idx == WINED3DSIH_DEFI) { @@ -1477,6 +1497,7 @@ static void shader_cleanup(struct wined3d_shader *shader) struct shader_none_priv { + const struct wined3d_vertex_pipe_ops *vertex_pipe; const struct fragment_pipeline *fragment_pipe; BOOL ffp_proj_control; }; @@ -1487,42 +1508,68 @@ static void shader_none_select_depth_blt(void *shader_priv, const struct wined3d static void shader_none_deselect_depth_blt(void *shader_priv, const struct wined3d_gl_info *gl_info) {} static void shader_none_update_float_vertex_constants(struct wined3d_device *device, UINT start, UINT count) {} static void shader_none_update_float_pixel_constants(struct wined3d_device *device, UINT start, UINT count) {} -static void shader_none_load_constants(const struct wined3d_context *context, BOOL usePS, BOOL useVS) {} -static void shader_none_load_np2fixup_constants(void *shader_priv, - const struct wined3d_gl_info *gl_info, const struct wined3d_state *state) {} +static void shader_none_load_constants(void *shader_priv, struct wined3d_context *context, + const struct wined3d_state *state) {} static void shader_none_destroy(struct wined3d_shader *shader) {} -static void shader_none_context_destroyed(void *shader_priv, const struct wined3d_context *context) {} +static void shader_none_free_context_data(struct wined3d_context *context) {} -static void shader_none_select(const struct wined3d_context *context, enum wined3d_shader_mode vertex_mode, - enum wined3d_shader_mode fragment_mode) +/* Context activation is done by the caller. */ +static void shader_none_select(void *shader_priv, struct wined3d_context *context, + const struct wined3d_state *state) { const struct wined3d_gl_info *gl_info = context->gl_info; - struct wined3d_device *device = context->swapchain->device; - struct shader_none_priv *priv = device->shader_priv; + struct shader_none_priv *priv = shader_priv; - priv->fragment_pipe->enable_extension(gl_info, fragment_mode == WINED3D_SHADER_MODE_FFP); + priv->vertex_pipe->vp_enable(gl_info, !use_vs(state)); + priv->fragment_pipe->enable_extension(gl_info, !use_ps(state)); } -static HRESULT shader_none_alloc(struct wined3d_device *device, const struct fragment_pipeline *fragment_pipe) +/* Context activation is done by the caller. */ +static void shader_none_disable(void *shader_priv, struct wined3d_context *context) +{ + struct shader_none_priv *priv = shader_priv; + const struct wined3d_gl_info *gl_info = context->gl_info; + + priv->vertex_pipe->vp_enable(gl_info, FALSE); + priv->fragment_pipe->enable_extension(gl_info, FALSE); + + context->shader_update_mask = (1 << WINED3D_SHADER_TYPE_PIXEL) + | (1 << WINED3D_SHADER_TYPE_VERTEX) + | (1 << WINED3D_SHADER_TYPE_GEOMETRY); +} + +static HRESULT shader_none_alloc(struct wined3d_device *device, const struct wined3d_vertex_pipe_ops *vertex_pipe, + const struct fragment_pipeline *fragment_pipe) { struct fragment_caps fragment_caps; + void *vertex_priv, *fragment_priv; struct shader_none_priv *priv; - void *fragment_priv; if (!(priv = HeapAlloc(GetProcessHeap(), 0, sizeof(*priv)))) return E_OUTOFMEMORY; - if (!(fragment_priv = fragment_pipe->alloc_private(&none_shader_backend, priv))) + if (!(vertex_priv = vertex_pipe->vp_alloc(&none_shader_backend, priv))) { - ERR("Failed to initialize fragment pipe.\n"); + ERR("Failed to initialize vertex pipe.\n"); HeapFree(GetProcessHeap(), 0, priv); return E_FAIL; } + if (!(fragment_priv = fragment_pipe->alloc_private(&none_shader_backend, priv))) + { + ERR("Failed to initialize fragment pipe.\n"); + vertex_pipe->vp_free(device); + HeapFree(GetProcessHeap(), 0, priv); + return E_FAIL; + } + + priv->vertex_pipe = vertex_pipe; + priv->fragment_pipe = fragment_pipe; fragment_pipe->get_caps(&device->adapter->gl_info, &fragment_caps); priv->ffp_proj_control = fragment_caps.wined3d_caps & WINED3D_FRAGMENT_CAP_PROJ_CONTROL; + + device->vertex_priv = vertex_priv; device->fragment_priv = fragment_priv; - priv->fragment_pipe = fragment_pipe; device->shader_priv = priv; return WINED3D_OK; @@ -1533,9 +1580,15 @@ static void shader_none_free(struct wined3d_device *device) struct shader_none_priv *priv = device->shader_priv; priv->fragment_pipe->free_private(device); + priv->vertex_pipe->vp_free(device); HeapFree(GetProcessHeap(), 0, priv); } +static BOOL shader_none_allocate_context_data(struct wined3d_context *context) +{ + return TRUE; +} + static void shader_none_get_caps(const struct wined3d_gl_info *gl_info, struct shader_caps *caps) { /* Set the shader caps to 0 for the none shader backend */ @@ -1566,16 +1619,17 @@ const struct wined3d_shader_backend_ops none_shader_backend = { shader_none_handle_instruction, shader_none_select, + shader_none_disable, shader_none_select_depth_blt, shader_none_deselect_depth_blt, shader_none_update_float_vertex_constants, shader_none_update_float_pixel_constants, shader_none_load_constants, - shader_none_load_np2fixup_constants, shader_none_destroy, shader_none_alloc, shader_none_free, - shader_none_context_destroyed, + shader_none_allocate_context_data, + shader_none_free_context_data, shader_none_get_caps, shader_none_color_fixup_supported, shader_none_has_ffp_proj_control, @@ -1589,6 +1643,7 @@ static HRESULT shader_set_function(struct wined3d_shader *shader, const DWORD *b const struct wined3d_shader_frontend *fe; HRESULT hr; unsigned int backend_version; + const struct wined3d_d3d_info *d3d_info = &shader->device->adapter->d3d_info; TRACE("shader %p, byte_code %p, output_signature %p, float_const_count %u.\n", shader, byte_code, output_signature, float_const_count); @@ -1615,6 +1670,7 @@ static HRESULT shader_set_function(struct wined3d_shader *shader, const DWORD *b list_init(&shader->constantsF); list_init(&shader->constantsB); list_init(&shader->constantsI); + shader->lconst_inf_or_nan = FALSE; /* Second pass: figure out which registers are used, what the semantics are, etc. */ hr = shader_get_registers_used(shader, fe, @@ -1635,13 +1691,13 @@ static HRESULT shader_set_function(struct wined3d_shader *shader, const DWORD *b switch (type) { case WINED3D_SHADER_TYPE_VERTEX: - backend_version = shader->device->vs_version; + backend_version = d3d_info->limits.vs_version; break; case WINED3D_SHADER_TYPE_GEOMETRY: - backend_version = shader->device->gs_version; + backend_version = d3d_info->limits.gs_version; break; case WINED3D_SHADER_TYPE_PIXEL: - backend_version = shader->device->ps_version; + backend_version = d3d_info->limits.ps_version; break; default: FIXME("No backend version-checking for this shader type\n"); @@ -1738,12 +1794,20 @@ HRESULT CDECL wined3d_shader_set_local_constants_float(struct wined3d_shader *sh for (i = start_idx; i < end_idx; ++i) { struct wined3d_shader_lconst *lconst = HeapAlloc(GetProcessHeap(), 0, sizeof(*lconst)); + float *value; if (!lconst) return E_OUTOFMEMORY; lconst->idx = i; - memcpy(lconst->value, src_data + (i - start_idx) * 4 /* 4 components */, 4 * sizeof(float)); + value = (float *)lconst->value; + memcpy(value, src_data + (i - start_idx) * 4 /* 4 components */, 4 * sizeof(float)); list_add_head(&shader->constantsF, &lconst->entry); + + if (isinf(value[0]) || isnan(value[0]) || isinf(value[1]) || isnan(value[1]) + || isinf(value[2]) || isnan(value[2]) || isinf(value[3]) || isnan(value[3])) + { + shader->lconst_inf_or_nan = TRUE; + } } return WINED3D_OK; @@ -1756,7 +1820,7 @@ void find_vs_compile_args(const struct wined3d_state *state, == WINED3D_FOG_NONE ? VS_FOG_COORD : VS_FOG_Z; args->clip_enabled = state->render_states[WINED3D_RS_CLIPPING] && state->render_states[WINED3D_RS_CLIPPLANEENABLE]; - args->swizzle_map = shader->device->strided_streams.swizzle_map; + args->swizzle_map = shader->device->stream_info.swizzle_map; } static BOOL match_usage(BYTE usage1, BYTE usage_idx1, BYTE usage2, BYTE usage_idx2) @@ -1798,6 +1862,7 @@ static void vertexshader_set_limits(struct wined3d_shader *shader) DWORD shader_version = WINED3D_SHADER_VERSION(shader->reg_maps.shader_version.major, shader->reg_maps.shader_version.minor); struct wined3d_device *device = shader->device; + const DWORD vs_uniform_count = device->adapter->d3d_info.limits.vs_uniform_count; shader->limits.packed_input = 0; @@ -1812,7 +1877,7 @@ static void vertexshader_set_limits(struct wined3d_shader *shader) /* TODO: vs_1_1 has a minimum of 96 constants. What happens when * a vs_1_1 shader is used on a vs_3_0 capable card that has 256 * constants? */ - shader->limits.constant_float = min(256, device->d3d_vshader_constantF); + shader->limits.constant_float = min(256, vs_uniform_count); break; case WINED3D_SHADER_VERSION(2, 0): @@ -1821,7 +1886,7 @@ static void vertexshader_set_limits(struct wined3d_shader *shader) shader->limits.constant_int = 16; shader->limits.packed_output = 12; shader->limits.sampler = 0; - shader->limits.constant_float = min(256, device->d3d_vshader_constantF); + shader->limits.constant_float = min(256, vs_uniform_count); break; case WINED3D_SHADER_VERSION(3, 0): @@ -1834,7 +1899,7 @@ static void vertexshader_set_limits(struct wined3d_shader *shader) * drivers advertise 1024). d3d9.dll and d3d8.dll clamp the * wined3d-advertised maximum. Clamp the constant limit for <= 3.0 * shaders to 256. */ - shader->limits.constant_float = min(256, device->d3d_vshader_constantF); + shader->limits.constant_float = min(256, vs_uniform_count); break; case WINED3D_SHADER_VERSION(4, 0): @@ -1851,7 +1916,7 @@ static void vertexshader_set_limits(struct wined3d_shader *shader) shader->limits.constant_int = 16; shader->limits.packed_output = 12; shader->limits.sampler = 0; - shader->limits.constant_float = min(256, device->d3d_vshader_constantF); + shader->limits.constant_float = min(256, vs_uniform_count); FIXME("Unrecognized vertex shader version \"%u.%u\".\n", shader->reg_maps.shader_version.major, shader->reg_maps.shader_version.minor); @@ -1866,11 +1931,12 @@ static HRESULT vertexshader_init(struct wined3d_shader *shader, struct wined3d_d unsigned int i; HRESULT hr; WORD map; + const DWORD vs_uniform_count = device->adapter->d3d_info.limits.vs_uniform_count; if (!byte_code) return WINED3DERR_INVALIDCALL; shader_init(shader, device, parent, parent_ops); - hr = shader_set_function(shader, byte_code, output_signature, device->d3d_vshader_constantF, + hr = shader_set_function(shader, byte_code, output_signature, vs_uniform_count, WINED3D_SHADER_TYPE_VERTEX, max_version); if (FAILED(hr)) { @@ -1902,8 +1968,8 @@ static HRESULT vertexshader_init(struct wined3d_shader *shader, struct wined3d_d vertexshader_set_limits(shader); - shader->load_local_constsF = reg_maps->usesrelconstF - && !list_empty(&shader->constantsF); + shader->load_local_constsF = (reg_maps->usesrelconstF && !list_empty(&shader->constantsF)) || + shader->lconst_inf_or_nan; return WINED3D_OK; } @@ -1950,7 +2016,7 @@ static HRESULT geometryshader_init(struct wined3d_shader *shader, struct wined3d geometryshader_set_limits(shader); - shader->load_local_constsF = FALSE; + shader->load_local_constsF = shader->lconst_inf_or_nan; return WINED3D_OK; } @@ -1981,7 +2047,7 @@ void find_ps_compile_args(const struct wined3d_state *state, if (shader->reg_maps.shader_version.major == 1 && shader->reg_maps.shader_version.minor <= 3) { - for (i = 0; i < 4; ++i) + for (i = 0; i < shader->limits.sampler; ++i) { DWORD flags = state->texture_states[i][WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS]; @@ -2032,6 +2098,39 @@ void find_ps_compile_args(const struct wined3d_state *state, } } } + if (shader->reg_maps.shader_version.major == 1 + && shader->reg_maps.shader_version.minor <= 4) + { + for (i = 0; i < shader->limits.sampler; ++i) + { + const struct wined3d_texture *texture = state->textures[i]; + + if (!shader->reg_maps.sampler_type[i]) + continue; + + /* Treat unbound textures as 2D. The dummy texture will provide + * the proper sample value. The tex_types bitmap defaults to + * 2D because of the memset. */ + if (!texture) + continue; + + switch (texture->target) + { + /* RECT textures are distinguished from 2D textures via np2_fixup */ + case GL_TEXTURE_RECTANGLE_ARB: + case GL_TEXTURE_2D: + break; + + case GL_TEXTURE_3D: + args->tex_types |= WINED3D_SHADER_TEX_3D << i * WINED3D_PSARGS_TEXTYPE_SHIFT; + break; + + case GL_TEXTURE_CUBE_MAP_ARB: + args->tex_types |= WINED3D_SHADER_TEX_CUBE << i * WINED3D_PSARGS_TEXTYPE_SHIFT; + break; + } + } + } for (i = 0; i < MAX_FRAGMENT_SAMPLERS; ++i) { @@ -2055,19 +2154,13 @@ void find_ps_compile_args(const struct wined3d_state *state, } if (shader->reg_maps.shader_version.major >= 3) { - if (device->strided_streams.position_transformed) - { + if (device->stream_info.position_transformed) args->vp_mode = pretransformed; - } else if (use_vs(state)) - { args->vp_mode = vertexshader; - } else - { args->vp_mode = fixedfunction; - } - args->fog = FOG_OFF; + args->fog = WINED3D_FFP_PS_FOG_OFF; } else { @@ -2077,29 +2170,29 @@ void find_ps_compile_args(const struct wined3d_state *state, switch (state->render_states[WINED3D_RS_FOGTABLEMODE]) { case WINED3D_FOG_NONE: - if (device->strided_streams.position_transformed || use_vs(state)) + if (device->stream_info.position_transformed || use_vs(state)) { - args->fog = FOG_LINEAR; + args->fog = WINED3D_FFP_PS_FOG_LINEAR; break; } switch (state->render_states[WINED3D_RS_FOGVERTEXMODE]) { case WINED3D_FOG_NONE: /* Fall through. */ - case WINED3D_FOG_LINEAR: args->fog = FOG_LINEAR; break; - case WINED3D_FOG_EXP: args->fog = FOG_EXP; break; - case WINED3D_FOG_EXP2: args->fog = FOG_EXP2; break; + case WINED3D_FOG_LINEAR: args->fog = WINED3D_FFP_PS_FOG_LINEAR; break; + case WINED3D_FOG_EXP: args->fog = WINED3D_FFP_PS_FOG_EXP; break; + case WINED3D_FOG_EXP2: args->fog = WINED3D_FFP_PS_FOG_EXP2; break; } break; - case WINED3D_FOG_LINEAR: args->fog = FOG_LINEAR; break; - case WINED3D_FOG_EXP: args->fog = FOG_EXP; break; - case WINED3D_FOG_EXP2: args->fog = FOG_EXP2; break; + case WINED3D_FOG_LINEAR: args->fog = WINED3D_FFP_PS_FOG_LINEAR; break; + case WINED3D_FOG_EXP: args->fog = WINED3D_FFP_PS_FOG_EXP; break; + case WINED3D_FOG_EXP2: args->fog = WINED3D_FFP_PS_FOG_EXP2; break; } } else { - args->fog = FOG_OFF; + args->fog = WINED3D_FFP_PS_FOG_OFF; } } } @@ -2184,11 +2277,12 @@ static HRESULT pixelshader_init(struct wined3d_shader *shader, struct wined3d_de const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; unsigned int i, highest_reg_used = 0, num_regs_used = 0; HRESULT hr; + const DWORD ps_uniform_count = device->adapter->d3d_info.limits.ps_uniform_count; if (!byte_code) return WINED3DERR_INVALIDCALL; shader_init(shader, device, parent, parent_ops); - hr = shader_set_function(shader, byte_code, output_signature, device->d3d_pshader_constantF, + hr = shader_set_function(shader, byte_code, output_signature, ps_uniform_count, WINED3D_SHADER_TYPE_PIXEL, max_version); if (FAILED(hr)) { @@ -2239,51 +2333,37 @@ static HRESULT pixelshader_init(struct wined3d_shader *shader, struct wined3d_de } } - shader->load_local_constsF = FALSE; + shader->load_local_constsF = shader->lconst_inf_or_nan; return WINED3D_OK; } -void pixelshader_update_samplers(struct wined3d_shader_reg_maps *reg_maps, struct wined3d_texture * const *textures) +void pixelshader_update_samplers(struct wined3d_shader *shader, WORD tex_types) { + struct wined3d_shader_reg_maps *reg_maps = &shader->reg_maps; enum wined3d_sampler_texture_type *sampler_type = reg_maps->sampler_type; unsigned int i; if (reg_maps->shader_version.major != 1) return; - for (i = 0; i < max(MAX_FRAGMENT_SAMPLERS, MAX_VERTEX_SAMPLERS); ++i) + for (i = 0; i < shader->limits.sampler; ++i) { /* We don't sample from this sampler. */ if (!sampler_type[i]) continue; - if (!textures[i]) + switch ((tex_types >> i * WINED3D_PSARGS_TEXTYPE_SHIFT) & WINED3D_PSARGS_TEXTYPE_MASK) { - WARN("No texture bound to sampler %u, using 2D.\n", i); - sampler_type[i] = WINED3DSTT_2D; - continue; - } - - switch (textures[i]->target) - { - case GL_TEXTURE_RECTANGLE_ARB: - case GL_TEXTURE_2D: - /* We have to select between texture rectangles and 2D - * textures later because 2.0 and 3.0 shaders only have - * WINED3DSTT_2D as well. */ + case WINED3D_SHADER_TEX_2D: sampler_type[i] = WINED3DSTT_2D; break; - case GL_TEXTURE_3D: + case WINED3D_SHADER_TEX_3D: sampler_type[i] = WINED3DSTT_VOLUME; break; - case GL_TEXTURE_CUBE_MAP_ARB: + case WINED3D_SHADER_TEX_CUBE: sampler_type[i] = WINED3DSTT_CUBE; break; - - default: - FIXME("Unrecognized texture type %#x, using 2D.\n", textures[i]->target); - sampler_type[i] = WINED3DSTT_2D; } } } diff --git a/dll/directx/wine/wined3d/state.c b/dll/directx/wine/wined3d/state.c index 7dff243f2e9..f1c5d8ab6e3 100644 --- a/dll/directx/wine/wined3d/state.c +++ b/dll/directx/wine/wined3d/state.c @@ -87,7 +87,7 @@ static void state_lighting(struct wined3d_context *context, const struct wined3d return; if (state->render_states[WINED3D_RS_LIGHTING] - && !context->swapchain->device->strided_streams.position_transformed) + && !context->swapchain->device->stream_info.position_transformed) { gl_info->gl_ops.gl.p_glEnable(GL_LIGHTING); checkGLcall("glEnable GL_LIGHTING"); @@ -134,7 +134,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_ if (context->gl_info->supported[ARB_DEPTH_CLAMP]) { - if (!zenable && context->swapchain->device->strided_streams.position_transformed) + if (!zenable && context->swapchain->device->stream_info.position_transformed) { gl_info->gl_ops.gl.p_glEnable(GL_DEPTH_CLAMP); checkGLcall("glEnable(GL_DEPTH_CLAMP)"); @@ -267,26 +267,11 @@ static void state_zfunc(struct wined3d_context *context, const struct wined3d_st if (!depth_func) return; - if (depth_func == GL_EQUAL || depth_func == GL_NOTEQUAL) - { - static BOOL once; - /* There are a few issues with this: First, our inability to - * select a proper Z depth, most of the time we're stuck with - * D24S8, even if the app selects D32 or D16. There seem to be - * some other precision problems which have to be debugged to - * make NOTEQUAL and EQUAL work properly. */ - if (!once) - { - once = TRUE; - FIXME("D3DCMP_NOTEQUAL and D3DCMP_EQUAL do not work correctly yet.\n"); - } - } - gl_info->gl_ops.gl.p_glDepthFunc(depth_func); checkGLcall("glDepthFunc"); } -static void state_ambient(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +void state_ambient(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = context->gl_info; float col[4]; @@ -597,45 +582,33 @@ static void state_alpha(struct wined3d_context *context, const struct wined3d_st } } -static void shaderconstant(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) -{ - context->load_constants = 1; -} - -static void state_clipping(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +void state_clipping(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = context->gl_info; DWORD enable = 0xffffffff; DWORD disable = 0x00000000; - if (use_vs(state)) + if (use_vs(state) && !context->d3d_info->vs_clipping) { - const struct wined3d_device *device = context->swapchain->device; + static BOOL warned; - if (!device->vs_clipping) - { - /* The spec says that opengl clipping planes are disabled when using shaders. Direct3D planes aren't, - * so that is an issue. The MacOS ATI driver keeps clipping planes activated with shaders in some - * conditions I got sick of tracking down. The shader state handler disables all clip planes because - * of that - don't do anything here and keep them disabled - */ - if (state->render_states[WINED3D_RS_CLIPPLANEENABLE]) - { - static BOOL warned = FALSE; - if(!warned) { - FIXME("Clipping not supported with vertex shaders\n"); - warned = TRUE; - } - } - return; - } - - /* glEnable(GL_CLIP_PLANEx) doesn't apply to vertex shaders. The enabled / disabled planes are - * hardcoded into the shader. Update the shader to update the enabled clipplanes */ - context->select_shader = 1; - context->load_constants = 1; + /* The OpenGL spec says that clipping planes are disabled when using + * shaders. Direct3D planes aren't, so that is an issue. The MacOS ATI + * driver keeps clipping planes activated with shaders in some + * conditions I got sick of tracking down. The shader state handler + * disables all clip planes because of that - don't do anything here + * and keep them disabled. */ + if (state->render_states[WINED3D_RS_CLIPPLANEENABLE] && !warned++) + FIXME("Clipping not supported with vertex shaders\n"); + return; } + /* glEnable(GL_CLIP_PLANEx) doesn't apply to (ARB backend) vertex shaders. + * The enabled / disabled planes are hardcoded into the shader. Update the + * shader to update the enabled clipplanes. In case of fixed function, we + * need to update the clipping field from ffp_vertex_settings. */ + context->shader_update_mask |= 1 << WINED3D_SHADER_TYPE_VERTEX; + /* TODO: Keep track of previously enabled clipplanes to avoid unnecessary resetting * of already set values */ @@ -671,7 +644,7 @@ static void state_clipping(struct wined3d_context *context, const struct wined3d checkGLcall("clip plane disable"); } -static void state_specularenable(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +void state_specularenable(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = context->gl_info; /* Originally this used glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL,GL_SEPARATE_SPECULAR_COLOR) @@ -791,7 +764,7 @@ static void state_texfactor(struct wined3d_context *context, const struct wined3 D3DCOLORTOGLFLOAT4(state->render_states[WINED3D_RS_TEXTUREFACTOR], col); /* And now the default texture color as well */ - for (i = 0; i < gl_info->limits.texture_stages; ++i) + for (i = 0; i < context->d3d_info->limits.ffp_blend_stages; ++i) { /* Note the WINED3D_RS value applies to all textures, but GL has one * per texture, so apply it now ready to be used! */ @@ -1064,8 +1037,13 @@ void state_fogstartend(struct wined3d_context *context, const struct wined3d_sta fogstart = tmpvalue.f; tmpvalue.d = state->render_states[WINED3D_RS_FOGEND]; fogend = tmpvalue.f; - /* In GL, fogstart == fogend disables fog, in D3D everything's fogged.*/ - if(fogstart == fogend) { + /* Special handling for fogstart == fogend. In d3d with vertex + * fog, everything is fogged. With table fog, everything with + * fog_coord < fog_start is unfogged, and fog_coord > fog_start + * is fogged. Windows drivers disagree when fog_coord == fog_start. */ + if (state->render_states[WINED3D_RS_FOGTABLEMODE] == WINED3D_FOG_NONE + && fogstart == fogend) + { fogstart = -INFINITY; fogend = 0.0f; } @@ -1093,6 +1071,8 @@ void state_fog_fragpart(struct wined3d_context *context, const struct wined3d_st { const struct wined3d_gl_info *gl_info = context->gl_info; enum fogsource new_source; + DWORD fogstart = state->render_states[WINED3D_RS_FOGSTART]; + DWORD fogend = state->render_states[WINED3D_RS_FOGEND]; TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id); @@ -1238,7 +1218,7 @@ void state_fog_fragpart(struct wined3d_context *context, const struct wined3d_st glEnableWINE(GL_FOG); checkGLcall("glEnable GL_FOG"); - if (new_source != context->fog_source) + if (new_source != context->fog_source || fogstart == fogend) { context->fog_source = new_source; state_fogstartend(context, state, STATE_RENDER(WINED3D_RS_FOGSTART)); @@ -1283,7 +1263,7 @@ static void state_colormat(struct wined3d_context *context, const struct wined3d } context->num_untracked_materials = 0; - if ((device->strided_streams.use_map & (1 << WINED3D_FFP_DIFFUSE)) + if ((device->stream_info.use_map & (1 << WINED3D_FFP_DIFFUSE)) && state->render_states[WINED3D_RS_COLORVERTEX]) { TRACE("diff %d, amb %d, emis %d, spec %d\n", @@ -1436,7 +1416,7 @@ static void state_normalize(struct wined3d_context *context, const struct wined3 * by zero and is not properly defined in opengl, so avoid it */ if (state->render_states[WINED3D_RS_NORMALIZENORMALS] - && (context->swapchain->device->strided_streams.use_map & (1 << WINED3D_FFP_NORMAL))) + && (context->swapchain->device->stream_info.use_map & (1 << WINED3D_FFP_NORMAL))) { gl_info->gl_ops.gl.p_glEnable(GL_NORMALIZE); checkGLcall("glEnable(GL_NORMALIZE);"); @@ -1448,7 +1428,7 @@ static void state_normalize(struct wined3d_context *context, const struct wined3 } } -static void state_psizemin_w(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +void state_psizemin_w(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { union { DWORD d; @@ -1468,7 +1448,7 @@ static void state_psizemin_w(struct wined3d_context *context, const struct wined } -static void state_psizemin_ext(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +void state_psizemin_ext(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = context->gl_info; union @@ -1491,7 +1471,7 @@ static void state_psizemin_ext(struct wined3d_context *context, const struct win checkGLcall("glPointParameterfEXT(...)"); } -static void state_psizemin_arb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +void state_psizemin_arb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = context->gl_info; union @@ -1514,7 +1494,7 @@ static void state_psizemin_arb(struct wined3d_context *context, const struct win checkGLcall("glPointParameterfARB(...)"); } -static void state_pscale(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +void state_pscale(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = context->gl_info; /* TODO: Group this with the viewport */ @@ -1689,7 +1669,7 @@ static void state_lastpixel(struct wined3d_context *context, const struct wined3 } } -static void state_pointsprite_w(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +void state_pointsprite_w(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { static BOOL warned; @@ -1702,7 +1682,7 @@ static void state_pointsprite_w(struct wined3d_context *context, const struct wi } } -static void state_pointsprite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +void state_pointsprite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = context->gl_info; @@ -3312,7 +3292,7 @@ void tex_alphaop(struct wined3d_context *context, const struct wined3d_state *st } } -static void transform_texture(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +void transform_texture(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { DWORD texUnit = (state_id - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1); const struct wined3d_device *device = context->swapchain->device; @@ -3338,8 +3318,8 @@ static void transform_texture(struct wined3d_context *context, const struct wine set_texture_matrix(gl_info, &state->transforms[WINED3D_TS_TEXTURE0 + texUnit].u.m[0][0], state->texture_states[texUnit][WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS], generated, context->last_was_rhw, - device->strided_streams.use_map & (1 << (WINED3D_FFP_TEXCOORD0 + coordIdx)) - ? device->strided_streams.elements[WINED3D_FFP_TEXCOORD0 + coordIdx].format->id + device->stream_info.use_map & (1 << (WINED3D_FFP_TEXCOORD0 + coordIdx)) + ? device->stream_info.elements[WINED3D_FFP_TEXCOORD0 + coordIdx].format->id : WINED3DFMT_UNKNOWN, device->shader_backend->shader_has_ffp_proj_control(device->shader_priv)); @@ -3378,7 +3358,7 @@ static void load_tex_coords(const struct wined3d_context *context, const struct unsigned int mapped_stage = 0; unsigned int textureNo = 0; - for (textureNo = 0; textureNo < gl_info->limits.texture_stages; ++textureNo) + for (textureNo = 0; textureNo < context->d3d_info->limits.ffp_blend_stages; ++textureNo) { int coordIdx = state->texture_states[textureNo][WINED3D_TSS_TEXCOORD_INDEX]; @@ -3602,21 +3582,11 @@ static void tex_coordindex(struct wined3d_context *context, const struct wined3d GLuint curVBO = gl_info->supported[ARB_VERTEX_BUFFER_OBJECT] ? ~0U : 0; unload_tex_coords(gl_info); - load_tex_coords(context, &device->strided_streams, &curVBO, state); + load_tex_coords(context, &device->stream_info, &curVBO, state); } } -static void tex_bumpenvlscale(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) -{ - DWORD stage = (state_id - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1); - const struct wined3d_shader *ps = state->pixel_shader; - - /* The pixel shader has to know the luminance scale. Do a constants update. */ - if (ps && stage && (ps->reg_maps.luminanceparams & (1 << stage))) - context->load_constants = 1; -} - -static void sampler_texmatrix(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +void sampler_texmatrix(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const DWORD sampler = state_id - STATE_SAMPLER(0); const struct wined3d_texture *texture = state->textures[sampler]; @@ -3706,7 +3676,7 @@ static void sampler(struct wined3d_context *context, const struct wined3d_state /* Trigger shader constant reloading (for NP2 texcoord fixup) */ if (!(texture->flags & WINED3D_TEXTURE_POW2_MAT_IDENT)) - device->shader_backend->shader_load_np2fixup_constants(device->shader_priv, gl_info, state); + context->constant_update_mask |= WINED3D_SHADER_CONST_PS_NP2_FIXUP; } else { @@ -3753,7 +3723,7 @@ void apply_pixelshader(struct wined3d_context *context, const struct wined3d_sta { /* Disabled the pixel shader - color ops weren't applied while it was * enabled, so re-apply them. */ - for (i = 0; i < context->gl_info->limits.texture_stages; ++i) + for (i = 0; i < context->d3d_info->limits.ffp_blend_stages; ++i) { if (!isStateDirty(context, STATE_TEXTURESTAGE(i, WINED3D_TSS_COLOR_OP))) context_apply_state(context, state, STATE_TEXTURESTAGE(i, WINED3D_TSS_COLOR_OP)); @@ -3761,26 +3731,20 @@ void apply_pixelshader(struct wined3d_context *context, const struct wined3d_sta context->last_was_pshader = FALSE; } - context->select_shader = 1; - context->load_constants = 1; + context->shader_update_mask |= 1 << WINED3D_SHADER_TYPE_PIXEL; } static void state_geometry_shader(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { - context->select_shader = 1; + context->shader_update_mask |= 1 << WINED3D_SHADER_TYPE_GEOMETRY; } -static void shader_bumpenvmat(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +static void shader_bumpenv(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { - DWORD stage = (state_id - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1); - const struct wined3d_shader *ps = state->pixel_shader; - - /* The pixel shader has to know the bump env matrix. Do a constants update. */ - if (ps && stage && (ps->reg_maps.bumpmat & (1 << stage))) - context->load_constants = 1; + context->constant_update_mask |= WINED3D_SHADER_CONST_PS_BUMP_ENV; } -static void transform_world(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +void transform_world(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = context->gl_info; @@ -3801,23 +3765,14 @@ static void transform_world(struct wined3d_context *context, const struct wined3 } else { - /* In the general case, the view matrix is the identity matrix */ - if (context->swapchain->device->view_ident) - { - gl_info->gl_ops.gl.p_glLoadMatrixf(&state->transforms[WINED3D_TS_WORLD_MATRIX(0)].u.m[0][0]); - checkGLcall("glLoadMatrixf"); - } - else - { - gl_info->gl_ops.gl.p_glLoadMatrixf(&state->transforms[WINED3D_TS_VIEW].u.m[0][0]); - checkGLcall("glLoadMatrixf"); - gl_info->gl_ops.gl.p_glMultMatrixf(&state->transforms[WINED3D_TS_WORLD_MATRIX(0)].u.m[0][0]); - checkGLcall("glMultMatrixf"); - } + gl_info->gl_ops.gl.p_glLoadMatrixf(&state->transforms[WINED3D_TS_VIEW].u.m[0][0]); + checkGLcall("glLoadMatrixf"); + gl_info->gl_ops.gl.p_glMultMatrixf(&state->transforms[WINED3D_TS_WORLD_MATRIX(0)].u.m[0][0]); + checkGLcall("glMultMatrixf"); } } -static void clipplane(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +void clipplane(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = context->gl_info; UINT index = state_id - STATE_CLIPPLANE(0); @@ -3883,18 +3838,10 @@ static void transform_worldex(struct wined3d_context *context, const struct wine /* World matrix 0 is multiplied with the view matrix because d3d uses 3 * matrices while gl uses only 2. To avoid weighting the view matrix * incorrectly it has to be multiplied into every GL modelview matrix. */ - if (context->swapchain->device->view_ident) - { - gl_info->gl_ops.gl.p_glLoadMatrixf(&state->transforms[WINED3D_TS_WORLD_MATRIX(matrix)].u.m[0][0]); - checkGLcall("glLoadMatrixf"); - } - else - { - gl_info->gl_ops.gl.p_glLoadMatrixf(&state->transforms[WINED3D_TS_VIEW].u.m[0][0]); - checkGLcall("glLoadMatrixf"); - gl_info->gl_ops.gl.p_glMultMatrixf(&state->transforms[WINED3D_TS_WORLD_MATRIX(matrix)].u.m[0][0]); - checkGLcall("glMultMatrixf"); - } + gl_info->gl_ops.gl.p_glLoadMatrixf(&state->transforms[WINED3D_TS_VIEW].u.m[0][0]); + checkGLcall("glLoadMatrixf"); + gl_info->gl_ops.gl.p_glMultMatrixf(&state->transforms[WINED3D_TS_WORLD_MATRIX(matrix)].u.m[0][0]); + checkGLcall("glMultMatrixf"); } static void state_vertexblend_w(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) @@ -3953,7 +3900,7 @@ static void state_vertexblend(struct wined3d_context *context, const struct wine } } -static void transform_view(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +void transform_view(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_light_info *light = NULL; @@ -4012,7 +3959,7 @@ static void transform_view(struct wined3d_context *context, const struct wined3d } } -static void transform_projection(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +void transform_projection(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = context->gl_info; @@ -4552,13 +4499,13 @@ static void streamsrc(struct wined3d_context *context, const struct wined3d_stat if (load_numbered) { TRACE("Loading numbered arrays\n"); - load_numbered_arrays(context, &device->strided_streams, state); + load_numbered_arrays(context, &device->stream_info, state); context->numberedArraysLoaded = TRUE; } else if (load_named) { TRACE("Loading vertex data\n"); - load_vertex_data(context, &device->strided_streams, state); + load_vertex_data(context, &device->stream_info, state); context->namedArraysLoaded = TRUE; } } @@ -4570,7 +4517,7 @@ static void vdecl_miscpart(struct wined3d_context *context, const struct wined3d streamsrc(context, state, STATE_STREAMSRC); } -static void vertexdeclaration(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +void vertexdeclaration(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_device *device = context->swapchain->device; const struct wined3d_gl_info *gl_info = context->gl_info; @@ -4580,7 +4527,7 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine BOOL wasrhw = context->last_was_rhw; unsigned int i; - transformed = device->strided_streams.position_transformed; + transformed = device->stream_info.position_transformed; if (transformed != context->last_was_rhw && !useVertexShaderFunction) updateFog = TRUE; @@ -4612,7 +4559,7 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine && !isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_VIEW))) transform_world(context, state, STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(0))); if (!isStateDirty(context, STATE_RENDER(WINED3D_RS_COLORVERTEX))) - state_colormat(context, state, STATE_RENDER(WINED3D_RS_COLORVERTEX)); + context_apply_state(context, state, STATE_RENDER(WINED3D_RS_COLORVERTEX)); if (!isStateDirty(context, STATE_RENDER(WINED3D_RS_LIGHTING))) state_lighting(context, state, STATE_RENDER(WINED3D_RS_LIGHTING)); @@ -4620,8 +4567,11 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine { updateFog = TRUE; - if (!device->vs_clipping && !isStateDirty(context, STATE_RENDER(WINED3D_RS_CLIPPLANEENABLE))) + if (!context->d3d_info->vs_clipping + && !isStateDirty(context, STATE_RENDER(WINED3D_RS_CLIPPLANEENABLE))) + { state_clipping(context, state, STATE_RENDER(WINED3D_RS_CLIPPLANEENABLE)); + } for (i = 0; i < gl_info->limits.clipplanes; ++i) { @@ -4635,7 +4585,8 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine { if(!context->last_was_vshader) { static BOOL warned = FALSE; - if(!device->vs_clipping) { + if (!context->d3d_info->vs_clipping) + { /* Disable all clip planes to get defined results on all drivers. See comment in the * state_clipping state handler */ @@ -4679,8 +4630,7 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine } context->last_was_vshader = useVertexShaderFunction; - context->select_shader = 1; - context->load_constants = 1; + context->shader_update_mask |= 1 << WINED3D_SHADER_TYPE_VERTEX; if (updateFog) context_apply_state(context, state, STATE_RENDER(WINED3D_RS_FOGVERTEXMODE)); @@ -4694,6 +4644,10 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine if (!isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_TEXTURE0 + i))) transform_texture(context, state, STATE_TEXTURESTAGE(i, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS)); } + + if (use_ps(state) && state->pixel_shader->reg_maps.shader_version.major == 1 + && state->pixel_shader->reg_maps.shader_version.minor <= 3) + context->shader_update_mask |= 1 << WINED3D_SHADER_TYPE_PIXEL; } if (transformed != wasrhw && !isStateDirty(context, STATE_RENDER(WINED3D_RS_ZENABLE))) @@ -4727,21 +4681,21 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine gl_info->gl_ops.gl.p_glViewport(vp.x, (height - (vp.y + vp.height)), vp.width, vp.height); } - checkGLcall("glViewport"); } -static void viewport_vertexpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +void viewport_vertexpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { if (!isStateDirty(context, STATE_TRANSFORM(WINED3D_TS_PROJECTION))) transform_projection(context, state, STATE_TRANSFORM(WINED3D_TS_PROJECTION)); - if (!isStateDirty(context, STATE_RENDER(WINED3D_RS_POINTSCALEENABLE))) + if (!isStateDirty(context, STATE_RENDER(WINED3D_RS_POINTSCALEENABLE)) + && state->render_states[WINED3D_RS_POINTSCALEENABLE]) state_pscale(context, state, STATE_RENDER(WINED3D_RS_POINTSCALEENABLE)); /* Update the position fixup. */ - context->load_constants = 1; + context->constant_update_mask |= WINED3D_SHADER_CONST_VS_POS_FIXUP; } -static void light(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +void light(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = context->gl_info; UINT Index = state_id - STATE_ACTIVELIGHT(0); @@ -4894,7 +4848,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st static void indexbuffer(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { - const struct wined3d_stream_info *stream_info = &context->swapchain->device->strided_streams; + const struct wined3d_stream_info *stream_info = &context->swapchain->device->stream_info; const struct wined3d_gl_info *gl_info = context->gl_info; if (!state->index_buffer || !stream_info->all_vbo) @@ -4982,55 +4936,53 @@ const struct StateEntryTemplate misc_state_template[] = { /* TODO: Move shader constant loading to vertex and fragment pipeline respectively, as soon as the pshader and * vshader loadings are untied from each other */ - { STATE_VERTEXSHADERCONSTANT, { STATE_VERTEXSHADERCONSTANT, shaderconstant }, WINED3D_GL_EXT_NONE }, - { STATE_PIXELSHADERCONSTANT, { STATE_VERTEXSHADERCONSTANT, NULL }, WINED3D_GL_EXT_NONE }, - { STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT00), { STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT00), shader_bumpenvmat }, WINED3D_GL_EXT_NONE }, + { STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT00), { STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT00), shader_bumpenv }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT01), { STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT10), { STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT11), { STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - { STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT00), { STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT00), shader_bumpenvmat }, WINED3D_GL_EXT_NONE }, + { STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT00), { STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT00), shader_bumpenv }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT01), { STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT10), { STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT11), { STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - { STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT00), { STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT00), shader_bumpenvmat }, WINED3D_GL_EXT_NONE }, + { STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT00), { STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT00), shader_bumpenv }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT01), { STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT10), { STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT11), { STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - { STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT00), { STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT00), shader_bumpenvmat }, WINED3D_GL_EXT_NONE }, + { STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT00), { STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT00), shader_bumpenv }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT01), { STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT10), { STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT11), { STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - { STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT00), { STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT00), shader_bumpenvmat }, WINED3D_GL_EXT_NONE }, + { STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT00), { STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT00), shader_bumpenv }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT01), { STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT10), { STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT11), { STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - { STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT00), { STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT00), shader_bumpenvmat }, WINED3D_GL_EXT_NONE }, + { STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT00), { STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT00), shader_bumpenv }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT01), { STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT10), { STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT11), { STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - { STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT00), { STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT00), shader_bumpenvmat }, WINED3D_GL_EXT_NONE }, + { STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT00), { STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT00), shader_bumpenv }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT01), { STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT10), { STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT11), { STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - { STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT00), { STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT00), shader_bumpenvmat }, WINED3D_GL_EXT_NONE }, + { STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT00), { STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT00), shader_bumpenv }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT01), { STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT10), { STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT11), { STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_MAT00), NULL }, WINED3D_GL_EXT_NONE }, - { STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_LSCALE), { STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_LSCALE), tex_bumpenvlscale }, WINED3D_GL_EXT_NONE }, + { STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_LSCALE), { STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_LSCALE), shader_bumpenv }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_LOFFSET), { STATE_TEXTURESTAGE(0, WINED3D_TSS_BUMPENV_LSCALE), NULL }, WINED3D_GL_EXT_NONE }, - { STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_LSCALE), { STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_LSCALE), tex_bumpenvlscale }, WINED3D_GL_EXT_NONE }, + { STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_LSCALE), { STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_LSCALE), shader_bumpenv }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_LOFFSET), { STATE_TEXTURESTAGE(1, WINED3D_TSS_BUMPENV_LSCALE), NULL }, WINED3D_GL_EXT_NONE }, - { STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_LSCALE), { STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_LSCALE), tex_bumpenvlscale }, WINED3D_GL_EXT_NONE }, + { STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_LSCALE), { STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_LSCALE), shader_bumpenv }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_LOFFSET), { STATE_TEXTURESTAGE(2, WINED3D_TSS_BUMPENV_LSCALE), NULL }, WINED3D_GL_EXT_NONE }, - { STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_LSCALE), { STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_LSCALE), tex_bumpenvlscale }, WINED3D_GL_EXT_NONE }, + { STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_LSCALE), { STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_LSCALE), shader_bumpenv }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_LOFFSET), { STATE_TEXTURESTAGE(3, WINED3D_TSS_BUMPENV_LSCALE), NULL }, WINED3D_GL_EXT_NONE }, - { STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_LSCALE), { STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_LSCALE), tex_bumpenvlscale }, WINED3D_GL_EXT_NONE }, + { STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_LSCALE), { STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_LSCALE), shader_bumpenv }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_LOFFSET), { STATE_TEXTURESTAGE(4, WINED3D_TSS_BUMPENV_LSCALE), NULL }, WINED3D_GL_EXT_NONE }, - { STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_LSCALE), { STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_LSCALE), tex_bumpenvlscale }, WINED3D_GL_EXT_NONE }, + { STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_LSCALE), { STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_LSCALE), shader_bumpenv }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_LOFFSET), { STATE_TEXTURESTAGE(5, WINED3D_TSS_BUMPENV_LSCALE), NULL }, WINED3D_GL_EXT_NONE }, - { STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_LSCALE), { STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_LSCALE), tex_bumpenvlscale }, WINED3D_GL_EXT_NONE }, + { STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_LSCALE), { STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_LSCALE), shader_bumpenv }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_LOFFSET), { STATE_TEXTURESTAGE(6, WINED3D_TSS_BUMPENV_LSCALE), NULL }, WINED3D_GL_EXT_NONE }, - { STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_LSCALE), { STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_LSCALE), tex_bumpenvlscale }, WINED3D_GL_EXT_NONE }, + { STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_LSCALE), { STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_LSCALE), shader_bumpenv }, WINED3D_GL_EXT_NONE }, { STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_LOFFSET), { STATE_TEXTURESTAGE(7, WINED3D_TSS_BUMPENV_LSCALE), NULL }, WINED3D_GL_EXT_NONE }, { STATE_VIEWPORT, { STATE_VIEWPORT, viewport_miscpart }, WINED3D_GL_EXT_NONE }, @@ -5158,7 +5110,8 @@ const struct StateEntryTemplate misc_state_template[] = { {0 /* Terminate */, { 0, 0 }, WINED3D_GL_EXT_NONE }, }; -const struct StateEntryTemplate ffp_vertexstate_template[] = { +const struct StateEntryTemplate vp_ffp_states[] = +{ { STATE_VDECL, { STATE_VDECL, vertexdeclaration }, WINED3D_GL_EXT_NONE }, { STATE_VSHADER, { STATE_VDECL, NULL }, WINED3D_GL_EXT_NONE }, { STATE_MATERIAL, { STATE_RENDER(WINED3D_RS_SPECULARENABLE), NULL }, WINED3D_GL_EXT_NONE }, @@ -5197,6 +5150,7 @@ const struct StateEntryTemplate ffp_vertexstate_template[] = { { STATE_CLIPPLANE(30), { STATE_CLIPPLANE(30), clipplane }, WINED3D_GL_EXT_NONE }, { STATE_CLIPPLANE(31), { STATE_CLIPPLANE(31), clipplane }, WINED3D_GL_EXT_NONE }, /* Lights */ + { STATE_LIGHT_TYPE, { STATE_LIGHT_TYPE, state_nop }, WINED3D_GL_EXT_NONE }, { STATE_ACTIVELIGHT(0), { STATE_ACTIVELIGHT(0), light }, WINED3D_GL_EXT_NONE }, { STATE_ACTIVELIGHT(1), { STATE_ACTIVELIGHT(1), light }, WINED3D_GL_EXT_NONE }, { STATE_ACTIVELIGHT(2), { STATE_ACTIVELIGHT(2), light }, WINED3D_GL_EXT_NONE }, @@ -5552,6 +5506,7 @@ const struct StateEntryTemplate ffp_vertexstate_template[] = { { STATE_SAMPLER(7), { 0, NULL }, ARB_TEXTURE_NON_POWER_OF_TWO }, { STATE_SAMPLER(7), { 0, NULL }, WINED3D_GL_NORMALIZED_TEXRECT }, { STATE_SAMPLER(7), { STATE_SAMPLER(7), sampler_texmatrix }, WINED3D_GL_EXT_NONE }, + { STATE_POINT_SIZE_ENABLE, { STATE_POINT_SIZE_ENABLE, state_nop }, WINED3D_GL_EXT_NONE }, {0 /* Terminate */, { 0, 0 }, WINED3D_GL_EXT_NONE }, }; @@ -5660,6 +5615,42 @@ static const struct StateEntryTemplate ffp_fragmentstate_template[] = { /* Context activation is done by the caller. */ static void ffp_enable(const struct wined3d_gl_info *gl_info, BOOL enable) {} +static void *ffp_alloc(const struct wined3d_shader_backend_ops *shader_backend, void *shader_priv) +{ + return shader_priv; +} + +static void ffp_free(struct wined3d_device *device) {} + +static void vp_ffp_get_caps(const struct wined3d_gl_info *gl_info, struct wined3d_vertex_caps *caps) +{ + caps->xyzrhw = FALSE; + caps->max_active_lights = gl_info->limits.lights; + caps->max_vertex_blend_matrices = gl_info->limits.blends; + caps->max_vertex_blend_matrix_index = 0; + caps->vertex_processing_caps = WINED3DVTXPCAPS_DIRECTIONALLIGHTS + | WINED3DVTXPCAPS_MATERIALSOURCE7 + | WINED3DVTXPCAPS_POSITIONALLIGHTS + | WINED3DVTXPCAPS_LOCALVIEWER + | WINED3DVTXPCAPS_VERTEXFOG + | WINED3DVTXPCAPS_TEXGEN + | WINED3DVTXPCAPS_TEXGEN_SPHEREMAP; + caps->fvf_caps = WINED3DFVFCAPS_PSIZE | 0x0008; /* 8 texture coords */ + caps->max_user_clip_planes = gl_info->limits.clipplanes; + caps->raster_caps = 0; + if (gl_info->supported[NV_FOG_DISTANCE]) + caps->raster_caps |= WINED3DPRASTERCAPS_FOGRANGE; +} + +const struct wined3d_vertex_pipe_ops ffp_vertex_pipe = +{ + ffp_enable, + vp_ffp_get_caps, + ffp_alloc, + ffp_free, + vp_ffp_states, +}; + static void ffp_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct fragment_caps *caps) { caps->wined3d_caps = 0; @@ -5701,12 +5692,6 @@ static void ffp_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct caps->MaxSimultaneousTextures = gl_info->limits.textures; } -static void *ffp_fragment_alloc(const struct wined3d_shader_backend_ops *shader_backend, void *shader_priv) -{ - return shader_priv; -} - -static void ffp_fragment_free(struct wined3d_device *device) {} static BOOL ffp_color_fixup_supported(struct color_fixup_desc fixup) { if (TRACE_ON(d3d)) @@ -5729,26 +5714,40 @@ static BOOL ffp_color_fixup_supported(struct color_fixup_desc fixup) const struct fragment_pipeline ffp_fragment_pipeline = { ffp_enable, ffp_fragment_get_caps, - ffp_fragment_alloc, - ffp_fragment_free, + ffp_alloc, + ffp_free, ffp_color_fixup_supported, ffp_fragmentstate_template, }; -static void fp_none_enable(const struct wined3d_gl_info *gl_info, BOOL enable) {} +static void none_enable(const struct wined3d_gl_info *gl_info, BOOL enable) {} + +static void *none_alloc(const struct wined3d_shader_backend_ops *shader_backend, void *shader_priv) +{ + return shader_priv; +} + +static void none_free(struct wined3d_device *device) {} + +static void vp_none_get_caps(const struct wined3d_gl_info *gl_info, struct wined3d_vertex_caps *caps) +{ + memset(caps, 0, sizeof(*caps)); +} + +const struct wined3d_vertex_pipe_ops none_vertex_pipe = +{ + none_enable, + vp_none_get_caps, + none_alloc, + none_free, + NULL, +}; static void fp_none_get_caps(const struct wined3d_gl_info *gl_info, struct fragment_caps *caps) { memset(caps, 0, sizeof(*caps)); } -static void *fp_none_alloc(const struct wined3d_shader_backend_ops *shader_backend, void *shader_priv) -{ - return shader_priv; -} - -static void fp_none_free(struct wined3d_device *device) {} - static BOOL fp_none_color_fixup_supported(struct color_fixup_desc fixup) { return is_identity_fixup(fixup); @@ -5756,10 +5755,10 @@ static BOOL fp_none_color_fixup_supported(struct color_fixup_desc fixup) const struct fragment_pipeline none_fragment_pipe = { - fp_none_enable, + none_enable, fp_none_get_caps, - fp_none_alloc, - fp_none_free, + none_alloc, + none_free, fp_none_color_fixup_supported, NULL, }; @@ -5784,11 +5783,12 @@ static void multistate_apply_3(struct wined3d_context *context, const struct win context->swapchain->device->multistate_funcs[state_id][2](context, state, state_id); } -static void prune_invalid_states(struct StateEntry *state_table, const struct wined3d_gl_info *gl_info) +static void prune_invalid_states(struct StateEntry *state_table, const struct wined3d_gl_info *gl_info, + const struct wined3d_d3d_info *d3d_info) { unsigned int start, last, i; - start = STATE_TEXTURESTAGE(gl_info->limits.texture_stages, 0); + start = STATE_TEXTURESTAGE(d3d_info->limits.ffp_blend_stages, 0); last = STATE_TEXTURESTAGE(MAX_TEXTURES - 1, WINED3D_HIGHEST_TEXTURE_STATE); for (i = start; i <= last; ++i) { @@ -5796,7 +5796,7 @@ static void prune_invalid_states(struct StateEntry *state_table, const struct wi state_table[i].apply = state_undefined; } - start = STATE_TRANSFORM(WINED3D_TS_TEXTURE0 + gl_info->limits.texture_stages); + start = STATE_TRANSFORM(WINED3D_TS_TEXTURE0 + d3d_info->limits.ffp_blend_stages); last = STATE_TRANSFORM(WINED3D_TS_TEXTURE0 + MAX_TEXTURES - 1); for (i = start; i <= last; ++i) { @@ -5841,17 +5841,17 @@ static void validate_state_table(struct StateEntry *state_table) STATE_VDECL, STATE_STREAMSRC, STATE_INDEXBUFFER, - STATE_VERTEXSHADERCONSTANT, - STATE_PIXELSHADERCONSTANT, STATE_VSHADER, STATE_GEOMETRY_SHADER, STATE_PIXELSHADER, STATE_VIEWPORT, + STATE_LIGHT_TYPE, STATE_SCISSORRECT, STATE_FRONTFACE, STATE_POINTSPRITECOORDORIGIN, STATE_BASEVERTEXINDEX, - STATE_FRAMEBUFFER + STATE_FRAMEBUFFER, + STATE_POINT_SIZE_ENABLE, }; unsigned int i, current; @@ -5901,8 +5901,9 @@ static void validate_state_table(struct StateEntry *state_table) } HRESULT compile_state_table(struct StateEntry *StateTable, APPLYSTATEFUNC **dev_multistate_funcs, - const struct wined3d_gl_info *gl_info, const struct StateEntryTemplate *vertex, - const struct fragment_pipeline *fragment, const struct StateEntryTemplate *misc) + const struct wined3d_gl_info *gl_info, const struct wined3d_d3d_info *d3d_info, + const struct wined3d_vertex_pipe_ops *vertex, const struct fragment_pipeline *fragment, + const struct StateEntryTemplate *misc) { unsigned int i, type, handlers; APPLYSTATEFUNC multistate_funcs[STATE_HIGHEST + 1][3]; @@ -5921,7 +5922,7 @@ HRESULT compile_state_table(struct StateEntry *StateTable, APPLYSTATEFUNC **dev_ switch(type) { case 0: cur = misc; break; case 1: cur = fragment->states; break; - case 2: cur = vertex; break; + case 2: cur = vertex->vp_states; break; default: cur = NULL; /* Stupid compiler */ } if(!cur) continue; @@ -5990,16 +5991,17 @@ HRESULT compile_state_table(struct StateEntry *StateTable, APPLYSTATEFUNC **dev_ cur[i].state, handlers + 1); } - if(StateTable[cur[i].state].representative && - StateTable[cur[i].state].representative != cur[i].content.representative) { - FIXME("State %u has different representatives in different pipeline parts\n", - cur[i].state); + if (StateTable[cur[i].state].representative + && StateTable[cur[i].state].representative != cur[i].content.representative) + { + FIXME("State %s (%#x) has different representatives in different pipeline parts.\n", + debug_d3dstate(cur[i].state), cur[i].state); } StateTable[cur[i].state].representative = cur[i].content.representative; } } - prune_invalid_states(StateTable, gl_info); + prune_invalid_states(StateTable, gl_info, d3d_info); validate_state_table(StateTable); return WINED3D_OK; diff --git a/dll/directx/wine/wined3d/stateblock.c b/dll/directx/wine/wined3d/stateblock.c index fe028d36456..1115544e2c2 100644 --- a/dll/directx/wine/wined3d/stateblock.c +++ b/dll/directx/wine/wined3d/stateblock.c @@ -194,40 +194,29 @@ static const DWORD vertex_states_sampler[] = */ static HRESULT stateblock_allocate_shader_constants(struct wined3d_stateblock *object) { - struct wined3d_device *device = object->device; - - /* Allocate space for floating point constants */ - object->state.ps_consts_f = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof(float) * device->d3d_pshader_constantF * 4); - if (!object->state.ps_consts_f) goto fail; + const struct wined3d_d3d_info *d3d_info = &object->device->adapter->d3d_info; object->changed.pixelShaderConstantsF = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof(BOOL) * device->d3d_pshader_constantF); + sizeof(BOOL) * d3d_info->limits.ps_uniform_count); if (!object->changed.pixelShaderConstantsF) goto fail; - object->state.vs_consts_f = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof(float) * device->d3d_vshader_constantF * 4); - if (!object->state.vs_consts_f) goto fail; - object->changed.vertexShaderConstantsF = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - sizeof(BOOL) * device->d3d_vshader_constantF); + sizeof(BOOL) * d3d_info->limits.vs_uniform_count); if (!object->changed.vertexShaderConstantsF) goto fail; object->contained_vs_consts_f = HeapAlloc(GetProcessHeap(), 0, - sizeof(DWORD) * device->d3d_vshader_constantF); + sizeof(DWORD) * d3d_info->limits.vs_uniform_count); if (!object->contained_vs_consts_f) goto fail; object->contained_ps_consts_f = HeapAlloc(GetProcessHeap(), 0, - sizeof(DWORD) * device->d3d_pshader_constantF); + sizeof(DWORD) * d3d_info->limits.ps_uniform_count); if (!object->contained_ps_consts_f) goto fail; return WINED3D_OK; fail: ERR("Failed to allocate memory\n"); - HeapFree(GetProcessHeap(), 0, object->state.ps_consts_f); HeapFree(GetProcessHeap(), 0, object->changed.pixelShaderConstantsF); - HeapFree(GetProcessHeap(), 0, object->state.vs_consts_f); HeapFree(GetProcessHeap(), 0, object->changed.vertexShaderConstantsF); HeapFree(GetProcessHeap(), 0, object->contained_vs_consts_f); HeapFree(GetProcessHeap(), 0, object->contained_ps_consts_f); @@ -330,7 +319,7 @@ static void stateblock_savedstates_set_vertex(struct wined3d_saved_states *state void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) { - struct wined3d_device *device = stateblock->device; + const struct wined3d_d3d_info *d3d_info = &stateblock->device->adapter->d3d_info; unsigned int i, j; for (i = 0; i <= WINEHIGHEST_RENDER_STATE >> 5; ++i) @@ -357,7 +346,7 @@ void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) } } - for (i = 0; i < device->d3d_vshader_constantF; ++i) + for (i = 0; i < d3d_info->limits.vs_uniform_count; ++i) { if (stateblock->changed.vertexShaderConstantsF[i]) { @@ -384,7 +373,7 @@ void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) } } - for (i = 0; i < device->d3d_pshader_constantF; ++i) + for (i = 0; i < d3d_info->limits.ps_uniform_count; ++i) { if (stateblock->changed.pixelShaderConstantsF[i]) { @@ -467,9 +456,8 @@ ULONG CDECL wined3d_stateblock_incref(struct wined3d_stateblock *stateblock) return refcount; } -void stateblock_unbind_resources(struct wined3d_stateblock *stateblock) +void state_unbind_resources(struct wined3d_state *state) { - struct wined3d_state *state = &stateblock->state; struct wined3d_vertex_declaration *decl; struct wined3d_sampler *sampler; struct wined3d_texture *texture; @@ -589,6 +577,50 @@ void stateblock_unbind_resources(struct wined3d_stateblock *stateblock) } } +void state_cleanup(struct wined3d_state *state) +{ + unsigned int counter; + + state_unbind_resources(state); + + for (counter = 0; counter < LIGHTMAP_SIZE; ++counter) + { + struct list *e1, *e2; + LIST_FOR_EACH_SAFE(e1, e2, &state->light_map[counter]) + { + struct wined3d_light_info *light = LIST_ENTRY(e1, struct wined3d_light_info, entry); + list_remove(&light->entry); + HeapFree(GetProcessHeap(), 0, light); + } + } + + HeapFree(GetProcessHeap(), 0, state->vs_consts_f); + HeapFree(GetProcessHeap(), 0, state->ps_consts_f); +} + +HRESULT state_init(struct wined3d_state *state, const struct wined3d_d3d_info *d3d_info) +{ + unsigned int i; + + for (i = 0; i < LIGHTMAP_SIZE; i++) + { + list_init(&state->light_map[i]); + } + + if (!(state->vs_consts_f = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + 4 * sizeof(float) * d3d_info->limits.vs_uniform_count))) + return E_OUTOFMEMORY; + + if (!(state->ps_consts_f = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, + 4 * sizeof(float) * d3d_info->limits.ps_uniform_count))) + { + HeapFree(GetProcessHeap(), 0, state->vs_consts_f); + return E_OUTOFMEMORY; + } + + return WINED3D_OK; +} + ULONG CDECL wined3d_stateblock_decref(struct wined3d_stateblock *stateblock) { ULONG refcount = InterlockedDecrement(&stateblock->ref); @@ -597,24 +629,9 @@ ULONG CDECL wined3d_stateblock_decref(struct wined3d_stateblock *stateblock) if (!refcount) { - int counter; + state_cleanup(&stateblock->state); - stateblock_unbind_resources(stateblock); - - for (counter = 0; counter < LIGHTMAP_SIZE; ++counter) - { - struct list *e1, *e2; - LIST_FOR_EACH_SAFE(e1, e2, &stateblock->state.light_map[counter]) - { - struct wined3d_light_info *light = LIST_ENTRY(e1, struct wined3d_light_info, entry); - list_remove(&light->entry); - HeapFree(GetProcessHeap(), 0, light); - } - } - - HeapFree(GetProcessHeap(), 0, stateblock->state.vs_consts_f); HeapFree(GetProcessHeap(), 0, stateblock->changed.vertexShaderConstantsF); - HeapFree(GetProcessHeap(), 0, stateblock->state.ps_consts_f); HeapFree(GetProcessHeap(), 0, stateblock->changed.pixelShaderConstantsF); HeapFree(GetProcessHeap(), 0, stateblock->contained_vs_consts_f); HeapFree(GetProcessHeap(), 0, stateblock->contained_ps_consts_f); @@ -683,7 +700,7 @@ static void wined3d_state_record_lights(struct wined3d_state *dst_state, const s void CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock) { - const struct wined3d_state *src_state = &stateblock->device->stateBlock->state; + const struct wined3d_state *src_state = &stateblock->device->state; unsigned int i; DWORD map; @@ -1073,8 +1090,15 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock) if (stateblock->changed.primitive_type) { - stateblock->device->updateStateBlock->changed.primitive_type = TRUE; - stateblock->device->updateStateBlock->state.gl_primitive_type = stateblock->state.gl_primitive_type; + GLenum gl_primitive_type, prev; + + if (device->recording) + device->recording->changed.primitive_type = TRUE; + gl_primitive_type = stateblock->state.gl_primitive_type; + prev = device->update_state->gl_primitive_type; + device->update_state->gl_primitive_type = gl_primitive_type; + if (gl_primitive_type != prev && (gl_primitive_type == GL_POINTS || prev == GL_POINTS)) + device_invalidate_state(device, STATE_POINT_SIZE_ENABLE); } if (stateblock->changed.indices) @@ -1131,12 +1155,12 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock) wined3d_device_set_clip_plane(device, i, &stateblock->state.clip_planes[i]); } - stateblock->device->stateBlock->state.lowest_disabled_stage = MAX_TEXTURES - 1; + stateblock->device->state.lowest_disabled_stage = MAX_TEXTURES - 1; for (i = 0; i < MAX_TEXTURES - 1; ++i) { - if (stateblock->device->stateBlock->state.texture_states[i][WINED3D_TSS_COLOR_OP] == WINED3D_TOP_DISABLE) + if (stateblock->device->state.texture_states[i][WINED3D_TSS_COLOR_OP] == WINED3D_TOP_DISABLE) { - stateblock->device->stateBlock->state.lowest_disabled_stage = i; + stateblock->device->state.lowest_disabled_stage = i; break; } } @@ -1144,11 +1168,9 @@ void CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblock) TRACE("Applied stateblock %p.\n", stateblock); } -void stateblock_init_default_state(struct wined3d_stateblock *stateblock) +void state_init_default(struct wined3d_state *state, struct wined3d_device *device) { - struct wined3d_device *device = stateblock->device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - struct wined3d_state *state = &stateblock->state; union { struct wined3d_line_pattern lp; @@ -1161,11 +1183,15 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock) unsigned int i; struct wined3d_swapchain *swapchain; struct wined3d_surface *backbuffer; + static const struct wined3d_matrix identity = + {{{ + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f, + }}}; - TRACE("stateblock %p.\n", stateblock); - - memset(stateblock->changed.pixelShaderConstantsF, 0, device->d3d_pshader_constantF * sizeof(BOOL)); - memset(stateblock->changed.vertexShaderConstantsF, 0, device->d3d_vshader_constantF * sizeof(BOOL)); + TRACE("state %p, device %p.\n", state, device); /* Set some of the defaults for lights, transforms etc */ state->transforms[WINED3D_TS_PROJECTION] = identity; @@ -1391,42 +1417,43 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock) static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, struct wined3d_device *device, enum wined3d_stateblock_type type) { - unsigned int i; HRESULT hr; + const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info; stateblock->ref = 1; stateblock->device = device; - for (i = 0; i < LIGHTMAP_SIZE; i++) + if (FAILED(hr = state_init(&stateblock->state, d3d_info))) + return hr; + + if (FAILED(hr = stateblock_allocate_shader_constants(stateblock))) { - list_init(&stateblock->state.light_map[i]); + state_cleanup(&stateblock->state); + return hr; } - hr = stateblock_allocate_shader_constants(stateblock); - if (FAILED(hr)) return hr; - - /* The WINED3D_SBT_INIT stateblock type is used during initialization to - * produce a placeholder stateblock so other functions called can update a - * state block. */ - if (type == WINED3D_SBT_INIT || type == WINED3D_SBT_RECORDED) return WINED3D_OK; + if (type == WINED3D_SBT_RECORDED) + return WINED3D_OK; TRACE("Updating changed flags appropriate for type %#x.\n", type); switch (type) { case WINED3D_SBT_ALL: - stateblock_init_lights(stateblock, device->stateBlock->state.light_map); - stateblock_savedstates_set_all(&stateblock->changed, device->d3d_vshader_constantF, - device->d3d_pshader_constantF); + stateblock_init_lights(stateblock, device->state.light_map); + stateblock_savedstates_set_all(&stateblock->changed, + d3d_info->limits.vs_uniform_count, d3d_info->limits.ps_uniform_count); break; case WINED3D_SBT_PIXEL_STATE: - stateblock_savedstates_set_pixel(&stateblock->changed, device->d3d_pshader_constantF); + stateblock_savedstates_set_pixel(&stateblock->changed, + d3d_info->limits.ps_uniform_count); break; case WINED3D_SBT_VERTEX_STATE: - stateblock_init_lights(stateblock, device->stateBlock->state.light_map); - stateblock_savedstates_set_vertex(&stateblock->changed, device->d3d_vshader_constantF); + stateblock_init_lights(stateblock, device->state.light_map); + stateblock_savedstates_set_vertex(&stateblock->changed, + d3d_info->limits.vs_uniform_count); break; default: diff --git a/dll/directx/wine/wined3d/surface.c b/dll/directx/wine/wined3d/surface.c index 12f29a472be..97e5541488d 100644 --- a/dll/directx/wine/wined3d/surface.c +++ b/dll/directx/wine/wined3d/surface.c @@ -6,7 +6,7 @@ * Copyright 2002-2003 Raphael Junqueira * Copyright 2004 Christian Costa * Copyright 2005 Oliver Stieber - * Copyright 2006-2011 Stefan Dösinger for CodeWeavers + * Copyright 2006-2011, 2013 Stefan Dösinger for CodeWeavers * Copyright 2007-2008 Henri Verbeet * Copyright 2006-2008 Roderick Colenbrander * Copyright 2009-2011 Henri Verbeet for CodeWeavers @@ -31,6 +31,7 @@ #include "wined3d_private.h" WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface); +WINE_DECLARE_DEBUG_CHANNEL(d3d_perf); WINE_DECLARE_DEBUG_CHANNEL(d3d); static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect, @@ -100,7 +101,7 @@ static void surface_cleanup(struct wined3d_surface *surface) } if (surface->flags & SFLAG_USERPTR) - wined3d_surface_set_mem(surface, NULL); + wined3d_surface_set_mem(surface, NULL, 0); if (surface->overlay_dest) list_remove(&surface->overlay_entry); @@ -123,14 +124,11 @@ void surface_update_draw_binding(struct wined3d_surface *surface) surface->draw_binding = SFLAG_INTEXTURE; } -void surface_set_container(struct wined3d_surface *surface, enum wined3d_container_type type, void *container) +void surface_set_swapchain(struct wined3d_surface *surface, struct wined3d_swapchain *swapchain) { - TRACE("surface %p, container %p.\n", surface, container); + TRACE("surface %p, swapchain %p.\n", surface, swapchain); - if (!container && type != WINED3D_CONTAINER_NONE) - ERR("Setting NULL container of type %#x.\n", type); - - if (type == WINED3D_CONTAINER_SWAPCHAIN) + if (swapchain) { surface->get_drawable_size = get_drawable_size_swapchain; } @@ -152,8 +150,33 @@ void surface_set_container(struct wined3d_surface *surface, enum wined3d_contain } } - surface->container.type = type; - surface->container.u.base = container; + surface->swapchain = swapchain; + surface_update_draw_binding(surface); +} + +void surface_set_container(struct wined3d_surface *surface, struct wined3d_texture *container) +{ + TRACE("surface %p, container %p.\n", surface, container); + + if (!surface->swapchain) + { + switch (wined3d_settings.offscreen_rendering_mode) + { + case ORM_FBO: + surface->get_drawable_size = get_drawable_size_fbo; + break; + + case ORM_BACKBUFFER: + surface->get_drawable_size = get_drawable_size_backbuffer; + break; + + default: + ERR("Unhandled offscreen rendering mode %#x.\n", wined3d_settings.offscreen_rendering_mode); + return; + } + } + + surface->container = container; surface_update_draw_binding(surface); } @@ -357,9 +380,9 @@ void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3 /* We changed the filtering settings on the texture. Inform the * container about this to get the filters reset properly next draw. */ - if (src_surface->container.type == WINED3D_CONTAINER_TEXTURE) + if (src_surface->container) { - struct wined3d_texture *texture = src_surface->container.u.texture; + struct wined3d_texture *texture = src_surface->container; texture->texture_rgb.states[WINED3DTEXSTA_MAGFILTER] = WINED3D_TEXF_POINT; texture->texture_rgb.states[WINED3DTEXSTA_MINFILTER] = WINED3D_TEXF_POINT; texture->texture_rgb.states[WINED3DTEXSTA_MIPFILTER] = WINED3D_TEXF_NONE; @@ -549,8 +572,8 @@ static void surface_load_pbo(struct wined3d_surface *surface, const struct wined /* We don't need the system memory anymore and we can't even use it for PBOs. */ if (!(surface->flags & SFLAG_CLIENT)) { - HeapFree(GetProcessHeap(), 0, surface->resource.heapMemory); - surface->resource.heapMemory = NULL; + wined3d_resource_free_sysmem(surface->resource.heap_memory); + surface->resource.heap_memory = NULL; } surface->resource.allocatedMemory = NULL; surface->flags |= SFLAG_PBO; @@ -569,11 +592,10 @@ static void surface_prepare_system_memory(struct wined3d_surface *surface) { /* Whatever surface we have, make sure that there is memory allocated * for the downloaded copy, or a PBO to map. */ - if (!surface->resource.heapMemory) - surface->resource.heapMemory = HeapAlloc(GetProcessHeap(), 0, surface->resource.size + RESOURCE_ALIGNMENT); + if (!surface->resource.heap_memory) + surface->resource.heap_memory = wined3d_resource_allocate_sysmem(surface->resource.size); - surface->resource.allocatedMemory = (BYTE *)(((ULONG_PTR)surface->resource.heapMemory - + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1)); + surface->resource.allocatedMemory = surface->resource.heap_memory; if (surface->flags & SFLAG_INSYSMEM) ERR("Surface without memory or PBO has SFLAG_INSYSMEM set.\n"); @@ -585,9 +607,9 @@ static void surface_evict_sysmem(struct wined3d_surface *surface) if (surface->resource.map_count || (surface->flags & SFLAG_DONOTFREE)) return; - HeapFree(GetProcessHeap(), 0, surface->resource.heapMemory); + wined3d_resource_free_sysmem(surface->resource.heap_memory); surface->resource.allocatedMemory = NULL; - surface->resource.heapMemory = NULL; + surface->resource.heap_memory = NULL; surface_modify_location(surface, SFLAG_INSYSMEM, FALSE); } @@ -596,9 +618,9 @@ static void surface_bind(struct wined3d_surface *surface, struct wined3d_context { TRACE("surface %p, context %p, srgb %#x.\n", surface, context, srgb); - if (surface->container.type == WINED3D_CONTAINER_TEXTURE) + if (surface->container) { - struct wined3d_texture *texture = surface->container.u.texture; + struct wined3d_texture *texture = surface->container; TRACE("Passing to container (%p).\n", texture); texture->texture_ops->texture_bind(texture, context, srgb); @@ -671,7 +693,6 @@ static void surface_release_client_storage(struct wined3d_surface *surface) struct wined3d_context *context = context_acquire(surface->resource.device, NULL); const struct wined3d_gl_info *gl_info = context->gl_info; - gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE); if (surface->texture_name) { surface_bind_and_dirtify(surface, context, FALSE); @@ -684,7 +705,6 @@ static void surface_release_client_storage(struct wined3d_surface *surface) gl_info->gl_ops.gl.p_glTexImage2D(surface->texture_target, surface->texture_level, GL_RGB, 1, 1, 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); } - gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE); context_release(context); @@ -762,24 +782,6 @@ static HRESULT surface_private_setup(struct wined3d_surface *surface) TRACE("Creating an oversized surface: %ux%u.\n", surface->pow2Width, surface->pow2Height); } - else - { - /* Don't use ARB_TEXTURE_RECTANGLE in case the surface format is P8 - * and EXT_PALETTED_TEXTURE is used in combination with texture - * uploads (RTL_READTEX/RTL_TEXTEX). The reason is that - * EXT_PALETTED_TEXTURE doesn't work in combination with - * ARB_TEXTURE_RECTANGLE. */ - if (surface->flags & SFLAG_NONPOW2 && gl_info->supported[ARB_TEXTURE_RECTANGLE] - && !(surface->resource.format->id == WINED3DFMT_P8_UINT - && gl_info->supported[EXT_PALETTED_TEXTURE] - && wined3d_settings.rendertargetlock_mode == RTL_READTEX)) - { - surface->texture_target = GL_TEXTURE_RECTANGLE_ARB; - surface->pow2Width = surface->resource.width; - surface->pow2Height = surface->resource.height; - surface->flags &= ~(SFLAG_NONPOW2 | SFLAG_NORMCOORD); - } - } switch (wined3d_settings.offscreen_rendering_mode) { @@ -893,6 +895,9 @@ static void surface_map(struct wined3d_surface *surface, const RECT *rect, DWORD } else { + if (surface->resource.usage & WINED3DUSAGE_DYNAMIC) + WARN_(d3d_perf)("Mapping a dynamic surface without WINED3D_MAP_DISCARD.\n"); + /* surface_load_location() does not check if the rectangle specifies * the full surface. Most callers don't need that, so do it here. */ if (rect && !rect->top && !rect->left @@ -984,8 +989,7 @@ static void surface_unmap(struct wined3d_surface *surface) goto done; } - if (surface->container.type == WINED3D_CONTAINER_SWAPCHAIN - && surface->container.u.swapchain->front_buffer == surface) + if (surface->swapchain && surface->swapchain->front_buffer == surface) { if (!surface->dirtyRect.left && !surface->dirtyRect.top && surface->dirtyRect.right == surface->resource.width @@ -1040,17 +1044,20 @@ static BOOL surface_is_full_rect(const struct wined3d_surface *surface, const RE return TRUE; } -static void wined3d_surface_depth_blt_fbo(const struct wined3d_device *device, struct wined3d_surface *src_surface, - const RECT *src_rect, struct wined3d_surface *dst_surface, const RECT *dst_rect) +static void surface_depth_blt_fbo(const struct wined3d_device *device, + struct wined3d_surface *src_surface, DWORD src_location, const RECT *src_rect, + struct wined3d_surface *dst_surface, DWORD dst_location, const RECT *dst_rect) { const struct wined3d_gl_info *gl_info; struct wined3d_context *context; DWORD src_mask, dst_mask; GLbitfield gl_mask; - TRACE("device %p, src_surface %p, src_rect %s, dst_surface %p, dst_rect %s.\n", - device, src_surface, wine_dbgstr_rect(src_rect), - dst_surface, wine_dbgstr_rect(dst_rect)); + TRACE("device %p\n", device); + TRACE("src_surface %p, src_location %s, src_rect %s,\n", + src_surface, debug_surflocation(src_location), wine_dbgstr_rect(src_rect)); + TRACE("dst_surface %p, dst_location %s, dst_rect %s.\n", + dst_surface, debug_surflocation(dst_location), wine_dbgstr_rect(dst_rect)); src_mask = src_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL); dst_mask = dst_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL); @@ -1078,9 +1085,9 @@ static void wined3d_surface_depth_blt_fbo(const struct wined3d_device *device, s /* Make sure the locations are up-to-date. Loading the destination * surface isn't required if the entire surface is overwritten. */ - surface_load_location(src_surface, SFLAG_INTEXTURE, NULL); + surface_load_location(src_surface, src_location, NULL); if (!surface_is_full_rect(dst_surface, dst_rect)) - surface_load_location(dst_surface, SFLAG_INTEXTURE, NULL); + surface_load_location(dst_surface, dst_location, NULL); context = context_acquire(device, NULL); if (!context->valid) @@ -1092,12 +1099,10 @@ static void wined3d_surface_depth_blt_fbo(const struct wined3d_device *device, s gl_info = context->gl_info; - context_apply_fbo_state_blit(context, GL_READ_FRAMEBUFFER, NULL, src_surface, SFLAG_INTEXTURE); - gl_info->gl_ops.gl.p_glReadBuffer(GL_NONE); - checkGLcall("glReadBuffer()"); + context_apply_fbo_state_blit(context, GL_READ_FRAMEBUFFER, NULL, src_surface, src_location); context_check_fbo_status(context, GL_READ_FRAMEBUFFER); - context_apply_fbo_state_blit(context, GL_DRAW_FRAMEBUFFER, NULL, dst_surface, SFLAG_INTEXTURE); + context_apply_fbo_state_blit(context, GL_DRAW_FRAMEBUFFER, NULL, dst_surface, dst_location); context_set_draw_buffer(context, GL_NONE); context_check_fbo_status(context, GL_DRAW_FRAMEBUFFER); context_invalidate_state(context, STATE_FRAMEBUFFER); @@ -1243,7 +1248,7 @@ static void surface_blt_fbo(const struct wined3d_device *device, enum wined3d_te if (wined3d_settings.strict_draw_ordering || (dst_location == SFLAG_INDRAWABLE - && dst_surface->container.u.swapchain->front_buffer == dst_surface)) + && dst_surface->swapchain->front_buffer == dst_surface)) gl_info->gl_ops.gl.p_glFlush(); context_release(context); @@ -1404,8 +1409,8 @@ static HRESULT wined3d_surface_depth_fill(struct wined3d_surface *surface, const return blitter->depth_fill(device, surface, rect, depth); } -static HRESULT wined3d_surface_depth_blt(struct wined3d_surface *src_surface, const RECT *src_rect, - struct wined3d_surface *dst_surface, const RECT *dst_rect) +static HRESULT wined3d_surface_depth_blt(struct wined3d_surface *src_surface, DWORD src_location, const RECT *src_rect, + struct wined3d_surface *dst_surface, DWORD dst_location, const RECT *dst_rect) { struct wined3d_device *device = src_surface->resource.device; @@ -1414,9 +1419,9 @@ static HRESULT wined3d_surface_depth_blt(struct wined3d_surface *src_surface, co dst_rect, dst_surface->resource.usage, dst_surface->resource.pool, dst_surface->resource.format)) return WINED3DERR_INVALIDCALL; - wined3d_surface_depth_blt_fbo(device, src_surface, src_rect, dst_surface, dst_rect); + surface_depth_blt_fbo(device, src_surface, src_location, src_rect, dst_surface, dst_location, dst_rect); - surface_modify_ds_location(dst_surface, SFLAG_INTEXTURE, + surface_modify_ds_location(dst_surface, dst_location, dst_surface->ds_current_size.cx, dst_surface->ds_current_size.cy); return WINED3D_OK; @@ -1548,25 +1553,22 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC * locking them. */ if (dst_surface->flags & SFLAG_CONVERTED) { - WARN("Converted surface, using CPU blit.\n"); + WARN_(d3d_perf)("Converted surface, using CPU blit.\n"); return surface_cpu_blt(dst_surface, &dst_rect, src_surface, &src_rect, flags, fx, filter); } if (flags & ~simple_blit) { - WARN("Using fallback for complex blit (%#x).\n", flags); + WARN_(d3d_perf)("Using fallback for complex blit (%#x).\n", flags); goto fallback; } - if (src_surface && src_surface->container.type == WINED3D_CONTAINER_SWAPCHAIN) - src_swapchain = src_surface->container.u.swapchain; + if (src_surface) + src_swapchain = src_surface->swapchain; else src_swapchain = NULL; - if (dst_surface->container.type == WINED3D_CONTAINER_SWAPCHAIN) - dst_swapchain = dst_surface->container.u.swapchain; - else - dst_swapchain = NULL; + dst_swapchain = dst_surface->swapchain; /* This isn't strictly needed. FBO blits for example could deal with * cross-swapchain blits by first downloading the source to a texture @@ -1612,7 +1614,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC return WINED3DERR_INVALIDCALL; } - if (SUCCEEDED(wined3d_surface_depth_blt(src_surface, &src_rect, dst_surface, &dst_rect))) + if (SUCCEEDED(wined3d_surface_depth_blt(src_surface, src_surface->draw_binding, &src_rect, + dst_surface, dst_surface->draw_binding, &dst_rect))) return WINED3D_OK; } } @@ -1756,14 +1759,13 @@ static void surface_remove_pbo(struct wined3d_surface *surface, const struct win } else { - if (!surface->resource.heapMemory) - surface->resource.heapMemory = HeapAlloc(GetProcessHeap(), 0, surface->resource.size + RESOURCE_ALIGNMENT); + if (!surface->resource.heap_memory) + surface->resource.heap_memory = wined3d_resource_allocate_sysmem(surface->resource.size); else if (!(surface->flags & SFLAG_CLIENT)) - ERR("Surface %p has heapMemory %p and flags %#x.\n", - surface, surface->resource.heapMemory, surface->flags); + ERR("Surface %p has heap_memory %p and flags %#x.\n", + surface, surface->resource.heap_memory, surface->flags); - surface->resource.allocatedMemory = (BYTE *)(((ULONG_PTR)surface->resource.heapMemory - + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1)); + surface->resource.allocatedMemory = surface->resource.heap_memory; } GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->pbo)); @@ -1782,10 +1784,10 @@ static BOOL surface_init_sysmem(struct wined3d_surface *surface) { if (!surface->resource.allocatedMemory) { - if (!surface->resource.heapMemory) + if (!surface->resource.heap_memory) { - if (!(surface->resource.heapMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - surface->resource.size + RESOURCE_ALIGNMENT))) + surface->resource.heap_memory = wined3d_resource_allocate_sysmem(surface->resource.size); + if (!surface->resource.heap_memory) { ERR("Failed to allocate memory.\n"); return FALSE; @@ -1793,12 +1795,11 @@ static BOOL surface_init_sysmem(struct wined3d_surface *surface) } else if (!(surface->flags & SFLAG_CLIENT)) { - ERR("Surface %p has heapMemory %p and flags %#x.\n", - surface, surface->resource.heapMemory, surface->flags); + ERR("Surface %p has heap_memory %p and flags %#x.\n", + surface, surface->resource.heap_memory, surface->flags); } - surface->resource.allocatedMemory = - (BYTE *)(((ULONG_PTR)surface->resource.heapMemory + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1)); + surface->resource.allocatedMemory = surface->resource.heap_memory; } else { @@ -1873,7 +1874,7 @@ static void surface_unload(struct wined3d_resource *resource) /* If we're in a texture, the texture name belongs to the texture. * Otherwise, destroy it. */ - if (surface->container.type != WINED3D_CONTAINER_TEXTURE) + if (!surface->container) { gl_info->gl_ops.gl.p_glDeleteTextures(1, &surface->texture_name); surface->texture_name = 0; @@ -1941,8 +1942,8 @@ static HRESULT gdi_surface_private_setup(struct wined3d_surface *surface) hr = surface_create_dib_section(surface); if (SUCCEEDED(hr)) { - HeapFree(GetProcessHeap(), 0, surface->resource.heapMemory); - surface->resource.heapMemory = NULL; + wined3d_resource_free_sysmem(surface->resource.heap_memory); + surface->resource.heap_memory = NULL; surface->resource.allocatedMemory = surface->dib.bitmap_data; } @@ -1981,14 +1982,8 @@ static void gdi_surface_realize_palette(struct wined3d_surface *surface) /* Update the image because of the palette change. Some games like e.g. * Red Alert call SetEntries a lot to implement fading. */ /* Tell the swapchain to update the screen. */ - if (surface->container.type == WINED3D_CONTAINER_SWAPCHAIN) - { - struct wined3d_swapchain *swapchain = surface->container.u.swapchain; - if (surface == swapchain->front_buffer) - { - x11_copy_to_screen(swapchain, NULL); - } - } + if (surface->swapchain && surface == surface->swapchain->front_buffer) + x11_copy_to_screen(surface->swapchain, NULL); } static void gdi_surface_map(struct wined3d_surface *surface, const RECT *rect, DWORD flags) @@ -2007,8 +2002,8 @@ static void gdi_surface_map(struct wined3d_surface *surface, const RECT *rect, D ERR("Failed to create dib section, hr %#x.\n", hr); return; } - HeapFree(GetProcessHeap(), 0, surface->resource.heapMemory); - surface->resource.heapMemory = NULL; + wined3d_resource_free_sysmem(surface->resource.heap_memory); + surface->resource.heap_memory = NULL; surface->resource.allocatedMemory = surface->dib.bitmap_data; } } @@ -2018,14 +2013,8 @@ static void gdi_surface_unmap(struct wined3d_surface *surface) TRACE("surface %p.\n", surface); /* Tell the swapchain to update the screen. */ - if (surface->container.type == WINED3D_CONTAINER_SWAPCHAIN) - { - struct wined3d_swapchain *swapchain = surface->container.u.swapchain; - if (surface == swapchain->front_buffer) - { - x11_copy_to_screen(swapchain, &surface->lockedRect); - } - } + if (surface->swapchain && surface == surface->swapchain->front_buffer) + x11_copy_to_screen(surface->swapchain, &surface->lockedRect); memset(&surface->lockedRect, 0, sizeof(RECT)); } @@ -2234,12 +2223,11 @@ static void surface_download_data(struct wined3d_surface *surface, const struct src_data = mem; dst_data = surface->resource.allocatedMemory; TRACE("(%p) : Repacking the surface data from pitch %d to pitch %d\n", surface, src_pitch, dst_pitch); - for (y = 1; y < surface->resource.height; ++y) + for (y = 0; y < surface->resource.height; ++y) { - /* skip the first row */ + memcpy(dst_data, src_data, dst_pitch); src_data += src_pitch; dst_data += dst_pitch; - memcpy(dst_data, src_data, dst_pitch); } HeapFree(GetProcessHeap(), 0, mem); @@ -2284,7 +2272,7 @@ static void surface_upload_data(struct wined3d_surface *surface, const struct wi if (format->flags & WINED3DFMT_FLAG_COMPRESSED) { - UINT row_length = wined3d_format_calculate_size(format, 1, update_w, 1); + UINT row_length = wined3d_format_calculate_size(format, 1, update_w, 1, 1); UINT row_count = (update_h + format->block_height - 1) / format->block_height; const BYTE *addr = data->addr; GLenum internal; @@ -2393,7 +2381,7 @@ static HRESULT d3dfmt_get_conv(const struct wined3d_surface *surface, BOOL need_ &rect, surface->resource.usage, surface->resource.pool, surface->resource.format, &rect, surface->resource.usage, surface->resource.pool, surface->resource.format); #endif - blit_supported = gl_info->supported[EXT_PALETTED_TEXTURE] || gl_info->supported[ARB_FRAGMENT_PROGRAM]; + blit_supported = gl_info->supported[ARB_FRAGMENT_PROGRAM]; /* Use conversion when the blit_shader backend supports it. It only supports this in case of * texturing. Further also use conversion in case of color keying. @@ -2631,7 +2619,7 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P static void surface_allocate_surface(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, const struct wined3d_format *format, BOOL srgb) { - BOOL enable_client_storage = FALSE; + BOOL disable_client_storage = FALSE; GLsizei width = surface->pow2Width; GLsizei height = surface->pow2Height; const BYTE *mem = NULL; @@ -2674,10 +2662,7 @@ static void surface_allocate_surface(struct wined3d_surface *surface, const stru * SFLAG_CONVERTED: The conversion destination memory is freed after loading the surface * allocatedMemory == NULL: Not defined in the extension. Seems to disable client storage effectively */ - gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE); - checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE)"); surface->flags &= ~SFLAG_CLIENT; - enable_client_storage = TRUE; } else { @@ -2685,9 +2670,12 @@ static void surface_allocate_surface(struct wined3d_surface *surface, const stru /* Point OpenGL to our allocated texture memory. Do not use * resource.allocatedMemory here because it might point into a - * PBO. Instead use heapMemory, but get the alignment right. */ - mem = (BYTE *)(((ULONG_PTR)surface->resource.heapMemory - + (RESOURCE_ALIGNMENT - 1)) & ~(RESOURCE_ALIGNMENT - 1)); + * PBO. Instead use heap_memory. */ + mem = surface->resource.heap_memory; + + gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE); + checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE)"); + disable_client_storage = TRUE; } } @@ -2704,10 +2692,10 @@ static void surface_allocate_surface(struct wined3d_surface *surface, const stru checkGLcall("glTexImage2D"); } - if (enable_client_storage) + if (disable_client_storage) { - gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE); - checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE)"); + gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE); + checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE)"); } } @@ -2780,11 +2768,11 @@ void surface_set_compatible_renderbuffer(struct wined3d_surface *surface, const GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) { - const struct wined3d_swapchain *swapchain = surface->container.u.swapchain; + const struct wined3d_swapchain *swapchain = surface->swapchain; TRACE("surface %p.\n", surface); - if (surface->container.type != WINED3D_CONTAINER_SWAPCHAIN) + if (!swapchain) { ERR("Surface %p is not on a swapchain.\n", surface); return GL_NONE; @@ -2836,10 +2824,10 @@ void surface_add_dirty_rect(struct wined3d_surface *surface, const struct wined3 } /* if the container is a texture then mark it dirty. */ - if (surface->container.type == WINED3D_CONTAINER_TEXTURE) + if (surface->container) { TRACE("Passing to container.\n"); - wined3d_texture_set_dirty(surface->container.u.texture, TRUE); + wined3d_texture_set_dirty(surface->container, TRUE); } } @@ -2961,22 +2949,14 @@ ULONG CDECL wined3d_surface_incref(struct wined3d_surface *surface) { ULONG refcount; - TRACE("Surface %p, container %p of type %#x.\n", - surface, surface->container.u.base, surface->container.type); + TRACE("surface %p, swapchain %p, container %p.\n", + surface, surface->swapchain, surface->container); - switch (surface->container.type) - { - case WINED3D_CONTAINER_TEXTURE: - return wined3d_texture_incref(surface->container.u.texture); + if (surface->swapchain) + return wined3d_swapchain_incref(surface->swapchain); - case WINED3D_CONTAINER_SWAPCHAIN: - return wined3d_swapchain_incref(surface->container.u.swapchain); - - default: - ERR("Unhandled container type %#x.\n", surface->container.type); - case WINED3D_CONTAINER_NONE: - break; - } + if (surface->container) + return wined3d_texture_incref(surface->container); refcount = InterlockedIncrement(&surface->resource.ref); TRACE("%p increasing refcount to %u.\n", surface, refcount); @@ -2989,22 +2969,14 @@ ULONG CDECL wined3d_surface_decref(struct wined3d_surface *surface) { ULONG refcount; - TRACE("Surface %p, container %p of type %#x.\n", - surface, surface->container.u.base, surface->container.type); + TRACE("surface %p, swapchain %p, container %p.\n", + surface, surface->swapchain, surface->container); - switch (surface->container.type) - { - case WINED3D_CONTAINER_TEXTURE: - return wined3d_texture_decref(surface->container.u.texture); + if (surface->swapchain) + return wined3d_swapchain_decref(surface->swapchain); - case WINED3D_CONTAINER_SWAPCHAIN: - return wined3d_swapchain_decref(surface->container.u.swapchain); - - default: - ERR("Unhandled container type %#x.\n", surface->container.type); - case WINED3D_CONTAINER_NONE: - break; - } + if (surface->container) + return wined3d_texture_decref(surface->container); refcount = InterlockedDecrement(&surface->resource.ref); TRACE("%p decreasing refcount to %u.\n", surface, refcount); @@ -3206,6 +3178,9 @@ DWORD CDECL wined3d_surface_get_pitch(const struct wined3d_surface *surface) TRACE("surface %p.\n", surface); + if (surface->pitch) + return surface->pitch; + if (format->flags & WINED3DFMT_FLAG_BLOCKS) { /* Since compressed formats are block based, pitch means the amount of @@ -3225,7 +3200,7 @@ DWORD CDECL wined3d_surface_get_pitch(const struct wined3d_surface *surface) return pitch; } -HRESULT CDECL wined3d_surface_set_mem(struct wined3d_surface *surface, void *mem) +HRESULT CDECL wined3d_surface_set_mem(struct wined3d_surface *surface, void *mem, UINT pitch) { TRACE("surface %p, mem %p.\n", surface, mem); @@ -3258,8 +3233,8 @@ HRESULT CDECL wined3d_surface_set_mem(struct wined3d_surface *surface, void *mem } else if (!(surface->flags & SFLAG_USERPTR)) { - release = surface->resource.heapMemory; - surface->resource.heapMemory = NULL; + release = surface->resource.heap_memory; + surface->resource.heap_memory = NULL; } surface->resource.allocatedMemory = mem; surface->flags |= SFLAG_USERPTR; @@ -3272,12 +3247,12 @@ HRESULT CDECL wined3d_surface_set_mem(struct wined3d_surface *surface, void *mem surface_release_client_storage(surface); /* Now free the old memory if any. */ - HeapFree(GetProcessHeap(), 0, release); + wined3d_resource_free_sysmem(release); } else if (surface->flags & SFLAG_USERPTR) { - /* HeapMemory should be NULL already. */ - if (surface->resource.heapMemory) + /* heap_memory should be NULL already. */ + if (surface->resource.heap_memory) ERR("User pointer surface has heap memory allocated.\n"); if (!mem) @@ -3294,6 +3269,8 @@ HRESULT CDECL wined3d_surface_set_mem(struct wined3d_surface *surface, void *mem surface_modify_location(surface, SFLAG_INSYSMEM, TRUE); } + surface->pitch = pitch; + return WINED3D_OK; } @@ -3438,7 +3415,7 @@ HRESULT CDECL wined3d_surface_update_desc(struct wined3d_surface *surface, struct wined3d_device *device = surface->resource.device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; const struct wined3d_format *format = wined3d_get_format(gl_info, format_id); - UINT resource_size = wined3d_format_calculate_size(format, device->surface_alignment, width, height); + UINT resource_size = wined3d_format_calculate_size(format, device->surface_alignment, width, height, 1); TRACE("surface %p, width %u, height %u, format %s, multisample_type %#x, multisample_quality %u.\n", surface, width, height, debug_d3dformat(format_id), multisample_type, multisample_type); @@ -3459,8 +3436,8 @@ HRESULT CDECL wined3d_surface_update_desc(struct wined3d_surface *surface, surface->flags &= ~(SFLAG_LOCATIONS | SFLAG_USERPTR); surface->resource.allocatedMemory = NULL; - HeapFree(GetProcessHeap(), 0, surface->resource.heapMemory); - surface->resource.heapMemory = NULL; + wined3d_resource_free_sysmem(surface->resource.heap_memory); + surface->resource.heap_memory = NULL; surface->resource.width = width; surface->resource.height = height; @@ -3759,7 +3736,7 @@ static HRESULT _Blt_ColorFill(BYTE *buf, unsigned int width, unsigned int height unsigned int bpp, UINT pitch, DWORD color) { BYTE *first; - int x, y; + unsigned int x, y; /* Do first row */ @@ -3956,8 +3933,8 @@ HRESULT CDECL wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc) /* Use the DIB section from now on if we are not using a PBO. */ if (!(surface->flags & (SFLAG_PBO | SFLAG_PIN_SYSMEM))) { - HeapFree(GetProcessHeap(), 0, surface->resource.heapMemory); - surface->resource.heapMemory = NULL; + wined3d_resource_free_sysmem(surface->resource.heap_memory); + surface->resource.heap_memory = NULL; surface->resource.allocatedMemory = surface->dib.bitmap_data; } } @@ -4059,7 +4036,7 @@ HRESULT CDECL wined3d_surface_flip(struct wined3d_surface *surface, struct wined WARN("Ignoring flags %#x.\n", flags); } - if (surface->container.type == WINED3D_CONTAINER_SWAPCHAIN) + if (surface->swapchain) { ERR("Not supported on swapchain surfaces.\n"); return WINEDDERR_NOTFLIPPABLE; @@ -4088,9 +4065,9 @@ void surface_internal_preload(struct wined3d_surface *surface, enum WINED3DSRGB TRACE("iface %p, srgb %#x.\n", surface, srgb); - if (surface->container.type == WINED3D_CONTAINER_TEXTURE) + if (surface->container) { - struct wined3d_texture *texture = surface->container.u.texture; + struct wined3d_texture *texture = surface->container; TRACE("Passing to container (%p).\n", texture); texture->texture_ops->texture_preload(texture, srgb); @@ -4416,9 +4393,9 @@ static void surface_prepare_texture_internal(struct wined3d_surface *surface, /* Context activation is done by the caller. */ void surface_prepare_texture(struct wined3d_surface *surface, struct wined3d_context *context, BOOL srgb) { - if (surface->container.type == WINED3D_CONTAINER_TEXTURE) + if (surface->container) { - struct wined3d_texture *texture = surface->container.u.texture; + struct wined3d_texture *texture = surface->container; UINT sub_count = texture->level_count * texture->layer_count; UINT i; @@ -4462,77 +4439,6 @@ void surface_prepare_rb(struct wined3d_surface *surface, const struct wined3d_gl } } -static void flush_to_framebuffer_drawpixels(struct wined3d_surface *surface, - const RECT *rect, GLenum fmt, GLenum type, UINT bpp, const BYTE *mem) -{ - struct wined3d_device *device = surface->resource.device; - UINT pitch = wined3d_surface_get_pitch(surface); - const struct wined3d_gl_info *gl_info; - struct wined3d_context *context; - RECT local_rect; - UINT w, h; - - surface_get_rect(surface, rect, &local_rect); - - mem += local_rect.top * pitch + local_rect.left * bpp; - w = local_rect.right - local_rect.left; - h = local_rect.bottom - local_rect.top; - - /* Activate the correct context for the render target */ - context = context_acquire(device, surface); - context_apply_blit_state(context, device); - gl_info = context->gl_info; - - if (!surface_is_offscreen(surface)) - { - GLenum buffer = surface_get_gl_buffer(surface); - TRACE("Unlocking %#x buffer.\n", buffer); - context_set_draw_buffer(context, buffer); - - surface_translate_drawable_coords(surface, context->win_handle, &local_rect); - gl_info->gl_ops.gl.p_glPixelZoom(1.0f, -1.0f); - } - else - { - /* Primary offscreen render target */ - TRACE("Offscreen render target.\n"); - context_set_draw_buffer(context, device->offscreenBuffer); - - gl_info->gl_ops.gl.p_glPixelZoom(1.0f, 1.0f); - } - - gl_info->gl_ops.gl.p_glRasterPos3i(local_rect.left, local_rect.top, 1); - checkGLcall("glRasterPos3i"); - - /* If not fullscreen, we need to skip a number of bytes to find the next row of data */ - gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_ROW_LENGTH, surface->resource.width); - - if (surface->flags & SFLAG_PBO) - { - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->pbo)); - checkGLcall("glBindBufferARB"); - } - - gl_info->gl_ops.gl.p_glDrawPixels(w, h, fmt, type, mem); - checkGLcall("glDrawPixels"); - - if (surface->flags & SFLAG_PBO) - { - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); - checkGLcall("glBindBufferARB"); - } - - gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); - checkGLcall("glPixelStorei(GL_UNPACK_ROW_LENGTH, 0)"); - - if (wined3d_settings.strict_draw_ordering - || (surface->container.type == WINED3D_CONTAINER_SWAPCHAIN - && surface->container.u.swapchain->front_buffer == surface)) - gl_info->gl_ops.gl.p_glFlush(); - - context_release(context); -} - static BOOL color_in_range(const struct wined3d_color_key *color_key, DWORD color) { /* FIXME: Is this really how color keys are supposed to work? I think it @@ -4557,7 +4463,7 @@ void d3dfmt_p8_init_palette(const struct wined3d_surface *surface, BYTE table[25 if (!pal) { - ERR("This code should never get entered for DirectDraw!, expect problems\n"); + FIXME("No palette set.\n"); if (index_in_alpha) { /* Guarantees that memory representation remains correct after sysmem<->texture transfers even if @@ -4787,9 +4693,9 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back) front->resource.allocatedMemory = back->resource.allocatedMemory; back->resource.allocatedMemory = tmp; - tmp = front->resource.heapMemory; - front->resource.heapMemory = back->resource.heapMemory; - back->resource.heapMemory = tmp; + tmp = front->resource.heap_memory; + front->resource.heap_memory = back->resource.heap_memory; + back->resource.heap_memory = tmp; } /* Flip the PBO */ @@ -4838,14 +4744,13 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc struct wined3d_device *device = dst_surface->resource.device; const struct wined3d_gl_info *gl_info; float xrel, yrel; - UINT row; struct wined3d_context *context; BOOL upsidedown = FALSE; RECT dst_rect = *dst_rect_in; GLenum dst_target; - if (dst_surface->container.type == WINED3D_CONTAINER_TEXTURE) - dst_target = dst_surface->container.u.texture->target; + if (dst_surface->container) + dst_target = dst_surface->container->target; else dst_target = dst_surface->texture_target; @@ -4906,6 +4811,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc } else { + LONG row; UINT yoffset = src_surface->resource.height - src_rect->top + dst_rect.top - 1; /* I have to process this row by row to swap the image, * otherwise it would be upside down, so stretching in y direction @@ -4919,7 +4825,7 @@ static void fb_copy_to_texture_direct(struct wined3d_surface *dst_surface, struc /* Well, that stuff works, but it's very slow. * find a better way instead */ - UINT col; + LONG col; for (col = dst_rect.left; col < dst_rect.right; ++col) { @@ -4951,7 +4857,6 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st const RECT *src_rect, const RECT *dst_rect_in, enum wined3d_texture_filter_type filter) { struct wined3d_device *device = dst_surface->resource.device; - struct wined3d_swapchain *src_swapchain = NULL; GLuint src, backup = 0; float left, right, top, bottom; /* Texture coordinates */ UINT fbwidth = src_surface->resource.width; @@ -5049,9 +4954,7 @@ static void fb_copy_to_texture_hwstretch(struct wined3d_surface *dst_surface, st wined3d_gl_min_mip_filter(minMipLookup, filter, WINED3D_TEXF_NONE)); checkGLcall("glTexParameteri"); - if (src_surface->container.type == WINED3D_CONTAINER_SWAPCHAIN) - src_swapchain = src_surface->container.u.swapchain; - if (!src_swapchain || src_surface == src_swapchain->back_buffers[0]) + if (!src_surface->swapchain || src_surface == src_surface->swapchain->back_buffers[0]) { src = backup ? backup : src_surface->texture_name; } @@ -5230,8 +5133,7 @@ void surface_translate_drawable_coords(const struct wined3d_surface *surface, HW { UINT drawable_height; - if (surface->container.type == WINED3D_CONTAINER_SWAPCHAIN - && surface == surface->container.u.swapchain->front_buffer) + if (surface->swapchain && surface == surface->swapchain->front_buffer) { POINT offset = {0, 0}; RECT windowsize; @@ -5312,8 +5214,7 @@ static void surface_blt_to_drawable(const struct wined3d_device *device, device->blitter->unset_shader(context->gl_info); if (wined3d_settings.strict_draw_ordering - || (dst_surface->container.type == WINED3D_CONTAINER_SWAPCHAIN - && (dst_surface->container.u.swapchain->front_buffer == dst_surface))) + || (dst_surface->swapchain && dst_surface->swapchain->front_buffer == dst_surface)) gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */ context_release(context); @@ -5343,7 +5244,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(struct wined3d_surface *dst_surfa { struct wined3d_device *device = dst_surface->resource.device; const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - struct wined3d_swapchain *srcSwapchain = NULL, *dstSwapchain = NULL; + struct wined3d_swapchain *src_swapchain, *dst_swapchain; TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, blt_fx %p, filter %s.\n", dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), @@ -5356,8 +5257,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(struct wined3d_surface *dst_surfa return WINED3DERR_INVALIDCALL; } - if (dst_surface->container.type == WINED3D_CONTAINER_SWAPCHAIN) - dstSwapchain = dst_surface->container.u.swapchain; + dst_swapchain = dst_surface->swapchain; if (src_surface) { @@ -5367,12 +5267,15 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(struct wined3d_surface *dst_surfa return WINED3DERR_INVALIDCALL; } - if (src_surface->container.type == WINED3D_CONTAINER_SWAPCHAIN) - srcSwapchain = src_surface->container.u.swapchain; + src_swapchain = src_surface->swapchain; + } + else + { + src_swapchain = NULL; } /* Early sort out of cases where no render target is used */ - if (!dstSwapchain && !srcSwapchain + if (!dst_swapchain && !src_swapchain && src_surface != device->fb.render_targets[0] && dst_surface != device->fb.render_targets[0]) { @@ -5388,31 +5291,31 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(struct wined3d_surface *dst_surfa return WINED3DERR_INVALIDCALL; } - if (dstSwapchain && dstSwapchain == srcSwapchain) + if (dst_swapchain && dst_swapchain == src_swapchain) { FIXME("Implement hardware blit between two surfaces on the same swapchain\n"); return WINED3DERR_INVALIDCALL; } - if (dstSwapchain && srcSwapchain) + if (dst_swapchain && src_swapchain) { FIXME("Implement hardware blit between two different swapchains\n"); return WINED3DERR_INVALIDCALL; } - if (dstSwapchain) + if (dst_swapchain) { /* Handled with regular texture -> swapchain blit */ if (src_surface == device->fb.render_targets[0]) TRACE("Blit from active render target to a swapchain\n"); } - else if (srcSwapchain && dst_surface == device->fb.render_targets[0]) + else if (src_swapchain && dst_surface == device->fb.render_targets[0]) { FIXME("Implement blit from a swapchain to the active render target\n"); return WINED3DERR_INVALIDCALL; } - if ((srcSwapchain || src_surface == device->fb.render_targets[0]) && !dstSwapchain) + if ((src_swapchain || src_surface == device->fb.render_targets[0]) && !dst_swapchain) { /* Blit from render target to texture */ BOOL stretchx; @@ -5461,9 +5364,9 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(struct wined3d_surface *dst_surfa if (!dst_surface->resource.map_count && !(dst_surface->flags & SFLAG_DONOTFREE)) { - HeapFree(GetProcessHeap(), 0, dst_surface->resource.heapMemory); + wined3d_resource_free_sysmem(dst_surface->resource.heap_memory); dst_surface->resource.allocatedMemory = NULL; - dst_surface->resource.heapMemory = NULL; + dst_surface->resource.heap_memory = NULL; } else { @@ -5599,10 +5502,10 @@ void surface_modify_ds_location(struct wined3d_surface *surface, if (((surface->flags & SFLAG_INTEXTURE) && !(location & SFLAG_INTEXTURE)) || (!(surface->flags & SFLAG_INTEXTURE) && (location & SFLAG_INTEXTURE))) { - if (surface->container.type == WINED3D_CONTAINER_TEXTURE) + if (surface->container) { TRACE("Passing to container.\n"); - wined3d_texture_set_dirty(surface->container.u.texture, TRUE); + wined3d_texture_set_dirty(surface->container, TRUE); } } @@ -5734,7 +5637,6 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co context_apply_fbo_state_blit(context, GL_FRAMEBUFFER, NULL, surface, SFLAG_INTEXTURE); context_set_draw_buffer(context, GL_NONE); - gl_info->gl_ops.gl.p_glReadBuffer(GL_NONE); /* Do the actual blit */ surface_depth_blt(surface, context, device->depth_blt_texture, 0, 0, w, h, bind_target); @@ -5792,10 +5694,10 @@ void surface_modify_location(struct wined3d_surface *surface, DWORD location, BO if (((surface->flags & SFLAG_INTEXTURE) && !(location & SFLAG_INTEXTURE)) || ((surface->flags & SFLAG_INSRGBTEX) && !(location & SFLAG_INSRGBTEX))) { - if (surface->container.type == WINED3D_CONTAINER_TEXTURE) + if (surface->container) { TRACE("Passing to container.\n"); - wined3d_texture_set_dirty(surface->container.u.texture, TRUE); + wined3d_texture_set_dirty(surface->container, TRUE); } } surface->flags &= ~SFLAG_LOCATIONS; @@ -5814,10 +5716,10 @@ void surface_modify_location(struct wined3d_surface *surface, DWORD location, BO { if ((surface->flags & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX)) && (location & (SFLAG_INTEXTURE | SFLAG_INSRGBTEX))) { - if (surface->container.type == WINED3D_CONTAINER_TEXTURE) + if (surface->container) { TRACE("Passing to container\n"); - wined3d_texture_set_dirty(surface->container.u.texture, TRUE); + wined3d_texture_set_dirty(surface->container, TRUE); } } surface->flags &= ~location; @@ -5888,11 +5790,7 @@ static void surface_load_sysmem(struct wined3d_surface *surface, static HRESULT surface_load_drawable(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, const RECT *rect) { - struct wined3d_device *device = surface->resource.device; - enum wined3d_conversion_type convert; - struct wined3d_format format; - UINT byte_count; - BYTE *mem; + RECT r; if (wined3d_settings.offscreen_rendering_mode == ORM_FBO && surface_is_offscreen(surface)) { @@ -5900,82 +5798,10 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface, return WINED3DERR_INVALIDCALL; } - if (wined3d_settings.rendertargetlock_mode == RTL_READTEX) - surface_load_location(surface, SFLAG_INTEXTURE, NULL); - - if (surface->flags & SFLAG_INTEXTURE) - { - RECT r; - - surface_get_rect(surface, rect, &r); - surface_blt_to_drawable(device, WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r); - - return WINED3D_OK; - } - - if ((surface->flags & SFLAG_LOCATIONS) == SFLAG_INSRGBTEX) - { - /* This needs colorspace conversion from sRGB to RGB. We take the slow - * path through sysmem. */ - surface_load_location(surface, SFLAG_INSYSMEM, rect); - } - - d3dfmt_get_conv(surface, FALSE, FALSE, &format, &convert); - - /* Don't use PBOs for converted surfaces. During PBO conversion we look at - * SFLAG_CONVERTED but it isn't set (yet) in all cases where it is getting - * called. */ - if ((convert != WINED3D_CT_NONE) && (surface->flags & SFLAG_PBO)) - { - struct wined3d_context *context; - - TRACE("Removing the pbo attached to surface %p.\n", surface); - - /* TODO: Use already acquired context when possible. */ - context = context_acquire(device, NULL); - - surface_remove_pbo(surface, gl_info); - - context_release(context); - } - - if ((convert != WINED3D_CT_NONE) && surface->resource.allocatedMemory) - { - UINT height = surface->resource.height; - UINT width = surface->resource.width; - UINT src_pitch, dst_pitch; - - byte_count = format.conv_byte_count; - src_pitch = wined3d_surface_get_pitch(surface); - - /* Stick to the alignment for the converted surface too, makes it - * easier to load the surface. */ - dst_pitch = width * byte_count; - dst_pitch = (dst_pitch + device->surface_alignment - 1) & ~(device->surface_alignment - 1); - - if (!(mem = HeapAlloc(GetProcessHeap(), 0, dst_pitch * height))) - { - ERR("Out of memory (%u).\n", dst_pitch * height); - return E_OUTOFMEMORY; - } - - d3dfmt_convert_surface(surface->resource.allocatedMemory, mem, - src_pitch, width, height, dst_pitch, convert, surface); - - surface->flags |= SFLAG_CONVERTED; - } - else - { - surface->flags &= ~SFLAG_CONVERTED; - mem = surface->resource.allocatedMemory; - byte_count = format.byte_count; - } - - flush_to_framebuffer_drawpixels(surface, rect, format.glFormat, format.glType, byte_count, mem); - - /* Don't delete PBO memory. */ - if ((mem != surface->resource.allocatedMemory) && !(surface->flags & SFLAG_PBO)) - HeapFree(GetProcessHeap(), 0, mem); + surface_get_rect(surface, rect, &r); + surface_load_location(surface, SFLAG_INTEXTURE, NULL); + surface_blt_to_drawable(surface->resource.device, + WINED3D_TEXF_POINT, FALSE, surface, &r, surface, &r); return WINED3D_OK; } @@ -6168,16 +5994,22 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location, c if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL) { - if (location == SFLAG_INTEXTURE) + if (location == SFLAG_INTEXTURE && surface->flags & SFLAG_INDRAWABLE) { struct wined3d_context *context = context_acquire(device, NULL); surface_load_ds_location(surface, context, location); context_release(context); return WINED3D_OK; } + else if (location & surface->flags && surface->draw_binding != SFLAG_INDRAWABLE) + { + /* Already up to date, nothing to do. */ + return WINED3D_OK; + } else { - FIXME("Unimplemented location %s for depth/stencil buffers.\n", debug_surflocation(location)); + FIXME("Unimplemented copy from %s to %s for depth/stencil buffers.\n", + debug_surflocation(surface->flags & SFLAG_LOCATIONS), debug_surflocation(location)); return WINED3DERR_INVALIDCALL; } } @@ -6256,10 +6088,11 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location, c BOOL surface_is_offscreen(const struct wined3d_surface *surface) { - struct wined3d_swapchain *swapchain = surface->container.u.swapchain; + struct wined3d_swapchain *swapchain; /* Not on a swapchain - must be offscreen */ - if (surface->container.type != WINED3D_CONTAINER_SWAPCHAIN) return TRUE; + if (!(swapchain = surface->swapchain)) + return TRUE; /* The front buffer is always onscreen */ if (surface == swapchain->front_buffer) return FALSE; @@ -6273,44 +6106,17 @@ static HRESULT ffp_blit_alloc(struct wined3d_device *device) { return WINED3D_OK /* Context activation is done by the caller. */ static void ffp_blit_free(struct wined3d_device *device) { } -/* This function is used in case of 8bit paletted textures using GL_EXT_paletted_texture */ -/* Context activation is done by the caller. */ -static void ffp_blit_p8_upload_palette(const struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info) -{ - BYTE table[256][4]; - BOOL colorkey_active = (surface->CKeyFlags & WINEDDSD_CKSRCBLT) != 0; - GLenum target; - - if (surface->container.type == WINED3D_CONTAINER_TEXTURE) - target = surface->container.u.texture->target; - else - target = surface->texture_target; - - d3dfmt_p8_init_palette(surface, table, colorkey_active); - - TRACE("Using GL_EXT_PALETTED_TEXTURE for 8-bit paletted texture support\n"); - GL_EXTCALL(glColorTableEXT(target, GL_RGBA, 256, GL_RGBA, GL_UNSIGNED_BYTE, table)); -} - /* Context activation is done by the caller. */ static HRESULT ffp_blit_set(void *blit_priv, struct wined3d_context *context, const struct wined3d_surface *surface) { - enum complex_fixup fixup = get_complex_fixup(surface->resource.format->color_fixup); const struct wined3d_gl_info *gl_info = context->gl_info; GLenum target; - if (surface->container.type == WINED3D_CONTAINER_TEXTURE) - target = surface->container.u.texture->target; + if (surface->container) + target = surface->container->target; else target = surface->texture_target; - /* When EXT_PALETTED_TEXTURE is around, palette conversion is done by the GPU - * else the surface is converted in software at upload time in LoadLocation. - */ - if (!(surface->flags & SFLAG_CONVERTED) && fixup == COMPLEX_FIXUP_P8 - && gl_info->supported[EXT_PALETTED_TEXTURE]) - ffp_blit_p8_upload_palette(surface, gl_info); - gl_info->gl_ops.gl.p_glEnable(target); checkGLcall("glEnable(target)"); @@ -6338,42 +6144,27 @@ static BOOL ffp_blit_supported(const struct wined3d_gl_info *gl_info, enum wined const RECT *src_rect, DWORD src_usage, enum wined3d_pool src_pool, const struct wined3d_format *src_format, const RECT *dst_rect, DWORD dst_usage, enum wined3d_pool dst_pool, const struct wined3d_format *dst_format) { - enum complex_fixup src_fixup; - switch (blit_op) { case WINED3D_BLIT_OP_COLOR_BLIT: if (src_pool == WINED3D_POOL_SYSTEM_MEM || dst_pool == WINED3D_POOL_SYSTEM_MEM) return FALSE; - src_fixup = get_complex_fixup(src_format->color_fixup); if (TRACE_ON(d3d_surface) && TRACE_ON(d3d)) { TRACE("Checking support for fixup:\n"); dump_color_fixup_desc(src_format->color_fixup); } - if (!is_identity_fixup(dst_format->color_fixup)) + /* We only support identity conversions. */ + if (!is_identity_fixup(src_format->color_fixup) + || !is_identity_fixup(dst_format->color_fixup)) { - TRACE("Destination fixups are not supported\n"); + TRACE("Fixups are not supported.\n"); return FALSE; } - if (src_fixup == COMPLEX_FIXUP_P8 && gl_info->supported[EXT_PALETTED_TEXTURE]) - { - TRACE("P8 fixup supported\n"); - return TRUE; - } - - /* We only support identity conversions. */ - if (is_identity_fixup(src_format->color_fixup)) - { - TRACE("[OK]\n"); - return TRUE; - } - - TRACE("[FAILED]\n"); - return FALSE; + return TRUE; case WINED3D_BLIT_OP_COLOR_FILL: if (dst_pool == WINED3D_POOL_SYSTEM_MEM) @@ -7160,7 +6951,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, UINT alignment, UIN /* FIXME: Check that the format is supported by the device. */ - resource_size = wined3d_format_calculate_size(format, alignment, width, height); + resource_size = wined3d_format_calculate_size(format, alignment, width, height, 1); if (!resource_size) return WINED3DERR_INVALIDCALL; @@ -7179,7 +6970,7 @@ static HRESULT surface_init(struct wined3d_surface *surface, UINT alignment, UIN } /* "Standalone" surface. */ - surface_set_container(surface, WINED3D_CONTAINER_NONE, NULL); + surface_set_container(surface, NULL); list_init(&surface->overlays); @@ -7223,8 +7014,8 @@ static HRESULT surface_init(struct wined3d_surface *surface, UINT alignment, UIN if ((usage & WINED3DUSAGE_OWNDC) && !surface->hDC && SUCCEEDED(surface_create_dib_section(surface))) { - HeapFree(GetProcessHeap(), 0, surface->resource.heapMemory); - surface->resource.heapMemory = NULL; + wined3d_resource_free_sysmem(surface->resource.heap_memory); + surface->resource.heap_memory = NULL; surface->resource.allocatedMemory = surface->dib.bitmap_data; } diff --git a/dll/directx/wine/wined3d/swapchain.c b/dll/directx/wine/wined3d/swapchain.c index 7f8f3397604..4996cf5fa13 100644 --- a/dll/directx/wine/wined3d/swapchain.c +++ b/dll/directx/wine/wined3d/swapchain.c @@ -30,7 +30,6 @@ WINE_DECLARE_DEBUG_CHANNEL(fps); /* Do not call while under the GL lock. */ static void swapchain_cleanup(struct wined3d_swapchain *swapchain) { - struct wined3d_display_mode mode; HRESULT hr; UINT i; @@ -42,8 +41,7 @@ static void swapchain_cleanup(struct wined3d_swapchain *swapchain) * is the last buffer to be destroyed, FindContext() depends on that. */ if (swapchain->front_buffer) { - if (swapchain->front_buffer->container.type == WINED3D_CONTAINER_SWAPCHAIN) - surface_set_container(swapchain->front_buffer, WINED3D_CONTAINER_NONE, NULL); + surface_set_swapchain(swapchain->front_buffer, NULL); if (wined3d_surface_decref(swapchain->front_buffer)) WARN("Something's still holding the front buffer (%p).\n", swapchain->front_buffer); swapchain->front_buffer = NULL; @@ -55,8 +53,7 @@ static void swapchain_cleanup(struct wined3d_swapchain *swapchain) while (i--) { - if (swapchain->back_buffers[i]->container.type == WINED3D_CONTAINER_SWAPCHAIN) - surface_set_container(swapchain->back_buffers[i], WINED3D_CONTAINER_NONE, NULL); + surface_set_swapchain(swapchain->back_buffers[i], NULL); if (wined3d_surface_decref(swapchain->back_buffers[i])) WARN("Something's still holding back buffer %u (%p).\n", i, swapchain->back_buffers[i]); } @@ -78,13 +75,8 @@ static void swapchain_cleanup(struct wined3d_swapchain *swapchain) * orig_height will be equal to the modes in the presentation params. */ if (!swapchain->desc.windowed && swapchain->desc.auto_restore_display_mode) { - mode.width = swapchain->orig_width; - mode.height = swapchain->orig_height; - mode.refresh_rate = 0; - mode.format_id = swapchain->orig_fmt; - mode.scanline_ordering = WINED3D_SCANLINE_ORDERING_UNKNOWN; if (FAILED(hr = wined3d_set_adapter_display_mode(swapchain->device->wined3d, - swapchain->device->adapter->ordinal, &mode))) + swapchain->device->adapter->ordinal, &swapchain->original_mode))) ERR("Failed to restore display mode, hr %#x.\n", hr); } @@ -745,10 +737,10 @@ static void swapchain_gdi_present(struct wined3d_swapchain *swapchain, const REC front->resource.allocatedMemory = back->resource.allocatedMemory; back->resource.allocatedMemory = tmp; - if (front->resource.heapMemory) + if (front->resource.heap_memory) ERR("GDI Surface %p has heap memory allocated.\n", front); - if (back->resource.heapMemory) + if (back->resource.heap_memory) ERR("GDI Surface %p has heap memory allocated.\n", back); } @@ -819,8 +811,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 struct wined3d_swapchain_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops) { const struct wined3d_adapter *adapter = device->adapter; - const struct wined3d_format *format; - struct wined3d_display_mode mode; + struct wined3d_resource_desc surface_desc; BOOL displaymode_set = FALSE; RECT client_rect; HWND window; @@ -854,11 +845,12 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 swapchain->win_handle = window; swapchain->device_window = window; - wined3d_get_adapter_display_mode(device->wined3d, adapter->ordinal, &mode, NULL); - swapchain->orig_width = mode.width; - swapchain->orig_height = mode.height; - swapchain->orig_fmt = mode.format_id; - format = wined3d_get_format(&adapter->gl_info, mode.format_id); + if (FAILED(hr = wined3d_get_adapter_display_mode(device->wined3d, + adapter->ordinal, &swapchain->original_mode, NULL))) + { + ERR("Failed to get current display mode, hr %#x.\n", hr); + goto err; + } GetClientRect(window, &client_rect); if (desc->windowed @@ -880,26 +872,34 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 if (desc->backbuffer_format == WINED3DFMT_UNKNOWN) { - desc->backbuffer_format = swapchain->orig_fmt; - TRACE("Updating format to %s.\n", debug_d3dformat(swapchain->orig_fmt)); + desc->backbuffer_format = swapchain->original_mode.format_id; + TRACE("Updating format to %s.\n", debug_d3dformat(swapchain->original_mode.format_id)); } } swapchain->desc = *desc; swapchain_update_render_to_fbo(swapchain); TRACE("Creating front buffer.\n"); - if (FAILED(hr = device->device_parent->ops->create_swapchain_surface(device->device_parent, parent, - swapchain->desc.backbuffer_width, swapchain->desc.backbuffer_height, - swapchain->desc.backbuffer_format, WINED3DUSAGE_RENDERTARGET, - swapchain->desc.multisample_type, swapchain->desc.multisample_quality, - &swapchain->front_buffer))) + + surface_desc.resource_type = WINED3D_RTYPE_SURFACE; + surface_desc.format = swapchain->desc.backbuffer_format; + surface_desc.multisample_type = swapchain->desc.multisample_type; + surface_desc.multisample_quality = swapchain->desc.multisample_quality; + surface_desc.usage = WINED3DUSAGE_RENDERTARGET; + surface_desc.pool = WINED3D_POOL_DEFAULT; + surface_desc.width = swapchain->desc.backbuffer_width; + surface_desc.height = swapchain->desc.backbuffer_height; + surface_desc.depth = 1; + surface_desc.size = 0; + + if (FAILED(hr = device->device_parent->ops->create_swapchain_surface(device->device_parent, + parent, &surface_desc, &swapchain->front_buffer))) { WARN("Failed to create front buffer, hr %#x.\n", hr); goto err; } - if (swapchain->front_buffer->container.type == WINED3D_CONTAINER_NONE) - surface_set_container(swapchain->front_buffer, WINED3D_CONTAINER_SWAPCHAIN, swapchain); + surface_set_swapchain(swapchain->front_buffer, swapchain); if (!(device->wined3d->flags & WINED3D_NO3D)) surface_modify_location(swapchain->front_buffer, SFLAG_INDRAWABLE, TRUE); @@ -918,7 +918,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 mode.refresh_rate = desc->refresh_rate; mode.scanline_ordering = WINED3D_SCANLINE_ORDERING_UNKNOWN; - if (FAILED(hr = wined3d_set_adapter_display_mode(device->wined3d, device->adapter->ordinal, &mode))) + if (FAILED(hr = wined3d_set_adapter_display_mode(device->wined3d, adapter->ordinal, &mode))) { WARN("Failed to set display mode, hr %#x.\n", hr); goto err; @@ -937,7 +937,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 WINED3DFMT_S1_UINT_D15_UNORM }; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + const struct wined3d_gl_info *gl_info = &adapter->gl_info; swapchain->context = HeapAlloc(GetProcessHeap(), 0, sizeof(*swapchain->context)); if (!swapchain->context) @@ -998,17 +998,13 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 for (i = 0; i < swapchain->desc.backbuffer_count; ++i) { TRACE("Creating back buffer %u.\n", i); - if (FAILED(hr = device->device_parent->ops->create_swapchain_surface(device->device_parent, parent, - swapchain->desc.backbuffer_width, swapchain->desc.backbuffer_height, - swapchain->desc.backbuffer_format, WINED3DUSAGE_RENDERTARGET, - swapchain->desc.multisample_type, swapchain->desc.multisample_quality, - &swapchain->back_buffers[i]))) + if (FAILED(hr = device->device_parent->ops->create_swapchain_surface(device->device_parent, + parent, &surface_desc, &swapchain->back_buffers[i]))) { WARN("Failed to create back buffer %u, hr %#x.\n", i, hr); goto err; } - if (swapchain->back_buffers[i]->container.type == WINED3D_CONTAINER_NONE) - surface_set_container(swapchain->back_buffers[i], WINED3D_CONTAINER_SWAPCHAIN, swapchain); + surface_set_swapchain(swapchain->back_buffers[i], swapchain); } } @@ -1018,17 +1014,15 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 TRACE("Creating depth/stencil buffer.\n"); if (!device->auto_depth_stencil) { + surface_desc.format = swapchain->desc.auto_depth_stencil_format; + surface_desc.usage = WINED3DUSAGE_DEPTHSTENCIL; + if (FAILED(hr = device->device_parent->ops->create_swapchain_surface(device->device_parent, - device->device_parent, swapchain->desc.backbuffer_width, swapchain->desc.backbuffer_height, - swapchain->desc.auto_depth_stencil_format, WINED3DUSAGE_DEPTHSTENCIL, - swapchain->desc.multisample_type, swapchain->desc.multisample_quality, - &device->auto_depth_stencil))) + device->device_parent, &surface_desc, &device->auto_depth_stencil))) { WARN("Failed to create the auto depth stencil, hr %#x.\n", hr); goto err; } - - surface_set_container(device->auto_depth_stencil, WINED3D_CONTAINER_NONE, NULL); } } @@ -1039,18 +1033,10 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 err: if (displaymode_set) { - DEVMODEW devmode; - + if (FAILED(wined3d_set_adapter_display_mode(device->wined3d, + adapter->ordinal, &swapchain->original_mode))) + ERR("Failed to restore display mode.\n"); ClipCursor(NULL); - - /* Change the display settings */ - memset(&devmode, 0, sizeof(devmode)); - devmode.dmSize = sizeof(devmode); - devmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT; - devmode.dmBitsPerPel = format->byte_count * CHAR_BIT; - devmode.dmPelsWidth = swapchain->orig_width; - devmode.dmPelsHeight = swapchain->orig_height; - ChangeDisplaySettingsExW(adapter->DeviceName, &devmode, NULL, CDS_FULLSCREEN, NULL); } if (swapchain->back_buffers) @@ -1059,7 +1045,7 @@ err: { if (swapchain->back_buffers[i]) { - surface_set_container(swapchain->back_buffers[i], WINED3D_CONTAINER_NONE, NULL); + surface_set_swapchain(swapchain->back_buffers[i], NULL); wined3d_surface_decref(swapchain->back_buffers[i]); } } @@ -1079,7 +1065,7 @@ err: if (swapchain->front_buffer) { - surface_set_container(swapchain->front_buffer, WINED3D_CONTAINER_NONE, NULL); + surface_set_swapchain(swapchain->front_buffer, NULL); wined3d_surface_decref(swapchain->front_buffer); } diff --git a/dll/directx/wine/wined3d/texture.c b/dll/directx/wine/wined3d/texture.c index c025892d5c4..6137a77e5aa 100644 --- a/dll/directx/wine/wined3d/texture.c +++ b/dll/directx/wine/wined3d/texture.c @@ -2,7 +2,7 @@ * Copyright 2002-2005 Jason Edmeades * Copyright 2002-2005 Raphael Junqueira * Copyright 2005 Oliver Stieber - * Copyright 2007-2008 Stefan Dösinger for CodeWeavers + * Copyright 2007-2009, 2013 Stefan Dösinger for CodeWeavers * Copyright 2009-2011 Henri Verbeet for CodeWeavers * * This library is free software; you can redistribute it and/or @@ -27,16 +27,23 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_texture); static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struct wined3d_texture_ops *texture_ops, - UINT layer_count, UINT level_count, enum wined3d_resource_type resource_type, struct wined3d_device *device, - DWORD usage, const struct wined3d_format *format, enum wined3d_pool pool, void *parent, - const struct wined3d_parent_ops *parent_ops, const struct wined3d_resource_ops *resource_ops) + UINT layer_count, UINT level_count, const struct wined3d_resource_desc *desc, struct wined3d_device *device, + void *parent, const struct wined3d_parent_ops *parent_ops, const struct wined3d_resource_ops *resource_ops) { + const struct wined3d_format *format = wined3d_get_format(&device->adapter->gl_info, desc->format); HRESULT hr; - hr = resource_init(&texture->resource, device, resource_type, format, - WINED3D_MULTISAMPLE_NONE, 0, usage, pool, 0, 0, 0, 0, - parent, parent_ops, resource_ops); - if (FAILED(hr)) + TRACE("texture %p, texture_ops %p, layer_count %u, level_count %u, resource_type %s, format %s, " + "multisample_type %#x, multisample_quality %#x, usage %s, pool %s, width %u, height %u, depth %u, " + "device %p, parent %p, parent_ops %p, resource_ops %p.\n", + texture, texture_ops, layer_count, level_count, debug_d3dresourcetype(desc->resource_type), + debug_d3dformat(desc->format), desc->multisample_type, desc->multisample_quality, + debug_d3dusage(desc->usage), debug_d3dpool(desc->pool), desc->width, desc->height, desc->depth, + device, parent, parent_ops, resource_ops); + + if (FAILED(hr = resource_init(&texture->resource, device, desc->resource_type, format, + desc->multisample_type, desc->multisample_quality, desc->usage, desc->pool, + desc->width, desc->height, desc->depth, 0, parent, parent_ops, resource_ops))) { WARN("Failed to initialize resource, returning %#x\n", hr); return hr; @@ -54,7 +61,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc texture->layer_count = layer_count; texture->level_count = level_count; - texture->filter_type = (usage & WINED3DUSAGE_AUTOGENMIPMAP) ? WINED3D_TEXF_LINEAR : WINED3D_TEXF_NONE; + texture->filter_type = (desc->usage & WINED3DUSAGE_AUTOGENMIPMAP) ? WINED3D_TEXF_LINEAR : WINED3D_TEXF_NONE; texture->lod = 0; texture->texture_rgb.dirty = TRUE; texture->texture_srgb.dirty = TRUE; @@ -715,7 +722,7 @@ static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource surface_set_texture_name(surface, 0, TRUE); surface_set_texture_name(surface, 0, FALSE); surface_set_texture_target(surface, 0, 0); - surface_set_container(surface, WINED3D_CONTAINER_NONE, NULL); + surface_set_container(surface, NULL); wined3d_surface_decref(surface); } @@ -754,33 +761,31 @@ static const struct wined3d_resource_ops texture2d_resource_ops = texture2d_unload, }; -static HRESULT cubetexture_init(struct wined3d_texture *texture, UINT edge_length, UINT levels, - struct wined3d_device *device, DWORD usage, enum wined3d_format_id format_id, enum wined3d_pool pool, - void *parent, const struct wined3d_parent_ops *parent_ops) +static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wined3d_resource_desc *desc, + UINT levels, DWORD surface_flags, struct wined3d_device *device, void *parent, + const struct wined3d_parent_ops *parent_ops) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - const struct wined3d_format *format = wined3d_get_format(gl_info, format_id); - UINT pow2_edge_length; + struct wined3d_resource_desc surface_desc; unsigned int i, j; - UINT tmp_w; HRESULT hr; /* TODO: It should only be possible to create textures for formats * that are reported as supported. */ - if (WINED3DFMT_UNKNOWN >= format_id) + if (WINED3DFMT_UNKNOWN >= desc->format) { WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture); return WINED3DERR_INVALIDCALL; } - if (!gl_info->supported[ARB_TEXTURE_CUBE_MAP] && pool != WINED3D_POOL_SCRATCH) + if (!gl_info->supported[ARB_TEXTURE_CUBE_MAP] && desc->pool != WINED3D_POOL_SCRATCH) { WARN("(%p) : Tried to create not supported cube texture.\n", texture); return WINED3DERR_INVALIDCALL; } /* Calculate levels for mip mapping */ - if (usage & WINED3DUSAGE_AUTOGENMIPMAP) + if (desc->usage & WINED3DUSAGE_AUTOGENMIPMAP) { if (!gl_info->supported[SGIS_GENERATE_MIPMAP]) { @@ -798,44 +803,47 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, UINT edge_lengt } else if (!levels) { - levels = wined3d_log2i(edge_length) + 1; + levels = wined3d_log2i(desc->width) + 1; TRACE("Calculated levels = %u.\n", levels); } - hr = wined3d_texture_init(texture, &texture2d_ops, 6, levels, - WINED3D_RTYPE_CUBE_TEXTURE, device, usage, format, pool, - parent, parent_ops, &texture2d_resource_ops); - if (FAILED(hr)) + if (!gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO]) + { + UINT pow2_edge_length = 1; + while (pow2_edge_length < desc->width) + pow2_edge_length <<= 1; + + if (desc->width != pow2_edge_length) + { + if (desc->pool == WINED3D_POOL_SCRATCH) + { + /* SCRATCH textures cannot be used for texturing */ + WARN("Creating a scratch NPOT cube texture despite lack of HW support.\n"); + } + else + { + WARN("Attempted to create a NPOT cube texture (edge length %u) without GL support.\n", desc->width); + return WINED3DERR_INVALIDCALL; + } + } + } + + if (FAILED(hr = wined3d_texture_init(texture, &texture2d_ops, 6, levels, + desc, device, parent, parent_ops, &texture2d_resource_ops))) { WARN("Failed to initialize texture, returning %#x\n", hr); return hr; } - /* Find the nearest pow2 match. */ - pow2_edge_length = 1; - while (pow2_edge_length < edge_length) pow2_edge_length <<= 1; - - if (gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] || (edge_length == pow2_edge_length)) - { - /* Precalculated scaling for 'faked' non power of two texture coords. */ - texture->pow2_matrix[0] = 1.0f; - texture->pow2_matrix[5] = 1.0f; - texture->pow2_matrix[10] = 1.0f; - texture->pow2_matrix[15] = 1.0f; - } - else - { - /* Precalculated scaling for 'faked' non power of two texture coords. */ - texture->pow2_matrix[0] = ((float)edge_length) / ((float)pow2_edge_length); - texture->pow2_matrix[5] = ((float)edge_length) / ((float)pow2_edge_length); - texture->pow2_matrix[10] = ((float)edge_length) / ((float)pow2_edge_length); - texture->pow2_matrix[15] = 1.0f; - texture->flags &= ~WINED3D_TEXTURE_POW2_MAT_IDENT; - } + texture->pow2_matrix[0] = 1.0f; + texture->pow2_matrix[5] = 1.0f; + texture->pow2_matrix[10] = 1.0f; + texture->pow2_matrix[15] = 1.0f; texture->target = GL_TEXTURE_CUBE_MAP_ARB; /* Generate all the surfaces. */ - tmp_w = edge_length; + surface_desc = *desc; + surface_desc.resource_type = WINED3D_RTYPE_SURFACE; for (i = 0; i < texture->level_count; ++i) { /* Create the 6 faces. */ @@ -854,38 +862,38 @@ static HRESULT cubetexture_init(struct wined3d_texture *texture, UINT edge_lengt struct wined3d_surface *surface; if (FAILED(hr = device->device_parent->ops->create_texture_surface(device->device_parent, - parent, tmp_w, tmp_w, format_id, usage, pool, idx, &surface))) + parent, &surface_desc, idx, surface_flags, &surface))) { FIXME("(%p) Failed to create surface, hr %#x.\n", texture, hr); wined3d_texture_cleanup(texture); return hr; } - surface_set_container(surface, WINED3D_CONTAINER_TEXTURE, texture); + surface_set_container(surface, texture); surface_set_texture_target(surface, cube_targets[j], i); texture->sub_resources[idx] = &surface->resource; TRACE("Created surface level %u @ %p.\n", i, surface); } - tmp_w = max(1, tmp_w >> 1); + surface_desc.width = max(1, surface_desc.width >> 1); + surface_desc.height = surface_desc.width; } return WINED3D_OK; } -static HRESULT texture_init(struct wined3d_texture *texture, UINT width, UINT height, UINT levels, - struct wined3d_device *device, DWORD usage, enum wined3d_format_id format_id, enum wined3d_pool pool, - void *parent, const struct wined3d_parent_ops *parent_ops) +static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3d_resource_desc *desc, + UINT levels, DWORD surface_flags, struct wined3d_device *device, void *parent, + const struct wined3d_parent_ops *parent_ops) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - const struct wined3d_format *format = wined3d_get_format(gl_info, format_id); + struct wined3d_resource_desc surface_desc; UINT pow2_width, pow2_height; - UINT tmp_w, tmp_h; unsigned int i; HRESULT hr; /* TODO: It should only be possible to create textures for formats * that are reported as supported. */ - if (WINED3DFMT_UNKNOWN >= format_id) + if (WINED3DFMT_UNKNOWN >= desc->format) { WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture); return WINED3DERR_INVALIDCALL; @@ -894,29 +902,38 @@ static HRESULT texture_init(struct wined3d_texture *texture, UINT width, UINT he /* Non-power2 support. */ if (gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO]) { - pow2_width = width; - pow2_height = height; + pow2_width = desc->width; + pow2_height = desc->height; } else { /* Find the nearest pow2 match. */ pow2_width = pow2_height = 1; - while (pow2_width < width) pow2_width <<= 1; - while (pow2_height < height) pow2_height <<= 1; + while (pow2_width < desc->width) + pow2_width <<= 1; + while (pow2_height < desc->height) + pow2_height <<= 1; - if (pow2_width != width || pow2_height != height) + if (pow2_width != desc->width || pow2_height != desc->height) { - if (levels > 1) + /* levels == 0 returns an error as well */ + if (levels != 1) { - WARN("Attempted to create a mipmapped np2 texture without unconditional np2 support.\n"); - return WINED3DERR_INVALIDCALL; + if (desc->pool == WINED3D_POOL_SCRATCH) + { + WARN("Creating a scratch mipmapped NPOT texture despite lack of HW support.\n"); + } + else + { + WARN("Attempted to create a mipmapped NPOT texture without unconditional NPOT support.\n"); + return WINED3DERR_INVALIDCALL; + } } - levels = 1; } } /* Calculate levels for mip mapping. */ - if (usage & WINED3DUSAGE_AUTOGENMIPMAP) + if (desc->usage & WINED3DUSAGE_AUTOGENMIPMAP) { if (!gl_info->supported[SGIS_GENERATE_MIPMAP]) { @@ -934,24 +951,20 @@ static HRESULT texture_init(struct wined3d_texture *texture, UINT width, UINT he } else if (!levels) { - levels = wined3d_log2i(max(width, height)) + 1; + levels = wined3d_log2i(max(desc->width, desc->height)) + 1; TRACE("Calculated levels = %u.\n", levels); } - hr = wined3d_texture_init(texture, &texture2d_ops, 1, levels, - WINED3D_RTYPE_TEXTURE, device, usage, format, pool, - parent, parent_ops, &texture2d_resource_ops); - if (FAILED(hr)) + if (FAILED(hr = wined3d_texture_init(texture, &texture2d_ops, 1, levels, + desc, device, parent, parent_ops, &texture2d_resource_ops))) { WARN("Failed to initialize texture, returning %#x.\n", hr); return hr; } - /* Precalculated scaling for 'faked' non power of two texture coords. - * Second also don't use ARB_TEXTURE_RECTANGLE in case the surface format is P8 and EXT_PALETTED_TEXTURE - * is used in combination with texture uploads (RTL_READTEX). The reason is that EXT_PALETTED_TEXTURE - * doesn't work in combination with ARB_TEXTURE_RECTANGLE. */ - if (gl_info->supported[WINED3D_GL_NORMALIZED_TEXRECT] && (width != pow2_width || height != pow2_height)) + /* Precalculated scaling for 'faked' non power of two texture coords. */ + if (gl_info->supported[WINED3D_GL_NORMALIZED_TEXRECT] + && (desc->width != pow2_width || desc->height != pow2_height)) { texture->pow2_matrix[0] = 1.0f; texture->pow2_matrix[5] = 1.0f; @@ -961,19 +974,16 @@ static HRESULT texture_init(struct wined3d_texture *texture, UINT width, UINT he texture->flags |= WINED3D_TEXTURE_COND_NP2; texture->min_mip_lookup = minMipLookup_noFilter; } - else if (gl_info->supported[ARB_TEXTURE_RECTANGLE] && (width != pow2_width || height != pow2_height) - && !(format->id == WINED3DFMT_P8_UINT && gl_info->supported[EXT_PALETTED_TEXTURE] - && wined3d_settings.rendertargetlock_mode == RTL_READTEX)) + else if (gl_info->supported[ARB_TEXTURE_RECTANGLE] + && (desc->width != pow2_width || desc->height != pow2_height)) { - if (width != 1 || height != 1) - texture->flags &= ~WINED3D_TEXTURE_POW2_MAT_IDENT; - - texture->pow2_matrix[0] = (float)width; - texture->pow2_matrix[5] = (float)height; + texture->pow2_matrix[0] = (float)desc->width; + texture->pow2_matrix[5] = (float)desc->height; texture->pow2_matrix[10] = 1.0f; texture->pow2_matrix[15] = 1.0f; texture->target = GL_TEXTURE_RECTANGLE_ARB; texture->flags |= WINED3D_TEXTURE_COND_NP2; + texture->flags &= ~WINED3D_TEXTURE_POW2_MAT_IDENT; if (texture->resource.format->flags & WINED3DFMT_FLAG_FILTERING) texture->min_mip_lookup = minMipLookup_noMip; @@ -982,10 +992,10 @@ static HRESULT texture_init(struct wined3d_texture *texture, UINT width, UINT he } else { - if ((width != pow2_width) || (height != pow2_height)) + if ((desc->width != pow2_width) || (desc->height != pow2_height)) { - texture->pow2_matrix[0] = (((float)width) / ((float)pow2_width)); - texture->pow2_matrix[5] = (((float)height) / ((float)pow2_height)); + texture->pow2_matrix[0] = (((float)desc->width) / ((float)pow2_width)); + texture->pow2_matrix[5] = (((float)desc->height) / ((float)pow2_height)); texture->flags &= ~WINED3D_TEXTURE_POW2_MAT_IDENT; } else @@ -1001,28 +1011,28 @@ static HRESULT texture_init(struct wined3d_texture *texture, UINT width, UINT he TRACE("xf(%f) yf(%f)\n", texture->pow2_matrix[0], texture->pow2_matrix[5]); /* Generate all the surfaces. */ - tmp_w = width; - tmp_h = height; + surface_desc = *desc; + surface_desc.resource_type = WINED3D_RTYPE_SURFACE; for (i = 0; i < texture->level_count; ++i) { struct wined3d_surface *surface; /* Use the callback to create the texture surface. */ if (FAILED(hr = device->device_parent->ops->create_texture_surface(device->device_parent, - parent, tmp_w, tmp_h, format->id, usage, pool, i, &surface))) + parent, &surface_desc, i, surface_flags, &surface))) { FIXME("Failed to create surface %p, hr %#x\n", texture, hr); wined3d_texture_cleanup(texture); return hr; } - surface_set_container(surface, WINED3D_CONTAINER_TEXTURE, texture); + surface_set_container(surface, texture); surface_set_texture_target(surface, texture->target, i); texture->sub_resources[i] = &surface->resource; TRACE("Created surface level %u @ %p.\n", i, surface); /* Calculate the next mipmap level. */ - tmp_w = max(1, tmp_w >> 1); - tmp_h = max(1, tmp_h >> 1); + surface_desc.width = max(1, surface_desc.width >> 1); + surface_desc.height = max(1, surface_desc.height >> 1); } return WINED3D_OK; @@ -1042,64 +1052,44 @@ static HRESULT texture3d_bind(struct wined3d_texture *texture, /* Do not call while under the GL lock. */ static void texture3d_preload(struct wined3d_texture *texture, enum WINED3DSRGB srgb) { + UINT sub_count = texture->level_count * texture->layer_count; struct wined3d_device *device = texture->resource.device; - struct wined3d_context *context; - BOOL srgb_was_toggled = FALSE; - unsigned int i; + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + struct wined3d_context *context = NULL; + struct gl_texture *gl_tex; + BOOL srgb_mode; + UINT i; TRACE("texture %p, srgb %#x.\n", texture, srgb); - /* TODO: Use already acquired context when possible. */ - context = context_acquire(device, NULL); - if (texture->resource.bind_count > 0) - { - BOOL texture_srgb = texture->flags & WINED3D_TEXTURE_IS_SRGB; - BOOL sampler_srgb = texture_srgb_mode(texture, srgb); - srgb_was_toggled = !texture_srgb != !sampler_srgb; + srgb_mode = texture_srgb_mode(texture, srgb); + gl_tex = wined3d_texture_get_gl_texture(texture, gl_info, srgb_mode); - if (srgb_was_toggled) - { - if (sampler_srgb) - texture->flags |= WINED3D_TEXTURE_IS_SRGB; - else - texture->flags &= ~WINED3D_TEXTURE_IS_SRGB; - } - } + if (gl_tex->dirty) + { + context = context_acquire(device, NULL); - /* If the texture is marked dirty or the sRGB sampler setting has changed - * since the last load then reload the volumes. */ - if (texture->texture_rgb.dirty) - { - for (i = 0; i < texture->level_count; ++i) + /* Reload the surfaces if the texture is marked dirty. */ + for (i = 0; i < sub_count; ++i) { - volume_load(volume_from_resource(texture->sub_resources[i]), context, i, - texture->flags & WINED3D_TEXTURE_IS_SRGB); - } - } - else if (srgb_was_toggled) - { - for (i = 0; i < texture->level_count; ++i) - { - struct wined3d_volume *volume = volume_from_resource(texture->sub_resources[i]); - volume_add_dirty_box(volume, NULL); - volume_load(volume, context, i, texture->flags & WINED3D_TEXTURE_IS_SRGB); + wined3d_volume_load(volume_from_resource(texture->sub_resources[i]), context, + srgb_mode); } + + context_release(context); } else { TRACE("Texture %p not dirty, nothing to do.\n", texture); } - context_release(context); - - /* No longer dirty */ - texture->texture_rgb.dirty = FALSE; + /* No longer dirty. */ + gl_tex->dirty = FALSE; } static void texture3d_sub_resource_add_dirty_region(struct wined3d_resource *sub_resource, const struct wined3d_box *dirty_region) { - volume_add_dirty_box(volume_from_resource(sub_resource), dirty_region); } static void texture3d_sub_resource_cleanup(struct wined3d_resource *sub_resource) @@ -1141,19 +1131,17 @@ static const struct wined3d_resource_ops texture3d_resource_ops = texture3d_unload, }; -static HRESULT volumetexture_init(struct wined3d_texture *texture, UINT width, UINT height, - UINT depth, UINT levels, struct wined3d_device *device, DWORD usage, enum wined3d_format_id format_id, - enum wined3d_pool pool, void *parent, const struct wined3d_parent_ops *parent_ops) +static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct wined3d_resource_desc *desc, + UINT levels, struct wined3d_device *device, void *parent, const struct wined3d_parent_ops *parent_ops) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - const struct wined3d_format *format = wined3d_get_format(gl_info, format_id); UINT tmp_w, tmp_h, tmp_d; unsigned int i; HRESULT hr; /* TODO: It should only be possible to create textures for formats * that are reported as supported. */ - if (WINED3DFMT_UNKNOWN >= format_id) + if (WINED3DFMT_UNKNOWN >= desc->format) { WARN("(%p) : Texture cannot be created with a format of WINED3DFMT_UNKNOWN.\n", texture); return WINED3DERR_INVALIDCALL; @@ -1166,7 +1154,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, UINT width, U } /* Calculate levels for mip mapping. */ - if (usage & WINED3DUSAGE_AUTOGENMIPMAP) + if (desc->usage & WINED3DUSAGE_AUTOGENMIPMAP) { if (!gl_info->supported[SGIS_GENERATE_MIPMAP]) { @@ -1184,20 +1172,45 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, UINT width, U } else if (!levels) { - levels = wined3d_log2i(max(max(width, height), depth)) + 1; + levels = wined3d_log2i(max(max(desc->width, desc->height), desc->depth)) + 1; TRACE("Calculated levels = %u.\n", levels); } - hr = wined3d_texture_init(texture, &texture3d_ops, 1, levels, - WINED3D_RTYPE_VOLUME_TEXTURE, device, usage, format, pool, - parent, parent_ops, &texture3d_resource_ops); - if (FAILED(hr)) + if (!gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO]) + { + UINT pow2_w, pow2_h, pow2_d; + pow2_w = 1; + while (pow2_w < desc->width) + pow2_w <<= 1; + pow2_h = 1; + while (pow2_h < desc->height) + pow2_h <<= 1; + pow2_d = 1; + while (pow2_d < desc->depth) + pow2_d <<= 1; + + if (pow2_w != desc->width || pow2_h != desc->height || pow2_d != desc->depth) + { + if (desc->pool == WINED3D_POOL_SCRATCH) + { + WARN("Creating a scratch NPOT volume texture despite lack of HW support.\n"); + } + else + { + WARN("Attempted to create a NPOT volume texture (%u, %u, %u) without GL support.\n", + desc->width, desc->height, desc->depth); + return WINED3DERR_INVALIDCALL; + } + } + } + + if (FAILED(hr = wined3d_texture_init(texture, &texture3d_ops, 1, levels, + desc, device, parent, parent_ops, &texture3d_resource_ops))) { WARN("Failed to initialize texture, returning %#x.\n", hr); return hr; } - /* Is NP2 support for volumes needed? */ texture->pow2_matrix[0] = 1.0f; texture->pow2_matrix[5] = 1.0f; texture->pow2_matrix[10] = 1.0f; @@ -1205,9 +1218,9 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, UINT width, U texture->target = GL_TEXTURE_3D; /* Generate all the surfaces. */ - tmp_w = width; - tmp_h = height; - tmp_d = depth; + tmp_w = desc->width; + tmp_h = desc->height; + tmp_d = desc->depth; for (i = 0; i < texture->level_count; ++i) { @@ -1215,7 +1228,7 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, UINT width, U /* Create the volume. */ hr = device->device_parent->ops->create_volume(device->device_parent, parent, - tmp_w, tmp_h, tmp_d, format_id, pool, usage, &volume); + tmp_w, tmp_h, tmp_d, i, desc->format, desc->pool, desc->usage, &volume); if (FAILED(hr)) { ERR("Creating a volume for the volume texture failed, hr %#x.\n", hr); @@ -1236,17 +1249,15 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, UINT width, U return WINED3D_OK; } -HRESULT CDECL wined3d_texture_create_2d(struct wined3d_device *device, UINT width, UINT height, - UINT level_count, DWORD usage, enum wined3d_format_id format_id, enum wined3d_pool pool, void *parent, - const struct wined3d_parent_ops *parent_ops, struct wined3d_texture **texture) +HRESULT CDECL wined3d_texture_create_2d(struct wined3d_device *device, const struct wined3d_resource_desc *desc, + UINT level_count, DWORD surface_flags, void *parent, const struct wined3d_parent_ops *parent_ops, + struct wined3d_texture **texture) { struct wined3d_texture *object; HRESULT hr; - TRACE("device %p, width %u, height %u, level_count %u, usage %#x\n", - device, width, height, level_count, usage); - TRACE("format %s, pool %#x, parent %p, parent_ops %p, texture %p.\n", - debug_d3dformat(format_id), pool, parent, parent_ops, texture); + TRACE("device %p, desc %p, level_count %u, surface_flags %#x, parent %p, parent_ops %p, texture %p.\n", + device, desc, level_count, surface_flags, parent, parent_ops, texture); object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) @@ -1255,9 +1266,7 @@ HRESULT CDECL wined3d_texture_create_2d(struct wined3d_device *device, UINT widt return WINED3DERR_OUTOFVIDEOMEMORY; } - hr = texture_init(object, width, height, level_count, - device, usage, format_id, pool, parent, parent_ops); - if (FAILED(hr)) + if (FAILED(hr = texture_init(object, desc, level_count, surface_flags, device, parent, parent_ops))) { WARN("Failed to initialize texture, returning %#x.\n", hr); HeapFree(GetProcessHeap(), 0, object); @@ -1271,17 +1280,14 @@ HRESULT CDECL wined3d_texture_create_2d(struct wined3d_device *device, UINT widt return WINED3D_OK; } -HRESULT CDECL wined3d_texture_create_3d(struct wined3d_device *device, UINT width, UINT height, UINT depth, - UINT level_count, DWORD usage, enum wined3d_format_id format_id, enum wined3d_pool pool, void *parent, - const struct wined3d_parent_ops *parent_ops, struct wined3d_texture **texture) +HRESULT CDECL wined3d_texture_create_3d(struct wined3d_device *device, const struct wined3d_resource_desc *desc, + UINT level_count, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_texture **texture) { struct wined3d_texture *object; HRESULT hr; - TRACE("device %p, width %u, height %u, depth %u, level_count %u, usage %#x\n", - device, width, height, depth, level_count, usage); - TRACE("format %s, pool %#x, parent %p, parent_ops %p, texture %p.\n", - debug_d3dformat(format_id), pool, parent, parent_ops, texture); + TRACE("device %p, desc %p, level_count %u, parent %p, parent_ops %p, texture %p.\n", + device, desc, level_count, parent, parent_ops, texture); object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) @@ -1290,9 +1296,7 @@ HRESULT CDECL wined3d_texture_create_3d(struct wined3d_device *device, UINT widt return WINED3DERR_OUTOFVIDEOMEMORY; } - hr = volumetexture_init(object, width, height, depth, level_count, - device, usage, format_id, pool, parent, parent_ops); - if (FAILED(hr)) + if (FAILED(hr = volumetexture_init(object, desc, level_count, device, parent, parent_ops))) { WARN("Failed to initialize volumetexture, returning %#x\n", hr); HeapFree(GetProcessHeap(), 0, object); @@ -1306,17 +1310,15 @@ HRESULT CDECL wined3d_texture_create_3d(struct wined3d_device *device, UINT widt return WINED3D_OK; } -HRESULT CDECL wined3d_texture_create_cube(struct wined3d_device *device, UINT edge_length, - UINT level_count, DWORD usage, enum wined3d_format_id format_id, enum wined3d_pool pool, void *parent, - const struct wined3d_parent_ops *parent_ops, struct wined3d_texture **texture) +HRESULT CDECL wined3d_texture_create_cube(struct wined3d_device *device, const struct wined3d_resource_desc *desc, + UINT level_count, DWORD surface_flags, void *parent, const struct wined3d_parent_ops *parent_ops, + struct wined3d_texture **texture) { struct wined3d_texture *object; HRESULT hr; - TRACE("device %p, edge_length %u, level_count %u, usage %#x\n", - device, edge_length, level_count, usage); - TRACE("format %s, pool %#x, parent %p, parent_ops %p, texture %p.\n", - debug_d3dformat(format_id), pool, parent, parent_ops, texture); + TRACE("device %p, desc %p, level_count %u, surface_flags %#x, parent %p, parent_ops %p, texture %p.\n", + device, desc, level_count, surface_flags, parent, parent_ops, texture); object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); if (!object) @@ -1325,9 +1327,7 @@ HRESULT CDECL wined3d_texture_create_cube(struct wined3d_device *device, UINT ed return WINED3DERR_OUTOFVIDEOMEMORY; } - hr = cubetexture_init(object, edge_length, level_count, - device, usage, format_id, pool, parent, parent_ops); - if (FAILED(hr)) + if (FAILED(hr = cubetexture_init(object, desc, level_count, surface_flags, device, parent, parent_ops))) { WARN("Failed to initialize cubetexture, returning %#x\n", hr); HeapFree(GetProcessHeap(), 0, object); diff --git a/dll/directx/wine/wined3d/utils.c b/dll/directx/wine/wined3d/utils.c index 807ff02cba0..16358aca431 100644 --- a/dll/directx/wine/wined3d/utils.c +++ b/dll/directx/wine/wined3d/utils.c @@ -120,18 +120,33 @@ static const struct wined3d_format_channels formats[] = {WINED3DFMT_VERTEXDATA, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {WINED3DFMT_R16_UINT, 16, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0}, {WINED3DFMT_R32_UINT, 32, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0}, + {WINED3DFMT_R32G32_UINT, 32, 32, 0, 0, 0, 32, 0, 0, 8, 0, 0}, + {WINED3DFMT_R32G32B32_UINT, 32, 32, 32, 0, 0, 32, 64, 0, 12, 0, 0}, + {WINED3DFMT_R32G32B32A32_UINT, 32, 32, 32, 32, 0, 32, 64, 96, 16, 0, 0}, {WINED3DFMT_R16G16B16A16_SNORM, 16, 16, 16, 16, 0, 16, 32, 48, 8, 0, 0}, /* Vendor-specific formats */ {WINED3DFMT_ATI2N, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0}, {WINED3DFMT_NVDB, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {WINED3DFMT_INST, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {WINED3DFMT_INTZ, 0, 0, 0, 0, 0, 0, 0, 0, 4, 24, 8}, + {WINED3DFMT_RESZ, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {WINED3DFMT_NVHU, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0}, {WINED3DFMT_NVHS, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0}, {WINED3DFMT_NULL, 8, 8, 8, 8, 0, 8, 16, 24, 4, 0, 0}, /* Unsure about them, could not find a Windows driver that supports them */ {WINED3DFMT_R16, 16, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0}, {WINED3DFMT_AL16, 0, 0, 0, 16, 0, 0, 0, 16, 4, 0, 0}, + /* Typeless */ + {WINED3DFMT_R8_TYPELESS, 8, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0}, + {WINED3DFMT_R8G8_TYPELESS, 8, 8, 0, 0, 0, 8, 0, 0, 2, 0, 0}, + {WINED3DFMT_R8G8B8A8_TYPELESS, 8, 8, 8, 8, 0, 8, 16, 24, 4, 0, 0}, + {WINED3DFMT_R16_TYPELESS, 16, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0}, + {WINED3DFMT_R16G16_TYPELESS, 16, 16, 0, 0, 0, 16, 0, 0, 4, 0, 0}, + {WINED3DFMT_R16G16B16A16_TYPELESS, 16, 16, 16, 16, 0, 16, 32, 48, 8, 0, 0}, + {WINED3DFMT_R32_TYPELESS, 32, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0}, + {WINED3DFMT_R32G32_TYPELESS, 32, 32, 0, 0, 0, 32, 0, 0, 8, 0, 0}, + {WINED3DFMT_R32G32B32_TYPELESS, 32, 32, 32, 0, 0, 32, 64, 0, 12, 0, 0}, + {WINED3DFMT_R32G32B32A32_TYPELESS, 32, 32, 32, 32, 0, 32, 64, 96, 16, 0, 0}, }; struct wined3d_format_base_flags @@ -145,19 +160,6 @@ struct wined3d_format_base_flags * resource size. */ static const struct wined3d_format_base_flags format_base_flags[] = { - {WINED3DFMT_UYVY, WINED3DFMT_FLAG_FOURCC}, - {WINED3DFMT_YUY2, WINED3DFMT_FLAG_FOURCC}, - {WINED3DFMT_YV12, WINED3DFMT_FLAG_FOURCC}, - {WINED3DFMT_DXT1, WINED3DFMT_FLAG_FOURCC}, - {WINED3DFMT_DXT2, WINED3DFMT_FLAG_FOURCC}, - {WINED3DFMT_DXT3, WINED3DFMT_FLAG_FOURCC}, - {WINED3DFMT_DXT4, WINED3DFMT_FLAG_FOURCC}, - {WINED3DFMT_DXT5, WINED3DFMT_FLAG_FOURCC}, - {WINED3DFMT_MULTI2_ARGB8, WINED3DFMT_FLAG_FOURCC}, - {WINED3DFMT_G8R8_G8B8, WINED3DFMT_FLAG_FOURCC}, - {WINED3DFMT_R8G8_B8G8, WINED3DFMT_FLAG_FOURCC}, - {WINED3DFMT_INTZ, WINED3DFMT_FLAG_FOURCC}, - {WINED3DFMT_NULL, WINED3DFMT_FLAG_FOURCC}, {WINED3DFMT_P8_UINT, WINED3DFMT_FLAG_GETDC}, {WINED3DFMT_B8G8R8_UNORM, WINED3DFMT_FLAG_GETDC}, {WINED3DFMT_B8G8R8A8_UNORM, WINED3DFMT_FLAG_GETDC}, @@ -169,10 +171,7 @@ static const struct wined3d_format_base_flags format_base_flags[] = {WINED3DFMT_B4G4R4X4_UNORM, WINED3DFMT_FLAG_GETDC}, {WINED3DFMT_R8G8B8A8_UNORM, WINED3DFMT_FLAG_GETDC}, {WINED3DFMT_R8G8B8X8_UNORM, WINED3DFMT_FLAG_GETDC}, - {WINED3DFMT_ATI2N, WINED3DFMT_FLAG_FOURCC | WINED3DFMT_FLAG_BROKEN_PITCH}, - {WINED3DFMT_NVDB, WINED3DFMT_FLAG_FOURCC}, - {WINED3DFMT_NVHU, WINED3DFMT_FLAG_FOURCC}, - {WINED3DFMT_NVHS, WINED3DFMT_FLAG_FOURCC}, + {WINED3DFMT_ATI2N, WINED3DFMT_FLAG_BROKEN_PITCH}, {WINED3DFMT_R32_FLOAT, WINED3DFMT_FLAG_FLOAT}, {WINED3DFMT_R32G32_FLOAT, WINED3DFMT_FLAG_FLOAT}, {WINED3DFMT_R32G32B32_FLOAT, WINED3DFMT_FLAG_FLOAT}, @@ -233,7 +232,11 @@ static const struct wined3d_format_vertex_info format_vertex_info[] = {WINED3DFMT_R10G10B10A2_UINT, WINED3D_FFP_EMIT_UDEC3, 3, GL_UNSIGNED_SHORT, 3, GL_FALSE, sizeof(short int)}, {WINED3DFMT_R10G10B10A2_SNORM, WINED3D_FFP_EMIT_DEC3N, 3, GL_SHORT, 3, GL_TRUE, sizeof(short int)}, {WINED3DFMT_R16G16_FLOAT, WINED3D_FFP_EMIT_FLOAT16_2, 2, GL_FLOAT, 2, GL_FALSE, sizeof(GLhalfNV)}, - {WINED3DFMT_R16G16B16A16_FLOAT, WINED3D_FFP_EMIT_FLOAT16_4, 4, GL_FLOAT, 4, GL_FALSE, sizeof(GLhalfNV)} + {WINED3DFMT_R16G16B16A16_FLOAT, WINED3D_FFP_EMIT_FLOAT16_4, 4, GL_FLOAT, 4, GL_FALSE, sizeof(GLhalfNV)}, + {WINED3DFMT_R32_UINT, WINED3D_FFP_EMIT_INVALID, 1, GL_UNSIGNED_INT, 1, GL_FALSE, sizeof(UINT)}, + {WINED3DFMT_R32G32_UINT, WINED3D_FFP_EMIT_INVALID, 2, GL_UNSIGNED_INT, 2, GL_FALSE, sizeof(UINT)}, + {WINED3DFMT_R32G32B32_UINT, WINED3D_FFP_EMIT_INVALID, 3, GL_UNSIGNED_INT, 3, GL_FALSE, sizeof(UINT)}, + {WINED3DFMT_R32G32B32A32_UINT, WINED3D_FFP_EMIT_INVALID, 4, GL_UNSIGNED_INT, 4, GL_FALSE, sizeof(UINT)}, }; struct wined3d_format_texture_info @@ -581,10 +584,10 @@ static void convert_s8_uint_d24_float(const BYTE *src, BYTE *dst, UINT pitch, UI * WINED3DFMT_NVHS */ static const struct wined3d_format_texture_info format_texture_info[] = { - /* format id internal srgbInternal rtInternal - format type + /* format id gl_internal gl_srgb_internal gl_rt_internal + gl_format gl_type conv_byte_count flags - extension */ + extension convert */ /* FourCC formats */ /* GL_APPLE_ycbcr_422 claims that its '2YUV' format, which is supported via the UNSIGNED_SHORT_8_8_REV_APPLE type * is equivalent to 'UYVY' format on Windows, and the 'YUVS' via UNSIGNED_SHORT_8_8_APPLE equates to 'YUY2'. The @@ -685,10 +688,6 @@ static const struct wined3d_format_texture_info format_texture_info[] = GL_ALPHA, GL_UNSIGNED_BYTE, 0, 0, ARB_FRAGMENT_PROGRAM, NULL}, - {WINED3DFMT_P8_UINT, GL_COLOR_INDEX8_EXT, GL_COLOR_INDEX8_EXT, 0, - GL_COLOR_INDEX, GL_UNSIGNED_BYTE, 0, - 0, - EXT_PALETTED_TEXTURE, NULL}, /* Standard ARGB formats */ {WINED3DFMT_B8G8R8_UNORM, GL_RGB8, GL_RGB8, 0, GL_BGR, GL_UNSIGNED_BYTE, 0, @@ -924,7 +923,7 @@ static const struct wined3d_format_texture_info format_texture_info[] = WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL, ARB_FRAMEBUFFER_OBJECT, NULL}, - {WINED3DFMT_NULL, GL_RGBA8, GL_RGBA8, 0, + {WINED3DFMT_NULL, 0, 0, 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, 0, WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_RENDERTARGET, ARB_FRAMEBUFFER_OBJECT, NULL}, @@ -1236,12 +1235,105 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined gl_info->gl_ops.gl.p_glDeleteTextures(1, &tex); } +static void query_format_flag(struct wined3d_gl_info *gl_info, struct wined3d_format *format, + GLint internal, GLenum pname, DWORD flag, const char *string) +{ + GLint value; + + gl_info->gl_ops.ext.p_glGetInternalformativ(GL_TEXTURE_2D, internal, pname, 1, &value); + if (value == GL_FULL_SUPPORT) + { + TRACE("Format %s supports %s.\n", debug_d3dformat(format->id), string); + format->flags |= flag; + } + else + { + TRACE("Format %s doesn't support %s.\n", debug_d3dformat(format->id), string); + format->flags &= ~flag; + } +} + /* Context activation is done by the caller. */ static void init_format_fbo_compat_info(struct wined3d_gl_info *gl_info) { unsigned int i; GLuint fbo; + if (gl_info->supported[ARB_INTERNALFORMAT_QUERY2]) + { + for (i = 0; i < sizeof(formats) / sizeof(*formats); ++i) + { + GLint value; + struct wined3d_format *format = &gl_info->formats[i]; + + if (!format->glInternal) + continue; + if (format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL)) + continue; + + gl_info->gl_ops.ext.p_glGetInternalformativ(GL_TEXTURE_2D, format->glInternal, + GL_FRAMEBUFFER_RENDERABLE, 1, &value); + if (value == GL_FULL_SUPPORT) + { + TRACE("Format %s is supported as FBO color attachment.\n", debug_d3dformat(format->id)); + format->flags |= WINED3DFMT_FLAG_FBO_ATTACHABLE; + format->rtInternal = format->glInternal; + + query_format_flag(gl_info, format, format->glInternal, GL_FRAMEBUFFER_BLEND, + WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING, "post-pixelshader blending"); + } + else + { + if (!format->rtInternal) + { + if (format->flags & WINED3DFMT_FLAG_RENDERTARGET) + { + WARN("Format %s with rendertarget flag is not supported as FBO color attachment" + " and no fallback specified.\n", debug_d3dformat(format->id)); + format->flags &= ~WINED3DFMT_FLAG_RENDERTARGET; + } + else + TRACE("Format %s is not supported as FBO color attachment.\n", debug_d3dformat(format->id)); + format->rtInternal = format->glInternal; + } + else + { + gl_info->gl_ops.ext.p_glGetInternalformativ(GL_TEXTURE_2D, format->rtInternal, + GL_FRAMEBUFFER_RENDERABLE, 1, &value); + if (value == GL_FULL_SUPPORT) + { + TRACE("Format %s rtInternal format is supported as FBO color attachment.\n", + debug_d3dformat(format->id)); + } + else + { + WARN("Format %s rtInternal format is not supported as FBO color attachment.\n", + debug_d3dformat(format->id)); + format->flags &= ~WINED3DFMT_FLAG_RENDERTARGET; + } + } + } + + if (format->glInternal != format->glGammaInternal) + { + gl_info->gl_ops.ext.p_glGetInternalformativ(GL_TEXTURE_2D, format->glGammaInternal, + GL_FRAMEBUFFER_RENDERABLE, 1, &value); + if (value == GL_FULL_SUPPORT) + { + TRACE("Format %s's sRGB format is FBO attachable.\n", debug_d3dformat(format->id)); + format->flags |= WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB; + } + else + { + WARN("Format %s's sRGB format is not FBO attachable.\n", debug_d3dformat(format->id)); + } + } + else if (format->flags & WINED3DFMT_FLAG_FBO_ATTACHABLE) + format->flags |= WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB; + } + return; + } + if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { gl_info->fbo_ops.glGenFramebuffers(1, &fbo); @@ -1329,30 +1421,57 @@ static BOOL init_format_texture_info(struct wined3d_adapter *adapter, struct win format->height_scale.numerator = 1; format->height_scale.denominator = 1; - if (!gl_info->limits.vertex_samplers) - format->flags &= ~WINED3DFMT_FLAG_VTF; - - if (!(gl_info->quirks & WINED3D_QUIRK_LIMITED_TEX_FILTERING)) - format->flags |= WINED3DFMT_FLAG_FILTERING; - else if (format->id != WINED3DFMT_R32G32B32A32_FLOAT && format->id != WINED3DFMT_R32_FLOAT) - format->flags &= ~WINED3DFMT_FLAG_VTF; - - if (format->glGammaInternal != format->glInternal) + if (gl_info->supported[ARB_INTERNALFORMAT_QUERY2]) { - /* Filter sRGB capabilities if EXT_texture_sRGB is not supported. */ - if (!gl_info->supported[EXT_TEXTURE_SRGB]) + query_format_flag(gl_info, format, format->glInternal, GL_VERTEX_TEXTURE, + WINED3DFMT_FLAG_VTF, "vertex texture usage"); + query_format_flag(gl_info, format, format->glInternal, GL_FILTER, + WINED3DFMT_FLAG_FILTERING, "filtering"); + + if (format->glGammaInternal != format->glInternal) { - format->glGammaInternal = format->glInternal; - format->flags &= ~(WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE); - } - else if (gl_info->supported[EXT_TEXTURE_SRGB_DECODE]) - { - format->glInternal = format->glGammaInternal; + query_format_flag(gl_info, format, format->glGammaInternal, GL_SRGB_READ, + WINED3DFMT_FLAG_SRGB_READ, "sRGB read"); + + if (srgb_write) + query_format_flag(gl_info, format, format->glGammaInternal, GL_SRGB_WRITE, + WINED3DFMT_FLAG_SRGB_WRITE, "sRGB write"); + else + format->flags &= ~WINED3DFMT_FLAG_SRGB_WRITE; + + if (!(format->flags & (WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE))) + format->glGammaInternal = format->glInternal; + else if (gl_info->supported[EXT_TEXTURE_SRGB_DECODE]) + format->glInternal = format->glGammaInternal; } } + else + { + if (!gl_info->limits.vertex_samplers) + format->flags &= ~WINED3DFMT_FLAG_VTF; - if ((format->flags & WINED3DFMT_FLAG_SRGB_WRITE) && !srgb_write) - format->flags &= ~WINED3DFMT_FLAG_SRGB_WRITE; + if (!(gl_info->quirks & WINED3D_QUIRK_LIMITED_TEX_FILTERING)) + format->flags |= WINED3DFMT_FLAG_FILTERING; + else if (format->id != WINED3DFMT_R32G32B32A32_FLOAT && format->id != WINED3DFMT_R32_FLOAT) + format->flags &= ~WINED3DFMT_FLAG_VTF; + + if (format->glGammaInternal != format->glInternal) + { + /* Filter sRGB capabilities if EXT_texture_sRGB is not supported. */ + if (!gl_info->supported[EXT_TEXTURE_SRGB]) + { + format->glGammaInternal = format->glInternal; + format->flags &= ~(WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE); + } + else if (gl_info->supported[EXT_TEXTURE_SRGB_DECODE]) + { + format->glInternal = format->glGammaInternal; + } + } + + if ((format->flags & WINED3DFMT_FLAG_SRGB_WRITE) && !srgb_write) + format->flags &= ~WINED3DFMT_FLAG_SRGB_WRITE; + } /* Texture conversion stuff */ format->convert = format_texture_info[i].convert; @@ -1485,6 +1604,10 @@ static void init_format_filter_info(struct wined3d_gl_info *gl_info, enum wined3 }; BOOL filtered; + if (gl_info->supported[ARB_INTERNALFORMAT_QUERY2]) + /* This was already handled by init_format_texture_info(). */ + return; + if(wined3d_settings.offscreen_rendering_mode != ORM_FBO) { WARN("No FBO support, or no FBO ORM, guessing filter info from GL caps\n"); @@ -1640,7 +1763,7 @@ static void apply_format_fixups(struct wined3d_adapter *adapter, struct wined3d_ gl_info->formats[idx].height_scale.denominator = 2; gl_info->formats[idx].color_fixup = create_complex_fixup_desc(COMPLEX_FIXUP_YV12); - if (gl_info->supported[EXT_PALETTED_TEXTURE] || gl_info->supported[ARB_FRAGMENT_PROGRAM]) + if (gl_info->supported[ARB_FRAGMENT_PROGRAM]) { idx = getFmtIdx(WINED3DFMT_P8_UINT); gl_info->formats[idx].color_fixup = create_complex_fixup_desc(COMPLEX_FIXUP_P8); @@ -1712,9 +1835,18 @@ static void apply_format_fixups(struct wined3d_adapter *adapter, struct wined3d_ gl_info->formats[idx].flags |= WINED3DFMT_FLAG_TEXTURE; } + /* RESZ aka AMD DX9-level hack for multisampled depth buffer resolve. You query for RESZ + * support by checking for availability of MAKEFOURCC('R','E','S','Z') surfaces with + * RENDERTARGET usage. */ + if (gl_info->supported[ARB_FRAMEBUFFER_OBJECT]) + { + idx = getFmtIdx(WINED3DFMT_RESZ); + gl_info->formats[idx].flags |= WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_RENDERTARGET; + } + for (i = 0; i < sizeof(formats) / sizeof(*formats); ++i) { - struct wined3d_format *format = &gl_info->formats[idx]; + struct wined3d_format *format = &gl_info->formats[i]; if (!(format->flags & WINED3DFMT_FLAG_TEXTURE)) continue; @@ -1806,7 +1938,8 @@ const struct wined3d_format *wined3d_get_format(const struct wined3d_gl_info *gl return &gl_info->formats[idx]; } -UINT wined3d_format_calculate_size(const struct wined3d_format *format, UINT alignment, UINT width, UINT height) +UINT wined3d_format_calculate_size(const struct wined3d_format *format, UINT alignment, + UINT width, UINT height, UINT depth) { UINT size; @@ -1832,6 +1965,8 @@ UINT wined3d_format_calculate_size(const struct wined3d_format *format, UINT ali size /= format->height_scale.denominator; } + size *= depth; + return size; } @@ -1975,6 +2110,7 @@ const char *debug_d3dformat(enum wined3d_format_id format_id) FMT_TO_STR(WINED3DFMT_B8G8R8A8_UNORM); FMT_TO_STR(WINED3DFMT_B8G8R8X8_UNORM); FMT_TO_STR(WINED3DFMT_INTZ); + FMT_TO_STR(WINED3DFMT_RESZ); FMT_TO_STR(WINED3DFMT_NULL); FMT_TO_STR(WINED3DFMT_R16); FMT_TO_STR(WINED3DFMT_AL16); @@ -2449,10 +2585,8 @@ const char *debug_d3dstate(DWORD state) return "STATE_GEOMETRY_SHADER"; if (STATE_IS_VIEWPORT(state)) return "STATE_VIEWPORT"; - if (STATE_IS_VERTEXSHADERCONSTANT(state)) - return "STATE_VERTEXSHADERCONSTANT"; - if (STATE_IS_PIXELSHADERCONSTANT(state)) - return "STATE_PIXELSHADERCONSTANT"; + if (STATE_IS_LIGHT_TYPE(state)) + return "STATE_LIGHT_TYPE"; if (STATE_IS_ACTIVELIGHT(state)) return wine_dbg_sprintf("STATE_ACTIVELIGHT(%#x)", state - STATE_ACTIVELIGHT(0)); if (STATE_IS_SCISSORRECT(state)) @@ -2469,6 +2603,8 @@ const char *debug_d3dstate(DWORD state) return "STATE_BASEVERTEXINDEX"; if (STATE_IS_FRAMEBUFFER(state)) return "STATE_FRAMEBUFFER"; + if (STATE_IS_POINT_SIZE_ENABLE(state)) + return "STATE_POINT_SIZE_ENABLE"; return wine_dbg_sprintf("UNKNOWN_STATE(%#x)", state); } @@ -2971,7 +3107,7 @@ DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) { return size; } -void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_state *state, +void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d_state *state, struct ffp_frag_settings *settings, BOOL ignore_textype) { #define ARG1 0x01 @@ -3011,9 +3147,10 @@ void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_s DWORD ttff; DWORD cop, aop, carg0, carg1, carg2, aarg0, aarg1, aarg2; const struct wined3d_surface *rt = state->fb->render_targets[0]; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + const struct wined3d_gl_info *gl_info = context->gl_info; + const struct wined3d_d3d_info *d3d_info = context->d3d_info; - for (i = 0; i < gl_info->limits.texture_stages; ++i) + for (i = 0; i < d3d_info->limits.ffp_blend_stages; ++i) { const struct wined3d_texture *texture; @@ -3183,13 +3320,13 @@ void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_s if (!state->render_states[WINED3D_RS_FOGENABLE]) { - settings->fog = FOG_OFF; + settings->fog = WINED3D_FFP_PS_FOG_OFF; } else if (state->render_states[WINED3D_RS_FOGTABLEMODE] == WINED3D_FOG_NONE) { if (use_vs(state) || state->vertex_declaration->position_transformed) { - settings->fog = FOG_LINEAR; + settings->fog = WINED3D_FFP_PS_FOG_LINEAR; } else { @@ -3197,13 +3334,13 @@ void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_s { case WINED3D_FOG_NONE: case WINED3D_FOG_LINEAR: - settings->fog = FOG_LINEAR; + settings->fog = WINED3D_FFP_PS_FOG_LINEAR; break; case WINED3D_FOG_EXP: - settings->fog = FOG_EXP; + settings->fog = WINED3D_FFP_PS_FOG_EXP; break; case WINED3D_FOG_EXP2: - settings->fog = FOG_EXP2; + settings->fog = WINED3D_FFP_PS_FOG_EXP2; break; } } @@ -3213,13 +3350,13 @@ void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_s switch (state->render_states[WINED3D_RS_FOGTABLEMODE]) { case WINED3D_FOG_LINEAR: - settings->fog = FOG_LINEAR; + settings->fog = WINED3D_FFP_PS_FOG_LINEAR; break; case WINED3D_FOG_EXP: - settings->fog = FOG_EXP; + settings->fog = WINED3D_FFP_PS_FOG_EXP; break; case WINED3D_FOG_EXP2: - settings->fog = FOG_EXP2; + settings->fog = WINED3D_FFP_PS_FOG_EXP2; break; } } @@ -3231,7 +3368,7 @@ void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_s } else { settings->sRGB_write = 0; } - if (device->vs_clipping || !use_vs(state) || !state->render_states[WINED3D_RS_CLIPPING] + if (d3d_info->vs_clipping || !use_vs(state) || !state->render_states[WINED3D_RS_CLIPPING] || !state->render_states[WINED3D_RS_CLIPPLANEENABLE]) { /* No need to emulate clipplanes if GL supports native vertex shader clipping or if @@ -3401,6 +3538,117 @@ const struct wine_rb_functions wined3d_ffp_frag_program_rb_functions = ffp_frag_program_key_compare, }; +void wined3d_ffp_get_vs_settings(const struct wined3d_state *state, const struct wined3d_stream_info *si, + struct wined3d_ffp_vs_settings *settings) +{ + unsigned int coord_idx, i; + + if (si->position_transformed) + { + memset(settings, 0, sizeof(*settings)); + + settings->transformed = 1; + settings->point_size = state->gl_primitive_type == GL_POINTS; + if (!state->render_states[WINED3D_RS_FOGENABLE]) + settings->fog_mode = WINED3D_FFP_VS_FOG_OFF; + else if (state->render_states[WINED3D_RS_FOGTABLEMODE] != WINED3D_FOG_NONE) + settings->fog_mode = WINED3D_FFP_VS_FOG_DEPTH; + else + settings->fog_mode = WINED3D_FFP_VS_FOG_FOGCOORD; + + for (i = 0; i < MAX_TEXTURES; ++i) + { + coord_idx = state->texture_states[i][WINED3D_TSS_TEXCOORD_INDEX]; + if (coord_idx < MAX_TEXTURES && (si->use_map & (1 << (WINED3D_FFP_TEXCOORD0 + coord_idx)))) + settings->texcoords |= 1 << i; + settings->texgen[i] = (state->texture_states[i][WINED3D_TSS_TEXCOORD_INDEX] >> WINED3D_FFP_TCI_SHIFT) + & WINED3D_FFP_TCI_MASK; + } + return; + } + + settings->transformed = 0; + settings->clipping = state->render_states[WINED3D_RS_CLIPPING] + && state->render_states[WINED3D_RS_CLIPPLANEENABLE]; + settings->normal = !!(si->use_map & (1 << WINED3D_FFP_NORMAL)); + settings->normalize = settings->normal && state->render_states[WINED3D_RS_NORMALIZENORMALS]; + settings->lighting = !!state->render_states[WINED3D_RS_LIGHTING]; + settings->localviewer = !!state->render_states[WINED3D_RS_LOCALVIEWER]; + settings->point_size = state->gl_primitive_type == GL_POINTS; + + if (state->render_states[WINED3D_RS_COLORVERTEX] && (si->use_map & (1 << WINED3D_FFP_DIFFUSE))) + { + settings->diffuse_source = state->render_states[WINED3D_RS_DIFFUSEMATERIALSOURCE]; + settings->emission_source = state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE]; + settings->ambient_source = state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE]; + settings->specular_source = state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE]; + } + else + { + settings->diffuse_source = WINED3D_MCS_MATERIAL; + settings->emission_source = WINED3D_MCS_MATERIAL; + settings->ambient_source = WINED3D_MCS_MATERIAL; + settings->specular_source = WINED3D_MCS_MATERIAL; + } + + settings->texcoords = 0; + for (i = 0; i < MAX_TEXTURES; ++i) + { + coord_idx = state->texture_states[i][WINED3D_TSS_TEXCOORD_INDEX]; + if (coord_idx < MAX_TEXTURES && (si->use_map & (1 << (WINED3D_FFP_TEXCOORD0 + coord_idx)))) + settings->texcoords |= 1 << i; + settings->texgen[i] = (state->texture_states[i][WINED3D_TSS_TEXCOORD_INDEX] >> WINED3D_FFP_TCI_SHIFT) + & WINED3D_FFP_TCI_MASK; + } + + settings->light_type = 0; + for (i = 0; i < MAX_ACTIVE_LIGHTS; ++i) + { + if (state->lights[i]) + settings->light_type |= (state->lights[i]->OriginalParms.type + & WINED3D_FFP_LIGHT_TYPE_MASK) << WINED3D_FFP_LIGHT_TYPE_SHIFT(i); + } + + settings->ortho_fog = 0; + if (!state->render_states[WINED3D_RS_FOGENABLE]) + settings->fog_mode = WINED3D_FFP_VS_FOG_OFF; + else if (state->render_states[WINED3D_RS_FOGTABLEMODE] != WINED3D_FOG_NONE) + { + settings->fog_mode = WINED3D_FFP_VS_FOG_DEPTH; + + if (state->transforms[WINED3D_TS_PROJECTION].u.m[0][3] == 0.0f + && state->transforms[WINED3D_TS_PROJECTION].u.m[1][3] == 0.0f + && state->transforms[WINED3D_TS_PROJECTION].u.m[2][3] == 0.0f + && state->transforms[WINED3D_TS_PROJECTION].u.m[3][3] == 1.0f) + settings->ortho_fog = 1; + } + else if (state->render_states[WINED3D_RS_FOGVERTEXMODE] == WINED3D_FOG_NONE) + settings->fog_mode = WINED3D_FFP_VS_FOG_FOGCOORD; + else if (state->render_states[WINED3D_RS_RANGEFOGENABLE]) + settings->fog_mode = WINED3D_FFP_VS_FOG_RANGE; + else + settings->fog_mode = WINED3D_FFP_VS_FOG_DEPTH; + + settings->padding = 0; +} + +static int wined3d_ffp_vertex_program_key_compare(const void *key, const struct wine_rb_entry *entry) +{ + const struct wined3d_ffp_vs_settings *ka = key; + const struct wined3d_ffp_vs_settings *kb = &WINE_RB_ENTRY_VALUE(entry, + const struct wined3d_ffp_vs_desc, entry)->settings; + + return memcmp(ka, kb, sizeof(*ka)); +} + +const struct wine_rb_functions wined3d_ffp_vertex_program_rb_functions = +{ + wined3d_rb_alloc, + wined3d_rb_realloc, + wined3d_rb_free, + wined3d_ffp_vertex_program_key_compare, +}; + UINT wined3d_log2i(UINT32 x) { static const UINT l[] = @@ -3459,3 +3707,20 @@ void wined3d_get_draw_rect(const struct wined3d_state *state, RECT *rect) if (state->render_states[WINED3D_RS_SCISSORTESTENABLE]) IntersectRect(rect, rect, &state->scissor_rect); } + +const char *wined3d_debug_location(DWORD location) +{ + char buf[200]; + + buf[0] = '\0'; +#define LOCATION_TO_STR(u) if (location & u) { strcat(buf, " | "#u); location &= ~u; } + LOCATION_TO_STR(WINED3D_LOCATION_DISCARDED); + LOCATION_TO_STR(WINED3D_LOCATION_SYSMEM); + LOCATION_TO_STR(WINED3D_LOCATION_BUFFER); + LOCATION_TO_STR(WINED3D_LOCATION_TEXTURE_RGB); + LOCATION_TO_STR(WINED3D_LOCATION_TEXTURE_SRGB); +#undef LOCATION_TO_STR + if (location) FIXME("Unrecognized location flag(s) %#x.\n", location); + + return buf[0] ? wine_dbg_sprintf("%s", &buf[3]) : "0"; +} diff --git a/dll/directx/wine/wined3d/vertexdeclaration.c b/dll/directx/wine/wined3d/vertexdeclaration.c index af1d78a7f36..4a36325922e 100644 --- a/dll/directx/wine/wined3d/vertexdeclaration.c +++ b/dll/directx/wine/wined3d/vertexdeclaration.c @@ -164,7 +164,6 @@ static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declara void *parent, const struct wined3d_parent_ops *parent_ops) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; - WORD preloaded = 0; /* MAX_STREAMS, 16 */ unsigned int i; if (TRACE_ON(d3d_decl)) @@ -224,13 +223,6 @@ static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declara return E_FAIL; } - if (!(preloaded & (1 << e->input_slot))) - { - declaration->streams[declaration->num_streams] = e->input_slot; - ++declaration->num_streams; - preloaded |= 1 << e->input_slot; - } - if (elements[i].format == WINED3DFMT_R16G16_FLOAT || elements[i].format == WINED3DFMT_R16G16B16A16_FLOAT) { if (!gl_info->supported[ARB_HALF_FLOAT_VERTEX]) declaration->half_float_conv_needed = TRUE; diff --git a/dll/directx/wine/wined3d/volume.c b/dll/directx/wine/wined3d/volume.c index 7de40bc08c9..88a1e226c4f 100644 --- a/dll/directx/wine/wined3d/volume.c +++ b/dll/directx/wine/wined3d/volume.c @@ -3,6 +3,7 @@ * Copyright 2002-2005 Raphael Junqueira * Copyright 2005 Oliver Stieber * Copyright 2009-2011 Henri Verbeet for CodeWeavers + * Copyright 2013 Stefan Dösinger for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,9 +25,11 @@ #include "wined3d_private.h" WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface); +WINE_DECLARE_DEBUG_CHANNEL(d3d_perf); /* Context activation is done by the caller. */ -static void volume_bind_and_dirtify(const struct wined3d_volume *volume, struct wined3d_context *context) +static void volume_bind_and_dirtify(const struct wined3d_volume *volume, + struct wined3d_context *context, BOOL srgb) { struct wined3d_texture *container = volume->container; DWORD active_sampler; @@ -44,30 +47,7 @@ static void volume_bind_and_dirtify(const struct wined3d_volume *volume, struct if (active_sampler != WINED3D_UNMAPPED_STAGE) device_invalidate_state(volume->resource.device, STATE_SAMPLER(active_sampler)); - container->texture_ops->texture_bind(container, context, FALSE); -} - -void volume_add_dirty_box(struct wined3d_volume *volume, const struct wined3d_box *dirty_box) -{ - volume->dirty = TRUE; - if (dirty_box) - { - volume->lockedBox.left = min(volume->lockedBox.left, dirty_box->left); - volume->lockedBox.top = min(volume->lockedBox.top, dirty_box->top); - volume->lockedBox.front = min(volume->lockedBox.front, dirty_box->front); - volume->lockedBox.right = max(volume->lockedBox.right, dirty_box->right); - volume->lockedBox.bottom = max(volume->lockedBox.bottom, dirty_box->bottom); - volume->lockedBox.back = max(volume->lockedBox.back, dirty_box->back); - } - else - { - volume->lockedBox.left = 0; - volume->lockedBox.top = 0; - volume->lockedBox.front = 0; - volume->lockedBox.right = volume->resource.width; - volume->lockedBox.bottom = volume->resource.height; - volume->lockedBox.back = volume->resource.depth; - } + container->texture_ops->texture_bind(container, context, srgb); } void volume_set_container(struct wined3d_volume *volume, struct wined3d_texture *container) @@ -78,35 +58,383 @@ void volume_set_container(struct wined3d_volume *volume, struct wined3d_texture } /* Context activation is done by the caller. */ -void volume_load(const struct wined3d_volume *volume, struct wined3d_context *context, UINT level, BOOL srgb_mode) +static void wined3d_volume_allocate_texture(const struct wined3d_volume *volume, + const struct wined3d_context *context, BOOL srgb) { const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_format *format = volume->resource.format; - TRACE("volume %p, context %p, level %u, srgb %#x, format %s (%#x).\n", - volume, context, level, srgb_mode, debug_d3dformat(format->id), format->id); - - volume_bind_and_dirtify(volume, context); - - GL_EXTCALL(glTexImage3DEXT(GL_TEXTURE_3D, level, format->glInternal, + GL_EXTCALL(glTexImage3DEXT(GL_TEXTURE_3D, volume->texture_level, + srgb ? format->glGammaInternal : format->glInternal, volume->resource.width, volume->resource.height, volume->resource.depth, - 0, format->glFormat, format->glType, volume->resource.allocatedMemory)); + 0, format->glFormat, format->glType, NULL)); checkGLcall("glTexImage3D"); - - /* When adding code releasing volume->resource.allocatedMemory to save - * data keep in mind that GL_UNPACK_CLIENT_STORAGE_APPLE is enabled by - * default if supported(GL_APPLE_client_storage). Thus do not release - * volume->resource.allocatedMemory if GL_APPLE_client_storage is - * supported. */ } -/* Do not call while under the GL lock. */ +/* Context activation is done by the caller. */ +void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wined3d_context *context, + const struct wined3d_bo_address *data) +{ + const struct wined3d_gl_info *gl_info = context->gl_info; + const struct wined3d_format *format = volume->resource.format; + + TRACE("volume %p, context %p, level %u, format %s (%#x).\n", + volume, context, volume->texture_level, debug_d3dformat(format->id), + format->id); + + + if (data->buffer_object) + { + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, data->buffer_object)); + checkGLcall("glBindBufferARB"); + } + + GL_EXTCALL(glTexSubImage3DEXT(GL_TEXTURE_3D, volume->texture_level, 0, 0, 0, + volume->resource.width, volume->resource.height, volume->resource.depth, + format->glFormat, format->glType, data->addr)); + checkGLcall("glTexSubImage3D"); + + if (data->buffer_object) + { + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); + checkGLcall("glBindBufferARB"); + } +} + +static void wined3d_volume_validate_location(struct wined3d_volume *volume, DWORD location) +{ + TRACE("Volume %p, setting %s.\n", volume, wined3d_debug_location(location)); + volume->locations |= location; + TRACE("new location flags are %s.\n", wined3d_debug_location(volume->locations)); +} + +void wined3d_volume_invalidate_location(struct wined3d_volume *volume, DWORD location) +{ + TRACE("Volume %p, clearing %s.\n", volume, wined3d_debug_location(location)); + volume->locations &= ~location; + TRACE("new location flags are %s.\n", wined3d_debug_location(volume->locations)); +} + +/* Context activation is done by the caller. */ +static void wined3d_volume_download_data(struct wined3d_volume *volume, + const struct wined3d_context *context, const struct wined3d_bo_address *data) +{ + const struct wined3d_gl_info *gl_info = context->gl_info; + const struct wined3d_format *format = volume->resource.format; + + if (data->buffer_object) + { + GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, data->buffer_object)); + checkGLcall("glBindBufferARB"); + } + + gl_info->gl_ops.gl.p_glGetTexImage(GL_TEXTURE_3D, volume->texture_level, + format->glFormat, format->glType, data->addr); + checkGLcall("glGetTexImage"); + + if (data->buffer_object) + { + GL_EXTCALL(glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, 0)); + checkGLcall("glBindBufferARB"); + } + +} + +static void wined3d_volume_evict_sysmem(struct wined3d_volume *volume) +{ + wined3d_resource_free_sysmem(volume->resource.heap_memory); + volume->resource.heap_memory = NULL; + volume->resource.allocatedMemory = NULL; + wined3d_volume_invalidate_location(volume, WINED3D_LOCATION_SYSMEM); +} + +static DWORD volume_access_from_location(DWORD location) +{ + switch (location) + { + case WINED3D_LOCATION_DISCARDED: + return 0; + + case WINED3D_LOCATION_SYSMEM: + return WINED3D_RESOURCE_ACCESS_CPU; + + case WINED3D_LOCATION_BUFFER: + case WINED3D_LOCATION_TEXTURE_RGB: + case WINED3D_LOCATION_TEXTURE_SRGB: + return WINED3D_RESOURCE_ACCESS_GPU; + + default: + FIXME("Unhandled location %#x.\n", location); + return 0; + } +} + +/* Context activation is done by the caller. */ +static void wined3d_volume_srgb_transfer(struct wined3d_volume *volume, + struct wined3d_context *context, BOOL dest_is_srgb) +{ + struct wined3d_bo_address data; + /* Optimizations are possible, but the effort should be put into either + * implementing EXT_SRGB_DECODE in the driver or finding out why we + * picked the wrong copy for the original upload and fixing that. + * + * Also keep in mind that we want to avoid using resource.allocatedMemory + * for DEFAULT pool surfaces. */ + + WARN_(d3d_perf)("Performing slow rgb/srgb volume transfer.\n"); + data.buffer_object = 0; + data.addr = HeapAlloc(GetProcessHeap(), 0, volume->resource.size); + if (!data.addr) + return; + + volume_bind_and_dirtify(volume, context, !dest_is_srgb); + wined3d_volume_download_data(volume, context, &data); + volume_bind_and_dirtify(volume, context, dest_is_srgb); + wined3d_volume_upload_data(volume, context, &data); + + HeapFree(GetProcessHeap(), 0, data.addr); +} + +/* Context activation is done by the caller. */ +static void wined3d_volume_load_location(struct wined3d_volume *volume, + struct wined3d_context *context, DWORD location) +{ + DWORD required_access = volume_access_from_location(location); + + TRACE("Volume %p, loading %s, have %s.\n", volume, wined3d_debug_location(location), + wined3d_debug_location(volume->locations)); + + if ((volume->locations & location) == location) + { + TRACE("Location(s) already up to date.\n"); + return; + } + + if ((volume->resource.access_flags & required_access) != required_access) + { + ERR("Operation requires %#x access, but volume only has %#x.\n", + required_access, volume->resource.access_flags); + return; + } + + switch (location) + { + case WINED3D_LOCATION_TEXTURE_RGB: + case WINED3D_LOCATION_TEXTURE_SRGB: + if ((location == WINED3D_LOCATION_TEXTURE_RGB + && !(volume->flags & WINED3D_VFLAG_ALLOCATED)) + || (location == WINED3D_LOCATION_TEXTURE_SRGB + && !(volume->flags & WINED3D_VFLAG_SRGB_ALLOCATED))) + ERR("Trying to load (s)RGB texture without prior allocation.\n"); + + if (volume->locations & WINED3D_LOCATION_DISCARDED) + { + TRACE("Volume previously discarded, nothing to do.\n"); + wined3d_volume_invalidate_location(volume, WINED3D_LOCATION_DISCARDED); + } + else if (volume->locations & WINED3D_LOCATION_SYSMEM) + { + struct wined3d_bo_address data = {0, volume->resource.allocatedMemory}; + wined3d_volume_upload_data(volume, context, &data); + } + else if (volume->locations & WINED3D_LOCATION_BUFFER) + { + struct wined3d_bo_address data = {volume->pbo, NULL}; + wined3d_volume_upload_data(volume, context, &data); + } + else if (volume->locations & WINED3D_LOCATION_TEXTURE_RGB) + { + wined3d_volume_srgb_transfer(volume, context, TRUE); + } + else if (volume->locations & WINED3D_LOCATION_TEXTURE_SRGB) + { + wined3d_volume_srgb_transfer(volume, context, FALSE); + } + else + { + FIXME("Implement texture loading from %s.\n", wined3d_debug_location(volume->locations)); + return; + } + wined3d_volume_validate_location(volume, location); + + if (volume->resource.pool == WINED3D_POOL_MANAGED && volume->download_count < 10) + wined3d_volume_evict_sysmem(volume); + + break; + + case WINED3D_LOCATION_SYSMEM: + if (!volume->resource.allocatedMemory || !volume->resource.heap_memory) + { + ERR("Trying to load WINED3D_LOCATION_SYSMEM without setting it up first.\n"); + return; + } + + if (volume->locations & WINED3D_LOCATION_DISCARDED) + { + TRACE("Volume previously discarded, nothing to do.\n"); + wined3d_volume_invalidate_location(volume, WINED3D_LOCATION_DISCARDED); + } + else if (volume->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB)) + { + struct wined3d_bo_address data = {0, volume->resource.allocatedMemory}; + + if (volume->locations & WINED3D_LOCATION_TEXTURE_RGB) + volume_bind_and_dirtify(volume, context, FALSE); + else + volume_bind_and_dirtify(volume, context, TRUE); + + volume->download_count++; + wined3d_volume_download_data(volume, context, &data); + } + else + { + FIXME("Implement WINED3D_LOCATION_SYSMEM loading from %s.\n", + wined3d_debug_location(volume->locations)); + return; + } + wined3d_volume_validate_location(volume, WINED3D_LOCATION_SYSMEM); + break; + + case WINED3D_LOCATION_BUFFER: + if (!volume->pbo || !(volume->flags & WINED3D_VFLAG_PBO)) + ERR("Trying to load WINED3D_LOCATION_BUFFER without setting it up first.\n"); + + if (volume->locations & WINED3D_LOCATION_DISCARDED) + { + TRACE("Volume previously discarded, nothing to do.\n"); + wined3d_volume_invalidate_location(volume, WINED3D_LOCATION_DISCARDED); + } + else if (volume->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB)) + { + struct wined3d_bo_address data = {volume->pbo, NULL}; + + if (volume->locations & WINED3D_LOCATION_TEXTURE_RGB) + volume_bind_and_dirtify(volume, context, FALSE); + else + volume_bind_and_dirtify(volume, context, TRUE); + + wined3d_volume_download_data(volume, context, &data); + } + else + { + FIXME("Implement WINED3D_LOCATION_BUFFER loading from %s.\n", + wined3d_debug_location(volume->locations)); + return; + } + wined3d_volume_validate_location(volume, WINED3D_LOCATION_BUFFER); + break; + + default: + FIXME("Implement %s loading from %s.\n", wined3d_debug_location(location), + wined3d_debug_location(volume->locations)); + } +} + +/* Context activation is done by the caller. */ +void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *context, BOOL srgb_mode) +{ + volume_bind_and_dirtify(volume, context, srgb_mode); + + if (srgb_mode) + { + if (!(volume->flags & WINED3D_VFLAG_SRGB_ALLOCATED)) + { + wined3d_volume_allocate_texture(volume, context, TRUE); + volume->flags |= WINED3D_VFLAG_SRGB_ALLOCATED; + } + + wined3d_volume_load_location(volume, context, WINED3D_LOCATION_TEXTURE_SRGB); + } + else + { + if (!(volume->flags & WINED3D_VFLAG_ALLOCATED)) + { + wined3d_volume_allocate_texture(volume, context, FALSE); + volume->flags |= WINED3D_VFLAG_ALLOCATED; + } + + wined3d_volume_load_location(volume, context, WINED3D_LOCATION_TEXTURE_RGB); + } +} + +/* Context activation is done by the caller. */ +static void wined3d_volume_prepare_pbo(struct wined3d_volume *volume, struct wined3d_context *context) +{ + const struct wined3d_gl_info *gl_info = context->gl_info; + + if (volume->pbo) + return; + + GL_EXTCALL(glGenBuffersARB(1, &volume->pbo)); + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->pbo)); + GL_EXTCALL(glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->resource.size, NULL, GL_STREAM_DRAW_ARB)); + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); + checkGLcall("Create PBO"); + + TRACE("Created PBO %u for volume %p.\n", volume->pbo, volume); +} + +static void wined3d_volume_free_pbo(struct wined3d_volume *volume) +{ + struct wined3d_context *context = context_acquire(volume->resource.device, NULL); + const struct wined3d_gl_info *gl_info = context->gl_info; + + TRACE("Deleting PBO %u belonging to volume %p.\n", volume->pbo, volume); + GL_EXTCALL(glDeleteBuffersARB(1, &volume->pbo)); + checkGLcall("glDeleteBuffersARB"); + volume->pbo = 0; + context_release(context); +} + +static BOOL volume_prepare_system_memory(struct wined3d_volume *volume) +{ + if (volume->resource.allocatedMemory) + return TRUE; + + volume->resource.heap_memory = wined3d_resource_allocate_sysmem(volume->resource.size); + if (!volume->resource.heap_memory) + return FALSE; + volume->resource.allocatedMemory = volume->resource.heap_memory; + return TRUE; +} + + static void volume_unload(struct wined3d_resource *resource) { + struct wined3d_volume *volume = volume_from_resource(resource); + struct wined3d_device *device = volume->resource.device; + struct wined3d_context *context; + + if (volume->resource.pool == WINED3D_POOL_DEFAULT) + ERR("Unloading DEFAULT pool volume.\n"); + TRACE("texture %p.\n", resource); - /* The whole content is shadowed on This->resource.allocatedMemory, and - * the texture name is managed by the VolumeTexture container. */ + if (volume_prepare_system_memory(volume)) + { + context = context_acquire(device, NULL); + wined3d_volume_load_location(volume, context, WINED3D_LOCATION_SYSMEM); + context_release(context); + wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_SYSMEM); + } + else + { + ERR("Out of memory when unloading volume %p.\n", volume); + wined3d_volume_validate_location(volume, WINED3D_LOCATION_DISCARDED); + wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_DISCARDED); + } + + if (volume->pbo) + { + /* Should not happen because only dynamic default pool volumes + * have a buffer, and those are not evicted by device_evit_managed_resources + * and must be freed before a non-ex device reset. */ + ERR("Unloading a volume with a buffer\n"); + wined3d_volume_free_pbo(volume); + } + + /* The texture name is managed by the container. */ + volume->flags &= ~(WINED3D_VFLAG_ALLOCATED | WINED3D_VFLAG_SRGB_ALLOCATED); resource_unload(resource); } @@ -145,6 +473,9 @@ ULONG CDECL wined3d_volume_decref(struct wined3d_volume *volume) if (!refcount) { + if (volume->pbo) + wined3d_volume_free_pbo(volume); + resource_cleanup(&volume->resource); volume->resource.parent_ops->wined3d_object_destroyed(volume->resource.parent); HeapFree(GetProcessHeap(), 0, volume); @@ -186,13 +517,75 @@ struct wined3d_resource * CDECL wined3d_volume_get_resource(struct wined3d_volum HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags) { + struct wined3d_device *device = volume->resource.device; + struct wined3d_context *context; + const struct wined3d_gl_info *gl_info; + BYTE *base_memory; + TRACE("volume %p, map_desc %p, box %p, flags %#x.\n", volume, map_desc, box, flags); - if (!volume->resource.allocatedMemory) - volume->resource.allocatedMemory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, volume->resource.size); + if (!(volume->resource.access_flags & WINED3D_RESOURCE_ACCESS_CPU)) + { + WARN("Volume %p is not CPU accessible.\n", volume); + map_desc->data = NULL; + return WINED3DERR_INVALIDCALL; + } + flags = wined3d_resource_sanitize_map_flags(&volume->resource, flags); - TRACE("allocatedMemory %p.\n", volume->resource.allocatedMemory); + if (volume->flags & WINED3D_VFLAG_PBO) + { + context = context_acquire(device, NULL); + gl_info = context->gl_info; + + wined3d_volume_prepare_pbo(volume, context); + if (flags & WINED3D_MAP_DISCARD) + wined3d_volume_validate_location(volume, WINED3D_LOCATION_BUFFER); + else + wined3d_volume_load_location(volume, context, WINED3D_LOCATION_BUFFER); + + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->pbo)); + + if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) + { + GLbitfield mapflags = wined3d_resource_gl_map_flags(flags); + mapflags &= ~GL_MAP_FLUSH_EXPLICIT_BIT; + base_memory = GL_EXTCALL(glMapBufferRange(GL_PIXEL_UNPACK_BUFFER_ARB, + 0, volume->resource.size, mapflags)); + } + else + { + base_memory = GL_EXTCALL(glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); + } + + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); + checkGLcall("Map PBO"); + + context_release(context); + } + else + { + if (!volume_prepare_system_memory(volume)) + { + WARN("Out of memory.\n"); + map_desc->data = NULL; + return E_OUTOFMEMORY; + } + + if (flags & WINED3D_MAP_DISCARD) + { + wined3d_volume_validate_location(volume, WINED3D_LOCATION_SYSMEM); + } + else if (!(volume->locations & WINED3D_LOCATION_SYSMEM)) + { + context = context_acquire(device, NULL); + wined3d_volume_load_location(volume, context, WINED3D_LOCATION_SYSMEM); + context_release(context); + } + base_memory = volume->resource.allocatedMemory; + } + + TRACE("Base memory pointer %p.\n", base_memory); map_desc->row_pitch = volume->resource.format->byte_count * volume->resource.width; /* Bytes / row */ map_desc->slice_pitch = volume->resource.format->byte_count @@ -200,37 +593,29 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume, if (!box) { TRACE("No box supplied - all is ok\n"); - map_desc->data = volume->resource.allocatedMemory; - volume->lockedBox.left = 0; - volume->lockedBox.top = 0; - volume->lockedBox.front = 0; - volume->lockedBox.right = volume->resource.width; - volume->lockedBox.bottom = volume->resource.height; - volume->lockedBox.back = volume->resource.depth; + map_desc->data = base_memory; } else { TRACE("Lock Box (%p) = l %u, t %u, r %u, b %u, fr %u, ba %u\n", box, box->left, box->top, box->right, box->bottom, box->front, box->back); - map_desc->data = volume->resource.allocatedMemory + map_desc->data = base_memory + (map_desc->slice_pitch * box->front) /* FIXME: is front < back or vica versa? */ + (map_desc->row_pitch * box->top) + (box->left * volume->resource.format->byte_count); - volume->lockedBox.left = box->left; - volume->lockedBox.top = box->top; - volume->lockedBox.front = box->front; - volume->lockedBox.right = box->right; - volume->lockedBox.bottom = box->bottom; - volume->lockedBox.back = box->back; } if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY))) { - volume_add_dirty_box(volume, &volume->lockedBox); wined3d_texture_set_dirty(volume->container, TRUE); + + if (volume->flags & WINED3D_VFLAG_PBO) + wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_BUFFER); + else + wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_SYSMEM); } - volume->locked = TRUE; + volume->flags |= WINED3D_VFLAG_LOCKED; TRACE("Returning memory %p, row pitch %d, slice pitch %d.\n", map_desc->data, map_desc->row_pitch, map_desc->slice_pitch); @@ -247,14 +632,27 @@ HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume) { TRACE("volume %p.\n", volume); - if (!volume->locked) + if (!(volume->flags & WINED3D_VFLAG_LOCKED)) { WARN("Trying to unlock unlocked volume %p.\n", volume); return WINED3DERR_INVALIDCALL; } - volume->locked = FALSE; - memset(&volume->lockedBox, 0, sizeof(volume->lockedBox)); + if (volume->flags & WINED3D_VFLAG_PBO) + { + struct wined3d_device *device = volume->resource.device; + struct wined3d_context *context = context_acquire(device, NULL); + const struct wined3d_gl_info *gl_info = context->gl_info; + + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->pbo)); + GL_EXTCALL(glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB)); + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); + checkGLcall("Unmap PBO"); + + context_release(context); + } + + volume->flags &= ~WINED3D_VFLAG_LOCKED; return WINED3D_OK; } @@ -265,42 +663,57 @@ static const struct wined3d_resource_ops volume_resource_ops = }; static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_device *device, UINT width, - UINT height, UINT depth, DWORD usage, enum wined3d_format_id format_id, enum wined3d_pool pool, - void *parent, const struct wined3d_parent_ops *parent_ops) + UINT height, UINT depth, UINT level, DWORD usage, enum wined3d_format_id format_id, + enum wined3d_pool pool, void *parent, const struct wined3d_parent_ops *parent_ops) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; const struct wined3d_format *format = wined3d_get_format(gl_info, format_id); HRESULT hr; + UINT size; if (!gl_info->supported[EXT_TEXTURE3D]) { WARN("Volume cannot be created - no volume texture support.\n"); return WINED3DERR_INVALIDCALL; } + /* TODO: Write tests for other resources and move this check + * to resource_init, if applicable. */ + if (usage & WINED3DUSAGE_DYNAMIC + && (pool == WINED3D_POOL_MANAGED || pool == WINED3D_POOL_SCRATCH)) + { + WARN("Attempted to create a DYNAMIC texture in pool %u.\n", pool); + return WINED3DERR_INVALIDCALL; + } + + size = wined3d_format_calculate_size(format, device->surface_alignment, width, height, depth); hr = resource_init(&volume->resource, device, WINED3D_RTYPE_VOLUME, format, WINED3D_MULTISAMPLE_NONE, 0, usage, pool, width, height, depth, - width * height * depth * format->byte_count, parent, parent_ops, - &volume_resource_ops); + size, parent, parent_ops, &volume_resource_ops); if (FAILED(hr)) { WARN("Failed to initialize resource, returning %#x.\n", hr); return hr; } - volume->lockable = TRUE; - volume->locked = FALSE; - memset(&volume->lockedBox, 0, sizeof(volume->lockedBox)); - volume->dirty = TRUE; + volume->texture_level = level; + volume->locations = WINED3D_LOCATION_DISCARDED; - volume_add_dirty_box(volume, NULL); + if (pool == WINED3D_POOL_DEFAULT && usage & WINED3DUSAGE_DYNAMIC + && gl_info->supported[ARB_PIXEL_BUFFER_OBJECT]) + { + wined3d_resource_free_sysmem(volume->resource.heap_memory); + volume->resource.heap_memory = NULL; + volume->resource.allocatedMemory = NULL; + volume->flags |= WINED3D_VFLAG_PBO; + } return WINED3D_OK; } HRESULT CDECL wined3d_volume_create(struct wined3d_device *device, UINT width, UINT height, - UINT depth, DWORD usage, enum wined3d_format_id format_id, enum wined3d_pool pool, void *parent, - const struct wined3d_parent_ops *parent_ops, struct wined3d_volume **volume) + UINT depth, UINT level, DWORD usage, enum wined3d_format_id format_id, enum wined3d_pool pool, + void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_volume **volume) { struct wined3d_volume *object; HRESULT hr; @@ -316,7 +729,8 @@ HRESULT CDECL wined3d_volume_create(struct wined3d_device *device, UINT width, U return WINED3DERR_OUTOFVIDEOMEMORY; } - hr = volume_init(object, device, width, height, depth, usage, format_id, pool, parent, parent_ops); + hr = volume_init(object, device, width, height, depth, level, + usage, format_id, pool, parent, parent_ops); if (FAILED(hr)) { WARN("Failed to initialize volume, returning %#x.\n", hr); diff --git a/dll/directx/wine/wined3d/wined3d.spec b/dll/directx/wine/wined3d/wined3d.spec index 0f7e70313fd..f451b7a35ac 100644 --- a/dll/directx/wine/wined3d/wined3d.spec +++ b/dll/directx/wine/wined3d/wined3d.spec @@ -226,7 +226,7 @@ @ cdecl wined3d_surface_releasedc(ptr ptr) @ cdecl wined3d_surface_restore(ptr) @ cdecl wined3d_surface_set_color_key(ptr long ptr) -@ cdecl wined3d_surface_set_mem(ptr ptr) +@ cdecl wined3d_surface_set_mem(ptr ptr long) @ cdecl wined3d_surface_set_overlay_position(ptr long long) @ cdecl wined3d_surface_set_palette(ptr ptr) @ cdecl wined3d_surface_set_priority(ptr long) @@ -251,9 +251,9 @@ @ cdecl wined3d_swapchain_set_window(ptr ptr) @ cdecl wined3d_texture_add_dirty_region(ptr long ptr) -@ cdecl wined3d_texture_create_2d(ptr long long long long long long ptr ptr ptr) -@ cdecl wined3d_texture_create_3d(ptr long long long long long long long ptr ptr ptr) -@ cdecl wined3d_texture_create_cube(ptr long long long long long ptr ptr ptr) +@ cdecl wined3d_texture_create_2d(ptr ptr long long ptr ptr ptr) +@ cdecl wined3d_texture_create_3d(ptr ptr long ptr ptr ptr) +@ cdecl wined3d_texture_create_cube(ptr ptr long long ptr ptr ptr) @ cdecl wined3d_texture_decref(ptr) @ cdecl wined3d_texture_generate_mipmaps(ptr) @ cdecl wined3d_texture_get_autogen_filter_type(ptr) diff --git a/dll/directx/wine/wined3d/wined3d_gl.h b/dll/directx/wine/wined3d/wined3d_gl.h index 06b527467ea..8ad865e4d3c 100644 --- a/dll/directx/wine/wined3d/wined3d_gl.h +++ b/dll/directx/wine/wined3d/wined3d_gl.h @@ -44,6 +44,7 @@ enum wined3d_gl_extension APPLE_YCBCR_422, /* ARB */ ARB_COLOR_BUFFER_FLOAT, + ARB_DEBUG_OUTPUT, ARB_DEPTH_BUFFER_FLOAT, ARB_DEPTH_CLAMP, ARB_DEPTH_TEXTURE, @@ -58,6 +59,7 @@ enum wined3d_gl_extension ARB_HALF_FLOAT_PIXEL, ARB_HALF_FLOAT_VERTEX, ARB_INSTANCED_ARRAYS, + ARB_INTERNALFORMAT_QUERY2, ARB_MAP_BUFFER_ALIGNMENT, ARB_MAP_BUFFER_RANGE, ARB_MULTISAMPLE, @@ -111,7 +113,6 @@ enum wined3d_gl_extension EXT_GPU_PROGRAM_PARAMETERS, EXT_GPU_SHADER4, EXT_PACKED_DEPTH_STENCIL, - EXT_PALETTED_TEXTURE, EXT_POINT_PARAMETERS, EXT_PROVOKING_VERTEX, EXT_SECONDARY_COLOR, @@ -179,6 +180,11 @@ enum wined3d_gl_extension USE_GL_FUNC(glFlushMappedBufferRangeAPPLE) \ /* GL_ARB_color_buffer_float */ \ USE_GL_FUNC(glClampColorARB) \ + /* GL_ARB_debug_output */ \ + USE_GL_FUNC(glDebugMessageCallbackARB) \ + USE_GL_FUNC(glDebugMessageControlARB) \ + USE_GL_FUNC(glDebugMessageInsertARB) \ + USE_GL_FUNC(glGetDebugMessageLogARB) \ /* GL_ARB_draw_buffers */ \ USE_GL_FUNC(glDrawBuffersARB) \ /* GL_ARB_draw_elements_base_vertex */ \ @@ -217,6 +223,10 @@ enum wined3d_gl_extension USE_GL_FUNC(glProgramParameteriARB) \ /* GL_ARB_instanced_arrays */ \ USE_GL_FUNC(glVertexAttribDivisorARB) \ + /* GL_ARB_internalformat_query */ \ + USE_GL_FUNC(glGetInternalformativ) \ + /* GL_ARB_internalformat_query2 */ \ + USE_GL_FUNC(glGetInternalformati64v) \ /* GL_ARB_map_buffer_range */ \ USE_GL_FUNC(glFlushMappedBufferRange) \ USE_GL_FUNC(glMapBufferRange) \ @@ -240,8 +250,10 @@ enum wined3d_gl_extension USE_GL_FUNC(glDeleteQueriesARB) \ USE_GL_FUNC(glEndQueryARB) \ USE_GL_FUNC(glGenQueriesARB) \ + USE_GL_FUNC(glGetQueryivARB) \ USE_GL_FUNC(glGetQueryObjectivARB) \ USE_GL_FUNC(glGetQueryObjectuivARB) \ + USE_GL_FUNC(glIsQueryARB) \ /* GL_ARB_point_parameters */ \ USE_GL_FUNC(glPointParameterfARB) \ USE_GL_FUNC(glPointParameterfvARB) \ @@ -474,8 +486,6 @@ enum wined3d_gl_extension USE_GL_FUNC(glVertexAttribI4uivEXT) \ USE_GL_FUNC(glVertexAttribI4usvEXT) \ USE_GL_FUNC(glVertexAttribIPointerEXT) \ - /* GL_EXT_paletted_texture */ \ - USE_GL_FUNC(glColorTableEXT) \ /* GL_EXT_point_parameters */ \ USE_GL_FUNC(glPointParameterfEXT) \ USE_GL_FUNC(glPointParameterfvEXT) \ diff --git a/dll/directx/wine/wined3d/wined3d_main.c b/dll/directx/wine/wined3d/wined3d_main.c index cb2b0c49cba..56d45d299c0 100644 --- a/dll/directx/wine/wined3d/wined3d_main.c +++ b/dll/directx/wine/wined3d/wined3d_main.c @@ -74,7 +74,6 @@ struct wined3d_settings wined3d_settings = { TRUE, /* Use of GLSL enabled by default */ ORM_FBO, /* Use FBOs to do offscreen rendering */ - RTL_READTEX, /* Default render target locking method */ PCI_VENDOR_NONE,/* PCI Vendor ID */ PCI_DEVICE_NONE,/* PCI Device ID */ 0, /* The default of memory is set in init_driver_info */ @@ -85,6 +84,7 @@ struct wined3d_settings wined3d_settings = ~0U, /* No VS shader model limit by default. */ ~0U, /* No GS shader model limit by default. */ ~0U, /* No PS shader model limit by default. */ + FALSE, /* 3D support enabled by default. */ }; /* Do not call while under the GL lock. */ @@ -100,6 +100,9 @@ struct wined3d * CDECL wined3d_create(UINT version, DWORD flags) return NULL; } + if (version == 7 && wined3d_settings.no_3d) + flags |= WINED3D_NO3D; + hr = wined3d_init(object, version, flags); if (FAILED(hr)) { @@ -219,19 +222,6 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL) wined3d_settings.offscreen_rendering_mode = ORM_FBO; } } - if ( !get_config_key( hkey, appkey, "RenderTargetLockMode", buffer, size) ) - { - if (!strcmp(buffer,"readdraw")) - { - TRACE("Using glReadPixels for render target reading and glDrawPixels for writing\n"); - wined3d_settings.rendertargetlock_mode = RTL_READDRAW; - } - else if (!strcmp(buffer,"readtex")) - { - TRACE("Using glReadPixels for render target reading and textures for writing\n"); - wined3d_settings.rendertargetlock_mode = RTL_READTEX; - } - } if ( !get_config_key_dword( hkey, appkey, "VideoPciDeviceID", &tmpvalue) ) { int pci_device_id = tmpvalue; @@ -309,6 +299,12 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL) TRACE("Limiting GS shader model to %u.\n", wined3d_settings.max_sm_gs); if (!get_config_key_dword(hkey, appkey, "MaxShaderModelPS", &wined3d_settings.max_sm_ps)) TRACE("Limiting PS shader model to %u.\n", wined3d_settings.max_sm_ps); + if (!get_config_key(hkey, appkey, "DirectDrawRenderer", buffer, size) + && !strcmp(buffer, "gdi")) + { + TRACE("Disabling 3D support.\n"); + wined3d_settings.no_3d = TRUE; + } } if (appkey) RegCloseKey( appkey ); @@ -521,18 +517,15 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) return wined3d_dll_init(hInstDLL); case DLL_PROCESS_DETACH: + if (lpv) break; return wined3d_dll_destroy(hInstDLL); case DLL_THREAD_DETACH: - { if (!context_set_current(NULL)) { ERR("Failed to clear current context.\n"); } return TRUE; - } - - default: - return TRUE; } + return TRUE; } diff --git a/dll/directx/wine/wined3d/wined3d_private.h b/dll/directx/wine/wined3d/wined3d_private.h index e57a1e752bb..db075cc4f72 100644 --- a/dll/directx/wine/wined3d/wined3d_private.h +++ b/dll/directx/wine/wined3d/wined3d_private.h @@ -5,6 +5,7 @@ * Copyright 2002-2003 Raphael Junqueira * Copyright 2002-2003, 2004 Jason Edmeades * Copyright 2005 Oliver Stieber + * Copyright 2006-2011, 2013 Stefan Dösinger for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -65,6 +66,7 @@ #define WINED3D_QUIRK_BROKEN_RGBA16 0x00000040 #define WINED3D_QUIRK_INFO_LOG_SPAM 0x00000080 #define WINED3D_QUIRK_LIMITED_TEX_FILTERING 0x00000100 +#define WINED3D_QUIRK_BROKEN_ARB_FOG 0x00000200 /* Texture format fixups */ @@ -157,7 +159,6 @@ void *wined3d_rb_realloc(void *ptr, size_t size) DECLSPEC_HIDDEN; void wined3d_rb_free(void *ptr) DECLSPEC_HIDDEN; /* Device caps */ -#define MAX_PALETTES 65536 #define MAX_STREAM_OUT 4 #define MAX_STREAMS 16 #define MAX_TEXTURES 8 @@ -244,9 +245,6 @@ static inline float float_24_to_32(DWORD in) #define ORM_BACKBUFFER 0 #define ORM_FBO 1 -#define RTL_READDRAW 1 -#define RTL_READTEX 2 - #define PCI_VENDOR_NONE 0xffff /* e.g. 0x8086 for Intel and 0x10de for Nvidia */ #define PCI_DEVICE_NONE 0xffff /* e.g. 0x14f for a Geforce6200 */ @@ -259,7 +257,6 @@ struct wined3d_settings * implemented, we'll leave it as a registry setting for developers. */ BOOL glslRequested; int offscreen_rendering_mode; - int rendertargetlock_mode; unsigned short pci_vendor_id; unsigned short pci_device_id; /* Memory tracking and object counting. */ @@ -271,6 +268,7 @@ struct wined3d_settings unsigned int max_sm_vs; unsigned int max_sm_gs; unsigned int max_sm_ps; + BOOL no_3d; }; extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN; @@ -284,6 +282,18 @@ enum wined3d_sampler_texture_type WINED3DSTT_VOLUME = 4, }; +#define WINED3D_SHADER_CONST_VS_F 0x00000001 +#define WINED3D_SHADER_CONST_VS_I 0x00000002 +#define WINED3D_SHADER_CONST_VS_B 0x00000004 +#define WINED3D_SHADER_CONST_VS_POS_FIXUP 0x00000008 +#define WINED3D_SHADER_CONST_PS_F 0x00000010 +#define WINED3D_SHADER_CONST_PS_I 0x00000020 +#define WINED3D_SHADER_CONST_PS_B 0x00000040 +#define WINED3D_SHADER_CONST_PS_BUMP_ENV 0x00000080 +#define WINED3D_SHADER_CONST_PS_Y_CORR 0x00000100 +#define WINED3D_SHADER_CONST_PS_NP2_FIXUP 0x00000200 +#define WINED3D_SHADER_CONST_FFP_PS 0x00000400 + enum wined3d_shader_register_type { WINED3DSPR_TEMP = 0, @@ -406,12 +416,11 @@ enum wined3d_shader_rel_op * Shader model 3 according to msdn (and for software shaders) */ #define MAX_LABELS 16 -#define SHADER_PGMSIZE 65535 - struct wined3d_shader_buffer { char *buffer; - unsigned int bsize; + unsigned int buffer_size; + unsigned int content_size; unsigned int lineNo; BOOL newline; }; @@ -735,11 +744,12 @@ enum vertexprocessing_mode { #define WINED3D_CONST_NUM_UNUSED ~0U -enum fogmode { - FOG_OFF, - FOG_LINEAR, - FOG_EXP, - FOG_EXP2 +enum wined3d_ffp_ps_fog_mode +{ + WINED3D_FFP_PS_FOG_OFF, + WINED3D_FFP_PS_FOG_LINEAR, + WINED3D_FFP_PS_FOG_EXP, + WINED3D_FFP_PS_FOG_EXP2, }; /* Stateblock dependent parameters which have to be hardcoded @@ -749,13 +759,25 @@ enum fogmode { #define WINED3D_PSARGS_PROJECTED (1 << 3) #define WINED3D_PSARGS_TEXTRANSFORM_SHIFT 4 #define WINED3D_PSARGS_TEXTRANSFORM_MASK 0xf +#define WINED3D_PSARGS_TEXTYPE_SHIFT 2 +#define WINED3D_PSARGS_TEXTYPE_MASK 0x3 + +/* Similar to tex_types, except that it doesn't have 1d textures + * (can't be bound), rect textures (handled via np2_fixup) and + * none / unknown (treated as 2d and handled via dummy textures). */ +enum wined3d_shader_tex_types +{ + WINED3D_SHADER_TEX_2D = 0, + WINED3D_SHADER_TEX_3D = 1, + WINED3D_SHADER_TEX_CUBE = 2, +}; struct ps_compile_args { struct color_fixup_desc color_fixup[MAX_FRAGMENT_SAMPLERS]; enum vertexprocessing_mode vp_mode; - enum fogmode fog; + enum wined3d_ffp_ps_fog_mode fog; WORD tex_transform; /* ps 1.0-1.3, 4 textures */ - /* Texture types(2D, Cube, 3D) in ps 1.x */ + WORD tex_types; /* ps 1.0 - 1.4, 6 textures */ WORD srgb_correction; WORD np2_fixup; /* Bitmap for NP2 texcoord fixups (16 samplers max currently). @@ -775,34 +797,30 @@ struct vs_compile_args { WORD swizzle_map; /* MAX_ATTRIBS, 16 */ }; -enum wined3d_shader_mode -{ - WINED3D_SHADER_MODE_NONE, - WINED3D_SHADER_MODE_FFP, - WINED3D_SHADER_MODE_SHADER, -}; - struct wined3d_context; struct wined3d_state; struct fragment_pipeline; +struct wined3d_vertex_pipe_ops; struct wined3d_shader_backend_ops { void (*shader_handle_instruction)(const struct wined3d_shader_instruction *); - void (*shader_select)(const struct wined3d_context *context, enum wined3d_shader_mode vertex_mode, - enum wined3d_shader_mode fragment_mode); + void (*shader_select)(void *shader_priv, struct wined3d_context *context, + const struct wined3d_state *state); + void (*shader_disable)(void *shader_priv, struct wined3d_context *context); void (*shader_select_depth_blt)(void *shader_priv, const struct wined3d_gl_info *gl_info, enum tex_types tex_type, const SIZE *ds_mask_size); void (*shader_deselect_depth_blt)(void *shader_priv, const struct wined3d_gl_info *gl_info); void (*shader_update_float_vertex_constants)(struct wined3d_device *device, UINT start, UINT count); void (*shader_update_float_pixel_constants)(struct wined3d_device *device, UINT start, UINT count); - void (*shader_load_constants)(const struct wined3d_context *context, BOOL usePS, BOOL useVS); - void (*shader_load_np2fixup_constants)(void *shader_priv, const struct wined3d_gl_info *gl_info, + void (*shader_load_constants)(void *shader_priv, struct wined3d_context *context, const struct wined3d_state *state); void (*shader_destroy)(struct wined3d_shader *shader); - HRESULT (*shader_alloc_private)(struct wined3d_device *device, const struct fragment_pipeline *fragment_pipe); + HRESULT (*shader_alloc_private)(struct wined3d_device *device, const struct wined3d_vertex_pipe_ops *vertex_pipe, + const struct fragment_pipeline *fragment_pipe); void (*shader_free_private)(struct wined3d_device *device); - void (*shader_context_destroyed)(void *shader_priv, const struct wined3d_context *context); + BOOL (*shader_allocate_context_data)(struct wined3d_context *context); + void (*shader_free_context_data)(struct wined3d_context *context); void (*shader_get_caps)(const struct wined3d_gl_info *gl_info, struct shader_caps *caps); BOOL (*shader_color_fixup_supported)(struct color_fixup_desc fixup); BOOL (*shader_has_ffp_proj_control)(void *shader_priv); @@ -854,15 +872,6 @@ do { \ #define checkGLcall(A) do {} while(0) #endif -/* Trace vector and strided data information */ -#define TRACE_STRIDED(si, name) do { if (si->use_map & (1 << name)) \ - TRACE( #name " = (data {%#x:%p}, stride %d, format %s, stream %u)\n", \ - si->elements[name].data.buffer_object, si->elements[name].data.addr, si->elements[name].stride, \ - debug_d3dformat(si->elements[name].format->id), si->elements[name].stream_idx); } while(0) - -/* Global variables */ -extern const struct wined3d_matrix identity DECLSPEC_HIDDEN; - enum wined3d_ffp_idx { WINED3D_FFP_POSITION = 0, @@ -901,13 +910,14 @@ enum wined3d_ffp_emit_idx WINED3D_FFP_EMIT_DEC3N = 14, WINED3D_FFP_EMIT_FLOAT16_2 = 15, WINED3D_FFP_EMIT_FLOAT16_4 = 16, - WINED3D_FFP_EMIT_COUNT = 17 + WINED3D_FFP_EMIT_INVALID = 17, + WINED3D_FFP_EMIT_COUNT = 18 }; struct wined3d_bo_address { GLuint buffer_object; - const BYTE *addr; + BYTE *addr; }; struct wined3d_stream_info_element @@ -928,18 +938,9 @@ struct wined3d_stream_info }; void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_count, - UINT start_instance, UINT instance_count, BOOL indexed, const void *idx_data) DECLSPEC_HIDDEN; + UINT start_instance, UINT instance_count, BOOL indexed) DECLSPEC_HIDDEN; DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) DECLSPEC_HIDDEN; -typedef void (WINE_GLAPI *glAttribFunc)(const void *data); -typedef void (WINE_GLAPI *glMultiTexCoordFunc)(GLenum unit, const void *data); -extern glAttribFunc position_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC_HIDDEN; -extern glAttribFunc diffuse_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC_HIDDEN; -extern glAttribFunc specular_func_3ubv DECLSPEC_HIDDEN; -extern glAttribFunc specular_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC_HIDDEN; -extern glAttribFunc normal_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC_HIDDEN; -extern glMultiTexCoordFunc multi_texcoord_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC_HIDDEN; - #define eps 1e-8 #define GET_TEXCOORD_SIZE_FROM_FVF(d3dvtVertexType, tex_num) \ @@ -980,12 +981,9 @@ extern glMultiTexCoordFunc multi_texcoord_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC #define STATE_VIEWPORT (STATE_GEOMETRY_SHADER + 1) #define STATE_IS_VIEWPORT(a) ((a) == STATE_VIEWPORT) -#define STATE_VERTEXSHADERCONSTANT (STATE_VIEWPORT + 1) -#define STATE_PIXELSHADERCONSTANT (STATE_VERTEXSHADERCONSTANT + 1) -#define STATE_IS_VERTEXSHADERCONSTANT(a) ((a) == STATE_VERTEXSHADERCONSTANT) -#define STATE_IS_PIXELSHADERCONSTANT(a) ((a) == STATE_PIXELSHADERCONSTANT) - -#define STATE_ACTIVELIGHT(a) (STATE_PIXELSHADERCONSTANT + (a) + 1) +#define STATE_LIGHT_TYPE (STATE_VIEWPORT + 1) +#define STATE_IS_LIGHT_TYPE(a) ((a) == STATE_LIGHT_TYPE) +#define STATE_ACTIVELIGHT(a) (STATE_LIGHT_TYPE + 1 + (a)) #define STATE_IS_ACTIVELIGHT(a) ((a) >= STATE_ACTIVELIGHT(0) && (a) < STATE_ACTIVELIGHT(MAX_ACTIVE_LIGHTS)) #define STATE_SCISSORRECT (STATE_ACTIVELIGHT(MAX_ACTIVE_LIGHTS - 1) + 1) @@ -1009,7 +1007,10 @@ extern glMultiTexCoordFunc multi_texcoord_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC #define STATE_FRAMEBUFFER (STATE_BASEVERTEXINDEX + 1) #define STATE_IS_FRAMEBUFFER(a) ((a) == STATE_FRAMEBUFFER) -#define STATE_HIGHEST (STATE_FRAMEBUFFER) +#define STATE_POINT_SIZE_ENABLE (STATE_FRAMEBUFFER + 1) +#define STATE_IS_POINT_SIZE_ENABLE(a) ((a) == STATE_POINT_SIZE_ENABLE) + +#define STATE_HIGHEST (STATE_POINT_SIZE_ENABLE) enum fogsource { FOGSOURCE_FFP, @@ -1017,8 +1018,6 @@ enum fogsource { FOGSOURCE_COORD, }; -#define WINED3D_MAX_FBO_ENTRIES 64 - struct wined3d_occlusion_query { struct list entry; @@ -1057,6 +1056,7 @@ BOOL wined3d_event_query_supported(const struct wined3d_gl_info *gl_info) DECLSP struct wined3d_context { const struct wined3d_gl_info *gl_info; + const struct wined3d_d3d_info *d3d_info; const struct StateEntry *state_table; /* State dirtification * dirtyArray is an array that contains markers for dirty states. numDirtyEntries states are dirty, their numbers are in indices @@ -1087,11 +1087,11 @@ struct wined3d_context DWORD current : 1; DWORD destroyed : 1; DWORD valid : 1; - DWORD select_shader : 1; - DWORD load_constants : 1; - DWORD padding : 15; - BYTE texShaderBumpMap; /* MAX_TEXTURES, 8 */ - BYTE lastWasPow2Texture; /* MAX_TEXTURES, 8 */ + DWORD padding : 1; + DWORD texShaderBumpMap : 8; /* MAX_TEXTURES, 8 */ + DWORD lastWasPow2Texture : 8; /* MAX_TEXTURES, 8 */ + DWORD shader_update_mask; + DWORD constant_update_mask; DWORD numbered_array_mask; GLenum tracking_parm; /* Which source is tracking current colour */ GLenum untracked_materials[2]; @@ -1111,6 +1111,8 @@ struct wined3d_context int pixel_format; GLint aux_buffers; + void *shader_backend_data; + /* FBOs */ UINT fbo_entry_count; struct list fbo_list; @@ -1184,8 +1186,28 @@ struct fragment_pipeline const struct StateEntryTemplate *states; }; +struct wined3d_vertex_caps +{ + BOOL xyzrhw; + DWORD max_active_lights; + DWORD max_vertex_blend_matrices; + DWORD max_vertex_blend_matrix_index; + DWORD vertex_processing_caps; + DWORD fvf_caps; + DWORD max_user_clip_planes; + DWORD raster_caps; +}; + +struct wined3d_vertex_pipe_ops +{ + void (*vp_enable)(const struct wined3d_gl_info *gl_info, BOOL enable); + void (*vp_get_caps)(const struct wined3d_gl_info *gl_info, struct wined3d_vertex_caps *caps); + void *(*vp_alloc)(const struct wined3d_shader_backend_ops *shader_backend, void *shader_priv); + void (*vp_free)(struct wined3d_device *device); + const struct StateEntryTemplate *vp_states; +}; + extern const struct StateEntryTemplate misc_state_template[] DECLSPEC_HIDDEN; -extern const struct StateEntryTemplate ffp_vertexstate_template[] DECLSPEC_HIDDEN; extern const struct fragment_pipeline none_fragment_pipe DECLSPEC_HIDDEN; extern const struct fragment_pipeline ffp_fragment_pipeline DECLSPEC_HIDDEN; extern const struct fragment_pipeline atifs_fragment_pipeline DECLSPEC_HIDDEN; @@ -1194,10 +1216,15 @@ extern const struct fragment_pipeline nvts_fragment_pipeline DECLSPEC_HIDDEN; extern const struct fragment_pipeline nvrc_fragment_pipeline DECLSPEC_HIDDEN; extern const struct fragment_pipeline glsl_fragment_pipe DECLSPEC_HIDDEN; +extern const struct wined3d_vertex_pipe_ops none_vertex_pipe DECLSPEC_HIDDEN; +extern const struct wined3d_vertex_pipe_ops ffp_vertex_pipe DECLSPEC_HIDDEN; +extern const struct wined3d_vertex_pipe_ops glsl_vertex_pipe DECLSPEC_HIDDEN; + /* "Base" state table */ HRESULT compile_state_table(struct StateEntry *StateTable, APPLYSTATEFUNC **dev_multistate_funcs, - const struct wined3d_gl_info *gl_info, const struct StateEntryTemplate *vertex, - const struct fragment_pipeline *fragment, const struct StateEntryTemplate *misc) DECLSPEC_HIDDEN; + const struct wined3d_gl_info *gl_info, const struct wined3d_d3d_info *d3d_info, + const struct wined3d_vertex_pipe_ops *vertex, const struct fragment_pipeline *fragment, + const struct StateEntryTemplate *misc) DECLSPEC_HIDDEN; enum wined3d_blit_op { @@ -1256,6 +1283,7 @@ void context_bind_texture(struct wined3d_context *context, GLenum target, GLuint void context_check_fbo_status(const struct wined3d_context *context, GLenum target) DECLSPEC_HIDDEN; struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, struct wined3d_surface *target, const struct wined3d_format *ds_format) DECLSPEC_HIDDEN; +BOOL context_debug_output_enabled(const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; void context_destroy(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN; void context_free_event_query(struct wined3d_event_query *query) DECLSPEC_HIDDEN; void context_free_occlusion_query(struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN; @@ -1333,6 +1361,7 @@ enum wined3d_pci_device CARD_AMD_RADEON_HD2600 = 0x9581, CARD_AMD_RADEON_HD2900 = 0x9400, CARD_AMD_RADEON_HD3200 = 0x9620, + CARD_AMD_RADEON_HD4200M = 0x9712, CARD_AMD_RADEON_HD4350 = 0x954f, CARD_AMD_RADEON_HD4600 = 0x9495, CARD_AMD_RADEON_HD4700 = 0x944e, @@ -1395,11 +1424,13 @@ enum wined3d_pci_device CARD_NVIDIA_GEFORCE_GTX260 = 0x05e2, CARD_NVIDIA_GEFORCE_GTX275 = 0x05e6, CARD_NVIDIA_GEFORCE_GTX280 = 0x05e1, + CARD_NVIDIA_GEFORCE_315M = 0x0a7a, CARD_NVIDIA_GEFORCE_320M = 0x08a3, CARD_NVIDIA_GEFORCE_GT320M = 0x0a2d, CARD_NVIDIA_GEFORCE_GT325M = 0x0a35, CARD_NVIDIA_GEFORCE_GT330 = 0x0ca0, CARD_NVIDIA_GEFORCE_GTS350M = 0x0cb0, + CARD_NVIDIA_GEFORCE_410M = 0x1055, CARD_NVIDIA_GEFORCE_GT420 = 0x0de2, CARD_NVIDIA_GEFORCE_GT430 = 0x0de1, CARD_NVIDIA_GEFORCE_GT440 = 0x0de0, @@ -1418,6 +1449,7 @@ enum wined3d_pci_device CARD_NVIDIA_GEFORCE_GTX570 = 0x1081, CARD_NVIDIA_GEFORCE_GTX580 = 0x1080, CARD_NVIDIA_GEFORCE_GT610 = 0x104a, + CARD_NVIDIA_GEFORCE_GT630 = 0x0f00, CARD_NVIDIA_GEFORCE_GT630M = 0x0de9, CARD_NVIDIA_GEFORCE_GT640M = 0x0fd2, CARD_NVIDIA_GEFORCE_GT650M = 0x0fd1, @@ -1426,7 +1458,10 @@ enum wined3d_pci_device CARD_NVIDIA_GEFORCE_GTX660 = 0x11c0, CARD_NVIDIA_GEFORCE_GTX660TI = 0x1183, CARD_NVIDIA_GEFORCE_GTX670 = 0x1189, + CARD_NVIDIA_GEFORCE_GTX670MX = 0x11a1, CARD_NVIDIA_GEFORCE_GTX680 = 0x1180, + CARD_NVIDIA_GEFORCE_GTX770M = 0x11e0, + CARD_NVIDIA_GEFORCE_GTX770 = 0x1184, CARD_INTEL_830M = 0x3577, CARD_INTEL_855GM = 0x3582, @@ -1500,7 +1535,6 @@ struct wined3d_gl_limits UINT buffers; UINT lights; UINT textures; - UINT texture_stages; UINT texture_coords; UINT fragment_samplers; UINT vertex_samplers; @@ -1541,6 +1575,7 @@ struct wined3d_gl_info BOOL supported[WINED3D_GL_EXT_COUNT]; GLint wrap_lookup[WINED3D_TADDRESS_MIRROR_ONCE - WINED3D_TADDRESS_WRAP + 1]; + HGLRC (WINAPI *p_wglCreateContextAttribsARB)(HDC dc, HGLRC share, const GLint *attribs); struct opengl_funcs gl_ops; struct wined3d_fbo_ops fbo_ops; @@ -1558,6 +1593,37 @@ struct wined3d_driver_info DWORD version_low; }; +struct wined3d_d3d_limits +{ + UINT vs_version, gs_version, ps_version; + DWORD vs_uniform_count; + DWORD ps_uniform_count; + UINT ffp_textures; + UINT ffp_blend_stages; +}; + +typedef void (WINE_GLAPI *wined3d_ffp_attrib_func)(const void *data); +typedef void (WINE_GLAPI *wined3d_ffp_texcoord_func)(GLenum unit, const void *data); +extern wined3d_ffp_attrib_func specular_func_3ubv DECLSPEC_HIDDEN; + +struct wined3d_ffp_attrib_ops +{ + wined3d_ffp_attrib_func position[WINED3D_FFP_EMIT_COUNT]; + wined3d_ffp_attrib_func diffuse[WINED3D_FFP_EMIT_COUNT]; + wined3d_ffp_attrib_func specular[WINED3D_FFP_EMIT_COUNT]; + wined3d_ffp_attrib_func normal[WINED3D_FFP_EMIT_COUNT]; + wined3d_ffp_texcoord_func texcoord[WINED3D_FFP_EMIT_COUNT]; +}; + +struct wined3d_d3d_info +{ + struct wined3d_d3d_limits limits; + struct wined3d_ffp_attrib_ops ffp_attrib_ops; + BOOL xyzrhw; + BOOL vs_clipping; + DWORD valid_rt_mask; +}; + /* The adapter structure */ struct wined3d_adapter { @@ -1566,6 +1632,7 @@ struct wined3d_adapter enum wined3d_format_id screen_format; struct wined3d_gl_info gl_info; + struct wined3d_d3d_info d3d_info; struct wined3d_driver_info driver_info; WCHAR DeviceName[CCHDEVICENAME]; /* DeviceName for use with e.g. ChangeDisplaySettings */ unsigned int cfg_count; @@ -1574,6 +1641,7 @@ struct wined3d_adapter unsigned int UsedTextureRam; LUID luid; + const struct wined3d_vertex_pipe_ops *vertex_pipe; const struct fragment_pipeline *fragment_pipe; const struct wined3d_shader_backend_ops *shader_backend; const struct blit_shader *blitter; @@ -1621,9 +1689,10 @@ struct texture_stage_op unsigned padding : 10; }; -struct ffp_frag_settings { - struct texture_stage_op op[MAX_TEXTURES]; - enum fogmode fog; +struct ffp_frag_settings +{ + struct texture_stage_op op[MAX_TEXTURES]; + enum wined3d_ffp_ps_fog_mode fog; /* Use shorts instead of chars to get dword alignment */ unsigned short sRGB_write; unsigned short emul_clipplanes; @@ -1636,15 +1705,62 @@ struct ffp_frag_desc }; extern const struct wine_rb_functions wined3d_ffp_frag_program_rb_functions DECLSPEC_HIDDEN; +extern const struct wine_rb_functions wined3d_ffp_vertex_program_rb_functions DECLSPEC_HIDDEN; extern const struct wined3d_parent_ops wined3d_null_parent_ops DECLSPEC_HIDDEN; -void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_state *state, +void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d_state *state, struct ffp_frag_settings *settings, BOOL ignore_textype) DECLSPEC_HIDDEN; const struct ffp_frag_desc *find_ffp_frag_shader(const struct wine_rb_tree *fragment_shaders, const struct ffp_frag_settings *settings) DECLSPEC_HIDDEN; void add_ffp_frag_shader(struct wine_rb_tree *shaders, struct ffp_frag_desc *desc) DECLSPEC_HIDDEN; void wined3d_get_draw_rect(const struct wined3d_state *state, RECT *rect) DECLSPEC_HIDDEN; +enum wined3d_ffp_vs_fog_mode +{ + WINED3D_FFP_VS_FOG_OFF = 0, + WINED3D_FFP_VS_FOG_FOGCOORD = 1, + WINED3D_FFP_VS_FOG_DEPTH = 2, + WINED3D_FFP_VS_FOG_RANGE = 3, +}; + +#define WINED3D_FFP_TCI_SHIFT 16 +#define WINED3D_FFP_TCI_MASK 0xff + +#define WINED3D_FFP_LIGHT_TYPE_SHIFT(idx) (3 * (idx)) +#define WINED3D_FFP_LIGHT_TYPE_MASK 0x7 + +struct wined3d_ffp_vs_settings +{ + DWORD light_type : 24; /* MAX_ACTIVE_LIGHTS, 8 * 3 */ + DWORD diffuse_source : 2; + DWORD emission_source : 2; + DWORD ambient_source : 2; + DWORD specular_source : 2; + + DWORD transformed : 1; + DWORD clipping : 1; + DWORD normal : 1; + DWORD normalize : 1; + DWORD lighting : 1; + DWORD localviewer : 1; + DWORD point_size : 1; + DWORD fog_mode : 2; + DWORD texcoords : 8; /* MAX_TEXTURES */ + DWORD ortho_fog : 1; + DWORD padding : 14; + + BYTE texgen[MAX_TEXTURES]; +}; + +struct wined3d_ffp_vs_desc +{ + struct wine_rb_entry entry; + struct wined3d_ffp_vs_settings settings; +}; + +void wined3d_ffp_get_vs_settings(const struct wined3d_state *state, const struct wined3d_stream_info *si, + struct wined3d_ffp_vs_settings *settings) DECLSPEC_HIDDEN; + struct wined3d { LONG ref; @@ -1658,6 +1774,72 @@ HRESULT wined3d_init(struct wined3d *wined3d, UINT version, DWORD flags) DECLSPE BOOL wined3d_register_window(HWND window, struct wined3d_device *device) DECLSPEC_HIDDEN; void wined3d_unregister_window(HWND window) DECLSPEC_HIDDEN; +struct wined3d_stream_output +{ + struct wined3d_buffer *buffer; + UINT offset; +}; + +struct wined3d_stream_state +{ + struct wined3d_buffer *buffer; + UINT offset; + UINT stride; + UINT frequency; + UINT flags; +}; + +struct wined3d_state +{ + const struct wined3d_fb_state *fb; + + struct wined3d_vertex_declaration *vertex_declaration; + struct wined3d_stream_output stream_output[MAX_STREAM_OUT]; + struct wined3d_stream_state streams[MAX_STREAMS + 1 /* tesselated pseudo-stream */]; + struct wined3d_buffer *index_buffer; + enum wined3d_format_id index_format; + INT base_vertex_index; + INT load_base_vertex_index; /* Non-indexed drawing needs 0 here, indexed needs base_vertex_index. */ + GLenum gl_primitive_type; + + struct wined3d_shader *vertex_shader; + struct wined3d_buffer *vs_cb[MAX_CONSTANT_BUFFERS]; + struct wined3d_sampler *vs_sampler[MAX_SAMPLER_OBJECTS]; + BOOL vs_consts_b[MAX_CONST_B]; + INT vs_consts_i[MAX_CONST_I * 4]; + float *vs_consts_f; + + struct wined3d_shader *geometry_shader; + struct wined3d_buffer *gs_cb[MAX_CONSTANT_BUFFERS]; + struct wined3d_sampler *gs_sampler[MAX_SAMPLER_OBJECTS]; + + struct wined3d_shader *pixel_shader; + struct wined3d_buffer *ps_cb[MAX_CONSTANT_BUFFERS]; + struct wined3d_sampler *ps_sampler[MAX_SAMPLER_OBJECTS]; + BOOL ps_consts_b[MAX_CONST_B]; + INT ps_consts_i[MAX_CONST_I * 4]; + float *ps_consts_f; + + struct wined3d_texture *textures[MAX_COMBINED_SAMPLERS]; + DWORD sampler_states[MAX_COMBINED_SAMPLERS][WINED3D_HIGHEST_SAMPLER_STATE + 1]; + DWORD texture_states[MAX_TEXTURES][WINED3D_HIGHEST_TEXTURE_STATE + 1]; + DWORD lowest_disabled_stage; + + struct wined3d_matrix transforms[HIGHEST_TRANSFORMSTATE + 1]; + struct wined3d_vec4 clip_planes[MAX_CLIPPLANES]; + struct wined3d_material material; + struct wined3d_viewport viewport; + RECT scissor_rect; + + /* Light hashmap. Collisions are handled using linked lists. */ +#define LIGHTMAP_SIZE 43 +#define LIGHTMAP_HASHFUNC(x) ((x) % LIGHTMAP_SIZE) + struct list light_map[LIGHTMAP_SIZE]; + const struct wined3d_light_info *lights[MAX_ACTIVE_LIGHTS]; + + DWORD render_states[WINEHIGHEST_RENDER_STATE + 1]; +}; + /***************************************************************************** * IWineD3DDevice implementation structure */ @@ -1685,21 +1867,16 @@ struct wined3d_device const struct wined3d_shader_backend_ops *shader_backend; void *shader_priv; void *fragment_priv; + void *vertex_priv; void *blit_priv; struct StateEntry StateTable[STATE_HIGHEST + 1]; /* Array of functions for states which are handled by more than one pipeline part */ APPLYSTATEFUNC *multistate_funcs[STATE_HIGHEST + 1]; const struct blit_shader *blitter; - unsigned int max_ffp_textures; - UINT vs_version, gs_version, ps_version; - DWORD d3d_vshader_constantF, d3d_pshader_constantF; /* Advertised d3d caps, not GL ones */ - DWORD vs_clipping; UINT instance_count; - WORD view_ident : 1; /* true iff view matrix is identity */ WORD vertexBlendUsed : 1; /* To avoid needless setting of the blend matrices */ - WORD isRecordingState : 1; WORD isInDraw : 1; WORD bCursorVisible : 1; WORD d3d_initialized : 1; @@ -1707,17 +1884,15 @@ struct wined3d_device WORD softwareVertexProcessing : 1; /* process vertex shaders using software or hardware */ WORD useDrawStridedSlow : 1; WORD filter_messages : 1; - WORD padding : 6; + WORD padding : 8; BYTE fixed_function_usage_map; /* MAX_TEXTURES, 8 */ -#define DDRAW_PITCH_ALIGNMENT 8 -#define D3D8_PITCH_ALIGNMENT 4 unsigned char surface_alignment; /* Line Alignment of surfaces */ - /* State block related */ - struct wined3d_stateblock *stateBlock; - struct wined3d_stateblock *updateStateBlock; + struct wined3d_state state; + struct wined3d_state *update_state; + struct wined3d_stateblock *recording; /* Internal use fields */ struct wined3d_device_creation_parameters create_parms; @@ -1730,7 +1905,6 @@ struct wined3d_device struct list shaders; /* a linked list to track shaders (pixel and vertex) */ /* Render Target Support */ - DWORD valid_rt_mask; struct wined3d_fb_state fb; struct wined3d_surface *onscreen_depth_stencil; struct wined3d_surface *auto_depth_stencil; @@ -1761,7 +1935,7 @@ struct wined3d_device DWORD rev_tex_unit_map[MAX_COMBINED_SAMPLERS]; /* Stream source management */ - struct wined3d_stream_info strided_streams; + struct wined3d_stream_info stream_info; struct wined3d_event_query *buffer_queries[MAX_ATTRIBS]; unsigned int num_buffer_queries; @@ -1805,15 +1979,15 @@ static inline void invalidate_active_texture(const struct wined3d_device *device #define WINED3D_RESOURCE_ACCESS_GPU 0x1 #define WINED3D_RESOURCE_ACCESS_CPU 0x2 -/* SCRATCH is mostly the same as CPU, but can't be used by the GPU at all, - * not even for resource uploads. */ -#define WINED3D_RESOURCE_ACCESS_SCRATCH 0x4 struct wined3d_resource_ops { void (*resource_unload)(struct wined3d_resource *resource); }; +void *wined3d_resource_allocate_sysmem(SIZE_T size) DECLSPEC_HIDDEN; +void wined3d_resource_free_sysmem(void *mem) DECLSPEC_HIDDEN; + struct wined3d_resource { LONG ref; @@ -1823,19 +1997,19 @@ struct wined3d_resource enum wined3d_resource_type type; const struct wined3d_format *format; enum wined3d_multisample_type multisample_type; - UINT multisample_quality; - DWORD usage; + UINT multisample_quality; + DWORD usage; enum wined3d_pool pool; DWORD access_flags; UINT width; UINT height; UINT depth; - UINT size; - DWORD priority; - BYTE *allocatedMemory; /* Pointer to the real data location */ - BYTE *heapMemory; /* Pointer to the HeapAlloced block of memory */ - struct list privateData; - struct list resource_list_entry; + UINT size; + DWORD priority; + BYTE *allocatedMemory; /* Pointer to the real data location */ + void *heap_memory; + struct list privateData; + struct list resource_list_entry; void *parent; const struct wined3d_parent_ops *parent_ops; @@ -1852,6 +2026,9 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device * const struct wined3d_resource_ops *resource_ops) DECLSPEC_HIDDEN; DWORD resource_set_priority(struct wined3d_resource *resource, DWORD priority) DECLSPEC_HIDDEN; void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN; +DWORD wined3d_resource_sanitize_map_flags(const struct wined3d_resource *resource, + DWORD flags) DECLSPEC_HIDDEN; +GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN; /* Tests show that the start address of resources is 32 byte aligned */ #define RESOURCE_ALIGNMENT 16 @@ -1935,15 +2112,28 @@ void wined3d_texture_apply_state_changes(struct wined3d_texture *texture, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; void wined3d_texture_set_dirty(struct wined3d_texture *texture, BOOL dirty) DECLSPEC_HIDDEN; +#define WINED3D_VFLAG_LOCKED 0x00000001 +#define WINED3D_VFLAG_ALLOCATED 0x00000002 +#define WINED3D_VFLAG_SRGB_ALLOCATED 0x00000004 +#define WINED3D_VFLAG_PBO 0x00000008 + +#define WINED3D_LOCATION_DISCARDED 0x00000001 +#define WINED3D_LOCATION_SYSMEM 0x00000002 +#define WINED3D_LOCATION_BUFFER 0x00000004 +#define WINED3D_LOCATION_TEXTURE_RGB 0x00000008 +#define WINED3D_LOCATION_TEXTURE_SRGB 0x00000010 + +const char *wined3d_debug_location(DWORD location) DECLSPEC_HIDDEN; + struct wined3d_volume { struct wined3d_resource resource; struct wined3d_texture *container; - BOOL lockable; - BOOL locked; - struct wined3d_box lockedBox; - struct wined3d_box dirtyBox; - BOOL dirty; + + DWORD flags, locations; + GLint texture_level; + DWORD download_count; + GLuint pbo; }; static inline struct wined3d_volume *volume_from_resource(struct wined3d_resource *resource) @@ -1951,9 +2141,11 @@ static inline struct wined3d_volume *volume_from_resource(struct wined3d_resourc return CONTAINING_RECORD(resource, struct wined3d_volume, resource); } -void volume_add_dirty_box(struct wined3d_volume *volume, const struct wined3d_box *dirty_box) DECLSPEC_HIDDEN; -void volume_load(const struct wined3d_volume *volume, struct wined3d_context *context, UINT level, BOOL srgb_mode) DECLSPEC_HIDDEN; +void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *context, BOOL srgb_mode) DECLSPEC_HIDDEN; void volume_set_container(struct wined3d_volume *volume, struct wined3d_texture *container) DECLSPEC_HIDDEN; +void wined3d_volume_invalidate_location(struct wined3d_volume *volume, DWORD location) DECLSPEC_HIDDEN; +void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wined3d_context *context, + const struct wined3d_bo_address *data) DECLSPEC_HIDDEN; struct wined3d_surface_dib { @@ -1981,24 +2173,6 @@ struct fbo_entry GLuint id; }; -enum wined3d_container_type -{ - WINED3D_CONTAINER_NONE = 0, - WINED3D_CONTAINER_SWAPCHAIN, - WINED3D_CONTAINER_TEXTURE, -}; - -struct wined3d_subresource_container -{ - enum wined3d_container_type type; - union - { - struct wined3d_swapchain *swapchain; - struct wined3d_texture *texture; - void *base; - } u; -}; - struct wined3d_surface_ops { HRESULT (*surface_private_setup)(struct wined3d_surface *surface); @@ -2011,14 +2185,16 @@ struct wined3d_surface { struct wined3d_resource resource; const struct wined3d_surface_ops *surface_ops; - struct wined3d_subresource_container container; + struct wined3d_texture *container; + struct wined3d_swapchain *swapchain; struct wined3d_palette *palette; /* D3D7 style palette handling */ DWORD draw_binding; DWORD flags; - UINT pow2Width; - UINT pow2Height; + UINT pitch; + UINT pow2Width; + UINT pow2Height; /* A method to retrieve the drawable size. Not in the Vtable to make it changeable */ void (*get_drawable_size)(const struct wined3d_context *context, UINT *width, UINT *height); @@ -2093,8 +2269,8 @@ void surface_prepare_texture(struct wined3d_surface *surface, struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN; void surface_set_compatible_renderbuffer(struct wined3d_surface *surface, const struct wined3d_surface *rt) DECLSPEC_HIDDEN; -void surface_set_container(struct wined3d_surface *surface, - enum wined3d_container_type type, void *container) DECLSPEC_HIDDEN; +void surface_set_container(struct wined3d_surface *surface, struct wined3d_texture *container) DECLSPEC_HIDDEN; +void surface_set_swapchain(struct wined3d_surface *surface, struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; void surface_set_texture_name(struct wined3d_surface *surface, GLuint name, BOOL srgb_name) DECLSPEC_HIDDEN; void surface_set_texture_target(struct wined3d_surface *surface, GLenum target, GLint level) DECLSPEC_HIDDEN; void surface_translate_drawable_coords(const struct wined3d_surface *surface, HWND window, RECT *rect) DECLSPEC_HIDDEN; @@ -2200,10 +2376,8 @@ struct wined3d_vertex_declaration struct wined3d_vertex_declaration_element *elements; UINT element_count; - DWORD streams[MAX_STREAMS]; - UINT num_streams; - BOOL position_transformed; - BOOL half_float_conv_needed; + BOOL position_transformed; + BOOL half_float_conv_needed; }; struct wined3d_saved_states @@ -2238,72 +2412,6 @@ struct StageState { DWORD state; }; -struct wined3d_stream_output -{ - struct wined3d_buffer *buffer; - UINT offset; -}; - -struct wined3d_stream_state -{ - struct wined3d_buffer *buffer; - UINT offset; - UINT stride; - UINT frequency; - UINT flags; -}; - -struct wined3d_state -{ - const struct wined3d_fb_state *fb; - - struct wined3d_vertex_declaration *vertex_declaration; - struct wined3d_stream_output stream_output[MAX_STREAM_OUT]; - struct wined3d_stream_state streams[MAX_STREAMS + 1 /* tesselated pseudo-stream */]; - struct wined3d_buffer *index_buffer; - enum wined3d_format_id index_format; - INT base_vertex_index; - INT load_base_vertex_index; /* Non-indexed drawing needs 0 here, indexed needs base_vertex_index. */ - GLenum gl_primitive_type; - - struct wined3d_shader *vertex_shader; - struct wined3d_buffer *vs_cb[MAX_CONSTANT_BUFFERS]; - struct wined3d_sampler *vs_sampler[MAX_SAMPLER_OBJECTS]; - BOOL vs_consts_b[MAX_CONST_B]; - INT vs_consts_i[MAX_CONST_I * 4]; - float *vs_consts_f; - - struct wined3d_shader *geometry_shader; - struct wined3d_buffer *gs_cb[MAX_CONSTANT_BUFFERS]; - struct wined3d_sampler *gs_sampler[MAX_SAMPLER_OBJECTS]; - - struct wined3d_shader *pixel_shader; - struct wined3d_buffer *ps_cb[MAX_CONSTANT_BUFFERS]; - struct wined3d_sampler *ps_sampler[MAX_SAMPLER_OBJECTS]; - BOOL ps_consts_b[MAX_CONST_B]; - INT ps_consts_i[MAX_CONST_I * 4]; - float *ps_consts_f; - - struct wined3d_texture *textures[MAX_COMBINED_SAMPLERS]; - DWORD sampler_states[MAX_COMBINED_SAMPLERS][WINED3D_HIGHEST_SAMPLER_STATE + 1]; - DWORD texture_states[MAX_TEXTURES][WINED3D_HIGHEST_TEXTURE_STATE + 1]; - DWORD lowest_disabled_stage; - - struct wined3d_matrix transforms[HIGHEST_TRANSFORMSTATE + 1]; - struct wined3d_vec4 clip_planes[MAX_CLIPPLANES]; - struct wined3d_material material; - struct wined3d_viewport viewport; - RECT scissor_rect; - - /* Light hashmap . Collisions are handled using standard wine double linked lists */ -#define LIGHTMAP_SIZE 43 /* Use of a prime number recommended. Set to 1 for a linked list! */ -#define LIGHTMAP_HASHFUNC(x) ((x) % LIGHTMAP_SIZE) /* Primitive and simple function */ - struct list light_map[LIGHTMAP_SIZE]; /* Hash map containing the lights */ - const struct wined3d_light_info *lights[MAX_ACTIVE_LIGHTS]; /* Map of opengl lights to d3d lights */ - - DWORD render_states[WINEHIGHEST_RENDER_STATE + 1]; -}; - struct wined3d_stateblock { LONG ref; /* Note: Ref counting not required */ @@ -2337,8 +2445,11 @@ struct wined3d_stateblock }; void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN; -void stateblock_init_default_state(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN; -void stateblock_unbind_resources(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN; + +void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN; +HRESULT state_init(struct wined3d_state *state, const struct wined3d_d3d_info *d3d_info) DECLSPEC_HIDDEN; +void state_init_default(struct wined3d_state *state, struct wined3d_device *device) DECLSPEC_HIDDEN; +void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN; /* Direct3D terminology with little modifications. We do not have an issued state * because only the driver knows about it, but we have a created state because d3d @@ -2382,15 +2493,6 @@ struct wined3d_map_range UINT size; }; -#define WINED3D_BUFFER_OPTIMIZED 0x01 /* Optimize has been called for the buffer */ -#define WINED3D_BUFFER_HASDESC 0x02 /* A vertex description has been found */ -#define WINED3D_BUFFER_CREATEBO 0x04 /* Attempt to create a buffer object next PreLoad */ -#define WINED3D_BUFFER_DOUBLEBUFFER 0x08 /* Use a vbo and local allocated memory */ -#define WINED3D_BUFFER_FLUSH 0x10 /* Manual unmap flushing */ -#define WINED3D_BUFFER_DISCARD 0x20 /* A DISCARD lock has occurred since the last PreLoad */ -#define WINED3D_BUFFER_NOSYNC 0x40 /* All locks since the last PreLoad had NOOVERWRITE set */ -#define WINED3D_BUFFER_APPLESYNC 0x80 /* Using sync as in GL_APPLE_flush_buffer_range */ - struct wined3d_buffer { struct wined3d_resource resource; @@ -2449,8 +2551,7 @@ struct wined3d_swapchain struct wined3d_surface **back_buffers; struct wined3d_surface *front_buffer; struct wined3d_swapchain_desc desc; - DWORD orig_width, orig_height; - enum wined3d_format_id orig_fmt; + struct wined3d_display_mode original_mode; struct wined3d_gamma_ramp orig_gamma; BOOL render_to_fbo; const struct wined3d_format *ds_format; @@ -2475,8 +2576,6 @@ HDC swapchain_get_backup_dc(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; void swapchain_update_render_to_fbo(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; -#define DEFAULT_REFRESH_RATE 0 - /***************************************************************************** * Utility function prototypes */ @@ -2530,6 +2629,43 @@ void state_fog_fragpart(struct wined3d_context *context, void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; +void sampler_texmatrix(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; +void state_specularenable(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; +void transform_world(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; +void transform_view(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; +void transform_projection(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; +void transform_texture(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; +void state_ambient(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; +void viewport_vertexpart(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; +void state_clipping(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; +void light(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; +void vertexdeclaration(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; +void clipplane(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; +void state_psizemin_w(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; +void state_psizemin_ext(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; +void state_psizemin_arb(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; +void state_pointsprite_w(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; +void state_pointsprite(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; +void state_pscale(struct wined3d_context *context, + const struct wined3d_state *state, DWORD state_id) DECLSPEC_HIDDEN; + BOOL getColorBits(const struct wined3d_format *format, BYTE *redSize, BYTE *greenSize, BYTE *blueSize, BYTE *alphaSize, BYTE *totalSize) DECLSPEC_HIDDEN; BOOL getDepthStencilBits(const struct wined3d_format *format, @@ -2619,6 +2755,7 @@ struct wined3d_shader struct list constantsF; struct list constantsI; struct wined3d_shader_reg_maps reg_maps; + BOOL lconst_inf_or_nan; struct wined3d_shader_signature_element input_signature[max(MAX_ATTRIBS, MAX_REG_INPUT)]; struct wined3d_shader_signature_element output_signature[MAX_REG_OUTPUT]; @@ -2635,8 +2772,7 @@ struct wined3d_shader } u; }; -void pixelshader_update_samplers(struct wined3d_shader_reg_maps *reg_maps, - struct wined3d_texture * const *textures) DECLSPEC_HIDDEN; +void pixelshader_update_samplers(struct wined3d_shader *shader, WORD tex_types) DECLSPEC_HIDDEN; void find_ps_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader, struct ps_compile_args *args) DECLSPEC_HIDDEN; @@ -2741,13 +2877,6 @@ struct ps_np2fixup_info { WORD num_consts; }; -/* sRGB correction constants */ -static const float srgb_cmp = 0.0031308f; -static const float srgb_mul_low = 12.92f; -static const float srgb_pow = 0.41666f; -static const float srgb_mul_high = 1.055f; -static const float srgb_sub_high = 0.055f; - struct wined3d_palette { LONG ref; @@ -2776,7 +2905,6 @@ extern enum wined3d_format_id pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN #define WINED3DFMT_FLAG_DEPTH 0x00000004 #define WINED3DFMT_FLAG_STENCIL 0x00000008 #define WINED3DFMT_FLAG_RENDERTARGET 0x00000010 -#define WINED3DFMT_FLAG_FOURCC 0x00000020 #define WINED3DFMT_FLAG_FBO_ATTACHABLE 0x00000040 #define WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB 0x00000080 #define WINED3DFMT_FLAG_GETDC 0x00000100 @@ -2840,7 +2968,7 @@ struct wined3d_format const struct wined3d_format *wined3d_get_format(const struct wined3d_gl_info *gl_info, enum wined3d_format_id format_id) DECLSPEC_HIDDEN; UINT wined3d_format_calculate_size(const struct wined3d_format *format, - UINT alignment, UINT width, UINT height) DECLSPEC_HIDDEN; + UINT alignment, UINT width, UINT height, UINT depth) DECLSPEC_HIDDEN; DWORD wined3d_format_convert_from_float(const struct wined3d_surface *surface, const struct wined3d_color *color) DECLSPEC_HIDDEN; diff --git a/dll/ntdll/CMakeLists.txt b/dll/ntdll/CMakeLists.txt index 7ad854796d1..83e999970fd 100644 --- a/dll/ntdll/CMakeLists.txt +++ b/dll/ntdll/CMakeLists.txt @@ -39,6 +39,10 @@ add_asm_files(ntdll_asm ${ASM_SOURCE}) add_library(ntdll SHARED ${SOURCE} ${ntdll_asm}) set_module_type(ntdll win32dll ENTRYPOINT 0) +############################################# +## HACK FOR MSVC COMPILATION WITH win32dll ## +set_subsystem(ntdll console) +################# END HACK ################# if(MSVC) add_target_link_flags(ntdll "/RELEASE") diff --git a/dll/ntdll/csr/connect.c b/dll/ntdll/csr/connect.c index bf89f9057f2..c2d2ac8f969 100644 --- a/dll/ntdll/csr/connect.c +++ b/dll/ntdll/csr/connect.c @@ -107,7 +107,7 @@ CsrpConnectToServer(IN PWSTR ObjectDirectory) SecurityQos.EffectiveOnly = TRUE; /* Setup the connection info */ - ConnectionInfo.Version = CSRSRV_VERSION; + ConnectionInfo.DebugFlags = 0; /* Create a SID for us */ Status = RtlAllocateAndInitializeSid(&NtSidAuthority, @@ -153,12 +153,12 @@ CsrpConnectToServer(IN PWSTR ObjectDirectory) (ULONG_PTR)LpcWrite.ViewBase; /* Save the Process */ - CsrProcessId = ConnectionInfo.ProcessId; + CsrProcessId = ConnectionInfo.ServerProcessId; /* Save CSR Section data */ NtCurrentPeb()->ReadOnlySharedMemoryBase = ConnectionInfo.SharedSectionBase; NtCurrentPeb()->ReadOnlySharedMemoryHeap = ConnectionInfo.SharedSectionHeap; - NtCurrentPeb()->ReadOnlyStaticServerData = ConnectionInfo.SharedSectionData; + NtCurrentPeb()->ReadOnlyStaticServerData = ConnectionInfo.SharedStaticServerData; /* Create the port heap */ CsrPortHeap = RtlCreateHeap(0, @@ -233,7 +233,7 @@ CsrClientConnectToServer(IN PWSTR ObjectDirectory, if (InsideCsrProcess) { /* We're inside, so let's find csrsrv */ - DPRINT1("Next-GEN CSRSS support\n"); + DPRINT("Next-GEN CSRSS support\n"); RtlInitUnicodeString(&CsrSrvName, L"csrsrv"); Status = LdrGetDllHandle(NULL, NULL, @@ -321,6 +321,33 @@ CsrClientConnectToServer(IN PWSTR ObjectDirectory, return Status; } +#if 0 +// +// Structures can be padded at the end, causing the size of the entire structure +// minus the size of the last field, not to be equal to the offset of the last +// field. +// +typedef struct _TEST_EMBEDDED +{ + ULONG One; + ULONG Two; + ULONG Three; +} TEST_EMBEDDED; + +typedef struct _TEST +{ + PORT_MESSAGE h; + TEST_EMBEDDED Three; +} TEST; + +C_ASSERT(sizeof(PORT_MESSAGE) == 0x18); +C_ASSERT(FIELD_OFFSET(TEST, Three) == 0x18); +C_ASSERT(sizeof(TEST_EMBEDDED) == 0xC); + +C_ASSERT(sizeof(TEST) != (sizeof(TEST_EMBEDDED) + sizeof(PORT_MESSAGE))); +C_ASSERT((sizeof(TEST) - sizeof(TEST_EMBEDDED)) != FIELD_OFFSET(TEST, Three)); +#endif + /* * @implemented */ @@ -337,10 +364,10 @@ CsrClientCallServer(IN OUT PCSR_API_MESSAGE ApiMessage, /* Fill out the Port Message Header */ ApiMessage->Header.u2.ZeroInit = 0; - ApiMessage->Header.u1.s1.TotalLength = - FIELD_OFFSET(CSR_API_MESSAGE, Data) + DataLength; - ApiMessage->Header.u1.s1.DataLength = - ApiMessage->Header.u1.s1.TotalLength - sizeof(PORT_MESSAGE); + ApiMessage->Header.u1.s1.TotalLength = DataLength + + sizeof(CSR_API_MESSAGE) - sizeof(ApiMessage->Data); // FIELD_OFFSET(CSR_API_MESSAGE, Data) + DataLength; + ApiMessage->Header.u1.s1.DataLength = DataLength + + FIELD_OFFSET(CSR_API_MESSAGE, Data) - sizeof(ApiMessage->Header);// ApiMessage->Header.u1.s1.TotalLength - sizeof(PORT_MESSAGE); /* Fill out the CSR Header */ ApiMessage->ApiNumber = ApiNumber; @@ -429,7 +456,7 @@ CsrClientCallServer(IN OUT PCSR_API_MESSAGE ApiMessage, else { /* This is a server-to-server call. Save our CID and do a direct call. */ - DPRINT1("Next gen server-to-server call\n"); + DPRINT("Next gen server-to-server call\n"); /* We check this equality inside CsrValidateMessageBuffer */ ApiMessage->Header.ClientId = NtCurrentTeb()->ClientId; diff --git a/dll/ntdll/def/ntdll.spec b/dll/ntdll/def/ntdll.spec index 758026585dc..a8c3d92b747 100644 --- a/dll/ntdll/def/ntdll.spec +++ b/dll/ntdll/def/ntdll.spec @@ -1,26 +1,5 @@ -;@ stdcall A_SHAFinal ; 6.0 and higher -;@ stdcall A_SHAInit ; 6.0 and higher -;@ stdcall A_SHAUpdate ; 6.0 and higher -;@ stdcall AitFireParentUsageEvent ; 6.1 and higher -;@ stdcall AitLogFeatureUsageByApp ; 6.1 and higher -;@ stdcall AlpcAdjustCompletionListConcurrencyCount ; 6.0 and higher -;@ stdcall AlpcFreeCompletionListMessage ; 6.0 and higher -;@ stdcall AlpcGetCompletionListLastMessageInformation ; 6.0 and higher -;@ stdcall AlpcGetCompletionListMessageAttributes ; 6.0 and higher -;@ stdcall AlpcGetHeaderSize ; 6.0 and higher -;@ stdcall AlpcGetMessageAttribute ; 6.0 and higher -;@ stdcall AlpcGetMessageFromCompletionList ; 6.0 and higher -;@ stdcall AlpcGetOutstandingCompletionListMessageCount ; 6.0 and higher -;@ stdcall AlpcInitializeMessageAttribute ; 6.0 and higher -;@ stdcall AlpcMaxAllowedMessageLength ; 6.0 and higher -;@ stdcall AlpcRegisterCompletionList ; 6.0 and higher -;@ stdcall AlpcRegisterCompletionListWorkerThread ; 6.0 and higher -;@ stdcall AlpcRundownCompletionList ; 6.1 and higher -;@ stdcall AlpcUnregisterCompletionList ; 6.0 and higher -;@ stdcall AlpcUnregisterCompletionListWorkerThread ; 6.0 and higher @ stdcall CsrAllocateCaptureBuffer(long long) -;@ stdcall CsrAllocateCapturePointer ; NT3, NT4 only @ stdcall CsrAllocateMessagePointer(ptr long ptr) @ stdcall CsrCaptureMessageBuffer(ptr ptr long ptr) @ stdcall CsrCaptureMessageMultiUnicodeStringsInPlace(ptr long ptr) @@ -28,9 +7,6 @@ @ stdcall CsrCaptureTimeout(long ptr) @ stdcall CsrClientCallServer(ptr ptr long long) @ stdcall CsrClientConnectToServer(str long ptr ptr ptr) -;@ stdcall CsrClientMaxMessage ; NT3 only -;@ stdcall CsrClientSendMessage ; NT3 only -;@ stdcall CsrClientThreadConnect ; NT3 only @ stdcall CsrFreeCaptureBuffer(ptr) @ stdcall CsrGetProcessId() @ stdcall CsrIdentifyAlertableThread() @@ -38,7 +14,6 @@ @ stdcall CsrProbeForRead(ptr long long) @ stdcall CsrProbeForWrite(ptr long long) @ stdcall CsrSetPriorityClass(ptr ptr) -;@ stdcall CsrpProcessCallbackRequest ; 3.51 only @ stdcall DbgBreakPoint() @ varargs DbgPrint(str) @ varargs DbgPrintEx(long long str) @@ -67,21 +42,21 @@ @ stdcall KiUserApcDispatcher(ptr ptr ptr ptr) @ stdcall KiUserCallbackDispatcher(ptr ptr long) ; CHECKME @ stdcall KiUserExceptionDispatcher(ptr ptr) -;@ stdcall LdrAccessOutOfProcessResource +@ stdcall LdrAccessOutOfProcessResource(ptr ptr ptr ptr ptr) @ stdcall LdrAccessResource(long ptr ptr ptr) @ stdcall LdrAddRefDll(long ptr) ;@ stdcall LdrAlternateResourcesEnabled -;@ stdcall LdrCreateOutOfProcessImage -;@ stdcall LdrDestroyOutOfProcessImage +@ stdcall LdrCreateOutOfProcessImage(long ptr ptr ptr) +@ stdcall LdrDestroyOutOfProcessImage(ptr) @ stdcall LdrDisableThreadCalloutsForDll(long) @ stdcall LdrEnumResources(ptr ptr long ptr ptr) @ stdcall LdrEnumerateLoadedModules(long ptr long) -;@ stdcall LdrFindCreateProcessManifest ; 5.1 and 5.2 only +@ stdcall LdrFindCreateProcessManifest(long ptr ptr long ptr) ; 5.1 and 5.2 only @ stdcall LdrFindEntryForAddress(ptr ptr) @ stdcall LdrFindResourceDirectory_U(long ptr long ptr) ;@ stdcall LdrFindResourceEx_U ; 5.1 and higher @ stdcall LdrFindResource_U(long ptr long ptr) -;@ stdcall LdrFlushAlternateResourceModules +@ stdcall LdrFlushAlternateResourceModules() @ stdcall LdrGetDllHandle(wstr long ptr ptr) @ stdcall LdrGetDllHandleEx(long wstr long ptr ptr) @ stdcall LdrGetProcedureAddress(ptr ptr long ptr) @@ -97,7 +72,7 @@ @ stdcall LdrQueryImageFileKeyOption(ptr ptr long ptr long ptr) @ stdcall LdrQueryProcessModuleInformation(ptr long ptr) ;@ stdcall LdrSetAppCompatDllRedirectionCallback -;@ stdcall LdrSetDllManifestProber +@ stdcall LdrSetDllManifestProber(ptr) @ stdcall LdrShutdownProcess() @ stdcall LdrShutdownThread() @ stdcall LdrUnloadAlternateResourceModule(ptr) @@ -132,7 +107,6 @@ @ stdcall NtCallbackReturn(ptr long long) @ stdcall NtCancelDeviceWakeupRequest(ptr) @ stdcall NtCancelIoFile(long ptr) -;@ stdcall NtCancelIoFileEx(long ptr ptr) ; 6.0 and higher @ stdcall NtCancelTimer(long ptr) @ stdcall NtClearEvent(long) @ stdcall NtClose(long) @@ -183,7 +157,6 @@ @ stdcall NtDuplicateObject(long long long ptr long long long) @ stdcall NtDuplicateToken(long long long long long long) @ stdcall NtEnumerateBootEntries(ptr ptr) -;@ stdcall NtEnumerateBus ; 3.51 only @ stdcall NtEnumerateKey (long long long long long long) @ stdcall NtEnumerateSystemEnvironmentValuesEx(long ptr long) @ stdcall NtEnumerateValueKey(long long long long long long) @@ -304,11 +277,9 @@ @ stdcall NtReadFileScatter(long long ptr ptr ptr ptr long ptr ptr) @ stdcall NtReadRequestData(ptr ptr long ptr long ptr) @ stdcall NtReadVirtualMemory(long ptr ptr long ptr) -;@ stdcall NtRegisterNewDevice ; 3.51 only @ stdcall NtRegisterThreadTerminatePort(ptr) @ stdcall NtReleaseKeyedEvent(ptr ptr long ptr) @ stdcall NtReleaseMutant(long ptr) -;@ stdcall NtReleaseProcessMutant ; 3.51 only @ stdcall NtReleaseSemaphore(long long ptr) @ stdcall NtRemoveIoCompletion(ptr ptr ptr ptr ptr) @ stdcall NtRemoveProcessDebug(ptr ptr) @@ -343,7 +314,6 @@ @ stdcall NtSetEventBoostPriority(ptr) @ stdcall NtSetHighEventPair(ptr) @ stdcall NtSetHighWaitLowEventPair(ptr) -;@ stdcall NtSetHighWaitLowThread ; 3.51 and 4.0 only @ stdcall NtSetInformationDebugObject(ptr long ptr long ptr) @ stdcall NtSetInformationFile(long long long long long) @ stdcall NtSetInformationJobObject(long long ptr long) @@ -357,7 +327,6 @@ @ stdcall NtSetLdtEntries(long double long double) ; CHECKME @ stdcall NtSetLowEventPair(ptr) @ stdcall NtSetLowWaitHighEventPair(ptr) -;@ stdcall NtSetLowWaitHighThread ; 3.51 and 4.0 only @ stdcall NtSetQuotaInformationFile(ptr ptr ptr long) @ stdcall NtSetSecurityObject(long long ptr) @ stdcall NtSetSystemEnvironmentValue(ptr ptr) @@ -391,11 +360,9 @@ @ stdcall NtUnlockVirtualMemory(long ptr ptr long) @ stdcall NtUnmapViewOfSection(long ptr) @ stdcall NtVdmControl(long ptr) -;@ stdcall NtW32Call(long ptr long ptr ptr) @ stdcall NtWaitForDebugEvent(ptr long ptr ptr) @ stdcall NtWaitForKeyedEvent(ptr ptr long ptr) @ stdcall NtWaitForMultipleObjects(long ptr long long ptr) -;@ stdcall NtWaitForProcessMutant ; 3.51 only @ stdcall NtWaitForSingleObject(long long long) @ stdcall NtWaitHighEventPair(ptr) @ stdcall NtWaitLowEventPair(ptr) @@ -462,7 +429,6 @@ @ stdcall RtlAreAnyAccessesGranted(long long) @ stdcall RtlAreBitsClear(ptr long long) @ stdcall RtlAreBitsSet(ptr long long) -;@ stdcall RtlAssert2 @ stdcall RtlAssert(ptr ptr long ptr) ;@ stdcall RtlCancelTimer @ stdcall -register RtlCaptureContext(ptr) @@ -475,7 +441,6 @@ @ stdcall RtlClearAllBits(ptr) @ stdcall RtlClearBits(ptr long long) ;@ stdcall RtlCloneMemoryStream -;@ stdcall RtlClosePropertySet ; NT 4.0 only ;@ stdcall RtlCommitMemoryStream @ stdcall RtlCompactHeap(long long) @ stdcall RtlCompareMemory(ptr ptr long) @@ -485,8 +450,8 @@ @ stdcall RtlCompressBuffer(long ptr long ptr long long ptr ptr) @ stdcall RtlComputeCrc32(long ptr long) @ stdcall RtlComputeImportTableHash(ptr ptr long) -;@ stdcall RtlComputePrivatizedDllName_U -;@ stdcall RtlConsoleMultiByteToUnicodeN +@ stdcall RtlComputePrivatizedDllName_U(ptr ptr ptr) +@ stdcall RtlConsoleMultiByteToUnicodeN(ptr long ptr ptr long ptr) @ stdcall RtlConvertExclusiveToShared(ptr) @ stdcall -arch=win32 -ret64 RtlConvertLongToLargeInteger(long) ;@ stdcall RtlConvertPropertyToVariant @@ -508,14 +473,13 @@ @ stdcall RtlCopyString(ptr ptr) @ stdcall RtlCopyUnicodeString(ptr ptr) @ stdcall RtlCreateAcl(ptr long long) -@ stdcall RtlCreateActivationContext(ptr ptr) +@ stdcall RtlCreateActivationContext(long ptr long ptr ptr ptr) @ stdcall RtlCreateAndSetSD(ptr long ptr ptr ptr) @ stdcall RtlCreateAtomTable(long ptr) @ stdcall RtlCreateBootStatusDataFile() @ stdcall RtlCreateEnvironment(long ptr) @ stdcall RtlCreateHeap(long ptr long long ptr ptr) @ stdcall RtlCreateProcessParameters(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) -;@ stdcall RtlCreatePropertySet ; 4.0 only @ stdcall RtlCreateQueryDebugBuffer(long long) @ stdcall RtlCreateRegistryKey(long wstr) @ stdcall RtlCreateSecurityDescriptor(ptr long) @@ -533,12 +497,11 @@ @ stdcall RtlDeNormalizeProcessParams(ptr) @ stdcall RtlDeactivateActivationContext(long long) @ fastcall RtlDeactivateActivationContextUnsafeFast(ptr) -;@ stdcall RtlDebugPrintTimes @ stdcall RtlDecodePointer(ptr) @ stdcall RtlDecodeSystemPointer(ptr) RtlEncodeSystemPointer @ stdcall RtlDecompressBuffer(long ptr long ptr long ptr) @ stdcall RtlDecompressFragment(long ptr long ptr long long ptr ptr) -;@ stdcall RtlDefaultNpAcl +@ stdcall RtlDefaultNpAcl(ptr) @ stdcall RtlDelete(ptr) @ stdcall RtlDeleteAce(ptr long) @ stdcall RtlDeleteAtomFromAtomTable(ptr long) @@ -569,9 +532,9 @@ @ stdcall RtlDoesFileExists_U(wstr) @ stdcall RtlDosApplyFileIsolationRedirection_Ustr(long ptr ptr ptr ptr ptr ptr ptr ptr) @ stdcall RtlDosPathNameToNtPathName_U(wstr ptr ptr ptr) -;@ stdcall RtlDosPathNameToNtPathName_U_WithStatus ; 5.2 SP1, and higher -@ stdcall RtlDosPathNameToRelativeNtPathName_U(ptr ptr ptr ptr) ; CHECKME -;@ stdcall RtlDosPathNameToRelativeNtPathName_U_WithStatus +@ stdcall RtlDosPathNameToNtPathName_U_WithStatus(wstr ptr ptr ptr) ; 5.2 SP1, and higher +@ stdcall RtlDosPathNameToRelativeNtPathName_U(ptr ptr ptr ptr) +@ stdcall RtlDosPathNameToRelativeNtPathName_U_WithStatus(wstr ptr ptr ptr) @ stdcall RtlDosSearchPath_U(wstr wstr wstr long ptr ptr) @ stdcall RtlDosSearchPath_Ustr(long ptr ptr ptr ptr ptr ptr ptr ptr) @ stdcall RtlDowncaseUnicodeChar(long) @@ -592,7 +555,6 @@ @ stdcall RtlEnumerateGenericTableLikeADirectory(ptr ptr ptr long ptr ptr ptr) @ stdcall RtlEnumerateGenericTableWithoutSplaying(ptr ptr) @ stdcall RtlEnumerateGenericTableWithoutSplayingAvl(ptr ptr) -;@ stdcall RtlEnumerateProperties ; 4.0 only @ stdcall RtlEqualComputerName(ptr ptr) @ stdcall RtlEqualDomainName(ptr ptr) @ stdcall RtlEqualLuid(ptr ptr) @@ -610,7 +572,7 @@ @ stdcall RtlFillMemory(ptr long long) @ stdcall RtlFillMemoryUlong(ptr long long) ;@ stdcall RtlFinalReleaseOutOfProcessMemoryStream -;@ stdcall RtlFindActivationContextSectionGuid +@ stdcall RtlFindActivationContextSectionGuid(long ptr long ptr ptr) @ stdcall RtlFindActivationContextSectionString(long ptr long ptr ptr) @ stdcall RtlFindCharInUnicodeString(long ptr ptr ptr) @ stdcall RtlFindClearBits(ptr long long) @@ -631,11 +593,10 @@ ;@ stdcall RtlFindSetRuns(ptr ptr long long) @ stdcall RtlFirstEntrySList(ptr) @ stdcall RtlFirstFreeAce(ptr ptr) -;@ stdcall RtlFlushPropertySet ; 4.0 only @ stdcall RtlFlushSecureMemoryCache(ptr ptr) @ stdcall RtlFormatCurrentUserKeyPath(ptr) @ stdcall RtlFormatMessage(ptr long long long long ptr ptr long) -;@ stdcall RtlFormatMessageEx +@ stdcall RtlFormatMessageEx(ptr long long long long ptr ptr long long) @ stdcall RtlFreeActivationContextStack(ptr) @ stdcall RtlFreeAnsiString(long) @ stdcall RtlFreeHandle(ptr ptr) @@ -653,7 +614,7 @@ @ stdcall RtlGetCallersAddress(ptr ptr) @ stdcall RtlGetCompressionWorkSpaceSize(long ptr ptr) @ stdcall RtlGetControlSecurityDescriptor(ptr ptr ptr) -;@ stdcall RtlGetCriticalSectionRecursionCount +@ stdcall RtlGetCriticalSectionRecursionCount(ptr) @ stdcall RtlGetCurrentDirectory_U(long ptr) @ stdcall RtlGetCurrentPeb() @ stdcall RtlGetCurrentProcessorNumber() ; 5.2 SP1 and higher @@ -667,11 +628,11 @@ @ stdcall RtlGetGroupSecurityDescriptor(ptr ptr ptr) @ stdcall RtlGetLastNtStatus() @ stdcall RtlGetLastWin32Error() -;@ stdcall RtlGetLengthWithoutLastFullDosOrNtPathElement +@ stdcall RtlGetLengthWithoutLastFullDosOrNtPathElement(long ptr ptr) ; Yes, Microsoft really misspelled this one! -;@ stdcall RtlGetLengthWithoutTrailingPathSeperators +@ stdcall RtlGetLengthWithoutTrailingPathSeperators(long ptr ptr) RtlGetLengthWithoutTrailingPathSeparators @ stdcall RtlGetLongestNtPathLength() -;@ stdcall RtlGetNativeSystemInformation +@ stdcall RtlGetNativeSystemInformation(long long long long) NtQuerySystemInformation @ stdcall RtlGetNextRange(ptr ptr long) @ stdcall RtlGetNtGlobalFlags() @ stdcall RtlGetNtProductType(ptr) @@ -686,7 +647,6 @@ ;@ stdcall RtlGetUnloadEventTrace @ stdcall RtlGetUserInfoHeap(ptr long ptr ptr ptr) @ stdcall RtlGetVersion(ptr) -;@ stdcall RtlGuidToPropertySetName ; 4.0 only @ stdcall RtlHashUnicodeString(ptr long long ptr) @ stdcall RtlIdentifierAuthoritySid(ptr) @ stdcall RtlImageDirectoryEntryToData(long long long ptr) @@ -786,7 +746,7 @@ ;@ stdcall RtlMapSecurityErrorToNtStatus @ stdcall RtlMergeRangeLists(ptr ptr ptr long) @ stdcall RtlMoveMemory(ptr ptr long) -;@ stdcall RtlMultiAppendUnicodeStringBuffer +@ stdcall RtlMultiAppendUnicodeStringBuffer(ptr long ptr) @ stdcall RtlMultiByteToUnicodeN(ptr long ptr ptr long) @ stdcall RtlMultiByteToUnicodeSize(ptr str long) @ stdcall RtlNewInstanceSecurityObject(long long ptr ptr ptr ptr ptr long ptr ptr) @@ -820,7 +780,7 @@ @ stdcall RtlQueryHeapInformation(long long ptr long ptr) @ stdcall RtlQueryInformationAcl(ptr ptr long long) @ stdcall RtlQueryInformationActivationContext(long long ptr long ptr long ptr) -;@ stdcall RtlQueryInformationActiveActivationContext +@ stdcall RtlQueryInformationActiveActivationContext(long ptr long ptr) ;@ stdcall RtlQueryInterfaceMemoryStream ;@ stdcall RtlQueryProcessBackTraceInformation @ stdcall RtlQueryProcessDebugInformation(long long ptr) @@ -876,7 +836,7 @@ @ stdcall RtlSetCurrentDirectory_U(ptr) @ stdcall RtlSetCurrentEnvironment(wstr ptr) @ stdcall RtlSetDaclSecurityDescriptor(ptr long ptr long) -;@ stdcall RtlSetEnvironmentStrings +@ stdcall RtlSetEnvironmentStrings(wstr long) @ stdcall RtlSetEnvironmentVariable(ptr ptr ptr) @ stdcall RtlSetGroupSecurityDescriptor(ptr ptr long) @ stdcall RtlSetHeapInformation(ptr long ptr ptr) @@ -983,7 +943,7 @@ @ stdcall RtlZeroHeap(ptr long) @ stdcall RtlZeroMemory(ptr long) @ stdcall RtlZombifyActivationContext(ptr) -;@ stdcall RtlpApplyLengthFunction +@ stdcall RtlpApplyLengthFunction(long long ptr ptr) @ stdcall RtlpEnsureBufferSize(ptr ptr ptr) ; CHECKME ;@ stdcall RtlpNotOwnerCriticalSection @ stdcall RtlpNtCreateKey(ptr long ptr long ptr ptr) diff --git a/dll/ntdll/ldr/ldrapi.c b/dll/ntdll/ldr/ldrapi.c index 4b73bf92c5d..8c1db23048d 100644 --- a/dll/ntdll/ldr/ldrapi.c +++ b/dll/ntdll/ldr/ldrapi.c @@ -23,6 +23,56 @@ ULONG AlternateResourceModuleCount; /* FUNCTIONS *****************************************************************/ +NTSTATUS +NTAPI +LdrFindCreateProcessManifest(IN ULONG Flags, + IN PVOID Image, + IN PVOID IdPath, + IN ULONG IdPathLength, + IN PVOID OutDataEntry) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +NTAPI +LdrDestroyOutOfProcessImage(IN PVOID Image) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +NTAPI +LdrCreateOutOfProcessImage(IN ULONG Flags, + IN HANDLE ProcessHandle, + IN HANDLE DllHandle, + IN PVOID Unknown3) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +NTAPI +LdrAccessOutOfProcessResource(IN PVOID Unknown, + IN PVOID Image, + IN PVOID Unknown1, + IN PVOID Unknown2, + IN PVOID Unknown3) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + +VOID +NTAPI +LdrSetDllManifestProber(IN PVOID ProberFunction) +{ + UNIMPLEMENTED; +} + BOOLEAN NTAPI LdrAlternateResourcesEnabled(VOID) @@ -310,14 +360,14 @@ LdrLoadDll(IN PWSTR SearchPath OPTIONAL, if ((ShowSnaps) || (LdrpShowRecursiveLoads) || (LdrpBreakOnRecursiveDllLoads)) { /* Print out debug messages */ - DPRINT1("[%lx, %lx] LDR: Recursive DLL Load\n", + DPRINT1("[%p, %p] LDR: Recursive DLL Load\n", Teb->RealClientId.UniqueProcess, Teb->RealClientId.UniqueThread); - DPRINT1("[%lx, %lx] Previous DLL being loaded \"%wZ\"\n", + DPRINT1("[%p, %p] Previous DLL being loaded \"%wZ\"\n", Teb->RealClientId.UniqueProcess, Teb->RealClientId.UniqueThread, OldTldDll); - DPRINT1("[%lx, %lx] DLL being requested \"%wZ\"\n", + DPRINT1("[%p, %p] DLL being requested \"%wZ\"\n", Teb->RealClientId.UniqueProcess, Teb->RealClientId.UniqueThread, DllName); @@ -325,13 +375,13 @@ LdrLoadDll(IN PWSTR SearchPath OPTIONAL, /* Was it initializing too? */ if (!LdrpCurrentDllInitializer) { - DPRINT1("[%lx, %lx] LDR: No DLL Initializer was running\n", + DPRINT1("[%p, %p] LDR: No DLL Initializer was running\n", Teb->RealClientId.UniqueProcess, Teb->RealClientId.UniqueThread); } else { - DPRINT1("[%lx, %lx] DLL whose initializer was currently running \"%wZ\"\n", + DPRINT1("[%p, %p] DLL whose initializer was currently running \"%wZ\"\n", Teb->ClientId.UniqueProcess, Teb->ClientId.UniqueThread, &LdrpCurrentDllInitializer->BaseDllName); @@ -1247,7 +1297,7 @@ quickie: (Status != STATUS_DLL_NOT_FOUND) && (Status != STATUS_OBJECT_NAME_NOT_FOUND))) { - DPRINT1("LDR: LdrAddRefDll(%p) 0x%08lx\n", BaseAddress); + DPRINT1("LDR: LdrAddRefDll(%p) 0x%08lx\n", BaseAddress, Status); } } @@ -1345,7 +1395,7 @@ LdrUnloadDll(IN PVOID BaseAddress) /* Show message */ if (ShowSnaps) { - DPRINT1("(%d) [%ws] %ws (%lx) deinit %lx\n", + DPRINT1("(%lu) [%ws] %ws (%lx) deinit %p\n", LdrpActiveUnloadCount, LdrEntry->BaseDllName.Buffer, LdrEntry->FullDllName.Buffer, @@ -1407,7 +1457,7 @@ LdrUnloadDll(IN PVOID BaseAddress) /* Show message */ if (ShowSnaps) { - DPRINT1("LDR: Calling deinit %lx\n", EntryPoint); + DPRINT1("LDR: Calling deinit %p\n", EntryPoint); } /* Set up the Act Ctx */ @@ -1532,6 +1582,24 @@ LdrProcessRelocationBlock(IN ULONG_PTR Address, return LdrProcessRelocationBlockLongLong(Address, Count, TypeOffset, Delta); } +/* FIXME: Add to ntstatus.mc */ +#define STATUS_MUI_FILE_NOT_FOUND ((NTSTATUS)0xC00B0001L) + +/* + * @implemented + */ +NTSTATUS +NTAPI +LdrLoadAlternateResourceModule(IN PVOID Module, + IN PWSTR Buffer) +{ + /* Is MUI Support enabled? */ + if (!LdrAlternateResourcesEnabled()) return STATUS_SUCCESS; + + UNIMPLEMENTED; + return STATUS_MUI_FILE_NOT_FOUND; +} + /* * @implemented */ @@ -1557,22 +1625,15 @@ LdrUnloadAlternateResourceModule(IN PVOID BaseAddress) return TRUE; } -/* FIXME: Add to ntstatus.mc */ -#define STATUS_MUI_FILE_NOT_FOUND ((NTSTATUS)0xC00B0001L) - /* - * @implemented + * @unimplemented */ -NTSTATUS +BOOLEAN NTAPI -LdrLoadAlternateResourceModule(IN PVOID Module, - IN PWSTR Buffer) +LdrFlushAlternateResourceModules(VOID) { - /* Is MUI Support enabled? */ - if (!LdrAlternateResourcesEnabled()) return STATUS_SUCCESS; - UNIMPLEMENTED; - return STATUS_MUI_FILE_NOT_FOUND; + return FALSE; } /* EOF */ diff --git a/dll/ntdll/ldr/ldrinit.c b/dll/ntdll/ldr/ldrinit.c index 5e222532ce6..8aa9e74668e 100644 --- a/dll/ntdll/ldr/ldrinit.c +++ b/dll/ntdll/ldr/ldrinit.c @@ -501,7 +501,7 @@ LdrpInitializeThread(IN PCONTEXT Context) NTSTATUS Status; PVOID EntryPoint; - DPRINT("LdrpInitializeThread() called for %wZ (%lx/%lx)\n", + DPRINT("LdrpInitializeThread() called for %wZ (%p/%p)\n", &LdrpImageEntry->BaseDllName, NtCurrentTeb()->RealClientId.UniqueProcess, NtCurrentTeb()->RealClientId.UniqueThread); @@ -566,7 +566,7 @@ LdrpInitializeThread(IN PCONTEXT Context) if (!LdrpShutdownInProgress) { /* Call the Entrypoint */ - DPRINT("%wZ - Calling entry point at %p for thread attaching, %lx/%lx\n", + DPRINT("%wZ - Calling entry point at %p for thread attaching, %p/%p\n", &LdrEntry->BaseDllName, LdrEntry->EntryPoint, NtCurrentTeb()->RealClientId.UniqueProcess, NtCurrentTeb()->RealClientId.UniqueThread); @@ -626,7 +626,7 @@ LdrpRunInitializeRoutines(IN PCONTEXT Context OPTIONAL) PTEB OldTldTeb; BOOLEAN DllStatus; - DPRINT("LdrpRunInitializeRoutines() called for %wZ (%lx/%lx)\n", + DPRINT("LdrpRunInitializeRoutines() called for %wZ (%p/%p)\n", &LdrpImageEntry->BaseDllName, NtCurrentTeb()->RealClientId.UniqueProcess, NtCurrentTeb()->RealClientId.UniqueThread); @@ -661,7 +661,7 @@ LdrpRunInitializeRoutines(IN PCONTEXT Context OPTIONAL) /* Show debug message */ if (ShowSnaps) { - DPRINT1("[%x,%x] LDR: Real INIT LIST for Process %wZ\n", + DPRINT1("[%p,%p] LDR: Real INIT LIST for Process %wZ\n", NtCurrentTeb()->RealClientId.UniqueThread, NtCurrentTeb()->RealClientId.UniqueProcess, &Peb->ProcessParameters->ImagePathName); @@ -695,7 +695,7 @@ LdrpRunInitializeRoutines(IN PCONTEXT Context OPTIONAL) /* Display debug message */ if (ShowSnaps) { - DPRINT1("[%x,%x] LDR: %wZ init routine %p\n", + DPRINT1("[%p,%p] LDR: %wZ init routine %p\n", NtCurrentTeb()->RealClientId.UniqueThread, NtCurrentTeb()->RealClientId.UniqueProcess, &LdrEntry->FullDllName, @@ -963,7 +963,7 @@ LdrShutdownProcess(VOID) } /* Call the Entrypoint */ - DPRINT("%wZ - Calling entry point at %x for thread detaching\n", + DPRINT("%wZ - Calling entry point at %p for thread detaching\n", &LdrEntry->BaseDllName, LdrEntry->EntryPoint); LdrpCallInitRoutine(EntryPoint, LdrEntry->DllBase, @@ -1078,7 +1078,7 @@ LdrShutdownThread(VOID) if (!LdrpShutdownInProgress) { /* Call the Entrypoint */ - DPRINT("%wZ - Calling entry point at %x for thread detaching\n", + DPRINT("%wZ - Calling entry point at %p for thread detaching\n", &LdrEntry->BaseDllName, LdrEntry->EntryPoint); LdrpCallInitRoutine(EntryPoint, LdrEntry->DllBase, @@ -1253,7 +1253,7 @@ LdrpAllocateTls(VOID) /* Show debug message */ if (ShowSnaps) { - DPRINT1("LDR: TlsVector %x Index %d = %x copied from %x to %x\n", + DPRINT1("LDR: TlsVector %p Index %lu = %p copied from %x to %p\n", TlsVector, TlsData->TlsDirectory.Characteristics, &TlsVector[TlsData->TlsDirectory.Characteristics], @@ -1605,7 +1605,7 @@ LdrpInitializeProcess(IN PCONTEXT Context, /* Start verbose debugging messages right now if they were requested */ if (ShowSnaps) { - DPRINT1("LDR: PID: 0x%x started - '%wZ'\n", + DPRINT1("LDR: PID: 0x%p started - '%wZ'\n", Teb->ClientId.UniqueProcess, &CommandLine); } @@ -1696,18 +1696,6 @@ LdrpInitializeProcess(IN PCONTEXT Context, return STATUS_NO_MEMORY; } - // FIXME: Is it located properly? - /* Initialize table of callbacks for the kernel. */ - Peb->KernelCallbackTable = RtlAllocateHeap(RtlGetProcessHeap(), - 0, - sizeof(PVOID) * - (USER32_CALLBACK_MAXIMUM + 1)); - if (!Peb->KernelCallbackTable) - { - DPRINT1("Failed to create callback table\n"); - ZwTerminateProcess(NtCurrentProcess(), STATUS_INSUFFICIENT_RESOURCES); - } - /* Allocate an Activation Context Stack */ Status = RtlAllocateActivationContextStack(&Teb->ActivationContextStackPointer); if (!NT_SUCCESS(Status)) return Status; @@ -2158,7 +2146,7 @@ LdrpInit(PCONTEXT Context, MEMORY_BASIC_INFORMATION MemoryBasicInfo; PPEB Peb = NtCurrentPeb(); - DPRINT("LdrpInit() %lx/%lx\n", + DPRINT("LdrpInit() %p/%p\n", NtCurrentTeb()->RealClientId.UniqueProcess, NtCurrentTeb()->RealClientId.UniqueThread); diff --git a/dll/ntdll/ldr/ldrpe.c b/dll/ntdll/ldr/ldrpe.c index 183c86ece0d..6b351aeecc1 100644 --- a/dll/ntdll/ldr/ldrpe.c +++ b/dll/ntdll/ldr/ldrpe.c @@ -47,7 +47,7 @@ LdrpSnapIAT(IN PLDR_DATA_TABLE_ENTRY ExportLdrEntry, LPSTR ImportName; ULONG ForwarderChain, i, Rva, OldProtect, IatSize, ExportSize; SIZE_T ImportSize; - DPRINT("LdrpSnapIAT(%wZ %wZ %p %d)\n", &ExportLdrEntry->BaseDllName, &ImportLdrEntry->BaseDllName, IatEntry, EntriesValid); + DPRINT("LdrpSnapIAT(%wZ %wZ %p %u)\n", &ExportLdrEntry->BaseDllName, &ImportLdrEntry->BaseDllName, IatEntry, EntriesValid); /* Get export directory */ ExportDirectory = RtlImageDirectoryEntryToData(ExportLdrEntry->DllBase, @@ -689,7 +689,7 @@ LdrpWalkImportDescriptor(IN LPWSTR DllPath OPTIONAL, PIMAGE_BOUND_IMPORT_DESCRIPTOR BoundEntry = NULL; PIMAGE_IMPORT_DESCRIPTOR ImportEntry; ULONG BoundSize, IatSize; - DPRINT("LdrpWalkImportDescriptor('%S' %x)\n", DllPath, LdrEntry); + DPRINT("LdrpWalkImportDescriptor('%S' %p)\n", DllPath, LdrEntry); /* Set up the Act Ctx */ RtlZeroMemory(&ActCtx, sizeof(ActCtx)); diff --git a/dll/ntdll/ldr/ldrutils.c b/dll/ntdll/ldr/ldrutils.c index 6a3041ed669..b042ee852e0 100644 --- a/dll/ntdll/ldr/ldrutils.c +++ b/dll/ntdll/ldr/ldrutils.c @@ -38,7 +38,7 @@ NTSTATUS create_module_activation_context( LDR_DATA_TABLE_ENTRY *module ) ctx.dwFlags = ACTCTX_FLAG_RESOURCE_NAME_VALID | ACTCTX_FLAG_HMODULE_VALID; ctx.hModule = module->DllBase; ctx.lpResourceName = (LPCWSTR)ISOLATIONAWARE_MANIFEST_RESOURCE_ID; - status = RtlCreateActivationContext( &module->EntryPointActivationContext, &ctx ); + status = RtlCreateActivationContext(0, (PVOID)&ctx, 0, NULL, NULL, &module->EntryPointActivationContext); } return status; } @@ -303,7 +303,7 @@ LdrpUpdateLoadCount3(IN PLDR_DATA_TABLE_ENTRY LdrEntry, /* Show snaps */ if (ShowSnaps) { - DPRINT1("LDR: Flags %d %wZ (%lx)\n", Flags, ImportNameUnic, Entry->LoadCount); + DPRINT1("LDR: Flags %lu %wZ (%lx)\n", Flags, ImportNameUnic, Entry->LoadCount); } } @@ -347,7 +347,7 @@ LdrpUpdateLoadCount3(IN PLDR_DATA_TABLE_ENTRY LdrEntry, /* Show snaps */ if (ShowSnaps) { - DPRINT1("LDR: Flags %d %wZ (%lx)\n", Flags, ImportNameUnic, Entry->LoadCount); + DPRINT1("LDR: Flags %lu %wZ (%lx)\n", Flags, ImportNameUnic, Entry->LoadCount); } } @@ -416,7 +416,7 @@ LdrpUpdateLoadCount3(IN PLDR_DATA_TABLE_ENTRY LdrEntry, /* Show snaps */ if (ShowSnaps) { - DPRINT1("LDR: Flags %d %wZ (%lx)\n", Flags, ImportNameUnic, Entry->LoadCount); + DPRINT1("LDR: Flags %lu %wZ (%lx)\n", Flags, ImportNameUnic, Entry->LoadCount); } } @@ -1319,7 +1319,7 @@ SkipCheck: ImageBase = (ULONG_PTR)NtHeaders->OptionalHeader.ImageBase; ImageEnd = ImageBase + ViewSize; - DPRINT1("LDR: LdrpMapDll Relocating Image Name %ws (%p -> %p)\n", DllName, ImageBase, ViewBase); + DPRINT1("LDR: LdrpMapDll Relocating Image Name %ws (%lu -> %p)\n", DllName, ImageBase, ViewBase); /* Scan all the modules */ ListHead = &Peb->Ldr->InLoadOrderModuleList; @@ -1978,7 +1978,7 @@ LdrpCheckForLoadedDll(IN PWSTR DllPath, PVOID ViewBase = NULL; SIZE_T ViewSize = 0; PIMAGE_NT_HEADERS NtHeader, NtHeader2; - DPRINT("LdrpCheckForLoadedDll('%S' '%wZ' %d %d %p)\n", DllPath ? ((ULONG_PTR)DllPath == 1 ? L"" : DllPath) : L"", DllName, Flag, RedirectedDll, LdrEntry); + DPRINT("LdrpCheckForLoadedDll('%S' '%wZ' %u %u %p)\n", DllPath ? ((ULONG_PTR)DllPath == 1 ? L"" : DllPath) : L"", DllName, Flag, RedirectedDll, LdrEntry); /* Check if a dll name was provided */ if (!(DllName->Buffer) || !(DllName->Buffer[0])) return FALSE; diff --git a/dll/ntdll/rtl/libsupp.c b/dll/ntdll/rtl/libsupp.c index 6e63a9183bc..c2cbf25c302 100644 --- a/dll/ntdll/rtl/libsupp.c +++ b/dll/ntdll/rtl/libsupp.c @@ -174,6 +174,22 @@ CHECK_PAGED_CODE_RTL(char *file, int line) } #endif +VOID +NTAPI +RtlpSetHeapParameters(IN PRTL_HEAP_PARAMETERS Parameters) +{ + PPEB Peb; + + /* Get PEB */ + Peb = RtlGetCurrentPeb(); + + /* Apply defaults for non-set parameters */ + if (!Parameters->SegmentCommit) Parameters->SegmentCommit = Peb->HeapSegmentCommit; + if (!Parameters->SegmentReserve) Parameters->SegmentReserve = Peb->HeapSegmentReserve; + if (!Parameters->DeCommitFreeBlockThreshold) Parameters->DeCommitFreeBlockThreshold = Peb->HeapDeCommitFreeBlockThreshold; + if (!Parameters->DeCommitTotalFreeThreshold) Parameters->DeCommitTotalFreeThreshold = Peb->HeapDeCommitTotalFreeThreshold; +} + BOOLEAN NTAPI RtlpHandleDpcStackException(IN PEXCEPTION_REGISTRATION_RECORD RegistrationFrame, diff --git a/dll/opengl/CMakeLists.txt b/dll/opengl/CMakeLists.txt index fe197437dfb..7c6e62c0f8c 100644 --- a/dll/opengl/CMakeLists.txt +++ b/dll/opengl/CMakeLists.txt @@ -1,3 +1,7 @@ + +#unset this if you want to use the current TEB instead of TLS +set(OPENGL32_USE_TLS TRUE) + add_subdirectory(glu32) add_subdirectory(mesa) add_subdirectory(opengl32) diff --git a/dll/opengl/mesa/CMakeLists.txt b/dll/opengl/mesa/CMakeLists.txt index 5ea21de8b0e..f2ffd472948 100644 --- a/dll/opengl/mesa/CMakeLists.txt +++ b/dll/opengl/mesa/CMakeLists.txt @@ -1,36 +1,37 @@ -set(CMAKE_INCLUDE_CURRENT_DIR OFF) - -# From Sconstruct -include_directories(BEFORE - include) - -include_directories( - src/gallium/include - src/gallium/auxiliary - src/gallium/drivers - src/gallium/winsys) - -if(NOT MSVC) - add_compile_flags_language("-std=gnu99" "C") - add_compile_flags("-Wno-deprecated-declarations -Wno-error=unused-local-typedefs -Wno-unused-but-set-variable") - add_compile_flags_language("-Wno-delete-non-virtual-dtor -Wno-narrowing" "CXX") - # optimizations (builtin memcmp is slow on some gcc versions) used in SConsript files - add_compile_flags("-ffast-math -fno-builtin-memcmp") -else() - include_directories(include/c99) - add_compile_flags("/wd4996") -endif() - -add_definitions( - -DWIN32 - -D_WINDOWS - -DPIPE_SUBSYSTEM_WINDOWS_USER - -D_DLL -# -DDEBUG -) +include_directories(.) # our DBG definitions conflict with mesa source code remove_definitions(-DDBG=1 -DDBG=0) -add_subdirectory(src) +add_definitions( + -DWIN32 + -D_WINDOWS + -D_DLL + -DFEATURE_GL=1 + -D_GDI32_ # prevent gl* being declared __declspec(dllimport) in MS headers + -DBUILD_GL32 # declare gl* as __declspec(dllexport) in Mesa headers + -D_GLAPI_NO_EXPORTS # prevent _glapi_* from being declared __declspec(dllimport) +) + +if(OPENGL32_USE_TLS) + add_definitions(-DOPENGL32_USE_TLS) +endif() + +if((ARCH STREQUAL "i386") AND (NOT MSVC)) + add_definitions( + -DUSE_X86_ASM + -DUSE_MMX_ASM + -DUSE_3DNOW_ASM + -DUSE_SSE_ASM + ) + add_subdirectory(x86) +endif() + +add_subdirectory(drivers/common) +add_subdirectory(main) +add_subdirectory(math) +add_subdirectory(swrast) +add_subdirectory(swrast_setup) +add_subdirectory(tnl) +add_subdirectory(vbo) diff --git a/dll/opengl/mesa/SConstruct b/dll/opengl/mesa/SConstruct deleted file mode 100644 index 4a3fef08059..00000000000 --- a/dll/opengl/mesa/SConstruct +++ /dev/null @@ -1,161 +0,0 @@ -####################################################################### -# Top-level SConstruct -# -# For example, invoke scons as -# -# scons build=debug llvm=yes machine=x86 -# -# to set configuration variables. Or you can write those options to a file -# named config.py: -# -# # config.py -# build='debug' -# llvm=True -# machine='x86' -# -# Invoke -# -# scons -h -# -# to get the full list of options. See scons manpage for more info. -# - -import os -import os.path -import sys -import SCons.Util - -import common - -####################################################################### -# Configuration options - -opts = Variables('config.py') -common.AddOptions(opts) - -env = Environment( - options = opts, - tools = ['gallium'], - toolpath = ['#scons'], - ENV = os.environ, -) - -# XXX: This creates a many problems as it saves... -#opts.Save('config.py', env) - -# Backwards compatability with old target configuration variable -try: - targets = ARGUMENTS['targets'] -except KeyError: - pass -else: - targets = targets.split(',') - print 'scons: warning: targets option is deprecated; pass the targets on their own such as' - print - print ' scons %s' % ' '.join(targets) - print - COMMAND_LINE_TARGETS.append(targets) - - -Help(opts.GenerateHelpText(env)) - -# fail early for a common error on windows -if env['gles']: - try: - import libxml2 - except ImportError: - raise SCons.Errors.UserError, "GLES requires libxml2-python to build" - -####################################################################### -# Environment setup - -# Includes -env.Prepend(CPPPATH = [ - '#/include', -]) -env.Append(CPPPATH = [ - '#/src/gallium/include', - '#/src/gallium/auxiliary', - '#/src/gallium/drivers', - '#/src/gallium/winsys', -]) - -if env['msvc']: - env.Append(CPPPATH = ['#include/c99']) - -# for debugging -#print env.Dump() - - -####################################################################### -# Invoke host SConscripts -# -# For things that are meant to be run on the native host build machine, instead -# of the target machine. -# - -# Create host environent -if env['crosscompile'] and not env['embedded']: - host_env = Environment( - options = opts, - # no tool used - tools = [], - toolpath = ['#scons'], - ENV = os.environ, - ) - - # Override options - host_env['platform'] = common.host_platform - host_env['machine'] = common.host_machine - host_env['toolchain'] = 'default' - host_env['llvm'] = False - - host_env.Tool('gallium') - - host_env['hostonly'] = True - assert host_env['crosscompile'] == False - - if host_env['msvc']: - host_env.Append(CPPPATH = ['#include/c99']) - - target_env = env - env = host_env - Export('env') - - SConscript( - 'src/SConscript', - variant_dir = host_env['build_dir'], - duplicate = 0, # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html - ) - - env = target_env - -Export('env') - -####################################################################### -# Invoke SConscripts - -# TODO: Build several variants at the same time? -# http://www.scons.org/wiki/SimultaneousVariantBuilds - -SConscript( - 'src/SConscript', - variant_dir = env['build_dir'], - duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html -) - - -######################################################################## -# List all aliases - -try: - from SCons.Node.Alias import default_ans -except ImportError: - pass -else: - aliases = default_ans.keys() - aliases.sort() - env.Help('\n') - env.Help('Recognized targets:\n') - for alias in aliases: - env.Help(' %s\n' % alias) diff --git a/dll/opengl/mesa/drivers/common/CMakeLists.txt b/dll/opengl/mesa/drivers/common/CMakeLists.txt new file mode 100644 index 00000000000..2f8695c1888 --- /dev/null +++ b/dll/opengl/mesa/drivers/common/CMakeLists.txt @@ -0,0 +1,7 @@ + +list(APPEND SOURCE + driverfuncs.c + meta.c +) + +add_library(mesa_drv_common STATIC ${SOURCE}) \ No newline at end of file diff --git a/dll/opengl/mesa/drivers/common/driverfuncs.c b/dll/opengl/mesa/drivers/common/driverfuncs.c new file mode 100644 index 00000000000..25261d24ac9 --- /dev/null +++ b/dll/opengl/mesa/drivers/common/driverfuncs.c @@ -0,0 +1,178 @@ +/* + * Mesa 3-D graphics library + * Version: 7.1 + * + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#include "main/glheader.h" +#include "main/imports.h" +#include "main/accum.h" +#include "main/arrayobj.h" +#include "main/context.h" +#include "main/framebuffer.h" +#include "main/readpix.h" +#include "main/renderbuffer.h" +#include "main/texformat.h" +#include "main/texgetimage.h" +#include "main/teximage.h" +#include "main/texobj.h" +#include "main/texstore.h" +#include "main/bufferobj.h" +#include "main/texturebarrier.h" + +#include "tnl/tnl.h" +#include "swrast/swrast.h" +#include "swrast/s_renderbuffer.h" + +#include "driverfuncs.h" +#include "meta.h" + + + +/** + * Plug in default functions for all pointers in the dd_function_table + * structure. + * Device drivers should call this function and then plug in any + * functions which it wants to override. + * Some functions (pointers) MUST be implemented by all drivers (REQUIRED). + * + * \param table the dd_function_table to initialize + */ +void +_mesa_init_driver_functions(struct dd_function_table *driver) +{ + memset(driver, 0, sizeof(*driver)); + + driver->GetString = NULL; /* REQUIRED! */ + driver->UpdateState = NULL; /* REQUIRED! */ + driver->GetBufferSize = NULL; /* REQUIRED! */ + driver->ResizeBuffers = _mesa_resize_framebuffer; + driver->Error = NULL; + + driver->Finish = NULL; + driver->Flush = NULL; + + /* framebuffer/image functions */ + driver->Clear = _swrast_Clear; + driver->Accum = _mesa_accum; + driver->RasterPos = _tnl_RasterPos; + driver->DrawPixels = _swrast_DrawPixels; + driver->ReadPixels = _mesa_readpixels; + driver->CopyPixels = _swrast_CopyPixels; + driver->Bitmap = _swrast_Bitmap; + + /* Texture functions */ + driver->ChooseTextureFormat = _mesa_choose_tex_format; + driver->TexImage1D = _mesa_store_teximage1d; + driver->TexImage2D = _mesa_store_teximage2d; + driver->TexImage3D = _mesa_store_teximage3d; + driver->TexSubImage1D = _mesa_store_texsubimage1d; + driver->TexSubImage2D = _mesa_store_texsubimage2d; + driver->TexSubImage3D = _mesa_store_texsubimage3d; + driver->GetTexImage = _mesa_get_teximage; + driver->CopyTexSubImage1D = _mesa_meta_CopyTexSubImage1D; + driver->CopyTexSubImage2D = _mesa_meta_CopyTexSubImage2D; + driver->CopyTexSubImage3D = _mesa_meta_CopyTexSubImage3D; + driver->TestProxyTexImage = _mesa_test_proxy_teximage; + driver->BindTexture = NULL; + driver->NewTextureObject = _mesa_new_texture_object; + driver->DeleteTexture = _mesa_delete_texture_object; + driver->NewTextureImage = _swrast_new_texture_image; + driver->DeleteTextureImage = _swrast_delete_texture_image; + driver->AllocTextureImageBuffer = _swrast_alloc_texture_image_buffer; + driver->FreeTextureImageBuffer = _swrast_free_texture_image_buffer; + driver->MapTextureImage = _swrast_map_teximage; + driver->UnmapTextureImage = _swrast_unmap_teximage; + + /* simple state commands */ + driver->AlphaFunc = NULL; + driver->BlendColor = NULL; + driver->BlendEquationSeparate = NULL; + driver->BlendFuncSeparate = NULL; + driver->ClearColor = NULL; + driver->ClearDepth = NULL; + driver->ClearStencil = NULL; + driver->ClipPlane = NULL; + driver->ColorMask = NULL; + driver->ColorMaterial = NULL; + driver->CullFace = NULL; + driver->DrawBuffer = NULL; + driver->FrontFace = NULL; + driver->DepthFunc = NULL; + driver->DepthMask = NULL; + driver->DepthRange = NULL; + driver->Enable = NULL; + driver->Fogfv = NULL; + driver->Hint = NULL; + driver->Lightfv = NULL; + driver->LightModelfv = NULL; + driver->LineStipple = NULL; + driver->LineWidth = NULL; + driver->LogicOpcode = NULL; + driver->PointParameterfv = NULL; + driver->PointSize = NULL; + driver->PolygonMode = NULL; + driver->PolygonOffset = NULL; + driver->PolygonStipple = NULL; + driver->ReadBuffer = NULL; + driver->RenderMode = NULL; + driver->Scissor = NULL; + driver->ShadeModel = NULL; + driver->TexGen = NULL; + driver->TexEnv = NULL; + driver->TexParameter = NULL; + driver->Viewport = NULL; + + /* buffer objects */ + _mesa_init_buffer_object_functions(driver); + + driver->MapRenderbuffer = _swrast_map_soft_renderbuffer; + driver->UnmapRenderbuffer = _swrast_unmap_soft_renderbuffer; + + _mesa_init_texture_barrier_functions(driver); + + /* APPLE_vertex_array_object */ + driver->NewArrayObject = _mesa_new_array_object; + driver->DeleteArrayObject = _mesa_delete_array_object; + driver->BindArrayObject = NULL; + + /* T&L stuff */ + driver->CurrentExecPrimitive = 0; + driver->CurrentSavePrimitive = 0; + driver->NeedFlush = 0; + driver->SaveNeedFlush = 0; + + driver->FlushVertices = NULL; + driver->SaveFlushVertices = NULL; + driver->PrepareExecBegin = NULL; + driver->NotifySaveBegin = NULL; + driver->LightingSpaceChange = NULL; + + /* display list */ + driver->NewList = NULL; + driver->EndList = NULL; + driver->BeginCallList = NULL; + driver->EndCallList = NULL; + + /* GL_ARB_texture_storage */ + driver->AllocTextureStorage = _swrast_AllocTextureStorage; +} diff --git a/dll/opengl/mesa/src/mesa/drivers/common/driverfuncs.h b/dll/opengl/mesa/drivers/common/driverfuncs.h similarity index 95% rename from dll/opengl/mesa/src/mesa/drivers/common/driverfuncs.h rename to dll/opengl/mesa/drivers/common/driverfuncs.h index 212f3074247..2a0d6ee25ac 100644 --- a/dll/opengl/mesa/src/mesa/drivers/common/driverfuncs.h +++ b/dll/opengl/mesa/drivers/common/driverfuncs.h @@ -30,8 +30,4 @@ extern void _mesa_init_driver_functions(struct dd_function_table *driver); -extern void -_mesa_init_driver_state(struct gl_context *ctx); - - #endif diff --git a/dll/opengl/mesa/drivers/common/meta.c b/dll/opengl/mesa/drivers/common/meta.c new file mode 100644 index 00000000000..19bf52a825e --- /dev/null +++ b/dll/opengl/mesa/drivers/common/meta.c @@ -0,0 +1,1087 @@ +/* + * Mesa 3-D graphics library + * Version: 7.6 + * + * Copyright (C) 2009 VMware, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/** + * Meta operations. Some GL operations can be expressed in terms of + * other GL operations. For example, glBlitFramebuffer() can be done + * with texture mapping and glClear() can be done with polygon rendering. + * + * \author Brian Paul + */ + + +#include "main/glheader.h" +#include "main/mtypes.h" +#include "main/imports.h" +#include "main/arrayobj.h" +#include "main/blend.h" +#include "main/bufferobj.h" +#include "main/buffers.h" +#include "main/colortab.h" +#include "main/context.h" +#include "main/depth.h" +#include "main/enable.h" +#include "main/feedback.h" +#include "main/formats.h" +#include "main/image.h" +#include "main/macros.h" +#include "main/matrix.h" +#include "main/pixel.h" +#include "main/polygon.h" +#include "main/readpix.h" +#include "main/scissor.h" +#include "main/state.h" +#include "main/stencil.h" +#include "main/texobj.h" +#include "main/texenv.h" +#include "main/texgetimage.h" +#include "main/teximage.h" +#include "main/texparam.h" +#include "main/texstate.h" +#include "main/varray.h" +#include "main/viewport.h" +#include "swrast/swrast.h" +#include "drivers/common/meta.h" + + +/** Return offset in bytes of the field within a vertex struct */ +#define OFFSET(FIELD) ((void *) offsetof(struct vertex, FIELD)) + +/** + * State which we may save/restore across meta ops. + * XXX this may be incomplete... + */ +struct save_state +{ + GLbitfield SavedState; /**< bitmask of MESA_META_* flags */ + + /** MESA_META_ALPHA_TEST */ + GLboolean AlphaEnabled; + GLenum AlphaFunc; + GLclampf AlphaRef; + + /** MESA_META_BLEND */ + GLbitfield BlendEnabled; + GLboolean ColorLogicOpEnabled; + + /** MESA_META_COLOR_MASK */ + GLubyte ColorMask[4]; + + /** MESA_META_DEPTH_TEST */ + struct gl_depthbuffer_attrib Depth; + + /** MESA_META_FOG */ + GLboolean Fog; + + /** MESA_META_PIXEL_STORE */ + struct gl_pixelstore_attrib Pack, Unpack; + + /** MESA_META_PIXEL_TRANSFER */ + GLfloat RedBias, RedScale; + GLfloat GreenBias, GreenScale; + GLfloat BlueBias, BlueScale; + GLfloat AlphaBias, AlphaScale; + GLfloat DepthBias, DepthScale; + GLboolean MapColorFlag; + + /** MESA_META_RASTERIZATION */ + GLenum FrontPolygonMode, BackPolygonMode; + GLboolean PolygonOffset; + GLboolean PolygonSmooth; + GLboolean PolygonStipple; + GLboolean PolygonCull; + + /** MESA_META_SCISSOR */ + struct gl_scissor_attrib Scissor; + + /** MESA_META_STENCIL_TEST */ + struct gl_stencil_attrib Stencil; + + /** MESA_META_TRANSFORM */ + GLenum MatrixMode; + GLfloat ModelviewMatrix[16]; + GLfloat ProjectionMatrix[16]; + GLfloat TextureMatrix[16]; + + /** MESA_META_CLIP */ + GLbitfield ClipPlanesEnabled; + + /** MESA_META_TEXTURE */ + struct gl_texture_object *CurrentTexture[NUM_TEXTURE_TARGETS]; + /** mask of TEXTURE_2D_BIT, etc */ + GLbitfield TexEnabled; + GLbitfield TexGenEnabled; + GLuint EnvMode; /* unit[0] only */ + + /** MESA_META_VERTEX */ + struct gl_array_object *ArrayObj; + struct gl_buffer_object *ArrayBufferObj; + + /** MESA_META_VIEWPORT */ + GLint ViewportX, ViewportY, ViewportW, ViewportH; + GLclampd DepthNear, DepthFar; + + /** MESA_META_SELECT_FEEDBACK */ + GLenum RenderMode; + struct gl_selection Select; + struct gl_feedback Feedback; + + /** Miscellaneous (always disabled) */ + GLboolean Lighting; + GLboolean RasterDiscard; +}; + +/** + * Temporary texture used for glBlitFramebuffer, glDrawPixels, etc. + * This is currently shared by all the meta ops. But we could create a + * separate one for each of glDrawPixel, glBlitFramebuffer, glCopyPixels, etc. + */ +struct temp_texture +{ + GLuint TexObj; + GLenum Target; /**< GL_TEXTURE_2D */ + GLsizei MinSize; /**< Min texture size to allocate */ + GLsizei MaxSize; /**< Max possible texture size */ + GLboolean NPOT; /**< Non-power of two size OK? */ + GLsizei Width, Height; /**< Current texture size */ + GLenum IntFormat; + GLfloat Sright, Ttop; /**< right, top texcoords */ +}; + + +/** + * State for glBlitFramebufer() + */ +struct blit_state +{ + GLuint ArrayObj; + GLuint VBO; + GLuint DepthFP; +}; + + +/** + * State for glClear() + */ +struct clear_state +{ + GLuint ArrayObj; + GLuint VBO; + GLuint ShaderProg; + GLint ColorLocation; + + GLuint IntegerShaderProg; + GLint IntegerColorLocation; +}; + + +/** + * State for glCopyPixels() + */ +struct copypix_state +{ + GLuint ArrayObj; + GLuint VBO; +}; + +#define MAX_META_OPS_DEPTH 8 +/** + * All per-context meta state. + */ +struct gl_meta_state +{ + /** Stack of state saved during meta-ops */ + struct save_state Save[MAX_META_OPS_DEPTH]; + /** Save stack depth */ + GLuint SaveStackDepth; + + struct temp_texture TempTex; + + struct copypix_state CopyPix; /**< For _mesa_meta_CopyPixels() */ +}; + +static void cleanup_temp_texture(struct gl_context *ctx, struct temp_texture *tex); + +/** + * Initialize meta-ops for a context. + * To be called once during context creation. + */ +void +_mesa_meta_init(struct gl_context *ctx) +{ + ASSERT(!ctx->Meta); + + ctx->Meta = CALLOC_STRUCT(gl_meta_state); +} + + +/** + * Free context meta-op state. + * To be called once during context destruction. + */ +void +_mesa_meta_free(struct gl_context *ctx) +{ + GET_CURRENT_CONTEXT(old_context); + _mesa_make_current(ctx, NULL, NULL); + cleanup_temp_texture(ctx, &ctx->Meta->TempTex); + if (old_context) + _mesa_make_current(old_context, old_context->WinSysDrawBuffer, old_context->WinSysReadBuffer); + else + _mesa_make_current(NULL, NULL, NULL); + free(ctx->Meta); + ctx->Meta = NULL; +} + + +/** + * Enter meta state. This is like a light-weight version of glPushAttrib + * but it also resets most GL state back to default values. + * + * \param state bitmask of MESA_META_* flags indicating which attribute groups + * to save and reset to their defaults + */ +void +_mesa_meta_begin(struct gl_context *ctx, GLbitfield state) +{ + struct save_state *save; + + /* hope MAX_META_OPS_DEPTH is large enough */ + assert(ctx->Meta->SaveStackDepth < MAX_META_OPS_DEPTH); + + save = &ctx->Meta->Save[ctx->Meta->SaveStackDepth++]; + memset(save, 0, sizeof(*save)); + save->SavedState = state; + + if (state & MESA_META_ALPHA_TEST) { + save->AlphaEnabled = ctx->Color.AlphaEnabled; + save->AlphaFunc = ctx->Color.AlphaFunc; + save->AlphaRef = ctx->Color.AlphaRef; + if (ctx->Color.AlphaEnabled) + _mesa_set_enable(ctx, GL_ALPHA_TEST, GL_FALSE); + } + + if (state & MESA_META_BLEND) { + save->BlendEnabled = ctx->Color.BlendEnabled; + if (ctx->Color.BlendEnabled) { + _mesa_set_enable(ctx, GL_BLEND, GL_FALSE); + } + save->ColorLogicOpEnabled = ctx->Color.ColorLogicOpEnabled; + if (ctx->Color.ColorLogicOpEnabled) + _mesa_set_enable(ctx, GL_COLOR_LOGIC_OP, GL_FALSE); + } + + if (state & MESA_META_COLOR_MASK) { + memcpy(save->ColorMask, ctx->Color.ColorMask, + sizeof(ctx->Color.ColorMask)); + if (!ctx->Color.ColorMask[0] || + !ctx->Color.ColorMask[1] || + !ctx->Color.ColorMask[2] || + !ctx->Color.ColorMask[3]) + _mesa_ColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); + } + + if (state & MESA_META_DEPTH_TEST) { + save->Depth = ctx->Depth; /* struct copy */ + if (ctx->Depth.Test) + _mesa_set_enable(ctx, GL_DEPTH_TEST, GL_FALSE); + } + + if (state & MESA_META_FOG) { + save->Fog = ctx->Fog.Enabled; + if (ctx->Fog.Enabled) + _mesa_set_enable(ctx, GL_FOG, GL_FALSE); + } + + if (state & MESA_META_PIXEL_STORE) { + save->Pack = ctx->Pack; + save->Unpack = ctx->Unpack; + ctx->Pack = ctx->DefaultPacking; + ctx->Unpack = ctx->DefaultPacking; + } + + if (state & MESA_META_PIXEL_TRANSFER) { + save->RedScale = ctx->Pixel.RedScale; + save->RedBias = ctx->Pixel.RedBias; + save->GreenScale = ctx->Pixel.GreenScale; + save->GreenBias = ctx->Pixel.GreenBias; + save->BlueScale = ctx->Pixel.BlueScale; + save->BlueBias = ctx->Pixel.BlueBias; + save->AlphaScale = ctx->Pixel.AlphaScale; + save->AlphaBias = ctx->Pixel.AlphaBias; + save->MapColorFlag = ctx->Pixel.MapColorFlag; + ctx->Pixel.RedScale = 1.0F; + ctx->Pixel.RedBias = 0.0F; + ctx->Pixel.GreenScale = 1.0F; + ctx->Pixel.GreenBias = 0.0F; + ctx->Pixel.BlueScale = 1.0F; + ctx->Pixel.BlueBias = 0.0F; + ctx->Pixel.AlphaScale = 1.0F; + ctx->Pixel.AlphaBias = 0.0F; + ctx->Pixel.MapColorFlag = GL_FALSE; + /* XXX more state */ + ctx->NewState |=_NEW_PIXEL; + } + + if (state & MESA_META_RASTERIZATION) { + save->FrontPolygonMode = ctx->Polygon.FrontMode; + save->BackPolygonMode = ctx->Polygon.BackMode; + save->PolygonOffset = ctx->Polygon.OffsetFill; + save->PolygonSmooth = ctx->Polygon.SmoothFlag; + save->PolygonStipple = ctx->Polygon.StippleFlag; + save->PolygonCull = ctx->Polygon.CullFlag; + _mesa_PolygonMode(GL_FRONT_AND_BACK, GL_FILL); + _mesa_set_enable(ctx, GL_POLYGON_OFFSET_FILL, GL_FALSE); + _mesa_set_enable(ctx, GL_POLYGON_SMOOTH, GL_FALSE); + _mesa_set_enable(ctx, GL_POLYGON_STIPPLE, GL_FALSE); + _mesa_set_enable(ctx, GL_CULL_FACE, GL_FALSE); + } + + if (state & MESA_META_SCISSOR) { + save->Scissor = ctx->Scissor; /* struct copy */ + _mesa_set_enable(ctx, GL_SCISSOR_TEST, GL_FALSE); + } + + if (state & MESA_META_STENCIL_TEST) { + save->Stencil = ctx->Stencil; /* struct copy */ + if (ctx->Stencil.Enabled) + _mesa_set_enable(ctx, GL_STENCIL_TEST, GL_FALSE); + /* NOTE: other stencil state not reset */ + } + + if (state & MESA_META_TEXTURE) { + GLuint tgt; + + save->EnvMode = ctx->Texture.Unit.EnvMode; + + /* Disable all texture units */ + save->TexEnabled = ctx->Texture.Unit.Enabled; + save->TexGenEnabled = ctx->Texture.Unit.TexGenEnabled; + if (ctx->Texture.Unit.Enabled || + ctx->Texture.Unit.TexGenEnabled) { + _mesa_set_enable(ctx, GL_TEXTURE_1D, GL_FALSE); + _mesa_set_enable(ctx, GL_TEXTURE_2D, GL_FALSE); + _mesa_set_enable(ctx, GL_TEXTURE_3D, GL_FALSE); + if (ctx->Extensions.ARB_texture_cube_map) + _mesa_set_enable(ctx, GL_TEXTURE_CUBE_MAP, GL_FALSE); + _mesa_set_enable(ctx, GL_TEXTURE_GEN_S, GL_FALSE); + _mesa_set_enable(ctx, GL_TEXTURE_GEN_T, GL_FALSE); + _mesa_set_enable(ctx, GL_TEXTURE_GEN_R, GL_FALSE); + _mesa_set_enable(ctx, GL_TEXTURE_GEN_Q, GL_FALSE); + } + + /* save current texture objects for unit[0] only */ + for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) { + _mesa_reference_texobj(&save->CurrentTexture[tgt], + ctx->Texture.Unit.CurrentTex[tgt]); + } + _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + } + + if (state & MESA_META_TRANSFORM) { + memcpy(save->ModelviewMatrix, ctx->ModelviewMatrixStack.Top->m, + 16 * sizeof(GLfloat)); + memcpy(save->ProjectionMatrix, ctx->ProjectionMatrixStack.Top->m, + 16 * sizeof(GLfloat)); + memcpy(save->TextureMatrix, ctx->TextureMatrixStack.Top->m, + 16 * sizeof(GLfloat)); + save->MatrixMode = ctx->Transform.MatrixMode; + /* set 1:1 vertex:pixel coordinate transform */ + _mesa_MatrixMode(GL_TEXTURE); + _mesa_LoadIdentity(); + _mesa_MatrixMode(GL_MODELVIEW); + _mesa_LoadIdentity(); + _mesa_MatrixMode(GL_PROJECTION); + _mesa_LoadIdentity(); + _mesa_Ortho(0.0, ctx->DrawBuffer->Width, + 0.0, ctx->DrawBuffer->Height, + -1.0, 1.0); + } + + if (state & MESA_META_CLIP) { + save->ClipPlanesEnabled = ctx->Transform.ClipPlanesEnabled; + if (ctx->Transform.ClipPlanesEnabled) { + GLuint i; + for (i = 0; i < ctx->Const.MaxClipPlanes; i++) { + _mesa_set_enable(ctx, GL_CLIP_PLANE0 + i, GL_FALSE); + } + } + } + + if (state & MESA_META_VERTEX) { + /* save vertex array object state */ + _mesa_reference_array_object(ctx, &save->ArrayObj, + ctx->Array.ArrayObj); + _mesa_reference_buffer_object(ctx, &save->ArrayBufferObj, + ctx->Array.ArrayBufferObj); + /* set some default state? */ + } + + if (state & MESA_META_VIEWPORT) { + /* save viewport state */ + save->ViewportX = ctx->Viewport.X; + save->ViewportY = ctx->Viewport.Y; + save->ViewportW = ctx->Viewport.Width; + save->ViewportH = ctx->Viewport.Height; + /* set viewport to match window size */ + if (ctx->Viewport.X != 0 || + ctx->Viewport.Y != 0 || + ctx->Viewport.Width != ctx->DrawBuffer->Width || + ctx->Viewport.Height != ctx->DrawBuffer->Height) { + _mesa_set_viewport(ctx, 0, 0, + ctx->DrawBuffer->Width, ctx->DrawBuffer->Height); + } + /* save depth range state */ + save->DepthNear = ctx->Viewport.Near; + save->DepthFar = ctx->Viewport.Far; + /* set depth range to default */ + _mesa_DepthRange(0.0, 1.0); + } + + if (state & MESA_META_SELECT_FEEDBACK) { + save->RenderMode = ctx->RenderMode; + if (ctx->RenderMode == GL_SELECT) { + save->Select = ctx->Select; /* struct copy */ + _mesa_RenderMode(GL_RENDER); + } else if (ctx->RenderMode == GL_FEEDBACK) { + save->Feedback = ctx->Feedback; /* struct copy */ + _mesa_RenderMode(GL_RENDER); + } + } + + /* misc */ + { + save->Lighting = ctx->Light.Enabled; + if (ctx->Light.Enabled) + _mesa_set_enable(ctx, GL_LIGHTING, GL_FALSE); + save->RasterDiscard = ctx->RasterDiscard; + if (ctx->RasterDiscard) + _mesa_set_enable(ctx, GL_RASTERIZER_DISCARD, GL_FALSE); + } +} + + +/** + * Leave meta state. This is like a light-weight version of glPopAttrib(). + */ +void +_mesa_meta_end(struct gl_context *ctx) +{ + struct save_state *save = &ctx->Meta->Save[--ctx->Meta->SaveStackDepth]; + const GLbitfield state = save->SavedState; + + if (state & MESA_META_ALPHA_TEST) { + if (ctx->Color.AlphaEnabled != save->AlphaEnabled) + _mesa_set_enable(ctx, GL_ALPHA_TEST, save->AlphaEnabled); + _mesa_AlphaFunc(save->AlphaFunc, save->AlphaRef); + } + + if (state & MESA_META_BLEND) { + if (ctx->Color.BlendEnabled != save->BlendEnabled) { + _mesa_set_enable(ctx, GL_BLEND, (save->BlendEnabled & 1)); + } + if (ctx->Color.ColorLogicOpEnabled != save->ColorLogicOpEnabled) + _mesa_set_enable(ctx, GL_COLOR_LOGIC_OP, save->ColorLogicOpEnabled); + } + + if (state & MESA_META_COLOR_MASK) { + if (!TEST_EQ_4V(ctx->Color.ColorMask, save->ColorMask)) { + _mesa_ColorMask(save->ColorMask[0], save->ColorMask[1], + save->ColorMask[2], save->ColorMask[3]); + } + } + + if (state & MESA_META_DEPTH_TEST) { + if (ctx->Depth.Test != save->Depth.Test) + _mesa_set_enable(ctx, GL_DEPTH_TEST, save->Depth.Test); + _mesa_DepthFunc(save->Depth.Func); + _mesa_DepthMask(save->Depth.Mask); + } + + if (state & MESA_META_FOG) { + _mesa_set_enable(ctx, GL_FOG, save->Fog); + } + + if (state & MESA_META_PIXEL_STORE) { + ctx->Pack = save->Pack; + ctx->Unpack = save->Unpack; + } + + if (state & MESA_META_PIXEL_TRANSFER) { + ctx->Pixel.RedScale = save->RedScale; + ctx->Pixel.RedBias = save->RedBias; + ctx->Pixel.GreenScale = save->GreenScale; + ctx->Pixel.GreenBias = save->GreenBias; + ctx->Pixel.BlueScale = save->BlueScale; + ctx->Pixel.BlueBias = save->BlueBias; + ctx->Pixel.AlphaScale = save->AlphaScale; + ctx->Pixel.AlphaBias = save->AlphaBias; + ctx->Pixel.MapColorFlag = save->MapColorFlag; + /* XXX more state */ + ctx->NewState |=_NEW_PIXEL; + } + + if (state & MESA_META_RASTERIZATION) { + _mesa_PolygonMode(GL_FRONT, save->FrontPolygonMode); + _mesa_PolygonMode(GL_BACK, save->BackPolygonMode); + _mesa_set_enable(ctx, GL_POLYGON_STIPPLE, save->PolygonStipple); + _mesa_set_enable(ctx, GL_POLYGON_OFFSET_FILL, save->PolygonOffset); + _mesa_set_enable(ctx, GL_POLYGON_SMOOTH, save->PolygonSmooth); + _mesa_set_enable(ctx, GL_CULL_FACE, save->PolygonCull); + } + + if (state & MESA_META_SCISSOR) { + _mesa_set_enable(ctx, GL_SCISSOR_TEST, save->Scissor.Enabled); + _mesa_Scissor(save->Scissor.X, save->Scissor.Y, + save->Scissor.Width, save->Scissor.Height); + } + + if (state & MESA_META_STENCIL_TEST) { + const struct gl_stencil_attrib *stencil = &save->Stencil; + + _mesa_set_enable(ctx, GL_STENCIL_TEST, stencil->Enabled); + _mesa_ClearStencil(stencil->Clear); + _mesa_StencilFunc(stencil->Function, + stencil->Ref, + stencil->ValueMask); + _mesa_StencilMask(stencil->WriteMask); + _mesa_StencilOp(stencil->FailFunc, stencil->ZFailFunc, stencil->ZPassFunc); + } + + if (state & MESA_META_TEXTURE) { + GLuint tgt; + + /* restore texenv for unit[0] */ + _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, save->EnvMode); + + /* restore texture objects for unit[0] only */ + for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) { + if (ctx->Texture.Unit.CurrentTex[tgt] != save->CurrentTexture[tgt]) { + FLUSH_VERTICES(ctx, _NEW_TEXTURE); + _mesa_reference_texobj(&ctx->Texture.Unit.CurrentTex[tgt], + save->CurrentTexture[tgt]); + } + _mesa_reference_texobj(&save->CurrentTexture[tgt], NULL); + } + + /* Restore fixed function texture enables, texgen */ + if (ctx->Texture.Unit.Enabled != save->TexEnabled) { + FLUSH_VERTICES(ctx, _NEW_TEXTURE); + ctx->Texture.Unit.Enabled = save->TexEnabled; + } + + if (ctx->Texture.Unit.TexGenEnabled != save->TexGenEnabled) { + FLUSH_VERTICES(ctx, _NEW_TEXTURE); + ctx->Texture.Unit.TexGenEnabled = save->TexGenEnabled; + } + } + + if (state & MESA_META_TRANSFORM) { + _mesa_MatrixMode(GL_TEXTURE); + _mesa_LoadMatrixf(save->TextureMatrix); + + _mesa_MatrixMode(GL_MODELVIEW); + _mesa_LoadMatrixf(save->ModelviewMatrix); + + _mesa_MatrixMode(GL_PROJECTION); + _mesa_LoadMatrixf(save->ProjectionMatrix); + + _mesa_MatrixMode(save->MatrixMode); + } + + if (state & MESA_META_CLIP) { + if (save->ClipPlanesEnabled) { + GLuint i; + for (i = 0; i < ctx->Const.MaxClipPlanes; i++) { + if (save->ClipPlanesEnabled & (1 << i)) { + _mesa_set_enable(ctx, GL_CLIP_PLANE0 + i, GL_TRUE); + } + } + } + } + + if (state & MESA_META_VERTEX) { + /* restore vertex buffer object */ + _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, save->ArrayBufferObj->Name); + _mesa_reference_buffer_object(ctx, &save->ArrayBufferObj, NULL); + + /* restore vertex array object */ + _mesa_BindVertexArray(save->ArrayObj->Name); + _mesa_reference_array_object(ctx, &save->ArrayObj, NULL); + } + + if (state & MESA_META_VIEWPORT) { + if (save->ViewportX != ctx->Viewport.X || + save->ViewportY != ctx->Viewport.Y || + save->ViewportW != ctx->Viewport.Width || + save->ViewportH != ctx->Viewport.Height) { + _mesa_set_viewport(ctx, save->ViewportX, save->ViewportY, + save->ViewportW, save->ViewportH); + } + _mesa_DepthRange(save->DepthNear, save->DepthFar); + } + + /* misc */ + if (save->Lighting) { + _mesa_set_enable(ctx, GL_LIGHTING, GL_TRUE); + } + if (save->RasterDiscard) { + _mesa_set_enable(ctx, GL_RASTERIZER_DISCARD, GL_TRUE); + } +} + + +/** + * Determine whether Mesa is currently in a meta state. + */ +GLboolean +_mesa_meta_in_progress(struct gl_context *ctx) +{ + return ctx->Meta->SaveStackDepth != 0; +} + + +/** + * Convert Z from a normalized value in the range [0, 1] to an object-space + * Z coordinate in [-1, +1] so that drawing at the new Z position with the + * default/identity ortho projection results in the original Z value. + * Used by the meta-Clear, Draw/CopyPixels and Bitmap functions where the Z + * value comes from the clear value or raster position. + */ +static INLINE GLfloat +invert_z(GLfloat normZ) +{ + GLfloat objZ = 1.0f - 2.0f * normZ; + return objZ; +} + + +/** + * One-time init for a temp_texture object. + * Choose tex target, compute max tex size, etc. + */ +static void +init_temp_texture(struct gl_context *ctx, struct temp_texture *tex) +{ + /* use 2D texture, NPOT if possible */ + tex->Target = GL_TEXTURE_2D; + tex->MaxSize = 1 << (ctx->Const.MaxTextureLevels - 1); + tex->NPOT = ctx->Extensions.ARB_texture_non_power_of_two; + tex->MinSize = 16; /* 16 x 16 at least */ + assert(tex->MaxSize > 0); + + _mesa_GenTextures(1, &tex->TexObj); +} + +static void +cleanup_temp_texture(struct gl_context *ctx, struct temp_texture *tex) +{ + if (!tex->TexObj) + return; + _mesa_DeleteTextures(1, &tex->TexObj); + tex->TexObj = 0; +} + + +/** + * Return pointer to temp_texture info for non-bitmap ops. + * This does some one-time init if needed. + */ +static struct temp_texture * +get_temp_texture(struct gl_context *ctx) +{ + struct temp_texture *tex = &ctx->Meta->TempTex; + + if (!tex->TexObj) { + init_temp_texture(ctx, tex); + } + + return tex; +} + + +/** + * Compute the width/height of texture needed to draw an image of the + * given size. Return a flag indicating whether the current texture + * can be re-used (glTexSubImage2D) or if a new texture needs to be + * allocated (glTexImage2D). + * Also, compute s/t texcoords for drawing. + * + * \return GL_TRUE if new texture is needed, GL_FALSE otherwise + */ +static GLboolean +alloc_texture(struct temp_texture *tex, + GLsizei width, GLsizei height, GLenum intFormat) +{ + GLboolean newTex = GL_FALSE; + + ASSERT(width <= tex->MaxSize); + ASSERT(height <= tex->MaxSize); + + if (width > tex->Width || + height > tex->Height || + intFormat != tex->IntFormat) { + /* alloc new texture (larger or different format) */ + + if (tex->NPOT) { + /* use non-power of two size */ + tex->Width = MAX2(tex->MinSize, width); + tex->Height = MAX2(tex->MinSize, height); + } + else { + /* find power of two size */ + GLsizei w, h; + w = h = tex->MinSize; + while (w < width) + w *= 2; + while (h < height) + h *= 2; + tex->Width = w; + tex->Height = h; + } + + tex->IntFormat = intFormat; + + newTex = GL_TRUE; + } + + /* compute texcoords */ + tex->Sright = (GLfloat) width / tex->Width; + tex->Ttop = (GLfloat) height / tex->Height; + + return newTex; +} + + +/** + * Setup/load texture for glCopyPixels or glBlitFramebuffer. + */ +static void +setup_copypix_texture(struct temp_texture *tex, + GLboolean newTex, + GLint srcX, GLint srcY, + GLsizei width, GLsizei height, GLenum intFormat, + GLenum filter) +{ + _mesa_BindTexture(tex->Target, tex->TexObj); + _mesa_TexParameteri(tex->Target, GL_TEXTURE_MIN_FILTER, filter); + _mesa_TexParameteri(tex->Target, GL_TEXTURE_MAG_FILTER, filter); + _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + + /* copy framebuffer image to texture */ + if (newTex) { + /* create new tex image */ + if (tex->Width == width && tex->Height == height) { + /* create new tex with framebuffer data */ + _mesa_CopyTexImage2D(tex->Target, 0, tex->IntFormat, + srcX, srcY, width, height, 0); + } + else { + /* create empty texture */ + _mesa_TexImage2D(tex->Target, 0, tex->IntFormat, + tex->Width, tex->Height, 0, + intFormat, GL_UNSIGNED_BYTE, NULL); + /* load image */ + _mesa_CopyTexSubImage2D(tex->Target, 0, + 0, 0, srcX, srcY, width, height); + } + } + else { + /* replace existing tex image */ + _mesa_CopyTexSubImage2D(tex->Target, 0, + 0, 0, srcX, srcY, width, height); + } +} + +/** + * Meta implementation of ctx->Driver.CopyPixels() in terms + * of texture mapping and polygon rendering and GLSL shaders. + */ +void +_mesa_meta_CopyPixels(struct gl_context *ctx, GLint srcX, GLint srcY, + GLsizei width, GLsizei height, + GLint dstX, GLint dstY, GLenum type) +{ + struct copypix_state *copypix = &ctx->Meta->CopyPix; + struct temp_texture *tex = get_temp_texture(ctx); + struct vertex { + GLfloat x, y, z, s, t; + }; + struct vertex verts[4]; + GLboolean newTex; + GLenum intFormat = GL_RGBA; + + if (type != GL_COLOR || + ctx->_ImageTransferState || + ctx->Fog.Enabled || + width > tex->MaxSize || + height > tex->MaxSize) { + /* XXX avoid this fallback */ + _swrast_CopyPixels(ctx, srcX, srcY, width, height, dstX, dstY, type); + return; + } + + /* Most GL state applies to glCopyPixels, but a there's a few things + * we need to override: + */ + _mesa_meta_begin(ctx, (MESA_META_RASTERIZATION | + MESA_META_TEXTURE | + MESA_META_TRANSFORM | + MESA_META_CLIP | + MESA_META_VERTEX | + MESA_META_VIEWPORT)); + + if (copypix->ArrayObj == 0) { + /* one-time setup */ + + /* create vertex array object */ + _mesa_GenVertexArrays(1, ©pix->ArrayObj); + _mesa_BindVertexArray(copypix->ArrayObj); + + /* create vertex array buffer */ + _mesa_GenBuffersARB(1, ©pix->VBO); + _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, copypix->VBO); + _mesa_BufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), + NULL, GL_DYNAMIC_DRAW_ARB); + + /* setup vertex arrays */ + _mesa_VertexPointer(3, GL_FLOAT, sizeof(struct vertex), OFFSET(x)); + _mesa_TexCoordPointer(2, GL_FLOAT, sizeof(struct vertex), OFFSET(s)); + _mesa_EnableClientState(GL_VERTEX_ARRAY); + _mesa_EnableClientState(GL_TEXTURE_COORD_ARRAY); + } + else { + _mesa_BindVertexArray(copypix->ArrayObj); + _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, copypix->VBO); + } + + newTex = alloc_texture(tex, width, height, intFormat); + + /* vertex positions, texcoords (after texture allocation!) */ + { + const GLfloat dstX0 = (GLfloat) dstX; + const GLfloat dstY0 = (GLfloat) dstY; + const GLfloat dstX1 = dstX + width * ctx->Pixel.ZoomX; + const GLfloat dstY1 = dstY + height * ctx->Pixel.ZoomY; + const GLfloat z = invert_z(ctx->Current.RasterPos[2]); + + verts[0].x = dstX0; + verts[0].y = dstY0; + verts[0].z = z; + verts[0].s = 0.0F; + verts[0].t = 0.0F; + verts[1].x = dstX1; + verts[1].y = dstY0; + verts[1].z = z; + verts[1].s = tex->Sright; + verts[1].t = 0.0F; + verts[2].x = dstX1; + verts[2].y = dstY1; + verts[2].z = z; + verts[2].s = tex->Sright; + verts[2].t = tex->Ttop; + verts[3].x = dstX0; + verts[3].y = dstY1; + verts[3].z = z; + verts[3].s = 0.0F; + verts[3].t = tex->Ttop; + + /* upload new vertex data */ + _mesa_BufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts); + } + + /* Alloc/setup texture */ + setup_copypix_texture(tex, newTex, srcX, srcY, width, height, + GL_RGBA, GL_NEAREST); + + _mesa_set_enable(ctx, tex->Target, GL_TRUE); + + /* draw textured quad */ + _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); + + _mesa_set_enable(ctx, tex->Target, GL_FALSE); + + _mesa_meta_end(ctx); +} + + +/** + * Determine the GL data type to use for the temporary image read with + * ReadPixels() and passed to Tex[Sub]Image(). + */ +static GLenum +get_temp_image_type(struct gl_context *ctx, GLenum baseFormat) +{ + switch (baseFormat) { + case GL_RGBA: + case GL_RGB: + case GL_RG: + case GL_RED: + case GL_ALPHA: + case GL_LUMINANCE: + case GL_LUMINANCE_ALPHA: + case GL_INTENSITY: + if (ctx->DrawBuffer->Visual.redBits <= 8) + return GL_UNSIGNED_BYTE; + else if (ctx->DrawBuffer->Visual.redBits <= 16) + return GL_UNSIGNED_SHORT; + else + return GL_FLOAT; + case GL_DEPTH_COMPONENT: + return GL_UNSIGNED_INT; + default: + _mesa_problem(ctx, "Unexpected format %d in get_temp_image_type()", + baseFormat); + return 0; + } +} + + +/** + * Helper for _mesa_meta_CopyTexSubImage1/2/3D() functions. + * Have to be careful with locking and meta state for pixel transfer. + */ +static void +copy_tex_sub_image(struct gl_context *ctx, + GLuint dims, + struct gl_texture_image *texImage, + GLint xoffset, GLint yoffset, GLint zoffset, + struct gl_renderbuffer *rb, + GLint x, GLint y, + GLsizei width, GLsizei height) +{ + struct gl_texture_object *texObj = texImage->TexObject; + const GLenum target = texObj->Target; + GLenum format, type; + GLint bpp; + void *buf; + + /* Choose format/type for temporary image buffer */ + format = _mesa_get_format_base_format(texImage->TexFormat); + if (format == GL_LUMINANCE || + format == GL_LUMINANCE_ALPHA || + format == GL_INTENSITY) { + /* We don't want to use GL_LUMINANCE, GL_INTENSITY, etc. for the + * temp image buffer because glReadPixels will do L=R+G+B which is + * not what we want (should be L=R). + */ + format = GL_RGBA; + } + + if (_mesa_is_format_integer_color(texImage->TexFormat)) { + _mesa_problem(ctx, "unsupported integer color copyteximage"); + return; + } + + type = get_temp_image_type(ctx, format); + bpp = _mesa_bytes_per_pixel(format, type); + if (bpp <= 0) { + _mesa_problem(ctx, "Bad bpp in meta copy_tex_sub_image()"); + return; + } + + /* + * Alloc image buffer (XXX could use a PBO) + */ + buf = malloc(width * height * bpp); + if (!buf) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexSubImage%uD", dims); + return; + } + + _mesa_unlock_texture(ctx, texObj); /* need to unlock first */ + + /* + * Read image from framebuffer (disable pixel transfer ops) + */ + _mesa_meta_begin(ctx, MESA_META_PIXEL_STORE | MESA_META_PIXEL_TRANSFER); + ctx->Driver.ReadPixels(ctx, x, y, width, height, + format, type, &ctx->Pack, buf); + _mesa_meta_end(ctx); + + _mesa_update_state(ctx); /* to update pixel transfer state */ + + /* + * Store texture data (with pixel transfer ops) + */ + _mesa_meta_begin(ctx, MESA_META_PIXEL_STORE); + if (target == GL_TEXTURE_1D) { + ctx->Driver.TexSubImage1D(ctx, texImage, + xoffset, width, + format, type, buf, &ctx->Unpack); + } + else if (target == GL_TEXTURE_3D) { + ctx->Driver.TexSubImage3D(ctx, texImage, + xoffset, yoffset, zoffset, width, height, 1, + format, type, buf, &ctx->Unpack); + } + else { + ctx->Driver.TexSubImage2D(ctx, texImage, + xoffset, yoffset, width, height, + format, type, buf, &ctx->Unpack); + } + _mesa_meta_end(ctx); + + _mesa_lock_texture(ctx, texObj); /* re-lock */ + + free(buf); +} + + +void +_mesa_meta_CopyTexSubImage1D(struct gl_context *ctx, + struct gl_texture_image *texImage, + GLint xoffset, + struct gl_renderbuffer *rb, + GLint x, GLint y, GLsizei width) +{ + copy_tex_sub_image(ctx, 1, texImage, xoffset, 0, 0, + rb, x, y, width, 1); +} + + +void +_mesa_meta_CopyTexSubImage2D(struct gl_context *ctx, + struct gl_texture_image *texImage, + GLint xoffset, GLint yoffset, + struct gl_renderbuffer *rb, + GLint x, GLint y, + GLsizei width, GLsizei height) +{ + copy_tex_sub_image(ctx, 2, texImage, xoffset, yoffset, 0, + rb, x, y, width, height); +} + + +void +_mesa_meta_CopyTexSubImage3D(struct gl_context *ctx, + struct gl_texture_image *texImage, + GLint xoffset, GLint yoffset, GLint zoffset, + struct gl_renderbuffer *rb, + GLint x, GLint y, + GLsizei width, GLsizei height) +{ + copy_tex_sub_image(ctx, 3, texImage, xoffset, yoffset, zoffset, + rb, x, y, width, height); +} diff --git a/dll/opengl/mesa/src/mesa/drivers/common/meta.h b/dll/opengl/mesa/drivers/common/meta.h similarity index 66% rename from dll/opengl/mesa/src/mesa/drivers/common/meta.h rename to dll/opengl/mesa/drivers/common/meta.h index de039b575e5..1e2656af014 100644 --- a/dll/opengl/mesa/src/mesa/drivers/common/meta.h +++ b/dll/opengl/mesa/drivers/common/meta.h @@ -44,17 +44,13 @@ #define MESA_META_PIXEL_TRANSFER 0x40 #define MESA_META_RASTERIZATION 0x80 #define MESA_META_SCISSOR 0x100 -#define MESA_META_SHADER 0x200 #define MESA_META_STENCIL_TEST 0x400 #define MESA_META_TRANSFORM 0x800 /**< modelview/projection matrix state */ #define MESA_META_TEXTURE 0x1000 #define MESA_META_VERTEX 0x2000 #define MESA_META_VIEWPORT 0x4000 -#define MESA_META_CLAMP_FRAGMENT_COLOR 0x8000 -#define MESA_META_CLAMP_VERTEX_COLOR 0x10000 -#define MESA_META_CONDITIONAL_RENDER 0x20000 -#define MESA_META_CLIP 0x40000 -#define MESA_META_SELECT_FEEDBACK 0x80000 +#define MESA_META_CLIP 0x8000 +#define MESA_META_SELECT_FEEDBACK 0x10000 /**\}*/ extern void @@ -72,44 +68,11 @@ _mesa_meta_end(struct gl_context *ctx); extern GLboolean _mesa_meta_in_progress(struct gl_context *ctx); -extern void -_mesa_meta_BlitFramebuffer(struct gl_context *ctx, - GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, - GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, - GLbitfield mask, GLenum filter); - -extern void -_mesa_meta_Clear(struct gl_context *ctx, GLbitfield buffers); - -extern void -_mesa_meta_glsl_Clear(struct gl_context *ctx, GLbitfield buffers); - extern void _mesa_meta_CopyPixels(struct gl_context *ctx, GLint srcx, GLint srcy, GLsizei width, GLsizei height, GLint dstx, GLint dsty, GLenum type); -extern void -_mesa_meta_DrawPixels(struct gl_context *ctx, - GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, - const struct gl_pixelstore_attrib *unpack, - const GLvoid *pixels); - -extern void -_mesa_meta_Bitmap(struct gl_context *ctx, - GLint x, GLint y, GLsizei width, GLsizei height, - const struct gl_pixelstore_attrib *unpack, - const GLubyte *bitmap); - -extern GLboolean -_mesa_meta_check_generate_mipmap_fallback(struct gl_context *ctx, GLenum target, - struct gl_texture_object *texObj); - -extern void -_mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target, - struct gl_texture_object *texObj); - extern void _mesa_meta_CopyTexSubImage1D(struct gl_context *ctx, struct gl_texture_image *texImage, @@ -133,13 +96,4 @@ _mesa_meta_CopyTexSubImage3D(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height); -extern void -_mesa_meta_GetTexImage(struct gl_context *ctx, - GLenum format, GLenum type, GLvoid *pixels, - struct gl_texture_image *texImage); - -extern void -_mesa_meta_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, - GLfloat width, GLfloat height); - #endif /* META_H */ diff --git a/dll/opengl/mesa/generated/gallium/auxiliary/indices/u_indices_gen.c b/dll/opengl/mesa/generated/gallium/auxiliary/indices/u_indices_gen.c deleted file mode 100644 index 3c981e5d7f4..00000000000 --- a/dll/opengl/mesa/generated/gallium/auxiliary/indices/u_indices_gen.c +++ /dev/null @@ -1,5129 +0,0 @@ -/* File automatically generated by indices.py */ - -/* - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - - -/** - * @file - * Functions to translate and generate index lists - */ - -#include "indices/u_indices.h" -#include "indices/u_indices_priv.h" -#include "pipe/p_compiler.h" -#include "util/u_debug.h" -#include "pipe/p_defines.h" -#include "util/u_memory.h" - - -static unsigned out_size_idx( unsigned index_size ) -{ - switch (index_size) { - case 4: return OUT_UINT; - case 2: return OUT_USHORT; - default: assert(0); return OUT_USHORT; - } -} - -static unsigned in_size_idx( unsigned index_size ) -{ - switch (index_size) { - case 4: return IN_UINT; - case 2: return IN_USHORT; - case 1: return IN_UBYTE; - default: assert(0); return IN_UBYTE; - } -} - - -static u_translate_func translate[IN_COUNT][OUT_COUNT][PV_COUNT][PV_COUNT][PRIM_COUNT]; -static u_generate_func generate[OUT_COUNT][PV_COUNT][PV_COUNT][PRIM_COUNT]; - - - -static void generate_points_ushort_first2first( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (ushort)(i); - } -} -static void generate_lines_ushort_first2first( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (ushort)(i); - (out+i)[1] = (ushort)(i+1); - } -} -static void generate_linestrip_ushort_first2first( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (ushort)(i); - (out+j)[1] = (ushort)(i+1); - } -} -static void generate_lineloop_ushort_first2first( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (ushort)(i); - (out+j)[1] = (ushort)(i+1); - } - (out+j)[0] = (ushort)(i); - (out+j)[1] = (ushort)(0); -} -static void generate_tris_ushort_first2first( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (ushort)(i); - (out+i)[1] = (ushort)(i+1); - (out+i)[2] = (ushort)(i+2); - } -} -static void generate_tristrip_ushort_first2first( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)(i); - (out+j)[1] = (ushort)(i+1+(i&1)); - (out+j)[2] = (ushort)(i+2-(i&1)); - } -} -static void generate_trifan_ushort_first2first( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)(0); - (out+j)[1] = (ushort)(i+1); - (out+j)[2] = (ushort)(i+2); - } -} -static void generate_quads_ushort_first2first( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (ushort)(i+0); - (out+j+0)[1] = (ushort)(i+1); - (out+j+0)[2] = (ushort)(i+3); - (out+j+3)[0] = (ushort)(i+1); - (out+j+3)[1] = (ushort)(i+2); - (out+j+3)[2] = (ushort)(i+3); - } -} -static void generate_quadstrip_ushort_first2first( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)(i+2); - (out+j+0)[1] = (ushort)(i+0); - (out+j+0)[2] = (ushort)(i+3); - (out+j+3)[0] = (ushort)(i+0); - (out+j+3)[1] = (ushort)(i+1); - (out+j+3)[2] = (ushort)(i+3); - } -} -static void generate_polygon_ushort_first2first( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)(0); - (out+j)[1] = (ushort)(i+1); - (out+j)[2] = (ushort)(i+2); - } -} -static void generate_points_ushort_first2last( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (ushort)(i); - } -} -static void generate_lines_ushort_first2last( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (ushort)(i+1); - (out+i)[1] = (ushort)(i); - } -} -static void generate_linestrip_ushort_first2last( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (ushort)(i+1); - (out+j)[1] = (ushort)(i); - } -} -static void generate_lineloop_ushort_first2last( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (ushort)(i+1); - (out+j)[1] = (ushort)(i); - } - (out+j)[0] = (ushort)(0); - (out+j)[1] = (ushort)(i); -} -static void generate_tris_ushort_first2last( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (ushort)(i+1); - (out+i)[1] = (ushort)(i+2); - (out+i)[2] = (ushort)(i); - } -} -static void generate_tristrip_ushort_first2last( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)(i+1+(i&1)); - (out+j)[1] = (ushort)(i+2-(i&1)); - (out+j)[2] = (ushort)(i); - } -} -static void generate_trifan_ushort_first2last( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)(i+1); - (out+j)[1] = (ushort)(i+2); - (out+j)[2] = (ushort)(0); - } -} -static void generate_quads_ushort_first2last( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (ushort)(i+1); - (out+j+0)[1] = (ushort)(i+3); - (out+j+0)[2] = (ushort)(i+0); - (out+j+3)[0] = (ushort)(i+2); - (out+j+3)[1] = (ushort)(i+3); - (out+j+3)[2] = (ushort)(i+1); - } -} -static void generate_quadstrip_ushort_first2last( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)(i+0); - (out+j+0)[1] = (ushort)(i+3); - (out+j+0)[2] = (ushort)(i+2); - (out+j+3)[0] = (ushort)(i+1); - (out+j+3)[1] = (ushort)(i+3); - (out+j+3)[2] = (ushort)(i+0); - } -} -static void generate_polygon_ushort_first2last( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)(i+1); - (out+j)[1] = (ushort)(i+2); - (out+j)[2] = (ushort)(0); - } -} -static void generate_points_ushort_last2first( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (ushort)(i); - } -} -static void generate_lines_ushort_last2first( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (ushort)(i+1); - (out+i)[1] = (ushort)(i); - } -} -static void generate_linestrip_ushort_last2first( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (ushort)(i+1); - (out+j)[1] = (ushort)(i); - } -} -static void generate_lineloop_ushort_last2first( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (ushort)(i+1); - (out+j)[1] = (ushort)(i); - } - (out+j)[0] = (ushort)(0); - (out+j)[1] = (ushort)(i); -} -static void generate_tris_ushort_last2first( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (ushort)(i+2); - (out+i)[1] = (ushort)(i); - (out+i)[2] = (ushort)(i+1); - } -} -static void generate_tristrip_ushort_last2first( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)(i+2); - (out+j)[1] = (ushort)(i+(i&1)); - (out+j)[2] = (ushort)(i+1-(i&1)); - } -} -static void generate_trifan_ushort_last2first( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)(i+2); - (out+j)[1] = (ushort)(0); - (out+j)[2] = (ushort)(i+1); - } -} -static void generate_quads_ushort_last2first( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (ushort)(i+3); - (out+j+0)[1] = (ushort)(i+0); - (out+j+0)[2] = (ushort)(i+1); - (out+j+3)[0] = (ushort)(i+3); - (out+j+3)[1] = (ushort)(i+1); - (out+j+3)[2] = (ushort)(i+2); - } -} -static void generate_quadstrip_ushort_last2first( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)(i+3); - (out+j+0)[1] = (ushort)(i+2); - (out+j+0)[2] = (ushort)(i+0); - (out+j+3)[0] = (ushort)(i+3); - (out+j+3)[1] = (ushort)(i+0); - (out+j+3)[2] = (ushort)(i+1); - } -} -static void generate_polygon_ushort_last2first( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)(0); - (out+j)[1] = (ushort)(i+1); - (out+j)[2] = (ushort)(i+2); - } -} -static void generate_points_ushort_last2last( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (ushort)(i); - } -} -static void generate_lines_ushort_last2last( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (ushort)(i); - (out+i)[1] = (ushort)(i+1); - } -} -static void generate_linestrip_ushort_last2last( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (ushort)(i); - (out+j)[1] = (ushort)(i+1); - } -} -static void generate_lineloop_ushort_last2last( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (ushort)(i); - (out+j)[1] = (ushort)(i+1); - } - (out+j)[0] = (ushort)(i); - (out+j)[1] = (ushort)(0); -} -static void generate_tris_ushort_last2last( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (ushort)(i); - (out+i)[1] = (ushort)(i+1); - (out+i)[2] = (ushort)(i+2); - } -} -static void generate_tristrip_ushort_last2last( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)(i+(i&1)); - (out+j)[1] = (ushort)(i+1-(i&1)); - (out+j)[2] = (ushort)(i+2); - } -} -static void generate_trifan_ushort_last2last( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)(0); - (out+j)[1] = (ushort)(i+1); - (out+j)[2] = (ushort)(i+2); - } -} -static void generate_quads_ushort_last2last( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (ushort)(i+0); - (out+j+0)[1] = (ushort)(i+1); - (out+j+0)[2] = (ushort)(i+3); - (out+j+3)[0] = (ushort)(i+1); - (out+j+3)[1] = (ushort)(i+2); - (out+j+3)[2] = (ushort)(i+3); - } -} -static void generate_quadstrip_ushort_last2last( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)(i+2); - (out+j+0)[1] = (ushort)(i+0); - (out+j+0)[2] = (ushort)(i+3); - (out+j+3)[0] = (ushort)(i+0); - (out+j+3)[1] = (ushort)(i+1); - (out+j+3)[2] = (ushort)(i+3); - } -} -static void generate_polygon_ushort_last2last( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)(i+1); - (out+j)[1] = (ushort)(i+2); - (out+j)[2] = (ushort)(0); - } -} -static void generate_points_uint_first2first( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (uint)(i); - } -} -static void generate_lines_uint_first2first( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (uint)(i); - (out+i)[1] = (uint)(i+1); - } -} -static void generate_linestrip_uint_first2first( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (uint)(i); - (out+j)[1] = (uint)(i+1); - } -} -static void generate_lineloop_uint_first2first( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (uint)(i); - (out+j)[1] = (uint)(i+1); - } - (out+j)[0] = (uint)(i); - (out+j)[1] = (uint)(0); -} -static void generate_tris_uint_first2first( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (uint)(i); - (out+i)[1] = (uint)(i+1); - (out+i)[2] = (uint)(i+2); - } -} -static void generate_tristrip_uint_first2first( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)(i); - (out+j)[1] = (uint)(i+1+(i&1)); - (out+j)[2] = (uint)(i+2-(i&1)); - } -} -static void generate_trifan_uint_first2first( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)(0); - (out+j)[1] = (uint)(i+1); - (out+j)[2] = (uint)(i+2); - } -} -static void generate_quads_uint_first2first( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (uint)(i+0); - (out+j+0)[1] = (uint)(i+1); - (out+j+0)[2] = (uint)(i+3); - (out+j+3)[0] = (uint)(i+1); - (out+j+3)[1] = (uint)(i+2); - (out+j+3)[2] = (uint)(i+3); - } -} -static void generate_quadstrip_uint_first2first( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)(i+2); - (out+j+0)[1] = (uint)(i+0); - (out+j+0)[2] = (uint)(i+3); - (out+j+3)[0] = (uint)(i+0); - (out+j+3)[1] = (uint)(i+1); - (out+j+3)[2] = (uint)(i+3); - } -} -static void generate_polygon_uint_first2first( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)(0); - (out+j)[1] = (uint)(i+1); - (out+j)[2] = (uint)(i+2); - } -} -static void generate_points_uint_first2last( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (uint)(i); - } -} -static void generate_lines_uint_first2last( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (uint)(i+1); - (out+i)[1] = (uint)(i); - } -} -static void generate_linestrip_uint_first2last( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (uint)(i+1); - (out+j)[1] = (uint)(i); - } -} -static void generate_lineloop_uint_first2last( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (uint)(i+1); - (out+j)[1] = (uint)(i); - } - (out+j)[0] = (uint)(0); - (out+j)[1] = (uint)(i); -} -static void generate_tris_uint_first2last( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (uint)(i+1); - (out+i)[1] = (uint)(i+2); - (out+i)[2] = (uint)(i); - } -} -static void generate_tristrip_uint_first2last( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)(i+1+(i&1)); - (out+j)[1] = (uint)(i+2-(i&1)); - (out+j)[2] = (uint)(i); - } -} -static void generate_trifan_uint_first2last( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)(i+1); - (out+j)[1] = (uint)(i+2); - (out+j)[2] = (uint)(0); - } -} -static void generate_quads_uint_first2last( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (uint)(i+1); - (out+j+0)[1] = (uint)(i+3); - (out+j+0)[2] = (uint)(i+0); - (out+j+3)[0] = (uint)(i+2); - (out+j+3)[1] = (uint)(i+3); - (out+j+3)[2] = (uint)(i+1); - } -} -static void generate_quadstrip_uint_first2last( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)(i+0); - (out+j+0)[1] = (uint)(i+3); - (out+j+0)[2] = (uint)(i+2); - (out+j+3)[0] = (uint)(i+1); - (out+j+3)[1] = (uint)(i+3); - (out+j+3)[2] = (uint)(i+0); - } -} -static void generate_polygon_uint_first2last( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)(i+1); - (out+j)[1] = (uint)(i+2); - (out+j)[2] = (uint)(0); - } -} -static void generate_points_uint_last2first( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (uint)(i); - } -} -static void generate_lines_uint_last2first( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (uint)(i+1); - (out+i)[1] = (uint)(i); - } -} -static void generate_linestrip_uint_last2first( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (uint)(i+1); - (out+j)[1] = (uint)(i); - } -} -static void generate_lineloop_uint_last2first( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (uint)(i+1); - (out+j)[1] = (uint)(i); - } - (out+j)[0] = (uint)(0); - (out+j)[1] = (uint)(i); -} -static void generate_tris_uint_last2first( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (uint)(i+2); - (out+i)[1] = (uint)(i); - (out+i)[2] = (uint)(i+1); - } -} -static void generate_tristrip_uint_last2first( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)(i+2); - (out+j)[1] = (uint)(i+(i&1)); - (out+j)[2] = (uint)(i+1-(i&1)); - } -} -static void generate_trifan_uint_last2first( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)(i+2); - (out+j)[1] = (uint)(0); - (out+j)[2] = (uint)(i+1); - } -} -static void generate_quads_uint_last2first( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (uint)(i+3); - (out+j+0)[1] = (uint)(i+0); - (out+j+0)[2] = (uint)(i+1); - (out+j+3)[0] = (uint)(i+3); - (out+j+3)[1] = (uint)(i+1); - (out+j+3)[2] = (uint)(i+2); - } -} -static void generate_quadstrip_uint_last2first( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)(i+3); - (out+j+0)[1] = (uint)(i+2); - (out+j+0)[2] = (uint)(i+0); - (out+j+3)[0] = (uint)(i+3); - (out+j+3)[1] = (uint)(i+0); - (out+j+3)[2] = (uint)(i+1); - } -} -static void generate_polygon_uint_last2first( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)(0); - (out+j)[1] = (uint)(i+1); - (out+j)[2] = (uint)(i+2); - } -} -static void generate_points_uint_last2last( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (uint)(i); - } -} -static void generate_lines_uint_last2last( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (uint)(i); - (out+i)[1] = (uint)(i+1); - } -} -static void generate_linestrip_uint_last2last( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (uint)(i); - (out+j)[1] = (uint)(i+1); - } -} -static void generate_lineloop_uint_last2last( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (uint)(i); - (out+j)[1] = (uint)(i+1); - } - (out+j)[0] = (uint)(i); - (out+j)[1] = (uint)(0); -} -static void generate_tris_uint_last2last( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (uint)(i); - (out+i)[1] = (uint)(i+1); - (out+i)[2] = (uint)(i+2); - } -} -static void generate_tristrip_uint_last2last( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)(i+(i&1)); - (out+j)[1] = (uint)(i+1-(i&1)); - (out+j)[2] = (uint)(i+2); - } -} -static void generate_trifan_uint_last2last( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)(0); - (out+j)[1] = (uint)(i+1); - (out+j)[2] = (uint)(i+2); - } -} -static void generate_quads_uint_last2last( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (uint)(i+0); - (out+j+0)[1] = (uint)(i+1); - (out+j+0)[2] = (uint)(i+3); - (out+j+3)[0] = (uint)(i+1); - (out+j+3)[1] = (uint)(i+2); - (out+j+3)[2] = (uint)(i+3); - } -} -static void generate_quadstrip_uint_last2last( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)(i+2); - (out+j+0)[1] = (uint)(i+0); - (out+j+0)[2] = (uint)(i+3); - (out+j+3)[0] = (uint)(i+0); - (out+j+3)[1] = (uint)(i+1); - (out+j+3)[2] = (uint)(i+3); - } -} -static void generate_polygon_uint_last2last( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)(i+1); - (out+j)[1] = (uint)(i+2); - (out+j)[2] = (uint)(0); - } -} -static void translate_points_ubyte2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (ushort)in[i]; - } -} -static void translate_lines_ubyte2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (ushort)in[i]; - (out+i)[1] = (ushort)in[i+1]; - } -} -static void translate_linestrip_ubyte2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1]; - } -} -static void translate_lineloop_ubyte2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1]; - } - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[0]; -} -static void translate_tris_ubyte2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (ushort)in[i]; - (out+i)[1] = (ushort)in[i+1]; - (out+i)[2] = (ushort)in[i+2]; - } -} -static void translate_tristrip_ubyte2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1+(i&1)]; - (out+j)[2] = (ushort)in[i+2-(i&1)]; - } -} -static void translate_trifan_ubyte2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i+1]; - (out+j)[2] = (ushort)in[i+2]; - } -} -static void translate_quads_ubyte2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (ushort)in[i+0]; - (out+j+0)[1] = (ushort)in[i+1]; - (out+j+0)[2] = (ushort)in[i+3]; - (out+j+3)[0] = (ushort)in[i+1]; - (out+j+3)[1] = (ushort)in[i+2]; - (out+j+3)[2] = (ushort)in[i+3]; - } -} -static void translate_quadstrip_ubyte2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+2]; - (out+j+0)[1] = (ushort)in[i+0]; - (out+j+0)[2] = (ushort)in[i+3]; - (out+j+3)[0] = (ushort)in[i+0]; - (out+j+3)[1] = (ushort)in[i+1]; - (out+j+3)[2] = (ushort)in[i+3]; - } -} -static void translate_polygon_ubyte2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i+1]; - (out+j)[2] = (ushort)in[i+2]; - } -} -static void translate_points_ubyte2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (ushort)in[i]; - } -} -static void translate_lines_ubyte2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (ushort)in[i+1]; - (out+i)[1] = (ushort)in[i]; - } -} -static void translate_linestrip_ubyte2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i]; - } -} -static void translate_lineloop_ubyte2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i]; - } - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i]; -} -static void translate_tris_ubyte2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (ushort)in[i+1]; - (out+i)[1] = (ushort)in[i+2]; - (out+i)[2] = (ushort)in[i]; - } -} -static void translate_tristrip_ubyte2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+1+(i&1)]; - (out+j)[1] = (ushort)in[i+2-(i&1)]; - (out+j)[2] = (ushort)in[i]; - } -} -static void translate_trifan_ubyte2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i+2]; - (out+j)[2] = (ushort)in[0]; - } -} -static void translate_quads_ubyte2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (ushort)in[i+1]; - (out+j+0)[1] = (ushort)in[i+3]; - (out+j+0)[2] = (ushort)in[i+0]; - (out+j+3)[0] = (ushort)in[i+2]; - (out+j+3)[1] = (ushort)in[i+3]; - (out+j+3)[2] = (ushort)in[i+1]; - } -} -static void translate_quadstrip_ubyte2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+0]; - (out+j+0)[1] = (ushort)in[i+3]; - (out+j+0)[2] = (ushort)in[i+2]; - (out+j+3)[0] = (ushort)in[i+1]; - (out+j+3)[1] = (ushort)in[i+3]; - (out+j+3)[2] = (ushort)in[i+0]; - } -} -static void translate_polygon_ubyte2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i+2]; - (out+j)[2] = (ushort)in[0]; - } -} -static void translate_points_ubyte2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (ushort)in[i]; - } -} -static void translate_lines_ubyte2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (ushort)in[i+1]; - (out+i)[1] = (ushort)in[i]; - } -} -static void translate_linestrip_ubyte2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i]; - } -} -static void translate_lineloop_ubyte2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i]; - } - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i]; -} -static void translate_tris_ubyte2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (ushort)in[i+2]; - (out+i)[1] = (ushort)in[i]; - (out+i)[2] = (ushort)in[i+1]; - } -} -static void translate_tristrip_ubyte2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+2]; - (out+j)[1] = (ushort)in[i+(i&1)]; - (out+j)[2] = (ushort)in[i+1-(i&1)]; - } -} -static void translate_trifan_ubyte2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+2]; - (out+j)[1] = (ushort)in[0]; - (out+j)[2] = (ushort)in[i+1]; - } -} -static void translate_quads_ubyte2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (ushort)in[i+3]; - (out+j+0)[1] = (ushort)in[i+0]; - (out+j+0)[2] = (ushort)in[i+1]; - (out+j+3)[0] = (ushort)in[i+3]; - (out+j+3)[1] = (ushort)in[i+1]; - (out+j+3)[2] = (ushort)in[i+2]; - } -} -static void translate_quadstrip_ubyte2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+3]; - (out+j+0)[1] = (ushort)in[i+2]; - (out+j+0)[2] = (ushort)in[i+0]; - (out+j+3)[0] = (ushort)in[i+3]; - (out+j+3)[1] = (ushort)in[i+0]; - (out+j+3)[2] = (ushort)in[i+1]; - } -} -static void translate_polygon_ubyte2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i+1]; - (out+j)[2] = (ushort)in[i+2]; - } -} -static void translate_points_ubyte2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (ushort)in[i]; - } -} -static void translate_lines_ubyte2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (ushort)in[i]; - (out+i)[1] = (ushort)in[i+1]; - } -} -static void translate_linestrip_ubyte2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1]; - } -} -static void translate_lineloop_ubyte2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1]; - } - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[0]; -} -static void translate_tris_ubyte2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (ushort)in[i]; - (out+i)[1] = (ushort)in[i+1]; - (out+i)[2] = (ushort)in[i+2]; - } -} -static void translate_tristrip_ubyte2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+(i&1)]; - (out+j)[1] = (ushort)in[i+1-(i&1)]; - (out+j)[2] = (ushort)in[i+2]; - } -} -static void translate_trifan_ubyte2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i+1]; - (out+j)[2] = (ushort)in[i+2]; - } -} -static void translate_quads_ubyte2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (ushort)in[i+0]; - (out+j+0)[1] = (ushort)in[i+1]; - (out+j+0)[2] = (ushort)in[i+3]; - (out+j+3)[0] = (ushort)in[i+1]; - (out+j+3)[1] = (ushort)in[i+2]; - (out+j+3)[2] = (ushort)in[i+3]; - } -} -static void translate_quadstrip_ubyte2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+2]; - (out+j+0)[1] = (ushort)in[i+0]; - (out+j+0)[2] = (ushort)in[i+3]; - (out+j+3)[0] = (ushort)in[i+0]; - (out+j+3)[1] = (ushort)in[i+1]; - (out+j+3)[2] = (ushort)in[i+3]; - } -} -static void translate_polygon_ubyte2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i+2]; - (out+j)[2] = (ushort)in[0]; - } -} -static void translate_points_ubyte2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (uint)in[i]; - } -} -static void translate_lines_ubyte2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (uint)in[i]; - (out+i)[1] = (uint)in[i+1]; - } -} -static void translate_linestrip_ubyte2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1]; - } -} -static void translate_lineloop_ubyte2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1]; - } - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[0]; -} -static void translate_tris_ubyte2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (uint)in[i]; - (out+i)[1] = (uint)in[i+1]; - (out+i)[2] = (uint)in[i+2]; - } -} -static void translate_tristrip_ubyte2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1+(i&1)]; - (out+j)[2] = (uint)in[i+2-(i&1)]; - } -} -static void translate_trifan_ubyte2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i+1]; - (out+j)[2] = (uint)in[i+2]; - } -} -static void translate_quads_ubyte2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (uint)in[i+0]; - (out+j+0)[1] = (uint)in[i+1]; - (out+j+0)[2] = (uint)in[i+3]; - (out+j+3)[0] = (uint)in[i+1]; - (out+j+3)[1] = (uint)in[i+2]; - (out+j+3)[2] = (uint)in[i+3]; - } -} -static void translate_quadstrip_ubyte2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+2]; - (out+j+0)[1] = (uint)in[i+0]; - (out+j+0)[2] = (uint)in[i+3]; - (out+j+3)[0] = (uint)in[i+0]; - (out+j+3)[1] = (uint)in[i+1]; - (out+j+3)[2] = (uint)in[i+3]; - } -} -static void translate_polygon_ubyte2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i+1]; - (out+j)[2] = (uint)in[i+2]; - } -} -static void translate_points_ubyte2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (uint)in[i]; - } -} -static void translate_lines_ubyte2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (uint)in[i+1]; - (out+i)[1] = (uint)in[i]; - } -} -static void translate_linestrip_ubyte2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i]; - } -} -static void translate_lineloop_ubyte2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i]; - } - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i]; -} -static void translate_tris_ubyte2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (uint)in[i+1]; - (out+i)[1] = (uint)in[i+2]; - (out+i)[2] = (uint)in[i]; - } -} -static void translate_tristrip_ubyte2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+1+(i&1)]; - (out+j)[1] = (uint)in[i+2-(i&1)]; - (out+j)[2] = (uint)in[i]; - } -} -static void translate_trifan_ubyte2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i+2]; - (out+j)[2] = (uint)in[0]; - } -} -static void translate_quads_ubyte2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (uint)in[i+1]; - (out+j+0)[1] = (uint)in[i+3]; - (out+j+0)[2] = (uint)in[i+0]; - (out+j+3)[0] = (uint)in[i+2]; - (out+j+3)[1] = (uint)in[i+3]; - (out+j+3)[2] = (uint)in[i+1]; - } -} -static void translate_quadstrip_ubyte2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+0]; - (out+j+0)[1] = (uint)in[i+3]; - (out+j+0)[2] = (uint)in[i+2]; - (out+j+3)[0] = (uint)in[i+1]; - (out+j+3)[1] = (uint)in[i+3]; - (out+j+3)[2] = (uint)in[i+0]; - } -} -static void translate_polygon_ubyte2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i+2]; - (out+j)[2] = (uint)in[0]; - } -} -static void translate_points_ubyte2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (uint)in[i]; - } -} -static void translate_lines_ubyte2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (uint)in[i+1]; - (out+i)[1] = (uint)in[i]; - } -} -static void translate_linestrip_ubyte2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i]; - } -} -static void translate_lineloop_ubyte2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i]; - } - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i]; -} -static void translate_tris_ubyte2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (uint)in[i+2]; - (out+i)[1] = (uint)in[i]; - (out+i)[2] = (uint)in[i+1]; - } -} -static void translate_tristrip_ubyte2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+2]; - (out+j)[1] = (uint)in[i+(i&1)]; - (out+j)[2] = (uint)in[i+1-(i&1)]; - } -} -static void translate_trifan_ubyte2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+2]; - (out+j)[1] = (uint)in[0]; - (out+j)[2] = (uint)in[i+1]; - } -} -static void translate_quads_ubyte2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (uint)in[i+3]; - (out+j+0)[1] = (uint)in[i+0]; - (out+j+0)[2] = (uint)in[i+1]; - (out+j+3)[0] = (uint)in[i+3]; - (out+j+3)[1] = (uint)in[i+1]; - (out+j+3)[2] = (uint)in[i+2]; - } -} -static void translate_quadstrip_ubyte2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+3]; - (out+j+0)[1] = (uint)in[i+2]; - (out+j+0)[2] = (uint)in[i+0]; - (out+j+3)[0] = (uint)in[i+3]; - (out+j+3)[1] = (uint)in[i+0]; - (out+j+3)[2] = (uint)in[i+1]; - } -} -static void translate_polygon_ubyte2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i+1]; - (out+j)[2] = (uint)in[i+2]; - } -} -static void translate_points_ubyte2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (uint)in[i]; - } -} -static void translate_lines_ubyte2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (uint)in[i]; - (out+i)[1] = (uint)in[i+1]; - } -} -static void translate_linestrip_ubyte2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1]; - } -} -static void translate_lineloop_ubyte2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1]; - } - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[0]; -} -static void translate_tris_ubyte2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (uint)in[i]; - (out+i)[1] = (uint)in[i+1]; - (out+i)[2] = (uint)in[i+2]; - } -} -static void translate_tristrip_ubyte2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+(i&1)]; - (out+j)[1] = (uint)in[i+1-(i&1)]; - (out+j)[2] = (uint)in[i+2]; - } -} -static void translate_trifan_ubyte2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i+1]; - (out+j)[2] = (uint)in[i+2]; - } -} -static void translate_quads_ubyte2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (uint)in[i+0]; - (out+j+0)[1] = (uint)in[i+1]; - (out+j+0)[2] = (uint)in[i+3]; - (out+j+3)[0] = (uint)in[i+1]; - (out+j+3)[1] = (uint)in[i+2]; - (out+j+3)[2] = (uint)in[i+3]; - } -} -static void translate_quadstrip_ubyte2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+2]; - (out+j+0)[1] = (uint)in[i+0]; - (out+j+0)[2] = (uint)in[i+3]; - (out+j+3)[0] = (uint)in[i+0]; - (out+j+3)[1] = (uint)in[i+1]; - (out+j+3)[2] = (uint)in[i+3]; - } -} -static void translate_polygon_ubyte2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i+2]; - (out+j)[2] = (uint)in[0]; - } -} -static void translate_points_ushort2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (ushort)in[i]; - } -} -static void translate_lines_ushort2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (ushort)in[i]; - (out+i)[1] = (ushort)in[i+1]; - } -} -static void translate_linestrip_ushort2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1]; - } -} -static void translate_lineloop_ushort2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1]; - } - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[0]; -} -static void translate_tris_ushort2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (ushort)in[i]; - (out+i)[1] = (ushort)in[i+1]; - (out+i)[2] = (ushort)in[i+2]; - } -} -static void translate_tristrip_ushort2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1+(i&1)]; - (out+j)[2] = (ushort)in[i+2-(i&1)]; - } -} -static void translate_trifan_ushort2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i+1]; - (out+j)[2] = (ushort)in[i+2]; - } -} -static void translate_quads_ushort2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (ushort)in[i+0]; - (out+j+0)[1] = (ushort)in[i+1]; - (out+j+0)[2] = (ushort)in[i+3]; - (out+j+3)[0] = (ushort)in[i+1]; - (out+j+3)[1] = (ushort)in[i+2]; - (out+j+3)[2] = (ushort)in[i+3]; - } -} -static void translate_quadstrip_ushort2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+2]; - (out+j+0)[1] = (ushort)in[i+0]; - (out+j+0)[2] = (ushort)in[i+3]; - (out+j+3)[0] = (ushort)in[i+0]; - (out+j+3)[1] = (ushort)in[i+1]; - (out+j+3)[2] = (ushort)in[i+3]; - } -} -static void translate_polygon_ushort2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i+1]; - (out+j)[2] = (ushort)in[i+2]; - } -} -static void translate_points_ushort2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (ushort)in[i]; - } -} -static void translate_lines_ushort2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (ushort)in[i+1]; - (out+i)[1] = (ushort)in[i]; - } -} -static void translate_linestrip_ushort2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i]; - } -} -static void translate_lineloop_ushort2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i]; - } - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i]; -} -static void translate_tris_ushort2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (ushort)in[i+1]; - (out+i)[1] = (ushort)in[i+2]; - (out+i)[2] = (ushort)in[i]; - } -} -static void translate_tristrip_ushort2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+1+(i&1)]; - (out+j)[1] = (ushort)in[i+2-(i&1)]; - (out+j)[2] = (ushort)in[i]; - } -} -static void translate_trifan_ushort2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i+2]; - (out+j)[2] = (ushort)in[0]; - } -} -static void translate_quads_ushort2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (ushort)in[i+1]; - (out+j+0)[1] = (ushort)in[i+3]; - (out+j+0)[2] = (ushort)in[i+0]; - (out+j+3)[0] = (ushort)in[i+2]; - (out+j+3)[1] = (ushort)in[i+3]; - (out+j+3)[2] = (ushort)in[i+1]; - } -} -static void translate_quadstrip_ushort2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+0]; - (out+j+0)[1] = (ushort)in[i+3]; - (out+j+0)[2] = (ushort)in[i+2]; - (out+j+3)[0] = (ushort)in[i+1]; - (out+j+3)[1] = (ushort)in[i+3]; - (out+j+3)[2] = (ushort)in[i+0]; - } -} -static void translate_polygon_ushort2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i+2]; - (out+j)[2] = (ushort)in[0]; - } -} -static void translate_points_ushort2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (ushort)in[i]; - } -} -static void translate_lines_ushort2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (ushort)in[i+1]; - (out+i)[1] = (ushort)in[i]; - } -} -static void translate_linestrip_ushort2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i]; - } -} -static void translate_lineloop_ushort2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i]; - } - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i]; -} -static void translate_tris_ushort2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (ushort)in[i+2]; - (out+i)[1] = (ushort)in[i]; - (out+i)[2] = (ushort)in[i+1]; - } -} -static void translate_tristrip_ushort2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+2]; - (out+j)[1] = (ushort)in[i+(i&1)]; - (out+j)[2] = (ushort)in[i+1-(i&1)]; - } -} -static void translate_trifan_ushort2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+2]; - (out+j)[1] = (ushort)in[0]; - (out+j)[2] = (ushort)in[i+1]; - } -} -static void translate_quads_ushort2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (ushort)in[i+3]; - (out+j+0)[1] = (ushort)in[i+0]; - (out+j+0)[2] = (ushort)in[i+1]; - (out+j+3)[0] = (ushort)in[i+3]; - (out+j+3)[1] = (ushort)in[i+1]; - (out+j+3)[2] = (ushort)in[i+2]; - } -} -static void translate_quadstrip_ushort2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+3]; - (out+j+0)[1] = (ushort)in[i+2]; - (out+j+0)[2] = (ushort)in[i+0]; - (out+j+3)[0] = (ushort)in[i+3]; - (out+j+3)[1] = (ushort)in[i+0]; - (out+j+3)[2] = (ushort)in[i+1]; - } -} -static void translate_polygon_ushort2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i+1]; - (out+j)[2] = (ushort)in[i+2]; - } -} -static void translate_points_ushort2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (ushort)in[i]; - } -} -static void translate_lines_ushort2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (ushort)in[i]; - (out+i)[1] = (ushort)in[i+1]; - } -} -static void translate_linestrip_ushort2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1]; - } -} -static void translate_lineloop_ushort2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1]; - } - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[0]; -} -static void translate_tris_ushort2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (ushort)in[i]; - (out+i)[1] = (ushort)in[i+1]; - (out+i)[2] = (ushort)in[i+2]; - } -} -static void translate_tristrip_ushort2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+(i&1)]; - (out+j)[1] = (ushort)in[i+1-(i&1)]; - (out+j)[2] = (ushort)in[i+2]; - } -} -static void translate_trifan_ushort2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i+1]; - (out+j)[2] = (ushort)in[i+2]; - } -} -static void translate_quads_ushort2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (ushort)in[i+0]; - (out+j+0)[1] = (ushort)in[i+1]; - (out+j+0)[2] = (ushort)in[i+3]; - (out+j+3)[0] = (ushort)in[i+1]; - (out+j+3)[1] = (ushort)in[i+2]; - (out+j+3)[2] = (ushort)in[i+3]; - } -} -static void translate_quadstrip_ushort2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+2]; - (out+j+0)[1] = (ushort)in[i+0]; - (out+j+0)[2] = (ushort)in[i+3]; - (out+j+3)[0] = (ushort)in[i+0]; - (out+j+3)[1] = (ushort)in[i+1]; - (out+j+3)[2] = (ushort)in[i+3]; - } -} -static void translate_polygon_ushort2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i+2]; - (out+j)[2] = (ushort)in[0]; - } -} -static void translate_points_ushort2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (uint)in[i]; - } -} -static void translate_lines_ushort2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (uint)in[i]; - (out+i)[1] = (uint)in[i+1]; - } -} -static void translate_linestrip_ushort2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1]; - } -} -static void translate_lineloop_ushort2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1]; - } - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[0]; -} -static void translate_tris_ushort2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (uint)in[i]; - (out+i)[1] = (uint)in[i+1]; - (out+i)[2] = (uint)in[i+2]; - } -} -static void translate_tristrip_ushort2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1+(i&1)]; - (out+j)[2] = (uint)in[i+2-(i&1)]; - } -} -static void translate_trifan_ushort2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i+1]; - (out+j)[2] = (uint)in[i+2]; - } -} -static void translate_quads_ushort2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (uint)in[i+0]; - (out+j+0)[1] = (uint)in[i+1]; - (out+j+0)[2] = (uint)in[i+3]; - (out+j+3)[0] = (uint)in[i+1]; - (out+j+3)[1] = (uint)in[i+2]; - (out+j+3)[2] = (uint)in[i+3]; - } -} -static void translate_quadstrip_ushort2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+2]; - (out+j+0)[1] = (uint)in[i+0]; - (out+j+0)[2] = (uint)in[i+3]; - (out+j+3)[0] = (uint)in[i+0]; - (out+j+3)[1] = (uint)in[i+1]; - (out+j+3)[2] = (uint)in[i+3]; - } -} -static void translate_polygon_ushort2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i+1]; - (out+j)[2] = (uint)in[i+2]; - } -} -static void translate_points_ushort2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (uint)in[i]; - } -} -static void translate_lines_ushort2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (uint)in[i+1]; - (out+i)[1] = (uint)in[i]; - } -} -static void translate_linestrip_ushort2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i]; - } -} -static void translate_lineloop_ushort2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i]; - } - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i]; -} -static void translate_tris_ushort2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (uint)in[i+1]; - (out+i)[1] = (uint)in[i+2]; - (out+i)[2] = (uint)in[i]; - } -} -static void translate_tristrip_ushort2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+1+(i&1)]; - (out+j)[1] = (uint)in[i+2-(i&1)]; - (out+j)[2] = (uint)in[i]; - } -} -static void translate_trifan_ushort2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i+2]; - (out+j)[2] = (uint)in[0]; - } -} -static void translate_quads_ushort2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (uint)in[i+1]; - (out+j+0)[1] = (uint)in[i+3]; - (out+j+0)[2] = (uint)in[i+0]; - (out+j+3)[0] = (uint)in[i+2]; - (out+j+3)[1] = (uint)in[i+3]; - (out+j+3)[2] = (uint)in[i+1]; - } -} -static void translate_quadstrip_ushort2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+0]; - (out+j+0)[1] = (uint)in[i+3]; - (out+j+0)[2] = (uint)in[i+2]; - (out+j+3)[0] = (uint)in[i+1]; - (out+j+3)[1] = (uint)in[i+3]; - (out+j+3)[2] = (uint)in[i+0]; - } -} -static void translate_polygon_ushort2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i+2]; - (out+j)[2] = (uint)in[0]; - } -} -static void translate_points_ushort2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (uint)in[i]; - } -} -static void translate_lines_ushort2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (uint)in[i+1]; - (out+i)[1] = (uint)in[i]; - } -} -static void translate_linestrip_ushort2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i]; - } -} -static void translate_lineloop_ushort2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i]; - } - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i]; -} -static void translate_tris_ushort2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (uint)in[i+2]; - (out+i)[1] = (uint)in[i]; - (out+i)[2] = (uint)in[i+1]; - } -} -static void translate_tristrip_ushort2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+2]; - (out+j)[1] = (uint)in[i+(i&1)]; - (out+j)[2] = (uint)in[i+1-(i&1)]; - } -} -static void translate_trifan_ushort2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+2]; - (out+j)[1] = (uint)in[0]; - (out+j)[2] = (uint)in[i+1]; - } -} -static void translate_quads_ushort2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (uint)in[i+3]; - (out+j+0)[1] = (uint)in[i+0]; - (out+j+0)[2] = (uint)in[i+1]; - (out+j+3)[0] = (uint)in[i+3]; - (out+j+3)[1] = (uint)in[i+1]; - (out+j+3)[2] = (uint)in[i+2]; - } -} -static void translate_quadstrip_ushort2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+3]; - (out+j+0)[1] = (uint)in[i+2]; - (out+j+0)[2] = (uint)in[i+0]; - (out+j+3)[0] = (uint)in[i+3]; - (out+j+3)[1] = (uint)in[i+0]; - (out+j+3)[2] = (uint)in[i+1]; - } -} -static void translate_polygon_ushort2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i+1]; - (out+j)[2] = (uint)in[i+2]; - } -} -static void translate_points_ushort2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (uint)in[i]; - } -} -static void translate_lines_ushort2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (uint)in[i]; - (out+i)[1] = (uint)in[i+1]; - } -} -static void translate_linestrip_ushort2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1]; - } -} -static void translate_lineloop_ushort2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1]; - } - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[0]; -} -static void translate_tris_ushort2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (uint)in[i]; - (out+i)[1] = (uint)in[i+1]; - (out+i)[2] = (uint)in[i+2]; - } -} -static void translate_tristrip_ushort2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+(i&1)]; - (out+j)[1] = (uint)in[i+1-(i&1)]; - (out+j)[2] = (uint)in[i+2]; - } -} -static void translate_trifan_ushort2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i+1]; - (out+j)[2] = (uint)in[i+2]; - } -} -static void translate_quads_ushort2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (uint)in[i+0]; - (out+j+0)[1] = (uint)in[i+1]; - (out+j+0)[2] = (uint)in[i+3]; - (out+j+3)[0] = (uint)in[i+1]; - (out+j+3)[1] = (uint)in[i+2]; - (out+j+3)[2] = (uint)in[i+3]; - } -} -static void translate_quadstrip_ushort2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+2]; - (out+j+0)[1] = (uint)in[i+0]; - (out+j+0)[2] = (uint)in[i+3]; - (out+j+3)[0] = (uint)in[i+0]; - (out+j+3)[1] = (uint)in[i+1]; - (out+j+3)[2] = (uint)in[i+3]; - } -} -static void translate_polygon_ushort2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i+2]; - (out+j)[2] = (uint)in[0]; - } -} -static void translate_points_uint2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (ushort)in[i]; - } -} -static void translate_lines_uint2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (ushort)in[i]; - (out+i)[1] = (ushort)in[i+1]; - } -} -static void translate_linestrip_uint2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1]; - } -} -static void translate_lineloop_uint2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1]; - } - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[0]; -} -static void translate_tris_uint2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (ushort)in[i]; - (out+i)[1] = (ushort)in[i+1]; - (out+i)[2] = (ushort)in[i+2]; - } -} -static void translate_tristrip_uint2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1+(i&1)]; - (out+j)[2] = (ushort)in[i+2-(i&1)]; - } -} -static void translate_trifan_uint2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i+1]; - (out+j)[2] = (ushort)in[i+2]; - } -} -static void translate_quads_uint2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (ushort)in[i+0]; - (out+j+0)[1] = (ushort)in[i+1]; - (out+j+0)[2] = (ushort)in[i+3]; - (out+j+3)[0] = (ushort)in[i+1]; - (out+j+3)[1] = (ushort)in[i+2]; - (out+j+3)[2] = (ushort)in[i+3]; - } -} -static void translate_quadstrip_uint2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+2]; - (out+j+0)[1] = (ushort)in[i+0]; - (out+j+0)[2] = (ushort)in[i+3]; - (out+j+3)[0] = (ushort)in[i+0]; - (out+j+3)[1] = (ushort)in[i+1]; - (out+j+3)[2] = (ushort)in[i+3]; - } -} -static void translate_polygon_uint2ushort_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i+1]; - (out+j)[2] = (ushort)in[i+2]; - } -} -static void translate_points_uint2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (ushort)in[i]; - } -} -static void translate_lines_uint2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (ushort)in[i+1]; - (out+i)[1] = (ushort)in[i]; - } -} -static void translate_linestrip_uint2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i]; - } -} -static void translate_lineloop_uint2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i]; - } - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i]; -} -static void translate_tris_uint2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (ushort)in[i+1]; - (out+i)[1] = (ushort)in[i+2]; - (out+i)[2] = (ushort)in[i]; - } -} -static void translate_tristrip_uint2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+1+(i&1)]; - (out+j)[1] = (ushort)in[i+2-(i&1)]; - (out+j)[2] = (ushort)in[i]; - } -} -static void translate_trifan_uint2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i+2]; - (out+j)[2] = (ushort)in[0]; - } -} -static void translate_quads_uint2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (ushort)in[i+1]; - (out+j+0)[1] = (ushort)in[i+3]; - (out+j+0)[2] = (ushort)in[i+0]; - (out+j+3)[0] = (ushort)in[i+2]; - (out+j+3)[1] = (ushort)in[i+3]; - (out+j+3)[2] = (ushort)in[i+1]; - } -} -static void translate_quadstrip_uint2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+0]; - (out+j+0)[1] = (ushort)in[i+3]; - (out+j+0)[2] = (ushort)in[i+2]; - (out+j+3)[0] = (ushort)in[i+1]; - (out+j+3)[1] = (ushort)in[i+3]; - (out+j+3)[2] = (ushort)in[i+0]; - } -} -static void translate_polygon_uint2ushort_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i+2]; - (out+j)[2] = (ushort)in[0]; - } -} -static void translate_points_uint2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (ushort)in[i]; - } -} -static void translate_lines_uint2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (ushort)in[i+1]; - (out+i)[1] = (ushort)in[i]; - } -} -static void translate_linestrip_uint2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i]; - } -} -static void translate_lineloop_uint2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i]; - } - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i]; -} -static void translate_tris_uint2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (ushort)in[i+2]; - (out+i)[1] = (ushort)in[i]; - (out+i)[2] = (ushort)in[i+1]; - } -} -static void translate_tristrip_uint2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+2]; - (out+j)[1] = (ushort)in[i+(i&1)]; - (out+j)[2] = (ushort)in[i+1-(i&1)]; - } -} -static void translate_trifan_uint2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+2]; - (out+j)[1] = (ushort)in[0]; - (out+j)[2] = (ushort)in[i+1]; - } -} -static void translate_quads_uint2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (ushort)in[i+3]; - (out+j+0)[1] = (ushort)in[i+0]; - (out+j+0)[2] = (ushort)in[i+1]; - (out+j+3)[0] = (ushort)in[i+3]; - (out+j+3)[1] = (ushort)in[i+1]; - (out+j+3)[2] = (ushort)in[i+2]; - } -} -static void translate_quadstrip_uint2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+3]; - (out+j+0)[1] = (ushort)in[i+2]; - (out+j+0)[2] = (ushort)in[i+0]; - (out+j+3)[0] = (ushort)in[i+3]; - (out+j+3)[1] = (ushort)in[i+0]; - (out+j+3)[2] = (ushort)in[i+1]; - } -} -static void translate_polygon_uint2ushort_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i+1]; - (out+j)[2] = (ushort)in[i+2]; - } -} -static void translate_points_uint2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (ushort)in[i]; - } -} -static void translate_lines_uint2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (ushort)in[i]; - (out+i)[1] = (ushort)in[i+1]; - } -} -static void translate_linestrip_uint2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1]; - } -} -static void translate_lineloop_uint2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1]; - } - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[0]; -} -static void translate_tris_uint2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (ushort)in[i]; - (out+i)[1] = (ushort)in[i+1]; - (out+i)[2] = (ushort)in[i+2]; - } -} -static void translate_tristrip_uint2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+(i&1)]; - (out+j)[1] = (ushort)in[i+1-(i&1)]; - (out+j)[2] = (ushort)in[i+2]; - } -} -static void translate_trifan_uint2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i+1]; - (out+j)[2] = (ushort)in[i+2]; - } -} -static void translate_quads_uint2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (ushort)in[i+0]; - (out+j+0)[1] = (ushort)in[i+1]; - (out+j+0)[2] = (ushort)in[i+3]; - (out+j+3)[0] = (ushort)in[i+1]; - (out+j+3)[1] = (ushort)in[i+2]; - (out+j+3)[2] = (ushort)in[i+3]; - } -} -static void translate_quadstrip_uint2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (ushort)in[i+2]; - (out+j+0)[1] = (ushort)in[i+0]; - (out+j+0)[2] = (ushort)in[i+3]; - (out+j+3)[0] = (ushort)in[i+0]; - (out+j+3)[1] = (ushort)in[i+1]; - (out+j+3)[2] = (ushort)in[i+3]; - } -} -static void translate_polygon_uint2ushort_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (ushort)in[i+1]; - (out+j)[1] = (ushort)in[i+2]; - (out+j)[2] = (ushort)in[0]; - } -} -static void translate_points_uint2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (uint)in[i]; - } -} -static void translate_lines_uint2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (uint)in[i]; - (out+i)[1] = (uint)in[i+1]; - } -} -static void translate_linestrip_uint2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1]; - } -} -static void translate_lineloop_uint2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1]; - } - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[0]; -} -static void translate_tris_uint2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (uint)in[i]; - (out+i)[1] = (uint)in[i+1]; - (out+i)[2] = (uint)in[i+2]; - } -} -static void translate_tristrip_uint2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1+(i&1)]; - (out+j)[2] = (uint)in[i+2-(i&1)]; - } -} -static void translate_trifan_uint2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i+1]; - (out+j)[2] = (uint)in[i+2]; - } -} -static void translate_quads_uint2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (uint)in[i+0]; - (out+j+0)[1] = (uint)in[i+1]; - (out+j+0)[2] = (uint)in[i+3]; - (out+j+3)[0] = (uint)in[i+1]; - (out+j+3)[1] = (uint)in[i+2]; - (out+j+3)[2] = (uint)in[i+3]; - } -} -static void translate_quadstrip_uint2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+2]; - (out+j+0)[1] = (uint)in[i+0]; - (out+j+0)[2] = (uint)in[i+3]; - (out+j+3)[0] = (uint)in[i+0]; - (out+j+3)[1] = (uint)in[i+1]; - (out+j+3)[2] = (uint)in[i+3]; - } -} -static void translate_polygon_uint2uint_first2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i+1]; - (out+j)[2] = (uint)in[i+2]; - } -} -static void translate_points_uint2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (uint)in[i]; - } -} -static void translate_lines_uint2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (uint)in[i+1]; - (out+i)[1] = (uint)in[i]; - } -} -static void translate_linestrip_uint2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i]; - } -} -static void translate_lineloop_uint2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i]; - } - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i]; -} -static void translate_tris_uint2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (uint)in[i+1]; - (out+i)[1] = (uint)in[i+2]; - (out+i)[2] = (uint)in[i]; - } -} -static void translate_tristrip_uint2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+1+(i&1)]; - (out+j)[1] = (uint)in[i+2-(i&1)]; - (out+j)[2] = (uint)in[i]; - } -} -static void translate_trifan_uint2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i+2]; - (out+j)[2] = (uint)in[0]; - } -} -static void translate_quads_uint2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (uint)in[i+1]; - (out+j+0)[1] = (uint)in[i+3]; - (out+j+0)[2] = (uint)in[i+0]; - (out+j+3)[0] = (uint)in[i+2]; - (out+j+3)[1] = (uint)in[i+3]; - (out+j+3)[2] = (uint)in[i+1]; - } -} -static void translate_quadstrip_uint2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+0]; - (out+j+0)[1] = (uint)in[i+3]; - (out+j+0)[2] = (uint)in[i+2]; - (out+j+3)[0] = (uint)in[i+1]; - (out+j+3)[1] = (uint)in[i+3]; - (out+j+3)[2] = (uint)in[i+0]; - } -} -static void translate_polygon_uint2uint_first2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i+2]; - (out+j)[2] = (uint)in[0]; - } -} -static void translate_points_uint2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (uint)in[i]; - } -} -static void translate_lines_uint2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (uint)in[i+1]; - (out+i)[1] = (uint)in[i]; - } -} -static void translate_linestrip_uint2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i]; - } -} -static void translate_lineloop_uint2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i]; - } - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i]; -} -static void translate_tris_uint2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (uint)in[i+2]; - (out+i)[1] = (uint)in[i]; - (out+i)[2] = (uint)in[i+1]; - } -} -static void translate_tristrip_uint2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+2]; - (out+j)[1] = (uint)in[i+(i&1)]; - (out+j)[2] = (uint)in[i+1-(i&1)]; - } -} -static void translate_trifan_uint2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+2]; - (out+j)[1] = (uint)in[0]; - (out+j)[2] = (uint)in[i+1]; - } -} -static void translate_quads_uint2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (uint)in[i+3]; - (out+j+0)[1] = (uint)in[i+0]; - (out+j+0)[2] = (uint)in[i+1]; - (out+j+3)[0] = (uint)in[i+3]; - (out+j+3)[1] = (uint)in[i+1]; - (out+j+3)[2] = (uint)in[i+2]; - } -} -static void translate_quadstrip_uint2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+3]; - (out+j+0)[1] = (uint)in[i+2]; - (out+j+0)[2] = (uint)in[i+0]; - (out+j+3)[0] = (uint)in[i+3]; - (out+j+3)[1] = (uint)in[i+0]; - (out+j+3)[2] = (uint)in[i+1]; - } -} -static void translate_polygon_uint2uint_last2first( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i+1]; - (out+j)[2] = (uint)in[i+2]; - } -} -static void translate_points_uint2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i++) { - (out+i)[0] = (uint)in[i]; - } -} -static void translate_lines_uint2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=2) { - (out+i)[0] = (uint)in[i]; - (out+i)[1] = (uint)in[i+1]; - } -} -static void translate_linestrip_uint2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1]; - } -} -static void translate_lineloop_uint2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr - 2; j+=2, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1]; - } - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[0]; -} -static void translate_tris_uint2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (i = 0; i < nr; i+=3) { - (out+i)[0] = (uint)in[i]; - (out+i)[1] = (uint)in[i+1]; - (out+i)[2] = (uint)in[i+2]; - } -} -static void translate_tristrip_uint2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+(i&1)]; - (out+j)[1] = (uint)in[i+1-(i&1)]; - (out+j)[2] = (uint)in[i+2]; - } -} -static void translate_trifan_uint2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i+1]; - (out+j)[2] = (uint)in[i+2]; - } -} -static void translate_quads_uint2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=4) { - (out+j+0)[0] = (uint)in[i+0]; - (out+j+0)[1] = (uint)in[i+1]; - (out+j+0)[2] = (uint)in[i+3]; - (out+j+3)[0] = (uint)in[i+1]; - (out+j+3)[1] = (uint)in[i+2]; - (out+j+3)[2] = (uint)in[i+3]; - } -} -static void translate_quadstrip_uint2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=2) { - (out+j+0)[0] = (uint)in[i+2]; - (out+j+0)[1] = (uint)in[i+0]; - (out+j+0)[2] = (uint)in[i+3]; - (out+j+3)[0] = (uint)in[i+0]; - (out+j+3)[1] = (uint)in[i+1]; - (out+j+3)[2] = (uint)in[i+3]; - } -} -static void translate_polygon_uint2uint_last2last( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=3, i++) { - (out+j)[0] = (uint)in[i+1]; - (out+j)[1] = (uint)in[i+2]; - (out+j)[2] = (uint)in[0]; - } -} -void u_index_init( void ) -{ - static int firsttime = 1; - if (!firsttime) return; - firsttime = 0; -generate[OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_POINTS] = generate_points_ushort_first2first; -generate[OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINES] = generate_lines_ushort_first2first; -generate[OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINE_STRIP] = generate_linestrip_ushort_first2first; -generate[OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINE_LOOP] = generate_lineloop_ushort_first2first; -generate[OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLES] = generate_tris_ushort_first2first; -generate[OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLE_FAN] = generate_trifan_ushort_first2first; -generate[OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLE_STRIP] = generate_tristrip_ushort_first2first; -generate[OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_QUADS] = generate_quads_ushort_first2first; -generate[OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_QUAD_STRIP] = generate_quadstrip_ushort_first2first; -generate[OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_POLYGON] = generate_polygon_ushort_first2first; -generate[OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_POINTS] = generate_points_ushort_first2last; -generate[OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_LINES] = generate_lines_ushort_first2last; -generate[OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_LINE_STRIP] = generate_linestrip_ushort_first2last; -generate[OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_LINE_LOOP] = generate_lineloop_ushort_first2last; -generate[OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLES] = generate_tris_ushort_first2last; -generate[OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLE_FAN] = generate_trifan_ushort_first2last; -generate[OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLE_STRIP] = generate_tristrip_ushort_first2last; -generate[OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_QUADS] = generate_quads_ushort_first2last; -generate[OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_QUAD_STRIP] = generate_quadstrip_ushort_first2last; -generate[OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_POLYGON] = generate_polygon_ushort_first2last; -generate[OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_POINTS] = generate_points_ushort_last2first; -generate[OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_LINES] = generate_lines_ushort_last2first; -generate[OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_LINE_STRIP] = generate_linestrip_ushort_last2first; -generate[OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_LINE_LOOP] = generate_lineloop_ushort_last2first; -generate[OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLES] = generate_tris_ushort_last2first; -generate[OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLE_FAN] = generate_trifan_ushort_last2first; -generate[OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLE_STRIP] = generate_tristrip_ushort_last2first; -generate[OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_QUADS] = generate_quads_ushort_last2first; -generate[OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_QUAD_STRIP] = generate_quadstrip_ushort_last2first; -generate[OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_POLYGON] = generate_polygon_ushort_last2first; -generate[OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_POINTS] = generate_points_ushort_last2last; -generate[OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_LINES] = generate_lines_ushort_last2last; -generate[OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_LINE_STRIP] = generate_linestrip_ushort_last2last; -generate[OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_LINE_LOOP] = generate_lineloop_ushort_last2last; -generate[OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLES] = generate_tris_ushort_last2last; -generate[OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLE_FAN] = generate_trifan_ushort_last2last; -generate[OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLE_STRIP] = generate_tristrip_ushort_last2last; -generate[OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_QUADS] = generate_quads_ushort_last2last; -generate[OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_QUAD_STRIP] = generate_quadstrip_ushort_last2last; -generate[OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_POLYGON] = generate_polygon_ushort_last2last; -generate[OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_POINTS] = generate_points_uint_first2first; -generate[OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINES] = generate_lines_uint_first2first; -generate[OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINE_STRIP] = generate_linestrip_uint_first2first; -generate[OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINE_LOOP] = generate_lineloop_uint_first2first; -generate[OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLES] = generate_tris_uint_first2first; -generate[OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLE_FAN] = generate_trifan_uint_first2first; -generate[OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLE_STRIP] = generate_tristrip_uint_first2first; -generate[OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_QUADS] = generate_quads_uint_first2first; -generate[OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_QUAD_STRIP] = generate_quadstrip_uint_first2first; -generate[OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_POLYGON] = generate_polygon_uint_first2first; -generate[OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_POINTS] = generate_points_uint_first2last; -generate[OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_LINES] = generate_lines_uint_first2last; -generate[OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_LINE_STRIP] = generate_linestrip_uint_first2last; -generate[OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_LINE_LOOP] = generate_lineloop_uint_first2last; -generate[OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLES] = generate_tris_uint_first2last; -generate[OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLE_FAN] = generate_trifan_uint_first2last; -generate[OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLE_STRIP] = generate_tristrip_uint_first2last; -generate[OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_QUADS] = generate_quads_uint_first2last; -generate[OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_QUAD_STRIP] = generate_quadstrip_uint_first2last; -generate[OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_POLYGON] = generate_polygon_uint_first2last; -generate[OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_POINTS] = generate_points_uint_last2first; -generate[OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_LINES] = generate_lines_uint_last2first; -generate[OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_LINE_STRIP] = generate_linestrip_uint_last2first; -generate[OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_LINE_LOOP] = generate_lineloop_uint_last2first; -generate[OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLES] = generate_tris_uint_last2first; -generate[OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLE_FAN] = generate_trifan_uint_last2first; -generate[OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLE_STRIP] = generate_tristrip_uint_last2first; -generate[OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_QUADS] = generate_quads_uint_last2first; -generate[OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_QUAD_STRIP] = generate_quadstrip_uint_last2first; -generate[OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_POLYGON] = generate_polygon_uint_last2first; -generate[OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_POINTS] = generate_points_uint_last2last; -generate[OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_LINES] = generate_lines_uint_last2last; -generate[OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_LINE_STRIP] = generate_linestrip_uint_last2last; -generate[OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_LINE_LOOP] = generate_lineloop_uint_last2last; -generate[OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLES] = generate_tris_uint_last2last; -generate[OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLE_FAN] = generate_trifan_uint_last2last; -generate[OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLE_STRIP] = generate_tristrip_uint_last2last; -generate[OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_QUADS] = generate_quads_uint_last2last; -generate[OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_QUAD_STRIP] = generate_quadstrip_uint_last2last; -generate[OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_POLYGON] = generate_polygon_uint_last2last; -translate[IN_UBYTE][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_POINTS] = translate_points_ubyte2ushort_first2first; -translate[IN_UBYTE][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINES] = translate_lines_ubyte2ushort_first2first; -translate[IN_UBYTE][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_ubyte2ushort_first2first; -translate[IN_UBYTE][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_ubyte2ushort_first2first; -translate[IN_UBYTE][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLES] = translate_tris_ubyte2ushort_first2first; -translate[IN_UBYTE][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ubyte2ushort_first2first; -translate[IN_UBYTE][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ubyte2ushort_first2first; -translate[IN_UBYTE][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_QUADS] = translate_quads_ubyte2ushort_first2first; -translate[IN_UBYTE][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ubyte2ushort_first2first; -translate[IN_UBYTE][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_POLYGON] = translate_polygon_ubyte2ushort_first2first; -translate[IN_UBYTE][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_POINTS] = translate_points_ubyte2ushort_first2last; -translate[IN_UBYTE][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_LINES] = translate_lines_ubyte2ushort_first2last; -translate[IN_UBYTE][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_ubyte2ushort_first2last; -translate[IN_UBYTE][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_ubyte2ushort_first2last; -translate[IN_UBYTE][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLES] = translate_tris_ubyte2ushort_first2last; -translate[IN_UBYTE][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ubyte2ushort_first2last; -translate[IN_UBYTE][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ubyte2ushort_first2last; -translate[IN_UBYTE][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_QUADS] = translate_quads_ubyte2ushort_first2last; -translate[IN_UBYTE][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ubyte2ushort_first2last; -translate[IN_UBYTE][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_POLYGON] = translate_polygon_ubyte2ushort_first2last; -translate[IN_UBYTE][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_POINTS] = translate_points_ubyte2ushort_last2first; -translate[IN_UBYTE][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_LINES] = translate_lines_ubyte2ushort_last2first; -translate[IN_UBYTE][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_ubyte2ushort_last2first; -translate[IN_UBYTE][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_ubyte2ushort_last2first; -translate[IN_UBYTE][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLES] = translate_tris_ubyte2ushort_last2first; -translate[IN_UBYTE][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ubyte2ushort_last2first; -translate[IN_UBYTE][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ubyte2ushort_last2first; -translate[IN_UBYTE][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_QUADS] = translate_quads_ubyte2ushort_last2first; -translate[IN_UBYTE][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ubyte2ushort_last2first; -translate[IN_UBYTE][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_POLYGON] = translate_polygon_ubyte2ushort_last2first; -translate[IN_UBYTE][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_POINTS] = translate_points_ubyte2ushort_last2last; -translate[IN_UBYTE][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_LINES] = translate_lines_ubyte2ushort_last2last; -translate[IN_UBYTE][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_ubyte2ushort_last2last; -translate[IN_UBYTE][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_ubyte2ushort_last2last; -translate[IN_UBYTE][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLES] = translate_tris_ubyte2ushort_last2last; -translate[IN_UBYTE][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ubyte2ushort_last2last; -translate[IN_UBYTE][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ubyte2ushort_last2last; -translate[IN_UBYTE][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_QUADS] = translate_quads_ubyte2ushort_last2last; -translate[IN_UBYTE][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ubyte2ushort_last2last; -translate[IN_UBYTE][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_POLYGON] = translate_polygon_ubyte2ushort_last2last; -translate[IN_UBYTE][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_POINTS] = translate_points_ubyte2uint_first2first; -translate[IN_UBYTE][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINES] = translate_lines_ubyte2uint_first2first; -translate[IN_UBYTE][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_ubyte2uint_first2first; -translate[IN_UBYTE][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_ubyte2uint_first2first; -translate[IN_UBYTE][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLES] = translate_tris_ubyte2uint_first2first; -translate[IN_UBYTE][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ubyte2uint_first2first; -translate[IN_UBYTE][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ubyte2uint_first2first; -translate[IN_UBYTE][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_QUADS] = translate_quads_ubyte2uint_first2first; -translate[IN_UBYTE][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ubyte2uint_first2first; -translate[IN_UBYTE][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_POLYGON] = translate_polygon_ubyte2uint_first2first; -translate[IN_UBYTE][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_POINTS] = translate_points_ubyte2uint_first2last; -translate[IN_UBYTE][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_LINES] = translate_lines_ubyte2uint_first2last; -translate[IN_UBYTE][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_ubyte2uint_first2last; -translate[IN_UBYTE][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_ubyte2uint_first2last; -translate[IN_UBYTE][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLES] = translate_tris_ubyte2uint_first2last; -translate[IN_UBYTE][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ubyte2uint_first2last; -translate[IN_UBYTE][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ubyte2uint_first2last; -translate[IN_UBYTE][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_QUADS] = translate_quads_ubyte2uint_first2last; -translate[IN_UBYTE][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ubyte2uint_first2last; -translate[IN_UBYTE][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_POLYGON] = translate_polygon_ubyte2uint_first2last; -translate[IN_UBYTE][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_POINTS] = translate_points_ubyte2uint_last2first; -translate[IN_UBYTE][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_LINES] = translate_lines_ubyte2uint_last2first; -translate[IN_UBYTE][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_ubyte2uint_last2first; -translate[IN_UBYTE][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_ubyte2uint_last2first; -translate[IN_UBYTE][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLES] = translate_tris_ubyte2uint_last2first; -translate[IN_UBYTE][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ubyte2uint_last2first; -translate[IN_UBYTE][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ubyte2uint_last2first; -translate[IN_UBYTE][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_QUADS] = translate_quads_ubyte2uint_last2first; -translate[IN_UBYTE][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ubyte2uint_last2first; -translate[IN_UBYTE][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_POLYGON] = translate_polygon_ubyte2uint_last2first; -translate[IN_UBYTE][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_POINTS] = translate_points_ubyte2uint_last2last; -translate[IN_UBYTE][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_LINES] = translate_lines_ubyte2uint_last2last; -translate[IN_UBYTE][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_ubyte2uint_last2last; -translate[IN_UBYTE][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_ubyte2uint_last2last; -translate[IN_UBYTE][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLES] = translate_tris_ubyte2uint_last2last; -translate[IN_UBYTE][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ubyte2uint_last2last; -translate[IN_UBYTE][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ubyte2uint_last2last; -translate[IN_UBYTE][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_QUADS] = translate_quads_ubyte2uint_last2last; -translate[IN_UBYTE][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ubyte2uint_last2last; -translate[IN_UBYTE][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_POLYGON] = translate_polygon_ubyte2uint_last2last; -translate[IN_USHORT][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_POINTS] = translate_points_ushort2ushort_first2first; -translate[IN_USHORT][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINES] = translate_lines_ushort2ushort_first2first; -translate[IN_USHORT][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_ushort2ushort_first2first; -translate[IN_USHORT][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_ushort2ushort_first2first; -translate[IN_USHORT][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLES] = translate_tris_ushort2ushort_first2first; -translate[IN_USHORT][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ushort2ushort_first2first; -translate[IN_USHORT][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ushort2ushort_first2first; -translate[IN_USHORT][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_QUADS] = translate_quads_ushort2ushort_first2first; -translate[IN_USHORT][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ushort2ushort_first2first; -translate[IN_USHORT][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_POLYGON] = translate_polygon_ushort2ushort_first2first; -translate[IN_USHORT][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_POINTS] = translate_points_ushort2ushort_first2last; -translate[IN_USHORT][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_LINES] = translate_lines_ushort2ushort_first2last; -translate[IN_USHORT][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_ushort2ushort_first2last; -translate[IN_USHORT][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_ushort2ushort_first2last; -translate[IN_USHORT][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLES] = translate_tris_ushort2ushort_first2last; -translate[IN_USHORT][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ushort2ushort_first2last; -translate[IN_USHORT][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ushort2ushort_first2last; -translate[IN_USHORT][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_QUADS] = translate_quads_ushort2ushort_first2last; -translate[IN_USHORT][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ushort2ushort_first2last; -translate[IN_USHORT][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_POLYGON] = translate_polygon_ushort2ushort_first2last; -translate[IN_USHORT][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_POINTS] = translate_points_ushort2ushort_last2first; -translate[IN_USHORT][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_LINES] = translate_lines_ushort2ushort_last2first; -translate[IN_USHORT][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_ushort2ushort_last2first; -translate[IN_USHORT][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_ushort2ushort_last2first; -translate[IN_USHORT][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLES] = translate_tris_ushort2ushort_last2first; -translate[IN_USHORT][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ushort2ushort_last2first; -translate[IN_USHORT][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ushort2ushort_last2first; -translate[IN_USHORT][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_QUADS] = translate_quads_ushort2ushort_last2first; -translate[IN_USHORT][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ushort2ushort_last2first; -translate[IN_USHORT][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_POLYGON] = translate_polygon_ushort2ushort_last2first; -translate[IN_USHORT][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_POINTS] = translate_points_ushort2ushort_last2last; -translate[IN_USHORT][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_LINES] = translate_lines_ushort2ushort_last2last; -translate[IN_USHORT][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_ushort2ushort_last2last; -translate[IN_USHORT][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_ushort2ushort_last2last; -translate[IN_USHORT][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLES] = translate_tris_ushort2ushort_last2last; -translate[IN_USHORT][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ushort2ushort_last2last; -translate[IN_USHORT][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ushort2ushort_last2last; -translate[IN_USHORT][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_QUADS] = translate_quads_ushort2ushort_last2last; -translate[IN_USHORT][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ushort2ushort_last2last; -translate[IN_USHORT][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_POLYGON] = translate_polygon_ushort2ushort_last2last; -translate[IN_USHORT][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_POINTS] = translate_points_ushort2uint_first2first; -translate[IN_USHORT][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINES] = translate_lines_ushort2uint_first2first; -translate[IN_USHORT][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_ushort2uint_first2first; -translate[IN_USHORT][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_ushort2uint_first2first; -translate[IN_USHORT][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLES] = translate_tris_ushort2uint_first2first; -translate[IN_USHORT][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ushort2uint_first2first; -translate[IN_USHORT][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ushort2uint_first2first; -translate[IN_USHORT][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_QUADS] = translate_quads_ushort2uint_first2first; -translate[IN_USHORT][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ushort2uint_first2first; -translate[IN_USHORT][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_POLYGON] = translate_polygon_ushort2uint_first2first; -translate[IN_USHORT][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_POINTS] = translate_points_ushort2uint_first2last; -translate[IN_USHORT][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_LINES] = translate_lines_ushort2uint_first2last; -translate[IN_USHORT][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_ushort2uint_first2last; -translate[IN_USHORT][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_ushort2uint_first2last; -translate[IN_USHORT][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLES] = translate_tris_ushort2uint_first2last; -translate[IN_USHORT][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ushort2uint_first2last; -translate[IN_USHORT][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ushort2uint_first2last; -translate[IN_USHORT][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_QUADS] = translate_quads_ushort2uint_first2last; -translate[IN_USHORT][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ushort2uint_first2last; -translate[IN_USHORT][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_POLYGON] = translate_polygon_ushort2uint_first2last; -translate[IN_USHORT][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_POINTS] = translate_points_ushort2uint_last2first; -translate[IN_USHORT][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_LINES] = translate_lines_ushort2uint_last2first; -translate[IN_USHORT][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_ushort2uint_last2first; -translate[IN_USHORT][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_ushort2uint_last2first; -translate[IN_USHORT][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLES] = translate_tris_ushort2uint_last2first; -translate[IN_USHORT][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ushort2uint_last2first; -translate[IN_USHORT][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ushort2uint_last2first; -translate[IN_USHORT][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_QUADS] = translate_quads_ushort2uint_last2first; -translate[IN_USHORT][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ushort2uint_last2first; -translate[IN_USHORT][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_POLYGON] = translate_polygon_ushort2uint_last2first; -translate[IN_USHORT][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_POINTS] = translate_points_ushort2uint_last2last; -translate[IN_USHORT][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_LINES] = translate_lines_ushort2uint_last2last; -translate[IN_USHORT][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_ushort2uint_last2last; -translate[IN_USHORT][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_ushort2uint_last2last; -translate[IN_USHORT][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLES] = translate_tris_ushort2uint_last2last; -translate[IN_USHORT][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ushort2uint_last2last; -translate[IN_USHORT][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ushort2uint_last2last; -translate[IN_USHORT][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_QUADS] = translate_quads_ushort2uint_last2last; -translate[IN_USHORT][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ushort2uint_last2last; -translate[IN_USHORT][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_POLYGON] = translate_polygon_ushort2uint_last2last; -translate[IN_UINT][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_POINTS] = translate_points_uint2ushort_first2first; -translate[IN_UINT][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINES] = translate_lines_uint2ushort_first2first; -translate[IN_UINT][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_uint2ushort_first2first; -translate[IN_UINT][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_uint2ushort_first2first; -translate[IN_UINT][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLES] = translate_tris_uint2ushort_first2first; -translate[IN_UINT][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_uint2ushort_first2first; -translate[IN_UINT][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_uint2ushort_first2first; -translate[IN_UINT][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_QUADS] = translate_quads_uint2ushort_first2first; -translate[IN_UINT][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_uint2ushort_first2first; -translate[IN_UINT][OUT_USHORT][PV_FIRST][PV_FIRST][PIPE_PRIM_POLYGON] = translate_polygon_uint2ushort_first2first; -translate[IN_UINT][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_POINTS] = translate_points_uint2ushort_first2last; -translate[IN_UINT][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_LINES] = translate_lines_uint2ushort_first2last; -translate[IN_UINT][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_uint2ushort_first2last; -translate[IN_UINT][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_uint2ushort_first2last; -translate[IN_UINT][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLES] = translate_tris_uint2ushort_first2last; -translate[IN_UINT][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_uint2ushort_first2last; -translate[IN_UINT][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_uint2ushort_first2last; -translate[IN_UINT][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_QUADS] = translate_quads_uint2ushort_first2last; -translate[IN_UINT][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_uint2ushort_first2last; -translate[IN_UINT][OUT_USHORT][PV_FIRST][PV_LAST][PIPE_PRIM_POLYGON] = translate_polygon_uint2ushort_first2last; -translate[IN_UINT][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_POINTS] = translate_points_uint2ushort_last2first; -translate[IN_UINT][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_LINES] = translate_lines_uint2ushort_last2first; -translate[IN_UINT][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_uint2ushort_last2first; -translate[IN_UINT][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_uint2ushort_last2first; -translate[IN_UINT][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLES] = translate_tris_uint2ushort_last2first; -translate[IN_UINT][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_uint2ushort_last2first; -translate[IN_UINT][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_uint2ushort_last2first; -translate[IN_UINT][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_QUADS] = translate_quads_uint2ushort_last2first; -translate[IN_UINT][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_uint2ushort_last2first; -translate[IN_UINT][OUT_USHORT][PV_LAST][PV_FIRST][PIPE_PRIM_POLYGON] = translate_polygon_uint2ushort_last2first; -translate[IN_UINT][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_POINTS] = translate_points_uint2ushort_last2last; -translate[IN_UINT][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_LINES] = translate_lines_uint2ushort_last2last; -translate[IN_UINT][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_uint2ushort_last2last; -translate[IN_UINT][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_uint2ushort_last2last; -translate[IN_UINT][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLES] = translate_tris_uint2ushort_last2last; -translate[IN_UINT][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_uint2ushort_last2last; -translate[IN_UINT][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_uint2ushort_last2last; -translate[IN_UINT][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_QUADS] = translate_quads_uint2ushort_last2last; -translate[IN_UINT][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_uint2ushort_last2last; -translate[IN_UINT][OUT_USHORT][PV_LAST][PV_LAST][PIPE_PRIM_POLYGON] = translate_polygon_uint2ushort_last2last; -translate[IN_UINT][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_POINTS] = translate_points_uint2uint_first2first; -translate[IN_UINT][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINES] = translate_lines_uint2uint_first2first; -translate[IN_UINT][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_uint2uint_first2first; -translate[IN_UINT][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_uint2uint_first2first; -translate[IN_UINT][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLES] = translate_tris_uint2uint_first2first; -translate[IN_UINT][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_uint2uint_first2first; -translate[IN_UINT][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_uint2uint_first2first; -translate[IN_UINT][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_QUADS] = translate_quads_uint2uint_first2first; -translate[IN_UINT][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_uint2uint_first2first; -translate[IN_UINT][OUT_UINT][PV_FIRST][PV_FIRST][PIPE_PRIM_POLYGON] = translate_polygon_uint2uint_first2first; -translate[IN_UINT][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_POINTS] = translate_points_uint2uint_first2last; -translate[IN_UINT][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_LINES] = translate_lines_uint2uint_first2last; -translate[IN_UINT][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_uint2uint_first2last; -translate[IN_UINT][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_uint2uint_first2last; -translate[IN_UINT][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLES] = translate_tris_uint2uint_first2last; -translate[IN_UINT][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_uint2uint_first2last; -translate[IN_UINT][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_uint2uint_first2last; -translate[IN_UINT][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_QUADS] = translate_quads_uint2uint_first2last; -translate[IN_UINT][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_uint2uint_first2last; -translate[IN_UINT][OUT_UINT][PV_FIRST][PV_LAST][PIPE_PRIM_POLYGON] = translate_polygon_uint2uint_first2last; -translate[IN_UINT][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_POINTS] = translate_points_uint2uint_last2first; -translate[IN_UINT][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_LINES] = translate_lines_uint2uint_last2first; -translate[IN_UINT][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_uint2uint_last2first; -translate[IN_UINT][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_uint2uint_last2first; -translate[IN_UINT][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLES] = translate_tris_uint2uint_last2first; -translate[IN_UINT][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_uint2uint_last2first; -translate[IN_UINT][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_uint2uint_last2first; -translate[IN_UINT][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_QUADS] = translate_quads_uint2uint_last2first; -translate[IN_UINT][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_uint2uint_last2first; -translate[IN_UINT][OUT_UINT][PV_LAST][PV_FIRST][PIPE_PRIM_POLYGON] = translate_polygon_uint2uint_last2first; -translate[IN_UINT][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_POINTS] = translate_points_uint2uint_last2last; -translate[IN_UINT][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_LINES] = translate_lines_uint2uint_last2last; -translate[IN_UINT][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_LINE_STRIP] = translate_linestrip_uint2uint_last2last; -translate[IN_UINT][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_LINE_LOOP] = translate_lineloop_uint2uint_last2last; -translate[IN_UINT][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLES] = translate_tris_uint2uint_last2last; -translate[IN_UINT][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_uint2uint_last2last; -translate[IN_UINT][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_uint2uint_last2last; -translate[IN_UINT][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_QUADS] = translate_quads_uint2uint_last2last; -translate[IN_UINT][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_uint2uint_last2last; -translate[IN_UINT][OUT_UINT][PV_LAST][PV_LAST][PIPE_PRIM_POLYGON] = translate_polygon_uint2uint_last2last; -} -#include "indices/u_indices.c" diff --git a/dll/opengl/mesa/generated/gallium/auxiliary/indices/u_unfilled_gen.c b/dll/opengl/mesa/generated/gallium/auxiliary/indices/u_unfilled_gen.c deleted file mode 100644 index e71cd2febc1..00000000000 --- a/dll/opengl/mesa/generated/gallium/auxiliary/indices/u_unfilled_gen.c +++ /dev/null @@ -1,960 +0,0 @@ -/* File automatically generated by u_unfilled_gen.py */ - -/* - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - - -/** - * @file - * Functions to translate and generate index lists - */ - -#include "indices/u_indices.h" -#include "indices/u_indices_priv.h" -#include "pipe/p_compiler.h" -#include "util/u_debug.h" -#include "pipe/p_defines.h" -#include "util/u_memory.h" - - -static unsigned out_size_idx( unsigned index_size ) -{ - switch (index_size) { - case 4: return OUT_UINT; - case 2: return OUT_USHORT; - default: assert(0); return OUT_USHORT; - } -} - -static unsigned in_size_idx( unsigned index_size ) -{ - switch (index_size) { - case 4: return IN_UINT; - case 2: return IN_USHORT; - case 1: return IN_UBYTE; - default: assert(0); return IN_UBYTE; - } -} - - -static u_generate_func generate_line[OUT_COUNT][PRIM_COUNT]; -static u_translate_func translate_line[IN_COUNT][OUT_COUNT][PRIM_COUNT]; - - -static void generate_tris_ushort( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=3) { - (out+j)[0] = (ushort)(i); - (out+j)[1] = (ushort)(i+1); - (out+j+2)[0] = (ushort)(i+1); - (out+j+2)[1] = (ushort)(i+2); - (out+j+4)[0] = (ushort)(i+2); - (out+j+4)[1] = (ushort)(i); - } -} -static void generate_tristrip_ushort( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i++) { - (out+j)[0] = (ushort)(i); - (out+j)[1] = (ushort)(i+1/*+(i&1)*/); - (out+j+2)[0] = (ushort)(i+1/*+(i&1)*/); - (out+j+2)[1] = (ushort)(i+2/*-(i&1)*/); - (out+j+4)[0] = (ushort)(i+2/*-(i&1)*/); - (out+j+4)[1] = (ushort)(i); - } -} -static void generate_trifan_ushort( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i++) { - (out+j)[0] = (ushort)(0); - (out+j)[1] = (ushort)(i+1); - (out+j+2)[0] = (ushort)(i+1); - (out+j+2)[1] = (ushort)(i+2); - (out+j+4)[0] = (ushort)(i+2); - (out+j+4)[1] = (ushort)(0); - } -} -static void generate_quads_ushort( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=8, i+=4) { - (out+j)[0] = (ushort)(i+0); - (out+j)[1] = (ushort)(i+1); - (out+j+2)[0] = (ushort)(i+1); - (out+j+2)[1] = (ushort)(i+2); - (out+j+4)[0] = (ushort)(i+2); - (out+j+4)[1] = (ushort)(i+3); - (out+j+6)[0] = (ushort)(i+3); - (out+j+6)[1] = (ushort)(i+0); - } -} -static void generate_quadstrip_ushort( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=8, i+=2) { - (out+j)[0] = (ushort)(i+2); - (out+j)[1] = (ushort)(i+0); - (out+j+2)[0] = (ushort)(i+0); - (out+j+2)[1] = (ushort)(i+1); - (out+j+4)[0] = (ushort)(i+1); - (out+j+4)[1] = (ushort)(i+3); - (out+j+6)[0] = (ushort)(i+3); - (out+j+6)[1] = (ushort)(i+2); - } -} -static void generate_polygon_ushort( - unsigned nr, - void *_out ) -{ - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (ushort)(i); - (out+j)[1] = (ushort)((i+1)%(nr/2)); - } -} -static void generate_tris_uint( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=3) { - (out+j)[0] = (uint)(i); - (out+j)[1] = (uint)(i+1); - (out+j+2)[0] = (uint)(i+1); - (out+j+2)[1] = (uint)(i+2); - (out+j+4)[0] = (uint)(i+2); - (out+j+4)[1] = (uint)(i); - } -} -static void generate_tristrip_uint( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i++) { - (out+j)[0] = (uint)(i); - (out+j)[1] = (uint)(i+1/*+(i&1)*/); - (out+j+2)[0] = (uint)(i+1/*+(i&1)*/); - (out+j+2)[1] = (uint)(i+2/*-(i&1)*/); - (out+j+4)[0] = (uint)(i+2/*-(i&1)*/); - (out+j+4)[1] = (uint)(i); - } -} -static void generate_trifan_uint( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i++) { - (out+j)[0] = (uint)(0); - (out+j)[1] = (uint)(i+1); - (out+j+2)[0] = (uint)(i+1); - (out+j+2)[1] = (uint)(i+2); - (out+j+4)[0] = (uint)(i+2); - (out+j+4)[1] = (uint)(0); - } -} -static void generate_quads_uint( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=8, i+=4) { - (out+j)[0] = (uint)(i+0); - (out+j)[1] = (uint)(i+1); - (out+j+2)[0] = (uint)(i+1); - (out+j+2)[1] = (uint)(i+2); - (out+j+4)[0] = (uint)(i+2); - (out+j+4)[1] = (uint)(i+3); - (out+j+6)[0] = (uint)(i+3); - (out+j+6)[1] = (uint)(i+0); - } -} -static void generate_quadstrip_uint( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=8, i+=2) { - (out+j)[0] = (uint)(i+2); - (out+j)[1] = (uint)(i+0); - (out+j+2)[0] = (uint)(i+0); - (out+j+2)[1] = (uint)(i+1); - (out+j+4)[0] = (uint)(i+1); - (out+j+4)[1] = (uint)(i+3); - (out+j+6)[0] = (uint)(i+3); - (out+j+6)[1] = (uint)(i+2); - } -} -static void generate_polygon_uint( - unsigned nr, - void *_out ) -{ - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (uint)(i); - (out+j)[1] = (uint)((i+1)%(nr/2)); - } -} -static void translate_tris_ubyte2ushort( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=3) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1]; - (out+j+2)[0] = (ushort)in[i+1]; - (out+j+2)[1] = (ushort)in[i+2]; - (out+j+4)[0] = (ushort)in[i+2]; - (out+j+4)[1] = (ushort)in[i]; - } -} -static void translate_tristrip_ubyte2ushort( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1/*+(i&1)*/]; - (out+j+2)[0] = (ushort)in[i+1/*+(i&1)*/]; - (out+j+2)[1] = (ushort)in[i+2/*-(i&1)*/]; - (out+j+4)[0] = (ushort)in[i+2/*-(i&1)*/]; - (out+j+4)[1] = (ushort)in[i]; - } -} -static void translate_trifan_ubyte2ushort( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i++) { - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i+1]; - (out+j+2)[0] = (ushort)in[i+1]; - (out+j+2)[1] = (ushort)in[i+2]; - (out+j+4)[0] = (ushort)in[i+2]; - (out+j+4)[1] = (ushort)in[0]; - } -} -static void translate_quads_ubyte2ushort( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=8, i+=4) { - (out+j)[0] = (ushort)in[i+0]; - (out+j)[1] = (ushort)in[i+1]; - (out+j+2)[0] = (ushort)in[i+1]; - (out+j+2)[1] = (ushort)in[i+2]; - (out+j+4)[0] = (ushort)in[i+2]; - (out+j+4)[1] = (ushort)in[i+3]; - (out+j+6)[0] = (ushort)in[i+3]; - (out+j+6)[1] = (ushort)in[i+0]; - } -} -static void translate_quadstrip_ubyte2ushort( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=8, i+=2) { - (out+j)[0] = (ushort)in[i+2]; - (out+j)[1] = (ushort)in[i+0]; - (out+j+2)[0] = (ushort)in[i+0]; - (out+j+2)[1] = (ushort)in[i+1]; - (out+j+4)[0] = (ushort)in[i+1]; - (out+j+4)[1] = (ushort)in[i+3]; - (out+j+6)[0] = (ushort)in[i+3]; - (out+j+6)[1] = (ushort)in[i+2]; - } -} -static void translate_polygon_ubyte2ushort( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[(i+1)%(nr/2)]; - } -} -static void translate_tris_ubyte2uint( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=3) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1]; - (out+j+2)[0] = (uint)in[i+1]; - (out+j+2)[1] = (uint)in[i+2]; - (out+j+4)[0] = (uint)in[i+2]; - (out+j+4)[1] = (uint)in[i]; - } -} -static void translate_tristrip_ubyte2uint( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1/*+(i&1)*/]; - (out+j+2)[0] = (uint)in[i+1/*+(i&1)*/]; - (out+j+2)[1] = (uint)in[i+2/*-(i&1)*/]; - (out+j+4)[0] = (uint)in[i+2/*-(i&1)*/]; - (out+j+4)[1] = (uint)in[i]; - } -} -static void translate_trifan_ubyte2uint( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i++) { - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i+1]; - (out+j+2)[0] = (uint)in[i+1]; - (out+j+2)[1] = (uint)in[i+2]; - (out+j+4)[0] = (uint)in[i+2]; - (out+j+4)[1] = (uint)in[0]; - } -} -static void translate_quads_ubyte2uint( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=8, i+=4) { - (out+j)[0] = (uint)in[i+0]; - (out+j)[1] = (uint)in[i+1]; - (out+j+2)[0] = (uint)in[i+1]; - (out+j+2)[1] = (uint)in[i+2]; - (out+j+4)[0] = (uint)in[i+2]; - (out+j+4)[1] = (uint)in[i+3]; - (out+j+6)[0] = (uint)in[i+3]; - (out+j+6)[1] = (uint)in[i+0]; - } -} -static void translate_quadstrip_ubyte2uint( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=8, i+=2) { - (out+j)[0] = (uint)in[i+2]; - (out+j)[1] = (uint)in[i+0]; - (out+j+2)[0] = (uint)in[i+0]; - (out+j+2)[1] = (uint)in[i+1]; - (out+j+4)[0] = (uint)in[i+1]; - (out+j+4)[1] = (uint)in[i+3]; - (out+j+6)[0] = (uint)in[i+3]; - (out+j+6)[1] = (uint)in[i+2]; - } -} -static void translate_polygon_ubyte2uint( - const void * _in, - unsigned nr, - void *_out ) -{ - const ubyte*in = (const ubyte*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[(i+1)%(nr/2)]; - } -} -static void translate_tris_ushort2ushort( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=3) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1]; - (out+j+2)[0] = (ushort)in[i+1]; - (out+j+2)[1] = (ushort)in[i+2]; - (out+j+4)[0] = (ushort)in[i+2]; - (out+j+4)[1] = (ushort)in[i]; - } -} -static void translate_tristrip_ushort2ushort( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1/*+(i&1)*/]; - (out+j+2)[0] = (ushort)in[i+1/*+(i&1)*/]; - (out+j+2)[1] = (ushort)in[i+2/*-(i&1)*/]; - (out+j+4)[0] = (ushort)in[i+2/*-(i&1)*/]; - (out+j+4)[1] = (ushort)in[i]; - } -} -static void translate_trifan_ushort2ushort( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i++) { - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i+1]; - (out+j+2)[0] = (ushort)in[i+1]; - (out+j+2)[1] = (ushort)in[i+2]; - (out+j+4)[0] = (ushort)in[i+2]; - (out+j+4)[1] = (ushort)in[0]; - } -} -static void translate_quads_ushort2ushort( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=8, i+=4) { - (out+j)[0] = (ushort)in[i+0]; - (out+j)[1] = (ushort)in[i+1]; - (out+j+2)[0] = (ushort)in[i+1]; - (out+j+2)[1] = (ushort)in[i+2]; - (out+j+4)[0] = (ushort)in[i+2]; - (out+j+4)[1] = (ushort)in[i+3]; - (out+j+6)[0] = (ushort)in[i+3]; - (out+j+6)[1] = (ushort)in[i+0]; - } -} -static void translate_quadstrip_ushort2ushort( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=8, i+=2) { - (out+j)[0] = (ushort)in[i+2]; - (out+j)[1] = (ushort)in[i+0]; - (out+j+2)[0] = (ushort)in[i+0]; - (out+j+2)[1] = (ushort)in[i+1]; - (out+j+4)[0] = (ushort)in[i+1]; - (out+j+4)[1] = (ushort)in[i+3]; - (out+j+6)[0] = (ushort)in[i+3]; - (out+j+6)[1] = (ushort)in[i+2]; - } -} -static void translate_polygon_ushort2ushort( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[(i+1)%(nr/2)]; - } -} -static void translate_tris_ushort2uint( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=3) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1]; - (out+j+2)[0] = (uint)in[i+1]; - (out+j+2)[1] = (uint)in[i+2]; - (out+j+4)[0] = (uint)in[i+2]; - (out+j+4)[1] = (uint)in[i]; - } -} -static void translate_tristrip_ushort2uint( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1/*+(i&1)*/]; - (out+j+2)[0] = (uint)in[i+1/*+(i&1)*/]; - (out+j+2)[1] = (uint)in[i+2/*-(i&1)*/]; - (out+j+4)[0] = (uint)in[i+2/*-(i&1)*/]; - (out+j+4)[1] = (uint)in[i]; - } -} -static void translate_trifan_ushort2uint( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i++) { - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i+1]; - (out+j+2)[0] = (uint)in[i+1]; - (out+j+2)[1] = (uint)in[i+2]; - (out+j+4)[0] = (uint)in[i+2]; - (out+j+4)[1] = (uint)in[0]; - } -} -static void translate_quads_ushort2uint( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=8, i+=4) { - (out+j)[0] = (uint)in[i+0]; - (out+j)[1] = (uint)in[i+1]; - (out+j+2)[0] = (uint)in[i+1]; - (out+j+2)[1] = (uint)in[i+2]; - (out+j+4)[0] = (uint)in[i+2]; - (out+j+4)[1] = (uint)in[i+3]; - (out+j+6)[0] = (uint)in[i+3]; - (out+j+6)[1] = (uint)in[i+0]; - } -} -static void translate_quadstrip_ushort2uint( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=8, i+=2) { - (out+j)[0] = (uint)in[i+2]; - (out+j)[1] = (uint)in[i+0]; - (out+j+2)[0] = (uint)in[i+0]; - (out+j+2)[1] = (uint)in[i+1]; - (out+j+4)[0] = (uint)in[i+1]; - (out+j+4)[1] = (uint)in[i+3]; - (out+j+6)[0] = (uint)in[i+3]; - (out+j+6)[1] = (uint)in[i+2]; - } -} -static void translate_polygon_ushort2uint( - const void * _in, - unsigned nr, - void *_out ) -{ - const ushort*in = (const ushort*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[(i+1)%(nr/2)]; - } -} -static void translate_tris_uint2ushort( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=3) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1]; - (out+j+2)[0] = (ushort)in[i+1]; - (out+j+2)[1] = (ushort)in[i+2]; - (out+j+4)[0] = (ushort)in[i+2]; - (out+j+4)[1] = (ushort)in[i]; - } -} -static void translate_tristrip_uint2ushort( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[i+1/*+(i&1)*/]; - (out+j+2)[0] = (ushort)in[i+1/*+(i&1)*/]; - (out+j+2)[1] = (ushort)in[i+2/*-(i&1)*/]; - (out+j+4)[0] = (ushort)in[i+2/*-(i&1)*/]; - (out+j+4)[1] = (ushort)in[i]; - } -} -static void translate_trifan_uint2ushort( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i++) { - (out+j)[0] = (ushort)in[0]; - (out+j)[1] = (ushort)in[i+1]; - (out+j+2)[0] = (ushort)in[i+1]; - (out+j+2)[1] = (ushort)in[i+2]; - (out+j+4)[0] = (ushort)in[i+2]; - (out+j+4)[1] = (ushort)in[0]; - } -} -static void translate_quads_uint2ushort( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=8, i+=4) { - (out+j)[0] = (ushort)in[i+0]; - (out+j)[1] = (ushort)in[i+1]; - (out+j+2)[0] = (ushort)in[i+1]; - (out+j+2)[1] = (ushort)in[i+2]; - (out+j+4)[0] = (ushort)in[i+2]; - (out+j+4)[1] = (ushort)in[i+3]; - (out+j+6)[0] = (ushort)in[i+3]; - (out+j+6)[1] = (ushort)in[i+0]; - } -} -static void translate_quadstrip_uint2ushort( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=8, i+=2) { - (out+j)[0] = (ushort)in[i+2]; - (out+j)[1] = (ushort)in[i+0]; - (out+j+2)[0] = (ushort)in[i+0]; - (out+j+2)[1] = (ushort)in[i+1]; - (out+j+4)[0] = (ushort)in[i+1]; - (out+j+4)[1] = (ushort)in[i+3]; - (out+j+6)[0] = (ushort)in[i+3]; - (out+j+6)[1] = (ushort)in[i+2]; - } -} -static void translate_polygon_uint2ushort( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - ushort *out = (ushort*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (ushort)in[i]; - (out+j)[1] = (ushort)in[(i+1)%(nr/2)]; - } -} -static void translate_tris_uint2uint( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i+=3) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1]; - (out+j+2)[0] = (uint)in[i+1]; - (out+j+2)[1] = (uint)in[i+2]; - (out+j+4)[0] = (uint)in[i+2]; - (out+j+4)[1] = (uint)in[i]; - } -} -static void translate_tristrip_uint2uint( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[i+1/*+(i&1)*/]; - (out+j+2)[0] = (uint)in[i+1/*+(i&1)*/]; - (out+j+2)[1] = (uint)in[i+2/*-(i&1)*/]; - (out+j+4)[0] = (uint)in[i+2/*-(i&1)*/]; - (out+j+4)[1] = (uint)in[i]; - } -} -static void translate_trifan_uint2uint( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=6, i++) { - (out+j)[0] = (uint)in[0]; - (out+j)[1] = (uint)in[i+1]; - (out+j+2)[0] = (uint)in[i+1]; - (out+j+2)[1] = (uint)in[i+2]; - (out+j+4)[0] = (uint)in[i+2]; - (out+j+4)[1] = (uint)in[0]; - } -} -static void translate_quads_uint2uint( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=8, i+=4) { - (out+j)[0] = (uint)in[i+0]; - (out+j)[1] = (uint)in[i+1]; - (out+j+2)[0] = (uint)in[i+1]; - (out+j+2)[1] = (uint)in[i+2]; - (out+j+4)[0] = (uint)in[i+2]; - (out+j+4)[1] = (uint)in[i+3]; - (out+j+6)[0] = (uint)in[i+3]; - (out+j+6)[1] = (uint)in[i+0]; - } -} -static void translate_quadstrip_uint2uint( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=8, i+=2) { - (out+j)[0] = (uint)in[i+2]; - (out+j)[1] = (uint)in[i+0]; - (out+j+2)[0] = (uint)in[i+0]; - (out+j+2)[1] = (uint)in[i+1]; - (out+j+4)[0] = (uint)in[i+1]; - (out+j+4)[1] = (uint)in[i+3]; - (out+j+6)[0] = (uint)in[i+3]; - (out+j+6)[1] = (uint)in[i+2]; - } -} -static void translate_polygon_uint2uint( - const void * _in, - unsigned nr, - void *_out ) -{ - const uint*in = (const uint*)_in; - uint *out = (uint*)_out; - unsigned i, j; - (void)j; - for (j = i = 0; j < nr; j+=2, i++) { - (out+j)[0] = (uint)in[i]; - (out+j)[1] = (uint)in[(i+1)%(nr/2)]; - } -} -void u_unfilled_init( void ) -{ - static int firsttime = 1; - if (!firsttime) return; - firsttime = 0; -generate_line[OUT_USHORT][PIPE_PRIM_TRIANGLES] = generate_tris_ushort; -generate_line[OUT_USHORT][PIPE_PRIM_TRIANGLE_FAN] = generate_trifan_ushort; -generate_line[OUT_USHORT][PIPE_PRIM_TRIANGLE_STRIP] = generate_tristrip_ushort; -generate_line[OUT_USHORT][PIPE_PRIM_QUADS] = generate_quads_ushort; -generate_line[OUT_USHORT][PIPE_PRIM_QUAD_STRIP] = generate_quadstrip_ushort; -generate_line[OUT_USHORT][PIPE_PRIM_POLYGON] = generate_polygon_ushort; -generate_line[OUT_UINT][PIPE_PRIM_TRIANGLES] = generate_tris_uint; -generate_line[OUT_UINT][PIPE_PRIM_TRIANGLE_FAN] = generate_trifan_uint; -generate_line[OUT_UINT][PIPE_PRIM_TRIANGLE_STRIP] = generate_tristrip_uint; -generate_line[OUT_UINT][PIPE_PRIM_QUADS] = generate_quads_uint; -generate_line[OUT_UINT][PIPE_PRIM_QUAD_STRIP] = generate_quadstrip_uint; -generate_line[OUT_UINT][PIPE_PRIM_POLYGON] = generate_polygon_uint; -translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_TRIANGLES] = translate_tris_ubyte2ushort; -translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ubyte2ushort; -translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ubyte2ushort; -translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_QUADS] = translate_quads_ubyte2ushort; -translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ubyte2ushort; -translate_line[IN_UBYTE][OUT_USHORT][PIPE_PRIM_POLYGON] = translate_polygon_ubyte2ushort; -translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_TRIANGLES] = translate_tris_ubyte2uint; -translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ubyte2uint; -translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ubyte2uint; -translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_QUADS] = translate_quads_ubyte2uint; -translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ubyte2uint; -translate_line[IN_UBYTE][OUT_UINT][PIPE_PRIM_POLYGON] = translate_polygon_ubyte2uint; -translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_TRIANGLES] = translate_tris_ushort2ushort; -translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ushort2ushort; -translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ushort2ushort; -translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_QUADS] = translate_quads_ushort2ushort; -translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ushort2ushort; -translate_line[IN_USHORT][OUT_USHORT][PIPE_PRIM_POLYGON] = translate_polygon_ushort2ushort; -translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_TRIANGLES] = translate_tris_ushort2uint; -translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_ushort2uint; -translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_ushort2uint; -translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_QUADS] = translate_quads_ushort2uint; -translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_ushort2uint; -translate_line[IN_USHORT][OUT_UINT][PIPE_PRIM_POLYGON] = translate_polygon_ushort2uint; -translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_TRIANGLES] = translate_tris_uint2ushort; -translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_uint2ushort; -translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_uint2ushort; -translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_QUADS] = translate_quads_uint2ushort; -translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_uint2ushort; -translate_line[IN_UINT][OUT_USHORT][PIPE_PRIM_POLYGON] = translate_polygon_uint2ushort; -translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_TRIANGLES] = translate_tris_uint2uint; -translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_TRIANGLE_FAN] = translate_trifan_uint2uint; -translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_TRIANGLE_STRIP] = translate_tristrip_uint2uint; -translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_QUADS] = translate_quads_uint2uint; -translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_QUAD_STRIP] = translate_quadstrip_uint2uint; -translate_line[IN_UINT][OUT_UINT][PIPE_PRIM_POLYGON] = translate_polygon_uint2uint; -} -#include "indices/u_unfilled_indices.c" diff --git a/dll/opengl/mesa/generated/gallium/auxiliary/util/u_format_srgb.c b/dll/opengl/mesa/generated/gallium/auxiliary/util/u_format_srgb.c deleted file mode 100644 index 4ac8c7b480a..00000000000 --- a/dll/opengl/mesa/generated/gallium/auxiliary/util/u_format_srgb.c +++ /dev/null @@ -1,148 +0,0 @@ -/* This file is autogenerated by u_format_srgb.py. Do not edit directly. */ - -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * SRGB translation. - * - * @author Brian Paul - * @author Michal Krol - * @author Jose Fonseca - */ - -#include "u_format_srgb.h" - -const float -util_format_srgb_8unorm_to_linear_float_table[256] = { - 0.0000000e+00, 3.0352698e-04, 6.0705397e-04, 9.1058095e-04, - 1.2141079e-03, 1.5176349e-03, 1.8211619e-03, 2.1246889e-03, - 2.4282159e-03, 2.7317429e-03, 3.0352698e-03, 3.3465358e-03, - 3.6765073e-03, 4.0247170e-03, 4.3914420e-03, 4.7769535e-03, - 5.1815167e-03, 5.6053916e-03, 6.0488330e-03, 6.5120908e-03, - 6.9954102e-03, 7.4990320e-03, 8.0231930e-03, 8.5681256e-03, - 9.1340587e-03, 9.7212173e-03, 1.0329823e-02, 1.0960094e-02, - 1.1612245e-02, 1.2286488e-02, 1.2983032e-02, 1.3702083e-02, - 1.4443844e-02, 1.5208514e-02, 1.5996293e-02, 1.6807376e-02, - 1.7641954e-02, 1.8500220e-02, 1.9382361e-02, 2.0288563e-02, - 2.1219010e-02, 2.2173885e-02, 2.3153366e-02, 2.4157632e-02, - 2.5186860e-02, 2.6241222e-02, 2.7320892e-02, 2.8426040e-02, - 2.9556834e-02, 3.0713444e-02, 3.1896033e-02, 3.3104767e-02, - 3.4339807e-02, 3.5601315e-02, 3.6889450e-02, 3.8204372e-02, - 3.9546235e-02, 4.0915197e-02, 4.2311411e-02, 4.3735029e-02, - 4.5186204e-02, 4.6665086e-02, 4.8171824e-02, 4.9706566e-02, - 5.1269458e-02, 5.2860647e-02, 5.4480276e-02, 5.6128490e-02, - 5.7805430e-02, 5.9511238e-02, 6.1246054e-02, 6.3010018e-02, - 6.4803267e-02, 6.6625939e-02, 6.8478170e-02, 7.0360096e-02, - 7.2271851e-02, 7.4213568e-02, 7.6185381e-02, 7.8187422e-02, - 8.0219820e-02, 8.2282707e-02, 8.4376212e-02, 8.6500462e-02, - 8.8655586e-02, 9.0841711e-02, 9.3058963e-02, 9.5307467e-02, - 9.7587347e-02, 9.9898728e-02, 1.0224173e-01, 1.0461648e-01, - 1.0702310e-01, 1.0946171e-01, 1.1193243e-01, 1.1443537e-01, - 1.1697067e-01, 1.1953843e-01, 1.2213877e-01, 1.2477182e-01, - 1.2743768e-01, 1.3013648e-01, 1.3286832e-01, 1.3563333e-01, - 1.3843162e-01, 1.4126329e-01, 1.4412847e-01, 1.4702727e-01, - 1.4995979e-01, 1.5292615e-01, 1.5592646e-01, 1.5896084e-01, - 1.6202938e-01, 1.6513219e-01, 1.6826940e-01, 1.7144110e-01, - 1.7464740e-01, 1.7788842e-01, 1.8116424e-01, 1.8447499e-01, - 1.8782077e-01, 1.9120168e-01, 1.9461783e-01, 1.9806932e-01, - 2.0155625e-01, 2.0507874e-01, 2.0863687e-01, 2.1223076e-01, - 2.1586050e-01, 2.1952620e-01, 2.2322796e-01, 2.2696587e-01, - 2.3074005e-01, 2.3455058e-01, 2.3839757e-01, 2.4228112e-01, - 2.4620133e-01, 2.5015828e-01, 2.5415209e-01, 2.5818285e-01, - 2.6225066e-01, 2.6635560e-01, 2.7049779e-01, 2.7467731e-01, - 2.7889426e-01, 2.8314874e-01, 2.8744084e-01, 2.9177065e-01, - 2.9613827e-01, 3.0054379e-01, 3.0498731e-01, 3.0946892e-01, - 3.1398871e-01, 3.1854678e-01, 3.2314321e-01, 3.2777810e-01, - 3.3245154e-01, 3.3716362e-01, 3.4191442e-01, 3.4670406e-01, - 3.5153260e-01, 3.5640014e-01, 3.6130678e-01, 3.6625260e-01, - 3.7123768e-01, 3.7626212e-01, 3.8132601e-01, 3.8642943e-01, - 3.9157248e-01, 3.9675523e-01, 4.0197778e-01, 4.0724021e-01, - 4.1254261e-01, 4.1788507e-01, 4.2326767e-01, 4.2869050e-01, - 4.3415364e-01, 4.3965717e-01, 4.4520119e-01, 4.5078578e-01, - 4.5641102e-01, 4.6207700e-01, 4.6778380e-01, 4.7353150e-01, - 4.7932018e-01, 4.8514994e-01, 4.9102085e-01, 4.9693300e-01, - 5.0288646e-01, 5.0888132e-01, 5.1491767e-01, 5.2099557e-01, - 5.2711513e-01, 5.3327640e-01, 5.3947949e-01, 5.4572446e-01, - 5.5201140e-01, 5.5834039e-01, 5.6471151e-01, 5.7112483e-01, - 5.7758044e-01, 5.8407842e-01, 5.9061884e-01, 5.9720179e-01, - 6.0382734e-01, 6.1049557e-01, 6.1720656e-01, 6.2396039e-01, - 6.3075714e-01, 6.3759687e-01, 6.4447968e-01, 6.5140564e-01, - 6.5837482e-01, 6.6538730e-01, 6.7244316e-01, 6.7954247e-01, - 6.8668531e-01, 6.9387176e-01, 7.0110189e-01, 7.0837578e-01, - 7.1569350e-01, 7.2305513e-01, 7.3046074e-01, 7.3791041e-01, - 7.4540421e-01, 7.5294222e-01, 7.6052450e-01, 7.6815115e-01, - 7.7582222e-01, 7.8353779e-01, 7.9129794e-01, 7.9910274e-01, - 8.0695226e-01, 8.1484657e-01, 8.2278575e-01, 8.3076988e-01, - 8.3879901e-01, 8.4687323e-01, 8.5499261e-01, 8.6315721e-01, - 8.7136712e-01, 8.7962240e-01, 8.8792312e-01, 8.9626935e-01, - 9.0466117e-01, 9.1309865e-01, 9.2158186e-01, 9.3011086e-01, - 9.3868573e-01, 9.4730654e-01, 9.5597335e-01, 9.6468625e-01, - 9.7344529e-01, 9.8225055e-01, 9.9110210e-01, 1.0000000e+00, -}; - -const uint8_t -util_format_srgb_to_linear_8unorm_table[256] = { - 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, - 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, - 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13, - 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 17, 18, 18, 19, 19, 20, - 20, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 27, 27, 28, 29, 29, - 30, 30, 31, 32, 32, 33, 34, 35, 35, 36, 37, 37, 38, 39, 40, 41, - 41, 42, 43, 44, 45, 45, 46, 47, 48, 49, 50, 51, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 76, 77, 78, 79, 80, 81, 82, 84, 85, 86, 87, 88, - 90, 91, 92, 93, 95, 96, 97, 99, 100, 101, 103, 104, 105, 107, 108, 109, - 111, 112, 114, 115, 116, 118, 119, 121, 122, 124, 125, 127, 128, 130, 131, 133, - 134, 136, 138, 139, 141, 142, 144, 146, 147, 149, 151, 152, 154, 156, 157, 159, - 161, 163, 164, 166, 168, 170, 171, 173, 175, 177, 179, 181, 183, 184, 186, 188, - 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, - 222, 224, 226, 229, 231, 233, 235, 237, 239, 242, 244, 246, 248, 250, 253, 255, -}; - -const uint8_t -util_format_linear_to_srgb_8unorm_table[256] = { - 0, 13, 22, 28, 34, 38, 42, 46, 50, 53, 56, 59, 61, 64, 66, 69, - 71, 73, 75, 77, 79, 81, 83, 85, 86, 88, 90, 92, 93, 95, 96, 98, - 99, 101, 102, 104, 105, 106, 108, 109, 110, 112, 113, 114, 115, 117, 118, 119, - 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 148, 149, 150, 151, - 152, 153, 154, 155, 155, 156, 157, 158, 159, 159, 160, 161, 162, 163, 163, 164, - 165, 166, 167, 167, 168, 169, 170, 170, 171, 172, 173, 173, 174, 175, 175, 176, - 177, 178, 178, 179, 180, 180, 181, 182, 182, 183, 184, 185, 185, 186, 187, 187, - 188, 189, 189, 190, 190, 191, 192, 192, 193, 194, 194, 195, 196, 196, 197, 197, - 198, 199, 199, 200, 200, 201, 202, 202, 203, 203, 204, 205, 205, 206, 206, 207, - 208, 208, 209, 209, 210, 210, 211, 212, 212, 213, 213, 214, 214, 215, 215, 216, - 216, 217, 218, 218, 219, 219, 220, 220, 221, 221, 222, 222, 223, 223, 224, 224, - 225, 226, 226, 227, 227, 228, 228, 229, 229, 230, 230, 231, 231, 232, 232, 233, - 233, 234, 234, 235, 235, 236, 236, 237, 237, 238, 238, 238, 239, 239, 240, 240, - 241, 241, 242, 242, 243, 243, 244, 244, 245, 245, 246, 246, 246, 247, 247, 248, - 248, 249, 249, 250, 250, 251, 251, 251, 252, 252, 253, 253, 254, 254, 255, 255, -}; - diff --git a/dll/opengl/mesa/generated/gallium/auxiliary/util/u_format_table.c b/dll/opengl/mesa/generated/gallium/auxiliary/util/u_format_table.c deleted file mode 100644 index 7acb3b07f79..00000000000 --- a/dll/opengl/mesa/generated/gallium/auxiliary/util/u_format_table.c +++ /dev/null @@ -1,31334 +0,0 @@ -/* This file is autogenerated by u_format_table.py from u_format.csv. Do not edit directly. */ - -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "u_format.h" -#include "u_format_s3tc.h" -#include "u_format_rgtc.h" -#include "u_format_latc.h" -#include "u_format_etc.h" - - -#include "pipe/p_compiler.h" -#include "u_math.h" -#include "u_half.h" -#include "u_format.h" -#include "u_format_other.h" -#include "u_format_srgb.h" -#include "u_format_yuv.h" -#include "u_format_zs.h" - -union util_format_none { - uint8_t value; - struct { - uint8_t r; - } chan; -}; - -static INLINE void -util_format_none_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t r; - r = value; - dst[0] = (float)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_none_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)CLAMP(src[0], 0, 255); - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_none_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - uint8_t r; - r = value; - dst[0] = (float)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_none_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t r; - r = value; - dst[0] = (uint8_t)(((uint32_t)MIN2(r, 1)) * 0xff / 0x1); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_none_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)(((uint32_t)src[0]) * 0x1 / 0xff); - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_b8g8r8a8_unorm { - uint32_t value; - struct { - uint8_t b; - uint8_t g; - uint8_t r; - uint8_t a; - } chan; -}; - -static INLINE void -util_format_b8g8r8a8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0xff; - g = (value >> 8) & 0xff; - r = (value >> 16) & 0xff; - a = value >> 24; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = ubyte_to_float(g); /* g */ - dst[2] = ubyte_to_float(b); /* b */ - dst[3] = ubyte_to_float(a); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b8g8r8a8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (float_to_ubyte(src[2])) & 0xff; - value |= ((float_to_ubyte(src[1])) & 0xff) << 8; - value |= ((float_to_ubyte(src[0])) & 0xff) << 16; - value |= (float_to_ubyte(src[3])) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_b8g8r8a8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0xff; - g = (value >> 8) & 0xff; - r = (value >> 16) & 0xff; - a = value >> 24; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = ubyte_to_float(g); /* g */ - dst[2] = ubyte_to_float(b); /* b */ - dst[3] = ubyte_to_float(a); /* a */ -} - -static INLINE void -util_format_b8g8r8a8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0xff; - g = (value >> 8) & 0xff; - r = (value >> 16) & 0xff; - a = value >> 24; - dst[0] = r; /* r */ - dst[1] = g; /* g */ - dst[2] = b; /* b */ - dst[3] = a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b8g8r8a8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (src[2]) & 0xff; - value |= ((src[1]) & 0xff) << 8; - value |= ((src[0]) & 0xff) << 16; - value |= (src[3]) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_b8g8r8x8_unorm { - uint32_t value; - struct { - uint8_t b; - uint8_t g; - uint8_t r; - uint8_t x; - } chan; -}; - -static INLINE void -util_format_b8g8r8x8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0xff; - g = (value >> 8) & 0xff; - r = (value >> 16) & 0xff; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = ubyte_to_float(g); /* g */ - dst[2] = ubyte_to_float(b); /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b8g8r8x8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (float_to_ubyte(src[2])) & 0xff; - value |= ((float_to_ubyte(src[1])) & 0xff) << 8; - value |= ((float_to_ubyte(src[0])) & 0xff) << 16; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_b8g8r8x8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0xff; - g = (value >> 8) & 0xff; - r = (value >> 16) & 0xff; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = ubyte_to_float(g); /* g */ - dst[2] = ubyte_to_float(b); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_b8g8r8x8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0xff; - g = (value >> 8) & 0xff; - r = (value >> 16) & 0xff; - dst[0] = r; /* r */ - dst[1] = g; /* g */ - dst[2] = b; /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b8g8r8x8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (src[2]) & 0xff; - value |= ((src[1]) & 0xff) << 8; - value |= ((src[0]) & 0xff) << 16; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_a8r8g8b8_unorm { - uint32_t value; - struct { - uint8_t a; - uint8_t r; - uint8_t g; - uint8_t b; - } chan; -}; - -static INLINE void -util_format_a8r8g8b8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t a; - uint32_t r; - uint32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - a = (value) & 0xff; - r = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - b = value >> 24; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = ubyte_to_float(g); /* g */ - dst[2] = ubyte_to_float(b); /* b */ - dst[3] = ubyte_to_float(a); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a8r8g8b8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (float_to_ubyte(src[3])) & 0xff; - value |= ((float_to_ubyte(src[0])) & 0xff) << 8; - value |= ((float_to_ubyte(src[1])) & 0xff) << 16; - value |= (float_to_ubyte(src[2])) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_a8r8g8b8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t a; - uint32_t r; - uint32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - a = (value) & 0xff; - r = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - b = value >> 24; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = ubyte_to_float(g); /* g */ - dst[2] = ubyte_to_float(b); /* b */ - dst[3] = ubyte_to_float(a); /* a */ -} - -static INLINE void -util_format_a8r8g8b8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t a; - uint32_t r; - uint32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - a = (value) & 0xff; - r = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - b = value >> 24; - dst[0] = r; /* r */ - dst[1] = g; /* g */ - dst[2] = b; /* b */ - dst[3] = a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a8r8g8b8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (src[3]) & 0xff; - value |= ((src[0]) & 0xff) << 8; - value |= ((src[1]) & 0xff) << 16; - value |= (src[2]) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_x8r8g8b8_unorm { - uint32_t value; - struct { - uint8_t x; - uint8_t r; - uint8_t g; - uint8_t b; - } chan; -}; - -static INLINE void -util_format_x8r8g8b8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - b = value >> 24; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = ubyte_to_float(g); /* g */ - dst[2] = ubyte_to_float(b); /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_x8r8g8b8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((float_to_ubyte(src[0])) & 0xff) << 8; - value |= ((float_to_ubyte(src[1])) & 0xff) << 16; - value |= (float_to_ubyte(src[2])) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_x8r8g8b8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - b = value >> 24; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = ubyte_to_float(g); /* g */ - dst[2] = ubyte_to_float(b); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_x8r8g8b8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - b = value >> 24; - dst[0] = r; /* r */ - dst[1] = g; /* g */ - dst[2] = b; /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_x8r8g8b8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((src[0]) & 0xff) << 8; - value |= ((src[1]) & 0xff) << 16; - value |= (src[2]) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_a8b8g8r8_unorm { - uint32_t value; - struct { - uint8_t a; - uint8_t b; - uint8_t g; - uint8_t r; - } chan; -}; - -static INLINE void -util_format_a8b8g8r8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t a; - uint32_t b; - uint32_t g; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - a = (value) & 0xff; - b = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - r = value >> 24; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = ubyte_to_float(g); /* g */ - dst[2] = ubyte_to_float(b); /* b */ - dst[3] = ubyte_to_float(a); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a8b8g8r8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (float_to_ubyte(src[3])) & 0xff; - value |= ((float_to_ubyte(src[2])) & 0xff) << 8; - value |= ((float_to_ubyte(src[1])) & 0xff) << 16; - value |= (float_to_ubyte(src[0])) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_a8b8g8r8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t a; - uint32_t b; - uint32_t g; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - a = (value) & 0xff; - b = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - r = value >> 24; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = ubyte_to_float(g); /* g */ - dst[2] = ubyte_to_float(b); /* b */ - dst[3] = ubyte_to_float(a); /* a */ -} - -static INLINE void -util_format_a8b8g8r8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t a; - uint32_t b; - uint32_t g; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - a = (value) & 0xff; - b = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - r = value >> 24; - dst[0] = r; /* r */ - dst[1] = g; /* g */ - dst[2] = b; /* b */ - dst[3] = a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a8b8g8r8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (src[3]) & 0xff; - value |= ((src[2]) & 0xff) << 8; - value |= ((src[1]) & 0xff) << 16; - value |= (src[0]) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_x8b8g8r8_unorm { - uint32_t value; - struct { - uint8_t x; - uint8_t b; - uint8_t g; - uint8_t r; - } chan; -}; - -static INLINE void -util_format_x8b8g8r8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - r = value >> 24; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = ubyte_to_float(g); /* g */ - dst[2] = ubyte_to_float(b); /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_x8b8g8r8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((float_to_ubyte(src[2])) & 0xff) << 8; - value |= ((float_to_ubyte(src[1])) & 0xff) << 16; - value |= (float_to_ubyte(src[0])) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_x8b8g8r8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - r = value >> 24; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = ubyte_to_float(g); /* g */ - dst[2] = ubyte_to_float(b); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_x8b8g8r8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - r = value >> 24; - dst[0] = r; /* r */ - dst[1] = g; /* g */ - dst[2] = b; /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_x8b8g8r8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((src[2]) & 0xff) << 8; - value |= ((src[1]) & 0xff) << 16; - value |= (src[0]) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8b8x8_unorm { - uint32_t value; - struct { - uint8_t r; - uint8_t g; - uint8_t b; - uint8_t x; - } chan; -}; - -static INLINE void -util_format_r8g8b8x8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xff; - g = (value >> 8) & 0xff; - b = (value >> 16) & 0xff; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = ubyte_to_float(g); /* g */ - dst[2] = ubyte_to_float(b); /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8x8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (float_to_ubyte(src[0])) & 0xff; - value |= ((float_to_ubyte(src[1])) & 0xff) << 8; - value |= ((float_to_ubyte(src[2])) & 0xff) << 16; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8b8x8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xff; - g = (value >> 8) & 0xff; - b = (value >> 16) & 0xff; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = ubyte_to_float(g); /* g */ - dst[2] = ubyte_to_float(b); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8g8b8x8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xff; - g = (value >> 8) & 0xff; - b = (value >> 16) & 0xff; - dst[0] = r; /* r */ - dst[1] = g; /* g */ - dst[2] = b; /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8x8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (src[0]) & 0xff; - value |= ((src[1]) & 0xff) << 8; - value |= ((src[2]) & 0xff) << 16; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_b5g5r5x1_unorm { - uint16_t value; - struct { - unsigned b:5; - unsigned g:5; - unsigned r:5; - unsigned x:1; - } chan; -}; - -static INLINE void -util_format_b5g5r5x1_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t b; - uint16_t g; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - b = (value) & 0x1f; - g = (value >> 5) & 0x1f; - r = (value >> 10) & 0x1f; - dst[0] = (float)(r * (1.0f/0x1f)); /* r */ - dst[1] = (float)(g * (1.0f/0x1f)); /* g */ - dst[2] = (float)(b * (1.0f/0x1f)); /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b5g5r5x1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= ((uint16_t)(CLAMP(src[2], 0, 1) * 0x1f)) & 0x1f; - value |= (((uint16_t)(CLAMP(src[1], 0, 1) * 0x1f)) & 0x1f) << 5; - value |= (((uint16_t)(CLAMP(src[0], 0, 1) * 0x1f)) & 0x1f) << 10; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_b5g5r5x1_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t b; - uint16_t g; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - b = (value) & 0x1f; - g = (value >> 5) & 0x1f; - r = (value >> 10) & 0x1f; - dst[0] = (float)(r * (1.0f/0x1f)); /* r */ - dst[1] = (float)(g * (1.0f/0x1f)); /* g */ - dst[2] = (float)(b * (1.0f/0x1f)); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_b5g5r5x1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t b; - uint16_t g; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - b = (value) & 0x1f; - g = (value >> 5) & 0x1f; - r = (value >> 10) & 0x1f; - dst[0] = (uint8_t)(((uint32_t)r) * 0xff / 0x1f); /* r */ - dst[1] = (uint8_t)(((uint32_t)g) * 0xff / 0x1f); /* g */ - dst[2] = (uint8_t)(((uint32_t)b) * 0xff / 0x1f); /* b */ - dst[3] = 255; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b5g5r5x1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= ((uint16_t)(src[2] >> 3)) & 0x1f; - value |= (((uint16_t)(src[1] >> 3)) & 0x1f) << 5; - value |= (((uint16_t)(src[0] >> 3)) & 0x1f) << 10; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_b5g5r5a1_unorm { - uint16_t value; - struct { - unsigned b:5; - unsigned g:5; - unsigned r:5; - unsigned a:1; - } chan; -}; - -static INLINE void -util_format_b5g5r5a1_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t b; - uint16_t g; - uint16_t r; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - b = (value) & 0x1f; - g = (value >> 5) & 0x1f; - r = (value >> 10) & 0x1f; - a = value >> 15; - dst[0] = (float)(r * (1.0f/0x1f)); /* r */ - dst[1] = (float)(g * (1.0f/0x1f)); /* g */ - dst[2] = (float)(b * (1.0f/0x1f)); /* b */ - dst[3] = (float)(a * (1.0f/0x1)); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b5g5r5a1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= ((uint16_t)(CLAMP(src[2], 0, 1) * 0x1f)) & 0x1f; - value |= (((uint16_t)(CLAMP(src[1], 0, 1) * 0x1f)) & 0x1f) << 5; - value |= (((uint16_t)(CLAMP(src[0], 0, 1) * 0x1f)) & 0x1f) << 10; - value |= ((uint16_t)(CLAMP(src[3], 0, 1) * 0x1)) << 15; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_b5g5r5a1_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t b; - uint16_t g; - uint16_t r; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - b = (value) & 0x1f; - g = (value >> 5) & 0x1f; - r = (value >> 10) & 0x1f; - a = value >> 15; - dst[0] = (float)(r * (1.0f/0x1f)); /* r */ - dst[1] = (float)(g * (1.0f/0x1f)); /* g */ - dst[2] = (float)(b * (1.0f/0x1f)); /* b */ - dst[3] = (float)(a * (1.0f/0x1)); /* a */ -} - -static INLINE void -util_format_b5g5r5a1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t b; - uint16_t g; - uint16_t r; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - b = (value) & 0x1f; - g = (value >> 5) & 0x1f; - r = (value >> 10) & 0x1f; - a = value >> 15; - dst[0] = (uint8_t)(((uint32_t)r) * 0xff / 0x1f); /* r */ - dst[1] = (uint8_t)(((uint32_t)g) * 0xff / 0x1f); /* g */ - dst[2] = (uint8_t)(((uint32_t)b) * 0xff / 0x1f); /* b */ - dst[3] = (uint8_t)(((uint32_t)a) * 0xff / 0x1); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b5g5r5a1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= ((uint16_t)(src[2] >> 3)) & 0x1f; - value |= (((uint16_t)(src[1] >> 3)) & 0x1f) << 5; - value |= (((uint16_t)(src[0] >> 3)) & 0x1f) << 10; - value |= ((uint16_t)(src[3] >> 7)) << 15; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_b4g4r4a4_unorm { - uint16_t value; - struct { - unsigned b:4; - unsigned g:4; - unsigned r:4; - unsigned a:4; - } chan; -}; - -static INLINE void -util_format_b4g4r4a4_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t b; - uint16_t g; - uint16_t r; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - b = (value) & 0xf; - g = (value >> 4) & 0xf; - r = (value >> 8) & 0xf; - a = value >> 12; - dst[0] = (float)(r * (1.0f/0xf)); /* r */ - dst[1] = (float)(g * (1.0f/0xf)); /* g */ - dst[2] = (float)(b * (1.0f/0xf)); /* b */ - dst[3] = (float)(a * (1.0f/0xf)); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b4g4r4a4_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= ((uint16_t)(CLAMP(src[2], 0, 1) * 0xf)) & 0xf; - value |= (((uint16_t)(CLAMP(src[1], 0, 1) * 0xf)) & 0xf) << 4; - value |= (((uint16_t)(CLAMP(src[0], 0, 1) * 0xf)) & 0xf) << 8; - value |= ((uint16_t)(CLAMP(src[3], 0, 1) * 0xf)) << 12; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_b4g4r4a4_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t b; - uint16_t g; - uint16_t r; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - b = (value) & 0xf; - g = (value >> 4) & 0xf; - r = (value >> 8) & 0xf; - a = value >> 12; - dst[0] = (float)(r * (1.0f/0xf)); /* r */ - dst[1] = (float)(g * (1.0f/0xf)); /* g */ - dst[2] = (float)(b * (1.0f/0xf)); /* b */ - dst[3] = (float)(a * (1.0f/0xf)); /* a */ -} - -static INLINE void -util_format_b4g4r4a4_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t b; - uint16_t g; - uint16_t r; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - b = (value) & 0xf; - g = (value >> 4) & 0xf; - r = (value >> 8) & 0xf; - a = value >> 12; - dst[0] = (uint8_t)(((uint32_t)r) * 0xff / 0xf); /* r */ - dst[1] = (uint8_t)(((uint32_t)g) * 0xff / 0xf); /* g */ - dst[2] = (uint8_t)(((uint32_t)b) * 0xff / 0xf); /* b */ - dst[3] = (uint8_t)(((uint32_t)a) * 0xff / 0xf); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b4g4r4a4_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= ((uint16_t)(src[2] >> 4)) & 0xf; - value |= (((uint16_t)(src[1] >> 4)) & 0xf) << 4; - value |= (((uint16_t)(src[0] >> 4)) & 0xf) << 8; - value |= ((uint16_t)(src[3] >> 4)) << 12; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_b4g4r4x4_unorm { - uint16_t value; - struct { - unsigned b:4; - unsigned g:4; - unsigned r:4; - unsigned x:4; - } chan; -}; - -static INLINE void -util_format_b4g4r4x4_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t b; - uint16_t g; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - b = (value) & 0xf; - g = (value >> 4) & 0xf; - r = (value >> 8) & 0xf; - dst[0] = (float)(r * (1.0f/0xf)); /* r */ - dst[1] = (float)(g * (1.0f/0xf)); /* g */ - dst[2] = (float)(b * (1.0f/0xf)); /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b4g4r4x4_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= ((uint16_t)(CLAMP(src[2], 0, 1) * 0xf)) & 0xf; - value |= (((uint16_t)(CLAMP(src[1], 0, 1) * 0xf)) & 0xf) << 4; - value |= (((uint16_t)(CLAMP(src[0], 0, 1) * 0xf)) & 0xf) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_b4g4r4x4_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t b; - uint16_t g; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - b = (value) & 0xf; - g = (value >> 4) & 0xf; - r = (value >> 8) & 0xf; - dst[0] = (float)(r * (1.0f/0xf)); /* r */ - dst[1] = (float)(g * (1.0f/0xf)); /* g */ - dst[2] = (float)(b * (1.0f/0xf)); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_b4g4r4x4_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t b; - uint16_t g; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - b = (value) & 0xf; - g = (value >> 4) & 0xf; - r = (value >> 8) & 0xf; - dst[0] = (uint8_t)(((uint32_t)r) * 0xff / 0xf); /* r */ - dst[1] = (uint8_t)(((uint32_t)g) * 0xff / 0xf); /* g */ - dst[2] = (uint8_t)(((uint32_t)b) * 0xff / 0xf); /* b */ - dst[3] = 255; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b4g4r4x4_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= ((uint16_t)(src[2] >> 4)) & 0xf; - value |= (((uint16_t)(src[1] >> 4)) & 0xf) << 4; - value |= (((uint16_t)(src[0] >> 4)) & 0xf) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_b5g6r5_unorm { - uint16_t value; - struct { - unsigned b:5; - unsigned g:6; - unsigned r:5; - } chan; -}; - -static INLINE void -util_format_b5g6r5_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t b; - uint16_t g; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - b = (value) & 0x1f; - g = (value >> 5) & 0x3f; - r = value >> 11; - dst[0] = (float)(r * (1.0f/0x1f)); /* r */ - dst[1] = (float)(g * (1.0f/0x3f)); /* g */ - dst[2] = (float)(b * (1.0f/0x1f)); /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b5g6r5_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= ((uint16_t)(CLAMP(src[2], 0, 1) * 0x1f)) & 0x1f; - value |= (((uint16_t)(CLAMP(src[1], 0, 1) * 0x3f)) & 0x3f) << 5; - value |= ((uint16_t)(CLAMP(src[0], 0, 1) * 0x1f)) << 11; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_b5g6r5_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t b; - uint16_t g; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - b = (value) & 0x1f; - g = (value >> 5) & 0x3f; - r = value >> 11; - dst[0] = (float)(r * (1.0f/0x1f)); /* r */ - dst[1] = (float)(g * (1.0f/0x3f)); /* g */ - dst[2] = (float)(b * (1.0f/0x1f)); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_b5g6r5_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t b; - uint16_t g; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - b = (value) & 0x1f; - g = (value >> 5) & 0x3f; - r = value >> 11; - dst[0] = (uint8_t)(((uint32_t)r) * 0xff / 0x1f); /* r */ - dst[1] = (uint8_t)(((uint32_t)g) * 0xff / 0x3f); /* g */ - dst[2] = (uint8_t)(((uint32_t)b) * 0xff / 0x1f); /* b */ - dst[3] = 255; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b5g6r5_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= ((uint16_t)(src[2] >> 3)) & 0x1f; - value |= (((uint16_t)(src[1] >> 2)) & 0x3f) << 5; - value |= ((uint16_t)(src[0] >> 3)) << 11; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r10g10b10a2_unorm { - uint32_t value; - struct { - unsigned r:10; - unsigned g:10; - unsigned b:10; - unsigned a:2; - } chan; -}; - -static INLINE void -util_format_r10g10b10a2_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0x3ff; - g = (value >> 10) & 0x3ff; - b = (value >> 20) & 0x3ff; - a = value >> 30; - dst[0] = (float)(r * (1.0f/0x3ff)); /* r */ - dst[1] = (float)(g * (1.0f/0x3ff)); /* g */ - dst[2] = (float)(b * (1.0f/0x3ff)); /* b */ - dst[3] = (float)(a * (1.0f/0x3)); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r10g10b10a2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint32_t)(CLAMP(src[0], 0, 1) * 0x3ff)) & 0x3ff; - value |= (((uint32_t)(CLAMP(src[1], 0, 1) * 0x3ff)) & 0x3ff) << 10; - value |= (((uint32_t)(CLAMP(src[2], 0, 1) * 0x3ff)) & 0x3ff) << 20; - value |= ((uint32_t)(CLAMP(src[3], 0, 1) * 0x3)) << 30; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r10g10b10a2_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0x3ff; - g = (value >> 10) & 0x3ff; - b = (value >> 20) & 0x3ff; - a = value >> 30; - dst[0] = (float)(r * (1.0f/0x3ff)); /* r */ - dst[1] = (float)(g * (1.0f/0x3ff)); /* g */ - dst[2] = (float)(b * (1.0f/0x3ff)); /* b */ - dst[3] = (float)(a * (1.0f/0x3)); /* a */ -} - -static INLINE void -util_format_r10g10b10a2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0x3ff; - g = (value >> 10) & 0x3ff; - b = (value >> 20) & 0x3ff; - a = value >> 30; - dst[0] = (uint8_t)(r >> 2); /* r */ - dst[1] = (uint8_t)(g >> 2); /* g */ - dst[2] = (uint8_t)(b >> 2); /* b */ - dst[3] = (uint8_t)(((uint32_t)a) * 0xff / 0x3); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r10g10b10a2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint32_t)(((uint32_t)src[0]) * 0x3ff / 0xff)) & 0x3ff; - value |= (((uint32_t)(((uint32_t)src[1]) * 0x3ff / 0xff)) & 0x3ff) << 10; - value |= (((uint32_t)(((uint32_t)src[2]) * 0x3ff / 0xff)) & 0x3ff) << 20; - value |= ((uint32_t)(src[3] >> 6)) << 30; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_b10g10r10a2_unorm { - uint32_t value; - struct { - unsigned b:10; - unsigned g:10; - unsigned r:10; - unsigned a:2; - } chan; -}; - -static INLINE void -util_format_b10g10r10a2_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0x3ff; - g = (value >> 10) & 0x3ff; - r = (value >> 20) & 0x3ff; - a = value >> 30; - dst[0] = (float)(r * (1.0f/0x3ff)); /* r */ - dst[1] = (float)(g * (1.0f/0x3ff)); /* g */ - dst[2] = (float)(b * (1.0f/0x3ff)); /* b */ - dst[3] = (float)(a * (1.0f/0x3)); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b10g10r10a2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint32_t)(CLAMP(src[2], 0, 1) * 0x3ff)) & 0x3ff; - value |= (((uint32_t)(CLAMP(src[1], 0, 1) * 0x3ff)) & 0x3ff) << 10; - value |= (((uint32_t)(CLAMP(src[0], 0, 1) * 0x3ff)) & 0x3ff) << 20; - value |= ((uint32_t)(CLAMP(src[3], 0, 1) * 0x3)) << 30; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_b10g10r10a2_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0x3ff; - g = (value >> 10) & 0x3ff; - r = (value >> 20) & 0x3ff; - a = value >> 30; - dst[0] = (float)(r * (1.0f/0x3ff)); /* r */ - dst[1] = (float)(g * (1.0f/0x3ff)); /* g */ - dst[2] = (float)(b * (1.0f/0x3ff)); /* b */ - dst[3] = (float)(a * (1.0f/0x3)); /* a */ -} - -static INLINE void -util_format_b10g10r10a2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0x3ff; - g = (value >> 10) & 0x3ff; - r = (value >> 20) & 0x3ff; - a = value >> 30; - dst[0] = (uint8_t)(r >> 2); /* r */ - dst[1] = (uint8_t)(g >> 2); /* g */ - dst[2] = (uint8_t)(b >> 2); /* b */ - dst[3] = (uint8_t)(((uint32_t)a) * 0xff / 0x3); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b10g10r10a2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint32_t)(((uint32_t)src[2]) * 0x3ff / 0xff)) & 0x3ff; - value |= (((uint32_t)(((uint32_t)src[1]) * 0x3ff / 0xff)) & 0x3ff) << 10; - value |= (((uint32_t)(((uint32_t)src[0]) * 0x3ff / 0xff)) & 0x3ff) << 20; - value |= ((uint32_t)(src[3] >> 6)) << 30; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_b2g3r3_unorm { - uint8_t value; - struct { - unsigned b:2; - unsigned g:3; - unsigned r:3; - } chan; -}; - -static INLINE void -util_format_b2g3r3_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t b; - uint8_t g; - uint8_t r; - b = (value) & 0x3; - g = (value >> 2) & 0x7; - r = value >> 5; - dst[0] = (float)(r * (1.0f/0x7)); /* r */ - dst[1] = (float)(g * (1.0f/0x7)); /* g */ - dst[2] = (float)(b * (1.0f/0x3)); /* b */ - dst[3] = 1; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b2g3r3_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= ((uint8_t)(CLAMP(src[2], 0, 1) * 0x3)) & 0x3; - value |= (((uint8_t)(CLAMP(src[1], 0, 1) * 0x7)) & 0x7) << 2; - value |= ((uint8_t)(CLAMP(src[0], 0, 1) * 0x7)) << 5; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_b2g3r3_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - uint8_t b; - uint8_t g; - uint8_t r; - b = (value) & 0x3; - g = (value >> 2) & 0x7; - r = value >> 5; - dst[0] = (float)(r * (1.0f/0x7)); /* r */ - dst[1] = (float)(g * (1.0f/0x7)); /* g */ - dst[2] = (float)(b * (1.0f/0x3)); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_b2g3r3_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t b; - uint8_t g; - uint8_t r; - b = (value) & 0x3; - g = (value >> 2) & 0x7; - r = value >> 5; - dst[0] = (uint8_t)(((uint32_t)r) * 0xff / 0x7); /* r */ - dst[1] = (uint8_t)(((uint32_t)g) * 0xff / 0x7); /* g */ - dst[2] = (uint8_t)(((uint32_t)b) * 0xff / 0x3); /* b */ - dst[3] = 255; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b2g3r3_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= ((uint8_t)(src[2] >> 6)) & 0x3; - value |= (((uint8_t)(src[1] >> 5)) & 0x7) << 2; - value |= ((uint8_t)(src[0] >> 5)) << 5; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l8_unorm { - uint8_t value; - struct { - uint8_t rgb; - } chan; -}; - -static INLINE void -util_format_l8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t rgb; - rgb = value; - dst[0] = ubyte_to_float(rgb); /* r */ - dst[1] = ubyte_to_float(rgb); /* g */ - dst[2] = ubyte_to_float(rgb); /* b */ - dst[3] = 1; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= float_to_ubyte(src[0]); - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - uint8_t rgb; - rgb = value; - dst[0] = ubyte_to_float(rgb); /* r */ - dst[1] = ubyte_to_float(rgb); /* g */ - dst[2] = ubyte_to_float(rgb); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_l8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t rgb; - rgb = value; - dst[0] = rgb; /* r */ - dst[1] = rgb; /* g */ - dst[2] = rgb; /* b */ - dst[3] = 255; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= src[0]; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_a8_unorm { - uint8_t value; - struct { - uint8_t a; - } chan; -}; - -static INLINE void -util_format_a8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t a; - a = value; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = ubyte_to_float(a); /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= float_to_ubyte(src[3]); - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_a8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - uint8_t a; - a = value; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = ubyte_to_float(a); /* a */ -} - -static INLINE void -util_format_a8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t a; - a = value; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = a; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= src[3]; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_i8_unorm { - uint8_t value; - struct { - uint8_t rgba; - } chan; -}; - -static INLINE void -util_format_i8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t rgba; - rgba = value; - dst[0] = ubyte_to_float(rgba); /* r */ - dst[1] = ubyte_to_float(rgba); /* g */ - dst[2] = ubyte_to_float(rgba); /* b */ - dst[3] = ubyte_to_float(rgba); /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= float_to_ubyte(src[0]); - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_i8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - uint8_t rgba; - rgba = value; - dst[0] = ubyte_to_float(rgba); /* r */ - dst[1] = ubyte_to_float(rgba); /* g */ - dst[2] = ubyte_to_float(rgba); /* b */ - dst[3] = ubyte_to_float(rgba); /* a */ -} - -static INLINE void -util_format_i8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t rgba; - rgba = value; - dst[0] = rgba; /* r */ - dst[1] = rgba; /* g */ - dst[2] = rgba; /* b */ - dst[3] = rgba; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= src[0]; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l4a4_unorm { - uint8_t value; - struct { - unsigned rgb:4; - unsigned a:4; - } chan; -}; - -static INLINE void -util_format_l4a4_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t rgb; - uint8_t a; - rgb = (value) & 0xf; - a = value >> 4; - dst[0] = (float)(rgb * (1.0f/0xf)); /* r */ - dst[1] = (float)(rgb * (1.0f/0xf)); /* g */ - dst[2] = (float)(rgb * (1.0f/0xf)); /* b */ - dst[3] = (float)(a * (1.0f/0xf)); /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l4a4_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= ((uint8_t)(CLAMP(src[0], 0, 1) * 0xf)) & 0xf; - value |= ((uint8_t)(CLAMP(src[3], 0, 1) * 0xf)) << 4; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l4a4_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - uint8_t rgb; - uint8_t a; - rgb = (value) & 0xf; - a = value >> 4; - dst[0] = (float)(rgb * (1.0f/0xf)); /* r */ - dst[1] = (float)(rgb * (1.0f/0xf)); /* g */ - dst[2] = (float)(rgb * (1.0f/0xf)); /* b */ - dst[3] = (float)(a * (1.0f/0xf)); /* a */ -} - -static INLINE void -util_format_l4a4_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t rgb; - uint8_t a; - rgb = (value) & 0xf; - a = value >> 4; - dst[0] = (uint8_t)(((uint32_t)rgb) * 0xff / 0xf); /* r */ - dst[1] = (uint8_t)(((uint32_t)rgb) * 0xff / 0xf); /* g */ - dst[2] = (uint8_t)(((uint32_t)rgb) * 0xff / 0xf); /* b */ - dst[3] = (uint8_t)(((uint32_t)a) * 0xff / 0xf); /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l4a4_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= ((uint8_t)(src[0] >> 4)) & 0xf; - value |= ((uint8_t)(src[3] >> 4)) << 4; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l8a8_unorm { - uint16_t value; - struct { - uint8_t rgb; - uint8_t a; - } chan; -}; - -static INLINE void -util_format_l8a8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t rgb; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = (value) & 0xff; - a = value >> 8; - dst[0] = ubyte_to_float(rgb); /* r */ - dst[1] = ubyte_to_float(rgb); /* g */ - dst[2] = ubyte_to_float(rgb); /* b */ - dst[3] = ubyte_to_float(a); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l8a8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (float_to_ubyte(src[0])) & 0xff; - value |= (float_to_ubyte(src[3])) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l8a8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t rgb; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = (value) & 0xff; - a = value >> 8; - dst[0] = ubyte_to_float(rgb); /* r */ - dst[1] = ubyte_to_float(rgb); /* g */ - dst[2] = ubyte_to_float(rgb); /* b */ - dst[3] = ubyte_to_float(a); /* a */ -} - -static INLINE void -util_format_l8a8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t rgb; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = (value) & 0xff; - a = value >> 8; - dst[0] = rgb; /* r */ - dst[1] = rgb; /* g */ - dst[2] = rgb; /* b */ - dst[3] = a; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l8a8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (src[0]) & 0xff; - value |= (src[3]) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l16_unorm { - uint16_t value; - struct { - uint16_t rgb; - } chan; -}; - -static INLINE void -util_format_l16_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t rgb; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = value; - dst[0] = (float)(rgb * (1.0f/0xffff)); /* r */ - dst[1] = (float)(rgb * (1.0f/0xffff)); /* g */ - dst[2] = (float)(rgb * (1.0f/0xffff)); /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l16_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(CLAMP(src[0], 0, 1) * 0xffff); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l16_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t rgb; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = value; - dst[0] = (float)(rgb * (1.0f/0xffff)); /* r */ - dst[1] = (float)(rgb * (1.0f/0xffff)); /* g */ - dst[2] = (float)(rgb * (1.0f/0xffff)); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_l16_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t rgb; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = value; - dst[0] = (uint8_t)(rgb >> 8); /* r */ - dst[1] = (uint8_t)(rgb >> 8); /* g */ - dst[2] = (uint8_t)(rgb >> 8); /* b */ - dst[3] = 255; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l16_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(((uint32_t)src[0]) * 0xffff / 0xff); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_a16_unorm { - uint16_t value; - struct { - uint16_t a; - } chan; -}; - -static INLINE void -util_format_a16_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - a = value; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (float)(a * (1.0f/0xffff)); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a16_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(CLAMP(src[3], 0, 1) * 0xffff); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_a16_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - a = value; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (float)(a * (1.0f/0xffff)); /* a */ -} - -static INLINE void -util_format_a16_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - a = value; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (uint8_t)(a >> 8); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a16_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(((uint32_t)src[3]) * 0xffff / 0xff); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_i16_unorm { - uint16_t value; - struct { - uint16_t rgba; - } chan; -}; - -static INLINE void -util_format_i16_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t rgba; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgba = value; - dst[0] = (float)(rgba * (1.0f/0xffff)); /* r */ - dst[1] = (float)(rgba * (1.0f/0xffff)); /* g */ - dst[2] = (float)(rgba * (1.0f/0xffff)); /* b */ - dst[3] = (float)(rgba * (1.0f/0xffff)); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i16_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(CLAMP(src[0], 0, 1) * 0xffff); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_i16_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t rgba; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgba = value; - dst[0] = (float)(rgba * (1.0f/0xffff)); /* r */ - dst[1] = (float)(rgba * (1.0f/0xffff)); /* g */ - dst[2] = (float)(rgba * (1.0f/0xffff)); /* b */ - dst[3] = (float)(rgba * (1.0f/0xffff)); /* a */ -} - -static INLINE void -util_format_i16_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t rgba; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgba = value; - dst[0] = (uint8_t)(rgba >> 8); /* r */ - dst[1] = (uint8_t)(rgba >> 8); /* g */ - dst[2] = (uint8_t)(rgba >> 8); /* b */ - dst[3] = (uint8_t)(rgba >> 8); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i16_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(((uint32_t)src[0]) * 0xffff / 0xff); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l16a16_unorm { - uint32_t value; - struct { - uint16_t rgb; - uint16_t a; - } chan; -}; - -static INLINE void -util_format_l16a16_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t rgb; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb = (value) & 0xffff; - a = value >> 16; - dst[0] = (float)(rgb * (1.0f/0xffff)); /* r */ - dst[1] = (float)(rgb * (1.0f/0xffff)); /* g */ - dst[2] = (float)(rgb * (1.0f/0xffff)); /* b */ - dst[3] = (float)(a * (1.0f/0xffff)); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l16a16_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint16_t)(CLAMP(src[0], 0, 1) * 0xffff)) & 0xffff; - value |= ((uint16_t)(CLAMP(src[3], 0, 1) * 0xffff)) << 16; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l16a16_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t rgb; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb = (value) & 0xffff; - a = value >> 16; - dst[0] = (float)(rgb * (1.0f/0xffff)); /* r */ - dst[1] = (float)(rgb * (1.0f/0xffff)); /* g */ - dst[2] = (float)(rgb * (1.0f/0xffff)); /* b */ - dst[3] = (float)(a * (1.0f/0xffff)); /* a */ -} - -static INLINE void -util_format_l16a16_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t rgb; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb = (value) & 0xffff; - a = value >> 16; - dst[0] = (uint8_t)(rgb >> 8); /* r */ - dst[1] = (uint8_t)(rgb >> 8); /* g */ - dst[2] = (uint8_t)(rgb >> 8); /* b */ - dst[3] = (uint8_t)(a >> 8); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l16a16_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint16_t)(((uint32_t)src[0]) * 0xffff / 0xff)) & 0xffff; - value |= ((uint16_t)(((uint32_t)src[3]) * 0xffff / 0xff)) << 16; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_a8_snorm { - uint8_t value; - struct { - int8_t a; - } chan; -}; - -static INLINE void -util_format_a8_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - int8_t a; - a = (int8_t)(value) ; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (float)(a * (1.0f/0x7f)); /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a8_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)((int8_t)(CLAMP(src[3], -1, 1) * 0x7f)) ; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_a8_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - int8_t a; - a = (int8_t)(value) ; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (float)(a * (1.0f/0x7f)); /* a */ -} - -static INLINE void -util_format_a8_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - int8_t a; - a = (int8_t)(value) ; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (uint8_t)(((uint32_t)MAX2(a, 0)) * 0xff / 0x7f); /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a8_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)((int8_t)(src[3] >> 1)) ; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l8_snorm { - uint8_t value; - struct { - int8_t rgb; - } chan; -}; - -static INLINE void -util_format_l8_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - int8_t rgb; - rgb = (int8_t)(value) ; - dst[0] = (float)(rgb * (1.0f/0x7f)); /* r */ - dst[1] = (float)(rgb * (1.0f/0x7f)); /* g */ - dst[2] = (float)(rgb * (1.0f/0x7f)); /* b */ - dst[3] = 1; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l8_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)((int8_t)(CLAMP(src[0], -1, 1) * 0x7f)) ; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l8_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - int8_t rgb; - rgb = (int8_t)(value) ; - dst[0] = (float)(rgb * (1.0f/0x7f)); /* r */ - dst[1] = (float)(rgb * (1.0f/0x7f)); /* g */ - dst[2] = (float)(rgb * (1.0f/0x7f)); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_l8_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - int8_t rgb; - rgb = (int8_t)(value) ; - dst[0] = (uint8_t)(((uint32_t)MAX2(rgb, 0)) * 0xff / 0x7f); /* r */ - dst[1] = (uint8_t)(((uint32_t)MAX2(rgb, 0)) * 0xff / 0x7f); /* g */ - dst[2] = (uint8_t)(((uint32_t)MAX2(rgb, 0)) * 0xff / 0x7f); /* b */ - dst[3] = 255; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l8_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)((int8_t)(src[0] >> 1)) ; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l8a8_snorm { - uint16_t value; - struct { - int8_t rgb; - int8_t a; - } chan; -}; - -static INLINE void -util_format_l8a8_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t rgb; - int16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = ((int16_t)(value << 8) ) >> 8; - a = ((int16_t)(value) ) >> 8; - dst[0] = (float)(rgb * (1.0f/0x7f)); /* r */ - dst[1] = (float)(rgb * (1.0f/0x7f)); /* g */ - dst[2] = (float)(rgb * (1.0f/0x7f)); /* b */ - dst[3] = (float)(a * (1.0f/0x7f)); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l8a8_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(((int8_t)(CLAMP(src[0], -1, 1) * 0x7f)) & 0xff) ; - value |= (uint16_t)(((int8_t)(CLAMP(src[3], -1, 1) * 0x7f)) << 8) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l8a8_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - int16_t rgb; - int16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = ((int16_t)(value << 8) ) >> 8; - a = ((int16_t)(value) ) >> 8; - dst[0] = (float)(rgb * (1.0f/0x7f)); /* r */ - dst[1] = (float)(rgb * (1.0f/0x7f)); /* g */ - dst[2] = (float)(rgb * (1.0f/0x7f)); /* b */ - dst[3] = (float)(a * (1.0f/0x7f)); /* a */ -} - -static INLINE void -util_format_l8a8_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t rgb; - int16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = ((int16_t)(value << 8) ) >> 8; - a = ((int16_t)(value) ) >> 8; - dst[0] = (uint8_t)(((uint32_t)MAX2(rgb, 0)) * 0xff / 0x7f); /* r */ - dst[1] = (uint8_t)(((uint32_t)MAX2(rgb, 0)) * 0xff / 0x7f); /* g */ - dst[2] = (uint8_t)(((uint32_t)MAX2(rgb, 0)) * 0xff / 0x7f); /* b */ - dst[3] = (uint8_t)(((uint32_t)MAX2(a, 0)) * 0xff / 0x7f); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l8a8_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(((int8_t)(src[0] >> 1)) & 0xff) ; - value |= (uint16_t)(((int8_t)(src[3] >> 1)) << 8) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_i8_snorm { - uint8_t value; - struct { - int8_t rgba; - } chan; -}; - -static INLINE void -util_format_i8_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - int8_t rgba; - rgba = (int8_t)(value) ; - dst[0] = (float)(rgba * (1.0f/0x7f)); /* r */ - dst[1] = (float)(rgba * (1.0f/0x7f)); /* g */ - dst[2] = (float)(rgba * (1.0f/0x7f)); /* b */ - dst[3] = (float)(rgba * (1.0f/0x7f)); /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i8_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)((int8_t)(CLAMP(src[0], -1, 1) * 0x7f)) ; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_i8_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - int8_t rgba; - rgba = (int8_t)(value) ; - dst[0] = (float)(rgba * (1.0f/0x7f)); /* r */ - dst[1] = (float)(rgba * (1.0f/0x7f)); /* g */ - dst[2] = (float)(rgba * (1.0f/0x7f)); /* b */ - dst[3] = (float)(rgba * (1.0f/0x7f)); /* a */ -} - -static INLINE void -util_format_i8_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - int8_t rgba; - rgba = (int8_t)(value) ; - dst[0] = (uint8_t)(((uint32_t)MAX2(rgba, 0)) * 0xff / 0x7f); /* r */ - dst[1] = (uint8_t)(((uint32_t)MAX2(rgba, 0)) * 0xff / 0x7f); /* g */ - dst[2] = (uint8_t)(((uint32_t)MAX2(rgba, 0)) * 0xff / 0x7f); /* b */ - dst[3] = (uint8_t)(((uint32_t)MAX2(rgba, 0)) * 0xff / 0x7f); /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i8_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)((int8_t)(src[0] >> 1)) ; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_a16_snorm { - uint16_t value; - struct { - int16_t a; - } chan; -}; - -static INLINE void -util_format_a16_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - a = (int16_t)(value) ; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (float)(a * (1.0f/0x7fff)); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a16_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)((int16_t)(CLAMP(src[3], -1, 1) * 0x7fff)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_a16_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - int16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - a = (int16_t)(value) ; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (float)(a * (1.0f/0x7fff)); /* a */ -} - -static INLINE void -util_format_a16_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - a = (int16_t)(value) ; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (uint8_t)(MAX2(a, 0) >> 7); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a16_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)((int16_t)(((uint32_t)src[3]) * 0x7fff / 0xff)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l16_snorm { - uint16_t value; - struct { - int16_t rgb; - } chan; -}; - -static INLINE void -util_format_l16_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t rgb; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = (int16_t)(value) ; - dst[0] = (float)(rgb * (1.0f/0x7fff)); /* r */ - dst[1] = (float)(rgb * (1.0f/0x7fff)); /* g */ - dst[2] = (float)(rgb * (1.0f/0x7fff)); /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l16_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)((int16_t)(CLAMP(src[0], -1, 1) * 0x7fff)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l16_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - int16_t rgb; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = (int16_t)(value) ; - dst[0] = (float)(rgb * (1.0f/0x7fff)); /* r */ - dst[1] = (float)(rgb * (1.0f/0x7fff)); /* g */ - dst[2] = (float)(rgb * (1.0f/0x7fff)); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_l16_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t rgb; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = (int16_t)(value) ; - dst[0] = (uint8_t)(MAX2(rgb, 0) >> 7); /* r */ - dst[1] = (uint8_t)(MAX2(rgb, 0) >> 7); /* g */ - dst[2] = (uint8_t)(MAX2(rgb, 0) >> 7); /* b */ - dst[3] = 255; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l16_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)((int16_t)(((uint32_t)src[0]) * 0x7fff / 0xff)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l16a16_snorm { - uint32_t value; - struct { - int16_t rgb; - int16_t a; - } chan; -}; - -static INLINE void -util_format_l16a16_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t rgb; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb = ((int32_t)(value << 16) ) >> 16; - a = ((int32_t)(value) ) >> 16; - dst[0] = (float)(rgb * (1.0f/0x7fff)); /* r */ - dst[1] = (float)(rgb * (1.0f/0x7fff)); /* g */ - dst[2] = (float)(rgb * (1.0f/0x7fff)); /* b */ - dst[3] = (float)(a * (1.0f/0x7fff)); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l16a16_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((int16_t)(CLAMP(src[0], -1, 1) * 0x7fff)) & 0xffff) ; - value |= (uint32_t)(((int16_t)(CLAMP(src[3], -1, 1) * 0x7fff)) << 16) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l16a16_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t rgb; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb = ((int32_t)(value << 16) ) >> 16; - a = ((int32_t)(value) ) >> 16; - dst[0] = (float)(rgb * (1.0f/0x7fff)); /* r */ - dst[1] = (float)(rgb * (1.0f/0x7fff)); /* g */ - dst[2] = (float)(rgb * (1.0f/0x7fff)); /* b */ - dst[3] = (float)(a * (1.0f/0x7fff)); /* a */ -} - -static INLINE void -util_format_l16a16_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t rgb; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb = ((int32_t)(value << 16) ) >> 16; - a = ((int32_t)(value) ) >> 16; - dst[0] = (uint8_t)(MAX2(rgb, 0) >> 7); /* r */ - dst[1] = (uint8_t)(MAX2(rgb, 0) >> 7); /* g */ - dst[2] = (uint8_t)(MAX2(rgb, 0) >> 7); /* b */ - dst[3] = (uint8_t)(MAX2(a, 0) >> 7); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l16a16_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((int16_t)(((uint32_t)src[0]) * 0x7fff / 0xff)) & 0xffff) ; - value |= (uint32_t)(((int16_t)(((uint32_t)src[3]) * 0x7fff / 0xff)) << 16) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_i16_snorm { - uint16_t value; - struct { - int16_t rgba; - } chan; -}; - -static INLINE void -util_format_i16_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t rgba; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgba = (int16_t)(value) ; - dst[0] = (float)(rgba * (1.0f/0x7fff)); /* r */ - dst[1] = (float)(rgba * (1.0f/0x7fff)); /* g */ - dst[2] = (float)(rgba * (1.0f/0x7fff)); /* b */ - dst[3] = (float)(rgba * (1.0f/0x7fff)); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i16_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)((int16_t)(CLAMP(src[0], -1, 1) * 0x7fff)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_i16_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - int16_t rgba; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgba = (int16_t)(value) ; - dst[0] = (float)(rgba * (1.0f/0x7fff)); /* r */ - dst[1] = (float)(rgba * (1.0f/0x7fff)); /* g */ - dst[2] = (float)(rgba * (1.0f/0x7fff)); /* b */ - dst[3] = (float)(rgba * (1.0f/0x7fff)); /* a */ -} - -static INLINE void -util_format_i16_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t rgba; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgba = (int16_t)(value) ; - dst[0] = (uint8_t)(MAX2(rgba, 0) >> 7); /* r */ - dst[1] = (uint8_t)(MAX2(rgba, 0) >> 7); /* g */ - dst[2] = (uint8_t)(MAX2(rgba, 0) >> 7); /* b */ - dst[3] = (uint8_t)(MAX2(rgba, 0) >> 7); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i16_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)((int16_t)(((uint32_t)src[0]) * 0x7fff / 0xff)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_a16_float { - uint16_t value; - struct { - uint16_t a; - } chan; -}; - -static INLINE void -util_format_a16_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_a16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = util_half_to_float(pixel.chan.a); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a16_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_a16_float pixel; - pixel.chan.a = util_float_to_half(src[3]); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_a16_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_a16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = util_half_to_float(pixel.chan.a); /* a */ -} - -static INLINE void -util_format_a16_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_a16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = float_to_ubyte(util_half_to_float(pixel.chan.a)); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a16_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_a16_float pixel; - pixel.chan.a = util_float_to_half((float)(src[3] * (1.0f/0xff))); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l16_float { - uint16_t value; - struct { - uint16_t rgb; - } chan; -}; - -static INLINE void -util_format_l16_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_l16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = util_half_to_float(pixel.chan.rgb); /* r */ - dst[1] = util_half_to_float(pixel.chan.rgb); /* g */ - dst[2] = util_half_to_float(pixel.chan.rgb); /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l16_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_l16_float pixel; - pixel.chan.rgb = util_float_to_half(src[0]); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l16_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_l16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = util_half_to_float(pixel.chan.rgb); /* r */ - dst[1] = util_half_to_float(pixel.chan.rgb); /* g */ - dst[2] = util_half_to_float(pixel.chan.rgb); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_l16_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_l16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = float_to_ubyte(util_half_to_float(pixel.chan.rgb)); /* r */ - dst[1] = float_to_ubyte(util_half_to_float(pixel.chan.rgb)); /* g */ - dst[2] = float_to_ubyte(util_half_to_float(pixel.chan.rgb)); /* b */ - dst[3] = 255; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l16_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_l16_float pixel; - pixel.chan.rgb = util_float_to_half((float)(src[0] * (1.0f/0xff))); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l16a16_float { - uint32_t value; - struct { - uint16_t rgb; - uint16_t a; - } chan; -}; - -static INLINE void -util_format_l16a16_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_l16a16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = util_half_to_float(pixel.chan.rgb); /* r */ - dst[1] = util_half_to_float(pixel.chan.rgb); /* g */ - dst[2] = util_half_to_float(pixel.chan.rgb); /* b */ - dst[3] = util_half_to_float(pixel.chan.a); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l16a16_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_l16a16_float pixel; - pixel.chan.rgb = util_float_to_half(src[0]); - pixel.chan.a = util_float_to_half(src[3]); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l16a16_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_l16a16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = util_half_to_float(pixel.chan.rgb); /* r */ - dst[1] = util_half_to_float(pixel.chan.rgb); /* g */ - dst[2] = util_half_to_float(pixel.chan.rgb); /* b */ - dst[3] = util_half_to_float(pixel.chan.a); /* a */ -} - -static INLINE void -util_format_l16a16_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_l16a16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = float_to_ubyte(util_half_to_float(pixel.chan.rgb)); /* r */ - dst[1] = float_to_ubyte(util_half_to_float(pixel.chan.rgb)); /* g */ - dst[2] = float_to_ubyte(util_half_to_float(pixel.chan.rgb)); /* b */ - dst[3] = float_to_ubyte(util_half_to_float(pixel.chan.a)); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l16a16_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_l16a16_float pixel; - pixel.chan.rgb = util_float_to_half((float)(src[0] * (1.0f/0xff))); - pixel.chan.a = util_float_to_half((float)(src[3] * (1.0f/0xff))); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_i16_float { - uint16_t value; - struct { - uint16_t rgba; - } chan; -}; - -static INLINE void -util_format_i16_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_i16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = util_half_to_float(pixel.chan.rgba); /* r */ - dst[1] = util_half_to_float(pixel.chan.rgba); /* g */ - dst[2] = util_half_to_float(pixel.chan.rgba); /* b */ - dst[3] = util_half_to_float(pixel.chan.rgba); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i16_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_i16_float pixel; - pixel.chan.rgba = util_float_to_half(src[0]); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_i16_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_i16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = util_half_to_float(pixel.chan.rgba); /* r */ - dst[1] = util_half_to_float(pixel.chan.rgba); /* g */ - dst[2] = util_half_to_float(pixel.chan.rgba); /* b */ - dst[3] = util_half_to_float(pixel.chan.rgba); /* a */ -} - -static INLINE void -util_format_i16_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_i16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = float_to_ubyte(util_half_to_float(pixel.chan.rgba)); /* r */ - dst[1] = float_to_ubyte(util_half_to_float(pixel.chan.rgba)); /* g */ - dst[2] = float_to_ubyte(util_half_to_float(pixel.chan.rgba)); /* b */ - dst[3] = float_to_ubyte(util_half_to_float(pixel.chan.rgba)); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i16_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_i16_float pixel; - pixel.chan.rgba = util_float_to_half((float)(src[0] * (1.0f/0xff))); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_a32_float { - uint32_t value; - struct { - float a; - } chan; -}; - -static INLINE void -util_format_a32_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_a32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = pixel.chan.a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a32_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_a32_float pixel; - pixel.chan.a = src[3]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_a32_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_a32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = pixel.chan.a; /* a */ -} - -static INLINE void -util_format_a32_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_a32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = float_to_ubyte(pixel.chan.a); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a32_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_a32_float pixel; - pixel.chan.a = ubyte_to_float(src[3]); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l32_float { - uint32_t value; - struct { - float rgb; - } chan; -}; - -static INLINE void -util_format_l32_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_l32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.rgb; /* r */ - dst[1] = pixel.chan.rgb; /* g */ - dst[2] = pixel.chan.rgb; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l32_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_l32_float pixel; - pixel.chan.rgb = src[0]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l32_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_l32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.rgb; /* r */ - dst[1] = pixel.chan.rgb; /* g */ - dst[2] = pixel.chan.rgb; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_l32_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_l32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = float_to_ubyte(pixel.chan.rgb); /* r */ - dst[1] = float_to_ubyte(pixel.chan.rgb); /* g */ - dst[2] = float_to_ubyte(pixel.chan.rgb); /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l32_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_l32_float pixel; - pixel.chan.rgb = ubyte_to_float(src[0]); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l32a32_float { - uint64_t value; - struct { - float rgb; - float a; - } chan; -}; - -static INLINE void -util_format_l32a32_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_l32a32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.rgb; /* r */ - dst[1] = pixel.chan.rgb; /* g */ - dst[2] = pixel.chan.rgb; /* b */ - dst[3] = pixel.chan.a; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l32a32_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_l32a32_float pixel; - pixel.chan.rgb = src[0]; - pixel.chan.a = src[3]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l32a32_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_l32a32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.rgb; /* r */ - dst[1] = pixel.chan.rgb; /* g */ - dst[2] = pixel.chan.rgb; /* b */ - dst[3] = pixel.chan.a; /* a */ -} - -static INLINE void -util_format_l32a32_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_l32a32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = float_to_ubyte(pixel.chan.rgb); /* r */ - dst[1] = float_to_ubyte(pixel.chan.rgb); /* g */ - dst[2] = float_to_ubyte(pixel.chan.rgb); /* b */ - dst[3] = float_to_ubyte(pixel.chan.a); /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l32a32_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_l32a32_float pixel; - pixel.chan.rgb = ubyte_to_float(src[0]); - pixel.chan.a = ubyte_to_float(src[3]); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_i32_float { - uint32_t value; - struct { - float rgba; - } chan; -}; - -static INLINE void -util_format_i32_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_i32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.rgba; /* r */ - dst[1] = pixel.chan.rgba; /* g */ - dst[2] = pixel.chan.rgba; /* b */ - dst[3] = pixel.chan.rgba; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i32_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_i32_float pixel; - pixel.chan.rgba = src[0]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_i32_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_i32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.rgba; /* r */ - dst[1] = pixel.chan.rgba; /* g */ - dst[2] = pixel.chan.rgba; /* b */ - dst[3] = pixel.chan.rgba; /* a */ -} - -static INLINE void -util_format_i32_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_i32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = float_to_ubyte(pixel.chan.rgba); /* r */ - dst[1] = float_to_ubyte(pixel.chan.rgba); /* g */ - dst[2] = float_to_ubyte(pixel.chan.rgba); /* b */ - dst[3] = float_to_ubyte(pixel.chan.rgba); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i32_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_i32_float pixel; - pixel.chan.rgba = ubyte_to_float(src[0]); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l8_srgb { - uint8_t value; - struct { - uint8_t rgb; - } chan; -}; - -static INLINE void -util_format_l8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t rgb; - rgb = value; - dst[0] = util_format_srgb_8unorm_to_linear_float(rgb); /* r */ - dst[1] = util_format_srgb_8unorm_to_linear_float(rgb); /* g */ - dst[2] = util_format_srgb_8unorm_to_linear_float(rgb); /* b */ - dst[3] = 1; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= util_format_linear_float_to_srgb_8unorm(src[0]); - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - uint8_t rgb; - rgb = value; - dst[0] = util_format_srgb_8unorm_to_linear_float(rgb); /* r */ - dst[1] = util_format_srgb_8unorm_to_linear_float(rgb); /* g */ - dst[2] = util_format_srgb_8unorm_to_linear_float(rgb); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_l8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t rgb; - rgb = value; - dst[0] = util_format_srgb_to_linear_8unorm(rgb); /* r */ - dst[1] = util_format_srgb_to_linear_8unorm(rgb); /* g */ - dst[2] = util_format_srgb_to_linear_8unorm(rgb); /* b */ - dst[3] = 255; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= util_format_linear_to_srgb_8unorm(src[0]); - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l8a8_srgb { - uint16_t value; - struct { - uint8_t rgb; - uint8_t a; - } chan; -}; - -static INLINE void -util_format_l8a8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t rgb; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = (value) & 0xff; - a = value >> 8; - dst[0] = util_format_srgb_8unorm_to_linear_float(rgb); /* r */ - dst[1] = util_format_srgb_8unorm_to_linear_float(rgb); /* g */ - dst[2] = util_format_srgb_8unorm_to_linear_float(rgb); /* b */ - dst[3] = ubyte_to_float(a); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l8a8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (util_format_linear_float_to_srgb_8unorm(src[0])) & 0xff; - value |= (float_to_ubyte(src[3])) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l8a8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t rgb; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = (value) & 0xff; - a = value >> 8; - dst[0] = util_format_srgb_8unorm_to_linear_float(rgb); /* r */ - dst[1] = util_format_srgb_8unorm_to_linear_float(rgb); /* g */ - dst[2] = util_format_srgb_8unorm_to_linear_float(rgb); /* b */ - dst[3] = ubyte_to_float(a); /* a */ -} - -static INLINE void -util_format_l8a8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t rgb; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = (value) & 0xff; - a = value >> 8; - dst[0] = util_format_srgb_to_linear_8unorm(rgb); /* r */ - dst[1] = util_format_srgb_to_linear_8unorm(rgb); /* g */ - dst[2] = util_format_srgb_to_linear_8unorm(rgb); /* b */ - dst[3] = a; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l8a8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (util_format_linear_to_srgb_8unorm(src[0])) & 0xff; - value |= (src[3]) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8b8_srgb { - struct { - uint8_t r; - uint8_t g; - uint8_t b; - } chan; -}; - -static INLINE void -util_format_r8g8b8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_srgb pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = util_format_srgb_8unorm_to_linear_float(pixel.chan.r); /* r */ - dst[1] = util_format_srgb_8unorm_to_linear_float(pixel.chan.g); /* g */ - dst[2] = util_format_srgb_8unorm_to_linear_float(pixel.chan.b); /* b */ - dst[3] = 1; /* a */ - src += 3; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_srgb pixel; - pixel.chan.r = util_format_linear_float_to_srgb_8unorm(src[0]); - pixel.chan.g = util_format_linear_float_to_srgb_8unorm(src[1]); - pixel.chan.b = util_format_linear_float_to_srgb_8unorm(src[2]); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 3; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8b8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r8g8b8_srgb pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = util_format_srgb_8unorm_to_linear_float(pixel.chan.r); /* r */ - dst[1] = util_format_srgb_8unorm_to_linear_float(pixel.chan.g); /* g */ - dst[2] = util_format_srgb_8unorm_to_linear_float(pixel.chan.b); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8g8b8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_srgb pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = util_format_srgb_to_linear_8unorm(pixel.chan.r); /* r */ - dst[1] = util_format_srgb_to_linear_8unorm(pixel.chan.g); /* g */ - dst[2] = util_format_srgb_to_linear_8unorm(pixel.chan.b); /* b */ - dst[3] = 255; /* a */ - src += 3; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_srgb pixel; - pixel.chan.r = util_format_linear_to_srgb_8unorm(src[0]); - pixel.chan.g = util_format_linear_to_srgb_8unorm(src[1]); - pixel.chan.b = util_format_linear_to_srgb_8unorm(src[2]); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 3; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8b8a8_srgb { - uint32_t value; - struct { - uint8_t r; - uint8_t g; - uint8_t b; - uint8_t a; - } chan; -}; - -static INLINE void -util_format_r8g8b8a8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xff; - g = (value >> 8) & 0xff; - b = (value >> 16) & 0xff; - a = value >> 24; - dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */ - dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */ - dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */ - dst[3] = ubyte_to_float(a); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8a8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (util_format_linear_float_to_srgb_8unorm(src[0])) & 0xff; - value |= ((util_format_linear_float_to_srgb_8unorm(src[1])) & 0xff) << 8; - value |= ((util_format_linear_float_to_srgb_8unorm(src[2])) & 0xff) << 16; - value |= (float_to_ubyte(src[3])) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8b8a8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xff; - g = (value >> 8) & 0xff; - b = (value >> 16) & 0xff; - a = value >> 24; - dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */ - dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */ - dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */ - dst[3] = ubyte_to_float(a); /* a */ -} - -static INLINE void -util_format_r8g8b8a8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xff; - g = (value >> 8) & 0xff; - b = (value >> 16) & 0xff; - a = value >> 24; - dst[0] = util_format_srgb_to_linear_8unorm(r); /* r */ - dst[1] = util_format_srgb_to_linear_8unorm(g); /* g */ - dst[2] = util_format_srgb_to_linear_8unorm(b); /* b */ - dst[3] = a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8a8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (util_format_linear_to_srgb_8unorm(src[0])) & 0xff; - value |= ((util_format_linear_to_srgb_8unorm(src[1])) & 0xff) << 8; - value |= ((util_format_linear_to_srgb_8unorm(src[2])) & 0xff) << 16; - value |= (src[3]) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_a8b8g8r8_srgb { - uint32_t value; - struct { - uint8_t a; - uint8_t b; - uint8_t g; - uint8_t r; - } chan; -}; - -static INLINE void -util_format_a8b8g8r8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t a; - uint32_t b; - uint32_t g; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - a = (value) & 0xff; - b = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - r = value >> 24; - dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */ - dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */ - dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */ - dst[3] = ubyte_to_float(a); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a8b8g8r8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (float_to_ubyte(src[3])) & 0xff; - value |= ((util_format_linear_float_to_srgb_8unorm(src[2])) & 0xff) << 8; - value |= ((util_format_linear_float_to_srgb_8unorm(src[1])) & 0xff) << 16; - value |= (util_format_linear_float_to_srgb_8unorm(src[0])) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_a8b8g8r8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t a; - uint32_t b; - uint32_t g; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - a = (value) & 0xff; - b = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - r = value >> 24; - dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */ - dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */ - dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */ - dst[3] = ubyte_to_float(a); /* a */ -} - -static INLINE void -util_format_a8b8g8r8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t a; - uint32_t b; - uint32_t g; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - a = (value) & 0xff; - b = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - r = value >> 24; - dst[0] = util_format_srgb_to_linear_8unorm(r); /* r */ - dst[1] = util_format_srgb_to_linear_8unorm(g); /* g */ - dst[2] = util_format_srgb_to_linear_8unorm(b); /* b */ - dst[3] = a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a8b8g8r8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (src[3]) & 0xff; - value |= ((util_format_linear_to_srgb_8unorm(src[2])) & 0xff) << 8; - value |= ((util_format_linear_to_srgb_8unorm(src[1])) & 0xff) << 16; - value |= (util_format_linear_to_srgb_8unorm(src[0])) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_x8b8g8r8_srgb { - uint32_t value; - struct { - uint8_t x; - uint8_t b; - uint8_t g; - uint8_t r; - } chan; -}; - -static INLINE void -util_format_x8b8g8r8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - r = value >> 24; - dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */ - dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */ - dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_x8b8g8r8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((util_format_linear_float_to_srgb_8unorm(src[2])) & 0xff) << 8; - value |= ((util_format_linear_float_to_srgb_8unorm(src[1])) & 0xff) << 16; - value |= (util_format_linear_float_to_srgb_8unorm(src[0])) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_x8b8g8r8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - r = value >> 24; - dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */ - dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */ - dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_x8b8g8r8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - r = value >> 24; - dst[0] = util_format_srgb_to_linear_8unorm(r); /* r */ - dst[1] = util_format_srgb_to_linear_8unorm(g); /* g */ - dst[2] = util_format_srgb_to_linear_8unorm(b); /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_x8b8g8r8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((util_format_linear_to_srgb_8unorm(src[2])) & 0xff) << 8; - value |= ((util_format_linear_to_srgb_8unorm(src[1])) & 0xff) << 16; - value |= (util_format_linear_to_srgb_8unorm(src[0])) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_b8g8r8a8_srgb { - uint32_t value; - struct { - uint8_t b; - uint8_t g; - uint8_t r; - uint8_t a; - } chan; -}; - -static INLINE void -util_format_b8g8r8a8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0xff; - g = (value >> 8) & 0xff; - r = (value >> 16) & 0xff; - a = value >> 24; - dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */ - dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */ - dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */ - dst[3] = ubyte_to_float(a); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b8g8r8a8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (util_format_linear_float_to_srgb_8unorm(src[2])) & 0xff; - value |= ((util_format_linear_float_to_srgb_8unorm(src[1])) & 0xff) << 8; - value |= ((util_format_linear_float_to_srgb_8unorm(src[0])) & 0xff) << 16; - value |= (float_to_ubyte(src[3])) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_b8g8r8a8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0xff; - g = (value >> 8) & 0xff; - r = (value >> 16) & 0xff; - a = value >> 24; - dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */ - dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */ - dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */ - dst[3] = ubyte_to_float(a); /* a */ -} - -static INLINE void -util_format_b8g8r8a8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0xff; - g = (value >> 8) & 0xff; - r = (value >> 16) & 0xff; - a = value >> 24; - dst[0] = util_format_srgb_to_linear_8unorm(r); /* r */ - dst[1] = util_format_srgb_to_linear_8unorm(g); /* g */ - dst[2] = util_format_srgb_to_linear_8unorm(b); /* b */ - dst[3] = a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b8g8r8a8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (util_format_linear_to_srgb_8unorm(src[2])) & 0xff; - value |= ((util_format_linear_to_srgb_8unorm(src[1])) & 0xff) << 8; - value |= ((util_format_linear_to_srgb_8unorm(src[0])) & 0xff) << 16; - value |= (src[3]) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_b8g8r8x8_srgb { - uint32_t value; - struct { - uint8_t b; - uint8_t g; - uint8_t r; - uint8_t x; - } chan; -}; - -static INLINE void -util_format_b8g8r8x8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0xff; - g = (value >> 8) & 0xff; - r = (value >> 16) & 0xff; - dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */ - dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */ - dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b8g8r8x8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (util_format_linear_float_to_srgb_8unorm(src[2])) & 0xff; - value |= ((util_format_linear_float_to_srgb_8unorm(src[1])) & 0xff) << 8; - value |= ((util_format_linear_float_to_srgb_8unorm(src[0])) & 0xff) << 16; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_b8g8r8x8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0xff; - g = (value >> 8) & 0xff; - r = (value >> 16) & 0xff; - dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */ - dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */ - dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_b8g8r8x8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0xff; - g = (value >> 8) & 0xff; - r = (value >> 16) & 0xff; - dst[0] = util_format_srgb_to_linear_8unorm(r); /* r */ - dst[1] = util_format_srgb_to_linear_8unorm(g); /* g */ - dst[2] = util_format_srgb_to_linear_8unorm(b); /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b8g8r8x8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (util_format_linear_to_srgb_8unorm(src[2])) & 0xff; - value |= ((util_format_linear_to_srgb_8unorm(src[1])) & 0xff) << 8; - value |= ((util_format_linear_to_srgb_8unorm(src[0])) & 0xff) << 16; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_a8r8g8b8_srgb { - uint32_t value; - struct { - uint8_t a; - uint8_t r; - uint8_t g; - uint8_t b; - } chan; -}; - -static INLINE void -util_format_a8r8g8b8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t a; - uint32_t r; - uint32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - a = (value) & 0xff; - r = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - b = value >> 24; - dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */ - dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */ - dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */ - dst[3] = ubyte_to_float(a); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a8r8g8b8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (float_to_ubyte(src[3])) & 0xff; - value |= ((util_format_linear_float_to_srgb_8unorm(src[0])) & 0xff) << 8; - value |= ((util_format_linear_float_to_srgb_8unorm(src[1])) & 0xff) << 16; - value |= (util_format_linear_float_to_srgb_8unorm(src[2])) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_a8r8g8b8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t a; - uint32_t r; - uint32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - a = (value) & 0xff; - r = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - b = value >> 24; - dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */ - dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */ - dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */ - dst[3] = ubyte_to_float(a); /* a */ -} - -static INLINE void -util_format_a8r8g8b8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t a; - uint32_t r; - uint32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - a = (value) & 0xff; - r = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - b = value >> 24; - dst[0] = util_format_srgb_to_linear_8unorm(r); /* r */ - dst[1] = util_format_srgb_to_linear_8unorm(g); /* g */ - dst[2] = util_format_srgb_to_linear_8unorm(b); /* b */ - dst[3] = a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a8r8g8b8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (src[3]) & 0xff; - value |= ((util_format_linear_to_srgb_8unorm(src[0])) & 0xff) << 8; - value |= ((util_format_linear_to_srgb_8unorm(src[1])) & 0xff) << 16; - value |= (util_format_linear_to_srgb_8unorm(src[2])) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_x8r8g8b8_srgb { - uint32_t value; - struct { - uint8_t x; - uint8_t r; - uint8_t g; - uint8_t b; - } chan; -}; - -static INLINE void -util_format_x8r8g8b8_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - b = value >> 24; - dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */ - dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */ - dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_x8r8g8b8_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((util_format_linear_float_to_srgb_8unorm(src[0])) & 0xff) << 8; - value |= ((util_format_linear_float_to_srgb_8unorm(src[1])) & 0xff) << 16; - value |= (util_format_linear_float_to_srgb_8unorm(src[2])) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_x8r8g8b8_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - b = value >> 24; - dst[0] = util_format_srgb_8unorm_to_linear_float(r); /* r */ - dst[1] = util_format_srgb_8unorm_to_linear_float(g); /* g */ - dst[2] = util_format_srgb_8unorm_to_linear_float(b); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_x8r8g8b8_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value >> 8) & 0xff; - g = (value >> 16) & 0xff; - b = value >> 24; - dst[0] = util_format_srgb_to_linear_8unorm(r); /* r */ - dst[1] = util_format_srgb_to_linear_8unorm(g); /* g */ - dst[2] = util_format_srgb_to_linear_8unorm(b); /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_x8r8g8b8_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((util_format_linear_to_srgb_8unorm(src[0])) & 0xff) << 8; - value |= ((util_format_linear_to_srgb_8unorm(src[1])) & 0xff) << 16; - value |= (util_format_linear_to_srgb_8unorm(src[2])) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8sg8sb8ux8u_norm { - uint32_t value; - struct { - int8_t r; - int8_t g; - uint8_t b; - uint8_t x; - } chan; -}; - -static INLINE void -util_format_r8sg8sb8ux8u_norm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 24) ) >> 24; - g = ((int32_t)(value << 16) ) >> 24; - b = (value >> 16) & 0xff; - dst[0] = (float)(r * (1.0f/0x7f)); /* r */ - dst[1] = (float)(g * (1.0f/0x7f)); /* g */ - dst[2] = ubyte_to_float(b); /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8sg8sb8ux8u_norm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((int8_t)(CLAMP(src[0], -1, 1) * 0x7f)) & 0xff) ; - value |= (uint32_t)((((int8_t)(CLAMP(src[1], -1, 1) * 0x7f)) & 0xff) << 8) ; - value |= ((float_to_ubyte(src[2])) & 0xff) << 16; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8sg8sb8ux8u_norm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 24) ) >> 24; - g = ((int32_t)(value << 16) ) >> 24; - b = (value >> 16) & 0xff; - dst[0] = (float)(r * (1.0f/0x7f)); /* r */ - dst[1] = (float)(g * (1.0f/0x7f)); /* g */ - dst[2] = ubyte_to_float(b); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8sg8sb8ux8u_norm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 24) ) >> 24; - g = ((int32_t)(value << 16) ) >> 24; - b = (value >> 16) & 0xff; - dst[0] = (uint8_t)(((uint32_t)MAX2(r, 0)) * 0xff / 0x7f); /* r */ - dst[1] = (uint8_t)(((uint32_t)MAX2(g, 0)) * 0xff / 0x7f); /* g */ - dst[2] = b; /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8sg8sb8ux8u_norm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((int8_t)(src[0] >> 1)) & 0xff) ; - value |= (uint32_t)((((int8_t)(src[1] >> 1)) & 0xff) << 8) ; - value |= ((src[2]) & 0xff) << 16; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r10sg10sb10sa2u_norm { - uint32_t value; - struct { - int r:10; - int g:10; - int b:10; - unsigned a:2; - } chan; -}; - -static INLINE void -util_format_r10sg10sb10sa2u_norm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 22) ) >> 22; - g = ((int32_t)(value << 12) ) >> 22; - b = ((int32_t)(value << 2) ) >> 22; - a = value >> 30; - dst[0] = (float)(r * (1.0f/0x1ff)); /* r */ - dst[1] = (float)(g * (1.0f/0x1ff)); /* g */ - dst[2] = (float)(b * (1.0f/0x1ff)); /* b */ - dst[3] = (float)(a * (1.0f/0x3)); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r10sg10sb10sa2u_norm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((uint32_t)(CLAMP(src[0], -1, 1) * 0x1ff)) & 0x3ff) ; - value |= (uint32_t)((((uint32_t)(CLAMP(src[1], -1, 1) * 0x1ff)) & 0x3ff) << 10) ; - value |= (uint32_t)((((uint32_t)(CLAMP(src[2], -1, 1) * 0x1ff)) & 0x3ff) << 20) ; - value |= ((uint32_t)(CLAMP(src[3], 0, 1) * 0x3)) << 30; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r10sg10sb10sa2u_norm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 22) ) >> 22; - g = ((int32_t)(value << 12) ) >> 22; - b = ((int32_t)(value << 2) ) >> 22; - a = value >> 30; - dst[0] = (float)(r * (1.0f/0x1ff)); /* r */ - dst[1] = (float)(g * (1.0f/0x1ff)); /* g */ - dst[2] = (float)(b * (1.0f/0x1ff)); /* b */ - dst[3] = (float)(a * (1.0f/0x3)); /* a */ -} - -static INLINE void -util_format_r10sg10sb10sa2u_norm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 22) ) >> 22; - g = ((int32_t)(value << 12) ) >> 22; - b = ((int32_t)(value << 2) ) >> 22; - a = value >> 30; - dst[0] = (uint8_t)(MAX2(r, 0) >> 1); /* r */ - dst[1] = (uint8_t)(MAX2(g, 0) >> 1); /* g */ - dst[2] = (uint8_t)(MAX2(b, 0) >> 1); /* b */ - dst[3] = (uint8_t)(((uint32_t)a) * 0xff / 0x3); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r10sg10sb10sa2u_norm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((uint32_t)(((uint32_t)src[0]) * 0x1ff / 0xff)) & 0x3ff) ; - value |= (uint32_t)((((uint32_t)(((uint32_t)src[1]) * 0x1ff / 0xff)) & 0x3ff) << 10) ; - value |= (uint32_t)((((uint32_t)(((uint32_t)src[2]) * 0x1ff / 0xff)) & 0x3ff) << 20) ; - value |= ((uint32_t)(src[3] >> 6)) << 30; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r5sg5sb6u_norm { - uint16_t value; - struct { - int r:5; - int g:5; - unsigned b:6; - } chan; -}; - -static INLINE void -util_format_r5sg5sb6u_norm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t r; - int16_t g; - uint16_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = ((int16_t)(value << 11) ) >> 11; - g = ((int16_t)(value << 6) ) >> 11; - b = value >> 10; - dst[0] = (float)(r * (1.0f/0xf)); /* r */ - dst[1] = (float)(g * (1.0f/0xf)); /* g */ - dst[2] = (float)(b * (1.0f/0x3f)); /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r5sg5sb6u_norm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(((uint16_t)(CLAMP(src[0], -1, 1) * 0xf)) & 0x1f) ; - value |= (uint16_t)((((uint16_t)(CLAMP(src[1], -1, 1) * 0xf)) & 0x1f) << 5) ; - value |= ((uint16_t)(CLAMP(src[2], 0, 1) * 0x3f)) << 10; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r5sg5sb6u_norm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - int16_t r; - int16_t g; - uint16_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = ((int16_t)(value << 11) ) >> 11; - g = ((int16_t)(value << 6) ) >> 11; - b = value >> 10; - dst[0] = (float)(r * (1.0f/0xf)); /* r */ - dst[1] = (float)(g * (1.0f/0xf)); /* g */ - dst[2] = (float)(b * (1.0f/0x3f)); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r5sg5sb6u_norm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t r; - int16_t g; - uint16_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = ((int16_t)(value << 11) ) >> 11; - g = ((int16_t)(value << 6) ) >> 11; - b = value >> 10; - dst[0] = (uint8_t)(((uint32_t)MAX2(r, 0)) * 0xff / 0xf); /* r */ - dst[1] = (uint8_t)(((uint32_t)MAX2(g, 0)) * 0xff / 0xf); /* g */ - dst[2] = (uint8_t)(((uint32_t)b) * 0xff / 0x3f); /* b */ - dst[3] = 255; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r5sg5sb6u_norm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(((uint16_t)(src[0] >> 4)) & 0x1f) ; - value |= (uint16_t)((((uint16_t)(src[1] >> 4)) & 0x1f) << 5) ; - value |= ((uint16_t)(src[2] >> 2)) << 10; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r64_float { - uint64_t value; - struct { - double r; - } chan; -}; - -static INLINE void -util_format_r64_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r64_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r64_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r64_float pixel; - pixel.chan.r = (double)src[0]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r64_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r64_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r64_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r64_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(CLAMP(pixel.chan.r, 0, 1) * 0xff); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r64_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r64_float pixel; - pixel.chan.r = (double)(src[0] * (1.0f/0xff)); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r64g64_float { - struct { - double r; - double g; - } chan; -}; - -static INLINE void -util_format_r64g64_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r64g64_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 16; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r64g64_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r64g64_float pixel; - pixel.chan.r = (double)src[0]; - pixel.chan.g = (double)src[1]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 16; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r64g64_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r64g64_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r64g64_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r64g64_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(CLAMP(pixel.chan.r, 0, 1) * 0xff); /* r */ - dst[1] = (uint8_t)(CLAMP(pixel.chan.g, 0, 1) * 0xff); /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 16; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r64g64_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r64g64_float pixel; - pixel.chan.r = (double)(src[0] * (1.0f/0xff)); - pixel.chan.g = (double)(src[1] * (1.0f/0xff)); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 16; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r64g64b64_float { - struct { - double r; - double g; - double b; - } chan; -}; - -static INLINE void -util_format_r64g64b64_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r64g64b64_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ - src += 24; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r64g64b64_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r64g64b64_float pixel; - pixel.chan.r = (double)src[0]; - pixel.chan.g = (double)src[1]; - pixel.chan.b = (double)src[2]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 24; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r64g64b64_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r64g64b64_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r64g64b64_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r64g64b64_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(CLAMP(pixel.chan.r, 0, 1) * 0xff); /* r */ - dst[1] = (uint8_t)(CLAMP(pixel.chan.g, 0, 1) * 0xff); /* g */ - dst[2] = (uint8_t)(CLAMP(pixel.chan.b, 0, 1) * 0xff); /* b */ - dst[3] = 255; /* a */ - src += 24; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r64g64b64_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r64g64b64_float pixel; - pixel.chan.r = (double)(src[0] * (1.0f/0xff)); - pixel.chan.g = (double)(src[1] * (1.0f/0xff)); - pixel.chan.b = (double)(src[2] * (1.0f/0xff)); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 24; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r64g64b64a64_float { - struct { - double r; - double g; - double b; - double a; - } chan; -}; - -static INLINE void -util_format_r64g64b64a64_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r64g64b64a64_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = (float)pixel.chan.a; /* a */ - src += 32; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r64g64b64a64_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r64g64b64a64_float pixel; - pixel.chan.r = (double)src[0]; - pixel.chan.g = (double)src[1]; - pixel.chan.b = (double)src[2]; - pixel.chan.a = (double)src[3]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 32; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r64g64b64a64_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r64g64b64a64_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = (float)pixel.chan.a; /* a */ -} - -static INLINE void -util_format_r64g64b64a64_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r64g64b64a64_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(CLAMP(pixel.chan.r, 0, 1) * 0xff); /* r */ - dst[1] = (uint8_t)(CLAMP(pixel.chan.g, 0, 1) * 0xff); /* g */ - dst[2] = (uint8_t)(CLAMP(pixel.chan.b, 0, 1) * 0xff); /* b */ - dst[3] = (uint8_t)(CLAMP(pixel.chan.a, 0, 1) * 0xff); /* a */ - src += 32; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r64g64b64a64_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r64g64b64a64_float pixel; - pixel.chan.r = (double)(src[0] * (1.0f/0xff)); - pixel.chan.g = (double)(src[1] * (1.0f/0xff)); - pixel.chan.b = (double)(src[2] * (1.0f/0xff)); - pixel.chan.a = (double)(src[3] * (1.0f/0xff)); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 32; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32_float { - uint32_t value; - struct { - float r; - } chan; -}; - -static INLINE void -util_format_r32_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32_float pixel; - pixel.chan.r = src[0]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = float_to_ubyte(pixel.chan.r); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32_float pixel; - pixel.chan.r = ubyte_to_float(src[0]); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32_float { - uint64_t value; - struct { - float r; - float g; - } chan; -}; - -static INLINE void -util_format_r32g32_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = pixel.chan.g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_float pixel; - pixel.chan.r = src[0]; - pixel.chan.g = src[1]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = pixel.chan.g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32g32_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = float_to_ubyte(pixel.chan.r); /* r */ - dst[1] = float_to_ubyte(pixel.chan.g); /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_float pixel; - pixel.chan.r = ubyte_to_float(src[0]); - pixel.chan.g = ubyte_to_float(src[1]); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32b32_float { - struct { - float r; - float g; - float b; - } chan; -}; - -static INLINE void -util_format_r32g32b32_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = pixel.chan.g; /* g */ - dst[2] = pixel.chan.b; /* b */ - dst[3] = 1; /* a */ - src += 12; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_float pixel; - pixel.chan.r = src[0]; - pixel.chan.g = src[1]; - pixel.chan.b = src[2]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 12; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32b32_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32b32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = pixel.chan.g; /* g */ - dst[2] = pixel.chan.b; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32g32b32_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = float_to_ubyte(pixel.chan.r); /* r */ - dst[1] = float_to_ubyte(pixel.chan.g); /* g */ - dst[2] = float_to_ubyte(pixel.chan.b); /* b */ - dst[3] = 255; /* a */ - src += 12; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_float pixel; - pixel.chan.r = ubyte_to_float(src[0]); - pixel.chan.g = ubyte_to_float(src[1]); - pixel.chan.b = ubyte_to_float(src[2]); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 12; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32b32a32_float { - struct { - float r; - float g; - float b; - float a; - } chan; -}; - -static INLINE void -util_format_r32g32b32a32_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = pixel.chan.g; /* g */ - dst[2] = pixel.chan.b; /* b */ - dst[3] = pixel.chan.a; /* a */ - src += 16; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32a32_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_float pixel; - pixel.chan.r = src[0]; - pixel.chan.g = src[1]; - pixel.chan.b = src[2]; - pixel.chan.a = src[3]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 16; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32b32a32_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32b32a32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = pixel.chan.g; /* g */ - dst[2] = pixel.chan.b; /* b */ - dst[3] = pixel.chan.a; /* a */ -} - -static INLINE void -util_format_r32g32b32a32_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = float_to_ubyte(pixel.chan.r); /* r */ - dst[1] = float_to_ubyte(pixel.chan.g); /* g */ - dst[2] = float_to_ubyte(pixel.chan.b); /* b */ - dst[3] = float_to_ubyte(pixel.chan.a); /* a */ - src += 16; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32a32_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_float pixel; - pixel.chan.r = ubyte_to_float(src[0]); - pixel.chan.g = ubyte_to_float(src[1]); - pixel.chan.b = ubyte_to_float(src[2]); - pixel.chan.a = ubyte_to_float(src[3]); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 16; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32_unorm { - uint32_t value; - struct { - uint32_t r; - } chan; -}; - -static INLINE void -util_format_r32_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = value; - dst[0] = (float)(r * (1.0/0xffffffff)); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(CLAMP(src[0], 0, 1) * (double)0xffffffff); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = value; - dst[0] = (float)(r * (1.0/0xffffffff)); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = value; - dst[0] = (uint8_t)(r >> 24); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((uint64_t)src[0]) * 0xffffffff / 0xff); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32_unorm { - uint64_t value; - struct { - uint32_t r; - uint32_t g; - } chan; -}; - -static INLINE void -util_format_r32g32_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_unorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0/0xffffffff)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0/0xffffffff)); /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_unorm pixel; - pixel.chan.r = (uint32_t)(CLAMP(src[0], 0, 1) * (double)0xffffffff); - pixel.chan.g = (uint32_t)(CLAMP(src[1], 0, 1) * (double)0xffffffff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32_unorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0/0xffffffff)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0/0xffffffff)); /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32g32_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_unorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(pixel.chan.r >> 24); /* r */ - dst[1] = (uint8_t)(pixel.chan.g >> 24); /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_unorm pixel; - pixel.chan.r = (uint32_t)(((uint64_t)src[0]) * 0xffffffff / 0xff); - pixel.chan.g = (uint32_t)(((uint64_t)src[1]) * 0xffffffff / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32b32_unorm { - struct { - uint32_t r; - uint32_t g; - uint32_t b; - } chan; -}; - -static INLINE void -util_format_r32g32b32_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_unorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0/0xffffffff)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0/0xffffffff)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0/0xffffffff)); /* b */ - dst[3] = 1; /* a */ - src += 12; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_unorm pixel; - pixel.chan.r = (uint32_t)(CLAMP(src[0], 0, 1) * (double)0xffffffff); - pixel.chan.g = (uint32_t)(CLAMP(src[1], 0, 1) * (double)0xffffffff); - pixel.chan.b = (uint32_t)(CLAMP(src[2], 0, 1) * (double)0xffffffff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 12; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32b32_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32b32_unorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0/0xffffffff)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0/0xffffffff)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0/0xffffffff)); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32g32b32_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_unorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(pixel.chan.r >> 24); /* r */ - dst[1] = (uint8_t)(pixel.chan.g >> 24); /* g */ - dst[2] = (uint8_t)(pixel.chan.b >> 24); /* b */ - dst[3] = 255; /* a */ - src += 12; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_unorm pixel; - pixel.chan.r = (uint32_t)(((uint64_t)src[0]) * 0xffffffff / 0xff); - pixel.chan.g = (uint32_t)(((uint64_t)src[1]) * 0xffffffff / 0xff); - pixel.chan.b = (uint32_t)(((uint64_t)src[2]) * 0xffffffff / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 12; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32b32a32_unorm { - struct { - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; - } chan; -}; - -static INLINE void -util_format_r32g32b32a32_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_unorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0/0xffffffff)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0/0xffffffff)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0/0xffffffff)); /* b */ - dst[3] = (float)(pixel.chan.a * (1.0/0xffffffff)); /* a */ - src += 16; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32a32_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_unorm pixel; - pixel.chan.r = (uint32_t)(CLAMP(src[0], 0, 1) * (double)0xffffffff); - pixel.chan.g = (uint32_t)(CLAMP(src[1], 0, 1) * (double)0xffffffff); - pixel.chan.b = (uint32_t)(CLAMP(src[2], 0, 1) * (double)0xffffffff); - pixel.chan.a = (uint32_t)(CLAMP(src[3], 0, 1) * (double)0xffffffff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 16; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32b32a32_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32b32a32_unorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0/0xffffffff)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0/0xffffffff)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0/0xffffffff)); /* b */ - dst[3] = (float)(pixel.chan.a * (1.0/0xffffffff)); /* a */ -} - -static INLINE void -util_format_r32g32b32a32_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_unorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(pixel.chan.r >> 24); /* r */ - dst[1] = (uint8_t)(pixel.chan.g >> 24); /* g */ - dst[2] = (uint8_t)(pixel.chan.b >> 24); /* b */ - dst[3] = (uint8_t)(pixel.chan.a >> 24); /* a */ - src += 16; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32a32_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_unorm pixel; - pixel.chan.r = (uint32_t)(((uint64_t)src[0]) * 0xffffffff / 0xff); - pixel.chan.g = (uint32_t)(((uint64_t)src[1]) * 0xffffffff / 0xff); - pixel.chan.b = (uint32_t)(((uint64_t)src[2]) * 0xffffffff / 0xff); - pixel.chan.a = (uint32_t)(((uint64_t)src[3]) * 0xffffffff / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 16; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32_uscaled { - uint32_t value; - struct { - uint32_t r; - } chan; -}; - -static INLINE void -util_format_r32_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = value; - dst[0] = (float)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)CLAMP(src[0], 0, 4294967295); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = value; - dst[0] = (float)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = value; - dst[0] = (uint8_t)(((uint64_t)MIN2(r, 1)) * 0xff / 0x1); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((uint64_t)src[0]) * 0x1 / 0xff); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32_uscaled { - uint64_t value; - struct { - uint32_t r; - uint32_t g; - } chan; -}; - -static INLINE void -util_format_r32g32_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_uscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_uscaled pixel; - pixel.chan.r = (uint32_t)CLAMP(src[0], 0, 4294967295); - pixel.chan.g = (uint32_t)CLAMP(src[1], 0, 4294967295); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32_uscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32g32_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_uscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(((uint64_t)MIN2(pixel.chan.r, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint64_t)MIN2(pixel.chan.g, 1)) * 0xff / 0x1); /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_uscaled pixel; - pixel.chan.r = (uint32_t)(((uint64_t)src[0]) * 0x1 / 0xff); - pixel.chan.g = (uint32_t)(((uint64_t)src[1]) * 0x1 / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32b32_uscaled { - struct { - uint32_t r; - uint32_t g; - uint32_t b; - } chan; -}; - -static INLINE void -util_format_r32g32b32_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_uscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ - src += 12; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_uscaled pixel; - pixel.chan.r = (uint32_t)CLAMP(src[0], 0, 4294967295); - pixel.chan.g = (uint32_t)CLAMP(src[1], 0, 4294967295); - pixel.chan.b = (uint32_t)CLAMP(src[2], 0, 4294967295); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 12; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32b32_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32b32_uscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32g32b32_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_uscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(((uint64_t)MIN2(pixel.chan.r, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint64_t)MIN2(pixel.chan.g, 1)) * 0xff / 0x1); /* g */ - dst[2] = (uint8_t)(((uint64_t)MIN2(pixel.chan.b, 1)) * 0xff / 0x1); /* b */ - dst[3] = 255; /* a */ - src += 12; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_uscaled pixel; - pixel.chan.r = (uint32_t)(((uint64_t)src[0]) * 0x1 / 0xff); - pixel.chan.g = (uint32_t)(((uint64_t)src[1]) * 0x1 / 0xff); - pixel.chan.b = (uint32_t)(((uint64_t)src[2]) * 0x1 / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 12; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32b32a32_uscaled { - struct { - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; - } chan; -}; - -static INLINE void -util_format_r32g32b32a32_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_uscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = (float)pixel.chan.a; /* a */ - src += 16; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32a32_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_uscaled pixel; - pixel.chan.r = (uint32_t)CLAMP(src[0], 0, 4294967295); - pixel.chan.g = (uint32_t)CLAMP(src[1], 0, 4294967295); - pixel.chan.b = (uint32_t)CLAMP(src[2], 0, 4294967295); - pixel.chan.a = (uint32_t)CLAMP(src[3], 0, 4294967295); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 16; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32b32a32_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32b32a32_uscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = (float)pixel.chan.a; /* a */ -} - -static INLINE void -util_format_r32g32b32a32_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_uscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(((uint64_t)MIN2(pixel.chan.r, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint64_t)MIN2(pixel.chan.g, 1)) * 0xff / 0x1); /* g */ - dst[2] = (uint8_t)(((uint64_t)MIN2(pixel.chan.b, 1)) * 0xff / 0x1); /* b */ - dst[3] = (uint8_t)(((uint64_t)MIN2(pixel.chan.a, 1)) * 0xff / 0x1); /* a */ - src += 16; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32a32_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_uscaled pixel; - pixel.chan.r = (uint32_t)(((uint64_t)src[0]) * 0x1 / 0xff); - pixel.chan.g = (uint32_t)(((uint64_t)src[1]) * 0x1 / 0xff); - pixel.chan.b = (uint32_t)(((uint64_t)src[2]) * 0x1 / 0xff); - pixel.chan.a = (uint32_t)(((uint64_t)src[3]) * 0x1 / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 16; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32_snorm { - uint32_t value; - struct { - int32_t r; - } chan; -}; - -static INLINE void -util_format_r32_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (int32_t)(value) ; - dst[0] = (float)(r * (1.0/0x7fffffff)); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)((int32_t)(CLAMP(src[0], -1, 1) * (double)0x7fffffff)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (int32_t)(value) ; - dst[0] = (float)(r * (1.0/0x7fffffff)); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (int32_t)(value) ; - dst[0] = (uint8_t)(MAX2(r, 0) >> 23); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)((int32_t)(((uint64_t)src[0]) * 0x7fffffff / 0xff)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32_snorm { - uint64_t value; - struct { - int32_t r; - int32_t g; - } chan; -}; - -static INLINE void -util_format_r32g32_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_snorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0/0x7fffffff)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0/0x7fffffff)); /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_snorm pixel; - pixel.chan.r = (int32_t)(CLAMP(src[0], -1, 1) * (double)0x7fffffff); - pixel.chan.g = (int32_t)(CLAMP(src[1], -1, 1) * (double)0x7fffffff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32_snorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0/0x7fffffff)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0/0x7fffffff)); /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32g32_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_snorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(MAX2(pixel.chan.r, 0) >> 23); /* r */ - dst[1] = (uint8_t)(MAX2(pixel.chan.g, 0) >> 23); /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_snorm pixel; - pixel.chan.r = (int32_t)(((uint64_t)src[0]) * 0x7fffffff / 0xff); - pixel.chan.g = (int32_t)(((uint64_t)src[1]) * 0x7fffffff / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32b32_snorm { - struct { - int32_t r; - int32_t g; - int32_t b; - } chan; -}; - -static INLINE void -util_format_r32g32b32_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_snorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0/0x7fffffff)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0/0x7fffffff)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0/0x7fffffff)); /* b */ - dst[3] = 1; /* a */ - src += 12; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_snorm pixel; - pixel.chan.r = (int32_t)(CLAMP(src[0], -1, 1) * (double)0x7fffffff); - pixel.chan.g = (int32_t)(CLAMP(src[1], -1, 1) * (double)0x7fffffff); - pixel.chan.b = (int32_t)(CLAMP(src[2], -1, 1) * (double)0x7fffffff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 12; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32b32_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32b32_snorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0/0x7fffffff)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0/0x7fffffff)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0/0x7fffffff)); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32g32b32_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_snorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(MAX2(pixel.chan.r, 0) >> 23); /* r */ - dst[1] = (uint8_t)(MAX2(pixel.chan.g, 0) >> 23); /* g */ - dst[2] = (uint8_t)(MAX2(pixel.chan.b, 0) >> 23); /* b */ - dst[3] = 255; /* a */ - src += 12; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_snorm pixel; - pixel.chan.r = (int32_t)(((uint64_t)src[0]) * 0x7fffffff / 0xff); - pixel.chan.g = (int32_t)(((uint64_t)src[1]) * 0x7fffffff / 0xff); - pixel.chan.b = (int32_t)(((uint64_t)src[2]) * 0x7fffffff / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 12; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32b32a32_snorm { - struct { - int32_t r; - int32_t g; - int32_t b; - int32_t a; - } chan; -}; - -static INLINE void -util_format_r32g32b32a32_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_snorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0/0x7fffffff)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0/0x7fffffff)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0/0x7fffffff)); /* b */ - dst[3] = (float)(pixel.chan.a * (1.0/0x7fffffff)); /* a */ - src += 16; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32a32_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_snorm pixel; - pixel.chan.r = (int32_t)(CLAMP(src[0], -1, 1) * (double)0x7fffffff); - pixel.chan.g = (int32_t)(CLAMP(src[1], -1, 1) * (double)0x7fffffff); - pixel.chan.b = (int32_t)(CLAMP(src[2], -1, 1) * (double)0x7fffffff); - pixel.chan.a = (int32_t)(CLAMP(src[3], -1, 1) * (double)0x7fffffff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 16; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32b32a32_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32b32a32_snorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0/0x7fffffff)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0/0x7fffffff)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0/0x7fffffff)); /* b */ - dst[3] = (float)(pixel.chan.a * (1.0/0x7fffffff)); /* a */ -} - -static INLINE void -util_format_r32g32b32a32_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_snorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(MAX2(pixel.chan.r, 0) >> 23); /* r */ - dst[1] = (uint8_t)(MAX2(pixel.chan.g, 0) >> 23); /* g */ - dst[2] = (uint8_t)(MAX2(pixel.chan.b, 0) >> 23); /* b */ - dst[3] = (uint8_t)(MAX2(pixel.chan.a, 0) >> 23); /* a */ - src += 16; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32a32_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_snorm pixel; - pixel.chan.r = (int32_t)(((uint64_t)src[0]) * 0x7fffffff / 0xff); - pixel.chan.g = (int32_t)(((uint64_t)src[1]) * 0x7fffffff / 0xff); - pixel.chan.b = (int32_t)(((uint64_t)src[2]) * 0x7fffffff / 0xff); - pixel.chan.a = (int32_t)(((uint64_t)src[3]) * 0x7fffffff / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 16; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32_sscaled { - uint32_t value; - struct { - int32_t r; - } chan; -}; - -static INLINE void -util_format_r32_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (int32_t)(value) ; - dst[0] = (float)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)((int32_t)CLAMP(src[0], -2147483648, 2147483647)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (int32_t)(value) ; - dst[0] = (float)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (int32_t)(value) ; - dst[0] = (uint8_t)(((uint64_t)CLAMP(r, 0, 1)) * 0xff / 0x1); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)((int32_t)(((uint64_t)src[0]) * 0x1 / 0xff)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32_sscaled { - uint64_t value; - struct { - int32_t r; - int32_t g; - } chan; -}; - -static INLINE void -util_format_r32g32_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_sscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_sscaled pixel; - pixel.chan.r = (int32_t)CLAMP(src[0], -2147483648, 2147483647); - pixel.chan.g = (int32_t)CLAMP(src[1], -2147483648, 2147483647); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32_sscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32g32_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_sscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(((uint64_t)CLAMP(pixel.chan.r, 0, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint64_t)CLAMP(pixel.chan.g, 0, 1)) * 0xff / 0x1); /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_sscaled pixel; - pixel.chan.r = (int32_t)(((uint64_t)src[0]) * 0x1 / 0xff); - pixel.chan.g = (int32_t)(((uint64_t)src[1]) * 0x1 / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32b32_sscaled { - struct { - int32_t r; - int32_t g; - int32_t b; - } chan; -}; - -static INLINE void -util_format_r32g32b32_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_sscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ - src += 12; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_sscaled pixel; - pixel.chan.r = (int32_t)CLAMP(src[0], -2147483648, 2147483647); - pixel.chan.g = (int32_t)CLAMP(src[1], -2147483648, 2147483647); - pixel.chan.b = (int32_t)CLAMP(src[2], -2147483648, 2147483647); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 12; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32b32_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32b32_sscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32g32b32_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_sscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(((uint64_t)CLAMP(pixel.chan.r, 0, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint64_t)CLAMP(pixel.chan.g, 0, 1)) * 0xff / 0x1); /* g */ - dst[2] = (uint8_t)(((uint64_t)CLAMP(pixel.chan.b, 0, 1)) * 0xff / 0x1); /* b */ - dst[3] = 255; /* a */ - src += 12; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_sscaled pixel; - pixel.chan.r = (int32_t)(((uint64_t)src[0]) * 0x1 / 0xff); - pixel.chan.g = (int32_t)(((uint64_t)src[1]) * 0x1 / 0xff); - pixel.chan.b = (int32_t)(((uint64_t)src[2]) * 0x1 / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 12; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32b32a32_sscaled { - struct { - int32_t r; - int32_t g; - int32_t b; - int32_t a; - } chan; -}; - -static INLINE void -util_format_r32g32b32a32_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_sscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = (float)pixel.chan.a; /* a */ - src += 16; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32a32_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_sscaled pixel; - pixel.chan.r = (int32_t)CLAMP(src[0], -2147483648, 2147483647); - pixel.chan.g = (int32_t)CLAMP(src[1], -2147483648, 2147483647); - pixel.chan.b = (int32_t)CLAMP(src[2], -2147483648, 2147483647); - pixel.chan.a = (int32_t)CLAMP(src[3], -2147483648, 2147483647); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 16; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32b32a32_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32b32a32_sscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = (float)pixel.chan.a; /* a */ -} - -static INLINE void -util_format_r32g32b32a32_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_sscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(((uint64_t)CLAMP(pixel.chan.r, 0, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint64_t)CLAMP(pixel.chan.g, 0, 1)) * 0xff / 0x1); /* g */ - dst[2] = (uint8_t)(((uint64_t)CLAMP(pixel.chan.b, 0, 1)) * 0xff / 0x1); /* b */ - dst[3] = (uint8_t)(((uint64_t)CLAMP(pixel.chan.a, 0, 1)) * 0xff / 0x1); /* a */ - src += 16; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32a32_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_sscaled pixel; - pixel.chan.r = (int32_t)(((uint64_t)src[0]) * 0x1 / 0xff); - pixel.chan.g = (int32_t)(((uint64_t)src[1]) * 0x1 / 0xff); - pixel.chan.b = (int32_t)(((uint64_t)src[2]) * 0x1 / 0xff); - pixel.chan.a = (int32_t)(((uint64_t)src[3]) * 0x1 / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 16; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16_float { - uint16_t value; - struct { - uint16_t r; - } chan; -}; - -static INLINE void -util_format_r16_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = util_half_to_float(pixel.chan.r); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16_float pixel; - pixel.chan.r = util_float_to_half(src[0]); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = util_half_to_float(pixel.chan.r); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = float_to_ubyte(util_half_to_float(pixel.chan.r)); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16_float pixel; - pixel.chan.r = util_float_to_half((float)(src[0] * (1.0f/0xff))); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16_float { - uint32_t value; - struct { - uint16_t r; - uint16_t g; - } chan; -}; - -static INLINE void -util_format_r16g16_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = util_half_to_float(pixel.chan.r); /* r */ - dst[1] = util_half_to_float(pixel.chan.g); /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16_float pixel; - pixel.chan.r = util_float_to_half(src[0]); - pixel.chan.g = util_float_to_half(src[1]); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r16g16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = util_half_to_float(pixel.chan.r); /* r */ - dst[1] = util_half_to_float(pixel.chan.g); /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16g16_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = float_to_ubyte(util_half_to_float(pixel.chan.r)); /* r */ - dst[1] = float_to_ubyte(util_half_to_float(pixel.chan.g)); /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16_float pixel; - pixel.chan.r = util_float_to_half((float)(src[0] * (1.0f/0xff))); - pixel.chan.g = util_float_to_half((float)(src[1] * (1.0f/0xff))); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16b16_float { - struct { - uint16_t r; - uint16_t g; - uint16_t b; - } chan; -}; - -static INLINE void -util_format_r16g16b16_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = util_half_to_float(pixel.chan.r); /* r */ - dst[1] = util_half_to_float(pixel.chan.g); /* g */ - dst[2] = util_half_to_float(pixel.chan.b); /* b */ - dst[3] = 1; /* a */ - src += 6; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_float pixel; - pixel.chan.r = util_float_to_half(src[0]); - pixel.chan.g = util_float_to_half(src[1]); - pixel.chan.b = util_float_to_half(src[2]); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 6; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16b16_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r16g16b16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = util_half_to_float(pixel.chan.r); /* r */ - dst[1] = util_half_to_float(pixel.chan.g); /* g */ - dst[2] = util_half_to_float(pixel.chan.b); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16g16b16_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = float_to_ubyte(util_half_to_float(pixel.chan.r)); /* r */ - dst[1] = float_to_ubyte(util_half_to_float(pixel.chan.g)); /* g */ - dst[2] = float_to_ubyte(util_half_to_float(pixel.chan.b)); /* b */ - dst[3] = 255; /* a */ - src += 6; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_float pixel; - pixel.chan.r = util_float_to_half((float)(src[0] * (1.0f/0xff))); - pixel.chan.g = util_float_to_half((float)(src[1] * (1.0f/0xff))); - pixel.chan.b = util_float_to_half((float)(src[2] * (1.0f/0xff))); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 6; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16b16a16_float { - uint64_t value; - struct { - uint16_t r; - uint16_t g; - uint16_t b; - uint16_t a; - } chan; -}; - -static INLINE void -util_format_r16g16b16a16_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = util_half_to_float(pixel.chan.r); /* r */ - dst[1] = util_half_to_float(pixel.chan.g); /* g */ - dst[2] = util_half_to_float(pixel.chan.b); /* b */ - dst[3] = util_half_to_float(pixel.chan.a); /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16a16_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_float pixel; - pixel.chan.r = util_float_to_half(src[0]); - pixel.chan.g = util_float_to_half(src[1]); - pixel.chan.b = util_float_to_half(src[2]); - pixel.chan.a = util_float_to_half(src[3]); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16b16a16_float_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r16g16b16a16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = util_half_to_float(pixel.chan.r); /* r */ - dst[1] = util_half_to_float(pixel.chan.g); /* g */ - dst[2] = util_half_to_float(pixel.chan.b); /* b */ - dst[3] = util_half_to_float(pixel.chan.a); /* a */ -} - -static INLINE void -util_format_r16g16b16a16_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_float pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = float_to_ubyte(util_half_to_float(pixel.chan.r)); /* r */ - dst[1] = float_to_ubyte(util_half_to_float(pixel.chan.g)); /* g */ - dst[2] = float_to_ubyte(util_half_to_float(pixel.chan.b)); /* b */ - dst[3] = float_to_ubyte(util_half_to_float(pixel.chan.a)); /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16a16_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_float pixel; - pixel.chan.r = util_float_to_half((float)(src[0] * (1.0f/0xff))); - pixel.chan.g = util_float_to_half((float)(src[1] * (1.0f/0xff))); - pixel.chan.b = util_float_to_half((float)(src[2] * (1.0f/0xff))); - pixel.chan.a = util_float_to_half((float)(src[3] * (1.0f/0xff))); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16_unorm { - uint16_t value; - struct { - uint16_t r; - } chan; -}; - -static INLINE void -util_format_r16_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = value; - dst[0] = (float)(r * (1.0f/0xffff)); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(CLAMP(src[0], 0, 1) * 0xffff); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = value; - dst[0] = (float)(r * (1.0f/0xffff)); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = value; - dst[0] = (uint8_t)(r >> 8); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(((uint32_t)src[0]) * 0xffff / 0xff); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16_unorm { - uint32_t value; - struct { - uint16_t r; - uint16_t g; - } chan; -}; - -static INLINE void -util_format_r16g16_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xffff; - g = value >> 16; - dst[0] = (float)(r * (1.0f/0xffff)); /* r */ - dst[1] = (float)(g * (1.0f/0xffff)); /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint16_t)(CLAMP(src[0], 0, 1) * 0xffff)) & 0xffff; - value |= ((uint16_t)(CLAMP(src[1], 0, 1) * 0xffff)) << 16; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xffff; - g = value >> 16; - dst[0] = (float)(r * (1.0f/0xffff)); /* r */ - dst[1] = (float)(g * (1.0f/0xffff)); /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16g16_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xffff; - g = value >> 16; - dst[0] = (uint8_t)(r >> 8); /* r */ - dst[1] = (uint8_t)(g >> 8); /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint16_t)(((uint32_t)src[0]) * 0xffff / 0xff)) & 0xffff; - value |= ((uint16_t)(((uint32_t)src[1]) * 0xffff / 0xff)) << 16; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16b16_unorm { - struct { - uint16_t r; - uint16_t g; - uint16_t b; - } chan; -}; - -static INLINE void -util_format_r16g16b16_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_unorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0f/0xffff)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0f/0xffff)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0f/0xffff)); /* b */ - dst[3] = 1; /* a */ - src += 6; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_unorm pixel; - pixel.chan.r = (uint16_t)(CLAMP(src[0], 0, 1) * 0xffff); - pixel.chan.g = (uint16_t)(CLAMP(src[1], 0, 1) * 0xffff); - pixel.chan.b = (uint16_t)(CLAMP(src[2], 0, 1) * 0xffff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 6; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16b16_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r16g16b16_unorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0f/0xffff)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0f/0xffff)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0f/0xffff)); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16g16b16_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_unorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(pixel.chan.r >> 8); /* r */ - dst[1] = (uint8_t)(pixel.chan.g >> 8); /* g */ - dst[2] = (uint8_t)(pixel.chan.b >> 8); /* b */ - dst[3] = 255; /* a */ - src += 6; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_unorm pixel; - pixel.chan.r = (uint16_t)(((uint32_t)src[0]) * 0xffff / 0xff); - pixel.chan.g = (uint16_t)(((uint32_t)src[1]) * 0xffff / 0xff); - pixel.chan.b = (uint16_t)(((uint32_t)src[2]) * 0xffff / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 6; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16b16a16_unorm { - uint64_t value; - struct { - uint16_t r; - uint16_t g; - uint16_t b; - uint16_t a; - } chan; -}; - -static INLINE void -util_format_r16g16b16a16_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_unorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0f/0xffff)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0f/0xffff)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0f/0xffff)); /* b */ - dst[3] = (float)(pixel.chan.a * (1.0f/0xffff)); /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16a16_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_unorm pixel; - pixel.chan.r = (uint16_t)(CLAMP(src[0], 0, 1) * 0xffff); - pixel.chan.g = (uint16_t)(CLAMP(src[1], 0, 1) * 0xffff); - pixel.chan.b = (uint16_t)(CLAMP(src[2], 0, 1) * 0xffff); - pixel.chan.a = (uint16_t)(CLAMP(src[3], 0, 1) * 0xffff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16b16a16_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r16g16b16a16_unorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0f/0xffff)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0f/0xffff)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0f/0xffff)); /* b */ - dst[3] = (float)(pixel.chan.a * (1.0f/0xffff)); /* a */ -} - -static INLINE void -util_format_r16g16b16a16_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_unorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(pixel.chan.r >> 8); /* r */ - dst[1] = (uint8_t)(pixel.chan.g >> 8); /* g */ - dst[2] = (uint8_t)(pixel.chan.b >> 8); /* b */ - dst[3] = (uint8_t)(pixel.chan.a >> 8); /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16a16_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_unorm pixel; - pixel.chan.r = (uint16_t)(((uint32_t)src[0]) * 0xffff / 0xff); - pixel.chan.g = (uint16_t)(((uint32_t)src[1]) * 0xffff / 0xff); - pixel.chan.b = (uint16_t)(((uint32_t)src[2]) * 0xffff / 0xff); - pixel.chan.a = (uint16_t)(((uint32_t)src[3]) * 0xffff / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16_uscaled { - uint16_t value; - struct { - uint16_t r; - } chan; -}; - -static INLINE void -util_format_r16_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = value; - dst[0] = (float)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)CLAMP(src[0], 0, 65535); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = value; - dst[0] = (float)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = value; - dst[0] = (uint8_t)(((uint32_t)MIN2(r, 1)) * 0xff / 0x1); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(((uint32_t)src[0]) * 0x1 / 0xff); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16_uscaled { - uint32_t value; - struct { - uint16_t r; - uint16_t g; - } chan; -}; - -static INLINE void -util_format_r16g16_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xffff; - g = value >> 16; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint16_t)CLAMP(src[0], 0, 65535)) & 0xffff; - value |= ((uint16_t)CLAMP(src[1], 0, 65535)) << 16; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xffff; - g = value >> 16; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16g16_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xffff; - g = value >> 16; - dst[0] = (uint8_t)(((uint32_t)MIN2(r, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint32_t)MIN2(g, 1)) * 0xff / 0x1); /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint16_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0xffff; - value |= ((uint16_t)(((uint32_t)src[1]) * 0x1 / 0xff)) << 16; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16b16_uscaled { - struct { - uint16_t r; - uint16_t g; - uint16_t b; - } chan; -}; - -static INLINE void -util_format_r16g16b16_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_uscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ - src += 6; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_uscaled pixel; - pixel.chan.r = (uint16_t)CLAMP(src[0], 0, 65535); - pixel.chan.g = (uint16_t)CLAMP(src[1], 0, 65535); - pixel.chan.b = (uint16_t)CLAMP(src[2], 0, 65535); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 6; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16b16_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r16g16b16_uscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16g16b16_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_uscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(((uint32_t)MIN2(pixel.chan.r, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint32_t)MIN2(pixel.chan.g, 1)) * 0xff / 0x1); /* g */ - dst[2] = (uint8_t)(((uint32_t)MIN2(pixel.chan.b, 1)) * 0xff / 0x1); /* b */ - dst[3] = 255; /* a */ - src += 6; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_uscaled pixel; - pixel.chan.r = (uint16_t)(((uint32_t)src[0]) * 0x1 / 0xff); - pixel.chan.g = (uint16_t)(((uint32_t)src[1]) * 0x1 / 0xff); - pixel.chan.b = (uint16_t)(((uint32_t)src[2]) * 0x1 / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 6; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16b16a16_uscaled { - uint64_t value; - struct { - uint16_t r; - uint16_t g; - uint16_t b; - uint16_t a; - } chan; -}; - -static INLINE void -util_format_r16g16b16a16_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_uscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = (float)pixel.chan.a; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16a16_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_uscaled pixel; - pixel.chan.r = (uint16_t)CLAMP(src[0], 0, 65535); - pixel.chan.g = (uint16_t)CLAMP(src[1], 0, 65535); - pixel.chan.b = (uint16_t)CLAMP(src[2], 0, 65535); - pixel.chan.a = (uint16_t)CLAMP(src[3], 0, 65535); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16b16a16_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r16g16b16a16_uscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = (float)pixel.chan.a; /* a */ -} - -static INLINE void -util_format_r16g16b16a16_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_uscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(((uint32_t)MIN2(pixel.chan.r, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint32_t)MIN2(pixel.chan.g, 1)) * 0xff / 0x1); /* g */ - dst[2] = (uint8_t)(((uint32_t)MIN2(pixel.chan.b, 1)) * 0xff / 0x1); /* b */ - dst[3] = (uint8_t)(((uint32_t)MIN2(pixel.chan.a, 1)) * 0xff / 0x1); /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16a16_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_uscaled pixel; - pixel.chan.r = (uint16_t)(((uint32_t)src[0]) * 0x1 / 0xff); - pixel.chan.g = (uint16_t)(((uint32_t)src[1]) * 0x1 / 0xff); - pixel.chan.b = (uint16_t)(((uint32_t)src[2]) * 0x1 / 0xff); - pixel.chan.a = (uint16_t)(((uint32_t)src[3]) * 0x1 / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16_snorm { - uint16_t value; - struct { - int16_t r; - } chan; -}; - -static INLINE void -util_format_r16_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (int16_t)(value) ; - dst[0] = (float)(r * (1.0f/0x7fff)); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)((int16_t)(CLAMP(src[0], -1, 1) * 0x7fff)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - int16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (int16_t)(value) ; - dst[0] = (float)(r * (1.0f/0x7fff)); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (int16_t)(value) ; - dst[0] = (uint8_t)(MAX2(r, 0) >> 7); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)((int16_t)(((uint32_t)src[0]) * 0x7fff / 0xff)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16_snorm { - uint32_t value; - struct { - int16_t r; - int16_t g; - } chan; -}; - -static INLINE void -util_format_r16g16_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 16) ) >> 16; - g = ((int32_t)(value) ) >> 16; - dst[0] = (float)(r * (1.0f/0x7fff)); /* r */ - dst[1] = (float)(g * (1.0f/0x7fff)); /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((int16_t)(CLAMP(src[0], -1, 1) * 0x7fff)) & 0xffff) ; - value |= (uint32_t)(((int16_t)(CLAMP(src[1], -1, 1) * 0x7fff)) << 16) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 16) ) >> 16; - g = ((int32_t)(value) ) >> 16; - dst[0] = (float)(r * (1.0f/0x7fff)); /* r */ - dst[1] = (float)(g * (1.0f/0x7fff)); /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16g16_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 16) ) >> 16; - g = ((int32_t)(value) ) >> 16; - dst[0] = (uint8_t)(MAX2(r, 0) >> 7); /* r */ - dst[1] = (uint8_t)(MAX2(g, 0) >> 7); /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((int16_t)(((uint32_t)src[0]) * 0x7fff / 0xff)) & 0xffff) ; - value |= (uint32_t)(((int16_t)(((uint32_t)src[1]) * 0x7fff / 0xff)) << 16) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16b16_snorm { - struct { - int16_t r; - int16_t g; - int16_t b; - } chan; -}; - -static INLINE void -util_format_r16g16b16_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_snorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0f/0x7fff)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0f/0x7fff)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0f/0x7fff)); /* b */ - dst[3] = 1; /* a */ - src += 6; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_snorm pixel; - pixel.chan.r = (int16_t)(CLAMP(src[0], -1, 1) * 0x7fff); - pixel.chan.g = (int16_t)(CLAMP(src[1], -1, 1) * 0x7fff); - pixel.chan.b = (int16_t)(CLAMP(src[2], -1, 1) * 0x7fff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 6; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16b16_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r16g16b16_snorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0f/0x7fff)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0f/0x7fff)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0f/0x7fff)); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16g16b16_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_snorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(MAX2(pixel.chan.r, 0) >> 7); /* r */ - dst[1] = (uint8_t)(MAX2(pixel.chan.g, 0) >> 7); /* g */ - dst[2] = (uint8_t)(MAX2(pixel.chan.b, 0) >> 7); /* b */ - dst[3] = 255; /* a */ - src += 6; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_snorm pixel; - pixel.chan.r = (int16_t)(((uint32_t)src[0]) * 0x7fff / 0xff); - pixel.chan.g = (int16_t)(((uint32_t)src[1]) * 0x7fff / 0xff); - pixel.chan.b = (int16_t)(((uint32_t)src[2]) * 0x7fff / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 6; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16b16a16_snorm { - uint64_t value; - struct { - int16_t r; - int16_t g; - int16_t b; - int16_t a; - } chan; -}; - -static INLINE void -util_format_r16g16b16a16_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_snorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0f/0x7fff)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0f/0x7fff)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0f/0x7fff)); /* b */ - dst[3] = (float)(pixel.chan.a * (1.0f/0x7fff)); /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16a16_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_snorm pixel; - pixel.chan.r = (int16_t)(CLAMP(src[0], -1, 1) * 0x7fff); - pixel.chan.g = (int16_t)(CLAMP(src[1], -1, 1) * 0x7fff); - pixel.chan.b = (int16_t)(CLAMP(src[2], -1, 1) * 0x7fff); - pixel.chan.a = (int16_t)(CLAMP(src[3], -1, 1) * 0x7fff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16b16a16_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r16g16b16a16_snorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0f/0x7fff)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0f/0x7fff)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0f/0x7fff)); /* b */ - dst[3] = (float)(pixel.chan.a * (1.0f/0x7fff)); /* a */ -} - -static INLINE void -util_format_r16g16b16a16_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_snorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(MAX2(pixel.chan.r, 0) >> 7); /* r */ - dst[1] = (uint8_t)(MAX2(pixel.chan.g, 0) >> 7); /* g */ - dst[2] = (uint8_t)(MAX2(pixel.chan.b, 0) >> 7); /* b */ - dst[3] = (uint8_t)(MAX2(pixel.chan.a, 0) >> 7); /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16a16_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_snorm pixel; - pixel.chan.r = (int16_t)(((uint32_t)src[0]) * 0x7fff / 0xff); - pixel.chan.g = (int16_t)(((uint32_t)src[1]) * 0x7fff / 0xff); - pixel.chan.b = (int16_t)(((uint32_t)src[2]) * 0x7fff / 0xff); - pixel.chan.a = (int16_t)(((uint32_t)src[3]) * 0x7fff / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16_sscaled { - uint16_t value; - struct { - int16_t r; - } chan; -}; - -static INLINE void -util_format_r16_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (int16_t)(value) ; - dst[0] = (float)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)((int16_t)CLAMP(src[0], -32768, 32767)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - int16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (int16_t)(value) ; - dst[0] = (float)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (int16_t)(value) ; - dst[0] = (uint8_t)(((uint32_t)CLAMP(r, 0, 1)) * 0xff / 0x1); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)((int16_t)(((uint32_t)src[0]) * 0x1 / 0xff)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16_sscaled { - uint32_t value; - struct { - int16_t r; - int16_t g; - } chan; -}; - -static INLINE void -util_format_r16g16_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 16) ) >> 16; - g = ((int32_t)(value) ) >> 16; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((int16_t)CLAMP(src[0], -32768, 32767)) & 0xffff) ; - value |= (uint32_t)(((int16_t)CLAMP(src[1], -32768, 32767)) << 16) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 16) ) >> 16; - g = ((int32_t)(value) ) >> 16; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16g16_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 16) ) >> 16; - g = ((int32_t)(value) ) >> 16; - dst[0] = (uint8_t)(((uint32_t)CLAMP(r, 0, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint32_t)CLAMP(g, 0, 1)) * 0xff / 0x1); /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((int16_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0xffff) ; - value |= (uint32_t)(((int16_t)(((uint32_t)src[1]) * 0x1 / 0xff)) << 16) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16b16_sscaled { - struct { - int16_t r; - int16_t g; - int16_t b; - } chan; -}; - -static INLINE void -util_format_r16g16b16_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_sscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ - src += 6; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_sscaled pixel; - pixel.chan.r = (int16_t)CLAMP(src[0], -32768, 32767); - pixel.chan.g = (int16_t)CLAMP(src[1], -32768, 32767); - pixel.chan.b = (int16_t)CLAMP(src[2], -32768, 32767); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 6; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16b16_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r16g16b16_sscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16g16b16_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_sscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(((uint32_t)CLAMP(pixel.chan.r, 0, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint32_t)CLAMP(pixel.chan.g, 0, 1)) * 0xff / 0x1); /* g */ - dst[2] = (uint8_t)(((uint32_t)CLAMP(pixel.chan.b, 0, 1)) * 0xff / 0x1); /* b */ - dst[3] = 255; /* a */ - src += 6; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_sscaled pixel; - pixel.chan.r = (int16_t)(((uint32_t)src[0]) * 0x1 / 0xff); - pixel.chan.g = (int16_t)(((uint32_t)src[1]) * 0x1 / 0xff); - pixel.chan.b = (int16_t)(((uint32_t)src[2]) * 0x1 / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 6; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16b16a16_sscaled { - uint64_t value; - struct { - int16_t r; - int16_t g; - int16_t b; - int16_t a; - } chan; -}; - -static INLINE void -util_format_r16g16b16a16_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_sscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = (float)pixel.chan.a; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16a16_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_sscaled pixel; - pixel.chan.r = (int16_t)CLAMP(src[0], -32768, 32767); - pixel.chan.g = (int16_t)CLAMP(src[1], -32768, 32767); - pixel.chan.b = (int16_t)CLAMP(src[2], -32768, 32767); - pixel.chan.a = (int16_t)CLAMP(src[3], -32768, 32767); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16b16a16_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r16g16b16a16_sscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = (float)pixel.chan.a; /* a */ -} - -static INLINE void -util_format_r16g16b16a16_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_sscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(((uint32_t)CLAMP(pixel.chan.r, 0, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint32_t)CLAMP(pixel.chan.g, 0, 1)) * 0xff / 0x1); /* g */ - dst[2] = (uint8_t)(((uint32_t)CLAMP(pixel.chan.b, 0, 1)) * 0xff / 0x1); /* b */ - dst[3] = (uint8_t)(((uint32_t)CLAMP(pixel.chan.a, 0, 1)) * 0xff / 0x1); /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16a16_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_sscaled pixel; - pixel.chan.r = (int16_t)(((uint32_t)src[0]) * 0x1 / 0xff); - pixel.chan.g = (int16_t)(((uint32_t)src[1]) * 0x1 / 0xff); - pixel.chan.b = (int16_t)(((uint32_t)src[2]) * 0x1 / 0xff); - pixel.chan.a = (int16_t)(((uint32_t)src[3]) * 0x1 / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8_unorm { - uint8_t value; - struct { - uint8_t r; - } chan; -}; - -static INLINE void -util_format_r8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t r; - r = value; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= float_to_ubyte(src[0]); - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - uint8_t r; - r = value; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t r; - r = value; - dst[0] = r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= src[0]; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8_unorm { - uint16_t value; - struct { - uint8_t r; - uint8_t g; - } chan; -}; - -static INLINE void -util_format_r8g8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t r; - uint16_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (value) & 0xff; - g = value >> 8; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = ubyte_to_float(g); /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (float_to_ubyte(src[0])) & 0xff; - value |= (float_to_ubyte(src[1])) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t r; - uint16_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (value) & 0xff; - g = value >> 8; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = ubyte_to_float(g); /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8g8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t r; - uint16_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (value) & 0xff; - g = value >> 8; - dst[0] = r; /* r */ - dst[1] = g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (src[0]) & 0xff; - value |= (src[1]) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8b8_unorm { - struct { - uint8_t r; - uint8_t g; - uint8_t b; - } chan; -}; - -static INLINE void -util_format_r8g8b8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_unorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = ubyte_to_float(pixel.chan.r); /* r */ - dst[1] = ubyte_to_float(pixel.chan.g); /* g */ - dst[2] = ubyte_to_float(pixel.chan.b); /* b */ - dst[3] = 1; /* a */ - src += 3; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_unorm pixel; - pixel.chan.r = float_to_ubyte(src[0]); - pixel.chan.g = float_to_ubyte(src[1]); - pixel.chan.b = float_to_ubyte(src[2]); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 3; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8b8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r8g8b8_unorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = ubyte_to_float(pixel.chan.r); /* r */ - dst[1] = ubyte_to_float(pixel.chan.g); /* g */ - dst[2] = ubyte_to_float(pixel.chan.b); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8g8b8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_unorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = pixel.chan.g; /* g */ - dst[2] = pixel.chan.b; /* b */ - dst[3] = 255; /* a */ - src += 3; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_unorm pixel; - pixel.chan.r = src[0]; - pixel.chan.g = src[1]; - pixel.chan.b = src[2]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 3; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8b8a8_unorm { - uint32_t value; - struct { - uint8_t r; - uint8_t g; - uint8_t b; - uint8_t a; - } chan; -}; - -static INLINE void -util_format_r8g8b8a8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xff; - g = (value >> 8) & 0xff; - b = (value >> 16) & 0xff; - a = value >> 24; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = ubyte_to_float(g); /* g */ - dst[2] = ubyte_to_float(b); /* b */ - dst[3] = ubyte_to_float(a); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8a8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (float_to_ubyte(src[0])) & 0xff; - value |= ((float_to_ubyte(src[1])) & 0xff) << 8; - value |= ((float_to_ubyte(src[2])) & 0xff) << 16; - value |= (float_to_ubyte(src[3])) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8b8a8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xff; - g = (value >> 8) & 0xff; - b = (value >> 16) & 0xff; - a = value >> 24; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = ubyte_to_float(g); /* g */ - dst[2] = ubyte_to_float(b); /* b */ - dst[3] = ubyte_to_float(a); /* a */ -} - -static INLINE void -util_format_r8g8b8a8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xff; - g = (value >> 8) & 0xff; - b = (value >> 16) & 0xff; - a = value >> 24; - dst[0] = r; /* r */ - dst[1] = g; /* g */ - dst[2] = b; /* b */ - dst[3] = a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8a8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (src[0]) & 0xff; - value |= ((src[1]) & 0xff) << 8; - value |= ((src[2]) & 0xff) << 16; - value |= (src[3]) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8_uscaled { - uint8_t value; - struct { - uint8_t r; - } chan; -}; - -static INLINE void -util_format_r8_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t r; - r = value; - dst[0] = (float)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)CLAMP(src[0], 0, 255); - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - uint8_t r; - r = value; - dst[0] = (float)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t r; - r = value; - dst[0] = (uint8_t)(((uint32_t)MIN2(r, 1)) * 0xff / 0x1); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)(((uint32_t)src[0]) * 0x1 / 0xff); - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8_uscaled { - uint16_t value; - struct { - uint8_t r; - uint8_t g; - } chan; -}; - -static INLINE void -util_format_r8g8_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t r; - uint16_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (value) & 0xff; - g = value >> 8; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= ((uint8_t)CLAMP(src[0], 0, 255)) & 0xff; - value |= ((uint8_t)CLAMP(src[1], 0, 255)) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t r; - uint16_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (value) & 0xff; - g = value >> 8; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8g8_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t r; - uint16_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (value) & 0xff; - g = value >> 8; - dst[0] = (uint8_t)(((uint32_t)MIN2(r, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint32_t)MIN2(g, 1)) * 0xff / 0x1); /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= ((uint8_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0xff; - value |= ((uint8_t)(((uint32_t)src[1]) * 0x1 / 0xff)) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8b8_uscaled { - struct { - uint8_t r; - uint8_t g; - uint8_t b; - } chan; -}; - -static INLINE void -util_format_r8g8b8_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_uscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ - src += 3; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_uscaled pixel; - pixel.chan.r = (uint8_t)CLAMP(src[0], 0, 255); - pixel.chan.g = (uint8_t)CLAMP(src[1], 0, 255); - pixel.chan.b = (uint8_t)CLAMP(src[2], 0, 255); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 3; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8b8_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r8g8b8_uscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8g8b8_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_uscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(((uint32_t)MIN2(pixel.chan.r, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint32_t)MIN2(pixel.chan.g, 1)) * 0xff / 0x1); /* g */ - dst[2] = (uint8_t)(((uint32_t)MIN2(pixel.chan.b, 1)) * 0xff / 0x1); /* b */ - dst[3] = 255; /* a */ - src += 3; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_uscaled pixel; - pixel.chan.r = (uint8_t)(((uint32_t)src[0]) * 0x1 / 0xff); - pixel.chan.g = (uint8_t)(((uint32_t)src[1]) * 0x1 / 0xff); - pixel.chan.b = (uint8_t)(((uint32_t)src[2]) * 0x1 / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 3; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8b8a8_uscaled { - uint32_t value; - struct { - uint8_t r; - uint8_t g; - uint8_t b; - uint8_t a; - } chan; -}; - -static INLINE void -util_format_r8g8b8a8_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xff; - g = (value >> 8) & 0xff; - b = (value >> 16) & 0xff; - a = value >> 24; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = (float)b; /* b */ - dst[3] = (float)a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8a8_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint8_t)CLAMP(src[0], 0, 255)) & 0xff; - value |= (((uint8_t)CLAMP(src[1], 0, 255)) & 0xff) << 8; - value |= (((uint8_t)CLAMP(src[2], 0, 255)) & 0xff) << 16; - value |= ((uint8_t)CLAMP(src[3], 0, 255)) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8b8a8_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xff; - g = (value >> 8) & 0xff; - b = (value >> 16) & 0xff; - a = value >> 24; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = (float)b; /* b */ - dst[3] = (float)a; /* a */ -} - -static INLINE void -util_format_r8g8b8a8_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xff; - g = (value >> 8) & 0xff; - b = (value >> 16) & 0xff; - a = value >> 24; - dst[0] = (uint8_t)(((uint32_t)MIN2(r, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint32_t)MIN2(g, 1)) * 0xff / 0x1); /* g */ - dst[2] = (uint8_t)(((uint32_t)MIN2(b, 1)) * 0xff / 0x1); /* b */ - dst[3] = (uint8_t)(((uint32_t)MIN2(a, 1)) * 0xff / 0x1); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8a8_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint8_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0xff; - value |= (((uint8_t)(((uint32_t)src[1]) * 0x1 / 0xff)) & 0xff) << 8; - value |= (((uint8_t)(((uint32_t)src[2]) * 0x1 / 0xff)) & 0xff) << 16; - value |= ((uint8_t)(((uint32_t)src[3]) * 0x1 / 0xff)) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8_snorm { - uint8_t value; - struct { - int8_t r; - } chan; -}; - -static INLINE void -util_format_r8_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - int8_t r; - r = (int8_t)(value) ; - dst[0] = (float)(r * (1.0f/0x7f)); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)((int8_t)(CLAMP(src[0], -1, 1) * 0x7f)) ; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - int8_t r; - r = (int8_t)(value) ; - dst[0] = (float)(r * (1.0f/0x7f)); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - int8_t r; - r = (int8_t)(value) ; - dst[0] = (uint8_t)(((uint32_t)MAX2(r, 0)) * 0xff / 0x7f); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)((int8_t)(src[0] >> 1)) ; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8_snorm { - uint16_t value; - struct { - int8_t r; - int8_t g; - } chan; -}; - -static INLINE void -util_format_r8g8_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t r; - int16_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = ((int16_t)(value << 8) ) >> 8; - g = ((int16_t)(value) ) >> 8; - dst[0] = (float)(r * (1.0f/0x7f)); /* r */ - dst[1] = (float)(g * (1.0f/0x7f)); /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(((int8_t)(CLAMP(src[0], -1, 1) * 0x7f)) & 0xff) ; - value |= (uint16_t)(((int8_t)(CLAMP(src[1], -1, 1) * 0x7f)) << 8) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - int16_t r; - int16_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = ((int16_t)(value << 8) ) >> 8; - g = ((int16_t)(value) ) >> 8; - dst[0] = (float)(r * (1.0f/0x7f)); /* r */ - dst[1] = (float)(g * (1.0f/0x7f)); /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8g8_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t r; - int16_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = ((int16_t)(value << 8) ) >> 8; - g = ((int16_t)(value) ) >> 8; - dst[0] = (uint8_t)(((uint32_t)MAX2(r, 0)) * 0xff / 0x7f); /* r */ - dst[1] = (uint8_t)(((uint32_t)MAX2(g, 0)) * 0xff / 0x7f); /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(((int8_t)(src[0] >> 1)) & 0xff) ; - value |= (uint16_t)(((int8_t)(src[1] >> 1)) << 8) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8b8_snorm { - struct { - int8_t r; - int8_t g; - int8_t b; - } chan; -}; - -static INLINE void -util_format_r8g8b8_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_snorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0f/0x7f)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0f/0x7f)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0f/0x7f)); /* b */ - dst[3] = 1; /* a */ - src += 3; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_snorm pixel; - pixel.chan.r = (int8_t)(CLAMP(src[0], -1, 1) * 0x7f); - pixel.chan.g = (int8_t)(CLAMP(src[1], -1, 1) * 0x7f); - pixel.chan.b = (int8_t)(CLAMP(src[2], -1, 1) * 0x7f); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 3; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8b8_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r8g8b8_snorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0f/0x7f)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0f/0x7f)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0f/0x7f)); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8g8b8_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_snorm pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(((uint32_t)MAX2(pixel.chan.r, 0)) * 0xff / 0x7f); /* r */ - dst[1] = (uint8_t)(((uint32_t)MAX2(pixel.chan.g, 0)) * 0xff / 0x7f); /* g */ - dst[2] = (uint8_t)(((uint32_t)MAX2(pixel.chan.b, 0)) * 0xff / 0x7f); /* b */ - dst[3] = 255; /* a */ - src += 3; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_snorm pixel; - pixel.chan.r = (int8_t)(src[0] >> 1); - pixel.chan.g = (int8_t)(src[1] >> 1); - pixel.chan.b = (int8_t)(src[2] >> 1); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 3; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8b8a8_snorm { - uint32_t value; - struct { - int8_t r; - int8_t g; - int8_t b; - int8_t a; - } chan; -}; - -static INLINE void -util_format_r8g8b8a8_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 24) ) >> 24; - g = ((int32_t)(value << 16) ) >> 24; - b = ((int32_t)(value << 8) ) >> 24; - a = ((int32_t)(value) ) >> 24; - dst[0] = (float)(r * (1.0f/0x7f)); /* r */ - dst[1] = (float)(g * (1.0f/0x7f)); /* g */ - dst[2] = (float)(b * (1.0f/0x7f)); /* b */ - dst[3] = (float)(a * (1.0f/0x7f)); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8a8_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((int8_t)(CLAMP(src[0], -1, 1) * 0x7f)) & 0xff) ; - value |= (uint32_t)((((int8_t)(CLAMP(src[1], -1, 1) * 0x7f)) & 0xff) << 8) ; - value |= (uint32_t)((((int8_t)(CLAMP(src[2], -1, 1) * 0x7f)) & 0xff) << 16) ; - value |= (uint32_t)(((int8_t)(CLAMP(src[3], -1, 1) * 0x7f)) << 24) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8b8a8_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 24) ) >> 24; - g = ((int32_t)(value << 16) ) >> 24; - b = ((int32_t)(value << 8) ) >> 24; - a = ((int32_t)(value) ) >> 24; - dst[0] = (float)(r * (1.0f/0x7f)); /* r */ - dst[1] = (float)(g * (1.0f/0x7f)); /* g */ - dst[2] = (float)(b * (1.0f/0x7f)); /* b */ - dst[3] = (float)(a * (1.0f/0x7f)); /* a */ -} - -static INLINE void -util_format_r8g8b8a8_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 24) ) >> 24; - g = ((int32_t)(value << 16) ) >> 24; - b = ((int32_t)(value << 8) ) >> 24; - a = ((int32_t)(value) ) >> 24; - dst[0] = (uint8_t)(((uint32_t)MAX2(r, 0)) * 0xff / 0x7f); /* r */ - dst[1] = (uint8_t)(((uint32_t)MAX2(g, 0)) * 0xff / 0x7f); /* g */ - dst[2] = (uint8_t)(((uint32_t)MAX2(b, 0)) * 0xff / 0x7f); /* b */ - dst[3] = (uint8_t)(((uint32_t)MAX2(a, 0)) * 0xff / 0x7f); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8a8_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((int8_t)(src[0] >> 1)) & 0xff) ; - value |= (uint32_t)((((int8_t)(src[1] >> 1)) & 0xff) << 8) ; - value |= (uint32_t)((((int8_t)(src[2] >> 1)) & 0xff) << 16) ; - value |= (uint32_t)(((int8_t)(src[3] >> 1)) << 24) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8_sscaled { - uint8_t value; - struct { - int8_t r; - } chan; -}; - -static INLINE void -util_format_r8_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - int8_t r; - r = (int8_t)(value) ; - dst[0] = (float)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)((int8_t)CLAMP(src[0], -128, 127)) ; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - int8_t r; - r = (int8_t)(value) ; - dst[0] = (float)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - int8_t r; - r = (int8_t)(value) ; - dst[0] = (uint8_t)(((uint32_t)CLAMP(r, 0, 1)) * 0xff / 0x1); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)((int8_t)(((uint32_t)src[0]) * 0x1 / 0xff)) ; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8_sscaled { - uint16_t value; - struct { - int8_t r; - int8_t g; - } chan; -}; - -static INLINE void -util_format_r8g8_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t r; - int16_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = ((int16_t)(value << 8) ) >> 8; - g = ((int16_t)(value) ) >> 8; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(((int8_t)CLAMP(src[0], -128, 127)) & 0xff) ; - value |= (uint16_t)(((int8_t)CLAMP(src[1], -128, 127)) << 8) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - int16_t r; - int16_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = ((int16_t)(value << 8) ) >> 8; - g = ((int16_t)(value) ) >> 8; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8g8_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t r; - int16_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = ((int16_t)(value << 8) ) >> 8; - g = ((int16_t)(value) ) >> 8; - dst[0] = (uint8_t)(((uint32_t)CLAMP(r, 0, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint32_t)CLAMP(g, 0, 1)) * 0xff / 0x1); /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(((int8_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0xff) ; - value |= (uint16_t)(((int8_t)(((uint32_t)src[1]) * 0x1 / 0xff)) << 8) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8b8_sscaled { - struct { - int8_t r; - int8_t g; - int8_t b; - } chan; -}; - -static INLINE void -util_format_r8g8b8_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_sscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ - src += 3; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_sscaled pixel; - pixel.chan.r = (int8_t)CLAMP(src[0], -128, 127); - pixel.chan.g = (int8_t)CLAMP(src[1], -128, 127); - pixel.chan.b = (int8_t)CLAMP(src[2], -128, 127); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 3; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8b8_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r8g8b8_sscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)pixel.chan.r; /* r */ - dst[1] = (float)pixel.chan.g; /* g */ - dst[2] = (float)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8g8b8_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_sscaled pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)(((uint32_t)CLAMP(pixel.chan.r, 0, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint32_t)CLAMP(pixel.chan.g, 0, 1)) * 0xff / 0x1); /* g */ - dst[2] = (uint8_t)(((uint32_t)CLAMP(pixel.chan.b, 0, 1)) * 0xff / 0x1); /* b */ - dst[3] = 255; /* a */ - src += 3; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_sscaled pixel; - pixel.chan.r = (int8_t)(((uint32_t)src[0]) * 0x1 / 0xff); - pixel.chan.g = (int8_t)(((uint32_t)src[1]) * 0x1 / 0xff); - pixel.chan.b = (int8_t)(((uint32_t)src[2]) * 0x1 / 0xff); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 3; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8b8a8_sscaled { - uint32_t value; - struct { - int8_t r; - int8_t g; - int8_t b; - int8_t a; - } chan; -}; - -static INLINE void -util_format_r8g8b8a8_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 24) ) >> 24; - g = ((int32_t)(value << 16) ) >> 24; - b = ((int32_t)(value << 8) ) >> 24; - a = ((int32_t)(value) ) >> 24; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = (float)b; /* b */ - dst[3] = (float)a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8a8_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((int8_t)CLAMP(src[0], -128, 127)) & 0xff) ; - value |= (uint32_t)((((int8_t)CLAMP(src[1], -128, 127)) & 0xff) << 8) ; - value |= (uint32_t)((((int8_t)CLAMP(src[2], -128, 127)) & 0xff) << 16) ; - value |= (uint32_t)(((int8_t)CLAMP(src[3], -128, 127)) << 24) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8b8a8_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 24) ) >> 24; - g = ((int32_t)(value << 16) ) >> 24; - b = ((int32_t)(value << 8) ) >> 24; - a = ((int32_t)(value) ) >> 24; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = (float)b; /* b */ - dst[3] = (float)a; /* a */ -} - -static INLINE void -util_format_r8g8b8a8_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 24) ) >> 24; - g = ((int32_t)(value << 16) ) >> 24; - b = ((int32_t)(value << 8) ) >> 24; - a = ((int32_t)(value) ) >> 24; - dst[0] = (uint8_t)(((uint32_t)CLAMP(r, 0, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint32_t)CLAMP(g, 0, 1)) * 0xff / 0x1); /* g */ - dst[2] = (uint8_t)(((uint32_t)CLAMP(b, 0, 1)) * 0xff / 0x1); /* b */ - dst[3] = (uint8_t)(((uint32_t)CLAMP(a, 0, 1)) * 0xff / 0x1); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8a8_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((int8_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0xff) ; - value |= (uint32_t)((((int8_t)(((uint32_t)src[1]) * 0x1 / 0xff)) & 0xff) << 8) ; - value |= (uint32_t)((((int8_t)(((uint32_t)src[2]) * 0x1 / 0xff)) & 0xff) << 16) ; - value |= (uint32_t)(((int8_t)(((uint32_t)src[3]) * 0x1 / 0xff)) << 24) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32_fixed { - uint32_t value; - struct { - int32_t r; - } chan; -}; - -static INLINE void -util_format_r32_fixed_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32_fixed pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0/0x10000)); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32_fixed_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32_fixed pixel; - pixel.chan.r = (int32_t)(CLAMP(src[0], -65536, 65535) * (double)0x10000); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32_fixed_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32_fixed pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0/0x10000)); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32_fixed_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32_fixed pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)((CLAMP(pixel.chan.r, 0, 65536) * (1.0/0x10000)) * 0xff); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32_fixed_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32_fixed pixel; - pixel.chan.r = (int32_t)((float)(src[0] * (1.0f/0xff)) * (double)0x10000); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32_fixed { - uint64_t value; - struct { - int32_t r; - int32_t g; - } chan; -}; - -static INLINE void -util_format_r32g32_fixed_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_fixed pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0/0x10000)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0/0x10000)); /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32_fixed_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_fixed pixel; - pixel.chan.r = (int32_t)(CLAMP(src[0], -65536, 65535) * (double)0x10000); - pixel.chan.g = (int32_t)(CLAMP(src[1], -65536, 65535) * (double)0x10000); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32_fixed_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32_fixed pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0/0x10000)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0/0x10000)); /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32g32_fixed_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_fixed pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)((CLAMP(pixel.chan.r, 0, 65536) * (1.0/0x10000)) * 0xff); /* r */ - dst[1] = (uint8_t)((CLAMP(pixel.chan.g, 0, 65536) * (1.0/0x10000)) * 0xff); /* g */ - dst[2] = 0; /* b */ - dst[3] = 255; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32_fixed_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_fixed pixel; - pixel.chan.r = (int32_t)((float)(src[0] * (1.0f/0xff)) * (double)0x10000); - pixel.chan.g = (int32_t)((float)(src[1] * (1.0f/0xff)) * (double)0x10000); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32b32_fixed { - struct { - int32_t r; - int32_t g; - int32_t b; - } chan; -}; - -static INLINE void -util_format_r32g32b32_fixed_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_fixed pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0/0x10000)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0/0x10000)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0/0x10000)); /* b */ - dst[3] = 1; /* a */ - src += 12; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32_fixed_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_fixed pixel; - pixel.chan.r = (int32_t)(CLAMP(src[0], -65536, 65535) * (double)0x10000); - pixel.chan.g = (int32_t)(CLAMP(src[1], -65536, 65535) * (double)0x10000); - pixel.chan.b = (int32_t)(CLAMP(src[2], -65536, 65535) * (double)0x10000); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 12; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32b32_fixed_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32b32_fixed pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0/0x10000)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0/0x10000)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0/0x10000)); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32g32b32_fixed_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_fixed pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)((CLAMP(pixel.chan.r, 0, 65536) * (1.0/0x10000)) * 0xff); /* r */ - dst[1] = (uint8_t)((CLAMP(pixel.chan.g, 0, 65536) * (1.0/0x10000)) * 0xff); /* g */ - dst[2] = (uint8_t)((CLAMP(pixel.chan.b, 0, 65536) * (1.0/0x10000)) * 0xff); /* b */ - dst[3] = 255; /* a */ - src += 12; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32_fixed_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_fixed pixel; - pixel.chan.r = (int32_t)((float)(src[0] * (1.0f/0xff)) * (double)0x10000); - pixel.chan.g = (int32_t)((float)(src[1] * (1.0f/0xff)) * (double)0x10000); - pixel.chan.b = (int32_t)((float)(src[2] * (1.0f/0xff)) * (double)0x10000); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 12; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32b32a32_fixed { - struct { - int32_t r; - int32_t g; - int32_t b; - int32_t a; - } chan; -}; - -static INLINE void -util_format_r32g32b32a32_fixed_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_fixed pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0/0x10000)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0/0x10000)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0/0x10000)); /* b */ - dst[3] = (float)(pixel.chan.a * (1.0/0x10000)); /* a */ - src += 16; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32a32_fixed_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_fixed pixel; - pixel.chan.r = (int32_t)(CLAMP(src[0], -65536, 65535) * (double)0x10000); - pixel.chan.g = (int32_t)(CLAMP(src[1], -65536, 65535) * (double)0x10000); - pixel.chan.b = (int32_t)(CLAMP(src[2], -65536, 65535) * (double)0x10000); - pixel.chan.a = (int32_t)(CLAMP(src[3], -65536, 65535) * (double)0x10000); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 16; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32b32a32_fixed_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32b32a32_fixed pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (float)(pixel.chan.r * (1.0/0x10000)); /* r */ - dst[1] = (float)(pixel.chan.g * (1.0/0x10000)); /* g */ - dst[2] = (float)(pixel.chan.b * (1.0/0x10000)); /* b */ - dst[3] = (float)(pixel.chan.a * (1.0/0x10000)); /* a */ -} - -static INLINE void -util_format_r32g32b32a32_fixed_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_fixed pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (uint8_t)((CLAMP(pixel.chan.r, 0, 65536) * (1.0/0x10000)) * 0xff); /* r */ - dst[1] = (uint8_t)((CLAMP(pixel.chan.g, 0, 65536) * (1.0/0x10000)) * 0xff); /* g */ - dst[2] = (uint8_t)((CLAMP(pixel.chan.b, 0, 65536) * (1.0/0x10000)) * 0xff); /* b */ - dst[3] = (uint8_t)((CLAMP(pixel.chan.a, 0, 65536) * (1.0/0x10000)) * 0xff); /* a */ - src += 16; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32a32_fixed_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_fixed pixel; - pixel.chan.r = (int32_t)((float)(src[0] * (1.0f/0xff)) * (double)0x10000); - pixel.chan.g = (int32_t)((float)(src[1] * (1.0f/0xff)) * (double)0x10000); - pixel.chan.b = (int32_t)((float)(src[2] * (1.0f/0xff)) * (double)0x10000); - pixel.chan.a = (int32_t)((float)(src[3] * (1.0f/0xff)) * (double)0x10000); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 16; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r10g10b10x2_uscaled { - uint32_t value; - struct { - unsigned r:10; - unsigned g:10; - unsigned b:10; - unsigned x:2; - } chan; -}; - -static INLINE void -util_format_r10g10b10x2_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0x3ff; - g = (value >> 10) & 0x3ff; - b = (value >> 20) & 0x3ff; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = (float)b; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r10g10b10x2_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint32_t)CLAMP(src[0], 0, 1023)) & 0x3ff; - value |= (((uint32_t)CLAMP(src[1], 0, 1023)) & 0x3ff) << 10; - value |= (((uint32_t)CLAMP(src[2], 0, 1023)) & 0x3ff) << 20; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r10g10b10x2_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0x3ff; - g = (value >> 10) & 0x3ff; - b = (value >> 20) & 0x3ff; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = (float)b; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r10g10b10x2_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0x3ff; - g = (value >> 10) & 0x3ff; - b = (value >> 20) & 0x3ff; - dst[0] = (uint8_t)(((uint32_t)MIN2(r, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint32_t)MIN2(g, 1)) * 0xff / 0x1); /* g */ - dst[2] = (uint8_t)(((uint32_t)MIN2(b, 1)) * 0xff / 0x1); /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r10g10b10x2_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint32_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0x3ff; - value |= (((uint32_t)(((uint32_t)src[1]) * 0x1 / 0xff)) & 0x3ff) << 10; - value |= (((uint32_t)(((uint32_t)src[2]) * 0x1 / 0xff)) & 0x3ff) << 20; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r10g10b10x2_snorm { - uint32_t value; - struct { - int r:10; - int g:10; - int b:10; - unsigned x:2; - } chan; -}; - -static INLINE void -util_format_r10g10b10x2_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 22) ) >> 22; - g = ((int32_t)(value << 12) ) >> 22; - b = ((int32_t)(value << 2) ) >> 22; - dst[0] = (float)(r * (1.0f/0x1ff)); /* r */ - dst[1] = (float)(g * (1.0f/0x1ff)); /* g */ - dst[2] = (float)(b * (1.0f/0x1ff)); /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r10g10b10x2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((uint32_t)(CLAMP(src[0], -1, 1) * 0x1ff)) & 0x3ff) ; - value |= (uint32_t)((((uint32_t)(CLAMP(src[1], -1, 1) * 0x1ff)) & 0x3ff) << 10) ; - value |= (uint32_t)((((uint32_t)(CLAMP(src[2], -1, 1) * 0x1ff)) & 0x3ff) << 20) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r10g10b10x2_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 22) ) >> 22; - g = ((int32_t)(value << 12) ) >> 22; - b = ((int32_t)(value << 2) ) >> 22; - dst[0] = (float)(r * (1.0f/0x1ff)); /* r */ - dst[1] = (float)(g * (1.0f/0x1ff)); /* g */ - dst[2] = (float)(b * (1.0f/0x1ff)); /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r10g10b10x2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 22) ) >> 22; - g = ((int32_t)(value << 12) ) >> 22; - b = ((int32_t)(value << 2) ) >> 22; - dst[0] = (uint8_t)(MAX2(r, 0) >> 1); /* r */ - dst[1] = (uint8_t)(MAX2(g, 0) >> 1); /* g */ - dst[2] = (uint8_t)(MAX2(b, 0) >> 1); /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r10g10b10x2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((uint32_t)(((uint32_t)src[0]) * 0x1ff / 0xff)) & 0x3ff) ; - value |= (uint32_t)((((uint32_t)(((uint32_t)src[1]) * 0x1ff / 0xff)) & 0x3ff) << 10) ; - value |= (uint32_t)((((uint32_t)(((uint32_t)src[2]) * 0x1ff / 0xff)) & 0x3ff) << 20) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r4a4_unorm { - uint8_t value; - struct { - unsigned a:4; - unsigned r:4; - } chan; -}; - -static INLINE void -util_format_r4a4_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t a; - uint8_t r; - a = (value) & 0xf; - r = value >> 4; - dst[0] = (float)(r * (1.0f/0xf)); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (float)(a * (1.0f/0xf)); /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r4a4_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= ((uint8_t)(CLAMP(src[3], 0, 1) * 0xf)) & 0xf; - value |= ((uint8_t)(CLAMP(src[0], 0, 1) * 0xf)) << 4; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r4a4_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - uint8_t a; - uint8_t r; - a = (value) & 0xf; - r = value >> 4; - dst[0] = (float)(r * (1.0f/0xf)); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (float)(a * (1.0f/0xf)); /* a */ -} - -static INLINE void -util_format_r4a4_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t a; - uint8_t r; - a = (value) & 0xf; - r = value >> 4; - dst[0] = (uint8_t)(((uint32_t)r) * 0xff / 0xf); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (uint8_t)(((uint32_t)a) * 0xff / 0xf); /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r4a4_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= ((uint8_t)(src[3] >> 4)) & 0xf; - value |= ((uint8_t)(src[0] >> 4)) << 4; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_a4r4_unorm { - uint8_t value; - struct { - unsigned r:4; - unsigned a:4; - } chan; -}; - -static INLINE void -util_format_a4r4_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t r; - uint8_t a; - r = (value) & 0xf; - a = value >> 4; - dst[0] = (float)(r * (1.0f/0xf)); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (float)(a * (1.0f/0xf)); /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a4r4_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= ((uint8_t)(CLAMP(src[0], 0, 1) * 0xf)) & 0xf; - value |= ((uint8_t)(CLAMP(src[3], 0, 1) * 0xf)) << 4; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_a4r4_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - uint8_t r; - uint8_t a; - r = (value) & 0xf; - a = value >> 4; - dst[0] = (float)(r * (1.0f/0xf)); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (float)(a * (1.0f/0xf)); /* a */ -} - -static INLINE void -util_format_a4r4_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t r; - uint8_t a; - r = (value) & 0xf; - a = value >> 4; - dst[0] = (uint8_t)(((uint32_t)r) * 0xff / 0xf); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (uint8_t)(((uint32_t)a) * 0xff / 0xf); /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a4r4_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= ((uint8_t)(src[0] >> 4)) & 0xf; - value |= ((uint8_t)(src[3] >> 4)) << 4; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8a8_unorm { - uint16_t value; - struct { - uint8_t r; - uint8_t a; - } chan; -}; - -static INLINE void -util_format_r8a8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t r; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (value) & 0xff; - a = value >> 8; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = ubyte_to_float(a); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8a8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (float_to_ubyte(src[0])) & 0xff; - value |= (float_to_ubyte(src[3])) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8a8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t r; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (value) & 0xff; - a = value >> 8; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = ubyte_to_float(a); /* a */ -} - -static INLINE void -util_format_r8a8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t r; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (value) & 0xff; - a = value >> 8; - dst[0] = r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = a; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8a8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (src[0]) & 0xff; - value |= (src[3]) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_a8r8_unorm { - uint16_t value; - struct { - uint8_t a; - uint8_t r; - } chan; -}; - -static INLINE void -util_format_a8r8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t a; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - a = (value) & 0xff; - r = value >> 8; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = ubyte_to_float(a); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a8r8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (float_to_ubyte(src[3])) & 0xff; - value |= (float_to_ubyte(src[0])) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_a8r8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t a; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - a = (value) & 0xff; - r = value >> 8; - dst[0] = ubyte_to_float(r); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = ubyte_to_float(a); /* a */ -} - -static INLINE void -util_format_a8r8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t a; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - a = (value) & 0xff; - r = value >> 8; - dst[0] = r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = a; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a8r8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (src[3]) & 0xff; - value |= (src[0]) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r10g10b10a2_uscaled { - uint32_t value; - struct { - unsigned r:10; - unsigned g:10; - unsigned b:10; - unsigned a:2; - } chan; -}; - -static INLINE void -util_format_r10g10b10a2_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0x3ff; - g = (value >> 10) & 0x3ff; - b = (value >> 20) & 0x3ff; - a = value >> 30; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = (float)b; /* b */ - dst[3] = (float)a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r10g10b10a2_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint32_t)CLAMP(src[0], 0, 1023)) & 0x3ff; - value |= (((uint32_t)CLAMP(src[1], 0, 1023)) & 0x3ff) << 10; - value |= (((uint32_t)CLAMP(src[2], 0, 1023)) & 0x3ff) << 20; - value |= ((uint32_t)CLAMP(src[3], 0, 3)) << 30; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r10g10b10a2_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0x3ff; - g = (value >> 10) & 0x3ff; - b = (value >> 20) & 0x3ff; - a = value >> 30; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = (float)b; /* b */ - dst[3] = (float)a; /* a */ -} - -static INLINE void -util_format_r10g10b10a2_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0x3ff; - g = (value >> 10) & 0x3ff; - b = (value >> 20) & 0x3ff; - a = value >> 30; - dst[0] = (uint8_t)(((uint32_t)MIN2(r, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint32_t)MIN2(g, 1)) * 0xff / 0x1); /* g */ - dst[2] = (uint8_t)(((uint32_t)MIN2(b, 1)) * 0xff / 0x1); /* b */ - dst[3] = (uint8_t)(((uint32_t)MIN2(a, 1)) * 0xff / 0x1); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r10g10b10a2_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint32_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0x3ff; - value |= (((uint32_t)(((uint32_t)src[1]) * 0x1 / 0xff)) & 0x3ff) << 10; - value |= (((uint32_t)(((uint32_t)src[2]) * 0x1 / 0xff)) & 0x3ff) << 20; - value |= ((uint32_t)(((uint32_t)src[3]) * 0x1 / 0xff)) << 30; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r10g10b10a2_sscaled { - uint32_t value; - struct { - int r:10; - int g:10; - int b:10; - int a:2; - } chan; -}; - -static INLINE void -util_format_r10g10b10a2_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 22) ) >> 22; - g = ((int32_t)(value << 12) ) >> 22; - b = ((int32_t)(value << 2) ) >> 22; - a = ((int32_t)(value) ) >> 30; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = (float)b; /* b */ - dst[3] = (float)a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r10g10b10a2_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((uint32_t)CLAMP(src[0], -512, 511)) & 0x3ff) ; - value |= (uint32_t)((((uint32_t)CLAMP(src[1], -512, 511)) & 0x3ff) << 10) ; - value |= (uint32_t)((((uint32_t)CLAMP(src[2], -512, 511)) & 0x3ff) << 20) ; - value |= (uint32_t)(((uint32_t)CLAMP(src[3], -2, 1)) << 30) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r10g10b10a2_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 22) ) >> 22; - g = ((int32_t)(value << 12) ) >> 22; - b = ((int32_t)(value << 2) ) >> 22; - a = ((int32_t)(value) ) >> 30; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = (float)b; /* b */ - dst[3] = (float)a; /* a */ -} - -static INLINE void -util_format_r10g10b10a2_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 22) ) >> 22; - g = ((int32_t)(value << 12) ) >> 22; - b = ((int32_t)(value << 2) ) >> 22; - a = ((int32_t)(value) ) >> 30; - dst[0] = (uint8_t)(((uint32_t)CLAMP(r, 0, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint32_t)CLAMP(g, 0, 1)) * 0xff / 0x1); /* g */ - dst[2] = (uint8_t)(((uint32_t)CLAMP(b, 0, 1)) * 0xff / 0x1); /* b */ - dst[3] = (uint8_t)(((uint32_t)MAX2(a, 0)) * 0xff / 0x1); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r10g10b10a2_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((uint32_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0x3ff) ; - value |= (uint32_t)((((uint32_t)(((uint32_t)src[1]) * 0x1 / 0xff)) & 0x3ff) << 10) ; - value |= (uint32_t)((((uint32_t)(((uint32_t)src[2]) * 0x1 / 0xff)) & 0x3ff) << 20) ; - value |= (uint32_t)(((uint32_t)(((uint32_t)src[3]) * 0x1 / 0xff)) << 30) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r10g10b10a2_snorm { - uint32_t value; - struct { - int r:10; - int g:10; - int b:10; - int a:2; - } chan; -}; - -static INLINE void -util_format_r10g10b10a2_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 22) ) >> 22; - g = ((int32_t)(value << 12) ) >> 22; - b = ((int32_t)(value << 2) ) >> 22; - a = ((int32_t)(value) ) >> 30; - dst[0] = (float)(r * (1.0f/0x1ff)); /* r */ - dst[1] = (float)(g * (1.0f/0x1ff)); /* g */ - dst[2] = (float)(b * (1.0f/0x1ff)); /* b */ - dst[3] = (float)(a * (1.0f/0x1)); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r10g10b10a2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((uint32_t)(CLAMP(src[0], -1, 1) * 0x1ff)) & 0x3ff) ; - value |= (uint32_t)((((uint32_t)(CLAMP(src[1], -1, 1) * 0x1ff)) & 0x3ff) << 10) ; - value |= (uint32_t)((((uint32_t)(CLAMP(src[2], -1, 1) * 0x1ff)) & 0x3ff) << 20) ; - value |= (uint32_t)(((uint32_t)(CLAMP(src[3], -1, 1) * 0x1)) << 30) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r10g10b10a2_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 22) ) >> 22; - g = ((int32_t)(value << 12) ) >> 22; - b = ((int32_t)(value << 2) ) >> 22; - a = ((int32_t)(value) ) >> 30; - dst[0] = (float)(r * (1.0f/0x1ff)); /* r */ - dst[1] = (float)(g * (1.0f/0x1ff)); /* g */ - dst[2] = (float)(b * (1.0f/0x1ff)); /* b */ - dst[3] = (float)(a * (1.0f/0x1)); /* a */ -} - -static INLINE void -util_format_r10g10b10a2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 22) ) >> 22; - g = ((int32_t)(value << 12) ) >> 22; - b = ((int32_t)(value << 2) ) >> 22; - a = ((int32_t)(value) ) >> 30; - dst[0] = (uint8_t)(MAX2(r, 0) >> 1); /* r */ - dst[1] = (uint8_t)(MAX2(g, 0) >> 1); /* g */ - dst[2] = (uint8_t)(MAX2(b, 0) >> 1); /* b */ - dst[3] = (uint8_t)(((uint32_t)MAX2(a, 0)) * 0xff / 0x1); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r10g10b10a2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((uint32_t)(((uint32_t)src[0]) * 0x1ff / 0xff)) & 0x3ff) ; - value |= (uint32_t)((((uint32_t)(((uint32_t)src[1]) * 0x1ff / 0xff)) & 0x3ff) << 10) ; - value |= (uint32_t)((((uint32_t)(((uint32_t)src[2]) * 0x1ff / 0xff)) & 0x3ff) << 20) ; - value |= (uint32_t)(((uint32_t)(src[3] >> 7)) << 30) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_b10g10r10a2_uscaled { - uint32_t value; - struct { - unsigned b:10; - unsigned g:10; - unsigned r:10; - unsigned a:2; - } chan; -}; - -static INLINE void -util_format_b10g10r10a2_uscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0x3ff; - g = (value >> 10) & 0x3ff; - r = (value >> 20) & 0x3ff; - a = value >> 30; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = (float)b; /* b */ - dst[3] = (float)a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b10g10r10a2_uscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint32_t)CLAMP(src[2], 0, 1023)) & 0x3ff; - value |= (((uint32_t)CLAMP(src[1], 0, 1023)) & 0x3ff) << 10; - value |= (((uint32_t)CLAMP(src[0], 0, 1023)) & 0x3ff) << 20; - value |= ((uint32_t)CLAMP(src[3], 0, 3)) << 30; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_b10g10r10a2_uscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0x3ff; - g = (value >> 10) & 0x3ff; - r = (value >> 20) & 0x3ff; - a = value >> 30; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = (float)b; /* b */ - dst[3] = (float)a; /* a */ -} - -static INLINE void -util_format_b10g10r10a2_uscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0x3ff; - g = (value >> 10) & 0x3ff; - r = (value >> 20) & 0x3ff; - a = value >> 30; - dst[0] = (uint8_t)(((uint32_t)MIN2(r, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint32_t)MIN2(g, 1)) * 0xff / 0x1); /* g */ - dst[2] = (uint8_t)(((uint32_t)MIN2(b, 1)) * 0xff / 0x1); /* b */ - dst[3] = (uint8_t)(((uint32_t)MIN2(a, 1)) * 0xff / 0x1); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b10g10r10a2_uscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint32_t)(((uint32_t)src[2]) * 0x1 / 0xff)) & 0x3ff; - value |= (((uint32_t)(((uint32_t)src[1]) * 0x1 / 0xff)) & 0x3ff) << 10; - value |= (((uint32_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0x3ff) << 20; - value |= ((uint32_t)(((uint32_t)src[3]) * 0x1 / 0xff)) << 30; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_b10g10r10a2_sscaled { - uint32_t value; - struct { - int b:10; - int g:10; - int r:10; - int a:2; - } chan; -}; - -static INLINE void -util_format_b10g10r10a2_sscaled_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t b; - int32_t g; - int32_t r; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = ((int32_t)(value << 22) ) >> 22; - g = ((int32_t)(value << 12) ) >> 22; - r = ((int32_t)(value << 2) ) >> 22; - a = ((int32_t)(value) ) >> 30; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = (float)b; /* b */ - dst[3] = (float)a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b10g10r10a2_sscaled_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((uint32_t)CLAMP(src[2], -512, 511)) & 0x3ff) ; - value |= (uint32_t)((((uint32_t)CLAMP(src[1], -512, 511)) & 0x3ff) << 10) ; - value |= (uint32_t)((((uint32_t)CLAMP(src[0], -512, 511)) & 0x3ff) << 20) ; - value |= (uint32_t)(((uint32_t)CLAMP(src[3], -2, 1)) << 30) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_b10g10r10a2_sscaled_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t b; - int32_t g; - int32_t r; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = ((int32_t)(value << 22) ) >> 22; - g = ((int32_t)(value << 12) ) >> 22; - r = ((int32_t)(value << 2) ) >> 22; - a = ((int32_t)(value) ) >> 30; - dst[0] = (float)r; /* r */ - dst[1] = (float)g; /* g */ - dst[2] = (float)b; /* b */ - dst[3] = (float)a; /* a */ -} - -static INLINE void -util_format_b10g10r10a2_sscaled_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t b; - int32_t g; - int32_t r; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = ((int32_t)(value << 22) ) >> 22; - g = ((int32_t)(value << 12) ) >> 22; - r = ((int32_t)(value << 2) ) >> 22; - a = ((int32_t)(value) ) >> 30; - dst[0] = (uint8_t)(((uint32_t)CLAMP(r, 0, 1)) * 0xff / 0x1); /* r */ - dst[1] = (uint8_t)(((uint32_t)CLAMP(g, 0, 1)) * 0xff / 0x1); /* g */ - dst[2] = (uint8_t)(((uint32_t)CLAMP(b, 0, 1)) * 0xff / 0x1); /* b */ - dst[3] = (uint8_t)(((uint32_t)MAX2(a, 0)) * 0xff / 0x1); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b10g10r10a2_sscaled_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((uint32_t)(((uint32_t)src[2]) * 0x1 / 0xff)) & 0x3ff) ; - value |= (uint32_t)((((uint32_t)(((uint32_t)src[1]) * 0x1 / 0xff)) & 0x3ff) << 10) ; - value |= (uint32_t)((((uint32_t)(((uint32_t)src[0]) * 0x1 / 0xff)) & 0x3ff) << 20) ; - value |= (uint32_t)(((uint32_t)(((uint32_t)src[3]) * 0x1 / 0xff)) << 30) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_b10g10r10a2_snorm { - uint32_t value; - struct { - int b:10; - int g:10; - int r:10; - int a:2; - } chan; -}; - -static INLINE void -util_format_b10g10r10a2_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t b; - int32_t g; - int32_t r; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = ((int32_t)(value << 22) ) >> 22; - g = ((int32_t)(value << 12) ) >> 22; - r = ((int32_t)(value << 2) ) >> 22; - a = ((int32_t)(value) ) >> 30; - dst[0] = (float)(r * (1.0f/0x1ff)); /* r */ - dst[1] = (float)(g * (1.0f/0x1ff)); /* g */ - dst[2] = (float)(b * (1.0f/0x1ff)); /* b */ - dst[3] = (float)(a * (1.0f/0x1)); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b10g10r10a2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((uint32_t)(CLAMP(src[2], -1, 1) * 0x1ff)) & 0x3ff) ; - value |= (uint32_t)((((uint32_t)(CLAMP(src[1], -1, 1) * 0x1ff)) & 0x3ff) << 10) ; - value |= (uint32_t)((((uint32_t)(CLAMP(src[0], -1, 1) * 0x1ff)) & 0x3ff) << 20) ; - value |= (uint32_t)(((uint32_t)(CLAMP(src[3], -1, 1) * 0x1)) << 30) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_b10g10r10a2_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t b; - int32_t g; - int32_t r; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = ((int32_t)(value << 22) ) >> 22; - g = ((int32_t)(value << 12) ) >> 22; - r = ((int32_t)(value << 2) ) >> 22; - a = ((int32_t)(value) ) >> 30; - dst[0] = (float)(r * (1.0f/0x1ff)); /* r */ - dst[1] = (float)(g * (1.0f/0x1ff)); /* g */ - dst[2] = (float)(b * (1.0f/0x1ff)); /* b */ - dst[3] = (float)(a * (1.0f/0x1)); /* a */ -} - -static INLINE void -util_format_b10g10r10a2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t b; - int32_t g; - int32_t r; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = ((int32_t)(value << 22) ) >> 22; - g = ((int32_t)(value << 12) ) >> 22; - r = ((int32_t)(value << 2) ) >> 22; - a = ((int32_t)(value) ) >> 30; - dst[0] = (uint8_t)(MAX2(r, 0) >> 1); /* r */ - dst[1] = (uint8_t)(MAX2(g, 0) >> 1); /* g */ - dst[2] = (uint8_t)(MAX2(b, 0) >> 1); /* b */ - dst[3] = (uint8_t)(((uint32_t)MAX2(a, 0)) * 0xff / 0x1); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b10g10r10a2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((uint32_t)(((uint32_t)src[2]) * 0x1ff / 0xff)) & 0x3ff) ; - value |= (uint32_t)((((uint32_t)(((uint32_t)src[1]) * 0x1ff / 0xff)) & 0x3ff) << 10) ; - value |= (uint32_t)((((uint32_t)(((uint32_t)src[0]) * 0x1ff / 0xff)) & 0x3ff) << 20) ; - value |= (uint32_t)(((uint32_t)(src[3] >> 7)) << 30) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8_uint { - uint8_t value; - struct { - uint8_t r; - } chan; -}; - -static INLINE void -util_format_r8_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t r; - r = value; - dst[0] = (unsigned)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)MIN2(src[0], 255); - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - uint8_t r; - r = value; - dst[0] = (unsigned)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t r; - r = value; - dst[0] = (int)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)CLAMP(src[0], 0, 255); - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8_uint { - uint16_t value; - struct { - uint8_t r; - uint8_t g; - } chan; -}; - -static INLINE void -util_format_r8g8_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t r; - uint16_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (value) & 0xff; - g = value >> 8; - dst[0] = (unsigned)r; /* r */ - dst[1] = (unsigned)g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= ((uint8_t)MIN2(src[0], 255)) & 0xff; - value |= ((uint8_t)MIN2(src[1], 255)) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t r; - uint16_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (value) & 0xff; - g = value >> 8; - dst[0] = (unsigned)r; /* r */ - dst[1] = (unsigned)g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8g8_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t r; - uint16_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (value) & 0xff; - g = value >> 8; - dst[0] = (int)r; /* r */ - dst[1] = (int)g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= ((uint8_t)CLAMP(src[0], 0, 255)) & 0xff; - value |= ((uint8_t)CLAMP(src[1], 0, 255)) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8b8_uint { - struct { - uint8_t r; - uint8_t g; - uint8_t b; - } chan; -}; - -static INLINE void -util_format_r8g8b8_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (unsigned)pixel.chan.r; /* r */ - dst[1] = (unsigned)pixel.chan.g; /* g */ - dst[2] = (unsigned)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ - src += 3; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_uint pixel; - pixel.chan.r = (uint8_t)MIN2(src[0], 255); - pixel.chan.g = (uint8_t)MIN2(src[1], 255); - pixel.chan.b = (uint8_t)MIN2(src[2], 255); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 3; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8b8_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r8g8b8_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (unsigned)pixel.chan.r; /* r */ - dst[1] = (unsigned)pixel.chan.g; /* g */ - dst[2] = (unsigned)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8g8b8_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (int)pixel.chan.r; /* r */ - dst[1] = (int)pixel.chan.g; /* g */ - dst[2] = (int)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ - src += 3; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_uint pixel; - pixel.chan.r = (uint8_t)CLAMP(src[0], 0, 255); - pixel.chan.g = (uint8_t)CLAMP(src[1], 0, 255); - pixel.chan.b = (uint8_t)CLAMP(src[2], 0, 255); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 3; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8b8a8_uint { - uint32_t value; - struct { - uint8_t r; - uint8_t g; - uint8_t b; - uint8_t a; - } chan; -}; - -static INLINE void -util_format_r8g8b8a8_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xff; - g = (value >> 8) & 0xff; - b = (value >> 16) & 0xff; - a = value >> 24; - dst[0] = (unsigned)r; /* r */ - dst[1] = (unsigned)g; /* g */ - dst[2] = (unsigned)b; /* b */ - dst[3] = (unsigned)a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8a8_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint8_t)MIN2(src[0], 255)) & 0xff; - value |= (((uint8_t)MIN2(src[1], 255)) & 0xff) << 8; - value |= (((uint8_t)MIN2(src[2], 255)) & 0xff) << 16; - value |= ((uint8_t)MIN2(src[3], 255)) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8b8a8_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xff; - g = (value >> 8) & 0xff; - b = (value >> 16) & 0xff; - a = value >> 24; - dst[0] = (unsigned)r; /* r */ - dst[1] = (unsigned)g; /* g */ - dst[2] = (unsigned)b; /* b */ - dst[3] = (unsigned)a; /* a */ -} - -static INLINE void -util_format_r8g8b8a8_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xff; - g = (value >> 8) & 0xff; - b = (value >> 16) & 0xff; - a = value >> 24; - dst[0] = (int)r; /* r */ - dst[1] = (int)g; /* g */ - dst[2] = (int)b; /* b */ - dst[3] = (int)a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8a8_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint8_t)CLAMP(src[0], 0, 255)) & 0xff; - value |= (((uint8_t)CLAMP(src[1], 0, 255)) & 0xff) << 8; - value |= (((uint8_t)CLAMP(src[2], 0, 255)) & 0xff) << 16; - value |= ((uint8_t)CLAMP(src[3], 0, 255)) << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8_sint { - uint8_t value; - struct { - int8_t r; - } chan; -}; - -static INLINE void -util_format_r8_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - int8_t r; - r = (int8_t)(value) ; - dst[0] = (int)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)((int8_t)CLAMP(src[0], -128, 127)) ; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - int8_t r; - r = (int8_t)(value) ; - dst[0] = (int)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - int8_t r; - r = (int8_t)(value) ; - dst[0] = (unsigned)MAX2(r, 0); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)((int8_t)MIN2(src[0], 127)) ; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8_sint { - uint16_t value; - struct { - int8_t r; - int8_t g; - } chan; -}; - -static INLINE void -util_format_r8g8_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t r; - int16_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = ((int16_t)(value << 8) ) >> 8; - g = ((int16_t)(value) ) >> 8; - dst[0] = (int)r; /* r */ - dst[1] = (int)g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(((int8_t)CLAMP(src[0], -128, 127)) & 0xff) ; - value |= (uint16_t)(((int8_t)CLAMP(src[1], -128, 127)) << 8) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - int16_t r; - int16_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = ((int16_t)(value << 8) ) >> 8; - g = ((int16_t)(value) ) >> 8; - dst[0] = (int)r; /* r */ - dst[1] = (int)g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8g8_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t r; - int16_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = ((int16_t)(value << 8) ) >> 8; - g = ((int16_t)(value) ) >> 8; - dst[0] = (unsigned)MAX2(r, 0); /* r */ - dst[1] = (unsigned)MAX2(g, 0); /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(((int8_t)MIN2(src[0], 127)) & 0xff) ; - value |= (uint16_t)(((int8_t)MIN2(src[1], 127)) << 8) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8b8_sint { - struct { - int8_t r; - int8_t g; - int8_t b; - } chan; -}; - -static INLINE void -util_format_r8g8b8_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (int)pixel.chan.r; /* r */ - dst[1] = (int)pixel.chan.g; /* g */ - dst[2] = (int)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ - src += 3; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_sint pixel; - pixel.chan.r = (int8_t)CLAMP(src[0], -128, 127); - pixel.chan.g = (int8_t)CLAMP(src[1], -128, 127); - pixel.chan.b = (int8_t)CLAMP(src[2], -128, 127); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 3; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8b8_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r8g8b8_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (int)pixel.chan.r; /* r */ - dst[1] = (int)pixel.chan.g; /* g */ - dst[2] = (int)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r8g8b8_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (unsigned)MAX2(pixel.chan.r, 0); /* r */ - dst[1] = (unsigned)MAX2(pixel.chan.g, 0); /* g */ - dst[2] = (unsigned)MAX2(pixel.chan.b, 0); /* b */ - dst[3] = 1; /* a */ - src += 3; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r8g8b8_sint pixel; - pixel.chan.r = (int8_t)MIN2(src[0], 127); - pixel.chan.g = (int8_t)MIN2(src[1], 127); - pixel.chan.b = (int8_t)MIN2(src[2], 127); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 3; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r8g8b8a8_sint { - uint32_t value; - struct { - int8_t r; - int8_t g; - int8_t b; - int8_t a; - } chan; -}; - -static INLINE void -util_format_r8g8b8a8_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 24) ) >> 24; - g = ((int32_t)(value << 16) ) >> 24; - b = ((int32_t)(value << 8) ) >> 24; - a = ((int32_t)(value) ) >> 24; - dst[0] = (int)r; /* r */ - dst[1] = (int)g; /* g */ - dst[2] = (int)b; /* b */ - dst[3] = (int)a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8a8_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((int8_t)CLAMP(src[0], -128, 127)) & 0xff) ; - value |= (uint32_t)((((int8_t)CLAMP(src[1], -128, 127)) & 0xff) << 8) ; - value |= (uint32_t)((((int8_t)CLAMP(src[2], -128, 127)) & 0xff) << 16) ; - value |= (uint32_t)(((int8_t)CLAMP(src[3], -128, 127)) << 24) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r8g8b8a8_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 24) ) >> 24; - g = ((int32_t)(value << 16) ) >> 24; - b = ((int32_t)(value << 8) ) >> 24; - a = ((int32_t)(value) ) >> 24; - dst[0] = (int)r; /* r */ - dst[1] = (int)g; /* g */ - dst[2] = (int)b; /* b */ - dst[3] = (int)a; /* a */ -} - -static INLINE void -util_format_r8g8b8a8_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; - int32_t b; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 24) ) >> 24; - g = ((int32_t)(value << 16) ) >> 24; - b = ((int32_t)(value << 8) ) >> 24; - a = ((int32_t)(value) ) >> 24; - dst[0] = (unsigned)MAX2(r, 0); /* r */ - dst[1] = (unsigned)MAX2(g, 0); /* g */ - dst[2] = (unsigned)MAX2(b, 0); /* b */ - dst[3] = (unsigned)MAX2(a, 0); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r8g8b8a8_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((int8_t)MIN2(src[0], 127)) & 0xff) ; - value |= (uint32_t)((((int8_t)MIN2(src[1], 127)) & 0xff) << 8) ; - value |= (uint32_t)((((int8_t)MIN2(src[2], 127)) & 0xff) << 16) ; - value |= (uint32_t)(((int8_t)MIN2(src[3], 127)) << 24) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16_uint { - uint16_t value; - struct { - uint16_t r; - } chan; -}; - -static INLINE void -util_format_r16_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = value; - dst[0] = (unsigned)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)MIN2(src[0], 65535); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = value; - dst[0] = (unsigned)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = value; - dst[0] = (int)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)CLAMP(src[0], 0, 65535); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16_uint { - uint32_t value; - struct { - uint16_t r; - uint16_t g; - } chan; -}; - -static INLINE void -util_format_r16g16_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xffff; - g = value >> 16; - dst[0] = (unsigned)r; /* r */ - dst[1] = (unsigned)g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint16_t)MIN2(src[0], 65535)) & 0xffff; - value |= ((uint16_t)MIN2(src[1], 65535)) << 16; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xffff; - g = value >> 16; - dst[0] = (unsigned)r; /* r */ - dst[1] = (unsigned)g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16g16_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; - uint32_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (value) & 0xffff; - g = value >> 16; - dst[0] = (int)r; /* r */ - dst[1] = (int)g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint16_t)CLAMP(src[0], 0, 65535)) & 0xffff; - value |= ((uint16_t)CLAMP(src[1], 0, 65535)) << 16; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16b16_uint { - struct { - uint16_t r; - uint16_t g; - uint16_t b; - } chan; -}; - -static INLINE void -util_format_r16g16b16_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (unsigned)pixel.chan.r; /* r */ - dst[1] = (unsigned)pixel.chan.g; /* g */ - dst[2] = (unsigned)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ - src += 6; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_uint pixel; - pixel.chan.r = (uint16_t)MIN2(src[0], 65535); - pixel.chan.g = (uint16_t)MIN2(src[1], 65535); - pixel.chan.b = (uint16_t)MIN2(src[2], 65535); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 6; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16b16_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r16g16b16_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (unsigned)pixel.chan.r; /* r */ - dst[1] = (unsigned)pixel.chan.g; /* g */ - dst[2] = (unsigned)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16g16b16_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (int)pixel.chan.r; /* r */ - dst[1] = (int)pixel.chan.g; /* g */ - dst[2] = (int)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ - src += 6; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_uint pixel; - pixel.chan.r = (uint16_t)CLAMP(src[0], 0, 65535); - pixel.chan.g = (uint16_t)CLAMP(src[1], 0, 65535); - pixel.chan.b = (uint16_t)CLAMP(src[2], 0, 65535); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 6; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16b16a16_uint { - uint64_t value; - struct { - uint16_t r; - uint16_t g; - uint16_t b; - uint16_t a; - } chan; -}; - -static INLINE void -util_format_r16g16b16a16_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (unsigned)pixel.chan.r; /* r */ - dst[1] = (unsigned)pixel.chan.g; /* g */ - dst[2] = (unsigned)pixel.chan.b; /* b */ - dst[3] = (unsigned)pixel.chan.a; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16a16_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_uint pixel; - pixel.chan.r = (uint16_t)MIN2(src[0], 65535); - pixel.chan.g = (uint16_t)MIN2(src[1], 65535); - pixel.chan.b = (uint16_t)MIN2(src[2], 65535); - pixel.chan.a = (uint16_t)MIN2(src[3], 65535); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16b16a16_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r16g16b16a16_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (unsigned)pixel.chan.r; /* r */ - dst[1] = (unsigned)pixel.chan.g; /* g */ - dst[2] = (unsigned)pixel.chan.b; /* b */ - dst[3] = (unsigned)pixel.chan.a; /* a */ -} - -static INLINE void -util_format_r16g16b16a16_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (int)pixel.chan.r; /* r */ - dst[1] = (int)pixel.chan.g; /* g */ - dst[2] = (int)pixel.chan.b; /* b */ - dst[3] = (int)pixel.chan.a; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16a16_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_uint pixel; - pixel.chan.r = (uint16_t)CLAMP(src[0], 0, 65535); - pixel.chan.g = (uint16_t)CLAMP(src[1], 0, 65535); - pixel.chan.b = (uint16_t)CLAMP(src[2], 0, 65535); - pixel.chan.a = (uint16_t)CLAMP(src[3], 0, 65535); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16_sint { - uint16_t value; - struct { - int16_t r; - } chan; -}; - -static INLINE void -util_format_r16_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (int16_t)(value) ; - dst[0] = (int)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)((int16_t)CLAMP(src[0], -32768, 32767)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - int16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (int16_t)(value) ; - dst[0] = (int)r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - r = (int16_t)(value) ; - dst[0] = (unsigned)MAX2(r, 0); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)((int16_t)MIN2(src[0], 32767)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16_sint { - uint32_t value; - struct { - int16_t r; - int16_t g; - } chan; -}; - -static INLINE void -util_format_r16g16_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 16) ) >> 16; - g = ((int32_t)(value) ) >> 16; - dst[0] = (int)r; /* r */ - dst[1] = (int)g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((int16_t)CLAMP(src[0], -32768, 32767)) & 0xffff) ; - value |= (uint32_t)(((int16_t)CLAMP(src[1], -32768, 32767)) << 16) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 16) ) >> 16; - g = ((int32_t)(value) ) >> 16; - dst[0] = (int)r; /* r */ - dst[1] = (int)g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16g16_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; - int32_t g; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = ((int32_t)(value << 16) ) >> 16; - g = ((int32_t)(value) ) >> 16; - dst[0] = (unsigned)MAX2(r, 0); /* r */ - dst[1] = (unsigned)MAX2(g, 0); /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((int16_t)MIN2(src[0], 32767)) & 0xffff) ; - value |= (uint32_t)(((int16_t)MIN2(src[1], 32767)) << 16) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16b16_sint { - struct { - int16_t r; - int16_t g; - int16_t b; - } chan; -}; - -static INLINE void -util_format_r16g16b16_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (int)pixel.chan.r; /* r */ - dst[1] = (int)pixel.chan.g; /* g */ - dst[2] = (int)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ - src += 6; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_sint pixel; - pixel.chan.r = (int16_t)CLAMP(src[0], -32768, 32767); - pixel.chan.g = (int16_t)CLAMP(src[1], -32768, 32767); - pixel.chan.b = (int16_t)CLAMP(src[2], -32768, 32767); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 6; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16b16_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r16g16b16_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (int)pixel.chan.r; /* r */ - dst[1] = (int)pixel.chan.g; /* g */ - dst[2] = (int)pixel.chan.b; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r16g16b16_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (unsigned)MAX2(pixel.chan.r, 0); /* r */ - dst[1] = (unsigned)MAX2(pixel.chan.g, 0); /* g */ - dst[2] = (unsigned)MAX2(pixel.chan.b, 0); /* b */ - dst[3] = 1; /* a */ - src += 6; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16_sint pixel; - pixel.chan.r = (int16_t)MIN2(src[0], 32767); - pixel.chan.g = (int16_t)MIN2(src[1], 32767); - pixel.chan.b = (int16_t)MIN2(src[2], 32767); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 6; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r16g16b16a16_sint { - uint64_t value; - struct { - int16_t r; - int16_t g; - int16_t b; - int16_t a; - } chan; -}; - -static INLINE void -util_format_r16g16b16a16_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (int)pixel.chan.r; /* r */ - dst[1] = (int)pixel.chan.g; /* g */ - dst[2] = (int)pixel.chan.b; /* b */ - dst[3] = (int)pixel.chan.a; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16a16_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_sint pixel; - pixel.chan.r = (int16_t)CLAMP(src[0], -32768, 32767); - pixel.chan.g = (int16_t)CLAMP(src[1], -32768, 32767); - pixel.chan.b = (int16_t)CLAMP(src[2], -32768, 32767); - pixel.chan.a = (int16_t)CLAMP(src[3], -32768, 32767); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r16g16b16a16_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r16g16b16a16_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (int)pixel.chan.r; /* r */ - dst[1] = (int)pixel.chan.g; /* g */ - dst[2] = (int)pixel.chan.b; /* b */ - dst[3] = (int)pixel.chan.a; /* a */ -} - -static INLINE void -util_format_r16g16b16a16_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (unsigned)MAX2(pixel.chan.r, 0); /* r */ - dst[1] = (unsigned)MAX2(pixel.chan.g, 0); /* g */ - dst[2] = (unsigned)MAX2(pixel.chan.b, 0); /* b */ - dst[3] = (unsigned)MAX2(pixel.chan.a, 0); /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r16g16b16a16_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r16g16b16a16_sint pixel; - pixel.chan.r = (int16_t)MIN2(src[0], 32767); - pixel.chan.g = (int16_t)MIN2(src[1], 32767); - pixel.chan.b = (int16_t)MIN2(src[2], 32767); - pixel.chan.a = (int16_t)MIN2(src[3], 32767); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32_uint { - uint32_t value; - struct { - uint32_t r; - } chan; -}; - -static INLINE void -util_format_r32_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = value; - dst[0] = r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= src[0]; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = value; - dst[0] = r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = value; - dst[0] = (int)MIN2(r, 2147483647); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)MAX2(src[0], 0); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32_uint { - uint64_t value; - struct { - uint32_t r; - uint32_t g; - } chan; -}; - -static INLINE void -util_format_r32g32_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = pixel.chan.g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_uint pixel; - pixel.chan.r = src[0]; - pixel.chan.g = src[1]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = pixel.chan.g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32g32_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (int)MIN2(pixel.chan.r, 2147483647); /* r */ - dst[1] = (int)MIN2(pixel.chan.g, 2147483647); /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_uint pixel; - pixel.chan.r = (uint32_t)MAX2(src[0], 0); - pixel.chan.g = (uint32_t)MAX2(src[1], 0); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32b32_uint { - struct { - uint32_t r; - uint32_t g; - uint32_t b; - } chan; -}; - -static INLINE void -util_format_r32g32b32_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = pixel.chan.g; /* g */ - dst[2] = pixel.chan.b; /* b */ - dst[3] = 1; /* a */ - src += 12; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_uint pixel; - pixel.chan.r = src[0]; - pixel.chan.g = src[1]; - pixel.chan.b = src[2]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 12; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32b32_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32b32_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = pixel.chan.g; /* g */ - dst[2] = pixel.chan.b; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32g32b32_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (int)MIN2(pixel.chan.r, 2147483647); /* r */ - dst[1] = (int)MIN2(pixel.chan.g, 2147483647); /* g */ - dst[2] = (int)MIN2(pixel.chan.b, 2147483647); /* b */ - dst[3] = 1; /* a */ - src += 12; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_uint pixel; - pixel.chan.r = (uint32_t)MAX2(src[0], 0); - pixel.chan.g = (uint32_t)MAX2(src[1], 0); - pixel.chan.b = (uint32_t)MAX2(src[2], 0); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 12; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32b32a32_uint { - struct { - uint32_t r; - uint32_t g; - uint32_t b; - uint32_t a; - } chan; -}; - -static INLINE void -util_format_r32g32b32a32_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = pixel.chan.g; /* g */ - dst[2] = pixel.chan.b; /* b */ - dst[3] = pixel.chan.a; /* a */ - src += 16; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32a32_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_uint pixel; - pixel.chan.r = src[0]; - pixel.chan.g = src[1]; - pixel.chan.b = src[2]; - pixel.chan.a = src[3]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 16; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32b32a32_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32b32a32_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = pixel.chan.g; /* g */ - dst[2] = pixel.chan.b; /* b */ - dst[3] = pixel.chan.a; /* a */ -} - -static INLINE void -util_format_r32g32b32a32_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (int)MIN2(pixel.chan.r, 2147483647); /* r */ - dst[1] = (int)MIN2(pixel.chan.g, 2147483647); /* g */ - dst[2] = (int)MIN2(pixel.chan.b, 2147483647); /* b */ - dst[3] = (int)MIN2(pixel.chan.a, 2147483647); /* a */ - src += 16; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32a32_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_uint pixel; - pixel.chan.r = (uint32_t)MAX2(src[0], 0); - pixel.chan.g = (uint32_t)MAX2(src[1], 0); - pixel.chan.b = (uint32_t)MAX2(src[2], 0); - pixel.chan.a = (uint32_t)MAX2(src[3], 0); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 16; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32_sint { - uint32_t value; - struct { - int32_t r; - } chan; -}; - -static INLINE void -util_format_r32_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (int32_t)(value) ; - dst[0] = r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(src[0]) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (int32_t)(value) ; - dst[0] = r; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t r; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r = (int32_t)(value) ; - dst[0] = (unsigned)MAX2(r, 0); /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)((int32_t)MIN2(src[0], 2147483647)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32_sint { - uint64_t value; - struct { - int32_t r; - int32_t g; - } chan; -}; - -static INLINE void -util_format_r32g32_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = pixel.chan.g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_sint pixel; - pixel.chan.r = src[0]; - pixel.chan.g = src[1]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = pixel.chan.g; /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32g32_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (unsigned)MAX2(pixel.chan.r, 0); /* r */ - dst[1] = (unsigned)MAX2(pixel.chan.g, 0); /* g */ - dst[2] = 0; /* b */ - dst[3] = 1; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32_sint pixel; - pixel.chan.r = (int32_t)MIN2(src[0], 2147483647); - pixel.chan.g = (int32_t)MIN2(src[1], 2147483647); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32b32_sint { - struct { - int32_t r; - int32_t g; - int32_t b; - } chan; -}; - -static INLINE void -util_format_r32g32b32_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = pixel.chan.g; /* g */ - dst[2] = pixel.chan.b; /* b */ - dst[3] = 1; /* a */ - src += 12; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_sint pixel; - pixel.chan.r = src[0]; - pixel.chan.g = src[1]; - pixel.chan.b = src[2]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 12; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32b32_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32b32_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = pixel.chan.g; /* g */ - dst[2] = pixel.chan.b; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_r32g32b32_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (unsigned)MAX2(pixel.chan.r, 0); /* r */ - dst[1] = (unsigned)MAX2(pixel.chan.g, 0); /* g */ - dst[2] = (unsigned)MAX2(pixel.chan.b, 0); /* b */ - dst[3] = 1; /* a */ - src += 12; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32_sint pixel; - pixel.chan.r = (int32_t)MIN2(src[0], 2147483647); - pixel.chan.g = (int32_t)MIN2(src[1], 2147483647); - pixel.chan.b = (int32_t)MIN2(src[2], 2147483647); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 12; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_r32g32b32a32_sint { - struct { - int32_t r; - int32_t g; - int32_t b; - int32_t a; - } chan; -}; - -static INLINE void -util_format_r32g32b32a32_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = pixel.chan.g; /* g */ - dst[2] = pixel.chan.b; /* b */ - dst[3] = pixel.chan.a; /* a */ - src += 16; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32a32_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_sint pixel; - pixel.chan.r = src[0]; - pixel.chan.g = src[1]; - pixel.chan.b = src[2]; - pixel.chan.a = src[3]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 16; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_r32g32b32a32_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_r32g32b32a32_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.r; /* r */ - dst[1] = pixel.chan.g; /* g */ - dst[2] = pixel.chan.b; /* b */ - dst[3] = pixel.chan.a; /* a */ -} - -static INLINE void -util_format_r32g32b32a32_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (unsigned)MAX2(pixel.chan.r, 0); /* r */ - dst[1] = (unsigned)MAX2(pixel.chan.g, 0); /* g */ - dst[2] = (unsigned)MAX2(pixel.chan.b, 0); /* b */ - dst[3] = (unsigned)MAX2(pixel.chan.a, 0); /* a */ - src += 16; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_r32g32b32a32_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_r32g32b32a32_sint pixel; - pixel.chan.r = (int32_t)MIN2(src[0], 2147483647); - pixel.chan.g = (int32_t)MIN2(src[1], 2147483647); - pixel.chan.b = (int32_t)MIN2(src[2], 2147483647); - pixel.chan.a = (int32_t)MIN2(src[3], 2147483647); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 16; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_a8_uint { - uint8_t value; - struct { - uint8_t a; - } chan; -}; - -static INLINE void -util_format_a8_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t a; - a = value; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (unsigned)a; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a8_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)MIN2(src[3], 255); - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_a8_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - uint8_t a; - a = value; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (unsigned)a; /* a */ -} - -static INLINE void -util_format_a8_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t a; - a = value; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (int)a; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a8_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)CLAMP(src[3], 0, 255); - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_i8_uint { - uint8_t value; - struct { - uint8_t rgba; - } chan; -}; - -static INLINE void -util_format_i8_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t rgba; - rgba = value; - dst[0] = (unsigned)rgba; /* r */ - dst[1] = (unsigned)rgba; /* g */ - dst[2] = (unsigned)rgba; /* b */ - dst[3] = (unsigned)rgba; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i8_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)MIN2(src[0], 255); - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_i8_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - uint8_t rgba; - rgba = value; - dst[0] = (unsigned)rgba; /* r */ - dst[1] = (unsigned)rgba; /* g */ - dst[2] = (unsigned)rgba; /* b */ - dst[3] = (unsigned)rgba; /* a */ -} - -static INLINE void -util_format_i8_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t rgba; - rgba = value; - dst[0] = (int)rgba; /* r */ - dst[1] = (int)rgba; /* g */ - dst[2] = (int)rgba; /* b */ - dst[3] = (int)rgba; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i8_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)CLAMP(src[0], 0, 255); - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l8_uint { - uint8_t value; - struct { - uint8_t rgb; - } chan; -}; - -static INLINE void -util_format_l8_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t rgb; - rgb = value; - dst[0] = (unsigned)rgb; /* r */ - dst[1] = (unsigned)rgb; /* g */ - dst[2] = (unsigned)rgb; /* b */ - dst[3] = 1; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l8_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)MIN2(src[0], 255); - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l8_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - uint8_t rgb; - rgb = value; - dst[0] = (unsigned)rgb; /* r */ - dst[1] = (unsigned)rgb; /* g */ - dst[2] = (unsigned)rgb; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_l8_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - uint8_t rgb; - rgb = value; - dst[0] = (int)rgb; /* r */ - dst[1] = (int)rgb; /* g */ - dst[2] = (int)rgb; /* b */ - dst[3] = 1; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l8_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)CLAMP(src[0], 0, 255); - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l8a8_uint { - uint16_t value; - struct { - uint8_t rgb; - uint8_t a; - } chan; -}; - -static INLINE void -util_format_l8a8_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t rgb; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = (value) & 0xff; - a = value >> 8; - dst[0] = (unsigned)rgb; /* r */ - dst[1] = (unsigned)rgb; /* g */ - dst[2] = (unsigned)rgb; /* b */ - dst[3] = (unsigned)a; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l8a8_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= ((uint8_t)MIN2(src[0], 255)) & 0xff; - value |= ((uint8_t)MIN2(src[3], 255)) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l8a8_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t rgb; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = (value) & 0xff; - a = value >> 8; - dst[0] = (unsigned)rgb; /* r */ - dst[1] = (unsigned)rgb; /* g */ - dst[2] = (unsigned)rgb; /* b */ - dst[3] = (unsigned)a; /* a */ -} - -static INLINE void -util_format_l8a8_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t rgb; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = (value) & 0xff; - a = value >> 8; - dst[0] = (int)rgb; /* r */ - dst[1] = (int)rgb; /* g */ - dst[2] = (int)rgb; /* b */ - dst[3] = (int)a; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l8a8_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= ((uint8_t)CLAMP(src[0], 0, 255)) & 0xff; - value |= ((uint8_t)CLAMP(src[3], 0, 255)) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_a8_sint { - uint8_t value; - struct { - int8_t a; - } chan; -}; - -static INLINE void -util_format_a8_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - int8_t a; - a = (int8_t)(value) ; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (int)a; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a8_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)((int8_t)CLAMP(src[3], -128, 127)) ; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_a8_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - int8_t a; - a = (int8_t)(value) ; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (int)a; /* a */ -} - -static INLINE void -util_format_a8_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - int8_t a; - a = (int8_t)(value) ; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (unsigned)MAX2(a, 0); /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a8_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)((int8_t)MIN2(src[3], 127)) ; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_i8_sint { - uint8_t value; - struct { - int8_t rgba; - } chan; -}; - -static INLINE void -util_format_i8_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - int8_t rgba; - rgba = (int8_t)(value) ; - dst[0] = (int)rgba; /* r */ - dst[1] = (int)rgba; /* g */ - dst[2] = (int)rgba; /* b */ - dst[3] = (int)rgba; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i8_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)((int8_t)CLAMP(src[0], -128, 127)) ; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_i8_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - int8_t rgba; - rgba = (int8_t)(value) ; - dst[0] = (int)rgba; /* r */ - dst[1] = (int)rgba; /* g */ - dst[2] = (int)rgba; /* b */ - dst[3] = (int)rgba; /* a */ -} - -static INLINE void -util_format_i8_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - int8_t rgba; - rgba = (int8_t)(value) ; - dst[0] = (unsigned)MAX2(rgba, 0); /* r */ - dst[1] = (unsigned)MAX2(rgba, 0); /* g */ - dst[2] = (unsigned)MAX2(rgba, 0); /* b */ - dst[3] = (unsigned)MAX2(rgba, 0); /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i8_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)((int8_t)MIN2(src[0], 127)) ; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l8_sint { - uint8_t value; - struct { - int8_t rgb; - } chan; -}; - -static INLINE void -util_format_l8_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - int8_t rgb; - rgb = (int8_t)(value) ; - dst[0] = (int)rgb; /* r */ - dst[1] = (int)rgb; /* g */ - dst[2] = (int)rgb; /* b */ - dst[3] = 1; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l8_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)((int8_t)CLAMP(src[0], -128, 127)) ; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l8_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t value = *(const uint8_t *)src; - int8_t rgb; - rgb = (int8_t)(value) ; - dst[0] = (int)rgb; /* r */ - dst[1] = (int)rgb; /* g */ - dst[2] = (int)rgb; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_l8_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint8_t value = *(const uint8_t *)src; - int8_t rgb; - rgb = (int8_t)(value) ; - dst[0] = (unsigned)MAX2(rgb, 0); /* r */ - dst[1] = (unsigned)MAX2(rgb, 0); /* g */ - dst[2] = (unsigned)MAX2(rgb, 0); /* b */ - dst[3] = 1; /* a */ - src += 1; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l8_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint8_t value = 0; - value |= (uint8_t)((int8_t)MIN2(src[0], 127)) ; - *(uint8_t *)dst = value; - src += 4; - dst += 1; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l8a8_sint { - uint16_t value; - struct { - int8_t rgb; - int8_t a; - } chan; -}; - -static INLINE void -util_format_l8a8_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t rgb; - int16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = ((int16_t)(value << 8) ) >> 8; - a = ((int16_t)(value) ) >> 8; - dst[0] = (int)rgb; /* r */ - dst[1] = (int)rgb; /* g */ - dst[2] = (int)rgb; /* b */ - dst[3] = (int)a; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l8a8_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(((int8_t)CLAMP(src[0], -128, 127)) & 0xff) ; - value |= (uint16_t)(((int8_t)CLAMP(src[3], -128, 127)) << 8) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l8a8_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - int16_t rgb; - int16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = ((int16_t)(value << 8) ) >> 8; - a = ((int16_t)(value) ) >> 8; - dst[0] = (int)rgb; /* r */ - dst[1] = (int)rgb; /* g */ - dst[2] = (int)rgb; /* b */ - dst[3] = (int)a; /* a */ -} - -static INLINE void -util_format_l8a8_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t rgb; - int16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = ((int16_t)(value << 8) ) >> 8; - a = ((int16_t)(value) ) >> 8; - dst[0] = (unsigned)MAX2(rgb, 0); /* r */ - dst[1] = (unsigned)MAX2(rgb, 0); /* g */ - dst[2] = (unsigned)MAX2(rgb, 0); /* b */ - dst[3] = (unsigned)MAX2(a, 0); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l8a8_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)(((int8_t)MIN2(src[0], 127)) & 0xff) ; - value |= (uint16_t)(((int8_t)MIN2(src[3], 127)) << 8) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_a16_uint { - uint16_t value; - struct { - uint16_t a; - } chan; -}; - -static INLINE void -util_format_a16_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - a = value; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (unsigned)a; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a16_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)MIN2(src[3], 65535); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_a16_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - a = value; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (unsigned)a; /* a */ -} - -static INLINE void -util_format_a16_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - a = value; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (int)a; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a16_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)CLAMP(src[3], 0, 65535); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_i16_uint { - uint16_t value; - struct { - uint16_t rgba; - } chan; -}; - -static INLINE void -util_format_i16_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t rgba; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgba = value; - dst[0] = (unsigned)rgba; /* r */ - dst[1] = (unsigned)rgba; /* g */ - dst[2] = (unsigned)rgba; /* b */ - dst[3] = (unsigned)rgba; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i16_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)MIN2(src[0], 65535); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_i16_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t rgba; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgba = value; - dst[0] = (unsigned)rgba; /* r */ - dst[1] = (unsigned)rgba; /* g */ - dst[2] = (unsigned)rgba; /* b */ - dst[3] = (unsigned)rgba; /* a */ -} - -static INLINE void -util_format_i16_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t rgba; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgba = value; - dst[0] = (int)rgba; /* r */ - dst[1] = (int)rgba; /* g */ - dst[2] = (int)rgba; /* b */ - dst[3] = (int)rgba; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i16_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)CLAMP(src[0], 0, 65535); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l16_uint { - uint16_t value; - struct { - uint16_t rgb; - } chan; -}; - -static INLINE void -util_format_l16_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t rgb; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = value; - dst[0] = (unsigned)rgb; /* r */ - dst[1] = (unsigned)rgb; /* g */ - dst[2] = (unsigned)rgb; /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l16_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)MIN2(src[0], 65535); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l16_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - uint16_t rgb; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = value; - dst[0] = (unsigned)rgb; /* r */ - dst[1] = (unsigned)rgb; /* g */ - dst[2] = (unsigned)rgb; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_l16_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - uint16_t rgb; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = value; - dst[0] = (int)rgb; /* r */ - dst[1] = (int)rgb; /* g */ - dst[2] = (int)rgb; /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l16_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)CLAMP(src[0], 0, 65535); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l16a16_uint { - uint32_t value; - struct { - uint16_t rgb; - uint16_t a; - } chan; -}; - -static INLINE void -util_format_l16a16_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t rgb; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb = (value) & 0xffff; - a = value >> 16; - dst[0] = (unsigned)rgb; /* r */ - dst[1] = (unsigned)rgb; /* g */ - dst[2] = (unsigned)rgb; /* b */ - dst[3] = (unsigned)a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l16a16_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint16_t)MIN2(src[0], 65535)) & 0xffff; - value |= ((uint16_t)MIN2(src[3], 65535)) << 16; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l16a16_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t rgb; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb = (value) & 0xffff; - a = value >> 16; - dst[0] = (unsigned)rgb; /* r */ - dst[1] = (unsigned)rgb; /* g */ - dst[2] = (unsigned)rgb; /* b */ - dst[3] = (unsigned)a; /* a */ -} - -static INLINE void -util_format_l16a16_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t rgb; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb = (value) & 0xffff; - a = value >> 16; - dst[0] = (int)rgb; /* r */ - dst[1] = (int)rgb; /* g */ - dst[2] = (int)rgb; /* b */ - dst[3] = (int)a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l16a16_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint16_t)CLAMP(src[0], 0, 65535)) & 0xffff; - value |= ((uint16_t)CLAMP(src[3], 0, 65535)) << 16; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_a16_sint { - uint16_t value; - struct { - int16_t a; - } chan; -}; - -static INLINE void -util_format_a16_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - a = (int16_t)(value) ; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (int)a; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a16_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)((int16_t)CLAMP(src[3], -32768, 32767)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_a16_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - int16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - a = (int16_t)(value) ; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (int)a; /* a */ -} - -static INLINE void -util_format_a16_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - a = (int16_t)(value) ; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (unsigned)MAX2(a, 0); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a16_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)((int16_t)MIN2(src[3], 32767)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_i16_sint { - uint16_t value; - struct { - int16_t rgba; - } chan; -}; - -static INLINE void -util_format_i16_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t rgba; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgba = (int16_t)(value) ; - dst[0] = (int)rgba; /* r */ - dst[1] = (int)rgba; /* g */ - dst[2] = (int)rgba; /* b */ - dst[3] = (int)rgba; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i16_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)((int16_t)CLAMP(src[0], -32768, 32767)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_i16_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - int16_t rgba; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgba = (int16_t)(value) ; - dst[0] = (int)rgba; /* r */ - dst[1] = (int)rgba; /* g */ - dst[2] = (int)rgba; /* b */ - dst[3] = (int)rgba; /* a */ -} - -static INLINE void -util_format_i16_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t rgba; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgba = (int16_t)(value) ; - dst[0] = (unsigned)MAX2(rgba, 0); /* r */ - dst[1] = (unsigned)MAX2(rgba, 0); /* g */ - dst[2] = (unsigned)MAX2(rgba, 0); /* b */ - dst[3] = (unsigned)MAX2(rgba, 0); /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i16_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)((int16_t)MIN2(src[0], 32767)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l16_sint { - uint16_t value; - struct { - int16_t rgb; - } chan; -}; - -static INLINE void -util_format_l16_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t rgb; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = (int16_t)(value) ; - dst[0] = (int)rgb; /* r */ - dst[1] = (int)rgb; /* g */ - dst[2] = (int)rgb; /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l16_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)((int16_t)CLAMP(src[0], -32768, 32767)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l16_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - int16_t rgb; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = (int16_t)(value) ; - dst[0] = (int)rgb; /* r */ - dst[1] = (int)rgb; /* g */ - dst[2] = (int)rgb; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_l16_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *(const uint16_t *)src; - int16_t rgb; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - rgb = (int16_t)(value) ; - dst[0] = (unsigned)MAX2(rgb, 0); /* r */ - dst[1] = (unsigned)MAX2(rgb, 0); /* g */ - dst[2] = (unsigned)MAX2(rgb, 0); /* b */ - dst[3] = 1; /* a */ - src += 2; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l16_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - value |= (uint16_t)((int16_t)MIN2(src[0], 32767)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *(uint16_t *)dst = value; - src += 4; - dst += 2; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l16a16_sint { - uint32_t value; - struct { - int16_t rgb; - int16_t a; - } chan; -}; - -static INLINE void -util_format_l16a16_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t rgb; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb = ((int32_t)(value << 16) ) >> 16; - a = ((int32_t)(value) ) >> 16; - dst[0] = (int)rgb; /* r */ - dst[1] = (int)rgb; /* g */ - dst[2] = (int)rgb; /* b */ - dst[3] = (int)a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l16a16_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((int16_t)CLAMP(src[0], -32768, 32767)) & 0xffff) ; - value |= (uint32_t)(((int16_t)CLAMP(src[3], -32768, 32767)) << 16) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l16a16_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t rgb; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb = ((int32_t)(value << 16) ) >> 16; - a = ((int32_t)(value) ) >> 16; - dst[0] = (int)rgb; /* r */ - dst[1] = (int)rgb; /* g */ - dst[2] = (int)rgb; /* b */ - dst[3] = (int)a; /* a */ -} - -static INLINE void -util_format_l16a16_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t rgb; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb = ((int32_t)(value << 16) ) >> 16; - a = ((int32_t)(value) ) >> 16; - dst[0] = (unsigned)MAX2(rgb, 0); /* r */ - dst[1] = (unsigned)MAX2(rgb, 0); /* g */ - dst[2] = (unsigned)MAX2(rgb, 0); /* b */ - dst[3] = (unsigned)MAX2(a, 0); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l16a16_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(((int16_t)MIN2(src[0], 32767)) & 0xffff) ; - value |= (uint32_t)(((int16_t)MIN2(src[3], 32767)) << 16) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_a32_uint { - uint32_t value; - struct { - uint32_t a; - } chan; -}; - -static INLINE void -util_format_a32_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - a = value; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a32_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= src[3]; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_a32_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - a = value; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = a; /* a */ -} - -static INLINE void -util_format_a32_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - a = value; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (int)MIN2(a, 2147483647); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a32_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)MAX2(src[3], 0); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_i32_uint { - uint32_t value; - struct { - uint32_t rgba; - } chan; -}; - -static INLINE void -util_format_i32_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t rgba; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgba = value; - dst[0] = rgba; /* r */ - dst[1] = rgba; /* g */ - dst[2] = rgba; /* b */ - dst[3] = rgba; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i32_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= src[0]; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_i32_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t rgba; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgba = value; - dst[0] = rgba; /* r */ - dst[1] = rgba; /* g */ - dst[2] = rgba; /* b */ - dst[3] = rgba; /* a */ -} - -static INLINE void -util_format_i32_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t rgba; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgba = value; - dst[0] = (int)MIN2(rgba, 2147483647); /* r */ - dst[1] = (int)MIN2(rgba, 2147483647); /* g */ - dst[2] = (int)MIN2(rgba, 2147483647); /* b */ - dst[3] = (int)MIN2(rgba, 2147483647); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i32_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)MAX2(src[0], 0); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l32_uint { - uint32_t value; - struct { - uint32_t rgb; - } chan; -}; - -static INLINE void -util_format_l32_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t rgb; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb = value; - dst[0] = rgb; /* r */ - dst[1] = rgb; /* g */ - dst[2] = rgb; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l32_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= src[0]; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l32_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t rgb; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb = value; - dst[0] = rgb; /* r */ - dst[1] = rgb; /* g */ - dst[2] = rgb; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_l32_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t rgb; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb = value; - dst[0] = (int)MIN2(rgb, 2147483647); /* r */ - dst[1] = (int)MIN2(rgb, 2147483647); /* g */ - dst[2] = (int)MIN2(rgb, 2147483647); /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l32_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)MAX2(src[0], 0); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l32a32_uint { - uint64_t value; - struct { - uint32_t rgb; - uint32_t a; - } chan; -}; - -static INLINE void -util_format_l32a32_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_l32a32_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.rgb; /* r */ - dst[1] = pixel.chan.rgb; /* g */ - dst[2] = pixel.chan.rgb; /* b */ - dst[3] = pixel.chan.a; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l32a32_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_l32a32_uint pixel; - pixel.chan.rgb = src[0]; - pixel.chan.a = src[3]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l32a32_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_l32a32_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.rgb; /* r */ - dst[1] = pixel.chan.rgb; /* g */ - dst[2] = pixel.chan.rgb; /* b */ - dst[3] = pixel.chan.a; /* a */ -} - -static INLINE void -util_format_l32a32_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_l32a32_uint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (int)MIN2(pixel.chan.rgb, 2147483647); /* r */ - dst[1] = (int)MIN2(pixel.chan.rgb, 2147483647); /* g */ - dst[2] = (int)MIN2(pixel.chan.rgb, 2147483647); /* b */ - dst[3] = (int)MIN2(pixel.chan.a, 2147483647); /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l32a32_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_l32a32_uint pixel; - pixel.chan.rgb = (uint32_t)MAX2(src[0], 0); - pixel.chan.a = (uint32_t)MAX2(src[3], 0); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_a32_sint { - uint32_t value; - struct { - int32_t a; - } chan; -}; - -static INLINE void -util_format_a32_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - a = (int32_t)(value) ; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a32_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(src[3]) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_a32_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - a = (int32_t)(value) ; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = a; /* a */ -} - -static INLINE void -util_format_a32_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - a = (int32_t)(value) ; - dst[0] = 0; /* r */ - dst[1] = 0; /* g */ - dst[2] = 0; /* b */ - dst[3] = (unsigned)MAX2(a, 0); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_a32_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)((int32_t)MIN2(src[3], 2147483647)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_i32_sint { - uint32_t value; - struct { - int32_t rgba; - } chan; -}; - -static INLINE void -util_format_i32_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t rgba; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgba = (int32_t)(value) ; - dst[0] = rgba; /* r */ - dst[1] = rgba; /* g */ - dst[2] = rgba; /* b */ - dst[3] = rgba; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i32_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(src[0]) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_i32_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t rgba; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgba = (int32_t)(value) ; - dst[0] = rgba; /* r */ - dst[1] = rgba; /* g */ - dst[2] = rgba; /* b */ - dst[3] = rgba; /* a */ -} - -static INLINE void -util_format_i32_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t rgba; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgba = (int32_t)(value) ; - dst[0] = (unsigned)MAX2(rgba, 0); /* r */ - dst[1] = (unsigned)MAX2(rgba, 0); /* g */ - dst[2] = (unsigned)MAX2(rgba, 0); /* b */ - dst[3] = (unsigned)MAX2(rgba, 0); /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_i32_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)((int32_t)MIN2(src[0], 2147483647)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l32_sint { - uint32_t value; - struct { - int32_t rgb; - } chan; -}; - -static INLINE void -util_format_l32_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t rgb; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb = (int32_t)(value) ; - dst[0] = rgb; /* r */ - dst[1] = rgb; /* g */ - dst[2] = rgb; /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l32_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)(src[0]) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l32_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - int32_t rgb; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb = (int32_t)(value) ; - dst[0] = rgb; /* r */ - dst[1] = rgb; /* g */ - dst[2] = rgb; /* b */ - dst[3] = 1; /* a */ -} - -static INLINE void -util_format_l32_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - int32_t rgb; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb = (int32_t)(value) ; - dst[0] = (unsigned)MAX2(rgb, 0); /* r */ - dst[1] = (unsigned)MAX2(rgb, 0); /* g */ - dst[2] = (unsigned)MAX2(rgb, 0); /* b */ - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l32_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= (uint32_t)((int32_t)MIN2(src[0], 2147483647)) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_l32a32_sint { - uint64_t value; - struct { - int32_t rgb; - int32_t a; - } chan; -}; - -static INLINE void -util_format_l32a32_sint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_l32a32_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.rgb; /* r */ - dst[1] = pixel.chan.rgb; /* g */ - dst[2] = pixel.chan.rgb; /* b */ - dst[3] = pixel.chan.a; /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l32a32_sint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_l32a32_sint pixel; - pixel.chan.rgb = src[0]; - pixel.chan.a = src[3]; - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_l32a32_sint_fetch_signed(int *dst, const uint8_t *src, unsigned i, unsigned j) -{ - union util_format_l32a32_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = pixel.chan.rgb; /* r */ - dst[1] = pixel.chan.rgb; /* g */ - dst[2] = pixel.chan.rgb; /* b */ - dst[3] = pixel.chan.a; /* a */ -} - -static INLINE void -util_format_l32a32_sint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - union util_format_l32a32_sint pixel; - memcpy(&pixel, src, sizeof pixel); - dst[0] = (unsigned)MAX2(pixel.chan.rgb, 0); /* r */ - dst[1] = (unsigned)MAX2(pixel.chan.rgb, 0); /* g */ - dst[2] = (unsigned)MAX2(pixel.chan.rgb, 0); /* b */ - dst[3] = (unsigned)MAX2(pixel.chan.a, 0); /* a */ - src += 8; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_l32a32_sint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - union util_format_l32a32_sint pixel; - pixel.chan.rgb = (int32_t)MIN2(src[0], 2147483647); - pixel.chan.a = (int32_t)MIN2(src[3], 2147483647); - memcpy(dst, &pixel, sizeof pixel); - src += 4; - dst += 8; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -union util_format_b10g10r10a2_uint { - uint32_t value; - struct { - unsigned b:10; - unsigned g:10; - unsigned r:10; - unsigned a:2; - } chan; -}; - -static INLINE void -util_format_b10g10r10a2_uint_unpack_unsigned(unsigned *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - unsigned *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0x3ff; - g = (value >> 10) & 0x3ff; - r = (value >> 20) & 0x3ff; - a = value >> 30; - dst[0] = (unsigned)r; /* r */ - dst[1] = (unsigned)g; /* g */ - dst[2] = (unsigned)b; /* b */ - dst[3] = (unsigned)a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b10g10r10a2_uint_pack_unsigned(uint8_t *dst_row, unsigned dst_stride, const unsigned *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const unsigned *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint32_t)MIN2(src[2], 1023)) & 0x3ff; - value |= (((uint32_t)MIN2(src[1], 1023)) & 0x3ff) << 10; - value |= (((uint32_t)MIN2(src[0], 1023)) & 0x3ff) << 20; - value |= ((uint32_t)MIN2(src[3], 3)) << 30; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -static INLINE void -util_format_b10g10r10a2_uint_fetch_unsigned(unsigned *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0x3ff; - g = (value >> 10) & 0x3ff; - r = (value >> 20) & 0x3ff; - a = value >> 30; - dst[0] = (unsigned)r; /* r */ - dst[1] = (unsigned)g; /* g */ - dst[2] = (unsigned)b; /* b */ - dst[3] = (unsigned)a; /* a */ -} - -static INLINE void -util_format_b10g10r10a2_uint_unpack_signed(int *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - int *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; - uint32_t b; - uint32_t g; - uint32_t r; - uint32_t a; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - b = (value) & 0x3ff; - g = (value >> 10) & 0x3ff; - r = (value >> 20) & 0x3ff; - a = value >> 30; - dst[0] = (int)r; /* r */ - dst[1] = (int)g; /* g */ - dst[2] = (int)b; /* b */ - dst[3] = (int)a; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -static INLINE void -util_format_b10g10r10a2_uint_pack_signed(uint8_t *dst_row, unsigned dst_stride, const int *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const int *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = 0; - value |= ((uint32_t)CLAMP(src[2], 0, 1023)) & 0x3ff; - value |= (((uint32_t)CLAMP(src[1], 0, 1023)) & 0x3ff) << 10; - value |= (((uint32_t)CLAMP(src[0], 0, 1023)) & 0x3ff) << 20; - value |= ((uint32_t)CLAMP(src[3], 0, 3)) << 30; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -const struct util_format_description -util_format_none_description = { - PIPE_FORMAT_NONE, - "PIPE_FORMAT_NONE", - "none", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_none_unpack_rgba_8unorm, - &util_format_none_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_none_unpack_rgba_float, - &util_format_none_pack_rgba_float, - &util_format_none_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_b8g8r8a8_unorm_description = { - PIPE_FORMAT_B8G8R8A8_UNORM, - "PIPE_FORMAT_B8G8R8A8_UNORM", - "b8g8r8a8_unorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* z = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_Z, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_b8g8r8a8_unorm_unpack_rgba_8unorm, - &util_format_b8g8r8a8_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_b8g8r8a8_unorm_unpack_rgba_float, - &util_format_b8g8r8a8_unorm_pack_rgba_float, - &util_format_b8g8r8a8_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_b8g8r8x8_unorm_description = { - PIPE_FORMAT_B8G8R8X8_UNORM, - "PIPE_FORMAT_B8G8R8X8_UNORM", - "b8g8r8x8_unorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* z = r */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8} /* w = x */ - }, - { - UTIL_FORMAT_SWIZZLE_Z, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_b8g8r8x8_unorm_unpack_rgba_8unorm, - &util_format_b8g8r8x8_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_b8g8r8x8_unorm_unpack_rgba_float, - &util_format_b8g8r8x8_unorm_pack_rgba_float, - &util_format_b8g8r8x8_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_a8r8g8b8_unorm_description = { - PIPE_FORMAT_A8R8G8B8_UNORM, - "PIPE_FORMAT_A8R8G8B8_UNORM", - "a8r8g8b8_unorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = a */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* z = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8} /* w = b */ - }, - { - UTIL_FORMAT_SWIZZLE_Y, /* r */ - UTIL_FORMAT_SWIZZLE_Z, /* g */ - UTIL_FORMAT_SWIZZLE_W, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_a8r8g8b8_unorm_unpack_rgba_8unorm, - &util_format_a8r8g8b8_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_a8r8g8b8_unorm_unpack_rgba_float, - &util_format_a8r8g8b8_unorm_pack_rgba_float, - &util_format_a8r8g8b8_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_x8r8g8b8_unorm_description = { - PIPE_FORMAT_X8R8G8B8_UNORM, - "PIPE_FORMAT_X8R8G8B8_UNORM", - "x8r8g8b8_unorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* x = x */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* z = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8} /* w = b */ - }, - { - UTIL_FORMAT_SWIZZLE_Y, /* r */ - UTIL_FORMAT_SWIZZLE_Z, /* g */ - UTIL_FORMAT_SWIZZLE_W, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_x8r8g8b8_unorm_unpack_rgba_8unorm, - &util_format_x8r8g8b8_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_x8r8g8b8_unorm_unpack_rgba_float, - &util_format_x8r8g8b8_unorm_pack_rgba_float, - &util_format_x8r8g8b8_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_a8b8g8r8_unorm_description = { - PIPE_FORMAT_A8B8G8R8_UNORM, - "PIPE_FORMAT_A8B8G8R8_UNORM", - "a8b8g8r8_unorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = a */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* z = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8} /* w = r */ - }, - { - UTIL_FORMAT_SWIZZLE_W, /* r */ - UTIL_FORMAT_SWIZZLE_Z, /* g */ - UTIL_FORMAT_SWIZZLE_Y, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_a8b8g8r8_unorm_unpack_rgba_8unorm, - &util_format_a8b8g8r8_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_a8b8g8r8_unorm_unpack_rgba_float, - &util_format_a8b8g8r8_unorm_pack_rgba_float, - &util_format_a8b8g8r8_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_x8b8g8r8_unorm_description = { - PIPE_FORMAT_X8B8G8R8_UNORM, - "PIPE_FORMAT_X8B8G8R8_UNORM", - "x8b8g8r8_unorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* x = x */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* z = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8} /* w = r */ - }, - { - UTIL_FORMAT_SWIZZLE_W, /* r */ - UTIL_FORMAT_SWIZZLE_Z, /* g */ - UTIL_FORMAT_SWIZZLE_Y, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_x8b8g8r8_unorm_unpack_rgba_8unorm, - &util_format_x8b8g8r8_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_x8b8g8r8_unorm_unpack_rgba_float, - &util_format_x8b8g8r8_unorm_pack_rgba_float, - &util_format_x8b8g8r8_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8b8x8_unorm_description = { - PIPE_FORMAT_R8G8B8X8_UNORM, - "PIPE_FORMAT_R8G8B8X8_UNORM", - "r8g8b8x8_unorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* z = b */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8} /* w = x */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8g8b8x8_unorm_unpack_rgba_8unorm, - &util_format_r8g8b8x8_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8g8b8x8_unorm_unpack_rgba_float, - &util_format_r8g8b8x8_unorm_pack_rgba_float, - &util_format_r8g8b8x8_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_b5g5r5x1_unorm_description = { - PIPE_FORMAT_B5G5R5X1_UNORM, - "PIPE_FORMAT_B5G5R5X1_UNORM", - "b5g5r5x1_unorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5}, /* x = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5}, /* z = r */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 1} /* w = x */ - }, - { - UTIL_FORMAT_SWIZZLE_Z, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_b5g5r5x1_unorm_unpack_rgba_8unorm, - &util_format_b5g5r5x1_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_b5g5r5x1_unorm_unpack_rgba_float, - &util_format_b5g5r5x1_unorm_pack_rgba_float, - &util_format_b5g5r5x1_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_b5g5r5a1_unorm_description = { - PIPE_FORMAT_B5G5R5A1_UNORM, - "PIPE_FORMAT_B5G5R5A1_UNORM", - "b5g5r5a1_unorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5}, /* x = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5}, /* z = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 1} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_Z, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_b5g5r5a1_unorm_unpack_rgba_8unorm, - &util_format_b5g5r5a1_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_b5g5r5a1_unorm_unpack_rgba_float, - &util_format_b5g5r5a1_unorm_pack_rgba_float, - &util_format_b5g5r5a1_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_b4g4r4a4_unorm_description = { - PIPE_FORMAT_B4G4R4A4_UNORM, - "PIPE_FORMAT_B4G4R4A4_UNORM", - "b4g4r4a4_unorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4}, /* x = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4}, /* z = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_Z, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_b4g4r4a4_unorm_unpack_rgba_8unorm, - &util_format_b4g4r4a4_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_b4g4r4a4_unorm_unpack_rgba_float, - &util_format_b4g4r4a4_unorm_pack_rgba_float, - &util_format_b4g4r4a4_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_b4g4r4x4_unorm_description = { - PIPE_FORMAT_B4G4R4X4_UNORM, - "PIPE_FORMAT_B4G4R4X4_UNORM", - "b4g4r4x4_unorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4}, /* x = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4}, /* z = r */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 4} /* w = x */ - }, - { - UTIL_FORMAT_SWIZZLE_Z, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_b4g4r4x4_unorm_unpack_rgba_8unorm, - &util_format_b4g4r4x4_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_b4g4r4x4_unorm_unpack_rgba_float, - &util_format_b4g4r4x4_unorm_pack_rgba_float, - &util_format_b4g4r4x4_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_b5g6r5_unorm_description = { - PIPE_FORMAT_B5G6R5_UNORM, - "PIPE_FORMAT_B5G6R5_UNORM", - "b5g6r5_unorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5}, /* x = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 6}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 5}, /* z = r */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_Z, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_b5g6r5_unorm_unpack_rgba_8unorm, - &util_format_b5g6r5_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_b5g6r5_unorm_unpack_rgba_float, - &util_format_b5g6r5_unorm_pack_rgba_float, - &util_format_b5g6r5_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r10g10b10a2_unorm_description = { - PIPE_FORMAT_R10G10B10A2_UNORM, - "PIPE_FORMAT_R10G10B10A2_UNORM", - "r10g10b10a2_unorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10}, /* z = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 2} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r10g10b10a2_unorm_unpack_rgba_8unorm, - &util_format_r10g10b10a2_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r10g10b10a2_unorm_unpack_rgba_float, - &util_format_r10g10b10a2_unorm_pack_rgba_float, - &util_format_r10g10b10a2_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_b10g10r10a2_unorm_description = { - PIPE_FORMAT_B10G10R10A2_UNORM, - "PIPE_FORMAT_B10G10R10A2_UNORM", - "b10g10r10a2_unorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10}, /* x = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 10}, /* z = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 2} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_Z, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_b10g10r10a2_unorm_unpack_rgba_8unorm, - &util_format_b10g10r10a2_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_b10g10r10a2_unorm_unpack_rgba_float, - &util_format_b10g10r10a2_unorm_pack_rgba_float, - &util_format_b10g10r10a2_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_b2g3r3_unorm_description = { - PIPE_FORMAT_B2G3R3_UNORM, - "PIPE_FORMAT_B2G3R3_UNORM", - "b2g3r3_unorm", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 2}, /* x = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 3}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 3}, /* z = r */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_Z, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_b2g3r3_unorm_unpack_rgba_8unorm, - &util_format_b2g3r3_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_b2g3r3_unorm_unpack_rgba_float, - &util_format_b2g3r3_unorm_pack_rgba_float, - &util_format_b2g3r3_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l8_unorm_description = { - PIPE_FORMAT_L8_UNORM, - "PIPE_FORMAT_L8_UNORM", - "l8_unorm", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = rgb */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_l8_unorm_unpack_rgba_8unorm, - &util_format_l8_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_l8_unorm_unpack_rgba_float, - &util_format_l8_unorm_pack_rgba_float, - &util_format_l8_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_a8_unorm_description = { - PIPE_FORMAT_A8_UNORM, - "PIPE_FORMAT_A8_UNORM", - "a8_unorm", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_0, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_a8_unorm_unpack_rgba_8unorm, - &util_format_a8_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_a8_unorm_unpack_rgba_float, - &util_format_a8_unorm_pack_rgba_float, - &util_format_a8_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_i8_unorm_description = { - PIPE_FORMAT_I8_UNORM, - "PIPE_FORMAT_I8_UNORM", - "i8_unorm", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = rgba */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_i8_unorm_unpack_rgba_8unorm, - &util_format_i8_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_i8_unorm_unpack_rgba_float, - &util_format_i8_unorm_pack_rgba_float, - &util_format_i8_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l4a4_unorm_description = { - PIPE_FORMAT_L4A4_UNORM, - "PIPE_FORMAT_L4A4_UNORM", - "l4a4_unorm", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4}, /* x = rgb */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4}, /* y = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_Y /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_l4a4_unorm_unpack_rgba_8unorm, - &util_format_l4a4_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_l4a4_unorm_unpack_rgba_float, - &util_format_l4a4_unorm_pack_rgba_float, - &util_format_l4a4_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l8a8_unorm_description = { - PIPE_FORMAT_L8A8_UNORM, - "PIPE_FORMAT_L8A8_UNORM", - "l8a8_unorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = rgb */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_Y /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_l8a8_unorm_unpack_rgba_8unorm, - &util_format_l8a8_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_l8a8_unorm_unpack_rgba_float, - &util_format_l8a8_unorm_pack_rgba_float, - &util_format_l8a8_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l16_unorm_description = { - PIPE_FORMAT_L16_UNORM, - "PIPE_FORMAT_L16_UNORM", - "l16_unorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16}, /* x = rgb */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_l16_unorm_unpack_rgba_8unorm, - &util_format_l16_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_l16_unorm_unpack_rgba_float, - &util_format_l16_unorm_pack_rgba_float, - &util_format_l16_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_a16_unorm_description = { - PIPE_FORMAT_A16_UNORM, - "PIPE_FORMAT_A16_UNORM", - "a16_unorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16}, /* x = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_0, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_a16_unorm_unpack_rgba_8unorm, - &util_format_a16_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_a16_unorm_unpack_rgba_float, - &util_format_a16_unorm_pack_rgba_float, - &util_format_a16_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_i16_unorm_description = { - PIPE_FORMAT_I16_UNORM, - "PIPE_FORMAT_I16_UNORM", - "i16_unorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16}, /* x = rgba */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_i16_unorm_unpack_rgba_8unorm, - &util_format_i16_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_i16_unorm_unpack_rgba_float, - &util_format_i16_unorm_pack_rgba_float, - &util_format_i16_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l16a16_unorm_description = { - PIPE_FORMAT_L16A16_UNORM, - "PIPE_FORMAT_L16A16_UNORM", - "l16a16_unorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16}, /* x = rgb */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16}, /* y = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_Y /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_l16a16_unorm_unpack_rgba_8unorm, - &util_format_l16a16_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_l16a16_unorm_unpack_rgba_float, - &util_format_l16a16_unorm_pack_rgba_float, - &util_format_l16a16_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_a8_snorm_description = { - PIPE_FORMAT_A8_SNORM, - "PIPE_FORMAT_A8_SNORM", - "a8_snorm", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8}, /* x = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_0, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_a8_snorm_unpack_rgba_8unorm, - &util_format_a8_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_a8_snorm_unpack_rgba_float, - &util_format_a8_snorm_pack_rgba_float, - &util_format_a8_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l8_snorm_description = { - PIPE_FORMAT_L8_SNORM, - "PIPE_FORMAT_L8_SNORM", - "l8_snorm", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8}, /* x = rgb */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_l8_snorm_unpack_rgba_8unorm, - &util_format_l8_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_l8_snorm_unpack_rgba_float, - &util_format_l8_snorm_pack_rgba_float, - &util_format_l8_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l8a8_snorm_description = { - PIPE_FORMAT_L8A8_SNORM, - "PIPE_FORMAT_L8A8_SNORM", - "l8a8_snorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8}, /* x = rgb */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8}, /* y = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_Y /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_l8a8_snorm_unpack_rgba_8unorm, - &util_format_l8a8_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_l8a8_snorm_unpack_rgba_float, - &util_format_l8a8_snorm_pack_rgba_float, - &util_format_l8a8_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_i8_snorm_description = { - PIPE_FORMAT_I8_SNORM, - "PIPE_FORMAT_I8_SNORM", - "i8_snorm", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8}, /* x = rgba */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_i8_snorm_unpack_rgba_8unorm, - &util_format_i8_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_i8_snorm_unpack_rgba_float, - &util_format_i8_snorm_pack_rgba_float, - &util_format_i8_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_a16_snorm_description = { - PIPE_FORMAT_A16_SNORM, - "PIPE_FORMAT_A16_SNORM", - "a16_snorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16}, /* x = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_0, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_a16_snorm_unpack_rgba_8unorm, - &util_format_a16_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_a16_snorm_unpack_rgba_float, - &util_format_a16_snorm_pack_rgba_float, - &util_format_a16_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l16_snorm_description = { - PIPE_FORMAT_L16_SNORM, - "PIPE_FORMAT_L16_SNORM", - "l16_snorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16}, /* x = rgb */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_l16_snorm_unpack_rgba_8unorm, - &util_format_l16_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_l16_snorm_unpack_rgba_float, - &util_format_l16_snorm_pack_rgba_float, - &util_format_l16_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l16a16_snorm_description = { - PIPE_FORMAT_L16A16_SNORM, - "PIPE_FORMAT_L16A16_SNORM", - "l16a16_snorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16}, /* x = rgb */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16}, /* y = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_Y /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_l16a16_snorm_unpack_rgba_8unorm, - &util_format_l16a16_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_l16a16_snorm_unpack_rgba_float, - &util_format_l16a16_snorm_pack_rgba_float, - &util_format_l16a16_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_i16_snorm_description = { - PIPE_FORMAT_I16_SNORM, - "PIPE_FORMAT_I16_SNORM", - "i16_snorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16}, /* x = rgba */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_i16_snorm_unpack_rgba_8unorm, - &util_format_i16_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_i16_snorm_unpack_rgba_float, - &util_format_i16_snorm_pack_rgba_float, - &util_format_i16_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_a16_float_description = { - PIPE_FORMAT_A16_FLOAT, - "PIPE_FORMAT_A16_FLOAT", - "a16_float", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16}, /* x = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_0, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_a16_float_unpack_rgba_8unorm, - &util_format_a16_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_a16_float_unpack_rgba_float, - &util_format_a16_float_pack_rgba_float, - &util_format_a16_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l16_float_description = { - PIPE_FORMAT_L16_FLOAT, - "PIPE_FORMAT_L16_FLOAT", - "l16_float", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16}, /* x = rgb */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_l16_float_unpack_rgba_8unorm, - &util_format_l16_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_l16_float_unpack_rgba_float, - &util_format_l16_float_pack_rgba_float, - &util_format_l16_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l16a16_float_description = { - PIPE_FORMAT_L16A16_FLOAT, - "PIPE_FORMAT_L16A16_FLOAT", - "l16a16_float", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16}, /* x = rgb */ - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16}, /* y = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_Y /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_l16a16_float_unpack_rgba_8unorm, - &util_format_l16a16_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_l16a16_float_unpack_rgba_float, - &util_format_l16a16_float_pack_rgba_float, - &util_format_l16a16_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_i16_float_description = { - PIPE_FORMAT_I16_FLOAT, - "PIPE_FORMAT_I16_FLOAT", - "i16_float", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16}, /* x = rgba */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_i16_float_unpack_rgba_8unorm, - &util_format_i16_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_i16_float_unpack_rgba_float, - &util_format_i16_float_pack_rgba_float, - &util_format_i16_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_a32_float_description = { - PIPE_FORMAT_A32_FLOAT, - "PIPE_FORMAT_A32_FLOAT", - "a32_float", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32}, /* x = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_0, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_a32_float_unpack_rgba_8unorm, - &util_format_a32_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_a32_float_unpack_rgba_float, - &util_format_a32_float_pack_rgba_float, - &util_format_a32_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l32_float_description = { - PIPE_FORMAT_L32_FLOAT, - "PIPE_FORMAT_L32_FLOAT", - "l32_float", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32}, /* x = rgb */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_l32_float_unpack_rgba_8unorm, - &util_format_l32_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_l32_float_unpack_rgba_float, - &util_format_l32_float_pack_rgba_float, - &util_format_l32_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l32a32_float_description = { - PIPE_FORMAT_L32A32_FLOAT, - "PIPE_FORMAT_L32A32_FLOAT", - "l32a32_float", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32}, /* x = rgb */ - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32}, /* y = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_Y /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_l32a32_float_unpack_rgba_8unorm, - &util_format_l32a32_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_l32a32_float_unpack_rgba_float, - &util_format_l32a32_float_pack_rgba_float, - &util_format_l32a32_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_i32_float_description = { - PIPE_FORMAT_I32_FLOAT, - "PIPE_FORMAT_I32_FLOAT", - "i32_float", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32}, /* x = rgba */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_i32_float_unpack_rgba_8unorm, - &util_format_i32_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_i32_float_unpack_rgba_float, - &util_format_i32_float_pack_rgba_float, - &util_format_i32_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l8_srgb_description = { - PIPE_FORMAT_L8_SRGB, - "PIPE_FORMAT_L8_SRGB", - "l8_srgb", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = rgb */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* sr */ - UTIL_FORMAT_SWIZZLE_X, /* sg */ - UTIL_FORMAT_SWIZZLE_X, /* sb */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_SRGB, - &util_format_l8_srgb_unpack_rgba_8unorm, - &util_format_l8_srgb_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_l8_srgb_unpack_rgba_float, - &util_format_l8_srgb_pack_rgba_float, - &util_format_l8_srgb_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l8a8_srgb_description = { - PIPE_FORMAT_L8A8_SRGB, - "PIPE_FORMAT_L8A8_SRGB", - "l8a8_srgb", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = rgb */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* sr */ - UTIL_FORMAT_SWIZZLE_X, /* sg */ - UTIL_FORMAT_SWIZZLE_X, /* sb */ - UTIL_FORMAT_SWIZZLE_Y /* a */ - }, - UTIL_FORMAT_COLORSPACE_SRGB, - &util_format_l8a8_srgb_unpack_rgba_8unorm, - &util_format_l8a8_srgb_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_l8a8_srgb_unpack_rgba_float, - &util_format_l8a8_srgb_pack_rgba_float, - &util_format_l8a8_srgb_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8b8_srgb_description = { - PIPE_FORMAT_R8G8B8_SRGB, - "PIPE_FORMAT_R8G8B8_SRGB", - "r8g8b8_srgb", - {1, 1, 24}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* sr */ - UTIL_FORMAT_SWIZZLE_Y, /* sg */ - UTIL_FORMAT_SWIZZLE_Z, /* sb */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_SRGB, - &util_format_r8g8b8_srgb_unpack_rgba_8unorm, - &util_format_r8g8b8_srgb_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8g8b8_srgb_unpack_rgba_float, - &util_format_r8g8b8_srgb_pack_rgba_float, - &util_format_r8g8b8_srgb_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8b8a8_srgb_description = { - PIPE_FORMAT_R8G8B8A8_SRGB, - "PIPE_FORMAT_R8G8B8A8_SRGB", - "r8g8b8a8_srgb", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* z = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* sr */ - UTIL_FORMAT_SWIZZLE_Y, /* sg */ - UTIL_FORMAT_SWIZZLE_Z, /* sb */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_SRGB, - &util_format_r8g8b8a8_srgb_unpack_rgba_8unorm, - &util_format_r8g8b8a8_srgb_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8g8b8a8_srgb_unpack_rgba_float, - &util_format_r8g8b8a8_srgb_pack_rgba_float, - &util_format_r8g8b8a8_srgb_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_a8b8g8r8_srgb_description = { - PIPE_FORMAT_A8B8G8R8_SRGB, - "PIPE_FORMAT_A8B8G8R8_SRGB", - "a8b8g8r8_srgb", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = a */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* z = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8} /* w = r */ - }, - { - UTIL_FORMAT_SWIZZLE_W, /* sr */ - UTIL_FORMAT_SWIZZLE_Z, /* sg */ - UTIL_FORMAT_SWIZZLE_Y, /* sb */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_SRGB, - &util_format_a8b8g8r8_srgb_unpack_rgba_8unorm, - &util_format_a8b8g8r8_srgb_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_a8b8g8r8_srgb_unpack_rgba_float, - &util_format_a8b8g8r8_srgb_pack_rgba_float, - &util_format_a8b8g8r8_srgb_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_x8b8g8r8_srgb_description = { - PIPE_FORMAT_X8B8G8R8_SRGB, - "PIPE_FORMAT_X8B8G8R8_SRGB", - "x8b8g8r8_srgb", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* x = x */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* z = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8} /* w = r */ - }, - { - UTIL_FORMAT_SWIZZLE_W, /* sr */ - UTIL_FORMAT_SWIZZLE_Z, /* sg */ - UTIL_FORMAT_SWIZZLE_Y, /* sb */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_SRGB, - &util_format_x8b8g8r8_srgb_unpack_rgba_8unorm, - &util_format_x8b8g8r8_srgb_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_x8b8g8r8_srgb_unpack_rgba_float, - &util_format_x8b8g8r8_srgb_pack_rgba_float, - &util_format_x8b8g8r8_srgb_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_b8g8r8a8_srgb_description = { - PIPE_FORMAT_B8G8R8A8_SRGB, - "PIPE_FORMAT_B8G8R8A8_SRGB", - "b8g8r8a8_srgb", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* z = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_Z, /* sr */ - UTIL_FORMAT_SWIZZLE_Y, /* sg */ - UTIL_FORMAT_SWIZZLE_X, /* sb */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_SRGB, - &util_format_b8g8r8a8_srgb_unpack_rgba_8unorm, - &util_format_b8g8r8a8_srgb_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_b8g8r8a8_srgb_unpack_rgba_float, - &util_format_b8g8r8a8_srgb_pack_rgba_float, - &util_format_b8g8r8a8_srgb_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_b8g8r8x8_srgb_description = { - PIPE_FORMAT_B8G8R8X8_SRGB, - "PIPE_FORMAT_B8G8R8X8_SRGB", - "b8g8r8x8_srgb", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* z = r */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8} /* w = x */ - }, - { - UTIL_FORMAT_SWIZZLE_Z, /* sr */ - UTIL_FORMAT_SWIZZLE_Y, /* sg */ - UTIL_FORMAT_SWIZZLE_X, /* sb */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_SRGB, - &util_format_b8g8r8x8_srgb_unpack_rgba_8unorm, - &util_format_b8g8r8x8_srgb_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_b8g8r8x8_srgb_unpack_rgba_float, - &util_format_b8g8r8x8_srgb_pack_rgba_float, - &util_format_b8g8r8x8_srgb_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_a8r8g8b8_srgb_description = { - PIPE_FORMAT_A8R8G8B8_SRGB, - "PIPE_FORMAT_A8R8G8B8_SRGB", - "a8r8g8b8_srgb", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = a */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* z = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8} /* w = b */ - }, - { - UTIL_FORMAT_SWIZZLE_Y, /* sr */ - UTIL_FORMAT_SWIZZLE_Z, /* sg */ - UTIL_FORMAT_SWIZZLE_W, /* sb */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_SRGB, - &util_format_a8r8g8b8_srgb_unpack_rgba_8unorm, - &util_format_a8r8g8b8_srgb_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_a8r8g8b8_srgb_unpack_rgba_float, - &util_format_a8r8g8b8_srgb_pack_rgba_float, - &util_format_a8r8g8b8_srgb_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_x8r8g8b8_srgb_description = { - PIPE_FORMAT_X8R8G8B8_SRGB, - "PIPE_FORMAT_X8R8G8B8_SRGB", - "x8r8g8b8_srgb", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* x = x */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* z = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8} /* w = b */ - }, - { - UTIL_FORMAT_SWIZZLE_Y, /* sr */ - UTIL_FORMAT_SWIZZLE_Z, /* sg */ - UTIL_FORMAT_SWIZZLE_W, /* sb */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_SRGB, - &util_format_x8r8g8b8_srgb_unpack_rgba_8unorm, - &util_format_x8r8g8b8_srgb_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_x8r8g8b8_srgb_unpack_rgba_float, - &util_format_x8r8g8b8_srgb_pack_rgba_float, - &util_format_x8r8g8b8_srgb_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8sg8sb8ux8u_norm_description = { - PIPE_FORMAT_R8SG8SB8UX8U_NORM, - "PIPE_FORMAT_R8SG8SB8UX8U_NORM", - "r8sg8sb8ux8u_norm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - TRUE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* z = b */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8} /* w = x */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8sg8sb8ux8u_norm_unpack_rgba_8unorm, - &util_format_r8sg8sb8ux8u_norm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8sg8sb8ux8u_norm_unpack_rgba_float, - &util_format_r8sg8sb8ux8u_norm_pack_rgba_float, - &util_format_r8sg8sb8ux8u_norm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r10sg10sb10sa2u_norm_description = { - PIPE_FORMAT_R10SG10SB10SA2U_NORM, - "PIPE_FORMAT_R10SG10SB10SA2U_NORM", - "r10sg10sb10sa2u_norm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - TRUE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10}, /* z = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 2} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r10sg10sb10sa2u_norm_unpack_rgba_8unorm, - &util_format_r10sg10sb10sa2u_norm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r10sg10sb10sa2u_norm_unpack_rgba_float, - &util_format_r10sg10sb10sa2u_norm_pack_rgba_float, - &util_format_r10sg10sb10sa2u_norm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r5sg5sb6u_norm_description = { - PIPE_FORMAT_R5SG5SB6U_NORM, - "PIPE_FORMAT_R5SG5SB6U_NORM", - "r5sg5sb6u_norm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - TRUE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 5}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 5}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 6}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r5sg5sb6u_norm_unpack_rgba_8unorm, - &util_format_r5sg5sb6u_norm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r5sg5sb6u_norm_unpack_rgba_float, - &util_format_r5sg5sb6u_norm_pack_rgba_float, - &util_format_r5sg5sb6u_norm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_s8_uint_description = { - PIPE_FORMAT_S8_UINT, - "PIPE_FORMAT_S8_UINT", - "s8_uint", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* x = s */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_NONE, /* z */ - UTIL_FORMAT_SWIZZLE_X, /* s */ - UTIL_FORMAT_SWIZZLE_NONE, /* ignored */ - UTIL_FORMAT_SWIZZLE_NONE /* ignored */ - }, - UTIL_FORMAT_COLORSPACE_ZS, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - &util_format_s8_uint_unpack_s_8uint, - &util_format_s8_uint_pack_s_8uint, - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_z16_unorm_description = { - PIPE_FORMAT_Z16_UNORM, - "PIPE_FORMAT_Z16_UNORM", - "z16_unorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16}, /* x = z */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* z */ - UTIL_FORMAT_SWIZZLE_NONE, /* s */ - UTIL_FORMAT_SWIZZLE_NONE, /* ignored */ - UTIL_FORMAT_SWIZZLE_NONE /* ignored */ - }, - UTIL_FORMAT_COLORSPACE_ZS, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - &util_format_z16_unorm_unpack_z_32unorm, - &util_format_z16_unorm_pack_z_32unorm, - &util_format_z16_unorm_unpack_z_float, - &util_format_z16_unorm_pack_z_float, - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_z32_unorm_description = { - PIPE_FORMAT_Z32_UNORM, - "PIPE_FORMAT_Z32_UNORM", - "z32_unorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32}, /* x = z */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* z */ - UTIL_FORMAT_SWIZZLE_NONE, /* s */ - UTIL_FORMAT_SWIZZLE_NONE, /* ignored */ - UTIL_FORMAT_SWIZZLE_NONE /* ignored */ - }, - UTIL_FORMAT_COLORSPACE_ZS, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - &util_format_z32_unorm_unpack_z_32unorm, - &util_format_z32_unorm_pack_z_32unorm, - &util_format_z32_unorm_unpack_z_float, - &util_format_z32_unorm_pack_z_float, - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_z32_float_description = { - PIPE_FORMAT_Z32_FLOAT, - "PIPE_FORMAT_Z32_FLOAT", - "z32_float", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32}, /* x = z */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* z */ - UTIL_FORMAT_SWIZZLE_NONE, /* s */ - UTIL_FORMAT_SWIZZLE_NONE, /* ignored */ - UTIL_FORMAT_SWIZZLE_NONE /* ignored */ - }, - UTIL_FORMAT_COLORSPACE_ZS, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - &util_format_z32_float_unpack_z_32unorm, - &util_format_z32_float_pack_z_32unorm, - &util_format_z32_float_unpack_z_float, - &util_format_z32_float_pack_z_float, - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_z24_unorm_s8_uint_description = { - PIPE_FORMAT_Z24_UNORM_S8_UINT, - "PIPE_FORMAT_Z24_UNORM_S8_UINT", - "z24_unorm_s8_uint", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - TRUE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 24}, /* x = z */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* y = s */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* z */ - UTIL_FORMAT_SWIZZLE_Y, /* s */ - UTIL_FORMAT_SWIZZLE_NONE, /* ignored */ - UTIL_FORMAT_SWIZZLE_NONE /* ignored */ - }, - UTIL_FORMAT_COLORSPACE_ZS, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - &util_format_z24_unorm_s8_uint_unpack_z_32unorm, - &util_format_z24_unorm_s8_uint_pack_z_32unorm, - &util_format_z24_unorm_s8_uint_unpack_z_float, - &util_format_z24_unorm_s8_uint_pack_z_float, - &util_format_z24_unorm_s8_uint_unpack_s_8uint, - &util_format_z24_unorm_s8_uint_pack_s_8uint, - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_s8_uint_z24_unorm_description = { - PIPE_FORMAT_S8_UINT_Z24_UNORM, - "PIPE_FORMAT_S8_UINT_Z24_UNORM", - "s8_uint_z24_unorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - TRUE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* x = s */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 24}, /* y = z */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_Y, /* z */ - UTIL_FORMAT_SWIZZLE_X, /* s */ - UTIL_FORMAT_SWIZZLE_NONE, /* ignored */ - UTIL_FORMAT_SWIZZLE_NONE /* ignored */ - }, - UTIL_FORMAT_COLORSPACE_ZS, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - &util_format_s8_uint_z24_unorm_unpack_z_32unorm, - &util_format_s8_uint_z24_unorm_pack_z_32unorm, - &util_format_s8_uint_z24_unorm_unpack_z_float, - &util_format_s8_uint_z24_unorm_pack_z_float, - &util_format_s8_uint_z24_unorm_unpack_s_8uint, - &util_format_s8_uint_z24_unorm_pack_s_8uint, - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_x24s8_uint_description = { - PIPE_FORMAT_X24S8_UINT, - "PIPE_FORMAT_X24S8_UINT", - "x24s8_uint", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 24}, /* x = x */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* y = s */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_NONE, /* z */ - UTIL_FORMAT_SWIZZLE_Y, /* s */ - UTIL_FORMAT_SWIZZLE_NONE, /* ignored */ - UTIL_FORMAT_SWIZZLE_NONE /* ignored */ - }, - UTIL_FORMAT_COLORSPACE_ZS, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - &util_format_x24s8_uint_unpack_s_8uint, - &util_format_x24s8_uint_pack_s_8uint, - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_s8x24_uint_description = { - PIPE_FORMAT_S8X24_UINT, - "PIPE_FORMAT_S8X24_UINT", - "s8x24_uint", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* x = s */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 24}, /* y = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_NONE, /* z */ - UTIL_FORMAT_SWIZZLE_X, /* s */ - UTIL_FORMAT_SWIZZLE_NONE, /* ignored */ - UTIL_FORMAT_SWIZZLE_NONE /* ignored */ - }, - UTIL_FORMAT_COLORSPACE_ZS, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - &util_format_s8x24_uint_unpack_s_8uint, - &util_format_s8x24_uint_pack_s_8uint, - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_z24x8_unorm_description = { - PIPE_FORMAT_Z24X8_UNORM, - "PIPE_FORMAT_Z24X8_UNORM", - "z24x8_unorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 24}, /* x = z */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* y = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* z */ - UTIL_FORMAT_SWIZZLE_NONE, /* s */ - UTIL_FORMAT_SWIZZLE_NONE, /* ignored */ - UTIL_FORMAT_SWIZZLE_NONE /* ignored */ - }, - UTIL_FORMAT_COLORSPACE_ZS, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - &util_format_z24x8_unorm_unpack_z_32unorm, - &util_format_z24x8_unorm_pack_z_32unorm, - &util_format_z24x8_unorm_unpack_z_float, - &util_format_z24x8_unorm_pack_z_float, - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_x8z24_unorm_description = { - PIPE_FORMAT_X8Z24_UNORM, - "PIPE_FORMAT_X8Z24_UNORM", - "x8z24_unorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* x = x */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 24}, /* y = z */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_Y, /* z */ - UTIL_FORMAT_SWIZZLE_NONE, /* s */ - UTIL_FORMAT_SWIZZLE_NONE, /* ignored */ - UTIL_FORMAT_SWIZZLE_NONE /* ignored */ - }, - UTIL_FORMAT_COLORSPACE_ZS, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - &util_format_x8z24_unorm_unpack_z_32unorm, - &util_format_x8z24_unorm_pack_z_32unorm, - &util_format_x8z24_unorm_unpack_z_float, - &util_format_x8z24_unorm_pack_z_float, - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_z32_float_s8x24_uint_description = { - PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, - "PIPE_FORMAT_Z32_FLOAT_S8X24_UINT", - "z32_float_s8x24_uint", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - TRUE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32}, /* x = z */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* y = s */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 24}, /* z = x */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* z */ - UTIL_FORMAT_SWIZZLE_Y, /* s */ - UTIL_FORMAT_SWIZZLE_NONE, /* ignored */ - UTIL_FORMAT_SWIZZLE_NONE /* ignored */ - }, - UTIL_FORMAT_COLORSPACE_ZS, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - &util_format_z32_float_s8x24_uint_unpack_z_32unorm, - &util_format_z32_float_s8x24_uint_pack_z_32unorm, - &util_format_z32_float_s8x24_uint_unpack_z_float, - &util_format_z32_float_s8x24_uint_pack_z_float, - &util_format_z32_float_s8x24_uint_unpack_s_8uint, - &util_format_z32_float_s8x24_uint_pack_s_8uint, - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_x32_s8x24_uint_description = { - PIPE_FORMAT_X32_S8X24_UINT, - "PIPE_FORMAT_X32_S8X24_UINT", - "x32_s8x24_uint", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32}, /* x = x */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* y = s */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 24}, /* z = x */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_NONE, /* z */ - UTIL_FORMAT_SWIZZLE_Y, /* s */ - UTIL_FORMAT_SWIZZLE_NONE, /* ignored */ - UTIL_FORMAT_SWIZZLE_NONE /* ignored */ - }, - UTIL_FORMAT_COLORSPACE_ZS, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - &util_format_x32_s8x24_uint_unpack_s_8uint, - &util_format_x32_s8x24_uint_pack_s_8uint, - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_uyvy_description = { - PIPE_FORMAT_UYVY, - "PIPE_FORMAT_UYVY", - "uyvy", - {2, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_SUBSAMPLED, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* y */ - UTIL_FORMAT_SWIZZLE_Y, /* u */ - UTIL_FORMAT_SWIZZLE_Z, /* v */ - UTIL_FORMAT_SWIZZLE_1 /* ignored */ - }, - UTIL_FORMAT_COLORSPACE_YUV, - &util_format_uyvy_unpack_rgba_8unorm, - &util_format_uyvy_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_uyvy_unpack_rgba_float, - &util_format_uyvy_pack_rgba_float, - &util_format_uyvy_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_yuyv_description = { - PIPE_FORMAT_YUYV, - "PIPE_FORMAT_YUYV", - "yuyv", - {2, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_SUBSAMPLED, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* y */ - UTIL_FORMAT_SWIZZLE_Y, /* u */ - UTIL_FORMAT_SWIZZLE_Z, /* v */ - UTIL_FORMAT_SWIZZLE_1 /* ignored */ - }, - UTIL_FORMAT_COLORSPACE_YUV, - &util_format_yuyv_unpack_rgba_8unorm, - &util_format_yuyv_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_yuyv_unpack_rgba_float, - &util_format_yuyv_pack_rgba_float, - &util_format_yuyv_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8_b8g8_unorm_description = { - PIPE_FORMAT_R8G8_B8G8_UNORM, - "PIPE_FORMAT_R8G8_B8G8_UNORM", - "r8g8_b8g8_unorm", - {2, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_SUBSAMPLED, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8g8_b8g8_unorm_unpack_rgba_8unorm, - &util_format_r8g8_b8g8_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8g8_b8g8_unorm_unpack_rgba_float, - &util_format_r8g8_b8g8_unorm_pack_rgba_float, - &util_format_r8g8_b8g8_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_g8r8_g8b8_unorm_description = { - PIPE_FORMAT_G8R8_G8B8_UNORM, - "PIPE_FORMAT_G8R8_G8B8_UNORM", - "g8r8_g8b8_unorm", - {2, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_SUBSAMPLED, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_g8r8_g8b8_unorm_unpack_rgba_8unorm, - &util_format_g8r8_g8b8_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_g8r8_g8b8_unorm_unpack_rgba_float, - &util_format_g8r8_g8b8_unorm_pack_rgba_float, - &util_format_g8r8_g8b8_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r11g11b10_float_description = { - PIPE_FORMAT_R11G11B10_FLOAT, - "PIPE_FORMAT_R11G11B10_FLOAT", - "r11g11b10_float", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_OTHER, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r11g11b10_float_unpack_rgba_8unorm, - &util_format_r11g11b10_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r11g11b10_float_unpack_rgba_float, - &util_format_r11g11b10_float_pack_rgba_float, - &util_format_r11g11b10_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r9g9b9e5_float_description = { - PIPE_FORMAT_R9G9B9E5_FLOAT, - "PIPE_FORMAT_R9G9B9E5_FLOAT", - "r9g9b9e5_float", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_OTHER, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 32}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r9g9b9e5_float_unpack_rgba_8unorm, - &util_format_r9g9b9e5_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r9g9b9e5_float_unpack_rgba_float, - &util_format_r9g9b9e5_float_pack_rgba_float, - &util_format_r9g9b9e5_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r1_unorm_description = { - PIPE_FORMAT_R1_UNORM, - "PIPE_FORMAT_R1_UNORM", - "r1_unorm", - {8, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_OTHER, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r1_unorm_unpack_rgba_8unorm, - &util_format_r1_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r1_unorm_unpack_rgba_float, - &util_format_r1_unorm_pack_rgba_float, - &util_format_r1_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8bx_snorm_description = { - PIPE_FORMAT_R8G8Bx_SNORM, - "PIPE_FORMAT_R8G8Bx_SNORM", - "r8g8bx_snorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_OTHER, - 2, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8}, /* x = x */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8}, /* y = y */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8g8bx_snorm_unpack_rgba_8unorm, - &util_format_r8g8bx_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8g8bx_snorm_unpack_rgba_float, - &util_format_r8g8bx_snorm_pack_rgba_float, - &util_format_r8g8bx_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_dxt1_rgb_description = { - PIPE_FORMAT_DXT1_RGB, - "PIPE_FORMAT_DXT1_RGB", - "dxt1_rgb", - {4, 4, 64}, /* block */ - UTIL_FORMAT_LAYOUT_S3TC, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_dxt1_rgb_unpack_rgba_8unorm, - &util_format_dxt1_rgb_pack_rgba_8unorm, - &util_format_dxt1_rgb_fetch_rgba_8unorm, - &util_format_dxt1_rgb_unpack_rgba_float, - &util_format_dxt1_rgb_pack_rgba_float, - &util_format_dxt1_rgb_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_dxt1_rgba_description = { - PIPE_FORMAT_DXT1_RGBA, - "PIPE_FORMAT_DXT1_RGBA", - "dxt1_rgba", - {4, 4, 64}, /* block */ - UTIL_FORMAT_LAYOUT_S3TC, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_dxt1_rgba_unpack_rgba_8unorm, - &util_format_dxt1_rgba_pack_rgba_8unorm, - &util_format_dxt1_rgba_fetch_rgba_8unorm, - &util_format_dxt1_rgba_unpack_rgba_float, - &util_format_dxt1_rgba_pack_rgba_float, - &util_format_dxt1_rgba_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_dxt3_rgba_description = { - PIPE_FORMAT_DXT3_RGBA, - "PIPE_FORMAT_DXT3_RGBA", - "dxt3_rgba", - {4, 4, 128}, /* block */ - UTIL_FORMAT_LAYOUT_S3TC, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_dxt3_rgba_unpack_rgba_8unorm, - &util_format_dxt3_rgba_pack_rgba_8unorm, - &util_format_dxt3_rgba_fetch_rgba_8unorm, - &util_format_dxt3_rgba_unpack_rgba_float, - &util_format_dxt3_rgba_pack_rgba_float, - &util_format_dxt3_rgba_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_dxt5_rgba_description = { - PIPE_FORMAT_DXT5_RGBA, - "PIPE_FORMAT_DXT5_RGBA", - "dxt5_rgba", - {4, 4, 128}, /* block */ - UTIL_FORMAT_LAYOUT_S3TC, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_dxt5_rgba_unpack_rgba_8unorm, - &util_format_dxt5_rgba_pack_rgba_8unorm, - &util_format_dxt5_rgba_fetch_rgba_8unorm, - &util_format_dxt5_rgba_unpack_rgba_float, - &util_format_dxt5_rgba_pack_rgba_float, - &util_format_dxt5_rgba_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_dxt1_srgb_description = { - PIPE_FORMAT_DXT1_SRGB, - "PIPE_FORMAT_DXT1_SRGB", - "dxt1_srgb", - {4, 4, 64}, /* block */ - UTIL_FORMAT_LAYOUT_S3TC, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* sr */ - UTIL_FORMAT_SWIZZLE_Y, /* sg */ - UTIL_FORMAT_SWIZZLE_Z, /* sb */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_SRGB, - &util_format_dxt1_srgb_unpack_rgba_8unorm, - &util_format_dxt1_srgb_pack_rgba_8unorm, - &util_format_dxt1_srgb_fetch_rgba_8unorm, - &util_format_dxt1_srgb_unpack_rgba_float, - &util_format_dxt1_srgb_pack_rgba_float, - &util_format_dxt1_srgb_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_dxt1_srgba_description = { - PIPE_FORMAT_DXT1_SRGBA, - "PIPE_FORMAT_DXT1_SRGBA", - "dxt1_srgba", - {4, 4, 64}, /* block */ - UTIL_FORMAT_LAYOUT_S3TC, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* sr */ - UTIL_FORMAT_SWIZZLE_Y, /* sg */ - UTIL_FORMAT_SWIZZLE_Z, /* sb */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_SRGB, - &util_format_dxt1_srgba_unpack_rgba_8unorm, - &util_format_dxt1_srgba_pack_rgba_8unorm, - &util_format_dxt1_srgba_fetch_rgba_8unorm, - &util_format_dxt1_srgba_unpack_rgba_float, - &util_format_dxt1_srgba_pack_rgba_float, - &util_format_dxt1_srgba_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_dxt3_srgba_description = { - PIPE_FORMAT_DXT3_SRGBA, - "PIPE_FORMAT_DXT3_SRGBA", - "dxt3_srgba", - {4, 4, 128}, /* block */ - UTIL_FORMAT_LAYOUT_S3TC, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* sr */ - UTIL_FORMAT_SWIZZLE_Y, /* sg */ - UTIL_FORMAT_SWIZZLE_Z, /* sb */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_SRGB, - &util_format_dxt3_srgba_unpack_rgba_8unorm, - &util_format_dxt3_srgba_pack_rgba_8unorm, - &util_format_dxt3_srgba_fetch_rgba_8unorm, - &util_format_dxt3_srgba_unpack_rgba_float, - &util_format_dxt3_srgba_pack_rgba_float, - &util_format_dxt3_srgba_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_dxt5_srgba_description = { - PIPE_FORMAT_DXT5_SRGBA, - "PIPE_FORMAT_DXT5_SRGBA", - "dxt5_srgba", - {4, 4, 128}, /* block */ - UTIL_FORMAT_LAYOUT_S3TC, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* sr */ - UTIL_FORMAT_SWIZZLE_Y, /* sg */ - UTIL_FORMAT_SWIZZLE_Z, /* sb */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_SRGB, - &util_format_dxt5_srgba_unpack_rgba_8unorm, - &util_format_dxt5_srgba_pack_rgba_8unorm, - &util_format_dxt5_srgba_fetch_rgba_8unorm, - &util_format_dxt5_srgba_unpack_rgba_float, - &util_format_dxt5_srgba_pack_rgba_float, - &util_format_dxt5_srgba_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_rgtc1_unorm_description = { - PIPE_FORMAT_RGTC1_UNORM, - "PIPE_FORMAT_RGTC1_UNORM", - "rgtc1_unorm", - {4, 4, 64}, /* block */ - UTIL_FORMAT_LAYOUT_RGTC, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_rgtc1_unorm_unpack_rgba_8unorm, - &util_format_rgtc1_unorm_pack_rgba_8unorm, - &util_format_rgtc1_unorm_fetch_rgba_8unorm, - &util_format_rgtc1_unorm_unpack_rgba_float, - &util_format_rgtc1_unorm_pack_rgba_float, - &util_format_rgtc1_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_rgtc1_snorm_description = { - PIPE_FORMAT_RGTC1_SNORM, - "PIPE_FORMAT_RGTC1_SNORM", - "rgtc1_snorm", - {4, 4, 64}, /* block */ - UTIL_FORMAT_LAYOUT_RGTC, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_rgtc1_snorm_unpack_rgba_8unorm, - &util_format_rgtc1_snorm_pack_rgba_8unorm, - &util_format_rgtc1_snorm_fetch_rgba_8unorm, - &util_format_rgtc1_snorm_unpack_rgba_float, - &util_format_rgtc1_snorm_pack_rgba_float, - &util_format_rgtc1_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_rgtc2_unorm_description = { - PIPE_FORMAT_RGTC2_UNORM, - "PIPE_FORMAT_RGTC2_UNORM", - "rgtc2_unorm", - {4, 4, 128}, /* block */ - UTIL_FORMAT_LAYOUT_RGTC, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_rgtc2_unorm_unpack_rgba_8unorm, - &util_format_rgtc2_unorm_pack_rgba_8unorm, - &util_format_rgtc2_unorm_fetch_rgba_8unorm, - &util_format_rgtc2_unorm_unpack_rgba_float, - &util_format_rgtc2_unorm_pack_rgba_float, - &util_format_rgtc2_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_rgtc2_snorm_description = { - PIPE_FORMAT_RGTC2_SNORM, - "PIPE_FORMAT_RGTC2_SNORM", - "rgtc2_snorm", - {4, 4, 128}, /* block */ - UTIL_FORMAT_LAYOUT_RGTC, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_rgtc2_snorm_unpack_rgba_8unorm, - &util_format_rgtc2_snorm_pack_rgba_8unorm, - &util_format_rgtc2_snorm_fetch_rgba_8unorm, - &util_format_rgtc2_snorm_unpack_rgba_float, - &util_format_rgtc2_snorm_pack_rgba_float, - &util_format_rgtc2_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_latc1_unorm_description = { - PIPE_FORMAT_LATC1_UNORM, - "PIPE_FORMAT_LATC1_UNORM", - "latc1_unorm", - {4, 4, 64}, /* block */ - UTIL_FORMAT_LAYOUT_RGTC, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_latc1_unorm_unpack_rgba_8unorm, - &util_format_latc1_unorm_pack_rgba_8unorm, - &util_format_latc1_unorm_fetch_rgba_8unorm, - &util_format_latc1_unorm_unpack_rgba_float, - &util_format_latc1_unorm_pack_rgba_float, - &util_format_latc1_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_latc1_snorm_description = { - PIPE_FORMAT_LATC1_SNORM, - "PIPE_FORMAT_LATC1_SNORM", - "latc1_snorm", - {4, 4, 64}, /* block */ - UTIL_FORMAT_LAYOUT_RGTC, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_latc1_snorm_unpack_rgba_8unorm, - &util_format_latc1_snorm_pack_rgba_8unorm, - &util_format_latc1_snorm_fetch_rgba_8unorm, - &util_format_latc1_snorm_unpack_rgba_float, - &util_format_latc1_snorm_pack_rgba_float, - &util_format_latc1_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_latc2_unorm_description = { - PIPE_FORMAT_LATC2_UNORM, - "PIPE_FORMAT_LATC2_UNORM", - "latc2_unorm", - {4, 4, 128}, /* block */ - UTIL_FORMAT_LAYOUT_RGTC, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_Y /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_latc2_unorm_unpack_rgba_8unorm, - &util_format_latc2_unorm_pack_rgba_8unorm, - &util_format_latc2_unorm_fetch_rgba_8unorm, - &util_format_latc2_unorm_unpack_rgba_float, - &util_format_latc2_unorm_pack_rgba_float, - &util_format_latc2_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_latc2_snorm_description = { - PIPE_FORMAT_LATC2_SNORM, - "PIPE_FORMAT_LATC2_SNORM", - "latc2_snorm", - {4, 4, 128}, /* block */ - UTIL_FORMAT_LAYOUT_RGTC, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 128}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_Y /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_latc2_snorm_unpack_rgba_8unorm, - &util_format_latc2_snorm_pack_rgba_8unorm, - &util_format_latc2_snorm_fetch_rgba_8unorm, - &util_format_latc2_snorm_unpack_rgba_float, - &util_format_latc2_snorm_pack_rgba_float, - &util_format_latc2_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_etc1_rgb8_description = { - PIPE_FORMAT_ETC1_RGB8, - "PIPE_FORMAT_ETC1_RGB8", - "etc1_rgb8", - {4, 4, 64}, /* block */ - UTIL_FORMAT_LAYOUT_ETC, - 1, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 64}, /* x = x */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_etc1_rgb8_unpack_rgba_8unorm, - &util_format_etc1_rgb8_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_etc1_rgb8_unpack_rgba_float, - &util_format_etc1_rgb8_pack_rgba_float, - &util_format_etc1_rgb8_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r64_float_description = { - PIPE_FORMAT_R64_FLOAT, - "PIPE_FORMAT_R64_FLOAT", - "r64_float", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r64_float_unpack_rgba_8unorm, - &util_format_r64_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r64_float_unpack_rgba_float, - &util_format_r64_float_pack_rgba_float, - &util_format_r64_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r64g64_float_description = { - PIPE_FORMAT_R64G64_FLOAT, - "PIPE_FORMAT_R64G64_FLOAT", - "r64g64_float", - {1, 1, 128}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64}, /* x = r */ - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r64g64_float_unpack_rgba_8unorm, - &util_format_r64g64_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r64g64_float_unpack_rgba_float, - &util_format_r64g64_float_pack_rgba_float, - &util_format_r64g64_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r64g64b64_float_description = { - PIPE_FORMAT_R64G64B64_FLOAT, - "PIPE_FORMAT_R64G64B64_FLOAT", - "r64g64b64_float", - {1, 1, 192}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64}, /* x = r */ - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64}, /* y = g */ - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r64g64b64_float_unpack_rgba_8unorm, - &util_format_r64g64b64_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r64g64b64_float_unpack_rgba_float, - &util_format_r64g64b64_float_pack_rgba_float, - &util_format_r64g64b64_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r64g64b64a64_float_description = { - PIPE_FORMAT_R64G64B64A64_FLOAT, - "PIPE_FORMAT_R64G64B64A64_FLOAT", - "r64g64b64a64_float", - {1, 1, 256}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64}, /* x = r */ - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64}, /* y = g */ - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64}, /* z = b */ - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 64} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r64g64b64a64_float_unpack_rgba_8unorm, - &util_format_r64g64b64a64_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r64g64b64a64_float_unpack_rgba_float, - &util_format_r64g64b64a64_float_pack_rgba_float, - &util_format_r64g64b64a64_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32_float_description = { - PIPE_FORMAT_R32_FLOAT, - "PIPE_FORMAT_R32_FLOAT", - "r32_float", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32_float_unpack_rgba_8unorm, - &util_format_r32_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32_float_unpack_rgba_float, - &util_format_r32_float_pack_rgba_float, - &util_format_r32_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32_float_description = { - PIPE_FORMAT_R32G32_FLOAT, - "PIPE_FORMAT_R32G32_FLOAT", - "r32g32_float", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32g32_float_unpack_rgba_8unorm, - &util_format_r32g32_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32g32_float_unpack_rgba_float, - &util_format_r32g32_float_pack_rgba_float, - &util_format_r32g32_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32b32_float_description = { - PIPE_FORMAT_R32G32B32_FLOAT, - "PIPE_FORMAT_R32G32B32_FLOAT", - "r32g32b32_float", - {1, 1, 96}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32}, /* y = g */ - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32g32b32_float_unpack_rgba_8unorm, - &util_format_r32g32b32_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32g32b32_float_unpack_rgba_float, - &util_format_r32g32b32_float_pack_rgba_float, - &util_format_r32g32b32_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32b32a32_float_description = { - PIPE_FORMAT_R32G32B32A32_FLOAT, - "PIPE_FORMAT_R32G32B32A32_FLOAT", - "r32g32b32a32_float", - {1, 1, 128}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32}, /* y = g */ - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32}, /* z = b */ - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 32} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32g32b32a32_float_unpack_rgba_8unorm, - &util_format_r32g32b32a32_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32g32b32a32_float_unpack_rgba_float, - &util_format_r32g32b32a32_float_pack_rgba_float, - &util_format_r32g32b32a32_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32_unorm_description = { - PIPE_FORMAT_R32_UNORM, - "PIPE_FORMAT_R32_UNORM", - "r32_unorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32_unorm_unpack_rgba_8unorm, - &util_format_r32_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32_unorm_unpack_rgba_float, - &util_format_r32_unorm_pack_rgba_float, - &util_format_r32_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32_unorm_description = { - PIPE_FORMAT_R32G32_UNORM, - "PIPE_FORMAT_R32G32_UNORM", - "r32g32_unorm", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32g32_unorm_unpack_rgba_8unorm, - &util_format_r32g32_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32g32_unorm_unpack_rgba_float, - &util_format_r32g32_unorm_pack_rgba_float, - &util_format_r32g32_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32b32_unorm_description = { - PIPE_FORMAT_R32G32B32_UNORM, - "PIPE_FORMAT_R32G32B32_UNORM", - "r32g32b32_unorm", - {1, 1, 96}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32g32b32_unorm_unpack_rgba_8unorm, - &util_format_r32g32b32_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32g32b32_unorm_unpack_rgba_float, - &util_format_r32g32b32_unorm_pack_rgba_float, - &util_format_r32g32b32_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32b32a32_unorm_description = { - PIPE_FORMAT_R32G32B32A32_UNORM, - "PIPE_FORMAT_R32G32B32A32_UNORM", - "r32g32b32a32_unorm", - {1, 1, 128}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32}, /* z = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 32} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32g32b32a32_unorm_unpack_rgba_8unorm, - &util_format_r32g32b32a32_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32g32b32a32_unorm_unpack_rgba_float, - &util_format_r32g32b32a32_unorm_pack_rgba_float, - &util_format_r32g32b32a32_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32_uscaled_description = { - PIPE_FORMAT_R32_USCALED, - "PIPE_FORMAT_R32_USCALED", - "r32_uscaled", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32_uscaled_unpack_rgba_8unorm, - &util_format_r32_uscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32_uscaled_unpack_rgba_float, - &util_format_r32_uscaled_pack_rgba_float, - &util_format_r32_uscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32_uscaled_description = { - PIPE_FORMAT_R32G32_USCALED, - "PIPE_FORMAT_R32G32_USCALED", - "r32g32_uscaled", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32g32_uscaled_unpack_rgba_8unorm, - &util_format_r32g32_uscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32g32_uscaled_unpack_rgba_float, - &util_format_r32g32_uscaled_pack_rgba_float, - &util_format_r32g32_uscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32b32_uscaled_description = { - PIPE_FORMAT_R32G32B32_USCALED, - "PIPE_FORMAT_R32G32B32_USCALED", - "r32g32b32_uscaled", - {1, 1, 96}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32g32b32_uscaled_unpack_rgba_8unorm, - &util_format_r32g32b32_uscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32g32b32_uscaled_unpack_rgba_float, - &util_format_r32g32b32_uscaled_pack_rgba_float, - &util_format_r32g32b32_uscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32b32a32_uscaled_description = { - PIPE_FORMAT_R32G32B32A32_USCALED, - "PIPE_FORMAT_R32G32B32A32_USCALED", - "r32g32b32a32_uscaled", - {1, 1, 128}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32}, /* z = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 32} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32g32b32a32_uscaled_unpack_rgba_8unorm, - &util_format_r32g32b32a32_uscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32g32b32a32_uscaled_unpack_rgba_float, - &util_format_r32g32b32a32_uscaled_pack_rgba_float, - &util_format_r32g32b32a32_uscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32_snorm_description = { - PIPE_FORMAT_R32_SNORM, - "PIPE_FORMAT_R32_SNORM", - "r32_snorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32_snorm_unpack_rgba_8unorm, - &util_format_r32_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32_snorm_unpack_rgba_float, - &util_format_r32_snorm_pack_rgba_float, - &util_format_r32_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32_snorm_description = { - PIPE_FORMAT_R32G32_SNORM, - "PIPE_FORMAT_R32G32_SNORM", - "r32g32_snorm", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32g32_snorm_unpack_rgba_8unorm, - &util_format_r32g32_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32g32_snorm_unpack_rgba_float, - &util_format_r32g32_snorm_pack_rgba_float, - &util_format_r32g32_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32b32_snorm_description = { - PIPE_FORMAT_R32G32B32_SNORM, - "PIPE_FORMAT_R32G32B32_SNORM", - "r32g32b32_snorm", - {1, 1, 96}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32g32b32_snorm_unpack_rgba_8unorm, - &util_format_r32g32b32_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32g32b32_snorm_unpack_rgba_float, - &util_format_r32g32b32_snorm_pack_rgba_float, - &util_format_r32g32b32_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32b32a32_snorm_description = { - PIPE_FORMAT_R32G32B32A32_SNORM, - "PIPE_FORMAT_R32G32B32A32_SNORM", - "r32g32b32a32_snorm", - {1, 1, 128}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32}, /* z = b */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 32} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32g32b32a32_snorm_unpack_rgba_8unorm, - &util_format_r32g32b32a32_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32g32b32a32_snorm_unpack_rgba_float, - &util_format_r32g32b32a32_snorm_pack_rgba_float, - &util_format_r32g32b32a32_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32_sscaled_description = { - PIPE_FORMAT_R32_SSCALED, - "PIPE_FORMAT_R32_SSCALED", - "r32_sscaled", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32_sscaled_unpack_rgba_8unorm, - &util_format_r32_sscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32_sscaled_unpack_rgba_float, - &util_format_r32_sscaled_pack_rgba_float, - &util_format_r32_sscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32_sscaled_description = { - PIPE_FORMAT_R32G32_SSCALED, - "PIPE_FORMAT_R32G32_SSCALED", - "r32g32_sscaled", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32g32_sscaled_unpack_rgba_8unorm, - &util_format_r32g32_sscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32g32_sscaled_unpack_rgba_float, - &util_format_r32g32_sscaled_pack_rgba_float, - &util_format_r32g32_sscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32b32_sscaled_description = { - PIPE_FORMAT_R32G32B32_SSCALED, - "PIPE_FORMAT_R32G32B32_SSCALED", - "r32g32b32_sscaled", - {1, 1, 96}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32g32b32_sscaled_unpack_rgba_8unorm, - &util_format_r32g32b32_sscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32g32b32_sscaled_unpack_rgba_float, - &util_format_r32g32b32_sscaled_pack_rgba_float, - &util_format_r32g32b32_sscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32b32a32_sscaled_description = { - PIPE_FORMAT_R32G32B32A32_SSCALED, - "PIPE_FORMAT_R32G32B32A32_SSCALED", - "r32g32b32a32_sscaled", - {1, 1, 128}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32}, /* z = b */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 32} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32g32b32a32_sscaled_unpack_rgba_8unorm, - &util_format_r32g32b32a32_sscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32g32b32a32_sscaled_unpack_rgba_float, - &util_format_r32g32b32a32_sscaled_pack_rgba_float, - &util_format_r32g32b32a32_sscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16_float_description = { - PIPE_FORMAT_R16_FLOAT, - "PIPE_FORMAT_R16_FLOAT", - "r16_float", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r16_float_unpack_rgba_8unorm, - &util_format_r16_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r16_float_unpack_rgba_float, - &util_format_r16_float_pack_rgba_float, - &util_format_r16_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16_float_description = { - PIPE_FORMAT_R16G16_FLOAT, - "PIPE_FORMAT_R16G16_FLOAT", - "r16g16_float", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r16g16_float_unpack_rgba_8unorm, - &util_format_r16g16_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r16g16_float_unpack_rgba_float, - &util_format_r16g16_float_pack_rgba_float, - &util_format_r16g16_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16b16_float_description = { - PIPE_FORMAT_R16G16B16_FLOAT, - "PIPE_FORMAT_R16G16B16_FLOAT", - "r16g16b16_float", - {1, 1, 48}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16}, /* y = g */ - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r16g16b16_float_unpack_rgba_8unorm, - &util_format_r16g16b16_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r16g16b16_float_unpack_rgba_float, - &util_format_r16g16b16_float_pack_rgba_float, - &util_format_r16g16b16_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16b16a16_float_description = { - PIPE_FORMAT_R16G16B16A16_FLOAT, - "PIPE_FORMAT_R16G16B16A16_FLOAT", - "r16g16b16a16_float", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16}, /* y = g */ - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16}, /* z = b */ - {UTIL_FORMAT_TYPE_FLOAT, FALSE, FALSE, 16} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r16g16b16a16_float_unpack_rgba_8unorm, - &util_format_r16g16b16a16_float_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r16g16b16a16_float_unpack_rgba_float, - &util_format_r16g16b16a16_float_pack_rgba_float, - &util_format_r16g16b16a16_float_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16_unorm_description = { - PIPE_FORMAT_R16_UNORM, - "PIPE_FORMAT_R16_UNORM", - "r16_unorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r16_unorm_unpack_rgba_8unorm, - &util_format_r16_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r16_unorm_unpack_rgba_float, - &util_format_r16_unorm_pack_rgba_float, - &util_format_r16_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16_unorm_description = { - PIPE_FORMAT_R16G16_UNORM, - "PIPE_FORMAT_R16G16_UNORM", - "r16g16_unorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r16g16_unorm_unpack_rgba_8unorm, - &util_format_r16g16_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r16g16_unorm_unpack_rgba_float, - &util_format_r16g16_unorm_pack_rgba_float, - &util_format_r16g16_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16b16_unorm_description = { - PIPE_FORMAT_R16G16B16_UNORM, - "PIPE_FORMAT_R16G16B16_UNORM", - "r16g16b16_unorm", - {1, 1, 48}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r16g16b16_unorm_unpack_rgba_8unorm, - &util_format_r16g16b16_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r16g16b16_unorm_unpack_rgba_float, - &util_format_r16g16b16_unorm_pack_rgba_float, - &util_format_r16g16b16_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16b16a16_unorm_description = { - PIPE_FORMAT_R16G16B16A16_UNORM, - "PIPE_FORMAT_R16G16B16A16_UNORM", - "r16g16b16a16_unorm", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16}, /* z = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 16} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r16g16b16a16_unorm_unpack_rgba_8unorm, - &util_format_r16g16b16a16_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r16g16b16a16_unorm_unpack_rgba_float, - &util_format_r16g16b16a16_unorm_pack_rgba_float, - &util_format_r16g16b16a16_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16_uscaled_description = { - PIPE_FORMAT_R16_USCALED, - "PIPE_FORMAT_R16_USCALED", - "r16_uscaled", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r16_uscaled_unpack_rgba_8unorm, - &util_format_r16_uscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r16_uscaled_unpack_rgba_float, - &util_format_r16_uscaled_pack_rgba_float, - &util_format_r16_uscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16_uscaled_description = { - PIPE_FORMAT_R16G16_USCALED, - "PIPE_FORMAT_R16G16_USCALED", - "r16g16_uscaled", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r16g16_uscaled_unpack_rgba_8unorm, - &util_format_r16g16_uscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r16g16_uscaled_unpack_rgba_float, - &util_format_r16g16_uscaled_pack_rgba_float, - &util_format_r16g16_uscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16b16_uscaled_description = { - PIPE_FORMAT_R16G16B16_USCALED, - "PIPE_FORMAT_R16G16B16_USCALED", - "r16g16b16_uscaled", - {1, 1, 48}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r16g16b16_uscaled_unpack_rgba_8unorm, - &util_format_r16g16b16_uscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r16g16b16_uscaled_unpack_rgba_float, - &util_format_r16g16b16_uscaled_pack_rgba_float, - &util_format_r16g16b16_uscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16b16a16_uscaled_description = { - PIPE_FORMAT_R16G16B16A16_USCALED, - "PIPE_FORMAT_R16G16B16A16_USCALED", - "r16g16b16a16_uscaled", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16}, /* z = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 16} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r16g16b16a16_uscaled_unpack_rgba_8unorm, - &util_format_r16g16b16a16_uscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r16g16b16a16_uscaled_unpack_rgba_float, - &util_format_r16g16b16a16_uscaled_pack_rgba_float, - &util_format_r16g16b16a16_uscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16_snorm_description = { - PIPE_FORMAT_R16_SNORM, - "PIPE_FORMAT_R16_SNORM", - "r16_snorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r16_snorm_unpack_rgba_8unorm, - &util_format_r16_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r16_snorm_unpack_rgba_float, - &util_format_r16_snorm_pack_rgba_float, - &util_format_r16_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16_snorm_description = { - PIPE_FORMAT_R16G16_SNORM, - "PIPE_FORMAT_R16G16_SNORM", - "r16g16_snorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r16g16_snorm_unpack_rgba_8unorm, - &util_format_r16g16_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r16g16_snorm_unpack_rgba_float, - &util_format_r16g16_snorm_pack_rgba_float, - &util_format_r16g16_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16b16_snorm_description = { - PIPE_FORMAT_R16G16B16_SNORM, - "PIPE_FORMAT_R16G16B16_SNORM", - "r16g16b16_snorm", - {1, 1, 48}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r16g16b16_snorm_unpack_rgba_8unorm, - &util_format_r16g16b16_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r16g16b16_snorm_unpack_rgba_float, - &util_format_r16g16b16_snorm_pack_rgba_float, - &util_format_r16g16b16_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16b16a16_snorm_description = { - PIPE_FORMAT_R16G16B16A16_SNORM, - "PIPE_FORMAT_R16G16B16A16_SNORM", - "r16g16b16a16_snorm", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16}, /* z = b */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 16} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r16g16b16a16_snorm_unpack_rgba_8unorm, - &util_format_r16g16b16a16_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r16g16b16a16_snorm_unpack_rgba_float, - &util_format_r16g16b16a16_snorm_pack_rgba_float, - &util_format_r16g16b16a16_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16_sscaled_description = { - PIPE_FORMAT_R16_SSCALED, - "PIPE_FORMAT_R16_SSCALED", - "r16_sscaled", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r16_sscaled_unpack_rgba_8unorm, - &util_format_r16_sscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r16_sscaled_unpack_rgba_float, - &util_format_r16_sscaled_pack_rgba_float, - &util_format_r16_sscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16_sscaled_description = { - PIPE_FORMAT_R16G16_SSCALED, - "PIPE_FORMAT_R16G16_SSCALED", - "r16g16_sscaled", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r16g16_sscaled_unpack_rgba_8unorm, - &util_format_r16g16_sscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r16g16_sscaled_unpack_rgba_float, - &util_format_r16g16_sscaled_pack_rgba_float, - &util_format_r16g16_sscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16b16_sscaled_description = { - PIPE_FORMAT_R16G16B16_SSCALED, - "PIPE_FORMAT_R16G16B16_SSCALED", - "r16g16b16_sscaled", - {1, 1, 48}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r16g16b16_sscaled_unpack_rgba_8unorm, - &util_format_r16g16b16_sscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r16g16b16_sscaled_unpack_rgba_float, - &util_format_r16g16b16_sscaled_pack_rgba_float, - &util_format_r16g16b16_sscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16b16a16_sscaled_description = { - PIPE_FORMAT_R16G16B16A16_SSCALED, - "PIPE_FORMAT_R16G16B16A16_SSCALED", - "r16g16b16a16_sscaled", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16}, /* z = b */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 16} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r16g16b16a16_sscaled_unpack_rgba_8unorm, - &util_format_r16g16b16a16_sscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r16g16b16a16_sscaled_unpack_rgba_float, - &util_format_r16g16b16a16_sscaled_pack_rgba_float, - &util_format_r16g16b16a16_sscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8_unorm_description = { - PIPE_FORMAT_R8_UNORM, - "PIPE_FORMAT_R8_UNORM", - "r8_unorm", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8_unorm_unpack_rgba_8unorm, - &util_format_r8_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8_unorm_unpack_rgba_float, - &util_format_r8_unorm_pack_rgba_float, - &util_format_r8_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8_unorm_description = { - PIPE_FORMAT_R8G8_UNORM, - "PIPE_FORMAT_R8G8_UNORM", - "r8g8_unorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8g8_unorm_unpack_rgba_8unorm, - &util_format_r8g8_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8g8_unorm_unpack_rgba_float, - &util_format_r8g8_unorm_pack_rgba_float, - &util_format_r8g8_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8b8_unorm_description = { - PIPE_FORMAT_R8G8B8_UNORM, - "PIPE_FORMAT_R8G8B8_UNORM", - "r8g8b8_unorm", - {1, 1, 24}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8g8b8_unorm_unpack_rgba_8unorm, - &util_format_r8g8b8_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8g8b8_unorm_unpack_rgba_float, - &util_format_r8g8b8_unorm_pack_rgba_float, - &util_format_r8g8b8_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8b8a8_unorm_description = { - PIPE_FORMAT_R8G8B8A8_UNORM, - "PIPE_FORMAT_R8G8B8A8_UNORM", - "r8g8b8a8_unorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* z = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8g8b8a8_unorm_unpack_rgba_8unorm, - &util_format_r8g8b8a8_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8g8b8a8_unorm_unpack_rgba_float, - &util_format_r8g8b8a8_unorm_pack_rgba_float, - &util_format_r8g8b8a8_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8_uscaled_description = { - PIPE_FORMAT_R8_USCALED, - "PIPE_FORMAT_R8_USCALED", - "r8_uscaled", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8_uscaled_unpack_rgba_8unorm, - &util_format_r8_uscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8_uscaled_unpack_rgba_float, - &util_format_r8_uscaled_pack_rgba_float, - &util_format_r8_uscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8_uscaled_description = { - PIPE_FORMAT_R8G8_USCALED, - "PIPE_FORMAT_R8G8_USCALED", - "r8g8_uscaled", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8g8_uscaled_unpack_rgba_8unorm, - &util_format_r8g8_uscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8g8_uscaled_unpack_rgba_float, - &util_format_r8g8_uscaled_pack_rgba_float, - &util_format_r8g8_uscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8b8_uscaled_description = { - PIPE_FORMAT_R8G8B8_USCALED, - "PIPE_FORMAT_R8G8B8_USCALED", - "r8g8b8_uscaled", - {1, 1, 24}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8g8b8_uscaled_unpack_rgba_8unorm, - &util_format_r8g8b8_uscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8g8b8_uscaled_unpack_rgba_float, - &util_format_r8g8b8_uscaled_pack_rgba_float, - &util_format_r8g8b8_uscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8b8a8_uscaled_description = { - PIPE_FORMAT_R8G8B8A8_USCALED, - "PIPE_FORMAT_R8G8B8A8_USCALED", - "r8g8b8a8_uscaled", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8}, /* z = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 8} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8g8b8a8_uscaled_unpack_rgba_8unorm, - &util_format_r8g8b8a8_uscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8g8b8a8_uscaled_unpack_rgba_float, - &util_format_r8g8b8a8_uscaled_pack_rgba_float, - &util_format_r8g8b8a8_uscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8_snorm_description = { - PIPE_FORMAT_R8_SNORM, - "PIPE_FORMAT_R8_SNORM", - "r8_snorm", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8_snorm_unpack_rgba_8unorm, - &util_format_r8_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8_snorm_unpack_rgba_float, - &util_format_r8_snorm_pack_rgba_float, - &util_format_r8_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8_snorm_description = { - PIPE_FORMAT_R8G8_SNORM, - "PIPE_FORMAT_R8G8_SNORM", - "r8g8_snorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8g8_snorm_unpack_rgba_8unorm, - &util_format_r8g8_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8g8_snorm_unpack_rgba_float, - &util_format_r8g8_snorm_pack_rgba_float, - &util_format_r8g8_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8b8_snorm_description = { - PIPE_FORMAT_R8G8B8_SNORM, - "PIPE_FORMAT_R8G8B8_SNORM", - "r8g8b8_snorm", - {1, 1, 24}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8g8b8_snorm_unpack_rgba_8unorm, - &util_format_r8g8b8_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8g8b8_snorm_unpack_rgba_float, - &util_format_r8g8b8_snorm_pack_rgba_float, - &util_format_r8g8b8_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8b8a8_snorm_description = { - PIPE_FORMAT_R8G8B8A8_SNORM, - "PIPE_FORMAT_R8G8B8A8_SNORM", - "r8g8b8a8_snorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8}, /* z = b */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 8} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8g8b8a8_snorm_unpack_rgba_8unorm, - &util_format_r8g8b8a8_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8g8b8a8_snorm_unpack_rgba_float, - &util_format_r8g8b8a8_snorm_pack_rgba_float, - &util_format_r8g8b8a8_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8_sscaled_description = { - PIPE_FORMAT_R8_SSCALED, - "PIPE_FORMAT_R8_SSCALED", - "r8_sscaled", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8_sscaled_unpack_rgba_8unorm, - &util_format_r8_sscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8_sscaled_unpack_rgba_float, - &util_format_r8_sscaled_pack_rgba_float, - &util_format_r8_sscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8_sscaled_description = { - PIPE_FORMAT_R8G8_SSCALED, - "PIPE_FORMAT_R8G8_SSCALED", - "r8g8_sscaled", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8g8_sscaled_unpack_rgba_8unorm, - &util_format_r8g8_sscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8g8_sscaled_unpack_rgba_float, - &util_format_r8g8_sscaled_pack_rgba_float, - &util_format_r8g8_sscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8b8_sscaled_description = { - PIPE_FORMAT_R8G8B8_SSCALED, - "PIPE_FORMAT_R8G8B8_SSCALED", - "r8g8b8_sscaled", - {1, 1, 24}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8g8b8_sscaled_unpack_rgba_8unorm, - &util_format_r8g8b8_sscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8g8b8_sscaled_unpack_rgba_float, - &util_format_r8g8b8_sscaled_pack_rgba_float, - &util_format_r8g8b8_sscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8b8a8_sscaled_description = { - PIPE_FORMAT_R8G8B8A8_SSCALED, - "PIPE_FORMAT_R8G8B8A8_SSCALED", - "r8g8b8a8_sscaled", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8}, /* z = b */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 8} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8g8b8a8_sscaled_unpack_rgba_8unorm, - &util_format_r8g8b8a8_sscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8g8b8a8_sscaled_unpack_rgba_float, - &util_format_r8g8b8a8_sscaled_pack_rgba_float, - &util_format_r8g8b8a8_sscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32_fixed_description = { - PIPE_FORMAT_R32_FIXED, - "PIPE_FORMAT_R32_FIXED", - "r32_fixed", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32_fixed_unpack_rgba_8unorm, - &util_format_r32_fixed_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32_fixed_unpack_rgba_float, - &util_format_r32_fixed_pack_rgba_float, - &util_format_r32_fixed_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32_fixed_description = { - PIPE_FORMAT_R32G32_FIXED, - "PIPE_FORMAT_R32G32_FIXED", - "r32g32_fixed", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32g32_fixed_unpack_rgba_8unorm, - &util_format_r32g32_fixed_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32g32_fixed_unpack_rgba_float, - &util_format_r32g32_fixed_pack_rgba_float, - &util_format_r32g32_fixed_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32b32_fixed_description = { - PIPE_FORMAT_R32G32B32_FIXED, - "PIPE_FORMAT_R32G32B32_FIXED", - "r32g32b32_fixed", - {1, 1, 96}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32}, /* y = g */ - {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32g32b32_fixed_unpack_rgba_8unorm, - &util_format_r32g32b32_fixed_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32g32b32_fixed_unpack_rgba_float, - &util_format_r32g32b32_fixed_pack_rgba_float, - &util_format_r32g32b32_fixed_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32b32a32_fixed_description = { - PIPE_FORMAT_R32G32B32A32_FIXED, - "PIPE_FORMAT_R32G32B32A32_FIXED", - "r32g32b32a32_fixed", - {1, 1, 128}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32}, /* y = g */ - {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32}, /* z = b */ - {UTIL_FORMAT_TYPE_FIXED, FALSE, FALSE, 32} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r32g32b32a32_fixed_unpack_rgba_8unorm, - &util_format_r32g32b32a32_fixed_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r32g32b32a32_fixed_unpack_rgba_float, - &util_format_r32g32b32a32_fixed_pack_rgba_float, - &util_format_r32g32b32a32_fixed_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r10g10b10x2_uscaled_description = { - PIPE_FORMAT_R10G10B10X2_USCALED, - "PIPE_FORMAT_R10G10B10X2_USCALED", - "r10g10b10x2_uscaled", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10}, /* z = b */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 2} /* w = x */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r10g10b10x2_uscaled_unpack_rgba_8unorm, - &util_format_r10g10b10x2_uscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r10g10b10x2_uscaled_unpack_rgba_float, - &util_format_r10g10b10x2_uscaled_pack_rgba_float, - &util_format_r10g10b10x2_uscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r10g10b10x2_snorm_description = { - PIPE_FORMAT_R10G10B10X2_SNORM, - "PIPE_FORMAT_R10G10B10X2_SNORM", - "r10g10b10x2_snorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10}, /* z = b */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 2} /* w = x */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r10g10b10x2_snorm_unpack_rgba_8unorm, - &util_format_r10g10b10x2_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r10g10b10x2_snorm_unpack_rgba_float, - &util_format_r10g10b10x2_snorm_pack_rgba_float, - &util_format_r10g10b10x2_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_yv12_description = { - PIPE_FORMAT_YV12, - "PIPE_FORMAT_YV12", - "yv12", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_OTHER, - 4, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* x = x */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* y = y */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* z = z */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8} /* w = w */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* y */ - UTIL_FORMAT_SWIZZLE_Y, /* u */ - UTIL_FORMAT_SWIZZLE_Z, /* v */ - UTIL_FORMAT_SWIZZLE_W /* ignored */ - }, - UTIL_FORMAT_COLORSPACE_YUV, - &util_format_yv12_unpack_rgba_8unorm, - &util_format_yv12_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_yv12_unpack_rgba_float, - &util_format_yv12_pack_rgba_float, - &util_format_yv12_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_yv16_description = { - PIPE_FORMAT_YV16, - "PIPE_FORMAT_YV16", - "yv16", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_OTHER, - 4, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* x = x */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* y = y */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* z = z */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8} /* w = w */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* y */ - UTIL_FORMAT_SWIZZLE_Y, /* u */ - UTIL_FORMAT_SWIZZLE_Z, /* v */ - UTIL_FORMAT_SWIZZLE_W /* ignored */ - }, - UTIL_FORMAT_COLORSPACE_YUV, - &util_format_yv16_unpack_rgba_8unorm, - &util_format_yv16_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_yv16_unpack_rgba_float, - &util_format_yv16_pack_rgba_float, - &util_format_yv16_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_iyuv_description = { - PIPE_FORMAT_IYUV, - "PIPE_FORMAT_IYUV", - "iyuv", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_OTHER, - 4, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* x = x */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* y = y */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* z = z */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8} /* w = w */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* y */ - UTIL_FORMAT_SWIZZLE_Y, /* u */ - UTIL_FORMAT_SWIZZLE_Z, /* v */ - UTIL_FORMAT_SWIZZLE_W /* ignored */ - }, - UTIL_FORMAT_COLORSPACE_YUV, - &util_format_iyuv_unpack_rgba_8unorm, - &util_format_iyuv_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_iyuv_unpack_rgba_float, - &util_format_iyuv_pack_rgba_float, - &util_format_iyuv_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_nv12_description = { - PIPE_FORMAT_NV12, - "PIPE_FORMAT_NV12", - "nv12", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_OTHER, - 4, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* x = x */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* y = y */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* z = z */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8} /* w = w */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* y */ - UTIL_FORMAT_SWIZZLE_Y, /* u */ - UTIL_FORMAT_SWIZZLE_Z, /* v */ - UTIL_FORMAT_SWIZZLE_W /* ignored */ - }, - UTIL_FORMAT_COLORSPACE_YUV, - &util_format_nv12_unpack_rgba_8unorm, - &util_format_nv12_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_nv12_unpack_rgba_float, - &util_format_nv12_pack_rgba_float, - &util_format_nv12_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_nv21_description = { - PIPE_FORMAT_NV21, - "PIPE_FORMAT_NV21", - "nv21", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_OTHER, - 4, /* nr_channels */ - FALSE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* x = x */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* y = y */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8}, /* z = z */ - {UTIL_FORMAT_TYPE_VOID, FALSE, FALSE, 8} /* w = w */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* y */ - UTIL_FORMAT_SWIZZLE_Y, /* u */ - UTIL_FORMAT_SWIZZLE_Z, /* v */ - UTIL_FORMAT_SWIZZLE_W /* ignored */ - }, - UTIL_FORMAT_COLORSPACE_YUV, - &util_format_nv21_unpack_rgba_8unorm, - &util_format_nv21_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_nv21_unpack_rgba_float, - &util_format_nv21_pack_rgba_float, - &util_format_nv21_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r4a4_unorm_description = { - PIPE_FORMAT_R4A4_UNORM, - "PIPE_FORMAT_R4A4_UNORM", - "r4a4_unorm", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4}, /* x = a */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4}, /* y = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_Y, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r4a4_unorm_unpack_rgba_8unorm, - &util_format_r4a4_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r4a4_unorm_unpack_rgba_float, - &util_format_r4a4_unorm_pack_rgba_float, - &util_format_r4a4_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_a4r4_unorm_description = { - PIPE_FORMAT_A4R4_UNORM, - "PIPE_FORMAT_A4R4_UNORM", - "a4r4_unorm", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 4}, /* y = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_Y /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_a4r4_unorm_unpack_rgba_8unorm, - &util_format_a4r4_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_a4r4_unorm_unpack_rgba_float, - &util_format_a4r4_unorm_pack_rgba_float, - &util_format_a4r4_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8a8_unorm_description = { - PIPE_FORMAT_R8A8_UNORM, - "PIPE_FORMAT_R8A8_UNORM", - "r8a8_unorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_Y /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r8a8_unorm_unpack_rgba_8unorm, - &util_format_r8a8_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r8a8_unorm_unpack_rgba_float, - &util_format_r8a8_unorm_pack_rgba_float, - &util_format_r8a8_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_a8r8_unorm_description = { - PIPE_FORMAT_A8R8_UNORM, - "PIPE_FORMAT_A8R8_UNORM", - "a8r8_unorm", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* x = a */ - {UTIL_FORMAT_TYPE_UNSIGNED, TRUE, FALSE, 8}, /* y = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_Y, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_a8r8_unorm_unpack_rgba_8unorm, - &util_format_a8r8_unorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_a8r8_unorm_unpack_rgba_float, - &util_format_a8r8_unorm_pack_rgba_float, - &util_format_a8r8_unorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r10g10b10a2_uscaled_description = { - PIPE_FORMAT_R10G10B10A2_USCALED, - "PIPE_FORMAT_R10G10B10A2_USCALED", - "r10g10b10a2_uscaled", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10}, /* z = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 2} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r10g10b10a2_uscaled_unpack_rgba_8unorm, - &util_format_r10g10b10a2_uscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r10g10b10a2_uscaled_unpack_rgba_float, - &util_format_r10g10b10a2_uscaled_pack_rgba_float, - &util_format_r10g10b10a2_uscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r10g10b10a2_sscaled_description = { - PIPE_FORMAT_R10G10B10A2_SSCALED, - "PIPE_FORMAT_R10G10B10A2_SSCALED", - "r10g10b10a2_sscaled", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10}, /* z = b */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 2} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r10g10b10a2_sscaled_unpack_rgba_8unorm, - &util_format_r10g10b10a2_sscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r10g10b10a2_sscaled_unpack_rgba_float, - &util_format_r10g10b10a2_sscaled_pack_rgba_float, - &util_format_r10g10b10a2_sscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r10g10b10a2_snorm_description = { - PIPE_FORMAT_R10G10B10A2_SNORM, - "PIPE_FORMAT_R10G10B10A2_SNORM", - "r10g10b10a2_snorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10}, /* z = b */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 2} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_r10g10b10a2_snorm_unpack_rgba_8unorm, - &util_format_r10g10b10a2_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_r10g10b10a2_snorm_unpack_rgba_float, - &util_format_r10g10b10a2_snorm_pack_rgba_float, - &util_format_r10g10b10a2_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_b10g10r10a2_uscaled_description = { - PIPE_FORMAT_B10G10R10A2_USCALED, - "PIPE_FORMAT_B10G10R10A2_USCALED", - "b10g10r10a2_uscaled", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10}, /* x = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 10}, /* z = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, FALSE, 2} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_Z, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_b10g10r10a2_uscaled_unpack_rgba_8unorm, - &util_format_b10g10r10a2_uscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_b10g10r10a2_uscaled_unpack_rgba_float, - &util_format_b10g10r10a2_uscaled_pack_rgba_float, - &util_format_b10g10r10a2_uscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_b10g10r10a2_sscaled_description = { - PIPE_FORMAT_B10G10R10A2_SSCALED, - "PIPE_FORMAT_B10G10R10A2_SSCALED", - "b10g10r10a2_sscaled", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10}, /* x = b */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 10}, /* z = r */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, FALSE, 2} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_Z, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_b10g10r10a2_sscaled_unpack_rgba_8unorm, - &util_format_b10g10r10a2_sscaled_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_b10g10r10a2_sscaled_unpack_rgba_float, - &util_format_b10g10r10a2_sscaled_pack_rgba_float, - &util_format_b10g10r10a2_sscaled_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_b10g10r10a2_snorm_description = { - PIPE_FORMAT_B10G10R10A2_SNORM, - "PIPE_FORMAT_B10G10R10A2_SNORM", - "b10g10r10a2_snorm", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10}, /* x = b */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 10}, /* z = r */ - {UTIL_FORMAT_TYPE_SIGNED, TRUE, FALSE, 2} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_Z, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - &util_format_b10g10r10a2_snorm_unpack_rgba_8unorm, - &util_format_b10g10r10a2_snorm_pack_rgba_8unorm, - NULL, /* fetch_rgba_8unorm */ - &util_format_b10g10r10a2_snorm_unpack_rgba_float, - &util_format_b10g10r10a2_snorm_pack_rgba_float, - &util_format_b10g10r10a2_snorm_fetch_rgba_float, - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - NULL, /* unpack_rgba_uint */ - NULL, /* pack_rgba_uint */ - NULL, /* unpack_rgba_sint */ - NULL, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8_uint_description = { - PIPE_FORMAT_R8_UINT, - "PIPE_FORMAT_R8_UINT", - "r8_uint", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r8_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r8_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r8_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r8_uint_pack_signed, /* pack_rgba_sint */ - &util_format_r8_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8_uint_description = { - PIPE_FORMAT_R8G8_UINT, - "PIPE_FORMAT_R8G8_UINT", - "r8g8_uint", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r8g8_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r8g8_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r8g8_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r8g8_uint_pack_signed, /* pack_rgba_sint */ - &util_format_r8g8_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8b8_uint_description = { - PIPE_FORMAT_R8G8B8_UINT, - "PIPE_FORMAT_R8G8B8_UINT", - "r8g8b8_uint", - {1, 1, 24}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r8g8b8_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r8g8b8_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r8g8b8_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r8g8b8_uint_pack_signed, /* pack_rgba_sint */ - &util_format_r8g8b8_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8b8a8_uint_description = { - PIPE_FORMAT_R8G8B8A8_UINT, - "PIPE_FORMAT_R8G8B8A8_UINT", - "r8g8b8a8_uint", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* z = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r8g8b8a8_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r8g8b8a8_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r8g8b8a8_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r8g8b8a8_uint_pack_signed, /* pack_rgba_sint */ - &util_format_r8g8b8a8_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8_sint_description = { - PIPE_FORMAT_R8_SINT, - "PIPE_FORMAT_R8_SINT", - "r8_sint", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r8_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r8_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r8_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r8_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_r8_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8_sint_description = { - PIPE_FORMAT_R8G8_SINT, - "PIPE_FORMAT_R8G8_SINT", - "r8g8_sint", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r8g8_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r8g8_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r8g8_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r8g8_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_r8g8_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8b8_sint_description = { - PIPE_FORMAT_R8G8B8_SINT, - "PIPE_FORMAT_R8G8B8_SINT", - "r8g8b8_sint", - {1, 1, 24}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r8g8b8_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r8g8b8_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r8g8b8_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r8g8b8_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_r8g8b8_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r8g8b8a8_sint_description = { - PIPE_FORMAT_R8G8B8A8_SINT, - "PIPE_FORMAT_R8G8B8A8_SINT", - "r8g8b8a8_sint", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8}, /* z = b */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r8g8b8a8_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r8g8b8a8_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r8g8b8a8_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r8g8b8a8_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_r8g8b8a8_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16_uint_description = { - PIPE_FORMAT_R16_UINT, - "PIPE_FORMAT_R16_UINT", - "r16_uint", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r16_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r16_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r16_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r16_uint_pack_signed, /* pack_rgba_sint */ - &util_format_r16_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16_uint_description = { - PIPE_FORMAT_R16G16_UINT, - "PIPE_FORMAT_R16G16_UINT", - "r16g16_uint", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r16g16_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r16g16_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r16g16_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r16g16_uint_pack_signed, /* pack_rgba_sint */ - &util_format_r16g16_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16b16_uint_description = { - PIPE_FORMAT_R16G16B16_UINT, - "PIPE_FORMAT_R16G16B16_UINT", - "r16g16b16_uint", - {1, 1, 48}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r16g16b16_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r16g16b16_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r16g16b16_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r16g16b16_uint_pack_signed, /* pack_rgba_sint */ - &util_format_r16g16b16_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16b16a16_uint_description = { - PIPE_FORMAT_R16G16B16A16_UINT, - "PIPE_FORMAT_R16G16B16A16_UINT", - "r16g16b16a16_uint", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16}, /* z = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r16g16b16a16_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r16g16b16a16_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r16g16b16a16_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r16g16b16a16_uint_pack_signed, /* pack_rgba_sint */ - &util_format_r16g16b16a16_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16_sint_description = { - PIPE_FORMAT_R16_SINT, - "PIPE_FORMAT_R16_SINT", - "r16_sint", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r16_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r16_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r16_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r16_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_r16_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16_sint_description = { - PIPE_FORMAT_R16G16_SINT, - "PIPE_FORMAT_R16G16_SINT", - "r16g16_sint", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r16g16_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r16g16_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r16g16_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r16g16_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_r16g16_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16b16_sint_description = { - PIPE_FORMAT_R16G16B16_SINT, - "PIPE_FORMAT_R16G16B16_SINT", - "r16g16b16_sint", - {1, 1, 48}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r16g16b16_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r16g16b16_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r16g16b16_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r16g16b16_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_r16g16b16_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r16g16b16a16_sint_description = { - PIPE_FORMAT_R16G16B16A16_SINT, - "PIPE_FORMAT_R16G16B16A16_SINT", - "r16g16b16a16_sint", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16}, /* z = b */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r16g16b16a16_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r16g16b16a16_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r16g16b16a16_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r16g16b16a16_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_r16g16b16a16_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32_uint_description = { - PIPE_FORMAT_R32_UINT, - "PIPE_FORMAT_R32_UINT", - "r32_uint", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r32_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r32_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r32_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r32_uint_pack_signed, /* pack_rgba_sint */ - &util_format_r32_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32_uint_description = { - PIPE_FORMAT_R32G32_UINT, - "PIPE_FORMAT_R32G32_UINT", - "r32g32_uint", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r32g32_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r32g32_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r32g32_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r32g32_uint_pack_signed, /* pack_rgba_sint */ - &util_format_r32g32_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32b32_uint_description = { - PIPE_FORMAT_R32G32B32_UINT, - "PIPE_FORMAT_R32G32B32_UINT", - "r32g32b32_uint", - {1, 1, 96}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r32g32b32_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r32g32b32_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r32g32b32_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r32g32b32_uint_pack_signed, /* pack_rgba_sint */ - &util_format_r32g32b32_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32b32a32_uint_description = { - PIPE_FORMAT_R32G32B32A32_UINT, - "PIPE_FORMAT_R32G32B32A32_UINT", - "r32g32b32a32_uint", - {1, 1, 128}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32}, /* z = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r32g32b32a32_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r32g32b32a32_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r32g32b32a32_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r32g32b32a32_uint_pack_signed, /* pack_rgba_sint */ - &util_format_r32g32b32a32_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32_sint_description = { - PIPE_FORMAT_R32_SINT, - "PIPE_FORMAT_R32_SINT", - "r32_sint", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32}, /* x = r */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r32_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r32_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r32_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r32_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_r32_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32_sint_description = { - PIPE_FORMAT_R32G32_SINT, - "PIPE_FORMAT_R32G32_SINT", - "r32g32_sint", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32}, /* y = g */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r32g32_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r32g32_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r32g32_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r32g32_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_r32g32_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32b32_sint_description = { - PIPE_FORMAT_R32G32B32_SINT, - "PIPE_FORMAT_R32G32B32_SINT", - "r32g32b32_sint", - {1, 1, 96}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 3, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32}, /* z = b */ - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r32g32b32_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r32g32b32_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r32g32b32_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r32g32b32_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_r32g32b32_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_r32g32b32a32_sint_description = { - PIPE_FORMAT_R32G32B32A32_SINT, - "PIPE_FORMAT_R32G32B32A32_SINT", - "r32g32b32a32_sint", - {1, 1, 128}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32}, /* x = r */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32}, /* y = g */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32}, /* z = b */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_Z, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_r32g32b32a32_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_r32g32b32a32_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_r32g32b32a32_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_r32g32b32a32_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_r32g32b32a32_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_a8_uint_description = { - PIPE_FORMAT_A8_UINT, - "PIPE_FORMAT_A8_UINT", - "a8_uint", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* x = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_0, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_a8_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_a8_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_a8_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_a8_uint_pack_signed, /* pack_rgba_sint */ - &util_format_a8_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_i8_uint_description = { - PIPE_FORMAT_I8_UINT, - "PIPE_FORMAT_I8_UINT", - "i8_uint", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* x = rgba */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_i8_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_i8_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_i8_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_i8_uint_pack_signed, /* pack_rgba_sint */ - &util_format_i8_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l8_uint_description = { - PIPE_FORMAT_L8_UINT, - "PIPE_FORMAT_L8_UINT", - "l8_uint", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* x = rgb */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_l8_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_l8_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_l8_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_l8_uint_pack_signed, /* pack_rgba_sint */ - &util_format_l8_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l8a8_uint_description = { - PIPE_FORMAT_L8A8_UINT, - "PIPE_FORMAT_L8A8_UINT", - "l8a8_uint", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* x = rgb */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 8}, /* y = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_Y /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_l8a8_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_l8a8_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_l8a8_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_l8a8_uint_pack_signed, /* pack_rgba_sint */ - &util_format_l8a8_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_a8_sint_description = { - PIPE_FORMAT_A8_SINT, - "PIPE_FORMAT_A8_SINT", - "a8_sint", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8}, /* x = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_0, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_a8_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_a8_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_a8_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_a8_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_a8_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_i8_sint_description = { - PIPE_FORMAT_I8_SINT, - "PIPE_FORMAT_I8_SINT", - "i8_sint", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8}, /* x = rgba */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_i8_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_i8_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_i8_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_i8_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_i8_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l8_sint_description = { - PIPE_FORMAT_L8_SINT, - "PIPE_FORMAT_L8_SINT", - "l8_sint", - {1, 1, 8}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8}, /* x = rgb */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_l8_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_l8_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_l8_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_l8_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_l8_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l8a8_sint_description = { - PIPE_FORMAT_L8A8_SINT, - "PIPE_FORMAT_L8A8_SINT", - "l8a8_sint", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8}, /* x = rgb */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 8}, /* y = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_Y /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_l8a8_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_l8a8_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_l8a8_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_l8a8_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_l8a8_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_a16_uint_description = { - PIPE_FORMAT_A16_UINT, - "PIPE_FORMAT_A16_UINT", - "a16_uint", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16}, /* x = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_0, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_a16_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_a16_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_a16_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_a16_uint_pack_signed, /* pack_rgba_sint */ - &util_format_a16_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_i16_uint_description = { - PIPE_FORMAT_I16_UINT, - "PIPE_FORMAT_I16_UINT", - "i16_uint", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16}, /* x = rgba */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_i16_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_i16_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_i16_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_i16_uint_pack_signed, /* pack_rgba_sint */ - &util_format_i16_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l16_uint_description = { - PIPE_FORMAT_L16_UINT, - "PIPE_FORMAT_L16_UINT", - "l16_uint", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16}, /* x = rgb */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_l16_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_l16_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_l16_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_l16_uint_pack_signed, /* pack_rgba_sint */ - &util_format_l16_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l16a16_uint_description = { - PIPE_FORMAT_L16A16_UINT, - "PIPE_FORMAT_L16A16_UINT", - "l16a16_uint", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16}, /* x = rgb */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 16}, /* y = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_Y /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_l16a16_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_l16a16_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_l16a16_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_l16a16_uint_pack_signed, /* pack_rgba_sint */ - &util_format_l16a16_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_a16_sint_description = { - PIPE_FORMAT_A16_SINT, - "PIPE_FORMAT_A16_SINT", - "a16_sint", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16}, /* x = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_0, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_a16_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_a16_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_a16_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_a16_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_a16_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_i16_sint_description = { - PIPE_FORMAT_I16_SINT, - "PIPE_FORMAT_I16_SINT", - "i16_sint", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16}, /* x = rgba */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_i16_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_i16_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_i16_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_i16_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_i16_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l16_sint_description = { - PIPE_FORMAT_L16_SINT, - "PIPE_FORMAT_L16_SINT", - "l16_sint", - {1, 1, 16}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16}, /* x = rgb */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_l16_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_l16_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_l16_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_l16_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_l16_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l16a16_sint_description = { - PIPE_FORMAT_L16A16_SINT, - "PIPE_FORMAT_L16A16_SINT", - "l16a16_sint", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16}, /* x = rgb */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 16}, /* y = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_Y /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_l16a16_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_l16a16_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_l16a16_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_l16a16_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_l16a16_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_a32_uint_description = { - PIPE_FORMAT_A32_UINT, - "PIPE_FORMAT_A32_UINT", - "a32_uint", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32}, /* x = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_0, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_a32_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_a32_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_a32_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_a32_uint_pack_signed, /* pack_rgba_sint */ - &util_format_a32_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_i32_uint_description = { - PIPE_FORMAT_I32_UINT, - "PIPE_FORMAT_I32_UINT", - "i32_uint", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32}, /* x = rgba */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_i32_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_i32_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_i32_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_i32_uint_pack_signed, /* pack_rgba_sint */ - &util_format_i32_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l32_uint_description = { - PIPE_FORMAT_L32_UINT, - "PIPE_FORMAT_L32_UINT", - "l32_uint", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32}, /* x = rgb */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_l32_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_l32_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_l32_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_l32_uint_pack_signed, /* pack_rgba_sint */ - &util_format_l32_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l32a32_uint_description = { - PIPE_FORMAT_L32A32_UINT, - "PIPE_FORMAT_L32A32_UINT", - "l32a32_uint", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32}, /* x = rgb */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 32}, /* y = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_Y /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_l32a32_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_l32a32_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_l32a32_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_l32a32_uint_pack_signed, /* pack_rgba_sint */ - &util_format_l32a32_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_a32_sint_description = { - PIPE_FORMAT_A32_SINT, - "PIPE_FORMAT_A32_SINT", - "a32_sint", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32}, /* x = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_0, /* r */ - UTIL_FORMAT_SWIZZLE_0, /* g */ - UTIL_FORMAT_SWIZZLE_0, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_a32_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_a32_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_a32_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_a32_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_a32_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_i32_sint_description = { - PIPE_FORMAT_I32_SINT, - "PIPE_FORMAT_I32_SINT", - "i32_sint", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32}, /* x = rgba */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_X /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_i32_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_i32_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_i32_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_i32_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_i32_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l32_sint_description = { - PIPE_FORMAT_L32_SINT, - "PIPE_FORMAT_L32_SINT", - "l32_sint", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 1, /* nr_channels */ - TRUE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32}, /* x = rgb */ - {0, 0, 0, 0}, - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_1 /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_l32_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_l32_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_l32_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_l32_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_l32_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_l32a32_sint_description = { - PIPE_FORMAT_L32A32_SINT, - "PIPE_FORMAT_L32A32_SINT", - "l32a32_sint", - {1, 1, 64}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 2, /* nr_channels */ - TRUE, /* is_array */ - FALSE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32}, /* x = rgb */ - {UTIL_FORMAT_TYPE_SIGNED, FALSE, TRUE, 32}, /* y = a */ - {0, 0, 0, 0}, - {0, 0, 0, 0} - }, - { - UTIL_FORMAT_SWIZZLE_X, /* r */ - UTIL_FORMAT_SWIZZLE_X, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_Y /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_l32a32_sint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_l32a32_sint_pack_unsigned, /* pack_rgba_uint */ - &util_format_l32a32_sint_unpack_signed, /* unpack_rgba_sint */ - &util_format_l32a32_sint_pack_signed, /* pack_rgba_sint */ - NULL, /* fetch_rgba_uint */ - &util_format_l32a32_sint_fetch_signed /* fetch_rgba_sint */ -}; - -const struct util_format_description -util_format_b10g10r10a2_uint_description = { - PIPE_FORMAT_B10G10R10A2_UINT, - "PIPE_FORMAT_B10G10R10A2_UINT", - "b10g10r10a2_uint", - {1, 1, 32}, /* block */ - UTIL_FORMAT_LAYOUT_PLAIN, - 4, /* nr_channels */ - FALSE, /* is_array */ - TRUE, /* is_bitmask */ - FALSE, /* is_mixed */ - { - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10}, /* x = b */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10}, /* y = g */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 10}, /* z = r */ - {UTIL_FORMAT_TYPE_UNSIGNED, FALSE, TRUE, 2} /* w = a */ - }, - { - UTIL_FORMAT_SWIZZLE_Z, /* r */ - UTIL_FORMAT_SWIZZLE_Y, /* g */ - UTIL_FORMAT_SWIZZLE_X, /* b */ - UTIL_FORMAT_SWIZZLE_W /* a */ - }, - UTIL_FORMAT_COLORSPACE_RGB, - NULL, /* unpack_rgba_8unorm */ - NULL, /* pack_rgba_8unorm */ - NULL, /* fetch_rgba_8unorm */ - NULL, /* unpack_rgba_float */ - NULL, /* pack_rgba_float */ - NULL, /* fetch_rgba_float */ - NULL, /* unpack_z_32unorm */ - NULL, /* pack_z_32unorm */ - NULL, /* unpack_z_float */ - NULL, /* pack_z_float */ - NULL, /* unpack_s_8uint */ - NULL, /* pack_s_8uint */ - &util_format_b10g10r10a2_uint_unpack_unsigned, /* unpack_rgba_uint */ - &util_format_b10g10r10a2_uint_pack_unsigned, /* pack_rgba_uint */ - &util_format_b10g10r10a2_uint_unpack_signed, /* unpack_rgba_sint */ - &util_format_b10g10r10a2_uint_pack_signed, /* pack_rgba_sint */ - &util_format_b10g10r10a2_uint_fetch_unsigned, /* fetch_rgba_uint */ - NULL /* fetch_rgba_sint */ -}; - -const struct util_format_description * -util_format_description(enum pipe_format format) -{ - if (format >= PIPE_FORMAT_COUNT) { - return NULL; - } - - switch (format) { - case PIPE_FORMAT_NONE: - return &util_format_none_description; - case PIPE_FORMAT_B8G8R8A8_UNORM: - return &util_format_b8g8r8a8_unorm_description; - case PIPE_FORMAT_B8G8R8X8_UNORM: - return &util_format_b8g8r8x8_unorm_description; - case PIPE_FORMAT_A8R8G8B8_UNORM: - return &util_format_a8r8g8b8_unorm_description; - case PIPE_FORMAT_X8R8G8B8_UNORM: - return &util_format_x8r8g8b8_unorm_description; - case PIPE_FORMAT_A8B8G8R8_UNORM: - return &util_format_a8b8g8r8_unorm_description; - case PIPE_FORMAT_X8B8G8R8_UNORM: - return &util_format_x8b8g8r8_unorm_description; - case PIPE_FORMAT_R8G8B8X8_UNORM: - return &util_format_r8g8b8x8_unorm_description; - case PIPE_FORMAT_B5G5R5X1_UNORM: - return &util_format_b5g5r5x1_unorm_description; - case PIPE_FORMAT_B5G5R5A1_UNORM: - return &util_format_b5g5r5a1_unorm_description; - case PIPE_FORMAT_B4G4R4A4_UNORM: - return &util_format_b4g4r4a4_unorm_description; - case PIPE_FORMAT_B4G4R4X4_UNORM: - return &util_format_b4g4r4x4_unorm_description; - case PIPE_FORMAT_B5G6R5_UNORM: - return &util_format_b5g6r5_unorm_description; - case PIPE_FORMAT_R10G10B10A2_UNORM: - return &util_format_r10g10b10a2_unorm_description; - case PIPE_FORMAT_B10G10R10A2_UNORM: - return &util_format_b10g10r10a2_unorm_description; - case PIPE_FORMAT_B2G3R3_UNORM: - return &util_format_b2g3r3_unorm_description; - case PIPE_FORMAT_L8_UNORM: - return &util_format_l8_unorm_description; - case PIPE_FORMAT_A8_UNORM: - return &util_format_a8_unorm_description; - case PIPE_FORMAT_I8_UNORM: - return &util_format_i8_unorm_description; - case PIPE_FORMAT_L4A4_UNORM: - return &util_format_l4a4_unorm_description; - case PIPE_FORMAT_L8A8_UNORM: - return &util_format_l8a8_unorm_description; - case PIPE_FORMAT_L16_UNORM: - return &util_format_l16_unorm_description; - case PIPE_FORMAT_A16_UNORM: - return &util_format_a16_unorm_description; - case PIPE_FORMAT_I16_UNORM: - return &util_format_i16_unorm_description; - case PIPE_FORMAT_L16A16_UNORM: - return &util_format_l16a16_unorm_description; - case PIPE_FORMAT_A8_SNORM: - return &util_format_a8_snorm_description; - case PIPE_FORMAT_L8_SNORM: - return &util_format_l8_snorm_description; - case PIPE_FORMAT_L8A8_SNORM: - return &util_format_l8a8_snorm_description; - case PIPE_FORMAT_I8_SNORM: - return &util_format_i8_snorm_description; - case PIPE_FORMAT_A16_SNORM: - return &util_format_a16_snorm_description; - case PIPE_FORMAT_L16_SNORM: - return &util_format_l16_snorm_description; - case PIPE_FORMAT_L16A16_SNORM: - return &util_format_l16a16_snorm_description; - case PIPE_FORMAT_I16_SNORM: - return &util_format_i16_snorm_description; - case PIPE_FORMAT_A16_FLOAT: - return &util_format_a16_float_description; - case PIPE_FORMAT_L16_FLOAT: - return &util_format_l16_float_description; - case PIPE_FORMAT_L16A16_FLOAT: - return &util_format_l16a16_float_description; - case PIPE_FORMAT_I16_FLOAT: - return &util_format_i16_float_description; - case PIPE_FORMAT_A32_FLOAT: - return &util_format_a32_float_description; - case PIPE_FORMAT_L32_FLOAT: - return &util_format_l32_float_description; - case PIPE_FORMAT_L32A32_FLOAT: - return &util_format_l32a32_float_description; - case PIPE_FORMAT_I32_FLOAT: - return &util_format_i32_float_description; - case PIPE_FORMAT_L8_SRGB: - return &util_format_l8_srgb_description; - case PIPE_FORMAT_L8A8_SRGB: - return &util_format_l8a8_srgb_description; - case PIPE_FORMAT_R8G8B8_SRGB: - return &util_format_r8g8b8_srgb_description; - case PIPE_FORMAT_R8G8B8A8_SRGB: - return &util_format_r8g8b8a8_srgb_description; - case PIPE_FORMAT_A8B8G8R8_SRGB: - return &util_format_a8b8g8r8_srgb_description; - case PIPE_FORMAT_X8B8G8R8_SRGB: - return &util_format_x8b8g8r8_srgb_description; - case PIPE_FORMAT_B8G8R8A8_SRGB: - return &util_format_b8g8r8a8_srgb_description; - case PIPE_FORMAT_B8G8R8X8_SRGB: - return &util_format_b8g8r8x8_srgb_description; - case PIPE_FORMAT_A8R8G8B8_SRGB: - return &util_format_a8r8g8b8_srgb_description; - case PIPE_FORMAT_X8R8G8B8_SRGB: - return &util_format_x8r8g8b8_srgb_description; - case PIPE_FORMAT_R8SG8SB8UX8U_NORM: - return &util_format_r8sg8sb8ux8u_norm_description; - case PIPE_FORMAT_R10SG10SB10SA2U_NORM: - return &util_format_r10sg10sb10sa2u_norm_description; - case PIPE_FORMAT_R5SG5SB6U_NORM: - return &util_format_r5sg5sb6u_norm_description; - case PIPE_FORMAT_S8_UINT: - return &util_format_s8_uint_description; - case PIPE_FORMAT_Z16_UNORM: - return &util_format_z16_unorm_description; - case PIPE_FORMAT_Z32_UNORM: - return &util_format_z32_unorm_description; - case PIPE_FORMAT_Z32_FLOAT: - return &util_format_z32_float_description; - case PIPE_FORMAT_Z24_UNORM_S8_UINT: - return &util_format_z24_unorm_s8_uint_description; - case PIPE_FORMAT_S8_UINT_Z24_UNORM: - return &util_format_s8_uint_z24_unorm_description; - case PIPE_FORMAT_X24S8_UINT: - return &util_format_x24s8_uint_description; - case PIPE_FORMAT_S8X24_UINT: - return &util_format_s8x24_uint_description; - case PIPE_FORMAT_Z24X8_UNORM: - return &util_format_z24x8_unorm_description; - case PIPE_FORMAT_X8Z24_UNORM: - return &util_format_x8z24_unorm_description; - case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT: - return &util_format_z32_float_s8x24_uint_description; - case PIPE_FORMAT_X32_S8X24_UINT: - return &util_format_x32_s8x24_uint_description; - case PIPE_FORMAT_UYVY: - return &util_format_uyvy_description; - case PIPE_FORMAT_YUYV: - return &util_format_yuyv_description; - case PIPE_FORMAT_R8G8_B8G8_UNORM: - return &util_format_r8g8_b8g8_unorm_description; - case PIPE_FORMAT_G8R8_G8B8_UNORM: - return &util_format_g8r8_g8b8_unorm_description; - case PIPE_FORMAT_R11G11B10_FLOAT: - return &util_format_r11g11b10_float_description; - case PIPE_FORMAT_R9G9B9E5_FLOAT: - return &util_format_r9g9b9e5_float_description; - case PIPE_FORMAT_R1_UNORM: - return &util_format_r1_unorm_description; - case PIPE_FORMAT_R8G8Bx_SNORM: - return &util_format_r8g8bx_snorm_description; - case PIPE_FORMAT_DXT1_RGB: - return &util_format_dxt1_rgb_description; - case PIPE_FORMAT_DXT1_RGBA: - return &util_format_dxt1_rgba_description; - case PIPE_FORMAT_DXT3_RGBA: - return &util_format_dxt3_rgba_description; - case PIPE_FORMAT_DXT5_RGBA: - return &util_format_dxt5_rgba_description; - case PIPE_FORMAT_DXT1_SRGB: - return &util_format_dxt1_srgb_description; - case PIPE_FORMAT_DXT1_SRGBA: - return &util_format_dxt1_srgba_description; - case PIPE_FORMAT_DXT3_SRGBA: - return &util_format_dxt3_srgba_description; - case PIPE_FORMAT_DXT5_SRGBA: - return &util_format_dxt5_srgba_description; - case PIPE_FORMAT_RGTC1_UNORM: - return &util_format_rgtc1_unorm_description; - case PIPE_FORMAT_RGTC1_SNORM: - return &util_format_rgtc1_snorm_description; - case PIPE_FORMAT_RGTC2_UNORM: - return &util_format_rgtc2_unorm_description; - case PIPE_FORMAT_RGTC2_SNORM: - return &util_format_rgtc2_snorm_description; - case PIPE_FORMAT_LATC1_UNORM: - return &util_format_latc1_unorm_description; - case PIPE_FORMAT_LATC1_SNORM: - return &util_format_latc1_snorm_description; - case PIPE_FORMAT_LATC2_UNORM: - return &util_format_latc2_unorm_description; - case PIPE_FORMAT_LATC2_SNORM: - return &util_format_latc2_snorm_description; - case PIPE_FORMAT_ETC1_RGB8: - return &util_format_etc1_rgb8_description; - case PIPE_FORMAT_R64_FLOAT: - return &util_format_r64_float_description; - case PIPE_FORMAT_R64G64_FLOAT: - return &util_format_r64g64_float_description; - case PIPE_FORMAT_R64G64B64_FLOAT: - return &util_format_r64g64b64_float_description; - case PIPE_FORMAT_R64G64B64A64_FLOAT: - return &util_format_r64g64b64a64_float_description; - case PIPE_FORMAT_R32_FLOAT: - return &util_format_r32_float_description; - case PIPE_FORMAT_R32G32_FLOAT: - return &util_format_r32g32_float_description; - case PIPE_FORMAT_R32G32B32_FLOAT: - return &util_format_r32g32b32_float_description; - case PIPE_FORMAT_R32G32B32A32_FLOAT: - return &util_format_r32g32b32a32_float_description; - case PIPE_FORMAT_R32_UNORM: - return &util_format_r32_unorm_description; - case PIPE_FORMAT_R32G32_UNORM: - return &util_format_r32g32_unorm_description; - case PIPE_FORMAT_R32G32B32_UNORM: - return &util_format_r32g32b32_unorm_description; - case PIPE_FORMAT_R32G32B32A32_UNORM: - return &util_format_r32g32b32a32_unorm_description; - case PIPE_FORMAT_R32_USCALED: - return &util_format_r32_uscaled_description; - case PIPE_FORMAT_R32G32_USCALED: - return &util_format_r32g32_uscaled_description; - case PIPE_FORMAT_R32G32B32_USCALED: - return &util_format_r32g32b32_uscaled_description; - case PIPE_FORMAT_R32G32B32A32_USCALED: - return &util_format_r32g32b32a32_uscaled_description; - case PIPE_FORMAT_R32_SNORM: - return &util_format_r32_snorm_description; - case PIPE_FORMAT_R32G32_SNORM: - return &util_format_r32g32_snorm_description; - case PIPE_FORMAT_R32G32B32_SNORM: - return &util_format_r32g32b32_snorm_description; - case PIPE_FORMAT_R32G32B32A32_SNORM: - return &util_format_r32g32b32a32_snorm_description; - case PIPE_FORMAT_R32_SSCALED: - return &util_format_r32_sscaled_description; - case PIPE_FORMAT_R32G32_SSCALED: - return &util_format_r32g32_sscaled_description; - case PIPE_FORMAT_R32G32B32_SSCALED: - return &util_format_r32g32b32_sscaled_description; - case PIPE_FORMAT_R32G32B32A32_SSCALED: - return &util_format_r32g32b32a32_sscaled_description; - case PIPE_FORMAT_R16_FLOAT: - return &util_format_r16_float_description; - case PIPE_FORMAT_R16G16_FLOAT: - return &util_format_r16g16_float_description; - case PIPE_FORMAT_R16G16B16_FLOAT: - return &util_format_r16g16b16_float_description; - case PIPE_FORMAT_R16G16B16A16_FLOAT: - return &util_format_r16g16b16a16_float_description; - case PIPE_FORMAT_R16_UNORM: - return &util_format_r16_unorm_description; - case PIPE_FORMAT_R16G16_UNORM: - return &util_format_r16g16_unorm_description; - case PIPE_FORMAT_R16G16B16_UNORM: - return &util_format_r16g16b16_unorm_description; - case PIPE_FORMAT_R16G16B16A16_UNORM: - return &util_format_r16g16b16a16_unorm_description; - case PIPE_FORMAT_R16_USCALED: - return &util_format_r16_uscaled_description; - case PIPE_FORMAT_R16G16_USCALED: - return &util_format_r16g16_uscaled_description; - case PIPE_FORMAT_R16G16B16_USCALED: - return &util_format_r16g16b16_uscaled_description; - case PIPE_FORMAT_R16G16B16A16_USCALED: - return &util_format_r16g16b16a16_uscaled_description; - case PIPE_FORMAT_R16_SNORM: - return &util_format_r16_snorm_description; - case PIPE_FORMAT_R16G16_SNORM: - return &util_format_r16g16_snorm_description; - case PIPE_FORMAT_R16G16B16_SNORM: - return &util_format_r16g16b16_snorm_description; - case PIPE_FORMAT_R16G16B16A16_SNORM: - return &util_format_r16g16b16a16_snorm_description; - case PIPE_FORMAT_R16_SSCALED: - return &util_format_r16_sscaled_description; - case PIPE_FORMAT_R16G16_SSCALED: - return &util_format_r16g16_sscaled_description; - case PIPE_FORMAT_R16G16B16_SSCALED: - return &util_format_r16g16b16_sscaled_description; - case PIPE_FORMAT_R16G16B16A16_SSCALED: - return &util_format_r16g16b16a16_sscaled_description; - case PIPE_FORMAT_R8_UNORM: - return &util_format_r8_unorm_description; - case PIPE_FORMAT_R8G8_UNORM: - return &util_format_r8g8_unorm_description; - case PIPE_FORMAT_R8G8B8_UNORM: - return &util_format_r8g8b8_unorm_description; - case PIPE_FORMAT_R8G8B8A8_UNORM: - return &util_format_r8g8b8a8_unorm_description; - case PIPE_FORMAT_R8_USCALED: - return &util_format_r8_uscaled_description; - case PIPE_FORMAT_R8G8_USCALED: - return &util_format_r8g8_uscaled_description; - case PIPE_FORMAT_R8G8B8_USCALED: - return &util_format_r8g8b8_uscaled_description; - case PIPE_FORMAT_R8G8B8A8_USCALED: - return &util_format_r8g8b8a8_uscaled_description; - case PIPE_FORMAT_R8_SNORM: - return &util_format_r8_snorm_description; - case PIPE_FORMAT_R8G8_SNORM: - return &util_format_r8g8_snorm_description; - case PIPE_FORMAT_R8G8B8_SNORM: - return &util_format_r8g8b8_snorm_description; - case PIPE_FORMAT_R8G8B8A8_SNORM: - return &util_format_r8g8b8a8_snorm_description; - case PIPE_FORMAT_R8_SSCALED: - return &util_format_r8_sscaled_description; - case PIPE_FORMAT_R8G8_SSCALED: - return &util_format_r8g8_sscaled_description; - case PIPE_FORMAT_R8G8B8_SSCALED: - return &util_format_r8g8b8_sscaled_description; - case PIPE_FORMAT_R8G8B8A8_SSCALED: - return &util_format_r8g8b8a8_sscaled_description; - case PIPE_FORMAT_R32_FIXED: - return &util_format_r32_fixed_description; - case PIPE_FORMAT_R32G32_FIXED: - return &util_format_r32g32_fixed_description; - case PIPE_FORMAT_R32G32B32_FIXED: - return &util_format_r32g32b32_fixed_description; - case PIPE_FORMAT_R32G32B32A32_FIXED: - return &util_format_r32g32b32a32_fixed_description; - case PIPE_FORMAT_R10G10B10X2_USCALED: - return &util_format_r10g10b10x2_uscaled_description; - case PIPE_FORMAT_R10G10B10X2_SNORM: - return &util_format_r10g10b10x2_snorm_description; - case PIPE_FORMAT_YV12: - return &util_format_yv12_description; - case PIPE_FORMAT_YV16: - return &util_format_yv16_description; - case PIPE_FORMAT_IYUV: - return &util_format_iyuv_description; - case PIPE_FORMAT_NV12: - return &util_format_nv12_description; - case PIPE_FORMAT_NV21: - return &util_format_nv21_description; - case PIPE_FORMAT_R4A4_UNORM: - return &util_format_r4a4_unorm_description; - case PIPE_FORMAT_A4R4_UNORM: - return &util_format_a4r4_unorm_description; - case PIPE_FORMAT_R8A8_UNORM: - return &util_format_r8a8_unorm_description; - case PIPE_FORMAT_A8R8_UNORM: - return &util_format_a8r8_unorm_description; - case PIPE_FORMAT_R10G10B10A2_USCALED: - return &util_format_r10g10b10a2_uscaled_description; - case PIPE_FORMAT_R10G10B10A2_SSCALED: - return &util_format_r10g10b10a2_sscaled_description; - case PIPE_FORMAT_R10G10B10A2_SNORM: - return &util_format_r10g10b10a2_snorm_description; - case PIPE_FORMAT_B10G10R10A2_USCALED: - return &util_format_b10g10r10a2_uscaled_description; - case PIPE_FORMAT_B10G10R10A2_SSCALED: - return &util_format_b10g10r10a2_sscaled_description; - case PIPE_FORMAT_B10G10R10A2_SNORM: - return &util_format_b10g10r10a2_snorm_description; - case PIPE_FORMAT_R8_UINT: - return &util_format_r8_uint_description; - case PIPE_FORMAT_R8G8_UINT: - return &util_format_r8g8_uint_description; - case PIPE_FORMAT_R8G8B8_UINT: - return &util_format_r8g8b8_uint_description; - case PIPE_FORMAT_R8G8B8A8_UINT: - return &util_format_r8g8b8a8_uint_description; - case PIPE_FORMAT_R8_SINT: - return &util_format_r8_sint_description; - case PIPE_FORMAT_R8G8_SINT: - return &util_format_r8g8_sint_description; - case PIPE_FORMAT_R8G8B8_SINT: - return &util_format_r8g8b8_sint_description; - case PIPE_FORMAT_R8G8B8A8_SINT: - return &util_format_r8g8b8a8_sint_description; - case PIPE_FORMAT_R16_UINT: - return &util_format_r16_uint_description; - case PIPE_FORMAT_R16G16_UINT: - return &util_format_r16g16_uint_description; - case PIPE_FORMAT_R16G16B16_UINT: - return &util_format_r16g16b16_uint_description; - case PIPE_FORMAT_R16G16B16A16_UINT: - return &util_format_r16g16b16a16_uint_description; - case PIPE_FORMAT_R16_SINT: - return &util_format_r16_sint_description; - case PIPE_FORMAT_R16G16_SINT: - return &util_format_r16g16_sint_description; - case PIPE_FORMAT_R16G16B16_SINT: - return &util_format_r16g16b16_sint_description; - case PIPE_FORMAT_R16G16B16A16_SINT: - return &util_format_r16g16b16a16_sint_description; - case PIPE_FORMAT_R32_UINT: - return &util_format_r32_uint_description; - case PIPE_FORMAT_R32G32_UINT: - return &util_format_r32g32_uint_description; - case PIPE_FORMAT_R32G32B32_UINT: - return &util_format_r32g32b32_uint_description; - case PIPE_FORMAT_R32G32B32A32_UINT: - return &util_format_r32g32b32a32_uint_description; - case PIPE_FORMAT_R32_SINT: - return &util_format_r32_sint_description; - case PIPE_FORMAT_R32G32_SINT: - return &util_format_r32g32_sint_description; - case PIPE_FORMAT_R32G32B32_SINT: - return &util_format_r32g32b32_sint_description; - case PIPE_FORMAT_R32G32B32A32_SINT: - return &util_format_r32g32b32a32_sint_description; - case PIPE_FORMAT_A8_UINT: - return &util_format_a8_uint_description; - case PIPE_FORMAT_I8_UINT: - return &util_format_i8_uint_description; - case PIPE_FORMAT_L8_UINT: - return &util_format_l8_uint_description; - case PIPE_FORMAT_L8A8_UINT: - return &util_format_l8a8_uint_description; - case PIPE_FORMAT_A8_SINT: - return &util_format_a8_sint_description; - case PIPE_FORMAT_I8_SINT: - return &util_format_i8_sint_description; - case PIPE_FORMAT_L8_SINT: - return &util_format_l8_sint_description; - case PIPE_FORMAT_L8A8_SINT: - return &util_format_l8a8_sint_description; - case PIPE_FORMAT_A16_UINT: - return &util_format_a16_uint_description; - case PIPE_FORMAT_I16_UINT: - return &util_format_i16_uint_description; - case PIPE_FORMAT_L16_UINT: - return &util_format_l16_uint_description; - case PIPE_FORMAT_L16A16_UINT: - return &util_format_l16a16_uint_description; - case PIPE_FORMAT_A16_SINT: - return &util_format_a16_sint_description; - case PIPE_FORMAT_I16_SINT: - return &util_format_i16_sint_description; - case PIPE_FORMAT_L16_SINT: - return &util_format_l16_sint_description; - case PIPE_FORMAT_L16A16_SINT: - return &util_format_l16a16_sint_description; - case PIPE_FORMAT_A32_UINT: - return &util_format_a32_uint_description; - case PIPE_FORMAT_I32_UINT: - return &util_format_i32_uint_description; - case PIPE_FORMAT_L32_UINT: - return &util_format_l32_uint_description; - case PIPE_FORMAT_L32A32_UINT: - return &util_format_l32a32_uint_description; - case PIPE_FORMAT_A32_SINT: - return &util_format_a32_sint_description; - case PIPE_FORMAT_I32_SINT: - return &util_format_i32_sint_description; - case PIPE_FORMAT_L32_SINT: - return &util_format_l32_sint_description; - case PIPE_FORMAT_L32A32_SINT: - return &util_format_l32a32_sint_description; - case PIPE_FORMAT_B10G10R10A2_UINT: - return &util_format_b10g10r10a2_uint_description; - default: - return NULL; - } -} - diff --git a/dll/opengl/mesa/generated/gallium/auxiliary/util/u_half.c b/dll/opengl/mesa/generated/gallium/auxiliary/util/u_half.c deleted file mode 100644 index fe3146d5790..00000000000 --- a/dll/opengl/mesa/generated/gallium/auxiliary/util/u_half.c +++ /dev/null @@ -1,3217 +0,0 @@ -/* This file is autogenerated by u_half.py. Do not edit directly. */ -#include "util/u_half.h" - -const uint32_t util_half_to_float_mantissa_table[2048] = { - 0x0, - 0x33800000, - 0x34000000, - 0x34400000, - 0x34800000, - 0x34a00000, - 0x34c00000, - 0x34e00000, - 0x35000000, - 0x35100000, - 0x35200000, - 0x35300000, - 0x35400000, - 0x35500000, - 0x35600000, - 0x35700000, - 0x35800000, - 0x35880000, - 0x35900000, - 0x35980000, - 0x35a00000, - 0x35a80000, - 0x35b00000, - 0x35b80000, - 0x35c00000, - 0x35c80000, - 0x35d00000, - 0x35d80000, - 0x35e00000, - 0x35e80000, - 0x35f00000, - 0x35f80000, - 0x36000000, - 0x36040000, - 0x36080000, - 0x360c0000, - 0x36100000, - 0x36140000, - 0x36180000, - 0x361c0000, - 0x36200000, - 0x36240000, - 0x36280000, - 0x362c0000, - 0x36300000, - 0x36340000, - 0x36380000, - 0x363c0000, - 0x36400000, - 0x36440000, - 0x36480000, - 0x364c0000, - 0x36500000, - 0x36540000, - 0x36580000, - 0x365c0000, - 0x36600000, - 0x36640000, - 0x36680000, - 0x366c0000, - 0x36700000, - 0x36740000, - 0x36780000, - 0x367c0000, - 0x36800000, - 0x36820000, - 0x36840000, - 0x36860000, - 0x36880000, - 0x368a0000, - 0x368c0000, - 0x368e0000, - 0x36900000, - 0x36920000, - 0x36940000, - 0x36960000, - 0x36980000, - 0x369a0000, - 0x369c0000, - 0x369e0000, - 0x36a00000, - 0x36a20000, - 0x36a40000, - 0x36a60000, - 0x36a80000, - 0x36aa0000, - 0x36ac0000, - 0x36ae0000, - 0x36b00000, - 0x36b20000, - 0x36b40000, - 0x36b60000, - 0x36b80000, - 0x36ba0000, - 0x36bc0000, - 0x36be0000, - 0x36c00000, - 0x36c20000, - 0x36c40000, - 0x36c60000, - 0x36c80000, - 0x36ca0000, - 0x36cc0000, - 0x36ce0000, - 0x36d00000, - 0x36d20000, - 0x36d40000, - 0x36d60000, - 0x36d80000, - 0x36da0000, - 0x36dc0000, - 0x36de0000, - 0x36e00000, - 0x36e20000, - 0x36e40000, - 0x36e60000, - 0x36e80000, - 0x36ea0000, - 0x36ec0000, - 0x36ee0000, - 0x36f00000, - 0x36f20000, - 0x36f40000, - 0x36f60000, - 0x36f80000, - 0x36fa0000, - 0x36fc0000, - 0x36fe0000, - 0x37000000, - 0x37010000, - 0x37020000, - 0x37030000, - 0x37040000, - 0x37050000, - 0x37060000, - 0x37070000, - 0x37080000, - 0x37090000, - 0x370a0000, - 0x370b0000, - 0x370c0000, - 0x370d0000, - 0x370e0000, - 0x370f0000, - 0x37100000, - 0x37110000, - 0x37120000, - 0x37130000, - 0x37140000, - 0x37150000, - 0x37160000, - 0x37170000, - 0x37180000, - 0x37190000, - 0x371a0000, - 0x371b0000, - 0x371c0000, - 0x371d0000, - 0x371e0000, - 0x371f0000, - 0x37200000, - 0x37210000, - 0x37220000, - 0x37230000, - 0x37240000, - 0x37250000, - 0x37260000, - 0x37270000, - 0x37280000, - 0x37290000, - 0x372a0000, - 0x372b0000, - 0x372c0000, - 0x372d0000, - 0x372e0000, - 0x372f0000, - 0x37300000, - 0x37310000, - 0x37320000, - 0x37330000, - 0x37340000, - 0x37350000, - 0x37360000, - 0x37370000, - 0x37380000, - 0x37390000, - 0x373a0000, - 0x373b0000, - 0x373c0000, - 0x373d0000, - 0x373e0000, - 0x373f0000, - 0x37400000, - 0x37410000, - 0x37420000, - 0x37430000, - 0x37440000, - 0x37450000, - 0x37460000, - 0x37470000, - 0x37480000, - 0x37490000, - 0x374a0000, - 0x374b0000, - 0x374c0000, - 0x374d0000, - 0x374e0000, - 0x374f0000, - 0x37500000, - 0x37510000, - 0x37520000, - 0x37530000, - 0x37540000, - 0x37550000, - 0x37560000, - 0x37570000, - 0x37580000, - 0x37590000, - 0x375a0000, - 0x375b0000, - 0x375c0000, - 0x375d0000, - 0x375e0000, - 0x375f0000, - 0x37600000, - 0x37610000, - 0x37620000, - 0x37630000, - 0x37640000, - 0x37650000, - 0x37660000, - 0x37670000, - 0x37680000, - 0x37690000, - 0x376a0000, - 0x376b0000, - 0x376c0000, - 0x376d0000, - 0x376e0000, - 0x376f0000, - 0x37700000, - 0x37710000, - 0x37720000, - 0x37730000, - 0x37740000, - 0x37750000, - 0x37760000, - 0x37770000, - 0x37780000, - 0x37790000, - 0x377a0000, - 0x377b0000, - 0x377c0000, - 0x377d0000, - 0x377e0000, - 0x377f0000, - 0x37800000, - 0x37808000, - 0x37810000, - 0x37818000, - 0x37820000, - 0x37828000, - 0x37830000, - 0x37838000, - 0x37840000, - 0x37848000, - 0x37850000, - 0x37858000, - 0x37860000, - 0x37868000, - 0x37870000, - 0x37878000, - 0x37880000, - 0x37888000, - 0x37890000, - 0x37898000, - 0x378a0000, - 0x378a8000, - 0x378b0000, - 0x378b8000, - 0x378c0000, - 0x378c8000, - 0x378d0000, - 0x378d8000, - 0x378e0000, - 0x378e8000, - 0x378f0000, - 0x378f8000, - 0x37900000, - 0x37908000, - 0x37910000, - 0x37918000, - 0x37920000, - 0x37928000, - 0x37930000, - 0x37938000, - 0x37940000, - 0x37948000, - 0x37950000, - 0x37958000, - 0x37960000, - 0x37968000, - 0x37970000, - 0x37978000, - 0x37980000, - 0x37988000, - 0x37990000, - 0x37998000, - 0x379a0000, - 0x379a8000, - 0x379b0000, - 0x379b8000, - 0x379c0000, - 0x379c8000, - 0x379d0000, - 0x379d8000, - 0x379e0000, - 0x379e8000, - 0x379f0000, - 0x379f8000, - 0x37a00000, - 0x37a08000, - 0x37a10000, - 0x37a18000, - 0x37a20000, - 0x37a28000, - 0x37a30000, - 0x37a38000, - 0x37a40000, - 0x37a48000, - 0x37a50000, - 0x37a58000, - 0x37a60000, - 0x37a68000, - 0x37a70000, - 0x37a78000, - 0x37a80000, - 0x37a88000, - 0x37a90000, - 0x37a98000, - 0x37aa0000, - 0x37aa8000, - 0x37ab0000, - 0x37ab8000, - 0x37ac0000, - 0x37ac8000, - 0x37ad0000, - 0x37ad8000, - 0x37ae0000, - 0x37ae8000, - 0x37af0000, - 0x37af8000, - 0x37b00000, - 0x37b08000, - 0x37b10000, - 0x37b18000, - 0x37b20000, - 0x37b28000, - 0x37b30000, - 0x37b38000, - 0x37b40000, - 0x37b48000, - 0x37b50000, - 0x37b58000, - 0x37b60000, - 0x37b68000, - 0x37b70000, - 0x37b78000, - 0x37b80000, - 0x37b88000, - 0x37b90000, - 0x37b98000, - 0x37ba0000, - 0x37ba8000, - 0x37bb0000, - 0x37bb8000, - 0x37bc0000, - 0x37bc8000, - 0x37bd0000, - 0x37bd8000, - 0x37be0000, - 0x37be8000, - 0x37bf0000, - 0x37bf8000, - 0x37c00000, - 0x37c08000, - 0x37c10000, - 0x37c18000, - 0x37c20000, - 0x37c28000, - 0x37c30000, - 0x37c38000, - 0x37c40000, - 0x37c48000, - 0x37c50000, - 0x37c58000, - 0x37c60000, - 0x37c68000, - 0x37c70000, - 0x37c78000, - 0x37c80000, - 0x37c88000, - 0x37c90000, - 0x37c98000, - 0x37ca0000, - 0x37ca8000, - 0x37cb0000, - 0x37cb8000, - 0x37cc0000, - 0x37cc8000, - 0x37cd0000, - 0x37cd8000, - 0x37ce0000, - 0x37ce8000, - 0x37cf0000, - 0x37cf8000, - 0x37d00000, - 0x37d08000, - 0x37d10000, - 0x37d18000, - 0x37d20000, - 0x37d28000, - 0x37d30000, - 0x37d38000, - 0x37d40000, - 0x37d48000, - 0x37d50000, - 0x37d58000, - 0x37d60000, - 0x37d68000, - 0x37d70000, - 0x37d78000, - 0x37d80000, - 0x37d88000, - 0x37d90000, - 0x37d98000, - 0x37da0000, - 0x37da8000, - 0x37db0000, - 0x37db8000, - 0x37dc0000, - 0x37dc8000, - 0x37dd0000, - 0x37dd8000, - 0x37de0000, - 0x37de8000, - 0x37df0000, - 0x37df8000, - 0x37e00000, - 0x37e08000, - 0x37e10000, - 0x37e18000, - 0x37e20000, - 0x37e28000, - 0x37e30000, - 0x37e38000, - 0x37e40000, - 0x37e48000, - 0x37e50000, - 0x37e58000, - 0x37e60000, - 0x37e68000, - 0x37e70000, - 0x37e78000, - 0x37e80000, - 0x37e88000, - 0x37e90000, - 0x37e98000, - 0x37ea0000, - 0x37ea8000, - 0x37eb0000, - 0x37eb8000, - 0x37ec0000, - 0x37ec8000, - 0x37ed0000, - 0x37ed8000, - 0x37ee0000, - 0x37ee8000, - 0x37ef0000, - 0x37ef8000, - 0x37f00000, - 0x37f08000, - 0x37f10000, - 0x37f18000, - 0x37f20000, - 0x37f28000, - 0x37f30000, - 0x37f38000, - 0x37f40000, - 0x37f48000, - 0x37f50000, - 0x37f58000, - 0x37f60000, - 0x37f68000, - 0x37f70000, - 0x37f78000, - 0x37f80000, - 0x37f88000, - 0x37f90000, - 0x37f98000, - 0x37fa0000, - 0x37fa8000, - 0x37fb0000, - 0x37fb8000, - 0x37fc0000, - 0x37fc8000, - 0x37fd0000, - 0x37fd8000, - 0x37fe0000, - 0x37fe8000, - 0x37ff0000, - 0x37ff8000, - 0x38000000, - 0x38004000, - 0x38008000, - 0x3800c000, - 0x38010000, - 0x38014000, - 0x38018000, - 0x3801c000, - 0x38020000, - 0x38024000, - 0x38028000, - 0x3802c000, - 0x38030000, - 0x38034000, - 0x38038000, - 0x3803c000, - 0x38040000, - 0x38044000, - 0x38048000, - 0x3804c000, - 0x38050000, - 0x38054000, - 0x38058000, - 0x3805c000, - 0x38060000, - 0x38064000, - 0x38068000, - 0x3806c000, - 0x38070000, - 0x38074000, - 0x38078000, - 0x3807c000, - 0x38080000, - 0x38084000, - 0x38088000, - 0x3808c000, - 0x38090000, - 0x38094000, - 0x38098000, - 0x3809c000, - 0x380a0000, - 0x380a4000, - 0x380a8000, - 0x380ac000, - 0x380b0000, - 0x380b4000, - 0x380b8000, - 0x380bc000, - 0x380c0000, - 0x380c4000, - 0x380c8000, - 0x380cc000, - 0x380d0000, - 0x380d4000, - 0x380d8000, - 0x380dc000, - 0x380e0000, - 0x380e4000, - 0x380e8000, - 0x380ec000, - 0x380f0000, - 0x380f4000, - 0x380f8000, - 0x380fc000, - 0x38100000, - 0x38104000, - 0x38108000, - 0x3810c000, - 0x38110000, - 0x38114000, - 0x38118000, - 0x3811c000, - 0x38120000, - 0x38124000, - 0x38128000, - 0x3812c000, - 0x38130000, - 0x38134000, - 0x38138000, - 0x3813c000, - 0x38140000, - 0x38144000, - 0x38148000, - 0x3814c000, - 0x38150000, - 0x38154000, - 0x38158000, - 0x3815c000, - 0x38160000, - 0x38164000, - 0x38168000, - 0x3816c000, - 0x38170000, - 0x38174000, - 0x38178000, - 0x3817c000, - 0x38180000, - 0x38184000, - 0x38188000, - 0x3818c000, - 0x38190000, - 0x38194000, - 0x38198000, - 0x3819c000, - 0x381a0000, - 0x381a4000, - 0x381a8000, - 0x381ac000, - 0x381b0000, - 0x381b4000, - 0x381b8000, - 0x381bc000, - 0x381c0000, - 0x381c4000, - 0x381c8000, - 0x381cc000, - 0x381d0000, - 0x381d4000, - 0x381d8000, - 0x381dc000, - 0x381e0000, - 0x381e4000, - 0x381e8000, - 0x381ec000, - 0x381f0000, - 0x381f4000, - 0x381f8000, - 0x381fc000, - 0x38200000, - 0x38204000, - 0x38208000, - 0x3820c000, - 0x38210000, - 0x38214000, - 0x38218000, - 0x3821c000, - 0x38220000, - 0x38224000, - 0x38228000, - 0x3822c000, - 0x38230000, - 0x38234000, - 0x38238000, - 0x3823c000, - 0x38240000, - 0x38244000, - 0x38248000, - 0x3824c000, - 0x38250000, - 0x38254000, - 0x38258000, - 0x3825c000, - 0x38260000, - 0x38264000, - 0x38268000, - 0x3826c000, - 0x38270000, - 0x38274000, - 0x38278000, - 0x3827c000, - 0x38280000, - 0x38284000, - 0x38288000, - 0x3828c000, - 0x38290000, - 0x38294000, - 0x38298000, - 0x3829c000, - 0x382a0000, - 0x382a4000, - 0x382a8000, - 0x382ac000, - 0x382b0000, - 0x382b4000, - 0x382b8000, - 0x382bc000, - 0x382c0000, - 0x382c4000, - 0x382c8000, - 0x382cc000, - 0x382d0000, - 0x382d4000, - 0x382d8000, - 0x382dc000, - 0x382e0000, - 0x382e4000, - 0x382e8000, - 0x382ec000, - 0x382f0000, - 0x382f4000, - 0x382f8000, - 0x382fc000, - 0x38300000, - 0x38304000, - 0x38308000, - 0x3830c000, - 0x38310000, - 0x38314000, - 0x38318000, - 0x3831c000, - 0x38320000, - 0x38324000, - 0x38328000, - 0x3832c000, - 0x38330000, - 0x38334000, - 0x38338000, - 0x3833c000, - 0x38340000, - 0x38344000, - 0x38348000, - 0x3834c000, - 0x38350000, - 0x38354000, - 0x38358000, - 0x3835c000, - 0x38360000, - 0x38364000, - 0x38368000, - 0x3836c000, - 0x38370000, - 0x38374000, - 0x38378000, - 0x3837c000, - 0x38380000, - 0x38384000, - 0x38388000, - 0x3838c000, - 0x38390000, - 0x38394000, - 0x38398000, - 0x3839c000, - 0x383a0000, - 0x383a4000, - 0x383a8000, - 0x383ac000, - 0x383b0000, - 0x383b4000, - 0x383b8000, - 0x383bc000, - 0x383c0000, - 0x383c4000, - 0x383c8000, - 0x383cc000, - 0x383d0000, - 0x383d4000, - 0x383d8000, - 0x383dc000, - 0x383e0000, - 0x383e4000, - 0x383e8000, - 0x383ec000, - 0x383f0000, - 0x383f4000, - 0x383f8000, - 0x383fc000, - 0x38400000, - 0x38404000, - 0x38408000, - 0x3840c000, - 0x38410000, - 0x38414000, - 0x38418000, - 0x3841c000, - 0x38420000, - 0x38424000, - 0x38428000, - 0x3842c000, - 0x38430000, - 0x38434000, - 0x38438000, - 0x3843c000, - 0x38440000, - 0x38444000, - 0x38448000, - 0x3844c000, - 0x38450000, - 0x38454000, - 0x38458000, - 0x3845c000, - 0x38460000, - 0x38464000, - 0x38468000, - 0x3846c000, - 0x38470000, - 0x38474000, - 0x38478000, - 0x3847c000, - 0x38480000, - 0x38484000, - 0x38488000, - 0x3848c000, - 0x38490000, - 0x38494000, - 0x38498000, - 0x3849c000, - 0x384a0000, - 0x384a4000, - 0x384a8000, - 0x384ac000, - 0x384b0000, - 0x384b4000, - 0x384b8000, - 0x384bc000, - 0x384c0000, - 0x384c4000, - 0x384c8000, - 0x384cc000, - 0x384d0000, - 0x384d4000, - 0x384d8000, - 0x384dc000, - 0x384e0000, - 0x384e4000, - 0x384e8000, - 0x384ec000, - 0x384f0000, - 0x384f4000, - 0x384f8000, - 0x384fc000, - 0x38500000, - 0x38504000, - 0x38508000, - 0x3850c000, - 0x38510000, - 0x38514000, - 0x38518000, - 0x3851c000, - 0x38520000, - 0x38524000, - 0x38528000, - 0x3852c000, - 0x38530000, - 0x38534000, - 0x38538000, - 0x3853c000, - 0x38540000, - 0x38544000, - 0x38548000, - 0x3854c000, - 0x38550000, - 0x38554000, - 0x38558000, - 0x3855c000, - 0x38560000, - 0x38564000, - 0x38568000, - 0x3856c000, - 0x38570000, - 0x38574000, - 0x38578000, - 0x3857c000, - 0x38580000, - 0x38584000, - 0x38588000, - 0x3858c000, - 0x38590000, - 0x38594000, - 0x38598000, - 0x3859c000, - 0x385a0000, - 0x385a4000, - 0x385a8000, - 0x385ac000, - 0x385b0000, - 0x385b4000, - 0x385b8000, - 0x385bc000, - 0x385c0000, - 0x385c4000, - 0x385c8000, - 0x385cc000, - 0x385d0000, - 0x385d4000, - 0x385d8000, - 0x385dc000, - 0x385e0000, - 0x385e4000, - 0x385e8000, - 0x385ec000, - 0x385f0000, - 0x385f4000, - 0x385f8000, - 0x385fc000, - 0x38600000, - 0x38604000, - 0x38608000, - 0x3860c000, - 0x38610000, - 0x38614000, - 0x38618000, - 0x3861c000, - 0x38620000, - 0x38624000, - 0x38628000, - 0x3862c000, - 0x38630000, - 0x38634000, - 0x38638000, - 0x3863c000, - 0x38640000, - 0x38644000, - 0x38648000, - 0x3864c000, - 0x38650000, - 0x38654000, - 0x38658000, - 0x3865c000, - 0x38660000, - 0x38664000, - 0x38668000, - 0x3866c000, - 0x38670000, - 0x38674000, - 0x38678000, - 0x3867c000, - 0x38680000, - 0x38684000, - 0x38688000, - 0x3868c000, - 0x38690000, - 0x38694000, - 0x38698000, - 0x3869c000, - 0x386a0000, - 0x386a4000, - 0x386a8000, - 0x386ac000, - 0x386b0000, - 0x386b4000, - 0x386b8000, - 0x386bc000, - 0x386c0000, - 0x386c4000, - 0x386c8000, - 0x386cc000, - 0x386d0000, - 0x386d4000, - 0x386d8000, - 0x386dc000, - 0x386e0000, - 0x386e4000, - 0x386e8000, - 0x386ec000, - 0x386f0000, - 0x386f4000, - 0x386f8000, - 0x386fc000, - 0x38700000, - 0x38704000, - 0x38708000, - 0x3870c000, - 0x38710000, - 0x38714000, - 0x38718000, - 0x3871c000, - 0x38720000, - 0x38724000, - 0x38728000, - 0x3872c000, - 0x38730000, - 0x38734000, - 0x38738000, - 0x3873c000, - 0x38740000, - 0x38744000, - 0x38748000, - 0x3874c000, - 0x38750000, - 0x38754000, - 0x38758000, - 0x3875c000, - 0x38760000, - 0x38764000, - 0x38768000, - 0x3876c000, - 0x38770000, - 0x38774000, - 0x38778000, - 0x3877c000, - 0x38780000, - 0x38784000, - 0x38788000, - 0x3878c000, - 0x38790000, - 0x38794000, - 0x38798000, - 0x3879c000, - 0x387a0000, - 0x387a4000, - 0x387a8000, - 0x387ac000, - 0x387b0000, - 0x387b4000, - 0x387b8000, - 0x387bc000, - 0x387c0000, - 0x387c4000, - 0x387c8000, - 0x387cc000, - 0x387d0000, - 0x387d4000, - 0x387d8000, - 0x387dc000, - 0x387e0000, - 0x387e4000, - 0x387e8000, - 0x387ec000, - 0x387f0000, - 0x387f4000, - 0x387f8000, - 0x387fc000, - 0x0, - 0x2000, - 0x4000, - 0x6000, - 0x8000, - 0xa000, - 0xc000, - 0xe000, - 0x10000, - 0x12000, - 0x14000, - 0x16000, - 0x18000, - 0x1a000, - 0x1c000, - 0x1e000, - 0x20000, - 0x22000, - 0x24000, - 0x26000, - 0x28000, - 0x2a000, - 0x2c000, - 0x2e000, - 0x30000, - 0x32000, - 0x34000, - 0x36000, - 0x38000, - 0x3a000, - 0x3c000, - 0x3e000, - 0x40000, - 0x42000, - 0x44000, - 0x46000, - 0x48000, - 0x4a000, - 0x4c000, - 0x4e000, - 0x50000, - 0x52000, - 0x54000, - 0x56000, - 0x58000, - 0x5a000, - 0x5c000, - 0x5e000, - 0x60000, - 0x62000, - 0x64000, - 0x66000, - 0x68000, - 0x6a000, - 0x6c000, - 0x6e000, - 0x70000, - 0x72000, - 0x74000, - 0x76000, - 0x78000, - 0x7a000, - 0x7c000, - 0x7e000, - 0x80000, - 0x82000, - 0x84000, - 0x86000, - 0x88000, - 0x8a000, - 0x8c000, - 0x8e000, - 0x90000, - 0x92000, - 0x94000, - 0x96000, - 0x98000, - 0x9a000, - 0x9c000, - 0x9e000, - 0xa0000, - 0xa2000, - 0xa4000, - 0xa6000, - 0xa8000, - 0xaa000, - 0xac000, - 0xae000, - 0xb0000, - 0xb2000, - 0xb4000, - 0xb6000, - 0xb8000, - 0xba000, - 0xbc000, - 0xbe000, - 0xc0000, - 0xc2000, - 0xc4000, - 0xc6000, - 0xc8000, - 0xca000, - 0xcc000, - 0xce000, - 0xd0000, - 0xd2000, - 0xd4000, - 0xd6000, - 0xd8000, - 0xda000, - 0xdc000, - 0xde000, - 0xe0000, - 0xe2000, - 0xe4000, - 0xe6000, - 0xe8000, - 0xea000, - 0xec000, - 0xee000, - 0xf0000, - 0xf2000, - 0xf4000, - 0xf6000, - 0xf8000, - 0xfa000, - 0xfc000, - 0xfe000, - 0x100000, - 0x102000, - 0x104000, - 0x106000, - 0x108000, - 0x10a000, - 0x10c000, - 0x10e000, - 0x110000, - 0x112000, - 0x114000, - 0x116000, - 0x118000, - 0x11a000, - 0x11c000, - 0x11e000, - 0x120000, - 0x122000, - 0x124000, - 0x126000, - 0x128000, - 0x12a000, - 0x12c000, - 0x12e000, - 0x130000, - 0x132000, - 0x134000, - 0x136000, - 0x138000, - 0x13a000, - 0x13c000, - 0x13e000, - 0x140000, - 0x142000, - 0x144000, - 0x146000, - 0x148000, - 0x14a000, - 0x14c000, - 0x14e000, - 0x150000, - 0x152000, - 0x154000, - 0x156000, - 0x158000, - 0x15a000, - 0x15c000, - 0x15e000, - 0x160000, - 0x162000, - 0x164000, - 0x166000, - 0x168000, - 0x16a000, - 0x16c000, - 0x16e000, - 0x170000, - 0x172000, - 0x174000, - 0x176000, - 0x178000, - 0x17a000, - 0x17c000, - 0x17e000, - 0x180000, - 0x182000, - 0x184000, - 0x186000, - 0x188000, - 0x18a000, - 0x18c000, - 0x18e000, - 0x190000, - 0x192000, - 0x194000, - 0x196000, - 0x198000, - 0x19a000, - 0x19c000, - 0x19e000, - 0x1a0000, - 0x1a2000, - 0x1a4000, - 0x1a6000, - 0x1a8000, - 0x1aa000, - 0x1ac000, - 0x1ae000, - 0x1b0000, - 0x1b2000, - 0x1b4000, - 0x1b6000, - 0x1b8000, - 0x1ba000, - 0x1bc000, - 0x1be000, - 0x1c0000, - 0x1c2000, - 0x1c4000, - 0x1c6000, - 0x1c8000, - 0x1ca000, - 0x1cc000, - 0x1ce000, - 0x1d0000, - 0x1d2000, - 0x1d4000, - 0x1d6000, - 0x1d8000, - 0x1da000, - 0x1dc000, - 0x1de000, - 0x1e0000, - 0x1e2000, - 0x1e4000, - 0x1e6000, - 0x1e8000, - 0x1ea000, - 0x1ec000, - 0x1ee000, - 0x1f0000, - 0x1f2000, - 0x1f4000, - 0x1f6000, - 0x1f8000, - 0x1fa000, - 0x1fc000, - 0x1fe000, - 0x200000, - 0x202000, - 0x204000, - 0x206000, - 0x208000, - 0x20a000, - 0x20c000, - 0x20e000, - 0x210000, - 0x212000, - 0x214000, - 0x216000, - 0x218000, - 0x21a000, - 0x21c000, - 0x21e000, - 0x220000, - 0x222000, - 0x224000, - 0x226000, - 0x228000, - 0x22a000, - 0x22c000, - 0x22e000, - 0x230000, - 0x232000, - 0x234000, - 0x236000, - 0x238000, - 0x23a000, - 0x23c000, - 0x23e000, - 0x240000, - 0x242000, - 0x244000, - 0x246000, - 0x248000, - 0x24a000, - 0x24c000, - 0x24e000, - 0x250000, - 0x252000, - 0x254000, - 0x256000, - 0x258000, - 0x25a000, - 0x25c000, - 0x25e000, - 0x260000, - 0x262000, - 0x264000, - 0x266000, - 0x268000, - 0x26a000, - 0x26c000, - 0x26e000, - 0x270000, - 0x272000, - 0x274000, - 0x276000, - 0x278000, - 0x27a000, - 0x27c000, - 0x27e000, - 0x280000, - 0x282000, - 0x284000, - 0x286000, - 0x288000, - 0x28a000, - 0x28c000, - 0x28e000, - 0x290000, - 0x292000, - 0x294000, - 0x296000, - 0x298000, - 0x29a000, - 0x29c000, - 0x29e000, - 0x2a0000, - 0x2a2000, - 0x2a4000, - 0x2a6000, - 0x2a8000, - 0x2aa000, - 0x2ac000, - 0x2ae000, - 0x2b0000, - 0x2b2000, - 0x2b4000, - 0x2b6000, - 0x2b8000, - 0x2ba000, - 0x2bc000, - 0x2be000, - 0x2c0000, - 0x2c2000, - 0x2c4000, - 0x2c6000, - 0x2c8000, - 0x2ca000, - 0x2cc000, - 0x2ce000, - 0x2d0000, - 0x2d2000, - 0x2d4000, - 0x2d6000, - 0x2d8000, - 0x2da000, - 0x2dc000, - 0x2de000, - 0x2e0000, - 0x2e2000, - 0x2e4000, - 0x2e6000, - 0x2e8000, - 0x2ea000, - 0x2ec000, - 0x2ee000, - 0x2f0000, - 0x2f2000, - 0x2f4000, - 0x2f6000, - 0x2f8000, - 0x2fa000, - 0x2fc000, - 0x2fe000, - 0x300000, - 0x302000, - 0x304000, - 0x306000, - 0x308000, - 0x30a000, - 0x30c000, - 0x30e000, - 0x310000, - 0x312000, - 0x314000, - 0x316000, - 0x318000, - 0x31a000, - 0x31c000, - 0x31e000, - 0x320000, - 0x322000, - 0x324000, - 0x326000, - 0x328000, - 0x32a000, - 0x32c000, - 0x32e000, - 0x330000, - 0x332000, - 0x334000, - 0x336000, - 0x338000, - 0x33a000, - 0x33c000, - 0x33e000, - 0x340000, - 0x342000, - 0x344000, - 0x346000, - 0x348000, - 0x34a000, - 0x34c000, - 0x34e000, - 0x350000, - 0x352000, - 0x354000, - 0x356000, - 0x358000, - 0x35a000, - 0x35c000, - 0x35e000, - 0x360000, - 0x362000, - 0x364000, - 0x366000, - 0x368000, - 0x36a000, - 0x36c000, - 0x36e000, - 0x370000, - 0x372000, - 0x374000, - 0x376000, - 0x378000, - 0x37a000, - 0x37c000, - 0x37e000, - 0x380000, - 0x382000, - 0x384000, - 0x386000, - 0x388000, - 0x38a000, - 0x38c000, - 0x38e000, - 0x390000, - 0x392000, - 0x394000, - 0x396000, - 0x398000, - 0x39a000, - 0x39c000, - 0x39e000, - 0x3a0000, - 0x3a2000, - 0x3a4000, - 0x3a6000, - 0x3a8000, - 0x3aa000, - 0x3ac000, - 0x3ae000, - 0x3b0000, - 0x3b2000, - 0x3b4000, - 0x3b6000, - 0x3b8000, - 0x3ba000, - 0x3bc000, - 0x3be000, - 0x3c0000, - 0x3c2000, - 0x3c4000, - 0x3c6000, - 0x3c8000, - 0x3ca000, - 0x3cc000, - 0x3ce000, - 0x3d0000, - 0x3d2000, - 0x3d4000, - 0x3d6000, - 0x3d8000, - 0x3da000, - 0x3dc000, - 0x3de000, - 0x3e0000, - 0x3e2000, - 0x3e4000, - 0x3e6000, - 0x3e8000, - 0x3ea000, - 0x3ec000, - 0x3ee000, - 0x3f0000, - 0x3f2000, - 0x3f4000, - 0x3f6000, - 0x3f8000, - 0x3fa000, - 0x3fc000, - 0x3fe000, - 0x400000, - 0x402000, - 0x404000, - 0x406000, - 0x408000, - 0x40a000, - 0x40c000, - 0x40e000, - 0x410000, - 0x412000, - 0x414000, - 0x416000, - 0x418000, - 0x41a000, - 0x41c000, - 0x41e000, - 0x420000, - 0x422000, - 0x424000, - 0x426000, - 0x428000, - 0x42a000, - 0x42c000, - 0x42e000, - 0x430000, - 0x432000, - 0x434000, - 0x436000, - 0x438000, - 0x43a000, - 0x43c000, - 0x43e000, - 0x440000, - 0x442000, - 0x444000, - 0x446000, - 0x448000, - 0x44a000, - 0x44c000, - 0x44e000, - 0x450000, - 0x452000, - 0x454000, - 0x456000, - 0x458000, - 0x45a000, - 0x45c000, - 0x45e000, - 0x460000, - 0x462000, - 0x464000, - 0x466000, - 0x468000, - 0x46a000, - 0x46c000, - 0x46e000, - 0x470000, - 0x472000, - 0x474000, - 0x476000, - 0x478000, - 0x47a000, - 0x47c000, - 0x47e000, - 0x480000, - 0x482000, - 0x484000, - 0x486000, - 0x488000, - 0x48a000, - 0x48c000, - 0x48e000, - 0x490000, - 0x492000, - 0x494000, - 0x496000, - 0x498000, - 0x49a000, - 0x49c000, - 0x49e000, - 0x4a0000, - 0x4a2000, - 0x4a4000, - 0x4a6000, - 0x4a8000, - 0x4aa000, - 0x4ac000, - 0x4ae000, - 0x4b0000, - 0x4b2000, - 0x4b4000, - 0x4b6000, - 0x4b8000, - 0x4ba000, - 0x4bc000, - 0x4be000, - 0x4c0000, - 0x4c2000, - 0x4c4000, - 0x4c6000, - 0x4c8000, - 0x4ca000, - 0x4cc000, - 0x4ce000, - 0x4d0000, - 0x4d2000, - 0x4d4000, - 0x4d6000, - 0x4d8000, - 0x4da000, - 0x4dc000, - 0x4de000, - 0x4e0000, - 0x4e2000, - 0x4e4000, - 0x4e6000, - 0x4e8000, - 0x4ea000, - 0x4ec000, - 0x4ee000, - 0x4f0000, - 0x4f2000, - 0x4f4000, - 0x4f6000, - 0x4f8000, - 0x4fa000, - 0x4fc000, - 0x4fe000, - 0x500000, - 0x502000, - 0x504000, - 0x506000, - 0x508000, - 0x50a000, - 0x50c000, - 0x50e000, - 0x510000, - 0x512000, - 0x514000, - 0x516000, - 0x518000, - 0x51a000, - 0x51c000, - 0x51e000, - 0x520000, - 0x522000, - 0x524000, - 0x526000, - 0x528000, - 0x52a000, - 0x52c000, - 0x52e000, - 0x530000, - 0x532000, - 0x534000, - 0x536000, - 0x538000, - 0x53a000, - 0x53c000, - 0x53e000, - 0x540000, - 0x542000, - 0x544000, - 0x546000, - 0x548000, - 0x54a000, - 0x54c000, - 0x54e000, - 0x550000, - 0x552000, - 0x554000, - 0x556000, - 0x558000, - 0x55a000, - 0x55c000, - 0x55e000, - 0x560000, - 0x562000, - 0x564000, - 0x566000, - 0x568000, - 0x56a000, - 0x56c000, - 0x56e000, - 0x570000, - 0x572000, - 0x574000, - 0x576000, - 0x578000, - 0x57a000, - 0x57c000, - 0x57e000, - 0x580000, - 0x582000, - 0x584000, - 0x586000, - 0x588000, - 0x58a000, - 0x58c000, - 0x58e000, - 0x590000, - 0x592000, - 0x594000, - 0x596000, - 0x598000, - 0x59a000, - 0x59c000, - 0x59e000, - 0x5a0000, - 0x5a2000, - 0x5a4000, - 0x5a6000, - 0x5a8000, - 0x5aa000, - 0x5ac000, - 0x5ae000, - 0x5b0000, - 0x5b2000, - 0x5b4000, - 0x5b6000, - 0x5b8000, - 0x5ba000, - 0x5bc000, - 0x5be000, - 0x5c0000, - 0x5c2000, - 0x5c4000, - 0x5c6000, - 0x5c8000, - 0x5ca000, - 0x5cc000, - 0x5ce000, - 0x5d0000, - 0x5d2000, - 0x5d4000, - 0x5d6000, - 0x5d8000, - 0x5da000, - 0x5dc000, - 0x5de000, - 0x5e0000, - 0x5e2000, - 0x5e4000, - 0x5e6000, - 0x5e8000, - 0x5ea000, - 0x5ec000, - 0x5ee000, - 0x5f0000, - 0x5f2000, - 0x5f4000, - 0x5f6000, - 0x5f8000, - 0x5fa000, - 0x5fc000, - 0x5fe000, - 0x600000, - 0x602000, - 0x604000, - 0x606000, - 0x608000, - 0x60a000, - 0x60c000, - 0x60e000, - 0x610000, - 0x612000, - 0x614000, - 0x616000, - 0x618000, - 0x61a000, - 0x61c000, - 0x61e000, - 0x620000, - 0x622000, - 0x624000, - 0x626000, - 0x628000, - 0x62a000, - 0x62c000, - 0x62e000, - 0x630000, - 0x632000, - 0x634000, - 0x636000, - 0x638000, - 0x63a000, - 0x63c000, - 0x63e000, - 0x640000, - 0x642000, - 0x644000, - 0x646000, - 0x648000, - 0x64a000, - 0x64c000, - 0x64e000, - 0x650000, - 0x652000, - 0x654000, - 0x656000, - 0x658000, - 0x65a000, - 0x65c000, - 0x65e000, - 0x660000, - 0x662000, - 0x664000, - 0x666000, - 0x668000, - 0x66a000, - 0x66c000, - 0x66e000, - 0x670000, - 0x672000, - 0x674000, - 0x676000, - 0x678000, - 0x67a000, - 0x67c000, - 0x67e000, - 0x680000, - 0x682000, - 0x684000, - 0x686000, - 0x688000, - 0x68a000, - 0x68c000, - 0x68e000, - 0x690000, - 0x692000, - 0x694000, - 0x696000, - 0x698000, - 0x69a000, - 0x69c000, - 0x69e000, - 0x6a0000, - 0x6a2000, - 0x6a4000, - 0x6a6000, - 0x6a8000, - 0x6aa000, - 0x6ac000, - 0x6ae000, - 0x6b0000, - 0x6b2000, - 0x6b4000, - 0x6b6000, - 0x6b8000, - 0x6ba000, - 0x6bc000, - 0x6be000, - 0x6c0000, - 0x6c2000, - 0x6c4000, - 0x6c6000, - 0x6c8000, - 0x6ca000, - 0x6cc000, - 0x6ce000, - 0x6d0000, - 0x6d2000, - 0x6d4000, - 0x6d6000, - 0x6d8000, - 0x6da000, - 0x6dc000, - 0x6de000, - 0x6e0000, - 0x6e2000, - 0x6e4000, - 0x6e6000, - 0x6e8000, - 0x6ea000, - 0x6ec000, - 0x6ee000, - 0x6f0000, - 0x6f2000, - 0x6f4000, - 0x6f6000, - 0x6f8000, - 0x6fa000, - 0x6fc000, - 0x6fe000, - 0x700000, - 0x702000, - 0x704000, - 0x706000, - 0x708000, - 0x70a000, - 0x70c000, - 0x70e000, - 0x710000, - 0x712000, - 0x714000, - 0x716000, - 0x718000, - 0x71a000, - 0x71c000, - 0x71e000, - 0x720000, - 0x722000, - 0x724000, - 0x726000, - 0x728000, - 0x72a000, - 0x72c000, - 0x72e000, - 0x730000, - 0x732000, - 0x734000, - 0x736000, - 0x738000, - 0x73a000, - 0x73c000, - 0x73e000, - 0x740000, - 0x742000, - 0x744000, - 0x746000, - 0x748000, - 0x74a000, - 0x74c000, - 0x74e000, - 0x750000, - 0x752000, - 0x754000, - 0x756000, - 0x758000, - 0x75a000, - 0x75c000, - 0x75e000, - 0x760000, - 0x762000, - 0x764000, - 0x766000, - 0x768000, - 0x76a000, - 0x76c000, - 0x76e000, - 0x770000, - 0x772000, - 0x774000, - 0x776000, - 0x778000, - 0x77a000, - 0x77c000, - 0x77e000, - 0x780000, - 0x782000, - 0x784000, - 0x786000, - 0x788000, - 0x78a000, - 0x78c000, - 0x78e000, - 0x790000, - 0x792000, - 0x794000, - 0x796000, - 0x798000, - 0x79a000, - 0x79c000, - 0x79e000, - 0x7a0000, - 0x7a2000, - 0x7a4000, - 0x7a6000, - 0x7a8000, - 0x7aa000, - 0x7ac000, - 0x7ae000, - 0x7b0000, - 0x7b2000, - 0x7b4000, - 0x7b6000, - 0x7b8000, - 0x7ba000, - 0x7bc000, - 0x7be000, - 0x7c0000, - 0x7c2000, - 0x7c4000, - 0x7c6000, - 0x7c8000, - 0x7ca000, - 0x7cc000, - 0x7ce000, - 0x7d0000, - 0x7d2000, - 0x7d4000, - 0x7d6000, - 0x7d8000, - 0x7da000, - 0x7dc000, - 0x7de000, - 0x7e0000, - 0x7e2000, - 0x7e4000, - 0x7e6000, - 0x7e8000, - 0x7ea000, - 0x7ec000, - 0x7ee000, - 0x7f0000, - 0x7f2000, - 0x7f4000, - 0x7f6000, - 0x7f8000, - 0x7fa000, - 0x7fc000, - 0x7fe000, -}; - -const uint32_t util_half_to_float_exponent_table[64] = { - 0x0, - 0x38800000, - 0x39000000, - 0x39800000, - 0x3a000000, - 0x3a800000, - 0x3b000000, - 0x3b800000, - 0x3c000000, - 0x3c800000, - 0x3d000000, - 0x3d800000, - 0x3e000000, - 0x3e800000, - 0x3f000000, - 0x3f800000, - 0x40000000, - 0x40800000, - 0x41000000, - 0x41800000, - 0x42000000, - 0x42800000, - 0x43000000, - 0x43800000, - 0x44000000, - 0x44800000, - 0x45000000, - 0x45800000, - 0x46000000, - 0x46800000, - 0x47000000, - 0x7f800000, - 0x80000000, - 0xb8800000, - 0xb9000000, - 0xb9800000, - 0xba000000, - 0xba800000, - 0xbb000000, - 0xbb800000, - 0xbc000000, - 0xbc800000, - 0xbd000000, - 0xbd800000, - 0xbe000000, - 0xbe800000, - 0xbf000000, - 0xbf800000, - 0xc0000000, - 0xc0800000, - 0xc1000000, - 0xc1800000, - 0xc2000000, - 0xc2800000, - 0xc3000000, - 0xc3800000, - 0xc4000000, - 0xc4800000, - 0xc5000000, - 0xc5800000, - 0xc6000000, - 0xc6800000, - 0xc7000000, - 0xff800000, -}; - -const uint32_t util_half_to_float_offset_table[64] = { - 0x0, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x0, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, - 0x400, -}; - -const uint16_t util_float_to_half_base_table[512] = { - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x1, - 0x2, - 0x4, - 0x8, - 0x10, - 0x20, - 0x40, - 0x80, - 0x100, - 0x200, - 0x400, - 0x800, - 0xc00, - 0x1000, - 0x1400, - 0x1800, - 0x1c00, - 0x2000, - 0x2400, - 0x2800, - 0x2c00, - 0x3000, - 0x3400, - 0x3800, - 0x3c00, - 0x4000, - 0x4400, - 0x4800, - 0x4c00, - 0x5000, - 0x5400, - 0x5800, - 0x5c00, - 0x6000, - 0x6400, - 0x6800, - 0x6c00, - 0x7000, - 0x7400, - 0x7800, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x7c00, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8000, - 0x8001, - 0x8002, - 0x8004, - 0x8008, - 0x8010, - 0x8020, - 0x8040, - 0x8080, - 0x8100, - 0x8200, - 0x8400, - 0x8800, - 0x8c00, - 0x9000, - 0x9400, - 0x9800, - 0x9c00, - 0xa000, - 0xa400, - 0xa800, - 0xac00, - 0xb000, - 0xb400, - 0xb800, - 0xbc00, - 0xc000, - 0xc400, - 0xc800, - 0xcc00, - 0xd000, - 0xd400, - 0xd800, - 0xdc00, - 0xe000, - 0xe400, - 0xe800, - 0xec00, - 0xf000, - 0xf400, - 0xf800, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, - 0xfc00, -}; - -const uint8_t util_float_to_half_shift_table[512] = { - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x17, - 0x16, - 0x15, - 0x14, - 0x13, - 0x12, - 0x11, - 0x10, - 0xf, - 0xe, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0xd, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x17, - 0x16, - 0x15, - 0x14, - 0x13, - 0x12, - 0x11, - 0x10, - 0xf, - 0xe, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0xd, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0x18, - 0xd, -}; diff --git a/dll/opengl/mesa/generated/glsl/builtin_function.cpp b/dll/opengl/mesa/generated/glsl/builtin_function.cpp deleted file mode 100644 index ff1ee760a1f..00000000000 --- a/dll/opengl/mesa/generated/glsl/builtin_function.cpp +++ /dev/null @@ -1,16352 +0,0 @@ -/* DO NOT MODIFY - automatically generated by generate_builtins.py */ -/* - * Copyright 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include -#include "main/core.h" /* for struct gl_shader */ -#include "glsl_parser_extras.h" -#include "ir_reader.h" -#include "program.h" -#include "ast.h" - -extern "C" struct gl_shader * -_mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type); - -gl_shader * -read_builtins(GLenum target, const char *protos, const char **functions, unsigned count) -{ - struct gl_context fakeCtx; - fakeCtx.API = API_OPENGL; - fakeCtx.Const.GLSLVersion = 130; - fakeCtx.Extensions.ARB_ES2_compatibility = true; - gl_shader *sh = _mesa_new_shader(NULL, 0, target); - struct _mesa_glsl_parse_state *st = - new(sh) _mesa_glsl_parse_state(&fakeCtx, target, sh); - - st->language_version = 130; - st->symbols->language_version = 130; - st->ARB_texture_rectangle_enable = true; - st->EXT_texture_array_enable = true; - st->OES_EGL_image_external_enable = true; - _mesa_glsl_initialize_types(st); - - sh->ir = new(sh) exec_list; - sh->symbols = st->symbols; - - /* Read the IR containing the prototypes */ - _mesa_glsl_read_ir(st, sh->ir, protos, true); - - /* Read ALL the function bodies, telling the IR reader not to scan for - * prototypes (we've already created them). The IR reader will skip any - * signature that does not already exist as a prototype. - */ - for (unsigned i = 0; i < count; i++) { - _mesa_glsl_read_ir(st, sh->ir, functions[i], false); - - if (st->error) { - printf("error reading builtin: %.35s ...\n", functions[i]); - printf("Info log:\n%s\n", st->info_log); - ralloc_free(sh); - return NULL; - } - } - - reparent_ir(sh->ir, sh); - delete st; - - return sh; -} - -static const char builtin_abs[] = - "((function abs\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0))\n" - " ((return (expression float abs (var_ref arg0)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0))\n" - " ((return (expression vec2 abs (var_ref arg0)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0))\n" - " ((return (expression vec3 abs (var_ref arg0)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0))\n" - " ((return (expression vec4 abs (var_ref arg0)))))\n" - "\n" - " (signature int\n" - " (parameters\n" - " (declare (in) int arg0))\n" - " ((return (expression int abs (var_ref arg0)))))\n" - "\n" - " (signature ivec2\n" - " (parameters\n" - " (declare (in) ivec2 arg0))\n" - " ((return (expression ivec2 abs (var_ref arg0)))))\n" - "\n" - " (signature ivec3\n" - " (parameters\n" - " (declare (in) ivec3 arg0))\n" - " ((return (expression ivec3 abs (var_ref arg0)))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) ivec4 arg0))\n" - " ((return (expression ivec4 abs (var_ref arg0)))))\n" - "))\n" - "" -; -static const char builtin_acos[] = - "((function acos\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ((return (expression float - (constant float (1.5707964))\n" - " (call asin ((var_ref x)))))))\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ((return (expression vec2 - (constant float (1.5707964))\n" - " (call asin ((var_ref x)))))))\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ((return (expression vec3 - (constant float (1.5707964))\n" - " (call asin ((var_ref x)))))))\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ((return (expression vec4 - (constant float (1.5707964))\n" - " (call asin ((var_ref x)))))))\n" - "))\n" - "" -; -static const char builtin_acosh[] = - "((function acosh\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ((return (expression float log (expression float + (var_ref x) (expression float sqrt (expression float - (expression float * (var_ref x) (var_ref x)) (constant float (1)))))))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ((return (expression vec2 log (expression vec2 + (var_ref x) (expression vec2 sqrt (expression vec2 - (expression vec2 * (var_ref x) (var_ref x)) (constant float (1)))))))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ((return (expression vec3 log (expression vec3 + (var_ref x) (expression vec3 sqrt (expression vec3 - (expression vec3 * (var_ref x) (var_ref x)) (constant float (1)))))))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ((return (expression vec4 log (expression vec4 + (var_ref x) (expression vec4 sqrt (expression vec4 - (expression vec4 * (var_ref x) (var_ref x)) (constant float (1)))))))))\n" - "))\n" - "" -; -static const char builtin_all[] = - "((function all\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec2 arg0))\n" - " ((return (expression bool && (swiz x (var_ref arg0))(swiz y (var_ref arg0))))))\n" - "\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec3 arg0))\n" - " ((return (expression bool && (expression bool && (swiz x (var_ref arg0))(swiz y (var_ref arg0))) (swiz z (var_ref arg0))))))\n" - "\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec4 arg0))\n" - " ((return (expression bool && (expression bool && (expression bool && (swiz x (var_ref arg0))(swiz y (var_ref arg0))) (swiz z (var_ref arg0))) (swiz w (var_ref arg0))))))\n" - "))\n" - "" -; -static const char builtin_any[] = - "((function any\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec2 arg0))\n" - " ((return (expression bool any (var_ref arg0)))))\n" - "\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec3 arg0))\n" - " ((return (expression bool any (var_ref arg0)))))\n" - "\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec4 arg0))\n" - " ((return (expression bool any (var_ref arg0)))))\n" - "))\n" - "" -; -static const char builtin_asin[] = - "((function asin\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ((return (expression float *\n" - " (expression float sign (var_ref x))\n" - " (expression float -\n" - " (constant float (1.5707964))\n" - " (expression float *\n" - " (expression float sqrt\n" - " (expression float -\n" - " (constant float (1.0))\n" - " (expression float abs (var_ref x))))\n" - " (expression float +\n" - " (constant float (1.5707964))\n" - " (expression float *\n" - " (expression float abs (var_ref x))\n" - " (expression float +\n" - " (constant float (-0.21460183))\n" - " (expression float *\n" - " (expression float abs (var_ref x))\n" - " (expression float +\n" - " (constant float (0.086566724))\n" - " (expression float *\n" - " (expression float abs (var_ref x))\n" - " (constant float (-0.03102955))\n" - " ))))))))))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ((return (expression vec2 *\n" - " (expression vec2 sign (var_ref x))\n" - " (expression vec2 -\n" - " (constant float (1.5707964))\n" - " (expression vec2 *\n" - " (expression vec2 sqrt\n" - " (expression vec2 -\n" - " (constant float (1.0))\n" - " (expression vec2 abs (var_ref x))))\n" - " (expression vec2 +\n" - " (constant float (1.5707964))\n" - " (expression vec2 *\n" - " (expression vec2 abs (var_ref x))\n" - " (expression vec2 +\n" - " (constant float (-0.21460183))\n" - " (expression vec2 *\n" - " (expression vec2 abs (var_ref x))\n" - " (expression vec2 +\n" - " (constant float (0.086566724))\n" - " (expression vec2 *\n" - " (expression vec2 abs (var_ref x))\n" - " (constant float (-0.03102955))\n" - " ))))))))))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ((return (expression vec3 *\n" - " (expression vec3 sign (var_ref x))\n" - " (expression vec3 -\n" - " (constant float (1.5707964))\n" - " (expression vec3 *\n" - " (expression vec3 sqrt\n" - " (expression vec3 -\n" - " (constant float (1.0))\n" - " (expression vec3 abs (var_ref x))))\n" - " (expression vec3 +\n" - " (constant float (1.5707964))\n" - " (expression vec3 *\n" - " (expression vec3 abs (var_ref x))\n" - " (expression vec3 +\n" - " (constant float (-0.21460183))\n" - " (expression vec3 *\n" - " (expression vec3 abs (var_ref x))\n" - " (expression vec3 +\n" - " (constant float (0.086566724))\n" - " (expression vec3 *\n" - " (expression vec3 abs (var_ref x))\n" - " (constant float (-0.03102955))\n" - " ))))))))))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ((return (expression vec4 *\n" - " (expression vec4 sign (var_ref x))\n" - " (expression vec4 -\n" - " (constant float (1.5707964))\n" - " (expression vec4 *\n" - " (expression vec4 sqrt\n" - " (expression vec4 -\n" - " (constant float (1.0))\n" - " (expression vec4 abs (var_ref x))))\n" - " (expression vec4 +\n" - " (constant float (1.5707964))\n" - " (expression vec4 *\n" - " (expression vec4 abs (var_ref x))\n" - " (expression vec4 +\n" - " (constant float (-0.21460183))\n" - " (expression vec4 *\n" - " (expression vec4 abs (var_ref x))\n" - " (expression vec4 +\n" - " (constant float (0.086566724))\n" - " (expression vec4 *\n" - " (expression vec4 abs (var_ref x))\n" - " (constant float (-0.03102955))\n" - " ))))))))))))\n" - "))\n" - "" -; -static const char builtin_asinh[] = - "((function asinh\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ((return (expression float *\n" - " (expression float sign (var_ref x))\n" - " (expression float log\n" - " (expression float +\n" - " (expression float abs (var_ref x))\n" - " (expression float sqrt\n" - " (expression float +\n" - " (expression float * (var_ref x) (var_ref x))\n" - " (constant float (1))))))))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ((return (expression vec2 *\n" - " (expression vec2 sign (var_ref x))\n" - " (expression vec2 log\n" - " (expression vec2 +\n" - " (expression vec2 abs (var_ref x))\n" - " (expression vec2 sqrt\n" - " (expression vec2 +\n" - " (expression vec2 * (var_ref x) (var_ref x))\n" - " (constant float (1))))))))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ((return (expression vec3 *\n" - " (expression vec3 sign (var_ref x))\n" - " (expression vec3 log\n" - " (expression vec3 +\n" - " (expression vec3 abs (var_ref x))\n" - " (expression vec3 sqrt\n" - " (expression vec3 +\n" - " (expression vec3 * (var_ref x) (var_ref x))\n" - " (constant float (1))))))))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ((return (expression vec4 *\n" - " (expression vec4 sign (var_ref x))\n" - " (expression vec4 log\n" - " (expression vec4 +\n" - " (expression vec4 abs (var_ref x))\n" - " (expression vec4 sqrt\n" - " (expression vec4 +\n" - " (expression vec4 * (var_ref x) (var_ref x))\n" - " (constant float (1))))))))))\n" - "))\n" - "" -; -static const char builtin_atan[] = - "((function atan\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float y_over_x))\n" - " ((return (call asin ((expression float *\n" - " (var_ref y_over_x)\n" - " (expression float rsq\n" - " (expression float +\n" - " (expression float *\n" - " (var_ref y_over_x)\n" - " (var_ref y_over_x))\n" - " (constant float (1.0))))))))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 y_over_x))\n" - " ((return (call asin ((expression vec2 *\n" - " (var_ref y_over_x)\n" - " (expression vec2 rsq\n" - " (expression vec2 +\n" - " (expression vec2 *\n" - " (var_ref y_over_x)\n" - " (var_ref y_over_x))\n" - " (constant float (1.0))))))))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 y_over_x))\n" - " ((return (call asin ((expression vec3 *\n" - " (var_ref y_over_x)\n" - " (expression vec3 rsq\n" - " (expression vec3 +\n" - " (expression vec3 *\n" - " (var_ref y_over_x)\n" - " (var_ref y_over_x))\n" - " (constant float (1.0))))))))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 y_over_x))\n" - " ((return (call asin ((expression vec4 *\n" - " (var_ref y_over_x)\n" - " (expression vec4 rsq\n" - " (expression vec4 +\n" - " (expression vec4 *\n" - " (var_ref y_over_x)\n" - " (var_ref y_over_x))\n" - " (constant float (1.0))))))))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in ) float y)\n" - " (declare (in ) float x)\n" - " )\n" - " (\n" - " (declare () float r)\n" - " (if (expression bool >\n" - " (expression float abs (var_ref x))\n" - " (expression float * (constant float (1.0e-8)) (expression float abs (var_ref y)))) (\n" - " (assign (x) (var_ref r) (call atan ((expression float / (var_ref y) (var_ref x)))))\n" - " (if (expression bool < (var_ref x) (constant float (0.000000)) ) (\n" - " (if (expression bool >= (var_ref y) (constant float (0.000000)) )\n" - " ((assign (x) (var_ref r) (expression float + (var_ref r) (constant float (3.141593)))))\n" - " ((assign (x) (var_ref r) (expression float - (var_ref r) (constant float (3.141593))))))\n" - " )\n" - " (\n" - " ))\n" - " )\n" - " (\n" - " (declare () float sgn)\n" - " (assign (x) (var_ref sgn) (expression float sign (var_ref y)))\n" - " (assign (x) (var_ref r) (expression float * (var_ref sgn) (constant float (1.5707965))))\n" - " ))\n" - "\n" - " (return (var_ref r) )\n" - " ))\n" - "\n" - "\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 y)\n" - " (declare (in) vec2 x))\n" - " ((declare () vec2 r)\n" - " (assign (x) (var_ref r)\n" - " (call atan ((swiz x (var_ref y))\n" - " (swiz x (var_ref x)))))\n" - " (assign (y) (var_ref r)\n" - " (call atan ((swiz y (var_ref y))\n" - " (swiz y (var_ref x)))))\n" - " (return (var_ref r))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 y)\n" - " (declare (in) vec3 x))\n" - " ((declare () vec3 r)\n" - " (assign (x) (var_ref r)\n" - " (call atan ((swiz x (var_ref y))\n" - " (swiz x (var_ref x)))))\n" - " (assign (y) (var_ref r)\n" - " (call atan ((swiz y (var_ref y))\n" - " (swiz y (var_ref x)))))\n" - " (assign (z) (var_ref r)\n" - " (call atan ((swiz z (var_ref y))\n" - " (swiz z (var_ref x)))))\n" - " (return (var_ref r))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 y)\n" - " (declare (in) vec4 x))\n" - " ((declare () vec4 r)\n" - " (assign (x) (var_ref r)\n" - " (call atan ((swiz x (var_ref y))\n" - " (swiz x (var_ref x)))))\n" - " (assign (y) (var_ref r)\n" - " (call atan ((swiz y (var_ref y))\n" - " (swiz y (var_ref x)))))\n" - " (assign (z) (var_ref r)\n" - " (call atan ((swiz z (var_ref y))\n" - " (swiz z (var_ref x)))))\n" - " (assign (w) (var_ref r)\n" - " (call atan ((swiz w (var_ref y))\n" - " (swiz w (var_ref x)))))\n" - " (return (var_ref r)))))\n" - "\n" - "))\n" - "" -; -static const char builtin_atanh[] = - "((function atanh\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ((return (expression float * (constant float (0.5))\n" - " (expression float log\n" - " (expression float /\n" - " (expression float + (constant float (1)) (var_ref x))\n" - " (expression float - (constant float (1)) (var_ref x))))))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ((return (expression vec2 * (constant float (0.5))\n" - " (expression vec2 log\n" - " (expression vec2 /\n" - " (expression vec2 + (constant float (1)) (var_ref x))\n" - " (expression vec2 - (constant float (1)) (var_ref x))))))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ((return (expression vec3 * (constant float (0.5))\n" - " (expression vec3 log\n" - " (expression vec3 /\n" - " (expression vec3 + (constant float (1)) (var_ref x))\n" - " (expression vec3 - (constant float (1)) (var_ref x))))))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ((return (expression vec4 * (constant float (0.5))\n" - " (expression vec4 log\n" - " (expression vec4 /\n" - " (expression vec4 + (constant float (1)) (var_ref x))\n" - " (expression vec4 - (constant float (1)) (var_ref x))))))))\n" - "))\n" - "" -; -static const char builtin_ceil[] = - "((function ceil\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0))\n" - " ((return (expression float ceil (var_ref arg0)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0))\n" - " ((return (expression vec2 ceil (var_ref arg0)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0))\n" - " ((return (expression vec3 ceil (var_ref arg0)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0))\n" - " ((return (expression vec4 ceil (var_ref arg0)))))\n" - "))\n" - "" -; -static const char builtin_clamp[] = - "((function clamp\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0)\n" - " (declare (in) float arg1)\n" - " (declare (in) float arg2))\n" - " ((return (expression float max (expression float min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0)\n" - " (declare (in) vec2 arg1)\n" - " (declare (in) vec2 arg2))\n" - " ((return (expression vec2 max (expression vec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0)\n" - " (declare (in) vec3 arg1)\n" - " (declare (in) vec3 arg2))\n" - " ((return (expression vec3 max (expression vec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0)\n" - " (declare (in) vec4 arg1)\n" - " (declare (in) vec4 arg2))\n" - " ((return (expression vec4 max (expression vec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0)\n" - " (declare (in) float arg1)\n" - " (declare (in) float arg2))\n" - " ((return (expression vec2 max (expression vec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0)\n" - " (declare (in) float arg1)\n" - " (declare (in) float arg2))\n" - " ((return (expression vec3 max (expression vec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0)\n" - " (declare (in) float arg1)\n" - " (declare (in) float arg2))\n" - " ((return (expression vec4 max (expression vec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "\n" - " (signature int\n" - " (parameters\n" - " (declare (in) int arg0)\n" - " (declare (in) int arg1)\n" - " (declare (in) int arg2))\n" - " ((return (expression int max (expression int min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "\n" - " (signature ivec2\n" - " (parameters\n" - " (declare (in) ivec2 arg0)\n" - " (declare (in) ivec2 arg1)\n" - " (declare (in) ivec2 arg2))\n" - " ((return (expression ivec2 max (expression ivec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "\n" - " (signature ivec3\n" - " (parameters\n" - " (declare (in) ivec3 arg0)\n" - " (declare (in) ivec3 arg1)\n" - " (declare (in) ivec3 arg2))\n" - " ((return (expression ivec3 max (expression ivec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) ivec4 arg0)\n" - " (declare (in) ivec4 arg1)\n" - " (declare (in) ivec4 arg2))\n" - " ((return (expression ivec4 max (expression ivec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "\n" - " (signature ivec2\n" - " (parameters\n" - " (declare (in) ivec2 arg0)\n" - " (declare (in) int arg1)\n" - " (declare (in) int arg2))\n" - " ((return (expression ivec2 max (expression ivec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "\n" - " (signature ivec3\n" - " (parameters\n" - " (declare (in) ivec3 arg0)\n" - " (declare (in) int arg1)\n" - " (declare (in) int arg2))\n" - " ((return (expression ivec3 max (expression ivec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) ivec4 arg0)\n" - " (declare (in) int arg1)\n" - " (declare (in) int arg2))\n" - " ((return (expression ivec4 max (expression ivec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "\n" - " (signature uint\n" - " (parameters\n" - " (declare (in) uint arg0)\n" - " (declare (in) uint arg1)\n" - " (declare (in) uint arg2))\n" - " ((return (expression uint max (expression uint min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "\n" - " (signature uvec2\n" - " (parameters\n" - " (declare (in) uvec2 arg0)\n" - " (declare (in) uvec2 arg1)\n" - " (declare (in) uvec2 arg2))\n" - " ((return (expression uvec2 max (expression uvec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "\n" - " (signature uvec3\n" - " (parameters\n" - " (declare (in) uvec3 arg0)\n" - " (declare (in) uvec3 arg1)\n" - " (declare (in) uvec3 arg2))\n" - " ((return (expression uvec3 max (expression uvec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) uvec4 arg0)\n" - " (declare (in) uvec4 arg1)\n" - " (declare (in) uvec4 arg2))\n" - " ((return (expression uvec4 max (expression uvec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "\n" - " (signature uvec2\n" - " (parameters\n" - " (declare (in) uvec2 arg0)\n" - " (declare (in) uint arg1)\n" - " (declare (in) uint arg2))\n" - " ((return (expression uvec2 max (expression uvec2 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "\n" - " (signature uvec3\n" - " (parameters\n" - " (declare (in) uvec3 arg0)\n" - " (declare (in) uint arg1)\n" - " (declare (in) uint arg2))\n" - " ((return (expression uvec3 max (expression uvec3 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) uvec4 arg0)\n" - " (declare (in) uint arg1)\n" - " (declare (in) uint arg2))\n" - " ((return (expression uvec4 max (expression uvec4 min (var_ref arg0) (var_ref arg2)) (var_ref arg1)))))\n" - "))\n" - "" -; -static const char builtin_cos[] = - "((function cos\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ((return (expression float cos (var_ref angle)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ((return (expression vec2 cos (var_ref angle)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ((return (expression vec3 cos (var_ref angle)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ((return (expression vec4 cos (var_ref angle)))))\n" - "))\n" - "" -; -static const char builtin_cosh[] = - "((function cosh\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ((return (expression float * (constant float (0.5))\n" - " (expression float +\n" - " (expression float exp (var_ref x))\n" - " (expression float exp (expression float neg (var_ref x))))))))\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ((return (expression vec2 * (constant float (0.5))\n" - " (expression vec2 +\n" - " (expression vec2 exp (var_ref x))\n" - " (expression vec2 exp (expression vec2 neg (var_ref x))))))))\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ((return (expression vec3 * (constant float (0.5))\n" - " (expression vec3 +\n" - " (expression vec3 exp (var_ref x))\n" - " (expression vec3 exp (expression vec3 neg (var_ref x))))))))\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ((return (expression vec4 * (constant float (0.5))\n" - " (expression vec4 +\n" - " (expression vec4 exp (var_ref x))\n" - " (expression vec4 exp (expression vec4 neg (var_ref x))))))))\n" - "))\n" - "" -; -static const char builtin_cross[] = - "((function cross\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 a)\n" - " (declare (in) vec3 b))\n" - " ((return (expression vec3 -\n" - " (expression vec3 * (swiz yzx (var_ref a)) (swiz zxy (var_ref b)))\n" - " (expression vec3 * (swiz zxy (var_ref a)) (swiz yzx (var_ref b)))))))\n" - "))\n" - "" -; -static const char builtin_dFdx[] = - "((function dFdx\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float p))\n" - " ((return (expression float dFdx (var_ref p)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 p))\n" - " ((return (expression vec2 dFdx (var_ref p)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 p))\n" - " ((return (expression vec3 dFdx (var_ref p)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 p))\n" - " ((return (expression vec4 dFdx (var_ref p)))))\n" - "))\n" - "" -; -static const char builtin_dFdy[] = - "((function dFdy\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float p))\n" - " ((return (expression float dFdy (var_ref p)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 p))\n" - " ((return (expression vec2 dFdy (var_ref p)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 p))\n" - " ((return (expression vec3 dFdy (var_ref p)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 p))\n" - " ((return (expression vec4 dFdy (var_ref p)))))\n" - "))\n" - "" -; -static const char builtin_degrees[] = - "((function degrees\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0))\n" - " ((return (expression float * (var_ref arg0) (constant float (57.295780))))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0))\n" - " ((return (expression vec2 * (var_ref arg0) (constant float (57.295780))))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0))\n" - " ((return (expression vec3 * (var_ref arg0) (constant float (57.295780))))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0))\n" - " ((return (expression vec4 * (var_ref arg0) (constant float (57.295780))))))\n" - "))\n" - "" -; -static const char builtin_distance[] = - "((function distance\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float p0)\n" - " (declare (in) float p1))\n" - " ((return (expression float abs (expression float - (var_ref p0) (var_ref p1))))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 p0)\n" - " (declare (in) vec2 p1))\n" - " ((declare () vec2 p)\n" - " (assign (xy) (var_ref p) (expression vec2 - (var_ref p0) (var_ref p1)))\n" - " (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 p0)\n" - " (declare (in) vec3 p1))\n" - " ((declare () vec3 p)\n" - " (assign (xyz) (var_ref p) (expression vec3 - (var_ref p0) (var_ref p1)))\n" - " (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 p0)\n" - " (declare (in) vec4 p1))\n" - " ((declare () vec4 p)\n" - " (assign (xyzw) (var_ref p) (expression vec4 - (var_ref p0) (var_ref p1)))\n" - " (return (expression float sqrt (expression float dot (var_ref p) (var_ref p))))))\n" - "))\n" - "" -; -static const char builtin_dot[] = - "((function dot\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0)\n" - " (declare (in) float arg1))\n" - " ((return (expression float * (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 arg0)\n" - " (declare (in) vec2 arg1))\n" - " ((return (expression float dot (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 arg0)\n" - " (declare (in) vec3 arg1))\n" - " ((return (expression float dot (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 arg0)\n" - " (declare (in) vec4 arg1))\n" - " ((return (expression float dot (var_ref arg0) (var_ref arg1)))))\n" - "))\n" - "" -; -static const char builtin_equal[] = - "((function equal\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 arg0)\n" - " (declare (in) vec2 arg1))\n" - " ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 arg0)\n" - " (declare (in) vec3 arg1))\n" - " ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 arg0)\n" - " (declare (in) vec4 arg1))\n" - " ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 arg0)\n" - " (declare (in) bvec2 arg1))\n" - " ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 arg0)\n" - " (declare (in) bvec3 arg1))\n" - " ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 arg0)\n" - " (declare (in) bvec4 arg1))\n" - " ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 arg0)\n" - " (declare (in) ivec2 arg1))\n" - " ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 arg0)\n" - " (declare (in) ivec3 arg1))\n" - " ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 arg0)\n" - " (declare (in) ivec4 arg1))\n" - " ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) uvec2 arg0)\n" - " (declare (in) uvec2 arg1))\n" - " ((return (expression bvec2 == (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) uvec3 arg0)\n" - " (declare (in) uvec3 arg1))\n" - " ((return (expression bvec3 == (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) uvec4 arg0)\n" - " (declare (in) uvec4 arg1))\n" - " ((return (expression bvec4 == (var_ref arg0) (var_ref arg1)))))\n" - "))\n" - "" -; -static const char builtin_exp[] = - "((function exp\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0))\n" - " ((return (expression float exp (var_ref arg0)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0))\n" - " ((return (expression vec2 exp (var_ref arg0)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0))\n" - " ((return (expression vec3 exp (var_ref arg0)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0))\n" - " ((return (expression vec4 exp (var_ref arg0)))))\n" - "))\n" - "" -; -static const char builtin_exp2[] = - "((function exp2\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0))\n" - " ((return (expression float exp2 (var_ref arg0)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0))\n" - " ((return (expression vec2 exp2 (var_ref arg0)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0))\n" - " ((return (expression vec3 exp2 (var_ref arg0)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0))\n" - " ((return (expression vec4 exp2 (var_ref arg0)))))\n" - "))\n" - "" -; -static const char builtin_faceforward[] = - "((function faceforward\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float N)\n" - " (declare (in) float I)\n" - " (declare (in) float Nref))\n" - " ((if (expression bool < (expression float * (var_ref Nref) (var_ref I)) (constant float (0)))\n" - " ((return (var_ref N)))\n" - " ((return (expression float neg (var_ref N)))))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 N)\n" - " (declare (in) vec2 I)\n" - " (declare (in) vec2 Nref))\n" - " ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))\n" - " ((return (var_ref N)))\n" - " ((return (expression vec2 neg (var_ref N)))))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 N)\n" - " (declare (in) vec3 I)\n" - " (declare (in) vec3 Nref))\n" - " ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))\n" - " ((return (var_ref N)))\n" - " ((return (expression vec3 neg (var_ref N)))))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 N)\n" - " (declare (in) vec4 I)\n" - " (declare (in) vec4 Nref))\n" - " ((if (expression bool < (expression float dot (var_ref Nref) (var_ref I)) (constant float (0)))\n" - " ((return (var_ref N)))\n" - " ((return (expression vec4 neg (var_ref N)))))))\n" - "))\n" - "" -; -static const char builtin_floor[] = - "((function floor\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0))\n" - " ((return (expression float floor (var_ref arg0)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0))\n" - " ((return (expression vec2 floor (var_ref arg0)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0))\n" - " ((return (expression vec3 floor (var_ref arg0)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0))\n" - " ((return (expression vec4 floor (var_ref arg0)))))\n" - "))\n" - "" -; -static const char builtin_fract[] = - "((function fract\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ((return (expression float fract (var_ref x)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ((return (expression vec2 fract (var_ref x)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ((return (expression vec3 fract (var_ref x)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ((return (expression vec4 fract (var_ref x)))))\n" - "))\n" - "\n" - "" -; -static const char builtin_ftransform[] = - "((declare (uniform) mat4 gl_ModelViewProjectionMatrix)\n" - " (declare (in) vec4 gl_Vertex)\n" - " (function ftransform\n" - " (signature vec4\n" - " (parameters)\n" - " ((return (expression vec4 *\n" - " (var_ref gl_ModelViewProjectionMatrix)\n" - " (var_ref gl_Vertex)))))\n" - "))\n" - "" -; -static const char builtin_fwidth[] = - "((function fwidth\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float p))\n" - " ((return (expression float +\n" - " (expression float abs (expression float dFdx (var_ref p)))\n" - " (expression float abs (expression float dFdy (var_ref p)))))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 p))\n" - " ((return (expression vec2 +\n" - " (expression vec2 abs (expression vec2 dFdx (var_ref p)))\n" - " (expression vec2 abs (expression vec2 dFdy (var_ref p)))))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 p))\n" - " ((return (expression vec3 +\n" - " (expression vec3 abs (expression vec3 dFdx (var_ref p)))\n" - " (expression vec3 abs (expression vec3 dFdy (var_ref p)))))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 p))\n" - " ((return (expression vec4 +\n" - " (expression vec4 abs (expression vec4 dFdx (var_ref p)))\n" - " (expression vec4 abs (expression vec4 dFdy (var_ref p)))))))\n" - "))\n" - "" -; -static const char builtin_greaterThan[] = - "((function greaterThan\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 arg0)\n" - " (declare (in) vec2 arg1))\n" - " ((return (expression bvec2 > (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 arg0)\n" - " (declare (in) vec3 arg1))\n" - " ((return (expression bvec3 > (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 arg0)\n" - " (declare (in) vec4 arg1))\n" - " ((return (expression bvec4 > (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 arg0)\n" - " (declare (in) ivec2 arg1))\n" - " ((return (expression bvec2 > (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 arg0)\n" - " (declare (in) ivec3 arg1))\n" - " ((return (expression bvec3 > (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 arg0)\n" - " (declare (in) ivec4 arg1))\n" - " ((return (expression bvec4 > (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) uvec2 arg0)\n" - " (declare (in) uvec2 arg1))\n" - " ((return (expression bvec2 > (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) uvec3 arg0)\n" - " (declare (in) uvec3 arg1))\n" - " ((return (expression bvec3 > (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) uvec4 arg0)\n" - " (declare (in) uvec4 arg1))\n" - " ((return (expression bvec4 > (var_ref arg0) (var_ref arg1)))))\n" - "))\n" - "" -; -static const char builtin_greaterThanEqual[] = - "((function greaterThanEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 arg0)\n" - " (declare (in) vec2 arg1))\n" - " ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 arg0)\n" - " (declare (in) vec3 arg1))\n" - " ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 arg0)\n" - " (declare (in) vec4 arg1))\n" - " ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 arg0)\n" - " (declare (in) ivec2 arg1))\n" - " ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 arg0)\n" - " (declare (in) ivec3 arg1))\n" - " ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 arg0)\n" - " (declare (in) ivec4 arg1))\n" - " ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) uvec2 arg0)\n" - " (declare (in) uvec2 arg1))\n" - " ((return (expression bvec2 >= (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) uvec3 arg0)\n" - " (declare (in) uvec3 arg1))\n" - " ((return (expression bvec3 >= (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) uvec4 arg0)\n" - " (declare (in) uvec4 arg1))\n" - " ((return (expression bvec4 >= (var_ref arg0) (var_ref arg1)))))\n" - "))\n" - "" -; -static const char builtin_inversesqrt[] = - "((function inversesqrt\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0))\n" - " ((return (expression float rsq (var_ref arg0)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0))\n" - " ((return (expression vec2 rsq (var_ref arg0)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0))\n" - " ((return (expression vec3 rsq (var_ref arg0)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0))\n" - " ((return (expression vec4 rsq (var_ref arg0)))))\n" - "))\n" - "" -; -static const char builtin_isinf[] = - "((function isinf\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) float x))\n" - " ((return (expression bool == (expression float abs (var_ref x)) (constant float (+INF))))))\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ((return (expression bvec2 == (expression vec2 abs (var_ref x)) (constant vec2 (+INF +INF))))))\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ((return (expression bvec3 == (expression vec3 abs (var_ref x)) (constant vec3 (+INF +INF +INF))))))\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ((return (expression bvec4 == (expression vec4 abs (var_ref x)) (constant vec4 (+INF +INF +INF +INF))))))))\n" - "" -; -static const char builtin_isnan[] = - "((function isnan\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) float x))\n" - " ((return (expression bool != (var_ref x) (var_ref x)))))\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ((return (expression bvec2 != (var_ref x) (var_ref x)))))\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ((return (expression bvec3 != (var_ref x) (var_ref x)))))\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ((return (expression bvec4 != (var_ref x) (var_ref x)))))))\n" - "" -; -static const char builtin_length[] = - "((function length\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0))\n" - " ((return (expression float abs (var_ref arg0)))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 arg0))\n" - " ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 arg0))\n" - " ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 arg0))\n" - " ((return (expression float sqrt (expression float dot (var_ref arg0) (var_ref arg0))))))\n" - "))\n" - "" -; -static const char builtin_lessThan[] = - "((function lessThan\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 arg0)\n" - " (declare (in) vec2 arg1))\n" - " ((return (expression bvec2 < (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 arg0)\n" - " (declare (in) vec3 arg1))\n" - " ((return (expression bvec3 < (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 arg0)\n" - " (declare (in) vec4 arg1))\n" - " ((return (expression bvec4 < (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 arg0)\n" - " (declare (in) ivec2 arg1))\n" - " ((return (expression bvec2 < (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 arg0)\n" - " (declare (in) ivec3 arg1))\n" - " ((return (expression bvec3 < (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 arg0)\n" - " (declare (in) ivec4 arg1))\n" - " ((return (expression bvec4 < (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) uvec2 arg0)\n" - " (declare (in) uvec2 arg1))\n" - " ((return (expression bvec2 < (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) uvec3 arg0)\n" - " (declare (in) uvec3 arg1))\n" - " ((return (expression bvec3 < (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) uvec4 arg0)\n" - " (declare (in) uvec4 arg1))\n" - " ((return (expression bvec4 < (var_ref arg0) (var_ref arg1)))))\n" - "))\n" - "" -; -static const char builtin_lessThanEqual[] = - "((function lessThanEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 arg0)\n" - " (declare (in) vec2 arg1))\n" - " ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 arg0)\n" - " (declare (in) vec3 arg1))\n" - " ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 arg0)\n" - " (declare (in) vec4 arg1))\n" - " ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 arg0)\n" - " (declare (in) ivec2 arg1))\n" - " ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 arg0)\n" - " (declare (in) ivec3 arg1))\n" - " ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 arg0)\n" - " (declare (in) ivec4 arg1))\n" - " ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) uvec2 arg0)\n" - " (declare (in) uvec2 arg1))\n" - " ((return (expression bvec2 <= (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) uvec3 arg0)\n" - " (declare (in) uvec3 arg1))\n" - " ((return (expression bvec3 <= (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) uvec4 arg0)\n" - " (declare (in) uvec4 arg1))\n" - " ((return (expression bvec4 <= (var_ref arg0) (var_ref arg1)))))\n" - "))\n" - "" -; -static const char builtin_log[] = - "((function log\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0))\n" - " ((return (expression float log (var_ref arg0)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0))\n" - " ((return (expression vec2 log (var_ref arg0)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0))\n" - " ((return (expression vec3 log (var_ref arg0)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0))\n" - " ((return (expression vec4 log (var_ref arg0)))))\n" - "))\n" - "" -; -static const char builtin_log2[] = - "((function log2\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0))\n" - " ((return (expression float log2 (var_ref arg0)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0))\n" - " ((return (expression vec2 log2 (var_ref arg0)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0))\n" - " ((return (expression vec3 log2 (var_ref arg0)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0))\n" - " ((return (expression vec4 log2 (var_ref arg0)))))\n" - "))\n" - "" -; -static const char builtin_matrixCompMult[] = - "((function matrixCompMult\n" - " (signature mat2\n" - " (parameters\n" - " (declare (in) mat2 x)\n" - " (declare (in) mat2 y))\n" - " ((declare () mat2 z)\n" - " (assign (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n" - " (assign (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n" - "(return (var_ref z))))\n" - "\n" - " (signature mat3\n" - " (parameters\n" - " (declare (in) mat3 x)\n" - " (declare (in) mat3 y))\n" - " ((declare () mat3 z)\n" - " (assign (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n" - " (assign (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n" - " (assign (xyz) (array_ref (var_ref z) (constant int (2))) (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n" - "(return (var_ref z))))\n" - "\n" - " (signature mat4\n" - " (parameters\n" - " (declare (in) mat4 x)\n" - " (declare (in) mat4 y))\n" - " ((declare () mat4 z)\n" - " (assign (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n" - " (assign (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n" - " (assign (xyzw) (array_ref (var_ref z) (constant int (2))) (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n" - " (assign (xyzw) (array_ref (var_ref z) (constant int (3))) (expression vec4 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))\n" - "(return (var_ref z))))\n" - "\n" - " (signature mat2x3\n" - " (parameters\n" - " (declare (in) mat2x3 x)\n" - " (declare (in) mat2x3 y))\n" - " ((declare () mat2x3 z)\n" - " (assign (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n" - " (assign (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n" - "(return (var_ref z))))\n" - "\n" - " (signature mat3x2\n" - " (parameters\n" - " (declare (in) mat3x2 x)\n" - " (declare (in) mat3x2 y))\n" - " ((declare () mat3x2 z)\n" - " (assign (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n" - " (assign (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n" - " (assign (xy) (array_ref (var_ref z) (constant int (2))) (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n" - "(return (var_ref z))))\n" - "\n" - " (signature mat2x4\n" - " (parameters\n" - " (declare (in) mat2x4 x)\n" - " (declare (in) mat2x4 y))\n" - " ((declare () mat2x4 z)\n" - " (assign (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n" - " (assign (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n" - "(return (var_ref z))))\n" - "\n" - " (signature mat4x2\n" - " (parameters\n" - " (declare (in) mat4x2 x)\n" - " (declare (in) mat4x2 y))\n" - " ((declare () mat4x2 z)\n" - " (assign (xy) (array_ref (var_ref z) (constant int (0))) (expression vec2 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n" - " (assign (xy) (array_ref (var_ref z) (constant int (1))) (expression vec2 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n" - " (assign (xy) (array_ref (var_ref z) (constant int (2))) (expression vec2 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n" - " (assign (xy) (array_ref (var_ref z) (constant int (3))) (expression vec2 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))\n" - "(return (var_ref z))))\n" - "\n" - " (signature mat3x4\n" - " (parameters\n" - " (declare (in) mat3x4 x)\n" - " (declare (in) mat3x4 y))\n" - " ((declare () mat3x4 z)\n" - " (assign (xyzw) (array_ref (var_ref z) (constant int (0))) (expression vec4 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n" - " (assign (xyzw) (array_ref (var_ref z) (constant int (1))) (expression vec4 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n" - " (assign (xyzw) (array_ref (var_ref z) (constant int (2))) (expression vec4 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n" - "(return (var_ref z))))\n" - "\n" - " (signature mat4x3\n" - " (parameters\n" - " (declare (in) mat4x3 x)\n" - " (declare (in) mat4x3 y))\n" - " ((declare () mat4x3 z)\n" - " (assign (xyz) (array_ref (var_ref z) (constant int (0))) (expression vec3 * (array_ref (var_ref x) (constant int (0))) (array_ref (var_ref y) (constant int (0)))))\n" - " (assign (xyz) (array_ref (var_ref z) (constant int (1))) (expression vec3 * (array_ref (var_ref x) (constant int (1))) (array_ref (var_ref y) (constant int (1)))))\n" - " (assign (xyz) (array_ref (var_ref z) (constant int (2))) (expression vec3 * (array_ref (var_ref x) (constant int (2))) (array_ref (var_ref y) (constant int (2)))))\n" - " (assign (xyz) (array_ref (var_ref z) (constant int (3))) (expression vec3 * (array_ref (var_ref x) (constant int (3))) (array_ref (var_ref y) (constant int (3)))))\n" - "(return (var_ref z))))\n" - "))\n" - "" -; -static const char builtin_max[] = - "((function max\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0)\n" - " (declare (in) float arg1))\n" - " ((return (expression float max (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0)\n" - " (declare (in) vec2 arg1))\n" - " ((return (expression vec2 max (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0)\n" - " (declare (in) vec3 arg1))\n" - " ((return (expression vec3 max (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0)\n" - " (declare (in) vec4 arg1))\n" - " ((return (expression vec4 max (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0)\n" - " (declare (in) float arg1))\n" - " ((return (expression vec2 max (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0)\n" - " (declare (in) float arg1))\n" - " ((return (expression vec3 max (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0)\n" - " (declare (in) float arg1))\n" - " ((return (expression vec4 max (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature int\n" - " (parameters\n" - " (declare (in) int arg0)\n" - " (declare (in) int arg1))\n" - " ((return (expression int max (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature ivec2\n" - " (parameters\n" - " (declare (in) ivec2 arg0)\n" - " (declare (in) ivec2 arg1))\n" - " ((return (expression ivec2 max (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature ivec3\n" - " (parameters\n" - " (declare (in) ivec3 arg0)\n" - " (declare (in) ivec3 arg1))\n" - " ((return (expression ivec3 max (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) ivec4 arg0)\n" - " (declare (in) ivec4 arg1))\n" - " ((return (expression ivec4 max (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature ivec2\n" - " (parameters\n" - " (declare (in) ivec2 arg0)\n" - " (declare (in) int arg1))\n" - " ((return (expression ivec2 max (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature ivec3\n" - " (parameters\n" - " (declare (in) ivec3 arg0)\n" - " (declare (in) int arg1))\n" - " ((return (expression ivec3 max (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) ivec4 arg0)\n" - " (declare (in) int arg1))\n" - " ((return (expression ivec4 max (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature uint\n" - " (parameters\n" - " (declare (in) uint arg0)\n" - " (declare (in) uint arg1))\n" - " ((return (expression uint max (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature uvec2\n" - " (parameters\n" - " (declare (in) uvec2 arg0)\n" - " (declare (in) uvec2 arg1))\n" - " ((return (expression uvec2 max (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature uvec3\n" - " (parameters\n" - " (declare (in) uvec3 arg0)\n" - " (declare (in) uvec3 arg1))\n" - " ((return (expression uvec3 max (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) uvec4 arg0)\n" - " (declare (in) uvec4 arg1))\n" - " ((return (expression uvec4 max (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature uvec2\n" - " (parameters\n" - " (declare (in) uvec2 arg0)\n" - " (declare (in) uint arg1))\n" - " ((return (expression uvec2 max (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature uvec3\n" - " (parameters\n" - " (declare (in) uvec3 arg0)\n" - " (declare (in) uint arg1))\n" - " ((return (expression uvec3 max (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) uvec4 arg0)\n" - " (declare (in) uint arg1))\n" - " ((return (expression uvec4 max (var_ref arg0) (var_ref arg1)))))\n" - "))\n" - "" -; -static const char builtin_min[] = - "((function min\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0)\n" - " (declare (in) float arg1))\n" - " ((return (expression float min (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0)\n" - " (declare (in) vec2 arg1))\n" - " ((return (expression vec2 min (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0)\n" - " (declare (in) vec3 arg1))\n" - " ((return (expression vec3 min (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0)\n" - " (declare (in) vec4 arg1))\n" - " ((return (expression vec4 min (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0)\n" - " (declare (in) float arg1))\n" - " ((return (expression vec2 min (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0)\n" - " (declare (in) float arg1))\n" - " ((return (expression vec3 min (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0)\n" - " (declare (in) float arg1))\n" - " ((return (expression vec4 min (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature int\n" - " (parameters\n" - " (declare (in) int arg0)\n" - " (declare (in) int arg1))\n" - " ((return (expression int min (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature ivec2\n" - " (parameters\n" - " (declare (in) ivec2 arg0)\n" - " (declare (in) ivec2 arg1))\n" - " ((return (expression ivec2 min (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature ivec3\n" - " (parameters\n" - " (declare (in) ivec3 arg0)\n" - " (declare (in) ivec3 arg1))\n" - " ((return (expression ivec3 min (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) ivec4 arg0)\n" - " (declare (in) ivec4 arg1))\n" - " ((return (expression ivec4 min (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature ivec2\n" - " (parameters\n" - " (declare (in) ivec2 arg0)\n" - " (declare (in) int arg1))\n" - " ((return (expression ivec2 min (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature ivec3\n" - " (parameters\n" - " (declare (in) ivec3 arg0)\n" - " (declare (in) int arg1))\n" - " ((return (expression ivec3 min (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) ivec4 arg0)\n" - " (declare (in) int arg1))\n" - " ((return (expression ivec4 min (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature uint\n" - " (parameters\n" - " (declare (in) uint arg0)\n" - " (declare (in) uint arg1))\n" - " ((return (expression uint min (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature uvec2\n" - " (parameters\n" - " (declare (in) uvec2 arg0)\n" - " (declare (in) uvec2 arg1))\n" - " ((return (expression uvec2 min (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature uvec3\n" - " (parameters\n" - " (declare (in) uvec3 arg0)\n" - " (declare (in) uvec3 arg1))\n" - " ((return (expression uvec3 min (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) uvec4 arg0)\n" - " (declare (in) uvec4 arg1))\n" - " ((return (expression uvec4 min (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature uvec2\n" - " (parameters\n" - " (declare (in) uvec2 arg0)\n" - " (declare (in) uint arg1))\n" - " ((return (expression uvec2 min (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature uvec3\n" - " (parameters\n" - " (declare (in) uvec3 arg0)\n" - " (declare (in) uint arg1))\n" - " ((return (expression uvec3 min (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) uvec4 arg0)\n" - " (declare (in) uint arg1))\n" - " ((return (expression uvec4 min (var_ref arg0) (var_ref arg1)))))\n" - "))\n" - "" -; -static const char builtin_mix[] = - "((function mix\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0)\n" - " (declare (in) float arg1)\n" - " (declare (in) float arg2))\n" - " ((return (expression float + (expression float * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression float * (var_ref arg1) (var_ref arg2))))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0)\n" - " (declare (in) vec2 arg1)\n" - " (declare (in) vec2 arg2))\n" - " ((return (expression vec2 + (expression vec2 * (var_ref arg0) (expression vec2 - (constant float (1.000000)) (var_ref arg2))) (expression vec2 * (var_ref arg1) (var_ref arg2))))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0)\n" - " (declare (in) vec3 arg1)\n" - " (declare (in) vec3 arg2))\n" - " ((return (expression vec3 + (expression vec3 * (var_ref arg0) (expression vec3 - (constant float (1.000000)) (var_ref arg2))) (expression vec3 * (var_ref arg1) (var_ref arg2))))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0)\n" - " (declare (in) vec4 arg1)\n" - " (declare (in) vec4 arg2))\n" - " ((return (expression vec4 + (expression vec4 * (var_ref arg0) (expression vec4 - (constant float (1.000000)) (var_ref arg2))) (expression vec4 * (var_ref arg1) (var_ref arg2))))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0)\n" - " (declare (in) vec2 arg1)\n" - " (declare (in) float arg2))\n" - " ((return (expression vec2 + (expression vec2 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec2 * (var_ref arg1) (var_ref arg2))))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0)\n" - " (declare (in) vec3 arg1)\n" - " (declare (in) float arg2))\n" - " ((return (expression vec3 + (expression vec3 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec3 * (var_ref arg1) (var_ref arg2))))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0)\n" - " (declare (in) vec4 arg1)\n" - " (declare (in) float arg2))\n" - " ((return (expression vec4 + (expression vec4 * (var_ref arg0) (expression float - (constant float (1.000000)) (var_ref arg2))) (expression vec4 * (var_ref arg1) (var_ref arg2))))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float v1)\n" - " (declare (in) float v2)\n" - " (declare (in) bool a))\n" - " ((assign (var_ref a) (x) (var_ref v1) (var_ref v2))\n" - " (return (var_ref v1))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 v1)\n" - " (declare (in) vec2 v2)\n" - " (declare (in) bvec2 a))\n" - " ((assign (swiz x (var_ref a)) (x) (var_ref v1) (swiz x (var_ref v2)))\n" - " (assign (swiz y (var_ref a)) (y) (var_ref v1) (swiz y (var_ref v2)))\n" - " (return (var_ref v1))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 v1)\n" - " (declare (in) vec3 v2)\n" - " (declare (in) bvec3 a))\n" - " ((assign (swiz x (var_ref a)) (x) (var_ref v1) (swiz x (var_ref v2)))\n" - " (assign (swiz y (var_ref a)) (y) (var_ref v1) (swiz y (var_ref v2)))\n" - " (assign (swiz z (var_ref a)) (z) (var_ref v1) (swiz z (var_ref v2)))\n" - " (return (var_ref v1))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 v1)\n" - " (declare (in) vec4 v2)\n" - " (declare (in) bvec4 a))\n" - " ((assign (swiz x (var_ref a)) (x) (var_ref v1) (swiz x (var_ref v2)))\n" - " (assign (swiz y (var_ref a)) (y) (var_ref v1) (swiz y (var_ref v2)))\n" - " (assign (swiz z (var_ref a)) (z) (var_ref v1) (swiz z (var_ref v2)))\n" - " (assign (swiz w (var_ref a)) (w) (var_ref v1) (swiz w (var_ref v2)))\n" - " (return (var_ref v1))))\n" - "))\n" - "" -; -static const char builtin_mod[] = - "((function mod\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0)\n" - " (declare (in) float arg1))\n" - " ((return (expression float % (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0)\n" - " (declare (in) vec2 arg1))\n" - " ((return (expression vec2 % (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0)\n" - " (declare (in) vec3 arg1))\n" - " ((return (expression vec3 % (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0)\n" - " (declare (in) vec4 arg1))\n" - " ((return (expression vec4 % (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0)\n" - " (declare (in) float arg1))\n" - " ((return (expression vec2 % (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0)\n" - " (declare (in) float arg1))\n" - " ((return (expression vec3 % (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0)\n" - " (declare (in) float arg1))\n" - " ((return (expression vec4 % (var_ref arg0) (var_ref arg1)))))\n" - "))\n" - "" -; -static const char builtin_modf[] = - "((function modf\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (out) float i))\n" - " ((declare () float t)\n" - " (assign (x) (var_ref t) (expression float trunc (var_ref x)))\n" - " (assign (x) (var_ref i) (var_ref t))\n" - " (return (expression float - (var_ref x) (var_ref t)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (out) vec2 i))\n" - " ((declare () vec2 t)\n" - " (assign (xy) (var_ref t) (expression vec2 trunc (var_ref x)))\n" - " (assign (xy) (var_ref i) (var_ref t))\n" - " (return (expression vec2 - (var_ref x) (var_ref t)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (out) vec3 i))\n" - " ((declare () vec3 t)\n" - " (assign (xyz) (var_ref t) (expression vec3 trunc (var_ref x)))\n" - " (assign (xyz) (var_ref i) (var_ref t))\n" - " (return (expression vec3 - (var_ref x) (var_ref t)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (out) vec4 i))\n" - " ((declare () vec4 t)\n" - " (assign (xyzw) (var_ref t) (expression vec4 trunc (var_ref x)))\n" - " (assign (xyzw) (var_ref i) (var_ref t))\n" - " (return (expression vec4 - (var_ref x) (var_ref t)))))\n" - "))\n" - "" -; -static const char builtin_noise1[] = - "((function noise1\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ((return (expression float noise (var_ref x)))))\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ((return (expression float noise (var_ref x)))))\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ((return (expression float noise (var_ref x)))))\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ((return (expression float noise (var_ref x)))))\n" - "))\n" - "" -; -static const char builtin_noise2[] = - "((function noise2\n" - " (signature vec2\n" - " (parameters (declare (in) vec4 p))\n" - " (\n" - " (declare () float a)\n" - " (declare () float b)\n" - " (declare () vec2 t)\n" - "\n" - " (assign (x) (var_ref a) (expression float noise (var_ref p)))\n" - " (assign (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n" - " (assign (x) (var_ref t) (var_ref a))\n" - " (assign (y) (var_ref t) (var_ref b))\n" - " (return (var_ref t))\n" - " ))\n" - "\n" - " (signature vec2\n" - " (parameters (declare (in) vec3 p))\n" - " (\n" - " (declare () float a)\n" - " (declare () float b)\n" - " (declare () vec2 t)\n" - "\n" - " (assign (x) (var_ref a) (expression float noise (var_ref p)))\n" - " (assign (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))\n" - " (assign (x) (var_ref t) (var_ref a))\n" - " (assign (y) (var_ref t) (var_ref b))\n" - " (return (var_ref t))\n" - " ))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in ) vec2 p)\n" - " )\n" - " (\n" - " (declare () float a)\n" - " (declare () float b)\n" - " (declare () vec2 t)\n" - "\n" - " (assign (x) (var_ref a) (expression float noise (var_ref p)))\n" - " (assign (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))\n" - " (assign (x) (var_ref t) (var_ref a))\n" - " (assign (y) (var_ref t) (var_ref b))\n" - " (return (var_ref t))\n" - " ))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in ) float p)\n" - " )\n" - " (\n" - " (declare () float a)\n" - " (declare () float b)\n" - " (declare () vec2 t)\n" - "\n" - " (assign (x) (var_ref a) (expression float noise (var_ref p)))\n" - " (assign (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))\n" - " (assign (x) (var_ref t) (var_ref a))\n" - " (assign (y) (var_ref t) (var_ref b))\n" - " (return (var_ref t))\n" - " ))\n" - "))\n" - "" -; -static const char builtin_noise3[] = - "((function noise3\n" - " (signature vec3\n" - " (parameters (declare (in) vec4 p))\n" - " (\n" - " (declare () float a)\n" - " (declare () float b)\n" - " (declare () float c)\n" - " (declare () vec3 t)\n" - "\n" - " (assign (x) (var_ref a) (expression float noise (var_ref p)))\n" - " (assign (x) (var_ref b) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n" - " (assign (x) (var_ref c) (expression float noise (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0)))))\n" - "\n" - " (assign (x) (var_ref t) (var_ref a))\n" - " (assign (y) (var_ref t) (var_ref b))\n" - " (assign (z) (var_ref t) (var_ref c))\n" - " (return (var_ref t))\n" - " ))\n" - "\n" - " (signature vec3\n" - " (parameters (declare (in) vec3 p))\n" - " (\n" - " (declare () float a)\n" - " (declare () float b)\n" - " (declare () float c)\n" - " (declare () vec3 t)\n" - "\n" - " (assign (x) (var_ref a) (expression float noise (var_ref p)))\n" - " (assign (x) (var_ref b) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))\n" - " (assign (x) (var_ref c) (expression float noise (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0)))))\n" - "\n" - " (assign (x) (var_ref t) (var_ref a))\n" - " (assign (y) (var_ref t) (var_ref b))\n" - " (assign (z) (var_ref t) (var_ref c))\n" - " (return (var_ref t))\n" - " ))\n" - "\n" - " (signature vec3\n" - " (parameters (declare (in) vec2 p))\n" - " (\n" - " (declare () float a)\n" - " (declare () float b)\n" - " (declare () float c)\n" - " (declare () vec3 t)\n" - "\n" - " (assign (x) (var_ref a) (expression float noise (var_ref p)))\n" - " (assign (x) (var_ref b) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))\n" - " (assign (x) (var_ref c) (expression float noise (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0)))))\n" - "\n" - " (assign (x) (var_ref t) (var_ref a))\n" - " (assign (y) (var_ref t) (var_ref b))\n" - " (assign (z) (var_ref t) (var_ref c))\n" - " (return (var_ref t))\n" - " ))\n" - "\n" - " (signature vec3\n" - " (parameters (declare (in) float p))\n" - " (\n" - " (declare () float a)\n" - " (declare () float b)\n" - " (declare () float c)\n" - " (declare () vec3 t)\n" - "\n" - " (assign (x) (var_ref a) (expression float noise (var_ref p)))\n" - " (assign (x) (var_ref b) (expression float noise (expression float + (var_ref p) (constant float (601.0)))))\n" - " (assign (x) (var_ref c) (expression float noise (expression float + (var_ref p) (constant float (1559.0)))))\n" - "\n" - " (assign (x) (var_ref t) (var_ref a))\n" - " (assign (y) (var_ref t) (var_ref b))\n" - " (assign (z) (var_ref t) (var_ref c))\n" - " (return (var_ref t))\n" - " ))\n" - "))\n" - "" -; -static const char builtin_noise4[] = - "((function noise4\n" - " (signature vec4\n" - " (parameters (declare (in) vec4 p))\n" - " (\n" - " (declare () float _x)\n" - " (declare () float _y)\n" - " (declare () float _z)\n" - " (declare () float _w)\n" - " (declare () vec4 _r)\n" - "\n" - " (declare () vec4 _p)\n" - " (assign (xyzw) (var_ref _p) (expression vec4 + (var_ref p) (constant vec4 (1559.0 113.0 1861.0 797.0))) )\n" - "\n" - " (assign (x) (var_ref _x) (expression float noise(var_ref p)))\n" - " (assign (x) (var_ref _y) (expression float noise(expression vec4 + (var_ref p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n" - " (assign (x) (var_ref _z) (expression float noise(var_ref _p)))\n" - " (assign (x) (var_ref _w) (expression float noise(expression vec4 + (var_ref _p) (constant vec4 (601.0 313.0 29.0 277.0)))))\n" - "\n" - " (assign (x) (var_ref _r) (var_ref _x))\n" - " (assign (y) (var_ref _r) (var_ref _y))\n" - " (assign (z) (var_ref _r) (var_ref _z))\n" - " (assign (w) (var_ref _r) (var_ref _w))\n" - " (return (var_ref _r))\n" - " ))\n" - "\n" - " (signature vec4\n" - " (parameters (declare (in) vec3 p))\n" - " (\n" - " (declare () float _x)\n" - " (declare () float _y)\n" - " (declare () float _z)\n" - " (declare () float _w)\n" - " (declare () vec4 _r)\n" - "\n" - " (declare () vec3 _p)\n" - " (assign (xyz) (var_ref _p) (expression vec3 + (var_ref p) (constant vec3 (1559.0 113.0 1861.0))) )\n" - "\n" - " (assign (x) (var_ref _x) (expression float noise(var_ref p)))\n" - " (assign (x) (var_ref _y) (expression float noise(expression vec3 + (var_ref p) (constant vec3 (601.0 313.0 29.0)))))\n" - " (assign (x) (var_ref _z) (expression float noise(var_ref _p)))\n" - " (assign (x) (var_ref _w) (expression float noise(expression vec3 + (var_ref _p) (constant vec3 (601.0 313.0 29.0)))))\n" - "\n" - " (assign (x) (var_ref _r) (var_ref _x))\n" - " (assign (y) (var_ref _r) (var_ref _y))\n" - " (assign (z) (var_ref _r) (var_ref _z))\n" - " (assign (w) (var_ref _r) (var_ref _w))\n" - " (return (var_ref _r))\n" - " ))\n" - "\n" - " (signature vec4\n" - " (parameters (declare (in) vec2 p))\n" - " (\n" - " (declare () float _x)\n" - " (declare () float _y)\n" - " (declare () float _z)\n" - " (declare () float _w)\n" - " (declare () vec4 _r)\n" - "\n" - " (declare () vec2 _p)\n" - " (assign (xy) (var_ref _p) (expression vec2 + (var_ref p) (constant vec2 (1559.0 113.0))) )\n" - "\n" - " (assign (x) (var_ref _x) (expression float noise(var_ref p)))\n" - " (assign (x) (var_ref _y) (expression float noise(expression vec2 + (var_ref p) (constant vec2 (601.0 313.0)))))\n" - " (assign (x) (var_ref _z) (expression float noise(var_ref _p)))\n" - " (assign (x) (var_ref _w) (expression float noise(expression vec2 + (var_ref _p) (constant vec2 (601.0 313.0)))))\n" - "\n" - " (assign (x) (var_ref _r) (var_ref _x))\n" - " (assign (y) (var_ref _r) (var_ref _y))\n" - " (assign (z) (var_ref _r) (var_ref _z))\n" - " (assign (w) (var_ref _r) (var_ref _w))\n" - " (return (var_ref _r))\n" - " ))\n" - "\n" - " (signature vec4\n" - " (parameters (declare (in) float p))\n" - " (\n" - " (declare () float _x)\n" - " (declare () float _y)\n" - " (declare () float _z)\n" - " (declare () float _w)\n" - " (declare () vec4 _r)\n" - "\n" - " (declare () float _p)\n" - " (assign (x) (var_ref _p) (expression float + (var_ref p) (constant float (1559.0))) )\n" - "\n" - " (assign (x) (var_ref _x) (expression float noise(var_ref p)))\n" - " (assign (x) (var_ref _y) (expression float noise(expression float + (var_ref p) (constant float (601.0)))))\n" - " (assign (x) (var_ref _z) (expression float noise(var_ref _p)))\n" - " (assign (x) (var_ref _w) (expression float noise(expression float + (var_ref _p) (constant float (601.0)))))\n" - "\n" - " (assign (x) (var_ref _r) (var_ref _x))\n" - " (assign (y) (var_ref _r) (var_ref _y))\n" - " (assign (z) (var_ref _r) (var_ref _z))\n" - " (assign (w) (var_ref _r) (var_ref _w))\n" - " (return (var_ref _r))\n" - " ))\n" - "))\n" - "" -; -static const char builtin_normalize[] = - "((function normalize\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0))\n" - " ((return (expression float sign (var_ref arg0)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0))\n" - " ((return (expression vec2 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0))\n" - " ((return (expression vec3 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0))\n" - " ((return (expression vec4 * (var_ref arg0) (expression float rsq (expression float dot (var_ref arg0) (var_ref arg0)))))))\n" - "))\n" - "" -; -static const char builtin_not[] = - "((function not\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 arg0))\n" - " ((return (expression bvec2 ! (var_ref arg0)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 arg0))\n" - " ((return (expression bvec3 ! (var_ref arg0)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 arg0))\n" - " ((return (expression bvec4 ! (var_ref arg0)))))\n" - "))\n" - "" -; -static const char builtin_notEqual[] = - "((function notEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 arg0)\n" - " (declare (in) vec2 arg1))\n" - " ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 arg0)\n" - " (declare (in) vec3 arg1))\n" - " ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 arg0)\n" - " (declare (in) vec4 arg1))\n" - " ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 arg0)\n" - " (declare (in) bvec2 arg1))\n" - " ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 arg0)\n" - " (declare (in) bvec3 arg1))\n" - " ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 arg0)\n" - " (declare (in) bvec4 arg1))\n" - " ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 arg0)\n" - " (declare (in) ivec2 arg1))\n" - " ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 arg0)\n" - " (declare (in) ivec3 arg1))\n" - " ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 arg0)\n" - " (declare (in) ivec4 arg1))\n" - " ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) uvec2 arg0)\n" - " (declare (in) uvec2 arg1))\n" - " ((return (expression bvec2 != (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) uvec3 arg0)\n" - " (declare (in) uvec3 arg1))\n" - " ((return (expression bvec3 != (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) uvec4 arg0)\n" - " (declare (in) uvec4 arg1))\n" - " ((return (expression bvec4 != (var_ref arg0) (var_ref arg1)))))\n" - "))\n" - "" -; -static const char builtin_outerProduct[] = - "((function outerProduct\n" - " (signature mat2\n" - " (parameters\n" - " (declare (in) vec2 u)\n" - " (declare (in) vec2 v))\n" - " ((declare () mat2 m)\n" - " (assign (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n" - " (assign (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))\n" - " (return (var_ref m))))\n" - "\n" - " (signature mat2x3\n" - " (parameters\n" - " (declare (in) vec3 u)\n" - " (declare (in) vec2 v))\n" - " ((declare () mat2x3 m)\n" - " (assign (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n" - " (assign (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))\n" - " (return (var_ref m))))\n" - "\n" - " (signature mat2x4\n" - " (parameters\n" - " (declare (in) vec4 u)\n" - " (declare (in) vec2 v))\n" - " ((declare () mat2x4 m)\n" - " (assign (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n" - " (assign (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))\n" - " (return (var_ref m))))\n" - "\n" - " (signature mat3x2\n" - " (parameters\n" - " (declare (in) vec2 u)\n" - " (declare (in) vec3 v))\n" - " ((declare () mat3x2 m)\n" - " (assign (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n" - " (assign (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))\n" - " (assign (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))\n" - " (return (var_ref m))\n" - " ))\n" - "\n" - " (signature mat3\n" - " (parameters\n" - " (declare (in) vec3 u)\n" - " (declare (in) vec3 v))\n" - " ((declare () mat3 m)\n" - " (assign (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n" - " (assign (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))\n" - " (assign (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))\n" - " (return (var_ref m))))\n" - "\n" - " (signature mat3x4\n" - " (parameters\n" - " (declare (in) vec4 u)\n" - " (declare (in) vec3 v))\n" - " ((declare () mat3x4 m)\n" - " (assign (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n" - " (assign (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))\n" - " (assign (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))\n" - " (return (var_ref m))))\n" - "\n" - " (signature mat4x2\n" - " (parameters\n" - " (declare (in) vec2 u)\n" - " (declare (in) vec4 v))\n" - " ((declare () mat4x2 m)\n" - " (assign (xy) (array_ref (var_ref m) (constant int (0))) (expression vec2 * (var_ref u) (swiz x (var_ref v))))\n" - " (assign (xy) (array_ref (var_ref m) (constant int (1))) (expression vec2 * (var_ref u) (swiz y (var_ref v))))\n" - " (assign (xy) (array_ref (var_ref m) (constant int (2))) (expression vec2 * (var_ref u) (swiz z (var_ref v))))\n" - " (assign (xy) (array_ref (var_ref m) (constant int (3))) (expression vec2 * (var_ref u) (swiz w (var_ref v))))\n" - " (return (var_ref m))))\n" - "\n" - " (signature mat4x3\n" - " (parameters\n" - " (declare (in) vec3 u)\n" - " (declare (in) vec4 v))\n" - " ((declare () mat4x3 m)\n" - " (assign (xyz) (array_ref (var_ref m) (constant int (0))) (expression vec3 * (var_ref u) (swiz x (var_ref v))))\n" - " (assign (xyz) (array_ref (var_ref m) (constant int (1))) (expression vec3 * (var_ref u) (swiz y (var_ref v))))\n" - " (assign (xyz) (array_ref (var_ref m) (constant int (2))) (expression vec3 * (var_ref u) (swiz z (var_ref v))))\n" - " (assign (xyz) (array_ref (var_ref m) (constant int (3))) (expression vec3 * (var_ref u) (swiz w (var_ref v))))\n" - " (return (var_ref m))))\n" - "\n" - " (signature mat4\n" - " (parameters\n" - " (declare (in) vec4 u)\n" - " (declare (in) vec4 v))\n" - " ((declare () mat4 m)\n" - " (assign (xyzw) (array_ref (var_ref m) (constant int (0))) (expression vec4 * (var_ref u) (swiz x (var_ref v))))\n" - " (assign (xyzw) (array_ref (var_ref m) (constant int (1))) (expression vec4 * (var_ref u) (swiz y (var_ref v))))\n" - " (assign (xyzw) (array_ref (var_ref m) (constant int (2))) (expression vec4 * (var_ref u) (swiz z (var_ref v))))\n" - " (assign (xyzw) (array_ref (var_ref m) (constant int (3))) (expression vec4 * (var_ref u) (swiz w (var_ref v))))\n" - " (return (var_ref m))))\n" - "))\n" - "" -; -static const char builtin_pow[] = - "((function pow\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0)\n" - " (declare (in) float arg1))\n" - " ((return (expression float pow (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0)\n" - " (declare (in) vec2 arg1))\n" - " ((return (expression vec2 pow (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0)\n" - " (declare (in) vec3 arg1))\n" - " ((return (expression vec3 pow (var_ref arg0) (var_ref arg1)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0)\n" - " (declare (in) vec4 arg1))\n" - " ((return (expression vec4 pow (var_ref arg0) (var_ref arg1)))))\n" - "))\n" - "" -; -static const char builtin_radians[] = - "((function radians\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0))\n" - " ((return (expression float * (var_ref arg0) (constant float (0.0174532925))))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0))\n" - " ((return (expression vec2 * (var_ref arg0) (constant float (0.0174532925))))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0))\n" - " ((return (expression vec3 * (var_ref arg0) (constant float (0.0174532925))))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0))\n" - " ((return (expression vec4 * (var_ref arg0) (constant float (0.0174532925))))))\n" - "))\n" - "" -; -static const char builtin_reflect[] = - "((function reflect\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float i)\n" - " (declare (in) float n))\n" - " ((return (expression float -\n" - " (var_ref i)\n" - " (expression float *\n" - " (constant float (2.0))\n" - " (expression float *\n" - " (expression float *\n" - " (var_ref n)\n" - " (var_ref i))\n" - " (var_ref n)))))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 i)\n" - " (declare (in) vec2 n))\n" - " ((return (expression vec2 -\n" - " (var_ref i)\n" - " (expression vec2 *\n" - " (constant float (2.0))\n" - " (expression vec2 *\n" - " (expression float dot\n" - " (var_ref n)\n" - " (var_ref i))\n" - " (var_ref n)))))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 i)\n" - " (declare (in) vec3 n))\n" - " ((return (expression vec3 -\n" - " (var_ref i)\n" - " (expression vec3 *\n" - " (constant float (2.0))\n" - " (expression vec3 *\n" - " (expression float dot\n" - " (var_ref n)\n" - " (var_ref i))\n" - " (var_ref n)))))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 i)\n" - " (declare (in) vec4 n))\n" - " ((return (expression vec4 -\n" - " (var_ref i)\n" - " (expression vec4 *\n" - " (constant float (2.0))\n" - " (expression vec4 *\n" - " (expression float dot\n" - " (var_ref n)\n" - " (var_ref i))\n" - " (var_ref n)))))))\n" - "\n" - "))\n" - "" -; -static const char builtin_refract[] = - "((function refract\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float i)\n" - " (declare (in) float n)\n" - " (declare (in) float eta))\n" - " ((declare () float k)\n" - " (assign (x) (var_ref k)\n" - " (expression float - (constant float (1.0))\n" - " (expression float * (var_ref eta)\n" - " (expression float * (var_ref eta)\n" - " (expression float - (constant float (1.0))\n" - " (expression float * \n" - " (expression float * (var_ref n) (var_ref i))\n" - " (expression float * (var_ref n) (var_ref i))))))))\n" - " (if (expression bool < (var_ref k) (constant float (0.0)))\n" - " ((return (constant float (0.0))))\n" - " ((return (expression float -\n" - " (expression float * (var_ref eta) (var_ref i))\n" - " (expression float *\n" - " (expression float +\n" - " (expression float * (var_ref eta)\n" - " (expression float * (var_ref n) (var_ref i)))\n" - " (expression float sqrt (var_ref k)))\n" - " (var_ref n))))))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 i)\n" - " (declare (in) vec2 n)\n" - " (declare (in) float eta))\n" - " ((declare () float k)\n" - " (assign (x) (var_ref k)\n" - " (expression float - (constant float (1.0))\n" - " (expression float * (var_ref eta)\n" - " (expression float * (var_ref eta)\n" - " (expression float - (constant float (1.0))\n" - " (expression float * \n" - " (expression float dot (var_ref n) (var_ref i))\n" - " (expression float dot (var_ref n) (var_ref i))))))))\n" - " (if (expression bool < (var_ref k) (constant float (0.0)))\n" - " ((return (constant vec2 (0.0 0.0))))\n" - " ((return (expression vec2 -\n" - " (expression vec2 * (var_ref eta) (var_ref i))\n" - " (expression vec2 *\n" - " (expression float +\n" - " (expression float * (var_ref eta)\n" - " (expression float dot (var_ref n) (var_ref i)))\n" - " (expression float sqrt (var_ref k)))\n" - " (var_ref n))))))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 i)\n" - " (declare (in) vec3 n)\n" - " (declare (in) float eta))\n" - " ((declare () float k)\n" - " (assign (x) (var_ref k)\n" - " (expression float - (constant float (1.0))\n" - " (expression float * (var_ref eta)\n" - " (expression float * (var_ref eta)\n" - " (expression float - (constant float (1.0))\n" - " (expression float * \n" - " (expression float dot (var_ref n) (var_ref i))\n" - " (expression float dot (var_ref n) (var_ref i))))))))\n" - " (if (expression bool < (var_ref k) (constant float (0.0)))\n" - " ((return (constant vec3 (0.0 0.0 0.0))))\n" - " ((return (expression vec3 -\n" - " (expression vec3 * (var_ref eta) (var_ref i))\n" - " (expression vec3 *\n" - " (expression float +\n" - " (expression float * (var_ref eta)\n" - " (expression float dot (var_ref n) (var_ref i)))\n" - " (expression float sqrt (var_ref k)))\n" - " (var_ref n))))))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 i)\n" - " (declare (in) vec4 n)\n" - " (declare (in) float eta))\n" - " ((declare () float k)\n" - " (assign (x) (var_ref k)\n" - " (expression float - (constant float (1.0))\n" - " (expression float * (var_ref eta)\n" - " (expression float * (var_ref eta)\n" - " (expression float - (constant float (1.0))\n" - " (expression float * \n" - " (expression float dot (var_ref n) (var_ref i))\n" - " (expression float dot (var_ref n) (var_ref i))))))))\n" - " (if (expression bool < (var_ref k) (constant float (0.0)))\n" - " ((return (constant vec4 (0.0 0.0 0.0 0.0))))\n" - " ((return (expression vec4 -\n" - " (expression vec4 * (var_ref eta) (var_ref i))\n" - " (expression vec4 *\n" - " (expression float +\n" - " (expression float * (var_ref eta)\n" - " (expression float dot (var_ref n) (var_ref i)))\n" - " (expression float sqrt (var_ref k)))\n" - " (var_ref n))))))))\n" - "\n" - "))\n" - "" -; -static const char builtin_round[] = - "((function round\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0))\n" - " ((return (expression float round_even (var_ref arg0)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0))\n" - " ((return (expression vec2 round_even (var_ref arg0)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0))\n" - " ((return (expression vec3 round_even (var_ref arg0)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0))\n" - " ((return (expression vec4 round_even (var_ref arg0)))))\n" - "))\n" - "" -; -static const char builtin_roundEven[] = - "((function roundEven\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0))\n" - " ((return (expression float round_even (var_ref arg0)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0))\n" - " ((return (expression vec2 round_even (var_ref arg0)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0))\n" - " ((return (expression vec3 round_even (var_ref arg0)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0))\n" - " ((return (expression vec4 round_even (var_ref arg0)))))\n" - "))\n" - "" -; -static const char builtin_shadow1D[] = - "((function shadow1D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz x (var_ref P)) 0 1 (swiz z (var_ref P)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (swiz x (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref bias) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_shadow1DArray[] = - "((function shadow1DArray\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArrayShadow sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArrayShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref bias) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_shadow1DArrayLod[] = - "((function shadow1DArrayLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArrayShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_shadow1DGradARB[] = - "((function shadow1DGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz x (var_ref P)) 0 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_shadow1DLod[] = - "((function shadow1DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (swiz x (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_shadow1DProj[] = - "((function shadow1DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_shadow1DProjGradARB[] = - "((function shadow1DProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_shadow1DProjLod[] = - "((function shadow1DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_shadow2D[] = - "((function shadow2D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref bias) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_shadow2DArray[] = - "((function shadow2DArray\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DArrayShadow sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz w (var_ref P)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_shadow2DGradARB[] = - "((function shadow2DGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_shadow2DLod[] = - "((function shadow2DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_shadow2DProj[] = - "((function shadow2DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_shadow2DProjGradARB[] = - "((function shadow2DProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_shadow2DProjLod[] = - "((function shadow2DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_shadow2DRect[] = - "((function shadow2DRect\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRectShadow sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_shadow2DRectGradARB[] = - "((function shadow2DRectGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRectShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_shadow2DRectProj[] = - "((function shadow2DRectProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRectShadow sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_shadow2DRectProjGradARB[] = - "((function shadow2DRectProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRectShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_sign[] = - "((function sign\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ((return (expression float sign (var_ref x)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ((return (expression vec2 sign (var_ref x)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ((return (expression vec3 sign (var_ref x)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ((return (expression vec4 sign (var_ref x)))))\n" - "\n" - " (signature int\n" - " (parameters\n" - " (declare (in) int x))\n" - " ((return (expression int sign (var_ref x)))))\n" - "\n" - " (signature ivec2\n" - " (parameters\n" - " (declare (in) ivec2 x))\n" - " ((return (expression ivec2 sign (var_ref x)))))\n" - "\n" - " (signature ivec3\n" - " (parameters\n" - " (declare (in) ivec3 x))\n" - " ((return (expression ivec3 sign (var_ref x)))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) ivec4 x))\n" - " ((return (expression ivec4 sign (var_ref x)))))\n" - "))\n" - "\n" - "" -; -static const char builtin_sin[] = - "((function sin\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ((return (expression float sin (var_ref angle)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ((return (expression vec2 sin (var_ref angle)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ((return (expression vec3 sin (var_ref angle)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ((return (expression vec4 sin (var_ref angle)))))\n" - "))\n" - "" -; -static const char builtin_sinh[] = - "((function sinh\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ((return (expression float * (constant float (0.5))\n" - " (expression float -\n" - " (expression float exp (var_ref x))\n" - " (expression float exp (expression float neg (var_ref x))))))))\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ((return (expression vec2 * (constant float (0.5))\n" - " (expression vec2 -\n" - " (expression vec2 exp (var_ref x))\n" - " (expression vec2 exp (expression vec2 neg (var_ref x))))))))\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ((return (expression vec3 * (constant float (0.5))\n" - " (expression vec3 -\n" - " (expression vec3 exp (var_ref x))\n" - " (expression vec3 exp (expression vec3 neg (var_ref x))))))))\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ((return (expression vec4 * (constant float (0.5))\n" - " (expression vec4 -\n" - " (expression vec4 exp (var_ref x))\n" - " (expression vec4 exp (expression vec4 neg (var_ref x))))))))\n" - "))\n" - "" -; -static const char builtin_smoothstep[] = - "((function smoothstep\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) float x))\n" - " ((declare () float t)\n" - " (assign (x) (var_ref t)\n" - " (expression float max\n" - " (expression float min\n" - " (expression float / (expression float - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n" - " (constant float (1.0)))\n" - " (constant float (0.0))))\n" - " (return (expression float * (var_ref t) (expression float * (var_ref t) (expression float - (constant float (3.0)) (expression float * (constant float (2.0)) (var_ref t))))))))\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec2 x))\n" - " ((declare () vec2 t)\n" - " (assign (xy) (var_ref t)\n" - " (expression vec2 max\n" - " (expression vec2 min\n" - " (expression vec2 / (expression vec2 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n" - " (constant float (1.0)))\n" - " (constant float (0.0))))\n" - " (return (expression vec2 * (var_ref t) (expression vec2 * (var_ref t) (expression vec2 - (constant float (3.0)) (expression vec2 * (constant float (2.0)) (var_ref t))))))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec3 x))\n" - " ((declare () vec3 t)\n" - " (assign (xyz) (var_ref t)\n" - " (expression vec3 max\n" - " (expression vec3 min\n" - " (expression vec3 / (expression vec3 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n" - " (constant float (1.0)))\n" - " (constant float (0.0))))\n" - " (return (expression vec3 * (var_ref t) (expression vec3 * (var_ref t) (expression vec3 - (constant float (3.0)) (expression vec3 * (constant float (2.0)) (var_ref t))))))))\n" - "\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec4 x))\n" - " ((declare () vec4 t)\n" - " (assign (xyzw) (var_ref t)\n" - " (expression vec4 max\n" - " (expression vec4 min\n" - " (expression vec4 / (expression vec4 - (var_ref x) (var_ref edge0)) (expression float - (var_ref edge1) (var_ref edge0)))\n" - " (constant float (1.0)))\n" - " (constant float (0.0))))\n" - " (return (expression vec4 * (var_ref t) (expression vec4 * (var_ref t) (expression vec4 - (constant float (3.0)) (expression vec4 * (constant float (2.0)) (var_ref t))))))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 edge0)\n" - " (declare (in) vec2 edge1)\n" - " (declare (in) vec2 x))\n" - " ((declare () vec2 t)\n" - " (assign (xy) (var_ref t)\n" - " (expression vec2 max\n" - " (expression vec2 min\n" - " (expression vec2 / (expression vec2 - (var_ref x) (var_ref edge0)) (expression vec2 - (var_ref edge1) (var_ref edge0)))\n" - " (constant float (1.0)))\n" - " (constant float (0.0))))\n" - " (return (expression vec2 * (var_ref t) (expression vec2 * (var_ref t) (expression vec2 - (constant float (3.0)) (expression vec2 * (constant float (2.0)) (var_ref t))))))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 edge0)\n" - " (declare (in) vec3 edge1)\n" - " (declare (in) vec3 x))\n" - " ((declare () vec3 t)\n" - " (assign (xyz) (var_ref t)\n" - " (expression vec3 max\n" - " (expression vec3 min\n" - " (expression vec3 / (expression vec3 - (var_ref x) (var_ref edge0)) (expression vec3 - (var_ref edge1) (var_ref edge0)))\n" - " (constant float (1.0)))\n" - " (constant float (0.0))))\n" - " (return (expression vec3 * (var_ref t) (expression vec3 * (var_ref t) (expression vec3 - (constant float (3.0)) (expression vec3 * (constant float (2.0)) (var_ref t))))))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 edge0)\n" - " (declare (in) vec4 edge1)\n" - " (declare (in) vec4 x))\n" - " ((declare () vec4 t)\n" - " (assign (xyzw) (var_ref t)\n" - " (expression vec4 max\n" - " (expression vec4 min\n" - " (expression vec4 / (expression vec4 - (var_ref x) (var_ref edge0)) (expression vec4 - (var_ref edge1) (var_ref edge0)))\n" - " (constant float (1.0)))\n" - " (constant float (0.0))))\n" - " (return (expression vec4 * (var_ref t) (expression vec4 * (var_ref t) (expression vec4 - (constant float (3.0)) (expression vec4 * (constant float (2.0)) (var_ref t))))))))\n" - "))\n" - "\n" - "" -; -static const char builtin_sqrt[] = - "((function sqrt\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0))\n" - " ((return (expression float sqrt (var_ref arg0)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0))\n" - " ((return (expression vec2 sqrt (var_ref arg0)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0))\n" - " ((return (expression vec3 sqrt (var_ref arg0)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0))\n" - " ((return (expression vec4 sqrt (var_ref arg0)))))\n" - "))\n" - "" -; -static const char builtin_step[] = - "((function step\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) float x))\n" - " ((return (expression float b2f (expression bool >= (var_ref x) (var_ref edge))))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec2 x))\n" - " ((declare () vec2 t)\n" - " (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n" - " (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))\n" - " (return (var_ref t))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec3 x))\n" - " ((declare () vec3 t)\n" - " (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n" - " (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))\n" - " (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))\n" - " (return (var_ref t))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec4 x))\n" - " ((declare () vec4 t)\n" - " (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(var_ref edge))))\n" - " (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(var_ref edge))))\n" - " (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(var_ref edge))))\n" - " (assign (w) (var_ref t) (expression float b2f (expression bool >= (swiz w (var_ref x))(var_ref edge))))\n" - " (return (var_ref t))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 edge)\n" - " (declare (in) vec2 x))\n" - " ((declare () vec2 t)\n" - " (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n" - " (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))\n" - " (return (var_ref t))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 edge)\n" - " (declare (in) vec3 x))\n" - " ((declare () vec3 t)\n" - " (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n" - " (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))\n" - " (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))\n" - " (return (var_ref t))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 edge)\n" - " (declare (in) vec4 x))\n" - " ((declare () vec4 t)\n" - " (assign (x) (var_ref t) (expression float b2f (expression bool >= (swiz x (var_ref x))(swiz x (var_ref edge)))))\n" - " (assign (y) (var_ref t) (expression float b2f (expression bool >= (swiz y (var_ref x))(swiz y (var_ref edge)))))\n" - " (assign (z) (var_ref t) (expression float b2f (expression bool >= (swiz z (var_ref x))(swiz z (var_ref edge)))))\n" - " (assign (w) (var_ref t) (expression float b2f (expression bool >= (swiz w (var_ref x))(swiz w (var_ref edge)))))\n" - " (return (var_ref t))))\n" - "))\n" - "\n" - "" -; -static const char builtin_tan[] = - "((function tan\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ((return (expression float / (expression float sin (var_ref angle)) (expression float cos (var_ref angle))))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ((return (expression vec2 / (expression vec2 sin (var_ref angle)) (expression vec2 cos (var_ref angle))))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ((return (expression vec3 / (expression vec3 sin (var_ref angle)) (expression vec3 cos (var_ref angle))))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ((return (expression vec4 / (expression vec4 sin (var_ref angle)) (expression vec4 cos (var_ref angle))))))\n" - "))\n" - "" -; -static const char builtin_tanh[] = - "((function tanh\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ((return (expression float /\n" - " (expression float -\n" - " (expression float exp (var_ref x))\n" - " (expression float exp (expression float neg (var_ref x))))\n" - " (expression float +\n" - " (expression float exp (var_ref x))\n" - " (expression float exp (expression float neg (var_ref x))))))))\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ((return (expression vec2 /\n" - " (expression vec2 -\n" - " (expression vec2 exp (var_ref x))\n" - " (expression vec2 exp (expression vec2 neg (var_ref x))))\n" - " (expression vec2 +\n" - " (expression vec2 exp (var_ref x))\n" - " (expression vec2 exp (expression vec2 neg (var_ref x))))))))\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ((return (expression vec3 /\n" - " (expression vec3 -\n" - " (expression vec3 exp (var_ref x))\n" - " (expression vec3 exp (expression vec3 neg (var_ref x))))\n" - " (expression vec3 +\n" - " (expression vec3 exp (var_ref x))\n" - " (expression vec3 exp (expression vec3 neg (var_ref x))))))))\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ((return (expression vec4 /\n" - " (expression vec4 -\n" - " (expression vec4 exp (var_ref x))\n" - " (expression vec4 exp (expression vec4 neg (var_ref x))))\n" - " (expression vec4 +\n" - " (expression vec4 exp (var_ref x))\n" - " (expression vec4 exp (expression vec4 neg (var_ref x))))))))\n" - "))\n" - "" -; -static const char builtin_texelFetch[] = - "((function texelFetch\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) int P) \n" - " (declare (in) int lod) )\n" - " ((return (txf vec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) int P) \n" - " (declare (in) int lod) )\n" - " ((return (txf ivec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) int P) \n" - " (declare (in) int lod) )\n" - " ((return (txf uvec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) ivec2 P) \n" - " (declare (in) int lod) )\n" - " ((return (txf vec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) ivec2 P) \n" - " (declare (in) int lod) )\n" - " ((return (txf ivec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) ivec2 P) \n" - " (declare (in) int lod) )\n" - " ((return (txf uvec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) ivec3 P) \n" - " (declare (in) int lod) )\n" - " ((return (txf vec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) ivec3 P) \n" - " (declare (in) int lod) )\n" - " ((return (txf ivec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) ivec3 P) \n" - " (declare (in) int lod) )\n" - " ((return (txf uvec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArray sampler) \n" - " (declare (in) ivec2 P) \n" - " (declare (in) int lod) )\n" - " ((return (txf vec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1DArray sampler) \n" - " (declare (in) ivec2 P) \n" - " (declare (in) int lod) )\n" - " ((return (txf ivec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1DArray sampler) \n" - " (declare (in) ivec2 P) \n" - " (declare (in) int lod) )\n" - " ((return (txf uvec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DArray sampler) \n" - " (declare (in) ivec3 P) \n" - " (declare (in) int lod) )\n" - " ((return (txf vec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2DArray sampler) \n" - " (declare (in) ivec3 P) \n" - " (declare (in) int lod) )\n" - " ((return (txf ivec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2DArray sampler) \n" - " (declare (in) ivec3 P) \n" - " (declare (in) int lod) )\n" - " ((return (txf uvec4 (var_ref sampler) (var_ref P) 0 (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texelFetchOffset[] = - "((function texelFetchOffset\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) int P) \n" - " (declare (in) int lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txf vec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) int P) \n" - " (declare (in) int lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txf ivec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) int P) \n" - " (declare (in) int lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txf uvec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) ivec2 P) \n" - " (declare (in) int lod) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txf vec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) ivec2 P) \n" - " (declare (in) int lod) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txf ivec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) ivec2 P) \n" - " (declare (in) int lod) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txf uvec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) ivec3 P) \n" - " (declare (in) int lod) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (txf vec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) ivec3 P) \n" - " (declare (in) int lod) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (txf ivec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) ivec3 P) \n" - " (declare (in) int lod) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (txf uvec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArray sampler) \n" - " (declare (in) ivec2 P) \n" - " (declare (in) int lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txf vec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1DArray sampler) \n" - " (declare (in) ivec2 P) \n" - " (declare (in) int lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txf ivec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1DArray sampler) \n" - " (declare (in) ivec2 P) \n" - " (declare (in) int lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txf uvec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DArray sampler) \n" - " (declare (in) ivec3 P) \n" - " (declare (in) int lod) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txf vec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2DArray sampler) \n" - " (declare (in) ivec3 P) \n" - " (declare (in) int lod) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txf ivec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2DArray sampler) \n" - " (declare (in) ivec3 P) \n" - " (declare (in) int lod) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txf uvec4 (var_ref sampler) (var_ref P) (var_ref offset) (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture[] = - "((function texture\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) float P) )\n" - " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) float P) )\n" - " ((return (tex ivec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) float P) )\n" - " ((return (tex uvec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec2 P) )\n" - " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec2 P) )\n" - " ((return (tex ivec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec2 P) )\n" - " ((return (tex uvec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex ivec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex uvec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isamplerCube sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex ivec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usamplerCube sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex uvec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArray sampler) \n" - " (declare (in) vec2 P) )\n" - " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1DArray sampler) \n" - " (declare (in) vec2 P) )\n" - " ((return (tex ivec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1DArray sampler) \n" - " (declare (in) vec2 P) )\n" - " ((return (tex uvec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DArray sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2DArray sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex ivec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2DArray sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex uvec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex float (var_ref sampler) (swiz x (var_ref P)) 0 1 (swiz z (var_ref P)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) samplerCubeShadow sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex float (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz w (var_ref P)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DArrayShadow sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler2DArrayShadow sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex float (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz w (var_ref P)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isamplerCube sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usamplerCube sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb float (var_ref sampler) (swiz x (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref bias) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref bias) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) samplerCubeShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb float (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz w (var_ref P)) (var_ref bias) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DArrayShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref bias) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler2DArrayShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb float (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz w (var_ref P)) (var_ref bias) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture1D[] = - "((function texture1D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) float P) )\n" - " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture1DArray[] = - "((function texture1DArray\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArray sampler) \n" - " (declare (in) vec2 P) )\n" - " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture1DArrayLod[] = - "((function texture1DArrayLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture1DGradARB[] = - "((function texture1DGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd ivec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture1DLod[] = - "((function texture1DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture1DProj[] = - "((function texture1DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec2 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture1DProjGradARB[] = - "((function texture1DProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd ivec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd uvec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd ivec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd uvec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture1DProjLod[] = - "((function texture1DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture2D[] = - "((function texture2D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec2 P) )\n" - " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerExternalOES sampler) \n" - " (declare (in) vec2 P) )\n" - " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture2DArray[] = - "((function texture2DArray\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DArray sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture2DArrayLod[] = - "((function texture2DArrayLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture2DGradARB[] = - "((function texture2DGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd ivec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture2DLod[] = - "((function texture2DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture2DProj[] = - "((function texture2DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerExternalOES sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerExternalOES sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture2DProjGradARB[] = - "((function texture2DProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd ivec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd uvec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd ivec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd uvec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture2DProjLod[] = - "((function texture2DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture2DRect[] = - "((function texture2DRect\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRect sampler) \n" - " (declare (in) vec2 P) )\n" - " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture2DRectGradARB[] = - "((function texture2DRectGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRect sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture2DRectProj[] = - "((function texture2DRectProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRect sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRect sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture2DRectProjGradARB[] = - "((function texture2DRectProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRect sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRect sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture3D[] = - "((function texture3D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture3DGradARB[] = - "((function texture3DGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) )\n" - " ((return (txd ivec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) )\n" - " ((return (txd uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture3DLod[] = - "((function texture3DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture3DProj[] = - "((function texture3DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture3DProjGradARB[] = - "((function texture3DProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) )\n" - " ((return (txd ivec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) )\n" - " ((return (txd uvec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_texture3DProjLod[] = - "((function texture3DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_textureCube[] = - "((function textureCube\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex vec4 (var_ref sampler) (var_ref P) 0 1 () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref bias) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_textureCubeGradARB[] = - "((function textureCubeGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isamplerCube sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) )\n" - " ((return (txd ivec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usamplerCube sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) )\n" - " ((return (txd uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_textureCubeLod[] = - "((function textureCubeLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_textureGrad[] = - "((function textureGrad\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd ivec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd ivec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) )\n" - " ((return (txd ivec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) )\n" - " ((return (txd uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isamplerCube sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) )\n" - " ((return (txd ivec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usamplerCube sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) )\n" - " ((return (txd uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd ivec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd ivec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd uvec4 (var_ref sampler) (var_ref P) 0 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd float (var_ref sampler) (swiz x (var_ref P)) 0 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) samplerCubeShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) )\n" - " ((return (txd float (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz w (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DArrayShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler2DArrayShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd float (var_ref sampler) (swiz xyz (var_ref P)) 0 1 (swiz w (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_textureGradOffset[] = - "((function textureGradOffset\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) \n" - " (declare (const_in) int offset) )\n" - " ((return (txd vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) \n" - " (declare (const_in) int offset) )\n" - " ((return (txd ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) \n" - " (declare (const_in) int offset) )\n" - " ((return (txd uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txd vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txd ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txd uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (txd vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (txd ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (txd uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) \n" - " (declare (const_in) int offset) )\n" - " ((return (txd vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) \n" - " (declare (const_in) int offset) )\n" - " ((return (txd ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) \n" - " (declare (const_in) int offset) )\n" - " ((return (txd uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txd vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txd ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txd uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) \n" - " (declare (const_in) int offset) )\n" - " ((return (txd float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txd float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DArrayShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) \n" - " (declare (const_in) int offset) )\n" - " ((return (txd float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler2DArrayShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txd float (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) 1 (swiz w (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_textureLod[] = - "((function textureLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (in) float lod) )\n" - " ((return (txl ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (in) float lod) )\n" - " ((return (txl uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isamplerCube sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usamplerCube sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl ivec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl uvec4 (var_ref sampler) (var_ref P) 0 1 () (var_ref lod) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl float (var_ref sampler) (swiz x (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref lod) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref lod) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DArrayShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl float (var_ref sampler) (swiz xy (var_ref P)) 0 1 (swiz z (var_ref P)) (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_textureLodOffset[] = - "((function textureLodOffset\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txl vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txl ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txl uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txl vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txl ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txl uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (txl vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (txl ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (txl uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txl vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txl ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txl uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txl vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txl ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txl uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref lod) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txl float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txl float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DArrayShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txl float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_textureOffset[] = - "((function textureOffset\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (const_in) int offset) )\n" - " ((return (tex vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (const_in) int offset) )\n" - " ((return (tex ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (const_in) int offset) )\n" - " ((return (tex uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (tex vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (tex ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (tex uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (tex vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (tex ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (tex uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (const_in) int offset) )\n" - " ((return (tex vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (const_in) int offset) )\n" - " ((return (tex ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (const_in) int offset) )\n" - " ((return (tex uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (tex vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (tex ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (tex uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) int offset) )\n" - " ((return (tex float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (tex float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DArrayShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) int offset) )\n" - " ((return (tex float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (const_in) int offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (const_in) int offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) float P) \n" - " (declare (const_in) int offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (const_in) ivec2 offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (const_in) ivec2 offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (const_in) ivec2 offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) ivec3 offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) ivec3 offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) ivec3 offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (const_in) int offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (const_in) int offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1DArray sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (const_in) int offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) ivec2 offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) ivec2 offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2DArray sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) ivec2 offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (var_ref P) (var_ref offset) 1 () (var_ref bias) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) int offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) (var_ref bias) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) ivec2 offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) (var_ref bias) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DArrayShadow sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) int offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) 1 (swiz z (var_ref P)) (var_ref bias) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_textureProj[] = - "((function textureProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec2 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) vec2 P) )\n" - " ((return (tex ivec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) vec2 P) )\n" - " ((return (tex uvec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex ivec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex uvec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex ivec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec3 P) )\n" - " ((return (tex uvec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex ivec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex uvec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex ivec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex uvec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex float (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec4 P) )\n" - " ((return (tex float (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb float (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float bias) )\n" - " ((return (txb float (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_textureProjGrad[] = - "((function textureProjGrad\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd ivec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd uvec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd ivec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd uvec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd ivec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd uvec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd ivec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd uvec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) )\n" - " ((return (txd ivec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) )\n" - " ((return (txd uvec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) )\n" - " ((return (txd float (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) )\n" - " ((return (txd float (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_textureProjGradOffset[] = - "((function textureProjGradOffset\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) \n" - " (declare (const_in) int offset) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) \n" - " (declare (const_in) int offset) )\n" - " ((return (txd ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) \n" - " (declare (const_in) int offset) )\n" - " ((return (txd uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) \n" - " (declare (const_in) int offset) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) \n" - " (declare (const_in) int offset) )\n" - " ((return (txd ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) \n" - " (declare (const_in) int offset) )\n" - " ((return (txd uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txd ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txd uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txd ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txd uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (txd vec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (txd ivec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec3 dPdx) \n" - " (declare (in) vec3 dPdy) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (txd uvec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float dPdx) \n" - " (declare (in) float dPdy) \n" - " (declare (const_in) int offset) )\n" - " ((return (txd float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) vec2 dPdx) \n" - " (declare (in) vec2 dPdy) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txd float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) ((var_ref dPdx) (var_ref dPdy)) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_textureProjLod[] = - "((function textureProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl ivec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl uvec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz y (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl ivec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl uvec4 (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl ivec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl uvec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz z (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl ivec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl uvec4 (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl vec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl ivec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl uvec4 (var_ref sampler) (swiz xyz (var_ref P)) 0 (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl float (var_ref sampler) (swiz x (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) )\n" - " ((return (txl float (var_ref sampler) (swiz xy (var_ref P)) 0 (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_textureProjLodOffset[] = - "((function textureProjLodOffset\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txl vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txl ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txl uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txl vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txl ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txl uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txl vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txl ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txl uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txl vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txl ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txl uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (txl vec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (txl ivec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (txl uvec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref lod) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) int offset) )\n" - " ((return (txl float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (in) float lod) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (txl float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_textureProjOffset[] = - "((function textureProjOffset\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (const_in) int offset) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (const_in) int offset) )\n" - " ((return (tex ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (const_in) int offset) )\n" - " ((return (tex uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) int offset) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) int offset) )\n" - " ((return (tex ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) int offset) )\n" - " ((return (tex uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (tex ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (tex uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (tex ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (tex uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (tex vec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (tex ivec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) ivec3 offset) )\n" - " ((return (tex uvec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) int offset) )\n" - " ((return (tex float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) ivec2 offset) )\n" - " ((return (tex float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (const_in) int offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (const_in) int offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) vec2 P) \n" - " (declare (const_in) int offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz y (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) int offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) int offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) int offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) ivec2 offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) ivec2 offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec3 P) \n" - " (declare (const_in) ivec2 offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz z (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) ivec2 offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) ivec2 offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) ivec2 offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) ivec3 offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb vec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature ivec4\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) ivec3 offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb ivec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature uvec4\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) ivec3 offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb uvec4 (var_ref sampler) (swiz xyz (var_ref P)) (var_ref offset) (swiz w (var_ref P)) () (var_ref bias) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) int offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb float (var_ref sampler) (swiz x (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n" - "\n" - " (signature float\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) vec4 P) \n" - " (declare (const_in) ivec2 offset) \n" - " (declare (in) float bias) )\n" - " ((return (txb float (var_ref sampler) (swiz xy (var_ref P)) (var_ref offset) (swiz w (var_ref P)) (swiz z (var_ref P)) (var_ref bias) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_textureSize[] = - "((function textureSize\n" - " (signature int\n" - " (parameters\n" - " (declare (in) sampler1D sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs int (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature int\n" - " (parameters\n" - " (declare (in) isampler1D sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs int (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature int\n" - " (parameters\n" - " (declare (in) usampler1D sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs int (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature ivec2\n" - " (parameters\n" - " (declare (in) sampler2D sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs ivec2 (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature ivec2\n" - " (parameters\n" - " (declare (in) isampler2D sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs ivec2 (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature ivec2\n" - " (parameters\n" - " (declare (in) usampler2D sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs ivec2 (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature ivec3\n" - " (parameters\n" - " (declare (in) sampler3D sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs ivec3 (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature ivec3\n" - " (parameters\n" - " (declare (in) isampler3D sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs ivec3 (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature ivec3\n" - " (parameters\n" - " (declare (in) usampler3D sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs ivec3 (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature ivec2\n" - " (parameters\n" - " (declare (in) samplerCube sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs ivec2 (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature ivec2\n" - " (parameters\n" - " (declare (in) isamplerCube sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs ivec2 (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature ivec2\n" - " (parameters\n" - " (declare (in) usamplerCube sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs ivec2 (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature ivec2\n" - " (parameters\n" - " (declare (in) sampler1DArray sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs ivec2 (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature ivec2\n" - " (parameters\n" - " (declare (in) isampler1DArray sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs ivec2 (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature ivec2\n" - " (parameters\n" - " (declare (in) usampler1DArray sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs ivec2 (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature ivec3\n" - " (parameters\n" - " (declare (in) sampler2DArray sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs ivec3 (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature ivec3\n" - " (parameters\n" - " (declare (in) isampler2DArray sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs ivec3 (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature ivec3\n" - " (parameters\n" - " (declare (in) usampler2DArray sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs ivec3 (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature int\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs int (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature ivec2\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs ivec2 (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature ivec2\n" - " (parameters\n" - " (declare (in) samplerCubeShadow sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs ivec2 (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature ivec2\n" - " (parameters\n" - " (declare (in) sampler1DArrayShadow sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs ivec2 (var_ref sampler) (var_ref lod) ))))\n" - "\n" - " (signature ivec3\n" - " (parameters\n" - " (declare (in) sampler2DArrayShadow sampler) \n" - " (declare (in) int lod) )\n" - " ((return (txs ivec3 (var_ref sampler) (var_ref lod) ))))\n" - "\n" - "))\n" - "" -; -static const char builtin_transpose[] = - "((function transpose\n" - " (signature mat2\n" - " (parameters\n" - " (declare (in) mat2 m))\n" - " ((declare () mat2 t)\n" - " (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n" - "(return (var_ref t))))\n" - "\n" - " (signature mat3x2\n" - " (parameters\n" - " (declare (in) mat2x3 m))\n" - " ((declare () mat3x2 t)\n" - " (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n" - "(return (var_ref t))))\n" - "\n" - " (signature mat4x2\n" - " (parameters\n" - " (declare (in) mat2x4 m))\n" - " ((declare () mat4x2 t)\n" - " (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))\n" - "(return (var_ref t))))\n" - "\n" - " (signature mat2x3\n" - " (parameters\n" - " (declare (in) mat3x2 m))\n" - " ((declare () mat2x3 t)\n" - " (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n" - " (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n" - "(return (var_ref t))))\n" - "\n" - " (signature mat3\n" - " (parameters\n" - " (declare (in) mat3 m))\n" - " ((declare () mat3 t)\n" - " (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n" - " (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n" - " (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))\n" - "(return (var_ref t))))\n" - "\n" - " (signature mat4x3\n" - " (parameters\n" - " (declare (in) mat3x4 m))\n" - " ((declare () mat4x3 t)\n" - " (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n" - " (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n" - " (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))\n" - " (assign (z) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (2)))))\n" - "(return (var_ref t))))\n" - "\n" - " (signature mat2x4\n" - " (parameters\n" - " (declare (in) mat4x2 m))\n" - " ((declare () mat2x4 t)\n" - " (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n" - " (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n" - " (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))\n" - " (assign (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))\n" - "(return (var_ref t))))\n" - "\n" - " (signature mat3x4\n" - " (parameters\n" - " (declare (in) mat4x3 m))\n" - " ((declare () mat3x4 t)\n" - " (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n" - " (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n" - " (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))\n" - " (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))\n" - " (assign (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))\n" - " (assign (w) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (3)))))\n" - "(return (var_ref t))))\n" - "\n" - " (signature mat4\n" - " (parameters\n" - " (declare (in) mat4 m))\n" - " ((declare () mat4 t)\n" - " (assign (x) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (x) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (x) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (x) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (0)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (y) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (1)))))\n" - " (assign (z) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (2)))))\n" - " (assign (z) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (2)))))\n" - " (assign (z) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (2)))))\n" - " (assign (z) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (2)))))\n" - " (assign (w) (array_ref (var_ref t) (constant int (0))) (swiz x (array_ref (var_ref m) (constant int (3)))))\n" - " (assign (w) (array_ref (var_ref t) (constant int (1))) (swiz y (array_ref (var_ref m) (constant int (3)))))\n" - " (assign (w) (array_ref (var_ref t) (constant int (2))) (swiz z (array_ref (var_ref m) (constant int (3)))))\n" - " (assign (w) (array_ref (var_ref t) (constant int (3))) (swiz w (array_ref (var_ref m) (constant int (3)))))\n" - "(return (var_ref t))))\n" - ")\n" - "\n" - ")\n" - "\n" - "" -; -static const char builtin_trunc[] = - "((function trunc\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float arg0))\n" - " ((return (expression float trunc (var_ref arg0)))))\n" - "\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 arg0))\n" - " ((return (expression vec2 trunc (var_ref arg0)))))\n" - "\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 arg0))\n" - " ((return (expression vec3 trunc (var_ref arg0)))))\n" - "\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 arg0))\n" - " ((return (expression vec4 trunc (var_ref arg0)))))\n" - "))\n" - "" -; -static const char prototypes_for_100_frag[] = - "(\n" - "(function radians\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float degrees))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 degrees))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 degrees))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 degrees))\n" - " ()))\n" - "(function degrees\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float radians))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 radians))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 radians))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 radians))\n" - " ()))\n" - "(function sin\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function cos\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function tan\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function asin\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function acos\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function atan\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float y)\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 y)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 y)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 y)\n" - " (declare (in) vec4 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float y_over_x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 y_over_x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 y_over_x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 y_over_x))\n" - " ()))\n" - "(function pow\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ()))\n" - "(function exp\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function log\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function exp2\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function log2\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function sqrt\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function inversesqrt\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function abs\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function sign\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function floor\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function ceil\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function fract\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function mod\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ()))\n" - "(function min\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float y))\n" - " ()))\n" - "(function max\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float y))\n" - " ()))\n" - "(function clamp\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 minVal)\n" - " (declare (in) vec2 maxVal))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 minVal)\n" - " (declare (in) vec3 maxVal))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 minVal)\n" - " (declare (in) vec4 maxVal))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ()))\n" - "(function mix\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y)\n" - " (declare (in) float a))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y)\n" - " (declare (in) vec2 a))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y)\n" - " (declare (in) vec3 a))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y)\n" - " (declare (in) vec4 a))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y)\n" - " (declare (in) float a))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y)\n" - " (declare (in) float a))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y)\n" - " (declare (in) float a))\n" - " ()))\n" - "(function step\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 edge)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 edge)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 edge)\n" - " (declare (in) vec4 x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function smoothstep\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 edge0)\n" - " (declare (in) vec2 edge1)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 edge0)\n" - " (declare (in) vec3 edge1)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 edge0)\n" - " (declare (in) vec4 edge1)\n" - " (declare (in) vec4 x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function length\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function distance\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float p0)\n" - " (declare (in) float p1))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 p0)\n" - " (declare (in) vec2 p1))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 p0)\n" - " (declare (in) vec3 p1))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 p0)\n" - " (declare (in) vec4 p1))\n" - " ()))\n" - "(function dot\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ()))\n" - "(function cross\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ()))\n" - "(function normalize\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function faceforward\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float N)\n" - " (declare (in) float I)\n" - " (declare (in) float Nref))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 N)\n" - " (declare (in) vec2 I)\n" - " (declare (in) vec2 Nref))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 N)\n" - " (declare (in) vec3 I)\n" - " (declare (in) vec3 Nref))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 N)\n" - " (declare (in) vec4 I)\n" - " (declare (in) vec4 Nref))\n" - " ()))\n" - "(function reflect\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float I)\n" - " (declare (in) float N))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 I)\n" - " (declare (in) vec2 N))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 I)\n" - " (declare (in) vec3 N))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 I)\n" - " (declare (in) vec4 N))\n" - " ()))\n" - "(function refract\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float I)\n" - " (declare (in) float N)\n" - " (declare (in) float eta))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 I)\n" - " (declare (in) vec2 N)\n" - " (declare (in) float eta))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 I)\n" - " (declare (in) vec3 N)\n" - " (declare (in) float eta))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 I)\n" - " (declare (in) vec4 N)\n" - " (declare (in) float eta))\n" - " ()))\n" - "(function matrixCompMult\n" - " (signature mat2\n" - " (parameters\n" - " (declare (in) mat2 x)\n" - " (declare (in) mat2 y))\n" - " ())\n" - " (signature mat3\n" - " (parameters\n" - " (declare (in) mat3 x)\n" - " (declare (in) mat3 y))\n" - " ())\n" - " (signature mat4\n" - " (parameters\n" - " (declare (in) mat4 x)\n" - " (declare (in) mat4 y))\n" - " ()))\n" - "(function lessThan\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function lessThanEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function greaterThan\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function greaterThanEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function equal\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 x)\n" - " (declare (in) bvec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 x)\n" - " (declare (in) bvec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 x)\n" - " (declare (in) bvec4 y))\n" - " ()))\n" - "(function notEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 x)\n" - " (declare (in) bvec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 x)\n" - " (declare (in) bvec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 x)\n" - " (declare (in) bvec4 y))\n" - " ()))\n" - "(function any\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec2 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec3 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec4 x))\n" - " ()))\n" - "(function all\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec2 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec3 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec4 x))\n" - " ()))\n" - "(function not\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 x))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 x))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 x))\n" - " ()))\n" - "(function texture2D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec2 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec2 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function texture2DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec4 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float bias))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function textureCube\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float bias))\n" - " ())))" -; -static const char *functions_for_100_frag [] = { - builtin_abs, - builtin_acos, - builtin_all, - builtin_any, - builtin_asin, - builtin_atan, - builtin_ceil, - builtin_clamp, - builtin_cos, - builtin_cross, - builtin_degrees, - builtin_distance, - builtin_dot, - builtin_equal, - builtin_exp, - builtin_exp2, - builtin_faceforward, - builtin_floor, - builtin_fract, - builtin_greaterThan, - builtin_greaterThanEqual, - builtin_inversesqrt, - builtin_length, - builtin_lessThan, - builtin_lessThanEqual, - builtin_log, - builtin_log2, - builtin_matrixCompMult, - builtin_max, - builtin_min, - builtin_mix, - builtin_mod, - builtin_normalize, - builtin_not, - builtin_notEqual, - builtin_pow, - builtin_radians, - builtin_reflect, - builtin_refract, - builtin_sign, - builtin_sin, - builtin_smoothstep, - builtin_sqrt, - builtin_step, - builtin_tan, - builtin_texture2D, - builtin_texture2DProj, - builtin_textureCube, -}; -static const char prototypes_for_100_vert[] = - "(\n" - "(function radians\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float degrees))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 degrees))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 degrees))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 degrees))\n" - " ()))\n" - "(function degrees\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float radians))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 radians))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 radians))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 radians))\n" - " ()))\n" - "(function sin\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function cos\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function tan\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function asin\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function acos\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function atan\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float y)\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 y)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 y)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 y)\n" - " (declare (in) vec4 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float y_over_x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 y_over_x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 y_over_x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 y_over_x))\n" - " ()))\n" - "(function pow\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ()))\n" - "(function exp\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function log\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function exp2\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function log2\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function sqrt\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function inversesqrt\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function abs\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function sign\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function floor\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function ceil\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function fract\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function mod\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ()))\n" - "(function min\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float y))\n" - " ()))\n" - "(function max\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float y))\n" - " ()))\n" - "(function clamp\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 minVal)\n" - " (declare (in) vec2 maxVal))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 minVal)\n" - " (declare (in) vec3 maxVal))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 minVal)\n" - " (declare (in) vec4 maxVal))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ()))\n" - "(function mix\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y)\n" - " (declare (in) float a))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y)\n" - " (declare (in) vec2 a))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y)\n" - " (declare (in) vec3 a))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y)\n" - " (declare (in) vec4 a))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y)\n" - " (declare (in) float a))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y)\n" - " (declare (in) float a))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y)\n" - " (declare (in) float a))\n" - " ()))\n" - "(function step\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 edge)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 edge)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 edge)\n" - " (declare (in) vec4 x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function smoothstep\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 edge0)\n" - " (declare (in) vec2 edge1)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 edge0)\n" - " (declare (in) vec3 edge1)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 edge0)\n" - " (declare (in) vec4 edge1)\n" - " (declare (in) vec4 x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function length\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function distance\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float p0)\n" - " (declare (in) float p1))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 p0)\n" - " (declare (in) vec2 p1))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 p0)\n" - " (declare (in) vec3 p1))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 p0)\n" - " (declare (in) vec4 p1))\n" - " ()))\n" - "(function dot\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ()))\n" - "(function cross\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ()))\n" - "(function normalize\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function faceforward\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float N)\n" - " (declare (in) float I)\n" - " (declare (in) float Nref))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 N)\n" - " (declare (in) vec2 I)\n" - " (declare (in) vec2 Nref))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 N)\n" - " (declare (in) vec3 I)\n" - " (declare (in) vec3 Nref))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 N)\n" - " (declare (in) vec4 I)\n" - " (declare (in) vec4 Nref))\n" - " ()))\n" - "(function reflect\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float I)\n" - " (declare (in) float N))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 I)\n" - " (declare (in) vec2 N))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 I)\n" - " (declare (in) vec3 N))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 I)\n" - " (declare (in) vec4 N))\n" - " ()))\n" - "(function refract\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float I)\n" - " (declare (in) float N)\n" - " (declare (in) float eta))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 I)\n" - " (declare (in) vec2 N)\n" - " (declare (in) float eta))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 I)\n" - " (declare (in) vec3 N)\n" - " (declare (in) float eta))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 I)\n" - " (declare (in) vec4 N)\n" - " (declare (in) float eta))\n" - " ()))\n" - "(function matrixCompMult\n" - " (signature mat2\n" - " (parameters\n" - " (declare (in) mat2 x)\n" - " (declare (in) mat2 y))\n" - " ())\n" - " (signature mat3\n" - " (parameters\n" - " (declare (in) mat3 x)\n" - " (declare (in) mat3 y))\n" - " ())\n" - " (signature mat4\n" - " (parameters\n" - " (declare (in) mat4 x)\n" - " (declare (in) mat4 y))\n" - " ()))\n" - "(function lessThan\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function lessThanEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function greaterThan\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function greaterThanEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function equal\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 x)\n" - " (declare (in) bvec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 x)\n" - " (declare (in) bvec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 x)\n" - " (declare (in) bvec4 y))\n" - " ()))\n" - "(function notEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 x)\n" - " (declare (in) bvec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 x)\n" - " (declare (in) bvec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 x)\n" - " (declare (in) bvec4 y))\n" - " ()))\n" - "(function any\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec2 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec3 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec4 x))\n" - " ()))\n" - "(function all\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec2 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec3 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec4 x))\n" - " ()))\n" - "(function not\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 x))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 x))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 x))\n" - " ()))\n" - "(function texture2D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec2 coord))\n" - " ()))\n" - "(function texture2DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec4 coord))\n" - " ()))\n" - "(function texture2DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec2 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function texture2DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float lod))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function textureCube\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler)\n" - " (declare (in) vec3 coord))\n" - " ()))\n" - "(function textureCubeLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float lod))\n" - " ())))" -; -static const char *functions_for_100_vert [] = { - builtin_abs, - builtin_acos, - builtin_all, - builtin_any, - builtin_asin, - builtin_atan, - builtin_ceil, - builtin_clamp, - builtin_cos, - builtin_cross, - builtin_degrees, - builtin_distance, - builtin_dot, - builtin_equal, - builtin_exp, - builtin_exp2, - builtin_faceforward, - builtin_floor, - builtin_fract, - builtin_greaterThan, - builtin_greaterThanEqual, - builtin_inversesqrt, - builtin_length, - builtin_lessThan, - builtin_lessThanEqual, - builtin_log, - builtin_log2, - builtin_matrixCompMult, - builtin_max, - builtin_min, - builtin_mix, - builtin_mod, - builtin_normalize, - builtin_not, - builtin_notEqual, - builtin_pow, - builtin_radians, - builtin_reflect, - builtin_refract, - builtin_sign, - builtin_sin, - builtin_smoothstep, - builtin_sqrt, - builtin_step, - builtin_tan, - builtin_texture2D, - builtin_texture2DLod, - builtin_texture2DProj, - builtin_texture2DProjLod, - builtin_textureCube, - builtin_textureCubeLod, -}; -static const char prototypes_for_110_frag[] = - "(\n" - "(function radians\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float degrees))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 degrees))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 degrees))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 degrees))\n" - " ()))\n" - "(function degrees\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float radians))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 radians))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 radians))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 radians))\n" - " ()))\n" - "(function sin\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function cos\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function tan\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function asin\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function acos\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function atan\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float y)\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 y)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 y)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 y)\n" - " (declare (in) vec4 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float y_over_x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 y_over_x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 y_over_x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 y_over_x))\n" - " ()))\n" - "(function pow\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ()))\n" - "(function exp\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function log\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function exp2\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function log2\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function sqrt\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function inversesqrt\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function abs\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function sign\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function floor\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function ceil\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function fract\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function mod\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ()))\n" - "(function min\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float y))\n" - " ()))\n" - "(function max\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float y))\n" - " ()))\n" - "(function clamp\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 minVal)\n" - " (declare (in) vec2 maxVal))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 minVal)\n" - " (declare (in) vec3 maxVal))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 minVal)\n" - " (declare (in) vec4 maxVal))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ()))\n" - "(function mix\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y)\n" - " (declare (in) float a))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y)\n" - " (declare (in) vec2 a))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y)\n" - " (declare (in) vec3 a))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y)\n" - " (declare (in) vec4 a))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y)\n" - " (declare (in) float a))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y)\n" - " (declare (in) float a))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y)\n" - " (declare (in) float a))\n" - " ()))\n" - "(function step\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 edge)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 edge)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 edge)\n" - " (declare (in) vec4 x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function smoothstep\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 edge0)\n" - " (declare (in) vec2 edge1)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 edge0)\n" - " (declare (in) vec3 edge1)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 edge0)\n" - " (declare (in) vec4 edge1)\n" - " (declare (in) vec4 x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function length\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function distance\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float p0)\n" - " (declare (in) float p1))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 p0)\n" - " (declare (in) vec2 p1))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 p0)\n" - " (declare (in) vec3 p1))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 p0)\n" - " (declare (in) vec4 p1))\n" - " ()))\n" - "(function dot\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ()))\n" - "(function cross\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ()))\n" - "(function normalize\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function faceforward\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float N)\n" - " (declare (in) float I)\n" - " (declare (in) float Nref))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 N)\n" - " (declare (in) vec2 I)\n" - " (declare (in) vec2 Nref))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 N)\n" - " (declare (in) vec3 I)\n" - " (declare (in) vec3 Nref))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 N)\n" - " (declare (in) vec4 I)\n" - " (declare (in) vec4 Nref))\n" - " ()))\n" - "(function reflect\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float I)\n" - " (declare (in) float N))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 I)\n" - " (declare (in) vec2 N))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 I)\n" - " (declare (in) vec3 N))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 I)\n" - " (declare (in) vec4 N))\n" - " ()))\n" - "(function refract\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float I)\n" - " (declare (in) float N)\n" - " (declare (in) float eta))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 I)\n" - " (declare (in) vec2 N)\n" - " (declare (in) float eta))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 I)\n" - " (declare (in) vec3 N)\n" - " (declare (in) float eta))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 I)\n" - " (declare (in) vec4 N)\n" - " (declare (in) float eta))\n" - " ()))\n" - "(function matrixCompMult\n" - " (signature mat2\n" - " (parameters\n" - " (declare (in) mat2 x)\n" - " (declare (in) mat2 y))\n" - " ())\n" - " (signature mat3\n" - " (parameters\n" - " (declare (in) mat3 x)\n" - " (declare (in) mat3 y))\n" - " ())\n" - " (signature mat4\n" - " (parameters\n" - " (declare (in) mat4 x)\n" - " (declare (in) mat4 y))\n" - " ()))\n" - "(function lessThan\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function lessThanEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function greaterThan\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function greaterThanEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function equal\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 x)\n" - " (declare (in) bvec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 x)\n" - " (declare (in) bvec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 x)\n" - " (declare (in) bvec4 y))\n" - " ()))\n" - "(function notEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 x)\n" - " (declare (in) bvec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 x)\n" - " (declare (in) bvec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 x)\n" - " (declare (in) bvec4 y))\n" - " ()))\n" - "(function any\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec2 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec3 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec4 x))\n" - " ()))\n" - "(function all\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec2 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec3 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec4 x))\n" - " ()))\n" - "(function not\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 x))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 x))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 x))\n" - " ()))\n" - "(function texture1D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) float coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) float coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function texture1DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec2 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec4 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec2 coord)\n" - " (declare (in) float bias))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function texture2D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec2 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec2 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function texture2DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec4 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float bias))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function texture3D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function texture3DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec4 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function textureCube\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function shadow1D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function shadow2D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function shadow1DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec4 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function shadow2DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec4 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function dFdx\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float p))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 p))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 p))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 p))\n" - " ()))\n" - "(function dFdy\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float p))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 p))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 p))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 p))\n" - " ()))\n" - "(function fwidth\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float p))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 p))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 p))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 p))\n" - " ()))\n" - "(function noise1\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function noise2\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function noise3\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function noise4\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ())))" -; -static const char *functions_for_110_frag [] = { - builtin_abs, - builtin_acos, - builtin_all, - builtin_any, - builtin_asin, - builtin_atan, - builtin_ceil, - builtin_clamp, - builtin_cos, - builtin_cross, - builtin_dFdx, - builtin_dFdy, - builtin_degrees, - builtin_distance, - builtin_dot, - builtin_equal, - builtin_exp, - builtin_exp2, - builtin_faceforward, - builtin_floor, - builtin_fract, - builtin_fwidth, - builtin_greaterThan, - builtin_greaterThanEqual, - builtin_inversesqrt, - builtin_length, - builtin_lessThan, - builtin_lessThanEqual, - builtin_log, - builtin_log2, - builtin_matrixCompMult, - builtin_max, - builtin_min, - builtin_mix, - builtin_mod, - builtin_noise1, - builtin_noise2, - builtin_noise3, - builtin_noise4, - builtin_normalize, - builtin_not, - builtin_notEqual, - builtin_pow, - builtin_radians, - builtin_reflect, - builtin_refract, - builtin_shadow1D, - builtin_shadow1DProj, - builtin_shadow2D, - builtin_shadow2DProj, - builtin_sign, - builtin_sin, - builtin_smoothstep, - builtin_sqrt, - builtin_step, - builtin_tan, - builtin_texture1D, - builtin_texture1DProj, - builtin_texture2D, - builtin_texture2DProj, - builtin_texture3D, - builtin_texture3DProj, - builtin_textureCube, -}; -static const char prototypes_for_110_vert[] = - "(\n" - "(function radians\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float degrees))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 degrees))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 degrees))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 degrees))\n" - " ()))\n" - "(function degrees\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float radians))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 radians))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 radians))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 radians))\n" - " ()))\n" - "(function sin\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function cos\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function tan\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function asin\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function acos\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function atan\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float y)\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 y)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 y)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 y)\n" - " (declare (in) vec4 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float y_over_x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 y_over_x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 y_over_x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 y_over_x))\n" - " ()))\n" - "(function pow\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ()))\n" - "(function exp\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function log\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function exp2\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function log2\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function sqrt\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function inversesqrt\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function abs\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function sign\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function floor\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function ceil\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function fract\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function mod\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ()))\n" - "(function min\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float y))\n" - " ()))\n" - "(function max\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float y))\n" - " ()))\n" - "(function clamp\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 minVal)\n" - " (declare (in) vec2 maxVal))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 minVal)\n" - " (declare (in) vec3 maxVal))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 minVal)\n" - " (declare (in) vec4 maxVal))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ()))\n" - "(function mix\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y)\n" - " (declare (in) float a))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y)\n" - " (declare (in) vec2 a))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y)\n" - " (declare (in) vec3 a))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y)\n" - " (declare (in) vec4 a))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y)\n" - " (declare (in) float a))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y)\n" - " (declare (in) float a))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y)\n" - " (declare (in) float a))\n" - " ()))\n" - "(function step\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 edge)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 edge)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 edge)\n" - " (declare (in) vec4 x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function smoothstep\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 edge0)\n" - " (declare (in) vec2 edge1)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 edge0)\n" - " (declare (in) vec3 edge1)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 edge0)\n" - " (declare (in) vec4 edge1)\n" - " (declare (in) vec4 x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function length\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function distance\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float p0)\n" - " (declare (in) float p1))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 p0)\n" - " (declare (in) vec2 p1))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 p0)\n" - " (declare (in) vec3 p1))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 p0)\n" - " (declare (in) vec4 p1))\n" - " ()))\n" - "(function dot\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ()))\n" - "(function cross\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ()))\n" - "(function normalize\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function ftransform\n" - " (signature vec4\n" - " (parameters)\n" - " ()))\n" - "(function faceforward\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float N)\n" - " (declare (in) float I)\n" - " (declare (in) float Nref))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 N)\n" - " (declare (in) vec2 I)\n" - " (declare (in) vec2 Nref))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 N)\n" - " (declare (in) vec3 I)\n" - " (declare (in) vec3 Nref))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 N)\n" - " (declare (in) vec4 I)\n" - " (declare (in) vec4 Nref))\n" - " ()))\n" - "(function reflect\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float I)\n" - " (declare (in) float N))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 I)\n" - " (declare (in) vec2 N))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 I)\n" - " (declare (in) vec3 N))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 I)\n" - " (declare (in) vec4 N))\n" - " ()))\n" - "(function refract\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float I)\n" - " (declare (in) float N)\n" - " (declare (in) float eta))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 I)\n" - " (declare (in) vec2 N)\n" - " (declare (in) float eta))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 I)\n" - " (declare (in) vec3 N)\n" - " (declare (in) float eta))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 I)\n" - " (declare (in) vec4 N)\n" - " (declare (in) float eta))\n" - " ()))\n" - "(function matrixCompMult\n" - " (signature mat2\n" - " (parameters\n" - " (declare (in) mat2 x)\n" - " (declare (in) mat2 y))\n" - " ())\n" - " (signature mat3\n" - " (parameters\n" - " (declare (in) mat3 x)\n" - " (declare (in) mat3 y))\n" - " ())\n" - " (signature mat4\n" - " (parameters\n" - " (declare (in) mat4 x)\n" - " (declare (in) mat4 y))\n" - " ()))\n" - "(function lessThan\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function lessThanEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function greaterThan\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function greaterThanEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function equal\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 x)\n" - " (declare (in) bvec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 x)\n" - " (declare (in) bvec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 x)\n" - " (declare (in) bvec4 y))\n" - " ()))\n" - "(function notEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 x)\n" - " (declare (in) bvec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 x)\n" - " (declare (in) bvec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 x)\n" - " (declare (in) bvec4 y))\n" - " ()))\n" - "(function any\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec2 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec3 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec4 x))\n" - " ()))\n" - "(function all\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec2 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec3 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec4 x))\n" - " ()))\n" - "(function not\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 x))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 x))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 x))\n" - " ()))\n" - "(function texture1D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) float coord))\n" - " ()))\n" - "(function texture1DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec2 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec4 coord))\n" - " ()))\n" - "(function texture1DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) float coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function texture1DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec2 coord)\n" - " (declare (in) float lod))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function texture2D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec2 coord))\n" - " ()))\n" - "(function texture2DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec4 coord))\n" - " ()))\n" - "(function texture2DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec2 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function texture2DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float lod))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function texture3D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec3 coord))\n" - " ()))\n" - "(function texture3DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec4 coord))\n" - " ()))\n" - "(function texture3DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function texture3DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function textureCube\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler)\n" - " (declare (in) vec3 coord))\n" - " ()))\n" - "(function textureCubeLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function shadow1D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec3 coord))\n" - " ()))\n" - "(function shadow2D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec3 coord))\n" - " ()))\n" - "(function shadow1DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec4 coord))\n" - " ()))\n" - "(function shadow2DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec4 coord))\n" - " ()))\n" - "(function shadow1DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function shadow2DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function shadow1DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function shadow2DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function noise1\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function noise2\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function noise3\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function noise4\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ())))" -; -static const char *functions_for_110_vert [] = { - builtin_abs, - builtin_acos, - builtin_all, - builtin_any, - builtin_asin, - builtin_atan, - builtin_ceil, - builtin_clamp, - builtin_cos, - builtin_cross, - builtin_degrees, - builtin_distance, - builtin_dot, - builtin_equal, - builtin_exp, - builtin_exp2, - builtin_faceforward, - builtin_floor, - builtin_fract, - builtin_ftransform, - builtin_greaterThan, - builtin_greaterThanEqual, - builtin_inversesqrt, - builtin_length, - builtin_lessThan, - builtin_lessThanEqual, - builtin_log, - builtin_log2, - builtin_matrixCompMult, - builtin_max, - builtin_min, - builtin_mix, - builtin_mod, - builtin_noise1, - builtin_noise2, - builtin_noise3, - builtin_noise4, - builtin_normalize, - builtin_not, - builtin_notEqual, - builtin_pow, - builtin_radians, - builtin_reflect, - builtin_refract, - builtin_shadow1D, - builtin_shadow1DLod, - builtin_shadow1DProj, - builtin_shadow1DProjLod, - builtin_shadow2D, - builtin_shadow2DLod, - builtin_shadow2DProj, - builtin_shadow2DProjLod, - builtin_sign, - builtin_sin, - builtin_smoothstep, - builtin_sqrt, - builtin_step, - builtin_tan, - builtin_texture1D, - builtin_texture1DLod, - builtin_texture1DProj, - builtin_texture1DProjLod, - builtin_texture2D, - builtin_texture2DLod, - builtin_texture2DProj, - builtin_texture2DProjLod, - builtin_texture3D, - builtin_texture3DLod, - builtin_texture3DProj, - builtin_texture3DProjLod, - builtin_textureCube, - builtin_textureCubeLod, -}; -static const char prototypes_for_120_frag[] = - "(\n" - "(function radians\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float degrees))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 degrees))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 degrees))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 degrees))\n" - " ()))\n" - "(function degrees\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float radians))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 radians))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 radians))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 radians))\n" - " ()))\n" - "(function sin\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function cos\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function tan\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function asin\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function acos\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function atan\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float y)\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 y)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 y)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 y)\n" - " (declare (in) vec4 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float y_over_x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 y_over_x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 y_over_x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 y_over_x))\n" - " ()))\n" - "(function pow\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ()))\n" - "(function exp\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function log\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function exp2\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function log2\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function sqrt\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function inversesqrt\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function abs\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function sign\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function floor\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function ceil\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function fract\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function mod\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ()))\n" - "(function min\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float y))\n" - " ()))\n" - "(function max\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float y))\n" - " ()))\n" - "(function clamp\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 minVal)\n" - " (declare (in) vec2 maxVal))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 minVal)\n" - " (declare (in) vec3 maxVal))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 minVal)\n" - " (declare (in) vec4 maxVal))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ()))\n" - "(function mix\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y)\n" - " (declare (in) float a))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y)\n" - " (declare (in) vec2 a))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y)\n" - " (declare (in) vec3 a))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y)\n" - " (declare (in) vec4 a))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y)\n" - " (declare (in) float a))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y)\n" - " (declare (in) float a))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y)\n" - " (declare (in) float a))\n" - " ()))\n" - "(function step\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 edge)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 edge)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 edge)\n" - " (declare (in) vec4 x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function smoothstep\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 edge0)\n" - " (declare (in) vec2 edge1)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 edge0)\n" - " (declare (in) vec3 edge1)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 edge0)\n" - " (declare (in) vec4 edge1)\n" - " (declare (in) vec4 x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function length\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function distance\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float p0)\n" - " (declare (in) float p1))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 p0)\n" - " (declare (in) vec2 p1))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 p0)\n" - " (declare (in) vec3 p1))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 p0)\n" - " (declare (in) vec4 p1))\n" - " ()))\n" - "(function dot\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ()))\n" - "(function cross\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ()))\n" - "(function normalize\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function faceforward\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float N)\n" - " (declare (in) float I)\n" - " (declare (in) float Nref))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 N)\n" - " (declare (in) vec2 I)\n" - " (declare (in) vec2 Nref))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 N)\n" - " (declare (in) vec3 I)\n" - " (declare (in) vec3 Nref))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 N)\n" - " (declare (in) vec4 I)\n" - " (declare (in) vec4 Nref))\n" - " ()))\n" - "(function reflect\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float I)\n" - " (declare (in) float N))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 I)\n" - " (declare (in) vec2 N))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 I)\n" - " (declare (in) vec3 N))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 I)\n" - " (declare (in) vec4 N))\n" - " ()))\n" - "(function refract\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float I)\n" - " (declare (in) float N)\n" - " (declare (in) float eta))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 I)\n" - " (declare (in) vec2 N)\n" - " (declare (in) float eta))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 I)\n" - " (declare (in) vec3 N)\n" - " (declare (in) float eta))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 I)\n" - " (declare (in) vec4 N)\n" - " (declare (in) float eta))\n" - " ()))\n" - "(function matrixCompMult\n" - " (signature mat2\n" - " (parameters\n" - " (declare (in) mat2 x)\n" - " (declare (in) mat2 y))\n" - " ())\n" - " (signature mat3\n" - " (parameters\n" - " (declare (in) mat3 x)\n" - " (declare (in) mat3 y))\n" - " ())\n" - " (signature mat4\n" - " (parameters\n" - " (declare (in) mat4 x)\n" - " (declare (in) mat4 y))\n" - " ())\n" - " (signature mat2x3\n" - " (parameters\n" - " (declare (in) mat2x3 x)\n" - " (declare (in) mat2x3 y))\n" - " ())\n" - " (signature mat2x4\n" - " (parameters\n" - " (declare (in) mat2x4 x)\n" - " (declare (in) mat2x4 y))\n" - " ())\n" - " (signature mat3x2\n" - " (parameters\n" - " (declare (in) mat3x2 x)\n" - " (declare (in) mat3x2 y))\n" - " ())\n" - " (signature mat3x4\n" - " (parameters\n" - " (declare (in) mat3x4 x)\n" - " (declare (in) mat3x4 y))\n" - " ())\n" - " (signature mat4x2\n" - " (parameters\n" - " (declare (in) mat4x2 x)\n" - " (declare (in) mat4x2 y))\n" - " ())\n" - " (signature mat4x3\n" - " (parameters\n" - " (declare (in) mat4x3 x)\n" - " (declare (in) mat4x3 y))\n" - " ()))\n" - "(function outerProduct\n" - " (signature mat2\n" - " (parameters\n" - " (declare (in) vec2 c)\n" - " (declare (in) vec2 r))\n" - " ())\n" - " (signature mat3\n" - " (parameters\n" - " (declare (in) vec3 c)\n" - " (declare (in) vec3 r))\n" - " ())\n" - " (signature mat4\n" - " (parameters\n" - " (declare (in) vec4 c)\n" - " (declare (in) vec4 r))\n" - " ())\n" - " (signature mat2x3\n" - " (parameters\n" - " (declare (in) vec3 c)\n" - " (declare (in) vec2 r))\n" - " ())\n" - " (signature mat3x2\n" - " (parameters\n" - " (declare (in) vec2 c)\n" - " (declare (in) vec3 r))\n" - " ())\n" - " (signature mat2x4\n" - " (parameters\n" - " (declare (in) vec4 c)\n" - " (declare (in) vec2 r))\n" - " ())\n" - " (signature mat4x2\n" - " (parameters\n" - " (declare (in) vec2 c)\n" - " (declare (in) vec4 r))\n" - " ())\n" - " (signature mat3x4\n" - " (parameters\n" - " (declare (in) vec4 c)\n" - " (declare (in) vec3 r))\n" - " ())\n" - " (signature mat4x3\n" - " (parameters\n" - " (declare (in) vec3 c)\n" - " (declare (in) vec4 r))\n" - " ()))\n" - "(function transpose\n" - " (signature mat2\n" - " (parameters\n" - " (declare (in) mat2 m))\n" - " ())\n" - " (signature mat3\n" - " (parameters\n" - " (declare (in) mat3 m))\n" - " ())\n" - " (signature mat4\n" - " (parameters\n" - " (declare (in) mat4 m))\n" - " ())\n" - " (signature mat2x3\n" - " (parameters\n" - " (declare (in) mat3x2 m))\n" - " ())\n" - " (signature mat3x2\n" - " (parameters\n" - " (declare (in) mat2x3 m))\n" - " ())\n" - " (signature mat2x4\n" - " (parameters\n" - " (declare (in) mat4x2 m))\n" - " ())\n" - " (signature mat4x2\n" - " (parameters\n" - " (declare (in) mat2x4 m))\n" - " ())\n" - " (signature mat3x4\n" - " (parameters\n" - " (declare (in) mat4x3 m))\n" - " ())\n" - " (signature mat4x3\n" - " (parameters\n" - " (declare (in) mat3x4 m))\n" - " ()))\n" - "(function lessThan\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function lessThanEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function greaterThan\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function greaterThanEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function equal\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 x)\n" - " (declare (in) bvec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 x)\n" - " (declare (in) bvec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 x)\n" - " (declare (in) bvec4 y))\n" - " ()))\n" - "(function notEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 x)\n" - " (declare (in) bvec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 x)\n" - " (declare (in) bvec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 x)\n" - " (declare (in) bvec4 y))\n" - " ()))\n" - "(function any\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec2 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec3 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec4 x))\n" - " ()))\n" - "(function all\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec2 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec3 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec4 x))\n" - " ()))\n" - "(function not\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 x))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 x))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 x))\n" - " ()))\n" - "(function texture1D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) float coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) float coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function texture1DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec2 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec4 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec2 coord)\n" - " (declare (in) float bias))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function texture2D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec2 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec2 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function texture2DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec4 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float bias))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function texture3D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function texture3DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec4 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function textureCube\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function shadow1D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function shadow2D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function shadow1DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec4 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function shadow2DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec4 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function dFdx\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float p))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 p))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 p))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 p))\n" - " ()))\n" - "(function dFdy\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float p))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 p))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 p))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 p))\n" - " ()))\n" - "(function fwidth\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float p))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 p))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 p))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 p))\n" - " ()))\n" - "(function noise1\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function noise2\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function noise3\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function noise4\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ())))" -; -static const char *functions_for_120_frag [] = { - builtin_abs, - builtin_acos, - builtin_all, - builtin_any, - builtin_asin, - builtin_atan, - builtin_ceil, - builtin_clamp, - builtin_cos, - builtin_cross, - builtin_dFdx, - builtin_dFdy, - builtin_degrees, - builtin_distance, - builtin_dot, - builtin_equal, - builtin_exp, - builtin_exp2, - builtin_faceforward, - builtin_floor, - builtin_fract, - builtin_fwidth, - builtin_greaterThan, - builtin_greaterThanEqual, - builtin_inversesqrt, - builtin_length, - builtin_lessThan, - builtin_lessThanEqual, - builtin_log, - builtin_log2, - builtin_matrixCompMult, - builtin_max, - builtin_min, - builtin_mix, - builtin_mod, - builtin_noise1, - builtin_noise2, - builtin_noise3, - builtin_noise4, - builtin_normalize, - builtin_not, - builtin_notEqual, - builtin_outerProduct, - builtin_pow, - builtin_radians, - builtin_reflect, - builtin_refract, - builtin_shadow1D, - builtin_shadow1DProj, - builtin_shadow2D, - builtin_shadow2DProj, - builtin_sign, - builtin_sin, - builtin_smoothstep, - builtin_sqrt, - builtin_step, - builtin_tan, - builtin_texture1D, - builtin_texture1DProj, - builtin_texture2D, - builtin_texture2DProj, - builtin_texture3D, - builtin_texture3DProj, - builtin_textureCube, - builtin_transpose, -}; -static const char prototypes_for_120_vert[] = - "(\n" - "(function radians\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float degrees))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 degrees))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 degrees))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 degrees))\n" - " ()))\n" - "(function degrees\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float radians))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 radians))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 radians))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 radians))\n" - " ()))\n" - "(function sin\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function cos\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function tan\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function asin\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function acos\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float angle))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 angle))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 angle))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 angle))\n" - " ()))\n" - "(function atan\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float y)\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 y)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 y)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 y)\n" - " (declare (in) vec4 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float y_over_x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 y_over_x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 y_over_x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 y_over_x))\n" - " ()))\n" - "(function pow\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ()))\n" - "(function exp\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function log\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function exp2\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function log2\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function sqrt\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function inversesqrt\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function abs\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function sign\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function floor\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function ceil\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function fract\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function mod\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ()))\n" - "(function min\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float y))\n" - " ()))\n" - "(function max\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float y))\n" - " ()))\n" - "(function clamp\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 minVal)\n" - " (declare (in) vec2 maxVal))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 minVal)\n" - " (declare (in) vec3 maxVal))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 minVal)\n" - " (declare (in) vec4 maxVal))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) float minVal)\n" - " (declare (in) float maxVal))\n" - " ()))\n" - "(function mix\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y)\n" - " (declare (in) float a))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y)\n" - " (declare (in) vec2 a))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y)\n" - " (declare (in) vec3 a))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y)\n" - " (declare (in) vec4 a))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y)\n" - " (declare (in) float a))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y)\n" - " (declare (in) float a))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y)\n" - " (declare (in) float a))\n" - " ()))\n" - "(function step\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 edge)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 edge)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 edge)\n" - " (declare (in) vec4 x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) float edge)\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function smoothstep\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 edge0)\n" - " (declare (in) vec2 edge1)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 edge0)\n" - " (declare (in) vec3 edge1)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 edge0)\n" - " (declare (in) vec4 edge1)\n" - " (declare (in) vec4 x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) float edge0)\n" - " (declare (in) float edge1)\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function length\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function distance\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float p0)\n" - " (declare (in) float p1))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 p0)\n" - " (declare (in) vec2 p1))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 p0)\n" - " (declare (in) vec3 p1))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 p0)\n" - " (declare (in) vec4 p1))\n" - " ()))\n" - "(function dot\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x)\n" - " (declare (in) float y))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ()))\n" - "(function cross\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ()))\n" - "(function normalize\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function ftransform\n" - " (signature vec4\n" - " (parameters)\n" - " ()))\n" - "(function faceforward\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float N)\n" - " (declare (in) float I)\n" - " (declare (in) float Nref))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 N)\n" - " (declare (in) vec2 I)\n" - " (declare (in) vec2 Nref))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 N)\n" - " (declare (in) vec3 I)\n" - " (declare (in) vec3 Nref))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 N)\n" - " (declare (in) vec4 I)\n" - " (declare (in) vec4 Nref))\n" - " ()))\n" - "(function reflect\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float I)\n" - " (declare (in) float N))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 I)\n" - " (declare (in) vec2 N))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 I)\n" - " (declare (in) vec3 N))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 I)\n" - " (declare (in) vec4 N))\n" - " ()))\n" - "(function refract\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float I)\n" - " (declare (in) float N)\n" - " (declare (in) float eta))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 I)\n" - " (declare (in) vec2 N)\n" - " (declare (in) float eta))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 I)\n" - " (declare (in) vec3 N)\n" - " (declare (in) float eta))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 I)\n" - " (declare (in) vec4 N)\n" - " (declare (in) float eta))\n" - " ()))\n" - "(function matrixCompMult\n" - " (signature mat2\n" - " (parameters\n" - " (declare (in) mat2 x)\n" - " (declare (in) mat2 y))\n" - " ())\n" - " (signature mat3\n" - " (parameters\n" - " (declare (in) mat3 x)\n" - " (declare (in) mat3 y))\n" - " ())\n" - " (signature mat4\n" - " (parameters\n" - " (declare (in) mat4 x)\n" - " (declare (in) mat4 y))\n" - " ())\n" - " (signature mat2x3\n" - " (parameters\n" - " (declare (in) mat2x3 x)\n" - " (declare (in) mat2x3 y))\n" - " ())\n" - " (signature mat2x4\n" - " (parameters\n" - " (declare (in) mat2x4 x)\n" - " (declare (in) mat2x4 y))\n" - " ())\n" - " (signature mat3x2\n" - " (parameters\n" - " (declare (in) mat3x2 x)\n" - " (declare (in) mat3x2 y))\n" - " ())\n" - " (signature mat3x4\n" - " (parameters\n" - " (declare (in) mat3x4 x)\n" - " (declare (in) mat3x4 y))\n" - " ())\n" - " (signature mat4x2\n" - " (parameters\n" - " (declare (in) mat4x2 x)\n" - " (declare (in) mat4x2 y))\n" - " ())\n" - " (signature mat4x3\n" - " (parameters\n" - " (declare (in) mat4x3 x)\n" - " (declare (in) mat4x3 y))\n" - " ()))\n" - "(function outerProduct\n" - " (signature mat2\n" - " (parameters\n" - " (declare (in) vec2 c)\n" - " (declare (in) vec2 r))\n" - " ())\n" - " (signature mat3\n" - " (parameters\n" - " (declare (in) vec3 c)\n" - " (declare (in) vec3 r))\n" - " ())\n" - " (signature mat4\n" - " (parameters\n" - " (declare (in) vec4 c)\n" - " (declare (in) vec4 r))\n" - " ())\n" - " (signature mat2x3\n" - " (parameters\n" - " (declare (in) vec3 c)\n" - " (declare (in) vec2 r))\n" - " ())\n" - " (signature mat3x2\n" - " (parameters\n" - " (declare (in) vec2 c)\n" - " (declare (in) vec3 r))\n" - " ())\n" - " (signature mat2x4\n" - " (parameters\n" - " (declare (in) vec4 c)\n" - " (declare (in) vec2 r))\n" - " ())\n" - " (signature mat4x2\n" - " (parameters\n" - " (declare (in) vec2 c)\n" - " (declare (in) vec4 r))\n" - " ())\n" - " (signature mat3x4\n" - " (parameters\n" - " (declare (in) vec4 c)\n" - " (declare (in) vec3 r))\n" - " ())\n" - " (signature mat4x3\n" - " (parameters\n" - " (declare (in) vec3 c)\n" - " (declare (in) vec4 r))\n" - " ()))\n" - "(function transpose\n" - " (signature mat2\n" - " (parameters\n" - " (declare (in) mat2 m))\n" - " ())\n" - " (signature mat3\n" - " (parameters\n" - " (declare (in) mat3 m))\n" - " ())\n" - " (signature mat4\n" - " (parameters\n" - " (declare (in) mat4 m))\n" - " ())\n" - " (signature mat2x3\n" - " (parameters\n" - " (declare (in) mat3x2 m))\n" - " ())\n" - " (signature mat3x2\n" - " (parameters\n" - " (declare (in) mat2x3 m))\n" - " ())\n" - " (signature mat2x4\n" - " (parameters\n" - " (declare (in) mat4x2 m))\n" - " ())\n" - " (signature mat4x2\n" - " (parameters\n" - " (declare (in) mat2x4 m))\n" - " ())\n" - " (signature mat3x4\n" - " (parameters\n" - " (declare (in) mat4x3 m))\n" - " ())\n" - " (signature mat4x3\n" - " (parameters\n" - " (declare (in) mat3x4 m))\n" - " ()))\n" - "(function lessThan\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function lessThanEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function greaterThan\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function greaterThanEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ()))\n" - "(function equal\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 x)\n" - " (declare (in) bvec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 x)\n" - " (declare (in) bvec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 x)\n" - " (declare (in) bvec4 y))\n" - " ()))\n" - "(function notEqual\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) vec2 x)\n" - " (declare (in) vec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) vec3 x)\n" - " (declare (in) vec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) vec4 x)\n" - " (declare (in) vec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) ivec2 x)\n" - " (declare (in) ivec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) ivec3 x)\n" - " (declare (in) ivec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) ivec4 x)\n" - " (declare (in) ivec4 y))\n" - " ())\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 x)\n" - " (declare (in) bvec2 y))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 x)\n" - " (declare (in) bvec3 y))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 x)\n" - " (declare (in) bvec4 y))\n" - " ()))\n" - "(function any\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec2 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec3 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec4 x))\n" - " ()))\n" - "(function all\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec2 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec3 x))\n" - " ())\n" - " (signature bool\n" - " (parameters\n" - " (declare (in) bvec4 x))\n" - " ()))\n" - "(function not\n" - " (signature bvec2\n" - " (parameters\n" - " (declare (in) bvec2 x))\n" - " ())\n" - " (signature bvec3\n" - " (parameters\n" - " (declare (in) bvec3 x))\n" - " ())\n" - " (signature bvec4\n" - " (parameters\n" - " (declare (in) bvec4 x))\n" - " ()))\n" - "(function texture1D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) float coord))\n" - " ()))\n" - "(function texture1DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec2 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec4 coord))\n" - " ()))\n" - "(function texture1DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) float coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function texture1DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec2 coord)\n" - " (declare (in) float lod))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function texture2D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec2 coord))\n" - " ()))\n" - "(function texture2DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec4 coord))\n" - " ()))\n" - "(function texture2DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec2 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function texture2DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float lod))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function texture3D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec3 coord))\n" - " ()))\n" - "(function texture3DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec4 coord))\n" - " ()))\n" - "(function texture3DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function texture3DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function textureCube\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler)\n" - " (declare (in) vec3 coord))\n" - " ()))\n" - "(function textureCubeLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function shadow1D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec3 coord))\n" - " ()))\n" - "(function shadow2D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec3 coord))\n" - " ()))\n" - "(function shadow1DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec4 coord))\n" - " ()))\n" - "(function shadow2DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec4 coord))\n" - " ()))\n" - "(function shadow1DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function shadow2DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function shadow1DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function shadow2DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function noise1\n" - " (signature float\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature float\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function noise2\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec2\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function noise3\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec3\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ()))\n" - "(function noise4\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) float x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec2 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec3 x))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) vec4 x))\n" - " ())))" -; -static const char *functions_for_120_vert [] = { - builtin_abs, - builtin_acos, - builtin_all, - builtin_any, - builtin_asin, - builtin_atan, - builtin_ceil, - builtin_clamp, - builtin_cos, - builtin_cross, - builtin_degrees, - builtin_distance, - builtin_dot, - builtin_equal, - builtin_exp, - builtin_exp2, - builtin_faceforward, - builtin_floor, - builtin_fract, - builtin_ftransform, - builtin_greaterThan, - builtin_greaterThanEqual, - builtin_inversesqrt, - builtin_length, - builtin_lessThan, - builtin_lessThanEqual, - builtin_log, - builtin_log2, - builtin_matrixCompMult, - builtin_max, - builtin_min, - builtin_mix, - builtin_mod, - builtin_noise1, - builtin_noise2, - builtin_noise3, - builtin_noise4, - builtin_normalize, - builtin_not, - builtin_notEqual, - builtin_outerProduct, - builtin_pow, - builtin_radians, - builtin_reflect, - builtin_refract, - builtin_shadow1D, - builtin_shadow1DLod, - builtin_shadow1DProj, - builtin_shadow1DProjLod, - builtin_shadow2D, - builtin_shadow2DLod, - builtin_shadow2DProj, - builtin_shadow2DProjLod, - builtin_sign, - builtin_sin, - builtin_smoothstep, - builtin_sqrt, - builtin_step, - builtin_tan, - builtin_texture1D, - builtin_texture1DLod, - builtin_texture1DProj, - builtin_texture1DProjLod, - builtin_texture2D, - builtin_texture2DLod, - builtin_texture2DProj, - builtin_texture2DProjLod, - builtin_texture3D, - builtin_texture3DLod, - builtin_texture3DProj, - builtin_texture3DProjLod, - builtin_textureCube, - builtin_textureCubeLod, - builtin_transpose, -}; -static const char prototypes_for_130_frag[] = -{'(', -'(','f','u','n','c','t','i','o','n',' ','r','a','d','i','a','n','s',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','e','g','r','e','e','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','e','g','r','e','e','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','e','g','r','e','e','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','d','e','g','r','e','e','s',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','d','e','g','r','e','e','s',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','r','a','d','i','a','n','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','r','a','d','i','a','n','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','r','a','d','i','a','n','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','r','a','d','i','a','n','s',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','i','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a','n','g','l','e',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','c','o','s',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a','n','g','l','e',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','a','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a','n','g','l','e',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','a','s','i','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a','n','g','l','e',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','a','c','o','s',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a','n','g','l','e',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','a','t','a','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y','_','o','v','e','r','_','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y','_','o','v','e','r','_','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y','_','o','v','e','r','_','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y','_','o','v','e','r','_','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','i','n','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','c','o','s','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','a','n','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','a','s','i','n','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','a','c','o','s','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','a','t','a','n','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','p','o','w',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','e','x','p',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','l','o','g',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','e','x','p','2',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','l','o','g','2',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','q','r','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','i','n','v','e','r','s','e','s','q','r','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','a','b','s',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','i','g','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','f','l','o','o','r',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','r','u','n','c',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','r','o','u','n','d',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','r','o','u','n','d','E','v','e','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','c','e','i','l',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','f','r','a','c','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','m','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','m','o','d','f',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','o','u','t',')',' ','f','l','o','a','t',' ','i',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','o','u','t',')',' ','v','e','c','2',' ','i',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','o','u','t',')',' ','v','e','c','3',' ','i',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','o','u','t',')',' ','v','e','c','4',' ','i',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','m','i','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','m','a','x',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','c','l','a','m','p',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','m','i','x',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','o','o','l',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','a',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','t','e','p',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','m','o','o','t','h','s','t','e','p',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','i','s','n','a','n',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','i','s','i','n','f',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','l','e','n','g','t','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','d','i','s','t','a','n','c','e',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','p','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','p','1',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','p','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','p','1',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','p','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','p','1',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','p','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','p','1',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','d','o','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','c','r','o','s','s',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','n','o','r','m','a','l','i','z','e',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','f','a','c','e','f','o','r','w','a','r','d',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','N','r','e','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','N','r','e','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','N','r','e','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','N','r','e','f',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','r','e','f','l','e','c','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','N',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','N',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','N',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','N',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','r','e','f','r','a','c','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','t','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','t','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','t','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','t','a',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','m','a','t','r','i','x','C','o','m','p','M','u','l','t',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','3',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','o','u','t','e','r','P','r','o','d','u','c','t',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','r',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','r','a','n','s','p','o','s','e',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','2',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','3',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','2',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','4',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','3',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','4',' ','m',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','l','e','s','s','T','h','a','n',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','l','e','s','s','T','h','a','n','E','q','u','a','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','g','r','e','a','t','e','r','T','h','a','n',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','g','r','e','a','t','e','r','T','h','a','n','E','q','u','a','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','e','q','u','a','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','n','o','t','E','q','u','a','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','a','n','y',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','a','l','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','n','o','t',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','S','i','z','e',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','e','l','F','e','t','c','h',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','e','l','F','e','t','c','h','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','L','o','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','L','o','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','G','r','a','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','G','r','a','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','G','r','a','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','G','r','a','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','o',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','2','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','2','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','2','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','2','D','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','3','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','3','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','3','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','3','D','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','C','u','b','e',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','C','u','b','e','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','1','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','2','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','1','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','2','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','b','i','a','s',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','1','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','2','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','1','D','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','2','D','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','d','F','d','x',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','p',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','p',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','p',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','p',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','d','F','d','y',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','p',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','p',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','p',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','p',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','f','w','i','d','t','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','p',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','p',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','p',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','p',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','n','o','i','s','e','1',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','n','o','i','s','e','2',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','n','o','i','s','e','3',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','n','o','i','s','e','4',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',')'} ; -static const char *functions_for_130_frag [] = { - builtin_abs, - builtin_acos, - builtin_acosh, - builtin_all, - builtin_any, - builtin_asin, - builtin_asinh, - builtin_atan, - builtin_atanh, - builtin_ceil, - builtin_clamp, - builtin_cos, - builtin_cosh, - builtin_cross, - builtin_dFdx, - builtin_dFdy, - builtin_degrees, - builtin_distance, - builtin_dot, - builtin_equal, - builtin_exp, - builtin_exp2, - builtin_faceforward, - builtin_floor, - builtin_fract, - builtin_fwidth, - builtin_greaterThan, - builtin_greaterThanEqual, - builtin_inversesqrt, - builtin_isinf, - builtin_isnan, - builtin_length, - builtin_lessThan, - builtin_lessThanEqual, - builtin_log, - builtin_log2, - builtin_matrixCompMult, - builtin_max, - builtin_min, - builtin_mix, - builtin_mod, - builtin_modf, - builtin_noise1, - builtin_noise2, - builtin_noise3, - builtin_noise4, - builtin_normalize, - builtin_not, - builtin_notEqual, - builtin_outerProduct, - builtin_pow, - builtin_radians, - builtin_reflect, - builtin_refract, - builtin_round, - builtin_roundEven, - builtin_shadow1D, - builtin_shadow1DLod, - builtin_shadow1DProj, - builtin_shadow1DProjLod, - builtin_shadow2D, - builtin_shadow2DLod, - builtin_shadow2DProj, - builtin_shadow2DProjLod, - builtin_sign, - builtin_sin, - builtin_sinh, - builtin_smoothstep, - builtin_sqrt, - builtin_step, - builtin_tan, - builtin_tanh, - builtin_texelFetch, - builtin_texelFetchOffset, - builtin_texture, - builtin_texture1D, - builtin_texture1DLod, - builtin_texture1DProj, - builtin_texture1DProjLod, - builtin_texture2D, - builtin_texture2DLod, - builtin_texture2DProj, - builtin_texture2DProjLod, - builtin_texture3D, - builtin_texture3DLod, - builtin_texture3DProj, - builtin_texture3DProjLod, - builtin_textureCube, - builtin_textureCubeLod, - builtin_textureGrad, - builtin_textureGradOffset, - builtin_textureLod, - builtin_textureLodOffset, - builtin_textureOffset, - builtin_textureProj, - builtin_textureProjGrad, - builtin_textureProjGradOffset, - builtin_textureProjLod, - builtin_textureProjLodOffset, - builtin_textureProjOffset, - builtin_textureSize, - builtin_transpose, - builtin_trunc, -}; -static const char prototypes_for_130_vert[] = -{'(', -'(','f','u','n','c','t','i','o','n',' ','r','a','d','i','a','n','s',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','e','g','r','e','e','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','e','g','r','e','e','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','e','g','r','e','e','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','d','e','g','r','e','e','s',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','d','e','g','r','e','e','s',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','r','a','d','i','a','n','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','r','a','d','i','a','n','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','r','a','d','i','a','n','s',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','r','a','d','i','a','n','s',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','i','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a','n','g','l','e',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','c','o','s',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a','n','g','l','e',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','a','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a','n','g','l','e',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','a','s','i','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a','n','g','l','e',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','a','c','o','s',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a','n','g','l','e',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a','n','g','l','e',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','a','t','a','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y','_','o','v','e','r','_','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y','_','o','v','e','r','_','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y','_','o','v','e','r','_','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y','_','o','v','e','r','_','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','i','n','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','c','o','s','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','a','n','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','a','s','i','n','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','a','c','o','s','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','a','t','a','n','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','p','o','w',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','e','x','p',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','l','o','g',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','e','x','p','2',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','l','o','g','2',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','q','r','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','i','n','v','e','r','s','e','s','q','r','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','a','b','s',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','i','g','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','f','l','o','o','r',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','r','u','n','c',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','r','o','u','n','d',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','r','o','u','n','d','E','v','e','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','c','e','i','l',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','f','r','a','c','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','m','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','m','o','d','f',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','o','u','t',')',' ','f','l','o','a','t',' ','i',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','o','u','t',')',' ','v','e','c','2',' ','i',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','o','u','t',')',' ','v','e','c','3',' ','i',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','o','u','t',')',' ','v','e','c','4',' ','i',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','m','i','n',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','m','a','x',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','c','l','a','m','p',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','i','n','V','a','l',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','i','n','t',' ','m','a','x','V','a','l',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','m','i','x',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','o','o','l',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','a',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','t','e','p',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','m','o','o','t','h','s','t','e','p',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','d','g','e','1',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','i','s','n','a','n',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','i','s','i','n','f',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','l','e','n','g','t','h',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','d','i','s','t','a','n','c','e',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','p','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','p','1',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','p','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','p','1',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','p','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','p','1',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','p','0',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','p','1',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','d','o','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','c','r','o','s','s',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','n','o','r','m','a','l','i','z','e',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','f','t','r','a','n','s','f','o','r','m',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','f','a','c','e','f','o','r','w','a','r','d',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','N','r','e','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','N','r','e','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','N','r','e','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','N','r','e','f',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','r','e','f','l','e','c','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','N',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','N',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','N',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','N',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','r','e','f','r','a','c','t',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','t','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','t','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','t','a',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','I',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','N',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','e','t','a',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','m','a','t','r','i','x','C','o','m','p','M','u','l','t',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','3',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','o','u','t','e','r','P','r','o','d','u','c','t',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','r',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','r',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','r','a','n','s','p','o','s','e',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','2',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','3',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','2','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','2',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','2','x','4',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','3','x','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','4','x','3',' ','m',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','m','a','t','4','x','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','m','a','t','3','x','4',' ','m',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','l','e','s','s','T','h','a','n',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','l','e','s','s','T','h','a','n','E','q','u','a','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','g','r','e','a','t','e','r','T','h','a','n',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','g','r','e','a','t','e','r','T','h','a','n','E','q','u','a','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','e','q','u','a','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','n','o','t','E','q','u','a','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','v','e','c','4',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','a','n','y',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','a','l','l',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','o','o','l',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','n','o','t',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','b','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','b','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','S','i','z','e',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','n','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','e','l','F','e','t','c','h',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','e','l','F','e','t','c','h','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','L','o','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','L','o','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','G','r','a','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','G','r','a','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f','s','e','t',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D','A','r','r','a','y',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','A','r','r','a','y','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','A','r','r','a','y','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','G','r','a','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','P','d','y',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','P','d','y',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','P','r','o','j','G','r','a','d','O','f','f','s','e','t',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','1','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','2','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','2',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','i','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','u','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','u','s','a','m','p','l','e','r','3','D',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','v','e','c','3',' ','o','f','f',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','i','n','t',' ','o',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','P',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','x',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','d','y',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','o',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','c','o','o','r','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','1','D','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','2','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','2','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','2','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','2','D','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','3','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','3','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','3','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','3','D','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','3','D',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','C','u','b','e',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','t','e','x','t','u','r','e','C','u','b','e','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','C','u','b','e',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','1','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','2','D',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','1','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','2','D','P','r','o','j',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','1','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','2','D','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','1','D','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','1','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','s','h','a','d','o','w','2','D','P','r','o','j','L','o','d',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','s','a','m','p','l','e','r','2','D','S','h','a','d','o','w',' ','s','a','m','p','l','e','r',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','c','o','o','r','d',')',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','l','o','d',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','n','o','i','s','e','1',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','f','l','o','a','t',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','n','o','i','s','e','2',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','2',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','n','o','i','s','e','3',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','3',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')', -'(','f','u','n','c','t','i','o','n',' ','n','o','i','s','e','4',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','f','l','o','a','t',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','2',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','3',' ','x',')',')',' ','(',')',')',' ','(','s','i','g','n','a','t','u','r','e',' ','v','e','c','4',' ','(','p','a','r','a','m','e','t','e','r','s',' ','(','d','e','c','l','a','r','e',' ','(','i','n',')',' ','v','e','c','4',' ','x',')',')',' ','(',')',')',')',')'} ; -static const char *functions_for_130_vert [] = { - builtin_abs, - builtin_acos, - builtin_acosh, - builtin_all, - builtin_any, - builtin_asin, - builtin_asinh, - builtin_atan, - builtin_atanh, - builtin_ceil, - builtin_clamp, - builtin_cos, - builtin_cosh, - builtin_cross, - builtin_degrees, - builtin_distance, - builtin_dot, - builtin_equal, - builtin_exp, - builtin_exp2, - builtin_faceforward, - builtin_floor, - builtin_fract, - builtin_ftransform, - builtin_greaterThan, - builtin_greaterThanEqual, - builtin_inversesqrt, - builtin_isinf, - builtin_isnan, - builtin_length, - builtin_lessThan, - builtin_lessThanEqual, - builtin_log, - builtin_log2, - builtin_matrixCompMult, - builtin_max, - builtin_min, - builtin_mix, - builtin_mod, - builtin_modf, - builtin_noise1, - builtin_noise2, - builtin_noise3, - builtin_noise4, - builtin_normalize, - builtin_not, - builtin_notEqual, - builtin_outerProduct, - builtin_pow, - builtin_radians, - builtin_reflect, - builtin_refract, - builtin_round, - builtin_roundEven, - builtin_shadow1D, - builtin_shadow1DLod, - builtin_shadow1DProj, - builtin_shadow1DProjLod, - builtin_shadow2D, - builtin_shadow2DLod, - builtin_shadow2DProj, - builtin_shadow2DProjLod, - builtin_sign, - builtin_sin, - builtin_sinh, - builtin_smoothstep, - builtin_sqrt, - builtin_step, - builtin_tan, - builtin_tanh, - builtin_texelFetch, - builtin_texelFetchOffset, - builtin_texture, - builtin_texture1D, - builtin_texture1DLod, - builtin_texture1DProj, - builtin_texture1DProjLod, - builtin_texture2D, - builtin_texture2DLod, - builtin_texture2DProj, - builtin_texture2DProjLod, - builtin_texture3D, - builtin_texture3DLod, - builtin_texture3DProj, - builtin_texture3DProjLod, - builtin_textureCube, - builtin_textureCubeLod, - builtin_textureGrad, - builtin_textureGradOffset, - builtin_textureLod, - builtin_textureLodOffset, - builtin_textureOffset, - builtin_textureProj, - builtin_textureProjGrad, - builtin_textureProjGradOffset, - builtin_textureProjLod, - builtin_textureProjLodOffset, - builtin_textureProjOffset, - builtin_textureSize, - builtin_transpose, - builtin_trunc, -}; -static const char prototypes_for_ARB_shader_texture_lod_frag[] = - "(\n" - "(function texture1DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) float coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function texture1DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec2 coord)\n" - " (declare (in) float lod))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function texture2DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec2 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function texture2DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float lod))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function texture3DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function texture3DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function textureCubeLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function shadow1DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function shadow2DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function shadow1DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function shadow2DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function texture1DGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) float P)\n" - " (declare (in) float dPdx)\n" - " (declare (in) float dPdy))\n" - " ()))\n" - "(function texture1DProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec2 P)\n" - " (declare (in) float dPdx)\n" - " (declare (in) float dPdy))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec4 P)\n" - " (declare (in) float dPdx)\n" - " (declare (in) float dPdy))\n" - " ()))\n" - "(function texture2DGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec2 P)\n" - " (declare (in) vec2 dPdx)\n" - " (declare (in) vec2 dPdy))\n" - " ()))\n" - "(function texture2DProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec3 P)\n" - " (declare (in) vec2 dPdx)\n" - " (declare (in) vec2 dPdy))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec4 P)\n" - " (declare (in) vec2 dPdx)\n" - " (declare (in) vec2 dPdy))\n" - " ()))\n" - "(function texture3DGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec3 P)\n" - " (declare (in) vec3 dPdx)\n" - " (declare (in) vec3 dPdy))\n" - " ()))\n" - "(function texture3DProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec4 P)\n" - " (declare (in) vec3 dPdx)\n" - " (declare (in) vec3 dPdy))\n" - " ()))\n" - "(function textureCubeGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler)\n" - " (declare (in) vec3 P)\n" - " (declare (in) vec3 dPdx)\n" - " (declare (in) vec3 dPdy))\n" - " ()))\n" - "(function shadow1DGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec3 P)\n" - " (declare (in) float dPdx)\n" - " (declare (in) float dPdy))\n" - " ()))\n" - "(function shadow1DProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec4 P)\n" - " (declare (in) float dPdx)\n" - " (declare (in) float dPdy))\n" - " ()))\n" - "(function shadow2DGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec3 P)\n" - " (declare (in) vec2 dPdx)\n" - " (declare (in) vec2 dPdy))\n" - " ()))\n" - "(function shadow2DProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec4 P)\n" - " (declare (in) vec2 dPdx)\n" - " (declare (in) vec2 dPdy))\n" - " ()))\n" - "(function texture2DRectGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRect sampler)\n" - " (declare (in) vec2 P)\n" - " (declare (in) vec2 dPdx)\n" - " (declare (in) vec2 dPdy))\n" - " ()))\n" - "(function texture2DRectProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRect sampler)\n" - " (declare (in) vec3 P)\n" - " (declare (in) vec2 dPdx)\n" - " (declare (in) vec2 dPdy))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRect sampler)\n" - " (declare (in) vec4 P)\n" - " (declare (in) vec2 dPdx)\n" - " (declare (in) vec2 dPdy))\n" - " ()))\n" - "(function shadow2DRectGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRectShadow sampler)\n" - " (declare (in) vec3 P)\n" - " (declare (in) vec2 dPdx)\n" - " (declare (in) vec2 dPdy))\n" - " ()))\n" - "(function shadow2DRectProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRectShadow sampler)\n" - " (declare (in) vec4 P)\n" - " (declare (in) vec2 dPdx)\n" - " (declare (in) vec2 dPdy))\n" - " ())))" -; -static const char *functions_for_ARB_shader_texture_lod_frag [] = { - builtin_shadow1DGradARB, - builtin_shadow1DLod, - builtin_shadow1DProjGradARB, - builtin_shadow1DProjLod, - builtin_shadow2DGradARB, - builtin_shadow2DLod, - builtin_shadow2DProjGradARB, - builtin_shadow2DProjLod, - builtin_shadow2DRectGradARB, - builtin_shadow2DRectProjGradARB, - builtin_texture1DGradARB, - builtin_texture1DLod, - builtin_texture1DProjGradARB, - builtin_texture1DProjLod, - builtin_texture2DGradARB, - builtin_texture2DLod, - builtin_texture2DProjGradARB, - builtin_texture2DProjLod, - builtin_texture2DRectGradARB, - builtin_texture2DRectProjGradARB, - builtin_texture3DGradARB, - builtin_texture3DLod, - builtin_texture3DProjGradARB, - builtin_texture3DProjLod, - builtin_textureCubeGradARB, - builtin_textureCubeLod, -}; -static const char prototypes_for_ARB_shader_texture_lod_vert[] = - "(\n" - "(function texture1DGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) float P)\n" - " (declare (in) float dPdx)\n" - " (declare (in) float dPdy))\n" - " ()))\n" - "(function texture1DProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec2 P)\n" - " (declare (in) float dPdx)\n" - " (declare (in) float dPdy))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1D sampler)\n" - " (declare (in) vec4 P)\n" - " (declare (in) float dPdx)\n" - " (declare (in) float dPdy))\n" - " ()))\n" - "(function texture2DGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec2 P)\n" - " (declare (in) vec2 dPdx)\n" - " (declare (in) vec2 dPdy))\n" - " ()))\n" - "(function texture2DProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec3 P)\n" - " (declare (in) vec2 dPdx)\n" - " (declare (in) vec2 dPdy))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2D sampler)\n" - " (declare (in) vec4 P)\n" - " (declare (in) vec2 dPdx)\n" - " (declare (in) vec2 dPdy))\n" - " ()))\n" - "(function texture3DGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec3 P)\n" - " (declare (in) vec3 dPdx)\n" - " (declare (in) vec3 dPdy))\n" - " ()))\n" - "(function texture3DProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec4 P)\n" - " (declare (in) vec3 dPdx)\n" - " (declare (in) vec3 dPdy))\n" - " ()))\n" - "(function textureCubeGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerCube sampler)\n" - " (declare (in) vec3 P)\n" - " (declare (in) vec3 dPdx)\n" - " (declare (in) vec3 dPdy))\n" - " ()))\n" - "(function shadow1DGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec3 P)\n" - " (declare (in) float dPdx)\n" - " (declare (in) float dPdy))\n" - " ()))\n" - "(function shadow1DProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DShadow sampler)\n" - " (declare (in) vec4 P)\n" - " (declare (in) float dPdx)\n" - " (declare (in) float dPdy))\n" - " ()))\n" - "(function shadow2DGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec3 P)\n" - " (declare (in) vec2 dPdx)\n" - " (declare (in) vec2 dPdy))\n" - " ()))\n" - "(function shadow2DProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DShadow sampler)\n" - " (declare (in) vec4 P)\n" - " (declare (in) vec2 dPdx)\n" - " (declare (in) vec2 dPdy))\n" - " ()))\n" - "(function texture2DRectGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRect sampler)\n" - " (declare (in) vec2 P)\n" - " (declare (in) vec2 dPdx)\n" - " (declare (in) vec2 dPdy))\n" - " ()))\n" - "(function texture2DRectProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRect sampler)\n" - " (declare (in) vec3 P)\n" - " (declare (in) vec2 dPdx)\n" - " (declare (in) vec2 dPdy))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRect sampler)\n" - " (declare (in) vec4 P)\n" - " (declare (in) vec2 dPdx)\n" - " (declare (in) vec2 dPdy))\n" - " ()))\n" - "(function shadow2DRectGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRectShadow sampler)\n" - " (declare (in) vec3 P)\n" - " (declare (in) vec2 dPdx)\n" - " (declare (in) vec2 dPdy))\n" - " ()))\n" - "(function shadow2DRectProjGradARB\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRectShadow sampler)\n" - " (declare (in) vec4 P)\n" - " (declare (in) vec2 dPdx)\n" - " (declare (in) vec2 dPdy))\n" - " ())))" -; -static const char *functions_for_ARB_shader_texture_lod_vert [] = { - builtin_shadow1DGradARB, - builtin_shadow1DProjGradARB, - builtin_shadow2DGradARB, - builtin_shadow2DProjGradARB, - builtin_shadow2DRectGradARB, - builtin_shadow2DRectProjGradARB, - builtin_texture1DGradARB, - builtin_texture1DProjGradARB, - builtin_texture2DGradARB, - builtin_texture2DProjGradARB, - builtin_texture2DRectGradARB, - builtin_texture2DRectProjGradARB, - builtin_texture3DGradARB, - builtin_texture3DProjGradARB, - builtin_textureCubeGradARB, -}; -static const char prototypes_for_ARB_texture_rectangle_frag[] = - "(\n" - "(function texture2DRect\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRect sampler)\n" - " (declare (in) vec2 coord))\n" - " ()))\n" - "(function texture2DRectProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRect sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRect sampler)\n" - " (declare (in) vec4 coord))\n" - " ()))\n" - "(function shadow2DRect\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRectShadow sampler)\n" - " (declare (in) vec3 coord))\n" - " ()))\n" - "(function shadow2DRectProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRectShadow sampler)\n" - " (declare (in) vec4 coord))\n" - " ())))" -; -static const char *functions_for_ARB_texture_rectangle_frag [] = { - builtin_shadow2DRect, - builtin_shadow2DRectProj, - builtin_texture2DRect, - builtin_texture2DRectProj, -}; -static const char prototypes_for_ARB_texture_rectangle_vert[] = - "(\n" - "(function texture2DRect\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRect sampler)\n" - " (declare (in) vec2 coord))\n" - " ()))\n" - "(function texture2DRectProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRect sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRect sampler)\n" - " (declare (in) vec4 coord))\n" - " ()))\n" - "(function shadow2DRect\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRectShadow sampler)\n" - " (declare (in) vec3 coord))\n" - " ()))\n" - "(function shadow2DRectProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DRectShadow sampler)\n" - " (declare (in) vec4 coord))\n" - " ())))" -; -static const char *functions_for_ARB_texture_rectangle_vert [] = { - builtin_shadow2DRect, - builtin_shadow2DRectProj, - builtin_texture2DRect, - builtin_texture2DRectProj, -}; -static const char prototypes_for_EXT_texture_array_frag[] = - "(\n" - "(function texture1DArray\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArray sampler)\n" - " (declare (in) vec2 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArray sampler)\n" - " (declare (in) vec2 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function texture2DArray\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DArray sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DArray sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function shadow1DArray\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArrayShadow sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArrayShadow sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function shadow2DArray\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DArrayShadow sampler)\n" - " (declare (in) vec4 coord))\n" - " ())))" -; -static const char *functions_for_EXT_texture_array_frag [] = { - builtin_shadow1DArray, - builtin_shadow2DArray, - builtin_texture1DArray, - builtin_texture2DArray, -}; -static const char prototypes_for_EXT_texture_array_vert[] = - "(\n" - "(function texture1DArray\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArray sampler)\n" - " (declare (in) vec2 coord))\n" - " ()))\n" - "(function texture1DArrayLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArray sampler)\n" - " (declare (in) vec2 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function texture2DArray\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DArray sampler)\n" - " (declare (in) vec3 coord))\n" - " ()))\n" - "(function texture2DArrayLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DArray sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function shadow1DArray\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArrayShadow sampler)\n" - " (declare (in) vec3 coord))\n" - " ()))\n" - "(function shadow1DArrayLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler1DArrayShadow sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function shadow2DArray\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler2DArrayShadow sampler)\n" - " (declare (in) vec4 coord))\n" - " ())))" -; -static const char *functions_for_EXT_texture_array_vert [] = { - builtin_shadow1DArray, - builtin_shadow1DArrayLod, - builtin_shadow2DArray, - builtin_texture1DArray, - builtin_texture1DArrayLod, - builtin_texture2DArray, - builtin_texture2DArrayLod, -}; -static const char prototypes_for_OES_EGL_image_external_frag[] = - "(\n" - "(function texture2D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerExternalOES sampler)\n" - " (declare (in) vec2 coord))\n" - " ()))\n" - "(function texture2DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerExternalOES sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerExternalOES sampler)\n" - " (declare (in) vec4 coord))\n" - " ())))" -; -static const char *functions_for_OES_EGL_image_external_frag [] = { - builtin_texture2D, - builtin_texture2DProj, -}; -static const char prototypes_for_OES_EGL_image_external_vert[] = - "(\n" - "(function texture2D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerExternalOES sampler)\n" - " (declare (in) vec2 coord))\n" - " ()))\n" - "(function texture2DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerExternalOES sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) samplerExternalOES sampler)\n" - " (declare (in) vec4 coord))\n" - " ())))" -; -static const char *functions_for_OES_EGL_image_external_vert [] = { - builtin_texture2D, - builtin_texture2DProj, -}; -static const char prototypes_for_OES_texture_3D_frag[] = - "(\n" - "(function texture3D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec3 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float bias))\n" - " ()))\n" - "(function texture3DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec4 coord))\n" - " ())\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float bias))\n" - " ())))" -; -static const char *functions_for_OES_texture_3D_frag [] = { - builtin_texture3D, - builtin_texture3DProj, -}; -static const char prototypes_for_OES_texture_3D_vert[] = - "(\n" - "(function texture3D\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec3 coord))\n" - " ()))\n" - "(function texture3DProj\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec4 coord))\n" - " ()))\n" - "(function texture3DLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec3 coord)\n" - " (declare (in) float lod))\n" - " ()))\n" - "(function texture3DProjLod\n" - " (signature vec4\n" - " (parameters\n" - " (declare (in) sampler3D sampler)\n" - " (declare (in) vec4 coord)\n" - " (declare (in) float lod))\n" - " ())))" -; -static const char *functions_for_OES_texture_3D_vert [] = { - builtin_texture3D, - builtin_texture3DLod, - builtin_texture3DProj, - builtin_texture3DProjLod, -}; -static gl_shader *builtin_profiles[18]; - -void *builtin_mem_ctx = NULL; - -void -_mesa_glsl_release_functions(void) -{ - ralloc_free(builtin_mem_ctx); - builtin_mem_ctx = NULL; - memset(builtin_profiles, 0, sizeof(builtin_profiles)); -} - -static void -_mesa_read_profile(struct _mesa_glsl_parse_state *state, - int profile_index, - const char *prototypes, - const char **functions, - int count) -{ - gl_shader *sh = builtin_profiles[profile_index]; - - if (sh == NULL) { - sh = read_builtins(GL_VERTEX_SHADER, prototypes, functions, count); - ralloc_steal(builtin_mem_ctx, sh); - builtin_profiles[profile_index] = sh; - } - - state->builtins_to_link[state->num_builtins_to_link] = sh; - state->num_builtins_to_link++; -} - -void -_mesa_glsl_initialize_functions(struct _mesa_glsl_parse_state *state) -{ - /* If we've already initialized the built-ins, bail early. */ - if (state->num_builtins_to_link > 0) - return; - - if (builtin_mem_ctx == NULL) { - builtin_mem_ctx = ralloc_context(NULL); // "GLSL built-in functions" - memset(&builtin_profiles, 0, sizeof(builtin_profiles)); - } - - if (state->target == fragment_shader && state->language_version == 100) { - _mesa_read_profile(state, 0, - prototypes_for_100_frag, - functions_for_100_frag, - Elements(functions_for_100_frag)); - } - - if (state->target == vertex_shader && state->language_version == 100) { - _mesa_read_profile(state, 1, - prototypes_for_100_vert, - functions_for_100_vert, - Elements(functions_for_100_vert)); - } - - if (state->target == fragment_shader && state->language_version == 110) { - _mesa_read_profile(state, 2, - prototypes_for_110_frag, - functions_for_110_frag, - Elements(functions_for_110_frag)); - } - - if (state->target == vertex_shader && state->language_version == 110) { - _mesa_read_profile(state, 3, - prototypes_for_110_vert, - functions_for_110_vert, - Elements(functions_for_110_vert)); - } - - if (state->target == fragment_shader && state->language_version == 120) { - _mesa_read_profile(state, 4, - prototypes_for_120_frag, - functions_for_120_frag, - Elements(functions_for_120_frag)); - } - - if (state->target == vertex_shader && state->language_version == 120) { - _mesa_read_profile(state, 5, - prototypes_for_120_vert, - functions_for_120_vert, - Elements(functions_for_120_vert)); - } - - if (state->target == fragment_shader && state->language_version == 130) { - _mesa_read_profile(state, 6, - prototypes_for_130_frag, - functions_for_130_frag, - Elements(functions_for_130_frag)); - } - - if (state->target == vertex_shader && state->language_version == 130) { - _mesa_read_profile(state, 7, - prototypes_for_130_vert, - functions_for_130_vert, - Elements(functions_for_130_vert)); - } - - if (state->target == fragment_shader && state->ARB_shader_texture_lod_enable) { - _mesa_read_profile(state, 8, - prototypes_for_ARB_shader_texture_lod_frag, - functions_for_ARB_shader_texture_lod_frag, - Elements(functions_for_ARB_shader_texture_lod_frag)); - } - - if (state->target == vertex_shader && state->ARB_shader_texture_lod_enable) { - _mesa_read_profile(state, 9, - prototypes_for_ARB_shader_texture_lod_vert, - functions_for_ARB_shader_texture_lod_vert, - Elements(functions_for_ARB_shader_texture_lod_vert)); - } - - if (state->target == fragment_shader && state->ARB_texture_rectangle_enable) { - _mesa_read_profile(state, 10, - prototypes_for_ARB_texture_rectangle_frag, - functions_for_ARB_texture_rectangle_frag, - Elements(functions_for_ARB_texture_rectangle_frag)); - } - - if (state->target == vertex_shader && state->ARB_texture_rectangle_enable) { - _mesa_read_profile(state, 11, - prototypes_for_ARB_texture_rectangle_vert, - functions_for_ARB_texture_rectangle_vert, - Elements(functions_for_ARB_texture_rectangle_vert)); - } - - if (state->target == fragment_shader && state->EXT_texture_array_enable) { - _mesa_read_profile(state, 12, - prototypes_for_EXT_texture_array_frag, - functions_for_EXT_texture_array_frag, - Elements(functions_for_EXT_texture_array_frag)); - } - - if (state->target == vertex_shader && state->EXT_texture_array_enable) { - _mesa_read_profile(state, 13, - prototypes_for_EXT_texture_array_vert, - functions_for_EXT_texture_array_vert, - Elements(functions_for_EXT_texture_array_vert)); - } - - if (state->target == fragment_shader && state->OES_EGL_image_external_enable) { - _mesa_read_profile(state, 14, - prototypes_for_OES_EGL_image_external_frag, - functions_for_OES_EGL_image_external_frag, - Elements(functions_for_OES_EGL_image_external_frag)); - } - - if (state->target == vertex_shader && state->OES_EGL_image_external_enable) { - _mesa_read_profile(state, 15, - prototypes_for_OES_EGL_image_external_vert, - functions_for_OES_EGL_image_external_vert, - Elements(functions_for_OES_EGL_image_external_vert)); - } - - if (state->target == fragment_shader && state->OES_texture_3D_enable) { - _mesa_read_profile(state, 16, - prototypes_for_OES_texture_3D_frag, - functions_for_OES_texture_3D_frag, - Elements(functions_for_OES_texture_3D_frag)); - } - - if (state->target == vertex_shader && state->OES_texture_3D_enable) { - _mesa_read_profile(state, 17, - prototypes_for_OES_texture_3D_vert, - functions_for_OES_texture_3D_vert, - Elements(functions_for_OES_texture_3D_vert)); - } - -} \ No newline at end of file diff --git a/dll/opengl/mesa/generated/glsl/glcpp/glcpp-lex.c b/dll/opengl/mesa/generated/glsl/glcpp/glcpp-lex.c deleted file mode 100644 index 064a19b5fbc..00000000000 --- a/dll/opengl/mesa/generated/glsl/glcpp/glcpp-lex.c +++ /dev/null @@ -1,2628 +0,0 @@ - -#line 3 "" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yyg->yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yyg->yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE glcpp_restart(yyin ,yyscanner ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#define YY_BUF_SIZE 16384 -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via glcpp_restart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] - -void glcpp_restart (FILE *input_file ,yyscan_t yyscanner ); -void glcpp__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE glcpp__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void glcpp__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void glcpp__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void glcpp_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void glcpp_pop_buffer_state (yyscan_t yyscanner ); - -static void glcpp_ensure_buffer_stack (yyscan_t yyscanner ); -static void glcpp__load_buffer_state (yyscan_t yyscanner ); -static void glcpp__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); - -#define YY_FLUSH_BUFFER glcpp__flush_buffer(YY_CURRENT_BUFFER ,yyscanner) - -YY_BUFFER_STATE glcpp__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE glcpp__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE glcpp__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); - -void *glcpp_alloc (yy_size_t ,yyscan_t yyscanner ); -void *glcpp_realloc (void *,yy_size_t ,yyscan_t yyscanner ); -void glcpp_free (void * ,yyscan_t yyscanner ); - -#define yy_new_buffer glcpp__create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - glcpp_ensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - glcpp__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - glcpp_ensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - glcpp__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define glcpp_wrap(n) 1 -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -typedef int yy_state_type; - -#define yytext_ptr yytext_r - -static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); -static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 43 -#define YY_END_OF_BUFFER 44 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_acclist[107] = - { 0, - 3, 3, 44, 39, 43, 40, 43, 41, 43, 43, - 38, 43, 43, 38, 43, 38, 43, 38, 43, 25, - 43, 24, 43, 38, 43, 38, 43, 38, 43, 37, - 43, 37, 43, 38, 43, 40, 43, 23, 43, 3, - 43, 4, 43, 5, 43, 42, 43, 18, 43, 18, - 43, 18, 43, 39, 40, 32, 35, 33, 2, 1, - 25, 25, 24, 24, 27, 29, 31, 30, 28, 37, - 37, 34, 40, 23, 23, 3, 4, 5, 6, 5, - 7, 1, 26, 37, 26, 37, 14, 37, 15, 16, - 37, 17, 19, 12, 22, 36, 37, 21, 19, 13, - - 16404, 11, 9, 8, 8212, 10 - } ; - -static yyconst flex_int16_t yy_accept[155] = - { 0, - 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, - 3, 4, 6, 8, 10, 11, 13, 14, 16, 18, - 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, - 40, 42, 44, 46, 48, 50, 52, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 76, 76, 76, 76, 76, 76, 76, 77, 78, - 79, 80, 81, 82, 82, 82, 82, 82, 83, 84, - 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, - 85, 86, 87, 87, 87, 87, 87, 87, 87, 88, - - 88, 88, 88, 88, 88, 88, 89, 89, 90, 91, - 91, 91, 91, 91, 91, 91, 91, 91, 91, 92, - 92, 93, 94, 94, 95, 95, 95, 95, 96, 96, - 98, 99, 100, 100, 101, 101, 101, 101, 102, 102, - 102, 103, 103, 104, 105, 105, 105, 105, 106, 106, - 106, 107, 107, 107 - } ; - -static yyconst flex_int32_t yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 5, 1, 6, 1, 7, 8, 1, 9, - 7, 10, 7, 7, 7, 7, 11, 12, 13, 13, - 13, 13, 13, 13, 13, 14, 14, 1, 7, 15, - 16, 17, 1, 1, 18, 18, 18, 18, 18, 18, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 20, 19, 19, 21, 19, 19, - 7, 1, 7, 7, 19, 1, 22, 18, 18, 23, - - 24, 25, 26, 19, 27, 19, 19, 28, 29, 30, - 31, 32, 19, 33, 34, 35, 36, 37, 19, 38, - 19, 19, 7, 39, 7, 7, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst flex_int32_t yy_meta[40] = - { 0, - 1, 2, 3, 1, 1, 1, 1, 1, 4, 5, - 1, 6, 6, 6, 1, 1, 1, 7, 8, 8, - 8, 7, 9, 7, 7, 8, 8, 8, 8, 10, - 8, 8, 8, 8, 8, 8, 8, 8, 1 - } ; - -static yyconst flex_int16_t yy_base[168] = - { 0, - 0, 38, 0, 0, 38, 39, 333, 332, 331, 44, - 333, 331, 329, 337, 337, 314, 323, 337, 320, 41, - 41, 44, 44, 311, 49, 0, 302, 286, 61, 79, - 321, 337, 65, 337, 337, 67, 68, 322, 320, 337, - 337, 337, 337, 0, 74, 337, 0, 76, 337, 337, - 337, 337, 337, 337, 0, 296, 337, 72, 314, 313, - 294, 71, 292, 289, 282, 284, 289, 309, 337, 110, - 337, 114, 337, 91, 81, 112, 15, 0, 35, 284, - 285, 57, 286, 275, 272, 96, 276, 283, 281, 270, - 337, 272, 274, 275, 275, 271, 266, 272, 337, 271, - - 271, 264, 256, 257, 246, 255, 240, 337, 337, 235, - 222, 224, 228, 222, 234, 189, 140, 137, 140, 138, - 337, 0, 127, 337, 135, 116, 137, 337, 127, 0, - 140, 0, 108, 337, 120, 0, 101, 125, 69, 135, - 337, 138, 0, 337, 89, 52, 141, 337, 63, 143, - 337, 154, 337, 168, 178, 188, 198, 203, 213, 223, - 233, 238, 247, 257, 267, 276, 283 - } ; - -static yyconst flex_int16_t yy_def[168] = - { 0, - 153, 1, 154, 154, 155, 155, 156, 156, 157, 157, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 158, 158, 153, 153, 153, - 159, 153, 160, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 161, 153, 153, 162, 153, 153, 153, - 153, 153, 153, 153, 158, 158, 153, 153, 30, 30, - 153, 153, 153, 153, 153, 153, 153, 159, 153, 160, - 153, 160, 153, 153, 153, 153, 153, 161, 162, 158, - 153, 153, 153, 153, 153, 163, 153, 153, 153, 153, - 153, 158, 153, 153, 153, 153, 153, 153, 153, 153, - - 153, 153, 153, 153, 153, 158, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 158, 153, - 153, 164, 153, 153, 153, 153, 153, 153, 153, 158, - 153, 164, 153, 153, 153, 165, 153, 166, 153, 153, - 153, 153, 165, 153, 167, 153, 153, 153, 167, 153, - 153, 153, 0, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153 - } ; - -static yyconst flex_int16_t yy_nxt[377] = - { 0, - 12, 13, 14, 15, 16, 17, 18, 19, 18, 18, - 20, 21, 22, 22, 23, 24, 25, 26, 26, 26, - 26, 26, 27, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, 28, 29, - 32, 32, 82, 30, 83, 36, 14, 33, 33, 37, - 43, 44, 45, 45, 91, 48, 48, 48, 50, 51, - 46, 47, 58, 49, 53, 54, 59, 71, 74, 76, - 91, 148, 75, 58, 72, 73, 46, 59, 47, 49, - 60, 136, 76, 94, 41, 45, 45, 48, 48, 48, - 95, 77, 74, 46, 63, 49, 75, 148, 82, 146, - - 83, 61, 62, 84, 77, 63, 64, 63, 85, 46, - 65, 49, 71, 76, 66, 67, 71, 126, 100, 153, - 153, 140, 141, 72, 73, 101, 138, 135, 135, 135, - 144, 142, 142, 142, 139, 77, 140, 141, 63, 140, - 141, 138, 150, 151, 150, 151, 147, 147, 147, 142, - 142, 142, 152, 152, 152, 150, 151, 137, 136, 134, - 133, 131, 130, 129, 128, 152, 152, 152, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 35, 35, - - 35, 35, 35, 35, 35, 35, 35, 35, 55, 55, - 55, 55, 55, 68, 68, 68, 68, 127, 68, 68, - 68, 68, 68, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 78, 78, 126, 78, 78, 78, 78, - 78, 78, 78, 79, 79, 125, 79, 99, 99, 99, - 99, 99, 124, 123, 122, 99, 99, 132, 132, 121, - 132, 132, 132, 132, 132, 132, 132, 143, 143, 120, - 143, 143, 143, 143, 143, 143, 143, 145, 119, 118, - 117, 116, 145, 145, 145, 145, 149, 115, 149, 149, - 149, 149, 149, 114, 113, 112, 111, 110, 109, 108, - - 107, 106, 105, 104, 103, 102, 98, 97, 96, 93, - 92, 69, 90, 89, 88, 87, 86, 81, 153, 153, - 80, 39, 38, 69, 57, 56, 52, 42, 41, 40, - 39, 38, 153, 14, 15, 15, 11, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153 - } ; - -static yyconst flex_int16_t yy_chk[377] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 5, 6, 77, 2, 77, 10, 10, 5, 6, 10, - 20, 20, 21, 21, 79, 22, 22, 22, 23, 23, - 21, 21, 29, 22, 25, 25, 29, 33, 36, 37, - 79, 149, 36, 58, 33, 33, 21, 58, 21, 22, - 30, 146, 75, 82, 30, 45, 45, 48, 48, 48, - 82, 37, 74, 45, 37, 48, 74, 145, 62, 139, - - 62, 30, 30, 62, 75, 30, 30, 75, 62, 45, - 30, 48, 70, 76, 30, 30, 72, 126, 86, 70, - 70, 135, 135, 72, 72, 86, 138, 126, 126, 126, - 137, 135, 135, 135, 133, 76, 140, 140, 76, 142, - 142, 131, 147, 147, 150, 150, 140, 140, 140, 142, - 142, 142, 147, 147, 147, 152, 152, 129, 127, 125, - 123, 120, 119, 118, 117, 152, 152, 152, 154, 154, - 154, 154, 154, 154, 154, 154, 154, 154, 155, 155, - 155, 155, 155, 155, 155, 155, 155, 155, 156, 156, - 156, 156, 156, 156, 156, 156, 156, 156, 157, 157, - - 157, 157, 157, 157, 157, 157, 157, 157, 158, 158, - 158, 158, 158, 159, 159, 159, 159, 116, 159, 159, - 159, 159, 159, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 161, 161, 115, 161, 161, 161, 161, - 161, 161, 161, 162, 162, 114, 162, 163, 163, 163, - 163, 163, 113, 112, 111, 163, 163, 164, 164, 110, - 164, 164, 164, 164, 164, 164, 164, 165, 165, 107, - 165, 165, 165, 165, 165, 165, 165, 166, 106, 105, - 104, 103, 166, 166, 166, 166, 167, 102, 167, 167, - 167, 167, 167, 101, 100, 98, 97, 96, 95, 94, - - 93, 92, 90, 89, 88, 87, 85, 84, 83, 81, - 80, 68, 67, 66, 65, 64, 63, 61, 60, 59, - 56, 39, 38, 31, 28, 27, 24, 19, 17, 16, - 13, 12, 11, 9, 8, 7, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153 - } ; - -#define YY_TRAILING_MASK 0x2000 -#define YY_TRAILING_HEAD_MASK 0x4000 -#define REJECT \ -{ \ -*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ \ -yy_cp = yyg->yy_full_match; /* restore poss. backed-over text */ \ -yyg->yy_lp = yyg->yy_full_lp; /* restore orig. accepting pos. */ \ -yyg->yy_state_ptr = yyg->yy_full_state; /* restore orig. state */ \ -yy_current_state = *yyg->yy_state_ptr; /* restore curr. state */ \ -++yyg->yy_lp; \ -goto find_rule; \ -} - -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -#line 1 "src/glsl/glcpp/glcpp-lex.l" -#line 2 "src/glsl/glcpp/glcpp-lex.l" -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include -#include -#include - -#include "glcpp.h" -#include "glcpp-parse.h" - -/* Flex annoyingly generates some functions without making them - * static. Let's declare them here. */ -int glcpp_get_column (yyscan_t yyscanner); -void glcpp_set_column (int column_no , yyscan_t yyscanner); - -#ifdef _MSC_VER -#define YY_NO_UNISTD_H -#endif - -#define YY_NO_INPUT - -#define YY_USER_ACTION \ - do { \ - yylloc->first_column = yycolumn + 1; \ - yylloc->first_line = yylineno; \ - yycolumn += yyleng; \ - } while(0); - -#define YY_USER_INIT \ - do { \ - yylineno = 1; \ - yycolumn = 1; \ - yylloc->source = 0; \ - } while(0) - -/* The OTHER class is simply a catch-all for things that the CPP -parser just doesn't care about. Since flex regular expressions that -match longer strings take priority over those matching shorter -strings, we have to be careful to avoid OTHER matching and hiding -something that CPP does care about. So we simply exclude all -characters that appear in any other expressions. */ -#line 651 "" - -#define INITIAL 0 -#define DONE 1 -#define COMMENT 2 -#define UNREACHABLE 3 -#define SKIP 4 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#define YY_EXTRA_TYPE glcpp_parser_t * - -/* Holds the entire state of the reentrant scanner. */ -struct yyguts_t - { - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - int yy_n_chars; - int yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; - - int yylineno_r; - int yy_flex_debug_r; - - yy_state_type *yy_state_buf; - yy_state_type *yy_state_ptr; - char *yy_full_match; - int yy_lp; - - /* These are only needed for trailing context rules, - * but there's no conditional variable for that yet. */ - int yy_looking_for_trail_begin; - int yy_full_lp; - int *yy_full_state; - - char *yytext_r; - int yy_more_flag; - int yy_more_len; - - YYSTYPE * yylval_r; - - YYLTYPE * yylloc_r; - - }; /* end struct yyguts_t */ - -static int yy_init_globals (yyscan_t yyscanner ); - - /* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ - # define yylval yyg->yylval_r - - # define yylloc yyg->yylloc_r - -int glcpp_lex_init (yyscan_t* scanner); - -int glcpp_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int glcpp_lex_destroy (yyscan_t yyscanner ); - -int glcpp_get_debug (yyscan_t yyscanner ); - -void glcpp_set_debug (int debug_flag ,yyscan_t yyscanner ); - -YY_EXTRA_TYPE glcpp_get_extra (yyscan_t yyscanner ); - -void glcpp_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); - -FILE *glcpp_get_in (yyscan_t yyscanner ); - -void glcpp_set_in (FILE * in_str ,yyscan_t yyscanner ); - -FILE *glcpp_get_out (yyscan_t yyscanner ); - -void glcpp_set_out (FILE * out_str ,yyscan_t yyscanner ); - -int glcpp_get_leng (yyscan_t yyscanner ); - -char *glcpp_get_text (yyscan_t yyscanner ); - -int glcpp_get_lineno (yyscan_t yyscanner ); - -void glcpp_set_lineno (int line_number ,yyscan_t yyscanner ); - -int glcpp_get_column (yyscan_t yyscanner ); - -void glcpp_set_column (int column_no ,yyscan_t yyscanner ); - -YYSTYPE * glcpp_get_lval (yyscan_t yyscanner ); - -void glcpp_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); - - YYLTYPE *glcpp_get_lloc (yyscan_t yyscanner ); - - void glcpp_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int glcpp_wrap (yyscan_t yyscanner ); -#else -extern int glcpp_wrap (yyscan_t yyscanner ); -#endif -#endif - - static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (yyscan_t yyscanner ); -#else -static int input (yyscan_t yyscanner ); -#endif - -#endif - - static void yy_push_state (int new_state ,yyscan_t yyscanner); - - static void yy_pop_state (yyscan_t yyscanner ); - - static int yy_top_state (yyscan_t yyscanner ); - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - unsigned n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int glcpp_lex \ - (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); - -#define YY_DECL int glcpp_lex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - if ( yyleng > 0 ) \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ - (yytext[yyleng - 1] == '\n'); \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - -#line 88 "src/glsl/glcpp/glcpp-lex.l" - - /* Implicitly switch between SKIP and INITIAL (non-skipping); - * don't switch if some other state was explicitly set. - */ - glcpp_parser_t *parser = yyextra; - if (YY_START == 0 || YY_START == SKIP) { - if (parser->lexing_if || parser->skip_stack == NULL || parser->skip_stack->type == SKIP_NO_SKIP) { - BEGIN 0; - } else { - BEGIN SKIP; - } - } - - /* Single-line comments */ -#line 933 "" - - yylval = yylval_param; - - yylloc = yylloc_param; - - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - /* Create the reject buffer large enough to save one state per allowed character. */ - if ( ! yyg->yy_state_buf ) - yyg->yy_state_buf = (yy_state_type *)glcpp_alloc(YY_STATE_BUF_SIZE ,yyscanner); - if ( ! yyg->yy_state_buf ) - YY_FATAL_ERROR( "out of dynamic memory in glcpp_lex()" ); - - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - glcpp_ensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - glcpp__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - glcpp__load_buffer_state(yyscanner ); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; - yy_current_state += YY_AT_BOL(); - - yyg->yy_state_ptr = yyg->yy_state_buf; - *yyg->yy_state_ptr++ = yy_current_state; - -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 154 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - *yyg->yy_state_ptr++ = yy_current_state; - ++yy_cp; - } - while ( yy_current_state != 153 ); - -yy_find_action: - yy_current_state = *--yyg->yy_state_ptr; - yyg->yy_lp = yy_accept[yy_current_state]; -find_rule: /* we branch to this label when backing up */ - for ( ; ; ) /* until we find what rule we matched */ - { - if ( yyg->yy_lp && yyg->yy_lp < yy_accept[yy_current_state + 1] ) - { - yy_act = yy_acclist[yyg->yy_lp]; - if ( yy_act & YY_TRAILING_HEAD_MASK || - yyg->yy_looking_for_trail_begin ) - { - if ( yy_act == yyg->yy_looking_for_trail_begin ) - { - yyg->yy_looking_for_trail_begin = 0; - yy_act &= ~YY_TRAILING_HEAD_MASK; - break; - } - } - else if ( yy_act & YY_TRAILING_MASK ) - { - yyg->yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK; - yyg->yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK; - } - else - { - yyg->yy_full_match = yy_cp; - yyg->yy_full_state = yyg->yy_state_ptr; - yyg->yy_full_lp = yyg->yy_lp; - break; - } - ++yyg->yy_lp; - goto find_rule; - } - --yy_cp; - yy_current_state = *--yyg->yy_state_ptr; - yyg->yy_lp = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ -case 1: -YY_RULE_SETUP -#line 102 "src/glsl/glcpp/glcpp-lex.l" -{ -} - YY_BREAK -/* Multi-line comments */ -case 2: -YY_RULE_SETUP -#line 106 "src/glsl/glcpp/glcpp-lex.l" -{ yy_push_state(COMMENT, yyscanner); } - YY_BREAK -case 3: -YY_RULE_SETUP -#line 107 "src/glsl/glcpp/glcpp-lex.l" - - YY_BREAK -case 4: -/* rule 4 can match eol */ -YY_RULE_SETUP -#line 108 "src/glsl/glcpp/glcpp-lex.l" -{ yylineno++; yycolumn = 0; return NEWLINE; } - YY_BREAK -case 5: -YY_RULE_SETUP -#line 109 "src/glsl/glcpp/glcpp-lex.l" - - YY_BREAK -case 6: -/* rule 6 can match eol */ -YY_RULE_SETUP -#line 110 "src/glsl/glcpp/glcpp-lex.l" -{ yylineno++; yycolumn = 0; return NEWLINE; } - YY_BREAK -case 7: -YY_RULE_SETUP -#line 111 "src/glsl/glcpp/glcpp-lex.l" -{ - yy_pop_state(yyscanner); - if (yyextra->space_tokens) - return SPACE; -} - YY_BREAK -case 8: -YY_RULE_SETUP -#line 117 "src/glsl/glcpp/glcpp-lex.l" -{ - yylval->str = ralloc_strdup (yyextra, yytext); - yyextra->space_tokens = 0; - return HASH_VERSION; -} - YY_BREAK -/* glcpp doesn't handle #extension, #version, or #pragma directives. - * Simply pass them through to the main compiler's lexer/parser. */ -case 9: -YY_RULE_SETUP -#line 125 "src/glsl/glcpp/glcpp-lex.l" -{ - yylval->str = ralloc_strdup (yyextra, yytext); - yylineno++; - yycolumn = 0; - return OTHER; -} - YY_BREAK -case 10: -*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ -yyg->yy_c_buf_p = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 132 "src/glsl/glcpp/glcpp-lex.l" -{ - /* Eat characters until the first digit is - * encountered - */ - char *ptr = yytext; - while (!isdigit(*ptr)) - ptr++; - - /* Subtract one from the line number because - * yylineno is zero-based instead of - * one-based. - */ - yylineno = strtol(ptr, &ptr, 0) - 1; - yylloc->source = strtol(ptr, NULL, 0); -} - YY_BREAK -case 11: -*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ -yyg->yy_c_buf_p = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 148 "src/glsl/glcpp/glcpp-lex.l" -{ - /* Eat characters until the first digit is - * encountered - */ - char *ptr = yytext; - while (!isdigit(*ptr)) - ptr++; - - /* Subtract one from the line number because - * yylineno is zero-based instead of - * one-based. - */ - yylineno = strtol(ptr, &ptr, 0) - 1; -} - YY_BREAK - -case 12: -YY_RULE_SETUP -#line 164 "src/glsl/glcpp/glcpp-lex.l" -{ - yyextra->lexing_if = 1; - yyextra->space_tokens = 0; - return HASH_IFDEF; -} - YY_BREAK -case 13: -YY_RULE_SETUP -#line 170 "src/glsl/glcpp/glcpp-lex.l" -{ - yyextra->lexing_if = 1; - yyextra->space_tokens = 0; - return HASH_IFNDEF; -} - YY_BREAK -case 14: -/* rule 14 can match eol */ -*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ -yyg->yy_c_buf_p = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 176 "src/glsl/glcpp/glcpp-lex.l" -{ - yyextra->lexing_if = 1; - yyextra->space_tokens = 0; - return HASH_IF; -} - YY_BREAK -case 15: -YY_RULE_SETUP -#line 182 "src/glsl/glcpp/glcpp-lex.l" -{ - yyextra->lexing_if = 1; - yyextra->space_tokens = 0; - return HASH_ELIF; -} - YY_BREAK -case 16: -YY_RULE_SETUP -#line 188 "src/glsl/glcpp/glcpp-lex.l" -{ - yyextra->space_tokens = 0; - return HASH_ELSE; -} - YY_BREAK -case 17: -YY_RULE_SETUP -#line 193 "src/glsl/glcpp/glcpp-lex.l" -{ - yyextra->space_tokens = 0; - return HASH_ENDIF; -} - YY_BREAK - -case 18: -YY_RULE_SETUP -#line 199 "src/glsl/glcpp/glcpp-lex.l" -; - YY_BREAK -case 19: -YY_RULE_SETUP -#line 201 "src/glsl/glcpp/glcpp-lex.l" -{ - char *p; - for (p = yytext; !isalpha(p[0]); p++); /* skip " # " */ - p += 5; /* skip "error" */ - glcpp_error(yylloc, yyextra, "#error%s", p); -} - YY_BREAK -case 20: -YY_RULE_SETUP -#line 208 "src/glsl/glcpp/glcpp-lex.l" -{ - yyextra->space_tokens = 0; - return HASH_DEFINE_FUNC; -} - YY_BREAK -case 21: -YY_RULE_SETUP -#line 213 "src/glsl/glcpp/glcpp-lex.l" -{ - yyextra->space_tokens = 0; - return HASH_DEFINE_OBJ; -} - YY_BREAK -case 22: -YY_RULE_SETUP -#line 218 "src/glsl/glcpp/glcpp-lex.l" -{ - yyextra->space_tokens = 0; - return HASH_UNDEF; -} - YY_BREAK -case 23: -YY_RULE_SETUP -#line 223 "src/glsl/glcpp/glcpp-lex.l" -{ - yyextra->space_tokens = 0; - return HASH; -} - YY_BREAK -case 24: -YY_RULE_SETUP -#line 228 "src/glsl/glcpp/glcpp-lex.l" -{ - yylval->str = ralloc_strdup (yyextra, yytext); - return INTEGER_STRING; -} - YY_BREAK -case 25: -YY_RULE_SETUP -#line 233 "src/glsl/glcpp/glcpp-lex.l" -{ - yylval->str = ralloc_strdup (yyextra, yytext); - return INTEGER_STRING; -} - YY_BREAK -case 26: -YY_RULE_SETUP -#line 238 "src/glsl/glcpp/glcpp-lex.l" -{ - yylval->str = ralloc_strdup (yyextra, yytext); - return INTEGER_STRING; -} - YY_BREAK -case 27: -YY_RULE_SETUP -#line 243 "src/glsl/glcpp/glcpp-lex.l" -{ - return LEFT_SHIFT; -} - YY_BREAK -case 28: -YY_RULE_SETUP -#line 247 "src/glsl/glcpp/glcpp-lex.l" -{ - return RIGHT_SHIFT; -} - YY_BREAK -case 29: -YY_RULE_SETUP -#line 251 "src/glsl/glcpp/glcpp-lex.l" -{ - return LESS_OR_EQUAL; -} - YY_BREAK -case 30: -YY_RULE_SETUP -#line 255 "src/glsl/glcpp/glcpp-lex.l" -{ - return GREATER_OR_EQUAL; -} - YY_BREAK -case 31: -YY_RULE_SETUP -#line 259 "src/glsl/glcpp/glcpp-lex.l" -{ - return EQUAL; -} - YY_BREAK -case 32: -YY_RULE_SETUP -#line 263 "src/glsl/glcpp/glcpp-lex.l" -{ - return NOT_EQUAL; -} - YY_BREAK -case 33: -YY_RULE_SETUP -#line 267 "src/glsl/glcpp/glcpp-lex.l" -{ - return AND; -} - YY_BREAK -case 34: -YY_RULE_SETUP -#line 271 "src/glsl/glcpp/glcpp-lex.l" -{ - return OR; -} - YY_BREAK -case 35: -YY_RULE_SETUP -#line 275 "src/glsl/glcpp/glcpp-lex.l" -{ - return PASTE; -} - YY_BREAK -case 36: -YY_RULE_SETUP -#line 279 "src/glsl/glcpp/glcpp-lex.l" -{ - return DEFINED; -} - YY_BREAK -case 37: -YY_RULE_SETUP -#line 283 "src/glsl/glcpp/glcpp-lex.l" -{ - yylval->str = ralloc_strdup (yyextra, yytext); - return IDENTIFIER; -} - YY_BREAK -case 38: -YY_RULE_SETUP -#line 288 "src/glsl/glcpp/glcpp-lex.l" -{ - return yytext[0]; -} - YY_BREAK -case 39: -YY_RULE_SETUP -#line 292 "src/glsl/glcpp/glcpp-lex.l" -{ - yylval->str = ralloc_strdup (yyextra, yytext); - return OTHER; -} - YY_BREAK -case 40: -YY_RULE_SETUP -#line 297 "src/glsl/glcpp/glcpp-lex.l" -{ - if (yyextra->space_tokens) { - return SPACE; - } -} - YY_BREAK -case 41: -/* rule 41 can match eol */ -YY_RULE_SETUP -#line 303 "src/glsl/glcpp/glcpp-lex.l" -{ - yyextra->lexing_if = 0; - yylineno++; - yycolumn = 0; - return NEWLINE; -} - YY_BREAK -/* Handle missing newline at EOF. */ -case YY_STATE_EOF(INITIAL): -#line 311 "src/glsl/glcpp/glcpp-lex.l" -{ - BEGIN DONE; /* Don't keep matching this rule forever. */ - yyextra->lexing_if = 0; - return NEWLINE; -} - YY_BREAK -/* We don't actually use the UNREACHABLE start condition. We - only have this action here so that we can pretend to call some - generated functions, (to avoid "defined but not used" - warnings. */ -case 42: -YY_RULE_SETUP -#line 321 "src/glsl/glcpp/glcpp-lex.l" -{ - unput('.'); - yy_top_state(yyextra); -} - YY_BREAK -case 43: -YY_RULE_SETUP -#line 326 "src/glsl/glcpp/glcpp-lex.l" -ECHO; - YY_BREAK -#line 1425 "" - case YY_STATE_EOF(DONE): - case YY_STATE_EOF(COMMENT): - case YY_STATE_EOF(UNREACHABLE): - case YY_STATE_EOF(SKIP): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * glcpp_lex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( glcpp_wrap(yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of glcpp_lex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = yyg->yytext_ptr; - register int number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - YY_FATAL_ERROR( -"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, (size_t) num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - glcpp_restart(yyin ,yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) glcpp_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) -{ - register yy_state_type yy_current_state; - register char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - yy_current_state += YY_AT_BOL(); - - yyg->yy_state_ptr = yyg->yy_state_buf; - *yyg->yy_state_ptr++ = yy_current_state; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 154 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - *yyg->yy_state_ptr++ = yy_current_state; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) -{ - register int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - - register YY_CHAR yy_c = 1; - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 154 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 153); - if ( ! yy_is_jam ) - *yyg->yy_state_ptr++ = yy_current_state; - - return yy_is_jam ? 0 : yy_current_state; -} - - static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner) -{ - register char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_cp = yyg->yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yyg->yy_hold_char; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = yyg->yy_n_chars + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - yyg->yytext_ptr = yy_bp; - yyg->yy_hold_char = *yy_cp; - yyg->yy_c_buf_p = yy_cp; -} - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) -#else - static int input (yyscan_t yyscanner) -#endif - -{ - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - glcpp_restart(yyin ,yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( glcpp_wrap(yyscanner ) ) - return EOF; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(yyscanner); -#else - return input(yyscanner); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; - - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * @param yyscanner The scanner object. - * @note This function does not reset the start condition to @c INITIAL . - */ - void glcpp_restart (FILE * input_file , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! YY_CURRENT_BUFFER ){ - glcpp_ensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - glcpp__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - glcpp__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); - glcpp__load_buffer_state(yyscanner ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * @param yyscanner The scanner object. - */ - void glcpp__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * glcpp_pop_buffer_state(); - * glcpp_push_buffer_state(new_buffer); - */ - glcpp_ensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - glcpp__load_buffer_state(yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (glcpp_wrap()) processing, but the only time this flag - * is looked at is after glcpp_wrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; -} - -static void glcpp__load_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * @param yyscanner The scanner object. - * @return the allocated buffer state. - */ - YY_BUFFER_STATE glcpp__create_buffer (FILE * file, int size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) glcpp_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in glcpp__create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) glcpp_alloc(b->yy_buf_size + 2 ,yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in glcpp__create_buffer()" ); - - b->yy_is_our_buffer = 1; - - glcpp__init_buffer(b,file ,yyscanner); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with glcpp__create_buffer() - * @param yyscanner The scanner object. - */ - void glcpp__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - glcpp_free((void *) b->yy_ch_buf ,yyscanner ); - - glcpp_free((void *) b ,yyscanner ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a glcpp_restart() or at EOF. - */ - static void glcpp__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) - -{ - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - glcpp__flush_buffer(b ,yyscanner); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then glcpp__init_buffer was _probably_ - * called from glcpp_restart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * @param yyscanner The scanner object. - */ - void glcpp__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - glcpp__load_buffer_state(yyscanner ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * @param yyscanner The scanner object. - */ -void glcpp_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - glcpp_ensure_buffer_stack(yyscanner); - - /* This block is copied from glcpp__switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from glcpp__switch_to_buffer. */ - glcpp__load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * @param yyscanner The scanner object. - */ -void glcpp_pop_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - glcpp__delete_buffer(YY_CURRENT_BUFFER ,yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - glcpp__load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void glcpp_ensure_buffer_stack (yyscan_t yyscanner) -{ - int num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - yyg->yy_buffer_stack = (struct yy_buffer_state**)glcpp_alloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in glcpp_ensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)glcpp_realloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in glcpp_ensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE glcpp__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) glcpp_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in glcpp__scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - glcpp__switch_to_buffer(b ,yyscanner ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to glcpp_lex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * glcpp__scan_bytes() instead. - */ -YY_BUFFER_STATE glcpp__scan_string (yyconst char * yystr , yyscan_t yyscanner) -{ - - return glcpp__scan_bytes(yystr,strlen(yystr) ,yyscanner); -} - -/** Setup the input buffer state to scan the given bytes. The next call to glcpp_lex() will - * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE glcpp__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) glcpp_alloc(n ,yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in glcpp__scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = glcpp__scan_buffer(buf,n ,yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in glcpp__scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - - static void yy_push_state (int new_state , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( yyg->yy_start_stack_ptr >= yyg->yy_start_stack_depth ) - { - yy_size_t new_size; - - yyg->yy_start_stack_depth += YY_START_STACK_INCR; - new_size = yyg->yy_start_stack_depth * sizeof( int ); - - if ( ! yyg->yy_start_stack ) - yyg->yy_start_stack = (int *) glcpp_alloc(new_size ,yyscanner ); - - else - yyg->yy_start_stack = (int *) glcpp_realloc((void *) yyg->yy_start_stack,new_size ,yyscanner ); - - if ( ! yyg->yy_start_stack ) - YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); - } - - yyg->yy_start_stack[yyg->yy_start_stack_ptr++] = YY_START; - - BEGIN(new_state); -} - - static void yy_pop_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( --yyg->yy_start_stack_ptr < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); - - BEGIN(yyg->yy_start_stack[yyg->yy_start_stack_ptr]); -} - - static int yy_top_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyg->yy_start_stack[yyg->yy_start_stack_ptr - 1]; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the user-defined data for this scanner. - * @param yyscanner The scanner object. - */ -YY_EXTRA_TYPE glcpp_get_extra (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; -} - -/** Get the current line number. - * @param yyscanner The scanner object. - */ -int glcpp_get_lineno (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; -} - -/** Get the current column number. - * @param yyscanner The scanner object. - */ -int glcpp_get_column (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; -} - -/** Get the input stream. - * @param yyscanner The scanner object. - */ -FILE *glcpp_get_in (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; -} - -/** Get the output stream. - * @param yyscanner The scanner object. - */ -FILE *glcpp_get_out (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; -} - -/** Get the length of the current token. - * @param yyscanner The scanner object. - */ -int glcpp_get_leng (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; -} - -/** Get the current token. - * @param yyscanner The scanner object. - */ - -char *glcpp_get_text (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; -} - -/** Set the user-defined data. This data is never touched by the scanner. - * @param user_defined The data to be associated with this scanner. - * @param yyscanner The scanner object. - */ -void glcpp_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; -} - -/** Set the current line number. - * @param line_number - * @param yyscanner The scanner object. - */ -void glcpp_set_lineno (int line_number , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "glcpp_set_lineno called with no buffer" , yyscanner); - - yylineno = line_number; -} - -/** Set the current column. - * @param line_number - * @param yyscanner The scanner object. - */ -void glcpp_set_column (int column_no , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "glcpp_set_column called with no buffer" , yyscanner); - - yycolumn = column_no; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * @param yyscanner The scanner object. - * @see glcpp__switch_to_buffer - */ -void glcpp_set_in (FILE * in_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = in_str ; -} - -void glcpp_set_out (FILE * out_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = out_str ; -} - -int glcpp_get_debug (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; -} - -void glcpp_set_debug (int bdebug , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = bdebug ; -} - -/* Accessor methods for yylval and yylloc */ - -YYSTYPE * glcpp_get_lval (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylval; -} - -void glcpp_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; -} - -YYLTYPE *glcpp_get_lloc (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylloc; -} - -void glcpp_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylloc = yylloc_param; -} - -/* User-visible API */ - -/* glcpp_lex_init is special because it creates the scanner itself, so it is - * the ONLY reentrant function that doesn't take the scanner as the last argument. - * That's why we explicitly handle the declaration, instead of using our macros. - */ - -int glcpp_lex_init(yyscan_t* ptr_yy_globals) - -{ - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) glcpp_alloc ( sizeof( struct yyguts_t ), NULL ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - return yy_init_globals ( *ptr_yy_globals ); -} - -/* glcpp_lex_init_extra has the same functionality as glcpp_lex_init, but follows the - * convention of taking the scanner as the last argument. Note however, that - * this is a *pointer* to a scanner, as it will be allocated by this call (and - * is the reason, too, why this function also must handle its own declaration). - * The user defined value in the first argument will be available to glcpp_alloc in - * the yyextra field. - */ - -int glcpp_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) - -{ - struct yyguts_t dummy_yyguts; - - glcpp_set_extra (yy_user_defined, &dummy_yyguts); - - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) glcpp_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - glcpp_set_extra (yy_user_defined, *ptr_yy_globals); - - return yy_init_globals ( *ptr_yy_globals ); -} - -static int yy_init_globals (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from glcpp_lex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = 0; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = (char *) 0; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; - - yyg->yy_state_buf = 0; - yyg->yy_state_ptr = 0; - yyg->yy_full_match = 0; - yyg->yy_lp = 0; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = (FILE *) 0; - yyout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * glcpp_lex_init() - */ - return 0; -} - -/* glcpp_lex_destroy is for both reentrant and non-reentrant scanners. */ -int glcpp_lex_destroy (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - glcpp__delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - glcpp_pop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - glcpp_free(yyg->yy_buffer_stack ,yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - glcpp_free(yyg->yy_start_stack ,yyscanner ); - yyg->yy_start_stack = NULL; - - glcpp_free ( yyg->yy_state_buf , yyscanner); - yyg->yy_state_buf = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * glcpp_lex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - glcpp_free ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) -{ - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) -{ - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *glcpp_alloc (yy_size_t size , yyscan_t yyscanner) -{ - return (void *) malloc( size ); -} - -void *glcpp_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) -{ - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void glcpp_free (void * ptr , yyscan_t yyscanner) -{ - free( (char *) ptr ); /* see glcpp_realloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 326 "src/glsl/glcpp/glcpp-lex.l" - - - -void -glcpp_lex_set_source_string(glcpp_parser_t *parser, const char *shader) -{ - glcpp__scan_string(shader,parser->scanner); -} - diff --git a/dll/opengl/mesa/generated/glsl/glcpp/glcpp-parse.c b/dll/opengl/mesa/generated/glsl/glcpp/glcpp-parse.c deleted file mode 100644 index 34db5684d51..00000000000 --- a/dll/opengl/mesa/generated/glsl/glcpp/glcpp-parse.c +++ /dev/null @@ -1,4294 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.5. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.5" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 1 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - -/* Using locations. */ -#define YYLSP_NEEDED 1 - - - -/* Copy the first part of user declarations. */ - -/* Line 268 of yacc.c */ -#line 1 "src/glsl/glcpp/glcpp-parse.y" - -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include -#include -#include -#include -#include - -#include "glcpp.h" -#include "main/core.h" /* for struct gl_extensions */ -#include "main/mtypes.h" /* for gl_api enum */ - -static void -yyerror (YYLTYPE *locp, glcpp_parser_t *parser, const char *error); - -static void -_define_object_macro (glcpp_parser_t *parser, - YYLTYPE *loc, - const char *macro, - token_list_t *replacements); - -static void -_define_function_macro (glcpp_parser_t *parser, - YYLTYPE *loc, - const char *macro, - string_list_t *parameters, - token_list_t *replacements); - -static string_list_t * -_string_list_create (void *ctx); - -static void -_string_list_append_item (string_list_t *list, const char *str); - -static int -_string_list_contains (string_list_t *list, const char *member, int *index); - -static int -_string_list_length (string_list_t *list); - -static int -_string_list_equal (string_list_t *a, string_list_t *b); - -static argument_list_t * -_argument_list_create (void *ctx); - -static void -_argument_list_append (argument_list_t *list, token_list_t *argument); - -static int -_argument_list_length (argument_list_t *list); - -static token_list_t * -_argument_list_member_at (argument_list_t *list, int index); - -/* Note: This function ralloc_steal()s the str pointer. */ -static token_t * -_token_create_str (void *ctx, int type, char *str); - -static token_t * -_token_create_ival (void *ctx, int type, int ival); - -static token_list_t * -_token_list_create (void *ctx); - -static void -_token_list_append (token_list_t *list, token_t *token); - -static void -_token_list_append_list (token_list_t *list, token_list_t *tail); - -static int -_token_list_equal_ignoring_space (token_list_t *a, token_list_t *b); - -static void -_parser_active_list_push (glcpp_parser_t *parser, - const char *identifier, - token_node_t *marker); - -static void -_parser_active_list_pop (glcpp_parser_t *parser); - -static int -_parser_active_list_contains (glcpp_parser_t *parser, const char *identifier); - -static void -_glcpp_parser_expand_if (glcpp_parser_t *parser, int type, token_list_t *list); - -static void -_glcpp_parser_expand_token_list (glcpp_parser_t *parser, - token_list_t *list); - -static void -_glcpp_parser_print_expanded_token_list (glcpp_parser_t *parser, - token_list_t *list); - -static void -_glcpp_parser_skip_stack_push_if (glcpp_parser_t *parser, YYLTYPE *loc, - int condition); - -static void -_glcpp_parser_skip_stack_change_if (glcpp_parser_t *parser, YYLTYPE *loc, - const char *type, int condition); - -static void -_glcpp_parser_skip_stack_pop (glcpp_parser_t *parser, YYLTYPE *loc); - -#define yylex glcpp_parser_lex - -static int -glcpp_parser_lex (YYSTYPE *yylval, YYLTYPE *yylloc, glcpp_parser_t *parser); - -static void -glcpp_parser_lex_from (glcpp_parser_t *parser, token_list_t *list); - -static void -add_builtin_define(glcpp_parser_t *parser, const char *name, int value); - - - -/* Line 268 of yacc.c */ -#line 214 "build/windows-x86/glsl/glcpp/glcpp-parse.c" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 1 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - COMMA_FINAL = 258, - DEFINED = 259, - ELIF_EXPANDED = 260, - HASH = 261, - HASH_DEFINE_FUNC = 262, - HASH_DEFINE_OBJ = 263, - HASH_ELIF = 264, - HASH_ELSE = 265, - HASH_ENDIF = 266, - HASH_IF = 267, - HASH_IFDEF = 268, - HASH_IFNDEF = 269, - HASH_UNDEF = 270, - HASH_VERSION = 271, - IDENTIFIER = 272, - IF_EXPANDED = 273, - INTEGER = 274, - INTEGER_STRING = 275, - NEWLINE = 276, - OTHER = 277, - PLACEHOLDER = 278, - SPACE = 279, - PASTE = 280, - OR = 281, - AND = 282, - NOT_EQUAL = 283, - EQUAL = 284, - GREATER_OR_EQUAL = 285, - LESS_OR_EQUAL = 286, - RIGHT_SHIFT = 287, - LEFT_SHIFT = 288, - UNARY = 289 - }; -#endif - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 -#endif - - -/* Copy the second part of user declarations. */ - - -/* Line 343 of yacc.c */ -#line 302 "build/windows-x86/glsl/glcpp/glcpp-parse.c" - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) -#else -# define YYUSE(e) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; -#endif -{ - return yyi; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 2 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 606 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 57 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 17 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 101 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 162 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 289 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 47, 2, 2, 2, 43, 30, 2, - 45, 46, 41, 39, 49, 40, 54, 42, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 55, - 33, 56, 34, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 50, 2, 51, 29, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 52, 28, 53, 48, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 31, 32, 35, 36, 37, 38, 44 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 4, 7, 9, 11, 13, 16, 20, - 24, 29, 36, 44, 48, 52, 55, 60, 65, 69, - 72, 75, 78, 82, 85, 87, 89, 91, 95, 99, - 103, 107, 111, 115, 119, 123, 127, 131, 135, 139, - 143, 147, 151, 155, 159, 163, 166, 169, 172, 175, - 179, 181, 185, 187, 190, 193, 194, 196, 197, 199, - 202, 207, 209, 211, 214, 216, 219, 221, 223, 225, - 227, 229, 231, 233, 235, 237, 239, 241, 243, 245, - 247, 249, 251, 253, 255, 257, 259, 261, 263, 265, - 267, 269, 271, 273, 275, 277, 279, 281, 283, 285, - 287, 289 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 58, 0, -1, -1, 58, 59, -1, 61, -1, 65, - -1, 60, -1, 6, 66, -1, 18, 63, 21, -1, - 5, 63, 21, -1, 8, 17, 67, 21, -1, 7, - 17, 45, 46, 67, 21, -1, 7, 17, 45, 64, - 46, 67, 21, -1, 15, 17, 21, -1, 12, 70, - 21, -1, 12, 21, -1, 13, 17, 68, 21, -1, - 14, 17, 68, 21, -1, 9, 70, 21, -1, 9, - 21, -1, 10, 21, -1, 11, 21, -1, 16, 62, - 21, -1, 6, 21, -1, 20, -1, 19, -1, 62, - -1, 63, 26, 63, -1, 63, 27, 63, -1, 63, - 28, 63, -1, 63, 29, 63, -1, 63, 30, 63, - -1, 63, 31, 63, -1, 63, 32, 63, -1, 63, - 35, 63, -1, 63, 36, 63, -1, 63, 34, 63, - -1, 63, 33, 63, -1, 63, 37, 63, -1, 63, - 38, 63, -1, 63, 40, 63, -1, 63, 39, 63, - -1, 63, 43, 63, -1, 63, 42, 63, -1, 63, - 41, 63, -1, 47, 63, -1, 48, 63, -1, 40, - 63, -1, 39, 63, -1, 45, 63, 46, -1, 17, - -1, 64, 49, 17, -1, 21, -1, 71, 21, -1, - 71, 21, -1, -1, 71, -1, -1, 71, -1, 4, - 17, -1, 4, 45, 17, 46, -1, 72, -1, 69, - -1, 70, 69, -1, 72, -1, 71, 72, -1, 17, - -1, 20, -1, 73, -1, 22, -1, 24, -1, 50, - -1, 51, -1, 45, -1, 46, -1, 52, -1, 53, - -1, 54, -1, 30, -1, 41, -1, 39, -1, 40, - -1, 48, -1, 47, -1, 42, -1, 43, -1, 38, - -1, 37, -1, 33, -1, 34, -1, 36, -1, 35, - -1, 32, -1, 31, -1, 29, -1, 28, -1, 27, - -1, 26, -1, 55, -1, 49, -1, 56, -1, 25, - -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 180, 180, 182, 186, 189, 194, 195, 199, 202, - 208, 211, 214, 217, 225, 244, 254, 259, 264, 283, - 298, 301, 304, 325, 329, 338, 343, 344, 347, 350, - 353, 356, 359, 362, 365, 368, 371, 374, 377, 380, - 383, 386, 389, 397, 405, 408, 411, 414, 417, 420, - 426, 431, 439, 440, 444, 450, 451, 454, 456, 463, - 467, 471, 476, 480, 487, 492, 499, 503, 507, 511, - 515, 522, 523, 524, 525, 526, 527, 528, 529, 530, - 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, - 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, - 551, 552 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "COMMA_FINAL", "DEFINED", - "ELIF_EXPANDED", "HASH", "HASH_DEFINE_FUNC", "HASH_DEFINE_OBJ", - "HASH_ELIF", "HASH_ELSE", "HASH_ENDIF", "HASH_IF", "HASH_IFDEF", - "HASH_IFNDEF", "HASH_UNDEF", "HASH_VERSION", "IDENTIFIER", "IF_EXPANDED", - "INTEGER", "INTEGER_STRING", "NEWLINE", "OTHER", "PLACEHOLDER", "SPACE", - "PASTE", "OR", "AND", "'|'", "'^'", "'&'", "NOT_EQUAL", "EQUAL", "'<'", - "'>'", "GREATER_OR_EQUAL", "LESS_OR_EQUAL", "RIGHT_SHIFT", "LEFT_SHIFT", - "'+'", "'-'", "'*'", "'/'", "'%'", "UNARY", "'('", "')'", "'!'", "'~'", - "','", "'['", "']'", "'{'", "'}'", "'.'", "';'", "'='", "$accept", - "input", "line", "expanded_line", "control_line", "integer_constant", - "expression", "identifier_list", "text_line", "non_directive", - "replacement_list", "junk", "conditional_token", "conditional_tokens", - "pp_tokens", "preprocessing_token", "operator", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 124, 94, - 38, 283, 284, 60, 62, 285, 286, 287, 288, 43, - 45, 42, 47, 37, 289, 40, 41, 33, 126, 44, - 91, 93, 123, 125, 46, 59, 61 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 57, 58, 58, 59, 59, 59, 59, 60, 60, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 62, 62, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - 64, 64, 65, 65, 66, 67, 67, 68, 68, 69, - 69, 69, 70, 70, 71, 71, 72, 72, 72, 72, - 72, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 0, 2, 1, 1, 1, 2, 3, 3, - 4, 6, 7, 3, 3, 2, 4, 4, 3, 2, - 2, 2, 3, 2, 1, 1, 1, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, - 1, 3, 1, 2, 2, 0, 1, 0, 1, 2, - 4, 1, 1, 2, 1, 2, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1 -}; - -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 66, 0, 67, 52, 69, - 70, 101, 97, 96, 95, 94, 78, 93, 92, 88, - 89, 91, 90, 87, 86, 80, 81, 79, 84, 85, - 73, 74, 83, 82, 99, 71, 72, 75, 76, 77, - 98, 100, 3, 6, 4, 5, 0, 64, 68, 25, - 24, 0, 0, 0, 0, 0, 26, 0, 23, 7, - 0, 0, 55, 0, 19, 62, 0, 61, 20, 21, - 15, 0, 57, 57, 0, 0, 0, 53, 65, 48, - 47, 0, 45, 46, 9, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 54, 0, 0, 56, 59, 0, 18, - 63, 14, 0, 58, 0, 13, 22, 8, 49, 27, - 28, 29, 30, 31, 32, 33, 37, 36, 34, 35, - 38, 39, 41, 40, 44, 43, 42, 50, 55, 0, - 10, 0, 16, 17, 0, 55, 0, 60, 11, 0, - 51, 12 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 1, 52, 53, 54, 66, 67, 149, 55, 69, - 115, 122, 75, 76, 116, 57, 58 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -147 -static const yytype_int16 yypact[] = -{ - -147, 112, -147, 28, -10, 55, 62, 152, -15, 59, - 192, 85, 86, 87, 51, -147, 28, -147, -147, -147, - -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, - -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, - -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, - -147, -147, -147, -147, -147, -147, 312, -147, -147, -147, - -147, 28, 28, 28, 28, 28, -147, 428, -147, -147, - 352, 63, 392, 17, -147, -147, 232, -147, -147, -147, - -147, 272, 392, 392, 84, 89, 451, -147, -147, -147, - -147, 469, -147, -147, -147, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, -147, 60, 90, 392, -147, 96, -147, - -147, -147, 93, 392, 94, -147, -147, -147, -147, 489, - 505, 520, 534, 547, 558, 558, 18, 18, 18, 18, - 563, 563, 23, 23, -147, -147, -147, -147, 392, 32, - -147, 61, -147, -147, 110, 392, 118, -147, -147, 149, - -147, -147 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -147, -147, -147, -147, -147, 157, -11, -147, -147, -147, - -146, 92, -68, 200, 0, -7, -147 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 -static const yytype_uint8 yytable[] = -{ - 77, 56, 154, 77, 70, 86, 78, 15, 120, 159, - 17, 68, 19, 120, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 117, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 59, 60, 88, - 89, 90, 91, 92, 93, 106, 107, 108, 109, 110, - 111, 112, 118, 88, 110, 111, 112, 61, 62, 77, - 59, 60, 71, 63, 77, 64, 65, 147, 155, 72, - 79, 156, 123, 123, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 82, 83, 84, 125, 148, 157, 114, 88, - 126, 150, 2, 151, 152, 153, 88, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 158, 17, 18, 19, 160, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 73, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 15, - 161, 85, 17, 74, 19, 124, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 73, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 15, - 81, 0, 17, 80, 19, 0, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 73, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 15, - 0, 0, 17, 119, 19, 0, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 73, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 15, - 0, 0, 17, 121, 19, 0, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 0, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 15, - 0, 0, 17, 87, 19, 0, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 0, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 15, - 0, 0, 17, 113, 19, 0, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 0, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 15, - 0, 0, 17, 0, 19, 0, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 0, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 94, - 0, 0, 0, 0, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 127, 0, 0, 0, 0, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 95, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 0, 0, 128, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 108, 109, 110, 111, 112 -}; - -#define yypact_value_is_default(yystate) \ - ((yystate) == (-147)) - -#define yytable_value_is_error(yytable_value) \ - YYID (0) - -static const yytype_int16 yycheck[] = -{ - 7, 1, 148, 10, 4, 16, 21, 17, 76, 155, - 20, 21, 22, 81, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 17, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 19, 20, 56, - 61, 62, 63, 64, 65, 37, 38, 39, 40, 41, - 42, 43, 45, 70, 41, 42, 43, 39, 40, 76, - 19, 20, 17, 45, 81, 47, 48, 17, 46, 17, - 21, 49, 82, 83, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 17, 17, 17, 21, 46, 46, 45, 116, - 21, 21, 0, 17, 21, 21, 123, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 21, 20, 21, 22, 17, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 4, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 17, - 21, 14, 20, 21, 22, 83, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 4, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 17, - 10, -1, 20, 21, 22, -1, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 4, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 17, - -1, -1, 20, 21, 22, -1, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 4, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 17, - -1, -1, 20, 21, 22, -1, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, -1, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 17, - -1, -1, 20, 21, 22, -1, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, -1, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 17, - -1, -1, 20, 21, 22, -1, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, -1, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 17, - -1, -1, 20, -1, 22, -1, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, -1, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 21, - -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 21, -1, -1, -1, -1, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, -1, -1, 46, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 39, 40, 41, 42, 43 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 58, 0, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 59, 60, 61, 65, 71, 72, 73, 19, - 20, 39, 40, 45, 47, 48, 62, 63, 21, 66, - 71, 17, 17, 4, 21, 69, 70, 72, 21, 21, - 21, 70, 17, 17, 17, 62, 63, 21, 72, 63, - 63, 63, 63, 63, 21, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 21, 45, 67, 71, 17, 45, 21, - 69, 21, 68, 71, 68, 21, 21, 21, 46, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 17, 46, 64, - 21, 17, 21, 21, 67, 46, 49, 46, 21, 67, - 17, 21 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, parser, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval, &yylloc, parser) -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, Location, parser); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, glcpp_parser_t *parser) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, parser) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; - glcpp_parser_t *parser; -#endif -{ - if (!yyvaluep) - return; - YYUSE (yylocationp); - YYUSE (parser); -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, glcpp_parser_t *parser) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, parser) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; - glcpp_parser_t *parser; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - YY_LOCATION_PRINT (yyoutput, *yylocationp); - YYFPRINTF (yyoutput, ": "); - yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, parser); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, glcpp_parser_t *parser) -#else -static void -yy_reduce_print (yyvsp, yylsp, yyrule, parser) - YYSTYPE *yyvsp; - YYLTYPE *yylsp; - int yyrule; - glcpp_parser_t *parser; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , &(yylsp[(yyi + 1) - (yynrhs)]) , parser); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, yylsp, Rule, parser); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = 0; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, glcpp_parser_t *parser) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, yylocationp, parser) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - YYLTYPE *yylocationp; - glcpp_parser_t *parser; -#endif -{ - YYUSE (yyvaluep); - YYUSE (yylocationp); - YYUSE (parser); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - - default: - break; - } -} - - -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (glcpp_parser_t *parser); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - -/*----------. -| yyparse. | -`----------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (glcpp_parser_t *parser) -#else -int -yyparse (parser) - glcpp_parser_t *parser; -#endif -#endif -{ -/* The lookahead symbol. */ -int yychar; - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; - -/* Location data for the lookahead symbol. */ -YYLTYPE yylloc; - - /* Number of syntax errors so far. */ - int yynerrs; - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - /* The location stack. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls; - YYLTYPE *yylsp; - - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[3]; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - YYLTYPE yyloc; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; - yyls = yylsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - yylsp = yyls; - -#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - /* Initialize the default location before parsing starts. */ - yylloc.first_line = yylloc.last_line = 1; - yylloc.first_column = yylloc.last_column = 1; -#endif - -/* User initialization code. */ - -/* Line 1590 of yacc.c */ -#line 147 "src/glsl/glcpp/glcpp-parse.y" -{ - yylloc.first_line = 1; - yylloc.first_column = 1; - yylloc.last_line = 1; - yylloc.last_column = 1; - yylloc.source = 0; -} - -/* Line 1590 of yacc.c */ -#line 1648 "build/windows-x86/glsl/glcpp/glcpp-parse.c" - yylsp[0] = yylloc; - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yyls1, yysize * sizeof (*yylsp), - &yystacksize); - - yyls = yyls1; - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - *++yyvsp = yylval; - *++yylsp = yylloc; - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 4: - -/* Line 1806 of yacc.c */ -#line 186 "src/glsl/glcpp/glcpp-parse.y" - { - ralloc_strcat (&parser->output, "\n"); - } - break; - - case 5: - -/* Line 1806 of yacc.c */ -#line 189 "src/glsl/glcpp/glcpp-parse.y" - { - _glcpp_parser_print_expanded_token_list (parser, (yyvsp[(1) - (1)].token_list)); - ralloc_strcat (&parser->output, "\n"); - ralloc_free ((yyvsp[(1) - (1)].token_list)); - } - break; - - case 8: - -/* Line 1806 of yacc.c */ -#line 199 "src/glsl/glcpp/glcpp-parse.y" - { - _glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (3)]), (yyvsp[(2) - (3)].ival)); - } - break; - - case 9: - -/* Line 1806 of yacc.c */ -#line 202 "src/glsl/glcpp/glcpp-parse.y" - { - _glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (3)]), "elif", (yyvsp[(2) - (3)].ival)); - } - break; - - case 10: - -/* Line 1806 of yacc.c */ -#line 208 "src/glsl/glcpp/glcpp-parse.y" - { - _define_object_macro (parser, & (yylsp[(2) - (4)]), (yyvsp[(2) - (4)].str), (yyvsp[(3) - (4)].token_list)); - } - break; - - case 11: - -/* Line 1806 of yacc.c */ -#line 211 "src/glsl/glcpp/glcpp-parse.y" - { - _define_function_macro (parser, & (yylsp[(2) - (6)]), (yyvsp[(2) - (6)].str), NULL, (yyvsp[(5) - (6)].token_list)); - } - break; - - case 12: - -/* Line 1806 of yacc.c */ -#line 214 "src/glsl/glcpp/glcpp-parse.y" - { - _define_function_macro (parser, & (yylsp[(2) - (7)]), (yyvsp[(2) - (7)].str), (yyvsp[(4) - (7)].string_list), (yyvsp[(6) - (7)].token_list)); - } - break; - - case 13: - -/* Line 1806 of yacc.c */ -#line 217 "src/glsl/glcpp/glcpp-parse.y" - { - macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (3)].str)); - if (macro) { - hash_table_remove (parser->defines, (yyvsp[(2) - (3)].str)); - ralloc_free (macro); - } - ralloc_free ((yyvsp[(2) - (3)].str)); - } - break; - - case 14: - -/* Line 1806 of yacc.c */ -#line 225 "src/glsl/glcpp/glcpp-parse.y" - { - /* Be careful to only evaluate the 'if' expression if - * we are not skipping. When we are skipping, we - * simply push a new 0-valued 'if' onto the skip - * stack. - * - * This avoids generating diagnostics for invalid - * expressions that are being skipped. */ - if (parser->skip_stack == NULL || - parser->skip_stack->type == SKIP_NO_SKIP) - { - _glcpp_parser_expand_if (parser, IF_EXPANDED, (yyvsp[(2) - (3)].token_list)); - } - else - { - _glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (3)]), 0); - parser->skip_stack->type = SKIP_TO_ENDIF; - } - } - break; - - case 15: - -/* Line 1806 of yacc.c */ -#line 244 "src/glsl/glcpp/glcpp-parse.y" - { - /* #if without an expression is only an error if we - * are not skipping */ - if (parser->skip_stack == NULL || - parser->skip_stack->type == SKIP_NO_SKIP) - { - glcpp_error(& (yylsp[(1) - (2)]), parser, "#if with no expression"); - } - _glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (2)]), 0); - } - break; - - case 16: - -/* Line 1806 of yacc.c */ -#line 254 "src/glsl/glcpp/glcpp-parse.y" - { - macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (4)].str)); - ralloc_free ((yyvsp[(2) - (4)].str)); - _glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (4)]), macro != NULL); - } - break; - - case 17: - -/* Line 1806 of yacc.c */ -#line 259 "src/glsl/glcpp/glcpp-parse.y" - { - macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (4)].str)); - ralloc_free ((yyvsp[(2) - (4)].str)); - _glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (4)]), macro == NULL); - } - break; - - case 18: - -/* Line 1806 of yacc.c */ -#line 264 "src/glsl/glcpp/glcpp-parse.y" - { - /* Be careful to only evaluate the 'elif' expression - * if we are not skipping. When we are skipping, we - * simply change to a 0-valued 'elif' on the skip - * stack. - * - * This avoids generating diagnostics for invalid - * expressions that are being skipped. */ - if (parser->skip_stack && - parser->skip_stack->type == SKIP_TO_ELSE) - { - _glcpp_parser_expand_if (parser, ELIF_EXPANDED, (yyvsp[(2) - (3)].token_list)); - } - else - { - _glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (3)]), - "elif", 0); - } - } - break; - - case 19: - -/* Line 1806 of yacc.c */ -#line 283 "src/glsl/glcpp/glcpp-parse.y" - { - /* #elif without an expression is an error unless we - * are skipping. */ - if (parser->skip_stack && - parser->skip_stack->type == SKIP_TO_ELSE) - { - glcpp_error(& (yylsp[(1) - (2)]), parser, "#elif with no expression"); - } - else - { - _glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (2)]), - "elif", 0); - glcpp_warning(& (yylsp[(1) - (2)]), parser, "ignoring illegal #elif without expression"); - } - } - break; - - case 20: - -/* Line 1806 of yacc.c */ -#line 298 "src/glsl/glcpp/glcpp-parse.y" - { - _glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (2)]), "else", 1); - } - break; - - case 21: - -/* Line 1806 of yacc.c */ -#line 301 "src/glsl/glcpp/glcpp-parse.y" - { - _glcpp_parser_skip_stack_pop (parser, & (yylsp[(1) - (2)])); - } - break; - - case 22: - -/* Line 1806 of yacc.c */ -#line 304 "src/glsl/glcpp/glcpp-parse.y" - { - macro_t *macro = hash_table_find (parser->defines, "__VERSION__"); - if (macro) { - hash_table_remove (parser->defines, "__VERSION__"); - ralloc_free (macro); - } - add_builtin_define (parser, "__VERSION__", (yyvsp[(2) - (3)].ival)); - - if ((yyvsp[(2) - (3)].ival) == 100) - add_builtin_define (parser, "GL_ES", 1); - - /* Currently, all ES2 implementations support highp in the - * fragment shader, so we always define this macro in ES2. - * If we ever get a driver that doesn't support highp, we'll - * need to add a flag to the gl_context and check that here. - */ - if ((yyvsp[(2) - (3)].ival) >= 130 || (yyvsp[(2) - (3)].ival) == 100) - add_builtin_define (parser, "GL_FRAGMENT_PRECISION_HIGH", 1); - - ralloc_asprintf_append (&parser->output, "#version %" PRIiMAX, (yyvsp[(2) - (3)].ival)); - } - break; - - case 24: - -/* Line 1806 of yacc.c */ -#line 329 "src/glsl/glcpp/glcpp-parse.y" - { - if (strlen ((yyvsp[(1) - (1)].str)) >= 3 && strncmp ((yyvsp[(1) - (1)].str), "0x", 2) == 0) { - (yyval.ival) = strtoll ((yyvsp[(1) - (1)].str) + 2, NULL, 16); - } else if ((yyvsp[(1) - (1)].str)[0] == '0') { - (yyval.ival) = strtoll ((yyvsp[(1) - (1)].str), NULL, 8); - } else { - (yyval.ival) = strtoll ((yyvsp[(1) - (1)].str), NULL, 10); - } - } - break; - - case 25: - -/* Line 1806 of yacc.c */ -#line 338 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (1)].ival); - } - break; - - case 27: - -/* Line 1806 of yacc.c */ -#line 344 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) || (yyvsp[(3) - (3)].ival); - } - break; - - case 28: - -/* Line 1806 of yacc.c */ -#line 347 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) && (yyvsp[(3) - (3)].ival); - } - break; - - case 29: - -/* Line 1806 of yacc.c */ -#line 350 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) | (yyvsp[(3) - (3)].ival); - } - break; - - case 30: - -/* Line 1806 of yacc.c */ -#line 353 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) ^ (yyvsp[(3) - (3)].ival); - } - break; - - case 31: - -/* Line 1806 of yacc.c */ -#line 356 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) & (yyvsp[(3) - (3)].ival); - } - break; - - case 32: - -/* Line 1806 of yacc.c */ -#line 359 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) != (yyvsp[(3) - (3)].ival); - } - break; - - case 33: - -/* Line 1806 of yacc.c */ -#line 362 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) == (yyvsp[(3) - (3)].ival); - } - break; - - case 34: - -/* Line 1806 of yacc.c */ -#line 365 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) >= (yyvsp[(3) - (3)].ival); - } - break; - - case 35: - -/* Line 1806 of yacc.c */ -#line 368 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) <= (yyvsp[(3) - (3)].ival); - } - break; - - case 36: - -/* Line 1806 of yacc.c */ -#line 371 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) > (yyvsp[(3) - (3)].ival); - } - break; - - case 37: - -/* Line 1806 of yacc.c */ -#line 374 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) < (yyvsp[(3) - (3)].ival); - } - break; - - case 38: - -/* Line 1806 of yacc.c */ -#line 377 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) >> (yyvsp[(3) - (3)].ival); - } - break; - - case 39: - -/* Line 1806 of yacc.c */ -#line 380 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) << (yyvsp[(3) - (3)].ival); - } - break; - - case 40: - -/* Line 1806 of yacc.c */ -#line 383 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) - (yyvsp[(3) - (3)].ival); - } - break; - - case 41: - -/* Line 1806 of yacc.c */ -#line 386 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) + (yyvsp[(3) - (3)].ival); - } - break; - - case 42: - -/* Line 1806 of yacc.c */ -#line 389 "src/glsl/glcpp/glcpp-parse.y" - { - if ((yyvsp[(3) - (3)].ival) == 0) { - yyerror (& (yylsp[(1) - (3)]), parser, - "zero modulus in preprocessor directive"); - } else { - (yyval.ival) = (yyvsp[(1) - (3)].ival) % (yyvsp[(3) - (3)].ival); - } - } - break; - - case 43: - -/* Line 1806 of yacc.c */ -#line 397 "src/glsl/glcpp/glcpp-parse.y" - { - if ((yyvsp[(3) - (3)].ival) == 0) { - yyerror (& (yylsp[(1) - (3)]), parser, - "division by 0 in preprocessor directive"); - } else { - (yyval.ival) = (yyvsp[(1) - (3)].ival) / (yyvsp[(3) - (3)].ival); - } - } - break; - - case 44: - -/* Line 1806 of yacc.c */ -#line 405 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) * (yyvsp[(3) - (3)].ival); - } - break; - - case 45: - -/* Line 1806 of yacc.c */ -#line 408 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = ! (yyvsp[(2) - (2)].ival); - } - break; - - case 46: - -/* Line 1806 of yacc.c */ -#line 411 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = ~ (yyvsp[(2) - (2)].ival); - } - break; - - case 47: - -/* Line 1806 of yacc.c */ -#line 414 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = - (yyvsp[(2) - (2)].ival); - } - break; - - case 48: - -/* Line 1806 of yacc.c */ -#line 417 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = + (yyvsp[(2) - (2)].ival); - } - break; - - case 49: - -/* Line 1806 of yacc.c */ -#line 420 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(2) - (3)].ival); - } - break; - - case 50: - -/* Line 1806 of yacc.c */ -#line 426 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.string_list) = _string_list_create (parser); - _string_list_append_item ((yyval.string_list), (yyvsp[(1) - (1)].str)); - ralloc_steal ((yyval.string_list), (yyvsp[(1) - (1)].str)); - } - break; - - case 51: - -/* Line 1806 of yacc.c */ -#line 431 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.string_list) = (yyvsp[(1) - (3)].string_list); - _string_list_append_item ((yyval.string_list), (yyvsp[(3) - (3)].str)); - ralloc_steal ((yyval.string_list), (yyvsp[(3) - (3)].str)); - } - break; - - case 52: - -/* Line 1806 of yacc.c */ -#line 439 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.token_list) = NULL; } - break; - - case 54: - -/* Line 1806 of yacc.c */ -#line 444 "src/glsl/glcpp/glcpp-parse.y" - { - yyerror (& (yylsp[(1) - (2)]), parser, "Invalid tokens after #"); - } - break; - - case 55: - -/* Line 1806 of yacc.c */ -#line 450 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.token_list) = NULL; } - break; - - case 58: - -/* Line 1806 of yacc.c */ -#line 456 "src/glsl/glcpp/glcpp-parse.y" - { - glcpp_warning(&(yylsp[(1) - (1)]), parser, "extra tokens at end of directive"); - } - break; - - case 59: - -/* Line 1806 of yacc.c */ -#line 463 "src/glsl/glcpp/glcpp-parse.y" - { - int v = hash_table_find (parser->defines, (yyvsp[(2) - (2)].str)) ? 1 : 0; - (yyval.token) = _token_create_ival (parser, INTEGER, v); - } - break; - - case 60: - -/* Line 1806 of yacc.c */ -#line 467 "src/glsl/glcpp/glcpp-parse.y" - { - int v = hash_table_find (parser->defines, (yyvsp[(3) - (4)].str)) ? 1 : 0; - (yyval.token) = _token_create_ival (parser, INTEGER, v); - } - break; - - case 62: - -/* Line 1806 of yacc.c */ -#line 476 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.token_list) = _token_list_create (parser); - _token_list_append ((yyval.token_list), (yyvsp[(1) - (1)].token)); - } - break; - - case 63: - -/* Line 1806 of yacc.c */ -#line 480 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.token_list) = (yyvsp[(1) - (2)].token_list); - _token_list_append ((yyval.token_list), (yyvsp[(2) - (2)].token)); - } - break; - - case 64: - -/* Line 1806 of yacc.c */ -#line 487 "src/glsl/glcpp/glcpp-parse.y" - { - parser->space_tokens = 1; - (yyval.token_list) = _token_list_create (parser); - _token_list_append ((yyval.token_list), (yyvsp[(1) - (1)].token)); - } - break; - - case 65: - -/* Line 1806 of yacc.c */ -#line 492 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.token_list) = (yyvsp[(1) - (2)].token_list); - _token_list_append ((yyval.token_list), (yyvsp[(2) - (2)].token)); - } - break; - - case 66: - -/* Line 1806 of yacc.c */ -#line 499 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.token) = _token_create_str (parser, IDENTIFIER, (yyvsp[(1) - (1)].str)); - (yyval.token)->location = yylloc; - } - break; - - case 67: - -/* Line 1806 of yacc.c */ -#line 503 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.token) = _token_create_str (parser, INTEGER_STRING, (yyvsp[(1) - (1)].str)); - (yyval.token)->location = yylloc; - } - break; - - case 68: - -/* Line 1806 of yacc.c */ -#line 507 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.token) = _token_create_ival (parser, (yyvsp[(1) - (1)].ival), (yyvsp[(1) - (1)].ival)); - (yyval.token)->location = yylloc; - } - break; - - case 69: - -/* Line 1806 of yacc.c */ -#line 511 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.token) = _token_create_str (parser, OTHER, (yyvsp[(1) - (1)].str)); - (yyval.token)->location = yylloc; - } - break; - - case 70: - -/* Line 1806 of yacc.c */ -#line 515 "src/glsl/glcpp/glcpp-parse.y" - { - (yyval.token) = _token_create_ival (parser, SPACE, SPACE); - (yyval.token)->location = yylloc; - } - break; - - case 71: - -/* Line 1806 of yacc.c */ -#line 522 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = '['; } - break; - - case 72: - -/* Line 1806 of yacc.c */ -#line 523 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = ']'; } - break; - - case 73: - -/* Line 1806 of yacc.c */ -#line 524 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = '('; } - break; - - case 74: - -/* Line 1806 of yacc.c */ -#line 525 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = ')'; } - break; - - case 75: - -/* Line 1806 of yacc.c */ -#line 526 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = '{'; } - break; - - case 76: - -/* Line 1806 of yacc.c */ -#line 527 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = '}'; } - break; - - case 77: - -/* Line 1806 of yacc.c */ -#line 528 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = '.'; } - break; - - case 78: - -/* Line 1806 of yacc.c */ -#line 529 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = '&'; } - break; - - case 79: - -/* Line 1806 of yacc.c */ -#line 530 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = '*'; } - break; - - case 80: - -/* Line 1806 of yacc.c */ -#line 531 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = '+'; } - break; - - case 81: - -/* Line 1806 of yacc.c */ -#line 532 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = '-'; } - break; - - case 82: - -/* Line 1806 of yacc.c */ -#line 533 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = '~'; } - break; - - case 83: - -/* Line 1806 of yacc.c */ -#line 534 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = '!'; } - break; - - case 84: - -/* Line 1806 of yacc.c */ -#line 535 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = '/'; } - break; - - case 85: - -/* Line 1806 of yacc.c */ -#line 536 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = '%'; } - break; - - case 86: - -/* Line 1806 of yacc.c */ -#line 537 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = LEFT_SHIFT; } - break; - - case 87: - -/* Line 1806 of yacc.c */ -#line 538 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = RIGHT_SHIFT; } - break; - - case 88: - -/* Line 1806 of yacc.c */ -#line 539 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = '<'; } - break; - - case 89: - -/* Line 1806 of yacc.c */ -#line 540 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = '>'; } - break; - - case 90: - -/* Line 1806 of yacc.c */ -#line 541 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = LESS_OR_EQUAL; } - break; - - case 91: - -/* Line 1806 of yacc.c */ -#line 542 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = GREATER_OR_EQUAL; } - break; - - case 92: - -/* Line 1806 of yacc.c */ -#line 543 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = EQUAL; } - break; - - case 93: - -/* Line 1806 of yacc.c */ -#line 544 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = NOT_EQUAL; } - break; - - case 94: - -/* Line 1806 of yacc.c */ -#line 545 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = '^'; } - break; - - case 95: - -/* Line 1806 of yacc.c */ -#line 546 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = '|'; } - break; - - case 96: - -/* Line 1806 of yacc.c */ -#line 547 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = AND; } - break; - - case 97: - -/* Line 1806 of yacc.c */ -#line 548 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = OR; } - break; - - case 98: - -/* Line 1806 of yacc.c */ -#line 549 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = ';'; } - break; - - case 99: - -/* Line 1806 of yacc.c */ -#line 550 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = ','; } - break; - - case 100: - -/* Line 1806 of yacc.c */ -#line 551 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = '='; } - break; - - case 101: - -/* Line 1806 of yacc.c */ -#line 552 "src/glsl/glcpp/glcpp-parse.y" - { (yyval.ival) = PASTE; } - break; - - - -/* Line 1806 of yacc.c */ -#line 2692 "build/windows-x86/glsl/glcpp/glcpp-parse.c" - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - *++yylsp = yyloc; - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (&yylloc, parser, YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (&yylloc, parser, yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif - } - - yyerror_range[1] = yylloc; - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, parser); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - yyerror_range[1] = yylsp[1-yylen]; - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - yyerror_range[1] = *yylsp; - yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp, parser); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - *++yyvsp = yylval; - - yyerror_range[2] = yylloc; - /* Using YYLLOC is tempting, but would change the location of - the lookahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, yyerror_range, 2); - *++yylsp = yyloc; - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined(yyoverflow) || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (&yylloc, parser, YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, parser); - } - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yylsp, parser); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - - -/* Line 2067 of yacc.c */ -#line 555 "src/glsl/glcpp/glcpp-parse.y" - - -string_list_t * -_string_list_create (void *ctx) -{ - string_list_t *list; - - list = ralloc (ctx, string_list_t); - list->head = NULL; - list->tail = NULL; - - return list; -} - -void -_string_list_append_item (string_list_t *list, const char *str) -{ - string_node_t *node; - - node = ralloc (list, string_node_t); - node->str = ralloc_strdup (node, str); - - node->next = NULL; - - if (list->head == NULL) { - list->head = node; - } else { - list->tail->next = node; - } - - list->tail = node; -} - -int -_string_list_contains (string_list_t *list, const char *member, int *index) -{ - string_node_t *node; - int i; - - if (list == NULL) - return 0; - - for (i = 0, node = list->head; node; i++, node = node->next) { - if (strcmp (node->str, member) == 0) { - if (index) - *index = i; - return 1; - } - } - - return 0; -} - -int -_string_list_length (string_list_t *list) -{ - int length = 0; - string_node_t *node; - - if (list == NULL) - return 0; - - for (node = list->head; node; node = node->next) - length++; - - return length; -} - -int -_string_list_equal (string_list_t *a, string_list_t *b) -{ - string_node_t *node_a, *node_b; - - if (a == NULL && b == NULL) - return 1; - - if (a == NULL || b == NULL) - return 0; - - for (node_a = a->head, node_b = b->head; - node_a && node_b; - node_a = node_a->next, node_b = node_b->next) - { - if (strcmp (node_a->str, node_b->str)) - return 0; - } - - /* Catch the case of lists being different lengths, (which - * would cause the loop above to terminate after the shorter - * list). */ - return node_a == node_b; -} - -argument_list_t * -_argument_list_create (void *ctx) -{ - argument_list_t *list; - - list = ralloc (ctx, argument_list_t); - list->head = NULL; - list->tail = NULL; - - return list; -} - -void -_argument_list_append (argument_list_t *list, token_list_t *argument) -{ - argument_node_t *node; - - node = ralloc (list, argument_node_t); - node->argument = argument; - - node->next = NULL; - - if (list->head == NULL) { - list->head = node; - } else { - list->tail->next = node; - } - - list->tail = node; -} - -int -_argument_list_length (argument_list_t *list) -{ - int length = 0; - argument_node_t *node; - - if (list == NULL) - return 0; - - for (node = list->head; node; node = node->next) - length++; - - return length; -} - -token_list_t * -_argument_list_member_at (argument_list_t *list, int index) -{ - argument_node_t *node; - int i; - - if (list == NULL) - return NULL; - - node = list->head; - for (i = 0; i < index; i++) { - node = node->next; - if (node == NULL) - break; - } - - if (node) - return node->argument; - - return NULL; -} - -/* Note: This function ralloc_steal()s the str pointer. */ -token_t * -_token_create_str (void *ctx, int type, char *str) -{ - token_t *token; - - token = ralloc (ctx, token_t); - token->type = type; - token->value.str = str; - - ralloc_steal (token, str); - - return token; -} - -token_t * -_token_create_ival (void *ctx, int type, int ival) -{ - token_t *token; - - token = ralloc (ctx, token_t); - token->type = type; - token->value.ival = ival; - - return token; -} - -token_list_t * -_token_list_create (void *ctx) -{ - token_list_t *list; - - list = ralloc (ctx, token_list_t); - list->head = NULL; - list->tail = NULL; - list->non_space_tail = NULL; - - return list; -} - -void -_token_list_append (token_list_t *list, token_t *token) -{ - token_node_t *node; - - node = ralloc (list, token_node_t); - node->token = token; - node->next = NULL; - - if (list->head == NULL) { - list->head = node; - } else { - list->tail->next = node; - } - - list->tail = node; - if (token->type != SPACE) - list->non_space_tail = node; -} - -void -_token_list_append_list (token_list_t *list, token_list_t *tail) -{ - if (tail == NULL || tail->head == NULL) - return; - - if (list->head == NULL) { - list->head = tail->head; - } else { - list->tail->next = tail->head; - } - - list->tail = tail->tail; - list->non_space_tail = tail->non_space_tail; -} - -static token_list_t * -_token_list_copy (void *ctx, token_list_t *other) -{ - token_list_t *copy; - token_node_t *node; - - if (other == NULL) - return NULL; - - copy = _token_list_create (ctx); - for (node = other->head; node; node = node->next) { - token_t *new_token = ralloc (copy, token_t); - *new_token = *node->token; - _token_list_append (copy, new_token); - } - - return copy; -} - -static void -_token_list_trim_trailing_space (token_list_t *list) -{ - token_node_t *tail, *next; - - if (list->non_space_tail) { - tail = list->non_space_tail->next; - list->non_space_tail->next = NULL; - list->tail = list->non_space_tail; - - while (tail) { - next = tail->next; - ralloc_free (tail); - tail = next; - } - } -} - -static int -_token_list_is_empty_ignoring_space (token_list_t *l) -{ - token_node_t *n; - - if (l == NULL) - return 1; - - n = l->head; - while (n != NULL && n->token->type == SPACE) - n = n->next; - - return n == NULL; -} - -int -_token_list_equal_ignoring_space (token_list_t *a, token_list_t *b) -{ - token_node_t *node_a, *node_b; - - if (a == NULL || b == NULL) { - int a_empty = _token_list_is_empty_ignoring_space(a); - int b_empty = _token_list_is_empty_ignoring_space(b); - return a_empty == b_empty; - } - - node_a = a->head; - node_b = b->head; - - while (1) - { - if (node_a == NULL && node_b == NULL) - break; - - if (node_a == NULL || node_b == NULL) - return 0; - - if (node_a->token->type == SPACE) { - node_a = node_a->next; - continue; - } - - if (node_b->token->type == SPACE) { - node_b = node_b->next; - continue; - } - - if (node_a->token->type != node_b->token->type) - return 0; - - switch (node_a->token->type) { - case INTEGER: - if (node_a->token->value.ival != - node_b->token->value.ival) - { - return 0; - } - break; - case IDENTIFIER: - case INTEGER_STRING: - case OTHER: - if (strcmp (node_a->token->value.str, - node_b->token->value.str)) - { - return 0; - } - break; - } - - node_a = node_a->next; - node_b = node_b->next; - } - - return 1; -} - -static void -_token_print (char **out, token_t *token) -{ - if (token->type < 256) { - ralloc_asprintf_append (out, "%c", token->type); - return; - } - - switch (token->type) { - case INTEGER: - ralloc_asprintf_append (out, "%" PRIiMAX, token->value.ival); - break; - case IDENTIFIER: - case INTEGER_STRING: - case OTHER: - ralloc_strcat (out, token->value.str); - break; - case SPACE: - ralloc_strcat (out, " "); - break; - case LEFT_SHIFT: - ralloc_strcat (out, "<<"); - break; - case RIGHT_SHIFT: - ralloc_strcat (out, ">>"); - break; - case LESS_OR_EQUAL: - ralloc_strcat (out, "<="); - break; - case GREATER_OR_EQUAL: - ralloc_strcat (out, ">="); - break; - case EQUAL: - ralloc_strcat (out, "=="); - break; - case NOT_EQUAL: - ralloc_strcat (out, "!="); - break; - case AND: - ralloc_strcat (out, "&&"); - break; - case OR: - ralloc_strcat (out, "||"); - break; - case PASTE: - ralloc_strcat (out, "##"); - break; - case COMMA_FINAL: - ralloc_strcat (out, ","); - break; - case PLACEHOLDER: - /* Nothing to print. */ - break; - default: - assert(!"Error: Don't know how to print token."); - break; - } -} - -/* Return a new token (ralloc()ed off of 'token') formed by pasting - * 'token' and 'other'. Note that this function may return 'token' or - * 'other' directly rather than allocating anything new. - * - * Caution: Only very cursory error-checking is performed to see if - * the final result is a valid single token. */ -static token_t * -_token_paste (glcpp_parser_t *parser, token_t *token, token_t *other) -{ - token_t *combined = NULL; - - /* Pasting a placeholder onto anything makes no change. */ - if (other->type == PLACEHOLDER) - return token; - - /* When 'token' is a placeholder, just return 'other'. */ - if (token->type == PLACEHOLDER) - return other; - - /* A very few single-character punctuators can be combined - * with another to form a multi-character punctuator. */ - switch (token->type) { - case '<': - if (other->type == '<') - combined = _token_create_ival (token, LEFT_SHIFT, LEFT_SHIFT); - else if (other->type == '=') - combined = _token_create_ival (token, LESS_OR_EQUAL, LESS_OR_EQUAL); - break; - case '>': - if (other->type == '>') - combined = _token_create_ival (token, RIGHT_SHIFT, RIGHT_SHIFT); - else if (other->type == '=') - combined = _token_create_ival (token, GREATER_OR_EQUAL, GREATER_OR_EQUAL); - break; - case '=': - if (other->type == '=') - combined = _token_create_ival (token, EQUAL, EQUAL); - break; - case '!': - if (other->type == '=') - combined = _token_create_ival (token, NOT_EQUAL, NOT_EQUAL); - break; - case '&': - if (other->type == '&') - combined = _token_create_ival (token, AND, AND); - break; - case '|': - if (other->type == '|') - combined = _token_create_ival (token, OR, OR); - break; - } - - if (combined != NULL) { - /* Inherit the location from the first token */ - combined->location = token->location; - return combined; - } - - /* Two string-valued tokens can usually just be mashed - * together. - * - * XXX: This isn't actually legitimate. Several things here - * should result in a diagnostic since the result cannot be a - * valid, single pre-processing token. For example, pasting - * "123" and "abc" is not legal, but we don't catch that - * here. */ - if ((token->type == IDENTIFIER || token->type == OTHER || token->type == INTEGER_STRING) && - (other->type == IDENTIFIER || other->type == OTHER || other->type == INTEGER_STRING)) - { - char *str; - - str = ralloc_asprintf (token, "%s%s", token->value.str, - other->value.str); - combined = _token_create_str (token, token->type, str); - combined->location = token->location; - return combined; - } - - glcpp_error (&token->location, parser, ""); - ralloc_strcat (&parser->info_log, "Pasting \""); - _token_print (&parser->info_log, token); - ralloc_strcat (&parser->info_log, "\" and \""); - _token_print (&parser->info_log, other); - ralloc_strcat (&parser->info_log, "\" does not give a valid preprocessing token.\n"); - - return token; -} - -static void -_token_list_print (glcpp_parser_t *parser, token_list_t *list) -{ - token_node_t *node; - - if (list == NULL) - return; - - for (node = list->head; node; node = node->next) - _token_print (&parser->output, node->token); -} - -void -yyerror (YYLTYPE *locp, glcpp_parser_t *parser, const char *error) -{ - glcpp_error(locp, parser, "%s", error); -} - -static void add_builtin_define(glcpp_parser_t *parser, - const char *name, int value) -{ - token_t *tok; - token_list_t *list; - - tok = _token_create_ival (parser, INTEGER, value); - - list = _token_list_create(parser); - _token_list_append(list, tok); - _define_object_macro(parser, NULL, name, list); -} - -glcpp_parser_t * -glcpp_parser_create (const struct gl_extensions *extensions, int api) -{ - glcpp_parser_t *parser; - int language_version; - - parser = ralloc (NULL, glcpp_parser_t); - - glcpp_lex_init_extra (parser, &parser->scanner); - parser->defines = hash_table_ctor (32, hash_table_string_hash, - hash_table_string_compare); - parser->active = NULL; - parser->lexing_if = 0; - parser->space_tokens = 1; - parser->newline_as_space = 0; - parser->in_control_line = 0; - parser->paren_count = 0; - - parser->skip_stack = NULL; - - parser->lex_from_list = NULL; - parser->lex_from_node = NULL; - - parser->output = ralloc_strdup(parser, ""); - parser->info_log = ralloc_strdup(parser, ""); - parser->error = 0; - - /* Add pre-defined macros. */ - add_builtin_define(parser, "GL_ARB_draw_buffers", 1); - add_builtin_define(parser, "GL_ARB_texture_rectangle", 1); - - if (api == API_OPENGLES2) - add_builtin_define(parser, "GL_ES", 1); - - if (extensions != NULL) { - if (extensions->EXT_texture_array) { - add_builtin_define(parser, "GL_EXT_texture_array", 1); - } - - if (extensions->ARB_fragment_coord_conventions) - add_builtin_define(parser, "GL_ARB_fragment_coord_conventions", - 1); - - if (extensions->ARB_explicit_attrib_location) - add_builtin_define(parser, "GL_ARB_explicit_attrib_location", 1); - - if (extensions->ARB_shader_texture_lod) - add_builtin_define(parser, "GL_ARB_shader_texture_lod", 1); - - if (extensions->ARB_draw_instanced) - add_builtin_define(parser, "GL_ARB_draw_instanced", 1); - - if (extensions->ARB_conservative_depth) { - add_builtin_define(parser, "GL_AMD_conservative_depth", 1); - add_builtin_define(parser, "GL_ARB_conservative_depth", 1); - } - - if (extensions->OES_EGL_image_external) - add_builtin_define(parser, "GL_OES_EGL_image_external", 1); - } - - language_version = 110; - add_builtin_define(parser, "__VERSION__", language_version); - - return parser; -} - -int -glcpp_parser_parse (glcpp_parser_t *parser) -{ - return yyparse (parser); -} - -void -glcpp_parser_destroy (glcpp_parser_t *parser) -{ - glcpp_lex_destroy (parser->scanner); - hash_table_dtor (parser->defines); - ralloc_free (parser); -} - -typedef enum function_status -{ - FUNCTION_STATUS_SUCCESS, - FUNCTION_NOT_A_FUNCTION, - FUNCTION_UNBALANCED_PARENTHESES -} function_status_t; - -/* Find a set of function-like macro arguments by looking for a - * balanced set of parentheses. - * - * When called, 'node' should be the opening-parenthesis token, (or - * perhaps preceeding SPACE tokens). Upon successful return *last will - * be the last consumed node, (corresponding to the closing right - * parenthesis). - * - * Return values: - * - * FUNCTION_STATUS_SUCCESS: - * - * Successfully parsed a set of function arguments. - * - * FUNCTION_NOT_A_FUNCTION: - * - * Macro name not followed by a '('. This is not an error, but - * simply that the macro name should be treated as a non-macro. - * - * FUNCTION_UNBALANCED_PARENTHESES - * - * Macro name is not followed by a balanced set of parentheses. - */ -static function_status_t -_arguments_parse (argument_list_t *arguments, - token_node_t *node, - token_node_t **last) -{ - token_list_t *argument; - int paren_count; - - node = node->next; - - /* Ignore whitespace before first parenthesis. */ - while (node && node->token->type == SPACE) - node = node->next; - - if (node == NULL || node->token->type != '(') - return FUNCTION_NOT_A_FUNCTION; - - node = node->next; - - argument = _token_list_create (arguments); - _argument_list_append (arguments, argument); - - for (paren_count = 1; node; node = node->next) { - if (node->token->type == '(') - { - paren_count++; - } - else if (node->token->type == ')') - { - paren_count--; - if (paren_count == 0) - break; - } - - if (node->token->type == ',' && - paren_count == 1) - { - _token_list_trim_trailing_space (argument); - argument = _token_list_create (arguments); - _argument_list_append (arguments, argument); - } - else { - if (argument->head == NULL) { - /* Don't treat initial whitespace as - * part of the arguement. */ - if (node->token->type == SPACE) - continue; - } - _token_list_append (argument, node->token); - } - } - - if (paren_count) - return FUNCTION_UNBALANCED_PARENTHESES; - - *last = node; - - return FUNCTION_STATUS_SUCCESS; -} - -static token_list_t * -_token_list_create_with_one_space (void *ctx) -{ - token_list_t *list; - token_t *space; - - list = _token_list_create (ctx); - space = _token_create_ival (list, SPACE, SPACE); - _token_list_append (list, space); - - return list; -} - -static void -_glcpp_parser_expand_if (glcpp_parser_t *parser, int type, token_list_t *list) -{ - token_list_t *expanded; - token_t *token; - - expanded = _token_list_create (parser); - token = _token_create_ival (parser, type, type); - _token_list_append (expanded, token); - _glcpp_parser_expand_token_list (parser, list); - _token_list_append_list (expanded, list); - glcpp_parser_lex_from (parser, expanded); -} - -static void -_glcpp_parser_apply_pastes (glcpp_parser_t *parser, token_list_t *list) -{ - token_node_t *node; - - node = list->head; - while (node) - { - token_node_t *next_non_space; - - /* Look ahead for a PASTE token, skipping space. */ - next_non_space = node->next; - while (next_non_space && next_non_space->token->type == SPACE) - next_non_space = next_non_space->next; - - if (next_non_space == NULL) - break; - - if (next_non_space->token->type != PASTE) { - node = next_non_space; - continue; - } - - /* Now find the next non-space token after the PASTE. */ - next_non_space = next_non_space->next; - while (next_non_space && next_non_space->token->type == SPACE) - next_non_space = next_non_space->next; - - if (next_non_space == NULL) { - yyerror (&node->token->location, parser, "'##' cannot appear at either end of a macro expansion\n"); - return; - } - - node->token = _token_paste (parser, node->token, next_non_space->token); - node->next = next_non_space->next; - if (next_non_space == list->tail) - list->tail = node; - } - - list->non_space_tail = list->tail; -} - -/* This is a helper function that's essentially part of the - * implementation of _glcpp_parser_expand_node. It shouldn't be called - * except for by that function. - * - * Returns NULL if node is a simple token with no expansion, (that is, - * although 'node' corresponds to an identifier defined as a - * function-like macro, it is not followed with a parenthesized - * argument list). - * - * Compute the complete expansion of node (which is a function-like - * macro) and subsequent nodes which are arguments. - * - * Returns the token list that results from the expansion and sets - * *last to the last node in the list that was consumed by the - * expansion. Specifically, *last will be set as follows: as the - * token of the closing right parenthesis. - */ -static token_list_t * -_glcpp_parser_expand_function (glcpp_parser_t *parser, - token_node_t *node, - token_node_t **last) - -{ - macro_t *macro; - const char *identifier; - argument_list_t *arguments; - function_status_t status; - token_list_t *substituted; - int parameter_index; - - identifier = node->token->value.str; - - macro = hash_table_find (parser->defines, identifier); - - assert (macro->is_function); - - arguments = _argument_list_create (parser); - status = _arguments_parse (arguments, node, last); - - switch (status) { - case FUNCTION_STATUS_SUCCESS: - break; - case FUNCTION_NOT_A_FUNCTION: - return NULL; - case FUNCTION_UNBALANCED_PARENTHESES: - glcpp_error (&node->token->location, parser, "Macro %s call has unbalanced parentheses\n", identifier); - return NULL; - } - - /* Replace a macro defined as empty with a SPACE token. */ - if (macro->replacements == NULL) { - ralloc_free (arguments); - return _token_list_create_with_one_space (parser); - } - - if (! ((_argument_list_length (arguments) == - _string_list_length (macro->parameters)) || - (_string_list_length (macro->parameters) == 0 && - _argument_list_length (arguments) == 1 && - arguments->head->argument->head == NULL))) - { - glcpp_error (&node->token->location, parser, - "Error: macro %s invoked with %d arguments (expected %d)\n", - identifier, - _argument_list_length (arguments), - _string_list_length (macro->parameters)); - return NULL; - } - - /* Perform argument substitution on the replacement list. */ - substituted = _token_list_create (arguments); - - for (node = macro->replacements->head; node; node = node->next) - { - if (node->token->type == IDENTIFIER && - _string_list_contains (macro->parameters, - node->token->value.str, - ¶meter_index)) - { - token_list_t *argument; - argument = _argument_list_member_at (arguments, - parameter_index); - /* Before substituting, we expand the argument - * tokens, or append a placeholder token for - * an empty argument. */ - if (argument->head) { - token_list_t *expanded_argument; - expanded_argument = _token_list_copy (parser, - argument); - _glcpp_parser_expand_token_list (parser, - expanded_argument); - _token_list_append_list (substituted, - expanded_argument); - } else { - token_t *new_token; - - new_token = _token_create_ival (substituted, - PLACEHOLDER, - PLACEHOLDER); - _token_list_append (substituted, new_token); - } - } else { - _token_list_append (substituted, node->token); - } - } - - /* After argument substitution, and before further expansion - * below, implement token pasting. */ - - _token_list_trim_trailing_space (substituted); - - _glcpp_parser_apply_pastes (parser, substituted); - - return substituted; -} - -/* Compute the complete expansion of node, (and subsequent nodes after - * 'node' in the case that 'node' is a function-like macro and - * subsequent nodes are arguments). - * - * Returns NULL if node is a simple token with no expansion. - * - * Otherwise, returns the token list that results from the expansion - * and sets *last to the last node in the list that was consumed by - * the expansion. Specifically, *last will be set as follows: - * - * As 'node' in the case of object-like macro expansion. - * - * As the token of the closing right parenthesis in the case of - * function-like macro expansion. - */ -static token_list_t * -_glcpp_parser_expand_node (glcpp_parser_t *parser, - token_node_t *node, - token_node_t **last) -{ - token_t *token = node->token; - const char *identifier; - macro_t *macro; - - /* We only expand identifiers */ - if (token->type != IDENTIFIER) { - /* We change any COMMA into a COMMA_FINAL to prevent - * it being mistaken for an argument separator - * later. */ - if (token->type == ',') { - token->type = COMMA_FINAL; - token->value.ival = COMMA_FINAL; - } - - return NULL; - } - - /* Look up this identifier in the hash table. */ - identifier = token->value.str; - macro = hash_table_find (parser->defines, identifier); - - /* Not a macro, so no expansion needed. */ - if (macro == NULL) - return NULL; - - /* Finally, don't expand this macro if we're already actively - * expanding it, (to avoid infinite recursion). */ - if (_parser_active_list_contains (parser, identifier)) { - /* We change the token type here from IDENTIFIER to - * OTHER to prevent any future expansion of this - * unexpanded token. */ - char *str; - token_list_t *expansion; - token_t *final; - - str = ralloc_strdup (parser, token->value.str); - final = _token_create_str (parser, OTHER, str); - expansion = _token_list_create (parser); - _token_list_append (expansion, final); - *last = node; - return expansion; - } - - if (! macro->is_function) - { - token_list_t *replacement; - *last = node; - - /* Replace a macro defined as empty with a SPACE token. */ - if (macro->replacements == NULL) - return _token_list_create_with_one_space (parser); - - replacement = _token_list_copy (parser, macro->replacements); - _glcpp_parser_apply_pastes (parser, replacement); - return replacement; - } - - return _glcpp_parser_expand_function (parser, node, last); -} - -/* Push a new identifier onto the parser's active list. - * - * Here, 'marker' is the token node that appears in the list after the - * expansion of 'identifier'. That is, when the list iterator begins - * examining 'marker', then it is time to pop this node from the - * active stack. - */ -static void -_parser_active_list_push (glcpp_parser_t *parser, - const char *identifier, - token_node_t *marker) -{ - active_list_t *node; - - node = ralloc (parser->active, active_list_t); - node->identifier = ralloc_strdup (node, identifier); - node->marker = marker; - node->next = parser->active; - - parser->active = node; -} - -static void -_parser_active_list_pop (glcpp_parser_t *parser) -{ - active_list_t *node = parser->active; - - if (node == NULL) { - parser->active = NULL; - return; - } - - node = parser->active->next; - ralloc_free (parser->active); - - parser->active = node; -} - -static int -_parser_active_list_contains (glcpp_parser_t *parser, const char *identifier) -{ - active_list_t *node; - - if (parser->active == NULL) - return 0; - - for (node = parser->active; node; node = node->next) - if (strcmp (node->identifier, identifier) == 0) - return 1; - - return 0; -} - -/* Walk over the token list replacing nodes with their expansion. - * Whenever nodes are expanded the walking will walk over the new - * nodes, continuing to expand as necessary. The results are placed in - * 'list' itself; - */ -static void -_glcpp_parser_expand_token_list (glcpp_parser_t *parser, - token_list_t *list) -{ - token_node_t *node_prev; - token_node_t *node, *last = NULL; - token_list_t *expansion; - active_list_t *active_initial = parser->active; - - if (list == NULL) - return; - - _token_list_trim_trailing_space (list); - - node_prev = NULL; - node = list->head; - - while (node) { - - while (parser->active && parser->active->marker == node) - _parser_active_list_pop (parser); - - expansion = _glcpp_parser_expand_node (parser, node, &last); - if (expansion) { - token_node_t *n; - - for (n = node; n != last->next; n = n->next) - while (parser->active && - parser->active->marker == n) - { - _parser_active_list_pop (parser); - } - - _parser_active_list_push (parser, - node->token->value.str, - last->next); - - /* Splice expansion into list, supporting a - * simple deletion if the expansion is - * empty. */ - if (expansion->head) { - if (node_prev) - node_prev->next = expansion->head; - else - list->head = expansion->head; - expansion->tail->next = last->next; - if (last == list->tail) - list->tail = expansion->tail; - } else { - if (node_prev) - node_prev->next = last->next; - else - list->head = last->next; - if (last == list->tail) - list->tail = NULL; - } - } else { - node_prev = node; - } - node = node_prev ? node_prev->next : list->head; - } - - /* Remove any lingering effects of this invocation on the - * active list. That is, pop until the list looks like it did - * at the beginning of this function. */ - while (parser->active && parser->active != active_initial) - _parser_active_list_pop (parser); - - list->non_space_tail = list->tail; -} - -void -_glcpp_parser_print_expanded_token_list (glcpp_parser_t *parser, - token_list_t *list) -{ - if (list == NULL) - return; - - _glcpp_parser_expand_token_list (parser, list); - - _token_list_trim_trailing_space (list); - - _token_list_print (parser, list); -} - -static void -_check_for_reserved_macro_name (glcpp_parser_t *parser, YYLTYPE *loc, - const char *identifier) -{ - /* According to the GLSL specification, macro names starting with "__" - * or "GL_" are reserved for future use. So, don't allow them. - */ - if (strstr(identifier, "__")) { - glcpp_error (loc, parser, "Macro names containing \"__\" are reserved.\n"); - } - if (strncmp(identifier, "GL_", 3) == 0) { - glcpp_error (loc, parser, "Macro names starting with \"GL_\" are reserved.\n"); - } -} - -static int -_macro_equal (macro_t *a, macro_t *b) -{ - if (a->is_function != b->is_function) - return 0; - - if (a->is_function) { - if (! _string_list_equal (a->parameters, b->parameters)) - return 0; - } - - return _token_list_equal_ignoring_space (a->replacements, - b->replacements); -} - -void -_define_object_macro (glcpp_parser_t *parser, - YYLTYPE *loc, - const char *identifier, - token_list_t *replacements) -{ - macro_t *macro, *previous; - - if (loc != NULL) - _check_for_reserved_macro_name(parser, loc, identifier); - - macro = ralloc (parser, macro_t); - - macro->is_function = 0; - macro->parameters = NULL; - macro->identifier = ralloc_strdup (macro, identifier); - macro->replacements = replacements; - ralloc_steal (macro, replacements); - - previous = hash_table_find (parser->defines, identifier); - if (previous) { - if (_macro_equal (macro, previous)) { - ralloc_free (macro); - return; - } - glcpp_error (loc, parser, "Redefinition of macro %s\n", - identifier); - } - - hash_table_insert (parser->defines, macro, identifier); -} - -void -_define_function_macro (glcpp_parser_t *parser, - YYLTYPE *loc, - const char *identifier, - string_list_t *parameters, - token_list_t *replacements) -{ - macro_t *macro, *previous; - - _check_for_reserved_macro_name(parser, loc, identifier); - - macro = ralloc (parser, macro_t); - ralloc_steal (macro, parameters); - ralloc_steal (macro, replacements); - - macro->is_function = 1; - macro->parameters = parameters; - macro->identifier = ralloc_strdup (macro, identifier); - macro->replacements = replacements; - previous = hash_table_find (parser->defines, identifier); - if (previous) { - if (_macro_equal (macro, previous)) { - ralloc_free (macro); - return; - } - glcpp_error (loc, parser, "Redefinition of macro %s\n", - identifier); - } - - hash_table_insert (parser->defines, macro, identifier); -} - -static int -glcpp_parser_lex (YYSTYPE *yylval, YYLTYPE *yylloc, glcpp_parser_t *parser) -{ - token_node_t *node; - int ret; - - if (parser->lex_from_list == NULL) { - ret = glcpp_lex (yylval, yylloc, parser->scanner); - - /* XXX: This ugly block of code exists for the sole - * purpose of converting a NEWLINE token into a SPACE - * token, but only in the case where we have seen a - * function-like macro name, but have not yet seen its - * closing parenthesis. - * - * There's perhaps a more compact way to do this with - * mid-rule actions in the grammar. - * - * I'm definitely not pleased with the complexity of - * this code here. - */ - if (parser->newline_as_space) - { - if (ret == '(') { - parser->paren_count++; - } else if (ret == ')') { - parser->paren_count--; - if (parser->paren_count == 0) - parser->newline_as_space = 0; - } else if (ret == NEWLINE) { - ret = SPACE; - } else if (ret != SPACE) { - if (parser->paren_count == 0) - parser->newline_as_space = 0; - } - } - else if (parser->in_control_line) - { - if (ret == NEWLINE) - parser->in_control_line = 0; - } - else if (ret == HASH_DEFINE_OBJ || ret == HASH_DEFINE_FUNC || - ret == HASH_UNDEF || ret == HASH_IF || - ret == HASH_IFDEF || ret == HASH_IFNDEF || - ret == HASH_ELIF || ret == HASH_ELSE || - ret == HASH_ENDIF || ret == HASH) - { - parser->in_control_line = 1; - } - else if (ret == IDENTIFIER) - { - macro_t *macro; - macro = hash_table_find (parser->defines, - yylval->str); - if (macro && macro->is_function) { - parser->newline_as_space = 1; - parser->paren_count = 0; - } - } - - return ret; - } - - node = parser->lex_from_node; - - if (node == NULL) { - ralloc_free (parser->lex_from_list); - parser->lex_from_list = NULL; - return NEWLINE; - } - - *yylval = node->token->value; - ret = node->token->type; - - parser->lex_from_node = node->next; - - return ret; -} - -static void -glcpp_parser_lex_from (glcpp_parser_t *parser, token_list_t *list) -{ - token_node_t *node; - - assert (parser->lex_from_list == NULL); - - /* Copy list, eliminating any space tokens. */ - parser->lex_from_list = _token_list_create (parser); - - for (node = list->head; node; node = node->next) { - if (node->token->type == SPACE) - continue; - _token_list_append (parser->lex_from_list, node->token); - } - - ralloc_free (list); - - parser->lex_from_node = parser->lex_from_list->head; - - /* It's possible the list consisted of nothing but whitespace. */ - if (parser->lex_from_node == NULL) { - ralloc_free (parser->lex_from_list); - parser->lex_from_list = NULL; - } -} - -static void -_glcpp_parser_skip_stack_push_if (glcpp_parser_t *parser, YYLTYPE *loc, - int condition) -{ - skip_type_t current = SKIP_NO_SKIP; - skip_node_t *node; - - if (parser->skip_stack) - current = parser->skip_stack->type; - - node = ralloc (parser, skip_node_t); - node->loc = *loc; - - if (current == SKIP_NO_SKIP) { - if (condition) - node->type = SKIP_NO_SKIP; - else - node->type = SKIP_TO_ELSE; - } else { - node->type = SKIP_TO_ENDIF; - } - - node->next = parser->skip_stack; - parser->skip_stack = node; -} - -static void -_glcpp_parser_skip_stack_change_if (glcpp_parser_t *parser, YYLTYPE *loc, - const char *type, int condition) -{ - if (parser->skip_stack == NULL) { - glcpp_error (loc, parser, "%s without #if\n", type); - return; - } - - if (parser->skip_stack->type == SKIP_TO_ELSE) { - if (condition) - parser->skip_stack->type = SKIP_NO_SKIP; - } else { - parser->skip_stack->type = SKIP_TO_ENDIF; - } -} - -static void -_glcpp_parser_skip_stack_pop (glcpp_parser_t *parser, YYLTYPE *loc) -{ - skip_node_t *node; - - if (parser->skip_stack == NULL) { - glcpp_error (loc, parser, "#endif without #if\n"); - return; - } - - node = parser->skip_stack; - parser->skip_stack = node->next; - ralloc_free (node); -} - diff --git a/dll/opengl/mesa/generated/glsl/glcpp/glcpp-parse.h b/dll/opengl/mesa/generated/glsl/glcpp/glcpp-parse.h deleted file mode 100644 index 9fbe4d98974..00000000000 --- a/dll/opengl/mesa/generated/glsl/glcpp/glcpp-parse.h +++ /dev/null @@ -1,99 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.5. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - COMMA_FINAL = 258, - DEFINED = 259, - ELIF_EXPANDED = 260, - HASH = 261, - HASH_DEFINE_FUNC = 262, - HASH_DEFINE_OBJ = 263, - HASH_ELIF = 264, - HASH_ELSE = 265, - HASH_ENDIF = 266, - HASH_IF = 267, - HASH_IFDEF = 268, - HASH_IFNDEF = 269, - HASH_UNDEF = 270, - HASH_VERSION = 271, - IDENTIFIER = 272, - IF_EXPANDED = 273, - INTEGER = 274, - INTEGER_STRING = 275, - NEWLINE = 276, - OTHER = 277, - PLACEHOLDER = 278, - SPACE = 279, - PASTE = 280, - OR = 281, - AND = 282, - NOT_EQUAL = 283, - EQUAL = 284, - GREATER_OR_EQUAL = 285, - LESS_OR_EQUAL = 286, - RIGHT_SHIFT = 287, - LEFT_SHIFT = 288, - UNARY = 289 - }; -#endif - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - - - -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 -#endif - - - diff --git a/dll/opengl/mesa/generated/glsl/glsl_lexer.cpp b/dll/opengl/mesa/generated/glsl/glsl_lexer.cpp deleted file mode 100644 index 20f6ef554a7..00000000000 --- a/dll/opengl/mesa/generated/glsl/glsl_lexer.cpp +++ /dev/null @@ -1,3796 +0,0 @@ - -#line 3 "" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yyg->yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yyg->yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE _mesa_glsl_restart(yyin ,yyscanner ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#define YY_BUF_SIZE 16384 -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via _mesa_glsl_restart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] - -void _mesa_glsl_restart (FILE *input_file ,yyscan_t yyscanner ); -void _mesa_glsl__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE _mesa_glsl__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void _mesa_glsl__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void _mesa_glsl__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void _mesa_glsl_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void _mesa_glsl_pop_buffer_state (yyscan_t yyscanner ); - -static void _mesa_glsl_ensure_buffer_stack (yyscan_t yyscanner ); -static void _mesa_glsl__load_buffer_state (yyscan_t yyscanner ); -static void _mesa_glsl__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); - -#define YY_FLUSH_BUFFER _mesa_glsl__flush_buffer(YY_CURRENT_BUFFER ,yyscanner) - -YY_BUFFER_STATE _mesa_glsl__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE _mesa_glsl__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE _mesa_glsl__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); - -void *_mesa_glsl_alloc (yy_size_t ,yyscan_t yyscanner ); -void *_mesa_glsl_realloc (void *,yy_size_t ,yyscan_t yyscanner ); -void _mesa_glsl_free (void * ,yyscan_t yyscanner ); - -#define yy_new_buffer _mesa_glsl__create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - _mesa_glsl_ensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - _mesa_glsl_ensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define _mesa_glsl_wrap(n) 1 -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -typedef int yy_state_type; - -#define yytext_ptr yytext_r - -static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); -static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 211 -#define YY_END_OF_BUFFER 212 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[847] = - { 0, - 0, 0, 16, 16, 0, 0, 212, 210, 1, 21, - 210, 210, 210, 210, 210, 210, 210, 210, 121, 119, - 210, 210, 210, 209, 210, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 210, 1, 210, 211, 16, - 20, 211, 19, 17, 18, 14, 13, 1, 103, 112, - 104, 115, 109, 98, 111, 99, 118, 123, 110, 124, - 121, 0, 0, 126, 121, 0, 119, 119, 107, 100, - 102, 101, 108, 209, 116, 106, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 30, 209, - - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 34, 209, 209, 61, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 117, - 105, 1, 0, 0, 2, 0, 0, 0, 0, 16, - 15, 19, 18, 0, 123, 122, 0, 124, 0, 125, - 120, 113, 114, 209, 129, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 33, 209, 209, 209, - - 209, 209, 209, 209, 209, 209, 209, 26, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 62, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 0, 0, 0, 0, 15, 0, 123, 0, 122, 0, - 124, 125, 120, 209, 209, 24, 209, 209, 176, 169, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 32, - 132, 209, 209, 209, 209, 68, 209, 209, 137, 151, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - - 209, 209, 148, 172, 49, 50, 51, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 135, 127, 209, - 209, 27, 209, 209, 209, 209, 209, 209, 209, 46, - 47, 48, 96, 209, 209, 0, 0, 0, 0, 0, - 122, 209, 209, 28, 37, 38, 39, 209, 130, 209, - 23, 209, 209, 209, 209, 159, 160, 161, 209, 128, - 209, 152, 25, 162, 163, 164, 174, 156, 157, 158, - 209, 209, 209, 63, 154, 209, 209, 209, 40, 41, - 42, 209, 209, 209, 209, 209, 209, 209, 209, 209, - - 209, 209, 209, 209, 209, 209, 209, 149, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 131, 209, - 209, 171, 43, 44, 45, 209, 209, 31, 0, 0, - 0, 0, 179, 209, 209, 177, 209, 209, 209, 150, - 145, 182, 209, 209, 209, 209, 209, 209, 140, 209, - 209, 209, 97, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 209, 209, 209, 209, 155, 136, 209, 209, - 143, 36, 209, 209, 168, 69, 144, 95, 180, 138, - 209, 209, 209, 209, 209, 209, 209, 209, 0, 0, - 0, 0, 209, 209, 209, 139, 35, 209, 209, 209, - - 209, 209, 209, 183, 184, 185, 209, 209, 209, 209, - 209, 173, 209, 209, 209, 209, 209, 209, 209, 209, - 133, 209, 209, 209, 209, 209, 64, 209, 209, 65, - 209, 0, 0, 0, 0, 0, 209, 66, 29, 146, - 187, 188, 189, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 141, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 134, 191, 192, 193, - 209, 209, 153, 209, 142, 0, 0, 6, 0, 0, - 0, 12, 3, 22, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 186, 147, 67, 209, 209, 209, 209, - - 170, 209, 178, 175, 208, 71, 72, 73, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 0, - 0, 0, 0, 0, 0, 0, 209, 209, 209, 190, - 209, 209, 209, 209, 209, 82, 83, 84, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 194, 88, 89, 90, 209, 4, 0, 5, - 0, 0, 0, 0, 0, 0, 209, 209, 209, 209, - 209, 209, 209, 205, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 74, 209, 209, 209, 209, - 209, 209, 209, 0, 0, 0, 0, 209, 209, 206, - - 195, 209, 196, 209, 209, 209, 85, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 207, - 209, 209, 91, 0, 0, 0, 197, 198, 209, 201, - 209, 202, 209, 209, 70, 209, 209, 209, 165, 209, - 166, 181, 209, 209, 199, 200, 209, 209, 0, 0, - 0, 209, 209, 209, 209, 75, 209, 76, 209, 209, - 209, 209, 209, 209, 0, 0, 0, 0, 209, 209, - 86, 87, 209, 77, 209, 209, 78, 209, 209, 92, - 93, 0, 0, 0, 0, 209, 209, 209, 209, 209, - 209, 209, 0, 0, 0, 0, 209, 209, 209, 209, - - 209, 79, 209, 0, 0, 0, 7, 0, 0, 203, - 204, 209, 209, 209, 94, 0, 0, 8, 0, 0, - 209, 209, 167, 0, 0, 0, 80, 81, 0, 0, - 0, 9, 0, 0, 10, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 11, 0 - } ; - -static yyconst flex_int32_t yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 5, 1, 6, 1, 7, 8, 1, 9, - 10, 11, 12, 1, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 21, 21, 22, 22, 23, 1, 24, - 25, 26, 1, 1, 27, 28, 29, 30, 31, 32, - 33, 34, 34, 34, 34, 35, 34, 34, 36, 34, - 34, 37, 38, 39, 40, 34, 34, 41, 34, 34, - 1, 1, 1, 42, 43, 1, 44, 45, 46, 47, - - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 34, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 1, 69, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst flex_int32_t yy_meta[70] = - { 0, - 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, - 3, 3, 1, 1, 1, 1, 4, 4, 4, 4, - 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 1, 5, 4, 4, 4, 4, 3, 3, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 1 - } ; - -static yyconst flex_int16_t yy_base[856] = - { 0, - 0, 68, 74, 0, 1223, 1222, 1224, 1227, 69, 1227, - 1198, 1197, 136, 1196, 133, 134, 132, 1195, 148, 201, - 131, 1194, 146, 0, 121, 114, 123, 146, 134, 136, - 172, 1160, 161, 182, 141, 129, 151, 1154, 140, 187, - 196, 203, 205, 223, 1165, 187, 204, 270, 1227, 224, - 1227, 1200, 258, 1227, 0, 1227, 1227, 240, 1227, 1227, - 1227, 1227, 1227, 1227, 1227, 1227, 1227, 251, 1227, 253, - 224, 321, 275, 1227, 1227, 0, 0, 1227, 1189, 1227, - 1227, 1227, 1188, 0, 1227, 1227, 1150, 1155, 1148, 1151, - 1160, 1159, 1145, 1148, 1160, 247, 1154, 1141, 1138, 1152, - - 1138, 1135, 1135, 1141, 243, 261, 1135, 1146, 1131, 1137, - 1141, 1142, 0, 1133, 1144, 252, 1143, 1138, 1118, 172, - 1122, 1136, 1126, 201, 1119, 260, 1132, 1134, 1116, 1112, - 1120, 1117, 1106, 1115, 264, 1113, 1119, 1114, 1117, 1105, - 1108, 256, 265, 271, 1118, 1105, 1118, 234, 1111, 1227, - 1227, 326, 319, 342, 1227, 1096, 1109, 1100, 1111, 329, - 0, 338, 0, 391, 1227, 315, 402, 1227, 409, 416, - 287, 1227, 1227, 1106, 0, 1097, 1101, 1111, 1108, 300, - 1091, 1091, 1095, 304, 1106, 1103, 1103, 1101, 1098, 1089, - 1096, 1082, 1080, 1093, 1078, 1095, 0, 1092, 1079, 1087, - - 1084, 1088, 1089, 1082, 1079, 1067, 1066, 1080, 1083, 1070, - 1079, 1066, 1073, 1063, 353, 1069, 1072, 1062, 1070, 1058, - 1062, 1053, 1068, 1058, 1049, 1068, 1051, 1049, 1060, 1049, - 1044, 1042, 1056, 1041, 1043, 1040, 1052, 1051, 1054, 1035, - 319, 1044, 1039, 1037, 1047, 1025, 361, 1044, 1046, 1034, - 1026, 1030, 1042, 1025, 0, 423, 434, 451, 1227, 458, - 468, 1227, 1227, 1020, 1031, 0, 1028, 366, 0, 0, - 1021, 1019, 1021, 1016, 1025, 1013, 1031, 1019, 369, 0, - 0, 1013, 1024, 1023, 1023, 0, 1007, 373, 0, 0, - 1009, 376, 1017, 1018, 1008, 1002, 1001, 1002, 1001, 1001, - - 380, 996, 0, 0, 992, 991, 990, 992, 993, 998, - 992, 988, 1002, 997, 996, 995, 986, 989, 989, 981, - 984, 979, 988, 993, 978, 991, 981, 0, 0, 988, - 984, 0, 975, 975, 981, 971, 979, 439, 976, 0, - 0, 0, 0, 965, 978, 977, 976, 973, 961, 475, - 486, 973, 975, 0, 0, 0, 0, 961, 0, 961, - 0, 960, 961, 955, 966, 0, 0, 0, 956, 0, - 952, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 963, 492, 962, 0, 0, 960, 956, 952, 0, 0, - 0, 944, 442, 494, 504, 949, 945, 951, 941, 939, - - 953, 937, 937, 951, 939, 951, 946, 0, 944, 941, - 945, 928, 930, 937, 943, 938, 937, 924, 0, 926, - 927, 0, 0, 0, 0, 924, 928, 0, 922, 976, - 921, 924, 0, 912, 922, 0, 910, 910, 924, 0, - 926, 0, 508, 939, 938, 937, 903, 902, 0, 920, - 919, 914, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 902, 916, 902, 899, 0, 0, 905, 904, - 0, 0, 902, 894, 0, 0, 0, 0, 0, 0, - 891, 903, 511, 895, 902, 901, 898, 892, 885, 529, - 901, 886, 881, 895, 893, 0, 0, 885, 909, 908, - - 907, 873, 872, 378, 505, 0, 885, 888, 886, 874, - 870, 0, 883, 880, 879, 868, 867, 866, 535, 875, - 0, 892, 891, 890, 856, 855, 0, 870, 856, 0, - 867, 862, 539, 565, 911, 855, 863, 0, 0, 0, - 883, 882, 0, 859, 862, 846, 854, 844, 852, 853, - 853, 852, 837, 559, 850, 0, 851, 839, 838, 834, - 863, 862, 861, 827, 826, 822, 0, 860, 859, 0, - 836, 839, 0, 572, 0, 825, 590, 1227, 597, 0, - 617, 593, 1227, 0, 822, 821, 831, 831, 818, 833, - 816, 831, 826, 0, 0, 0, 843, 842, 841, 807, - - 0, 807, 0, 0, 0, 506, 534, 831, 818, 821, - 803, 804, 803, 813, 813, 830, 829, 828, 794, 799, - 625, 651, 373, 816, 806, 794, 792, 791, 802, 0, - 805, 801, 803, 799, 785, 817, 816, 0, 797, 789, - 780, 788, 778, 789, 785, 787, 785, 785, 784, 771, - 770, 781, 0, 801, 800, 0, 781, 1227, 444, 1227, - 658, 0, 678, 795, 779, 761, 778, 777, 760, 752, - 760, 750, 758, 0, 755, 754, 765, 748, 751, 766, - 749, 762, 763, 760, 757, 766, 743, 758, 757, 740, - 739, 738, 749, 479, 763, 732, 742, 726, 725, 0, - - 753, 725, 751, 723, 727, 726, 0, 737, 740, 736, - 738, 719, 733, 717, 718, 726, 719, 708, 707, 0, - 713, 712, 0, 736, 720, 713, 0, 0, 717, 0, - 716, 0, 722, 721, 0, 697, 705, 695, 723, 702, - 0, 0, 715, 714, 0, 0, 713, 712, 753, 560, - 702, 709, 708, 684, 683, 711, 683, 709, 695, 680, - 697, 688, 675, 674, 155, 594, 359, 672, 692, 691, - 0, 0, 686, 0, 685, 691, 0, 676, 690, 0, - 0, 652, 517, 516, 658, 631, 630, 643, 28, 127, - 113, 224, 204, 287, 592, 595, 284, 286, 335, 355, - - 391, 0, 460, 455, 619, 620, 1227, 623, 568, 0, - 0, 443, 457, 451, 0, 474, 645, 1227, 646, 600, - 473, 509, 0, 527, 549, 648, 0, 0, 579, 654, - 680, 1227, 567, 682, 1227, 590, 684, 699, 661, 663, - 604, 607, 700, 701, 1227, 1227, 711, 714, 717, 680, - 682, 720, 724, 727, 729 - } ; - -static yyconst flex_int16_t yy_def[856] = - { 0, - 846, 1, 846, 3, 847, 847, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 848, 846, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 849, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 850, 846, 851, - 19, 846, 846, 846, 846, 852, 20, 846, 846, 846, - 846, 846, 846, 848, 846, 846, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 853, 846, 849, 846, 846, 851, 846, 846, 846, 846, - 852, 846, 846, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 846, 846, 846, 846, 853, 846, 846, 846, 846, 846, - 846, 846, 846, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 846, 846, 846, 846, 846, - 846, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 846, 846, - 846, 846, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 846, 846, - 846, 846, 848, 848, 848, 848, 848, 848, 848, 848, - - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 846, 846, 846, 846, 846, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 846, 846, 846, 846, 854, - 846, 846, 846, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 846, - 846, 846, 854, 846, 846, 846, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 846, 846, 846, - 846, 855, 846, 846, 846, 846, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 855, 846, 846, 846, 848, 848, 848, - - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 846, 846, 846, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 846, 846, - 846, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 846, 846, 846, 846, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 846, 846, 846, 846, 848, 848, 848, 848, 848, - 848, 848, 846, 846, 846, 846, 848, 848, 848, 848, - - 848, 848, 848, 846, 846, 846, 846, 846, 846, 848, - 848, 848, 848, 848, 848, 846, 846, 846, 846, 846, - 848, 848, 848, 846, 846, 846, 848, 848, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 0, 846, 846, 846, 846, - 846, 846, 846, 846, 846 - } ; - -static yyconst flex_int16_t yy_nxt[1297] = - { 0, - 8, 9, 10, 9, 11, 8, 12, 13, 8, 8, - 14, 15, 16, 17, 18, 19, 20, 20, 20, 20, - 20, 20, 8, 21, 22, 23, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, - 24, 25, 24, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 24, 24, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 24, 24, 24, 46, 47, - 58, 800, 58, 48, 49, 50, 51, 50, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 52, 49, - 53, 53, 53, 53, 53, 53, 54, 49, 49, 49, - - 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 49, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 49, 61, 64, 85, 66, 68, 68, 68, - 68, 68, 68, 68, 79, 80, 765, 65, 67, 87, - 62, 70, 86, 71, 71, 71, 71, 71, 71, 72, - 82, 83, 121, 801, 88, 89, 122, 802, 73, 74, - 90, 97, 91, 126, 119, 98, 92, 75, 76, 93, - 101, 99, 102, 94, 123, 73, 74, 100, 120, 127, - - 95, 103, 128, 96, 110, 152, 782, 58, 124, 153, - 75, 150, 111, 76, 70, 104, 77, 77, 77, 77, - 77, 77, 77, 105, 112, 160, 106, 160, 213, 107, - 113, 73, 74, 114, 129, 108, 214, 115, 116, 131, - 78, 58, 117, 58, 130, 118, 132, 133, 73, 74, - 138, 134, 218, 139, 803, 151, 142, 135, 136, 219, - 137, 143, 140, 78, 846, 144, 146, 804, 145, 141, - 147, 154, 155, 162, 162, 162, 162, 162, 162, 162, - 148, 164, 165, 167, 168, 248, 169, 169, 249, 846, - 170, 170, 170, 170, 170, 170, 170, 193, 164, 165, - - 167, 168, 183, 184, 195, 221, 205, 231, 194, 206, - 207, 239, 240, 208, 243, 209, 241, 156, 196, 222, - 154, 155, 244, 232, 157, 242, 263, 152, 158, 58, - 160, 153, 160, 159, 70, 805, 72, 72, 72, 72, - 72, 72, 72, 154, 155, 258, 259, 269, 810, 263, - 811, 73, 74, 162, 162, 162, 162, 162, 162, 162, - 783, 270, 258, 259, 274, 275, 156, 333, 73, 74, - 305, 306, 307, 157, 577, 578, 334, 158, 340, 341, - 342, 812, 159, 355, 356, 357, 366, 367, 368, 156, - 374, 375, 376, 378, 379, 380, 157, 389, 390, 391, - - 158, 813, 256, 256, 546, 159, 257, 257, 257, 257, - 257, 257, 257, 260, 260, 547, 784, 261, 261, 261, - 261, 261, 261, 261, 170, 170, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 170, 170, 170, 257, 257, - 257, 257, 257, 257, 257, 659, 660, 262, 814, 257, - 257, 257, 257, 257, 257, 257, 423, 424, 425, 454, - 455, 456, 350, 350, 262, 165, 351, 351, 351, 351, - 351, 351, 351, 261, 261, 261, 261, 261, 261, 261, - 659, 660, 165, 261, 261, 261, 261, 261, 261, 261, - 351, 351, 351, 351, 351, 351, 351, 815, 816, 168, - - 821, 351, 351, 351, 351, 351, 351, 351, 444, 445, - 446, 457, 458, 459, 822, 823, 168, 259, 783, 447, - 448, 460, 461, 462, 499, 500, 501, 522, 523, 524, - 490, 548, 641, 824, 259, 502, 503, 827, 525, 526, - 577, 578, 549, 642, 533, 534, 534, 534, 534, 534, - 534, 561, 562, 563, 579, 579, 579, 579, 579, 579, - 643, 766, 564, 565, 794, 566, 577, 578, 767, 819, - 644, 645, 795, 828, 784, 597, 598, 599, 829, 580, - 581, 581, 581, 581, 581, 581, 581, 600, 616, 617, - 618, 577, 578, 806, 582, 766, 808, 830, 577, 578, - - 619, 807, 767, 809, 580, 621, 622, 622, 622, 622, - 622, 622, 579, 579, 579, 579, 579, 579, 577, 578, - 817, 806, 833, 836, 808, 820, 659, 660, 818, 807, - 624, 809, 581, 581, 581, 581, 581, 581, 581, 625, - 661, 661, 661, 661, 661, 661, 817, 819, 825, 831, - 626, 837, 659, 660, 818, 834, 826, 832, 842, 659, - 660, 843, 840, 835, 840, 662, 663, 663, 663, 663, - 663, 663, 663, 661, 661, 661, 661, 661, 661, 659, - 660, 831, 68, 834, 166, 838, 799, 798, 797, 832, - 662, 835, 839, 663, 663, 663, 663, 663, 663, 663, - - 838, 844, 844, 820, 841, 796, 841, 839, 793, 845, - 845, 56, 56, 56, 56, 56, 84, 84, 84, 163, - 163, 163, 171, 171, 255, 792, 255, 255, 255, 623, - 623, 694, 694, 791, 790, 789, 788, 787, 786, 785, - 781, 780, 779, 778, 777, 776, 775, 774, 773, 772, - 771, 770, 769, 768, 765, 764, 763, 762, 761, 760, - 759, 758, 757, 756, 755, 754, 753, 752, 751, 750, - 749, 748, 747, 746, 745, 744, 743, 742, 741, 740, - 739, 738, 737, 736, 735, 734, 733, 732, 731, 730, - 729, 728, 727, 726, 725, 724, 723, 722, 721, 720, - - 719, 718, 717, 716, 715, 714, 713, 712, 711, 710, - 709, 708, 707, 706, 705, 704, 703, 702, 701, 700, - 699, 698, 697, 696, 695, 693, 692, 691, 690, 689, - 688, 687, 686, 685, 684, 683, 682, 681, 680, 679, - 678, 677, 676, 675, 674, 673, 672, 671, 670, 669, - 668, 667, 666, 665, 664, 658, 657, 656, 655, 654, - 653, 652, 651, 650, 649, 648, 647, 646, 640, 639, - 638, 637, 636, 635, 634, 633, 632, 631, 630, 629, - 628, 627, 620, 615, 614, 613, 612, 611, 610, 609, - 608, 607, 606, 605, 604, 603, 602, 601, 596, 595, - - 594, 593, 592, 591, 590, 589, 588, 587, 586, 585, - 584, 583, 582, 576, 575, 574, 573, 572, 571, 570, - 569, 568, 567, 560, 559, 558, 557, 556, 555, 554, - 553, 552, 551, 550, 545, 544, 543, 542, 541, 540, - 539, 538, 537, 536, 535, 532, 531, 530, 529, 528, - 527, 521, 520, 519, 518, 517, 516, 515, 514, 513, - 512, 511, 510, 509, 508, 507, 506, 505, 504, 498, - 497, 496, 495, 494, 493, 492, 491, 490, 489, 488, - 487, 486, 485, 484, 483, 482, 481, 480, 479, 478, - 477, 476, 475, 474, 473, 472, 471, 470, 469, 468, - - 467, 466, 465, 464, 463, 453, 452, 451, 450, 449, - 443, 442, 441, 440, 439, 438, 437, 436, 435, 434, - 433, 432, 431, 430, 429, 428, 427, 426, 422, 421, - 420, 419, 418, 417, 416, 415, 414, 413, 412, 411, - 410, 409, 408, 407, 406, 405, 404, 403, 402, 401, - 400, 399, 398, 397, 396, 395, 394, 393, 392, 388, - 387, 386, 385, 384, 383, 382, 381, 377, 373, 372, - 371, 370, 369, 365, 364, 363, 362, 361, 360, 359, - 358, 354, 353, 352, 349, 348, 347, 346, 345, 344, - 343, 339, 338, 337, 336, 335, 332, 331, 330, 329, - - 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, - 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, - 308, 304, 303, 302, 301, 300, 299, 298, 297, 296, - 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, - 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, - 273, 272, 271, 268, 267, 266, 265, 264, 254, 253, - 252, 251, 250, 247, 246, 245, 238, 237, 236, 235, - 234, 233, 230, 229, 228, 227, 226, 225, 224, 223, - 220, 217, 216, 215, 212, 211, 210, 204, 203, 202, - 201, 200, 199, 198, 197, 192, 191, 190, 189, 188, - - 187, 186, 185, 182, 181, 180, 179, 178, 177, 176, - 175, 174, 173, 172, 161, 149, 125, 109, 81, 69, - 63, 60, 59, 846, 57, 57, 7, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846 - - } ; - -static yyconst flex_int16_t yy_chk[1297] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 9, 789, 9, 2, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 13, 15, 25, 16, 17, 17, 17, - 17, 17, 17, 17, 21, 21, 765, 15, 16, 26, - 13, 19, 25, 19, 19, 19, 19, 19, 19, 19, - 23, 23, 36, 790, 26, 26, 36, 791, 19, 19, - 27, 29, 27, 39, 35, 29, 27, 19, 19, 28, - 30, 29, 30, 28, 37, 19, 19, 29, 35, 39, - - 28, 30, 39, 28, 33, 47, 765, 47, 37, 47, - 19, 46, 33, 19, 20, 31, 20, 20, 20, 20, - 20, 20, 20, 31, 33, 50, 31, 50, 120, 31, - 34, 20, 20, 34, 40, 31, 120, 34, 34, 41, - 20, 58, 34, 58, 40, 34, 41, 41, 20, 20, - 42, 41, 124, 42, 792, 46, 43, 41, 41, 124, - 41, 43, 42, 20, 71, 43, 44, 793, 43, 42, - 44, 48, 48, 53, 53, 53, 53, 53, 53, 53, - 44, 68, 68, 70, 70, 148, 73, 73, 148, 71, - 73, 73, 73, 73, 73, 73, 73, 105, 68, 68, - - 70, 70, 96, 96, 106, 126, 116, 135, 105, 116, - 116, 142, 142, 116, 144, 116, 143, 48, 106, 126, - 153, 153, 144, 135, 48, 143, 171, 152, 48, 152, - 160, 152, 160, 48, 72, 794, 72, 72, 72, 72, - 72, 72, 72, 154, 154, 166, 166, 180, 797, 171, - 798, 72, 72, 162, 162, 162, 162, 162, 162, 162, - 767, 180, 166, 166, 184, 184, 153, 241, 72, 72, - 215, 215, 215, 153, 623, 623, 241, 153, 247, 247, - 247, 799, 153, 268, 268, 268, 279, 279, 279, 154, - 288, 288, 288, 292, 292, 292, 154, 301, 301, 301, - - 154, 800, 164, 164, 504, 154, 164, 164, 164, 164, - 164, 164, 164, 167, 167, 504, 767, 167, 167, 167, - 167, 167, 167, 167, 169, 169, 169, 169, 169, 169, - 169, 170, 170, 170, 170, 170, 170, 170, 256, 256, - 256, 256, 256, 256, 256, 659, 659, 170, 801, 257, - 257, 257, 257, 257, 257, 257, 338, 338, 338, 393, - 393, 393, 258, 258, 170, 257, 258, 258, 258, 258, - 258, 258, 258, 260, 260, 260, 260, 260, 260, 260, - 694, 694, 257, 261, 261, 261, 261, 261, 261, 261, - 350, 350, 350, 350, 350, 350, 350, 803, 804, 261, - - 812, 351, 351, 351, 351, 351, 351, 351, 382, 382, - 382, 394, 394, 394, 813, 814, 261, 351, 783, 382, - 382, 395, 395, 395, 443, 443, 443, 483, 483, 483, - 490, 505, 606, 816, 351, 443, 443, 821, 483, 483, - 533, 533, 505, 606, 490, 490, 490, 490, 490, 490, - 490, 519, 519, 519, 533, 533, 533, 533, 533, 533, - 607, 750, 519, 519, 784, 519, 534, 534, 750, 809, - 607, 607, 784, 822, 783, 554, 554, 554, 824, 533, - 534, 534, 534, 534, 534, 534, 534, 554, 574, 574, - 574, 577, 577, 795, 582, 766, 796, 825, 579, 579, - - 574, 795, 766, 796, 533, 577, 577, 577, 577, 577, - 577, 577, 579, 579, 579, 579, 579, 579, 581, 581, - 805, 806, 829, 833, 808, 809, 621, 621, 805, 806, - 582, 808, 581, 581, 581, 581, 581, 581, 581, 582, - 621, 621, 621, 621, 621, 621, 817, 819, 820, 826, - 582, 836, 622, 622, 817, 830, 820, 826, 841, 661, - 661, 842, 839, 830, 840, 621, 622, 622, 622, 622, - 622, 622, 622, 661, 661, 661, 661, 661, 661, 663, - 663, 831, 850, 834, 851, 837, 788, 787, 786, 831, - 621, 834, 837, 663, 663, 663, 663, 663, 663, 663, - - 838, 843, 844, 819, 839, 785, 840, 838, 782, 843, - 844, 847, 847, 847, 847, 847, 848, 848, 848, 849, - 849, 849, 852, 852, 853, 779, 853, 853, 853, 854, - 854, 855, 855, 778, 776, 775, 773, 770, 769, 768, - 764, 763, 762, 761, 760, 759, 758, 757, 756, 755, - 754, 753, 752, 751, 749, 748, 747, 744, 743, 740, - 739, 738, 737, 736, 734, 733, 731, 729, 726, 725, - 724, 722, 721, 719, 718, 717, 716, 715, 714, 713, - 712, 711, 710, 709, 708, 706, 705, 704, 703, 702, - 701, 699, 698, 697, 696, 695, 693, 692, 691, 690, - - 689, 688, 687, 686, 685, 684, 683, 682, 681, 680, - 679, 678, 677, 676, 675, 673, 672, 671, 670, 669, - 668, 667, 666, 665, 664, 657, 655, 654, 652, 651, - 650, 649, 648, 647, 646, 645, 644, 643, 642, 641, - 640, 639, 637, 636, 635, 634, 633, 632, 631, 629, - 628, 627, 626, 625, 624, 620, 619, 618, 617, 616, - 615, 614, 613, 612, 611, 610, 609, 608, 602, 600, - 599, 598, 597, 593, 592, 591, 590, 589, 588, 587, - 586, 585, 576, 572, 571, 569, 568, 566, 565, 564, - 563, 562, 561, 560, 559, 558, 557, 555, 553, 552, - - 551, 550, 549, 548, 547, 546, 545, 544, 542, 541, - 537, 536, 535, 532, 531, 529, 528, 526, 525, 524, - 523, 522, 520, 518, 517, 516, 515, 514, 513, 511, - 510, 509, 508, 507, 503, 502, 501, 500, 499, 498, - 495, 494, 493, 492, 491, 489, 488, 487, 486, 485, - 484, 482, 481, 474, 473, 470, 469, 466, 465, 464, - 463, 452, 451, 450, 448, 447, 446, 445, 444, 441, - 439, 438, 437, 435, 434, 432, 431, 430, 429, 427, - 426, 421, 420, 418, 417, 416, 415, 414, 413, 412, - 411, 410, 409, 407, 406, 405, 404, 403, 402, 401, - - 400, 399, 398, 397, 396, 392, 388, 387, 386, 383, - 381, 371, 369, 365, 364, 363, 362, 360, 358, 353, - 352, 349, 348, 347, 346, 345, 344, 339, 337, 336, - 335, 334, 333, 331, 330, 327, 326, 325, 324, 323, - 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, - 312, 311, 310, 309, 308, 307, 306, 305, 302, 300, - 299, 298, 297, 296, 295, 294, 293, 291, 287, 285, - 284, 283, 282, 278, 277, 276, 275, 274, 273, 272, - 271, 267, 265, 264, 254, 253, 252, 251, 250, 249, - 248, 246, 245, 244, 243, 242, 240, 239, 238, 237, - - 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, - 226, 225, 224, 223, 222, 221, 220, 219, 218, 217, - 216, 214, 213, 212, 211, 210, 209, 208, 207, 206, - 205, 204, 203, 202, 201, 200, 199, 198, 196, 195, - 194, 193, 192, 191, 190, 189, 188, 187, 186, 185, - 183, 182, 181, 179, 178, 177, 176, 174, 159, 158, - 157, 156, 149, 147, 146, 145, 141, 140, 139, 138, - 137, 136, 134, 133, 132, 131, 130, 129, 128, 127, - 125, 123, 122, 121, 119, 118, 117, 115, 114, 112, - 111, 110, 109, 108, 107, 104, 103, 102, 101, 100, - - 99, 98, 97, 95, 94, 93, 92, 91, 90, 89, - 88, 87, 83, 79, 52, 45, 38, 32, 22, 18, - 14, 12, 11, 7, 6, 5, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846 - - } ; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -#line 1 "src/glsl/glsl_lexer.ll" -#line 2 "src/glsl/glsl_lexer.ll" -/* - * Copyright © 2008, 2009 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ -#include -#include -#include "strtod.h" -#include "ast.h" -#include "glsl_parser_extras.h" -#include "glsl_parser.h" - -static int classify_identifier(struct _mesa_glsl_parse_state *, const char *); - -#ifdef _MSC_VER -#define YY_NO_UNISTD_H -#endif - -#define YY_USER_ACTION \ - do { \ - yylloc->source = 0; \ - yylloc->first_column = yycolumn + 1; \ - yylloc->first_line = yylineno + 1; \ - yycolumn += yyleng; \ - } while(0); - -#define YY_USER_INIT yylineno = 0; yycolumn = 0; - -/* A macro for handling reserved words and keywords across language versions. - * - * Certain words start out as identifiers, become reserved words in - * later language revisions, and finally become language keywords. - * - * For example, consider the following lexer rule: - * samplerBuffer KEYWORD(130, 140, SAMPLERBUFFER) - * - * This means that "samplerBuffer" will be treated as: - * - a keyword (SAMPLERBUFFER token) ...in GLSL >= 1.40 - * - a reserved word - error ...in GLSL >= 1.30 - * - an identifier ...in GLSL < 1.30 - */ -#define KEYWORD(reserved_version, allowed_version, token) \ - do { \ - if (yyextra->language_version >= allowed_version) { \ - return token; \ - } else if (yyextra->language_version >= reserved_version) { \ - _mesa_glsl_error(yylloc, yyextra, \ - "Illegal use of reserved word `%s'", yytext); \ - return ERROR_TOK; \ - } else { \ - yylval->identifier = strdup(yytext); \ - return classify_identifier(yyextra, yytext); \ - } \ - } while (0) - -/* The ES macro can be used in KEYWORD checks: - * - * word KEYWORD(110 || ES, 400, TOKEN) - * ...means the word is reserved in GLSL ES 1.00, while - * - * word KEYWORD(110, 130 || ES, TOKEN) - * ...means the word is a legal keyword in GLSL ES 1.00. - */ -#define ES yyextra->es_shader - -static int -literal_integer(char *text, int len, struct _mesa_glsl_parse_state *state, - YYSTYPE *lval, YYLTYPE *lloc, int base) -{ - bool is_uint = (text[len - 1] == 'u' || - text[len - 1] == 'U'); - const char *digits = text; - - /* Skip "0x" */ - if (base == 16) - digits += 2; - -#ifdef _MSC_VER - unsigned __int64 value = _strtoui64(digits, NULL, base); -#else - unsigned long long value = strtoull(digits, NULL, base); -#endif - - lval->n = (int)value; - - if (value > UINT_MAX) { - /* Note that signed 0xffffffff is valid, not out of range! */ - if (state->language_version >= 130) { - _mesa_glsl_error(lloc, state, - "Literal value `%s' out of range", text); - } else { - _mesa_glsl_warning(lloc, state, - "Literal value `%s' out of range", text); - } - } else if (base == 10 && !is_uint && (unsigned)value > (unsigned)INT_MAX + 1) { - /* Tries to catch unintentionally providing a negative value. - * Note that -2147483648 is parsed as -(2147483648), so we don't - * want to warn for INT_MAX. - */ - _mesa_glsl_warning(lloc, state, - "Signed literal value `%s' is interpreted as %d", - text, lval->n); - } - return is_uint ? UINTCONSTANT : INTCONSTANT; -} - -#define LITERAL_INTEGER(base) \ - literal_integer(yytext, yyleng, yyextra, yylval, yylloc, base) - - -#line 1127 "" - -#define INITIAL 0 -#define PP 1 -#define PRAGMA 2 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#define YY_EXTRA_TYPE struct _mesa_glsl_parse_state * - -/* Holds the entire state of the reentrant scanner. */ -struct yyguts_t - { - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - int yy_n_chars; - int yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; - - int yylineno_r; - int yy_flex_debug_r; - - char *yytext_r; - int yy_more_flag; - int yy_more_len; - - YYSTYPE * yylval_r; - - YYLTYPE * yylloc_r; - - }; /* end struct yyguts_t */ - -static int yy_init_globals (yyscan_t yyscanner ); - - /* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ - # define yylval yyg->yylval_r - - # define yylloc yyg->yylloc_r - -int _mesa_glsl_lex_init (yyscan_t* scanner); - -int _mesa_glsl_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int _mesa_glsl_lex_destroy (yyscan_t yyscanner ); - -int _mesa_glsl_get_debug (yyscan_t yyscanner ); - -void _mesa_glsl_set_debug (int debug_flag ,yyscan_t yyscanner ); - -YY_EXTRA_TYPE _mesa_glsl_get_extra (yyscan_t yyscanner ); - -void _mesa_glsl_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); - -FILE *_mesa_glsl_get_in (yyscan_t yyscanner ); - -void _mesa_glsl_set_in (FILE * in_str ,yyscan_t yyscanner ); - -FILE *_mesa_glsl_get_out (yyscan_t yyscanner ); - -void _mesa_glsl_set_out (FILE * out_str ,yyscan_t yyscanner ); - -int _mesa_glsl_get_leng (yyscan_t yyscanner ); - -char *_mesa_glsl_get_text (yyscan_t yyscanner ); - -int _mesa_glsl_get_lineno (yyscan_t yyscanner ); - -void _mesa_glsl_set_lineno (int line_number ,yyscan_t yyscanner ); - -int _mesa_glsl_get_column (yyscan_t yyscanner ); - -void _mesa_glsl_set_column (int column_no ,yyscan_t yyscanner ); - -YYSTYPE * _mesa_glsl_get_lval (yyscan_t yyscanner ); - -void _mesa_glsl_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); - - YYLTYPE *_mesa_glsl_get_lloc (yyscan_t yyscanner ); - - void _mesa_glsl_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int _mesa_glsl_wrap (yyscan_t yyscanner ); -#else -extern int _mesa_glsl_wrap (yyscan_t yyscanner ); -#endif -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (yyscan_t yyscanner ); -#else -static int input (yyscan_t yyscanner ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - unsigned n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int _mesa_glsl_lex \ - (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); - -#define YY_DECL int _mesa_glsl_lex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - if ( yyleng > 0 ) \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ - (yytext[yyleng - 1] == '\n'); \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - -#line 145 "src/glsl/glsl_lexer.ll" - - -#line 1376 "" - - yylval = yylval_param; - - yylloc = yylloc_param; - - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - _mesa_glsl_ensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - _mesa_glsl__load_buffer_state(yyscanner ); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; - yy_current_state += YY_AT_BOL(); -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 847 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_current_state != 846 ); - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 147 "src/glsl/glsl_lexer.ll" -; - YY_BREAK -/* Preprocessor tokens. */ -case 2: -*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ -yyg->yy_c_buf_p = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 150 "src/glsl/glsl_lexer.ll" -; - YY_BREAK -case 3: -YY_RULE_SETUP -#line 151 "src/glsl/glsl_lexer.ll" -{ BEGIN PP; return VERSION_TOK; } - YY_BREAK -case 4: -YY_RULE_SETUP -#line 152 "src/glsl/glsl_lexer.ll" -{ BEGIN PP; return EXTENSION; } - YY_BREAK -case 5: -*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ -yyg->yy_c_buf_p = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 153 "src/glsl/glsl_lexer.ll" -{ - /* Eat characters until the first digit is - * encountered - */ - char *ptr = yytext; - while (!isdigit(*ptr)) - ptr++; - - /* Subtract one from the line number because - * yylineno is zero-based instead of - * one-based. - */ - yylineno = strtol(ptr, &ptr, 0) - 1; - yylloc->source = strtol(ptr, NULL, 0); - } - YY_BREAK -case 6: -*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ -yyg->yy_c_buf_p = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 168 "src/glsl/glsl_lexer.ll" -{ - /* Eat characters until the first digit is - * encountered - */ - char *ptr = yytext; - while (!isdigit(*ptr)) - ptr++; - - /* Subtract one from the line number because - * yylineno is zero-based instead of - * one-based. - */ - yylineno = strtol(ptr, &ptr, 0) - 1; - } - YY_BREAK -case 7: -YY_RULE_SETUP -#line 182 "src/glsl/glsl_lexer.ll" -{ - BEGIN PP; - return PRAGMA_DEBUG_ON; - } - YY_BREAK -case 8: -YY_RULE_SETUP -#line 186 "src/glsl/glsl_lexer.ll" -{ - BEGIN PP; - return PRAGMA_DEBUG_OFF; - } - YY_BREAK -case 9: -YY_RULE_SETUP -#line 190 "src/glsl/glsl_lexer.ll" -{ - BEGIN PP; - return PRAGMA_OPTIMIZE_ON; - } - YY_BREAK -case 10: -YY_RULE_SETUP -#line 194 "src/glsl/glsl_lexer.ll" -{ - BEGIN PP; - return PRAGMA_OPTIMIZE_OFF; - } - YY_BREAK -case 11: -YY_RULE_SETUP -#line 198 "src/glsl/glsl_lexer.ll" -{ - BEGIN PP; - return PRAGMA_INVARIANT_ALL; - } - YY_BREAK -case 12: -YY_RULE_SETUP -#line 202 "src/glsl/glsl_lexer.ll" -{ BEGIN PRAGMA; } - YY_BREAK -case 13: -/* rule 13 can match eol */ -YY_RULE_SETUP -#line 204 "src/glsl/glsl_lexer.ll" -{ BEGIN 0; yylineno++; yycolumn = 0; } - YY_BREAK -case 14: -YY_RULE_SETUP -#line 205 "src/glsl/glsl_lexer.ll" -{ } - YY_BREAK -case 15: -YY_RULE_SETUP -#line 207 "src/glsl/glsl_lexer.ll" -{ } - YY_BREAK -case 16: -YY_RULE_SETUP -#line 208 "src/glsl/glsl_lexer.ll" -{ } - YY_BREAK -case 17: -YY_RULE_SETUP -#line 209 "src/glsl/glsl_lexer.ll" -return COLON; - YY_BREAK -case 18: -YY_RULE_SETUP -#line 210 "src/glsl/glsl_lexer.ll" -{ - yylval->identifier = strdup(yytext); - return IDENTIFIER; - } - YY_BREAK -case 19: -YY_RULE_SETUP -#line 214 "src/glsl/glsl_lexer.ll" -{ - yylval->n = strtol(yytext, NULL, 10); - return INTCONSTANT; - } - YY_BREAK -case 20: -/* rule 20 can match eol */ -YY_RULE_SETUP -#line 218 "src/glsl/glsl_lexer.ll" -{ BEGIN 0; yylineno++; yycolumn = 0; return EOL; } - YY_BREAK -case 21: -/* rule 21 can match eol */ -YY_RULE_SETUP -#line 220 "src/glsl/glsl_lexer.ll" -{ yylineno++; yycolumn = 0; } - YY_BREAK -case 22: -YY_RULE_SETUP -#line 222 "src/glsl/glsl_lexer.ll" -return ATTRIBUTE; - YY_BREAK -case 23: -YY_RULE_SETUP -#line 223 "src/glsl/glsl_lexer.ll" -return CONST_TOK; - YY_BREAK -case 24: -YY_RULE_SETUP -#line 224 "src/glsl/glsl_lexer.ll" -return BOOL_TOK; - YY_BREAK -case 25: -YY_RULE_SETUP -#line 225 "src/glsl/glsl_lexer.ll" -return FLOAT_TOK; - YY_BREAK -case 26: -YY_RULE_SETUP -#line 226 "src/glsl/glsl_lexer.ll" -return INT_TOK; - YY_BREAK -case 27: -YY_RULE_SETUP -#line 227 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, UINT_TOK); - YY_BREAK -case 28: -YY_RULE_SETUP -#line 229 "src/glsl/glsl_lexer.ll" -return BREAK; - YY_BREAK -case 29: -YY_RULE_SETUP -#line 230 "src/glsl/glsl_lexer.ll" -return CONTINUE; - YY_BREAK -case 30: -YY_RULE_SETUP -#line 231 "src/glsl/glsl_lexer.ll" -return DO; - YY_BREAK -case 31: -YY_RULE_SETUP -#line 232 "src/glsl/glsl_lexer.ll" -return WHILE; - YY_BREAK -case 32: -YY_RULE_SETUP -#line 233 "src/glsl/glsl_lexer.ll" -return ELSE; - YY_BREAK -case 33: -YY_RULE_SETUP -#line 234 "src/glsl/glsl_lexer.ll" -return FOR; - YY_BREAK -case 34: -YY_RULE_SETUP -#line 235 "src/glsl/glsl_lexer.ll" -return IF; - YY_BREAK -case 35: -YY_RULE_SETUP -#line 236 "src/glsl/glsl_lexer.ll" -return DISCARD; - YY_BREAK -case 36: -YY_RULE_SETUP -#line 237 "src/glsl/glsl_lexer.ll" -return RETURN; - YY_BREAK -case 37: -YY_RULE_SETUP -#line 239 "src/glsl/glsl_lexer.ll" -return BVEC2; - YY_BREAK -case 38: -YY_RULE_SETUP -#line 240 "src/glsl/glsl_lexer.ll" -return BVEC3; - YY_BREAK -case 39: -YY_RULE_SETUP -#line 241 "src/glsl/glsl_lexer.ll" -return BVEC4; - YY_BREAK -case 40: -YY_RULE_SETUP -#line 242 "src/glsl/glsl_lexer.ll" -return IVEC2; - YY_BREAK -case 41: -YY_RULE_SETUP -#line 243 "src/glsl/glsl_lexer.ll" -return IVEC3; - YY_BREAK -case 42: -YY_RULE_SETUP -#line 244 "src/glsl/glsl_lexer.ll" -return IVEC4; - YY_BREAK -case 43: -YY_RULE_SETUP -#line 245 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, UVEC2); - YY_BREAK -case 44: -YY_RULE_SETUP -#line 246 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, UVEC3); - YY_BREAK -case 45: -YY_RULE_SETUP -#line 247 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, UVEC4); - YY_BREAK -case 46: -YY_RULE_SETUP -#line 248 "src/glsl/glsl_lexer.ll" -return VEC2; - YY_BREAK -case 47: -YY_RULE_SETUP -#line 249 "src/glsl/glsl_lexer.ll" -return VEC3; - YY_BREAK -case 48: -YY_RULE_SETUP -#line 250 "src/glsl/glsl_lexer.ll" -return VEC4; - YY_BREAK -case 49: -YY_RULE_SETUP -#line 251 "src/glsl/glsl_lexer.ll" -return MAT2X2; - YY_BREAK -case 50: -YY_RULE_SETUP -#line 252 "src/glsl/glsl_lexer.ll" -return MAT3X3; - YY_BREAK -case 51: -YY_RULE_SETUP -#line 253 "src/glsl/glsl_lexer.ll" -return MAT4X4; - YY_BREAK -case 52: -YY_RULE_SETUP -#line 254 "src/glsl/glsl_lexer.ll" -KEYWORD(120, 120, MAT2X2); - YY_BREAK -case 53: -YY_RULE_SETUP -#line 255 "src/glsl/glsl_lexer.ll" -KEYWORD(120, 120, MAT2X3); - YY_BREAK -case 54: -YY_RULE_SETUP -#line 256 "src/glsl/glsl_lexer.ll" -KEYWORD(120, 120, MAT2X4); - YY_BREAK -case 55: -YY_RULE_SETUP -#line 257 "src/glsl/glsl_lexer.ll" -KEYWORD(120, 120, MAT3X2); - YY_BREAK -case 56: -YY_RULE_SETUP -#line 258 "src/glsl/glsl_lexer.ll" -KEYWORD(120, 120, MAT3X3); - YY_BREAK -case 57: -YY_RULE_SETUP -#line 259 "src/glsl/glsl_lexer.ll" -KEYWORD(120, 120, MAT3X4); - YY_BREAK -case 58: -YY_RULE_SETUP -#line 260 "src/glsl/glsl_lexer.ll" -KEYWORD(120, 120, MAT4X2); - YY_BREAK -case 59: -YY_RULE_SETUP -#line 261 "src/glsl/glsl_lexer.ll" -KEYWORD(120, 120, MAT4X3); - YY_BREAK -case 60: -YY_RULE_SETUP -#line 262 "src/glsl/glsl_lexer.ll" -KEYWORD(120, 120, MAT4X4); - YY_BREAK -case 61: -YY_RULE_SETUP -#line 264 "src/glsl/glsl_lexer.ll" -return IN_TOK; - YY_BREAK -case 62: -YY_RULE_SETUP -#line 265 "src/glsl/glsl_lexer.ll" -return OUT_TOK; - YY_BREAK -case 63: -YY_RULE_SETUP -#line 266 "src/glsl/glsl_lexer.ll" -return INOUT_TOK; - YY_BREAK -case 64: -YY_RULE_SETUP -#line 267 "src/glsl/glsl_lexer.ll" -return UNIFORM; - YY_BREAK -case 65: -YY_RULE_SETUP -#line 268 "src/glsl/glsl_lexer.ll" -return VARYING; - YY_BREAK -case 66: -YY_RULE_SETUP -#line 269 "src/glsl/glsl_lexer.ll" -KEYWORD(120, 120, CENTROID); - YY_BREAK -case 67: -YY_RULE_SETUP -#line 270 "src/glsl/glsl_lexer.ll" -KEYWORD(120 || ES, 120 || ES, INVARIANT); - YY_BREAK -case 68: -YY_RULE_SETUP -#line 271 "src/glsl/glsl_lexer.ll" -KEYWORD(130 || ES, 130, FLAT); - YY_BREAK -case 69: -YY_RULE_SETUP -#line 272 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, SMOOTH); - YY_BREAK -case 70: -YY_RULE_SETUP -#line 273 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, NOPERSPECTIVE); - YY_BREAK -case 71: -YY_RULE_SETUP -#line 275 "src/glsl/glsl_lexer.ll" -return SAMPLER1D; - YY_BREAK -case 72: -YY_RULE_SETUP -#line 276 "src/glsl/glsl_lexer.ll" -return SAMPLER2D; - YY_BREAK -case 73: -YY_RULE_SETUP -#line 277 "src/glsl/glsl_lexer.ll" -return SAMPLER3D; - YY_BREAK -case 74: -YY_RULE_SETUP -#line 278 "src/glsl/glsl_lexer.ll" -return SAMPLERCUBE; - YY_BREAK -case 75: -YY_RULE_SETUP -#line 279 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, SAMPLER1DARRAY); - YY_BREAK -case 76: -YY_RULE_SETUP -#line 280 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, SAMPLER2DARRAY); - YY_BREAK -case 77: -YY_RULE_SETUP -#line 281 "src/glsl/glsl_lexer.ll" -return SAMPLER1DSHADOW; - YY_BREAK -case 78: -YY_RULE_SETUP -#line 282 "src/glsl/glsl_lexer.ll" -return SAMPLER2DSHADOW; - YY_BREAK -case 79: -YY_RULE_SETUP -#line 283 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, SAMPLERCUBESHADOW); - YY_BREAK -case 80: -YY_RULE_SETUP -#line 284 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, SAMPLER1DARRAYSHADOW); - YY_BREAK -case 81: -YY_RULE_SETUP -#line 285 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, SAMPLER2DARRAYSHADOW); - YY_BREAK -case 82: -YY_RULE_SETUP -#line 286 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, ISAMPLER1D); - YY_BREAK -case 83: -YY_RULE_SETUP -#line 287 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, ISAMPLER2D); - YY_BREAK -case 84: -YY_RULE_SETUP -#line 288 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, ISAMPLER3D); - YY_BREAK -case 85: -YY_RULE_SETUP -#line 289 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, ISAMPLERCUBE); - YY_BREAK -case 86: -YY_RULE_SETUP -#line 290 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, ISAMPLER1DARRAY); - YY_BREAK -case 87: -YY_RULE_SETUP -#line 291 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, ISAMPLER2DARRAY); - YY_BREAK -case 88: -YY_RULE_SETUP -#line 292 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, USAMPLER1D); - YY_BREAK -case 89: -YY_RULE_SETUP -#line 293 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, USAMPLER2D); - YY_BREAK -case 90: -YY_RULE_SETUP -#line 294 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, USAMPLER3D); - YY_BREAK -case 91: -YY_RULE_SETUP -#line 295 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, USAMPLERCUBE); - YY_BREAK -case 92: -YY_RULE_SETUP -#line 296 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, USAMPLER1DARRAY); - YY_BREAK -case 93: -YY_RULE_SETUP -#line 297 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, USAMPLER2DARRAY); - YY_BREAK -case 94: -YY_RULE_SETUP -#line 299 "src/glsl/glsl_lexer.ll" -{ - if (yyextra->OES_EGL_image_external_enable) - return SAMPLEREXTERNALOES; - else - return IDENTIFIER; - } - YY_BREAK -case 95: -YY_RULE_SETUP -#line 307 "src/glsl/glsl_lexer.ll" -return STRUCT; - YY_BREAK -case 96: -YY_RULE_SETUP -#line 308 "src/glsl/glsl_lexer.ll" -return VOID_TOK; - YY_BREAK -case 97: -YY_RULE_SETUP -#line 310 "src/glsl/glsl_lexer.ll" -{ - if ((yyextra->language_version >= 140) - || yyextra->AMD_conservative_depth_enable - || yyextra->ARB_conservative_depth_enable - || yyextra->ARB_explicit_attrib_location_enable - || yyextra->ARB_fragment_coord_conventions_enable) { - return LAYOUT_TOK; - } else { - yylval->identifier = strdup(yytext); - return IDENTIFIER; - } - } - YY_BREAK -case 98: -YY_RULE_SETUP -#line 323 "src/glsl/glsl_lexer.ll" -return INC_OP; - YY_BREAK -case 99: -YY_RULE_SETUP -#line 324 "src/glsl/glsl_lexer.ll" -return DEC_OP; - YY_BREAK -case 100: -YY_RULE_SETUP -#line 325 "src/glsl/glsl_lexer.ll" -return LE_OP; - YY_BREAK -case 101: -YY_RULE_SETUP -#line 326 "src/glsl/glsl_lexer.ll" -return GE_OP; - YY_BREAK -case 102: -YY_RULE_SETUP -#line 327 "src/glsl/glsl_lexer.ll" -return EQ_OP; - YY_BREAK -case 103: -YY_RULE_SETUP -#line 328 "src/glsl/glsl_lexer.ll" -return NE_OP; - YY_BREAK -case 104: -YY_RULE_SETUP -#line 329 "src/glsl/glsl_lexer.ll" -return AND_OP; - YY_BREAK -case 105: -YY_RULE_SETUP -#line 330 "src/glsl/glsl_lexer.ll" -return OR_OP; - YY_BREAK -case 106: -YY_RULE_SETUP -#line 331 "src/glsl/glsl_lexer.ll" -return XOR_OP; - YY_BREAK -case 107: -YY_RULE_SETUP -#line 332 "src/glsl/glsl_lexer.ll" -return LEFT_OP; - YY_BREAK -case 108: -YY_RULE_SETUP -#line 333 "src/glsl/glsl_lexer.ll" -return RIGHT_OP; - YY_BREAK -case 109: -YY_RULE_SETUP -#line 335 "src/glsl/glsl_lexer.ll" -return MUL_ASSIGN; - YY_BREAK -case 110: -YY_RULE_SETUP -#line 336 "src/glsl/glsl_lexer.ll" -return DIV_ASSIGN; - YY_BREAK -case 111: -YY_RULE_SETUP -#line 337 "src/glsl/glsl_lexer.ll" -return ADD_ASSIGN; - YY_BREAK -case 112: -YY_RULE_SETUP -#line 338 "src/glsl/glsl_lexer.ll" -return MOD_ASSIGN; - YY_BREAK -case 113: -YY_RULE_SETUP -#line 339 "src/glsl/glsl_lexer.ll" -return LEFT_ASSIGN; - YY_BREAK -case 114: -YY_RULE_SETUP -#line 340 "src/glsl/glsl_lexer.ll" -return RIGHT_ASSIGN; - YY_BREAK -case 115: -YY_RULE_SETUP -#line 341 "src/glsl/glsl_lexer.ll" -return AND_ASSIGN; - YY_BREAK -case 116: -YY_RULE_SETUP -#line 342 "src/glsl/glsl_lexer.ll" -return XOR_ASSIGN; - YY_BREAK -case 117: -YY_RULE_SETUP -#line 343 "src/glsl/glsl_lexer.ll" -return OR_ASSIGN; - YY_BREAK -case 118: -YY_RULE_SETUP -#line 344 "src/glsl/glsl_lexer.ll" -return SUB_ASSIGN; - YY_BREAK -case 119: -YY_RULE_SETUP -#line 346 "src/glsl/glsl_lexer.ll" -{ - return LITERAL_INTEGER(10); - } - YY_BREAK -case 120: -YY_RULE_SETUP -#line 349 "src/glsl/glsl_lexer.ll" -{ - return LITERAL_INTEGER(16); - } - YY_BREAK -case 121: -YY_RULE_SETUP -#line 352 "src/glsl/glsl_lexer.ll" -{ - return LITERAL_INTEGER(8); - } - YY_BREAK -case 122: -YY_RULE_SETUP -#line 356 "src/glsl/glsl_lexer.ll" -{ - yylval->real = glsl_strtod(yytext, NULL); - return FLOATCONSTANT; - } - YY_BREAK -case 123: -YY_RULE_SETUP -#line 360 "src/glsl/glsl_lexer.ll" -{ - yylval->real = glsl_strtod(yytext, NULL); - return FLOATCONSTANT; - } - YY_BREAK -case 124: -YY_RULE_SETUP -#line 364 "src/glsl/glsl_lexer.ll" -{ - yylval->real = glsl_strtod(yytext, NULL); - return FLOATCONSTANT; - } - YY_BREAK -case 125: -YY_RULE_SETUP -#line 368 "src/glsl/glsl_lexer.ll" -{ - yylval->real = glsl_strtod(yytext, NULL); - return FLOATCONSTANT; - } - YY_BREAK -case 126: -YY_RULE_SETUP -#line 372 "src/glsl/glsl_lexer.ll" -{ - yylval->real = glsl_strtod(yytext, NULL); - return FLOATCONSTANT; - } - YY_BREAK -case 127: -YY_RULE_SETUP -#line 377 "src/glsl/glsl_lexer.ll" -{ - yylval->n = 1; - return BOOLCONSTANT; - } - YY_BREAK -case 128: -YY_RULE_SETUP -#line 381 "src/glsl/glsl_lexer.ll" -{ - yylval->n = 0; - return BOOLCONSTANT; - } - YY_BREAK -/* Reserved words in GLSL 1.10. */ -case 129: -YY_RULE_SETUP -#line 388 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, ASM); - YY_BREAK -case 130: -YY_RULE_SETUP -#line 389 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, CLASS); - YY_BREAK -case 131: -YY_RULE_SETUP -#line 390 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, UNION); - YY_BREAK -case 132: -YY_RULE_SETUP -#line 391 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, ENUM); - YY_BREAK -case 133: -YY_RULE_SETUP -#line 392 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, TYPEDEF); - YY_BREAK -case 134: -YY_RULE_SETUP -#line 393 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, TEMPLATE); - YY_BREAK -case 135: -YY_RULE_SETUP -#line 394 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, THIS); - YY_BREAK -case 136: -YY_RULE_SETUP -#line 395 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, PACKED_TOK); - YY_BREAK -case 137: -YY_RULE_SETUP -#line 396 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, GOTO); - YY_BREAK -case 138: -YY_RULE_SETUP -#line 397 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 130, SWITCH); - YY_BREAK -case 139: -YY_RULE_SETUP -#line 398 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 130, DEFAULT); - YY_BREAK -case 140: -YY_RULE_SETUP -#line 399 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, INLINE_TOK); - YY_BREAK -case 141: -YY_RULE_SETUP -#line 400 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, NOINLINE); - YY_BREAK -case 142: -YY_RULE_SETUP -#line 401 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, VOLATILE); - YY_BREAK -case 143: -YY_RULE_SETUP -#line 402 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, PUBLIC_TOK); - YY_BREAK -case 144: -YY_RULE_SETUP -#line 403 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, STATIC); - YY_BREAK -case 145: -YY_RULE_SETUP -#line 404 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, EXTERN); - YY_BREAK -case 146: -YY_RULE_SETUP -#line 405 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, EXTERNAL); - YY_BREAK -case 147: -YY_RULE_SETUP -#line 406 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, INTERFACE); - YY_BREAK -case 148: -YY_RULE_SETUP -#line 407 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, LONG_TOK); - YY_BREAK -case 149: -YY_RULE_SETUP -#line 408 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, SHORT_TOK); - YY_BREAK -case 150: -YY_RULE_SETUP -#line 409 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 400, DOUBLE_TOK); - YY_BREAK -case 151: -YY_RULE_SETUP -#line 410 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, HALF); - YY_BREAK -case 152: -YY_RULE_SETUP -#line 411 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, FIXED_TOK); - YY_BREAK -case 153: -YY_RULE_SETUP -#line 412 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, UNSIGNED); - YY_BREAK -case 154: -YY_RULE_SETUP -#line 413 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, INPUT_TOK); - YY_BREAK -case 155: -YY_RULE_SETUP -#line 414 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, OUTPUT); - YY_BREAK -case 156: -YY_RULE_SETUP -#line 415 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, HVEC2); - YY_BREAK -case 157: -YY_RULE_SETUP -#line 416 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, HVEC3); - YY_BREAK -case 158: -YY_RULE_SETUP -#line 417 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, HVEC4); - YY_BREAK -case 159: -YY_RULE_SETUP -#line 418 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 400, DVEC2); - YY_BREAK -case 160: -YY_RULE_SETUP -#line 419 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 400, DVEC3); - YY_BREAK -case 161: -YY_RULE_SETUP -#line 420 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 400, DVEC4); - YY_BREAK -case 162: -YY_RULE_SETUP -#line 421 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, FVEC2); - YY_BREAK -case 163: -YY_RULE_SETUP -#line 422 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, FVEC3); - YY_BREAK -case 164: -YY_RULE_SETUP -#line 423 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, FVEC4); - YY_BREAK -case 165: -YY_RULE_SETUP -#line 424 "src/glsl/glsl_lexer.ll" -return SAMPLER2DRECT; - YY_BREAK -case 166: -YY_RULE_SETUP -#line 425 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, SAMPLER3DRECT); - YY_BREAK -case 167: -YY_RULE_SETUP -#line 426 "src/glsl/glsl_lexer.ll" -return SAMPLER2DRECTSHADOW; - YY_BREAK -case 168: -YY_RULE_SETUP -#line 427 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, SIZEOF); - YY_BREAK -case 169: -YY_RULE_SETUP -#line 428 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, CAST); - YY_BREAK -case 170: -YY_RULE_SETUP -#line 429 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, NAMESPACE); - YY_BREAK -case 171: -YY_RULE_SETUP -#line 430 "src/glsl/glsl_lexer.ll" -KEYWORD(110 || ES, 999, USING); - YY_BREAK -/* Additional reserved words in GLSL 1.20. */ -case 172: -YY_RULE_SETUP -#line 433 "src/glsl/glsl_lexer.ll" -KEYWORD(120, 130 || ES, LOWP); - YY_BREAK -case 173: -YY_RULE_SETUP -#line 434 "src/glsl/glsl_lexer.ll" -KEYWORD(120, 130 || ES, MEDIUMP); - YY_BREAK -case 174: -YY_RULE_SETUP -#line 435 "src/glsl/glsl_lexer.ll" -KEYWORD(120, 130 || ES, HIGHP); - YY_BREAK -case 175: -YY_RULE_SETUP -#line 436 "src/glsl/glsl_lexer.ll" -KEYWORD(120, 130 || ES, PRECISION); - YY_BREAK -/* Additional reserved words in GLSL 1.30. */ -case 176: -YY_RULE_SETUP -#line 439 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 130, CASE); - YY_BREAK -case 177: -YY_RULE_SETUP -#line 440 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, COMMON); - YY_BREAK -case 178: -YY_RULE_SETUP -#line 441 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, PARTITION); - YY_BREAK -case 179: -YY_RULE_SETUP -#line 442 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, ACTIVE); - YY_BREAK -case 180: -YY_RULE_SETUP -#line 443 "src/glsl/glsl_lexer.ll" -KEYWORD(130 || ES, 999, SUPERP); - YY_BREAK -case 181: -YY_RULE_SETUP -#line 444 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 140, SAMPLERBUFFER); - YY_BREAK -case 182: -YY_RULE_SETUP -#line 445 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, FILTER); - YY_BREAK -case 183: -YY_RULE_SETUP -#line 446 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, IMAGE1D); - YY_BREAK -case 184: -YY_RULE_SETUP -#line 447 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, IMAGE2D); - YY_BREAK -case 185: -YY_RULE_SETUP -#line 448 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, IMAGE3D); - YY_BREAK -case 186: -YY_RULE_SETUP -#line 449 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, IMAGECUBE); - YY_BREAK -case 187: -YY_RULE_SETUP -#line 450 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, IIMAGE1D); - YY_BREAK -case 188: -YY_RULE_SETUP -#line 451 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, IIMAGE2D); - YY_BREAK -case 189: -YY_RULE_SETUP -#line 452 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, IIMAGE3D); - YY_BREAK -case 190: -YY_RULE_SETUP -#line 453 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, IIMAGECUBE); - YY_BREAK -case 191: -YY_RULE_SETUP -#line 454 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, UIMAGE1D); - YY_BREAK -case 192: -YY_RULE_SETUP -#line 455 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, UIMAGE2D); - YY_BREAK -case 193: -YY_RULE_SETUP -#line 456 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, UIMAGE3D); - YY_BREAK -case 194: -YY_RULE_SETUP -#line 457 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, UIMAGECUBE); - YY_BREAK -case 195: -YY_RULE_SETUP -#line 458 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, IMAGE1DARRAY); - YY_BREAK -case 196: -YY_RULE_SETUP -#line 459 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, IMAGE2DARRAY); - YY_BREAK -case 197: -YY_RULE_SETUP -#line 460 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, IIMAGE1DARRAY); - YY_BREAK -case 198: -YY_RULE_SETUP -#line 461 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, IIMAGE2DARRAY); - YY_BREAK -case 199: -YY_RULE_SETUP -#line 462 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, UIMAGE1DARRAY); - YY_BREAK -case 200: -YY_RULE_SETUP -#line 463 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, UIMAGE2DARRAY); - YY_BREAK -case 201: -YY_RULE_SETUP -#line 464 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, IMAGE1DSHADOW); - YY_BREAK -case 202: -YY_RULE_SETUP -#line 465 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, IMAGE2DSHADOW); - YY_BREAK -case 203: -YY_RULE_SETUP -#line 466 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, IMAGE1DARRAYSHADOW); - YY_BREAK -case 204: -YY_RULE_SETUP -#line 467 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, IMAGE2DARRAYSHADOW); - YY_BREAK -case 205: -YY_RULE_SETUP -#line 468 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, IMAGEBUFFER); - YY_BREAK -case 206: -YY_RULE_SETUP -#line 469 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, IIMAGEBUFFER); - YY_BREAK -case 207: -YY_RULE_SETUP -#line 470 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, UIMAGEBUFFER); - YY_BREAK -case 208: -YY_RULE_SETUP -#line 471 "src/glsl/glsl_lexer.ll" -KEYWORD(130, 999, ROW_MAJOR); - YY_BREAK -case 209: -YY_RULE_SETUP -#line 473 "src/glsl/glsl_lexer.ll" -{ - struct _mesa_glsl_parse_state *state = yyextra; - void *ctx = state; - yylval->identifier = ralloc_strdup(ctx, yytext); - return classify_identifier(state, yytext); - } - YY_BREAK -case 210: -YY_RULE_SETUP -#line 480 "src/glsl/glsl_lexer.ll" -{ return yytext[0]; } - YY_BREAK -case 211: -YY_RULE_SETUP -#line 482 "src/glsl/glsl_lexer.ll" -ECHO; - YY_BREAK -#line 2627 "" -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(PP): -case YY_STATE_EOF(PRAGMA): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * _mesa_glsl_lex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( _mesa_glsl_wrap(yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of _mesa_glsl_lex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = yyg->yytext_ptr; - register int number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - _mesa_glsl_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, (size_t) num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - _mesa_glsl_restart(yyin ,yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) _mesa_glsl_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) -{ - register yy_state_type yy_current_state; - register char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - yy_current_state += YY_AT_BOL(); - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 847 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) -{ - register int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - register char *yy_cp = yyg->yy_c_buf_p; - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 847 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 846); - - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) -#else - static int input (yyscan_t yyscanner) -#endif - -{ - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - _mesa_glsl_restart(yyin ,yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( _mesa_glsl_wrap(yyscanner ) ) - return EOF; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(yyscanner); -#else - return input(yyscanner); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; - - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * @param yyscanner The scanner object. - * @note This function does not reset the start condition to @c INITIAL . - */ - void _mesa_glsl_restart (FILE * input_file , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! YY_CURRENT_BUFFER ){ - _mesa_glsl_ensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - _mesa_glsl__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); - _mesa_glsl__load_buffer_state(yyscanner ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * @param yyscanner The scanner object. - */ - void _mesa_glsl__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * _mesa_glsl_pop_buffer_state(); - * _mesa_glsl_push_buffer_state(new_buffer); - */ - _mesa_glsl_ensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - _mesa_glsl__load_buffer_state(yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (_mesa_glsl_wrap()) processing, but the only time this flag - * is looked at is after _mesa_glsl_wrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; -} - -static void _mesa_glsl__load_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * @param yyscanner The scanner object. - * @return the allocated buffer state. - */ - YY_BUFFER_STATE _mesa_glsl__create_buffer (FILE * file, int size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) _mesa_glsl_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) _mesa_glsl_alloc(b->yy_buf_size + 2 ,yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__create_buffer()" ); - - b->yy_is_our_buffer = 1; - - _mesa_glsl__init_buffer(b,file ,yyscanner); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with _mesa_glsl__create_buffer() - * @param yyscanner The scanner object. - */ - void _mesa_glsl__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - _mesa_glsl_free((void *) b->yy_ch_buf ,yyscanner ); - - _mesa_glsl_free((void *) b ,yyscanner ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a _mesa_glsl_restart() or at EOF. - */ - static void _mesa_glsl__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) - -{ - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - _mesa_glsl__flush_buffer(b ,yyscanner); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then _mesa_glsl__init_buffer was _probably_ - * called from _mesa_glsl_restart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * @param yyscanner The scanner object. - */ - void _mesa_glsl__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - _mesa_glsl__load_buffer_state(yyscanner ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * @param yyscanner The scanner object. - */ -void _mesa_glsl_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - _mesa_glsl_ensure_buffer_stack(yyscanner); - - /* This block is copied from _mesa_glsl__switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from _mesa_glsl__switch_to_buffer. */ - _mesa_glsl__load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * @param yyscanner The scanner object. - */ -void _mesa_glsl_pop_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - _mesa_glsl__delete_buffer(YY_CURRENT_BUFFER ,yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - _mesa_glsl__load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void _mesa_glsl_ensure_buffer_stack (yyscan_t yyscanner) -{ - int num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - yyg->yy_buffer_stack = (struct yy_buffer_state**)_mesa_glsl_alloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_ensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)_mesa_glsl_realloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_ensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE _mesa_glsl__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) _mesa_glsl_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - _mesa_glsl__switch_to_buffer(b ,yyscanner ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to _mesa_glsl_lex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * _mesa_glsl__scan_bytes() instead. - */ -YY_BUFFER_STATE _mesa_glsl__scan_string (yyconst char * yystr , yyscan_t yyscanner) -{ - - return _mesa_glsl__scan_bytes(yystr,strlen(yystr) ,yyscanner); -} - -/** Setup the input buffer state to scan the given bytes. The next call to _mesa_glsl_lex() will - * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE _mesa_glsl__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) _mesa_glsl_alloc(n ,yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = _mesa_glsl__scan_buffer(buf,n ,yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in _mesa_glsl__scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the user-defined data for this scanner. - * @param yyscanner The scanner object. - */ -YY_EXTRA_TYPE _mesa_glsl_get_extra (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; -} - -/** Get the current line number. - * @param yyscanner The scanner object. - */ -int _mesa_glsl_get_lineno (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; -} - -/** Get the current column number. - * @param yyscanner The scanner object. - */ -int _mesa_glsl_get_column (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; -} - -/** Get the input stream. - * @param yyscanner The scanner object. - */ -FILE *_mesa_glsl_get_in (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; -} - -/** Get the output stream. - * @param yyscanner The scanner object. - */ -FILE *_mesa_glsl_get_out (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; -} - -/** Get the length of the current token. - * @param yyscanner The scanner object. - */ -int _mesa_glsl_get_leng (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; -} - -/** Get the current token. - * @param yyscanner The scanner object. - */ - -char *_mesa_glsl_get_text (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; -} - -/** Set the user-defined data. This data is never touched by the scanner. - * @param user_defined The data to be associated with this scanner. - * @param yyscanner The scanner object. - */ -void _mesa_glsl_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; -} - -/** Set the current line number. - * @param line_number - * @param yyscanner The scanner object. - */ -void _mesa_glsl_set_lineno (int line_number , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "_mesa_glsl_set_lineno called with no buffer" , yyscanner); - - yylineno = line_number; -} - -/** Set the current column. - * @param line_number - * @param yyscanner The scanner object. - */ -void _mesa_glsl_set_column (int column_no , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "_mesa_glsl_set_column called with no buffer" , yyscanner); - - yycolumn = column_no; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * @param yyscanner The scanner object. - * @see _mesa_glsl__switch_to_buffer - */ -void _mesa_glsl_set_in (FILE * in_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = in_str ; -} - -void _mesa_glsl_set_out (FILE * out_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = out_str ; -} - -int _mesa_glsl_get_debug (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; -} - -void _mesa_glsl_set_debug (int bdebug , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = bdebug ; -} - -/* Accessor methods for yylval and yylloc */ - -YYSTYPE * _mesa_glsl_get_lval (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylval; -} - -void _mesa_glsl_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; -} - -YYLTYPE *_mesa_glsl_get_lloc (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylloc; -} - -void _mesa_glsl_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylloc = yylloc_param; -} - -/* User-visible API */ - -/* _mesa_glsl_lex_init is special because it creates the scanner itself, so it is - * the ONLY reentrant function that doesn't take the scanner as the last argument. - * That's why we explicitly handle the declaration, instead of using our macros. - */ - -int _mesa_glsl_lex_init(yyscan_t* ptr_yy_globals) - -{ - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) _mesa_glsl_alloc ( sizeof( struct yyguts_t ), NULL ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - return yy_init_globals ( *ptr_yy_globals ); -} - -/* _mesa_glsl_lex_init_extra has the same functionality as _mesa_glsl_lex_init, but follows the - * convention of taking the scanner as the last argument. Note however, that - * this is a *pointer* to a scanner, as it will be allocated by this call (and - * is the reason, too, why this function also must handle its own declaration). - * The user defined value in the first argument will be available to _mesa_glsl_alloc in - * the yyextra field. - */ - -int _mesa_glsl_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) - -{ - struct yyguts_t dummy_yyguts; - - _mesa_glsl_set_extra (yy_user_defined, &dummy_yyguts); - - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) _mesa_glsl_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - _mesa_glsl_set_extra (yy_user_defined, *ptr_yy_globals); - - return yy_init_globals ( *ptr_yy_globals ); -} - -static int yy_init_globals (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from _mesa_glsl_lex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = 0; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = (char *) 0; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = (FILE *) 0; - yyout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * _mesa_glsl_lex_init() - */ - return 0; -} - -/* _mesa_glsl_lex_destroy is for both reentrant and non-reentrant scanners. */ -int _mesa_glsl_lex_destroy (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - _mesa_glsl__delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - _mesa_glsl_pop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - _mesa_glsl_free(yyg->yy_buffer_stack ,yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - _mesa_glsl_free(yyg->yy_start_stack ,yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * _mesa_glsl_lex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - _mesa_glsl_free ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) -{ - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) -{ - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *_mesa_glsl_alloc (yy_size_t size , yyscan_t yyscanner) -{ - return (void *) malloc( size ); -} - -void *_mesa_glsl_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) -{ - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void _mesa_glsl_free (void * ptr , yyscan_t yyscanner) -{ - free( (char *) ptr ); /* see _mesa_glsl_realloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 482 "src/glsl/glsl_lexer.ll" - - - -int -classify_identifier(struct _mesa_glsl_parse_state *state, const char *name) -{ - if (state->symbols->get_variable(name) || state->symbols->get_function(name)) - return IDENTIFIER; - else if (state->symbols->get_type(name)) - return TYPE_IDENTIFIER; - else - return NEW_IDENTIFIER; -} - -void -_mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state, const char *string) -{ - _mesa_glsl_lex_init_extra(state,& state->scanner); - _mesa_glsl__scan_string(string,state->scanner); -} - -void -_mesa_glsl_lexer_dtor(struct _mesa_glsl_parse_state *state) -{ - _mesa_glsl_lex_destroy(state->scanner); -} - diff --git a/dll/opengl/mesa/generated/glsl/glsl_parser.cpp b/dll/opengl/mesa/generated/glsl/glsl_parser.cpp deleted file mode 100644 index cf075cc648f..00000000000 --- a/dll/opengl/mesa/generated/glsl/glsl_parser.cpp +++ /dev/null @@ -1,5690 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.5. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.5" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 1 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - -/* Using locations. */ -#define YYLSP_NEEDED 1 - -/* Substitute the variable and function names. */ -#define yyparse _mesa_glsl_parse -#define yylex _mesa_glsl_lex -#define yyerror _mesa_glsl_error -#define yylval _mesa_glsl_lval -#define yychar _mesa_glsl_char -#define yydebug _mesa_glsl_debug -#define yynerrs _mesa_glsl_nerrs -#define yylloc _mesa_glsl_lloc - -/* Copy the first part of user declarations. */ - -/* Line 268 of yacc.c */ -#line 1 "src/glsl/glsl_parser.yy" - -/* - * Copyright © 2008, 2009 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ -#include -#include -#include -#include - -#include "ast.h" -#include "glsl_parser_extras.h" -#include "glsl_types.h" - -#define YYLEX_PARAM state->scanner - -#undef yyerror - -static void yyerror(YYLTYPE *loc, _mesa_glsl_parse_state *st, const char *msg) -{ - _mesa_glsl_error(loc, st, "%s", msg); -} - - -/* Line 268 of yacc.c */ -#line 122 "build/windows-x86/glsl/glsl_parser.cpp" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 1 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - ATTRIBUTE = 258, - CONST_TOK = 259, - BOOL_TOK = 260, - FLOAT_TOK = 261, - INT_TOK = 262, - UINT_TOK = 263, - BREAK = 264, - CONTINUE = 265, - DO = 266, - ELSE = 267, - FOR = 268, - IF = 269, - DISCARD = 270, - RETURN = 271, - SWITCH = 272, - CASE = 273, - DEFAULT = 274, - BVEC2 = 275, - BVEC3 = 276, - BVEC4 = 277, - IVEC2 = 278, - IVEC3 = 279, - IVEC4 = 280, - UVEC2 = 281, - UVEC3 = 282, - UVEC4 = 283, - VEC2 = 284, - VEC3 = 285, - VEC4 = 286, - CENTROID = 287, - IN_TOK = 288, - OUT_TOK = 289, - INOUT_TOK = 290, - UNIFORM = 291, - VARYING = 292, - NOPERSPECTIVE = 293, - FLAT = 294, - SMOOTH = 295, - MAT2X2 = 296, - MAT2X3 = 297, - MAT2X4 = 298, - MAT3X2 = 299, - MAT3X3 = 300, - MAT3X4 = 301, - MAT4X2 = 302, - MAT4X3 = 303, - MAT4X4 = 304, - SAMPLER1D = 305, - SAMPLER2D = 306, - SAMPLER3D = 307, - SAMPLERCUBE = 308, - SAMPLER1DSHADOW = 309, - SAMPLER2DSHADOW = 310, - SAMPLERCUBESHADOW = 311, - SAMPLER1DARRAY = 312, - SAMPLER2DARRAY = 313, - SAMPLER1DARRAYSHADOW = 314, - SAMPLER2DARRAYSHADOW = 315, - ISAMPLER1D = 316, - ISAMPLER2D = 317, - ISAMPLER3D = 318, - ISAMPLERCUBE = 319, - ISAMPLER1DARRAY = 320, - ISAMPLER2DARRAY = 321, - USAMPLER1D = 322, - USAMPLER2D = 323, - USAMPLER3D = 324, - USAMPLERCUBE = 325, - USAMPLER1DARRAY = 326, - USAMPLER2DARRAY = 327, - SAMPLEREXTERNALOES = 328, - STRUCT = 329, - VOID_TOK = 330, - WHILE = 331, - IDENTIFIER = 332, - TYPE_IDENTIFIER = 333, - NEW_IDENTIFIER = 334, - FLOATCONSTANT = 335, - INTCONSTANT = 336, - UINTCONSTANT = 337, - BOOLCONSTANT = 338, - FIELD_SELECTION = 339, - LEFT_OP = 340, - RIGHT_OP = 341, - INC_OP = 342, - DEC_OP = 343, - LE_OP = 344, - GE_OP = 345, - EQ_OP = 346, - NE_OP = 347, - AND_OP = 348, - OR_OP = 349, - XOR_OP = 350, - MUL_ASSIGN = 351, - DIV_ASSIGN = 352, - ADD_ASSIGN = 353, - MOD_ASSIGN = 354, - LEFT_ASSIGN = 355, - RIGHT_ASSIGN = 356, - AND_ASSIGN = 357, - XOR_ASSIGN = 358, - OR_ASSIGN = 359, - SUB_ASSIGN = 360, - INVARIANT = 361, - LOWP = 362, - MEDIUMP = 363, - HIGHP = 364, - SUPERP = 365, - PRECISION = 366, - VERSION_TOK = 367, - EXTENSION = 368, - LINE = 369, - COLON = 370, - EOL = 371, - INTERFACE = 372, - OUTPUT = 373, - PRAGMA_DEBUG_ON = 374, - PRAGMA_DEBUG_OFF = 375, - PRAGMA_OPTIMIZE_ON = 376, - PRAGMA_OPTIMIZE_OFF = 377, - PRAGMA_INVARIANT_ALL = 378, - LAYOUT_TOK = 379, - ASM = 380, - CLASS = 381, - UNION = 382, - ENUM = 383, - TYPEDEF = 384, - TEMPLATE = 385, - THIS = 386, - PACKED_TOK = 387, - GOTO = 388, - INLINE_TOK = 389, - NOINLINE = 390, - VOLATILE = 391, - PUBLIC_TOK = 392, - STATIC = 393, - EXTERN = 394, - EXTERNAL = 395, - LONG_TOK = 396, - SHORT_TOK = 397, - DOUBLE_TOK = 398, - HALF = 399, - FIXED_TOK = 400, - UNSIGNED = 401, - INPUT_TOK = 402, - OUPTUT = 403, - HVEC2 = 404, - HVEC3 = 405, - HVEC4 = 406, - DVEC2 = 407, - DVEC3 = 408, - DVEC4 = 409, - FVEC2 = 410, - FVEC3 = 411, - FVEC4 = 412, - SAMPLER2DRECT = 413, - SAMPLER3DRECT = 414, - SAMPLER2DRECTSHADOW = 415, - SIZEOF = 416, - CAST = 417, - NAMESPACE = 418, - USING = 419, - ERROR_TOK = 420, - COMMON = 421, - PARTITION = 422, - ACTIVE = 423, - SAMPLERBUFFER = 424, - FILTER = 425, - IMAGE1D = 426, - IMAGE2D = 427, - IMAGE3D = 428, - IMAGECUBE = 429, - IMAGE1DARRAY = 430, - IMAGE2DARRAY = 431, - IIMAGE1D = 432, - IIMAGE2D = 433, - IIMAGE3D = 434, - IIMAGECUBE = 435, - IIMAGE1DARRAY = 436, - IIMAGE2DARRAY = 437, - UIMAGE1D = 438, - UIMAGE2D = 439, - UIMAGE3D = 440, - UIMAGECUBE = 441, - UIMAGE1DARRAY = 442, - UIMAGE2DARRAY = 443, - IMAGE1DSHADOW = 444, - IMAGE2DSHADOW = 445, - IMAGEBUFFER = 446, - IIMAGEBUFFER = 447, - UIMAGEBUFFER = 448, - IMAGE1DARRAYSHADOW = 449, - IMAGE2DARRAYSHADOW = 450, - ROW_MAJOR = 451 - }; -#endif - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ - -/* Line 293 of yacc.c */ -#line 58 "src/glsl/glsl_parser.yy" - - int n; - float real; - char *identifier; - - struct ast_type_qualifier type_qualifier; - - ast_node *node; - ast_type_specifier *type_specifier; - ast_fully_specified_type *fully_specified_type; - ast_function *function; - ast_parameter_declarator *parameter_declarator; - ast_function_definition *function_definition; - ast_compound_statement *compound_statement; - ast_expression *expression; - ast_declarator_list *declarator_list; - ast_struct_specifier *struct_specifier; - ast_declaration *declaration; - ast_switch_body *switch_body; - ast_case_label *case_label; - ast_case_label_list *case_label_list; - ast_case_statement *case_statement; - ast_case_statement_list *case_statement_list; - - struct { - ast_node *cond; - ast_expression *rest; - } for_rest_statement; - - struct { - ast_node *then_statement; - ast_node *else_statement; - } selection_rest_statement; - - - -/* Line 293 of yacc.c */ -#line 391 "build/windows-x86/glsl/glsl_parser.cpp" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 -#endif - - -/* Copy the second part of user declarations. */ - - -/* Line 343 of yacc.c */ -#line 416 "build/windows-x86/glsl/glsl_parser.cpp" - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) -#else -# define YYUSE(e) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; -#endif -{ - return yyi; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 5 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 3941 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 221 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 97 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 299 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 445 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 451 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 205, 2, 2, 2, 209, 212, 2, - 197, 198, 207, 203, 202, 204, 201, 208, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 216, 218, - 210, 217, 211, 215, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 199, 2, 200, 213, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 219, 214, 220, 206, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 196 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 4, 9, 10, 14, 17, 20, 23, - 26, 29, 30, 33, 35, 37, 39, 45, 47, 50, - 52, 54, 56, 58, 60, 62, 64, 68, 70, 75, - 77, 81, 84, 87, 89, 91, 93, 97, 100, 103, - 106, 108, 111, 115, 118, 120, 122, 124, 127, 130, - 133, 135, 138, 142, 145, 147, 150, 153, 156, 158, - 160, 162, 164, 166, 170, 174, 178, 180, 184, 188, - 190, 194, 198, 200, 204, 208, 212, 216, 218, 222, - 226, 228, 232, 234, 238, 240, 244, 246, 250, 252, - 256, 258, 262, 264, 270, 272, 276, 278, 280, 282, - 284, 286, 288, 290, 292, 294, 296, 298, 300, 304, - 306, 309, 312, 317, 320, 322, 324, 327, 331, 335, - 338, 344, 348, 351, 355, 358, 359, 361, 363, 365, - 367, 369, 373, 379, 386, 394, 403, 409, 411, 414, - 419, 425, 432, 440, 445, 448, 450, 453, 458, 460, - 464, 466, 470, 472, 474, 476, 478, 480, 482, 485, - 487, 490, 493, 497, 499, 501, 503, 505, 508, 510, - 512, 515, 518, 520, 522, 525, 527, 531, 536, 538, - 540, 542, 544, 546, 548, 550, 552, 554, 556, 558, - 560, 562, 564, 566, 568, 570, 572, 574, 576, 578, - 580, 582, 584, 586, 588, 590, 592, 594, 596, 598, - 600, 602, 604, 606, 608, 610, 612, 614, 616, 618, - 620, 622, 624, 626, 628, 630, 632, 634, 636, 638, - 640, 642, 644, 646, 648, 650, 652, 658, 663, 665, - 668, 672, 674, 678, 680, 685, 687, 689, 691, 693, - 695, 697, 699, 701, 703, 705, 708, 709, 714, 716, - 718, 721, 725, 727, 730, 732, 735, 741, 745, 747, - 749, 754, 760, 763, 767, 771, 774, 776, 779, 782, - 785, 787, 790, 796, 804, 811, 813, 815, 817, 818, - 821, 825, 828, 831, 834, 838, 841, 843, 845, 847 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int16 yyrhs[] = -{ - 222, 0, -1, -1, 224, 226, 223, 229, -1, -1, - 112, 81, 116, -1, 119, 116, -1, 120, 116, -1, - 121, 116, -1, 122, 116, -1, 123, 116, -1, -1, - 226, 228, -1, 77, -1, 78, -1, 79, -1, 113, - 227, 115, 227, 116, -1, 316, -1, 229, 316, -1, - 77, -1, 79, -1, 230, -1, 81, -1, 82, -1, - 80, -1, 83, -1, 197, 261, 198, -1, 231, -1, - 232, 199, 233, 200, -1, 234, -1, 232, 201, 227, - -1, 232, 87, -1, 232, 88, -1, 261, -1, 235, - -1, 236, -1, 232, 201, 241, -1, 238, 198, -1, - 237, 198, -1, 239, 75, -1, 239, -1, 239, 259, - -1, 238, 202, 259, -1, 240, 197, -1, 282, -1, - 230, -1, 84, -1, 243, 198, -1, 242, 198, -1, - 244, 75, -1, 244, -1, 244, 259, -1, 243, 202, - 259, -1, 230, 197, -1, 232, -1, 87, 245, -1, - 88, 245, -1, 246, 245, -1, 203, -1, 204, -1, - 205, -1, 206, -1, 245, -1, 247, 207, 245, -1, - 247, 208, 245, -1, 247, 209, 245, -1, 247, -1, - 248, 203, 247, -1, 248, 204, 247, -1, 248, -1, - 249, 85, 248, -1, 249, 86, 248, -1, 249, -1, - 250, 210, 249, -1, 250, 211, 249, -1, 250, 89, - 249, -1, 250, 90, 249, -1, 250, -1, 251, 91, - 250, -1, 251, 92, 250, -1, 251, -1, 252, 212, - 251, -1, 252, -1, 253, 213, 252, -1, 253, -1, - 254, 214, 253, -1, 254, -1, 255, 93, 254, -1, - 255, -1, 256, 95, 255, -1, 256, -1, 257, 94, - 256, -1, 257, -1, 257, 215, 261, 216, 259, -1, - 258, -1, 245, 260, 259, -1, 217, -1, 96, -1, - 97, -1, 99, -1, 98, -1, 105, -1, 100, -1, - 101, -1, 102, -1, 103, -1, 104, -1, 259, -1, - 261, 202, 259, -1, 258, -1, 264, 218, -1, 272, - 218, -1, 111, 286, 283, 218, -1, 265, 198, -1, - 267, -1, 266, -1, 267, 269, -1, 266, 202, 269, - -1, 274, 230, 197, -1, 282, 227, -1, 282, 227, - 199, 262, 200, -1, 279, 270, 268, -1, 270, 268, - -1, 279, 270, 271, -1, 270, 271, -1, -1, 33, - -1, 34, -1, 35, -1, 282, -1, 273, -1, 272, - 202, 227, -1, 272, 202, 227, 199, 200, -1, 272, - 202, 227, 199, 262, 200, -1, 272, 202, 227, 199, - 200, 217, 292, -1, 272, 202, 227, 199, 262, 200, - 217, 292, -1, 272, 202, 227, 217, 292, -1, 274, - -1, 274, 227, -1, 274, 227, 199, 200, -1, 274, - 227, 199, 262, 200, -1, 274, 227, 199, 200, 217, - 292, -1, 274, 227, 199, 262, 200, 217, 292, -1, - 274, 227, 217, 292, -1, 106, 230, -1, 282, -1, - 280, 282, -1, 124, 197, 276, 198, -1, 277, -1, - 276, 202, 277, -1, 227, -1, 227, 217, 81, -1, - 40, -1, 39, -1, 38, -1, 4, -1, 281, -1, - 275, -1, 275, 281, -1, 278, -1, 278, 281, -1, - 106, 281, -1, 106, 278, 281, -1, 106, -1, 4, - -1, 3, -1, 37, -1, 32, 37, -1, 33, -1, - 34, -1, 32, 33, -1, 32, 34, -1, 36, -1, - 283, -1, 286, 283, -1, 284, -1, 284, 199, 200, - -1, 284, 199, 262, 200, -1, 285, -1, 287, -1, - 78, -1, 75, -1, 6, -1, 7, -1, 8, -1, - 5, -1, 29, -1, 30, -1, 31, -1, 20, -1, - 21, -1, 22, -1, 23, -1, 24, -1, 25, -1, - 26, -1, 27, -1, 28, -1, 41, -1, 42, -1, - 43, -1, 44, -1, 45, -1, 46, -1, 47, -1, - 48, -1, 49, -1, 50, -1, 51, -1, 158, -1, - 52, -1, 53, -1, 73, -1, 54, -1, 55, -1, - 160, -1, 56, -1, 57, -1, 58, -1, 59, -1, - 60, -1, 61, -1, 62, -1, 63, -1, 64, -1, - 65, -1, 66, -1, 67, -1, 68, -1, 69, -1, - 70, -1, 71, -1, 72, -1, 109, -1, 108, -1, - 107, -1, 74, 227, 219, 288, 220, -1, 74, 219, - 288, 220, -1, 289, -1, 288, 289, -1, 282, 290, - 218, -1, 291, -1, 290, 202, 291, -1, 227, -1, - 227, 199, 262, 200, -1, 259, -1, 263, -1, 296, - -1, 295, -1, 293, -1, 301, -1, 302, -1, 305, - -1, 311, -1, 315, -1, 219, 220, -1, -1, 219, - 297, 300, 220, -1, 299, -1, 295, -1, 219, 220, - -1, 219, 300, 220, -1, 294, -1, 300, 294, -1, - 218, -1, 261, 218, -1, 14, 197, 261, 198, 303, - -1, 294, 12, 294, -1, 294, -1, 261, -1, 274, - 227, 217, 292, -1, 17, 197, 261, 198, 306, -1, - 219, 220, -1, 219, 310, 220, -1, 18, 261, 216, - -1, 19, 216, -1, 307, -1, 308, 307, -1, 308, - 294, -1, 309, 294, -1, 309, -1, 310, 309, -1, - 76, 197, 304, 198, 298, -1, 11, 294, 76, 197, - 261, 198, 218, -1, 13, 197, 312, 314, 198, 298, - -1, 301, -1, 293, -1, 304, -1, -1, 313, 218, - -1, 313, 218, 261, -1, 10, 218, -1, 9, 218, - -1, 16, 218, -1, 16, 261, 218, -1, 15, 218, - -1, 317, -1, 263, -1, 225, -1, 264, 299, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 236, 236, 235, 247, 249, 289, 290, 291, 292, - 293, 305, 307, 311, 312, 313, 317, 326, 334, 345, - 346, 350, 357, 364, 371, 378, 385, 392, 393, 399, - 403, 410, 416, 425, 429, 433, 434, 443, 444, 448, - 449, 453, 459, 471, 475, 481, 488, 498, 499, 503, - 504, 508, 514, 526, 537, 538, 544, 550, 560, 561, - 562, 563, 567, 568, 574, 580, 589, 590, 596, 605, - 606, 612, 621, 622, 628, 634, 640, 649, 650, 656, - 665, 666, 675, 676, 685, 686, 695, 696, 705, 706, - 715, 716, 725, 726, 735, 736, 745, 746, 747, 748, - 749, 750, 751, 752, 753, 754, 755, 759, 763, 779, - 783, 788, 792, 801, 805, 806, 810, 815, 823, 837, - 847, 862, 869, 874, 885, 898, 901, 906, 911, 920, - 924, 925, 935, 945, 955, 965, 975, 989, 996, 1005, - 1014, 1023, 1032, 1041, 1050, 1064, 1071, 1082, 1089, 1090, - 1109, 1168, 1209, 1214, 1219, 1227, 1235, 1236, 1237, 1242, - 1243, 1248, 1253, 1259, 1267, 1272, 1277, 1282, 1288, 1293, - 1298, 1303, 1308, 1316, 1320, 1328, 1329, 1335, 1344, 1350, - 1356, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, - 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383, - 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 1393, - 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, - 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, - 1414, 1415, 1416, 1420, 1430, 1440, 1453, 1460, 1469, 1474, - 1482, 1497, 1502, 1510, 1517, 1526, 1530, 1536, 1537, 1541, - 1542, 1543, 1544, 1545, 1546, 1550, 1557, 1556, 1570, 1571, - 1575, 1581, 1590, 1600, 1612, 1618, 1627, 1636, 1641, 1649, - 1653, 1671, 1679, 1684, 1692, 1697, 1705, 1713, 1721, 1729, - 1737, 1745, 1753, 1760, 1767, 1777, 1778, 1782, 1784, 1790, - 1795, 1804, 1810, 1816, 1822, 1828, 1837, 1838, 1839, 1843 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "ATTRIBUTE", "CONST_TOK", "BOOL_TOK", - "FLOAT_TOK", "INT_TOK", "UINT_TOK", "BREAK", "CONTINUE", "DO", "ELSE", - "FOR", "IF", "DISCARD", "RETURN", "SWITCH", "CASE", "DEFAULT", "BVEC2", - "BVEC3", "BVEC4", "IVEC2", "IVEC3", "IVEC4", "UVEC2", "UVEC3", "UVEC4", - "VEC2", "VEC3", "VEC4", "CENTROID", "IN_TOK", "OUT_TOK", "INOUT_TOK", - "UNIFORM", "VARYING", "NOPERSPECTIVE", "FLAT", "SMOOTH", "MAT2X2", - "MAT2X3", "MAT2X4", "MAT3X2", "MAT3X3", "MAT3X4", "MAT4X2", "MAT4X3", - "MAT4X4", "SAMPLER1D", "SAMPLER2D", "SAMPLER3D", "SAMPLERCUBE", - "SAMPLER1DSHADOW", "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", - "SAMPLER1DARRAY", "SAMPLER2DARRAY", "SAMPLER1DARRAYSHADOW", - "SAMPLER2DARRAYSHADOW", "ISAMPLER1D", "ISAMPLER2D", "ISAMPLER3D", - "ISAMPLERCUBE", "ISAMPLER1DARRAY", "ISAMPLER2DARRAY", "USAMPLER1D", - "USAMPLER2D", "USAMPLER3D", "USAMPLERCUBE", "USAMPLER1DARRAY", - "USAMPLER2DARRAY", "SAMPLEREXTERNALOES", "STRUCT", "VOID_TOK", "WHILE", - "IDENTIFIER", "TYPE_IDENTIFIER", "NEW_IDENTIFIER", "FLOATCONSTANT", - "INTCONSTANT", "UINTCONSTANT", "BOOLCONSTANT", "FIELD_SELECTION", - "LEFT_OP", "RIGHT_OP", "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", - "NE_OP", "AND_OP", "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", - "ADD_ASSIGN", "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", - "XOR_ASSIGN", "OR_ASSIGN", "SUB_ASSIGN", "INVARIANT", "LOWP", "MEDIUMP", - "HIGHP", "SUPERP", "PRECISION", "VERSION_TOK", "EXTENSION", "LINE", - "COLON", "EOL", "INTERFACE", "OUTPUT", "PRAGMA_DEBUG_ON", - "PRAGMA_DEBUG_OFF", "PRAGMA_OPTIMIZE_ON", "PRAGMA_OPTIMIZE_OFF", - "PRAGMA_INVARIANT_ALL", "LAYOUT_TOK", "ASM", "CLASS", "UNION", "ENUM", - "TYPEDEF", "TEMPLATE", "THIS", "PACKED_TOK", "GOTO", "INLINE_TOK", - "NOINLINE", "VOLATILE", "PUBLIC_TOK", "STATIC", "EXTERN", "EXTERNAL", - "LONG_TOK", "SHORT_TOK", "DOUBLE_TOK", "HALF", "FIXED_TOK", "UNSIGNED", - "INPUT_TOK", "OUPTUT", "HVEC2", "HVEC3", "HVEC4", "DVEC2", "DVEC3", - "DVEC4", "FVEC2", "FVEC3", "FVEC4", "SAMPLER2DRECT", "SAMPLER3DRECT", - "SAMPLER2DRECTSHADOW", "SIZEOF", "CAST", "NAMESPACE", "USING", - "ERROR_TOK", "COMMON", "PARTITION", "ACTIVE", "SAMPLERBUFFER", "FILTER", - "IMAGE1D", "IMAGE2D", "IMAGE3D", "IMAGECUBE", "IMAGE1DARRAY", - "IMAGE2DARRAY", "IIMAGE1D", "IIMAGE2D", "IIMAGE3D", "IIMAGECUBE", - "IIMAGE1DARRAY", "IIMAGE2DARRAY", "UIMAGE1D", "UIMAGE2D", "UIMAGE3D", - "UIMAGECUBE", "UIMAGE1DARRAY", "UIMAGE2DARRAY", "IMAGE1DSHADOW", - "IMAGE2DSHADOW", "IMAGEBUFFER", "IIMAGEBUFFER", "UIMAGEBUFFER", - "IMAGE1DARRAYSHADOW", "IMAGE2DARRAYSHADOW", "ROW_MAJOR", "'('", "')'", - "'['", "']'", "'.'", "','", "'+'", "'-'", "'!'", "'~'", "'*'", "'/'", - "'%'", "'<'", "'>'", "'&'", "'^'", "'|'", "'?'", "':'", "'='", "';'", - "'{'", "'}'", "$accept", "translation_unit", "$@1", "version_statement", - "pragma_statement", "extension_statement_list", "any_identifier", - "extension_statement", "external_declaration_list", - "variable_identifier", "primary_expression", "postfix_expression", - "integer_expression", "function_call", "function_call_or_method", - "function_call_generic", "function_call_header_no_parameters", - "function_call_header_with_parameters", "function_call_header", - "function_identifier", "method_call_generic", - "method_call_header_no_parameters", "method_call_header_with_parameters", - "method_call_header", "unary_expression", "unary_operator", - "multiplicative_expression", "additive_expression", "shift_expression", - "relational_expression", "equality_expression", "and_expression", - "exclusive_or_expression", "inclusive_or_expression", - "logical_and_expression", "logical_xor_expression", - "logical_or_expression", "conditional_expression", - "assignment_expression", "assignment_operator", "expression", - "constant_expression", "declaration", "function_prototype", - "function_declarator", "function_header_with_parameters", - "function_header", "parameter_declarator", "parameter_declaration", - "parameter_qualifier", "parameter_type_specifier", - "init_declarator_list", "single_declaration", "fully_specified_type", - "layout_qualifier", "layout_qualifier_id_list", "layout_qualifier_id", - "interpolation_qualifier", "parameter_type_qualifier", "type_qualifier", - "storage_qualifier", "type_specifier", "type_specifier_no_prec", - "type_specifier_nonarray", "basic_type_specifier_nonarray", - "precision_qualifier", "struct_specifier", "struct_declaration_list", - "struct_declaration", "struct_declarator_list", "struct_declarator", - "initializer", "declaration_statement", "statement", "simple_statement", - "compound_statement", "$@2", "statement_no_new_scope", - "compound_statement_no_new_scope", "statement_list", - "expression_statement", "selection_statement", - "selection_rest_statement", "condition", "switch_statement", - "switch_body", "case_label", "case_label_list", "case_statement", - "case_statement_list", "iteration_statement", "for_init_statement", - "conditionopt", "for_rest_statement", "jump_statement", - "external_declaration", "function_definition", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, - 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, - 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, - 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, - 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, - 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, - 445, 446, 447, 448, 449, 450, 451, 40, 41, 91, - 93, 46, 44, 43, 45, 33, 126, 42, 47, 37, - 60, 62, 38, 94, 124, 63, 58, 61, 59, 123, - 125 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint16 yyr1[] = -{ - 0, 221, 223, 222, 224, 224, 225, 225, 225, 225, - 225, 226, 226, 227, 227, 227, 228, 229, 229, 230, - 230, 231, 231, 231, 231, 231, 231, 232, 232, 232, - 232, 232, 232, 233, 234, 235, 235, 236, 236, 237, - 237, 238, 238, 239, 240, 240, 240, 241, 241, 242, - 242, 243, 243, 244, 245, 245, 245, 245, 246, 246, - 246, 246, 247, 247, 247, 247, 248, 248, 248, 249, - 249, 249, 250, 250, 250, 250, 250, 251, 251, 251, - 252, 252, 253, 253, 254, 254, 255, 255, 256, 256, - 257, 257, 258, 258, 259, 259, 260, 260, 260, 260, - 260, 260, 260, 260, 260, 260, 260, 261, 261, 262, - 263, 263, 263, 264, 265, 265, 266, 266, 267, 268, - 268, 269, 269, 269, 269, 270, 270, 270, 270, 271, - 272, 272, 272, 272, 272, 272, 272, 273, 273, 273, - 273, 273, 273, 273, 273, 274, 274, 275, 276, 276, - 277, 277, 278, 278, 278, 279, 280, 280, 280, 280, - 280, 280, 280, 280, 281, 281, 281, 281, 281, 281, - 281, 281, 281, 282, 282, 283, 283, 283, 284, 284, - 284, 285, 285, 285, 285, 285, 285, 285, 285, 285, - 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, - 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, - 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, - 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, - 285, 285, 285, 286, 286, 286, 287, 287, 288, 288, - 289, 290, 290, 291, 291, 292, 293, 294, 294, 295, - 295, 295, 295, 295, 295, 296, 297, 296, 298, 298, - 299, 299, 300, 300, 301, 301, 302, 303, 303, 304, - 304, 305, 306, 306, 307, 307, 308, 308, 309, 309, - 310, 310, 311, 311, 311, 312, 312, 313, 313, 314, - 314, 315, 315, 315, 315, 315, 316, 316, 316, 317 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 0, 4, 0, 3, 2, 2, 2, 2, - 2, 0, 2, 1, 1, 1, 5, 1, 2, 1, - 1, 1, 1, 1, 1, 1, 3, 1, 4, 1, - 3, 2, 2, 1, 1, 1, 3, 2, 2, 2, - 1, 2, 3, 2, 1, 1, 1, 2, 2, 2, - 1, 2, 3, 2, 1, 2, 2, 2, 1, 1, - 1, 1, 1, 3, 3, 3, 1, 3, 3, 1, - 3, 3, 1, 3, 3, 3, 3, 1, 3, 3, - 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, - 1, 3, 1, 5, 1, 3, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, - 2, 2, 4, 2, 1, 1, 2, 3, 3, 2, - 5, 3, 2, 3, 2, 0, 1, 1, 1, 1, - 1, 3, 5, 6, 7, 8, 5, 1, 2, 4, - 5, 6, 7, 4, 2, 1, 2, 4, 1, 3, - 1, 3, 1, 1, 1, 1, 1, 1, 2, 1, - 2, 2, 3, 1, 1, 1, 1, 2, 1, 1, - 2, 2, 1, 1, 2, 1, 3, 4, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 5, 4, 1, 2, - 3, 1, 3, 1, 4, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 2, 0, 4, 1, 1, - 2, 3, 1, 2, 1, 2, 5, 3, 1, 1, - 4, 5, 2, 3, 3, 2, 1, 2, 2, 2, - 1, 2, 5, 7, 6, 1, 1, 1, 0, 2, - 3, 2, 2, 2, 3, 2, 1, 1, 1, 2 -}; - -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint16 yydefact[] = -{ - 4, 0, 0, 11, 0, 1, 2, 5, 0, 0, - 12, 13, 14, 15, 0, 165, 164, 185, 182, 183, - 184, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 186, 187, 188, 0, 168, 169, 172, 166, 154, 153, - 152, 198, 199, 200, 201, 202, 203, 204, 205, 206, - 207, 208, 210, 211, 213, 214, 216, 217, 218, 219, - 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, - 230, 231, 232, 212, 0, 181, 180, 163, 235, 234, - 233, 0, 0, 0, 0, 0, 0, 0, 209, 215, - 298, 3, 297, 0, 0, 115, 125, 0, 130, 137, - 157, 159, 0, 156, 145, 173, 175, 178, 0, 179, - 17, 296, 0, 170, 171, 167, 0, 0, 19, 20, - 144, 0, 161, 0, 6, 7, 8, 9, 10, 0, - 18, 110, 0, 299, 113, 125, 155, 126, 127, 128, - 116, 0, 125, 0, 111, 13, 15, 138, 0, 158, - 160, 146, 0, 174, 0, 0, 0, 238, 0, 162, - 0, 150, 0, 148, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 24, 22, 23, 25, 46, 0, 0, - 0, 58, 59, 60, 61, 264, 256, 260, 21, 27, - 54, 29, 34, 35, 0, 0, 40, 0, 62, 0, - 66, 69, 72, 77, 80, 82, 84, 86, 88, 90, - 92, 94, 107, 0, 246, 0, 145, 249, 262, 248, - 247, 0, 250, 251, 252, 253, 254, 117, 122, 124, - 129, 0, 131, 0, 0, 118, 176, 62, 109, 0, - 44, 16, 243, 0, 241, 237, 239, 0, 112, 0, - 147, 0, 292, 291, 0, 0, 0, 295, 293, 0, - 0, 0, 55, 56, 0, 255, 0, 31, 32, 0, - 0, 38, 37, 0, 181, 41, 43, 97, 98, 100, - 99, 102, 103, 104, 105, 106, 101, 96, 0, 57, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 265, 261, 263, 119, 121, 123, 0, 0, 139, - 0, 245, 143, 177, 0, 0, 240, 236, 151, 149, - 0, 286, 285, 288, 0, 294, 0, 163, 269, 0, - 0, 26, 0, 0, 33, 30, 0, 36, 0, 0, - 50, 42, 95, 63, 64, 65, 67, 68, 70, 71, - 75, 76, 73, 74, 78, 79, 81, 83, 85, 87, - 89, 91, 0, 108, 0, 132, 0, 136, 0, 140, - 0, 242, 0, 287, 0, 0, 0, 0, 0, 0, - 257, 28, 53, 48, 47, 0, 181, 51, 0, 0, - 0, 133, 141, 0, 244, 0, 289, 0, 268, 266, - 0, 271, 0, 259, 282, 258, 52, 93, 120, 134, - 0, 142, 0, 290, 284, 0, 0, 0, 272, 276, - 0, 280, 0, 270, 135, 283, 267, 0, 275, 278, - 277, 279, 273, 281, 274 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 2, 9, 3, 90, 6, 161, 10, 91, 188, - 189, 190, 343, 191, 192, 193, 194, 195, 196, 197, - 347, 348, 349, 350, 198, 199, 200, 201, 202, 203, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 288, - 213, 239, 214, 215, 94, 95, 96, 228, 140, 141, - 229, 97, 98, 99, 100, 162, 163, 101, 142, 102, - 103, 240, 105, 106, 107, 108, 109, 156, 157, 243, - 244, 322, 217, 218, 219, 220, 266, 414, 415, 221, - 222, 223, 409, 340, 224, 411, 429, 430, 431, 432, - 225, 333, 384, 385, 226, 110, 111 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -355 -static const yytype_int16 yypact[] = -{ - -38, -40, 81, -355, -32, -355, -27, -355, 52, 3587, - -355, -355, -355, -355, -26, -355, -355, -355, -355, -355, - -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, - -355, -355, -355, 38, -355, -355, -355, -355, -355, -355, - -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, - -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, - -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, - -355, -355, -355, -355, -67, -355, -355, 251, -355, -355, - -355, 51, -14, -8, 11, 19, 24, -87, -355, -355, - -355, 3587, -355, -162, -107, -46, 15, -180, -355, 96, - 264, 264, 3707, -355, -355, -355, -57, -355, 3781, -355, - -355, -355, 52, -355, -355, -355, 3707, -48, -355, -355, - -355, 264, -355, 3781, -355, -355, -355, -355, -355, 52, - -355, -355, 422, -355, -355, 29, -355, -355, -355, -355, - -355, 3707, 143, 52, -355, -17, -12, -178, 18, -355, - -355, -355, 2465, -355, 73, 52, 1834, -355, 3707, -355, - 3, 9, -168, -355, 10, 14, 1293, 30, 33, 17, - 2074, 40, 44, -355, -355, -355, -355, -355, 3026, 3026, - 3026, -355, -355, -355, -355, -355, -11, -355, 47, -355, - -60, -355, -355, -355, 49, -125, 3213, 48, 16, 3026, - -25, -138, 12, -66, 46, 37, 45, 36, 158, 164, - -81, -355, -355, -171, -355, 35, 64, -355, -355, -355, - -355, 640, -355, -355, -355, -355, -355, -355, -355, -355, - 52, 3707, -163, 2652, 3026, -355, -355, -355, -355, 65, - -355, -355, 82, -160, -355, -355, -355, 1954, -355, 199, - -355, 52, -355, -355, 210, 1714, 3026, -355, -355, -157, - 3026, 2278, -355, -355, -122, -355, 1293, -355, -355, 3026, - 96, -355, -355, 3026, 94, -355, -355, -355, -355, -355, - -355, -355, -355, -355, -355, -355, -355, -355, 3026, -355, - 3026, 3026, 3026, 3026, 3026, 3026, 3026, 3026, 3026, 3026, - 3026, 3026, 3026, 3026, 3026, 3026, 3026, 3026, 3026, 3026, - 3026, -355, -355, -355, 95, -355, -355, 2839, 3026, 76, - 99, -355, -355, -355, 3026, 52, -355, -355, -355, -355, - 98, -355, -355, 2278, -115, -355, -102, 239, 100, 52, - 105, -355, 858, 104, 100, -355, 108, -355, 109, -76, - 3400, -355, -355, -355, -355, -355, -25, -25, -138, -138, - 12, 12, 12, 12, -66, -66, 46, 37, 45, 36, - 158, 164, -165, -355, 3026, 89, 110, -355, 3026, 91, - 111, -355, 3026, -355, 97, 114, 1293, 90, 102, 1510, - -355, -355, -355, -355, -355, 3026, 115, -355, 3026, 116, - 3026, 103, -355, 3026, -355, -47, 3026, 1510, 302, -355, - -10, -355, 3026, -355, -355, -355, -355, -355, -355, -355, - 3026, -355, 107, 100, -355, 1293, 3026, 101, -355, -355, - 1076, 1293, -2, -355, -355, -355, -355, -147, -355, -355, - -355, -355, -355, 1293, -355 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -355, -355, -355, -355, -355, -355, -7, -355, -355, -59, - -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, - -355, -355, -355, -355, -100, -355, -106, -127, -134, -82, - 20, 22, 26, 21, 27, 13, -355, -145, -164, -355, - -166, -213, -6, 34, -355, -355, -355, 106, 187, 193, - 112, -355, -355, -232, -355, -355, 78, -71, -355, -355, - -75, -9, -64, -355, -355, 255, -355, 180, -141, -355, - 23, -250, 84, -161, -354, -355, -355, -65, 247, 75, - 92, -355, -355, 25, -355, -355, -86, -355, -83, -355, - -355, -355, -355, -355, -355, 254, -355 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -115 -static const yytype_int16 yytable[] = -{ - 104, 14, 122, 92, 259, 254, 121, 238, 426, 427, - 11, 12, 13, 308, 264, 246, 426, 427, 120, 136, - 320, 233, 143, 297, 298, 149, 150, 267, 268, 339, - 250, 310, 275, 136, 251, 413, 317, 310, 144, 234, - 148, 4, 325, 93, 153, 310, 159, 311, 137, 138, - 139, 398, 237, 413, 318, 310, 131, 132, 326, 160, - 313, 335, 137, 138, 139, 293, 294, 117, 377, 444, - 321, 113, 114, 272, 1, 115, 341, 273, 262, 263, - 310, 5, 104, 386, 7, 92, 8, 310, 238, 112, - 334, 134, 147, 151, 336, 338, 387, 295, 296, 289, - 310, 339, 124, 344, 376, 154, 246, 155, 125, 351, - 129, 380, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 394, 216, 352, 93, 395, 126, 402, 11, - 12, 13, 230, 237, 309, 127, 232, 301, 302, 269, - 128, 270, 152, 372, 299, 300, 373, 155, 242, 155, - 419, 422, 116, 421, 321, 310, 135, 216, 78, 79, - 80, 399, 433, 360, 361, 362, 363, 338, 358, 359, - 434, 158, 238, 145, 12, 146, 137, 138, 139, 238, - -19, 313, 290, 291, 292, -20, 397, 356, 357, 241, - 353, 354, 355, 237, 237, 237, 237, 237, 237, 237, - 237, 237, 237, 237, 237, 237, 237, 237, 237, 265, - 428, 346, 216, -114, 321, 235, 405, 237, 442, 364, - 365, 248, 230, 314, 237, 408, 249, 255, 252, 238, - 256, 416, 253, 287, 417, 257, 321, 260, 155, 321, - 423, 261, 15, 16, -45, 276, 216, 271, 321, 303, - 305, 306, 216, 131, 15, 16, 321, 216, 304, 307, - 437, -44, 122, 345, 436, 323, 121, 15, 16, 439, - 441, 33, 34, 35, 237, 36, 37, 38, 39, 40, - 328, 324, 441, 33, 34, 35, 330, 36, 37, 38, - 39, 40, -39, 378, 374, 382, 33, 34, 35, 379, - 36, 37, 310, 389, 391, 392, 400, 393, 403, 410, - 401, 404, 407, -49, 425, 406, 418, 438, 242, 412, - 420, 371, 227, 366, 216, 435, 367, 369, 118, 329, - 119, 368, 388, 216, 370, 231, 123, 315, 247, 331, - 133, 342, 424, 316, 440, 130, 0, 332, 381, 443, - 0, 0, 0, 0, 0, 0, 0, 0, 383, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 216, 0, 0, - 216, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 216, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 216, 0, 0, 0, - 0, 216, 216, 0, 0, 15, 16, 17, 18, 19, - 20, 164, 165, 166, 216, 167, 168, 169, 170, 171, - 0, 0, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 0, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 172, 118, - 76, 119, 173, 174, 175, 176, 177, 0, 0, 178, - 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 77, 78, - 79, 80, 0, 81, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 88, 0, 89, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, - 0, 0, 0, 0, 0, 181, 182, 183, 184, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 185, 186, 187, 15, 16, 17, 18, 19, 20, 164, - 165, 166, 0, 167, 168, 169, 170, 171, 0, 0, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 0, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 172, 118, 76, 119, - 173, 174, 175, 176, 177, 0, 0, 178, 179, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 77, 78, 79, 80, - 0, 81, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 87, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, - 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 180, 0, 0, - 0, 0, 0, 181, 182, 183, 184, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 185, 186, - 312, 15, 16, 17, 18, 19, 20, 164, 165, 166, - 0, 167, 168, 169, 170, 171, 0, 0, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 0, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 172, 118, 76, 119, 173, 174, - 175, 176, 177, 0, 0, 178, 179, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 77, 78, 79, 80, 0, 81, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 88, 0, 89, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 180, 0, 0, 0, 0, - 0, 181, 182, 183, 184, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 185, 186, 390, 15, - 16, 17, 18, 19, 20, 164, 165, 166, 0, 167, - 168, 169, 170, 171, 426, 427, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 0, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 172, 118, 76, 119, 173, 174, 175, 176, - 177, 0, 0, 178, 179, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 77, 78, 79, 80, 0, 81, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 88, 0, 89, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 180, 0, 0, 0, 0, 0, 181, - 182, 183, 184, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 185, 186, 15, 16, 17, 18, - 19, 20, 164, 165, 166, 0, 167, 168, 169, 170, - 171, 0, 0, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 0, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 172, - 118, 76, 119, 173, 174, 175, 176, 177, 0, 0, - 178, 179, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, - 78, 79, 80, 0, 81, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 87, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 88, 0, 89, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 180, 0, 0, 0, 0, 0, 181, 182, 183, 184, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 185, 186, 15, 16, 17, 18, 19, 20, 164, - 165, 166, 0, 167, 168, 169, 170, 171, 0, 0, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 0, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 172, 118, 76, 119, - 173, 174, 175, 176, 177, 0, 0, 178, 179, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 77, 78, 79, 80, - 0, 81, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 87, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, - 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 180, 0, 0, - 0, 0, 0, 181, 182, 183, 184, 15, 16, 17, - 18, 19, 20, 0, 0, 0, 0, 0, 185, 132, - 0, 0, 0, 0, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 0, 118, 76, 119, 173, 174, 175, 176, 177, 0, - 0, 178, 179, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 77, 78, 79, 80, 0, 81, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 87, 17, - 18, 19, 20, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 0, 0, 0, 0, - 0, 0, 88, 0, 89, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 0, 180, 76, 0, 0, 0, 0, 181, 182, 183, - 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 185, 0, 0, 0, 0, 0, 0, 0, - 0, 78, 79, 80, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, - 18, 19, 20, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 0, 0, 0, 0, - 0, 0, 88, 0, 89, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 245, 0, 0, 0, 0, 0, - 0, 78, 79, 80, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, - 18, 19, 20, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 0, 0, 0, 0, - 0, 0, 88, 0, 89, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 0, 118, 76, 119, 173, 174, 175, 176, 177, 0, - 0, 178, 179, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 327, 0, 0, 0, 0, 0, - 0, 78, 79, 80, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 88, 0, 89, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 180, 0, 0, 0, 0, 0, 181, 182, 183, - 184, 15, 16, 17, 18, 19, 20, 0, 0, 0, - 0, 0, 258, 0, 0, 0, 0, 0, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 0, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 0, 118, 76, 119, 173, 174, - 175, 176, 177, 0, 0, 178, 179, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 337, 78, 79, 80, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 88, 0, 89, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 17, 18, 19, 20, 0, 180, 0, 0, 0, 0, - 0, 181, 182, 183, 184, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 0, 118, 76, 119, 173, 174, 175, 176, 177, - 0, 0, 178, 179, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 78, 79, 80, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 88, 0, 89, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 17, 18, 19, - 20, 0, 180, 0, 0, 236, 0, 0, 181, 182, - 183, 184, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 0, 118, - 76, 119, 173, 174, 175, 176, 177, 0, 0, 178, - 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, - 79, 80, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 88, 0, 89, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 17, 18, 19, 20, 0, 180, - 0, 0, 319, 0, 0, 181, 182, 183, 184, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 0, 118, 76, 119, 173, - 174, 175, 176, 177, 0, 0, 178, 179, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 78, 79, 80, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 88, 0, 89, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 17, 18, 19, 20, 0, 180, 0, 0, 375, - 0, 0, 181, 182, 183, 184, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 0, 118, 76, 119, 173, 174, 175, 176, - 177, 0, 0, 178, 179, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 78, 79, 80, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 88, 0, 89, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 17, 18, - 19, 20, 0, 180, 0, 0, 0, 0, 0, 181, - 182, 183, 184, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 274, 0, - 118, 76, 119, 173, 174, 175, 176, 177, 0, 0, - 178, 179, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 78, 79, 80, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 88, 0, 89, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 17, 18, 19, 20, 0, - 180, 0, 0, 0, 0, 0, 181, 182, 183, 184, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 396, 0, 118, 76, 119, - 173, 174, 175, 176, 177, 0, 0, 178, 179, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 78, 79, 80, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, - 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 15, 16, 17, 18, 19, 20, 0, 180, 0, 0, - 0, 0, 0, 181, 182, 183, 184, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 0, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 0, 0, 76, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 77, 78, 79, 80, 0, 81, 0, - 0, 0, 0, 0, 0, 0, 82, 83, 84, 85, - 86, 87, 17, 18, 19, 20, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 0, - 0, 0, 0, 0, 0, 88, 0, 89, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 0, 0, 76, 17, 18, 19, 20, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 0, 78, 79, 80, 0, 0, 0, - 0, 0, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 0, 0, 76, - 0, 0, 0, 0, 0, 88, 0, 89, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, - 0, 89 -}; - -#define yypact_value_is_default(yystate) \ - ((yystate) == (-355)) - -#define yytable_value_is_error(yytable_value) \ - YYID (0) - -static const yytype_int16 yycheck[] = -{ - 9, 8, 77, 9, 170, 166, 77, 152, 18, 19, - 77, 78, 79, 94, 180, 156, 18, 19, 77, 4, - 233, 199, 202, 89, 90, 100, 101, 87, 88, 261, - 198, 202, 196, 4, 202, 389, 199, 202, 218, 217, - 99, 81, 202, 9, 108, 202, 121, 218, 33, 34, - 35, 216, 152, 407, 217, 202, 218, 219, 218, 123, - 221, 218, 33, 34, 35, 203, 204, 74, 318, 216, - 234, 33, 34, 198, 112, 37, 198, 202, 178, 179, - 202, 0, 91, 198, 116, 91, 113, 202, 233, 115, - 256, 198, 99, 102, 260, 261, 198, 85, 86, 199, - 202, 333, 116, 269, 317, 112, 247, 116, 116, 273, - 197, 324, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 198, 132, 288, 91, 202, 116, 378, 77, - 78, 79, 141, 233, 215, 116, 143, 91, 92, 199, - 116, 201, 199, 309, 210, 211, 310, 156, 155, 158, - 400, 198, 219, 403, 318, 202, 202, 166, 107, 108, - 109, 374, 412, 297, 298, 299, 300, 333, 295, 296, - 420, 219, 317, 77, 78, 79, 33, 34, 35, 324, - 197, 342, 207, 208, 209, 197, 350, 293, 294, 116, - 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, - 300, 301, 302, 303, 304, 305, 306, 307, 308, 220, - 220, 270, 221, 198, 378, 197, 382, 317, 220, 301, - 302, 218, 231, 230, 324, 386, 217, 197, 218, 374, - 197, 395, 218, 217, 398, 218, 400, 197, 247, 403, - 406, 197, 3, 4, 197, 197, 255, 198, 412, 212, - 214, 93, 261, 218, 3, 4, 420, 266, 213, 95, - 426, 197, 337, 270, 425, 200, 337, 3, 4, 430, - 431, 32, 33, 34, 374, 36, 37, 38, 39, 40, - 81, 199, 443, 32, 33, 34, 76, 36, 37, 38, - 39, 40, 198, 217, 199, 197, 32, 33, 34, 200, - 36, 37, 202, 198, 200, 197, 217, 198, 217, 219, - 200, 200, 198, 198, 12, 218, 200, 216, 325, 217, - 217, 308, 135, 303, 333, 218, 304, 306, 77, 251, - 79, 305, 339, 342, 307, 142, 81, 231, 158, 255, - 93, 266, 407, 231, 430, 91, -1, 255, 325, 432, - -1, -1, -1, -1, -1, -1, -1, -1, 333, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 386, -1, -1, - 389, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 407, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 425, -1, -1, -1, - -1, 430, 431, -1, -1, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 443, 13, 14, 15, 16, 17, - -1, -1, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, -1, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, -1, -1, 87, - 88, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 106, 107, - 108, 109, -1, 111, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 124, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 158, -1, 160, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 197, - -1, -1, -1, -1, -1, 203, 204, 205, 206, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 218, 219, 220, 3, 4, 5, 6, 7, 8, 9, - 10, 11, -1, 13, 14, 15, 16, 17, -1, -1, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, -1, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, -1, -1, 87, 88, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 106, 107, 108, 109, - -1, 111, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 124, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 158, -1, - 160, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 197, -1, -1, - -1, -1, -1, 203, 204, 205, 206, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 218, 219, - 220, 3, 4, 5, 6, 7, 8, 9, 10, 11, - -1, 13, 14, 15, 16, 17, -1, -1, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, -1, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, -1, -1, 87, 88, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 106, 107, 108, 109, -1, 111, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 124, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 158, -1, 160, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 197, -1, -1, -1, -1, - -1, 203, 204, 205, 206, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 218, 219, 220, 3, - 4, 5, 6, 7, 8, 9, 10, 11, -1, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, -1, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, -1, -1, 87, 88, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 106, 107, 108, 109, -1, 111, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 124, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 158, -1, 160, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 197, -1, -1, -1, -1, -1, 203, - 204, 205, 206, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 218, 219, 3, 4, 5, 6, - 7, 8, 9, 10, 11, -1, 13, 14, 15, 16, - 17, -1, -1, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, -1, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 84, -1, -1, - 87, 88, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 106, - 107, 108, 109, -1, 111, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 124, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 158, -1, 160, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 197, -1, -1, -1, -1, -1, 203, 204, 205, 206, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 218, 219, 3, 4, 5, 6, 7, 8, 9, - 10, 11, -1, 13, 14, 15, 16, 17, -1, -1, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, -1, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, -1, -1, 87, 88, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 106, 107, 108, 109, - -1, 111, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 124, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 158, -1, - 160, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 197, -1, -1, - -1, -1, -1, 203, 204, 205, 206, 3, 4, 5, - 6, 7, 8, -1, -1, -1, -1, -1, 218, 219, - -1, -1, -1, -1, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, -1, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - -1, 77, 78, 79, 80, 81, 82, 83, 84, -1, - -1, 87, 88, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 106, 107, 108, 109, -1, 111, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 124, 5, - 6, 7, 8, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, - -1, -1, 158, -1, 160, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - -1, 197, 78, -1, -1, -1, -1, 203, 204, 205, - 206, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 218, -1, -1, -1, -1, -1, -1, -1, - -1, 107, 108, 109, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, - 6, 7, 8, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, - -1, -1, 158, -1, 160, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - -1, -1, 78, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 220, -1, -1, -1, -1, -1, - -1, 107, 108, 109, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, - 6, 7, 8, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, - -1, -1, 158, -1, 160, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - -1, 77, 78, 79, 80, 81, 82, 83, 84, -1, - -1, 87, 88, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 220, -1, -1, -1, -1, -1, - -1, 107, 108, 109, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 158, -1, 160, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 197, -1, -1, -1, -1, -1, 203, 204, 205, - 206, 3, 4, 5, 6, 7, 8, -1, -1, -1, - -1, -1, 218, -1, -1, -1, -1, -1, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, -1, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, -1, 77, 78, 79, 80, 81, - 82, 83, 84, -1, -1, 87, 88, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 106, 107, 108, 109, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 124, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 158, -1, 160, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 5, 6, 7, 8, -1, 197, -1, -1, -1, -1, - -1, 203, 204, 205, 206, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, -1, 77, 78, 79, 80, 81, 82, 83, 84, - -1, -1, 87, 88, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 107, 108, 109, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 158, -1, 160, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 5, 6, 7, - 8, -1, 197, -1, -1, 200, -1, -1, 203, 204, - 205, 206, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, -1, 77, - 78, 79, 80, 81, 82, 83, 84, -1, -1, 87, - 88, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 107, - 108, 109, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 158, -1, 160, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 5, 6, 7, 8, -1, 197, - -1, -1, 200, -1, -1, 203, 204, 205, 206, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, -1, 77, 78, 79, 80, - 81, 82, 83, 84, -1, -1, 87, 88, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 107, 108, 109, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 158, -1, 160, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 5, 6, 7, 8, -1, 197, -1, -1, 200, - -1, -1, 203, 204, 205, 206, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, 77, 78, 79, 80, 81, 82, 83, - 84, -1, -1, 87, 88, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 107, 108, 109, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 158, -1, 160, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 5, 6, - 7, 8, -1, 197, -1, -1, -1, -1, -1, 203, - 204, 205, 206, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, - 77, 78, 79, 80, 81, 82, 83, 84, -1, -1, - 87, 88, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 107, 108, 109, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 158, -1, 160, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 5, 6, 7, 8, -1, - 197, -1, -1, -1, -1, -1, 203, 204, 205, 206, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, -1, 77, 78, 79, - 80, 81, 82, 83, 84, -1, -1, 87, 88, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 107, 108, 109, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 158, -1, - 160, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 3, 4, 5, 6, 7, 8, -1, 197, -1, -1, - -1, -1, -1, 203, 204, 205, 206, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, -1, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, -1, -1, 78, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 106, 107, 108, 109, -1, 111, -1, - -1, -1, -1, -1, -1, -1, 119, 120, 121, 122, - 123, 124, 5, 6, 7, 8, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, -1, - -1, -1, -1, -1, -1, 158, -1, 160, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, -1, -1, 78, 5, 6, 7, 8, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, -1, 107, 108, 109, -1, -1, -1, - -1, -1, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, -1, -1, 78, - -1, -1, -1, -1, -1, 158, -1, 160, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 158, - -1, 160 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint16 yystos[] = -{ - 0, 112, 222, 224, 81, 0, 226, 116, 113, 223, - 228, 77, 78, 79, 227, 3, 4, 5, 6, 7, - 8, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 78, 106, 107, 108, - 109, 111, 119, 120, 121, 122, 123, 124, 158, 160, - 225, 229, 263, 264, 265, 266, 267, 272, 273, 274, - 275, 278, 280, 281, 282, 283, 284, 285, 286, 287, - 316, 317, 115, 33, 34, 37, 219, 227, 77, 79, - 230, 278, 281, 286, 116, 116, 116, 116, 116, 197, - 316, 218, 219, 299, 198, 202, 4, 33, 34, 35, - 269, 270, 279, 202, 218, 77, 79, 227, 230, 281, - 281, 282, 199, 283, 227, 282, 288, 289, 219, 281, - 283, 227, 276, 277, 9, 10, 11, 13, 14, 15, - 16, 17, 76, 80, 81, 82, 83, 84, 87, 88, - 197, 203, 204, 205, 206, 218, 219, 220, 230, 231, - 232, 234, 235, 236, 237, 238, 239, 240, 245, 246, - 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, - 257, 258, 259, 261, 263, 264, 282, 293, 294, 295, - 296, 300, 301, 302, 305, 311, 315, 269, 268, 271, - 282, 270, 227, 199, 217, 197, 200, 245, 258, 262, - 282, 116, 227, 290, 291, 220, 289, 288, 218, 217, - 198, 202, 218, 218, 294, 197, 197, 218, 218, 261, - 197, 197, 245, 245, 261, 220, 297, 87, 88, 199, - 201, 198, 198, 202, 75, 259, 197, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 217, 260, 245, - 207, 208, 209, 203, 204, 85, 86, 89, 90, 210, - 211, 91, 92, 212, 213, 214, 93, 95, 94, 215, - 202, 218, 220, 294, 227, 268, 271, 199, 217, 200, - 262, 259, 292, 200, 199, 202, 218, 220, 81, 277, - 76, 293, 301, 312, 261, 218, 261, 106, 261, 274, - 304, 198, 300, 233, 261, 227, 230, 241, 242, 243, - 244, 259, 259, 245, 245, 245, 247, 247, 248, 248, - 249, 249, 249, 249, 250, 250, 251, 252, 253, 254, - 255, 256, 261, 259, 199, 200, 262, 292, 217, 200, - 262, 291, 197, 304, 313, 314, 198, 198, 227, 198, - 220, 200, 197, 198, 198, 202, 75, 259, 216, 262, - 217, 200, 292, 217, 200, 261, 218, 198, 294, 303, - 219, 306, 217, 295, 298, 299, 259, 259, 200, 292, - 217, 292, 198, 261, 298, 12, 18, 19, 220, 307, - 308, 309, 310, 292, 292, 218, 294, 261, 216, 294, - 307, 294, 220, 309, 216 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, state, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval, &yylloc, scanner) -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, Location, state); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct _mesa_glsl_parse_state *state) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, state) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; - struct _mesa_glsl_parse_state *state; -#endif -{ - if (!yyvaluep) - return; - YYUSE (yylocationp); - YYUSE (state); -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct _mesa_glsl_parse_state *state) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, state) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; - struct _mesa_glsl_parse_state *state; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - YY_LOCATION_PRINT (yyoutput, *yylocationp); - YYFPRINTF (yyoutput, ": "); - yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, state); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, struct _mesa_glsl_parse_state *state) -#else -static void -yy_reduce_print (yyvsp, yylsp, yyrule, state) - YYSTYPE *yyvsp; - YYLTYPE *yylsp; - int yyrule; - struct _mesa_glsl_parse_state *state; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , &(yylsp[(yyi + 1) - (yynrhs)]) , state); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, yylsp, Rule, state); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = 0; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct _mesa_glsl_parse_state *state) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, yylocationp, state) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - YYLTYPE *yylocationp; - struct _mesa_glsl_parse_state *state; -#endif -{ - YYUSE (yyvaluep); - YYUSE (yylocationp); - YYUSE (state); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - - default: - break; - } -} - - -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (struct _mesa_glsl_parse_state *state); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - -/*----------. -| yyparse. | -`----------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (struct _mesa_glsl_parse_state *state) -#else -int -yyparse (state) - struct _mesa_glsl_parse_state *state; -#endif -#endif -{ -/* The lookahead symbol. */ -int yychar; - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; - -/* Location data for the lookahead symbol. */ -YYLTYPE yylloc; - - /* Number of syntax errors so far. */ - int yynerrs; - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - /* The location stack. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls; - YYLTYPE *yylsp; - - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[3]; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - YYLTYPE yyloc; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; - yyls = yylsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - yylsp = yyls; - -#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - /* Initialize the default location before parsing starts. */ - yylloc.first_line = yylloc.last_line = 1; - yylloc.first_column = yylloc.last_column = 1; -#endif - -/* User initialization code. */ - -/* Line 1590 of yacc.c */ -#line 47 "src/glsl/glsl_parser.yy" -{ - yylloc.first_line = 1; - yylloc.first_column = 1; - yylloc.last_line = 1; - yylloc.last_column = 1; - yylloc.source = 0; -} - -/* Line 1590 of yacc.c */ -#line 2757 "build/windows-x86/glsl/glsl_parser.cpp" - yylsp[0] = yylloc; - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yyls1, yysize * sizeof (*yylsp), - &yystacksize); - - yyls = yyls1; - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - *++yyvsp = yylval; - *++yylsp = yylloc; - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: - -/* Line 1806 of yacc.c */ -#line 236 "src/glsl/glsl_parser.yy" - { - _mesa_glsl_initialize_types(state); - } - break; - - case 3: - -/* Line 1806 of yacc.c */ -#line 240 "src/glsl/glsl_parser.yy" - { - delete state->symbols; - state->symbols = new(ralloc_parent(state)) glsl_symbol_table; - _mesa_glsl_initialize_types(state); - } - break; - - case 5: - -/* Line 1806 of yacc.c */ -#line 250 "src/glsl/glsl_parser.yy" - { - bool supported = false; - - switch ((yyvsp[(2) - (3)].n)) { - case 100: - state->es_shader = true; - supported = state->Const.GLSL_100ES; - break; - case 110: - supported = state->Const.GLSL_110; - break; - case 120: - supported = state->Const.GLSL_120; - break; - case 130: - supported = state->Const.GLSL_130; - break; - default: - supported = false; - break; - } - - state->language_version = (yyvsp[(2) - (3)].n); - state->version_string = - ralloc_asprintf(state, "GLSL%s %d.%02d", - state->es_shader ? " ES" : "", - state->language_version / 100, - state->language_version % 100); - - if (!supported) { - _mesa_glsl_error(& (yylsp[(2) - (3)]), state, "%s is not supported. " - "Supported versions are: %s\n", - state->version_string, - state->supported_version_string); - } - } - break; - - case 10: - -/* Line 1806 of yacc.c */ -#line 294 "src/glsl/glsl_parser.yy" - { - if (state->language_version < 120) { - _mesa_glsl_warning(& (yylsp[(1) - (2)]), state, - "pragma `invariant(all)' not supported in %s", - state->version_string); - } else { - state->all_invariant = true; - } - } - break; - - case 16: - -/* Line 1806 of yacc.c */ -#line 318 "src/glsl/glsl_parser.yy" - { - if (!_mesa_glsl_process_extension((yyvsp[(2) - (5)].identifier), & (yylsp[(2) - (5)]), (yyvsp[(4) - (5)].identifier), & (yylsp[(4) - (5)]), state)) { - YYERROR; - } - } - break; - - case 17: - -/* Line 1806 of yacc.c */ -#line 327 "src/glsl/glsl_parser.yy" - { - /* FINISHME: The NULL test is required because pragmas are set to - * FINISHME: NULL. (See production rule for external_declaration.) - */ - if ((yyvsp[(1) - (1)].node) != NULL) - state->translation_unit.push_tail(& (yyvsp[(1) - (1)].node)->link); - } - break; - - case 18: - -/* Line 1806 of yacc.c */ -#line 335 "src/glsl/glsl_parser.yy" - { - /* FINISHME: The NULL test is required because pragmas are set to - * FINISHME: NULL. (See production rule for external_declaration.) - */ - if ((yyvsp[(2) - (2)].node) != NULL) - state->translation_unit.push_tail(& (yyvsp[(2) - (2)].node)->link); - } - break; - - case 21: - -/* Line 1806 of yacc.c */ -#line 351 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_identifier, NULL, NULL, NULL); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->primary_expression.identifier = (yyvsp[(1) - (1)].identifier); - } - break; - - case 22: - -/* Line 1806 of yacc.c */ -#line 358 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_int_constant, NULL, NULL, NULL); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->primary_expression.int_constant = (yyvsp[(1) - (1)].n); - } - break; - - case 23: - -/* Line 1806 of yacc.c */ -#line 365 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_uint_constant, NULL, NULL, NULL); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->primary_expression.uint_constant = (yyvsp[(1) - (1)].n); - } - break; - - case 24: - -/* Line 1806 of yacc.c */ -#line 372 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_float_constant, NULL, NULL, NULL); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->primary_expression.float_constant = (yyvsp[(1) - (1)].real); - } - break; - - case 25: - -/* Line 1806 of yacc.c */ -#line 379 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_bool_constant, NULL, NULL, NULL); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->primary_expression.bool_constant = (yyvsp[(1) - (1)].n); - } - break; - - case 26: - -/* Line 1806 of yacc.c */ -#line 386 "src/glsl/glsl_parser.yy" - { - (yyval.expression) = (yyvsp[(2) - (3)].expression); - } - break; - - case 28: - -/* Line 1806 of yacc.c */ -#line 394 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_array_index, (yyvsp[(1) - (4)].expression), (yyvsp[(3) - (4)].expression), NULL); - (yyval.expression)->set_location(yylloc); - } - break; - - case 29: - -/* Line 1806 of yacc.c */ -#line 400 "src/glsl/glsl_parser.yy" - { - (yyval.expression) = (yyvsp[(1) - (1)].expression); - } - break; - - case 30: - -/* Line 1806 of yacc.c */ -#line 404 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_field_selection, (yyvsp[(1) - (3)].expression), NULL, NULL); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->primary_expression.identifier = (yyvsp[(3) - (3)].identifier); - } - break; - - case 31: - -/* Line 1806 of yacc.c */ -#line 411 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_post_inc, (yyvsp[(1) - (2)].expression), NULL, NULL); - (yyval.expression)->set_location(yylloc); - } - break; - - case 32: - -/* Line 1806 of yacc.c */ -#line 417 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_post_dec, (yyvsp[(1) - (2)].expression), NULL, NULL); - (yyval.expression)->set_location(yylloc); - } - break; - - case 36: - -/* Line 1806 of yacc.c */ -#line 435 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_field_selection, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression), NULL); - (yyval.expression)->set_location(yylloc); - } - break; - - case 41: - -/* Line 1806 of yacc.c */ -#line 454 "src/glsl/glsl_parser.yy" - { - (yyval.expression) = (yyvsp[(1) - (2)].expression); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->expressions.push_tail(& (yyvsp[(2) - (2)].expression)->link); - } - break; - - case 42: - -/* Line 1806 of yacc.c */ -#line 460 "src/glsl/glsl_parser.yy" - { - (yyval.expression) = (yyvsp[(1) - (3)].expression); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->expressions.push_tail(& (yyvsp[(3) - (3)].expression)->link); - } - break; - - case 44: - -/* Line 1806 of yacc.c */ -#line 476 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_function_expression((yyvsp[(1) - (1)].type_specifier)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 45: - -/* Line 1806 of yacc.c */ -#line 482 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (1)].identifier)); - (yyval.expression) = new(ctx) ast_function_expression(callee); - (yyval.expression)->set_location(yylloc); - } - break; - - case 46: - -/* Line 1806 of yacc.c */ -#line 489 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (1)].identifier)); - (yyval.expression) = new(ctx) ast_function_expression(callee); - (yyval.expression)->set_location(yylloc); - } - break; - - case 51: - -/* Line 1806 of yacc.c */ -#line 509 "src/glsl/glsl_parser.yy" - { - (yyval.expression) = (yyvsp[(1) - (2)].expression); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->expressions.push_tail(& (yyvsp[(2) - (2)].expression)->link); - } - break; - - case 52: - -/* Line 1806 of yacc.c */ -#line 515 "src/glsl/glsl_parser.yy" - { - (yyval.expression) = (yyvsp[(1) - (3)].expression); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->expressions.push_tail(& (yyvsp[(3) - (3)].expression)->link); - } - break; - - case 53: - -/* Line 1806 of yacc.c */ -#line 527 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (2)].identifier)); - (yyval.expression) = new(ctx) ast_function_expression(callee); - (yyval.expression)->set_location(yylloc); - } - break; - - case 55: - -/* Line 1806 of yacc.c */ -#line 539 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_pre_inc, (yyvsp[(2) - (2)].expression), NULL, NULL); - (yyval.expression)->set_location(yylloc); - } - break; - - case 56: - -/* Line 1806 of yacc.c */ -#line 545 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_pre_dec, (yyvsp[(2) - (2)].expression), NULL, NULL); - (yyval.expression)->set_location(yylloc); - } - break; - - case 57: - -/* Line 1806 of yacc.c */ -#line 551 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression((yyvsp[(1) - (2)].n), (yyvsp[(2) - (2)].expression), NULL, NULL); - (yyval.expression)->set_location(yylloc); - } - break; - - case 58: - -/* Line 1806 of yacc.c */ -#line 560 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_plus; } - break; - - case 59: - -/* Line 1806 of yacc.c */ -#line 561 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_neg; } - break; - - case 60: - -/* Line 1806 of yacc.c */ -#line 562 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_logic_not; } - break; - - case 61: - -/* Line 1806 of yacc.c */ -#line 563 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_bit_not; } - break; - - case 63: - -/* Line 1806 of yacc.c */ -#line 569 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_mul, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 64: - -/* Line 1806 of yacc.c */ -#line 575 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_div, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 65: - -/* Line 1806 of yacc.c */ -#line 581 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_mod, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 67: - -/* Line 1806 of yacc.c */ -#line 591 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_add, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 68: - -/* Line 1806 of yacc.c */ -#line 597 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_sub, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 70: - -/* Line 1806 of yacc.c */ -#line 607 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_lshift, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 71: - -/* Line 1806 of yacc.c */ -#line 613 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_rshift, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 73: - -/* Line 1806 of yacc.c */ -#line 623 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_less, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 74: - -/* Line 1806 of yacc.c */ -#line 629 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_greater, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 75: - -/* Line 1806 of yacc.c */ -#line 635 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_lequal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 76: - -/* Line 1806 of yacc.c */ -#line 641 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_gequal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 78: - -/* Line 1806 of yacc.c */ -#line 651 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_equal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 79: - -/* Line 1806 of yacc.c */ -#line 657 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_nequal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 81: - -/* Line 1806 of yacc.c */ -#line 667 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_bit_and, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 83: - -/* Line 1806 of yacc.c */ -#line 677 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_bit_xor, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 85: - -/* Line 1806 of yacc.c */ -#line 687 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_bit_or, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 87: - -/* Line 1806 of yacc.c */ -#line 697 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_logic_and, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 89: - -/* Line 1806 of yacc.c */ -#line 707 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_logic_xor, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 91: - -/* Line 1806 of yacc.c */ -#line 717 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_logic_or, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 93: - -/* Line 1806 of yacc.c */ -#line 727 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_conditional, (yyvsp[(1) - (5)].expression), (yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].expression)); - (yyval.expression)->set_location(yylloc); - } - break; - - case 95: - -/* Line 1806 of yacc.c */ -#line 737 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression((yyvsp[(2) - (3)].n), (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression), NULL); - (yyval.expression)->set_location(yylloc); - } - break; - - case 96: - -/* Line 1806 of yacc.c */ -#line 745 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_assign; } - break; - - case 97: - -/* Line 1806 of yacc.c */ -#line 746 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_mul_assign; } - break; - - case 98: - -/* Line 1806 of yacc.c */ -#line 747 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_div_assign; } - break; - - case 99: - -/* Line 1806 of yacc.c */ -#line 748 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_mod_assign; } - break; - - case 100: - -/* Line 1806 of yacc.c */ -#line 749 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_add_assign; } - break; - - case 101: - -/* Line 1806 of yacc.c */ -#line 750 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_sub_assign; } - break; - - case 102: - -/* Line 1806 of yacc.c */ -#line 751 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_ls_assign; } - break; - - case 103: - -/* Line 1806 of yacc.c */ -#line 752 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_rs_assign; } - break; - - case 104: - -/* Line 1806 of yacc.c */ -#line 753 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_and_assign; } - break; - - case 105: - -/* Line 1806 of yacc.c */ -#line 754 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_xor_assign; } - break; - - case 106: - -/* Line 1806 of yacc.c */ -#line 755 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_or_assign; } - break; - - case 107: - -/* Line 1806 of yacc.c */ -#line 760 "src/glsl/glsl_parser.yy" - { - (yyval.expression) = (yyvsp[(1) - (1)].expression); - } - break; - - case 108: - -/* Line 1806 of yacc.c */ -#line 764 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - if ((yyvsp[(1) - (3)].expression)->oper != ast_sequence) { - (yyval.expression) = new(ctx) ast_expression(ast_sequence, NULL, NULL, NULL); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->expressions.push_tail(& (yyvsp[(1) - (3)].expression)->link); - } else { - (yyval.expression) = (yyvsp[(1) - (3)].expression); - } - - (yyval.expression)->expressions.push_tail(& (yyvsp[(3) - (3)].expression)->link); - } - break; - - case 110: - -/* Line 1806 of yacc.c */ -#line 784 "src/glsl/glsl_parser.yy" - { - state->symbols->pop_scope(); - (yyval.node) = (yyvsp[(1) - (2)].function); - } - break; - - case 111: - -/* Line 1806 of yacc.c */ -#line 789 "src/glsl/glsl_parser.yy" - { - (yyval.node) = (yyvsp[(1) - (2)].declarator_list); - } - break; - - case 112: - -/* Line 1806 of yacc.c */ -#line 793 "src/glsl/glsl_parser.yy" - { - (yyvsp[(3) - (4)].type_specifier)->precision = (yyvsp[(2) - (4)].n); - (yyvsp[(3) - (4)].type_specifier)->is_precision_statement = true; - (yyval.node) = (yyvsp[(3) - (4)].type_specifier); - } - break; - - case 116: - -/* Line 1806 of yacc.c */ -#line 811 "src/glsl/glsl_parser.yy" - { - (yyval.function) = (yyvsp[(1) - (2)].function); - (yyval.function)->parameters.push_tail(& (yyvsp[(2) - (2)].parameter_declarator)->link); - } - break; - - case 117: - -/* Line 1806 of yacc.c */ -#line 816 "src/glsl/glsl_parser.yy" - { - (yyval.function) = (yyvsp[(1) - (3)].function); - (yyval.function)->parameters.push_tail(& (yyvsp[(3) - (3)].parameter_declarator)->link); - } - break; - - case 118: - -/* Line 1806 of yacc.c */ -#line 824 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.function) = new(ctx) ast_function(); - (yyval.function)->set_location(yylloc); - (yyval.function)->return_type = (yyvsp[(1) - (3)].fully_specified_type); - (yyval.function)->identifier = (yyvsp[(2) - (3)].identifier); - - state->symbols->add_function(new(state) ir_function((yyvsp[(2) - (3)].identifier))); - state->symbols->push_scope(); - } - break; - - case 119: - -/* Line 1806 of yacc.c */ -#line 838 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator(); - (yyval.parameter_declarator)->set_location(yylloc); - (yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_type(); - (yyval.parameter_declarator)->type->set_location(yylloc); - (yyval.parameter_declarator)->type->specifier = (yyvsp[(1) - (2)].type_specifier); - (yyval.parameter_declarator)->identifier = (yyvsp[(2) - (2)].identifier); - } - break; - - case 120: - -/* Line 1806 of yacc.c */ -#line 848 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator(); - (yyval.parameter_declarator)->set_location(yylloc); - (yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_type(); - (yyval.parameter_declarator)->type->set_location(yylloc); - (yyval.parameter_declarator)->type->specifier = (yyvsp[(1) - (5)].type_specifier); - (yyval.parameter_declarator)->identifier = (yyvsp[(2) - (5)].identifier); - (yyval.parameter_declarator)->is_array = true; - (yyval.parameter_declarator)->array_size = (yyvsp[(4) - (5)].expression); - } - break; - - case 121: - -/* Line 1806 of yacc.c */ -#line 863 "src/glsl/glsl_parser.yy" - { - (yyvsp[(1) - (3)].type_qualifier).flags.i |= (yyvsp[(2) - (3)].type_qualifier).flags.i; - - (yyval.parameter_declarator) = (yyvsp[(3) - (3)].parameter_declarator); - (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (3)].type_qualifier); - } - break; - - case 122: - -/* Line 1806 of yacc.c */ -#line 870 "src/glsl/glsl_parser.yy" - { - (yyval.parameter_declarator) = (yyvsp[(2) - (2)].parameter_declarator); - (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (2)].type_qualifier); - } - break; - - case 123: - -/* Line 1806 of yacc.c */ -#line 875 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyvsp[(1) - (3)].type_qualifier).flags.i |= (yyvsp[(2) - (3)].type_qualifier).flags.i; - - (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator(); - (yyval.parameter_declarator)->set_location(yylloc); - (yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_type(); - (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (3)].type_qualifier); - (yyval.parameter_declarator)->type->specifier = (yyvsp[(3) - (3)].type_specifier); - } - break; - - case 124: - -/* Line 1806 of yacc.c */ -#line 886 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator(); - (yyval.parameter_declarator)->set_location(yylloc); - (yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_type(); - (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (2)].type_qualifier); - (yyval.parameter_declarator)->type->specifier = (yyvsp[(2) - (2)].type_specifier); - } - break; - - case 125: - -/* Line 1806 of yacc.c */ -#line 898 "src/glsl/glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - } - break; - - case 126: - -/* Line 1806 of yacc.c */ -#line 902 "src/glsl/glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.in = 1; - } - break; - - case 127: - -/* Line 1806 of yacc.c */ -#line 907 "src/glsl/glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.out = 1; - } - break; - - case 128: - -/* Line 1806 of yacc.c */ -#line 912 "src/glsl/glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.in = 1; - (yyval.type_qualifier).flags.q.out = 1; - } - break; - - case 131: - -/* Line 1806 of yacc.c */ -#line 926 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (3)].identifier), false, NULL, NULL); - decl->set_location(yylloc); - - (yyval.declarator_list) = (yyvsp[(1) - (3)].declarator_list); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (3)].identifier), ir_var_auto)); - } - break; - - case 132: - -/* Line 1806 of yacc.c */ -#line 936 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (5)].identifier), true, NULL, NULL); - decl->set_location(yylloc); - - (yyval.declarator_list) = (yyvsp[(1) - (5)].declarator_list); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (5)].identifier), ir_var_auto)); - } - break; - - case 133: - -/* Line 1806 of yacc.c */ -#line 946 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (6)].identifier), true, (yyvsp[(5) - (6)].expression), NULL); - decl->set_location(yylloc); - - (yyval.declarator_list) = (yyvsp[(1) - (6)].declarator_list); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (6)].identifier), ir_var_auto)); - } - break; - - case 134: - -/* Line 1806 of yacc.c */ -#line 956 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (7)].identifier), true, NULL, (yyvsp[(7) - (7)].expression)); - decl->set_location(yylloc); - - (yyval.declarator_list) = (yyvsp[(1) - (7)].declarator_list); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (7)].identifier), ir_var_auto)); - } - break; - - case 135: - -/* Line 1806 of yacc.c */ -#line 966 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (8)].identifier), true, (yyvsp[(5) - (8)].expression), (yyvsp[(8) - (8)].expression)); - decl->set_location(yylloc); - - (yyval.declarator_list) = (yyvsp[(1) - (8)].declarator_list); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (8)].identifier), ir_var_auto)); - } - break; - - case 136: - -/* Line 1806 of yacc.c */ -#line 976 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (5)].identifier), false, NULL, (yyvsp[(5) - (5)].expression)); - decl->set_location(yylloc); - - (yyval.declarator_list) = (yyvsp[(1) - (5)].declarator_list); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (5)].identifier), ir_var_auto)); - } - break; - - case 137: - -/* Line 1806 of yacc.c */ -#line 990 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - /* Empty declaration list is valid. */ - (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (1)].fully_specified_type)); - (yyval.declarator_list)->set_location(yylloc); - } - break; - - case 138: - -/* Line 1806 of yacc.c */ -#line 997 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (2)].identifier), false, NULL, NULL); - - (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (2)].fully_specified_type)); - (yyval.declarator_list)->set_location(yylloc); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - } - break; - - case 139: - -/* Line 1806 of yacc.c */ -#line 1006 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].identifier), true, NULL, NULL); - - (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (4)].fully_specified_type)); - (yyval.declarator_list)->set_location(yylloc); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - } - break; - - case 140: - -/* Line 1806 of yacc.c */ -#line 1015 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (5)].identifier), true, (yyvsp[(4) - (5)].expression), NULL); - - (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (5)].fully_specified_type)); - (yyval.declarator_list)->set_location(yylloc); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - } - break; - - case 141: - -/* Line 1806 of yacc.c */ -#line 1024 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (6)].identifier), true, NULL, (yyvsp[(6) - (6)].expression)); - - (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (6)].fully_specified_type)); - (yyval.declarator_list)->set_location(yylloc); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - } - break; - - case 142: - -/* Line 1806 of yacc.c */ -#line 1033 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (7)].identifier), true, (yyvsp[(4) - (7)].expression), (yyvsp[(7) - (7)].expression)); - - (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (7)].fully_specified_type)); - (yyval.declarator_list)->set_location(yylloc); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - } - break; - - case 143: - -/* Line 1806 of yacc.c */ -#line 1042 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].identifier), false, NULL, (yyvsp[(4) - (4)].expression)); - - (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (4)].fully_specified_type)); - (yyval.declarator_list)->set_location(yylloc); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - } - break; - - case 144: - -/* Line 1806 of yacc.c */ -#line 1051 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (2)].identifier), false, NULL, NULL); - - (yyval.declarator_list) = new(ctx) ast_declarator_list(NULL); - (yyval.declarator_list)->set_location(yylloc); - (yyval.declarator_list)->invariant = true; - - (yyval.declarator_list)->declarations.push_tail(&decl->link); - } - break; - - case 145: - -/* Line 1806 of yacc.c */ -#line 1065 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.fully_specified_type) = new(ctx) ast_fully_specified_type(); - (yyval.fully_specified_type)->set_location(yylloc); - (yyval.fully_specified_type)->specifier = (yyvsp[(1) - (1)].type_specifier); - } - break; - - case 146: - -/* Line 1806 of yacc.c */ -#line 1072 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.fully_specified_type) = new(ctx) ast_fully_specified_type(); - (yyval.fully_specified_type)->set_location(yylloc); - (yyval.fully_specified_type)->qualifier = (yyvsp[(1) - (2)].type_qualifier); - (yyval.fully_specified_type)->specifier = (yyvsp[(2) - (2)].type_specifier); - } - break; - - case 147: - -/* Line 1806 of yacc.c */ -#line 1083 "src/glsl/glsl_parser.yy" - { - (yyval.type_qualifier) = (yyvsp[(3) - (4)].type_qualifier); - } - break; - - case 149: - -/* Line 1806 of yacc.c */ -#line 1091 "src/glsl/glsl_parser.yy" - { - if (((yyvsp[(1) - (3)].type_qualifier).flags.i & (yyvsp[(3) - (3)].type_qualifier).flags.i) != 0) { - _mesa_glsl_error(& (yylsp[(3) - (3)]), state, - "duplicate layout qualifiers used\n"); - YYERROR; - } - - (yyval.type_qualifier).flags.i = (yyvsp[(1) - (3)].type_qualifier).flags.i | (yyvsp[(3) - (3)].type_qualifier).flags.i; - - if ((yyvsp[(1) - (3)].type_qualifier).flags.q.explicit_location) - (yyval.type_qualifier).location = (yyvsp[(1) - (3)].type_qualifier).location; - - if ((yyvsp[(3) - (3)].type_qualifier).flags.q.explicit_location) - (yyval.type_qualifier).location = (yyvsp[(3) - (3)].type_qualifier).location; - } - break; - - case 150: - -/* Line 1806 of yacc.c */ -#line 1110 "src/glsl/glsl_parser.yy" - { - bool got_one = false; - - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - - /* Layout qualifiers for ARB_fragment_coord_conventions. */ - if (!got_one && state->ARB_fragment_coord_conventions_enable) { - if (strcmp((yyvsp[(1) - (1)].identifier), "origin_upper_left") == 0) { - got_one = true; - (yyval.type_qualifier).flags.q.origin_upper_left = 1; - } else if (strcmp((yyvsp[(1) - (1)].identifier), "pixel_center_integer") == 0) { - got_one = true; - (yyval.type_qualifier).flags.q.pixel_center_integer = 1; - } - - if (got_one && state->ARB_fragment_coord_conventions_warn) { - _mesa_glsl_warning(& (yylsp[(1) - (1)]), state, - "GL_ARB_fragment_coord_conventions layout " - "identifier `%s' used\n", (yyvsp[(1) - (1)].identifier)); - } - } - - /* Layout qualifiers for AMD/ARB_conservative_depth. */ - if (!got_one && - (state->AMD_conservative_depth_enable || - state->ARB_conservative_depth_enable)) { - if (strcmp((yyvsp[(1) - (1)].identifier), "depth_any") == 0) { - got_one = true; - (yyval.type_qualifier).flags.q.depth_any = 1; - } else if (strcmp((yyvsp[(1) - (1)].identifier), "depth_greater") == 0) { - got_one = true; - (yyval.type_qualifier).flags.q.depth_greater = 1; - } else if (strcmp((yyvsp[(1) - (1)].identifier), "depth_less") == 0) { - got_one = true; - (yyval.type_qualifier).flags.q.depth_less = 1; - } else if (strcmp((yyvsp[(1) - (1)].identifier), "depth_unchanged") == 0) { - got_one = true; - (yyval.type_qualifier).flags.q.depth_unchanged = 1; - } - - if (got_one && state->AMD_conservative_depth_warn) { - _mesa_glsl_warning(& (yylsp[(1) - (1)]), state, - "GL_AMD_conservative_depth " - "layout qualifier `%s' is used\n", (yyvsp[(1) - (1)].identifier)); - } - if (got_one && state->ARB_conservative_depth_warn) { - _mesa_glsl_warning(& (yylsp[(1) - (1)]), state, - "GL_ARB_conservative_depth " - "layout qualifier `%s' is used\n", (yyvsp[(1) - (1)].identifier)); - } - } - - if (!got_one) { - _mesa_glsl_error(& (yylsp[(1) - (1)]), state, "unrecognized layout identifier " - "`%s'\n", (yyvsp[(1) - (1)].identifier)); - YYERROR; - } - } - break; - - case 151: - -/* Line 1806 of yacc.c */ -#line 1169 "src/glsl/glsl_parser.yy" - { - bool got_one = false; - - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - - if (state->ARB_explicit_attrib_location_enable) { - /* FINISHME: Handle 'index' once GL_ARB_blend_func_exteneded and - * FINISHME: GLSL 1.30 (or later) are supported. - */ - if (strcmp("location", (yyvsp[(1) - (3)].identifier)) == 0) { - got_one = true; - - (yyval.type_qualifier).flags.q.explicit_location = 1; - - if ((yyvsp[(3) - (3)].n) >= 0) { - (yyval.type_qualifier).location = (yyvsp[(3) - (3)].n); - } else { - _mesa_glsl_error(& (yylsp[(3) - (3)]), state, - "invalid location %d specified\n", (yyvsp[(3) - (3)].n)); - YYERROR; - } - } - } - - /* If the identifier didn't match any known layout identifiers, - * emit an error. - */ - if (!got_one) { - _mesa_glsl_error(& (yylsp[(1) - (3)]), state, "unrecognized layout identifier " - "`%s'\n", (yyvsp[(1) - (3)].identifier)); - YYERROR; - } else if (state->ARB_explicit_attrib_location_warn) { - _mesa_glsl_warning(& (yylsp[(1) - (3)]), state, - "GL_ARB_explicit_attrib_location layout " - "identifier `%s' used\n", (yyvsp[(1) - (3)].identifier)); - } - } - break; - - case 152: - -/* Line 1806 of yacc.c */ -#line 1210 "src/glsl/glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.smooth = 1; - } - break; - - case 153: - -/* Line 1806 of yacc.c */ -#line 1215 "src/glsl/glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.flat = 1; - } - break; - - case 154: - -/* Line 1806 of yacc.c */ -#line 1220 "src/glsl/glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.noperspective = 1; - } - break; - - case 155: - -/* Line 1806 of yacc.c */ -#line 1228 "src/glsl/glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.constant = 1; - } - break; - - case 158: - -/* Line 1806 of yacc.c */ -#line 1238 "src/glsl/glsl_parser.yy" - { - (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier); - (yyval.type_qualifier).flags.i |= (yyvsp[(2) - (2)].type_qualifier).flags.i; - } - break; - - case 160: - -/* Line 1806 of yacc.c */ -#line 1244 "src/glsl/glsl_parser.yy" - { - (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier); - (yyval.type_qualifier).flags.i |= (yyvsp[(2) - (2)].type_qualifier).flags.i; - } - break; - - case 161: - -/* Line 1806 of yacc.c */ -#line 1249 "src/glsl/glsl_parser.yy" - { - (yyval.type_qualifier) = (yyvsp[(2) - (2)].type_qualifier); - (yyval.type_qualifier).flags.q.invariant = 1; - } - break; - - case 162: - -/* Line 1806 of yacc.c */ -#line 1254 "src/glsl/glsl_parser.yy" - { - (yyval.type_qualifier) = (yyvsp[(2) - (3)].type_qualifier); - (yyval.type_qualifier).flags.i |= (yyvsp[(3) - (3)].type_qualifier).flags.i; - (yyval.type_qualifier).flags.q.invariant = 1; - } - break; - - case 163: - -/* Line 1806 of yacc.c */ -#line 1260 "src/glsl/glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.invariant = 1; - } - break; - - case 164: - -/* Line 1806 of yacc.c */ -#line 1268 "src/glsl/glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.constant = 1; - } - break; - - case 165: - -/* Line 1806 of yacc.c */ -#line 1273 "src/glsl/glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.attribute = 1; - } - break; - - case 166: - -/* Line 1806 of yacc.c */ -#line 1278 "src/glsl/glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.varying = 1; - } - break; - - case 167: - -/* Line 1806 of yacc.c */ -#line 1283 "src/glsl/glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.centroid = 1; - (yyval.type_qualifier).flags.q.varying = 1; - } - break; - - case 168: - -/* Line 1806 of yacc.c */ -#line 1289 "src/glsl/glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.in = 1; - } - break; - - case 169: - -/* Line 1806 of yacc.c */ -#line 1294 "src/glsl/glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.out = 1; - } - break; - - case 170: - -/* Line 1806 of yacc.c */ -#line 1299 "src/glsl/glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.centroid = 1; (yyval.type_qualifier).flags.q.in = 1; - } - break; - - case 171: - -/* Line 1806 of yacc.c */ -#line 1304 "src/glsl/glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.centroid = 1; (yyval.type_qualifier).flags.q.out = 1; - } - break; - - case 172: - -/* Line 1806 of yacc.c */ -#line 1309 "src/glsl/glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.uniform = 1; - } - break; - - case 173: - -/* Line 1806 of yacc.c */ -#line 1317 "src/glsl/glsl_parser.yy" - { - (yyval.type_specifier) = (yyvsp[(1) - (1)].type_specifier); - } - break; - - case 174: - -/* Line 1806 of yacc.c */ -#line 1321 "src/glsl/glsl_parser.yy" - { - (yyval.type_specifier) = (yyvsp[(2) - (2)].type_specifier); - (yyval.type_specifier)->precision = (yyvsp[(1) - (2)].n); - } - break; - - case 176: - -/* Line 1806 of yacc.c */ -#line 1330 "src/glsl/glsl_parser.yy" - { - (yyval.type_specifier) = (yyvsp[(1) - (3)].type_specifier); - (yyval.type_specifier)->is_array = true; - (yyval.type_specifier)->array_size = NULL; - } - break; - - case 177: - -/* Line 1806 of yacc.c */ -#line 1336 "src/glsl/glsl_parser.yy" - { - (yyval.type_specifier) = (yyvsp[(1) - (4)].type_specifier); - (yyval.type_specifier)->is_array = true; - (yyval.type_specifier)->array_size = (yyvsp[(3) - (4)].expression); - } - break; - - case 178: - -/* Line 1806 of yacc.c */ -#line 1345 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].n)); - (yyval.type_specifier)->set_location(yylloc); - } - break; - - case 179: - -/* Line 1806 of yacc.c */ -#line 1351 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].struct_specifier)); - (yyval.type_specifier)->set_location(yylloc); - } - break; - - case 180: - -/* Line 1806 of yacc.c */ -#line 1357 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].identifier)); - (yyval.type_specifier)->set_location(yylloc); - } - break; - - case 181: - -/* Line 1806 of yacc.c */ -#line 1365 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_void; } - break; - - case 182: - -/* Line 1806 of yacc.c */ -#line 1366 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_float; } - break; - - case 183: - -/* Line 1806 of yacc.c */ -#line 1367 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_int; } - break; - - case 184: - -/* Line 1806 of yacc.c */ -#line 1368 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_uint; } - break; - - case 185: - -/* Line 1806 of yacc.c */ -#line 1369 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_bool; } - break; - - case 186: - -/* Line 1806 of yacc.c */ -#line 1370 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_vec2; } - break; - - case 187: - -/* Line 1806 of yacc.c */ -#line 1371 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_vec3; } - break; - - case 188: - -/* Line 1806 of yacc.c */ -#line 1372 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_vec4; } - break; - - case 189: - -/* Line 1806 of yacc.c */ -#line 1373 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_bvec2; } - break; - - case 190: - -/* Line 1806 of yacc.c */ -#line 1374 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_bvec3; } - break; - - case 191: - -/* Line 1806 of yacc.c */ -#line 1375 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_bvec4; } - break; - - case 192: - -/* Line 1806 of yacc.c */ -#line 1376 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_ivec2; } - break; - - case 193: - -/* Line 1806 of yacc.c */ -#line 1377 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_ivec3; } - break; - - case 194: - -/* Line 1806 of yacc.c */ -#line 1378 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_ivec4; } - break; - - case 195: - -/* Line 1806 of yacc.c */ -#line 1379 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_uvec2; } - break; - - case 196: - -/* Line 1806 of yacc.c */ -#line 1380 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_uvec3; } - break; - - case 197: - -/* Line 1806 of yacc.c */ -#line 1381 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_uvec4; } - break; - - case 198: - -/* Line 1806 of yacc.c */ -#line 1382 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_mat2; } - break; - - case 199: - -/* Line 1806 of yacc.c */ -#line 1383 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_mat2x3; } - break; - - case 200: - -/* Line 1806 of yacc.c */ -#line 1384 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_mat2x4; } - break; - - case 201: - -/* Line 1806 of yacc.c */ -#line 1385 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_mat3x2; } - break; - - case 202: - -/* Line 1806 of yacc.c */ -#line 1386 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_mat3; } - break; - - case 203: - -/* Line 1806 of yacc.c */ -#line 1387 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_mat3x4; } - break; - - case 204: - -/* Line 1806 of yacc.c */ -#line 1388 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_mat4x2; } - break; - - case 205: - -/* Line 1806 of yacc.c */ -#line 1389 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_mat4x3; } - break; - - case 206: - -/* Line 1806 of yacc.c */ -#line 1390 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_mat4; } - break; - - case 207: - -/* Line 1806 of yacc.c */ -#line 1391 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_sampler1d; } - break; - - case 208: - -/* Line 1806 of yacc.c */ -#line 1392 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_sampler2d; } - break; - - case 209: - -/* Line 1806 of yacc.c */ -#line 1393 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_sampler2drect; } - break; - - case 210: - -/* Line 1806 of yacc.c */ -#line 1394 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_sampler3d; } - break; - - case 211: - -/* Line 1806 of yacc.c */ -#line 1395 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_samplercube; } - break; - - case 212: - -/* Line 1806 of yacc.c */ -#line 1396 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_samplerexternaloes; } - break; - - case 213: - -/* Line 1806 of yacc.c */ -#line 1397 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_sampler1dshadow; } - break; - - case 214: - -/* Line 1806 of yacc.c */ -#line 1398 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_sampler2dshadow; } - break; - - case 215: - -/* Line 1806 of yacc.c */ -#line 1399 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_sampler2drectshadow; } - break; - - case 216: - -/* Line 1806 of yacc.c */ -#line 1400 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_samplercubeshadow; } - break; - - case 217: - -/* Line 1806 of yacc.c */ -#line 1401 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_sampler1darray; } - break; - - case 218: - -/* Line 1806 of yacc.c */ -#line 1402 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_sampler2darray; } - break; - - case 219: - -/* Line 1806 of yacc.c */ -#line 1403 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_sampler1darrayshadow; } - break; - - case 220: - -/* Line 1806 of yacc.c */ -#line 1404 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_sampler2darrayshadow; } - break; - - case 221: - -/* Line 1806 of yacc.c */ -#line 1405 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_isampler1d; } - break; - - case 222: - -/* Line 1806 of yacc.c */ -#line 1406 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_isampler2d; } - break; - - case 223: - -/* Line 1806 of yacc.c */ -#line 1407 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_isampler3d; } - break; - - case 224: - -/* Line 1806 of yacc.c */ -#line 1408 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_isamplercube; } - break; - - case 225: - -/* Line 1806 of yacc.c */ -#line 1409 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_isampler1darray; } - break; - - case 226: - -/* Line 1806 of yacc.c */ -#line 1410 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_isampler2darray; } - break; - - case 227: - -/* Line 1806 of yacc.c */ -#line 1411 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_usampler1d; } - break; - - case 228: - -/* Line 1806 of yacc.c */ -#line 1412 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_usampler2d; } - break; - - case 229: - -/* Line 1806 of yacc.c */ -#line 1413 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_usampler3d; } - break; - - case 230: - -/* Line 1806 of yacc.c */ -#line 1414 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_usamplercube; } - break; - - case 231: - -/* Line 1806 of yacc.c */ -#line 1415 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_usampler1darray; } - break; - - case 232: - -/* Line 1806 of yacc.c */ -#line 1416 "src/glsl/glsl_parser.yy" - { (yyval.n) = ast_usampler2darray; } - break; - - case 233: - -/* Line 1806 of yacc.c */ -#line 1420 "src/glsl/glsl_parser.yy" - { - if (!state->es_shader && state->language_version < 130) - _mesa_glsl_error(& (yylsp[(1) - (1)]), state, - "precision qualifier forbidden " - "in %s (1.30 or later " - "required)\n", - state->version_string); - - (yyval.n) = ast_precision_high; - } - break; - - case 234: - -/* Line 1806 of yacc.c */ -#line 1430 "src/glsl/glsl_parser.yy" - { - if (!state->es_shader && state->language_version < 130) - _mesa_glsl_error(& (yylsp[(1) - (1)]), state, - "precision qualifier forbidden " - "in %s (1.30 or later " - "required)\n", - state->version_string); - - (yyval.n) = ast_precision_medium; - } - break; - - case 235: - -/* Line 1806 of yacc.c */ -#line 1440 "src/glsl/glsl_parser.yy" - { - if (!state->es_shader && state->language_version < 130) - _mesa_glsl_error(& (yylsp[(1) - (1)]), state, - "precision qualifier forbidden " - "in %s (1.30 or later " - "required)\n", - state->version_string); - - (yyval.n) = ast_precision_low; - } - break; - - case 236: - -/* Line 1806 of yacc.c */ -#line 1454 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.struct_specifier) = new(ctx) ast_struct_specifier((yyvsp[(2) - (5)].identifier), (yyvsp[(4) - (5)].node)); - (yyval.struct_specifier)->set_location(yylloc); - state->symbols->add_type((yyvsp[(2) - (5)].identifier), glsl_type::void_type); - } - break; - - case 237: - -/* Line 1806 of yacc.c */ -#line 1461 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.struct_specifier) = new(ctx) ast_struct_specifier(NULL, (yyvsp[(3) - (4)].node)); - (yyval.struct_specifier)->set_location(yylloc); - } - break; - - case 238: - -/* Line 1806 of yacc.c */ -#line 1470 "src/glsl/glsl_parser.yy" - { - (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].declarator_list); - (yyvsp[(1) - (1)].declarator_list)->link.self_link(); - } - break; - - case 239: - -/* Line 1806 of yacc.c */ -#line 1475 "src/glsl/glsl_parser.yy" - { - (yyval.node) = (ast_node *) (yyvsp[(1) - (2)].node); - (yyval.node)->link.insert_before(& (yyvsp[(2) - (2)].declarator_list)->link); - } - break; - - case 240: - -/* Line 1806 of yacc.c */ -#line 1483 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - ast_fully_specified_type *type = new(ctx) ast_fully_specified_type(); - type->set_location(yylloc); - - type->specifier = (yyvsp[(1) - (3)].type_specifier); - (yyval.declarator_list) = new(ctx) ast_declarator_list(type); - (yyval.declarator_list)->set_location(yylloc); - - (yyval.declarator_list)->declarations.push_degenerate_list_at_head(& (yyvsp[(2) - (3)].declaration)->link); - } - break; - - case 241: - -/* Line 1806 of yacc.c */ -#line 1498 "src/glsl/glsl_parser.yy" - { - (yyval.declaration) = (yyvsp[(1) - (1)].declaration); - (yyvsp[(1) - (1)].declaration)->link.self_link(); - } - break; - - case 242: - -/* Line 1806 of yacc.c */ -#line 1503 "src/glsl/glsl_parser.yy" - { - (yyval.declaration) = (yyvsp[(1) - (3)].declaration); - (yyval.declaration)->link.insert_before(& (yyvsp[(3) - (3)].declaration)->link); - } - break; - - case 243: - -/* Line 1806 of yacc.c */ -#line 1511 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.declaration) = new(ctx) ast_declaration((yyvsp[(1) - (1)].identifier), false, NULL, NULL); - (yyval.declaration)->set_location(yylloc); - state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(1) - (1)].identifier), ir_var_auto)); - } - break; - - case 244: - -/* Line 1806 of yacc.c */ -#line 1518 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.declaration) = new(ctx) ast_declaration((yyvsp[(1) - (4)].identifier), true, (yyvsp[(3) - (4)].expression), NULL); - (yyval.declaration)->set_location(yylloc); - } - break; - - case 247: - -/* Line 1806 of yacc.c */ -#line 1536 "src/glsl/glsl_parser.yy" - { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); } - break; - - case 255: - -/* Line 1806 of yacc.c */ -#line 1551 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.compound_statement) = new(ctx) ast_compound_statement(true, NULL); - (yyval.compound_statement)->set_location(yylloc); - } - break; - - case 256: - -/* Line 1806 of yacc.c */ -#line 1557 "src/glsl/glsl_parser.yy" - { - state->symbols->push_scope(); - } - break; - - case 257: - -/* Line 1806 of yacc.c */ -#line 1561 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.compound_statement) = new(ctx) ast_compound_statement(true, (yyvsp[(3) - (4)].node)); - (yyval.compound_statement)->set_location(yylloc); - state->symbols->pop_scope(); - } - break; - - case 258: - -/* Line 1806 of yacc.c */ -#line 1570 "src/glsl/glsl_parser.yy" - { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); } - break; - - case 260: - -/* Line 1806 of yacc.c */ -#line 1576 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.compound_statement) = new(ctx) ast_compound_statement(false, NULL); - (yyval.compound_statement)->set_location(yylloc); - } - break; - - case 261: - -/* Line 1806 of yacc.c */ -#line 1582 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.compound_statement) = new(ctx) ast_compound_statement(false, (yyvsp[(2) - (3)].node)); - (yyval.compound_statement)->set_location(yylloc); - } - break; - - case 262: - -/* Line 1806 of yacc.c */ -#line 1591 "src/glsl/glsl_parser.yy" - { - if ((yyvsp[(1) - (1)].node) == NULL) { - _mesa_glsl_error(& (yylsp[(1) - (1)]), state, " statement\n"); - assert((yyvsp[(1) - (1)].node) != NULL); - } - - (yyval.node) = (yyvsp[(1) - (1)].node); - (yyval.node)->link.self_link(); - } - break; - - case 263: - -/* Line 1806 of yacc.c */ -#line 1601 "src/glsl/glsl_parser.yy" - { - if ((yyvsp[(2) - (2)].node) == NULL) { - _mesa_glsl_error(& (yylsp[(2) - (2)]), state, " statement\n"); - assert((yyvsp[(2) - (2)].node) != NULL); - } - (yyval.node) = (yyvsp[(1) - (2)].node); - (yyval.node)->link.insert_before(& (yyvsp[(2) - (2)].node)->link); - } - break; - - case 264: - -/* Line 1806 of yacc.c */ -#line 1613 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.node) = new(ctx) ast_expression_statement(NULL); - (yyval.node)->set_location(yylloc); - } - break; - - case 265: - -/* Line 1806 of yacc.c */ -#line 1619 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.node) = new(ctx) ast_expression_statement((yyvsp[(1) - (2)].expression)); - (yyval.node)->set_location(yylloc); - } - break; - - case 266: - -/* Line 1806 of yacc.c */ -#line 1628 "src/glsl/glsl_parser.yy" - { - (yyval.node) = new(state) ast_selection_statement((yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].selection_rest_statement).then_statement, - (yyvsp[(5) - (5)].selection_rest_statement).else_statement); - (yyval.node)->set_location(yylloc); - } - break; - - case 267: - -/* Line 1806 of yacc.c */ -#line 1637 "src/glsl/glsl_parser.yy" - { - (yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (3)].node); - (yyval.selection_rest_statement).else_statement = (yyvsp[(3) - (3)].node); - } - break; - - case 268: - -/* Line 1806 of yacc.c */ -#line 1642 "src/glsl/glsl_parser.yy" - { - (yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (1)].node); - (yyval.selection_rest_statement).else_statement = NULL; - } - break; - - case 269: - -/* Line 1806 of yacc.c */ -#line 1650 "src/glsl/glsl_parser.yy" - { - (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].expression); - } - break; - - case 270: - -/* Line 1806 of yacc.c */ -#line 1654 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].identifier), false, NULL, (yyvsp[(4) - (4)].expression)); - ast_declarator_list *declarator = new(ctx) ast_declarator_list((yyvsp[(1) - (4)].fully_specified_type)); - decl->set_location(yylloc); - declarator->set_location(yylloc); - - declarator->declarations.push_tail(&decl->link); - (yyval.node) = declarator; - } - break; - - case 271: - -/* Line 1806 of yacc.c */ -#line 1672 "src/glsl/glsl_parser.yy" - { - (yyval.node) = new(state) ast_switch_statement((yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].switch_body)); - (yyval.node)->set_location(yylloc); - } - break; - - case 272: - -/* Line 1806 of yacc.c */ -#line 1680 "src/glsl/glsl_parser.yy" - { - (yyval.switch_body) = new(state) ast_switch_body(NULL); - (yyval.switch_body)->set_location(yylloc); - } - break; - - case 273: - -/* Line 1806 of yacc.c */ -#line 1685 "src/glsl/glsl_parser.yy" - { - (yyval.switch_body) = new(state) ast_switch_body((yyvsp[(2) - (3)].case_statement_list)); - (yyval.switch_body)->set_location(yylloc); - } - break; - - case 274: - -/* Line 1806 of yacc.c */ -#line 1693 "src/glsl/glsl_parser.yy" - { - (yyval.case_label) = new(state) ast_case_label((yyvsp[(2) - (3)].expression)); - (yyval.case_label)->set_location(yylloc); - } - break; - - case 275: - -/* Line 1806 of yacc.c */ -#line 1698 "src/glsl/glsl_parser.yy" - { - (yyval.case_label) = new(state) ast_case_label(NULL); - (yyval.case_label)->set_location(yylloc); - } - break; - - case 276: - -/* Line 1806 of yacc.c */ -#line 1706 "src/glsl/glsl_parser.yy" - { - ast_case_label_list *labels = new(state) ast_case_label_list(); - - labels->labels.push_tail(& (yyvsp[(1) - (1)].case_label)->link); - (yyval.case_label_list) = labels; - (yyval.case_label_list)->set_location(yylloc); - } - break; - - case 277: - -/* Line 1806 of yacc.c */ -#line 1714 "src/glsl/glsl_parser.yy" - { - (yyval.case_label_list) = (yyvsp[(1) - (2)].case_label_list); - (yyval.case_label_list)->labels.push_tail(& (yyvsp[(2) - (2)].case_label)->link); - } - break; - - case 278: - -/* Line 1806 of yacc.c */ -#line 1722 "src/glsl/glsl_parser.yy" - { - ast_case_statement *stmts = new(state) ast_case_statement((yyvsp[(1) - (2)].case_label_list)); - stmts->set_location(yylloc); - - stmts->stmts.push_tail(& (yyvsp[(2) - (2)].node)->link); - (yyval.case_statement) = stmts; - } - break; - - case 279: - -/* Line 1806 of yacc.c */ -#line 1730 "src/glsl/glsl_parser.yy" - { - (yyval.case_statement) = (yyvsp[(1) - (2)].case_statement); - (yyval.case_statement)->stmts.push_tail(& (yyvsp[(2) - (2)].node)->link); - } - break; - - case 280: - -/* Line 1806 of yacc.c */ -#line 1738 "src/glsl/glsl_parser.yy" - { - ast_case_statement_list *cases= new(state) ast_case_statement_list(); - cases->set_location(yylloc); - - cases->cases.push_tail(& (yyvsp[(1) - (1)].case_statement)->link); - (yyval.case_statement_list) = cases; - } - break; - - case 281: - -/* Line 1806 of yacc.c */ -#line 1746 "src/glsl/glsl_parser.yy" - { - (yyval.case_statement_list) = (yyvsp[(1) - (2)].case_statement_list); - (yyval.case_statement_list)->cases.push_tail(& (yyvsp[(2) - (2)].case_statement)->link); - } - break; - - case 282: - -/* Line 1806 of yacc.c */ -#line 1754 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_while, - NULL, (yyvsp[(3) - (5)].node), NULL, (yyvsp[(5) - (5)].node)); - (yyval.node)->set_location(yylloc); - } - break; - - case 283: - -/* Line 1806 of yacc.c */ -#line 1761 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_do_while, - NULL, (yyvsp[(5) - (7)].expression), NULL, (yyvsp[(2) - (7)].node)); - (yyval.node)->set_location(yylloc); - } - break; - - case 284: - -/* Line 1806 of yacc.c */ -#line 1768 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_for, - (yyvsp[(3) - (6)].node), (yyvsp[(4) - (6)].for_rest_statement).cond, (yyvsp[(4) - (6)].for_rest_statement).rest, (yyvsp[(6) - (6)].node)); - (yyval.node)->set_location(yylloc); - } - break; - - case 288: - -/* Line 1806 of yacc.c */ -#line 1784 "src/glsl/glsl_parser.yy" - { - (yyval.node) = NULL; - } - break; - - case 289: - -/* Line 1806 of yacc.c */ -#line 1791 "src/glsl/glsl_parser.yy" - { - (yyval.for_rest_statement).cond = (yyvsp[(1) - (2)].node); - (yyval.for_rest_statement).rest = NULL; - } - break; - - case 290: - -/* Line 1806 of yacc.c */ -#line 1796 "src/glsl/glsl_parser.yy" - { - (yyval.for_rest_statement).cond = (yyvsp[(1) - (3)].node); - (yyval.for_rest_statement).rest = (yyvsp[(3) - (3)].expression); - } - break; - - case 291: - -/* Line 1806 of yacc.c */ -#line 1805 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_continue, NULL); - (yyval.node)->set_location(yylloc); - } - break; - - case 292: - -/* Line 1806 of yacc.c */ -#line 1811 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_break, NULL); - (yyval.node)->set_location(yylloc); - } - break; - - case 293: - -/* Line 1806 of yacc.c */ -#line 1817 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, NULL); - (yyval.node)->set_location(yylloc); - } - break; - - case 294: - -/* Line 1806 of yacc.c */ -#line 1823 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, (yyvsp[(2) - (3)].expression)); - (yyval.node)->set_location(yylloc); - } - break; - - case 295: - -/* Line 1806 of yacc.c */ -#line 1829 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_discard, NULL); - (yyval.node)->set_location(yylloc); - } - break; - - case 296: - -/* Line 1806 of yacc.c */ -#line 1837 "src/glsl/glsl_parser.yy" - { (yyval.node) = (yyvsp[(1) - (1)].function_definition); } - break; - - case 297: - -/* Line 1806 of yacc.c */ -#line 1838 "src/glsl/glsl_parser.yy" - { (yyval.node) = (yyvsp[(1) - (1)].node); } - break; - - case 298: - -/* Line 1806 of yacc.c */ -#line 1839 "src/glsl/glsl_parser.yy" - { (yyval.node) = NULL; } - break; - - case 299: - -/* Line 1806 of yacc.c */ -#line 1844 "src/glsl/glsl_parser.yy" - { - void *ctx = state; - (yyval.function_definition) = new(ctx) ast_function_definition(); - (yyval.function_definition)->set_location(yylloc); - (yyval.function_definition)->prototype = (yyvsp[(1) - (2)].function); - (yyval.function_definition)->body = (yyvsp[(2) - (2)].compound_statement); - - state->symbols->pop_scope(); - } - break; - - - -/* Line 1806 of yacc.c */ -#line 5455 "build/windows-x86/glsl/glsl_parser.cpp" - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - *++yylsp = yyloc; - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (&yylloc, state, YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (&yylloc, state, yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif - } - - yyerror_range[1] = yylloc; - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, state); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - yyerror_range[1] = yylsp[1-yylen]; - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - yyerror_range[1] = *yylsp; - yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp, state); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - *++yyvsp = yylval; - - yyerror_range[2] = yylloc; - /* Using YYLLOC is tempting, but would change the location of - the lookahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, yyerror_range, 2); - *++yylsp = yyloc; - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined(yyoverflow) || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (&yylloc, state, YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, state); - } - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yylsp, state); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - - diff --git a/dll/opengl/mesa/generated/glsl/glsl_parser.h b/dll/opengl/mesa/generated/glsl/glsl_parser.h deleted file mode 100644 index 8a86f5c0d63..00000000000 --- a/dll/opengl/mesa/generated/glsl/glsl_parser.h +++ /dev/null @@ -1,305 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.5. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - ATTRIBUTE = 258, - CONST_TOK = 259, - BOOL_TOK = 260, - FLOAT_TOK = 261, - INT_TOK = 262, - UINT_TOK = 263, - BREAK = 264, - CONTINUE = 265, - DO = 266, - ELSE = 267, - FOR = 268, - IF = 269, - DISCARD = 270, - RETURN = 271, - SWITCH = 272, - CASE = 273, - DEFAULT = 274, - BVEC2 = 275, - BVEC3 = 276, - BVEC4 = 277, - IVEC2 = 278, - IVEC3 = 279, - IVEC4 = 280, - UVEC2 = 281, - UVEC3 = 282, - UVEC4 = 283, - VEC2 = 284, - VEC3 = 285, - VEC4 = 286, - CENTROID = 287, - IN_TOK = 288, - OUT_TOK = 289, - INOUT_TOK = 290, - UNIFORM = 291, - VARYING = 292, - NOPERSPECTIVE = 293, - FLAT = 294, - SMOOTH = 295, - MAT2X2 = 296, - MAT2X3 = 297, - MAT2X4 = 298, - MAT3X2 = 299, - MAT3X3 = 300, - MAT3X4 = 301, - MAT4X2 = 302, - MAT4X3 = 303, - MAT4X4 = 304, - SAMPLER1D = 305, - SAMPLER2D = 306, - SAMPLER3D = 307, - SAMPLERCUBE = 308, - SAMPLER1DSHADOW = 309, - SAMPLER2DSHADOW = 310, - SAMPLERCUBESHADOW = 311, - SAMPLER1DARRAY = 312, - SAMPLER2DARRAY = 313, - SAMPLER1DARRAYSHADOW = 314, - SAMPLER2DARRAYSHADOW = 315, - ISAMPLER1D = 316, - ISAMPLER2D = 317, - ISAMPLER3D = 318, - ISAMPLERCUBE = 319, - ISAMPLER1DARRAY = 320, - ISAMPLER2DARRAY = 321, - USAMPLER1D = 322, - USAMPLER2D = 323, - USAMPLER3D = 324, - USAMPLERCUBE = 325, - USAMPLER1DARRAY = 326, - USAMPLER2DARRAY = 327, - SAMPLEREXTERNALOES = 328, - STRUCT = 329, - VOID_TOK = 330, - WHILE = 331, - IDENTIFIER = 332, - TYPE_IDENTIFIER = 333, - NEW_IDENTIFIER = 334, - FLOATCONSTANT = 335, - INTCONSTANT = 336, - UINTCONSTANT = 337, - BOOLCONSTANT = 338, - FIELD_SELECTION = 339, - LEFT_OP = 340, - RIGHT_OP = 341, - INC_OP = 342, - DEC_OP = 343, - LE_OP = 344, - GE_OP = 345, - EQ_OP = 346, - NE_OP = 347, - AND_OP = 348, - OR_OP = 349, - XOR_OP = 350, - MUL_ASSIGN = 351, - DIV_ASSIGN = 352, - ADD_ASSIGN = 353, - MOD_ASSIGN = 354, - LEFT_ASSIGN = 355, - RIGHT_ASSIGN = 356, - AND_ASSIGN = 357, - XOR_ASSIGN = 358, - OR_ASSIGN = 359, - SUB_ASSIGN = 360, - INVARIANT = 361, - LOWP = 362, - MEDIUMP = 363, - HIGHP = 364, - SUPERP = 365, - PRECISION = 366, - VERSION_TOK = 367, - EXTENSION = 368, - LINE = 369, - COLON = 370, - EOL = 371, - INTERFACE = 372, - OUTPUT = 373, - PRAGMA_DEBUG_ON = 374, - PRAGMA_DEBUG_OFF = 375, - PRAGMA_OPTIMIZE_ON = 376, - PRAGMA_OPTIMIZE_OFF = 377, - PRAGMA_INVARIANT_ALL = 378, - LAYOUT_TOK = 379, - ASM = 380, - CLASS = 381, - UNION = 382, - ENUM = 383, - TYPEDEF = 384, - TEMPLATE = 385, - THIS = 386, - PACKED_TOK = 387, - GOTO = 388, - INLINE_TOK = 389, - NOINLINE = 390, - VOLATILE = 391, - PUBLIC_TOK = 392, - STATIC = 393, - EXTERN = 394, - EXTERNAL = 395, - LONG_TOK = 396, - SHORT_TOK = 397, - DOUBLE_TOK = 398, - HALF = 399, - FIXED_TOK = 400, - UNSIGNED = 401, - INPUT_TOK = 402, - OUPTUT = 403, - HVEC2 = 404, - HVEC3 = 405, - HVEC4 = 406, - DVEC2 = 407, - DVEC3 = 408, - DVEC4 = 409, - FVEC2 = 410, - FVEC3 = 411, - FVEC4 = 412, - SAMPLER2DRECT = 413, - SAMPLER3DRECT = 414, - SAMPLER2DRECTSHADOW = 415, - SIZEOF = 416, - CAST = 417, - NAMESPACE = 418, - USING = 419, - ERROR_TOK = 420, - COMMON = 421, - PARTITION = 422, - ACTIVE = 423, - SAMPLERBUFFER = 424, - FILTER = 425, - IMAGE1D = 426, - IMAGE2D = 427, - IMAGE3D = 428, - IMAGECUBE = 429, - IMAGE1DARRAY = 430, - IMAGE2DARRAY = 431, - IIMAGE1D = 432, - IIMAGE2D = 433, - IIMAGE3D = 434, - IIMAGECUBE = 435, - IIMAGE1DARRAY = 436, - IIMAGE2DARRAY = 437, - UIMAGE1D = 438, - UIMAGE2D = 439, - UIMAGE3D = 440, - UIMAGECUBE = 441, - UIMAGE1DARRAY = 442, - UIMAGE2DARRAY = 443, - IMAGE1DSHADOW = 444, - IMAGE2DSHADOW = 445, - IMAGEBUFFER = 446, - IIMAGEBUFFER = 447, - UIMAGEBUFFER = 448, - IMAGE1DARRAYSHADOW = 449, - IMAGE2DARRAYSHADOW = 450, - ROW_MAJOR = 451 - }; -#endif - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ - -/* Line 2068 of yacc.c */ -#line 58 "src/glsl/glsl_parser.yy" - - int n; - float real; - char *identifier; - - struct ast_type_qualifier type_qualifier; - - ast_node *node; - ast_type_specifier *type_specifier; - ast_fully_specified_type *fully_specified_type; - ast_function *function; - ast_parameter_declarator *parameter_declarator; - ast_function_definition *function_definition; - ast_compound_statement *compound_statement; - ast_expression *expression; - ast_declarator_list *declarator_list; - ast_struct_specifier *struct_specifier; - ast_declaration *declaration; - ast_switch_body *switch_body; - ast_case_label *case_label; - ast_case_label_list *case_label_list; - ast_case_statement *case_statement; - ast_case_statement_list *case_statement_list; - - struct { - ast_node *cond; - ast_expression *rest; - } for_rest_statement; - - struct { - ast_node *then_statement; - ast_node *else_statement; - } selection_rest_statement; - - - -/* Line 2068 of yacc.c */ -#line 283 "/home/jeje/Mesa-8.0.4/build/windows-x86/glsl/glsl_parser.h" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - - - -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 -#endif - - - diff --git a/dll/opengl/mesa/generated/mesa/program/lex.yy.c b/dll/opengl/mesa/generated/mesa/program/lex.yy.c deleted file mode 100644 index e48a25edd42..00000000000 --- a/dll/opengl/mesa/generated/mesa/program/lex.yy.c +++ /dev/null @@ -1,3675 +0,0 @@ - -#line 3 "" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yyg->yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yyg->yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart(yyin ,yyscanner ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#define YY_BUF_SIZE 16384 -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] - -void yyrestart (FILE *input_file ,yyscan_t yyscanner ); -void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void yypop_buffer_state (yyscan_t yyscanner ); - -static void yyensure_buffer_stack (yyscan_t yyscanner ); -static void yy_load_buffer_state (yyscan_t yyscanner ); -static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); - -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) - -YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); - -void *yyalloc (yy_size_t ,yyscan_t yyscanner ); -void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); -void yyfree (void * ,yyscan_t yyscanner ); - -#define yy_new_buffer yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define yywrap(n) 1 -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -typedef int yy_state_type; - -#define yytext_ptr yytext_r - -static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); -static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 170 -#define YY_END_OF_BUFFER 171 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[850] = - { 0, - 0, 0, 171, 169, 167, 166, 169, 169, 139, 165, - 141, 141, 141, 141, 139, 139, 139, 139, 139, 139, - 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, - 139, 139, 139, 139, 139, 167, 0, 0, 168, 139, - 0, 140, 142, 162, 162, 0, 0, 0, 0, 162, - 0, 0, 0, 0, 0, 0, 0, 119, 163, 120, - 121, 153, 153, 153, 153, 0, 141, 0, 127, 128, - 129, 139, 139, 139, 139, 139, 139, 139, 139, 139, - 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, - 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, - - 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, - 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, - 139, 139, 139, 139, 139, 139, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 161, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 160, 160, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 159, 159, 159, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 150, 150, 150, 151, 151, 152, 143, - 142, 143, 0, 144, 11, 12, 139, 13, 139, 139, - 14, 15, 139, 16, 17, 18, 19, 20, 21, 6, - - 22, 23, 24, 25, 26, 28, 27, 29, 30, 31, - 32, 33, 34, 35, 139, 139, 139, 139, 139, 40, - 41, 139, 42, 43, 44, 45, 46, 47, 48, 139, - 49, 50, 51, 52, 53, 54, 55, 139, 56, 57, - 58, 59, 139, 139, 64, 65, 139, 139, 139, 139, - 139, 139, 0, 0, 0, 0, 142, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 80, 81, 83, - 0, 158, 0, 0, 0, 0, 0, 0, 97, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 157, - 156, 156, 109, 0, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 147, 147, 148, 149, 0, 145, 11, - 11, 139, 12, 12, 12, 139, 139, 139, 139, 139, - 15, 15, 139, 130, 16, 16, 139, 17, 17, 139, - 18, 18, 139, 19, 19, 139, 20, 20, 139, 21, - 21, 139, 22, 22, 139, 24, 24, 139, 25, 25, - 139, 28, 28, 139, 27, 27, 139, 30, 30, 139, - 31, 31, 139, 32, 32, 139, 33, 33, 139, 34, - 34, 139, 35, 35, 139, 139, 139, 139, 36, 139, - 38, 139, 40, 40, 139, 41, 41, 139, 131, 42, - 42, 139, 43, 43, 139, 139, 45, 45, 139, 46, - - 46, 139, 47, 47, 139, 48, 48, 139, 139, 49, - 49, 139, 50, 50, 139, 51, 51, 139, 52, 52, - 139, 53, 53, 139, 54, 54, 139, 139, 10, 56, - 139, 57, 139, 58, 139, 59, 139, 60, 139, 62, - 139, 64, 64, 139, 139, 139, 139, 139, 139, 139, - 139, 0, 164, 0, 0, 0, 73, 74, 0, 0, - 0, 0, 0, 0, 0, 85, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 155, 0, 0, 0, 113, 0, - 115, 0, 0, 0, 0, 0, 0, 154, 146, 139, - - 139, 139, 4, 139, 139, 139, 139, 139, 139, 139, - 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, - 139, 139, 139, 139, 139, 139, 9, 37, 39, 139, - 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, - 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, - 60, 139, 61, 62, 139, 63, 139, 139, 139, 139, - 139, 69, 139, 139, 0, 0, 0, 0, 0, 75, - 76, 0, 0, 0, 0, 84, 0, 0, 88, 91, - 0, 0, 0, 0, 0, 0, 0, 102, 103, 0, - 0, 0, 0, 108, 0, 0, 0, 0, 0, 0, - - 0, 0, 0, 0, 139, 139, 139, 139, 139, 139, - 5, 139, 139, 139, 139, 139, 139, 139, 139, 139, - 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, - 7, 8, 139, 139, 139, 139, 139, 139, 139, 139, - 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, - 139, 139, 139, 139, 61, 139, 139, 63, 139, 139, - 139, 139, 139, 70, 139, 66, 0, 0, 0, 0, - 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 94, 0, 98, 99, 0, 101, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 117, 118, 0, 0, - - 125, 11, 3, 12, 135, 136, 139, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 24, 25, 28, 27, - 30, 31, 32, 33, 34, 35, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 139, 139, 139, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 139, - 139, 139, 139, 64, 65, 139, 68, 126, 0, 0, - 71, 0, 77, 0, 0, 0, 86, 0, 0, 0, - 0, 0, 0, 100, 0, 0, 106, 93, 0, 0, - 0, 0, 0, 0, 122, 0, 139, 132, 133, 139, - 60, 139, 62, 139, 67, 0, 0, 0, 0, 79, - - 82, 87, 0, 0, 92, 0, 0, 0, 105, 0, - 0, 0, 0, 114, 116, 0, 139, 139, 61, 63, - 2, 1, 0, 78, 0, 90, 0, 96, 104, 0, - 0, 111, 112, 123, 139, 134, 0, 89, 0, 107, - 110, 139, 72, 95, 139, 139, 137, 138, 0 - } ; - -static yyconst flex_int32_t yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 5, 1, 6, 7, 1, 1, 1, 1, - 1, 1, 8, 1, 8, 9, 1, 10, 11, 12, - 13, 14, 15, 15, 15, 15, 15, 1, 1, 1, - 1, 1, 1, 1, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 7, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 1, 1, 1, 1, 41, 1, 42, 43, 44, 45, - - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst flex_int32_t yy_meta[68] = - { 0, - 1, 1, 1, 1, 1, 1, 2, 1, 3, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2 - } ; - -static yyconst flex_int16_t yy_base[853] = - { 0, - 0, 0, 1299, 1300, 66, 1300, 1293, 1294, 0, 69, - 85, 128, 140, 152, 151, 58, 56, 63, 76, 1272, - 158, 160, 39, 163, 173, 189, 52, 1265, 76, 1235, - 1234, 1246, 1230, 1244, 1243, 105, 1272, 1284, 1300, 0, - 225, 1300, 218, 160, 157, 20, 123, 66, 119, 192, - 1244, 1230, 54, 162, 1228, 1240, 194, 1300, 200, 195, - 98, 227, 196, 231, 235, 293, 305, 316, 1300, 1300, - 1300, 1249, 1262, 1256, 223, 1245, 1248, 1244, 1259, 107, - 298, 1241, 1255, 246, 1241, 1254, 1245, 1258, 1235, 1246, - 1237, 182, 1238, 1229, 1238, 1229, 1228, 1229, 144, 1223, - - 1229, 1240, 1231, 1225, 1222, 1223, 1227, 289, 1236, 1223, - 302, 1230, 1217, 1231, 1207, 65, 315, 276, 1227, 1226, - 1202, 1187, 1182, 1199, 1175, 1180, 1206, 279, 1195, 293, - 1190, 342, 299, 1192, 1173, 317, 1183, 1179, 1174, 207, - 1180, 1166, 1182, 1179, 1170, 320, 324, 1172, 1161, 1175, - 1178, 1160, 1175, 1162, 1159, 1166, 284, 1174, 227, 288, - 327, 342, 345, 1151, 1168, 1169, 1162, 1144, 318, 1145, - 1167, 1158, 330, 341, 345, 349, 353, 357, 361, 1300, - 419, 430, 436, 442, 440, 441, 1191, 0, 1190, 1173, - 1163, 443, 1183, 444, 451, 468, 470, 472, 471, 0, - - 496, 0, 497, 498, 0, 499, 500, 0, 524, 525, - 526, 536, 537, 553, 1178, 1171, 1184, 354, 356, 561, - 563, 1165, 564, 565, 1157, 580, 590, 591, 592, 1178, - 593, 617, 618, 619, 629, 630, 1155, 1165, 330, 362, - 419, 483, 445, 364, 646, 1153, 1145, 1144, 1129, 1129, - 1128, 1127, 1170, 1142, 1130, 662, 669, 643, 1134, 487, - 1131, 1125, 1125, 1119, 1132, 1132, 1117, 1300, 1300, 1132, - 1120, 646, 1127, 135, 1124, 1130, 561, 1125, 1300, 1116, - 1123, 1122, 1125, 1111, 1110, 1114, 1109, 448, 1114, 650, - 653, 665, 1300, 1106, 1104, 1104, 1112, 1113, 1095, 670, - - 1100, 1106, 486, 579, 655, 661, 668, 726, 732, 1112, - 682, 1119, 1110, 688, 730, 1117, 1116, 1109, 1123, 1113, - 1104, 712, 1111, 0, 1102, 731, 1109, 1100, 733, 1107, - 1098, 734, 1105, 1096, 736, 1103, 1094, 737, 1101, 1092, - 738, 1099, 1090, 739, 1097, 1088, 740, 1095, 1086, 741, - 1093, 1084, 742, 1091, 1082, 743, 1089, 1080, 744, 1087, - 1078, 745, 1085, 1076, 746, 1083, 1074, 747, 1081, 1072, - 748, 1079, 1070, 749, 1077, 1080, 1073, 1080, 0, 1073, - 0, 1088, 1063, 750, 1070, 1061, 751, 1068, 0, 1059, - 752, 1066, 1057, 755, 1064, 1063, 1054, 758, 1061, 1052, - - 776, 1059, 1050, 777, 1057, 1048, 779, 1055, 1058, 1045, - 780, 1052, 1043, 782, 1050, 1041, 783, 1048, 1039, 784, - 1046, 1037, 785, 1044, 1035, 786, 1042, 1041, 0, 1032, - 1039, 1030, 1037, 1028, 1035, 1026, 1033, 787, 1032, 788, - 1047, 1022, 789, 1029, 1028, 1006, 1000, 1005, 1011, 994, - 1009, 424, 1300, 1008, 998, 1002, 1300, 1300, 992, 1001, - 987, 1004, 987, 990, 984, 1300, 985, 984, 981, 988, - 981, 989, 985, 995, 992, 974, 980, 987, 971, 970, - 988, 970, 982, 981, 1300, 980, 970, 974, 1300, 961, - 1300, 966, 966, 974, 957, 958, 968, 1300, 1300, 1000, - - 982, 998, 0, 798, 996, 996, 995, 994, 993, 992, - 991, 990, 989, 988, 987, 986, 985, 984, 983, 982, - 981, 980, 979, 978, 965, 958, 0, 0, 0, 975, - 974, 973, 972, 971, 970, 969, 968, 967, 945, 965, - 964, 963, 962, 961, 960, 959, 958, 957, 956, 955, - 929, 936, 793, 927, 934, 794, 950, 949, 918, 921, - 901, 0, 902, 895, 902, 901, 902, 894, 912, 1300, - 1300, 894, 892, 902, 895, 1300, 890, 907, 516, 1300, - 898, 882, 883, 892, 883, 882, 882, 1300, 881, 890, - 880, 896, 893, 1300, 892, 890, 879, 880, 876, 868, - - 875, 870, 871, 866, 892, 892, 890, 904, 903, 898, - 0, 886, 885, 884, 883, 882, 881, 880, 879, 878, - 877, 876, 875, 874, 873, 872, 871, 870, 869, 868, - 0, 0, 867, 866, 865, 864, 863, 862, 861, 860, - 859, 804, 858, 857, 856, 855, 854, 853, 852, 851, - 850, 849, 848, 865, 839, 846, 862, 836, 843, 841, - 840, 818, 818, 0, 825, 0, 859, 858, 807, 825, - 1300, 820, 815, 808, 804, 816, 806, 804, 800, 816, - 807, 806, 1300, 1300, 809, 1300, 804, 797, 786, 797, - 789, 793, 806, 801, 804, 786, 1300, 1300, 798, 787, - - 1300, 0, 0, 0, 0, 0, 826, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 814, 813, 802, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 785, - 798, 779, 792, 0, 0, 656, 0, 0, 706, 702, - 1300, 649, 1300, 648, 648, 654, 1300, 637, 645, 610, - 612, 608, 608, 1300, 572, 583, 1300, 1300, 577, 573, - 560, 557, 542, 555, 1300, 539, 573, 0, 0, 572, - 0, 555, 0, 546, 0, 562, 551, 495, 479, 1300, - - 1300, 1300, 481, 481, 1300, 480, 443, 31, 1300, 141, - 166, 171, 186, 1300, 1300, 211, 236, 276, 0, 0, - 1300, 1300, 290, 1300, 325, 1300, 346, 1300, 1300, 343, - 341, 1300, 1300, 1300, 365, 0, 380, 1300, 371, 1300, - 1300, 486, 1300, 1300, 451, 458, 0, 0, 1300, 836, - 503, 839 - } ; - -static yyconst flex_int16_t yy_def[853] = - { 0, - 849, 1, 849, 849, 849, 849, 849, 850, 851, 849, - 849, 849, 849, 849, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 849, 849, 850, 849, 851, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 852, 849, 849, 849, 849, - 849, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - - 849, 849, 849, 849, 849, 849, 849, 849, 849, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 851, - - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - - 849, 849, 849, 849, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - - 849, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 851, 851, 851, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 851, 851, 851, 851, - 851, 851, 851, 851, 851, 849, 849, 849, 849, 849, - - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 851, 851, 851, 851, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 851, 851, 849, 849, 849, 849, - 849, 851, 849, 849, 851, 851, 851, 851, 0, 849, - 849, 849 - } ; - -static yyconst flex_int16_t yy_nxt[1368] = - { 0, - 4, 5, 6, 5, 7, 8, 9, 4, 10, 11, - 12, 13, 14, 11, 11, 15, 9, 16, 17, 18, - 19, 9, 9, 9, 20, 21, 22, 9, 23, 24, - 9, 25, 26, 27, 28, 9, 9, 29, 9, 9, - 9, 9, 9, 9, 9, 9, 30, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 31, 9, 32, 33, - 34, 9, 35, 9, 9, 9, 9, 36, 96, 36, - 41, 116, 137, 97, 80, 138, 829, 42, 43, 43, - 43, 43, 43, 43, 77, 81, 78, 119, 82, 117, - 83, 238, 79, 66, 67, 67, 67, 67, 67, 67, - - 84, 85, 239, 150, 68, 120, 36, 86, 36, 151, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 141, - 142, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 68, 143, 62, 63, 64, 65, 66, 67, 67, 67, - 67, 67, 67, 170, 194, 195, 69, 68, 66, 67, - 67, 67, 67, 67, 67, 218, 171, 219, 70, 68, - 66, 67, 67, 67, 67, 67, 67, 72, 139, 73, - 71, 68, 140, 68, 144, 92, 74, 145, 98, 88, - 467, 89, 75, 93, 76, 68, 90, 99, 94, 91, - 101, 100, 102, 103, 95, 468, 830, 68, 136, 133, - - 210, 133, 133, 152, 133, 104, 105, 133, 106, 107, - 108, 109, 110, 134, 111, 133, 112, 153, 133, 211, - 135, 831, 113, 114, 154, 115, 41, 43, 43, 43, - 43, 43, 43, 146, 147, 157, 832, 132, 165, 133, - 166, 161, 162, 167, 168, 833, 158, 163, 188, 159, - 133, 169, 160, 265, 189, 164, 834, 201, 133, 174, - 173, 175, 176, 132, 835, 266, 128, 129, 46, 47, - 48, 49, 172, 51, 52, 202, 285, 53, 54, 55, - 56, 57, 58, 130, 60, 61, 286, 243, 131, 244, - 173, 173, 173, 173, 177, 173, 173, 178, 179, 173, - - 173, 173, 181, 181, 181, 181, 181, 181, 228, 836, - 196, 197, 182, 66, 67, 67, 67, 67, 67, 67, - 198, 232, 229, 183, 68, 184, 184, 184, 184, 184, - 184, 240, 134, 241, 255, 233, 282, 287, 182, 135, - 258, 258, 283, 288, 242, 837, 258, 430, 164, 256, - 68, 257, 257, 257, 257, 257, 257, 258, 258, 258, - 261, 258, 258, 298, 258, 272, 258, 258, 258, 258, - 431, 258, 381, 299, 258, 258, 379, 838, 258, 432, - 440, 289, 258, 290, 258, 258, 291, 292, 380, 258, - 382, 839, 258, 303, 303, 303, 303, 840, 441, 841, - - 258, 842, 433, 258, 303, 303, 303, 303, 304, 303, - 303, 305, 306, 303, 303, 303, 303, 303, 303, 303, - 307, 303, 303, 303, 303, 303, 303, 303, 43, 43, - 43, 43, 43, 43, 843, 844, 434, 308, 132, 309, - 309, 309, 309, 309, 309, 184, 184, 184, 184, 184, - 184, 184, 184, 184, 184, 184, 184, 310, 313, 435, - 321, 325, 311, 314, 132, 322, 326, 438, 328, 847, - 565, 311, 315, 329, 322, 326, 848, 311, 314, 439, - 312, 316, 329, 323, 327, 331, 566, 334, 340, 337, - 332, 330, 335, 341, 338, 482, 845, 846, 483, 332, - - 436, 335, 341, 338, 40, 332, 828, 335, 333, 338, - 336, 342, 339, 343, 346, 349, 352, 355, 344, 347, - 350, 353, 356, 437, 827, 826, 825, 344, 347, 350, - 353, 356, 455, 824, 347, 350, 345, 348, 351, 354, - 357, 358, 361, 364, 823, 456, 359, 362, 365, 498, - 498, 498, 498, 367, 370, 359, 362, 365, 368, 371, - 822, 359, 362, 365, 360, 363, 366, 368, 371, 678, - 373, 821, 679, 368, 371, 374, 369, 372, 383, 820, - 386, 390, 393, 384, 374, 387, 391, 394, 819, 818, - 374, 817, 384, 375, 387, 391, 394, 397, 816, 815, - - 814, 385, 398, 388, 392, 395, 471, 400, 403, 406, - 410, 398, 401, 404, 407, 411, 813, 398, 812, 472, - 399, 401, 404, 407, 411, 811, 810, 401, 404, 407, - 402, 405, 408, 412, 413, 416, 419, 809, 808, 414, - 417, 420, 498, 498, 498, 498, 422, 425, 414, 417, - 420, 423, 426, 807, 414, 417, 420, 415, 418, 421, - 423, 426, 806, 442, 805, 804, 423, 426, 443, 424, - 427, 257, 257, 257, 257, 257, 257, 443, 257, 257, - 257, 257, 257, 257, 453, 453, 444, 453, 453, 803, - 453, 453, 453, 453, 453, 453, 802, 453, 801, 310, - - 453, 453, 800, 799, 453, 313, 485, 453, 453, 798, - 797, 453, 453, 492, 796, 493, 795, 494, 499, 498, - 498, 498, 312, 453, 498, 498, 498, 498, 316, 321, - 495, 498, 498, 498, 498, 309, 309, 309, 309, 309, - 309, 309, 309, 309, 309, 309, 309, 313, 325, 501, - 328, 331, 323, 334, 337, 340, 343, 346, 349, 352, - 355, 358, 361, 364, 367, 370, 373, 383, 386, 390, - 316, 327, 393, 330, 333, 397, 336, 339, 342, 345, - 348, 351, 354, 357, 360, 363, 366, 369, 372, 375, - 385, 388, 392, 400, 403, 395, 406, 410, 399, 413, - - 416, 419, 422, 425, 551, 554, 442, 794, 608, 609, - 655, 658, 793, 792, 736, 737, 402, 405, 791, 408, - 412, 790, 415, 418, 421, 424, 427, 552, 555, 444, - 610, 789, 788, 656, 659, 738, 38, 38, 38, 180, - 180, 787, 786, 785, 784, 783, 782, 781, 780, 779, - 778, 777, 776, 775, 774, 773, 772, 771, 770, 769, - 768, 767, 766, 765, 764, 763, 762, 761, 760, 759, - 758, 757, 756, 755, 754, 753, 659, 752, 751, 656, - 750, 749, 748, 747, 746, 745, 744, 743, 742, 741, - 740, 739, 735, 734, 733, 732, 731, 730, 729, 728, - - 727, 726, 725, 724, 723, 722, 721, 720, 719, 718, - 717, 716, 715, 714, 713, 712, 711, 710, 709, 708, - 707, 706, 705, 704, 703, 702, 701, 700, 699, 698, - 697, 696, 695, 694, 693, 692, 691, 690, 689, 688, - 687, 686, 685, 684, 683, 682, 681, 680, 677, 676, - 675, 674, 673, 672, 671, 670, 669, 668, 667, 666, - 665, 664, 663, 662, 661, 660, 657, 555, 654, 552, - 653, 652, 651, 650, 649, 648, 647, 646, 645, 644, - 643, 642, 641, 640, 639, 638, 637, 636, 635, 634, - 633, 632, 631, 630, 629, 628, 627, 626, 625, 624, - - 623, 622, 621, 620, 619, 618, 617, 616, 615, 614, - 613, 612, 611, 607, 606, 605, 604, 603, 602, 601, - 600, 599, 598, 597, 596, 595, 594, 593, 592, 591, - 590, 589, 588, 587, 586, 585, 584, 583, 582, 581, - 580, 579, 578, 577, 576, 575, 574, 573, 572, 571, - 570, 569, 568, 567, 564, 563, 562, 561, 560, 559, - 558, 557, 444, 556, 553, 550, 437, 549, 435, 548, - 433, 547, 431, 546, 545, 427, 544, 424, 543, 421, - 542, 418, 541, 415, 540, 412, 539, 538, 408, 537, - 405, 536, 402, 535, 399, 534, 533, 395, 532, 392, - - 531, 388, 530, 385, 529, 528, 527, 526, 525, 524, - 375, 523, 372, 522, 369, 521, 366, 520, 363, 519, - 360, 518, 357, 517, 354, 516, 351, 515, 348, 514, - 345, 513, 342, 512, 339, 511, 336, 510, 333, 509, - 330, 508, 327, 507, 323, 506, 505, 504, 503, 502, - 316, 500, 312, 497, 496, 491, 490, 489, 488, 487, - 486, 484, 481, 480, 479, 478, 477, 476, 475, 474, - 473, 470, 469, 466, 465, 464, 463, 462, 461, 460, - 459, 458, 457, 454, 289, 261, 452, 451, 450, 449, - 448, 447, 446, 445, 429, 428, 409, 396, 389, 378, - - 377, 376, 324, 320, 319, 318, 317, 302, 301, 300, - 297, 296, 295, 294, 293, 284, 281, 280, 279, 278, - 277, 276, 275, 274, 273, 271, 270, 269, 268, 267, - 264, 263, 262, 260, 259, 172, 254, 253, 252, 251, - 250, 249, 248, 247, 246, 245, 237, 236, 235, 234, - 231, 230, 227, 226, 225, 224, 223, 222, 221, 220, - 217, 216, 215, 214, 213, 212, 209, 208, 207, 206, - 205, 204, 203, 200, 199, 193, 192, 191, 190, 187, - 186, 185, 156, 155, 149, 148, 39, 127, 126, 125, - 124, 123, 122, 121, 118, 87, 39, 37, 849, 3, - - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849 - } ; - -static yyconst flex_int16_t yy_chk[1368] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 5, 23, 5, - 10, 27, 46, 23, 17, 46, 808, 10, 10, 10, - 10, 10, 10, 10, 16, 17, 16, 29, 17, 27, - 18, 116, 16, 11, 11, 11, 11, 11, 11, 11, - - 18, 19, 116, 53, 11, 29, 36, 19, 36, 53, - 10, 10, 10, 10, 10, 10, 10, 10, 10, 48, - 48, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 11, 48, 10, 10, 10, 10, 12, 12, 12, 12, - 12, 12, 12, 61, 80, 80, 12, 12, 13, 13, - 13, 13, 13, 13, 13, 99, 61, 99, 13, 13, - 14, 14, 14, 14, 14, 14, 14, 15, 47, 15, - 14, 14, 47, 12, 49, 22, 15, 49, 24, 21, - 274, 21, 15, 22, 15, 13, 21, 24, 22, 21, - 25, 24, 25, 25, 22, 274, 810, 14, 45, 45, - - 92, 44, 44, 54, 45, 25, 26, 44, 26, 26, - 26, 26, 26, 44, 26, 45, 26, 54, 44, 92, - 44, 811, 26, 26, 54, 26, 41, 43, 43, 43, - 43, 43, 43, 50, 50, 57, 812, 43, 60, 50, - 60, 59, 59, 60, 60, 813, 57, 59, 75, 57, - 50, 60, 57, 140, 75, 59, 816, 84, 59, 63, - 63, 63, 63, 43, 817, 140, 41, 41, 41, 41, - 41, 41, 62, 41, 41, 84, 159, 41, 41, 41, - 41, 41, 41, 41, 41, 41, 159, 118, 41, 118, - 62, 62, 62, 62, 64, 64, 64, 64, 65, 65, - - 65, 65, 66, 66, 66, 66, 66, 66, 108, 818, - 81, 81, 66, 67, 67, 67, 67, 67, 67, 67, - 81, 111, 108, 68, 67, 68, 68, 68, 68, 68, - 68, 117, 128, 117, 130, 111, 157, 160, 66, 128, - 133, 133, 157, 160, 117, 823, 133, 239, 130, 132, - 67, 132, 132, 132, 132, 132, 132, 133, 136, 136, - 136, 146, 146, 169, 136, 147, 147, 146, 161, 161, - 239, 147, 219, 169, 161, 136, 218, 825, 146, 240, - 244, 161, 147, 162, 162, 161, 163, 163, 218, 162, - 219, 827, 163, 173, 173, 173, 173, 830, 244, 831, - - 162, 835, 240, 163, 174, 174, 174, 174, 175, 175, - 175, 175, 176, 176, 176, 176, 177, 177, 177, 177, - 178, 178, 178, 178, 179, 179, 179, 179, 181, 181, - 181, 181, 181, 181, 837, 839, 241, 182, 181, 182, - 182, 182, 182, 182, 182, 183, 183, 183, 183, 183, - 183, 184, 184, 184, 184, 184, 184, 185, 186, 241, - 192, 194, 185, 186, 181, 192, 194, 243, 195, 845, - 452, 185, 186, 195, 192, 194, 846, 185, 186, 243, - 185, 186, 195, 192, 194, 196, 452, 197, 199, 198, - 196, 195, 197, 199, 198, 288, 842, 842, 288, 196, - - 242, 197, 199, 198, 851, 196, 807, 197, 196, 198, - 197, 199, 198, 201, 203, 204, 206, 207, 201, 203, - 204, 206, 207, 242, 806, 804, 803, 201, 203, 204, - 206, 207, 260, 799, 203, 204, 201, 203, 204, 206, - 207, 209, 210, 211, 798, 260, 209, 210, 211, 303, - 303, 303, 303, 212, 213, 209, 210, 211, 212, 213, - 797, 209, 210, 211, 209, 210, 211, 212, 213, 579, - 214, 796, 579, 212, 213, 214, 212, 213, 220, 794, - 221, 223, 224, 220, 214, 221, 223, 224, 792, 790, - 214, 787, 220, 214, 221, 223, 224, 226, 786, 784, - - 783, 220, 226, 221, 223, 224, 277, 227, 228, 229, - 231, 226, 227, 228, 229, 231, 782, 226, 781, 277, - 226, 227, 228, 229, 231, 780, 779, 227, 228, 229, - 227, 228, 229, 231, 232, 233, 234, 776, 775, 232, - 233, 234, 304, 304, 304, 304, 235, 236, 232, 233, - 234, 235, 236, 773, 232, 233, 234, 232, 233, 234, - 235, 236, 772, 245, 771, 770, 235, 236, 245, 235, - 236, 256, 256, 256, 256, 256, 256, 245, 257, 257, - 257, 257, 257, 257, 258, 258, 245, 272, 272, 769, - 258, 290, 290, 272, 291, 291, 768, 290, 766, 311, - - 291, 258, 765, 764, 272, 314, 292, 292, 290, 762, - 760, 291, 292, 300, 759, 300, 756, 300, 305, 305, - 305, 305, 311, 292, 306, 306, 306, 306, 314, 322, - 300, 307, 307, 307, 307, 308, 308, 308, 308, 308, - 308, 309, 309, 309, 309, 309, 309, 315, 326, 315, - 329, 332, 322, 335, 338, 341, 344, 347, 350, 353, - 356, 359, 362, 365, 368, 371, 374, 384, 387, 391, - 315, 326, 394, 329, 332, 398, 335, 338, 341, 344, - 347, 350, 353, 356, 359, 362, 365, 368, 371, 374, - 384, 387, 391, 401, 404, 394, 407, 411, 398, 414, - - 417, 420, 423, 426, 438, 440, 443, 753, 504, 504, - 553, 556, 752, 751, 642, 642, 401, 404, 750, 407, - 411, 738, 414, 417, 420, 423, 426, 438, 440, 443, - 504, 737, 736, 553, 556, 642, 850, 850, 850, 852, - 852, 707, 700, 699, 696, 695, 694, 693, 692, 691, - 690, 689, 688, 687, 685, 682, 681, 680, 679, 678, - 677, 676, 675, 674, 673, 672, 670, 669, 668, 667, - 665, 663, 662, 661, 660, 659, 658, 657, 656, 655, - 654, 653, 652, 651, 650, 649, 648, 647, 646, 645, - 644, 643, 641, 640, 639, 638, 637, 636, 635, 634, - - 633, 630, 629, 628, 627, 626, 625, 624, 623, 622, - 621, 620, 619, 618, 617, 616, 615, 614, 613, 612, - 610, 609, 608, 607, 606, 605, 604, 603, 602, 601, - 600, 599, 598, 597, 596, 595, 593, 592, 591, 590, - 589, 587, 586, 585, 584, 583, 582, 581, 578, 577, - 575, 574, 573, 572, 569, 568, 567, 566, 565, 564, - 563, 561, 560, 559, 558, 557, 555, 554, 552, 551, - 550, 549, 548, 547, 546, 545, 544, 543, 542, 541, - 540, 539, 538, 537, 536, 535, 534, 533, 532, 531, - 530, 526, 525, 524, 523, 522, 521, 520, 519, 518, - - 517, 516, 515, 514, 513, 512, 511, 510, 509, 508, - 507, 506, 505, 502, 501, 500, 497, 496, 495, 494, - 493, 492, 490, 488, 487, 486, 484, 483, 482, 481, - 480, 479, 478, 477, 476, 475, 474, 473, 472, 471, - 470, 469, 468, 467, 465, 464, 463, 462, 461, 460, - 459, 456, 455, 454, 451, 450, 449, 448, 447, 446, - 445, 444, 442, 441, 439, 437, 436, 435, 434, 433, - 432, 431, 430, 428, 427, 425, 424, 422, 421, 419, - 418, 416, 415, 413, 412, 410, 409, 408, 406, 405, - 403, 402, 400, 399, 397, 396, 395, 393, 392, 390, - - 388, 386, 385, 383, 382, 380, 378, 377, 376, 375, - 373, 372, 370, 369, 367, 366, 364, 363, 361, 360, - 358, 357, 355, 354, 352, 351, 349, 348, 346, 345, - 343, 342, 340, 339, 337, 336, 334, 333, 331, 330, - 328, 327, 325, 323, 321, 320, 319, 318, 317, 316, - 313, 312, 310, 302, 301, 299, 298, 297, 296, 295, - 294, 289, 287, 286, 285, 284, 283, 282, 281, 280, - 278, 276, 275, 273, 271, 270, 267, 266, 265, 264, - 263, 262, 261, 259, 255, 254, 253, 252, 251, 250, - 249, 248, 247, 246, 238, 237, 230, 225, 222, 217, - - 216, 215, 193, 191, 190, 189, 187, 172, 171, 170, - 168, 167, 166, 165, 164, 158, 156, 155, 154, 153, - 152, 151, 150, 149, 148, 145, 144, 143, 142, 141, - 139, 138, 137, 135, 134, 131, 129, 127, 126, 125, - 124, 123, 122, 121, 120, 119, 115, 114, 113, 112, - 110, 109, 107, 106, 105, 104, 103, 102, 101, 100, - 98, 97, 96, 95, 94, 93, 91, 90, 89, 88, - 87, 86, 85, 83, 82, 79, 78, 77, 76, 74, - 73, 72, 56, 55, 52, 51, 38, 37, 35, 34, - 33, 32, 31, 30, 28, 20, 8, 7, 3, 849, - - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849, 849, 849, 849, - 849, 849, 849, 849, 849, 849, 849 - } ; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -#line 1 "src/mesa/program/program_lexer.l" -#line 2 "src/mesa/program/program_lexer.l" -/* - * Copyright © 2009 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ -#include "main/glheader.h" -#include "main/imports.h" -#include "program/prog_instruction.h" -#include "program/prog_statevars.h" -#include "program/symbol_table.h" -#include "program/program_parser.h" -#include "program/program_parse.tab.h" - -#define require_ARB_vp (yyextra->mode == ARB_vertex) -#define require_ARB_fp (yyextra->mode == ARB_fragment) -#define require_NV_fp (yyextra->option.NV_fragment) -#define require_shadow (yyextra->option.Shadow) -#define require_rect (yyextra->option.TexRect) -#define require_texarray (yyextra->option.TexArray) - -#ifndef HAVE_UNISTD_H -#define YY_NO_UNISTD_H -#endif - -#define return_token_or_IDENTIFIER(condition, token) \ - do { \ - if (condition) { \ - return token; \ - } else { \ - return handle_ident(yyextra, yytext, yylval); \ - } \ - } while (0) - -#define return_token_or_DOT(condition, token) \ - do { \ - if (condition) { \ - return token; \ - } else { \ - yyless(1); \ - return DOT; \ - } \ - } while (0) - - -#define return_opcode(condition, token, opcode, len) \ - do { \ - if (condition && \ - _mesa_parse_instruction_suffix(yyextra, \ - yytext + len, \ - & yylval->temp_inst)) { \ - yylval->temp_inst.Opcode = OPCODE_ ## opcode; \ - return token; \ - } else { \ - return handle_ident(yyextra, yytext, yylval); \ - } \ - } while (0) - -#define SWIZZLE_INVAL MAKE_SWIZZLE4(SWIZZLE_NIL, SWIZZLE_NIL, \ - SWIZZLE_NIL, SWIZZLE_NIL) - -static unsigned -mask_from_char(char c) -{ - switch (c) { - case 'x': - case 'r': - return WRITEMASK_X; - case 'y': - case 'g': - return WRITEMASK_Y; - case 'z': - case 'b': - return WRITEMASK_Z; - case 'w': - case 'a': - return WRITEMASK_W; - } - - return 0; -} - -static unsigned -swiz_from_char(char c) -{ - switch (c) { - case 'x': - case 'r': - return SWIZZLE_X; - case 'y': - case 'g': - return SWIZZLE_Y; - case 'z': - case 'b': - return SWIZZLE_Z; - case 'w': - case 'a': - return SWIZZLE_W; - } - - return 0; -} - -static int -handle_ident(struct asm_parser_state *state, const char *text, YYSTYPE *lval) -{ - lval->string = strdup(text); - - return (_mesa_symbol_table_find_symbol(state->st, 0, text) == NULL) - ? IDENTIFIER : USED_IDENTIFIER; -} - -#define YY_USER_ACTION \ - do { \ - yylloc->first_column = yylloc->last_column; \ - yylloc->last_column += yyleng; \ - if ((yylloc->first_line == 1) \ - && (yylloc->first_column == 1)) { \ - yylloc->position = 1; \ - } else { \ - yylloc->position += yylloc->last_column - yylloc->first_column; \ - } \ - } while(0); - -#define YY_NO_INPUT - -/* Yes, this is intentionally doing nothing. We have this line of code -here only to avoid the compiler complaining about an unput function -that is defined, but never called. */ -#define YY_USER_INIT while (0) { unput(0); } - -#define YY_EXTRA_TYPE struct asm_parser_state * - -/* Flex defines a couple of functions with no declarations nor the -static keyword. Declare them here to avoid a compiler warning. */ -int yyget_column (yyscan_t yyscanner); -void yyset_column (int column_no , yyscan_t yyscanner); - -#line 1168 "" - -#define INITIAL 0 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -/* Holds the entire state of the reentrant scanner. */ -struct yyguts_t - { - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - int yy_n_chars; - int yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; - - int yylineno_r; - int yy_flex_debug_r; - - char *yytext_r; - int yy_more_flag; - int yy_more_len; - - YYSTYPE * yylval_r; - - YYLTYPE * yylloc_r; - - }; /* end struct yyguts_t */ - -static int yy_init_globals (yyscan_t yyscanner ); - - /* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ - # define yylval yyg->yylval_r - - # define yylloc yyg->yylloc_r - -int yylex_init (yyscan_t* scanner); - -int yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int yylex_destroy (yyscan_t yyscanner ); - -int yyget_debug (yyscan_t yyscanner ); - -void yyset_debug (int debug_flag ,yyscan_t yyscanner ); - -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner ); - -void yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); - -FILE *yyget_in (yyscan_t yyscanner ); - -void yyset_in (FILE * in_str ,yyscan_t yyscanner ); - -FILE *yyget_out (yyscan_t yyscanner ); - -void yyset_out (FILE * out_str ,yyscan_t yyscanner ); - -int yyget_leng (yyscan_t yyscanner ); - -char *yyget_text (yyscan_t yyscanner ); - -int yyget_lineno (yyscan_t yyscanner ); - -void yyset_lineno (int line_number ,yyscan_t yyscanner ); - -int yyget_column (yyscan_t yyscanner ); - -void yyset_column (int column_no ,yyscan_t yyscanner ); - -YYSTYPE * yyget_lval (yyscan_t yyscanner ); - -void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); - - YYLTYPE *yyget_lloc (yyscan_t yyscanner ); - - void yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int yywrap (yyscan_t yyscanner ); -#else -extern int yywrap (yyscan_t yyscanner ); -#endif -#endif - - static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (yyscan_t yyscanner ); -#else -static int input (yyscan_t yyscanner ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - unsigned n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int yylex \ - (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); - -#define YY_DECL int yylex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - -#line 169 "src/mesa/program/program_lexer.l" - - -#line 1416 "" - - yylval = yylval_param; - - yylloc = yylloc_param; - - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - yy_load_buffer_state(yyscanner ); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 850 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 1300 ); - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - if ( yy_act == 0 ) - { /* have to back up */ - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - yy_act = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 171 "src/mesa/program/program_lexer.l" -{ return ARBvp_10; } - YY_BREAK -case 2: -YY_RULE_SETUP -#line 172 "src/mesa/program/program_lexer.l" -{ return ARBfp_10; } - YY_BREAK -case 3: -YY_RULE_SETUP -#line 173 "src/mesa/program/program_lexer.l" -{ - yylval->integer = at_address; - return_token_or_IDENTIFIER(require_ARB_vp, ADDRESS); -} - YY_BREAK -case 4: -YY_RULE_SETUP -#line 177 "src/mesa/program/program_lexer.l" -{ return ALIAS; } - YY_BREAK -case 5: -YY_RULE_SETUP -#line 178 "src/mesa/program/program_lexer.l" -{ return ATTRIB; } - YY_BREAK -case 6: -YY_RULE_SETUP -#line 179 "src/mesa/program/program_lexer.l" -{ return END; } - YY_BREAK -case 7: -YY_RULE_SETUP -#line 180 "src/mesa/program/program_lexer.l" -{ return OPTION; } - YY_BREAK -case 8: -YY_RULE_SETUP -#line 181 "src/mesa/program/program_lexer.l" -{ return OUTPUT; } - YY_BREAK -case 9: -YY_RULE_SETUP -#line 182 "src/mesa/program/program_lexer.l" -{ return PARAM; } - YY_BREAK -case 10: -YY_RULE_SETUP -#line 183 "src/mesa/program/program_lexer.l" -{ yylval->integer = at_temp; return TEMP; } - YY_BREAK -case 11: -YY_RULE_SETUP -#line 185 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, VECTOR_OP, ABS, 3); } - YY_BREAK -case 12: -YY_RULE_SETUP -#line 186 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, BIN_OP, ADD, 3); } - YY_BREAK -case 13: -YY_RULE_SETUP -#line 187 "src/mesa/program/program_lexer.l" -{ return_opcode(require_ARB_vp, ARL, ARL, 3); } - YY_BREAK -case 14: -YY_RULE_SETUP -#line 189 "src/mesa/program/program_lexer.l" -{ return_opcode(require_ARB_fp, TRI_OP, CMP, 3); } - YY_BREAK -case 15: -YY_RULE_SETUP -#line 190 "src/mesa/program/program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, COS, 3); } - YY_BREAK -case 16: -YY_RULE_SETUP -#line 192 "src/mesa/program/program_lexer.l" -{ return_opcode(require_NV_fp, VECTOR_OP, DDX, 3); } - YY_BREAK -case 17: -YY_RULE_SETUP -#line 193 "src/mesa/program/program_lexer.l" -{ return_opcode(require_NV_fp, VECTOR_OP, DDY, 3); } - YY_BREAK -case 18: -YY_RULE_SETUP -#line 194 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, BIN_OP, DP3, 3); } - YY_BREAK -case 19: -YY_RULE_SETUP -#line 195 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, BIN_OP, DP4, 3); } - YY_BREAK -case 20: -YY_RULE_SETUP -#line 196 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, BIN_OP, DPH, 3); } - YY_BREAK -case 21: -YY_RULE_SETUP -#line 197 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, BIN_OP, DST, 3); } - YY_BREAK -case 22: -YY_RULE_SETUP -#line 199 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, SCALAR_OP, EX2, 3); } - YY_BREAK -case 23: -YY_RULE_SETUP -#line 200 "src/mesa/program/program_lexer.l" -{ return_opcode(require_ARB_vp, SCALAR_OP, EXP, 3); } - YY_BREAK -case 24: -YY_RULE_SETUP -#line 202 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, VECTOR_OP, FLR, 3); } - YY_BREAK -case 25: -YY_RULE_SETUP -#line 203 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, VECTOR_OP, FRC, 3); } - YY_BREAK -case 26: -YY_RULE_SETUP -#line 205 "src/mesa/program/program_lexer.l" -{ return_opcode(require_ARB_fp, KIL, KIL, 3); } - YY_BREAK -case 27: -YY_RULE_SETUP -#line 207 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, VECTOR_OP, LIT, 3); } - YY_BREAK -case 28: -YY_RULE_SETUP -#line 208 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, SCALAR_OP, LG2, 3); } - YY_BREAK -case 29: -YY_RULE_SETUP -#line 209 "src/mesa/program/program_lexer.l" -{ return_opcode(require_ARB_vp, SCALAR_OP, LOG, 3); } - YY_BREAK -case 30: -YY_RULE_SETUP -#line 210 "src/mesa/program/program_lexer.l" -{ return_opcode(require_ARB_fp, TRI_OP, LRP, 3); } - YY_BREAK -case 31: -YY_RULE_SETUP -#line 212 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, TRI_OP, MAD, 3); } - YY_BREAK -case 32: -YY_RULE_SETUP -#line 213 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, BIN_OP, MAX, 3); } - YY_BREAK -case 33: -YY_RULE_SETUP -#line 214 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, BIN_OP, MIN, 3); } - YY_BREAK -case 34: -YY_RULE_SETUP -#line 215 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, VECTOR_OP, MOV, 3); } - YY_BREAK -case 35: -YY_RULE_SETUP -#line 216 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, BIN_OP, MUL, 3); } - YY_BREAK -case 36: -YY_RULE_SETUP -#line 218 "src/mesa/program/program_lexer.l" -{ return_opcode(require_NV_fp, VECTOR_OP, PK2H, 4); } - YY_BREAK -case 37: -YY_RULE_SETUP -#line 219 "src/mesa/program/program_lexer.l" -{ return_opcode(require_NV_fp, VECTOR_OP, PK2US, 5); } - YY_BREAK -case 38: -YY_RULE_SETUP -#line 220 "src/mesa/program/program_lexer.l" -{ return_opcode(require_NV_fp, VECTOR_OP, PK4B, 4); } - YY_BREAK -case 39: -YY_RULE_SETUP -#line 221 "src/mesa/program/program_lexer.l" -{ return_opcode(require_NV_fp, VECTOR_OP, PK4UB, 5); } - YY_BREAK -case 40: -YY_RULE_SETUP -#line 222 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, BINSC_OP, POW, 3); } - YY_BREAK -case 41: -YY_RULE_SETUP -#line 224 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, SCALAR_OP, RCP, 3); } - YY_BREAK -case 42: -YY_RULE_SETUP -#line 225 "src/mesa/program/program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, RFL, 3); } - YY_BREAK -case 43: -YY_RULE_SETUP -#line 226 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, SCALAR_OP, RSQ, 3); } - YY_BREAK -case 44: -YY_RULE_SETUP -#line 228 "src/mesa/program/program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, SCS, 3); } - YY_BREAK -case 45: -YY_RULE_SETUP -#line 229 "src/mesa/program/program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, SEQ, 3); } - YY_BREAK -case 46: -YY_RULE_SETUP -#line 230 "src/mesa/program/program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, SFL, 3); } - YY_BREAK -case 47: -YY_RULE_SETUP -#line 231 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, BIN_OP, SGE, 3); } - YY_BREAK -case 48: -YY_RULE_SETUP -#line 232 "src/mesa/program/program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, SGT, 3); } - YY_BREAK -case 49: -YY_RULE_SETUP -#line 233 "src/mesa/program/program_lexer.l" -{ return_opcode(require_ARB_fp, SCALAR_OP, SIN, 3); } - YY_BREAK -case 50: -YY_RULE_SETUP -#line 234 "src/mesa/program/program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, SLE, 3); } - YY_BREAK -case 51: -YY_RULE_SETUP -#line 235 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, BIN_OP, SLT, 3); } - YY_BREAK -case 52: -YY_RULE_SETUP -#line 236 "src/mesa/program/program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, SNE, 3); } - YY_BREAK -case 53: -YY_RULE_SETUP -#line 237 "src/mesa/program/program_lexer.l" -{ return_opcode(require_NV_fp, BIN_OP, STR, 3); } - YY_BREAK -case 54: -YY_RULE_SETUP -#line 238 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, BIN_OP, SUB, 3); } - YY_BREAK -case 55: -YY_RULE_SETUP -#line 239 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, SWZ, SWZ, 3); } - YY_BREAK -case 56: -YY_RULE_SETUP -#line 241 "src/mesa/program/program_lexer.l" -{ return_opcode(require_ARB_fp, SAMPLE_OP, TEX, 3); } - YY_BREAK -case 57: -YY_RULE_SETUP -#line 242 "src/mesa/program/program_lexer.l" -{ return_opcode(require_ARB_fp, SAMPLE_OP, TXB, 3); } - YY_BREAK -case 58: -YY_RULE_SETUP -#line 243 "src/mesa/program/program_lexer.l" -{ return_opcode(require_NV_fp, TXD_OP, TXD, 3); } - YY_BREAK -case 59: -YY_RULE_SETUP -#line 244 "src/mesa/program/program_lexer.l" -{ return_opcode(require_ARB_fp, SAMPLE_OP, TXP, 3); } - YY_BREAK -case 60: -YY_RULE_SETUP -#line 246 "src/mesa/program/program_lexer.l" -{ return_opcode(require_NV_fp, SCALAR_OP, UP2H, 4); } - YY_BREAK -case 61: -YY_RULE_SETUP -#line 247 "src/mesa/program/program_lexer.l" -{ return_opcode(require_NV_fp, SCALAR_OP, UP2US, 5); } - YY_BREAK -case 62: -YY_RULE_SETUP -#line 248 "src/mesa/program/program_lexer.l" -{ return_opcode(require_NV_fp, SCALAR_OP, UP4B, 4); } - YY_BREAK -case 63: -YY_RULE_SETUP -#line 249 "src/mesa/program/program_lexer.l" -{ return_opcode(require_NV_fp, SCALAR_OP, UP4UB, 5); } - YY_BREAK -case 64: -YY_RULE_SETUP -#line 251 "src/mesa/program/program_lexer.l" -{ return_opcode(require_NV_fp, TRI_OP, X2D, 3); } - YY_BREAK -case 65: -YY_RULE_SETUP -#line 252 "src/mesa/program/program_lexer.l" -{ return_opcode( 1, BIN_OP, XPD, 3); } - YY_BREAK -case 66: -YY_RULE_SETUP -#line 254 "src/mesa/program/program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_vp, VERTEX); } - YY_BREAK -case 67: -YY_RULE_SETUP -#line 255 "src/mesa/program/program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp, FRAGMENT); } - YY_BREAK -case 68: -YY_RULE_SETUP -#line 256 "src/mesa/program/program_lexer.l" -{ return PROGRAM; } - YY_BREAK -case 69: -YY_RULE_SETUP -#line 257 "src/mesa/program/program_lexer.l" -{ return STATE; } - YY_BREAK -case 70: -YY_RULE_SETUP -#line 258 "src/mesa/program/program_lexer.l" -{ return RESULT; } - YY_BREAK -case 71: -YY_RULE_SETUP -#line 260 "src/mesa/program/program_lexer.l" -{ return AMBIENT; } - YY_BREAK -case 72: -YY_RULE_SETUP -#line 261 "src/mesa/program/program_lexer.l" -{ return ATTENUATION; } - YY_BREAK -case 73: -YY_RULE_SETUP -#line 262 "src/mesa/program/program_lexer.l" -{ return BACK; } - YY_BREAK -case 74: -YY_RULE_SETUP -#line 263 "src/mesa/program/program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, CLIP); } - YY_BREAK -case 75: -YY_RULE_SETUP -#line 264 "src/mesa/program/program_lexer.l" -{ return COLOR; } - YY_BREAK -case 76: -YY_RULE_SETUP -#line 265 "src/mesa/program/program_lexer.l" -{ return_token_or_DOT(require_ARB_fp, DEPTH); } - YY_BREAK -case 77: -YY_RULE_SETUP -#line 266 "src/mesa/program/program_lexer.l" -{ return DIFFUSE; } - YY_BREAK -case 78: -YY_RULE_SETUP -#line 267 "src/mesa/program/program_lexer.l" -{ return DIRECTION; } - YY_BREAK -case 79: -YY_RULE_SETUP -#line 268 "src/mesa/program/program_lexer.l" -{ return EMISSION; } - YY_BREAK -case 80: -YY_RULE_SETUP -#line 269 "src/mesa/program/program_lexer.l" -{ return ENV; } - YY_BREAK -case 81: -YY_RULE_SETUP -#line 270 "src/mesa/program/program_lexer.l" -{ return EYE; } - YY_BREAK -case 82: -YY_RULE_SETUP -#line 271 "src/mesa/program/program_lexer.l" -{ return FOGCOORD; } - YY_BREAK -case 83: -YY_RULE_SETUP -#line 272 "src/mesa/program/program_lexer.l" -{ return FOG; } - YY_BREAK -case 84: -YY_RULE_SETUP -#line 273 "src/mesa/program/program_lexer.l" -{ return FRONT; } - YY_BREAK -case 85: -YY_RULE_SETUP -#line 274 "src/mesa/program/program_lexer.l" -{ return HALF; } - YY_BREAK -case 86: -YY_RULE_SETUP -#line 275 "src/mesa/program/program_lexer.l" -{ return INVERSE; } - YY_BREAK -case 87: -YY_RULE_SETUP -#line 276 "src/mesa/program/program_lexer.l" -{ return INVTRANS; } - YY_BREAK -case 88: -YY_RULE_SETUP -#line 277 "src/mesa/program/program_lexer.l" -{ return LIGHT; } - YY_BREAK -case 89: -YY_RULE_SETUP -#line 278 "src/mesa/program/program_lexer.l" -{ return LIGHTMODEL; } - YY_BREAK -case 90: -YY_RULE_SETUP -#line 279 "src/mesa/program/program_lexer.l" -{ return LIGHTPROD; } - YY_BREAK -case 91: -YY_RULE_SETUP -#line 280 "src/mesa/program/program_lexer.l" -{ return LOCAL; } - YY_BREAK -case 92: -YY_RULE_SETUP -#line 281 "src/mesa/program/program_lexer.l" -{ return MATERIAL; } - YY_BREAK -case 93: -YY_RULE_SETUP -#line 282 "src/mesa/program/program_lexer.l" -{ return MAT_PROGRAM; } - YY_BREAK -case 94: -YY_RULE_SETUP -#line 283 "src/mesa/program/program_lexer.l" -{ return MATRIX; } - YY_BREAK -case 95: -YY_RULE_SETUP -#line 284 "src/mesa/program/program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, MATRIXINDEX); } - YY_BREAK -case 96: -YY_RULE_SETUP -#line 285 "src/mesa/program/program_lexer.l" -{ return MODELVIEW; } - YY_BREAK -case 97: -YY_RULE_SETUP -#line 286 "src/mesa/program/program_lexer.l" -{ return MVP; } - YY_BREAK -case 98: -YY_RULE_SETUP -#line 287 "src/mesa/program/program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, NORMAL); } - YY_BREAK -case 99: -YY_RULE_SETUP -#line 288 "src/mesa/program/program_lexer.l" -{ return OBJECT; } - YY_BREAK -case 100: -YY_RULE_SETUP -#line 289 "src/mesa/program/program_lexer.l" -{ return PALETTE; } - YY_BREAK -case 101: -YY_RULE_SETUP -#line 290 "src/mesa/program/program_lexer.l" -{ return PARAMS; } - YY_BREAK -case 102: -YY_RULE_SETUP -#line 291 "src/mesa/program/program_lexer.l" -{ return PLANE; } - YY_BREAK -case 103: -YY_RULE_SETUP -#line 292 "src/mesa/program/program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, POINT_TOK); } - YY_BREAK -case 104: -YY_RULE_SETUP -#line 293 "src/mesa/program/program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, POINTSIZE); } - YY_BREAK -case 105: -YY_RULE_SETUP -#line 294 "src/mesa/program/program_lexer.l" -{ return POSITION; } - YY_BREAK -case 106: -YY_RULE_SETUP -#line 295 "src/mesa/program/program_lexer.l" -{ return PRIMARY; } - YY_BREAK -case 107: -YY_RULE_SETUP -#line 296 "src/mesa/program/program_lexer.l" -{ return PROJECTION; } - YY_BREAK -case 108: -YY_RULE_SETUP -#line 297 "src/mesa/program/program_lexer.l" -{ return_token_or_DOT(require_ARB_fp, RANGE); } - YY_BREAK -case 109: -YY_RULE_SETUP -#line 298 "src/mesa/program/program_lexer.l" -{ return ROW; } - YY_BREAK -case 110: -YY_RULE_SETUP -#line 299 "src/mesa/program/program_lexer.l" -{ return SCENECOLOR; } - YY_BREAK -case 111: -YY_RULE_SETUP -#line 300 "src/mesa/program/program_lexer.l" -{ return SECONDARY; } - YY_BREAK -case 112: -YY_RULE_SETUP -#line 301 "src/mesa/program/program_lexer.l" -{ return SHININESS; } - YY_BREAK -case 113: -YY_RULE_SETUP -#line 302 "src/mesa/program/program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, SIZE_TOK); } - YY_BREAK -case 114: -YY_RULE_SETUP -#line 303 "src/mesa/program/program_lexer.l" -{ return SPECULAR; } - YY_BREAK -case 115: -YY_RULE_SETUP -#line 304 "src/mesa/program/program_lexer.l" -{ return SPOT; } - YY_BREAK -case 116: -YY_RULE_SETUP -#line 305 "src/mesa/program/program_lexer.l" -{ return TEXCOORD; } - YY_BREAK -case 117: -YY_RULE_SETUP -#line 306 "src/mesa/program/program_lexer.l" -{ return_token_or_DOT(require_ARB_fp, TEXENV); } - YY_BREAK -case 118: -YY_RULE_SETUP -#line 307 "src/mesa/program/program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, TEXGEN); } - YY_BREAK -case 119: -YY_RULE_SETUP -#line 308 "src/mesa/program/program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, TEXGEN_Q); } - YY_BREAK -case 120: -YY_RULE_SETUP -#line 309 "src/mesa/program/program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, TEXGEN_S); } - YY_BREAK -case 121: -YY_RULE_SETUP -#line 310 "src/mesa/program/program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, TEXGEN_T); } - YY_BREAK -case 122: -YY_RULE_SETUP -#line 311 "src/mesa/program/program_lexer.l" -{ return TEXTURE; } - YY_BREAK -case 123: -YY_RULE_SETUP -#line 312 "src/mesa/program/program_lexer.l" -{ return TRANSPOSE; } - YY_BREAK -case 124: -YY_RULE_SETUP -#line 313 "src/mesa/program/program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, VTXATTRIB); } - YY_BREAK -case 125: -YY_RULE_SETUP -#line 314 "src/mesa/program/program_lexer.l" -{ return_token_or_DOT(require_ARB_vp, WEIGHT); } - YY_BREAK -case 126: -YY_RULE_SETUP -#line 316 "src/mesa/program/program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp, TEXTURE_UNIT); } - YY_BREAK -case 127: -YY_RULE_SETUP -#line 317 "src/mesa/program/program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_1D); } - YY_BREAK -case 128: -YY_RULE_SETUP -#line 318 "src/mesa/program/program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_2D); } - YY_BREAK -case 129: -YY_RULE_SETUP -#line 319 "src/mesa/program/program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_3D); } - YY_BREAK -case 130: -YY_RULE_SETUP -#line 320 "src/mesa/program/program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp, TEX_CUBE); } - YY_BREAK -case 131: -YY_RULE_SETUP -#line 321 "src/mesa/program/program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_rect, TEX_RECT); } - YY_BREAK -case 132: -YY_RULE_SETUP -#line 322 "src/mesa/program/program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW1D); } - YY_BREAK -case 133: -YY_RULE_SETUP -#line 323 "src/mesa/program/program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow, TEX_SHADOW2D); } - YY_BREAK -case 134: -YY_RULE_SETUP -#line 324 "src/mesa/program/program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_rect, TEX_SHADOWRECT); } - YY_BREAK -case 135: -YY_RULE_SETUP -#line 325 "src/mesa/program/program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY1D); } - YY_BREAK -case 136: -YY_RULE_SETUP -#line 326 "src/mesa/program/program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_texarray, TEX_ARRAY2D); } - YY_BREAK -case 137: -YY_RULE_SETUP -#line 327 "src/mesa/program/program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW1D); } - YY_BREAK -case 138: -YY_RULE_SETUP -#line 328 "src/mesa/program/program_lexer.l" -{ return_token_or_IDENTIFIER(require_ARB_fp && require_shadow && require_texarray, TEX_ARRAYSHADOW2D); } - YY_BREAK -case 139: -YY_RULE_SETUP -#line 330 "src/mesa/program/program_lexer.l" -{ return handle_ident(yyextra, yytext, yylval); } - YY_BREAK -case 140: -YY_RULE_SETUP -#line 332 "src/mesa/program/program_lexer.l" -{ return DOT_DOT; } - YY_BREAK -case 141: -YY_RULE_SETUP -#line 334 "src/mesa/program/program_lexer.l" -{ - yylval->integer = strtol(yytext, NULL, 10); - return INTEGER; -} - YY_BREAK -case 142: -YY_RULE_SETUP -#line 338 "src/mesa/program/program_lexer.l" -{ - yylval->real = _mesa_strtof(yytext, NULL); - return REAL; -} - YY_BREAK -case 143: -/* rule 143 can match eol */ -*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ -yyg->yy_c_buf_p = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 342 "src/mesa/program/program_lexer.l" -{ - yylval->real = _mesa_strtof(yytext, NULL); - return REAL; -} - YY_BREAK -case 144: -YY_RULE_SETUP -#line 346 "src/mesa/program/program_lexer.l" -{ - yylval->real = _mesa_strtof(yytext, NULL); - return REAL; -} - YY_BREAK -case 145: -YY_RULE_SETUP -#line 350 "src/mesa/program/program_lexer.l" -{ - yylval->real = _mesa_strtof(yytext, NULL); - return REAL; -} - YY_BREAK -case 146: -YY_RULE_SETUP -#line 355 "src/mesa/program/program_lexer.l" -{ - yylval->swiz_mask.swizzle = SWIZZLE_NOOP; - yylval->swiz_mask.mask = WRITEMASK_XYZW; - return MASK4; -} - YY_BREAK -case 147: -YY_RULE_SETUP -#line 361 "src/mesa/program/program_lexer.l" -{ - yylval->swiz_mask.swizzle = SWIZZLE_INVAL; - yylval->swiz_mask.mask = WRITEMASK_XY - | mask_from_char(yytext[3]); - return MASK3; -} - YY_BREAK -case 148: -YY_RULE_SETUP -#line 367 "src/mesa/program/program_lexer.l" -{ - yylval->swiz_mask.swizzle = SWIZZLE_INVAL; - yylval->swiz_mask.mask = WRITEMASK_XZW; - return MASK3; -} - YY_BREAK -case 149: -YY_RULE_SETUP -#line 372 "src/mesa/program/program_lexer.l" -{ - yylval->swiz_mask.swizzle = SWIZZLE_INVAL; - yylval->swiz_mask.mask = WRITEMASK_YZW; - return MASK3; -} - YY_BREAK -case 150: -YY_RULE_SETUP -#line 378 "src/mesa/program/program_lexer.l" -{ - yylval->swiz_mask.swizzle = SWIZZLE_INVAL; - yylval->swiz_mask.mask = WRITEMASK_X - | mask_from_char(yytext[2]); - return MASK2; -} - YY_BREAK -case 151: -YY_RULE_SETUP -#line 384 "src/mesa/program/program_lexer.l" -{ - yylval->swiz_mask.swizzle = SWIZZLE_INVAL; - yylval->swiz_mask.mask = WRITEMASK_Y - | mask_from_char(yytext[2]); - return MASK2; -} - YY_BREAK -case 152: -YY_RULE_SETUP -#line 390 "src/mesa/program/program_lexer.l" -{ - yylval->swiz_mask.swizzle = SWIZZLE_INVAL; - yylval->swiz_mask.mask = WRITEMASK_ZW; - return MASK2; -} - YY_BREAK -case 153: -YY_RULE_SETUP -#line 396 "src/mesa/program/program_lexer.l" -{ - const unsigned s = swiz_from_char(yytext[1]); - yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s); - yylval->swiz_mask.mask = mask_from_char(yytext[1]); - return MASK1; -} - YY_BREAK -case 154: -YY_RULE_SETUP -#line 403 "src/mesa/program/program_lexer.l" -{ - yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]), - swiz_from_char(yytext[2]), - swiz_from_char(yytext[3]), - swiz_from_char(yytext[4])); - yylval->swiz_mask.mask = 0; - return SWIZZLE; -} - YY_BREAK -case 155: -YY_RULE_SETUP -#line 412 "src/mesa/program/program_lexer.l" -{ - yylval->swiz_mask.swizzle = SWIZZLE_NOOP; - yylval->swiz_mask.mask = WRITEMASK_XYZW; - return_token_or_DOT(require_ARB_fp, MASK4); -} - YY_BREAK -case 156: -YY_RULE_SETUP -#line 418 "src/mesa/program/program_lexer.l" -{ - yylval->swiz_mask.swizzle = SWIZZLE_INVAL; - yylval->swiz_mask.mask = WRITEMASK_XY - | mask_from_char(yytext[3]); - return_token_or_DOT(require_ARB_fp, MASK3); -} - YY_BREAK -case 157: -YY_RULE_SETUP -#line 424 "src/mesa/program/program_lexer.l" -{ - yylval->swiz_mask.swizzle = SWIZZLE_INVAL; - yylval->swiz_mask.mask = WRITEMASK_XZW; - return_token_or_DOT(require_ARB_fp, MASK3); -} - YY_BREAK -case 158: -YY_RULE_SETUP -#line 429 "src/mesa/program/program_lexer.l" -{ - yylval->swiz_mask.swizzle = SWIZZLE_INVAL; - yylval->swiz_mask.mask = WRITEMASK_YZW; - return_token_or_DOT(require_ARB_fp, MASK3); -} - YY_BREAK -case 159: -YY_RULE_SETUP -#line 435 "src/mesa/program/program_lexer.l" -{ - yylval->swiz_mask.swizzle = SWIZZLE_INVAL; - yylval->swiz_mask.mask = WRITEMASK_X - | mask_from_char(yytext[2]); - return_token_or_DOT(require_ARB_fp, MASK2); -} - YY_BREAK -case 160: -YY_RULE_SETUP -#line 441 "src/mesa/program/program_lexer.l" -{ - yylval->swiz_mask.swizzle = SWIZZLE_INVAL; - yylval->swiz_mask.mask = WRITEMASK_Y - | mask_from_char(yytext[2]); - return_token_or_DOT(require_ARB_fp, MASK2); -} - YY_BREAK -case 161: -YY_RULE_SETUP -#line 447 "src/mesa/program/program_lexer.l" -{ - yylval->swiz_mask.swizzle = SWIZZLE_INVAL; - yylval->swiz_mask.mask = WRITEMASK_ZW; - return_token_or_DOT(require_ARB_fp, MASK2); -} - YY_BREAK -case 162: -YY_RULE_SETUP -#line 453 "src/mesa/program/program_lexer.l" -{ - const unsigned s = swiz_from_char(yytext[1]); - yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(s, s, s, s); - yylval->swiz_mask.mask = mask_from_char(yytext[1]); - return_token_or_DOT(require_ARB_fp, MASK1); -} - YY_BREAK -case 163: -YY_RULE_SETUP -#line 461 "src/mesa/program/program_lexer.l" -{ - if (require_ARB_vp) { - return TEXGEN_R; - } else { - yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, - SWIZZLE_X, SWIZZLE_X); - yylval->swiz_mask.mask = WRITEMASK_X; - return MASK1; - } -} - YY_BREAK -case 164: -YY_RULE_SETUP -#line 472 "src/mesa/program/program_lexer.l" -{ - yylval->swiz_mask.swizzle = MAKE_SWIZZLE4(swiz_from_char(yytext[1]), - swiz_from_char(yytext[2]), - swiz_from_char(yytext[3]), - swiz_from_char(yytext[4])); - yylval->swiz_mask.mask = 0; - return_token_or_DOT(require_ARB_fp, SWIZZLE); -} - YY_BREAK -case 165: -YY_RULE_SETUP -#line 481 "src/mesa/program/program_lexer.l" -{ return DOT; } - YY_BREAK -case 166: -/* rule 166 can match eol */ -YY_RULE_SETUP -#line 483 "src/mesa/program/program_lexer.l" -{ - yylloc->first_line++; - yylloc->first_column = 1; - yylloc->last_line++; - yylloc->last_column = 1; - yylloc->position++; -} - YY_BREAK -case 167: -YY_RULE_SETUP -#line 490 "src/mesa/program/program_lexer.l" -/* eat whitespace */ ; - YY_BREAK -case 168: -*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ -yyg->yy_c_buf_p = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 491 "src/mesa/program/program_lexer.l" -/* eat comments */ ; - YY_BREAK -case 169: -YY_RULE_SETUP -#line 492 "src/mesa/program/program_lexer.l" -{ return yytext[0]; } - YY_BREAK -case 170: -YY_RULE_SETUP -#line 493 "src/mesa/program/program_lexer.l" -ECHO; - YY_BREAK -#line 2480 "" -case YY_STATE_EOF(INITIAL): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( yywrap(yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of yylex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = yyg->yytext_ptr; - register int number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, (size_t) num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart(yyin ,yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) -{ - register yy_state_type yy_current_state; - register char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 850 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) -{ - register int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - register char *yy_cp = yyg->yy_c_buf_p; - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 850 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 849); - - return yy_is_jam ? 0 : yy_current_state; -} - - static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner) -{ - register char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_cp = yyg->yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yyg->yy_hold_char; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = yyg->yy_n_chars + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - yyg->yytext_ptr = yy_bp; - yyg->yy_hold_char = *yy_cp; - yyg->yy_c_buf_p = yy_cp; -} - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) -#else - static int input (yyscan_t yyscanner) -#endif - -{ - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart(yyin ,yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap(yyscanner ) ) - return EOF; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(yyscanner); -#else - return input(yyscanner); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * @param yyscanner The scanner object. - * @note This function does not reset the start condition to @c INITIAL . - */ - void yyrestart (FILE * input_file , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); - yy_load_buffer_state(yyscanner ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * @param yyscanner The scanner object. - */ - void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - yy_load_buffer_state(yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; -} - -static void yy_load_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * @param yyscanner The scanner object. - * @return the allocated buffer state. - */ - YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ,yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_init_buffer(b,file ,yyscanner); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with yy_create_buffer() - * @param yyscanner The scanner object. - */ - void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - yyfree((void *) b->yy_ch_buf ,yyscanner ); - - yyfree((void *) b ,yyscanner ); -} - -#ifndef __cplusplus -extern int isatty (int ); -#endif /* __cplusplus */ - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a yyrestart() or at EOF. - */ - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) - -{ - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_flush_buffer(b ,yyscanner); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * @param yyscanner The scanner object. - */ - void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - yy_load_buffer_state(yyscanner ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * @param yyscanner The scanner object. - */ -void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(yyscanner); - - /* This block is copied from yy_switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from yy_switch_to_buffer. */ - yy_load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * @param yyscanner The scanner object. - */ -void yypop_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - yy_load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void yyensure_buffer_stack (yyscan_t yyscanner) -{ - int num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer(b ,yyscanner ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to yylex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * yy_scan_bytes() instead. - */ -YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) -{ - - return yy_scan_bytes(yystr,strlen(yystr) ,yyscanner); -} - -/** Setup the input buffer state to scan the given bytes. The next call to yylex() will - * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) yyalloc(n ,yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer(buf,n ,yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the user-defined data for this scanner. - * @param yyscanner The scanner object. - */ -YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; -} - -/** Get the current line number. - * @param yyscanner The scanner object. - */ -int yyget_lineno (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; -} - -/** Get the current column number. - * @param yyscanner The scanner object. - */ -int yyget_column (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; -} - -/** Get the input stream. - * @param yyscanner The scanner object. - */ -FILE *yyget_in (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; -} - -/** Get the output stream. - * @param yyscanner The scanner object. - */ -FILE *yyget_out (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; -} - -/** Get the length of the current token. - * @param yyscanner The scanner object. - */ -int yyget_leng (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; -} - -/** Get the current token. - * @param yyscanner The scanner object. - */ - -char *yyget_text (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; -} - -/** Set the user-defined data. This data is never touched by the scanner. - * @param user_defined The data to be associated with this scanner. - * @param yyscanner The scanner object. - */ -void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; -} - -/** Set the current line number. - * @param line_number - * @param yyscanner The scanner object. - */ -void yyset_lineno (int line_number , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "yyset_lineno called with no buffer" , yyscanner); - - yylineno = line_number; -} - -/** Set the current column. - * @param line_number - * @param yyscanner The scanner object. - */ -void yyset_column (int column_no , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "yyset_column called with no buffer" , yyscanner); - - yycolumn = column_no; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * @param yyscanner The scanner object. - * @see yy_switch_to_buffer - */ -void yyset_in (FILE * in_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = in_str ; -} - -void yyset_out (FILE * out_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = out_str ; -} - -int yyget_debug (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; -} - -void yyset_debug (int bdebug , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = bdebug ; -} - -/* Accessor methods for yylval and yylloc */ - -YYSTYPE * yyget_lval (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylval; -} - -void yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; -} - -YYLTYPE *yyget_lloc (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylloc; -} - -void yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylloc = yylloc_param; -} - -/* User-visible API */ - -/* yylex_init is special because it creates the scanner itself, so it is - * the ONLY reentrant function that doesn't take the scanner as the last argument. - * That's why we explicitly handle the declaration, instead of using our macros. - */ - -int yylex_init(yyscan_t* ptr_yy_globals) - -{ - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - return yy_init_globals ( *ptr_yy_globals ); -} - -/* yylex_init_extra has the same functionality as yylex_init, but follows the - * convention of taking the scanner as the last argument. Note however, that - * this is a *pointer* to a scanner, as it will be allocated by this call (and - * is the reason, too, why this function also must handle its own declaration). - * The user defined value in the first argument will be available to yyalloc in - * the yyextra field. - */ - -int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) - -{ - struct yyguts_t dummy_yyguts; - - yyset_extra (yy_user_defined, &dummy_yyguts); - - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - yyset_extra (yy_user_defined, *ptr_yy_globals); - - return yy_init_globals ( *ptr_yy_globals ); -} - -static int yy_init_globals (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = 0; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = (char *) 0; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = (FILE *) 0; - yyout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; -} - -/* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - yyfree(yyg->yy_buffer_stack ,yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - yyfree(yyg->yy_start_stack ,yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - yyfree ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) -{ - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) -{ - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *yyalloc (yy_size_t size , yyscan_t yyscanner) -{ - return (void *) malloc( size ); -} - -void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) -{ - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void yyfree (void * ptr , yyscan_t yyscanner) -{ - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 493 "src/mesa/program/program_lexer.l" - - - -void -_mesa_program_lexer_ctor(void **scanner, struct asm_parser_state *state, - const char *string, size_t len) -{ - yylex_init_extra(state,scanner); - yy_scan_bytes(string,len,*scanner); -} - -void -_mesa_program_lexer_dtor(void *scanner) -{ - yylex_destroy(scanner); -} - diff --git a/dll/opengl/mesa/generated/mesa/program/program_parse.tab.c b/dll/opengl/mesa/generated/mesa/program/program_parse.tab.c deleted file mode 100644 index 316ee781247..00000000000 --- a/dll/opengl/mesa/generated/mesa/program/program_parse.tab.c +++ /dev/null @@ -1,5834 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.5. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.5" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 1 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - -/* Using locations. */ -#define YYLSP_NEEDED 1 - - - -/* Copy the first part of user declarations. */ - -/* Line 268 of yacc.c */ -#line 1 "src/mesa/program/program_parse.y" - -/* - * Copyright © 2009 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ -#include -#include -#include - -#include "main/mtypes.h" -#include "main/imports.h" -#include "program/program.h" -#include "program/prog_parameter.h" -#include "program/prog_parameter_layout.h" -#include "program/prog_statevars.h" -#include "program/prog_instruction.h" - -#include "program/symbol_table.h" -#include "program/program_parser.h" - -extern void *yy_scan_string(char *); -extern void yy_delete_buffer(void *); - -static struct asm_symbol *declare_variable(struct asm_parser_state *state, - char *name, enum asm_type t, struct YYLTYPE *locp); - -static int add_state_reference(struct gl_program_parameter_list *param_list, - const gl_state_index tokens[STATE_LENGTH]); - -static int initialize_symbol_from_state(struct gl_program *prog, - struct asm_symbol *param_var, const gl_state_index tokens[STATE_LENGTH]); - -static int initialize_symbol_from_param(struct gl_program *prog, - struct asm_symbol *param_var, const gl_state_index tokens[STATE_LENGTH]); - -static int initialize_symbol_from_const(struct gl_program *prog, - struct asm_symbol *param_var, const struct asm_vector *vec, - GLboolean allowSwizzle); - -static int yyparse(struct asm_parser_state *state); - -static char *make_error_string(const char *fmt, ...); - -static void yyerror(struct YYLTYPE *locp, struct asm_parser_state *state, - const char *s); - -static int validate_inputs(struct YYLTYPE *locp, - struct asm_parser_state *state); - -static void init_dst_reg(struct prog_dst_register *r); - -static void set_dst_reg(struct prog_dst_register *r, - gl_register_file file, GLint index); - -static void init_src_reg(struct asm_src_register *r); - -static void set_src_reg(struct asm_src_register *r, - gl_register_file file, GLint index); - -static void set_src_reg_swz(struct asm_src_register *r, - gl_register_file file, GLint index, GLuint swizzle); - -static void asm_instruction_set_operands(struct asm_instruction *inst, - const struct prog_dst_register *dst, const struct asm_src_register *src0, - const struct asm_src_register *src1, const struct asm_src_register *src2); - -static struct asm_instruction *asm_instruction_ctor(gl_inst_opcode op, - const struct prog_dst_register *dst, const struct asm_src_register *src0, - const struct asm_src_register *src1, const struct asm_src_register *src2); - -static struct asm_instruction *asm_instruction_copy_ctor( - const struct prog_instruction *base, const struct prog_dst_register *dst, - const struct asm_src_register *src0, const struct asm_src_register *src1, - const struct asm_src_register *src2); - -#ifndef FALSE -#define FALSE 0 -#define TRUE (!FALSE) -#endif - -#define YYLLOC_DEFAULT(Current, Rhs, N) \ - do { \ - if (YYID(N)) { \ - (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ - (Current).position = YYRHSLOC(Rhs, 1).position; \ - (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ - } else { \ - (Current).first_line = YYRHSLOC(Rhs, 0).last_line; \ - (Current).last_line = (Current).first_line; \ - (Current).first_column = YYRHSLOC(Rhs, 0).last_column; \ - (Current).last_column = (Current).first_column; \ - (Current).position = YYRHSLOC(Rhs, 0).position \ - + (Current).first_column; \ - } \ - } while(YYID(0)) - -#define YYLEX_PARAM state->scanner - - -/* Line 268 of yacc.c */ -#line 191 "build/windows-x86/mesa/program/program_parse.tab.c" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 1 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - ARBvp_10 = 258, - ARBfp_10 = 259, - ADDRESS = 260, - ALIAS = 261, - ATTRIB = 262, - OPTION = 263, - OUTPUT = 264, - PARAM = 265, - TEMP = 266, - END = 267, - BIN_OP = 268, - BINSC_OP = 269, - SAMPLE_OP = 270, - SCALAR_OP = 271, - TRI_OP = 272, - VECTOR_OP = 273, - ARL = 274, - KIL = 275, - SWZ = 276, - TXD_OP = 277, - INTEGER = 278, - REAL = 279, - AMBIENT = 280, - ATTENUATION = 281, - BACK = 282, - CLIP = 283, - COLOR = 284, - DEPTH = 285, - DIFFUSE = 286, - DIRECTION = 287, - EMISSION = 288, - ENV = 289, - EYE = 290, - FOG = 291, - FOGCOORD = 292, - FRAGMENT = 293, - FRONT = 294, - HALF = 295, - INVERSE = 296, - INVTRANS = 297, - LIGHT = 298, - LIGHTMODEL = 299, - LIGHTPROD = 300, - LOCAL = 301, - MATERIAL = 302, - MAT_PROGRAM = 303, - MATRIX = 304, - MATRIXINDEX = 305, - MODELVIEW = 306, - MVP = 307, - NORMAL = 308, - OBJECT = 309, - PALETTE = 310, - PARAMS = 311, - PLANE = 312, - POINT_TOK = 313, - POINTSIZE = 314, - POSITION = 315, - PRIMARY = 316, - PROGRAM = 317, - PROJECTION = 318, - RANGE = 319, - RESULT = 320, - ROW = 321, - SCENECOLOR = 322, - SECONDARY = 323, - SHININESS = 324, - SIZE_TOK = 325, - SPECULAR = 326, - SPOT = 327, - STATE = 328, - TEXCOORD = 329, - TEXENV = 330, - TEXGEN = 331, - TEXGEN_Q = 332, - TEXGEN_R = 333, - TEXGEN_S = 334, - TEXGEN_T = 335, - TEXTURE = 336, - TRANSPOSE = 337, - TEXTURE_UNIT = 338, - TEX_1D = 339, - TEX_2D = 340, - TEX_3D = 341, - TEX_CUBE = 342, - TEX_RECT = 343, - TEX_SHADOW1D = 344, - TEX_SHADOW2D = 345, - TEX_SHADOWRECT = 346, - TEX_ARRAY1D = 347, - TEX_ARRAY2D = 348, - TEX_ARRAYSHADOW1D = 349, - TEX_ARRAYSHADOW2D = 350, - VERTEX = 351, - VTXATTRIB = 352, - WEIGHT = 353, - IDENTIFIER = 354, - USED_IDENTIFIER = 355, - MASK4 = 356, - MASK3 = 357, - MASK2 = 358, - MASK1 = 359, - SWIZZLE = 360, - DOT_DOT = 361, - DOT = 362 - }; -#endif - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ - -/* Line 293 of yacc.c */ -#line 126 "src/mesa/program/program_parse.y" - - struct asm_instruction *inst; - struct asm_symbol *sym; - struct asm_symbol temp_sym; - struct asm_swizzle_mask swiz_mask; - struct asm_src_register src_reg; - struct prog_dst_register dst_reg; - struct prog_instruction temp_inst; - char *string; - unsigned result; - unsigned attrib; - int integer; - float real; - gl_state_index state[STATE_LENGTH]; - int negate; - struct asm_vector vector; - gl_inst_opcode opcode; - - struct { - unsigned swz; - unsigned rgba_valid:1; - unsigned xyzw_valid:1; - unsigned negate:1; - } ext_swizzle; - - - -/* Line 293 of yacc.c */ -#line 362 "build/windows-x86/mesa/program/program_parse.tab.c" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 -#endif - - -/* Copy the second part of user declarations. */ - -/* Line 343 of yacc.c */ -#line 271 "src/mesa/program/program_parse.y" - -extern int yylex(YYSTYPE *yylval_param, YYLTYPE *yylloc_param, - void *yyscanner); - - -/* Line 343 of yacc.c */ -#line 393 "build/windows-x86/mesa/program/program_parse.tab.c" - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) -#else -# define YYUSE(e) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; -#endif -{ - return yyi; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 5 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 402 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 120 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 143 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 283 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 478 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 362 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 115, 116, 2, 113, 109, 114, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 108, - 2, 117, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 111, 2, 112, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 118, 110, 119, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 8, 10, 12, 15, 16, 20, 23, - 24, 27, 30, 32, 34, 36, 38, 40, 42, 44, - 46, 48, 50, 52, 54, 59, 64, 69, 76, 83, - 92, 101, 104, 107, 120, 123, 125, 127, 129, 131, - 133, 135, 137, 139, 141, 143, 145, 147, 154, 157, - 162, 165, 167, 171, 177, 181, 184, 192, 195, 197, - 199, 201, 203, 208, 210, 212, 214, 216, 218, 220, - 222, 226, 227, 230, 233, 235, 237, 239, 241, 243, - 245, 247, 249, 251, 252, 254, 256, 258, 260, 261, - 265, 269, 270, 273, 276, 278, 280, 282, 284, 286, - 288, 290, 292, 297, 300, 303, 305, 308, 310, 313, - 315, 318, 323, 328, 330, 331, 335, 337, 339, 342, - 344, 347, 349, 351, 355, 362, 363, 365, 368, 373, - 375, 379, 381, 383, 385, 387, 389, 391, 393, 395, - 397, 399, 402, 405, 408, 411, 414, 417, 420, 423, - 426, 429, 432, 435, 439, 441, 443, 445, 451, 453, - 455, 457, 460, 462, 464, 467, 469, 472, 479, 481, - 485, 487, 489, 491, 493, 495, 500, 502, 504, 506, - 508, 510, 512, 515, 517, 519, 525, 527, 530, 532, - 534, 540, 543, 544, 551, 555, 556, 558, 560, 562, - 564, 566, 569, 571, 573, 576, 581, 586, 587, 591, - 593, 595, 597, 600, 602, 604, 606, 608, 614, 616, - 620, 626, 632, 634, 638, 644, 646, 648, 650, 652, - 654, 656, 658, 660, 662, 666, 672, 680, 690, 693, - 696, 698, 700, 701, 702, 707, 709, 710, 711, 715, - 719, 721, 727, 730, 733, 736, 739, 743, 746, 750, - 751, 755, 757, 759, 760, 762, 764, 765, 767, 769, - 770, 772, 774, 775, 779, 780, 784, 785, 789, 791, - 793, 795, 800, 802 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int16 yyrhs[] = -{ - 121, 0, -1, 122, 123, 125, 12, -1, 3, -1, - 4, -1, 123, 124, -1, -1, 8, 262, 108, -1, - 125, 126, -1, -1, 127, 108, -1, 170, 108, -1, - 128, -1, 129, -1, 130, -1, 131, -1, 132, -1, - 133, -1, 134, -1, 135, -1, 141, -1, 136, -1, - 137, -1, 138, -1, 19, 146, 109, 142, -1, 18, - 145, 109, 144, -1, 16, 145, 109, 142, -1, 14, - 145, 109, 142, 109, 142, -1, 13, 145, 109, 144, - 109, 144, -1, 17, 145, 109, 144, 109, 144, 109, - 144, -1, 15, 145, 109, 144, 109, 139, 109, 140, - -1, 20, 144, -1, 20, 166, -1, 22, 145, 109, - 144, 109, 144, 109, 144, 109, 139, 109, 140, -1, - 83, 256, -1, 84, -1, 85, -1, 86, -1, 87, - -1, 88, -1, 89, -1, 90, -1, 91, -1, 92, - -1, 93, -1, 94, -1, 95, -1, 21, 145, 109, - 150, 109, 147, -1, 241, 143, -1, 241, 110, 143, - 110, -1, 150, 162, -1, 238, -1, 241, 150, 163, - -1, 241, 110, 150, 163, 110, -1, 151, 164, 165, - -1, 159, 161, -1, 148, 109, 148, 109, 148, 109, - 148, -1, 241, 149, -1, 23, -1, 262, -1, 100, - -1, 172, -1, 152, 111, 153, 112, -1, 186, -1, - 249, -1, 100, -1, 100, -1, 154, -1, 155, -1, - 23, -1, 159, 160, 156, -1, -1, 113, 157, -1, - 114, 158, -1, 23, -1, 23, -1, 100, -1, 104, - -1, 104, -1, 104, -1, 104, -1, 101, -1, 105, - -1, -1, 101, -1, 102, -1, 103, -1, 104, -1, - -1, 115, 166, 116, -1, 115, 167, 116, -1, -1, - 168, 163, -1, 169, 163, -1, 99, -1, 100, -1, - 171, -1, 178, -1, 242, -1, 245, -1, 248, -1, - 261, -1, 7, 99, 117, 172, -1, 96, 173, -1, - 38, 177, -1, 60, -1, 98, 175, -1, 53, -1, - 29, 254, -1, 37, -1, 74, 255, -1, 50, 111, - 176, 112, -1, 97, 111, 174, 112, -1, 23, -1, - -1, 111, 176, 112, -1, 23, -1, 60, -1, 29, - 254, -1, 37, -1, 74, 255, -1, 179, -1, 180, - -1, 10, 99, 182, -1, 10, 99, 111, 181, 112, - 183, -1, -1, 23, -1, 117, 185, -1, 117, 118, - 184, 119, -1, 187, -1, 184, 109, 187, -1, 189, - -1, 225, -1, 235, -1, 189, -1, 225, -1, 236, - -1, 188, -1, 226, -1, 235, -1, 189, -1, 73, - 213, -1, 73, 190, -1, 73, 192, -1, 73, 195, - -1, 73, 197, -1, 73, 203, -1, 73, 199, -1, - 73, 206, -1, 73, 208, -1, 73, 210, -1, 73, - 212, -1, 73, 224, -1, 47, 253, 191, -1, 201, - -1, 33, -1, 69, -1, 43, 111, 202, 112, 193, - -1, 201, -1, 60, -1, 26, -1, 72, 194, -1, - 40, -1, 32, -1, 44, 196, -1, 25, -1, 253, - 67, -1, 45, 111, 202, 112, 253, 198, -1, 201, - -1, 75, 257, 200, -1, 29, -1, 25, -1, 31, - -1, 71, -1, 23, -1, 76, 255, 204, 205, -1, - 35, -1, 54, -1, 79, -1, 80, -1, 78, -1, - 77, -1, 36, 207, -1, 29, -1, 56, -1, 28, - 111, 209, 112, 57, -1, 23, -1, 58, 211, -1, - 70, -1, 26, -1, 215, 66, 111, 218, 112, -1, - 215, 214, -1, -1, 66, 111, 218, 106, 218, 112, - -1, 49, 219, 216, -1, -1, 217, -1, 41, -1, - 82, -1, 42, -1, 23, -1, 51, 220, -1, 63, - -1, 52, -1, 81, 255, -1, 55, 111, 222, 112, - -1, 48, 111, 223, 112, -1, -1, 111, 221, 112, - -1, 23, -1, 23, -1, 23, -1, 30, 64, -1, - 229, -1, 232, -1, 227, -1, 230, -1, 62, 34, - 111, 228, 112, -1, 233, -1, 233, 106, 233, -1, - 62, 34, 111, 233, 112, -1, 62, 46, 111, 231, - 112, -1, 234, -1, 234, 106, 234, -1, 62, 46, - 111, 234, 112, -1, 23, -1, 23, -1, 237, -1, - 239, -1, 238, -1, 239, -1, 240, -1, 24, -1, - 23, -1, 118, 240, 119, -1, 118, 240, 109, 240, - 119, -1, 118, 240, 109, 240, 109, 240, 119, -1, - 118, 240, 109, 240, 109, 240, 109, 240, 119, -1, - 241, 24, -1, 241, 23, -1, 113, -1, 114, -1, - -1, -1, 244, 11, 243, 247, -1, 262, -1, -1, - -1, 5, 246, 247, -1, 247, 109, 99, -1, 99, - -1, 244, 9, 99, 117, 249, -1, 65, 60, -1, - 65, 37, -1, 65, 250, -1, 65, 59, -1, 65, - 74, 255, -1, 65, 30, -1, 29, 251, 252, -1, - -1, 111, 23, 112, -1, 39, -1, 27, -1, -1, - 61, -1, 68, -1, -1, 39, -1, 27, -1, -1, - 61, -1, 68, -1, -1, 111, 258, 112, -1, -1, - 111, 259, 112, -1, -1, 111, 260, 112, -1, 23, - -1, 23, -1, 23, -1, 6, 99, 117, 100, -1, - 99, -1, 100, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 278, 278, 281, 289, 301, 302, 305, 329, 330, - 333, 348, 351, 356, 363, 364, 365, 366, 367, 368, - 369, 372, 373, 374, 377, 383, 389, 395, 402, 408, - 415, 459, 464, 474, 518, 524, 525, 526, 527, 528, - 529, 530, 531, 532, 533, 534, 535, 538, 550, 558, - 575, 582, 601, 612, 632, 657, 664, 697, 704, 719, - 774, 817, 826, 848, 858, 862, 891, 910, 910, 912, - 919, 931, 932, 933, 936, 950, 964, 984, 995, 1007, - 1009, 1010, 1011, 1012, 1015, 1015, 1015, 1015, 1016, 1019, - 1023, 1028, 1035, 1042, 1049, 1072, 1095, 1096, 1097, 1098, - 1099, 1100, 1103, 1122, 1126, 1132, 1136, 1140, 1144, 1153, - 1162, 1166, 1171, 1177, 1188, 1188, 1189, 1191, 1195, 1199, - 1203, 1209, 1209, 1211, 1229, 1255, 1258, 1273, 1279, 1285, - 1286, 1293, 1299, 1305, 1313, 1319, 1325, 1333, 1339, 1345, - 1353, 1354, 1357, 1358, 1359, 1360, 1361, 1362, 1363, 1364, - 1365, 1366, 1367, 1370, 1379, 1383, 1387, 1393, 1402, 1406, - 1410, 1419, 1423, 1429, 1435, 1442, 1447, 1455, 1465, 1467, - 1475, 1481, 1485, 1489, 1495, 1506, 1515, 1519, 1524, 1528, - 1532, 1536, 1542, 1549, 1553, 1559, 1567, 1578, 1585, 1589, - 1595, 1605, 1616, 1620, 1638, 1647, 1650, 1656, 1660, 1664, - 1670, 1681, 1686, 1691, 1696, 1701, 1706, 1714, 1717, 1722, - 1735, 1743, 1754, 1762, 1762, 1764, 1764, 1766, 1776, 1781, - 1788, 1798, 1807, 1812, 1819, 1829, 1839, 1851, 1851, 1852, - 1852, 1854, 1864, 1872, 1882, 1890, 1898, 1907, 1918, 1922, - 1928, 1929, 1930, 1933, 1933, 1936, 1971, 1975, 1975, 1978, - 1985, 1994, 2008, 2017, 2026, 2030, 2039, 2048, 2059, 2066, - 2076, 2104, 2113, 2125, 2128, 2137, 2148, 2149, 2150, 2153, - 2154, 2155, 2158, 2159, 2162, 2163, 2166, 2167, 2170, 2181, - 2192, 2203, 2229, 2230 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "ARBvp_10", "ARBfp_10", "ADDRESS", - "ALIAS", "ATTRIB", "OPTION", "OUTPUT", "PARAM", "TEMP", "END", "BIN_OP", - "BINSC_OP", "SAMPLE_OP", "SCALAR_OP", "TRI_OP", "VECTOR_OP", "ARL", - "KIL", "SWZ", "TXD_OP", "INTEGER", "REAL", "AMBIENT", "ATTENUATION", - "BACK", "CLIP", "COLOR", "DEPTH", "DIFFUSE", "DIRECTION", "EMISSION", - "ENV", "EYE", "FOG", "FOGCOORD", "FRAGMENT", "FRONT", "HALF", "INVERSE", - "INVTRANS", "LIGHT", "LIGHTMODEL", "LIGHTPROD", "LOCAL", "MATERIAL", - "MAT_PROGRAM", "MATRIX", "MATRIXINDEX", "MODELVIEW", "MVP", "NORMAL", - "OBJECT", "PALETTE", "PARAMS", "PLANE", "POINT_TOK", "POINTSIZE", - "POSITION", "PRIMARY", "PROGRAM", "PROJECTION", "RANGE", "RESULT", "ROW", - "SCENECOLOR", "SECONDARY", "SHININESS", "SIZE_TOK", "SPECULAR", "SPOT", - "STATE", "TEXCOORD", "TEXENV", "TEXGEN", "TEXGEN_Q", "TEXGEN_R", - "TEXGEN_S", "TEXGEN_T", "TEXTURE", "TRANSPOSE", "TEXTURE_UNIT", "TEX_1D", - "TEX_2D", "TEX_3D", "TEX_CUBE", "TEX_RECT", "TEX_SHADOW1D", - "TEX_SHADOW2D", "TEX_SHADOWRECT", "TEX_ARRAY1D", "TEX_ARRAY2D", - "TEX_ARRAYSHADOW1D", "TEX_ARRAYSHADOW2D", "VERTEX", "VTXATTRIB", - "WEIGHT", "IDENTIFIER", "USED_IDENTIFIER", "MASK4", "MASK3", "MASK2", - "MASK1", "SWIZZLE", "DOT_DOT", "DOT", "';'", "','", "'|'", "'['", "']'", - "'+'", "'-'", "'('", "')'", "'='", "'{'", "'}'", "$accept", "program", - "language", "optionSequence", "option", "statementSequence", "statement", - "instruction", "ALU_instruction", "TexInstruction", "ARL_instruction", - "VECTORop_instruction", "SCALARop_instruction", "BINSCop_instruction", - "BINop_instruction", "TRIop_instruction", "SAMPLE_instruction", - "KIL_instruction", "TXD_instruction", "texImageUnit", "texTarget", - "SWZ_instruction", "scalarSrcReg", "scalarUse", "swizzleSrcReg", - "maskedDstReg", "maskedAddrReg", "extendedSwizzle", "extSwizComp", - "extSwizSel", "srcReg", "dstReg", "progParamArray", "progParamArrayMem", - "progParamArrayAbs", "progParamArrayRel", "addrRegRelOffset", - "addrRegPosOffset", "addrRegNegOffset", "addrReg", "addrComponent", - "addrWriteMask", "scalarSuffix", "swizzleSuffix", "optionalMask", - "optionalCcMask", "ccTest", "ccTest2", "ccMaskRule", "ccMaskRule2", - "namingStatement", "ATTRIB_statement", "attribBinding", "vtxAttribItem", - "vtxAttribNum", "vtxOptWeightNum", "vtxWeightNum", "fragAttribItem", - "PARAM_statement", "PARAM_singleStmt", "PARAM_multipleStmt", - "optArraySize", "paramSingleInit", "paramMultipleInit", - "paramMultInitList", "paramSingleItemDecl", "paramSingleItemUse", - "paramMultipleItem", "stateMultipleItem", "stateSingleItem", - "stateMaterialItem", "stateMatProperty", "stateLightItem", - "stateLightProperty", "stateSpotProperty", "stateLightModelItem", - "stateLModProperty", "stateLightProdItem", "stateLProdProperty", - "stateTexEnvItem", "stateTexEnvProperty", "ambDiffSpecProperty", - "stateLightNumber", "stateTexGenItem", "stateTexGenType", - "stateTexGenCoord", "stateFogItem", "stateFogProperty", - "stateClipPlaneItem", "stateClipPlaneNum", "statePointItem", - "statePointProperty", "stateMatrixRow", "stateMatrixRows", - "optMatrixRows", "stateMatrixItem", "stateOptMatModifier", - "stateMatModifier", "stateMatrixRowNum", "stateMatrixName", - "stateOptModMatNum", "stateModMatNum", "statePaletteMatNum", - "stateProgramMatNum", "stateDepthItem", "programSingleItem", - "programMultipleItem", "progEnvParams", "progEnvParamNums", - "progEnvParam", "progLocalParams", "progLocalParamNums", - "progLocalParam", "progEnvParamNum", "progLocalParamNum", - "paramConstDecl", "paramConstUse", "paramConstScalarDecl", - "paramConstScalarUse", "paramConstVector", "signedFloatConstant", - "optionalSign", "TEMP_statement", "@1", "optVarSize", - "ADDRESS_statement", "@2", "varNameList", "OUTPUT_statement", - "resultBinding", "resultColBinding", "optResultFaceType", - "optResultColorType", "optFaceType", "optColorType", - "optTexCoordUnitNum", "optTexImageUnitNum", "optLegacyTexUnitNum", - "texCoordUnitNum", "texImageUnitNum", "legacyTexUnitNum", - "ALIAS_statement", "string", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 59, 44, - 124, 91, 93, 43, 45, 40, 41, 61, 123, 125 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint16 yyr1[] = -{ - 0, 120, 121, 122, 122, 123, 123, 124, 125, 125, - 126, 126, 127, 127, 128, 128, 128, 128, 128, 128, - 128, 129, 129, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 137, 138, 139, 140, 140, 140, 140, 140, - 140, 140, 140, 140, 140, 140, 140, 141, 142, 142, - 143, 143, 144, 144, 145, 146, 147, 148, 149, 149, - 150, 150, 150, 150, 151, 151, 152, 153, 153, 154, - 155, 156, 156, 156, 157, 158, 159, 160, 161, 162, - 163, 163, 163, 163, 164, 164, 164, 164, 164, 165, - 165, 165, 166, 167, 168, 169, 170, 170, 170, 170, - 170, 170, 171, 172, 172, 173, 173, 173, 173, 173, - 173, 173, 173, 174, 175, 175, 176, 177, 177, 177, - 177, 178, 178, 179, 180, 181, 181, 182, 183, 184, - 184, 185, 185, 185, 186, 186, 186, 187, 187, 187, - 188, 188, 189, 189, 189, 189, 189, 189, 189, 189, - 189, 189, 189, 190, 191, 191, 191, 192, 193, 193, - 193, 193, 193, 194, 195, 196, 196, 197, 198, 199, - 200, 201, 201, 201, 202, 203, 204, 204, 205, 205, - 205, 205, 206, 207, 207, 208, 209, 210, 211, 211, - 212, 213, 214, 214, 215, 216, 216, 217, 217, 217, - 218, 219, 219, 219, 219, 219, 219, 220, 220, 221, - 222, 223, 224, 225, 225, 226, 226, 227, 228, 228, - 229, 230, 231, 231, 232, 233, 234, 235, 235, 236, - 236, 237, 238, 238, 239, 239, 239, 239, 240, 240, - 241, 241, 241, 243, 242, 244, 244, 246, 245, 247, - 247, 248, 249, 249, 249, 249, 249, 249, 250, 251, - 251, 251, 251, 252, 252, 252, 253, 253, 253, 254, - 254, 254, 255, 255, 256, 256, 257, 257, 258, 259, - 260, 261, 262, 262 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 4, 1, 1, 2, 0, 3, 2, 0, - 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 4, 4, 4, 6, 6, 8, - 8, 2, 2, 12, 2, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 6, 2, 4, - 2, 1, 3, 5, 3, 2, 7, 2, 1, 1, - 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - 3, 0, 2, 2, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0, 1, 1, 1, 1, 0, 3, - 3, 0, 2, 2, 1, 1, 1, 1, 1, 1, - 1, 1, 4, 2, 2, 1, 2, 1, 2, 1, - 2, 4, 4, 1, 0, 3, 1, 1, 2, 1, - 2, 1, 1, 3, 6, 0, 1, 2, 4, 1, - 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 3, 1, 1, 1, 5, 1, 1, - 1, 2, 1, 1, 2, 1, 2, 6, 1, 3, - 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, - 1, 1, 2, 1, 1, 5, 1, 2, 1, 1, - 5, 2, 0, 6, 3, 0, 1, 1, 1, 1, - 1, 2, 1, 1, 2, 4, 4, 0, 3, 1, - 1, 1, 2, 1, 1, 1, 1, 5, 1, 3, - 5, 5, 1, 3, 5, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 5, 7, 9, 2, 2, - 1, 1, 0, 0, 4, 1, 0, 0, 3, 3, - 1, 5, 2, 2, 2, 2, 3, 2, 3, 0, - 3, 1, 1, 0, 1, 1, 0, 1, 1, 0, - 1, 1, 0, 3, 0, 3, 0, 3, 1, 1, - 1, 4, 1, 1 -}; - -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint16 yydefact[] = -{ - 0, 3, 4, 0, 6, 1, 9, 0, 5, 246, - 282, 283, 0, 247, 0, 0, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 242, 0, 0, 8, 0, - 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, - 23, 20, 0, 96, 97, 121, 122, 98, 0, 99, - 100, 101, 245, 7, 0, 0, 0, 0, 0, 65, - 0, 88, 64, 0, 0, 0, 0, 0, 76, 0, - 0, 94, 240, 241, 31, 32, 83, 0, 0, 0, - 10, 11, 0, 243, 250, 248, 0, 0, 125, 242, - 123, 259, 257, 253, 255, 252, 272, 254, 242, 84, - 85, 86, 87, 91, 242, 242, 242, 242, 242, 242, - 78, 55, 81, 80, 82, 92, 233, 232, 0, 0, - 0, 0, 60, 0, 242, 83, 0, 61, 63, 134, - 135, 213, 214, 136, 229, 230, 0, 242, 0, 0, - 0, 281, 102, 126, 0, 127, 131, 132, 133, 227, - 228, 231, 0, 262, 261, 0, 263, 0, 256, 0, - 0, 54, 0, 0, 0, 26, 0, 25, 24, 269, - 119, 117, 272, 104, 0, 0, 0, 0, 0, 0, - 266, 0, 266, 0, 0, 276, 272, 142, 143, 144, - 145, 147, 146, 148, 149, 150, 151, 0, 152, 269, - 109, 0, 107, 105, 272, 0, 114, 103, 83, 0, - 52, 0, 0, 0, 0, 244, 249, 0, 239, 238, - 0, 264, 265, 258, 278, 0, 242, 95, 0, 0, - 83, 242, 0, 48, 0, 51, 0, 242, 270, 271, - 118, 120, 0, 0, 0, 212, 183, 184, 182, 0, - 165, 268, 267, 164, 0, 0, 0, 0, 207, 203, - 0, 202, 272, 195, 189, 188, 187, 0, 0, 0, - 0, 108, 0, 110, 0, 0, 106, 0, 242, 234, - 69, 0, 67, 68, 0, 242, 242, 251, 0, 124, - 260, 273, 28, 89, 90, 93, 27, 0, 79, 50, - 274, 0, 0, 225, 0, 226, 0, 186, 0, 174, - 0, 166, 0, 171, 172, 155, 156, 173, 153, 154, - 0, 0, 201, 0, 204, 197, 199, 198, 194, 196, - 280, 0, 170, 169, 176, 177, 0, 0, 116, 0, - 113, 0, 0, 53, 0, 62, 77, 71, 47, 0, - 0, 0, 242, 49, 0, 34, 0, 242, 220, 224, - 0, 0, 266, 211, 0, 209, 0, 210, 0, 277, - 181, 180, 178, 179, 175, 200, 0, 111, 112, 115, - 242, 235, 0, 0, 70, 242, 58, 57, 59, 242, - 0, 0, 0, 129, 137, 140, 138, 215, 216, 139, - 279, 0, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 30, 29, 185, 160, 162, 159, - 0, 157, 158, 0, 206, 208, 205, 190, 0, 74, - 72, 75, 73, 0, 0, 0, 0, 141, 192, 242, - 128, 275, 163, 161, 167, 168, 242, 236, 242, 0, - 0, 0, 0, 191, 130, 0, 0, 0, 0, 218, - 0, 222, 0, 237, 242, 0, 217, 0, 221, 0, - 0, 56, 33, 219, 223, 0, 0, 193 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 3, 4, 6, 8, 9, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 301, - 414, 41, 162, 233, 74, 60, 69, 348, 349, 387, - 234, 61, 126, 281, 282, 283, 384, 430, 432, 70, - 347, 111, 299, 115, 103, 161, 75, 229, 76, 230, - 42, 43, 127, 207, 341, 276, 339, 173, 44, 45, - 46, 144, 90, 289, 392, 145, 128, 393, 394, 129, - 187, 318, 188, 421, 443, 189, 253, 190, 444, 191, - 333, 319, 310, 192, 336, 374, 193, 248, 194, 308, - 195, 266, 196, 437, 453, 197, 328, 329, 376, 263, - 322, 366, 368, 364, 198, 130, 396, 397, 458, 131, - 398, 460, 132, 304, 306, 399, 133, 149, 134, 135, - 151, 77, 47, 139, 48, 49, 54, 85, 50, 62, - 97, 156, 223, 254, 240, 158, 355, 268, 225, 401, - 331, 51, 12 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -398 -static const yytype_int16 yypact[] = -{ - 52, -398, -398, 14, -398, -398, 67, 152, -398, 24, - -398, -398, 5, -398, 47, 81, 99, -398, -1, -1, - -1, -1, -1, -1, 43, 56, -1, -1, -398, 97, - -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, - -398, -398, 112, -398, -398, -398, -398, -398, 156, -398, - -398, -398, -398, -398, 111, 98, 141, 95, 127, -398, - 84, 142, -398, 146, 150, 153, 157, 158, -398, 159, - 165, -398, -398, -398, -398, -398, 113, -13, 161, 163, - -398, -398, 162, -398, -398, 164, 174, 10, 252, -3, - -398, -11, -398, -398, -398, -398, 166, -398, -20, -398, - -398, -398, -398, 167, -20, -20, -20, -20, -20, -20, - -398, -398, -398, -398, -398, -398, -398, -398, 137, 70, - 132, 85, 168, 34, -20, 113, 169, -398, -398, -398, - -398, -398, -398, -398, -398, -398, 34, -20, 171, 111, - 179, -398, -398, -398, 172, -398, -398, -398, -398, -398, - -398, -398, 216, -398, -398, 253, 76, 258, -398, 176, - 154, -398, 178, 29, 180, -398, 181, -398, -398, 110, - -398, -398, 166, -398, 175, 182, 183, 219, 32, 184, - 177, 186, 94, 140, 7, 187, 166, -398, -398, -398, - -398, -398, -398, -398, -398, -398, -398, 226, -398, 110, - -398, 188, -398, -398, 166, 189, 190, -398, 113, 9, - -398, 1, 193, 195, 240, 164, -398, 191, -398, -398, - 194, -398, -398, -398, -398, 197, -20, -398, 196, 198, - 113, -20, 34, -398, 203, 206, 228, -20, -398, -398, - -398, -398, 290, 292, 293, -398, -398, -398, -398, 294, - -398, -398, -398, -398, 251, 294, 48, 208, 209, -398, - 210, -398, 166, 21, -398, -398, -398, 299, 295, 12, - 212, -398, 302, -398, 304, 302, -398, 218, -20, -398, - -398, 217, -398, -398, 227, -20, -20, -398, 214, -398, - -398, -398, -398, -398, -398, -398, -398, 220, -398, -398, - 222, 225, 229, -398, 223, -398, 224, -398, 230, -398, - 231, -398, 233, -398, -398, -398, -398, -398, -398, -398, - 314, 316, -398, 317, -398, -398, -398, -398, -398, -398, - -398, 234, -398, -398, -398, -398, 170, 318, -398, 235, - -398, 236, 237, -398, 44, -398, -398, 143, -398, 244, - -15, 245, 36, -398, 332, -398, 138, -20, -398, -398, - 301, 101, 94, -398, 248, -398, 249, -398, 250, -398, - -398, -398, -398, -398, -398, -398, 254, -398, -398, -398, - -20, -398, 333, 340, -398, -20, -398, -398, -398, -20, - 102, 132, 75, -398, -398, -398, -398, -398, -398, -398, - -398, 255, -398, -398, -398, -398, -398, -398, -398, -398, - -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, - 336, -398, -398, 49, -398, -398, -398, -398, 90, -398, - -398, -398, -398, 256, 260, 259, 261, -398, 298, 36, - -398, -398, -398, -398, -398, -398, -20, -398, -20, 228, - 290, 292, 262, -398, -398, 257, 265, 268, 266, 273, - 269, 274, 318, -398, -20, 138, -398, 290, -398, 292, - 107, -398, -398, -398, -398, 318, 270, -398 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, - -398, -398, -398, -398, -398, -398, -398, -398, -398, -78, - -82, -398, -100, 155, -86, 215, -398, -398, -372, -398, - -54, -398, -398, -398, -398, -398, -398, -398, -398, 173, - -398, -398, -398, -118, -398, -398, 232, -398, -398, -398, - -398, -398, 303, -398, -398, -398, 114, -398, -398, -398, - -398, -398, -398, -398, -398, -398, -398, -53, -398, -88, - -398, -398, -398, -398, -398, -398, -398, -398, -398, -398, - -398, -334, 130, -398, -398, -398, -398, -398, -398, -398, - -398, -398, -398, -398, -398, 0, -398, -398, -397, -398, - -398, -398, -398, -398, -398, 305, -398, -398, -398, -398, - -398, -398, -398, -396, -383, 306, -398, -398, -137, -87, - -120, -89, -398, -398, -398, -398, -398, 263, -398, 185, - -398, -398, -398, -177, 199, -154, -398, -398, -398, -398, - -398, -398, -6 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -230 -static const yytype_int16 yytable[] = -{ - 152, 146, 150, 52, 209, 256, 165, 210, 386, 168, - 116, 117, 159, 433, 5, 163, 153, 163, 241, 164, - 163, 166, 167, 125, 280, 118, 235, 422, 154, 13, - 14, 15, 269, 264, 16, 152, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 334, 118, 119, - 273, 213, 116, 117, 459, 1, 2, 116, 117, 119, - 120, 246, 325, 326, 58, 470, 335, 118, 461, 208, - 120, 473, 118, 313, 313, 7, 456, 265, 476, 314, - 314, 315, 212, 121, 10, 11, 474, 122, 247, 445, - 277, 119, 471, 72, 73, 235, 119, 123, 390, 59, - 155, 68, 120, 327, 174, 124, 121, 120, 324, 391, - 72, 73, 295, 53, 199, 124, 175, 316, 278, 317, - 317, 251, 200, 10, 11, 121, 313, 417, 279, 122, - 121, 296, 314, 252, 122, 201, 435, 221, 202, 232, - 292, 418, 163, 68, 222, 203, 55, 124, 436, 72, - 73, 302, 124, 380, 124, 71, 91, 92, 344, 204, - 176, 419, 177, 381, 93, 82, 169, 83, 178, 72, - 73, 238, 317, 420, 170, 179, 180, 181, 239, 182, - 56, 183, 205, 206, 439, 423, 94, 95, 257, 152, - 184, 258, 259, 98, 440, 260, 350, 171, 57, 446, - 351, 96, 250, 261, 251, 80, 88, 185, 186, 447, - 84, 172, 89, 475, 112, 86, 252, 113, 114, 427, - 81, 262, 402, 403, 404, 405, 406, 407, 408, 409, - 410, 411, 412, 413, 63, 64, 65, 66, 67, 218, - 219, 78, 79, 99, 100, 101, 102, 370, 371, 372, - 373, 10, 11, 71, 227, 104, 382, 383, 87, 105, - 428, 138, 106, 152, 395, 150, 107, 108, 109, 110, - 136, 415, 137, 140, 141, 143, 220, 157, 216, -66, - 211, 224, 160, 245, 217, 226, 242, 231, 214, 236, - 237, 152, 270, 243, 244, 249, 350, 255, 267, 272, - 274, 275, 285, 434, 286, 58, 290, 298, 288, 291, - -229, 300, 293, 303, 294, 305, 307, 309, 311, 320, - 321, 323, 330, 337, 332, 338, 455, 340, 343, 345, - 353, 346, 352, 354, 356, 358, 359, 363, 357, 365, - 367, 375, 360, 361, 388, 362, 369, 377, 378, 379, - 152, 395, 150, 385, 389, 400, 429, 152, 416, 350, - 424, 425, 426, 431, 452, 448, 427, 441, 442, 449, - 450, 457, 451, 462, 464, 350, 463, 465, 466, 467, - 469, 468, 477, 472, 284, 312, 454, 297, 0, 342, - 142, 438, 228, 0, 147, 148, 0, 0, 271, 287, - 0, 0, 215 -}; - -#define yypact_value_is_default(yystate) \ - ((yystate) == (-398)) - -#define yytable_value_is_error(yytable_value) \ - YYID (0) - -static const yytype_int16 yycheck[] = -{ - 89, 89, 89, 9, 124, 182, 106, 125, 23, 109, - 23, 24, 98, 385, 0, 104, 27, 106, 172, 105, - 109, 107, 108, 77, 23, 38, 163, 361, 39, 5, - 6, 7, 186, 26, 10, 124, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 35, 38, 62, - 204, 137, 23, 24, 450, 3, 4, 23, 24, 62, - 73, 29, 41, 42, 65, 462, 54, 38, 451, 123, - 73, 467, 38, 25, 25, 8, 448, 70, 475, 31, - 31, 33, 136, 96, 99, 100, 469, 100, 56, 423, - 208, 62, 464, 113, 114, 232, 62, 110, 62, 100, - 111, 100, 73, 82, 34, 118, 96, 73, 262, 73, - 113, 114, 230, 108, 29, 118, 46, 69, 109, 71, - 71, 27, 37, 99, 100, 96, 25, 26, 119, 100, - 96, 231, 31, 39, 100, 50, 34, 61, 53, 110, - 226, 40, 231, 100, 68, 60, 99, 118, 46, 113, - 114, 237, 118, 109, 118, 99, 29, 30, 278, 74, - 28, 60, 30, 119, 37, 9, 29, 11, 36, 113, - 114, 61, 71, 72, 37, 43, 44, 45, 68, 47, - 99, 49, 97, 98, 109, 362, 59, 60, 48, 278, - 58, 51, 52, 109, 119, 55, 285, 60, 99, 109, - 286, 74, 25, 63, 27, 108, 111, 75, 76, 119, - 99, 74, 117, 106, 101, 117, 39, 104, 105, 112, - 108, 81, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 19, 20, 21, 22, 23, 23, - 24, 26, 27, 101, 102, 103, 104, 77, 78, 79, - 80, 99, 100, 99, 100, 109, 113, 114, 117, 109, - 380, 99, 109, 352, 352, 352, 109, 109, 109, 104, - 109, 357, 109, 109, 100, 23, 23, 111, 99, 111, - 111, 23, 115, 64, 112, 109, 111, 109, 117, 109, - 109, 380, 66, 111, 111, 111, 385, 111, 111, 111, - 111, 111, 109, 389, 109, 65, 112, 104, 117, 112, - 104, 83, 116, 23, 116, 23, 23, 23, 67, 111, - 111, 111, 23, 111, 29, 23, 446, 23, 110, 112, - 110, 104, 118, 111, 109, 112, 112, 23, 109, 23, - 23, 23, 112, 112, 350, 112, 112, 112, 112, 112, - 439, 439, 439, 109, 109, 23, 23, 446, 57, 448, - 112, 112, 112, 23, 66, 109, 112, 112, 32, 109, - 111, 449, 111, 111, 109, 464, 119, 109, 112, 106, - 106, 112, 112, 465, 211, 255, 439, 232, -1, 275, - 87, 391, 160, -1, 89, 89, -1, -1, 199, 214, - -1, -1, 139 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint16 yystos[] = -{ - 0, 3, 4, 121, 122, 0, 123, 8, 124, 125, - 99, 100, 262, 5, 6, 7, 10, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 141, 170, 171, 178, 179, 180, 242, 244, 245, - 248, 261, 262, 108, 246, 99, 99, 99, 65, 100, - 145, 151, 249, 145, 145, 145, 145, 145, 100, 146, - 159, 99, 113, 114, 144, 166, 168, 241, 145, 145, - 108, 108, 9, 11, 99, 247, 117, 117, 111, 117, - 182, 29, 30, 37, 59, 60, 74, 250, 109, 101, - 102, 103, 104, 164, 109, 109, 109, 109, 109, 109, - 104, 161, 101, 104, 105, 163, 23, 24, 38, 62, - 73, 96, 100, 110, 118, 150, 152, 172, 186, 189, - 225, 229, 232, 236, 238, 239, 109, 109, 99, 243, - 109, 100, 172, 23, 181, 185, 189, 225, 235, 237, - 239, 240, 241, 27, 39, 111, 251, 111, 255, 144, - 115, 165, 142, 241, 144, 142, 144, 144, 142, 29, - 37, 60, 74, 177, 34, 46, 28, 30, 36, 43, - 44, 45, 47, 49, 58, 75, 76, 190, 192, 195, - 197, 199, 203, 206, 208, 210, 212, 215, 224, 29, - 37, 50, 53, 60, 74, 97, 98, 173, 150, 240, - 163, 111, 150, 144, 117, 247, 99, 112, 23, 24, - 23, 61, 68, 252, 23, 258, 109, 100, 166, 167, - 169, 109, 110, 143, 150, 238, 109, 109, 61, 68, - 254, 255, 111, 111, 111, 64, 29, 56, 207, 111, - 25, 27, 39, 196, 253, 111, 253, 48, 51, 52, - 55, 63, 81, 219, 26, 70, 211, 111, 257, 255, - 66, 254, 111, 255, 111, 111, 175, 163, 109, 119, - 23, 153, 154, 155, 159, 109, 109, 249, 117, 183, - 112, 112, 144, 116, 116, 163, 142, 143, 104, 162, - 83, 139, 144, 23, 233, 23, 234, 23, 209, 23, - 202, 67, 202, 25, 31, 33, 69, 71, 191, 201, - 111, 111, 220, 111, 255, 41, 42, 82, 216, 217, - 23, 260, 29, 200, 35, 54, 204, 111, 23, 176, - 23, 174, 176, 110, 240, 112, 104, 160, 147, 148, - 241, 144, 118, 110, 111, 256, 109, 109, 112, 112, - 112, 112, 112, 23, 223, 23, 221, 23, 222, 112, - 77, 78, 79, 80, 205, 23, 218, 112, 112, 112, - 109, 119, 113, 114, 156, 109, 23, 149, 262, 109, - 62, 73, 184, 187, 188, 189, 226, 227, 230, 235, - 23, 259, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 140, 144, 57, 26, 40, 60, - 72, 193, 201, 253, 112, 112, 112, 112, 240, 23, - 157, 23, 158, 148, 144, 34, 46, 213, 215, 109, - 119, 112, 32, 194, 198, 201, 109, 119, 109, 109, - 111, 111, 66, 214, 187, 240, 148, 139, 228, 233, - 231, 234, 111, 119, 109, 109, 112, 106, 112, 106, - 218, 148, 140, 233, 234, 106, 218, 112 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, state, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval, &yylloc, scanner) -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, Location, state); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct asm_parser_state *state) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, state) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; - struct asm_parser_state *state; -#endif -{ - if (!yyvaluep) - return; - YYUSE (yylocationp); - YYUSE (state); -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct asm_parser_state *state) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, state) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; - struct asm_parser_state *state; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - YY_LOCATION_PRINT (yyoutput, *yylocationp); - YYFPRINTF (yyoutput, ": "); - yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, state); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, struct asm_parser_state *state) -#else -static void -yy_reduce_print (yyvsp, yylsp, yyrule, state) - YYSTYPE *yyvsp; - YYLTYPE *yylsp; - int yyrule; - struct asm_parser_state *state; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , &(yylsp[(yyi + 1) - (yynrhs)]) , state); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, yylsp, Rule, state); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = 0; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct asm_parser_state *state) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, yylocationp, state) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - YYLTYPE *yylocationp; - struct asm_parser_state *state; -#endif -{ - YYUSE (yyvaluep); - YYUSE (yylocationp); - YYUSE (state); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - - default: - break; - } -} - - -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (struct asm_parser_state *state); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - -/*----------. -| yyparse. | -`----------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (struct asm_parser_state *state) -#else -int -yyparse (state) - struct asm_parser_state *state; -#endif -#endif -{ -/* The lookahead symbol. */ -int yychar; - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; - -/* Location data for the lookahead symbol. */ -YYLTYPE yylloc; - - /* Number of syntax errors so far. */ - int yynerrs; - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - /* The location stack. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls; - YYLTYPE *yylsp; - - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[3]; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - YYLTYPE yyloc; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; - yyls = yylsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - yylsp = yyls; - -#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - /* Initialize the default location before parsing starts. */ - yylloc.first_line = yylloc.last_line = 1; - yylloc.first_column = yylloc.last_column = 1; -#endif - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yyls1, yysize * sizeof (*yylsp), - &yystacksize); - - yyls = yyls1; - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - *++yyvsp = yylval; - *++yylsp = yylloc; - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 3: - -/* Line 1806 of yacc.c */ -#line 282 "src/mesa/program/program_parse.y" - { - if (state->prog->Target != GL_VERTEX_PROGRAM_ARB) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid fragment program header"); - - } - state->mode = ARB_vertex; - } - break; - - case 4: - -/* Line 1806 of yacc.c */ -#line 290 "src/mesa/program/program_parse.y" - { - if (state->prog->Target != GL_FRAGMENT_PROGRAM_ARB) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex program header"); - } - state->mode = ARB_fragment; - - state->option.TexRect = - (state->ctx->Extensions.NV_texture_rectangle != GL_FALSE); - } - break; - - case 7: - -/* Line 1806 of yacc.c */ -#line 306 "src/mesa/program/program_parse.y" - { - int valid = 0; - - if (state->mode == ARB_vertex) { - valid = _mesa_ARBvp_parse_option(state, (yyvsp[(2) - (3)].string)); - } else if (state->mode == ARB_fragment) { - valid = _mesa_ARBfp_parse_option(state, (yyvsp[(2) - (3)].string)); - } - - - free((yyvsp[(2) - (3)].string)); - - if (!valid) { - const char *const err_str = (state->mode == ARB_vertex) - ? "invalid ARB vertex program option" - : "invalid ARB fragment program option"; - - yyerror(& (yylsp[(2) - (3)]), state, err_str); - YYERROR; - } - } - break; - - case 10: - -/* Line 1806 of yacc.c */ -#line 334 "src/mesa/program/program_parse.y" - { - if ((yyvsp[(1) - (2)].inst) != NULL) { - if (state->inst_tail == NULL) { - state->inst_head = (yyvsp[(1) - (2)].inst); - } else { - state->inst_tail->next = (yyvsp[(1) - (2)].inst); - } - - state->inst_tail = (yyvsp[(1) - (2)].inst); - (yyvsp[(1) - (2)].inst)->next = NULL; - - state->prog->NumInstructions++; - } - } - break; - - case 12: - -/* Line 1806 of yacc.c */ -#line 352 "src/mesa/program/program_parse.y" - { - (yyval.inst) = (yyvsp[(1) - (1)].inst); - state->prog->NumAluInstructions++; - } - break; - - case 13: - -/* Line 1806 of yacc.c */ -#line 357 "src/mesa/program/program_parse.y" - { - (yyval.inst) = (yyvsp[(1) - (1)].inst); - state->prog->NumTexInstructions++; - } - break; - - case 24: - -/* Line 1806 of yacc.c */ -#line 378 "src/mesa/program/program_parse.y" - { - (yyval.inst) = asm_instruction_ctor(OPCODE_ARL, & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); - } - break; - - case 25: - -/* Line 1806 of yacc.c */ -#line 384 "src/mesa/program/program_parse.y" - { - (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (4)].temp_inst), & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); - } - break; - - case 26: - -/* Line 1806 of yacc.c */ -#line 390 "src/mesa/program/program_parse.y" - { - (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (4)].temp_inst), & (yyvsp[(2) - (4)].dst_reg), & (yyvsp[(4) - (4)].src_reg), NULL, NULL); - } - break; - - case 27: - -/* Line 1806 of yacc.c */ -#line 396 "src/mesa/program/program_parse.y" - { - (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (6)].temp_inst), & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL); - } - break; - - case 28: - -/* Line 1806 of yacc.c */ -#line 403 "src/mesa/program/program_parse.y" - { - (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (6)].temp_inst), & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), & (yyvsp[(6) - (6)].src_reg), NULL); - } - break; - - case 29: - -/* Line 1806 of yacc.c */ -#line 410 "src/mesa/program/program_parse.y" - { - (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (8)].temp_inst), & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), & (yyvsp[(6) - (8)].src_reg), & (yyvsp[(8) - (8)].src_reg)); - } - break; - - case 30: - -/* Line 1806 of yacc.c */ -#line 416 "src/mesa/program/program_parse.y" - { - (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (8)].temp_inst), & (yyvsp[(2) - (8)].dst_reg), & (yyvsp[(4) - (8)].src_reg), NULL, NULL); - if ((yyval.inst) != NULL) { - const GLbitfield tex_mask = (1U << (yyvsp[(6) - (8)].integer)); - GLbitfield shadow_tex = 0; - GLbitfield target_mask = 0; - - - (yyval.inst)->Base.TexSrcUnit = (yyvsp[(6) - (8)].integer); - - if ((yyvsp[(8) - (8)].integer) < 0) { - shadow_tex = tex_mask; - - (yyval.inst)->Base.TexSrcTarget = -(yyvsp[(8) - (8)].integer); - (yyval.inst)->Base.TexShadow = 1; - } else { - (yyval.inst)->Base.TexSrcTarget = (yyvsp[(8) - (8)].integer); - } - - target_mask = (1U << (yyval.inst)->Base.TexSrcTarget); - - /* If this texture unit was previously accessed and that access - * had a different texture target, generate an error. - * - * If this texture unit was previously accessed and that access - * had a different shadow mode, generate an error. - */ - if ((state->prog->TexturesUsed[(yyvsp[(6) - (8)].integer)] != 0) - && ((state->prog->TexturesUsed[(yyvsp[(6) - (8)].integer)] != target_mask) - || ((state->prog->ShadowSamplers & tex_mask) - != shadow_tex))) { - yyerror(& (yylsp[(8) - (8)]), state, - "multiple targets used on one texture image unit"); - YYERROR; - } - - - state->prog->TexturesUsed[(yyvsp[(6) - (8)].integer)] |= target_mask; - state->prog->ShadowSamplers |= shadow_tex; - } - } - break; - - case 31: - -/* Line 1806 of yacc.c */ -#line 460 "src/mesa/program/program_parse.y" - { - (yyval.inst) = asm_instruction_ctor(OPCODE_KIL, NULL, & (yyvsp[(2) - (2)].src_reg), NULL, NULL); - state->fragment.UsesKill = 1; - } - break; - - case 32: - -/* Line 1806 of yacc.c */ -#line 465 "src/mesa/program/program_parse.y" - { - (yyval.inst) = asm_instruction_ctor(OPCODE_KIL_NV, NULL, NULL, NULL, NULL); - (yyval.inst)->Base.DstReg.CondMask = (yyvsp[(2) - (2)].dst_reg).CondMask; - (yyval.inst)->Base.DstReg.CondSwizzle = (yyvsp[(2) - (2)].dst_reg).CondSwizzle; - (yyval.inst)->Base.DstReg.CondSrc = (yyvsp[(2) - (2)].dst_reg).CondSrc; - state->fragment.UsesKill = 1; - } - break; - - case 33: - -/* Line 1806 of yacc.c */ -#line 475 "src/mesa/program/program_parse.y" - { - (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (12)].temp_inst), & (yyvsp[(2) - (12)].dst_reg), & (yyvsp[(4) - (12)].src_reg), & (yyvsp[(6) - (12)].src_reg), & (yyvsp[(8) - (12)].src_reg)); - if ((yyval.inst) != NULL) { - const GLbitfield tex_mask = (1U << (yyvsp[(10) - (12)].integer)); - GLbitfield shadow_tex = 0; - GLbitfield target_mask = 0; - - - (yyval.inst)->Base.TexSrcUnit = (yyvsp[(10) - (12)].integer); - - if ((yyvsp[(12) - (12)].integer) < 0) { - shadow_tex = tex_mask; - - (yyval.inst)->Base.TexSrcTarget = -(yyvsp[(12) - (12)].integer); - (yyval.inst)->Base.TexShadow = 1; - } else { - (yyval.inst)->Base.TexSrcTarget = (yyvsp[(12) - (12)].integer); - } - - target_mask = (1U << (yyval.inst)->Base.TexSrcTarget); - - /* If this texture unit was previously accessed and that access - * had a different texture target, generate an error. - * - * If this texture unit was previously accessed and that access - * had a different shadow mode, generate an error. - */ - if ((state->prog->TexturesUsed[(yyvsp[(10) - (12)].integer)] != 0) - && ((state->prog->TexturesUsed[(yyvsp[(10) - (12)].integer)] != target_mask) - || ((state->prog->ShadowSamplers & tex_mask) - != shadow_tex))) { - yyerror(& (yylsp[(12) - (12)]), state, - "multiple targets used on one texture image unit"); - YYERROR; - } - - - state->prog->TexturesUsed[(yyvsp[(10) - (12)].integer)] |= target_mask; - state->prog->ShadowSamplers |= shadow_tex; - } - } - break; - - case 34: - -/* Line 1806 of yacc.c */ -#line 519 "src/mesa/program/program_parse.y" - { - (yyval.integer) = (yyvsp[(2) - (2)].integer); - } - break; - - case 35: - -/* Line 1806 of yacc.c */ -#line 524 "src/mesa/program/program_parse.y" - { (yyval.integer) = TEXTURE_1D_INDEX; } - break; - - case 36: - -/* Line 1806 of yacc.c */ -#line 525 "src/mesa/program/program_parse.y" - { (yyval.integer) = TEXTURE_2D_INDEX; } - break; - - case 37: - -/* Line 1806 of yacc.c */ -#line 526 "src/mesa/program/program_parse.y" - { (yyval.integer) = TEXTURE_3D_INDEX; } - break; - - case 38: - -/* Line 1806 of yacc.c */ -#line 527 "src/mesa/program/program_parse.y" - { (yyval.integer) = TEXTURE_CUBE_INDEX; } - break; - - case 39: - -/* Line 1806 of yacc.c */ -#line 528 "src/mesa/program/program_parse.y" - { (yyval.integer) = TEXTURE_RECT_INDEX; } - break; - - case 40: - -/* Line 1806 of yacc.c */ -#line 529 "src/mesa/program/program_parse.y" - { (yyval.integer) = -TEXTURE_1D_INDEX; } - break; - - case 41: - -/* Line 1806 of yacc.c */ -#line 530 "src/mesa/program/program_parse.y" - { (yyval.integer) = -TEXTURE_2D_INDEX; } - break; - - case 42: - -/* Line 1806 of yacc.c */ -#line 531 "src/mesa/program/program_parse.y" - { (yyval.integer) = -TEXTURE_RECT_INDEX; } - break; - - case 43: - -/* Line 1806 of yacc.c */ -#line 532 "src/mesa/program/program_parse.y" - { (yyval.integer) = TEXTURE_1D_ARRAY_INDEX; } - break; - - case 44: - -/* Line 1806 of yacc.c */ -#line 533 "src/mesa/program/program_parse.y" - { (yyval.integer) = TEXTURE_2D_ARRAY_INDEX; } - break; - - case 45: - -/* Line 1806 of yacc.c */ -#line 534 "src/mesa/program/program_parse.y" - { (yyval.integer) = -TEXTURE_1D_ARRAY_INDEX; } - break; - - case 46: - -/* Line 1806 of yacc.c */ -#line 535 "src/mesa/program/program_parse.y" - { (yyval.integer) = -TEXTURE_2D_ARRAY_INDEX; } - break; - - case 47: - -/* Line 1806 of yacc.c */ -#line 539 "src/mesa/program/program_parse.y" - { - /* FIXME: Is this correct? Should the extenedSwizzle be applied - * FIXME: to the existing swizzle? - */ - (yyvsp[(4) - (6)].src_reg).Base.Swizzle = (yyvsp[(6) - (6)].swiz_mask).swizzle; - (yyvsp[(4) - (6)].src_reg).Base.Negate = (yyvsp[(6) - (6)].swiz_mask).mask; - - (yyval.inst) = asm_instruction_copy_ctor(& (yyvsp[(1) - (6)].temp_inst), & (yyvsp[(2) - (6)].dst_reg), & (yyvsp[(4) - (6)].src_reg), NULL, NULL); - } - break; - - case 48: - -/* Line 1806 of yacc.c */ -#line 551 "src/mesa/program/program_parse.y" - { - (yyval.src_reg) = (yyvsp[(2) - (2)].src_reg); - - if ((yyvsp[(1) - (2)].negate)) { - (yyval.src_reg).Base.Negate = ~(yyval.src_reg).Base.Negate; - } - } - break; - - case 49: - -/* Line 1806 of yacc.c */ -#line 559 "src/mesa/program/program_parse.y" - { - (yyval.src_reg) = (yyvsp[(3) - (4)].src_reg); - - if (!state->option.NV_fragment) { - yyerror(& (yylsp[(2) - (4)]), state, "unexpected character '|'"); - YYERROR; - } - - if ((yyvsp[(1) - (4)].negate)) { - (yyval.src_reg).Base.Negate = ~(yyval.src_reg).Base.Negate; - } - - (yyval.src_reg).Base.Abs = 1; - } - break; - - case 50: - -/* Line 1806 of yacc.c */ -#line 576 "src/mesa/program/program_parse.y" - { - (yyval.src_reg) = (yyvsp[(1) - (2)].src_reg); - - (yyval.src_reg).Base.Swizzle = _mesa_combine_swizzles((yyval.src_reg).Base.Swizzle, - (yyvsp[(2) - (2)].swiz_mask).swizzle); - } - break; - - case 51: - -/* Line 1806 of yacc.c */ -#line 583 "src/mesa/program/program_parse.y" - { - struct asm_symbol temp_sym; - - if (!state->option.NV_fragment) { - yyerror(& (yylsp[(1) - (1)]), state, "expected scalar suffix"); - YYERROR; - } - - memset(& temp_sym, 0, sizeof(temp_sym)); - temp_sym.param_binding_begin = ~0; - initialize_symbol_from_const(state->prog, & temp_sym, & (yyvsp[(1) - (1)].vector), GL_TRUE); - - set_src_reg_swz(& (yyval.src_reg), PROGRAM_CONSTANT, - temp_sym.param_binding_begin, - temp_sym.param_binding_swizzle); - } - break; - - case 52: - -/* Line 1806 of yacc.c */ -#line 602 "src/mesa/program/program_parse.y" - { - (yyval.src_reg) = (yyvsp[(2) - (3)].src_reg); - - if ((yyvsp[(1) - (3)].negate)) { - (yyval.src_reg).Base.Negate = ~(yyval.src_reg).Base.Negate; - } - - (yyval.src_reg).Base.Swizzle = _mesa_combine_swizzles((yyval.src_reg).Base.Swizzle, - (yyvsp[(3) - (3)].swiz_mask).swizzle); - } - break; - - case 53: - -/* Line 1806 of yacc.c */ -#line 613 "src/mesa/program/program_parse.y" - { - (yyval.src_reg) = (yyvsp[(3) - (5)].src_reg); - - if (!state->option.NV_fragment) { - yyerror(& (yylsp[(2) - (5)]), state, "unexpected character '|'"); - YYERROR; - } - - if ((yyvsp[(1) - (5)].negate)) { - (yyval.src_reg).Base.Negate = ~(yyval.src_reg).Base.Negate; - } - - (yyval.src_reg).Base.Abs = 1; - (yyval.src_reg).Base.Swizzle = _mesa_combine_swizzles((yyval.src_reg).Base.Swizzle, - (yyvsp[(4) - (5)].swiz_mask).swizzle); - } - break; - - case 54: - -/* Line 1806 of yacc.c */ -#line 633 "src/mesa/program/program_parse.y" - { - (yyval.dst_reg) = (yyvsp[(1) - (3)].dst_reg); - (yyval.dst_reg).WriteMask = (yyvsp[(2) - (3)].swiz_mask).mask; - (yyval.dst_reg).CondMask = (yyvsp[(3) - (3)].dst_reg).CondMask; - (yyval.dst_reg).CondSwizzle = (yyvsp[(3) - (3)].dst_reg).CondSwizzle; - (yyval.dst_reg).CondSrc = (yyvsp[(3) - (3)].dst_reg).CondSrc; - - if ((yyval.dst_reg).File == PROGRAM_OUTPUT) { - /* Technically speaking, this should check that it is in - * vertex program mode. However, PositionInvariant can never be - * set in fragment program mode, so it is somewhat irrelevant. - */ - if (state->option.PositionInvariant - && ((yyval.dst_reg).Index == VERT_RESULT_HPOS)) { - yyerror(& (yylsp[(1) - (3)]), state, "position-invariant programs cannot " - "write position"); - YYERROR; - } - - state->prog->OutputsWritten |= BITFIELD64_BIT((yyval.dst_reg).Index); - } - } - break; - - case 55: - -/* Line 1806 of yacc.c */ -#line 658 "src/mesa/program/program_parse.y" - { - set_dst_reg(& (yyval.dst_reg), PROGRAM_ADDRESS, 0); - (yyval.dst_reg).WriteMask = (yyvsp[(2) - (2)].swiz_mask).mask; - } - break; - - case 56: - -/* Line 1806 of yacc.c */ -#line 665 "src/mesa/program/program_parse.y" - { - const unsigned xyzw_valid = - ((yyvsp[(1) - (7)].ext_swizzle).xyzw_valid << 0) - | ((yyvsp[(3) - (7)].ext_swizzle).xyzw_valid << 1) - | ((yyvsp[(5) - (7)].ext_swizzle).xyzw_valid << 2) - | ((yyvsp[(7) - (7)].ext_swizzle).xyzw_valid << 3); - const unsigned rgba_valid = - ((yyvsp[(1) - (7)].ext_swizzle).rgba_valid << 0) - | ((yyvsp[(3) - (7)].ext_swizzle).rgba_valid << 1) - | ((yyvsp[(5) - (7)].ext_swizzle).rgba_valid << 2) - | ((yyvsp[(7) - (7)].ext_swizzle).rgba_valid << 3); - - /* All of the swizzle components have to be valid in either RGBA - * or XYZW. Note that 0 and 1 are valid in both, so both masks - * can have some bits set. - * - * We somewhat deviate from the spec here. It would be really hard - * to figure out which component is the error, and there probably - * isn't a lot of benefit. - */ - if ((rgba_valid != 0x0f) && (xyzw_valid != 0x0f)) { - yyerror(& (yylsp[(1) - (7)]), state, "cannot combine RGBA and XYZW swizzle " - "components"); - YYERROR; - } - - (yyval.swiz_mask).swizzle = MAKE_SWIZZLE4((yyvsp[(1) - (7)].ext_swizzle).swz, (yyvsp[(3) - (7)].ext_swizzle).swz, (yyvsp[(5) - (7)].ext_swizzle).swz, (yyvsp[(7) - (7)].ext_swizzle).swz); - (yyval.swiz_mask).mask = ((yyvsp[(1) - (7)].ext_swizzle).negate) | ((yyvsp[(3) - (7)].ext_swizzle).negate << 1) | ((yyvsp[(5) - (7)].ext_swizzle).negate << 2) - | ((yyvsp[(7) - (7)].ext_swizzle).negate << 3); - } - break; - - case 57: - -/* Line 1806 of yacc.c */ -#line 698 "src/mesa/program/program_parse.y" - { - (yyval.ext_swizzle) = (yyvsp[(2) - (2)].ext_swizzle); - (yyval.ext_swizzle).negate = ((yyvsp[(1) - (2)].negate)) ? 1 : 0; - } - break; - - case 58: - -/* Line 1806 of yacc.c */ -#line 705 "src/mesa/program/program_parse.y" - { - if (((yyvsp[(1) - (1)].integer) != 0) && ((yyvsp[(1) - (1)].integer) != 1)) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector"); - YYERROR; - } - - (yyval.ext_swizzle).swz = ((yyvsp[(1) - (1)].integer) == 0) ? SWIZZLE_ZERO : SWIZZLE_ONE; - - /* 0 and 1 are valid for both RGBA swizzle names and XYZW - * swizzle names. - */ - (yyval.ext_swizzle).xyzw_valid = 1; - (yyval.ext_swizzle).rgba_valid = 1; - } - break; - - case 59: - -/* Line 1806 of yacc.c */ -#line 720 "src/mesa/program/program_parse.y" - { - char s; - - if (strlen((yyvsp[(1) - (1)].string)) > 1) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector"); - YYERROR; - } - - s = (yyvsp[(1) - (1)].string)[0]; - free((yyvsp[(1) - (1)].string)); - - switch (s) { - case 'x': - (yyval.ext_swizzle).swz = SWIZZLE_X; - (yyval.ext_swizzle).xyzw_valid = 1; - break; - case 'y': - (yyval.ext_swizzle).swz = SWIZZLE_Y; - (yyval.ext_swizzle).xyzw_valid = 1; - break; - case 'z': - (yyval.ext_swizzle).swz = SWIZZLE_Z; - (yyval.ext_swizzle).xyzw_valid = 1; - break; - case 'w': - (yyval.ext_swizzle).swz = SWIZZLE_W; - (yyval.ext_swizzle).xyzw_valid = 1; - break; - - case 'r': - (yyval.ext_swizzle).swz = SWIZZLE_X; - (yyval.ext_swizzle).rgba_valid = 1; - break; - case 'g': - (yyval.ext_swizzle).swz = SWIZZLE_Y; - (yyval.ext_swizzle).rgba_valid = 1; - break; - case 'b': - (yyval.ext_swizzle).swz = SWIZZLE_Z; - (yyval.ext_swizzle).rgba_valid = 1; - break; - case 'a': - (yyval.ext_swizzle).swz = SWIZZLE_W; - (yyval.ext_swizzle).rgba_valid = 1; - break; - - default: - yyerror(& (yylsp[(1) - (1)]), state, "invalid extended swizzle selector"); - YYERROR; - break; - } - } - break; - - case 60: - -/* Line 1806 of yacc.c */ -#line 775 "src/mesa/program/program_parse.y" - { - struct asm_symbol *const s = (struct asm_symbol *) - _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); - - free((yyvsp[(1) - (1)].string)); - - if (s == NULL) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid operand variable"); - YYERROR; - } else if ((s->type != at_param) && (s->type != at_temp) - && (s->type != at_attrib)) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid operand variable"); - YYERROR; - } else if ((s->type == at_param) && s->param_is_array) { - yyerror(& (yylsp[(1) - (1)]), state, "non-array access to array PARAM"); - YYERROR; - } - - init_src_reg(& (yyval.src_reg)); - switch (s->type) { - case at_temp: - set_src_reg(& (yyval.src_reg), PROGRAM_TEMPORARY, s->temp_binding); - break; - case at_param: - set_src_reg_swz(& (yyval.src_reg), s->param_binding_type, - s->param_binding_begin, - s->param_binding_swizzle); - break; - case at_attrib: - set_src_reg(& (yyval.src_reg), PROGRAM_INPUT, s->attrib_binding); - state->prog->InputsRead |= BITFIELD64_BIT((yyval.src_reg).Base.Index); - - if (!validate_inputs(& (yylsp[(1) - (1)]), state)) { - YYERROR; - } - break; - - default: - YYERROR; - break; - } - } - break; - - case 61: - -/* Line 1806 of yacc.c */ -#line 818 "src/mesa/program/program_parse.y" - { - set_src_reg(& (yyval.src_reg), PROGRAM_INPUT, (yyvsp[(1) - (1)].attrib)); - state->prog->InputsRead |= BITFIELD64_BIT((yyval.src_reg).Base.Index); - - if (!validate_inputs(& (yylsp[(1) - (1)]), state)) { - YYERROR; - } - } - break; - - case 62: - -/* Line 1806 of yacc.c */ -#line 827 "src/mesa/program/program_parse.y" - { - if (! (yyvsp[(3) - (4)].src_reg).Base.RelAddr - && ((unsigned) (yyvsp[(3) - (4)].src_reg).Base.Index >= (yyvsp[(1) - (4)].sym)->param_binding_length)) { - yyerror(& (yylsp[(3) - (4)]), state, "out of bounds array access"); - YYERROR; - } - - init_src_reg(& (yyval.src_reg)); - (yyval.src_reg).Base.File = (yyvsp[(1) - (4)].sym)->param_binding_type; - - if ((yyvsp[(3) - (4)].src_reg).Base.RelAddr) { - state->prog->IndirectRegisterFiles |= (1 << (yyval.src_reg).Base.File); - (yyvsp[(1) - (4)].sym)->param_accessed_indirectly = 1; - - (yyval.src_reg).Base.RelAddr = 1; - (yyval.src_reg).Base.Index = (yyvsp[(3) - (4)].src_reg).Base.Index; - (yyval.src_reg).Symbol = (yyvsp[(1) - (4)].sym); - } else { - (yyval.src_reg).Base.Index = (yyvsp[(1) - (4)].sym)->param_binding_begin + (yyvsp[(3) - (4)].src_reg).Base.Index; - } - } - break; - - case 63: - -/* Line 1806 of yacc.c */ -#line 849 "src/mesa/program/program_parse.y" - { - gl_register_file file = ((yyvsp[(1) - (1)].temp_sym).name != NULL) - ? (yyvsp[(1) - (1)].temp_sym).param_binding_type - : PROGRAM_CONSTANT; - set_src_reg_swz(& (yyval.src_reg), file, (yyvsp[(1) - (1)].temp_sym).param_binding_begin, - (yyvsp[(1) - (1)].temp_sym).param_binding_swizzle); - } - break; - - case 64: - -/* Line 1806 of yacc.c */ -#line 859 "src/mesa/program/program_parse.y" - { - set_dst_reg(& (yyval.dst_reg), PROGRAM_OUTPUT, (yyvsp[(1) - (1)].result)); - } - break; - - case 65: - -/* Line 1806 of yacc.c */ -#line 863 "src/mesa/program/program_parse.y" - { - struct asm_symbol *const s = (struct asm_symbol *) - _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); - - free((yyvsp[(1) - (1)].string)); - - if (s == NULL) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid operand variable"); - YYERROR; - } else if ((s->type != at_output) && (s->type != at_temp)) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid operand variable"); - YYERROR; - } - - switch (s->type) { - case at_temp: - set_dst_reg(& (yyval.dst_reg), PROGRAM_TEMPORARY, s->temp_binding); - break; - case at_output: - set_dst_reg(& (yyval.dst_reg), PROGRAM_OUTPUT, s->output_binding); - break; - default: - set_dst_reg(& (yyval.dst_reg), s->param_binding_type, s->param_binding_begin); - break; - } - } - break; - - case 66: - -/* Line 1806 of yacc.c */ -#line 892 "src/mesa/program/program_parse.y" - { - struct asm_symbol *const s = (struct asm_symbol *) - _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); - - free((yyvsp[(1) - (1)].string)); - - if (s == NULL) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid operand variable"); - YYERROR; - } else if ((s->type != at_param) || !s->param_is_array) { - yyerror(& (yylsp[(1) - (1)]), state, "array access to non-PARAM variable"); - YYERROR; - } else { - (yyval.sym) = s; - } - } - break; - - case 69: - -/* Line 1806 of yacc.c */ -#line 913 "src/mesa/program/program_parse.y" - { - init_src_reg(& (yyval.src_reg)); - (yyval.src_reg).Base.Index = (yyvsp[(1) - (1)].integer); - } - break; - - case 70: - -/* Line 1806 of yacc.c */ -#line 920 "src/mesa/program/program_parse.y" - { - /* FINISHME: Add support for multiple address registers. - */ - /* FINISHME: Add support for 4-component address registers. - */ - init_src_reg(& (yyval.src_reg)); - (yyval.src_reg).Base.RelAddr = 1; - (yyval.src_reg).Base.Index = (yyvsp[(3) - (3)].integer); - } - break; - - case 71: - -/* Line 1806 of yacc.c */ -#line 931 "src/mesa/program/program_parse.y" - { (yyval.integer) = 0; } - break; - - case 72: - -/* Line 1806 of yacc.c */ -#line 932 "src/mesa/program/program_parse.y" - { (yyval.integer) = (yyvsp[(2) - (2)].integer); } - break; - - case 73: - -/* Line 1806 of yacc.c */ -#line 933 "src/mesa/program/program_parse.y" - { (yyval.integer) = -(yyvsp[(2) - (2)].integer); } - break; - - case 74: - -/* Line 1806 of yacc.c */ -#line 937 "src/mesa/program/program_parse.y" - { - if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > (state->limits->MaxAddressOffset - 1))) { - char s[100]; - _mesa_snprintf(s, sizeof(s), - "relative address offset too large (%d)", (yyvsp[(1) - (1)].integer)); - yyerror(& (yylsp[(1) - (1)]), state, s); - YYERROR; - } else { - (yyval.integer) = (yyvsp[(1) - (1)].integer); - } - } - break; - - case 75: - -/* Line 1806 of yacc.c */ -#line 951 "src/mesa/program/program_parse.y" - { - if (((yyvsp[(1) - (1)].integer) < 0) || ((yyvsp[(1) - (1)].integer) > state->limits->MaxAddressOffset)) { - char s[100]; - _mesa_snprintf(s, sizeof(s), - "relative address offset too large (%d)", (yyvsp[(1) - (1)].integer)); - yyerror(& (yylsp[(1) - (1)]), state, s); - YYERROR; - } else { - (yyval.integer) = (yyvsp[(1) - (1)].integer); - } - } - break; - - case 76: - -/* Line 1806 of yacc.c */ -#line 965 "src/mesa/program/program_parse.y" - { - struct asm_symbol *const s = (struct asm_symbol *) - _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(1) - (1)].string)); - - free((yyvsp[(1) - (1)].string)); - - if (s == NULL) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid array member"); - YYERROR; - } else if (s->type != at_address) { - yyerror(& (yylsp[(1) - (1)]), state, - "invalid variable for indexed array access"); - YYERROR; - } else { - (yyval.sym) = s; - } - } - break; - - case 77: - -/* Line 1806 of yacc.c */ -#line 985 "src/mesa/program/program_parse.y" - { - if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid address component selector"); - YYERROR; - } else { - (yyval.swiz_mask) = (yyvsp[(1) - (1)].swiz_mask); - } - } - break; - - case 78: - -/* Line 1806 of yacc.c */ -#line 996 "src/mesa/program/program_parse.y" - { - if ((yyvsp[(1) - (1)].swiz_mask).mask != WRITEMASK_X) { - yyerror(& (yylsp[(1) - (1)]), state, - "address register write mask must be \".x\""); - YYERROR; - } else { - (yyval.swiz_mask) = (yyvsp[(1) - (1)].swiz_mask); - } - } - break; - - case 83: - -/* Line 1806 of yacc.c */ -#line 1012 "src/mesa/program/program_parse.y" - { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; } - break; - - case 88: - -/* Line 1806 of yacc.c */ -#line 1016 "src/mesa/program/program_parse.y" - { (yyval.swiz_mask).swizzle = SWIZZLE_NOOP; (yyval.swiz_mask).mask = WRITEMASK_XYZW; } - break; - - case 89: - -/* Line 1806 of yacc.c */ -#line 1020 "src/mesa/program/program_parse.y" - { - (yyval.dst_reg) = (yyvsp[(2) - (3)].dst_reg); - } - break; - - case 90: - -/* Line 1806 of yacc.c */ -#line 1024 "src/mesa/program/program_parse.y" - { - (yyval.dst_reg) = (yyvsp[(2) - (3)].dst_reg); - } - break; - - case 91: - -/* Line 1806 of yacc.c */ -#line 1028 "src/mesa/program/program_parse.y" - { - (yyval.dst_reg).CondMask = COND_TR; - (yyval.dst_reg).CondSwizzle = SWIZZLE_NOOP; - (yyval.dst_reg).CondSrc = 0; - } - break; - - case 92: - -/* Line 1806 of yacc.c */ -#line 1036 "src/mesa/program/program_parse.y" - { - (yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg); - (yyval.dst_reg).CondSwizzle = (yyvsp[(2) - (2)].swiz_mask).swizzle; - } - break; - - case 93: - -/* Line 1806 of yacc.c */ -#line 1043 "src/mesa/program/program_parse.y" - { - (yyval.dst_reg) = (yyvsp[(1) - (2)].dst_reg); - (yyval.dst_reg).CondSwizzle = (yyvsp[(2) - (2)].swiz_mask).swizzle; - } - break; - - case 94: - -/* Line 1806 of yacc.c */ -#line 1050 "src/mesa/program/program_parse.y" - { - const int cond = _mesa_parse_cc((yyvsp[(1) - (1)].string)); - if ((cond == 0) || ((yyvsp[(1) - (1)].string)[2] != '\0')) { - char *const err_str = - make_error_string("invalid condition code \"%s\"", (yyvsp[(1) - (1)].string)); - - yyerror(& (yylsp[(1) - (1)]), state, (err_str != NULL) - ? err_str : "invalid condition code"); - - if (err_str != NULL) { - free(err_str); - } - - YYERROR; - } - - (yyval.dst_reg).CondMask = cond; - (yyval.dst_reg).CondSwizzle = SWIZZLE_NOOP; - (yyval.dst_reg).CondSrc = 0; - } - break; - - case 95: - -/* Line 1806 of yacc.c */ -#line 1073 "src/mesa/program/program_parse.y" - { - const int cond = _mesa_parse_cc((yyvsp[(1) - (1)].string)); - if ((cond == 0) || ((yyvsp[(1) - (1)].string)[2] != '\0')) { - char *const err_str = - make_error_string("invalid condition code \"%s\"", (yyvsp[(1) - (1)].string)); - - yyerror(& (yylsp[(1) - (1)]), state, (err_str != NULL) - ? err_str : "invalid condition code"); - - if (err_str != NULL) { - free(err_str); - } - - YYERROR; - } - - (yyval.dst_reg).CondMask = cond; - (yyval.dst_reg).CondSwizzle = SWIZZLE_NOOP; - (yyval.dst_reg).CondSrc = 0; - } - break; - - case 102: - -/* Line 1806 of yacc.c */ -#line 1104 "src/mesa/program/program_parse.y" - { - struct asm_symbol *const s = - declare_variable(state, (yyvsp[(2) - (4)].string), at_attrib, & (yylsp[(2) - (4)])); - - if (s == NULL) { - free((yyvsp[(2) - (4)].string)); - YYERROR; - } else { - s->attrib_binding = (yyvsp[(4) - (4)].attrib); - state->InputsBound |= BITFIELD64_BIT(s->attrib_binding); - - if (!validate_inputs(& (yylsp[(4) - (4)]), state)) { - YYERROR; - } - } - } - break; - - case 103: - -/* Line 1806 of yacc.c */ -#line 1123 "src/mesa/program/program_parse.y" - { - (yyval.attrib) = (yyvsp[(2) - (2)].attrib); - } - break; - - case 104: - -/* Line 1806 of yacc.c */ -#line 1127 "src/mesa/program/program_parse.y" - { - (yyval.attrib) = (yyvsp[(2) - (2)].attrib); - } - break; - - case 105: - -/* Line 1806 of yacc.c */ -#line 1133 "src/mesa/program/program_parse.y" - { - (yyval.attrib) = VERT_ATTRIB_POS; - } - break; - - case 106: - -/* Line 1806 of yacc.c */ -#line 1137 "src/mesa/program/program_parse.y" - { - (yyval.attrib) = VERT_ATTRIB_WEIGHT; - } - break; - - case 107: - -/* Line 1806 of yacc.c */ -#line 1141 "src/mesa/program/program_parse.y" - { - (yyval.attrib) = VERT_ATTRIB_NORMAL; - } - break; - - case 108: - -/* Line 1806 of yacc.c */ -#line 1145 "src/mesa/program/program_parse.y" - { - if (!state->ctx->Extensions.EXT_secondary_color) { - yyerror(& (yylsp[(2) - (2)]), state, "GL_EXT_secondary_color not supported"); - YYERROR; - } - - (yyval.attrib) = VERT_ATTRIB_COLOR0 + (yyvsp[(2) - (2)].integer); - } - break; - - case 109: - -/* Line 1806 of yacc.c */ -#line 1154 "src/mesa/program/program_parse.y" - { - if (!state->ctx->Extensions.EXT_fog_coord) { - yyerror(& (yylsp[(1) - (1)]), state, "GL_EXT_fog_coord not supported"); - YYERROR; - } - - (yyval.attrib) = VERT_ATTRIB_FOG; - } - break; - - case 110: - -/* Line 1806 of yacc.c */ -#line 1163 "src/mesa/program/program_parse.y" - { - (yyval.attrib) = VERT_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer); - } - break; - - case 111: - -/* Line 1806 of yacc.c */ -#line 1167 "src/mesa/program/program_parse.y" - { - yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported"); - YYERROR; - } - break; - - case 112: - -/* Line 1806 of yacc.c */ -#line 1172 "src/mesa/program/program_parse.y" - { - (yyval.attrib) = VERT_ATTRIB_GENERIC0 + (yyvsp[(3) - (4)].integer); - } - break; - - case 113: - -/* Line 1806 of yacc.c */ -#line 1178 "src/mesa/program/program_parse.y" - { - if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxAttribs) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid vertex attribute reference"); - YYERROR; - } - - (yyval.integer) = (yyvsp[(1) - (1)].integer); - } - break; - - case 117: - -/* Line 1806 of yacc.c */ -#line 1192 "src/mesa/program/program_parse.y" - { - (yyval.attrib) = FRAG_ATTRIB_WPOS; - } - break; - - case 118: - -/* Line 1806 of yacc.c */ -#line 1196 "src/mesa/program/program_parse.y" - { - (yyval.attrib) = FRAG_ATTRIB_COL0 + (yyvsp[(2) - (2)].integer); - } - break; - - case 119: - -/* Line 1806 of yacc.c */ -#line 1200 "src/mesa/program/program_parse.y" - { - (yyval.attrib) = FRAG_ATTRIB_FOGC; - } - break; - - case 120: - -/* Line 1806 of yacc.c */ -#line 1204 "src/mesa/program/program_parse.y" - { - (yyval.attrib) = FRAG_ATTRIB_TEX0 + (yyvsp[(2) - (2)].integer); - } - break; - - case 123: - -/* Line 1806 of yacc.c */ -#line 1212 "src/mesa/program/program_parse.y" - { - struct asm_symbol *const s = - declare_variable(state, (yyvsp[(2) - (3)].string), at_param, & (yylsp[(2) - (3)])); - - if (s == NULL) { - free((yyvsp[(2) - (3)].string)); - YYERROR; - } else { - s->param_binding_type = (yyvsp[(3) - (3)].temp_sym).param_binding_type; - s->param_binding_begin = (yyvsp[(3) - (3)].temp_sym).param_binding_begin; - s->param_binding_length = (yyvsp[(3) - (3)].temp_sym).param_binding_length; - s->param_binding_swizzle = (yyvsp[(3) - (3)].temp_sym).param_binding_swizzle; - s->param_is_array = 0; - } - } - break; - - case 124: - -/* Line 1806 of yacc.c */ -#line 1230 "src/mesa/program/program_parse.y" - { - if (((yyvsp[(4) - (6)].integer) != 0) && ((unsigned) (yyvsp[(4) - (6)].integer) != (yyvsp[(6) - (6)].temp_sym).param_binding_length)) { - free((yyvsp[(2) - (6)].string)); - yyerror(& (yylsp[(4) - (6)]), state, - "parameter array size and number of bindings must match"); - YYERROR; - } else { - struct asm_symbol *const s = - declare_variable(state, (yyvsp[(2) - (6)].string), (yyvsp[(6) - (6)].temp_sym).type, & (yylsp[(2) - (6)])); - - if (s == NULL) { - free((yyvsp[(2) - (6)].string)); - YYERROR; - } else { - s->param_binding_type = (yyvsp[(6) - (6)].temp_sym).param_binding_type; - s->param_binding_begin = (yyvsp[(6) - (6)].temp_sym).param_binding_begin; - s->param_binding_length = (yyvsp[(6) - (6)].temp_sym).param_binding_length; - s->param_binding_swizzle = SWIZZLE_XYZW; - s->param_is_array = 1; - } - } - } - break; - - case 125: - -/* Line 1806 of yacc.c */ -#line 1255 "src/mesa/program/program_parse.y" - { - (yyval.integer) = 0; - } - break; - - case 126: - -/* Line 1806 of yacc.c */ -#line 1259 "src/mesa/program/program_parse.y" - { - if (((yyvsp[(1) - (1)].integer) < 1) || ((unsigned) (yyvsp[(1) - (1)].integer) > state->limits->MaxParameters)) { - char msg[100]; - _mesa_snprintf(msg, sizeof(msg), - "invalid parameter array size (size=%d max=%u)", - (yyvsp[(1) - (1)].integer), state->limits->MaxParameters); - yyerror(& (yylsp[(1) - (1)]), state, msg); - YYERROR; - } else { - (yyval.integer) = (yyvsp[(1) - (1)].integer); - } - } - break; - - case 127: - -/* Line 1806 of yacc.c */ -#line 1274 "src/mesa/program/program_parse.y" - { - (yyval.temp_sym) = (yyvsp[(2) - (2)].temp_sym); - } - break; - - case 128: - -/* Line 1806 of yacc.c */ -#line 1280 "src/mesa/program/program_parse.y" - { - (yyval.temp_sym) = (yyvsp[(3) - (4)].temp_sym); - } - break; - - case 130: - -/* Line 1806 of yacc.c */ -#line 1287 "src/mesa/program/program_parse.y" - { - (yyvsp[(1) - (3)].temp_sym).param_binding_length += (yyvsp[(3) - (3)].temp_sym).param_binding_length; - (yyval.temp_sym) = (yyvsp[(1) - (3)].temp_sym); - } - break; - - case 131: - -/* Line 1806 of yacc.c */ -#line 1294 "src/mesa/program/program_parse.y" - { - memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); - (yyval.temp_sym).param_binding_begin = ~0; - initialize_symbol_from_state(state->prog, & (yyval.temp_sym), (yyvsp[(1) - (1)].state)); - } - break; - - case 132: - -/* Line 1806 of yacc.c */ -#line 1300 "src/mesa/program/program_parse.y" - { - memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); - (yyval.temp_sym).param_binding_begin = ~0; - initialize_symbol_from_param(state->prog, & (yyval.temp_sym), (yyvsp[(1) - (1)].state)); - } - break; - - case 133: - -/* Line 1806 of yacc.c */ -#line 1306 "src/mesa/program/program_parse.y" - { - memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); - (yyval.temp_sym).param_binding_begin = ~0; - initialize_symbol_from_const(state->prog, & (yyval.temp_sym), & (yyvsp[(1) - (1)].vector), GL_TRUE); - } - break; - - case 134: - -/* Line 1806 of yacc.c */ -#line 1314 "src/mesa/program/program_parse.y" - { - memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); - (yyval.temp_sym).param_binding_begin = ~0; - initialize_symbol_from_state(state->prog, & (yyval.temp_sym), (yyvsp[(1) - (1)].state)); - } - break; - - case 135: - -/* Line 1806 of yacc.c */ -#line 1320 "src/mesa/program/program_parse.y" - { - memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); - (yyval.temp_sym).param_binding_begin = ~0; - initialize_symbol_from_param(state->prog, & (yyval.temp_sym), (yyvsp[(1) - (1)].state)); - } - break; - - case 136: - -/* Line 1806 of yacc.c */ -#line 1326 "src/mesa/program/program_parse.y" - { - memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); - (yyval.temp_sym).param_binding_begin = ~0; - initialize_symbol_from_const(state->prog, & (yyval.temp_sym), & (yyvsp[(1) - (1)].vector), GL_TRUE); - } - break; - - case 137: - -/* Line 1806 of yacc.c */ -#line 1334 "src/mesa/program/program_parse.y" - { - memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); - (yyval.temp_sym).param_binding_begin = ~0; - initialize_symbol_from_state(state->prog, & (yyval.temp_sym), (yyvsp[(1) - (1)].state)); - } - break; - - case 138: - -/* Line 1806 of yacc.c */ -#line 1340 "src/mesa/program/program_parse.y" - { - memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); - (yyval.temp_sym).param_binding_begin = ~0; - initialize_symbol_from_param(state->prog, & (yyval.temp_sym), (yyvsp[(1) - (1)].state)); - } - break; - - case 139: - -/* Line 1806 of yacc.c */ -#line 1346 "src/mesa/program/program_parse.y" - { - memset(& (yyval.temp_sym), 0, sizeof((yyval.temp_sym))); - (yyval.temp_sym).param_binding_begin = ~0; - initialize_symbol_from_const(state->prog, & (yyval.temp_sym), & (yyvsp[(1) - (1)].vector), GL_FALSE); - } - break; - - case 140: - -/* Line 1806 of yacc.c */ -#line 1353 "src/mesa/program/program_parse.y" - { memcpy((yyval.state), (yyvsp[(1) - (1)].state), sizeof((yyval.state))); } - break; - - case 141: - -/* Line 1806 of yacc.c */ -#line 1354 "src/mesa/program/program_parse.y" - { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); } - break; - - case 142: - -/* Line 1806 of yacc.c */ -#line 1357 "src/mesa/program/program_parse.y" - { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); } - break; - - case 143: - -/* Line 1806 of yacc.c */ -#line 1358 "src/mesa/program/program_parse.y" - { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); } - break; - - case 144: - -/* Line 1806 of yacc.c */ -#line 1359 "src/mesa/program/program_parse.y" - { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); } - break; - - case 145: - -/* Line 1806 of yacc.c */ -#line 1360 "src/mesa/program/program_parse.y" - { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); } - break; - - case 146: - -/* Line 1806 of yacc.c */ -#line 1361 "src/mesa/program/program_parse.y" - { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); } - break; - - case 147: - -/* Line 1806 of yacc.c */ -#line 1362 "src/mesa/program/program_parse.y" - { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); } - break; - - case 148: - -/* Line 1806 of yacc.c */ -#line 1363 "src/mesa/program/program_parse.y" - { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); } - break; - - case 149: - -/* Line 1806 of yacc.c */ -#line 1364 "src/mesa/program/program_parse.y" - { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); } - break; - - case 150: - -/* Line 1806 of yacc.c */ -#line 1365 "src/mesa/program/program_parse.y" - { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); } - break; - - case 151: - -/* Line 1806 of yacc.c */ -#line 1366 "src/mesa/program/program_parse.y" - { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); } - break; - - case 152: - -/* Line 1806 of yacc.c */ -#line 1367 "src/mesa/program/program_parse.y" - { memcpy((yyval.state), (yyvsp[(2) - (2)].state), sizeof((yyval.state))); } - break; - - case 153: - -/* Line 1806 of yacc.c */ -#line 1371 "src/mesa/program/program_parse.y" - { - memset((yyval.state), 0, sizeof((yyval.state))); - (yyval.state)[0] = STATE_MATERIAL; - (yyval.state)[1] = (yyvsp[(2) - (3)].integer); - (yyval.state)[2] = (yyvsp[(3) - (3)].integer); - } - break; - - case 154: - -/* Line 1806 of yacc.c */ -#line 1380 "src/mesa/program/program_parse.y" - { - (yyval.integer) = (yyvsp[(1) - (1)].integer); - } - break; - - case 155: - -/* Line 1806 of yacc.c */ -#line 1384 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_EMISSION; - } - break; - - case 156: - -/* Line 1806 of yacc.c */ -#line 1388 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_SHININESS; - } - break; - - case 157: - -/* Line 1806 of yacc.c */ -#line 1394 "src/mesa/program/program_parse.y" - { - memset((yyval.state), 0, sizeof((yyval.state))); - (yyval.state)[0] = STATE_LIGHT; - (yyval.state)[1] = (yyvsp[(3) - (5)].integer); - (yyval.state)[2] = (yyvsp[(5) - (5)].integer); - } - break; - - case 158: - -/* Line 1806 of yacc.c */ -#line 1403 "src/mesa/program/program_parse.y" - { - (yyval.integer) = (yyvsp[(1) - (1)].integer); - } - break; - - case 159: - -/* Line 1806 of yacc.c */ -#line 1407 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_POSITION; - } - break; - - case 160: - -/* Line 1806 of yacc.c */ -#line 1411 "src/mesa/program/program_parse.y" - { - if (!state->ctx->Extensions.EXT_point_parameters) { - yyerror(& (yylsp[(1) - (1)]), state, "GL_ARB_point_parameters not supported"); - YYERROR; - } - - (yyval.integer) = STATE_ATTENUATION; - } - break; - - case 161: - -/* Line 1806 of yacc.c */ -#line 1420 "src/mesa/program/program_parse.y" - { - (yyval.integer) = (yyvsp[(2) - (2)].integer); - } - break; - - case 162: - -/* Line 1806 of yacc.c */ -#line 1424 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_HALF_VECTOR; - } - break; - - case 163: - -/* Line 1806 of yacc.c */ -#line 1430 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_SPOT_DIRECTION; - } - break; - - case 164: - -/* Line 1806 of yacc.c */ -#line 1436 "src/mesa/program/program_parse.y" - { - (yyval.state)[0] = (yyvsp[(2) - (2)].state)[0]; - (yyval.state)[1] = (yyvsp[(2) - (2)].state)[1]; - } - break; - - case 165: - -/* Line 1806 of yacc.c */ -#line 1443 "src/mesa/program/program_parse.y" - { - memset((yyval.state), 0, sizeof((yyval.state))); - (yyval.state)[0] = STATE_LIGHTMODEL_AMBIENT; - } - break; - - case 166: - -/* Line 1806 of yacc.c */ -#line 1448 "src/mesa/program/program_parse.y" - { - memset((yyval.state), 0, sizeof((yyval.state))); - (yyval.state)[0] = STATE_LIGHTMODEL_SCENECOLOR; - (yyval.state)[1] = (yyvsp[(1) - (2)].integer); - } - break; - - case 167: - -/* Line 1806 of yacc.c */ -#line 1456 "src/mesa/program/program_parse.y" - { - memset((yyval.state), 0, sizeof((yyval.state))); - (yyval.state)[0] = STATE_LIGHTPROD; - (yyval.state)[1] = (yyvsp[(3) - (6)].integer); - (yyval.state)[2] = (yyvsp[(5) - (6)].integer); - (yyval.state)[3] = (yyvsp[(6) - (6)].integer); - } - break; - - case 169: - -/* Line 1806 of yacc.c */ -#line 1468 "src/mesa/program/program_parse.y" - { - memset((yyval.state), 0, sizeof((yyval.state))); - (yyval.state)[0] = (yyvsp[(3) - (3)].integer); - (yyval.state)[1] = (yyvsp[(2) - (3)].integer); - } - break; - - case 170: - -/* Line 1806 of yacc.c */ -#line 1476 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_TEXENV_COLOR; - } - break; - - case 171: - -/* Line 1806 of yacc.c */ -#line 1482 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_AMBIENT; - } - break; - - case 172: - -/* Line 1806 of yacc.c */ -#line 1486 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_DIFFUSE; - } - break; - - case 173: - -/* Line 1806 of yacc.c */ -#line 1490 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_SPECULAR; - } - break; - - case 174: - -/* Line 1806 of yacc.c */ -#line 1496 "src/mesa/program/program_parse.y" - { - if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxLights) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid light selector"); - YYERROR; - } - - (yyval.integer) = (yyvsp[(1) - (1)].integer); - } - break; - - case 175: - -/* Line 1806 of yacc.c */ -#line 1507 "src/mesa/program/program_parse.y" - { - memset((yyval.state), 0, sizeof((yyval.state))); - (yyval.state)[0] = STATE_TEXGEN; - (yyval.state)[1] = (yyvsp[(2) - (4)].integer); - (yyval.state)[2] = (yyvsp[(3) - (4)].integer) + (yyvsp[(4) - (4)].integer); - } - break; - - case 176: - -/* Line 1806 of yacc.c */ -#line 1516 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_TEXGEN_EYE_S; - } - break; - - case 177: - -/* Line 1806 of yacc.c */ -#line 1520 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_TEXGEN_OBJECT_S; - } - break; - - case 178: - -/* Line 1806 of yacc.c */ -#line 1525 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_TEXGEN_EYE_S - STATE_TEXGEN_EYE_S; - } - break; - - case 179: - -/* Line 1806 of yacc.c */ -#line 1529 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_TEXGEN_EYE_T - STATE_TEXGEN_EYE_S; - } - break; - - case 180: - -/* Line 1806 of yacc.c */ -#line 1533 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_TEXGEN_EYE_R - STATE_TEXGEN_EYE_S; - } - break; - - case 181: - -/* Line 1806 of yacc.c */ -#line 1537 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_TEXGEN_EYE_Q - STATE_TEXGEN_EYE_S; - } - break; - - case 182: - -/* Line 1806 of yacc.c */ -#line 1543 "src/mesa/program/program_parse.y" - { - memset((yyval.state), 0, sizeof((yyval.state))); - (yyval.state)[0] = (yyvsp[(2) - (2)].integer); - } - break; - - case 183: - -/* Line 1806 of yacc.c */ -#line 1550 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_FOG_COLOR; - } - break; - - case 184: - -/* Line 1806 of yacc.c */ -#line 1554 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_FOG_PARAMS; - } - break; - - case 185: - -/* Line 1806 of yacc.c */ -#line 1560 "src/mesa/program/program_parse.y" - { - memset((yyval.state), 0, sizeof((yyval.state))); - (yyval.state)[0] = STATE_CLIPPLANE; - (yyval.state)[1] = (yyvsp[(3) - (5)].integer); - } - break; - - case 186: - -/* Line 1806 of yacc.c */ -#line 1568 "src/mesa/program/program_parse.y" - { - if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxClipPlanes) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid clip plane selector"); - YYERROR; - } - - (yyval.integer) = (yyvsp[(1) - (1)].integer); - } - break; - - case 187: - -/* Line 1806 of yacc.c */ -#line 1579 "src/mesa/program/program_parse.y" - { - memset((yyval.state), 0, sizeof((yyval.state))); - (yyval.state)[0] = (yyvsp[(2) - (2)].integer); - } - break; - - case 188: - -/* Line 1806 of yacc.c */ -#line 1586 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_POINT_SIZE; - } - break; - - case 189: - -/* Line 1806 of yacc.c */ -#line 1590 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_POINT_ATTENUATION; - } - break; - - case 190: - -/* Line 1806 of yacc.c */ -#line 1596 "src/mesa/program/program_parse.y" - { - (yyval.state)[0] = (yyvsp[(1) - (5)].state)[0]; - (yyval.state)[1] = (yyvsp[(1) - (5)].state)[1]; - (yyval.state)[2] = (yyvsp[(4) - (5)].integer); - (yyval.state)[3] = (yyvsp[(4) - (5)].integer); - (yyval.state)[4] = (yyvsp[(1) - (5)].state)[2]; - } - break; - - case 191: - -/* Line 1806 of yacc.c */ -#line 1606 "src/mesa/program/program_parse.y" - { - (yyval.state)[0] = (yyvsp[(1) - (2)].state)[0]; - (yyval.state)[1] = (yyvsp[(1) - (2)].state)[1]; - (yyval.state)[2] = (yyvsp[(2) - (2)].state)[2]; - (yyval.state)[3] = (yyvsp[(2) - (2)].state)[3]; - (yyval.state)[4] = (yyvsp[(1) - (2)].state)[2]; - } - break; - - case 192: - -/* Line 1806 of yacc.c */ -#line 1616 "src/mesa/program/program_parse.y" - { - (yyval.state)[2] = 0; - (yyval.state)[3] = 3; - } - break; - - case 193: - -/* Line 1806 of yacc.c */ -#line 1621 "src/mesa/program/program_parse.y" - { - /* It seems logical that the matrix row range specifier would have - * to specify a range or more than one row (i.e., $5 > $3). - * However, the ARB_vertex_program spec says "a program will fail - * to load if is greater than ." This means that $3 == $5 - * is valid. - */ - if ((yyvsp[(3) - (6)].integer) > (yyvsp[(5) - (6)].integer)) { - yyerror(& (yylsp[(3) - (6)]), state, "invalid matrix row range"); - YYERROR; - } - - (yyval.state)[2] = (yyvsp[(3) - (6)].integer); - (yyval.state)[3] = (yyvsp[(5) - (6)].integer); - } - break; - - case 194: - -/* Line 1806 of yacc.c */ -#line 1639 "src/mesa/program/program_parse.y" - { - (yyval.state)[0] = (yyvsp[(2) - (3)].state)[0]; - (yyval.state)[1] = (yyvsp[(2) - (3)].state)[1]; - (yyval.state)[2] = (yyvsp[(3) - (3)].integer); - } - break; - - case 195: - -/* Line 1806 of yacc.c */ -#line 1647 "src/mesa/program/program_parse.y" - { - (yyval.integer) = 0; - } - break; - - case 196: - -/* Line 1806 of yacc.c */ -#line 1651 "src/mesa/program/program_parse.y" - { - (yyval.integer) = (yyvsp[(1) - (1)].integer); - } - break; - - case 197: - -/* Line 1806 of yacc.c */ -#line 1657 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_MATRIX_INVERSE; - } - break; - - case 198: - -/* Line 1806 of yacc.c */ -#line 1661 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_MATRIX_TRANSPOSE; - } - break; - - case 199: - -/* Line 1806 of yacc.c */ -#line 1665 "src/mesa/program/program_parse.y" - { - (yyval.integer) = STATE_MATRIX_INVTRANS; - } - break; - - case 200: - -/* Line 1806 of yacc.c */ -#line 1671 "src/mesa/program/program_parse.y" - { - if ((yyvsp[(1) - (1)].integer) > 3) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid matrix row reference"); - YYERROR; - } - - (yyval.integer) = (yyvsp[(1) - (1)].integer); - } - break; - - case 201: - -/* Line 1806 of yacc.c */ -#line 1682 "src/mesa/program/program_parse.y" - { - (yyval.state)[0] = STATE_MODELVIEW_MATRIX; - (yyval.state)[1] = (yyvsp[(2) - (2)].integer); - } - break; - - case 202: - -/* Line 1806 of yacc.c */ -#line 1687 "src/mesa/program/program_parse.y" - { - (yyval.state)[0] = STATE_PROJECTION_MATRIX; - (yyval.state)[1] = 0; - } - break; - - case 203: - -/* Line 1806 of yacc.c */ -#line 1692 "src/mesa/program/program_parse.y" - { - (yyval.state)[0] = STATE_MVP_MATRIX; - (yyval.state)[1] = 0; - } - break; - - case 204: - -/* Line 1806 of yacc.c */ -#line 1697 "src/mesa/program/program_parse.y" - { - (yyval.state)[0] = STATE_TEXTURE_MATRIX; - (yyval.state)[1] = (yyvsp[(2) - (2)].integer); - } - break; - - case 205: - -/* Line 1806 of yacc.c */ -#line 1702 "src/mesa/program/program_parse.y" - { - yyerror(& (yylsp[(1) - (4)]), state, "GL_ARB_matrix_palette not supported"); - YYERROR; - } - break; - - case 206: - -/* Line 1806 of yacc.c */ -#line 1707 "src/mesa/program/program_parse.y" - { - (yyval.state)[0] = STATE_PROGRAM_MATRIX; - (yyval.state)[1] = (yyvsp[(3) - (4)].integer); - } - break; - - case 207: - -/* Line 1806 of yacc.c */ -#line 1714 "src/mesa/program/program_parse.y" - { - (yyval.integer) = 0; - } - break; - - case 208: - -/* Line 1806 of yacc.c */ -#line 1718 "src/mesa/program/program_parse.y" - { - (yyval.integer) = (yyvsp[(2) - (3)].integer); - } - break; - - case 209: - -/* Line 1806 of yacc.c */ -#line 1723 "src/mesa/program/program_parse.y" - { - /* Since GL_ARB_vertex_blend isn't supported, only modelview matrix - * zero is valid. - */ - if ((yyvsp[(1) - (1)].integer) != 0) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid modelview matrix index"); - YYERROR; - } - - (yyval.integer) = (yyvsp[(1) - (1)].integer); - } - break; - - case 210: - -/* Line 1806 of yacc.c */ -#line 1736 "src/mesa/program/program_parse.y" - { - /* Since GL_ARB_matrix_palette isn't supported, just let any value - * through here. The error will be generated later. - */ - (yyval.integer) = (yyvsp[(1) - (1)].integer); - } - break; - - case 211: - -/* Line 1806 of yacc.c */ -#line 1744 "src/mesa/program/program_parse.y" - { - if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxProgramMatrices) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid program matrix selector"); - YYERROR; - } - - (yyval.integer) = (yyvsp[(1) - (1)].integer); - } - break; - - case 212: - -/* Line 1806 of yacc.c */ -#line 1755 "src/mesa/program/program_parse.y" - { - memset((yyval.state), 0, sizeof((yyval.state))); - (yyval.state)[0] = STATE_DEPTH_RANGE; - } - break; - - case 217: - -/* Line 1806 of yacc.c */ -#line 1767 "src/mesa/program/program_parse.y" - { - memset((yyval.state), 0, sizeof((yyval.state))); - (yyval.state)[0] = state->state_param_enum; - (yyval.state)[1] = STATE_ENV; - (yyval.state)[2] = (yyvsp[(4) - (5)].state)[0]; - (yyval.state)[3] = (yyvsp[(4) - (5)].state)[1]; - } - break; - - case 218: - -/* Line 1806 of yacc.c */ -#line 1777 "src/mesa/program/program_parse.y" - { - (yyval.state)[0] = (yyvsp[(1) - (1)].integer); - (yyval.state)[1] = (yyvsp[(1) - (1)].integer); - } - break; - - case 219: - -/* Line 1806 of yacc.c */ -#line 1782 "src/mesa/program/program_parse.y" - { - (yyval.state)[0] = (yyvsp[(1) - (3)].integer); - (yyval.state)[1] = (yyvsp[(3) - (3)].integer); - } - break; - - case 220: - -/* Line 1806 of yacc.c */ -#line 1789 "src/mesa/program/program_parse.y" - { - memset((yyval.state), 0, sizeof((yyval.state))); - (yyval.state)[0] = state->state_param_enum; - (yyval.state)[1] = STATE_ENV; - (yyval.state)[2] = (yyvsp[(4) - (5)].integer); - (yyval.state)[3] = (yyvsp[(4) - (5)].integer); - } - break; - - case 221: - -/* Line 1806 of yacc.c */ -#line 1799 "src/mesa/program/program_parse.y" - { - memset((yyval.state), 0, sizeof((yyval.state))); - (yyval.state)[0] = state->state_param_enum; - (yyval.state)[1] = STATE_LOCAL; - (yyval.state)[2] = (yyvsp[(4) - (5)].state)[0]; - (yyval.state)[3] = (yyvsp[(4) - (5)].state)[1]; - } - break; - - case 222: - -/* Line 1806 of yacc.c */ -#line 1808 "src/mesa/program/program_parse.y" - { - (yyval.state)[0] = (yyvsp[(1) - (1)].integer); - (yyval.state)[1] = (yyvsp[(1) - (1)].integer); - } - break; - - case 223: - -/* Line 1806 of yacc.c */ -#line 1813 "src/mesa/program/program_parse.y" - { - (yyval.state)[0] = (yyvsp[(1) - (3)].integer); - (yyval.state)[1] = (yyvsp[(3) - (3)].integer); - } - break; - - case 224: - -/* Line 1806 of yacc.c */ -#line 1820 "src/mesa/program/program_parse.y" - { - memset((yyval.state), 0, sizeof((yyval.state))); - (yyval.state)[0] = state->state_param_enum; - (yyval.state)[1] = STATE_LOCAL; - (yyval.state)[2] = (yyvsp[(4) - (5)].integer); - (yyval.state)[3] = (yyvsp[(4) - (5)].integer); - } - break; - - case 225: - -/* Line 1806 of yacc.c */ -#line 1830 "src/mesa/program/program_parse.y" - { - if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxEnvParams) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid environment parameter reference"); - YYERROR; - } - (yyval.integer) = (yyvsp[(1) - (1)].integer); - } - break; - - case 226: - -/* Line 1806 of yacc.c */ -#line 1840 "src/mesa/program/program_parse.y" - { - if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxLocalParams) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid local parameter reference"); - YYERROR; - } - (yyval.integer) = (yyvsp[(1) - (1)].integer); - } - break; - - case 231: - -/* Line 1806 of yacc.c */ -#line 1855 "src/mesa/program/program_parse.y" - { - (yyval.vector).count = 4; - (yyval.vector).data[0].f = (yyvsp[(1) - (1)].real); - (yyval.vector).data[1].f = (yyvsp[(1) - (1)].real); - (yyval.vector).data[2].f = (yyvsp[(1) - (1)].real); - (yyval.vector).data[3].f = (yyvsp[(1) - (1)].real); - } - break; - - case 232: - -/* Line 1806 of yacc.c */ -#line 1865 "src/mesa/program/program_parse.y" - { - (yyval.vector).count = 1; - (yyval.vector).data[0].f = (yyvsp[(1) - (1)].real); - (yyval.vector).data[1].f = (yyvsp[(1) - (1)].real); - (yyval.vector).data[2].f = (yyvsp[(1) - (1)].real); - (yyval.vector).data[3].f = (yyvsp[(1) - (1)].real); - } - break; - - case 233: - -/* Line 1806 of yacc.c */ -#line 1873 "src/mesa/program/program_parse.y" - { - (yyval.vector).count = 1; - (yyval.vector).data[0].f = (float) (yyvsp[(1) - (1)].integer); - (yyval.vector).data[1].f = (float) (yyvsp[(1) - (1)].integer); - (yyval.vector).data[2].f = (float) (yyvsp[(1) - (1)].integer); - (yyval.vector).data[3].f = (float) (yyvsp[(1) - (1)].integer); - } - break; - - case 234: - -/* Line 1806 of yacc.c */ -#line 1883 "src/mesa/program/program_parse.y" - { - (yyval.vector).count = 4; - (yyval.vector).data[0].f = (yyvsp[(2) - (3)].real); - (yyval.vector).data[1].f = 0.0f; - (yyval.vector).data[2].f = 0.0f; - (yyval.vector).data[3].f = 1.0f; - } - break; - - case 235: - -/* Line 1806 of yacc.c */ -#line 1891 "src/mesa/program/program_parse.y" - { - (yyval.vector).count = 4; - (yyval.vector).data[0].f = (yyvsp[(2) - (5)].real); - (yyval.vector).data[1].f = (yyvsp[(4) - (5)].real); - (yyval.vector).data[2].f = 0.0f; - (yyval.vector).data[3].f = 1.0f; - } - break; - - case 236: - -/* Line 1806 of yacc.c */ -#line 1900 "src/mesa/program/program_parse.y" - { - (yyval.vector).count = 4; - (yyval.vector).data[0].f = (yyvsp[(2) - (7)].real); - (yyval.vector).data[1].f = (yyvsp[(4) - (7)].real); - (yyval.vector).data[2].f = (yyvsp[(6) - (7)].real); - (yyval.vector).data[3].f = 1.0f; - } - break; - - case 237: - -/* Line 1806 of yacc.c */ -#line 1909 "src/mesa/program/program_parse.y" - { - (yyval.vector).count = 4; - (yyval.vector).data[0].f = (yyvsp[(2) - (9)].real); - (yyval.vector).data[1].f = (yyvsp[(4) - (9)].real); - (yyval.vector).data[2].f = (yyvsp[(6) - (9)].real); - (yyval.vector).data[3].f = (yyvsp[(8) - (9)].real); - } - break; - - case 238: - -/* Line 1806 of yacc.c */ -#line 1919 "src/mesa/program/program_parse.y" - { - (yyval.real) = ((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].real) : (yyvsp[(2) - (2)].real); - } - break; - - case 239: - -/* Line 1806 of yacc.c */ -#line 1923 "src/mesa/program/program_parse.y" - { - (yyval.real) = (float)(((yyvsp[(1) - (2)].negate)) ? -(yyvsp[(2) - (2)].integer) : (yyvsp[(2) - (2)].integer)); - } - break; - - case 240: - -/* Line 1806 of yacc.c */ -#line 1928 "src/mesa/program/program_parse.y" - { (yyval.negate) = FALSE; } - break; - - case 241: - -/* Line 1806 of yacc.c */ -#line 1929 "src/mesa/program/program_parse.y" - { (yyval.negate) = TRUE; } - break; - - case 242: - -/* Line 1806 of yacc.c */ -#line 1930 "src/mesa/program/program_parse.y" - { (yyval.negate) = FALSE; } - break; - - case 243: - -/* Line 1806 of yacc.c */ -#line 1933 "src/mesa/program/program_parse.y" - { (yyval.integer) = (yyvsp[(2) - (2)].integer); } - break; - - case 245: - -/* Line 1806 of yacc.c */ -#line 1937 "src/mesa/program/program_parse.y" - { - /* NV_fragment_program_option defines the size qualifiers in a - * fairly broken way. "SHORT" or "LONG" can optionally be used - * before TEMP or OUTPUT. However, neither is a reserved word! - * This means that we have to parse it as an identifier, then check - * to make sure it's one of the valid values. *sigh* - * - * In addition, the grammar in the extension spec does *not* allow - * the size specifier to be optional, but all known implementations - * do. - */ - if (!state->option.NV_fragment) { - yyerror(& (yylsp[(1) - (1)]), state, "unexpected IDENTIFIER"); - YYERROR; - } - - if (strcmp("SHORT", (yyvsp[(1) - (1)].string)) == 0) { - } else if (strcmp("LONG", (yyvsp[(1) - (1)].string)) == 0) { - } else { - char *const err_str = - make_error_string("invalid storage size specifier \"%s\"", - (yyvsp[(1) - (1)].string)); - - yyerror(& (yylsp[(1) - (1)]), state, (err_str != NULL) - ? err_str : "invalid storage size specifier"); - - if (err_str != NULL) { - free(err_str); - } - - YYERROR; - } - } - break; - - case 246: - -/* Line 1806 of yacc.c */ -#line 1971 "src/mesa/program/program_parse.y" - { - } - break; - - case 247: - -/* Line 1806 of yacc.c */ -#line 1975 "src/mesa/program/program_parse.y" - { (yyval.integer) = (yyvsp[(1) - (1)].integer); } - break; - - case 249: - -/* Line 1806 of yacc.c */ -#line 1979 "src/mesa/program/program_parse.y" - { - if (!declare_variable(state, (yyvsp[(3) - (3)].string), (yyvsp[(0) - (3)].integer), & (yylsp[(3) - (3)]))) { - free((yyvsp[(3) - (3)].string)); - YYERROR; - } - } - break; - - case 250: - -/* Line 1806 of yacc.c */ -#line 1986 "src/mesa/program/program_parse.y" - { - if (!declare_variable(state, (yyvsp[(1) - (1)].string), (yyvsp[(0) - (1)].integer), & (yylsp[(1) - (1)]))) { - free((yyvsp[(1) - (1)].string)); - YYERROR; - } - } - break; - - case 251: - -/* Line 1806 of yacc.c */ -#line 1995 "src/mesa/program/program_parse.y" - { - struct asm_symbol *const s = - declare_variable(state, (yyvsp[(3) - (5)].string), at_output, & (yylsp[(3) - (5)])); - - if (s == NULL) { - free((yyvsp[(3) - (5)].string)); - YYERROR; - } else { - s->output_binding = (yyvsp[(5) - (5)].result); - } - } - break; - - case 252: - -/* Line 1806 of yacc.c */ -#line 2009 "src/mesa/program/program_parse.y" - { - if (state->mode == ARB_vertex) { - (yyval.result) = VERT_RESULT_HPOS; - } else { - yyerror(& (yylsp[(2) - (2)]), state, "invalid program result name"); - YYERROR; - } - } - break; - - case 253: - -/* Line 1806 of yacc.c */ -#line 2018 "src/mesa/program/program_parse.y" - { - if (state->mode == ARB_vertex) { - (yyval.result) = VERT_RESULT_FOGC; - } else { - yyerror(& (yylsp[(2) - (2)]), state, "invalid program result name"); - YYERROR; - } - } - break; - - case 254: - -/* Line 1806 of yacc.c */ -#line 2027 "src/mesa/program/program_parse.y" - { - (yyval.result) = (yyvsp[(2) - (2)].result); - } - break; - - case 255: - -/* Line 1806 of yacc.c */ -#line 2031 "src/mesa/program/program_parse.y" - { - if (state->mode == ARB_vertex) { - (yyval.result) = VERT_RESULT_PSIZ; - } else { - yyerror(& (yylsp[(2) - (2)]), state, "invalid program result name"); - YYERROR; - } - } - break; - - case 256: - -/* Line 1806 of yacc.c */ -#line 2040 "src/mesa/program/program_parse.y" - { - if (state->mode == ARB_vertex) { - (yyval.result) = VERT_RESULT_TEX0 + (yyvsp[(3) - (3)].integer); - } else { - yyerror(& (yylsp[(2) - (3)]), state, "invalid program result name"); - YYERROR; - } - } - break; - - case 257: - -/* Line 1806 of yacc.c */ -#line 2049 "src/mesa/program/program_parse.y" - { - if (state->mode == ARB_fragment) { - (yyval.result) = FRAG_RESULT_DEPTH; - } else { - yyerror(& (yylsp[(2) - (2)]), state, "invalid program result name"); - YYERROR; - } - } - break; - - case 258: - -/* Line 1806 of yacc.c */ -#line 2060 "src/mesa/program/program_parse.y" - { - (yyval.result) = (yyvsp[(2) - (3)].integer) + (yyvsp[(3) - (3)].integer); - } - break; - - case 259: - -/* Line 1806 of yacc.c */ -#line 2066 "src/mesa/program/program_parse.y" - { - if (state->mode == ARB_vertex) { - (yyval.integer) = VERT_RESULT_COL0; - } else { - if (state->option.DrawBuffers) - (yyval.integer) = FRAG_RESULT_DATA0; - else - (yyval.integer) = FRAG_RESULT_COLOR; - } - } - break; - - case 260: - -/* Line 1806 of yacc.c */ -#line 2077 "src/mesa/program/program_parse.y" - { - if (state->mode == ARB_vertex) { - yyerror(& (yylsp[(1) - (3)]), state, "invalid program result name"); - YYERROR; - } else { - if (!state->option.DrawBuffers) { - /* From the ARB_draw_buffers spec (same text exists - * for ATI_draw_buffers): - * - * If this option is not specified, a fragment - * program that attempts to bind - * "result.color[n]" will fail to load, and only - * "result.color" will be allowed. - */ - yyerror(& (yylsp[(1) - (3)]), state, - "result.color[] used without " - "`OPTION ARB_draw_buffers' or " - "`OPTION ATI_draw_buffers'"); - YYERROR; - } else if ((yyvsp[(2) - (3)].integer) >= state->MaxDrawBuffers) { - yyerror(& (yylsp[(1) - (3)]), state, - "result.color[] exceeds MAX_DRAW_BUFFERS_ARB"); - YYERROR; - } - (yyval.integer) = FRAG_RESULT_DATA0 + (yyvsp[(2) - (3)].integer); - } - } - break; - - case 261: - -/* Line 1806 of yacc.c */ -#line 2105 "src/mesa/program/program_parse.y" - { - if (state->mode == ARB_vertex) { - (yyval.integer) = VERT_RESULT_COL0; - } else { - yyerror(& (yylsp[(1) - (1)]), state, "invalid program result name"); - YYERROR; - } - } - break; - - case 262: - -/* Line 1806 of yacc.c */ -#line 2114 "src/mesa/program/program_parse.y" - { - if (state->mode == ARB_vertex) { - (yyval.integer) = VERT_RESULT_BFC0; - } else { - yyerror(& (yylsp[(1) - (1)]), state, "invalid program result name"); - YYERROR; - } - } - break; - - case 263: - -/* Line 1806 of yacc.c */ -#line 2125 "src/mesa/program/program_parse.y" - { - (yyval.integer) = 0; - } - break; - - case 264: - -/* Line 1806 of yacc.c */ -#line 2129 "src/mesa/program/program_parse.y" - { - if (state->mode == ARB_vertex) { - (yyval.integer) = 0; - } else { - yyerror(& (yylsp[(1) - (1)]), state, "invalid program result name"); - YYERROR; - } - } - break; - - case 265: - -/* Line 1806 of yacc.c */ -#line 2138 "src/mesa/program/program_parse.y" - { - if (state->mode == ARB_vertex) { - (yyval.integer) = 1; - } else { - yyerror(& (yylsp[(1) - (1)]), state, "invalid program result name"); - YYERROR; - } - } - break; - - case 266: - -/* Line 1806 of yacc.c */ -#line 2148 "src/mesa/program/program_parse.y" - { (yyval.integer) = 0; } - break; - - case 267: - -/* Line 1806 of yacc.c */ -#line 2149 "src/mesa/program/program_parse.y" - { (yyval.integer) = 0; } - break; - - case 268: - -/* Line 1806 of yacc.c */ -#line 2150 "src/mesa/program/program_parse.y" - { (yyval.integer) = 1; } - break; - - case 269: - -/* Line 1806 of yacc.c */ -#line 2153 "src/mesa/program/program_parse.y" - { (yyval.integer) = 0; } - break; - - case 270: - -/* Line 1806 of yacc.c */ -#line 2154 "src/mesa/program/program_parse.y" - { (yyval.integer) = 0; } - break; - - case 271: - -/* Line 1806 of yacc.c */ -#line 2155 "src/mesa/program/program_parse.y" - { (yyval.integer) = 1; } - break; - - case 272: - -/* Line 1806 of yacc.c */ -#line 2158 "src/mesa/program/program_parse.y" - { (yyval.integer) = 0; } - break; - - case 273: - -/* Line 1806 of yacc.c */ -#line 2159 "src/mesa/program/program_parse.y" - { (yyval.integer) = (yyvsp[(2) - (3)].integer); } - break; - - case 274: - -/* Line 1806 of yacc.c */ -#line 2162 "src/mesa/program/program_parse.y" - { (yyval.integer) = 0; } - break; - - case 275: - -/* Line 1806 of yacc.c */ -#line 2163 "src/mesa/program/program_parse.y" - { (yyval.integer) = (yyvsp[(2) - (3)].integer); } - break; - - case 276: - -/* Line 1806 of yacc.c */ -#line 2166 "src/mesa/program/program_parse.y" - { (yyval.integer) = 0; } - break; - - case 277: - -/* Line 1806 of yacc.c */ -#line 2167 "src/mesa/program/program_parse.y" - { (yyval.integer) = (yyvsp[(2) - (3)].integer); } - break; - - case 278: - -/* Line 1806 of yacc.c */ -#line 2171 "src/mesa/program/program_parse.y" - { - if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureCoordUnits) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid texture coordinate unit selector"); - YYERROR; - } - - (yyval.integer) = (yyvsp[(1) - (1)].integer); - } - break; - - case 279: - -/* Line 1806 of yacc.c */ -#line 2182 "src/mesa/program/program_parse.y" - { - if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureImageUnits) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid texture image unit selector"); - YYERROR; - } - - (yyval.integer) = (yyvsp[(1) - (1)].integer); - } - break; - - case 280: - -/* Line 1806 of yacc.c */ -#line 2193 "src/mesa/program/program_parse.y" - { - if ((unsigned) (yyvsp[(1) - (1)].integer) >= state->MaxTextureUnits) { - yyerror(& (yylsp[(1) - (1)]), state, "invalid texture unit selector"); - YYERROR; - } - - (yyval.integer) = (yyvsp[(1) - (1)].integer); - } - break; - - case 281: - -/* Line 1806 of yacc.c */ -#line 2204 "src/mesa/program/program_parse.y" - { - struct asm_symbol *exist = (struct asm_symbol *) - _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(2) - (4)].string)); - struct asm_symbol *target = (struct asm_symbol *) - _mesa_symbol_table_find_symbol(state->st, 0, (yyvsp[(4) - (4)].string)); - - free((yyvsp[(4) - (4)].string)); - - if (exist != NULL) { - char m[1000]; - _mesa_snprintf(m, sizeof(m), "redeclared identifier: %s", (yyvsp[(2) - (4)].string)); - free((yyvsp[(2) - (4)].string)); - yyerror(& (yylsp[(2) - (4)]), state, m); - YYERROR; - } else if (target == NULL) { - free((yyvsp[(2) - (4)].string)); - yyerror(& (yylsp[(4) - (4)]), state, - "undefined variable binding in ALIAS statement"); - YYERROR; - } else { - _mesa_symbol_table_add_symbol(state->st, 0, (yyvsp[(2) - (4)].string), target); - } - } - break; - - - -/* Line 1806 of yacc.c */ -#line 5022 "build/windows-x86/mesa/program/program_parse.tab.c" - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - *++yylsp = yyloc; - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (&yylloc, state, YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (&yylloc, state, yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif - } - - yyerror_range[1] = yylloc; - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, state); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - yyerror_range[1] = yylsp[1-yylen]; - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - yyerror_range[1] = *yylsp; - yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp, state); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - *++yyvsp = yylval; - - yyerror_range[2] = yylloc; - /* Using YYLLOC is tempting, but would change the location of - the lookahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, yyerror_range, 2); - *++yylsp = yyloc; - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined(yyoverflow) || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (&yylloc, state, YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, state); - } - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yylsp, state); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - - -/* Line 2067 of yacc.c */ -#line 2233 "src/mesa/program/program_parse.y" - - -void -asm_instruction_set_operands(struct asm_instruction *inst, - const struct prog_dst_register *dst, - const struct asm_src_register *src0, - const struct asm_src_register *src1, - const struct asm_src_register *src2) -{ - /* In the core ARB extensions only the KIL instruction doesn't have a - * destination register. - */ - if (dst == NULL) { - init_dst_reg(& inst->Base.DstReg); - } else { - inst->Base.DstReg = *dst; - } - - /* The only instruction that doesn't have any source registers is the - * condition-code based KIL instruction added by NV_fragment_program_option. - */ - if (src0 != NULL) { - inst->Base.SrcReg[0] = src0->Base; - inst->SrcReg[0] = *src0; - } else { - init_src_reg(& inst->SrcReg[0]); - } - - if (src1 != NULL) { - inst->Base.SrcReg[1] = src1->Base; - inst->SrcReg[1] = *src1; - } else { - init_src_reg(& inst->SrcReg[1]); - } - - if (src2 != NULL) { - inst->Base.SrcReg[2] = src2->Base; - inst->SrcReg[2] = *src2; - } else { - init_src_reg(& inst->SrcReg[2]); - } -} - - -struct asm_instruction * -asm_instruction_ctor(gl_inst_opcode op, - const struct prog_dst_register *dst, - const struct asm_src_register *src0, - const struct asm_src_register *src1, - const struct asm_src_register *src2) -{ - struct asm_instruction *inst = CALLOC_STRUCT(asm_instruction); - - if (inst) { - _mesa_init_instructions(& inst->Base, 1); - inst->Base.Opcode = op; - - asm_instruction_set_operands(inst, dst, src0, src1, src2); - } - - return inst; -} - - -struct asm_instruction * -asm_instruction_copy_ctor(const struct prog_instruction *base, - const struct prog_dst_register *dst, - const struct asm_src_register *src0, - const struct asm_src_register *src1, - const struct asm_src_register *src2) -{ - struct asm_instruction *inst = CALLOC_STRUCT(asm_instruction); - - if (inst) { - _mesa_init_instructions(& inst->Base, 1); - inst->Base.Opcode = base->Opcode; - inst->Base.CondUpdate = base->CondUpdate; - inst->Base.CondDst = base->CondDst; - inst->Base.SaturateMode = base->SaturateMode; - inst->Base.Precision = base->Precision; - - asm_instruction_set_operands(inst, dst, src0, src1, src2); - } - - return inst; -} - - -void -init_dst_reg(struct prog_dst_register *r) -{ - memset(r, 0, sizeof(*r)); - r->File = PROGRAM_UNDEFINED; - r->WriteMask = WRITEMASK_XYZW; - r->CondMask = COND_TR; - r->CondSwizzle = SWIZZLE_NOOP; -} - - -/** Like init_dst_reg() but set the File and Index fields. */ -void -set_dst_reg(struct prog_dst_register *r, gl_register_file file, GLint index) -{ - const GLint maxIndex = 1 << INST_INDEX_BITS; - const GLint minIndex = 0; - ASSERT(index >= minIndex); - (void) minIndex; - ASSERT(index <= maxIndex); - (void) maxIndex; - ASSERT(file == PROGRAM_TEMPORARY || - file == PROGRAM_ADDRESS || - file == PROGRAM_OUTPUT); - memset(r, 0, sizeof(*r)); - r->File = file; - r->Index = index; - r->WriteMask = WRITEMASK_XYZW; - r->CondMask = COND_TR; - r->CondSwizzle = SWIZZLE_NOOP; -} - - -void -init_src_reg(struct asm_src_register *r) -{ - memset(r, 0, sizeof(*r)); - r->Base.File = PROGRAM_UNDEFINED; - r->Base.Swizzle = SWIZZLE_NOOP; - r->Symbol = NULL; -} - - -/** Like init_src_reg() but set the File and Index fields. - * \return GL_TRUE if a valid src register, GL_FALSE otherwise - */ -void -set_src_reg(struct asm_src_register *r, gl_register_file file, GLint index) -{ - set_src_reg_swz(r, file, index, SWIZZLE_XYZW); -} - - -void -set_src_reg_swz(struct asm_src_register *r, gl_register_file file, GLint index, - GLuint swizzle) -{ - const GLint maxIndex = (1 << INST_INDEX_BITS) - 1; - const GLint minIndex = -(1 << INST_INDEX_BITS); - ASSERT(file < PROGRAM_FILE_MAX); - ASSERT(index >= minIndex); - (void) minIndex; - ASSERT(index <= maxIndex); - (void) maxIndex; - memset(r, 0, sizeof(*r)); - r->Base.File = file; - r->Base.Index = index; - r->Base.Swizzle = swizzle; - r->Symbol = NULL; -} - - -/** - * Validate the set of inputs used by a program - * - * Validates that legal sets of inputs are used by the program. In this case - * "used" included both reading the input or binding the input to a name using - * the \c ATTRIB command. - * - * \return - * \c TRUE if the combination of inputs used is valid, \c FALSE otherwise. - */ -int -validate_inputs(struct YYLTYPE *locp, struct asm_parser_state *state) -{ - const GLbitfield64 inputs = state->prog->InputsRead | state->InputsBound; - - if (((inputs & VERT_BIT_FF_ALL) & (inputs >> VERT_ATTRIB_GENERIC0)) != 0) { - yyerror(locp, state, "illegal use of generic attribute and name attribute"); - return 0; - } - - return 1; -} - - -struct asm_symbol * -declare_variable(struct asm_parser_state *state, char *name, enum asm_type t, - struct YYLTYPE *locp) -{ - struct asm_symbol *s = NULL; - struct asm_symbol *exist = (struct asm_symbol *) - _mesa_symbol_table_find_symbol(state->st, 0, name); - - - if (exist != NULL) { - yyerror(locp, state, "redeclared identifier"); - } else { - s = calloc(1, sizeof(struct asm_symbol)); - s->name = name; - s->type = t; - - switch (t) { - case at_temp: - if (state->prog->NumTemporaries >= state->limits->MaxTemps) { - yyerror(locp, state, "too many temporaries declared"); - free(s); - return NULL; - } - - s->temp_binding = state->prog->NumTemporaries; - state->prog->NumTemporaries++; - break; - - case at_address: - if (state->prog->NumAddressRegs >= state->limits->MaxAddressRegs) { - yyerror(locp, state, "too many address registers declared"); - free(s); - return NULL; - } - - /* FINISHME: Add support for multiple address registers. - */ - state->prog->NumAddressRegs++; - break; - - default: - break; - } - - _mesa_symbol_table_add_symbol(state->st, 0, s->name, s); - s->next = state->sym; - state->sym = s; - } - - return s; -} - - -int add_state_reference(struct gl_program_parameter_list *param_list, - const gl_state_index tokens[STATE_LENGTH]) -{ - const GLuint size = 4; /* XXX fix */ - char *name; - GLint index; - - name = _mesa_program_state_string(tokens); - index = _mesa_add_parameter(param_list, PROGRAM_STATE_VAR, name, - size, GL_NONE, NULL, tokens, 0x0); - param_list->StateFlags |= _mesa_program_state_flags(tokens); - - /* free name string here since we duplicated it in add_parameter() */ - free(name); - - return index; -} - - -int -initialize_symbol_from_state(struct gl_program *prog, - struct asm_symbol *param_var, - const gl_state_index tokens[STATE_LENGTH]) -{ - int idx = -1; - gl_state_index state_tokens[STATE_LENGTH]; - - - memcpy(state_tokens, tokens, sizeof(state_tokens)); - - param_var->type = at_param; - param_var->param_binding_type = PROGRAM_STATE_VAR; - - /* If we are adding a STATE_MATRIX that has multiple rows, we need to - * unroll it and call add_state_reference() for each row - */ - if ((state_tokens[0] == STATE_MODELVIEW_MATRIX || - state_tokens[0] == STATE_PROJECTION_MATRIX || - state_tokens[0] == STATE_MVP_MATRIX || - state_tokens[0] == STATE_TEXTURE_MATRIX || - state_tokens[0] == STATE_PROGRAM_MATRIX) - && (state_tokens[2] != state_tokens[3])) { - int row; - const int first_row = state_tokens[2]; - const int last_row = state_tokens[3]; - - for (row = first_row; row <= last_row; row++) { - state_tokens[2] = state_tokens[3] = row; - - idx = add_state_reference(prog->Parameters, state_tokens); - if (param_var->param_binding_begin == ~0U) { - param_var->param_binding_begin = idx; - param_var->param_binding_swizzle = SWIZZLE_XYZW; - } - - param_var->param_binding_length++; - } - } - else { - idx = add_state_reference(prog->Parameters, state_tokens); - if (param_var->param_binding_begin == ~0U) { - param_var->param_binding_begin = idx; - param_var->param_binding_swizzle = SWIZZLE_XYZW; - } - param_var->param_binding_length++; - } - - return idx; -} - - -int -initialize_symbol_from_param(struct gl_program *prog, - struct asm_symbol *param_var, - const gl_state_index tokens[STATE_LENGTH]) -{ - int idx = -1; - gl_state_index state_tokens[STATE_LENGTH]; - - - memcpy(state_tokens, tokens, sizeof(state_tokens)); - - assert((state_tokens[0] == STATE_VERTEX_PROGRAM) - || (state_tokens[0] == STATE_FRAGMENT_PROGRAM)); - assert((state_tokens[1] == STATE_ENV) - || (state_tokens[1] == STATE_LOCAL)); - - /* - * The param type is STATE_VAR. The program parameter entry will - * effectively be a pointer into the LOCAL or ENV parameter array. - */ - param_var->type = at_param; - param_var->param_binding_type = PROGRAM_STATE_VAR; - - /* If we are adding a STATE_ENV or STATE_LOCAL that has multiple elements, - * we need to unroll it and call add_state_reference() for each row - */ - if (state_tokens[2] != state_tokens[3]) { - int row; - const int first_row = state_tokens[2]; - const int last_row = state_tokens[3]; - - for (row = first_row; row <= last_row; row++) { - state_tokens[2] = state_tokens[3] = row; - - idx = add_state_reference(prog->Parameters, state_tokens); - if (param_var->param_binding_begin == ~0U) { - param_var->param_binding_begin = idx; - param_var->param_binding_swizzle = SWIZZLE_XYZW; - } - param_var->param_binding_length++; - } - } - else { - idx = add_state_reference(prog->Parameters, state_tokens); - if (param_var->param_binding_begin == ~0U) { - param_var->param_binding_begin = idx; - param_var->param_binding_swizzle = SWIZZLE_XYZW; - } - param_var->param_binding_length++; - } - - return idx; -} - - -/** - * Put a float/vector constant/literal into the parameter list. - * \param param_var returns info about the parameter/constant's location, - * binding, type, etc. - * \param vec the vector/constant to add - * \param allowSwizzle if true, try to consolidate constants which only differ - * by a swizzle. We don't want to do this when building - * arrays of constants that may be indexed indirectly. - * \return index of the constant in the parameter list. - */ -int -initialize_symbol_from_const(struct gl_program *prog, - struct asm_symbol *param_var, - const struct asm_vector *vec, - GLboolean allowSwizzle) -{ - unsigned swizzle; - const int idx = _mesa_add_unnamed_constant(prog->Parameters, - vec->data, vec->count, - allowSwizzle ? &swizzle : NULL); - - param_var->type = at_param; - param_var->param_binding_type = PROGRAM_CONSTANT; - - if (param_var->param_binding_begin == ~0U) { - param_var->param_binding_begin = idx; - param_var->param_binding_swizzle = allowSwizzle ? swizzle : SWIZZLE_XYZW; - } - param_var->param_binding_length++; - - return idx; -} - - -char * -make_error_string(const char *fmt, ...) -{ - int length; - char *str; - va_list args; - - - /* Call vsnprintf once to determine how large the final string is. Call it - * again to do the actual formatting. from the vsnprintf manual page: - * - * Upon successful return, these functions return the number of - * characters printed (not including the trailing '\0' used to end - * output to strings). - */ - va_start(args, fmt); - length = 1 + vsnprintf(NULL, 0, fmt, args); - va_end(args); - - str = malloc(length); - if (str) { - va_start(args, fmt); - vsnprintf(str, length, fmt, args); - va_end(args); - } - - return str; -} - - -void -yyerror(YYLTYPE *locp, struct asm_parser_state *state, const char *s) -{ - char *err_str; - - - err_str = make_error_string("glProgramStringARB(%s)\n", s); - if (err_str) { - _mesa_error(state->ctx, GL_INVALID_OPERATION, "%s", err_str); - free(err_str); - } - - err_str = make_error_string("line %u, char %u: error: %s\n", - locp->first_line, locp->first_column, s); - _mesa_set_program_error(state->ctx, locp->position, err_str); - - if (err_str) { - free(err_str); - } -} - - -GLboolean -_mesa_parse_arb_program(struct gl_context *ctx, GLenum target, const GLubyte *str, - GLsizei len, struct asm_parser_state *state) -{ - struct asm_instruction *inst; - unsigned i; - GLubyte *strz; - GLboolean result = GL_FALSE; - void *temp; - struct asm_symbol *sym; - - state->ctx = ctx; - state->prog->Target = target; - state->prog->Parameters = _mesa_new_parameter_list(); - - /* Make a copy of the program string and force it to be NUL-terminated. - */ - strz = (GLubyte *) malloc(len + 1); - if (strz == NULL) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glProgramStringARB"); - return GL_FALSE; - } - memcpy (strz, str, len); - strz[len] = '\0'; - - state->prog->String = strz; - - state->st = _mesa_symbol_table_ctor(); - - state->limits = (target == GL_VERTEX_PROGRAM_ARB) - ? & ctx->Const.VertexProgram - : & ctx->Const.FragmentProgram; - - state->MaxTextureImageUnits = ctx->Const.MaxTextureImageUnits; - state->MaxTextureCoordUnits = ctx->Const.MaxTextureCoordUnits; - state->MaxTextureUnits = ctx->Const.MaxTextureUnits; - state->MaxClipPlanes = ctx->Const.MaxClipPlanes; - state->MaxLights = ctx->Const.MaxLights; - state->MaxProgramMatrices = ctx->Const.MaxProgramMatrices; - state->MaxDrawBuffers = ctx->Const.MaxDrawBuffers; - - state->state_param_enum = (target == GL_VERTEX_PROGRAM_ARB) - ? STATE_VERTEX_PROGRAM : STATE_FRAGMENT_PROGRAM; - - _mesa_set_program_error(ctx, -1, NULL); - - _mesa_program_lexer_ctor(& state->scanner, state, (const char *) str, len); - yyparse(state); - _mesa_program_lexer_dtor(state->scanner); - - - if (ctx->Program.ErrorPos != -1) { - goto error; - } - - if (! _mesa_layout_parameters(state)) { - struct YYLTYPE loc; - - loc.first_line = 0; - loc.first_column = 0; - loc.position = len; - - yyerror(& loc, state, "invalid PARAM usage"); - goto error; - } - - - - /* Add one instruction to store the "END" instruction. - */ - state->prog->Instructions = - _mesa_alloc_instructions(state->prog->NumInstructions + 1); - inst = state->inst_head; - for (i = 0; i < state->prog->NumInstructions; i++) { - struct asm_instruction *const temp = inst->next; - - state->prog->Instructions[i] = inst->Base; - inst = temp; - } - - /* Finally, tag on an OPCODE_END instruction */ - { - const GLuint numInst = state->prog->NumInstructions; - _mesa_init_instructions(state->prog->Instructions + numInst, 1); - state->prog->Instructions[numInst].Opcode = OPCODE_END; - } - state->prog->NumInstructions++; - - state->prog->NumParameters = state->prog->Parameters->NumParameters; - state->prog->NumAttributes = _mesa_bitcount_64(state->prog->InputsRead); - - /* - * Initialize native counts to logical counts. The device driver may - * change them if program is translated into a hardware program. - */ - state->prog->NumNativeInstructions = state->prog->NumInstructions; - state->prog->NumNativeTemporaries = state->prog->NumTemporaries; - state->prog->NumNativeParameters = state->prog->NumParameters; - state->prog->NumNativeAttributes = state->prog->NumAttributes; - state->prog->NumNativeAddressRegs = state->prog->NumAddressRegs; - - result = GL_TRUE; - -error: - for (inst = state->inst_head; inst != NULL; inst = temp) { - temp = inst->next; - free(inst); - } - - state->inst_head = NULL; - state->inst_tail = NULL; - - for (sym = state->sym; sym != NULL; sym = temp) { - temp = sym->next; - - free((void *) sym->name); - free(sym); - } - state->sym = NULL; - - _mesa_symbol_table_dtor(state->st); - state->st = NULL; - - return result; -} - diff --git a/dll/opengl/mesa/generated/mesa/program/program_parse.tab.h b/dll/opengl/mesa/generated/mesa/program/program_parse.tab.h deleted file mode 100644 index b78c050a983..00000000000 --- a/dll/opengl/mesa/generated/mesa/program/program_parse.tab.h +++ /dev/null @@ -1,207 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.5. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - ARBvp_10 = 258, - ARBfp_10 = 259, - ADDRESS = 260, - ALIAS = 261, - ATTRIB = 262, - OPTION = 263, - OUTPUT = 264, - PARAM = 265, - TEMP = 266, - END = 267, - BIN_OP = 268, - BINSC_OP = 269, - SAMPLE_OP = 270, - SCALAR_OP = 271, - TRI_OP = 272, - VECTOR_OP = 273, - ARL = 274, - KIL = 275, - SWZ = 276, - TXD_OP = 277, - INTEGER = 278, - REAL = 279, - AMBIENT = 280, - ATTENUATION = 281, - BACK = 282, - CLIP = 283, - COLOR = 284, - DEPTH = 285, - DIFFUSE = 286, - DIRECTION = 287, - EMISSION = 288, - ENV = 289, - EYE = 290, - FOG = 291, - FOGCOORD = 292, - FRAGMENT = 293, - FRONT = 294, - HALF = 295, - INVERSE = 296, - INVTRANS = 297, - LIGHT = 298, - LIGHTMODEL = 299, - LIGHTPROD = 300, - LOCAL = 301, - MATERIAL = 302, - MAT_PROGRAM = 303, - MATRIX = 304, - MATRIXINDEX = 305, - MODELVIEW = 306, - MVP = 307, - NORMAL = 308, - OBJECT = 309, - PALETTE = 310, - PARAMS = 311, - PLANE = 312, - POINT_TOK = 313, - POINTSIZE = 314, - POSITION = 315, - PRIMARY = 316, - PROGRAM = 317, - PROJECTION = 318, - RANGE = 319, - RESULT = 320, - ROW = 321, - SCENECOLOR = 322, - SECONDARY = 323, - SHININESS = 324, - SIZE_TOK = 325, - SPECULAR = 326, - SPOT = 327, - STATE = 328, - TEXCOORD = 329, - TEXENV = 330, - TEXGEN = 331, - TEXGEN_Q = 332, - TEXGEN_R = 333, - TEXGEN_S = 334, - TEXGEN_T = 335, - TEXTURE = 336, - TRANSPOSE = 337, - TEXTURE_UNIT = 338, - TEX_1D = 339, - TEX_2D = 340, - TEX_3D = 341, - TEX_CUBE = 342, - TEX_RECT = 343, - TEX_SHADOW1D = 344, - TEX_SHADOW2D = 345, - TEX_SHADOWRECT = 346, - TEX_ARRAY1D = 347, - TEX_ARRAY2D = 348, - TEX_ARRAYSHADOW1D = 349, - TEX_ARRAYSHADOW2D = 350, - VERTEX = 351, - VTXATTRIB = 352, - WEIGHT = 353, - IDENTIFIER = 354, - USED_IDENTIFIER = 355, - MASK4 = 356, - MASK3 = 357, - MASK2 = 358, - MASK1 = 359, - SWIZZLE = 360, - DOT_DOT = 361, - DOT = 362 - }; -#endif - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ - -/* Line 2068 of yacc.c */ -#line 126 "src/mesa/program/program_parse.y" - - struct asm_instruction *inst; - struct asm_symbol *sym; - struct asm_symbol temp_sym; - struct asm_swizzle_mask swiz_mask; - struct asm_src_register src_reg; - struct prog_dst_register dst_reg; - struct prog_instruction temp_inst; - char *string; - unsigned result; - unsigned attrib; - int integer; - float real; - gl_state_index state[STATE_LENGTH]; - int negate; - struct asm_vector vector; - gl_inst_opcode opcode; - - struct { - unsigned swz; - unsigned rgba_valid:1; - unsigned xyzw_valid:1; - unsigned negate:1; - } ext_swizzle; - - - -/* Line 2068 of yacc.c */ -#line 185 "build/windows-x86/mesa/program/program_parse.tab.h" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - - - -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 -#endif - - - diff --git a/dll/opengl/mesa/include/GL/gl.h b/dll/opengl/mesa/include/GL/gl.h deleted file mode 100644 index b536becb247..00000000000 --- a/dll/opengl/mesa/include/GL/gl.h +++ /dev/null @@ -1,2238 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.6 - * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. - * Copyright (C) 2009 VMware, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef __gl_h_ -#define __gl_h_ - -#if defined(USE_MGL_NAMESPACE) -#include "gl_mangle.h" -#endif - - -/********************************************************************** - * Begin system-specific stuff. Do not do any of this when building - * for SciTech SNAP, as this is all done before this header file is - * included. - */ -#if !defined(__SCITECH_SNAP__) - -#if defined(__BEOS__) -#include /* to get some BeOS-isms */ -#endif - -#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO)) -#define OPENSTEP -#endif - -#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) -#define __WIN32__ -#endif - -#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) -# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ -# define GLAPI __declspec(dllexport) -# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ -# define GLAPI __declspec(dllimport) -# else /* for use with static link lib build of Win32 edition only */ -# define GLAPI extern -# endif /* _STATIC_MESA support */ -# if defined(__MINGW32__) && defined(GL_NO_STDCALL) || defined(UNDER_CE) /* The generated DLLs by MingW with STDCALL are not compatible with the ones done by Microsoft's compilers */ -# define GLAPIENTRY -# else -# define GLAPIENTRY __stdcall -# endif -#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */ -# define GLAPI extern -# define GLAPIENTRY __stdcall -#elif (defined(__GNUC__) && __GNUC__ >= 4) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) -# define GLAPI __attribute__((visibility("default"))) -# define GLAPIENTRY -#endif /* WIN32 && !CYGWIN */ - -#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__) -# define PRAGMA_EXPORT_SUPPORTED 1 -#endif - -/* - * WINDOWS: Include windows.h here to define APIENTRY. - * It is also useful when applications include this file by - * including only glut.h, since glut.h depends on windows.h. - * Applications needing to include windows.h with parms other - * than "WIN32_LEAN_AND_MEAN" may include windows.h before - * glut.h or gl.h. - */ -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN 1 -#endif -//#include -#include -#include -#include -#endif - -#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED -#pragma import on -#endif - -#ifndef GLAPI -#define GLAPI extern -#endif - -#ifndef GLAPIENTRY -#define GLAPIENTRY -#endif - -#ifndef APIENTRY -#define APIENTRY GLAPIENTRY -#endif - -/* "P" suffix to be used for a pointer to a function */ -#ifndef APIENTRYP -#define APIENTRYP APIENTRY * -#endif - -#ifndef GLAPIENTRYP -#define GLAPIENTRYP GLAPIENTRY * -#endif - -#ifdef CENTERLINE_CLPP -#define signed -#endif - -#if defined(PRAGMA_EXPORT_SUPPORTED) -#pragma export on -#endif - -#endif /* !__SCITECH_SNAP__ */ -/* - * End system-specific stuff. - **********************************************************************/ - - - -#ifdef __cplusplus -extern "C" { -#endif - - - -#define GL_VERSION_1_1 1 -#define GL_VERSION_1_2 1 -#define GL_VERSION_1_3 1 -#define GL_ARB_imaging 1 - - -/* - * Datatypes - */ -typedef unsigned int GLenum; -typedef unsigned char GLboolean; -typedef unsigned int GLbitfield; -typedef void GLvoid; -typedef signed char GLbyte; /* 1-byte signed */ -typedef short GLshort; /* 2-byte signed */ -typedef int GLint; /* 4-byte signed */ -typedef unsigned char GLubyte; /* 1-byte unsigned */ -typedef unsigned short GLushort; /* 2-byte unsigned */ -typedef unsigned int GLuint; /* 4-byte unsigned */ -typedef int GLsizei; /* 4-byte signed */ -typedef float GLfloat; /* single precision float */ -typedef float GLclampf; /* single precision float in [0,1] */ -typedef double GLdouble; /* double precision float */ -typedef double GLclampd; /* double precision float in [0,1] */ - - - -/* - * Constants - */ - -/* Boolean values */ -#define GL_FALSE 0x0 -#define GL_TRUE 0x1 - -/* Data types */ -#define GL_BYTE 0x1400 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_SHORT 0x1402 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_INT 0x1404 -#define GL_UNSIGNED_INT 0x1405 -#define GL_FLOAT 0x1406 -#define GL_2_BYTES 0x1407 -#define GL_3_BYTES 0x1408 -#define GL_4_BYTES 0x1409 -#define GL_DOUBLE 0x140A - -/* Primitives */ -#define GL_POINTS 0x0000 -#define GL_LINES 0x0001 -#define GL_LINE_LOOP 0x0002 -#define GL_LINE_STRIP 0x0003 -#define GL_TRIANGLES 0x0004 -#define GL_TRIANGLE_STRIP 0x0005 -#define GL_TRIANGLE_FAN 0x0006 -#define GL_QUADS 0x0007 -#define GL_QUAD_STRIP 0x0008 -#define GL_POLYGON 0x0009 - -/* Vertex Arrays */ -#define GL_VERTEX_ARRAY 0x8074 -#define GL_NORMAL_ARRAY 0x8075 -#define GL_COLOR_ARRAY 0x8076 -#define GL_INDEX_ARRAY 0x8077 -#define GL_TEXTURE_COORD_ARRAY 0x8078 -#define GL_EDGE_FLAG_ARRAY 0x8079 -#define GL_VERTEX_ARRAY_SIZE 0x807A -#define GL_VERTEX_ARRAY_TYPE 0x807B -#define GL_VERTEX_ARRAY_STRIDE 0x807C -#define GL_NORMAL_ARRAY_TYPE 0x807E -#define GL_NORMAL_ARRAY_STRIDE 0x807F -#define GL_COLOR_ARRAY_SIZE 0x8081 -#define GL_COLOR_ARRAY_TYPE 0x8082 -#define GL_COLOR_ARRAY_STRIDE 0x8083 -#define GL_INDEX_ARRAY_TYPE 0x8085 -#define GL_INDEX_ARRAY_STRIDE 0x8086 -#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088 -#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089 -#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A -#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C -#define GL_VERTEX_ARRAY_POINTER 0x808E -#define GL_NORMAL_ARRAY_POINTER 0x808F -#define GL_COLOR_ARRAY_POINTER 0x8090 -#define GL_INDEX_ARRAY_POINTER 0x8091 -#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092 -#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093 -#define GL_V2F 0x2A20 -#define GL_V3F 0x2A21 -#define GL_C4UB_V2F 0x2A22 -#define GL_C4UB_V3F 0x2A23 -#define GL_C3F_V3F 0x2A24 -#define GL_N3F_V3F 0x2A25 -#define GL_C4F_N3F_V3F 0x2A26 -#define GL_T2F_V3F 0x2A27 -#define GL_T4F_V4F 0x2A28 -#define GL_T2F_C4UB_V3F 0x2A29 -#define GL_T2F_C3F_V3F 0x2A2A -#define GL_T2F_N3F_V3F 0x2A2B -#define GL_T2F_C4F_N3F_V3F 0x2A2C -#define GL_T4F_C4F_N3F_V4F 0x2A2D - -/* Matrix Mode */ -#define GL_MATRIX_MODE 0x0BA0 -#define GL_MODELVIEW 0x1700 -#define GL_PROJECTION 0x1701 -#define GL_TEXTURE 0x1702 - -/* Points */ -#define GL_POINT_SMOOTH 0x0B10 -#define GL_POINT_SIZE 0x0B11 -#define GL_POINT_SIZE_GRANULARITY 0x0B13 -#define GL_POINT_SIZE_RANGE 0x0B12 - -/* Lines */ -#define GL_LINE_SMOOTH 0x0B20 -#define GL_LINE_STIPPLE 0x0B24 -#define GL_LINE_STIPPLE_PATTERN 0x0B25 -#define GL_LINE_STIPPLE_REPEAT 0x0B26 -#define GL_LINE_WIDTH 0x0B21 -#define GL_LINE_WIDTH_GRANULARITY 0x0B23 -#define GL_LINE_WIDTH_RANGE 0x0B22 - -/* Polygons */ -#define GL_POINT 0x1B00 -#define GL_LINE 0x1B01 -#define GL_FILL 0x1B02 -#define GL_CW 0x0900 -#define GL_CCW 0x0901 -#define GL_FRONT 0x0404 -#define GL_BACK 0x0405 -#define GL_POLYGON_MODE 0x0B40 -#define GL_POLYGON_SMOOTH 0x0B41 -#define GL_POLYGON_STIPPLE 0x0B42 -#define GL_EDGE_FLAG 0x0B43 -#define GL_CULL_FACE 0x0B44 -#define GL_CULL_FACE_MODE 0x0B45 -#define GL_FRONT_FACE 0x0B46 -#define GL_POLYGON_OFFSET_FACTOR 0x8038 -#define GL_POLYGON_OFFSET_UNITS 0x2A00 -#define GL_POLYGON_OFFSET_POINT 0x2A01 -#define GL_POLYGON_OFFSET_LINE 0x2A02 -#define GL_POLYGON_OFFSET_FILL 0x8037 - -/* Display Lists */ -#define GL_COMPILE 0x1300 -#define GL_COMPILE_AND_EXECUTE 0x1301 -#define GL_LIST_BASE 0x0B32 -#define GL_LIST_INDEX 0x0B33 -#define GL_LIST_MODE 0x0B30 - -/* Depth buffer */ -#define GL_NEVER 0x0200 -#define GL_LESS 0x0201 -#define GL_EQUAL 0x0202 -#define GL_LEQUAL 0x0203 -#define GL_GREATER 0x0204 -#define GL_NOTEQUAL 0x0205 -#define GL_GEQUAL 0x0206 -#define GL_ALWAYS 0x0207 -#define GL_DEPTH_TEST 0x0B71 -#define GL_DEPTH_BITS 0x0D56 -#define GL_DEPTH_CLEAR_VALUE 0x0B73 -#define GL_DEPTH_FUNC 0x0B74 -#define GL_DEPTH_RANGE 0x0B70 -#define GL_DEPTH_WRITEMASK 0x0B72 -#define GL_DEPTH_COMPONENT 0x1902 - -/* Lighting */ -#define GL_LIGHTING 0x0B50 -#define GL_LIGHT0 0x4000 -#define GL_LIGHT1 0x4001 -#define GL_LIGHT2 0x4002 -#define GL_LIGHT3 0x4003 -#define GL_LIGHT4 0x4004 -#define GL_LIGHT5 0x4005 -#define GL_LIGHT6 0x4006 -#define GL_LIGHT7 0x4007 -#define GL_SPOT_EXPONENT 0x1205 -#define GL_SPOT_CUTOFF 0x1206 -#define GL_CONSTANT_ATTENUATION 0x1207 -#define GL_LINEAR_ATTENUATION 0x1208 -#define GL_QUADRATIC_ATTENUATION 0x1209 -#define GL_AMBIENT 0x1200 -#define GL_DIFFUSE 0x1201 -#define GL_SPECULAR 0x1202 -#define GL_SHININESS 0x1601 -#define GL_EMISSION 0x1600 -#define GL_POSITION 0x1203 -#define GL_SPOT_DIRECTION 0x1204 -#define GL_AMBIENT_AND_DIFFUSE 0x1602 -#define GL_COLOR_INDEXES 0x1603 -#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52 -#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51 -#define GL_LIGHT_MODEL_AMBIENT 0x0B53 -#define GL_FRONT_AND_BACK 0x0408 -#define GL_SHADE_MODEL 0x0B54 -#define GL_FLAT 0x1D00 -#define GL_SMOOTH 0x1D01 -#define GL_COLOR_MATERIAL 0x0B57 -#define GL_COLOR_MATERIAL_FACE 0x0B55 -#define GL_COLOR_MATERIAL_PARAMETER 0x0B56 -#define GL_NORMALIZE 0x0BA1 - -/* User clipping planes */ -#define GL_CLIP_PLANE0 0x3000 -#define GL_CLIP_PLANE1 0x3001 -#define GL_CLIP_PLANE2 0x3002 -#define GL_CLIP_PLANE3 0x3003 -#define GL_CLIP_PLANE4 0x3004 -#define GL_CLIP_PLANE5 0x3005 - -/* Accumulation buffer */ -#define GL_ACCUM_RED_BITS 0x0D58 -#define GL_ACCUM_GREEN_BITS 0x0D59 -#define GL_ACCUM_BLUE_BITS 0x0D5A -#define GL_ACCUM_ALPHA_BITS 0x0D5B -#define GL_ACCUM_CLEAR_VALUE 0x0B80 -#define GL_ACCUM 0x0100 -#define GL_ADD 0x0104 -#define GL_LOAD 0x0101 -#define GL_MULT 0x0103 -#define GL_RETURN 0x0102 - -/* Alpha testing */ -#define GL_ALPHA_TEST 0x0BC0 -#define GL_ALPHA_TEST_REF 0x0BC2 -#define GL_ALPHA_TEST_FUNC 0x0BC1 - -/* Blending */ -#define GL_BLEND 0x0BE2 -#define GL_BLEND_SRC 0x0BE1 -#define GL_BLEND_DST 0x0BE0 -#define GL_ZERO 0x0 -#define GL_ONE 0x1 -#define GL_SRC_COLOR 0x0300 -#define GL_ONE_MINUS_SRC_COLOR 0x0301 -#define GL_SRC_ALPHA 0x0302 -#define GL_ONE_MINUS_SRC_ALPHA 0x0303 -#define GL_DST_ALPHA 0x0304 -#define GL_ONE_MINUS_DST_ALPHA 0x0305 -#define GL_DST_COLOR 0x0306 -#define GL_ONE_MINUS_DST_COLOR 0x0307 -#define GL_SRC_ALPHA_SATURATE 0x0308 - -/* Render Mode */ -#define GL_FEEDBACK 0x1C01 -#define GL_RENDER 0x1C00 -#define GL_SELECT 0x1C02 - -/* Feedback */ -#define GL_2D 0x0600 -#define GL_3D 0x0601 -#define GL_3D_COLOR 0x0602 -#define GL_3D_COLOR_TEXTURE 0x0603 -#define GL_4D_COLOR_TEXTURE 0x0604 -#define GL_POINT_TOKEN 0x0701 -#define GL_LINE_TOKEN 0x0702 -#define GL_LINE_RESET_TOKEN 0x0707 -#define GL_POLYGON_TOKEN 0x0703 -#define GL_BITMAP_TOKEN 0x0704 -#define GL_DRAW_PIXEL_TOKEN 0x0705 -#define GL_COPY_PIXEL_TOKEN 0x0706 -#define GL_PASS_THROUGH_TOKEN 0x0700 -#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0 -#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1 -#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2 - -/* Selection */ -#define GL_SELECTION_BUFFER_POINTER 0x0DF3 -#define GL_SELECTION_BUFFER_SIZE 0x0DF4 - -/* Fog */ -#define GL_FOG 0x0B60 -#define GL_FOG_MODE 0x0B65 -#define GL_FOG_DENSITY 0x0B62 -#define GL_FOG_COLOR 0x0B66 -#define GL_FOG_INDEX 0x0B61 -#define GL_FOG_START 0x0B63 -#define GL_FOG_END 0x0B64 -#define GL_LINEAR 0x2601 -#define GL_EXP 0x0800 -#define GL_EXP2 0x0801 - -/* Logic Ops */ -#define GL_LOGIC_OP 0x0BF1 -#define GL_INDEX_LOGIC_OP 0x0BF1 -#define GL_COLOR_LOGIC_OP 0x0BF2 -#define GL_LOGIC_OP_MODE 0x0BF0 -#define GL_CLEAR 0x1500 -#define GL_SET 0x150F -#define GL_COPY 0x1503 -#define GL_COPY_INVERTED 0x150C -#define GL_NOOP 0x1505 -#define GL_INVERT 0x150A -#define GL_AND 0x1501 -#define GL_NAND 0x150E -#define GL_OR 0x1507 -#define GL_NOR 0x1508 -#define GL_XOR 0x1506 -#define GL_EQUIV 0x1509 -#define GL_AND_REVERSE 0x1502 -#define GL_AND_INVERTED 0x1504 -#define GL_OR_REVERSE 0x150B -#define GL_OR_INVERTED 0x150D - -/* Stencil */ -#define GL_STENCIL_BITS 0x0D57 -#define GL_STENCIL_TEST 0x0B90 -#define GL_STENCIL_CLEAR_VALUE 0x0B91 -#define GL_STENCIL_FUNC 0x0B92 -#define GL_STENCIL_VALUE_MASK 0x0B93 -#define GL_STENCIL_FAIL 0x0B94 -#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 -#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 -#define GL_STENCIL_REF 0x0B97 -#define GL_STENCIL_WRITEMASK 0x0B98 -#define GL_STENCIL_INDEX 0x1901 -#define GL_KEEP 0x1E00 -#define GL_REPLACE 0x1E01 -#define GL_INCR 0x1E02 -#define GL_DECR 0x1E03 - -/* Buffers, Pixel Drawing/Reading */ -#define GL_NONE 0x0 -#define GL_LEFT 0x0406 -#define GL_RIGHT 0x0407 -/*GL_FRONT 0x0404 */ -/*GL_BACK 0x0405 */ -/*GL_FRONT_AND_BACK 0x0408 */ -#define GL_FRONT_LEFT 0x0400 -#define GL_FRONT_RIGHT 0x0401 -#define GL_BACK_LEFT 0x0402 -#define GL_BACK_RIGHT 0x0403 -#define GL_AUX0 0x0409 -#define GL_AUX1 0x040A -#define GL_AUX2 0x040B -#define GL_AUX3 0x040C -#define GL_COLOR_INDEX 0x1900 -#define GL_RED 0x1903 -#define GL_GREEN 0x1904 -#define GL_BLUE 0x1905 -#define GL_ALPHA 0x1906 -#define GL_LUMINANCE 0x1909 -#define GL_LUMINANCE_ALPHA 0x190A -#define GL_ALPHA_BITS 0x0D55 -#define GL_RED_BITS 0x0D52 -#define GL_GREEN_BITS 0x0D53 -#define GL_BLUE_BITS 0x0D54 -#define GL_INDEX_BITS 0x0D51 -#define GL_SUBPIXEL_BITS 0x0D50 -#define GL_AUX_BUFFERS 0x0C00 -#define GL_READ_BUFFER 0x0C02 -#define GL_DRAW_BUFFER 0x0C01 -#define GL_DOUBLEBUFFER 0x0C32 -#define GL_STEREO 0x0C33 -#define GL_BITMAP 0x1A00 -#define GL_COLOR 0x1800 -#define GL_DEPTH 0x1801 -#define GL_STENCIL 0x1802 -#define GL_DITHER 0x0BD0 -#define GL_RGB 0x1907 -#define GL_RGBA 0x1908 - -/* Implementation limits */ -#define GL_MAX_LIST_NESTING 0x0B31 -#define GL_MAX_EVAL_ORDER 0x0D30 -#define GL_MAX_LIGHTS 0x0D31 -#define GL_MAX_CLIP_PLANES 0x0D32 -#define GL_MAX_TEXTURE_SIZE 0x0D33 -#define GL_MAX_PIXEL_MAP_TABLE 0x0D34 -#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35 -#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36 -#define GL_MAX_NAME_STACK_DEPTH 0x0D37 -#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38 -#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39 -#define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B - -/* Gets */ -#define GL_ATTRIB_STACK_DEPTH 0x0BB0 -#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1 -#define GL_COLOR_CLEAR_VALUE 0x0C22 -#define GL_COLOR_WRITEMASK 0x0C23 -#define GL_CURRENT_INDEX 0x0B01 -#define GL_CURRENT_COLOR 0x0B00 -#define GL_CURRENT_NORMAL 0x0B02 -#define GL_CURRENT_RASTER_COLOR 0x0B04 -#define GL_CURRENT_RASTER_DISTANCE 0x0B09 -#define GL_CURRENT_RASTER_INDEX 0x0B05 -#define GL_CURRENT_RASTER_POSITION 0x0B07 -#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06 -#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08 -#define GL_CURRENT_TEXTURE_COORDS 0x0B03 -#define GL_INDEX_CLEAR_VALUE 0x0C20 -#define GL_INDEX_MODE 0x0C30 -#define GL_INDEX_WRITEMASK 0x0C21 -#define GL_MODELVIEW_MATRIX 0x0BA6 -#define GL_MODELVIEW_STACK_DEPTH 0x0BA3 -#define GL_NAME_STACK_DEPTH 0x0D70 -#define GL_PROJECTION_MATRIX 0x0BA7 -#define GL_PROJECTION_STACK_DEPTH 0x0BA4 -#define GL_RENDER_MODE 0x0C40 -#define GL_RGBA_MODE 0x0C31 -#define GL_TEXTURE_MATRIX 0x0BA8 -#define GL_TEXTURE_STACK_DEPTH 0x0BA5 -#define GL_VIEWPORT 0x0BA2 - -/* Evaluators */ -#define GL_AUTO_NORMAL 0x0D80 -#define GL_MAP1_COLOR_4 0x0D90 -#define GL_MAP1_INDEX 0x0D91 -#define GL_MAP1_NORMAL 0x0D92 -#define GL_MAP1_TEXTURE_COORD_1 0x0D93 -#define GL_MAP1_TEXTURE_COORD_2 0x0D94 -#define GL_MAP1_TEXTURE_COORD_3 0x0D95 -#define GL_MAP1_TEXTURE_COORD_4 0x0D96 -#define GL_MAP1_VERTEX_3 0x0D97 -#define GL_MAP1_VERTEX_4 0x0D98 -#define GL_MAP2_COLOR_4 0x0DB0 -#define GL_MAP2_INDEX 0x0DB1 -#define GL_MAP2_NORMAL 0x0DB2 -#define GL_MAP2_TEXTURE_COORD_1 0x0DB3 -#define GL_MAP2_TEXTURE_COORD_2 0x0DB4 -#define GL_MAP2_TEXTURE_COORD_3 0x0DB5 -#define GL_MAP2_TEXTURE_COORD_4 0x0DB6 -#define GL_MAP2_VERTEX_3 0x0DB7 -#define GL_MAP2_VERTEX_4 0x0DB8 -#define GL_MAP1_GRID_DOMAIN 0x0DD0 -#define GL_MAP1_GRID_SEGMENTS 0x0DD1 -#define GL_MAP2_GRID_DOMAIN 0x0DD2 -#define GL_MAP2_GRID_SEGMENTS 0x0DD3 -#define GL_COEFF 0x0A00 -#define GL_ORDER 0x0A01 -#define GL_DOMAIN 0x0A02 - -/* Hints */ -#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 -#define GL_POINT_SMOOTH_HINT 0x0C51 -#define GL_LINE_SMOOTH_HINT 0x0C52 -#define GL_POLYGON_SMOOTH_HINT 0x0C53 -#define GL_FOG_HINT 0x0C54 -#define GL_DONT_CARE 0x1100 -#define GL_FASTEST 0x1101 -#define GL_NICEST 0x1102 - -/* Scissor box */ -#define GL_SCISSOR_BOX 0x0C10 -#define GL_SCISSOR_TEST 0x0C11 - -/* Pixel Mode / Transfer */ -#define GL_MAP_COLOR 0x0D10 -#define GL_MAP_STENCIL 0x0D11 -#define GL_INDEX_SHIFT 0x0D12 -#define GL_INDEX_OFFSET 0x0D13 -#define GL_RED_SCALE 0x0D14 -#define GL_RED_BIAS 0x0D15 -#define GL_GREEN_SCALE 0x0D18 -#define GL_GREEN_BIAS 0x0D19 -#define GL_BLUE_SCALE 0x0D1A -#define GL_BLUE_BIAS 0x0D1B -#define GL_ALPHA_SCALE 0x0D1C -#define GL_ALPHA_BIAS 0x0D1D -#define GL_DEPTH_SCALE 0x0D1E -#define GL_DEPTH_BIAS 0x0D1F -#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1 -#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0 -#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2 -#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3 -#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4 -#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5 -#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6 -#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7 -#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8 -#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9 -#define GL_PIXEL_MAP_S_TO_S 0x0C71 -#define GL_PIXEL_MAP_I_TO_I 0x0C70 -#define GL_PIXEL_MAP_I_TO_R 0x0C72 -#define GL_PIXEL_MAP_I_TO_G 0x0C73 -#define GL_PIXEL_MAP_I_TO_B 0x0C74 -#define GL_PIXEL_MAP_I_TO_A 0x0C75 -#define GL_PIXEL_MAP_R_TO_R 0x0C76 -#define GL_PIXEL_MAP_G_TO_G 0x0C77 -#define GL_PIXEL_MAP_B_TO_B 0x0C78 -#define GL_PIXEL_MAP_A_TO_A 0x0C79 -#define GL_PACK_ALIGNMENT 0x0D05 -#define GL_PACK_LSB_FIRST 0x0D01 -#define GL_PACK_ROW_LENGTH 0x0D02 -#define GL_PACK_SKIP_PIXELS 0x0D04 -#define GL_PACK_SKIP_ROWS 0x0D03 -#define GL_PACK_SWAP_BYTES 0x0D00 -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_UNPACK_LSB_FIRST 0x0CF1 -#define GL_UNPACK_ROW_LENGTH 0x0CF2 -#define GL_UNPACK_SKIP_PIXELS 0x0CF4 -#define GL_UNPACK_SKIP_ROWS 0x0CF3 -#define GL_UNPACK_SWAP_BYTES 0x0CF0 -#define GL_ZOOM_X 0x0D16 -#define GL_ZOOM_Y 0x0D17 - -/* Texture mapping */ -#define GL_TEXTURE_ENV 0x2300 -#define GL_TEXTURE_ENV_MODE 0x2200 -#define GL_TEXTURE_1D 0x0DE0 -#define GL_TEXTURE_2D 0x0DE1 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_ENV_COLOR 0x2201 -#define GL_TEXTURE_GEN_S 0x0C60 -#define GL_TEXTURE_GEN_T 0x0C61 -#define GL_TEXTURE_GEN_R 0x0C62 -#define GL_TEXTURE_GEN_Q 0x0C63 -#define GL_TEXTURE_GEN_MODE 0x2500 -#define GL_TEXTURE_BORDER_COLOR 0x1004 -#define GL_TEXTURE_WIDTH 0x1000 -#define GL_TEXTURE_HEIGHT 0x1001 -#define GL_TEXTURE_BORDER 0x1005 -#define GL_TEXTURE_COMPONENTS 0x1003 -#define GL_TEXTURE_RED_SIZE 0x805C -#define GL_TEXTURE_GREEN_SIZE 0x805D -#define GL_TEXTURE_BLUE_SIZE 0x805E -#define GL_TEXTURE_ALPHA_SIZE 0x805F -#define GL_TEXTURE_LUMINANCE_SIZE 0x8060 -#define GL_TEXTURE_INTENSITY_SIZE 0x8061 -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_NEAREST_MIPMAP_LINEAR 0x2702 -#define GL_LINEAR_MIPMAP_NEAREST 0x2701 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 -#define GL_OBJECT_LINEAR 0x2401 -#define GL_OBJECT_PLANE 0x2501 -#define GL_EYE_LINEAR 0x2400 -#define GL_EYE_PLANE 0x2502 -#define GL_SPHERE_MAP 0x2402 -#define GL_DECAL 0x2101 -#define GL_MODULATE 0x2100 -#define GL_NEAREST 0x2600 -#define GL_REPEAT 0x2901 -#define GL_CLAMP 0x2900 -#define GL_S 0x2000 -#define GL_T 0x2001 -#define GL_R 0x2002 -#define GL_Q 0x2003 - -/* Utility */ -#define GL_VENDOR 0x1F00 -#define GL_RENDERER 0x1F01 -#define GL_VERSION 0x1F02 -#define GL_EXTENSIONS 0x1F03 - -/* Errors */ -#define GL_NO_ERROR 0x0 -#define GL_INVALID_ENUM 0x0500 -#define GL_INVALID_VALUE 0x0501 -#define GL_INVALID_OPERATION 0x0502 -#define GL_STACK_OVERFLOW 0x0503 -#define GL_STACK_UNDERFLOW 0x0504 -#define GL_OUT_OF_MEMORY 0x0505 - -/* glPush/PopAttrib bits */ -#define GL_CURRENT_BIT 0x00000001 -#define GL_POINT_BIT 0x00000002 -#define GL_LINE_BIT 0x00000004 -#define GL_POLYGON_BIT 0x00000008 -#define GL_POLYGON_STIPPLE_BIT 0x00000010 -#define GL_PIXEL_MODE_BIT 0x00000020 -#define GL_LIGHTING_BIT 0x00000040 -#define GL_FOG_BIT 0x00000080 -#define GL_DEPTH_BUFFER_BIT 0x00000100 -#define GL_ACCUM_BUFFER_BIT 0x00000200 -#define GL_STENCIL_BUFFER_BIT 0x00000400 -#define GL_VIEWPORT_BIT 0x00000800 -#define GL_TRANSFORM_BIT 0x00001000 -#define GL_ENABLE_BIT 0x00002000 -#define GL_COLOR_BUFFER_BIT 0x00004000 -#define GL_HINT_BIT 0x00008000 -#define GL_EVAL_BIT 0x00010000 -#define GL_LIST_BIT 0x00020000 -#define GL_TEXTURE_BIT 0x00040000 -#define GL_SCISSOR_BIT 0x00080000 -#define GL_ALL_ATTRIB_BITS 0x000FFFFF - - -/* OpenGL 1.1 */ -#define GL_PROXY_TEXTURE_1D 0x8063 -#define GL_PROXY_TEXTURE_2D 0x8064 -#define GL_TEXTURE_PRIORITY 0x8066 -#define GL_TEXTURE_RESIDENT 0x8067 -#define GL_TEXTURE_BINDING_1D 0x8068 -#define GL_TEXTURE_BINDING_2D 0x8069 -#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 -#define GL_ALPHA4 0x803B -#define GL_ALPHA8 0x803C -#define GL_ALPHA12 0x803D -#define GL_ALPHA16 0x803E -#define GL_LUMINANCE4 0x803F -#define GL_LUMINANCE8 0x8040 -#define GL_LUMINANCE12 0x8041 -#define GL_LUMINANCE16 0x8042 -#define GL_LUMINANCE4_ALPHA4 0x8043 -#define GL_LUMINANCE6_ALPHA2 0x8044 -#define GL_LUMINANCE8_ALPHA8 0x8045 -#define GL_LUMINANCE12_ALPHA4 0x8046 -#define GL_LUMINANCE12_ALPHA12 0x8047 -#define GL_LUMINANCE16_ALPHA16 0x8048 -#define GL_INTENSITY 0x8049 -#define GL_INTENSITY4 0x804A -#define GL_INTENSITY8 0x804B -#define GL_INTENSITY12 0x804C -#define GL_INTENSITY16 0x804D -#define GL_R3_G3_B2 0x2A10 -#define GL_RGB4 0x804F -#define GL_RGB5 0x8050 -#define GL_RGB8 0x8051 -#define GL_RGB10 0x8052 -#define GL_RGB12 0x8053 -#define GL_RGB16 0x8054 -#define GL_RGBA2 0x8055 -#define GL_RGBA4 0x8056 -#define GL_RGB5_A1 0x8057 -#define GL_RGBA8 0x8058 -#define GL_RGB10_A2 0x8059 -#define GL_RGBA12 0x805A -#define GL_RGBA16 0x805B -#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001 -#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002 -#define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF -#define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF - - - -/* - * Miscellaneous - */ - -GLAPI void GLAPIENTRY glClearIndex( GLfloat c ); - -GLAPI void GLAPIENTRY glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ); - -GLAPI void GLAPIENTRY glClear( GLbitfield mask ); - -GLAPI void GLAPIENTRY glIndexMask( GLuint mask ); - -GLAPI void GLAPIENTRY glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ); - -GLAPI void GLAPIENTRY glAlphaFunc( GLenum func, GLclampf ref ); - -GLAPI void GLAPIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor ); - -GLAPI void GLAPIENTRY glLogicOp( GLenum opcode ); - -GLAPI void GLAPIENTRY glCullFace( GLenum mode ); - -GLAPI void GLAPIENTRY glFrontFace( GLenum mode ); - -GLAPI void GLAPIENTRY glPointSize( GLfloat size ); - -GLAPI void GLAPIENTRY glLineWidth( GLfloat width ); - -GLAPI void GLAPIENTRY glLineStipple( GLint factor, GLushort pattern ); - -GLAPI void GLAPIENTRY glPolygonMode( GLenum face, GLenum mode ); - -GLAPI void GLAPIENTRY glPolygonOffset( GLfloat factor, GLfloat units ); - -GLAPI void GLAPIENTRY glPolygonStipple( const GLubyte *mask ); - -GLAPI void GLAPIENTRY glGetPolygonStipple( GLubyte *mask ); - -GLAPI void GLAPIENTRY glEdgeFlag( GLboolean flag ); - -GLAPI void GLAPIENTRY glEdgeFlagv( const GLboolean *flag ); - -GLAPI void GLAPIENTRY glScissor( GLint x, GLint y, GLsizei width, GLsizei height); - -GLAPI void GLAPIENTRY glClipPlane( GLenum plane, const GLdouble *equation ); - -GLAPI void GLAPIENTRY glGetClipPlane( GLenum plane, GLdouble *equation ); - -GLAPI void GLAPIENTRY glDrawBuffer( GLenum mode ); - -GLAPI void GLAPIENTRY glReadBuffer( GLenum mode ); - -GLAPI void GLAPIENTRY glEnable( GLenum cap ); - -GLAPI void GLAPIENTRY glDisable( GLenum cap ); - -GLAPI GLboolean GLAPIENTRY glIsEnabled( GLenum cap ); - - -GLAPI void GLAPIENTRY glEnableClientState( GLenum cap ); /* 1.1 */ - -GLAPI void GLAPIENTRY glDisableClientState( GLenum cap ); /* 1.1 */ - - -GLAPI void GLAPIENTRY glGetBooleanv( GLenum pname, GLboolean *params ); - -GLAPI void GLAPIENTRY glGetDoublev( GLenum pname, GLdouble *params ); - -GLAPI void GLAPIENTRY glGetFloatv( GLenum pname, GLfloat *params ); - -GLAPI void GLAPIENTRY glGetIntegerv( GLenum pname, GLint *params ); - - -GLAPI void GLAPIENTRY glPushAttrib( GLbitfield mask ); - -GLAPI void GLAPIENTRY glPopAttrib( void ); - - -GLAPI void GLAPIENTRY glPushClientAttrib( GLbitfield mask ); /* 1.1 */ - -GLAPI void GLAPIENTRY glPopClientAttrib( void ); /* 1.1 */ - - -GLAPI GLint GLAPIENTRY glRenderMode( GLenum mode ); - -GLAPI GLenum GLAPIENTRY glGetError( void ); - -GLAPI const GLubyte * GLAPIENTRY glGetString( GLenum name ); - -GLAPI void GLAPIENTRY glFinish( void ); - -GLAPI void GLAPIENTRY glFlush( void ); - -GLAPI void GLAPIENTRY glHint( GLenum target, GLenum mode ); - - -/* - * Depth Buffer - */ - -GLAPI void GLAPIENTRY glClearDepth( GLclampd depth ); - -GLAPI void GLAPIENTRY glDepthFunc( GLenum func ); - -GLAPI void GLAPIENTRY glDepthMask( GLboolean flag ); - -GLAPI void GLAPIENTRY glDepthRange( GLclampd near_val, GLclampd far_val ); - - -/* - * Accumulation Buffer - */ - -GLAPI void GLAPIENTRY glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); - -GLAPI void GLAPIENTRY glAccum( GLenum op, GLfloat value ); - - -/* - * Transformation - */ - -GLAPI void GLAPIENTRY glMatrixMode( GLenum mode ); - -GLAPI void GLAPIENTRY glOrtho( GLdouble left, GLdouble right, - GLdouble bottom, GLdouble top, - GLdouble near_val, GLdouble far_val ); - -GLAPI void GLAPIENTRY glFrustum( GLdouble left, GLdouble right, - GLdouble bottom, GLdouble top, - GLdouble near_val, GLdouble far_val ); - -GLAPI void GLAPIENTRY glViewport( GLint x, GLint y, - GLsizei width, GLsizei height ); - -GLAPI void GLAPIENTRY glPushMatrix( void ); - -GLAPI void GLAPIENTRY glPopMatrix( void ); - -GLAPI void GLAPIENTRY glLoadIdentity( void ); - -GLAPI void GLAPIENTRY glLoadMatrixd( const GLdouble *m ); -GLAPI void GLAPIENTRY glLoadMatrixf( const GLfloat *m ); - -GLAPI void GLAPIENTRY glMultMatrixd( const GLdouble *m ); -GLAPI void GLAPIENTRY glMultMatrixf( const GLfloat *m ); - -GLAPI void GLAPIENTRY glRotated( GLdouble angle, - GLdouble x, GLdouble y, GLdouble z ); -GLAPI void GLAPIENTRY glRotatef( GLfloat angle, - GLfloat x, GLfloat y, GLfloat z ); - -GLAPI void GLAPIENTRY glScaled( GLdouble x, GLdouble y, GLdouble z ); -GLAPI void GLAPIENTRY glScalef( GLfloat x, GLfloat y, GLfloat z ); - -GLAPI void GLAPIENTRY glTranslated( GLdouble x, GLdouble y, GLdouble z ); -GLAPI void GLAPIENTRY glTranslatef( GLfloat x, GLfloat y, GLfloat z ); - - -/* - * Display Lists - */ - -GLAPI GLboolean GLAPIENTRY glIsList( GLuint list ); - -GLAPI void GLAPIENTRY glDeleteLists( GLuint list, GLsizei range ); - -GLAPI GLuint GLAPIENTRY glGenLists( GLsizei range ); - -GLAPI void GLAPIENTRY glNewList( GLuint list, GLenum mode ); - -GLAPI void GLAPIENTRY glEndList( void ); - -GLAPI void GLAPIENTRY glCallList( GLuint list ); - -GLAPI void GLAPIENTRY glCallLists( GLsizei n, GLenum type, - const GLvoid *lists ); - -GLAPI void GLAPIENTRY glListBase( GLuint base ); - - -/* - * Drawing Functions - */ - -GLAPI void GLAPIENTRY glBegin( GLenum mode ); - -GLAPI void GLAPIENTRY glEnd( void ); - - -GLAPI void GLAPIENTRY glVertex2d( GLdouble x, GLdouble y ); -GLAPI void GLAPIENTRY glVertex2f( GLfloat x, GLfloat y ); -GLAPI void GLAPIENTRY glVertex2i( GLint x, GLint y ); -GLAPI void GLAPIENTRY glVertex2s( GLshort x, GLshort y ); - -GLAPI void GLAPIENTRY glVertex3d( GLdouble x, GLdouble y, GLdouble z ); -GLAPI void GLAPIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z ); -GLAPI void GLAPIENTRY glVertex3i( GLint x, GLint y, GLint z ); -GLAPI void GLAPIENTRY glVertex3s( GLshort x, GLshort y, GLshort z ); - -GLAPI void GLAPIENTRY glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); -GLAPI void GLAPIENTRY glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); -GLAPI void GLAPIENTRY glVertex4i( GLint x, GLint y, GLint z, GLint w ); -GLAPI void GLAPIENTRY glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w ); - -GLAPI void GLAPIENTRY glVertex2dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glVertex2fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glVertex2iv( const GLint *v ); -GLAPI void GLAPIENTRY glVertex2sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glVertex3dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glVertex3fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glVertex3iv( const GLint *v ); -GLAPI void GLAPIENTRY glVertex3sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glVertex4dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glVertex4fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glVertex4iv( const GLint *v ); -GLAPI void GLAPIENTRY glVertex4sv( const GLshort *v ); - - -GLAPI void GLAPIENTRY glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz ); -GLAPI void GLAPIENTRY glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz ); -GLAPI void GLAPIENTRY glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz ); -GLAPI void GLAPIENTRY glNormal3i( GLint nx, GLint ny, GLint nz ); -GLAPI void GLAPIENTRY glNormal3s( GLshort nx, GLshort ny, GLshort nz ); - -GLAPI void GLAPIENTRY glNormal3bv( const GLbyte *v ); -GLAPI void GLAPIENTRY glNormal3dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glNormal3fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glNormal3iv( const GLint *v ); -GLAPI void GLAPIENTRY glNormal3sv( const GLshort *v ); - - -GLAPI void GLAPIENTRY glIndexd( GLdouble c ); -GLAPI void GLAPIENTRY glIndexf( GLfloat c ); -GLAPI void GLAPIENTRY glIndexi( GLint c ); -GLAPI void GLAPIENTRY glIndexs( GLshort c ); -GLAPI void GLAPIENTRY glIndexub( GLubyte c ); /* 1.1 */ - -GLAPI void GLAPIENTRY glIndexdv( const GLdouble *c ); -GLAPI void GLAPIENTRY glIndexfv( const GLfloat *c ); -GLAPI void GLAPIENTRY glIndexiv( const GLint *c ); -GLAPI void GLAPIENTRY glIndexsv( const GLshort *c ); -GLAPI void GLAPIENTRY glIndexubv( const GLubyte *c ); /* 1.1 */ - -GLAPI void GLAPIENTRY glColor3b( GLbyte red, GLbyte green, GLbyte blue ); -GLAPI void GLAPIENTRY glColor3d( GLdouble red, GLdouble green, GLdouble blue ); -GLAPI void GLAPIENTRY glColor3f( GLfloat red, GLfloat green, GLfloat blue ); -GLAPI void GLAPIENTRY glColor3i( GLint red, GLint green, GLint blue ); -GLAPI void GLAPIENTRY glColor3s( GLshort red, GLshort green, GLshort blue ); -GLAPI void GLAPIENTRY glColor3ub( GLubyte red, GLubyte green, GLubyte blue ); -GLAPI void GLAPIENTRY glColor3ui( GLuint red, GLuint green, GLuint blue ); -GLAPI void GLAPIENTRY glColor3us( GLushort red, GLushort green, GLushort blue ); - -GLAPI void GLAPIENTRY glColor4b( GLbyte red, GLbyte green, - GLbyte blue, GLbyte alpha ); -GLAPI void GLAPIENTRY glColor4d( GLdouble red, GLdouble green, - GLdouble blue, GLdouble alpha ); -GLAPI void GLAPIENTRY glColor4f( GLfloat red, GLfloat green, - GLfloat blue, GLfloat alpha ); -GLAPI void GLAPIENTRY glColor4i( GLint red, GLint green, - GLint blue, GLint alpha ); -GLAPI void GLAPIENTRY glColor4s( GLshort red, GLshort green, - GLshort blue, GLshort alpha ); -GLAPI void GLAPIENTRY glColor4ub( GLubyte red, GLubyte green, - GLubyte blue, GLubyte alpha ); -GLAPI void GLAPIENTRY glColor4ui( GLuint red, GLuint green, - GLuint blue, GLuint alpha ); -GLAPI void GLAPIENTRY glColor4us( GLushort red, GLushort green, - GLushort blue, GLushort alpha ); - - -GLAPI void GLAPIENTRY glColor3bv( const GLbyte *v ); -GLAPI void GLAPIENTRY glColor3dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glColor3fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glColor3iv( const GLint *v ); -GLAPI void GLAPIENTRY glColor3sv( const GLshort *v ); -GLAPI void GLAPIENTRY glColor3ubv( const GLubyte *v ); -GLAPI void GLAPIENTRY glColor3uiv( const GLuint *v ); -GLAPI void GLAPIENTRY glColor3usv( const GLushort *v ); - -GLAPI void GLAPIENTRY glColor4bv( const GLbyte *v ); -GLAPI void GLAPIENTRY glColor4dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glColor4fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glColor4iv( const GLint *v ); -GLAPI void GLAPIENTRY glColor4sv( const GLshort *v ); -GLAPI void GLAPIENTRY glColor4ubv( const GLubyte *v ); -GLAPI void GLAPIENTRY glColor4uiv( const GLuint *v ); -GLAPI void GLAPIENTRY glColor4usv( const GLushort *v ); - - -GLAPI void GLAPIENTRY glTexCoord1d( GLdouble s ); -GLAPI void GLAPIENTRY glTexCoord1f( GLfloat s ); -GLAPI void GLAPIENTRY glTexCoord1i( GLint s ); -GLAPI void GLAPIENTRY glTexCoord1s( GLshort s ); - -GLAPI void GLAPIENTRY glTexCoord2d( GLdouble s, GLdouble t ); -GLAPI void GLAPIENTRY glTexCoord2f( GLfloat s, GLfloat t ); -GLAPI void GLAPIENTRY glTexCoord2i( GLint s, GLint t ); -GLAPI void GLAPIENTRY glTexCoord2s( GLshort s, GLshort t ); - -GLAPI void GLAPIENTRY glTexCoord3d( GLdouble s, GLdouble t, GLdouble r ); -GLAPI void GLAPIENTRY glTexCoord3f( GLfloat s, GLfloat t, GLfloat r ); -GLAPI void GLAPIENTRY glTexCoord3i( GLint s, GLint t, GLint r ); -GLAPI void GLAPIENTRY glTexCoord3s( GLshort s, GLshort t, GLshort r ); - -GLAPI void GLAPIENTRY glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q ); -GLAPI void GLAPIENTRY glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q ); -GLAPI void GLAPIENTRY glTexCoord4i( GLint s, GLint t, GLint r, GLint q ); -GLAPI void GLAPIENTRY glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q ); - -GLAPI void GLAPIENTRY glTexCoord1dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glTexCoord1fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glTexCoord1iv( const GLint *v ); -GLAPI void GLAPIENTRY glTexCoord1sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glTexCoord2dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glTexCoord2fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glTexCoord2iv( const GLint *v ); -GLAPI void GLAPIENTRY glTexCoord2sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glTexCoord3dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glTexCoord3fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glTexCoord3iv( const GLint *v ); -GLAPI void GLAPIENTRY glTexCoord3sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glTexCoord4dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glTexCoord4fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glTexCoord4iv( const GLint *v ); -GLAPI void GLAPIENTRY glTexCoord4sv( const GLshort *v ); - - -GLAPI void GLAPIENTRY glRasterPos2d( GLdouble x, GLdouble y ); -GLAPI void GLAPIENTRY glRasterPos2f( GLfloat x, GLfloat y ); -GLAPI void GLAPIENTRY glRasterPos2i( GLint x, GLint y ); -GLAPI void GLAPIENTRY glRasterPos2s( GLshort x, GLshort y ); - -GLAPI void GLAPIENTRY glRasterPos3d( GLdouble x, GLdouble y, GLdouble z ); -GLAPI void GLAPIENTRY glRasterPos3f( GLfloat x, GLfloat y, GLfloat z ); -GLAPI void GLAPIENTRY glRasterPos3i( GLint x, GLint y, GLint z ); -GLAPI void GLAPIENTRY glRasterPos3s( GLshort x, GLshort y, GLshort z ); - -GLAPI void GLAPIENTRY glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); -GLAPI void GLAPIENTRY glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); -GLAPI void GLAPIENTRY glRasterPos4i( GLint x, GLint y, GLint z, GLint w ); -GLAPI void GLAPIENTRY glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w ); - -GLAPI void GLAPIENTRY glRasterPos2dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glRasterPos2fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glRasterPos2iv( const GLint *v ); -GLAPI void GLAPIENTRY glRasterPos2sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glRasterPos3dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glRasterPos3fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glRasterPos3iv( const GLint *v ); -GLAPI void GLAPIENTRY glRasterPos3sv( const GLshort *v ); - -GLAPI void GLAPIENTRY glRasterPos4dv( const GLdouble *v ); -GLAPI void GLAPIENTRY glRasterPos4fv( const GLfloat *v ); -GLAPI void GLAPIENTRY glRasterPos4iv( const GLint *v ); -GLAPI void GLAPIENTRY glRasterPos4sv( const GLshort *v ); - - -GLAPI void GLAPIENTRY glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 ); -GLAPI void GLAPIENTRY glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ); -GLAPI void GLAPIENTRY glRecti( GLint x1, GLint y1, GLint x2, GLint y2 ); -GLAPI void GLAPIENTRY glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 ); - - -GLAPI void GLAPIENTRY glRectdv( const GLdouble *v1, const GLdouble *v2 ); -GLAPI void GLAPIENTRY glRectfv( const GLfloat *v1, const GLfloat *v2 ); -GLAPI void GLAPIENTRY glRectiv( const GLint *v1, const GLint *v2 ); -GLAPI void GLAPIENTRY glRectsv( const GLshort *v1, const GLshort *v2 ); - - -/* - * Vertex Arrays (1.1) - */ - -GLAPI void GLAPIENTRY glVertexPointer( GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glNormalPointer( GLenum type, GLsizei stride, - const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glColorPointer( GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glIndexPointer( GLenum type, GLsizei stride, - const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glTexCoordPointer( GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr ); - -GLAPI void GLAPIENTRY glGetPointerv( GLenum pname, GLvoid **params ); - -GLAPI void GLAPIENTRY glArrayElement( GLint i ); - -GLAPI void GLAPIENTRY glDrawArrays( GLenum mode, GLint first, GLsizei count ); - -GLAPI void GLAPIENTRY glDrawElements( GLenum mode, GLsizei count, - GLenum type, const GLvoid *indices ); - -GLAPI void GLAPIENTRY glInterleavedArrays( GLenum format, GLsizei stride, - const GLvoid *pointer ); - -/* - * Lighting - */ - -GLAPI void GLAPIENTRY glShadeModel( GLenum mode ); - -GLAPI void GLAPIENTRY glLightf( GLenum light, GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glLighti( GLenum light, GLenum pname, GLint param ); -GLAPI void GLAPIENTRY glLightfv( GLenum light, GLenum pname, - const GLfloat *params ); -GLAPI void GLAPIENTRY glLightiv( GLenum light, GLenum pname, - const GLint *params ); - -GLAPI void GLAPIENTRY glGetLightfv( GLenum light, GLenum pname, - GLfloat *params ); -GLAPI void GLAPIENTRY glGetLightiv( GLenum light, GLenum pname, - GLint *params ); - -GLAPI void GLAPIENTRY glLightModelf( GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glLightModeli( GLenum pname, GLint param ); -GLAPI void GLAPIENTRY glLightModelfv( GLenum pname, const GLfloat *params ); -GLAPI void GLAPIENTRY glLightModeliv( GLenum pname, const GLint *params ); - -GLAPI void GLAPIENTRY glMaterialf( GLenum face, GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glMateriali( GLenum face, GLenum pname, GLint param ); -GLAPI void GLAPIENTRY glMaterialfv( GLenum face, GLenum pname, const GLfloat *params ); -GLAPI void GLAPIENTRY glMaterialiv( GLenum face, GLenum pname, const GLint *params ); - -GLAPI void GLAPIENTRY glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params ); -GLAPI void GLAPIENTRY glGetMaterialiv( GLenum face, GLenum pname, GLint *params ); - -GLAPI void GLAPIENTRY glColorMaterial( GLenum face, GLenum mode ); - - -/* - * Raster functions - */ - -GLAPI void GLAPIENTRY glPixelZoom( GLfloat xfactor, GLfloat yfactor ); - -GLAPI void GLAPIENTRY glPixelStoref( GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glPixelStorei( GLenum pname, GLint param ); - -GLAPI void GLAPIENTRY glPixelTransferf( GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glPixelTransferi( GLenum pname, GLint param ); - -GLAPI void GLAPIENTRY glPixelMapfv( GLenum map, GLsizei mapsize, - const GLfloat *values ); -GLAPI void GLAPIENTRY glPixelMapuiv( GLenum map, GLsizei mapsize, - const GLuint *values ); -GLAPI void GLAPIENTRY glPixelMapusv( GLenum map, GLsizei mapsize, - const GLushort *values ); - -GLAPI void GLAPIENTRY glGetPixelMapfv( GLenum map, GLfloat *values ); -GLAPI void GLAPIENTRY glGetPixelMapuiv( GLenum map, GLuint *values ); -GLAPI void GLAPIENTRY glGetPixelMapusv( GLenum map, GLushort *values ); - -GLAPI void GLAPIENTRY glBitmap( GLsizei width, GLsizei height, - GLfloat xorig, GLfloat yorig, - GLfloat xmove, GLfloat ymove, - const GLubyte *bitmap ); - -GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - GLvoid *pixels ); - -GLAPI void GLAPIENTRY glDrawPixels( GLsizei width, GLsizei height, - GLenum format, GLenum type, - const GLvoid *pixels ); - -GLAPI void GLAPIENTRY glCopyPixels( GLint x, GLint y, - GLsizei width, GLsizei height, - GLenum type ); - -/* - * Stenciling - */ - -GLAPI void GLAPIENTRY glStencilFunc( GLenum func, GLint ref, GLuint mask ); - -GLAPI void GLAPIENTRY glStencilMask( GLuint mask ); - -GLAPI void GLAPIENTRY glStencilOp( GLenum fail, GLenum zfail, GLenum zpass ); - -GLAPI void GLAPIENTRY glClearStencil( GLint s ); - - - -/* - * Texture mapping - */ - -GLAPI void GLAPIENTRY glTexGend( GLenum coord, GLenum pname, GLdouble param ); -GLAPI void GLAPIENTRY glTexGenf( GLenum coord, GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glTexGeni( GLenum coord, GLenum pname, GLint param ); - -GLAPI void GLAPIENTRY glTexGendv( GLenum coord, GLenum pname, const GLdouble *params ); -GLAPI void GLAPIENTRY glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params ); -GLAPI void GLAPIENTRY glTexGeniv( GLenum coord, GLenum pname, const GLint *params ); - -GLAPI void GLAPIENTRY glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params ); -GLAPI void GLAPIENTRY glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ); -GLAPI void GLAPIENTRY glGetTexGeniv( GLenum coord, GLenum pname, GLint *params ); - - -GLAPI void GLAPIENTRY glTexEnvf( GLenum target, GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glTexEnvi( GLenum target, GLenum pname, GLint param ); - -GLAPI void GLAPIENTRY glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params ); -GLAPI void GLAPIENTRY glTexEnviv( GLenum target, GLenum pname, const GLint *params ); - -GLAPI void GLAPIENTRY glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ); -GLAPI void GLAPIENTRY glGetTexEnviv( GLenum target, GLenum pname, GLint *params ); - - -GLAPI void GLAPIENTRY glTexParameterf( GLenum target, GLenum pname, GLfloat param ); -GLAPI void GLAPIENTRY glTexParameteri( GLenum target, GLenum pname, GLint param ); - -GLAPI void GLAPIENTRY glTexParameterfv( GLenum target, GLenum pname, - const GLfloat *params ); -GLAPI void GLAPIENTRY glTexParameteriv( GLenum target, GLenum pname, - const GLint *params ); - -GLAPI void GLAPIENTRY glGetTexParameterfv( GLenum target, - GLenum pname, GLfloat *params); -GLAPI void GLAPIENTRY glGetTexParameteriv( GLenum target, - GLenum pname, GLint *params ); - -GLAPI void GLAPIENTRY glGetTexLevelParameterfv( GLenum target, GLint level, - GLenum pname, GLfloat *params ); -GLAPI void GLAPIENTRY glGetTexLevelParameteriv( GLenum target, GLint level, - GLenum pname, GLint *params ); - - -GLAPI void GLAPIENTRY glTexImage1D( GLenum target, GLint level, - GLint internalFormat, - GLsizei width, GLint border, - GLenum format, GLenum type, - const GLvoid *pixels ); - -GLAPI void GLAPIENTRY glTexImage2D( GLenum target, GLint level, - GLint internalFormat, - GLsizei width, GLsizei height, - GLint border, GLenum format, GLenum type, - const GLvoid *pixels ); - -GLAPI void GLAPIENTRY glGetTexImage( GLenum target, GLint level, - GLenum format, GLenum type, - GLvoid *pixels ); - - -/* 1.1 functions */ - -GLAPI void GLAPIENTRY glGenTextures( GLsizei n, GLuint *textures ); - -GLAPI void GLAPIENTRY glDeleteTextures( GLsizei n, const GLuint *textures); - -GLAPI void GLAPIENTRY glBindTexture( GLenum target, GLuint texture ); - -GLAPI void GLAPIENTRY glPrioritizeTextures( GLsizei n, - const GLuint *textures, - const GLclampf *priorities ); - -GLAPI GLboolean GLAPIENTRY glAreTexturesResident( GLsizei n, - const GLuint *textures, - GLboolean *residences ); - -GLAPI GLboolean GLAPIENTRY glIsTexture( GLuint texture ); - - -GLAPI void GLAPIENTRY glTexSubImage1D( GLenum target, GLint level, - GLint xoffset, - GLsizei width, GLenum format, - GLenum type, const GLvoid *pixels ); - - -GLAPI void GLAPIENTRY glTexSubImage2D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const GLvoid *pixels ); - - -GLAPI void GLAPIENTRY glCopyTexImage1D( GLenum target, GLint level, - GLenum internalformat, - GLint x, GLint y, - GLsizei width, GLint border ); - - -GLAPI void GLAPIENTRY glCopyTexImage2D( GLenum target, GLint level, - GLenum internalformat, - GLint x, GLint y, - GLsizei width, GLsizei height, - GLint border ); - - -GLAPI void GLAPIENTRY glCopyTexSubImage1D( GLenum target, GLint level, - GLint xoffset, GLint x, GLint y, - GLsizei width ); - - -GLAPI void GLAPIENTRY glCopyTexSubImage2D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLint x, GLint y, - GLsizei width, GLsizei height ); - - -/* - * Evaluators - */ - -GLAPI void GLAPIENTRY glMap1d( GLenum target, GLdouble u1, GLdouble u2, - GLint stride, - GLint order, const GLdouble *points ); -GLAPI void GLAPIENTRY glMap1f( GLenum target, GLfloat u1, GLfloat u2, - GLint stride, - GLint order, const GLfloat *points ); - -GLAPI void GLAPIENTRY glMap2d( GLenum target, - GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, - GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, - const GLdouble *points ); -GLAPI void GLAPIENTRY glMap2f( GLenum target, - GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, - GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, - const GLfloat *points ); - -GLAPI void GLAPIENTRY glGetMapdv( GLenum target, GLenum query, GLdouble *v ); -GLAPI void GLAPIENTRY glGetMapfv( GLenum target, GLenum query, GLfloat *v ); -GLAPI void GLAPIENTRY glGetMapiv( GLenum target, GLenum query, GLint *v ); - -GLAPI void GLAPIENTRY glEvalCoord1d( GLdouble u ); -GLAPI void GLAPIENTRY glEvalCoord1f( GLfloat u ); - -GLAPI void GLAPIENTRY glEvalCoord1dv( const GLdouble *u ); -GLAPI void GLAPIENTRY glEvalCoord1fv( const GLfloat *u ); - -GLAPI void GLAPIENTRY glEvalCoord2d( GLdouble u, GLdouble v ); -GLAPI void GLAPIENTRY glEvalCoord2f( GLfloat u, GLfloat v ); - -GLAPI void GLAPIENTRY glEvalCoord2dv( const GLdouble *u ); -GLAPI void GLAPIENTRY glEvalCoord2fv( const GLfloat *u ); - -GLAPI void GLAPIENTRY glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 ); -GLAPI void GLAPIENTRY glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 ); - -GLAPI void GLAPIENTRY glMapGrid2d( GLint un, GLdouble u1, GLdouble u2, - GLint vn, GLdouble v1, GLdouble v2 ); -GLAPI void GLAPIENTRY glMapGrid2f( GLint un, GLfloat u1, GLfloat u2, - GLint vn, GLfloat v1, GLfloat v2 ); - -GLAPI void GLAPIENTRY glEvalPoint1( GLint i ); - -GLAPI void GLAPIENTRY glEvalPoint2( GLint i, GLint j ); - -GLAPI void GLAPIENTRY glEvalMesh1( GLenum mode, GLint i1, GLint i2 ); - -GLAPI void GLAPIENTRY glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ); - - -/* - * Fog - */ - -GLAPI void GLAPIENTRY glFogf( GLenum pname, GLfloat param ); - -GLAPI void GLAPIENTRY glFogi( GLenum pname, GLint param ); - -GLAPI void GLAPIENTRY glFogfv( GLenum pname, const GLfloat *params ); - -GLAPI void GLAPIENTRY glFogiv( GLenum pname, const GLint *params ); - - -/* - * Selection and Feedback - */ - -GLAPI void GLAPIENTRY glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ); - -GLAPI void GLAPIENTRY glPassThrough( GLfloat token ); - -GLAPI void GLAPIENTRY glSelectBuffer( GLsizei size, GLuint *buffer ); - -GLAPI void GLAPIENTRY glInitNames( void ); - -GLAPI void GLAPIENTRY glLoadName( GLuint name ); - -GLAPI void GLAPIENTRY glPushName( GLuint name ); - -GLAPI void GLAPIENTRY glPopName( void ); - - - -/* - * OpenGL 1.2 - */ - -#define GL_RESCALE_NORMAL 0x803A -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_MAX_ELEMENTS_VERTICES 0x80E8 -#define GL_MAX_ELEMENTS_INDICES 0x80E9 -#define GL_BGR 0x80E0 -#define GL_BGRA 0x80E1 -#define GL_UNSIGNED_BYTE_3_3_2 0x8032 -#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 -#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 -#define GL_UNSIGNED_INT_8_8_8_8 0x8035 -#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 -#define GL_UNSIGNED_INT_10_10_10_2 0x8036 -#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 -#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 -#define GL_SINGLE_COLOR 0x81F9 -#define GL_SEPARATE_SPECULAR_COLOR 0x81FA -#define GL_TEXTURE_MIN_LOD 0x813A -#define GL_TEXTURE_MAX_LOD 0x813B -#define GL_TEXTURE_BASE_LEVEL 0x813C -#define GL_TEXTURE_MAX_LEVEL 0x813D -#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 -#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 -#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 -#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 -#define GL_ALIASED_POINT_SIZE_RANGE 0x846D -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#define GL_PACK_SKIP_IMAGES 0x806B -#define GL_PACK_IMAGE_HEIGHT 0x806C -#define GL_UNPACK_SKIP_IMAGES 0x806D -#define GL_UNPACK_IMAGE_HEIGHT 0x806E -#define GL_TEXTURE_3D 0x806F -#define GL_PROXY_TEXTURE_3D 0x8070 -#define GL_TEXTURE_DEPTH 0x8071 -#define GL_TEXTURE_WRAP_R 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE 0x8073 -#define GL_TEXTURE_BINDING_3D 0x806A - -GLAPI void GLAPIENTRY glDrawRangeElements( GLenum mode, GLuint start, - GLuint end, GLsizei count, GLenum type, const GLvoid *indices ); - -GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level, - GLint internalFormat, - GLsizei width, GLsizei height, - GLsizei depth, GLint border, - GLenum format, GLenum type, - const GLvoid *pixels ); - -GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, - GLenum format, - GLenum type, const GLvoid *pixels); - -GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLint zoffset, GLint x, - GLint y, GLsizei width, - GLsizei height ); - -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); - - -/* - * GL_ARB_imaging - */ - -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_COLOR_TABLE 0x80D0 -#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 -#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 -#define GL_PROXY_COLOR_TABLE 0x80D3 -#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 -#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 -#define GL_COLOR_TABLE_SCALE 0x80D6 -#define GL_COLOR_TABLE_BIAS 0x80D7 -#define GL_COLOR_TABLE_FORMAT 0x80D8 -#define GL_COLOR_TABLE_WIDTH 0x80D9 -#define GL_COLOR_TABLE_RED_SIZE 0x80DA -#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB -#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC -#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD -#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE -#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF -#define GL_CONVOLUTION_1D 0x8010 -#define GL_CONVOLUTION_2D 0x8011 -#define GL_SEPARABLE_2D 0x8012 -#define GL_CONVOLUTION_BORDER_MODE 0x8013 -#define GL_CONVOLUTION_FILTER_SCALE 0x8014 -#define GL_CONVOLUTION_FILTER_BIAS 0x8015 -#define GL_REDUCE 0x8016 -#define GL_CONVOLUTION_FORMAT 0x8017 -#define GL_CONVOLUTION_WIDTH 0x8018 -#define GL_CONVOLUTION_HEIGHT 0x8019 -#define GL_MAX_CONVOLUTION_WIDTH 0x801A -#define GL_MAX_CONVOLUTION_HEIGHT 0x801B -#define GL_POST_CONVOLUTION_RED_SCALE 0x801C -#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D -#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E -#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F -#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 -#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 -#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 -#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 -#define GL_CONSTANT_BORDER 0x8151 -#define GL_REPLICATE_BORDER 0x8153 -#define GL_CONVOLUTION_BORDER_COLOR 0x8154 -#define GL_COLOR_MATRIX 0x80B1 -#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 -#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 -#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 -#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 -#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 -#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 -#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 -#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 -#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA -#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB -#define GL_HISTOGRAM 0x8024 -#define GL_PROXY_HISTOGRAM 0x8025 -#define GL_HISTOGRAM_WIDTH 0x8026 -#define GL_HISTOGRAM_FORMAT 0x8027 -#define GL_HISTOGRAM_RED_SIZE 0x8028 -#define GL_HISTOGRAM_GREEN_SIZE 0x8029 -#define GL_HISTOGRAM_BLUE_SIZE 0x802A -#define GL_HISTOGRAM_ALPHA_SIZE 0x802B -#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C -#define GL_HISTOGRAM_SINK 0x802D -#define GL_MINMAX 0x802E -#define GL_MINMAX_FORMAT 0x802F -#define GL_MINMAX_SINK 0x8030 -#define GL_TABLE_TOO_LARGE 0x8031 -#define GL_BLEND_EQUATION 0x8009 -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 -#define GL_FUNC_ADD 0x8006 -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B -#define GL_BLEND_COLOR 0x8005 - - -GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat, - GLsizei width, GLenum format, - GLenum type, const GLvoid *table ); - -GLAPI void GLAPIENTRY glColorSubTable( GLenum target, - GLsizei start, GLsizei count, - GLenum format, GLenum type, - const GLvoid *data ); - -GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname, - const GLint *params); - -GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname, - const GLfloat *params); - -GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start, - GLint x, GLint y, GLsizei width ); - -GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat, - GLint x, GLint y, GLsizei width ); - -GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format, - GLenum type, GLvoid *table ); - -GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname, - GLfloat *params ); - -GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname, - GLint *params ); - -GLAPI void GLAPIENTRY glBlendEquation( GLenum mode ); - -GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green, - GLclampf blue, GLclampf alpha ); - -GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width, - GLenum internalformat, GLboolean sink ); - -GLAPI void GLAPIENTRY glResetHistogram( GLenum target ); - -GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset, - GLenum format, GLenum type, - GLvoid *values ); - -GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname, - GLfloat *params ); - -GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname, - GLint *params ); - -GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat, - GLboolean sink ); - -GLAPI void GLAPIENTRY glResetMinmax( GLenum target ); - -GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset, - GLenum format, GLenum types, - GLvoid *values ); - -GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname, - GLfloat *params ); - -GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname, - GLint *params ); - -GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target, - GLenum internalformat, GLsizei width, GLenum format, GLenum type, - const GLvoid *image ); - -GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target, - GLenum internalformat, GLsizei width, GLsizei height, GLenum format, - GLenum type, const GLvoid *image ); - -GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname, - GLfloat params ); - -GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname, - const GLfloat *params ); - -GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname, - GLint params ); - -GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname, - const GLint *params ); - -GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target, - GLenum internalformat, GLint x, GLint y, GLsizei width ); - -GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target, - GLenum internalformat, GLint x, GLint y, GLsizei width, - GLsizei height); - -GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format, - GLenum type, GLvoid *image ); - -GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname, - GLfloat *params ); - -GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname, - GLint *params ); - -GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target, - GLenum internalformat, GLsizei width, GLsizei height, GLenum format, - GLenum type, const GLvoid *row, const GLvoid *column ); - -GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format, - GLenum type, GLvoid *row, GLvoid *column, GLvoid *span ); - -typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); - - - -/* - * OpenGL 1.3 - */ - -/* multitexture */ -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 -#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 -#define GL_MAX_TEXTURE_UNITS 0x84E2 -/* texture_cube_map */ -#define GL_NORMAL_MAP 0x8511 -#define GL_REFLECTION_MAP 0x8512 -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C -/* texture_compression */ -#define GL_COMPRESSED_ALPHA 0x84E9 -#define GL_COMPRESSED_LUMINANCE 0x84EA -#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB -#define GL_COMPRESSED_INTENSITY 0x84EC -#define GL_COMPRESSED_RGB 0x84ED -#define GL_COMPRESSED_RGBA 0x84EE -#define GL_TEXTURE_COMPRESSION_HINT 0x84EF -#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 -#define GL_TEXTURE_COMPRESSED 0x86A1 -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 -/* multisample */ -#define GL_MULTISAMPLE 0x809D -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE 0x809F -#define GL_SAMPLE_COVERAGE 0x80A0 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB -#define GL_MULTISAMPLE_BIT 0x20000000 -/* transpose_matrix */ -#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 -#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 -#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 -#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 -/* texture_env_combine */ -#define GL_COMBINE 0x8570 -#define GL_COMBINE_RGB 0x8571 -#define GL_COMBINE_ALPHA 0x8572 -#define GL_SOURCE0_RGB 0x8580 -#define GL_SOURCE1_RGB 0x8581 -#define GL_SOURCE2_RGB 0x8582 -#define GL_SOURCE0_ALPHA 0x8588 -#define GL_SOURCE1_ALPHA 0x8589 -#define GL_SOURCE2_ALPHA 0x858A -#define GL_OPERAND0_RGB 0x8590 -#define GL_OPERAND1_RGB 0x8591 -#define GL_OPERAND2_RGB 0x8592 -#define GL_OPERAND0_ALPHA 0x8598 -#define GL_OPERAND1_ALPHA 0x8599 -#define GL_OPERAND2_ALPHA 0x859A -#define GL_RGB_SCALE 0x8573 -#define GL_ADD_SIGNED 0x8574 -#define GL_INTERPOLATE 0x8575 -#define GL_SUBTRACT 0x84E7 -#define GL_CONSTANT 0x8576 -#define GL_PRIMARY_COLOR 0x8577 -#define GL_PREVIOUS 0x8578 -/* texture_env_dot3 */ -#define GL_DOT3_RGB 0x86AE -#define GL_DOT3_RGBA 0x86AF -/* texture_border_clamp */ -#define GL_CLAMP_TO_BORDER 0x812D - -GLAPI void GLAPIENTRY glActiveTexture( GLenum texture ); - -GLAPI void GLAPIENTRY glClientActiveTexture( GLenum texture ); - -GLAPI void GLAPIENTRY glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data ); - -GLAPI void GLAPIENTRY glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ); - -GLAPI void GLAPIENTRY glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data ); - -GLAPI void GLAPIENTRY glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data ); - -GLAPI void GLAPIENTRY glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ); - -GLAPI void GLAPIENTRY glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data ); - -GLAPI void GLAPIENTRY glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img ); - -GLAPI void GLAPIENTRY glMultiTexCoord1d( GLenum target, GLdouble s ); - -GLAPI void GLAPIENTRY glMultiTexCoord1dv( GLenum target, const GLdouble *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord1f( GLenum target, GLfloat s ); - -GLAPI void GLAPIENTRY glMultiTexCoord1fv( GLenum target, const GLfloat *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord1i( GLenum target, GLint s ); - -GLAPI void GLAPIENTRY glMultiTexCoord1iv( GLenum target, const GLint *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord1s( GLenum target, GLshort s ); - -GLAPI void GLAPIENTRY glMultiTexCoord1sv( GLenum target, const GLshort *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t ); - -GLAPI void GLAPIENTRY glMultiTexCoord2dv( GLenum target, const GLdouble *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t ); - -GLAPI void GLAPIENTRY glMultiTexCoord2fv( GLenum target, const GLfloat *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord2i( GLenum target, GLint s, GLint t ); - -GLAPI void GLAPIENTRY glMultiTexCoord2iv( GLenum target, const GLint *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord2s( GLenum target, GLshort s, GLshort t ); - -GLAPI void GLAPIENTRY glMultiTexCoord2sv( GLenum target, const GLshort *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r ); - -GLAPI void GLAPIENTRY glMultiTexCoord3dv( GLenum target, const GLdouble *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r ); - -GLAPI void GLAPIENTRY glMultiTexCoord3fv( GLenum target, const GLfloat *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r ); - -GLAPI void GLAPIENTRY glMultiTexCoord3iv( GLenum target, const GLint *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r ); - -GLAPI void GLAPIENTRY glMultiTexCoord3sv( GLenum target, const GLshort *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q ); - -GLAPI void GLAPIENTRY glMultiTexCoord4dv( GLenum target, const GLdouble *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ); - -GLAPI void GLAPIENTRY glMultiTexCoord4fv( GLenum target, const GLfloat *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q ); - -GLAPI void GLAPIENTRY glMultiTexCoord4iv( GLenum target, const GLint *v ); - -GLAPI void GLAPIENTRY glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q ); - -GLAPI void GLAPIENTRY glMultiTexCoord4sv( GLenum target, const GLshort *v ); - - -GLAPI void GLAPIENTRY glLoadTransposeMatrixd( const GLdouble m[16] ); - -GLAPI void GLAPIENTRY glLoadTransposeMatrixf( const GLfloat m[16] ); - -GLAPI void GLAPIENTRY glMultTransposeMatrixd( const GLdouble m[16] ); - -GLAPI void GLAPIENTRY glMultTransposeMatrixf( const GLfloat m[16] ); - -GLAPI void GLAPIENTRY glSampleCoverage( GLclampf value, GLboolean invert ); - - -typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img); - - - -/* - * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1) - */ -#ifndef GL_ARB_multitexture -#define GL_ARB_multitexture 1 - -#define GL_TEXTURE0_ARB 0x84C0 -#define GL_TEXTURE1_ARB 0x84C1 -#define GL_TEXTURE2_ARB 0x84C2 -#define GL_TEXTURE3_ARB 0x84C3 -#define GL_TEXTURE4_ARB 0x84C4 -#define GL_TEXTURE5_ARB 0x84C5 -#define GL_TEXTURE6_ARB 0x84C6 -#define GL_TEXTURE7_ARB 0x84C7 -#define GL_TEXTURE8_ARB 0x84C8 -#define GL_TEXTURE9_ARB 0x84C9 -#define GL_TEXTURE10_ARB 0x84CA -#define GL_TEXTURE11_ARB 0x84CB -#define GL_TEXTURE12_ARB 0x84CC -#define GL_TEXTURE13_ARB 0x84CD -#define GL_TEXTURE14_ARB 0x84CE -#define GL_TEXTURE15_ARB 0x84CF -#define GL_TEXTURE16_ARB 0x84D0 -#define GL_TEXTURE17_ARB 0x84D1 -#define GL_TEXTURE18_ARB 0x84D2 -#define GL_TEXTURE19_ARB 0x84D3 -#define GL_TEXTURE20_ARB 0x84D4 -#define GL_TEXTURE21_ARB 0x84D5 -#define GL_TEXTURE22_ARB 0x84D6 -#define GL_TEXTURE23_ARB 0x84D7 -#define GL_TEXTURE24_ARB 0x84D8 -#define GL_TEXTURE25_ARB 0x84D9 -#define GL_TEXTURE26_ARB 0x84DA -#define GL_TEXTURE27_ARB 0x84DB -#define GL_TEXTURE28_ARB 0x84DC -#define GL_TEXTURE29_ARB 0x84DD -#define GL_TEXTURE30_ARB 0x84DE -#define GL_TEXTURE31_ARB 0x84DF -#define GL_ACTIVE_TEXTURE_ARB 0x84E0 -#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 -#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 - -GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture); -GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture); -GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s); -GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v); -GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s); -GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v); -GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s); -GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v); -GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s); -GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v); -GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t); -GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v); -GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t); -GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v); -GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t); -GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v); -GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t); -GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v); -GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r); -GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v); -GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r); -GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v); -GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r); -GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v); -GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r); -GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v); -GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v); -GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v); -GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q); -GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v); -GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v); - -typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); - -#endif /* GL_ARB_multitexture */ - - - -/* - * Define this token if you want "old-style" header file behaviour (extensions - * defined in gl.h). Otherwise, extensions will be included from glext.h. - */ -#if defined(GL_GLEXT_LEGACY) - -/* All extensions that used to be here are now found in glext.h */ - -#else /* GL_GLEXT_LEGACY */ - -#include - -#endif /* GL_GLEXT_LEGACY */ - - - -#if GL_ARB_shader_objects - -#ifndef GL_MESA_shader_debug -#define GL_MESA_shader_debug 1 - -#define GL_DEBUG_OBJECT_MESA 0x8759 -#define GL_DEBUG_PRINT_MESA 0x875A -#define GL_DEBUG_ASSERT_MESA 0x875B - -GLAPI GLhandleARB GLAPIENTRY glCreateDebugObjectMESA (void); -GLAPI void GLAPIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType); -GLAPI void GLAPIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength, - GLsizei *length, GLcharARB *debugLog); -GLAPI GLsizei GLAPIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType); - -#endif /* GL_MESA_shader_debug */ - -#endif /* GL_ARB_shader_objects */ - - -/* - * ???. GL_MESA_packed_depth_stencil - * XXX obsolete - */ -#ifndef GL_MESA_packed_depth_stencil -#define GL_MESA_packed_depth_stencil 1 - -#define GL_DEPTH_STENCIL_MESA 0x8750 -#define GL_UNSIGNED_INT_24_8_MESA 0x8751 -#define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752 -#define GL_UNSIGNED_SHORT_15_1_MESA 0x8753 -#define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754 - -#endif /* GL_MESA_packed_depth_stencil */ - - -#ifndef GL_MESA_program_debug -#define GL_MESA_program_debug 1 - -#define GL_FRAGMENT_PROGRAM_POSITION_MESA 0x8bb0 -#define GL_FRAGMENT_PROGRAM_CALLBACK_MESA 0x8bb1 -#define GL_FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA 0x8bb2 -#define GL_FRAGMENT_PROGRAM_CALLBACK_DATA_MESA 0x8bb3 -#define GL_VERTEX_PROGRAM_POSITION_MESA 0x8bb4 -#define GL_VERTEX_PROGRAM_CALLBACK_MESA 0x8bb5 -#define GL_VERTEX_PROGRAM_CALLBACK_FUNC_MESA 0x8bb6 -#define GL_VERTEX_PROGRAM_CALLBACK_DATA_MESA 0x8bb7 - -typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data); - -GLAPI void GLAPIENTRY glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data); - -GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v); - -#endif /* GL_MESA_program_debug */ - - -#ifndef GL_MESA_texture_array -#define GL_MESA_texture_array 1 - -/* GL_MESA_texture_array uses the same enum values as GL_EXT_texture_array. - */ -#ifndef GL_EXT_texture_array - -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFramebufferTextureLayerEXT(GLenum target, - GLenum attachment, GLuint texture, GLint level, GLint layer); -#endif /* GL_GLEXT_PROTOTYPES */ - -#if 0 -/* (temporarily) disabled because of collision with typedef in glext.h - * that happens if apps include both gl.h and glext.h - */ -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, - GLenum attachment, GLuint texture, GLint level, GLint layer); -#endif - -#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 -#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 -#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A -#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B -#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C -#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D -#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 -#endif - -#endif - - -#ifndef GL_ATI_blend_equation_separate -#define GL_ATI_blend_equation_separate 1 - -#define GL_ALPHA_BLEND_EQUATION_ATI 0x883D - -GLAPI void GLAPIENTRY glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA ); -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA); - -#endif /* GL_ATI_blend_equation_separate */ - - -/* GL_OES_EGL_image */ -#ifndef GL_OES_EGL_image -typedef void* GLeglImageOES; -#endif - -#ifndef GL_OES_EGL_image -#define GL_OES_EGL_image 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); -GLAPI void APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); -#endif -typedef void (APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); -typedef void (APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); -#endif - - -/** - ** NOTE!!!!! If you add new functions to this file, or update - ** glext.h be sure to regenerate the gl_mangle.h file. See comments - ** in that file for details. - **/ - - - -/********************************************************************** - * Begin system-specific stuff - */ -#if defined(PRAGMA_EXPORT_SUPPORTED) -#pragma export off -#endif - -#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED -#pragma import off -#endif -/* - * End system-specific stuff - **********************************************************************/ - - -#ifdef __cplusplus -} -#endif - -#endif /* __gl_h_ */ diff --git a/dll/opengl/mesa/include/GL/gl_mangle.h b/dll/opengl/mesa/include/GL/gl_mangle.h deleted file mode 100644 index 36848033817..00000000000 --- a/dll/opengl/mesa/include/GL/gl_mangle.h +++ /dev/null @@ -1,2311 +0,0 @@ -#if 0 -#define GL_MANGLE_C1 "DO NOT EDIT!!! - TO REGENERATE from gl.h, EXECUTE THIS FILE IN SHELL (/bin/sh) and save the output" -#define GL_MANGLE_C2 "This file is used to create GL function protypes and aliases for the function names" - files="gl.h glext.h" -#define GL_MANGLE_C3 "get regeneration header - copy everything in this file above the 'REGENERATE_TO_END' line" - awk '!done; /^\/\*REGENERATE_TO_END/ {done=1}' $0 - echo "" -#define GL_MANGLE_C4 get aliases - grep '^GLAPI' $files | sed -e 's/.*ENTRY gl\([^( ]*\).*$/#define gl\1 MANGLE(\1)/' | sort | uniq - echo "" - echo "#endif /* GL_MANGLE_H */" - exit -#endif /* REGENERATION */ - -/* - * If you compile Mesa with USE_MGL_NAMESPACE defined then you can link - * your application both with OpenGL and Mesa. The Mesa functions will - * be redefined so they are prefixed with "mgl" instead of "gl". - * Mgl contributed by Randy Frank (rfrank@rsinc.com) - * Regneration code contributed by Ray Tice (rayt@ma.ultra.net) - */ - -#ifndef GL_MANGLE_H -#define GL_MANGLE_H - -#ifndef MANGLE -#define MANGLE(x) mgl##x -#endif /*MANGLE*/ - -/*REGENERATE_TO_END-----------ALL LINES BELOW HERE GET REPLACED ON REGENERATION */ - -#define glAccum MANGLE(Accum) -#define glActiveProgramEXT MANGLE(ActiveProgramEXT) -#define glActiveShaderProgram MANGLE(ActiveShaderProgram) -#define glActiveStencilFaceEXT MANGLE(ActiveStencilFaceEXT) -#define glActiveTextureARB MANGLE(ActiveTextureARB) -#define glActiveTexture MANGLE(ActiveTexture) -#define glActiveVaryingNV MANGLE(ActiveVaryingNV) -#define glAlphaFragmentOp1ATI MANGLE(AlphaFragmentOp1ATI) -#define glAlphaFragmentOp2ATI MANGLE(AlphaFragmentOp2ATI) -#define glAlphaFragmentOp3ATI MANGLE(AlphaFragmentOp3ATI) -#define glAlphaFunc MANGLE(AlphaFunc) -#define glApplyTextureEXT MANGLE(ApplyTextureEXT) -#define glAreProgramsResidentNV MANGLE(AreProgramsResidentNV) -#define glAreTexturesResidentEXT MANGLE(AreTexturesResidentEXT) -#define glAreTexturesResident MANGLE(AreTexturesResident) -#define glArrayElementEXT MANGLE(ArrayElementEXT) -#define glArrayElement MANGLE(ArrayElement) -#define glArrayObjectATI MANGLE(ArrayObjectATI) -#define glAsyncMarkerSGIX MANGLE(AsyncMarkerSGIX) -#define glAttachObjectARB MANGLE(AttachObjectARB) -#define glAttachShader MANGLE(AttachShader) -#define glBeginConditionalRender MANGLE(BeginConditionalRender) -#define glBeginConditionalRenderNV MANGLE(BeginConditionalRenderNV) -#define glBeginFragmentShaderATI MANGLE(BeginFragmentShaderATI) -#define glBegin MANGLE(Begin) -#define glBeginOcclusionQueryNV MANGLE(BeginOcclusionQueryNV) -#define glBeginPerfMonitorAMD MANGLE(BeginPerfMonitorAMD) -#define glBeginQueryARB MANGLE(BeginQueryARB) -#define glBeginQueryIndexed MANGLE(BeginQueryIndexed) -#define glBeginQuery MANGLE(BeginQuery) -#define glBeginTransformFeedbackEXT MANGLE(BeginTransformFeedbackEXT) -#define glBeginTransformFeedback MANGLE(BeginTransformFeedback) -#define glBeginTransformFeedbackNV MANGLE(BeginTransformFeedbackNV) -#define glBeginVertexShaderEXT MANGLE(BeginVertexShaderEXT) -#define glBeginVideoCaptureNV MANGLE(BeginVideoCaptureNV) -#define glBindAttribLocationARB MANGLE(BindAttribLocationARB) -#define glBindAttribLocation MANGLE(BindAttribLocation) -#define glBindBufferARB MANGLE(BindBufferARB) -#define glBindBufferBaseEXT MANGLE(BindBufferBaseEXT) -#define glBindBufferBase MANGLE(BindBufferBase) -#define glBindBufferBaseNV MANGLE(BindBufferBaseNV) -#define glBindBuffer MANGLE(BindBuffer) -#define glBindBufferOffsetEXT MANGLE(BindBufferOffsetEXT) -#define glBindBufferOffsetNV MANGLE(BindBufferOffsetNV) -#define glBindBufferRangeEXT MANGLE(BindBufferRangeEXT) -#define glBindBufferRange MANGLE(BindBufferRange) -#define glBindBufferRangeNV MANGLE(BindBufferRangeNV) -#define glBindFragDataLocationEXT MANGLE(BindFragDataLocationEXT) -#define glBindFragDataLocationIndexed MANGLE(BindFragDataLocationIndexed) -#define glBindFragDataLocation MANGLE(BindFragDataLocation) -#define glBindFragmentShaderATI MANGLE(BindFragmentShaderATI) -#define glBindFramebufferEXT MANGLE(BindFramebufferEXT) -#define glBindFramebuffer MANGLE(BindFramebuffer) -#define glBindImageTextureEXT MANGLE(BindImageTextureEXT) -#define glBindLightParameterEXT MANGLE(BindLightParameterEXT) -#define glBindMaterialParameterEXT MANGLE(BindMaterialParameterEXT) -#define glBindMultiTextureEXT MANGLE(BindMultiTextureEXT) -#define glBindParameterEXT MANGLE(BindParameterEXT) -#define glBindProgramARB MANGLE(BindProgramARB) -#define glBindProgramNV MANGLE(BindProgramNV) -#define glBindProgramPipeline MANGLE(BindProgramPipeline) -#define glBindRenderbufferEXT MANGLE(BindRenderbufferEXT) -#define glBindRenderbuffer MANGLE(BindRenderbuffer) -#define glBindSampler MANGLE(BindSampler) -#define glBindTexGenParameterEXT MANGLE(BindTexGenParameterEXT) -#define glBindTextureEXT MANGLE(BindTextureEXT) -#define glBindTexture MANGLE(BindTexture) -#define glBindTextureUnitParameterEXT MANGLE(BindTextureUnitParameterEXT) -#define glBindTransformFeedback MANGLE(BindTransformFeedback) -#define glBindTransformFeedbackNV MANGLE(BindTransformFeedbackNV) -#define glBindVertexArrayAPPLE MANGLE(BindVertexArrayAPPLE) -#define glBindVertexArray MANGLE(BindVertexArray) -#define glBindVertexShaderEXT MANGLE(BindVertexShaderEXT) -#define glBindVideoCaptureStreamBufferNV MANGLE(BindVideoCaptureStreamBufferNV) -#define glBindVideoCaptureStreamTextureNV MANGLE(BindVideoCaptureStreamTextureNV) -#define glBinormal3bEXT MANGLE(Binormal3bEXT) -#define glBinormal3bvEXT MANGLE(Binormal3bvEXT) -#define glBinormal3dEXT MANGLE(Binormal3dEXT) -#define glBinormal3dvEXT MANGLE(Binormal3dvEXT) -#define glBinormal3fEXT MANGLE(Binormal3fEXT) -#define glBinormal3fvEXT MANGLE(Binormal3fvEXT) -#define glBinormal3iEXT MANGLE(Binormal3iEXT) -#define glBinormal3ivEXT MANGLE(Binormal3ivEXT) -#define glBinormal3sEXT MANGLE(Binormal3sEXT) -#define glBinormal3svEXT MANGLE(Binormal3svEXT) -#define glBinormalPointerEXT MANGLE(BinormalPointerEXT) -#define glBitmap MANGLE(Bitmap) -#define glBlendColorEXT MANGLE(BlendColorEXT) -#define glBlendColor MANGLE(BlendColor) -#define glBlendEquationEXT MANGLE(BlendEquationEXT) -#define glBlendEquationiARB MANGLE(BlendEquationiARB) -#define glBlendEquationi MANGLE(BlendEquationi) -#define glBlendEquationIndexedAMD MANGLE(BlendEquationIndexedAMD) -#define glBlendEquation MANGLE(BlendEquation) -#define glBlendEquationSeparateATI MANGLE(BlendEquationSeparateATI) -#define glBlendEquationSeparateEXT MANGLE(BlendEquationSeparateEXT) -#define glBlendEquationSeparateiARB MANGLE(BlendEquationSeparateiARB) -#define glBlendEquationSeparatei MANGLE(BlendEquationSeparatei) -#define glBlendEquationSeparateIndexedAMD MANGLE(BlendEquationSeparateIndexedAMD) -#define glBlendEquationSeparate MANGLE(BlendEquationSeparate) -#define glBlendFunciARB MANGLE(BlendFunciARB) -#define glBlendFunci MANGLE(BlendFunci) -#define glBlendFuncIndexedAMD MANGLE(BlendFuncIndexedAMD) -#define glBlendFunc MANGLE(BlendFunc) -#define glBlendFuncSeparateEXT MANGLE(BlendFuncSeparateEXT) -#define glBlendFuncSeparateiARB MANGLE(BlendFuncSeparateiARB) -#define glBlendFuncSeparatei MANGLE(BlendFuncSeparatei) -#define glBlendFuncSeparateIndexedAMD MANGLE(BlendFuncSeparateIndexedAMD) -#define glBlendFuncSeparateINGR MANGLE(BlendFuncSeparateINGR) -#define glBlendFuncSeparate MANGLE(BlendFuncSeparate) -#define glBlitFramebufferEXT MANGLE(BlitFramebufferEXT) -#define glBlitFramebuffer MANGLE(BlitFramebuffer) -#define glBufferAddressRangeNV MANGLE(BufferAddressRangeNV) -#define glBufferDataARB MANGLE(BufferDataARB) -#define glBufferData MANGLE(BufferData) -#define glBufferParameteriAPPLE MANGLE(BufferParameteriAPPLE) -#define glBufferSubDataARB MANGLE(BufferSubDataARB) -#define glBufferSubData MANGLE(BufferSubData) -#define glCallList MANGLE(CallList) -#define glCallLists MANGLE(CallLists) -#define glCheckFramebufferStatusEXT MANGLE(CheckFramebufferStatusEXT) -#define glCheckFramebufferStatus MANGLE(CheckFramebufferStatus) -#define glCheckNamedFramebufferStatusEXT MANGLE(CheckNamedFramebufferStatusEXT) -#define glClampColorARB MANGLE(ClampColorARB) -#define glClampColor MANGLE(ClampColor) -#define glClearAccum MANGLE(ClearAccum) -#define glClearBufferfi MANGLE(ClearBufferfi) -#define glClearBufferfv MANGLE(ClearBufferfv) -#define glClearBufferiv MANGLE(ClearBufferiv) -#define glClearBufferuiv MANGLE(ClearBufferuiv) -#define glClearColorIiEXT MANGLE(ClearColorIiEXT) -#define glClearColorIuiEXT MANGLE(ClearColorIuiEXT) -#define glClearColor MANGLE(ClearColor) -#define glClearDebugLogMESA MANGLE(ClearDebugLogMESA) -#define glClearDepthdNV MANGLE(ClearDepthdNV) -#define glClearDepthf MANGLE(ClearDepthf) -#define glClearDepth MANGLE(ClearDepth) -#define glClearIndex MANGLE(ClearIndex) -#define glClear MANGLE(Clear) -#define glClearStencil MANGLE(ClearStencil) -#define glClientActiveTextureARB MANGLE(ClientActiveTextureARB) -#define glClientActiveTexture MANGLE(ClientActiveTexture) -#define glClientActiveVertexStreamATI MANGLE(ClientActiveVertexStreamATI) -#define glClientAttribDefaultEXT MANGLE(ClientAttribDefaultEXT) -#define glClientWaitSync MANGLE(ClientWaitSync) -#define glClipPlane MANGLE(ClipPlane) -#define glColor3b MANGLE(Color3b) -#define glColor3bv MANGLE(Color3bv) -#define glColor3d MANGLE(Color3d) -#define glColor3dv MANGLE(Color3dv) -#define glColor3f MANGLE(Color3f) -#define glColor3fVertex3fSUN MANGLE(Color3fVertex3fSUN) -#define glColor3fVertex3fvSUN MANGLE(Color3fVertex3fvSUN) -#define glColor3fv MANGLE(Color3fv) -#define glColor3hNV MANGLE(Color3hNV) -#define glColor3hvNV MANGLE(Color3hvNV) -#define glColor3i MANGLE(Color3i) -#define glColor3iv MANGLE(Color3iv) -#define glColor3s MANGLE(Color3s) -#define glColor3sv MANGLE(Color3sv) -#define glColor3ub MANGLE(Color3ub) -#define glColor3ubv MANGLE(Color3ubv) -#define glColor3ui MANGLE(Color3ui) -#define glColor3uiv MANGLE(Color3uiv) -#define glColor3us MANGLE(Color3us) -#define glColor3usv MANGLE(Color3usv) -#define glColor4b MANGLE(Color4b) -#define glColor4bv MANGLE(Color4bv) -#define glColor4d MANGLE(Color4d) -#define glColor4dv MANGLE(Color4dv) -#define glColor4f MANGLE(Color4f) -#define glColor4fNormal3fVertex3fSUN MANGLE(Color4fNormal3fVertex3fSUN) -#define glColor4fNormal3fVertex3fvSUN MANGLE(Color4fNormal3fVertex3fvSUN) -#define glColor4fv MANGLE(Color4fv) -#define glColor4hNV MANGLE(Color4hNV) -#define glColor4hvNV MANGLE(Color4hvNV) -#define glColor4i MANGLE(Color4i) -#define glColor4iv MANGLE(Color4iv) -#define glColor4s MANGLE(Color4s) -#define glColor4sv MANGLE(Color4sv) -#define glColor4ub MANGLE(Color4ub) -#define glColor4ubVertex2fSUN MANGLE(Color4ubVertex2fSUN) -#define glColor4ubVertex2fvSUN MANGLE(Color4ubVertex2fvSUN) -#define glColor4ubVertex3fSUN MANGLE(Color4ubVertex3fSUN) -#define glColor4ubVertex3fvSUN MANGLE(Color4ubVertex3fvSUN) -#define glColor4ubv MANGLE(Color4ubv) -#define glColor4ui MANGLE(Color4ui) -#define glColor4uiv MANGLE(Color4uiv) -#define glColor4us MANGLE(Color4us) -#define glColor4usv MANGLE(Color4usv) -#define glColorFormatNV MANGLE(ColorFormatNV) -#define glColorFragmentOp1ATI MANGLE(ColorFragmentOp1ATI) -#define glColorFragmentOp2ATI MANGLE(ColorFragmentOp2ATI) -#define glColorFragmentOp3ATI MANGLE(ColorFragmentOp3ATI) -#define glColorMaski MANGLE(ColorMaski) -#define glColorMaskIndexedEXT MANGLE(ColorMaskIndexedEXT) -#define glColorMask MANGLE(ColorMask) -#define glColorMaterial MANGLE(ColorMaterial) -#define glColorP3ui MANGLE(ColorP3ui) -#define glColorP3uiv MANGLE(ColorP3uiv) -#define glColorP4ui MANGLE(ColorP4ui) -#define glColorP4uiv MANGLE(ColorP4uiv) -#define glColorPointerEXT MANGLE(ColorPointerEXT) -#define glColorPointerListIBM MANGLE(ColorPointerListIBM) -#define glColorPointer MANGLE(ColorPointer) -#define glColorPointervINTEL MANGLE(ColorPointervINTEL) -#define glColorSubTableEXT MANGLE(ColorSubTableEXT) -#define glColorSubTable MANGLE(ColorSubTable) -#define glColorTableEXT MANGLE(ColorTableEXT) -#define glColorTable MANGLE(ColorTable) -#define glColorTableParameterfv MANGLE(ColorTableParameterfv) -#define glColorTableParameterfvSGI MANGLE(ColorTableParameterfvSGI) -#define glColorTableParameteriv MANGLE(ColorTableParameteriv) -#define glColorTableParameterivSGI MANGLE(ColorTableParameterivSGI) -#define glColorTableSGI MANGLE(ColorTableSGI) -#define glCombinerInputNV MANGLE(CombinerInputNV) -#define glCombinerOutputNV MANGLE(CombinerOutputNV) -#define glCombinerParameterfNV MANGLE(CombinerParameterfNV) -#define glCombinerParameterfvNV MANGLE(CombinerParameterfvNV) -#define glCombinerParameteriNV MANGLE(CombinerParameteriNV) -#define glCombinerParameterivNV MANGLE(CombinerParameterivNV) -#define glCombinerStageParameterfvNV MANGLE(CombinerStageParameterfvNV) -#define glCompileShaderARB MANGLE(CompileShaderARB) -#define glCompileShaderIncludeARB MANGLE(CompileShaderIncludeARB) -#define glCompileShader MANGLE(CompileShader) -#define glCompressedMultiTexImage1DEXT MANGLE(CompressedMultiTexImage1DEXT) -#define glCompressedMultiTexImage2DEXT MANGLE(CompressedMultiTexImage2DEXT) -#define glCompressedMultiTexImage3DEXT MANGLE(CompressedMultiTexImage3DEXT) -#define glCompressedMultiTexSubImage1DEXT MANGLE(CompressedMultiTexSubImage1DEXT) -#define glCompressedMultiTexSubImage2DEXT MANGLE(CompressedMultiTexSubImage2DEXT) -#define glCompressedMultiTexSubImage3DEXT MANGLE(CompressedMultiTexSubImage3DEXT) -#define glCompressedTexImage1DARB MANGLE(CompressedTexImage1DARB) -#define glCompressedTexImage1D MANGLE(CompressedTexImage1D) -#define glCompressedTexImage2DARB MANGLE(CompressedTexImage2DARB) -#define glCompressedTexImage2D MANGLE(CompressedTexImage2D) -#define glCompressedTexImage3DARB MANGLE(CompressedTexImage3DARB) -#define glCompressedTexImage3D MANGLE(CompressedTexImage3D) -#define glCompressedTexSubImage1DARB MANGLE(CompressedTexSubImage1DARB) -#define glCompressedTexSubImage1D MANGLE(CompressedTexSubImage1D) -#define glCompressedTexSubImage2DARB MANGLE(CompressedTexSubImage2DARB) -#define glCompressedTexSubImage2D MANGLE(CompressedTexSubImage2D) -#define glCompressedTexSubImage3DARB MANGLE(CompressedTexSubImage3DARB) -#define glCompressedTexSubImage3D MANGLE(CompressedTexSubImage3D) -#define glCompressedTextureImage1DEXT MANGLE(CompressedTextureImage1DEXT) -#define glCompressedTextureImage2DEXT MANGLE(CompressedTextureImage2DEXT) -#define glCompressedTextureImage3DEXT MANGLE(CompressedTextureImage3DEXT) -#define glCompressedTextureSubImage1DEXT MANGLE(CompressedTextureSubImage1DEXT) -#define glCompressedTextureSubImage2DEXT MANGLE(CompressedTextureSubImage2DEXT) -#define glCompressedTextureSubImage3DEXT MANGLE(CompressedTextureSubImage3DEXT) -#define glConvolutionFilter1DEXT MANGLE(ConvolutionFilter1DEXT) -#define glConvolutionFilter1D MANGLE(ConvolutionFilter1D) -#define glConvolutionFilter2DEXT MANGLE(ConvolutionFilter2DEXT) -#define glConvolutionFilter2D MANGLE(ConvolutionFilter2D) -#define glConvolutionParameterfEXT MANGLE(ConvolutionParameterfEXT) -#define glConvolutionParameterf MANGLE(ConvolutionParameterf) -#define glConvolutionParameterfvEXT MANGLE(ConvolutionParameterfvEXT) -#define glConvolutionParameterfv MANGLE(ConvolutionParameterfv) -#define glConvolutionParameteriEXT MANGLE(ConvolutionParameteriEXT) -#define glConvolutionParameteri MANGLE(ConvolutionParameteri) -#define glConvolutionParameterivEXT MANGLE(ConvolutionParameterivEXT) -#define glConvolutionParameteriv MANGLE(ConvolutionParameteriv) -#define glCopyBufferSubData MANGLE(CopyBufferSubData) -#define glCopyColorSubTableEXT MANGLE(CopyColorSubTableEXT) -#define glCopyColorSubTable MANGLE(CopyColorSubTable) -#define glCopyColorTable MANGLE(CopyColorTable) -#define glCopyColorTableSGI MANGLE(CopyColorTableSGI) -#define glCopyConvolutionFilter1DEXT MANGLE(CopyConvolutionFilter1DEXT) -#define glCopyConvolutionFilter1D MANGLE(CopyConvolutionFilter1D) -#define glCopyConvolutionFilter2DEXT MANGLE(CopyConvolutionFilter2DEXT) -#define glCopyConvolutionFilter2D MANGLE(CopyConvolutionFilter2D) -#define glCopyImageSubDataNV MANGLE(CopyImageSubDataNV) -#define glCopyMultiTexImage1DEXT MANGLE(CopyMultiTexImage1DEXT) -#define glCopyMultiTexImage2DEXT MANGLE(CopyMultiTexImage2DEXT) -#define glCopyMultiTexSubImage1DEXT MANGLE(CopyMultiTexSubImage1DEXT) -#define glCopyMultiTexSubImage2DEXT MANGLE(CopyMultiTexSubImage2DEXT) -#define glCopyMultiTexSubImage3DEXT MANGLE(CopyMultiTexSubImage3DEXT) -#define glCopyPixels MANGLE(CopyPixels) -#define glCopyTexImage1DEXT MANGLE(CopyTexImage1DEXT) -#define glCopyTexImage1D MANGLE(CopyTexImage1D) -#define glCopyTexImage2DEXT MANGLE(CopyTexImage2DEXT) -#define glCopyTexImage2D MANGLE(CopyTexImage2D) -#define glCopyTexSubImage1DEXT MANGLE(CopyTexSubImage1DEXT) -#define glCopyTexSubImage1D MANGLE(CopyTexSubImage1D) -#define glCopyTexSubImage2DEXT MANGLE(CopyTexSubImage2DEXT) -#define glCopyTexSubImage2D MANGLE(CopyTexSubImage2D) -#define glCopyTexSubImage3DEXT MANGLE(CopyTexSubImage3DEXT) -#define glCopyTexSubImage3D MANGLE(CopyTexSubImage3D) -#define glCopyTextureImage1DEXT MANGLE(CopyTextureImage1DEXT) -#define glCopyTextureImage2DEXT MANGLE(CopyTextureImage2DEXT) -#define glCopyTextureSubImage1DEXT MANGLE(CopyTextureSubImage1DEXT) -#define glCopyTextureSubImage2DEXT MANGLE(CopyTextureSubImage2DEXT) -#define glCopyTextureSubImage3DEXT MANGLE(CopyTextureSubImage3DEXT) -#define glCreateDebugObjectMESA MANGLE(CreateDebugObjectMESA) -#define glCreateProgram MANGLE(CreateProgram) -#define glCreateProgramObjectARB MANGLE(CreateProgramObjectARB) -#define glCreateShader MANGLE(CreateShader) -#define glCreateShaderObjectARB MANGLE(CreateShaderObjectARB) -#define glCreateShaderProgramEXT MANGLE(CreateShaderProgramEXT) -#define glCreateShaderProgramv MANGLE(CreateShaderProgramv) -#define glCreateSyncFromCLeventARB MANGLE(CreateSyncFromCLeventARB) -#define glCullFace MANGLE(CullFace) -#define glCullParameterdvEXT MANGLE(CullParameterdvEXT) -#define glCullParameterfvEXT MANGLE(CullParameterfvEXT) -#define glCurrentPaletteMatrixARB MANGLE(CurrentPaletteMatrixARB) -#define glDebugMessageCallbackAMD MANGLE(DebugMessageCallbackAMD) -#define glDebugMessageCallbackARB MANGLE(DebugMessageCallbackARB) -#define glDebugMessageControlARB MANGLE(DebugMessageControlARB) -#define glDebugMessageEnableAMD MANGLE(DebugMessageEnableAMD) -#define glDebugMessageInsertAMD MANGLE(DebugMessageInsertAMD) -#define glDebugMessageInsertARB MANGLE(DebugMessageInsertARB) -#define glDeformationMap3dSGIX MANGLE(DeformationMap3dSGIX) -#define glDeformationMap3fSGIX MANGLE(DeformationMap3fSGIX) -#define glDeformSGIX MANGLE(DeformSGIX) -#define glDeleteAsyncMarkersSGIX MANGLE(DeleteAsyncMarkersSGIX) -#define glDeleteBuffersARB MANGLE(DeleteBuffersARB) -#define glDeleteBuffers MANGLE(DeleteBuffers) -#define glDeleteFencesAPPLE MANGLE(DeleteFencesAPPLE) -#define glDeleteFencesNV MANGLE(DeleteFencesNV) -#define glDeleteFragmentShaderATI MANGLE(DeleteFragmentShaderATI) -#define glDeleteFramebuffersEXT MANGLE(DeleteFramebuffersEXT) -#define glDeleteFramebuffers MANGLE(DeleteFramebuffers) -#define glDeleteLists MANGLE(DeleteLists) -#define glDeleteNamedStringARB MANGLE(DeleteNamedStringARB) -#define glDeleteNamesAMD MANGLE(DeleteNamesAMD) -#define glDeleteObjectARB MANGLE(DeleteObjectARB) -#define glDeleteOcclusionQueriesNV MANGLE(DeleteOcclusionQueriesNV) -#define glDeletePerfMonitorsAMD MANGLE(DeletePerfMonitorsAMD) -#define glDeleteProgram MANGLE(DeleteProgram) -#define glDeleteProgramPipelines MANGLE(DeleteProgramPipelines) -#define glDeleteProgramsARB MANGLE(DeleteProgramsARB) -#define glDeleteProgramsNV MANGLE(DeleteProgramsNV) -#define glDeleteQueriesARB MANGLE(DeleteQueriesARB) -#define glDeleteQueries MANGLE(DeleteQueries) -#define glDeleteRenderbuffersEXT MANGLE(DeleteRenderbuffersEXT) -#define glDeleteRenderbuffers MANGLE(DeleteRenderbuffers) -#define glDeleteSamplers MANGLE(DeleteSamplers) -#define glDeleteShader MANGLE(DeleteShader) -#define glDeleteSync MANGLE(DeleteSync) -#define glDeleteTexturesEXT MANGLE(DeleteTexturesEXT) -#define glDeleteTextures MANGLE(DeleteTextures) -#define glDeleteTransformFeedbacks MANGLE(DeleteTransformFeedbacks) -#define glDeleteTransformFeedbacksNV MANGLE(DeleteTransformFeedbacksNV) -#define glDeleteVertexArraysAPPLE MANGLE(DeleteVertexArraysAPPLE) -#define glDeleteVertexArrays MANGLE(DeleteVertexArrays) -#define glDeleteVertexShaderEXT MANGLE(DeleteVertexShaderEXT) -#define glDepthBoundsdNV MANGLE(DepthBoundsdNV) -#define glDepthBoundsEXT MANGLE(DepthBoundsEXT) -#define glDepthFunc MANGLE(DepthFunc) -#define glDepthMask MANGLE(DepthMask) -#define glDepthRangeArrayv MANGLE(DepthRangeArrayv) -#define glDepthRangedNV MANGLE(DepthRangedNV) -#define glDepthRangef MANGLE(DepthRangef) -#define glDepthRangeIndexed MANGLE(DepthRangeIndexed) -#define glDepthRange MANGLE(DepthRange) -#define glDetachObjectARB MANGLE(DetachObjectARB) -#define glDetachShader MANGLE(DetachShader) -#define glDetailTexFuncSGIS MANGLE(DetailTexFuncSGIS) -#define glDisableClientStateIndexedEXT MANGLE(DisableClientStateIndexedEXT) -#define glDisableClientState MANGLE(DisableClientState) -#define glDisablei MANGLE(Disablei) -#define glDisableIndexedEXT MANGLE(DisableIndexedEXT) -#define glDisable MANGLE(Disable) -#define glDisableVariantClientStateEXT MANGLE(DisableVariantClientStateEXT) -#define glDisableVertexAttribAPPLE MANGLE(DisableVertexAttribAPPLE) -#define glDisableVertexAttribArrayARB MANGLE(DisableVertexAttribArrayARB) -#define glDisableVertexAttribArray MANGLE(DisableVertexAttribArray) -#define glDrawArraysEXT MANGLE(DrawArraysEXT) -#define glDrawArraysIndirect MANGLE(DrawArraysIndirect) -#define glDrawArraysInstancedARB MANGLE(DrawArraysInstancedARB) -#define glDrawArraysInstancedEXT MANGLE(DrawArraysInstancedEXT) -#define glDrawArraysInstanced MANGLE(DrawArraysInstanced) -#define glDrawArrays MANGLE(DrawArrays) -#define glDrawBuffer MANGLE(DrawBuffer) -#define glDrawBuffersARB MANGLE(DrawBuffersARB) -#define glDrawBuffersATI MANGLE(DrawBuffersATI) -#define glDrawBuffers MANGLE(DrawBuffers) -#define glDrawElementArrayAPPLE MANGLE(DrawElementArrayAPPLE) -#define glDrawElementArrayATI MANGLE(DrawElementArrayATI) -#define glDrawElementsBaseVertex MANGLE(DrawElementsBaseVertex) -#define glDrawElementsIndirect MANGLE(DrawElementsIndirect) -#define glDrawElementsInstancedARB MANGLE(DrawElementsInstancedARB) -#define glDrawElementsInstancedBaseVertex MANGLE(DrawElementsInstancedBaseVertex) -#define glDrawElementsInstancedEXT MANGLE(DrawElementsInstancedEXT) -#define glDrawElementsInstanced MANGLE(DrawElementsInstanced) -#define glDrawElements MANGLE(DrawElements) -#define glDrawMeshArraysSUN MANGLE(DrawMeshArraysSUN) -#define glDrawPixels MANGLE(DrawPixels) -#define glDrawRangeElementArrayAPPLE MANGLE(DrawRangeElementArrayAPPLE) -#define glDrawRangeElementArrayATI MANGLE(DrawRangeElementArrayATI) -#define glDrawRangeElementsBaseVertex MANGLE(DrawRangeElementsBaseVertex) -#define glDrawRangeElementsEXT MANGLE(DrawRangeElementsEXT) -#define glDrawRangeElements MANGLE(DrawRangeElements) -#define glDrawTransformFeedback MANGLE(DrawTransformFeedback) -#define glDrawTransformFeedbackNV MANGLE(DrawTransformFeedbackNV) -#define glDrawTransformFeedbackStream MANGLE(DrawTransformFeedbackStream) -#define glEdgeFlagFormatNV MANGLE(EdgeFlagFormatNV) -#define glEdgeFlag MANGLE(EdgeFlag) -#define glEdgeFlagPointerEXT MANGLE(EdgeFlagPointerEXT) -#define glEdgeFlagPointerListIBM MANGLE(EdgeFlagPointerListIBM) -#define glEdgeFlagPointer MANGLE(EdgeFlagPointer) -#define glEdgeFlagv MANGLE(EdgeFlagv) -#define glEGLImageTargetRenderbufferStorageOES MANGLE(EGLImageTargetRenderbufferStorageOES) -#define glEGLImageTargetTexture2DOES MANGLE(EGLImageTargetTexture2DOES) -#define glElementPointerAPPLE MANGLE(ElementPointerAPPLE) -#define glElementPointerATI MANGLE(ElementPointerATI) -#define glEnableClientStateIndexedEXT MANGLE(EnableClientStateIndexedEXT) -#define glEnableClientState MANGLE(EnableClientState) -#define glEnablei MANGLE(Enablei) -#define glEnableIndexedEXT MANGLE(EnableIndexedEXT) -#define glEnable MANGLE(Enable) -#define glEnableVariantClientStateEXT MANGLE(EnableVariantClientStateEXT) -#define glEnableVertexAttribAPPLE MANGLE(EnableVertexAttribAPPLE) -#define glEnableVertexAttribArrayARB MANGLE(EnableVertexAttribArrayARB) -#define glEnableVertexAttribArray MANGLE(EnableVertexAttribArray) -#define glEndConditionalRender MANGLE(EndConditionalRender) -#define glEndConditionalRenderNV MANGLE(EndConditionalRenderNV) -#define glEndFragmentShaderATI MANGLE(EndFragmentShaderATI) -#define glEndList MANGLE(EndList) -#define glEnd MANGLE(End) -#define glEndOcclusionQueryNV MANGLE(EndOcclusionQueryNV) -#define glEndPerfMonitorAMD MANGLE(EndPerfMonitorAMD) -#define glEndQueryARB MANGLE(EndQueryARB) -#define glEndQueryIndexed MANGLE(EndQueryIndexed) -#define glEndQuery MANGLE(EndQuery) -#define glEndTransformFeedbackEXT MANGLE(EndTransformFeedbackEXT) -#define glEndTransformFeedback MANGLE(EndTransformFeedback) -#define glEndTransformFeedbackNV MANGLE(EndTransformFeedbackNV) -#define glEndVertexShaderEXT MANGLE(EndVertexShaderEXT) -#define glEndVideoCaptureNV MANGLE(EndVideoCaptureNV) -#define glEvalCoord1d MANGLE(EvalCoord1d) -#define glEvalCoord1dv MANGLE(EvalCoord1dv) -#define glEvalCoord1f MANGLE(EvalCoord1f) -#define glEvalCoord1fv MANGLE(EvalCoord1fv) -#define glEvalCoord2d MANGLE(EvalCoord2d) -#define glEvalCoord2dv MANGLE(EvalCoord2dv) -#define glEvalCoord2f MANGLE(EvalCoord2f) -#define glEvalCoord2fv MANGLE(EvalCoord2fv) -#define glEvalMapsNV MANGLE(EvalMapsNV) -#define glEvalMesh1 MANGLE(EvalMesh1) -#define glEvalMesh2 MANGLE(EvalMesh2) -#define glEvalPoint1 MANGLE(EvalPoint1) -#define glEvalPoint2 MANGLE(EvalPoint2) -#define glExecuteProgramNV MANGLE(ExecuteProgramNV) -#define glExtractComponentEXT MANGLE(ExtractComponentEXT) -#define glFeedbackBuffer MANGLE(FeedbackBuffer) -#define glFenceSync MANGLE(FenceSync) -#define glFinalCombinerInputNV MANGLE(FinalCombinerInputNV) -#define glFinishAsyncSGIX MANGLE(FinishAsyncSGIX) -#define glFinishFenceAPPLE MANGLE(FinishFenceAPPLE) -#define glFinishFenceNV MANGLE(FinishFenceNV) -#define glFinish MANGLE(Finish) -#define glFinishObjectAPPLE MANGLE(FinishObjectAPPLE) -#define glFinishTextureSUNX MANGLE(FinishTextureSUNX) -#define glFlush MANGLE(Flush) -#define glFlushMappedBufferRangeAPPLE MANGLE(FlushMappedBufferRangeAPPLE) -#define glFlushMappedBufferRange MANGLE(FlushMappedBufferRange) -#define glFlushMappedNamedBufferRangeEXT MANGLE(FlushMappedNamedBufferRangeEXT) -#define glFlushPixelDataRangeNV MANGLE(FlushPixelDataRangeNV) -#define glFlushRasterSGIX MANGLE(FlushRasterSGIX) -#define glFlushVertexArrayRangeAPPLE MANGLE(FlushVertexArrayRangeAPPLE) -#define glFlushVertexArrayRangeNV MANGLE(FlushVertexArrayRangeNV) -#define glFogCoorddEXT MANGLE(FogCoorddEXT) -#define glFogCoordd MANGLE(FogCoordd) -#define glFogCoorddvEXT MANGLE(FogCoorddvEXT) -#define glFogCoorddv MANGLE(FogCoorddv) -#define glFogCoordfEXT MANGLE(FogCoordfEXT) -#define glFogCoordf MANGLE(FogCoordf) -#define glFogCoordFormatNV MANGLE(FogCoordFormatNV) -#define glFogCoordfvEXT MANGLE(FogCoordfvEXT) -#define glFogCoordfv MANGLE(FogCoordfv) -#define glFogCoordhNV MANGLE(FogCoordhNV) -#define glFogCoordhvNV MANGLE(FogCoordhvNV) -#define glFogCoordPointerEXT MANGLE(FogCoordPointerEXT) -#define glFogCoordPointerListIBM MANGLE(FogCoordPointerListIBM) -#define glFogCoordPointer MANGLE(FogCoordPointer) -#define glFogf MANGLE(Fogf) -#define glFogFuncSGIS MANGLE(FogFuncSGIS) -#define glFogfv MANGLE(Fogfv) -#define glFogi MANGLE(Fogi) -#define glFogiv MANGLE(Fogiv) -#define glFragmentColorMaterialSGIX MANGLE(FragmentColorMaterialSGIX) -#define glFragmentLightfSGIX MANGLE(FragmentLightfSGIX) -#define glFragmentLightfvSGIX MANGLE(FragmentLightfvSGIX) -#define glFragmentLightiSGIX MANGLE(FragmentLightiSGIX) -#define glFragmentLightivSGIX MANGLE(FragmentLightivSGIX) -#define glFragmentLightModelfSGIX MANGLE(FragmentLightModelfSGIX) -#define glFragmentLightModelfvSGIX MANGLE(FragmentLightModelfvSGIX) -#define glFragmentLightModeliSGIX MANGLE(FragmentLightModeliSGIX) -#define glFragmentLightModelivSGIX MANGLE(FragmentLightModelivSGIX) -#define glFragmentMaterialfSGIX MANGLE(FragmentMaterialfSGIX) -#define glFragmentMaterialfvSGIX MANGLE(FragmentMaterialfvSGIX) -#define glFragmentMaterialiSGIX MANGLE(FragmentMaterialiSGIX) -#define glFragmentMaterialivSGIX MANGLE(FragmentMaterialivSGIX) -#define glFramebufferDrawBufferEXT MANGLE(FramebufferDrawBufferEXT) -#define glFramebufferDrawBuffersEXT MANGLE(FramebufferDrawBuffersEXT) -#define glFramebufferReadBufferEXT MANGLE(FramebufferReadBufferEXT) -#define glFramebufferRenderbufferEXT MANGLE(FramebufferRenderbufferEXT) -#define glFramebufferRenderbuffer MANGLE(FramebufferRenderbuffer) -#define glFramebufferTexture1DEXT MANGLE(FramebufferTexture1DEXT) -#define glFramebufferTexture1D MANGLE(FramebufferTexture1D) -#define glFramebufferTexture2DEXT MANGLE(FramebufferTexture2DEXT) -#define glFramebufferTexture2D MANGLE(FramebufferTexture2D) -#define glFramebufferTexture3DEXT MANGLE(FramebufferTexture3DEXT) -#define glFramebufferTexture3D MANGLE(FramebufferTexture3D) -#define glFramebufferTextureARB MANGLE(FramebufferTextureARB) -#define glFramebufferTextureEXT MANGLE(FramebufferTextureEXT) -#define glFramebufferTextureFaceARB MANGLE(FramebufferTextureFaceARB) -#define glFramebufferTextureFaceEXT MANGLE(FramebufferTextureFaceEXT) -#define glFramebufferTextureLayerARB MANGLE(FramebufferTextureLayerARB) -#define glFramebufferTextureLayerEXT MANGLE(FramebufferTextureLayerEXT) -#define glFramebufferTextureLayer MANGLE(FramebufferTextureLayer) -#define glFramebufferTexture MANGLE(FramebufferTexture) -#define glFrameTerminatorGREMEDY MANGLE(FrameTerminatorGREMEDY) -#define glFrameZoomSGIX MANGLE(FrameZoomSGIX) -#define glFreeObjectBufferATI MANGLE(FreeObjectBufferATI) -#define glFrontFace MANGLE(FrontFace) -#define glFrustum MANGLE(Frustum) -#define glGenAsyncMarkersSGIX MANGLE(GenAsyncMarkersSGIX) -#define glGenBuffersARB MANGLE(GenBuffersARB) -#define glGenBuffers MANGLE(GenBuffers) -#define glGenerateMipmapEXT MANGLE(GenerateMipmapEXT) -#define glGenerateMipmap MANGLE(GenerateMipmap) -#define glGenerateMultiTexMipmapEXT MANGLE(GenerateMultiTexMipmapEXT) -#define glGenerateTextureMipmapEXT MANGLE(GenerateTextureMipmapEXT) -#define glGenFencesAPPLE MANGLE(GenFencesAPPLE) -#define glGenFencesNV MANGLE(GenFencesNV) -#define glGenFragmentShadersATI MANGLE(GenFragmentShadersATI) -#define glGenFramebuffersEXT MANGLE(GenFramebuffersEXT) -#define glGenFramebuffers MANGLE(GenFramebuffers) -#define glGenLists MANGLE(GenLists) -#define glGenNamesAMD MANGLE(GenNamesAMD) -#define glGenOcclusionQueriesNV MANGLE(GenOcclusionQueriesNV) -#define glGenPerfMonitorsAMD MANGLE(GenPerfMonitorsAMD) -#define glGenProgramPipelines MANGLE(GenProgramPipelines) -#define glGenProgramsARB MANGLE(GenProgramsARB) -#define glGenProgramsNV MANGLE(GenProgramsNV) -#define glGenQueriesARB MANGLE(GenQueriesARB) -#define glGenQueries MANGLE(GenQueries) -#define glGenRenderbuffersEXT MANGLE(GenRenderbuffersEXT) -#define glGenRenderbuffers MANGLE(GenRenderbuffers) -#define glGenSamplers MANGLE(GenSamplers) -#define glGenSymbolsEXT MANGLE(GenSymbolsEXT) -#define glGenTexturesEXT MANGLE(GenTexturesEXT) -#define glGenTextures MANGLE(GenTextures) -#define glGenTransformFeedbacks MANGLE(GenTransformFeedbacks) -#define glGenTransformFeedbacksNV MANGLE(GenTransformFeedbacksNV) -#define glGenVertexArraysAPPLE MANGLE(GenVertexArraysAPPLE) -#define glGenVertexArrays MANGLE(GenVertexArrays) -#define glGenVertexShadersEXT MANGLE(GenVertexShadersEXT) -#define glGetActiveAttribARB MANGLE(GetActiveAttribARB) -#define glGetActiveAttrib MANGLE(GetActiveAttrib) -#define glGetActiveSubroutineName MANGLE(GetActiveSubroutineName) -#define glGetActiveSubroutineUniformiv MANGLE(GetActiveSubroutineUniformiv) -#define glGetActiveSubroutineUniformName MANGLE(GetActiveSubroutineUniformName) -#define glGetActiveUniformARB MANGLE(GetActiveUniformARB) -#define glGetActiveUniformBlockiv MANGLE(GetActiveUniformBlockiv) -#define glGetActiveUniformBlockName MANGLE(GetActiveUniformBlockName) -#define glGetActiveUniform MANGLE(GetActiveUniform) -#define glGetActiveUniformName MANGLE(GetActiveUniformName) -#define glGetActiveUniformsiv MANGLE(GetActiveUniformsiv) -#define glGetActiveVaryingNV MANGLE(GetActiveVaryingNV) -#define glGetArrayObjectfvATI MANGLE(GetArrayObjectfvATI) -#define glGetArrayObjectivATI MANGLE(GetArrayObjectivATI) -#define glGetAttachedObjectsARB MANGLE(GetAttachedObjectsARB) -#define glGetAttachedShaders MANGLE(GetAttachedShaders) -#define glGetAttribLocationARB MANGLE(GetAttribLocationARB) -#define glGetAttribLocation MANGLE(GetAttribLocation) -#define glGetBooleanIndexedvEXT MANGLE(GetBooleanIndexedvEXT) -#define glGetBooleani_v MANGLE(GetBooleani_v) -#define glGetBooleanv MANGLE(GetBooleanv) -#define glGetBufferParameteri64v MANGLE(GetBufferParameteri64v) -#define glGetBufferParameterivARB MANGLE(GetBufferParameterivARB) -#define glGetBufferParameteriv MANGLE(GetBufferParameteriv) -#define glGetBufferParameterui64vNV MANGLE(GetBufferParameterui64vNV) -#define glGetBufferPointervARB MANGLE(GetBufferPointervARB) -#define glGetBufferPointerv MANGLE(GetBufferPointerv) -#define glGetBufferSubDataARB MANGLE(GetBufferSubDataARB) -#define glGetBufferSubData MANGLE(GetBufferSubData) -#define glGetClipPlane MANGLE(GetClipPlane) -#define glGetColorTableEXT MANGLE(GetColorTableEXT) -#define glGetColorTable MANGLE(GetColorTable) -#define glGetColorTableParameterfvEXT MANGLE(GetColorTableParameterfvEXT) -#define glGetColorTableParameterfv MANGLE(GetColorTableParameterfv) -#define glGetColorTableParameterfvSGI MANGLE(GetColorTableParameterfvSGI) -#define glGetColorTableParameterivEXT MANGLE(GetColorTableParameterivEXT) -#define glGetColorTableParameteriv MANGLE(GetColorTableParameteriv) -#define glGetColorTableParameterivSGI MANGLE(GetColorTableParameterivSGI) -#define glGetColorTableSGI MANGLE(GetColorTableSGI) -#define glGetCombinerInputParameterfvNV MANGLE(GetCombinerInputParameterfvNV) -#define glGetCombinerInputParameterivNV MANGLE(GetCombinerInputParameterivNV) -#define glGetCombinerOutputParameterfvNV MANGLE(GetCombinerOutputParameterfvNV) -#define glGetCombinerOutputParameterivNV MANGLE(GetCombinerOutputParameterivNV) -#define glGetCombinerStageParameterfvNV MANGLE(GetCombinerStageParameterfvNV) -#define glGetCompressedMultiTexImageEXT MANGLE(GetCompressedMultiTexImageEXT) -#define glGetCompressedTexImageARB MANGLE(GetCompressedTexImageARB) -#define glGetCompressedTexImage MANGLE(GetCompressedTexImage) -#define glGetCompressedTextureImageEXT MANGLE(GetCompressedTextureImageEXT) -#define glGetConvolutionFilterEXT MANGLE(GetConvolutionFilterEXT) -#define glGetConvolutionFilter MANGLE(GetConvolutionFilter) -#define glGetConvolutionParameterfvEXT MANGLE(GetConvolutionParameterfvEXT) -#define glGetConvolutionParameterfv MANGLE(GetConvolutionParameterfv) -#define glGetConvolutionParameterivEXT MANGLE(GetConvolutionParameterivEXT) -#define glGetConvolutionParameteriv MANGLE(GetConvolutionParameteriv) -#define glGetDebugLogLengthMESA MANGLE(GetDebugLogLengthMESA) -#define glGetDebugLogMESA MANGLE(GetDebugLogMESA) -#define glGetDebugMessageLogAMD MANGLE(GetDebugMessageLogAMD) -#define glGetDebugMessageLogARB MANGLE(GetDebugMessageLogARB) -#define glGetDetailTexFuncSGIS MANGLE(GetDetailTexFuncSGIS) -#define glGetDoubleIndexedvEXT MANGLE(GetDoubleIndexedvEXT) -#define glGetDoublei_v MANGLE(GetDoublei_v) -#define glGetDoublev MANGLE(GetDoublev) -#define glGetError MANGLE(GetError) -#define glGetFenceivNV MANGLE(GetFenceivNV) -#define glGetFinalCombinerInputParameterfvNV MANGLE(GetFinalCombinerInputParameterfvNV) -#define glGetFinalCombinerInputParameterivNV MANGLE(GetFinalCombinerInputParameterivNV) -#define glGetFloatIndexedvEXT MANGLE(GetFloatIndexedvEXT) -#define glGetFloati_v MANGLE(GetFloati_v) -#define glGetFloatv MANGLE(GetFloatv) -#define glGetFogFuncSGIS MANGLE(GetFogFuncSGIS) -#define glGetFragDataIndex MANGLE(GetFragDataIndex) -#define glGetFragDataLocationEXT MANGLE(GetFragDataLocationEXT) -#define glGetFragDataLocation MANGLE(GetFragDataLocation) -#define glGetFragmentLightfvSGIX MANGLE(GetFragmentLightfvSGIX) -#define glGetFragmentLightivSGIX MANGLE(GetFragmentLightivSGIX) -#define glGetFragmentMaterialfvSGIX MANGLE(GetFragmentMaterialfvSGIX) -#define glGetFragmentMaterialivSGIX MANGLE(GetFragmentMaterialivSGIX) -#define glGetFramebufferAttachmentParameterivEXT MANGLE(GetFramebufferAttachmentParameterivEXT) -#define glGetFramebufferAttachmentParameteriv MANGLE(GetFramebufferAttachmentParameteriv) -#define glGetFramebufferParameterivEXT MANGLE(GetFramebufferParameterivEXT) -#define glGetGraphicsResetStatusARB MANGLE(GetGraphicsResetStatusARB) -#define glGetHandleARB MANGLE(GetHandleARB) -#define glGetHistogramEXT MANGLE(GetHistogramEXT) -#define glGetHistogram MANGLE(GetHistogram) -#define glGetHistogramParameterfvEXT MANGLE(GetHistogramParameterfvEXT) -#define glGetHistogramParameterfv MANGLE(GetHistogramParameterfv) -#define glGetHistogramParameterivEXT MANGLE(GetHistogramParameterivEXT) -#define glGetHistogramParameteriv MANGLE(GetHistogramParameteriv) -#define glGetImageTransformParameterfvHP MANGLE(GetImageTransformParameterfvHP) -#define glGetImageTransformParameterivHP MANGLE(GetImageTransformParameterivHP) -#define glGetInfoLogARB MANGLE(GetInfoLogARB) -#define glGetInstrumentsSGIX MANGLE(GetInstrumentsSGIX) -#define glGetInteger64i_v MANGLE(GetInteger64i_v) -#define glGetInteger64v MANGLE(GetInteger64v) -#define glGetIntegerIndexedvEXT MANGLE(GetIntegerIndexedvEXT) -#define glGetIntegeri_v MANGLE(GetIntegeri_v) -#define glGetIntegerui64i_vNV MANGLE(GetIntegerui64i_vNV) -#define glGetIntegerui64vNV MANGLE(GetIntegerui64vNV) -#define glGetIntegerv MANGLE(GetIntegerv) -#define glGetInvariantBooleanvEXT MANGLE(GetInvariantBooleanvEXT) -#define glGetInvariantFloatvEXT MANGLE(GetInvariantFloatvEXT) -#define glGetInvariantIntegervEXT MANGLE(GetInvariantIntegervEXT) -#define glGetLightfv MANGLE(GetLightfv) -#define glGetLightiv MANGLE(GetLightiv) -#define glGetListParameterfvSGIX MANGLE(GetListParameterfvSGIX) -#define glGetListParameterivSGIX MANGLE(GetListParameterivSGIX) -#define glGetLocalConstantBooleanvEXT MANGLE(GetLocalConstantBooleanvEXT) -#define glGetLocalConstantFloatvEXT MANGLE(GetLocalConstantFloatvEXT) -#define glGetLocalConstantIntegervEXT MANGLE(GetLocalConstantIntegervEXT) -#define glGetMapAttribParameterfvNV MANGLE(GetMapAttribParameterfvNV) -#define glGetMapAttribParameterivNV MANGLE(GetMapAttribParameterivNV) -#define glGetMapControlPointsNV MANGLE(GetMapControlPointsNV) -#define glGetMapdv MANGLE(GetMapdv) -#define glGetMapfv MANGLE(GetMapfv) -#define glGetMapiv MANGLE(GetMapiv) -#define glGetMapParameterfvNV MANGLE(GetMapParameterfvNV) -#define glGetMapParameterivNV MANGLE(GetMapParameterivNV) -#define glGetMaterialfv MANGLE(GetMaterialfv) -#define glGetMaterialiv MANGLE(GetMaterialiv) -#define glGetMinmaxEXT MANGLE(GetMinmaxEXT) -#define glGetMinmax MANGLE(GetMinmax) -#define glGetMinmaxParameterfvEXT MANGLE(GetMinmaxParameterfvEXT) -#define glGetMinmaxParameterfv MANGLE(GetMinmaxParameterfv) -#define glGetMinmaxParameterivEXT MANGLE(GetMinmaxParameterivEXT) -#define glGetMinmaxParameteriv MANGLE(GetMinmaxParameteriv) -#define glGetMultisamplefv MANGLE(GetMultisamplefv) -#define glGetMultisamplefvNV MANGLE(GetMultisamplefvNV) -#define glGetMultiTexEnvfvEXT MANGLE(GetMultiTexEnvfvEXT) -#define glGetMultiTexEnvivEXT MANGLE(GetMultiTexEnvivEXT) -#define glGetMultiTexGendvEXT MANGLE(GetMultiTexGendvEXT) -#define glGetMultiTexGenfvEXT MANGLE(GetMultiTexGenfvEXT) -#define glGetMultiTexGenivEXT MANGLE(GetMultiTexGenivEXT) -#define glGetMultiTexImageEXT MANGLE(GetMultiTexImageEXT) -#define glGetMultiTexLevelParameterfvEXT MANGLE(GetMultiTexLevelParameterfvEXT) -#define glGetMultiTexLevelParameterivEXT MANGLE(GetMultiTexLevelParameterivEXT) -#define glGetMultiTexParameterfvEXT MANGLE(GetMultiTexParameterfvEXT) -#define glGetMultiTexParameterIivEXT MANGLE(GetMultiTexParameterIivEXT) -#define glGetMultiTexParameterIuivEXT MANGLE(GetMultiTexParameterIuivEXT) -#define glGetMultiTexParameterivEXT MANGLE(GetMultiTexParameterivEXT) -#define glGetNamedBufferParameterivEXT MANGLE(GetNamedBufferParameterivEXT) -#define glGetNamedBufferParameterui64vNV MANGLE(GetNamedBufferParameterui64vNV) -#define glGetNamedBufferPointervEXT MANGLE(GetNamedBufferPointervEXT) -#define glGetNamedBufferSubDataEXT MANGLE(GetNamedBufferSubDataEXT) -#define glGetNamedFramebufferAttachmentParameterivEXT MANGLE(GetNamedFramebufferAttachmentParameterivEXT) -#define glGetNamedProgramivEXT MANGLE(GetNamedProgramivEXT) -#define glGetNamedProgramLocalParameterdvEXT MANGLE(GetNamedProgramLocalParameterdvEXT) -#define glGetNamedProgramLocalParameterfvEXT MANGLE(GetNamedProgramLocalParameterfvEXT) -#define glGetNamedProgramLocalParameterIivEXT MANGLE(GetNamedProgramLocalParameterIivEXT) -#define glGetNamedProgramLocalParameterIuivEXT MANGLE(GetNamedProgramLocalParameterIuivEXT) -#define glGetNamedProgramStringEXT MANGLE(GetNamedProgramStringEXT) -#define glGetNamedRenderbufferParameterivEXT MANGLE(GetNamedRenderbufferParameterivEXT) -#define glGetNamedStringARB MANGLE(GetNamedStringARB) -#define glGetNamedStringivARB MANGLE(GetNamedStringivARB) -#define glGetnColorTableARB MANGLE(GetnColorTableARB) -#define glGetnCompressedTexImageARB MANGLE(GetnCompressedTexImageARB) -#define glGetnConvolutionFilterARB MANGLE(GetnConvolutionFilterARB) -#define glGetnHistogramARB MANGLE(GetnHistogramARB) -#define glGetnMapdvARB MANGLE(GetnMapdvARB) -#define glGetnMapfvARB MANGLE(GetnMapfvARB) -#define glGetnMapivARB MANGLE(GetnMapivARB) -#define glGetnMinmaxARB MANGLE(GetnMinmaxARB) -#define glGetnPixelMapfvARB MANGLE(GetnPixelMapfvARB) -#define glGetnPixelMapuivARB MANGLE(GetnPixelMapuivARB) -#define glGetnPixelMapusvARB MANGLE(GetnPixelMapusvARB) -#define glGetnPolygonStippleARB MANGLE(GetnPolygonStippleARB) -#define glGetnSeparableFilterARB MANGLE(GetnSeparableFilterARB) -#define glGetnTexImageARB MANGLE(GetnTexImageARB) -#define glGetnUniformdvARB MANGLE(GetnUniformdvARB) -#define glGetnUniformfvARB MANGLE(GetnUniformfvARB) -#define glGetnUniformivARB MANGLE(GetnUniformivARB) -#define glGetnUniformuivARB MANGLE(GetnUniformuivARB) -#define glGetObjectBufferfvATI MANGLE(GetObjectBufferfvATI) -#define glGetObjectBufferivATI MANGLE(GetObjectBufferivATI) -#define glGetObjectParameterfvARB MANGLE(GetObjectParameterfvARB) -#define glGetObjectParameterivAPPLE MANGLE(GetObjectParameterivAPPLE) -#define glGetObjectParameterivARB MANGLE(GetObjectParameterivARB) -#define glGetOcclusionQueryivNV MANGLE(GetOcclusionQueryivNV) -#define glGetOcclusionQueryuivNV MANGLE(GetOcclusionQueryuivNV) -#define glGetPerfMonitorCounterDataAMD MANGLE(GetPerfMonitorCounterDataAMD) -#define glGetPerfMonitorCounterInfoAMD MANGLE(GetPerfMonitorCounterInfoAMD) -#define glGetPerfMonitorCountersAMD MANGLE(GetPerfMonitorCountersAMD) -#define glGetPerfMonitorCounterStringAMD MANGLE(GetPerfMonitorCounterStringAMD) -#define glGetPerfMonitorGroupsAMD MANGLE(GetPerfMonitorGroupsAMD) -#define glGetPerfMonitorGroupStringAMD MANGLE(GetPerfMonitorGroupStringAMD) -#define glGetPixelMapfv MANGLE(GetPixelMapfv) -#define glGetPixelMapuiv MANGLE(GetPixelMapuiv) -#define glGetPixelMapusv MANGLE(GetPixelMapusv) -#define glGetPixelTexGenParameterfvSGIS MANGLE(GetPixelTexGenParameterfvSGIS) -#define glGetPixelTexGenParameterivSGIS MANGLE(GetPixelTexGenParameterivSGIS) -#define glGetPointerIndexedvEXT MANGLE(GetPointerIndexedvEXT) -#define glGetPointervEXT MANGLE(GetPointervEXT) -#define glGetPointerv MANGLE(GetPointerv) -#define glGetPolygonStipple MANGLE(GetPolygonStipple) -#define glGetProgramBinary MANGLE(GetProgramBinary) -#define glGetProgramEnvParameterdvARB MANGLE(GetProgramEnvParameterdvARB) -#define glGetProgramEnvParameterfvARB MANGLE(GetProgramEnvParameterfvARB) -#define glGetProgramEnvParameterIivNV MANGLE(GetProgramEnvParameterIivNV) -#define glGetProgramEnvParameterIuivNV MANGLE(GetProgramEnvParameterIuivNV) -#define glGetProgramInfoLog MANGLE(GetProgramInfoLog) -#define glGetProgramivARB MANGLE(GetProgramivARB) -#define glGetProgramiv MANGLE(GetProgramiv) -#define glGetProgramivNV MANGLE(GetProgramivNV) -#define glGetProgramLocalParameterdvARB MANGLE(GetProgramLocalParameterdvARB) -#define glGetProgramLocalParameterfvARB MANGLE(GetProgramLocalParameterfvARB) -#define glGetProgramLocalParameterIivNV MANGLE(GetProgramLocalParameterIivNV) -#define glGetProgramLocalParameterIuivNV MANGLE(GetProgramLocalParameterIuivNV) -#define glGetProgramNamedParameterdvNV MANGLE(GetProgramNamedParameterdvNV) -#define glGetProgramNamedParameterfvNV MANGLE(GetProgramNamedParameterfvNV) -#define glGetProgramParameterdvNV MANGLE(GetProgramParameterdvNV) -#define glGetProgramParameterfvNV MANGLE(GetProgramParameterfvNV) -#define glGetProgramPipelineInfoLog MANGLE(GetProgramPipelineInfoLog) -#define glGetProgramPipelineiv MANGLE(GetProgramPipelineiv) -#define glGetProgramRegisterfvMESA MANGLE(GetProgramRegisterfvMESA) -#define glGetProgramStageiv MANGLE(GetProgramStageiv) -#define glGetProgramStringARB MANGLE(GetProgramStringARB) -#define glGetProgramStringNV MANGLE(GetProgramStringNV) -#define glGetProgramSubroutineParameteruivNV MANGLE(GetProgramSubroutineParameteruivNV) -#define glGetQueryIndexediv MANGLE(GetQueryIndexediv) -#define glGetQueryivARB MANGLE(GetQueryivARB) -#define glGetQueryiv MANGLE(GetQueryiv) -#define glGetQueryObjecti64vEXT MANGLE(GetQueryObjecti64vEXT) -#define glGetQueryObjecti64v MANGLE(GetQueryObjecti64v) -#define glGetQueryObjectivARB MANGLE(GetQueryObjectivARB) -#define glGetQueryObjectiv MANGLE(GetQueryObjectiv) -#define glGetQueryObjectui64vEXT MANGLE(GetQueryObjectui64vEXT) -#define glGetQueryObjectui64v MANGLE(GetQueryObjectui64v) -#define glGetQueryObjectuivARB MANGLE(GetQueryObjectuivARB) -#define glGetQueryObjectuiv MANGLE(GetQueryObjectuiv) -#define glGetRenderbufferParameterivEXT MANGLE(GetRenderbufferParameterivEXT) -#define glGetRenderbufferParameteriv MANGLE(GetRenderbufferParameteriv) -#define glGetSamplerParameterfv MANGLE(GetSamplerParameterfv) -#define glGetSamplerParameterIiv MANGLE(GetSamplerParameterIiv) -#define glGetSamplerParameterIuiv MANGLE(GetSamplerParameterIuiv) -#define glGetSamplerParameteriv MANGLE(GetSamplerParameteriv) -#define glGetSeparableFilterEXT MANGLE(GetSeparableFilterEXT) -#define glGetSeparableFilter MANGLE(GetSeparableFilter) -#define glGetShaderInfoLog MANGLE(GetShaderInfoLog) -#define glGetShaderiv MANGLE(GetShaderiv) -#define glGetShaderPrecisionFormat MANGLE(GetShaderPrecisionFormat) -#define glGetShaderSourceARB MANGLE(GetShaderSourceARB) -#define glGetShaderSource MANGLE(GetShaderSource) -#define glGetSharpenTexFuncSGIS MANGLE(GetSharpenTexFuncSGIS) -#define glGetStringi MANGLE(GetStringi) -#define glGetString MANGLE(GetString) -#define glGetSubroutineIndex MANGLE(GetSubroutineIndex) -#define glGetSubroutineUniformLocation MANGLE(GetSubroutineUniformLocation) -#define glGetSynciv MANGLE(GetSynciv) -#define glGetTexBumpParameterfvATI MANGLE(GetTexBumpParameterfvATI) -#define glGetTexBumpParameterivATI MANGLE(GetTexBumpParameterivATI) -#define glGetTexEnvfv MANGLE(GetTexEnvfv) -#define glGetTexEnviv MANGLE(GetTexEnviv) -#define glGetTexFilterFuncSGIS MANGLE(GetTexFilterFuncSGIS) -#define glGetTexGendv MANGLE(GetTexGendv) -#define glGetTexGenfv MANGLE(GetTexGenfv) -#define glGetTexGeniv MANGLE(GetTexGeniv) -#define glGetTexImage MANGLE(GetTexImage) -#define glGetTexLevelParameterfv MANGLE(GetTexLevelParameterfv) -#define glGetTexLevelParameteriv MANGLE(GetTexLevelParameteriv) -#define glGetTexParameterfv MANGLE(GetTexParameterfv) -#define glGetTexParameterIivEXT MANGLE(GetTexParameterIivEXT) -#define glGetTexParameterIiv MANGLE(GetTexParameterIiv) -#define glGetTexParameterIuivEXT MANGLE(GetTexParameterIuivEXT) -#define glGetTexParameterIuiv MANGLE(GetTexParameterIuiv) -#define glGetTexParameteriv MANGLE(GetTexParameteriv) -#define glGetTexParameterPointervAPPLE MANGLE(GetTexParameterPointervAPPLE) -#define glGetTextureImageEXT MANGLE(GetTextureImageEXT) -#define glGetTextureLevelParameterfvEXT MANGLE(GetTextureLevelParameterfvEXT) -#define glGetTextureLevelParameterivEXT MANGLE(GetTextureLevelParameterivEXT) -#define glGetTextureParameterfvEXT MANGLE(GetTextureParameterfvEXT) -#define glGetTextureParameterIivEXT MANGLE(GetTextureParameterIivEXT) -#define glGetTextureParameterIuivEXT MANGLE(GetTextureParameterIuivEXT) -#define glGetTextureParameterivEXT MANGLE(GetTextureParameterivEXT) -#define glGetTrackMatrixivNV MANGLE(GetTrackMatrixivNV) -#define glGetTransformFeedbackVaryingEXT MANGLE(GetTransformFeedbackVaryingEXT) -#define glGetTransformFeedbackVarying MANGLE(GetTransformFeedbackVarying) -#define glGetTransformFeedbackVaryingNV MANGLE(GetTransformFeedbackVaryingNV) -#define glGetUniformBlockIndex MANGLE(GetUniformBlockIndex) -#define glGetUniformBufferSizeEXT MANGLE(GetUniformBufferSizeEXT) -#define glGetUniformdv MANGLE(GetUniformdv) -#define glGetUniformfvARB MANGLE(GetUniformfvARB) -#define glGetUniformfv MANGLE(GetUniformfv) -#define glGetUniformi64vNV MANGLE(GetUniformi64vNV) -#define glGetUniformIndices MANGLE(GetUniformIndices) -#define glGetUniformivARB MANGLE(GetUniformivARB) -#define glGetUniformiv MANGLE(GetUniformiv) -#define glGetUniformLocationARB MANGLE(GetUniformLocationARB) -#define glGetUniformLocation MANGLE(GetUniformLocation) -#define glGetUniformOffsetEXT MANGLE(GetUniformOffsetEXT) -#define glGetUniformSubroutineuiv MANGLE(GetUniformSubroutineuiv) -#define glGetUniformui64vNV MANGLE(GetUniformui64vNV) -#define glGetUniformuivEXT MANGLE(GetUniformuivEXT) -#define glGetUniformuiv MANGLE(GetUniformuiv) -#define glGetVariantArrayObjectfvATI MANGLE(GetVariantArrayObjectfvATI) -#define glGetVariantArrayObjectivATI MANGLE(GetVariantArrayObjectivATI) -#define glGetVariantBooleanvEXT MANGLE(GetVariantBooleanvEXT) -#define glGetVariantFloatvEXT MANGLE(GetVariantFloatvEXT) -#define glGetVariantIntegervEXT MANGLE(GetVariantIntegervEXT) -#define glGetVariantPointervEXT MANGLE(GetVariantPointervEXT) -#define glGetVaryingLocationNV MANGLE(GetVaryingLocationNV) -#define glGetVertexAttribArrayObjectfvATI MANGLE(GetVertexAttribArrayObjectfvATI) -#define glGetVertexAttribArrayObjectivATI MANGLE(GetVertexAttribArrayObjectivATI) -#define glGetVertexAttribdvARB MANGLE(GetVertexAttribdvARB) -#define glGetVertexAttribdv MANGLE(GetVertexAttribdv) -#define glGetVertexAttribdvNV MANGLE(GetVertexAttribdvNV) -#define glGetVertexAttribfvARB MANGLE(GetVertexAttribfvARB) -#define glGetVertexAttribfv MANGLE(GetVertexAttribfv) -#define glGetVertexAttribfvNV MANGLE(GetVertexAttribfvNV) -#define glGetVertexAttribIivEXT MANGLE(GetVertexAttribIivEXT) -#define glGetVertexAttribIiv MANGLE(GetVertexAttribIiv) -#define glGetVertexAttribIuivEXT MANGLE(GetVertexAttribIuivEXT) -#define glGetVertexAttribIuiv MANGLE(GetVertexAttribIuiv) -#define glGetVertexAttribivARB MANGLE(GetVertexAttribivARB) -#define glGetVertexAttribiv MANGLE(GetVertexAttribiv) -#define glGetVertexAttribivNV MANGLE(GetVertexAttribivNV) -#define glGetVertexAttribLdvEXT MANGLE(GetVertexAttribLdvEXT) -#define glGetVertexAttribLdv MANGLE(GetVertexAttribLdv) -#define glGetVertexAttribLi64vNV MANGLE(GetVertexAttribLi64vNV) -#define glGetVertexAttribLui64vNV MANGLE(GetVertexAttribLui64vNV) -#define glGetVertexAttribPointervARB MANGLE(GetVertexAttribPointervARB) -#define glGetVertexAttribPointerv MANGLE(GetVertexAttribPointerv) -#define glGetVertexAttribPointervNV MANGLE(GetVertexAttribPointervNV) -#define glGetVideoCaptureivNV MANGLE(GetVideoCaptureivNV) -#define glGetVideoCaptureStreamdvNV MANGLE(GetVideoCaptureStreamdvNV) -#define glGetVideoCaptureStreamfvNV MANGLE(GetVideoCaptureStreamfvNV) -#define glGetVideoCaptureStreamivNV MANGLE(GetVideoCaptureStreamivNV) -#define glGetVideoi64vNV MANGLE(GetVideoi64vNV) -#define glGetVideoivNV MANGLE(GetVideoivNV) -#define glGetVideoui64vNV MANGLE(GetVideoui64vNV) -#define glGetVideouivNV MANGLE(GetVideouivNV) -#define glGlobalAlphaFactorbSUN MANGLE(GlobalAlphaFactorbSUN) -#define glGlobalAlphaFactordSUN MANGLE(GlobalAlphaFactordSUN) -#define glGlobalAlphaFactorfSUN MANGLE(GlobalAlphaFactorfSUN) -#define glGlobalAlphaFactoriSUN MANGLE(GlobalAlphaFactoriSUN) -#define glGlobalAlphaFactorsSUN MANGLE(GlobalAlphaFactorsSUN) -#define glGlobalAlphaFactorubSUN MANGLE(GlobalAlphaFactorubSUN) -#define glGlobalAlphaFactoruiSUN MANGLE(GlobalAlphaFactoruiSUN) -#define glGlobalAlphaFactorusSUN MANGLE(GlobalAlphaFactorusSUN) -#define glHint MANGLE(Hint) -#define glHintPGI MANGLE(HintPGI) -#define glHistogramEXT MANGLE(HistogramEXT) -#define glHistogram MANGLE(Histogram) -#define glIglooInterfaceSGIX MANGLE(IglooInterfaceSGIX) -#define glImageTransformParameterfHP MANGLE(ImageTransformParameterfHP) -#define glImageTransformParameterfvHP MANGLE(ImageTransformParameterfvHP) -#define glImageTransformParameteriHP MANGLE(ImageTransformParameteriHP) -#define glImageTransformParameterivHP MANGLE(ImageTransformParameterivHP) -#define glIndexd MANGLE(Indexd) -#define glIndexdv MANGLE(Indexdv) -#define glIndexf MANGLE(Indexf) -#define glIndexFormatNV MANGLE(IndexFormatNV) -#define glIndexFuncEXT MANGLE(IndexFuncEXT) -#define glIndexfv MANGLE(Indexfv) -#define glIndexi MANGLE(Indexi) -#define glIndexiv MANGLE(Indexiv) -#define glIndexMask MANGLE(IndexMask) -#define glIndexMaterialEXT MANGLE(IndexMaterialEXT) -#define glIndexPointerEXT MANGLE(IndexPointerEXT) -#define glIndexPointerListIBM MANGLE(IndexPointerListIBM) -#define glIndexPointer MANGLE(IndexPointer) -#define glIndexs MANGLE(Indexs) -#define glIndexsv MANGLE(Indexsv) -#define glIndexub MANGLE(Indexub) -#define glIndexubv MANGLE(Indexubv) -#define glInitNames MANGLE(InitNames) -#define glInsertComponentEXT MANGLE(InsertComponentEXT) -#define glInstrumentsBufferSGIX MANGLE(InstrumentsBufferSGIX) -#define glInterleavedArrays MANGLE(InterleavedArrays) -#define glIsAsyncMarkerSGIX MANGLE(IsAsyncMarkerSGIX) -#define glIsBufferARB MANGLE(IsBufferARB) -#define glIsBuffer MANGLE(IsBuffer) -#define glIsBufferResidentNV MANGLE(IsBufferResidentNV) -#define glIsEnabledi MANGLE(IsEnabledi) -#define glIsEnabledIndexedEXT MANGLE(IsEnabledIndexedEXT) -#define glIsEnabled MANGLE(IsEnabled) -#define glIsFenceAPPLE MANGLE(IsFenceAPPLE) -#define glIsFenceNV MANGLE(IsFenceNV) -#define glIsFramebufferEXT MANGLE(IsFramebufferEXT) -#define glIsFramebuffer MANGLE(IsFramebuffer) -#define glIsList MANGLE(IsList) -#define glIsNameAMD MANGLE(IsNameAMD) -#define glIsNamedBufferResidentNV MANGLE(IsNamedBufferResidentNV) -#define glIsNamedStringARB MANGLE(IsNamedStringARB) -#define glIsObjectBufferATI MANGLE(IsObjectBufferATI) -#define glIsOcclusionQueryNV MANGLE(IsOcclusionQueryNV) -#define glIsProgramARB MANGLE(IsProgramARB) -#define glIsProgram MANGLE(IsProgram) -#define glIsProgramNV MANGLE(IsProgramNV) -#define glIsProgramPipeline MANGLE(IsProgramPipeline) -#define glIsQueryARB MANGLE(IsQueryARB) -#define glIsQuery MANGLE(IsQuery) -#define glIsRenderbufferEXT MANGLE(IsRenderbufferEXT) -#define glIsRenderbuffer MANGLE(IsRenderbuffer) -#define glIsSampler MANGLE(IsSampler) -#define glIsShader MANGLE(IsShader) -#define glIsSync MANGLE(IsSync) -#define glIsTextureEXT MANGLE(IsTextureEXT) -#define glIsTexture MANGLE(IsTexture) -#define glIsTransformFeedback MANGLE(IsTransformFeedback) -#define glIsTransformFeedbackNV MANGLE(IsTransformFeedbackNV) -#define glIsVariantEnabledEXT MANGLE(IsVariantEnabledEXT) -#define glIsVertexArrayAPPLE MANGLE(IsVertexArrayAPPLE) -#define glIsVertexArray MANGLE(IsVertexArray) -#define glIsVertexAttribEnabledAPPLE MANGLE(IsVertexAttribEnabledAPPLE) -#define glLightEnviSGIX MANGLE(LightEnviSGIX) -#define glLightf MANGLE(Lightf) -#define glLightfv MANGLE(Lightfv) -#define glLighti MANGLE(Lighti) -#define glLightiv MANGLE(Lightiv) -#define glLightModelf MANGLE(LightModelf) -#define glLightModelfv MANGLE(LightModelfv) -#define glLightModeli MANGLE(LightModeli) -#define glLightModeliv MANGLE(LightModeliv) -#define glLineStipple MANGLE(LineStipple) -#define glLineWidth MANGLE(LineWidth) -#define glLinkProgramARB MANGLE(LinkProgramARB) -#define glLinkProgram MANGLE(LinkProgram) -#define glListBase MANGLE(ListBase) -#define glListParameterfSGIX MANGLE(ListParameterfSGIX) -#define glListParameterfvSGIX MANGLE(ListParameterfvSGIX) -#define glListParameteriSGIX MANGLE(ListParameteriSGIX) -#define glListParameterivSGIX MANGLE(ListParameterivSGIX) -#define glLoadIdentityDeformationMapSGIX MANGLE(LoadIdentityDeformationMapSGIX) -#define glLoadIdentity MANGLE(LoadIdentity) -#define glLoadMatrixd MANGLE(LoadMatrixd) -#define glLoadMatrixf MANGLE(LoadMatrixf) -#define glLoadName MANGLE(LoadName) -#define glLoadProgramNV MANGLE(LoadProgramNV) -#define glLoadTransposeMatrixdARB MANGLE(LoadTransposeMatrixdARB) -#define glLoadTransposeMatrixd MANGLE(LoadTransposeMatrixd) -#define glLoadTransposeMatrixfARB MANGLE(LoadTransposeMatrixfARB) -#define glLoadTransposeMatrixf MANGLE(LoadTransposeMatrixf) -#define glLockArraysEXT MANGLE(LockArraysEXT) -#define glLogicOp MANGLE(LogicOp) -#define glMakeBufferNonResidentNV MANGLE(MakeBufferNonResidentNV) -#define glMakeBufferResidentNV MANGLE(MakeBufferResidentNV) -#define glMakeNamedBufferNonResidentNV MANGLE(MakeNamedBufferNonResidentNV) -#define glMakeNamedBufferResidentNV MANGLE(MakeNamedBufferResidentNV) -#define glMap1d MANGLE(Map1d) -#define glMap1f MANGLE(Map1f) -#define glMap2d MANGLE(Map2d) -#define glMap2f MANGLE(Map2f) -#define glMapBufferARB MANGLE(MapBufferARB) -#define glMapBuffer MANGLE(MapBuffer) -#define glMapBufferRange MANGLE(MapBufferRange) -#define glMapControlPointsNV MANGLE(MapControlPointsNV) -#define glMapGrid1d MANGLE(MapGrid1d) -#define glMapGrid1f MANGLE(MapGrid1f) -#define glMapGrid2d MANGLE(MapGrid2d) -#define glMapGrid2f MANGLE(MapGrid2f) -#define glMapNamedBufferEXT MANGLE(MapNamedBufferEXT) -#define glMapNamedBufferRangeEXT MANGLE(MapNamedBufferRangeEXT) -#define glMapObjectBufferATI MANGLE(MapObjectBufferATI) -#define glMapParameterfvNV MANGLE(MapParameterfvNV) -#define glMapParameterivNV MANGLE(MapParameterivNV) -#define glMapVertexAttrib1dAPPLE MANGLE(MapVertexAttrib1dAPPLE) -#define glMapVertexAttrib1fAPPLE MANGLE(MapVertexAttrib1fAPPLE) -#define glMapVertexAttrib2dAPPLE MANGLE(MapVertexAttrib2dAPPLE) -#define glMapVertexAttrib2fAPPLE MANGLE(MapVertexAttrib2fAPPLE) -#define glMaterialf MANGLE(Materialf) -#define glMaterialfv MANGLE(Materialfv) -#define glMateriali MANGLE(Materiali) -#define glMaterialiv MANGLE(Materialiv) -#define glMatrixFrustumEXT MANGLE(MatrixFrustumEXT) -#define glMatrixIndexPointerARB MANGLE(MatrixIndexPointerARB) -#define glMatrixIndexubvARB MANGLE(MatrixIndexubvARB) -#define glMatrixIndexuivARB MANGLE(MatrixIndexuivARB) -#define glMatrixIndexusvARB MANGLE(MatrixIndexusvARB) -#define glMatrixLoaddEXT MANGLE(MatrixLoaddEXT) -#define glMatrixLoadfEXT MANGLE(MatrixLoadfEXT) -#define glMatrixLoadIdentityEXT MANGLE(MatrixLoadIdentityEXT) -#define glMatrixLoadTransposedEXT MANGLE(MatrixLoadTransposedEXT) -#define glMatrixLoadTransposefEXT MANGLE(MatrixLoadTransposefEXT) -#define glMatrixMode MANGLE(MatrixMode) -#define glMatrixMultdEXT MANGLE(MatrixMultdEXT) -#define glMatrixMultfEXT MANGLE(MatrixMultfEXT) -#define glMatrixMultTransposedEXT MANGLE(MatrixMultTransposedEXT) -#define glMatrixMultTransposefEXT MANGLE(MatrixMultTransposefEXT) -#define glMatrixOrthoEXT MANGLE(MatrixOrthoEXT) -#define glMatrixPopEXT MANGLE(MatrixPopEXT) -#define glMatrixPushEXT MANGLE(MatrixPushEXT) -#define glMatrixRotatedEXT MANGLE(MatrixRotatedEXT) -#define glMatrixRotatefEXT MANGLE(MatrixRotatefEXT) -#define glMatrixScaledEXT MANGLE(MatrixScaledEXT) -#define glMatrixScalefEXT MANGLE(MatrixScalefEXT) -#define glMatrixTranslatedEXT MANGLE(MatrixTranslatedEXT) -#define glMatrixTranslatefEXT MANGLE(MatrixTranslatefEXT) -#define glMemoryBarrierEXT MANGLE(MemoryBarrierEXT) -#define glMinmaxEXT MANGLE(MinmaxEXT) -#define glMinmax MANGLE(Minmax) -#define glMinSampleShadingARB MANGLE(MinSampleShadingARB) -#define glMinSampleShading MANGLE(MinSampleShading) -#define glMultiDrawArraysEXT MANGLE(MultiDrawArraysEXT) -#define glMultiDrawArrays MANGLE(MultiDrawArrays) -#define glMultiDrawElementArrayAPPLE MANGLE(MultiDrawElementArrayAPPLE) -#define glMultiDrawElementsBaseVertex MANGLE(MultiDrawElementsBaseVertex) -#define glMultiDrawElementsEXT MANGLE(MultiDrawElementsEXT) -#define glMultiDrawElements MANGLE(MultiDrawElements) -#define glMultiDrawRangeElementArrayAPPLE MANGLE(MultiDrawRangeElementArrayAPPLE) -#define glMultiModeDrawArraysIBM MANGLE(MultiModeDrawArraysIBM) -#define glMultiModeDrawElementsIBM MANGLE(MultiModeDrawElementsIBM) -#define glMultiTexBufferEXT MANGLE(MultiTexBufferEXT) -#define glMultiTexCoord1dARB MANGLE(MultiTexCoord1dARB) -#define glMultiTexCoord1d MANGLE(MultiTexCoord1d) -#define glMultiTexCoord1dvARB MANGLE(MultiTexCoord1dvARB) -#define glMultiTexCoord1dv MANGLE(MultiTexCoord1dv) -#define glMultiTexCoord1fARB MANGLE(MultiTexCoord1fARB) -#define glMultiTexCoord1f MANGLE(MultiTexCoord1f) -#define glMultiTexCoord1fvARB MANGLE(MultiTexCoord1fvARB) -#define glMultiTexCoord1fv MANGLE(MultiTexCoord1fv) -#define glMultiTexCoord1hNV MANGLE(MultiTexCoord1hNV) -#define glMultiTexCoord1hvNV MANGLE(MultiTexCoord1hvNV) -#define glMultiTexCoord1iARB MANGLE(MultiTexCoord1iARB) -#define glMultiTexCoord1i MANGLE(MultiTexCoord1i) -#define glMultiTexCoord1ivARB MANGLE(MultiTexCoord1ivARB) -#define glMultiTexCoord1iv MANGLE(MultiTexCoord1iv) -#define glMultiTexCoord1sARB MANGLE(MultiTexCoord1sARB) -#define glMultiTexCoord1s MANGLE(MultiTexCoord1s) -#define glMultiTexCoord1svARB MANGLE(MultiTexCoord1svARB) -#define glMultiTexCoord1sv MANGLE(MultiTexCoord1sv) -#define glMultiTexCoord2dARB MANGLE(MultiTexCoord2dARB) -#define glMultiTexCoord2d MANGLE(MultiTexCoord2d) -#define glMultiTexCoord2dvARB MANGLE(MultiTexCoord2dvARB) -#define glMultiTexCoord2dv MANGLE(MultiTexCoord2dv) -#define glMultiTexCoord2fARB MANGLE(MultiTexCoord2fARB) -#define glMultiTexCoord2f MANGLE(MultiTexCoord2f) -#define glMultiTexCoord2fvARB MANGLE(MultiTexCoord2fvARB) -#define glMultiTexCoord2fv MANGLE(MultiTexCoord2fv) -#define glMultiTexCoord2hNV MANGLE(MultiTexCoord2hNV) -#define glMultiTexCoord2hvNV MANGLE(MultiTexCoord2hvNV) -#define glMultiTexCoord2iARB MANGLE(MultiTexCoord2iARB) -#define glMultiTexCoord2i MANGLE(MultiTexCoord2i) -#define glMultiTexCoord2ivARB MANGLE(MultiTexCoord2ivARB) -#define glMultiTexCoord2iv MANGLE(MultiTexCoord2iv) -#define glMultiTexCoord2sARB MANGLE(MultiTexCoord2sARB) -#define glMultiTexCoord2s MANGLE(MultiTexCoord2s) -#define glMultiTexCoord2svARB MANGLE(MultiTexCoord2svARB) -#define glMultiTexCoord2sv MANGLE(MultiTexCoord2sv) -#define glMultiTexCoord3dARB MANGLE(MultiTexCoord3dARB) -#define glMultiTexCoord3d MANGLE(MultiTexCoord3d) -#define glMultiTexCoord3dvARB MANGLE(MultiTexCoord3dvARB) -#define glMultiTexCoord3dv MANGLE(MultiTexCoord3dv) -#define glMultiTexCoord3fARB MANGLE(MultiTexCoord3fARB) -#define glMultiTexCoord3f MANGLE(MultiTexCoord3f) -#define glMultiTexCoord3fvARB MANGLE(MultiTexCoord3fvARB) -#define glMultiTexCoord3fv MANGLE(MultiTexCoord3fv) -#define glMultiTexCoord3hNV MANGLE(MultiTexCoord3hNV) -#define glMultiTexCoord3hvNV MANGLE(MultiTexCoord3hvNV) -#define glMultiTexCoord3iARB MANGLE(MultiTexCoord3iARB) -#define glMultiTexCoord3i MANGLE(MultiTexCoord3i) -#define glMultiTexCoord3ivARB MANGLE(MultiTexCoord3ivARB) -#define glMultiTexCoord3iv MANGLE(MultiTexCoord3iv) -#define glMultiTexCoord3sARB MANGLE(MultiTexCoord3sARB) -#define glMultiTexCoord3s MANGLE(MultiTexCoord3s) -#define glMultiTexCoord3svARB MANGLE(MultiTexCoord3svARB) -#define glMultiTexCoord3sv MANGLE(MultiTexCoord3sv) -#define glMultiTexCoord4dARB MANGLE(MultiTexCoord4dARB) -#define glMultiTexCoord4d MANGLE(MultiTexCoord4d) -#define glMultiTexCoord4dvARB MANGLE(MultiTexCoord4dvARB) -#define glMultiTexCoord4dv MANGLE(MultiTexCoord4dv) -#define glMultiTexCoord4fARB MANGLE(MultiTexCoord4fARB) -#define glMultiTexCoord4f MANGLE(MultiTexCoord4f) -#define glMultiTexCoord4fvARB MANGLE(MultiTexCoord4fvARB) -#define glMultiTexCoord4fv MANGLE(MultiTexCoord4fv) -#define glMultiTexCoord4hNV MANGLE(MultiTexCoord4hNV) -#define glMultiTexCoord4hvNV MANGLE(MultiTexCoord4hvNV) -#define glMultiTexCoord4iARB MANGLE(MultiTexCoord4iARB) -#define glMultiTexCoord4i MANGLE(MultiTexCoord4i) -#define glMultiTexCoord4ivARB MANGLE(MultiTexCoord4ivARB) -#define glMultiTexCoord4iv MANGLE(MultiTexCoord4iv) -#define glMultiTexCoord4sARB MANGLE(MultiTexCoord4sARB) -#define glMultiTexCoord4s MANGLE(MultiTexCoord4s) -#define glMultiTexCoord4svARB MANGLE(MultiTexCoord4svARB) -#define glMultiTexCoord4sv MANGLE(MultiTexCoord4sv) -#define glMultiTexCoordP1ui MANGLE(MultiTexCoordP1ui) -#define glMultiTexCoordP1uiv MANGLE(MultiTexCoordP1uiv) -#define glMultiTexCoordP2ui MANGLE(MultiTexCoordP2ui) -#define glMultiTexCoordP2uiv MANGLE(MultiTexCoordP2uiv) -#define glMultiTexCoordP3ui MANGLE(MultiTexCoordP3ui) -#define glMultiTexCoordP3uiv MANGLE(MultiTexCoordP3uiv) -#define glMultiTexCoordP4ui MANGLE(MultiTexCoordP4ui) -#define glMultiTexCoordP4uiv MANGLE(MultiTexCoordP4uiv) -#define glMultiTexCoordPointerEXT MANGLE(MultiTexCoordPointerEXT) -#define glMultiTexEnvfEXT MANGLE(MultiTexEnvfEXT) -#define glMultiTexEnvfvEXT MANGLE(MultiTexEnvfvEXT) -#define glMultiTexEnviEXT MANGLE(MultiTexEnviEXT) -#define glMultiTexEnvivEXT MANGLE(MultiTexEnvivEXT) -#define glMultiTexGendEXT MANGLE(MultiTexGendEXT) -#define glMultiTexGendvEXT MANGLE(MultiTexGendvEXT) -#define glMultiTexGenfEXT MANGLE(MultiTexGenfEXT) -#define glMultiTexGenfvEXT MANGLE(MultiTexGenfvEXT) -#define glMultiTexGeniEXT MANGLE(MultiTexGeniEXT) -#define glMultiTexGenivEXT MANGLE(MultiTexGenivEXT) -#define glMultiTexImage1DEXT MANGLE(MultiTexImage1DEXT) -#define glMultiTexImage2DEXT MANGLE(MultiTexImage2DEXT) -#define glMultiTexImage3DEXT MANGLE(MultiTexImage3DEXT) -#define glMultiTexParameterfEXT MANGLE(MultiTexParameterfEXT) -#define glMultiTexParameterfvEXT MANGLE(MultiTexParameterfvEXT) -#define glMultiTexParameteriEXT MANGLE(MultiTexParameteriEXT) -#define glMultiTexParameterIivEXT MANGLE(MultiTexParameterIivEXT) -#define glMultiTexParameterIuivEXT MANGLE(MultiTexParameterIuivEXT) -#define glMultiTexParameterivEXT MANGLE(MultiTexParameterivEXT) -#define glMultiTexRenderbufferEXT MANGLE(MultiTexRenderbufferEXT) -#define glMultiTexSubImage1DEXT MANGLE(MultiTexSubImage1DEXT) -#define glMultiTexSubImage2DEXT MANGLE(MultiTexSubImage2DEXT) -#define glMultiTexSubImage3DEXT MANGLE(MultiTexSubImage3DEXT) -#define glMultMatrixd MANGLE(MultMatrixd) -#define glMultMatrixf MANGLE(MultMatrixf) -#define glMultTransposeMatrixdARB MANGLE(MultTransposeMatrixdARB) -#define glMultTransposeMatrixd MANGLE(MultTransposeMatrixd) -#define glMultTransposeMatrixfARB MANGLE(MultTransposeMatrixfARB) -#define glMultTransposeMatrixf MANGLE(MultTransposeMatrixf) -#define glNamedBufferDataEXT MANGLE(NamedBufferDataEXT) -#define glNamedBufferSubDataEXT MANGLE(NamedBufferSubDataEXT) -#define glNamedCopyBufferSubDataEXT MANGLE(NamedCopyBufferSubDataEXT) -#define glNamedFramebufferRenderbufferEXT MANGLE(NamedFramebufferRenderbufferEXT) -#define glNamedFramebufferTexture1DEXT MANGLE(NamedFramebufferTexture1DEXT) -#define glNamedFramebufferTexture2DEXT MANGLE(NamedFramebufferTexture2DEXT) -#define glNamedFramebufferTexture3DEXT MANGLE(NamedFramebufferTexture3DEXT) -#define glNamedFramebufferTextureEXT MANGLE(NamedFramebufferTextureEXT) -#define glNamedFramebufferTextureFaceEXT MANGLE(NamedFramebufferTextureFaceEXT) -#define glNamedFramebufferTextureLayerEXT MANGLE(NamedFramebufferTextureLayerEXT) -#define glNamedProgramLocalParameter4dEXT MANGLE(NamedProgramLocalParameter4dEXT) -#define glNamedProgramLocalParameter4dvEXT MANGLE(NamedProgramLocalParameter4dvEXT) -#define glNamedProgramLocalParameter4fEXT MANGLE(NamedProgramLocalParameter4fEXT) -#define glNamedProgramLocalParameter4fvEXT MANGLE(NamedProgramLocalParameter4fvEXT) -#define glNamedProgramLocalParameterI4iEXT MANGLE(NamedProgramLocalParameterI4iEXT) -#define glNamedProgramLocalParameterI4ivEXT MANGLE(NamedProgramLocalParameterI4ivEXT) -#define glNamedProgramLocalParameterI4uiEXT MANGLE(NamedProgramLocalParameterI4uiEXT) -#define glNamedProgramLocalParameterI4uivEXT MANGLE(NamedProgramLocalParameterI4uivEXT) -#define glNamedProgramLocalParameters4fvEXT MANGLE(NamedProgramLocalParameters4fvEXT) -#define glNamedProgramLocalParametersI4ivEXT MANGLE(NamedProgramLocalParametersI4ivEXT) -#define glNamedProgramLocalParametersI4uivEXT MANGLE(NamedProgramLocalParametersI4uivEXT) -#define glNamedProgramStringEXT MANGLE(NamedProgramStringEXT) -#define glNamedRenderbufferStorageEXT MANGLE(NamedRenderbufferStorageEXT) -#define glNamedRenderbufferStorageMultisampleCoverageEXT MANGLE(NamedRenderbufferStorageMultisampleCoverageEXT) -#define glNamedRenderbufferStorageMultisampleEXT MANGLE(NamedRenderbufferStorageMultisampleEXT) -#define glNamedStringARB MANGLE(NamedStringARB) -#define glNewList MANGLE(NewList) -#define glNewObjectBufferATI MANGLE(NewObjectBufferATI) -#define glNormal3b MANGLE(Normal3b) -#define glNormal3bv MANGLE(Normal3bv) -#define glNormal3d MANGLE(Normal3d) -#define glNormal3dv MANGLE(Normal3dv) -#define glNormal3f MANGLE(Normal3f) -#define glNormal3fVertex3fSUN MANGLE(Normal3fVertex3fSUN) -#define glNormal3fVertex3fvSUN MANGLE(Normal3fVertex3fvSUN) -#define glNormal3fv MANGLE(Normal3fv) -#define glNormal3hNV MANGLE(Normal3hNV) -#define glNormal3hvNV MANGLE(Normal3hvNV) -#define glNormal3i MANGLE(Normal3i) -#define glNormal3iv MANGLE(Normal3iv) -#define glNormal3s MANGLE(Normal3s) -#define glNormal3sv MANGLE(Normal3sv) -#define glNormalFormatNV MANGLE(NormalFormatNV) -#define glNormalP3ui MANGLE(NormalP3ui) -#define glNormalP3uiv MANGLE(NormalP3uiv) -#define glNormalPointerEXT MANGLE(NormalPointerEXT) -#define glNormalPointerListIBM MANGLE(NormalPointerListIBM) -#define glNormalPointer MANGLE(NormalPointer) -#define glNormalPointervINTEL MANGLE(NormalPointervINTEL) -#define glNormalStream3bATI MANGLE(NormalStream3bATI) -#define glNormalStream3bvATI MANGLE(NormalStream3bvATI) -#define glNormalStream3dATI MANGLE(NormalStream3dATI) -#define glNormalStream3dvATI MANGLE(NormalStream3dvATI) -#define glNormalStream3fATI MANGLE(NormalStream3fATI) -#define glNormalStream3fvATI MANGLE(NormalStream3fvATI) -#define glNormalStream3iATI MANGLE(NormalStream3iATI) -#define glNormalStream3ivATI MANGLE(NormalStream3ivATI) -#define glNormalStream3sATI MANGLE(NormalStream3sATI) -#define glNormalStream3svATI MANGLE(NormalStream3svATI) -#define glObjectPurgeableAPPLE MANGLE(ObjectPurgeableAPPLE) -#define glObjectUnpurgeableAPPLE MANGLE(ObjectUnpurgeableAPPLE) -#define glOrtho MANGLE(Ortho) -#define glPassTexCoordATI MANGLE(PassTexCoordATI) -#define glPassThrough MANGLE(PassThrough) -#define glPatchParameterfv MANGLE(PatchParameterfv) -#define glPatchParameteri MANGLE(PatchParameteri) -#define glPauseTransformFeedback MANGLE(PauseTransformFeedback) -#define glPauseTransformFeedbackNV MANGLE(PauseTransformFeedbackNV) -#define glPixelDataRangeNV MANGLE(PixelDataRangeNV) -#define glPixelMapfv MANGLE(PixelMapfv) -#define glPixelMapuiv MANGLE(PixelMapuiv) -#define glPixelMapusv MANGLE(PixelMapusv) -#define glPixelStoref MANGLE(PixelStoref) -#define glPixelStorei MANGLE(PixelStorei) -#define glPixelTexGenParameterfSGIS MANGLE(PixelTexGenParameterfSGIS) -#define glPixelTexGenParameterfvSGIS MANGLE(PixelTexGenParameterfvSGIS) -#define glPixelTexGenParameteriSGIS MANGLE(PixelTexGenParameteriSGIS) -#define glPixelTexGenParameterivSGIS MANGLE(PixelTexGenParameterivSGIS) -#define glPixelTexGenSGIX MANGLE(PixelTexGenSGIX) -#define glPixelTransferf MANGLE(PixelTransferf) -#define glPixelTransferi MANGLE(PixelTransferi) -#define glPixelTransformParameterfEXT MANGLE(PixelTransformParameterfEXT) -#define glPixelTransformParameterfvEXT MANGLE(PixelTransformParameterfvEXT) -#define glPixelTransformParameteriEXT MANGLE(PixelTransformParameteriEXT) -#define glPixelTransformParameterivEXT MANGLE(PixelTransformParameterivEXT) -#define glPixelZoom MANGLE(PixelZoom) -#define glPNTrianglesfATI MANGLE(PNTrianglesfATI) -#define glPNTrianglesiATI MANGLE(PNTrianglesiATI) -#define glPointParameterfARB MANGLE(PointParameterfARB) -#define glPointParameterfEXT MANGLE(PointParameterfEXT) -#define glPointParameterf MANGLE(PointParameterf) -#define glPointParameterfSGIS MANGLE(PointParameterfSGIS) -#define glPointParameterfvARB MANGLE(PointParameterfvARB) -#define glPointParameterfvEXT MANGLE(PointParameterfvEXT) -#define glPointParameterfv MANGLE(PointParameterfv) -#define glPointParameterfvSGIS MANGLE(PointParameterfvSGIS) -#define glPointParameteri MANGLE(PointParameteri) -#define glPointParameteriNV MANGLE(PointParameteriNV) -#define glPointParameteriv MANGLE(PointParameteriv) -#define glPointParameterivNV MANGLE(PointParameterivNV) -#define glPointSize MANGLE(PointSize) -#define glPollAsyncSGIX MANGLE(PollAsyncSGIX) -#define glPollInstrumentsSGIX MANGLE(PollInstrumentsSGIX) -#define glPolygonMode MANGLE(PolygonMode) -#define glPolygonOffsetEXT MANGLE(PolygonOffsetEXT) -#define glPolygonOffset MANGLE(PolygonOffset) -#define glPolygonStipple MANGLE(PolygonStipple) -#define glPopAttrib MANGLE(PopAttrib) -#define glPopClientAttrib MANGLE(PopClientAttrib) -#define glPopMatrix MANGLE(PopMatrix) -#define glPopName MANGLE(PopName) -#define glPresentFrameDualFillNV MANGLE(PresentFrameDualFillNV) -#define glPresentFrameKeyedNV MANGLE(PresentFrameKeyedNV) -#define glPrimitiveRestartIndex MANGLE(PrimitiveRestartIndex) -#define glPrimitiveRestartIndexNV MANGLE(PrimitiveRestartIndexNV) -#define glPrimitiveRestartNV MANGLE(PrimitiveRestartNV) -#define glPrioritizeTexturesEXT MANGLE(PrioritizeTexturesEXT) -#define glPrioritizeTextures MANGLE(PrioritizeTextures) -#define glProgramBinary MANGLE(ProgramBinary) -#define glProgramBufferParametersfvNV MANGLE(ProgramBufferParametersfvNV) -#define glProgramBufferParametersIivNV MANGLE(ProgramBufferParametersIivNV) -#define glProgramBufferParametersIuivNV MANGLE(ProgramBufferParametersIuivNV) -#define glProgramCallbackMESA MANGLE(ProgramCallbackMESA) -#define glProgramEnvParameter4dARB MANGLE(ProgramEnvParameter4dARB) -#define glProgramEnvParameter4dvARB MANGLE(ProgramEnvParameter4dvARB) -#define glProgramEnvParameter4fARB MANGLE(ProgramEnvParameter4fARB) -#define glProgramEnvParameter4fvARB MANGLE(ProgramEnvParameter4fvARB) -#define glProgramEnvParameterI4iNV MANGLE(ProgramEnvParameterI4iNV) -#define glProgramEnvParameterI4ivNV MANGLE(ProgramEnvParameterI4ivNV) -#define glProgramEnvParameterI4uiNV MANGLE(ProgramEnvParameterI4uiNV) -#define glProgramEnvParameterI4uivNV MANGLE(ProgramEnvParameterI4uivNV) -#define glProgramEnvParameters4fvEXT MANGLE(ProgramEnvParameters4fvEXT) -#define glProgramEnvParametersI4ivNV MANGLE(ProgramEnvParametersI4ivNV) -#define glProgramEnvParametersI4uivNV MANGLE(ProgramEnvParametersI4uivNV) -#define glProgramLocalParameter4dARB MANGLE(ProgramLocalParameter4dARB) -#define glProgramLocalParameter4dvARB MANGLE(ProgramLocalParameter4dvARB) -#define glProgramLocalParameter4fARB MANGLE(ProgramLocalParameter4fARB) -#define glProgramLocalParameter4fvARB MANGLE(ProgramLocalParameter4fvARB) -#define glProgramLocalParameterI4iNV MANGLE(ProgramLocalParameterI4iNV) -#define glProgramLocalParameterI4ivNV MANGLE(ProgramLocalParameterI4ivNV) -#define glProgramLocalParameterI4uiNV MANGLE(ProgramLocalParameterI4uiNV) -#define glProgramLocalParameterI4uivNV MANGLE(ProgramLocalParameterI4uivNV) -#define glProgramLocalParameters4fvEXT MANGLE(ProgramLocalParameters4fvEXT) -#define glProgramLocalParametersI4ivNV MANGLE(ProgramLocalParametersI4ivNV) -#define glProgramLocalParametersI4uivNV MANGLE(ProgramLocalParametersI4uivNV) -#define glProgramNamedParameter4dNV MANGLE(ProgramNamedParameter4dNV) -#define glProgramNamedParameter4dvNV MANGLE(ProgramNamedParameter4dvNV) -#define glProgramNamedParameter4fNV MANGLE(ProgramNamedParameter4fNV) -#define glProgramNamedParameter4fvNV MANGLE(ProgramNamedParameter4fvNV) -#define glProgramParameter4dNV MANGLE(ProgramParameter4dNV) -#define glProgramParameter4dvNV MANGLE(ProgramParameter4dvNV) -#define glProgramParameter4fNV MANGLE(ProgramParameter4fNV) -#define glProgramParameter4fvNV MANGLE(ProgramParameter4fvNV) -#define glProgramParameteriARB MANGLE(ProgramParameteriARB) -#define glProgramParameteriEXT MANGLE(ProgramParameteriEXT) -#define glProgramParameteri MANGLE(ProgramParameteri) -#define glProgramParameters4dvNV MANGLE(ProgramParameters4dvNV) -#define glProgramParameters4fvNV MANGLE(ProgramParameters4fvNV) -#define glProgramStringARB MANGLE(ProgramStringARB) -#define glProgramSubroutineParametersuivNV MANGLE(ProgramSubroutineParametersuivNV) -#define glProgramUniform1dEXT MANGLE(ProgramUniform1dEXT) -#define glProgramUniform1d MANGLE(ProgramUniform1d) -#define glProgramUniform1dvEXT MANGLE(ProgramUniform1dvEXT) -#define glProgramUniform1dv MANGLE(ProgramUniform1dv) -#define glProgramUniform1fEXT MANGLE(ProgramUniform1fEXT) -#define glProgramUniform1f MANGLE(ProgramUniform1f) -#define glProgramUniform1fvEXT MANGLE(ProgramUniform1fvEXT) -#define glProgramUniform1fv MANGLE(ProgramUniform1fv) -#define glProgramUniform1i64NV MANGLE(ProgramUniform1i64NV) -#define glProgramUniform1i64vNV MANGLE(ProgramUniform1i64vNV) -#define glProgramUniform1iEXT MANGLE(ProgramUniform1iEXT) -#define glProgramUniform1i MANGLE(ProgramUniform1i) -#define glProgramUniform1ivEXT MANGLE(ProgramUniform1ivEXT) -#define glProgramUniform1iv MANGLE(ProgramUniform1iv) -#define glProgramUniform1ui64NV MANGLE(ProgramUniform1ui64NV) -#define glProgramUniform1ui64vNV MANGLE(ProgramUniform1ui64vNV) -#define glProgramUniform1uiEXT MANGLE(ProgramUniform1uiEXT) -#define glProgramUniform1ui MANGLE(ProgramUniform1ui) -#define glProgramUniform1uivEXT MANGLE(ProgramUniform1uivEXT) -#define glProgramUniform1uiv MANGLE(ProgramUniform1uiv) -#define glProgramUniform2dEXT MANGLE(ProgramUniform2dEXT) -#define glProgramUniform2d MANGLE(ProgramUniform2d) -#define glProgramUniform2dvEXT MANGLE(ProgramUniform2dvEXT) -#define glProgramUniform2dv MANGLE(ProgramUniform2dv) -#define glProgramUniform2fEXT MANGLE(ProgramUniform2fEXT) -#define glProgramUniform2f MANGLE(ProgramUniform2f) -#define glProgramUniform2fvEXT MANGLE(ProgramUniform2fvEXT) -#define glProgramUniform2fv MANGLE(ProgramUniform2fv) -#define glProgramUniform2i64NV MANGLE(ProgramUniform2i64NV) -#define glProgramUniform2i64vNV MANGLE(ProgramUniform2i64vNV) -#define glProgramUniform2iEXT MANGLE(ProgramUniform2iEXT) -#define glProgramUniform2i MANGLE(ProgramUniform2i) -#define glProgramUniform2ivEXT MANGLE(ProgramUniform2ivEXT) -#define glProgramUniform2iv MANGLE(ProgramUniform2iv) -#define glProgramUniform2ui64NV MANGLE(ProgramUniform2ui64NV) -#define glProgramUniform2ui64vNV MANGLE(ProgramUniform2ui64vNV) -#define glProgramUniform2uiEXT MANGLE(ProgramUniform2uiEXT) -#define glProgramUniform2ui MANGLE(ProgramUniform2ui) -#define glProgramUniform2uivEXT MANGLE(ProgramUniform2uivEXT) -#define glProgramUniform2uiv MANGLE(ProgramUniform2uiv) -#define glProgramUniform3dEXT MANGLE(ProgramUniform3dEXT) -#define glProgramUniform3d MANGLE(ProgramUniform3d) -#define glProgramUniform3dvEXT MANGLE(ProgramUniform3dvEXT) -#define glProgramUniform3dv MANGLE(ProgramUniform3dv) -#define glProgramUniform3fEXT MANGLE(ProgramUniform3fEXT) -#define glProgramUniform3f MANGLE(ProgramUniform3f) -#define glProgramUniform3fvEXT MANGLE(ProgramUniform3fvEXT) -#define glProgramUniform3fv MANGLE(ProgramUniform3fv) -#define glProgramUniform3i64NV MANGLE(ProgramUniform3i64NV) -#define glProgramUniform3i64vNV MANGLE(ProgramUniform3i64vNV) -#define glProgramUniform3iEXT MANGLE(ProgramUniform3iEXT) -#define glProgramUniform3i MANGLE(ProgramUniform3i) -#define glProgramUniform3ivEXT MANGLE(ProgramUniform3ivEXT) -#define glProgramUniform3iv MANGLE(ProgramUniform3iv) -#define glProgramUniform3ui64NV MANGLE(ProgramUniform3ui64NV) -#define glProgramUniform3ui64vNV MANGLE(ProgramUniform3ui64vNV) -#define glProgramUniform3uiEXT MANGLE(ProgramUniform3uiEXT) -#define glProgramUniform3ui MANGLE(ProgramUniform3ui) -#define glProgramUniform3uivEXT MANGLE(ProgramUniform3uivEXT) -#define glProgramUniform3uiv MANGLE(ProgramUniform3uiv) -#define glProgramUniform4dEXT MANGLE(ProgramUniform4dEXT) -#define glProgramUniform4d MANGLE(ProgramUniform4d) -#define glProgramUniform4dvEXT MANGLE(ProgramUniform4dvEXT) -#define glProgramUniform4dv MANGLE(ProgramUniform4dv) -#define glProgramUniform4fEXT MANGLE(ProgramUniform4fEXT) -#define glProgramUniform4f MANGLE(ProgramUniform4f) -#define glProgramUniform4fvEXT MANGLE(ProgramUniform4fvEXT) -#define glProgramUniform4fv MANGLE(ProgramUniform4fv) -#define glProgramUniform4i64NV MANGLE(ProgramUniform4i64NV) -#define glProgramUniform4i64vNV MANGLE(ProgramUniform4i64vNV) -#define glProgramUniform4iEXT MANGLE(ProgramUniform4iEXT) -#define glProgramUniform4i MANGLE(ProgramUniform4i) -#define glProgramUniform4ivEXT MANGLE(ProgramUniform4ivEXT) -#define glProgramUniform4iv MANGLE(ProgramUniform4iv) -#define glProgramUniform4ui64NV MANGLE(ProgramUniform4ui64NV) -#define glProgramUniform4ui64vNV MANGLE(ProgramUniform4ui64vNV) -#define glProgramUniform4uiEXT MANGLE(ProgramUniform4uiEXT) -#define glProgramUniform4ui MANGLE(ProgramUniform4ui) -#define glProgramUniform4uivEXT MANGLE(ProgramUniform4uivEXT) -#define glProgramUniform4uiv MANGLE(ProgramUniform4uiv) -#define glProgramUniformMatrix2dvEXT MANGLE(ProgramUniformMatrix2dvEXT) -#define glProgramUniformMatrix2dv MANGLE(ProgramUniformMatrix2dv) -#define glProgramUniformMatrix2fvEXT MANGLE(ProgramUniformMatrix2fvEXT) -#define glProgramUniformMatrix2fv MANGLE(ProgramUniformMatrix2fv) -#define glProgramUniformMatrix2x3dvEXT MANGLE(ProgramUniformMatrix2x3dvEXT) -#define glProgramUniformMatrix2x3dv MANGLE(ProgramUniformMatrix2x3dv) -#define glProgramUniformMatrix2x3fvEXT MANGLE(ProgramUniformMatrix2x3fvEXT) -#define glProgramUniformMatrix2x3fv MANGLE(ProgramUniformMatrix2x3fv) -#define glProgramUniformMatrix2x4dvEXT MANGLE(ProgramUniformMatrix2x4dvEXT) -#define glProgramUniformMatrix2x4dv MANGLE(ProgramUniformMatrix2x4dv) -#define glProgramUniformMatrix2x4fvEXT MANGLE(ProgramUniformMatrix2x4fvEXT) -#define glProgramUniformMatrix2x4fv MANGLE(ProgramUniformMatrix2x4fv) -#define glProgramUniformMatrix3dvEXT MANGLE(ProgramUniformMatrix3dvEXT) -#define glProgramUniformMatrix3dv MANGLE(ProgramUniformMatrix3dv) -#define glProgramUniformMatrix3fvEXT MANGLE(ProgramUniformMatrix3fvEXT) -#define glProgramUniformMatrix3fv MANGLE(ProgramUniformMatrix3fv) -#define glProgramUniformMatrix3x2dvEXT MANGLE(ProgramUniformMatrix3x2dvEXT) -#define glProgramUniformMatrix3x2dv MANGLE(ProgramUniformMatrix3x2dv) -#define glProgramUniformMatrix3x2fvEXT MANGLE(ProgramUniformMatrix3x2fvEXT) -#define glProgramUniformMatrix3x2fv MANGLE(ProgramUniformMatrix3x2fv) -#define glProgramUniformMatrix3x4dvEXT MANGLE(ProgramUniformMatrix3x4dvEXT) -#define glProgramUniformMatrix3x4dv MANGLE(ProgramUniformMatrix3x4dv) -#define glProgramUniformMatrix3x4fvEXT MANGLE(ProgramUniformMatrix3x4fvEXT) -#define glProgramUniformMatrix3x4fv MANGLE(ProgramUniformMatrix3x4fv) -#define glProgramUniformMatrix4dvEXT MANGLE(ProgramUniformMatrix4dvEXT) -#define glProgramUniformMatrix4dv MANGLE(ProgramUniformMatrix4dv) -#define glProgramUniformMatrix4fvEXT MANGLE(ProgramUniformMatrix4fvEXT) -#define glProgramUniformMatrix4fv MANGLE(ProgramUniformMatrix4fv) -#define glProgramUniformMatrix4x2dvEXT MANGLE(ProgramUniformMatrix4x2dvEXT) -#define glProgramUniformMatrix4x2dv MANGLE(ProgramUniformMatrix4x2dv) -#define glProgramUniformMatrix4x2fvEXT MANGLE(ProgramUniformMatrix4x2fvEXT) -#define glProgramUniformMatrix4x2fv MANGLE(ProgramUniformMatrix4x2fv) -#define glProgramUniformMatrix4x3dvEXT MANGLE(ProgramUniformMatrix4x3dvEXT) -#define glProgramUniformMatrix4x3dv MANGLE(ProgramUniformMatrix4x3dv) -#define glProgramUniformMatrix4x3fvEXT MANGLE(ProgramUniformMatrix4x3fvEXT) -#define glProgramUniformMatrix4x3fv MANGLE(ProgramUniformMatrix4x3fv) -#define glProgramUniformui64NV MANGLE(ProgramUniformui64NV) -#define glProgramUniformui64vNV MANGLE(ProgramUniformui64vNV) -#define glProgramVertexLimitNV MANGLE(ProgramVertexLimitNV) -#define glProvokingVertexEXT MANGLE(ProvokingVertexEXT) -#define glProvokingVertex MANGLE(ProvokingVertex) -#define glPushAttrib MANGLE(PushAttrib) -#define glPushClientAttribDefaultEXT MANGLE(PushClientAttribDefaultEXT) -#define glPushClientAttrib MANGLE(PushClientAttrib) -#define glPushMatrix MANGLE(PushMatrix) -#define glPushName MANGLE(PushName) -#define glQueryCounter MANGLE(QueryCounter) -#define glRasterPos2d MANGLE(RasterPos2d) -#define glRasterPos2dv MANGLE(RasterPos2dv) -#define glRasterPos2f MANGLE(RasterPos2f) -#define glRasterPos2fv MANGLE(RasterPos2fv) -#define glRasterPos2i MANGLE(RasterPos2i) -#define glRasterPos2iv MANGLE(RasterPos2iv) -#define glRasterPos2s MANGLE(RasterPos2s) -#define glRasterPos2sv MANGLE(RasterPos2sv) -#define glRasterPos3d MANGLE(RasterPos3d) -#define glRasterPos3dv MANGLE(RasterPos3dv) -#define glRasterPos3f MANGLE(RasterPos3f) -#define glRasterPos3fv MANGLE(RasterPos3fv) -#define glRasterPos3i MANGLE(RasterPos3i) -#define glRasterPos3iv MANGLE(RasterPos3iv) -#define glRasterPos3s MANGLE(RasterPos3s) -#define glRasterPos3sv MANGLE(RasterPos3sv) -#define glRasterPos4d MANGLE(RasterPos4d) -#define glRasterPos4dv MANGLE(RasterPos4dv) -#define glRasterPos4f MANGLE(RasterPos4f) -#define glRasterPos4fv MANGLE(RasterPos4fv) -#define glRasterPos4i MANGLE(RasterPos4i) -#define glRasterPos4iv MANGLE(RasterPos4iv) -#define glRasterPos4s MANGLE(RasterPos4s) -#define glRasterPos4sv MANGLE(RasterPos4sv) -#define glReadBuffer MANGLE(ReadBuffer) -#define glReadInstrumentsSGIX MANGLE(ReadInstrumentsSGIX) -#define glReadnPixelsARB MANGLE(ReadnPixelsARB) -#define glReadPixels MANGLE(ReadPixels) -#define glRectd MANGLE(Rectd) -#define glRectdv MANGLE(Rectdv) -#define glRectf MANGLE(Rectf) -#define glRectfv MANGLE(Rectfv) -#define glRecti MANGLE(Recti) -#define glRectiv MANGLE(Rectiv) -#define glRects MANGLE(Rects) -#define glRectsv MANGLE(Rectsv) -#define glReferencePlaneSGIX MANGLE(ReferencePlaneSGIX) -#define glReleaseShaderCompiler MANGLE(ReleaseShaderCompiler) -#define glRenderbufferStorageEXT MANGLE(RenderbufferStorageEXT) -#define glRenderbufferStorage MANGLE(RenderbufferStorage) -#define glRenderbufferStorageMultisampleCoverageNV MANGLE(RenderbufferStorageMultisampleCoverageNV) -#define glRenderbufferStorageMultisampleEXT MANGLE(RenderbufferStorageMultisampleEXT) -#define glRenderbufferStorageMultisample MANGLE(RenderbufferStorageMultisample) -#define glRenderMode MANGLE(RenderMode) -#define glReplacementCodePointerSUN MANGLE(ReplacementCodePointerSUN) -#define glReplacementCodeubSUN MANGLE(ReplacementCodeubSUN) -#define glReplacementCodeubvSUN MANGLE(ReplacementCodeubvSUN) -#define glReplacementCodeuiColor3fVertex3fSUN MANGLE(ReplacementCodeuiColor3fVertex3fSUN) -#define glReplacementCodeuiColor3fVertex3fvSUN MANGLE(ReplacementCodeuiColor3fVertex3fvSUN) -#define glReplacementCodeuiColor4fNormal3fVertex3fSUN MANGLE(ReplacementCodeuiColor4fNormal3fVertex3fSUN) -#define glReplacementCodeuiColor4fNormal3fVertex3fvSUN MANGLE(ReplacementCodeuiColor4fNormal3fVertex3fvSUN) -#define glReplacementCodeuiColor4ubVertex3fSUN MANGLE(ReplacementCodeuiColor4ubVertex3fSUN) -#define glReplacementCodeuiColor4ubVertex3fvSUN MANGLE(ReplacementCodeuiColor4ubVertex3fvSUN) -#define glReplacementCodeuiNormal3fVertex3fSUN MANGLE(ReplacementCodeuiNormal3fVertex3fSUN) -#define glReplacementCodeuiNormal3fVertex3fvSUN MANGLE(ReplacementCodeuiNormal3fVertex3fvSUN) -#define glReplacementCodeuiSUN MANGLE(ReplacementCodeuiSUN) -#define glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN MANGLE(ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN) -#define glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN MANGLE(ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN) -#define glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN MANGLE(ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN) -#define glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN MANGLE(ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN) -#define glReplacementCodeuiTexCoord2fVertex3fSUN MANGLE(ReplacementCodeuiTexCoord2fVertex3fSUN) -#define glReplacementCodeuiTexCoord2fVertex3fvSUN MANGLE(ReplacementCodeuiTexCoord2fVertex3fvSUN) -#define glReplacementCodeuiVertex3fSUN MANGLE(ReplacementCodeuiVertex3fSUN) -#define glReplacementCodeuiVertex3fvSUN MANGLE(ReplacementCodeuiVertex3fvSUN) -#define glReplacementCodeuivSUN MANGLE(ReplacementCodeuivSUN) -#define glReplacementCodeusSUN MANGLE(ReplacementCodeusSUN) -#define glReplacementCodeusvSUN MANGLE(ReplacementCodeusvSUN) -#define glRequestResidentProgramsNV MANGLE(RequestResidentProgramsNV) -#define glResetHistogramEXT MANGLE(ResetHistogramEXT) -#define glResetHistogram MANGLE(ResetHistogram) -#define glResetMinmaxEXT MANGLE(ResetMinmaxEXT) -#define glResetMinmax MANGLE(ResetMinmax) -#define glResizeBuffersMESA MANGLE(ResizeBuffersMESA) -#define glResumeTransformFeedback MANGLE(ResumeTransformFeedback) -#define glResumeTransformFeedbackNV MANGLE(ResumeTransformFeedbackNV) -#define glRotated MANGLE(Rotated) -#define glRotatef MANGLE(Rotatef) -#define glSampleCoverageARB MANGLE(SampleCoverageARB) -#define glSampleCoverage MANGLE(SampleCoverage) -#define glSampleMapATI MANGLE(SampleMapATI) -#define glSampleMaskEXT MANGLE(SampleMaskEXT) -#define glSampleMaski MANGLE(SampleMaski) -#define glSampleMaskIndexedNV MANGLE(SampleMaskIndexedNV) -#define glSampleMaskSGIS MANGLE(SampleMaskSGIS) -#define glSamplePatternEXT MANGLE(SamplePatternEXT) -#define glSamplePatternSGIS MANGLE(SamplePatternSGIS) -#define glSamplerParameterf MANGLE(SamplerParameterf) -#define glSamplerParameterfv MANGLE(SamplerParameterfv) -#define glSamplerParameterIiv MANGLE(SamplerParameterIiv) -#define glSamplerParameteri MANGLE(SamplerParameteri) -#define glSamplerParameterIuiv MANGLE(SamplerParameterIuiv) -#define glSamplerParameteriv MANGLE(SamplerParameteriv) -#define glScaled MANGLE(Scaled) -#define glScalef MANGLE(Scalef) -#define glScissorArrayv MANGLE(ScissorArrayv) -#define glScissorIndexed MANGLE(ScissorIndexed) -#define glScissorIndexedv MANGLE(ScissorIndexedv) -#define glScissor MANGLE(Scissor) -#define glSecondaryColor3bEXT MANGLE(SecondaryColor3bEXT) -#define glSecondaryColor3b MANGLE(SecondaryColor3b) -#define glSecondaryColor3bvEXT MANGLE(SecondaryColor3bvEXT) -#define glSecondaryColor3bv MANGLE(SecondaryColor3bv) -#define glSecondaryColor3dEXT MANGLE(SecondaryColor3dEXT) -#define glSecondaryColor3d MANGLE(SecondaryColor3d) -#define glSecondaryColor3dvEXT MANGLE(SecondaryColor3dvEXT) -#define glSecondaryColor3dv MANGLE(SecondaryColor3dv) -#define glSecondaryColor3fEXT MANGLE(SecondaryColor3fEXT) -#define glSecondaryColor3f MANGLE(SecondaryColor3f) -#define glSecondaryColor3fvEXT MANGLE(SecondaryColor3fvEXT) -#define glSecondaryColor3fv MANGLE(SecondaryColor3fv) -#define glSecondaryColor3hNV MANGLE(SecondaryColor3hNV) -#define glSecondaryColor3hvNV MANGLE(SecondaryColor3hvNV) -#define glSecondaryColor3iEXT MANGLE(SecondaryColor3iEXT) -#define glSecondaryColor3i MANGLE(SecondaryColor3i) -#define glSecondaryColor3ivEXT MANGLE(SecondaryColor3ivEXT) -#define glSecondaryColor3iv MANGLE(SecondaryColor3iv) -#define glSecondaryColor3sEXT MANGLE(SecondaryColor3sEXT) -#define glSecondaryColor3s MANGLE(SecondaryColor3s) -#define glSecondaryColor3svEXT MANGLE(SecondaryColor3svEXT) -#define glSecondaryColor3sv MANGLE(SecondaryColor3sv) -#define glSecondaryColor3ubEXT MANGLE(SecondaryColor3ubEXT) -#define glSecondaryColor3ub MANGLE(SecondaryColor3ub) -#define glSecondaryColor3ubvEXT MANGLE(SecondaryColor3ubvEXT) -#define glSecondaryColor3ubv MANGLE(SecondaryColor3ubv) -#define glSecondaryColor3uiEXT MANGLE(SecondaryColor3uiEXT) -#define glSecondaryColor3ui MANGLE(SecondaryColor3ui) -#define glSecondaryColor3uivEXT MANGLE(SecondaryColor3uivEXT) -#define glSecondaryColor3uiv MANGLE(SecondaryColor3uiv) -#define glSecondaryColor3usEXT MANGLE(SecondaryColor3usEXT) -#define glSecondaryColor3us MANGLE(SecondaryColor3us) -#define glSecondaryColor3usvEXT MANGLE(SecondaryColor3usvEXT) -#define glSecondaryColor3usv MANGLE(SecondaryColor3usv) -#define glSecondaryColorFormatNV MANGLE(SecondaryColorFormatNV) -#define glSecondaryColorP3ui MANGLE(SecondaryColorP3ui) -#define glSecondaryColorP3uiv MANGLE(SecondaryColorP3uiv) -#define glSecondaryColorPointerEXT MANGLE(SecondaryColorPointerEXT) -#define glSecondaryColorPointerListIBM MANGLE(SecondaryColorPointerListIBM) -#define glSecondaryColorPointer MANGLE(SecondaryColorPointer) -#define glSelectBuffer MANGLE(SelectBuffer) -#define glSelectPerfMonitorCountersAMD MANGLE(SelectPerfMonitorCountersAMD) -#define glSeparableFilter2DEXT MANGLE(SeparableFilter2DEXT) -#define glSeparableFilter2D MANGLE(SeparableFilter2D) -#define glSetFenceAPPLE MANGLE(SetFenceAPPLE) -#define glSetFenceNV MANGLE(SetFenceNV) -#define glSetFragmentShaderConstantATI MANGLE(SetFragmentShaderConstantATI) -#define glSetInvariantEXT MANGLE(SetInvariantEXT) -#define glSetLocalConstantEXT MANGLE(SetLocalConstantEXT) -#define glShadeModel MANGLE(ShadeModel) -#define glShaderBinary MANGLE(ShaderBinary) -#define glShaderOp1EXT MANGLE(ShaderOp1EXT) -#define glShaderOp2EXT MANGLE(ShaderOp2EXT) -#define glShaderOp3EXT MANGLE(ShaderOp3EXT) -#define glShaderSourceARB MANGLE(ShaderSourceARB) -#define glShaderSource MANGLE(ShaderSource) -#define glSharpenTexFuncSGIS MANGLE(SharpenTexFuncSGIS) -#define glSpriteParameterfSGIX MANGLE(SpriteParameterfSGIX) -#define glSpriteParameterfvSGIX MANGLE(SpriteParameterfvSGIX) -#define glSpriteParameteriSGIX MANGLE(SpriteParameteriSGIX) -#define glSpriteParameterivSGIX MANGLE(SpriteParameterivSGIX) -#define glStartInstrumentsSGIX MANGLE(StartInstrumentsSGIX) -#define glStencilClearTagEXT MANGLE(StencilClearTagEXT) -#define glStencilFunc MANGLE(StencilFunc) -#define glStencilFuncSeparateATI MANGLE(StencilFuncSeparateATI) -#define glStencilFuncSeparate MANGLE(StencilFuncSeparate) -#define glStencilMask MANGLE(StencilMask) -#define glStencilMaskSeparate MANGLE(StencilMaskSeparate) -#define glStencilOp MANGLE(StencilOp) -#define glStencilOpSeparateATI MANGLE(StencilOpSeparateATI) -#define glStencilOpSeparate MANGLE(StencilOpSeparate) -#define glStopInstrumentsSGIX MANGLE(StopInstrumentsSGIX) -#define glStringMarkerGREMEDY MANGLE(StringMarkerGREMEDY) -#define glSwizzleEXT MANGLE(SwizzleEXT) -#define glTagSampleBufferSGIX MANGLE(TagSampleBufferSGIX) -#define glTangent3bEXT MANGLE(Tangent3bEXT) -#define glTangent3bvEXT MANGLE(Tangent3bvEXT) -#define glTangent3dEXT MANGLE(Tangent3dEXT) -#define glTangent3dvEXT MANGLE(Tangent3dvEXT) -#define glTangent3fEXT MANGLE(Tangent3fEXT) -#define glTangent3fvEXT MANGLE(Tangent3fvEXT) -#define glTangent3iEXT MANGLE(Tangent3iEXT) -#define glTangent3ivEXT MANGLE(Tangent3ivEXT) -#define glTangent3sEXT MANGLE(Tangent3sEXT) -#define glTangent3svEXT MANGLE(Tangent3svEXT) -#define glTangentPointerEXT MANGLE(TangentPointerEXT) -#define glTbufferMask3DFX MANGLE(TbufferMask3DFX) -#define glTessellationFactorAMD MANGLE(TessellationFactorAMD) -#define glTessellationModeAMD MANGLE(TessellationModeAMD) -#define glTestFenceAPPLE MANGLE(TestFenceAPPLE) -#define glTestFenceNV MANGLE(TestFenceNV) -#define glTestObjectAPPLE MANGLE(TestObjectAPPLE) -#define glTexBufferARB MANGLE(TexBufferARB) -#define glTexBufferEXT MANGLE(TexBufferEXT) -#define glTexBuffer MANGLE(TexBuffer) -#define glTexBumpParameterfvATI MANGLE(TexBumpParameterfvATI) -#define glTexBumpParameterivATI MANGLE(TexBumpParameterivATI) -#define glTexCoord1d MANGLE(TexCoord1d) -#define glTexCoord1dv MANGLE(TexCoord1dv) -#define glTexCoord1f MANGLE(TexCoord1f) -#define glTexCoord1fv MANGLE(TexCoord1fv) -#define glTexCoord1hNV MANGLE(TexCoord1hNV) -#define glTexCoord1hvNV MANGLE(TexCoord1hvNV) -#define glTexCoord1i MANGLE(TexCoord1i) -#define glTexCoord1iv MANGLE(TexCoord1iv) -#define glTexCoord1s MANGLE(TexCoord1s) -#define glTexCoord1sv MANGLE(TexCoord1sv) -#define glTexCoord2d MANGLE(TexCoord2d) -#define glTexCoord2dv MANGLE(TexCoord2dv) -#define glTexCoord2fColor3fVertex3fSUN MANGLE(TexCoord2fColor3fVertex3fSUN) -#define glTexCoord2fColor3fVertex3fvSUN MANGLE(TexCoord2fColor3fVertex3fvSUN) -#define glTexCoord2fColor4fNormal3fVertex3fSUN MANGLE(TexCoord2fColor4fNormal3fVertex3fSUN) -#define glTexCoord2fColor4fNormal3fVertex3fvSUN MANGLE(TexCoord2fColor4fNormal3fVertex3fvSUN) -#define glTexCoord2fColor4ubVertex3fSUN MANGLE(TexCoord2fColor4ubVertex3fSUN) -#define glTexCoord2fColor4ubVertex3fvSUN MANGLE(TexCoord2fColor4ubVertex3fvSUN) -#define glTexCoord2f MANGLE(TexCoord2f) -#define glTexCoord2fNormal3fVertex3fSUN MANGLE(TexCoord2fNormal3fVertex3fSUN) -#define glTexCoord2fNormal3fVertex3fvSUN MANGLE(TexCoord2fNormal3fVertex3fvSUN) -#define glTexCoord2fVertex3fSUN MANGLE(TexCoord2fVertex3fSUN) -#define glTexCoord2fVertex3fvSUN MANGLE(TexCoord2fVertex3fvSUN) -#define glTexCoord2fv MANGLE(TexCoord2fv) -#define glTexCoord2hNV MANGLE(TexCoord2hNV) -#define glTexCoord2hvNV MANGLE(TexCoord2hvNV) -#define glTexCoord2i MANGLE(TexCoord2i) -#define glTexCoord2iv MANGLE(TexCoord2iv) -#define glTexCoord2s MANGLE(TexCoord2s) -#define glTexCoord2sv MANGLE(TexCoord2sv) -#define glTexCoord3d MANGLE(TexCoord3d) -#define glTexCoord3dv MANGLE(TexCoord3dv) -#define glTexCoord3f MANGLE(TexCoord3f) -#define glTexCoord3fv MANGLE(TexCoord3fv) -#define glTexCoord3hNV MANGLE(TexCoord3hNV) -#define glTexCoord3hvNV MANGLE(TexCoord3hvNV) -#define glTexCoord3i MANGLE(TexCoord3i) -#define glTexCoord3iv MANGLE(TexCoord3iv) -#define glTexCoord3s MANGLE(TexCoord3s) -#define glTexCoord3sv MANGLE(TexCoord3sv) -#define glTexCoord4d MANGLE(TexCoord4d) -#define glTexCoord4dv MANGLE(TexCoord4dv) -#define glTexCoord4fColor4fNormal3fVertex4fSUN MANGLE(TexCoord4fColor4fNormal3fVertex4fSUN) -#define glTexCoord4fColor4fNormal3fVertex4fvSUN MANGLE(TexCoord4fColor4fNormal3fVertex4fvSUN) -#define glTexCoord4f MANGLE(TexCoord4f) -#define glTexCoord4fVertex4fSUN MANGLE(TexCoord4fVertex4fSUN) -#define glTexCoord4fVertex4fvSUN MANGLE(TexCoord4fVertex4fvSUN) -#define glTexCoord4fv MANGLE(TexCoord4fv) -#define glTexCoord4hNV MANGLE(TexCoord4hNV) -#define glTexCoord4hvNV MANGLE(TexCoord4hvNV) -#define glTexCoord4i MANGLE(TexCoord4i) -#define glTexCoord4iv MANGLE(TexCoord4iv) -#define glTexCoord4s MANGLE(TexCoord4s) -#define glTexCoord4sv MANGLE(TexCoord4sv) -#define glTexCoordFormatNV MANGLE(TexCoordFormatNV) -#define glTexCoordP1ui MANGLE(TexCoordP1ui) -#define glTexCoordP1uiv MANGLE(TexCoordP1uiv) -#define glTexCoordP2ui MANGLE(TexCoordP2ui) -#define glTexCoordP2uiv MANGLE(TexCoordP2uiv) -#define glTexCoordP3ui MANGLE(TexCoordP3ui) -#define glTexCoordP3uiv MANGLE(TexCoordP3uiv) -#define glTexCoordP4ui MANGLE(TexCoordP4ui) -#define glTexCoordP4uiv MANGLE(TexCoordP4uiv) -#define glTexCoordPointerEXT MANGLE(TexCoordPointerEXT) -#define glTexCoordPointerListIBM MANGLE(TexCoordPointerListIBM) -#define glTexCoordPointer MANGLE(TexCoordPointer) -#define glTexCoordPointervINTEL MANGLE(TexCoordPointervINTEL) -#define glTexEnvf MANGLE(TexEnvf) -#define glTexEnvfv MANGLE(TexEnvfv) -#define glTexEnvi MANGLE(TexEnvi) -#define glTexEnviv MANGLE(TexEnviv) -#define glTexFilterFuncSGIS MANGLE(TexFilterFuncSGIS) -#define glTexGend MANGLE(TexGend) -#define glTexGendv MANGLE(TexGendv) -#define glTexGenf MANGLE(TexGenf) -#define glTexGenfv MANGLE(TexGenfv) -#define glTexGeni MANGLE(TexGeni) -#define glTexGeniv MANGLE(TexGeniv) -#define glTexImage1D MANGLE(TexImage1D) -#define glTexImage2D MANGLE(TexImage2D) -#define glTexImage2DMultisample MANGLE(TexImage2DMultisample) -#define glTexImage3DEXT MANGLE(TexImage3DEXT) -#define glTexImage3D MANGLE(TexImage3D) -#define glTexImage3DMultisample MANGLE(TexImage3DMultisample) -#define glTexImage4DSGIS MANGLE(TexImage4DSGIS) -#define glTexParameterf MANGLE(TexParameterf) -#define glTexParameterfv MANGLE(TexParameterfv) -#define glTexParameterIivEXT MANGLE(TexParameterIivEXT) -#define glTexParameterIiv MANGLE(TexParameterIiv) -#define glTexParameteri MANGLE(TexParameteri) -#define glTexParameterIuivEXT MANGLE(TexParameterIuivEXT) -#define glTexParameterIuiv MANGLE(TexParameterIuiv) -#define glTexParameteriv MANGLE(TexParameteriv) -#define glTexRenderbufferNV MANGLE(TexRenderbufferNV) -#define glTexSubImage1DEXT MANGLE(TexSubImage1DEXT) -#define glTexSubImage1D MANGLE(TexSubImage1D) -#define glTexSubImage2DEXT MANGLE(TexSubImage2DEXT) -#define glTexSubImage2D MANGLE(TexSubImage2D) -#define glTexSubImage3DEXT MANGLE(TexSubImage3DEXT) -#define glTexSubImage3D MANGLE(TexSubImage3D) -#define glTexSubImage4DSGIS MANGLE(TexSubImage4DSGIS) -#define glTextureBarrierNV MANGLE(TextureBarrierNV) -#define glTextureBufferEXT MANGLE(TextureBufferEXT) -#define glTextureColorMaskSGIS MANGLE(TextureColorMaskSGIS) -#define glTextureImage1DEXT MANGLE(TextureImage1DEXT) -#define glTextureImage2DEXT MANGLE(TextureImage2DEXT) -#define glTextureImage3DEXT MANGLE(TextureImage3DEXT) -#define glTextureLightEXT MANGLE(TextureLightEXT) -#define glTextureMaterialEXT MANGLE(TextureMaterialEXT) -#define glTextureNormalEXT MANGLE(TextureNormalEXT) -#define glTextureParameterfEXT MANGLE(TextureParameterfEXT) -#define glTextureParameterfvEXT MANGLE(TextureParameterfvEXT) -#define glTextureParameteriEXT MANGLE(TextureParameteriEXT) -#define glTextureParameterIivEXT MANGLE(TextureParameterIivEXT) -#define glTextureParameterIuivEXT MANGLE(TextureParameterIuivEXT) -#define glTextureParameterivEXT MANGLE(TextureParameterivEXT) -#define glTextureRangeAPPLE MANGLE(TextureRangeAPPLE) -#define glTextureRenderbufferEXT MANGLE(TextureRenderbufferEXT) -#define glTextureSubImage1DEXT MANGLE(TextureSubImage1DEXT) -#define glTextureSubImage2DEXT MANGLE(TextureSubImage2DEXT) -#define glTextureSubImage3DEXT MANGLE(TextureSubImage3DEXT) -#define glTrackMatrixNV MANGLE(TrackMatrixNV) -#define glTransformFeedbackAttribsNV MANGLE(TransformFeedbackAttribsNV) -#define glTransformFeedbackStreamAttribsNV MANGLE(TransformFeedbackStreamAttribsNV) -#define glTransformFeedbackVaryingsEXT MANGLE(TransformFeedbackVaryingsEXT) -#define glTransformFeedbackVaryings MANGLE(TransformFeedbackVaryings) -#define glTransformFeedbackVaryingsNV MANGLE(TransformFeedbackVaryingsNV) -#define glTranslated MANGLE(Translated) -#define glTranslatef MANGLE(Translatef) -#define glUniform1d MANGLE(Uniform1d) -#define glUniform1dv MANGLE(Uniform1dv) -#define glUniform1fARB MANGLE(Uniform1fARB) -#define glUniform1f MANGLE(Uniform1f) -#define glUniform1fvARB MANGLE(Uniform1fvARB) -#define glUniform1fv MANGLE(Uniform1fv) -#define glUniform1i64NV MANGLE(Uniform1i64NV) -#define glUniform1i64vNV MANGLE(Uniform1i64vNV) -#define glUniform1iARB MANGLE(Uniform1iARB) -#define glUniform1i MANGLE(Uniform1i) -#define glUniform1ivARB MANGLE(Uniform1ivARB) -#define glUniform1iv MANGLE(Uniform1iv) -#define glUniform1ui64NV MANGLE(Uniform1ui64NV) -#define glUniform1ui64vNV MANGLE(Uniform1ui64vNV) -#define glUniform1uiEXT MANGLE(Uniform1uiEXT) -#define glUniform1ui MANGLE(Uniform1ui) -#define glUniform1uivEXT MANGLE(Uniform1uivEXT) -#define glUniform1uiv MANGLE(Uniform1uiv) -#define glUniform2d MANGLE(Uniform2d) -#define glUniform2dv MANGLE(Uniform2dv) -#define glUniform2fARB MANGLE(Uniform2fARB) -#define glUniform2f MANGLE(Uniform2f) -#define glUniform2fvARB MANGLE(Uniform2fvARB) -#define glUniform2fv MANGLE(Uniform2fv) -#define glUniform2i64NV MANGLE(Uniform2i64NV) -#define glUniform2i64vNV MANGLE(Uniform2i64vNV) -#define glUniform2iARB MANGLE(Uniform2iARB) -#define glUniform2i MANGLE(Uniform2i) -#define glUniform2ivARB MANGLE(Uniform2ivARB) -#define glUniform2iv MANGLE(Uniform2iv) -#define glUniform2ui64NV MANGLE(Uniform2ui64NV) -#define glUniform2ui64vNV MANGLE(Uniform2ui64vNV) -#define glUniform2uiEXT MANGLE(Uniform2uiEXT) -#define glUniform2ui MANGLE(Uniform2ui) -#define glUniform2uivEXT MANGLE(Uniform2uivEXT) -#define glUniform2uiv MANGLE(Uniform2uiv) -#define glUniform3d MANGLE(Uniform3d) -#define glUniform3dv MANGLE(Uniform3dv) -#define glUniform3fARB MANGLE(Uniform3fARB) -#define glUniform3f MANGLE(Uniform3f) -#define glUniform3fvARB MANGLE(Uniform3fvARB) -#define glUniform3fv MANGLE(Uniform3fv) -#define glUniform3i64NV MANGLE(Uniform3i64NV) -#define glUniform3i64vNV MANGLE(Uniform3i64vNV) -#define glUniform3iARB MANGLE(Uniform3iARB) -#define glUniform3i MANGLE(Uniform3i) -#define glUniform3ivARB MANGLE(Uniform3ivARB) -#define glUniform3iv MANGLE(Uniform3iv) -#define glUniform3ui64NV MANGLE(Uniform3ui64NV) -#define glUniform3ui64vNV MANGLE(Uniform3ui64vNV) -#define glUniform3uiEXT MANGLE(Uniform3uiEXT) -#define glUniform3ui MANGLE(Uniform3ui) -#define glUniform3uivEXT MANGLE(Uniform3uivEXT) -#define glUniform3uiv MANGLE(Uniform3uiv) -#define glUniform4d MANGLE(Uniform4d) -#define glUniform4dv MANGLE(Uniform4dv) -#define glUniform4fARB MANGLE(Uniform4fARB) -#define glUniform4f MANGLE(Uniform4f) -#define glUniform4fvARB MANGLE(Uniform4fvARB) -#define glUniform4fv MANGLE(Uniform4fv) -#define glUniform4i64NV MANGLE(Uniform4i64NV) -#define glUniform4i64vNV MANGLE(Uniform4i64vNV) -#define glUniform4iARB MANGLE(Uniform4iARB) -#define glUniform4i MANGLE(Uniform4i) -#define glUniform4ivARB MANGLE(Uniform4ivARB) -#define glUniform4iv MANGLE(Uniform4iv) -#define glUniform4ui64NV MANGLE(Uniform4ui64NV) -#define glUniform4ui64vNV MANGLE(Uniform4ui64vNV) -#define glUniform4uiEXT MANGLE(Uniform4uiEXT) -#define glUniform4ui MANGLE(Uniform4ui) -#define glUniform4uivEXT MANGLE(Uniform4uivEXT) -#define glUniform4uiv MANGLE(Uniform4uiv) -#define glUniformBlockBinding MANGLE(UniformBlockBinding) -#define glUniformBufferEXT MANGLE(UniformBufferEXT) -#define glUniformMatrix2dv MANGLE(UniformMatrix2dv) -#define glUniformMatrix2fvARB MANGLE(UniformMatrix2fvARB) -#define glUniformMatrix2fv MANGLE(UniformMatrix2fv) -#define glUniformMatrix2x3dv MANGLE(UniformMatrix2x3dv) -#define glUniformMatrix2x3fv MANGLE(UniformMatrix2x3fv) -#define glUniformMatrix2x4dv MANGLE(UniformMatrix2x4dv) -#define glUniformMatrix2x4fv MANGLE(UniformMatrix2x4fv) -#define glUniformMatrix3dv MANGLE(UniformMatrix3dv) -#define glUniformMatrix3fvARB MANGLE(UniformMatrix3fvARB) -#define glUniformMatrix3fv MANGLE(UniformMatrix3fv) -#define glUniformMatrix3x2dv MANGLE(UniformMatrix3x2dv) -#define glUniformMatrix3x2fv MANGLE(UniformMatrix3x2fv) -#define glUniformMatrix3x4dv MANGLE(UniformMatrix3x4dv) -#define glUniformMatrix3x4fv MANGLE(UniformMatrix3x4fv) -#define glUniformMatrix4dv MANGLE(UniformMatrix4dv) -#define glUniformMatrix4fvARB MANGLE(UniformMatrix4fvARB) -#define glUniformMatrix4fv MANGLE(UniformMatrix4fv) -#define glUniformMatrix4x2dv MANGLE(UniformMatrix4x2dv) -#define glUniformMatrix4x2fv MANGLE(UniformMatrix4x2fv) -#define glUniformMatrix4x3dv MANGLE(UniformMatrix4x3dv) -#define glUniformMatrix4x3fv MANGLE(UniformMatrix4x3fv) -#define glUniformSubroutinesuiv MANGLE(UniformSubroutinesuiv) -#define glUniformui64NV MANGLE(Uniformui64NV) -#define glUniformui64vNV MANGLE(Uniformui64vNV) -#define glUnlockArraysEXT MANGLE(UnlockArraysEXT) -#define glUnmapBufferARB MANGLE(UnmapBufferARB) -#define glUnmapBuffer MANGLE(UnmapBuffer) -#define glUnmapNamedBufferEXT MANGLE(UnmapNamedBufferEXT) -#define glUnmapObjectBufferATI MANGLE(UnmapObjectBufferATI) -#define glUpdateObjectBufferATI MANGLE(UpdateObjectBufferATI) -#define glUseProgram MANGLE(UseProgram) -#define glUseProgramObjectARB MANGLE(UseProgramObjectARB) -#define glUseProgramStages MANGLE(UseProgramStages) -#define glUseShaderProgramEXT MANGLE(UseShaderProgramEXT) -#define glValidateProgramARB MANGLE(ValidateProgramARB) -#define glValidateProgram MANGLE(ValidateProgram) -#define glValidateProgramPipeline MANGLE(ValidateProgramPipeline) -#define glVariantArrayObjectATI MANGLE(VariantArrayObjectATI) -#define glVariantbvEXT MANGLE(VariantbvEXT) -#define glVariantdvEXT MANGLE(VariantdvEXT) -#define glVariantfvEXT MANGLE(VariantfvEXT) -#define glVariantivEXT MANGLE(VariantivEXT) -#define glVariantPointerEXT MANGLE(VariantPointerEXT) -#define glVariantsvEXT MANGLE(VariantsvEXT) -#define glVariantubvEXT MANGLE(VariantubvEXT) -#define glVariantuivEXT MANGLE(VariantuivEXT) -#define glVariantusvEXT MANGLE(VariantusvEXT) -#define glVDPAUFiniNV MANGLE(VDPAUFiniNV) -#define glVDPAUGetSurfaceivNV MANGLE(VDPAUGetSurfaceivNV) -#define glVDPAUInitNV MANGLE(VDPAUInitNV) -#define glVDPAUIsSurfaceNV MANGLE(VDPAUIsSurfaceNV) -#define glVDPAUMapSurfacesNV MANGLE(VDPAUMapSurfacesNV) -#define glVDPAURegisterOutputSurfaceNV MANGLE(VDPAURegisterOutputSurfaceNV) -#define glVDPAURegisterVideoSurfaceNV MANGLE(VDPAURegisterVideoSurfaceNV) -#define glVDPAUSurfaceAccessNV MANGLE(VDPAUSurfaceAccessNV) -#define glVDPAUUnmapSurfacesNV MANGLE(VDPAUUnmapSurfacesNV) -#define glVDPAUUnregisterSurfaceNV MANGLE(VDPAUUnregisterSurfaceNV) -#define glVertex2d MANGLE(Vertex2d) -#define glVertex2dv MANGLE(Vertex2dv) -#define glVertex2f MANGLE(Vertex2f) -#define glVertex2fv MANGLE(Vertex2fv) -#define glVertex2hNV MANGLE(Vertex2hNV) -#define glVertex2hvNV MANGLE(Vertex2hvNV) -#define glVertex2i MANGLE(Vertex2i) -#define glVertex2iv MANGLE(Vertex2iv) -#define glVertex2s MANGLE(Vertex2s) -#define glVertex2sv MANGLE(Vertex2sv) -#define glVertex3d MANGLE(Vertex3d) -#define glVertex3dv MANGLE(Vertex3dv) -#define glVertex3f MANGLE(Vertex3f) -#define glVertex3fv MANGLE(Vertex3fv) -#define glVertex3hNV MANGLE(Vertex3hNV) -#define glVertex3hvNV MANGLE(Vertex3hvNV) -#define glVertex3i MANGLE(Vertex3i) -#define glVertex3iv MANGLE(Vertex3iv) -#define glVertex3s MANGLE(Vertex3s) -#define glVertex3sv MANGLE(Vertex3sv) -#define glVertex4d MANGLE(Vertex4d) -#define glVertex4dv MANGLE(Vertex4dv) -#define glVertex4f MANGLE(Vertex4f) -#define glVertex4fv MANGLE(Vertex4fv) -#define glVertex4hNV MANGLE(Vertex4hNV) -#define glVertex4hvNV MANGLE(Vertex4hvNV) -#define glVertex4i MANGLE(Vertex4i) -#define glVertex4iv MANGLE(Vertex4iv) -#define glVertex4s MANGLE(Vertex4s) -#define glVertex4sv MANGLE(Vertex4sv) -#define glVertexArrayParameteriAPPLE MANGLE(VertexArrayParameteriAPPLE) -#define glVertexArrayRangeAPPLE MANGLE(VertexArrayRangeAPPLE) -#define glVertexArrayRangeNV MANGLE(VertexArrayRangeNV) -#define glVertexArrayVertexAttribLOffsetEXT MANGLE(VertexArrayVertexAttribLOffsetEXT) -#define glVertexAttrib1dARB MANGLE(VertexAttrib1dARB) -#define glVertexAttrib1d MANGLE(VertexAttrib1d) -#define glVertexAttrib1dNV MANGLE(VertexAttrib1dNV) -#define glVertexAttrib1dvARB MANGLE(VertexAttrib1dvARB) -#define glVertexAttrib1dv MANGLE(VertexAttrib1dv) -#define glVertexAttrib1dvNV MANGLE(VertexAttrib1dvNV) -#define glVertexAttrib1fARB MANGLE(VertexAttrib1fARB) -#define glVertexAttrib1f MANGLE(VertexAttrib1f) -#define glVertexAttrib1fNV MANGLE(VertexAttrib1fNV) -#define glVertexAttrib1fvARB MANGLE(VertexAttrib1fvARB) -#define glVertexAttrib1fv MANGLE(VertexAttrib1fv) -#define glVertexAttrib1fvNV MANGLE(VertexAttrib1fvNV) -#define glVertexAttrib1hNV MANGLE(VertexAttrib1hNV) -#define glVertexAttrib1hvNV MANGLE(VertexAttrib1hvNV) -#define glVertexAttrib1sARB MANGLE(VertexAttrib1sARB) -#define glVertexAttrib1s MANGLE(VertexAttrib1s) -#define glVertexAttrib1sNV MANGLE(VertexAttrib1sNV) -#define glVertexAttrib1svARB MANGLE(VertexAttrib1svARB) -#define glVertexAttrib1sv MANGLE(VertexAttrib1sv) -#define glVertexAttrib1svNV MANGLE(VertexAttrib1svNV) -#define glVertexAttrib2dARB MANGLE(VertexAttrib2dARB) -#define glVertexAttrib2d MANGLE(VertexAttrib2d) -#define glVertexAttrib2dNV MANGLE(VertexAttrib2dNV) -#define glVertexAttrib2dvARB MANGLE(VertexAttrib2dvARB) -#define glVertexAttrib2dv MANGLE(VertexAttrib2dv) -#define glVertexAttrib2dvNV MANGLE(VertexAttrib2dvNV) -#define glVertexAttrib2fARB MANGLE(VertexAttrib2fARB) -#define glVertexAttrib2f MANGLE(VertexAttrib2f) -#define glVertexAttrib2fNV MANGLE(VertexAttrib2fNV) -#define glVertexAttrib2fvARB MANGLE(VertexAttrib2fvARB) -#define glVertexAttrib2fv MANGLE(VertexAttrib2fv) -#define glVertexAttrib2fvNV MANGLE(VertexAttrib2fvNV) -#define glVertexAttrib2hNV MANGLE(VertexAttrib2hNV) -#define glVertexAttrib2hvNV MANGLE(VertexAttrib2hvNV) -#define glVertexAttrib2sARB MANGLE(VertexAttrib2sARB) -#define glVertexAttrib2s MANGLE(VertexAttrib2s) -#define glVertexAttrib2sNV MANGLE(VertexAttrib2sNV) -#define glVertexAttrib2svARB MANGLE(VertexAttrib2svARB) -#define glVertexAttrib2sv MANGLE(VertexAttrib2sv) -#define glVertexAttrib2svNV MANGLE(VertexAttrib2svNV) -#define glVertexAttrib3dARB MANGLE(VertexAttrib3dARB) -#define glVertexAttrib3d MANGLE(VertexAttrib3d) -#define glVertexAttrib3dNV MANGLE(VertexAttrib3dNV) -#define glVertexAttrib3dvARB MANGLE(VertexAttrib3dvARB) -#define glVertexAttrib3dv MANGLE(VertexAttrib3dv) -#define glVertexAttrib3dvNV MANGLE(VertexAttrib3dvNV) -#define glVertexAttrib3fARB MANGLE(VertexAttrib3fARB) -#define glVertexAttrib3f MANGLE(VertexAttrib3f) -#define glVertexAttrib3fNV MANGLE(VertexAttrib3fNV) -#define glVertexAttrib3fvARB MANGLE(VertexAttrib3fvARB) -#define glVertexAttrib3fv MANGLE(VertexAttrib3fv) -#define glVertexAttrib3fvNV MANGLE(VertexAttrib3fvNV) -#define glVertexAttrib3hNV MANGLE(VertexAttrib3hNV) -#define glVertexAttrib3hvNV MANGLE(VertexAttrib3hvNV) -#define glVertexAttrib3sARB MANGLE(VertexAttrib3sARB) -#define glVertexAttrib3s MANGLE(VertexAttrib3s) -#define glVertexAttrib3sNV MANGLE(VertexAttrib3sNV) -#define glVertexAttrib3svARB MANGLE(VertexAttrib3svARB) -#define glVertexAttrib3sv MANGLE(VertexAttrib3sv) -#define glVertexAttrib3svNV MANGLE(VertexAttrib3svNV) -#define glVertexAttrib4bvARB MANGLE(VertexAttrib4bvARB) -#define glVertexAttrib4bv MANGLE(VertexAttrib4bv) -#define glVertexAttrib4dARB MANGLE(VertexAttrib4dARB) -#define glVertexAttrib4d MANGLE(VertexAttrib4d) -#define glVertexAttrib4dNV MANGLE(VertexAttrib4dNV) -#define glVertexAttrib4dvARB MANGLE(VertexAttrib4dvARB) -#define glVertexAttrib4dv MANGLE(VertexAttrib4dv) -#define glVertexAttrib4dvNV MANGLE(VertexAttrib4dvNV) -#define glVertexAttrib4fARB MANGLE(VertexAttrib4fARB) -#define glVertexAttrib4f MANGLE(VertexAttrib4f) -#define glVertexAttrib4fNV MANGLE(VertexAttrib4fNV) -#define glVertexAttrib4fvARB MANGLE(VertexAttrib4fvARB) -#define glVertexAttrib4fv MANGLE(VertexAttrib4fv) -#define glVertexAttrib4fvNV MANGLE(VertexAttrib4fvNV) -#define glVertexAttrib4hNV MANGLE(VertexAttrib4hNV) -#define glVertexAttrib4hvNV MANGLE(VertexAttrib4hvNV) -#define glVertexAttrib4ivARB MANGLE(VertexAttrib4ivARB) -#define glVertexAttrib4iv MANGLE(VertexAttrib4iv) -#define glVertexAttrib4NbvARB MANGLE(VertexAttrib4NbvARB) -#define glVertexAttrib4Nbv MANGLE(VertexAttrib4Nbv) -#define glVertexAttrib4NivARB MANGLE(VertexAttrib4NivARB) -#define glVertexAttrib4Niv MANGLE(VertexAttrib4Niv) -#define glVertexAttrib4NsvARB MANGLE(VertexAttrib4NsvARB) -#define glVertexAttrib4Nsv MANGLE(VertexAttrib4Nsv) -#define glVertexAttrib4NubARB MANGLE(VertexAttrib4NubARB) -#define glVertexAttrib4Nub MANGLE(VertexAttrib4Nub) -#define glVertexAttrib4NubvARB MANGLE(VertexAttrib4NubvARB) -#define glVertexAttrib4Nubv MANGLE(VertexAttrib4Nubv) -#define glVertexAttrib4NuivARB MANGLE(VertexAttrib4NuivARB) -#define glVertexAttrib4Nuiv MANGLE(VertexAttrib4Nuiv) -#define glVertexAttrib4NusvARB MANGLE(VertexAttrib4NusvARB) -#define glVertexAttrib4Nusv MANGLE(VertexAttrib4Nusv) -#define glVertexAttrib4sARB MANGLE(VertexAttrib4sARB) -#define glVertexAttrib4s MANGLE(VertexAttrib4s) -#define glVertexAttrib4sNV MANGLE(VertexAttrib4sNV) -#define glVertexAttrib4svARB MANGLE(VertexAttrib4svARB) -#define glVertexAttrib4sv MANGLE(VertexAttrib4sv) -#define glVertexAttrib4svNV MANGLE(VertexAttrib4svNV) -#define glVertexAttrib4ubNV MANGLE(VertexAttrib4ubNV) -#define glVertexAttrib4ubvARB MANGLE(VertexAttrib4ubvARB) -#define glVertexAttrib4ubv MANGLE(VertexAttrib4ubv) -#define glVertexAttrib4ubvNV MANGLE(VertexAttrib4ubvNV) -#define glVertexAttrib4uivARB MANGLE(VertexAttrib4uivARB) -#define glVertexAttrib4uiv MANGLE(VertexAttrib4uiv) -#define glVertexAttrib4usvARB MANGLE(VertexAttrib4usvARB) -#define glVertexAttrib4usv MANGLE(VertexAttrib4usv) -#define glVertexAttribArrayObjectATI MANGLE(VertexAttribArrayObjectATI) -#define glVertexAttribDivisorARB MANGLE(VertexAttribDivisorARB) -#define glVertexAttribDivisor MANGLE(VertexAttribDivisor) -#define glVertexAttribFormatNV MANGLE(VertexAttribFormatNV) -#define glVertexAttribI1iEXT MANGLE(VertexAttribI1iEXT) -#define glVertexAttribI1i MANGLE(VertexAttribI1i) -#define glVertexAttribI1ivEXT MANGLE(VertexAttribI1ivEXT) -#define glVertexAttribI1iv MANGLE(VertexAttribI1iv) -#define glVertexAttribI1uiEXT MANGLE(VertexAttribI1uiEXT) -#define glVertexAttribI1ui MANGLE(VertexAttribI1ui) -#define glVertexAttribI1uivEXT MANGLE(VertexAttribI1uivEXT) -#define glVertexAttribI1uiv MANGLE(VertexAttribI1uiv) -#define glVertexAttribI2iEXT MANGLE(VertexAttribI2iEXT) -#define glVertexAttribI2i MANGLE(VertexAttribI2i) -#define glVertexAttribI2ivEXT MANGLE(VertexAttribI2ivEXT) -#define glVertexAttribI2iv MANGLE(VertexAttribI2iv) -#define glVertexAttribI2uiEXT MANGLE(VertexAttribI2uiEXT) -#define glVertexAttribI2ui MANGLE(VertexAttribI2ui) -#define glVertexAttribI2uivEXT MANGLE(VertexAttribI2uivEXT) -#define glVertexAttribI2uiv MANGLE(VertexAttribI2uiv) -#define glVertexAttribI3iEXT MANGLE(VertexAttribI3iEXT) -#define glVertexAttribI3i MANGLE(VertexAttribI3i) -#define glVertexAttribI3ivEXT MANGLE(VertexAttribI3ivEXT) -#define glVertexAttribI3iv MANGLE(VertexAttribI3iv) -#define glVertexAttribI3uiEXT MANGLE(VertexAttribI3uiEXT) -#define glVertexAttribI3ui MANGLE(VertexAttribI3ui) -#define glVertexAttribI3uivEXT MANGLE(VertexAttribI3uivEXT) -#define glVertexAttribI3uiv MANGLE(VertexAttribI3uiv) -#define glVertexAttribI4bvEXT MANGLE(VertexAttribI4bvEXT) -#define glVertexAttribI4bv MANGLE(VertexAttribI4bv) -#define glVertexAttribI4iEXT MANGLE(VertexAttribI4iEXT) -#define glVertexAttribI4i MANGLE(VertexAttribI4i) -#define glVertexAttribI4ivEXT MANGLE(VertexAttribI4ivEXT) -#define glVertexAttribI4iv MANGLE(VertexAttribI4iv) -#define glVertexAttribI4svEXT MANGLE(VertexAttribI4svEXT) -#define glVertexAttribI4sv MANGLE(VertexAttribI4sv) -#define glVertexAttribI4ubvEXT MANGLE(VertexAttribI4ubvEXT) -#define glVertexAttribI4ubv MANGLE(VertexAttribI4ubv) -#define glVertexAttribI4uiEXT MANGLE(VertexAttribI4uiEXT) -#define glVertexAttribI4ui MANGLE(VertexAttribI4ui) -#define glVertexAttribI4uivEXT MANGLE(VertexAttribI4uivEXT) -#define glVertexAttribI4uiv MANGLE(VertexAttribI4uiv) -#define glVertexAttribI4usvEXT MANGLE(VertexAttribI4usvEXT) -#define glVertexAttribI4usv MANGLE(VertexAttribI4usv) -#define glVertexAttribIFormatNV MANGLE(VertexAttribIFormatNV) -#define glVertexAttribIPointerEXT MANGLE(VertexAttribIPointerEXT) -#define glVertexAttribIPointer MANGLE(VertexAttribIPointer) -#define glVertexAttribL1dEXT MANGLE(VertexAttribL1dEXT) -#define glVertexAttribL1d MANGLE(VertexAttribL1d) -#define glVertexAttribL1dvEXT MANGLE(VertexAttribL1dvEXT) -#define glVertexAttribL1dv MANGLE(VertexAttribL1dv) -#define glVertexAttribL1i64NV MANGLE(VertexAttribL1i64NV) -#define glVertexAttribL1i64vNV MANGLE(VertexAttribL1i64vNV) -#define glVertexAttribL1ui64NV MANGLE(VertexAttribL1ui64NV) -#define glVertexAttribL1ui64vNV MANGLE(VertexAttribL1ui64vNV) -#define glVertexAttribL2dEXT MANGLE(VertexAttribL2dEXT) -#define glVertexAttribL2d MANGLE(VertexAttribL2d) -#define glVertexAttribL2dvEXT MANGLE(VertexAttribL2dvEXT) -#define glVertexAttribL2dv MANGLE(VertexAttribL2dv) -#define glVertexAttribL2i64NV MANGLE(VertexAttribL2i64NV) -#define glVertexAttribL2i64vNV MANGLE(VertexAttribL2i64vNV) -#define glVertexAttribL2ui64NV MANGLE(VertexAttribL2ui64NV) -#define glVertexAttribL2ui64vNV MANGLE(VertexAttribL2ui64vNV) -#define glVertexAttribL3dEXT MANGLE(VertexAttribL3dEXT) -#define glVertexAttribL3d MANGLE(VertexAttribL3d) -#define glVertexAttribL3dvEXT MANGLE(VertexAttribL3dvEXT) -#define glVertexAttribL3dv MANGLE(VertexAttribL3dv) -#define glVertexAttribL3i64NV MANGLE(VertexAttribL3i64NV) -#define glVertexAttribL3i64vNV MANGLE(VertexAttribL3i64vNV) -#define glVertexAttribL3ui64NV MANGLE(VertexAttribL3ui64NV) -#define glVertexAttribL3ui64vNV MANGLE(VertexAttribL3ui64vNV) -#define glVertexAttribL4dEXT MANGLE(VertexAttribL4dEXT) -#define glVertexAttribL4d MANGLE(VertexAttribL4d) -#define glVertexAttribL4dvEXT MANGLE(VertexAttribL4dvEXT) -#define glVertexAttribL4dv MANGLE(VertexAttribL4dv) -#define glVertexAttribL4i64NV MANGLE(VertexAttribL4i64NV) -#define glVertexAttribL4i64vNV MANGLE(VertexAttribL4i64vNV) -#define glVertexAttribL4ui64NV MANGLE(VertexAttribL4ui64NV) -#define glVertexAttribL4ui64vNV MANGLE(VertexAttribL4ui64vNV) -#define glVertexAttribLFormatNV MANGLE(VertexAttribLFormatNV) -#define glVertexAttribLPointerEXT MANGLE(VertexAttribLPointerEXT) -#define glVertexAttribLPointer MANGLE(VertexAttribLPointer) -#define glVertexAttribP1ui MANGLE(VertexAttribP1ui) -#define glVertexAttribP1uiv MANGLE(VertexAttribP1uiv) -#define glVertexAttribP2ui MANGLE(VertexAttribP2ui) -#define glVertexAttribP2uiv MANGLE(VertexAttribP2uiv) -#define glVertexAttribP3ui MANGLE(VertexAttribP3ui) -#define glVertexAttribP3uiv MANGLE(VertexAttribP3uiv) -#define glVertexAttribP4ui MANGLE(VertexAttribP4ui) -#define glVertexAttribP4uiv MANGLE(VertexAttribP4uiv) -#define glVertexAttribPointerARB MANGLE(VertexAttribPointerARB) -#define glVertexAttribPointer MANGLE(VertexAttribPointer) -#define glVertexAttribPointerNV MANGLE(VertexAttribPointerNV) -#define glVertexAttribs1dvNV MANGLE(VertexAttribs1dvNV) -#define glVertexAttribs1fvNV MANGLE(VertexAttribs1fvNV) -#define glVertexAttribs1hvNV MANGLE(VertexAttribs1hvNV) -#define glVertexAttribs1svNV MANGLE(VertexAttribs1svNV) -#define glVertexAttribs2dvNV MANGLE(VertexAttribs2dvNV) -#define glVertexAttribs2fvNV MANGLE(VertexAttribs2fvNV) -#define glVertexAttribs2hvNV MANGLE(VertexAttribs2hvNV) -#define glVertexAttribs2svNV MANGLE(VertexAttribs2svNV) -#define glVertexAttribs3dvNV MANGLE(VertexAttribs3dvNV) -#define glVertexAttribs3fvNV MANGLE(VertexAttribs3fvNV) -#define glVertexAttribs3hvNV MANGLE(VertexAttribs3hvNV) -#define glVertexAttribs3svNV MANGLE(VertexAttribs3svNV) -#define glVertexAttribs4dvNV MANGLE(VertexAttribs4dvNV) -#define glVertexAttribs4fvNV MANGLE(VertexAttribs4fvNV) -#define glVertexAttribs4hvNV MANGLE(VertexAttribs4hvNV) -#define glVertexAttribs4svNV MANGLE(VertexAttribs4svNV) -#define glVertexAttribs4ubvNV MANGLE(VertexAttribs4ubvNV) -#define glVertexBlendARB MANGLE(VertexBlendARB) -#define glVertexBlendEnvfATI MANGLE(VertexBlendEnvfATI) -#define glVertexBlendEnviATI MANGLE(VertexBlendEnviATI) -#define glVertexFormatNV MANGLE(VertexFormatNV) -#define glVertexP2ui MANGLE(VertexP2ui) -#define glVertexP2uiv MANGLE(VertexP2uiv) -#define glVertexP3ui MANGLE(VertexP3ui) -#define glVertexP3uiv MANGLE(VertexP3uiv) -#define glVertexP4ui MANGLE(VertexP4ui) -#define glVertexP4uiv MANGLE(VertexP4uiv) -#define glVertexPointerEXT MANGLE(VertexPointerEXT) -#define glVertexPointerListIBM MANGLE(VertexPointerListIBM) -#define glVertexPointer MANGLE(VertexPointer) -#define glVertexPointervINTEL MANGLE(VertexPointervINTEL) -#define glVertexStream1dATI MANGLE(VertexStream1dATI) -#define glVertexStream1dvATI MANGLE(VertexStream1dvATI) -#define glVertexStream1fATI MANGLE(VertexStream1fATI) -#define glVertexStream1fvATI MANGLE(VertexStream1fvATI) -#define glVertexStream1iATI MANGLE(VertexStream1iATI) -#define glVertexStream1ivATI MANGLE(VertexStream1ivATI) -#define glVertexStream1sATI MANGLE(VertexStream1sATI) -#define glVertexStream1svATI MANGLE(VertexStream1svATI) -#define glVertexStream2dATI MANGLE(VertexStream2dATI) -#define glVertexStream2dvATI MANGLE(VertexStream2dvATI) -#define glVertexStream2fATI MANGLE(VertexStream2fATI) -#define glVertexStream2fvATI MANGLE(VertexStream2fvATI) -#define glVertexStream2iATI MANGLE(VertexStream2iATI) -#define glVertexStream2ivATI MANGLE(VertexStream2ivATI) -#define glVertexStream2sATI MANGLE(VertexStream2sATI) -#define glVertexStream2svATI MANGLE(VertexStream2svATI) -#define glVertexStream3dATI MANGLE(VertexStream3dATI) -#define glVertexStream3dvATI MANGLE(VertexStream3dvATI) -#define glVertexStream3fATI MANGLE(VertexStream3fATI) -#define glVertexStream3fvATI MANGLE(VertexStream3fvATI) -#define glVertexStream3iATI MANGLE(VertexStream3iATI) -#define glVertexStream3ivATI MANGLE(VertexStream3ivATI) -#define glVertexStream3sATI MANGLE(VertexStream3sATI) -#define glVertexStream3svATI MANGLE(VertexStream3svATI) -#define glVertexStream4dATI MANGLE(VertexStream4dATI) -#define glVertexStream4dvATI MANGLE(VertexStream4dvATI) -#define glVertexStream4fATI MANGLE(VertexStream4fATI) -#define glVertexStream4fvATI MANGLE(VertexStream4fvATI) -#define glVertexStream4iATI MANGLE(VertexStream4iATI) -#define glVertexStream4ivATI MANGLE(VertexStream4ivATI) -#define glVertexStream4sATI MANGLE(VertexStream4sATI) -#define glVertexStream4svATI MANGLE(VertexStream4svATI) -#define glVertexWeightfEXT MANGLE(VertexWeightfEXT) -#define glVertexWeightfvEXT MANGLE(VertexWeightfvEXT) -#define glVertexWeighthNV MANGLE(VertexWeighthNV) -#define glVertexWeighthvNV MANGLE(VertexWeighthvNV) -#define glVertexWeightPointerEXT MANGLE(VertexWeightPointerEXT) -#define glVideoCaptureNV MANGLE(VideoCaptureNV) -#define glVideoCaptureStreamParameterdvNV MANGLE(VideoCaptureStreamParameterdvNV) -#define glVideoCaptureStreamParameterfvNV MANGLE(VideoCaptureStreamParameterfvNV) -#define glVideoCaptureStreamParameterivNV MANGLE(VideoCaptureStreamParameterivNV) -#define glViewportArrayv MANGLE(ViewportArrayv) -#define glViewportIndexedf MANGLE(ViewportIndexedf) -#define glViewportIndexedfv MANGLE(ViewportIndexedfv) -#define glViewport MANGLE(Viewport) -#define glWaitSync MANGLE(WaitSync) -#define glWeightbvARB MANGLE(WeightbvARB) -#define glWeightdvARB MANGLE(WeightdvARB) -#define glWeightfvARB MANGLE(WeightfvARB) -#define glWeightivARB MANGLE(WeightivARB) -#define glWeightPointerARB MANGLE(WeightPointerARB) -#define glWeightsvARB MANGLE(WeightsvARB) -#define glWeightubvARB MANGLE(WeightubvARB) -#define glWeightuivARB MANGLE(WeightuivARB) -#define glWeightusvARB MANGLE(WeightusvARB) -#define glWindowPos2dARB MANGLE(WindowPos2dARB) -#define glWindowPos2d MANGLE(WindowPos2d) -#define glWindowPos2dMESA MANGLE(WindowPos2dMESA) -#define glWindowPos2dvARB MANGLE(WindowPos2dvARB) -#define glWindowPos2dv MANGLE(WindowPos2dv) -#define glWindowPos2dvMESA MANGLE(WindowPos2dvMESA) -#define glWindowPos2fARB MANGLE(WindowPos2fARB) -#define glWindowPos2f MANGLE(WindowPos2f) -#define glWindowPos2fMESA MANGLE(WindowPos2fMESA) -#define glWindowPos2fvARB MANGLE(WindowPos2fvARB) -#define glWindowPos2fv MANGLE(WindowPos2fv) -#define glWindowPos2fvMESA MANGLE(WindowPos2fvMESA) -#define glWindowPos2iARB MANGLE(WindowPos2iARB) -#define glWindowPos2i MANGLE(WindowPos2i) -#define glWindowPos2iMESA MANGLE(WindowPos2iMESA) -#define glWindowPos2ivARB MANGLE(WindowPos2ivARB) -#define glWindowPos2iv MANGLE(WindowPos2iv) -#define glWindowPos2ivMESA MANGLE(WindowPos2ivMESA) -#define glWindowPos2sARB MANGLE(WindowPos2sARB) -#define glWindowPos2s MANGLE(WindowPos2s) -#define glWindowPos2sMESA MANGLE(WindowPos2sMESA) -#define glWindowPos2svARB MANGLE(WindowPos2svARB) -#define glWindowPos2sv MANGLE(WindowPos2sv) -#define glWindowPos2svMESA MANGLE(WindowPos2svMESA) -#define glWindowPos3dARB MANGLE(WindowPos3dARB) -#define glWindowPos3d MANGLE(WindowPos3d) -#define glWindowPos3dMESA MANGLE(WindowPos3dMESA) -#define glWindowPos3dvARB MANGLE(WindowPos3dvARB) -#define glWindowPos3dv MANGLE(WindowPos3dv) -#define glWindowPos3dvMESA MANGLE(WindowPos3dvMESA) -#define glWindowPos3fARB MANGLE(WindowPos3fARB) -#define glWindowPos3f MANGLE(WindowPos3f) -#define glWindowPos3fMESA MANGLE(WindowPos3fMESA) -#define glWindowPos3fvARB MANGLE(WindowPos3fvARB) -#define glWindowPos3fv MANGLE(WindowPos3fv) -#define glWindowPos3fvMESA MANGLE(WindowPos3fvMESA) -#define glWindowPos3iARB MANGLE(WindowPos3iARB) -#define glWindowPos3i MANGLE(WindowPos3i) -#define glWindowPos3iMESA MANGLE(WindowPos3iMESA) -#define glWindowPos3ivARB MANGLE(WindowPos3ivARB) -#define glWindowPos3iv MANGLE(WindowPos3iv) -#define glWindowPos3ivMESA MANGLE(WindowPos3ivMESA) -#define glWindowPos3sARB MANGLE(WindowPos3sARB) -#define glWindowPos3s MANGLE(WindowPos3s) -#define glWindowPos3sMESA MANGLE(WindowPos3sMESA) -#define glWindowPos3svARB MANGLE(WindowPos3svARB) -#define glWindowPos3sv MANGLE(WindowPos3sv) -#define glWindowPos3svMESA MANGLE(WindowPos3svMESA) -#define glWindowPos4dMESA MANGLE(WindowPos4dMESA) -#define glWindowPos4dvMESA MANGLE(WindowPos4dvMESA) -#define glWindowPos4fMESA MANGLE(WindowPos4fMESA) -#define glWindowPos4fvMESA MANGLE(WindowPos4fvMESA) -#define glWindowPos4iMESA MANGLE(WindowPos4iMESA) -#define glWindowPos4ivMESA MANGLE(WindowPos4ivMESA) -#define glWindowPos4sMESA MANGLE(WindowPos4sMESA) -#define glWindowPos4svMESA MANGLE(WindowPos4svMESA) -#define glWriteMaskEXT MANGLE(WriteMaskEXT) - -#endif /* GL_MANGLE_H */ diff --git a/dll/opengl/mesa/include/GL/glext.h b/dll/opengl/mesa/include/GL/glext.h deleted file mode 100644 index 09400215bac..00000000000 --- a/dll/opengl/mesa/include/GL/glext.h +++ /dev/null @@ -1,11488 +0,0 @@ -#ifndef __glext_h_ -#define __glext_h_ - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2007-2011 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ - -/* Header file version number, required by OpenGL ABI for Linux */ -/* glext.h last updated $Date: 2011-08-08 00:34:29 -0700 (Mon, 08 Aug 2011) $ */ -/* Current version at http://www.opengl.org/registry/ */ -#define GL_GLEXT_VERSION 72 -/* Function declaration macros - to move into glplatform.h */ - -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) -#define WIN32_LEAN_AND_MEAN 1 -#include -#endif - -#ifndef APIENTRY -#define APIENTRY -#endif -#ifndef APIENTRYP -#define APIENTRYP APIENTRY * -#endif -#ifndef GLAPI -#define GLAPI extern -#endif - -/*************************************************************/ - -#ifndef GL_VERSION_1_2 -#define GL_UNSIGNED_BYTE_3_3_2 0x8032 -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_INT_8_8_8_8 0x8035 -#define GL_UNSIGNED_INT_10_10_10_2 0x8036 -#define GL_TEXTURE_BINDING_3D 0x806A -#define GL_PACK_SKIP_IMAGES 0x806B -#define GL_PACK_IMAGE_HEIGHT 0x806C -#define GL_UNPACK_SKIP_IMAGES 0x806D -#define GL_UNPACK_IMAGE_HEIGHT 0x806E -#define GL_TEXTURE_3D 0x806F -#define GL_PROXY_TEXTURE_3D 0x8070 -#define GL_TEXTURE_DEPTH 0x8071 -#define GL_TEXTURE_WRAP_R 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE 0x8073 -#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 -#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 -#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 -#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 -#define GL_BGR 0x80E0 -#define GL_BGRA 0x80E1 -#define GL_MAX_ELEMENTS_VERTICES 0x80E8 -#define GL_MAX_ELEMENTS_INDICES 0x80E9 -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_TEXTURE_MIN_LOD 0x813A -#define GL_TEXTURE_MAX_LOD 0x813B -#define GL_TEXTURE_BASE_LEVEL 0x813C -#define GL_TEXTURE_MAX_LEVEL 0x813D -#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 -#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 -#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 -#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#endif - -#ifndef GL_VERSION_1_2_DEPRECATED -#define GL_RESCALE_NORMAL 0x803A -#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 -#define GL_SINGLE_COLOR 0x81F9 -#define GL_SEPARATE_SPECULAR_COLOR 0x81FA -#define GL_ALIASED_POINT_SIZE_RANGE 0x846D -#endif - -#ifndef GL_ARB_imaging -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_BLEND_COLOR 0x8005 -#define GL_FUNC_ADD 0x8006 -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 -#define GL_BLEND_EQUATION 0x8009 -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B -#endif - -#ifndef GL_ARB_imaging_DEPRECATED -#define GL_CONVOLUTION_1D 0x8010 -#define GL_CONVOLUTION_2D 0x8011 -#define GL_SEPARABLE_2D 0x8012 -#define GL_CONVOLUTION_BORDER_MODE 0x8013 -#define GL_CONVOLUTION_FILTER_SCALE 0x8014 -#define GL_CONVOLUTION_FILTER_BIAS 0x8015 -#define GL_REDUCE 0x8016 -#define GL_CONVOLUTION_FORMAT 0x8017 -#define GL_CONVOLUTION_WIDTH 0x8018 -#define GL_CONVOLUTION_HEIGHT 0x8019 -#define GL_MAX_CONVOLUTION_WIDTH 0x801A -#define GL_MAX_CONVOLUTION_HEIGHT 0x801B -#define GL_POST_CONVOLUTION_RED_SCALE 0x801C -#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D -#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E -#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F -#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 -#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 -#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 -#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 -#define GL_HISTOGRAM 0x8024 -#define GL_PROXY_HISTOGRAM 0x8025 -#define GL_HISTOGRAM_WIDTH 0x8026 -#define GL_HISTOGRAM_FORMAT 0x8027 -#define GL_HISTOGRAM_RED_SIZE 0x8028 -#define GL_HISTOGRAM_GREEN_SIZE 0x8029 -#define GL_HISTOGRAM_BLUE_SIZE 0x802A -#define GL_HISTOGRAM_ALPHA_SIZE 0x802B -#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C -#define GL_HISTOGRAM_SINK 0x802D -#define GL_MINMAX 0x802E -#define GL_MINMAX_FORMAT 0x802F -#define GL_MINMAX_SINK 0x8030 -#define GL_TABLE_TOO_LARGE 0x8031 -#define GL_COLOR_MATRIX 0x80B1 -#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 -#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 -#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 -#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 -#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 -#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 -#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 -#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 -#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA -#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB -#define GL_COLOR_TABLE 0x80D0 -#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 -#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 -#define GL_PROXY_COLOR_TABLE 0x80D3 -#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 -#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 -#define GL_COLOR_TABLE_SCALE 0x80D6 -#define GL_COLOR_TABLE_BIAS 0x80D7 -#define GL_COLOR_TABLE_FORMAT 0x80D8 -#define GL_COLOR_TABLE_WIDTH 0x80D9 -#define GL_COLOR_TABLE_RED_SIZE 0x80DA -#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB -#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC -#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD -#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE -#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF -#define GL_CONSTANT_BORDER 0x8151 -#define GL_REPLICATE_BORDER 0x8153 -#define GL_CONVOLUTION_BORDER_COLOR 0x8154 -#endif - -#ifndef GL_VERSION_1_3 -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 -#define GL_MULTISAMPLE 0x809D -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE 0x809F -#define GL_SAMPLE_COVERAGE 0x80A0 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C -#define GL_COMPRESSED_RGB 0x84ED -#define GL_COMPRESSED_RGBA 0x84EE -#define GL_TEXTURE_COMPRESSION_HINT 0x84EF -#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 -#define GL_TEXTURE_COMPRESSED 0x86A1 -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 -#define GL_CLAMP_TO_BORDER 0x812D -#endif - -#ifndef GL_VERSION_1_3_DEPRECATED -#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 -#define GL_MAX_TEXTURE_UNITS 0x84E2 -#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 -#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 -#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 -#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 -#define GL_MULTISAMPLE_BIT 0x20000000 -#define GL_NORMAL_MAP 0x8511 -#define GL_REFLECTION_MAP 0x8512 -#define GL_COMPRESSED_ALPHA 0x84E9 -#define GL_COMPRESSED_LUMINANCE 0x84EA -#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB -#define GL_COMPRESSED_INTENSITY 0x84EC -#define GL_COMBINE 0x8570 -#define GL_COMBINE_RGB 0x8571 -#define GL_COMBINE_ALPHA 0x8572 -#define GL_SOURCE0_RGB 0x8580 -#define GL_SOURCE1_RGB 0x8581 -#define GL_SOURCE2_RGB 0x8582 -#define GL_SOURCE0_ALPHA 0x8588 -#define GL_SOURCE1_ALPHA 0x8589 -#define GL_SOURCE2_ALPHA 0x858A -#define GL_OPERAND0_RGB 0x8590 -#define GL_OPERAND1_RGB 0x8591 -#define GL_OPERAND2_RGB 0x8592 -#define GL_OPERAND0_ALPHA 0x8598 -#define GL_OPERAND1_ALPHA 0x8599 -#define GL_OPERAND2_ALPHA 0x859A -#define GL_RGB_SCALE 0x8573 -#define GL_ADD_SIGNED 0x8574 -#define GL_INTERPOLATE 0x8575 -#define GL_SUBTRACT 0x84E7 -#define GL_CONSTANT 0x8576 -#define GL_PRIMARY_COLOR 0x8577 -#define GL_PREVIOUS 0x8578 -#define GL_DOT3_RGB 0x86AE -#define GL_DOT3_RGBA 0x86AF -#endif - -#ifndef GL_VERSION_1_4 -#define GL_BLEND_DST_RGB 0x80C8 -#define GL_BLEND_SRC_RGB 0x80C9 -#define GL_BLEND_DST_ALPHA 0x80CA -#define GL_BLEND_SRC_ALPHA 0x80CB -#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_DEPTH_COMPONENT24 0x81A6 -#define GL_DEPTH_COMPONENT32 0x81A7 -#define GL_MIRRORED_REPEAT 0x8370 -#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD -#define GL_TEXTURE_LOD_BIAS 0x8501 -#define GL_INCR_WRAP 0x8507 -#define GL_DECR_WRAP 0x8508 -#define GL_TEXTURE_DEPTH_SIZE 0x884A -#define GL_TEXTURE_COMPARE_MODE 0x884C -#define GL_TEXTURE_COMPARE_FUNC 0x884D -#endif - -#ifndef GL_VERSION_1_4_DEPRECATED -#define GL_POINT_SIZE_MIN 0x8126 -#define GL_POINT_SIZE_MAX 0x8127 -#define GL_POINT_DISTANCE_ATTENUATION 0x8129 -#define GL_GENERATE_MIPMAP 0x8191 -#define GL_GENERATE_MIPMAP_HINT 0x8192 -#define GL_FOG_COORDINATE_SOURCE 0x8450 -#define GL_FOG_COORDINATE 0x8451 -#define GL_FRAGMENT_DEPTH 0x8452 -#define GL_CURRENT_FOG_COORDINATE 0x8453 -#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454 -#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455 -#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456 -#define GL_FOG_COORDINATE_ARRAY 0x8457 -#define GL_COLOR_SUM 0x8458 -#define GL_CURRENT_SECONDARY_COLOR 0x8459 -#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A -#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B -#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C -#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D -#define GL_SECONDARY_COLOR_ARRAY 0x845E -#define GL_TEXTURE_FILTER_CONTROL 0x8500 -#define GL_DEPTH_TEXTURE_MODE 0x884B -#define GL_COMPARE_R_TO_TEXTURE 0x884E -#endif - -#ifndef GL_VERSION_1_5 -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_USAGE 0x8765 -#define GL_QUERY_COUNTER_BITS 0x8864 -#define GL_CURRENT_QUERY 0x8865 -#define GL_QUERY_RESULT 0x8866 -#define GL_QUERY_RESULT_AVAILABLE 0x8867 -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F -#define GL_READ_ONLY 0x88B8 -#define GL_WRITE_ONLY 0x88B9 -#define GL_READ_WRITE 0x88BA -#define GL_BUFFER_ACCESS 0x88BB -#define GL_BUFFER_MAPPED 0x88BC -#define GL_BUFFER_MAP_POINTER 0x88BD -#define GL_STREAM_DRAW 0x88E0 -#define GL_STREAM_READ 0x88E1 -#define GL_STREAM_COPY 0x88E2 -#define GL_STATIC_DRAW 0x88E4 -#define GL_STATIC_READ 0x88E5 -#define GL_STATIC_COPY 0x88E6 -#define GL_DYNAMIC_DRAW 0x88E8 -#define GL_DYNAMIC_READ 0x88E9 -#define GL_DYNAMIC_COPY 0x88EA -#define GL_SAMPLES_PASSED 0x8914 -#endif - -#ifndef GL_VERSION_1_5_DEPRECATED -#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 -#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 -#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 -#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899 -#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A -#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B -#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C -#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D -#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E -#define GL_FOG_COORD_SRC 0x8450 -#define GL_FOG_COORD 0x8451 -#define GL_CURRENT_FOG_COORD 0x8453 -#define GL_FOG_COORD_ARRAY_TYPE 0x8454 -#define GL_FOG_COORD_ARRAY_STRIDE 0x8455 -#define GL_FOG_COORD_ARRAY_POINTER 0x8456 -#define GL_FOG_COORD_ARRAY 0x8457 -#define GL_FOG_COORD_ARRAY_BUFFER_BINDING 0x889D -#define GL_SRC0_RGB 0x8580 -#define GL_SRC1_RGB 0x8581 -#define GL_SRC2_RGB 0x8582 -#define GL_SRC0_ALPHA 0x8588 -#define GL_SRC1_ALPHA 0x8589 -#define GL_SRC2_ALPHA 0x858A -#endif - -#ifndef GL_VERSION_2_0 -#define GL_BLEND_EQUATION_RGB 0x8009 -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 -#define GL_CURRENT_VERTEX_ATTRIB 0x8626 -#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 -#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 -#define GL_STENCIL_BACK_FUNC 0x8800 -#define GL_STENCIL_BACK_FAIL 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 -#define GL_MAX_DRAW_BUFFERS 0x8824 -#define GL_DRAW_BUFFER0 0x8825 -#define GL_DRAW_BUFFER1 0x8826 -#define GL_DRAW_BUFFER2 0x8827 -#define GL_DRAW_BUFFER3 0x8828 -#define GL_DRAW_BUFFER4 0x8829 -#define GL_DRAW_BUFFER5 0x882A -#define GL_DRAW_BUFFER6 0x882B -#define GL_DRAW_BUFFER7 0x882C -#define GL_DRAW_BUFFER8 0x882D -#define GL_DRAW_BUFFER9 0x882E -#define GL_DRAW_BUFFER10 0x882F -#define GL_DRAW_BUFFER11 0x8830 -#define GL_DRAW_BUFFER12 0x8831 -#define GL_DRAW_BUFFER13 0x8832 -#define GL_DRAW_BUFFER14 0x8833 -#define GL_DRAW_BUFFER15 0x8834 -#define GL_BLEND_EQUATION_ALPHA 0x883D -#define GL_MAX_VERTEX_ATTRIBS 0x8869 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A -#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A -#define GL_MAX_VARYING_FLOATS 0x8B4B -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D -#define GL_SHADER_TYPE 0x8B4F -#define GL_FLOAT_VEC2 0x8B50 -#define GL_FLOAT_VEC3 0x8B51 -#define GL_FLOAT_VEC4 0x8B52 -#define GL_INT_VEC2 0x8B53 -#define GL_INT_VEC3 0x8B54 -#define GL_INT_VEC4 0x8B55 -#define GL_BOOL 0x8B56 -#define GL_BOOL_VEC2 0x8B57 -#define GL_BOOL_VEC3 0x8B58 -#define GL_BOOL_VEC4 0x8B59 -#define GL_FLOAT_MAT2 0x8B5A -#define GL_FLOAT_MAT3 0x8B5B -#define GL_FLOAT_MAT4 0x8B5C -#define GL_SAMPLER_1D 0x8B5D -#define GL_SAMPLER_2D 0x8B5E -#define GL_SAMPLER_3D 0x8B5F -#define GL_SAMPLER_CUBE 0x8B60 -#define GL_SAMPLER_1D_SHADOW 0x8B61 -#define GL_SAMPLER_2D_SHADOW 0x8B62 -#define GL_DELETE_STATUS 0x8B80 -#define GL_COMPILE_STATUS 0x8B81 -#define GL_LINK_STATUS 0x8B82 -#define GL_VALIDATE_STATUS 0x8B83 -#define GL_INFO_LOG_LENGTH 0x8B84 -#define GL_ATTACHED_SHADERS 0x8B85 -#define GL_ACTIVE_UNIFORMS 0x8B86 -#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 -#define GL_SHADER_SOURCE_LENGTH 0x8B88 -#define GL_ACTIVE_ATTRIBUTES 0x8B89 -#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B -#define GL_SHADING_LANGUAGE_VERSION 0x8B8C -#define GL_CURRENT_PROGRAM 0x8B8D -#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 -#define GL_LOWER_LEFT 0x8CA1 -#define GL_UPPER_LEFT 0x8CA2 -#define GL_STENCIL_BACK_REF 0x8CA3 -#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 -#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -#endif - -#ifndef GL_VERSION_2_0_DEPRECATED -#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643 -#define GL_POINT_SPRITE 0x8861 -#define GL_COORD_REPLACE 0x8862 -#define GL_MAX_TEXTURE_COORDS 0x8871 -#endif - -#ifndef GL_VERSION_2_1 -#define GL_PIXEL_PACK_BUFFER 0x88EB -#define GL_PIXEL_UNPACK_BUFFER 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF -#define GL_FLOAT_MAT2x3 0x8B65 -#define GL_FLOAT_MAT2x4 0x8B66 -#define GL_FLOAT_MAT3x2 0x8B67 -#define GL_FLOAT_MAT3x4 0x8B68 -#define GL_FLOAT_MAT4x2 0x8B69 -#define GL_FLOAT_MAT4x3 0x8B6A -#define GL_SRGB 0x8C40 -#define GL_SRGB8 0x8C41 -#define GL_SRGB_ALPHA 0x8C42 -#define GL_SRGB8_ALPHA8 0x8C43 -#define GL_COMPRESSED_SRGB 0x8C48 -#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 -#endif - -#ifndef GL_VERSION_2_1_DEPRECATED -#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F -#define GL_SLUMINANCE_ALPHA 0x8C44 -#define GL_SLUMINANCE8_ALPHA8 0x8C45 -#define GL_SLUMINANCE 0x8C46 -#define GL_SLUMINANCE8 0x8C47 -#define GL_COMPRESSED_SLUMINANCE 0x8C4A -#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B -#endif - -#ifndef GL_VERSION_3_0 -#define GL_COMPARE_REF_TO_TEXTURE 0x884E -#define GL_CLIP_DISTANCE0 0x3000 -#define GL_CLIP_DISTANCE1 0x3001 -#define GL_CLIP_DISTANCE2 0x3002 -#define GL_CLIP_DISTANCE3 0x3003 -#define GL_CLIP_DISTANCE4 0x3004 -#define GL_CLIP_DISTANCE5 0x3005 -#define GL_CLIP_DISTANCE6 0x3006 -#define GL_CLIP_DISTANCE7 0x3007 -#define GL_MAX_CLIP_DISTANCES 0x0D32 -#define GL_MAJOR_VERSION 0x821B -#define GL_MINOR_VERSION 0x821C -#define GL_NUM_EXTENSIONS 0x821D -#define GL_CONTEXT_FLAGS 0x821E -#define GL_DEPTH_BUFFER 0x8223 -#define GL_STENCIL_BUFFER 0x8224 -#define GL_COMPRESSED_RED 0x8225 -#define GL_COMPRESSED_RG 0x8226 -#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001 -#define GL_RGBA32F 0x8814 -#define GL_RGB32F 0x8815 -#define GL_RGBA16F 0x881A -#define GL_RGB16F 0x881B -#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD -#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF -#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 -#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 -#define GL_CLAMP_READ_COLOR 0x891C -#define GL_FIXED_ONLY 0x891D -#define GL_MAX_VARYING_COMPONENTS 0x8B4B -#define GL_TEXTURE_1D_ARRAY 0x8C18 -#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19 -#define GL_TEXTURE_2D_ARRAY 0x8C1A -#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B -#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C -#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D -#define GL_R11F_G11F_B10F 0x8C3A -#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B -#define GL_RGB9_E5 0x8C3D -#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E -#define GL_TEXTURE_SHARED_SIZE 0x8C3F -#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 -#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 -#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 -#define GL_PRIMITIVES_GENERATED 0x8C87 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 -#define GL_RASTERIZER_DISCARD 0x8C89 -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B -#define GL_INTERLEAVED_ATTRIBS 0x8C8C -#define GL_SEPARATE_ATTRIBS 0x8C8D -#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F -#define GL_RGBA32UI 0x8D70 -#define GL_RGB32UI 0x8D71 -#define GL_RGBA16UI 0x8D76 -#define GL_RGB16UI 0x8D77 -#define GL_RGBA8UI 0x8D7C -#define GL_RGB8UI 0x8D7D -#define GL_RGBA32I 0x8D82 -#define GL_RGB32I 0x8D83 -#define GL_RGBA16I 0x8D88 -#define GL_RGB16I 0x8D89 -#define GL_RGBA8I 0x8D8E -#define GL_RGB8I 0x8D8F -#define GL_RED_INTEGER 0x8D94 -#define GL_GREEN_INTEGER 0x8D95 -#define GL_BLUE_INTEGER 0x8D96 -#define GL_RGB_INTEGER 0x8D98 -#define GL_RGBA_INTEGER 0x8D99 -#define GL_BGR_INTEGER 0x8D9A -#define GL_BGRA_INTEGER 0x8D9B -#define GL_SAMPLER_1D_ARRAY 0x8DC0 -#define GL_SAMPLER_2D_ARRAY 0x8DC1 -#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3 -#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 -#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 -#define GL_UNSIGNED_INT_VEC2 0x8DC6 -#define GL_UNSIGNED_INT_VEC3 0x8DC7 -#define GL_UNSIGNED_INT_VEC4 0x8DC8 -#define GL_INT_SAMPLER_1D 0x8DC9 -#define GL_INT_SAMPLER_2D 0x8DCA -#define GL_INT_SAMPLER_3D 0x8DCB -#define GL_INT_SAMPLER_CUBE 0x8DCC -#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE -#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF -#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1 -#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 -#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 -#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 -#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6 -#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 -#define GL_QUERY_WAIT 0x8E13 -#define GL_QUERY_NO_WAIT 0x8E14 -#define GL_QUERY_BY_REGION_WAIT 0x8E15 -#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16 -#define GL_BUFFER_ACCESS_FLAGS 0x911F -#define GL_BUFFER_MAP_LENGTH 0x9120 -#define GL_BUFFER_MAP_OFFSET 0x9121 -/* Reuse tokens from ARB_depth_buffer_float */ -/* reuse GL_DEPTH_COMPONENT32F */ -/* reuse GL_DEPTH32F_STENCIL8 */ -/* reuse GL_FLOAT_32_UNSIGNED_INT_24_8_REV */ -/* Reuse tokens from ARB_framebuffer_object */ -/* reuse GL_INVALID_FRAMEBUFFER_OPERATION */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */ -/* reuse GL_FRAMEBUFFER_DEFAULT */ -/* reuse GL_FRAMEBUFFER_UNDEFINED */ -/* reuse GL_DEPTH_STENCIL_ATTACHMENT */ -/* reuse GL_INDEX */ -/* reuse GL_MAX_RENDERBUFFER_SIZE */ -/* reuse GL_DEPTH_STENCIL */ -/* reuse GL_UNSIGNED_INT_24_8 */ -/* reuse GL_DEPTH24_STENCIL8 */ -/* reuse GL_TEXTURE_STENCIL_SIZE */ -/* reuse GL_TEXTURE_RED_TYPE */ -/* reuse GL_TEXTURE_GREEN_TYPE */ -/* reuse GL_TEXTURE_BLUE_TYPE */ -/* reuse GL_TEXTURE_ALPHA_TYPE */ -/* reuse GL_TEXTURE_DEPTH_TYPE */ -/* reuse GL_UNSIGNED_NORMALIZED */ -/* reuse GL_FRAMEBUFFER_BINDING */ -/* reuse GL_DRAW_FRAMEBUFFER_BINDING */ -/* reuse GL_RENDERBUFFER_BINDING */ -/* reuse GL_READ_FRAMEBUFFER */ -/* reuse GL_DRAW_FRAMEBUFFER */ -/* reuse GL_READ_FRAMEBUFFER_BINDING */ -/* reuse GL_RENDERBUFFER_SAMPLES */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ -/* reuse GL_FRAMEBUFFER_COMPLETE */ -/* reuse GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */ -/* reuse GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */ -/* reuse GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */ -/* reuse GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */ -/* reuse GL_FRAMEBUFFER_UNSUPPORTED */ -/* reuse GL_MAX_COLOR_ATTACHMENTS */ -/* reuse GL_COLOR_ATTACHMENT0 */ -/* reuse GL_COLOR_ATTACHMENT1 */ -/* reuse GL_COLOR_ATTACHMENT2 */ -/* reuse GL_COLOR_ATTACHMENT3 */ -/* reuse GL_COLOR_ATTACHMENT4 */ -/* reuse GL_COLOR_ATTACHMENT5 */ -/* reuse GL_COLOR_ATTACHMENT6 */ -/* reuse GL_COLOR_ATTACHMENT7 */ -/* reuse GL_COLOR_ATTACHMENT8 */ -/* reuse GL_COLOR_ATTACHMENT9 */ -/* reuse GL_COLOR_ATTACHMENT10 */ -/* reuse GL_COLOR_ATTACHMENT11 */ -/* reuse GL_COLOR_ATTACHMENT12 */ -/* reuse GL_COLOR_ATTACHMENT13 */ -/* reuse GL_COLOR_ATTACHMENT14 */ -/* reuse GL_COLOR_ATTACHMENT15 */ -/* reuse GL_DEPTH_ATTACHMENT */ -/* reuse GL_STENCIL_ATTACHMENT */ -/* reuse GL_FRAMEBUFFER */ -/* reuse GL_RENDERBUFFER */ -/* reuse GL_RENDERBUFFER_WIDTH */ -/* reuse GL_RENDERBUFFER_HEIGHT */ -/* reuse GL_RENDERBUFFER_INTERNAL_FORMAT */ -/* reuse GL_STENCIL_INDEX1 */ -/* reuse GL_STENCIL_INDEX4 */ -/* reuse GL_STENCIL_INDEX8 */ -/* reuse GL_STENCIL_INDEX16 */ -/* reuse GL_RENDERBUFFER_RED_SIZE */ -/* reuse GL_RENDERBUFFER_GREEN_SIZE */ -/* reuse GL_RENDERBUFFER_BLUE_SIZE */ -/* reuse GL_RENDERBUFFER_ALPHA_SIZE */ -/* reuse GL_RENDERBUFFER_DEPTH_SIZE */ -/* reuse GL_RENDERBUFFER_STENCIL_SIZE */ -/* reuse GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */ -/* reuse GL_MAX_SAMPLES */ -/* Reuse tokens from ARB_framebuffer_sRGB */ -/* reuse GL_FRAMEBUFFER_SRGB */ -/* Reuse tokens from ARB_half_float_vertex */ -/* reuse GL_HALF_FLOAT */ -/* Reuse tokens from ARB_map_buffer_range */ -/* reuse GL_MAP_READ_BIT */ -/* reuse GL_MAP_WRITE_BIT */ -/* reuse GL_MAP_INVALIDATE_RANGE_BIT */ -/* reuse GL_MAP_INVALIDATE_BUFFER_BIT */ -/* reuse GL_MAP_FLUSH_EXPLICIT_BIT */ -/* reuse GL_MAP_UNSYNCHRONIZED_BIT */ -/* Reuse tokens from ARB_texture_compression_rgtc */ -/* reuse GL_COMPRESSED_RED_RGTC1 */ -/* reuse GL_COMPRESSED_SIGNED_RED_RGTC1 */ -/* reuse GL_COMPRESSED_RG_RGTC2 */ -/* reuse GL_COMPRESSED_SIGNED_RG_RGTC2 */ -/* Reuse tokens from ARB_texture_rg */ -/* reuse GL_RG */ -/* reuse GL_RG_INTEGER */ -/* reuse GL_R8 */ -/* reuse GL_R16 */ -/* reuse GL_RG8 */ -/* reuse GL_RG16 */ -/* reuse GL_R16F */ -/* reuse GL_R32F */ -/* reuse GL_RG16F */ -/* reuse GL_RG32F */ -/* reuse GL_R8I */ -/* reuse GL_R8UI */ -/* reuse GL_R16I */ -/* reuse GL_R16UI */ -/* reuse GL_R32I */ -/* reuse GL_R32UI */ -/* reuse GL_RG8I */ -/* reuse GL_RG8UI */ -/* reuse GL_RG16I */ -/* reuse GL_RG16UI */ -/* reuse GL_RG32I */ -/* reuse GL_RG32UI */ -/* Reuse tokens from ARB_vertex_array_object */ -/* reuse GL_VERTEX_ARRAY_BINDING */ -#endif - -#ifndef GL_VERSION_3_0_DEPRECATED -#define GL_CLAMP_VERTEX_COLOR 0x891A -#define GL_CLAMP_FRAGMENT_COLOR 0x891B -#define GL_ALPHA_INTEGER 0x8D97 -/* Reuse tokens from ARB_framebuffer_object */ -/* reuse GL_TEXTURE_LUMINANCE_TYPE */ -/* reuse GL_TEXTURE_INTENSITY_TYPE */ -#endif - -#ifndef GL_VERSION_3_1 -#define GL_SAMPLER_2D_RECT 0x8B63 -#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64 -#define GL_SAMPLER_BUFFER 0x8DC2 -#define GL_INT_SAMPLER_2D_RECT 0x8DCD -#define GL_INT_SAMPLER_BUFFER 0x8DD0 -#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 -#define GL_TEXTURE_BUFFER 0x8C2A -#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B -#define GL_TEXTURE_BINDING_BUFFER 0x8C2C -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D -#define GL_TEXTURE_BUFFER_FORMAT 0x8C2E -#define GL_TEXTURE_RECTANGLE 0x84F5 -#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6 -#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8 -#define GL_RED_SNORM 0x8F90 -#define GL_RG_SNORM 0x8F91 -#define GL_RGB_SNORM 0x8F92 -#define GL_RGBA_SNORM 0x8F93 -#define GL_R8_SNORM 0x8F94 -#define GL_RG8_SNORM 0x8F95 -#define GL_RGB8_SNORM 0x8F96 -#define GL_RGBA8_SNORM 0x8F97 -#define GL_R16_SNORM 0x8F98 -#define GL_RG16_SNORM 0x8F99 -#define GL_RGB16_SNORM 0x8F9A -#define GL_RGBA16_SNORM 0x8F9B -#define GL_SIGNED_NORMALIZED 0x8F9C -#define GL_PRIMITIVE_RESTART 0x8F9D -#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E -/* Reuse tokens from ARB_copy_buffer */ -/* reuse GL_COPY_READ_BUFFER */ -/* reuse GL_COPY_WRITE_BUFFER */ -/* Reuse tokens from ARB_draw_instanced (none) */ -/* Reuse tokens from ARB_uniform_buffer_object */ -/* reuse GL_UNIFORM_BUFFER */ -/* reuse GL_UNIFORM_BUFFER_BINDING */ -/* reuse GL_UNIFORM_BUFFER_START */ -/* reuse GL_UNIFORM_BUFFER_SIZE */ -/* reuse GL_MAX_VERTEX_UNIFORM_BLOCKS */ -/* reuse GL_MAX_FRAGMENT_UNIFORM_BLOCKS */ -/* reuse GL_MAX_COMBINED_UNIFORM_BLOCKS */ -/* reuse GL_MAX_UNIFORM_BUFFER_BINDINGS */ -/* reuse GL_MAX_UNIFORM_BLOCK_SIZE */ -/* reuse GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS */ -/* reuse GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS */ -/* reuse GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT */ -/* reuse GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */ -/* reuse GL_ACTIVE_UNIFORM_BLOCKS */ -/* reuse GL_UNIFORM_TYPE */ -/* reuse GL_UNIFORM_SIZE */ -/* reuse GL_UNIFORM_NAME_LENGTH */ -/* reuse GL_UNIFORM_BLOCK_INDEX */ -/* reuse GL_UNIFORM_OFFSET */ -/* reuse GL_UNIFORM_ARRAY_STRIDE */ -/* reuse GL_UNIFORM_MATRIX_STRIDE */ -/* reuse GL_UNIFORM_IS_ROW_MAJOR */ -/* reuse GL_UNIFORM_BLOCK_BINDING */ -/* reuse GL_UNIFORM_BLOCK_DATA_SIZE */ -/* reuse GL_UNIFORM_BLOCK_NAME_LENGTH */ -/* reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS */ -/* reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES */ -/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER */ -/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER */ -/* reuse GL_INVALID_INDEX */ -#endif - -#ifndef GL_VERSION_3_2 -#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001 -#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002 -#define GL_LINES_ADJACENCY 0x000A -#define GL_LINE_STRIP_ADJACENCY 0x000B -#define GL_TRIANGLES_ADJACENCY 0x000C -#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D -#define GL_PROGRAM_POINT_SIZE 0x8642 -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 -#define GL_GEOMETRY_SHADER 0x8DD9 -#define GL_GEOMETRY_VERTICES_OUT 0x8916 -#define GL_GEOMETRY_INPUT_TYPE 0x8917 -#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 -#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 -#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 -#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 -#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 -#define GL_CONTEXT_PROFILE_MASK 0x9126 -/* reuse GL_MAX_VARYING_COMPONENTS */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ -/* Reuse tokens from ARB_depth_clamp */ -/* reuse GL_DEPTH_CLAMP */ -/* Reuse tokens from ARB_draw_elements_base_vertex (none) */ -/* Reuse tokens from ARB_fragment_coord_conventions (none) */ -/* Reuse tokens from ARB_provoking_vertex */ -/* reuse GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */ -/* reuse GL_FIRST_VERTEX_CONVENTION */ -/* reuse GL_LAST_VERTEX_CONVENTION */ -/* reuse GL_PROVOKING_VERTEX */ -/* Reuse tokens from ARB_seamless_cube_map */ -/* reuse GL_TEXTURE_CUBE_MAP_SEAMLESS */ -/* Reuse tokens from ARB_sync */ -/* reuse GL_MAX_SERVER_WAIT_TIMEOUT */ -/* reuse GL_OBJECT_TYPE */ -/* reuse GL_SYNC_CONDITION */ -/* reuse GL_SYNC_STATUS */ -/* reuse GL_SYNC_FLAGS */ -/* reuse GL_SYNC_FENCE */ -/* reuse GL_SYNC_GPU_COMMANDS_COMPLETE */ -/* reuse GL_UNSIGNALED */ -/* reuse GL_SIGNALED */ -/* reuse GL_ALREADY_SIGNALED */ -/* reuse GL_TIMEOUT_EXPIRED */ -/* reuse GL_CONDITION_SATISFIED */ -/* reuse GL_WAIT_FAILED */ -/* reuse GL_TIMEOUT_IGNORED */ -/* reuse GL_SYNC_FLUSH_COMMANDS_BIT */ -/* reuse GL_TIMEOUT_IGNORED */ -/* Reuse tokens from ARB_texture_multisample */ -/* reuse GL_SAMPLE_POSITION */ -/* reuse GL_SAMPLE_MASK */ -/* reuse GL_SAMPLE_MASK_VALUE */ -/* reuse GL_MAX_SAMPLE_MASK_WORDS */ -/* reuse GL_TEXTURE_2D_MULTISAMPLE */ -/* reuse GL_PROXY_TEXTURE_2D_MULTISAMPLE */ -/* reuse GL_TEXTURE_2D_MULTISAMPLE_ARRAY */ -/* reuse GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY */ -/* reuse GL_TEXTURE_BINDING_2D_MULTISAMPLE */ -/* reuse GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY */ -/* reuse GL_TEXTURE_SAMPLES */ -/* reuse GL_TEXTURE_FIXED_SAMPLE_LOCATIONS */ -/* reuse GL_SAMPLER_2D_MULTISAMPLE */ -/* reuse GL_INT_SAMPLER_2D_MULTISAMPLE */ -/* reuse GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE */ -/* reuse GL_SAMPLER_2D_MULTISAMPLE_ARRAY */ -/* reuse GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY */ -/* reuse GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY */ -/* reuse GL_MAX_COLOR_TEXTURE_SAMPLES */ -/* reuse GL_MAX_DEPTH_TEXTURE_SAMPLES */ -/* reuse GL_MAX_INTEGER_SAMPLES */ -/* Don't need to reuse tokens from ARB_vertex_array_bgra since they're already in 1.2 core */ -#endif - -#ifndef GL_VERSION_3_3 -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE -/* Reuse tokens from ARB_blend_func_extended */ -/* reuse GL_SRC1_COLOR */ -/* reuse GL_ONE_MINUS_SRC1_COLOR */ -/* reuse GL_ONE_MINUS_SRC1_ALPHA */ -/* reuse GL_MAX_DUAL_SOURCE_DRAW_BUFFERS */ -/* Reuse tokens from ARB_explicit_attrib_location (none) */ -/* Reuse tokens from ARB_occlusion_query2 */ -/* reuse GL_ANY_SAMPLES_PASSED */ -/* Reuse tokens from ARB_sampler_objects */ -/* reuse GL_SAMPLER_BINDING */ -/* Reuse tokens from ARB_shader_bit_encoding (none) */ -/* Reuse tokens from ARB_texture_rgb10_a2ui */ -/* reuse GL_RGB10_A2UI */ -/* Reuse tokens from ARB_texture_swizzle */ -/* reuse GL_TEXTURE_SWIZZLE_R */ -/* reuse GL_TEXTURE_SWIZZLE_G */ -/* reuse GL_TEXTURE_SWIZZLE_B */ -/* reuse GL_TEXTURE_SWIZZLE_A */ -/* reuse GL_TEXTURE_SWIZZLE_RGBA */ -/* Reuse tokens from ARB_timer_query */ -/* reuse GL_TIME_ELAPSED */ -/* reuse GL_TIMESTAMP */ -/* Reuse tokens from ARB_vertex_type_2_10_10_10_rev */ -/* reuse GL_INT_2_10_10_10_REV */ -#endif - -#ifndef GL_VERSION_4_0 -#define GL_SAMPLE_SHADING 0x8C36 -#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F -#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A -#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B -#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C -#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D -#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E -#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F -/* Reuse tokens from ARB_texture_query_lod (none) */ -/* Reuse tokens from ARB_draw_buffers_blend (none) */ -/* Reuse tokens from ARB_draw_indirect */ -/* reuse GL_DRAW_INDIRECT_BUFFER */ -/* reuse GL_DRAW_INDIRECT_BUFFER_BINDING */ -/* Reuse tokens from ARB_gpu_shader5 */ -/* reuse GL_GEOMETRY_SHADER_INVOCATIONS */ -/* reuse GL_MAX_GEOMETRY_SHADER_INVOCATIONS */ -/* reuse GL_MIN_FRAGMENT_INTERPOLATION_OFFSET */ -/* reuse GL_MAX_FRAGMENT_INTERPOLATION_OFFSET */ -/* reuse GL_FRAGMENT_INTERPOLATION_OFFSET_BITS */ -/* reuse GL_MAX_VERTEX_STREAMS */ -/* Reuse tokens from ARB_gpu_shader_fp64 */ -/* reuse GL_DOUBLE_VEC2 */ -/* reuse GL_DOUBLE_VEC3 */ -/* reuse GL_DOUBLE_VEC4 */ -/* reuse GL_DOUBLE_MAT2 */ -/* reuse GL_DOUBLE_MAT3 */ -/* reuse GL_DOUBLE_MAT4 */ -/* reuse GL_DOUBLE_MAT2x3 */ -/* reuse GL_DOUBLE_MAT2x4 */ -/* reuse GL_DOUBLE_MAT3x2 */ -/* reuse GL_DOUBLE_MAT3x4 */ -/* reuse GL_DOUBLE_MAT4x2 */ -/* reuse GL_DOUBLE_MAT4x3 */ -/* Reuse tokens from ARB_shader_subroutine */ -/* reuse GL_ACTIVE_SUBROUTINES */ -/* reuse GL_ACTIVE_SUBROUTINE_UNIFORMS */ -/* reuse GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS */ -/* reuse GL_ACTIVE_SUBROUTINE_MAX_LENGTH */ -/* reuse GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH */ -/* reuse GL_MAX_SUBROUTINES */ -/* reuse GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS */ -/* reuse GL_NUM_COMPATIBLE_SUBROUTINES */ -/* reuse GL_COMPATIBLE_SUBROUTINES */ -/* Reuse tokens from ARB_tessellation_shader */ -/* reuse GL_PATCHES */ -/* reuse GL_PATCH_VERTICES */ -/* reuse GL_PATCH_DEFAULT_INNER_LEVEL */ -/* reuse GL_PATCH_DEFAULT_OUTER_LEVEL */ -/* reuse GL_TESS_CONTROL_OUTPUT_VERTICES */ -/* reuse GL_TESS_GEN_MODE */ -/* reuse GL_TESS_GEN_SPACING */ -/* reuse GL_TESS_GEN_VERTEX_ORDER */ -/* reuse GL_TESS_GEN_POINT_MODE */ -/* reuse GL_ISOLINES */ -/* reuse GL_FRACTIONAL_ODD */ -/* reuse GL_FRACTIONAL_EVEN */ -/* reuse GL_MAX_PATCH_VERTICES */ -/* reuse GL_MAX_TESS_GEN_LEVEL */ -/* reuse GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS */ -/* reuse GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS */ -/* reuse GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS */ -/* reuse GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS */ -/* reuse GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS */ -/* reuse GL_MAX_TESS_PATCH_COMPONENTS */ -/* reuse GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS */ -/* reuse GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS */ -/* reuse GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS */ -/* reuse GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS */ -/* reuse GL_MAX_TESS_CONTROL_INPUT_COMPONENTS */ -/* reuse GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS */ -/* reuse GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS */ -/* reuse GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS */ -/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER */ -/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER */ -/* reuse GL_TESS_EVALUATION_SHADER */ -/* reuse GL_TESS_CONTROL_SHADER */ -/* Reuse tokens from ARB_texture_buffer_object_rgb32 (none) */ -/* Reuse tokens from ARB_transform_feedback2 */ -/* reuse GL_TRANSFORM_FEEDBACK */ -/* reuse GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */ -/* reuse GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */ -/* reuse GL_TRANSFORM_FEEDBACK_BINDING */ -/* Reuse tokens from ARB_transform_feedback3 */ -/* reuse GL_MAX_TRANSFORM_FEEDBACK_BUFFERS */ -/* reuse GL_MAX_VERTEX_STREAMS */ -#endif - -#ifndef GL_VERSION_4_1 -/* Reuse tokens from ARB_ES2_compatibility */ -/* reuse GL_FIXED */ -/* reuse GL_IMPLEMENTATION_COLOR_READ_TYPE */ -/* reuse GL_IMPLEMENTATION_COLOR_READ_FORMAT */ -/* reuse GL_LOW_FLOAT */ -/* reuse GL_MEDIUM_FLOAT */ -/* reuse GL_HIGH_FLOAT */ -/* reuse GL_LOW_INT */ -/* reuse GL_MEDIUM_INT */ -/* reuse GL_HIGH_INT */ -/* reuse GL_SHADER_COMPILER */ -/* reuse GL_NUM_SHADER_BINARY_FORMATS */ -/* reuse GL_MAX_VERTEX_UNIFORM_VECTORS */ -/* reuse GL_MAX_VARYING_VECTORS */ -/* reuse GL_MAX_FRAGMENT_UNIFORM_VECTORS */ -/* Reuse tokens from ARB_get_program_binary */ -/* reuse GL_PROGRAM_BINARY_RETRIEVABLE_HINT */ -/* reuse GL_PROGRAM_BINARY_LENGTH */ -/* reuse GL_NUM_PROGRAM_BINARY_FORMATS */ -/* reuse GL_PROGRAM_BINARY_FORMATS */ -/* Reuse tokens from ARB_separate_shader_objects */ -/* reuse GL_VERTEX_SHADER_BIT */ -/* reuse GL_FRAGMENT_SHADER_BIT */ -/* reuse GL_GEOMETRY_SHADER_BIT */ -/* reuse GL_TESS_CONTROL_SHADER_BIT */ -/* reuse GL_TESS_EVALUATION_SHADER_BIT */ -/* reuse GL_ALL_SHADER_BITS */ -/* reuse GL_PROGRAM_SEPARABLE */ -/* reuse GL_ACTIVE_PROGRAM */ -/* reuse GL_PROGRAM_PIPELINE_BINDING */ -/* Reuse tokens from ARB_shader_precision (none) */ -/* Reuse tokens from ARB_vertex_attrib_64bit - all are in GL 3.0 and 4.0 already */ -/* Reuse tokens from ARB_viewport_array - some are in GL 1.1 and ARB_provoking_vertex already */ -/* reuse GL_MAX_VIEWPORTS */ -/* reuse GL_VIEWPORT_SUBPIXEL_BITS */ -/* reuse GL_VIEWPORT_BOUNDS_RANGE */ -/* reuse GL_LAYER_PROVOKING_VERTEX */ -/* reuse GL_VIEWPORT_INDEX_PROVOKING_VERTEX */ -/* reuse GL_UNDEFINED_VERTEX */ -#endif - -#ifndef GL_VERSION_4_2 -/* Reuse tokens from ARB_base_instance (none) */ -/* Reuse tokens from ARB_shading_language_420pack (none) */ -/* Reuse tokens from ARB_transform_feedback_instanced (none) */ -/* Reuse tokens from ARB_compressed_texture_pixel_storage */ -/* reuse GL_UNPACK_COMPRESSED_BLOCK_WIDTH */ -/* reuse GL_UNPACK_COMPRESSED_BLOCK_HEIGHT */ -/* reuse GL_UNPACK_COMPRESSED_BLOCK_DEPTH */ -/* reuse GL_UNPACK_COMPRESSED_BLOCK_SIZE */ -/* reuse GL_PACK_COMPRESSED_BLOCK_WIDTH */ -/* reuse GL_PACK_COMPRESSED_BLOCK_HEIGHT */ -/* reuse GL_PACK_COMPRESSED_BLOCK_DEPTH */ -/* reuse GL_PACK_COMPRESSED_BLOCK_SIZE */ -/* Reuse tokens from ARB_conservative_depth (none) */ -/* Reuse tokens from ARB_internalformat_query */ -/* reuse GL_NUM_SAMPLE_COUNTS */ -/* Reuse tokens from ARB_map_buffer_alignment */ -/* reuse GL_MIN_MAP_BUFFER_ALIGNMENT */ -/* Reuse tokens from ARB_shader_atomic_counters */ -/* reuse GL_ATOMIC_COUNTER_BUFFER */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_BINDING */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_START */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_SIZE */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER */ -/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER */ -/* reuse GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS */ -/* reuse GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS */ -/* reuse GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS */ -/* reuse GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS */ -/* reuse GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS */ -/* reuse GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS */ -/* reuse GL_MAX_VERTEX_ATOMIC_COUNTERS */ -/* reuse GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS */ -/* reuse GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS */ -/* reuse GL_MAX_GEOMETRY_ATOMIC_COUNTERS */ -/* reuse GL_MAX_FRAGMENT_ATOMIC_COUNTERS */ -/* reuse GL_MAX_COMBINED_ATOMIC_COUNTERS */ -/* reuse GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE */ -/* reuse GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS */ -/* reuse GL_ACTIVE_ATOMIC_COUNTER_BUFFERS */ -/* reuse GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX */ -/* reuse GL_UNSIGNED_INT_ATOMIC_COUNTER */ -/* Reuse tokens from ARB_shader_image_load_store */ -/* reuse GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT */ -/* reuse GL_ELEMENT_ARRAY_BARRIER_BIT */ -/* reuse GL_UNIFORM_BARRIER_BIT */ -/* reuse GL_TEXTURE_FETCH_BARRIER_BIT */ -/* reuse GL_SHADER_IMAGE_ACCESS_BARRIER_BIT */ -/* reuse GL_COMMAND_BARRIER_BIT */ -/* reuse GL_PIXEL_BUFFER_BARRIER_BIT */ -/* reuse GL_TEXTURE_UPDATE_BARRIER_BIT */ -/* reuse GL_BUFFER_UPDATE_BARRIER_BIT */ -/* reuse GL_FRAMEBUFFER_BARRIER_BIT */ -/* reuse GL_TRANSFORM_FEEDBACK_BARRIER_BIT */ -/* reuse GL_ATOMIC_COUNTER_BARRIER_BIT */ -/* reuse GL_ALL_BARRIER_BITS */ -/* reuse GL_MAX_IMAGE_UNITS */ -/* reuse GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS */ -/* reuse GL_IMAGE_BINDING_NAME */ -/* reuse GL_IMAGE_BINDING_LEVEL */ -/* reuse GL_IMAGE_BINDING_LAYERED */ -/* reuse GL_IMAGE_BINDING_LAYER */ -/* reuse GL_IMAGE_BINDING_ACCESS */ -/* reuse GL_IMAGE_1D */ -/* reuse GL_IMAGE_2D */ -/* reuse GL_IMAGE_3D */ -/* reuse GL_IMAGE_2D_RECT */ -/* reuse GL_IMAGE_CUBE */ -/* reuse GL_IMAGE_BUFFER */ -/* reuse GL_IMAGE_1D_ARRAY */ -/* reuse GL_IMAGE_2D_ARRAY */ -/* reuse GL_IMAGE_CUBE_MAP_ARRAY */ -/* reuse GL_IMAGE_2D_MULTISAMPLE */ -/* reuse GL_IMAGE_2D_MULTISAMPLE_ARRAY */ -/* reuse GL_INT_IMAGE_1D */ -/* reuse GL_INT_IMAGE_2D */ -/* reuse GL_INT_IMAGE_3D */ -/* reuse GL_INT_IMAGE_2D_RECT */ -/* reuse GL_INT_IMAGE_CUBE */ -/* reuse GL_INT_IMAGE_BUFFER */ -/* reuse GL_INT_IMAGE_1D_ARRAY */ -/* reuse GL_INT_IMAGE_2D_ARRAY */ -/* reuse GL_INT_IMAGE_CUBE_MAP_ARRAY */ -/* reuse GL_INT_IMAGE_2D_MULTISAMPLE */ -/* reuse GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY */ -/* reuse GL_UNSIGNED_INT_IMAGE_1D */ -/* reuse GL_UNSIGNED_INT_IMAGE_2D */ -/* reuse GL_UNSIGNED_INT_IMAGE_3D */ -/* reuse GL_UNSIGNED_INT_IMAGE_2D_RECT */ -/* reuse GL_UNSIGNED_INT_IMAGE_CUBE */ -/* reuse GL_UNSIGNED_INT_IMAGE_BUFFER */ -/* reuse GL_UNSIGNED_INT_IMAGE_1D_ARRAY */ -/* reuse GL_UNSIGNED_INT_IMAGE_2D_ARRAY */ -/* reuse GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY */ -/* reuse GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE */ -/* reuse GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY */ -/* reuse GL_MAX_IMAGE_SAMPLES */ -/* reuse GL_IMAGE_BINDING_FORMAT */ -/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_TYPE */ -/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE */ -/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS */ -/* reuse GL_MAX_VERTEX_IMAGE_UNIFORMS */ -/* reuse GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS */ -/* reuse GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS */ -/* reuse GL_MAX_GEOMETRY_IMAGE_UNIFORMS */ -/* reuse GL_MAX_FRAGMENT_IMAGE_UNIFORMS */ -/* reuse GL_MAX_COMBINED_IMAGE_UNIFORMS */ -/* Reuse tokens from ARB_shading_language_packing (none) */ -/* Reuse tokens from ARB_texture_storage */ -/* reuse GL_TEXTURE_IMMUTABLE_FORMAT */ -#endif - -#ifndef GL_ARB_multitexture -#define GL_TEXTURE0_ARB 0x84C0 -#define GL_TEXTURE1_ARB 0x84C1 -#define GL_TEXTURE2_ARB 0x84C2 -#define GL_TEXTURE3_ARB 0x84C3 -#define GL_TEXTURE4_ARB 0x84C4 -#define GL_TEXTURE5_ARB 0x84C5 -#define GL_TEXTURE6_ARB 0x84C6 -#define GL_TEXTURE7_ARB 0x84C7 -#define GL_TEXTURE8_ARB 0x84C8 -#define GL_TEXTURE9_ARB 0x84C9 -#define GL_TEXTURE10_ARB 0x84CA -#define GL_TEXTURE11_ARB 0x84CB -#define GL_TEXTURE12_ARB 0x84CC -#define GL_TEXTURE13_ARB 0x84CD -#define GL_TEXTURE14_ARB 0x84CE -#define GL_TEXTURE15_ARB 0x84CF -#define GL_TEXTURE16_ARB 0x84D0 -#define GL_TEXTURE17_ARB 0x84D1 -#define GL_TEXTURE18_ARB 0x84D2 -#define GL_TEXTURE19_ARB 0x84D3 -#define GL_TEXTURE20_ARB 0x84D4 -#define GL_TEXTURE21_ARB 0x84D5 -#define GL_TEXTURE22_ARB 0x84D6 -#define GL_TEXTURE23_ARB 0x84D7 -#define GL_TEXTURE24_ARB 0x84D8 -#define GL_TEXTURE25_ARB 0x84D9 -#define GL_TEXTURE26_ARB 0x84DA -#define GL_TEXTURE27_ARB 0x84DB -#define GL_TEXTURE28_ARB 0x84DC -#define GL_TEXTURE29_ARB 0x84DD -#define GL_TEXTURE30_ARB 0x84DE -#define GL_TEXTURE31_ARB 0x84DF -#define GL_ACTIVE_TEXTURE_ARB 0x84E0 -#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 -#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 -#endif - -#ifndef GL_ARB_transpose_matrix -#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3 -#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4 -#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5 -#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6 -#endif - -#ifndef GL_ARB_multisample -#define GL_MULTISAMPLE_ARB 0x809D -#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F -#define GL_SAMPLE_COVERAGE_ARB 0x80A0 -#define GL_SAMPLE_BUFFERS_ARB 0x80A8 -#define GL_SAMPLES_ARB 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB -#define GL_MULTISAMPLE_BIT_ARB 0x20000000 -#endif - -#ifndef GL_ARB_texture_env_add -#endif - -#ifndef GL_ARB_texture_cube_map -#define GL_NORMAL_MAP_ARB 0x8511 -#define GL_REFLECTION_MAP_ARB 0x8512 -#define GL_TEXTURE_CUBE_MAP_ARB 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C -#endif - -#ifndef GL_ARB_texture_compression -#define GL_COMPRESSED_ALPHA_ARB 0x84E9 -#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA -#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB -#define GL_COMPRESSED_INTENSITY_ARB 0x84EC -#define GL_COMPRESSED_RGB_ARB 0x84ED -#define GL_COMPRESSED_RGBA_ARB 0x84EE -#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF -#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 -#define GL_TEXTURE_COMPRESSED_ARB 0x86A1 -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 -#endif - -#ifndef GL_ARB_texture_border_clamp -#define GL_CLAMP_TO_BORDER_ARB 0x812D -#endif - -#ifndef GL_ARB_point_parameters -#define GL_POINT_SIZE_MIN_ARB 0x8126 -#define GL_POINT_SIZE_MAX_ARB 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128 -#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129 -#endif - -#ifndef GL_ARB_vertex_blend -#define GL_MAX_VERTEX_UNITS_ARB 0x86A4 -#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5 -#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6 -#define GL_VERTEX_BLEND_ARB 0x86A7 -#define GL_CURRENT_WEIGHT_ARB 0x86A8 -#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9 -#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA -#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB -#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC -#define GL_WEIGHT_ARRAY_ARB 0x86AD -#define GL_MODELVIEW0_ARB 0x1700 -#define GL_MODELVIEW1_ARB 0x850A -#define GL_MODELVIEW2_ARB 0x8722 -#define GL_MODELVIEW3_ARB 0x8723 -#define GL_MODELVIEW4_ARB 0x8724 -#define GL_MODELVIEW5_ARB 0x8725 -#define GL_MODELVIEW6_ARB 0x8726 -#define GL_MODELVIEW7_ARB 0x8727 -#define GL_MODELVIEW8_ARB 0x8728 -#define GL_MODELVIEW9_ARB 0x8729 -#define GL_MODELVIEW10_ARB 0x872A -#define GL_MODELVIEW11_ARB 0x872B -#define GL_MODELVIEW12_ARB 0x872C -#define GL_MODELVIEW13_ARB 0x872D -#define GL_MODELVIEW14_ARB 0x872E -#define GL_MODELVIEW15_ARB 0x872F -#define GL_MODELVIEW16_ARB 0x8730 -#define GL_MODELVIEW17_ARB 0x8731 -#define GL_MODELVIEW18_ARB 0x8732 -#define GL_MODELVIEW19_ARB 0x8733 -#define GL_MODELVIEW20_ARB 0x8734 -#define GL_MODELVIEW21_ARB 0x8735 -#define GL_MODELVIEW22_ARB 0x8736 -#define GL_MODELVIEW23_ARB 0x8737 -#define GL_MODELVIEW24_ARB 0x8738 -#define GL_MODELVIEW25_ARB 0x8739 -#define GL_MODELVIEW26_ARB 0x873A -#define GL_MODELVIEW27_ARB 0x873B -#define GL_MODELVIEW28_ARB 0x873C -#define GL_MODELVIEW29_ARB 0x873D -#define GL_MODELVIEW30_ARB 0x873E -#define GL_MODELVIEW31_ARB 0x873F -#endif - -#ifndef GL_ARB_matrix_palette -#define GL_MATRIX_PALETTE_ARB 0x8840 -#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841 -#define GL_MAX_PALETTE_MATRICES_ARB 0x8842 -#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843 -#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844 -#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845 -#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846 -#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847 -#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 -#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 -#endif - -#ifndef GL_ARB_texture_env_combine -#define GL_COMBINE_ARB 0x8570 -#define GL_COMBINE_RGB_ARB 0x8571 -#define GL_COMBINE_ALPHA_ARB 0x8572 -#define GL_SOURCE0_RGB_ARB 0x8580 -#define GL_SOURCE1_RGB_ARB 0x8581 -#define GL_SOURCE2_RGB_ARB 0x8582 -#define GL_SOURCE0_ALPHA_ARB 0x8588 -#define GL_SOURCE1_ALPHA_ARB 0x8589 -#define GL_SOURCE2_ALPHA_ARB 0x858A -#define GL_OPERAND0_RGB_ARB 0x8590 -#define GL_OPERAND1_RGB_ARB 0x8591 -#define GL_OPERAND2_RGB_ARB 0x8592 -#define GL_OPERAND0_ALPHA_ARB 0x8598 -#define GL_OPERAND1_ALPHA_ARB 0x8599 -#define GL_OPERAND2_ALPHA_ARB 0x859A -#define GL_RGB_SCALE_ARB 0x8573 -#define GL_ADD_SIGNED_ARB 0x8574 -#define GL_INTERPOLATE_ARB 0x8575 -#define GL_SUBTRACT_ARB 0x84E7 -#define GL_CONSTANT_ARB 0x8576 -#define GL_PRIMARY_COLOR_ARB 0x8577 -#define GL_PREVIOUS_ARB 0x8578 -#endif - -#ifndef GL_ARB_texture_env_crossbar -#endif - -#ifndef GL_ARB_texture_env_dot3 -#define GL_DOT3_RGB_ARB 0x86AE -#define GL_DOT3_RGBA_ARB 0x86AF -#endif - -#ifndef GL_ARB_texture_mirrored_repeat -#define GL_MIRRORED_REPEAT_ARB 0x8370 -#endif - -#ifndef GL_ARB_depth_texture -#define GL_DEPTH_COMPONENT16_ARB 0x81A5 -#define GL_DEPTH_COMPONENT24_ARB 0x81A6 -#define GL_DEPTH_COMPONENT32_ARB 0x81A7 -#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A -#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B -#endif - -#ifndef GL_ARB_shadow -#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C -#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D -#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E -#endif - -#ifndef GL_ARB_shadow_ambient -#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF -#endif - -#ifndef GL_ARB_window_pos -#endif - -#ifndef GL_ARB_vertex_program -#define GL_COLOR_SUM_ARB 0x8458 -#define GL_VERTEX_PROGRAM_ARB 0x8620 -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 -#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 -#define GL_PROGRAM_LENGTH_ARB 0x8627 -#define GL_PROGRAM_STRING_ARB 0x8628 -#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E -#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F -#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 -#define GL_CURRENT_MATRIX_ARB 0x8641 -#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 -#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 -#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 -#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B -#define GL_PROGRAM_BINDING_ARB 0x8677 -#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A -#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 -#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 -#define GL_PROGRAM_FORMAT_ARB 0x8876 -#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 -#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 -#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 -#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 -#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 -#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 -#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 -#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 -#define GL_PROGRAM_PARAMETERS_ARB 0x88A8 -#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 -#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA -#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB -#define GL_PROGRAM_ATTRIBS_ARB 0x88AC -#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD -#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE -#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF -#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 -#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 -#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 -#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 -#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 -#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 -#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 -#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 -#define GL_MATRIX0_ARB 0x88C0 -#define GL_MATRIX1_ARB 0x88C1 -#define GL_MATRIX2_ARB 0x88C2 -#define GL_MATRIX3_ARB 0x88C3 -#define GL_MATRIX4_ARB 0x88C4 -#define GL_MATRIX5_ARB 0x88C5 -#define GL_MATRIX6_ARB 0x88C6 -#define GL_MATRIX7_ARB 0x88C7 -#define GL_MATRIX8_ARB 0x88C8 -#define GL_MATRIX9_ARB 0x88C9 -#define GL_MATRIX10_ARB 0x88CA -#define GL_MATRIX11_ARB 0x88CB -#define GL_MATRIX12_ARB 0x88CC -#define GL_MATRIX13_ARB 0x88CD -#define GL_MATRIX14_ARB 0x88CE -#define GL_MATRIX15_ARB 0x88CF -#define GL_MATRIX16_ARB 0x88D0 -#define GL_MATRIX17_ARB 0x88D1 -#define GL_MATRIX18_ARB 0x88D2 -#define GL_MATRIX19_ARB 0x88D3 -#define GL_MATRIX20_ARB 0x88D4 -#define GL_MATRIX21_ARB 0x88D5 -#define GL_MATRIX22_ARB 0x88D6 -#define GL_MATRIX23_ARB 0x88D7 -#define GL_MATRIX24_ARB 0x88D8 -#define GL_MATRIX25_ARB 0x88D9 -#define GL_MATRIX26_ARB 0x88DA -#define GL_MATRIX27_ARB 0x88DB -#define GL_MATRIX28_ARB 0x88DC -#define GL_MATRIX29_ARB 0x88DD -#define GL_MATRIX30_ARB 0x88DE -#define GL_MATRIX31_ARB 0x88DF -#endif - -#ifndef GL_ARB_fragment_program -#define GL_FRAGMENT_PROGRAM_ARB 0x8804 -#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 -#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 -#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 -#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 -#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 -#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A -#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B -#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C -#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D -#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E -#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F -#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 -#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 -#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 -#endif - -#ifndef GL_ARB_vertex_buffer_object -#define GL_BUFFER_SIZE_ARB 0x8764 -#define GL_BUFFER_USAGE_ARB 0x8765 -#define GL_ARRAY_BUFFER_ARB 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 -#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 -#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 -#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 -#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 -#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 -#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A -#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B -#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C -#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D -#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F -#define GL_READ_ONLY_ARB 0x88B8 -#define GL_WRITE_ONLY_ARB 0x88B9 -#define GL_READ_WRITE_ARB 0x88BA -#define GL_BUFFER_ACCESS_ARB 0x88BB -#define GL_BUFFER_MAPPED_ARB 0x88BC -#define GL_BUFFER_MAP_POINTER_ARB 0x88BD -#define GL_STREAM_DRAW_ARB 0x88E0 -#define GL_STREAM_READ_ARB 0x88E1 -#define GL_STREAM_COPY_ARB 0x88E2 -#define GL_STATIC_DRAW_ARB 0x88E4 -#define GL_STATIC_READ_ARB 0x88E5 -#define GL_STATIC_COPY_ARB 0x88E6 -#define GL_DYNAMIC_DRAW_ARB 0x88E8 -#define GL_DYNAMIC_READ_ARB 0x88E9 -#define GL_DYNAMIC_COPY_ARB 0x88EA -#endif - -#ifndef GL_ARB_occlusion_query -#define GL_QUERY_COUNTER_BITS_ARB 0x8864 -#define GL_CURRENT_QUERY_ARB 0x8865 -#define GL_QUERY_RESULT_ARB 0x8866 -#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 -#define GL_SAMPLES_PASSED_ARB 0x8914 -#endif - -#ifndef GL_ARB_shader_objects -#define GL_PROGRAM_OBJECT_ARB 0x8B40 -#define GL_SHADER_OBJECT_ARB 0x8B48 -#define GL_OBJECT_TYPE_ARB 0x8B4E -#define GL_OBJECT_SUBTYPE_ARB 0x8B4F -#define GL_FLOAT_VEC2_ARB 0x8B50 -#define GL_FLOAT_VEC3_ARB 0x8B51 -#define GL_FLOAT_VEC4_ARB 0x8B52 -#define GL_INT_VEC2_ARB 0x8B53 -#define GL_INT_VEC3_ARB 0x8B54 -#define GL_INT_VEC4_ARB 0x8B55 -#define GL_BOOL_ARB 0x8B56 -#define GL_BOOL_VEC2_ARB 0x8B57 -#define GL_BOOL_VEC3_ARB 0x8B58 -#define GL_BOOL_VEC4_ARB 0x8B59 -#define GL_FLOAT_MAT2_ARB 0x8B5A -#define GL_FLOAT_MAT3_ARB 0x8B5B -#define GL_FLOAT_MAT4_ARB 0x8B5C -#define GL_SAMPLER_1D_ARB 0x8B5D -#define GL_SAMPLER_2D_ARB 0x8B5E -#define GL_SAMPLER_3D_ARB 0x8B5F -#define GL_SAMPLER_CUBE_ARB 0x8B60 -#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 -#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 -#define GL_SAMPLER_2D_RECT_ARB 0x8B63 -#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 -#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 -#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 -#define GL_OBJECT_LINK_STATUS_ARB 0x8B82 -#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 -#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 -#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 -#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 -#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 -#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 -#endif - -#ifndef GL_ARB_vertex_shader -#define GL_VERTEX_SHADER_ARB 0x8B31 -#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A -#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D -#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 -#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A -#endif - -#ifndef GL_ARB_fragment_shader -#define GL_FRAGMENT_SHADER_ARB 0x8B30 -#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B -#endif - -#ifndef GL_ARB_shading_language_100 -#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C -#endif - -#ifndef GL_ARB_texture_non_power_of_two -#endif - -#ifndef GL_ARB_point_sprite -#define GL_POINT_SPRITE_ARB 0x8861 -#define GL_COORD_REPLACE_ARB 0x8862 -#endif - -#ifndef GL_ARB_fragment_program_shadow -#endif - -#ifndef GL_ARB_draw_buffers -#define GL_MAX_DRAW_BUFFERS_ARB 0x8824 -#define GL_DRAW_BUFFER0_ARB 0x8825 -#define GL_DRAW_BUFFER1_ARB 0x8826 -#define GL_DRAW_BUFFER2_ARB 0x8827 -#define GL_DRAW_BUFFER3_ARB 0x8828 -#define GL_DRAW_BUFFER4_ARB 0x8829 -#define GL_DRAW_BUFFER5_ARB 0x882A -#define GL_DRAW_BUFFER6_ARB 0x882B -#define GL_DRAW_BUFFER7_ARB 0x882C -#define GL_DRAW_BUFFER8_ARB 0x882D -#define GL_DRAW_BUFFER9_ARB 0x882E -#define GL_DRAW_BUFFER10_ARB 0x882F -#define GL_DRAW_BUFFER11_ARB 0x8830 -#define GL_DRAW_BUFFER12_ARB 0x8831 -#define GL_DRAW_BUFFER13_ARB 0x8832 -#define GL_DRAW_BUFFER14_ARB 0x8833 -#define GL_DRAW_BUFFER15_ARB 0x8834 -#endif - -#ifndef GL_ARB_texture_rectangle -#define GL_TEXTURE_RECTANGLE_ARB 0x84F5 -#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 -#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 -#endif - -#ifndef GL_ARB_color_buffer_float -#define GL_RGBA_FLOAT_MODE_ARB 0x8820 -#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A -#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B -#define GL_CLAMP_READ_COLOR_ARB 0x891C -#define GL_FIXED_ONLY_ARB 0x891D -#endif - -#ifndef GL_ARB_half_float_pixel -#define GL_HALF_FLOAT_ARB 0x140B -#endif - -#ifndef GL_ARB_texture_float -#define GL_TEXTURE_RED_TYPE_ARB 0x8C10 -#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11 -#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12 -#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13 -#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14 -#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15 -#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16 -#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17 -#define GL_RGBA32F_ARB 0x8814 -#define GL_RGB32F_ARB 0x8815 -#define GL_ALPHA32F_ARB 0x8816 -#define GL_INTENSITY32F_ARB 0x8817 -#define GL_LUMINANCE32F_ARB 0x8818 -#define GL_LUMINANCE_ALPHA32F_ARB 0x8819 -#define GL_RGBA16F_ARB 0x881A -#define GL_RGB16F_ARB 0x881B -#define GL_ALPHA16F_ARB 0x881C -#define GL_INTENSITY16F_ARB 0x881D -#define GL_LUMINANCE16F_ARB 0x881E -#define GL_LUMINANCE_ALPHA16F_ARB 0x881F -#endif - -#ifndef GL_ARB_pixel_buffer_object -#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB -#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF -#endif - -#ifndef GL_ARB_depth_buffer_float -#define GL_DEPTH_COMPONENT32F 0x8CAC -#define GL_DEPTH32F_STENCIL8 0x8CAD -#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD -#endif - -#ifndef GL_ARB_draw_instanced -#endif - -#ifndef GL_ARB_framebuffer_object -#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 -#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 -#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 -#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 -#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 -#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 -#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 -#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 -#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 -#define GL_FRAMEBUFFER_DEFAULT 0x8218 -#define GL_FRAMEBUFFER_UNDEFINED 0x8219 -#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A -#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 -#define GL_DEPTH_STENCIL 0x84F9 -#define GL_UNSIGNED_INT_24_8 0x84FA -#define GL_DEPTH24_STENCIL8 0x88F0 -#define GL_TEXTURE_STENCIL_SIZE 0x88F1 -#define GL_TEXTURE_RED_TYPE 0x8C10 -#define GL_TEXTURE_GREEN_TYPE 0x8C11 -#define GL_TEXTURE_BLUE_TYPE 0x8C12 -#define GL_TEXTURE_ALPHA_TYPE 0x8C13 -#define GL_TEXTURE_DEPTH_TYPE 0x8C16 -#define GL_UNSIGNED_NORMALIZED 0x8C17 -#define GL_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_DRAW_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING -#define GL_RENDERBUFFER_BINDING 0x8CA7 -#define GL_READ_FRAMEBUFFER 0x8CA8 -#define GL_DRAW_FRAMEBUFFER 0x8CA9 -#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA -#define GL_RENDERBUFFER_SAMPLES 0x8CAB -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 -#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB -#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC -#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD -#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF -#define GL_COLOR_ATTACHMENT0 0x8CE0 -#define GL_COLOR_ATTACHMENT1 0x8CE1 -#define GL_COLOR_ATTACHMENT2 0x8CE2 -#define GL_COLOR_ATTACHMENT3 0x8CE3 -#define GL_COLOR_ATTACHMENT4 0x8CE4 -#define GL_COLOR_ATTACHMENT5 0x8CE5 -#define GL_COLOR_ATTACHMENT6 0x8CE6 -#define GL_COLOR_ATTACHMENT7 0x8CE7 -#define GL_COLOR_ATTACHMENT8 0x8CE8 -#define GL_COLOR_ATTACHMENT9 0x8CE9 -#define GL_COLOR_ATTACHMENT10 0x8CEA -#define GL_COLOR_ATTACHMENT11 0x8CEB -#define GL_COLOR_ATTACHMENT12 0x8CEC -#define GL_COLOR_ATTACHMENT13 0x8CED -#define GL_COLOR_ATTACHMENT14 0x8CEE -#define GL_COLOR_ATTACHMENT15 0x8CEF -#define GL_DEPTH_ATTACHMENT 0x8D00 -#define GL_STENCIL_ATTACHMENT 0x8D20 -#define GL_FRAMEBUFFER 0x8D40 -#define GL_RENDERBUFFER 0x8D41 -#define GL_RENDERBUFFER_WIDTH 0x8D42 -#define GL_RENDERBUFFER_HEIGHT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 -#define GL_STENCIL_INDEX1 0x8D46 -#define GL_STENCIL_INDEX4 0x8D47 -#define GL_STENCIL_INDEX8 0x8D48 -#define GL_STENCIL_INDEX16 0x8D49 -#define GL_RENDERBUFFER_RED_SIZE 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 -#define GL_MAX_SAMPLES 0x8D57 -#endif - -#ifndef GL_ARB_framebuffer_object_DEPRECATED -#define GL_INDEX 0x8222 -#define GL_TEXTURE_LUMINANCE_TYPE 0x8C14 -#define GL_TEXTURE_INTENSITY_TYPE 0x8C15 -#endif - -#ifndef GL_ARB_framebuffer_sRGB -#define GL_FRAMEBUFFER_SRGB 0x8DB9 -#endif - -#ifndef GL_ARB_geometry_shader4 -#define GL_LINES_ADJACENCY_ARB 0x000A -#define GL_LINE_STRIP_ADJACENCY_ARB 0x000B -#define GL_TRIANGLES_ADJACENCY_ARB 0x000C -#define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D -#define GL_PROGRAM_POINT_SIZE_ARB 0x8642 -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9 -#define GL_GEOMETRY_SHADER_ARB 0x8DD9 -#define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA -#define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB -#define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC -#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD -#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1 -/* reuse GL_MAX_VARYING_COMPONENTS */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ -#endif - -#ifndef GL_ARB_half_float_vertex -#define GL_HALF_FLOAT 0x140B -#endif - -#ifndef GL_ARB_instanced_arrays -#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE -#endif - -#ifndef GL_ARB_map_buffer_range -#define GL_MAP_READ_BIT 0x0001 -#define GL_MAP_WRITE_BIT 0x0002 -#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 -#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 -#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 -#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 -#endif - -#ifndef GL_ARB_texture_buffer_object -#define GL_TEXTURE_BUFFER_ARB 0x8C2A -#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B -#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D -#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E -#endif - -#ifndef GL_ARB_texture_compression_rgtc -#define GL_COMPRESSED_RED_RGTC1 0x8DBB -#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC -#define GL_COMPRESSED_RG_RGTC2 0x8DBD -#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE -#endif - -#ifndef GL_ARB_texture_rg -#define GL_RG 0x8227 -#define GL_RG_INTEGER 0x8228 -#define GL_R8 0x8229 -#define GL_R16 0x822A -#define GL_RG8 0x822B -#define GL_RG16 0x822C -#define GL_R16F 0x822D -#define GL_R32F 0x822E -#define GL_RG16F 0x822F -#define GL_RG32F 0x8230 -#define GL_R8I 0x8231 -#define GL_R8UI 0x8232 -#define GL_R16I 0x8233 -#define GL_R16UI 0x8234 -#define GL_R32I 0x8235 -#define GL_R32UI 0x8236 -#define GL_RG8I 0x8237 -#define GL_RG8UI 0x8238 -#define GL_RG16I 0x8239 -#define GL_RG16UI 0x823A -#define GL_RG32I 0x823B -#define GL_RG32UI 0x823C -#endif - -#ifndef GL_ARB_vertex_array_object -#define GL_VERTEX_ARRAY_BINDING 0x85B5 -#endif - -#ifndef GL_ARB_uniform_buffer_object -#define GL_UNIFORM_BUFFER 0x8A11 -#define GL_UNIFORM_BUFFER_BINDING 0x8A28 -#define GL_UNIFORM_BUFFER_START 0x8A29 -#define GL_UNIFORM_BUFFER_SIZE 0x8A2A -#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B -#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C -#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D -#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E -#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F -#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 -#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 -#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 -#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 -#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 -#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 -#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 -#define GL_UNIFORM_TYPE 0x8A37 -#define GL_UNIFORM_SIZE 0x8A38 -#define GL_UNIFORM_NAME_LENGTH 0x8A39 -#define GL_UNIFORM_BLOCK_INDEX 0x8A3A -#define GL_UNIFORM_OFFSET 0x8A3B -#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C -#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D -#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E -#define GL_UNIFORM_BLOCK_BINDING 0x8A3F -#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 -#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 -#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 -#define GL_INVALID_INDEX 0xFFFFFFFFu -#endif - -#ifndef GL_ARB_compatibility -/* ARB_compatibility just defines tokens from core 3.0 */ -#endif - -#ifndef GL_ARB_copy_buffer -#define GL_COPY_READ_BUFFER 0x8F36 -#define GL_COPY_WRITE_BUFFER 0x8F37 -#endif - -#ifndef GL_ARB_shader_texture_lod -#endif - -#ifndef GL_ARB_depth_clamp -#define GL_DEPTH_CLAMP 0x864F -#endif - -#ifndef GL_ARB_draw_elements_base_vertex -#endif - -#ifndef GL_ARB_fragment_coord_conventions -#endif - -#ifndef GL_ARB_provoking_vertex -#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C -#define GL_FIRST_VERTEX_CONVENTION 0x8E4D -#define GL_LAST_VERTEX_CONVENTION 0x8E4E -#define GL_PROVOKING_VERTEX 0x8E4F -#endif - -#ifndef GL_ARB_seamless_cube_map -#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F -#endif - -#ifndef GL_ARB_sync -#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 -#define GL_OBJECT_TYPE 0x9112 -#define GL_SYNC_CONDITION 0x9113 -#define GL_SYNC_STATUS 0x9114 -#define GL_SYNC_FLAGS 0x9115 -#define GL_SYNC_FENCE 0x9116 -#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 -#define GL_UNSIGNALED 0x9118 -#define GL_SIGNALED 0x9119 -#define GL_ALREADY_SIGNALED 0x911A -#define GL_TIMEOUT_EXPIRED 0x911B -#define GL_CONDITION_SATISFIED 0x911C -#define GL_WAIT_FAILED 0x911D -#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 -#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull -#endif - -#ifndef GL_ARB_texture_multisample -#define GL_SAMPLE_POSITION 0x8E50 -#define GL_SAMPLE_MASK 0x8E51 -#define GL_SAMPLE_MASK_VALUE 0x8E52 -#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 -#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 -#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101 -#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 -#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103 -#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 -#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 -#define GL_TEXTURE_SAMPLES 0x9106 -#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 -#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 -#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 -#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A -#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B -#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C -#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D -#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E -#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F -#define GL_MAX_INTEGER_SAMPLES 0x9110 -#endif - -#ifndef GL_ARB_vertex_array_bgra -/* reuse GL_BGRA */ -#endif - -#ifndef GL_ARB_draw_buffers_blend -#endif - -#ifndef GL_ARB_sample_shading -#define GL_SAMPLE_SHADING_ARB 0x8C36 -#define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37 -#endif - -#ifndef GL_ARB_texture_cube_map_array -#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009 -#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A -#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B -#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C -#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D -#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E -#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F -#endif - -#ifndef GL_ARB_texture_gather -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F -#endif - -#ifndef GL_ARB_texture_query_lod -#endif - -#ifndef GL_ARB_shading_language_include -#define GL_SHADER_INCLUDE_ARB 0x8DAE -#define GL_NAMED_STRING_LENGTH_ARB 0x8DE9 -#define GL_NAMED_STRING_TYPE_ARB 0x8DEA -#endif - -#ifndef GL_ARB_texture_compression_bptc -#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C -#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D -#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E -#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F -#endif - -#ifndef GL_ARB_blend_func_extended -#define GL_SRC1_COLOR 0x88F9 -/* reuse GL_SRC1_ALPHA */ -#define GL_ONE_MINUS_SRC1_COLOR 0x88FA -#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB -#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC -#endif - -#ifndef GL_ARB_explicit_attrib_location -#endif - -#ifndef GL_ARB_occlusion_query2 -#define GL_ANY_SAMPLES_PASSED 0x8C2F -#endif - -#ifndef GL_ARB_sampler_objects -#define GL_SAMPLER_BINDING 0x8919 -#endif - -#ifndef GL_ARB_shader_bit_encoding -#endif - -#ifndef GL_ARB_texture_rgb10_a2ui -#define GL_RGB10_A2UI 0x906F -#endif - -#ifndef GL_ARB_texture_swizzle -#define GL_TEXTURE_SWIZZLE_R 0x8E42 -#define GL_TEXTURE_SWIZZLE_G 0x8E43 -#define GL_TEXTURE_SWIZZLE_B 0x8E44 -#define GL_TEXTURE_SWIZZLE_A 0x8E45 -#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46 -#endif - -#ifndef GL_ARB_timer_query -#define GL_TIME_ELAPSED 0x88BF -#define GL_TIMESTAMP 0x8E28 -#endif - -#ifndef GL_ARB_vertex_type_2_10_10_10_rev -/* reuse GL_UNSIGNED_INT_2_10_10_10_REV */ -#define GL_INT_2_10_10_10_REV 0x8D9F -#endif - -#ifndef GL_ARB_draw_indirect -#define GL_DRAW_INDIRECT_BUFFER 0x8F3F -#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 -#endif - -#ifndef GL_ARB_gpu_shader5 -#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F -#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A -#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B -#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C -#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D -/* reuse GL_MAX_VERTEX_STREAMS */ -#endif - -#ifndef GL_ARB_gpu_shader_fp64 -/* reuse GL_DOUBLE */ -#define GL_DOUBLE_VEC2 0x8FFC -#define GL_DOUBLE_VEC3 0x8FFD -#define GL_DOUBLE_VEC4 0x8FFE -#define GL_DOUBLE_MAT2 0x8F46 -#define GL_DOUBLE_MAT3 0x8F47 -#define GL_DOUBLE_MAT4 0x8F48 -#define GL_DOUBLE_MAT2x3 0x8F49 -#define GL_DOUBLE_MAT2x4 0x8F4A -#define GL_DOUBLE_MAT3x2 0x8F4B -#define GL_DOUBLE_MAT3x4 0x8F4C -#define GL_DOUBLE_MAT4x2 0x8F4D -#define GL_DOUBLE_MAT4x3 0x8F4E -#endif - -#ifndef GL_ARB_shader_subroutine -#define GL_ACTIVE_SUBROUTINES 0x8DE5 -#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6 -#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47 -#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48 -#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49 -#define GL_MAX_SUBROUTINES 0x8DE7 -#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8 -#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A -#define GL_COMPATIBLE_SUBROUTINES 0x8E4B -/* reuse GL_UNIFORM_SIZE */ -/* reuse GL_UNIFORM_NAME_LENGTH */ -#endif - -#ifndef GL_ARB_tessellation_shader -#define GL_PATCHES 0x000E -#define GL_PATCH_VERTICES 0x8E72 -#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73 -#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74 -#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 -#define GL_TESS_GEN_MODE 0x8E76 -#define GL_TESS_GEN_SPACING 0x8E77 -#define GL_TESS_GEN_VERTEX_ORDER 0x8E78 -#define GL_TESS_GEN_POINT_MODE 0x8E79 -/* reuse GL_TRIANGLES */ -/* reuse GL_QUADS */ -#define GL_ISOLINES 0x8E7A -/* reuse GL_EQUAL */ -#define GL_FRACTIONAL_ODD 0x8E7B -#define GL_FRACTIONAL_EVEN 0x8E7C -/* reuse GL_CCW */ -/* reuse GL_CW */ -#define GL_MAX_PATCH_VERTICES 0x8E7D -#define GL_MAX_TESS_GEN_LEVEL 0x8E7E -#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F -#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 -#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 -#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 -#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 -#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 -#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 -#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 -#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 -#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A -#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C -#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D -#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E -#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F -#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0 -#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1 -#define GL_TESS_EVALUATION_SHADER 0x8E87 -#define GL_TESS_CONTROL_SHADER 0x8E88 -#endif - -#ifndef GL_ARB_texture_buffer_object_rgb32 -/* reuse GL_RGB32F */ -/* reuse GL_RGB32UI */ -/* reuse GL_RGB32I */ -#endif - -#ifndef GL_ARB_transform_feedback2 -#define GL_TRANSFORM_FEEDBACK 0x8E22 -#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED 0x8E23 -#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE 0x8E24 -#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 -#endif - -#ifndef GL_ARB_transform_feedback3 -#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70 -#define GL_MAX_VERTEX_STREAMS 0x8E71 -#endif - -#ifndef GL_ARB_ES2_compatibility -#define GL_FIXED 0x140C -#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B -#define GL_LOW_FLOAT 0x8DF0 -#define GL_MEDIUM_FLOAT 0x8DF1 -#define GL_HIGH_FLOAT 0x8DF2 -#define GL_LOW_INT 0x8DF3 -#define GL_MEDIUM_INT 0x8DF4 -#define GL_HIGH_INT 0x8DF5 -#define GL_SHADER_COMPILER 0x8DFA -#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 -#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB -#define GL_MAX_VARYING_VECTORS 0x8DFC -#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD -#endif - -#ifndef GL_ARB_get_program_binary -#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 -#define GL_PROGRAM_BINARY_LENGTH 0x8741 -#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE -#define GL_PROGRAM_BINARY_FORMATS 0x87FF -#endif - -#ifndef GL_ARB_separate_shader_objects -#define GL_VERTEX_SHADER_BIT 0x00000001 -#define GL_FRAGMENT_SHADER_BIT 0x00000002 -#define GL_GEOMETRY_SHADER_BIT 0x00000004 -#define GL_TESS_CONTROL_SHADER_BIT 0x00000008 -#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 -#define GL_ALL_SHADER_BITS 0xFFFFFFFF -#define GL_PROGRAM_SEPARABLE 0x8258 -#define GL_ACTIVE_PROGRAM 0x8259 -#define GL_PROGRAM_PIPELINE_BINDING 0x825A -#endif - -#ifndef GL_ARB_shader_precision -#endif - -#ifndef GL_ARB_vertex_attrib_64bit -/* reuse GL_RGB32I */ -/* reuse GL_DOUBLE_VEC2 */ -/* reuse GL_DOUBLE_VEC3 */ -/* reuse GL_DOUBLE_VEC4 */ -/* reuse GL_DOUBLE_MAT2 */ -/* reuse GL_DOUBLE_MAT3 */ -/* reuse GL_DOUBLE_MAT4 */ -/* reuse GL_DOUBLE_MAT2x3 */ -/* reuse GL_DOUBLE_MAT2x4 */ -/* reuse GL_DOUBLE_MAT3x2 */ -/* reuse GL_DOUBLE_MAT3x4 */ -/* reuse GL_DOUBLE_MAT4x2 */ -/* reuse GL_DOUBLE_MAT4x3 */ -#endif - -#ifndef GL_ARB_viewport_array -/* reuse GL_SCISSOR_BOX */ -/* reuse GL_VIEWPORT */ -/* reuse GL_DEPTH_RANGE */ -/* reuse GL_SCISSOR_TEST */ -#define GL_MAX_VIEWPORTS 0x825B -#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C -#define GL_VIEWPORT_BOUNDS_RANGE 0x825D -#define GL_LAYER_PROVOKING_VERTEX 0x825E -#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F -#define GL_UNDEFINED_VERTEX 0x8260 -/* reuse GL_FIRST_VERTEX_CONVENTION */ -/* reuse GL_LAST_VERTEX_CONVENTION */ -/* reuse GL_PROVOKING_VERTEX */ -#endif - -#ifndef GL_ARB_cl_event -#define GL_SYNC_CL_EVENT_ARB 0x8240 -#define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241 -#endif - -#ifndef GL_ARB_debug_output -#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242 -#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243 -#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244 -#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245 -#define GL_DEBUG_SOURCE_API_ARB 0x8246 -#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247 -#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248 -#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249 -#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A -#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B -#define GL_DEBUG_TYPE_ERROR_ARB 0x824C -#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D -#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E -#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F -#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250 -#define GL_DEBUG_TYPE_OTHER_ARB 0x8251 -#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143 -#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144 -#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145 -#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146 -#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147 -#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148 -#endif - -#ifndef GL_ARB_robustness -/* reuse GL_NO_ERROR */ -#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004 -#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 -#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253 -#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254 -#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255 -#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 -#define GL_NO_RESET_NOTIFICATION_ARB 0x8261 -#endif - -#ifndef GL_ARB_shader_stencil_export -#endif - -#ifndef GL_ARB_base_instance -#endif - -#ifndef GL_ARB_shading_language_420pack -#endif - -#ifndef GL_ARB_transform_feedback_instanced -#endif - -#ifndef GL_ARB_compressed_texture_pixel_storage -#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127 -#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128 -#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129 -#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A -#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B -#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C -#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D -#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E -#endif - -#ifndef GL_ARB_conservative_depth -#endif - -#ifndef GL_ARB_internalformat_query -#define GL_NUM_SAMPLE_COUNTS 0x9380 -#endif - -#ifndef GL_ARB_map_buffer_alignment -#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC -#endif - -#ifndef GL_ARB_shader_atomic_counters -#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 -#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 -#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 -#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 -#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4 -#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5 -#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9 -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA -#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB -#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE -#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF -#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 -#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 -#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 -#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 -#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 -#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 -#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 -#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 -#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 -#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC -#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 -#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA -#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB -#endif - -#ifndef GL_ARB_shader_image_load_store -#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 -#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 -#define GL_UNIFORM_BARRIER_BIT 0x00000004 -#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 -#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 -#define GL_COMMAND_BARRIER_BIT 0x00000040 -#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 -#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 -#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 -#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 -#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 -#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 -#define GL_ALL_BARRIER_BITS 0xFFFFFFFF -#define GL_MAX_IMAGE_UNITS 0x8F38 -#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39 -#define GL_IMAGE_BINDING_NAME 0x8F3A -#define GL_IMAGE_BINDING_LEVEL 0x8F3B -#define GL_IMAGE_BINDING_LAYERED 0x8F3C -#define GL_IMAGE_BINDING_LAYER 0x8F3D -#define GL_IMAGE_BINDING_ACCESS 0x8F3E -#define GL_IMAGE_1D 0x904C -#define GL_IMAGE_2D 0x904D -#define GL_IMAGE_3D 0x904E -#define GL_IMAGE_2D_RECT 0x904F -#define GL_IMAGE_CUBE 0x9050 -#define GL_IMAGE_BUFFER 0x9051 -#define GL_IMAGE_1D_ARRAY 0x9052 -#define GL_IMAGE_2D_ARRAY 0x9053 -#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 -#define GL_IMAGE_2D_MULTISAMPLE 0x9055 -#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056 -#define GL_INT_IMAGE_1D 0x9057 -#define GL_INT_IMAGE_2D 0x9058 -#define GL_INT_IMAGE_3D 0x9059 -#define GL_INT_IMAGE_2D_RECT 0x905A -#define GL_INT_IMAGE_CUBE 0x905B -#define GL_INT_IMAGE_BUFFER 0x905C -#define GL_INT_IMAGE_1D_ARRAY 0x905D -#define GL_INT_IMAGE_2D_ARRAY 0x905E -#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F -#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060 -#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061 -#define GL_UNSIGNED_INT_IMAGE_1D 0x9062 -#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 -#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 -#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065 -#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 -#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 -#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068 -#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 -#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C -#define GL_MAX_IMAGE_SAMPLES 0x906D -#define GL_IMAGE_BINDING_FORMAT 0x906E -#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 -#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 -#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 -#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA -#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB -#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC -#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD -#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE -#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF -#endif - -#ifndef GL_ARB_shading_language_packing -#endif - -#ifndef GL_ARB_texture_storage -#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F -#endif - -#ifndef GL_EXT_abgr -#define GL_ABGR_EXT 0x8000 -#endif - -#ifndef GL_EXT_blend_color -#define GL_CONSTANT_COLOR_EXT 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002 -#define GL_CONSTANT_ALPHA_EXT 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004 -#define GL_BLEND_COLOR_EXT 0x8005 -#endif - -#ifndef GL_EXT_polygon_offset -#define GL_POLYGON_OFFSET_EXT 0x8037 -#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038 -#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039 -#endif - -#ifndef GL_EXT_texture -#define GL_ALPHA4_EXT 0x803B -#define GL_ALPHA8_EXT 0x803C -#define GL_ALPHA12_EXT 0x803D -#define GL_ALPHA16_EXT 0x803E -#define GL_LUMINANCE4_EXT 0x803F -#define GL_LUMINANCE8_EXT 0x8040 -#define GL_LUMINANCE12_EXT 0x8041 -#define GL_LUMINANCE16_EXT 0x8042 -#define GL_LUMINANCE4_ALPHA4_EXT 0x8043 -#define GL_LUMINANCE6_ALPHA2_EXT 0x8044 -#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 -#define GL_LUMINANCE12_ALPHA4_EXT 0x8046 -#define GL_LUMINANCE12_ALPHA12_EXT 0x8047 -#define GL_LUMINANCE16_ALPHA16_EXT 0x8048 -#define GL_INTENSITY_EXT 0x8049 -#define GL_INTENSITY4_EXT 0x804A -#define GL_INTENSITY8_EXT 0x804B -#define GL_INTENSITY12_EXT 0x804C -#define GL_INTENSITY16_EXT 0x804D -#define GL_RGB2_EXT 0x804E -#define GL_RGB4_EXT 0x804F -#define GL_RGB5_EXT 0x8050 -#define GL_RGB8_EXT 0x8051 -#define GL_RGB10_EXT 0x8052 -#define GL_RGB12_EXT 0x8053 -#define GL_RGB16_EXT 0x8054 -#define GL_RGBA2_EXT 0x8055 -#define GL_RGBA4_EXT 0x8056 -#define GL_RGB5_A1_EXT 0x8057 -#define GL_RGBA8_EXT 0x8058 -#define GL_RGB10_A2_EXT 0x8059 -#define GL_RGBA12_EXT 0x805A -#define GL_RGBA16_EXT 0x805B -#define GL_TEXTURE_RED_SIZE_EXT 0x805C -#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D -#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E -#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F -#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060 -#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061 -#define GL_REPLACE_EXT 0x8062 -#define GL_PROXY_TEXTURE_1D_EXT 0x8063 -#define GL_PROXY_TEXTURE_2D_EXT 0x8064 -#define GL_TEXTURE_TOO_LARGE_EXT 0x8065 -#endif - -#ifndef GL_EXT_texture3D -#define GL_PACK_SKIP_IMAGES_EXT 0x806B -#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C -#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D -#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E -#define GL_TEXTURE_3D_EXT 0x806F -#define GL_PROXY_TEXTURE_3D_EXT 0x8070 -#define GL_TEXTURE_DEPTH_EXT 0x8071 -#define GL_TEXTURE_WRAP_R_EXT 0x8072 -#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073 -#endif - -#ifndef GL_SGIS_texture_filter4 -#define GL_FILTER4_SGIS 0x8146 -#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147 -#endif - -#ifndef GL_EXT_subtexture -#endif - -#ifndef GL_EXT_copy_texture -#endif - -#ifndef GL_EXT_histogram -#define GL_HISTOGRAM_EXT 0x8024 -#define GL_PROXY_HISTOGRAM_EXT 0x8025 -#define GL_HISTOGRAM_WIDTH_EXT 0x8026 -#define GL_HISTOGRAM_FORMAT_EXT 0x8027 -#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028 -#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029 -#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A -#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B -#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C -#define GL_HISTOGRAM_SINK_EXT 0x802D -#define GL_MINMAX_EXT 0x802E -#define GL_MINMAX_FORMAT_EXT 0x802F -#define GL_MINMAX_SINK_EXT 0x8030 -#define GL_TABLE_TOO_LARGE_EXT 0x8031 -#endif - -#ifndef GL_EXT_convolution -#define GL_CONVOLUTION_1D_EXT 0x8010 -#define GL_CONVOLUTION_2D_EXT 0x8011 -#define GL_SEPARABLE_2D_EXT 0x8012 -#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013 -#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014 -#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015 -#define GL_REDUCE_EXT 0x8016 -#define GL_CONVOLUTION_FORMAT_EXT 0x8017 -#define GL_CONVOLUTION_WIDTH_EXT 0x8018 -#define GL_CONVOLUTION_HEIGHT_EXT 0x8019 -#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A -#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B -#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C -#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D -#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E -#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F -#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020 -#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021 -#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022 -#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023 -#endif - -#ifndef GL_SGI_color_matrix -#define GL_COLOR_MATRIX_SGI 0x80B1 -#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2 -#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3 -#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4 -#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5 -#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6 -#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7 -#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8 -#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9 -#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA -#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB -#endif - -#ifndef GL_SGI_color_table -#define GL_COLOR_TABLE_SGI 0x80D0 -#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1 -#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2 -#define GL_PROXY_COLOR_TABLE_SGI 0x80D3 -#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4 -#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5 -#define GL_COLOR_TABLE_SCALE_SGI 0x80D6 -#define GL_COLOR_TABLE_BIAS_SGI 0x80D7 -#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8 -#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9 -#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA -#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB -#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC -#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD -#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE -#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF -#endif - -#ifndef GL_SGIS_pixel_texture -#define GL_PIXEL_TEXTURE_SGIS 0x8353 -#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354 -#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355 -#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356 -#endif - -#ifndef GL_SGIX_pixel_texture -#define GL_PIXEL_TEX_GEN_SGIX 0x8139 -#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B -#endif - -#ifndef GL_SGIS_texture4D -#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130 -#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131 -#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132 -#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133 -#define GL_TEXTURE_4D_SGIS 0x8134 -#define GL_PROXY_TEXTURE_4D_SGIS 0x8135 -#define GL_TEXTURE_4DSIZE_SGIS 0x8136 -#define GL_TEXTURE_WRAP_Q_SGIS 0x8137 -#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138 -#define GL_TEXTURE_4D_BINDING_SGIS 0x814F -#endif - -#ifndef GL_SGI_texture_color_table -#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC -#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD -#endif - -#ifndef GL_EXT_cmyka -#define GL_CMYK_EXT 0x800C -#define GL_CMYKA_EXT 0x800D -#define GL_PACK_CMYK_HINT_EXT 0x800E -#define GL_UNPACK_CMYK_HINT_EXT 0x800F -#endif - -#ifndef GL_EXT_texture_object -#define GL_TEXTURE_PRIORITY_EXT 0x8066 -#define GL_TEXTURE_RESIDENT_EXT 0x8067 -#define GL_TEXTURE_1D_BINDING_EXT 0x8068 -#define GL_TEXTURE_2D_BINDING_EXT 0x8069 -#define GL_TEXTURE_3D_BINDING_EXT 0x806A -#endif - -#ifndef GL_SGIS_detail_texture -#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095 -#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096 -#define GL_LINEAR_DETAIL_SGIS 0x8097 -#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098 -#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099 -#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A -#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B -#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C -#endif - -#ifndef GL_SGIS_sharpen_texture -#define GL_LINEAR_SHARPEN_SGIS 0x80AD -#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE -#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF -#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0 -#endif - -#ifndef GL_EXT_packed_pixels -#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032 -#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034 -#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035 -#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036 -#endif - -#ifndef GL_SGIS_texture_lod -#define GL_TEXTURE_MIN_LOD_SGIS 0x813A -#define GL_TEXTURE_MAX_LOD_SGIS 0x813B -#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C -#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D -#endif - -#ifndef GL_SGIS_multisample -#define GL_MULTISAMPLE_SGIS 0x809D -#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F -#define GL_SAMPLE_MASK_SGIS 0x80A0 -#define GL_1PASS_SGIS 0x80A1 -#define GL_2PASS_0_SGIS 0x80A2 -#define GL_2PASS_1_SGIS 0x80A3 -#define GL_4PASS_0_SGIS 0x80A4 -#define GL_4PASS_1_SGIS 0x80A5 -#define GL_4PASS_2_SGIS 0x80A6 -#define GL_4PASS_3_SGIS 0x80A7 -#define GL_SAMPLE_BUFFERS_SGIS 0x80A8 -#define GL_SAMPLES_SGIS 0x80A9 -#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA -#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB -#define GL_SAMPLE_PATTERN_SGIS 0x80AC -#endif - -#ifndef GL_EXT_rescale_normal -#define GL_RESCALE_NORMAL_EXT 0x803A -#endif - -#ifndef GL_EXT_vertex_array -#define GL_VERTEX_ARRAY_EXT 0x8074 -#define GL_NORMAL_ARRAY_EXT 0x8075 -#define GL_COLOR_ARRAY_EXT 0x8076 -#define GL_INDEX_ARRAY_EXT 0x8077 -#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 -#define GL_EDGE_FLAG_ARRAY_EXT 0x8079 -#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A -#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B -#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C -#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D -#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E -#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F -#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 -#define GL_COLOR_ARRAY_SIZE_EXT 0x8081 -#define GL_COLOR_ARRAY_TYPE_EXT 0x8082 -#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 -#define GL_COLOR_ARRAY_COUNT_EXT 0x8084 -#define GL_INDEX_ARRAY_TYPE_EXT 0x8085 -#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 -#define GL_INDEX_ARRAY_COUNT_EXT 0x8087 -#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 -#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 -#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A -#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B -#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C -#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D -#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E -#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F -#define GL_COLOR_ARRAY_POINTER_EXT 0x8090 -#define GL_INDEX_ARRAY_POINTER_EXT 0x8091 -#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 -#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 -#endif - -#ifndef GL_EXT_misc_attribute -#endif - -#ifndef GL_SGIS_generate_mipmap -#define GL_GENERATE_MIPMAP_SGIS 0x8191 -#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 -#endif - -#ifndef GL_SGIX_clipmap -#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170 -#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171 -#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172 -#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173 -#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174 -#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175 -#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176 -#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177 -#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178 -#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D -#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E -#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F -#endif - -#ifndef GL_SGIX_shadow -#define GL_TEXTURE_COMPARE_SGIX 0x819A -#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B -#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C -#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D -#endif - -#ifndef GL_SGIS_texture_edge_clamp -#define GL_CLAMP_TO_EDGE_SGIS 0x812F -#endif - -#ifndef GL_SGIS_texture_border_clamp -#define GL_CLAMP_TO_BORDER_SGIS 0x812D -#endif - -#ifndef GL_EXT_blend_minmax -#define GL_FUNC_ADD_EXT 0x8006 -#define GL_MIN_EXT 0x8007 -#define GL_MAX_EXT 0x8008 -#define GL_BLEND_EQUATION_EXT 0x8009 -#endif - -#ifndef GL_EXT_blend_subtract -#define GL_FUNC_SUBTRACT_EXT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B -#endif - -#ifndef GL_EXT_blend_logic_op -#endif - -#ifndef GL_SGIX_interlace -#define GL_INTERLACE_SGIX 0x8094 -#endif - -#ifndef GL_SGIX_pixel_tiles -#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E -#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F -#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140 -#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141 -#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142 -#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143 -#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144 -#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145 -#endif - -#ifndef GL_SGIS_texture_select -#define GL_DUAL_ALPHA4_SGIS 0x8110 -#define GL_DUAL_ALPHA8_SGIS 0x8111 -#define GL_DUAL_ALPHA12_SGIS 0x8112 -#define GL_DUAL_ALPHA16_SGIS 0x8113 -#define GL_DUAL_LUMINANCE4_SGIS 0x8114 -#define GL_DUAL_LUMINANCE8_SGIS 0x8115 -#define GL_DUAL_LUMINANCE12_SGIS 0x8116 -#define GL_DUAL_LUMINANCE16_SGIS 0x8117 -#define GL_DUAL_INTENSITY4_SGIS 0x8118 -#define GL_DUAL_INTENSITY8_SGIS 0x8119 -#define GL_DUAL_INTENSITY12_SGIS 0x811A -#define GL_DUAL_INTENSITY16_SGIS 0x811B -#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C -#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D -#define GL_QUAD_ALPHA4_SGIS 0x811E -#define GL_QUAD_ALPHA8_SGIS 0x811F -#define GL_QUAD_LUMINANCE4_SGIS 0x8120 -#define GL_QUAD_LUMINANCE8_SGIS 0x8121 -#define GL_QUAD_INTENSITY4_SGIS 0x8122 -#define GL_QUAD_INTENSITY8_SGIS 0x8123 -#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124 -#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125 -#endif - -#ifndef GL_SGIX_sprite -#define GL_SPRITE_SGIX 0x8148 -#define GL_SPRITE_MODE_SGIX 0x8149 -#define GL_SPRITE_AXIS_SGIX 0x814A -#define GL_SPRITE_TRANSLATION_SGIX 0x814B -#define GL_SPRITE_AXIAL_SGIX 0x814C -#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D -#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E -#endif - -#ifndef GL_SGIX_texture_multi_buffer -#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E -#endif - -#ifndef GL_EXT_point_parameters -#define GL_POINT_SIZE_MIN_EXT 0x8126 -#define GL_POINT_SIZE_MAX_EXT 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 -#define GL_DISTANCE_ATTENUATION_EXT 0x8129 -#endif - -#ifndef GL_SGIS_point_parameters -#define GL_POINT_SIZE_MIN_SGIS 0x8126 -#define GL_POINT_SIZE_MAX_SGIS 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128 -#define GL_DISTANCE_ATTENUATION_SGIS 0x8129 -#endif - -#ifndef GL_SGIX_instruments -#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180 -#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181 -#endif - -#ifndef GL_SGIX_texture_scale_bias -#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179 -#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A -#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B -#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C -#endif - -#ifndef GL_SGIX_framezoom -#define GL_FRAMEZOOM_SGIX 0x818B -#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C -#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D -#endif - -#ifndef GL_SGIX_tag_sample_buffer -#endif - -#ifndef GL_FfdMaskSGIX -#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001 -#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002 -#endif - -#ifndef GL_SGIX_polynomial_ffd -#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194 -#define GL_TEXTURE_DEFORMATION_SGIX 0x8195 -#define GL_DEFORMATIONS_MASK_SGIX 0x8196 -#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197 -#endif - -#ifndef GL_SGIX_reference_plane -#define GL_REFERENCE_PLANE_SGIX 0x817D -#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E -#endif - -#ifndef GL_SGIX_flush_raster -#endif - -#ifndef GL_SGIX_depth_texture -#define GL_DEPTH_COMPONENT16_SGIX 0x81A5 -#define GL_DEPTH_COMPONENT24_SGIX 0x81A6 -#define GL_DEPTH_COMPONENT32_SGIX 0x81A7 -#endif - -#ifndef GL_SGIS_fog_function -#define GL_FOG_FUNC_SGIS 0x812A -#define GL_FOG_FUNC_POINTS_SGIS 0x812B -#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C -#endif - -#ifndef GL_SGIX_fog_offset -#define GL_FOG_OFFSET_SGIX 0x8198 -#define GL_FOG_OFFSET_VALUE_SGIX 0x8199 -#endif - -#ifndef GL_HP_image_transform -#define GL_IMAGE_SCALE_X_HP 0x8155 -#define GL_IMAGE_SCALE_Y_HP 0x8156 -#define GL_IMAGE_TRANSLATE_X_HP 0x8157 -#define GL_IMAGE_TRANSLATE_Y_HP 0x8158 -#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159 -#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A -#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B -#define GL_IMAGE_MAG_FILTER_HP 0x815C -#define GL_IMAGE_MIN_FILTER_HP 0x815D -#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E -#define GL_CUBIC_HP 0x815F -#define GL_AVERAGE_HP 0x8160 -#define GL_IMAGE_TRANSFORM_2D_HP 0x8161 -#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162 -#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163 -#endif - -#ifndef GL_HP_convolution_border_modes -#define GL_IGNORE_BORDER_HP 0x8150 -#define GL_CONSTANT_BORDER_HP 0x8151 -#define GL_REPLICATE_BORDER_HP 0x8153 -#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154 -#endif - -#ifndef GL_INGR_palette_buffer -#endif - -#ifndef GL_SGIX_texture_add_env -#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE -#endif - -#ifndef GL_EXT_color_subtable -#endif - -#ifndef GL_PGI_vertex_hints -#define GL_VERTEX_DATA_HINT_PGI 0x1A22A -#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B -#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C -#define GL_MAX_VERTEX_HINT_PGI 0x1A22D -#define GL_COLOR3_BIT_PGI 0x00010000 -#define GL_COLOR4_BIT_PGI 0x00020000 -#define GL_EDGEFLAG_BIT_PGI 0x00040000 -#define GL_INDEX_BIT_PGI 0x00080000 -#define GL_MAT_AMBIENT_BIT_PGI 0x00100000 -#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000 -#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000 -#define GL_MAT_EMISSION_BIT_PGI 0x00800000 -#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000 -#define GL_MAT_SHININESS_BIT_PGI 0x02000000 -#define GL_MAT_SPECULAR_BIT_PGI 0x04000000 -#define GL_NORMAL_BIT_PGI 0x08000000 -#define GL_TEXCOORD1_BIT_PGI 0x10000000 -#define GL_TEXCOORD2_BIT_PGI 0x20000000 -#define GL_TEXCOORD3_BIT_PGI 0x40000000 -#define GL_TEXCOORD4_BIT_PGI 0x80000000 -#define GL_VERTEX23_BIT_PGI 0x00000004 -#define GL_VERTEX4_BIT_PGI 0x00000008 -#endif - -#ifndef GL_PGI_misc_hints -#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8 -#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD -#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE -#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202 -#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203 -#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204 -#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C -#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D -#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E -#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F -#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210 -#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211 -#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216 -#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217 -#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218 -#define GL_FULL_STIPPLE_HINT_PGI 0x1A219 -#define GL_CLIP_NEAR_HINT_PGI 0x1A220 -#define GL_CLIP_FAR_HINT_PGI 0x1A221 -#define GL_WIDE_LINE_HINT_PGI 0x1A222 -#define GL_BACK_NORMALS_HINT_PGI 0x1A223 -#endif - -#ifndef GL_EXT_paletted_texture -#define GL_COLOR_INDEX1_EXT 0x80E2 -#define GL_COLOR_INDEX2_EXT 0x80E3 -#define GL_COLOR_INDEX4_EXT 0x80E4 -#define GL_COLOR_INDEX8_EXT 0x80E5 -#define GL_COLOR_INDEX12_EXT 0x80E6 -#define GL_COLOR_INDEX16_EXT 0x80E7 -#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED -#endif - -#ifndef GL_EXT_clip_volume_hint -#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0 -#endif - -#ifndef GL_SGIX_list_priority -#define GL_LIST_PRIORITY_SGIX 0x8182 -#endif - -#ifndef GL_SGIX_ir_instrument1 -#define GL_IR_INSTRUMENT1_SGIX 0x817F -#endif - -#ifndef GL_SGIX_calligraphic_fragment -#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183 -#endif - -#ifndef GL_SGIX_texture_lod_bias -#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E -#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F -#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190 -#endif - -#ifndef GL_SGIX_shadow_ambient -#define GL_SHADOW_AMBIENT_SGIX 0x80BF -#endif - -#ifndef GL_EXT_index_texture -#endif - -#ifndef GL_EXT_index_material -#define GL_INDEX_MATERIAL_EXT 0x81B8 -#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9 -#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA -#endif - -#ifndef GL_EXT_index_func -#define GL_INDEX_TEST_EXT 0x81B5 -#define GL_INDEX_TEST_FUNC_EXT 0x81B6 -#define GL_INDEX_TEST_REF_EXT 0x81B7 -#endif - -#ifndef GL_EXT_index_array_formats -#define GL_IUI_V2F_EXT 0x81AD -#define GL_IUI_V3F_EXT 0x81AE -#define GL_IUI_N3F_V2F_EXT 0x81AF -#define GL_IUI_N3F_V3F_EXT 0x81B0 -#define GL_T2F_IUI_V2F_EXT 0x81B1 -#define GL_T2F_IUI_V3F_EXT 0x81B2 -#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3 -#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4 -#endif - -#ifndef GL_EXT_compiled_vertex_array -#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8 -#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9 -#endif - -#ifndef GL_EXT_cull_vertex -#define GL_CULL_VERTEX_EXT 0x81AA -#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB -#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC -#endif - -#ifndef GL_SGIX_ycrcb -#define GL_YCRCB_422_SGIX 0x81BB -#define GL_YCRCB_444_SGIX 0x81BC -#endif - -#ifndef GL_SGIX_fragment_lighting -#define GL_FRAGMENT_LIGHTING_SGIX 0x8400 -#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401 -#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402 -#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403 -#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404 -#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405 -#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406 -#define GL_LIGHT_ENV_MODE_SGIX 0x8407 -#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408 -#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409 -#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A -#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B -#define GL_FRAGMENT_LIGHT0_SGIX 0x840C -#define GL_FRAGMENT_LIGHT1_SGIX 0x840D -#define GL_FRAGMENT_LIGHT2_SGIX 0x840E -#define GL_FRAGMENT_LIGHT3_SGIX 0x840F -#define GL_FRAGMENT_LIGHT4_SGIX 0x8410 -#define GL_FRAGMENT_LIGHT5_SGIX 0x8411 -#define GL_FRAGMENT_LIGHT6_SGIX 0x8412 -#define GL_FRAGMENT_LIGHT7_SGIX 0x8413 -#endif - -#ifndef GL_IBM_rasterpos_clip -#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262 -#endif - -#ifndef GL_HP_texture_lighting -#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167 -#define GL_TEXTURE_POST_SPECULAR_HP 0x8168 -#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169 -#endif - -#ifndef GL_EXT_draw_range_elements -#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8 -#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9 -#endif - -#ifndef GL_WIN_phong_shading -#define GL_PHONG_WIN 0x80EA -#define GL_PHONG_HINT_WIN 0x80EB -#endif - -#ifndef GL_WIN_specular_fog -#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC -#endif - -#ifndef GL_EXT_light_texture -#define GL_FRAGMENT_MATERIAL_EXT 0x8349 -#define GL_FRAGMENT_NORMAL_EXT 0x834A -#define GL_FRAGMENT_COLOR_EXT 0x834C -#define GL_ATTENUATION_EXT 0x834D -#define GL_SHADOW_ATTENUATION_EXT 0x834E -#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F -#define GL_TEXTURE_LIGHT_EXT 0x8350 -#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351 -#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352 -/* reuse GL_FRAGMENT_DEPTH_EXT */ -#endif - -#ifndef GL_SGIX_blend_alpha_minmax -#define GL_ALPHA_MIN_SGIX 0x8320 -#define GL_ALPHA_MAX_SGIX 0x8321 -#endif - -#ifndef GL_SGIX_impact_pixel_texture -#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184 -#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185 -#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186 -#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187 -#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188 -#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189 -#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A -#endif - -#ifndef GL_EXT_bgra -#define GL_BGR_EXT 0x80E0 -#define GL_BGRA_EXT 0x80E1 -#endif - -#ifndef GL_SGIX_async -#define GL_ASYNC_MARKER_SGIX 0x8329 -#endif - -#ifndef GL_SGIX_async_pixel -#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C -#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D -#define GL_ASYNC_READ_PIXELS_SGIX 0x835E -#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F -#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360 -#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361 -#endif - -#ifndef GL_SGIX_async_histogram -#define GL_ASYNC_HISTOGRAM_SGIX 0x832C -#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D -#endif - -#ifndef GL_INTEL_texture_scissor -#endif - -#ifndef GL_INTEL_parallel_arrays -#define GL_PARALLEL_ARRAYS_INTEL 0x83F4 -#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5 -#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6 -#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7 -#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8 -#endif - -#ifndef GL_HP_occlusion_test -#define GL_OCCLUSION_TEST_HP 0x8165 -#define GL_OCCLUSION_TEST_RESULT_HP 0x8166 -#endif - -#ifndef GL_EXT_pixel_transform -#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330 -#define GL_PIXEL_MAG_FILTER_EXT 0x8331 -#define GL_PIXEL_MIN_FILTER_EXT 0x8332 -#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333 -#define GL_CUBIC_EXT 0x8334 -#define GL_AVERAGE_EXT 0x8335 -#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336 -#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337 -#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338 -#endif - -#ifndef GL_EXT_pixel_transform_color_table -#endif - -#ifndef GL_EXT_shared_texture_palette -#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB -#endif - -#ifndef GL_EXT_separate_specular_color -#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 -#define GL_SINGLE_COLOR_EXT 0x81F9 -#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA -#endif - -#ifndef GL_EXT_secondary_color -#define GL_COLOR_SUM_EXT 0x8458 -#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459 -#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A -#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B -#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C -#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D -#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E -#endif - -#ifndef GL_EXT_texture_perturb_normal -#define GL_PERTURB_EXT 0x85AE -#define GL_TEXTURE_NORMAL_EXT 0x85AF -#endif - -#ifndef GL_EXT_multi_draw_arrays -#endif - -#ifndef GL_EXT_fog_coord -#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450 -#define GL_FOG_COORDINATE_EXT 0x8451 -#define GL_FRAGMENT_DEPTH_EXT 0x8452 -#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453 -#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454 -#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455 -#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456 -#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457 -#endif - -#ifndef GL_REND_screen_coordinates -#define GL_SCREEN_COORDINATES_REND 0x8490 -#define GL_INVERTED_SCREEN_W_REND 0x8491 -#endif - -#ifndef GL_EXT_coordinate_frame -#define GL_TANGENT_ARRAY_EXT 0x8439 -#define GL_BINORMAL_ARRAY_EXT 0x843A -#define GL_CURRENT_TANGENT_EXT 0x843B -#define GL_CURRENT_BINORMAL_EXT 0x843C -#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E -#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F -#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440 -#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441 -#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442 -#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443 -#define GL_MAP1_TANGENT_EXT 0x8444 -#define GL_MAP2_TANGENT_EXT 0x8445 -#define GL_MAP1_BINORMAL_EXT 0x8446 -#define GL_MAP2_BINORMAL_EXT 0x8447 -#endif - -#ifndef GL_EXT_texture_env_combine -#define GL_COMBINE_EXT 0x8570 -#define GL_COMBINE_RGB_EXT 0x8571 -#define GL_COMBINE_ALPHA_EXT 0x8572 -#define GL_RGB_SCALE_EXT 0x8573 -#define GL_ADD_SIGNED_EXT 0x8574 -#define GL_INTERPOLATE_EXT 0x8575 -#define GL_CONSTANT_EXT 0x8576 -#define GL_PRIMARY_COLOR_EXT 0x8577 -#define GL_PREVIOUS_EXT 0x8578 -#define GL_SOURCE0_RGB_EXT 0x8580 -#define GL_SOURCE1_RGB_EXT 0x8581 -#define GL_SOURCE2_RGB_EXT 0x8582 -#define GL_SOURCE0_ALPHA_EXT 0x8588 -#define GL_SOURCE1_ALPHA_EXT 0x8589 -#define GL_SOURCE2_ALPHA_EXT 0x858A -#define GL_OPERAND0_RGB_EXT 0x8590 -#define GL_OPERAND1_RGB_EXT 0x8591 -#define GL_OPERAND2_RGB_EXT 0x8592 -#define GL_OPERAND0_ALPHA_EXT 0x8598 -#define GL_OPERAND1_ALPHA_EXT 0x8599 -#define GL_OPERAND2_ALPHA_EXT 0x859A -#endif - -#ifndef GL_APPLE_specular_vector -#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0 -#endif - -#ifndef GL_APPLE_transform_hint -#define GL_TRANSFORM_HINT_APPLE 0x85B1 -#endif - -#ifndef GL_SGIX_fog_scale -#define GL_FOG_SCALE_SGIX 0x81FC -#define GL_FOG_SCALE_VALUE_SGIX 0x81FD -#endif - -#ifndef GL_SUNX_constant_data -#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5 -#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6 -#endif - -#ifndef GL_SUN_global_alpha -#define GL_GLOBAL_ALPHA_SUN 0x81D9 -#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA -#endif - -#ifndef GL_SUN_triangle_list -#define GL_RESTART_SUN 0x0001 -#define GL_REPLACE_MIDDLE_SUN 0x0002 -#define GL_REPLACE_OLDEST_SUN 0x0003 -#define GL_TRIANGLE_LIST_SUN 0x81D7 -#define GL_REPLACEMENT_CODE_SUN 0x81D8 -#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0 -#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1 -#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2 -#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3 -#define GL_R1UI_V3F_SUN 0x85C4 -#define GL_R1UI_C4UB_V3F_SUN 0x85C5 -#define GL_R1UI_C3F_V3F_SUN 0x85C6 -#define GL_R1UI_N3F_V3F_SUN 0x85C7 -#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8 -#define GL_R1UI_T2F_V3F_SUN 0x85C9 -#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA -#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB -#endif - -#ifndef GL_SUN_vertex -#endif - -#ifndef GL_EXT_blend_func_separate -#define GL_BLEND_DST_RGB_EXT 0x80C8 -#define GL_BLEND_SRC_RGB_EXT 0x80C9 -#define GL_BLEND_DST_ALPHA_EXT 0x80CA -#define GL_BLEND_SRC_ALPHA_EXT 0x80CB -#endif - -#ifndef GL_INGR_color_clamp -#define GL_RED_MIN_CLAMP_INGR 0x8560 -#define GL_GREEN_MIN_CLAMP_INGR 0x8561 -#define GL_BLUE_MIN_CLAMP_INGR 0x8562 -#define GL_ALPHA_MIN_CLAMP_INGR 0x8563 -#define GL_RED_MAX_CLAMP_INGR 0x8564 -#define GL_GREEN_MAX_CLAMP_INGR 0x8565 -#define GL_BLUE_MAX_CLAMP_INGR 0x8566 -#define GL_ALPHA_MAX_CLAMP_INGR 0x8567 -#endif - -#ifndef GL_INGR_interlace_read -#define GL_INTERLACE_READ_INGR 0x8568 -#endif - -#ifndef GL_EXT_stencil_wrap -#define GL_INCR_WRAP_EXT 0x8507 -#define GL_DECR_WRAP_EXT 0x8508 -#endif - -#ifndef GL_EXT_422_pixels -#define GL_422_EXT 0x80CC -#define GL_422_REV_EXT 0x80CD -#define GL_422_AVERAGE_EXT 0x80CE -#define GL_422_REV_AVERAGE_EXT 0x80CF -#endif - -#ifndef GL_NV_texgen_reflection -#define GL_NORMAL_MAP_NV 0x8511 -#define GL_REFLECTION_MAP_NV 0x8512 -#endif - -#ifndef GL_EXT_texture_cube_map -#define GL_NORMAL_MAP_EXT 0x8511 -#define GL_REFLECTION_MAP_EXT 0x8512 -#define GL_TEXTURE_CUBE_MAP_EXT 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A -#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C -#endif - -#ifndef GL_SUN_convolution_border_modes -#define GL_WRAP_BORDER_SUN 0x81D4 -#endif - -#ifndef GL_EXT_texture_env_add -#endif - -#ifndef GL_EXT_texture_lod_bias -#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD -#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 -#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 -#endif - -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE -#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF -#endif - -#ifndef GL_EXT_vertex_weighting -#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH -#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502 -#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX -#define GL_MODELVIEW1_MATRIX_EXT 0x8506 -#define GL_VERTEX_WEIGHTING_EXT 0x8509 -#define GL_MODELVIEW0_EXT GL_MODELVIEW -#define GL_MODELVIEW1_EXT 0x850A -#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B -#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C -#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D -#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E -#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F -#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510 -#endif - -#ifndef GL_NV_light_max_exponent -#define GL_MAX_SHININESS_NV 0x8504 -#define GL_MAX_SPOT_EXPONENT_NV 0x8505 -#endif - -#ifndef GL_NV_vertex_array_range -#define GL_VERTEX_ARRAY_RANGE_NV 0x851D -#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E -#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F -#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520 -#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521 -#endif - -#ifndef GL_NV_register_combiners -#define GL_REGISTER_COMBINERS_NV 0x8522 -#define GL_VARIABLE_A_NV 0x8523 -#define GL_VARIABLE_B_NV 0x8524 -#define GL_VARIABLE_C_NV 0x8525 -#define GL_VARIABLE_D_NV 0x8526 -#define GL_VARIABLE_E_NV 0x8527 -#define GL_VARIABLE_F_NV 0x8528 -#define GL_VARIABLE_G_NV 0x8529 -#define GL_CONSTANT_COLOR0_NV 0x852A -#define GL_CONSTANT_COLOR1_NV 0x852B -#define GL_PRIMARY_COLOR_NV 0x852C -#define GL_SECONDARY_COLOR_NV 0x852D -#define GL_SPARE0_NV 0x852E -#define GL_SPARE1_NV 0x852F -#define GL_DISCARD_NV 0x8530 -#define GL_E_TIMES_F_NV 0x8531 -#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532 -#define GL_UNSIGNED_IDENTITY_NV 0x8536 -#define GL_UNSIGNED_INVERT_NV 0x8537 -#define GL_EXPAND_NORMAL_NV 0x8538 -#define GL_EXPAND_NEGATE_NV 0x8539 -#define GL_HALF_BIAS_NORMAL_NV 0x853A -#define GL_HALF_BIAS_NEGATE_NV 0x853B -#define GL_SIGNED_IDENTITY_NV 0x853C -#define GL_SIGNED_NEGATE_NV 0x853D -#define GL_SCALE_BY_TWO_NV 0x853E -#define GL_SCALE_BY_FOUR_NV 0x853F -#define GL_SCALE_BY_ONE_HALF_NV 0x8540 -#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541 -#define GL_COMBINER_INPUT_NV 0x8542 -#define GL_COMBINER_MAPPING_NV 0x8543 -#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544 -#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545 -#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546 -#define GL_COMBINER_MUX_SUM_NV 0x8547 -#define GL_COMBINER_SCALE_NV 0x8548 -#define GL_COMBINER_BIAS_NV 0x8549 -#define GL_COMBINER_AB_OUTPUT_NV 0x854A -#define GL_COMBINER_CD_OUTPUT_NV 0x854B -#define GL_COMBINER_SUM_OUTPUT_NV 0x854C -#define GL_MAX_GENERAL_COMBINERS_NV 0x854D -#define GL_NUM_GENERAL_COMBINERS_NV 0x854E -#define GL_COLOR_SUM_CLAMP_NV 0x854F -#define GL_COMBINER0_NV 0x8550 -#define GL_COMBINER1_NV 0x8551 -#define GL_COMBINER2_NV 0x8552 -#define GL_COMBINER3_NV 0x8553 -#define GL_COMBINER4_NV 0x8554 -#define GL_COMBINER5_NV 0x8555 -#define GL_COMBINER6_NV 0x8556 -#define GL_COMBINER7_NV 0x8557 -/* reuse GL_TEXTURE0_ARB */ -/* reuse GL_TEXTURE1_ARB */ -/* reuse GL_ZERO */ -/* reuse GL_NONE */ -/* reuse GL_FOG */ -#endif - -#ifndef GL_NV_fog_distance -#define GL_FOG_DISTANCE_MODE_NV 0x855A -#define GL_EYE_RADIAL_NV 0x855B -#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C -/* reuse GL_EYE_PLANE */ -#endif - -#ifndef GL_NV_texgen_emboss -#define GL_EMBOSS_LIGHT_NV 0x855D -#define GL_EMBOSS_CONSTANT_NV 0x855E -#define GL_EMBOSS_MAP_NV 0x855F -#endif - -#ifndef GL_NV_blend_square -#endif - -#ifndef GL_NV_texture_env_combine4 -#define GL_COMBINE4_NV 0x8503 -#define GL_SOURCE3_RGB_NV 0x8583 -#define GL_SOURCE3_ALPHA_NV 0x858B -#define GL_OPERAND3_RGB_NV 0x8593 -#define GL_OPERAND3_ALPHA_NV 0x859B -#endif - -#ifndef GL_MESA_resize_buffers -#endif - -#ifndef GL_MESA_window_pos -#endif - -#ifndef GL_EXT_texture_compression_s3tc -#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 -#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 -#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 -#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 -#endif - -#ifndef GL_IBM_cull_vertex -#define GL_CULL_VERTEX_IBM 103050 -#endif - -#ifndef GL_IBM_multimode_draw_arrays -#endif - -#ifndef GL_IBM_vertex_array_lists -#define GL_VERTEX_ARRAY_LIST_IBM 103070 -#define GL_NORMAL_ARRAY_LIST_IBM 103071 -#define GL_COLOR_ARRAY_LIST_IBM 103072 -#define GL_INDEX_ARRAY_LIST_IBM 103073 -#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074 -#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075 -#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076 -#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077 -#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080 -#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081 -#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082 -#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083 -#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084 -#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085 -#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086 -#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087 -#endif - -#ifndef GL_SGIX_subsample -#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0 -#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1 -#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2 -#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3 -#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4 -#endif - -#ifndef GL_SGIX_ycrcb_subsample -#endif - -#ifndef GL_SGIX_ycrcba -#define GL_YCRCB_SGIX 0x8318 -#define GL_YCRCBA_SGIX 0x8319 -#endif - -#ifndef GL_SGI_depth_pass_instrument -#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310 -#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311 -#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312 -#endif - -#ifndef GL_3DFX_texture_compression_FXT1 -#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0 -#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1 -#endif - -#ifndef GL_3DFX_multisample -#define GL_MULTISAMPLE_3DFX 0x86B2 -#define GL_SAMPLE_BUFFERS_3DFX 0x86B3 -#define GL_SAMPLES_3DFX 0x86B4 -#define GL_MULTISAMPLE_BIT_3DFX 0x20000000 -#endif - -#ifndef GL_3DFX_tbuffer -#endif - -#ifndef GL_EXT_multisample -#define GL_MULTISAMPLE_EXT 0x809D -#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F -#define GL_SAMPLE_MASK_EXT 0x80A0 -#define GL_1PASS_EXT 0x80A1 -#define GL_2PASS_0_EXT 0x80A2 -#define GL_2PASS_1_EXT 0x80A3 -#define GL_4PASS_0_EXT 0x80A4 -#define GL_4PASS_1_EXT 0x80A5 -#define GL_4PASS_2_EXT 0x80A6 -#define GL_4PASS_3_EXT 0x80A7 -#define GL_SAMPLE_BUFFERS_EXT 0x80A8 -#define GL_SAMPLES_EXT 0x80A9 -#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA -#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB -#define GL_SAMPLE_PATTERN_EXT 0x80AC -#define GL_MULTISAMPLE_BIT_EXT 0x20000000 -#endif - -#ifndef GL_SGIX_vertex_preclip -#define GL_VERTEX_PRECLIP_SGIX 0x83EE -#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF -#endif - -#ifndef GL_SGIX_convolution_accuracy -#define GL_CONVOLUTION_HINT_SGIX 0x8316 -#endif - -#ifndef GL_SGIX_resample -#define GL_PACK_RESAMPLE_SGIX 0x842C -#define GL_UNPACK_RESAMPLE_SGIX 0x842D -#define GL_RESAMPLE_REPLICATE_SGIX 0x842E -#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F -#define GL_RESAMPLE_DECIMATE_SGIX 0x8430 -#endif - -#ifndef GL_SGIS_point_line_texgen -#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0 -#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1 -#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2 -#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3 -#define GL_EYE_POINT_SGIS 0x81F4 -#define GL_OBJECT_POINT_SGIS 0x81F5 -#define GL_EYE_LINE_SGIS 0x81F6 -#define GL_OBJECT_LINE_SGIS 0x81F7 -#endif - -#ifndef GL_SGIS_texture_color_mask -#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF -#endif - -#ifndef GL_EXT_texture_env_dot3 -#define GL_DOT3_RGB_EXT 0x8740 -#define GL_DOT3_RGBA_EXT 0x8741 -#endif - -#ifndef GL_ATI_texture_mirror_once -#define GL_MIRROR_CLAMP_ATI 0x8742 -#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743 -#endif - -#ifndef GL_NV_fence -#define GL_ALL_COMPLETED_NV 0x84F2 -#define GL_FENCE_STATUS_NV 0x84F3 -#define GL_FENCE_CONDITION_NV 0x84F4 -#endif - -#ifndef GL_IBM_texture_mirrored_repeat -#define GL_MIRRORED_REPEAT_IBM 0x8370 -#endif - -#ifndef GL_NV_evaluators -#define GL_EVAL_2D_NV 0x86C0 -#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1 -#define GL_MAP_TESSELLATION_NV 0x86C2 -#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3 -#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4 -#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5 -#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6 -#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7 -#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8 -#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9 -#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA -#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB -#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC -#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD -#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE -#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF -#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0 -#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1 -#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2 -#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3 -#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4 -#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5 -#define GL_MAX_MAP_TESSELLATION_NV 0x86D6 -#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7 -#endif - -#ifndef GL_NV_packed_depth_stencil -#define GL_DEPTH_STENCIL_NV 0x84F9 -#define GL_UNSIGNED_INT_24_8_NV 0x84FA -#endif - -#ifndef GL_NV_register_combiners2 -#define GL_PER_STAGE_CONSTANTS_NV 0x8535 -#endif - -#ifndef GL_NV_texture_compression_vtc -#endif - -#ifndef GL_NV_texture_rectangle -#define GL_TEXTURE_RECTANGLE_NV 0x84F5 -#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6 -#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 -#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 -#endif - -#ifndef GL_NV_texture_shader -#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C -#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D -#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E -#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 -#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA -#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB -#define GL_DSDT_MAG_INTENSITY_NV 0x86DC -#define GL_SHADER_CONSISTENT_NV 0x86DD -#define GL_TEXTURE_SHADER_NV 0x86DE -#define GL_SHADER_OPERATION_NV 0x86DF -#define GL_CULL_MODES_NV 0x86E0 -#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1 -#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2 -#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3 -#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV -#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV -#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV -#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4 -#define GL_CONST_EYE_NV 0x86E5 -#define GL_PASS_THROUGH_NV 0x86E6 -#define GL_CULL_FRAGMENT_NV 0x86E7 -#define GL_OFFSET_TEXTURE_2D_NV 0x86E8 -#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 -#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA -#define GL_DOT_PRODUCT_NV 0x86EC -#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED -#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE -#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 -#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 -#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 -#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3 -#define GL_HILO_NV 0x86F4 -#define GL_DSDT_NV 0x86F5 -#define GL_DSDT_MAG_NV 0x86F6 -#define GL_DSDT_MAG_VIB_NV 0x86F7 -#define GL_HILO16_NV 0x86F8 -#define GL_SIGNED_HILO_NV 0x86F9 -#define GL_SIGNED_HILO16_NV 0x86FA -#define GL_SIGNED_RGBA_NV 0x86FB -#define GL_SIGNED_RGBA8_NV 0x86FC -#define GL_SIGNED_RGB_NV 0x86FE -#define GL_SIGNED_RGB8_NV 0x86FF -#define GL_SIGNED_LUMINANCE_NV 0x8701 -#define GL_SIGNED_LUMINANCE8_NV 0x8702 -#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 -#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 -#define GL_SIGNED_ALPHA_NV 0x8705 -#define GL_SIGNED_ALPHA8_NV 0x8706 -#define GL_SIGNED_INTENSITY_NV 0x8707 -#define GL_SIGNED_INTENSITY8_NV 0x8708 -#define GL_DSDT8_NV 0x8709 -#define GL_DSDT8_MAG8_NV 0x870A -#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B -#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C -#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D -#define GL_HI_SCALE_NV 0x870E -#define GL_LO_SCALE_NV 0x870F -#define GL_DS_SCALE_NV 0x8710 -#define GL_DT_SCALE_NV 0x8711 -#define GL_MAGNITUDE_SCALE_NV 0x8712 -#define GL_VIBRANCE_SCALE_NV 0x8713 -#define GL_HI_BIAS_NV 0x8714 -#define GL_LO_BIAS_NV 0x8715 -#define GL_DS_BIAS_NV 0x8716 -#define GL_DT_BIAS_NV 0x8717 -#define GL_MAGNITUDE_BIAS_NV 0x8718 -#define GL_VIBRANCE_BIAS_NV 0x8719 -#define GL_TEXTURE_BORDER_VALUES_NV 0x871A -#define GL_TEXTURE_HI_SIZE_NV 0x871B -#define GL_TEXTURE_LO_SIZE_NV 0x871C -#define GL_TEXTURE_DS_SIZE_NV 0x871D -#define GL_TEXTURE_DT_SIZE_NV 0x871E -#define GL_TEXTURE_MAG_SIZE_NV 0x871F -#endif - -#ifndef GL_NV_texture_shader2 -#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF -#endif - -#ifndef GL_NV_vertex_array_range2 -#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533 -#endif - -#ifndef GL_NV_vertex_program -#define GL_VERTEX_PROGRAM_NV 0x8620 -#define GL_VERTEX_STATE_PROGRAM_NV 0x8621 -#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623 -#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624 -#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625 -#define GL_CURRENT_ATTRIB_NV 0x8626 -#define GL_PROGRAM_LENGTH_NV 0x8627 -#define GL_PROGRAM_STRING_NV 0x8628 -#define GL_MODELVIEW_PROJECTION_NV 0x8629 -#define GL_IDENTITY_NV 0x862A -#define GL_INVERSE_NV 0x862B -#define GL_TRANSPOSE_NV 0x862C -#define GL_INVERSE_TRANSPOSE_NV 0x862D -#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E -#define GL_MAX_TRACK_MATRICES_NV 0x862F -#define GL_MATRIX0_NV 0x8630 -#define GL_MATRIX1_NV 0x8631 -#define GL_MATRIX2_NV 0x8632 -#define GL_MATRIX3_NV 0x8633 -#define GL_MATRIX4_NV 0x8634 -#define GL_MATRIX5_NV 0x8635 -#define GL_MATRIX6_NV 0x8636 -#define GL_MATRIX7_NV 0x8637 -#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 -#define GL_CURRENT_MATRIX_NV 0x8641 -#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 -#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 -#define GL_PROGRAM_PARAMETER_NV 0x8644 -#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 -#define GL_PROGRAM_TARGET_NV 0x8646 -#define GL_PROGRAM_RESIDENT_NV 0x8647 -#define GL_TRACK_MATRIX_NV 0x8648 -#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 -#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A -#define GL_PROGRAM_ERROR_POSITION_NV 0x864B -#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650 -#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651 -#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652 -#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653 -#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654 -#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655 -#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656 -#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657 -#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658 -#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659 -#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A -#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B -#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C -#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D -#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E -#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F -#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660 -#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661 -#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662 -#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663 -#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664 -#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665 -#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666 -#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667 -#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668 -#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669 -#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A -#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B -#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C -#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D -#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E -#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F -#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670 -#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671 -#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672 -#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673 -#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674 -#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675 -#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676 -#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677 -#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678 -#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679 -#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A -#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B -#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C -#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D -#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E -#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F -#endif - -#ifndef GL_SGIX_texture_coordinate_clamp -#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369 -#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A -#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B -#endif - -#ifndef GL_SGIX_scalebias_hint -#define GL_SCALEBIAS_HINT_SGIX 0x8322 -#endif - -#ifndef GL_OML_interlace -#define GL_INTERLACE_OML 0x8980 -#define GL_INTERLACE_READ_OML 0x8981 -#endif - -#ifndef GL_OML_subsample -#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982 -#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983 -#endif - -#ifndef GL_OML_resample -#define GL_PACK_RESAMPLE_OML 0x8984 -#define GL_UNPACK_RESAMPLE_OML 0x8985 -#define GL_RESAMPLE_REPLICATE_OML 0x8986 -#define GL_RESAMPLE_ZERO_FILL_OML 0x8987 -#define GL_RESAMPLE_AVERAGE_OML 0x8988 -#define GL_RESAMPLE_DECIMATE_OML 0x8989 -#endif - -#ifndef GL_NV_copy_depth_to_color -#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E -#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F -#endif - -#ifndef GL_ATI_envmap_bumpmap -#define GL_BUMP_ROT_MATRIX_ATI 0x8775 -#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776 -#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777 -#define GL_BUMP_TEX_UNITS_ATI 0x8778 -#define GL_DUDV_ATI 0x8779 -#define GL_DU8DV8_ATI 0x877A -#define GL_BUMP_ENVMAP_ATI 0x877B -#define GL_BUMP_TARGET_ATI 0x877C -#endif - -#ifndef GL_ATI_fragment_shader -#define GL_FRAGMENT_SHADER_ATI 0x8920 -#define GL_REG_0_ATI 0x8921 -#define GL_REG_1_ATI 0x8922 -#define GL_REG_2_ATI 0x8923 -#define GL_REG_3_ATI 0x8924 -#define GL_REG_4_ATI 0x8925 -#define GL_REG_5_ATI 0x8926 -#define GL_REG_6_ATI 0x8927 -#define GL_REG_7_ATI 0x8928 -#define GL_REG_8_ATI 0x8929 -#define GL_REG_9_ATI 0x892A -#define GL_REG_10_ATI 0x892B -#define GL_REG_11_ATI 0x892C -#define GL_REG_12_ATI 0x892D -#define GL_REG_13_ATI 0x892E -#define GL_REG_14_ATI 0x892F -#define GL_REG_15_ATI 0x8930 -#define GL_REG_16_ATI 0x8931 -#define GL_REG_17_ATI 0x8932 -#define GL_REG_18_ATI 0x8933 -#define GL_REG_19_ATI 0x8934 -#define GL_REG_20_ATI 0x8935 -#define GL_REG_21_ATI 0x8936 -#define GL_REG_22_ATI 0x8937 -#define GL_REG_23_ATI 0x8938 -#define GL_REG_24_ATI 0x8939 -#define GL_REG_25_ATI 0x893A -#define GL_REG_26_ATI 0x893B -#define GL_REG_27_ATI 0x893C -#define GL_REG_28_ATI 0x893D -#define GL_REG_29_ATI 0x893E -#define GL_REG_30_ATI 0x893F -#define GL_REG_31_ATI 0x8940 -#define GL_CON_0_ATI 0x8941 -#define GL_CON_1_ATI 0x8942 -#define GL_CON_2_ATI 0x8943 -#define GL_CON_3_ATI 0x8944 -#define GL_CON_4_ATI 0x8945 -#define GL_CON_5_ATI 0x8946 -#define GL_CON_6_ATI 0x8947 -#define GL_CON_7_ATI 0x8948 -#define GL_CON_8_ATI 0x8949 -#define GL_CON_9_ATI 0x894A -#define GL_CON_10_ATI 0x894B -#define GL_CON_11_ATI 0x894C -#define GL_CON_12_ATI 0x894D -#define GL_CON_13_ATI 0x894E -#define GL_CON_14_ATI 0x894F -#define GL_CON_15_ATI 0x8950 -#define GL_CON_16_ATI 0x8951 -#define GL_CON_17_ATI 0x8952 -#define GL_CON_18_ATI 0x8953 -#define GL_CON_19_ATI 0x8954 -#define GL_CON_20_ATI 0x8955 -#define GL_CON_21_ATI 0x8956 -#define GL_CON_22_ATI 0x8957 -#define GL_CON_23_ATI 0x8958 -#define GL_CON_24_ATI 0x8959 -#define GL_CON_25_ATI 0x895A -#define GL_CON_26_ATI 0x895B -#define GL_CON_27_ATI 0x895C -#define GL_CON_28_ATI 0x895D -#define GL_CON_29_ATI 0x895E -#define GL_CON_30_ATI 0x895F -#define GL_CON_31_ATI 0x8960 -#define GL_MOV_ATI 0x8961 -#define GL_ADD_ATI 0x8963 -#define GL_MUL_ATI 0x8964 -#define GL_SUB_ATI 0x8965 -#define GL_DOT3_ATI 0x8966 -#define GL_DOT4_ATI 0x8967 -#define GL_MAD_ATI 0x8968 -#define GL_LERP_ATI 0x8969 -#define GL_CND_ATI 0x896A -#define GL_CND0_ATI 0x896B -#define GL_DOT2_ADD_ATI 0x896C -#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D -#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E -#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F -#define GL_NUM_PASSES_ATI 0x8970 -#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971 -#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972 -#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973 -#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974 -#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975 -#define GL_SWIZZLE_STR_ATI 0x8976 -#define GL_SWIZZLE_STQ_ATI 0x8977 -#define GL_SWIZZLE_STR_DR_ATI 0x8978 -#define GL_SWIZZLE_STQ_DQ_ATI 0x8979 -#define GL_SWIZZLE_STRQ_ATI 0x897A -#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B -#define GL_RED_BIT_ATI 0x00000001 -#define GL_GREEN_BIT_ATI 0x00000002 -#define GL_BLUE_BIT_ATI 0x00000004 -#define GL_2X_BIT_ATI 0x00000001 -#define GL_4X_BIT_ATI 0x00000002 -#define GL_8X_BIT_ATI 0x00000004 -#define GL_HALF_BIT_ATI 0x00000008 -#define GL_QUARTER_BIT_ATI 0x00000010 -#define GL_EIGHTH_BIT_ATI 0x00000020 -#define GL_SATURATE_BIT_ATI 0x00000040 -#define GL_COMP_BIT_ATI 0x00000002 -#define GL_NEGATE_BIT_ATI 0x00000004 -#define GL_BIAS_BIT_ATI 0x00000008 -#endif - -#ifndef GL_ATI_pn_triangles -#define GL_PN_TRIANGLES_ATI 0x87F0 -#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1 -#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2 -#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3 -#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4 -#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5 -#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6 -#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7 -#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8 -#endif - -#ifndef GL_ATI_vertex_array_object -#define GL_STATIC_ATI 0x8760 -#define GL_DYNAMIC_ATI 0x8761 -#define GL_PRESERVE_ATI 0x8762 -#define GL_DISCARD_ATI 0x8763 -#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764 -#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765 -#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766 -#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767 -#endif - -#ifndef GL_EXT_vertex_shader -#define GL_VERTEX_SHADER_EXT 0x8780 -#define GL_VERTEX_SHADER_BINDING_EXT 0x8781 -#define GL_OP_INDEX_EXT 0x8782 -#define GL_OP_NEGATE_EXT 0x8783 -#define GL_OP_DOT3_EXT 0x8784 -#define GL_OP_DOT4_EXT 0x8785 -#define GL_OP_MUL_EXT 0x8786 -#define GL_OP_ADD_EXT 0x8787 -#define GL_OP_MADD_EXT 0x8788 -#define GL_OP_FRAC_EXT 0x8789 -#define GL_OP_MAX_EXT 0x878A -#define GL_OP_MIN_EXT 0x878B -#define GL_OP_SET_GE_EXT 0x878C -#define GL_OP_SET_LT_EXT 0x878D -#define GL_OP_CLAMP_EXT 0x878E -#define GL_OP_FLOOR_EXT 0x878F -#define GL_OP_ROUND_EXT 0x8790 -#define GL_OP_EXP_BASE_2_EXT 0x8791 -#define GL_OP_LOG_BASE_2_EXT 0x8792 -#define GL_OP_POWER_EXT 0x8793 -#define GL_OP_RECIP_EXT 0x8794 -#define GL_OP_RECIP_SQRT_EXT 0x8795 -#define GL_OP_SUB_EXT 0x8796 -#define GL_OP_CROSS_PRODUCT_EXT 0x8797 -#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798 -#define GL_OP_MOV_EXT 0x8799 -#define GL_OUTPUT_VERTEX_EXT 0x879A -#define GL_OUTPUT_COLOR0_EXT 0x879B -#define GL_OUTPUT_COLOR1_EXT 0x879C -#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D -#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E -#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F -#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0 -#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1 -#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2 -#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3 -#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4 -#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5 -#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6 -#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7 -#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8 -#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9 -#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA -#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB -#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC -#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD -#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE -#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF -#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0 -#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1 -#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2 -#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3 -#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4 -#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5 -#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6 -#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7 -#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8 -#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9 -#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA -#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB -#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC -#define GL_OUTPUT_FOG_EXT 0x87BD -#define GL_SCALAR_EXT 0x87BE -#define GL_VECTOR_EXT 0x87BF -#define GL_MATRIX_EXT 0x87C0 -#define GL_VARIANT_EXT 0x87C1 -#define GL_INVARIANT_EXT 0x87C2 -#define GL_LOCAL_CONSTANT_EXT 0x87C3 -#define GL_LOCAL_EXT 0x87C4 -#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5 -#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6 -#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7 -#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8 -#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9 -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD -#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE -#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF -#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0 -#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1 -#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2 -#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3 -#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4 -#define GL_X_EXT 0x87D5 -#define GL_Y_EXT 0x87D6 -#define GL_Z_EXT 0x87D7 -#define GL_W_EXT 0x87D8 -#define GL_NEGATIVE_X_EXT 0x87D9 -#define GL_NEGATIVE_Y_EXT 0x87DA -#define GL_NEGATIVE_Z_EXT 0x87DB -#define GL_NEGATIVE_W_EXT 0x87DC -#define GL_ZERO_EXT 0x87DD -#define GL_ONE_EXT 0x87DE -#define GL_NEGATIVE_ONE_EXT 0x87DF -#define GL_NORMALIZED_RANGE_EXT 0x87E0 -#define GL_FULL_RANGE_EXT 0x87E1 -#define GL_CURRENT_VERTEX_EXT 0x87E2 -#define GL_MVP_MATRIX_EXT 0x87E3 -#define GL_VARIANT_VALUE_EXT 0x87E4 -#define GL_VARIANT_DATATYPE_EXT 0x87E5 -#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6 -#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7 -#define GL_VARIANT_ARRAY_EXT 0x87E8 -#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9 -#define GL_INVARIANT_VALUE_EXT 0x87EA -#define GL_INVARIANT_DATATYPE_EXT 0x87EB -#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC -#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED -#endif - -#ifndef GL_ATI_vertex_streams -#define GL_MAX_VERTEX_STREAMS_ATI 0x876B -#define GL_VERTEX_STREAM0_ATI 0x876C -#define GL_VERTEX_STREAM1_ATI 0x876D -#define GL_VERTEX_STREAM2_ATI 0x876E -#define GL_VERTEX_STREAM3_ATI 0x876F -#define GL_VERTEX_STREAM4_ATI 0x8770 -#define GL_VERTEX_STREAM5_ATI 0x8771 -#define GL_VERTEX_STREAM6_ATI 0x8772 -#define GL_VERTEX_STREAM7_ATI 0x8773 -#define GL_VERTEX_SOURCE_ATI 0x8774 -#endif - -#ifndef GL_ATI_element_array -#define GL_ELEMENT_ARRAY_ATI 0x8768 -#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769 -#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A -#endif - -#ifndef GL_SUN_mesh_array -#define GL_QUAD_MESH_SUN 0x8614 -#define GL_TRIANGLE_MESH_SUN 0x8615 -#endif - -#ifndef GL_SUN_slice_accum -#define GL_SLICE_ACCUM_SUN 0x85CC -#endif - -#ifndef GL_NV_multisample_filter_hint -#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534 -#endif - -#ifndef GL_NV_depth_clamp -#define GL_DEPTH_CLAMP_NV 0x864F -#endif - -#ifndef GL_NV_occlusion_query -#define GL_PIXEL_COUNTER_BITS_NV 0x8864 -#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 -#define GL_PIXEL_COUNT_NV 0x8866 -#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 -#endif - -#ifndef GL_NV_point_sprite -#define GL_POINT_SPRITE_NV 0x8861 -#define GL_COORD_REPLACE_NV 0x8862 -#define GL_POINT_SPRITE_R_MODE_NV 0x8863 -#endif - -#ifndef GL_NV_texture_shader3 -#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850 -#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851 -#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852 -#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853 -#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854 -#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855 -#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856 -#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857 -#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858 -#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859 -#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A -#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B -#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C -#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D -#define GL_HILO8_NV 0x885E -#define GL_SIGNED_HILO8_NV 0x885F -#define GL_FORCE_BLUE_TO_ONE_NV 0x8860 -#endif - -#ifndef GL_NV_vertex_program1_1 -#endif - -#ifndef GL_EXT_shadow_funcs -#endif - -#ifndef GL_EXT_stencil_two_side -#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910 -#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911 -#endif - -#ifndef GL_ATI_text_fragment_shader -#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 -#endif - -#ifndef GL_APPLE_client_storage -#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 -#endif - -#ifndef GL_APPLE_element_array -#define GL_ELEMENT_ARRAY_APPLE 0x8A0C -#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8A0D -#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x8A0E -#endif - -#ifndef GL_APPLE_fence -#define GL_DRAW_PIXELS_APPLE 0x8A0A -#define GL_FENCE_APPLE 0x8A0B -#endif - -#ifndef GL_APPLE_vertex_array_object -#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5 -#endif - -#ifndef GL_APPLE_vertex_array_range -#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D -#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E -#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F -#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 -#define GL_STORAGE_CLIENT_APPLE 0x85B4 -#define GL_STORAGE_CACHED_APPLE 0x85BE -#define GL_STORAGE_SHARED_APPLE 0x85BF -#endif - -#ifndef GL_APPLE_ycbcr_422 -#define GL_YCBCR_422_APPLE 0x85B9 -#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB -#endif - -#ifndef GL_S3_s3tc -#define GL_RGB_S3TC 0x83A0 -#define GL_RGB4_S3TC 0x83A1 -#define GL_RGBA_S3TC 0x83A2 -#define GL_RGBA4_S3TC 0x83A3 -#endif - -#ifndef GL_ATI_draw_buffers -#define GL_MAX_DRAW_BUFFERS_ATI 0x8824 -#define GL_DRAW_BUFFER0_ATI 0x8825 -#define GL_DRAW_BUFFER1_ATI 0x8826 -#define GL_DRAW_BUFFER2_ATI 0x8827 -#define GL_DRAW_BUFFER3_ATI 0x8828 -#define GL_DRAW_BUFFER4_ATI 0x8829 -#define GL_DRAW_BUFFER5_ATI 0x882A -#define GL_DRAW_BUFFER6_ATI 0x882B -#define GL_DRAW_BUFFER7_ATI 0x882C -#define GL_DRAW_BUFFER8_ATI 0x882D -#define GL_DRAW_BUFFER9_ATI 0x882E -#define GL_DRAW_BUFFER10_ATI 0x882F -#define GL_DRAW_BUFFER11_ATI 0x8830 -#define GL_DRAW_BUFFER12_ATI 0x8831 -#define GL_DRAW_BUFFER13_ATI 0x8832 -#define GL_DRAW_BUFFER14_ATI 0x8833 -#define GL_DRAW_BUFFER15_ATI 0x8834 -#endif - -#ifndef GL_ATI_pixel_format_float -#define GL_TYPE_RGBA_FLOAT_ATI 0x8820 -#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 -#endif - -#ifndef GL_ATI_texture_env_combine3 -#define GL_MODULATE_ADD_ATI 0x8744 -#define GL_MODULATE_SIGNED_ADD_ATI 0x8745 -#define GL_MODULATE_SUBTRACT_ATI 0x8746 -#endif - -#ifndef GL_ATI_texture_float -#define GL_RGBA_FLOAT32_ATI 0x8814 -#define GL_RGB_FLOAT32_ATI 0x8815 -#define GL_ALPHA_FLOAT32_ATI 0x8816 -#define GL_INTENSITY_FLOAT32_ATI 0x8817 -#define GL_LUMINANCE_FLOAT32_ATI 0x8818 -#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 -#define GL_RGBA_FLOAT16_ATI 0x881A -#define GL_RGB_FLOAT16_ATI 0x881B -#define GL_ALPHA_FLOAT16_ATI 0x881C -#define GL_INTENSITY_FLOAT16_ATI 0x881D -#define GL_LUMINANCE_FLOAT16_ATI 0x881E -#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F -#endif - -#ifndef GL_NV_float_buffer -#define GL_FLOAT_R_NV 0x8880 -#define GL_FLOAT_RG_NV 0x8881 -#define GL_FLOAT_RGB_NV 0x8882 -#define GL_FLOAT_RGBA_NV 0x8883 -#define GL_FLOAT_R16_NV 0x8884 -#define GL_FLOAT_R32_NV 0x8885 -#define GL_FLOAT_RG16_NV 0x8886 -#define GL_FLOAT_RG32_NV 0x8887 -#define GL_FLOAT_RGB16_NV 0x8888 -#define GL_FLOAT_RGB32_NV 0x8889 -#define GL_FLOAT_RGBA16_NV 0x888A -#define GL_FLOAT_RGBA32_NV 0x888B -#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C -#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D -#define GL_FLOAT_RGBA_MODE_NV 0x888E -#endif - -#ifndef GL_NV_fragment_program -#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868 -#define GL_FRAGMENT_PROGRAM_NV 0x8870 -#define GL_MAX_TEXTURE_COORDS_NV 0x8871 -#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872 -#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873 -#define GL_PROGRAM_ERROR_STRING_NV 0x8874 -#endif - -#ifndef GL_NV_half_float -#define GL_HALF_FLOAT_NV 0x140B -#endif - -#ifndef GL_NV_pixel_data_range -#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878 -#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879 -#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A -#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B -#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C -#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D -#endif - -#ifndef GL_NV_primitive_restart -#define GL_PRIMITIVE_RESTART_NV 0x8558 -#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 -#endif - -#ifndef GL_NV_texture_expand_normal -#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F -#endif - -#ifndef GL_NV_vertex_program2 -#endif - -#ifndef GL_ATI_map_object_buffer -#endif - -#ifndef GL_ATI_separate_stencil -#define GL_STENCIL_BACK_FUNC_ATI 0x8800 -#define GL_STENCIL_BACK_FAIL_ATI 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803 -#endif - -#ifndef GL_ATI_vertex_attrib_array_object -#endif - -#ifndef GL_OES_read_format -#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B -#endif - -#ifndef GL_EXT_depth_bounds_test -#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890 -#define GL_DEPTH_BOUNDS_EXT 0x8891 -#endif - -#ifndef GL_EXT_texture_mirror_clamp -#define GL_MIRROR_CLAMP_EXT 0x8742 -#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 -#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912 -#endif - -#ifndef GL_EXT_blend_equation_separate -#define GL_BLEND_EQUATION_RGB_EXT 0x8009 -#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D -#endif - -#ifndef GL_MESA_pack_invert -#define GL_PACK_INVERT_MESA 0x8758 -#endif - -#ifndef GL_MESA_ycbcr_texture -#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB -#define GL_YCBCR_MESA 0x8757 -#endif - -#ifndef GL_EXT_pixel_buffer_object -#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB -#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC -#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED -#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF -#endif - -#ifndef GL_NV_fragment_program_option -#endif - -#ifndef GL_NV_fragment_program2 -#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4 -#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5 -#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6 -#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7 -#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8 -#endif - -#ifndef GL_NV_vertex_program2_option -/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */ -/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */ -#endif - -#ifndef GL_NV_vertex_program3 -/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */ -#endif - -#ifndef GL_EXT_framebuffer_object -#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 -#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 -#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 -#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 -#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 -#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA -#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB -#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC -#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD -#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF -#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 -#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 -#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 -#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 -#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 -#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 -#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 -#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 -#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 -#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 -#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA -#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB -#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC -#define GL_COLOR_ATTACHMENT13_EXT 0x8CED -#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE -#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF -#define GL_DEPTH_ATTACHMENT_EXT 0x8D00 -#define GL_STENCIL_ATTACHMENT_EXT 0x8D20 -#define GL_FRAMEBUFFER_EXT 0x8D40 -#define GL_RENDERBUFFER_EXT 0x8D41 -#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 -#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 -#define GL_STENCIL_INDEX1_EXT 0x8D46 -#define GL_STENCIL_INDEX4_EXT 0x8D47 -#define GL_STENCIL_INDEX8_EXT 0x8D48 -#define GL_STENCIL_INDEX16_EXT 0x8D49 -#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55 -#endif - -#ifndef GL_GREMEDY_string_marker -#endif - -#ifndef GL_EXT_packed_depth_stencil -#define GL_DEPTH_STENCIL_EXT 0x84F9 -#define GL_UNSIGNED_INT_24_8_EXT 0x84FA -#define GL_DEPTH24_STENCIL8_EXT 0x88F0 -#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1 -#endif - -#ifndef GL_EXT_stencil_clear_tag -#define GL_STENCIL_TAG_BITS_EXT 0x88F2 -#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3 -#endif - -#ifndef GL_EXT_texture_sRGB -#define GL_SRGB_EXT 0x8C40 -#define GL_SRGB8_EXT 0x8C41 -#define GL_SRGB_ALPHA_EXT 0x8C42 -#define GL_SRGB8_ALPHA8_EXT 0x8C43 -#define GL_SLUMINANCE_ALPHA_EXT 0x8C44 -#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45 -#define GL_SLUMINANCE_EXT 0x8C46 -#define GL_SLUMINANCE8_EXT 0x8C47 -#define GL_COMPRESSED_SRGB_EXT 0x8C48 -#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49 -#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A -#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B -#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E -#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F -#endif - -#ifndef GL_EXT_framebuffer_blit -#define GL_READ_FRAMEBUFFER_EXT 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING_EXT -#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA -#endif - -#ifndef GL_EXT_framebuffer_multisample -#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 -#define GL_MAX_SAMPLES_EXT 0x8D57 -#endif - -#ifndef GL_MESAX_texture_stack -#define GL_TEXTURE_1D_STACK_MESAX 0x8759 -#define GL_TEXTURE_2D_STACK_MESAX 0x875A -#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B -#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C -#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D -#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E -#endif - -#ifndef GL_EXT_timer_query -#define GL_TIME_ELAPSED_EXT 0x88BF -#endif - -#ifndef GL_EXT_gpu_program_parameters -#endif - -#ifndef GL_APPLE_flush_buffer_range -#define GL_BUFFER_SERIALIZED_MODIFY_APPLE 0x8A12 -#define GL_BUFFER_FLUSHING_UNMAP_APPLE 0x8A13 -#endif - -#ifndef GL_NV_gpu_program4 -#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904 -#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905 -#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906 -#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907 -#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908 -#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909 -#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5 -#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6 -#endif - -#ifndef GL_NV_geometry_program4 -#define GL_LINES_ADJACENCY_EXT 0x000A -#define GL_LINE_STRIP_ADJACENCY_EXT 0x000B -#define GL_TRIANGLES_ADJACENCY_EXT 0x000C -#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0x000D -#define GL_GEOMETRY_PROGRAM_NV 0x8C26 -#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27 -#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28 -#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA -#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB -#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC -#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29 -#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 -#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 -#define GL_PROGRAM_POINT_SIZE_EXT 0x8642 -#endif - -#ifndef GL_EXT_geometry_shader4 -#define GL_GEOMETRY_SHADER_EXT 0x8DD9 -/* reuse GL_GEOMETRY_VERTICES_OUT_EXT */ -/* reuse GL_GEOMETRY_INPUT_TYPE_EXT */ -/* reuse GL_GEOMETRY_OUTPUT_TYPE_EXT */ -/* reuse GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT */ -#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD -#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE -#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B -#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF -#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0 -#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1 -/* reuse GL_LINES_ADJACENCY_EXT */ -/* reuse GL_LINE_STRIP_ADJACENCY_EXT */ -/* reuse GL_TRIANGLES_ADJACENCY_EXT */ -/* reuse GL_TRIANGLE_STRIP_ADJACENCY_EXT */ -/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT */ -/* reuse GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT */ -/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */ -/* reuse GL_PROGRAM_POINT_SIZE_EXT */ -#endif - -#ifndef GL_NV_vertex_program4 -#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_NV 0x88FD -#endif - -#ifndef GL_EXT_gpu_shader4 -#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0 -#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 -#define GL_SAMPLER_BUFFER_EXT 0x8DC2 -#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3 -#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 -#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5 -#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6 -#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7 -#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8 -#define GL_INT_SAMPLER_1D_EXT 0x8DC9 -#define GL_INT_SAMPLER_2D_EXT 0x8DCA -#define GL_INT_SAMPLER_3D_EXT 0x8DCB -#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC -#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD -#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE -#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF -#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0 -#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1 -#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2 -#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3 -#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4 -#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5 -#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6 -#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8 -#endif - -#ifndef GL_EXT_draw_instanced -#endif - -#ifndef GL_EXT_packed_float -#define GL_R11F_G11F_B10F_EXT 0x8C3A -#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B -#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C -#endif - -#ifndef GL_EXT_texture_array -#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 -#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 -#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A -#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B -#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C -#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D -#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF -#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E -/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */ -#endif - -#ifndef GL_EXT_texture_buffer_object -#define GL_TEXTURE_BUFFER_EXT 0x8C2A -#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B -#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C -#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D -#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E -#endif - -#ifndef GL_EXT_texture_compression_latc -#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70 -#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71 -#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72 -#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73 -#endif - -#ifndef GL_EXT_texture_compression_rgtc -#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB -#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC -#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD -#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE -#endif - -#ifndef GL_EXT_texture_shared_exponent -#define GL_RGB9_E5_EXT 0x8C3D -#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E -#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F -#endif - -#ifndef GL_NV_depth_buffer_float -#define GL_DEPTH_COMPONENT32F_NV 0x8DAB -#define GL_DEPTH32F_STENCIL8_NV 0x8DAC -#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD -#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF -#endif - -#ifndef GL_NV_fragment_program4 -#endif - -#ifndef GL_NV_framebuffer_multisample_coverage -#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB -#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10 -#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E11 -#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12 -#endif - -#ifndef GL_EXT_framebuffer_sRGB -#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9 -#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA -#endif - -#ifndef GL_NV_geometry_shader4 -#endif - -#ifndef GL_NV_parameter_buffer_object -#define GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV 0x8DA0 -#define GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV 0x8DA1 -#define GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV 0x8DA2 -#define GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV 0x8DA3 -#define GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV 0x8DA4 -#endif - -#ifndef GL_EXT_draw_buffers2 -#endif - -#ifndef GL_NV_transform_feedback -#define GL_BACK_PRIMARY_COLOR_NV 0x8C77 -#define GL_BACK_SECONDARY_COLOR_NV 0x8C78 -#define GL_TEXTURE_COORD_NV 0x8C79 -#define GL_CLIP_DISTANCE_NV 0x8C7A -#define GL_VERTEX_ID_NV 0x8C7B -#define GL_PRIMITIVE_ID_NV 0x8C7C -#define GL_GENERIC_ATTRIB_NV 0x8C7D -#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80 -#define GL_ACTIVE_VARYINGS_NV 0x8C81 -#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82 -#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83 -#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85 -#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86 -#define GL_PRIMITIVES_GENERATED_NV 0x8C87 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88 -#define GL_RASTERIZER_DISCARD_NV 0x8C89 -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B -#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C -#define GL_SEPARATE_ATTRIBS_NV 0x8C8D -#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F -#define GL_LAYER_NV 0x8DAA -#define GL_NEXT_BUFFER_NV -2 -#define GL_SKIP_COMPONENTS4_NV -3 -#define GL_SKIP_COMPONENTS3_NV -4 -#define GL_SKIP_COMPONENTS2_NV -5 -#define GL_SKIP_COMPONENTS1_NV -6 -#endif - -#ifndef GL_EXT_bindable_uniform -#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2 -#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3 -#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4 -#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED -#define GL_UNIFORM_BUFFER_EXT 0x8DEE -#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF -#endif - -#ifndef GL_EXT_texture_integer -#define GL_RGBA32UI_EXT 0x8D70 -#define GL_RGB32UI_EXT 0x8D71 -#define GL_ALPHA32UI_EXT 0x8D72 -#define GL_INTENSITY32UI_EXT 0x8D73 -#define GL_LUMINANCE32UI_EXT 0x8D74 -#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75 -#define GL_RGBA16UI_EXT 0x8D76 -#define GL_RGB16UI_EXT 0x8D77 -#define GL_ALPHA16UI_EXT 0x8D78 -#define GL_INTENSITY16UI_EXT 0x8D79 -#define GL_LUMINANCE16UI_EXT 0x8D7A -#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B -#define GL_RGBA8UI_EXT 0x8D7C -#define GL_RGB8UI_EXT 0x8D7D -#define GL_ALPHA8UI_EXT 0x8D7E -#define GL_INTENSITY8UI_EXT 0x8D7F -#define GL_LUMINANCE8UI_EXT 0x8D80 -#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81 -#define GL_RGBA32I_EXT 0x8D82 -#define GL_RGB32I_EXT 0x8D83 -#define GL_ALPHA32I_EXT 0x8D84 -#define GL_INTENSITY32I_EXT 0x8D85 -#define GL_LUMINANCE32I_EXT 0x8D86 -#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87 -#define GL_RGBA16I_EXT 0x8D88 -#define GL_RGB16I_EXT 0x8D89 -#define GL_ALPHA16I_EXT 0x8D8A -#define GL_INTENSITY16I_EXT 0x8D8B -#define GL_LUMINANCE16I_EXT 0x8D8C -#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D -#define GL_RGBA8I_EXT 0x8D8E -#define GL_RGB8I_EXT 0x8D8F -#define GL_ALPHA8I_EXT 0x8D90 -#define GL_INTENSITY8I_EXT 0x8D91 -#define GL_LUMINANCE8I_EXT 0x8D92 -#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93 -#define GL_RED_INTEGER_EXT 0x8D94 -#define GL_GREEN_INTEGER_EXT 0x8D95 -#define GL_BLUE_INTEGER_EXT 0x8D96 -#define GL_ALPHA_INTEGER_EXT 0x8D97 -#define GL_RGB_INTEGER_EXT 0x8D98 -#define GL_RGBA_INTEGER_EXT 0x8D99 -#define GL_BGR_INTEGER_EXT 0x8D9A -#define GL_BGRA_INTEGER_EXT 0x8D9B -#define GL_LUMINANCE_INTEGER_EXT 0x8D9C -#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D -#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E -#endif - -#ifndef GL_GREMEDY_frame_terminator -#endif - -#ifndef GL_NV_conditional_render -#define GL_QUERY_WAIT_NV 0x8E13 -#define GL_QUERY_NO_WAIT_NV 0x8E14 -#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15 -#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16 -#endif - -#ifndef GL_NV_present_video -#define GL_FRAME_NV 0x8E26 -#define GL_FIELDS_NV 0x8E27 -#define GL_CURRENT_TIME_NV 0x8E28 -#define GL_NUM_FILL_STREAMS_NV 0x8E29 -#define GL_PRESENT_TIME_NV 0x8E2A -#define GL_PRESENT_DURATION_NV 0x8E2B -#endif - -#ifndef GL_EXT_transform_feedback -#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E -#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84 -#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85 -#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F -#define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C -#define GL_SEPARATE_ATTRIBS_EXT 0x8C8D -#define GL_PRIMITIVES_GENERATED_EXT 0x8C87 -#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88 -#define GL_RASTERIZER_DISCARD_EXT 0x8C89 -#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B -#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80 -#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83 -#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F -#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76 -#endif - -#ifndef GL_EXT_direct_state_access -#define GL_PROGRAM_MATRIX_EXT 0x8E2D -#define GL_TRANSPOSE_PROGRAM_MATRIX_EXT 0x8E2E -#define GL_PROGRAM_MATRIX_STACK_DEPTH_EXT 0x8E2F -#endif - -#ifndef GL_EXT_vertex_array_bgra -/* reuse GL_BGRA */ -#endif - -#ifndef GL_EXT_texture_swizzle -#define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42 -#define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43 -#define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44 -#define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45 -#define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46 -#endif - -#ifndef GL_NV_explicit_multisample -#define GL_SAMPLE_POSITION_NV 0x8E50 -#define GL_SAMPLE_MASK_NV 0x8E51 -#define GL_SAMPLE_MASK_VALUE_NV 0x8E52 -#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53 -#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54 -#define GL_TEXTURE_RENDERBUFFER_NV 0x8E55 -#define GL_SAMPLER_RENDERBUFFER_NV 0x8E56 -#define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57 -#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58 -#define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59 -#endif - -#ifndef GL_NV_transform_feedback2 -#define GL_TRANSFORM_FEEDBACK_NV 0x8E22 -#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23 -#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24 -#define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25 -#endif - -#ifndef GL_ATI_meminfo -#define GL_VBO_FREE_MEMORY_ATI 0x87FB -#define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC -#define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD -#endif - -#ifndef GL_AMD_performance_monitor -#define GL_COUNTER_TYPE_AMD 0x8BC0 -#define GL_COUNTER_RANGE_AMD 0x8BC1 -#define GL_UNSIGNED_INT64_AMD 0x8BC2 -#define GL_PERCENTAGE_AMD 0x8BC3 -#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 -#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 -#define GL_PERFMON_RESULT_AMD 0x8BC6 -#endif - -#ifndef GL_AMD_texture_texture4 -#endif - -#ifndef GL_AMD_vertex_shader_tesselator -#define GL_SAMPLER_BUFFER_AMD 0x9001 -#define GL_INT_SAMPLER_BUFFER_AMD 0x9002 -#define GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD 0x9003 -#define GL_TESSELLATION_MODE_AMD 0x9004 -#define GL_TESSELLATION_FACTOR_AMD 0x9005 -#define GL_DISCRETE_AMD 0x9006 -#define GL_CONTINUOUS_AMD 0x9007 -#endif - -#ifndef GL_EXT_provoking_vertex -#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT 0x8E4C -#define GL_FIRST_VERTEX_CONVENTION_EXT 0x8E4D -#define GL_LAST_VERTEX_CONVENTION_EXT 0x8E4E -#define GL_PROVOKING_VERTEX_EXT 0x8E4F -#endif - -#ifndef GL_EXT_texture_snorm -#define GL_ALPHA_SNORM 0x9010 -#define GL_LUMINANCE_SNORM 0x9011 -#define GL_LUMINANCE_ALPHA_SNORM 0x9012 -#define GL_INTENSITY_SNORM 0x9013 -#define GL_ALPHA8_SNORM 0x9014 -#define GL_LUMINANCE8_SNORM 0x9015 -#define GL_LUMINANCE8_ALPHA8_SNORM 0x9016 -#define GL_INTENSITY8_SNORM 0x9017 -#define GL_ALPHA16_SNORM 0x9018 -#define GL_LUMINANCE16_SNORM 0x9019 -#define GL_LUMINANCE16_ALPHA16_SNORM 0x901A -#define GL_INTENSITY16_SNORM 0x901B -/* reuse GL_RED_SNORM */ -/* reuse GL_RG_SNORM */ -/* reuse GL_RGB_SNORM */ -/* reuse GL_RGBA_SNORM */ -/* reuse GL_R8_SNORM */ -/* reuse GL_RG8_SNORM */ -/* reuse GL_RGB8_SNORM */ -/* reuse GL_RGBA8_SNORM */ -/* reuse GL_R16_SNORM */ -/* reuse GL_RG16_SNORM */ -/* reuse GL_RGB16_SNORM */ -/* reuse GL_RGBA16_SNORM */ -/* reuse GL_SIGNED_NORMALIZED */ -#endif - -#ifndef GL_AMD_draw_buffers_blend -#endif - -#ifndef GL_APPLE_texture_range -#define GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7 -#define GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8 -#define GL_TEXTURE_STORAGE_HINT_APPLE 0x85BC -#define GL_STORAGE_PRIVATE_APPLE 0x85BD -/* reuse GL_STORAGE_CACHED_APPLE */ -/* reuse GL_STORAGE_SHARED_APPLE */ -#endif - -#ifndef GL_APPLE_float_pixels -#define GL_HALF_APPLE 0x140B -#define GL_RGBA_FLOAT32_APPLE 0x8814 -#define GL_RGB_FLOAT32_APPLE 0x8815 -#define GL_ALPHA_FLOAT32_APPLE 0x8816 -#define GL_INTENSITY_FLOAT32_APPLE 0x8817 -#define GL_LUMINANCE_FLOAT32_APPLE 0x8818 -#define GL_LUMINANCE_ALPHA_FLOAT32_APPLE 0x8819 -#define GL_RGBA_FLOAT16_APPLE 0x881A -#define GL_RGB_FLOAT16_APPLE 0x881B -#define GL_ALPHA_FLOAT16_APPLE 0x881C -#define GL_INTENSITY_FLOAT16_APPLE 0x881D -#define GL_LUMINANCE_FLOAT16_APPLE 0x881E -#define GL_LUMINANCE_ALPHA_FLOAT16_APPLE 0x881F -#define GL_COLOR_FLOAT_APPLE 0x8A0F -#endif - -#ifndef GL_APPLE_vertex_program_evaluators -#define GL_VERTEX_ATTRIB_MAP1_APPLE 0x8A00 -#define GL_VERTEX_ATTRIB_MAP2_APPLE 0x8A01 -#define GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02 -#define GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03 -#define GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04 -#define GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05 -#define GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06 -#define GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07 -#define GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08 -#define GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09 -#endif - -#ifndef GL_APPLE_aux_depth_stencil -#define GL_AUX_DEPTH_STENCIL_APPLE 0x8A14 -#endif - -#ifndef GL_APPLE_object_purgeable -#define GL_BUFFER_OBJECT_APPLE 0x85B3 -#define GL_RELEASED_APPLE 0x8A19 -#define GL_VOLATILE_APPLE 0x8A1A -#define GL_RETAINED_APPLE 0x8A1B -#define GL_UNDEFINED_APPLE 0x8A1C -#define GL_PURGEABLE_APPLE 0x8A1D -#endif - -#ifndef GL_APPLE_row_bytes -#define GL_PACK_ROW_BYTES_APPLE 0x8A15 -#define GL_UNPACK_ROW_BYTES_APPLE 0x8A16 -#endif - -#ifndef GL_APPLE_rgb_422 -#define GL_RGB_422_APPLE 0x8A1F -/* reuse GL_UNSIGNED_SHORT_8_8_APPLE */ -/* reuse GL_UNSIGNED_SHORT_8_8_REV_APPLE */ -#endif - -#ifndef GL_NV_video_capture -#define GL_VIDEO_BUFFER_NV 0x9020 -#define GL_VIDEO_BUFFER_BINDING_NV 0x9021 -#define GL_FIELD_UPPER_NV 0x9022 -#define GL_FIELD_LOWER_NV 0x9023 -#define GL_NUM_VIDEO_CAPTURE_STREAMS_NV 0x9024 -#define GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV 0x9025 -#define GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV 0x9026 -#define GL_LAST_VIDEO_CAPTURE_STATUS_NV 0x9027 -#define GL_VIDEO_BUFFER_PITCH_NV 0x9028 -#define GL_VIDEO_COLOR_CONVERSION_MATRIX_NV 0x9029 -#define GL_VIDEO_COLOR_CONVERSION_MAX_NV 0x902A -#define GL_VIDEO_COLOR_CONVERSION_MIN_NV 0x902B -#define GL_VIDEO_COLOR_CONVERSION_OFFSET_NV 0x902C -#define GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV 0x902D -#define GL_PARTIAL_SUCCESS_NV 0x902E -#define GL_SUCCESS_NV 0x902F -#define GL_FAILURE_NV 0x9030 -#define GL_YCBYCR8_422_NV 0x9031 -#define GL_YCBAYCR8A_4224_NV 0x9032 -#define GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV 0x9033 -#define GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV 0x9034 -#define GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV 0x9035 -#define GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV 0x9036 -#define GL_Z4Y12Z4CB12Z4CR12_444_NV 0x9037 -#define GL_VIDEO_CAPTURE_FRAME_WIDTH_NV 0x9038 -#define GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV 0x9039 -#define GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV 0x903A -#define GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV 0x903B -#define GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV 0x903C -#endif - -#ifndef GL_NV_copy_image -#endif - -#ifndef GL_EXT_separate_shader_objects -#define GL_ACTIVE_PROGRAM_EXT 0x8B8D -#endif - -#ifndef GL_NV_parameter_buffer_object2 -#endif - -#ifndef GL_NV_shader_buffer_load -#define GL_BUFFER_GPU_ADDRESS_NV 0x8F1D -#define GL_GPU_ADDRESS_NV 0x8F34 -#define GL_MAX_SHADER_BUFFER_ADDRESS_NV 0x8F35 -#endif - -#ifndef GL_NV_vertex_buffer_unified_memory -#define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV 0x8F1E -#define GL_ELEMENT_ARRAY_UNIFIED_NV 0x8F1F -#define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV 0x8F20 -#define GL_VERTEX_ARRAY_ADDRESS_NV 0x8F21 -#define GL_NORMAL_ARRAY_ADDRESS_NV 0x8F22 -#define GL_COLOR_ARRAY_ADDRESS_NV 0x8F23 -#define GL_INDEX_ARRAY_ADDRESS_NV 0x8F24 -#define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV 0x8F25 -#define GL_EDGE_FLAG_ARRAY_ADDRESS_NV 0x8F26 -#define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV 0x8F27 -#define GL_FOG_COORD_ARRAY_ADDRESS_NV 0x8F28 -#define GL_ELEMENT_ARRAY_ADDRESS_NV 0x8F29 -#define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV 0x8F2A -#define GL_VERTEX_ARRAY_LENGTH_NV 0x8F2B -#define GL_NORMAL_ARRAY_LENGTH_NV 0x8F2C -#define GL_COLOR_ARRAY_LENGTH_NV 0x8F2D -#define GL_INDEX_ARRAY_LENGTH_NV 0x8F2E -#define GL_TEXTURE_COORD_ARRAY_LENGTH_NV 0x8F2F -#define GL_EDGE_FLAG_ARRAY_LENGTH_NV 0x8F30 -#define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV 0x8F31 -#define GL_FOG_COORD_ARRAY_LENGTH_NV 0x8F32 -#define GL_ELEMENT_ARRAY_LENGTH_NV 0x8F33 -#define GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40 -#define GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41 -#define GL_DRAW_INDIRECT_LENGTH_NV 0x8F42 -#endif - -#ifndef GL_NV_texture_barrier -#endif - -#ifndef GL_AMD_shader_stencil_export -#endif - -#ifndef GL_AMD_seamless_cubemap_per_texture -/* reuse GL_TEXTURE_CUBE_MAP_SEAMLESS */ -#endif - -#ifndef GL_AMD_conservative_depth -#endif - -#ifndef GL_EXT_shader_image_load_store -#define GL_MAX_IMAGE_UNITS_EXT 0x8F38 -#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT 0x8F39 -#define GL_IMAGE_BINDING_NAME_EXT 0x8F3A -#define GL_IMAGE_BINDING_LEVEL_EXT 0x8F3B -#define GL_IMAGE_BINDING_LAYERED_EXT 0x8F3C -#define GL_IMAGE_BINDING_LAYER_EXT 0x8F3D -#define GL_IMAGE_BINDING_ACCESS_EXT 0x8F3E -#define GL_IMAGE_1D_EXT 0x904C -#define GL_IMAGE_2D_EXT 0x904D -#define GL_IMAGE_3D_EXT 0x904E -#define GL_IMAGE_2D_RECT_EXT 0x904F -#define GL_IMAGE_CUBE_EXT 0x9050 -#define GL_IMAGE_BUFFER_EXT 0x9051 -#define GL_IMAGE_1D_ARRAY_EXT 0x9052 -#define GL_IMAGE_2D_ARRAY_EXT 0x9053 -#define GL_IMAGE_CUBE_MAP_ARRAY_EXT 0x9054 -#define GL_IMAGE_2D_MULTISAMPLE_EXT 0x9055 -#define GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9056 -#define GL_INT_IMAGE_1D_EXT 0x9057 -#define GL_INT_IMAGE_2D_EXT 0x9058 -#define GL_INT_IMAGE_3D_EXT 0x9059 -#define GL_INT_IMAGE_2D_RECT_EXT 0x905A -#define GL_INT_IMAGE_CUBE_EXT 0x905B -#define GL_INT_IMAGE_BUFFER_EXT 0x905C -#define GL_INT_IMAGE_1D_ARRAY_EXT 0x905D -#define GL_INT_IMAGE_2D_ARRAY_EXT 0x905E -#define GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x905F -#define GL_INT_IMAGE_2D_MULTISAMPLE_EXT 0x9060 -#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x9061 -#define GL_UNSIGNED_INT_IMAGE_1D_EXT 0x9062 -#define GL_UNSIGNED_INT_IMAGE_2D_EXT 0x9063 -#define GL_UNSIGNED_INT_IMAGE_3D_EXT 0x9064 -#define GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT 0x9065 -#define GL_UNSIGNED_INT_IMAGE_CUBE_EXT 0x9066 -#define GL_UNSIGNED_INT_IMAGE_BUFFER_EXT 0x9067 -#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT 0x9068 -#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT 0x9069 -#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT 0x906A -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT 0x906B -#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT 0x906C -#define GL_MAX_IMAGE_SAMPLES_EXT 0x906D -#define GL_IMAGE_BINDING_FORMAT_EXT 0x906E -#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT 0x00000001 -#define GL_ELEMENT_ARRAY_BARRIER_BIT_EXT 0x00000002 -#define GL_UNIFORM_BARRIER_BIT_EXT 0x00000004 -#define GL_TEXTURE_FETCH_BARRIER_BIT_EXT 0x00000008 -#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT 0x00000020 -#define GL_COMMAND_BARRIER_BIT_EXT 0x00000040 -#define GL_PIXEL_BUFFER_BARRIER_BIT_EXT 0x00000080 -#define GL_TEXTURE_UPDATE_BARRIER_BIT_EXT 0x00000100 -#define GL_BUFFER_UPDATE_BARRIER_BIT_EXT 0x00000200 -#define GL_FRAMEBUFFER_BARRIER_BIT_EXT 0x00000400 -#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT 0x00000800 -#define GL_ATOMIC_COUNTER_BARRIER_BIT_EXT 0x00001000 -#define GL_ALL_BARRIER_BITS_EXT 0xFFFFFFFF -#endif - -#ifndef GL_EXT_vertex_attrib_64bit -/* reuse GL_DOUBLE */ -#define GL_DOUBLE_VEC2_EXT 0x8FFC -#define GL_DOUBLE_VEC3_EXT 0x8FFD -#define GL_DOUBLE_VEC4_EXT 0x8FFE -#define GL_DOUBLE_MAT2_EXT 0x8F46 -#define GL_DOUBLE_MAT3_EXT 0x8F47 -#define GL_DOUBLE_MAT4_EXT 0x8F48 -#define GL_DOUBLE_MAT2x3_EXT 0x8F49 -#define GL_DOUBLE_MAT2x4_EXT 0x8F4A -#define GL_DOUBLE_MAT3x2_EXT 0x8F4B -#define GL_DOUBLE_MAT3x4_EXT 0x8F4C -#define GL_DOUBLE_MAT4x2_EXT 0x8F4D -#define GL_DOUBLE_MAT4x3_EXT 0x8F4E -#endif - -#ifndef GL_NV_gpu_program5 -#define GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV 0x8E5A -#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5B -#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV 0x8E5C -#define GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV 0x8E5D -#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5E -#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_NV 0x8E5F -#define GL_MAX_PROGRAM_SUBROUTINE_PARAMETERS_NV 0x8F44 -#define GL_MAX_PROGRAM_SUBROUTINE_NUM_NV 0x8F45 -#endif - -#ifndef GL_NV_gpu_shader5 -#define GL_INT64_NV 0x140E -#define GL_UNSIGNED_INT64_NV 0x140F -#define GL_INT8_NV 0x8FE0 -#define GL_INT8_VEC2_NV 0x8FE1 -#define GL_INT8_VEC3_NV 0x8FE2 -#define GL_INT8_VEC4_NV 0x8FE3 -#define GL_INT16_NV 0x8FE4 -#define GL_INT16_VEC2_NV 0x8FE5 -#define GL_INT16_VEC3_NV 0x8FE6 -#define GL_INT16_VEC4_NV 0x8FE7 -#define GL_INT64_VEC2_NV 0x8FE9 -#define GL_INT64_VEC3_NV 0x8FEA -#define GL_INT64_VEC4_NV 0x8FEB -#define GL_UNSIGNED_INT8_NV 0x8FEC -#define GL_UNSIGNED_INT8_VEC2_NV 0x8FED -#define GL_UNSIGNED_INT8_VEC3_NV 0x8FEE -#define GL_UNSIGNED_INT8_VEC4_NV 0x8FEF -#define GL_UNSIGNED_INT16_NV 0x8FF0 -#define GL_UNSIGNED_INT16_VEC2_NV 0x8FF1 -#define GL_UNSIGNED_INT16_VEC3_NV 0x8FF2 -#define GL_UNSIGNED_INT16_VEC4_NV 0x8FF3 -#define GL_UNSIGNED_INT64_VEC2_NV 0x8FF5 -#define GL_UNSIGNED_INT64_VEC3_NV 0x8FF6 -#define GL_UNSIGNED_INT64_VEC4_NV 0x8FF7 -#define GL_FLOAT16_NV 0x8FF8 -#define GL_FLOAT16_VEC2_NV 0x8FF9 -#define GL_FLOAT16_VEC3_NV 0x8FFA -#define GL_FLOAT16_VEC4_NV 0x8FFB -/* reuse GL_PATCHES */ -#endif - -#ifndef GL_NV_shader_buffer_store -#define GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV 0x00000010 -/* reuse GL_READ_WRITE */ -/* reuse GL_WRITE_ONLY */ -#endif - -#ifndef GL_NV_tessellation_program5 -#define GL_MAX_PROGRAM_PATCH_ATTRIBS_NV 0x86D8 -#define GL_TESS_CONTROL_PROGRAM_NV 0x891E -#define GL_TESS_EVALUATION_PROGRAM_NV 0x891F -#define GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV 0x8C74 -#define GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV 0x8C75 -#endif - -#ifndef GL_NV_vertex_attrib_integer_64bit -/* reuse GL_INT64_NV */ -/* reuse GL_UNSIGNED_INT64_NV */ -#endif - -#ifndef GL_NV_multisample_coverage -#define GL_COVERAGE_SAMPLES_NV 0x80A9 -#define GL_COLOR_SAMPLES_NV 0x8E20 -#endif - -#ifndef GL_AMD_name_gen_delete -#define GL_DATA_BUFFER_AMD 0x9151 -#define GL_PERFORMANCE_MONITOR_AMD 0x9152 -#define GL_QUERY_OBJECT_AMD 0x9153 -#define GL_VERTEX_ARRAY_OBJECT_AMD 0x9154 -#define GL_SAMPLER_OBJECT_AMD 0x9155 -#endif - -#ifndef GL_AMD_debug_output -#define GL_MAX_DEBUG_LOGGED_MESSAGES_AMD 0x9144 -#define GL_DEBUG_LOGGED_MESSAGES_AMD 0x9145 -#define GL_DEBUG_SEVERITY_HIGH_AMD 0x9146 -#define GL_DEBUG_SEVERITY_MEDIUM_AMD 0x9147 -#define GL_DEBUG_SEVERITY_LOW_AMD 0x9148 -#define GL_DEBUG_CATEGORY_API_ERROR_AMD 0x9149 -#define GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD 0x914A -#define GL_DEBUG_CATEGORY_DEPRECATION_AMD 0x914B -#define GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD 0x914C -#define GL_DEBUG_CATEGORY_PERFORMANCE_AMD 0x914D -#define GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD 0x914E -#define GL_DEBUG_CATEGORY_APPLICATION_AMD 0x914F -#define GL_DEBUG_CATEGORY_OTHER_AMD 0x9150 -#endif - -#ifndef GL_NV_vdpau_interop -#define GL_SURFACE_STATE_NV 0x86EB -#define GL_SURFACE_REGISTERED_NV 0x86FD -#define GL_SURFACE_MAPPED_NV 0x8700 -#define GL_WRITE_DISCARD_NV 0x88BE -#endif - -#ifndef GL_AMD_transform_feedback3_lines_triangles -#endif - -#ifndef GL_AMD_depth_clamp_separate -#define GL_DEPTH_CLAMP_NEAR_AMD 0x901E -#define GL_DEPTH_CLAMP_FAR_AMD 0x901F -#endif - -#ifndef GL_EXT_texture_sRGB_decode -#define GL_TEXTURE_SRGB_DECODE_EXT 0x8A48 -#define GL_DECODE_EXT 0x8A49 -#define GL_SKIP_DECODE_EXT 0x8A4A -#endif - -#ifndef GL_NV_texture_multisample -#define GL_TEXTURE_COVERAGE_SAMPLES_NV 0x9045 -#define GL_TEXTURE_COLOR_SAMPLES_NV 0x9046 -#endif - -#ifndef GL_AMD_blend_minmax_factor -#define GL_FACTOR_MIN_AMD 0x901C -#define GL_FACTOR_MAX_AMD 0x901D -#endif - -#ifndef GL_AMD_sample_positions -#define GL_SUBSAMPLE_DISTANCE_AMD 0x883F -#endif - -#ifndef GL_EXT_x11_sync_object -#define GL_SYNC_X11_FENCE_EXT 0x90E1 -#endif - -#ifndef GL_AMD_multi_draw_indirect -#endif - -#ifndef GL_EXT_framebuffer_multisample_blit_scaled -#define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA -#define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB -#endif - - -/*************************************************************/ - -#include -#ifndef GL_VERSION_2_0 -/* GL type for program/shader text */ -typedef char GLchar; -#endif - -#ifndef GL_VERSION_1_5 -/* GL types for handling large vertex buffer objects */ -typedef ptrdiff_t GLintptr; -typedef ptrdiff_t GLsizeiptr; -#endif - -#ifndef GL_ARB_vertex_buffer_object -/* GL types for handling large vertex buffer objects */ -typedef ptrdiff_t GLintptrARB; -typedef ptrdiff_t GLsizeiptrARB; -#endif - -#ifndef GL_ARB_shader_objects -/* GL types for program/shader text and shader object handles */ -typedef char GLcharARB; -typedef unsigned int GLhandleARB; -#endif - -/* GL type for "half" precision (s10e5) float data in host memory */ -#ifndef GL_ARB_half_float_pixel -typedef unsigned short GLhalfARB; -#endif - -#ifndef GL_NV_half_float -typedef unsigned short GLhalfNV; -#endif - -#ifndef GLEXT_64_TYPES_DEFINED -/* This code block is duplicated in glxext.h, so must be protected */ -#define GLEXT_64_TYPES_DEFINED -/* Define int32_t, int64_t, and uint64_t types for UST/MSC */ -/* (as used in the GL_EXT_timer_query extension). */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -#include -#elif defined(__sun__) || defined(__digital__) -#include -#if defined(__STDC__) -#if defined(__arch64__) || defined(_LP64) -typedef long int int64_t; -typedef unsigned long int uint64_t; -#else -typedef long long int int64_t; -typedef unsigned long long int uint64_t; -#endif /* __arch64__ */ -#endif /* __STDC__ */ -#elif defined( __VMS ) || defined(__sgi) -#include -#elif defined(__SCO__) || defined(__USLC__) -#include -#elif defined(__UNIXOS2__) || defined(__SOL64__) -typedef long int int32_t; -typedef long long int int64_t; -typedef unsigned long long int uint64_t; -#elif defined(_WIN32) && defined(__GNUC__) -#include -#elif defined(_WIN32) -typedef __int32 int32_t; -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; -#else -/* Fallback if nothing above works */ -#include -#endif -#endif - -#ifndef GL_EXT_timer_query -typedef int64_t GLint64EXT; -typedef uint64_t GLuint64EXT; -#endif - -#ifndef GL_ARB_sync -typedef int64_t GLint64; -typedef uint64_t GLuint64; -typedef struct __GLsync *GLsync; -#endif - -#ifndef GL_ARB_cl_event -/* These incomplete types let us declare types compatible with OpenCL's cl_context and cl_event */ -struct _cl_context; -struct _cl_event; -#endif - -#ifndef GL_ARB_debug_output -typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); -#endif - -#ifndef GL_AMD_debug_output -typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); -#endif - -#ifndef GL_NV_vdpau_interop -typedef GLintptr GLvdpauSurfaceNV; -#endif - -#ifndef GL_VERSION_1_2 -#define GL_VERSION_1_2 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -GLAPI void APIENTRY glBlendEquation (GLenum mode); -GLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -GLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -#endif - -#ifndef GL_VERSION_1_2_DEPRECATED -#define GL_VERSION_1_2_DEPRECATED 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -GLAPI void APIENTRY glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glGetColorTable (GLenum target, GLenum format, GLenum type, GLvoid *table); -GLAPI void APIENTRY glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -GLAPI void APIENTRY glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -GLAPI void APIENTRY glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -GLAPI void APIENTRY glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params); -GLAPI void APIENTRY glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glConvolutionParameteri (GLenum target, GLenum pname, GLint params); -GLAPI void APIENTRY glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, GLvoid *image); -GLAPI void APIENTRY glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetSeparableFilter (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -GLAPI void APIENTRY glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); -GLAPI void APIENTRY glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -GLAPI void APIENTRY glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -GLAPI void APIENTRY glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -GLAPI void APIENTRY glMinmax (GLenum target, GLenum internalformat, GLboolean sink); -GLAPI void APIENTRY glResetHistogram (GLenum target); -GLAPI void APIENTRY glResetMinmax (GLenum target); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target); -typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target); -#endif - -#ifndef GL_VERSION_1_3 -#define GL_VERSION_1_3 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glActiveTexture (GLenum texture); -GLAPI void APIENTRY glSampleCoverage (GLclampf value, GLboolean invert); -GLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, GLvoid *img); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img); -#endif - -#ifndef GL_VERSION_1_3_DEPRECATED -#define GL_VERSION_1_3_DEPRECATED 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glClientActiveTexture (GLenum texture); -GLAPI void APIENTRY glMultiTexCoord1d (GLenum target, GLdouble s); -GLAPI void APIENTRY glMultiTexCoord1dv (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord1f (GLenum target, GLfloat s); -GLAPI void APIENTRY glMultiTexCoord1fv (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord1i (GLenum target, GLint s); -GLAPI void APIENTRY glMultiTexCoord1iv (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord1s (GLenum target, GLshort s); -GLAPI void APIENTRY glMultiTexCoord1sv (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t); -GLAPI void APIENTRY glMultiTexCoord2dv (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t); -GLAPI void APIENTRY glMultiTexCoord2fv (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord2i (GLenum target, GLint s, GLint t); -GLAPI void APIENTRY glMultiTexCoord2iv (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord2s (GLenum target, GLshort s, GLshort t); -GLAPI void APIENTRY glMultiTexCoord2sv (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r); -GLAPI void APIENTRY glMultiTexCoord3dv (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r); -GLAPI void APIENTRY glMultiTexCoord3fv (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r); -GLAPI void APIENTRY glMultiTexCoord3iv (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r); -GLAPI void APIENTRY glMultiTexCoord3sv (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -GLAPI void APIENTRY glMultiTexCoord4dv (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -GLAPI void APIENTRY glMultiTexCoord4fv (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q); -GLAPI void APIENTRY glMultiTexCoord4iv (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -GLAPI void APIENTRY glMultiTexCoord4sv (GLenum target, const GLshort *v); -GLAPI void APIENTRY glLoadTransposeMatrixf (const GLfloat *m); -GLAPI void APIENTRY glLoadTransposeMatrixd (const GLdouble *m); -GLAPI void APIENTRY glMultTransposeMatrixf (const GLfloat *m); -GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *m); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); -#endif - -#ifndef GL_VERSION_1_4 -#define GL_VERSION_1_4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); -GLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param); -GLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param); -GLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params); -#endif - -#ifndef GL_VERSION_1_4_DEPRECATED -#define GL_VERSION_1_4_DEPRECATED 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFogCoordf (GLfloat coord); -GLAPI void APIENTRY glFogCoordfv (const GLfloat *coord); -GLAPI void APIENTRY glFogCoordd (GLdouble coord); -GLAPI void APIENTRY glFogCoorddv (const GLdouble *coord); -GLAPI void APIENTRY glFogCoordPointer (GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue); -GLAPI void APIENTRY glSecondaryColor3bv (const GLbyte *v); -GLAPI void APIENTRY glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue); -GLAPI void APIENTRY glSecondaryColor3dv (const GLdouble *v); -GLAPI void APIENTRY glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue); -GLAPI void APIENTRY glSecondaryColor3fv (const GLfloat *v); -GLAPI void APIENTRY glSecondaryColor3i (GLint red, GLint green, GLint blue); -GLAPI void APIENTRY glSecondaryColor3iv (const GLint *v); -GLAPI void APIENTRY glSecondaryColor3s (GLshort red, GLshort green, GLshort blue); -GLAPI void APIENTRY glSecondaryColor3sv (const GLshort *v); -GLAPI void APIENTRY glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue); -GLAPI void APIENTRY glSecondaryColor3ubv (const GLubyte *v); -GLAPI void APIENTRY glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue); -GLAPI void APIENTRY glSecondaryColor3uiv (const GLuint *v); -GLAPI void APIENTRY glSecondaryColor3us (GLushort red, GLushort green, GLushort blue); -GLAPI void APIENTRY glSecondaryColor3usv (const GLushort *v); -GLAPI void APIENTRY glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glWindowPos2d (GLdouble x, GLdouble y); -GLAPI void APIENTRY glWindowPos2dv (const GLdouble *v); -GLAPI void APIENTRY glWindowPos2f (GLfloat x, GLfloat y); -GLAPI void APIENTRY glWindowPos2fv (const GLfloat *v); -GLAPI void APIENTRY glWindowPos2i (GLint x, GLint y); -GLAPI void APIENTRY glWindowPos2iv (const GLint *v); -GLAPI void APIENTRY glWindowPos2s (GLshort x, GLshort y); -GLAPI void APIENTRY glWindowPos2sv (const GLshort *v); -GLAPI void APIENTRY glWindowPos3d (GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glWindowPos3dv (const GLdouble *v); -GLAPI void APIENTRY glWindowPos3f (GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glWindowPos3fv (const GLfloat *v); -GLAPI void APIENTRY glWindowPos3i (GLint x, GLint y, GLint z); -GLAPI void APIENTRY glWindowPos3iv (const GLint *v); -GLAPI void APIENTRY glWindowPos3s (GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glWindowPos3sv (const GLshort *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord); -typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat *coord); -typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord); -typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble *coord); -typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); -typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort *v); -#endif - -#ifndef GL_VERSION_1_5 -#define GL_VERSION_1_5 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids); -GLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); -GLAPI GLboolean APIENTRY glIsQuery (GLuint id); -GLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id); -GLAPI void APIENTRY glEndQuery (GLenum target); -GLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); -GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer); -GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); -GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); -GLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer); -GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); -GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); -GLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); -GLAPI GLvoid* APIENTRY glMapBuffer (GLenum target, GLenum access); -GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target); -GLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, GLvoid* *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); -typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); -typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); -typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); -typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); -typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); -typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params); -#endif - -#ifndef GL_VERSION_2_0 -#define GL_VERSION_2_0 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); -GLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); -GLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -GLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); -GLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); -GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader); -GLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); -GLAPI void APIENTRY glCompileShader (GLuint shader); -GLAPI GLuint APIENTRY glCreateProgram (void); -GLAPI GLuint APIENTRY glCreateShader (GLenum type); -GLAPI void APIENTRY glDeleteProgram (GLuint program); -GLAPI void APIENTRY glDeleteShader (GLuint shader); -GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader); -GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index); -GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index); -GLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); -GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); -GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); -GLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); -GLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); -GLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid* *pointer); -GLAPI GLboolean APIENTRY glIsProgram (GLuint program); -GLAPI GLboolean APIENTRY glIsShader (GLuint shader); -GLAPI void APIENTRY glLinkProgram (GLuint program); -GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length); -GLAPI void APIENTRY glUseProgram (GLuint program); -GLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0); -GLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY glUniform1i (GLint location, GLint v0); -GLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glValidateProgram (GLuint program); -GLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); -GLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x); -GLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); -GLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y); -GLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); -typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); -typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); -typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); -typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); -typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); -typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void); -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); -typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); -typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); -typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); -typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); -typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); -typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); -typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader); -typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length); -typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); -typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_VERSION_2_1 -#define GL_VERSION_2_1 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -#endif - -#ifndef GL_VERSION_3_0 -#define GL_VERSION_3_0 1 -/* OpenGL 3.0 also reuses entry points from these extensions: */ -/* ARB_framebuffer_object */ -/* ARB_map_buffer_range */ -/* ARB_vertex_array_object */ -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -GLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data); -GLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); -GLAPI void APIENTRY glEnablei (GLenum target, GLuint index); -GLAPI void APIENTRY glDisablei (GLenum target, GLuint index); -GLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index); -GLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode); -GLAPI void APIENTRY glEndTransformFeedback (void); -GLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); -GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); -GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp); -GLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode); -GLAPI void APIENTRY glEndConditionalRender (void); -GLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); -GLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x); -GLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y); -GLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z); -GLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x); -GLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y); -GLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z); -GLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v); -GLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); -GLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name); -GLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); -GLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0); -GLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); -GLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); -GLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); -GLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); -GLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -GLAPI const GLubyte * APIENTRY glGetStringi (GLenum name, GLuint index); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); -typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); -typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index); -typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); -typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); -typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp); -typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode); -typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void); -typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); -typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); -typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); -typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); -typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); -typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); -typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); -#endif - -#ifndef GL_VERSION_3_1 -#define GL_VERSION_3_1 1 -/* OpenGL 3.1 also reuses entry points from these extensions: */ -/* ARB_copy_buffer */ -/* ARB_uniform_buffer_object */ -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -GLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -GLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer); -GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -typedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer); -typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index); -#endif - -#ifndef GL_VERSION_3_2 -#define GL_VERSION_3_2 1 -/* OpenGL 3.2 also reuses entry points from these extensions: */ -/* ARB_draw_elements_base_vertex */ -/* ARB_provoking_vertex */ -/* ARB_sync */ -/* ARB_texture_multisample */ -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); -GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); -GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); -#endif - -#ifndef GL_VERSION_3_3 -#define GL_VERSION_3_3 1 -/* OpenGL 3.3 also reuses entry points from these extensions: */ -/* ARB_blend_func_extended */ -/* ARB_sampler_objects */ -/* ARB_explicit_attrib_location, but it has none */ -/* ARB_occlusion_query2 (no entry points) */ -/* ARB_shader_bit_encoding (no entry points) */ -/* ARB_texture_rgb10_a2ui (no entry points) */ -/* ARB_texture_swizzle (no entry points) */ -/* ARB_timer_query */ -/* ARB_vertex_type_2_10_10_10_rev */ -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); -#endif - -#ifndef GL_VERSION_4_0 -#define GL_VERSION_4_0 1 -/* OpenGL 4.0 also reuses entry points from these extensions: */ -/* ARB_texture_query_lod (no entry points) */ -/* ARB_draw_indirect */ -/* ARB_gpu_shader5 (no entry points) */ -/* ARB_gpu_shader_fp64 */ -/* ARB_shader_subroutine */ -/* ARB_tessellation_shader */ -/* ARB_texture_buffer_object_rgb32 (no entry points) */ -/* ARB_texture_cube_map_array (no entry points) */ -/* ARB_texture_gather (no entry points) */ -/* ARB_transform_feedback2 */ -/* ARB_transform_feedback3 */ -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMinSampleShading (GLclampf value); -GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode); -GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst); -GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLclampf value); -typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode); -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst); -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -#endif - -#ifndef GL_VERSION_4_1 -#define GL_VERSION_4_1 1 -/* OpenGL 4.1 reuses entry points from these extensions: */ -/* ARB_ES2_compatibility */ -/* ARB_get_program_binary */ -/* ARB_separate_shader_objects */ -/* ARB_shader_precision (no entry points) */ -/* ARB_vertex_attrib_64bit */ -/* ARB_viewport_array */ -#endif - -#ifndef GL_VERSION_4_2 -#define GL_VERSION_4_2 1 -/* OpenGL 4.2 reuses entry points from these extensions: */ -/* ARB_base_instance */ -/* ARB_shading_language_420pack (no entry points) */ -/* ARB_transform_feedback_instanced */ -/* ARB_compressed_texture_pixel_storage (no entry points) */ -/* ARB_conservative_depth (no entry points) */ -/* ARB_internalformat_query */ -/* ARB_map_buffer_alignment (no entry points) */ -/* ARB_shader_atomic_counters */ -/* ARB_shader_image_load_store */ -/* ARB_shading_language_packing (no entry points) */ -/* ARB_texture_storage */ -#endif - -#ifndef GL_ARB_multitexture -#define GL_ARB_multitexture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glActiveTextureARB (GLenum texture); -GLAPI void APIENTRY glClientActiveTextureARB (GLenum texture); -GLAPI void APIENTRY glMultiTexCoord1dARB (GLenum target, GLdouble s); -GLAPI void APIENTRY glMultiTexCoord1dvARB (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord1fARB (GLenum target, GLfloat s); -GLAPI void APIENTRY glMultiTexCoord1fvARB (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord1iARB (GLenum target, GLint s); -GLAPI void APIENTRY glMultiTexCoord1ivARB (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord1sARB (GLenum target, GLshort s); -GLAPI void APIENTRY glMultiTexCoord1svARB (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t); -GLAPI void APIENTRY glMultiTexCoord2dvARB (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t); -GLAPI void APIENTRY glMultiTexCoord2fvARB (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord2iARB (GLenum target, GLint s, GLint t); -GLAPI void APIENTRY glMultiTexCoord2ivARB (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t); -GLAPI void APIENTRY glMultiTexCoord2svARB (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r); -GLAPI void APIENTRY glMultiTexCoord3dvARB (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r); -GLAPI void APIENTRY glMultiTexCoord3fvARB (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r); -GLAPI void APIENTRY glMultiTexCoord3ivARB (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r); -GLAPI void APIENTRY glMultiTexCoord3svARB (GLenum target, const GLshort *v); -GLAPI void APIENTRY glMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -GLAPI void APIENTRY glMultiTexCoord4dvARB (GLenum target, const GLdouble *v); -GLAPI void APIENTRY glMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -GLAPI void APIENTRY glMultiTexCoord4fvARB (GLenum target, const GLfloat *v); -GLAPI void APIENTRY glMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q); -GLAPI void APIENTRY glMultiTexCoord4ivARB (GLenum target, const GLint *v); -GLAPI void APIENTRY glMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -GLAPI void APIENTRY glMultiTexCoord4svARB (GLenum target, const GLshort *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); -#endif - -#ifndef GL_ARB_transpose_matrix -#define GL_ARB_transpose_matrix 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glLoadTransposeMatrixfARB (const GLfloat *m); -GLAPI void APIENTRY glLoadTransposeMatrixdARB (const GLdouble *m); -GLAPI void APIENTRY glMultTransposeMatrixfARB (const GLfloat *m); -GLAPI void APIENTRY glMultTransposeMatrixdARB (const GLdouble *m); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); -typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); -#endif - -#ifndef GL_ARB_multisample -#define GL_ARB_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSampleCoverageARB (GLclampf value, GLboolean invert); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert); -#endif - -#ifndef GL_ARB_texture_env_add -#define GL_ARB_texture_env_add 1 -#endif - -#ifndef GL_ARB_texture_cube_map -#define GL_ARB_texture_cube_map 1 -#endif - -#ifndef GL_ARB_texture_compression -#define GL_ARB_texture_compression 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, GLvoid *img); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img); -#endif - -#ifndef GL_ARB_texture_border_clamp -#define GL_ARB_texture_border_clamp 1 -#endif - -#ifndef GL_ARB_point_parameters -#define GL_ARB_point_parameters 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameterfARB (GLenum pname, GLfloat param); -GLAPI void APIENTRY glPointParameterfvARB (GLenum pname, const GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params); -#endif - -#ifndef GL_ARB_vertex_blend -#define GL_ARB_vertex_blend 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glWeightbvARB (GLint size, const GLbyte *weights); -GLAPI void APIENTRY glWeightsvARB (GLint size, const GLshort *weights); -GLAPI void APIENTRY glWeightivARB (GLint size, const GLint *weights); -GLAPI void APIENTRY glWeightfvARB (GLint size, const GLfloat *weights); -GLAPI void APIENTRY glWeightdvARB (GLint size, const GLdouble *weights); -GLAPI void APIENTRY glWeightubvARB (GLint size, const GLubyte *weights); -GLAPI void APIENTRY glWeightusvARB (GLint size, const GLushort *weights); -GLAPI void APIENTRY glWeightuivARB (GLint size, const GLuint *weights); -GLAPI void APIENTRY glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glVertexBlendARB (GLint count); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights); -typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights); -typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights); -typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights); -typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights); -typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights); -typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights); -typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights); -typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count); -#endif - -#ifndef GL_ARB_matrix_palette -#define GL_ARB_matrix_palette 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCurrentPaletteMatrixARB (GLint index); -GLAPI void APIENTRY glMatrixIndexubvARB (GLint size, const GLubyte *indices); -GLAPI void APIENTRY glMatrixIndexusvARB (GLint size, const GLushort *indices); -GLAPI void APIENTRY glMatrixIndexuivARB (GLint size, const GLuint *indices); -GLAPI void APIENTRY glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); -typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices); -typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices); -typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices); -typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_ARB_texture_env_combine -#define GL_ARB_texture_env_combine 1 -#endif - -#ifndef GL_ARB_texture_env_crossbar -#define GL_ARB_texture_env_crossbar 1 -#endif - -#ifndef GL_ARB_texture_env_dot3 -#define GL_ARB_texture_env_dot3 1 -#endif - -#ifndef GL_ARB_texture_mirrored_repeat -#define GL_ARB_texture_mirrored_repeat 1 -#endif - -#ifndef GL_ARB_depth_texture -#define GL_ARB_depth_texture 1 -#endif - -#ifndef GL_ARB_shadow -#define GL_ARB_shadow 1 -#endif - -#ifndef GL_ARB_shadow_ambient -#define GL_ARB_shadow_ambient 1 -#endif - -#ifndef GL_ARB_window_pos -#define GL_ARB_window_pos 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glWindowPos2dARB (GLdouble x, GLdouble y); -GLAPI void APIENTRY glWindowPos2dvARB (const GLdouble *v); -GLAPI void APIENTRY glWindowPos2fARB (GLfloat x, GLfloat y); -GLAPI void APIENTRY glWindowPos2fvARB (const GLfloat *v); -GLAPI void APIENTRY glWindowPos2iARB (GLint x, GLint y); -GLAPI void APIENTRY glWindowPos2ivARB (const GLint *v); -GLAPI void APIENTRY glWindowPos2sARB (GLshort x, GLshort y); -GLAPI void APIENTRY glWindowPos2svARB (const GLshort *v); -GLAPI void APIENTRY glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glWindowPos3dvARB (const GLdouble *v); -GLAPI void APIENTRY glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glWindowPos3fvARB (const GLfloat *v); -GLAPI void APIENTRY glWindowPos3iARB (GLint x, GLint y, GLint z); -GLAPI void APIENTRY glWindowPos3ivARB (const GLint *v); -GLAPI void APIENTRY glWindowPos3sARB (GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glWindowPos3svARB (const GLshort *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); -typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v); -#endif - -#ifndef GL_ARB_vertex_program -#define GL_ARB_vertex_program 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttrib1dARB (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttrib1dvARB (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib1fARB (GLuint index, GLfloat x); -GLAPI void APIENTRY glVertexAttrib1fvARB (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib1sARB (GLuint index, GLshort x); -GLAPI void APIENTRY glVertexAttrib1svARB (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttrib2dvARB (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y); -GLAPI void APIENTRY glVertexAttrib2fvARB (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y); -GLAPI void APIENTRY glVertexAttrib2svARB (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttrib3dvARB (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glVertexAttrib3fvARB (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glVertexAttrib3svARB (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4NbvARB (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttrib4NivARB (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttrib4NsvARB (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -GLAPI void APIENTRY glVertexAttrib4NubvARB (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttrib4NuivARB (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttrib4NusvARB (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttrib4bvARB (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttrib4dvARB (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glVertexAttrib4fvARB (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib4ivARB (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glVertexAttrib4svARB (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4ubvARB (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttrib4uivARB (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttrib4usvARB (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glEnableVertexAttribArrayARB (GLuint index); -GLAPI void APIENTRY glDisableVertexAttribArrayARB (GLuint index); -GLAPI void APIENTRY glProgramStringARB (GLenum target, GLenum format, GLsizei len, const GLvoid *string); -GLAPI void APIENTRY glBindProgramARB (GLenum target, GLuint program); -GLAPI void APIENTRY glDeleteProgramsARB (GLsizei n, const GLuint *programs); -GLAPI void APIENTRY glGenProgramsARB (GLsizei n, GLuint *programs); -GLAPI void APIENTRY glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); -GLAPI void APIENTRY glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); -GLAPI void APIENTRY glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); -GLAPI void APIENTRY glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); -GLAPI void APIENTRY glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params); -GLAPI void APIENTRY glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params); -GLAPI void APIENTRY glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params); -GLAPI void APIENTRY glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params); -GLAPI void APIENTRY glGetProgramivARB (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetProgramStringARB (GLenum target, GLenum pname, GLvoid *string); -GLAPI void APIENTRY glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribPointervARB (GLuint index, GLenum pname, GLvoid* *pointer); -GLAPI GLboolean APIENTRY glIsProgramARB (GLuint program); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); -typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); -typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string); -typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); -typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); -typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); -typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program); -#endif - -#ifndef GL_ARB_fragment_program -#define GL_ARB_fragment_program 1 -/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */ -#endif - -#ifndef GL_ARB_vertex_buffer_object -#define GL_ARB_vertex_buffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindBufferARB (GLenum target, GLuint buffer); -GLAPI void APIENTRY glDeleteBuffersARB (GLsizei n, const GLuint *buffers); -GLAPI void APIENTRY glGenBuffersARB (GLsizei n, GLuint *buffers); -GLAPI GLboolean APIENTRY glIsBufferARB (GLuint buffer); -GLAPI void APIENTRY glBufferDataARB (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); -GLAPI void APIENTRY glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); -GLAPI void APIENTRY glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); -GLAPI GLvoid* APIENTRY glMapBufferARB (GLenum target, GLenum access); -GLAPI GLboolean APIENTRY glUnmapBufferARB (GLenum target); -GLAPI void APIENTRY glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetBufferPointervARB (GLenum target, GLenum pname, GLvoid* *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); -typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers); -typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers); -typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); -typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); -typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); -typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); -typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params); -#endif - -#ifndef GL_ARB_occlusion_query -#define GL_ARB_occlusion_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenQueriesARB (GLsizei n, GLuint *ids); -GLAPI void APIENTRY glDeleteQueriesARB (GLsizei n, const GLuint *ids); -GLAPI GLboolean APIENTRY glIsQueryARB (GLuint id); -GLAPI void APIENTRY glBeginQueryARB (GLenum target, GLuint id); -GLAPI void APIENTRY glEndQueryARB (GLenum target); -GLAPI void APIENTRY glGetQueryivARB (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target); -typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params); -#endif - -#ifndef GL_ARB_shader_objects -#define GL_ARB_shader_objects 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDeleteObjectARB (GLhandleARB obj); -GLAPI GLhandleARB APIENTRY glGetHandleARB (GLenum pname); -GLAPI void APIENTRY glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj); -GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum shaderType); -GLAPI void APIENTRY glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); -GLAPI void APIENTRY glCompileShaderARB (GLhandleARB shaderObj); -GLAPI GLhandleARB APIENTRY glCreateProgramObjectARB (void); -GLAPI void APIENTRY glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj); -GLAPI void APIENTRY glLinkProgramARB (GLhandleARB programObj); -GLAPI void APIENTRY glUseProgramObjectARB (GLhandleARB programObj); -GLAPI void APIENTRY glValidateProgramARB (GLhandleARB programObj); -GLAPI void APIENTRY glUniform1fARB (GLint location, GLfloat v0); -GLAPI void APIENTRY glUniform2fARB (GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY glUniform1iARB (GLint location, GLint v0); -GLAPI void APIENTRY glUniform2iARB (GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glUniform1ivARB (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform2ivARB (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform3ivARB (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniform4ivARB (GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); -GLAPI void APIENTRY glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); -GLAPI GLint APIENTRY glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name); -GLAPI void APIENTRY glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -GLAPI void APIENTRY glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params); -GLAPI void APIENTRY glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params); -GLAPI void APIENTRY glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj); -typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname); -typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj); -typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); -typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); -typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj); -typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (void); -typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj); -typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj); -typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj); -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj); -typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0); -typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); -typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); -typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params); -typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params); -typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); -#endif - -#ifndef GL_ARB_vertex_shader -#define GL_ARB_vertex_shader 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name); -GLAPI void APIENTRY glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -GLAPI GLint APIENTRY glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name); -typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); -#endif - -#ifndef GL_ARB_fragment_shader -#define GL_ARB_fragment_shader 1 -#endif - -#ifndef GL_ARB_shading_language_100 -#define GL_ARB_shading_language_100 1 -#endif - -#ifndef GL_ARB_texture_non_power_of_two -#define GL_ARB_texture_non_power_of_two 1 -#endif - -#ifndef GL_ARB_point_sprite -#define GL_ARB_point_sprite 1 -#endif - -#ifndef GL_ARB_fragment_program_shadow -#define GL_ARB_fragment_program_shadow 1 -#endif - -#ifndef GL_ARB_draw_buffers -#define GL_ARB_draw_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawBuffersARB (GLsizei n, const GLenum *bufs); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs); -#endif - -#ifndef GL_ARB_texture_rectangle -#define GL_ARB_texture_rectangle 1 -#endif - -#ifndef GL_ARB_color_buffer_float -#define GL_ARB_color_buffer_float 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glClampColorARB (GLenum target, GLenum clamp); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp); -#endif - -#ifndef GL_ARB_half_float_pixel -#define GL_ARB_half_float_pixel 1 -#endif - -#ifndef GL_ARB_texture_float -#define GL_ARB_texture_float 1 -#endif - -#ifndef GL_ARB_pixel_buffer_object -#define GL_ARB_pixel_buffer_object 1 -#endif - -#ifndef GL_ARB_depth_buffer_float -#define GL_ARB_depth_buffer_float 1 -#endif - -#ifndef GL_ARB_draw_instanced -#define GL_ARB_draw_instanced 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -GLAPI void APIENTRY glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -#endif - -#ifndef GL_ARB_framebuffer_object -#define GL_ARB_framebuffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer); -GLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); -GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); -GLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); -GLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); -GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer); -GLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); -GLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); -GLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); -GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target); -GLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); -GLAPI void APIENTRY glGenerateMipmap (GLenum target); -GLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); -typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); -typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); -typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); -typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); -typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); -typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); -typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -#endif - -#ifndef GL_ARB_framebuffer_sRGB -#define GL_ARB_framebuffer_sRGB 1 -#endif - -#ifndef GL_ARB_geometry_shader4 -#define GL_ARB_geometry_shader4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramParameteriARB (GLuint program, GLenum pname, GLint value); -GLAPI void APIENTRY glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); -#endif - -#ifndef GL_ARB_half_float_vertex -#define GL_ARB_half_float_vertex 1 -#endif - -#ifndef GL_ARB_instanced_arrays -#define GL_ARB_instanced_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribDivisorARB (GLuint index, GLuint divisor); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor); -#endif - -#ifndef GL_ARB_map_buffer_range -#define GL_ARB_map_buffer_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLvoid* APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -GLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); -#endif - -#ifndef GL_ARB_texture_buffer_object -#define GL_ARB_texture_buffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer); -#endif - -#ifndef GL_ARB_texture_compression_rgtc -#define GL_ARB_texture_compression_rgtc 1 -#endif - -#ifndef GL_ARB_texture_rg -#define GL_ARB_texture_rg 1 -#endif - -#ifndef GL_ARB_vertex_array_object -#define GL_ARB_vertex_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindVertexArray (GLuint array); -GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); -GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); -GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); -typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); -typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); -typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); -#endif - -#ifndef GL_ARB_uniform_buffer_object -#define GL_ARB_uniform_buffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar* *uniformNames, GLuint *uniformIndices); -GLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); -GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); -GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); -GLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar* *uniformNames, GLuint *uniformIndices); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); -typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); -typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); -#endif - -#ifndef GL_ARB_compatibility -#define GL_ARB_compatibility 1 -#endif - -#ifndef GL_ARB_copy_buffer -#define GL_ARB_copy_buffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -#endif - -#ifndef GL_ARB_shader_texture_lod -#define GL_ARB_shader_texture_lod 1 -#endif - -#ifndef GL_ARB_depth_clamp -#define GL_ARB_depth_clamp 1 -#endif - -#ifndef GL_ARB_draw_elements_base_vertex -#define GL_ARB_draw_elements_base_vertex 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); -GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); -GLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex); -GLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount, const GLint *basevertex); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount, const GLint *basevertex); -#endif - -#ifndef GL_ARB_fragment_coord_conventions -#define GL_ARB_fragment_coord_conventions 1 -#endif - -#ifndef GL_ARB_provoking_vertex -#define GL_ARB_provoking_vertex 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProvokingVertex (GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode); -#endif - -#ifndef GL_ARB_seamless_cube_map -#define GL_ARB_seamless_cube_map 1 -#endif - -#ifndef GL_ARB_sync -#define GL_ARB_sync 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags); -GLAPI GLboolean APIENTRY glIsSync (GLsync sync); -GLAPI void APIENTRY glDeleteSync (GLsync sync); -GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); -GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); -GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *params); -GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); -typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync); -typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); -typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); -typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *params); -typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -#endif - -#ifndef GL_ARB_texture_multisample -#define GL_ARB_texture_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); -GLAPI void APIENTRY glSampleMaski (GLuint index, GLbitfield mask); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); -typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); -typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint index, GLbitfield mask); -#endif - -#ifndef GL_ARB_vertex_array_bgra -#define GL_ARB_vertex_array_bgra 1 -#endif - -#ifndef GL_ARB_draw_buffers_blend -#define GL_ARB_draw_buffers_blend 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode); -GLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -GLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst); -GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode); -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -typedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst); -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -#endif - -#ifndef GL_ARB_sample_shading -#define GL_ARB_sample_shading 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMinSampleShadingARB (GLclampf value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLclampf value); -#endif - -#ifndef GL_ARB_texture_cube_map_array -#define GL_ARB_texture_cube_map_array 1 -#endif - -#ifndef GL_ARB_texture_gather -#define GL_ARB_texture_gather 1 -#endif - -#ifndef GL_ARB_texture_query_lod -#define GL_ARB_texture_query_lod 1 -#endif - -#ifndef GL_ARB_shading_language_include -#define GL_ARB_shading_language_include 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); -GLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name); -GLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length); -GLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name); -GLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); -GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); -typedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); -typedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length); -typedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); -typedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); -typedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params); -#endif - -#ifndef GL_ARB_texture_compression_bptc -#define GL_ARB_texture_compression_bptc 1 -#endif - -#ifndef GL_ARB_blend_func_extended -#define GL_ARB_blend_func_extended 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); -GLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name); -#endif - -#ifndef GL_ARB_explicit_attrib_location -#define GL_ARB_explicit_attrib_location 1 -#endif - -#ifndef GL_ARB_occlusion_query2 -#define GL_ARB_occlusion_query2 1 -#endif - -#ifndef GL_ARB_sampler_objects -#define GL_ARB_sampler_objects 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); -GLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); -GLAPI GLboolean APIENTRY glIsSampler (GLuint sampler); -GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler); -GLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); -GLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); -GLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); -GLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); -GLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param); -GLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param); -GLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); -typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); -typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler); -typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param); -typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params); -#endif - -#ifndef GL_ARB_shader_bit_encoding -#define GL_ARB_shader_bit_encoding 1 -#endif - -#ifndef GL_ARB_texture_rgb10_a2ui -#define GL_ARB_texture_rgb10_a2ui 1 -#endif - -#ifndef GL_ARB_texture_swizzle -#define GL_ARB_texture_swizzle 1 -#endif - -#ifndef GL_ARB_timer_query -#define GL_ARB_timer_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target); -GLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params); -GLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params); -#endif - -#ifndef GL_ARB_vertex_type_2_10_10_10_rev -#define GL_ARB_vertex_type_2_10_10_10_rev 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexP2ui (GLenum type, GLuint value); -GLAPI void APIENTRY glVertexP2uiv (GLenum type, const GLuint *value); -GLAPI void APIENTRY glVertexP3ui (GLenum type, GLuint value); -GLAPI void APIENTRY glVertexP3uiv (GLenum type, const GLuint *value); -GLAPI void APIENTRY glVertexP4ui (GLenum type, GLuint value); -GLAPI void APIENTRY glVertexP4uiv (GLenum type, const GLuint *value); -GLAPI void APIENTRY glTexCoordP1ui (GLenum type, GLuint coords); -GLAPI void APIENTRY glTexCoordP1uiv (GLenum type, const GLuint *coords); -GLAPI void APIENTRY glTexCoordP2ui (GLenum type, GLuint coords); -GLAPI void APIENTRY glTexCoordP2uiv (GLenum type, const GLuint *coords); -GLAPI void APIENTRY glTexCoordP3ui (GLenum type, GLuint coords); -GLAPI void APIENTRY glTexCoordP3uiv (GLenum type, const GLuint *coords); -GLAPI void APIENTRY glTexCoordP4ui (GLenum type, GLuint coords); -GLAPI void APIENTRY glTexCoordP4uiv (GLenum type, const GLuint *coords); -GLAPI void APIENTRY glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords); -GLAPI void APIENTRY glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords); -GLAPI void APIENTRY glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords); -GLAPI void APIENTRY glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords); -GLAPI void APIENTRY glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords); -GLAPI void APIENTRY glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords); -GLAPI void APIENTRY glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords); -GLAPI void APIENTRY glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords); -GLAPI void APIENTRY glNormalP3ui (GLenum type, GLuint coords); -GLAPI void APIENTRY glNormalP3uiv (GLenum type, const GLuint *coords); -GLAPI void APIENTRY glColorP3ui (GLenum type, GLuint color); -GLAPI void APIENTRY glColorP3uiv (GLenum type, const GLuint *color); -GLAPI void APIENTRY glColorP4ui (GLenum type, GLuint color); -GLAPI void APIENTRY glColorP4uiv (GLenum type, const GLuint *color); -GLAPI void APIENTRY glSecondaryColorP3ui (GLenum type, GLuint color); -GLAPI void APIENTRY glSecondaryColorP3uiv (GLenum type, const GLuint *color); -GLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value); -typedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords); -typedef void (APIENTRYP PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords); -typedef void (APIENTRYP PFNGLCOLORP3UIPROC) (GLenum type, GLuint color); -typedef void (APIENTRYP PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color); -typedef void (APIENTRYP PFNGLCOLORP4UIPROC) (GLenum type, GLuint color); -typedef void (APIENTRYP PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color); -typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color); -typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); -typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -#endif - -#ifndef GL_ARB_draw_indirect -#define GL_ARB_draw_indirect 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const GLvoid *indirect); -GLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const GLvoid *indirect); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const GLvoid *indirect); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const GLvoid *indirect); -#endif - -#ifndef GL_ARB_gpu_shader5 -#define GL_ARB_gpu_shader5 1 -#endif - -#ifndef GL_ARB_gpu_shader_fp64 -#define GL_ARB_gpu_shader_fp64 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUniform1d (GLint location, GLdouble x); -GLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y); -GLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x); -typedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params); -#endif - -#ifndef GL_ARB_shader_subroutine -#define GL_ARB_shader_subroutine 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name); -GLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name); -GLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); -GLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -GLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -GLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices); -GLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params); -GLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name); -typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); -typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices); -typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values); -#endif - -#ifndef GL_ARB_tessellation_shader -#define GL_ARB_tessellation_shader 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value); -GLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value); -typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values); -#endif - -#ifndef GL_ARB_texture_buffer_object_rgb32 -#define GL_ARB_texture_buffer_object_rgb32 1 -#endif - -#ifndef GL_ARB_transform_feedback2 -#define GL_ARB_transform_feedback2 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id); -GLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); -GLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); -GLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id); -GLAPI void APIENTRY glPauseTransformFeedback (void); -GLAPI void APIENTRY glResumeTransformFeedback (void); -GLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); -typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); -typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); -typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id); -#endif - -#ifndef GL_ARB_transform_feedback3 -#define GL_ARB_transform_feedback3 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream); -GLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id); -GLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index); -GLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream); -typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id); -typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); -#endif - -#ifndef GL_ARB_ES2_compatibility -#define GL_ARB_ES2_compatibility 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glReleaseShaderCompiler (void); -GLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length); -GLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -GLAPI void APIENTRY glDepthRangef (GLclampf n, GLclampf f); -GLAPI void APIENTRY glClearDepthf (GLclampf d); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); -typedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length); -typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLclampf n, GLclampf f); -typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLclampf d); -#endif - -#ifndef GL_ARB_get_program_binary -#define GL_ARB_get_program_binary 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); -GLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length); -GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); -typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); -#endif - -#ifndef GL_ARB_separate_shader_objects -#define GL_ARB_separate_shader_objects 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); -GLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program); -GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar* *strings); -GLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline); -GLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); -GLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines); -GLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline); -GLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); -GLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0); -GLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0); -GLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0); -GLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0); -GLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1); -GLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); -GLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); -GLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); -GLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline); -GLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program); -typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program); -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar* *strings); -typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines); -typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline); -typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -#endif - -#ifndef GL_ARB_vertex_attrib_64bit -#define GL_ARB_vertex_attrib_64bit 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params); -#endif - -#ifndef GL_ARB_viewport_array -#define GL_ARB_viewport_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); -GLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v); -GLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); -GLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v); -GLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLclampd *v); -GLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLclampd n, GLclampd f); -GLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data); -GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); -typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v); -typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLclampd *v); -typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLclampd n, GLclampd f); -typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data); -typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data); -#endif - -#ifndef GL_ARB_cl_event -#define GL_ARB_cl_event 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context * context, struct _cl_event * event, GLbitfield flags); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context * context, struct _cl_event * event, GLbitfield flags); -#endif - -#ifndef GL_ARB_debug_output -#define GL_ARB_debug_output 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const GLvoid *userParam); -GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); -typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const GLvoid *userParam); -typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); -#endif - -#ifndef GL_ARB_robustness -#define GL_ARB_robustness 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void); -GLAPI void APIENTRY glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); -GLAPI void APIENTRY glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); -GLAPI void APIENTRY glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v); -GLAPI void APIENTRY glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values); -GLAPI void APIENTRY glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values); -GLAPI void APIENTRY glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values); -GLAPI void APIENTRY glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern); -GLAPI void APIENTRY glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table); -GLAPI void APIENTRY glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image); -GLAPI void APIENTRY glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span); -GLAPI void APIENTRY glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); -GLAPI void APIENTRY glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); -GLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img); -GLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); -GLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img); -GLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -GLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params); -GLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params); -GLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void); -typedef void (APIENTRYP PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); -typedef void (APIENTRYP PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); -typedef void (APIENTRYP PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v); -typedef void (APIENTRYP PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values); -typedef void (APIENTRYP PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values); -typedef void (APIENTRYP PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values); -typedef void (APIENTRYP PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern); -typedef void (APIENTRYP PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table); -typedef void (APIENTRYP PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image); -typedef void (APIENTRYP PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span); -typedef void (APIENTRYP PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); -typedef void (APIENTRYP PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); -typedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img); -typedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); -typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img); -typedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); -typedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); -typedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); -typedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); -#endif - -#ifndef GL_ARB_shader_stencil_export -#define GL_ARB_shader_stencil_export 1 -#endif - -#ifndef GL_ARB_base_instance -#define GL_ARB_base_instance 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei primcount, GLuint baseinstance); -GLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLuint baseinstance); -GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLint basevertex, GLuint baseinstance); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount, GLuint baseinstance); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLuint baseinstance); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount, GLint basevertex, GLuint baseinstance); -#endif - -#ifndef GL_ARB_shading_language_420pack -#define GL_ARB_shading_language_420pack 1 -#endif - -#ifndef GL_ARB_transform_feedback_instanced -#define GL_ARB_transform_feedback_instanced 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei primcount); -GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei primcount); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei primcount); -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei primcount); -#endif - -#ifndef GL_ARB_compressed_texture_pixel_storage -#define GL_ARB_compressed_texture_pixel_storage 1 -#endif - -#ifndef GL_ARB_conservative_depth -#define GL_ARB_conservative_depth 1 -#endif - -#ifndef GL_ARB_internalformat_query -#define GL_ARB_internalformat_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); -#endif - -#ifndef GL_ARB_map_buffer_alignment -#define GL_ARB_map_buffer_alignment 1 -#endif - -#ifndef GL_ARB_shader_atomic_counters -#define GL_ARB_shader_atomic_counters 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params); -#endif - -#ifndef GL_ARB_shader_image_load_store -#define GL_ARB_shader_image_load_store 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); -GLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); -typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers); -#endif - -#ifndef GL_ARB_shading_language_packing -#define GL_ARB_shading_language_packing 1 -#endif - -#ifndef GL_ARB_texture_storage -#define GL_ARB_texture_storage 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -GLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -GLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); -#endif - -#ifndef GL_EXT_abgr -#define GL_EXT_abgr 1 -#endif - -#ifndef GL_EXT_blend_color -#define GL_EXT_blend_color 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendColorEXT (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -#endif - -#ifndef GL_EXT_polygon_offset -#define GL_EXT_polygon_offset 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPolygonOffsetEXT (GLfloat factor, GLfloat bias); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); -#endif - -#ifndef GL_EXT_texture -#define GL_EXT_texture 1 -#endif - -#ifndef GL_EXT_texture3D -#define GL_EXT_texture3D 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -#endif - -#ifndef GL_SGIS_texture_filter4 -#define GL_SGIS_texture_filter4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights); -GLAPI void APIENTRY glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights); -typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); -#endif - -#ifndef GL_EXT_subtexture -#define GL_EXT_subtexture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -#endif - -#ifndef GL_EXT_copy_texture -#define GL_EXT_copy_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -GLAPI void APIENTRY glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GLAPI void APIENTRY glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -#endif - -#ifndef GL_EXT_histogram -#define GL_EXT_histogram 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -GLAPI void APIENTRY glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -GLAPI void APIENTRY glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -GLAPI void APIENTRY glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink); -GLAPI void APIENTRY glResetHistogramEXT (GLenum target); -GLAPI void APIENTRY glResetMinmaxEXT (GLenum target); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); -typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); -typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target); -#endif - -#ifndef GL_EXT_convolution -#define GL_EXT_convolution 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -GLAPI void APIENTRY glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -GLAPI void APIENTRY glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params); -GLAPI void APIENTRY glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params); -GLAPI void APIENTRY glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *image); -GLAPI void APIENTRY glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -GLAPI void APIENTRY glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params); -typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); -#endif - -#ifndef GL_SGI_color_matrix -#define GL_SGI_color_matrix 1 -#endif - -#ifndef GL_SGI_color_table -#define GL_SGI_color_table 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -GLAPI void APIENTRY glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glGetColorTableSGI (GLenum target, GLenum format, GLenum type, GLvoid *table); -GLAPI void APIENTRY glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params); -#endif - -#ifndef GL_SGIX_pixel_texture -#define GL_SGIX_pixel_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelTexGenSGIX (GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); -#endif - -#ifndef GL_SGIS_pixel_texture -#define GL_SGIS_pixel_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelTexGenParameteriSGIS (GLenum pname, GLint param); -GLAPI void APIENTRY glPixelTexGenParameterivSGIS (GLenum pname, const GLint *params); -GLAPI void APIENTRY glPixelTexGenParameterfSGIS (GLenum pname, GLfloat param); -GLAPI void APIENTRY glPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params); -GLAPI void APIENTRY glGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); -#endif - -#ifndef GL_SGIS_texture4D -#define GL_SGIS_texture4D 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexImage4DSGIS (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTexSubImage4DSGIS (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); -#endif - -#ifndef GL_SGI_texture_color_table -#define GL_SGI_texture_color_table 1 -#endif - -#ifndef GL_EXT_cmyka -#define GL_EXT_cmyka 1 -#endif - -#ifndef GL_EXT_texture_object -#define GL_EXT_texture_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences); -GLAPI void APIENTRY glBindTextureEXT (GLenum target, GLuint texture); -GLAPI void APIENTRY glDeleteTexturesEXT (GLsizei n, const GLuint *textures); -GLAPI void APIENTRY glGenTexturesEXT (GLsizei n, GLuint *textures); -GLAPI GLboolean APIENTRY glIsTextureEXT (GLuint texture); -GLAPI void APIENTRY glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences); -typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); -typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures); -typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures); -typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture); -typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities); -#endif - -#ifndef GL_SGIS_detail_texture -#define GL_SGIS_detail_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); -GLAPI void APIENTRY glGetDetailTexFuncSGIS (GLenum target, GLfloat *points); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); -typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points); -#endif - -#ifndef GL_SGIS_sharpen_texture -#define GL_SGIS_sharpen_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); -GLAPI void APIENTRY glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); -typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points); -#endif - -#ifndef GL_EXT_packed_pixels -#define GL_EXT_packed_pixels 1 -#endif - -#ifndef GL_SGIS_texture_lod -#define GL_SGIS_texture_lod 1 -#endif - -#ifndef GL_SGIS_multisample -#define GL_SGIS_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSampleMaskSGIS (GLclampf value, GLboolean invert); -GLAPI void APIENTRY glSamplePatternSGIS (GLenum pattern); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); -#endif - -#ifndef GL_EXT_rescale_normal -#define GL_EXT_rescale_normal 1 -#endif - -#ifndef GL_EXT_vertex_array -#define GL_EXT_vertex_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glArrayElementEXT (GLint i); -GLAPI void APIENTRY glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -GLAPI void APIENTRY glDrawArraysEXT (GLenum mode, GLint first, GLsizei count); -GLAPI void APIENTRY glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer); -GLAPI void APIENTRY glGetPointervEXT (GLenum pname, GLvoid* *params); -GLAPI void APIENTRY glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -GLAPI void APIENTRY glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -GLAPI void APIENTRY glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -GLAPI void APIENTRY glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i); -typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer); -typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params); -typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -#endif - -#ifndef GL_EXT_misc_attribute -#define GL_EXT_misc_attribute 1 -#endif - -#ifndef GL_SGIS_generate_mipmap -#define GL_SGIS_generate_mipmap 1 -#endif - -#ifndef GL_SGIX_clipmap -#define GL_SGIX_clipmap 1 -#endif - -#ifndef GL_SGIX_shadow -#define GL_SGIX_shadow 1 -#endif - -#ifndef GL_SGIS_texture_edge_clamp -#define GL_SGIS_texture_edge_clamp 1 -#endif - -#ifndef GL_SGIS_texture_border_clamp -#define GL_SGIS_texture_border_clamp 1 -#endif - -#ifndef GL_EXT_blend_minmax -#define GL_EXT_blend_minmax 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationEXT (GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); -#endif - -#ifndef GL_EXT_blend_subtract -#define GL_EXT_blend_subtract 1 -#endif - -#ifndef GL_EXT_blend_logic_op -#define GL_EXT_blend_logic_op 1 -#endif - -#ifndef GL_SGIX_interlace -#define GL_SGIX_interlace 1 -#endif - -#ifndef GL_SGIX_pixel_tiles -#define GL_SGIX_pixel_tiles 1 -#endif - -#ifndef GL_SGIX_texture_select -#define GL_SGIX_texture_select 1 -#endif - -#ifndef GL_SGIX_sprite -#define GL_SGIX_sprite 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSpriteParameterfSGIX (GLenum pname, GLfloat param); -GLAPI void APIENTRY glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glSpriteParameteriSGIX (GLenum pname, GLint param); -GLAPI void APIENTRY glSpriteParameterivSGIX (GLenum pname, const GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params); -#endif - -#ifndef GL_SGIX_texture_multi_buffer -#define GL_SGIX_texture_multi_buffer 1 -#endif - -#ifndef GL_EXT_point_parameters -#define GL_EXT_point_parameters 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameterfEXT (GLenum pname, GLfloat param); -GLAPI void APIENTRY glPointParameterfvEXT (GLenum pname, const GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params); -#endif - -#ifndef GL_SGIS_point_parameters -#define GL_SGIS_point_parameters 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameterfSGIS (GLenum pname, GLfloat param); -GLAPI void APIENTRY glPointParameterfvSGIS (GLenum pname, const GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); -#endif - -#ifndef GL_SGIX_instruments -#define GL_SGIX_instruments 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLint APIENTRY glGetInstrumentsSGIX (void); -GLAPI void APIENTRY glInstrumentsBufferSGIX (GLsizei size, GLint *buffer); -GLAPI GLint APIENTRY glPollInstrumentsSGIX (GLint *marker_p); -GLAPI void APIENTRY glReadInstrumentsSGIX (GLint marker); -GLAPI void APIENTRY glStartInstrumentsSGIX (void); -GLAPI void APIENTRY glStopInstrumentsSGIX (GLint marker); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (void); -typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer); -typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p); -typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker); -typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (void); -typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker); -#endif - -#ifndef GL_SGIX_texture_scale_bias -#define GL_SGIX_texture_scale_bias 1 -#endif - -#ifndef GL_SGIX_framezoom -#define GL_SGIX_framezoom 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFrameZoomSGIX (GLint factor); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor); -#endif - -#ifndef GL_SGIX_tag_sample_buffer -#define GL_SGIX_tag_sample_buffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTagSampleBufferSGIX (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (void); -#endif - -#ifndef GL_SGIX_polynomial_ffd -#define GL_SGIX_polynomial_ffd 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDeformationMap3dSGIX (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); -GLAPI void APIENTRY glDeformationMap3fSGIX (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); -GLAPI void APIENTRY glDeformSGIX (GLbitfield mask); -GLAPI void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield mask); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); -typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); -typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask); -typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask); -#endif - -#ifndef GL_SGIX_reference_plane -#define GL_SGIX_reference_plane 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation); -#endif - -#ifndef GL_SGIX_flush_raster -#define GL_SGIX_flush_raster 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFlushRasterSGIX (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (void); -#endif - -#ifndef GL_SGIX_depth_texture -#define GL_SGIX_depth_texture 1 -#endif - -#ifndef GL_SGIS_fog_function -#define GL_SGIS_fog_function 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFogFuncSGIS (GLsizei n, const GLfloat *points); -GLAPI void APIENTRY glGetFogFuncSGIS (GLfloat *points); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points); -typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat *points); -#endif - -#ifndef GL_SGIX_fog_offset -#define GL_SGIX_fog_offset 1 -#endif - -#ifndef GL_HP_image_transform -#define GL_HP_image_transform 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params); -#endif - -#ifndef GL_HP_convolution_border_modes -#define GL_HP_convolution_border_modes 1 -#endif - -#ifndef GL_SGIX_texture_add_env -#define GL_SGIX_texture_add_env 1 -#endif - -#ifndef GL_EXT_color_subtable -#define GL_EXT_color_subtable 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -GLAPI void APIENTRY glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -#endif - -#ifndef GL_PGI_vertex_hints -#define GL_PGI_vertex_hints 1 -#endif - -#ifndef GL_PGI_misc_hints -#define GL_PGI_misc_hints 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glHintPGI (GLenum target, GLint mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode); -#endif - -#ifndef GL_EXT_paletted_texture -#define GL_EXT_paletted_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -GLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, GLvoid *data); -GLAPI void APIENTRY glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); -#endif - -#ifndef GL_EXT_clip_volume_hint -#define GL_EXT_clip_volume_hint 1 -#endif - -#ifndef GL_SGIX_list_priority -#define GL_SGIX_list_priority 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params); -GLAPI void APIENTRY glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param); -GLAPI void APIENTRY glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glListParameteriSGIX (GLuint list, GLenum pname, GLint param); -GLAPI void APIENTRY glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params); -#endif - -#ifndef GL_SGIX_ir_instrument1 -#define GL_SGIX_ir_instrument1 1 -#endif - -#ifndef GL_SGIX_calligraphic_fragment -#define GL_SGIX_calligraphic_fragment 1 -#endif - -#ifndef GL_SGIX_texture_lod_bias -#define GL_SGIX_texture_lod_bias 1 -#endif - -#ifndef GL_SGIX_shadow_ambient -#define GL_SGIX_shadow_ambient 1 -#endif - -#ifndef GL_EXT_index_texture -#define GL_EXT_index_texture 1 -#endif - -#ifndef GL_EXT_index_material -#define GL_EXT_index_material 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glIndexMaterialEXT (GLenum face, GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); -#endif - -#ifndef GL_EXT_index_func -#define GL_EXT_index_func 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glIndexFuncEXT (GLenum func, GLclampf ref); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref); -#endif - -#ifndef GL_EXT_index_array_formats -#define GL_EXT_index_array_formats 1 -#endif - -#ifndef GL_EXT_compiled_vertex_array -#define GL_EXT_compiled_vertex_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glLockArraysEXT (GLint first, GLsizei count); -GLAPI void APIENTRY glUnlockArraysEXT (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (void); -#endif - -#ifndef GL_EXT_cull_vertex -#define GL_EXT_cull_vertex 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCullParameterdvEXT (GLenum pname, GLdouble *params); -GLAPI void APIENTRY glCullParameterfvEXT (GLenum pname, GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params); -#endif - -#ifndef GL_SGIX_ycrcb -#define GL_SGIX_ycrcb 1 -#endif - -#ifndef GL_SGIX_fragment_lighting -#define GL_SGIX_fragment_lighting 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFragmentColorMaterialSGIX (GLenum face, GLenum mode); -GLAPI void APIENTRY glFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param); -GLAPI void APIENTRY glFragmentLightfvSGIX (GLenum light, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glFragmentLightiSGIX (GLenum light, GLenum pname, GLint param); -GLAPI void APIENTRY glFragmentLightivSGIX (GLenum light, GLenum pname, const GLint *params); -GLAPI void APIENTRY glFragmentLightModelfSGIX (GLenum pname, GLfloat param); -GLAPI void APIENTRY glFragmentLightModelfvSGIX (GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glFragmentLightModeliSGIX (GLenum pname, GLint param); -GLAPI void APIENTRY glFragmentLightModelivSGIX (GLenum pname, const GLint *params); -GLAPI void APIENTRY glFragmentMaterialfSGIX (GLenum face, GLenum pname, GLfloat param); -GLAPI void APIENTRY glFragmentMaterialfvSGIX (GLenum face, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glFragmentMaterialiSGIX (GLenum face, GLenum pname, GLint param); -GLAPI void APIENTRY glFragmentMaterialivSGIX (GLenum face, GLenum pname, const GLint *params); -GLAPI void APIENTRY glGetFragmentLightfvSGIX (GLenum light, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params); -GLAPI void APIENTRY glLightEnviSGIX (GLenum pname, GLint param); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param); -#endif - -#ifndef GL_IBM_rasterpos_clip -#define GL_IBM_rasterpos_clip 1 -#endif - -#ifndef GL_HP_texture_lighting -#define GL_HP_texture_lighting 1 -#endif - -#ifndef GL_EXT_draw_range_elements -#define GL_EXT_draw_range_elements 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -#endif - -#ifndef GL_WIN_phong_shading -#define GL_WIN_phong_shading 1 -#endif - -#ifndef GL_WIN_specular_fog -#define GL_WIN_specular_fog 1 -#endif - -#ifndef GL_EXT_light_texture -#define GL_EXT_light_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glApplyTextureEXT (GLenum mode); -GLAPI void APIENTRY glTextureLightEXT (GLenum pname); -GLAPI void APIENTRY glTextureMaterialEXT (GLenum face, GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); -typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); -#endif - -#ifndef GL_SGIX_blend_alpha_minmax -#define GL_SGIX_blend_alpha_minmax 1 -#endif - -#ifndef GL_EXT_bgra -#define GL_EXT_bgra 1 -#endif - -#ifndef GL_SGIX_async -#define GL_SGIX_async 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glAsyncMarkerSGIX (GLuint marker); -GLAPI GLint APIENTRY glFinishAsyncSGIX (GLuint *markerp); -GLAPI GLint APIENTRY glPollAsyncSGIX (GLuint *markerp); -GLAPI GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei range); -GLAPI void APIENTRY glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range); -GLAPI GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint marker); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker); -typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp); -typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp); -typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); -typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); -typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); -#endif - -#ifndef GL_SGIX_async_pixel -#define GL_SGIX_async_pixel 1 -#endif - -#ifndef GL_SGIX_async_histogram -#define GL_SGIX_async_histogram 1 -#endif - -#ifndef GL_INTEL_parallel_arrays -#define GL_INTEL_parallel_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); -GLAPI void APIENTRY glNormalPointervINTEL (GLenum type, const GLvoid* *pointer); -GLAPI void APIENTRY glColorPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); -GLAPI void APIENTRY glTexCoordPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); -typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer); -typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); -typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); -#endif - -#ifndef GL_HP_occlusion_test -#define GL_HP_occlusion_test 1 -#endif - -#ifndef GL_EXT_pixel_transform -#define GL_EXT_pixel_transform 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); -#endif - -#ifndef GL_EXT_pixel_transform_color_table -#define GL_EXT_pixel_transform_color_table 1 -#endif - -#ifndef GL_EXT_shared_texture_palette -#define GL_EXT_shared_texture_palette 1 -#endif - -#ifndef GL_EXT_separate_specular_color -#define GL_EXT_separate_specular_color 1 -#endif - -#ifndef GL_EXT_secondary_color -#define GL_EXT_secondary_color 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue); -GLAPI void APIENTRY glSecondaryColor3bvEXT (const GLbyte *v); -GLAPI void APIENTRY glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue); -GLAPI void APIENTRY glSecondaryColor3dvEXT (const GLdouble *v); -GLAPI void APIENTRY glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue); -GLAPI void APIENTRY glSecondaryColor3fvEXT (const GLfloat *v); -GLAPI void APIENTRY glSecondaryColor3iEXT (GLint red, GLint green, GLint blue); -GLAPI void APIENTRY glSecondaryColor3ivEXT (const GLint *v); -GLAPI void APIENTRY glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue); -GLAPI void APIENTRY glSecondaryColor3svEXT (const GLshort *v); -GLAPI void APIENTRY glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue); -GLAPI void APIENTRY glSecondaryColor3ubvEXT (const GLubyte *v); -GLAPI void APIENTRY glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue); -GLAPI void APIENTRY glSecondaryColor3uivEXT (const GLuint *v); -GLAPI void APIENTRY glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue); -GLAPI void APIENTRY glSecondaryColor3usvEXT (const GLushort *v); -GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); -typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_EXT_texture_perturb_normal -#define GL_EXT_texture_perturb_normal 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureNormalEXT (GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode); -#endif - -#ifndef GL_EXT_multi_draw_arrays -#define GL_EXT_multi_draw_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -GLAPI void APIENTRY glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); -#endif - -#ifndef GL_EXT_fog_coord -#define GL_EXT_fog_coord 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFogCoordfEXT (GLfloat coord); -GLAPI void APIENTRY glFogCoordfvEXT (const GLfloat *coord); -GLAPI void APIENTRY glFogCoorddEXT (GLdouble coord); -GLAPI void APIENTRY glFogCoorddvEXT (const GLdouble *coord); -GLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord); -typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord); -typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord); -typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord); -typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_REND_screen_coordinates -#define GL_REND_screen_coordinates 1 -#endif - -#ifndef GL_EXT_coordinate_frame -#define GL_EXT_coordinate_frame 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz); -GLAPI void APIENTRY glTangent3bvEXT (const GLbyte *v); -GLAPI void APIENTRY glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz); -GLAPI void APIENTRY glTangent3dvEXT (const GLdouble *v); -GLAPI void APIENTRY glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz); -GLAPI void APIENTRY glTangent3fvEXT (const GLfloat *v); -GLAPI void APIENTRY glTangent3iEXT (GLint tx, GLint ty, GLint tz); -GLAPI void APIENTRY glTangent3ivEXT (const GLint *v); -GLAPI void APIENTRY glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz); -GLAPI void APIENTRY glTangent3svEXT (const GLshort *v); -GLAPI void APIENTRY glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz); -GLAPI void APIENTRY glBinormal3bvEXT (const GLbyte *v); -GLAPI void APIENTRY glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz); -GLAPI void APIENTRY glBinormal3dvEXT (const GLdouble *v); -GLAPI void APIENTRY glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz); -GLAPI void APIENTRY glBinormal3fvEXT (const GLfloat *v); -GLAPI void APIENTRY glBinormal3iEXT (GLint bx, GLint by, GLint bz); -GLAPI void APIENTRY glBinormal3ivEXT (const GLint *v); -GLAPI void APIENTRY glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz); -GLAPI void APIENTRY glBinormal3svEXT (const GLshort *v); -GLAPI void APIENTRY glTangentPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glBinormalPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz); -typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz); -typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz); -typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz); -typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz); -typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz); -typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v); -typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz); -typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz); -typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz); -typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz); -typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_EXT_texture_env_combine -#define GL_EXT_texture_env_combine 1 -#endif - -#ifndef GL_APPLE_specular_vector -#define GL_APPLE_specular_vector 1 -#endif - -#ifndef GL_APPLE_transform_hint -#define GL_APPLE_transform_hint 1 -#endif - -#ifndef GL_SGIX_fog_scale -#define GL_SGIX_fog_scale 1 -#endif - -#ifndef GL_SUNX_constant_data -#define GL_SUNX_constant_data 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFinishTextureSUNX (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (void); -#endif - -#ifndef GL_SUN_global_alpha -#define GL_SUN_global_alpha 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGlobalAlphaFactorbSUN (GLbyte factor); -GLAPI void APIENTRY glGlobalAlphaFactorsSUN (GLshort factor); -GLAPI void APIENTRY glGlobalAlphaFactoriSUN (GLint factor); -GLAPI void APIENTRY glGlobalAlphaFactorfSUN (GLfloat factor); -GLAPI void APIENTRY glGlobalAlphaFactordSUN (GLdouble factor); -GLAPI void APIENTRY glGlobalAlphaFactorubSUN (GLubyte factor); -GLAPI void APIENTRY glGlobalAlphaFactorusSUN (GLushort factor); -GLAPI void APIENTRY glGlobalAlphaFactoruiSUN (GLuint factor); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); -typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); -#endif - -#ifndef GL_SUN_triangle_list -#define GL_SUN_triangle_list 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glReplacementCodeuiSUN (GLuint code); -GLAPI void APIENTRY glReplacementCodeusSUN (GLushort code); -GLAPI void APIENTRY glReplacementCodeubSUN (GLubyte code); -GLAPI void APIENTRY glReplacementCodeuivSUN (const GLuint *code); -GLAPI void APIENTRY glReplacementCodeusvSUN (const GLushort *code); -GLAPI void APIENTRY glReplacementCodeubvSUN (const GLubyte *code); -GLAPI void APIENTRY glReplacementCodePointerSUN (GLenum type, GLsizei stride, const GLvoid* *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer); -#endif - -#ifndef GL_SUN_vertex -#define GL_SUN_vertex 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); -GLAPI void APIENTRY glColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v); -GLAPI void APIENTRY glColor4ubVertex3fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glColor4ubVertex3fvSUN (const GLubyte *c, const GLfloat *v); -GLAPI void APIENTRY glColor3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glColor3fVertex3fvSUN (const GLfloat *c, const GLfloat *v); -GLAPI void APIENTRY glNormal3fVertex3fSUN (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glNormal3fVertex3fvSUN (const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glColor4fNormal3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glColor4fNormal3fVertex3fvSUN (const GLfloat *c, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glTexCoord2fVertex3fSUN (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glTexCoord2fVertex3fvSUN (const GLfloat *tc, const GLfloat *v); -GLAPI void APIENTRY glTexCoord4fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glTexCoord4fVertex4fvSUN (const GLfloat *tc, const GLfloat *v); -GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fSUN (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *tc, const GLubyte *c, const GLfloat *v); -GLAPI void APIENTRY glTexCoord2fColor3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glTexCoord2fColor3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *v); -GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiVertex3fSUN (GLuint rc, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiVertex3fvSUN (const GLuint *rc, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fSUN (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *rc, const GLubyte *c, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fSUN (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); -#endif - -#ifndef GL_EXT_blend_func_separate -#define GL_EXT_blend_func_separate 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -#endif - -#ifndef GL_INGR_blend_func_separate -#define GL_INGR_blend_func_separate 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -#endif - -#ifndef GL_INGR_color_clamp -#define GL_INGR_color_clamp 1 -#endif - -#ifndef GL_INGR_interlace_read -#define GL_INGR_interlace_read 1 -#endif - -#ifndef GL_EXT_stencil_wrap -#define GL_EXT_stencil_wrap 1 -#endif - -#ifndef GL_EXT_422_pixels -#define GL_EXT_422_pixels 1 -#endif - -#ifndef GL_NV_texgen_reflection -#define GL_NV_texgen_reflection 1 -#endif - -#ifndef GL_SUN_convolution_border_modes -#define GL_SUN_convolution_border_modes 1 -#endif - -#ifndef GL_EXT_texture_env_add -#define GL_EXT_texture_env_add 1 -#endif - -#ifndef GL_EXT_texture_lod_bias -#define GL_EXT_texture_lod_bias 1 -#endif - -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_EXT_texture_filter_anisotropic 1 -#endif - -#ifndef GL_EXT_vertex_weighting -#define GL_EXT_vertex_weighting 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexWeightfEXT (GLfloat weight); -GLAPI void APIENTRY glVertexWeightfvEXT (const GLfloat *weight); -GLAPI void APIENTRY glVertexWeightPointerEXT (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -#ifndef GL_NV_light_max_exponent -#define GL_NV_light_max_exponent 1 -#endif - -#ifndef GL_NV_vertex_array_range -#define GL_NV_vertex_array_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFlushVertexArrayRangeNV (void); -GLAPI void APIENTRY glVertexArrayRangeNV (GLsizei length, const GLvoid *pointer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); -typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer); -#endif - -#ifndef GL_NV_register_combiners -#define GL_NV_register_combiners 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCombinerParameterfvNV (GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glCombinerParameterfNV (GLenum pname, GLfloat param); -GLAPI void APIENTRY glCombinerParameterivNV (GLenum pname, const GLint *params); -GLAPI void APIENTRY glCombinerParameteriNV (GLenum pname, GLint param); -GLAPI void APIENTRY glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -GLAPI void APIENTRY glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); -GLAPI void APIENTRY glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -GLAPI void APIENTRY glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); -typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params); -#endif - -#ifndef GL_NV_fog_distance -#define GL_NV_fog_distance 1 -#endif - -#ifndef GL_NV_texgen_emboss -#define GL_NV_texgen_emboss 1 -#endif - -#ifndef GL_NV_blend_square -#define GL_NV_blend_square 1 -#endif - -#ifndef GL_NV_texture_env_combine4 -#define GL_NV_texture_env_combine4 1 -#endif - -#ifndef GL_MESA_resize_buffers -#define GL_MESA_resize_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glResizeBuffersMESA (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void); -#endif - -#ifndef GL_MESA_window_pos -#define GL_MESA_window_pos 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glWindowPos2dMESA (GLdouble x, GLdouble y); -GLAPI void APIENTRY glWindowPos2dvMESA (const GLdouble *v); -GLAPI void APIENTRY glWindowPos2fMESA (GLfloat x, GLfloat y); -GLAPI void APIENTRY glWindowPos2fvMESA (const GLfloat *v); -GLAPI void APIENTRY glWindowPos2iMESA (GLint x, GLint y); -GLAPI void APIENTRY glWindowPos2ivMESA (const GLint *v); -GLAPI void APIENTRY glWindowPos2sMESA (GLshort x, GLshort y); -GLAPI void APIENTRY glWindowPos2svMESA (const GLshort *v); -GLAPI void APIENTRY glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glWindowPos3dvMESA (const GLdouble *v); -GLAPI void APIENTRY glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glWindowPos3fvMESA (const GLfloat *v); -GLAPI void APIENTRY glWindowPos3iMESA (GLint x, GLint y, GLint z); -GLAPI void APIENTRY glWindowPos3ivMESA (const GLint *v); -GLAPI void APIENTRY glWindowPos3sMESA (GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glWindowPos3svMESA (const GLshort *v); -GLAPI void APIENTRY glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glWindowPos4dvMESA (const GLdouble *v); -GLAPI void APIENTRY glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glWindowPos4fvMESA (const GLfloat *v); -GLAPI void APIENTRY glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glWindowPos4ivMESA (const GLint *v); -GLAPI void APIENTRY glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); -typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v); -typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v); -#endif - -#ifndef GL_IBM_cull_vertex -#define GL_IBM_cull_vertex 1 -#endif - -#ifndef GL_IBM_multimode_draw_arrays -#define GL_IBM_multimode_draw_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); -GLAPI void APIENTRY glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); -typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); -#endif - -#ifndef GL_IBM_vertex_array_lists -#define GL_IBM_vertex_array_lists 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -GLAPI void APIENTRY glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -GLAPI void APIENTRY glEdgeFlagPointerListIBM (GLint stride, const GLboolean* *pointer, GLint ptrstride); -GLAPI void APIENTRY glFogCoordPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -GLAPI void APIENTRY glIndexPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -GLAPI void APIENTRY glNormalPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -GLAPI void APIENTRY glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -GLAPI void APIENTRY glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); -#endif - -#ifndef GL_SGIX_subsample -#define GL_SGIX_subsample 1 -#endif - -#ifndef GL_SGIX_ycrcba -#define GL_SGIX_ycrcba 1 -#endif - -#ifndef GL_SGIX_ycrcb_subsample -#define GL_SGIX_ycrcb_subsample 1 -#endif - -#ifndef GL_SGIX_depth_pass_instrument -#define GL_SGIX_depth_pass_instrument 1 -#endif - -#ifndef GL_3DFX_texture_compression_FXT1 -#define GL_3DFX_texture_compression_FXT1 1 -#endif - -#ifndef GL_3DFX_multisample -#define GL_3DFX_multisample 1 -#endif - -#ifndef GL_3DFX_tbuffer -#define GL_3DFX_tbuffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTbufferMask3DFX (GLuint mask); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); -#endif - -#ifndef GL_EXT_multisample -#define GL_EXT_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSampleMaskEXT (GLclampf value, GLboolean invert); -GLAPI void APIENTRY glSamplePatternEXT (GLenum pattern); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); -typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); -#endif - -#ifndef GL_SGIX_vertex_preclip -#define GL_SGIX_vertex_preclip 1 -#endif - -#ifndef GL_SGIX_convolution_accuracy -#define GL_SGIX_convolution_accuracy 1 -#endif - -#ifndef GL_SGIX_resample -#define GL_SGIX_resample 1 -#endif - -#ifndef GL_SGIS_point_line_texgen -#define GL_SGIS_point_line_texgen 1 -#endif - -#ifndef GL_SGIS_texture_color_mask -#define GL_SGIS_texture_color_mask 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -#endif - -#ifndef GL_SGIX_igloo_interface -#define GL_SGIX_igloo_interface 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glIglooInterfaceSGIX (GLenum pname, const GLvoid *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params); -#endif - -#ifndef GL_EXT_texture_env_dot3 -#define GL_EXT_texture_env_dot3 1 -#endif - -#ifndef GL_ATI_texture_mirror_once -#define GL_ATI_texture_mirror_once 1 -#endif - -#ifndef GL_NV_fence -#define GL_NV_fence 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDeleteFencesNV (GLsizei n, const GLuint *fences); -GLAPI void APIENTRY glGenFencesNV (GLsizei n, GLuint *fences); -GLAPI GLboolean APIENTRY glIsFenceNV (GLuint fence); -GLAPI GLboolean APIENTRY glTestFenceNV (GLuint fence); -GLAPI void APIENTRY glGetFenceivNV (GLuint fence, GLenum pname, GLint *params); -GLAPI void APIENTRY glFinishFenceNV (GLuint fence); -GLAPI void APIENTRY glSetFenceNV (GLuint fence, GLenum condition); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); -typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); -typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); -typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); -typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); -#endif - -#ifndef GL_NV_evaluators -#define GL_NV_evaluators 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); -GLAPI void APIENTRY glMapParameterivNV (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); -GLAPI void APIENTRY glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glEvalMapsNV (GLenum target, GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); -typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); -typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); -#endif - -#ifndef GL_NV_packed_depth_stencil -#define GL_NV_packed_depth_stencil 1 -#endif - -#ifndef GL_NV_register_combiners2 -#define GL_NV_register_combiners2 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params); -#endif - -#ifndef GL_NV_texture_compression_vtc -#define GL_NV_texture_compression_vtc 1 -#endif - -#ifndef GL_NV_texture_rectangle -#define GL_NV_texture_rectangle 1 -#endif - -#ifndef GL_NV_texture_shader -#define GL_NV_texture_shader 1 -#endif - -#ifndef GL_NV_texture_shader2 -#define GL_NV_texture_shader2 1 -#endif - -#ifndef GL_NV_vertex_array_range2 -#define GL_NV_vertex_array_range2 1 -#endif - -#ifndef GL_NV_vertex_program -#define GL_NV_vertex_program 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences); -GLAPI void APIENTRY glBindProgramNV (GLenum target, GLuint id); -GLAPI void APIENTRY glDeleteProgramsNV (GLsizei n, const GLuint *programs); -GLAPI void APIENTRY glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params); -GLAPI void APIENTRY glGenProgramsNV (GLsizei n, GLuint *programs); -GLAPI void APIENTRY glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetProgramivNV (GLuint id, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program); -GLAPI void APIENTRY glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribPointervNV (GLuint index, GLenum pname, GLvoid* *pointer); -GLAPI GLboolean APIENTRY glIsProgramNV (GLuint id); -GLAPI void APIENTRY glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program); -GLAPI void APIENTRY glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v); -GLAPI void APIENTRY glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v); -GLAPI void APIENTRY glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glRequestResidentProgramsNV (GLsizei n, const GLuint *programs); -GLAPI void APIENTRY glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform); -GLAPI void APIENTRY glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glVertexAttrib1dNV (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttrib1dvNV (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib1fNV (GLuint index, GLfloat x); -GLAPI void APIENTRY glVertexAttrib1fvNV (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib1sNV (GLuint index, GLshort x); -GLAPI void APIENTRY glVertexAttrib1svNV (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttrib2dvNV (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y); -GLAPI void APIENTRY glVertexAttrib2fvNV (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y); -GLAPI void APIENTRY glVertexAttrib2svNV (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttrib3dvNV (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glVertexAttrib3fvNV (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glVertexAttrib3svNV (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttrib4dvNV (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glVertexAttrib4fvNV (GLuint index, const GLfloat *v); -GLAPI void APIENTRY glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glVertexAttrib4svNV (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -GLAPI void APIENTRY glVertexAttrib4ubvNV (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v); -GLAPI void APIENTRY glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v); -GLAPI void APIENTRY glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v); -GLAPI void APIENTRY glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v); -GLAPI void APIENTRY glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v); -GLAPI void APIENTRY glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences); -typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params); -typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); -typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); -typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); -typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); -typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); -typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v); -#endif - -#ifndef GL_SGIX_texture_coordinate_clamp -#define GL_SGIX_texture_coordinate_clamp 1 -#endif - -#ifndef GL_SGIX_scalebias_hint -#define GL_SGIX_scalebias_hint 1 -#endif - -#ifndef GL_OML_interlace -#define GL_OML_interlace 1 -#endif - -#ifndef GL_OML_subsample -#define GL_OML_subsample 1 -#endif - -#ifndef GL_OML_resample -#define GL_OML_resample 1 -#endif - -#ifndef GL_NV_copy_depth_to_color -#define GL_NV_copy_depth_to_color 1 -#endif - -#ifndef GL_ATI_envmap_bumpmap -#define GL_ATI_envmap_bumpmap 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexBumpParameterivATI (GLenum pname, const GLint *param); -GLAPI void APIENTRY glTexBumpParameterfvATI (GLenum pname, const GLfloat *param); -GLAPI void APIENTRY glGetTexBumpParameterivATI (GLenum pname, GLint *param); -GLAPI void APIENTRY glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param); -typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param); -typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); -typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); -#endif - -#ifndef GL_ATI_fragment_shader -#define GL_ATI_fragment_shader 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint APIENTRY glGenFragmentShadersATI (GLuint range); -GLAPI void APIENTRY glBindFragmentShaderATI (GLuint id); -GLAPI void APIENTRY glDeleteFragmentShaderATI (GLuint id); -GLAPI void APIENTRY glBeginFragmentShaderATI (void); -GLAPI void APIENTRY glEndFragmentShaderATI (void); -GLAPI void APIENTRY glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle); -GLAPI void APIENTRY glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle); -GLAPI void APIENTRY glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -GLAPI void APIENTRY glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -GLAPI void APIENTRY glColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -GLAPI void APIENTRY glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -GLAPI void APIENTRY glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -GLAPI void APIENTRY glAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -GLAPI void APIENTRY glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); -typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); -typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (void); -typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (void); -typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); -typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); -typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value); -#endif - -#ifndef GL_ATI_pn_triangles -#define GL_ATI_pn_triangles 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPNTrianglesiATI (GLenum pname, GLint param); -GLAPI void APIENTRY glPNTrianglesfATI (GLenum pname, GLfloat param); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); -#endif - -#ifndef GL_ATI_vertex_array_object -#define GL_ATI_vertex_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLuint APIENTRY glNewObjectBufferATI (GLsizei size, const GLvoid *pointer, GLenum usage); -GLAPI GLboolean APIENTRY glIsObjectBufferATI (GLuint buffer); -GLAPI void APIENTRY glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); -GLAPI void APIENTRY glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params); -GLAPI void APIENTRY glFreeObjectBufferATI (GLuint buffer); -GLAPI void APIENTRY glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -GLAPI void APIENTRY glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params); -GLAPI void APIENTRY glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -GLAPI void APIENTRY glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage); -typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); -typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params); -#endif - -#ifndef GL_EXT_vertex_shader -#define GL_EXT_vertex_shader 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginVertexShaderEXT (void); -GLAPI void APIENTRY glEndVertexShaderEXT (void); -GLAPI void APIENTRY glBindVertexShaderEXT (GLuint id); -GLAPI GLuint APIENTRY glGenVertexShadersEXT (GLuint range); -GLAPI void APIENTRY glDeleteVertexShaderEXT (GLuint id); -GLAPI void APIENTRY glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1); -GLAPI void APIENTRY glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2); -GLAPI void APIENTRY glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); -GLAPI void APIENTRY glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -GLAPI void APIENTRY glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -GLAPI void APIENTRY glInsertComponentEXT (GLuint res, GLuint src, GLuint num); -GLAPI void APIENTRY glExtractComponentEXT (GLuint res, GLuint src, GLuint num); -GLAPI GLuint APIENTRY glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); -GLAPI void APIENTRY glSetInvariantEXT (GLuint id, GLenum type, const GLvoid *addr); -GLAPI void APIENTRY glSetLocalConstantEXT (GLuint id, GLenum type, const GLvoid *addr); -GLAPI void APIENTRY glVariantbvEXT (GLuint id, const GLbyte *addr); -GLAPI void APIENTRY glVariantsvEXT (GLuint id, const GLshort *addr); -GLAPI void APIENTRY glVariantivEXT (GLuint id, const GLint *addr); -GLAPI void APIENTRY glVariantfvEXT (GLuint id, const GLfloat *addr); -GLAPI void APIENTRY glVariantdvEXT (GLuint id, const GLdouble *addr); -GLAPI void APIENTRY glVariantubvEXT (GLuint id, const GLubyte *addr); -GLAPI void APIENTRY glVariantusvEXT (GLuint id, const GLushort *addr); -GLAPI void APIENTRY glVariantuivEXT (GLuint id, const GLuint *addr); -GLAPI void APIENTRY glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); -GLAPI void APIENTRY glEnableVariantClientStateEXT (GLuint id); -GLAPI void APIENTRY glDisableVariantClientStateEXT (GLuint id); -GLAPI GLuint APIENTRY glBindLightParameterEXT (GLenum light, GLenum value); -GLAPI GLuint APIENTRY glBindMaterialParameterEXT (GLenum face, GLenum value); -GLAPI GLuint APIENTRY glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value); -GLAPI GLuint APIENTRY glBindTextureUnitParameterEXT (GLenum unit, GLenum value); -GLAPI GLuint APIENTRY glBindParameterEXT (GLenum value); -GLAPI GLboolean APIENTRY glIsVariantEnabledEXT (GLuint id, GLenum cap); -GLAPI void APIENTRY glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); -GLAPI void APIENTRY glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data); -GLAPI void APIENTRY glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); -GLAPI void APIENTRY glGetVariantPointervEXT (GLuint id, GLenum value, GLvoid* *data); -GLAPI void APIENTRY glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); -GLAPI void APIENTRY glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data); -GLAPI void APIENTRY glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); -GLAPI void APIENTRY glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); -GLAPI void APIENTRY glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data); -GLAPI void APIENTRY glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (void); -typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (void); -typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); -typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); -typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); -typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); -typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); -typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); -typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); -typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); -typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); -typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); -typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); -typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); -typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr); -typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr); -typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr); -typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr); -typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr); -typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr); -typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr); -typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr); -typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); -typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); -typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); -typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); -typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value); -typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); -typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); -typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data); -typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); -typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); -typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); -typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); -#endif - -#ifndef GL_ATI_vertex_streams -#define GL_ATI_vertex_streams 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexStream1sATI (GLenum stream, GLshort x); -GLAPI void APIENTRY glVertexStream1svATI (GLenum stream, const GLshort *coords); -GLAPI void APIENTRY glVertexStream1iATI (GLenum stream, GLint x); -GLAPI void APIENTRY glVertexStream1ivATI (GLenum stream, const GLint *coords); -GLAPI void APIENTRY glVertexStream1fATI (GLenum stream, GLfloat x); -GLAPI void APIENTRY glVertexStream1fvATI (GLenum stream, const GLfloat *coords); -GLAPI void APIENTRY glVertexStream1dATI (GLenum stream, GLdouble x); -GLAPI void APIENTRY glVertexStream1dvATI (GLenum stream, const GLdouble *coords); -GLAPI void APIENTRY glVertexStream2sATI (GLenum stream, GLshort x, GLshort y); -GLAPI void APIENTRY glVertexStream2svATI (GLenum stream, const GLshort *coords); -GLAPI void APIENTRY glVertexStream2iATI (GLenum stream, GLint x, GLint y); -GLAPI void APIENTRY glVertexStream2ivATI (GLenum stream, const GLint *coords); -GLAPI void APIENTRY glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y); -GLAPI void APIENTRY glVertexStream2fvATI (GLenum stream, const GLfloat *coords); -GLAPI void APIENTRY glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexStream2dvATI (GLenum stream, const GLdouble *coords); -GLAPI void APIENTRY glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY glVertexStream3svATI (GLenum stream, const GLshort *coords); -GLAPI void APIENTRY glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z); -GLAPI void APIENTRY glVertexStream3ivATI (GLenum stream, const GLint *coords); -GLAPI void APIENTRY glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glVertexStream3fvATI (GLenum stream, const GLfloat *coords); -GLAPI void APIENTRY glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexStream3dvATI (GLenum stream, const GLdouble *coords); -GLAPI void APIENTRY glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY glVertexStream4svATI (GLenum stream, const GLshort *coords); -GLAPI void APIENTRY glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glVertexStream4ivATI (GLenum stream, const GLint *coords); -GLAPI void APIENTRY glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glVertexStream4fvATI (GLenum stream, const GLfloat *coords); -GLAPI void APIENTRY glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexStream4dvATI (GLenum stream, const GLdouble *coords); -GLAPI void APIENTRY glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); -GLAPI void APIENTRY glNormalStream3bvATI (GLenum stream, const GLbyte *coords); -GLAPI void APIENTRY glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz); -GLAPI void APIENTRY glNormalStream3svATI (GLenum stream, const GLshort *coords); -GLAPI void APIENTRY glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz); -GLAPI void APIENTRY glNormalStream3ivATI (GLenum stream, const GLint *coords); -GLAPI void APIENTRY glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); -GLAPI void APIENTRY glNormalStream3fvATI (GLenum stream, const GLfloat *coords); -GLAPI void APIENTRY glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); -GLAPI void APIENTRY glNormalStream3dvATI (GLenum stream, const GLdouble *coords); -GLAPI void APIENTRY glClientActiveVertexStreamATI (GLenum stream); -GLAPI void APIENTRY glVertexBlendEnviATI (GLenum pname, GLint param); -GLAPI void APIENTRY glVertexBlendEnvfATI (GLenum pname, GLfloat param); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); -typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); -typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); -typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); -typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); -#endif - -#ifndef GL_ATI_element_array -#define GL_ATI_element_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glElementPointerATI (GLenum type, const GLvoid *pointer); -GLAPI void APIENTRY glDrawElementArrayATI (GLenum mode, GLsizei count); -GLAPI void APIENTRY glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); -#endif - -#ifndef GL_SUN_mesh_array -#define GL_SUN_mesh_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); -#endif - -#ifndef GL_SUN_slice_accum -#define GL_SUN_slice_accum 1 -#endif - -#ifndef GL_NV_multisample_filter_hint -#define GL_NV_multisample_filter_hint 1 -#endif - -#ifndef GL_NV_depth_clamp -#define GL_NV_depth_clamp 1 -#endif - -#ifndef GL_NV_occlusion_query -#define GL_NV_occlusion_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenOcclusionQueriesNV (GLsizei n, GLuint *ids); -GLAPI void APIENTRY glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids); -GLAPI GLboolean APIENTRY glIsOcclusionQueryNV (GLuint id); -GLAPI void APIENTRY glBeginOcclusionQueryNV (GLuint id); -GLAPI void APIENTRY glEndOcclusionQueryNV (void); -GLAPI void APIENTRY glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); -typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (void); -typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); -#endif - -#ifndef GL_NV_point_sprite -#define GL_NV_point_sprite 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPointParameteriNV (GLenum pname, GLint param); -GLAPI void APIENTRY glPointParameterivNV (GLenum pname, const GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params); -#endif - -#ifndef GL_NV_texture_shader3 -#define GL_NV_texture_shader3 1 -#endif - -#ifndef GL_NV_vertex_program1_1 -#define GL_NV_vertex_program1_1 1 -#endif - -#ifndef GL_EXT_shadow_funcs -#define GL_EXT_shadow_funcs 1 -#endif - -#ifndef GL_EXT_stencil_two_side -#define GL_EXT_stencil_two_side 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glActiveStencilFaceEXT (GLenum face); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); -#endif - -#ifndef GL_ATI_text_fragment_shader -#define GL_ATI_text_fragment_shader 1 -#endif - -#ifndef GL_APPLE_client_storage -#define GL_APPLE_client_storage 1 -#endif - -#ifndef GL_APPLE_element_array -#define GL_APPLE_element_array 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glElementPointerAPPLE (GLenum type, const GLvoid *pointer); -GLAPI void APIENTRY glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count); -GLAPI void APIENTRY glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); -GLAPI void APIENTRY glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -GLAPI void APIENTRY glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); -#endif - -#ifndef GL_APPLE_fence -#define GL_APPLE_fence 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenFencesAPPLE (GLsizei n, GLuint *fences); -GLAPI void APIENTRY glDeleteFencesAPPLE (GLsizei n, const GLuint *fences); -GLAPI void APIENTRY glSetFenceAPPLE (GLuint fence); -GLAPI GLboolean APIENTRY glIsFenceAPPLE (GLuint fence); -GLAPI GLboolean APIENTRY glTestFenceAPPLE (GLuint fence); -GLAPI void APIENTRY glFinishFenceAPPLE (GLuint fence); -GLAPI GLboolean APIENTRY glTestObjectAPPLE (GLenum object, GLuint name); -GLAPI void APIENTRY glFinishObjectAPPLE (GLenum object, GLint name); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences); -typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences); -typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence); -typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence); -typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name); -typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name); -#endif - -#ifndef GL_APPLE_vertex_array_object -#define GL_APPLE_vertex_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint array); -GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays); -GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays); -GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint array); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array); -typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays); -typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays); -typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array); -#endif - -#ifndef GL_APPLE_vertex_array_range -#define GL_APPLE_vertex_array_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer); -GLAPI void APIENTRY glFlushVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer); -GLAPI void APIENTRY glVertexArrayParameteriAPPLE (GLenum pname, GLint param); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); -typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); -typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param); -#endif - -#ifndef GL_APPLE_ycbcr_422 -#define GL_APPLE_ycbcr_422 1 -#endif - -#ifndef GL_S3_s3tc -#define GL_S3_s3tc 1 -#endif - -#ifndef GL_ATI_draw_buffers -#define GL_ATI_draw_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawBuffersATI (GLsizei n, const GLenum *bufs); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs); -#endif - -#ifndef GL_ATI_pixel_format_float -#define GL_ATI_pixel_format_float 1 -/* This is really a WGL extension, but defines some associated GL enums. - * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string. - */ -#endif - -#ifndef GL_ATI_texture_env_combine3 -#define GL_ATI_texture_env_combine3 1 -#endif - -#ifndef GL_ATI_texture_float -#define GL_ATI_texture_float 1 -#endif - -#ifndef GL_NV_float_buffer -#define GL_NV_float_buffer 1 -#endif - -#ifndef GL_NV_fragment_program -#define GL_NV_fragment_program 1 -/* Some NV_fragment_program entry points are shared with ARB_vertex_program. */ -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); -GLAPI void APIENTRY glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); -GLAPI void APIENTRY glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); -GLAPI void APIENTRY glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); -typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); -typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); -typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); -#endif - -#ifndef GL_NV_half_float -#define GL_NV_half_float 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertex2hNV (GLhalfNV x, GLhalfNV y); -GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z); -GLAPI void APIENTRY glVertex3hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -GLAPI void APIENTRY glVertex4hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); -GLAPI void APIENTRY glNormal3hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); -GLAPI void APIENTRY glColor3hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); -GLAPI void APIENTRY glColor4hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glTexCoord1hNV (GLhalfNV s); -GLAPI void APIENTRY glTexCoord1hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glTexCoord2hNV (GLhalfNV s, GLhalfNV t); -GLAPI void APIENTRY glTexCoord2hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r); -GLAPI void APIENTRY glTexCoord3hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -GLAPI void APIENTRY glTexCoord4hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glMultiTexCoord1hNV (GLenum target, GLhalfNV s); -GLAPI void APIENTRY glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v); -GLAPI void APIENTRY glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t); -GLAPI void APIENTRY glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v); -GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); -GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v); -GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v); -GLAPI void APIENTRY glFogCoordhNV (GLhalfNV fog); -GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *fog); -GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); -GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *v); -GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV weight); -GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *weight); -GLAPI void APIENTRY glVertexAttrib1hNV (GLuint index, GLhalfNV x); -GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y); -GLAPI void APIENTRY glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); -GLAPI void APIENTRY glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -GLAPI void APIENTRY glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v); -GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y); -typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z); -typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); -typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); -typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); -typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s); -typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t); -typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r); -typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s); -typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t); -typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); -typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); -typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog); -typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); -typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight); -typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x); -typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y); -typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); -typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); -typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); -#endif - -#ifndef GL_NV_pixel_data_range -#define GL_NV_pixel_data_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPixelDataRangeNV (GLenum target, GLsizei length, GLvoid *pointer); -GLAPI void APIENTRY glFlushPixelDataRangeNV (GLenum target); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer); -typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target); -#endif - -#ifndef GL_NV_primitive_restart -#define GL_NV_primitive_restart 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPrimitiveRestartNV (void); -GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint index); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (void); -typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index); -#endif - -#ifndef GL_NV_texture_expand_normal -#define GL_NV_texture_expand_normal 1 -#endif - -#ifndef GL_NV_vertex_program2 -#define GL_NV_vertex_program2 1 -#endif - -#ifndef GL_ATI_map_object_buffer -#define GL_ATI_map_object_buffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLvoid* APIENTRY glMapObjectBufferATI (GLuint buffer); -GLAPI void APIENTRY glUnmapObjectBufferATI (GLuint buffer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer); -#endif - -#ifndef GL_ATI_separate_stencil -#define GL_ATI_separate_stencil 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -GLAPI void APIENTRY glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); -typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); -#endif - -#ifndef GL_ATI_vertex_attrib_array_object -#define GL_ATI_vertex_attrib_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); -GLAPI void APIENTRY glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params); -#endif - -#ifndef GL_OES_read_format -#define GL_OES_read_format 1 -#endif - -#ifndef GL_EXT_depth_bounds_test -#define GL_EXT_depth_bounds_test 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDepthBoundsEXT (GLclampd zmin, GLclampd zmax); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax); -#endif - -#ifndef GL_EXT_texture_mirror_clamp -#define GL_EXT_texture_mirror_clamp 1 -#endif - -#ifndef GL_EXT_blend_equation_separate -#define GL_EXT_blend_equation_separate 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha); -#endif - -#ifndef GL_MESA_pack_invert -#define GL_MESA_pack_invert 1 -#endif - -#ifndef GL_MESA_ycbcr_texture -#define GL_MESA_ycbcr_texture 1 -#endif - -#ifndef GL_EXT_pixel_buffer_object -#define GL_EXT_pixel_buffer_object 1 -#endif - -#ifndef GL_NV_fragment_program_option -#define GL_NV_fragment_program_option 1 -#endif - -#ifndef GL_NV_fragment_program2 -#define GL_NV_fragment_program2 1 -#endif - -#ifndef GL_NV_vertex_program2_option -#define GL_NV_vertex_program2_option 1 -#endif - -#ifndef GL_NV_vertex_program3 -#define GL_NV_vertex_program3 1 -#endif - -#ifndef GL_EXT_framebuffer_object -#define GL_EXT_framebuffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint renderbuffer); -GLAPI void APIENTRY glBindRenderbufferEXT (GLenum target, GLuint renderbuffer); -GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers); -GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers); -GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint framebuffer); -GLAPI void APIENTRY glBindFramebufferEXT (GLenum target, GLuint framebuffer); -GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers); -GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers); -GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum target); -GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params); -GLAPI void APIENTRY glGenerateMipmapEXT (GLenum target); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer); -typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers); -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer); -typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer); -typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers); -typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers); -typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target); -#endif - -#ifndef GL_GREMEDY_string_marker -#define GL_GREMEDY_string_marker 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei len, const GLvoid *string); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string); -#endif - -#ifndef GL_EXT_packed_depth_stencil -#define GL_EXT_packed_depth_stencil 1 -#endif - -#ifndef GL_EXT_stencil_clear_tag -#define GL_EXT_stencil_clear_tag 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag); -#endif - -#ifndef GL_EXT_texture_sRGB -#define GL_EXT_texture_sRGB 1 -#endif - -#ifndef GL_EXT_framebuffer_blit -#define GL_EXT_framebuffer_blit 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif - -#ifndef GL_EXT_framebuffer_multisample -#define GL_EXT_framebuffer_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#endif - -#ifndef GL_MESAX_texture_stack -#define GL_MESAX_texture_stack 1 -#endif - -#ifndef GL_EXT_timer_query -#define GL_EXT_timer_query 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64EXT *params); -GLAPI void APIENTRY glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64EXT *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params); -typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params); -#endif - -#ifndef GL_EXT_gpu_program_parameters -#define GL_EXT_gpu_program_parameters 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); -GLAPI void APIENTRY glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); -#endif - -#ifndef GL_APPLE_flush_buffer_range -#define GL_APPLE_flush_buffer_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size); -#endif - -#ifndef GL_NV_gpu_program4 -#define GL_NV_gpu_program4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params); -GLAPI void APIENTRY glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); -GLAPI void APIENTRY glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); -GLAPI void APIENTRY glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); -GLAPI void APIENTRY glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params); -GLAPI void APIENTRY glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); -GLAPI void APIENTRY glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); -GLAPI void APIENTRY glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); -GLAPI void APIENTRY glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params); -GLAPI void APIENTRY glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params); -GLAPI void APIENTRY glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params); -GLAPI void APIENTRY glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); -typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); -typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); -#endif - -#ifndef GL_NV_geometry_program4 -#define GL_NV_geometry_program4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramVertexLimitNV (GLenum target, GLint limit); -GLAPI void APIENTRY glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level); -GLAPI void APIENTRY glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); -#endif - -#ifndef GL_EXT_geometry_shader4 -#define GL_EXT_geometry_shader4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); -#endif - -#ifndef GL_NV_vertex_program4 -#define GL_NV_vertex_program4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribI1iEXT (GLuint index, GLint x); -GLAPI void APIENTRY glVertexAttribI2iEXT (GLuint index, GLint x, GLint y); -GLAPI void APIENTRY glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z); -GLAPI void APIENTRY glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glVertexAttribI1uiEXT (GLuint index, GLuint x); -GLAPI void APIENTRY glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y); -GLAPI void APIENTRY glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z); -GLAPI void APIENTRY glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glVertexAttribI1ivEXT (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI2ivEXT (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI3ivEXT (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI4ivEXT (GLuint index, const GLint *v); -GLAPI void APIENTRY glVertexAttribI1uivEXT (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI2uivEXT (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI3uivEXT (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI4uivEXT (GLuint index, const GLuint *v); -GLAPI void APIENTRY glVertexAttribI4bvEXT (GLuint index, const GLbyte *v); -GLAPI void APIENTRY glVertexAttribI4svEXT (GLuint index, const GLshort *v); -GLAPI void APIENTRY glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v); -GLAPI void APIENTRY glVertexAttribI4usvEXT (GLuint index, const GLushort *v); -GLAPI void APIENTRY glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params); -#endif - -#ifndef GL_EXT_gpu_shader4 -#define GL_EXT_gpu_shader4 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetUniformuivEXT (GLuint program, GLint location, GLuint *params); -GLAPI void APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name); -GLAPI GLint APIENTRY glGetFragDataLocationEXT (GLuint program, const GLchar *name); -GLAPI void APIENTRY glUniform1uiEXT (GLint location, GLuint v0); -GLAPI void APIENTRY glUniform2uiEXT (GLint location, GLuint v0, GLuint v1); -GLAPI void APIENTRY glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI void APIENTRY glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI void APIENTRY glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params); -typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0); -typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1); -typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); -#endif - -#ifndef GL_EXT_draw_instanced -#define GL_EXT_draw_instanced 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount); -GLAPI void APIENTRY glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); -typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -#endif - -#ifndef GL_EXT_packed_float -#define GL_EXT_packed_float 1 -#endif - -#ifndef GL_EXT_texture_array -#define GL_EXT_texture_array 1 -#endif - -#ifndef GL_EXT_texture_buffer_object -#define GL_EXT_texture_buffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer); -#endif - -#ifndef GL_EXT_texture_compression_latc -#define GL_EXT_texture_compression_latc 1 -#endif - -#ifndef GL_EXT_texture_compression_rgtc -#define GL_EXT_texture_compression_rgtc 1 -#endif - -#ifndef GL_EXT_texture_shared_exponent -#define GL_EXT_texture_shared_exponent 1 -#endif - -#ifndef GL_NV_depth_buffer_float -#define GL_NV_depth_buffer_float 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDepthRangedNV (GLdouble zNear, GLdouble zFar); -GLAPI void APIENTRY glClearDepthdNV (GLdouble depth); -GLAPI void APIENTRY glDepthBoundsdNV (GLdouble zmin, GLdouble zmax); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar); -typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth); -typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax); -#endif - -#ifndef GL_NV_fragment_program4 -#define GL_NV_fragment_program4 1 -#endif - -#ifndef GL_NV_framebuffer_multisample_coverage -#define GL_NV_framebuffer_multisample_coverage 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); -#endif - -#ifndef GL_EXT_framebuffer_sRGB -#define GL_EXT_framebuffer_sRGB 1 -#endif - -#ifndef GL_NV_geometry_shader4 -#define GL_NV_geometry_shader4 1 -#endif - -#ifndef GL_NV_parameter_buffer_object -#define GL_NV_parameter_buffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramBufferParametersfvNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params); -GLAPI void APIENTRY glProgramBufferParametersIivNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params); -GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params); -typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params); -typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params); -#endif - -#ifndef GL_EXT_draw_buffers2 -#define GL_EXT_draw_buffers2 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -GLAPI void APIENTRY glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data); -GLAPI void APIENTRY glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data); -GLAPI void APIENTRY glEnableIndexedEXT (GLenum target, GLuint index); -GLAPI void APIENTRY glDisableIndexedEXT (GLenum target, GLuint index); -GLAPI GLboolean APIENTRY glIsEnabledIndexedEXT (GLenum target, GLuint index); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data); -typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data); -typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index); -typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index); -typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index); -#endif - -#ifndef GL_NV_transform_feedback -#define GL_NV_transform_feedback 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginTransformFeedbackNV (GLenum primitiveMode); -GLAPI void APIENTRY glEndTransformFeedbackNV (void); -GLAPI void APIENTRY glTransformFeedbackAttribsNV (GLuint count, const GLint *attribs, GLenum bufferMode); -GLAPI void APIENTRY glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset); -GLAPI void APIENTRY glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer); -GLAPI void APIENTRY glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); -GLAPI void APIENTRY glActiveVaryingNV (GLuint program, const GLchar *name); -GLAPI GLint APIENTRY glGetVaryingLocationNV (GLuint program, const GLchar *name); -GLAPI void APIENTRY glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location); -GLAPI void APIENTRY glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode); -typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (void); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode); -typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); -typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); -typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name); -typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name); -typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); -#endif - -#ifndef GL_EXT_bindable_uniform -#define GL_EXT_bindable_uniform 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUniformBufferEXT (GLuint program, GLint location, GLuint buffer); -GLAPI GLint APIENTRY glGetUniformBufferSizeEXT (GLuint program, GLint location); -GLAPI GLintptr APIENTRY glGetUniformOffsetEXT (GLuint program, GLint location); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer); -typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location); -typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location); -#endif - -#ifndef GL_EXT_texture_integer -#define GL_EXT_texture_integer 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha); -GLAPI void APIENTRY glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha); -typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha); -#endif - -#ifndef GL_GREMEDY_frame_terminator -#define GL_GREMEDY_frame_terminator 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glFrameTerminatorGREMEDY (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void); -#endif - -#ifndef GL_NV_conditional_render -#define GL_NV_conditional_render 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginConditionalRenderNV (GLuint id, GLenum mode); -GLAPI void APIENTRY glEndConditionalRenderNV (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode); -typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void); -#endif - -#ifndef GL_NV_present_video -#define GL_NV_present_video 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glPresentFrameKeyedNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); -GLAPI void APIENTRY glPresentFrameDualFillNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); -GLAPI void APIENTRY glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params); -GLAPI void APIENTRY glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params); -GLAPI void APIENTRY glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); -typedef void (APIENTRYP PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); -typedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params); -typedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params); -#endif - -#ifndef GL_EXT_transform_feedback -#define GL_EXT_transform_feedback 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginTransformFeedbackEXT (GLenum primitiveMode); -GLAPI void APIENTRY glEndTransformFeedbackEXT (void); -GLAPI void APIENTRY glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset); -GLAPI void APIENTRY glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer); -GLAPI void APIENTRY glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); -GLAPI void APIENTRY glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode); -typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void); -typedef void (APIENTRYP PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); -typedef void (APIENTRYP PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer); -typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); -typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -#endif - -#ifndef GL_EXT_direct_state_access -#define GL_EXT_direct_state_access 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glClientAttribDefaultEXT (GLbitfield mask); -GLAPI void APIENTRY glPushClientAttribDefaultEXT (GLbitfield mask); -GLAPI void APIENTRY glMatrixLoadfEXT (GLenum mode, const GLfloat *m); -GLAPI void APIENTRY glMatrixLoaddEXT (GLenum mode, const GLdouble *m); -GLAPI void APIENTRY glMatrixMultfEXT (GLenum mode, const GLfloat *m); -GLAPI void APIENTRY glMatrixMultdEXT (GLenum mode, const GLdouble *m); -GLAPI void APIENTRY glMatrixLoadIdentityEXT (GLenum mode); -GLAPI void APIENTRY glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -GLAPI void APIENTRY glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -GLAPI void APIENTRY glMatrixPopEXT (GLenum mode); -GLAPI void APIENTRY glMatrixPushEXT (GLenum mode); -GLAPI void APIENTRY glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m); -GLAPI void APIENTRY glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m); -GLAPI void APIENTRY glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m); -GLAPI void APIENTRY glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m); -GLAPI void APIENTRY glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -GLAPI void APIENTRY glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GLAPI void APIENTRY glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); -GLAPI void APIENTRY glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); -GLAPI void APIENTRY glTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -GLAPI void APIENTRY glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GLAPI void APIENTRY glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); -GLAPI void APIENTRY glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); -GLAPI void APIENTRY glMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture); -GLAPI void APIENTRY glEnableClientStateIndexedEXT (GLenum array, GLuint index); -GLAPI void APIENTRY glDisableClientStateIndexedEXT (GLenum array, GLuint index); -GLAPI void APIENTRY glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); -GLAPI void APIENTRY glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); -GLAPI void APIENTRY glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); -GLAPI void APIENTRY glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param); -GLAPI void APIENTRY glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); -GLAPI void APIENTRY glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data); -GLAPI void APIENTRY glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data); -GLAPI void APIENTRY glGetPointerIndexedvEXT (GLenum target, GLuint index, GLvoid* *data); -GLAPI void APIENTRY glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, GLvoid *img); -GLAPI void APIENTRY glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); -GLAPI void APIENTRY glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, GLvoid *img); -GLAPI void APIENTRY glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string); -GLAPI void APIENTRY glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params); -GLAPI void APIENTRY glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params); -GLAPI void APIENTRY glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params); -GLAPI void APIENTRY glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params); -GLAPI void APIENTRY glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, GLvoid *string); -GLAPI void APIENTRY glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); -GLAPI void APIENTRY glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params); -GLAPI void APIENTRY glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); -GLAPI void APIENTRY glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params); -GLAPI void APIENTRY glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); -GLAPI void APIENTRY glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params); -GLAPI void APIENTRY glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params); -GLAPI void APIENTRY glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0); -GLAPI void APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint v0); -GLAPI void APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0); -GLAPI void APIENTRY glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1); -GLAPI void APIENTRY glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -GLAPI void APIENTRY glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -GLAPI void APIENTRY glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage); -GLAPI void APIENTRY glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); -GLAPI GLvoid* APIENTRY glMapNamedBufferEXT (GLuint buffer, GLenum access); -GLAPI GLboolean APIENTRY glUnmapNamedBufferEXT (GLuint buffer); -GLAPI GLvoid* APIENTRY glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); -GLAPI void APIENTRY glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length); -GLAPI void APIENTRY glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -GLAPI void APIENTRY glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, GLvoid* *params); -GLAPI void APIENTRY glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data); -GLAPI void APIENTRY glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); -GLAPI void APIENTRY glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); -GLAPI void APIENTRY glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params); -GLAPI GLenum APIENTRY glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target); -GLAPI void APIENTRY glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -GLAPI void APIENTRY glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); -GLAPI void APIENTRY glGenerateTextureMipmapEXT (GLuint texture, GLenum target); -GLAPI void APIENTRY glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target); -GLAPI void APIENTRY glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode); -GLAPI void APIENTRY glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs); -GLAPI void APIENTRY glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode); -GLAPI void APIENTRY glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); -GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); -GLAPI void APIENTRY glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI void APIENTRY glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); -GLAPI void APIENTRY glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer); -GLAPI void APIENTRY glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer); -GLAPI void APIENTRY glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x); -GLAPI void APIENTRY glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y); -GLAPI void APIENTRY glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -GLAPI void APIENTRY glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); -typedef void (APIENTRYP PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); -typedef void (APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m); -typedef void (APIENTRYP PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m); -typedef void (APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); -typedef void (APIENTRYP PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -typedef void (APIENTRYP PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -typedef void (APIENTRYP PFNGLMATRIXPOPEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLMATRIXPUSHEXTPROC) (GLenum mode); -typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); -typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); -typedef void (APIENTRYP PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -typedef void (APIENTRYP PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); -typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -typedef void (APIENTRYP PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture); -typedef void (APIENTRYP PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); -typedef void (APIENTRYP PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); -typedef void (APIENTRYP PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); -typedef void (APIENTRYP PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); -typedef void (APIENTRYP PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); -typedef void (APIENTRYP PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param); -typedef void (APIENTRYP PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data); -typedef void (APIENTRYP PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data); -typedef void (APIENTRYP PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLvoid* *data); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, GLvoid *img); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); -typedef void (APIENTRYP PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, GLvoid *img); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, GLvoid *string); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params); -typedef void (APIENTRYP PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params); -typedef void (APIENTRYP PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); -typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage); -typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); -typedef GLvoid* (APIENTRYP PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access); -typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer); -typedef GLvoid* (APIENTRYP PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); -typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); -typedef void (APIENTRYP PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, GLvoid* *params); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data); -typedef void (APIENTRYP PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); -typedef void (APIENTRYP PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params); -typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target); -typedef void (APIENTRYP PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target); -typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); -typedef void (APIENTRYP PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs); -typedef void (APIENTRYP PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); -typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); -typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); -typedef void (APIENTRYP PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); -#endif - -#ifndef GL_EXT_vertex_array_bgra -#define GL_EXT_vertex_array_bgra 1 -#endif - -#ifndef GL_EXT_texture_swizzle -#define GL_EXT_texture_swizzle 1 -#endif - -#ifndef GL_NV_explicit_multisample -#define GL_NV_explicit_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val); -GLAPI void APIENTRY glSampleMaskIndexedNV (GLuint index, GLbitfield mask); -GLAPI void APIENTRY glTexRenderbufferNV (GLenum target, GLuint renderbuffer); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val); -typedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask); -typedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer); -#endif - -#ifndef GL_NV_transform_feedback2 -#define GL_NV_transform_feedback2 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindTransformFeedbackNV (GLenum target, GLuint id); -GLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids); -GLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei n, GLuint *ids); -GLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint id); -GLAPI void APIENTRY glPauseTransformFeedbackNV (void); -GLAPI void APIENTRY glResumeTransformFeedbackNV (void); -GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum mode, GLuint id); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id); -typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids); -typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids); -typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id); -typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void); -typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void); -typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id); -#endif - -#ifndef GL_ATI_meminfo -#define GL_ATI_meminfo 1 -#endif - -#ifndef GL_AMD_performance_monitor -#define GL_AMD_performance_monitor 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data); -GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); -GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); -GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); -GLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint monitor); -GLAPI void APIENTRY glEndPerfMonitorAMD (GLuint monitor); -GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data); -typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); -typedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); -typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); -typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); -#endif - -#ifndef GL_AMD_texture_texture4 -#define GL_AMD_texture_texture4 1 -#endif - -#ifndef GL_AMD_vertex_shader_tesselator -#define GL_AMD_vertex_shader_tesselator 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTessellationFactorAMD (GLfloat factor); -GLAPI void APIENTRY glTessellationModeAMD (GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor); -typedef void (APIENTRYP PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode); -#endif - -#ifndef GL_EXT_provoking_vertex -#define GL_EXT_provoking_vertex 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProvokingVertexEXT (GLenum mode); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode); -#endif - -#ifndef GL_EXT_texture_snorm -#define GL_EXT_texture_snorm 1 -#endif - -#ifndef GL_AMD_draw_buffers_blend -#define GL_AMD_draw_buffers_blend 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst); -GLAPI void APIENTRY glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -GLAPI void APIENTRY glBlendEquationIndexedAMD (GLuint buf, GLenum mode); -GLAPI void APIENTRY glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst); -typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -typedef void (APIENTRYP PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode); -typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); -#endif - -#ifndef GL_APPLE_texture_range -#define GL_APPLE_texture_range 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureRangeAPPLE (GLenum target, GLsizei length, const GLvoid *pointer); -GLAPI void APIENTRY glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, GLvoid* *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, GLvoid* *params); -#endif - -#ifndef GL_APPLE_float_pixels -#define GL_APPLE_float_pixels 1 -#endif - -#ifndef GL_APPLE_vertex_program_evaluators -#define GL_APPLE_vertex_program_evaluators 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glEnableVertexAttribAPPLE (GLuint index, GLenum pname); -GLAPI void APIENTRY glDisableVertexAttribAPPLE (GLuint index, GLenum pname); -GLAPI GLboolean APIENTRY glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname); -GLAPI void APIENTRY glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); -GLAPI void APIENTRY glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); -GLAPI void APIENTRY glMapVertexAttrib2dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); -GLAPI void APIENTRY glMapVertexAttrib2fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); -typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); -typedef GLboolean (APIENTRYP PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname); -typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); -typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); -typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); -typedef void (APIENTRYP PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); -#endif - -#ifndef GL_APPLE_aux_depth_stencil -#define GL_APPLE_aux_depth_stencil 1 -#endif - -#ifndef GL_APPLE_object_purgeable -#define GL_APPLE_object_purgeable 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLenum APIENTRY glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); -GLAPI GLenum APIENTRY glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); -GLAPI void APIENTRY glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLenum (APIENTRYP PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); -typedef GLenum (APIENTRYP PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); -typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params); -#endif - -#ifndef GL_APPLE_row_bytes -#define GL_APPLE_row_bytes 1 -#endif - -#ifndef GL_APPLE_rgb_422 -#define GL_APPLE_rgb_422 1 -#endif - -#ifndef GL_NV_video_capture -#define GL_NV_video_capture 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBeginVideoCaptureNV (GLuint video_capture_slot); -GLAPI void APIENTRY glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); -GLAPI void APIENTRY glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); -GLAPI void APIENTRY glEndVideoCaptureNV (GLuint video_capture_slot); -GLAPI void APIENTRY glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); -GLAPI void APIENTRY glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); -GLAPI void APIENTRY glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); -GLAPI GLenum APIENTRY glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); -GLAPI void APIENTRY glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); -GLAPI void APIENTRY glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot); -typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); -typedef void (APIENTRYP PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); -typedef void (APIENTRYP PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot); -typedef void (APIENTRYP PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); -typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); -typedef void (APIENTRYP PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); -typedef GLenum (APIENTRYP PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); -typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); -typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); -typedef void (APIENTRYP PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); -#endif - -#ifndef GL_NV_copy_image -#define GL_NV_copy_image 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glCopyImageSubDataNV (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATANVPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); -#endif - -#ifndef GL_EXT_separate_shader_objects -#define GL_EXT_separate_shader_objects 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUseShaderProgramEXT (GLenum type, GLuint program); -GLAPI void APIENTRY glActiveProgramEXT (GLuint program); -GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program); -typedef void (APIENTRYP PFNGLACTIVEPROGRAMEXTPROC) (GLuint program); -typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string); -#endif - -#ifndef GL_NV_parameter_buffer_object2 -#define GL_NV_parameter_buffer_object2 1 -#endif - -#ifndef GL_NV_shader_buffer_load -#define GL_NV_shader_buffer_load 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMakeBufferResidentNV (GLenum target, GLenum access); -GLAPI void APIENTRY glMakeBufferNonResidentNV (GLenum target); -GLAPI GLboolean APIENTRY glIsBufferResidentNV (GLenum target); -GLAPI void APIENTRY glMakeNamedBufferResidentNV (GLuint buffer, GLenum access); -GLAPI void APIENTRY glMakeNamedBufferNonResidentNV (GLuint buffer); -GLAPI GLboolean APIENTRY glIsNamedBufferResidentNV (GLuint buffer); -GLAPI void APIENTRY glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params); -GLAPI void APIENTRY glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params); -GLAPI void APIENTRY glGetIntegerui64vNV (GLenum value, GLuint64EXT *result); -GLAPI void APIENTRY glUniformui64NV (GLint location, GLuint64EXT value); -GLAPI void APIENTRY glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params); -GLAPI void APIENTRY glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value); -GLAPI void APIENTRY glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access); -typedef void (APIENTRYP PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target); -typedef GLboolean (APIENTRYP PFNGLISBUFFERRESIDENTNVPROC) (GLenum target); -typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access); -typedef void (APIENTRYP PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer); -typedef GLboolean (APIENTRYP PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer); -typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params); -typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params); -typedef void (APIENTRYP PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result); -typedef void (APIENTRYP PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value); -typedef void (APIENTRYP PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -#endif - -#ifndef GL_NV_vertex_buffer_unified_memory -#define GL_NV_vertex_buffer_unified_memory 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); -GLAPI void APIENTRY glVertexFormatNV (GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glNormalFormatNV (GLenum type, GLsizei stride); -GLAPI void APIENTRY glColorFormatNV (GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glIndexFormatNV (GLenum type, GLsizei stride); -GLAPI void APIENTRY glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glEdgeFlagFormatNV (GLsizei stride); -GLAPI void APIENTRY glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glFogCoordFormatNV (GLenum type, GLsizei stride); -GLAPI void APIENTRY glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); -GLAPI void APIENTRY glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); -GLAPI void APIENTRY glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); -typedef void (APIENTRYP PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride); -typedef void (APIENTRYP PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); -typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); -typedef void (APIENTRYP PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result); -#endif - -#ifndef GL_NV_texture_barrier -#define GL_NV_texture_barrier 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTextureBarrierNV (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXTUREBARRIERNVPROC) (void); -#endif - -#ifndef GL_AMD_shader_stencil_export -#define GL_AMD_shader_stencil_export 1 -#endif - -#ifndef GL_AMD_seamless_cubemap_per_texture -#define GL_AMD_seamless_cubemap_per_texture 1 -#endif - -#ifndef GL_AMD_conservative_depth -#define GL_AMD_conservative_depth 1 -#endif - -#ifndef GL_EXT_shader_image_load_store -#define GL_EXT_shader_image_load_store 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); -GLAPI void APIENTRY glMemoryBarrierEXT (GLbitfield barriers); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); -typedef void (APIENTRYP PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers); -#endif - -#ifndef GL_EXT_vertex_attrib_64bit -#define GL_EXT_vertex_attrib_64bit 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribL1dEXT (GLuint index, GLdouble x); -GLAPI void APIENTRY glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY glVertexAttribL1dvEXT (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL2dvEXT (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL3dvEXT (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribL4dvEXT (GLuint index, const GLdouble *v); -GLAPI void APIENTRY glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params); -typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); -#endif - -#ifndef GL_NV_gpu_program5 -#define GL_NV_gpu_program5 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params); -GLAPI void APIENTRY glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params); -typedef void (APIENTRYP PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param); -#endif - -#ifndef GL_NV_gpu_shader5 -#define GL_NV_gpu_shader5 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glUniform1i64NV (GLint location, GLint64EXT x); -GLAPI void APIENTRY glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y); -GLAPI void APIENTRY glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -GLAPI void APIENTRY glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -GLAPI void APIENTRY glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glUniform1ui64NV (GLint location, GLuint64EXT x); -GLAPI void APIENTRY glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y); -GLAPI void APIENTRY glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -GLAPI void APIENTRY glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -GLAPI void APIENTRY glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params); -GLAPI void APIENTRY glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x); -GLAPI void APIENTRY glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); -GLAPI void APIENTRY glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -GLAPI void APIENTRY glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -GLAPI void APIENTRY glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -GLAPI void APIENTRY glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x); -GLAPI void APIENTRY glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); -GLAPI void APIENTRY glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -GLAPI void APIENTRY glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -GLAPI void APIENTRY glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -GLAPI void APIENTRY glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x); -typedef void (APIENTRYP PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y); -typedef void (APIENTRYP PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -typedef void (APIENTRYP PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -typedef void (APIENTRYP PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x); -typedef void (APIENTRYP PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y); -typedef void (APIENTRYP PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -typedef void (APIENTRYP PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -typedef void (APIENTRYP PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); -#endif - -#ifndef GL_NV_shader_buffer_store -#define GL_NV_shader_buffer_store 1 -#endif - -#ifndef GL_NV_tessellation_program5 -#define GL_NV_tessellation_program5 1 -#endif - -#ifndef GL_NV_vertex_attrib_integer_64bit -#define GL_NV_vertex_attrib_integer_64bit 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVertexAttribL1i64NV (GLuint index, GLint64EXT x); -GLAPI void APIENTRY glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y); -GLAPI void APIENTRY glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); -GLAPI void APIENTRY glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -GLAPI void APIENTRY glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v); -GLAPI void APIENTRY glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v); -GLAPI void APIENTRY glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v); -GLAPI void APIENTRY glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v); -GLAPI void APIENTRY glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x); -GLAPI void APIENTRY glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y); -GLAPI void APIENTRY glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -GLAPI void APIENTRY glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -GLAPI void APIENTRY glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v); -GLAPI void APIENTRY glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params); -GLAPI void APIENTRY glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params); -GLAPI void APIENTRY glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params); -typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params); -typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); -#endif - -#ifndef GL_NV_multisample_coverage -#define GL_NV_multisample_coverage 1 -#endif - -#ifndef GL_AMD_name_gen_delete -#define GL_AMD_name_gen_delete 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names); -GLAPI void APIENTRY glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names); -GLAPI GLboolean APIENTRY glIsNameAMD (GLenum identifier, GLuint name); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names); -typedef void (APIENTRYP PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names); -typedef GLboolean (APIENTRYP PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name); -#endif - -#ifndef GL_AMD_debug_output -#define GL_AMD_debug_output 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -GLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); -GLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, GLvoid *userParam); -GLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); -typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); -typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, GLvoid *userParam); -typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); -#endif - -#ifndef GL_NV_vdpau_interop -#define GL_NV_vdpau_interop 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glVDPAUInitNV (const GLvoid *vdpDevice, const GLvoid *getProcAddress); -GLAPI void APIENTRY glVDPAUFiniNV (void); -GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterVideoSurfaceNV (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); -GLAPI GLvdpauSurfaceNV APIENTRY glVDPAURegisterOutputSurfaceNV (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); -GLAPI void APIENTRY glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface); -GLAPI void APIENTRY glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface); -GLAPI void APIENTRY glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -GLAPI void APIENTRY glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access); -GLAPI void APIENTRY glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); -GLAPI void APIENTRY glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLVDPAUINITNVPROC) (const GLvoid *vdpDevice, const GLvoid *getProcAddress); -typedef void (APIENTRYP PFNGLVDPAUFININVPROC) (void); -typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); -typedef GLvdpauSurfaceNV (APIENTRYP PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); -typedef void (APIENTRYP PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface); -typedef void (APIENTRYP PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface); -typedef void (APIENTRYP PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -typedef void (APIENTRYP PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access); -typedef void (APIENTRYP PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); -typedef void (APIENTRYP PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); -#endif - -#ifndef GL_AMD_transform_feedback3_lines_triangles -#define GL_AMD_transform_feedback3_lines_triangles 1 -#endif - -#ifndef GL_AMD_depth_clamp_separate -#define GL_AMD_depth_clamp_separate 1 -#endif - -#ifndef GL_EXT_texture_sRGB_decode -#define GL_EXT_texture_sRGB_decode 1 -#endif - -#ifndef GL_NV_texture_multisample -#define GL_NV_texture_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -GLAPI void APIENTRY glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -GLAPI void APIENTRY glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -GLAPI void APIENTRY glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -GLAPI void APIENTRY glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -GLAPI void APIENTRY glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); -typedef void (APIENTRYP PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); -#endif - -#ifndef GL_AMD_blend_minmax_factor -#define GL_AMD_blend_minmax_factor 1 -#endif - -#ifndef GL_AMD_sample_positions -#define GL_AMD_sample_positions 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val); -#endif - -#ifndef GL_EXT_x11_sync_object -#define GL_EXT_x11_sync_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI GLsync APIENTRY glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef GLsync (APIENTRYP PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); -#endif - -#ifndef GL_AMD_multi_draw_indirect -#define GL_AMD_multi_draw_indirect 1 -#ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiDrawArraysIndirectAMD (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride); -GLAPI void APIENTRY glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride); -#endif - -#ifndef GL_EXT_framebuffer_multisample_blit_scaled -#define GL_EXT_framebuffer_multisample_blit_scaled 1 -#endif - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/dll/opengl/mesa/include/GL/glu.h b/dll/opengl/mesa/include/GL/glu.h deleted file mode 100644 index ba2228d8d86..00000000000 --- a/dll/opengl/mesa/include/GL/glu.h +++ /dev/null @@ -1,353 +0,0 @@ -/* - * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) - * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice including the dates of first publication and - * either this permission notice or a reference to - * http://oss.sgi.com/projects/FreeB/ - * shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Silicon Graphics, Inc. - * shall not be used in advertising or otherwise to promote the sale, use or - * other dealings in this Software without prior written authorization from - * Silicon Graphics, Inc. - */ - -#ifndef __glu_h__ -#define __glu_h__ - -#if defined(USE_MGL_NAMESPACE) -#include "glu_mangle.h" -#endif - -#include - -#ifndef GLAPIENTRY -#if defined(_MSC_VER) || defined(__MINGW32__) -#define GLAPIENTRY __stdcall -#else -#define GLAPIENTRY -#endif -#endif - -#ifndef GLAPIENTRYP -#define GLAPIENTRYP GLAPIENTRY * -#endif - -#if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32) -# undef GLAPI -# define GLAPI __declspec(dllexport) -#elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) -/* tag specifying we're building for DLL runtime support */ -# undef GLAPI -# define GLAPI __declspec(dllimport) -#elif !defined(GLAPI) -/* for use with static link lib build of Win32 edition only */ -# define GLAPI extern -#endif /* _STATIC_MESA support */ - -#ifdef __cplusplus -extern "C" { -#endif - -/*************************************************************/ - -/* Extensions */ -#define GLU_EXT_object_space_tess 1 -#define GLU_EXT_nurbs_tessellator 1 - -/* Boolean */ -#define GLU_FALSE 0 -#define GLU_TRUE 1 - -/* Version */ -#define GLU_VERSION_1_1 1 -#define GLU_VERSION_1_2 1 -#define GLU_VERSION_1_3 1 - -/* StringName */ -#define GLU_VERSION 100800 -#define GLU_EXTENSIONS 100801 - -/* ErrorCode */ -#define GLU_INVALID_ENUM 100900 -#define GLU_INVALID_VALUE 100901 -#define GLU_OUT_OF_MEMORY 100902 -#define GLU_INCOMPATIBLE_GL_VERSION 100903 -#define GLU_INVALID_OPERATION 100904 - -/* NurbsDisplay */ -/* GLU_FILL */ -#define GLU_OUTLINE_POLYGON 100240 -#define GLU_OUTLINE_PATCH 100241 - -/* NurbsCallback */ -#define GLU_NURBS_ERROR 100103 -#define GLU_ERROR 100103 -#define GLU_NURBS_BEGIN 100164 -#define GLU_NURBS_BEGIN_EXT 100164 -#define GLU_NURBS_VERTEX 100165 -#define GLU_NURBS_VERTEX_EXT 100165 -#define GLU_NURBS_NORMAL 100166 -#define GLU_NURBS_NORMAL_EXT 100166 -#define GLU_NURBS_COLOR 100167 -#define GLU_NURBS_COLOR_EXT 100167 -#define GLU_NURBS_TEXTURE_COORD 100168 -#define GLU_NURBS_TEX_COORD_EXT 100168 -#define GLU_NURBS_END 100169 -#define GLU_NURBS_END_EXT 100169 -#define GLU_NURBS_BEGIN_DATA 100170 -#define GLU_NURBS_BEGIN_DATA_EXT 100170 -#define GLU_NURBS_VERTEX_DATA 100171 -#define GLU_NURBS_VERTEX_DATA_EXT 100171 -#define GLU_NURBS_NORMAL_DATA 100172 -#define GLU_NURBS_NORMAL_DATA_EXT 100172 -#define GLU_NURBS_COLOR_DATA 100173 -#define GLU_NURBS_COLOR_DATA_EXT 100173 -#define GLU_NURBS_TEXTURE_COORD_DATA 100174 -#define GLU_NURBS_TEX_COORD_DATA_EXT 100174 -#define GLU_NURBS_END_DATA 100175 -#define GLU_NURBS_END_DATA_EXT 100175 - -/* NurbsError */ -#define GLU_NURBS_ERROR1 100251 -#define GLU_NURBS_ERROR2 100252 -#define GLU_NURBS_ERROR3 100253 -#define GLU_NURBS_ERROR4 100254 -#define GLU_NURBS_ERROR5 100255 -#define GLU_NURBS_ERROR6 100256 -#define GLU_NURBS_ERROR7 100257 -#define GLU_NURBS_ERROR8 100258 -#define GLU_NURBS_ERROR9 100259 -#define GLU_NURBS_ERROR10 100260 -#define GLU_NURBS_ERROR11 100261 -#define GLU_NURBS_ERROR12 100262 -#define GLU_NURBS_ERROR13 100263 -#define GLU_NURBS_ERROR14 100264 -#define GLU_NURBS_ERROR15 100265 -#define GLU_NURBS_ERROR16 100266 -#define GLU_NURBS_ERROR17 100267 -#define GLU_NURBS_ERROR18 100268 -#define GLU_NURBS_ERROR19 100269 -#define GLU_NURBS_ERROR20 100270 -#define GLU_NURBS_ERROR21 100271 -#define GLU_NURBS_ERROR22 100272 -#define GLU_NURBS_ERROR23 100273 -#define GLU_NURBS_ERROR24 100274 -#define GLU_NURBS_ERROR25 100275 -#define GLU_NURBS_ERROR26 100276 -#define GLU_NURBS_ERROR27 100277 -#define GLU_NURBS_ERROR28 100278 -#define GLU_NURBS_ERROR29 100279 -#define GLU_NURBS_ERROR30 100280 -#define GLU_NURBS_ERROR31 100281 -#define GLU_NURBS_ERROR32 100282 -#define GLU_NURBS_ERROR33 100283 -#define GLU_NURBS_ERROR34 100284 -#define GLU_NURBS_ERROR35 100285 -#define GLU_NURBS_ERROR36 100286 -#define GLU_NURBS_ERROR37 100287 - -/* NurbsProperty */ -#define GLU_AUTO_LOAD_MATRIX 100200 -#define GLU_CULLING 100201 -#define GLU_SAMPLING_TOLERANCE 100203 -#define GLU_DISPLAY_MODE 100204 -#define GLU_PARAMETRIC_TOLERANCE 100202 -#define GLU_SAMPLING_METHOD 100205 -#define GLU_U_STEP 100206 -#define GLU_V_STEP 100207 -#define GLU_NURBS_MODE 100160 -#define GLU_NURBS_MODE_EXT 100160 -#define GLU_NURBS_TESSELLATOR 100161 -#define GLU_NURBS_TESSELLATOR_EXT 100161 -#define GLU_NURBS_RENDERER 100162 -#define GLU_NURBS_RENDERER_EXT 100162 - -/* NurbsSampling */ -#define GLU_OBJECT_PARAMETRIC_ERROR 100208 -#define GLU_OBJECT_PARAMETRIC_ERROR_EXT 100208 -#define GLU_OBJECT_PATH_LENGTH 100209 -#define GLU_OBJECT_PATH_LENGTH_EXT 100209 -#define GLU_PATH_LENGTH 100215 -#define GLU_PARAMETRIC_ERROR 100216 -#define GLU_DOMAIN_DISTANCE 100217 - -/* NurbsTrim */ -#define GLU_MAP1_TRIM_2 100210 -#define GLU_MAP1_TRIM_3 100211 - -/* QuadricDrawStyle */ -#define GLU_POINT 100010 -#define GLU_LINE 100011 -#define GLU_FILL 100012 -#define GLU_SILHOUETTE 100013 - -/* QuadricCallback */ -/* GLU_ERROR */ - -/* QuadricNormal */ -#define GLU_SMOOTH 100000 -#define GLU_FLAT 100001 -#define GLU_NONE 100002 - -/* QuadricOrientation */ -#define GLU_OUTSIDE 100020 -#define GLU_INSIDE 100021 - -/* TessCallback */ -#define GLU_TESS_BEGIN 100100 -#define GLU_BEGIN 100100 -#define GLU_TESS_VERTEX 100101 -#define GLU_VERTEX 100101 -#define GLU_TESS_END 100102 -#define GLU_END 100102 -#define GLU_TESS_ERROR 100103 -#define GLU_TESS_EDGE_FLAG 100104 -#define GLU_EDGE_FLAG 100104 -#define GLU_TESS_COMBINE 100105 -#define GLU_TESS_BEGIN_DATA 100106 -#define GLU_TESS_VERTEX_DATA 100107 -#define GLU_TESS_END_DATA 100108 -#define GLU_TESS_ERROR_DATA 100109 -#define GLU_TESS_EDGE_FLAG_DATA 100110 -#define GLU_TESS_COMBINE_DATA 100111 - -/* TessContour */ -#define GLU_CW 100120 -#define GLU_CCW 100121 -#define GLU_INTERIOR 100122 -#define GLU_EXTERIOR 100123 -#define GLU_UNKNOWN 100124 - -/* TessProperty */ -#define GLU_TESS_WINDING_RULE 100140 -#define GLU_TESS_BOUNDARY_ONLY 100141 -#define GLU_TESS_TOLERANCE 100142 - -/* TessError */ -#define GLU_TESS_ERROR1 100151 -#define GLU_TESS_ERROR2 100152 -#define GLU_TESS_ERROR3 100153 -#define GLU_TESS_ERROR4 100154 -#define GLU_TESS_ERROR5 100155 -#define GLU_TESS_ERROR6 100156 -#define GLU_TESS_ERROR7 100157 -#define GLU_TESS_ERROR8 100158 -#define GLU_TESS_MISSING_BEGIN_POLYGON 100151 -#define GLU_TESS_MISSING_BEGIN_CONTOUR 100152 -#define GLU_TESS_MISSING_END_POLYGON 100153 -#define GLU_TESS_MISSING_END_CONTOUR 100154 -#define GLU_TESS_COORD_TOO_LARGE 100155 -#define GLU_TESS_NEED_COMBINE_CALLBACK 100156 - -/* TessWinding */ -#define GLU_TESS_WINDING_ODD 100130 -#define GLU_TESS_WINDING_NONZERO 100131 -#define GLU_TESS_WINDING_POSITIVE 100132 -#define GLU_TESS_WINDING_NEGATIVE 100133 -#define GLU_TESS_WINDING_ABS_GEQ_TWO 100134 - -/*************************************************************/ - - -#ifdef __cplusplus -class GLUnurbs; -class GLUquadric; -class GLUtesselator; -#else -typedef struct GLUnurbs GLUnurbs; -typedef struct GLUquadric GLUquadric; -typedef struct GLUtesselator GLUtesselator; -#endif - -typedef GLUnurbs GLUnurbsObj; -typedef GLUquadric GLUquadricObj; -typedef GLUtesselator GLUtesselatorObj; -typedef GLUtesselator GLUtriangulatorObj; - -#define GLU_TESS_MAX_COORD 1.0e150 - -/* Internal convenience typedefs */ -typedef void (GLAPIENTRYP _GLUfuncptr)(void); - -GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb); -GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess); -GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb); -GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb); -GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data); -GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data); -GLAPI GLint GLAPIENTRY gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data); -GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data); -GLAPI GLint GLAPIENTRY gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data); -GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data); -GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString); -GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks); -GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb); -GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad); -GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess); -GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops); -GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb); -GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess); -GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb); -GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb); -GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error); -GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data); -GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name); -GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data); -GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view); -GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ); -GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void); -GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void); -GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void); -GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type); -GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc); -GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData); -GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData); -GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type); -GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value); -GLAPI void GLAPIENTRY gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type); -GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top); -GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep); -GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar); -GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport); -GLAPI GLint GLAPIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ); -GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type); -GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc); -GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw); -GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal); -GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation); -GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture); -GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut); -GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks); -GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess); -GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data); -GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc); -GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess); -GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess); -GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ); -GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data); -GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data); -GLAPI GLint GLAPIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ); -GLAPI GLint GLAPIENTRY gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW); - -#ifdef __cplusplus -} -#endif - -#endif /* __glu_h__ */ diff --git a/dll/opengl/mesa/include/GL/glu_mangle.h b/dll/opengl/mesa/include/GL/glu_mangle.h deleted file mode 100644 index 9c25aa864c1..00000000000 --- a/dll/opengl/mesa/include/GL/glu_mangle.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 3.0 - * Copyright (C) 1995-1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - - -#ifndef GLU_MANGLE_H -#define GLU_MANGLE_H - - -#define gluLookAt mgluLookAt -#define gluOrtho2D mgluOrtho2D -#define gluPerspective mgluPerspective -#define gluPickMatrix mgluPickMatrix -#define gluProject mgluProject -#define gluUnProject mgluUnProject -#define gluErrorString mgluErrorString -#define gluScaleImage mgluScaleImage -#define gluBuild1DMipmaps mgluBuild1DMipmaps -#define gluBuild2DMipmaps mgluBuild2DMipmaps -#define gluNewQuadric mgluNewQuadric -#define gluDeleteQuadric mgluDeleteQuadric -#define gluQuadricDrawStyle mgluQuadricDrawStyle -#define gluQuadricOrientation mgluQuadricOrientation -#define gluQuadricNormals mgluQuadricNormals -#define gluQuadricTexture mgluQuadricTexture -#define gluQuadricCallback mgluQuadricCallback -#define gluCylinder mgluCylinder -#define gluSphere mgluSphere -#define gluDisk mgluDisk -#define gluPartialDisk mgluPartialDisk -#define gluNewNurbsRenderer mgluNewNurbsRenderer -#define gluDeleteNurbsRenderer mgluDeleteNurbsRenderer -#define gluLoadSamplingMatrices mgluLoadSamplingMatrices -#define gluNurbsProperty mgluNurbsProperty -#define gluGetNurbsProperty mgluGetNurbsProperty -#define gluBeginCurve mgluBeginCurve -#define gluEndCurve mgluEndCurve -#define gluNurbsCurve mgluNurbsCurve -#define gluBeginSurface mgluBeginSurface -#define gluEndSurface mgluEndSurface -#define gluNurbsSurface mgluNurbsSurface -#define gluBeginTrim mgluBeginTrim -#define gluEndTrim mgluEndTrim -#define gluPwlCurve mgluPwlCurve -#define gluNurbsCallback mgluNurbsCallback -#define gluNewTess mgluNewTess -#define gluDeleteTess mgluDeleteTess -#define gluTessBeginPolygon mgluTessBeginPolygon -#define gluTessBeginContour mgluTessBeginContour -#define gluTessVertex mgluTessVertex -#define gluTessEndPolygon mgluTessEndPolygon -#define gluTessEndContour mgluTessEndContour -#define gluTessProperty mgluTessProperty -#define gluTessNormal mgluTessNormal -#define gluTessCallback mgluTessCallback -#define gluGetTessProperty mgluGetTessProperty -#define gluBeginPolygon mgluBeginPolygon -#define gluNextContour mgluNextContour -#define gluEndPolygon mgluEndPolygon -#define gluGetString mgluGetString -#define gluBuild1DMipmapLevels mgluBuild1DMipmapLevels -#define gluBuild2DMipmapLevels mgluBuild2DMipmapLevels -#define gluBuild3DMipmapLevels mgluBuild3DMipmapLevels -#define gluBuild3DMipmaps mgluBuild3DMipmaps -#define gluCheckExtension mgluCheckExtension -#define gluUnProject4 mgluUnProject4 -#define gluNurbsCallbackData mgluNurbsCallbackData -#define gluNurbsCallbackDataEXT mgluNurbsCallbackDataEXT - -#endif diff --git a/dll/opengl/mesa/include/GL/glx.h b/dll/opengl/mesa/include/GL/glx.h deleted file mode 100644 index a3a7d97c932..00000000000 --- a/dll/opengl/mesa/include/GL/glx.h +++ /dev/null @@ -1,526 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef GLX_H -#define GLX_H - - -#ifdef __VMS -#include -# ifdef __cplusplus -/* VMS Xlib.h gives problems with C++. - * this avoids a bunch of trivial warnings */ -#pragma message disable nosimpint -#endif -#endif -#include -#include -#ifdef __VMS -# ifdef __cplusplus -#pragma message enable nosimpint -#endif -#endif -#include - - -#if defined(USE_MGL_NAMESPACE) -#include "glx_mangle.h" -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - - -#define GLX_VERSION_1_1 1 -#define GLX_VERSION_1_2 1 -#define GLX_VERSION_1_3 1 -#define GLX_VERSION_1_4 1 - -#define GLX_EXTENSION_NAME "GLX" - - - -/* - * Tokens for glXChooseVisual and glXGetConfig: - */ -#define GLX_USE_GL 1 -#define GLX_BUFFER_SIZE 2 -#define GLX_LEVEL 3 -#define GLX_RGBA 4 -#define GLX_DOUBLEBUFFER 5 -#define GLX_STEREO 6 -#define GLX_AUX_BUFFERS 7 -#define GLX_RED_SIZE 8 -#define GLX_GREEN_SIZE 9 -#define GLX_BLUE_SIZE 10 -#define GLX_ALPHA_SIZE 11 -#define GLX_DEPTH_SIZE 12 -#define GLX_STENCIL_SIZE 13 -#define GLX_ACCUM_RED_SIZE 14 -#define GLX_ACCUM_GREEN_SIZE 15 -#define GLX_ACCUM_BLUE_SIZE 16 -#define GLX_ACCUM_ALPHA_SIZE 17 - - -/* - * Error codes returned by glXGetConfig: - */ -#define GLX_BAD_SCREEN 1 -#define GLX_BAD_ATTRIBUTE 2 -#define GLX_NO_EXTENSION 3 -#define GLX_BAD_VISUAL 4 -#define GLX_BAD_CONTEXT 5 -#define GLX_BAD_VALUE 6 -#define GLX_BAD_ENUM 7 - - -/* - * GLX 1.1 and later: - */ -#define GLX_VENDOR 1 -#define GLX_VERSION 2 -#define GLX_EXTENSIONS 3 - - -/* - * GLX 1.3 and later: - */ -#define GLX_CONFIG_CAVEAT 0x20 -#define GLX_DONT_CARE 0xFFFFFFFF -#define GLX_X_VISUAL_TYPE 0x22 -#define GLX_TRANSPARENT_TYPE 0x23 -#define GLX_TRANSPARENT_INDEX_VALUE 0x24 -#define GLX_TRANSPARENT_RED_VALUE 0x25 -#define GLX_TRANSPARENT_GREEN_VALUE 0x26 -#define GLX_TRANSPARENT_BLUE_VALUE 0x27 -#define GLX_TRANSPARENT_ALPHA_VALUE 0x28 -#define GLX_WINDOW_BIT 0x00000001 -#define GLX_PIXMAP_BIT 0x00000002 -#define GLX_PBUFFER_BIT 0x00000004 -#define GLX_AUX_BUFFERS_BIT 0x00000010 -#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 -#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 -#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 -#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 -#define GLX_DEPTH_BUFFER_BIT 0x00000020 -#define GLX_STENCIL_BUFFER_BIT 0x00000040 -#define GLX_ACCUM_BUFFER_BIT 0x00000080 -#define GLX_NONE 0x8000 -#define GLX_SLOW_CONFIG 0x8001 -#define GLX_TRUE_COLOR 0x8002 -#define GLX_DIRECT_COLOR 0x8003 -#define GLX_PSEUDO_COLOR 0x8004 -#define GLX_STATIC_COLOR 0x8005 -#define GLX_GRAY_SCALE 0x8006 -#define GLX_STATIC_GRAY 0x8007 -#define GLX_TRANSPARENT_RGB 0x8008 -#define GLX_TRANSPARENT_INDEX 0x8009 -#define GLX_VISUAL_ID 0x800B -#define GLX_SCREEN 0x800C -#define GLX_NON_CONFORMANT_CONFIG 0x800D -#define GLX_DRAWABLE_TYPE 0x8010 -#define GLX_RENDER_TYPE 0x8011 -#define GLX_X_RENDERABLE 0x8012 -#define GLX_FBCONFIG_ID 0x8013 -#define GLX_RGBA_TYPE 0x8014 -#define GLX_COLOR_INDEX_TYPE 0x8015 -#define GLX_MAX_PBUFFER_WIDTH 0x8016 -#define GLX_MAX_PBUFFER_HEIGHT 0x8017 -#define GLX_MAX_PBUFFER_PIXELS 0x8018 -#define GLX_PRESERVED_CONTENTS 0x801B -#define GLX_LARGEST_PBUFFER 0x801C -#define GLX_WIDTH 0x801D -#define GLX_HEIGHT 0x801E -#define GLX_EVENT_MASK 0x801F -#define GLX_DAMAGED 0x8020 -#define GLX_SAVED 0x8021 -#define GLX_WINDOW 0x8022 -#define GLX_PBUFFER 0x8023 -#define GLX_PBUFFER_HEIGHT 0x8040 -#define GLX_PBUFFER_WIDTH 0x8041 -#define GLX_RGBA_BIT 0x00000001 -#define GLX_COLOR_INDEX_BIT 0x00000002 -#define GLX_PBUFFER_CLOBBER_MASK 0x08000000 - - -/* - * GLX 1.4 and later: - */ -#define GLX_SAMPLE_BUFFERS 0x186a0 /*100000*/ -#define GLX_SAMPLES 0x186a1 /*100001*/ - - - -typedef struct __GLXcontextRec *GLXContext; -typedef XID GLXPixmap; -typedef XID GLXDrawable; -/* GLX 1.3 and later */ -typedef struct __GLXFBConfigRec *GLXFBConfig; -typedef XID GLXFBConfigID; -typedef XID GLXContextID; -typedef XID GLXWindow; -typedef XID GLXPbuffer; - - -/* -** Events. -** __GLX_NUMBER_EVENTS is set to 17 to account for the BufferClobberSGIX -** event - this helps initialization if the server supports the pbuffer -** extension and the client doesn't. -*/ -#define GLX_PbufferClobber 0 -#define GLX_BufferSwapComplete 1 - -#define __GLX_NUMBER_EVENTS 17 - -extern XVisualInfo* glXChooseVisual( Display *dpy, int screen, - int *attribList ); - -extern GLXContext glXCreateContext( Display *dpy, XVisualInfo *vis, - GLXContext shareList, Bool direct ); - -extern void glXDestroyContext( Display *dpy, GLXContext ctx ); - -extern Bool glXMakeCurrent( Display *dpy, GLXDrawable drawable, - GLXContext ctx); - -extern void glXCopyContext( Display *dpy, GLXContext src, GLXContext dst, - unsigned long mask ); - -extern void glXSwapBuffers( Display *dpy, GLXDrawable drawable ); - -extern GLXPixmap glXCreateGLXPixmap( Display *dpy, XVisualInfo *visual, - Pixmap pixmap ); - -extern void glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap ); - -extern Bool glXQueryExtension( Display *dpy, int *errorb, int *event ); - -extern Bool glXQueryVersion( Display *dpy, int *maj, int *min ); - -extern Bool glXIsDirect( Display *dpy, GLXContext ctx ); - -extern int glXGetConfig( Display *dpy, XVisualInfo *visual, - int attrib, int *value ); - -extern GLXContext glXGetCurrentContext( void ); - -extern GLXDrawable glXGetCurrentDrawable( void ); - -extern void glXWaitGL( void ); - -extern void glXWaitX( void ); - -extern void glXUseXFont( Font font, int first, int count, int list ); - - - -/* GLX 1.1 and later */ -extern const char *glXQueryExtensionsString( Display *dpy, int screen ); - -extern const char *glXQueryServerString( Display *dpy, int screen, int name ); - -extern const char *glXGetClientString( Display *dpy, int name ); - - -/* GLX 1.2 and later */ -extern Display *glXGetCurrentDisplay( void ); - - -/* GLX 1.3 and later */ -extern GLXFBConfig *glXChooseFBConfig( Display *dpy, int screen, - const int *attribList, int *nitems ); - -extern int glXGetFBConfigAttrib( Display *dpy, GLXFBConfig config, - int attribute, int *value ); - -extern GLXFBConfig *glXGetFBConfigs( Display *dpy, int screen, - int *nelements ); - -extern XVisualInfo *glXGetVisualFromFBConfig( Display *dpy, - GLXFBConfig config ); - -extern GLXWindow glXCreateWindow( Display *dpy, GLXFBConfig config, - Window win, const int *attribList ); - -extern void glXDestroyWindow( Display *dpy, GLXWindow window ); - -extern GLXPixmap glXCreatePixmap( Display *dpy, GLXFBConfig config, - Pixmap pixmap, const int *attribList ); - -extern void glXDestroyPixmap( Display *dpy, GLXPixmap pixmap ); - -extern GLXPbuffer glXCreatePbuffer( Display *dpy, GLXFBConfig config, - const int *attribList ); - -extern void glXDestroyPbuffer( Display *dpy, GLXPbuffer pbuf ); - -extern void glXQueryDrawable( Display *dpy, GLXDrawable draw, int attribute, - unsigned int *value ); - -extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config, - int renderType, GLXContext shareList, - Bool direct ); - -extern Bool glXMakeContextCurrent( Display *dpy, GLXDrawable draw, - GLXDrawable read, GLXContext ctx ); - -extern GLXDrawable glXGetCurrentReadDrawable( void ); - -extern int glXQueryContext( Display *dpy, GLXContext ctx, int attribute, - int *value ); - -extern void glXSelectEvent( Display *dpy, GLXDrawable drawable, - unsigned long mask ); - -extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable, - unsigned long *mask ); - -/* GLX 1.3 function pointer typedefs */ -typedef GLXFBConfig * (* PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements); -typedef GLXFBConfig * (* PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements); -typedef int (* PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value); -typedef XVisualInfo * (* PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config); -typedef GLXWindow (* PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); -typedef void (* PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win); -typedef GLXPixmap (* PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); -typedef void (* PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap); -typedef GLXPbuffer (* PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list); -typedef void (* PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf); -typedef void (* PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); -typedef GLXContext (* PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); -typedef Bool (* PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); -typedef GLXDrawable (* PFNGLXGETCURRENTREADDRAWABLEPROC) (void); -typedef Display * (* PFNGLXGETCURRENTDISPLAYPROC) (void); -typedef int (* PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value); -typedef void (* PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask); -typedef void (* PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask); - - -/* - * ARB 2. GLX_ARB_get_proc_address - */ -#ifndef GLX_ARB_get_proc_address -#define GLX_ARB_get_proc_address 1 - -typedef void (*__GLXextFuncPtr)(void); -extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *); - -#endif /* GLX_ARB_get_proc_address */ - - - -/* GLX 1.4 and later */ -extern void (*glXGetProcAddress(const GLubyte *procname))( void ); - -/* GLX 1.4 function pointer typedefs */ -typedef __GLXextFuncPtr (* PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName); - - -#ifndef GLX_GLXEXT_LEGACY - -#include - -#endif /* GLX_GLXEXT_LEGACY */ - - -/** - ** The following aren't in glxext.h yet. - **/ - - -/* - * ???. GLX_NV_vertex_array_range - */ -#ifndef GLX_NV_vertex_array_range -#define GLX_NV_vertex_array_range - -extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); -extern void glXFreeMemoryNV(GLvoid *pointer); -typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); -typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer); - -#endif /* GLX_NV_vertex_array_range */ - - -/* - * ARB ?. GLX_ARB_render_texture - * XXX This was never finalized! - */ -#ifndef GLX_ARB_render_texture -#define GLX_ARB_render_texture 1 - -extern Bool glXBindTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer); -extern Bool glXReleaseTexImageARB(Display *dpy, GLXPbuffer pbuffer, int buffer); -extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attribList); - -#endif /* GLX_ARB_render_texture */ - - -/* - * Remove this when glxext.h is updated. - */ -#ifndef GLX_NV_float_buffer -#define GLX_NV_float_buffer 1 - -#define GLX_FLOAT_COMPONENTS_NV 0x20B0 - -#endif /* GLX_NV_float_buffer */ - - - -/* - * #?. GLX_MESA_swap_frame_usage - */ -#ifndef GLX_MESA_swap_frame_usage -#define GLX_MESA_swap_frame_usage 1 - -extern int glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, float *usage); -extern int glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable); -extern int glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable); -extern int glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage); - -typedef int (*PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, float *usage); -typedef int (*PFNGLXBEGINFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable); -typedef int (*PFNGLXENDFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable); -typedef int (*PFNGLXQUERYFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage); - -#endif /* GLX_MESA_swap_frame_usage */ - - - -/* - * #?. GLX_MESA_swap_control - */ -#ifndef GLX_MESA_swap_control -#define GLX_MESA_swap_control 1 - -extern int glXSwapIntervalMESA(unsigned int interval); -extern int glXGetSwapIntervalMESA(void); - -typedef int (*PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval); -typedef int (*PFNGLXGETSWAPINTERVALMESAPROC)(void); - -#endif /* GLX_MESA_swap_control */ - - - -/* - * #?. GLX_EXT_texture_from_pixmap - * XXX not finished? - */ -#ifndef GLX_EXT_texture_from_pixmap -#define GLX_EXT_texture_from_pixmap 1 - -#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0 -#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1 -#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2 -#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3 -#define GLX_Y_INVERTED_EXT 0x20D4 - -#define GLX_TEXTURE_FORMAT_EXT 0x20D5 -#define GLX_TEXTURE_TARGET_EXT 0x20D6 -#define GLX_MIPMAP_TEXTURE_EXT 0x20D7 - -#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8 -#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9 -#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA - -#define GLX_TEXTURE_1D_BIT_EXT 0x00000001 -#define GLX_TEXTURE_2D_BIT_EXT 0x00000002 -#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 - -#define GLX_TEXTURE_1D_EXT 0x20DB -#define GLX_TEXTURE_2D_EXT 0x20DC -#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD - -#define GLX_FRONT_LEFT_EXT 0x20DE -#define GLX_FRONT_RIGHT_EXT 0x20DF -#define GLX_BACK_LEFT_EXT 0x20E0 -#define GLX_BACK_RIGHT_EXT 0x20E1 -#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT -#define GLX_BACK_EXT GLX_BACK_LEFT_EXT -#define GLX_AUX0_EXT 0x20E2 -#define GLX_AUX1_EXT 0x20E3 -#define GLX_AUX2_EXT 0x20E4 -#define GLX_AUX3_EXT 0x20E5 -#define GLX_AUX4_EXT 0x20E6 -#define GLX_AUX5_EXT 0x20E7 -#define GLX_AUX6_EXT 0x20E8 -#define GLX_AUX7_EXT 0x20E9 -#define GLX_AUX8_EXT 0x20EA -#define GLX_AUX9_EXT 0x20EB - -extern void glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list); -extern void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer); - -#endif /* GLX_EXT_texture_from_pixmap */ - - - - -/*** Should these go here, or in another header? */ -/* -** GLX Events -*/ -typedef struct { - int event_type; /* GLX_DAMAGED or GLX_SAVED */ - int draw_type; /* GLX_WINDOW or GLX_PBUFFER */ - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came for SendEvent request */ - Display *display; /* display the event was read from */ - GLXDrawable drawable; /* XID of Drawable */ - unsigned int buffer_mask; /* mask indicating which buffers are affected */ - unsigned int aux_buffer; /* which aux buffer was affected */ - int x, y; - int width, height; - int count; /* if nonzero, at least this many more */ -} GLXPbufferClobberEvent; - -typedef struct { - int type; - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came from a SendEvent request */ - Display *display; /* Display the event was read from */ - GLXDrawable drawable; /* drawable on which event was requested in event mask */ - int event_type; - int64_t ust; - int64_t msc; - int64_t sbc; -} GLXBufferSwapComplete; - -typedef union __GLXEvent { - GLXPbufferClobberEvent glxpbufferclobber; - GLXBufferSwapComplete glxbufferswapcomplete; - long pad[24]; -} GLXEvent; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/dll/opengl/mesa/include/GL/glx_mangle.h b/dll/opengl/mesa/include/GL/glx_mangle.h deleted file mode 100644 index fa664a7f59e..00000000000 --- a/dll/opengl/mesa/include/GL/glx_mangle.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef GLX_MANGLE_H -#define GLX_MANGLE_H - -#define glXChooseVisual mglXChooseVisual -#define glXCreateContext mglXCreateContext -#define glXDestroyContext mglXDestroyContext -#define glXMakeCurrent mglXMakeCurrent -#define glXCopyContext mglXCopyContext -#define glXSwapBuffers mglXSwapBuffers -#define glXCreateGLXPixmap mglXCreateGLXPixmap -#define glXDestroyGLXPixmap mglXDestroyGLXPixmap -#define glXQueryExtension mglXQueryExtension -#define glXQueryVersion mglXQueryVersion -#define glXIsDirect mglXIsDirect -#define glXGetConfig mglXGetConfig -#define glXGetCurrentContext mglXGetCurrentContext -#define glXGetCurrentDrawable mglXGetCurrentDrawable -#define glXWaitGL mglXWaitGL -#define glXWaitX mglXWaitX -#define glXUseXFont mglXUseXFont -#define glXQueryExtensionsString mglXQueryExtensionsString -#define glXQueryServerString mglXQueryServerString -#define glXGetClientString mglXGetClientString -#define glXCreateGLXPixmapMESA mglXCreateGLXPixmapMESA -#define glXReleaseBuffersMESA mglXReleaseBuffersMESA -#define glXCopySubBufferMESA mglXCopySubBufferMESA -#define glXGetVideoSyncSGI mglXGetVideoSyncSGI -#define glXWaitVideoSyncSGI mglXWaitVideoSyncSGI - -/* GLX 1.2 */ -#define glXGetCurrentDisplay mglXGetCurrentDisplay - -/* GLX 1.3 */ -#define glXChooseFBConfig mglXChooseFBConfig -#define glXGetFBConfigAttrib mglXGetFBConfigAttrib -#define glXGetFBConfigs mglXGetFBConfigs -#define glXGetVisualFromFBConfig mglXGetVisualFromFBConfig -#define glXCreateWindow mglXCreateWindow -#define glXDestroyWindow mglXDestroyWindow -#define glXCreatePixmap mglXCreatePixmap -#define glXDestroyPixmap mglXDestroyPixmap -#define glXCreatePbuffer mglXCreatePbuffer -#define glXDestroyPbuffer mglXDestroyPbuffer -#define glXQueryDrawable mglXQueryDrawable -#define glXCreateNewContext mglXCreateNewContext -#define glXMakeContextCurrent mglXMakeContextCurrent -#define glXGetCurrentReadDrawable mglXGetCurrentReadDrawable -#define glXQueryContext mglXQueryContext -#define glXSelectEvent mglXSelectEvent -#define glXGetSelectedEvent mglXGetSelectedEvent - -/* GLX 1.4 */ -#define glXGetProcAddress mglXGetProcAddress -#define glXGetProcAddressARB mglXGetProcAddressARB - - -#endif diff --git a/dll/opengl/mesa/include/GL/glxext.h b/dll/opengl/mesa/include/GL/glxext.h deleted file mode 100644 index 3c47dc363e0..00000000000 --- a/dll/opengl/mesa/include/GL/glxext.h +++ /dev/null @@ -1,993 +0,0 @@ -#ifndef __glxext_h_ -#define __glxext_h_ - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2007-2010 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ - -/* Function declaration macros - to move into glplatform.h */ - -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) -#define WIN32_LEAN_AND_MEAN 1 -#include -#endif - -#ifndef APIENTRY -#define APIENTRY -#endif -#ifndef APIENTRYP -#define APIENTRYP APIENTRY * -#endif -#ifndef GLAPI -#define GLAPI extern -#endif - -/*************************************************************/ - -/* Header file version number, required by OpenGL ABI for Linux */ -/* glxext.h last updated 2010/08/06 */ -/* Current version at http://www.opengl.org/registry/ */ -#define GLX_GLXEXT_VERSION 32 - -#ifndef GLX_VERSION_1_3 -#define GLX_WINDOW_BIT 0x00000001 -#define GLX_PIXMAP_BIT 0x00000002 -#define GLX_PBUFFER_BIT 0x00000004 -#define GLX_RGBA_BIT 0x00000001 -#define GLX_COLOR_INDEX_BIT 0x00000002 -#define GLX_PBUFFER_CLOBBER_MASK 0x08000000 -#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 -#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 -#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 -#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 -#define GLX_AUX_BUFFERS_BIT 0x00000010 -#define GLX_DEPTH_BUFFER_BIT 0x00000020 -#define GLX_STENCIL_BUFFER_BIT 0x00000040 -#define GLX_ACCUM_BUFFER_BIT 0x00000080 -#define GLX_CONFIG_CAVEAT 0x20 -#define GLX_X_VISUAL_TYPE 0x22 -#define GLX_TRANSPARENT_TYPE 0x23 -#define GLX_TRANSPARENT_INDEX_VALUE 0x24 -#define GLX_TRANSPARENT_RED_VALUE 0x25 -#define GLX_TRANSPARENT_GREEN_VALUE 0x26 -#define GLX_TRANSPARENT_BLUE_VALUE 0x27 -#define GLX_TRANSPARENT_ALPHA_VALUE 0x28 -#define GLX_DONT_CARE 0xFFFFFFFF -#define GLX_NONE 0x8000 -#define GLX_SLOW_CONFIG 0x8001 -#define GLX_TRUE_COLOR 0x8002 -#define GLX_DIRECT_COLOR 0x8003 -#define GLX_PSEUDO_COLOR 0x8004 -#define GLX_STATIC_COLOR 0x8005 -#define GLX_GRAY_SCALE 0x8006 -#define GLX_STATIC_GRAY 0x8007 -#define GLX_TRANSPARENT_RGB 0x8008 -#define GLX_TRANSPARENT_INDEX 0x8009 -#define GLX_VISUAL_ID 0x800B -#define GLX_SCREEN 0x800C -#define GLX_NON_CONFORMANT_CONFIG 0x800D -#define GLX_DRAWABLE_TYPE 0x8010 -#define GLX_RENDER_TYPE 0x8011 -#define GLX_X_RENDERABLE 0x8012 -#define GLX_FBCONFIG_ID 0x8013 -#define GLX_RGBA_TYPE 0x8014 -#define GLX_COLOR_INDEX_TYPE 0x8015 -#define GLX_MAX_PBUFFER_WIDTH 0x8016 -#define GLX_MAX_PBUFFER_HEIGHT 0x8017 -#define GLX_MAX_PBUFFER_PIXELS 0x8018 -#define GLX_PRESERVED_CONTENTS 0x801B -#define GLX_LARGEST_PBUFFER 0x801C -#define GLX_WIDTH 0x801D -#define GLX_HEIGHT 0x801E -#define GLX_EVENT_MASK 0x801F -#define GLX_DAMAGED 0x8020 -#define GLX_SAVED 0x8021 -#define GLX_WINDOW 0x8022 -#define GLX_PBUFFER 0x8023 -#define GLX_PBUFFER_HEIGHT 0x8040 -#define GLX_PBUFFER_WIDTH 0x8041 -#endif - -#ifndef GLX_VERSION_1_4 -#define GLX_SAMPLE_BUFFERS 100000 -#define GLX_SAMPLES 100001 -#endif - -#ifndef GLX_ARB_get_proc_address -#endif - -#ifndef GLX_ARB_multisample -#define GLX_SAMPLE_BUFFERS_ARB 100000 -#define GLX_SAMPLES_ARB 100001 -#endif - -#ifndef GLX_ARB_vertex_buffer_object -#define GLX_CONTEXT_ALLOW_BUFFER_BYTE_ORDER_MISMATCH_ARB 0x2095 -#endif - -#ifndef GLX_ARB_fbconfig_float -#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9 -#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004 -#endif - -#ifndef GLX_ARB_framebuffer_sRGB -#define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2 -#endif - -#ifndef GLX_ARB_create_context -#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001 -#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 -#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 -#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 -#define GLX_CONTEXT_FLAGS_ARB 0x2094 -#endif - -#ifndef GLX_ARB_create_context_profile -#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 -#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 -#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126 -#endif - -#ifndef GLX_ARB_create_context_robustness -#define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 -#define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252 -#define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 -#define GLX_NO_RESET_NOTIFICATION_ARB 0x8261 -#endif - -#ifndef GLX_SGIS_multisample -#define GLX_SAMPLE_BUFFERS_SGIS 100000 -#define GLX_SAMPLES_SGIS 100001 -#endif - -#ifndef GLX_EXT_visual_info -#define GLX_X_VISUAL_TYPE_EXT 0x22 -#define GLX_TRANSPARENT_TYPE_EXT 0x23 -#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 -#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 -#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 -#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 -#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 -#define GLX_NONE_EXT 0x8000 -#define GLX_TRUE_COLOR_EXT 0x8002 -#define GLX_DIRECT_COLOR_EXT 0x8003 -#define GLX_PSEUDO_COLOR_EXT 0x8004 -#define GLX_STATIC_COLOR_EXT 0x8005 -#define GLX_GRAY_SCALE_EXT 0x8006 -#define GLX_STATIC_GRAY_EXT 0x8007 -#define GLX_TRANSPARENT_RGB_EXT 0x8008 -#define GLX_TRANSPARENT_INDEX_EXT 0x8009 -#endif - -#ifndef GLX_SGI_swap_control -#endif - -#ifndef GLX_SGI_video_sync -#endif - -#ifndef GLX_SGI_make_current_read -#endif - -#ifndef GLX_SGIX_video_source -#endif - -#ifndef GLX_EXT_visual_rating -#define GLX_VISUAL_CAVEAT_EXT 0x20 -#define GLX_SLOW_VISUAL_EXT 0x8001 -#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D -/* reuse GLX_NONE_EXT */ -#endif - -#ifndef GLX_EXT_import_context -#define GLX_SHARE_CONTEXT_EXT 0x800A -#define GLX_VISUAL_ID_EXT 0x800B -#define GLX_SCREEN_EXT 0x800C -#endif - -#ifndef GLX_SGIX_fbconfig -#define GLX_WINDOW_BIT_SGIX 0x00000001 -#define GLX_PIXMAP_BIT_SGIX 0x00000002 -#define GLX_RGBA_BIT_SGIX 0x00000001 -#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002 -#define GLX_DRAWABLE_TYPE_SGIX 0x8010 -#define GLX_RENDER_TYPE_SGIX 0x8011 -#define GLX_X_RENDERABLE_SGIX 0x8012 -#define GLX_FBCONFIG_ID_SGIX 0x8013 -#define GLX_RGBA_TYPE_SGIX 0x8014 -#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015 -/* reuse GLX_SCREEN_EXT */ -#endif - -#ifndef GLX_SGIX_pbuffer -#define GLX_PBUFFER_BIT_SGIX 0x00000004 -#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000 -#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001 -#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002 -#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004 -#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008 -#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010 -#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020 -#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040 -#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080 -#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100 -#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016 -#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017 -#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018 -#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019 -#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A -#define GLX_PRESERVED_CONTENTS_SGIX 0x801B -#define GLX_LARGEST_PBUFFER_SGIX 0x801C -#define GLX_WIDTH_SGIX 0x801D -#define GLX_HEIGHT_SGIX 0x801E -#define GLX_EVENT_MASK_SGIX 0x801F -#define GLX_DAMAGED_SGIX 0x8020 -#define GLX_SAVED_SGIX 0x8021 -#define GLX_WINDOW_SGIX 0x8022 -#define GLX_PBUFFER_SGIX 0x8023 -#endif - -#ifndef GLX_SGI_cushion -#endif - -#ifndef GLX_SGIX_video_resize -#define GLX_SYNC_FRAME_SGIX 0x00000000 -#define GLX_SYNC_SWAP_SGIX 0x00000001 -#endif - -#ifndef GLX_SGIX_dmbuffer -#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX 0x8024 -#endif - -#ifndef GLX_SGIX_swap_group -#endif - -#ifndef GLX_SGIX_swap_barrier -#endif - -#ifndef GLX_SGIS_blended_overlay -#define GLX_BLENDED_RGBA_SGIS 0x8025 -#endif - -#ifndef GLX_SGIS_shared_multisample -#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026 -#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027 -#endif - -#ifndef GLX_SUN_get_transparent_index -#endif - -#ifndef GLX_3DFX_multisample -#define GLX_SAMPLE_BUFFERS_3DFX 0x8050 -#define GLX_SAMPLES_3DFX 0x8051 -#endif - -#ifndef GLX_MESA_copy_sub_buffer -#endif - -#ifndef GLX_MESA_pixmap_colormap -#endif - -#ifndef GLX_MESA_release_buffers -#endif - -#ifndef GLX_MESA_set_3dfx_mode -#define GLX_3DFX_WINDOW_MODE_MESA 0x1 -#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2 -#endif - -#ifndef GLX_SGIX_visual_select_group -#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028 -#endif - -#ifndef GLX_OML_swap_method -#define GLX_SWAP_METHOD_OML 0x8060 -#define GLX_SWAP_EXCHANGE_OML 0x8061 -#define GLX_SWAP_COPY_OML 0x8062 -#define GLX_SWAP_UNDEFINED_OML 0x8063 -#endif - -#ifndef GLX_OML_sync_control -#endif - -#ifndef GLX_NV_float_buffer -#define GLX_FLOAT_COMPONENTS_NV 0x20B0 -#endif - -#ifndef GLX_SGIX_hyperpipe -#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80 -#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91 -#define GLX_BAD_HYPERPIPE_SGIX 92 -#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001 -#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002 -#define GLX_PIPE_RECT_SGIX 0x00000001 -#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002 -#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003 -#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004 -#define GLX_HYPERPIPE_ID_SGIX 0x8030 -#endif - -#ifndef GLX_MESA_agp_offset -#endif - -#ifndef GLX_EXT_fbconfig_packed_float -#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1 -#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008 -#endif - -#ifndef GLX_EXT_framebuffer_sRGB -#define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2 -#endif - -#ifndef GLX_EXT_texture_from_pixmap -#define GLX_TEXTURE_1D_BIT_EXT 0x00000001 -#define GLX_TEXTURE_2D_BIT_EXT 0x00000002 -#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004 -#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0 -#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1 -#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2 -#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3 -#define GLX_Y_INVERTED_EXT 0x20D4 -#define GLX_TEXTURE_FORMAT_EXT 0x20D5 -#define GLX_TEXTURE_TARGET_EXT 0x20D6 -#define GLX_MIPMAP_TEXTURE_EXT 0x20D7 -#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8 -#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9 -#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA -#define GLX_TEXTURE_1D_EXT 0x20DB -#define GLX_TEXTURE_2D_EXT 0x20DC -#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD -#define GLX_FRONT_LEFT_EXT 0x20DE -#define GLX_FRONT_RIGHT_EXT 0x20DF -#define GLX_BACK_LEFT_EXT 0x20E0 -#define GLX_BACK_RIGHT_EXT 0x20E1 -#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT -#define GLX_BACK_EXT GLX_BACK_LEFT_EXT -#define GLX_AUX0_EXT 0x20E2 -#define GLX_AUX1_EXT 0x20E3 -#define GLX_AUX2_EXT 0x20E4 -#define GLX_AUX3_EXT 0x20E5 -#define GLX_AUX4_EXT 0x20E6 -#define GLX_AUX5_EXT 0x20E7 -#define GLX_AUX6_EXT 0x20E8 -#define GLX_AUX7_EXT 0x20E9 -#define GLX_AUX8_EXT 0x20EA -#define GLX_AUX9_EXT 0x20EB -#endif - -#ifndef GLX_NV_present_video -#define GLX_NUM_VIDEO_SLOTS_NV 0x20F0 -#endif - -#ifndef GLX_NV_video_out -#define GLX_VIDEO_OUT_COLOR_NV 0x20C3 -#define GLX_VIDEO_OUT_ALPHA_NV 0x20C4 -#define GLX_VIDEO_OUT_DEPTH_NV 0x20C5 -#define GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 -#define GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 -#define GLX_VIDEO_OUT_FRAME_NV 0x20C8 -#define GLX_VIDEO_OUT_FIELD_1_NV 0x20C9 -#define GLX_VIDEO_OUT_FIELD_2_NV 0x20CA -#define GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB -#define GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC -#endif - -#ifndef GLX_NV_swap_group -#endif - -#ifndef GLX_NV_video_capture -#define GLX_DEVICE_ID_NV 0x20CD -#define GLX_UNIQUE_ID_NV 0x20CE -#define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF -#endif - -#ifndef GLX_EXT_swap_control -#define GLX_SWAP_INTERVAL_EXT 0x20F1 -#define GLX_MAX_SWAP_INTERVAL_EXT 0x20F2 -#endif - -#ifndef GLX_NV_copy_image -#endif - -#ifndef GLX_INTEL_swap_event -#define GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK 0x04000000 -#define GLX_EXCHANGE_COMPLETE_INTEL 0x8180 -#define GLX_COPY_COMPLETE_INTEL 0x8181 -#define GLX_FLIP_COMPLETE_INTEL 0x8182 -#endif - -#ifndef GLX_NV_multisample_coverage -#define GLX_COVERAGE_SAMPLES_NV 100001 -#define GLX_COLOR_SAMPLES_NV 0x20B3 -#endif - -#ifndef GLX_AMD_gpu_association -#define GLX_GPU_VENDOR_AMD 0x1F00 -#define GLX_GPU_RENDERER_STRING_AMD 0x1F01 -#define GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 -#define GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 -#define GLX_GPU_RAM_AMD 0x21A3 -#define GLX_GPU_CLOCK_AMD 0x21A4 -#define GLX_GPU_NUM_PIPES_AMD 0x21A5 -#define GLX_GPU_NUM_SIMD_AMD 0x21A6 -#define GLX_GPU_NUM_RB_AMD 0x21A7 -#define GLX_GPU_NUM_SPI_AMD 0x21A8 -#endif - -#ifndef GLX_EXT_create_context_es2_profile -#define GLX_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 -#endif - - -/*************************************************************/ - -#ifndef GLX_ARB_get_proc_address -typedef void (*__GLXextFuncPtr)(void); -#endif - -#ifndef GLX_SGIX_video_source -typedef XID GLXVideoSourceSGIX; -#endif - -#ifndef GLX_SGIX_fbconfig -typedef XID GLXFBConfigIDSGIX; -typedef struct __GLXFBConfigRec *GLXFBConfigSGIX; -#endif - -#ifndef GLX_SGIX_pbuffer -typedef XID GLXPbufferSGIX; -typedef struct { - int type; - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came for SendEvent request */ - Display *display; /* display the event was read from */ - GLXDrawable drawable; /* i.d. of Drawable */ - int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */ - int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */ - unsigned int mask; /* mask indicating which buffers are affected*/ - int x, y; - int width, height; - int count; /* if nonzero, at least this many more */ -} GLXBufferClobberEventSGIX; -#endif - -#ifndef GLX_NV_video_output -typedef unsigned int GLXVideoDeviceNV; -#endif - -#ifndef GLX_NV_video_capture -typedef XID GLXVideoCaptureDeviceNV; -#endif - -#ifndef GLEXT_64_TYPES_DEFINED -/* This code block is duplicated in glext.h, so must be protected */ -#define GLEXT_64_TYPES_DEFINED -/* Define int32_t, int64_t, and uint64_t types for UST/MSC */ -/* (as used in the GLX_OML_sync_control extension). */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -#include -#elif defined(__sun__) || defined(__digital__) -#include -#if defined(__STDC__) -#if defined(__arch64__) || defined(_LP64) -typedef long int int64_t; -typedef unsigned long int uint64_t; -#else -typedef long long int int64_t; -typedef unsigned long long int uint64_t; -#endif /* __arch64__ */ -#endif /* __STDC__ */ -#elif defined( __VMS ) || defined(__sgi) -#include -#elif defined(__SCO__) || defined(__USLC__) -#include -#elif defined(__UNIXOS2__) || defined(__SOL64__) -typedef long int int32_t; -typedef long long int int64_t; -typedef unsigned long long int uint64_t; -#elif defined(_WIN32) && defined(__GNUC__) -#include -#elif defined(_WIN32) -typedef __int32 int32_t; -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; -#else -#include /* Fallback option */ -#endif -#endif - -#ifndef GLX_VERSION_1_3 -#define GLX_VERSION_1_3 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern GLXFBConfig * glXGetFBConfigs (Display *dpy, int screen, int *nelements); -extern GLXFBConfig * glXChooseFBConfig (Display *dpy, int screen, const int *attrib_list, int *nelements); -extern int glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value); -extern XVisualInfo * glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config); -extern GLXWindow glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); -extern void glXDestroyWindow (Display *dpy, GLXWindow win); -extern GLXPixmap glXCreatePixmap (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); -extern void glXDestroyPixmap (Display *dpy, GLXPixmap pixmap); -extern GLXPbuffer glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attrib_list); -extern void glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf); -extern void glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); -extern GLXContext glXCreateNewContext (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); -extern Bool glXMakeContextCurrent (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); -extern GLXDrawable glXGetCurrentReadDrawable (void); -extern Display * glXGetCurrentDisplay (void); -extern int glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value); -extern void glXSelectEvent (Display *dpy, GLXDrawable draw, unsigned long event_mask); -extern void glXGetSelectedEvent (Display *dpy, GLXDrawable draw, unsigned long *event_mask); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements); -typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements); -typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value); -typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config); -typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); -typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win); -typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); -typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap); -typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list); -typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf); -typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); -typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); -typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); -typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void); -typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void); -typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value); -typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask); -typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask); -#endif - -#ifndef GLX_VERSION_1_4 -#define GLX_VERSION_1_4 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *procName); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName); -#endif - -#ifndef GLX_ARB_get_proc_address -#define GLX_ARB_get_proc_address 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *procName); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName); -#endif - -#ifndef GLX_ARB_multisample -#define GLX_ARB_multisample 1 -#endif - -#ifndef GLX_ARB_fbconfig_float -#define GLX_ARB_fbconfig_float 1 -#endif - -#ifndef GLX_ARB_framebuffer_sRGB -#define GLX_ARB_framebuffer_sRGB 1 -#endif - -#ifndef GLX_ARB_create_context -#define GLX_ARB_create_context 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern GLXContext glXCreateContextAttribsARB (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list); -#endif - -#ifndef GLX_ARB_create_context_profile -#define GLX_ARB_create_context_profile 1 -#endif - -#ifndef GLX_ARB_create_context_robustness -#define GLX_ARB_create_context_robustness 1 -#endif - -#ifndef GLX_SGIS_multisample -#define GLX_SGIS_multisample 1 -#endif - -#ifndef GLX_EXT_visual_info -#define GLX_EXT_visual_info 1 -#endif - -#ifndef GLX_SGI_swap_control -#define GLX_SGI_swap_control 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern int glXSwapIntervalSGI (int interval); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval); -#endif - -#ifndef GLX_SGI_video_sync -#define GLX_SGI_video_sync 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern int glXGetVideoSyncSGI (unsigned int *count); -extern int glXWaitVideoSyncSGI (int divisor, int remainder, unsigned int *count); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count); -typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count); -#endif - -#ifndef GLX_SGI_make_current_read -#define GLX_SGI_make_current_read 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern Bool glXMakeCurrentReadSGI (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); -extern GLXDrawable glXGetCurrentReadDrawableSGI (void); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); -typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void); -#endif - -#ifndef GLX_SGIX_video_source -#define GLX_SGIX_video_source 1 -#ifdef _VL_H -#ifdef GLX_GLXEXT_PROTOTYPES -extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode); -extern void glXDestroyGLXVideoSourceSGIX (Display *dpy, GLXVideoSourceSGIX glxvideosource); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode); -typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource); -#endif /* _VL_H */ -#endif - -#ifndef GLX_EXT_visual_rating -#define GLX_EXT_visual_rating 1 -#endif - -#ifndef GLX_EXT_import_context -#define GLX_EXT_import_context 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern Display * glXGetCurrentDisplayEXT (void); -extern int glXQueryContextInfoEXT (Display *dpy, GLXContext context, int attribute, int *value); -extern GLXContextID glXGetContextIDEXT (const GLXContext context); -extern GLXContext glXImportContextEXT (Display *dpy, GLXContextID contextID); -extern void glXFreeContextEXT (Display *dpy, GLXContext context); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void); -typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value); -typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context); -typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID); -typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context); -#endif - -#ifndef GLX_SGIX_fbconfig -#define GLX_SGIX_fbconfig 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern int glXGetFBConfigAttribSGIX (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value); -extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *dpy, int screen, int *attrib_list, int *nelements); -extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap); -extern GLXContext glXCreateContextWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct); -extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *dpy, GLXFBConfigSGIX config); -extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *dpy, XVisualInfo *vis); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value); -typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements); -typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap); -typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct); -typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config); -typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis); -#endif - -#ifndef GLX_SGIX_pbuffer -#define GLX_SGIX_pbuffer 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list); -extern void glXDestroyGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf); -extern int glXQueryGLXPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value); -extern void glXSelectEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long mask); -extern void glXGetSelectedEventSGIX (Display *dpy, GLXDrawable drawable, unsigned long *mask); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list); -typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf); -typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value); -typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask); -typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask); -#endif - -#ifndef GLX_SGI_cushion -#define GLX_SGI_cushion 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern void glXCushionSGI (Display *dpy, Window window, float cushion); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion); -#endif - -#ifndef GLX_SGIX_video_resize -#define GLX_SGIX_video_resize 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern int glXBindChannelToWindowSGIX (Display *display, int screen, int channel, Window window); -extern int glXChannelRectSGIX (Display *display, int screen, int channel, int x, int y, int w, int h); -extern int glXQueryChannelRectSGIX (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh); -extern int glXQueryChannelDeltasSGIX (Display *display, int screen, int channel, int *x, int *y, int *w, int *h); -extern int glXChannelRectSyncSGIX (Display *display, int screen, int channel, GLenum synctype); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window); -typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h); -typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh); -typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h); -typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype); -#endif - -#ifndef GLX_SGIX_dmbuffer -#define GLX_SGIX_dmbuffer 1 -#ifdef _DM_BUFFER_H_ -#ifdef GLX_GLXEXT_PROTOTYPES -extern Bool glXAssociateDMPbufferSGIX (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer); -#endif /* _DM_BUFFER_H_ */ -#endif - -#ifndef GLX_SGIX_swap_group -#define GLX_SGIX_swap_group 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern void glXJoinSwapGroupSGIX (Display *dpy, GLXDrawable drawable, GLXDrawable member); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member); -#endif - -#ifndef GLX_SGIX_swap_barrier -#define GLX_SGIX_swap_barrier 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern void glXBindSwapBarrierSGIX (Display *dpy, GLXDrawable drawable, int barrier); -extern Bool glXQueryMaxSwapBarriersSGIX (Display *dpy, int screen, int *max); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier); -typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max); -#endif - -#ifndef GLX_SUN_get_transparent_index -#define GLX_SUN_get_transparent_index 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern Status glXGetTransparentIndexSUN (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex); -#endif - -#ifndef GLX_MESA_copy_sub_buffer -#define GLX_MESA_copy_sub_buffer 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern void glXCopySubBufferMESA (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height); -#endif - -#ifndef GLX_MESA_pixmap_colormap -#define GLX_MESA_pixmap_colormap 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern GLXPixmap glXCreateGLXPixmapMESA (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap); -#endif - -#ifndef GLX_MESA_release_buffers -#define GLX_MESA_release_buffers 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern Bool glXReleaseBuffersMESA (Display *dpy, GLXDrawable drawable); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable); -#endif - -#ifndef GLX_MESA_set_3dfx_mode -#define GLX_MESA_set_3dfx_mode 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern Bool glXSet3DfxModeMESA (int mode); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode); -#endif - -#ifndef GLX_SGIX_visual_select_group -#define GLX_SGIX_visual_select_group 1 -#endif - -#ifndef GLX_OML_swap_method -#define GLX_OML_swap_method 1 -#endif - -#ifndef GLX_OML_sync_control -#define GLX_OML_sync_control 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern Bool glXGetSyncValuesOML (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc); -extern Bool glXGetMscRateOML (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator); -extern int64_t glXSwapBuffersMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder); -extern Bool glXWaitForMscOML (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc); -extern Bool glXWaitForSbcOML (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc); -typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator); -typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder); -typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc); -typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc); -#endif - -#ifndef GLX_NV_float_buffer -#define GLX_NV_float_buffer 1 -#endif - -#ifndef GLX_SGIX_hyperpipe -#define GLX_SGIX_hyperpipe 1 - -typedef struct { - char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; - int networkId; -} GLXHyperpipeNetworkSGIX; - -typedef struct { - char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; - int channel; - unsigned int - participationType; - int timeSlice; -} GLXHyperpipeConfigSGIX; - -typedef struct { - char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; - int srcXOrigin, srcYOrigin, srcWidth, srcHeight; - int destXOrigin, destYOrigin, destWidth, destHeight; -} GLXPipeRect; - -typedef struct { - char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; - int XOrigin, YOrigin, maxHeight, maxWidth; -} GLXPipeRectLimits; - -#ifdef GLX_GLXEXT_PROTOTYPES -extern GLXHyperpipeNetworkSGIX * glXQueryHyperpipeNetworkSGIX (Display *dpy, int *npipes); -extern int glXHyperpipeConfigSGIX (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId); -extern GLXHyperpipeConfigSGIX * glXQueryHyperpipeConfigSGIX (Display *dpy, int hpId, int *npipes); -extern int glXDestroyHyperpipeConfigSGIX (Display *dpy, int hpId); -extern int glXBindHyperpipeSGIX (Display *dpy, int hpId); -extern int glXQueryHyperpipeBestAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList); -extern int glXHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *attribList); -extern int glXQueryHyperpipeAttribSGIX (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef GLXHyperpipeNetworkSGIX * ( * PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display *dpy, int *npipes); -typedef int ( * PFNGLXHYPERPIPECONFIGSGIXPROC) (Display *dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX *cfg, int *hpId); -typedef GLXHyperpipeConfigSGIX * ( * PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId, int *npipes); -typedef int ( * PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display *dpy, int hpId); -typedef int ( * PFNGLXBINDHYPERPIPESGIXPROC) (Display *dpy, int hpId); -typedef int ( * PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList, void *returnAttribList); -typedef int ( * PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *attribList); -typedef int ( * PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display *dpy, int timeSlice, int attrib, int size, void *returnAttribList); -#endif - -#ifndef GLX_MESA_agp_offset -#define GLX_MESA_agp_offset 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern unsigned int glXGetAGPOffsetMESA (const void *pointer); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef unsigned int ( * PFNGLXGETAGPOFFSETMESAPROC) (const void *pointer); -#endif - -#ifndef GLX_EXT_fbconfig_packed_float -#define GLX_EXT_fbconfig_packed_float 1 -#endif - -#ifndef GLX_EXT_framebuffer_sRGB -#define GLX_EXT_framebuffer_sRGB 1 -#endif - -#ifndef GLX_EXT_texture_from_pixmap -#define GLX_EXT_texture_from_pixmap 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern void glXBindTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list); -extern void glXReleaseTexImageEXT (Display *dpy, GLXDrawable drawable, int buffer); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list); -typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer); -#endif - -#ifndef GLX_NV_present_video -#define GLX_NV_present_video 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern unsigned int * glXEnumerateVideoDevicesNV (Display *dpy, int screen, int *nelements); -extern int glXBindVideoDeviceNV (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef unsigned int * ( * PFNGLXENUMERATEVIDEODEVICESNVPROC) (Display *dpy, int screen, int *nelements); -typedef int ( * PFNGLXBINDVIDEODEVICENVPROC) (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list); -#endif - -#ifndef GLX_NV_video_output -#define GLX_NV_video_output 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern int glXGetVideoDeviceNV (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice); -extern int glXReleaseVideoDeviceNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice); -extern int glXBindVideoImageNV (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer); -extern int glXReleaseVideoImageNV (Display *dpy, GLXPbuffer pbuf); -extern int glXSendPbufferToVideoNV (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock); -extern int glXGetVideoInfoNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef int ( * PFNGLXGETVIDEODEVICENVPROC) (Display *dpy, int screen, int numVideoDevices, GLXVideoDeviceNV *pVideoDevice); -typedef int ( * PFNGLXRELEASEVIDEODEVICENVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice); -typedef int ( * PFNGLXBINDVIDEOIMAGENVPROC) (Display *dpy, GLXVideoDeviceNV VideoDevice, GLXPbuffer pbuf, int iVideoBuffer); -typedef int ( * PFNGLXRELEASEVIDEOIMAGENVPROC) (Display *dpy, GLXPbuffer pbuf); -typedef int ( * PFNGLXSENDPBUFFERTOVIDEONVPROC) (Display *dpy, GLXPbuffer pbuf, int iBufferType, unsigned long *pulCounterPbuffer, GLboolean bBlock); -typedef int ( * PFNGLXGETVIDEOINFONVPROC) (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); -#endif - -#ifndef GLX_NV_swap_group -#define GLX_NV_swap_group 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern Bool glXJoinSwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint group); -extern Bool glXBindSwapBarrierNV (Display *dpy, GLuint group, GLuint barrier); -extern Bool glXQuerySwapGroupNV (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier); -extern Bool glXQueryMaxSwapGroupsNV (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers); -extern Bool glXQueryFrameCountNV (Display *dpy, int screen, GLuint *count); -extern Bool glXResetFrameCountNV (Display *dpy, int screen); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef Bool ( * PFNGLXJOINSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint group); -typedef Bool ( * PFNGLXBINDSWAPBARRIERNVPROC) (Display *dpy, GLuint group, GLuint barrier); -typedef Bool ( * PFNGLXQUERYSWAPGROUPNVPROC) (Display *dpy, GLXDrawable drawable, GLuint *group, GLuint *barrier); -typedef Bool ( * PFNGLXQUERYMAXSWAPGROUPSNVPROC) (Display *dpy, int screen, GLuint *maxGroups, GLuint *maxBarriers); -typedef Bool ( * PFNGLXQUERYFRAMECOUNTNVPROC) (Display *dpy, int screen, GLuint *count); -typedef Bool ( * PFNGLXRESETFRAMECOUNTNVPROC) (Display *dpy, int screen); -#endif - -#ifndef GLX_NV_video_capture -#define GLX_NV_video_capture 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern int glXBindVideoCaptureDeviceNV (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device); -extern GLXVideoCaptureDeviceNV * glXEnumerateVideoCaptureDevicesNV (Display *dpy, int screen, int *nelements); -extern void glXLockVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device); -extern int glXQueryVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value); -extern void glXReleaseVideoCaptureDeviceNV (Display *dpy, GLXVideoCaptureDeviceNV device); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef int ( * PFNGLXBINDVIDEOCAPTUREDEVICENVPROC) (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device); -typedef GLXVideoCaptureDeviceNV * ( * PFNGLXENUMERATEVIDEOCAPTUREDEVICESNVPROC) (Display *dpy, int screen, int *nelements); -typedef void ( * PFNGLXLOCKVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device); -typedef int ( * PFNGLXQUERYVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value); -typedef void ( * PFNGLXRELEASEVIDEOCAPTUREDEVICENVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device); -#endif - -#ifndef GLX_EXT_swap_control -#define GLX_EXT_swap_control 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern int glXSwapIntervalEXT (Display *dpy, GLXDrawable drawable, int interval); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef int ( * PFNGLXSWAPINTERVALEXTPROC) (Display *dpy, GLXDrawable drawable, int interval); -#endif - -#ifndef GLX_NV_copy_image -#define GLX_NV_copy_image 1 -#ifdef GLX_GLXEXT_PROTOTYPES -extern void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); -#endif /* GLX_GLXEXT_PROTOTYPES */ -typedef void ( * PFNGLXCOPYIMAGESUBDATANVPROC) (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); -#endif - -#ifndef GLX_INTEL_swap_event -#define GLX_INTEL_swap_event 1 -#endif - -#ifndef GLX_NV_multisample_coverage -#define GLX_NV_multisample_coverage 1 -#endif - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/dll/opengl/mesa/include/GL/internal/dri_interface.h b/dll/opengl/mesa/include/GL/internal/dri_interface.h deleted file mode 100644 index b21445f1046..00000000000 --- a/dll/opengl/mesa/include/GL/internal/dri_interface.h +++ /dev/null @@ -1,986 +0,0 @@ -/* - * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. - * Copyright 2007-2008 Red Hat, Inc. - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file dri_interface.h - * - * This file contains all the types and functions that define the interface - * between a DRI driver and driver loader. Currently, the most common driver - * loader is the XFree86 libGL.so. However, other loaders do exist, and in - * the future the server-side libglx.a will also be a loader. - * - * \author Kevin E. Martin - * \author Ian Romanick - * \author Kristian Høgsberg - */ - -#ifndef DRI_INTERFACE_H -#define DRI_INTERFACE_H - -/* For archs with no drm.h */ -#if defined(__APPLE__) || defined(__CYGWIN__) || defined(__GNU__) -#ifndef __NOT_HAVE_DRM_H -#define __NOT_HAVE_DRM_H -#endif -#endif - -#ifndef __NOT_HAVE_DRM_H -#include -#else -typedef unsigned int drm_context_t; -typedef unsigned int drm_drawable_t; -typedef struct drm_clip_rect drm_clip_rect_t; -#endif - -/** - * \name DRI interface structures - * - * The following structures define the interface between the GLX client - * side library and the DRI (direct rendering infrastructure). - */ -/*@{*/ -typedef struct __DRIdisplayRec __DRIdisplay; -typedef struct __DRIscreenRec __DRIscreen; -typedef struct __DRIcontextRec __DRIcontext; -typedef struct __DRIdrawableRec __DRIdrawable; -typedef struct __DRIconfigRec __DRIconfig; -typedef struct __DRIframebufferRec __DRIframebuffer; -typedef struct __DRIversionRec __DRIversion; - -typedef struct __DRIcoreExtensionRec __DRIcoreExtension; -typedef struct __DRIextensionRec __DRIextension; -typedef struct __DRIcopySubBufferExtensionRec __DRIcopySubBufferExtension; -typedef struct __DRIswapControlExtensionRec __DRIswapControlExtension; -typedef struct __DRIframeTrackingExtensionRec __DRIframeTrackingExtension; -typedef struct __DRImediaStreamCounterExtensionRec __DRImediaStreamCounterExtension; -typedef struct __DRItexOffsetExtensionRec __DRItexOffsetExtension; -typedef struct __DRItexBufferExtensionRec __DRItexBufferExtension; -typedef struct __DRIlegacyExtensionRec __DRIlegacyExtension; -typedef struct __DRIswrastExtensionRec __DRIswrastExtension; -typedef struct __DRIbufferRec __DRIbuffer; -typedef struct __DRIdri2ExtensionRec __DRIdri2Extension; -typedef struct __DRIdri2LoaderExtensionRec __DRIdri2LoaderExtension; -typedef struct __DRI2flushExtensionRec __DRI2flushExtension; -typedef struct __DRI2throttleExtensionRec __DRI2throttleExtension; - -/*@}*/ - - -/** - * Extension struct. Drivers 'inherit' from this struct by embedding - * it as the first element in the extension struct. - * - * We never break API in for a DRI extension. If we need to change - * the way things work in a non-backwards compatible manner, we - * introduce a new extension. During a transition period, we can - * leave both the old and the new extension in the driver, which - * allows us to move to the new interface without having to update the - * loader(s) in lock step. - * - * However, we can add entry points to an extension over time as long - * as we don't break the old ones. As we add entry points to an - * extension, we increase the version number. The corresponding - * #define can be used to guard code that accesses the new entry - * points at compile time and the version field in the extension - * struct can be used at run-time to determine how to use the - * extension. - */ -struct __DRIextensionRec { - const char *name; - int version; -}; - -/** - * The first set of extension are the screen extensions, returned by - * __DRIcore::getExtensions(). This entry point will return a list of - * extensions and the loader can use the ones it knows about by - * casting them to more specific extensions and advertising any GLX - * extensions the DRI extensions enables. - */ - -/** - * Used by drivers to indicate support for setting the read drawable. - */ -#define __DRI_READ_DRAWABLE "DRI_ReadDrawable" -#define __DRI_READ_DRAWABLE_VERSION 1 - -/** - * Used by drivers that implement the GLX_MESA_copy_sub_buffer extension. - */ -#define __DRI_COPY_SUB_BUFFER "DRI_CopySubBuffer" -#define __DRI_COPY_SUB_BUFFER_VERSION 1 -struct __DRIcopySubBufferExtensionRec { - __DRIextension base; - void (*copySubBuffer)(__DRIdrawable *drawable, int x, int y, int w, int h); -}; - -/** - * Used by drivers that implement the GLX_SGI_swap_control or - * GLX_MESA_swap_control extension. - */ -#define __DRI_SWAP_CONTROL "DRI_SwapControl" -#define __DRI_SWAP_CONTROL_VERSION 1 -struct __DRIswapControlExtensionRec { - __DRIextension base; - void (*setSwapInterval)(__DRIdrawable *drawable, unsigned int inteval); - unsigned int (*getSwapInterval)(__DRIdrawable *drawable); -}; - -/** - * Used by drivers that implement the GLX_MESA_swap_frame_usage extension. - */ -#define __DRI_FRAME_TRACKING "DRI_FrameTracking" -#define __DRI_FRAME_TRACKING_VERSION 1 -struct __DRIframeTrackingExtensionRec { - __DRIextension base; - - /** - * Enable or disable frame usage tracking. - * - * \since Internal API version 20030317. - */ - int (*frameTracking)(__DRIdrawable *drawable, GLboolean enable); - - /** - * Retrieve frame usage information. - * - * \since Internal API version 20030317. - */ - int (*queryFrameTracking)(__DRIdrawable *drawable, - int64_t * sbc, int64_t * missedFrames, - float * lastMissedUsage, float * usage); -}; - - -/** - * Used by drivers that implement the GLX_SGI_video_sync extension. - */ -#define __DRI_MEDIA_STREAM_COUNTER "DRI_MediaStreamCounter" -#define __DRI_MEDIA_STREAM_COUNTER_VERSION 1 -struct __DRImediaStreamCounterExtensionRec { - __DRIextension base; - - /** - * Wait for the MSC to equal target_msc, or, if that has already passed, - * the next time (MSC % divisor) is equal to remainder. If divisor is - * zero, the function will return as soon as MSC is greater than or equal - * to target_msc. - */ - int (*waitForMSC)(__DRIdrawable *drawable, - int64_t target_msc, int64_t divisor, int64_t remainder, - int64_t * msc, int64_t * sbc); - - /** - * Get the number of vertical refreshes since some point in time before - * this function was first called (i.e., system start up). - */ - int (*getDrawableMSC)(__DRIscreen *screen, __DRIdrawable *drawable, - int64_t *msc); -}; - - -#define __DRI_TEX_OFFSET "DRI_TexOffset" -#define __DRI_TEX_OFFSET_VERSION 1 -struct __DRItexOffsetExtensionRec { - __DRIextension base; - - /** - * Method to override base texture image with a driver specific 'offset'. - * The depth passed in allows e.g. to ignore the alpha channel of texture - * images where the non-alpha components don't occupy a whole texel. - * - * For GLX_EXT_texture_from_pixmap with AIGLX. - */ - void (*setTexOffset)(__DRIcontext *pDRICtx, GLint texname, - unsigned long long offset, GLint depth, GLuint pitch); -}; - - -/* Valid values for format in the setTexBuffer2 function below. These - * values match the GLX tokens for compatibility reasons, but we - * define them here since the DRI interface can't depend on GLX. */ -#define __DRI_TEXTURE_FORMAT_NONE 0x20D8 -#define __DRI_TEXTURE_FORMAT_RGB 0x20D9 -#define __DRI_TEXTURE_FORMAT_RGBA 0x20DA - -#define __DRI_TEX_BUFFER "DRI_TexBuffer" -#define __DRI_TEX_BUFFER_VERSION 2 -struct __DRItexBufferExtensionRec { - __DRIextension base; - - /** - * Method to override base texture image with the contents of a - * __DRIdrawable. - * - * For GLX_EXT_texture_from_pixmap with AIGLX. Deprecated in favor of - * setTexBuffer2 in version 2 of this interface - */ - void (*setTexBuffer)(__DRIcontext *pDRICtx, - GLint target, - __DRIdrawable *pDraw); - - /** - * Method to override base texture image with the contents of a - * __DRIdrawable, including the required texture format attribute. - * - * For GLX_EXT_texture_from_pixmap with AIGLX. - */ - void (*setTexBuffer2)(__DRIcontext *pDRICtx, - GLint target, - GLint format, - __DRIdrawable *pDraw); - /** - * Method to release texture buffer in case some special platform - * need this. - * - * For GLX_EXT_texture_from_pixmap with AIGLX. - */ - void (*releaseTexBuffer)(__DRIcontext *pDRICtx, - GLint target, - __DRIdrawable *pDraw); -}; - -/** - * Used by drivers that implement DRI2 - */ -#define __DRI2_FLUSH "DRI2_Flush" -#define __DRI2_FLUSH_VERSION 3 -struct __DRI2flushExtensionRec { - __DRIextension base; - void (*flush)(__DRIdrawable *drawable); - - /** - * Ask the driver to call getBuffers/getBuffersWithFormat before - * it starts rendering again. - * - * \param drawable the drawable to invalidate - * - * \since 3 - */ - void (*invalidate)(__DRIdrawable *drawable); -}; - - -/** - * Extension that the driver uses to request - * throttle callbacks. - */ - -#define __DRI2_THROTTLE "DRI2_Throttle" -#define __DRI2_THROTTLE_VERSION 1 - -enum __DRI2throttleReason { - __DRI2_THROTTLE_SWAPBUFFER, - __DRI2_THROTTLE_COPYSUBBUFFER, - __DRI2_THROTTLE_FLUSHFRONT -}; - -struct __DRI2throttleExtensionRec { - __DRIextension base; - void (*throttle)(__DRIcontext *ctx, - __DRIdrawable *drawable, - enum __DRI2throttleReason reason); -}; - -/** - * XML document describing the configuration options supported by the - * driver. - */ -extern const char __driConfigOptions[]; - -/*@}*/ - -/** - * The following extensions describe loader features that the DRI - * driver can make use of. Some of these are mandatory, such as the - * getDrawableInfo extension for DRI and the DRI Loader extensions for - * DRI2, while others are optional, and if present allow the driver to - * expose certain features. The loader pass in a NULL terminated - * array of these extensions to the driver in the createNewScreen - * constructor. - */ - -typedef struct __DRIgetDrawableInfoExtensionRec __DRIgetDrawableInfoExtension; -typedef struct __DRIsystemTimeExtensionRec __DRIsystemTimeExtension; -typedef struct __DRIdamageExtensionRec __DRIdamageExtension; -typedef struct __DRIloaderExtensionRec __DRIloaderExtension; -typedef struct __DRIswrastLoaderExtensionRec __DRIswrastLoaderExtension; - - -/** - * Callback to getDrawableInfo protocol - */ -#define __DRI_GET_DRAWABLE_INFO "DRI_GetDrawableInfo" -#define __DRI_GET_DRAWABLE_INFO_VERSION 1 -struct __DRIgetDrawableInfoExtensionRec { - __DRIextension base; - - /** - * This function is used to get information about the position, size, and - * clip rects of a drawable. - */ - GLboolean (* getDrawableInfo) ( __DRIdrawable *drawable, - unsigned int * index, unsigned int * stamp, - int * x, int * y, int * width, int * height, - int * numClipRects, drm_clip_rect_t ** pClipRects, - int * backX, int * backY, - int * numBackClipRects, drm_clip_rect_t ** pBackClipRects, - void *loaderPrivate); -}; - -/** - * Callback to get system time for media stream counter extensions. - */ -#define __DRI_SYSTEM_TIME "DRI_SystemTime" -#define __DRI_SYSTEM_TIME_VERSION 1 -struct __DRIsystemTimeExtensionRec { - __DRIextension base; - - /** - * Get the 64-bit unadjusted system time (UST). - */ - int (*getUST)(int64_t * ust); - - /** - * Get the media stream counter (MSC) rate. - * - * Matching the definition in GLX_OML_sync_control, this function returns - * the rate of the "media stream counter". In practical terms, this is - * the frame refresh rate of the display. - */ - GLboolean (*getMSCRate)(__DRIdrawable *draw, - int32_t * numerator, int32_t * denominator, - void *loaderPrivate); -}; - -/** - * Damage reporting - */ -#define __DRI_DAMAGE "DRI_Damage" -#define __DRI_DAMAGE_VERSION 1 -struct __DRIdamageExtensionRec { - __DRIextension base; - - /** - * Reports areas of the given drawable which have been modified by the - * driver. - * - * \param drawable which the drawing was done to. - * \param rects rectangles affected, with the drawable origin as the - * origin. - * \param x X offset of the drawable within the screen (used in the - * front_buffer case) - * \param y Y offset of the drawable within the screen. - * \param front_buffer boolean flag for whether the drawing to the - * drawable was actually done directly to the front buffer (instead - * of backing storage, for example) - * \param loaderPrivate the data passed in at createNewDrawable time - */ - void (*reportDamage)(__DRIdrawable *draw, - int x, int y, - drm_clip_rect_t *rects, int num_rects, - GLboolean front_buffer, - void *loaderPrivate); -}; - -#define __DRI_SWRAST_IMAGE_OP_DRAW 1 -#define __DRI_SWRAST_IMAGE_OP_CLEAR 2 -#define __DRI_SWRAST_IMAGE_OP_SWAP 3 - -/** - * SWRast Loader extension. - */ -#define __DRI_SWRAST_LOADER "DRI_SWRastLoader" -#define __DRI_SWRAST_LOADER_VERSION 1 -struct __DRIswrastLoaderExtensionRec { - __DRIextension base; - - /* - * Drawable position and size - */ - void (*getDrawableInfo)(__DRIdrawable *drawable, - int *x, int *y, int *width, int *height, - void *loaderPrivate); - - /** - * Put image to drawable - */ - void (*putImage)(__DRIdrawable *drawable, int op, - int x, int y, int width, int height, - char *data, void *loaderPrivate); - - /** - * Get image from readable - */ - void (*getImage)(__DRIdrawable *readable, - int x, int y, int width, int height, - char *data, void *loaderPrivate); -}; - -/** - * Invalidate loader extension. The presence of this extension - * indicates to the DRI driver that the loader will call invalidate in - * the __DRI2_FLUSH extension, whenever the needs to query for new - * buffers. This means that the DRI driver can drop the polling in - * glViewport(). - * - * The extension doesn't provide any functionality, it's only use to - * indicate to the driver that it can use the new semantics. A DRI - * driver can use this to switch between the different semantics or - * just refuse to initialize if this extension isn't present. - */ -#define __DRI_USE_INVALIDATE "DRI_UseInvalidate" -#define __DRI_USE_INVALIDATE_VERSION 1 - -typedef struct __DRIuseInvalidateExtensionRec __DRIuseInvalidateExtension; -struct __DRIuseInvalidateExtensionRec { - __DRIextension base; -}; - -/** - * The remaining extensions describe driver extensions, immediately - * available interfaces provided by the driver. To start using the - * driver, dlsym() for the __DRI_DRIVER_EXTENSIONS symbol and look for - * the extension you need in the array. - */ -#define __DRI_DRIVER_EXTENSIONS "__driDriverExtensions" - -/** - * Tokens for __DRIconfig attribs. A number of attributes defined by - * GLX or EGL standards are not in the table, as they must be provided - * by the loader. For example, FBConfig ID or visual ID, drawable type. - */ - -#define __DRI_ATTRIB_BUFFER_SIZE 1 -#define __DRI_ATTRIB_LEVEL 2 -#define __DRI_ATTRIB_RED_SIZE 3 -#define __DRI_ATTRIB_GREEN_SIZE 4 -#define __DRI_ATTRIB_BLUE_SIZE 5 -#define __DRI_ATTRIB_LUMINANCE_SIZE 6 -#define __DRI_ATTRIB_ALPHA_SIZE 7 -#define __DRI_ATTRIB_ALPHA_MASK_SIZE 8 -#define __DRI_ATTRIB_DEPTH_SIZE 9 -#define __DRI_ATTRIB_STENCIL_SIZE 10 -#define __DRI_ATTRIB_ACCUM_RED_SIZE 11 -#define __DRI_ATTRIB_ACCUM_GREEN_SIZE 12 -#define __DRI_ATTRIB_ACCUM_BLUE_SIZE 13 -#define __DRI_ATTRIB_ACCUM_ALPHA_SIZE 14 -#define __DRI_ATTRIB_SAMPLE_BUFFERS 15 -#define __DRI_ATTRIB_SAMPLES 16 -#define __DRI_ATTRIB_RENDER_TYPE 17 -#define __DRI_ATTRIB_CONFIG_CAVEAT 18 -#define __DRI_ATTRIB_CONFORMANT 19 -#define __DRI_ATTRIB_DOUBLE_BUFFER 20 -#define __DRI_ATTRIB_STEREO 21 -#define __DRI_ATTRIB_AUX_BUFFERS 22 -#define __DRI_ATTRIB_TRANSPARENT_TYPE 23 -#define __DRI_ATTRIB_TRANSPARENT_INDEX_VALUE 24 -#define __DRI_ATTRIB_TRANSPARENT_RED_VALUE 25 -#define __DRI_ATTRIB_TRANSPARENT_GREEN_VALUE 26 -#define __DRI_ATTRIB_TRANSPARENT_BLUE_VALUE 27 -#define __DRI_ATTRIB_TRANSPARENT_ALPHA_VALUE 28 -#define __DRI_ATTRIB_FLOAT_MODE 29 -#define __DRI_ATTRIB_RED_MASK 30 -#define __DRI_ATTRIB_GREEN_MASK 31 -#define __DRI_ATTRIB_BLUE_MASK 32 -#define __DRI_ATTRIB_ALPHA_MASK 33 -#define __DRI_ATTRIB_MAX_PBUFFER_WIDTH 34 -#define __DRI_ATTRIB_MAX_PBUFFER_HEIGHT 35 -#define __DRI_ATTRIB_MAX_PBUFFER_PIXELS 36 -#define __DRI_ATTRIB_OPTIMAL_PBUFFER_WIDTH 37 -#define __DRI_ATTRIB_OPTIMAL_PBUFFER_HEIGHT 38 -#define __DRI_ATTRIB_VISUAL_SELECT_GROUP 39 -#define __DRI_ATTRIB_SWAP_METHOD 40 -#define __DRI_ATTRIB_MAX_SWAP_INTERVAL 41 -#define __DRI_ATTRIB_MIN_SWAP_INTERVAL 42 -#define __DRI_ATTRIB_BIND_TO_TEXTURE_RGB 43 -#define __DRI_ATTRIB_BIND_TO_TEXTURE_RGBA 44 -#define __DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE 45 -#define __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS 46 -#define __DRI_ATTRIB_YINVERTED 47 -#define __DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE 48 - -/* __DRI_ATTRIB_RENDER_TYPE */ -#define __DRI_ATTRIB_RGBA_BIT 0x01 -#define __DRI_ATTRIB_COLOR_INDEX_BIT 0x02 -#define __DRI_ATTRIB_LUMINANCE_BIT 0x04 - -/* __DRI_ATTRIB_CONFIG_CAVEAT */ -#define __DRI_ATTRIB_SLOW_BIT 0x01 -#define __DRI_ATTRIB_NON_CONFORMANT_CONFIG 0x02 - -/* __DRI_ATTRIB_TRANSPARENT_TYPE */ -#define __DRI_ATTRIB_TRANSPARENT_RGB 0x00 -#define __DRI_ATTRIB_TRANSPARENT_INDEX 0x01 - -/* __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS */ -#define __DRI_ATTRIB_TEXTURE_1D_BIT 0x01 -#define __DRI_ATTRIB_TEXTURE_2D_BIT 0x02 -#define __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT 0x04 - -/** - * This extension defines the core DRI functionality. - */ -#define __DRI_CORE "DRI_Core" -#define __DRI_CORE_VERSION 1 - -struct __DRIcoreExtensionRec { - __DRIextension base; - - __DRIscreen *(*createNewScreen)(int screen, int fd, - unsigned int sarea_handle, - const __DRIextension **extensions, - const __DRIconfig ***driverConfigs, - void *loaderPrivate); - - void (*destroyScreen)(__DRIscreen *screen); - - const __DRIextension **(*getExtensions)(__DRIscreen *screen); - - int (*getConfigAttrib)(const __DRIconfig *config, - unsigned int attrib, - unsigned int *value); - - int (*indexConfigAttrib)(const __DRIconfig *config, int index, - unsigned int *attrib, unsigned int *value); - - __DRIdrawable *(*createNewDrawable)(__DRIscreen *screen, - const __DRIconfig *config, - unsigned int drawable_id, - unsigned int head, - void *loaderPrivate); - - void (*destroyDrawable)(__DRIdrawable *drawable); - - void (*swapBuffers)(__DRIdrawable *drawable); - - __DRIcontext *(*createNewContext)(__DRIscreen *screen, - const __DRIconfig *config, - __DRIcontext *shared, - void *loaderPrivate); - - int (*copyContext)(__DRIcontext *dest, - __DRIcontext *src, - unsigned long mask); - - void (*destroyContext)(__DRIcontext *context); - - int (*bindContext)(__DRIcontext *ctx, - __DRIdrawable *pdraw, - __DRIdrawable *pread); - - int (*unbindContext)(__DRIcontext *ctx); -}; - -/** - * Stored version of some component (i.e., server-side DRI module, kernel-side - * DRM, etc.). - * - * \todo - * There are several data structures that explicitly store a major version, - * minor version, and patch level. These structures should be modified to - * have a \c __DRIversionRec instead. - */ -struct __DRIversionRec { - int major; /**< Major version number. */ - int minor; /**< Minor version number. */ - int patch; /**< Patch-level. */ -}; - -/** - * Framebuffer information record. Used by libGL to communicate information - * about the framebuffer to the driver's \c __driCreateNewScreen function. - * - * In XFree86, most of this information is derrived from data returned by - * calling \c XF86DRIGetDeviceInfo. - * - * \sa XF86DRIGetDeviceInfo __DRIdisplayRec::createNewScreen - * __driUtilCreateNewScreen CallCreateNewScreen - * - * \bug This structure could be better named. - */ -struct __DRIframebufferRec { - unsigned char *base; /**< Framebuffer base address in the CPU's - * address space. This value is calculated by - * calling \c drmMap on the framebuffer handle - * returned by \c XF86DRIGetDeviceInfo (or a - * similar function). - */ - int size; /**< Framebuffer size, in bytes. */ - int stride; /**< Number of bytes from one line to the next. */ - int width; /**< Pixel width of the framebuffer. */ - int height; /**< Pixel height of the framebuffer. */ - int dev_priv_size; /**< Size of the driver's dev-priv structure. */ - void *dev_priv; /**< Pointer to the driver's dev-priv structure. */ -}; - - -/** - * This extension provides alternative screen, drawable and context - * constructors for legacy DRI functionality. This is used in - * conjunction with the core extension. - */ -#define __DRI_LEGACY "DRI_Legacy" -#define __DRI_LEGACY_VERSION 1 - -struct __DRIlegacyExtensionRec { - __DRIextension base; - - __DRIscreen *(*createNewScreen)(int screen, - const __DRIversion *ddx_version, - const __DRIversion *dri_version, - const __DRIversion *drm_version, - const __DRIframebuffer *frame_buffer, - void *pSAREA, int fd, - const __DRIextension **extensions, - const __DRIconfig ***driver_configs, - void *loaderPrivate); - - __DRIdrawable *(*createNewDrawable)(__DRIscreen *screen, - const __DRIconfig *config, - drm_drawable_t hwDrawable, - int renderType, const int *attrs, - void *loaderPrivate); - - __DRIcontext *(*createNewContext)(__DRIscreen *screen, - const __DRIconfig *config, - int render_type, - __DRIcontext *shared, - drm_context_t hwContext, - void *loaderPrivate); -}; - -/** - * This extension provides alternative screen, drawable and context - * constructors for swrast DRI functionality. This is used in - * conjunction with the core extension. - */ -#define __DRI_SWRAST "DRI_SWRast" -#define __DRI_SWRAST_VERSION 3 - -struct __DRIswrastExtensionRec { - __DRIextension base; - - __DRIscreen *(*createNewScreen)(int screen, - const __DRIextension **extensions, - const __DRIconfig ***driver_configs, - void *loaderPrivate); - - __DRIdrawable *(*createNewDrawable)(__DRIscreen *screen, - const __DRIconfig *config, - void *loaderPrivate); - - /* Since version 2 */ - __DRIcontext *(*createNewContextForAPI)(__DRIscreen *screen, - int api, - const __DRIconfig *config, - __DRIcontext *shared, - void *data); - - /** - * Create a context for a particular API with a set of attributes - * - * \since version 3 - * - * \sa __DRIdri2ExtensionRec::createContextAttribs - */ - __DRIcontext *(*createContextAttribs)(__DRIscreen *screen, - int api, - const __DRIconfig *config, - __DRIcontext *shared, - unsigned num_attribs, - const uint32_t *attribs, - unsigned *error, - void *loaderPrivate); -}; - -/** - * DRI2 Loader extension. - */ -#define __DRI_BUFFER_FRONT_LEFT 0 -#define __DRI_BUFFER_BACK_LEFT 1 -#define __DRI_BUFFER_FRONT_RIGHT 2 -#define __DRI_BUFFER_BACK_RIGHT 3 -#define __DRI_BUFFER_DEPTH 4 -#define __DRI_BUFFER_STENCIL 5 -#define __DRI_BUFFER_ACCUM 6 -#define __DRI_BUFFER_FAKE_FRONT_LEFT 7 -#define __DRI_BUFFER_FAKE_FRONT_RIGHT 8 -#define __DRI_BUFFER_DEPTH_STENCIL 9 /**< Only available with DRI2 1.1 */ -#define __DRI_BUFFER_HIZ 10 - -/* Inofficial and for internal use. Increase when adding a new buffer token. */ -#define __DRI_BUFFER_COUNT 11 - -struct __DRIbufferRec { - unsigned int attachment; - unsigned int name; - unsigned int pitch; - unsigned int cpp; - unsigned int flags; -}; - -#define __DRI_DRI2_LOADER "DRI_DRI2Loader" -#define __DRI_DRI2_LOADER_VERSION 3 -struct __DRIdri2LoaderExtensionRec { - __DRIextension base; - - __DRIbuffer *(*getBuffers)(__DRIdrawable *driDrawable, - int *width, int *height, - unsigned int *attachments, int count, - int *out_count, void *loaderPrivate); - - /** - * Flush pending front-buffer rendering - * - * Any rendering that has been performed to the - * \c __DRI_BUFFER_FAKE_FRONT_LEFT will be flushed to the - * \c __DRI_BUFFER_FRONT_LEFT. - * - * \param driDrawable Drawable whose front-buffer is to be flushed - * \param loaderPrivate Loader's private data that was previously passed - * into __DRIdri2ExtensionRec::createNewDrawable - */ - void (*flushFrontBuffer)(__DRIdrawable *driDrawable, void *loaderPrivate); - - - /** - * Get list of buffers from the server - * - * Gets a list of buffer for the specified set of attachments. Unlike - * \c ::getBuffers, this function takes a list of attachments paired with - * opaque \c unsigned \c int value describing the format of the buffer. - * It is the responsibility of the caller to know what the service that - * allocates the buffers will expect to receive for the format. - * - * \param driDrawable Drawable whose buffers are being queried. - * \param width Output where the width of the buffers is stored. - * \param height Output where the height of the buffers is stored. - * \param attachments List of pairs of attachment ID and opaque format - * requested for the drawable. - * \param count Number of attachment / format pairs stored in - * \c attachments. - * \param loaderPrivate Loader's private data that was previously passed - * into __DRIdri2ExtensionRec::createNewDrawable. - */ - __DRIbuffer *(*getBuffersWithFormat)(__DRIdrawable *driDrawable, - int *width, int *height, - unsigned int *attachments, int count, - int *out_count, void *loaderPrivate); -}; - -/** - * This extension provides alternative screen, drawable and context - * constructors for DRI2. - */ -#define __DRI_DRI2 "DRI_DRI2" -#define __DRI_DRI2_VERSION 3 - -#define __DRI_API_OPENGL 0 /**< OpenGL compatibility profile */ -#define __DRI_API_GLES 1 -#define __DRI_API_GLES2 2 -#define __DRI_API_OPENGL_CORE 3 /**< OpenGL 3.2+ core profile */ - -#define __DRI_CTX_ATTRIB_MAJOR_VERSION 0 -#define __DRI_CTX_ATTRIB_MINOR_VERSION 1 -#define __DRI_CTX_ATTRIB_FLAGS 2 - -#define __DRI_CTX_FLAG_DEBUG 0x00000001 -#define __DRI_CTX_FLAG_FORWARD_COMPATIBLE 0x00000002 - -/** - * \name Reasons that __DRIdri2Extension::createContextAttribs might fail - */ -/*@{*/ -/** Success! */ -#define __DRI_CTX_ERROR_SUCCESS 0 - -/** Memory allocation failure */ -#define __DRI_CTX_ERROR_NO_MEMORY 1 - -/** Client requested an API (e.g., OpenGL ES 2.0) that the driver can't do. */ -#define __DRI_CTX_ERROR_BAD_API 2 - -/** Client requested an API version that the driver can't do. */ -#define __DRI_CTX_ERROR_BAD_VERSION 3 - -/** Client requested a flag or combination of flags the driver can't do. */ -#define __DRI_CTX_ERROR_BAD_FLAG 4 - -/** Client requested an attribute the driver doesn't understand. */ -#define __DRI_CTX_ERROR_UNKNOWN_ATTRIBUTE 5 - -/** Client requested a flag the driver doesn't understand. */ -#define __DRI_CTX_ERROR_UNKNOWN_FLAG 6 -/*@}*/ - -struct __DRIdri2ExtensionRec { - __DRIextension base; - - __DRIscreen *(*createNewScreen)(int screen, int fd, - const __DRIextension **extensions, - const __DRIconfig ***driver_configs, - void *loaderPrivate); - - __DRIdrawable *(*createNewDrawable)(__DRIscreen *screen, - const __DRIconfig *config, - void *loaderPrivate); - - __DRIcontext *(*createNewContext)(__DRIscreen *screen, - const __DRIconfig *config, - __DRIcontext *shared, - void *loaderPrivate); - - /* Since version 2 */ - unsigned int (*getAPIMask)(__DRIscreen *screen); - - __DRIcontext *(*createNewContextForAPI)(__DRIscreen *screen, - int api, - const __DRIconfig *config, - __DRIcontext *shared, - void *data); - - __DRIbuffer *(*allocateBuffer)(__DRIscreen *screen, - unsigned int attachment, - unsigned int format, - int width, - int height); - void (*releaseBuffer)(__DRIscreen *screen, - __DRIbuffer *buffer); - - /** - * Create a context for a particular API with a set of attributes - * - * \since version 3 - * - * \sa __DRIswrastExtensionRec::createContextAttribs - */ - __DRIcontext *(*createContextAttribs)(__DRIscreen *screen, - int api, - const __DRIconfig *config, - __DRIcontext *shared, - unsigned num_attribs, - const uint32_t *attribs, - unsigned *error, - void *loaderPrivate); -}; - - -/** - * This extension provides functionality to enable various EGLImage - * extensions. - */ -#define __DRI_IMAGE "DRI_IMAGE" -#define __DRI_IMAGE_VERSION 1 - -/** - * These formats correspond to the similarly named MESA_FORMAT_* - * tokens, except in the native endian of the CPU. For example, on - * little endian __DRI_IMAGE_FORMAT_XRGB8888 corresponds to - * MESA_FORMAT_XRGB8888, but MESA_FORMAT_XRGB8888_REV on big endian. - */ -#define __DRI_IMAGE_FORMAT_RGB565 0x1001 -#define __DRI_IMAGE_FORMAT_XRGB8888 0x1002 -#define __DRI_IMAGE_FORMAT_ARGB8888 0x1003 -#define __DRI_IMAGE_FORMAT_ABGR8888 0x1004 - -#define __DRI_IMAGE_USE_SHARE 0x0001 -#define __DRI_IMAGE_USE_SCANOUT 0x0002 -#define __DRI_IMAGE_USE_CURSOR 0x0004 - -/** - * queryImage attributes - */ - -#define __DRI_IMAGE_ATTRIB_STRIDE 0x2000 -#define __DRI_IMAGE_ATTRIB_HANDLE 0x2001 -#define __DRI_IMAGE_ATTRIB_NAME 0x2002 - -typedef struct __DRIimageRec __DRIimage; -typedef struct __DRIimageExtensionRec __DRIimageExtension; -struct __DRIimageExtensionRec { - __DRIextension base; - - __DRIimage *(*createImageFromName)(__DRIscreen *screen, - int width, int height, int format, - int name, int pitch, - void *loaderPrivate); - - __DRIimage *(*createImageFromRenderbuffer)(__DRIcontext *context, - int renderbuffer, - void *loaderPrivate); - - void (*destroyImage)(__DRIimage *image); - - __DRIimage *(*createImage)(__DRIscreen *screen, - int width, int height, int format, - unsigned int use, - void *loaderPrivate); - - GLboolean (*queryImage)(__DRIimage *image, int attrib, int *value); - - /** - * The new __DRIimage will share the content with the old one, see dup(2). - */ - __DRIimage *(*dupImage)(__DRIimage *image, void *loaderPrivate); -}; - - -/** - * This extension must be implemented by the loader and passed to the - * driver at screen creation time. The EGLImage entry points in the - * various client APIs take opaque EGLImage handles and use this - * extension to map them to a __DRIimage. At version 1, this - * extensions allows mapping EGLImage pointers to __DRIimage pointers, - * but future versions could support other EGLImage-like, opaque types - * with new lookup functions. - */ -#define __DRI_IMAGE_LOOKUP "DRI_IMAGE_LOOKUP" -#define __DRI_IMAGE_LOOKUP_VERSION 1 - -typedef struct __DRIimageLookupExtensionRec __DRIimageLookupExtension; -struct __DRIimageLookupExtensionRec { - __DRIextension base; - - __DRIimage *(*lookupEGLImage)(__DRIscreen *screen, void *image, - void *loaderPrivate); -}; - -/** - * This extension allows for common DRI2 options - */ -#define __DRI2_CONFIG_QUERY "DRI_CONFIG_QUERY" -#define __DRI2_CONFIG_QUERY_VERSION 1 - -typedef struct __DRI2configQueryExtensionRec __DRI2configQueryExtension; -struct __DRI2configQueryExtensionRec { - __DRIextension base; - - int (*configQueryb)(__DRIscreen *screen, const char *var, GLboolean *val); - int (*configQueryi)(__DRIscreen *screen, const char *var, GLint *val); - int (*configQueryf)(__DRIscreen *screen, const char *var, GLfloat *val); -}; -#endif diff --git a/dll/opengl/mesa/include/GL/internal/sarea.h b/dll/opengl/mesa/include/GL/internal/sarea.h deleted file mode 100644 index a0d6084f31d..00000000000 --- a/dll/opengl/mesa/include/GL/internal/sarea.h +++ /dev/null @@ -1,92 +0,0 @@ -/** - * \file sarea.h - * SAREA definitions. - * - * \author Kevin E. Martin - * \author Jens Owen - * \author Rickard E. (Rik) Faith - */ - -/* - * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. - * Copyright 2000 VA Linux Systems, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef _SAREA_H_ -#define _SAREA_H_ - -#include "xf86drm.h" - -/* SAREA area needs to be at least a page */ -#if defined(__alpha__) -#define SAREA_MAX 0x2000 -#elif defined(__ia64__) -#define SAREA_MAX 0x10000 /* 64kB */ -#else -/* Intel 830M driver needs at least 8k SAREA */ -#define SAREA_MAX 0x2000 -#endif - -#define SAREA_MAX_DRAWABLES 256 - -#define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000 - -/** - * SAREA per drawable information. - * - * \sa _XF86DRISAREA. - */ -typedef struct _XF86DRISAREADrawable { - unsigned int stamp; - unsigned int flags; -} XF86DRISAREADrawableRec, *XF86DRISAREADrawablePtr; - -/** - * SAREA frame information. - * - * \sa _XF86DRISAREA. - */ -typedef struct _XF86DRISAREAFrame { - unsigned int x; - unsigned int y; - unsigned int width; - unsigned int height; - unsigned int fullscreen; -} XF86DRISAREAFrameRec, *XF86DRISAREAFramePtr; - -/** - * SAREA definition. - */ -typedef struct _XF86DRISAREA { - /** first thing is always the DRM locking structure */ - drmLock lock; - /** \todo Use readers/writer lock for drawable_lock */ - drmLock drawable_lock; - XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES]; - XF86DRISAREAFrameRec frame; - drm_context_t dummy_context; -} XF86DRISAREARec, *XF86DRISAREAPtr; - -#endif diff --git a/dll/opengl/mesa/include/GL/osmesa.h b/dll/opengl/mesa/include/GL/osmesa.h deleted file mode 100644 index 304655e7c44..00000000000 --- a/dll/opengl/mesa/include/GL/osmesa.h +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * Mesa Off-Screen rendering interface. - * - * This is an operating system and window system independent interface to - * Mesa which allows one to render images into a client-supplied buffer in - * main memory. Such images may manipulated or saved in whatever way the - * client wants. - * - * These are the API functions: - * OSMesaCreateContext - create a new Off-Screen Mesa rendering context - * OSMesaMakeCurrent - bind an OSMesaContext to a client's image buffer - * and make the specified context the current one. - * OSMesaDestroyContext - destroy an OSMesaContext - * OSMesaGetCurrentContext - return thread's current context ID - * OSMesaPixelStore - controls how pixels are stored in image buffer - * OSMesaGetIntegerv - return OSMesa state parameters - * - * - * The limits on the width and height of an image buffer are MAX_WIDTH and - * MAX_HEIGHT as defined in Mesa/src/config.h. Defaults are 1280 and 1024. - * You can increase them as needed but beware that many temporary arrays in - * Mesa are dimensioned by MAX_WIDTH or MAX_HEIGHT. - */ - - -#ifndef OSMESA_H -#define OSMESA_H - - -#ifdef __cplusplus -extern "C" { -#endif - - -#include - - -#define OSMESA_MAJOR_VERSION 6 -#define OSMESA_MINOR_VERSION 5 -#define OSMESA_PATCH_VERSION 0 - - - -/* - * Values for the format parameter of OSMesaCreateContext() - * New in version 2.0. - */ -#define OSMESA_COLOR_INDEX GL_COLOR_INDEX -#define OSMESA_RGBA GL_RGBA -#define OSMESA_BGRA 0x1 -#define OSMESA_ARGB 0x2 -#define OSMESA_RGB GL_RGB -#define OSMESA_BGR 0x4 -#define OSMESA_RGB_565 0x5 - - -/* - * OSMesaPixelStore() parameters: - * New in version 2.0. - */ -#define OSMESA_ROW_LENGTH 0x10 -#define OSMESA_Y_UP 0x11 - - -/* - * Accepted by OSMesaGetIntegerv: - */ -#define OSMESA_WIDTH 0x20 -#define OSMESA_HEIGHT 0x21 -#define OSMESA_FORMAT 0x22 -#define OSMESA_TYPE 0x23 -#define OSMESA_MAX_WIDTH 0x24 /* new in 4.0 */ -#define OSMESA_MAX_HEIGHT 0x25 /* new in 4.0 */ - - -typedef struct osmesa_context *OSMesaContext; - - -#if defined(__QUICKDRAW__) -#pragma export on -#endif - - -/* - * Create an Off-Screen Mesa rendering context. The only attribute needed is - * an RGBA vs Color-Index mode flag. - * - * Input: format - one of OSMESA_COLOR_INDEX, OSMESA_RGBA, OSMESA_BGRA, - * OSMESA_ARGB, OSMESA_RGB, or OSMESA_BGR. - * sharelist - specifies another OSMesaContext with which to share - * display lists. NULL indicates no sharing. - * Return: an OSMesaContext or 0 if error - */ -GLAPI OSMesaContext GLAPIENTRY -OSMesaCreateContext( GLenum format, OSMesaContext sharelist ); - - - -/* - * Create an Off-Screen Mesa rendering context and specify desired - * size of depth buffer, stencil buffer and accumulation buffer. - * If you specify zero for depthBits, stencilBits, accumBits you - * can save some memory. - * - * New in Mesa 3.5 - */ -GLAPI OSMesaContext GLAPIENTRY -OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits, - GLint accumBits, OSMesaContext sharelist); - - -/* - * Destroy an Off-Screen Mesa rendering context. - * - * Input: ctx - the context to destroy - */ -GLAPI void GLAPIENTRY -OSMesaDestroyContext( OSMesaContext ctx ); - - - -/* - * Bind an OSMesaContext to an image buffer. The image buffer is just a - * block of memory which the client provides. Its size must be at least - * as large as width*height*sizeof(type). Its address should be a multiple - * of 4 if using RGBA mode. - * - * Image data is stored in the order of glDrawPixels: row-major order - * with the lower-left image pixel stored in the first array position - * (ie. bottom-to-top). - * - * Since the only type initially supported is GL_UNSIGNED_BYTE, if the - * context is in RGBA mode, each pixel will be stored as a 4-byte RGBA - * value. If the context is in color indexed mode, each pixel will be - * stored as a 1-byte value. - * - * If the context's viewport hasn't been initialized yet, it will now be - * initialized to (0,0,width,height). - * - * Input: ctx - the rendering context - * buffer - the image buffer memory - * type - data type for pixel components, only GL_UNSIGNED_BYTE - * supported now - * width, height - size of image buffer in pixels, at least 1 - * Return: GL_TRUE if success, GL_FALSE if error because of invalid ctx, - * invalid buffer address, type!=GL_UNSIGNED_BYTE, width<1, height<1, - * width>internal limit or height>internal limit. - */ -GLAPI GLboolean GLAPIENTRY -OSMesaMakeCurrent( OSMesaContext ctx, void *buffer, GLenum type, - GLsizei width, GLsizei height ); - - - - -/* - * Return the current Off-Screen Mesa rendering context handle. - */ -GLAPI OSMesaContext GLAPIENTRY -OSMesaGetCurrentContext( void ); - - - -/* - * Set pixel store/packing parameters for the current context. - * This is similar to glPixelStore. - * Input: pname - OSMESA_ROW_LENGTH - * specify actual pixels per row in image buffer - * 0 = same as image width (default) - * OSMESA_Y_UP - * zero = Y coordinates increase downward - * non-zero = Y coordinates increase upward (default) - * value - the value for the parameter pname - * - * New in version 2.0. - */ -GLAPI void GLAPIENTRY -OSMesaPixelStore( GLint pname, GLint value ); - - - -/* - * Return an integer value like glGetIntegerv. - * Input: pname - - * OSMESA_WIDTH return current image width - * OSMESA_HEIGHT return current image height - * OSMESA_FORMAT return image format - * OSMESA_TYPE return color component data type - * OSMESA_ROW_LENGTH return row length in pixels - * OSMESA_Y_UP returns 1 or 0 to indicate Y axis direction - * value - pointer to integer in which to return result. - */ -GLAPI void GLAPIENTRY -OSMesaGetIntegerv( GLint pname, GLint *value ); - - - -/* - * Return the depth buffer associated with an OSMesa context. - * Input: c - the OSMesa context - * Output: width, height - size of buffer in pixels - * bytesPerValue - bytes per depth value (2 or 4) - * buffer - pointer to depth buffer values - * Return: GL_TRUE or GL_FALSE to indicate success or failure. - * - * New in Mesa 2.4. - */ -GLAPI GLboolean GLAPIENTRY -OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height, - GLint *bytesPerValue, void **buffer ); - - - -/* - * Return the color buffer associated with an OSMesa context. - * Input: c - the OSMesa context - * Output: width, height - size of buffer in pixels - * format - buffer format (OSMESA_FORMAT) - * buffer - pointer to depth buffer values - * Return: GL_TRUE or GL_FALSE to indicate success or failure. - * - * New in Mesa 3.3. - */ -GLAPI GLboolean GLAPIENTRY -OSMesaGetColorBuffer( OSMesaContext c, GLint *width, GLint *height, - GLint *format, void **buffer ); - - - -/** - * This typedef is new in Mesa 6.3. - */ -typedef void (*OSMESAproc)(); - - -/* - * Return pointer to the named function. - * New in Mesa 4.1 - * Return OSMESAproc in 6.3. - */ -GLAPI OSMESAproc GLAPIENTRY -OSMesaGetProcAddress( const char *funcName ); - - - -/** - * Enable/disable color clamping, off by default. - * New in Mesa 6.4.2 - */ -GLAPI void GLAPIENTRY -OSMesaColorClamp(GLboolean enable); - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/dll/opengl/mesa/include/GL/vms_x_fix.h b/dll/opengl/mesa/include/GL/vms_x_fix.h deleted file mode 100644 index 24cba473d84..00000000000 --- a/dll/opengl/mesa/include/GL/vms_x_fix.h +++ /dev/null @@ -1,1224 +0,0 @@ -/*************************************************************************** - * * - * Author : Jouk Jansen (joukj@hrem.nano.tudelft.nl) * - * * - * Last revision : 31 August 2006 * - * * - * Repair definitions of Runtime library functions when compiling with * - * /name=(as_is) on OpenVMS * - * * - ***************************************************************************/ - -#ifndef VMS_X_FIX -#define VMS_X_FIX - -#define decw$_select DECW$_SELECT -#define DtSaverGetWindows DTSAVERGETWINDOWS -#define MrmFetchWidget MRMFETCHWIDGET -#define MrmInitialize MRMINITIALIZE -#define MrmOpenHierarchy MRMOPENHIERARCHY -#define MrmRegisterNames MRMREGISTERNAMES -#define XAddExtension XADDEXTENSION -#define XAddHosts XADDHOSTS -#define XAllocClassHint XALLOCCLASSHINT -#define XAllocColor XALLOCCOLOR -#define XAllocColorCells XALLOCCOLORCELLS -#define XAllocIconSize XALLOCICONSIZE -#define XAllocNamedColor XALLOCNAMEDCOLOR -#define XAllocSizeHints XALLOCSIZEHINTS -#define XAllocStandardColormap XALLOCSTANDARDCOLORMAP -#define XAllocWMHints XALLOCWMHINTS -#define XAllowEvents XALLOWEVENTS -#define XAutoRepeatOff XAUTOREPEATOFF -#define XAutoRepeatOn XAUTOREPEATON -#define XBaseFontNameListOfFontSet XBASEFONTNAMELISTOFFONTSET -#define XBell XBELL -#define XBitmapPad XBITMAPPAD -#define XBlackPixel XBLACKPIXEL -#define XBlackPixelOfScreen XBLACKPIXELOFSCREEN -#define XCellsOfScreen XCELLSOFSCREEN -#define XChangeActivePointerGrab XCHANGEACTIVEPOINTERGRAB -#define XChangeGC XCHANGEGC -#define XChangeKeyboardControl XCHANGEKEYBOARDCONTROL -#define XChangePointerControl XCHANGEPOINTERCONTROL -#define XChangeProperty XCHANGEPROPERTY -#define XChangeWindowAttributes XCHANGEWINDOWATTRIBUTES -#define XCheckIfEvent XCHECKIFEVENT -#define XCheckMaskEvent XCHECKMASKEVENT -#define XCheckTypedEvent XCHECKTYPEDEVENT -#define XCheckTypedWindowEvent XCHECKTYPEDWINDOWEVENT -#define XCheckWindowEvent XCHECKWINDOWEVENT -#define XClearArea XCLEARAREA -#define XClearWindow XCLEARWINDOW -#define XClipBox XCLIPBOX -#define XCloseDisplay XCLOSEDISPLAY -#define XCloseIM XCLOSEIM -#define XConfigureWindow XCONFIGUREWINDOW -#define XConvertSelection XCONVERTSELECTION -#define XCopyArea XCOPYAREA -#define XCopyColormapAndFree XCOPYCOLORMAPANDFREE -#define XCopyGC XCOPYGC -#define XCopyPlane XCOPYPLANE -#define XCreateBitmapFromData XCREATEBITMAPFROMDATA -#define XCreateColormap XCREATECOLORMAP -#define XCreateFontCursor XCREATEFONTCURSOR -#define XCreateFontSet XCREATEFONTSET -#define XCreateGC XCREATEGC -#define XCreateGlyphCursor XCREATEGLYPHCURSOR -#define XCreateIC XCREATEIC -#define XCreateImage XCREATEIMAGE -#define XCreatePixmap XCREATEPIXMAP -#define XCreatePixmapCursor XCREATEPIXMAPCURSOR -#define XCreatePixmapFromBitmapData XCREATEPIXMAPFROMBITMAPDATA -#define XCreateRegion XCREATEREGION -#define XCreateSimpleWindow XCREATESIMPLEWINDOW -#define XCreateWindow XCREATEWINDOW -#define XDefaultColormap XDEFAULTCOLORMAP -#define XDefaultColormapOfScreen XDEFAULTCOLORMAPOFSCREEN -#define XDefaultDepth XDEFAULTDEPTH -#define XDefaultDepthOfScreen XDEFAULTDEPTHOFSCREEN -#define XDefaultGC XDEFAULTGC -#define XDefaultRootWindow XDEFAULTROOTWINDOW -#define XDefaultScreen XDEFAULTSCREEN -#define XDefaultScreenOfDisplay XDEFAULTSCREENOFDISPLAY -#define XDefaultVisual XDEFAULTVISUAL -#define XDefaultVisualOfScreen XDEFAULTVISUALOFSCREEN -#define XDefineCursor XDEFINECURSOR -#define XDeleteContext XDELETECONTEXT -#define XDeleteProperty XDELETEPROPERTY -#define XDestroyIC XDESTROYIC -#define XDestroyRegion XDESTROYREGION -#define XDestroySubwindows XDESTROYSUBWINDOWS -#define XDestroyWindow XDESTROYWINDOW -#define XDisableAccessControl XDISABLEACCESSCONTROL -#define XDisplayCells XDISPLAYCELLS -#define XDisplayHeight XDISPLAYHEIGHT -#define XDisplayKeycodes XDISPLAYKEYCODES -#define XDisplayName XDISPLAYNAME -#define XDisplayOfIM XDISPLAYOFIM -#define XDisplayOfScreen XDISPLAYOFSCREEN -#define XDisplayString XDISPLAYSTRING -#define XDisplayWidth XDISPLAYWIDTH -#define XDoesBackingStore XDOESBACKINGSTORE -#define XDrawArc XDRAWARC -#define XDrawArcs XDRAWARCS -#define XDrawImageString XDRAWIMAGESTRING -#define XDrawImageString16 XDRAWIMAGESTRING16 -#define XDrawLine XDRAWLINE -#define XDrawLines XDRAWLINES -#define XDrawPoint XDRAWPOINT -#define XDrawPoints XDRAWPOINTS -#define XDrawRectangle XDRAWRECTANGLE -#define XDrawRectangles XDRAWRECTANGLES -#define XDrawSegments XDRAWSEGMENTS -#define XDrawString XDRAWSTRING -#define XDrawString16 XDRAWSTRING16 -#define XDrawText XDRAWTEXT -#define XDrawText16 XDRAWTEXT16 -#define XESetCloseDisplay XESETCLOSEDISPLAY -#define XEmptyRegion XEMPTYREGION -#define XEnableAccessControl XENABLEACCESSCONTROL -#define XEqualRegion XEQUALREGION -#define XEventsQueued XEVENTSQUEUED -#define XExtendedMaxRequestSize XEXTENDEDMAXREQUESTSIZE -#define XExtentsOfFontSet XEXTENTSOFFONTSET -#define XFetchBuffer XFETCHBUFFER -#define XFetchBytes XFETCHBYTES -#define XFetchName XFETCHNAME -#define XFillArc XFILLARC -#define XFillArcs XFILLARCS -#define XFillPolygon XFILLPOLYGON -#define XFillRectangle XFILLRECTANGLE -#define XFillRectangles XFILLRECTANGLES -#define XFilterEvent XFILTEREVENT -#define XFindContext XFINDCONTEXT -#define XFlush XFLUSH -#define XFontsOfFontSet XFONTSOFFONTSET -#define XForceScreenSaver XFORCESCREENSAVER -#define XFree XFREE -#define XFreeColormap XFREECOLORMAP -#define XFreeColors XFREECOLORS -#define XFreeCursor XFREECURSOR -#define XFreeDeviceList XFREEDEVICELIST -#define XFreeDeviceState XFREEDEVICESTATE -#define XFreeFont XFREEFONT -#define XFreeFontInfo XFREEFONTINFO -#define XFreeFontNames XFREEFONTNAMES -#define XFreeFontSet XFREEFONTSET -#define XFreeGC XFREEGC -#define XFreeModifiermap XFREEMODIFIERMAP -#define XFreePixmap XFREEPIXMAP -#define XFreeStringList XFREESTRINGLIST -#define XGContextFromGC XGCONTEXTFROMGC -#define XGeometry XGEOMETRY -#define XGetAtomName XGETATOMNAME -#define XGetClassHint XGETCLASSHINT -#define XGetCommand XGETCOMMAND -#define XGetDefault XGETDEFAULT -#define XGetErrorDatabaseText XGETERRORDATABASETEXT -#define XGetErrorText XGETERRORTEXT -#define XGetExtensionVersion XGETEXTENSIONVERSION -#define XGetFontProperty XGETFONTPROPERTY -#define XGetGCValues XGETGCVALUES -#define XGetGeometry XGETGEOMETRY -#define XGetICValues XGETICVALUES -#define XGetIMValues XGETIMVALUES -#define XGetIconName XGETICONNAME -#define XGetIconSizes XGETICONSIZES -#define XGetImage XGETIMAGE -#define XGetInputFocus XGETINPUTFOCUS -#define XGetKeyboardControl XGETKEYBOARDCONTROL -#define XGetKeyboardMapping XGETKEYBOARDMAPPING -#define XGetModifierMapping XGETMODIFIERMAPPING -#define XGetMotionEvents XGETMOTIONEVENTS -#define XGetNormalHints XGETNORMALHINTS -#define XGetPointerControl XGETPOINTERCONTROL -#define XGetPointerMapping XGETPOINTERMAPPING -#define XGetRGBColormaps XGETRGBCOLORMAPS -#define XGetScreenSaver XGETSCREENSAVER -#define XGetSelectionOwner XGETSELECTIONOWNER -#define XGetStandardColormap XGETSTANDARDCOLORMAP -#define XGetSubImage XGETSUBIMAGE -#define XGetTextProperty XGETTEXTPROPERTY -#define XGetVisualInfo XGETVISUALINFO -#define XGetWMColormapWindows XGETWMCOLORMAPWINDOWS -#define XGetWMHints XGETWMHINTS -#define XGetWMIconName XGETWMICONNAME -#define XGetWMName XGETWMNAME -#define XGetWMNormalHints XGETWMNORMALHINTS -#define XGetWindowAttributes XGETWINDOWATTRIBUTES -#define XGetWindowProperty XGETWINDOWPROPERTY -#define XGrabButton XGRABBUTTON -#define XGrabKeyboard XGRABKEYBOARD -#define XGrabPointer XGRABPOINTER -#define XGrabServer XGRABSERVER -#define XHeightMMOfScreen XHEIGHTMMOFSCREEN -#define XHeightOfScreen XHEIGHTOFSCREEN -#define XIconifyWindow XICONIFYWINDOW -#define XIfEvent XIFEVENT -#define XInitExtension XINITEXTENSION -#define XInitImage XINITIMAGE -#define XInstallColormap XINSTALLCOLORMAP -#define XInternAtom XINTERNATOM -#define XInternAtoms XINTERNATOMS -#define XIntersectRegion XINTERSECTREGION -#define XKeycodeToKeysym XKEYCODETOKEYSYM -#define XKeysymToKeycode XKEYSYMTOKEYCODE -#define XKeysymToString XKEYSYMTOSTRING -#define XKillClient XKILLCLIENT -#define XListDepths XLISTDEPTHS -#define XListFonts XLISTFONTS -#define XListFontsWithInfo XLISTFONTSWITHINFO -#define XListHosts XLISTHOSTS -#define XListInputDevices XLISTINPUTDEVICES -#define XListInstalledColormaps XLISTINSTALLEDCOLORMAPS -#define XListPixmapFormats XLISTPIXMAPFORMATS -#define XListProperties XLISTPROPERTIES -#define XLoadFont XLOADFONT -#define XLoadQueryFont XLOADQUERYFONT -#define XLookupColor XLOOKUPCOLOR -#define XLookupKeysym XLOOKUPKEYSYM -#define XLookupString XLOOKUPSTRING -#define XLowerWindow XLOWERWINDOW -#define XMapRaised XMAPRAISED -#define XMapSubwindows XMAPSUBWINDOWS -#define XMapWindow XMAPWINDOW -#define XMaskEvent XMASKEVENT -#define XMatchVisualInfo XMATCHVISUALINFO -#define XMaxRequestSize XMAXREQUESTSIZE -#define XMissingExtension XMISSINGEXTENSION -#define XMoveResizeWindow XMOVERESIZEWINDOW -#define XMoveWindow XMOVEWINDOW -#define XNextEvent XNEXTEVENT -#define XNextRequest XNEXTREQUEST -#define XNoOp XNOOP -#define XOffsetRegion XOFFSETREGION -#define XOpenDevice XOPENDEVICE -#define XOpenDisplay XOPENDISPLAY -#define XOpenIM XOPENIM -#define XParseColor XPARSECOLOR -#define XParseGeometry XPARSEGEOMETRY -#define XPeekEvent XPEEKEVENT -#define XPeekIfEvent XPEEKIFEVENT -#define XPending XPENDING -#define XPointInRegion XPOINTINREGION -#define XPolygonRegion XPOLYGONREGION -#define XPutBackEvent XPUTBACKEVENT -#define XPutImage XPUTIMAGE -#define XQLength XQLENGTH -#define XQueryBestCursor XQUERYBESTCURSOR -#define XQueryBestStipple XQUERYBESTSTIPPLE -#define XQueryColor XQUERYCOLOR -#define XQueryColors XQUERYCOLORS -#define XQueryDeviceState XQUERYDEVICESTATE -#define XQueryExtension XQUERYEXTENSION -#define XQueryFont XQUERYFONT -#define XQueryKeymap XQUERYKEYMAP -#define XQueryPointer XQUERYPOINTER -#define XQueryTree XQUERYTREE -#define XRaiseWindow XRAISEWINDOW -#define XReadBitmapFile XREADBITMAPFILE -#define XRecolorCursor XRECOLORCURSOR -#define XReconfigureWMWindow XRECONFIGUREWMWINDOW -#define XRectInRegion XRECTINREGION -#define XRefreshKeyboardMapping XREFRESHKEYBOARDMAPPING -#define XRemoveHosts XREMOVEHOSTS -#define XReparentWindow XREPARENTWINDOW -#define XResetScreenSaver XRESETSCREENSAVER -#define XResizeWindow XRESIZEWINDOW -#define XResourceManagerString XRESOURCEMANAGERSTRING -#define XRestackWindows XRESTACKWINDOWS -#define XRotateBuffers XROTATEBUFFERS -#define XRootWindow XROOTWINDOW -#define XRootWindowOfScreen XROOTWINDOWOFSCREEN -#define XSaveContext XSAVECONTEXT -#define XScreenNumberOfScreen XSCREENNUMBEROFSCREEN -#define XScreenOfDisplay XSCREENOFDISPLAY -#define XSelectAsyncEvent XSELECTASYNCEVENT -#define XSelectAsyncInput XSELECTASYNCINPUT -#define XSelectExtensionEvent XSELECTEXTENSIONEVENT -#define XSelectInput XSELECTINPUT -#define XSendEvent XSENDEVENT -#define XServerVendor XSERVERVENDOR -#define XSetArcMode XSETARCMODE -#define XSetBackground XSETBACKGROUND -#define XSetClassHint XSETCLASSHINT -#define XSetClipMask XSETCLIPMASK -#define XSetClipOrigin XSETCLIPORIGIN -#define XSetClipRectangles XSETCLIPRECTANGLES -#define XSetCloseDownMode XSETCLOSEDOWNMODE -#define XSetCommand XSETCOMMAND -#define XSetDashes XSETDASHES -#define XSetErrorHandler XSETERRORHANDLER -#define XSetExtensionErrorHandler XSETEXTENSIONERRORHANDLER -#define XSetFillRule XSETFILLRULE -#define XSetFillStyle XSETFILLSTYLE -#define XSetFont XSETFONT -#define XSetForeground XSETFOREGROUND -#define XSetFunction XSETFUNCTION -#define XSetGraphicsExposures XSETGRAPHICSEXPOSURES -#define XSetICFocus XSETICFOCUS -#define XSetICValues XSETICVALUES -#define XSetIOErrorHandler XSETIOERRORHANDLER -#define XSetIconName XSETICONNAME -#define XSetInputFocus XSETINPUTFOCUS -#define XSetLineAttributes XSETLINEATTRIBUTES -#define XSetLocaleModifiers XSETLOCALEMODIFIERS -#define XSetNormalHints XSETNORMALHINTS -#define XSetPlaneMask XSETPLANEMASK -#define XSetRegion XSETREGION -#define XSetRGBColormaps XSETRGBCOLORMAPS -#define XSetScreenSaver XSETSCREENSAVER -#define XSetSelectionOwner XSETSELECTIONOWNER -#define XSetStandardProperties XSETSTANDARDPROPERTIES -#define XSetState XSETSTATE -#define XSetStipple XSETSTIPPLE -#define XSetSubwindowMode XSETSUBWINDOWMODE -#define XSetTSOrigin XSETTSORIGIN -#define XSetTextProperty XSETTEXTPROPERTY -#define XSetTile XSETTILE -#define XSetTransientForHint XSETTRANSIENTFORHINT -#define XSetWMClientMachine XSETWMCLIENTMACHINE -#define XSetWMColormapWindows XSETWMCOLORMAPWINDOWS -#define XSetWMHints XSETWMHINTS -#define XSetWMIconName XSETWMICONNAME -#define XSetWMName XSETWMNAME -#define XSetWMNormalHints XSETWMNORMALHINTS -#define XSetWMProperties XSETWMPROPERTIES -#define XSetWMProtocols XSETWMPROTOCOLS -#define XSetWMSizeHints XSETWMSIZEHINTS -#define XSetWindowBackground XSETWINDOWBACKGROUND -#define XSetWindowBackgroundPixmap XSETWINDOWBACKGROUNDPIXMAP -#define XSetWindowBorder XSETWINDOWBORDER -#define XSetWindowBorderPixmap XSETWINDOWBORDERPIXMAP -#define XSetWindowBorderWidth XSETWINDOWBORDERWIDTH -#define XSetWindowColormap XSETWINDOWCOLORMAP -#define XShapeCombineMask XSHAPECOMBINEMASK -#define XShapeCombineRectangles XSHAPECOMBINERECTANGLES -#define XShapeGetRectangles XSHAPEGETRECTANGLES -#define XShapeQueryExtension XSHAPEQUERYEXTENSION -#define XShmAttach XSHMATTACH -#define XShmCreateImage XSHMCREATEIMAGE -#define XShmCreatePixmap XSHMCREATEPIXMAP -#define XShmDetach XSHMDETACH -#define XShmGetEventBase XSHMGETEVENTBASE -#define XShmPutImage XSHMPUTIMAGE -#define XShmQueryExtension XSHMQUERYEXTENSION -#define XShmQueryVersion XSHMQUERYVERSION -#define XShrinkRegion XSHRINKREGION -#define XStoreBuffer XSTOREBUFFER -#define XStoreBytes XSTOREBYTES -#define XStoreColor XSTORECOLOR -#define XStoreColors XSTORECOLORS -#define XStoreName XSTORENAME -#define XStringListToTextProperty XSTRINGLISTTOTEXTPROPERTY -#define XStringToKeysym XSTRINGTOKEYSYM -#define XSubtractRegion XSUBTRACTREGION -#define XSupportsLocale XSUPPORTSLOCALE -#define XSync XSYNC -#define XSynchronize XSYNCHRONIZE -#define XTextExtents XTEXTEXTENTS -#define XTextExtents16 XTEXTEXTENTS16 -#define XTextPropertyToStringList XTEXTPROPERTYTOSTRINGLIST -#define XTextWidth XTEXTWIDTH -#define XTextWidth16 XTEXTWIDTH16 -#define XTranslateCoordinates XTRANSLATECOORDINATES -#define XUndefineCursor XUNDEFINECURSOR -#define XUngrabButton XUNGRABBUTTON -#define XUngrabKeyboard XUNGRABKEYBOARD -#define XUngrabPointer XUNGRABPOINTER -#define XUngrabServer XUNGRABSERVER -#define XUninstallColormap XUNINSTALLCOLORMAP -#define XUnionRectWithRegion XUNIONRECTWITHREGION -#define XUnionRegion XUNIONREGION -#define XUniqueContext XUNIQUECONTEXT -#define XUnloadFont XUNLOADFONT -#define XUnmapWindow XUNMAPWINDOW -#define XUnsetICFocus XUNSETICFOCUS -#define XVaCreateNestedList XVACREATENESTEDLIST -#define XVisualIDFromVisual XVISUALIDFROMVISUAL -#define XWMGeometry XWMGEOMETRY -#define XWarpPointer XWARPPOINTER -#define XWhitePixel XWHITEPIXEL -#define XWhitePixelOfScreen XWHITEPIXELOFSCREEN -#define XWidthMMOfScreen XWIDTHMMOFSCREEN -#define XWidthOfScreen XWIDTHOFSCREEN -#define XWindowEvent XWINDOWEVENT -#define XWithdrawWindow XWITHDRAWWINDOW -#define XXorRegion XXORREGION -#define XcmsQueryColor XCMSQUERYCOLOR -#define XdbeAllocateBackBufferName XDBEALLOCATEBACKBUFFERNAME -#define XdbeFreeVisualInfo XDBEFREEVISUALINFO -#define XdbeGetVisualInfo XDBEGETVISUALINFO -#define XdbeQueryExtension XDBEQUERYEXTENSION -#define XdbeSwapBuffers XDBESWAPBUFFERS -#define XextAddDisplay XEXTADDDISPLAY -#define XextFindDisplay XEXTFINDDISPLAY -#define XextRemoveDisplay XEXTREMOVEDISPLAY -#define XkbSetDetectableAutoRepeat XKBSETDETECTABLEAUTOREPEAT -#define XmActivateProtocol XMACTIVATEPROTOCOL -#define XmAddProtocolCallback XMADDPROTOCOLCALLBACK -#define XmAddProtocols XMADDPROTOCOLS -#define XmChangeColor XMCHANGECOLOR -#define XmClipboardCopy XMCLIPBOARDCOPY -#define XmClipboardCopyByName XMCLIPBOARDCOPYBYNAME -#define XmClipboardEndCopy XMCLIPBOARDENDCOPY -#define XmClipboardEndRetrieve XMCLIPBOARDENDRETRIEVE -#define XmClipboardInquireCount XMCLIPBOARDINQUIRECOUNT -#define XmClipboardInquireFormat XMCLIPBOARDINQUIREFORMAT -#define XmClipboardInquireLength XMCLIPBOARDINQUIRELENGTH -#define XmClipboardLock XMCLIPBOARDLOCK -#define XmClipboardRetrieve XMCLIPBOARDRETRIEVE -#define XmClipboardStartCopy XMCLIPBOARDSTARTCOPY -#define XmClipboardStartRetrieve XMCLIPBOARDSTARTRETRIEVE -#define XmClipboardUnlock XMCLIPBOARDUNLOCK -#define XmCommandError XMCOMMANDERROR -#define XmCommandGetChild XMCOMMANDGETCHILD -#define XmCommandSetValue XMCOMMANDSETVALUE -#define XmCreateArrowButton XMCREATEARROWBUTTON -#define XmCreateArrowButtonGadget XMCREATEARROWBUTTONGADGET -#define XmCreateBulletinBoardDialog XMCREATEBULLETINBOARDDIALOG -#define XmCreateCascadeButton XMCREATECASCADEBUTTON -#define XmCreateCascadeButtonGadget XMCREATECASCADEBUTTONGADGET -#define XmCreateDialogShell XMCREATEDIALOGSHELL -#define XmCreateDragIcon XMCREATEDRAGICON -#define XmCreateDrawingArea XMCREATEDRAWINGAREA -#define XmCreateDrawnButton XMCREATEDRAWNBUTTON -#define XmCreateErrorDialog XMCREATEERRORDIALOG -#define XmCreateFileSelectionBox XMCREATEFILESELECTIONBOX -#define XmCreateFileSelectionDialog XMCREATEFILESELECTIONDIALOG -#define XmCreateForm XMCREATEFORM -#define XmCreateFormDialog XMCREATEFORMDIALOG -#define XmCreateFrame XMCREATEFRAME -#define XmCreateInformationDialog XMCREATEINFORMATIONDIALOG -#define XmCreateLabel XMCREATELABEL -#define XmCreateLabelGadget XMCREATELABELGADGET -#define XmCreateList XMCREATELIST -#define XmCreateMainWindow XMCREATEMAINWINDOW -#define XmCreateMenuBar XMCREATEMENUBAR -#define XmCreateMessageBox XMCREATEMESSAGEBOX -#define XmCreateMessageDialog XMCREATEMESSAGEDIALOG -#define XmCreateOptionMenu XMCREATEOPTIONMENU -#define XmCreatePanedWindow XMCREATEPANEDWINDOW -#define XmCreatePopupMenu XMCREATEPOPUPMENU -#define XmCreatePromptDialog XMCREATEPROMPTDIALOG -#define XmCreatePulldownMenu XMCREATEPULLDOWNMENU -#define XmCreatePushButton XMCREATEPUSHBUTTON -#define XmCreatePushButtonGadget XMCREATEPUSHBUTTONGADGET -#define XmCreateQuestionDialog XMCREATEQUESTIONDIALOG -#define XmCreateRadioBox XMCREATERADIOBOX -#define XmCreateRowColumn XMCREATEROWCOLUMN -#define XmCreateScale XMCREATESCALE -#define XmCreateScrollBar XMCREATESCROLLBAR -#define XmCreateScrolledList XMCREATESCROLLEDLIST -#define XmCreateScrolledText XMCREATESCROLLEDTEXT -#define XmCreateScrolledWindow XMCREATESCROLLEDWINDOW -#define XmCreateSelectionDialog XMCREATESELECTIONDIALOG -#define XmCreateSeparator XMCREATESEPARATOR -#define XmCreateSeparatorGadget XMCREATESEPARATORGADGET -#define XmCreateSimpleMenuBar XMCREATESIMPLEMENUBAR -#define XmCreateTemplateDialog XMCREATETEMPLATEDIALOG -#define XmCreateText XMCREATETEXT -#define XmCreateTextField XMCREATETEXTFIELD -#define XmCreateToggleButton XMCREATETOGGLEBUTTON -#define XmCreateToggleButtonGadget XMCREATETOGGLEBUTTONGADGET -#define XmCreateWarningDialog XMCREATEWARNINGDIALOG -#define XmCvtCTToXmString XMCVTCTTOXMSTRING -#define XmDestroyPixmap XMDESTROYPIXMAP -#define XmDragStart XMDRAGSTART -#define XmDropSiteRegister XMDROPSITEREGISTER -#define XmDropSiteUnregister XMDROPSITEUNREGISTER -#define XmDropSiteUpdate XMDROPSITEUPDATE -#define XmDropTransferStart XMDROPTRANSFERSTART -#define XmFileSelectionBoxGetChild XMFILESELECTIONBOXGETCHILD -#define XmFileSelectionDoSearch XMFILESELECTIONDOSEARCH -#define XmFontListAppendEntry XMFONTLISTAPPENDENTRY -#define XmFontListCopy XMFONTLISTCOPY -#define XmFontListCreate XMFONTLISTCREATE -#define XmFontListEntryCreate XMFONTLISTENTRYCREATE -#define XmFontListEntryFree XMFONTLISTENTRYFREE -#define XmFontListEntryGetFont XMFONTLISTENTRYGETFONT -#define XmFontListEntryGetTag XMFONTLISTENTRYGETTAG -#define XmFontListEntryLoad XMFONTLISTENTRYLOAD -#define XmFontListFree XMFONTLISTFREE -#define XmFontListFreeFontContext XMFONTLISTFREEFONTCONTEXT -#define XmFontListGetNextFont XMFONTLISTGETNEXTFONT -#define XmFontListInitFontContext XMFONTLISTINITFONTCONTEXT -#define XmFontListNextEntry XMFONTLISTNEXTENTRY -#define XmGetColors XMGETCOLORS -#define XmGetColorCalculation XMGETCOLORCALCULATION -#define XmGetFocusWidget XMGETFOCUSWIDGET -#define XmGetMenuCursor XMGETMENUCURSOR -#define XmGetPixmap XMGETPIXMAP -#define XmGetPixmapByDepth XMGETPIXMAPBYDEPTH -#define XmGetTearOffControl XMGETTEAROFFCONTROL -#define XmGetXmDisplay XMGETXMDISPLAY -#define XmImMbLookupString XMIMMBLOOKUPSTRING -#define XmImRegister XMIMREGISTER -#define XmImSetFocusValues XMIMSETFOCUSVALUES -#define XmImSetValues XMIMSETVALUES -#define XmImUnregister XMIMUNREGISTER -#define XmImUnsetFocus XMIMUNSETFOCUS -#define XmInstallImage XMINSTALLIMAGE -#define XmInternAtom XMINTERNATOM -#define XmIsMotifWMRunning XMISMOTIFWMRUNNING -#define XmListAddItem XMLISTADDITEM -#define XmListAddItemUnselected XMLISTADDITEMUNSELECTED -#define XmListAddItems XMLISTADDITEMS -#define XmListAddItemsUnselected XMLISTADDITEMSUNSELECTED -#define XmListDeleteAllItems XMLISTDELETEALLITEMS -#define XmListDeleteItem XMLISTDELETEITEM -#define XmListDeleteItemsPos XMLISTDELETEITEMSPOS -#define XmListDeletePos XMLISTDELETEPOS -#define XmListDeselectAllItems XMLISTDESELECTALLITEMS -#define XmListDeselectPos XMLISTDESELECTPOS -#define XmListGetKbdItemPos XMLISTGETKBDITEMPOS -#define XmListGetMatchPos XMLISTGETMATCHPOS -#define XmListGetSelectedPos XMLISTGETSELECTEDPOS -#define XmListItemExists XMLISTITEMEXISTS -#define XmListItemPos XMLISTITEMPOS -#define XmListPosSelected XMLISTPOSSELECTED -#define XmListReplaceItems XMLISTREPLACEITEMS -#define XmListReplaceItemsPos XMLISTREPLACEITEMSPOS -#define XmListSelectItem XMLISTSELECTITEM -#define XmListSelectPos XMLISTSELECTPOS -#define XmListSetBottomPos XMLISTSETBOTTOMPOS -#define XmListSetItem XMLISTSETITEM -#define XmListSetKbdItemPos XMLISTSETKBDITEMPOS -#define XmListSetPos XMLISTSETPOS -#define XmMainWindowSetAreas XMMAINWINDOWSETAREAS -#define XmMenuPosition XMMENUPOSITION -#define XmMessageBoxGetChild XMMESSAGEBOXGETCHILD -#define XmOptionButtonGadget XMOPTIONBUTTONGADGET -#define XmOptionLabelGadget XMOPTIONLABELGADGET -#define XmProcessTraversal XMPROCESSTRAVERSAL -#define XmQmotif XMQMOTIF -#define XmRemoveProtocolCallback XMREMOVEPROTOCOLCALLBACK -#define XmRemoveProtocols XMREMOVEPROTOCOLS -#define XmRemoveTabGroup XMREMOVETABGROUP -#define XmRepTypeGetId XMREPTYPEGETID -#define XmRepTypeGetRecord XMREPTYPEGETRECORD -#define XmRepTypeInstallTearOffModelCon XMREPTYPEINSTALLTEAROFFMODELCON -#define XmRepTypeRegister XMREPTYPEREGISTER -#define XmRepTypeValidValue XMREPTYPEVALIDVALUE -#define XmScrollBarGetValues XMSCROLLBARGETVALUES -#define XmScrollBarSetValues XMSCROLLBARSETVALUES -#define XmScrolledWindowSetAreas XMSCROLLEDWINDOWSETAREAS -#define XmSelectionBoxGetChild XMSELECTIONBOXGETCHILD -#define XmSetColorCalculation XMSETCOLORCALCULATION -#define XmStringByteCompare XMSTRINGBYTECOMPARE -#define XmStringCompare XMSTRINGCOMPARE -#define XmStringConcat XMSTRINGCONCAT -#define XmStringCopy XMSTRINGCOPY -#define XmStringCreate XMSTRINGCREATE -#define XmStringCreateLocalized XMSTRINGCREATELOCALIZED -#define XmStringCreateLtoR XMSTRINGCREATELTOR -#define XmStringCreateSimple XMSTRINGCREATESIMPLE -#define XmStringDraw XMSTRINGDRAW -#define XmStringDrawUnderline XMSTRINGDRAWUNDERLINE -#define XmStringExtent XMSTRINGEXTENT -#define XmStringFree XMSTRINGFREE -#define XmStringFreeContext XMSTRINGFREECONTEXT -#define XmStringGetLtoR XMSTRINGGETLTOR -#define XmStringGetNextComponent XMSTRINGGETNEXTCOMPONENT -#define XmStringGetNextSegment XMSTRINGGETNEXTSEGMENT -#define XmStringInitContext XMSTRINGINITCONTEXT -#define XmStringLength XMSTRINGLENGTH -#define XmStringLtoRCreate XMSTRINGLTORCREATE -#define XmStringNConcat XMSTRINGNCONCAT -#define XmStringSegmentCreate XMSTRINGSEGMENTCREATE -#define XmStringSeparatorCreate XMSTRINGSEPARATORCREATE -#define XmStringWidth XMSTRINGWIDTH -#define XmTextClearSelection XMTEXTCLEARSELECTION -#define XmTextCopy XMTEXTCOPY -#define XmTextCut XMTEXTCUT -#define XmTextFieldClearSelection XMTEXTFIELDCLEARSELECTION -#define XmTextFieldCopy XMTEXTFIELDCOPY -#define XmTextFieldCut XMTEXTFIELDCUT -#define XmTextFieldGetEditable XMTEXTFIELDGETEDITABLE -#define XmTextFieldGetInsertionPosition XMTEXTFIELDGETINSERTIONPOSITION -#define XmTextFieldGetLastPosition XMTEXTFIELDGETLASTPOSITION -#define XmTextFieldGetMaxLength XMTEXTFIELDGETMAXLENGTH -#define XmTextFieldGetSelection XMTEXTFIELDGETSELECTION -#define XmTextFieldGetSelectionPosition XMTEXTFIELDGETSELECTIONPOSITION -#define XmTextFieldGetString XMTEXTFIELDGETSTRING -#define XmTextFieldInsert XMTEXTFIELDINSERT -#define XmTextFieldPaste XMTEXTFIELDPASTE -#define XmTextFieldRemove XMTEXTFIELDREMOVE -#define XmTextFieldReplace XMTEXTFIELDREPLACE -#define XmTextFieldSetAddMode XMTEXTFIELDSETADDMODE -#define XmTextFieldSetHighlight XMTEXTFIELDSETHIGHLIGHT -#define XmTextFieldSetInsertionPosition XMTEXTFIELDSETINSERTIONPOSITION -#define XmTextFieldSetMaxLength XMTEXTFIELDSETMAXLENGTH -#define XmTextFieldSetSelection XMTEXTFIELDSETSELECTION -#define XmTextFieldSetString XMTEXTFIELDSETSTRING -#define XmTextFieldShowPosition XMTEXTFIELDSHOWPOSITION -#define XmTextGetCursorPosition XMTEXTGETCURSORPOSITION -#define XmTextGetEditable XMTEXTGETEDITABLE -#define XmTextGetInsertionPosition XMTEXTGETINSERTIONPOSITION -#define XmTextGetLastPosition XMTEXTGETLASTPOSITION -#define XmTextGetMaxLength XMTEXTGETMAXLENGTH -#define XmTextGetSelection XMTEXTGETSELECTION -#define XmTextGetSelectionPosition XMTEXTGETSELECTIONPOSITION -#define XmTextGetString XMTEXTGETSTRING -#define XmTextInsert XMTEXTINSERT -#define XmTextPaste XMTEXTPASTE -#define XmTextPosToXY XMTEXTPOSTOXY -#define XmTextRemove XMTEXTREMOVE -#define XmTextReplace XMTEXTREPLACE -#define XmTextSetCursorPosition XMTEXTSETCURSORPOSITION -#define XmTextSetEditable XMTEXTSETEDITABLE -#define XmTextSetHighlight XMTEXTSETHIGHLIGHT -#define XmTextSetInsertionPosition XMTEXTSETINSERTIONPOSITION -#define XmTextSetSelection XMTEXTSETSELECTION -#define XmTextSetString XMTEXTSETSTRING -#define XmTextSetTopCharacter XMTEXTSETTOPCHARACTER -#define XmTextShowPosition XMTEXTSHOWPOSITION -#define XmToggleButtonGadgetGetState XMTOGGLEBUTTONGADGETGETSTATE -#define XmToggleButtonGadgetSetState XMTOGGLEBUTTONGADGETSETSTATE -#define XmToggleButtonGetState XMTOGGLEBUTTONGETSTATE -#define XmToggleButtonSetState XMTOGGLEBUTTONSETSTATE -#define XmUninstallImage XMUNINSTALLIMAGE -#define XmUpdateDisplay XMUPDATEDISPLAY -#define XmVaCreateSimpleRadioBox XMVACREATESIMPLERADIOBOX -#define XmbDrawString XMBDRAWSTRING -#define XmbLookupString XMBLOOKUPSTRING -#define XmbResetIC XMBRESETIC -#define XmbSetWMProperties XMBSETWMPROPERTIES -#define XmbTextEscapement XMBTEXTESCAPEMENT -#define XmbTextExtents XMBTEXTEXTENTS -#define XmbTextListToTextProperty XMBTEXTLISTTOTEXTPROPERTY -#define XmbTextPropertyToTextList XMBTEXTPROPERTYTOTEXTLIST -#define XmbufCreateBuffers XMBUFCREATEBUFFERS -#define XmbufDestroyBuffers XMBUFDESTROYBUFFERS -#define XmbufDisplayBuffers XMBUFDISPLAYBUFFERS -#define XmbufQueryExtension XMBUFQUERYEXTENSION -#define Xmemory_free XMEMORY_FREE -#define Xmemory_malloc XMEMORY_MALLOC -#define XmuClientWindow XMUCLIENTWINDOW -#define XmuConvertStandardSelection XMUCONVERTSTANDARDSELECTION -#define XmuCvtStringToBitmap XMUCVTSTRINGTOBITMAP -#define XmuInternAtom XMUINTERNATOM -#define XmuInternStrings XMUINTERNSTRINGS -#define XmuLookupStandardColormap XMULOOKUPSTANDARDCOLORMAP -#define XmuPrintDefaultErrorMessage XMUPRINTDEFAULTERRORMESSAGE -#define XrmCombineDatabase XRMCOMBINEDATABASE -#define XrmCombineFileDatabase XRMCOMBINEFILEDATABASE -#define XrmDestroyDatabase XRMDESTROYDATABASE -#define XrmGetDatabase XRMGETDATABASE -#define XrmGetFileDatabase XRMGETFILEDATABASE -#define XrmGetResource XRMGETRESOURCE -#define XrmGetStringDatabase XRMGETSTRINGDATABASE -#define XrmInitialize XRMINITIALIZE -#define XrmMergeDatabases XRMMERGEDATABASES -#define XrmParseCommand XRMPARSECOMMAND -#define XrmPermStringToQuark XRMPERMSTRINGTOQUARK -#define XrmPutFileDatabase XRMPUTFILEDATABASE -#define XrmPutLineResource XRMPUTLINERESOURCE -#define XrmPutStringResource XRMPUTSTRINGRESOURCE -#define XrmQGetResource XRMQGETRESOURCE -#define XrmQPutStringResource XRMQPUTSTRINGRESOURCE -#define XrmQuarkToString XRMQUARKTOSTRING -#define XrmSetDatabase XRMSETDATABASE -#define XrmStringToBindingQuarkList XRMSTRINGTOBINDINGQUARKLIST -#define XrmStringToQuark XRMSTRINGTOQUARK -#define XtAddCallback XTADDCALLBACK -#define XtAddCallbacks XTADDCALLBACKS -#define XtAddConverter XTADDCONVERTER -#define XtAddEventHandler XTADDEVENTHANDLER -#define XtAddExposureToRegion XTADDEXPOSURETOREGION -#define XtAddGrab XTADDGRAB -#define XtAddRawEventHandler XTADDRAWEVENTHANDLER -#define XtAllocateGC XTALLOCATEGC -#define XtAppAddActions XTAPPADDACTIONS -#define XtAppAddInput XTAPPADDINPUT -#define XtAppAddTimeOut XTAPPADDTIMEOUT -#define XtAppAddWorkProc XTAPPADDWORKPROC -#define XtAppCreateShell XTAPPCREATESHELL -#define XtAppError XTAPPERROR -#define XtAppErrorMsg XTAPPERRORMSG -#define XtAppGetErrorDatabase XTAPPGETERRORDATABASE -#define XtAppGetErrorDatabaseText XTAPPGETERRORDATABASETEXT -#define XtAppSetErrorMsgHandler XTAPPSETERRORMSGHANDLER -#define XtAppInitialize XTAPPINITIALIZE -#define XtAppMainLoop XTAPPMAINLOOP -#define XtAppNextEvent XTAPPNEXTEVENT -#define XtAppPeekEvent XTAPPPEEKEVENT -#define XtAppPending XTAPPPENDING -#define XtAppProcessEvent XTAPPPROCESSEVENT -#define XtAppSetErrorHandler XTAPPSETERRORHANDLER -#define XtAppSetFallbackResources XTAPPSETFALLBACKRESOURCES -#define XtAppSetTypeConverter XTAPPSETTYPECONVERTER -#define XtAppSetWarningHandler XTAPPSETWARNINGHANDLER -#define XtAppWarningMsg XTAPPWARNINGMSG -#define XtAppSetWarningMsgHandler XTAPPSETWARNINGMSGHANDLER -#define XtAppWarning XTAPPWARNING -#define XtAugmentTranslations XTAUGMENTTRANSLATIONS -#define XtCallActionProc XTCALLACTIONPROC -#define XtCallCallbackList XTCALLCALLBACKLIST -#define XtCallCallbacks XTCALLCALLBACKS -#define XtCallConverter XTCALLCONVERTER -#define XtCalloc XTCALLOC -#ifndef NOXTDISPLAY -#define XtClass XTCLASS -#endif -#define XtCloseDisplay XTCLOSEDISPLAY -#define XtConfigureWidget XTCONFIGUREWIDGET -#define XtConvert XTCONVERT -#define XtConvertAndStore XTCONVERTANDSTORE -#define XtCreateApplicationContext XTCREATEAPPLICATIONCONTEXT -#define XtCreateManagedWidget XTCREATEMANAGEDWIDGET -#define XtCreatePopupShell XTCREATEPOPUPSHELL -#define XtCreateWidget XTCREATEWIDGET -#define XtCreateWindow XTCREATEWINDOW -#define XtCvtStringToFont XTCVTSTRINGTOFONT -#define XtDatabase XTDATABASE -#define XtDestroyApplicationContext XTDESTROYAPPLICATIONCONTEXT -#define XtDestroyWidget XTDESTROYWIDGET -#define XtDisownSelection XTDISOWNSELECTION -#define XtDispatchEvent XTDISPATCHEVENT -#ifndef NOXTDISPLAY -#define XtDisplay XTDISPLAY -#endif -#define XtDisplayInitialize XTDISPLAYINITIALIZE -#define XtDisplayOfObject XTDISPLAYOFOBJECT -#define XtDisplayStringConvWarning XTDISPLAYSTRINGCONVWARNING -#define XtDisplayToApplicationContext XTDISPLAYTOAPPLICATIONCONTEXT -#define XtError XTERROR -#define XtErrorMsg XTERRORMSG -#define XtFree XTFREE -#define XtGetActionKeysym XTGETACTIONKEYSYM -#define XtGetActionList XTGETACTIONLIST -#define XtGetApplicationNameAndClass XTGETAPPLICATIONNAMEANDCLASS -#define XtGetApplicationResources XTGETAPPLICATIONRESOURCES -#define XtGetClassExtension XTGETCLASSEXTENSION -#define XtGetConstraintResourceList XTGETCONSTRAINTRESOURCELIST -#define XtGetGC XTGETGC -#define XtGetMultiClickTime XTGETMULTICLICKTIME -#define XtGetResourceList XTGETRESOURCELIST -#define XtGetSelectionValue XTGETSELECTIONVALUE -#define XtGetSelectionValues XTGETSELECTIONVALUES -#define XtGetSubresources XTGETSUBRESOURCES -#define XtGetValues XTGETVALUES -#define XtGrabButton XTGRABBUTTON -#define XtGrabKeyboard XTGRABKEYBOARD -#define XtGrabPointer XTGRABPOINTER -#define XtHasCallbacks XTHASCALLBACKS -#define XtInitialize XTINITIALIZE -#define XtInitializeWidgetClass XTINITIALIZEWIDGETCLASS -#define XtInsertEventHandler XTINSERTEVENTHANDLER -#define XtInsertRawEventHandler XTINSERTRAWEVENTHANDLER -#define XtInstallAccelerators XTINSTALLACCELERATORS -#define XtIsManaged XTISMANAGED -#define XtIsObject XTISOBJECT -#ifndef NOXTDISPLAY -#define XtIsRealized XTISREALIZED -#endif -#define XtIsSensitive XTISSENSITIVE -#define XtIsSubclass XTISSUBCLASS -#define XtLastTimestampProcessed XTLASTTIMESTAMPPROCESSED -#define XtMainLoop XTMAINLOOP -#define XtMakeGeometryRequest XTMAKEGEOMETRYREQUEST -#define XtMakeResizeRequest XTMAKERESIZEREQUEST -#define XtMalloc XTMALLOC -#define XtManageChild XTMANAGECHILD -#define XtManageChildren XTMANAGECHILDREN -#define XtMergeArgLists XTMERGEARGLISTS -#define XtMoveWidget XTMOVEWIDGET -#define XtName XTNAME -#define XtNameToWidget XTNAMETOWIDGET -#define XtOpenApplication XTOPENAPPLICATION -#define XtOpenDisplay XTOPENDISPLAY -#define XtOverrideTranslations XTOVERRIDETRANSLATIONS -#define XtOwnSelection XTOWNSELECTION -#ifndef NOXTDISPLAY -#define XtParent XTPARENT -#endif -#define XtParseAcceleratorTable XTPARSEACCELERATORTABLE -#define XtParseTranslationTable XTPARSETRANSLATIONTABLE -#define XtPopdown XTPOPDOWN -#define XtPopup XTPOPUP -#define XtPopupSpringLoaded XTPOPUPSPRINGLOADED -#define XtQueryGeometry XTQUERYGEOMETRY -#define XtRealizeWidget XTREALIZEWIDGET -#define XtRealloc XTREALLOC -#define XtRegisterDrawable _XTREGISTERWINDOW -#define XtRegisterGrabAction XTREGISTERGRABACTION -#define XtReleaseGC XTRELEASEGC -#define XtRemoveAllCallbacks XTREMOVEALLCALLBACKS -#define XtRemoveCallback XTREMOVECALLBACK -#define XtRemoveEventHandler XTREMOVEEVENTHANDLER -#define XtRemoveGrab XTREMOVEGRAB -#define XtRemoveInput XTREMOVEINPUT -#define XtRemoveTimeOut XTREMOVETIMEOUT -#define XtRemoveWorkProc XTREMOVEWORKPROC -#define XtResizeWidget XTRESIZEWIDGET -#define XtResolvePathname XTRESOLVEPATHNAME -#ifndef NOXTDISPLAY -#define XtScreen XTSCREEN -#endif -#define XtScreenDatabase XTSCREENDATABASE -#define XtScreenOfObject XTSCREENOFOBJECT -#define XtSessionReturnToken XTSESSIONRETURNTOKEN -#define XtSetErrorHandler XTSETERRORHANDLER -#define XtSetKeyboardFocus XTSETKEYBOARDFOCUS -#define XtSetLanguageProc XTSETLANGUAGEPROC -#define XtSetMappedWhenManaged XTSETMAPPEDWHENMANAGED -#define XtSetSensitive XTSETSENSITIVE -#define XtSetTypeConverter XTSETTYPECONVERTER -#define XtSetValues XTSETVALUES -#define XtShellStrings XTSHELLSTRINGS -#define XtStringConversionWarning XTSTRINGCONVERSIONWARNING -#define XtStrings XTSTRINGS -#define XtToolkitInitialize XTTOOLKITINITIALIZE -#define XtTranslateCoords XTTRANSLATECOORDS -#define XtTranslateKeycode XTTRANSLATEKEYCODE -#define XtUngrabButton XTUNGRABBUTTON -#define XtUngrabKeyboard XTUNGRABKEYBOARD -#define XtUngrabPointer XTUNGRABPOINTER -#define XtUnmanageChild XTUNMANAGECHILD -#define XtUnmanageChildren XTUNMANAGECHILDREN -#define XtUnrealizeWidget XTUNREALIZEWIDGET -#define XtUnregisterDrawable _XTUNREGISTERWINDOW -#define XtVaAppCreateShell XTVAAPPCREATESHELL -#define XtVaCreateManagedWidget XTVACREATEMANAGEDWIDGET -#define XtVaCreatePopupShell XTVACREATEPOPUPSHELL -#define XtVaCreateWidget XTVACREATEWIDGET -#define XtVaGetApplicationResources XTVAGETAPPLICATIONRESOURCES -#define XtVaGetValues XTVAGETVALUES -#define XtVaSetValues XTVASETVALUES -#define XtWarning XTWARNING -#define XtWarningMsg XTWARNINGMSG -#define XtWidgetToApplicationContext XTWIDGETTOAPPLICATIONCONTEXT -#ifndef NOXTDISPLAY -#define XtWindow XTWINDOW -#endif -#define XtWindowOfObject XTWINDOWOFOBJECT -#define XtWindowToWidget XTWINDOWTOWIDGET -#define XwcDrawImageString XWCDRAWIMAGESTRING -#define XwcDrawString XWCDRAWSTRING -#define XwcFreeStringList XWCFREESTRINGLIST -#define XwcTextEscapement XWCTEXTESCAPEMENT -#define XwcTextExtents XWCTEXTEXTENTS -#define XwcTextListToTextProperty XWCTEXTLISTTOTEXTPROPERTY -#define XwcLookupString XWCLOOKUPSTRING -#define XwcTextPropertyToTextList XWCTEXTPROPERTYTOTEXTLIST -#define _XAllocTemp _XALLOCTEMP -#define _XDeqAsyncHandler _XDEQASYNCHANDLER -#define _XEatData _XEATDATA -#define _XFlush _XFLUSH -#define _XFreeTemp _XFREETEMP -#define _XGetAsyncReply _XGETASYNCREPLY -#define _XInitImageFuncPtrs _XINITIMAGEFUNCPTRS -#define _XRead _XREAD -#define _XReadPad _XREADPAD -#define _XRegisterFilterByType _XREGISTERFILTERBYTYPE -#define _XReply _XREPLY -#define _XSend _XSEND -#define _XUnregisterFilter _XUNREGISTERFILTER -#define _XVIDtoVisual _XVIDTOVISUAL -#define _XmBottomShadowColorDefault _XMBOTTOMSHADOWCOLORDEFAULT -#define _XmClearBorder _XMCLEARBORDER -#define _XmConfigureObject _XMCONFIGUREOBJECT -#define _XmDestroyParentCallback _XMDESTROYPARENTCALLBACK -#define _XmDrawArrow _XMDRAWARROW -#define _XmDrawShadows _XMDRAWSHADOWS -#define _XmFontListGetDefaultFont _XMFONTLISTGETDEFAULTFONT -#define _XmFromHorizontalPixels _XMFROMHORIZONTALPIXELS -#define _XmFromVerticalPixels _XMFROMVERTICALPIXELS -#define _XmGetClassExtensionPtr _XMGETCLASSEXTENSIONPTR -#define _XmGetDefaultFontList _XMGETDEFAULTFONTLIST -#define _XmGetTextualDragIcon _XMGETTEXTUALDRAGICON -#define _XmGetWidgetExtData _XMGETWIDGETEXTDATA -#define _XmGrabKeyboard _XMGRABKEYBOARD -#define _XmGrabPointer _XMGRABPOINTER -#define _XmInheritClass _XMINHERITCLASS -#define _XmInputForGadget _XMINPUTFORGADGET -#define _XmInputInGadget _XMINPUTINGADGET -#define _XmMakeGeometryRequest _XMMAKEGEOMETRYREQUEST -#define _XmMenuPopDown _XMMENUPOPDOWN -#define _XmMoveObject _XMMOVEOBJECT -#define _XmNavigChangeManaged _XMNAVIGCHANGEMANAGED -#define _XmOSBuildFileList _XMOSBUILDFILELIST -#define _XmOSFileCompare _XMOSFILECOMPARE -#define _XmOSFindPatternPart _XMOSFINDPATTERNPART -#define _XmOSQualifyFileSpec _XMOSQUALIFYFILESPEC -#define _XmPostPopupMenu _XMPOSTPOPUPMENU -#define _XmPrimitiveEnter _XMPRIMITIVEENTER -#define _XmPrimitiveLeave _XMPRIMITIVELEAVE -#define _XmRedisplayGadgets _XMREDISPLAYGADGETS -#define _XmShellIsExclusive _XMSHELLISEXCLUSIVE -#define _XmStringDraw _XMSTRINGDRAW -#define _XmStringGetTextConcat _XMSTRINGGETTEXTCONCAT -#define _XmStrings _XMSTRINGS -#define _XmToHorizontalPixels _XMTOHORIZONTALPIXELS -#define _XmToVerticalPixels _XMTOVERTICALPIXELS -#define _XmTopShadowColorDefault _XMTOPSHADOWCOLORDEFAULT -#define _Xm_fastPtr _XM_FASTPTR -#define _XtCheckSubclassFlag _XTCHECKSUBCLASSFLAG -#define _XtCopyFromArg _XTCOPYFROMARG -#define _XtCountVaList _XTCOUNTVALIST -#define _XtInherit _XTINHERIT -#define _XtInheritTranslations _XTINHERITTRANSLATIONS -#define _XtIsSubclassOf _XTISSUBCLASSOF -#define _XtVaToArgList _XTVATOARGLIST -#define applicationShellWidgetClass APPLICATIONSHELLWIDGETCLASS -#define cli$dcl_parse CLI$DCL_PARSE -#define cli$get_value CLI$GET_VALUE -#define cli$present CLI$PRESENT -#define compositeClassRec COMPOSITECLASSREC -#define compositeWidgetClass COMPOSITEWIDGETCLASS -#define constraintClassRec CONSTRAINTCLASSREC -#define constraintWidgetClass CONSTRAINTWIDGETCLASS -#define coreWidgetClass COREWIDGETCLASS -#define exe$getspi EXE$GETSPI -#define lbr$close LBR$CLOSE -#define lbr$get_header LBR$GET_HEADER -#define lbr$get_index LBR$GET_INDEX -#define lbr$get_record LBR$GET_RECORD -#define lbr$ini_control LBR$INI_CONTROL -#define lbr$lookup_key LBR$LOOKUP_KEY -#define lbr$open LBR$OPEN -#define lbr$output_help LBR$OUTPUT_HELP -#define lib$add_times LIB$ADD_TIMES -#define lib$addx LIB$ADDX -#define lib$create_dir LIB$CREATE_DIR -#define lib$create_vm_zone LIB$CREATE_VM_ZONE -#define lib$cvt_from_internal_time LIB$CVT_FROM_INTERNAL_TIME -#define lib$cvt_htb LIB$CVT_HTB -#define lib$cvt_vectim LIB$CVT_VECTIM -#define lib$day LIB$DAY -#define lib$day_of_week LIB$DAY_OF_WEEK -#define lib$delete_symbol LIB$DELETE_SYMBOL -#define lib$delete_vm_zone LIB$DELETE_VM_ZONE -#define lib$disable_ctrl LIB$DISABLE_CTRL -#define lib$ediv LIB$EDIV -#define lib$emul LIB$EMUL -#define lib$enable_ctrl LIB$ENABLE_CTRL -#define lib$find_vm_zone LIB$FIND_VM_ZONE -#define lib$format_date_time LIB$FORMAT_DATE_TIME -#define lib$free_timer LIB$FREE_TIMER -#define lib$free_vm LIB$FREE_VM -#define lib$get_ef LIB$GET_EF -#define lib$get_foreign LIB$GET_FOREIGN -#define lib$get_input LIB$GET_INPUT -#define lib$get_users_language LIB$GET_USERS_LANGUAGE -#define lib$get_vm LIB$GET_VM -#define lib$get_symbol LIB$GET_SYMBOL -#define lib$getdvi LIB$GETDVI -#define lib$init_date_time_context LIB$INIT_DATE_TIME_CONTEXT -#define lib$init_timer LIB$INIT_TIMER -#define lib$find_file LIB$FIND_FILE -#define lib$find_file_end LIB$FIND_FILE_END -#define lib$find_image_symbol LIB$FIND_IMAGE_SYMBOL -#define lib$mult_delta_time LIB$MULT_DELTA_TIME -#define lib$put_output LIB$PUT_OUTPUT -#define lib$rename_file LIB$RENAME_FILE -#define lib$reset_vm_zone LIB$RESET_VM_ZONE -#define lib$set_symbol LIB$SET_SYMBOL -#define lib$sfree1_dd LIB$SFREE1_DD -#define lib$show_vm LIB$SHOW_VM -#define lib$show_vm_zone LIB$SHOW_VM_ZONE -#define lib$spawn LIB$SPAWN -#define lib$stat_timer LIB$STAT_TIMER -#define lib$subx LIB$SUBX -#define lib$sub_times LIB$SUB_TIMES -#define lib$wait LIB$WAIT -#define mail$send_add_address MAIL$SEND_ADD_ADDRESS -#define mail$send_add_attribute MAIL$SEND_ADD_ATTRIBUTE -#define mail$send_add_bodypart MAIL$SEND_ADD_BODYPART -#define mail$send_begin MAIL$SEND_BEGIN -#define mail$send_end MAIL$SEND_END -#define mail$send_message MAIL$SEND_MESSAGE -#define ncs$convert NCS$CONVERT -#define ncs$get_cf NCS$GET_CF -#define objectClass OBJECTCLASS -#define objectClassRec OBJECTCLASSREC -#define overrideShellClassRec OVERRIDESHELLCLASSREC -#define overrideShellWidgetClass OVERRIDESHELLWIDGETCLASS -#define pthread_attr_create PTHREAD_ATTR_CREATE -#define pthread_attr_delete PTHREAD_ATTR_DELETE -#define pthread_attr_destroy PTHREAD_ATTR_DESTROY -#define pthread_attr_getdetach_np PTHREAD_ATTR_GETDETACH_NP -#define pthread_attr_getguardsize_np PTHREAD_ATTR_GETGUARDSIZE_NP -#define pthread_attr_getinheritsched PTHREAD_ATTR_GETINHERITSCHED -#define pthread_attr_getprio PTHREAD_ATTR_GETPRIO -#define pthread_attr_getsched PTHREAD_ATTR_GETSCHED -#define pthread_attr_getschedparam PTHREAD_ATTR_GETSCHEDPARAM -#define pthread_attr_getschedpolicy PTHREAD_ATTR_GETSCHEDPOLICY -#define pthread_attr_getstacksize PTHREAD_ATTR_GETSTACKSIZE -#define pthread_attr_init PTHREAD_ATTR_INIT -#define pthread_attr_setdetach_np PTHREAD_ATTR_SETDETACH_NP -#define pthread_attr_setdetachstate PTHREAD_ATTR_SETDETACHSTATE -#define pthread_attr_setguardsize_np PTHREAD_ATTR_SETGUARDSIZE_NP -#define pthread_attr_setinheritsched PTHREAD_ATTR_SETINHERITSCHED -#define pthread_attr_setprio PTHREAD_ATTR_SETPRIO -#define pthread_attr_setsched PTHREAD_ATTR_SETSCHED -#define pthread_attr_setschedparam PTHREAD_ATTR_SETSCHEDPARAM -#define pthread_attr_setschedpolicy PTHREAD_ATTR_SETSCHEDPOLICY -#ifndef pthread_attr_setscope -# define pthread_attr_setscope PTHREAD_ATTR_SETSCOPE -#endif -#define pthread_attr_setstacksize PTHREAD_ATTR_SETSTACKSIZE -#define pthread_cancel PTHREAD_CANCEL -#define pthread_cancel_e PTHREAD_CANCEL_E -#define pthread_cond_broadcast PTHREAD_COND_BROADCAST -#define pthread_cond_destroy PTHREAD_COND_DESTROY -#define pthread_cond_init PTHREAD_COND_INIT -#define pthread_cond_sig_preempt_int_np PTHREAD_COND_SIG_PREEMPT_INT_NP -#define pthread_cond_signal PTHREAD_COND_SIGNAL -#define pthread_cond_signal_int_np PTHREAD_COND_SIGNAL_INT_NP -#define pthread_cond_timedwait PTHREAD_COND_TIMEDWAIT -#define pthread_cond_wait PTHREAD_COND_WAIT -#define pthread_condattr_create PTHREAD_CONDATTR_CREATE -#define pthread_condattr_delete PTHREAD_CONDATTR_DELETE -#define pthread_condattr_init PTHREAD_CONDATTR_INIT -#define pthread_create PTHREAD_CREATE -#define pthread_delay_np PTHREAD_DELAY_NP -#define pthread_detach PTHREAD_DETACH -#define pthread_equal PTHREAD_EQUAL -#define pthread_exc_fetch_fp_np PTHREAD_EXC_FETCH_FP_NP -#define pthread_exc_handler_np PTHREAD_EXC_HANDLER_NP -#define pthread_exc_matches_np PTHREAD_EXC_MATCHES_NP -#define pthread_exc_pop_ctx_np PTHREAD_EXC_POP_CTX_NP -#define pthread_exc_push_ctx_np PTHREAD_EXC_PUSH_CTX_NP -#define pthread_exc_raise_np PTHREAD_EXC_RAISE_NP -#define pthread_exc_savecontext_np PTHREAD_EXC_SAVECONTEXT_NP -#define pthread_exit PTHREAD_EXIT -#define pthread_get_expiration_np PTHREAD_GET_EXPIRATION_NP -#define pthread_getprio PTHREAD_GETPRIO -#define pthread_getschedparam PTHREAD_GETSCHEDPARAM -#define pthread_getscheduler PTHREAD_GETSCHEDULER -#define pthread_getspecific PTHREAD_GETSPECIFIC -#define pthread_getunique_np PTHREAD_GETUNIQUE_NP -#define pthread_join PTHREAD_JOIN -#define pthread_join32 PTHREAD_JOIN32 -#define pthread_key_create PTHREAD_KEY_CREATE -#define pthread_key_delete PTHREAD_KEY_DELETE -#define pthread_keycreate PTHREAD_KEYCREATE -#define pthread_kill PTHREAD_KILL -#define pthread_lock_global_np PTHREAD_LOCK_GLOBAL_NP -#define pthread_mutex_destroy PTHREAD_MUTEX_DESTROY -#define pthread_mutex_init PTHREAD_MUTEX_INIT -#define pthread_mutex_lock PTHREAD_MUTEX_LOCK -#define pthread_mutex_trylock PTHREAD_MUTEX_TRYLOCK -#define pthread_mutex_unlock PTHREAD_MUTEX_UNLOCK -#define pthread_mutexattr_create PTHREAD_MUTEXATTR_CREATE -#define pthread_mutexattr_delete PTHREAD_MUTEXATTR_DELETE -#define pthread_mutexattr_destroy PTHREAD_MUTEXATTR_DESTROY -#define pthread_mutexattr_getkind_np PTHREAD_MUTEXATTR_GETKIND_NP -#define pthread_mutexattr_init PTHREAD_MUTEXATTR_INIT -#define pthread_mutexattr_setkind_np PTHREAD_MUTEXATTR_SETKIND_NP -#define pthread_mutexattr_settype_np PTHREAD_MUTEXATTR_SETTYPE_NP -#define pthread_once PTHREAD_ONCE -#define pthread_resume_np PTHREAD_RESUME_NP -#define pthread_self PTHREAD_SELF -#define pthread_setasynccancel PTHREAD_SETASYNCCANCEL -#define pthread_setcancel PTHREAD_SETCANCEL -#define pthread_setcancelstate PTHREAD_SETCANCELSTATE -#define pthread_setcanceltype PTHREAD_SETCANCELTYPE -#define pthread_setprio PTHREAD_SETPRIO -#define pthread_setschedparam PTHREAD_SETSCHEDPARAM -#define pthread_setscheduler PTHREAD_SETSCHEDULER -#define pthread_setspecific PTHREAD_SETSPECIFIC -#define pthread_suspend_np PTHREAD_SUSPEND_NP -#define pthread_testcancel PTHREAD_TESTCANCEL -#define pthread_unlock_global_np PTHREAD_UNLOCK_GLOBAL_NP -#define pthread_yield PTHREAD_YIELD -#define pthread_yield_np PTHREAD_YIELD_NP -#define rectObjClass RECTOBJCLASS -#define rectObjClassRec RECTOBJCLASSREC -#define sessionShellWidgetClass SESSIONSHELLWIDGETCLASS -#define shellWidgetClass SHELLWIDGETCLASS -#define shmat SHMAT -#define shmctl SHMCTL -#define shmdt SHMDT -#define shmget SHMGET -#define smg$create_key_table SMG$CREATE_KEY_TABLE -#define smg$create_virtual_keyboard SMG$CREATE_VIRTUAL_KEYBOARD -#define smg$read_composed_line SMG$READ_COMPOSED_LINE -#define sys$add_ident SYS$ADD_IDENT -#define sys$asctoid SYS$ASCTOID -#define sys$assign SYS$ASSIGN -#define sys$bintim SYS$BINTIM -#define sys$cancel SYS$CANCEL -#define sys$cantim SYS$CANTIM -#define sys$check_access SYS$CHECK_ACCESS -#define sys$close SYS$CLOSE -#define sys$connect SYS$CONNECT -#define sys$create SYS$CREATE -#define sys$create_user_profile SYS$CREATE_USER_PROFILE -#define sys$crembx SYS$CREMBX -#define sys$creprc SYS$CREPRC -#define sys$crmpsc SYS$CRMPSC -#define sys$dassgn SYS$DASSGN -#define sys$dclast SYS$DCLAST -#define sys$dclexh SYS$DCLEXH -#define sys$delprc SYS$DELPRC -#define sys$deq SYS$DEQ -#define sys$dgblsc SYS$DGBLSC -#define sys$display SYS$DISPLAY -#define sys$enq SYS$ENQ -#define sys$enqw SYS$ENQW -#define sys$erase SYS$ERASE -#define sys$fao SYS$FAO -#define sys$faol SYS$FAOL -#define sys$find_held SYS$FIND_HELD -#define sys$finish_rdb SYS$FINISH_RDB -#define sys$flush SYS$FLUSH -#define sys$forcex SYS$FORCEX -#define sys$get SYS$GET -#define sys$get_security SYS$GET_SECURITY -#define sys$getdviw SYS$GETDVIW -#define sys$getjpi SYS$GETJPI -#define sys$getjpiw SYS$GETJPIW -#define sys$getlkiw SYS$GETLKIW -#define sys$getmsg SYS$GETMSG -#define sys$getsyi SYS$GETSYI -#define sys$getsyiw SYS$GETSYIW -#define sys$gettim SYS$GETTIM -#define sys$getuai SYS$GETUAI -#define sys$grantid SYS$GRANTID -#define sys$hash_password SYS$HASH_PASSWORD -#define sys$hiber SYS$HIBER -#define sys$mgblsc SYS$MGBLSC -#define sys$numtim SYS$NUMTIM -#define sys$open SYS$OPEN -#define sys$parse SYS$PARSE -#define sys$parse_acl SYS$PARSE_ACL -#define sys$parse_acl SYS$PARSE_ACL -#define sys$persona_assume SYS$PERSONA_ASSUME -#define sys$persona_create SYS$PERSONA_CREATE -#define sys$persona_delete SYS$PERSONA_DELETE -#define sys$process_scan SYS$PROCESS_SCAN -#define sys$put SYS$PUT -#define sys$qio SYS$QIO -#define sys$qiow SYS$QIOW -#define sys$read SYS$READ -#define sys$resched SYS$RESCHED -#define sys$rewind SYS$REWIND -#define sys$search SYS$SEARCH -#define sys$set_security SYS$SET_SECURITY -#define sys$setast SYS$SETAST -#define sys$setef SYS$SETEF -#define sys$setimr SYS$SETIMR -#define sys$setpri SYS$SETPRI -#define sys$setprn SYS$SETPRN -#define sys$setprv SYS$SETPRV -#define sys$setswm SYS$SETSWM -#define sys$setuai SYS$SETUAI -#define sys$sndopr SYS$SNDOPR -#define sys$synch SYS$SYNCH -#define sys$trnlnm SYS$TRNLNM -#define sys$update SYS$UPDATE -#define sys$wake SYS$WAKE -#define sys$write SYS$WRITE -#define topLevelShellClassRec TOPLEVELSHELLCLASSREC -#define topLevelShellWidgetClass TOPLEVELSHELLWIDGETCLASS -#define transientShellWidgetClass TRANSIENTSHELLWIDGETCLASS -#define vendorShellClassRec VENDORSHELLCLASSREC -#define vendorShellWidgetClass VENDORSHELLWIDGETCLASS -#define widgetClass WIDGETCLASS -#define widgetClassRec WIDGETCLASSREC -#define wmShellClassRec WMSHELLCLASSREC -#define wmShellWidgetClass WMSHELLWIDGETCLASS -#define x$soft_ast_lib_lock X$SOFT_AST_LIB_LOCK -#define x$soft_ast_lock_depth X$SOFT_AST_LOCK_DEPTH -#define x$soft_reenable_asts X$SOFT_REENABLE_ASTS -#define xmArrowButtonWidgetClass XMARROWBUTTONWIDGETCLASS -#define xmBulletinBoardWidgetClass XMBULLETINBOARDWIDGETCLASS -#define xmCascadeButtonClassRec XMCASCADEBUTTONCLASSREC -#define xmCascadeButtonGadgetClass XMCASCADEBUTTONGADGETCLASS -#define xmCascadeButtonWidgetClass XMCASCADEBUTTONWIDGETCLASS -#define xmCommandWidgetClass XMCOMMANDWIDGETCLASS -#define xmDialogShellWidgetClass XMDIALOGSHELLWIDGETCLASS -#define xmDrawingAreaWidgetClass XMDRAWINGAREAWIDGETCLASS -#define xmDrawnButtonWidgetClass XMDRAWNBUTTONWIDGETCLASS -#define xmFileSelectionBoxWidgetClass XMFILESELECTIONBOXWIDGETCLASS -#define xmFormWidgetClass XMFORMWIDGETCLASS -#define xmFrameWidgetClass XMFRAMEWIDGETCLASS -#define xmGadgetClass XMGADGETCLASS -#define xmLabelGadgetClass XMLABELGADGETCLASS -#define xmLabelWidgetClass XMLABELWIDGETCLASS -#define xmListWidgetClass XMLISTWIDGETCLASS -#define xmMainWindowWidgetClass XMMAINWINDOWWIDGETCLASS -#define xmManagerClassRec XMMANAGERCLASSREC -#define xmManagerWidgetClass XMMANAGERWIDGETCLASS -#define xmMenuShellWidgetClass XMMENUSHELLWIDGETCLASS -#define xmMessageBoxWidgetClass XMMESSAGEBOXWIDGETCLASS -#define xmPrimitiveClassRec XMPRIMITIVECLASSREC -#define xmPrimitiveWidgetClass XMPRIMITIVEWIDGETCLASS -#define xmPushButtonClassRec XMPUSHBUTTONCLASSREC -#define xmPushButtonGadgetClass XMPUSHBUTTONGADGETCLASS -#define xmPushButtonWidgetClass XMPUSHBUTTONWIDGETCLASS -#define xmRowColumnWidgetClass XMROWCOLUMNWIDGETCLASS -#define xmSashWidgetClass XMSASHWIDGETCLASS -#define xmScaleWidgetClass XMSCALEWIDGETCLASS -#define xmScrollBarWidgetClass XMSCROLLBARWIDGETCLASS -#define xmScrolledWindowClassRec XMSCROLLEDWINDOWCLASSREC -#define xmScrolledWindowWidgetClass XMSCROLLEDWINDOWWIDGETCLASS -#define xmSeparatorGadgetClass XMSEPARATORGADGETCLASS -#define xmSeparatorWidgetClass XMSEPARATORWIDGETCLASS -#define xmTextFieldWidgetClass XMTEXTFIELDWIDGETCLASS -#define xmTextWidgetClass XMTEXTWIDGETCLASS -#define xmToggleButtonGadgetClass XMTOGGLEBUTTONGADGETCLASS -#define xmToggleButtonWidgetClass XMTOGGLEBUTTONWIDGETCLASS - -#if (__VMS_VER < 80200000) -# define SetReqLen(req,n,badlen) \ - if ((req->length + n) > (unsigned)65535) { \ - n = badlen; \ - req->length += n; \ - } else \ - req->length += n -#endif - -#ifdef __cplusplus -extern "C" { -#endif -extern void XtFree(char*); -#ifdef __cplusplus -} -#endif - -#endif diff --git a/dll/opengl/mesa/include/GL/wglext.h b/dll/opengl/mesa/include/GL/wglext.h deleted file mode 100644 index e60c6527d27..00000000000 --- a/dll/opengl/mesa/include/GL/wglext.h +++ /dev/null @@ -1,901 +0,0 @@ -#ifndef __wglext_h_ -#define __wglext_h_ - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2007-2010 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ - -/* Function declaration macros - to move into glplatform.h */ - -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) -#define WIN32_LEAN_AND_MEAN 1 -#include -#endif - -#ifndef APIENTRY -#define APIENTRY -#endif -#ifndef APIENTRYP -#define APIENTRYP APIENTRY * -#endif -#ifndef GLAPI -#define GLAPI extern -#endif - -/*************************************************************/ - -/* Header file version number */ -/* wglext.h last updated 2010/08/06 */ -/* Current version at http://www.opengl.org/registry/ */ -#define WGL_WGLEXT_VERSION 22 - -#ifndef WGL_ARB_buffer_region -#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001 -#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002 -#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004 -#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008 -#endif - -#ifndef WGL_ARB_multisample -#define WGL_SAMPLE_BUFFERS_ARB 0x2041 -#define WGL_SAMPLES_ARB 0x2042 -#endif - -#ifndef WGL_ARB_extensions_string -#endif - -#ifndef WGL_ARB_pixel_format -#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 -#define WGL_DRAW_TO_WINDOW_ARB 0x2001 -#define WGL_DRAW_TO_BITMAP_ARB 0x2002 -#define WGL_ACCELERATION_ARB 0x2003 -#define WGL_NEED_PALETTE_ARB 0x2004 -#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 -#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 -#define WGL_SWAP_METHOD_ARB 0x2007 -#define WGL_NUMBER_OVERLAYS_ARB 0x2008 -#define WGL_NUMBER_UNDERLAYS_ARB 0x2009 -#define WGL_TRANSPARENT_ARB 0x200A -#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 -#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 -#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 -#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A -#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B -#define WGL_SHARE_DEPTH_ARB 0x200C -#define WGL_SHARE_STENCIL_ARB 0x200D -#define WGL_SHARE_ACCUM_ARB 0x200E -#define WGL_SUPPORT_GDI_ARB 0x200F -#define WGL_SUPPORT_OPENGL_ARB 0x2010 -#define WGL_DOUBLE_BUFFER_ARB 0x2011 -#define WGL_STEREO_ARB 0x2012 -#define WGL_PIXEL_TYPE_ARB 0x2013 -#define WGL_COLOR_BITS_ARB 0x2014 -#define WGL_RED_BITS_ARB 0x2015 -#define WGL_RED_SHIFT_ARB 0x2016 -#define WGL_GREEN_BITS_ARB 0x2017 -#define WGL_GREEN_SHIFT_ARB 0x2018 -#define WGL_BLUE_BITS_ARB 0x2019 -#define WGL_BLUE_SHIFT_ARB 0x201A -#define WGL_ALPHA_BITS_ARB 0x201B -#define WGL_ALPHA_SHIFT_ARB 0x201C -#define WGL_ACCUM_BITS_ARB 0x201D -#define WGL_ACCUM_RED_BITS_ARB 0x201E -#define WGL_ACCUM_GREEN_BITS_ARB 0x201F -#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 -#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 -#define WGL_DEPTH_BITS_ARB 0x2022 -#define WGL_STENCIL_BITS_ARB 0x2023 -#define WGL_AUX_BUFFERS_ARB 0x2024 -#define WGL_NO_ACCELERATION_ARB 0x2025 -#define WGL_GENERIC_ACCELERATION_ARB 0x2026 -#define WGL_FULL_ACCELERATION_ARB 0x2027 -#define WGL_SWAP_EXCHANGE_ARB 0x2028 -#define WGL_SWAP_COPY_ARB 0x2029 -#define WGL_SWAP_UNDEFINED_ARB 0x202A -#define WGL_TYPE_RGBA_ARB 0x202B -#define WGL_TYPE_COLORINDEX_ARB 0x202C -#endif - -#ifndef WGL_ARB_make_current_read -#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043 -#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 -#endif - -#ifndef WGL_ARB_pbuffer -#define WGL_DRAW_TO_PBUFFER_ARB 0x202D -#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E -#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F -#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 -#define WGL_PBUFFER_LARGEST_ARB 0x2033 -#define WGL_PBUFFER_WIDTH_ARB 0x2034 -#define WGL_PBUFFER_HEIGHT_ARB 0x2035 -#define WGL_PBUFFER_LOST_ARB 0x2036 -#endif - -#ifndef WGL_ARB_render_texture -#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070 -#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071 -#define WGL_TEXTURE_FORMAT_ARB 0x2072 -#define WGL_TEXTURE_TARGET_ARB 0x2073 -#define WGL_MIPMAP_TEXTURE_ARB 0x2074 -#define WGL_TEXTURE_RGB_ARB 0x2075 -#define WGL_TEXTURE_RGBA_ARB 0x2076 -#define WGL_NO_TEXTURE_ARB 0x2077 -#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078 -#define WGL_TEXTURE_1D_ARB 0x2079 -#define WGL_TEXTURE_2D_ARB 0x207A -#define WGL_MIPMAP_LEVEL_ARB 0x207B -#define WGL_CUBE_MAP_FACE_ARB 0x207C -#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D -#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E -#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F -#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080 -#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081 -#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082 -#define WGL_FRONT_LEFT_ARB 0x2083 -#define WGL_FRONT_RIGHT_ARB 0x2084 -#define WGL_BACK_LEFT_ARB 0x2085 -#define WGL_BACK_RIGHT_ARB 0x2086 -#define WGL_AUX0_ARB 0x2087 -#define WGL_AUX1_ARB 0x2088 -#define WGL_AUX2_ARB 0x2089 -#define WGL_AUX3_ARB 0x208A -#define WGL_AUX4_ARB 0x208B -#define WGL_AUX5_ARB 0x208C -#define WGL_AUX6_ARB 0x208D -#define WGL_AUX7_ARB 0x208E -#define WGL_AUX8_ARB 0x208F -#define WGL_AUX9_ARB 0x2090 -#endif - -#ifndef WGL_ARB_pixel_format_float -#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0 -#endif - -#ifndef WGL_ARB_framebuffer_sRGB -#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9 -#endif - -#ifndef WGL_ARB_create_context -#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001 -#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002 -#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 -#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 -#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 -#define WGL_CONTEXT_FLAGS_ARB 0x2094 -#define ERROR_INVALID_VERSION_ARB 0x2095 -#endif - -#ifndef WGL_ARB_create_context_profile -#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126 -#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001 -#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002 -#define ERROR_INVALID_PROFILE_ARB 0x2096 -#endif - -#ifndef WGL_ARB_create_context_robustness -#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004 -#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252 -#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256 -#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261 -#endif - -#ifndef WGL_EXT_make_current_read -#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043 -#endif - -#ifndef WGL_EXT_pixel_format -#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000 -#define WGL_DRAW_TO_WINDOW_EXT 0x2001 -#define WGL_DRAW_TO_BITMAP_EXT 0x2002 -#define WGL_ACCELERATION_EXT 0x2003 -#define WGL_NEED_PALETTE_EXT 0x2004 -#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005 -#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006 -#define WGL_SWAP_METHOD_EXT 0x2007 -#define WGL_NUMBER_OVERLAYS_EXT 0x2008 -#define WGL_NUMBER_UNDERLAYS_EXT 0x2009 -#define WGL_TRANSPARENT_EXT 0x200A -#define WGL_TRANSPARENT_VALUE_EXT 0x200B -#define WGL_SHARE_DEPTH_EXT 0x200C -#define WGL_SHARE_STENCIL_EXT 0x200D -#define WGL_SHARE_ACCUM_EXT 0x200E -#define WGL_SUPPORT_GDI_EXT 0x200F -#define WGL_SUPPORT_OPENGL_EXT 0x2010 -#define WGL_DOUBLE_BUFFER_EXT 0x2011 -#define WGL_STEREO_EXT 0x2012 -#define WGL_PIXEL_TYPE_EXT 0x2013 -#define WGL_COLOR_BITS_EXT 0x2014 -#define WGL_RED_BITS_EXT 0x2015 -#define WGL_RED_SHIFT_EXT 0x2016 -#define WGL_GREEN_BITS_EXT 0x2017 -#define WGL_GREEN_SHIFT_EXT 0x2018 -#define WGL_BLUE_BITS_EXT 0x2019 -#define WGL_BLUE_SHIFT_EXT 0x201A -#define WGL_ALPHA_BITS_EXT 0x201B -#define WGL_ALPHA_SHIFT_EXT 0x201C -#define WGL_ACCUM_BITS_EXT 0x201D -#define WGL_ACCUM_RED_BITS_EXT 0x201E -#define WGL_ACCUM_GREEN_BITS_EXT 0x201F -#define WGL_ACCUM_BLUE_BITS_EXT 0x2020 -#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021 -#define WGL_DEPTH_BITS_EXT 0x2022 -#define WGL_STENCIL_BITS_EXT 0x2023 -#define WGL_AUX_BUFFERS_EXT 0x2024 -#define WGL_NO_ACCELERATION_EXT 0x2025 -#define WGL_GENERIC_ACCELERATION_EXT 0x2026 -#define WGL_FULL_ACCELERATION_EXT 0x2027 -#define WGL_SWAP_EXCHANGE_EXT 0x2028 -#define WGL_SWAP_COPY_EXT 0x2029 -#define WGL_SWAP_UNDEFINED_EXT 0x202A -#define WGL_TYPE_RGBA_EXT 0x202B -#define WGL_TYPE_COLORINDEX_EXT 0x202C -#endif - -#ifndef WGL_EXT_pbuffer -#define WGL_DRAW_TO_PBUFFER_EXT 0x202D -#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E -#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F -#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030 -#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031 -#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032 -#define WGL_PBUFFER_LARGEST_EXT 0x2033 -#define WGL_PBUFFER_WIDTH_EXT 0x2034 -#define WGL_PBUFFER_HEIGHT_EXT 0x2035 -#endif - -#ifndef WGL_EXT_depth_float -#define WGL_DEPTH_FLOAT_EXT 0x2040 -#endif - -#ifndef WGL_3DFX_multisample -#define WGL_SAMPLE_BUFFERS_3DFX 0x2060 -#define WGL_SAMPLES_3DFX 0x2061 -#endif - -#ifndef WGL_EXT_multisample -#define WGL_SAMPLE_BUFFERS_EXT 0x2041 -#define WGL_SAMPLES_EXT 0x2042 -#endif - -#ifndef WGL_I3D_digital_video_control -#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050 -#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051 -#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052 -#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053 -#endif - -#ifndef WGL_I3D_gamma -#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E -#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F -#endif - -#ifndef WGL_I3D_genlock -#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044 -#define WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D 0x2045 -#define WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D 0x2046 -#define WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D 0x2047 -#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048 -#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049 -#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A -#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B -#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C -#endif - -#ifndef WGL_I3D_image_buffer -#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001 -#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002 -#endif - -#ifndef WGL_I3D_swap_frame_lock -#endif - -#ifndef WGL_NV_render_depth_texture -#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4 -#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5 -#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6 -#define WGL_DEPTH_COMPONENT_NV 0x20A7 -#endif - -#ifndef WGL_NV_render_texture_rectangle -#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 -#define WGL_TEXTURE_RECTANGLE_NV 0x20A2 -#endif - -#ifndef WGL_ATI_pixel_format_float -#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0 -#endif - -#ifndef WGL_NV_float_buffer -#define WGL_FLOAT_COMPONENTS_NV 0x20B0 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4 -#define WGL_TEXTURE_FLOAT_R_NV 0x20B5 -#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6 -#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7 -#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 -#endif - -#ifndef WGL_3DL_stereo_control -#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055 -#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056 -#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057 -#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058 -#endif - -#ifndef WGL_EXT_pixel_format_packed_float -#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8 -#endif - -#ifndef WGL_EXT_framebuffer_sRGB -#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9 -#endif - -#ifndef WGL_NV_present_video -#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0 -#endif - -#ifndef WGL_NV_video_out -#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0 -#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1 -#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2 -#define WGL_VIDEO_OUT_COLOR_NV 0x20C3 -#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4 -#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5 -#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 -#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 -#define WGL_VIDEO_OUT_FRAME 0x20C8 -#define WGL_VIDEO_OUT_FIELD_1 0x20C9 -#define WGL_VIDEO_OUT_FIELD_2 0x20CA -#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB -#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC -#endif - -#ifndef WGL_NV_swap_group -#endif - -#ifndef WGL_NV_gpu_affinity -#define WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0 -#define WGL_ERROR_MISSING_AFFINITY_MASK_NV 0x20D1 -#endif - -#ifndef WGL_AMD_gpu_association -#define WGL_GPU_VENDOR_AMD 0x1F00 -#define WGL_GPU_RENDERER_STRING_AMD 0x1F01 -#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 -#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 -#define WGL_GPU_RAM_AMD 0x21A3 -#define WGL_GPU_CLOCK_AMD 0x21A4 -#define WGL_GPU_NUM_PIPES_AMD 0x21A5 -#define WGL_GPU_NUM_SIMD_AMD 0x21A6 -#define WGL_GPU_NUM_RB_AMD 0x21A7 -#define WGL_GPU_NUM_SPI_AMD 0x21A8 -#endif - -#ifndef WGL_NV_video_capture -#define WGL_UNIQUE_ID_NV 0x20CE -#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF -#endif - -#ifndef WGL_NV_copy_image -#endif - -#ifndef WGL_NV_multisample_coverage -#define WGL_COVERAGE_SAMPLES_NV 0x2042 -#define WGL_COLOR_SAMPLES_NV 0x20B9 -#endif - -#ifndef WGL_EXT_create_context_es2_profile -#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004 -#endif - - -/*************************************************************/ - -#ifndef WGL_ARB_pbuffer -DECLARE_HANDLE(HPBUFFERARB); -#endif -#ifndef WGL_EXT_pbuffer -DECLARE_HANDLE(HPBUFFEREXT); -#endif -#ifndef WGL_NV_present_video -DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV); -#endif -#ifndef WGL_NV_video_output -DECLARE_HANDLE(HPVIDEODEV); -#endif -#ifndef WGL_NV_gpu_affinity -DECLARE_HANDLE(HPGPUNV); -DECLARE_HANDLE(HGPUNV); - -typedef struct _GPU_DEVICE { - DWORD cb; - CHAR DeviceName[32]; - CHAR DeviceString[128]; - DWORD Flags; - RECT rcVirtualScreen; -} GPU_DEVICE, *PGPU_DEVICE; -#endif -#ifndef WGL_NV_video_capture -DECLARE_HANDLE(HVIDEOINPUTDEVICENV); -#endif - -#ifndef WGL_ARB_buffer_region -#define WGL_ARB_buffer_region 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern HANDLE WINAPI wglCreateBufferRegionARB (HDC hDC, int iLayerPlane, UINT uType); -extern VOID WINAPI wglDeleteBufferRegionARB (HANDLE hRegion); -extern BOOL WINAPI wglSaveBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height); -extern BOOL WINAPI wglRestoreBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType); -typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion); -typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height); -typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); -#endif - -#ifndef WGL_ARB_multisample -#define WGL_ARB_multisample 1 -#endif - -#ifndef WGL_ARB_extensions_string -#define WGL_ARB_extensions_string 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern const char * WINAPI wglGetExtensionsStringARB (HDC hdc); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc); -#endif - -#ifndef WGL_ARB_pixel_format -#define WGL_ARB_pixel_format 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); -extern BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); -extern BOOL WINAPI wglChoosePixelFormatARB (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); -typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); -typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); -#endif - -#ifndef WGL_ARB_make_current_read -#define WGL_ARB_make_current_read 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglMakeContextCurrentARB (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); -extern HDC WINAPI wglGetCurrentReadDCARB (void); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); -typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void); -#endif - -#ifndef WGL_ARB_pbuffer -#define WGL_ARB_pbuffer 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern HPBUFFERARB WINAPI wglCreatePbufferARB (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); -extern HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB hPbuffer); -extern int WINAPI wglReleasePbufferDCARB (HPBUFFERARB hPbuffer, HDC hDC); -extern BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB hPbuffer); -extern BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB hPbuffer, int iAttribute, int *piValue); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); -typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer); -typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC); -typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer); -typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue); -#endif - -#ifndef WGL_ARB_render_texture -#define WGL_ARB_render_texture 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglBindTexImageARB (HPBUFFERARB hPbuffer, int iBuffer); -extern BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB hPbuffer, int iBuffer); -extern BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB hPbuffer, const int *piAttribList); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); -typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); -typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList); -#endif - -#ifndef WGL_ARB_pixel_format_float -#define WGL_ARB_pixel_format_float 1 -#endif - -#ifndef WGL_ARB_framebuffer_sRGB -#define WGL_ARB_framebuffer_sRGB 1 -#endif - -#ifndef WGL_ARB_create_context -#define WGL_ARB_create_context 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern HGLRC WINAPI wglCreateContextAttribsARB (HDC hDC, HGLRC hShareContext, const int *attribList); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList); -#endif - -#ifndef WGL_ARB_create_context_profile -#define WGL_ARB_create_context_profile 1 -#endif - -#ifndef WGL_ARB_create_context_robustness -#define WGL_ARB_create_context_robustness 1 -#endif - -#ifndef WGL_EXT_display_color_table -#define WGL_EXT_display_color_table 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort id); -extern GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *table, GLuint length); -extern GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort id); -extern VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort id); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id); -typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length); -typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id); -typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id); -#endif - -#ifndef WGL_EXT_extensions_string -#define WGL_EXT_extensions_string 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern const char * WINAPI wglGetExtensionsStringEXT (void); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void); -#endif - -#ifndef WGL_EXT_make_current_read -#define WGL_EXT_make_current_read 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglMakeContextCurrentEXT (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); -extern HDC WINAPI wglGetCurrentReadDCEXT (void); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); -typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void); -#endif - -#ifndef WGL_EXT_pbuffer -#define WGL_EXT_pbuffer 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); -extern HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT hPbuffer); -extern int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT hPbuffer, HDC hDC); -extern BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT hPbuffer); -extern BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); -typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer); -typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC); -typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer); -typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue); -#endif - -#ifndef WGL_EXT_pixel_format -#define WGL_EXT_pixel_format 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues); -extern BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues); -extern BOOL WINAPI wglChoosePixelFormatEXT (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues); -typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues); -typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); -#endif - -#ifndef WGL_EXT_swap_control -#define WGL_EXT_swap_control 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglSwapIntervalEXT (int interval); -extern int WINAPI wglGetSwapIntervalEXT (void); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval); -typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void); -#endif - -#ifndef WGL_EXT_depth_float -#define WGL_EXT_depth_float 1 -#endif - -#ifndef WGL_NV_vertex_array_range -#define WGL_NV_vertex_array_range 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern void* WINAPI wglAllocateMemoryNV (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); -extern void WINAPI wglFreeMemoryNV (void *pointer); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef void* (WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); -typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer); -#endif - -#ifndef WGL_3DFX_multisample -#define WGL_3DFX_multisample 1 -#endif - -#ifndef WGL_EXT_multisample -#define WGL_EXT_multisample 1 -#endif - -#ifndef WGL_OML_sync_control -#define WGL_OML_sync_control 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetSyncValuesOML (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); -extern BOOL WINAPI wglGetMscRateOML (HDC hdc, INT32 *numerator, INT32 *denominator); -extern INT64 WINAPI wglSwapBuffersMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); -extern INT64 WINAPI wglSwapLayerBuffersMscOML (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); -extern BOOL WINAPI wglWaitForMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc); -extern BOOL WINAPI wglWaitForSbcOML (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); -typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator); -typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); -typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); -typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc); -typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc); -#endif - -#ifndef WGL_I3D_digital_video_control -#define WGL_I3D_digital_video_control 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC hDC, int iAttribute, int *piValue); -extern BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC hDC, int iAttribute, const int *piValue); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue); -typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue); -#endif - -#ifndef WGL_I3D_gamma -#define WGL_I3D_gamma 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetGammaTableParametersI3D (HDC hDC, int iAttribute, int *piValue); -extern BOOL WINAPI wglSetGammaTableParametersI3D (HDC hDC, int iAttribute, const int *piValue); -extern BOOL WINAPI wglGetGammaTableI3D (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue); -extern BOOL WINAPI wglSetGammaTableI3D (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue); -typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue); -typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue); -typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue); -#endif - -#ifndef WGL_I3D_genlock -#define WGL_I3D_genlock 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglEnableGenlockI3D (HDC hDC); -extern BOOL WINAPI wglDisableGenlockI3D (HDC hDC); -extern BOOL WINAPI wglIsEnabledGenlockI3D (HDC hDC, BOOL *pFlag); -extern BOOL WINAPI wglGenlockSourceI3D (HDC hDC, UINT uSource); -extern BOOL WINAPI wglGetGenlockSourceI3D (HDC hDC, UINT *uSource); -extern BOOL WINAPI wglGenlockSourceEdgeI3D (HDC hDC, UINT uEdge); -extern BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC hDC, UINT *uEdge); -extern BOOL WINAPI wglGenlockSampleRateI3D (HDC hDC, UINT uRate); -extern BOOL WINAPI wglGetGenlockSampleRateI3D (HDC hDC, UINT *uRate); -extern BOOL WINAPI wglGenlockSourceDelayI3D (HDC hDC, UINT uDelay); -extern BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC hDC, UINT *uDelay); -extern BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC); -typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC); -typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag); -typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource); -typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource); -typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge); -typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge); -typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate); -typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate); -typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay); -typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay); -typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay); -#endif - -#ifndef WGL_I3D_image_buffer -#define WGL_I3D_image_buffer 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern LPVOID WINAPI wglCreateImageBufferI3D (HDC hDC, DWORD dwSize, UINT uFlags); -extern BOOL WINAPI wglDestroyImageBufferI3D (HDC hDC, LPVOID pAddress); -extern BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count); -extern BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC hDC, const LPVOID *pAddress, UINT count); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags); -typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress); -typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count); -typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count); -#endif - -#ifndef WGL_I3D_swap_frame_lock -#define WGL_I3D_swap_frame_lock 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglEnableFrameLockI3D (void); -extern BOOL WINAPI wglDisableFrameLockI3D (void); -extern BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *pFlag); -extern BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *pFlag); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void); -typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void); -typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag); -typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag); -#endif - -#ifndef WGL_I3D_swap_frame_usage -#define WGL_I3D_swap_frame_usage 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetFrameUsageI3D (float *pUsage); -extern BOOL WINAPI wglBeginFrameTrackingI3D (void); -extern BOOL WINAPI wglEndFrameTrackingI3D (void); -extern BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage); -typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void); -typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void); -typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); -#endif - -#ifndef WGL_ATI_pixel_format_float -#define WGL_ATI_pixel_format_float 1 -#endif - -#ifndef WGL_NV_float_buffer -#define WGL_NV_float_buffer 1 -#endif - -#ifndef WGL_3DL_stereo_control -#define WGL_3DL_stereo_control 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglSetStereoEmitterState3DL (HDC hDC, UINT uState); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState); -#endif - -#ifndef WGL_EXT_pixel_format_packed_float -#define WGL_EXT_pixel_format_packed_float 1 -#endif - -#ifndef WGL_EXT_framebuffer_sRGB -#define WGL_EXT_framebuffer_sRGB 1 -#endif - -#ifndef WGL_NV_present_video -#define WGL_NV_present_video 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern int WINAPI wglEnumerateVideoDevicesNV (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList); -extern BOOL WINAPI wglBindVideoDeviceNV (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList); -extern BOOL WINAPI wglQueryCurrentContextNV (int iAttribute, int *piValue); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList); -typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList); -typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue); -#endif - -#ifndef WGL_NV_video_output -#define WGL_NV_video_output 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetVideoDeviceNV (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice); -extern BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV hVideoDevice); -extern BOOL WINAPI wglBindVideoImageNV (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer); -extern BOOL WINAPI wglReleaseVideoImageNV (HPBUFFERARB hPbuffer, int iVideoBuffer); -extern BOOL WINAPI wglSendPbufferToVideoNV (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock); -extern BOOL WINAPI wglGetVideoInfoNV (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice); -typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice); -typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer); -typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer); -typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock); -typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); -#endif - -#ifndef WGL_NV_swap_group -#define WGL_NV_swap_group 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglJoinSwapGroupNV (HDC hDC, GLuint group); -extern BOOL WINAPI wglBindSwapBarrierNV (GLuint group, GLuint barrier); -extern BOOL WINAPI wglQuerySwapGroupNV (HDC hDC, GLuint *group, GLuint *barrier); -extern BOOL WINAPI wglQueryMaxSwapGroupsNV (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers); -extern BOOL WINAPI wglQueryFrameCountNV (HDC hDC, GLuint *count); -extern BOOL WINAPI wglResetFrameCountNV (HDC hDC); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group); -typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier); -typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier); -typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers); -typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count); -typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC); -#endif - -#ifndef WGL_NV_gpu_affinity -#define WGL_NV_gpu_affinity 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglEnumGpusNV (UINT iGpuIndex, HGPUNV *phGpu); -extern BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice); -extern HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *phGpuList); -extern BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu); -extern BOOL WINAPI wglDeleteDCNV (HDC hdc); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu); -typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice); -typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList); -typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu); -typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc); -#endif - -#ifndef WGL_AMD_gpu_association -#define WGL_AMD_gpu_association 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern UINT WINAPI wglGetGPUIDsAMD (UINT maxCount, UINT *ids); -extern INT WINAPI wglGetGPUInfoAMD (UINT id, int property, GLenum dataType, UINT size, void *data); -extern UINT WINAPI wglGetContextGPUIDAMD (HGLRC hglrc); -extern HGLRC WINAPI wglCreateAssociatedContextAMD (UINT id); -extern HGLRC WINAPI wglCreateAssociatedContextAttribsAMD (UINT id, HGLRC hShareContext, const int *attribList); -extern BOOL WINAPI wglDeleteAssociatedContextAMD (HGLRC hglrc); -extern BOOL WINAPI wglMakeAssociatedContextCurrentAMD (HGLRC hglrc); -extern HGLRC WINAPI wglGetCurrentAssociatedContextAMD (void); -extern VOID WINAPI wglBlitContextFramebufferAMD (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT *ids); -typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, int property, GLenum dataType, UINT size, void *data); -typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc); -typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id); -typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int *attribList); -typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc); -typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc); -typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void); -typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif - -#ifndef WGL_NV_video_capture -#define WGL_NV_video_capture 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglBindVideoCaptureDeviceNV (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice); -extern UINT WINAPI wglEnumerateVideoCaptureDevicesNV (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList); -extern BOOL WINAPI wglLockVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice); -extern BOOL WINAPI wglQueryVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue); -extern BOOL WINAPI wglReleaseVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLBINDVIDEOCAPTUREDEVICENVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice); -typedef UINT (WINAPI * PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList); -typedef BOOL (WINAPI * PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice); -typedef BOOL (WINAPI * PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue); -typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice); -#endif - -#ifndef WGL_NV_copy_image -#define WGL_NV_copy_image 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglCopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); -#endif - -#ifndef WGL_NV_multisample_coverage -#define WGL_NV_multisample_coverage 1 -#endif - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/dll/opengl/mesa/include/GL/wmesa.h b/dll/opengl/mesa/include/GL/wmesa.h deleted file mode 100644 index f5f4f273ba9..00000000000 --- a/dll/opengl/mesa/include/GL/wmesa.h +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 3.0 - * Copyright (C) 1995-1998 Brian Paul - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ - - -/* - * Windows driver by: Mark E. Peterson (markp@ic.mankato.mn.us) - * Updated by Li Wei (liwei@aiar.xjtu.edu.cn) - * - * - *************************************************************** - * WMesa * - * version 2.3 * - * * - * By * - * Li Wei * - * Institute of Artificial Intelligence & Robotics * - * Xi'an Jiaotong University * - * Email: liwei@aiar.xjtu.edu.cn * - * Web page: http://sun.aiar.xjtu.edu.cn * - * * - * July 7th, 1997 * - *************************************************************** - */ - - -#ifndef WMESA_H -#define WMESA_H - - -#ifdef __cplusplus -extern "C" { -#endif - - -#include "GL/gl.h" - -#if defined(_MSV_VER) && !defined(__GNUC__) -# pragma warning (disable:4273) -# pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */ -# pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */ -# pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */ -# pragma warning( disable : 4013 ) /* 'function' undefined; assuming extern returning int */ -# pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */ -# pragma warning( disable : 4273 ) /* 'identifier' : inconsistent DLL linkage. dllexport assumed */ -# if (MESA_WARNQUIET>1) -# pragma warning( disable : 4146 ) /* unary minus operator applied to unsigned type, result still unsigned */ -# endif -#endif - -/* - * This is the WMesa context 'handle': - */ -typedef struct wmesa_context *WMesaContext; - - - -/* - * Create a new WMesaContext for rendering into a window. You must - * have already created the window of correct visual type and with an - * appropriate colormap. - * - * Input: - * hDC - Windows device or memory context - * Pal - Palette to use - * rgb_flag - GL_TRUE = RGB mode, - * GL_FALSE = color index mode - * db_flag - GL_TRUE = double-buffered, - * GL_FALSE = single buffered - * alpha_flag - GL_TRUE = create software alpha buffer, - * GL_FALSE = no software alpha buffer - * - * Note: Indexed mode requires double buffering under Windows. - * - * Return: a WMesa_context or NULL if error. - */ -extern WMesaContext WMesaCreateContext(HDC hDC,HPALETTE* pPal, - GLboolean rgb_flag, - GLboolean db_flag, - GLboolean alpha_flag); - - -/* - * Destroy a rendering context as returned by WMesaCreateContext() - */ -extern void WMesaDestroyContext( WMesaContext ctx ); - - - -/* - * Make the specified context the current one. - */ -extern void WMesaMakeCurrent( WMesaContext ctx, HDC hdc ); - - -/* - * Return a handle to the current context. - */ -extern WMesaContext WMesaGetCurrentContext( void ); - - -/* - * Swap the front and back buffers for the current context. No action - * taken if the context is not double buffered. - */ -extern void WMesaSwapBuffers(HDC hdc); - - -/* - * In indexed color mode we need to know when the palette changes. - */ -extern void WMesaPaletteChange(HPALETTE Pal); - -extern void WMesaMove(void); - -void WMesaShareLists(WMesaContext ctx_to_share, WMesaContext ctx); - -#ifdef __cplusplus -} -#endif - - -#endif - diff --git a/dll/opengl/mesa/include/GLES/egl.h b/dll/opengl/mesa/include/GLES/egl.h deleted file mode 100644 index 5778e00509c..00000000000 --- a/dll/opengl/mesa/include/GLES/egl.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Skeleton egl.h to provide compatibility for early GLES 1.0 - * applications. Several early implementations included gl.h - * in egl.h leading applications to include only egl.h - * - * $Revision: 6252 $ on $Date:: 2008-08-06 16:35:08 -0700 #$ - */ - -#ifndef __legacy_egl_h_ -#define __legacy_egl_h_ - -#include -#include - -#endif /* __legacy_egl_h_ */ diff --git a/dll/opengl/mesa/include/GLES/gl.h b/dll/opengl/mesa/include/GLES/gl.h deleted file mode 100644 index 5b8d85a9209..00000000000 --- a/dll/opengl/mesa/include/GLES/gl.h +++ /dev/null @@ -1,770 +0,0 @@ -#ifndef __gl_h_ -#define __gl_h_ - -/* $Revision: 10601 $ on $Date:: 2010-03-04 22:15:27 -0800 #$ */ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -typedef void GLvoid; -typedef char GLchar; -typedef unsigned int GLenum; -typedef unsigned char GLboolean; -typedef unsigned int GLbitfield; -typedef khronos_int8_t GLbyte; -typedef short GLshort; -typedef int GLint; -typedef int GLsizei; -typedef khronos_uint8_t GLubyte; -typedef unsigned short GLushort; -typedef unsigned int GLuint; -typedef khronos_float_t GLfloat; -typedef khronos_float_t GLclampf; -typedef khronos_int32_t GLfixed; -typedef khronos_int32_t GLclampx; - -typedef khronos_intptr_t GLintptr; -typedef khronos_ssize_t GLsizeiptr; - - -/*************************************************************/ - -/* OpenGL ES core versions */ -#define GL_VERSION_ES_CM_1_0 1 -#define GL_VERSION_ES_CL_1_0 1 -#define GL_VERSION_ES_CM_1_1 1 -#define GL_VERSION_ES_CL_1_1 1 - -/* ClearBufferMask */ -#define GL_DEPTH_BUFFER_BIT 0x00000100 -#define GL_STENCIL_BUFFER_BIT 0x00000400 -#define GL_COLOR_BUFFER_BIT 0x00004000 - -/* Boolean */ -#define GL_FALSE 0 -#define GL_TRUE 1 - -/* BeginMode */ -#define GL_POINTS 0x0000 -#define GL_LINES 0x0001 -#define GL_LINE_LOOP 0x0002 -#define GL_LINE_STRIP 0x0003 -#define GL_TRIANGLES 0x0004 -#define GL_TRIANGLE_STRIP 0x0005 -#define GL_TRIANGLE_FAN 0x0006 - -/* AlphaFunction */ -#define GL_NEVER 0x0200 -#define GL_LESS 0x0201 -#define GL_EQUAL 0x0202 -#define GL_LEQUAL 0x0203 -#define GL_GREATER 0x0204 -#define GL_NOTEQUAL 0x0205 -#define GL_GEQUAL 0x0206 -#define GL_ALWAYS 0x0207 - -/* BlendingFactorDest */ -#define GL_ZERO 0 -#define GL_ONE 1 -#define GL_SRC_COLOR 0x0300 -#define GL_ONE_MINUS_SRC_COLOR 0x0301 -#define GL_SRC_ALPHA 0x0302 -#define GL_ONE_MINUS_SRC_ALPHA 0x0303 -#define GL_DST_ALPHA 0x0304 -#define GL_ONE_MINUS_DST_ALPHA 0x0305 - -/* BlendingFactorSrc */ -/* GL_ZERO */ -/* GL_ONE */ -#define GL_DST_COLOR 0x0306 -#define GL_ONE_MINUS_DST_COLOR 0x0307 -#define GL_SRC_ALPHA_SATURATE 0x0308 -/* GL_SRC_ALPHA */ -/* GL_ONE_MINUS_SRC_ALPHA */ -/* GL_DST_ALPHA */ -/* GL_ONE_MINUS_DST_ALPHA */ - -/* ClipPlaneName */ -#define GL_CLIP_PLANE0 0x3000 -#define GL_CLIP_PLANE1 0x3001 -#define GL_CLIP_PLANE2 0x3002 -#define GL_CLIP_PLANE3 0x3003 -#define GL_CLIP_PLANE4 0x3004 -#define GL_CLIP_PLANE5 0x3005 - -/* ColorMaterialFace */ -/* GL_FRONT_AND_BACK */ - -/* ColorMaterialParameter */ -/* GL_AMBIENT_AND_DIFFUSE */ - -/* ColorPointerType */ -/* GL_UNSIGNED_BYTE */ -/* GL_FLOAT */ -/* GL_FIXED */ - -/* CullFaceMode */ -#define GL_FRONT 0x0404 -#define GL_BACK 0x0405 -#define GL_FRONT_AND_BACK 0x0408 - -/* DepthFunction */ -/* GL_NEVER */ -/* GL_LESS */ -/* GL_EQUAL */ -/* GL_LEQUAL */ -/* GL_GREATER */ -/* GL_NOTEQUAL */ -/* GL_GEQUAL */ -/* GL_ALWAYS */ - -/* EnableCap */ -#define GL_FOG 0x0B60 -#define GL_LIGHTING 0x0B50 -#define GL_TEXTURE_2D 0x0DE1 -#define GL_CULL_FACE 0x0B44 -#define GL_ALPHA_TEST 0x0BC0 -#define GL_BLEND 0x0BE2 -#define GL_COLOR_LOGIC_OP 0x0BF2 -#define GL_DITHER 0x0BD0 -#define GL_STENCIL_TEST 0x0B90 -#define GL_DEPTH_TEST 0x0B71 -/* GL_LIGHT0 */ -/* GL_LIGHT1 */ -/* GL_LIGHT2 */ -/* GL_LIGHT3 */ -/* GL_LIGHT4 */ -/* GL_LIGHT5 */ -/* GL_LIGHT6 */ -/* GL_LIGHT7 */ -#define GL_POINT_SMOOTH 0x0B10 -#define GL_LINE_SMOOTH 0x0B20 -#define GL_SCISSOR_TEST 0x0C11 -#define GL_COLOR_MATERIAL 0x0B57 -#define GL_NORMALIZE 0x0BA1 -#define GL_RESCALE_NORMAL 0x803A -#define GL_POLYGON_OFFSET_FILL 0x8037 -#define GL_VERTEX_ARRAY 0x8074 -#define GL_NORMAL_ARRAY 0x8075 -#define GL_COLOR_ARRAY 0x8076 -#define GL_TEXTURE_COORD_ARRAY 0x8078 -#define GL_MULTISAMPLE 0x809D -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE 0x809F -#define GL_SAMPLE_COVERAGE 0x80A0 - -/* ErrorCode */ -#define GL_NO_ERROR 0 -#define GL_INVALID_ENUM 0x0500 -#define GL_INVALID_VALUE 0x0501 -#define GL_INVALID_OPERATION 0x0502 -#define GL_STACK_OVERFLOW 0x0503 -#define GL_STACK_UNDERFLOW 0x0504 -#define GL_OUT_OF_MEMORY 0x0505 - -/* FogMode */ -/* GL_LINEAR */ -#define GL_EXP 0x0800 -#define GL_EXP2 0x0801 - -/* FogParameter */ -#define GL_FOG_DENSITY 0x0B62 -#define GL_FOG_START 0x0B63 -#define GL_FOG_END 0x0B64 -#define GL_FOG_MODE 0x0B65 -#define GL_FOG_COLOR 0x0B66 - -/* FrontFaceDirection */ -#define GL_CW 0x0900 -#define GL_CCW 0x0901 - -/* GetPName */ -#define GL_CURRENT_COLOR 0x0B00 -#define GL_CURRENT_NORMAL 0x0B02 -#define GL_CURRENT_TEXTURE_COORDS 0x0B03 -#define GL_POINT_SIZE 0x0B11 -#define GL_POINT_SIZE_MIN 0x8126 -#define GL_POINT_SIZE_MAX 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 -#define GL_POINT_DISTANCE_ATTENUATION 0x8129 -#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 -#define GL_LINE_WIDTH 0x0B21 -#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 -#define GL_ALIASED_POINT_SIZE_RANGE 0x846D -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#define GL_CULL_FACE_MODE 0x0B45 -#define GL_FRONT_FACE 0x0B46 -#define GL_SHADE_MODEL 0x0B54 -#define GL_DEPTH_RANGE 0x0B70 -#define GL_DEPTH_WRITEMASK 0x0B72 -#define GL_DEPTH_CLEAR_VALUE 0x0B73 -#define GL_DEPTH_FUNC 0x0B74 -#define GL_STENCIL_CLEAR_VALUE 0x0B91 -#define GL_STENCIL_FUNC 0x0B92 -#define GL_STENCIL_VALUE_MASK 0x0B93 -#define GL_STENCIL_FAIL 0x0B94 -#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 -#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 -#define GL_STENCIL_REF 0x0B97 -#define GL_STENCIL_WRITEMASK 0x0B98 -#define GL_MATRIX_MODE 0x0BA0 -#define GL_VIEWPORT 0x0BA2 -#define GL_MODELVIEW_STACK_DEPTH 0x0BA3 -#define GL_PROJECTION_STACK_DEPTH 0x0BA4 -#define GL_TEXTURE_STACK_DEPTH 0x0BA5 -#define GL_MODELVIEW_MATRIX 0x0BA6 -#define GL_PROJECTION_MATRIX 0x0BA7 -#define GL_TEXTURE_MATRIX 0x0BA8 -#define GL_ALPHA_TEST_FUNC 0x0BC1 -#define GL_ALPHA_TEST_REF 0x0BC2 -#define GL_BLEND_DST 0x0BE0 -#define GL_BLEND_SRC 0x0BE1 -#define GL_LOGIC_OP_MODE 0x0BF0 -#define GL_SCISSOR_BOX 0x0C10 -#define GL_SCISSOR_TEST 0x0C11 -#define GL_COLOR_CLEAR_VALUE 0x0C22 -#define GL_COLOR_WRITEMASK 0x0C23 -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_PACK_ALIGNMENT 0x0D05 -#define GL_MAX_LIGHTS 0x0D31 -#define GL_MAX_CLIP_PLANES 0x0D32 -#define GL_MAX_TEXTURE_SIZE 0x0D33 -#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36 -#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38 -#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39 -#define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_MAX_TEXTURE_UNITS 0x84E2 -#define GL_SUBPIXEL_BITS 0x0D50 -#define GL_RED_BITS 0x0D52 -#define GL_GREEN_BITS 0x0D53 -#define GL_BLUE_BITS 0x0D54 -#define GL_ALPHA_BITS 0x0D55 -#define GL_DEPTH_BITS 0x0D56 -#define GL_STENCIL_BITS 0x0D57 -#define GL_POLYGON_OFFSET_UNITS 0x2A00 -#define GL_POLYGON_OFFSET_FILL 0x8037 -#define GL_POLYGON_OFFSET_FACTOR 0x8038 -#define GL_TEXTURE_BINDING_2D 0x8069 -#define GL_VERTEX_ARRAY_SIZE 0x807A -#define GL_VERTEX_ARRAY_TYPE 0x807B -#define GL_VERTEX_ARRAY_STRIDE 0x807C -#define GL_NORMAL_ARRAY_TYPE 0x807E -#define GL_NORMAL_ARRAY_STRIDE 0x807F -#define GL_COLOR_ARRAY_SIZE 0x8081 -#define GL_COLOR_ARRAY_TYPE 0x8082 -#define GL_COLOR_ARRAY_STRIDE 0x8083 -#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088 -#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089 -#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A -#define GL_VERTEX_ARRAY_POINTER 0x808E -#define GL_NORMAL_ARRAY_POINTER 0x808F -#define GL_COLOR_ARRAY_POINTER 0x8090 -#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB - -/* GetTextureParameter */ -/* GL_TEXTURE_MAG_FILTER */ -/* GL_TEXTURE_MIN_FILTER */ -/* GL_TEXTURE_WRAP_S */ -/* GL_TEXTURE_WRAP_T */ - -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 - -/* HintMode */ -#define GL_DONT_CARE 0x1100 -#define GL_FASTEST 0x1101 -#define GL_NICEST 0x1102 - -/* HintTarget */ -#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 -#define GL_POINT_SMOOTH_HINT 0x0C51 -#define GL_LINE_SMOOTH_HINT 0x0C52 -#define GL_FOG_HINT 0x0C54 -#define GL_GENERATE_MIPMAP_HINT 0x8192 - -/* LightModelParameter */ -#define GL_LIGHT_MODEL_AMBIENT 0x0B53 -#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52 - -/* LightParameter */ -#define GL_AMBIENT 0x1200 -#define GL_DIFFUSE 0x1201 -#define GL_SPECULAR 0x1202 -#define GL_POSITION 0x1203 -#define GL_SPOT_DIRECTION 0x1204 -#define GL_SPOT_EXPONENT 0x1205 -#define GL_SPOT_CUTOFF 0x1206 -#define GL_CONSTANT_ATTENUATION 0x1207 -#define GL_LINEAR_ATTENUATION 0x1208 -#define GL_QUADRATIC_ATTENUATION 0x1209 - -/* DataType */ -#define GL_BYTE 0x1400 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_SHORT 0x1402 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_FLOAT 0x1406 -#define GL_FIXED 0x140C - -/* LogicOp */ -#define GL_CLEAR 0x1500 -#define GL_AND 0x1501 -#define GL_AND_REVERSE 0x1502 -#define GL_COPY 0x1503 -#define GL_AND_INVERTED 0x1504 -#define GL_NOOP 0x1505 -#define GL_XOR 0x1506 -#define GL_OR 0x1507 -#define GL_NOR 0x1508 -#define GL_EQUIV 0x1509 -#define GL_INVERT 0x150A -#define GL_OR_REVERSE 0x150B -#define GL_COPY_INVERTED 0x150C -#define GL_OR_INVERTED 0x150D -#define GL_NAND 0x150E -#define GL_SET 0x150F - -/* MaterialFace */ -/* GL_FRONT_AND_BACK */ - -/* MaterialParameter */ -#define GL_EMISSION 0x1600 -#define GL_SHININESS 0x1601 -#define GL_AMBIENT_AND_DIFFUSE 0x1602 -/* GL_AMBIENT */ -/* GL_DIFFUSE */ -/* GL_SPECULAR */ - -/* MatrixMode */ -#define GL_MODELVIEW 0x1700 -#define GL_PROJECTION 0x1701 -#define GL_TEXTURE 0x1702 - -/* NormalPointerType */ -/* GL_BYTE */ -/* GL_SHORT */ -/* GL_FLOAT */ -/* GL_FIXED */ - -/* PixelFormat */ -#define GL_ALPHA 0x1906 -#define GL_RGB 0x1907 -#define GL_RGBA 0x1908 -#define GL_LUMINANCE 0x1909 -#define GL_LUMINANCE_ALPHA 0x190A - -/* PixelStoreParameter */ -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_PACK_ALIGNMENT 0x0D05 - -/* PixelType */ -/* GL_UNSIGNED_BYTE */ -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 - -/* ShadingModel */ -#define GL_FLAT 0x1D00 -#define GL_SMOOTH 0x1D01 - -/* StencilFunction */ -/* GL_NEVER */ -/* GL_LESS */ -/* GL_EQUAL */ -/* GL_LEQUAL */ -/* GL_GREATER */ -/* GL_NOTEQUAL */ -/* GL_GEQUAL */ -/* GL_ALWAYS */ - -/* StencilOp */ -/* GL_ZERO */ -#define GL_KEEP 0x1E00 -#define GL_REPLACE 0x1E01 -#define GL_INCR 0x1E02 -#define GL_DECR 0x1E03 -/* GL_INVERT */ - -/* StringName */ -#define GL_VENDOR 0x1F00 -#define GL_RENDERER 0x1F01 -#define GL_VERSION 0x1F02 -#define GL_EXTENSIONS 0x1F03 - -/* TexCoordPointerType */ -/* GL_SHORT */ -/* GL_FLOAT */ -/* GL_FIXED */ -/* GL_BYTE */ - -/* TextureEnvMode */ -#define GL_MODULATE 0x2100 -#define GL_DECAL 0x2101 -/* GL_BLEND */ -#define GL_ADD 0x0104 -/* GL_REPLACE */ - -/* TextureEnvParameter */ -#define GL_TEXTURE_ENV_MODE 0x2200 -#define GL_TEXTURE_ENV_COLOR 0x2201 - -/* TextureEnvTarget */ -#define GL_TEXTURE_ENV 0x2300 - -/* TextureMagFilter */ -#define GL_NEAREST 0x2600 -#define GL_LINEAR 0x2601 - -/* TextureMinFilter */ -/* GL_NEAREST */ -/* GL_LINEAR */ -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_LINEAR_MIPMAP_NEAREST 0x2701 -#define GL_NEAREST_MIPMAP_LINEAR 0x2702 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 - -/* TextureParameterName */ -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 -#define GL_GENERATE_MIPMAP 0x8191 - -/* TextureTarget */ -/* GL_TEXTURE_2D */ - -/* TextureUnit */ -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 -#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 - -/* TextureWrapMode */ -#define GL_REPEAT 0x2901 -#define GL_CLAMP_TO_EDGE 0x812F - -/* VertexPointerType */ -/* GL_SHORT */ -/* GL_FLOAT */ -/* GL_FIXED */ -/* GL_BYTE */ - -/* LightName */ -#define GL_LIGHT0 0x4000 -#define GL_LIGHT1 0x4001 -#define GL_LIGHT2 0x4002 -#define GL_LIGHT3 0x4003 -#define GL_LIGHT4 0x4004 -#define GL_LIGHT5 0x4005 -#define GL_LIGHT6 0x4006 -#define GL_LIGHT7 0x4007 - -/* Buffer Objects */ -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 - -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 -#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 -#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 -#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 -#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A - -#define GL_STATIC_DRAW 0x88E4 -#define GL_DYNAMIC_DRAW 0x88E8 - -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_USAGE 0x8765 - -/* Texture combine + dot3 */ -#define GL_SUBTRACT 0x84E7 -#define GL_COMBINE 0x8570 -#define GL_COMBINE_RGB 0x8571 -#define GL_COMBINE_ALPHA 0x8572 -#define GL_RGB_SCALE 0x8573 -#define GL_ADD_SIGNED 0x8574 -#define GL_INTERPOLATE 0x8575 -#define GL_CONSTANT 0x8576 -#define GL_PRIMARY_COLOR 0x8577 -#define GL_PREVIOUS 0x8578 -#define GL_OPERAND0_RGB 0x8590 -#define GL_OPERAND1_RGB 0x8591 -#define GL_OPERAND2_RGB 0x8592 -#define GL_OPERAND0_ALPHA 0x8598 -#define GL_OPERAND1_ALPHA 0x8599 -#define GL_OPERAND2_ALPHA 0x859A - -#define GL_ALPHA_SCALE 0x0D1C - -#define GL_SRC0_RGB 0x8580 -#define GL_SRC1_RGB 0x8581 -#define GL_SRC2_RGB 0x8582 -#define GL_SRC0_ALPHA 0x8588 -#define GL_SRC1_ALPHA 0x8589 -#define GL_SRC2_ALPHA 0x858A - -#define GL_DOT3_RGB 0x86AE -#define GL_DOT3_RGBA 0x86AF - -/*------------------------------------------------------------------------* - * required OES extension tokens - *------------------------------------------------------------------------*/ - -/* OES_read_format */ -#ifndef GL_OES_read_format -#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B -#endif - -/* GL_OES_compressed_paletted_texture */ -#ifndef GL_OES_compressed_paletted_texture -#define GL_PALETTE4_RGB8_OES 0x8B90 -#define GL_PALETTE4_RGBA8_OES 0x8B91 -#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 -#define GL_PALETTE4_RGBA4_OES 0x8B93 -#define GL_PALETTE4_RGB5_A1_OES 0x8B94 -#define GL_PALETTE8_RGB8_OES 0x8B95 -#define GL_PALETTE8_RGBA8_OES 0x8B96 -#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 -#define GL_PALETTE8_RGBA4_OES 0x8B98 -#define GL_PALETTE8_RGB5_A1_OES 0x8B99 -#endif - -/* OES_point_size_array */ -#ifndef GL_OES_point_size_array -#define GL_POINT_SIZE_ARRAY_OES 0x8B9C -#define GL_POINT_SIZE_ARRAY_TYPE_OES 0x898A -#define GL_POINT_SIZE_ARRAY_STRIDE_OES 0x898B -#define GL_POINT_SIZE_ARRAY_POINTER_OES 0x898C -#define GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES 0x8B9F -#endif - -/* GL_OES_point_sprite */ -#ifndef GL_OES_point_sprite -#define GL_POINT_SPRITE_OES 0x8861 -#define GL_COORD_REPLACE_OES 0x8862 -#endif - -/*************************************************************/ - -/* Available only in Common profile */ -GL_API void GL_APIENTRY glAlphaFunc (GLenum func, GLclampf ref); -GL_API void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -GL_API void GL_APIENTRY glClearDepthf (GLclampf depth); -GL_API void GL_APIENTRY glClipPlanef (GLenum plane, const GLfloat *equation); -GL_API void GL_APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GL_API void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar); -GL_API void GL_APIENTRY glFogf (GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glFogfv (GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); -GL_API void GL_APIENTRY glGetClipPlanef (GLenum pname, GLfloat eqn[4]); -GL_API void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glGetTexEnvfv (GLenum env, GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glLightModelf (GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glLightModelfv (GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glLineWidth (GLfloat width); -GL_API void GL_APIENTRY glLoadMatrixf (const GLfloat *m); -GL_API void GL_APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glMultMatrixf (const GLfloat *m); -GL_API void GL_APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -GL_API void GL_APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz); -GL_API void GL_APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); -GL_API void GL_APIENTRY glPointParameterf (GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glPointSize (GLfloat size); -GL_API void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); -GL_API void GL_APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -GL_API void GL_APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z); -GL_API void GL_APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z); - -/* Available in both Common and Common-Lite profiles */ -GL_API void GL_APIENTRY glActiveTexture (GLenum texture); -GL_API void GL_APIENTRY glAlphaFuncx (GLenum func, GLclampx ref); -GL_API void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); -GL_API void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); -GL_API void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); -GL_API void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); -GL_API void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); -GL_API void GL_APIENTRY glClear (GLbitfield mask); -GL_API void GL_APIENTRY glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); -GL_API void GL_APIENTRY glClearDepthx (GLclampx depth); -GL_API void GL_APIENTRY glClearStencil (GLint s); -GL_API void GL_APIENTRY glClientActiveTexture (GLenum texture); -GL_API void GL_APIENTRY glClipPlanex (GLenum plane, const GLfixed *equation); -GL_API void GL_APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); -GL_API void GL_APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -GL_API void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -GL_API void GL_APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GL_API void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -GL_API void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -GL_API void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GL_API void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_API void GL_APIENTRY glCullFace (GLenum mode); -GL_API void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); -GL_API void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); -GL_API void GL_APIENTRY glDepthFunc (GLenum func); -GL_API void GL_APIENTRY glDepthMask (GLboolean flag); -GL_API void GL_APIENTRY glDepthRangex (GLclampx zNear, GLclampx zFar); -GL_API void GL_APIENTRY glDisable (GLenum cap); -GL_API void GL_APIENTRY glDisableClientState (GLenum array); -GL_API void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); -GL_API void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); -GL_API void GL_APIENTRY glEnable (GLenum cap); -GL_API void GL_APIENTRY glEnableClientState (GLenum array); -GL_API void GL_APIENTRY glFinish (void); -GL_API void GL_APIENTRY glFlush (void); -GL_API void GL_APIENTRY glFogx (GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glFogxv (GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glFrontFace (GLenum mode); -GL_API void GL_APIENTRY glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); -GL_API void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *params); -GL_API void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); -GL_API void GL_APIENTRY glGetClipPlanex (GLenum pname, GLfixed eqn[4]); -GL_API void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); -GL_API void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); -GL_API GLenum GL_APIENTRY glGetError (void); -GL_API void GL_APIENTRY glGetFixedv (GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *params); -GL_API void GL_APIENTRY glGetLightxv (GLenum light, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetPointerv (GLenum pname, GLvoid **params); -GL_API const GLubyte * GL_APIENTRY glGetString (GLenum name); -GL_API void GL_APIENTRY glGetTexEnviv (GLenum env, GLenum pname, GLint *params); -GL_API void GL_APIENTRY glGetTexEnvxv (GLenum env, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); -GL_API void GL_APIENTRY glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glHint (GLenum target, GLenum mode); -GL_API GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); -GL_API GLboolean GL_APIENTRY glIsEnabled (GLenum cap); -GL_API GLboolean GL_APIENTRY glIsTexture (GLuint texture); -GL_API void GL_APIENTRY glLightModelx (GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glLightModelxv (GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glLineWidthx (GLfixed width); -GL_API void GL_APIENTRY glLoadIdentity (void); -GL_API void GL_APIENTRY glLoadMatrixx (const GLfixed *m); -GL_API void GL_APIENTRY glLogicOp (GLenum opcode); -GL_API void GL_APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glMatrixMode (GLenum mode); -GL_API void GL_APIENTRY glMultMatrixx (const GLfixed *m); -GL_API void GL_APIENTRY glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); -GL_API void GL_APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz); -GL_API void GL_APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer); -GL_API void GL_APIENTRY glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); -GL_API void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); -GL_API void GL_APIENTRY glPointParameterx (GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glPointParameterxv (GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glPointSizex (GLfixed size); -GL_API void GL_APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units); -GL_API void GL_APIENTRY glPopMatrix (void); -GL_API void GL_APIENTRY glPushMatrix (void); -GL_API void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); -GL_API void GL_APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); -GL_API void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert); -GL_API void GL_APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert); -GL_API void GL_APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z); -GL_API void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); -GL_API void GL_APIENTRY glShadeModel (GLenum mode); -GL_API void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); -GL_API void GL_APIENTRY glStencilMask (GLuint mask); -GL_API void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); -GL_API void GL_APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GL_API void GL_APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param); -GL_API void GL_APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glTexEnviv (GLenum target, GLenum pname, const GLint *params); -GL_API void GL_APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GL_API void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); -GL_API void GL_APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); -GL_API void GL_APIENTRY glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -GL_API void GL_APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z); -GL_API void GL_APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GL_API void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); - -/*------------------------------------------------------------------------* - * Required OES extension functions - *------------------------------------------------------------------------*/ - -/* GL_OES_read_format */ -#ifndef GL_OES_read_format -#define GL_OES_read_format 1 -#endif - -/* GL_OES_compressed_paletted_texture */ -#ifndef GL_OES_compressed_paletted_texture -#define GL_OES_compressed_paletted_texture 1 -#endif - -/* GL_OES_point_size_array */ -#ifndef GL_OES_point_size_array -#define GL_OES_point_size_array 1 -GL_API void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -/* GL_OES_point_sprite */ -#ifndef GL_OES_point_sprite -#define GL_OES_point_sprite 1 -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __gl_h_ */ - diff --git a/dll/opengl/mesa/include/GLES/glext.h b/dll/opengl/mesa/include/GLES/glext.h deleted file mode 100644 index 130e4b063cf..00000000000 --- a/dll/opengl/mesa/include/GLES/glext.h +++ /dev/null @@ -1,1073 +0,0 @@ -#ifndef __glext_h_ -#define __glext_h_ - -/* $Revision: 13240 $ on $Date:: 2010-12-17 15:16:00 -0800 #$ */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -#ifndef GL_APIENTRYP -# define GL_APIENTRYP GL_APIENTRY* -#endif - -/*------------------------------------------------------------------------* - * OES extension tokens - *------------------------------------------------------------------------*/ - -/* GL_OES_blend_equation_separate */ -#ifndef GL_OES_blend_equation_separate -/* BLEND_EQUATION_RGB_OES same as BLEND_EQUATION_OES */ -#define GL_BLEND_EQUATION_RGB_OES 0x8009 -#define GL_BLEND_EQUATION_ALPHA_OES 0x883D -#endif - -/* GL_OES_blend_func_separate */ -#ifndef GL_OES_blend_func_separate -#define GL_BLEND_DST_RGB_OES 0x80C8 -#define GL_BLEND_SRC_RGB_OES 0x80C9 -#define GL_BLEND_DST_ALPHA_OES 0x80CA -#define GL_BLEND_SRC_ALPHA_OES 0x80CB -#endif - -/* GL_OES_blend_subtract */ -#ifndef GL_OES_blend_subtract -#define GL_BLEND_EQUATION_OES 0x8009 -#define GL_FUNC_ADD_OES 0x8006 -#define GL_FUNC_SUBTRACT_OES 0x800A -#define GL_FUNC_REVERSE_SUBTRACT_OES 0x800B -#endif - -/* GL_OES_compressed_ETC1_RGB8_texture */ -#ifndef GL_OES_compressed_ETC1_RGB8_texture -#define GL_ETC1_RGB8_OES 0x8D64 -#endif - -/* GL_OES_depth24 */ -#ifndef GL_OES_depth24 -#define GL_DEPTH_COMPONENT24_OES 0x81A6 -#endif - -/* GL_OES_depth32 */ -#ifndef GL_OES_depth32 -#define GL_DEPTH_COMPONENT32_OES 0x81A7 -#endif - -/* GL_OES_draw_texture */ -#ifndef GL_OES_draw_texture -#define GL_TEXTURE_CROP_RECT_OES 0x8B9D -#endif - -/* GL_OES_EGL_image */ -#ifndef GL_OES_EGL_image -typedef void* GLeglImageOES; -#endif - -/* GL_OES_EGL_image_external */ -#ifndef GL_OES_EGL_image_external -/* GLeglImageOES defined in GL_OES_EGL_image already. */ -#define GL_TEXTURE_EXTERNAL_OES 0x8D65 -#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 -#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 -#endif - -/* GL_OES_element_index_uint */ -#ifndef GL_OES_element_index_uint -#define GL_UNSIGNED_INT 0x1405 -#endif - -/* GL_OES_fixed_point */ -#ifndef GL_OES_fixed_point -#define GL_FIXED_OES 0x140C -#endif - -/* GL_OES_framebuffer_object */ -#ifndef GL_OES_framebuffer_object -#define GL_NONE_OES 0 -#define GL_FRAMEBUFFER_OES 0x8D40 -#define GL_RENDERBUFFER_OES 0x8D41 -#define GL_RGBA4_OES 0x8056 -#define GL_RGB5_A1_OES 0x8057 -#define GL_RGB565_OES 0x8D62 -#define GL_DEPTH_COMPONENT16_OES 0x81A5 -#define GL_RENDERBUFFER_WIDTH_OES 0x8D42 -#define GL_RENDERBUFFER_HEIGHT_OES 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT_OES 0x8D44 -#define GL_RENDERBUFFER_RED_SIZE_OES 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE_OES 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE_OES 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE_OES 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE_OES 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE_OES 0x8D55 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES 0x8CD3 -#define GL_COLOR_ATTACHMENT0_OES 0x8CE0 -#define GL_DEPTH_ATTACHMENT_OES 0x8D00 -#define GL_STENCIL_ATTACHMENT_OES 0x8D20 -#define GL_FRAMEBUFFER_COMPLETE_OES 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES 0x8CD9 -#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES 0x8CDA -#define GL_FRAMEBUFFER_UNSUPPORTED_OES 0x8CDD -#define GL_FRAMEBUFFER_BINDING_OES 0x8CA6 -#define GL_RENDERBUFFER_BINDING_OES 0x8CA7 -#define GL_MAX_RENDERBUFFER_SIZE_OES 0x84E8 -#define GL_INVALID_FRAMEBUFFER_OPERATION_OES 0x0506 -#endif - -/* GL_OES_mapbuffer */ -#ifndef GL_OES_mapbuffer -#define GL_WRITE_ONLY_OES 0x88B9 -#define GL_BUFFER_ACCESS_OES 0x88BB -#define GL_BUFFER_MAPPED_OES 0x88BC -#define GL_BUFFER_MAP_POINTER_OES 0x88BD -#endif - -/* GL_OES_matrix_get */ -#ifndef GL_OES_matrix_get -#define GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES 0x898D -#define GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES 0x898E -#define GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES 0x898F -#endif - -/* GL_OES_matrix_palette */ -#ifndef GL_OES_matrix_palette -#define GL_MAX_VERTEX_UNITS_OES 0x86A4 -#define GL_MAX_PALETTE_MATRICES_OES 0x8842 -#define GL_MATRIX_PALETTE_OES 0x8840 -#define GL_MATRIX_INDEX_ARRAY_OES 0x8844 -#define GL_WEIGHT_ARRAY_OES 0x86AD -#define GL_CURRENT_PALETTE_MATRIX_OES 0x8843 -#define GL_MATRIX_INDEX_ARRAY_SIZE_OES 0x8846 -#define GL_MATRIX_INDEX_ARRAY_TYPE_OES 0x8847 -#define GL_MATRIX_INDEX_ARRAY_STRIDE_OES 0x8848 -#define GL_MATRIX_INDEX_ARRAY_POINTER_OES 0x8849 -#define GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES 0x8B9E -#define GL_WEIGHT_ARRAY_SIZE_OES 0x86AB -#define GL_WEIGHT_ARRAY_TYPE_OES 0x86A9 -#define GL_WEIGHT_ARRAY_STRIDE_OES 0x86AA -#define GL_WEIGHT_ARRAY_POINTER_OES 0x86AC -#define GL_WEIGHT_ARRAY_BUFFER_BINDING_OES 0x889E -#endif - -/* GL_OES_packed_depth_stencil */ -#ifndef GL_OES_packed_depth_stencil -#define GL_DEPTH_STENCIL_OES 0x84F9 -#define GL_UNSIGNED_INT_24_8_OES 0x84FA -#define GL_DEPTH24_STENCIL8_OES 0x88F0 -#endif - -/* GL_OES_rgb8_rgba8 */ -#ifndef GL_OES_rgb8_rgba8 -#define GL_RGB8_OES 0x8051 -#define GL_RGBA8_OES 0x8058 -#endif - -/* GL_OES_stencil1 */ -#ifndef GL_OES_stencil1 -#define GL_STENCIL_INDEX1_OES 0x8D46 -#endif - -/* GL_OES_stencil4 */ -#ifndef GL_OES_stencil4 -#define GL_STENCIL_INDEX4_OES 0x8D47 -#endif - -/* GL_OES_stencil8 */ -#ifndef GL_OES_stencil8 -#define GL_STENCIL_INDEX8_OES 0x8D48 -#endif - -/* GL_OES_stencil_wrap */ -#ifndef GL_OES_stencil_wrap -#define GL_INCR_WRAP_OES 0x8507 -#define GL_DECR_WRAP_OES 0x8508 -#endif - -/* GL_OES_texture_cube_map */ -#ifndef GL_OES_texture_cube_map -#define GL_NORMAL_MAP_OES 0x8511 -#define GL_REFLECTION_MAP_OES 0x8512 -#define GL_TEXTURE_CUBE_MAP_OES 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP_OES 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES 0x851A -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES 0x851C -#define GL_TEXTURE_GEN_MODE_OES 0x2500 -#define GL_TEXTURE_GEN_STR_OES 0x8D60 -#endif - -/* GL_OES_texture_mirrored_repeat */ -#ifndef GL_OES_texture_mirrored_repeat -#define GL_MIRRORED_REPEAT_OES 0x8370 -#endif - -/* GL_OES_vertex_array_object */ -#ifndef GL_OES_vertex_array_object -#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5 -#endif - -/*------------------------------------------------------------------------* - * AMD extension tokens - *------------------------------------------------------------------------*/ - -/* GL_AMD_compressed_3DC_texture */ -#ifndef GL_AMD_compressed_3DC_texture -#define GL_3DC_X_AMD 0x87F9 -#define GL_3DC_XY_AMD 0x87FA -#endif - -/* GL_AMD_compressed_ATC_texture */ -#ifndef GL_AMD_compressed_ATC_texture -#define GL_ATC_RGB_AMD 0x8C92 -#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 -#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE -#endif - -/*------------------------------------------------------------------------* - * APPLE extension tokens - *------------------------------------------------------------------------*/ - -/* GL_APPLE_texture_2D_limited_npot */ -/* No new tokens introduced by this extension. */ - -/* GL_APPLE_framebuffer_multisample */ -#ifndef GL_APPLE_framebuffer_multisample -#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56 -#define GL_MAX_SAMPLES_APPLE 0x8D57 -#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6 -#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA -#endif - -/* GL_APPLE_texture_format_BGRA8888 */ -#ifndef GL_APPLE_texture_format_BGRA8888 -#define GL_BGRA_EXT 0x80E1 -#endif - -/* GL_APPLE_texture_max_level */ -#ifndef GL_APPLE_texture_max_level -#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D -#endif - -/*------------------------------------------------------------------------* - * ARM extension tokens - *------------------------------------------------------------------------*/ - -/* GL_ARM_rgba8 */ -/* No new tokens introduced by this extension. */ - -/*------------------------------------------------------------------------* - * EXT extension tokens - *------------------------------------------------------------------------*/ - -/* GL_EXT_blend_minmax */ -#ifndef GL_EXT_blend_minmax -#define GL_MIN_EXT 0x8007 -#define GL_MAX_EXT 0x8008 -#endif - -/* GL_EXT_discard_framebuffer */ -#ifndef GL_EXT_discard_framebuffer -#define GL_COLOR_EXT 0x1800 -#define GL_DEPTH_EXT 0x1801 -#define GL_STENCIL_EXT 0x1802 -#endif - -/* GL_EXT_multi_draw_arrays */ -/* No new tokens introduced by this extension. */ - -/* GL_EXT_read_format_bgra */ -#ifndef GL_EXT_read_format_bgra -#define GL_BGRA_EXT 0x80E1 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366 -#endif - -/* GL_EXT_texture_filter_anisotropic */ -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE -#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF -#endif - -/* GL_EXT_texture_format_BGRA8888 */ -#ifndef GL_EXT_texture_format_BGRA8888 -#define GL_BGRA_EXT 0x80E1 -#endif - -/* GL_EXT_texture_lod_bias */ -#ifndef GL_EXT_texture_lod_bias -#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD -#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 -#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 -#endif - -/*------------------------------------------------------------------------* - * IMG extension tokens - *------------------------------------------------------------------------*/ - -/* GL_IMG_read_format */ -#ifndef GL_IMG_read_format -#define GL_BGRA_IMG 0x80E1 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365 -#endif - -/* GL_IMG_texture_compression_pvrtc */ -#ifndef GL_IMG_texture_compression_pvrtc -#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 -#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 -#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 -#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 -#endif - -/* GL_IMG_texture_env_enhanced_fixed_function */ -#ifndef GL_IMG_texture_env_enhanced_fixed_function -#define GL_MODULATE_COLOR_IMG 0x8C04 -#define GL_RECIP_ADD_SIGNED_ALPHA_IMG 0x8C05 -#define GL_TEXTURE_ALPHA_MODULATE_IMG 0x8C06 -#define GL_FACTOR_ALPHA_MODULATE_IMG 0x8C07 -#define GL_FRAGMENT_ALPHA_MODULATE_IMG 0x8C08 -#define GL_ADD_BLEND_IMG 0x8C09 -#define GL_DOT3_RGBA_IMG 0x86AF -#endif - -/* GL_IMG_user_clip_plane */ -#ifndef GL_IMG_user_clip_plane -#define GL_CLIP_PLANE0_IMG 0x3000 -#define GL_CLIP_PLANE1_IMG 0x3001 -#define GL_CLIP_PLANE2_IMG 0x3002 -#define GL_CLIP_PLANE3_IMG 0x3003 -#define GL_CLIP_PLANE4_IMG 0x3004 -#define GL_CLIP_PLANE5_IMG 0x3005 -#define GL_MAX_CLIP_PLANES_IMG 0x0D32 -#endif - -/* GL_IMG_multisampled_render_to_texture */ -#ifndef GL_IMG_multisampled_render_to_texture -#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133 -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134 -#define GL_MAX_SAMPLES_IMG 0x9135 -#define GL_TEXTURE_SAMPLES_IMG 0x9136 -#endif - -/*------------------------------------------------------------------------* - * NV extension tokens - *------------------------------------------------------------------------*/ - -/* GL_NV_fence */ -#ifndef GL_NV_fence -#define GL_ALL_COMPLETED_NV 0x84F2 -#define GL_FENCE_STATUS_NV 0x84F3 -#define GL_FENCE_CONDITION_NV 0x84F4 -#endif - -/*------------------------------------------------------------------------* - * QCOM extension tokens - *------------------------------------------------------------------------*/ - -/* GL_QCOM_driver_control */ -/* No new tokens introduced by this extension. */ - -/* GL_QCOM_extended_get */ -#ifndef GL_QCOM_extended_get -#define GL_TEXTURE_WIDTH_QCOM 0x8BD2 -#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3 -#define GL_TEXTURE_DEPTH_QCOM 0x8BD4 -#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5 -#define GL_TEXTURE_FORMAT_QCOM 0x8BD6 -#define GL_TEXTURE_TYPE_QCOM 0x8BD7 -#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8 -#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9 -#define GL_TEXTURE_TARGET_QCOM 0x8BDA -#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB -#define GL_STATE_RESTORE 0x8BDC -#endif - -/* GL_QCOM_extended_get2 */ -/* No new tokens introduced by this extension. */ - -/* GL_QCOM_perfmon_global_mode */ -#ifndef GL_QCOM_perfmon_global_mode -#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 -#endif - -/* GL_QCOM_writeonly_rendering */ -#ifndef GL_QCOM_writeonly_rendering -#define GL_WRITEONLY_RENDERING_QCOM 0x8823 -#endif - -/* GL_QCOM_tiled_rendering */ -#ifndef GL_QCOM_tiled_rendering -#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001 -#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002 -#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004 -#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008 -#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010 -#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020 -#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040 -#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080 -#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100 -#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200 -#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400 -#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800 -#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000 -#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000 -#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000 -#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000 -#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000 -#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000 -#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000 -#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000 -#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000 -#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000 -#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000 -#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000 -#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000 -#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000 -#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000 -#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000 -#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000 -#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000 -#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000 -#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000 -#endif - -/*------------------------------------------------------------------------* - * End of extension tokens, start of corresponding extension functions - *------------------------------------------------------------------------*/ - -/*------------------------------------------------------------------------* - * OES extension functions - *------------------------------------------------------------------------*/ - -/* GL_OES_blend_equation_separate */ -#ifndef GL_OES_blend_equation_separate -#define GL_OES_blend_equation_separate 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glBlendEquationSeparateOES (GLenum modeRGB, GLenum modeAlpha); -#endif -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEOESPROC) (GLenum modeRGB, GLenum modeAlpha); -#endif - -/* GL_OES_blend_func_separate */ -#ifndef GL_OES_blend_func_separate -#define GL_OES_blend_func_separate 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glBlendFuncSeparateOES (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -#endif -typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEOESPROC) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -#endif - -/* GL_OES_blend_subtract */ -#ifndef GL_OES_blend_subtract -#define GL_OES_blend_subtract 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glBlendEquationOES (GLenum mode); -#endif -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONOESPROC) (GLenum mode); -#endif - -/* GL_OES_byte_coordinates */ -#ifndef GL_OES_byte_coordinates -#define GL_OES_byte_coordinates 1 -#endif - -/* GL_OES_compressed_ETC1_RGB8_texture */ -#ifndef GL_OES_compressed_ETC1_RGB8_texture -#define GL_OES_compressed_ETC1_RGB8_texture 1 -#endif - -/* GL_OES_depth24 */ -#ifndef GL_OES_depth24 -#define GL_OES_depth24 1 -#endif - -/* GL_OES_depth32 */ -#ifndef GL_OES_depth32 -#define GL_OES_depth32 1 -#endif - -/* GL_OES_draw_texture */ -#ifndef GL_OES_draw_texture -#define GL_OES_draw_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); -GL_API void GL_APIENTRY glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height); -GL_API void GL_APIENTRY glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); -GL_API void GL_APIENTRY glDrawTexsvOES (const GLshort *coords); -GL_API void GL_APIENTRY glDrawTexivOES (const GLint *coords); -GL_API void GL_APIENTRY glDrawTexxvOES (const GLfixed *coords); -GL_API void GL_APIENTRY glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); -GL_API void GL_APIENTRY glDrawTexfvOES (const GLfloat *coords); -#endif -typedef void (GL_APIENTRYP PFNGLDRAWTEXSOESPROC) (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); -typedef void (GL_APIENTRYP PFNGLDRAWTEXIOESPROC) (GLint x, GLint y, GLint z, GLint width, GLint height); -typedef void (GL_APIENTRYP PFNGLDRAWTEXXOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); -typedef void (GL_APIENTRYP PFNGLDRAWTEXSVOESPROC) (const GLshort *coords); -typedef void (GL_APIENTRYP PFNGLDRAWTEXIVOESPROC) (const GLint *coords); -typedef void (GL_APIENTRYP PFNGLDRAWTEXXVOESPROC) (const GLfixed *coords); -typedef void (GL_APIENTRYP PFNGLDRAWTEXFOESPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); -typedef void (GL_APIENTRYP PFNGLDRAWTEXFVOESPROC) (const GLfloat *coords); -#endif - -/* GL_OES_EGL_image */ -#ifndef GL_OES_EGL_image -#define GL_OES_EGL_image 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); -GL_API void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); -#endif -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); -#endif - -/* GL_OES_EGL_image_external */ -#ifndef GL_OES_EGL_image_external -#define GL_OES_EGL_image_external 1 -/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */ -#endif - -/* GL_OES_element_index_uint */ -#ifndef GL_OES_element_index_uint -#define GL_OES_element_index_uint 1 -#endif - -/* GL_OES_extended_matrix_palette */ -#ifndef GL_OES_extended_matrix_palette -#define GL_OES_extended_matrix_palette 1 -#endif - -/* GL_OES_fbo_render_mipmap */ -#ifndef GL_OES_fbo_render_mipmap -#define GL_OES_fbo_render_mipmap 1 -#endif - -/* GL_OES_fixed_point */ -#ifndef GL_OES_fixed_point -#define GL_OES_fixed_point 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glAlphaFuncxOES (GLenum func, GLclampx ref); -GL_API void GL_APIENTRY glClearColorxOES (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); -GL_API void GL_APIENTRY glClearDepthxOES (GLclampx depth); -GL_API void GL_APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation); -GL_API void GL_APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -GL_API void GL_APIENTRY glDepthRangexOES (GLclampx zNear, GLclampx zFar); -GL_API void GL_APIENTRY glFogxOES (GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glFogxvOES (GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glFrustumxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); -GL_API void GL_APIENTRY glGetClipPlanexOES (GLenum pname, GLfixed eqn[4]); -GL_API void GL_APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetLightxvOES (GLenum light, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetMaterialxvOES (GLenum face, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetTexEnvxvOES (GLenum env, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glLightModelxOES (GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glLineWidthxOES (GLfixed width); -GL_API void GL_APIENTRY glLoadMatrixxOES (const GLfixed *m); -GL_API void GL_APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glMultMatrixxOES (const GLfixed *m); -GL_API void GL_APIENTRY glMultiTexCoord4xOES (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); -GL_API void GL_APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz); -GL_API void GL_APIENTRY glOrthoxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); -GL_API void GL_APIENTRY glPointParameterxOES (GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glPointSizexOES (GLfixed size); -GL_API void GL_APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units); -GL_API void GL_APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); -GL_API void GL_APIENTRY glSampleCoveragexOES (GLclampx value, GLboolean invert); -GL_API void GL_APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z); -GL_API void GL_APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z); -#endif -typedef void (GL_APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLclampx ref); -typedef void (GL_APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); -typedef void (GL_APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLclampx depth); -typedef void (GL_APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation); -typedef void (GL_APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -typedef void (GL_APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLclampx zNear, GLclampx zFar); -typedef void (GL_APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); -typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum pname, GLfixed eqn[4]); -typedef void (GL_APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLGETLIGHTXVOESPROC) (GLenum light, GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLGETMATERIALXVOESPROC) (GLenum face, GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum env, GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width); -typedef void (GL_APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m); -typedef void (GL_APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m); -typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); -typedef void (GL_APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz); -typedef void (GL_APIENTRYP PFNGLORTHOXOESPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); -typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXOESPROC) (GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size); -typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units); -typedef void (GL_APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); -typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEXOESPROC) (GLclampx value, GLboolean invert); -typedef void (GL_APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); -typedef void (GL_APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); -#endif - -/* GL_OES_framebuffer_object */ -#ifndef GL_OES_framebuffer_object -#define GL_OES_framebuffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API GLboolean GL_APIENTRY glIsRenderbufferOES (GLuint renderbuffer); -GL_API void GL_APIENTRY glBindRenderbufferOES (GLenum target, GLuint renderbuffer); -GL_API void GL_APIENTRY glDeleteRenderbuffersOES (GLsizei n, const GLuint* renderbuffers); -GL_API void GL_APIENTRY glGenRenderbuffersOES (GLsizei n, GLuint* renderbuffers); -GL_API void GL_APIENTRY glRenderbufferStorageOES (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GL_API void GL_APIENTRY glGetRenderbufferParameterivOES (GLenum target, GLenum pname, GLint* params); -GL_API GLboolean GL_APIENTRY glIsFramebufferOES (GLuint framebuffer); -GL_API void GL_APIENTRY glBindFramebufferOES (GLenum target, GLuint framebuffer); -GL_API void GL_APIENTRY glDeleteFramebuffersOES (GLsizei n, const GLuint* framebuffers); -GL_API void GL_APIENTRY glGenFramebuffersOES (GLsizei n, GLuint* framebuffers); -GL_API GLenum GL_APIENTRY glCheckFramebufferStatusOES (GLenum target); -GL_API void GL_APIENTRY glFramebufferRenderbufferOES (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GL_API void GL_APIENTRY glFramebufferTexture2DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GL_API void GL_APIENTRY glGetFramebufferAttachmentParameterivOES (GLenum target, GLenum attachment, GLenum pname, GLint* params); -GL_API void GL_APIENTRY glGenerateMipmapOES (GLenum target); -#endif -typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFEROESPROC) (GLuint renderbuffer); -typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFEROESPROC) (GLenum target, GLuint renderbuffer); -typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSOESPROC) (GLsizei n, const GLuint* renderbuffers); -typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSOESPROC) (GLsizei n, GLuint* renderbuffers); -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVOESPROC) (GLenum target, GLenum pname, GLint* params); -typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFEROESPROC) (GLuint framebuffer); -typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFEROESPROC) (GLenum target, GLuint framebuffer); -typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSOESPROC) (GLsizei n, const GLuint* framebuffers); -typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSOESPROC) (GLsizei n, GLuint* framebuffers); -typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSOESPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEROESPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC) (GLenum target, GLenum attachment, GLenum pname, GLint* params); -typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPOESPROC) (GLenum target); -#endif - -/* GL_OES_mapbuffer */ -#ifndef GL_OES_mapbuffer -#define GL_OES_mapbuffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access); -GL_API GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target); -GL_API void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid ** params); -#endif -typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access); -typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid ** params); -#endif - -/* GL_OES_matrix_get */ -#ifndef GL_OES_matrix_get -#define GL_OES_matrix_get 1 -#endif - -/* GL_OES_matrix_palette */ -#ifndef GL_OES_matrix_palette -#define GL_OES_matrix_palette 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glCurrentPaletteMatrixOES (GLuint matrixpaletteindex); -GL_API void GL_APIENTRY glLoadPaletteFromModelViewMatrixOES (void); -GL_API void GL_APIENTRY glMatrixIndexPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GL_API void GL_APIENTRY glWeightPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif -typedef void (GL_APIENTRYP PFNGLCURRENTPALETTEMATRIXOESPROC) (GLuint matrixpaletteindex); -typedef void (GL_APIENTRYP PFNGLLOADPALETTEFROMMODELVIEWMATRIXOESPROC) (void); -typedef void (GL_APIENTRYP PFNGLMATRIXINDEXPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (GL_APIENTRYP PFNGLWEIGHTPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -/* GL_OES_packed_depth_stencil */ -#ifndef GL_OES_packed_depth_stencil -#define GL_OES_packed_depth_stencil 1 -#endif - -/* GL_OES_query_matrix */ -#ifndef GL_OES_query_matrix -#define GL_OES_query_matrix 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API GLbitfield GL_APIENTRY glQueryMatrixxOES (GLfixed mantissa[16], GLint exponent[16]); -#endif -typedef GLbitfield (GL_APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed mantissa[16], GLint exponent[16]); -#endif - -/* GL_OES_rgb8_rgba8 */ -#ifndef GL_OES_rgb8_rgba8 -#define GL_OES_rgb8_rgba8 1 -#endif - -/* GL_OES_single_precision */ -#ifndef GL_OES_single_precision -#define GL_OES_single_precision 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glDepthRangefOES (GLclampf zNear, GLclampf zFar); -GL_API void GL_APIENTRY glFrustumfOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); -GL_API void GL_APIENTRY glOrthofOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); -GL_API void GL_APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation); -GL_API void GL_APIENTRY glGetClipPlanefOES (GLenum pname, GLfloat eqn[4]); -GL_API void GL_APIENTRY glClearDepthfOES (GLclampf depth); -#endif -typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf zNear, GLclampf zFar); -typedef void (GL_APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); -typedef void (GL_APIENTRYP PFNGLORTHOFOESPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); -typedef void (GL_APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation); -typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum pname, GLfloat eqn[4]); -typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth); -#endif - -/* GL_OES_stencil1 */ -#ifndef GL_OES_stencil1 -#define GL_OES_stencil1 1 -#endif - -/* GL_OES_stencil4 */ -#ifndef GL_OES_stencil4 -#define GL_OES_stencil4 1 -#endif - -/* GL_OES_stencil8 */ -#ifndef GL_OES_stencil8 -#define GL_OES_stencil8 1 -#endif - -/* GL_OES_stencil_wrap */ -#ifndef GL_OES_stencil_wrap -#define GL_OES_stencil_wrap 1 -#endif - -/* GL_OES_texture_cube_map */ -#ifndef GL_OES_texture_cube_map -#define GL_OES_texture_cube_map 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glTexGenfOES (GLenum coord, GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glTexGenfvOES (GLenum coord, GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glTexGeniOES (GLenum coord, GLenum pname, GLint param); -GL_API void GL_APIENTRY glTexGenivOES (GLenum coord, GLenum pname, const GLint *params); -GL_API void GL_APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glGetTexGenfvOES (GLenum coord, GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glGetTexGenivOES (GLenum coord, GLenum pname, GLint *params); -GL_API void GL_APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params); -#endif -typedef void (GL_APIENTRYP PFNGLTEXGENFOESPROC) (GLenum coord, GLenum pname, GLfloat param); -typedef void (GL_APIENTRYP PFNGLTEXGENFVOESPROC) (GLenum coord, GLenum pname, const GLfloat *params); -typedef void (GL_APIENTRYP PFNGLTEXGENIOESPROC) (GLenum coord, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLTEXGENIVOESPROC) (GLenum coord, GLenum pname, const GLint *params); -typedef void (GL_APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLGETTEXGENFVOESPROC) (GLenum coord, GLenum pname, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETTEXGENIVOESPROC) (GLenum coord, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params); -#endif - -/* GL_OES_texture_env_crossbar */ -#ifndef GL_OES_texture_env_crossbar -#define GL_OES_texture_env_crossbar 1 -#endif - -/* GL_OES_texture_mirrored_repeat */ -#ifndef GL_OES_texture_mirrored_repeat -#define GL_OES_texture_mirrored_repeat 1 -#endif - -/* GL_OES_vertex_array_object */ -#ifndef GL_OES_vertex_array_object -#define GL_OES_vertex_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glBindVertexArrayOES (GLuint array); -GL_API void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays); -GL_API void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays); -GL_API GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array); -#endif -typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array); -typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays); -typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays); -typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array); -#endif - -/*------------------------------------------------------------------------* - * AMD extension functions - *------------------------------------------------------------------------*/ - -/* GL_AMD_compressed_3DC_texture */ -#ifndef GL_AMD_compressed_3DC_texture -#define GL_AMD_compressed_3DC_texture 1 -#endif - -/* GL_AMD_compressed_ATC_texture */ -#ifndef GL_AMD_compressed_ATC_texture -#define GL_AMD_compressed_ATC_texture 1 -#endif - -/*------------------------------------------------------------------------* - * APPLE extension functions - *------------------------------------------------------------------------*/ - -/* GL_APPLE_texture_2D_limited_npot */ -#ifndef GL_APPLE_texture_2D_limited_npot -#define GL_APPLE_texture_2D_limited_npot 1 -#endif - -/* GL_APPLE_framebuffer_multisample */ -#ifndef GL_APPLE_framebuffer_multisample -#define GL_APPLE_framebuffer_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum, GLsizei, GLenum, GLsizei, GLsizei); -GL_API void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void); -#endif - -/* GL_APPLE_texture_format_BGRA8888 */ -#ifndef GL_APPLE_texture_format_BGRA8888 -#define GL_APPLE_texture_format_BGRA8888 1 -#endif - -/* GL_APPLE_texture_max_level */ -#ifndef GL_APPLE_texture_max_level -#define GL_APPLE_texture_max_level 1 -#endif - -/*------------------------------------------------------------------------* - * ARM extension functions - *------------------------------------------------------------------------*/ - -/* GL_ARM_rgba8 */ -#ifndef GL_ARM_rgba8 -#define GL_ARM_rgba8 1 -#endif - -/*------------------------------------------------------------------------* - * EXT extension functions - *------------------------------------------------------------------------*/ - -/* GL_EXT_blend_minmax */ -#ifndef GL_EXT_blend_minmax -#define GL_EXT_blend_minmax 1 -#endif - -/* GL_EXT_discard_framebuffer */ -#ifndef GL_EXT_discard_framebuffer -#define GL_EXT_discard_framebuffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments); -#endif -typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); -#endif - -/* GL_EXT_multi_draw_arrays */ -#ifndef GL_EXT_multi_draw_arrays -#define GL_EXT_multi_draw_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei); -GL_API void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); -#endif - -/* GL_EXT_read_format_bgra */ -#ifndef GL_EXT_read_format_bgra -#define GL_EXT_read_format_bgra 1 -#endif - -/* GL_EXT_texture_filter_anisotropic */ -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_EXT_texture_filter_anisotropic 1 -#endif - -/* GL_EXT_texture_format_BGRA8888 */ -#ifndef GL_EXT_texture_format_BGRA8888 -#define GL_EXT_texture_format_BGRA8888 1 -#endif - -/* GL_EXT_texture_lod_bias */ -#ifndef GL_EXT_texture_lod_bias -#define GL_EXT_texture_lod_bias 1 -#endif - -/*------------------------------------------------------------------------* - * IMG extension functions - *------------------------------------------------------------------------*/ - -/* GL_IMG_read_format */ -#ifndef GL_IMG_read_format -#define GL_IMG_read_format 1 -#endif - -/* GL_IMG_texture_compression_pvrtc */ -#ifndef GL_IMG_texture_compression_pvrtc -#define GL_IMG_texture_compression_pvrtc 1 -#endif - -/* GL_IMG_texture_env_enhanced_fixed_function */ -#ifndef GL_IMG_texture_env_enhanced_fixed_function -#define GL_IMG_texture_env_enhanced_fixed_function 1 -#endif - -/* GL_IMG_user_clip_plane */ -#ifndef GL_IMG_user_clip_plane -#define GL_IMG_user_clip_plane 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glClipPlanefIMG (GLenum, const GLfloat *); -GL_API void GL_APIENTRY glClipPlanexIMG (GLenum, const GLfixed *); -#endif -typedef void (GL_APIENTRYP PFNGLCLIPPLANEFIMGPROC) (GLenum p, const GLfloat *eqn); -typedef void (GL_APIENTRYP PFNGLCLIPPLANEXIMGPROC) (GLenum p, const GLfixed *eqn); -#endif - -/* GL_IMG_multisampled_render_to_texture */ -#ifndef GL_IMG_multisampled_render_to_texture -#define GL_IMG_multisampled_render_to_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei); -GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei); -#endif -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); -#endif - -/*------------------------------------------------------------------------* - * NV extension functions - *------------------------------------------------------------------------*/ - -/* NV_fence */ -#ifndef GL_NV_fence -#define GL_NV_fence 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *); -GL_API void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *); -GL_API GLboolean GL_APIENTRY glIsFenceNV (GLuint); -GL_API GLboolean GL_APIENTRY glTestFenceNV (GLuint); -GL_API void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *); -GL_API void GL_APIENTRY glFinishFenceNV (GLuint); -GL_API void GL_APIENTRY glSetFenceNV (GLuint, GLenum); -#endif -typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); -typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); -typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); -typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); -typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); -typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); -#endif - -/*------------------------------------------------------------------------* - * QCOM extension functions - *------------------------------------------------------------------------*/ - -/* GL_QCOM_driver_control */ -#ifndef GL_QCOM_driver_control -#define GL_QCOM_driver_control 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls); -GL_API void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); -GL_API void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl); -GL_API void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl); -#endif -typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls); -typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); -typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); -typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); -#endif - -/* GL_QCOM_extended_get */ -#ifndef GL_QCOM_extended_get -#define GL_QCOM_extended_get 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures); -GL_API void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); -GL_API void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); -GL_API void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); -GL_API void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); -GL_API void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param); -GL_API void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); -GL_API void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params); -#endif -typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures); -typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); -typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params); -#endif - -/* GL_QCOM_extended_get2 */ -#ifndef GL_QCOM_extended_get2 -#define GL_QCOM_extended_get2 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders); -GL_API void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms); -GL_API GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program); -GL_API void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length); -#endif -typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders); -typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms); -typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length); -#endif - -/* GL_QCOM_perfmon_global_mode */ -#ifndef GL_QCOM_perfmon_global_mode -#define GL_QCOM_perfmon_global_mode 1 -#endif - -/* GL_QCOM_writeonly_rendering */ -#ifndef GL_QCOM_writeonly_rendering -#define GL_QCOM_writeonly_rendering 1 -#endif - -/* GL_QCOM_tiled_rendering */ -#ifndef GL_QCOM_tiled_rendering -#define GL_QCOM_tiled_rendering 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); -GL_API void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask); -#endif -typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); -typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __glext_h_ */ - diff --git a/dll/opengl/mesa/include/GLES/glplatform.h b/dll/opengl/mesa/include/GLES/glplatform.h deleted file mode 100644 index 2db6ee2ca68..00000000000 --- a/dll/opengl/mesa/include/GLES/glplatform.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __glplatform_h_ -#define __glplatform_h_ - -/* $Revision: 10601 $ on $Date:: 2010-03-04 22:15:27 -0800 #$ */ - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -/* Platform-specific types and definitions for OpenGL ES 1.X gl.h - * - * Adopters may modify khrplatform.h and this file to suit their platform. - * You are encouraged to submit all modifications to the Khronos group so that - * they can be included in future versions of this file. Please submit changes - * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) - * by filing a bug against product "OpenGL-ES" component "Registry". - */ - -#include - -#ifndef GL_API -#define GL_API KHRONOS_APICALL -#endif - -#ifndef GL_APIENTRY -#define GL_APIENTRY KHRONOS_APIENTRY -#endif - -#endif /* __glplatform_h_ */ diff --git a/dll/opengl/mesa/include/GLES2/gl2.h b/dll/opengl/mesa/include/GLES2/gl2.h deleted file mode 100644 index e1d3b87cc59..00000000000 --- a/dll/opengl/mesa/include/GLES2/gl2.h +++ /dev/null @@ -1,621 +0,0 @@ -#ifndef __gl2_h_ -#define __gl2_h_ - -/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -/*------------------------------------------------------------------------- - * Data type definitions - *-----------------------------------------------------------------------*/ - -typedef void GLvoid; -typedef char GLchar; -typedef unsigned int GLenum; -typedef unsigned char GLboolean; -typedef unsigned int GLbitfield; -typedef khronos_int8_t GLbyte; -typedef short GLshort; -typedef int GLint; -typedef int GLsizei; -typedef khronos_uint8_t GLubyte; -typedef unsigned short GLushort; -typedef unsigned int GLuint; -typedef khronos_float_t GLfloat; -typedef khronos_float_t GLclampf; -typedef khronos_int32_t GLfixed; - -/* GL types for handling large vertex buffer objects */ -typedef khronos_intptr_t GLintptr; -typedef khronos_ssize_t GLsizeiptr; - -/* OpenGL ES core versions */ -#define GL_ES_VERSION_2_0 1 - -/* ClearBufferMask */ -#define GL_DEPTH_BUFFER_BIT 0x00000100 -#define GL_STENCIL_BUFFER_BIT 0x00000400 -#define GL_COLOR_BUFFER_BIT 0x00004000 - -/* Boolean */ -#define GL_FALSE 0 -#define GL_TRUE 1 - -/* BeginMode */ -#define GL_POINTS 0x0000 -#define GL_LINES 0x0001 -#define GL_LINE_LOOP 0x0002 -#define GL_LINE_STRIP 0x0003 -#define GL_TRIANGLES 0x0004 -#define GL_TRIANGLE_STRIP 0x0005 -#define GL_TRIANGLE_FAN 0x0006 - -/* AlphaFunction (not supported in ES20) */ -/* GL_NEVER */ -/* GL_LESS */ -/* GL_EQUAL */ -/* GL_LEQUAL */ -/* GL_GREATER */ -/* GL_NOTEQUAL */ -/* GL_GEQUAL */ -/* GL_ALWAYS */ - -/* BlendingFactorDest */ -#define GL_ZERO 0 -#define GL_ONE 1 -#define GL_SRC_COLOR 0x0300 -#define GL_ONE_MINUS_SRC_COLOR 0x0301 -#define GL_SRC_ALPHA 0x0302 -#define GL_ONE_MINUS_SRC_ALPHA 0x0303 -#define GL_DST_ALPHA 0x0304 -#define GL_ONE_MINUS_DST_ALPHA 0x0305 - -/* BlendingFactorSrc */ -/* GL_ZERO */ -/* GL_ONE */ -#define GL_DST_COLOR 0x0306 -#define GL_ONE_MINUS_DST_COLOR 0x0307 -#define GL_SRC_ALPHA_SATURATE 0x0308 -/* GL_SRC_ALPHA */ -/* GL_ONE_MINUS_SRC_ALPHA */ -/* GL_DST_ALPHA */ -/* GL_ONE_MINUS_DST_ALPHA */ - -/* BlendEquationSeparate */ -#define GL_FUNC_ADD 0x8006 -#define GL_BLEND_EQUATION 0x8009 -#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */ -#define GL_BLEND_EQUATION_ALPHA 0x883D - -/* BlendSubtract */ -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B - -/* Separate Blend Functions */ -#define GL_BLEND_DST_RGB 0x80C8 -#define GL_BLEND_SRC_RGB 0x80C9 -#define GL_BLEND_DST_ALPHA 0x80CA -#define GL_BLEND_SRC_ALPHA 0x80CB -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_BLEND_COLOR 0x8005 - -/* Buffer Objects */ -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 - -#define GL_STREAM_DRAW 0x88E0 -#define GL_STATIC_DRAW 0x88E4 -#define GL_DYNAMIC_DRAW 0x88E8 - -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_USAGE 0x8765 - -#define GL_CURRENT_VERTEX_ATTRIB 0x8626 - -/* CullFaceMode */ -#define GL_FRONT 0x0404 -#define GL_BACK 0x0405 -#define GL_FRONT_AND_BACK 0x0408 - -/* DepthFunction */ -/* GL_NEVER */ -/* GL_LESS */ -/* GL_EQUAL */ -/* GL_LEQUAL */ -/* GL_GREATER */ -/* GL_NOTEQUAL */ -/* GL_GEQUAL */ -/* GL_ALWAYS */ - -/* EnableCap */ -#define GL_TEXTURE_2D 0x0DE1 -#define GL_CULL_FACE 0x0B44 -#define GL_BLEND 0x0BE2 -#define GL_DITHER 0x0BD0 -#define GL_STENCIL_TEST 0x0B90 -#define GL_DEPTH_TEST 0x0B71 -#define GL_SCISSOR_TEST 0x0C11 -#define GL_POLYGON_OFFSET_FILL 0x8037 -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_COVERAGE 0x80A0 - -/* ErrorCode */ -#define GL_NO_ERROR 0 -#define GL_INVALID_ENUM 0x0500 -#define GL_INVALID_VALUE 0x0501 -#define GL_INVALID_OPERATION 0x0502 -#define GL_OUT_OF_MEMORY 0x0505 - -/* FrontFaceDirection */ -#define GL_CW 0x0900 -#define GL_CCW 0x0901 - -/* GetPName */ -#define GL_LINE_WIDTH 0x0B21 -#define GL_ALIASED_POINT_SIZE_RANGE 0x846D -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#define GL_CULL_FACE_MODE 0x0B45 -#define GL_FRONT_FACE 0x0B46 -#define GL_DEPTH_RANGE 0x0B70 -#define GL_DEPTH_WRITEMASK 0x0B72 -#define GL_DEPTH_CLEAR_VALUE 0x0B73 -#define GL_DEPTH_FUNC 0x0B74 -#define GL_STENCIL_CLEAR_VALUE 0x0B91 -#define GL_STENCIL_FUNC 0x0B92 -#define GL_STENCIL_FAIL 0x0B94 -#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 -#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 -#define GL_STENCIL_REF 0x0B97 -#define GL_STENCIL_VALUE_MASK 0x0B93 -#define GL_STENCIL_WRITEMASK 0x0B98 -#define GL_STENCIL_BACK_FUNC 0x8800 -#define GL_STENCIL_BACK_FAIL 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 -#define GL_STENCIL_BACK_REF 0x8CA3 -#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 -#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -#define GL_VIEWPORT 0x0BA2 -#define GL_SCISSOR_BOX 0x0C10 -/* GL_SCISSOR_TEST */ -#define GL_COLOR_CLEAR_VALUE 0x0C22 -#define GL_COLOR_WRITEMASK 0x0C23 -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_PACK_ALIGNMENT 0x0D05 -#define GL_MAX_TEXTURE_SIZE 0x0D33 -#define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_SUBPIXEL_BITS 0x0D50 -#define GL_RED_BITS 0x0D52 -#define GL_GREEN_BITS 0x0D53 -#define GL_BLUE_BITS 0x0D54 -#define GL_ALPHA_BITS 0x0D55 -#define GL_DEPTH_BITS 0x0D56 -#define GL_STENCIL_BITS 0x0D57 -#define GL_POLYGON_OFFSET_UNITS 0x2A00 -/* GL_POLYGON_OFFSET_FILL */ -#define GL_POLYGON_OFFSET_FACTOR 0x8038 -#define GL_TEXTURE_BINDING_2D 0x8069 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB - -/* GetTextureParameter */ -/* GL_TEXTURE_MAG_FILTER */ -/* GL_TEXTURE_MIN_FILTER */ -/* GL_TEXTURE_WRAP_S */ -/* GL_TEXTURE_WRAP_T */ - -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 - -/* HintMode */ -#define GL_DONT_CARE 0x1100 -#define GL_FASTEST 0x1101 -#define GL_NICEST 0x1102 - -/* HintTarget */ -#define GL_GENERATE_MIPMAP_HINT 0x8192 - -/* DataType */ -#define GL_BYTE 0x1400 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_SHORT 0x1402 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_INT 0x1404 -#define GL_UNSIGNED_INT 0x1405 -#define GL_FLOAT 0x1406 -#define GL_FIXED 0x140C - -/* PixelFormat */ -#define GL_DEPTH_COMPONENT 0x1902 -#define GL_ALPHA 0x1906 -#define GL_RGB 0x1907 -#define GL_RGBA 0x1908 -#define GL_LUMINANCE 0x1909 -#define GL_LUMINANCE_ALPHA 0x190A - -/* PixelType */ -/* GL_UNSIGNED_BYTE */ -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 - -/* Shaders */ -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_MAX_VERTEX_ATTRIBS 0x8869 -#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB -#define GL_MAX_VARYING_VECTORS 0x8DFC -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C -#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 -#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD -#define GL_SHADER_TYPE 0x8B4F -#define GL_DELETE_STATUS 0x8B80 -#define GL_LINK_STATUS 0x8B82 -#define GL_VALIDATE_STATUS 0x8B83 -#define GL_ATTACHED_SHADERS 0x8B85 -#define GL_ACTIVE_UNIFORMS 0x8B86 -#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 -#define GL_ACTIVE_ATTRIBUTES 0x8B89 -#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A -#define GL_SHADING_LANGUAGE_VERSION 0x8B8C -#define GL_CURRENT_PROGRAM 0x8B8D - -/* StencilFunction */ -#define GL_NEVER 0x0200 -#define GL_LESS 0x0201 -#define GL_EQUAL 0x0202 -#define GL_LEQUAL 0x0203 -#define GL_GREATER 0x0204 -#define GL_NOTEQUAL 0x0205 -#define GL_GEQUAL 0x0206 -#define GL_ALWAYS 0x0207 - -/* StencilOp */ -/* GL_ZERO */ -#define GL_KEEP 0x1E00 -#define GL_REPLACE 0x1E01 -#define GL_INCR 0x1E02 -#define GL_DECR 0x1E03 -#define GL_INVERT 0x150A -#define GL_INCR_WRAP 0x8507 -#define GL_DECR_WRAP 0x8508 - -/* StringName */ -#define GL_VENDOR 0x1F00 -#define GL_RENDERER 0x1F01 -#define GL_VERSION 0x1F02 -#define GL_EXTENSIONS 0x1F03 - -/* TextureMagFilter */ -#define GL_NEAREST 0x2600 -#define GL_LINEAR 0x2601 - -/* TextureMinFilter */ -/* GL_NEAREST */ -/* GL_LINEAR */ -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_LINEAR_MIPMAP_NEAREST 0x2701 -#define GL_NEAREST_MIPMAP_LINEAR 0x2702 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 - -/* TextureParameterName */ -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 - -/* TextureTarget */ -/* GL_TEXTURE_2D */ -#define GL_TEXTURE 0x1702 - -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C - -/* TextureUnit */ -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 - -/* TextureWrapMode */ -#define GL_REPEAT 0x2901 -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_MIRRORED_REPEAT 0x8370 - -/* Uniform Types */ -#define GL_FLOAT_VEC2 0x8B50 -#define GL_FLOAT_VEC3 0x8B51 -#define GL_FLOAT_VEC4 0x8B52 -#define GL_INT_VEC2 0x8B53 -#define GL_INT_VEC3 0x8B54 -#define GL_INT_VEC4 0x8B55 -#define GL_BOOL 0x8B56 -#define GL_BOOL_VEC2 0x8B57 -#define GL_BOOL_VEC3 0x8B58 -#define GL_BOOL_VEC4 0x8B59 -#define GL_FLOAT_MAT2 0x8B5A -#define GL_FLOAT_MAT3 0x8B5B -#define GL_FLOAT_MAT4 0x8B5C -#define GL_SAMPLER_2D 0x8B5E -#define GL_SAMPLER_CUBE 0x8B60 - -/* Vertex Arrays */ -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A -#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F - -/* Read Format */ -#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B - -/* Shader Source */ -#define GL_COMPILE_STATUS 0x8B81 -#define GL_INFO_LOG_LENGTH 0x8B84 -#define GL_SHADER_SOURCE_LENGTH 0x8B88 -#define GL_SHADER_COMPILER 0x8DFA - -/* Shader Binary */ -#define GL_SHADER_BINARY_FORMATS 0x8DF8 -#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 - -/* Shader Precision-Specified Types */ -#define GL_LOW_FLOAT 0x8DF0 -#define GL_MEDIUM_FLOAT 0x8DF1 -#define GL_HIGH_FLOAT 0x8DF2 -#define GL_LOW_INT 0x8DF3 -#define GL_MEDIUM_INT 0x8DF4 -#define GL_HIGH_INT 0x8DF5 - -/* Framebuffer Object. */ -#define GL_FRAMEBUFFER 0x8D40 -#define GL_RENDERBUFFER 0x8D41 - -#define GL_RGBA4 0x8056 -#define GL_RGB5_A1 0x8057 -#define GL_RGB565 0x8D62 -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_STENCIL_INDEX 0x1901 -#define GL_STENCIL_INDEX8 0x8D48 - -#define GL_RENDERBUFFER_WIDTH 0x8D42 -#define GL_RENDERBUFFER_HEIGHT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 -#define GL_RENDERBUFFER_RED_SIZE 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 - -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 - -#define GL_COLOR_ATTACHMENT0 0x8CE0 -#define GL_DEPTH_ATTACHMENT 0x8D00 -#define GL_STENCIL_ATTACHMENT 0x8D20 - -#define GL_NONE 0 - -#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 -#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD - -#define GL_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_RENDERBUFFER_BINDING 0x8CA7 -#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 - -#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 - -/*------------------------------------------------------------------------- - * GL core functions. - *-----------------------------------------------------------------------*/ - -GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); -GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name); -GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); -GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); -GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); -GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode ); -GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); -GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); -GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage); -GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data); -GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); -GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); -GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth); -GL_APICALL void GL_APIENTRY glClearStencil (GLint s); -GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); -GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data); -GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); -GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); -GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); -GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers); -GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers); -GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); -GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers); -GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); -GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures); -GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); -GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); -GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar); -GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glDisable (GLenum cap); -GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); -GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices); -GL_APICALL void GL_APIENTRY glEnable (GLenum cap); -GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glFinish (void); -GL_APICALL void GL_APIENTRY glFlush (void); -GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); -GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers); -GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); -GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers); -GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers); -GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures); -GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); -GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); -GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders); -GL_APICALL int GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name); -GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params); -GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params); -GL_APICALL GLenum GL_APIENTRY glGetError (void); -GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params); -GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog); -GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog); -GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); -GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source); -GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name); -GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params); -GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params); -GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params); -GL_APICALL int GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name); -GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params); -GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer); -GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); -GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); -GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); -GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); -GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); -GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); -GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); -GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); -GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); -GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); -GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); -GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels); -GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); -GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert); -GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length); -GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* length); -GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); -GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); -GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass); -GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels); -GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); -GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params); -GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params); -GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels); -GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x); -GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v); -GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x); -GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v); -GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y); -GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v); -GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y); -GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v); -GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z); -GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v); -GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z); -GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v); -GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v); -GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w); -GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v); -GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); -GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); -GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x); -GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values); -GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y); -GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values); -GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z); -GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values); -GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values); -GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr); -GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); - -#ifdef __cplusplus -} -#endif - -#endif /* __gl2_h_ */ diff --git a/dll/opengl/mesa/include/GLES2/gl2ext.h b/dll/opengl/mesa/include/GLES2/gl2ext.h deleted file mode 100644 index 4eae246352b..00000000000 --- a/dll/opengl/mesa/include/GLES2/gl2ext.h +++ /dev/null @@ -1,1138 +0,0 @@ -#ifndef __gl2ext_h_ -#define __gl2ext_h_ - -/* $Revision: 15049 $ on $Date:: 2011-07-06 17:28:16 -0700 #$ */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -#ifndef GL_APIENTRYP -# define GL_APIENTRYP GL_APIENTRY* -#endif - -/*------------------------------------------------------------------------* - * OES extension tokens - *------------------------------------------------------------------------*/ - -/* GL_OES_compressed_ETC1_RGB8_texture */ -#ifndef GL_OES_compressed_ETC1_RGB8_texture -#define GL_ETC1_RGB8_OES 0x8D64 -#endif - -/* GL_OES_compressed_paletted_texture */ -#ifndef GL_OES_compressed_paletted_texture -#define GL_PALETTE4_RGB8_OES 0x8B90 -#define GL_PALETTE4_RGBA8_OES 0x8B91 -#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 -#define GL_PALETTE4_RGBA4_OES 0x8B93 -#define GL_PALETTE4_RGB5_A1_OES 0x8B94 -#define GL_PALETTE8_RGB8_OES 0x8B95 -#define GL_PALETTE8_RGBA8_OES 0x8B96 -#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 -#define GL_PALETTE8_RGBA4_OES 0x8B98 -#define GL_PALETTE8_RGB5_A1_OES 0x8B99 -#endif - -/* GL_OES_depth24 */ -#ifndef GL_OES_depth24 -#define GL_DEPTH_COMPONENT24_OES 0x81A6 -#endif - -/* GL_OES_depth32 */ -#ifndef GL_OES_depth32 -#define GL_DEPTH_COMPONENT32_OES 0x81A7 -#endif - -/* GL_OES_depth_texture */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_EGL_image */ -#ifndef GL_OES_EGL_image -typedef void* GLeglImageOES; -#endif - -/* GL_OES_EGL_image_external */ -#ifndef GL_OES_EGL_image_external -/* GLeglImageOES defined in GL_OES_EGL_image already. */ -#define GL_TEXTURE_EXTERNAL_OES 0x8D65 -#define GL_SAMPLER_EXTERNAL_OES 0x8D66 -#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 -#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 -#endif - -/* GL_OES_element_index_uint */ -#ifndef GL_OES_element_index_uint -#define GL_UNSIGNED_INT 0x1405 -#endif - -/* GL_OES_get_program_binary */ -#ifndef GL_OES_get_program_binary -#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 -#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE -#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF -#endif - -/* GL_OES_mapbuffer */ -#ifndef GL_OES_mapbuffer -#define GL_WRITE_ONLY_OES 0x88B9 -#define GL_BUFFER_ACCESS_OES 0x88BB -#define GL_BUFFER_MAPPED_OES 0x88BC -#define GL_BUFFER_MAP_POINTER_OES 0x88BD -#endif - -/* GL_OES_packed_depth_stencil */ -#ifndef GL_OES_packed_depth_stencil -#define GL_DEPTH_STENCIL_OES 0x84F9 -#define GL_UNSIGNED_INT_24_8_OES 0x84FA -#define GL_DEPTH24_STENCIL8_OES 0x88F0 -#endif - -/* GL_OES_rgb8_rgba8 */ -#ifndef GL_OES_rgb8_rgba8 -#define GL_RGB8_OES 0x8051 -#define GL_RGBA8_OES 0x8058 -#endif - -/* GL_OES_standard_derivatives */ -#ifndef GL_OES_standard_derivatives -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B -#endif - -/* GL_OES_stencil1 */ -#ifndef GL_OES_stencil1 -#define GL_STENCIL_INDEX1_OES 0x8D46 -#endif - -/* GL_OES_stencil4 */ -#ifndef GL_OES_stencil4 -#define GL_STENCIL_INDEX4_OES 0x8D47 -#endif - -/* GL_OES_texture_3D */ -#ifndef GL_OES_texture_3D -#define GL_TEXTURE_WRAP_R_OES 0x8072 -#define GL_TEXTURE_3D_OES 0x806F -#define GL_TEXTURE_BINDING_3D_OES 0x806A -#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073 -#define GL_SAMPLER_3D_OES 0x8B5F -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4 -#endif - -/* GL_OES_texture_float */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_texture_float_linear */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_texture_half_float */ -#ifndef GL_OES_texture_half_float -#define GL_HALF_FLOAT_OES 0x8D61 -#endif - -/* GL_OES_texture_half_float_linear */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_texture_npot */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_vertex_array_object */ -#ifndef GL_OES_vertex_array_object -#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5 -#endif - -/* GL_OES_vertex_half_float */ -/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */ - -/* GL_OES_vertex_type_10_10_10_2 */ -#ifndef GL_OES_vertex_type_10_10_10_2 -#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6 -#define GL_INT_10_10_10_2_OES 0x8DF7 -#endif - -/*------------------------------------------------------------------------* - * AMD extension tokens - *------------------------------------------------------------------------*/ - -/* GL_AMD_compressed_3DC_texture */ -#ifndef GL_AMD_compressed_3DC_texture -#define GL_3DC_X_AMD 0x87F9 -#define GL_3DC_XY_AMD 0x87FA -#endif - -/* GL_AMD_compressed_ATC_texture */ -#ifndef GL_AMD_compressed_ATC_texture -#define GL_ATC_RGB_AMD 0x8C92 -#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 -#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE -#endif - -/* GL_AMD_performance_monitor */ -#ifndef GL_AMD_performance_monitor -#define GL_COUNTER_TYPE_AMD 0x8BC0 -#define GL_COUNTER_RANGE_AMD 0x8BC1 -#define GL_UNSIGNED_INT64_AMD 0x8BC2 -#define GL_PERCENTAGE_AMD 0x8BC3 -#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 -#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 -#define GL_PERFMON_RESULT_AMD 0x8BC6 -#endif - -/* GL_AMD_program_binary_Z400 */ -#ifndef GL_AMD_program_binary_Z400 -#define GL_Z400_BINARY_AMD 0x8740 -#endif - -/*------------------------------------------------------------------------* - * ANGLE extension tokens - *------------------------------------------------------------------------*/ - -/* GL_ANGLE_framebuffer_blit */ -#ifndef GL_ANGLE_framebuffer_blit -#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6 -#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA -#endif - -/* GL_ANGLE_framebuffer_multisample */ -#ifndef GL_ANGLE_framebuffer_multisample -#define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56 -#define GL_MAX_SAMPLES_ANGLE 0x8D57 -#endif - -/*------------------------------------------------------------------------* - * APPLE extension tokens - *------------------------------------------------------------------------*/ - -/* GL_APPLE_rgb_422 */ -#ifndef GL_APPLE_rgb_422 -#define GL_RGB_422_APPLE 0x8A1F -#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB -#endif - -/* GL_APPLE_framebuffer_multisample */ -#ifndef GL_APPLE_framebuffer_multisample -#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56 -#define GL_MAX_SAMPLES_APPLE 0x8D57 -#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6 -#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA -#endif - -/* GL_APPLE_texture_format_BGRA8888 */ -#ifndef GL_APPLE_texture_format_BGRA8888 -#define GL_BGRA_EXT 0x80E1 -#endif - -/* GL_APPLE_texture_max_level */ -#ifndef GL_APPLE_texture_max_level -#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D -#endif - -/*------------------------------------------------------------------------* - * ARM extension tokens - *------------------------------------------------------------------------*/ - -/* GL_ARM_mali_shader_binary */ -#ifndef GL_ARM_mali_shader_binary -#define GL_MALI_SHADER_BINARY_ARM 0x8F60 -#endif - -/* GL_ARM_rgba8 */ -/* No new tokens introduced by this extension. */ - -/*------------------------------------------------------------------------* - * EXT extension tokens - *------------------------------------------------------------------------*/ - -/* GL_EXT_blend_minmax */ -#ifndef GL_EXT_blend_minmax -#define GL_MIN_EXT 0x8007 -#define GL_MAX_EXT 0x8008 -#endif - -/* GL_EXT_discard_framebuffer */ -#ifndef GL_EXT_discard_framebuffer -#define GL_COLOR_EXT 0x1800 -#define GL_DEPTH_EXT 0x1801 -#define GL_STENCIL_EXT 0x1802 -#endif - -/* GL_EXT_multi_draw_arrays */ -/* No new tokens introduced by this extension. */ - -/* GL_EXT_read_format_bgra */ -#ifndef GL_EXT_read_format_bgra -#define GL_BGRA_EXT 0x80E1 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366 -#endif - -/* GL_EXT_shader_texture_lod */ -/* No new tokens introduced by this extension. */ - -/* GL_EXT_texture_filter_anisotropic */ -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE -#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF -#endif - -/* GL_EXT_texture_format_BGRA8888 */ -#ifndef GL_EXT_texture_format_BGRA8888 -#define GL_BGRA_EXT 0x80E1 -#endif - -/* GL_EXT_texture_type_2_10_10_10_REV */ -#ifndef GL_EXT_texture_type_2_10_10_10_REV -#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368 -#endif - -/* GL_EXT_texture_compression_dxt1 */ -#ifndef GL_EXT_texture_compression_dxt1 -#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 -#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 -#endif - -/* GL_EXT_unpack_subimage */ -#ifndef GL_EXT_unpack_subimage -#define GL_UNPACK_ROW_LENGTH 0x0CF2 -#define GL_UNPACK_SKIP_ROWS 0x0CF3 -#define GL_UNPACK_SKIP_PIXELS 0x0CF4 -#endif - -/*------------------------------------------------------------------------* - * DMP extension tokens - *------------------------------------------------------------------------*/ - -/* GL_DMP_shader_binary */ -#ifndef GL_DMP_shader_binary -#define GL_SHADER_BINARY_DMP 0x9250 -#endif - -/*------------------------------------------------------------------------* - * IMG extension tokens - *------------------------------------------------------------------------*/ - -/* GL_IMG_program_binary */ -#ifndef GL_IMG_program_binary -#define GL_SGX_PROGRAM_BINARY_IMG 0x9130 -#endif - -/* GL_IMG_read_format */ -#ifndef GL_IMG_read_format -#define GL_BGRA_IMG 0x80E1 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365 -#endif - -/* GL_IMG_shader_binary */ -#ifndef GL_IMG_shader_binary -#define GL_SGX_BINARY_IMG 0x8C0A -#endif - -/* GL_IMG_texture_compression_pvrtc */ -#ifndef GL_IMG_texture_compression_pvrtc -#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 -#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 -#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 -#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 -#endif - -/* GL_IMG_multisampled_render_to_texture */ -#ifndef GL_IMG_multisampled_render_to_texture -#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133 -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134 -#define GL_MAX_SAMPLES_IMG 0x9135 -#define GL_TEXTURE_SAMPLES_IMG 0x9136 -#endif - -/*------------------------------------------------------------------------* - * NV extension tokens - *------------------------------------------------------------------------*/ - -/* GL_NV_coverage_sample */ -#ifndef GL_NV_coverage_sample -#define GL_COVERAGE_COMPONENT_NV 0x8ED0 -#define GL_COVERAGE_COMPONENT4_NV 0x8ED1 -#define GL_COVERAGE_ATTACHMENT_NV 0x8ED2 -#define GL_COVERAGE_BUFFERS_NV 0x8ED3 -#define GL_COVERAGE_SAMPLES_NV 0x8ED4 -#define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5 -#define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6 -#define GL_COVERAGE_AUTOMATIC_NV 0x8ED7 -#define GL_COVERAGE_BUFFER_BIT_NV 0x8000 -#endif - -/* GL_NV_depth_nonlinear */ -#ifndef GL_NV_depth_nonlinear -#define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C -#endif - -/* GL_NV_draw_buffers */ -#ifndef GL_NV_draw_buffers -#define GL_MAX_DRAW_BUFFERS_NV 0x8824 -#define GL_DRAW_BUFFER0_NV 0x8825 -#define GL_DRAW_BUFFER1_NV 0x8826 -#define GL_DRAW_BUFFER2_NV 0x8827 -#define GL_DRAW_BUFFER3_NV 0x8828 -#define GL_DRAW_BUFFER4_NV 0x8829 -#define GL_DRAW_BUFFER5_NV 0x882A -#define GL_DRAW_BUFFER6_NV 0x882B -#define GL_DRAW_BUFFER7_NV 0x882C -#define GL_DRAW_BUFFER8_NV 0x882D -#define GL_DRAW_BUFFER9_NV 0x882E -#define GL_DRAW_BUFFER10_NV 0x882F -#define GL_DRAW_BUFFER11_NV 0x8830 -#define GL_DRAW_BUFFER12_NV 0x8831 -#define GL_DRAW_BUFFER13_NV 0x8832 -#define GL_DRAW_BUFFER14_NV 0x8833 -#define GL_DRAW_BUFFER15_NV 0x8834 -#define GL_COLOR_ATTACHMENT0_NV 0x8CE0 -#define GL_COLOR_ATTACHMENT1_NV 0x8CE1 -#define GL_COLOR_ATTACHMENT2_NV 0x8CE2 -#define GL_COLOR_ATTACHMENT3_NV 0x8CE3 -#define GL_COLOR_ATTACHMENT4_NV 0x8CE4 -#define GL_COLOR_ATTACHMENT5_NV 0x8CE5 -#define GL_COLOR_ATTACHMENT6_NV 0x8CE6 -#define GL_COLOR_ATTACHMENT7_NV 0x8CE7 -#define GL_COLOR_ATTACHMENT8_NV 0x8CE8 -#define GL_COLOR_ATTACHMENT9_NV 0x8CE9 -#define GL_COLOR_ATTACHMENT10_NV 0x8CEA -#define GL_COLOR_ATTACHMENT11_NV 0x8CEB -#define GL_COLOR_ATTACHMENT12_NV 0x8CEC -#define GL_COLOR_ATTACHMENT13_NV 0x8CED -#define GL_COLOR_ATTACHMENT14_NV 0x8CEE -#define GL_COLOR_ATTACHMENT15_NV 0x8CEF -#endif - -/* GL_NV_fbo_color_attachments */ -#ifndef GL_NV_fbo_color_attachments -#define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF -/* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */ -#endif - -/* GL_NV_fence */ -#ifndef GL_NV_fence -#define GL_ALL_COMPLETED_NV 0x84F2 -#define GL_FENCE_STATUS_NV 0x84F3 -#define GL_FENCE_CONDITION_NV 0x84F4 -#endif - -/* GL_NV_read_buffer */ -#ifndef GL_NV_read_buffer -#define GL_READ_BUFFER_NV 0x0C02 -#endif - -/* GL_NV_read_buffer_front */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_read_depth */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_read_depth_stencil */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_read_stencil */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_texture_compression_s3tc_update */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_texture_npot_2D_mipmap */ -/* No new tokens introduced by this extension. */ - -/*------------------------------------------------------------------------* - * QCOM extension tokens - *------------------------------------------------------------------------*/ - -/* GL_QCOM_alpha_test */ -#ifndef GL_QCOM_alpha_test -#define GL_ALPHA_TEST_QCOM 0x0BC0 -#define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1 -#define GL_ALPHA_TEST_REF_QCOM 0x0BC2 -#endif - -/* GL_QCOM_driver_control */ -/* No new tokens introduced by this extension. */ - -/* GL_QCOM_extended_get */ -#ifndef GL_QCOM_extended_get -#define GL_TEXTURE_WIDTH_QCOM 0x8BD2 -#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3 -#define GL_TEXTURE_DEPTH_QCOM 0x8BD4 -#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5 -#define GL_TEXTURE_FORMAT_QCOM 0x8BD6 -#define GL_TEXTURE_TYPE_QCOM 0x8BD7 -#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8 -#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9 -#define GL_TEXTURE_TARGET_QCOM 0x8BDA -#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB -#define GL_STATE_RESTORE 0x8BDC -#endif - -/* GL_QCOM_extended_get2 */ -/* No new tokens introduced by this extension. */ - -/* GL_QCOM_perfmon_global_mode */ -#ifndef GL_QCOM_perfmon_global_mode -#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 -#endif - -/* GL_QCOM_writeonly_rendering */ -#ifndef GL_QCOM_writeonly_rendering -#define GL_WRITEONLY_RENDERING_QCOM 0x8823 -#endif - -/* GL_QCOM_tiled_rendering */ -#ifndef GL_QCOM_tiled_rendering -#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001 -#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002 -#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004 -#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008 -#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010 -#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020 -#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040 -#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080 -#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100 -#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200 -#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400 -#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800 -#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000 -#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000 -#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000 -#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000 -#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000 -#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000 -#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000 -#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000 -#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000 -#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000 -#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000 -#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000 -#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000 -#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000 -#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000 -#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000 -#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000 -#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000 -#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000 -#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000 -#endif - -/*------------------------------------------------------------------------* - * VIV extension tokens - *------------------------------------------------------------------------*/ - -/* GL_VIV_shader_binary */ -#ifndef GL_VIV_shader_binary -#define GL_SHADER_BINARY_VIV 0x8FC4 -#endif - -/*------------------------------------------------------------------------* - * End of extension tokens, start of corresponding extension functions - *------------------------------------------------------------------------*/ - -/*------------------------------------------------------------------------* - * OES extension functions - *------------------------------------------------------------------------*/ - -/* GL_OES_compressed_ETC1_RGB8_texture */ -#ifndef GL_OES_compressed_ETC1_RGB8_texture -#define GL_OES_compressed_ETC1_RGB8_texture 1 -#endif - -/* GL_OES_compressed_paletted_texture */ -#ifndef GL_OES_compressed_paletted_texture -#define GL_OES_compressed_paletted_texture 1 -#endif - -/* GL_OES_depth24 */ -#ifndef GL_OES_depth24 -#define GL_OES_depth24 1 -#endif - -/* GL_OES_depth32 */ -#ifndef GL_OES_depth32 -#define GL_OES_depth32 1 -#endif - -/* GL_OES_depth_texture */ -#ifndef GL_OES_depth_texture -#define GL_OES_depth_texture 1 -#endif - -/* GL_OES_EGL_image */ -#ifndef GL_OES_EGL_image -#define GL_OES_EGL_image 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); -GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); -#endif -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); -#endif - -/* GL_OES_EGL_image_external */ -#ifndef GL_OES_EGL_image_external -#define GL_OES_EGL_image_external 1 -/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */ -#endif - -/* GL_OES_element_index_uint */ -#ifndef GL_OES_element_index_uint -#define GL_OES_element_index_uint 1 -#endif - -/* GL_OES_fbo_render_mipmap */ -#ifndef GL_OES_fbo_render_mipmap -#define GL_OES_fbo_render_mipmap 1 -#endif - -/* GL_OES_fragment_precision_high */ -#ifndef GL_OES_fragment_precision_high -#define GL_OES_fragment_precision_high 1 -#endif - -/* GL_OES_get_program_binary */ -#ifndef GL_OES_get_program_binary -#define GL_OES_get_program_binary 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); -GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length); -#endif -typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); -typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length); -#endif - -/* GL_OES_mapbuffer */ -#ifndef GL_OES_mapbuffer -#define GL_OES_mapbuffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access); -GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target); -GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid** params); -#endif -typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access); -typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid** params); -#endif - -/* GL_OES_packed_depth_stencil */ -#ifndef GL_OES_packed_depth_stencil -#define GL_OES_packed_depth_stencil 1 -#endif - -/* GL_OES_rgb8_rgba8 */ -#ifndef GL_OES_rgb8_rgba8 -#define GL_OES_rgb8_rgba8 1 -#endif - -/* GL_OES_standard_derivatives */ -#ifndef GL_OES_standard_derivatives -#define GL_OES_standard_derivatives 1 -#endif - -/* GL_OES_stencil1 */ -#ifndef GL_OES_stencil1 -#define GL_OES_stencil1 1 -#endif - -/* GL_OES_stencil4 */ -#ifndef GL_OES_stencil4 -#define GL_OES_stencil4 1 -#endif - -/* GL_OES_texture_3D */ -#ifndef GL_OES_texture_3D -#define GL_OES_texture_3D 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels); -GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels); -GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data); -GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -#endif -typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels); -typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels); -typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -#endif - -/* GL_OES_texture_float */ -#ifndef GL_OES_texture_float -#define GL_OES_texture_float 1 -#endif - -/* GL_OES_texture_float_linear */ -#ifndef GL_OES_texture_float_linear -#define GL_OES_texture_float_linear 1 -#endif - -/* GL_OES_texture_half_float */ -#ifndef GL_OES_texture_half_float -#define GL_OES_texture_half_float 1 -#endif - -/* GL_OES_texture_half_float_linear */ -#ifndef GL_OES_texture_half_float_linear -#define GL_OES_texture_half_float_linear 1 -#endif - -/* GL_OES_texture_npot */ -#ifndef GL_OES_texture_npot -#define GL_OES_texture_npot 1 -#endif - -/* GL_OES_vertex_array_object */ -#ifndef GL_OES_vertex_array_object -#define GL_OES_vertex_array_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array); -GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays); -GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays); -GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array); -#endif -typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array); -typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays); -typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays); -typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array); -#endif - -/* GL_OES_vertex_half_float */ -#ifndef GL_OES_vertex_half_float -#define GL_OES_vertex_half_float 1 -#endif - -/* GL_OES_vertex_type_10_10_10_2 */ -#ifndef GL_OES_vertex_type_10_10_10_2 -#define GL_OES_vertex_type_10_10_10_2 1 -#endif - -/*------------------------------------------------------------------------* - * AMD extension functions - *------------------------------------------------------------------------*/ - -/* GL_AMD_compressed_3DC_texture */ -#ifndef GL_AMD_compressed_3DC_texture -#define GL_AMD_compressed_3DC_texture 1 -#endif - -/* GL_AMD_compressed_ATC_texture */ -#ifndef GL_AMD_compressed_ATC_texture -#define GL_AMD_compressed_ATC_texture 1 -#endif - -/* AMD_performance_monitor */ -#ifndef GL_AMD_performance_monitor -#define GL_AMD_performance_monitor 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data); -GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); -GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); -GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList); -GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor); -GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); -#endif -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data); -typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList); -typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); -typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); -#endif - -/* GL_AMD_program_binary_Z400 */ -#ifndef GL_AMD_program_binary_Z400 -#define GL_AMD_program_binary_Z400 1 -#endif - -/*------------------------------------------------------------------------* - * ANGLE extension functions - *------------------------------------------------------------------------*/ - -/* GL_ANGLE_framebuffer_blit */ -#ifndef GL_ANGLE_framebuffer_blit -#define GL_ANGLE_framebuffer_blit 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif -typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif - -/* GL_ANGLE_framebuffer_multisample */ -#ifndef GL_ANGLE_framebuffer_multisample -#define GL_ANGLE_framebuffer_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#endif -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#endif - -/*------------------------------------------------------------------------* - * APPLE extension functions - *------------------------------------------------------------------------*/ - -/* GL_APPLE_rgb_422 */ -#ifndef GL_APPLE_rgb_422 -#define GL_APPLE_rgb_422 1 -#endif - -/* GL_APPLE_framebuffer_multisample */ -#ifndef GL_APPLE_framebuffer_multisample -#define GL_APPLE_framebuffer_multisample 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum, GLsizei, GLenum, GLsizei, GLsizei); -GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void); -#endif - -/* GL_APPLE_texture_format_BGRA8888 */ -#ifndef GL_APPLE_texture_format_BGRA8888 -#define GL_APPLE_texture_format_BGRA8888 1 -#endif - -/* GL_APPLE_texture_max_level */ -#ifndef GL_APPLE_texture_max_level -#define GL_APPLE_texture_max_level 1 -#endif - -/*------------------------------------------------------------------------* - * ARM extension functions - *------------------------------------------------------------------------*/ - -/* GL_ARM_mali_shader_binary */ -#ifndef GL_ARM_mali_shader_binary -#define GL_ARM_mali_shader_binary 1 -#endif - -/* GL_ARM_rgba8 */ -#ifndef GL_ARM_rgba8 -#define GL_ARM_rgba8 1 -#endif - -/*------------------------------------------------------------------------* - * EXT extension functions - *------------------------------------------------------------------------*/ - -/* GL_EXT_blend_minmax */ -#ifndef GL_EXT_blend_minmax -#define GL_EXT_blend_minmax 1 -#endif - -/* GL_EXT_discard_framebuffer */ -#ifndef GL_EXT_discard_framebuffer -#define GL_EXT_discard_framebuffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments); -#endif -typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); -#endif - -#ifndef GL_EXT_multi_draw_arrays -#define GL_EXT_multi_draw_arrays 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei); -GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); -#endif - -/* GL_EXT_read_format_bgra */ -#ifndef GL_EXT_read_format_bgra -#define GL_EXT_read_format_bgra 1 -#endif - -/* GL_EXT_shader_texture_lod */ -#ifndef GL_EXT_shader_texture_lod -#define GL_EXT_shader_texture_lod 1 -#endif - -/* GL_EXT_texture_filter_anisotropic */ -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_EXT_texture_filter_anisotropic 1 -#endif - -/* GL_EXT_texture_format_BGRA8888 */ -#ifndef GL_EXT_texture_format_BGRA8888 -#define GL_EXT_texture_format_BGRA8888 1 -#endif - -/* GL_EXT_texture_type_2_10_10_10_REV */ -#ifndef GL_EXT_texture_type_2_10_10_10_REV -#define GL_EXT_texture_type_2_10_10_10_REV 1 -#endif - -/* GL_EXT_texture_compression_dxt1 */ -#ifndef GL_EXT_texture_compression_dxt1 -#define GL_EXT_texture_compression_dxt1 1 -#endif - -/* GL_EXT_unpack_subimage */ -#ifndef GL_EXT_unpack_subimage -#define GL_EXT_unpack_subimage 1 -#endif - -/*------------------------------------------------------------------------* - * DMP extension functions - *------------------------------------------------------------------------*/ - -/* GL_DMP_shader_binary */ -#ifndef GL_DMP_shader_binary -#define GL_DMP_shader_binary 1 -#endif - -/*------------------------------------------------------------------------* - * IMG extension functions - *------------------------------------------------------------------------*/ - -/* GL_IMG_program_binary */ -#ifndef GL_IMG_program_binary -#define GL_IMG_program_binary 1 -#endif - -/* GL_IMG_read_format */ -#ifndef GL_IMG_read_format -#define GL_IMG_read_format 1 -#endif - -/* GL_IMG_shader_binary */ -#ifndef GL_IMG_shader_binary -#define GL_IMG_shader_binary 1 -#endif - -/* GL_IMG_texture_compression_pvrtc */ -#ifndef GL_IMG_texture_compression_pvrtc -#define GL_IMG_texture_compression_pvrtc 1 -#endif - -/* GL_IMG_multisampled_render_to_texture */ -#ifndef GL_IMG_multisampled_render_to_texture -#define GL_IMG_multisampled_render_to_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei); -GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei); -#endif -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); -#endif - -/*------------------------------------------------------------------------* - * NV extension functions - *------------------------------------------------------------------------*/ - -/* GL_NV_coverage_sample */ -#ifndef GL_NV_coverage_sample -#define GL_NV_coverage_sample 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask); -GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation); -#endif -typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask); -typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation); -#endif - -/* GL_NV_depth_nonlinear */ -#ifndef GL_NV_depth_nonlinear -#define GL_NV_depth_nonlinear 1 -#endif - -/* GL_NV_draw_buffers */ -#ifndef GL_NV_draw_buffers -#define GL_NV_draw_buffers 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs); -#endif -typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs); -#endif - -/* GL_NV_fbo_color_attachments */ -#ifndef GL_NV_fbo_color_attachments -#define GL_NV_fbo_color_attachments 1 -#endif - -/* GL_NV_fence */ -#ifndef GL_NV_fence -#define GL_NV_fence 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *); -GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *); -GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint); -GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint); -GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *); -GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint); -GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint, GLenum); -#endif -typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); -typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); -typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); -typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); -typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); -typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); -#endif - -/* GL_NV_read_buffer */ -#ifndef GL_NV_read_buffer -#define GL_NV_read_buffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode); -#endif -typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode); -#endif - -/* GL_NV_read_buffer_front */ -#ifndef GL_NV_read_buffer_front -#define GL_NV_read_buffer_front 1 -#endif - -/* GL_NV_read_depth */ -#ifndef GL_NV_read_depth -#define GL_NV_read_depth 1 -#endif - -/* GL_NV_read_depth_stencil */ -#ifndef GL_NV_read_depth_stencil -#define GL_NV_read_depth_stencil 1 -#endif - -/* GL_NV_read_stencil */ -#ifndef GL_NV_read_stencil -#define GL_NV_read_stencil 1 -#endif - -/* GL_NV_texture_compression_s3tc_update */ -#ifndef GL_NV_texture_compression_s3tc_update -#define GL_NV_texture_compression_s3tc_update 1 -#endif - -/* GL_NV_texture_npot_2D_mipmap */ -#ifndef GL_NV_texture_npot_2D_mipmap -#define GL_NV_texture_npot_2D_mipmap 1 -#endif - -/*------------------------------------------------------------------------* - * QCOM extension functions - *------------------------------------------------------------------------*/ - -/* GL_QCOM_alpha_test */ -#ifndef GL_QCOM_alpha_test -#define GL_QCOM_alpha_test 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref); -#endif -typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref); -#endif - -/* GL_QCOM_driver_control */ -#ifndef GL_QCOM_driver_control -#define GL_QCOM_driver_control 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls); -GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); -GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl); -GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl); -#endif -typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls); -typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); -typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); -typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); -#endif - -/* GL_QCOM_extended_get */ -#ifndef GL_QCOM_extended_get -#define GL_QCOM_extended_get 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures); -GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); -GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); -GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); -GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); -GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params); -#endif -typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures); -typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); -typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params); -#endif - -/* GL_QCOM_extended_get2 */ -#ifndef GL_QCOM_extended_get2 -#define GL_QCOM_extended_get2 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders); -GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms); -GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program); -GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length); -#endif -typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders); -typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms); -typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length); -#endif - -/* GL_QCOM_perfmon_global_mode */ -#ifndef GL_QCOM_perfmon_global_mode -#define GL_QCOM_perfmon_global_mode 1 -#endif - -/* GL_QCOM_writeonly_rendering */ -#ifndef GL_QCOM_writeonly_rendering -#define GL_QCOM_writeonly_rendering 1 -#endif - -/* GL_QCOM_tiled_rendering */ -#ifndef GL_QCOM_tiled_rendering -#define GL_QCOM_tiled_rendering 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); -GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask); -#endif -typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); -typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask); -#endif - -/*------------------------------------------------------------------------* - * VIV extension tokens - *------------------------------------------------------------------------*/ - -/* GL_VIV_shader_binary */ -#ifndef GL_VIV_shader_binary -#define GL_VIV_shader_binary 1 -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __gl2ext_h_ */ diff --git a/dll/opengl/mesa/include/GLES2/gl2platform.h b/dll/opengl/mesa/include/GLES2/gl2platform.h deleted file mode 100644 index c9fa3c4d64b..00000000000 --- a/dll/opengl/mesa/include/GLES2/gl2platform.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef __gl2platform_h_ -#define __gl2platform_h_ - -/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */ - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h - * - * Adopters may modify khrplatform.h and this file to suit their platform. - * You are encouraged to submit all modifications to the Khronos group so that - * they can be included in future versions of this file. Please submit changes - * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) - * by filing a bug against product "OpenGL-ES" component "Registry". - */ - -#include - -#ifndef GL_APICALL -#define GL_APICALL KHRONOS_APICALL -#endif - -#ifndef GL_APIENTRY -#define GL_APIENTRY KHRONOS_APIENTRY -#endif - -#endif /* __gl2platform_h_ */ diff --git a/dll/opengl/mesa/include/KHR/khrplatform.h b/dll/opengl/mesa/include/KHR/khrplatform.h deleted file mode 100644 index 447953940e6..00000000000 --- a/dll/opengl/mesa/include/KHR/khrplatform.h +++ /dev/null @@ -1,277 +0,0 @@ -#ifndef __khrplatform_h_ -#define __khrplatform_h_ - -/* -** Copyright (c) 2008-2009 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ - -/* Khronos platform-specific types and definitions. - * - * $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $ - * - * Adopters may modify this file to suit their platform. Adopters are - * encouraged to submit platform specific modifications to the Khronos - * group so that they can be included in future versions of this file. - * Please submit changes by sending them to the public Khronos Bugzilla - * (http://khronos.org/bugzilla) by filing a bug against product - * "Khronos (general)" component "Registry". - * - * A predefined template which fills in some of the bug fields can be - * reached using http://tinyurl.com/khrplatform-h-bugreport, but you - * must create a Bugzilla login first. - * - * - * See the Implementer's Guidelines for information about where this file - * should be located on your system and for more details of its use: - * http://www.khronos.org/registry/implementers_guide.pdf - * - * This file should be included as - * #include - * by Khronos client API header files that use its types and defines. - * - * The types in khrplatform.h should only be used to define API-specific types. - * - * Types defined in khrplatform.h: - * khronos_int8_t signed 8 bit - * khronos_uint8_t unsigned 8 bit - * khronos_int16_t signed 16 bit - * khronos_uint16_t unsigned 16 bit - * khronos_int32_t signed 32 bit - * khronos_uint32_t unsigned 32 bit - * khronos_int64_t signed 64 bit - * khronos_uint64_t unsigned 64 bit - * khronos_intptr_t signed same number of bits as a pointer - * khronos_uintptr_t unsigned same number of bits as a pointer - * khronos_ssize_t signed size - * khronos_usize_t unsigned size - * khronos_float_t signed 32 bit floating point - * khronos_time_ns_t unsigned 64 bit time in nanoseconds - * khronos_utime_nanoseconds_t unsigned time interval or absolute time in - * nanoseconds - * khronos_stime_nanoseconds_t signed time interval in nanoseconds - * khronos_boolean_enum_t enumerated boolean type. This should - * only be used as a base type when a client API's boolean type is - * an enum. Client APIs which use an integer or other type for - * booleans cannot use this as the base type for their boolean. - * - * Tokens defined in khrplatform.h: - * - * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. - * - * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. - * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. - * - * Calling convention macros defined in this file: - * KHRONOS_APICALL - * KHRONOS_APIENTRY - * KHRONOS_APIATTRIBUTES - * - * These may be used in function prototypes as: - * - * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( - * int arg1, - * int arg2) KHRONOS_APIATTRIBUTES; - */ - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APICALL - *------------------------------------------------------------------------- - * This precedes the return type of the function in the function prototype. - */ -#if defined(_WIN32) && !defined(__SCITECH_SNAP__) -# if defined(KHRONOS_DLL_EXPORTS) -# define KHRONOS_APICALL __declspec(dllexport) -# else -# define KHRONOS_APICALL __declspec(dllimport) -# endif -#elif defined (__SYMBIAN32__) -# define KHRONOS_APICALL IMPORT_C -#elif (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303) \ - || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) -/* KHRONOS_APIATTRIBUTES is not used by the client API headers yet */ -# define KHRONOS_APICALL __attribute__((visibility("default"))) -#else -# define KHRONOS_APICALL -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APIENTRY - *------------------------------------------------------------------------- - * This follows the return type of the function and precedes the function - * name in the function prototype. - */ -#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) - /* Win32 but not WinCE */ -# define KHRONOS_APIENTRY __stdcall -#else -# define KHRONOS_APIENTRY -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APIATTRIBUTES - *------------------------------------------------------------------------- - * This follows the closing parenthesis of the function prototype arguments. - */ -#if defined (__ARMCC_2__) -#define KHRONOS_APIATTRIBUTES __softfp -#else -#define KHRONOS_APIATTRIBUTES -#endif - -/*------------------------------------------------------------------------- - * basic type definitions - *-----------------------------------------------------------------------*/ -#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) - - -/* - * Using - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(__VMS ) || defined(__sgi) - -/* - * Using - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) - -/* - * Win32 - */ -typedef __int32 khronos_int32_t; -typedef unsigned __int32 khronos_uint32_t; -typedef __int64 khronos_int64_t; -typedef unsigned __int64 khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(__sun__) || defined(__digital__) - -/* - * Sun or Digital - */ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#if defined(__arch64__) || defined(_LP64) -typedef long int khronos_int64_t; -typedef unsigned long int khronos_uint64_t; -#else -typedef long long int khronos_int64_t; -typedef unsigned long long int khronos_uint64_t; -#endif /* __arch64__ */ -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif 0 - -/* - * Hypothetical platform with no float or int64 support - */ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#define KHRONOS_SUPPORT_INT64 0 -#define KHRONOS_SUPPORT_FLOAT 0 - -#else - -/* - * Generic fallback - */ -#include -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#endif - - -/* - * Types that are (so far) the same on all platforms - */ -typedef signed char khronos_int8_t; -typedef unsigned char khronos_uint8_t; -typedef signed short int khronos_int16_t; -typedef unsigned short int khronos_uint16_t; -typedef signed long int khronos_intptr_t; -typedef unsigned long int khronos_uintptr_t; -typedef signed long int khronos_ssize_t; -typedef unsigned long int khronos_usize_t; - -#if KHRONOS_SUPPORT_FLOAT -/* - * Float type - */ -typedef float khronos_float_t; -#endif - -#if KHRONOS_SUPPORT_INT64 -/* Time types - * - * These types can be used to represent a time interval in nanoseconds or - * an absolute Unadjusted System Time. Unadjusted System Time is the number - * of nanoseconds since some arbitrary system event (e.g. since the last - * time the system booted). The Unadjusted System Time is an unsigned - * 64 bit value that wraps back to 0 every 584 years. Time intervals - * may be either signed or unsigned. - */ -typedef khronos_uint64_t khronos_utime_nanoseconds_t; -typedef khronos_int64_t khronos_stime_nanoseconds_t; -#endif - -/* - * Dummy value used to pad enum types to 32 bits. - */ -#ifndef KHRONOS_MAX_ENUM -#define KHRONOS_MAX_ENUM 0x7FFFFFFF -#endif - -/* - * Enumerated boolean type - * - * Values other than zero should be considered to be true. Therefore - * comparisons should not be made against KHRONOS_TRUE. - */ -typedef enum { - KHRONOS_FALSE = 0, - KHRONOS_TRUE = 1, - KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM -} khronos_boolean_enum_t; - -#endif /* __khrplatform_h_ */ diff --git a/dll/opengl/mesa/include/c99/inttypes.h b/dll/opengl/mesa/include/c99/inttypes.h deleted file mode 100644 index 4b3828a2162..00000000000 --- a/dll/opengl/mesa/include/c99/inttypes.h +++ /dev/null @@ -1,305 +0,0 @@ -// ISO C9x compliant inttypes.h for Microsoft Visual Studio -// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 -// -// Copyright (c) 2006 Alexander Chemeris -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. The name of the author may be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _MSC_VER // [ -#error "Use this header only with Microsoft Visual C++ compilers!" -#endif // _MSC_VER ] - -#ifndef _MSC_INTTYPES_H_ // [ -#define _MSC_INTTYPES_H_ - -#if _MSC_VER > 1000 -#pragma once -#endif - -#include "stdint.h" - -// 7.8 Format conversion of integer types - -typedef struct { - intmax_t quot; - intmax_t rem; -} imaxdiv_t; - -// 7.8.1 Macros for format specifiers - -#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [ See footnote 185 at page 198 - -// The fprintf macros for signed integers are: -#define PRId8 "d" -#define PRIi8 "i" -#define PRIdLEAST8 "d" -#define PRIiLEAST8 "i" -#define PRIdFAST8 "d" -#define PRIiFAST8 "i" - -#define PRId16 "hd" -#define PRIi16 "hi" -#define PRIdLEAST16 "hd" -#define PRIiLEAST16 "hi" -#define PRIdFAST16 "hd" -#define PRIiFAST16 "hi" - -#define PRId32 "I32d" -#define PRIi32 "I32i" -#define PRIdLEAST32 "I32d" -#define PRIiLEAST32 "I32i" -#define PRIdFAST32 "I32d" -#define PRIiFAST32 "I32i" - -#define PRId64 "I64d" -#define PRIi64 "I64i" -#define PRIdLEAST64 "I64d" -#define PRIiLEAST64 "I64i" -#define PRIdFAST64 "I64d" -#define PRIiFAST64 "I64i" - -#define PRIdMAX "I64d" -#define PRIiMAX "I64i" - -#define PRIdPTR "Id" -#define PRIiPTR "Ii" - -// The fprintf macros for unsigned integers are: -#define PRIo8 "o" -#define PRIu8 "u" -#define PRIx8 "x" -#define PRIX8 "X" -#define PRIoLEAST8 "o" -#define PRIuLEAST8 "u" -#define PRIxLEAST8 "x" -#define PRIXLEAST8 "X" -#define PRIoFAST8 "o" -#define PRIuFAST8 "u" -#define PRIxFAST8 "x" -#define PRIXFAST8 "X" - -#define PRIo16 "ho" -#define PRIu16 "hu" -#define PRIx16 "hx" -#define PRIX16 "hX" -#define PRIoLEAST16 "ho" -#define PRIuLEAST16 "hu" -#define PRIxLEAST16 "hx" -#define PRIXLEAST16 "hX" -#define PRIoFAST16 "ho" -#define PRIuFAST16 "hu" -#define PRIxFAST16 "hx" -#define PRIXFAST16 "hX" - -#define PRIo32 "I32o" -#define PRIu32 "I32u" -#define PRIx32 "I32x" -#define PRIX32 "I32X" -#define PRIoLEAST32 "I32o" -#define PRIuLEAST32 "I32u" -#define PRIxLEAST32 "I32x" -#define PRIXLEAST32 "I32X" -#define PRIoFAST32 "I32o" -#define PRIuFAST32 "I32u" -#define PRIxFAST32 "I32x" -#define PRIXFAST32 "I32X" - -#define PRIo64 "I64o" -#define PRIu64 "I64u" -#define PRIx64 "I64x" -#define PRIX64 "I64X" -#define PRIoLEAST64 "I64o" -#define PRIuLEAST64 "I64u" -#define PRIxLEAST64 "I64x" -#define PRIXLEAST64 "I64X" -#define PRIoFAST64 "I64o" -#define PRIuFAST64 "I64u" -#define PRIxFAST64 "I64x" -#define PRIXFAST64 "I64X" - -#define PRIoMAX "I64o" -#define PRIuMAX "I64u" -#define PRIxMAX "I64x" -#define PRIXMAX "I64X" - -#define PRIoPTR "Io" -#define PRIuPTR "Iu" -#define PRIxPTR "Ix" -#define PRIXPTR "IX" - -// The fscanf macros for signed integers are: -#define SCNd8 "d" -#define SCNi8 "i" -#define SCNdLEAST8 "d" -#define SCNiLEAST8 "i" -#define SCNdFAST8 "d" -#define SCNiFAST8 "i" - -#define SCNd16 "hd" -#define SCNi16 "hi" -#define SCNdLEAST16 "hd" -#define SCNiLEAST16 "hi" -#define SCNdFAST16 "hd" -#define SCNiFAST16 "hi" - -#define SCNd32 "ld" -#define SCNi32 "li" -#define SCNdLEAST32 "ld" -#define SCNiLEAST32 "li" -#define SCNdFAST32 "ld" -#define SCNiFAST32 "li" - -#define SCNd64 "I64d" -#define SCNi64 "I64i" -#define SCNdLEAST64 "I64d" -#define SCNiLEAST64 "I64i" -#define SCNdFAST64 "I64d" -#define SCNiFAST64 "I64i" - -#define SCNdMAX "I64d" -#define SCNiMAX "I64i" - -#ifdef _WIN64 // [ -# define SCNdPTR "I64d" -# define SCNiPTR "I64i" -#else // _WIN64 ][ -# define SCNdPTR "ld" -# define SCNiPTR "li" -#endif // _WIN64 ] - -// The fscanf macros for unsigned integers are: -#define SCNo8 "o" -#define SCNu8 "u" -#define SCNx8 "x" -#define SCNX8 "X" -#define SCNoLEAST8 "o" -#define SCNuLEAST8 "u" -#define SCNxLEAST8 "x" -#define SCNXLEAST8 "X" -#define SCNoFAST8 "o" -#define SCNuFAST8 "u" -#define SCNxFAST8 "x" -#define SCNXFAST8 "X" - -#define SCNo16 "ho" -#define SCNu16 "hu" -#define SCNx16 "hx" -#define SCNX16 "hX" -#define SCNoLEAST16 "ho" -#define SCNuLEAST16 "hu" -#define SCNxLEAST16 "hx" -#define SCNXLEAST16 "hX" -#define SCNoFAST16 "ho" -#define SCNuFAST16 "hu" -#define SCNxFAST16 "hx" -#define SCNXFAST16 "hX" - -#define SCNo32 "lo" -#define SCNu32 "lu" -#define SCNx32 "lx" -#define SCNX32 "lX" -#define SCNoLEAST32 "lo" -#define SCNuLEAST32 "lu" -#define SCNxLEAST32 "lx" -#define SCNXLEAST32 "lX" -#define SCNoFAST32 "lo" -#define SCNuFAST32 "lu" -#define SCNxFAST32 "lx" -#define SCNXFAST32 "lX" - -#define SCNo64 "I64o" -#define SCNu64 "I64u" -#define SCNx64 "I64x" -#define SCNX64 "I64X" -#define SCNoLEAST64 "I64o" -#define SCNuLEAST64 "I64u" -#define SCNxLEAST64 "I64x" -#define SCNXLEAST64 "I64X" -#define SCNoFAST64 "I64o" -#define SCNuFAST64 "I64u" -#define SCNxFAST64 "I64x" -#define SCNXFAST64 "I64X" - -#define SCNoMAX "I64o" -#define SCNuMAX "I64u" -#define SCNxMAX "I64x" -#define SCNXMAX "I64X" - -#ifdef _WIN64 // [ -# define SCNoPTR "I64o" -# define SCNuPTR "I64u" -# define SCNxPTR "I64x" -# define SCNXPTR "I64X" -#else // _WIN64 ][ -# define SCNoPTR "lo" -# define SCNuPTR "lu" -# define SCNxPTR "lx" -# define SCNXPTR "lX" -#endif // _WIN64 ] - -#endif // __STDC_FORMAT_MACROS ] - -// 7.8.2 Functions for greatest-width integer types - -// 7.8.2.1 The imaxabs function -#define imaxabs _abs64 - -// 7.8.2.2 The imaxdiv function - -// This is modified version of div() function from Microsoft's div.c found -// in %MSVC.NET%\crt\src\div.c -#ifdef STATIC_IMAXDIV // [ -static -#else // STATIC_IMAXDIV ][ -_inline -#endif // STATIC_IMAXDIV ] -imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom) -{ - imaxdiv_t result; - - result.quot = numer / denom; - result.rem = numer % denom; - - if (numer < 0 && result.rem > 0) { - // did division wrong; must fix up - ++result.quot; - result.rem -= denom; - } - - return result; -} - -// 7.8.2.3 The strtoimax and strtoumax functions -#define strtoimax _strtoi64 -#define strtoumax _strtoui64 - -// 7.8.2.4 The wcstoimax and wcstoumax functions -#define wcstoimax _wcstoi64 -#define wcstoumax _wcstoui64 - - -#endif // _MSC_INTTYPES_H_ ] diff --git a/dll/opengl/mesa/include/c99/stdbool.h b/dll/opengl/mesa/include/c99/stdbool.h deleted file mode 100644 index 99a735dfa76..00000000000 --- a/dll/opengl/mesa/include/c99/stdbool.h +++ /dev/null @@ -1,46 +0,0 @@ -/************************************************************************** - * - * Copyright 2007-2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - **************************************************************************/ - -#ifndef _STDBOOL_H_ -#define _STDBOOL_H_ - -#ifndef __cplusplus - -#define false 0 -#define true 1 -#define bool _Bool - -/* For compilers that don't have the builtin _Bool type. */ -#if defined(_MSC_VER) || (__STDC_VERSION__ < 199901L && __GNUC__ < 3) -typedef unsigned char _Bool; -#endif - -#endif /* !__cplusplus */ - -#define __bool_true_false_are_defined 1 - -#endif /* !_STDBOOL_H_ */ diff --git a/dll/opengl/mesa/include/c99/stdint.h b/dll/opengl/mesa/include/c99/stdint.h deleted file mode 100644 index d02608a5972..00000000000 --- a/dll/opengl/mesa/include/c99/stdint.h +++ /dev/null @@ -1,247 +0,0 @@ -// ISO C9x compliant stdint.h for Microsoft Visual Studio -// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 -// -// Copyright (c) 2006-2008 Alexander Chemeris -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// 3. The name of the author may be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef _MSC_VER // [ -#error "Use this header only with Microsoft Visual C++ compilers!" -#endif // _MSC_VER ] - -#ifndef _MSC_STDINT_H_ // [ -#define _MSC_STDINT_H_ - -#if _MSC_VER > 1000 -#pragma once -#endif - -#include - -// For Visual Studio 6 in C++ mode and for many Visual Studio versions when -// compiling for ARM we should wrap include with 'extern "C++" {}' -// or compiler give many errors like this: -// error C2733: second C linkage of overloaded function 'wmemchr' not allowed -#ifdef __cplusplus -extern "C" { -#endif -# include -#ifdef __cplusplus -} -#endif - -// Define _W64 macros to mark types changing their size, like intptr_t. -#ifndef _W64 -# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 -# define _W64 __w64 -# else -# define _W64 -# endif -#endif - - -// 7.18.1 Integer types - -// 7.18.1.1 Exact-width integer types - -// Visual Studio 6 and Embedded Visual C++ 4 doesn't -// realize that, e.g. char has the same size as __int8 -// so we give up on __intX for them. -#if (_MSC_VER < 1300) - typedef signed char int8_t; - typedef signed short int16_t; - typedef signed int int32_t; - typedef unsigned char uint8_t; - typedef unsigned short uint16_t; - typedef unsigned int uint32_t; -#else - typedef signed __int8 int8_t; - typedef signed __int16 int16_t; - typedef signed __int32 int32_t; - typedef unsigned __int8 uint8_t; - typedef unsigned __int16 uint16_t; - typedef unsigned __int32 uint32_t; -#endif -typedef signed __int64 int64_t; -typedef unsigned __int64 uint64_t; - - -// 7.18.1.2 Minimum-width integer types -typedef int8_t int_least8_t; -typedef int16_t int_least16_t; -typedef int32_t int_least32_t; -typedef int64_t int_least64_t; -typedef uint8_t uint_least8_t; -typedef uint16_t uint_least16_t; -typedef uint32_t uint_least32_t; -typedef uint64_t uint_least64_t; - -// 7.18.1.3 Fastest minimum-width integer types -typedef int8_t int_fast8_t; -typedef int16_t int_fast16_t; -typedef int32_t int_fast32_t; -typedef int64_t int_fast64_t; -typedef uint8_t uint_fast8_t; -typedef uint16_t uint_fast16_t; -typedef uint32_t uint_fast32_t; -typedef uint64_t uint_fast64_t; - -// 7.18.1.4 Integer types capable of holding object pointers -#ifdef _WIN64 // [ - typedef signed __int64 intptr_t; - typedef unsigned __int64 uintptr_t; -#else // _WIN64 ][ - typedef _W64 signed int intptr_t; - typedef _W64 unsigned int uintptr_t; -#endif // _WIN64 ] - -// 7.18.1.5 Greatest-width integer types -typedef int64_t intmax_t; -typedef uint64_t uintmax_t; - - -// 7.18.2 Limits of specified-width integer types - -#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259 - -// 7.18.2.1 Limits of exact-width integer types -#define INT8_MIN ((int8_t)_I8_MIN) -#define INT8_MAX _I8_MAX -#define INT16_MIN ((int16_t)_I16_MIN) -#define INT16_MAX _I16_MAX -#define INT32_MIN ((int32_t)_I32_MIN) -#define INT32_MAX _I32_MAX -#define INT64_MIN ((int64_t)_I64_MIN) -#define INT64_MAX _I64_MAX -#define UINT8_MAX _UI8_MAX -#define UINT16_MAX _UI16_MAX -#define UINT32_MAX _UI32_MAX -#define UINT64_MAX _UI64_MAX - -// 7.18.2.2 Limits of minimum-width integer types -#define INT_LEAST8_MIN INT8_MIN -#define INT_LEAST8_MAX INT8_MAX -#define INT_LEAST16_MIN INT16_MIN -#define INT_LEAST16_MAX INT16_MAX -#define INT_LEAST32_MIN INT32_MIN -#define INT_LEAST32_MAX INT32_MAX -#define INT_LEAST64_MIN INT64_MIN -#define INT_LEAST64_MAX INT64_MAX -#define UINT_LEAST8_MAX UINT8_MAX -#define UINT_LEAST16_MAX UINT16_MAX -#define UINT_LEAST32_MAX UINT32_MAX -#define UINT_LEAST64_MAX UINT64_MAX - -// 7.18.2.3 Limits of fastest minimum-width integer types -#define INT_FAST8_MIN INT8_MIN -#define INT_FAST8_MAX INT8_MAX -#define INT_FAST16_MIN INT16_MIN -#define INT_FAST16_MAX INT16_MAX -#define INT_FAST32_MIN INT32_MIN -#define INT_FAST32_MAX INT32_MAX -#define INT_FAST64_MIN INT64_MIN -#define INT_FAST64_MAX INT64_MAX -#define UINT_FAST8_MAX UINT8_MAX -#define UINT_FAST16_MAX UINT16_MAX -#define UINT_FAST32_MAX UINT32_MAX -#define UINT_FAST64_MAX UINT64_MAX - -// 7.18.2.4 Limits of integer types capable of holding object pointers -#ifdef _WIN64 // [ -# define INTPTR_MIN INT64_MIN -# define INTPTR_MAX INT64_MAX -# define UINTPTR_MAX UINT64_MAX -#else // _WIN64 ][ -# define INTPTR_MIN INT32_MIN -# define INTPTR_MAX INT32_MAX -# define UINTPTR_MAX UINT32_MAX -#endif // _WIN64 ] - -// 7.18.2.5 Limits of greatest-width integer types -#define INTMAX_MIN INT64_MIN -#define INTMAX_MAX INT64_MAX -#define UINTMAX_MAX UINT64_MAX - -// 7.18.3 Limits of other integer types - -#ifdef _WIN64 // [ -# define PTRDIFF_MIN _I64_MIN -# define PTRDIFF_MAX _I64_MAX -#else // _WIN64 ][ -# define PTRDIFF_MIN _I32_MIN -# define PTRDIFF_MAX _I32_MAX -#endif // _WIN64 ] - -#define SIG_ATOMIC_MIN INT_MIN -#define SIG_ATOMIC_MAX INT_MAX - -#ifndef SIZE_MAX // [ -# ifdef _WIN64 // [ -# define SIZE_MAX _UI64_MAX -# else // _WIN64 ][ -# define SIZE_MAX _UI32_MAX -# endif // _WIN64 ] -#endif // SIZE_MAX ] - -// WCHAR_MIN and WCHAR_MAX are also defined in -#ifndef WCHAR_MIN // [ -# define WCHAR_MIN 0 -#endif // WCHAR_MIN ] -#ifndef WCHAR_MAX // [ -# define WCHAR_MAX _UI16_MAX -#endif // WCHAR_MAX ] - -#define WINT_MIN 0 -#define WINT_MAX _UI16_MAX - -#endif // __STDC_LIMIT_MACROS ] - - -// 7.18.4 Limits of other integer types - -#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260 - -// 7.18.4.1 Macros for minimum-width integer constants - -#define INT8_C(val) val##i8 -#define INT16_C(val) val##i16 -#define INT32_C(val) val##i32 -#define INT64_C(val) val##i64 - -#define UINT8_C(val) val##ui8 -#define UINT16_C(val) val##ui16 -#define UINT32_C(val) val##ui32 -#define UINT64_C(val) val##ui64 - -// 7.18.4.2 Macros for greatest-width integer constants -#define INTMAX_C INT64_C -#define UINTMAX_C UINT64_C - -#endif // __STDC_CONSTANT_MACROS ] - - -#endif // _MSC_STDINT_H_ ] diff --git a/dll/opengl/mesa/main/CMakeLists.txt b/dll/opengl/mesa/main/CMakeLists.txt new file mode 100644 index 00000000000..16d9709bb70 --- /dev/null +++ b/dll/opengl/mesa/main/CMakeLists.txt @@ -0,0 +1,80 @@ + +list(APPEND SOURCE + api_arrayelt.c + api_exec.c + api_loopback.c + api_validate.c + accum.c + attrib.c + arrayobj.c + blend.c + bufferobj.c + buffers.c + clear.c + clip.c + colortab.c + context.c + convolve.c + cpuinfo.c + depth.c + dlist.c + dlopen.c + drawpix.c + enable.c + enums.c + eval.c + execmem.c + extensions.c + feedback.c + fog.c + formats.c + format_pack.c + format_unpack.c + framebuffer.c + get.c + getstring.c + hash.c + hint.c + histogram.c + image.c + imports.c + light.c + lines.c + matrix.c + mm.c + multisample.c + pack.c + pixel.c + pixelstore.c + pixeltransfer.c + points.c + polygon.c + rastpos.c + readpix.c + renderbuffer.c + scissor.c + shared.c + state.c + stencil.c + texenv.c + texformat.c + texgen.c + texgetimage.c + teximage.c + texobj.c + texpal.c + texparam.c + texstate.c + texstorage.c + texstore.c + texturebarrier.c + varray.c + version.c + viewport.c + vtxfmt.c +) + +add_library(mesa_main STATIC ${SOURCE}) +if(NOT MSVC) + allow_warnings(mesa_main) +endif() diff --git a/dll/opengl/mesa/src/mesa/main/accum.c b/dll/opengl/mesa/main/accum.c similarity index 78% rename from dll/opengl/mesa/src/mesa/main/accum.c rename to dll/opengl/mesa/main/accum.c index df6f219bf30..48d600616b7 100644 --- a/dll/opengl/mesa/src/mesa/main/accum.c +++ b/dll/opengl/mesa/main/accum.c @@ -24,7 +24,6 @@ #include "glheader.h" #include "accum.h" -#include "condrender.h" #include "context.h" #include "format_unpack.h" #include "format_pack.h" @@ -94,12 +93,6 @@ _mesa_Accum( GLenum op, GLfloat value ) if (ctx->NewState) _mesa_update_state(ctx); - if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, - "glAccum(incomplete framebuffer)"); - return; - } - if (ctx->RasterDiscard) return; @@ -345,7 +338,12 @@ accum_return(struct gl_context *ctx, GLfloat value, struct gl_renderbuffer *accRb = fb->Attachment[BUFFER_ACCUM].Renderbuffer; GLubyte *accMap, *colorMap; GLint accRowStride, colorRowStride; - GLuint buffer; + struct gl_renderbuffer *colorRb = fb->_ColorDrawBuffer; + const GLboolean masking = (!ctx->Color.ColorMask[RCOMP] || + !ctx->Color.ColorMask[GCOMP] || + !ctx->Color.ColorMask[BCOMP] || + !ctx->Color.ColorMask[ACOMP]); + GLbitfield mappingFlags = GL_MAP_WRITE_BIT; /* Map accum buffer */ ctx->Driver.MapRenderbuffer(ctx, accRb, xpos, ypos, width, height, @@ -356,89 +354,79 @@ accum_return(struct gl_context *ctx, GLfloat value, return; } - /* Loop over destination buffers */ - for (buffer = 0; buffer < fb->_NumColorDrawBuffers; buffer++) { - struct gl_renderbuffer *colorRb = fb->_ColorDrawBuffers[buffer]; - const GLboolean masking = (!ctx->Color.ColorMask[buffer][RCOMP] || - !ctx->Color.ColorMask[buffer][GCOMP] || - !ctx->Color.ColorMask[buffer][BCOMP] || - !ctx->Color.ColorMask[buffer][ACOMP]); - GLbitfield mappingFlags = GL_MAP_WRITE_BIT; - - if (masking) - mappingFlags |= GL_MAP_READ_BIT; + if (masking) + mappingFlags |= GL_MAP_READ_BIT; /* Map color buffer */ - ctx->Driver.MapRenderbuffer(ctx, colorRb, xpos, ypos, width, height, - mappingFlags, &colorMap, &colorRowStride); - if (!colorMap) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glAccum"); - continue; - } - - if (accRb->Format == MESA_FORMAT_SIGNED_RGBA_16) { - const GLfloat scale = value / 32767.0f; - GLint i, j; - GLfloat (*rgba)[4], (*dest)[4]; - - rgba = (GLfloat (*)[4]) malloc(width * 4 * sizeof(GLfloat)); - dest = (GLfloat (*)[4]) malloc(width * 4 * sizeof(GLfloat)); - - if (rgba && dest) { - for (j = 0; j < height; j++) { - GLshort *acc = (GLshort *) accMap; - - for (i = 0; i < width; i++) { - rgba[i][0] = acc[i * 4 + 0] * scale; - rgba[i][1] = acc[i * 4 + 1] * scale; - rgba[i][2] = acc[i * 4 + 2] * scale; - rgba[i][3] = acc[i * 4 + 3] * scale; - } - - if (masking) { - - /* get existing colors from dest buffer */ - _mesa_unpack_rgba_row(colorRb->Format, width, colorMap, dest); - - /* use the dest colors where mask[channel] = 0 */ - if (ctx->Color.ColorMask[buffer][RCOMP] == 0) { - for (i = 0; i < width; i++) - rgba[i][RCOMP] = dest[i][RCOMP]; - } - if (ctx->Color.ColorMask[buffer][GCOMP] == 0) { - for (i = 0; i < width; i++) - rgba[i][GCOMP] = dest[i][GCOMP]; - } - if (ctx->Color.ColorMask[buffer][BCOMP] == 0) { - for (i = 0; i < width; i++) - rgba[i][BCOMP] = dest[i][BCOMP]; - } - if (ctx->Color.ColorMask[buffer][ACOMP] == 0) { - for (i = 0; i < width; i++) - rgba[i][ACOMP] = dest[i][ACOMP]; - } - } - - _mesa_pack_float_rgba_row(colorRb->Format, width, - (const GLfloat (*)[4]) rgba, colorMap); - - accMap += accRowStride; - colorMap += colorRowStride; - } - } - else { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glAccum"); - } - free(rgba); - free(dest); - } - else { - /* other types someday? */ - } - - ctx->Driver.UnmapRenderbuffer(ctx, colorRb); + ctx->Driver.MapRenderbuffer(ctx, colorRb, xpos, ypos, width, height, + mappingFlags, &colorMap, &colorRowStride); + if (!colorMap) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glAccum"); + ctx->Driver.UnmapRenderbuffer(ctx, accRb); + return; } + if (accRb->Format == MESA_FORMAT_SIGNED_RGBA_16) { + const GLfloat scale = value / 32767.0f; + GLint i, j; + GLfloat (*rgba)[4], (*dest)[4]; + + rgba = (GLfloat (*)[4]) malloc(width * 4 * sizeof(GLfloat)); + dest = (GLfloat (*)[4]) malloc(width * 4 * sizeof(GLfloat)); + + if (rgba && dest) { + for (j = 0; j < height; j++) { + GLshort *acc = (GLshort *) accMap; + + for (i = 0; i < width; i++) { + rgba[i][0] = acc[i * 4 + 0] * scale; + rgba[i][1] = acc[i * 4 + 1] * scale; + rgba[i][2] = acc[i * 4 + 2] * scale; + rgba[i][3] = acc[i * 4 + 3] * scale; + } + + if (masking) { + + /* get existing colors from dest buffer */ + _mesa_unpack_rgba_row(colorRb->Format, width, colorMap, dest); + + /* use the dest colors where mask[channel] = 0 */ + if (ctx->Color.ColorMask[RCOMP] == 0) { + for (i = 0; i < width; i++) + rgba[i][RCOMP] = dest[i][RCOMP]; + } + if (ctx->Color.ColorMask[GCOMP] == 0) { + for (i = 0; i < width; i++) + rgba[i][GCOMP] = dest[i][GCOMP]; + } + if (ctx->Color.ColorMask[BCOMP] == 0) { + for (i = 0; i < width; i++) + rgba[i][BCOMP] = dest[i][BCOMP]; + } + if (ctx->Color.ColorMask[ACOMP] == 0) { + for (i = 0; i < width; i++) + rgba[i][ACOMP] = dest[i][ACOMP]; + } + } + + _mesa_pack_float_rgba_row(colorRb->Format, width, + (const GLfloat (*)[4]) rgba, colorMap); + + accMap += accRowStride; + colorMap += colorRowStride; + } + } + else { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glAccum"); + } + free(rgba); + free(dest); + } + else { + /* other types someday? */ + } + + ctx->Driver.UnmapRenderbuffer(ctx, colorRb); ctx->Driver.UnmapRenderbuffer(ctx, accRb); } @@ -459,9 +447,6 @@ _mesa_accum(struct gl_context *ctx, GLenum op, GLfloat value) return; } - if (!_mesa_check_conditional_render(ctx)) - return; - xpos = ctx->DrawBuffer->_Xmin; ypos = ctx->DrawBuffer->_Ymin; width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin; diff --git a/dll/opengl/mesa/src/mesa/main/accum.h b/dll/opengl/mesa/main/accum.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/accum.h rename to dll/opengl/mesa/main/accum.h diff --git a/dll/opengl/mesa/src/mesa/main/api_arrayelt.c b/dll/opengl/mesa/main/api_arrayelt.c similarity index 53% rename from dll/opengl/mesa/src/mesa/main/api_arrayelt.c rename to dll/opengl/mesa/main/api_arrayelt.c index 6de6de2b765..5ed52c4e54c 100644 --- a/dll/opengl/mesa/src/mesa/main/api_arrayelt.c +++ b/dll/opengl/mesa/main/api_arrayelt.c @@ -673,732 +673,6 @@ static attrib_func AttribFuncsNV[2][4][NUM_TYPES] = { } }; - -/** - ** GL_ARB_vertex_program - **/ - -/* GL_BYTE attributes */ - -static void GLAPIENTRY -VertexAttrib1NbvARB(GLuint index, const GLbyte *v) -{ - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]))); -} - -static void GLAPIENTRY -VertexAttrib1bvARB(GLuint index, const GLbyte *v) -{ - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0])); -} - -static void GLAPIENTRY -VertexAttrib2NbvARB(GLuint index, const GLbyte *v) -{ - CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]))); -} - -static void GLAPIENTRY -VertexAttrib2bvARB(GLuint index, const GLbyte *v) -{ - CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1])); -} - -static void GLAPIENTRY -VertexAttrib3NbvARB(GLuint index, const GLbyte *v) -{ - CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]), - BYTE_TO_FLOAT(v[1]), - BYTE_TO_FLOAT(v[2]))); -} - -static void GLAPIENTRY -VertexAttrib3bvARB(GLuint index, const GLbyte *v) -{ - CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2])); -} - -static void GLAPIENTRY -VertexAttrib4NbvARB(GLuint index, const GLbyte *v) -{ - CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, BYTE_TO_FLOAT(v[0]), - BYTE_TO_FLOAT(v[1]), - BYTE_TO_FLOAT(v[2]), - BYTE_TO_FLOAT(v[3]))); -} - -static void GLAPIENTRY -VertexAttrib4bvARB(GLuint index, const GLbyte *v) -{ - CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3])); -} - -/* GL_UNSIGNED_BYTE attributes */ - -static void GLAPIENTRY -VertexAttrib1NubvARB(GLuint index, const GLubyte *v) -{ - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, UBYTE_TO_FLOAT(v[0]))); -} - -static void GLAPIENTRY -VertexAttrib1ubvARB(GLuint index, const GLubyte *v) -{ - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0])); -} - -static void GLAPIENTRY -VertexAttrib2NubvARB(GLuint index, const GLubyte *v) -{ - CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, - UBYTE_TO_FLOAT(v[0]), - UBYTE_TO_FLOAT(v[1]))); -} - -static void GLAPIENTRY -VertexAttrib2ubvARB(GLuint index, const GLubyte *v) -{ - CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, - (GLfloat)v[0], (GLfloat)v[1])); -} - -static void GLAPIENTRY -VertexAttrib3NubvARB(GLuint index, const GLubyte *v) -{ - CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, - UBYTE_TO_FLOAT(v[0]), - UBYTE_TO_FLOAT(v[1]), - UBYTE_TO_FLOAT(v[2]))); -} -static void GLAPIENTRY -VertexAttrib3ubvARB(GLuint index, const GLubyte *v) -{ - CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, - (GLfloat)v[0], - (GLfloat)v[1], - (GLfloat)v[2])); -} - -static void GLAPIENTRY -VertexAttrib4NubvARB(GLuint index, const GLubyte *v) -{ - CALL_VertexAttrib4fARB(GET_DISPATCH(), - (index, - UBYTE_TO_FLOAT(v[0]), - UBYTE_TO_FLOAT(v[1]), - UBYTE_TO_FLOAT(v[2]), - UBYTE_TO_FLOAT(v[3]))); -} - -static void GLAPIENTRY -VertexAttrib4ubvARB(GLuint index, const GLubyte *v) -{ - CALL_VertexAttrib4fARB(GET_DISPATCH(), - (index, - (GLfloat)v[0], (GLfloat)v[1], - (GLfloat)v[2], (GLfloat)v[3])); -} - -/* GL_SHORT attributes */ - -static void GLAPIENTRY -VertexAttrib1NsvARB(GLuint index, const GLshort *v) -{ - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, SHORT_TO_FLOAT(v[0]))); -} - -static void GLAPIENTRY -VertexAttrib1svARB(GLuint index, const GLshort *v) -{ - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0])); -} - -static void GLAPIENTRY -VertexAttrib2NsvARB(GLuint index, const GLshort *v) -{ - CALL_VertexAttrib2fARB(GET_DISPATCH(), - (index, SHORT_TO_FLOAT(v[0]), - SHORT_TO_FLOAT(v[1]))); -} - -static void GLAPIENTRY -VertexAttrib2svARB(GLuint index, const GLshort *v) -{ - CALL_VertexAttrib2fARB(GET_DISPATCH(), - (index, (GLfloat)v[0], (GLfloat)v[1])); -} - -static void GLAPIENTRY -VertexAttrib3NsvARB(GLuint index, const GLshort *v) -{ - CALL_VertexAttrib3fARB(GET_DISPATCH(), - (index, - SHORT_TO_FLOAT(v[0]), - SHORT_TO_FLOAT(v[1]), - SHORT_TO_FLOAT(v[2]))); -} - -static void GLAPIENTRY -VertexAttrib3svARB(GLuint index, const GLshort *v) -{ - CALL_VertexAttrib3fARB(GET_DISPATCH(), - (index, - (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2])); -} - -static void GLAPIENTRY -VertexAttrib4NsvARB(GLuint index, const GLshort *v) -{ - CALL_VertexAttrib4fARB(GET_DISPATCH(), - (index, - SHORT_TO_FLOAT(v[0]), - SHORT_TO_FLOAT(v[1]), - SHORT_TO_FLOAT(v[2]), - SHORT_TO_FLOAT(v[3]))); -} - -static void GLAPIENTRY -VertexAttrib4svARB(GLuint index, const GLshort *v) -{ - CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], - (GLfloat)v[2], (GLfloat)v[3])); -} - -/* GL_UNSIGNED_SHORT attributes */ - -static void GLAPIENTRY -VertexAttrib1NusvARB(GLuint index, const GLushort *v) -{ - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]))); -} - -static void GLAPIENTRY -VertexAttrib1usvARB(GLuint index, const GLushort *v) -{ - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0])); -} - -static void GLAPIENTRY -VertexAttrib2NusvARB(GLuint index, const GLushort *v) -{ - CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]), - USHORT_TO_FLOAT(v[1]))); -} - -static void GLAPIENTRY -VertexAttrib2usvARB(GLuint index, const GLushort *v) -{ - CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0], - (GLfloat)v[1])); -} - -static void GLAPIENTRY -VertexAttrib3NusvARB(GLuint index, const GLushort *v) -{ - CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]), - USHORT_TO_FLOAT(v[1]), - USHORT_TO_FLOAT(v[2]))); -} - -static void GLAPIENTRY -VertexAttrib3usvARB(GLuint index, const GLushort *v) -{ - CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0], - (GLfloat)v[1], (GLfloat)v[2])); -} - -static void GLAPIENTRY -VertexAttrib4NusvARB(GLuint index, const GLushort *v) -{ - CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, USHORT_TO_FLOAT(v[0]), - USHORT_TO_FLOAT(v[1]), - USHORT_TO_FLOAT(v[2]), - USHORT_TO_FLOAT(v[3]))); -} - -static void GLAPIENTRY -VertexAttrib4usvARB(GLuint index, const GLushort *v) -{ - CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], (GLfloat)v[2], (GLfloat)v[3])); -} - -/* GL_INT attributes */ - -static void GLAPIENTRY -VertexAttrib1NivARB(GLuint index, const GLint *v) -{ - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]))); -} - -static void GLAPIENTRY -VertexAttrib1ivARB(GLuint index, const GLint *v) -{ - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0])); -} - -static void GLAPIENTRY -VertexAttrib2NivARB(GLuint index, const GLint *v) -{ - CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]), - INT_TO_FLOAT(v[1]))); -} - -static void GLAPIENTRY -VertexAttrib2ivARB(GLuint index, const GLint *v) -{ - CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0], - (GLfloat)v[1])); -} - -static void GLAPIENTRY -VertexAttrib3NivARB(GLuint index, const GLint *v) -{ - CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]), - INT_TO_FLOAT(v[1]), - INT_TO_FLOAT(v[2]))); -} - -static void GLAPIENTRY -VertexAttrib3ivARB(GLuint index, const GLint *v) -{ - CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0], - (GLfloat)v[1], (GLfloat)v[2])); -} - -static void GLAPIENTRY -VertexAttrib4NivARB(GLuint index, const GLint *v) -{ - CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, INT_TO_FLOAT(v[0]), - INT_TO_FLOAT(v[1]), - INT_TO_FLOAT(v[2]), - INT_TO_FLOAT(v[3]))); -} - -static void GLAPIENTRY -VertexAttrib4ivARB(GLuint index, const GLint *v) -{ - CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], - (GLfloat)v[2], (GLfloat)v[3])); -} - -/* GL_UNSIGNED_INT attributes */ - -static void GLAPIENTRY -VertexAttrib1NuivARB(GLuint index, const GLuint *v) -{ - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]))); -} - -static void GLAPIENTRY -VertexAttrib1uivARB(GLuint index, const GLuint *v) -{ - CALL_VertexAttrib1fARB(GET_DISPATCH(), (index, (GLfloat)v[0])); -} - -static void GLAPIENTRY -VertexAttrib2NuivARB(GLuint index, const GLuint *v) -{ - CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]), - UINT_TO_FLOAT(v[1]))); -} - -static void GLAPIENTRY -VertexAttrib2uivARB(GLuint index, const GLuint *v) -{ - CALL_VertexAttrib2fARB(GET_DISPATCH(), (index, (GLfloat)v[0], - (GLfloat)v[1])); -} - -static void GLAPIENTRY -VertexAttrib3NuivARB(GLuint index, const GLuint *v) -{ - CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]), - UINT_TO_FLOAT(v[1]), - UINT_TO_FLOAT(v[2]))); -} - -static void GLAPIENTRY -VertexAttrib3uivARB(GLuint index, const GLuint *v) -{ - CALL_VertexAttrib3fARB(GET_DISPATCH(), (index, (GLfloat)v[0], - (GLfloat)v[1], (GLfloat)v[2])); -} - -static void GLAPIENTRY -VertexAttrib4NuivARB(GLuint index, const GLuint *v) -{ - CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, UINT_TO_FLOAT(v[0]), - UINT_TO_FLOAT(v[1]), - UINT_TO_FLOAT(v[2]), - UINT_TO_FLOAT(v[3]))); -} - -static void GLAPIENTRY -VertexAttrib4uivARB(GLuint index, const GLuint *v) -{ - CALL_VertexAttrib4fARB(GET_DISPATCH(), (index, (GLfloat)v[0], (GLfloat)v[1], - (GLfloat)v[2], (GLfloat)v[3])); -} - -/* GL_FLOAT attributes */ - -static void GLAPIENTRY -VertexAttrib1fvARB(GLuint index, const GLfloat *v) -{ - CALL_VertexAttrib1fvARB(GET_DISPATCH(), (index, v)); -} - -static void GLAPIENTRY -VertexAttrib2fvARB(GLuint index, const GLfloat *v) -{ - CALL_VertexAttrib2fvARB(GET_DISPATCH(), (index, v)); -} - -static void GLAPIENTRY -VertexAttrib3fvARB(GLuint index, const GLfloat *v) -{ - CALL_VertexAttrib3fvARB(GET_DISPATCH(), (index, v)); -} - -static void GLAPIENTRY -VertexAttrib4fvARB(GLuint index, const GLfloat *v) -{ - CALL_VertexAttrib4fvARB(GET_DISPATCH(), (index, v)); -} - -/* GL_DOUBLE attributes */ - -static void GLAPIENTRY -VertexAttrib1dvARB(GLuint index, const GLdouble *v) -{ - CALL_VertexAttrib1dvARB(GET_DISPATCH(), (index, v)); -} - -static void GLAPIENTRY -VertexAttrib2dvARB(GLuint index, const GLdouble *v) -{ - CALL_VertexAttrib2dvARB(GET_DISPATCH(), (index, v)); -} - -static void GLAPIENTRY -VertexAttrib3dvARB(GLuint index, const GLdouble *v) -{ - CALL_VertexAttrib3dvARB(GET_DISPATCH(), (index, v)); -} - -static void GLAPIENTRY -VertexAttrib4dvARB(GLuint index, const GLdouble *v) -{ - CALL_VertexAttrib4dvARB(GET_DISPATCH(), (index, v)); -} - - -/** - * Integer-valued attributes - */ -static void GLAPIENTRY -VertexAttribI1bv(GLuint index, const GLbyte *v) -{ - CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index, v[0])); -} - -static void GLAPIENTRY -VertexAttribI2bv(GLuint index, const GLbyte *v) -{ - CALL_VertexAttribI2iEXT(GET_DISPATCH(), (index, v[0], v[1])); -} - -static void GLAPIENTRY -VertexAttribI3bv(GLuint index, const GLbyte *v) -{ - CALL_VertexAttribI3iEXT(GET_DISPATCH(), (index, v[0], v[1], v[2])); -} - -static void GLAPIENTRY -VertexAttribI4bv(GLuint index, const GLbyte *v) -{ - CALL_VertexAttribI4bvEXT(GET_DISPATCH(), (index, v)); -} - - -static void GLAPIENTRY -VertexAttribI1ubv(GLuint index, const GLubyte *v) -{ - CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index, v[0])); -} - -static void GLAPIENTRY -VertexAttribI2ubv(GLuint index, const GLubyte *v) -{ - CALL_VertexAttribI2uiEXT(GET_DISPATCH(), (index, v[0], v[1])); -} - -static void GLAPIENTRY -VertexAttribI3ubv(GLuint index, const GLubyte *v) -{ - CALL_VertexAttribI3uiEXT(GET_DISPATCH(), (index, v[0], v[1], v[2])); -} - -static void GLAPIENTRY -VertexAttribI4ubv(GLuint index, const GLubyte *v) -{ - CALL_VertexAttribI4ubvEXT(GET_DISPATCH(), (index, v)); -} - - - -static void GLAPIENTRY -VertexAttribI1sv(GLuint index, const GLshort *v) -{ - CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index, v[0])); -} - -static void GLAPIENTRY -VertexAttribI2sv(GLuint index, const GLshort *v) -{ - CALL_VertexAttribI2iEXT(GET_DISPATCH(), (index, v[0], v[1])); -} - -static void GLAPIENTRY -VertexAttribI3sv(GLuint index, const GLshort *v) -{ - CALL_VertexAttribI3iEXT(GET_DISPATCH(), (index, v[0], v[1], v[2])); -} - -static void GLAPIENTRY -VertexAttribI4sv(GLuint index, const GLshort *v) -{ - CALL_VertexAttribI4svEXT(GET_DISPATCH(), (index, v)); -} - - -static void GLAPIENTRY -VertexAttribI1usv(GLuint index, const GLushort *v) -{ - CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index, v[0])); -} - -static void GLAPIENTRY -VertexAttribI2usv(GLuint index, const GLushort *v) -{ - CALL_VertexAttribI2uiEXT(GET_DISPATCH(), (index, v[0], v[1])); -} - -static void GLAPIENTRY -VertexAttribI3usv(GLuint index, const GLushort *v) -{ - CALL_VertexAttribI3uiEXT(GET_DISPATCH(), (index, v[0], v[1], v[2])); -} - -static void GLAPIENTRY -VertexAttribI4usv(GLuint index, const GLushort *v) -{ - CALL_VertexAttribI4usvEXT(GET_DISPATCH(), (index, v)); -} - - - -static void GLAPIENTRY -VertexAttribI1iv(GLuint index, const GLint *v) -{ - CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index, v[0])); -} - -static void GLAPIENTRY -VertexAttribI2iv(GLuint index, const GLint *v) -{ - CALL_VertexAttribI2iEXT(GET_DISPATCH(), (index, v[0], v[1])); -} - -static void GLAPIENTRY -VertexAttribI3iv(GLuint index, const GLint *v) -{ - CALL_VertexAttribI3iEXT(GET_DISPATCH(), (index, v[0], v[1], v[2])); -} - -static void GLAPIENTRY -VertexAttribI4iv(GLuint index, const GLint *v) -{ - CALL_VertexAttribI4ivEXT(GET_DISPATCH(), (index, v)); -} - - -static void GLAPIENTRY -VertexAttribI1uiv(GLuint index, const GLuint *v) -{ - CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index, v[0])); -} - -static void GLAPIENTRY -VertexAttribI2uiv(GLuint index, const GLuint *v) -{ - CALL_VertexAttribI2uiEXT(GET_DISPATCH(), (index, v[0], v[1])); -} - -static void GLAPIENTRY -VertexAttribI3uiv(GLuint index, const GLuint *v) -{ - CALL_VertexAttribI3uiEXT(GET_DISPATCH(), (index, v[0], v[1], v[2])); -} - -static void GLAPIENTRY -VertexAttribI4uiv(GLuint index, const GLuint *v) -{ - CALL_VertexAttribI4uivEXT(GET_DISPATCH(), (index, v)); -} - - - - -/* - * Array [unnormalized/normalized/integer][size][type] of VertexAttrib - * functions - */ -static attrib_func AttribFuncsARB[3][4][NUM_TYPES] = { - { - /* non-normalized */ - { - /* size 1 */ - (attrib_func) VertexAttrib1bvARB, - (attrib_func) VertexAttrib1ubvARB, - (attrib_func) VertexAttrib1svARB, - (attrib_func) VertexAttrib1usvARB, - (attrib_func) VertexAttrib1ivARB, - (attrib_func) VertexAttrib1uivARB, - (attrib_func) VertexAttrib1fvARB, - (attrib_func) VertexAttrib1dvARB - }, - { - /* size 2 */ - (attrib_func) VertexAttrib2bvARB, - (attrib_func) VertexAttrib2ubvARB, - (attrib_func) VertexAttrib2svARB, - (attrib_func) VertexAttrib2usvARB, - (attrib_func) VertexAttrib2ivARB, - (attrib_func) VertexAttrib2uivARB, - (attrib_func) VertexAttrib2fvARB, - (attrib_func) VertexAttrib2dvARB - }, - { - /* size 3 */ - (attrib_func) VertexAttrib3bvARB, - (attrib_func) VertexAttrib3ubvARB, - (attrib_func) VertexAttrib3svARB, - (attrib_func) VertexAttrib3usvARB, - (attrib_func) VertexAttrib3ivARB, - (attrib_func) VertexAttrib3uivARB, - (attrib_func) VertexAttrib3fvARB, - (attrib_func) VertexAttrib3dvARB - }, - { - /* size 4 */ - (attrib_func) VertexAttrib4bvARB, - (attrib_func) VertexAttrib4ubvARB, - (attrib_func) VertexAttrib4svARB, - (attrib_func) VertexAttrib4usvARB, - (attrib_func) VertexAttrib4ivARB, - (attrib_func) VertexAttrib4uivARB, - (attrib_func) VertexAttrib4fvARB, - (attrib_func) VertexAttrib4dvARB - } - }, - { - /* normalized (except for float/double) */ - { - /* size 1 */ - (attrib_func) VertexAttrib1NbvARB, - (attrib_func) VertexAttrib1NubvARB, - (attrib_func) VertexAttrib1NsvARB, - (attrib_func) VertexAttrib1NusvARB, - (attrib_func) VertexAttrib1NivARB, - (attrib_func) VertexAttrib1NuivARB, - (attrib_func) VertexAttrib1fvARB, - (attrib_func) VertexAttrib1dvARB - }, - { - /* size 2 */ - (attrib_func) VertexAttrib2NbvARB, - (attrib_func) VertexAttrib2NubvARB, - (attrib_func) VertexAttrib2NsvARB, - (attrib_func) VertexAttrib2NusvARB, - (attrib_func) VertexAttrib2NivARB, - (attrib_func) VertexAttrib2NuivARB, - (attrib_func) VertexAttrib2fvARB, - (attrib_func) VertexAttrib2dvARB - }, - { - /* size 3 */ - (attrib_func) VertexAttrib3NbvARB, - (attrib_func) VertexAttrib3NubvARB, - (attrib_func) VertexAttrib3NsvARB, - (attrib_func) VertexAttrib3NusvARB, - (attrib_func) VertexAttrib3NivARB, - (attrib_func) VertexAttrib3NuivARB, - (attrib_func) VertexAttrib3fvARB, - (attrib_func) VertexAttrib3dvARB - }, - { - /* size 4 */ - (attrib_func) VertexAttrib4NbvARB, - (attrib_func) VertexAttrib4NubvARB, - (attrib_func) VertexAttrib4NsvARB, - (attrib_func) VertexAttrib4NusvARB, - (attrib_func) VertexAttrib4NivARB, - (attrib_func) VertexAttrib4NuivARB, - (attrib_func) VertexAttrib4fvARB, - (attrib_func) VertexAttrib4dvARB - } - }, - - { - /* integer-valued */ - { - /* size 1 */ - (attrib_func) VertexAttribI1bv, - (attrib_func) VertexAttribI1ubv, - (attrib_func) VertexAttribI1sv, - (attrib_func) VertexAttribI1usv, - (attrib_func) VertexAttribI1iv, - (attrib_func) VertexAttribI1uiv, - NULL, /* GL_FLOAT */ - NULL /* GL_DOUBLE */ - }, - { - /* size 2 */ - (attrib_func) VertexAttribI2bv, - (attrib_func) VertexAttribI2ubv, - (attrib_func) VertexAttribI2sv, - (attrib_func) VertexAttribI2usv, - (attrib_func) VertexAttribI2iv, - (attrib_func) VertexAttribI2uiv, - NULL, /* GL_FLOAT */ - NULL /* GL_DOUBLE */ - }, - { - /* size 3 */ - (attrib_func) VertexAttribI3bv, - (attrib_func) VertexAttribI3ubv, - (attrib_func) VertexAttribI3sv, - (attrib_func) VertexAttribI3usv, - (attrib_func) VertexAttribI3iv, - (attrib_func) VertexAttribI3uiv, - NULL, /* GL_FLOAT */ - NULL /* GL_DOUBLE */ - }, - { - /* size 4 */ - (attrib_func) VertexAttribI4bv, - (attrib_func) VertexAttribI4ubv, - (attrib_func) VertexAttribI4sv, - (attrib_func) VertexAttribI4usv, - (attrib_func) VertexAttribI4iv, - (attrib_func) VertexAttribI4uiv, - NULL, /* GL_FLOAT */ - NULL /* GL_DOUBLE */ - } - } -}; - /**********************************************************************/ @@ -1468,7 +742,6 @@ static void _ae_update_state( struct gl_context *ctx ) AEcontext *actx = AE_CONTEXT(ctx); AEarray *aa = actx->arrays; AEattrib *at = actx->attribs; - GLuint i; struct gl_array_object *arrayObj = ctx->Array.ArrayObj; actx->nr_vbos = 0; @@ -1510,8 +783,8 @@ static void _ae_update_state( struct gl_context *ctx ) check_vbo(actx, aa->array->BufferObj); aa++; } - for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { - struct gl_client_array *attribArray = &arrayObj->VertexAttrib[VERT_ATTRIB_TEX(i)]; + { + struct gl_client_array *attribArray = &arrayObj->VertexAttrib[VERT_ATTRIB_TEX]; if (attribArray->Enabled) { /* NOTE: we use generic glVertexAttribNV functions here. * If we ever remove GL_NV_vertex_program this will have to change. @@ -1521,59 +794,14 @@ static void _ae_update_state( struct gl_context *ctx ) at->func = AttribFuncsNV[at->array->Normalized] [at->array->Size-1] [TYPE_IDX(at->array->Type)]; - at->index = VERT_ATTRIB_TEX0 + i; - check_vbo(actx, at->array->BufferObj); - at++; - } - } - - /* generic vertex attribute arrays */ - for (i = 1; i < VERT_ATTRIB_GENERIC_MAX; i++) { /* skip zero! */ - struct gl_client_array *attribArray = &arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(i)]; - if (attribArray->Enabled) { - at->array = attribArray; - /* Note: we can't grab the _glapi_Dispatch->VertexAttrib1fvNV - * function pointer here (for float arrays) since the pointer may - * change from one execution of _ae_ArrayElement() to - * the next. Doing so caused UT to break. - */ - if (ctx->VertexProgram._Enabled - && ctx->VertexProgram.Current->IsNVProgram) { - at->func = AttribFuncsNV[at->array->Normalized] - [at->array->Size-1] - [TYPE_IDX(at->array->Type)]; - } - else { - GLint intOrNorm; - if (at->array->Integer) - intOrNorm = 2; - else if (at->array->Normalized) - intOrNorm = 1; - else - intOrNorm = 0; - - at->func = AttribFuncsARB[intOrNorm] - [at->array->Size-1] - [TYPE_IDX(at->array->Type)]; - } - at->index = i; - check_vbo(actx, at->array->BufferObj); + at->index = VERT_ATTRIB_TEX; + check_vbo(actx, at->array->BufferObj); at++; } } /* finally, vertex position */ - if (arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC0].Enabled) { - /* Use glVertex(v) instead of glVertexAttrib(0, v) to be sure it's - * issued as the last (provoking) attribute). - */ - aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC0]; - assert(aa->array->Size >= 2); /* XXX fix someday? */ - aa->offset = VertexFuncs[aa->array->Size-2][TYPE_IDX(aa->array->Type)]; - check_vbo(actx, aa->array->BufferObj); - aa++; - } - else if (arrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled) { + if (arrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled) { aa->array = &arrayObj->VertexAttrib[VERT_ATTRIB_POS]; aa->offset = VertexFuncs[aa->array->Size-2][TYPE_IDX(aa->array->Type)]; check_vbo(actx, aa->array->BufferObj); @@ -1643,14 +871,6 @@ void GLAPIENTRY _ae_ArrayElement( GLint elt ) const struct _glapi_table * const disp = GET_DISPATCH(); GLboolean do_map; - /* If PrimitiveRestart is enabled and the index is the RestartIndex - * then we call PrimitiveRestartNV and return. - */ - if (ctx->Array.PrimitiveRestart && (elt == ctx->Array.RestartIndex)) { - CALL_PrimitiveRestartNV((struct _glapi_table *)disp, ()); - return; - } - if (actx->NewState) { assert(!actx->mapped_vbos); _ae_update_state( ctx ); @@ -1698,7 +918,7 @@ void _ae_invalidate_state( struct gl_context *ctx, GLuint new_state ) * Luckily, neither the drivers nor tnl muck with the state that * concerns us here: */ - new_state &= _NEW_ARRAY | _NEW_PROGRAM; + new_state &= _NEW_ARRAY; if (new_state) { assert(!actx->mapped_vbos); actx->NewState |= new_state; diff --git a/dll/opengl/mesa/src/mesa/main/api_arrayelt.h b/dll/opengl/mesa/main/api_arrayelt.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/api_arrayelt.h rename to dll/opengl/mesa/main/api_arrayelt.h diff --git a/dll/opengl/mesa/src/mesa/main/api_exec.c b/dll/opengl/mesa/main/api_exec.c similarity index 57% rename from dll/opengl/mesa/src/mesa/main/api_exec.c rename to dll/opengl/mesa/main/api_exec.c index 605af381d7a..cb673769063 100644 --- a/dll/opengl/mesa/src/mesa/main/api_exec.c +++ b/dll/opengl/mesa/main/api_exec.c @@ -33,10 +33,6 @@ #include "accum.h" #include "api_loopback.h" #include "api_exec.h" -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program -#include "arbprogram.h" -#endif -#include "atifragshader.h" #include "attrib.h" #include "blend.h" #include "bufferobj.h" @@ -47,7 +43,6 @@ #include "clear.h" #include "clip.h" #include "colortab.h" -#include "condrender.h" #include "context.h" #include "convolve.h" #include "depth.h" @@ -59,9 +54,6 @@ #include "get.h" #include "feedback.h" #include "fog.h" -#if FEATURE_EXT_framebuffer_object -#include "fbobject.h" -#endif #include "framebuffer.h" #include "hint.h" #include "histogram.h" @@ -74,11 +66,7 @@ #include "pixelstore.h" #include "points.h" #include "polygon.h" -#include "queryobj.h" #include "readpix.h" -#if FEATURE_ARB_sampler_objects -#include "samplerobj.h" -#endif #include "scissor.h" #include "stencil.h" #include "texenv.h" @@ -90,18 +78,9 @@ #include "texstate.h" #include "texstorage.h" #include "texturebarrier.h" -#include "transformfeedback.h" #include "mtypes.h" #include "varray.h" #include "viewport.h" -#if FEATURE_NV_vertex_program || FEATURE_NV_fragment_program -#include "nvprogram.h" -#endif -#if FEATURE_ARB_shader_objects -#include "shaderapi.h" -#include "uniforms.h" -#endif -#include "syncobj.h" #include "main/dispatch.h" @@ -297,16 +276,6 @@ _mesa_create_exec_table(void) _mesa_init_convolve_dispatch(exec); _mesa_init_histogram_dispatch(exec); - /* OpenGL 2.0 */ - SET_StencilFuncSeparate(exec, _mesa_StencilFuncSeparate); - SET_StencilMaskSeparate(exec, _mesa_StencilMaskSeparate); - SET_StencilOpSeparate(exec, _mesa_StencilOpSeparate); - -#if FEATURE_ARB_shader_objects - _mesa_init_shader_dispatch(exec); - _mesa_init_shader_uniform_dispatch(exec); -#endif - /* 2. GL_EXT_blend_color */ #if 0 /* SET_BlendColorEXT(exec, _mesa_BlendColorEXT); */ @@ -364,31 +333,17 @@ _mesa_create_exec_table(void) SET_PointParameterfvEXT(exec, _mesa_PointParameterfv); #endif - /* 95. GL_ARB_ES2_compatibility */ - SET_ClearDepthf(exec, _mesa_ClearDepthf); - SET_DepthRangef(exec, _mesa_DepthRangef); - /* 97. GL_EXT_compiled_vertex_array */ #if _HAVE_FULL_GL SET_LockArraysEXT(exec, _mesa_LockArraysEXT); SET_UnlockArraysEXT(exec, _mesa_UnlockArraysEXT); #endif - /* 148. GL_EXT_multi_draw_arrays */ -#if _HAVE_FULL_GL - SET_MultiDrawArraysEXT(exec, _mesa_MultiDrawArraysEXT); -#endif - /* 173. GL_INGR_blend_func_separate */ #if _HAVE_FULL_GL SET_BlendFuncSeparateEXT(exec, _mesa_BlendFuncSeparateEXT); #endif - /* 196. GL_MESA_resize_buffers */ -#if _HAVE_FULL_GL - SET_ResizeBuffersMESA(exec, _mesa_ResizeBuffersMESA); -#endif - /* 197. GL_MESA_window_pos */ /* part of _mesa_init_rastpos_dispatch(exec); */ @@ -400,8 +355,6 @@ _mesa_create_exec_table(void) /* 233. GL_NV_vertex_program */ #if FEATURE_NV_vertex_program - SET_BindProgramNV(exec, _mesa_BindProgram); - SET_DeleteProgramsNV(exec, _mesa_DeletePrograms); SET_ExecuteProgramNV(exec, _mesa_ExecuteProgramNV); SET_GenProgramsNV(exec, _mesa_GenPrograms); SET_AreProgramsResidentNV(exec, _mesa_AreProgramsResidentNV); @@ -409,13 +362,7 @@ _mesa_create_exec_table(void) SET_GetProgramParameterfvNV(exec, _mesa_GetProgramParameterfvNV); SET_GetProgramParameterdvNV(exec, _mesa_GetProgramParameterdvNV); SET_GetProgramivNV(exec, _mesa_GetProgramivNV); - SET_GetProgramStringNV(exec, _mesa_GetProgramStringNV); SET_GetTrackMatrixivNV(exec, _mesa_GetTrackMatrixivNV); - SET_GetVertexAttribdvNV(exec, _mesa_GetVertexAttribdvNV); - SET_GetVertexAttribfvNV(exec, _mesa_GetVertexAttribfvNV); - SET_GetVertexAttribivNV(exec, _mesa_GetVertexAttribivNV); - SET_GetVertexAttribPointervNV(exec, _mesa_GetVertexAttribPointervNV); - SET_IsProgramNV(exec, _mesa_IsProgramARB); SET_LoadProgramNV(exec, _mesa_LoadProgramNV); SET_ProgramEnvParameter4dARB(exec, _mesa_ProgramEnvParameter4dARB); /* alias to ProgramParameter4dNV */ SET_ProgramEnvParameter4dvARB(exec, _mesa_ProgramEnvParameter4dvARB); /* alias to ProgramParameter4dvNV */ @@ -424,7 +371,6 @@ _mesa_create_exec_table(void) SET_ProgramParameters4dvNV(exec, _mesa_ProgramParameters4dvNV); SET_ProgramParameters4fvNV(exec, _mesa_ProgramParameters4fvNV); SET_TrackMatrixNV(exec, _mesa_TrackMatrixNV); - SET_VertexAttribPointerNV(exec, _mesa_VertexAttribPointerNV); /* glVertexAttrib*NV functions handled in api_loopback.c */ #endif @@ -442,12 +388,6 @@ _mesa_create_exec_table(void) SET_ProgramNamedParameter4dvNV(exec, _mesa_ProgramNamedParameter4dvNV); SET_GetProgramNamedParameterfvNV(exec, _mesa_GetProgramNamedParameterfvNV); SET_GetProgramNamedParameterdvNV(exec, _mesa_GetProgramNamedParameterdvNV); - SET_ProgramLocalParameter4dARB(exec, _mesa_ProgramLocalParameter4dARB); - SET_ProgramLocalParameter4dvARB(exec, _mesa_ProgramLocalParameter4dvARB); - SET_ProgramLocalParameter4fARB(exec, _mesa_ProgramLocalParameter4fARB); - SET_ProgramLocalParameter4fvARB(exec, _mesa_ProgramLocalParameter4fvARB); - SET_GetProgramLocalParameterdvARB(exec, _mesa_GetProgramLocalParameterdvARB); - SET_GetProgramLocalParameterfvARB(exec, _mesa_GetProgramLocalParameterfvARB); #endif /* 262. GL_NV_point_sprite */ @@ -456,30 +396,9 @@ _mesa_create_exec_table(void) SET_PointParameterivNV(exec, _mesa_PointParameteriv); #endif - /* 268. GL_EXT_stencil_two_side */ -#if _HAVE_FULL_GL - SET_ActiveStencilFaceEXT(exec, _mesa_ActiveStencilFaceEXT); -#endif - - /* 285. GL_NV_primitive_restart */ - SET_PrimitiveRestartIndexNV(exec, _mesa_PrimitiveRestartIndex); - /* ???. GL_EXT_depth_bounds_test */ SET_DepthBoundsEXT(exec, _mesa_DepthBoundsEXT); - /* 352. GL_EXT_transform_feedback */ - /* ARB 93. GL_ARB_transform_feedback2 */ - _mesa_init_transform_feedback_dispatch(exec); - - /* 364. GL_EXT_provoking_vertex */ - SET_ProvokingVertexEXT(exec, _mesa_ProvokingVertexEXT); - - /* ARB 1. GL_ARB_multitexture */ -#if _HAVE_FULL_GL - SET_ActiveTextureARB(exec, _mesa_ActiveTextureARB); - SET_ClientActiveTextureARB(exec, _mesa_ClientActiveTextureARB); -#endif - /* ARB 3. GL_ARB_transpose_matrix */ #if _HAVE_FULL_GL SET_LoadTransposeMatrixdARB(exec, _mesa_LoadTransposeMatrixdARB); @@ -493,90 +412,9 @@ _mesa_create_exec_table(void) SET_SampleCoverageARB(exec, _mesa_SampleCoverageARB); #endif - /* ARB 12. GL_ARB_texture_compression */ -#if _HAVE_FULL_GL - SET_CompressedTexImage3DARB(exec, _mesa_CompressedTexImage3DARB); - SET_CompressedTexImage2DARB(exec, _mesa_CompressedTexImage2DARB); - SET_CompressedTexImage1DARB(exec, _mesa_CompressedTexImage1DARB); - SET_CompressedTexSubImage3DARB(exec, _mesa_CompressedTexSubImage3DARB); - SET_CompressedTexSubImage2DARB(exec, _mesa_CompressedTexSubImage2DARB); - SET_CompressedTexSubImage1DARB(exec, _mesa_CompressedTexSubImage1DARB); - SET_GetCompressedTexImageARB(exec, _mesa_GetCompressedTexImageARB); - - /* ARB 104. GL_ARB_robustness */ - SET_GetnCompressedTexImageARB(exec, _mesa_GetnCompressedTexImageARB); -#endif - /* ARB 14. GL_ARB_point_parameters */ /* reuse EXT_point_parameters functions */ - /* ARB 26. GL_ARB_vertex_program */ - /* ARB 27. GL_ARB_fragment_program */ -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program - /* glVertexAttrib1sARB aliases glVertexAttrib1sNV */ - /* glVertexAttrib1fARB aliases glVertexAttrib1fNV */ - /* glVertexAttrib1dARB aliases glVertexAttrib1dNV */ - /* glVertexAttrib2sARB aliases glVertexAttrib2sNV */ - /* glVertexAttrib2fARB aliases glVertexAttrib2fNV */ - /* glVertexAttrib2dARB aliases glVertexAttrib2dNV */ - /* glVertexAttrib3sARB aliases glVertexAttrib3sNV */ - /* glVertexAttrib3fARB aliases glVertexAttrib3fNV */ - /* glVertexAttrib3dARB aliases glVertexAttrib3dNV */ - /* glVertexAttrib4sARB aliases glVertexAttrib4sNV */ - /* glVertexAttrib4fARB aliases glVertexAttrib4fNV */ - /* glVertexAttrib4dARB aliases glVertexAttrib4dNV */ - /* glVertexAttrib4NubARB aliases glVertexAttrib4NubNV */ - /* glVertexAttrib1svARB aliases glVertexAttrib1svNV */ - /* glVertexAttrib1fvARB aliases glVertexAttrib1fvNV */ - /* glVertexAttrib1dvARB aliases glVertexAttrib1dvNV */ - /* glVertexAttrib2svARB aliases glVertexAttrib2svNV */ - /* glVertexAttrib2fvARB aliases glVertexAttrib2fvNV */ - /* glVertexAttrib2dvARB aliases glVertexAttrib2dvNV */ - /* glVertexAttrib3svARB aliases glVertexAttrib3svNV */ - /* glVertexAttrib3fvARB aliases glVertexAttrib3fvNV */ - /* glVertexAttrib3dvARB aliases glVertexAttrib3dvNV */ - /* glVertexAttrib4svARB aliases glVertexAttrib4svNV */ - /* glVertexAttrib4fvARB aliases glVertexAttrib4fvNV */ - /* glVertexAttrib4dvARB aliases glVertexAttrib4dvNV */ - /* glVertexAttrib4NubvARB aliases glVertexAttrib4NubvNV */ - /* glVertexAttrib4bvARB handled in api_loopback.c */ - /* glVertexAttrib4ivARB handled in api_loopback.c */ - /* glVertexAttrib4ubvARB handled in api_loopback.c */ - /* glVertexAttrib4usvARB handled in api_loopback.c */ - /* glVertexAttrib4uivARB handled in api_loopback.c */ - /* glVertexAttrib4NbvARB handled in api_loopback.c */ - /* glVertexAttrib4NsvARB handled in api_loopback.c */ - /* glVertexAttrib4NivARB handled in api_loopback.c */ - /* glVertexAttrib4NusvARB handled in api_loopback.c */ - /* glVertexAttrib4NuivARB handled in api_loopback.c */ - SET_VertexAttribPointerARB(exec, _mesa_VertexAttribPointerARB); - SET_EnableVertexAttribArrayARB(exec, _mesa_EnableVertexAttribArrayARB); - SET_DisableVertexAttribArrayARB(exec, _mesa_DisableVertexAttribArrayARB); - SET_ProgramStringARB(exec, _mesa_ProgramStringARB); - /* glBindProgramARB aliases glBindProgramNV */ - /* glDeleteProgramsARB aliases glDeleteProgramsNV */ - /* glGenProgramsARB aliases glGenProgramsNV */ - /* glIsProgramARB aliases glIsProgramNV */ - SET_GetVertexAttribdvARB(exec, _mesa_GetVertexAttribdvARB); - SET_GetVertexAttribfvARB(exec, _mesa_GetVertexAttribfvARB); - SET_GetVertexAttribivARB(exec, _mesa_GetVertexAttribivARB); - /* glGetVertexAttribPointervARB aliases glGetVertexAttribPointervNV */ - SET_ProgramEnvParameter4dARB(exec, _mesa_ProgramEnvParameter4dARB); - SET_ProgramEnvParameter4dvARB(exec, _mesa_ProgramEnvParameter4dvARB); - SET_ProgramEnvParameter4fARB(exec, _mesa_ProgramEnvParameter4fARB); - SET_ProgramEnvParameter4fvARB(exec, _mesa_ProgramEnvParameter4fvARB); - SET_ProgramLocalParameter4dARB(exec, _mesa_ProgramLocalParameter4dARB); - SET_ProgramLocalParameter4dvARB(exec, _mesa_ProgramLocalParameter4dvARB); - SET_ProgramLocalParameter4fARB(exec, _mesa_ProgramLocalParameter4fARB); - SET_ProgramLocalParameter4fvARB(exec, _mesa_ProgramLocalParameter4fvARB); - SET_GetProgramEnvParameterdvARB(exec, _mesa_GetProgramEnvParameterdvARB); - SET_GetProgramEnvParameterfvARB(exec, _mesa_GetProgramEnvParameterfvARB); - SET_GetProgramLocalParameterdvARB(exec, _mesa_GetProgramLocalParameterdvARB); - SET_GetProgramLocalParameterfvARB(exec, _mesa_GetProgramLocalParameterfvARB); - SET_GetProgramivARB(exec, _mesa_GetProgramivARB); - SET_GetProgramStringARB(exec, _mesa_GetProgramStringARB); -#endif - /* ARB 28. GL_ARB_vertex_buffer_object */ SET_BindBufferARB(exec, _mesa_BindBufferARB); SET_BufferDataARB(exec, _mesa_BufferDataARB); @@ -590,119 +428,21 @@ _mesa_create_exec_table(void) SET_MapBufferARB(exec, _mesa_MapBufferARB); SET_UnmapBufferARB(exec, _mesa_UnmapBufferARB); - /* ARB 29. GL_ARB_occlusion_query */ - _mesa_init_queryobj_dispatch(exec); - - /* ARB 37. GL_ARB_draw_buffers */ -#if FEATURE_draw_read_buffer - SET_DrawBuffersARB(exec, _mesa_DrawBuffersARB); -#endif - - /* ARB 104. GL_ARB_robustness */ - SET_GetGraphicsResetStatusARB(exec, _mesa_GetGraphicsResetStatusARB); - SET_GetnPolygonStippleARB(exec, _mesa_GetnPolygonStippleARB); - SET_GetnTexImageARB(exec, _mesa_GetnTexImageARB); - SET_ReadnPixelsARB(exec, _mesa_ReadnPixelsARB); - - /* GL_ARB_sync */ - _mesa_init_sync_dispatch(exec); - - /* GL_ATI_fragment_shader */ - _mesa_init_ati_fragment_shader_dispatch(exec); - - /* GL_ATI_envmap_bumpmap */ - SET_GetTexBumpParameterivATI(exec, _mesa_GetTexBumpParameterivATI); - SET_GetTexBumpParameterfvATI(exec, _mesa_GetTexBumpParameterfvATI); - SET_TexBumpParameterivATI(exec, _mesa_TexBumpParameterivATI); - SET_TexBumpParameterfvATI(exec, _mesa_TexBumpParameterfvATI); - -#if FEATURE_EXT_framebuffer_object - SET_IsRenderbufferEXT(exec, _mesa_IsRenderbufferEXT); - SET_BindRenderbufferEXT(exec, _mesa_BindRenderbufferEXT); - SET_DeleteRenderbuffersEXT(exec, _mesa_DeleteRenderbuffersEXT); - SET_GenRenderbuffersEXT(exec, _mesa_GenRenderbuffersEXT); - SET_RenderbufferStorageEXT(exec, _mesa_RenderbufferStorageEXT); - SET_GetRenderbufferParameterivEXT(exec, _mesa_GetRenderbufferParameterivEXT); - SET_IsFramebufferEXT(exec, _mesa_IsFramebufferEXT); - SET_BindFramebufferEXT(exec, _mesa_BindFramebufferEXT); - SET_DeleteFramebuffersEXT(exec, _mesa_DeleteFramebuffersEXT); - SET_GenFramebuffersEXT(exec, _mesa_GenFramebuffersEXT); - SET_CheckFramebufferStatusEXT(exec, _mesa_CheckFramebufferStatusEXT); - SET_FramebufferTexture1DEXT(exec, _mesa_FramebufferTexture1DEXT); - SET_FramebufferTexture2DEXT(exec, _mesa_FramebufferTexture2DEXT); - SET_FramebufferTexture3DEXT(exec, _mesa_FramebufferTexture3DEXT); - SET_FramebufferRenderbufferEXT(exec, _mesa_FramebufferRenderbufferEXT); - SET_GetFramebufferAttachmentParameterivEXT(exec, _mesa_GetFramebufferAttachmentParameterivEXT); - SET_GenerateMipmapEXT(exec, _mesa_GenerateMipmapEXT); -#endif - -#if FEATURE_EXT_framebuffer_blit - SET_BlitFramebufferEXT(exec, _mesa_BlitFramebufferEXT); -#endif - - /* GL_EXT_gpu_program_parameters */ -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program - SET_ProgramEnvParameters4fvEXT(exec, _mesa_ProgramEnvParameters4fvEXT); - SET_ProgramLocalParameters4fvEXT(exec, _mesa_ProgramLocalParameters4fvEXT); -#endif - - /* GL_MESA_texture_array / GL_EXT_texture_array */ -#if FEATURE_EXT_framebuffer_object - SET_FramebufferTextureLayerEXT(exec, _mesa_FramebufferTextureLayerEXT); -#endif - - /* GL_ATI_separate_stencil */ - SET_StencilFuncSeparateATI(exec, _mesa_StencilFuncSeparateATI); - -#if FEATURE_ARB_framebuffer_object - /* The ARB_fbo functions are the union of - * GL_EXT_fbo, GL_EXT_framebuffer_blit, GL_EXT_texture_array - */ - SET_RenderbufferStorageMultisample(exec, _mesa_RenderbufferStorageMultisample); -#endif - #if FEATURE_ARB_map_buffer_range SET_MapBufferRange(exec, _mesa_MapBufferRange); SET_FlushMappedBufferRange(exec, _mesa_FlushMappedBufferRange); #endif - /* GL_ARB_copy_buffer */ - SET_CopyBufferSubData(exec, _mesa_CopyBufferSubData); - /* GL_ARB_vertex_array_object */ SET_BindVertexArray(exec, _mesa_BindVertexArray); SET_GenVertexArrays(exec, _mesa_GenVertexArrays); - /* GL_EXT_draw_buffers2 */ - SET_ColorMaskIndexedEXT(exec, _mesa_ColorMaskIndexed); - SET_GetBooleanIndexedvEXT(exec, _mesa_GetBooleanIndexedv); - SET_GetIntegerIndexedvEXT(exec, _mesa_GetIntegerIndexedv); - SET_EnableIndexedEXT(exec, _mesa_EnableIndexed); - SET_DisableIndexedEXT(exec, _mesa_DisableIndexed); - SET_IsEnabledIndexedEXT(exec, _mesa_IsEnabledIndexed); - - /* GL_NV_conditional_render */ - SET_BeginConditionalRenderNV(exec, _mesa_BeginConditionalRender); - SET_EndConditionalRenderNV(exec, _mesa_EndConditionalRender); - -#if FEATURE_OES_EGL_image - SET_EGLImageTargetTexture2DOES(exec, _mesa_EGLImageTargetTexture2DOES); - SET_EGLImageTargetRenderbufferStorageOES(exec, _mesa_EGLImageTargetRenderbufferStorageOES); -#endif - #if FEATURE_APPLE_object_purgeable SET_ObjectPurgeableAPPLE(exec, _mesa_ObjectPurgeableAPPLE); SET_ObjectUnpurgeableAPPLE(exec, _mesa_ObjectUnpurgeableAPPLE); SET_GetObjectParameterivAPPLE(exec, _mesa_GetObjectParameterivAPPLE); #endif -#if FEATURE_ARB_geometry_shader4 - SET_FramebufferTextureARB(exec, _mesa_FramebufferTextureARB); - SET_FramebufferTextureFaceARB(exec, _mesa_FramebufferTextureFaceARB); -#endif - - SET_ClampColorARB(exec, _mesa_ClampColorARB); - /* GL_EXT_texture_integer */ SET_ClearColorIiEXT(exec, _mesa_ClearColorIiEXT); SET_ClearColorIuiEXT(exec, _mesa_ClearColorIuiEXT); @@ -711,33 +451,11 @@ _mesa_create_exec_table(void) SET_TexParameterIivEXT(exec, _mesa_TexParameterIiv); SET_TexParameterIuivEXT(exec, _mesa_TexParameterIuiv); - /* GL_EXT_gpu_shader4 / OpenGL 3.0 */ - SET_GetVertexAttribIivEXT(exec, _mesa_GetVertexAttribIiv); - SET_GetVertexAttribIuivEXT(exec, _mesa_GetVertexAttribIuiv); - SET_VertexAttribIPointerEXT(exec, _mesa_VertexAttribIPointer); - /* GL 3.0 (functions not covered by other extensions) */ - SET_ClearBufferiv(exec, _mesa_ClearBufferiv); - SET_ClearBufferuiv(exec, _mesa_ClearBufferuiv); - SET_ClearBufferfv(exec, _mesa_ClearBufferfv); - SET_ClearBufferfi(exec, _mesa_ClearBufferfi); SET_GetStringi(exec, _mesa_GetStringi); - SET_ClampColor(exec, _mesa_ClampColorARB); - - /* GL_ARB_instanced_arrays */ - SET_VertexAttribDivisorARB(exec, _mesa_VertexAttribDivisor); - - /* GL_ARB_draw_buffer_blend */ - SET_BlendFunciARB(exec, _mesa_BlendFunci); - SET_BlendFuncSeparateiARB(exec, _mesa_BlendFuncSeparatei); - SET_BlendEquationiARB(exec, _mesa_BlendEquationi); - SET_BlendEquationSeparateiARB(exec, _mesa_BlendEquationSeparatei); /* GL_NV_texture_barrier */ SET_TextureBarrierNV(exec, _mesa_TextureBarrierNV); - - /* GL_ARB_texture_buffer_object */ - SET_TexBufferARB(exec, _mesa_TexBuffer); /* GL_ARB_texture_storage */ SET_TexStorage1D(exec, _mesa_TexStorage1D); @@ -747,10 +465,6 @@ _mesa_create_exec_table(void) SET_TextureStorage2DEXT(exec, _mesa_TextureStorage2DEXT); SET_TextureStorage3DEXT(exec, _mesa_TextureStorage3DEXT); -#if FEATURE_ARB_sampler_objects - _mesa_init_sampler_object_dispatch(exec); -#endif - return exec; } diff --git a/dll/opengl/mesa/src/mesa/main/api_exec.h b/dll/opengl/mesa/main/api_exec.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/api_exec.h rename to dll/opengl/mesa/main/api_exec.h diff --git a/dll/opengl/mesa/src/mesa/main/api_loopback.c b/dll/opengl/mesa/main/api_loopback.c similarity index 70% rename from dll/opengl/mesa/src/mesa/main/api_loopback.c rename to dll/opengl/mesa/main/api_loopback.c index c438307d84c..1aa232a691f 100644 --- a/dll/opengl/mesa/src/mesa/main/api_loopback.c +++ b/dll/opengl/mesa/main/api_loopback.c @@ -33,8 +33,6 @@ #include "macros.h" #include "api_loopback.h" #include "mtypes.h" -#include "glapi/glapi.h" -#include "glapi/glthread.h" #include "main/dispatch.h" #include "mfeatures.h" @@ -57,10 +55,6 @@ #define TEXCOORD3(s,t,u) CALL_TexCoord3f(GET_DISPATCH(), (s,t,u)) #define TEXCOORD4(s,t,u,v) CALL_TexCoord4f(GET_DISPATCH(), (s,t,u,v)) #define INDEX(c) CALL_Indexf(GET_DISPATCH(), (c)) -#define MULTI_TEXCOORD1(z,s) CALL_MultiTexCoord1fARB(GET_DISPATCH(), (z,s)) -#define MULTI_TEXCOORD2(z,s,t) CALL_MultiTexCoord2fARB(GET_DISPATCH(), (z,s,t)) -#define MULTI_TEXCOORD3(z,s,t,u) CALL_MultiTexCoord3fARB(GET_DISPATCH(), (z,s,t,u)) -#define MULTI_TEXCOORD4(z,s,t,u,v) CALL_MultiTexCoord4fARB(GET_DISPATCH(), (z,s,t,u,v)) #define EVALCOORD1(x) CALL_EvalCoord1f(GET_DISPATCH(), (x)) #define EVALCOORD2(x,y) CALL_EvalCoord2f(GET_DISPATCH(), (x,y)) #define MATERIALFV(a,b,c) CALL_Materialfv(GET_DISPATCH(), (a,b,c)) @@ -74,17 +68,6 @@ #define ATTRIB3NV(index,x,y,z) CALL_VertexAttrib3fNV(GET_DISPATCH(), (index,x,y,z)) #define ATTRIB4NV(index,x,y,z,w) CALL_VertexAttrib4fNV(GET_DISPATCH(), (index,x,y,z,w)) -#define ATTRIB1ARB(index,x) CALL_VertexAttrib1fARB(GET_DISPATCH(), (index,x)) -#define ATTRIB2ARB(index,x,y) CALL_VertexAttrib2fARB(GET_DISPATCH(), (index,x,y)) -#define ATTRIB3ARB(index,x,y,z) CALL_VertexAttrib3fARB(GET_DISPATCH(), (index,x,y,z)) -#define ATTRIB4ARB(index,x,y,z,w) CALL_VertexAttrib4fARB(GET_DISPATCH(), (index,x,y,z,w)) - -#define ATTRIBI_1I(index,x) CALL_VertexAttribI1iEXT(GET_DISPATCH(), (index,x)) -#define ATTRIBI_1UI(index,x) CALL_VertexAttribI1uiEXT(GET_DISPATCH(), (index,x)) -#define ATTRIBI_4I(index,x,y,z,w) CALL_VertexAttribI4iEXT(GET_DISPATCH(), (index,x,y,z,w)) - -#define ATTRIBI_4UI(index,x,y,z,w) CALL_VertexAttribI4uiEXT(GET_DISPATCH(), (index,x,y,z,w)) - #if FEATURE_beginend @@ -665,156 +648,6 @@ loopback_Vertex4sv( const GLshort *v ) (GLfloat) v[2], (GLfloat) v[3] ); } -static void GLAPIENTRY -loopback_MultiTexCoord1dARB(GLenum target, GLdouble s) -{ - MULTI_TEXCOORD1( target, (GLfloat) s ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord1dvARB(GLenum target, const GLdouble *v) -{ - MULTI_TEXCOORD1( target, (GLfloat) v[0] ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord1iARB(GLenum target, GLint s) -{ - MULTI_TEXCOORD1( target, (GLfloat) s ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord1ivARB(GLenum target, const GLint *v) -{ - MULTI_TEXCOORD1( target, (GLfloat) v[0] ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord1sARB(GLenum target, GLshort s) -{ - MULTI_TEXCOORD1( target, (GLfloat) s ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord1svARB(GLenum target, const GLshort *v) -{ - MULTI_TEXCOORD1( target, (GLfloat) v[0] ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t) -{ - MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord2dvARB(GLenum target, const GLdouble *v) -{ - MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord2iARB(GLenum target, GLint s, GLint t) -{ - MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord2ivARB(GLenum target, const GLint *v) -{ - MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord2sARB(GLenum target, GLshort s, GLshort t) -{ - MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord2svARB(GLenum target, const GLshort *v) -{ - MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r) -{ - MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord3dvARB(GLenum target, const GLdouble *v) -{ - MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r) -{ - MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord3ivARB(GLenum target, const GLint *v) -{ - MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r) -{ - MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord3svARB(GLenum target, const GLshort *v) -{ - MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) -{ - MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t, - (GLfloat) r, (GLfloat) q ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord4dvARB(GLenum target, const GLdouble *v) -{ - MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1], - (GLfloat) v[2], (GLfloat) v[3] ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q) -{ - MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t, - (GLfloat) r, (GLfloat) q ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord4ivARB(GLenum target, const GLint *v) -{ - MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1], - (GLfloat) v[2], (GLfloat) v[3] ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) -{ - MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t, - (GLfloat) r, (GLfloat) q ); -} - -static void GLAPIENTRY -loopback_MultiTexCoord4svARB(GLenum target, const GLshort *v) -{ - MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1], - (GLfloat) v[2], (GLfloat) v[3] ); -} - static void GLAPIENTRY loopback_EvalCoord2dv( const GLdouble *u ) { @@ -1269,232 +1102,6 @@ loopback_VertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte *v) } -/* - * GL_ARB_vertex_program - * Always loop-back to one of the VertexAttrib[1234]f[v]ARB functions. - * Note that attribute indexes do NOT alias conventional attributes. - */ - -static void GLAPIENTRY -loopback_VertexAttrib1sARB(GLuint index, GLshort x) -{ - ATTRIB1ARB(index, (GLfloat) x); -} - -static void GLAPIENTRY -loopback_VertexAttrib1dARB(GLuint index, GLdouble x) -{ - ATTRIB1ARB(index, (GLfloat) x); -} - -static void GLAPIENTRY -loopback_VertexAttrib2sARB(GLuint index, GLshort x, GLshort y) -{ - ATTRIB2ARB(index, (GLfloat) x, y); -} - -static void GLAPIENTRY -loopback_VertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y) -{ - ATTRIB2ARB(index, (GLfloat) x, (GLfloat) y); -} - -static void GLAPIENTRY -loopback_VertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z) -{ - ATTRIB3ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z); -} - -static void GLAPIENTRY -loopback_VertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z) -{ - ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F); -} - -static void GLAPIENTRY -loopback_VertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) -{ - ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); -} - -static void GLAPIENTRY -loopback_VertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - ATTRIB4ARB(index, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w); -} - -static void GLAPIENTRY -loopback_VertexAttrib1svARB(GLuint index, const GLshort *v) -{ - ATTRIB1ARB(index, (GLfloat) v[0]); -} - -static void GLAPIENTRY -loopback_VertexAttrib1dvARB(GLuint index, const GLdouble *v) -{ - ATTRIB1ARB(index, (GLfloat) v[0]); -} - -static void GLAPIENTRY -loopback_VertexAttrib2svARB(GLuint index, const GLshort *v) -{ - ATTRIB2ARB(index, (GLfloat) v[0], (GLfloat) v[1]); -} - -static void GLAPIENTRY -loopback_VertexAttrib2dvARB(GLuint index, const GLdouble *v) -{ - ATTRIB2ARB(index, (GLfloat) v[0], (GLfloat) v[1]); -} - -static void GLAPIENTRY -loopback_VertexAttrib3svARB(GLuint index, const GLshort *v) -{ - ATTRIB3ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]); -} - -static void GLAPIENTRY -loopback_VertexAttrib3dvARB(GLuint index, const GLdouble *v) -{ - ATTRIB3ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2]); -} - -static void GLAPIENTRY -loopback_VertexAttrib4svARB(GLuint index, const GLshort *v) -{ - ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], - (GLfloat)v[3]); -} - -static void GLAPIENTRY -loopback_VertexAttrib4dvARB(GLuint index, const GLdouble *v) -{ - ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); -} - -static void GLAPIENTRY -loopback_VertexAttrib4bvARB(GLuint index, const GLbyte * v) -{ - ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); -} - -static void GLAPIENTRY -loopback_VertexAttrib4ivARB(GLuint index, const GLint * v) -{ - ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); -} - -static void GLAPIENTRY -loopback_VertexAttrib4ubvARB(GLuint index, const GLubyte * v) -{ - ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); -} - -static void GLAPIENTRY -loopback_VertexAttrib4usvARB(GLuint index, const GLushort * v) -{ - ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); -} - -static void GLAPIENTRY -loopback_VertexAttrib4uivARB(GLuint index, const GLuint * v) -{ - ATTRIB4ARB(index, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); -} - -static void GLAPIENTRY -loopback_VertexAttrib4NbvARB(GLuint index, const GLbyte * v) -{ - ATTRIB4ARB(index, BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), - BYTE_TO_FLOAT(v[2]), BYTE_TO_FLOAT(v[3])); -} - -static void GLAPIENTRY -loopback_VertexAttrib4NsvARB(GLuint index, const GLshort * v) -{ - ATTRIB4ARB(index, SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), - SHORT_TO_FLOAT(v[2]), SHORT_TO_FLOAT(v[3])); -} - -static void GLAPIENTRY -loopback_VertexAttrib4NivARB(GLuint index, const GLint * v) -{ - ATTRIB4ARB(index, INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), - INT_TO_FLOAT(v[2]), INT_TO_FLOAT(v[3])); -} - -static void GLAPIENTRY -loopback_VertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) -{ - ATTRIB4ARB(index, UBYTE_TO_FLOAT(x), UBYTE_TO_FLOAT(y), - UBYTE_TO_FLOAT(z), UBYTE_TO_FLOAT(w)); -} - -static void GLAPIENTRY -loopback_VertexAttrib4NubvARB(GLuint index, const GLubyte * v) -{ - ATTRIB4ARB(index, UBYTE_TO_FLOAT(v[0]), UBYTE_TO_FLOAT(v[1]), - UBYTE_TO_FLOAT(v[2]), UBYTE_TO_FLOAT(v[3])); -} - -static void GLAPIENTRY -loopback_VertexAttrib4NusvARB(GLuint index, const GLushort * v) -{ - ATTRIB4ARB(index, USHORT_TO_FLOAT(v[0]), USHORT_TO_FLOAT(v[1]), - USHORT_TO_FLOAT(v[2]), USHORT_TO_FLOAT(v[3])); -} - -static void GLAPIENTRY -loopback_VertexAttrib4NuivARB(GLuint index, const GLuint * v) -{ - ATTRIB4ARB(index, UINT_TO_FLOAT(v[0]), UINT_TO_FLOAT(v[1]), - UINT_TO_FLOAT(v[2]), UINT_TO_FLOAT(v[3])); -} - - - -/** - * GL_EXT_gpu_shader / GL 3.0 signed/unsigned integer-valued attributes. - * Note that attribute indexes do NOT alias conventional attributes. - */ - -static void GLAPIENTRY -loopback_VertexAttribI1iv(GLuint index, const GLint *v) -{ - ATTRIBI_1I(index, v[0]); -} - -static void GLAPIENTRY -loopback_VertexAttribI1uiv(GLuint index, const GLuint *v) -{ - ATTRIBI_1UI(index, v[0]); -} - -static void GLAPIENTRY -loopback_VertexAttribI4bv(GLuint index, const GLbyte *v) -{ - ATTRIBI_4I(index, v[0], v[1], v[2], v[3]); -} - -static void GLAPIENTRY -loopback_VertexAttribI4sv(GLuint index, const GLshort *v) -{ - ATTRIBI_4I(index, v[0], v[1], v[2], v[3]); -} - -static void GLAPIENTRY -loopback_VertexAttribI4ubv(GLuint index, const GLubyte *v) -{ - ATTRIBI_4UI(index, v[0], v[1], v[2], v[3]); -} - -static void GLAPIENTRY -loopback_VertexAttribI4usv(GLuint index, const GLushort *v) -{ - ATTRIBI_4UI(index, v[0], v[1], v[2], v[3]); -} - - /* @@ -1608,30 +1215,6 @@ _mesa_loopback_init_api_table( struct _glapi_table *dest ) SET_Vertex4dv(dest, loopback_Vertex4dv); SET_Vertex4iv(dest, loopback_Vertex4iv); SET_Vertex4sv(dest, loopback_Vertex4sv); - SET_MultiTexCoord1dARB(dest, loopback_MultiTexCoord1dARB); - SET_MultiTexCoord1dvARB(dest, loopback_MultiTexCoord1dvARB); - SET_MultiTexCoord1iARB(dest, loopback_MultiTexCoord1iARB); - SET_MultiTexCoord1ivARB(dest, loopback_MultiTexCoord1ivARB); - SET_MultiTexCoord1sARB(dest, loopback_MultiTexCoord1sARB); - SET_MultiTexCoord1svARB(dest, loopback_MultiTexCoord1svARB); - SET_MultiTexCoord2dARB(dest, loopback_MultiTexCoord2dARB); - SET_MultiTexCoord2dvARB(dest, loopback_MultiTexCoord2dvARB); - SET_MultiTexCoord2iARB(dest, loopback_MultiTexCoord2iARB); - SET_MultiTexCoord2ivARB(dest, loopback_MultiTexCoord2ivARB); - SET_MultiTexCoord2sARB(dest, loopback_MultiTexCoord2sARB); - SET_MultiTexCoord2svARB(dest, loopback_MultiTexCoord2svARB); - SET_MultiTexCoord3dARB(dest, loopback_MultiTexCoord3dARB); - SET_MultiTexCoord3dvARB(dest, loopback_MultiTexCoord3dvARB); - SET_MultiTexCoord3iARB(dest, loopback_MultiTexCoord3iARB); - SET_MultiTexCoord3ivARB(dest, loopback_MultiTexCoord3ivARB); - SET_MultiTexCoord3sARB(dest, loopback_MultiTexCoord3sARB); - SET_MultiTexCoord3svARB(dest, loopback_MultiTexCoord3svARB); - SET_MultiTexCoord4dARB(dest, loopback_MultiTexCoord4dARB); - SET_MultiTexCoord4dvARB(dest, loopback_MultiTexCoord4dvARB); - SET_MultiTexCoord4iARB(dest, loopback_MultiTexCoord4iARB); - SET_MultiTexCoord4ivARB(dest, loopback_MultiTexCoord4ivARB); - SET_MultiTexCoord4sARB(dest, loopback_MultiTexCoord4sARB); - SET_MultiTexCoord4svARB(dest, loopback_MultiTexCoord4svARB); SET_EvalCoord2dv(dest, loopback_EvalCoord2dv); SET_EvalCoord2fv(dest, loopback_EvalCoord2fv); SET_EvalCoord2d(dest, loopback_EvalCoord2d); @@ -1682,43 +1265,6 @@ _mesa_loopback_init_api_table( struct _glapi_table *dest ) SET_VertexAttribs4fvNV(dest, loopback_VertexAttribs4fvNV); SET_VertexAttribs4dvNV(dest, loopback_VertexAttribs4dvNV); SET_VertexAttribs4ubvNV(dest, loopback_VertexAttribs4ubvNV); - - SET_VertexAttrib1sARB(dest, loopback_VertexAttrib1sARB); - SET_VertexAttrib1dARB(dest, loopback_VertexAttrib1dARB); - SET_VertexAttrib2sARB(dest, loopback_VertexAttrib2sARB); - SET_VertexAttrib2dARB(dest, loopback_VertexAttrib2dARB); - SET_VertexAttrib3sARB(dest, loopback_VertexAttrib3sARB); - SET_VertexAttrib3dARB(dest, loopback_VertexAttrib3dARB); - SET_VertexAttrib4sARB(dest, loopback_VertexAttrib4sARB); - SET_VertexAttrib4dARB(dest, loopback_VertexAttrib4dARB); - SET_VertexAttrib1svARB(dest, loopback_VertexAttrib1svARB); - SET_VertexAttrib1dvARB(dest, loopback_VertexAttrib1dvARB); - SET_VertexAttrib2svARB(dest, loopback_VertexAttrib2svARB); - SET_VertexAttrib2dvARB(dest, loopback_VertexAttrib2dvARB); - SET_VertexAttrib3svARB(dest, loopback_VertexAttrib3svARB); - SET_VertexAttrib3dvARB(dest, loopback_VertexAttrib3dvARB); - SET_VertexAttrib4svARB(dest, loopback_VertexAttrib4svARB); - SET_VertexAttrib4dvARB(dest, loopback_VertexAttrib4dvARB); - SET_VertexAttrib4NubARB(dest, loopback_VertexAttrib4NubARB); - SET_VertexAttrib4NubvARB(dest, loopback_VertexAttrib4NubvARB); - SET_VertexAttrib4bvARB(dest, loopback_VertexAttrib4bvARB); - SET_VertexAttrib4ivARB(dest, loopback_VertexAttrib4ivARB); - SET_VertexAttrib4ubvARB(dest, loopback_VertexAttrib4ubvARB); - SET_VertexAttrib4usvARB(dest, loopback_VertexAttrib4usvARB); - SET_VertexAttrib4uivARB(dest, loopback_VertexAttrib4uivARB); - SET_VertexAttrib4NbvARB(dest, loopback_VertexAttrib4NbvARB); - SET_VertexAttrib4NsvARB(dest, loopback_VertexAttrib4NsvARB); - SET_VertexAttrib4NivARB(dest, loopback_VertexAttrib4NivARB); - SET_VertexAttrib4NusvARB(dest, loopback_VertexAttrib4NusvARB); - SET_VertexAttrib4NuivARB(dest, loopback_VertexAttrib4NuivARB); - - /* GL_EXT_gpu_shader4, GL 3.0 */ - SET_VertexAttribI1ivEXT(dest, loopback_VertexAttribI1iv); - SET_VertexAttribI1uivEXT(dest, loopback_VertexAttribI1uiv); - SET_VertexAttribI4bvEXT(dest, loopback_VertexAttribI4bv); - SET_VertexAttribI4svEXT(dest, loopback_VertexAttribI4sv); - SET_VertexAttribI4ubvEXT(dest, loopback_VertexAttribI4ubv); - SET_VertexAttribI4usvEXT(dest, loopback_VertexAttribI4usv); } diff --git a/dll/opengl/mesa/src/mesa/main/api_loopback.h b/dll/opengl/mesa/main/api_loopback.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/api_loopback.h rename to dll/opengl/mesa/main/api_loopback.h diff --git a/dll/opengl/mesa/src/mesa/main/api_validate.c b/dll/opengl/mesa/main/api_validate.c similarity index 59% rename from dll/opengl/mesa/src/mesa/main/api_validate.c rename to dll/opengl/mesa/main/api_validate.c index d1af2be6895..d1ac93b647e 100644 --- a/dll/opengl/mesa/src/mesa/main/api_validate.c +++ b/dll/opengl/mesa/main/api_validate.c @@ -106,54 +106,10 @@ check_valid_to_render(struct gl_context *ctx, const char *function) return GL_FALSE; } - switch (ctx->API) { -#if FEATURE_es2_glsl - case API_OPENGLES2: - /* For ES2, we can draw if any vertex array is enabled (and we - * should always have a vertex program/shader). */ - if (ctx->Array.ArrayObj->_Enabled == 0x0 || !ctx->VertexProgram._Current) - return GL_FALSE; - break; -#endif - -#if FEATURE_ES1 - case API_OPENGLES: - /* For OpenGL ES, only draw if we have vertex positions - */ - if (!ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled) - return GL_FALSE; - break; -#endif - -#if FEATURE_GL - case API_OPENGL: - { - const struct gl_shader_program *vsProg = - ctx->Shader.CurrentVertexProgram; - GLboolean haveVertexShader = (vsProg && vsProg->LinkStatus); - GLboolean haveVertexProgram = ctx->VertexProgram._Enabled; - if (haveVertexShader || haveVertexProgram) { - /* Draw regardless of whether or not we have any vertex arrays. - * (Ex: could draw a point using a constant vertex pos) - */ - return GL_TRUE; - } - else { - /* Draw if we have vertex positions (GL_VERTEX_ARRAY or generic - * array [0]). - */ - return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled || - ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC0].Enabled); - } - } - break; -#endif - - default: - ASSERT_NO_FEATURE(); - } - - return GL_TRUE; + /* Draw if we have vertex positions (GL_VERTEX_ARRAY or generic + * array [0]). + */ + return ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled; } @@ -164,7 +120,7 @@ check_valid_to_render(struct gl_context *ctx, const char *function) */ static GLboolean check_index_bounds(struct gl_context *ctx, GLsizei count, GLenum type, - const GLvoid *indices, GLint basevertex) + const GLvoid *indices) { struct _mesa_prim prim; struct _mesa_index_buffer ib; @@ -186,8 +142,7 @@ check_index_bounds(struct gl_context *ctx, GLsizei count, GLenum type, vbo_get_minmax_index(ctx, &prim, &ib, &min, &max); - if ((int)(min + basevertex) < 0 || - max + basevertex >= ctx->Array.ArrayObj->_MaxElement) { + if (max >= ctx->Array.ArrayObj->_MaxElement) { /* the max element is out of bounds of one or more enabled arrays */ _mesa_warning(ctx, "glDrawElements() index=%u is out of bounds (max=%u)", max, ctx->Array.ArrayObj->_MaxElement); @@ -206,11 +161,7 @@ check_index_bounds(struct gl_context *ctx, GLsizei count, GLenum type, GLboolean _mesa_valid_prim_mode(const struct gl_context *ctx, GLenum mode) { - if (ctx->Extensions.ARB_geometry_shader4 && - mode > GL_TRIANGLE_STRIP_ADJACENCY_ARB) { - return GL_FALSE; - } - else if (mode > GL_POLYGON) { + if (mode > GL_POLYGON) { return GL_FALSE; } else { @@ -227,7 +178,7 @@ _mesa_valid_prim_mode(const struct gl_context *ctx, GLenum mode) GLboolean _mesa_validate_DrawElements(struct gl_context *ctx, GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices, GLint basevertex) + const GLvoid *indices) { ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); @@ -268,7 +219,7 @@ _mesa_validate_DrawElements(struct gl_context *ctx, return GL_FALSE; } - if (!check_index_bounds(ctx, count, type, indices, basevertex)) + if (!check_index_bounds(ctx, count, type, indices)) return GL_FALSE; return GL_TRUE; @@ -284,7 +235,7 @@ GLboolean _mesa_validate_DrawRangeElements(struct gl_context *ctx, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, - const GLvoid *indices, GLint basevertex) + const GLvoid *indices) { ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); @@ -329,7 +280,7 @@ _mesa_validate_DrawRangeElements(struct gl_context *ctx, GLenum mode, return GL_FALSE; } - if (!check_index_bounds(ctx, count, type, indices, basevertex)) + if (!check_index_bounds(ctx, count, type, indices)) return GL_FALSE; return GL_TRUE; @@ -368,143 +319,3 @@ _mesa_validate_DrawArrays(struct gl_context *ctx, return GL_TRUE; } - - -GLboolean -_mesa_validate_DrawArraysInstanced(struct gl_context *ctx, GLenum mode, GLint first, - GLsizei count, GLsizei numInstances) -{ - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - - if (count <= 0) { - if (count < 0) - _mesa_error(ctx, GL_INVALID_VALUE, - "glDrawArraysInstanced(count=%d)", count); - return GL_FALSE; - } - - if (first < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glDrawArraysInstanced(start=%d)", first); - return GL_FALSE; - } - - if (!_mesa_valid_prim_mode(ctx, mode)) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glDrawArraysInstanced(mode=0x%x)", mode); - return GL_FALSE; - } - - if (numInstances <= 0) { - if (numInstances < 0) - _mesa_error(ctx, GL_INVALID_VALUE, - "glDrawArraysInstanced(numInstances=%d)", numInstances); - return GL_FALSE; - } - - if (!check_valid_to_render(ctx, "glDrawArraysInstanced(invalid to render)")) - return GL_FALSE; - - if (ctx->Const.CheckArrayBounds) { - if (first + count > (GLint) ctx->Array.ArrayObj->_MaxElement) - return GL_FALSE; - } - - return GL_TRUE; -} - - -GLboolean -_mesa_validate_DrawElementsInstanced(struct gl_context *ctx, - GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices, GLsizei numInstances, - GLint basevertex) -{ - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - - if (count <= 0) { - if (count < 0) - _mesa_error(ctx, GL_INVALID_VALUE, - "glDrawElementsInstanced(count=%d)", count); - return GL_FALSE; - } - - if (!_mesa_valid_prim_mode(ctx, mode)) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glDrawElementsInstanced(mode = 0x%x)", mode); - return GL_FALSE; - } - - if (type != GL_UNSIGNED_INT && - type != GL_UNSIGNED_BYTE && - type != GL_UNSIGNED_SHORT) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glDrawElementsInstanced(type=0x%x)", type); - return GL_FALSE; - } - - if (numInstances <= 0) { - if (numInstances < 0) - _mesa_error(ctx, GL_INVALID_VALUE, - "glDrawElementsInstanced(numInstances=%d)", numInstances); - return GL_FALSE; - } - - if (!check_valid_to_render(ctx, "glDrawElementsInstanced")) - return GL_FALSE; - - /* Vertex buffer object tests */ - if (_mesa_is_bufferobj(ctx->Array.ArrayObj->ElementArrayBufferObj)) { - /* use indices in the buffer object */ - /* make sure count doesn't go outside buffer bounds */ - if (index_bytes(type, count) > ctx->Array.ArrayObj->ElementArrayBufferObj->Size) { - _mesa_warning(ctx, - "glDrawElementsInstanced index out of buffer bounds"); - return GL_FALSE; - } - } - else { - /* not using a VBO */ - if (!indices) - return GL_FALSE; - } - - if (!check_index_bounds(ctx, count, type, indices, basevertex)) - return GL_FALSE; - - return GL_TRUE; -} - - -#if FEATURE_EXT_transform_feedback - -GLboolean -_mesa_validate_DrawTransformFeedback(struct gl_context *ctx, - GLenum mode, - struct gl_transform_feedback_object *obj) -{ - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - - if (!_mesa_valid_prim_mode(ctx, mode)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glDrawTransformFeedback(mode)"); - return GL_FALSE; - } - - if (!obj) { - _mesa_error(ctx, GL_INVALID_VALUE, "glDrawTransformFeedback(name)"); - return GL_FALSE; - } - - if (!obj->EndedAnytime) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawTransformFeedback"); - return GL_FALSE; - } - - if (!check_valid_to_render(ctx, "glDrawTransformFeedback")) { - return GL_FALSE; - } - - return GL_TRUE; -} - -#endif diff --git a/dll/opengl/mesa/src/mesa/main/api_validate.h b/dll/opengl/mesa/main/api_validate.h similarity index 71% rename from dll/opengl/mesa/src/mesa/main/api_validate.h rename to dll/opengl/mesa/main/api_validate.h index f4948424c36..ea7cc25d61c 100644 --- a/dll/opengl/mesa/src/mesa/main/api_validate.h +++ b/dll/opengl/mesa/main/api_validate.h @@ -53,32 +53,12 @@ _mesa_validate_DrawArrays(struct gl_context *ctx, extern GLboolean _mesa_validate_DrawElements(struct gl_context *ctx, GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices, GLint basevertex); + const GLvoid *indices); extern GLboolean _mesa_validate_DrawRangeElements(struct gl_context *ctx, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, - const GLvoid *indices, GLint basevertex); - - -extern GLboolean -_mesa_validate_DrawArraysInstanced(struct gl_context *ctx, GLenum mode, GLint first, - GLsizei count, GLsizei primcount); - -extern GLboolean -_mesa_validate_DrawElementsInstanced(struct gl_context *ctx, - GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices, GLsizei primcount, - GLint basevertex); - -#if FEATURE_EXT_transform_feedback - -extern GLboolean -_mesa_validate_DrawTransformFeedback(struct gl_context *ctx, - GLenum mode, - struct gl_transform_feedback_object *obj); - -#endif + const GLvoid *indices); #endif diff --git a/dll/opengl/mesa/src/mesa/main/arrayobj.c b/dll/opengl/mesa/main/arrayobj.c similarity index 99% rename from dll/opengl/mesa/src/mesa/main/arrayobj.c rename to dll/opengl/mesa/main/arrayobj.c index 04c403cae8a..3bd63d8748b 100644 --- a/dll/opengl/mesa/src/mesa/main/arrayobj.c +++ b/dll/opengl/mesa/main/arrayobj.c @@ -185,7 +185,6 @@ init_array(struct gl_context *ctx, { array->Size = size; array->Type = type; - array->Format = GL_RGBA; /* only significant for GL_EXT_vertex_array_bgra */ array->Stride = 0; array->StrideB = 0; array->Ptr = NULL; diff --git a/dll/opengl/mesa/src/mesa/main/arrayobj.h b/dll/opengl/mesa/main/arrayobj.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/arrayobj.h rename to dll/opengl/mesa/main/arrayobj.h diff --git a/dll/opengl/mesa/src/mesa/main/attrib.c b/dll/opengl/mesa/main/attrib.c similarity index 68% rename from dll/opengl/mesa/src/mesa/main/attrib.c rename to dll/opengl/mesa/main/attrib.c index ca816026e16..23156bc7b9e 100644 --- a/dll/opengl/mesa/src/mesa/main/attrib.c +++ b/dll/opengl/mesa/main/attrib.c @@ -60,7 +60,6 @@ #include "mtypes.h" #include "main/dispatch.h" #include "hash.h" -#include /** @@ -74,7 +73,6 @@ struct gl_enable_attrib GLbitfield ClipPlanes; GLboolean ColorMaterial; GLboolean CullFace; - GLboolean DepthClamp; GLboolean DepthTest; GLboolean Dither; GLboolean Fog; @@ -94,7 +92,6 @@ struct gl_enable_attrib GLboolean Map1TextureCoord4; GLboolean Map1Vertex3; GLboolean Map1Vertex4; - GLboolean Map1Attrib[16]; /* GL_NV_vertex_program */ GLboolean Map2Color4; GLboolean Map2Index; GLboolean Map2Normal; @@ -104,7 +101,6 @@ struct gl_enable_attrib GLboolean Map2TextureCoord4; GLboolean Map2Vertex3; GLboolean Map2Vertex4; - GLboolean Map2Attrib[16]; /* GL_NV_vertex_program */ GLboolean Normalize; GLboolean PixelTexture; @@ -117,24 +113,17 @@ struct gl_enable_attrib GLboolean RescaleNormals; GLboolean Scissor; GLboolean Stencil; - GLboolean StencilTwoSide; /* GL_EXT_stencil_two_side */ GLboolean MultisampleEnabled; /* GL_ARB_multisample */ GLboolean SampleAlphaToCoverage; /* GL_ARB_multisample */ GLboolean SampleAlphaToOne; /* GL_ARB_multisample */ GLboolean SampleCoverage; /* GL_ARB_multisample */ GLboolean RasterPositionUnclipped; /* GL_IBM_rasterpos_clip */ - GLbitfield Texture[MAX_TEXTURE_UNITS]; - GLbitfield TexGen[MAX_TEXTURE_UNITS]; - - /* GL_ARB_vertex_program / GL_NV_vertex_program */ - GLboolean VertexProgram; - GLboolean VertexProgramPointSize; - GLboolean VertexProgramTwoSide; + GLbitfield Texture; + GLbitfield TexGen; /* GL_ARB_point_sprite / GL_NV_point_sprite */ GLboolean PointSprite; - GLboolean FragmentShaderATI; }; @@ -158,13 +147,13 @@ struct texture_state struct gl_texture_attrib Texture; /**< The usual context state */ /** to save per texture object state (wrap modes, filters, etc): */ - struct gl_texture_object SavedObj[MAX_TEXTURE_UNITS][NUM_TEXTURE_TARGETS]; + struct gl_texture_object SavedObj[NUM_TEXTURE_TARGETS]; /** * To save references to texture objects (so they don't get accidentally * deleted while saved in the attribute stack). */ - struct gl_texture_object *SavedTexRef[MAX_TEXTURE_UNITS][NUM_TEXTURE_TARGETS]; + struct gl_texture_object *SavedTexRef[NUM_TEXTURE_TARGETS]; /* We need to keep a reference to the shared state. That's where the * default texture objects are kept. We don't want that state to be @@ -228,13 +217,11 @@ _mesa_PushAttrib(GLbitfield mask) } if (mask & GL_COLOR_BUFFER_BIT) { - GLuint i; struct gl_colorbuffer_attrib *attr; attr = MALLOC_STRUCT( gl_colorbuffer_attrib ); memcpy( attr, &ctx->Color, sizeof(struct gl_colorbuffer_attrib) ); /* push the Draw FBO's DrawBuffer[] state, not ctx->Color.DrawBuffer[] */ - for (i = 0; i < ctx->Const.MaxDrawBuffers; i ++) - attr->DrawBuffer[i] = ctx->DrawBuffer->ColorDrawBuffer[i]; + attr->DrawBuffer = ctx->DrawBuffer->ColorDrawBuffer; save_attrib_data(&head, GL_COLOR_BUFFER_BIT, attr); } @@ -264,7 +251,6 @@ _mesa_PushAttrib(GLbitfield mask) attr->ClipPlanes = ctx->Transform.ClipPlanesEnabled; attr->ColorMaterial = ctx->Light.ColorMaterialEnabled; attr->CullFace = ctx->Polygon.CullFlag; - attr->DepthClamp = ctx->Transform.DepthClamp; attr->DepthTest = ctx->Depth.Test; attr->Dither = ctx->Color.DitherFlag; attr->Fog = ctx->Fog.Enabled; @@ -285,7 +271,6 @@ _mesa_PushAttrib(GLbitfield mask) attr->Map1TextureCoord4 = ctx->Eval.Map1TextureCoord4; attr->Map1Vertex3 = ctx->Eval.Map1Vertex3; attr->Map1Vertex4 = ctx->Eval.Map1Vertex4; - memcpy(attr->Map1Attrib, ctx->Eval.Map1Attrib, sizeof(ctx->Eval.Map1Attrib)); attr->Map2Color4 = ctx->Eval.Map2Color4; attr->Map2Index = ctx->Eval.Map2Index; attr->Map2Normal = ctx->Eval.Map2Normal; @@ -295,7 +280,6 @@ _mesa_PushAttrib(GLbitfield mask) attr->Map2TextureCoord4 = ctx->Eval.Map2TextureCoord4; attr->Map2Vertex3 = ctx->Eval.Map2Vertex3; attr->Map2Vertex4 = ctx->Eval.Map2Vertex4; - memcpy(attr->Map2Attrib, ctx->Eval.Map2Attrib, sizeof(ctx->Eval.Map2Attrib)); attr->Normalize = ctx->Transform.Normalize; attr->RasterPositionUnclipped = ctx->Transform.RasterPositionUnclipped; attr->PointSmooth = ctx->Point.SmoothFlag; @@ -308,19 +292,12 @@ _mesa_PushAttrib(GLbitfield mask) attr->RescaleNormals = ctx->Transform.RescaleNormals; attr->Scissor = ctx->Scissor.Enabled; attr->Stencil = ctx->Stencil.Enabled; - attr->StencilTwoSide = ctx->Stencil.TestTwoSide; attr->MultisampleEnabled = ctx->Multisample.Enabled; attr->SampleAlphaToCoverage = ctx->Multisample.SampleAlphaToCoverage; attr->SampleAlphaToOne = ctx->Multisample.SampleAlphaToOne; attr->SampleCoverage = ctx->Multisample.SampleCoverage; - for (i = 0; i < ctx->Const.MaxTextureUnits; i++) { - attr->Texture[i] = ctx->Texture.Unit[i].Enabled; - attr->TexGen[i] = ctx->Texture.Unit[i].TexGenEnabled; - } - /* GL_NV_vertex_program */ - attr->VertexProgram = ctx->VertexProgram.Enabled; - attr->VertexProgramPointSize = ctx->VertexProgram.PointSizeEnabled; - attr->VertexProgramTwoSide = ctx->VertexProgram.TwoSideEnabled; + attr->Texture = ctx->Texture.Unit.Enabled; + attr->TexGen = ctx->Texture.Unit.TexGenEnabled; save_attrib_data(&head, GL_ENABLE_BIT, attr); } @@ -413,7 +390,7 @@ _mesa_PushAttrib(GLbitfield mask) if (mask & GL_TEXTURE_BIT) { struct texture_state *texstate = CALLOC_STRUCT(texture_state); - GLuint u, tex; + GLuint tex; if (!texstate) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib(GL_TEXTURE_BIT)"); @@ -428,19 +405,15 @@ _mesa_PushAttrib(GLbitfield mask) /* Save references to the currently bound texture objects so they don't * accidentally get deleted while referenced in the attribute stack. */ - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) { - _mesa_reference_texobj(&texstate->SavedTexRef[u][tex], - ctx->Texture.Unit[u].CurrentTex[tex]); - } + for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) { + _mesa_reference_texobj(&texstate->SavedTexRef[tex], + ctx->Texture.Unit.CurrentTex[tex]); } /* copy state/contents of the currently bound texture objects */ - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) { - _mesa_copy_texture_object(&texstate->SavedObj[u][tex], - ctx->Texture.Unit[u].CurrentTex[tex]); - } + for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) { + _mesa_copy_texture_object(&texstate->SavedObj[tex], + ctx->Texture.Unit.CurrentTex[tex]); } _mesa_reference_shared_state(ctx, &texstate->SharedRef, ctx->Shared); @@ -482,7 +455,6 @@ end: static void pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable) { - const GLuint curTexUnitSave = ctx->Texture.CurrentUnit; GLuint i; #define TEST_AND_UPDATE(VALUE, NEWVALUE, ENUM) \ @@ -492,15 +464,7 @@ pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable) TEST_AND_UPDATE(ctx->Color.AlphaEnabled, enable->AlphaTest, GL_ALPHA_TEST); if (ctx->Color.BlendEnabled != enable->Blend) { - if (ctx->Extensions.EXT_draw_buffers2) { - GLuint i; - for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { - _mesa_set_enablei(ctx, GL_BLEND, i, (enable->Blend >> i) & 1); - } - } - else { - _mesa_set_enable(ctx, GL_BLEND, (enable->Blend & 1)); - } + _mesa_set_enable(ctx, GL_BLEND, (enable->Blend & 1)); } for (i=0;iConst.MaxClipPlanes;i++) { @@ -513,8 +477,6 @@ pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable) TEST_AND_UPDATE(ctx->Light.ColorMaterialEnabled, enable->ColorMaterial, GL_COLOR_MATERIAL); TEST_AND_UPDATE(ctx->Polygon.CullFlag, enable->CullFace, GL_CULL_FACE); - TEST_AND_UPDATE(ctx->Transform.DepthClamp, enable->DepthClamp, - GL_DEPTH_CLAMP); TEST_AND_UPDATE(ctx->Depth.Test, enable->DepthTest, GL_DEPTH_TEST); TEST_AND_UPDATE(ctx->Color.DitherFlag, enable->Dither, GL_DITHER); TEST_AND_UPDATE(ctx->Fog.Enabled, enable->Fog, GL_FOG); @@ -542,10 +504,6 @@ pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable) GL_MAP1_VERTEX_3); TEST_AND_UPDATE(ctx->Eval.Map1Vertex4, enable->Map1Vertex4, GL_MAP1_VERTEX_4); - for (i = 0; i < 16; i++) { - TEST_AND_UPDATE(ctx->Eval.Map1Attrib[i], enable->Map1Attrib[i], - GL_MAP1_VERTEX_ATTRIB0_4_NV + i); - } TEST_AND_UPDATE(ctx->Eval.Map2Color4, enable->Map2Color4, GL_MAP2_COLOR_4); TEST_AND_UPDATE(ctx->Eval.Map2Index, enable->Map2Index, GL_MAP2_INDEX); @@ -562,10 +520,6 @@ pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable) GL_MAP2_VERTEX_3); TEST_AND_UPDATE(ctx->Eval.Map2Vertex4, enable->Map2Vertex4, GL_MAP2_VERTEX_4); - for (i = 0; i < 16; i++) { - TEST_AND_UPDATE(ctx->Eval.Map2Attrib[i], enable->Map2Attrib[i], - GL_MAP2_VERTEX_ATTRIB0_4_NV + i); - } TEST_AND_UPDATE(ctx->Eval.AutoNormal, enable->AutoNormal, GL_AUTO_NORMAL); TEST_AND_UPDATE(ctx->Transform.Normalize, enable->Normalize, GL_NORMALIZE); @@ -592,9 +546,6 @@ pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable) GL_POLYGON_STIPPLE); TEST_AND_UPDATE(ctx->Scissor.Enabled, enable->Scissor, GL_SCISSOR_TEST); TEST_AND_UPDATE(ctx->Stencil.Enabled, enable->Stencil, GL_STENCIL_TEST); - if (ctx->Extensions.EXT_stencil_two_side) { - TEST_AND_UPDATE(ctx->Stencil.TestTwoSide, enable->StencilTwoSide, GL_STENCIL_TEST_TWO_SIDE_EXT); - } TEST_AND_UPDATE(ctx->Multisample.Enabled, enable->MultisampleEnabled, GL_MULTISAMPLE_ARB); TEST_AND_UPDATE(ctx->Multisample.SampleAlphaToCoverage, @@ -606,54 +557,29 @@ pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable) TEST_AND_UPDATE(ctx->Multisample.SampleCoverage, enable->SampleCoverage, GL_SAMPLE_COVERAGE_ARB); - /* GL_ARB_vertex_program, GL_NV_vertex_program */ - TEST_AND_UPDATE(ctx->VertexProgram.Enabled, - enable->VertexProgram, - GL_VERTEX_PROGRAM_ARB); - TEST_AND_UPDATE(ctx->VertexProgram.PointSizeEnabled, - enable->VertexProgramPointSize, - GL_VERTEX_PROGRAM_POINT_SIZE_ARB); - TEST_AND_UPDATE(ctx->VertexProgram.TwoSideEnabled, - enable->VertexProgramTwoSide, - GL_VERTEX_PROGRAM_TWO_SIDE_ARB); /* texture unit enables */ - for (i = 0; i < ctx->Const.MaxTextureUnits; i++) { - const GLbitfield enabled = enable->Texture[i]; - const GLbitfield genEnabled = enable->TexGen[i]; - - if (ctx->Texture.Unit[i].Enabled != enabled) { - _mesa_ActiveTextureARB(GL_TEXTURE0 + i); + { + const GLbitfield enabled = enable->Texture; + const GLbitfield genEnabled = enable->TexGen; + if (ctx->Texture.Unit.Enabled != enabled) { _mesa_set_enable(ctx, GL_TEXTURE_1D, !!(enabled & TEXTURE_1D_BIT)); _mesa_set_enable(ctx, GL_TEXTURE_2D, !!(enabled & TEXTURE_2D_BIT)); _mesa_set_enable(ctx, GL_TEXTURE_3D, !!(enabled & TEXTURE_3D_BIT)); - if (ctx->Extensions.NV_texture_rectangle) { - _mesa_set_enable(ctx, GL_TEXTURE_RECTANGLE_ARB, - !!(enabled & TEXTURE_RECT_BIT)); - } if (ctx->Extensions.ARB_texture_cube_map) { _mesa_set_enable(ctx, GL_TEXTURE_CUBE_MAP, !!(enabled & TEXTURE_CUBE_BIT)); } - if (ctx->Extensions.MESA_texture_array) { - _mesa_set_enable(ctx, GL_TEXTURE_1D_ARRAY_EXT, - !!(enabled & TEXTURE_1D_ARRAY_BIT)); - _mesa_set_enable(ctx, GL_TEXTURE_2D_ARRAY_EXT, - !!(enabled & TEXTURE_2D_ARRAY_BIT)); - } } - if (ctx->Texture.Unit[i].TexGenEnabled != genEnabled) { - _mesa_ActiveTextureARB(GL_TEXTURE0 + i); + if (ctx->Texture.Unit.TexGenEnabled != genEnabled) { _mesa_set_enable(ctx, GL_TEXTURE_GEN_S, !!(genEnabled & S_BIT)); _mesa_set_enable(ctx, GL_TEXTURE_GEN_T, !!(genEnabled & T_BIT)); _mesa_set_enable(ctx, GL_TEXTURE_GEN_R, !!(genEnabled & R_BIT)); _mesa_set_enable(ctx, GL_TEXTURE_GEN_Q, !!(genEnabled & Q_BIT)); } } - - _mesa_ActiveTextureARB(GL_TEXTURE0 + curTexUnitSave); } @@ -663,159 +589,107 @@ pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable) static void pop_texture_group(struct gl_context *ctx, struct texture_state *texstate) { - GLuint u; + const struct gl_texture_unit *unit; + GLuint tgt; _mesa_lock_context_textures(ctx); - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - const struct gl_texture_unit *unit = &texstate->Texture.Unit[u]; - GLuint tgt; + unit = &texstate->Texture.Unit; - _mesa_ActiveTextureARB(GL_TEXTURE0_ARB + u); - _mesa_set_enable(ctx, GL_TEXTURE_1D, !!(unit->Enabled & TEXTURE_1D_BIT)); - _mesa_set_enable(ctx, GL_TEXTURE_2D, !!(unit->Enabled & TEXTURE_2D_BIT)); - _mesa_set_enable(ctx, GL_TEXTURE_3D, !!(unit->Enabled & TEXTURE_3D_BIT)); - if (ctx->Extensions.ARB_texture_cube_map) { - _mesa_set_enable(ctx, GL_TEXTURE_CUBE_MAP_ARB, - !!(unit->Enabled & TEXTURE_CUBE_BIT)); + _mesa_set_enable(ctx, GL_TEXTURE_1D, !!(unit->Enabled & TEXTURE_1D_BIT)); + _mesa_set_enable(ctx, GL_TEXTURE_2D, !!(unit->Enabled & TEXTURE_2D_BIT)); + _mesa_set_enable(ctx, GL_TEXTURE_3D, !!(unit->Enabled & TEXTURE_3D_BIT)); + + _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, unit->EnvMode); + _mesa_TexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, unit->EnvColor); + _mesa_TexGeni(GL_S, GL_TEXTURE_GEN_MODE, unit->GenS.Mode); + _mesa_TexGeni(GL_T, GL_TEXTURE_GEN_MODE, unit->GenT.Mode); + _mesa_TexGeni(GL_R, GL_TEXTURE_GEN_MODE, unit->GenR.Mode); + _mesa_TexGeni(GL_Q, GL_TEXTURE_GEN_MODE, unit->GenQ.Mode); + _mesa_TexGenfv(GL_S, GL_OBJECT_PLANE, unit->GenS.ObjectPlane); + _mesa_TexGenfv(GL_T, GL_OBJECT_PLANE, unit->GenT.ObjectPlane); + _mesa_TexGenfv(GL_R, GL_OBJECT_PLANE, unit->GenR.ObjectPlane); + _mesa_TexGenfv(GL_Q, GL_OBJECT_PLANE, unit->GenQ.ObjectPlane); + /* Eye plane done differently to avoid re-transformation */ + { + struct gl_texture_unit *destUnit = &ctx->Texture.Unit; + COPY_4FV(destUnit->GenS.EyePlane, unit->GenS.EyePlane); + COPY_4FV(destUnit->GenT.EyePlane, unit->GenT.EyePlane); + COPY_4FV(destUnit->GenR.EyePlane, unit->GenR.EyePlane); + COPY_4FV(destUnit->GenQ.EyePlane, unit->GenQ.EyePlane); + if (ctx->Driver.TexGen) { + ctx->Driver.TexGen(ctx, GL_S, GL_EYE_PLANE, unit->GenS.EyePlane); + ctx->Driver.TexGen(ctx, GL_T, GL_EYE_PLANE, unit->GenT.EyePlane); + ctx->Driver.TexGen(ctx, GL_R, GL_EYE_PLANE, unit->GenR.EyePlane); + ctx->Driver.TexGen(ctx, GL_Q, GL_EYE_PLANE, unit->GenQ.EyePlane); } - if (ctx->Extensions.NV_texture_rectangle) { - _mesa_set_enable(ctx, GL_TEXTURE_RECTANGLE_NV, - !!(unit->Enabled & TEXTURE_RECT_BIT)); + } + _mesa_set_enable(ctx, GL_TEXTURE_GEN_S, !!(unit->TexGenEnabled & S_BIT)); + _mesa_set_enable(ctx, GL_TEXTURE_GEN_T, !!(unit->TexGenEnabled & T_BIT)); + _mesa_set_enable(ctx, GL_TEXTURE_GEN_R, !!(unit->TexGenEnabled & R_BIT)); + _mesa_set_enable(ctx, GL_TEXTURE_GEN_Q, !!(unit->TexGenEnabled & Q_BIT)); + _mesa_TexEnvf(GL_TEXTURE_FILTER_CONTROL, GL_TEXTURE_LOD_BIAS, + unit->LodBias); + _mesa_TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB, + unit->Combine.ModeRGB); + _mesa_TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA, + unit->Combine.ModeA); + { + const GLuint n = ctx->Extensions.NV_texture_env_combine4 ? 4 : 3; + GLuint i; + for (i = 0; i < n; i++) { + _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB + i, + unit->Combine.SourceRGB[i]); + _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA + i, + unit->Combine.SourceA[i]); + _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB + i, + unit->Combine.OperandRGB[i]); + _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA + i, + unit->Combine.OperandA[i]); } - if (ctx->Extensions.MESA_texture_array) { - _mesa_set_enable(ctx, GL_TEXTURE_1D_ARRAY_EXT, - !!(unit->Enabled & TEXTURE_1D_ARRAY_BIT)); - _mesa_set_enable(ctx, GL_TEXTURE_2D_ARRAY_EXT, - !!(unit->Enabled & TEXTURE_2D_ARRAY_BIT)); + } + _mesa_TexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE, 1 << unit->Combine.ScaleShiftRGB); + _mesa_TexEnvi(GL_TEXTURE_ENV, GL_ALPHA_SCALE, 1 << unit->Combine.ScaleShiftA); + + /* Restore texture object state for each target */ + for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) { + const struct gl_texture_object *obj = NULL; + const struct gl_sampler_object *samp; + GLenum target; + + obj = &texstate->SavedObj[tgt]; + + /* don't restore state for unsupported targets to prevent + * raising GL errors. + */ + if (obj->Target == GL_TEXTURE_CUBE_MAP_ARB && + !ctx->Extensions.ARB_texture_cube_map) { + continue; } - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, unit->EnvMode); - _mesa_TexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, unit->EnvColor); - _mesa_TexGeni(GL_S, GL_TEXTURE_GEN_MODE, unit->GenS.Mode); - _mesa_TexGeni(GL_T, GL_TEXTURE_GEN_MODE, unit->GenT.Mode); - _mesa_TexGeni(GL_R, GL_TEXTURE_GEN_MODE, unit->GenR.Mode); - _mesa_TexGeni(GL_Q, GL_TEXTURE_GEN_MODE, unit->GenQ.Mode); - _mesa_TexGenfv(GL_S, GL_OBJECT_PLANE, unit->GenS.ObjectPlane); - _mesa_TexGenfv(GL_T, GL_OBJECT_PLANE, unit->GenT.ObjectPlane); - _mesa_TexGenfv(GL_R, GL_OBJECT_PLANE, unit->GenR.ObjectPlane); - _mesa_TexGenfv(GL_Q, GL_OBJECT_PLANE, unit->GenQ.ObjectPlane); - /* Eye plane done differently to avoid re-transformation */ - { - struct gl_texture_unit *destUnit = &ctx->Texture.Unit[u]; - COPY_4FV(destUnit->GenS.EyePlane, unit->GenS.EyePlane); - COPY_4FV(destUnit->GenT.EyePlane, unit->GenT.EyePlane); - COPY_4FV(destUnit->GenR.EyePlane, unit->GenR.EyePlane); - COPY_4FV(destUnit->GenQ.EyePlane, unit->GenQ.EyePlane); - if (ctx->Driver.TexGen) { - ctx->Driver.TexGen(ctx, GL_S, GL_EYE_PLANE, unit->GenS.EyePlane); - ctx->Driver.TexGen(ctx, GL_T, GL_EYE_PLANE, unit->GenT.EyePlane); - ctx->Driver.TexGen(ctx, GL_R, GL_EYE_PLANE, unit->GenR.EyePlane); - ctx->Driver.TexGen(ctx, GL_Q, GL_EYE_PLANE, unit->GenQ.EyePlane); - } - } - _mesa_set_enable(ctx, GL_TEXTURE_GEN_S, !!(unit->TexGenEnabled & S_BIT)); - _mesa_set_enable(ctx, GL_TEXTURE_GEN_T, !!(unit->TexGenEnabled & T_BIT)); - _mesa_set_enable(ctx, GL_TEXTURE_GEN_R, !!(unit->TexGenEnabled & R_BIT)); - _mesa_set_enable(ctx, GL_TEXTURE_GEN_Q, !!(unit->TexGenEnabled & Q_BIT)); - _mesa_TexEnvf(GL_TEXTURE_FILTER_CONTROL, GL_TEXTURE_LOD_BIAS, - unit->LodBias); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB, - unit->Combine.ModeRGB); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA, - unit->Combine.ModeA); - { - const GLuint n = ctx->Extensions.NV_texture_env_combine4 ? 4 : 3; - GLuint i; - for (i = 0; i < n; i++) { - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB + i, - unit->Combine.SourceRGB[i]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA + i, - unit->Combine.SourceA[i]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB + i, - unit->Combine.OperandRGB[i]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA + i, - unit->Combine.OperandA[i]); - } - } - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE, - 1 << unit->Combine.ScaleShiftRGB); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_ALPHA_SCALE, - 1 << unit->Combine.ScaleShiftA); + target = obj->Target; - /* Restore texture object state for each target */ - for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) { - const struct gl_texture_object *obj = NULL; - const struct gl_sampler_object *samp; - GLenum target; + _mesa_BindTexture(target, obj->Name); - obj = &texstate->SavedObj[u][tgt]; + samp = &obj->Sampler; - /* don't restore state for unsupported targets to prevent - * raising GL errors. - */ - if (obj->Target == GL_TEXTURE_CUBE_MAP_ARB && - !ctx->Extensions.ARB_texture_cube_map) { - continue; - } - else if (obj->Target == GL_TEXTURE_RECTANGLE_NV && - !ctx->Extensions.NV_texture_rectangle) { - continue; - } - else if ((obj->Target == GL_TEXTURE_1D_ARRAY_EXT || - obj->Target == GL_TEXTURE_2D_ARRAY_EXT) && - !ctx->Extensions.MESA_texture_array) { - continue; - } - else if (obj->Target == GL_TEXTURE_BUFFER) - continue; - else if (obj->Target == GL_TEXTURE_EXTERNAL_OES) - continue; - - target = obj->Target; - - _mesa_BindTexture(target, obj->Name); - - samp = &obj->Sampler; - - _mesa_TexParameterfv(target, GL_TEXTURE_BORDER_COLOR, samp->BorderColor.f); - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, samp->WrapS); - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_T, samp->WrapT); - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_R, samp->WrapR); - _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, samp->MinFilter); - _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, samp->MagFilter); - _mesa_TexParameterf(target, GL_TEXTURE_MIN_LOD, samp->MinLod); - _mesa_TexParameterf(target, GL_TEXTURE_MAX_LOD, samp->MaxLod); - _mesa_TexParameterf(target, GL_TEXTURE_LOD_BIAS, samp->LodBias); - _mesa_TexParameterf(target, GL_TEXTURE_PRIORITY, obj->Priority); - _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, obj->BaseLevel); - if (target != GL_TEXTURE_RECTANGLE_ARB) - _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, obj->MaxLevel); - if (ctx->Extensions.EXT_texture_filter_anisotropic) { - _mesa_TexParameterf(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, - samp->MaxAnisotropy); - } - if (ctx->Extensions.ARB_shadow_ambient) { - _mesa_TexParameterf(target, GL_TEXTURE_COMPARE_FAIL_VALUE_ARB, - samp->CompareFailValue); - } - if (ctx->Extensions.ARB_shadow) { - _mesa_TexParameteri(target, GL_TEXTURE_COMPARE_MODE, - samp->CompareMode); - _mesa_TexParameteri(target, GL_TEXTURE_COMPARE_FUNC, - samp->CompareFunc); - } - if (ctx->Extensions.ARB_depth_texture) - _mesa_TexParameteri(target, GL_DEPTH_TEXTURE_MODE, samp->DepthMode); - } - - /* remove saved references to the texture objects */ - for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) { - _mesa_reference_texobj(&texstate->SavedTexRef[u][tgt], NULL); + _mesa_TexParameterfv(target, GL_TEXTURE_BORDER_COLOR, samp->BorderColor.f); + _mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, samp->WrapS); + _mesa_TexParameteri(target, GL_TEXTURE_WRAP_T, samp->WrapT); + _mesa_TexParameteri(target, GL_TEXTURE_WRAP_R, samp->WrapR); + _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, samp->MinFilter); + _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, samp->MagFilter); + _mesa_TexParameterf(target, GL_TEXTURE_PRIORITY, obj->Priority); + if (ctx->Extensions.EXT_texture_filter_anisotropic) { + _mesa_TexParameterf(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, + samp->MaxAnisotropy); } } - _mesa_ActiveTextureARB(GL_TEXTURE0_ARB + texstate->Texture.CurrentUnit); + /* remove saved references to the texture objects */ + for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) { + _mesa_reference_texobj(&texstate->SavedTexRef[tgt], NULL); + } _mesa_reference_shared_state(ctx, &texstate->SharedRef, NULL); @@ -877,110 +751,42 @@ _mesa_PopAttrib(void) color->ClearColor.f[2], color->ClearColor.f[3]); _mesa_IndexMask(color->IndexMask); - if (!ctx->Extensions.EXT_draw_buffers2) { - _mesa_ColorMask((GLboolean) (color->ColorMask[0][0] != 0), - (GLboolean) (color->ColorMask[0][1] != 0), - (GLboolean) (color->ColorMask[0][2] != 0), - (GLboolean) (color->ColorMask[0][3] != 0)); - } - else { - GLuint i; - for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { - _mesa_ColorMaskIndexed(i, - (GLboolean) (color->ColorMask[i][0] != 0), - (GLboolean) (color->ColorMask[i][1] != 0), - (GLboolean) (color->ColorMask[i][2] != 0), - (GLboolean) (color->ColorMask[i][3] != 0)); - } - } - { - /* Need to determine if more than one color output is - * specified. If so, call glDrawBuffersARB, else call - * glDrawBuffer(). This is a subtle, but essential point - * since GL_FRONT (for example) is illegal for the former - * function, but legal for the later. - */ - GLboolean multipleBuffers = GL_FALSE; - GLuint i; - - for (i = 1; i < ctx->Const.MaxDrawBuffers; i++) { - if (color->DrawBuffer[i] != GL_NONE) { - multipleBuffers = GL_TRUE; - break; - } - } - /* Call the API_level functions, not _mesa_drawbuffers() - * since we need to do error checking on the pop'd - * GL_DRAW_BUFFER. - * Ex: if GL_FRONT were pushed, but we're popping with a - * user FBO bound, GL_FRONT will be illegal and we'll need - * to record that error. Per OpenGL ARB decision. - */ - if (multipleBuffers) - _mesa_DrawBuffersARB(ctx->Const.MaxDrawBuffers, - color->DrawBuffer); - else - _mesa_DrawBuffer(color->DrawBuffer[0]); - } + _mesa_ColorMask((GLboolean) (color->ColorMask[0] != 0), + (GLboolean) (color->ColorMask[1] != 0), + (GLboolean) (color->ColorMask[2] != 0), + (GLboolean) (color->ColorMask[3] != 0)); + _mesa_DrawBuffer(color->DrawBuffer); _mesa_set_enable(ctx, GL_ALPHA_TEST, color->AlphaEnabled); - _mesa_AlphaFunc(color->AlphaFunc, color->AlphaRefUnclamped); + _mesa_AlphaFunc(color->AlphaFunc, color->AlphaRef); if (ctx->Color.BlendEnabled != color->BlendEnabled) { - if (ctx->Extensions.EXT_draw_buffers2) { - GLuint i; - for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { - _mesa_set_enablei(ctx, GL_BLEND, i, - (color->BlendEnabled >> i) & 1); - } - } - else { - _mesa_set_enable(ctx, GL_BLEND, (color->BlendEnabled & 1)); - } + _mesa_set_enable(ctx, GL_BLEND, (color->BlendEnabled & 1)); } - if (ctx->Color._BlendFuncPerBuffer || - ctx->Color._BlendEquationPerBuffer) { - /* set blend per buffer */ - GLuint buf; - for (buf = 0; buf < ctx->Const.MaxDrawBuffers; buf++) { - _mesa_BlendFuncSeparatei(buf, color->Blend[buf].SrcRGB, - color->Blend[buf].DstRGB, - color->Blend[buf].SrcA, - color->Blend[buf].DstA); - _mesa_BlendEquationSeparatei(buf, - color->Blend[buf].EquationRGB, - color->Blend[buf].EquationA); - } + /* set same blend modes for all buffers */ + _mesa_BlendFuncSeparateEXT(color->SrcRGB, + color->DstRGB, + color->SrcA, + color->DstA); + /* This special case is because glBlendEquationSeparateEXT + * cannot take GL_LOGIC_OP as a parameter. + */ + if (color->EquationRGB == color->EquationA) { + _mesa_BlendEquation(color->EquationRGB); } else { - /* set same blend modes for all buffers */ - _mesa_BlendFuncSeparateEXT(color->Blend[0].SrcRGB, - color->Blend[0].DstRGB, - color->Blend[0].SrcA, - color->Blend[0].DstA); - /* This special case is because glBlendEquationSeparateEXT - * cannot take GL_LOGIC_OP as a parameter. - */ - if (color->Blend[0].EquationRGB == - color->Blend[0].EquationA) { - _mesa_BlendEquation(color->Blend[0].EquationRGB); - } - else { - _mesa_BlendEquationSeparateEXT( - color->Blend[0].EquationRGB, - color->Blend[0].EquationA); - } + _mesa_BlendEquationSeparateEXT( + color->EquationRGB, + color->EquationA); } - _mesa_BlendColor(color->BlendColorUnclamped[0], - color->BlendColorUnclamped[1], - color->BlendColorUnclamped[2], - color->BlendColorUnclamped[3]); + _mesa_BlendColor(color->BlendColor[0], + color->BlendColor[1], + color->BlendColor[2], + color->BlendColor[3]); _mesa_LogicOp(color->LogicOp); _mesa_set_enable(ctx, GL_COLOR_LOGIC_OP, color->ColorLogicOpEnabled); _mesa_set_enable(ctx, GL_INDEX_LOGIC_OP, color->IndexLogicOpEnabled); _mesa_set_enable(ctx, GL_DITHER, color->DitherFlag); - _mesa_ClampColorARB(GL_CLAMP_FRAGMENT_COLOR_ARB, color->ClampFragmentColor); - _mesa_ClampColorARB(GL_CLAMP_READ_COLOR_ARB, color->ClampReadColor); } break; case GL_CURRENT_BIT: @@ -1035,8 +841,6 @@ _mesa_PopAttrib(void) _mesa_Hint(GL_FOG_HINT, hint->Fog); _mesa_Hint(GL_CLIP_VOLUME_CLIPPING_HINT_EXT, hint->ClipVolumeClipping); - _mesa_Hint(GL_TEXTURE_COMPRESSION_HINT_ARB, - hint->TextureCompression); } break; case GL_LIGHTING_BIT: @@ -1103,7 +907,6 @@ _mesa_PopAttrib(void) /* materials */ memcpy(&ctx->Light.Material, &light->Material, sizeof(struct gl_material)); - _mesa_ClampColorARB(GL_CLAMP_VERTEX_COLOR_ARB, light->ClampVertexColor); } break; case GL_LINE_BIT: @@ -1131,30 +934,6 @@ _mesa_PopAttrib(void) point = (const struct gl_point_attrib *) attr->data; _mesa_PointSize(point->Size); _mesa_set_enable(ctx, GL_POINT_SMOOTH, point->SmoothFlag); - if (ctx->Extensions.EXT_point_parameters) { - _mesa_PointParameterfv(GL_DISTANCE_ATTENUATION_EXT, - point->Params); - _mesa_PointParameterf(GL_POINT_SIZE_MIN_EXT, - point->MinSize); - _mesa_PointParameterf(GL_POINT_SIZE_MAX_EXT, - point->MaxSize); - _mesa_PointParameterf(GL_POINT_FADE_THRESHOLD_SIZE_EXT, - point->Threshold); - } - if (ctx->Extensions.NV_point_sprite - || ctx->Extensions.ARB_point_sprite) { - GLuint u; - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - _mesa_TexEnvi(GL_POINT_SPRITE_NV, GL_COORD_REPLACE_NV, - (GLint) point->CoordReplace[u]); - } - _mesa_set_enable(ctx, GL_POINT_SPRITE_NV,point->PointSprite); - if (ctx->Extensions.NV_point_sprite) - _mesa_PointParameteri(GL_POINT_SPRITE_R_MODE_NV, - ctx->Point.SpriteRMode); - _mesa_PointParameterf(GL_POINT_SPRITE_COORD_ORIGIN, - (GLfloat)ctx->Point.SpriteOrigin); - } } break; case GL_POLYGON_BIT: @@ -1199,30 +978,13 @@ _mesa_PopAttrib(void) stencil = (const struct gl_stencil_attrib *) attr->data; _mesa_set_enable(ctx, GL_STENCIL_TEST, stencil->Enabled); _mesa_ClearStencil(stencil->Clear); - if (ctx->Extensions.EXT_stencil_two_side) { - _mesa_set_enable(ctx, GL_STENCIL_TEST_TWO_SIDE_EXT, - stencil->TestTwoSide); - _mesa_ActiveStencilFaceEXT(stencil->ActiveFace - ? GL_BACK : GL_FRONT); - } - /* front state */ - _mesa_StencilFuncSeparate(GL_FRONT, - stencil->Function[0], - stencil->Ref[0], - stencil->ValueMask[0]); - _mesa_StencilMaskSeparate(GL_FRONT, stencil->WriteMask[0]); - _mesa_StencilOpSeparate(GL_FRONT, stencil->FailFunc[0], - stencil->ZFailFunc[0], - stencil->ZPassFunc[0]); - /* back state */ - _mesa_StencilFuncSeparate(GL_BACK, - stencil->Function[1], - stencil->Ref[1], - stencil->ValueMask[1]); - _mesa_StencilMaskSeparate(GL_BACK, stencil->WriteMask[1]); - _mesa_StencilOpSeparate(GL_BACK, stencil->FailFunc[1], - stencil->ZFailFunc[1], - stencil->ZPassFunc[1]); + _mesa_StencilFunc(stencil->Function, + stencil->Ref, + stencil->ValueMask); + _mesa_StencilMask(stencil->WriteMask); + _mesa_StencilOp(stencil->FailFunc, + stencil->ZFailFunc, + stencil->ZPassFunc); } break; case GL_TRANSFORM_BIT: @@ -1251,9 +1013,6 @@ _mesa_PopAttrib(void) if (xform->RescaleNormals != ctx->Transform.RescaleNormals) _mesa_set_enable(ctx, GL_RESCALE_NORMAL_EXT, ctx->Transform.RescaleNormals); - if (xform->DepthClamp != ctx->Transform.DepthClamp) - _mesa_set_enable(ctx, GL_DEPTH_CLAMP, - ctx->Transform.DepthClamp); } break; case GL_TEXTURE_BIT: @@ -1330,7 +1089,6 @@ copy_pixelstore(struct gl_context *ctx, dst->SwapBytes = src->SwapBytes; dst->LsbFirst = src->LsbFirst; dst->Invert = src->Invert; - _mesa_reference_buffer_object(ctx, &dst->BufferObj, src->BufferObj); } @@ -1370,15 +1128,12 @@ static void copy_array_attrib(struct gl_context *ctx, struct gl_array_attrib *dest, struct gl_array_attrib *src, - bool vbo_deleted) + GLboolean vbo_deleted) { /* skip ArrayObj */ /* skip DefaultArrayObj, Objects */ - dest->ActiveTexture = src->ActiveTexture; dest->LockFirst = src->LockFirst; dest->LockCount = src->LockCount; - dest->PrimitiveRestart = src->PrimitiveRestart; - dest->RestartIndex = src->RestartIndex; /* skip NewState */ /* skip RebindArrays */ @@ -1401,7 +1156,7 @@ save_array_attrib(struct gl_context *ctx, * Needs to match value in the object hash. */ dest->ArrayObj->Name = src->ArrayObj->Name; /* And copy all of the rest. */ - copy_array_attrib(ctx, dest, src, false); + copy_array_attrib(ctx, dest, src, GL_FALSE); /* Just reference them here */ _mesa_reference_buffer_object(ctx, &dest->ArrayBufferObj, @@ -1430,7 +1185,7 @@ restore_array_attrib(struct gl_context *ctx, * The semantics of objects created using APPLE_vertex_array_objects behave * differently. These objects expect to be recreated by pop. Alas. */ - const bool arb_vao = (src->ArrayObj->Name != 0 + const GLboolean arb_vao = (src->ArrayObj->Name != 0 && src->ArrayObj->ARBsemantics); if (arb_vao && !_mesa_IsVertexArrayAPPLE(src->ArrayObj->Name)) @@ -1443,12 +1198,12 @@ restore_array_attrib(struct gl_context *ctx, || src->ArrayBufferObj->Name == 0 || _mesa_IsBufferARB(src->ArrayBufferObj->Name)) { /* ... and restore its content */ - copy_array_attrib(ctx, dest, src, false); + copy_array_attrib(ctx, dest, src, GL_FALSE); _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, src->ArrayBufferObj->Name); } else { - copy_array_attrib(ctx, dest, src, true); + copy_array_attrib(ctx, dest, src, GL_TRUE); } if (!arb_vao @@ -1566,7 +1321,6 @@ _mesa_PopClientAttrib(void) struct gl_pixelstore_attrib *store = (struct gl_pixelstore_attrib *) node->data; copy_pixelstore(ctx, &ctx->Pack, store); - _mesa_reference_buffer_object(ctx, &store->BufferObj, NULL); } ctx->NewState |= _NEW_PACKUNPACK; break; @@ -1575,7 +1329,6 @@ _mesa_PopClientAttrib(void) struct gl_pixelstore_attrib *store = (struct gl_pixelstore_attrib *) node->data; copy_pixelstore(ctx, &ctx->Unpack, store); - _mesa_reference_buffer_object(ctx, &store->BufferObj, NULL); } ctx->NewState |= _NEW_PACKUNPACK; break; @@ -1628,12 +1381,10 @@ _mesa_free_attrib_data(struct gl_context *ctx) while (attr) { if (attr->kind == GL_TEXTURE_BIT) { struct texture_state *texstate = (struct texture_state*)attr->data; - GLuint u, tgt; + GLuint tgt; /* clear references to the saved texture objects */ - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) { - _mesa_reference_texobj(&texstate->SavedTexRef[u][tgt], NULL); - } + for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) { + _mesa_reference_texobj(&texstate->SavedTexRef[tgt], NULL); } _mesa_reference_shared_state(ctx, &texstate->SharedRef, NULL); } diff --git a/dll/opengl/mesa/src/mesa/main/attrib.h b/dll/opengl/mesa/main/attrib.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/attrib.h rename to dll/opengl/mesa/main/attrib.h diff --git a/dll/opengl/mesa/src/mesa/main/bitset.h b/dll/opengl/mesa/main/bitset.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/bitset.h rename to dll/opengl/mesa/main/bitset.h diff --git a/dll/opengl/mesa/src/mesa/main/blend.c b/dll/opengl/mesa/main/blend.c similarity index 58% rename from dll/opengl/mesa/src/mesa/main/blend.c rename to dll/opengl/mesa/main/blend.c index 09acdf5c588..832fd37efae 100644 --- a/dll/opengl/mesa/src/mesa/main/blend.c +++ b/dll/opengl/mesa/main/blend.c @@ -168,8 +168,6 @@ void GLAPIENTRY _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorA, GLenum dfactorA ) { - GLuint buf, numBuffers; - GLboolean changed; GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); @@ -186,32 +184,19 @@ _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB, return; } - numBuffers = ctx->Extensions.ARB_draw_buffers_blend - ? ctx->Const.MaxDrawBuffers : 1; - - changed = GL_FALSE; - for (buf = 0; buf < numBuffers; buf++) { - if (ctx->Color.Blend[buf].SrcRGB != sfactorRGB || - ctx->Color.Blend[buf].DstRGB != dfactorRGB || - ctx->Color.Blend[buf].SrcA != sfactorA || - ctx->Color.Blend[buf].DstA != dfactorA) { - changed = GL_TRUE; - break; - } - } - if (!changed) + if (ctx->Color.SrcRGB == sfactorRGB && + ctx->Color.DstRGB == dfactorRGB && + ctx->Color.SrcA == sfactorA && + ctx->Color.DstA == dfactorA) { return; + } FLUSH_VERTICES(ctx, _NEW_COLOR); - for (buf = 0; buf < numBuffers; buf++) { - ctx->Color.Blend[buf].SrcRGB = sfactorRGB; - ctx->Color.Blend[buf].DstRGB = dfactorRGB; - ctx->Color.Blend[buf].SrcA = sfactorA; - ctx->Color.Blend[buf].DstA = dfactorA; - } - ctx->Color._BlendFuncPerBuffer = GL_FALSE; - + ctx->Color.SrcRGB = sfactorRGB; + ctx->Color.DstRGB = dfactorRGB; + ctx->Color.SrcA = sfactorA; + ctx->Color.DstA = dfactorA; if (ctx->Driver.BlendFuncSeparate) { ctx->Driver.BlendFuncSeparate(ctx, sfactorRGB, dfactorRGB, sfactorA, dfactorA); @@ -220,66 +205,6 @@ _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB, #if _HAVE_FULL_GL - - -/** - * Set blend source/dest factors for one color buffer/target. - */ -void GLAPIENTRY -_mesa_BlendFunci(GLuint buf, GLenum sfactor, GLenum dfactor) -{ - _mesa_BlendFuncSeparatei(buf, sfactor, dfactor, sfactor, dfactor); -} - - -/** - * Set separate blend source/dest factors for one color buffer/target. - */ -void GLAPIENTRY -_mesa_BlendFuncSeparatei(GLuint buf, GLenum sfactorRGB, GLenum dfactorRGB, - GLenum sfactorA, GLenum dfactorA) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (!ctx->Extensions.ARB_draw_buffers_blend) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glBlendFunc[Separate]i()"); - return; - } - - if (buf >= ctx->Const.MaxDrawBuffers) { - _mesa_error(ctx, GL_INVALID_VALUE, "glBlendFuncSeparatei(buffer=%u)", - buf); - return; - } - - if (!validate_blend_factors(ctx, "glBlendFuncSeparatei", - sfactorRGB, dfactorRGB, - sfactorA, dfactorA)) { - return; - } - - if (ctx->Color.Blend[buf].SrcRGB == sfactorRGB && - ctx->Color.Blend[buf].DstRGB == dfactorRGB && - ctx->Color.Blend[buf].SrcA == sfactorA && - ctx->Color.Blend[buf].DstA == dfactorA) - return; /* no change */ - - FLUSH_VERTICES(ctx, _NEW_COLOR); - - ctx->Color.Blend[buf].SrcRGB = sfactorRGB; - ctx->Color.Blend[buf].DstRGB = dfactorRGB; - ctx->Color.Blend[buf].SrcA = sfactorA; - ctx->Color.Blend[buf].DstA = dfactorA; - ctx->Color._BlendFuncPerBuffer = GL_TRUE; - - if (ctx->Driver.BlendFuncSeparatei) { - ctx->Driver.BlendFuncSeparatei(ctx, buf, sfactorRGB, dfactorRGB, - sfactorA, dfactorA); - } -} - - /** * Check if given blend equation is legal. * \return GL_TRUE if legal, GL_FALSE otherwise. @@ -305,8 +230,6 @@ legal_blend_equation(const struct gl_context *ctx, GLenum mode) void GLAPIENTRY _mesa_BlendEquation( GLenum mode ) { - GLuint buf, numBuffers; - GLboolean changed; GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); @@ -319,75 +242,21 @@ _mesa_BlendEquation( GLenum mode ) return; } - numBuffers = ctx->Extensions.ARB_draw_buffers_blend - ? ctx->Const.MaxDrawBuffers : 1; - - changed = GL_FALSE; - for (buf = 0; buf < numBuffers; buf++) { - if (ctx->Color.Blend[buf].EquationRGB != mode || - ctx->Color.Blend[buf].EquationA != mode) { - changed = GL_TRUE; - break; - } - } - if (!changed) + if (ctx->Color.EquationRGB == mode && ctx->Color.EquationA == mode) { return; + } FLUSH_VERTICES(ctx, _NEW_COLOR); - for (buf = 0; buf < numBuffers; buf++) { - ctx->Color.Blend[buf].EquationRGB = mode; - ctx->Color.Blend[buf].EquationA = mode; - } - ctx->Color._BlendEquationPerBuffer = GL_FALSE; + ctx->Color.EquationRGB = mode; + ctx->Color.EquationA = mode; if (ctx->Driver.BlendEquationSeparate) (*ctx->Driver.BlendEquationSeparate)( ctx, mode, mode ); } - -/** - * Set blend equation for one color buffer/target. - */ -void GLAPIENTRY -_mesa_BlendEquationi(GLuint buf, GLenum mode) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glBlendEquationi(%u, %s)\n", - buf, _mesa_lookup_enum_by_nr(mode)); - - if (buf >= ctx->Const.MaxDrawBuffers) { - _mesa_error(ctx, GL_INVALID_VALUE, "glBlendFuncSeparatei(buffer=%u)", - buf); - return; - } - - if (!legal_blend_equation(ctx, mode)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationi"); - return; - } - - if (ctx->Color.Blend[buf].EquationRGB == mode && - ctx->Color.Blend[buf].EquationA == mode) - return; /* no change */ - - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.Blend[buf].EquationRGB = mode; - ctx->Color.Blend[buf].EquationA = mode; - ctx->Color._BlendEquationPerBuffer = GL_TRUE; - - if (ctx->Driver.BlendEquationSeparatei) - ctx->Driver.BlendEquationSeparatei(ctx, buf, mode, mode); -} - - void GLAPIENTRY _mesa_BlendEquationSeparateEXT( GLenum modeRGB, GLenum modeA ) { - GLuint buf, numBuffers; - GLboolean changed; GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); @@ -412,77 +281,19 @@ _mesa_BlendEquationSeparateEXT( GLenum modeRGB, GLenum modeA ) return; } - numBuffers = ctx->Extensions.ARB_draw_buffers_blend - ? ctx->Const.MaxDrawBuffers : 1; - - changed = GL_FALSE; - for (buf = 0; buf < numBuffers; buf++) { - if (ctx->Color.Blend[buf].EquationRGB != modeRGB || - ctx->Color.Blend[buf].EquationA != modeA) { - changed = GL_TRUE; - break; - } - } - if (!changed) + if (ctx->Color.EquationRGB == modeRGB && ctx->Color.EquationA == modeA) { return; - - FLUSH_VERTICES(ctx, _NEW_COLOR); - for (buf = 0; buf < numBuffers; buf++) { - ctx->Color.Blend[buf].EquationRGB = modeRGB; - ctx->Color.Blend[buf].EquationA = modeA; } - ctx->Color._BlendEquationPerBuffer = GL_FALSE; + + FLUSH_VERTICES(ctx, _NEW_COLOR); + ctx->Color.EquationRGB = modeRGB; + ctx->Color.EquationA = modeA; if (ctx->Driver.BlendEquationSeparate) ctx->Driver.BlendEquationSeparate(ctx, modeRGB, modeA); } -/** - * Set separate blend equations for one color buffer/target. - */ -void GLAPIENTRY -_mesa_BlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeA) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glBlendEquationSeparatei(%u, %s %s)\n", buf, - _mesa_lookup_enum_by_nr(modeRGB), - _mesa_lookup_enum_by_nr(modeA)); - - if (buf >= ctx->Const.MaxDrawBuffers) { - _mesa_error(ctx, GL_INVALID_VALUE, "glBlendEquationSeparatei(buffer=%u)", - buf); - return; - } - - if (!legal_blend_equation(ctx, modeRGB)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparatei(modeRGB)"); - return; - } - - if (!legal_blend_equation(ctx, modeA)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparatei(modeA)"); - return; - } - - if (ctx->Color.Blend[buf].EquationRGB == modeRGB && - ctx->Color.Blend[buf].EquationA == modeA) - return; /* no change */ - - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.Blend[buf].EquationRGB = modeRGB; - ctx->Color.Blend[buf].EquationA = modeA; - ctx->Color._BlendEquationPerBuffer = GL_TRUE; - - if (ctx->Driver.BlendEquationSeparatei) - ctx->Driver.BlendEquationSeparatei(ctx, buf, modeRGB, modeA); -} - - - #endif /* _HAVE_FULL_GL */ @@ -512,16 +323,11 @@ _mesa_BlendColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) tmp[2] = blue; tmp[3] = alpha; - if (TEST_EQ_4V(tmp, ctx->Color.BlendColorUnclamped)) + if (TEST_EQ_4V(tmp, ctx->Color.BlendColor)) return; FLUSH_VERTICES(ctx, _NEW_COLOR); - COPY_4FV( ctx->Color.BlendColorUnclamped, tmp ); - - ctx->Color.BlendColor[0] = CLAMP(tmp[0], 0.0F, 1.0F); - ctx->Color.BlendColor[1] = CLAMP(tmp[1], 0.0F, 1.0F); - ctx->Color.BlendColor[2] = CLAMP(tmp[2], 0.0F, 1.0F); - ctx->Color.BlendColor[3] = CLAMP(tmp[3], 0.0F, 1.0F); + COPY_4FV( ctx->Color.BlendColor, tmp ); if (ctx->Driver.BlendColor) (*ctx->Driver.BlendColor)(ctx, ctx->Color.BlendColor); @@ -557,13 +363,12 @@ _mesa_AlphaFunc( GLenum func, GLclampf ref ) case GL_NOTEQUAL: case GL_GEQUAL: case GL_ALWAYS: - if (ctx->Color.AlphaFunc == func && ctx->Color.AlphaRefUnclamped == ref) + if (ctx->Color.AlphaFunc == func && ctx->Color.AlphaRef == ref) return; /* no change */ FLUSH_VERTICES(ctx, _NEW_COLOR); ctx->Color.AlphaFunc = func; - ctx->Color.AlphaRefUnclamped = ref; - ctx->Color.AlphaRef = CLAMP(ref, 0.0F, 1.0F); + ctx->Color.AlphaRef = ref; if (ctx->Driver.AlphaFunc) ctx->Driver.AlphaFunc(ctx, func, ctx->Color.AlphaRef); @@ -664,8 +469,6 @@ _mesa_ColorMask( GLboolean red, GLboolean green, { GET_CURRENT_CONTEXT(ctx); GLubyte tmp[4]; - GLuint i; - GLboolean flushed; ASSERT_OUTSIDE_BEGIN_END(ctx); if (MESA_VERBOSE & VERBOSE_API) @@ -680,15 +483,9 @@ _mesa_ColorMask( GLboolean red, GLboolean green, tmp[BCOMP] = blue ? 0xff : 0x0; tmp[ACOMP] = alpha ? 0xff : 0x0; - flushed = GL_FALSE; - for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { - if (!TEST_EQ_4V(tmp, ctx->Color.ColorMask[i])) { - if (!flushed) { - FLUSH_VERTICES(ctx, _NEW_COLOR); - } - flushed = GL_TRUE; - COPY_4UBV(ctx->Color.ColorMask[i], tmp); - } + if (!TEST_EQ_4V(tmp, ctx->Color.ColorMask)) { + FLUSH_VERTICES(ctx, _NEW_COLOR); + COPY_4UBV(ctx->Color.ColorMask, tmp); } if (ctx->Driver.ColorMask) @@ -696,79 +493,6 @@ _mesa_ColorMask( GLboolean red, GLboolean green, } -/** - * For GL_EXT_draw_buffers2 and GL3 - */ -void GLAPIENTRY -_mesa_ColorMaskIndexed( GLuint buf, GLboolean red, GLboolean green, - GLboolean blue, GLboolean alpha ) -{ - GLubyte tmp[4]; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glColorMaskIndexed %u %d %d %d %d\n", - buf, red, green, blue, alpha); - - if (buf >= ctx->Const.MaxDrawBuffers) { - _mesa_error(ctx, GL_INVALID_VALUE, "glColorMaskIndexed(buf=%u)", buf); - return; - } - - /* Shouldn't have any information about channel depth in core mesa - * -- should probably store these as the native booleans: - */ - tmp[RCOMP] = red ? 0xff : 0x0; - tmp[GCOMP] = green ? 0xff : 0x0; - tmp[BCOMP] = blue ? 0xff : 0x0; - tmp[ACOMP] = alpha ? 0xff : 0x0; - - if (TEST_EQ_4V(tmp, ctx->Color.ColorMask[buf])) - return; - - FLUSH_VERTICES(ctx, _NEW_COLOR); - COPY_4UBV(ctx->Color.ColorMask[buf], tmp); - - if (ctx->Driver.ColorMaskIndexed) - ctx->Driver.ColorMaskIndexed(ctx, buf, red, green, blue, alpha); -} - - -void GLAPIENTRY -_mesa_ClampColorARB(GLenum target, GLenum clamp) -{ - GET_CURRENT_CONTEXT(ctx); - - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (clamp != GL_TRUE && clamp != GL_FALSE && clamp != GL_FIXED_ONLY_ARB) { - _mesa_error(ctx, GL_INVALID_ENUM, "glClampColorARB(clamp)"); - return; - } - - switch (target) { - case GL_CLAMP_VERTEX_COLOR_ARB: - FLUSH_VERTICES(ctx, _NEW_LIGHT); - ctx->Light.ClampVertexColor = clamp; - break; - case GL_CLAMP_FRAGMENT_COLOR_ARB: - FLUSH_VERTICES(ctx, _NEW_FRAG_CLAMP); - ctx->Color.ClampFragmentColor = clamp; - break; - case GL_CLAMP_READ_COLOR_ARB: - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.ClampReadColor = clamp; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glClampColorARB(target)"); - return; - } -} - - - - /**********************************************************************/ /** \name Initialization */ /*@{*/ @@ -783,8 +507,6 @@ _mesa_ClampColorARB(GLenum target, GLenum clamp) */ void _mesa_init_color( struct gl_context * ctx ) { - GLuint i; - /* Color buffer group */ ctx->Color.IndexMask = ~0u; memset(ctx->Color.ColorMask, 0xff, sizeof(ctx->Color.ColorMask)); @@ -794,32 +516,24 @@ void _mesa_init_color( struct gl_context * ctx ) ctx->Color.AlphaFunc = GL_ALWAYS; ctx->Color.AlphaRef = 0; ctx->Color.BlendEnabled = 0x0; - for (i = 0; i < Elements(ctx->Color.Blend); i++) { - ctx->Color.Blend[i].SrcRGB = GL_ONE; - ctx->Color.Blend[i].DstRGB = GL_ZERO; - ctx->Color.Blend[i].SrcA = GL_ONE; - ctx->Color.Blend[i].DstA = GL_ZERO; - ctx->Color.Blend[i].EquationRGB = GL_FUNC_ADD; - ctx->Color.Blend[i].EquationA = GL_FUNC_ADD; - } + ctx->Color.SrcRGB = GL_ONE; + ctx->Color.DstRGB = GL_ZERO; + ctx->Color.SrcA = GL_ONE; + ctx->Color.DstA = GL_ZERO; + ctx->Color.EquationRGB = GL_FUNC_ADD; + ctx->Color.EquationA = GL_FUNC_ADD; ASSIGN_4V( ctx->Color.BlendColor, 0.0, 0.0, 0.0, 0.0 ); - ASSIGN_4V( ctx->Color.BlendColorUnclamped, 0.0, 0.0, 0.0, 0.0 ); ctx->Color.IndexLogicOpEnabled = GL_FALSE; ctx->Color.ColorLogicOpEnabled = GL_FALSE; ctx->Color.LogicOp = GL_COPY; ctx->Color.DitherFlag = GL_TRUE; if (ctx->Visual.doubleBufferMode) { - ctx->Color.DrawBuffer[0] = GL_BACK; + ctx->Color.DrawBuffer = GL_BACK; } else { - ctx->Color.DrawBuffer[0] = GL_FRONT; + ctx->Color.DrawBuffer = GL_FRONT; } - - ctx->Color.ClampFragmentColor = GL_FIXED_ONLY_ARB; - ctx->Color._ClampFragmentColor = GL_TRUE; - ctx->Color.ClampReadColor = GL_FIXED_ONLY_ARB; - ctx->Color._ClampReadColor = GL_TRUE; } /*@}*/ diff --git a/dll/opengl/mesa/src/mesa/main/blend.h b/dll/opengl/mesa/main/blend.h similarity index 77% rename from dll/opengl/mesa/src/mesa/main/blend.h rename to dll/opengl/mesa/main/blend.h index d74f17ef160..3124702520b 100644 --- a/dll/opengl/mesa/src/mesa/main/blend.h +++ b/dll/opengl/mesa/main/blend.h @@ -47,31 +47,15 @@ _mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorA, GLenum dfactorA ); -extern void GLAPIENTRY -_mesa_BlendFunci(GLuint buf, GLenum sfactor, GLenum dfactor); - - -extern void GLAPIENTRY -_mesa_BlendFuncSeparatei(GLuint buf, GLenum sfactorRGB, GLenum dfactorRGB, - GLenum sfactorA, GLenum dfactorA); - - extern void GLAPIENTRY _mesa_BlendEquation( GLenum mode ); -extern void GLAPIENTRY -_mesa_BlendEquationi(GLuint buf, GLenum mode); - extern void GLAPIENTRY _mesa_BlendEquationSeparateEXT( GLenum modeRGB, GLenum modeA ); -extern void GLAPIENTRY -_mesa_BlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeA); - - extern void GLAPIENTRY _mesa_BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); @@ -91,14 +75,6 @@ extern void GLAPIENTRY _mesa_ColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ); -extern void GLAPIENTRY -_mesa_ColorMaskIndexed( GLuint buf, GLboolean red, GLboolean green, - GLboolean blue, GLboolean alpha ); - - -extern void GLAPIENTRY -_mesa_ClampColorARB(GLenum target, GLenum clamp); - extern void _mesa_init_color( struct gl_context * ctx ); diff --git a/dll/opengl/mesa/src/mesa/main/bufferobj.c b/dll/opengl/mesa/main/bufferobj.c similarity index 83% rename from dll/opengl/mesa/src/mesa/main/bufferobj.c rename to dll/opengl/mesa/main/bufferobj.c index dfd6cfc1102..ddbdcba9e7f 100644 --- a/dll/opengl/mesa/src/mesa/main/bufferobj.c +++ b/dll/opengl/mesa/main/bufferobj.c @@ -38,11 +38,9 @@ #include "image.h" #include "context.h" #include "bufferobj.h" -#include "fbobject.h" #include "mfeatures.h" #include "mtypes.h" #include "texobj.h" -#include "transformfeedback.h" /* Debug flags */ @@ -72,26 +70,6 @@ get_buffer_target(struct gl_context *ctx, GLenum target) return &ctx->Array.ArrayBufferObj; case GL_ELEMENT_ARRAY_BUFFER_ARB: return &ctx->Array.ArrayObj->ElementArrayBufferObj; - case GL_PIXEL_PACK_BUFFER_EXT: - return &ctx->Pack.BufferObj; - case GL_PIXEL_UNPACK_BUFFER_EXT: - return &ctx->Unpack.BufferObj; - case GL_COPY_READ_BUFFER: - return &ctx->CopyReadBuffer; - case GL_COPY_WRITE_BUFFER: - return &ctx->CopyWriteBuffer; -#if FEATURE_EXT_transform_feedback - case GL_TRANSFORM_FEEDBACK_BUFFER: - if (ctx->Extensions.EXT_transform_feedback) { - return &ctx->TransformFeedback.CurrentBuffer; - } - break; -#endif - case GL_TEXTURE_BUFFER: - if (ctx->Extensions.ARB_texture_buffer_object) { - return &ctx->Texture.BufferObject; - } - break; default: return NULL; } @@ -128,24 +106,8 @@ get_buffer(struct gl_context *ctx, const char *func, GLenum target) static inline GLenum default_access_mode(const struct gl_context *ctx) { - /* Table 2.6 on page 31 (page 44 of the PDF) of the OpenGL 1.5 spec says: - * - * Name Type Initial Value Legal Values - * ... ... ... ... - * BUFFER_ACCESS enum READ_WRITE READ_ONLY, WRITE_ONLY - * READ_WRITE - * - * However, table 6.8 in the GL_OES_mapbuffer extension says: - * - * Get Value Type Get Command Value Description - * --------- ---- ----------- ----- ----------- - * BUFFER_ACCESS_OES Z1 GetBufferParameteriv WRITE_ONLY_OES buffer map flag - * - * The difference is because GL_OES_mapbuffer only supports mapping buffers - * write-only. - */ - return (ctx->API == API_OPENGLES) - ? GL_MAP_WRITE_BIT : (GL_MAP_READ_BIT | GL_MAP_WRITE_BIT); + (void)ctx; + return GL_MAP_READ_BIT | GL_MAP_WRITE_BIT; } @@ -514,54 +476,6 @@ _mesa_buffer_unmap( struct gl_context *ctx, struct gl_buffer_object *bufObj ) } -/** - * Default fallback for \c dd_function_table::CopyBufferSubData(). - * Called via glCopyBuffserSubData(). - */ -static void -_mesa_copy_buffer_subdata(struct gl_context *ctx, - struct gl_buffer_object *src, - struct gl_buffer_object *dst, - GLintptr readOffset, GLintptr writeOffset, - GLsizeiptr size) -{ - GLubyte *srcPtr, *dstPtr; - - /* the buffers should not be mapped */ - assert(!_mesa_bufferobj_mapped(src)); - assert(!_mesa_bufferobj_mapped(dst)); - - if (src == dst) { - srcPtr = dstPtr = ctx->Driver.MapBufferRange(ctx, 0, src->Size, - GL_MAP_READ_BIT | - GL_MAP_WRITE_BIT, src); - - if (!srcPtr) - return; - - srcPtr += readOffset; - dstPtr += writeOffset; - } else { - srcPtr = ctx->Driver.MapBufferRange(ctx, readOffset, size, - GL_MAP_READ_BIT, src); - dstPtr = ctx->Driver.MapBufferRange(ctx, writeOffset, size, - (GL_MAP_WRITE_BIT | - GL_MAP_INVALIDATE_RANGE_BIT), dst); - } - - /* Note: the src and dst regions will never overlap. Trying to do so - * would generate GL_INVALID_VALUE earlier. - */ - if (srcPtr && dstPtr) - memcpy(dstPtr, srcPtr, size); - - ctx->Driver.UnmapBuffer(ctx, src); - if (dst != src) - ctx->Driver.UnmapBuffer(ctx, dst); -} - - - /** * Initialize the state associated with buffer objects */ @@ -574,11 +488,6 @@ _mesa_init_buffer_objects( struct gl_context *ctx ) _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, ctx->Shared->NullBufferObj); - - _mesa_reference_buffer_object(ctx, &ctx->CopyReadBuffer, - ctx->Shared->NullBufferObj); - _mesa_reference_buffer_object(ctx, &ctx->CopyWriteBuffer, - ctx->Shared->NullBufferObj); } @@ -586,9 +495,6 @@ void _mesa_free_buffer_objects( struct gl_context *ctx ) { _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, NULL); - - _mesa_reference_buffer_object(ctx, &ctx->CopyReadBuffer, NULL); - _mesa_reference_buffer_object(ctx, &ctx->CopyWriteBuffer, NULL); } @@ -662,8 +568,6 @@ _mesa_update_default_objects_buffer_objects(struct gl_context *ctx) */ bind_buffer_object( ctx, GL_ARRAY_BUFFER_ARB, 0); bind_buffer_object( ctx, GL_ELEMENT_ARRAY_BUFFER_ARB, 0); - bind_buffer_object( ctx, GL_PIXEL_PACK_BUFFER_ARB, 0); - bind_buffer_object( ctx, GL_PIXEL_UNPACK_BUFFER_ARB, 0); } @@ -719,9 +623,6 @@ _mesa_init_buffer_object_functions(struct dd_function_table *driver) /* GL_ARB_map_buffer_range */ driver->MapBufferRange = _mesa_buffer_map_range; driver->FlushMappedBufferRange = _mesa_buffer_flush_mapped_range; - - /* GL_ARB_copy_buffer */ - driver->CopyBufferSubData = _mesa_copy_buffer_subdata; } @@ -792,32 +693,6 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids) _mesa_BindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, 0 ); } - /* unbind ARB_copy_buffer binding points */ - if (ctx->CopyReadBuffer == bufObj) { - _mesa_BindBufferARB( GL_COPY_READ_BUFFER, 0 ); - } - if (ctx->CopyWriteBuffer == bufObj) { - _mesa_BindBufferARB( GL_COPY_WRITE_BUFFER, 0 ); - } - - /* unbind transform feedback binding points */ - if (ctx->TransformFeedback.CurrentBuffer == bufObj) { - _mesa_BindBufferARB( GL_TRANSFORM_FEEDBACK_BUFFER, 0 ); - } - for (j = 0; j < MAX_FEEDBACK_ATTRIBS; j++) { - if (ctx->TransformFeedback.CurrentObject->Buffers[j] == bufObj) { - _mesa_BindBufferBase( GL_TRANSFORM_FEEDBACK_BUFFER, j, 0 ); - } - } - - /* unbind any pixel pack/unpack pointers bound to this buffer */ - if (ctx->Pack.BufferObj == bufObj) { - _mesa_BindBufferARB( GL_PIXEL_PACK_BUFFER_EXT, 0 ); - } - if (ctx->Unpack.BufferObj == bufObj) { - _mesa_BindBufferARB( GL_PIXEL_UNPACK_BUFFER_EXT, 0 ); - } - /* The ID is immediately freed for re-use */ _mesa_HashRemove(ctx->Shared->BufferObjects, ids[i]); /* Make sure we do not run into the classic ABA problem on bind. @@ -1288,87 +1163,6 @@ _mesa_GetBufferPointervARB(GLenum target, GLenum pname, GLvoid **params) *params = bufObj->Pointer; } - -void GLAPIENTRY -_mesa_CopyBufferSubData(GLenum readTarget, GLenum writeTarget, - GLintptr readOffset, GLintptr writeOffset, - GLsizeiptr size) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_buffer_object *src, *dst; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - src = get_buffer(ctx, "glCopyBuffserSubData", readTarget); - if (!src) - return; - - dst = get_buffer(ctx, "glCopyBuffserSubData", writeTarget); - if (!dst) - return; - - if (_mesa_bufferobj_mapped(src)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCopyBuffserSubData(readBuffer is mapped)"); - return; - } - - if (_mesa_bufferobj_mapped(dst)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCopyBuffserSubData(writeBuffer is mapped)"); - return; - } - - if (readOffset < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyBuffserSubData(readOffset = %d)", (int) readOffset); - return; - } - - if (writeOffset < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyBuffserSubData(writeOffset = %d)", (int) writeOffset); - return; - } - - if (size < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyBufferSubData(writeOffset = %d)", (int) size); - return; - } - - if (readOffset + size > src->Size) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyBuffserSubData(readOffset + size = %d)", - (int) (readOffset + size)); - return; - } - - if (writeOffset + size > dst->Size) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyBuffserSubData(writeOffset + size = %d)", - (int) (writeOffset + size)); - return; - } - - if (src == dst) { - if (readOffset + size <= writeOffset) { - /* OK */ - } - else if (writeOffset + size <= readOffset) { - /* OK */ - } - else { - /* overlapping src/dst is illegal */ - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyBuffserSubData(overlapping src/dst)"); - return; - } - } - - ctx->Driver.CopyBufferSubData(ctx, src, dst, readOffset, writeOffset, size); -} - - /** * See GL_ARB_map_buffer_range spec */ @@ -1577,36 +1371,6 @@ buffer_object_purgeable(struct gl_context *ctx, GLuint name, GLenum option) return retval; } - -static GLenum -renderbuffer_purgeable(struct gl_context *ctx, GLuint name, GLenum option) -{ - struct gl_renderbuffer *bufObj; - GLenum retval; - - bufObj = _mesa_lookup_renderbuffer(ctx, name); - if (!bufObj) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glObjectUnpurgeable(name = 0x%x)", name); - return 0; - } - - if (bufObj->Purgeable) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glObjectPurgeable(name = 0x%x) is already purgeable", name); - return GL_VOLATILE_APPLE; - } - - bufObj->Purgeable = GL_TRUE; - - retval = GL_VOLATILE_APPLE; - if (ctx->Driver.RenderObjectPurgeable) - retval = ctx->Driver.RenderObjectPurgeable(ctx, bufObj, option); - - return retval; -} - - static GLenum texture_object_purgeable(struct gl_context *ctx, GLuint name, GLenum option) { @@ -1666,9 +1430,6 @@ _mesa_ObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option) case GL_TEXTURE: retval = texture_object_purgeable(ctx, name, option); break; - case GL_RENDERBUFFER_EXT: - retval = renderbuffer_purgeable(ctx, name, option); - break; case GL_BUFFER_OBJECT_APPLE: retval = buffer_object_purgeable(ctx, name, option); break; @@ -1717,37 +1478,6 @@ buffer_object_unpurgeable(struct gl_context *ctx, GLuint name, GLenum option) return retval; } - -static GLenum -renderbuffer_unpurgeable(struct gl_context *ctx, GLuint name, GLenum option) -{ - struct gl_renderbuffer *bufObj; - GLenum retval; - - bufObj = _mesa_lookup_renderbuffer(ctx, name); - if (!bufObj) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glObjectUnpurgeable(name = 0x%x)", name); - return 0; - } - - if (! bufObj->Purgeable) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glObjectUnpurgeable(name = 0x%x) object is " - " already \"unpurged\"", name); - return 0; - } - - bufObj->Purgeable = GL_FALSE; - - retval = option; - if (ctx->Driver.RenderObjectUnpurgeable) - retval = ctx->Driver.RenderObjectUnpurgeable(ctx, bufObj, option); - - return retval; -} - - static GLenum texture_object_unpurgeable(struct gl_context *ctx, GLuint name, GLenum option) { @@ -1807,8 +1537,6 @@ _mesa_ObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option) return buffer_object_unpurgeable(ctx, name, option); case GL_TEXTURE: return texture_object_unpurgeable(ctx, name, option); - case GL_RENDERBUFFER_EXT: - return renderbuffer_unpurgeable(ctx, name, option); default: _mesa_error(ctx, GL_INVALID_ENUM, "glObjectUnpurgeable(name = 0x%x) invalid type: %d", @@ -1841,31 +1569,6 @@ get_buffer_object_parameteriv(struct gl_context *ctx, GLuint name, } } - -static void -get_renderbuffer_parameteriv(struct gl_context *ctx, GLuint name, - GLenum pname, GLint *params) -{ - struct gl_renderbuffer *rb = _mesa_lookup_renderbuffer(ctx, name); - if (!rb) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glObjectUnpurgeable(name = 0x%x)", name); - return; - } - - switch (pname) { - case GL_PURGEABLE_APPLE: - *params = rb->Purgeable; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetObjectParameteriv(name = 0x%x) invalid enum: %d", - name, pname); - break; - } -} - - static void get_texture_object_parameteriv(struct gl_context *ctx, GLuint name, GLenum pname, GLint *params) @@ -1909,9 +1612,6 @@ _mesa_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname, case GL_BUFFER_OBJECT_APPLE: get_buffer_object_parameteriv(ctx, name, pname, params); break; - case GL_RENDERBUFFER_EXT: - get_renderbuffer_parameteriv(ctx, name, pname, params); - break; default: _mesa_error(ctx, GL_INVALID_ENUM, "glGetObjectParameteriv(name = 0x%x) invalid type: %d", diff --git a/dll/opengl/mesa/src/mesa/main/bufferobj.h b/dll/opengl/mesa/main/bufferobj.h similarity index 95% rename from dll/opengl/mesa/src/mesa/main/bufferobj.h rename to dll/opengl/mesa/main/bufferobj.h index a7ce3792898..dbfd8e7a0d8 100644 --- a/dll/opengl/mesa/src/mesa/main/bufferobj.h +++ b/dll/opengl/mesa/main/bufferobj.h @@ -134,11 +134,6 @@ _mesa_GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params); extern void GLAPIENTRY _mesa_GetBufferPointervARB(GLenum target, GLenum pname, GLvoid **params); -extern void GLAPIENTRY -_mesa_CopyBufferSubData(GLenum readTarget, GLenum writeTarget, - GLintptr readOffset, GLintptr writeOffset, - GLsizeiptr size); - extern void * GLAPIENTRY _mesa_MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); diff --git a/dll/opengl/mesa/src/mesa/main/buffers.c b/dll/opengl/mesa/main/buffers.c similarity index 51% rename from dll/opengl/mesa/src/mesa/main/buffers.c rename to dll/opengl/mesa/main/buffers.c index adea0f5f78e..36225c19e6f 100644 --- a/dll/opengl/mesa/src/mesa/main/buffers.c +++ b/dll/opengl/mesa/main/buffers.c @@ -55,31 +55,21 @@ supported_buffer_bitmask(const struct gl_context *ctx, const struct gl_framebuff { GLbitfield mask = 0x0; - if (fb->Name > 0) { - /* A user-created renderbuffer */ - GLuint i; - ASSERT(ctx->Extensions.EXT_framebuffer_object); - for (i = 0; i < ctx->Const.MaxColorAttachments; i++) { - mask |= (BUFFER_BIT_COLOR0 << i); + /* A window system framebuffer */ + GLint i; + mask = BUFFER_BIT_FRONT_LEFT; /* always have this */ + if (fb->Visual.stereoMode) { + mask |= BUFFER_BIT_FRONT_RIGHT; + if (fb->Visual.doubleBufferMode) { + mask |= BUFFER_BIT_BACK_LEFT | BUFFER_BIT_BACK_RIGHT; } } - else { - /* A window system framebuffer */ - GLint i; - mask = BUFFER_BIT_FRONT_LEFT; /* always have this */ - if (fb->Visual.stereoMode) { - mask |= BUFFER_BIT_FRONT_RIGHT; - if (fb->Visual.doubleBufferMode) { - mask |= BUFFER_BIT_BACK_LEFT | BUFFER_BIT_BACK_RIGHT; - } - } - else if (fb->Visual.doubleBufferMode) { - mask |= BUFFER_BIT_BACK_LEFT; - } + else if (fb->Visual.doubleBufferMode) { + mask |= BUFFER_BIT_BACK_LEFT; + } - for (i = 0; i < fb->Visual.numAuxBuffers; i++) { - mask |= (BUFFER_BIT_AUX0 << i); - } + for (i = 0; i < fb->Visual.numAuxBuffers; i++) { + mask |= (BUFFER_BIT_AUX0 << i); } return mask; @@ -122,22 +112,6 @@ draw_buffer_enum_to_bitmask(GLenum buffer) case GL_AUX2: case GL_AUX3: return 1 << BUFFER_COUNT; /* invalid, but not BAD_MASK */ - case GL_COLOR_ATTACHMENT0_EXT: - return BUFFER_BIT_COLOR0; - case GL_COLOR_ATTACHMENT1_EXT: - return BUFFER_BIT_COLOR1; - case GL_COLOR_ATTACHMENT2_EXT: - return BUFFER_BIT_COLOR2; - case GL_COLOR_ATTACHMENT3_EXT: - return BUFFER_BIT_COLOR3; - case GL_COLOR_ATTACHMENT4_EXT: - return BUFFER_BIT_COLOR4; - case GL_COLOR_ATTACHMENT5_EXT: - return BUFFER_BIT_COLOR5; - case GL_COLOR_ATTACHMENT6_EXT: - return BUFFER_BIT_COLOR6; - case GL_COLOR_ATTACHMENT7_EXT: - return BUFFER_BIT_COLOR7; default: /* error */ return BAD_MASK; @@ -177,22 +151,6 @@ read_buffer_enum_to_index(GLenum buffer) case GL_AUX2: case GL_AUX3: return BUFFER_COUNT; /* invalid, but not -1 */ - case GL_COLOR_ATTACHMENT0_EXT: - return BUFFER_COLOR0; - case GL_COLOR_ATTACHMENT1_EXT: - return BUFFER_COLOR1; - case GL_COLOR_ATTACHMENT2_EXT: - return BUFFER_COLOR2; - case GL_COLOR_ATTACHMENT3_EXT: - return BUFFER_COLOR3; - case GL_COLOR_ATTACHMENT4_EXT: - return BUFFER_COLOR4; - case GL_COLOR_ATTACHMENT5_EXT: - return BUFFER_COLOR5; - case GL_COLOR_ATTACHMENT6_EXT: - return BUFFER_COLOR6; - case GL_COLOR_ATTACHMENT7_EXT: - return BUFFER_COLOR7; default: /* error */ return -1; @@ -255,91 +213,15 @@ _mesa_DrawBuffer(GLenum buffer) } /* if we get here, there's no error so set new state */ - _mesa_drawbuffers(ctx, 1, &buffer, &destMask); + _mesa_drawbuffer(ctx, buffer, destMask); /* * Call device driver function. */ - if (ctx->Driver.DrawBuffers) - ctx->Driver.DrawBuffers(ctx, 1, &buffer); - else if (ctx->Driver.DrawBuffer) + if (ctx->Driver.DrawBuffer) ctx->Driver.DrawBuffer(ctx, buffer); } - -/** - * Called by glDrawBuffersARB; specifies the destination color renderbuffers - * for N fragment program color outputs. - * \sa _mesa_DrawBuffer - * \param n number of outputs - * \param buffers array [n] of renderbuffer names. Unlike glDrawBuffer, the - * names cannot specify more than one buffer. For example, - * GL_FRONT_AND_BACK is illegal. - */ -void GLAPIENTRY -_mesa_DrawBuffersARB(GLsizei n, const GLenum *buffers) -{ - GLint output; - GLbitfield usedBufferMask, supportedMask; - GLbitfield destMask[MAX_DRAW_BUFFERS]; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - /* Turns out n==0 is a valid input that should not produce an error. - * The remaining code below correctly handles the n==0 case. - */ - if (n < 0 || n > (GLsizei) ctx->Const.MaxDrawBuffers) { - _mesa_error(ctx, GL_INVALID_VALUE, "glDrawBuffersARB(n)"); - return; - } - - supportedMask = supported_buffer_bitmask(ctx, ctx->DrawBuffer); - usedBufferMask = 0x0; - - /* complicated error checking... */ - for (output = 0; output < n; output++) { - if (buffers[output] == GL_NONE) { - destMask[output] = 0x0; - } - else { - destMask[output] = draw_buffer_enum_to_bitmask(buffers[output]); - if (destMask[output] == BAD_MASK - || _mesa_bitcount(destMask[output]) > 1) { - _mesa_error(ctx, GL_INVALID_ENUM, "glDrawBuffersARB(buffer)"); - return; - } - destMask[output] &= supportedMask; - if (destMask[output] == 0) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glDrawBuffersARB(unsupported buffer)"); - return; - } - if (destMask[output] & usedBufferMask) { - /* can't specify a dest buffer more than once! */ - _mesa_error(ctx, GL_INVALID_OPERATION, - "glDrawBuffersARB(duplicated buffer)"); - return; - } - - /* update bitmask */ - usedBufferMask |= destMask[output]; - } - } - - /* OK, if we get here, there were no errors so set the new state */ - _mesa_drawbuffers(ctx, n, buffers, destMask); - - /* - * Call device driver function. Note that n can be equal to 0, - * in which case we don't want to reference buffers[0], which - * may not be valid. - */ - if (ctx->Driver.DrawBuffers) - ctx->Driver.DrawBuffers(ctx, n, buffers); - else if (ctx->Driver.DrawBuffer) - ctx->Driver.DrawBuffer(ctx, n > 0 ? buffers[0] : GL_NONE); -} - /** * Performs necessary state updates when _mesa_drawbuffers makes an * actual change. @@ -348,17 +230,6 @@ static void updated_drawbuffers(struct gl_context *ctx) { FLUSH_VERTICES(ctx, _NEW_BUFFERS); - -#if FEATURE_GL - if (ctx->API == API_OPENGL && !ctx->Extensions.ARB_ES2_compatibility) { - struct gl_framebuffer *fb = ctx->DrawBuffer; - - /* Flag the FBO as requiring validation. */ - if (fb->Name != 0) { - fb->_Status = 0; - } - } -#endif } /** @@ -376,86 +247,30 @@ updated_drawbuffers(struct gl_context *ctx) * BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT). */ void -_mesa_drawbuffers(struct gl_context *ctx, GLuint n, const GLenum *buffers, - const GLbitfield *destMask) +_mesa_drawbuffer(struct gl_context *ctx, const GLenum buffers, GLbitfield destMask) { struct gl_framebuffer *fb = ctx->DrawBuffer; - GLbitfield mask[MAX_DRAW_BUFFERS]; - GLuint buf; + GLint bufIndex; if (!destMask) { /* compute destMask values now */ const GLbitfield supportedMask = supported_buffer_bitmask(ctx, fb); - GLuint output; - for (output = 0; output < n; output++) { - mask[output] = draw_buffer_enum_to_bitmask(buffers[output]); - ASSERT(mask[output] != BAD_MASK); - mask[output] &= supportedMask; - } - destMask = mask; + destMask = draw_buffer_enum_to_bitmask(buffers); + ASSERT(destmask != BAD_MASK); + destMask &= supportedMask; } + + bufIndex = _mesa_ffs(destMask) - 1; - /* - * If n==1, destMask[0] may have up to four bits set. - * Otherwise, destMask[x] can only have one bit set. - */ - if (n == 1) { - GLuint count = 0, destMask0 = destMask[0]; - while (destMask0) { - GLint bufIndex = _mesa_ffs(destMask0) - 1; - if (fb->_ColorDrawBufferIndexes[count] != bufIndex) { - updated_drawbuffers(ctx); - fb->_ColorDrawBufferIndexes[count] = bufIndex; - } - count++; - destMask0 &= ~(1 << bufIndex); - } - fb->ColorDrawBuffer[0] = buffers[0]; - fb->_NumColorDrawBuffers = count; - } - else { - GLuint count = 0; - for (buf = 0; buf < n; buf++ ) { - if (destMask[buf]) { - GLint bufIndex = _mesa_ffs(destMask[buf]) - 1; - /* only one bit should be set in the destMask[buf] field */ - ASSERT(_mesa_bitcount(destMask[buf]) == 1); - if (fb->_ColorDrawBufferIndexes[buf] != bufIndex) { - updated_drawbuffers(ctx); - fb->_ColorDrawBufferIndexes[buf] = bufIndex; - } - count = buf + 1; - } - else { - if (fb->_ColorDrawBufferIndexes[buf] != -1) { - updated_drawbuffers(ctx); - fb->_ColorDrawBufferIndexes[buf] = -1; - } - } - fb->ColorDrawBuffer[buf] = buffers[buf]; - } - fb->_NumColorDrawBuffers = count; + if (fb->_ColorDrawBufferIndex != bufIndex) { + updated_drawbuffers(ctx); + fb->_ColorDrawBufferIndex = bufIndex; } + fb->ColorDrawBuffer = buffers; - /* set remaining outputs to -1 (GL_NONE) */ - for (buf = fb->_NumColorDrawBuffers; buf < ctx->Const.MaxDrawBuffers; buf++) { - if (fb->_ColorDrawBufferIndexes[buf] != -1) { - updated_drawbuffers(ctx); - fb->_ColorDrawBufferIndexes[buf] = -1; - } - } - for (buf = n; buf < ctx->Const.MaxDrawBuffers; buf++) { - fb->ColorDrawBuffer[buf] = GL_NONE; - } - - if (fb->Name == 0) { - /* also set context drawbuffer state */ - for (buf = 0; buf < ctx->Const.MaxDrawBuffers; buf++) { - if (ctx->Color.DrawBuffer[buf] != fb->ColorDrawBuffer[buf]) { - updated_drawbuffers(ctx); - ctx->Color.DrawBuffer[buf] = fb->ColorDrawBuffer[buf]; - } - } + if (ctx->Color.DrawBuffer != fb->ColorDrawBuffer) { + updated_drawbuffers(ctx); + ctx->Color.DrawBuffer = fb->ColorDrawBuffer; } } @@ -466,18 +281,9 @@ _mesa_drawbuffers(struct gl_context *ctx, GLuint n, const GLenum *buffers, * Use when changing contexts. */ void -_mesa_update_draw_buffers(struct gl_context *ctx) +_mesa_update_draw_buffer(struct gl_context *ctx) { - GLenum buffers[MAX_DRAW_BUFFERS]; - GLuint i; - - /* should be a window system FBO */ - assert(ctx->DrawBuffer->Name == 0); - - for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) - buffers[i] = ctx->Color.DrawBuffer[i]; - - _mesa_drawbuffers(ctx, ctx->Const.MaxDrawBuffers, buffers, NULL); + _mesa_drawbuffer(ctx, ctx->Color.DrawBuffer, 0); } @@ -493,12 +299,7 @@ _mesa_readbuffer(struct gl_context *ctx, GLenum buffer, GLint bufferIndex) { struct gl_framebuffer *fb = ctx->ReadBuffer; - if (fb->Name == 0) { - /* Only update the per-context READ_BUFFER state if we're bound to - * a window-system framebuffer. - */ - ctx->Pixel.ReadBuffer = buffer; - } + ctx->Pixel.ReadBuffer = buffer; fb->ColorReadBuffer = buffer; fb->_ColorReadBufferIndex = bufferIndex; @@ -529,24 +330,18 @@ _mesa_ReadBuffer(GLenum buffer) if (MESA_VERBOSE & VERBOSE_API) _mesa_debug(ctx, "glReadBuffer %s\n", _mesa_lookup_enum_by_nr(buffer)); - if (fb->Name > 0 && buffer == GL_NONE) { - /* This is legal for user-created framebuffer objects */ - srcBuffer = -1; + /* general case / window-system framebuffer */ + srcBuffer = read_buffer_enum_to_index(buffer); + if (srcBuffer == -1) { + _mesa_error(ctx, GL_INVALID_ENUM, + "glReadBuffer(buffer=0x%x)", buffer); + return; } - else { - /* general case / window-system framebuffer */ - srcBuffer = read_buffer_enum_to_index(buffer); - if (srcBuffer == -1) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glReadBuffer(buffer=0x%x)", buffer); - return; - } - supportedMask = supported_buffer_bitmask(ctx, fb); - if (((1 << srcBuffer) & supportedMask) == 0) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glReadBuffer(buffer=0x%x)", buffer); - return; - } + supportedMask = supported_buffer_bitmask(ctx, fb); + if (((1 << srcBuffer) & supportedMask) == 0) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glReadBuffer(buffer=0x%x)", buffer); + return; } /* OK, all error checking has been completed now */ diff --git a/dll/opengl/mesa/src/mesa/main/buffers.h b/dll/opengl/mesa/main/buffers.h similarity index 86% rename from dll/opengl/mesa/src/mesa/main/buffers.h rename to dll/opengl/mesa/main/buffers.h index 8083bc3d353..ae6f3fcc22b 100644 --- a/dll/opengl/mesa/src/mesa/main/buffers.h +++ b/dll/opengl/mesa/main/buffers.h @@ -40,18 +40,14 @@ struct gl_context; extern void GLAPIENTRY _mesa_DrawBuffer( GLenum mode ); -extern void GLAPIENTRY -_mesa_DrawBuffersARB(GLsizei n, const GLenum *buffers); - extern void -_mesa_drawbuffers(struct gl_context *ctx, GLuint n, const GLenum *buffers, - const GLbitfield *destMask); +_mesa_drawbuffer(struct gl_context *ctx, const GLenum buffers, const GLbitfield destMask); extern void _mesa_readbuffer(struct gl_context *ctx, GLenum buffer, GLint bufferIndex); extern void -_mesa_update_draw_buffers(struct gl_context *ctx); +_mesa_update_draw_buffer(struct gl_context *ctx); extern void GLAPIENTRY diff --git a/dll/opengl/mesa/main/clear.c b/dll/opengl/mesa/main/clear.c new file mode 100644 index 00000000000..73bee2ad8d9 --- /dev/null +++ b/dll/opengl/mesa/main/clear.c @@ -0,0 +1,235 @@ +/* + * Mesa 3-D graphics library + * Version: 7.1 + * + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +/** + * \file clear.c + * glClearColor, glClearIndex, glClear() functions. + */ + + + +#include "glheader.h" +#include "clear.h" +#include "context.h" +#include "colormac.h" +#include "enums.h" +#include "macros.h" +#include "mtypes.h" +#include "state.h" + + + +#if _HAVE_FULL_GL +void GLAPIENTRY +_mesa_ClearIndex( GLfloat c ) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (ctx->Color.ClearIndex == (GLuint) c) + return; + + FLUSH_VERTICES(ctx, _NEW_COLOR); + ctx->Color.ClearIndex = (GLuint) c; +} +#endif + + +/** + * Specify the clear values for the color buffers. + * + * \param red red color component. + * \param green green color component. + * \param blue blue color component. + * \param alpha alpha component. + * + * \sa glClearColor(). + * + * Clamps the parameters and updates gl_colorbuffer_attrib::ClearColor. On a + * change, flushes the vertices and notifies the driver via the + * dd_function_table::ClearColor callback. + */ +void GLAPIENTRY +_mesa_ClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) +{ + GLfloat tmp[4]; + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + tmp[0] = red; + tmp[1] = green; + tmp[2] = blue; + tmp[3] = alpha; + + if (TEST_EQ_4V(tmp, ctx->Color.ClearColor.f)) + return; /* no change */ + + FLUSH_VERTICES(ctx, _NEW_COLOR); + COPY_4V(ctx->Color.ClearColor.f, tmp); + + if (ctx->Driver.ClearColor) { + /* it's OK to call glClearColor in CI mode but it should be a NOP */ + /* we pass the clamped color, since all drivers that need this don't + * support GL_ARB_color_buffer_float + */ + (*ctx->Driver.ClearColor)(ctx, ctx->Color.ClearColor); + } +} + + +/** + * GL_EXT_texture_integer + */ +void GLAPIENTRY +_mesa_ClearColorIiEXT(GLint r, GLint g, GLint b, GLint a) +{ + GLint tmp[4]; + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + tmp[0] = r; + tmp[1] = g; + tmp[2] = b; + tmp[3] = a; + + if (TEST_EQ_4V(tmp, ctx->Color.ClearColor.i)) + return; /* no change */ + + FLUSH_VERTICES(ctx, _NEW_COLOR); + COPY_4V(ctx->Color.ClearColor.i, tmp); + + /* these should be NOP calls for drivers supporting EXT_texture_integer */ + if (ctx->Driver.ClearColor) { + ctx->Driver.ClearColor(ctx, ctx->Color.ClearColor); + } +} + + +/** + * GL_EXT_texture_integer + */ +void GLAPIENTRY +_mesa_ClearColorIuiEXT(GLuint r, GLuint g, GLuint b, GLuint a) +{ + GLuint tmp[4]; + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + tmp[0] = r; + tmp[1] = g; + tmp[2] = b; + tmp[3] = a; + + if (TEST_EQ_4V(tmp, ctx->Color.ClearColor.ui)) + return; /* no change */ + + FLUSH_VERTICES(ctx, _NEW_COLOR); + COPY_4V(ctx->Color.ClearColor.ui, tmp); + + /* these should be NOP calls for drivers supporting EXT_texture_integer */ + if (ctx->Driver.ClearColor) { + ctx->Driver.ClearColor(ctx, ctx->Color.ClearColor); + } +} + + +/** + * Clear buffers. + * + * \param mask bit-mask indicating the buffers to be cleared. + * + * Flushes the vertices and verifies the parameter. If __struct gl_contextRec::NewState + * is set then calls _mesa_update_state() to update gl_frame_buffer::_Xmin, + * etc. If the rasterization mode is set to GL_RENDER then requests the driver + * to clear the buffers, via the dd_function_table::Clear callback. + */ +void GLAPIENTRY +_mesa_Clear( GLbitfield mask ) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + + FLUSH_CURRENT(ctx, 0); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glClear 0x%x\n", mask); + + if (mask & ~(GL_COLOR_BUFFER_BIT | + GL_DEPTH_BUFFER_BIT | + GL_STENCIL_BUFFER_BIT | + GL_ACCUM_BUFFER_BIT)) { + /* invalid bit set */ + _mesa_error( ctx, GL_INVALID_VALUE, "glClear(0x%x)", mask); + return; + } + + if (ctx->NewState) { + _mesa_update_state( ctx ); /* update _Xmin, etc */ + } + + if (ctx->DrawBuffer->Width == 0 || ctx->DrawBuffer->Height == 0 || + ctx->DrawBuffer->_Xmin >= ctx->DrawBuffer->_Xmax || + ctx->DrawBuffer->_Ymin >= ctx->DrawBuffer->_Ymax) + return; + + if (ctx->RasterDiscard) + return; + + if (ctx->RenderMode == GL_RENDER) { + GLbitfield bufferMask; + + /* don't clear depth buffer if depth writing disabled */ + if (!ctx->Depth.Mask) + mask &= ~GL_DEPTH_BUFFER_BIT; + + /* Build the bitmask to send to device driver's Clear function. + * Note that the GL_COLOR_BUFFER_BIT flag will expand to 0, 1, 2 or 4 + * of the BUFFER_BIT_FRONT/BACK_LEFT/RIGHT flags, or one of the + * BUFFER_BIT_COLORn flags. + */ + bufferMask = 0; + if (mask & GL_COLOR_BUFFER_BIT) { + bufferMask |= (1 << ctx->DrawBuffer->_ColorDrawBufferIndex); + } + + if ((mask & GL_DEPTH_BUFFER_BIT) + && ctx->DrawBuffer->Visual.haveDepthBuffer) { + bufferMask |= BUFFER_BIT_DEPTH; + } + + if ((mask & GL_STENCIL_BUFFER_BIT) + && ctx->DrawBuffer->Visual.haveStencilBuffer) { + bufferMask |= BUFFER_BIT_STENCIL; + } + + if ((mask & GL_ACCUM_BUFFER_BIT) + && ctx->DrawBuffer->Visual.haveAccumBuffer) { + bufferMask |= BUFFER_BIT_ACCUM; + } + + ASSERT(ctx->Driver.Clear); + ctx->Driver.Clear(ctx, bufferMask); + } +} diff --git a/dll/opengl/mesa/src/mesa/main/clear.h b/dll/opengl/mesa/main/clear.h similarity index 79% rename from dll/opengl/mesa/src/mesa/main/clear.h rename to dll/opengl/mesa/main/clear.h index 78327192034..b9965915a27 100644 --- a/dll/opengl/mesa/src/mesa/main/clear.h +++ b/dll/opengl/mesa/main/clear.h @@ -48,17 +48,4 @@ extern void GLAPIENTRY _mesa_Clear( GLbitfield mask ); -extern void GLAPIENTRY -_mesa_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value); - -extern void GLAPIENTRY -_mesa_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value); - -extern void GLAPIENTRY -_mesa_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value); - -extern void GLAPIENTRY -_mesa_ClearBufferfi(GLenum buffer, GLint drawbuffer, - GLfloat depth, GLint stencil); - #endif diff --git a/dll/opengl/mesa/src/mesa/main/clip.c b/dll/opengl/mesa/main/clip.c similarity index 100% rename from dll/opengl/mesa/src/mesa/main/clip.c rename to dll/opengl/mesa/main/clip.c diff --git a/dll/opengl/mesa/src/mesa/main/clip.h b/dll/opengl/mesa/main/clip.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/clip.h rename to dll/opengl/mesa/main/clip.h diff --git a/dll/opengl/mesa/src/mesa/main/colormac.h b/dll/opengl/mesa/main/colormac.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/colormac.h rename to dll/opengl/mesa/main/colormac.h diff --git a/dll/opengl/mesa/src/mesa/main/colortab.c b/dll/opengl/mesa/main/colortab.c similarity index 92% rename from dll/opengl/mesa/src/mesa/main/colortab.c rename to dll/opengl/mesa/main/colortab.c index f20dee67789..68553abfedb 100644 --- a/dll/opengl/mesa/src/mesa/main/colortab.c +++ b/dll/opengl/mesa/main/colortab.c @@ -32,7 +32,6 @@ #include "mfeatures.h" #include "mtypes.h" #include "pack.h" -#include "pbo.h" #include "state.h" #include "teximage.h" #include "texstate.h" @@ -86,17 +85,6 @@ _mesa_CopyColorSubTable(GLenum target, GLsizei start, } - -static void GLAPIENTRY -_mesa_GetnColorTableARB( GLenum target, GLenum format, GLenum type, - GLsizei bufSize, GLvoid *data ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - _mesa_error(ctx, GL_INVALID_ENUM, "glGetnColorTableARB(target)"); -} - - static void GLAPIENTRY _mesa_GetColorTable( GLenum target, GLenum format, GLenum type, GLvoid *data ) @@ -160,9 +148,6 @@ _mesa_init_colortable_dispatch(struct _glapi_table *disp) SET_GetColorTable(disp, _mesa_GetColorTable); SET_GetColorTableParameterfv(disp, _mesa_GetColorTableParameterfv); SET_GetColorTableParameteriv(disp, _mesa_GetColorTableParameteriv); - - /* GL_ARB_robustness */ - SET_GetnColorTableARB(disp, _mesa_GetnColorTableARB); } diff --git a/dll/opengl/mesa/src/mesa/main/colortab.h b/dll/opengl/mesa/main/colortab.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/colortab.h rename to dll/opengl/mesa/main/colortab.h diff --git a/dll/opengl/mesa/src/mesa/main/compiler.h b/dll/opengl/mesa/main/compiler.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/compiler.h rename to dll/opengl/mesa/main/compiler.h diff --git a/dll/opengl/mesa/src/mesa/main/config.h b/dll/opengl/mesa/main/config.h similarity index 58% rename from dll/opengl/mesa/src/mesa/main/config.h rename to dll/opengl/mesa/main/config.h index 7b7740ebe4f..c88dfc941ed 100644 --- a/dll/opengl/mesa/src/mesa/main/config.h +++ b/dll/opengl/mesa/main/config.h @@ -112,34 +112,6 @@ /** Number of cube texture mipmap levels - GL_ARB_texture_cube_map */ #define MAX_CUBE_TEXTURE_LEVELS 15 -/** Maximum rectangular texture size - GL_NV_texture_rectangle */ -#define MAX_TEXTURE_RECT_SIZE 16384 - -/** Maximum number of layers in a 1D or 2D array texture - GL_MESA_texture_array */ -#define MAX_ARRAY_TEXTURE_LAYERS 64 - -/** - * Max number of texture coordinate units. This mainly just applies to - * the fixed-function vertex code. This will be difficult to raise above - * eight because of various vertex attribute bitvectors. - */ -#define MAX_TEXTURE_COORD_UNITS 8 - -/** - * Max number of texture image units. Also determines number of texture - * samplers in shaders. - */ -#define MAX_TEXTURE_IMAGE_UNITS 16 - -/** - * Larger of MAX_TEXTURE_COORD_UNITS and MAX_TEXTURE_IMAGE_UNITS. - * This value is only used for dimensioning arrays. - * Either MAX_TEXTURE_COORD_UNITS or MAX_TEXTURE_IMAGE_UNITS (or the - * corresponding ctx->Const.MaxTextureCoord/ImageUnits fields) should be - * used almost everywhere else. - */ -#define MAX_TEXTURE_UNITS ((MAX_TEXTURE_COORD_UNITS > MAX_TEXTURE_IMAGE_UNITS) ? MAX_TEXTURE_COORD_UNITS : MAX_TEXTURE_IMAGE_UNITS) - /** * Maximum viewport/image width. Must accomodate all texture sizes too. @@ -165,7 +137,6 @@ #define MAX_TEXTURE_LEVELS 13 #define MAX_3D_TEXTURE_LEVELS 9 #define MAX_CUBE_TEXTURE_LEVELS 13 -#define MAX_TEXTURE_RECT_SIZE 4096 #define MAX_WIDTH 4096 #define MAX_HEIGHT 4096 #endif @@ -190,91 +161,7 @@ /** For GL_EXT_texture_filter_anisotropic */ #define MAX_TEXTURE_MAX_ANISOTROPY 16.0 -/** For GL_EXT_texture_lod_bias (typically MAX_TEXTURE_LEVELS - 1) */ -#define MAX_TEXTURE_LOD_BIAS 14.0 - -/** For any program target/extension */ -/*@{*/ -#define MAX_PROGRAM_INSTRUCTIONS (16 * 1024) - -/** - * Per-program constants (power of two) - * - * \c MAX_PROGRAM_LOCAL_PARAMS and \c MAX_UNIFORMS are just the assembly shader - * and GLSL shader names for the same thing. They should \b always have the - * same value. Each refers to the number of vec4 values supplied as - * per-program parameters. - */ -/*@{*/ -#define MAX_PROGRAM_LOCAL_PARAMS 4096 -#define MAX_UNIFORMS 4096 -/*@}*/ - -/** - * Per-context constants (power of two) - * - * \note - * This value should always be less than or equal to \c MAX_PROGRAM_LOCAL_PARAMS - * and \c MAX_VERTEX_PROGRAM_PARAMS. Otherwise some applications will make - * incorrect assumptions. - */ -#define MAX_PROGRAM_ENV_PARAMS 256 - -#define MAX_PROGRAM_MATRICES 8 -#define MAX_PROGRAM_MATRIX_STACK_DEPTH 4 -#define MAX_PROGRAM_CALL_DEPTH 8 -#define MAX_PROGRAM_TEMPS 256 -#define MAX_PROGRAM_ADDRESS_REGS 2 -#define MAX_VARYING 16 /**< number of float[4] vectors */ -#define MAX_SAMPLERS MAX_TEXTURE_IMAGE_UNITS -#define MAX_PROGRAM_INPUTS 32 -#define MAX_PROGRAM_OUTPUTS 64 -/*@}*/ - -/** For GL_ARB_vertex_program */ -/*@{*/ -#define MAX_VERTEX_PROGRAM_ADDRESS_REGS 1 -#define MAX_VERTEX_PROGRAM_PARAMS MAX_UNIFORMS -/*@}*/ - -/** For GL_ARB_fragment_program */ -/*@{*/ -#define MAX_FRAGMENT_PROGRAM_ADDRESS_REGS 0 -/*@}*/ - -/** For GL_NV_vertex_program */ -/*@{*/ -#define MAX_NV_VERTEX_PROGRAM_INSTRUCTIONS 128 -#define MAX_NV_VERTEX_PROGRAM_TEMPS 12 -#define MAX_NV_VERTEX_PROGRAM_PARAMS 96 -#define MAX_NV_VERTEX_PROGRAM_INPUTS 16 -#define MAX_NV_VERTEX_PROGRAM_OUTPUTS 15 -/*@}*/ - -/** For GL_NV_fragment_program */ -/*@{*/ -#define MAX_NV_FRAGMENT_PROGRAM_INSTRUCTIONS 1024 /* 72 for GL_ARB_f_p */ -#define MAX_NV_FRAGMENT_PROGRAM_TEMPS 96 -#define MAX_NV_FRAGMENT_PROGRAM_PARAMS 64 -#define MAX_NV_FRAGMENT_PROGRAM_INPUTS 12 -#define MAX_NV_FRAGMENT_PROGRAM_OUTPUTS 3 -#define MAX_NV_FRAGMENT_PROGRAM_WRITE_ONLYS 2 -/*@}*/ - - -/** For GL_ARB_vertex_shader */ -/*@{*/ -#define MAX_VERTEX_GENERIC_ATTRIBS 16 -#define MAX_VERTEX_TEXTURE_IMAGE_UNITS MAX_TEXTURE_IMAGE_UNITS -#define MAX_COMBINED_TEXTURE_IMAGE_UNITS (MAX_VERTEX_TEXTURE_IMAGE_UNITS + \ - MAX_TEXTURE_IMAGE_UNITS) -/*@}*/ - - -/** For GL_ARB_draw_buffers */ -/*@{*/ -#define MAX_DRAW_BUFFERS 8 -/*@}*/ +#define MAX_NV_VERTEX_PROGRAM_INPUTS 16 /** For GL_EXT_framebuffer_object */ @@ -285,19 +172,6 @@ /** For GL_ATI_envmap_bump - support bump mapping on first 8 units */ #define SUPPORTED_ATI_BUMP_UNITS 0xff -/** For GL_EXT_transform_feedback */ -#define MAX_FEEDBACK_ATTRIBS 32 - -/** For GL_ARB_geometry_shader4 */ -/*@{*/ -#define MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 8 -#define MAX_GEOMETRY_VARYING_COMPONENTS 32 -#define MAX_VERTEX_VARYING_COMPONENTS 32 -#define MAX_GEOMETRY_UNIFORM_COMPONENTS 512 -#define MAX_GEOMETRY_OUTPUT_VERTICES 256 -#define MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 1024 -/*@}*/ - /** * \name Mesa-specific parameters diff --git a/dll/opengl/mesa/src/mesa/main/context.c b/dll/opengl/mesa/main/context.c similarity index 67% rename from dll/opengl/mesa/src/mesa/main/context.c rename to dll/opengl/mesa/main/context.c index 43e7438ad4f..c2d10b8ee3f 100644 --- a/dll/opengl/mesa/src/mesa/main/context.c +++ b/dll/opengl/mesa/main/context.c @@ -88,12 +88,10 @@ #include "bufferobj.h" #include "context.h" #include "cpuinfo.h" -#include "debug.h" #include "depth.h" #include "dlist.h" #include "eval.h" #include "extensions.h" -#include "fbobject.h" #include "feedback.h" #include "fog.h" #include "formats.h" @@ -109,26 +107,18 @@ #include "pixelstore.h" #include "points.h" #include "polygon.h" -#include "queryobj.h" -#include "syncobj.h" #include "rastpos.h" -#include "remap.h" #include "scissor.h" #include "shared.h" -#include "shaderobj.h" #include "simple_list.h" #include "state.h" #include "stencil.h" -#include "texcompress_s3tc.h" #include "texstate.h" -#include "transformfeedback.h" #include "mtypes.h" #include "varray.h" #include "version.h" #include "viewport.h" #include "vtxfmt.h" -#include "program/program.h" -#include "program/prog_print.h" #if _HAVE_FULL_GL #include "math/m_matrix.h" #endif @@ -138,9 +128,6 @@ #include "sparc/sparc.h" #endif -#include "glsl_parser_extras.h" -#include - #ifndef MESA_VERBOSE int MESA_VERBOSE = 0; @@ -199,7 +186,6 @@ _mesa_notifySwapBuffers(struct gl_context *ctx) * \param greenBits same as above. * \param blueBits same as above. * \param alphaBits same as above. - * \param numSamples not really used. * * \return pointer to new struct gl_config or NULL if requested parameters * can't be met. @@ -218,8 +204,7 @@ _mesa_create_visual( GLboolean dbFlag, GLint accumRedBits, GLint accumGreenBits, GLint accumBlueBits, - GLint accumAlphaBits, - GLint numSamples ) + GLint accumAlphaBits) { struct gl_config *vis = CALLOC_STRUCT(gl_config); if (vis) { @@ -227,8 +212,7 @@ _mesa_create_visual( GLboolean dbFlag, redBits, greenBits, blueBits, alphaBits, depthBits, stencilBits, accumRedBits, accumGreenBits, - accumBlueBits, accumAlphaBits, - numSamples)) { + accumBlueBits, accumAlphaBits)) { free(vis); return NULL; } @@ -260,8 +244,7 @@ _mesa_initialize_visual( struct gl_config *vis, GLint accumRedBits, GLint accumGreenBits, GLint accumBlueBits, - GLint accumAlphaBits, - GLint numSamples ) + GLint accumAlphaBits) { assert(vis); @@ -301,8 +284,6 @@ _mesa_initialize_visual( struct gl_config *vis, vis->numAuxBuffers = 0; vis->level = 0; - vis->sampleBuffers = numSamples > 0 ? 1 : 0; - vis->samples = numSamples; return GL_TRUE; } @@ -346,22 +327,12 @@ dummy_enum_func(void) gl_buffer_index bi = BUFFER_FRONT_LEFT; gl_face_index fi = FACE_POS_X; gl_frag_attrib fa = FRAG_ATTRIB_WPOS; - gl_frag_result fr = FRAG_RESULT_DEPTH; - gl_texture_index ti = TEXTURE_2D_ARRAY_INDEX; gl_vert_attrib va = VERT_ATTRIB_POS; - gl_vert_result vr = VERT_RESULT_HPOS; - gl_geom_attrib ga = GEOM_ATTRIB_POSITION; - gl_geom_result gr = GEOM_RESULT_POS; (void) bi; (void) fi; (void) fa; - (void) fr; - (void) ti; (void) va; - (void) vr; - (void) ga; - (void) gr; } @@ -386,12 +357,12 @@ _glthread_DECLARE_STATIC_MUTEX(OneTimeLock); static void one_time_init( struct gl_context *ctx ) { - static GLbitfield api_init_mask = 0x0; + static GLboolean api_init = GL_FALSE; _glthread_LOCK_MUTEX(OneTimeLock); /* truly one-time init */ - if (!api_init_mask) { + if (!api_init) { GLuint i; /* do some implementation tests */ @@ -424,28 +395,11 @@ one_time_init( struct gl_context *ctx ) _mesa_test_formats(); #endif } - - /* per-API one-time init */ - if (!(api_init_mask & (1 << ctx->API))) { - /* - * This is fine as ES does not use the remap table, but it may not be - * future-proof. We cannot always initialize the remap table because - * when an app is linked to libGLES*, there are not enough dynamic - * entries. - */ - if (ctx->API == API_OPENGL) - _mesa_init_remap_table(); - } - - api_init_mask |= 1 << ctx->API; + + api_init = GL_TRUE; _glthread_UNLOCK_MUTEX(OneTimeLock); - /* Hopefully atexit() is widely available. If not, we may need some - * #ifdef tests here. - */ - atexit(_mesa_destroy_shader_compiler); - dummy_enum_func(); } @@ -472,79 +426,6 @@ _mesa_init_current(struct gl_context *ctx) ASSIGN_4V( ctx->Current.Attrib[VERT_ATTRIB_EDGEFLAG], 1.0, 0.0, 0.0, 1.0 ); } - -/** - * Init vertex/fragment/geometry program limits. - * Important: drivers should override these with actual limits. - */ -static void -init_program_limits(GLenum type, struct gl_program_constants *prog) -{ - prog->MaxInstructions = MAX_PROGRAM_INSTRUCTIONS; - prog->MaxAluInstructions = MAX_PROGRAM_INSTRUCTIONS; - prog->MaxTexInstructions = MAX_PROGRAM_INSTRUCTIONS; - prog->MaxTexIndirections = MAX_PROGRAM_INSTRUCTIONS; - prog->MaxTemps = MAX_PROGRAM_TEMPS; - prog->MaxEnvParams = MAX_PROGRAM_ENV_PARAMS; - prog->MaxLocalParams = MAX_PROGRAM_LOCAL_PARAMS; - prog->MaxAddressOffset = MAX_PROGRAM_LOCAL_PARAMS; - - switch (type) { - case GL_VERTEX_PROGRAM_ARB: - prog->MaxParameters = MAX_VERTEX_PROGRAM_PARAMS; - prog->MaxAttribs = MAX_NV_VERTEX_PROGRAM_INPUTS; - prog->MaxAddressRegs = MAX_VERTEX_PROGRAM_ADDRESS_REGS; - prog->MaxUniformComponents = 4 * MAX_UNIFORMS; - break; - case GL_FRAGMENT_PROGRAM_ARB: - prog->MaxParameters = MAX_NV_FRAGMENT_PROGRAM_PARAMS; - prog->MaxAttribs = MAX_NV_FRAGMENT_PROGRAM_INPUTS; - prog->MaxAddressRegs = MAX_FRAGMENT_PROGRAM_ADDRESS_REGS; - prog->MaxUniformComponents = 4 * MAX_UNIFORMS; - break; - case MESA_GEOMETRY_PROGRAM: - prog->MaxParameters = MAX_NV_VERTEX_PROGRAM_PARAMS; - prog->MaxAttribs = MAX_NV_VERTEX_PROGRAM_INPUTS; - prog->MaxAddressRegs = MAX_VERTEX_PROGRAM_ADDRESS_REGS; - prog->MaxUniformComponents = MAX_GEOMETRY_UNIFORM_COMPONENTS; - break; - default: - assert(0 && "Bad program type in init_program_limits()"); - } - - /* Set the native limits to zero. This implies that there is no native - * support for shaders. Let the drivers fill in the actual values. - */ - prog->MaxNativeInstructions = 0; - prog->MaxNativeAluInstructions = 0; - prog->MaxNativeTexInstructions = 0; - prog->MaxNativeTexIndirections = 0; - prog->MaxNativeAttribs = 0; - prog->MaxNativeTemps = 0; - prog->MaxNativeAddressRegs = 0; - prog->MaxNativeParameters = 0; - - /* Set GLSL datatype range/precision info assuming IEEE float values. - * Drivers should override these defaults as needed. - */ - prog->MediumFloat.RangeMin = 127; - prog->MediumFloat.RangeMax = 127; - prog->MediumFloat.Precision = 23; - prog->LowFloat = prog->HighFloat = prog->MediumFloat; - - /* Assume ints are stored as floats for now, since this is the least-common - * denominator. The OpenGL ES spec implies (page 132) that the precision - * of integer types should be 0. Practically speaking, IEEE - * single-precision floating point values can only store integers in the - * range [-0x01000000, 0x01000000] without loss of precision. - */ - prog->MediumInt.RangeMin = 24; - prog->MediumInt.RangeMax = 24; - prog->MediumInt.Precision = 0; - prog->LowInt = prog->HighInt = prog->MediumInt; -} - - /** * Initialize fields of gl_constants (aka ctx->Const.*). * Use defaults from config.h. The device drivers will often override @@ -560,15 +441,7 @@ _mesa_init_constants(struct gl_context *ctx) ctx->Const.MaxTextureLevels = MAX_TEXTURE_LEVELS; ctx->Const.Max3DTextureLevels = MAX_3D_TEXTURE_LEVELS; ctx->Const.MaxCubeTextureLevels = MAX_CUBE_TEXTURE_LEVELS; - ctx->Const.MaxTextureRectSize = MAX_TEXTURE_RECT_SIZE; - ctx->Const.MaxArrayTextureLayers = MAX_ARRAY_TEXTURE_LAYERS; - ctx->Const.MaxTextureCoordUnits = MAX_TEXTURE_COORD_UNITS; - ctx->Const.MaxTextureImageUnits = MAX_TEXTURE_IMAGE_UNITS; - ctx->Const.MaxTextureUnits = MIN2(ctx->Const.MaxTextureCoordUnits, - ctx->Const.MaxTextureImageUnits); ctx->Const.MaxTextureMaxAnisotropy = MAX_TEXTURE_MAX_ANISOTROPY; - ctx->Const.MaxTextureLodBias = MAX_TEXTURE_LOD_BIAS; - ctx->Const.MaxTextureBufferSize = 65536; ctx->Const.MaxArrayLockSize = MAX_ARRAY_LOCK_SIZE; ctx->Const.SubPixelBits = SUB_PIXEL_BITS; ctx->Const.MinPointSize = MIN_POINT_SIZE; @@ -588,80 +461,12 @@ _mesa_init_constants(struct gl_context *ctx) ctx->Const.MaxSpotExponent = 128.0; ctx->Const.MaxViewportWidth = MAX_WIDTH; ctx->Const.MaxViewportHeight = MAX_HEIGHT; -#if FEATURE_ARB_vertex_program - init_program_limits(GL_VERTEX_PROGRAM_ARB, &ctx->Const.VertexProgram); -#endif -#if FEATURE_ARB_fragment_program - init_program_limits(GL_FRAGMENT_PROGRAM_ARB, &ctx->Const.FragmentProgram); -#endif -#if FEATURE_ARB_geometry_shader4 - init_program_limits(MESA_GEOMETRY_PROGRAM, &ctx->Const.GeometryProgram); -#endif - ctx->Const.MaxProgramMatrices = MAX_PROGRAM_MATRICES; - ctx->Const.MaxProgramMatrixStackDepth = MAX_PROGRAM_MATRIX_STACK_DEPTH; /* CheckArrayBounds is overriden by drivers/x11 for X server */ ctx->Const.CheckArrayBounds = GL_FALSE; - /* GL_ARB_draw_buffers */ - ctx->Const.MaxDrawBuffers = MAX_DRAW_BUFFERS; - -#if FEATURE_EXT_framebuffer_object - ctx->Const.MaxColorAttachments = MAX_COLOR_ATTACHMENTS; - ctx->Const.MaxRenderbufferSize = MAX_WIDTH; -#endif - -#if FEATURE_ARB_vertex_shader - ctx->Const.MaxVertexTextureImageUnits = MAX_VERTEX_TEXTURE_IMAGE_UNITS; - ctx->Const.MaxCombinedTextureImageUnits = MAX_COMBINED_TEXTURE_IMAGE_UNITS; - ctx->Const.MaxVarying = MAX_VARYING; -#endif -#if FEATURE_ARB_geometry_shader4 - ctx->Const.MaxGeometryTextureImageUnits = MAX_GEOMETRY_TEXTURE_IMAGE_UNITS; - ctx->Const.MaxVertexVaryingComponents = MAX_VERTEX_VARYING_COMPONENTS; - ctx->Const.MaxGeometryVaryingComponents = MAX_GEOMETRY_VARYING_COMPONENTS; - ctx->Const.MaxGeometryOutputVertices = MAX_GEOMETRY_OUTPUT_VERTICES; - ctx->Const.MaxGeometryTotalOutputComponents = MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS; -#endif - - /* Shading language version */ - if (ctx->API == API_OPENGL) { - ctx->Const.GLSLVersion = 120; - _mesa_override_glsl_version(ctx); - } - else if (ctx->API == API_OPENGLES2) { - ctx->Const.GLSLVersion = 100; - } - else if (ctx->API == API_OPENGLES) { - ctx->Const.GLSLVersion = 0; /* GLSL not supported */ - } - - /* GL_ARB_framebuffer_object */ - ctx->Const.MaxSamples = 0; - - /* GL_ARB_sync */ - ctx->Const.MaxServerWaitTimeout = (GLuint64) ~0; - - /* GL_ATI_envmap_bumpmap */ - ctx->Const.SupportedBumpUnits = SUPPORTED_ATI_BUMP_UNITS; - - /* GL_EXT_provoking_vertex */ - ctx->Const.QuadsFollowProvokingVertexConvention = GL_TRUE; - - /* GL_EXT_transform_feedback */ - ctx->Const.MaxTransformFeedbackSeparateAttribs = MAX_FEEDBACK_ATTRIBS; - ctx->Const.MaxTransformFeedbackSeparateComponents = 4 * MAX_FEEDBACK_ATTRIBS; - ctx->Const.MaxTransformFeedbackInterleavedComponents = 4 * MAX_FEEDBACK_ATTRIBS; - /* GL 3.2: hard-coded for now: */ ctx->Const.ProfileMask = GL_CONTEXT_COMPATIBILITY_PROFILE_BIT; - - /** GL_EXT_gpu_shader4 */ - ctx->Const.MinProgramTexelOffset = -8; - ctx->Const.MaxProgramTexelOffset = 7; - - /* GL_ARB_robustness */ - ctx->Const.ResetStrategy = GL_NO_RESET_NOTIFICATION_ARB; } @@ -672,45 +477,10 @@ _mesa_init_constants(struct gl_context *ctx) static void check_context_limits(struct gl_context *ctx) { - /* check that we don't exceed the size of various bitfields */ - assert(VERT_RESULT_MAX <= - (8 * sizeof(ctx->VertexProgram._Current->Base.OutputsWritten))); - assert(FRAG_ATTRIB_MAX <= - (8 * sizeof(ctx->FragmentProgram._Current->Base.InputsRead))); - - assert(MAX_COMBINED_TEXTURE_IMAGE_UNITS <= 8 * sizeof(GLbitfield)); - - /* shader-related checks */ - assert(ctx->Const.FragmentProgram.MaxLocalParams <= MAX_PROGRAM_LOCAL_PARAMS); - assert(ctx->Const.VertexProgram.MaxLocalParams <= MAX_PROGRAM_LOCAL_PARAMS); - - assert(MAX_NV_FRAGMENT_PROGRAM_TEMPS <= MAX_PROGRAM_TEMPS); - assert(MAX_NV_VERTEX_PROGRAM_TEMPS <= MAX_PROGRAM_TEMPS); - assert(MAX_NV_VERTEX_PROGRAM_INPUTS <= VERT_ATTRIB_MAX); - assert(MAX_NV_VERTEX_PROGRAM_OUTPUTS <= VERT_RESULT_MAX); - - /* Texture unit checks */ - assert(ctx->Const.MaxTextureImageUnits > 0); - assert(ctx->Const.MaxTextureImageUnits <= MAX_TEXTURE_IMAGE_UNITS); - assert(ctx->Const.MaxTextureCoordUnits > 0); - assert(ctx->Const.MaxTextureCoordUnits <= MAX_TEXTURE_COORD_UNITS); - assert(ctx->Const.MaxTextureUnits > 0); - assert(ctx->Const.MaxTextureUnits <= MAX_TEXTURE_IMAGE_UNITS); - assert(ctx->Const.MaxTextureUnits <= MAX_TEXTURE_COORD_UNITS); - assert(ctx->Const.MaxTextureUnits == MIN2(ctx->Const.MaxTextureImageUnits, - ctx->Const.MaxTextureCoordUnits)); - assert(ctx->Const.MaxCombinedTextureImageUnits > 0); - assert(ctx->Const.MaxCombinedTextureImageUnits <= MAX_COMBINED_TEXTURE_IMAGE_UNITS); - assert(ctx->Const.MaxTextureCoordUnits <= MAX_COMBINED_TEXTURE_IMAGE_UNITS); - /* number of coord units cannot be greater than number of image units */ - assert(ctx->Const.MaxTextureCoordUnits <= ctx->Const.MaxTextureImageUnits); - - /* Texture size checks */ assert(ctx->Const.MaxTextureLevels <= MAX_TEXTURE_LEVELS); assert(ctx->Const.Max3DTextureLevels <= MAX_3D_TEXTURE_LEVELS); assert(ctx->Const.MaxCubeTextureLevels <= MAX_CUBE_TEXTURE_LEVELS); - assert(ctx->Const.MaxTextureRectSize <= MAX_TEXTURE_RECT_SIZE); /* make sure largest texture image is <= MAX_WIDTH in size */ assert((1 << (ctx->Const.MaxTextureLevels - 1)) <= MAX_WIDTH); @@ -726,13 +496,6 @@ check_context_limits(struct gl_context *ctx) assert(ctx->Const.MaxViewportWidth <= MAX_WIDTH); assert(ctx->Const.MaxViewportHeight <= MAX_WIDTH); - - assert(ctx->Const.MaxDrawBuffers <= MAX_DRAW_BUFFERS); - - /* if this fails, add more enum values to gl_buffer_index */ - assert(BUFFER_COLOR0 + MAX_DRAW_BUFFERS <= BUFFER_COUNT); - - /* XXX probably add more tests */ } @@ -762,10 +525,8 @@ init_attrib_groups(struct gl_context *ctx) _mesa_init_color( ctx ); _mesa_init_current( ctx ); _mesa_init_depth( ctx ); - _mesa_init_debug( ctx ); _mesa_init_display_list( ctx ); _mesa_init_eval( ctx ); - _mesa_init_fbobjects( ctx ); _mesa_init_feedback( ctx ); _mesa_init_fog( ctx ); _mesa_init_hint( ctx ); @@ -777,28 +538,19 @@ init_attrib_groups(struct gl_context *ctx) _mesa_init_pixelstore( ctx ); _mesa_init_point( ctx ); _mesa_init_polygon( ctx ); - _mesa_init_program( ctx ); - _mesa_init_queryobj( ctx ); - _mesa_init_sync( ctx ); _mesa_init_rastpos( ctx ); _mesa_init_scissor( ctx ); - _mesa_init_shader_state( ctx ); _mesa_init_stencil( ctx ); _mesa_init_transform( ctx ); - _mesa_init_transform_feedback( ctx ); _mesa_init_varray( ctx ); _mesa_init_viewport( ctx ); if (!_mesa_init_texture( ctx )) return GL_FALSE; - _mesa_init_texture_s3tc( ctx ); - /* Miscellaneous */ ctx->NewState = _NEW_ALL; ctx->ErrorValue = (GLenum) GL_NO_ERROR; - ctx->ResetStatus = (GLenum) GL_NO_ERROR; - ctx->varying_vp_inputs = VERT_BIT_ALL; return GL_TRUE; } @@ -818,7 +570,6 @@ update_default_objects(struct gl_context *ctx) { assert(ctx); - _mesa_update_default_objects_program(ctx); _mesa_update_default_objects_texture(ctx); _mesa_update_default_objects_buffer_objects(ctx); @@ -897,20 +648,17 @@ _mesa_alloc_dispatch_table(int size) */ GLboolean _mesa_initialize_context(struct gl_context *ctx, - gl_api api, const struct gl_config *visual, struct gl_context *share_list, const struct dd_function_table *driverFunctions, void *driverContext) { struct gl_shared_state *shared; - int i; /*ASSERT(driverContext);*/ assert(driverFunctions->NewTextureObject); assert(driverFunctions->FreeTextureImageBuffer); - ctx->API = api; ctx->Visual = *visual; ctx->DrawBuffer = NULL; ctx->ReadBuffer = NULL; @@ -946,46 +694,14 @@ _mesa_initialize_context(struct gl_context *ctx, return GL_FALSE; } -#if FEATURE_dispatch - /* setup the API dispatch tables */ - switch (ctx->API) { -#if FEATURE_GL - case API_OPENGL: - ctx->Exec = _mesa_create_exec_table(); - break; -#endif -#if FEATURE_ES1 - case API_OPENGLES: - ctx->Exec = _mesa_create_exec_table_es1(); - break; -#endif -#if FEATURE_ES2 - case API_OPENGLES2: - ctx->Exec = _mesa_create_exec_table_es2(); - break; -#endif - default: - _mesa_problem(ctx, "unknown or unsupported API"); - break; - } + ctx->Exec = _mesa_create_exec_table(); if (!ctx->Exec) { _mesa_reference_shared_state(ctx, &ctx->Shared, NULL); return GL_FALSE; } -#endif ctx->CurrentDispatch = ctx->Exec; - ctx->FragmentProgram._MaintainTexEnvProgram - = (_mesa_getenv("MESA_TEX_PROG") != NULL); - - ctx->VertexProgram._MaintainTnlProgram - = (_mesa_getenv("MESA_TNL_PROG") != NULL); - if (ctx->VertexProgram._MaintainTnlProgram) { - /* this is required... */ - ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE; - } - /* Mesa core handles all the formats that mesa core knows about. * Drivers will want to override this list with just the formats * they can handle, and confirm that appropriate fallbacks exist in @@ -994,41 +710,15 @@ _mesa_initialize_context(struct gl_context *ctx, memset(&ctx->TextureFormatSupported, GL_TRUE, sizeof(ctx->TextureFormatSupported)); - switch (ctx->API) { - case API_OPENGL: -#if FEATURE_dlist - ctx->Save = _mesa_create_save_table(); - if (!ctx->Save) { - _mesa_reference_shared_state(ctx, &ctx->Shared, NULL); - free(ctx->Exec); - return GL_FALSE; - } - - _mesa_install_save_vtxfmt( ctx, &ctx->ListState.ListVtxfmt ); -#endif - break; - case API_OPENGLES: - /** - * GL_OES_texture_cube_map says - * "Initially all texture generation modes are set to REFLECTION_MAP_OES" - */ - for (i = 0; i < MAX_TEXTURE_UNITS; i++) { - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i]; - texUnit->GenS.Mode = GL_REFLECTION_MAP_NV; - texUnit->GenT.Mode = GL_REFLECTION_MAP_NV; - texUnit->GenR.Mode = GL_REFLECTION_MAP_NV; - texUnit->GenS._ModeBit = TEXGEN_REFLECTION_MAP_NV; - texUnit->GenT._ModeBit = TEXGEN_REFLECTION_MAP_NV; - texUnit->GenR._ModeBit = TEXGEN_REFLECTION_MAP_NV; - } - break; - case API_OPENGLES2: - ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE; - ctx->VertexProgram._MaintainTnlProgram = GL_TRUE; - ctx->Point.PointSprite = GL_TRUE; /* always on for ES 2.x */ - break; + ctx->Save = _mesa_create_save_table(); + if (!ctx->Save) { + _mesa_reference_shared_state(ctx, &ctx->Shared, NULL); + free(ctx->Exec); + return GL_FALSE; } + _mesa_install_save_vtxfmt( ctx, &ctx->ListState.ListVtxfmt ); + ctx->FirstTimeCurrent = GL_TRUE; return GL_TRUE; @@ -1051,8 +741,7 @@ _mesa_initialize_context(struct gl_context *ctx, * \return pointer to a new __struct gl_contextRec or NULL if error. */ struct gl_context * -_mesa_create_context(gl_api api, - const struct gl_config *visual, +_mesa_create_context(const struct gl_config *visual, struct gl_context *share_list, const struct dd_function_table *driverFunctions, void *driverContext) @@ -1066,7 +755,7 @@ _mesa_create_context(gl_api api, if (!ctx) return NULL; - if (_mesa_initialize_context(ctx, api, visual, share_list, + if (_mesa_initialize_context(ctx, visual, share_list, driverFunctions, driverContext)) { return ctx; } @@ -1100,14 +789,6 @@ _mesa_free_context_data( struct gl_context *ctx ) _mesa_reference_framebuffer(&ctx->DrawBuffer, NULL); _mesa_reference_framebuffer(&ctx->ReadBuffer, NULL); - _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current, NULL); - _mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current, NULL); - _mesa_reference_vertprog(ctx, &ctx->VertexProgram._TnlProgram, NULL); - - _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, NULL); - _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, NULL); - _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._TexEnvProgram, NULL); - _mesa_free_attrib_data(ctx); _mesa_free_buffer_objects(ctx); _mesa_free_lighting_data( ctx ); @@ -1115,21 +796,10 @@ _mesa_free_context_data( struct gl_context *ctx ) _mesa_free_texture_data( ctx ); _mesa_free_matrix_data( ctx ); _mesa_free_viewport_data( ctx ); - _mesa_free_program_data(ctx); - _mesa_free_shader_state(ctx); - _mesa_free_queryobj_data(ctx); - _mesa_free_sync_data(ctx); _mesa_free_varray_data(ctx); - _mesa_free_transform_feedback(ctx); _mesa_delete_array_object(ctx, ctx->Array.DefaultArrayObj); -#if FEATURE_ARB_pixel_buffer_object - _mesa_reference_buffer_object(ctx, &ctx->Pack.BufferObj, NULL); - _mesa_reference_buffer_object(ctx, &ctx->Unpack.BufferObj, NULL); - _mesa_reference_buffer_object(ctx, &ctx->DefaultPacking.BufferObj, NULL); -#endif - _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, NULL); /* free dispatch tables */ @@ -1312,9 +982,6 @@ check_compatible(const struct gl_context *ctx, const struct gl_config *ctxvis = &ctx->Visual; const struct gl_config *bufvis = &buffer->Visual; - if (buffer == _mesa_get_incomplete_framebuffer()) - return GL_TRUE; - #if 0 /* disabling this fixes the fgl_glxgears pbuffer demo */ if (ctxvis->doubleBufferMode && !bufvis->doubleBufferMode) @@ -1450,17 +1117,14 @@ _mesa_make_current( struct gl_context *newCtx, * Only set the context's Draw/ReadBuffer fields if they're NULL * or not bound to a user-created FBO. */ - if (!newCtx->DrawBuffer || newCtx->DrawBuffer->Name == 0) { - _mesa_reference_framebuffer(&newCtx->DrawBuffer, drawBuffer); - /* Update the FBO's list of drawbuffers/renderbuffers. - * For winsys FBOs this comes from the GL state (which may have - * changed since the last time this FBO was bound). - */ - _mesa_update_draw_buffers(newCtx); - } - if (!newCtx->ReadBuffer || newCtx->ReadBuffer->Name == 0) { - _mesa_reference_framebuffer(&newCtx->ReadBuffer, readBuffer); - } + _mesa_reference_framebuffer(&newCtx->DrawBuffer, drawBuffer); + /* Update the FBO's list of drawbuffers/renderbuffers. + * For winsys FBOs this comes from the GL state (which may have + * changed since the last time this FBO was bound). + */ + _mesa_update_draw_buffer(newCtx); + + _mesa_reference_framebuffer(&newCtx->ReadBuffer, readBuffer); /* XXX only set this flag if we're really changing the draw/read * framebuffer bindings. @@ -1510,15 +1174,6 @@ _mesa_make_current( struct gl_context *newCtx, check_context_limits(newCtx); - /* We can use this to help debug user's problems. Tell them to set - * the MESA_INFO env variable before running their app. Then the - * first time each context is made current we'll print some useful - * information. - */ - if (_mesa_getenv("MESA_INFO")) { - _mesa_print_info(); - } - newCtx->FirstTimeCurrent = GL_FALSE; } } @@ -1709,147 +1364,10 @@ _mesa_set_mvp_with_dp4( struct gl_context *ctx, GLboolean _mesa_valid_to_render(struct gl_context *ctx, const char *where) { - bool vert_from_glsl_shader = false; - bool geom_from_glsl_shader = false; - bool frag_from_glsl_shader = false; - /* This depends on having up to date derived state (shaders) */ if (ctx->NewState) _mesa_update_state(ctx); - if (ctx->Shader.CurrentVertexProgram) { - vert_from_glsl_shader = true; - - if (!ctx->Shader.CurrentVertexProgram->LinkStatus) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "%s(shader not linked)", where); - return GL_FALSE; - } -#if 0 /* not normally enabled */ - { - char errMsg[100]; - if (!_mesa_validate_shader_program(ctx, - ctx->Shader.CurrentVertexProgram, - errMsg)) { - _mesa_warning(ctx, "Shader program %u is invalid: %s", - ctx->Shader.CurrentVertexProgram->Name, errMsg); - } - } -#endif - } - - if (ctx->Shader.CurrentGeometryProgram) { - geom_from_glsl_shader = true; - - if (!ctx->Shader.CurrentGeometryProgram->LinkStatus) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "%s(shader not linked)", where); - return GL_FALSE; - } -#if 0 /* not normally enabled */ - { - char errMsg[100]; - if (!_mesa_validate_shader_program(ctx, - ctx->Shader.CurrentGeometryProgram, - errMsg)) { - _mesa_warning(ctx, "Shader program %u is invalid: %s", - ctx->Shader.CurrentGeometryProgram->Name, errMsg); - } - } -#endif - } - - if (ctx->Shader.CurrentFragmentProgram) { - frag_from_glsl_shader = true; - - if (!ctx->Shader.CurrentFragmentProgram->LinkStatus) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "%s(shader not linked)", where); - return GL_FALSE; - } -#if 0 /* not normally enabled */ - { - char errMsg[100]; - if (!_mesa_validate_shader_program(ctx, - ctx->Shader.CurrentFragmentProgram, - errMsg)) { - _mesa_warning(ctx, "Shader program %u is invalid: %s", - ctx->Shader.CurrentFragmentProgram->Name, errMsg); - } - } -#endif - } - - /* Any shader stages that are not supplied by the GLSL shader and have - * assembly shaders enabled must now be validated. - */ - if (!vert_from_glsl_shader - && ctx->VertexProgram.Enabled && !ctx->VertexProgram._Enabled) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "%s(vertex program not valid)", where); - return GL_FALSE; - } - - /* FINISHME: If GL_NV_geometry_program4 is ever supported, the current - * FINISHME: geometry program should validated here. - */ - (void) geom_from_glsl_shader; - - if (!frag_from_glsl_shader) { - if (ctx->FragmentProgram.Enabled && !ctx->FragmentProgram._Enabled) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "%s(fragment program not valid)", where); - return GL_FALSE; - } - - /* If drawing to integer-valued color buffers, there must be an - * active fragment shader (GL_EXT_texture_integer). - */ - if (ctx->DrawBuffer && ctx->DrawBuffer->_IntegerColor) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "%s(integer format but no fragment shader)", where); - return GL_FALSE; - } - } - - if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, - "%s(incomplete framebuffer)", where); - return GL_FALSE; - } - -#ifdef DEBUG - if (ctx->Shader.Flags & GLSL_LOG) { - struct gl_shader_program *shProg[MESA_SHADER_TYPES]; - gl_shader_type i; - - shProg[MESA_SHADER_VERTEX] = ctx->Shader.CurrentVertexProgram; - shProg[MESA_SHADER_GEOMETRY] = ctx->Shader.CurrentGeometryProgram; - shProg[MESA_SHADER_FRAGMENT] = ctx->Shader.CurrentFragmentProgram; - - for (i = 0; i < MESA_SHADER_TYPES; i++) { - if (shProg[i] == NULL || shProg[i]->_Used - || shProg[i]->_LinkedShaders[i] == NULL) - continue; - - /* This is the first time this shader is being used. - * Append shader's constants/uniforms to log file. - * - * Only log data for the program target that matches the shader - * target. It's possible to have a program bound to the vertex - * shader target that also supplied a fragment shader. If that - * program isn't also bound to the fragment shader target we don't - * want to log its fragment data. - */ - _mesa_append_uniforms_to_file(shProg[i]->_LinkedShaders[i]); - } - - for (i = 0; i < MESA_SHADER_TYPES; i++) { - if (shProg[i] != NULL) - shProg[i]->_Used = GL_TRUE; - } - } -#endif return GL_TRUE; } diff --git a/dll/opengl/mesa/src/mesa/main/context.h b/dll/opengl/mesa/main/context.h similarity index 96% rename from dll/opengl/mesa/src/mesa/main/context.h rename to dll/opengl/mesa/main/context.h index a66dd507670..f9d3b3f7f86 100644 --- a/dll/opengl/mesa/src/mesa/main/context.h +++ b/dll/opengl/mesa/main/context.h @@ -76,8 +76,7 @@ _mesa_create_visual( GLboolean dbFlag, GLint accumRedBits, GLint accumGreenBits, GLint accumBlueBits, - GLint accumAlphaBits, - GLint numSamples ); + GLint accumAlphaBits); extern GLboolean _mesa_initialize_visual( struct gl_config *v, @@ -92,8 +91,7 @@ _mesa_initialize_visual( struct gl_config *v, GLint accumRedBits, GLint accumGreenBits, GLint accumBlueBits, - GLint accumAlphaBits, - GLint numSamples ); + GLint accumAlphaBits); extern void _mesa_destroy_visual( struct gl_config *vis ); @@ -106,15 +104,13 @@ _mesa_destroy_visual( struct gl_config *vis ); extern GLboolean _mesa_initialize_context( struct gl_context *ctx, - gl_api api, const struct gl_config *visual, struct gl_context *share_list, const struct dd_function_table *driverFunctions, void *driverContext ); extern struct gl_context * -_mesa_create_context(gl_api api, - const struct gl_config *visual, +_mesa_create_context(const struct gl_config *visual, struct gl_context *share_list, const struct dd_function_table *driverFunctions, void *driverContext); diff --git a/dll/opengl/mesa/src/mesa/main/convolve.c b/dll/opengl/mesa/main/convolve.c similarity index 85% rename from dll/opengl/mesa/src/mesa/main/convolve.c rename to dll/opengl/mesa/main/convolve.c index 74f28da87ee..96f5156728c 100644 --- a/dll/opengl/mesa/src/mesa/main/convolve.c +++ b/dll/opengl/mesa/main/convolve.c @@ -115,8 +115,8 @@ _mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLi static void GLAPIENTRY -_mesa_GetnConvolutionFilterARB(GLenum target, GLenum format, GLenum type, - GLsizei bufSize, GLvoid *image) +_mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, + GLvoid *image) { GET_CURRENT_CONTEXT(ctx); @@ -124,14 +124,6 @@ _mesa_GetnConvolutionFilterARB(GLenum target, GLenum format, GLenum type, } -static void GLAPIENTRY -_mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, - GLvoid *image) -{ - _mesa_GetnConvolutionFilterARB(target, format, type, INT_MAX, image); -} - - static void GLAPIENTRY _mesa_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params) { @@ -151,10 +143,9 @@ _mesa_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params) static void GLAPIENTRY -_mesa_GetnSeparableFilterARB(GLenum target, GLenum format, GLenum type, - GLsizei rowBufSize, GLvoid *row, - GLsizei columnBufSize, GLvoid *column, - GLvoid *span) +_mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type, + GLvoid *row, GLvoid *column, + GLvoid *span) { GET_CURRENT_CONTEXT(ctx); @@ -162,15 +153,6 @@ _mesa_GetnSeparableFilterARB(GLenum target, GLenum format, GLenum type, } -static void GLAPIENTRY -_mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type, - GLvoid *row, GLvoid *column, GLvoid *span) -{ - _mesa_GetnSeparableFilterARB(target, format, type, INT_MAX, row, - INT_MAX, column, span); -} - - static void GLAPIENTRY _mesa_SeparableFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column) { @@ -195,10 +177,6 @@ _mesa_init_convolve_dispatch(struct _glapi_table *disp) SET_GetConvolutionParameteriv(disp, _mesa_GetConvolutionParameteriv); SET_SeparableFilter2D(disp, _mesa_SeparableFilter2D); SET_GetSeparableFilter(disp, _mesa_GetSeparableFilter); - - /* GL_ARB_robustness */ - SET_GetnConvolutionFilterARB(disp, _mesa_GetnConvolutionFilterARB); - SET_GetnSeparableFilterARB(disp, _mesa_GetnSeparableFilterARB); } diff --git a/dll/opengl/mesa/src/mesa/main/convolve.h b/dll/opengl/mesa/main/convolve.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/convolve.h rename to dll/opengl/mesa/main/convolve.h diff --git a/dll/opengl/mesa/src/mesa/main/core.h b/dll/opengl/mesa/main/core.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/core.h rename to dll/opengl/mesa/main/core.h diff --git a/dll/opengl/mesa/src/mesa/main/cpuinfo.c b/dll/opengl/mesa/main/cpuinfo.c similarity index 100% rename from dll/opengl/mesa/src/mesa/main/cpuinfo.c rename to dll/opengl/mesa/main/cpuinfo.c diff --git a/dll/opengl/mesa/src/mesa/main/cpuinfo.h b/dll/opengl/mesa/main/cpuinfo.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/cpuinfo.h rename to dll/opengl/mesa/main/cpuinfo.h diff --git a/dll/opengl/mesa/src/mesa/main/dd.h b/dll/opengl/mesa/main/dd.h similarity index 70% rename from dll/opengl/mesa/src/mesa/main/dd.h rename to dll/opengl/mesa/main/dd.h index 96311131a58..1af1c0ffad7 100644 --- a/dll/opengl/mesa/src/mesa/main/dd.h +++ b/dll/opengl/mesa/main/dd.h @@ -40,11 +40,8 @@ struct gl_context; struct gl_display_list; struct gl_framebuffer; struct gl_pixelstore_attrib; -struct gl_program; struct gl_renderbuffer; struct gl_renderbuffer_attachment; -struct gl_shader; -struct gl_shader_program; struct gl_texture_image; struct gl_texture_object; @@ -311,12 +308,6 @@ struct dd_function_table { GLint x, GLint y, GLsizei width, GLsizei height); - /** - * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled. - */ - void (*GenerateMipmap)(struct gl_context *ctx, GLenum target, - struct gl_texture_object *texObj); - /** * Called by glTexImage[123]D when user specifies a proxy texture * target. @@ -397,13 +388,6 @@ struct dd_function_table { GLsizei width, GLint height, GLint depth, GLenum format, GLsizei imageSize, const GLvoid *data); - - /** - * Called by glGetCompressedTexImage. - */ - void (*GetCompressedTexImage)(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLvoid *data); /*@}*/ /** @@ -494,44 +478,6 @@ struct dd_function_table { /*@}*/ - - /** - * \name Vertex/fragment program functions - */ - /*@{*/ - /** Bind a vertex/fragment program */ - void (*BindProgram)(struct gl_context *ctx, GLenum target, struct gl_program *prog); - /** Allocate a new program */ - struct gl_program * (*NewProgram)(struct gl_context *ctx, GLenum target, GLuint id); - /** Delete a program */ - void (*DeleteProgram)(struct gl_context *ctx, struct gl_program *prog); - /** - * Notify driver that a program string (and GPU code) has been specified - * or modified. Return GL_TRUE or GL_FALSE to indicate if the program is - * supported by the driver. - */ - GLboolean (*ProgramStringNotify)(struct gl_context *ctx, GLenum target, - struct gl_program *prog); - - /** Query if program can be loaded onto hardware */ - GLboolean (*IsProgramNative)(struct gl_context *ctx, GLenum target, - struct gl_program *prog); - - /*@}*/ - - /** - * \name GLSL shader/program functions. - */ - /*@{*/ - /** - * Called when a shader program is linked. - * - * This gives drivers an opportunity to clone the IR and make their - * own transformations on it for the purposes of code generation. - */ - GLboolean (*LinkShader)(struct gl_context *ctx, struct gl_shader_program *shader); - /*@}*/ - /** * \name State-changing functions. * @@ -569,8 +515,6 @@ struct dd_function_table { /** Enable and disable writing of frame buffer color components */ void (*ColorMask)(struct gl_context *ctx, GLboolean rmask, GLboolean gmask, GLboolean bmask, GLboolean amask ); - void (*ColorMaskIndexed)(struct gl_context *ctx, GLuint buf, GLboolean rmask, - GLboolean gmask, GLboolean bmask, GLboolean amask); /** Cause a material color to track the current color */ void (*ColorMaterial)(struct gl_context *ctx, GLenum face, GLenum mode); /** Specify whether front- or back-facing facets can be culled */ @@ -585,8 +529,6 @@ struct dd_function_table { void (*DepthRange)(struct gl_context *ctx, GLclampd nearval, GLclampd farval); /** Specify the current buffer for writing */ void (*DrawBuffer)( struct gl_context *ctx, GLenum buffer ); - /** Specify the buffers for writing for fragment programs*/ - void (*DrawBuffers)( struct gl_context *ctx, GLsizei n, const GLenum *buffers ); /** Enable or disable server-side gl capabilities */ void (*Enable)(struct gl_context *ctx, GLenum cap, GLboolean state); /** Specify fog parameters */ @@ -625,14 +567,6 @@ struct dd_function_table { void (*Scissor)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h); /** Select flat or smooth shading */ void (*ShadeModel)(struct gl_context *ctx, GLenum mode); - /** OpenGL 2.0 two-sided StencilFunc */ - void (*StencilFuncSeparate)(struct gl_context *ctx, GLenum face, GLenum func, - GLint ref, GLuint mask); - /** OpenGL 2.0 two-sided StencilMask */ - void (*StencilMaskSeparate)(struct gl_context *ctx, GLenum face, GLuint mask); - /** OpenGL 2.0 two-sided StencilOp */ - void (*StencilOpSeparate)(struct gl_context *ctx, GLenum face, GLenum fail, - GLenum zfail, GLenum zpass); /** Control the generation of texture coordinates */ void (*TexGen)(struct gl_context *ctx, GLenum coord, GLenum pname, const GLfloat *params); @@ -672,12 +606,6 @@ struct dd_function_table { GLintptrARB offset, GLsizeiptrARB size, GLvoid *data, struct gl_buffer_object *obj ); - void (*CopyBufferSubData)( struct gl_context *ctx, - struct gl_buffer_object *src, - struct gl_buffer_object *dst, - GLintptr readOffset, GLintptr writeOffset, - GLsizeiptr size ); - /* May return NULL if MESA_MAP_NOWAIT_BIT is set in access: */ void * (*MapBufferRange)( struct gl_context *ctx, GLintptr offset, @@ -707,44 +635,6 @@ struct dd_function_table { GLenum (*TextureObjectUnpurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option ); /*@}*/ - /** - * \name Functions for GL_EXT_framebuffer_{object,blit}. - */ - /*@{*/ - struct gl_framebuffer * (*NewFramebuffer)(struct gl_context *ctx, GLuint name); - struct gl_renderbuffer * (*NewRenderbuffer)(struct gl_context *ctx, GLuint name); - void (*BindFramebuffer)(struct gl_context *ctx, GLenum target, - struct gl_framebuffer *drawFb, - struct gl_framebuffer *readFb); - void (*FramebufferRenderbuffer)(struct gl_context *ctx, - struct gl_framebuffer *fb, - GLenum attachment, - struct gl_renderbuffer *rb); - void (*RenderTexture)(struct gl_context *ctx, - struct gl_framebuffer *fb, - struct gl_renderbuffer_attachment *att); - void (*FinishRenderTexture)(struct gl_context *ctx, - struct gl_renderbuffer_attachment *att); - void (*ValidateFramebuffer)(struct gl_context *ctx, - struct gl_framebuffer *fb); - /*@}*/ - void (*BlitFramebuffer)(struct gl_context *ctx, - GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, - GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, - GLbitfield mask, GLenum filter); - - /** - * \name Query objects - */ - /*@{*/ - struct gl_query_object * (*NewQueryObject)(struct gl_context *ctx, GLuint id); - void (*DeleteQuery)(struct gl_context *ctx, struct gl_query_object *q); - void (*BeginQuery)(struct gl_context *ctx, struct gl_query_object *q); - void (*EndQuery)(struct gl_context *ctx, struct gl_query_object *q); - void (*CheckQuery)(struct gl_context *ctx, struct gl_query_object *q); - void (*WaitQuery)(struct gl_context *ctx, struct gl_query_object *q); - /*@}*/ - /** * \name Vertex Array objects @@ -755,18 +645,6 @@ struct dd_function_table { void (*BindArrayObject)(struct gl_context *ctx, struct gl_array_object *obj); /*@}*/ - /** - * \name GLSL-related functions (ARB extensions and OpenGL 2.x) - */ - /*@{*/ - struct gl_shader *(*NewShader)(struct gl_context *ctx, GLuint name, GLenum type); - void (*DeleteShader)(struct gl_context *ctx, struct gl_shader *shader); - struct gl_shader_program *(*NewShaderProgram)(struct gl_context *ctx, GLuint name); - void (*DeleteShaderProgram)(struct gl_context *ctx, - struct gl_shader_program *shProg); - void (*UseProgram)(struct gl_context *ctx, struct gl_shader_program *shProg); - /*@}*/ - /** * \name Support for multiple T&L engines @@ -871,72 +749,10 @@ struct dd_function_table { /**@}*/ - /** - * \name GL_ARB_sync interfaces - */ - /*@{*/ - struct gl_sync_object * (*NewSyncObject)(struct gl_context *, GLenum); - void (*FenceSync)(struct gl_context *, struct gl_sync_object *, GLenum, GLbitfield); - void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *); - void (*CheckSync)(struct gl_context *, struct gl_sync_object *); - void (*ClientWaitSync)(struct gl_context *, struct gl_sync_object *, - GLbitfield, GLuint64); - void (*ServerWaitSync)(struct gl_context *, struct gl_sync_object *, - GLbitfield, GLuint64); - /*@}*/ - - /** GL_NV_conditional_render */ - void (*BeginConditionalRender)(struct gl_context *ctx, struct gl_query_object *q, - GLenum mode); - void (*EndConditionalRender)(struct gl_context *ctx, struct gl_query_object *q); - - /** - * \name GL_OES_draw_texture interface - */ - /*@{*/ - void (*DrawTex)(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, - GLfloat width, GLfloat height); - /*@}*/ - - /** - * \name GL_OES_EGL_image interface - */ - void (*EGLImageTargetTexture2D)(struct gl_context *ctx, GLenum target, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage, - GLeglImageOES image_handle); - void (*EGLImageTargetRenderbufferStorage)(struct gl_context *ctx, - struct gl_renderbuffer *rb, - void *image_handle); - - /** - * \name GL_EXT_transform_feedback interface - */ - struct gl_transform_feedback_object * - (*NewTransformFeedback)(struct gl_context *ctx, GLuint name); - void (*DeleteTransformFeedback)(struct gl_context *ctx, - struct gl_transform_feedback_object *obj); - void (*BeginTransformFeedback)(struct gl_context *ctx, GLenum mode, - struct gl_transform_feedback_object *obj); - void (*EndTransformFeedback)(struct gl_context *ctx, - struct gl_transform_feedback_object *obj); - void (*PauseTransformFeedback)(struct gl_context *ctx, - struct gl_transform_feedback_object *obj); - void (*ResumeTransformFeedback)(struct gl_context *ctx, - struct gl_transform_feedback_object *obj); - /** * \name GL_NV_texture_barrier interface */ void (*TextureBarrier)(struct gl_context *ctx); - - /** - * \name GL_ARB_sampler_objects - */ - struct gl_sampler_object * (*NewSamplerObject)(struct gl_context *ctx, - GLuint name); - void (*DeleteSamplerObject)(struct gl_context *ctx, - struct gl_sampler_object *samp); }; @@ -1010,7 +826,6 @@ typedef struct { void (GLAPIENTRYP CallLists)( GLsizei, GLenum, const GLvoid * ); void (GLAPIENTRYP Begin)( GLenum ); void (GLAPIENTRYP End)( void ); - void (GLAPIENTRYP PrimitiveRestartNV)( void ); /* GL_NV_vertex_program */ void (GLAPIENTRYP VertexAttrib1fNV)( GLuint index, GLfloat x ); void (GLAPIENTRYP VertexAttrib1fvNV)( GLuint index, const GLfloat *v ); @@ -1020,96 +835,6 @@ typedef struct { void (GLAPIENTRYP VertexAttrib3fvNV)( GLuint index, const GLfloat *v ); void (GLAPIENTRYP VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); void (GLAPIENTRYP VertexAttrib4fvNV)( GLuint index, const GLfloat *v ); - /* GL_ARB_vertex_program */ - void (GLAPIENTRYP VertexAttrib1fARB)( GLuint index, GLfloat x ); - void (GLAPIENTRYP VertexAttrib1fvARB)( GLuint index, const GLfloat *v ); - void (GLAPIENTRYP VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y ); - void (GLAPIENTRYP VertexAttrib2fvARB)( GLuint index, const GLfloat *v ); - void (GLAPIENTRYP VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z ); - void (GLAPIENTRYP VertexAttrib3fvARB)( GLuint index, const GLfloat *v ); - void (GLAPIENTRYP VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); - void (GLAPIENTRYP VertexAttrib4fvARB)( GLuint index, const GLfloat *v ); - - /* GL_EXT_gpu_shader4 / GL 3.0 */ - void (GLAPIENTRYP VertexAttribI1i)( GLuint index, GLint x); - void (GLAPIENTRYP VertexAttribI2i)( GLuint index, GLint x, GLint y); - void (GLAPIENTRYP VertexAttribI3i)( GLuint index, GLint x, GLint y, GLint z); - void (GLAPIENTRYP VertexAttribI4i)( GLuint index, GLint x, GLint y, GLint z, GLint w); - void (GLAPIENTRYP VertexAttribI2iv)( GLuint index, const GLint *v); - void (GLAPIENTRYP VertexAttribI3iv)( GLuint index, const GLint *v); - void (GLAPIENTRYP VertexAttribI4iv)( GLuint index, const GLint *v); - - void (GLAPIENTRYP VertexAttribI1ui)( GLuint index, GLuint x); - void (GLAPIENTRYP VertexAttribI2ui)( GLuint index, GLuint x, GLuint y); - void (GLAPIENTRYP VertexAttribI3ui)( GLuint index, GLuint x, GLuint y, GLuint z); - void (GLAPIENTRYP VertexAttribI4ui)( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); - void (GLAPIENTRYP VertexAttribI2uiv)( GLuint index, const GLuint *v); - void (GLAPIENTRYP VertexAttribI3uiv)( GLuint index, const GLuint *v); - void (GLAPIENTRYP VertexAttribI4uiv)( GLuint index, const GLuint *v); - - /* GL_ARB_vertex_type_10_10_10_2_rev / GL3.3 */ - void (GLAPIENTRYP VertexP2ui)( GLenum type, GLuint value ); - void (GLAPIENTRYP VertexP2uiv)( GLenum type, const GLuint *value); - - void (GLAPIENTRYP VertexP3ui)( GLenum type, GLuint value ); - void (GLAPIENTRYP VertexP3uiv)( GLenum type, const GLuint *value); - - void (GLAPIENTRYP VertexP4ui)( GLenum type, GLuint value ); - void (GLAPIENTRYP VertexP4uiv)( GLenum type, const GLuint *value); - - void (GLAPIENTRYP TexCoordP1ui)( GLenum type, GLuint coords ); - void (GLAPIENTRYP TexCoordP1uiv)( GLenum type, const GLuint *coords ); - - void (GLAPIENTRYP TexCoordP2ui)( GLenum type, GLuint coords ); - void (GLAPIENTRYP TexCoordP2uiv)( GLenum type, const GLuint *coords ); - - void (GLAPIENTRYP TexCoordP3ui)( GLenum type, GLuint coords ); - void (GLAPIENTRYP TexCoordP3uiv)( GLenum type, const GLuint *coords ); - - void (GLAPIENTRYP TexCoordP4ui)( GLenum type, GLuint coords ); - void (GLAPIENTRYP TexCoordP4uiv)( GLenum type, const GLuint *coords ); - - void (GLAPIENTRYP MultiTexCoordP1ui)( GLenum texture, GLenum type, GLuint coords ); - void (GLAPIENTRYP MultiTexCoordP1uiv)( GLenum texture, GLenum type, const GLuint *coords ); - void (GLAPIENTRYP MultiTexCoordP2ui)( GLenum texture, GLenum type, GLuint coords ); - void (GLAPIENTRYP MultiTexCoordP2uiv)( GLenum texture, GLenum type, const GLuint *coords ); - void (GLAPIENTRYP MultiTexCoordP3ui)( GLenum texture, GLenum type, GLuint coords ); - void (GLAPIENTRYP MultiTexCoordP3uiv)( GLenum texture, GLenum type, const GLuint *coords ); - void (GLAPIENTRYP MultiTexCoordP4ui)( GLenum texture, GLenum type, GLuint coords ); - void (GLAPIENTRYP MultiTexCoordP4uiv)( GLenum texture, GLenum type, const GLuint *coords ); - - void (GLAPIENTRYP NormalP3ui)( GLenum type, GLuint coords ); - void (GLAPIENTRYP NormalP3uiv)( GLenum type, const GLuint *coords ); - - void (GLAPIENTRYP ColorP3ui)( GLenum type, GLuint color ); - void (GLAPIENTRYP ColorP3uiv)( GLenum type, const GLuint *color ); - - void (GLAPIENTRYP ColorP4ui)( GLenum type, GLuint color ); - void (GLAPIENTRYP ColorP4uiv)( GLenum type, const GLuint *color ); - - void (GLAPIENTRYP SecondaryColorP3ui)( GLenum type, GLuint color ); - void (GLAPIENTRYP SecondaryColorP3uiv)( GLenum type, const GLuint *color ); - - void (GLAPIENTRYP VertexAttribP1ui)( GLuint index, GLenum type, - GLboolean normalized, GLuint value); - void (GLAPIENTRYP VertexAttribP2ui)( GLuint index, GLenum type, - GLboolean normalized, GLuint value); - void (GLAPIENTRYP VertexAttribP3ui)( GLuint index, GLenum type, - GLboolean normalized, GLuint value); - void (GLAPIENTRYP VertexAttribP4ui)( GLuint index, GLenum type, - GLboolean normalized, GLuint value); - void (GLAPIENTRYP VertexAttribP1uiv)( GLuint index, GLenum type, - GLboolean normalized, - const GLuint *value); - void (GLAPIENTRYP VertexAttribP2uiv)( GLuint index, GLenum type, - GLboolean normalized, - const GLuint *value); - void (GLAPIENTRYP VertexAttribP3uiv)( GLuint index, GLenum type, - GLboolean normalized, - const GLuint *value); - void (GLAPIENTRYP VertexAttribP4uiv)( GLuint index, GLenum type, - GLboolean normalized, - const GLuint *value); /*@}*/ @@ -1125,34 +850,6 @@ typedef struct { void (GLAPIENTRYP DrawRangeElements)( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices ); - void (GLAPIENTRYP MultiDrawElementsEXT)( GLenum mode, const GLsizei *count, - GLenum type, - const GLvoid **indices, - GLsizei primcount); - void (GLAPIENTRYP DrawElementsBaseVertex)( GLenum mode, GLsizei count, - GLenum type, - const GLvoid *indices, - GLint basevertex ); - void (GLAPIENTRYP DrawRangeElementsBaseVertex)( GLenum mode, GLuint start, - GLuint end, GLsizei count, - GLenum type, - const GLvoid *indices, - GLint basevertex); - void (GLAPIENTRYP MultiDrawElementsBaseVertex)( GLenum mode, - const GLsizei *count, - GLenum type, - const GLvoid **indices, - GLsizei primcount, - const GLint *basevertex); - void (GLAPIENTRYP DrawArraysInstanced)(GLenum mode, GLint first, - GLsizei count, GLsizei primcount); - void (GLAPIENTRYP DrawElementsInstanced)(GLenum mode, GLsizei count, - GLenum type, const GLvoid *indices, - GLsizei primcount); - void (GLAPIENTRYP DrawElementsInstancedBaseVertex)(GLenum mode, GLsizei count, - GLenum type, const GLvoid *indices, - GLsizei primcount, GLint basevertex); - void (GLAPIENTRYP DrawTransformFeedback)(GLenum mode, GLuint name); /*@}*/ /** diff --git a/dll/opengl/mesa/src/mesa/main/depth.c b/dll/opengl/mesa/main/depth.c similarity index 98% rename from dll/opengl/mesa/src/mesa/main/depth.c rename to dll/opengl/mesa/main/depth.c index 52c69a6bcd9..9aa9f64ea6f 100644 --- a/dll/opengl/mesa/src/mesa/main/depth.c +++ b/dll/opengl/mesa/main/depth.c @@ -59,13 +59,6 @@ _mesa_ClearDepth( GLclampd depth ) } -void GLAPIENTRY -_mesa_ClearDepthf( GLclampf depth ) -{ - _mesa_ClearDepth(depth); -} - - void GLAPIENTRY _mesa_DepthFunc( GLenum func ) { diff --git a/dll/opengl/mesa/src/mesa/main/depth.h b/dll/opengl/mesa/main/depth.h similarity index 96% rename from dll/opengl/mesa/src/mesa/main/depth.h rename to dll/opengl/mesa/main/depth.h index 2f428629f9a..b498a471534 100644 --- a/dll/opengl/mesa/src/mesa/main/depth.h +++ b/dll/opengl/mesa/main/depth.h @@ -43,9 +43,6 @@ struct gl_context; extern void GLAPIENTRY _mesa_ClearDepth( GLclampd depth ); -extern void GLAPIENTRY -_mesa_ClearDepthf( GLclampf depth ); - extern void GLAPIENTRY _mesa_DepthFunc( GLenum func ); diff --git a/dll/opengl/mesa/src/mesa/main/dispatch.h b/dll/opengl/mesa/main/dispatch.h similarity index 55% rename from dll/opengl/mesa/src/mesa/main/dispatch.h rename to dll/opengl/mesa/main/dispatch.h index 19eabb85c81..f9ecac92781 100644 --- a/dll/opengl/mesa/src/mesa/main/dispatch.h +++ b/dll/opengl/mesa/main/dispatch.h @@ -28,6 +28,8 @@ #if !defined( _DISPATCH_H_ ) # define _DISPATCH_H_ +typedef PROC _glapi_proc; + /** * \file main/dispatch.h @@ -439,145 +441,17 @@ #define _gloffset_TexImage3D 371 #define _gloffset_TexSubImage3D 372 #define _gloffset_CopyTexSubImage3D 373 -#define _gloffset_ActiveTextureARB 374 -#define _gloffset_ClientActiveTextureARB 375 -#define _gloffset_MultiTexCoord1dARB 376 -#define _gloffset_MultiTexCoord1dvARB 377 -#define _gloffset_MultiTexCoord1fARB 378 -#define _gloffset_MultiTexCoord1fvARB 379 -#define _gloffset_MultiTexCoord1iARB 380 -#define _gloffset_MultiTexCoord1ivARB 381 -#define _gloffset_MultiTexCoord1sARB 382 -#define _gloffset_MultiTexCoord1svARB 383 -#define _gloffset_MultiTexCoord2dARB 384 -#define _gloffset_MultiTexCoord2dvARB 385 -#define _gloffset_MultiTexCoord2fARB 386 -#define _gloffset_MultiTexCoord2fvARB 387 -#define _gloffset_MultiTexCoord2iARB 388 -#define _gloffset_MultiTexCoord2ivARB 389 -#define _gloffset_MultiTexCoord2sARB 390 -#define _gloffset_MultiTexCoord2svARB 391 -#define _gloffset_MultiTexCoord3dARB 392 -#define _gloffset_MultiTexCoord3dvARB 393 -#define _gloffset_MultiTexCoord3fARB 394 -#define _gloffset_MultiTexCoord3fvARB 395 -#define _gloffset_MultiTexCoord3iARB 396 -#define _gloffset_MultiTexCoord3ivARB 397 -#define _gloffset_MultiTexCoord3sARB 398 -#define _gloffset_MultiTexCoord3svARB 399 -#define _gloffset_MultiTexCoord4dARB 400 -#define _gloffset_MultiTexCoord4dvARB 401 -#define _gloffset_MultiTexCoord4fARB 402 -#define _gloffset_MultiTexCoord4fvARB 403 -#define _gloffset_MultiTexCoord4iARB 404 -#define _gloffset_MultiTexCoord4ivARB 405 -#define _gloffset_MultiTexCoord4sARB 406 -#define _gloffset_MultiTexCoord4svARB 407 #if !FEATURE_remap_table -#define _gloffset_AttachShader 408 -#define _gloffset_CreateProgram 409 -#define _gloffset_CreateShader 410 -#define _gloffset_DeleteProgram 411 -#define _gloffset_DeleteShader 412 -#define _gloffset_DetachShader 413 -#define _gloffset_GetAttachedShaders 414 -#define _gloffset_GetProgramInfoLog 415 -#define _gloffset_GetProgramiv 416 -#define _gloffset_GetShaderInfoLog 417 -#define _gloffset_GetShaderiv 418 -#define _gloffset_IsProgram 419 -#define _gloffset_IsShader 420 -#define _gloffset_StencilFuncSeparate 421 -#define _gloffset_StencilMaskSeparate 422 -#define _gloffset_StencilOpSeparate 423 -#define _gloffset_UniformMatrix2x3fv 424 -#define _gloffset_UniformMatrix2x4fv 425 -#define _gloffset_UniformMatrix3x2fv 426 -#define _gloffset_UniformMatrix3x4fv 427 -#define _gloffset_UniformMatrix4x2fv 428 -#define _gloffset_UniformMatrix4x3fv 429 -#define _gloffset_ClampColor 430 -#define _gloffset_ClearBufferfi 431 -#define _gloffset_ClearBufferfv 432 -#define _gloffset_ClearBufferiv 433 -#define _gloffset_ClearBufferuiv 434 #define _gloffset_GetStringi 435 -#define _gloffset_TexBuffer 436 -#define _gloffset_FramebufferTexture 437 #define _gloffset_GetBufferParameteri64v 438 #define _gloffset_GetInteger64i_v 439 -#define _gloffset_VertexAttribDivisor 440 #define _gloffset_LoadTransposeMatrixdARB 441 #define _gloffset_LoadTransposeMatrixfARB 442 #define _gloffset_MultTransposeMatrixdARB 443 #define _gloffset_MultTransposeMatrixfARB 444 #define _gloffset_SampleCoverageARB 445 -#define _gloffset_CompressedTexImage1DARB 446 -#define _gloffset_CompressedTexImage2DARB 447 -#define _gloffset_CompressedTexImage3DARB 448 -#define _gloffset_CompressedTexSubImage1DARB 449 -#define _gloffset_CompressedTexSubImage2DARB 450 -#define _gloffset_CompressedTexSubImage3DARB 451 -#define _gloffset_GetCompressedTexImageARB 452 -#define _gloffset_DisableVertexAttribArrayARB 453 -#define _gloffset_EnableVertexAttribArrayARB 454 -#define _gloffset_GetProgramEnvParameterdvARB 455 -#define _gloffset_GetProgramEnvParameterfvARB 456 -#define _gloffset_GetProgramLocalParameterdvARB 457 -#define _gloffset_GetProgramLocalParameterfvARB 458 -#define _gloffset_GetProgramStringARB 459 -#define _gloffset_GetProgramivARB 460 -#define _gloffset_GetVertexAttribdvARB 461 -#define _gloffset_GetVertexAttribfvARB 462 -#define _gloffset_GetVertexAttribivARB 463 -#define _gloffset_ProgramEnvParameter4dARB 464 -#define _gloffset_ProgramEnvParameter4dvARB 465 -#define _gloffset_ProgramEnvParameter4fARB 466 -#define _gloffset_ProgramEnvParameter4fvARB 467 -#define _gloffset_ProgramLocalParameter4dARB 468 -#define _gloffset_ProgramLocalParameter4dvARB 469 -#define _gloffset_ProgramLocalParameter4fARB 470 -#define _gloffset_ProgramLocalParameter4fvARB 471 -#define _gloffset_ProgramStringARB 472 -#define _gloffset_VertexAttrib1dARB 473 -#define _gloffset_VertexAttrib1dvARB 474 -#define _gloffset_VertexAttrib1fARB 475 -#define _gloffset_VertexAttrib1fvARB 476 -#define _gloffset_VertexAttrib1sARB 477 -#define _gloffset_VertexAttrib1svARB 478 -#define _gloffset_VertexAttrib2dARB 479 -#define _gloffset_VertexAttrib2dvARB 480 -#define _gloffset_VertexAttrib2fARB 481 -#define _gloffset_VertexAttrib2fvARB 482 -#define _gloffset_VertexAttrib2sARB 483 -#define _gloffset_VertexAttrib2svARB 484 -#define _gloffset_VertexAttrib3dARB 485 -#define _gloffset_VertexAttrib3dvARB 486 -#define _gloffset_VertexAttrib3fARB 487 -#define _gloffset_VertexAttrib3fvARB 488 -#define _gloffset_VertexAttrib3sARB 489 -#define _gloffset_VertexAttrib3svARB 490 -#define _gloffset_VertexAttrib4NbvARB 491 -#define _gloffset_VertexAttrib4NivARB 492 -#define _gloffset_VertexAttrib4NsvARB 493 -#define _gloffset_VertexAttrib4NubARB 494 -#define _gloffset_VertexAttrib4NubvARB 495 -#define _gloffset_VertexAttrib4NuivARB 496 -#define _gloffset_VertexAttrib4NusvARB 497 -#define _gloffset_VertexAttrib4bvARB 498 -#define _gloffset_VertexAttrib4dARB 499 -#define _gloffset_VertexAttrib4dvARB 500 -#define _gloffset_VertexAttrib4fARB 501 -#define _gloffset_VertexAttrib4fvARB 502 -#define _gloffset_VertexAttrib4ivARB 503 -#define _gloffset_VertexAttrib4sARB 504 -#define _gloffset_VertexAttrib4svARB 505 -#define _gloffset_VertexAttrib4ubvARB 506 -#define _gloffset_VertexAttrib4uivARB 507 -#define _gloffset_VertexAttrib4usvARB 508 -#define _gloffset_VertexAttribPointerARB 509 #define _gloffset_BindBufferARB 510 #define _gloffset_BufferDataARB 511 #define _gloffset_BufferSubDataARB 512 @@ -589,170 +463,26 @@ #define _gloffset_IsBufferARB 518 #define _gloffset_MapBufferARB 519 #define _gloffset_UnmapBufferARB 520 -#define _gloffset_BeginQueryARB 521 -#define _gloffset_DeleteQueriesARB 522 -#define _gloffset_EndQueryARB 523 -#define _gloffset_GenQueriesARB 524 -#define _gloffset_GetQueryObjectivARB 525 -#define _gloffset_GetQueryObjectuivARB 526 -#define _gloffset_GetQueryivARB 527 -#define _gloffset_IsQueryARB 528 #define _gloffset_AttachObjectARB 529 #define _gloffset_CompileShaderARB 530 #define _gloffset_CreateProgramObjectARB 531 #define _gloffset_CreateShaderObjectARB 532 #define _gloffset_DeleteObjectARB 533 #define _gloffset_DetachObjectARB 534 -#define _gloffset_GetActiveUniformARB 535 #define _gloffset_GetAttachedObjectsARB 536 #define _gloffset_GetHandleARB 537 #define _gloffset_GetInfoLogARB 538 #define _gloffset_GetObjectParameterfvARB 539 #define _gloffset_GetObjectParameterivARB 540 #define _gloffset_GetShaderSourceARB 541 -#define _gloffset_GetUniformLocationARB 542 -#define _gloffset_GetUniformfvARB 543 -#define _gloffset_GetUniformivARB 544 #define _gloffset_LinkProgramARB 545 #define _gloffset_ShaderSourceARB 546 -#define _gloffset_Uniform1fARB 547 -#define _gloffset_Uniform1fvARB 548 -#define _gloffset_Uniform1iARB 549 -#define _gloffset_Uniform1ivARB 550 -#define _gloffset_Uniform2fARB 551 -#define _gloffset_Uniform2fvARB 552 -#define _gloffset_Uniform2iARB 553 -#define _gloffset_Uniform2ivARB 554 -#define _gloffset_Uniform3fARB 555 -#define _gloffset_Uniform3fvARB 556 -#define _gloffset_Uniform3iARB 557 -#define _gloffset_Uniform3ivARB 558 -#define _gloffset_Uniform4fARB 559 -#define _gloffset_Uniform4fvARB 560 -#define _gloffset_Uniform4iARB 561 -#define _gloffset_Uniform4ivARB 562 -#define _gloffset_UniformMatrix2fvARB 563 -#define _gloffset_UniformMatrix3fvARB 564 -#define _gloffset_UniformMatrix4fvARB 565 -#define _gloffset_UseProgramObjectARB 566 #define _gloffset_ValidateProgramARB 567 -#define _gloffset_BindAttribLocationARB 568 #define _gloffset_GetActiveAttribARB 569 -#define _gloffset_GetAttribLocationARB 570 -#define _gloffset_DrawBuffersARB 571 -#define _gloffset_ClampColorARB 572 -#define _gloffset_DrawArraysInstancedARB 573 -#define _gloffset_DrawElementsInstancedARB 574 -#define _gloffset_RenderbufferStorageMultisample 575 -#define _gloffset_FramebufferTextureARB 576 -#define _gloffset_FramebufferTextureFaceARB 577 -#define _gloffset_ProgramParameteriARB 578 -#define _gloffset_VertexAttribDivisorARB 579 #define _gloffset_FlushMappedBufferRange 580 #define _gloffset_MapBufferRange 581 -#define _gloffset_TexBufferARB 582 #define _gloffset_BindVertexArray 583 #define _gloffset_GenVertexArrays 584 -#define _gloffset_CopyBufferSubData 585 -#define _gloffset_ClientWaitSync 586 -#define _gloffset_DeleteSync 587 -#define _gloffset_FenceSync 588 -#define _gloffset_GetInteger64v 589 -#define _gloffset_GetSynciv 590 -#define _gloffset_IsSync 591 -#define _gloffset_WaitSync 592 -#define _gloffset_DrawElementsBaseVertex 593 -#define _gloffset_DrawElementsInstancedBaseVertex 594 -#define _gloffset_DrawRangeElementsBaseVertex 595 -#define _gloffset_MultiDrawElementsBaseVertex 596 -#define _gloffset_BlendEquationSeparateiARB 597 -#define _gloffset_BlendEquationiARB 598 -#define _gloffset_BlendFuncSeparateiARB 599 -#define _gloffset_BlendFunciARB 600 -#define _gloffset_BindSampler 601 -#define _gloffset_DeleteSamplers 602 -#define _gloffset_GenSamplers 603 -#define _gloffset_GetSamplerParameterIiv 604 -#define _gloffset_GetSamplerParameterIuiv 605 -#define _gloffset_GetSamplerParameterfv 606 -#define _gloffset_GetSamplerParameteriv 607 -#define _gloffset_IsSampler 608 -#define _gloffset_SamplerParameterIiv 609 -#define _gloffset_SamplerParameterIuiv 610 -#define _gloffset_SamplerParameterf 611 -#define _gloffset_SamplerParameterfv 612 -#define _gloffset_SamplerParameteri 613 -#define _gloffset_SamplerParameteriv 614 -#define _gloffset_ColorP3ui 615 -#define _gloffset_ColorP3uiv 616 -#define _gloffset_ColorP4ui 617 -#define _gloffset_ColorP4uiv 618 -#define _gloffset_MultiTexCoordP1ui 619 -#define _gloffset_MultiTexCoordP1uiv 620 -#define _gloffset_MultiTexCoordP2ui 621 -#define _gloffset_MultiTexCoordP2uiv 622 -#define _gloffset_MultiTexCoordP3ui 623 -#define _gloffset_MultiTexCoordP3uiv 624 -#define _gloffset_MultiTexCoordP4ui 625 -#define _gloffset_MultiTexCoordP4uiv 626 -#define _gloffset_NormalP3ui 627 -#define _gloffset_NormalP3uiv 628 -#define _gloffset_SecondaryColorP3ui 629 -#define _gloffset_SecondaryColorP3uiv 630 -#define _gloffset_TexCoordP1ui 631 -#define _gloffset_TexCoordP1uiv 632 -#define _gloffset_TexCoordP2ui 633 -#define _gloffset_TexCoordP2uiv 634 -#define _gloffset_TexCoordP3ui 635 -#define _gloffset_TexCoordP3uiv 636 -#define _gloffset_TexCoordP4ui 637 -#define _gloffset_TexCoordP4uiv 638 -#define _gloffset_VertexAttribP1ui 639 -#define _gloffset_VertexAttribP1uiv 640 -#define _gloffset_VertexAttribP2ui 641 -#define _gloffset_VertexAttribP2uiv 642 -#define _gloffset_VertexAttribP3ui 643 -#define _gloffset_VertexAttribP3uiv 644 -#define _gloffset_VertexAttribP4ui 645 -#define _gloffset_VertexAttribP4uiv 646 -#define _gloffset_VertexP2ui 647 -#define _gloffset_VertexP2uiv 648 -#define _gloffset_VertexP3ui 649 -#define _gloffset_VertexP3uiv 650 -#define _gloffset_VertexP4ui 651 -#define _gloffset_VertexP4uiv 652 -#define _gloffset_BindTransformFeedback 653 -#define _gloffset_DeleteTransformFeedbacks 654 -#define _gloffset_DrawTransformFeedback 655 -#define _gloffset_GenTransformFeedbacks 656 -#define _gloffset_IsTransformFeedback 657 -#define _gloffset_PauseTransformFeedback 658 -#define _gloffset_ResumeTransformFeedback 659 -#define _gloffset_ClearDepthf 660 -#define _gloffset_DepthRangef 661 -#define _gloffset_GetShaderPrecisionFormat 662 -#define _gloffset_ReleaseShaderCompiler 663 -#define _gloffset_ShaderBinary 664 -#define _gloffset_GetGraphicsResetStatusARB 665 -#define _gloffset_GetnColorTableARB 666 -#define _gloffset_GetnCompressedTexImageARB 667 -#define _gloffset_GetnConvolutionFilterARB 668 -#define _gloffset_GetnHistogramARB 669 -#define _gloffset_GetnMapdvARB 670 -#define _gloffset_GetnMapfvARB 671 -#define _gloffset_GetnMapivARB 672 -#define _gloffset_GetnMinmaxARB 673 -#define _gloffset_GetnPixelMapfvARB 674 -#define _gloffset_GetnPixelMapuivARB 675 -#define _gloffset_GetnPixelMapusvARB 676 -#define _gloffset_GetnPolygonStippleARB 677 -#define _gloffset_GetnSeparableFilterARB 678 -#define _gloffset_GetnTexImageARB 679 -#define _gloffset_GetnUniformdvARB 680 -#define _gloffset_GetnUniformfvARB 681 -#define _gloffset_GetnUniformivARB 682 -#define _gloffset_GetnUniformuivARB 683 -#define _gloffset_ReadnPixelsARB 684 #define _gloffset_TexStorage1D 685 #define _gloffset_TexStorage2D 686 #define _gloffset_TexStorage3D 687 @@ -760,12 +490,6 @@ #define _gloffset_TextureStorage2DEXT 689 #define _gloffset_TextureStorage3DEXT 690 #define _gloffset_PolygonOffsetEXT 691 -#define _gloffset_GetPixelTexGenParameterfvSGIS 692 -#define _gloffset_GetPixelTexGenParameterivSGIS 693 -#define _gloffset_PixelTexGenParameterfSGIS 694 -#define _gloffset_PixelTexGenParameterfvSGIS 695 -#define _gloffset_PixelTexGenParameteriSGIS 696 -#define _gloffset_PixelTexGenParameterivSGIS 697 #define _gloffset_SampleMaskSGIS 698 #define _gloffset_SamplePatternSGIS 699 #define _gloffset_ColorPointerEXT 700 @@ -795,8 +519,6 @@ #define _gloffset_SecondaryColor3usEXT 724 #define _gloffset_SecondaryColor3usvEXT 725 #define _gloffset_SecondaryColorPointerEXT 726 -#define _gloffset_MultiDrawArraysEXT 727 -#define _gloffset_MultiDrawElementsEXT 728 #define _gloffset_FogCoordPointerEXT 729 #define _gloffset_FogCoorddEXT 730 #define _gloffset_FogCoorddvEXT 731 @@ -819,7 +541,6 @@ #define _gloffset_GetCombinerOutputParameterivNV 748 #define _gloffset_GetFinalCombinerInputParameterfvNV 749 #define _gloffset_GetFinalCombinerInputParameterivNV 750 -#define _gloffset_ResizeBuffersMESA 751 #define _gloffset_WindowPos2dMESA 752 #define _gloffset_WindowPos2dvMESA 753 #define _gloffset_WindowPos2fMESA 754 @@ -854,20 +575,10 @@ #define _gloffset_SetFenceNV 783 #define _gloffset_TestFenceNV 784 #define _gloffset_AreProgramsResidentNV 785 -#define _gloffset_BindProgramNV 786 -#define _gloffset_DeleteProgramsNV 787 #define _gloffset_ExecuteProgramNV 788 -#define _gloffset_GenProgramsNV 789 #define _gloffset_GetProgramParameterdvNV 790 #define _gloffset_GetProgramParameterfvNV 791 -#define _gloffset_GetProgramStringNV 792 -#define _gloffset_GetProgramivNV 793 #define _gloffset_GetTrackMatrixivNV 794 -#define _gloffset_GetVertexAttribPointervNV 795 -#define _gloffset_GetVertexAttribdvNV 796 -#define _gloffset_GetVertexAttribfvNV 797 -#define _gloffset_GetVertexAttribivNV 798 -#define _gloffset_IsProgramNV 799 #define _gloffset_LoadProgramNV 800 #define _gloffset_ProgramParameters4dvNV 801 #define _gloffset_ProgramParameters4fvNV 802 @@ -899,7 +610,6 @@ #define _gloffset_VertexAttrib4svNV 828 #define _gloffset_VertexAttrib4ubNV 829 #define _gloffset_VertexAttrib4ubvNV 830 -#define _gloffset_VertexAttribPointerNV 831 #define _gloffset_VertexAttribs1dvNV 832 #define _gloffset_VertexAttribs1fvNV 833 #define _gloffset_VertexAttribs1svNV 834 @@ -913,24 +623,6 @@ #define _gloffset_VertexAttribs4fvNV 842 #define _gloffset_VertexAttribs4svNV 843 #define _gloffset_VertexAttribs4ubvNV 844 -#define _gloffset_GetTexBumpParameterfvATI 845 -#define _gloffset_GetTexBumpParameterivATI 846 -#define _gloffset_TexBumpParameterfvATI 847 -#define _gloffset_TexBumpParameterivATI 848 -#define _gloffset_AlphaFragmentOp1ATI 849 -#define _gloffset_AlphaFragmentOp2ATI 850 -#define _gloffset_AlphaFragmentOp3ATI 851 -#define _gloffset_BeginFragmentShaderATI 852 -#define _gloffset_BindFragmentShaderATI 853 -#define _gloffset_ColorFragmentOp1ATI 854 -#define _gloffset_ColorFragmentOp2ATI 855 -#define _gloffset_ColorFragmentOp3ATI 856 -#define _gloffset_DeleteFragmentShaderATI 857 -#define _gloffset_EndFragmentShaderATI 858 -#define _gloffset_GenFragmentShadersATI 859 -#define _gloffset_PassTexCoordATI 860 -#define _gloffset_SampleMapATI 861 -#define _gloffset_SetFragmentShaderConstantATI 862 #define _gloffset_PointParameteriNV 863 #define _gloffset_PointParameterivNV 864 #define _gloffset_ActiveStencilFaceEXT 865 @@ -944,139 +636,33 @@ #define _gloffset_ProgramNamedParameter4dvNV 873 #define _gloffset_ProgramNamedParameter4fNV 874 #define _gloffset_ProgramNamedParameter4fvNV 875 -#define _gloffset_PrimitiveRestartIndexNV 876 -#define _gloffset_PrimitiveRestartNV 877 #define _gloffset_DepthBoundsEXT 878 #define _gloffset_BlendEquationSeparateEXT 879 -#define _gloffset_BindFramebufferEXT 880 -#define _gloffset_BindRenderbufferEXT 881 -#define _gloffset_CheckFramebufferStatusEXT 882 -#define _gloffset_DeleteFramebuffersEXT 883 -#define _gloffset_DeleteRenderbuffersEXT 884 -#define _gloffset_FramebufferRenderbufferEXT 885 -#define _gloffset_FramebufferTexture1DEXT 886 -#define _gloffset_FramebufferTexture2DEXT 887 -#define _gloffset_FramebufferTexture3DEXT 888 -#define _gloffset_GenFramebuffersEXT 889 -#define _gloffset_GenRenderbuffersEXT 890 -#define _gloffset_GenerateMipmapEXT 891 -#define _gloffset_GetFramebufferAttachmentParameterivEXT 892 -#define _gloffset_GetRenderbufferParameterivEXT 893 -#define _gloffset_IsFramebufferEXT 894 -#define _gloffset_IsRenderbufferEXT 895 -#define _gloffset_RenderbufferStorageEXT 896 -#define _gloffset_BlitFramebufferEXT 897 #define _gloffset_BufferParameteriAPPLE 898 #define _gloffset_FlushMappedBufferRangeAPPLE 899 #define _gloffset_BindFragDataLocationEXT 900 #define _gloffset_GetFragDataLocationEXT 901 -#define _gloffset_GetUniformuivEXT 902 -#define _gloffset_GetVertexAttribIivEXT 903 -#define _gloffset_GetVertexAttribIuivEXT 904 -#define _gloffset_Uniform1uiEXT 905 -#define _gloffset_Uniform1uivEXT 906 -#define _gloffset_Uniform2uiEXT 907 -#define _gloffset_Uniform2uivEXT 908 -#define _gloffset_Uniform3uiEXT 909 -#define _gloffset_Uniform3uivEXT 910 -#define _gloffset_Uniform4uiEXT 911 -#define _gloffset_Uniform4uivEXT 912 -#define _gloffset_VertexAttribI1iEXT 913 -#define _gloffset_VertexAttribI1ivEXT 914 -#define _gloffset_VertexAttribI1uiEXT 915 -#define _gloffset_VertexAttribI1uivEXT 916 -#define _gloffset_VertexAttribI2iEXT 917 -#define _gloffset_VertexAttribI2ivEXT 918 -#define _gloffset_VertexAttribI2uiEXT 919 -#define _gloffset_VertexAttribI2uivEXT 920 -#define _gloffset_VertexAttribI3iEXT 921 -#define _gloffset_VertexAttribI3ivEXT 922 -#define _gloffset_VertexAttribI3uiEXT 923 -#define _gloffset_VertexAttribI3uivEXT 924 -#define _gloffset_VertexAttribI4bvEXT 925 -#define _gloffset_VertexAttribI4iEXT 926 -#define _gloffset_VertexAttribI4ivEXT 927 -#define _gloffset_VertexAttribI4svEXT 928 -#define _gloffset_VertexAttribI4ubvEXT 929 -#define _gloffset_VertexAttribI4uiEXT 930 -#define _gloffset_VertexAttribI4uivEXT 931 -#define _gloffset_VertexAttribI4usvEXT 932 -#define _gloffset_VertexAttribIPointerEXT 933 -#define _gloffset_FramebufferTextureLayerEXT 934 -#define _gloffset_ColorMaskIndexedEXT 935 -#define _gloffset_DisableIndexedEXT 936 -#define _gloffset_EnableIndexedEXT 937 -#define _gloffset_GetBooleanIndexedvEXT 938 -#define _gloffset_GetIntegerIndexedvEXT 939 -#define _gloffset_IsEnabledIndexedEXT 940 #define _gloffset_ClearColorIiEXT 941 #define _gloffset_ClearColorIuiEXT 942 #define _gloffset_GetTexParameterIivEXT 943 #define _gloffset_GetTexParameterIuivEXT 944 #define _gloffset_TexParameterIivEXT 945 #define _gloffset_TexParameterIuivEXT 946 -#define _gloffset_BeginConditionalRenderNV 947 -#define _gloffset_EndConditionalRenderNV 948 -#define _gloffset_BeginTransformFeedbackEXT 949 -#define _gloffset_BindBufferBaseEXT 950 -#define _gloffset_BindBufferOffsetEXT 951 -#define _gloffset_BindBufferRangeEXT 952 -#define _gloffset_EndTransformFeedbackEXT 953 -#define _gloffset_GetTransformFeedbackVaryingEXT 954 -#define _gloffset_TransformFeedbackVaryingsEXT 955 -#define _gloffset_ProvokingVertexEXT 956 #define _gloffset_GetTexParameterPointervAPPLE 957 #define _gloffset_TextureRangeAPPLE 958 #define _gloffset_GetObjectParameterivAPPLE 959 #define _gloffset_ObjectPurgeableAPPLE 960 #define _gloffset_ObjectUnpurgeableAPPLE 961 -#define _gloffset_ActiveProgramEXT 962 #define _gloffset_CreateShaderProgramEXT 963 -#define _gloffset_UseShaderProgramEXT 964 #define _gloffset_TextureBarrierNV 965 -#define _gloffset_StencilFuncSeparateATI 966 -#define _gloffset_ProgramEnvParameters4fvEXT 967 -#define _gloffset_ProgramLocalParameters4fvEXT 968 -#define _gloffset_GetQueryObjecti64vEXT 969 -#define _gloffset_GetQueryObjectui64vEXT 970 -#define _gloffset_EGLImageTargetRenderbufferStorageOES 971 -#define _gloffset_EGLImageTargetTexture2DOES 972 #else /* !FEATURE_remap_table */ #define driDispatchRemapTable_size 565 extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; -#define AttachShader_remap_index 0 -#define CreateProgram_remap_index 1 -#define CreateShader_remap_index 2 -#define DeleteProgram_remap_index 3 -#define DeleteShader_remap_index 4 -#define DetachShader_remap_index 5 -#define GetAttachedShaders_remap_index 6 -#define GetProgramInfoLog_remap_index 7 -#define GetProgramiv_remap_index 8 -#define GetShaderInfoLog_remap_index 9 -#define GetShaderiv_remap_index 10 -#define IsProgram_remap_index 11 -#define IsShader_remap_index 12 -#define StencilFuncSeparate_remap_index 13 -#define StencilMaskSeparate_remap_index 14 -#define StencilOpSeparate_remap_index 15 -#define UniformMatrix2x3fv_remap_index 16 -#define UniformMatrix2x4fv_remap_index 17 -#define UniformMatrix3x2fv_remap_index 18 -#define UniformMatrix3x4fv_remap_index 19 -#define UniformMatrix4x2fv_remap_index 20 -#define UniformMatrix4x3fv_remap_index 21 -#define ClampColor_remap_index 22 -#define ClearBufferfi_remap_index 23 -#define ClearBufferfv_remap_index 24 -#define ClearBufferiv_remap_index 25 -#define ClearBufferuiv_remap_index 26 #define GetStringi_remap_index 27 #define TexBuffer_remap_index 28 -#define FramebufferTexture_remap_index 29 #define GetBufferParameteri64v_remap_index 30 #define GetInteger64i_v_remap_index 31 #define VertexAttribDivisor_remap_index 32 @@ -1085,70 +671,6 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define MultTransposeMatrixdARB_remap_index 35 #define MultTransposeMatrixfARB_remap_index 36 #define SampleCoverageARB_remap_index 37 -#define CompressedTexImage1DARB_remap_index 38 -#define CompressedTexImage2DARB_remap_index 39 -#define CompressedTexImage3DARB_remap_index 40 -#define CompressedTexSubImage1DARB_remap_index 41 -#define CompressedTexSubImage2DARB_remap_index 42 -#define CompressedTexSubImage3DARB_remap_index 43 -#define GetCompressedTexImageARB_remap_index 44 -#define DisableVertexAttribArrayARB_remap_index 45 -#define EnableVertexAttribArrayARB_remap_index 46 -#define GetProgramEnvParameterdvARB_remap_index 47 -#define GetProgramEnvParameterfvARB_remap_index 48 -#define GetProgramLocalParameterdvARB_remap_index 49 -#define GetProgramLocalParameterfvARB_remap_index 50 -#define GetProgramStringARB_remap_index 51 -#define GetProgramivARB_remap_index 52 -#define GetVertexAttribdvARB_remap_index 53 -#define GetVertexAttribfvARB_remap_index 54 -#define GetVertexAttribivARB_remap_index 55 -#define ProgramEnvParameter4dARB_remap_index 56 -#define ProgramEnvParameter4dvARB_remap_index 57 -#define ProgramEnvParameter4fARB_remap_index 58 -#define ProgramEnvParameter4fvARB_remap_index 59 -#define ProgramLocalParameter4dARB_remap_index 60 -#define ProgramLocalParameter4dvARB_remap_index 61 -#define ProgramLocalParameter4fARB_remap_index 62 -#define ProgramLocalParameter4fvARB_remap_index 63 -#define ProgramStringARB_remap_index 64 -#define VertexAttrib1dARB_remap_index 65 -#define VertexAttrib1dvARB_remap_index 66 -#define VertexAttrib1fARB_remap_index 67 -#define VertexAttrib1fvARB_remap_index 68 -#define VertexAttrib1sARB_remap_index 69 -#define VertexAttrib1svARB_remap_index 70 -#define VertexAttrib2dARB_remap_index 71 -#define VertexAttrib2dvARB_remap_index 72 -#define VertexAttrib2fARB_remap_index 73 -#define VertexAttrib2fvARB_remap_index 74 -#define VertexAttrib2sARB_remap_index 75 -#define VertexAttrib2svARB_remap_index 76 -#define VertexAttrib3dARB_remap_index 77 -#define VertexAttrib3dvARB_remap_index 78 -#define VertexAttrib3fARB_remap_index 79 -#define VertexAttrib3fvARB_remap_index 80 -#define VertexAttrib3sARB_remap_index 81 -#define VertexAttrib3svARB_remap_index 82 -#define VertexAttrib4NbvARB_remap_index 83 -#define VertexAttrib4NivARB_remap_index 84 -#define VertexAttrib4NsvARB_remap_index 85 -#define VertexAttrib4NubARB_remap_index 86 -#define VertexAttrib4NubvARB_remap_index 87 -#define VertexAttrib4NuivARB_remap_index 88 -#define VertexAttrib4NusvARB_remap_index 89 -#define VertexAttrib4bvARB_remap_index 90 -#define VertexAttrib4dARB_remap_index 91 -#define VertexAttrib4dvARB_remap_index 92 -#define VertexAttrib4fARB_remap_index 93 -#define VertexAttrib4fvARB_remap_index 94 -#define VertexAttrib4ivARB_remap_index 95 -#define VertexAttrib4sARB_remap_index 96 -#define VertexAttrib4svARB_remap_index 97 -#define VertexAttrib4ubvARB_remap_index 98 -#define VertexAttrib4uivARB_remap_index 99 -#define VertexAttrib4usvARB_remap_index 100 -#define VertexAttribPointerARB_remap_index 101 #define BindBufferARB_remap_index 102 #define BufferDataARB_remap_index 103 #define BufferSubDataARB_remap_index 104 @@ -1160,170 +682,27 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define IsBufferARB_remap_index 110 #define MapBufferARB_remap_index 111 #define UnmapBufferARB_remap_index 112 -#define BeginQueryARB_remap_index 113 -#define DeleteQueriesARB_remap_index 114 -#define EndQueryARB_remap_index 115 -#define GenQueriesARB_remap_index 116 -#define GetQueryObjectivARB_remap_index 117 -#define GetQueryObjectuivARB_remap_index 118 -#define GetQueryivARB_remap_index 119 -#define IsQueryARB_remap_index 120 #define AttachObjectARB_remap_index 121 #define CompileShaderARB_remap_index 122 #define CreateProgramObjectARB_remap_index 123 #define CreateShaderObjectARB_remap_index 124 #define DeleteObjectARB_remap_index 125 #define DetachObjectARB_remap_index 126 -#define GetActiveUniformARB_remap_index 127 #define GetAttachedObjectsARB_remap_index 128 #define GetHandleARB_remap_index 129 #define GetInfoLogARB_remap_index 130 #define GetObjectParameterfvARB_remap_index 131 #define GetObjectParameterivARB_remap_index 132 #define GetShaderSourceARB_remap_index 133 -#define GetUniformLocationARB_remap_index 134 -#define GetUniformfvARB_remap_index 135 -#define GetUniformivARB_remap_index 136 #define LinkProgramARB_remap_index 137 #define ShaderSourceARB_remap_index 138 -#define Uniform1fARB_remap_index 139 -#define Uniform1fvARB_remap_index 140 -#define Uniform1iARB_remap_index 141 -#define Uniform1ivARB_remap_index 142 -#define Uniform2fARB_remap_index 143 -#define Uniform2fvARB_remap_index 144 -#define Uniform2iARB_remap_index 145 -#define Uniform2ivARB_remap_index 146 -#define Uniform3fARB_remap_index 147 -#define Uniform3fvARB_remap_index 148 -#define Uniform3iARB_remap_index 149 -#define Uniform3ivARB_remap_index 150 -#define Uniform4fARB_remap_index 151 -#define Uniform4fvARB_remap_index 152 -#define Uniform4iARB_remap_index 153 -#define Uniform4ivARB_remap_index 154 -#define UniformMatrix2fvARB_remap_index 155 -#define UniformMatrix3fvARB_remap_index 156 -#define UniformMatrix4fvARB_remap_index 157 -#define UseProgramObjectARB_remap_index 158 #define ValidateProgramARB_remap_index 159 -#define BindAttribLocationARB_remap_index 160 #define GetActiveAttribARB_remap_index 161 -#define GetAttribLocationARB_remap_index 162 -#define DrawBuffersARB_remap_index 163 -#define ClampColorARB_remap_index 164 -#define DrawArraysInstancedARB_remap_index 165 -#define DrawElementsInstancedARB_remap_index 166 -#define RenderbufferStorageMultisample_remap_index 167 -#define FramebufferTextureARB_remap_index 168 -#define FramebufferTextureFaceARB_remap_index 169 -#define ProgramParameteriARB_remap_index 170 #define VertexAttribDivisorARB_remap_index 171 #define FlushMappedBufferRange_remap_index 172 #define MapBufferRange_remap_index 173 -#define TexBufferARB_remap_index 174 #define BindVertexArray_remap_index 175 #define GenVertexArrays_remap_index 176 -#define CopyBufferSubData_remap_index 177 -#define ClientWaitSync_remap_index 178 -#define DeleteSync_remap_index 179 -#define FenceSync_remap_index 180 -#define GetInteger64v_remap_index 181 -#define GetSynciv_remap_index 182 -#define IsSync_remap_index 183 -#define WaitSync_remap_index 184 -#define DrawElementsBaseVertex_remap_index 185 -#define DrawElementsInstancedBaseVertex_remap_index 186 -#define DrawRangeElementsBaseVertex_remap_index 187 -#define MultiDrawElementsBaseVertex_remap_index 188 -#define BlendEquationSeparateiARB_remap_index 189 -#define BlendEquationiARB_remap_index 190 -#define BlendFuncSeparateiARB_remap_index 191 -#define BlendFunciARB_remap_index 192 -#define BindSampler_remap_index 193 -#define DeleteSamplers_remap_index 194 -#define GenSamplers_remap_index 195 -#define GetSamplerParameterIiv_remap_index 196 -#define GetSamplerParameterIuiv_remap_index 197 -#define GetSamplerParameterfv_remap_index 198 -#define GetSamplerParameteriv_remap_index 199 -#define IsSampler_remap_index 200 -#define SamplerParameterIiv_remap_index 201 -#define SamplerParameterIuiv_remap_index 202 -#define SamplerParameterf_remap_index 203 -#define SamplerParameterfv_remap_index 204 -#define SamplerParameteri_remap_index 205 -#define SamplerParameteriv_remap_index 206 -#define ColorP3ui_remap_index 207 -#define ColorP3uiv_remap_index 208 -#define ColorP4ui_remap_index 209 -#define ColorP4uiv_remap_index 210 -#define MultiTexCoordP1ui_remap_index 211 -#define MultiTexCoordP1uiv_remap_index 212 -#define MultiTexCoordP2ui_remap_index 213 -#define MultiTexCoordP2uiv_remap_index 214 -#define MultiTexCoordP3ui_remap_index 215 -#define MultiTexCoordP3uiv_remap_index 216 -#define MultiTexCoordP4ui_remap_index 217 -#define MultiTexCoordP4uiv_remap_index 218 -#define NormalP3ui_remap_index 219 -#define NormalP3uiv_remap_index 220 -#define SecondaryColorP3ui_remap_index 221 -#define SecondaryColorP3uiv_remap_index 222 -#define TexCoordP1ui_remap_index 223 -#define TexCoordP1uiv_remap_index 224 -#define TexCoordP2ui_remap_index 225 -#define TexCoordP2uiv_remap_index 226 -#define TexCoordP3ui_remap_index 227 -#define TexCoordP3uiv_remap_index 228 -#define TexCoordP4ui_remap_index 229 -#define TexCoordP4uiv_remap_index 230 -#define VertexAttribP1ui_remap_index 231 -#define VertexAttribP1uiv_remap_index 232 -#define VertexAttribP2ui_remap_index 233 -#define VertexAttribP2uiv_remap_index 234 -#define VertexAttribP3ui_remap_index 235 -#define VertexAttribP3uiv_remap_index 236 -#define VertexAttribP4ui_remap_index 237 -#define VertexAttribP4uiv_remap_index 238 -#define VertexP2ui_remap_index 239 -#define VertexP2uiv_remap_index 240 -#define VertexP3ui_remap_index 241 -#define VertexP3uiv_remap_index 242 -#define VertexP4ui_remap_index 243 -#define VertexP4uiv_remap_index 244 -#define BindTransformFeedback_remap_index 245 -#define DeleteTransformFeedbacks_remap_index 246 -#define DrawTransformFeedback_remap_index 247 -#define GenTransformFeedbacks_remap_index 248 -#define IsTransformFeedback_remap_index 249 -#define PauseTransformFeedback_remap_index 250 -#define ResumeTransformFeedback_remap_index 251 -#define ClearDepthf_remap_index 252 -#define DepthRangef_remap_index 253 -#define GetShaderPrecisionFormat_remap_index 254 -#define ReleaseShaderCompiler_remap_index 255 -#define ShaderBinary_remap_index 256 -#define GetGraphicsResetStatusARB_remap_index 257 -#define GetnColorTableARB_remap_index 258 -#define GetnCompressedTexImageARB_remap_index 259 -#define GetnConvolutionFilterARB_remap_index 260 -#define GetnHistogramARB_remap_index 261 -#define GetnMapdvARB_remap_index 262 -#define GetnMapfvARB_remap_index 263 -#define GetnMapivARB_remap_index 264 -#define GetnMinmaxARB_remap_index 265 -#define GetnPixelMapfvARB_remap_index 266 -#define GetnPixelMapuivARB_remap_index 267 -#define GetnPixelMapusvARB_remap_index 268 -#define GetnPolygonStippleARB_remap_index 269 -#define GetnSeparableFilterARB_remap_index 270 -#define GetnTexImageARB_remap_index 271 -#define GetnUniformdvARB_remap_index 272 -#define GetnUniformfvARB_remap_index 273 -#define GetnUniformivARB_remap_index 274 -#define GetnUniformuivARB_remap_index 275 -#define ReadnPixelsARB_remap_index 276 #define TexStorage1D_remap_index 277 #define TexStorage2D_remap_index 278 #define TexStorage3D_remap_index 279 @@ -1331,12 +710,6 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define TextureStorage2DEXT_remap_index 281 #define TextureStorage3DEXT_remap_index 282 #define PolygonOffsetEXT_remap_index 283 -#define GetPixelTexGenParameterfvSGIS_remap_index 284 -#define GetPixelTexGenParameterivSGIS_remap_index 285 -#define PixelTexGenParameterfSGIS_remap_index 286 -#define PixelTexGenParameterfvSGIS_remap_index 287 -#define PixelTexGenParameteriSGIS_remap_index 288 -#define PixelTexGenParameterivSGIS_remap_index 289 #define SampleMaskSGIS_remap_index 290 #define SamplePatternSGIS_remap_index 291 #define ColorPointerEXT_remap_index 292 @@ -1367,7 +740,6 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define SecondaryColor3usvEXT_remap_index 317 #define SecondaryColorPointerEXT_remap_index 318 #define MultiDrawArraysEXT_remap_index 319 -#define MultiDrawElementsEXT_remap_index 320 #define FogCoordPointerEXT_remap_index 321 #define FogCoorddEXT_remap_index 322 #define FogCoorddvEXT_remap_index 323 @@ -1390,7 +762,6 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define GetCombinerOutputParameterivNV_remap_index 340 #define GetFinalCombinerInputParameterfvNV_remap_index 341 #define GetFinalCombinerInputParameterivNV_remap_index 342 -#define ResizeBuffersMESA_remap_index 343 #define WindowPos2dMESA_remap_index 344 #define WindowPos2dvMESA_remap_index 345 #define WindowPos2fMESA_remap_index 346 @@ -1425,20 +796,10 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define SetFenceNV_remap_index 375 #define TestFenceNV_remap_index 376 #define AreProgramsResidentNV_remap_index 377 -#define BindProgramNV_remap_index 378 -#define DeleteProgramsNV_remap_index 379 #define ExecuteProgramNV_remap_index 380 -#define GenProgramsNV_remap_index 381 #define GetProgramParameterdvNV_remap_index 382 #define GetProgramParameterfvNV_remap_index 383 -#define GetProgramStringNV_remap_index 384 -#define GetProgramivNV_remap_index 385 #define GetTrackMatrixivNV_remap_index 386 -#define GetVertexAttribPointervNV_remap_index 387 -#define GetVertexAttribdvNV_remap_index 388 -#define GetVertexAttribfvNV_remap_index 389 -#define GetVertexAttribivNV_remap_index 390 -#define IsProgramNV_remap_index 391 #define LoadProgramNV_remap_index 392 #define ProgramParameters4dvNV_remap_index 393 #define ProgramParameters4fvNV_remap_index 394 @@ -1470,7 +831,6 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define VertexAttrib4svNV_remap_index 420 #define VertexAttrib4ubNV_remap_index 421 #define VertexAttrib4ubvNV_remap_index 422 -#define VertexAttribPointerNV_remap_index 423 #define VertexAttribs1dvNV_remap_index 424 #define VertexAttribs1fvNV_remap_index 425 #define VertexAttribs1svNV_remap_index 426 @@ -1484,24 +844,6 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define VertexAttribs4fvNV_remap_index 434 #define VertexAttribs4svNV_remap_index 435 #define VertexAttribs4ubvNV_remap_index 436 -#define GetTexBumpParameterfvATI_remap_index 437 -#define GetTexBumpParameterivATI_remap_index 438 -#define TexBumpParameterfvATI_remap_index 439 -#define TexBumpParameterivATI_remap_index 440 -#define AlphaFragmentOp1ATI_remap_index 441 -#define AlphaFragmentOp2ATI_remap_index 442 -#define AlphaFragmentOp3ATI_remap_index 443 -#define BeginFragmentShaderATI_remap_index 444 -#define BindFragmentShaderATI_remap_index 445 -#define ColorFragmentOp1ATI_remap_index 446 -#define ColorFragmentOp2ATI_remap_index 447 -#define ColorFragmentOp3ATI_remap_index 448 -#define DeleteFragmentShaderATI_remap_index 449 -#define EndFragmentShaderATI_remap_index 450 -#define GenFragmentShadersATI_remap_index 451 -#define PassTexCoordATI_remap_index 452 -#define SampleMapATI_remap_index 453 -#define SetFragmentShaderConstantATI_remap_index 454 #define PointParameteriNV_remap_index 455 #define PointParameterivNV_remap_index 456 #define ActiveStencilFaceEXT_remap_index 457 @@ -1515,206 +857,34 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define ProgramNamedParameter4dvNV_remap_index 465 #define ProgramNamedParameter4fNV_remap_index 466 #define ProgramNamedParameter4fvNV_remap_index 467 -#define PrimitiveRestartIndexNV_remap_index 468 -#define PrimitiveRestartNV_remap_index 469 #define DepthBoundsEXT_remap_index 470 #define BlendEquationSeparateEXT_remap_index 471 -#define BindFramebufferEXT_remap_index 472 -#define BindRenderbufferEXT_remap_index 473 -#define CheckFramebufferStatusEXT_remap_index 474 -#define DeleteFramebuffersEXT_remap_index 475 -#define DeleteRenderbuffersEXT_remap_index 476 -#define FramebufferRenderbufferEXT_remap_index 477 -#define FramebufferTexture1DEXT_remap_index 478 -#define FramebufferTexture2DEXT_remap_index 479 -#define FramebufferTexture3DEXT_remap_index 480 -#define GenFramebuffersEXT_remap_index 481 -#define GenRenderbuffersEXT_remap_index 482 -#define GenerateMipmapEXT_remap_index 483 -#define GetFramebufferAttachmentParameterivEXT_remap_index 484 -#define GetRenderbufferParameterivEXT_remap_index 485 -#define IsFramebufferEXT_remap_index 486 -#define IsRenderbufferEXT_remap_index 487 -#define RenderbufferStorageEXT_remap_index 488 -#define BlitFramebufferEXT_remap_index 489 #define BufferParameteriAPPLE_remap_index 490 #define FlushMappedBufferRangeAPPLE_remap_index 491 #define BindFragDataLocationEXT_remap_index 492 #define GetFragDataLocationEXT_remap_index 493 -#define GetUniformuivEXT_remap_index 494 -#define GetVertexAttribIivEXT_remap_index 495 -#define GetVertexAttribIuivEXT_remap_index 496 -#define Uniform1uiEXT_remap_index 497 -#define Uniform1uivEXT_remap_index 498 -#define Uniform2uiEXT_remap_index 499 -#define Uniform2uivEXT_remap_index 500 -#define Uniform3uiEXT_remap_index 501 -#define Uniform3uivEXT_remap_index 502 -#define Uniform4uiEXT_remap_index 503 -#define Uniform4uivEXT_remap_index 504 -#define VertexAttribI1iEXT_remap_index 505 -#define VertexAttribI1ivEXT_remap_index 506 -#define VertexAttribI1uiEXT_remap_index 507 -#define VertexAttribI1uivEXT_remap_index 508 -#define VertexAttribI2iEXT_remap_index 509 -#define VertexAttribI2ivEXT_remap_index 510 -#define VertexAttribI2uiEXT_remap_index 511 -#define VertexAttribI2uivEXT_remap_index 512 -#define VertexAttribI3iEXT_remap_index 513 -#define VertexAttribI3ivEXT_remap_index 514 -#define VertexAttribI3uiEXT_remap_index 515 -#define VertexAttribI3uivEXT_remap_index 516 -#define VertexAttribI4bvEXT_remap_index 517 -#define VertexAttribI4iEXT_remap_index 518 -#define VertexAttribI4ivEXT_remap_index 519 -#define VertexAttribI4svEXT_remap_index 520 -#define VertexAttribI4ubvEXT_remap_index 521 -#define VertexAttribI4uiEXT_remap_index 522 -#define VertexAttribI4uivEXT_remap_index 523 -#define VertexAttribI4usvEXT_remap_index 524 -#define VertexAttribIPointerEXT_remap_index 525 -#define FramebufferTextureLayerEXT_remap_index 526 -#define ColorMaskIndexedEXT_remap_index 527 -#define DisableIndexedEXT_remap_index 528 -#define EnableIndexedEXT_remap_index 529 -#define GetBooleanIndexedvEXT_remap_index 530 -#define GetIntegerIndexedvEXT_remap_index 531 -#define IsEnabledIndexedEXT_remap_index 532 #define ClearColorIiEXT_remap_index 533 #define ClearColorIuiEXT_remap_index 534 #define GetTexParameterIivEXT_remap_index 535 #define GetTexParameterIuivEXT_remap_index 536 #define TexParameterIivEXT_remap_index 537 #define TexParameterIuivEXT_remap_index 538 -#define BeginConditionalRenderNV_remap_index 539 -#define EndConditionalRenderNV_remap_index 540 -#define BeginTransformFeedbackEXT_remap_index 541 -#define BindBufferBaseEXT_remap_index 542 -#define BindBufferOffsetEXT_remap_index 543 -#define BindBufferRangeEXT_remap_index 544 -#define EndTransformFeedbackEXT_remap_index 545 -#define GetTransformFeedbackVaryingEXT_remap_index 546 -#define TransformFeedbackVaryingsEXT_remap_index 547 -#define ProvokingVertexEXT_remap_index 548 #define GetTexParameterPointervAPPLE_remap_index 549 #define TextureRangeAPPLE_remap_index 550 #define GetObjectParameterivAPPLE_remap_index 551 #define ObjectPurgeableAPPLE_remap_index 552 #define ObjectUnpurgeableAPPLE_remap_index 553 -#define ActiveProgramEXT_remap_index 554 #define CreateShaderProgramEXT_remap_index 555 -#define UseShaderProgramEXT_remap_index 556 #define TextureBarrierNV_remap_index 557 -#define StencilFuncSeparateATI_remap_index 558 -#define ProgramEnvParameters4fvEXT_remap_index 559 -#define ProgramLocalParameters4fvEXT_remap_index 560 -#define GetQueryObjecti64vEXT_remap_index 561 -#define GetQueryObjectui64vEXT_remap_index 562 -#define EGLImageTargetRenderbufferStorageOES_remap_index 563 -#define EGLImageTargetTexture2DOES_remap_index 564 -#define _gloffset_AttachShader driDispatchRemapTable[AttachShader_remap_index] -#define _gloffset_CreateProgram driDispatchRemapTable[CreateProgram_remap_index] -#define _gloffset_CreateShader driDispatchRemapTable[CreateShader_remap_index] -#define _gloffset_DeleteProgram driDispatchRemapTable[DeleteProgram_remap_index] -#define _gloffset_DeleteShader driDispatchRemapTable[DeleteShader_remap_index] -#define _gloffset_DetachShader driDispatchRemapTable[DetachShader_remap_index] -#define _gloffset_GetAttachedShaders driDispatchRemapTable[GetAttachedShaders_remap_index] -#define _gloffset_GetProgramInfoLog driDispatchRemapTable[GetProgramInfoLog_remap_index] -#define _gloffset_GetProgramiv driDispatchRemapTable[GetProgramiv_remap_index] -#define _gloffset_GetShaderInfoLog driDispatchRemapTable[GetShaderInfoLog_remap_index] -#define _gloffset_GetShaderiv driDispatchRemapTable[GetShaderiv_remap_index] -#define _gloffset_IsProgram driDispatchRemapTable[IsProgram_remap_index] -#define _gloffset_IsShader driDispatchRemapTable[IsShader_remap_index] -#define _gloffset_StencilFuncSeparate driDispatchRemapTable[StencilFuncSeparate_remap_index] -#define _gloffset_StencilMaskSeparate driDispatchRemapTable[StencilMaskSeparate_remap_index] -#define _gloffset_StencilOpSeparate driDispatchRemapTable[StencilOpSeparate_remap_index] -#define _gloffset_UniformMatrix2x3fv driDispatchRemapTable[UniformMatrix2x3fv_remap_index] -#define _gloffset_UniformMatrix2x4fv driDispatchRemapTable[UniformMatrix2x4fv_remap_index] -#define _gloffset_UniformMatrix3x2fv driDispatchRemapTable[UniformMatrix3x2fv_remap_index] -#define _gloffset_UniformMatrix3x4fv driDispatchRemapTable[UniformMatrix3x4fv_remap_index] -#define _gloffset_UniformMatrix4x2fv driDispatchRemapTable[UniformMatrix4x2fv_remap_index] -#define _gloffset_UniformMatrix4x3fv driDispatchRemapTable[UniformMatrix4x3fv_remap_index] -#define _gloffset_ClampColor driDispatchRemapTable[ClampColor_remap_index] -#define _gloffset_ClearBufferfi driDispatchRemapTable[ClearBufferfi_remap_index] -#define _gloffset_ClearBufferfv driDispatchRemapTable[ClearBufferfv_remap_index] -#define _gloffset_ClearBufferiv driDispatchRemapTable[ClearBufferiv_remap_index] -#define _gloffset_ClearBufferuiv driDispatchRemapTable[ClearBufferuiv_remap_index] #define _gloffset_GetStringi driDispatchRemapTable[GetStringi_remap_index] -#define _gloffset_TexBuffer driDispatchRemapTable[TexBuffer_remap_index] -#define _gloffset_FramebufferTexture driDispatchRemapTable[FramebufferTexture_remap_index] #define _gloffset_GetBufferParameteri64v driDispatchRemapTable[GetBufferParameteri64v_remap_index] #define _gloffset_GetInteger64i_v driDispatchRemapTable[GetInteger64i_v_remap_index] -#define _gloffset_VertexAttribDivisor driDispatchRemapTable[VertexAttribDivisor_remap_index] #define _gloffset_LoadTransposeMatrixdARB driDispatchRemapTable[LoadTransposeMatrixdARB_remap_index] #define _gloffset_LoadTransposeMatrixfARB driDispatchRemapTable[LoadTransposeMatrixfARB_remap_index] #define _gloffset_MultTransposeMatrixdARB driDispatchRemapTable[MultTransposeMatrixdARB_remap_index] #define _gloffset_MultTransposeMatrixfARB driDispatchRemapTable[MultTransposeMatrixfARB_remap_index] #define _gloffset_SampleCoverageARB driDispatchRemapTable[SampleCoverageARB_remap_index] -#define _gloffset_CompressedTexImage1DARB driDispatchRemapTable[CompressedTexImage1DARB_remap_index] -#define _gloffset_CompressedTexImage2DARB driDispatchRemapTable[CompressedTexImage2DARB_remap_index] -#define _gloffset_CompressedTexImage3DARB driDispatchRemapTable[CompressedTexImage3DARB_remap_index] -#define _gloffset_CompressedTexSubImage1DARB driDispatchRemapTable[CompressedTexSubImage1DARB_remap_index] -#define _gloffset_CompressedTexSubImage2DARB driDispatchRemapTable[CompressedTexSubImage2DARB_remap_index] -#define _gloffset_CompressedTexSubImage3DARB driDispatchRemapTable[CompressedTexSubImage3DARB_remap_index] -#define _gloffset_GetCompressedTexImageARB driDispatchRemapTable[GetCompressedTexImageARB_remap_index] -#define _gloffset_DisableVertexAttribArrayARB driDispatchRemapTable[DisableVertexAttribArrayARB_remap_index] -#define _gloffset_EnableVertexAttribArrayARB driDispatchRemapTable[EnableVertexAttribArrayARB_remap_index] -#define _gloffset_GetProgramEnvParameterdvARB driDispatchRemapTable[GetProgramEnvParameterdvARB_remap_index] -#define _gloffset_GetProgramEnvParameterfvARB driDispatchRemapTable[GetProgramEnvParameterfvARB_remap_index] -#define _gloffset_GetProgramLocalParameterdvARB driDispatchRemapTable[GetProgramLocalParameterdvARB_remap_index] -#define _gloffset_GetProgramLocalParameterfvARB driDispatchRemapTable[GetProgramLocalParameterfvARB_remap_index] -#define _gloffset_GetProgramStringARB driDispatchRemapTable[GetProgramStringARB_remap_index] -#define _gloffset_GetProgramivARB driDispatchRemapTable[GetProgramivARB_remap_index] -#define _gloffset_GetVertexAttribdvARB driDispatchRemapTable[GetVertexAttribdvARB_remap_index] -#define _gloffset_GetVertexAttribfvARB driDispatchRemapTable[GetVertexAttribfvARB_remap_index] -#define _gloffset_GetVertexAttribivARB driDispatchRemapTable[GetVertexAttribivARB_remap_index] -#define _gloffset_ProgramEnvParameter4dARB driDispatchRemapTable[ProgramEnvParameter4dARB_remap_index] -#define _gloffset_ProgramEnvParameter4dvARB driDispatchRemapTable[ProgramEnvParameter4dvARB_remap_index] -#define _gloffset_ProgramEnvParameter4fARB driDispatchRemapTable[ProgramEnvParameter4fARB_remap_index] -#define _gloffset_ProgramEnvParameter4fvARB driDispatchRemapTable[ProgramEnvParameter4fvARB_remap_index] -#define _gloffset_ProgramLocalParameter4dARB driDispatchRemapTable[ProgramLocalParameter4dARB_remap_index] -#define _gloffset_ProgramLocalParameter4dvARB driDispatchRemapTable[ProgramLocalParameter4dvARB_remap_index] -#define _gloffset_ProgramLocalParameter4fARB driDispatchRemapTable[ProgramLocalParameter4fARB_remap_index] -#define _gloffset_ProgramLocalParameter4fvARB driDispatchRemapTable[ProgramLocalParameter4fvARB_remap_index] -#define _gloffset_ProgramStringARB driDispatchRemapTable[ProgramStringARB_remap_index] -#define _gloffset_VertexAttrib1dARB driDispatchRemapTable[VertexAttrib1dARB_remap_index] -#define _gloffset_VertexAttrib1dvARB driDispatchRemapTable[VertexAttrib1dvARB_remap_index] -#define _gloffset_VertexAttrib1fARB driDispatchRemapTable[VertexAttrib1fARB_remap_index] -#define _gloffset_VertexAttrib1fvARB driDispatchRemapTable[VertexAttrib1fvARB_remap_index] -#define _gloffset_VertexAttrib1sARB driDispatchRemapTable[VertexAttrib1sARB_remap_index] -#define _gloffset_VertexAttrib1svARB driDispatchRemapTable[VertexAttrib1svARB_remap_index] -#define _gloffset_VertexAttrib2dARB driDispatchRemapTable[VertexAttrib2dARB_remap_index] -#define _gloffset_VertexAttrib2dvARB driDispatchRemapTable[VertexAttrib2dvARB_remap_index] -#define _gloffset_VertexAttrib2fARB driDispatchRemapTable[VertexAttrib2fARB_remap_index] -#define _gloffset_VertexAttrib2fvARB driDispatchRemapTable[VertexAttrib2fvARB_remap_index] -#define _gloffset_VertexAttrib2sARB driDispatchRemapTable[VertexAttrib2sARB_remap_index] -#define _gloffset_VertexAttrib2svARB driDispatchRemapTable[VertexAttrib2svARB_remap_index] -#define _gloffset_VertexAttrib3dARB driDispatchRemapTable[VertexAttrib3dARB_remap_index] -#define _gloffset_VertexAttrib3dvARB driDispatchRemapTable[VertexAttrib3dvARB_remap_index] -#define _gloffset_VertexAttrib3fARB driDispatchRemapTable[VertexAttrib3fARB_remap_index] -#define _gloffset_VertexAttrib3fvARB driDispatchRemapTable[VertexAttrib3fvARB_remap_index] -#define _gloffset_VertexAttrib3sARB driDispatchRemapTable[VertexAttrib3sARB_remap_index] -#define _gloffset_VertexAttrib3svARB driDispatchRemapTable[VertexAttrib3svARB_remap_index] -#define _gloffset_VertexAttrib4NbvARB driDispatchRemapTable[VertexAttrib4NbvARB_remap_index] -#define _gloffset_VertexAttrib4NivARB driDispatchRemapTable[VertexAttrib4NivARB_remap_index] -#define _gloffset_VertexAttrib4NsvARB driDispatchRemapTable[VertexAttrib4NsvARB_remap_index] -#define _gloffset_VertexAttrib4NubARB driDispatchRemapTable[VertexAttrib4NubARB_remap_index] -#define _gloffset_VertexAttrib4NubvARB driDispatchRemapTable[VertexAttrib4NubvARB_remap_index] -#define _gloffset_VertexAttrib4NuivARB driDispatchRemapTable[VertexAttrib4NuivARB_remap_index] -#define _gloffset_VertexAttrib4NusvARB driDispatchRemapTable[VertexAttrib4NusvARB_remap_index] -#define _gloffset_VertexAttrib4bvARB driDispatchRemapTable[VertexAttrib4bvARB_remap_index] -#define _gloffset_VertexAttrib4dARB driDispatchRemapTable[VertexAttrib4dARB_remap_index] -#define _gloffset_VertexAttrib4dvARB driDispatchRemapTable[VertexAttrib4dvARB_remap_index] -#define _gloffset_VertexAttrib4fARB driDispatchRemapTable[VertexAttrib4fARB_remap_index] -#define _gloffset_VertexAttrib4fvARB driDispatchRemapTable[VertexAttrib4fvARB_remap_index] -#define _gloffset_VertexAttrib4ivARB driDispatchRemapTable[VertexAttrib4ivARB_remap_index] -#define _gloffset_VertexAttrib4sARB driDispatchRemapTable[VertexAttrib4sARB_remap_index] -#define _gloffset_VertexAttrib4svARB driDispatchRemapTable[VertexAttrib4svARB_remap_index] -#define _gloffset_VertexAttrib4ubvARB driDispatchRemapTable[VertexAttrib4ubvARB_remap_index] -#define _gloffset_VertexAttrib4uivARB driDispatchRemapTable[VertexAttrib4uivARB_remap_index] -#define _gloffset_VertexAttrib4usvARB driDispatchRemapTable[VertexAttrib4usvARB_remap_index] -#define _gloffset_VertexAttribPointerARB driDispatchRemapTable[VertexAttribPointerARB_remap_index] #define _gloffset_BindBufferARB driDispatchRemapTable[BindBufferARB_remap_index] #define _gloffset_BufferDataARB driDispatchRemapTable[BufferDataARB_remap_index] #define _gloffset_BufferSubDataARB driDispatchRemapTable[BufferSubDataARB_remap_index] @@ -1726,170 +896,27 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define _gloffset_IsBufferARB driDispatchRemapTable[IsBufferARB_remap_index] #define _gloffset_MapBufferARB driDispatchRemapTable[MapBufferARB_remap_index] #define _gloffset_UnmapBufferARB driDispatchRemapTable[UnmapBufferARB_remap_index] -#define _gloffset_BeginQueryARB driDispatchRemapTable[BeginQueryARB_remap_index] -#define _gloffset_DeleteQueriesARB driDispatchRemapTable[DeleteQueriesARB_remap_index] -#define _gloffset_EndQueryARB driDispatchRemapTable[EndQueryARB_remap_index] -#define _gloffset_GenQueriesARB driDispatchRemapTable[GenQueriesARB_remap_index] -#define _gloffset_GetQueryObjectivARB driDispatchRemapTable[GetQueryObjectivARB_remap_index] -#define _gloffset_GetQueryObjectuivARB driDispatchRemapTable[GetQueryObjectuivARB_remap_index] -#define _gloffset_GetQueryivARB driDispatchRemapTable[GetQueryivARB_remap_index] -#define _gloffset_IsQueryARB driDispatchRemapTable[IsQueryARB_remap_index] #define _gloffset_AttachObjectARB driDispatchRemapTable[AttachObjectARB_remap_index] #define _gloffset_CompileShaderARB driDispatchRemapTable[CompileShaderARB_remap_index] #define _gloffset_CreateProgramObjectARB driDispatchRemapTable[CreateProgramObjectARB_remap_index] #define _gloffset_CreateShaderObjectARB driDispatchRemapTable[CreateShaderObjectARB_remap_index] #define _gloffset_DeleteObjectARB driDispatchRemapTable[DeleteObjectARB_remap_index] #define _gloffset_DetachObjectARB driDispatchRemapTable[DetachObjectARB_remap_index] -#define _gloffset_GetActiveUniformARB driDispatchRemapTable[GetActiveUniformARB_remap_index] #define _gloffset_GetAttachedObjectsARB driDispatchRemapTable[GetAttachedObjectsARB_remap_index] #define _gloffset_GetHandleARB driDispatchRemapTable[GetHandleARB_remap_index] #define _gloffset_GetInfoLogARB driDispatchRemapTable[GetInfoLogARB_remap_index] #define _gloffset_GetObjectParameterfvARB driDispatchRemapTable[GetObjectParameterfvARB_remap_index] #define _gloffset_GetObjectParameterivARB driDispatchRemapTable[GetObjectParameterivARB_remap_index] #define _gloffset_GetShaderSourceARB driDispatchRemapTable[GetShaderSourceARB_remap_index] -#define _gloffset_GetUniformLocationARB driDispatchRemapTable[GetUniformLocationARB_remap_index] -#define _gloffset_GetUniformfvARB driDispatchRemapTable[GetUniformfvARB_remap_index] -#define _gloffset_GetUniformivARB driDispatchRemapTable[GetUniformivARB_remap_index] #define _gloffset_LinkProgramARB driDispatchRemapTable[LinkProgramARB_remap_index] #define _gloffset_ShaderSourceARB driDispatchRemapTable[ShaderSourceARB_remap_index] -#define _gloffset_Uniform1fARB driDispatchRemapTable[Uniform1fARB_remap_index] -#define _gloffset_Uniform1fvARB driDispatchRemapTable[Uniform1fvARB_remap_index] -#define _gloffset_Uniform1iARB driDispatchRemapTable[Uniform1iARB_remap_index] -#define _gloffset_Uniform1ivARB driDispatchRemapTable[Uniform1ivARB_remap_index] -#define _gloffset_Uniform2fARB driDispatchRemapTable[Uniform2fARB_remap_index] -#define _gloffset_Uniform2fvARB driDispatchRemapTable[Uniform2fvARB_remap_index] -#define _gloffset_Uniform2iARB driDispatchRemapTable[Uniform2iARB_remap_index] -#define _gloffset_Uniform2ivARB driDispatchRemapTable[Uniform2ivARB_remap_index] -#define _gloffset_Uniform3fARB driDispatchRemapTable[Uniform3fARB_remap_index] -#define _gloffset_Uniform3fvARB driDispatchRemapTable[Uniform3fvARB_remap_index] -#define _gloffset_Uniform3iARB driDispatchRemapTable[Uniform3iARB_remap_index] -#define _gloffset_Uniform3ivARB driDispatchRemapTable[Uniform3ivARB_remap_index] -#define _gloffset_Uniform4fARB driDispatchRemapTable[Uniform4fARB_remap_index] -#define _gloffset_Uniform4fvARB driDispatchRemapTable[Uniform4fvARB_remap_index] -#define _gloffset_Uniform4iARB driDispatchRemapTable[Uniform4iARB_remap_index] -#define _gloffset_Uniform4ivARB driDispatchRemapTable[Uniform4ivARB_remap_index] -#define _gloffset_UniformMatrix2fvARB driDispatchRemapTable[UniformMatrix2fvARB_remap_index] -#define _gloffset_UniformMatrix3fvARB driDispatchRemapTable[UniformMatrix3fvARB_remap_index] -#define _gloffset_UniformMatrix4fvARB driDispatchRemapTable[UniformMatrix4fvARB_remap_index] -#define _gloffset_UseProgramObjectARB driDispatchRemapTable[UseProgramObjectARB_remap_index] #define _gloffset_ValidateProgramARB driDispatchRemapTable[ValidateProgramARB_remap_index] -#define _gloffset_BindAttribLocationARB driDispatchRemapTable[BindAttribLocationARB_remap_index] #define _gloffset_GetActiveAttribARB driDispatchRemapTable[GetActiveAttribARB_remap_index] #define _gloffset_GetAttribLocationARB driDispatchRemapTable[GetAttribLocationARB_remap_index] -#define _gloffset_DrawBuffersARB driDispatchRemapTable[DrawBuffersARB_remap_index] -#define _gloffset_ClampColorARB driDispatchRemapTable[ClampColorARB_remap_index] -#define _gloffset_DrawArraysInstancedARB driDispatchRemapTable[DrawArraysInstancedARB_remap_index] -#define _gloffset_DrawElementsInstancedARB driDispatchRemapTable[DrawElementsInstancedARB_remap_index] -#define _gloffset_RenderbufferStorageMultisample driDispatchRemapTable[RenderbufferStorageMultisample_remap_index] -#define _gloffset_FramebufferTextureARB driDispatchRemapTable[FramebufferTextureARB_remap_index] -#define _gloffset_FramebufferTextureFaceARB driDispatchRemapTable[FramebufferTextureFaceARB_remap_index] -#define _gloffset_ProgramParameteriARB driDispatchRemapTable[ProgramParameteriARB_remap_index] -#define _gloffset_VertexAttribDivisorARB driDispatchRemapTable[VertexAttribDivisorARB_remap_index] #define _gloffset_FlushMappedBufferRange driDispatchRemapTable[FlushMappedBufferRange_remap_index] #define _gloffset_MapBufferRange driDispatchRemapTable[MapBufferRange_remap_index] -#define _gloffset_TexBufferARB driDispatchRemapTable[TexBufferARB_remap_index] #define _gloffset_BindVertexArray driDispatchRemapTable[BindVertexArray_remap_index] #define _gloffset_GenVertexArrays driDispatchRemapTable[GenVertexArrays_remap_index] -#define _gloffset_CopyBufferSubData driDispatchRemapTable[CopyBufferSubData_remap_index] -#define _gloffset_ClientWaitSync driDispatchRemapTable[ClientWaitSync_remap_index] -#define _gloffset_DeleteSync driDispatchRemapTable[DeleteSync_remap_index] -#define _gloffset_FenceSync driDispatchRemapTable[FenceSync_remap_index] -#define _gloffset_GetInteger64v driDispatchRemapTable[GetInteger64v_remap_index] -#define _gloffset_GetSynciv driDispatchRemapTable[GetSynciv_remap_index] -#define _gloffset_IsSync driDispatchRemapTable[IsSync_remap_index] -#define _gloffset_WaitSync driDispatchRemapTable[WaitSync_remap_index] -#define _gloffset_DrawElementsBaseVertex driDispatchRemapTable[DrawElementsBaseVertex_remap_index] -#define _gloffset_DrawElementsInstancedBaseVertex driDispatchRemapTable[DrawElementsInstancedBaseVertex_remap_index] -#define _gloffset_DrawRangeElementsBaseVertex driDispatchRemapTable[DrawRangeElementsBaseVertex_remap_index] -#define _gloffset_MultiDrawElementsBaseVertex driDispatchRemapTable[MultiDrawElementsBaseVertex_remap_index] -#define _gloffset_BlendEquationSeparateiARB driDispatchRemapTable[BlendEquationSeparateiARB_remap_index] -#define _gloffset_BlendEquationiARB driDispatchRemapTable[BlendEquationiARB_remap_index] -#define _gloffset_BlendFuncSeparateiARB driDispatchRemapTable[BlendFuncSeparateiARB_remap_index] -#define _gloffset_BlendFunciARB driDispatchRemapTable[BlendFunciARB_remap_index] -#define _gloffset_BindSampler driDispatchRemapTable[BindSampler_remap_index] -#define _gloffset_DeleteSamplers driDispatchRemapTable[DeleteSamplers_remap_index] -#define _gloffset_GenSamplers driDispatchRemapTable[GenSamplers_remap_index] -#define _gloffset_GetSamplerParameterIiv driDispatchRemapTable[GetSamplerParameterIiv_remap_index] -#define _gloffset_GetSamplerParameterIuiv driDispatchRemapTable[GetSamplerParameterIuiv_remap_index] -#define _gloffset_GetSamplerParameterfv driDispatchRemapTable[GetSamplerParameterfv_remap_index] -#define _gloffset_GetSamplerParameteriv driDispatchRemapTable[GetSamplerParameteriv_remap_index] -#define _gloffset_IsSampler driDispatchRemapTable[IsSampler_remap_index] -#define _gloffset_SamplerParameterIiv driDispatchRemapTable[SamplerParameterIiv_remap_index] -#define _gloffset_SamplerParameterIuiv driDispatchRemapTable[SamplerParameterIuiv_remap_index] -#define _gloffset_SamplerParameterf driDispatchRemapTable[SamplerParameterf_remap_index] -#define _gloffset_SamplerParameterfv driDispatchRemapTable[SamplerParameterfv_remap_index] -#define _gloffset_SamplerParameteri driDispatchRemapTable[SamplerParameteri_remap_index] -#define _gloffset_SamplerParameteriv driDispatchRemapTable[SamplerParameteriv_remap_index] -#define _gloffset_ColorP3ui driDispatchRemapTable[ColorP3ui_remap_index] -#define _gloffset_ColorP3uiv driDispatchRemapTable[ColorP3uiv_remap_index] -#define _gloffset_ColorP4ui driDispatchRemapTable[ColorP4ui_remap_index] -#define _gloffset_ColorP4uiv driDispatchRemapTable[ColorP4uiv_remap_index] -#define _gloffset_MultiTexCoordP1ui driDispatchRemapTable[MultiTexCoordP1ui_remap_index] -#define _gloffset_MultiTexCoordP1uiv driDispatchRemapTable[MultiTexCoordP1uiv_remap_index] -#define _gloffset_MultiTexCoordP2ui driDispatchRemapTable[MultiTexCoordP2ui_remap_index] -#define _gloffset_MultiTexCoordP2uiv driDispatchRemapTable[MultiTexCoordP2uiv_remap_index] -#define _gloffset_MultiTexCoordP3ui driDispatchRemapTable[MultiTexCoordP3ui_remap_index] -#define _gloffset_MultiTexCoordP3uiv driDispatchRemapTable[MultiTexCoordP3uiv_remap_index] -#define _gloffset_MultiTexCoordP4ui driDispatchRemapTable[MultiTexCoordP4ui_remap_index] -#define _gloffset_MultiTexCoordP4uiv driDispatchRemapTable[MultiTexCoordP4uiv_remap_index] -#define _gloffset_NormalP3ui driDispatchRemapTable[NormalP3ui_remap_index] -#define _gloffset_NormalP3uiv driDispatchRemapTable[NormalP3uiv_remap_index] -#define _gloffset_SecondaryColorP3ui driDispatchRemapTable[SecondaryColorP3ui_remap_index] -#define _gloffset_SecondaryColorP3uiv driDispatchRemapTable[SecondaryColorP3uiv_remap_index] -#define _gloffset_TexCoordP1ui driDispatchRemapTable[TexCoordP1ui_remap_index] -#define _gloffset_TexCoordP1uiv driDispatchRemapTable[TexCoordP1uiv_remap_index] -#define _gloffset_TexCoordP2ui driDispatchRemapTable[TexCoordP2ui_remap_index] -#define _gloffset_TexCoordP2uiv driDispatchRemapTable[TexCoordP2uiv_remap_index] -#define _gloffset_TexCoordP3ui driDispatchRemapTable[TexCoordP3ui_remap_index] -#define _gloffset_TexCoordP3uiv driDispatchRemapTable[TexCoordP3uiv_remap_index] -#define _gloffset_TexCoordP4ui driDispatchRemapTable[TexCoordP4ui_remap_index] -#define _gloffset_TexCoordP4uiv driDispatchRemapTable[TexCoordP4uiv_remap_index] -#define _gloffset_VertexAttribP1ui driDispatchRemapTable[VertexAttribP1ui_remap_index] -#define _gloffset_VertexAttribP1uiv driDispatchRemapTable[VertexAttribP1uiv_remap_index] -#define _gloffset_VertexAttribP2ui driDispatchRemapTable[VertexAttribP2ui_remap_index] -#define _gloffset_VertexAttribP2uiv driDispatchRemapTable[VertexAttribP2uiv_remap_index] -#define _gloffset_VertexAttribP3ui driDispatchRemapTable[VertexAttribP3ui_remap_index] -#define _gloffset_VertexAttribP3uiv driDispatchRemapTable[VertexAttribP3uiv_remap_index] -#define _gloffset_VertexAttribP4ui driDispatchRemapTable[VertexAttribP4ui_remap_index] -#define _gloffset_VertexAttribP4uiv driDispatchRemapTable[VertexAttribP4uiv_remap_index] -#define _gloffset_VertexP2ui driDispatchRemapTable[VertexP2ui_remap_index] -#define _gloffset_VertexP2uiv driDispatchRemapTable[VertexP2uiv_remap_index] -#define _gloffset_VertexP3ui driDispatchRemapTable[VertexP3ui_remap_index] -#define _gloffset_VertexP3uiv driDispatchRemapTable[VertexP3uiv_remap_index] -#define _gloffset_VertexP4ui driDispatchRemapTable[VertexP4ui_remap_index] -#define _gloffset_VertexP4uiv driDispatchRemapTable[VertexP4uiv_remap_index] -#define _gloffset_BindTransformFeedback driDispatchRemapTable[BindTransformFeedback_remap_index] -#define _gloffset_DeleteTransformFeedbacks driDispatchRemapTable[DeleteTransformFeedbacks_remap_index] -#define _gloffset_DrawTransformFeedback driDispatchRemapTable[DrawTransformFeedback_remap_index] -#define _gloffset_GenTransformFeedbacks driDispatchRemapTable[GenTransformFeedbacks_remap_index] -#define _gloffset_IsTransformFeedback driDispatchRemapTable[IsTransformFeedback_remap_index] -#define _gloffset_PauseTransformFeedback driDispatchRemapTable[PauseTransformFeedback_remap_index] -#define _gloffset_ResumeTransformFeedback driDispatchRemapTable[ResumeTransformFeedback_remap_index] -#define _gloffset_ClearDepthf driDispatchRemapTable[ClearDepthf_remap_index] -#define _gloffset_DepthRangef driDispatchRemapTable[DepthRangef_remap_index] -#define _gloffset_GetShaderPrecisionFormat driDispatchRemapTable[GetShaderPrecisionFormat_remap_index] -#define _gloffset_ReleaseShaderCompiler driDispatchRemapTable[ReleaseShaderCompiler_remap_index] -#define _gloffset_ShaderBinary driDispatchRemapTable[ShaderBinary_remap_index] -#define _gloffset_GetGraphicsResetStatusARB driDispatchRemapTable[GetGraphicsResetStatusARB_remap_index] -#define _gloffset_GetnColorTableARB driDispatchRemapTable[GetnColorTableARB_remap_index] -#define _gloffset_GetnCompressedTexImageARB driDispatchRemapTable[GetnCompressedTexImageARB_remap_index] -#define _gloffset_GetnConvolutionFilterARB driDispatchRemapTable[GetnConvolutionFilterARB_remap_index] -#define _gloffset_GetnHistogramARB driDispatchRemapTable[GetnHistogramARB_remap_index] -#define _gloffset_GetnMapdvARB driDispatchRemapTable[GetnMapdvARB_remap_index] -#define _gloffset_GetnMapfvARB driDispatchRemapTable[GetnMapfvARB_remap_index] -#define _gloffset_GetnMapivARB driDispatchRemapTable[GetnMapivARB_remap_index] -#define _gloffset_GetnMinmaxARB driDispatchRemapTable[GetnMinmaxARB_remap_index] -#define _gloffset_GetnPixelMapfvARB driDispatchRemapTable[GetnPixelMapfvARB_remap_index] -#define _gloffset_GetnPixelMapuivARB driDispatchRemapTable[GetnPixelMapuivARB_remap_index] -#define _gloffset_GetnPixelMapusvARB driDispatchRemapTable[GetnPixelMapusvARB_remap_index] -#define _gloffset_GetnPolygonStippleARB driDispatchRemapTable[GetnPolygonStippleARB_remap_index] -#define _gloffset_GetnSeparableFilterARB driDispatchRemapTable[GetnSeparableFilterARB_remap_index] -#define _gloffset_GetnTexImageARB driDispatchRemapTable[GetnTexImageARB_remap_index] -#define _gloffset_GetnUniformdvARB driDispatchRemapTable[GetnUniformdvARB_remap_index] -#define _gloffset_GetnUniformfvARB driDispatchRemapTable[GetnUniformfvARB_remap_index] -#define _gloffset_GetnUniformivARB driDispatchRemapTable[GetnUniformivARB_remap_index] -#define _gloffset_GetnUniformuivARB driDispatchRemapTable[GetnUniformuivARB_remap_index] -#define _gloffset_ReadnPixelsARB driDispatchRemapTable[ReadnPixelsARB_remap_index] #define _gloffset_TexStorage1D driDispatchRemapTable[TexStorage1D_remap_index] #define _gloffset_TexStorage2D driDispatchRemapTable[TexStorage2D_remap_index] #define _gloffset_TexStorage3D driDispatchRemapTable[TexStorage3D_remap_index] @@ -1897,12 +924,6 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define _gloffset_TextureStorage2DEXT driDispatchRemapTable[TextureStorage2DEXT_remap_index] #define _gloffset_TextureStorage3DEXT driDispatchRemapTable[TextureStorage3DEXT_remap_index] #define _gloffset_PolygonOffsetEXT driDispatchRemapTable[PolygonOffsetEXT_remap_index] -#define _gloffset_GetPixelTexGenParameterfvSGIS driDispatchRemapTable[GetPixelTexGenParameterfvSGIS_remap_index] -#define _gloffset_GetPixelTexGenParameterivSGIS driDispatchRemapTable[GetPixelTexGenParameterivSGIS_remap_index] -#define _gloffset_PixelTexGenParameterfSGIS driDispatchRemapTable[PixelTexGenParameterfSGIS_remap_index] -#define _gloffset_PixelTexGenParameterfvSGIS driDispatchRemapTable[PixelTexGenParameterfvSGIS_remap_index] -#define _gloffset_PixelTexGenParameteriSGIS driDispatchRemapTable[PixelTexGenParameteriSGIS_remap_index] -#define _gloffset_PixelTexGenParameterivSGIS driDispatchRemapTable[PixelTexGenParameterivSGIS_remap_index] #define _gloffset_SampleMaskSGIS driDispatchRemapTable[SampleMaskSGIS_remap_index] #define _gloffset_SamplePatternSGIS driDispatchRemapTable[SamplePatternSGIS_remap_index] #define _gloffset_ColorPointerEXT driDispatchRemapTable[ColorPointerEXT_remap_index] @@ -1932,8 +953,6 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define _gloffset_SecondaryColor3usEXT driDispatchRemapTable[SecondaryColor3usEXT_remap_index] #define _gloffset_SecondaryColor3usvEXT driDispatchRemapTable[SecondaryColor3usvEXT_remap_index] #define _gloffset_SecondaryColorPointerEXT driDispatchRemapTable[SecondaryColorPointerEXT_remap_index] -#define _gloffset_MultiDrawArraysEXT driDispatchRemapTable[MultiDrawArraysEXT_remap_index] -#define _gloffset_MultiDrawElementsEXT driDispatchRemapTable[MultiDrawElementsEXT_remap_index] #define _gloffset_FogCoordPointerEXT driDispatchRemapTable[FogCoordPointerEXT_remap_index] #define _gloffset_FogCoorddEXT driDispatchRemapTable[FogCoorddEXT_remap_index] #define _gloffset_FogCoorddvEXT driDispatchRemapTable[FogCoorddvEXT_remap_index] @@ -1956,7 +975,6 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define _gloffset_GetCombinerOutputParameterivNV driDispatchRemapTable[GetCombinerOutputParameterivNV_remap_index] #define _gloffset_GetFinalCombinerInputParameterfvNV driDispatchRemapTable[GetFinalCombinerInputParameterfvNV_remap_index] #define _gloffset_GetFinalCombinerInputParameterivNV driDispatchRemapTable[GetFinalCombinerInputParameterivNV_remap_index] -#define _gloffset_ResizeBuffersMESA driDispatchRemapTable[ResizeBuffersMESA_remap_index] #define _gloffset_WindowPos2dMESA driDispatchRemapTable[WindowPos2dMESA_remap_index] #define _gloffset_WindowPos2dvMESA driDispatchRemapTable[WindowPos2dvMESA_remap_index] #define _gloffset_WindowPos2fMESA driDispatchRemapTable[WindowPos2fMESA_remap_index] @@ -1991,20 +1009,10 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define _gloffset_SetFenceNV driDispatchRemapTable[SetFenceNV_remap_index] #define _gloffset_TestFenceNV driDispatchRemapTable[TestFenceNV_remap_index] #define _gloffset_AreProgramsResidentNV driDispatchRemapTable[AreProgramsResidentNV_remap_index] -#define _gloffset_BindProgramNV driDispatchRemapTable[BindProgramNV_remap_index] -#define _gloffset_DeleteProgramsNV driDispatchRemapTable[DeleteProgramsNV_remap_index] #define _gloffset_ExecuteProgramNV driDispatchRemapTable[ExecuteProgramNV_remap_index] -#define _gloffset_GenProgramsNV driDispatchRemapTable[GenProgramsNV_remap_index] #define _gloffset_GetProgramParameterdvNV driDispatchRemapTable[GetProgramParameterdvNV_remap_index] #define _gloffset_GetProgramParameterfvNV driDispatchRemapTable[GetProgramParameterfvNV_remap_index] -#define _gloffset_GetProgramStringNV driDispatchRemapTable[GetProgramStringNV_remap_index] -#define _gloffset_GetProgramivNV driDispatchRemapTable[GetProgramivNV_remap_index] #define _gloffset_GetTrackMatrixivNV driDispatchRemapTable[GetTrackMatrixivNV_remap_index] -#define _gloffset_GetVertexAttribPointervNV driDispatchRemapTable[GetVertexAttribPointervNV_remap_index] -#define _gloffset_GetVertexAttribdvNV driDispatchRemapTable[GetVertexAttribdvNV_remap_index] -#define _gloffset_GetVertexAttribfvNV driDispatchRemapTable[GetVertexAttribfvNV_remap_index] -#define _gloffset_GetVertexAttribivNV driDispatchRemapTable[GetVertexAttribivNV_remap_index] -#define _gloffset_IsProgramNV driDispatchRemapTable[IsProgramNV_remap_index] #define _gloffset_LoadProgramNV driDispatchRemapTable[LoadProgramNV_remap_index] #define _gloffset_ProgramParameters4dvNV driDispatchRemapTable[ProgramParameters4dvNV_remap_index] #define _gloffset_ProgramParameters4fvNV driDispatchRemapTable[ProgramParameters4fvNV_remap_index] @@ -2036,7 +1044,6 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define _gloffset_VertexAttrib4svNV driDispatchRemapTable[VertexAttrib4svNV_remap_index] #define _gloffset_VertexAttrib4ubNV driDispatchRemapTable[VertexAttrib4ubNV_remap_index] #define _gloffset_VertexAttrib4ubvNV driDispatchRemapTable[VertexAttrib4ubvNV_remap_index] -#define _gloffset_VertexAttribPointerNV driDispatchRemapTable[VertexAttribPointerNV_remap_index] #define _gloffset_VertexAttribs1dvNV driDispatchRemapTable[VertexAttribs1dvNV_remap_index] #define _gloffset_VertexAttribs1fvNV driDispatchRemapTable[VertexAttribs1fvNV_remap_index] #define _gloffset_VertexAttribs1svNV driDispatchRemapTable[VertexAttribs1svNV_remap_index] @@ -2050,24 +1057,6 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define _gloffset_VertexAttribs4fvNV driDispatchRemapTable[VertexAttribs4fvNV_remap_index] #define _gloffset_VertexAttribs4svNV driDispatchRemapTable[VertexAttribs4svNV_remap_index] #define _gloffset_VertexAttribs4ubvNV driDispatchRemapTable[VertexAttribs4ubvNV_remap_index] -#define _gloffset_GetTexBumpParameterfvATI driDispatchRemapTable[GetTexBumpParameterfvATI_remap_index] -#define _gloffset_GetTexBumpParameterivATI driDispatchRemapTable[GetTexBumpParameterivATI_remap_index] -#define _gloffset_TexBumpParameterfvATI driDispatchRemapTable[TexBumpParameterfvATI_remap_index] -#define _gloffset_TexBumpParameterivATI driDispatchRemapTable[TexBumpParameterivATI_remap_index] -#define _gloffset_AlphaFragmentOp1ATI driDispatchRemapTable[AlphaFragmentOp1ATI_remap_index] -#define _gloffset_AlphaFragmentOp2ATI driDispatchRemapTable[AlphaFragmentOp2ATI_remap_index] -#define _gloffset_AlphaFragmentOp3ATI driDispatchRemapTable[AlphaFragmentOp3ATI_remap_index] -#define _gloffset_BeginFragmentShaderATI driDispatchRemapTable[BeginFragmentShaderATI_remap_index] -#define _gloffset_BindFragmentShaderATI driDispatchRemapTable[BindFragmentShaderATI_remap_index] -#define _gloffset_ColorFragmentOp1ATI driDispatchRemapTable[ColorFragmentOp1ATI_remap_index] -#define _gloffset_ColorFragmentOp2ATI driDispatchRemapTable[ColorFragmentOp2ATI_remap_index] -#define _gloffset_ColorFragmentOp3ATI driDispatchRemapTable[ColorFragmentOp3ATI_remap_index] -#define _gloffset_DeleteFragmentShaderATI driDispatchRemapTable[DeleteFragmentShaderATI_remap_index] -#define _gloffset_EndFragmentShaderATI driDispatchRemapTable[EndFragmentShaderATI_remap_index] -#define _gloffset_GenFragmentShadersATI driDispatchRemapTable[GenFragmentShadersATI_remap_index] -#define _gloffset_PassTexCoordATI driDispatchRemapTable[PassTexCoordATI_remap_index] -#define _gloffset_SampleMapATI driDispatchRemapTable[SampleMapATI_remap_index] -#define _gloffset_SetFragmentShaderConstantATI driDispatchRemapTable[SetFragmentShaderConstantATI_remap_index] #define _gloffset_PointParameteriNV driDispatchRemapTable[PointParameteriNV_remap_index] #define _gloffset_PointParameterivNV driDispatchRemapTable[PointParameterivNV_remap_index] #define _gloffset_ActiveStencilFaceEXT driDispatchRemapTable[ActiveStencilFaceEXT_remap_index] @@ -2081,103 +1070,25 @@ extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define _gloffset_ProgramNamedParameter4dvNV driDispatchRemapTable[ProgramNamedParameter4dvNV_remap_index] #define _gloffset_ProgramNamedParameter4fNV driDispatchRemapTable[ProgramNamedParameter4fNV_remap_index] #define _gloffset_ProgramNamedParameter4fvNV driDispatchRemapTable[ProgramNamedParameter4fvNV_remap_index] -#define _gloffset_PrimitiveRestartIndexNV driDispatchRemapTable[PrimitiveRestartIndexNV_remap_index] -#define _gloffset_PrimitiveRestartNV driDispatchRemapTable[PrimitiveRestartNV_remap_index] #define _gloffset_DepthBoundsEXT driDispatchRemapTable[DepthBoundsEXT_remap_index] #define _gloffset_BlendEquationSeparateEXT driDispatchRemapTable[BlendEquationSeparateEXT_remap_index] -#define _gloffset_BindFramebufferEXT driDispatchRemapTable[BindFramebufferEXT_remap_index] -#define _gloffset_BindRenderbufferEXT driDispatchRemapTable[BindRenderbufferEXT_remap_index] -#define _gloffset_CheckFramebufferStatusEXT driDispatchRemapTable[CheckFramebufferStatusEXT_remap_index] -#define _gloffset_DeleteFramebuffersEXT driDispatchRemapTable[DeleteFramebuffersEXT_remap_index] -#define _gloffset_DeleteRenderbuffersEXT driDispatchRemapTable[DeleteRenderbuffersEXT_remap_index] -#define _gloffset_FramebufferRenderbufferEXT driDispatchRemapTable[FramebufferRenderbufferEXT_remap_index] -#define _gloffset_FramebufferTexture1DEXT driDispatchRemapTable[FramebufferTexture1DEXT_remap_index] -#define _gloffset_FramebufferTexture2DEXT driDispatchRemapTable[FramebufferTexture2DEXT_remap_index] -#define _gloffset_FramebufferTexture3DEXT driDispatchRemapTable[FramebufferTexture3DEXT_remap_index] -#define _gloffset_GenFramebuffersEXT driDispatchRemapTable[GenFramebuffersEXT_remap_index] -#define _gloffset_GenRenderbuffersEXT driDispatchRemapTable[GenRenderbuffersEXT_remap_index] -#define _gloffset_GenerateMipmapEXT driDispatchRemapTable[GenerateMipmapEXT_remap_index] -#define _gloffset_GetFramebufferAttachmentParameterivEXT driDispatchRemapTable[GetFramebufferAttachmentParameterivEXT_remap_index] -#define _gloffset_GetRenderbufferParameterivEXT driDispatchRemapTable[GetRenderbufferParameterivEXT_remap_index] -#define _gloffset_IsFramebufferEXT driDispatchRemapTable[IsFramebufferEXT_remap_index] -#define _gloffset_IsRenderbufferEXT driDispatchRemapTable[IsRenderbufferEXT_remap_index] -#define _gloffset_RenderbufferStorageEXT driDispatchRemapTable[RenderbufferStorageEXT_remap_index] -#define _gloffset_BlitFramebufferEXT driDispatchRemapTable[BlitFramebufferEXT_remap_index] #define _gloffset_BufferParameteriAPPLE driDispatchRemapTable[BufferParameteriAPPLE_remap_index] #define _gloffset_FlushMappedBufferRangeAPPLE driDispatchRemapTable[FlushMappedBufferRangeAPPLE_remap_index] #define _gloffset_BindFragDataLocationEXT driDispatchRemapTable[BindFragDataLocationEXT_remap_index] #define _gloffset_GetFragDataLocationEXT driDispatchRemapTable[GetFragDataLocationEXT_remap_index] -#define _gloffset_GetUniformuivEXT driDispatchRemapTable[GetUniformuivEXT_remap_index] -#define _gloffset_GetVertexAttribIivEXT driDispatchRemapTable[GetVertexAttribIivEXT_remap_index] -#define _gloffset_GetVertexAttribIuivEXT driDispatchRemapTable[GetVertexAttribIuivEXT_remap_index] -#define _gloffset_Uniform1uiEXT driDispatchRemapTable[Uniform1uiEXT_remap_index] -#define _gloffset_Uniform1uivEXT driDispatchRemapTable[Uniform1uivEXT_remap_index] -#define _gloffset_Uniform2uiEXT driDispatchRemapTable[Uniform2uiEXT_remap_index] -#define _gloffset_Uniform2uivEXT driDispatchRemapTable[Uniform2uivEXT_remap_index] -#define _gloffset_Uniform3uiEXT driDispatchRemapTable[Uniform3uiEXT_remap_index] -#define _gloffset_Uniform3uivEXT driDispatchRemapTable[Uniform3uivEXT_remap_index] -#define _gloffset_Uniform4uiEXT driDispatchRemapTable[Uniform4uiEXT_remap_index] -#define _gloffset_Uniform4uivEXT driDispatchRemapTable[Uniform4uivEXT_remap_index] -#define _gloffset_VertexAttribI1iEXT driDispatchRemapTable[VertexAttribI1iEXT_remap_index] -#define _gloffset_VertexAttribI1ivEXT driDispatchRemapTable[VertexAttribI1ivEXT_remap_index] -#define _gloffset_VertexAttribI1uiEXT driDispatchRemapTable[VertexAttribI1uiEXT_remap_index] -#define _gloffset_VertexAttribI1uivEXT driDispatchRemapTable[VertexAttribI1uivEXT_remap_index] -#define _gloffset_VertexAttribI2iEXT driDispatchRemapTable[VertexAttribI2iEXT_remap_index] -#define _gloffset_VertexAttribI2ivEXT driDispatchRemapTable[VertexAttribI2ivEXT_remap_index] -#define _gloffset_VertexAttribI2uiEXT driDispatchRemapTable[VertexAttribI2uiEXT_remap_index] -#define _gloffset_VertexAttribI2uivEXT driDispatchRemapTable[VertexAttribI2uivEXT_remap_index] -#define _gloffset_VertexAttribI3iEXT driDispatchRemapTable[VertexAttribI3iEXT_remap_index] -#define _gloffset_VertexAttribI3ivEXT driDispatchRemapTable[VertexAttribI3ivEXT_remap_index] -#define _gloffset_VertexAttribI3uiEXT driDispatchRemapTable[VertexAttribI3uiEXT_remap_index] -#define _gloffset_VertexAttribI3uivEXT driDispatchRemapTable[VertexAttribI3uivEXT_remap_index] -#define _gloffset_VertexAttribI4bvEXT driDispatchRemapTable[VertexAttribI4bvEXT_remap_index] -#define _gloffset_VertexAttribI4iEXT driDispatchRemapTable[VertexAttribI4iEXT_remap_index] -#define _gloffset_VertexAttribI4ivEXT driDispatchRemapTable[VertexAttribI4ivEXT_remap_index] -#define _gloffset_VertexAttribI4svEXT driDispatchRemapTable[VertexAttribI4svEXT_remap_index] -#define _gloffset_VertexAttribI4ubvEXT driDispatchRemapTable[VertexAttribI4ubvEXT_remap_index] -#define _gloffset_VertexAttribI4uiEXT driDispatchRemapTable[VertexAttribI4uiEXT_remap_index] -#define _gloffset_VertexAttribI4uivEXT driDispatchRemapTable[VertexAttribI4uivEXT_remap_index] -#define _gloffset_VertexAttribI4usvEXT driDispatchRemapTable[VertexAttribI4usvEXT_remap_index] -#define _gloffset_VertexAttribIPointerEXT driDispatchRemapTable[VertexAttribIPointerEXT_remap_index] -#define _gloffset_FramebufferTextureLayerEXT driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index] -#define _gloffset_ColorMaskIndexedEXT driDispatchRemapTable[ColorMaskIndexedEXT_remap_index] -#define _gloffset_DisableIndexedEXT driDispatchRemapTable[DisableIndexedEXT_remap_index] -#define _gloffset_EnableIndexedEXT driDispatchRemapTable[EnableIndexedEXT_remap_index] -#define _gloffset_GetBooleanIndexedvEXT driDispatchRemapTable[GetBooleanIndexedvEXT_remap_index] -#define _gloffset_GetIntegerIndexedvEXT driDispatchRemapTable[GetIntegerIndexedvEXT_remap_index] -#define _gloffset_IsEnabledIndexedEXT driDispatchRemapTable[IsEnabledIndexedEXT_remap_index] #define _gloffset_ClearColorIiEXT driDispatchRemapTable[ClearColorIiEXT_remap_index] #define _gloffset_ClearColorIuiEXT driDispatchRemapTable[ClearColorIuiEXT_remap_index] #define _gloffset_GetTexParameterIivEXT driDispatchRemapTable[GetTexParameterIivEXT_remap_index] #define _gloffset_GetTexParameterIuivEXT driDispatchRemapTable[GetTexParameterIuivEXT_remap_index] #define _gloffset_TexParameterIivEXT driDispatchRemapTable[TexParameterIivEXT_remap_index] #define _gloffset_TexParameterIuivEXT driDispatchRemapTable[TexParameterIuivEXT_remap_index] -#define _gloffset_BeginConditionalRenderNV driDispatchRemapTable[BeginConditionalRenderNV_remap_index] -#define _gloffset_EndConditionalRenderNV driDispatchRemapTable[EndConditionalRenderNV_remap_index] -#define _gloffset_BeginTransformFeedbackEXT driDispatchRemapTable[BeginTransformFeedbackEXT_remap_index] -#define _gloffset_BindBufferBaseEXT driDispatchRemapTable[BindBufferBaseEXT_remap_index] -#define _gloffset_BindBufferOffsetEXT driDispatchRemapTable[BindBufferOffsetEXT_remap_index] -#define _gloffset_BindBufferRangeEXT driDispatchRemapTable[BindBufferRangeEXT_remap_index] -#define _gloffset_EndTransformFeedbackEXT driDispatchRemapTable[EndTransformFeedbackEXT_remap_index] -#define _gloffset_GetTransformFeedbackVaryingEXT driDispatchRemapTable[GetTransformFeedbackVaryingEXT_remap_index] -#define _gloffset_TransformFeedbackVaryingsEXT driDispatchRemapTable[TransformFeedbackVaryingsEXT_remap_index] -#define _gloffset_ProvokingVertexEXT driDispatchRemapTable[ProvokingVertexEXT_remap_index] #define _gloffset_GetTexParameterPointervAPPLE driDispatchRemapTable[GetTexParameterPointervAPPLE_remap_index] #define _gloffset_TextureRangeAPPLE driDispatchRemapTable[TextureRangeAPPLE_remap_index] #define _gloffset_GetObjectParameterivAPPLE driDispatchRemapTable[GetObjectParameterivAPPLE_remap_index] #define _gloffset_ObjectPurgeableAPPLE driDispatchRemapTable[ObjectPurgeableAPPLE_remap_index] #define _gloffset_ObjectUnpurgeableAPPLE driDispatchRemapTable[ObjectUnpurgeableAPPLE_remap_index] -#define _gloffset_ActiveProgramEXT driDispatchRemapTable[ActiveProgramEXT_remap_index] #define _gloffset_CreateShaderProgramEXT driDispatchRemapTable[CreateShaderProgramEXT_remap_index] -#define _gloffset_UseShaderProgramEXT driDispatchRemapTable[UseShaderProgramEXT_remap_index] #define _gloffset_TextureBarrierNV driDispatchRemapTable[TextureBarrierNV_remap_index] -#define _gloffset_StencilFuncSeparateATI driDispatchRemapTable[StencilFuncSeparateATI_remap_index] -#define _gloffset_ProgramEnvParameters4fvEXT driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index] -#define _gloffset_ProgramLocalParameters4fvEXT driDispatchRemapTable[ProgramLocalParameters4fvEXT_remap_index] -#define _gloffset_GetQueryObjecti64vEXT driDispatchRemapTable[GetQueryObjecti64vEXT_remap_index] -#define _gloffset_GetQueryObjectui64vEXT driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index] -#define _gloffset_EGLImageTargetRenderbufferStorageOES driDispatchRemapTable[EGLImageTargetRenderbufferStorageOES_remap_index] -#define _gloffset_EGLImageTargetTexture2DOES driDispatchRemapTable[EGLImageTargetTexture2DOES_remap_index] #endif /* !FEATURE_remap_table */ @@ -6295,677 +5206,6 @@ static inline void SET_CopyTexSubImage3D(struct _glapi_table *disp, void (GLAPIE SET_by_offset(disp, _gloffset_CopyTexSubImage3D, fn); } -typedef void (GLAPIENTRYP _glptr_ActiveTextureARB)(GLenum); -#define CALL_ActiveTextureARB(disp, parameters) \ - (* GET_ActiveTextureARB(disp)) parameters -static inline _glptr_ActiveTextureARB GET_ActiveTextureARB(struct _glapi_table *disp) { - return (_glptr_ActiveTextureARB) (GET_by_offset(disp, _gloffset_ActiveTextureARB)); -} - -static inline void SET_ActiveTextureARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_ActiveTextureARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_ClientActiveTextureARB)(GLenum); -#define CALL_ClientActiveTextureARB(disp, parameters) \ - (* GET_ClientActiveTextureARB(disp)) parameters -static inline _glptr_ClientActiveTextureARB GET_ClientActiveTextureARB(struct _glapi_table *disp) { - return (_glptr_ClientActiveTextureARB) (GET_by_offset(disp, _gloffset_ClientActiveTextureARB)); -} - -static inline void SET_ClientActiveTextureARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_ClientActiveTextureARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord1dARB)(GLenum, GLdouble); -#define CALL_MultiTexCoord1dARB(disp, parameters) \ - (* GET_MultiTexCoord1dARB(disp)) parameters -static inline _glptr_MultiTexCoord1dARB GET_MultiTexCoord1dARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord1dARB) (GET_by_offset(disp, _gloffset_MultiTexCoord1dARB)); -} - -static inline void SET_MultiTexCoord1dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLdouble)) { - SET_by_offset(disp, _gloffset_MultiTexCoord1dARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord1dvARB)(GLenum, const GLdouble *); -#define CALL_MultiTexCoord1dvARB(disp, parameters) \ - (* GET_MultiTexCoord1dvARB(disp)) parameters -static inline _glptr_MultiTexCoord1dvARB GET_MultiTexCoord1dvARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord1dvARB) (GET_by_offset(disp, _gloffset_MultiTexCoord1dvARB)); -} - -static inline void SET_MultiTexCoord1dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLdouble *)) { - SET_by_offset(disp, _gloffset_MultiTexCoord1dvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord1fARB)(GLenum, GLfloat); -#define CALL_MultiTexCoord1fARB(disp, parameters) \ - (* GET_MultiTexCoord1fARB(disp)) parameters -static inline _glptr_MultiTexCoord1fARB GET_MultiTexCoord1fARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord1fARB) (GET_by_offset(disp, _gloffset_MultiTexCoord1fARB)); -} - -static inline void SET_MultiTexCoord1fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { - SET_by_offset(disp, _gloffset_MultiTexCoord1fARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord1fvARB)(GLenum, const GLfloat *); -#define CALL_MultiTexCoord1fvARB(disp, parameters) \ - (* GET_MultiTexCoord1fvARB(disp)) parameters -static inline _glptr_MultiTexCoord1fvARB GET_MultiTexCoord1fvARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord1fvARB) (GET_by_offset(disp, _gloffset_MultiTexCoord1fvARB)); -} - -static inline void SET_MultiTexCoord1fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { - SET_by_offset(disp, _gloffset_MultiTexCoord1fvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord1iARB)(GLenum, GLint); -#define CALL_MultiTexCoord1iARB(disp, parameters) \ - (* GET_MultiTexCoord1iARB(disp)) parameters -static inline _glptr_MultiTexCoord1iARB GET_MultiTexCoord1iARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord1iARB) (GET_by_offset(disp, _gloffset_MultiTexCoord1iARB)); -} - -static inline void SET_MultiTexCoord1iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint)) { - SET_by_offset(disp, _gloffset_MultiTexCoord1iARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord1ivARB)(GLenum, const GLint *); -#define CALL_MultiTexCoord1ivARB(disp, parameters) \ - (* GET_MultiTexCoord1ivARB(disp)) parameters -static inline _glptr_MultiTexCoord1ivARB GET_MultiTexCoord1ivARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord1ivARB) (GET_by_offset(disp, _gloffset_MultiTexCoord1ivARB)); -} - -static inline void SET_MultiTexCoord1ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { - SET_by_offset(disp, _gloffset_MultiTexCoord1ivARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord1sARB)(GLenum, GLshort); -#define CALL_MultiTexCoord1sARB(disp, parameters) \ - (* GET_MultiTexCoord1sARB(disp)) parameters -static inline _glptr_MultiTexCoord1sARB GET_MultiTexCoord1sARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord1sARB) (GET_by_offset(disp, _gloffset_MultiTexCoord1sARB)); -} - -static inline void SET_MultiTexCoord1sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLshort)) { - SET_by_offset(disp, _gloffset_MultiTexCoord1sARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord1svARB)(GLenum, const GLshort *); -#define CALL_MultiTexCoord1svARB(disp, parameters) \ - (* GET_MultiTexCoord1svARB(disp)) parameters -static inline _glptr_MultiTexCoord1svARB GET_MultiTexCoord1svARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord1svARB) (GET_by_offset(disp, _gloffset_MultiTexCoord1svARB)); -} - -static inline void SET_MultiTexCoord1svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLshort *)) { - SET_by_offset(disp, _gloffset_MultiTexCoord1svARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord2dARB)(GLenum, GLdouble, GLdouble); -#define CALL_MultiTexCoord2dARB(disp, parameters) \ - (* GET_MultiTexCoord2dARB(disp)) parameters -static inline _glptr_MultiTexCoord2dARB GET_MultiTexCoord2dARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord2dARB) (GET_by_offset(disp, _gloffset_MultiTexCoord2dARB)); -} - -static inline void SET_MultiTexCoord2dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLdouble, GLdouble)) { - SET_by_offset(disp, _gloffset_MultiTexCoord2dARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord2dvARB)(GLenum, const GLdouble *); -#define CALL_MultiTexCoord2dvARB(disp, parameters) \ - (* GET_MultiTexCoord2dvARB(disp)) parameters -static inline _glptr_MultiTexCoord2dvARB GET_MultiTexCoord2dvARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord2dvARB) (GET_by_offset(disp, _gloffset_MultiTexCoord2dvARB)); -} - -static inline void SET_MultiTexCoord2dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLdouble *)) { - SET_by_offset(disp, _gloffset_MultiTexCoord2dvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord2fARB)(GLenum, GLfloat, GLfloat); -#define CALL_MultiTexCoord2fARB(disp, parameters) \ - (* GET_MultiTexCoord2fARB(disp)) parameters -static inline _glptr_MultiTexCoord2fARB GET_MultiTexCoord2fARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord2fARB) (GET_by_offset(disp, _gloffset_MultiTexCoord2fARB)); -} - -static inline void SET_MultiTexCoord2fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_MultiTexCoord2fARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord2fvARB)(GLenum, const GLfloat *); -#define CALL_MultiTexCoord2fvARB(disp, parameters) \ - (* GET_MultiTexCoord2fvARB(disp)) parameters -static inline _glptr_MultiTexCoord2fvARB GET_MultiTexCoord2fvARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord2fvARB) (GET_by_offset(disp, _gloffset_MultiTexCoord2fvARB)); -} - -static inline void SET_MultiTexCoord2fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { - SET_by_offset(disp, _gloffset_MultiTexCoord2fvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord2iARB)(GLenum, GLint, GLint); -#define CALL_MultiTexCoord2iARB(disp, parameters) \ - (* GET_MultiTexCoord2iARB(disp)) parameters -static inline _glptr_MultiTexCoord2iARB GET_MultiTexCoord2iARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord2iARB) (GET_by_offset(disp, _gloffset_MultiTexCoord2iARB)); -} - -static inline void SET_MultiTexCoord2iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint)) { - SET_by_offset(disp, _gloffset_MultiTexCoord2iARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord2ivARB)(GLenum, const GLint *); -#define CALL_MultiTexCoord2ivARB(disp, parameters) \ - (* GET_MultiTexCoord2ivARB(disp)) parameters -static inline _glptr_MultiTexCoord2ivARB GET_MultiTexCoord2ivARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord2ivARB) (GET_by_offset(disp, _gloffset_MultiTexCoord2ivARB)); -} - -static inline void SET_MultiTexCoord2ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { - SET_by_offset(disp, _gloffset_MultiTexCoord2ivARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord2sARB)(GLenum, GLshort, GLshort); -#define CALL_MultiTexCoord2sARB(disp, parameters) \ - (* GET_MultiTexCoord2sARB(disp)) parameters -static inline _glptr_MultiTexCoord2sARB GET_MultiTexCoord2sARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord2sARB) (GET_by_offset(disp, _gloffset_MultiTexCoord2sARB)); -} - -static inline void SET_MultiTexCoord2sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLshort, GLshort)) { - SET_by_offset(disp, _gloffset_MultiTexCoord2sARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord2svARB)(GLenum, const GLshort *); -#define CALL_MultiTexCoord2svARB(disp, parameters) \ - (* GET_MultiTexCoord2svARB(disp)) parameters -static inline _glptr_MultiTexCoord2svARB GET_MultiTexCoord2svARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord2svARB) (GET_by_offset(disp, _gloffset_MultiTexCoord2svARB)); -} - -static inline void SET_MultiTexCoord2svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLshort *)) { - SET_by_offset(disp, _gloffset_MultiTexCoord2svARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord3dARB)(GLenum, GLdouble, GLdouble, GLdouble); -#define CALL_MultiTexCoord3dARB(disp, parameters) \ - (* GET_MultiTexCoord3dARB(disp)) parameters -static inline _glptr_MultiTexCoord3dARB GET_MultiTexCoord3dARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord3dARB) (GET_by_offset(disp, _gloffset_MultiTexCoord3dARB)); -} - -static inline void SET_MultiTexCoord3dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLdouble, GLdouble, GLdouble)) { - SET_by_offset(disp, _gloffset_MultiTexCoord3dARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord3dvARB)(GLenum, const GLdouble *); -#define CALL_MultiTexCoord3dvARB(disp, parameters) \ - (* GET_MultiTexCoord3dvARB(disp)) parameters -static inline _glptr_MultiTexCoord3dvARB GET_MultiTexCoord3dvARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord3dvARB) (GET_by_offset(disp, _gloffset_MultiTexCoord3dvARB)); -} - -static inline void SET_MultiTexCoord3dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLdouble *)) { - SET_by_offset(disp, _gloffset_MultiTexCoord3dvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord3fARB)(GLenum, GLfloat, GLfloat, GLfloat); -#define CALL_MultiTexCoord3fARB(disp, parameters) \ - (* GET_MultiTexCoord3fARB(disp)) parameters -static inline _glptr_MultiTexCoord3fARB GET_MultiTexCoord3fARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord3fARB) (GET_by_offset(disp, _gloffset_MultiTexCoord3fARB)); -} - -static inline void SET_MultiTexCoord3fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_MultiTexCoord3fARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord3fvARB)(GLenum, const GLfloat *); -#define CALL_MultiTexCoord3fvARB(disp, parameters) \ - (* GET_MultiTexCoord3fvARB(disp)) parameters -static inline _glptr_MultiTexCoord3fvARB GET_MultiTexCoord3fvARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord3fvARB) (GET_by_offset(disp, _gloffset_MultiTexCoord3fvARB)); -} - -static inline void SET_MultiTexCoord3fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { - SET_by_offset(disp, _gloffset_MultiTexCoord3fvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord3iARB)(GLenum, GLint, GLint, GLint); -#define CALL_MultiTexCoord3iARB(disp, parameters) \ - (* GET_MultiTexCoord3iARB(disp)) parameters -static inline _glptr_MultiTexCoord3iARB GET_MultiTexCoord3iARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord3iARB) (GET_by_offset(disp, _gloffset_MultiTexCoord3iARB)); -} - -static inline void SET_MultiTexCoord3iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint)) { - SET_by_offset(disp, _gloffset_MultiTexCoord3iARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord3ivARB)(GLenum, const GLint *); -#define CALL_MultiTexCoord3ivARB(disp, parameters) \ - (* GET_MultiTexCoord3ivARB(disp)) parameters -static inline _glptr_MultiTexCoord3ivARB GET_MultiTexCoord3ivARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord3ivARB) (GET_by_offset(disp, _gloffset_MultiTexCoord3ivARB)); -} - -static inline void SET_MultiTexCoord3ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { - SET_by_offset(disp, _gloffset_MultiTexCoord3ivARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord3sARB)(GLenum, GLshort, GLshort, GLshort); -#define CALL_MultiTexCoord3sARB(disp, parameters) \ - (* GET_MultiTexCoord3sARB(disp)) parameters -static inline _glptr_MultiTexCoord3sARB GET_MultiTexCoord3sARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord3sARB) (GET_by_offset(disp, _gloffset_MultiTexCoord3sARB)); -} - -static inline void SET_MultiTexCoord3sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLshort, GLshort, GLshort)) { - SET_by_offset(disp, _gloffset_MultiTexCoord3sARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord3svARB)(GLenum, const GLshort *); -#define CALL_MultiTexCoord3svARB(disp, parameters) \ - (* GET_MultiTexCoord3svARB(disp)) parameters -static inline _glptr_MultiTexCoord3svARB GET_MultiTexCoord3svARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord3svARB) (GET_by_offset(disp, _gloffset_MultiTexCoord3svARB)); -} - -static inline void SET_MultiTexCoord3svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLshort *)) { - SET_by_offset(disp, _gloffset_MultiTexCoord3svARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord4dARB)(GLenum, GLdouble, GLdouble, GLdouble, GLdouble); -#define CALL_MultiTexCoord4dARB(disp, parameters) \ - (* GET_MultiTexCoord4dARB(disp)) parameters -static inline _glptr_MultiTexCoord4dARB GET_MultiTexCoord4dARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord4dARB) (GET_by_offset(disp, _gloffset_MultiTexCoord4dARB)); -} - -static inline void SET_MultiTexCoord4dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLdouble, GLdouble, GLdouble, GLdouble)) { - SET_by_offset(disp, _gloffset_MultiTexCoord4dARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord4dvARB)(GLenum, const GLdouble *); -#define CALL_MultiTexCoord4dvARB(disp, parameters) \ - (* GET_MultiTexCoord4dvARB(disp)) parameters -static inline _glptr_MultiTexCoord4dvARB GET_MultiTexCoord4dvARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord4dvARB) (GET_by_offset(disp, _gloffset_MultiTexCoord4dvARB)); -} - -static inline void SET_MultiTexCoord4dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLdouble *)) { - SET_by_offset(disp, _gloffset_MultiTexCoord4dvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord4fARB)(GLenum, GLfloat, GLfloat, GLfloat, GLfloat); -#define CALL_MultiTexCoord4fARB(disp, parameters) \ - (* GET_MultiTexCoord4fARB(disp)) parameters -static inline _glptr_MultiTexCoord4fARB GET_MultiTexCoord4fARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord4fARB) (GET_by_offset(disp, _gloffset_MultiTexCoord4fARB)); -} - -static inline void SET_MultiTexCoord4fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat, GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_MultiTexCoord4fARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord4fvARB)(GLenum, const GLfloat *); -#define CALL_MultiTexCoord4fvARB(disp, parameters) \ - (* GET_MultiTexCoord4fvARB(disp)) parameters -static inline _glptr_MultiTexCoord4fvARB GET_MultiTexCoord4fvARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord4fvARB) (GET_by_offset(disp, _gloffset_MultiTexCoord4fvARB)); -} - -static inline void SET_MultiTexCoord4fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { - SET_by_offset(disp, _gloffset_MultiTexCoord4fvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord4iARB)(GLenum, GLint, GLint, GLint, GLint); -#define CALL_MultiTexCoord4iARB(disp, parameters) \ - (* GET_MultiTexCoord4iARB(disp)) parameters -static inline _glptr_MultiTexCoord4iARB GET_MultiTexCoord4iARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord4iARB) (GET_by_offset(disp, _gloffset_MultiTexCoord4iARB)); -} - -static inline void SET_MultiTexCoord4iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint)) { - SET_by_offset(disp, _gloffset_MultiTexCoord4iARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord4ivARB)(GLenum, const GLint *); -#define CALL_MultiTexCoord4ivARB(disp, parameters) \ - (* GET_MultiTexCoord4ivARB(disp)) parameters -static inline _glptr_MultiTexCoord4ivARB GET_MultiTexCoord4ivARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord4ivARB) (GET_by_offset(disp, _gloffset_MultiTexCoord4ivARB)); -} - -static inline void SET_MultiTexCoord4ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { - SET_by_offset(disp, _gloffset_MultiTexCoord4ivARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord4sARB)(GLenum, GLshort, GLshort, GLshort, GLshort); -#define CALL_MultiTexCoord4sARB(disp, parameters) \ - (* GET_MultiTexCoord4sARB(disp)) parameters -static inline _glptr_MultiTexCoord4sARB GET_MultiTexCoord4sARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord4sARB) (GET_by_offset(disp, _gloffset_MultiTexCoord4sARB)); -} - -static inline void SET_MultiTexCoord4sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLshort, GLshort, GLshort, GLshort)) { - SET_by_offset(disp, _gloffset_MultiTexCoord4sARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoord4svARB)(GLenum, const GLshort *); -#define CALL_MultiTexCoord4svARB(disp, parameters) \ - (* GET_MultiTexCoord4svARB(disp)) parameters -static inline _glptr_MultiTexCoord4svARB GET_MultiTexCoord4svARB(struct _glapi_table *disp) { - return (_glptr_MultiTexCoord4svARB) (GET_by_offset(disp, _gloffset_MultiTexCoord4svARB)); -} - -static inline void SET_MultiTexCoord4svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLshort *)) { - SET_by_offset(disp, _gloffset_MultiTexCoord4svARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_AttachShader)(GLuint, GLuint); -#define CALL_AttachShader(disp, parameters) \ - (* GET_AttachShader(disp)) parameters -static inline _glptr_AttachShader GET_AttachShader(struct _glapi_table *disp) { - return (_glptr_AttachShader) (GET_by_offset(disp, _gloffset_AttachShader)); -} - -static inline void SET_AttachShader(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_AttachShader, fn); -} - -typedef GLuint (GLAPIENTRYP _glptr_CreateProgram)(void); -#define CALL_CreateProgram(disp, parameters) \ - (* GET_CreateProgram(disp)) parameters -static inline _glptr_CreateProgram GET_CreateProgram(struct _glapi_table *disp) { - return (_glptr_CreateProgram) (GET_by_offset(disp, _gloffset_CreateProgram)); -} - -static inline void SET_CreateProgram(struct _glapi_table *disp, GLuint (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_CreateProgram, fn); -} - -typedef GLuint (GLAPIENTRYP _glptr_CreateShader)(GLenum); -#define CALL_CreateShader(disp, parameters) \ - (* GET_CreateShader(disp)) parameters -static inline _glptr_CreateShader GET_CreateShader(struct _glapi_table *disp) { - return (_glptr_CreateShader) (GET_by_offset(disp, _gloffset_CreateShader)); -} - -static inline void SET_CreateShader(struct _glapi_table *disp, GLuint (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_CreateShader, fn); -} - -typedef void (GLAPIENTRYP _glptr_DeleteProgram)(GLuint); -#define CALL_DeleteProgram(disp, parameters) \ - (* GET_DeleteProgram(disp)) parameters -static inline _glptr_DeleteProgram GET_DeleteProgram(struct _glapi_table *disp) { - return (_glptr_DeleteProgram) (GET_by_offset(disp, _gloffset_DeleteProgram)); -} - -static inline void SET_DeleteProgram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_DeleteProgram, fn); -} - -typedef void (GLAPIENTRYP _glptr_DeleteShader)(GLuint); -#define CALL_DeleteShader(disp, parameters) \ - (* GET_DeleteShader(disp)) parameters -static inline _glptr_DeleteShader GET_DeleteShader(struct _glapi_table *disp) { - return (_glptr_DeleteShader) (GET_by_offset(disp, _gloffset_DeleteShader)); -} - -static inline void SET_DeleteShader(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_DeleteShader, fn); -} - -typedef void (GLAPIENTRYP _glptr_DetachShader)(GLuint, GLuint); -#define CALL_DetachShader(disp, parameters) \ - (* GET_DetachShader(disp)) parameters -static inline _glptr_DetachShader GET_DetachShader(struct _glapi_table *disp) { - return (_glptr_DetachShader) (GET_by_offset(disp, _gloffset_DetachShader)); -} - -static inline void SET_DetachShader(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_DetachShader, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetAttachedShaders)(GLuint, GLsizei, GLsizei *, GLuint *); -#define CALL_GetAttachedShaders(disp, parameters) \ - (* GET_GetAttachedShaders(disp)) parameters -static inline _glptr_GetAttachedShaders GET_GetAttachedShaders(struct _glapi_table *disp) { - return (_glptr_GetAttachedShaders) (GET_by_offset(disp, _gloffset_GetAttachedShaders)); -} - -static inline void SET_GetAttachedShaders(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, GLsizei *, GLuint *)) { - SET_by_offset(disp, _gloffset_GetAttachedShaders, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetProgramInfoLog)(GLuint, GLsizei, GLsizei *, GLchar *); -#define CALL_GetProgramInfoLog(disp, parameters) \ - (* GET_GetProgramInfoLog(disp)) parameters -static inline _glptr_GetProgramInfoLog GET_GetProgramInfoLog(struct _glapi_table *disp) { - return (_glptr_GetProgramInfoLog) (GET_by_offset(disp, _gloffset_GetProgramInfoLog)); -} - -static inline void SET_GetProgramInfoLog(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, GLsizei *, GLchar *)) { - SET_by_offset(disp, _gloffset_GetProgramInfoLog, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetProgramiv)(GLuint, GLenum, GLint *); -#define CALL_GetProgramiv(disp, parameters) \ - (* GET_GetProgramiv(disp)) parameters -static inline _glptr_GetProgramiv GET_GetProgramiv(struct _glapi_table *disp) { - return (_glptr_GetProgramiv) (GET_by_offset(disp, _gloffset_GetProgramiv)); -} - -static inline void SET_GetProgramiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetProgramiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetShaderInfoLog)(GLuint, GLsizei, GLsizei *, GLchar *); -#define CALL_GetShaderInfoLog(disp, parameters) \ - (* GET_GetShaderInfoLog(disp)) parameters -static inline _glptr_GetShaderInfoLog GET_GetShaderInfoLog(struct _glapi_table *disp) { - return (_glptr_GetShaderInfoLog) (GET_by_offset(disp, _gloffset_GetShaderInfoLog)); -} - -static inline void SET_GetShaderInfoLog(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, GLsizei *, GLchar *)) { - SET_by_offset(disp, _gloffset_GetShaderInfoLog, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetShaderiv)(GLuint, GLenum, GLint *); -#define CALL_GetShaderiv(disp, parameters) \ - (* GET_GetShaderiv(disp)) parameters -static inline _glptr_GetShaderiv GET_GetShaderiv(struct _glapi_table *disp) { - return (_glptr_GetShaderiv) (GET_by_offset(disp, _gloffset_GetShaderiv)); -} - -static inline void SET_GetShaderiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetShaderiv, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsProgram)(GLuint); -#define CALL_IsProgram(disp, parameters) \ - (* GET_IsProgram(disp)) parameters -static inline _glptr_IsProgram GET_IsProgram(struct _glapi_table *disp) { - return (_glptr_IsProgram) (GET_by_offset(disp, _gloffset_IsProgram)); -} - -static inline void SET_IsProgram(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_IsProgram, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsShader)(GLuint); -#define CALL_IsShader(disp, parameters) \ - (* GET_IsShader(disp)) parameters -static inline _glptr_IsShader GET_IsShader(struct _glapi_table *disp) { - return (_glptr_IsShader) (GET_by_offset(disp, _gloffset_IsShader)); -} - -static inline void SET_IsShader(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_IsShader, fn); -} - -typedef void (GLAPIENTRYP _glptr_StencilFuncSeparate)(GLenum, GLenum, GLint, GLuint); -#define CALL_StencilFuncSeparate(disp, parameters) \ - (* GET_StencilFuncSeparate(disp)) parameters -static inline _glptr_StencilFuncSeparate GET_StencilFuncSeparate(struct _glapi_table *disp) { - return (_glptr_StencilFuncSeparate) (GET_by_offset(disp, _gloffset_StencilFuncSeparate)); -} - -static inline void SET_StencilFuncSeparate(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint, GLuint)) { - SET_by_offset(disp, _gloffset_StencilFuncSeparate, fn); -} - -typedef void (GLAPIENTRYP _glptr_StencilMaskSeparate)(GLenum, GLuint); -#define CALL_StencilMaskSeparate(disp, parameters) \ - (* GET_StencilMaskSeparate(disp)) parameters -static inline _glptr_StencilMaskSeparate GET_StencilMaskSeparate(struct _glapi_table *disp) { - return (_glptr_StencilMaskSeparate) (GET_by_offset(disp, _gloffset_StencilMaskSeparate)); -} - -static inline void SET_StencilMaskSeparate(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_StencilMaskSeparate, fn); -} - -typedef void (GLAPIENTRYP _glptr_StencilOpSeparate)(GLenum, GLenum, GLenum, GLenum); -#define CALL_StencilOpSeparate(disp, parameters) \ - (* GET_StencilOpSeparate(disp)) parameters -static inline _glptr_StencilOpSeparate GET_StencilOpSeparate(struct _glapi_table *disp) { - return (_glptr_StencilOpSeparate) (GET_by_offset(disp, _gloffset_StencilOpSeparate)); -} - -static inline void SET_StencilOpSeparate(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLenum)) { - SET_by_offset(disp, _gloffset_StencilOpSeparate, fn); -} - -typedef void (GLAPIENTRYP _glptr_UniformMatrix2x3fv)(GLint, GLsizei, GLboolean, const GLfloat *); -#define CALL_UniformMatrix2x3fv(disp, parameters) \ - (* GET_UniformMatrix2x3fv(disp)) parameters -static inline _glptr_UniformMatrix2x3fv GET_UniformMatrix2x3fv(struct _glapi_table *disp) { - return (_glptr_UniformMatrix2x3fv) (GET_by_offset(disp, _gloffset_UniformMatrix2x3fv)); -} - -static inline void SET_UniformMatrix2x3fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { - SET_by_offset(disp, _gloffset_UniformMatrix2x3fv, fn); -} - -typedef void (GLAPIENTRYP _glptr_UniformMatrix2x4fv)(GLint, GLsizei, GLboolean, const GLfloat *); -#define CALL_UniformMatrix2x4fv(disp, parameters) \ - (* GET_UniformMatrix2x4fv(disp)) parameters -static inline _glptr_UniformMatrix2x4fv GET_UniformMatrix2x4fv(struct _glapi_table *disp) { - return (_glptr_UniformMatrix2x4fv) (GET_by_offset(disp, _gloffset_UniformMatrix2x4fv)); -} - -static inline void SET_UniformMatrix2x4fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { - SET_by_offset(disp, _gloffset_UniformMatrix2x4fv, fn); -} - -typedef void (GLAPIENTRYP _glptr_UniformMatrix3x2fv)(GLint, GLsizei, GLboolean, const GLfloat *); -#define CALL_UniformMatrix3x2fv(disp, parameters) \ - (* GET_UniformMatrix3x2fv(disp)) parameters -static inline _glptr_UniformMatrix3x2fv GET_UniformMatrix3x2fv(struct _glapi_table *disp) { - return (_glptr_UniformMatrix3x2fv) (GET_by_offset(disp, _gloffset_UniformMatrix3x2fv)); -} - -static inline void SET_UniformMatrix3x2fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { - SET_by_offset(disp, _gloffset_UniformMatrix3x2fv, fn); -} - -typedef void (GLAPIENTRYP _glptr_UniformMatrix3x4fv)(GLint, GLsizei, GLboolean, const GLfloat *); -#define CALL_UniformMatrix3x4fv(disp, parameters) \ - (* GET_UniformMatrix3x4fv(disp)) parameters -static inline _glptr_UniformMatrix3x4fv GET_UniformMatrix3x4fv(struct _glapi_table *disp) { - return (_glptr_UniformMatrix3x4fv) (GET_by_offset(disp, _gloffset_UniformMatrix3x4fv)); -} - -static inline void SET_UniformMatrix3x4fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { - SET_by_offset(disp, _gloffset_UniformMatrix3x4fv, fn); -} - -typedef void (GLAPIENTRYP _glptr_UniformMatrix4x2fv)(GLint, GLsizei, GLboolean, const GLfloat *); -#define CALL_UniformMatrix4x2fv(disp, parameters) \ - (* GET_UniformMatrix4x2fv(disp)) parameters -static inline _glptr_UniformMatrix4x2fv GET_UniformMatrix4x2fv(struct _glapi_table *disp) { - return (_glptr_UniformMatrix4x2fv) (GET_by_offset(disp, _gloffset_UniformMatrix4x2fv)); -} - -static inline void SET_UniformMatrix4x2fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { - SET_by_offset(disp, _gloffset_UniformMatrix4x2fv, fn); -} - -typedef void (GLAPIENTRYP _glptr_UniformMatrix4x3fv)(GLint, GLsizei, GLboolean, const GLfloat *); -#define CALL_UniformMatrix4x3fv(disp, parameters) \ - (* GET_UniformMatrix4x3fv(disp)) parameters -static inline _glptr_UniformMatrix4x3fv GET_UniformMatrix4x3fv(struct _glapi_table *disp) { - return (_glptr_UniformMatrix4x3fv) (GET_by_offset(disp, _gloffset_UniformMatrix4x3fv)); -} - -static inline void SET_UniformMatrix4x3fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { - SET_by_offset(disp, _gloffset_UniformMatrix4x3fv, fn); -} - -typedef void (GLAPIENTRYP _glptr_ClampColor)(GLenum, GLenum); -#define CALL_ClampColor(disp, parameters) \ - (* GET_ClampColor(disp)) parameters -static inline _glptr_ClampColor GET_ClampColor(struct _glapi_table *disp) { - return (_glptr_ClampColor) (GET_by_offset(disp, _gloffset_ClampColor)); -} - -static inline void SET_ClampColor(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { - SET_by_offset(disp, _gloffset_ClampColor, fn); -} - -typedef void (GLAPIENTRYP _glptr_ClearBufferfi)(GLenum, GLint, GLfloat, GLint); -#define CALL_ClearBufferfi(disp, parameters) \ - (* GET_ClearBufferfi(disp)) parameters -static inline _glptr_ClearBufferfi GET_ClearBufferfi(struct _glapi_table *disp) { - return (_glptr_ClearBufferfi) (GET_by_offset(disp, _gloffset_ClearBufferfi)); -} - -static inline void SET_ClearBufferfi(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLfloat, GLint)) { - SET_by_offset(disp, _gloffset_ClearBufferfi, fn); -} - -typedef void (GLAPIENTRYP _glptr_ClearBufferfv)(GLenum, GLint, const GLfloat *); -#define CALL_ClearBufferfv(disp, parameters) \ - (* GET_ClearBufferfv(disp)) parameters -static inline _glptr_ClearBufferfv GET_ClearBufferfv(struct _glapi_table *disp) { - return (_glptr_ClearBufferfv) (GET_by_offset(disp, _gloffset_ClearBufferfv)); -} - -static inline void SET_ClearBufferfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, const GLfloat *)) { - SET_by_offset(disp, _gloffset_ClearBufferfv, fn); -} - -typedef void (GLAPIENTRYP _glptr_ClearBufferiv)(GLenum, GLint, const GLint *); -#define CALL_ClearBufferiv(disp, parameters) \ - (* GET_ClearBufferiv(disp)) parameters -static inline _glptr_ClearBufferiv GET_ClearBufferiv(struct _glapi_table *disp) { - return (_glptr_ClearBufferiv) (GET_by_offset(disp, _gloffset_ClearBufferiv)); -} - -static inline void SET_ClearBufferiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, const GLint *)) { - SET_by_offset(disp, _gloffset_ClearBufferiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_ClearBufferuiv)(GLenum, GLint, const GLuint *); -#define CALL_ClearBufferuiv(disp, parameters) \ - (* GET_ClearBufferuiv(disp)) parameters -static inline _glptr_ClearBufferuiv GET_ClearBufferuiv(struct _glapi_table *disp) { - return (_glptr_ClearBufferuiv) (GET_by_offset(disp, _gloffset_ClearBufferuiv)); -} - -static inline void SET_ClearBufferuiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, const GLuint *)) { - SET_by_offset(disp, _gloffset_ClearBufferuiv, fn); -} - typedef const GLubyte * (GLAPIENTRYP _glptr_GetStringi)(GLenum, GLuint); #define CALL_GetStringi(disp, parameters) \ (* GET_GetStringi(disp)) parameters @@ -6977,28 +5217,6 @@ static inline void SET_GetStringi(struct _glapi_table *disp, const GLubyte * (GL SET_by_offset(disp, _gloffset_GetStringi, fn); } -typedef void (GLAPIENTRYP _glptr_TexBuffer)(GLenum, GLenum, GLuint); -#define CALL_TexBuffer(disp, parameters) \ - (* GET_TexBuffer(disp)) parameters -static inline _glptr_TexBuffer GET_TexBuffer(struct _glapi_table *disp) { - return (_glptr_TexBuffer) (GET_by_offset(disp, _gloffset_TexBuffer)); -} - -static inline void SET_TexBuffer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_TexBuffer, fn); -} - -typedef void (GLAPIENTRYP _glptr_FramebufferTexture)(GLenum, GLenum, GLuint, GLint); -#define CALL_FramebufferTexture(disp, parameters) \ - (* GET_FramebufferTexture(disp)) parameters -static inline _glptr_FramebufferTexture GET_FramebufferTexture(struct _glapi_table *disp) { - return (_glptr_FramebufferTexture) (GET_by_offset(disp, _gloffset_FramebufferTexture)); -} - -static inline void SET_FramebufferTexture(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint, GLint)) { - SET_by_offset(disp, _gloffset_FramebufferTexture, fn); -} - typedef void (GLAPIENTRYP _glptr_GetBufferParameteri64v)(GLenum, GLenum, GLint64 *); #define CALL_GetBufferParameteri64v(disp, parameters) \ (* GET_GetBufferParameteri64v(disp)) parameters @@ -7021,17 +5239,6 @@ static inline void SET_GetInteger64i_v(struct _glapi_table *disp, void (GLAPIENT SET_by_offset(disp, _gloffset_GetInteger64i_v, fn); } -typedef void (GLAPIENTRYP _glptr_VertexAttribDivisor)(GLuint, GLuint); -#define CALL_VertexAttribDivisor(disp, parameters) \ - (* GET_VertexAttribDivisor(disp)) parameters -static inline _glptr_VertexAttribDivisor GET_VertexAttribDivisor(struct _glapi_table *disp) { - return (_glptr_VertexAttribDivisor) (GET_by_offset(disp, _gloffset_VertexAttribDivisor)); -} - -static inline void SET_VertexAttribDivisor(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_VertexAttribDivisor, fn); -} - typedef void (GLAPIENTRYP _glptr_LoadTransposeMatrixdARB)(const GLdouble *); #define CALL_LoadTransposeMatrixdARB(disp, parameters) \ (* GET_LoadTransposeMatrixdARB(disp)) parameters @@ -7087,710 +5294,6 @@ static inline void SET_SampleCoverageARB(struct _glapi_table *disp, void (GLAPIE SET_by_offset(disp, _gloffset_SampleCoverageARB, fn); } -typedef void (GLAPIENTRYP _glptr_CompressedTexImage1DARB)(GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *); -#define CALL_CompressedTexImage1DARB(disp, parameters) \ - (* GET_CompressedTexImage1DARB(disp)) parameters -static inline _glptr_CompressedTexImage1DARB GET_CompressedTexImage1DARB(struct _glapi_table *disp) { - return (_glptr_CompressedTexImage1DARB) (GET_by_offset(disp, _gloffset_CompressedTexImage1DARB)); -} - -static inline void SET_CompressedTexImage1DARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_CompressedTexImage1DARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_CompressedTexImage2DARB)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); -#define CALL_CompressedTexImage2DARB(disp, parameters) \ - (* GET_CompressedTexImage2DARB(disp)) parameters -static inline _glptr_CompressedTexImage2DARB GET_CompressedTexImage2DARB(struct _glapi_table *disp) { - return (_glptr_CompressedTexImage2DARB) (GET_by_offset(disp, _gloffset_CompressedTexImage2DARB)); -} - -static inline void SET_CompressedTexImage2DARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_CompressedTexImage2DARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_CompressedTexImage3DARB)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); -#define CALL_CompressedTexImage3DARB(disp, parameters) \ - (* GET_CompressedTexImage3DARB(disp)) parameters -static inline _glptr_CompressedTexImage3DARB GET_CompressedTexImage3DARB(struct _glapi_table *disp) { - return (_glptr_CompressedTexImage3DARB) (GET_by_offset(disp, _gloffset_CompressedTexImage3DARB)); -} - -static inline void SET_CompressedTexImage3DARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_CompressedTexImage3DARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_CompressedTexSubImage1DARB)(GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *); -#define CALL_CompressedTexSubImage1DARB(disp, parameters) \ - (* GET_CompressedTexSubImage1DARB(disp)) parameters -static inline _glptr_CompressedTexSubImage1DARB GET_CompressedTexSubImage1DARB(struct _glapi_table *disp) { - return (_glptr_CompressedTexSubImage1DARB) (GET_by_offset(disp, _gloffset_CompressedTexSubImage1DARB)); -} - -static inline void SET_CompressedTexSubImage1DARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_CompressedTexSubImage1DARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_CompressedTexSubImage2DARB)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); -#define CALL_CompressedTexSubImage2DARB(disp, parameters) \ - (* GET_CompressedTexSubImage2DARB(disp)) parameters -static inline _glptr_CompressedTexSubImage2DARB GET_CompressedTexSubImage2DARB(struct _glapi_table *disp) { - return (_glptr_CompressedTexSubImage2DARB) (GET_by_offset(disp, _gloffset_CompressedTexSubImage2DARB)); -} - -static inline void SET_CompressedTexSubImage2DARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_CompressedTexSubImage2DARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_CompressedTexSubImage3DARB)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); -#define CALL_CompressedTexSubImage3DARB(disp, parameters) \ - (* GET_CompressedTexSubImage3DARB(disp)) parameters -static inline _glptr_CompressedTexSubImage3DARB GET_CompressedTexSubImage3DARB(struct _glapi_table *disp) { - return (_glptr_CompressedTexSubImage3DARB) (GET_by_offset(disp, _gloffset_CompressedTexSubImage3DARB)); -} - -static inline void SET_CompressedTexSubImage3DARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_CompressedTexSubImage3DARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetCompressedTexImageARB)(GLenum, GLint, GLvoid *); -#define CALL_GetCompressedTexImageARB(disp, parameters) \ - (* GET_GetCompressedTexImageARB(disp)) parameters -static inline _glptr_GetCompressedTexImageARB GET_GetCompressedTexImageARB(struct _glapi_table *disp) { - return (_glptr_GetCompressedTexImageARB) (GET_by_offset(disp, _gloffset_GetCompressedTexImageARB)); -} - -static inline void SET_GetCompressedTexImageARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLvoid *)) { - SET_by_offset(disp, _gloffset_GetCompressedTexImageARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_DisableVertexAttribArrayARB)(GLuint); -#define CALL_DisableVertexAttribArrayARB(disp, parameters) \ - (* GET_DisableVertexAttribArrayARB(disp)) parameters -static inline _glptr_DisableVertexAttribArrayARB GET_DisableVertexAttribArrayARB(struct _glapi_table *disp) { - return (_glptr_DisableVertexAttribArrayARB) (GET_by_offset(disp, _gloffset_DisableVertexAttribArrayARB)); -} - -static inline void SET_DisableVertexAttribArrayARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_DisableVertexAttribArrayARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_EnableVertexAttribArrayARB)(GLuint); -#define CALL_EnableVertexAttribArrayARB(disp, parameters) \ - (* GET_EnableVertexAttribArrayARB(disp)) parameters -static inline _glptr_EnableVertexAttribArrayARB GET_EnableVertexAttribArrayARB(struct _glapi_table *disp) { - return (_glptr_EnableVertexAttribArrayARB) (GET_by_offset(disp, _gloffset_EnableVertexAttribArrayARB)); -} - -static inline void SET_EnableVertexAttribArrayARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_EnableVertexAttribArrayARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetProgramEnvParameterdvARB)(GLenum, GLuint, GLdouble *); -#define CALL_GetProgramEnvParameterdvARB(disp, parameters) \ - (* GET_GetProgramEnvParameterdvARB(disp)) parameters -static inline _glptr_GetProgramEnvParameterdvARB GET_GetProgramEnvParameterdvARB(struct _glapi_table *disp) { - return (_glptr_GetProgramEnvParameterdvARB) (GET_by_offset(disp, _gloffset_GetProgramEnvParameterdvARB)); -} - -static inline void SET_GetProgramEnvParameterdvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLdouble *)) { - SET_by_offset(disp, _gloffset_GetProgramEnvParameterdvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetProgramEnvParameterfvARB)(GLenum, GLuint, GLfloat *); -#define CALL_GetProgramEnvParameterfvARB(disp, parameters) \ - (* GET_GetProgramEnvParameterfvARB(disp)) parameters -static inline _glptr_GetProgramEnvParameterfvARB GET_GetProgramEnvParameterfvARB(struct _glapi_table *disp) { - return (_glptr_GetProgramEnvParameterfvARB) (GET_by_offset(disp, _gloffset_GetProgramEnvParameterfvARB)); -} - -static inline void SET_GetProgramEnvParameterfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetProgramEnvParameterfvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetProgramLocalParameterdvARB)(GLenum, GLuint, GLdouble *); -#define CALL_GetProgramLocalParameterdvARB(disp, parameters) \ - (* GET_GetProgramLocalParameterdvARB(disp)) parameters -static inline _glptr_GetProgramLocalParameterdvARB GET_GetProgramLocalParameterdvARB(struct _glapi_table *disp) { - return (_glptr_GetProgramLocalParameterdvARB) (GET_by_offset(disp, _gloffset_GetProgramLocalParameterdvARB)); -} - -static inline void SET_GetProgramLocalParameterdvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLdouble *)) { - SET_by_offset(disp, _gloffset_GetProgramLocalParameterdvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetProgramLocalParameterfvARB)(GLenum, GLuint, GLfloat *); -#define CALL_GetProgramLocalParameterfvARB(disp, parameters) \ - (* GET_GetProgramLocalParameterfvARB(disp)) parameters -static inline _glptr_GetProgramLocalParameterfvARB GET_GetProgramLocalParameterfvARB(struct _glapi_table *disp) { - return (_glptr_GetProgramLocalParameterfvARB) (GET_by_offset(disp, _gloffset_GetProgramLocalParameterfvARB)); -} - -static inline void SET_GetProgramLocalParameterfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetProgramLocalParameterfvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetProgramStringARB)(GLenum, GLenum, GLvoid *); -#define CALL_GetProgramStringARB(disp, parameters) \ - (* GET_GetProgramStringARB(disp)) parameters -static inline _glptr_GetProgramStringARB GET_GetProgramStringARB(struct _glapi_table *disp) { - return (_glptr_GetProgramStringARB) (GET_by_offset(disp, _gloffset_GetProgramStringARB)); -} - -static inline void SET_GetProgramStringARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLvoid *)) { - SET_by_offset(disp, _gloffset_GetProgramStringARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetProgramivARB)(GLenum, GLenum, GLint *); -#define CALL_GetProgramivARB(disp, parameters) \ - (* GET_GetProgramivARB(disp)) parameters -static inline _glptr_GetProgramivARB GET_GetProgramivARB(struct _glapi_table *disp) { - return (_glptr_GetProgramivARB) (GET_by_offset(disp, _gloffset_GetProgramivARB)); -} - -static inline void SET_GetProgramivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetProgramivARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetVertexAttribdvARB)(GLuint, GLenum, GLdouble *); -#define CALL_GetVertexAttribdvARB(disp, parameters) \ - (* GET_GetVertexAttribdvARB(disp)) parameters -static inline _glptr_GetVertexAttribdvARB GET_GetVertexAttribdvARB(struct _glapi_table *disp) { - return (_glptr_GetVertexAttribdvARB) (GET_by_offset(disp, _gloffset_GetVertexAttribdvARB)); -} - -static inline void SET_GetVertexAttribdvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLdouble *)) { - SET_by_offset(disp, _gloffset_GetVertexAttribdvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetVertexAttribfvARB)(GLuint, GLenum, GLfloat *); -#define CALL_GetVertexAttribfvARB(disp, parameters) \ - (* GET_GetVertexAttribfvARB(disp)) parameters -static inline _glptr_GetVertexAttribfvARB GET_GetVertexAttribfvARB(struct _glapi_table *disp) { - return (_glptr_GetVertexAttribfvARB) (GET_by_offset(disp, _gloffset_GetVertexAttribfvARB)); -} - -static inline void SET_GetVertexAttribfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetVertexAttribfvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetVertexAttribivARB)(GLuint, GLenum, GLint *); -#define CALL_GetVertexAttribivARB(disp, parameters) \ - (* GET_GetVertexAttribivARB(disp)) parameters -static inline _glptr_GetVertexAttribivARB GET_GetVertexAttribivARB(struct _glapi_table *disp) { - return (_glptr_GetVertexAttribivARB) (GET_by_offset(disp, _gloffset_GetVertexAttribivARB)); -} - -static inline void SET_GetVertexAttribivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetVertexAttribivARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_ProgramEnvParameter4dARB)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -#define CALL_ProgramEnvParameter4dARB(disp, parameters) \ - (* GET_ProgramEnvParameter4dARB(disp)) parameters -static inline _glptr_ProgramEnvParameter4dARB GET_ProgramEnvParameter4dARB(struct _glapi_table *disp) { - return (_glptr_ProgramEnvParameter4dARB) (GET_by_offset(disp, _gloffset_ProgramEnvParameter4dARB)); -} - -static inline void SET_ProgramEnvParameter4dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)) { - SET_by_offset(disp, _gloffset_ProgramEnvParameter4dARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_ProgramEnvParameter4dvARB)(GLenum, GLuint, const GLdouble *); -#define CALL_ProgramEnvParameter4dvARB(disp, parameters) \ - (* GET_ProgramEnvParameter4dvARB(disp)) parameters -static inline _glptr_ProgramEnvParameter4dvARB GET_ProgramEnvParameter4dvARB(struct _glapi_table *disp) { - return (_glptr_ProgramEnvParameter4dvARB) (GET_by_offset(disp, _gloffset_ProgramEnvParameter4dvARB)); -} - -static inline void SET_ProgramEnvParameter4dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, const GLdouble *)) { - SET_by_offset(disp, _gloffset_ProgramEnvParameter4dvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_ProgramEnvParameter4fARB)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -#define CALL_ProgramEnvParameter4fARB(disp, parameters) \ - (* GET_ProgramEnvParameter4fARB(disp)) parameters -static inline _glptr_ProgramEnvParameter4fARB GET_ProgramEnvParameter4fARB(struct _glapi_table *disp) { - return (_glptr_ProgramEnvParameter4fARB) (GET_by_offset(disp, _gloffset_ProgramEnvParameter4fARB)); -} - -static inline void SET_ProgramEnvParameter4fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_ProgramEnvParameter4fARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_ProgramEnvParameter4fvARB)(GLenum, GLuint, const GLfloat *); -#define CALL_ProgramEnvParameter4fvARB(disp, parameters) \ - (* GET_ProgramEnvParameter4fvARB(disp)) parameters -static inline _glptr_ProgramEnvParameter4fvARB GET_ProgramEnvParameter4fvARB(struct _glapi_table *disp) { - return (_glptr_ProgramEnvParameter4fvARB) (GET_by_offset(disp, _gloffset_ProgramEnvParameter4fvARB)); -} - -static inline void SET_ProgramEnvParameter4fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, const GLfloat *)) { - SET_by_offset(disp, _gloffset_ProgramEnvParameter4fvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_ProgramLocalParameter4dARB)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -#define CALL_ProgramLocalParameter4dARB(disp, parameters) \ - (* GET_ProgramLocalParameter4dARB(disp)) parameters -static inline _glptr_ProgramLocalParameter4dARB GET_ProgramLocalParameter4dARB(struct _glapi_table *disp) { - return (_glptr_ProgramLocalParameter4dARB) (GET_by_offset(disp, _gloffset_ProgramLocalParameter4dARB)); -} - -static inline void SET_ProgramLocalParameter4dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)) { - SET_by_offset(disp, _gloffset_ProgramLocalParameter4dARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_ProgramLocalParameter4dvARB)(GLenum, GLuint, const GLdouble *); -#define CALL_ProgramLocalParameter4dvARB(disp, parameters) \ - (* GET_ProgramLocalParameter4dvARB(disp)) parameters -static inline _glptr_ProgramLocalParameter4dvARB GET_ProgramLocalParameter4dvARB(struct _glapi_table *disp) { - return (_glptr_ProgramLocalParameter4dvARB) (GET_by_offset(disp, _gloffset_ProgramLocalParameter4dvARB)); -} - -static inline void SET_ProgramLocalParameter4dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, const GLdouble *)) { - SET_by_offset(disp, _gloffset_ProgramLocalParameter4dvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_ProgramLocalParameter4fARB)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -#define CALL_ProgramLocalParameter4fARB(disp, parameters) \ - (* GET_ProgramLocalParameter4fARB(disp)) parameters -static inline _glptr_ProgramLocalParameter4fARB GET_ProgramLocalParameter4fARB(struct _glapi_table *disp) { - return (_glptr_ProgramLocalParameter4fARB) (GET_by_offset(disp, _gloffset_ProgramLocalParameter4fARB)); -} - -static inline void SET_ProgramLocalParameter4fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_ProgramLocalParameter4fARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_ProgramLocalParameter4fvARB)(GLenum, GLuint, const GLfloat *); -#define CALL_ProgramLocalParameter4fvARB(disp, parameters) \ - (* GET_ProgramLocalParameter4fvARB(disp)) parameters -static inline _glptr_ProgramLocalParameter4fvARB GET_ProgramLocalParameter4fvARB(struct _glapi_table *disp) { - return (_glptr_ProgramLocalParameter4fvARB) (GET_by_offset(disp, _gloffset_ProgramLocalParameter4fvARB)); -} - -static inline void SET_ProgramLocalParameter4fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, const GLfloat *)) { - SET_by_offset(disp, _gloffset_ProgramLocalParameter4fvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_ProgramStringARB)(GLenum, GLenum, GLsizei, const GLvoid *); -#define CALL_ProgramStringARB(disp, parameters) \ - (* GET_ProgramStringARB(disp)) parameters -static inline _glptr_ProgramStringARB GET_ProgramStringARB(struct _glapi_table *disp) { - return (_glptr_ProgramStringARB) (GET_by_offset(disp, _gloffset_ProgramStringARB)); -} - -static inline void SET_ProgramStringARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_ProgramStringARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib1dARB)(GLuint, GLdouble); -#define CALL_VertexAttrib1dARB(disp, parameters) \ - (* GET_VertexAttrib1dARB(disp)) parameters -static inline _glptr_VertexAttrib1dARB GET_VertexAttrib1dARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib1dARB) (GET_by_offset(disp, _gloffset_VertexAttrib1dARB)); -} - -static inline void SET_VertexAttrib1dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLdouble)) { - SET_by_offset(disp, _gloffset_VertexAttrib1dARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib1dvARB)(GLuint, const GLdouble *); -#define CALL_VertexAttrib1dvARB(disp, parameters) \ - (* GET_VertexAttrib1dvARB(disp)) parameters -static inline _glptr_VertexAttrib1dvARB GET_VertexAttrib1dvARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib1dvARB) (GET_by_offset(disp, _gloffset_VertexAttrib1dvARB)); -} - -static inline void SET_VertexAttrib1dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLdouble *)) { - SET_by_offset(disp, _gloffset_VertexAttrib1dvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib1fARB)(GLuint, GLfloat); -#define CALL_VertexAttrib1fARB(disp, parameters) \ - (* GET_VertexAttrib1fARB(disp)) parameters -static inline _glptr_VertexAttrib1fARB GET_VertexAttrib1fARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib1fARB) (GET_by_offset(disp, _gloffset_VertexAttrib1fARB)); -} - -static inline void SET_VertexAttrib1fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat)) { - SET_by_offset(disp, _gloffset_VertexAttrib1fARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib1fvARB)(GLuint, const GLfloat *); -#define CALL_VertexAttrib1fvARB(disp, parameters) \ - (* GET_VertexAttrib1fvARB(disp)) parameters -static inline _glptr_VertexAttrib1fvARB GET_VertexAttrib1fvARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib1fvARB) (GET_by_offset(disp, _gloffset_VertexAttrib1fvARB)); -} - -static inline void SET_VertexAttrib1fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { - SET_by_offset(disp, _gloffset_VertexAttrib1fvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib1sARB)(GLuint, GLshort); -#define CALL_VertexAttrib1sARB(disp, parameters) \ - (* GET_VertexAttrib1sARB(disp)) parameters -static inline _glptr_VertexAttrib1sARB GET_VertexAttrib1sARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib1sARB) (GET_by_offset(disp, _gloffset_VertexAttrib1sARB)); -} - -static inline void SET_VertexAttrib1sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLshort)) { - SET_by_offset(disp, _gloffset_VertexAttrib1sARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib1svARB)(GLuint, const GLshort *); -#define CALL_VertexAttrib1svARB(disp, parameters) \ - (* GET_VertexAttrib1svARB(disp)) parameters -static inline _glptr_VertexAttrib1svARB GET_VertexAttrib1svARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib1svARB) (GET_by_offset(disp, _gloffset_VertexAttrib1svARB)); -} - -static inline void SET_VertexAttrib1svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { - SET_by_offset(disp, _gloffset_VertexAttrib1svARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib2dARB)(GLuint, GLdouble, GLdouble); -#define CALL_VertexAttrib2dARB(disp, parameters) \ - (* GET_VertexAttrib2dARB(disp)) parameters -static inline _glptr_VertexAttrib2dARB GET_VertexAttrib2dARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib2dARB) (GET_by_offset(disp, _gloffset_VertexAttrib2dARB)); -} - -static inline void SET_VertexAttrib2dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLdouble, GLdouble)) { - SET_by_offset(disp, _gloffset_VertexAttrib2dARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib2dvARB)(GLuint, const GLdouble *); -#define CALL_VertexAttrib2dvARB(disp, parameters) \ - (* GET_VertexAttrib2dvARB(disp)) parameters -static inline _glptr_VertexAttrib2dvARB GET_VertexAttrib2dvARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib2dvARB) (GET_by_offset(disp, _gloffset_VertexAttrib2dvARB)); -} - -static inline void SET_VertexAttrib2dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLdouble *)) { - SET_by_offset(disp, _gloffset_VertexAttrib2dvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib2fARB)(GLuint, GLfloat, GLfloat); -#define CALL_VertexAttrib2fARB(disp, parameters) \ - (* GET_VertexAttrib2fARB(disp)) parameters -static inline _glptr_VertexAttrib2fARB GET_VertexAttrib2fARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib2fARB) (GET_by_offset(disp, _gloffset_VertexAttrib2fARB)); -} - -static inline void SET_VertexAttrib2fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_VertexAttrib2fARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib2fvARB)(GLuint, const GLfloat *); -#define CALL_VertexAttrib2fvARB(disp, parameters) \ - (* GET_VertexAttrib2fvARB(disp)) parameters -static inline _glptr_VertexAttrib2fvARB GET_VertexAttrib2fvARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib2fvARB) (GET_by_offset(disp, _gloffset_VertexAttrib2fvARB)); -} - -static inline void SET_VertexAttrib2fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { - SET_by_offset(disp, _gloffset_VertexAttrib2fvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib2sARB)(GLuint, GLshort, GLshort); -#define CALL_VertexAttrib2sARB(disp, parameters) \ - (* GET_VertexAttrib2sARB(disp)) parameters -static inline _glptr_VertexAttrib2sARB GET_VertexAttrib2sARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib2sARB) (GET_by_offset(disp, _gloffset_VertexAttrib2sARB)); -} - -static inline void SET_VertexAttrib2sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLshort, GLshort)) { - SET_by_offset(disp, _gloffset_VertexAttrib2sARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib2svARB)(GLuint, const GLshort *); -#define CALL_VertexAttrib2svARB(disp, parameters) \ - (* GET_VertexAttrib2svARB(disp)) parameters -static inline _glptr_VertexAttrib2svARB GET_VertexAttrib2svARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib2svARB) (GET_by_offset(disp, _gloffset_VertexAttrib2svARB)); -} - -static inline void SET_VertexAttrib2svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { - SET_by_offset(disp, _gloffset_VertexAttrib2svARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib3dARB)(GLuint, GLdouble, GLdouble, GLdouble); -#define CALL_VertexAttrib3dARB(disp, parameters) \ - (* GET_VertexAttrib3dARB(disp)) parameters -static inline _glptr_VertexAttrib3dARB GET_VertexAttrib3dARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib3dARB) (GET_by_offset(disp, _gloffset_VertexAttrib3dARB)); -} - -static inline void SET_VertexAttrib3dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLdouble, GLdouble, GLdouble)) { - SET_by_offset(disp, _gloffset_VertexAttrib3dARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib3dvARB)(GLuint, const GLdouble *); -#define CALL_VertexAttrib3dvARB(disp, parameters) \ - (* GET_VertexAttrib3dvARB(disp)) parameters -static inline _glptr_VertexAttrib3dvARB GET_VertexAttrib3dvARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib3dvARB) (GET_by_offset(disp, _gloffset_VertexAttrib3dvARB)); -} - -static inline void SET_VertexAttrib3dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLdouble *)) { - SET_by_offset(disp, _gloffset_VertexAttrib3dvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib3fARB)(GLuint, GLfloat, GLfloat, GLfloat); -#define CALL_VertexAttrib3fARB(disp, parameters) \ - (* GET_VertexAttrib3fARB(disp)) parameters -static inline _glptr_VertexAttrib3fARB GET_VertexAttrib3fARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib3fARB) (GET_by_offset(disp, _gloffset_VertexAttrib3fARB)); -} - -static inline void SET_VertexAttrib3fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_VertexAttrib3fARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib3fvARB)(GLuint, const GLfloat *); -#define CALL_VertexAttrib3fvARB(disp, parameters) \ - (* GET_VertexAttrib3fvARB(disp)) parameters -static inline _glptr_VertexAttrib3fvARB GET_VertexAttrib3fvARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib3fvARB) (GET_by_offset(disp, _gloffset_VertexAttrib3fvARB)); -} - -static inline void SET_VertexAttrib3fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { - SET_by_offset(disp, _gloffset_VertexAttrib3fvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib3sARB)(GLuint, GLshort, GLshort, GLshort); -#define CALL_VertexAttrib3sARB(disp, parameters) \ - (* GET_VertexAttrib3sARB(disp)) parameters -static inline _glptr_VertexAttrib3sARB GET_VertexAttrib3sARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib3sARB) (GET_by_offset(disp, _gloffset_VertexAttrib3sARB)); -} - -static inline void SET_VertexAttrib3sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLshort, GLshort, GLshort)) { - SET_by_offset(disp, _gloffset_VertexAttrib3sARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib3svARB)(GLuint, const GLshort *); -#define CALL_VertexAttrib3svARB(disp, parameters) \ - (* GET_VertexAttrib3svARB(disp)) parameters -static inline _glptr_VertexAttrib3svARB GET_VertexAttrib3svARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib3svARB) (GET_by_offset(disp, _gloffset_VertexAttrib3svARB)); -} - -static inline void SET_VertexAttrib3svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { - SET_by_offset(disp, _gloffset_VertexAttrib3svARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib4NbvARB)(GLuint, const GLbyte *); -#define CALL_VertexAttrib4NbvARB(disp, parameters) \ - (* GET_VertexAttrib4NbvARB(disp)) parameters -static inline _glptr_VertexAttrib4NbvARB GET_VertexAttrib4NbvARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib4NbvARB) (GET_by_offset(disp, _gloffset_VertexAttrib4NbvARB)); -} - -static inline void SET_VertexAttrib4NbvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLbyte *)) { - SET_by_offset(disp, _gloffset_VertexAttrib4NbvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib4NivARB)(GLuint, const GLint *); -#define CALL_VertexAttrib4NivARB(disp, parameters) \ - (* GET_VertexAttrib4NivARB(disp)) parameters -static inline _glptr_VertexAttrib4NivARB GET_VertexAttrib4NivARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib4NivARB) (GET_by_offset(disp, _gloffset_VertexAttrib4NivARB)); -} - -static inline void SET_VertexAttrib4NivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLint *)) { - SET_by_offset(disp, _gloffset_VertexAttrib4NivARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib4NsvARB)(GLuint, const GLshort *); -#define CALL_VertexAttrib4NsvARB(disp, parameters) \ - (* GET_VertexAttrib4NsvARB(disp)) parameters -static inline _glptr_VertexAttrib4NsvARB GET_VertexAttrib4NsvARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib4NsvARB) (GET_by_offset(disp, _gloffset_VertexAttrib4NsvARB)); -} - -static inline void SET_VertexAttrib4NsvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { - SET_by_offset(disp, _gloffset_VertexAttrib4NsvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib4NubARB)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte); -#define CALL_VertexAttrib4NubARB(disp, parameters) \ - (* GET_VertexAttrib4NubARB(disp)) parameters -static inline _glptr_VertexAttrib4NubARB GET_VertexAttrib4NubARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib4NubARB) (GET_by_offset(disp, _gloffset_VertexAttrib4NubARB)); -} - -static inline void SET_VertexAttrib4NubARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)) { - SET_by_offset(disp, _gloffset_VertexAttrib4NubARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib4NubvARB)(GLuint, const GLubyte *); -#define CALL_VertexAttrib4NubvARB(disp, parameters) \ - (* GET_VertexAttrib4NubvARB(disp)) parameters -static inline _glptr_VertexAttrib4NubvARB GET_VertexAttrib4NubvARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib4NubvARB) (GET_by_offset(disp, _gloffset_VertexAttrib4NubvARB)); -} - -static inline void SET_VertexAttrib4NubvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLubyte *)) { - SET_by_offset(disp, _gloffset_VertexAttrib4NubvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib4NuivARB)(GLuint, const GLuint *); -#define CALL_VertexAttrib4NuivARB(disp, parameters) \ - (* GET_VertexAttrib4NuivARB(disp)) parameters -static inline _glptr_VertexAttrib4NuivARB GET_VertexAttrib4NuivARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib4NuivARB) (GET_by_offset(disp, _gloffset_VertexAttrib4NuivARB)); -} - -static inline void SET_VertexAttrib4NuivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLuint *)) { - SET_by_offset(disp, _gloffset_VertexAttrib4NuivARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib4NusvARB)(GLuint, const GLushort *); -#define CALL_VertexAttrib4NusvARB(disp, parameters) \ - (* GET_VertexAttrib4NusvARB(disp)) parameters -static inline _glptr_VertexAttrib4NusvARB GET_VertexAttrib4NusvARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib4NusvARB) (GET_by_offset(disp, _gloffset_VertexAttrib4NusvARB)); -} - -static inline void SET_VertexAttrib4NusvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLushort *)) { - SET_by_offset(disp, _gloffset_VertexAttrib4NusvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib4bvARB)(GLuint, const GLbyte *); -#define CALL_VertexAttrib4bvARB(disp, parameters) \ - (* GET_VertexAttrib4bvARB(disp)) parameters -static inline _glptr_VertexAttrib4bvARB GET_VertexAttrib4bvARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib4bvARB) (GET_by_offset(disp, _gloffset_VertexAttrib4bvARB)); -} - -static inline void SET_VertexAttrib4bvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLbyte *)) { - SET_by_offset(disp, _gloffset_VertexAttrib4bvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib4dARB)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble); -#define CALL_VertexAttrib4dARB(disp, parameters) \ - (* GET_VertexAttrib4dARB(disp)) parameters -static inline _glptr_VertexAttrib4dARB GET_VertexAttrib4dARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib4dARB) (GET_by_offset(disp, _gloffset_VertexAttrib4dARB)); -} - -static inline void SET_VertexAttrib4dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)) { - SET_by_offset(disp, _gloffset_VertexAttrib4dARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib4dvARB)(GLuint, const GLdouble *); -#define CALL_VertexAttrib4dvARB(disp, parameters) \ - (* GET_VertexAttrib4dvARB(disp)) parameters -static inline _glptr_VertexAttrib4dvARB GET_VertexAttrib4dvARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib4dvARB) (GET_by_offset(disp, _gloffset_VertexAttrib4dvARB)); -} - -static inline void SET_VertexAttrib4dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLdouble *)) { - SET_by_offset(disp, _gloffset_VertexAttrib4dvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib4fARB)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat); -#define CALL_VertexAttrib4fARB(disp, parameters) \ - (* GET_VertexAttrib4fARB(disp)) parameters -static inline _glptr_VertexAttrib4fARB GET_VertexAttrib4fARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib4fARB) (GET_by_offset(disp, _gloffset_VertexAttrib4fARB)); -} - -static inline void SET_VertexAttrib4fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_VertexAttrib4fARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib4fvARB)(GLuint, const GLfloat *); -#define CALL_VertexAttrib4fvARB(disp, parameters) \ - (* GET_VertexAttrib4fvARB(disp)) parameters -static inline _glptr_VertexAttrib4fvARB GET_VertexAttrib4fvARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib4fvARB) (GET_by_offset(disp, _gloffset_VertexAttrib4fvARB)); -} - -static inline void SET_VertexAttrib4fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { - SET_by_offset(disp, _gloffset_VertexAttrib4fvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib4ivARB)(GLuint, const GLint *); -#define CALL_VertexAttrib4ivARB(disp, parameters) \ - (* GET_VertexAttrib4ivARB(disp)) parameters -static inline _glptr_VertexAttrib4ivARB GET_VertexAttrib4ivARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib4ivARB) (GET_by_offset(disp, _gloffset_VertexAttrib4ivARB)); -} - -static inline void SET_VertexAttrib4ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLint *)) { - SET_by_offset(disp, _gloffset_VertexAttrib4ivARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib4sARB)(GLuint, GLshort, GLshort, GLshort, GLshort); -#define CALL_VertexAttrib4sARB(disp, parameters) \ - (* GET_VertexAttrib4sARB(disp)) parameters -static inline _glptr_VertexAttrib4sARB GET_VertexAttrib4sARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib4sARB) (GET_by_offset(disp, _gloffset_VertexAttrib4sARB)); -} - -static inline void SET_VertexAttrib4sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLshort, GLshort, GLshort, GLshort)) { - SET_by_offset(disp, _gloffset_VertexAttrib4sARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib4svARB)(GLuint, const GLshort *); -#define CALL_VertexAttrib4svARB(disp, parameters) \ - (* GET_VertexAttrib4svARB(disp)) parameters -static inline _glptr_VertexAttrib4svARB GET_VertexAttrib4svARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib4svARB) (GET_by_offset(disp, _gloffset_VertexAttrib4svARB)); -} - -static inline void SET_VertexAttrib4svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { - SET_by_offset(disp, _gloffset_VertexAttrib4svARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib4ubvARB)(GLuint, const GLubyte *); -#define CALL_VertexAttrib4ubvARB(disp, parameters) \ - (* GET_VertexAttrib4ubvARB(disp)) parameters -static inline _glptr_VertexAttrib4ubvARB GET_VertexAttrib4ubvARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib4ubvARB) (GET_by_offset(disp, _gloffset_VertexAttrib4ubvARB)); -} - -static inline void SET_VertexAttrib4ubvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLubyte *)) { - SET_by_offset(disp, _gloffset_VertexAttrib4ubvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib4uivARB)(GLuint, const GLuint *); -#define CALL_VertexAttrib4uivARB(disp, parameters) \ - (* GET_VertexAttrib4uivARB(disp)) parameters -static inline _glptr_VertexAttrib4uivARB GET_VertexAttrib4uivARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib4uivARB) (GET_by_offset(disp, _gloffset_VertexAttrib4uivARB)); -} - -static inline void SET_VertexAttrib4uivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLuint *)) { - SET_by_offset(disp, _gloffset_VertexAttrib4uivARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttrib4usvARB)(GLuint, const GLushort *); -#define CALL_VertexAttrib4usvARB(disp, parameters) \ - (* GET_VertexAttrib4usvARB(disp)) parameters -static inline _glptr_VertexAttrib4usvARB GET_VertexAttrib4usvARB(struct _glapi_table *disp) { - return (_glptr_VertexAttrib4usvARB) (GET_by_offset(disp, _gloffset_VertexAttrib4usvARB)); -} - -static inline void SET_VertexAttrib4usvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLushort *)) { - SET_by_offset(disp, _gloffset_VertexAttrib4usvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribPointerARB)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *); -#define CALL_VertexAttribPointerARB(disp, parameters) \ - (* GET_VertexAttribPointerARB(disp)) parameters -static inline _glptr_VertexAttribPointerARB GET_VertexAttribPointerARB(struct _glapi_table *disp) { - return (_glptr_VertexAttribPointerARB) (GET_by_offset(disp, _gloffset_VertexAttribPointerARB)); -} - -static inline void SET_VertexAttribPointerARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_VertexAttribPointerARB, fn); -} - typedef void (GLAPIENTRYP _glptr_BindBufferARB)(GLenum, GLuint); #define CALL_BindBufferARB(disp, parameters) \ (* GET_BindBufferARB(disp)) parameters @@ -7912,94 +5415,6 @@ static inline void SET_UnmapBufferARB(struct _glapi_table *disp, GLboolean (GLAP SET_by_offset(disp, _gloffset_UnmapBufferARB, fn); } -typedef void (GLAPIENTRYP _glptr_BeginQueryARB)(GLenum, GLuint); -#define CALL_BeginQueryARB(disp, parameters) \ - (* GET_BeginQueryARB(disp)) parameters -static inline _glptr_BeginQueryARB GET_BeginQueryARB(struct _glapi_table *disp) { - return (_glptr_BeginQueryARB) (GET_by_offset(disp, _gloffset_BeginQueryARB)); -} - -static inline void SET_BeginQueryARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_BeginQueryARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_DeleteQueriesARB)(GLsizei, const GLuint *); -#define CALL_DeleteQueriesARB(disp, parameters) \ - (* GET_DeleteQueriesARB(disp)) parameters -static inline _glptr_DeleteQueriesARB GET_DeleteQueriesARB(struct _glapi_table *disp) { - return (_glptr_DeleteQueriesARB) (GET_by_offset(disp, _gloffset_DeleteQueriesARB)); -} - -static inline void SET_DeleteQueriesARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { - SET_by_offset(disp, _gloffset_DeleteQueriesARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_EndQueryARB)(GLenum); -#define CALL_EndQueryARB(disp, parameters) \ - (* GET_EndQueryARB(disp)) parameters -static inline _glptr_EndQueryARB GET_EndQueryARB(struct _glapi_table *disp) { - return (_glptr_EndQueryARB) (GET_by_offset(disp, _gloffset_EndQueryARB)); -} - -static inline void SET_EndQueryARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_EndQueryARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GenQueriesARB)(GLsizei, GLuint *); -#define CALL_GenQueriesARB(disp, parameters) \ - (* GET_GenQueriesARB(disp)) parameters -static inline _glptr_GenQueriesARB GET_GenQueriesARB(struct _glapi_table *disp) { - return (_glptr_GenQueriesARB) (GET_by_offset(disp, _gloffset_GenQueriesARB)); -} - -static inline void SET_GenQueriesARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { - SET_by_offset(disp, _gloffset_GenQueriesARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetQueryObjectivARB)(GLuint, GLenum, GLint *); -#define CALL_GetQueryObjectivARB(disp, parameters) \ - (* GET_GetQueryObjectivARB(disp)) parameters -static inline _glptr_GetQueryObjectivARB GET_GetQueryObjectivARB(struct _glapi_table *disp) { - return (_glptr_GetQueryObjectivARB) (GET_by_offset(disp, _gloffset_GetQueryObjectivARB)); -} - -static inline void SET_GetQueryObjectivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetQueryObjectivARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetQueryObjectuivARB)(GLuint, GLenum, GLuint *); -#define CALL_GetQueryObjectuivARB(disp, parameters) \ - (* GET_GetQueryObjectuivARB(disp)) parameters -static inline _glptr_GetQueryObjectuivARB GET_GetQueryObjectuivARB(struct _glapi_table *disp) { - return (_glptr_GetQueryObjectuivARB) (GET_by_offset(disp, _gloffset_GetQueryObjectuivARB)); -} - -static inline void SET_GetQueryObjectuivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLuint *)) { - SET_by_offset(disp, _gloffset_GetQueryObjectuivARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetQueryivARB)(GLenum, GLenum, GLint *); -#define CALL_GetQueryivARB(disp, parameters) \ - (* GET_GetQueryivARB(disp)) parameters -static inline _glptr_GetQueryivARB GET_GetQueryivARB(struct _glapi_table *disp) { - return (_glptr_GetQueryivARB) (GET_by_offset(disp, _gloffset_GetQueryivARB)); -} - -static inline void SET_GetQueryivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetQueryivARB, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsQueryARB)(GLuint); -#define CALL_IsQueryARB(disp, parameters) \ - (* GET_IsQueryARB(disp)) parameters -static inline _glptr_IsQueryARB GET_IsQueryARB(struct _glapi_table *disp) { - return (_glptr_IsQueryARB) (GET_by_offset(disp, _gloffset_IsQueryARB)); -} - -static inline void SET_IsQueryARB(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_IsQueryARB, fn); -} - typedef void (GLAPIENTRYP _glptr_AttachObjectARB)(GLhandleARB, GLhandleARB); #define CALL_AttachObjectARB(disp, parameters) \ (* GET_AttachObjectARB(disp)) parameters @@ -8066,17 +5481,6 @@ static inline void SET_DetachObjectARB(struct _glapi_table *disp, void (GLAPIENT SET_by_offset(disp, _gloffset_DetachObjectARB, fn); } -typedef void (GLAPIENTRYP _glptr_GetActiveUniformARB)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); -#define CALL_GetActiveUniformARB(disp, parameters) \ - (* GET_GetActiveUniformARB(disp)) parameters -static inline _glptr_GetActiveUniformARB GET_GetActiveUniformARB(struct _glapi_table *disp) { - return (_glptr_GetActiveUniformARB) (GET_by_offset(disp, _gloffset_GetActiveUniformARB)); -} - -static inline void SET_GetActiveUniformARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)) { - SET_by_offset(disp, _gloffset_GetActiveUniformARB, fn); -} - typedef void (GLAPIENTRYP _glptr_GetAttachedObjectsARB)(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *); #define CALL_GetAttachedObjectsARB(disp, parameters) \ (* GET_GetAttachedObjectsARB(disp)) parameters @@ -8143,39 +5547,6 @@ static inline void SET_GetShaderSourceARB(struct _glapi_table *disp, void (GLAPI SET_by_offset(disp, _gloffset_GetShaderSourceARB, fn); } -typedef GLint (GLAPIENTRYP _glptr_GetUniformLocationARB)(GLhandleARB, const GLcharARB *); -#define CALL_GetUniformLocationARB(disp, parameters) \ - (* GET_GetUniformLocationARB(disp)) parameters -static inline _glptr_GetUniformLocationARB GET_GetUniformLocationARB(struct _glapi_table *disp) { - return (_glptr_GetUniformLocationARB) (GET_by_offset(disp, _gloffset_GetUniformLocationARB)); -} - -static inline void SET_GetUniformLocationARB(struct _glapi_table *disp, GLint (GLAPIENTRYP fn)(GLhandleARB, const GLcharARB *)) { - SET_by_offset(disp, _gloffset_GetUniformLocationARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetUniformfvARB)(GLhandleARB, GLint, GLfloat *); -#define CALL_GetUniformfvARB(disp, parameters) \ - (* GET_GetUniformfvARB(disp)) parameters -static inline _glptr_GetUniformfvARB GET_GetUniformfvARB(struct _glapi_table *disp) { - return (_glptr_GetUniformfvARB) (GET_by_offset(disp, _gloffset_GetUniformfvARB)); -} - -static inline void SET_GetUniformfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLint, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetUniformfvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetUniformivARB)(GLhandleARB, GLint, GLint *); -#define CALL_GetUniformivARB(disp, parameters) \ - (* GET_GetUniformivARB(disp)) parameters -static inline _glptr_GetUniformivARB GET_GetUniformivARB(struct _glapi_table *disp) { - return (_glptr_GetUniformivARB) (GET_by_offset(disp, _gloffset_GetUniformivARB)); -} - -static inline void SET_GetUniformivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLint, GLint *)) { - SET_by_offset(disp, _gloffset_GetUniformivARB, fn); -} - typedef void (GLAPIENTRYP _glptr_LinkProgramARB)(GLhandleARB); #define CALL_LinkProgramARB(disp, parameters) \ (* GET_LinkProgramARB(disp)) parameters @@ -8198,226 +5569,6 @@ static inline void SET_ShaderSourceARB(struct _glapi_table *disp, void (GLAPIENT SET_by_offset(disp, _gloffset_ShaderSourceARB, fn); } -typedef void (GLAPIENTRYP _glptr_Uniform1fARB)(GLint, GLfloat); -#define CALL_Uniform1fARB(disp, parameters) \ - (* GET_Uniform1fARB(disp)) parameters -static inline _glptr_Uniform1fARB GET_Uniform1fARB(struct _glapi_table *disp) { - return (_glptr_Uniform1fARB) (GET_by_offset(disp, _gloffset_Uniform1fARB)); -} - -static inline void SET_Uniform1fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLfloat)) { - SET_by_offset(disp, _gloffset_Uniform1fARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform1fvARB)(GLint, GLsizei, const GLfloat *); -#define CALL_Uniform1fvARB(disp, parameters) \ - (* GET_Uniform1fvARB(disp)) parameters -static inline _glptr_Uniform1fvARB GET_Uniform1fvARB(struct _glapi_table *disp) { - return (_glptr_Uniform1fvARB) (GET_by_offset(disp, _gloffset_Uniform1fvARB)); -} - -static inline void SET_Uniform1fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLfloat *)) { - SET_by_offset(disp, _gloffset_Uniform1fvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform1iARB)(GLint, GLint); -#define CALL_Uniform1iARB(disp, parameters) \ - (* GET_Uniform1iARB(disp)) parameters -static inline _glptr_Uniform1iARB GET_Uniform1iARB(struct _glapi_table *disp) { - return (_glptr_Uniform1iARB) (GET_by_offset(disp, _gloffset_Uniform1iARB)); -} - -static inline void SET_Uniform1iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint)) { - SET_by_offset(disp, _gloffset_Uniform1iARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform1ivARB)(GLint, GLsizei, const GLint *); -#define CALL_Uniform1ivARB(disp, parameters) \ - (* GET_Uniform1ivARB(disp)) parameters -static inline _glptr_Uniform1ivARB GET_Uniform1ivARB(struct _glapi_table *disp) { - return (_glptr_Uniform1ivARB) (GET_by_offset(disp, _gloffset_Uniform1ivARB)); -} - -static inline void SET_Uniform1ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLint *)) { - SET_by_offset(disp, _gloffset_Uniform1ivARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform2fARB)(GLint, GLfloat, GLfloat); -#define CALL_Uniform2fARB(disp, parameters) \ - (* GET_Uniform2fARB(disp)) parameters -static inline _glptr_Uniform2fARB GET_Uniform2fARB(struct _glapi_table *disp) { - return (_glptr_Uniform2fARB) (GET_by_offset(disp, _gloffset_Uniform2fARB)); -} - -static inline void SET_Uniform2fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_Uniform2fARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform2fvARB)(GLint, GLsizei, const GLfloat *); -#define CALL_Uniform2fvARB(disp, parameters) \ - (* GET_Uniform2fvARB(disp)) parameters -static inline _glptr_Uniform2fvARB GET_Uniform2fvARB(struct _glapi_table *disp) { - return (_glptr_Uniform2fvARB) (GET_by_offset(disp, _gloffset_Uniform2fvARB)); -} - -static inline void SET_Uniform2fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLfloat *)) { - SET_by_offset(disp, _gloffset_Uniform2fvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform2iARB)(GLint, GLint, GLint); -#define CALL_Uniform2iARB(disp, parameters) \ - (* GET_Uniform2iARB(disp)) parameters -static inline _glptr_Uniform2iARB GET_Uniform2iARB(struct _glapi_table *disp) { - return (_glptr_Uniform2iARB) (GET_by_offset(disp, _gloffset_Uniform2iARB)); -} - -static inline void SET_Uniform2iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint)) { - SET_by_offset(disp, _gloffset_Uniform2iARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform2ivARB)(GLint, GLsizei, const GLint *); -#define CALL_Uniform2ivARB(disp, parameters) \ - (* GET_Uniform2ivARB(disp)) parameters -static inline _glptr_Uniform2ivARB GET_Uniform2ivARB(struct _glapi_table *disp) { - return (_glptr_Uniform2ivARB) (GET_by_offset(disp, _gloffset_Uniform2ivARB)); -} - -static inline void SET_Uniform2ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLint *)) { - SET_by_offset(disp, _gloffset_Uniform2ivARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform3fARB)(GLint, GLfloat, GLfloat, GLfloat); -#define CALL_Uniform3fARB(disp, parameters) \ - (* GET_Uniform3fARB(disp)) parameters -static inline _glptr_Uniform3fARB GET_Uniform3fARB(struct _glapi_table *disp) { - return (_glptr_Uniform3fARB) (GET_by_offset(disp, _gloffset_Uniform3fARB)); -} - -static inline void SET_Uniform3fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_Uniform3fARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform3fvARB)(GLint, GLsizei, const GLfloat *); -#define CALL_Uniform3fvARB(disp, parameters) \ - (* GET_Uniform3fvARB(disp)) parameters -static inline _glptr_Uniform3fvARB GET_Uniform3fvARB(struct _glapi_table *disp) { - return (_glptr_Uniform3fvARB) (GET_by_offset(disp, _gloffset_Uniform3fvARB)); -} - -static inline void SET_Uniform3fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLfloat *)) { - SET_by_offset(disp, _gloffset_Uniform3fvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform3iARB)(GLint, GLint, GLint, GLint); -#define CALL_Uniform3iARB(disp, parameters) \ - (* GET_Uniform3iARB(disp)) parameters -static inline _glptr_Uniform3iARB GET_Uniform3iARB(struct _glapi_table *disp) { - return (_glptr_Uniform3iARB) (GET_by_offset(disp, _gloffset_Uniform3iARB)); -} - -static inline void SET_Uniform3iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint)) { - SET_by_offset(disp, _gloffset_Uniform3iARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform3ivARB)(GLint, GLsizei, const GLint *); -#define CALL_Uniform3ivARB(disp, parameters) \ - (* GET_Uniform3ivARB(disp)) parameters -static inline _glptr_Uniform3ivARB GET_Uniform3ivARB(struct _glapi_table *disp) { - return (_glptr_Uniform3ivARB) (GET_by_offset(disp, _gloffset_Uniform3ivARB)); -} - -static inline void SET_Uniform3ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLint *)) { - SET_by_offset(disp, _gloffset_Uniform3ivARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform4fARB)(GLint, GLfloat, GLfloat, GLfloat, GLfloat); -#define CALL_Uniform4fARB(disp, parameters) \ - (* GET_Uniform4fARB(disp)) parameters -static inline _glptr_Uniform4fARB GET_Uniform4fARB(struct _glapi_table *disp) { - return (_glptr_Uniform4fARB) (GET_by_offset(disp, _gloffset_Uniform4fARB)); -} - -static inline void SET_Uniform4fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLfloat, GLfloat, GLfloat, GLfloat)) { - SET_by_offset(disp, _gloffset_Uniform4fARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform4fvARB)(GLint, GLsizei, const GLfloat *); -#define CALL_Uniform4fvARB(disp, parameters) \ - (* GET_Uniform4fvARB(disp)) parameters -static inline _glptr_Uniform4fvARB GET_Uniform4fvARB(struct _glapi_table *disp) { - return (_glptr_Uniform4fvARB) (GET_by_offset(disp, _gloffset_Uniform4fvARB)); -} - -static inline void SET_Uniform4fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLfloat *)) { - SET_by_offset(disp, _gloffset_Uniform4fvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform4iARB)(GLint, GLint, GLint, GLint, GLint); -#define CALL_Uniform4iARB(disp, parameters) \ - (* GET_Uniform4iARB(disp)) parameters -static inline _glptr_Uniform4iARB GET_Uniform4iARB(struct _glapi_table *disp) { - return (_glptr_Uniform4iARB) (GET_by_offset(disp, _gloffset_Uniform4iARB)); -} - -static inline void SET_Uniform4iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint, GLint)) { - SET_by_offset(disp, _gloffset_Uniform4iARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform4ivARB)(GLint, GLsizei, const GLint *); -#define CALL_Uniform4ivARB(disp, parameters) \ - (* GET_Uniform4ivARB(disp)) parameters -static inline _glptr_Uniform4ivARB GET_Uniform4ivARB(struct _glapi_table *disp) { - return (_glptr_Uniform4ivARB) (GET_by_offset(disp, _gloffset_Uniform4ivARB)); -} - -static inline void SET_Uniform4ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLint *)) { - SET_by_offset(disp, _gloffset_Uniform4ivARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_UniformMatrix2fvARB)(GLint, GLsizei, GLboolean, const GLfloat *); -#define CALL_UniformMatrix2fvARB(disp, parameters) \ - (* GET_UniformMatrix2fvARB(disp)) parameters -static inline _glptr_UniformMatrix2fvARB GET_UniformMatrix2fvARB(struct _glapi_table *disp) { - return (_glptr_UniformMatrix2fvARB) (GET_by_offset(disp, _gloffset_UniformMatrix2fvARB)); -} - -static inline void SET_UniformMatrix2fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { - SET_by_offset(disp, _gloffset_UniformMatrix2fvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_UniformMatrix3fvARB)(GLint, GLsizei, GLboolean, const GLfloat *); -#define CALL_UniformMatrix3fvARB(disp, parameters) \ - (* GET_UniformMatrix3fvARB(disp)) parameters -static inline _glptr_UniformMatrix3fvARB GET_UniformMatrix3fvARB(struct _glapi_table *disp) { - return (_glptr_UniformMatrix3fvARB) (GET_by_offset(disp, _gloffset_UniformMatrix3fvARB)); -} - -static inline void SET_UniformMatrix3fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { - SET_by_offset(disp, _gloffset_UniformMatrix3fvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_UniformMatrix4fvARB)(GLint, GLsizei, GLboolean, const GLfloat *); -#define CALL_UniformMatrix4fvARB(disp, parameters) \ - (* GET_UniformMatrix4fvARB(disp)) parameters -static inline _glptr_UniformMatrix4fvARB GET_UniformMatrix4fvARB(struct _glapi_table *disp) { - return (_glptr_UniformMatrix4fvARB) (GET_by_offset(disp, _gloffset_UniformMatrix4fvARB)); -} - -static inline void SET_UniformMatrix4fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { - SET_by_offset(disp, _gloffset_UniformMatrix4fvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_UseProgramObjectARB)(GLhandleARB); -#define CALL_UseProgramObjectARB(disp, parameters) \ - (* GET_UseProgramObjectARB(disp)) parameters -static inline _glptr_UseProgramObjectARB GET_UseProgramObjectARB(struct _glapi_table *disp) { - return (_glptr_UseProgramObjectARB) (GET_by_offset(disp, _gloffset_UseProgramObjectARB)); -} - -static inline void SET_UseProgramObjectARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB)) { - SET_by_offset(disp, _gloffset_UseProgramObjectARB, fn); -} - typedef void (GLAPIENTRYP _glptr_ValidateProgramARB)(GLhandleARB); #define CALL_ValidateProgramARB(disp, parameters) \ (* GET_ValidateProgramARB(disp)) parameters @@ -8429,17 +5580,6 @@ static inline void SET_ValidateProgramARB(struct _glapi_table *disp, void (GLAPI SET_by_offset(disp, _gloffset_ValidateProgramARB, fn); } -typedef void (GLAPIENTRYP _glptr_BindAttribLocationARB)(GLhandleARB, GLuint, const GLcharARB *); -#define CALL_BindAttribLocationARB(disp, parameters) \ - (* GET_BindAttribLocationARB(disp)) parameters -static inline _glptr_BindAttribLocationARB GET_BindAttribLocationARB(struct _glapi_table *disp) { - return (_glptr_BindAttribLocationARB) (GET_by_offset(disp, _gloffset_BindAttribLocationARB)); -} - -static inline void SET_BindAttribLocationARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLuint, const GLcharARB *)) { - SET_by_offset(disp, _gloffset_BindAttribLocationARB, fn); -} - typedef void (GLAPIENTRYP _glptr_GetActiveAttribARB)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); #define CALL_GetActiveAttribARB(disp, parameters) \ (* GET_GetActiveAttribARB(disp)) parameters @@ -8451,116 +5591,6 @@ static inline void SET_GetActiveAttribARB(struct _glapi_table *disp, void (GLAPI SET_by_offset(disp, _gloffset_GetActiveAttribARB, fn); } -typedef GLint (GLAPIENTRYP _glptr_GetAttribLocationARB)(GLhandleARB, const GLcharARB *); -#define CALL_GetAttribLocationARB(disp, parameters) \ - (* GET_GetAttribLocationARB(disp)) parameters -static inline _glptr_GetAttribLocationARB GET_GetAttribLocationARB(struct _glapi_table *disp) { - return (_glptr_GetAttribLocationARB) (GET_by_offset(disp, _gloffset_GetAttribLocationARB)); -} - -static inline void SET_GetAttribLocationARB(struct _glapi_table *disp, GLint (GLAPIENTRYP fn)(GLhandleARB, const GLcharARB *)) { - SET_by_offset(disp, _gloffset_GetAttribLocationARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawBuffersARB)(GLsizei, const GLenum *); -#define CALL_DrawBuffersARB(disp, parameters) \ - (* GET_DrawBuffersARB(disp)) parameters -static inline _glptr_DrawBuffersARB GET_DrawBuffersARB(struct _glapi_table *disp) { - return (_glptr_DrawBuffersARB) (GET_by_offset(disp, _gloffset_DrawBuffersARB)); -} - -static inline void SET_DrawBuffersARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLenum *)) { - SET_by_offset(disp, _gloffset_DrawBuffersARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_ClampColorARB)(GLenum, GLenum); -#define CALL_ClampColorARB(disp, parameters) \ - (* GET_ClampColorARB(disp)) parameters -static inline _glptr_ClampColorARB GET_ClampColorARB(struct _glapi_table *disp) { - return (_glptr_ClampColorARB) (GET_by_offset(disp, _gloffset_ClampColorARB)); -} - -static inline void SET_ClampColorARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { - SET_by_offset(disp, _gloffset_ClampColorARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawArraysInstancedARB)(GLenum, GLint, GLsizei, GLsizei); -#define CALL_DrawArraysInstancedARB(disp, parameters) \ - (* GET_DrawArraysInstancedARB(disp)) parameters -static inline _glptr_DrawArraysInstancedARB GET_DrawArraysInstancedARB(struct _glapi_table *disp) { - return (_glptr_DrawArraysInstancedARB) (GET_by_offset(disp, _gloffset_DrawArraysInstancedARB)); -} - -static inline void SET_DrawArraysInstancedARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLsizei, GLsizei)) { - SET_by_offset(disp, _gloffset_DrawArraysInstancedARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawElementsInstancedARB)(GLenum, GLsizei, GLenum, const GLvoid *, GLsizei); -#define CALL_DrawElementsInstancedARB(disp, parameters) \ - (* GET_DrawElementsInstancedARB(disp)) parameters -static inline _glptr_DrawElementsInstancedARB GET_DrawElementsInstancedARB(struct _glapi_table *disp) { - return (_glptr_DrawElementsInstancedARB) (GET_by_offset(disp, _gloffset_DrawElementsInstancedARB)); -} - -static inline void SET_DrawElementsInstancedARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLenum, const GLvoid *, GLsizei)) { - SET_by_offset(disp, _gloffset_DrawElementsInstancedARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_RenderbufferStorageMultisample)(GLenum, GLsizei, GLenum, GLsizei, GLsizei); -#define CALL_RenderbufferStorageMultisample(disp, parameters) \ - (* GET_RenderbufferStorageMultisample(disp)) parameters -static inline _glptr_RenderbufferStorageMultisample GET_RenderbufferStorageMultisample(struct _glapi_table *disp) { - return (_glptr_RenderbufferStorageMultisample) (GET_by_offset(disp, _gloffset_RenderbufferStorageMultisample)); -} - -static inline void SET_RenderbufferStorageMultisample(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLenum, GLsizei, GLsizei)) { - SET_by_offset(disp, _gloffset_RenderbufferStorageMultisample, fn); -} - -typedef void (GLAPIENTRYP _glptr_FramebufferTextureARB)(GLenum, GLenum, GLuint, GLint); -#define CALL_FramebufferTextureARB(disp, parameters) \ - (* GET_FramebufferTextureARB(disp)) parameters -static inline _glptr_FramebufferTextureARB GET_FramebufferTextureARB(struct _glapi_table *disp) { - return (_glptr_FramebufferTextureARB) (GET_by_offset(disp, _gloffset_FramebufferTextureARB)); -} - -static inline void SET_FramebufferTextureARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint, GLint)) { - SET_by_offset(disp, _gloffset_FramebufferTextureARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_FramebufferTextureFaceARB)(GLenum, GLenum, GLuint, GLint, GLenum); -#define CALL_FramebufferTextureFaceARB(disp, parameters) \ - (* GET_FramebufferTextureFaceARB(disp)) parameters -static inline _glptr_FramebufferTextureFaceARB GET_FramebufferTextureFaceARB(struct _glapi_table *disp) { - return (_glptr_FramebufferTextureFaceARB) (GET_by_offset(disp, _gloffset_FramebufferTextureFaceARB)); -} - -static inline void SET_FramebufferTextureFaceARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint, GLint, GLenum)) { - SET_by_offset(disp, _gloffset_FramebufferTextureFaceARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_ProgramParameteriARB)(GLuint, GLenum, GLint); -#define CALL_ProgramParameteriARB(disp, parameters) \ - (* GET_ProgramParameteriARB(disp)) parameters -static inline _glptr_ProgramParameteriARB GET_ProgramParameteriARB(struct _glapi_table *disp) { - return (_glptr_ProgramParameteriARB) (GET_by_offset(disp, _gloffset_ProgramParameteriARB)); -} - -static inline void SET_ProgramParameteriARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint)) { - SET_by_offset(disp, _gloffset_ProgramParameteriARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribDivisorARB)(GLuint, GLuint); -#define CALL_VertexAttribDivisorARB(disp, parameters) \ - (* GET_VertexAttribDivisorARB(disp)) parameters -static inline _glptr_VertexAttribDivisorARB GET_VertexAttribDivisorARB(struct _glapi_table *disp) { - return (_glptr_VertexAttribDivisorARB) (GET_by_offset(disp, _gloffset_VertexAttribDivisorARB)); -} - -static inline void SET_VertexAttribDivisorARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_VertexAttribDivisorARB, fn); -} - typedef void (GLAPIENTRYP _glptr_FlushMappedBufferRange)(GLenum, GLintptr, GLsizeiptr); #define CALL_FlushMappedBufferRange(disp, parameters) \ (* GET_FlushMappedBufferRange(disp)) parameters @@ -8583,17 +5613,6 @@ static inline void SET_MapBufferRange(struct _glapi_table *disp, GLvoid * (GLAPI SET_by_offset(disp, _gloffset_MapBufferRange, fn); } -typedef void (GLAPIENTRYP _glptr_TexBufferARB)(GLenum, GLenum, GLuint); -#define CALL_TexBufferARB(disp, parameters) \ - (* GET_TexBufferARB(disp)) parameters -static inline _glptr_TexBufferARB GET_TexBufferARB(struct _glapi_table *disp) { - return (_glptr_TexBufferARB) (GET_by_offset(disp, _gloffset_TexBufferARB)); -} - -static inline void SET_TexBufferARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_TexBufferARB, fn); -} - typedef void (GLAPIENTRYP _glptr_BindVertexArray)(GLuint); #define CALL_BindVertexArray(disp, parameters) \ (* GET_BindVertexArray(disp)) parameters @@ -8616,1106 +5635,6 @@ static inline void SET_GenVertexArrays(struct _glapi_table *disp, void (GLAPIENT SET_by_offset(disp, _gloffset_GenVertexArrays, fn); } -typedef void (GLAPIENTRYP _glptr_CopyBufferSubData)(GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr); -#define CALL_CopyBufferSubData(disp, parameters) \ - (* GET_CopyBufferSubData(disp)) parameters -static inline _glptr_CopyBufferSubData GET_CopyBufferSubData(struct _glapi_table *disp) { - return (_glptr_CopyBufferSubData) (GET_by_offset(disp, _gloffset_CopyBufferSubData)); -} - -static inline void SET_CopyBufferSubData(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr)) { - SET_by_offset(disp, _gloffset_CopyBufferSubData, fn); -} - -typedef GLenum (GLAPIENTRYP _glptr_ClientWaitSync)(GLsync, GLbitfield, GLuint64); -#define CALL_ClientWaitSync(disp, parameters) \ - (* GET_ClientWaitSync(disp)) parameters -static inline _glptr_ClientWaitSync GET_ClientWaitSync(struct _glapi_table *disp) { - return (_glptr_ClientWaitSync) (GET_by_offset(disp, _gloffset_ClientWaitSync)); -} - -static inline void SET_ClientWaitSync(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(GLsync, GLbitfield, GLuint64)) { - SET_by_offset(disp, _gloffset_ClientWaitSync, fn); -} - -typedef void (GLAPIENTRYP _glptr_DeleteSync)(GLsync); -#define CALL_DeleteSync(disp, parameters) \ - (* GET_DeleteSync(disp)) parameters -static inline _glptr_DeleteSync GET_DeleteSync(struct _glapi_table *disp) { - return (_glptr_DeleteSync) (GET_by_offset(disp, _gloffset_DeleteSync)); -} - -static inline void SET_DeleteSync(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsync)) { - SET_by_offset(disp, _gloffset_DeleteSync, fn); -} - -typedef GLsync (GLAPIENTRYP _glptr_FenceSync)(GLenum, GLbitfield); -#define CALL_FenceSync(disp, parameters) \ - (* GET_FenceSync(disp)) parameters -static inline _glptr_FenceSync GET_FenceSync(struct _glapi_table *disp) { - return (_glptr_FenceSync) (GET_by_offset(disp, _gloffset_FenceSync)); -} - -static inline void SET_FenceSync(struct _glapi_table *disp, GLsync (GLAPIENTRYP fn)(GLenum, GLbitfield)) { - SET_by_offset(disp, _gloffset_FenceSync, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetInteger64v)(GLenum, GLint64 *); -#define CALL_GetInteger64v(disp, parameters) \ - (* GET_GetInteger64v(disp)) parameters -static inline _glptr_GetInteger64v GET_GetInteger64v(struct _glapi_table *disp) { - return (_glptr_GetInteger64v) (GET_by_offset(disp, _gloffset_GetInteger64v)); -} - -static inline void SET_GetInteger64v(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint64 *)) { - SET_by_offset(disp, _gloffset_GetInteger64v, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetSynciv)(GLsync, GLenum, GLsizei, GLsizei *, GLint *); -#define CALL_GetSynciv(disp, parameters) \ - (* GET_GetSynciv(disp)) parameters -static inline _glptr_GetSynciv GET_GetSynciv(struct _glapi_table *disp) { - return (_glptr_GetSynciv) (GET_by_offset(disp, _gloffset_GetSynciv)); -} - -static inline void SET_GetSynciv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsync, GLenum, GLsizei, GLsizei *, GLint *)) { - SET_by_offset(disp, _gloffset_GetSynciv, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsSync)(GLsync); -#define CALL_IsSync(disp, parameters) \ - (* GET_IsSync(disp)) parameters -static inline _glptr_IsSync GET_IsSync(struct _glapi_table *disp) { - return (_glptr_IsSync) (GET_by_offset(disp, _gloffset_IsSync)); -} - -static inline void SET_IsSync(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLsync)) { - SET_by_offset(disp, _gloffset_IsSync, fn); -} - -typedef void (GLAPIENTRYP _glptr_WaitSync)(GLsync, GLbitfield, GLuint64); -#define CALL_WaitSync(disp, parameters) \ - (* GET_WaitSync(disp)) parameters -static inline _glptr_WaitSync GET_WaitSync(struct _glapi_table *disp) { - return (_glptr_WaitSync) (GET_by_offset(disp, _gloffset_WaitSync)); -} - -static inline void SET_WaitSync(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsync, GLbitfield, GLuint64)) { - SET_by_offset(disp, _gloffset_WaitSync, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawElementsBaseVertex)(GLenum, GLsizei, GLenum, const GLvoid *, GLint); -#define CALL_DrawElementsBaseVertex(disp, parameters) \ - (* GET_DrawElementsBaseVertex(disp)) parameters -static inline _glptr_DrawElementsBaseVertex GET_DrawElementsBaseVertex(struct _glapi_table *disp) { - return (_glptr_DrawElementsBaseVertex) (GET_by_offset(disp, _gloffset_DrawElementsBaseVertex)); -} - -static inline void SET_DrawElementsBaseVertex(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLenum, const GLvoid *, GLint)) { - SET_by_offset(disp, _gloffset_DrawElementsBaseVertex, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawElementsInstancedBaseVertex)(GLenum, GLsizei, GLenum, const GLvoid *, GLsizei, GLint); -#define CALL_DrawElementsInstancedBaseVertex(disp, parameters) \ - (* GET_DrawElementsInstancedBaseVertex(disp)) parameters -static inline _glptr_DrawElementsInstancedBaseVertex GET_DrawElementsInstancedBaseVertex(struct _glapi_table *disp) { - return (_glptr_DrawElementsInstancedBaseVertex) (GET_by_offset(disp, _gloffset_DrawElementsInstancedBaseVertex)); -} - -static inline void SET_DrawElementsInstancedBaseVertex(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLenum, const GLvoid *, GLsizei, GLint)) { - SET_by_offset(disp, _gloffset_DrawElementsInstancedBaseVertex, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawRangeElementsBaseVertex)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *, GLint); -#define CALL_DrawRangeElementsBaseVertex(disp, parameters) \ - (* GET_DrawRangeElementsBaseVertex(disp)) parameters -static inline _glptr_DrawRangeElementsBaseVertex GET_DrawRangeElementsBaseVertex(struct _glapi_table *disp) { - return (_glptr_DrawRangeElementsBaseVertex) (GET_by_offset(disp, _gloffset_DrawRangeElementsBaseVertex)); -} - -static inline void SET_DrawRangeElementsBaseVertex(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *, GLint)) { - SET_by_offset(disp, _gloffset_DrawRangeElementsBaseVertex, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiDrawElementsBaseVertex)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei, const GLint *); -#define CALL_MultiDrawElementsBaseVertex(disp, parameters) \ - (* GET_MultiDrawElementsBaseVertex(disp)) parameters -static inline _glptr_MultiDrawElementsBaseVertex GET_MultiDrawElementsBaseVertex(struct _glapi_table *disp) { - return (_glptr_MultiDrawElementsBaseVertex) (GET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex)); -} - -static inline void SET_MultiDrawElementsBaseVertex(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei, const GLint *)) { - SET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex, fn); -} - -typedef void (GLAPIENTRYP _glptr_BlendEquationSeparateiARB)(GLuint, GLenum, GLenum); -#define CALL_BlendEquationSeparateiARB(disp, parameters) \ - (* GET_BlendEquationSeparateiARB(disp)) parameters -static inline _glptr_BlendEquationSeparateiARB GET_BlendEquationSeparateiARB(struct _glapi_table *disp) { - return (_glptr_BlendEquationSeparateiARB) (GET_by_offset(disp, _gloffset_BlendEquationSeparateiARB)); -} - -static inline void SET_BlendEquationSeparateiARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLenum)) { - SET_by_offset(disp, _gloffset_BlendEquationSeparateiARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_BlendEquationiARB)(GLuint, GLenum); -#define CALL_BlendEquationiARB(disp, parameters) \ - (* GET_BlendEquationiARB(disp)) parameters -static inline _glptr_BlendEquationiARB GET_BlendEquationiARB(struct _glapi_table *disp) { - return (_glptr_BlendEquationiARB) (GET_by_offset(disp, _gloffset_BlendEquationiARB)); -} - -static inline void SET_BlendEquationiARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum)) { - SET_by_offset(disp, _gloffset_BlendEquationiARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_BlendFuncSeparateiARB)(GLuint, GLenum, GLenum, GLenum, GLenum); -#define CALL_BlendFuncSeparateiARB(disp, parameters) \ - (* GET_BlendFuncSeparateiARB(disp)) parameters -static inline _glptr_BlendFuncSeparateiARB GET_BlendFuncSeparateiARB(struct _glapi_table *disp) { - return (_glptr_BlendFuncSeparateiARB) (GET_by_offset(disp, _gloffset_BlendFuncSeparateiARB)); -} - -static inline void SET_BlendFuncSeparateiARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLenum, GLenum, GLenum)) { - SET_by_offset(disp, _gloffset_BlendFuncSeparateiARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_BlendFunciARB)(GLuint, GLenum, GLenum); -#define CALL_BlendFunciARB(disp, parameters) \ - (* GET_BlendFunciARB(disp)) parameters -static inline _glptr_BlendFunciARB GET_BlendFunciARB(struct _glapi_table *disp) { - return (_glptr_BlendFunciARB) (GET_by_offset(disp, _gloffset_BlendFunciARB)); -} - -static inline void SET_BlendFunciARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLenum)) { - SET_by_offset(disp, _gloffset_BlendFunciARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_BindSampler)(GLuint, GLuint); -#define CALL_BindSampler(disp, parameters) \ - (* GET_BindSampler(disp)) parameters -static inline _glptr_BindSampler GET_BindSampler(struct _glapi_table *disp) { - return (_glptr_BindSampler) (GET_by_offset(disp, _gloffset_BindSampler)); -} - -static inline void SET_BindSampler(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_BindSampler, fn); -} - -typedef void (GLAPIENTRYP _glptr_DeleteSamplers)(GLsizei, const GLuint *); -#define CALL_DeleteSamplers(disp, parameters) \ - (* GET_DeleteSamplers(disp)) parameters -static inline _glptr_DeleteSamplers GET_DeleteSamplers(struct _glapi_table *disp) { - return (_glptr_DeleteSamplers) (GET_by_offset(disp, _gloffset_DeleteSamplers)); -} - -static inline void SET_DeleteSamplers(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { - SET_by_offset(disp, _gloffset_DeleteSamplers, fn); -} - -typedef void (GLAPIENTRYP _glptr_GenSamplers)(GLsizei, GLuint *); -#define CALL_GenSamplers(disp, parameters) \ - (* GET_GenSamplers(disp)) parameters -static inline _glptr_GenSamplers GET_GenSamplers(struct _glapi_table *disp) { - return (_glptr_GenSamplers) (GET_by_offset(disp, _gloffset_GenSamplers)); -} - -static inline void SET_GenSamplers(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { - SET_by_offset(disp, _gloffset_GenSamplers, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetSamplerParameterIiv)(GLuint, GLenum, GLint *); -#define CALL_GetSamplerParameterIiv(disp, parameters) \ - (* GET_GetSamplerParameterIiv(disp)) parameters -static inline _glptr_GetSamplerParameterIiv GET_GetSamplerParameterIiv(struct _glapi_table *disp) { - return (_glptr_GetSamplerParameterIiv) (GET_by_offset(disp, _gloffset_GetSamplerParameterIiv)); -} - -static inline void SET_GetSamplerParameterIiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetSamplerParameterIiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetSamplerParameterIuiv)(GLuint, GLenum, GLuint *); -#define CALL_GetSamplerParameterIuiv(disp, parameters) \ - (* GET_GetSamplerParameterIuiv(disp)) parameters -static inline _glptr_GetSamplerParameterIuiv GET_GetSamplerParameterIuiv(struct _glapi_table *disp) { - return (_glptr_GetSamplerParameterIuiv) (GET_by_offset(disp, _gloffset_GetSamplerParameterIuiv)); -} - -static inline void SET_GetSamplerParameterIuiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLuint *)) { - SET_by_offset(disp, _gloffset_GetSamplerParameterIuiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetSamplerParameterfv)(GLuint, GLenum, GLfloat *); -#define CALL_GetSamplerParameterfv(disp, parameters) \ - (* GET_GetSamplerParameterfv(disp)) parameters -static inline _glptr_GetSamplerParameterfv GET_GetSamplerParameterfv(struct _glapi_table *disp) { - return (_glptr_GetSamplerParameterfv) (GET_by_offset(disp, _gloffset_GetSamplerParameterfv)); -} - -static inline void SET_GetSamplerParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetSamplerParameterfv, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetSamplerParameteriv)(GLuint, GLenum, GLint *); -#define CALL_GetSamplerParameteriv(disp, parameters) \ - (* GET_GetSamplerParameteriv(disp)) parameters -static inline _glptr_GetSamplerParameteriv GET_GetSamplerParameteriv(struct _glapi_table *disp) { - return (_glptr_GetSamplerParameteriv) (GET_by_offset(disp, _gloffset_GetSamplerParameteriv)); -} - -static inline void SET_GetSamplerParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetSamplerParameteriv, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsSampler)(GLuint); -#define CALL_IsSampler(disp, parameters) \ - (* GET_IsSampler(disp)) parameters -static inline _glptr_IsSampler GET_IsSampler(struct _glapi_table *disp) { - return (_glptr_IsSampler) (GET_by_offset(disp, _gloffset_IsSampler)); -} - -static inline void SET_IsSampler(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_IsSampler, fn); -} - -typedef void (GLAPIENTRYP _glptr_SamplerParameterIiv)(GLuint, GLenum, const GLint *); -#define CALL_SamplerParameterIiv(disp, parameters) \ - (* GET_SamplerParameterIiv(disp)) parameters -static inline _glptr_SamplerParameterIiv GET_SamplerParameterIiv(struct _glapi_table *disp) { - return (_glptr_SamplerParameterIiv) (GET_by_offset(disp, _gloffset_SamplerParameterIiv)); -} - -static inline void SET_SamplerParameterIiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, const GLint *)) { - SET_by_offset(disp, _gloffset_SamplerParameterIiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_SamplerParameterIuiv)(GLuint, GLenum, const GLuint *); -#define CALL_SamplerParameterIuiv(disp, parameters) \ - (* GET_SamplerParameterIuiv(disp)) parameters -static inline _glptr_SamplerParameterIuiv GET_SamplerParameterIuiv(struct _glapi_table *disp) { - return (_glptr_SamplerParameterIuiv) (GET_by_offset(disp, _gloffset_SamplerParameterIuiv)); -} - -static inline void SET_SamplerParameterIuiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, const GLuint *)) { - SET_by_offset(disp, _gloffset_SamplerParameterIuiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_SamplerParameterf)(GLuint, GLenum, GLfloat); -#define CALL_SamplerParameterf(disp, parameters) \ - (* GET_SamplerParameterf(disp)) parameters -static inline _glptr_SamplerParameterf GET_SamplerParameterf(struct _glapi_table *disp) { - return (_glptr_SamplerParameterf) (GET_by_offset(disp, _gloffset_SamplerParameterf)); -} - -static inline void SET_SamplerParameterf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLfloat)) { - SET_by_offset(disp, _gloffset_SamplerParameterf, fn); -} - -typedef void (GLAPIENTRYP _glptr_SamplerParameterfv)(GLuint, GLenum, const GLfloat *); -#define CALL_SamplerParameterfv(disp, parameters) \ - (* GET_SamplerParameterfv(disp)) parameters -static inline _glptr_SamplerParameterfv GET_SamplerParameterfv(struct _glapi_table *disp) { - return (_glptr_SamplerParameterfv) (GET_by_offset(disp, _gloffset_SamplerParameterfv)); -} - -static inline void SET_SamplerParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, const GLfloat *)) { - SET_by_offset(disp, _gloffset_SamplerParameterfv, fn); -} - -typedef void (GLAPIENTRYP _glptr_SamplerParameteri)(GLuint, GLenum, GLint); -#define CALL_SamplerParameteri(disp, parameters) \ - (* GET_SamplerParameteri(disp)) parameters -static inline _glptr_SamplerParameteri GET_SamplerParameteri(struct _glapi_table *disp) { - return (_glptr_SamplerParameteri) (GET_by_offset(disp, _gloffset_SamplerParameteri)); -} - -static inline void SET_SamplerParameteri(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint)) { - SET_by_offset(disp, _gloffset_SamplerParameteri, fn); -} - -typedef void (GLAPIENTRYP _glptr_SamplerParameteriv)(GLuint, GLenum, const GLint *); -#define CALL_SamplerParameteriv(disp, parameters) \ - (* GET_SamplerParameteriv(disp)) parameters -static inline _glptr_SamplerParameteriv GET_SamplerParameteriv(struct _glapi_table *disp) { - return (_glptr_SamplerParameteriv) (GET_by_offset(disp, _gloffset_SamplerParameteriv)); -} - -static inline void SET_SamplerParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, const GLint *)) { - SET_by_offset(disp, _gloffset_SamplerParameteriv, fn); -} - -typedef void (GLAPIENTRYP _glptr_ColorP3ui)(GLenum, GLuint); -#define CALL_ColorP3ui(disp, parameters) \ - (* GET_ColorP3ui(disp)) parameters -static inline _glptr_ColorP3ui GET_ColorP3ui(struct _glapi_table *disp) { - return (_glptr_ColorP3ui) (GET_by_offset(disp, _gloffset_ColorP3ui)); -} - -static inline void SET_ColorP3ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_ColorP3ui, fn); -} - -typedef void (GLAPIENTRYP _glptr_ColorP3uiv)(GLenum, const GLuint *); -#define CALL_ColorP3uiv(disp, parameters) \ - (* GET_ColorP3uiv(disp)) parameters -static inline _glptr_ColorP3uiv GET_ColorP3uiv(struct _glapi_table *disp) { - return (_glptr_ColorP3uiv) (GET_by_offset(disp, _gloffset_ColorP3uiv)); -} - -static inline void SET_ColorP3uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLuint *)) { - SET_by_offset(disp, _gloffset_ColorP3uiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_ColorP4ui)(GLenum, GLuint); -#define CALL_ColorP4ui(disp, parameters) \ - (* GET_ColorP4ui(disp)) parameters -static inline _glptr_ColorP4ui GET_ColorP4ui(struct _glapi_table *disp) { - return (_glptr_ColorP4ui) (GET_by_offset(disp, _gloffset_ColorP4ui)); -} - -static inline void SET_ColorP4ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_ColorP4ui, fn); -} - -typedef void (GLAPIENTRYP _glptr_ColorP4uiv)(GLenum, const GLuint *); -#define CALL_ColorP4uiv(disp, parameters) \ - (* GET_ColorP4uiv(disp)) parameters -static inline _glptr_ColorP4uiv GET_ColorP4uiv(struct _glapi_table *disp) { - return (_glptr_ColorP4uiv) (GET_by_offset(disp, _gloffset_ColorP4uiv)); -} - -static inline void SET_ColorP4uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLuint *)) { - SET_by_offset(disp, _gloffset_ColorP4uiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoordP1ui)(GLenum, GLenum, GLuint); -#define CALL_MultiTexCoordP1ui(disp, parameters) \ - (* GET_MultiTexCoordP1ui(disp)) parameters -static inline _glptr_MultiTexCoordP1ui GET_MultiTexCoordP1ui(struct _glapi_table *disp) { - return (_glptr_MultiTexCoordP1ui) (GET_by_offset(disp, _gloffset_MultiTexCoordP1ui)); -} - -static inline void SET_MultiTexCoordP1ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_MultiTexCoordP1ui, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoordP1uiv)(GLenum, GLenum, const GLuint *); -#define CALL_MultiTexCoordP1uiv(disp, parameters) \ - (* GET_MultiTexCoordP1uiv(disp)) parameters -static inline _glptr_MultiTexCoordP1uiv GET_MultiTexCoordP1uiv(struct _glapi_table *disp) { - return (_glptr_MultiTexCoordP1uiv) (GET_by_offset(disp, _gloffset_MultiTexCoordP1uiv)); -} - -static inline void SET_MultiTexCoordP1uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLuint *)) { - SET_by_offset(disp, _gloffset_MultiTexCoordP1uiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoordP2ui)(GLenum, GLenum, GLuint); -#define CALL_MultiTexCoordP2ui(disp, parameters) \ - (* GET_MultiTexCoordP2ui(disp)) parameters -static inline _glptr_MultiTexCoordP2ui GET_MultiTexCoordP2ui(struct _glapi_table *disp) { - return (_glptr_MultiTexCoordP2ui) (GET_by_offset(disp, _gloffset_MultiTexCoordP2ui)); -} - -static inline void SET_MultiTexCoordP2ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_MultiTexCoordP2ui, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoordP2uiv)(GLenum, GLenum, const GLuint *); -#define CALL_MultiTexCoordP2uiv(disp, parameters) \ - (* GET_MultiTexCoordP2uiv(disp)) parameters -static inline _glptr_MultiTexCoordP2uiv GET_MultiTexCoordP2uiv(struct _glapi_table *disp) { - return (_glptr_MultiTexCoordP2uiv) (GET_by_offset(disp, _gloffset_MultiTexCoordP2uiv)); -} - -static inline void SET_MultiTexCoordP2uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLuint *)) { - SET_by_offset(disp, _gloffset_MultiTexCoordP2uiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoordP3ui)(GLenum, GLenum, GLuint); -#define CALL_MultiTexCoordP3ui(disp, parameters) \ - (* GET_MultiTexCoordP3ui(disp)) parameters -static inline _glptr_MultiTexCoordP3ui GET_MultiTexCoordP3ui(struct _glapi_table *disp) { - return (_glptr_MultiTexCoordP3ui) (GET_by_offset(disp, _gloffset_MultiTexCoordP3ui)); -} - -static inline void SET_MultiTexCoordP3ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_MultiTexCoordP3ui, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoordP3uiv)(GLenum, GLenum, const GLuint *); -#define CALL_MultiTexCoordP3uiv(disp, parameters) \ - (* GET_MultiTexCoordP3uiv(disp)) parameters -static inline _glptr_MultiTexCoordP3uiv GET_MultiTexCoordP3uiv(struct _glapi_table *disp) { - return (_glptr_MultiTexCoordP3uiv) (GET_by_offset(disp, _gloffset_MultiTexCoordP3uiv)); -} - -static inline void SET_MultiTexCoordP3uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLuint *)) { - SET_by_offset(disp, _gloffset_MultiTexCoordP3uiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoordP4ui)(GLenum, GLenum, GLuint); -#define CALL_MultiTexCoordP4ui(disp, parameters) \ - (* GET_MultiTexCoordP4ui(disp)) parameters -static inline _glptr_MultiTexCoordP4ui GET_MultiTexCoordP4ui(struct _glapi_table *disp) { - return (_glptr_MultiTexCoordP4ui) (GET_by_offset(disp, _gloffset_MultiTexCoordP4ui)); -} - -static inline void SET_MultiTexCoordP4ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_MultiTexCoordP4ui, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiTexCoordP4uiv)(GLenum, GLenum, const GLuint *); -#define CALL_MultiTexCoordP4uiv(disp, parameters) \ - (* GET_MultiTexCoordP4uiv(disp)) parameters -static inline _glptr_MultiTexCoordP4uiv GET_MultiTexCoordP4uiv(struct _glapi_table *disp) { - return (_glptr_MultiTexCoordP4uiv) (GET_by_offset(disp, _gloffset_MultiTexCoordP4uiv)); -} - -static inline void SET_MultiTexCoordP4uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLuint *)) { - SET_by_offset(disp, _gloffset_MultiTexCoordP4uiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_NormalP3ui)(GLenum, GLuint); -#define CALL_NormalP3ui(disp, parameters) \ - (* GET_NormalP3ui(disp)) parameters -static inline _glptr_NormalP3ui GET_NormalP3ui(struct _glapi_table *disp) { - return (_glptr_NormalP3ui) (GET_by_offset(disp, _gloffset_NormalP3ui)); -} - -static inline void SET_NormalP3ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_NormalP3ui, fn); -} - -typedef void (GLAPIENTRYP _glptr_NormalP3uiv)(GLenum, const GLuint *); -#define CALL_NormalP3uiv(disp, parameters) \ - (* GET_NormalP3uiv(disp)) parameters -static inline _glptr_NormalP3uiv GET_NormalP3uiv(struct _glapi_table *disp) { - return (_glptr_NormalP3uiv) (GET_by_offset(disp, _gloffset_NormalP3uiv)); -} - -static inline void SET_NormalP3uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLuint *)) { - SET_by_offset(disp, _gloffset_NormalP3uiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_SecondaryColorP3ui)(GLenum, GLuint); -#define CALL_SecondaryColorP3ui(disp, parameters) \ - (* GET_SecondaryColorP3ui(disp)) parameters -static inline _glptr_SecondaryColorP3ui GET_SecondaryColorP3ui(struct _glapi_table *disp) { - return (_glptr_SecondaryColorP3ui) (GET_by_offset(disp, _gloffset_SecondaryColorP3ui)); -} - -static inline void SET_SecondaryColorP3ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_SecondaryColorP3ui, fn); -} - -typedef void (GLAPIENTRYP _glptr_SecondaryColorP3uiv)(GLenum, const GLuint *); -#define CALL_SecondaryColorP3uiv(disp, parameters) \ - (* GET_SecondaryColorP3uiv(disp)) parameters -static inline _glptr_SecondaryColorP3uiv GET_SecondaryColorP3uiv(struct _glapi_table *disp) { - return (_glptr_SecondaryColorP3uiv) (GET_by_offset(disp, _gloffset_SecondaryColorP3uiv)); -} - -static inline void SET_SecondaryColorP3uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLuint *)) { - SET_by_offset(disp, _gloffset_SecondaryColorP3uiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexCoordP1ui)(GLenum, GLuint); -#define CALL_TexCoordP1ui(disp, parameters) \ - (* GET_TexCoordP1ui(disp)) parameters -static inline _glptr_TexCoordP1ui GET_TexCoordP1ui(struct _glapi_table *disp) { - return (_glptr_TexCoordP1ui) (GET_by_offset(disp, _gloffset_TexCoordP1ui)); -} - -static inline void SET_TexCoordP1ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_TexCoordP1ui, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexCoordP1uiv)(GLenum, const GLuint *); -#define CALL_TexCoordP1uiv(disp, parameters) \ - (* GET_TexCoordP1uiv(disp)) parameters -static inline _glptr_TexCoordP1uiv GET_TexCoordP1uiv(struct _glapi_table *disp) { - return (_glptr_TexCoordP1uiv) (GET_by_offset(disp, _gloffset_TexCoordP1uiv)); -} - -static inline void SET_TexCoordP1uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLuint *)) { - SET_by_offset(disp, _gloffset_TexCoordP1uiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexCoordP2ui)(GLenum, GLuint); -#define CALL_TexCoordP2ui(disp, parameters) \ - (* GET_TexCoordP2ui(disp)) parameters -static inline _glptr_TexCoordP2ui GET_TexCoordP2ui(struct _glapi_table *disp) { - return (_glptr_TexCoordP2ui) (GET_by_offset(disp, _gloffset_TexCoordP2ui)); -} - -static inline void SET_TexCoordP2ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_TexCoordP2ui, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexCoordP2uiv)(GLenum, const GLuint *); -#define CALL_TexCoordP2uiv(disp, parameters) \ - (* GET_TexCoordP2uiv(disp)) parameters -static inline _glptr_TexCoordP2uiv GET_TexCoordP2uiv(struct _glapi_table *disp) { - return (_glptr_TexCoordP2uiv) (GET_by_offset(disp, _gloffset_TexCoordP2uiv)); -} - -static inline void SET_TexCoordP2uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLuint *)) { - SET_by_offset(disp, _gloffset_TexCoordP2uiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexCoordP3ui)(GLenum, GLuint); -#define CALL_TexCoordP3ui(disp, parameters) \ - (* GET_TexCoordP3ui(disp)) parameters -static inline _glptr_TexCoordP3ui GET_TexCoordP3ui(struct _glapi_table *disp) { - return (_glptr_TexCoordP3ui) (GET_by_offset(disp, _gloffset_TexCoordP3ui)); -} - -static inline void SET_TexCoordP3ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_TexCoordP3ui, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexCoordP3uiv)(GLenum, const GLuint *); -#define CALL_TexCoordP3uiv(disp, parameters) \ - (* GET_TexCoordP3uiv(disp)) parameters -static inline _glptr_TexCoordP3uiv GET_TexCoordP3uiv(struct _glapi_table *disp) { - return (_glptr_TexCoordP3uiv) (GET_by_offset(disp, _gloffset_TexCoordP3uiv)); -} - -static inline void SET_TexCoordP3uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLuint *)) { - SET_by_offset(disp, _gloffset_TexCoordP3uiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexCoordP4ui)(GLenum, GLuint); -#define CALL_TexCoordP4ui(disp, parameters) \ - (* GET_TexCoordP4ui(disp)) parameters -static inline _glptr_TexCoordP4ui GET_TexCoordP4ui(struct _glapi_table *disp) { - return (_glptr_TexCoordP4ui) (GET_by_offset(disp, _gloffset_TexCoordP4ui)); -} - -static inline void SET_TexCoordP4ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_TexCoordP4ui, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexCoordP4uiv)(GLenum, const GLuint *); -#define CALL_TexCoordP4uiv(disp, parameters) \ - (* GET_TexCoordP4uiv(disp)) parameters -static inline _glptr_TexCoordP4uiv GET_TexCoordP4uiv(struct _glapi_table *disp) { - return (_glptr_TexCoordP4uiv) (GET_by_offset(disp, _gloffset_TexCoordP4uiv)); -} - -static inline void SET_TexCoordP4uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLuint *)) { - SET_by_offset(disp, _gloffset_TexCoordP4uiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribP1ui)(GLuint, GLenum, GLboolean, GLuint); -#define CALL_VertexAttribP1ui(disp, parameters) \ - (* GET_VertexAttribP1ui(disp)) parameters -static inline _glptr_VertexAttribP1ui GET_VertexAttribP1ui(struct _glapi_table *disp) { - return (_glptr_VertexAttribP1ui) (GET_by_offset(disp, _gloffset_VertexAttribP1ui)); -} - -static inline void SET_VertexAttribP1ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLboolean, GLuint)) { - SET_by_offset(disp, _gloffset_VertexAttribP1ui, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribP1uiv)(GLuint, GLenum, GLboolean, const GLuint *); -#define CALL_VertexAttribP1uiv(disp, parameters) \ - (* GET_VertexAttribP1uiv(disp)) parameters -static inline _glptr_VertexAttribP1uiv GET_VertexAttribP1uiv(struct _glapi_table *disp) { - return (_glptr_VertexAttribP1uiv) (GET_by_offset(disp, _gloffset_VertexAttribP1uiv)); -} - -static inline void SET_VertexAttribP1uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLboolean, const GLuint *)) { - SET_by_offset(disp, _gloffset_VertexAttribP1uiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribP2ui)(GLuint, GLenum, GLboolean, GLuint); -#define CALL_VertexAttribP2ui(disp, parameters) \ - (* GET_VertexAttribP2ui(disp)) parameters -static inline _glptr_VertexAttribP2ui GET_VertexAttribP2ui(struct _glapi_table *disp) { - return (_glptr_VertexAttribP2ui) (GET_by_offset(disp, _gloffset_VertexAttribP2ui)); -} - -static inline void SET_VertexAttribP2ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLboolean, GLuint)) { - SET_by_offset(disp, _gloffset_VertexAttribP2ui, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribP2uiv)(GLuint, GLenum, GLboolean, const GLuint *); -#define CALL_VertexAttribP2uiv(disp, parameters) \ - (* GET_VertexAttribP2uiv(disp)) parameters -static inline _glptr_VertexAttribP2uiv GET_VertexAttribP2uiv(struct _glapi_table *disp) { - return (_glptr_VertexAttribP2uiv) (GET_by_offset(disp, _gloffset_VertexAttribP2uiv)); -} - -static inline void SET_VertexAttribP2uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLboolean, const GLuint *)) { - SET_by_offset(disp, _gloffset_VertexAttribP2uiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribP3ui)(GLuint, GLenum, GLboolean, GLuint); -#define CALL_VertexAttribP3ui(disp, parameters) \ - (* GET_VertexAttribP3ui(disp)) parameters -static inline _glptr_VertexAttribP3ui GET_VertexAttribP3ui(struct _glapi_table *disp) { - return (_glptr_VertexAttribP3ui) (GET_by_offset(disp, _gloffset_VertexAttribP3ui)); -} - -static inline void SET_VertexAttribP3ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLboolean, GLuint)) { - SET_by_offset(disp, _gloffset_VertexAttribP3ui, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribP3uiv)(GLuint, GLenum, GLboolean, const GLuint *); -#define CALL_VertexAttribP3uiv(disp, parameters) \ - (* GET_VertexAttribP3uiv(disp)) parameters -static inline _glptr_VertexAttribP3uiv GET_VertexAttribP3uiv(struct _glapi_table *disp) { - return (_glptr_VertexAttribP3uiv) (GET_by_offset(disp, _gloffset_VertexAttribP3uiv)); -} - -static inline void SET_VertexAttribP3uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLboolean, const GLuint *)) { - SET_by_offset(disp, _gloffset_VertexAttribP3uiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribP4ui)(GLuint, GLenum, GLboolean, GLuint); -#define CALL_VertexAttribP4ui(disp, parameters) \ - (* GET_VertexAttribP4ui(disp)) parameters -static inline _glptr_VertexAttribP4ui GET_VertexAttribP4ui(struct _glapi_table *disp) { - return (_glptr_VertexAttribP4ui) (GET_by_offset(disp, _gloffset_VertexAttribP4ui)); -} - -static inline void SET_VertexAttribP4ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLboolean, GLuint)) { - SET_by_offset(disp, _gloffset_VertexAttribP4ui, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribP4uiv)(GLuint, GLenum, GLboolean, const GLuint *); -#define CALL_VertexAttribP4uiv(disp, parameters) \ - (* GET_VertexAttribP4uiv(disp)) parameters -static inline _glptr_VertexAttribP4uiv GET_VertexAttribP4uiv(struct _glapi_table *disp) { - return (_glptr_VertexAttribP4uiv) (GET_by_offset(disp, _gloffset_VertexAttribP4uiv)); -} - -static inline void SET_VertexAttribP4uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLboolean, const GLuint *)) { - SET_by_offset(disp, _gloffset_VertexAttribP4uiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexP2ui)(GLenum, GLuint); -#define CALL_VertexP2ui(disp, parameters) \ - (* GET_VertexP2ui(disp)) parameters -static inline _glptr_VertexP2ui GET_VertexP2ui(struct _glapi_table *disp) { - return (_glptr_VertexP2ui) (GET_by_offset(disp, _gloffset_VertexP2ui)); -} - -static inline void SET_VertexP2ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_VertexP2ui, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexP2uiv)(GLenum, const GLuint *); -#define CALL_VertexP2uiv(disp, parameters) \ - (* GET_VertexP2uiv(disp)) parameters -static inline _glptr_VertexP2uiv GET_VertexP2uiv(struct _glapi_table *disp) { - return (_glptr_VertexP2uiv) (GET_by_offset(disp, _gloffset_VertexP2uiv)); -} - -static inline void SET_VertexP2uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLuint *)) { - SET_by_offset(disp, _gloffset_VertexP2uiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexP3ui)(GLenum, GLuint); -#define CALL_VertexP3ui(disp, parameters) \ - (* GET_VertexP3ui(disp)) parameters -static inline _glptr_VertexP3ui GET_VertexP3ui(struct _glapi_table *disp) { - return (_glptr_VertexP3ui) (GET_by_offset(disp, _gloffset_VertexP3ui)); -} - -static inline void SET_VertexP3ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_VertexP3ui, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexP3uiv)(GLenum, const GLuint *); -#define CALL_VertexP3uiv(disp, parameters) \ - (* GET_VertexP3uiv(disp)) parameters -static inline _glptr_VertexP3uiv GET_VertexP3uiv(struct _glapi_table *disp) { - return (_glptr_VertexP3uiv) (GET_by_offset(disp, _gloffset_VertexP3uiv)); -} - -static inline void SET_VertexP3uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLuint *)) { - SET_by_offset(disp, _gloffset_VertexP3uiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexP4ui)(GLenum, GLuint); -#define CALL_VertexP4ui(disp, parameters) \ - (* GET_VertexP4ui(disp)) parameters -static inline _glptr_VertexP4ui GET_VertexP4ui(struct _glapi_table *disp) { - return (_glptr_VertexP4ui) (GET_by_offset(disp, _gloffset_VertexP4ui)); -} - -static inline void SET_VertexP4ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_VertexP4ui, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexP4uiv)(GLenum, const GLuint *); -#define CALL_VertexP4uiv(disp, parameters) \ - (* GET_VertexP4uiv(disp)) parameters -static inline _glptr_VertexP4uiv GET_VertexP4uiv(struct _glapi_table *disp) { - return (_glptr_VertexP4uiv) (GET_by_offset(disp, _gloffset_VertexP4uiv)); -} - -static inline void SET_VertexP4uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLuint *)) { - SET_by_offset(disp, _gloffset_VertexP4uiv, fn); -} - -typedef void (GLAPIENTRYP _glptr_BindTransformFeedback)(GLenum, GLuint); -#define CALL_BindTransformFeedback(disp, parameters) \ - (* GET_BindTransformFeedback(disp)) parameters -static inline _glptr_BindTransformFeedback GET_BindTransformFeedback(struct _glapi_table *disp) { - return (_glptr_BindTransformFeedback) (GET_by_offset(disp, _gloffset_BindTransformFeedback)); -} - -static inline void SET_BindTransformFeedback(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_BindTransformFeedback, fn); -} - -typedef void (GLAPIENTRYP _glptr_DeleteTransformFeedbacks)(GLsizei, const GLuint *); -#define CALL_DeleteTransformFeedbacks(disp, parameters) \ - (* GET_DeleteTransformFeedbacks(disp)) parameters -static inline _glptr_DeleteTransformFeedbacks GET_DeleteTransformFeedbacks(struct _glapi_table *disp) { - return (_glptr_DeleteTransformFeedbacks) (GET_by_offset(disp, _gloffset_DeleteTransformFeedbacks)); -} - -static inline void SET_DeleteTransformFeedbacks(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { - SET_by_offset(disp, _gloffset_DeleteTransformFeedbacks, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawTransformFeedback)(GLenum, GLuint); -#define CALL_DrawTransformFeedback(disp, parameters) \ - (* GET_DrawTransformFeedback(disp)) parameters -static inline _glptr_DrawTransformFeedback GET_DrawTransformFeedback(struct _glapi_table *disp) { - return (_glptr_DrawTransformFeedback) (GET_by_offset(disp, _gloffset_DrawTransformFeedback)); -} - -static inline void SET_DrawTransformFeedback(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_DrawTransformFeedback, fn); -} - -typedef void (GLAPIENTRYP _glptr_GenTransformFeedbacks)(GLsizei, GLuint *); -#define CALL_GenTransformFeedbacks(disp, parameters) \ - (* GET_GenTransformFeedbacks(disp)) parameters -static inline _glptr_GenTransformFeedbacks GET_GenTransformFeedbacks(struct _glapi_table *disp) { - return (_glptr_GenTransformFeedbacks) (GET_by_offset(disp, _gloffset_GenTransformFeedbacks)); -} - -static inline void SET_GenTransformFeedbacks(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { - SET_by_offset(disp, _gloffset_GenTransformFeedbacks, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsTransformFeedback)(GLuint); -#define CALL_IsTransformFeedback(disp, parameters) \ - (* GET_IsTransformFeedback(disp)) parameters -static inline _glptr_IsTransformFeedback GET_IsTransformFeedback(struct _glapi_table *disp) { - return (_glptr_IsTransformFeedback) (GET_by_offset(disp, _gloffset_IsTransformFeedback)); -} - -static inline void SET_IsTransformFeedback(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_IsTransformFeedback, fn); -} - -typedef void (GLAPIENTRYP _glptr_PauseTransformFeedback)(void); -#define CALL_PauseTransformFeedback(disp, parameters) \ - (* GET_PauseTransformFeedback(disp)) parameters -static inline _glptr_PauseTransformFeedback GET_PauseTransformFeedback(struct _glapi_table *disp) { - return (_glptr_PauseTransformFeedback) (GET_by_offset(disp, _gloffset_PauseTransformFeedback)); -} - -static inline void SET_PauseTransformFeedback(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_PauseTransformFeedback, fn); -} - -typedef void (GLAPIENTRYP _glptr_ResumeTransformFeedback)(void); -#define CALL_ResumeTransformFeedback(disp, parameters) \ - (* GET_ResumeTransformFeedback(disp)) parameters -static inline _glptr_ResumeTransformFeedback GET_ResumeTransformFeedback(struct _glapi_table *disp) { - return (_glptr_ResumeTransformFeedback) (GET_by_offset(disp, _gloffset_ResumeTransformFeedback)); -} - -static inline void SET_ResumeTransformFeedback(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_ResumeTransformFeedback, fn); -} - -typedef void (GLAPIENTRYP _glptr_ClearDepthf)(GLclampf); -#define CALL_ClearDepthf(disp, parameters) \ - (* GET_ClearDepthf(disp)) parameters -static inline _glptr_ClearDepthf GET_ClearDepthf(struct _glapi_table *disp) { - return (_glptr_ClearDepthf) (GET_by_offset(disp, _gloffset_ClearDepthf)); -} - -static inline void SET_ClearDepthf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf)) { - SET_by_offset(disp, _gloffset_ClearDepthf, fn); -} - -typedef void (GLAPIENTRYP _glptr_DepthRangef)(GLclampf, GLclampf); -#define CALL_DepthRangef(disp, parameters) \ - (* GET_DepthRangef(disp)) parameters -static inline _glptr_DepthRangef GET_DepthRangef(struct _glapi_table *disp) { - return (_glptr_DepthRangef) (GET_by_offset(disp, _gloffset_DepthRangef)); -} - -static inline void SET_DepthRangef(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf, GLclampf)) { - SET_by_offset(disp, _gloffset_DepthRangef, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetShaderPrecisionFormat)(GLenum, GLenum, GLint *, GLint *); -#define CALL_GetShaderPrecisionFormat(disp, parameters) \ - (* GET_GetShaderPrecisionFormat(disp)) parameters -static inline _glptr_GetShaderPrecisionFormat GET_GetShaderPrecisionFormat(struct _glapi_table *disp) { - return (_glptr_GetShaderPrecisionFormat) (GET_by_offset(disp, _gloffset_GetShaderPrecisionFormat)); -} - -static inline void SET_GetShaderPrecisionFormat(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *, GLint *)) { - SET_by_offset(disp, _gloffset_GetShaderPrecisionFormat, fn); -} - -typedef void (GLAPIENTRYP _glptr_ReleaseShaderCompiler)(void); -#define CALL_ReleaseShaderCompiler(disp, parameters) \ - (* GET_ReleaseShaderCompiler(disp)) parameters -static inline _glptr_ReleaseShaderCompiler GET_ReleaseShaderCompiler(struct _glapi_table *disp) { - return (_glptr_ReleaseShaderCompiler) (GET_by_offset(disp, _gloffset_ReleaseShaderCompiler)); -} - -static inline void SET_ReleaseShaderCompiler(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_ReleaseShaderCompiler, fn); -} - -typedef void (GLAPIENTRYP _glptr_ShaderBinary)(GLsizei, const GLuint *, GLenum, const GLvoid *, GLsizei); -#define CALL_ShaderBinary(disp, parameters) \ - (* GET_ShaderBinary(disp)) parameters -static inline _glptr_ShaderBinary GET_ShaderBinary(struct _glapi_table *disp) { - return (_glptr_ShaderBinary) (GET_by_offset(disp, _gloffset_ShaderBinary)); -} - -static inline void SET_ShaderBinary(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *, GLenum, const GLvoid *, GLsizei)) { - SET_by_offset(disp, _gloffset_ShaderBinary, fn); -} - -typedef GLenum (GLAPIENTRYP _glptr_GetGraphicsResetStatusARB)(void); -#define CALL_GetGraphicsResetStatusARB(disp, parameters) \ - (* GET_GetGraphicsResetStatusARB(disp)) parameters -static inline _glptr_GetGraphicsResetStatusARB GET_GetGraphicsResetStatusARB(struct _glapi_table *disp) { - return (_glptr_GetGraphicsResetStatusARB) (GET_by_offset(disp, _gloffset_GetGraphicsResetStatusARB)); -} - -static inline void SET_GetGraphicsResetStatusARB(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_GetGraphicsResetStatusARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetnColorTableARB)(GLenum, GLenum, GLenum, GLsizei, GLvoid *); -#define CALL_GetnColorTableARB(disp, parameters) \ - (* GET_GetnColorTableARB(disp)) parameters -static inline _glptr_GetnColorTableARB GET_GetnColorTableARB(struct _glapi_table *disp) { - return (_glptr_GetnColorTableARB) (GET_by_offset(disp, _gloffset_GetnColorTableARB)); -} - -static inline void SET_GetnColorTableARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLsizei, GLvoid *)) { - SET_by_offset(disp, _gloffset_GetnColorTableARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetnCompressedTexImageARB)(GLenum, GLint, GLsizei, GLvoid *); -#define CALL_GetnCompressedTexImageARB(disp, parameters) \ - (* GET_GetnCompressedTexImageARB(disp)) parameters -static inline _glptr_GetnCompressedTexImageARB GET_GetnCompressedTexImageARB(struct _glapi_table *disp) { - return (_glptr_GetnCompressedTexImageARB) (GET_by_offset(disp, _gloffset_GetnCompressedTexImageARB)); -} - -static inline void SET_GetnCompressedTexImageARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLsizei, GLvoid *)) { - SET_by_offset(disp, _gloffset_GetnCompressedTexImageARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetnConvolutionFilterARB)(GLenum, GLenum, GLenum, GLsizei, GLvoid *); -#define CALL_GetnConvolutionFilterARB(disp, parameters) \ - (* GET_GetnConvolutionFilterARB(disp)) parameters -static inline _glptr_GetnConvolutionFilterARB GET_GetnConvolutionFilterARB(struct _glapi_table *disp) { - return (_glptr_GetnConvolutionFilterARB) (GET_by_offset(disp, _gloffset_GetnConvolutionFilterARB)); -} - -static inline void SET_GetnConvolutionFilterARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLsizei, GLvoid *)) { - SET_by_offset(disp, _gloffset_GetnConvolutionFilterARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetnHistogramARB)(GLenum, GLboolean, GLenum, GLenum, GLsizei, GLvoid *); -#define CALL_GetnHistogramARB(disp, parameters) \ - (* GET_GetnHistogramARB(disp)) parameters -static inline _glptr_GetnHistogramARB GET_GetnHistogramARB(struct _glapi_table *disp) { - return (_glptr_GetnHistogramARB) (GET_by_offset(disp, _gloffset_GetnHistogramARB)); -} - -static inline void SET_GetnHistogramARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLboolean, GLenum, GLenum, GLsizei, GLvoid *)) { - SET_by_offset(disp, _gloffset_GetnHistogramARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetnMapdvARB)(GLenum, GLenum, GLsizei, GLdouble *); -#define CALL_GetnMapdvARB(disp, parameters) \ - (* GET_GetnMapdvARB(disp)) parameters -static inline _glptr_GetnMapdvARB GET_GetnMapdvARB(struct _glapi_table *disp) { - return (_glptr_GetnMapdvARB) (GET_by_offset(disp, _gloffset_GetnMapdvARB)); -} - -static inline void SET_GetnMapdvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLdouble *)) { - SET_by_offset(disp, _gloffset_GetnMapdvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetnMapfvARB)(GLenum, GLenum, GLsizei, GLfloat *); -#define CALL_GetnMapfvARB(disp, parameters) \ - (* GET_GetnMapfvARB(disp)) parameters -static inline _glptr_GetnMapfvARB GET_GetnMapfvARB(struct _glapi_table *disp) { - return (_glptr_GetnMapfvARB) (GET_by_offset(disp, _gloffset_GetnMapfvARB)); -} - -static inline void SET_GetnMapfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetnMapfvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetnMapivARB)(GLenum, GLenum, GLsizei, GLint *); -#define CALL_GetnMapivARB(disp, parameters) \ - (* GET_GetnMapivARB(disp)) parameters -static inline _glptr_GetnMapivARB GET_GetnMapivARB(struct _glapi_table *disp) { - return (_glptr_GetnMapivARB) (GET_by_offset(disp, _gloffset_GetnMapivARB)); -} - -static inline void SET_GetnMapivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLint *)) { - SET_by_offset(disp, _gloffset_GetnMapivARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetnMinmaxARB)(GLenum, GLboolean, GLenum, GLenum, GLsizei, GLvoid *); -#define CALL_GetnMinmaxARB(disp, parameters) \ - (* GET_GetnMinmaxARB(disp)) parameters -static inline _glptr_GetnMinmaxARB GET_GetnMinmaxARB(struct _glapi_table *disp) { - return (_glptr_GetnMinmaxARB) (GET_by_offset(disp, _gloffset_GetnMinmaxARB)); -} - -static inline void SET_GetnMinmaxARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLboolean, GLenum, GLenum, GLsizei, GLvoid *)) { - SET_by_offset(disp, _gloffset_GetnMinmaxARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetnPixelMapfvARB)(GLenum, GLsizei, GLfloat *); -#define CALL_GetnPixelMapfvARB(disp, parameters) \ - (* GET_GetnPixelMapfvARB(disp)) parameters -static inline _glptr_GetnPixelMapfvARB GET_GetnPixelMapfvARB(struct _glapi_table *disp) { - return (_glptr_GetnPixelMapfvARB) (GET_by_offset(disp, _gloffset_GetnPixelMapfvARB)); -} - -static inline void SET_GetnPixelMapfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetnPixelMapfvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetnPixelMapuivARB)(GLenum, GLsizei, GLuint *); -#define CALL_GetnPixelMapuivARB(disp, parameters) \ - (* GET_GetnPixelMapuivARB(disp)) parameters -static inline _glptr_GetnPixelMapuivARB GET_GetnPixelMapuivARB(struct _glapi_table *disp) { - return (_glptr_GetnPixelMapuivARB) (GET_by_offset(disp, _gloffset_GetnPixelMapuivARB)); -} - -static inline void SET_GetnPixelMapuivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLuint *)) { - SET_by_offset(disp, _gloffset_GetnPixelMapuivARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetnPixelMapusvARB)(GLenum, GLsizei, GLushort *); -#define CALL_GetnPixelMapusvARB(disp, parameters) \ - (* GET_GetnPixelMapusvARB(disp)) parameters -static inline _glptr_GetnPixelMapusvARB GET_GetnPixelMapusvARB(struct _glapi_table *disp) { - return (_glptr_GetnPixelMapusvARB) (GET_by_offset(disp, _gloffset_GetnPixelMapusvARB)); -} - -static inline void SET_GetnPixelMapusvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLushort *)) { - SET_by_offset(disp, _gloffset_GetnPixelMapusvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetnPolygonStippleARB)(GLsizei, GLubyte *); -#define CALL_GetnPolygonStippleARB(disp, parameters) \ - (* GET_GetnPolygonStippleARB(disp)) parameters -static inline _glptr_GetnPolygonStippleARB GET_GetnPolygonStippleARB(struct _glapi_table *disp) { - return (_glptr_GetnPolygonStippleARB) (GET_by_offset(disp, _gloffset_GetnPolygonStippleARB)); -} - -static inline void SET_GetnPolygonStippleARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLubyte *)) { - SET_by_offset(disp, _gloffset_GetnPolygonStippleARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetnSeparableFilterARB)(GLenum, GLenum, GLenum, GLsizei, GLvoid *, GLsizei, GLvoid *, GLvoid *); -#define CALL_GetnSeparableFilterARB(disp, parameters) \ - (* GET_GetnSeparableFilterARB(disp)) parameters -static inline _glptr_GetnSeparableFilterARB GET_GetnSeparableFilterARB(struct _glapi_table *disp) { - return (_glptr_GetnSeparableFilterARB) (GET_by_offset(disp, _gloffset_GetnSeparableFilterARB)); -} - -static inline void SET_GetnSeparableFilterARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLsizei, GLvoid *, GLsizei, GLvoid *, GLvoid *)) { - SET_by_offset(disp, _gloffset_GetnSeparableFilterARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetnTexImageARB)(GLenum, GLint, GLenum, GLenum, GLsizei, GLvoid *); -#define CALL_GetnTexImageARB(disp, parameters) \ - (* GET_GetnTexImageARB(disp)) parameters -static inline _glptr_GetnTexImageARB GET_GetnTexImageARB(struct _glapi_table *disp) { - return (_glptr_GetnTexImageARB) (GET_by_offset(disp, _gloffset_GetnTexImageARB)); -} - -static inline void SET_GetnTexImageARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLenum, GLsizei, GLvoid *)) { - SET_by_offset(disp, _gloffset_GetnTexImageARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetnUniformdvARB)(GLhandleARB, GLint, GLsizei, GLdouble *); -#define CALL_GetnUniformdvARB(disp, parameters) \ - (* GET_GetnUniformdvARB(disp)) parameters -static inline _glptr_GetnUniformdvARB GET_GetnUniformdvARB(struct _glapi_table *disp) { - return (_glptr_GetnUniformdvARB) (GET_by_offset(disp, _gloffset_GetnUniformdvARB)); -} - -static inline void SET_GetnUniformdvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLint, GLsizei, GLdouble *)) { - SET_by_offset(disp, _gloffset_GetnUniformdvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetnUniformfvARB)(GLhandleARB, GLint, GLsizei, GLfloat *); -#define CALL_GetnUniformfvARB(disp, parameters) \ - (* GET_GetnUniformfvARB(disp)) parameters -static inline _glptr_GetnUniformfvARB GET_GetnUniformfvARB(struct _glapi_table *disp) { - return (_glptr_GetnUniformfvARB) (GET_by_offset(disp, _gloffset_GetnUniformfvARB)); -} - -static inline void SET_GetnUniformfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLint, GLsizei, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetnUniformfvARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetnUniformivARB)(GLhandleARB, GLint, GLsizei, GLint *); -#define CALL_GetnUniformivARB(disp, parameters) \ - (* GET_GetnUniformivARB(disp)) parameters -static inline _glptr_GetnUniformivARB GET_GetnUniformivARB(struct _glapi_table *disp) { - return (_glptr_GetnUniformivARB) (GET_by_offset(disp, _gloffset_GetnUniformivARB)); -} - -static inline void SET_GetnUniformivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLint, GLsizei, GLint *)) { - SET_by_offset(disp, _gloffset_GetnUniformivARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetnUniformuivARB)(GLhandleARB, GLint, GLsizei, GLuint *); -#define CALL_GetnUniformuivARB(disp, parameters) \ - (* GET_GetnUniformuivARB(disp)) parameters -static inline _glptr_GetnUniformuivARB GET_GetnUniformuivARB(struct _glapi_table *disp) { - return (_glptr_GetnUniformuivARB) (GET_by_offset(disp, _gloffset_GetnUniformuivARB)); -} - -static inline void SET_GetnUniformuivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLint, GLsizei, GLuint *)) { - SET_by_offset(disp, _gloffset_GetnUniformuivARB, fn); -} - -typedef void (GLAPIENTRYP _glptr_ReadnPixelsARB)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLsizei, GLvoid *); -#define CALL_ReadnPixelsARB(disp, parameters) \ - (* GET_ReadnPixelsARB(disp)) parameters -static inline _glptr_ReadnPixelsARB GET_ReadnPixelsARB(struct _glapi_table *disp) { - return (_glptr_ReadnPixelsARB) (GET_by_offset(disp, _gloffset_ReadnPixelsARB)); -} - -static inline void SET_ReadnPixelsARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLsizei, GLvoid *)) { - SET_by_offset(disp, _gloffset_ReadnPixelsARB, fn); -} - typedef void (GLAPIENTRYP _glptr_TexStorage1D)(GLenum, GLsizei, GLenum, GLsizei); #define CALL_TexStorage1D(disp, parameters) \ (* GET_TexStorage1D(disp)) parameters @@ -9793,72 +5712,6 @@ static inline void SET_PolygonOffsetEXT(struct _glapi_table *disp, void (GLAPIEN SET_by_offset(disp, _gloffset_PolygonOffsetEXT, fn); } -typedef void (GLAPIENTRYP _glptr_GetPixelTexGenParameterfvSGIS)(GLenum, GLfloat *); -#define CALL_GetPixelTexGenParameterfvSGIS(disp, parameters) \ - (* GET_GetPixelTexGenParameterfvSGIS(disp)) parameters -static inline _glptr_GetPixelTexGenParameterfvSGIS GET_GetPixelTexGenParameterfvSGIS(struct _glapi_table *disp) { - return (_glptr_GetPixelTexGenParameterfvSGIS) (GET_by_offset(disp, _gloffset_GetPixelTexGenParameterfvSGIS)); -} - -static inline void SET_GetPixelTexGenParameterfvSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetPixelTexGenParameterfvSGIS, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetPixelTexGenParameterivSGIS)(GLenum, GLint *); -#define CALL_GetPixelTexGenParameterivSGIS(disp, parameters) \ - (* GET_GetPixelTexGenParameterivSGIS(disp)) parameters -static inline _glptr_GetPixelTexGenParameterivSGIS GET_GetPixelTexGenParameterivSGIS(struct _glapi_table *disp) { - return (_glptr_GetPixelTexGenParameterivSGIS) (GET_by_offset(disp, _gloffset_GetPixelTexGenParameterivSGIS)); -} - -static inline void SET_GetPixelTexGenParameterivSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetPixelTexGenParameterivSGIS, fn); -} - -typedef void (GLAPIENTRYP _glptr_PixelTexGenParameterfSGIS)(GLenum, GLfloat); -#define CALL_PixelTexGenParameterfSGIS(disp, parameters) \ - (* GET_PixelTexGenParameterfSGIS(disp)) parameters -static inline _glptr_PixelTexGenParameterfSGIS GET_PixelTexGenParameterfSGIS(struct _glapi_table *disp) { - return (_glptr_PixelTexGenParameterfSGIS) (GET_by_offset(disp, _gloffset_PixelTexGenParameterfSGIS)); -} - -static inline void SET_PixelTexGenParameterfSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { - SET_by_offset(disp, _gloffset_PixelTexGenParameterfSGIS, fn); -} - -typedef void (GLAPIENTRYP _glptr_PixelTexGenParameterfvSGIS)(GLenum, const GLfloat *); -#define CALL_PixelTexGenParameterfvSGIS(disp, parameters) \ - (* GET_PixelTexGenParameterfvSGIS(disp)) parameters -static inline _glptr_PixelTexGenParameterfvSGIS GET_PixelTexGenParameterfvSGIS(struct _glapi_table *disp) { - return (_glptr_PixelTexGenParameterfvSGIS) (GET_by_offset(disp, _gloffset_PixelTexGenParameterfvSGIS)); -} - -static inline void SET_PixelTexGenParameterfvSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { - SET_by_offset(disp, _gloffset_PixelTexGenParameterfvSGIS, fn); -} - -typedef void (GLAPIENTRYP _glptr_PixelTexGenParameteriSGIS)(GLenum, GLint); -#define CALL_PixelTexGenParameteriSGIS(disp, parameters) \ - (* GET_PixelTexGenParameteriSGIS(disp)) parameters -static inline _glptr_PixelTexGenParameteriSGIS GET_PixelTexGenParameteriSGIS(struct _glapi_table *disp) { - return (_glptr_PixelTexGenParameteriSGIS) (GET_by_offset(disp, _gloffset_PixelTexGenParameteriSGIS)); -} - -static inline void SET_PixelTexGenParameteriSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint)) { - SET_by_offset(disp, _gloffset_PixelTexGenParameteriSGIS, fn); -} - -typedef void (GLAPIENTRYP _glptr_PixelTexGenParameterivSGIS)(GLenum, const GLint *); -#define CALL_PixelTexGenParameterivSGIS(disp, parameters) \ - (* GET_PixelTexGenParameterivSGIS(disp)) parameters -static inline _glptr_PixelTexGenParameterivSGIS GET_PixelTexGenParameterivSGIS(struct _glapi_table *disp) { - return (_glptr_PixelTexGenParameterivSGIS) (GET_by_offset(disp, _gloffset_PixelTexGenParameterivSGIS)); -} - -static inline void SET_PixelTexGenParameterivSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { - SET_by_offset(disp, _gloffset_PixelTexGenParameterivSGIS, fn); -} - typedef void (GLAPIENTRYP _glptr_SampleMaskSGIS)(GLclampf, GLboolean); #define CALL_SampleMaskSGIS(disp, parameters) \ (* GET_SampleMaskSGIS(disp)) parameters @@ -10178,28 +6031,6 @@ static inline void SET_SecondaryColorPointerEXT(struct _glapi_table *disp, void SET_by_offset(disp, _gloffset_SecondaryColorPointerEXT, fn); } -typedef void (GLAPIENTRYP _glptr_MultiDrawArraysEXT)(GLenum, const GLint *, const GLsizei *, GLsizei); -#define CALL_MultiDrawArraysEXT(disp, parameters) \ - (* GET_MultiDrawArraysEXT(disp)) parameters -static inline _glptr_MultiDrawArraysEXT GET_MultiDrawArraysEXT(struct _glapi_table *disp) { - return (_glptr_MultiDrawArraysEXT) (GET_by_offset(disp, _gloffset_MultiDrawArraysEXT)); -} - -static inline void SET_MultiDrawArraysEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *, const GLsizei *, GLsizei)) { - SET_by_offset(disp, _gloffset_MultiDrawArraysEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiDrawElementsEXT)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei); -#define CALL_MultiDrawElementsEXT(disp, parameters) \ - (* GET_MultiDrawElementsEXT(disp)) parameters -static inline _glptr_MultiDrawElementsEXT GET_MultiDrawElementsEXT(struct _glapi_table *disp) { - return (_glptr_MultiDrawElementsEXT) (GET_by_offset(disp, _gloffset_MultiDrawElementsEXT)); -} - -static inline void SET_MultiDrawElementsEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei)) { - SET_by_offset(disp, _gloffset_MultiDrawElementsEXT, fn); -} - typedef void (GLAPIENTRYP _glptr_FogCoordPointerEXT)(GLenum, GLsizei, const GLvoid *); #define CALL_FogCoordPointerEXT(disp, parameters) \ (* GET_FogCoordPointerEXT(disp)) parameters @@ -10442,17 +6273,6 @@ static inline void SET_GetFinalCombinerInputParameterivNV(struct _glapi_table *d SET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterivNV, fn); } -typedef void (GLAPIENTRYP _glptr_ResizeBuffersMESA)(void); -#define CALL_ResizeBuffersMESA(disp, parameters) \ - (* GET_ResizeBuffersMESA(disp)) parameters -static inline _glptr_ResizeBuffersMESA GET_ResizeBuffersMESA(struct _glapi_table *disp) { - return (_glptr_ResizeBuffersMESA) (GET_by_offset(disp, _gloffset_ResizeBuffersMESA)); -} - -static inline void SET_ResizeBuffersMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_ResizeBuffersMESA, fn); -} - typedef void (GLAPIENTRYP _glptr_WindowPos2dMESA)(GLdouble, GLdouble); #define CALL_WindowPos2dMESA(disp, parameters) \ (* GET_WindowPos2dMESA(disp)) parameters @@ -10827,28 +6647,6 @@ static inline void SET_AreProgramsResidentNV(struct _glapi_table *disp, GLboolea SET_by_offset(disp, _gloffset_AreProgramsResidentNV, fn); } -typedef void (GLAPIENTRYP _glptr_BindProgramNV)(GLenum, GLuint); -#define CALL_BindProgramNV(disp, parameters) \ - (* GET_BindProgramNV(disp)) parameters -static inline _glptr_BindProgramNV GET_BindProgramNV(struct _glapi_table *disp) { - return (_glptr_BindProgramNV) (GET_by_offset(disp, _gloffset_BindProgramNV)); -} - -static inline void SET_BindProgramNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_BindProgramNV, fn); -} - -typedef void (GLAPIENTRYP _glptr_DeleteProgramsNV)(GLsizei, const GLuint *); -#define CALL_DeleteProgramsNV(disp, parameters) \ - (* GET_DeleteProgramsNV(disp)) parameters -static inline _glptr_DeleteProgramsNV GET_DeleteProgramsNV(struct _glapi_table *disp) { - return (_glptr_DeleteProgramsNV) (GET_by_offset(disp, _gloffset_DeleteProgramsNV)); -} - -static inline void SET_DeleteProgramsNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { - SET_by_offset(disp, _gloffset_DeleteProgramsNV, fn); -} - typedef void (GLAPIENTRYP _glptr_ExecuteProgramNV)(GLenum, GLuint, const GLfloat *); #define CALL_ExecuteProgramNV(disp, parameters) \ (* GET_ExecuteProgramNV(disp)) parameters @@ -10860,17 +6658,6 @@ static inline void SET_ExecuteProgramNV(struct _glapi_table *disp, void (GLAPIEN SET_by_offset(disp, _gloffset_ExecuteProgramNV, fn); } -typedef void (GLAPIENTRYP _glptr_GenProgramsNV)(GLsizei, GLuint *); -#define CALL_GenProgramsNV(disp, parameters) \ - (* GET_GenProgramsNV(disp)) parameters -static inline _glptr_GenProgramsNV GET_GenProgramsNV(struct _glapi_table *disp) { - return (_glptr_GenProgramsNV) (GET_by_offset(disp, _gloffset_GenProgramsNV)); -} - -static inline void SET_GenProgramsNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { - SET_by_offset(disp, _gloffset_GenProgramsNV, fn); -} - typedef void (GLAPIENTRYP _glptr_GetProgramParameterdvNV)(GLenum, GLuint, GLenum, GLdouble *); #define CALL_GetProgramParameterdvNV(disp, parameters) \ (* GET_GetProgramParameterdvNV(disp)) parameters @@ -10893,28 +6680,6 @@ static inline void SET_GetProgramParameterfvNV(struct _glapi_table *disp, void ( SET_by_offset(disp, _gloffset_GetProgramParameterfvNV, fn); } -typedef void (GLAPIENTRYP _glptr_GetProgramStringNV)(GLuint, GLenum, GLubyte *); -#define CALL_GetProgramStringNV(disp, parameters) \ - (* GET_GetProgramStringNV(disp)) parameters -static inline _glptr_GetProgramStringNV GET_GetProgramStringNV(struct _glapi_table *disp) { - return (_glptr_GetProgramStringNV) (GET_by_offset(disp, _gloffset_GetProgramStringNV)); -} - -static inline void SET_GetProgramStringNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLubyte *)) { - SET_by_offset(disp, _gloffset_GetProgramStringNV, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetProgramivNV)(GLuint, GLenum, GLint *); -#define CALL_GetProgramivNV(disp, parameters) \ - (* GET_GetProgramivNV(disp)) parameters -static inline _glptr_GetProgramivNV GET_GetProgramivNV(struct _glapi_table *disp) { - return (_glptr_GetProgramivNV) (GET_by_offset(disp, _gloffset_GetProgramivNV)); -} - -static inline void SET_GetProgramivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetProgramivNV, fn); -} - typedef void (GLAPIENTRYP _glptr_GetTrackMatrixivNV)(GLenum, GLuint, GLenum, GLint *); #define CALL_GetTrackMatrixivNV(disp, parameters) \ (* GET_GetTrackMatrixivNV(disp)) parameters @@ -10926,61 +6691,6 @@ static inline void SET_GetTrackMatrixivNV(struct _glapi_table *disp, void (GLAPI SET_by_offset(disp, _gloffset_GetTrackMatrixivNV, fn); } -typedef void (GLAPIENTRYP _glptr_GetVertexAttribPointervNV)(GLuint, GLenum, GLvoid **); -#define CALL_GetVertexAttribPointervNV(disp, parameters) \ - (* GET_GetVertexAttribPointervNV(disp)) parameters -static inline _glptr_GetVertexAttribPointervNV GET_GetVertexAttribPointervNV(struct _glapi_table *disp) { - return (_glptr_GetVertexAttribPointervNV) (GET_by_offset(disp, _gloffset_GetVertexAttribPointervNV)); -} - -static inline void SET_GetVertexAttribPointervNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLvoid **)) { - SET_by_offset(disp, _gloffset_GetVertexAttribPointervNV, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetVertexAttribdvNV)(GLuint, GLenum, GLdouble *); -#define CALL_GetVertexAttribdvNV(disp, parameters) \ - (* GET_GetVertexAttribdvNV(disp)) parameters -static inline _glptr_GetVertexAttribdvNV GET_GetVertexAttribdvNV(struct _glapi_table *disp) { - return (_glptr_GetVertexAttribdvNV) (GET_by_offset(disp, _gloffset_GetVertexAttribdvNV)); -} - -static inline void SET_GetVertexAttribdvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLdouble *)) { - SET_by_offset(disp, _gloffset_GetVertexAttribdvNV, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetVertexAttribfvNV)(GLuint, GLenum, GLfloat *); -#define CALL_GetVertexAttribfvNV(disp, parameters) \ - (* GET_GetVertexAttribfvNV(disp)) parameters -static inline _glptr_GetVertexAttribfvNV GET_GetVertexAttribfvNV(struct _glapi_table *disp) { - return (_glptr_GetVertexAttribfvNV) (GET_by_offset(disp, _gloffset_GetVertexAttribfvNV)); -} - -static inline void SET_GetVertexAttribfvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetVertexAttribfvNV, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetVertexAttribivNV)(GLuint, GLenum, GLint *); -#define CALL_GetVertexAttribivNV(disp, parameters) \ - (* GET_GetVertexAttribivNV(disp)) parameters -static inline _glptr_GetVertexAttribivNV GET_GetVertexAttribivNV(struct _glapi_table *disp) { - return (_glptr_GetVertexAttribivNV) (GET_by_offset(disp, _gloffset_GetVertexAttribivNV)); -} - -static inline void SET_GetVertexAttribivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetVertexAttribivNV, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsProgramNV)(GLuint); -#define CALL_IsProgramNV(disp, parameters) \ - (* GET_IsProgramNV(disp)) parameters -static inline _glptr_IsProgramNV GET_IsProgramNV(struct _glapi_table *disp) { - return (_glptr_IsProgramNV) (GET_by_offset(disp, _gloffset_IsProgramNV)); -} - -static inline void SET_IsProgramNV(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_IsProgramNV, fn); -} - typedef void (GLAPIENTRYP _glptr_LoadProgramNV)(GLenum, GLuint, GLsizei, const GLubyte *); #define CALL_LoadProgramNV(disp, parameters) \ (* GET_LoadProgramNV(disp)) parameters @@ -11322,17 +7032,6 @@ static inline void SET_VertexAttrib4ubvNV(struct _glapi_table *disp, void (GLAPI SET_by_offset(disp, _gloffset_VertexAttrib4ubvNV, fn); } -typedef void (GLAPIENTRYP _glptr_VertexAttribPointerNV)(GLuint, GLint, GLenum, GLsizei, const GLvoid *); -#define CALL_VertexAttribPointerNV(disp, parameters) \ - (* GET_VertexAttribPointerNV(disp)) parameters -static inline _glptr_VertexAttribPointerNV GET_VertexAttribPointerNV(struct _glapi_table *disp) { - return (_glptr_VertexAttribPointerNV) (GET_by_offset(disp, _gloffset_VertexAttribPointerNV)); -} - -static inline void SET_VertexAttribPointerNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLenum, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_VertexAttribPointerNV, fn); -} - typedef void (GLAPIENTRYP _glptr_VertexAttribs1dvNV)(GLuint, GLsizei, const GLdouble *); #define CALL_VertexAttribs1dvNV(disp, parameters) \ (* GET_VertexAttribs1dvNV(disp)) parameters @@ -11476,204 +7175,6 @@ static inline void SET_VertexAttribs4ubvNV(struct _glapi_table *disp, void (GLAP SET_by_offset(disp, _gloffset_VertexAttribs4ubvNV, fn); } -typedef void (GLAPIENTRYP _glptr_GetTexBumpParameterfvATI)(GLenum, GLfloat *); -#define CALL_GetTexBumpParameterfvATI(disp, parameters) \ - (* GET_GetTexBumpParameterfvATI(disp)) parameters -static inline _glptr_GetTexBumpParameterfvATI GET_GetTexBumpParameterfvATI(struct _glapi_table *disp) { - return (_glptr_GetTexBumpParameterfvATI) (GET_by_offset(disp, _gloffset_GetTexBumpParameterfvATI)); -} - -static inline void SET_GetTexBumpParameterfvATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat *)) { - SET_by_offset(disp, _gloffset_GetTexBumpParameterfvATI, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetTexBumpParameterivATI)(GLenum, GLint *); -#define CALL_GetTexBumpParameterivATI(disp, parameters) \ - (* GET_GetTexBumpParameterivATI(disp)) parameters -static inline _glptr_GetTexBumpParameterivATI GET_GetTexBumpParameterivATI(struct _glapi_table *disp) { - return (_glptr_GetTexBumpParameterivATI) (GET_by_offset(disp, _gloffset_GetTexBumpParameterivATI)); -} - -static inline void SET_GetTexBumpParameterivATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetTexBumpParameterivATI, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexBumpParameterfvATI)(GLenum, const GLfloat *); -#define CALL_TexBumpParameterfvATI(disp, parameters) \ - (* GET_TexBumpParameterfvATI(disp)) parameters -static inline _glptr_TexBumpParameterfvATI GET_TexBumpParameterfvATI(struct _glapi_table *disp) { - return (_glptr_TexBumpParameterfvATI) (GET_by_offset(disp, _gloffset_TexBumpParameterfvATI)); -} - -static inline void SET_TexBumpParameterfvATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { - SET_by_offset(disp, _gloffset_TexBumpParameterfvATI, fn); -} - -typedef void (GLAPIENTRYP _glptr_TexBumpParameterivATI)(GLenum, const GLint *); -#define CALL_TexBumpParameterivATI(disp, parameters) \ - (* GET_TexBumpParameterivATI(disp)) parameters -static inline _glptr_TexBumpParameterivATI GET_TexBumpParameterivATI(struct _glapi_table *disp) { - return (_glptr_TexBumpParameterivATI) (GET_by_offset(disp, _gloffset_TexBumpParameterivATI)); -} - -static inline void SET_TexBumpParameterivATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { - SET_by_offset(disp, _gloffset_TexBumpParameterivATI, fn); -} - -typedef void (GLAPIENTRYP _glptr_AlphaFragmentOp1ATI)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint); -#define CALL_AlphaFragmentOp1ATI(disp, parameters) \ - (* GET_AlphaFragmentOp1ATI(disp)) parameters -static inline _glptr_AlphaFragmentOp1ATI GET_AlphaFragmentOp1ATI(struct _glapi_table *disp) { - return (_glptr_AlphaFragmentOp1ATI) (GET_by_offset(disp, _gloffset_AlphaFragmentOp1ATI)); -} - -static inline void SET_AlphaFragmentOp1ATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_AlphaFragmentOp1ATI, fn); -} - -typedef void (GLAPIENTRYP _glptr_AlphaFragmentOp2ATI)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); -#define CALL_AlphaFragmentOp2ATI(disp, parameters) \ - (* GET_AlphaFragmentOp2ATI(disp)) parameters -static inline _glptr_AlphaFragmentOp2ATI GET_AlphaFragmentOp2ATI(struct _glapi_table *disp) { - return (_glptr_AlphaFragmentOp2ATI) (GET_by_offset(disp, _gloffset_AlphaFragmentOp2ATI)); -} - -static inline void SET_AlphaFragmentOp2ATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_AlphaFragmentOp2ATI, fn); -} - -typedef void (GLAPIENTRYP _glptr_AlphaFragmentOp3ATI)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); -#define CALL_AlphaFragmentOp3ATI(disp, parameters) \ - (* GET_AlphaFragmentOp3ATI(disp)) parameters -static inline _glptr_AlphaFragmentOp3ATI GET_AlphaFragmentOp3ATI(struct _glapi_table *disp) { - return (_glptr_AlphaFragmentOp3ATI) (GET_by_offset(disp, _gloffset_AlphaFragmentOp3ATI)); -} - -static inline void SET_AlphaFragmentOp3ATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_AlphaFragmentOp3ATI, fn); -} - -typedef void (GLAPIENTRYP _glptr_BeginFragmentShaderATI)(void); -#define CALL_BeginFragmentShaderATI(disp, parameters) \ - (* GET_BeginFragmentShaderATI(disp)) parameters -static inline _glptr_BeginFragmentShaderATI GET_BeginFragmentShaderATI(struct _glapi_table *disp) { - return (_glptr_BeginFragmentShaderATI) (GET_by_offset(disp, _gloffset_BeginFragmentShaderATI)); -} - -static inline void SET_BeginFragmentShaderATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_BeginFragmentShaderATI, fn); -} - -typedef void (GLAPIENTRYP _glptr_BindFragmentShaderATI)(GLuint); -#define CALL_BindFragmentShaderATI(disp, parameters) \ - (* GET_BindFragmentShaderATI(disp)) parameters -static inline _glptr_BindFragmentShaderATI GET_BindFragmentShaderATI(struct _glapi_table *disp) { - return (_glptr_BindFragmentShaderATI) (GET_by_offset(disp, _gloffset_BindFragmentShaderATI)); -} - -static inline void SET_BindFragmentShaderATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_BindFragmentShaderATI, fn); -} - -typedef void (GLAPIENTRYP _glptr_ColorFragmentOp1ATI)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); -#define CALL_ColorFragmentOp1ATI(disp, parameters) \ - (* GET_ColorFragmentOp1ATI(disp)) parameters -static inline _glptr_ColorFragmentOp1ATI GET_ColorFragmentOp1ATI(struct _glapi_table *disp) { - return (_glptr_ColorFragmentOp1ATI) (GET_by_offset(disp, _gloffset_ColorFragmentOp1ATI)); -} - -static inline void SET_ColorFragmentOp1ATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_ColorFragmentOp1ATI, fn); -} - -typedef void (GLAPIENTRYP _glptr_ColorFragmentOp2ATI)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); -#define CALL_ColorFragmentOp2ATI(disp, parameters) \ - (* GET_ColorFragmentOp2ATI(disp)) parameters -static inline _glptr_ColorFragmentOp2ATI GET_ColorFragmentOp2ATI(struct _glapi_table *disp) { - return (_glptr_ColorFragmentOp2ATI) (GET_by_offset(disp, _gloffset_ColorFragmentOp2ATI)); -} - -static inline void SET_ColorFragmentOp2ATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_ColorFragmentOp2ATI, fn); -} - -typedef void (GLAPIENTRYP _glptr_ColorFragmentOp3ATI)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); -#define CALL_ColorFragmentOp3ATI(disp, parameters) \ - (* GET_ColorFragmentOp3ATI(disp)) parameters -static inline _glptr_ColorFragmentOp3ATI GET_ColorFragmentOp3ATI(struct _glapi_table *disp) { - return (_glptr_ColorFragmentOp3ATI) (GET_by_offset(disp, _gloffset_ColorFragmentOp3ATI)); -} - -static inline void SET_ColorFragmentOp3ATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_ColorFragmentOp3ATI, fn); -} - -typedef void (GLAPIENTRYP _glptr_DeleteFragmentShaderATI)(GLuint); -#define CALL_DeleteFragmentShaderATI(disp, parameters) \ - (* GET_DeleteFragmentShaderATI(disp)) parameters -static inline _glptr_DeleteFragmentShaderATI GET_DeleteFragmentShaderATI(struct _glapi_table *disp) { - return (_glptr_DeleteFragmentShaderATI) (GET_by_offset(disp, _gloffset_DeleteFragmentShaderATI)); -} - -static inline void SET_DeleteFragmentShaderATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_DeleteFragmentShaderATI, fn); -} - -typedef void (GLAPIENTRYP _glptr_EndFragmentShaderATI)(void); -#define CALL_EndFragmentShaderATI(disp, parameters) \ - (* GET_EndFragmentShaderATI(disp)) parameters -static inline _glptr_EndFragmentShaderATI GET_EndFragmentShaderATI(struct _glapi_table *disp) { - return (_glptr_EndFragmentShaderATI) (GET_by_offset(disp, _gloffset_EndFragmentShaderATI)); -} - -static inline void SET_EndFragmentShaderATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_EndFragmentShaderATI, fn); -} - -typedef GLuint (GLAPIENTRYP _glptr_GenFragmentShadersATI)(GLuint); -#define CALL_GenFragmentShadersATI(disp, parameters) \ - (* GET_GenFragmentShadersATI(disp)) parameters -static inline _glptr_GenFragmentShadersATI GET_GenFragmentShadersATI(struct _glapi_table *disp) { - return (_glptr_GenFragmentShadersATI) (GET_by_offset(disp, _gloffset_GenFragmentShadersATI)); -} - -static inline void SET_GenFragmentShadersATI(struct _glapi_table *disp, GLuint (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_GenFragmentShadersATI, fn); -} - -typedef void (GLAPIENTRYP _glptr_PassTexCoordATI)(GLuint, GLuint, GLenum); -#define CALL_PassTexCoordATI(disp, parameters) \ - (* GET_PassTexCoordATI(disp)) parameters -static inline _glptr_PassTexCoordATI GET_PassTexCoordATI(struct _glapi_table *disp) { - return (_glptr_PassTexCoordATI) (GET_by_offset(disp, _gloffset_PassTexCoordATI)); -} - -static inline void SET_PassTexCoordATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLenum)) { - SET_by_offset(disp, _gloffset_PassTexCoordATI, fn); -} - -typedef void (GLAPIENTRYP _glptr_SampleMapATI)(GLuint, GLuint, GLenum); -#define CALL_SampleMapATI(disp, parameters) \ - (* GET_SampleMapATI(disp)) parameters -static inline _glptr_SampleMapATI GET_SampleMapATI(struct _glapi_table *disp) { - return (_glptr_SampleMapATI) (GET_by_offset(disp, _gloffset_SampleMapATI)); -} - -static inline void SET_SampleMapATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLenum)) { - SET_by_offset(disp, _gloffset_SampleMapATI, fn); -} - -typedef void (GLAPIENTRYP _glptr_SetFragmentShaderConstantATI)(GLuint, const GLfloat *); -#define CALL_SetFragmentShaderConstantATI(disp, parameters) \ - (* GET_SetFragmentShaderConstantATI(disp)) parameters -static inline _glptr_SetFragmentShaderConstantATI GET_SetFragmentShaderConstantATI(struct _glapi_table *disp) { - return (_glptr_SetFragmentShaderConstantATI) (GET_by_offset(disp, _gloffset_SetFragmentShaderConstantATI)); -} - -static inline void SET_SetFragmentShaderConstantATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { - SET_by_offset(disp, _gloffset_SetFragmentShaderConstantATI, fn); -} - typedef void (GLAPIENTRYP _glptr_PointParameteriNV)(GLenum, GLint); #define CALL_PointParameteriNV(disp, parameters) \ (* GET_PointParameteriNV(disp)) parameters @@ -11817,28 +7318,6 @@ static inline void SET_ProgramNamedParameter4fvNV(struct _glapi_table *disp, voi SET_by_offset(disp, _gloffset_ProgramNamedParameter4fvNV, fn); } -typedef void (GLAPIENTRYP _glptr_PrimitiveRestartIndexNV)(GLuint); -#define CALL_PrimitiveRestartIndexNV(disp, parameters) \ - (* GET_PrimitiveRestartIndexNV(disp)) parameters -static inline _glptr_PrimitiveRestartIndexNV GET_PrimitiveRestartIndexNV(struct _glapi_table *disp) { - return (_glptr_PrimitiveRestartIndexNV) (GET_by_offset(disp, _gloffset_PrimitiveRestartIndexNV)); -} - -static inline void SET_PrimitiveRestartIndexNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_PrimitiveRestartIndexNV, fn); -} - -typedef void (GLAPIENTRYP _glptr_PrimitiveRestartNV)(void); -#define CALL_PrimitiveRestartNV(disp, parameters) \ - (* GET_PrimitiveRestartNV(disp)) parameters -static inline _glptr_PrimitiveRestartNV GET_PrimitiveRestartNV(struct _glapi_table *disp) { - return (_glptr_PrimitiveRestartNV) (GET_by_offset(disp, _gloffset_PrimitiveRestartNV)); -} - -static inline void SET_PrimitiveRestartNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_PrimitiveRestartNV, fn); -} - typedef void (GLAPIENTRYP _glptr_DepthBoundsEXT)(GLclampd, GLclampd); #define CALL_DepthBoundsEXT(disp, parameters) \ (* GET_DepthBoundsEXT(disp)) parameters @@ -11861,204 +7340,6 @@ static inline void SET_BlendEquationSeparateEXT(struct _glapi_table *disp, void SET_by_offset(disp, _gloffset_BlendEquationSeparateEXT, fn); } -typedef void (GLAPIENTRYP _glptr_BindFramebufferEXT)(GLenum, GLuint); -#define CALL_BindFramebufferEXT(disp, parameters) \ - (* GET_BindFramebufferEXT(disp)) parameters -static inline _glptr_BindFramebufferEXT GET_BindFramebufferEXT(struct _glapi_table *disp) { - return (_glptr_BindFramebufferEXT) (GET_by_offset(disp, _gloffset_BindFramebufferEXT)); -} - -static inline void SET_BindFramebufferEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_BindFramebufferEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_BindRenderbufferEXT)(GLenum, GLuint); -#define CALL_BindRenderbufferEXT(disp, parameters) \ - (* GET_BindRenderbufferEXT(disp)) parameters -static inline _glptr_BindRenderbufferEXT GET_BindRenderbufferEXT(struct _glapi_table *disp) { - return (_glptr_BindRenderbufferEXT) (GET_by_offset(disp, _gloffset_BindRenderbufferEXT)); -} - -static inline void SET_BindRenderbufferEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_BindRenderbufferEXT, fn); -} - -typedef GLenum (GLAPIENTRYP _glptr_CheckFramebufferStatusEXT)(GLenum); -#define CALL_CheckFramebufferStatusEXT(disp, parameters) \ - (* GET_CheckFramebufferStatusEXT(disp)) parameters -static inline _glptr_CheckFramebufferStatusEXT GET_CheckFramebufferStatusEXT(struct _glapi_table *disp) { - return (_glptr_CheckFramebufferStatusEXT) (GET_by_offset(disp, _gloffset_CheckFramebufferStatusEXT)); -} - -static inline void SET_CheckFramebufferStatusEXT(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_CheckFramebufferStatusEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_DeleteFramebuffersEXT)(GLsizei, const GLuint *); -#define CALL_DeleteFramebuffersEXT(disp, parameters) \ - (* GET_DeleteFramebuffersEXT(disp)) parameters -static inline _glptr_DeleteFramebuffersEXT GET_DeleteFramebuffersEXT(struct _glapi_table *disp) { - return (_glptr_DeleteFramebuffersEXT) (GET_by_offset(disp, _gloffset_DeleteFramebuffersEXT)); -} - -static inline void SET_DeleteFramebuffersEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { - SET_by_offset(disp, _gloffset_DeleteFramebuffersEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_DeleteRenderbuffersEXT)(GLsizei, const GLuint *); -#define CALL_DeleteRenderbuffersEXT(disp, parameters) \ - (* GET_DeleteRenderbuffersEXT(disp)) parameters -static inline _glptr_DeleteRenderbuffersEXT GET_DeleteRenderbuffersEXT(struct _glapi_table *disp) { - return (_glptr_DeleteRenderbuffersEXT) (GET_by_offset(disp, _gloffset_DeleteRenderbuffersEXT)); -} - -static inline void SET_DeleteRenderbuffersEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { - SET_by_offset(disp, _gloffset_DeleteRenderbuffersEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_FramebufferRenderbufferEXT)(GLenum, GLenum, GLenum, GLuint); -#define CALL_FramebufferRenderbufferEXT(disp, parameters) \ - (* GET_FramebufferRenderbufferEXT(disp)) parameters -static inline _glptr_FramebufferRenderbufferEXT GET_FramebufferRenderbufferEXT(struct _glapi_table *disp) { - return (_glptr_FramebufferRenderbufferEXT) (GET_by_offset(disp, _gloffset_FramebufferRenderbufferEXT)); -} - -static inline void SET_FramebufferRenderbufferEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_FramebufferRenderbufferEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_FramebufferTexture1DEXT)(GLenum, GLenum, GLenum, GLuint, GLint); -#define CALL_FramebufferTexture1DEXT(disp, parameters) \ - (* GET_FramebufferTexture1DEXT(disp)) parameters -static inline _glptr_FramebufferTexture1DEXT GET_FramebufferTexture1DEXT(struct _glapi_table *disp) { - return (_glptr_FramebufferTexture1DEXT) (GET_by_offset(disp, _gloffset_FramebufferTexture1DEXT)); -} - -static inline void SET_FramebufferTexture1DEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLuint, GLint)) { - SET_by_offset(disp, _gloffset_FramebufferTexture1DEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_FramebufferTexture2DEXT)(GLenum, GLenum, GLenum, GLuint, GLint); -#define CALL_FramebufferTexture2DEXT(disp, parameters) \ - (* GET_FramebufferTexture2DEXT(disp)) parameters -static inline _glptr_FramebufferTexture2DEXT GET_FramebufferTexture2DEXT(struct _glapi_table *disp) { - return (_glptr_FramebufferTexture2DEXT) (GET_by_offset(disp, _gloffset_FramebufferTexture2DEXT)); -} - -static inline void SET_FramebufferTexture2DEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLuint, GLint)) { - SET_by_offset(disp, _gloffset_FramebufferTexture2DEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_FramebufferTexture3DEXT)(GLenum, GLenum, GLenum, GLuint, GLint, GLint); -#define CALL_FramebufferTexture3DEXT(disp, parameters) \ - (* GET_FramebufferTexture3DEXT(disp)) parameters -static inline _glptr_FramebufferTexture3DEXT GET_FramebufferTexture3DEXT(struct _glapi_table *disp) { - return (_glptr_FramebufferTexture3DEXT) (GET_by_offset(disp, _gloffset_FramebufferTexture3DEXT)); -} - -static inline void SET_FramebufferTexture3DEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLuint, GLint, GLint)) { - SET_by_offset(disp, _gloffset_FramebufferTexture3DEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_GenFramebuffersEXT)(GLsizei, GLuint *); -#define CALL_GenFramebuffersEXT(disp, parameters) \ - (* GET_GenFramebuffersEXT(disp)) parameters -static inline _glptr_GenFramebuffersEXT GET_GenFramebuffersEXT(struct _glapi_table *disp) { - return (_glptr_GenFramebuffersEXT) (GET_by_offset(disp, _gloffset_GenFramebuffersEXT)); -} - -static inline void SET_GenFramebuffersEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { - SET_by_offset(disp, _gloffset_GenFramebuffersEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_GenRenderbuffersEXT)(GLsizei, GLuint *); -#define CALL_GenRenderbuffersEXT(disp, parameters) \ - (* GET_GenRenderbuffersEXT(disp)) parameters -static inline _glptr_GenRenderbuffersEXT GET_GenRenderbuffersEXT(struct _glapi_table *disp) { - return (_glptr_GenRenderbuffersEXT) (GET_by_offset(disp, _gloffset_GenRenderbuffersEXT)); -} - -static inline void SET_GenRenderbuffersEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { - SET_by_offset(disp, _gloffset_GenRenderbuffersEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_GenerateMipmapEXT)(GLenum); -#define CALL_GenerateMipmapEXT(disp, parameters) \ - (* GET_GenerateMipmapEXT(disp)) parameters -static inline _glptr_GenerateMipmapEXT GET_GenerateMipmapEXT(struct _glapi_table *disp) { - return (_glptr_GenerateMipmapEXT) (GET_by_offset(disp, _gloffset_GenerateMipmapEXT)); -} - -static inline void SET_GenerateMipmapEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_GenerateMipmapEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetFramebufferAttachmentParameterivEXT)(GLenum, GLenum, GLenum, GLint *); -#define CALL_GetFramebufferAttachmentParameterivEXT(disp, parameters) \ - (* GET_GetFramebufferAttachmentParameterivEXT(disp)) parameters -static inline _glptr_GetFramebufferAttachmentParameterivEXT GET_GetFramebufferAttachmentParameterivEXT(struct _glapi_table *disp) { - return (_glptr_GetFramebufferAttachmentParameterivEXT) (GET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameterivEXT)); -} - -static inline void SET_GetFramebufferAttachmentParameterivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameterivEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetRenderbufferParameterivEXT)(GLenum, GLenum, GLint *); -#define CALL_GetRenderbufferParameterivEXT(disp, parameters) \ - (* GET_GetRenderbufferParameterivEXT(disp)) parameters -static inline _glptr_GetRenderbufferParameterivEXT GET_GetRenderbufferParameterivEXT(struct _glapi_table *disp) { - return (_glptr_GetRenderbufferParameterivEXT) (GET_by_offset(disp, _gloffset_GetRenderbufferParameterivEXT)); -} - -static inline void SET_GetRenderbufferParameterivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetRenderbufferParameterivEXT, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsFramebufferEXT)(GLuint); -#define CALL_IsFramebufferEXT(disp, parameters) \ - (* GET_IsFramebufferEXT(disp)) parameters -static inline _glptr_IsFramebufferEXT GET_IsFramebufferEXT(struct _glapi_table *disp) { - return (_glptr_IsFramebufferEXT) (GET_by_offset(disp, _gloffset_IsFramebufferEXT)); -} - -static inline void SET_IsFramebufferEXT(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_IsFramebufferEXT, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsRenderbufferEXT)(GLuint); -#define CALL_IsRenderbufferEXT(disp, parameters) \ - (* GET_IsRenderbufferEXT(disp)) parameters -static inline _glptr_IsRenderbufferEXT GET_IsRenderbufferEXT(struct _glapi_table *disp) { - return (_glptr_IsRenderbufferEXT) (GET_by_offset(disp, _gloffset_IsRenderbufferEXT)); -} - -static inline void SET_IsRenderbufferEXT(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_IsRenderbufferEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_RenderbufferStorageEXT)(GLenum, GLenum, GLsizei, GLsizei); -#define CALL_RenderbufferStorageEXT(disp, parameters) \ - (* GET_RenderbufferStorageEXT(disp)) parameters -static inline _glptr_RenderbufferStorageEXT GET_RenderbufferStorageEXT(struct _glapi_table *disp) { - return (_glptr_RenderbufferStorageEXT) (GET_by_offset(disp, _gloffset_RenderbufferStorageEXT)); -} - -static inline void SET_RenderbufferStorageEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLsizei)) { - SET_by_offset(disp, _gloffset_RenderbufferStorageEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_BlitFramebufferEXT)(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum); -#define CALL_BlitFramebufferEXT(disp, parameters) \ - (* GET_BlitFramebufferEXT(disp)) parameters -static inline _glptr_BlitFramebufferEXT GET_BlitFramebufferEXT(struct _glapi_table *disp) { - return (_glptr_BlitFramebufferEXT) (GET_by_offset(disp, _gloffset_BlitFramebufferEXT)); -} - -static inline void SET_BlitFramebufferEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum)) { - SET_by_offset(disp, _gloffset_BlitFramebufferEXT, fn); -} - typedef void (GLAPIENTRYP _glptr_BufferParameteriAPPLE)(GLenum, GLenum, GLint); #define CALL_BufferParameteriAPPLE(disp, parameters) \ (* GET_BufferParameteriAPPLE(disp)) parameters @@ -12103,435 +7384,6 @@ static inline void SET_GetFragDataLocationEXT(struct _glapi_table *disp, GLint ( SET_by_offset(disp, _gloffset_GetFragDataLocationEXT, fn); } -typedef void (GLAPIENTRYP _glptr_GetUniformuivEXT)(GLuint, GLint, GLuint *); -#define CALL_GetUniformuivEXT(disp, parameters) \ - (* GET_GetUniformuivEXT(disp)) parameters -static inline _glptr_GetUniformuivEXT GET_GetUniformuivEXT(struct _glapi_table *disp) { - return (_glptr_GetUniformuivEXT) (GET_by_offset(disp, _gloffset_GetUniformuivEXT)); -} - -static inline void SET_GetUniformuivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLuint *)) { - SET_by_offset(disp, _gloffset_GetUniformuivEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetVertexAttribIivEXT)(GLuint, GLenum, GLint *); -#define CALL_GetVertexAttribIivEXT(disp, parameters) \ - (* GET_GetVertexAttribIivEXT(disp)) parameters -static inline _glptr_GetVertexAttribIivEXT GET_GetVertexAttribIivEXT(struct _glapi_table *disp) { - return (_glptr_GetVertexAttribIivEXT) (GET_by_offset(disp, _gloffset_GetVertexAttribIivEXT)); -} - -static inline void SET_GetVertexAttribIivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { - SET_by_offset(disp, _gloffset_GetVertexAttribIivEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetVertexAttribIuivEXT)(GLuint, GLenum, GLuint *); -#define CALL_GetVertexAttribIuivEXT(disp, parameters) \ - (* GET_GetVertexAttribIuivEXT(disp)) parameters -static inline _glptr_GetVertexAttribIuivEXT GET_GetVertexAttribIuivEXT(struct _glapi_table *disp) { - return (_glptr_GetVertexAttribIuivEXT) (GET_by_offset(disp, _gloffset_GetVertexAttribIuivEXT)); -} - -static inline void SET_GetVertexAttribIuivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLuint *)) { - SET_by_offset(disp, _gloffset_GetVertexAttribIuivEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform1uiEXT)(GLint, GLuint); -#define CALL_Uniform1uiEXT(disp, parameters) \ - (* GET_Uniform1uiEXT(disp)) parameters -static inline _glptr_Uniform1uiEXT GET_Uniform1uiEXT(struct _glapi_table *disp) { - return (_glptr_Uniform1uiEXT) (GET_by_offset(disp, _gloffset_Uniform1uiEXT)); -} - -static inline void SET_Uniform1uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLuint)) { - SET_by_offset(disp, _gloffset_Uniform1uiEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform1uivEXT)(GLint, GLsizei, const GLuint *); -#define CALL_Uniform1uivEXT(disp, parameters) \ - (* GET_Uniform1uivEXT(disp)) parameters -static inline _glptr_Uniform1uivEXT GET_Uniform1uivEXT(struct _glapi_table *disp) { - return (_glptr_Uniform1uivEXT) (GET_by_offset(disp, _gloffset_Uniform1uivEXT)); -} - -static inline void SET_Uniform1uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLuint *)) { - SET_by_offset(disp, _gloffset_Uniform1uivEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform2uiEXT)(GLint, GLuint, GLuint); -#define CALL_Uniform2uiEXT(disp, parameters) \ - (* GET_Uniform2uiEXT(disp)) parameters -static inline _glptr_Uniform2uiEXT GET_Uniform2uiEXT(struct _glapi_table *disp) { - return (_glptr_Uniform2uiEXT) (GET_by_offset(disp, _gloffset_Uniform2uiEXT)); -} - -static inline void SET_Uniform2uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_Uniform2uiEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform2uivEXT)(GLint, GLsizei, const GLuint *); -#define CALL_Uniform2uivEXT(disp, parameters) \ - (* GET_Uniform2uivEXT(disp)) parameters -static inline _glptr_Uniform2uivEXT GET_Uniform2uivEXT(struct _glapi_table *disp) { - return (_glptr_Uniform2uivEXT) (GET_by_offset(disp, _gloffset_Uniform2uivEXT)); -} - -static inline void SET_Uniform2uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLuint *)) { - SET_by_offset(disp, _gloffset_Uniform2uivEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform3uiEXT)(GLint, GLuint, GLuint, GLuint); -#define CALL_Uniform3uiEXT(disp, parameters) \ - (* GET_Uniform3uiEXT(disp)) parameters -static inline _glptr_Uniform3uiEXT GET_Uniform3uiEXT(struct _glapi_table *disp) { - return (_glptr_Uniform3uiEXT) (GET_by_offset(disp, _gloffset_Uniform3uiEXT)); -} - -static inline void SET_Uniform3uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLuint, GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_Uniform3uiEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform3uivEXT)(GLint, GLsizei, const GLuint *); -#define CALL_Uniform3uivEXT(disp, parameters) \ - (* GET_Uniform3uivEXT(disp)) parameters -static inline _glptr_Uniform3uivEXT GET_Uniform3uivEXT(struct _glapi_table *disp) { - return (_glptr_Uniform3uivEXT) (GET_by_offset(disp, _gloffset_Uniform3uivEXT)); -} - -static inline void SET_Uniform3uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLuint *)) { - SET_by_offset(disp, _gloffset_Uniform3uivEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform4uiEXT)(GLint, GLuint, GLuint, GLuint, GLuint); -#define CALL_Uniform4uiEXT(disp, parameters) \ - (* GET_Uniform4uiEXT(disp)) parameters -static inline _glptr_Uniform4uiEXT GET_Uniform4uiEXT(struct _glapi_table *disp) { - return (_glptr_Uniform4uiEXT) (GET_by_offset(disp, _gloffset_Uniform4uiEXT)); -} - -static inline void SET_Uniform4uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLuint, GLuint, GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_Uniform4uiEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_Uniform4uivEXT)(GLint, GLsizei, const GLuint *); -#define CALL_Uniform4uivEXT(disp, parameters) \ - (* GET_Uniform4uivEXT(disp)) parameters -static inline _glptr_Uniform4uivEXT GET_Uniform4uivEXT(struct _glapi_table *disp) { - return (_glptr_Uniform4uivEXT) (GET_by_offset(disp, _gloffset_Uniform4uivEXT)); -} - -static inline void SET_Uniform4uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLuint *)) { - SET_by_offset(disp, _gloffset_Uniform4uivEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribI1iEXT)(GLuint, GLint); -#define CALL_VertexAttribI1iEXT(disp, parameters) \ - (* GET_VertexAttribI1iEXT(disp)) parameters -static inline _glptr_VertexAttribI1iEXT GET_VertexAttribI1iEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribI1iEXT) (GET_by_offset(disp, _gloffset_VertexAttribI1iEXT)); -} - -static inline void SET_VertexAttribI1iEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint)) { - SET_by_offset(disp, _gloffset_VertexAttribI1iEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribI1ivEXT)(GLuint, const GLint *); -#define CALL_VertexAttribI1ivEXT(disp, parameters) \ - (* GET_VertexAttribI1ivEXT(disp)) parameters -static inline _glptr_VertexAttribI1ivEXT GET_VertexAttribI1ivEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribI1ivEXT) (GET_by_offset(disp, _gloffset_VertexAttribI1ivEXT)); -} - -static inline void SET_VertexAttribI1ivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLint *)) { - SET_by_offset(disp, _gloffset_VertexAttribI1ivEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribI1uiEXT)(GLuint, GLuint); -#define CALL_VertexAttribI1uiEXT(disp, parameters) \ - (* GET_VertexAttribI1uiEXT(disp)) parameters -static inline _glptr_VertexAttribI1uiEXT GET_VertexAttribI1uiEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribI1uiEXT) (GET_by_offset(disp, _gloffset_VertexAttribI1uiEXT)); -} - -static inline void SET_VertexAttribI1uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_VertexAttribI1uiEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribI1uivEXT)(GLuint, const GLuint *); -#define CALL_VertexAttribI1uivEXT(disp, parameters) \ - (* GET_VertexAttribI1uivEXT(disp)) parameters -static inline _glptr_VertexAttribI1uivEXT GET_VertexAttribI1uivEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribI1uivEXT) (GET_by_offset(disp, _gloffset_VertexAttribI1uivEXT)); -} - -static inline void SET_VertexAttribI1uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLuint *)) { - SET_by_offset(disp, _gloffset_VertexAttribI1uivEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribI2iEXT)(GLuint, GLint, GLint); -#define CALL_VertexAttribI2iEXT(disp, parameters) \ - (* GET_VertexAttribI2iEXT(disp)) parameters -static inline _glptr_VertexAttribI2iEXT GET_VertexAttribI2iEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribI2iEXT) (GET_by_offset(disp, _gloffset_VertexAttribI2iEXT)); -} - -static inline void SET_VertexAttribI2iEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLint)) { - SET_by_offset(disp, _gloffset_VertexAttribI2iEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribI2ivEXT)(GLuint, const GLint *); -#define CALL_VertexAttribI2ivEXT(disp, parameters) \ - (* GET_VertexAttribI2ivEXT(disp)) parameters -static inline _glptr_VertexAttribI2ivEXT GET_VertexAttribI2ivEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribI2ivEXT) (GET_by_offset(disp, _gloffset_VertexAttribI2ivEXT)); -} - -static inline void SET_VertexAttribI2ivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLint *)) { - SET_by_offset(disp, _gloffset_VertexAttribI2ivEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribI2uiEXT)(GLuint, GLuint, GLuint); -#define CALL_VertexAttribI2uiEXT(disp, parameters) \ - (* GET_VertexAttribI2uiEXT(disp)) parameters -static inline _glptr_VertexAttribI2uiEXT GET_VertexAttribI2uiEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribI2uiEXT) (GET_by_offset(disp, _gloffset_VertexAttribI2uiEXT)); -} - -static inline void SET_VertexAttribI2uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_VertexAttribI2uiEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribI2uivEXT)(GLuint, const GLuint *); -#define CALL_VertexAttribI2uivEXT(disp, parameters) \ - (* GET_VertexAttribI2uivEXT(disp)) parameters -static inline _glptr_VertexAttribI2uivEXT GET_VertexAttribI2uivEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribI2uivEXT) (GET_by_offset(disp, _gloffset_VertexAttribI2uivEXT)); -} - -static inline void SET_VertexAttribI2uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLuint *)) { - SET_by_offset(disp, _gloffset_VertexAttribI2uivEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribI3iEXT)(GLuint, GLint, GLint, GLint); -#define CALL_VertexAttribI3iEXT(disp, parameters) \ - (* GET_VertexAttribI3iEXT(disp)) parameters -static inline _glptr_VertexAttribI3iEXT GET_VertexAttribI3iEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribI3iEXT) (GET_by_offset(disp, _gloffset_VertexAttribI3iEXT)); -} - -static inline void SET_VertexAttribI3iEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLint, GLint)) { - SET_by_offset(disp, _gloffset_VertexAttribI3iEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribI3ivEXT)(GLuint, const GLint *); -#define CALL_VertexAttribI3ivEXT(disp, parameters) \ - (* GET_VertexAttribI3ivEXT(disp)) parameters -static inline _glptr_VertexAttribI3ivEXT GET_VertexAttribI3ivEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribI3ivEXT) (GET_by_offset(disp, _gloffset_VertexAttribI3ivEXT)); -} - -static inline void SET_VertexAttribI3ivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLint *)) { - SET_by_offset(disp, _gloffset_VertexAttribI3ivEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribI3uiEXT)(GLuint, GLuint, GLuint, GLuint); -#define CALL_VertexAttribI3uiEXT(disp, parameters) \ - (* GET_VertexAttribI3uiEXT(disp)) parameters -static inline _glptr_VertexAttribI3uiEXT GET_VertexAttribI3uiEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribI3uiEXT) (GET_by_offset(disp, _gloffset_VertexAttribI3uiEXT)); -} - -static inline void SET_VertexAttribI3uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_VertexAttribI3uiEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribI3uivEXT)(GLuint, const GLuint *); -#define CALL_VertexAttribI3uivEXT(disp, parameters) \ - (* GET_VertexAttribI3uivEXT(disp)) parameters -static inline _glptr_VertexAttribI3uivEXT GET_VertexAttribI3uivEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribI3uivEXT) (GET_by_offset(disp, _gloffset_VertexAttribI3uivEXT)); -} - -static inline void SET_VertexAttribI3uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLuint *)) { - SET_by_offset(disp, _gloffset_VertexAttribI3uivEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribI4bvEXT)(GLuint, const GLbyte *); -#define CALL_VertexAttribI4bvEXT(disp, parameters) \ - (* GET_VertexAttribI4bvEXT(disp)) parameters -static inline _glptr_VertexAttribI4bvEXT GET_VertexAttribI4bvEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribI4bvEXT) (GET_by_offset(disp, _gloffset_VertexAttribI4bvEXT)); -} - -static inline void SET_VertexAttribI4bvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLbyte *)) { - SET_by_offset(disp, _gloffset_VertexAttribI4bvEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribI4iEXT)(GLuint, GLint, GLint, GLint, GLint); -#define CALL_VertexAttribI4iEXT(disp, parameters) \ - (* GET_VertexAttribI4iEXT(disp)) parameters -static inline _glptr_VertexAttribI4iEXT GET_VertexAttribI4iEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribI4iEXT) (GET_by_offset(disp, _gloffset_VertexAttribI4iEXT)); -} - -static inline void SET_VertexAttribI4iEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLint, GLint, GLint)) { - SET_by_offset(disp, _gloffset_VertexAttribI4iEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribI4ivEXT)(GLuint, const GLint *); -#define CALL_VertexAttribI4ivEXT(disp, parameters) \ - (* GET_VertexAttribI4ivEXT(disp)) parameters -static inline _glptr_VertexAttribI4ivEXT GET_VertexAttribI4ivEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribI4ivEXT) (GET_by_offset(disp, _gloffset_VertexAttribI4ivEXT)); -} - -static inline void SET_VertexAttribI4ivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLint *)) { - SET_by_offset(disp, _gloffset_VertexAttribI4ivEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribI4svEXT)(GLuint, const GLshort *); -#define CALL_VertexAttribI4svEXT(disp, parameters) \ - (* GET_VertexAttribI4svEXT(disp)) parameters -static inline _glptr_VertexAttribI4svEXT GET_VertexAttribI4svEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribI4svEXT) (GET_by_offset(disp, _gloffset_VertexAttribI4svEXT)); -} - -static inline void SET_VertexAttribI4svEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { - SET_by_offset(disp, _gloffset_VertexAttribI4svEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribI4ubvEXT)(GLuint, const GLubyte *); -#define CALL_VertexAttribI4ubvEXT(disp, parameters) \ - (* GET_VertexAttribI4ubvEXT(disp)) parameters -static inline _glptr_VertexAttribI4ubvEXT GET_VertexAttribI4ubvEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribI4ubvEXT) (GET_by_offset(disp, _gloffset_VertexAttribI4ubvEXT)); -} - -static inline void SET_VertexAttribI4ubvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLubyte *)) { - SET_by_offset(disp, _gloffset_VertexAttribI4ubvEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribI4uiEXT)(GLuint, GLuint, GLuint, GLuint, GLuint); -#define CALL_VertexAttribI4uiEXT(disp, parameters) \ - (* GET_VertexAttribI4uiEXT(disp)) parameters -static inline _glptr_VertexAttribI4uiEXT GET_VertexAttribI4uiEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribI4uiEXT) (GET_by_offset(disp, _gloffset_VertexAttribI4uiEXT)); -} - -static inline void SET_VertexAttribI4uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLuint, GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_VertexAttribI4uiEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribI4uivEXT)(GLuint, const GLuint *); -#define CALL_VertexAttribI4uivEXT(disp, parameters) \ - (* GET_VertexAttribI4uivEXT(disp)) parameters -static inline _glptr_VertexAttribI4uivEXT GET_VertexAttribI4uivEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribI4uivEXT) (GET_by_offset(disp, _gloffset_VertexAttribI4uivEXT)); -} - -static inline void SET_VertexAttribI4uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLuint *)) { - SET_by_offset(disp, _gloffset_VertexAttribI4uivEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribI4usvEXT)(GLuint, const GLushort *); -#define CALL_VertexAttribI4usvEXT(disp, parameters) \ - (* GET_VertexAttribI4usvEXT(disp)) parameters -static inline _glptr_VertexAttribI4usvEXT GET_VertexAttribI4usvEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribI4usvEXT) (GET_by_offset(disp, _gloffset_VertexAttribI4usvEXT)); -} - -static inline void SET_VertexAttribI4usvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLushort *)) { - SET_by_offset(disp, _gloffset_VertexAttribI4usvEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_VertexAttribIPointerEXT)(GLuint, GLint, GLenum, GLsizei, const GLvoid *); -#define CALL_VertexAttribIPointerEXT(disp, parameters) \ - (* GET_VertexAttribIPointerEXT(disp)) parameters -static inline _glptr_VertexAttribIPointerEXT GET_VertexAttribIPointerEXT(struct _glapi_table *disp) { - return (_glptr_VertexAttribIPointerEXT) (GET_by_offset(disp, _gloffset_VertexAttribIPointerEXT)); -} - -static inline void SET_VertexAttribIPointerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLenum, GLsizei, const GLvoid *)) { - SET_by_offset(disp, _gloffset_VertexAttribIPointerEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_FramebufferTextureLayerEXT)(GLenum, GLenum, GLuint, GLint, GLint); -#define CALL_FramebufferTextureLayerEXT(disp, parameters) \ - (* GET_FramebufferTextureLayerEXT(disp)) parameters -static inline _glptr_FramebufferTextureLayerEXT GET_FramebufferTextureLayerEXT(struct _glapi_table *disp) { - return (_glptr_FramebufferTextureLayerEXT) (GET_by_offset(disp, _gloffset_FramebufferTextureLayerEXT)); -} - -static inline void SET_FramebufferTextureLayerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint, GLint, GLint)) { - SET_by_offset(disp, _gloffset_FramebufferTextureLayerEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_ColorMaskIndexedEXT)(GLuint, GLboolean, GLboolean, GLboolean, GLboolean); -#define CALL_ColorMaskIndexedEXT(disp, parameters) \ - (* GET_ColorMaskIndexedEXT(disp)) parameters -static inline _glptr_ColorMaskIndexedEXT GET_ColorMaskIndexedEXT(struct _glapi_table *disp) { - return (_glptr_ColorMaskIndexedEXT) (GET_by_offset(disp, _gloffset_ColorMaskIndexedEXT)); -} - -static inline void SET_ColorMaskIndexedEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLboolean, GLboolean, GLboolean, GLboolean)) { - SET_by_offset(disp, _gloffset_ColorMaskIndexedEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_DisableIndexedEXT)(GLenum, GLuint); -#define CALL_DisableIndexedEXT(disp, parameters) \ - (* GET_DisableIndexedEXT(disp)) parameters -static inline _glptr_DisableIndexedEXT GET_DisableIndexedEXT(struct _glapi_table *disp) { - return (_glptr_DisableIndexedEXT) (GET_by_offset(disp, _gloffset_DisableIndexedEXT)); -} - -static inline void SET_DisableIndexedEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_DisableIndexedEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_EnableIndexedEXT)(GLenum, GLuint); -#define CALL_EnableIndexedEXT(disp, parameters) \ - (* GET_EnableIndexedEXT(disp)) parameters -static inline _glptr_EnableIndexedEXT GET_EnableIndexedEXT(struct _glapi_table *disp) { - return (_glptr_EnableIndexedEXT) (GET_by_offset(disp, _gloffset_EnableIndexedEXT)); -} - -static inline void SET_EnableIndexedEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_EnableIndexedEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetBooleanIndexedvEXT)(GLenum, GLuint, GLboolean *); -#define CALL_GetBooleanIndexedvEXT(disp, parameters) \ - (* GET_GetBooleanIndexedvEXT(disp)) parameters -static inline _glptr_GetBooleanIndexedvEXT GET_GetBooleanIndexedvEXT(struct _glapi_table *disp) { - return (_glptr_GetBooleanIndexedvEXT) (GET_by_offset(disp, _gloffset_GetBooleanIndexedvEXT)); -} - -static inline void SET_GetBooleanIndexedvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLboolean *)) { - SET_by_offset(disp, _gloffset_GetBooleanIndexedvEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetIntegerIndexedvEXT)(GLenum, GLuint, GLint *); -#define CALL_GetIntegerIndexedvEXT(disp, parameters) \ - (* GET_GetIntegerIndexedvEXT(disp)) parameters -static inline _glptr_GetIntegerIndexedvEXT GET_GetIntegerIndexedvEXT(struct _glapi_table *disp) { - return (_glptr_GetIntegerIndexedvEXT) (GET_by_offset(disp, _gloffset_GetIntegerIndexedvEXT)); -} - -static inline void SET_GetIntegerIndexedvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLint *)) { - SET_by_offset(disp, _gloffset_GetIntegerIndexedvEXT, fn); -} - -typedef GLboolean (GLAPIENTRYP _glptr_IsEnabledIndexedEXT)(GLenum, GLuint); -#define CALL_IsEnabledIndexedEXT(disp, parameters) \ - (* GET_IsEnabledIndexedEXT(disp)) parameters -static inline _glptr_IsEnabledIndexedEXT GET_IsEnabledIndexedEXT(struct _glapi_table *disp) { - return (_glptr_IsEnabledIndexedEXT) (GET_by_offset(disp, _gloffset_IsEnabledIndexedEXT)); -} - -static inline void SET_IsEnabledIndexedEXT(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_IsEnabledIndexedEXT, fn); -} - typedef void (GLAPIENTRYP _glptr_ClearColorIiEXT)(GLint, GLint, GLint, GLint); #define CALL_ClearColorIiEXT(disp, parameters) \ (* GET_ClearColorIiEXT(disp)) parameters @@ -12598,116 +7450,6 @@ static inline void SET_TexParameterIuivEXT(struct _glapi_table *disp, void (GLAP SET_by_offset(disp, _gloffset_TexParameterIuivEXT, fn); } -typedef void (GLAPIENTRYP _glptr_BeginConditionalRenderNV)(GLuint, GLenum); -#define CALL_BeginConditionalRenderNV(disp, parameters) \ - (* GET_BeginConditionalRenderNV(disp)) parameters -static inline _glptr_BeginConditionalRenderNV GET_BeginConditionalRenderNV(struct _glapi_table *disp) { - return (_glptr_BeginConditionalRenderNV) (GET_by_offset(disp, _gloffset_BeginConditionalRenderNV)); -} - -static inline void SET_BeginConditionalRenderNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum)) { - SET_by_offset(disp, _gloffset_BeginConditionalRenderNV, fn); -} - -typedef void (GLAPIENTRYP _glptr_EndConditionalRenderNV)(void); -#define CALL_EndConditionalRenderNV(disp, parameters) \ - (* GET_EndConditionalRenderNV(disp)) parameters -static inline _glptr_EndConditionalRenderNV GET_EndConditionalRenderNV(struct _glapi_table *disp) { - return (_glptr_EndConditionalRenderNV) (GET_by_offset(disp, _gloffset_EndConditionalRenderNV)); -} - -static inline void SET_EndConditionalRenderNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_EndConditionalRenderNV, fn); -} - -typedef void (GLAPIENTRYP _glptr_BeginTransformFeedbackEXT)(GLenum); -#define CALL_BeginTransformFeedbackEXT(disp, parameters) \ - (* GET_BeginTransformFeedbackEXT(disp)) parameters -static inline _glptr_BeginTransformFeedbackEXT GET_BeginTransformFeedbackEXT(struct _glapi_table *disp) { - return (_glptr_BeginTransformFeedbackEXT) (GET_by_offset(disp, _gloffset_BeginTransformFeedbackEXT)); -} - -static inline void SET_BeginTransformFeedbackEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_BeginTransformFeedbackEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_BindBufferBaseEXT)(GLenum, GLuint, GLuint); -#define CALL_BindBufferBaseEXT(disp, parameters) \ - (* GET_BindBufferBaseEXT(disp)) parameters -static inline _glptr_BindBufferBaseEXT GET_BindBufferBaseEXT(struct _glapi_table *disp) { - return (_glptr_BindBufferBaseEXT) (GET_by_offset(disp, _gloffset_BindBufferBaseEXT)); -} - -static inline void SET_BindBufferBaseEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint)) { - SET_by_offset(disp, _gloffset_BindBufferBaseEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_BindBufferOffsetEXT)(GLenum, GLuint, GLuint, GLintptr); -#define CALL_BindBufferOffsetEXT(disp, parameters) \ - (* GET_BindBufferOffsetEXT(disp)) parameters -static inline _glptr_BindBufferOffsetEXT GET_BindBufferOffsetEXT(struct _glapi_table *disp) { - return (_glptr_BindBufferOffsetEXT) (GET_by_offset(disp, _gloffset_BindBufferOffsetEXT)); -} - -static inline void SET_BindBufferOffsetEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLintptr)) { - SET_by_offset(disp, _gloffset_BindBufferOffsetEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_BindBufferRangeEXT)(GLenum, GLuint, GLuint, GLintptr, GLsizeiptr); -#define CALL_BindBufferRangeEXT(disp, parameters) \ - (* GET_BindBufferRangeEXT(disp)) parameters -static inline _glptr_BindBufferRangeEXT GET_BindBufferRangeEXT(struct _glapi_table *disp) { - return (_glptr_BindBufferRangeEXT) (GET_by_offset(disp, _gloffset_BindBufferRangeEXT)); -} - -static inline void SET_BindBufferRangeEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLintptr, GLsizeiptr)) { - SET_by_offset(disp, _gloffset_BindBufferRangeEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_EndTransformFeedbackEXT)(void); -#define CALL_EndTransformFeedbackEXT(disp, parameters) \ - (* GET_EndTransformFeedbackEXT(disp)) parameters -static inline _glptr_EndTransformFeedbackEXT GET_EndTransformFeedbackEXT(struct _glapi_table *disp) { - return (_glptr_EndTransformFeedbackEXT) (GET_by_offset(disp, _gloffset_EndTransformFeedbackEXT)); -} - -static inline void SET_EndTransformFeedbackEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { - SET_by_offset(disp, _gloffset_EndTransformFeedbackEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetTransformFeedbackVaryingEXT)(GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *); -#define CALL_GetTransformFeedbackVaryingEXT(disp, parameters) \ - (* GET_GetTransformFeedbackVaryingEXT(disp)) parameters -static inline _glptr_GetTransformFeedbackVaryingEXT GET_GetTransformFeedbackVaryingEXT(struct _glapi_table *disp) { - return (_glptr_GetTransformFeedbackVaryingEXT) (GET_by_offset(disp, _gloffset_GetTransformFeedbackVaryingEXT)); -} - -static inline void SET_GetTransformFeedbackVaryingEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *)) { - SET_by_offset(disp, _gloffset_GetTransformFeedbackVaryingEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_TransformFeedbackVaryingsEXT)(GLuint, GLsizei, const char **, GLenum); -#define CALL_TransformFeedbackVaryingsEXT(disp, parameters) \ - (* GET_TransformFeedbackVaryingsEXT(disp)) parameters -static inline _glptr_TransformFeedbackVaryingsEXT GET_TransformFeedbackVaryingsEXT(struct _glapi_table *disp) { - return (_glptr_TransformFeedbackVaryingsEXT) (GET_by_offset(disp, _gloffset_TransformFeedbackVaryingsEXT)); -} - -static inline void SET_TransformFeedbackVaryingsEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const char **, GLenum)) { - SET_by_offset(disp, _gloffset_TransformFeedbackVaryingsEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_ProvokingVertexEXT)(GLenum); -#define CALL_ProvokingVertexEXT(disp, parameters) \ - (* GET_ProvokingVertexEXT(disp)) parameters -static inline _glptr_ProvokingVertexEXT GET_ProvokingVertexEXT(struct _glapi_table *disp) { - return (_glptr_ProvokingVertexEXT) (GET_by_offset(disp, _gloffset_ProvokingVertexEXT)); -} - -static inline void SET_ProvokingVertexEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { - SET_by_offset(disp, _gloffset_ProvokingVertexEXT, fn); -} - typedef void (GLAPIENTRYP _glptr_GetTexParameterPointervAPPLE)(GLenum, GLenum, GLvoid **); #define CALL_GetTexParameterPointervAPPLE(disp, parameters) \ (* GET_GetTexParameterPointervAPPLE(disp)) parameters @@ -12763,17 +7505,6 @@ static inline void SET_ObjectUnpurgeableAPPLE(struct _glapi_table *disp, GLenum SET_by_offset(disp, _gloffset_ObjectUnpurgeableAPPLE, fn); } -typedef void (GLAPIENTRYP _glptr_ActiveProgramEXT)(GLuint); -#define CALL_ActiveProgramEXT(disp, parameters) \ - (* GET_ActiveProgramEXT(disp)) parameters -static inline _glptr_ActiveProgramEXT GET_ActiveProgramEXT(struct _glapi_table *disp) { - return (_glptr_ActiveProgramEXT) (GET_by_offset(disp, _gloffset_ActiveProgramEXT)); -} - -static inline void SET_ActiveProgramEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { - SET_by_offset(disp, _gloffset_ActiveProgramEXT, fn); -} - typedef GLuint (GLAPIENTRYP _glptr_CreateShaderProgramEXT)(GLenum, const GLchar *); #define CALL_CreateShaderProgramEXT(disp, parameters) \ (* GET_CreateShaderProgramEXT(disp)) parameters @@ -12785,17 +7516,6 @@ static inline void SET_CreateShaderProgramEXT(struct _glapi_table *disp, GLuint SET_by_offset(disp, _gloffset_CreateShaderProgramEXT, fn); } -typedef void (GLAPIENTRYP _glptr_UseShaderProgramEXT)(GLenum, GLuint); -#define CALL_UseShaderProgramEXT(disp, parameters) \ - (* GET_UseShaderProgramEXT(disp)) parameters -static inline _glptr_UseShaderProgramEXT GET_UseShaderProgramEXT(struct _glapi_table *disp) { - return (_glptr_UseShaderProgramEXT) (GET_by_offset(disp, _gloffset_UseShaderProgramEXT)); -} - -static inline void SET_UseShaderProgramEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { - SET_by_offset(disp, _gloffset_UseShaderProgramEXT, fn); -} - typedef void (GLAPIENTRYP _glptr_TextureBarrierNV)(void); #define CALL_TextureBarrierNV(disp, parameters) \ (* GET_TextureBarrierNV(disp)) parameters @@ -12807,82 +7527,5 @@ static inline void SET_TextureBarrierNV(struct _glapi_table *disp, void (GLAPIEN SET_by_offset(disp, _gloffset_TextureBarrierNV, fn); } -typedef void (GLAPIENTRYP _glptr_StencilFuncSeparateATI)(GLenum, GLenum, GLint, GLuint); -#define CALL_StencilFuncSeparateATI(disp, parameters) \ - (* GET_StencilFuncSeparateATI(disp)) parameters -static inline _glptr_StencilFuncSeparateATI GET_StencilFuncSeparateATI(struct _glapi_table *disp) { - return (_glptr_StencilFuncSeparateATI) (GET_by_offset(disp, _gloffset_StencilFuncSeparateATI)); -} - -static inline void SET_StencilFuncSeparateATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint, GLuint)) { - SET_by_offset(disp, _gloffset_StencilFuncSeparateATI, fn); -} - -typedef void (GLAPIENTRYP _glptr_ProgramEnvParameters4fvEXT)(GLenum, GLuint, GLsizei, const GLfloat *); -#define CALL_ProgramEnvParameters4fvEXT(disp, parameters) \ - (* GET_ProgramEnvParameters4fvEXT(disp)) parameters -static inline _glptr_ProgramEnvParameters4fvEXT GET_ProgramEnvParameters4fvEXT(struct _glapi_table *disp) { - return (_glptr_ProgramEnvParameters4fvEXT) (GET_by_offset(disp, _gloffset_ProgramEnvParameters4fvEXT)); -} - -static inline void SET_ProgramEnvParameters4fvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLsizei, const GLfloat *)) { - SET_by_offset(disp, _gloffset_ProgramEnvParameters4fvEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_ProgramLocalParameters4fvEXT)(GLenum, GLuint, GLsizei, const GLfloat *); -#define CALL_ProgramLocalParameters4fvEXT(disp, parameters) \ - (* GET_ProgramLocalParameters4fvEXT(disp)) parameters -static inline _glptr_ProgramLocalParameters4fvEXT GET_ProgramLocalParameters4fvEXT(struct _glapi_table *disp) { - return (_glptr_ProgramLocalParameters4fvEXT) (GET_by_offset(disp, _gloffset_ProgramLocalParameters4fvEXT)); -} - -static inline void SET_ProgramLocalParameters4fvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLsizei, const GLfloat *)) { - SET_by_offset(disp, _gloffset_ProgramLocalParameters4fvEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetQueryObjecti64vEXT)(GLuint, GLenum, GLint64EXT *); -#define CALL_GetQueryObjecti64vEXT(disp, parameters) \ - (* GET_GetQueryObjecti64vEXT(disp)) parameters -static inline _glptr_GetQueryObjecti64vEXT GET_GetQueryObjecti64vEXT(struct _glapi_table *disp) { - return (_glptr_GetQueryObjecti64vEXT) (GET_by_offset(disp, _gloffset_GetQueryObjecti64vEXT)); -} - -static inline void SET_GetQueryObjecti64vEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint64EXT *)) { - SET_by_offset(disp, _gloffset_GetQueryObjecti64vEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_GetQueryObjectui64vEXT)(GLuint, GLenum, GLuint64EXT *); -#define CALL_GetQueryObjectui64vEXT(disp, parameters) \ - (* GET_GetQueryObjectui64vEXT(disp)) parameters -static inline _glptr_GetQueryObjectui64vEXT GET_GetQueryObjectui64vEXT(struct _glapi_table *disp) { - return (_glptr_GetQueryObjectui64vEXT) (GET_by_offset(disp, _gloffset_GetQueryObjectui64vEXT)); -} - -static inline void SET_GetQueryObjectui64vEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLuint64EXT *)) { - SET_by_offset(disp, _gloffset_GetQueryObjectui64vEXT, fn); -} - -typedef void (GLAPIENTRYP _glptr_EGLImageTargetRenderbufferStorageOES)(GLenum, GLvoid *); -#define CALL_EGLImageTargetRenderbufferStorageOES(disp, parameters) \ - (* GET_EGLImageTargetRenderbufferStorageOES(disp)) parameters -static inline _glptr_EGLImageTargetRenderbufferStorageOES GET_EGLImageTargetRenderbufferStorageOES(struct _glapi_table *disp) { - return (_glptr_EGLImageTargetRenderbufferStorageOES) (GET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES)); -} - -static inline void SET_EGLImageTargetRenderbufferStorageOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLvoid *)) { - SET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES, fn); -} - -typedef void (GLAPIENTRYP _glptr_EGLImageTargetTexture2DOES)(GLenum, GLvoid *); -#define CALL_EGLImageTargetTexture2DOES(disp, parameters) \ - (* GET_EGLImageTargetTexture2DOES(disp)) parameters -static inline _glptr_EGLImageTargetTexture2DOES GET_EGLImageTargetTexture2DOES(struct _glapi_table *disp) { - return (_glptr_EGLImageTargetTexture2DOES) (GET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES)); -} - -static inline void SET_EGLImageTargetTexture2DOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLvoid *)) { - SET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES, fn); -} - #endif /* !defined( _DISPATCH_H_ ) */ diff --git a/dll/opengl/mesa/src/mesa/main/dlist.c b/dll/opengl/mesa/main/dlist.c similarity index 65% rename from dll/opengl/mesa/src/mesa/main/dlist.c rename to dll/opengl/mesa/main/dlist.c index 3db7bebae81..ea19b9b26e3 100644 --- a/dll/opengl/mesa/src/mesa/main/dlist.c +++ b/dll/opengl/mesa/main/dlist.c @@ -35,9 +35,6 @@ #include "api_exec.h" #include "api_loopback.h" #include "api_validate.h" -#if FEATURE_ATI_fragment_shader -#include "atifragshader.h" -#endif #include "config.h" #include "mfeatures.h" #include "bufferobj.h" @@ -46,34 +43,16 @@ #include "dlist.h" #include "enums.h" #include "eval.h" -#if FEATURE_EXT_framebuffer_object -#include "fbobject.h" -#endif #include "framebuffer.h" -#include "glapi/glapi.h" #include "hash.h" #include "image.h" #include "light.h" #include "macros.h" #include "pack.h" -#include "pbo.h" -#include "queryobj.h" -#include "samplerobj.h" -#include "shaderapi.h" -#include "syncobj.h" #include "teximage.h" #include "texstorage.h" #include "mtypes.h" #include "varray.h" -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program -#include "arbprogram.h" -#endif -#if FEATURE_NV_vertex_program || FEATURE_NV_fragment_program -#include "nvprogram.h" -#endif -#if FEATURE_EXT_transform_feedback -#include "transformfeedback.h" -#endif #include "math/m_matrix.h" @@ -199,11 +178,6 @@ typedef enum OPCODE_BLEND_EQUATION_SEPARATE, OPCODE_BLEND_FUNC_SEPARATE, - OPCODE_BLEND_EQUATION_I, - OPCODE_BLEND_EQUATION_SEPARATE_I, - OPCODE_BLEND_FUNC_I, - OPCODE_BLEND_FUNC_SEPARATE_I, - OPCODE_CALL_LIST, OPCODE_CALL_LIST_OFFSET, OPCODE_CLEAR, @@ -212,13 +186,8 @@ typedef enum OPCODE_CLEAR_DEPTH, OPCODE_CLEAR_INDEX, OPCODE_CLEAR_STENCIL, - OPCODE_CLEAR_BUFFER_IV, - OPCODE_CLEAR_BUFFER_UIV, - OPCODE_CLEAR_BUFFER_FV, - OPCODE_CLEAR_BUFFER_FI, OPCODE_CLIP_PLANE, OPCODE_COLOR_MASK, - OPCODE_COLOR_MASK_INDEXED, OPCODE_COLOR_MATERIAL, OPCODE_COLOR_TABLE, OPCODE_COLOR_TABLE_PARAMETER_FV, @@ -243,11 +212,9 @@ typedef enum OPCODE_DEPTH_MASK, OPCODE_DEPTH_RANGE, OPCODE_DISABLE, - OPCODE_DISABLE_INDEXED, OPCODE_DRAW_BUFFER, OPCODE_DRAW_PIXELS, OPCODE_ENABLE, - OPCODE_ENABLE_INDEXED, OPCODE_EVALMESH1, OPCODE_EVALMESH2, OPCODE_FOG, @@ -315,93 +282,12 @@ typedef enum OPCODE_TRANSLATE, OPCODE_VIEWPORT, OPCODE_WINDOW_POS, - /* GL_ARB_multitexture */ - OPCODE_ACTIVE_TEXTURE, - /* GL_ARB_texture_compression */ - OPCODE_COMPRESSED_TEX_IMAGE_1D, - OPCODE_COMPRESSED_TEX_IMAGE_2D, - OPCODE_COMPRESSED_TEX_IMAGE_3D, - OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D, - OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D, - OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D, /* GL_ARB_multisample */ OPCODE_SAMPLE_COVERAGE, /* GL_ARB_window_pos */ OPCODE_WINDOW_POS_ARB, - /* GL_NV_vertex_program */ - OPCODE_BIND_PROGRAM_NV, - OPCODE_EXECUTE_PROGRAM_NV, - OPCODE_REQUEST_RESIDENT_PROGRAMS_NV, - OPCODE_LOAD_PROGRAM_NV, - OPCODE_TRACK_MATRIX_NV, - /* GL_NV_fragment_program */ - OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, - OPCODE_PROGRAM_NAMED_PARAMETER_NV, - /* GL_EXT_stencil_two_side */ - OPCODE_ACTIVE_STENCIL_FACE_EXT, /* GL_EXT_depth_bounds_test */ OPCODE_DEPTH_BOUNDS_EXT, - /* GL_ARB_vertex/fragment_program */ - OPCODE_PROGRAM_STRING_ARB, - OPCODE_PROGRAM_ENV_PARAMETER_ARB, - /* GL_ARB_occlusion_query */ - OPCODE_BEGIN_QUERY_ARB, - OPCODE_END_QUERY_ARB, - /* GL_ARB_draw_buffers */ - OPCODE_DRAW_BUFFERS_ARB, - /* GL_ATI_fragment_shader */ - OPCODE_TEX_BUMP_PARAMETER_ATI, - /* GL_ATI_fragment_shader */ - OPCODE_BIND_FRAGMENT_SHADER_ATI, - OPCODE_SET_FRAGMENT_SHADER_CONSTANTS_ATI, - /* OpenGL 2.0 */ - OPCODE_STENCIL_FUNC_SEPARATE, - OPCODE_STENCIL_OP_SEPARATE, - OPCODE_STENCIL_MASK_SEPARATE, - - /* GL_ARB_shader_objects */ - OPCODE_USE_PROGRAM, - OPCODE_UNIFORM_1F, - OPCODE_UNIFORM_2F, - OPCODE_UNIFORM_3F, - OPCODE_UNIFORM_4F, - OPCODE_UNIFORM_1FV, - OPCODE_UNIFORM_2FV, - OPCODE_UNIFORM_3FV, - OPCODE_UNIFORM_4FV, - OPCODE_UNIFORM_1I, - OPCODE_UNIFORM_2I, - OPCODE_UNIFORM_3I, - OPCODE_UNIFORM_4I, - OPCODE_UNIFORM_1IV, - OPCODE_UNIFORM_2IV, - OPCODE_UNIFORM_3IV, - OPCODE_UNIFORM_4IV, - OPCODE_UNIFORM_MATRIX22, - OPCODE_UNIFORM_MATRIX33, - OPCODE_UNIFORM_MATRIX44, - OPCODE_UNIFORM_MATRIX23, - OPCODE_UNIFORM_MATRIX32, - OPCODE_UNIFORM_MATRIX24, - OPCODE_UNIFORM_MATRIX42, - OPCODE_UNIFORM_MATRIX34, - OPCODE_UNIFORM_MATRIX43, - - /* OpenGL 3.0 */ - OPCODE_UNIFORM_1UI, - OPCODE_UNIFORM_2UI, - OPCODE_UNIFORM_3UI, - OPCODE_UNIFORM_4UI, - OPCODE_UNIFORM_1UIV, - OPCODE_UNIFORM_2UIV, - OPCODE_UNIFORM_3UIV, - OPCODE_UNIFORM_4UIV, - - /* GL_ARB_color_buffer_float */ - OPCODE_CLAMP_COLOR, - - /* GL_EXT_framebuffer_blit */ - OPCODE_BLIT_FRAMEBUFFER, /* Vertex attributes -- fallback for when optimized display * list build isn't active. @@ -410,10 +296,6 @@ typedef enum OPCODE_ATTR_2F_NV, OPCODE_ATTR_3F_NV, OPCODE_ATTR_4F_NV, - OPCODE_ATTR_1F_ARB, - OPCODE_ATTR_2F_ARB, - OPCODE_ATTR_3F_ARB, - OPCODE_ATTR_4F_ARB, OPCODE_MATERIAL, OPCODE_BEGIN, OPCODE_END, @@ -423,52 +305,15 @@ typedef enum OPCODE_EVAL_P1, OPCODE_EVAL_P2, - /* GL_EXT_provoking_vertex */ - OPCODE_PROVOKING_VERTEX, - - /* GL_EXT_transform_feedback */ - OPCODE_BEGIN_TRANSFORM_FEEDBACK, - OPCODE_END_TRANSFORM_FEEDBACK, - OPCODE_BIND_TRANSFORM_FEEDBACK, - OPCODE_PAUSE_TRANSFORM_FEEDBACK, - OPCODE_RESUME_TRANSFORM_FEEDBACK, - OPCODE_DRAW_TRANSFORM_FEEDBACK, - /* GL_EXT_texture_integer */ OPCODE_CLEARCOLOR_I, OPCODE_CLEARCOLOR_UI, OPCODE_TEXPARAMETER_I, OPCODE_TEXPARAMETER_UI, - /* GL_EXT_separate_shader_objects */ - OPCODE_ACTIVE_PROGRAM_EXT, - OPCODE_USE_SHADER_PROGRAM_EXT, - - /* GL_ARB_instanced_arrays */ - OPCODE_VERTEX_ATTRIB_DIVISOR, - /* GL_NV_texture_barrier */ OPCODE_TEXTURE_BARRIER_NV, - /* GL_ARB_sampler_object */ - OPCODE_BIND_SAMPLER, - OPCODE_SAMPLER_PARAMETERIV, - OPCODE_SAMPLER_PARAMETERFV, - OPCODE_SAMPLER_PARAMETERIIV, - OPCODE_SAMPLER_PARAMETERUIV, - - /* GL_ARB_geometry_shader4 */ - OPCODE_PROGRAM_PARAMETERI, - OPCODE_FRAMEBUFFER_TEXTURE, - OPCODE_FRAMEBUFFER_TEXTURE_FACE, - - /* GL_ARB_sync */ - OPCODE_WAIT_SYNC, - - /* GL_NV_conditional_render */ - OPCODE_BEGIN_CONDITIONAL_RENDER, - OPCODE_END_CONDITIONAL_RENDER, - /* The following three are meta instructions */ OPCODE_ERROR, /* raise compiled-in error */ OPCODE_CONTINUE, @@ -700,80 +545,6 @@ _mesa_delete_list(struct gl_context *ctx, struct gl_display_list *dlist) free(n[11].data); n += InstSize[n[0].opcode]; break; - case OPCODE_COMPRESSED_TEX_IMAGE_1D: - free(n[7].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_COMPRESSED_TEX_IMAGE_2D: - free(n[8].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_COMPRESSED_TEX_IMAGE_3D: - free(n[9].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D: - free(n[7].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D: - free(n[9].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D: - free(n[11].data); - n += InstSize[n[0].opcode]; - break; -#if FEATURE_NV_vertex_program - case OPCODE_LOAD_PROGRAM_NV: - free(n[4].data); /* program string */ - n += InstSize[n[0].opcode]; - break; - case OPCODE_REQUEST_RESIDENT_PROGRAMS_NV: - free(n[2].data); /* array of program ids */ - n += InstSize[n[0].opcode]; - break; -#endif -#if FEATURE_NV_fragment_program - case OPCODE_PROGRAM_NAMED_PARAMETER_NV: - free(n[3].data); /* parameter name */ - n += InstSize[n[0].opcode]; - break; -#endif -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program - case OPCODE_PROGRAM_STRING_ARB: - free(n[4].data); /* program string */ - n += InstSize[n[0].opcode]; - break; -#endif - case OPCODE_UNIFORM_1FV: - case OPCODE_UNIFORM_2FV: - case OPCODE_UNIFORM_3FV: - case OPCODE_UNIFORM_4FV: - case OPCODE_UNIFORM_1IV: - case OPCODE_UNIFORM_2IV: - case OPCODE_UNIFORM_3IV: - case OPCODE_UNIFORM_4IV: - case OPCODE_UNIFORM_1UIV: - case OPCODE_UNIFORM_2UIV: - case OPCODE_UNIFORM_3UIV: - case OPCODE_UNIFORM_4UIV: - free(n[3].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_UNIFORM_MATRIX22: - case OPCODE_UNIFORM_MATRIX33: - case OPCODE_UNIFORM_MATRIX44: - case OPCODE_UNIFORM_MATRIX24: - case OPCODE_UNIFORM_MATRIX42: - case OPCODE_UNIFORM_MATRIX23: - case OPCODE_UNIFORM_MATRIX32: - case OPCODE_UNIFORM_MATRIX34: - case OPCODE_UNIFORM_MATRIX43: - free(n[4].data); - n += InstSize[n[0].opcode]; - break; - case OPCODE_CONTINUE: n = (Node *) n[1].next; free(block); @@ -893,6 +664,8 @@ unpack_image(struct gl_context *ctx, GLuint dimensions, GLenum format, GLenum type, const GLvoid * pixels, const struct gl_pixelstore_attrib *unpack) { + GLvoid *image; + if (width <= 0 || height <= 0) { return NULL; } @@ -902,52 +675,15 @@ unpack_image(struct gl_context *ctx, GLuint dimensions, return NULL; } - if (!_mesa_is_bufferobj(unpack->BufferObj)) { - /* no PBO */ - GLvoid *image; - - if (type == GL_BITMAP) - image = _mesa_unpack_bitmap(width, height, pixels, unpack); - else - image = _mesa_unpack_image(dimensions, width, height, depth, - format, type, pixels, unpack); - if (pixels && !image) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "display list construction"); - } - return image; + if (type == GL_BITMAP) + image = _mesa_unpack_bitmap(width, height, pixels, unpack); + else + image = _mesa_unpack_image(dimensions, width, height, depth, + format, type, pixels, unpack); + if (pixels && !image) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "display list construction"); } - else if (_mesa_validate_pbo_access(dimensions, unpack, width, height, - depth, format, type, INT_MAX, pixels)) { - const GLubyte *map, *src; - GLvoid *image; - - map = (GLubyte *) - ctx->Driver.MapBufferRange(ctx, 0, unpack->BufferObj->Size, - GL_MAP_READ_BIT, unpack->BufferObj); - if (!map) { - /* unable to map src buffer! */ - _mesa_error(ctx, GL_INVALID_OPERATION, "unable to map PBO"); - return NULL; - } - - src = ADD_POINTERS(map, pixels); - if (type == GL_BITMAP) - image = _mesa_unpack_bitmap(width, height, src, unpack); - else - image = _mesa_unpack_image(dimensions, width, height, depth, - format, type, src, unpack); - - ctx->Driver.UnmapBuffer(ctx, unpack->BufferObj); - - if (!image) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "display list construction"); - } - return image; - } - - /* bad access! */ - _mesa_error(ctx, GL_INVALID_OPERATION, "invalid PBO access"); - return NULL; + return image; } /** @@ -1224,119 +960,6 @@ save_BlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) } } -/* GL_ARB_draw_buffers_blend */ -static void GLAPIENTRY -save_BlendFuncSeparatei(GLuint buf, GLenum sfactorRGB, GLenum dfactorRGB, - GLenum sfactorA, GLenum dfactorA) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_BLEND_FUNC_SEPARATE_I, 5); - if (n) { - n[1].ui = buf; - n[2].e = sfactorRGB; - n[3].e = dfactorRGB; - n[4].e = sfactorA; - n[5].e = dfactorA; - } - if (ctx->ExecuteFlag) { - CALL_BlendFuncSeparateiARB(ctx->Exec, (buf, sfactorRGB, dfactorRGB, - sfactorA, dfactorA)); - } -} - -/* GL_ARB_draw_buffers_blend */ -static void GLAPIENTRY -save_BlendFunci(GLuint buf, GLenum sfactor, GLenum dfactor) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_BLEND_FUNC_SEPARATE_I, 3); - if (n) { - n[1].ui = buf; - n[2].e = sfactor; - n[3].e = dfactor; - } - if (ctx->ExecuteFlag) { - CALL_BlendFunciARB(ctx->Exec, (buf, sfactor, dfactor)); - } -} - -/* GL_ARB_draw_buffers_blend */ -static void GLAPIENTRY -save_BlendEquationi(GLuint buf, GLenum mode) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_BLEND_EQUATION_I, 2); - if (n) { - n[1].ui = buf; - n[2].e = mode; - } - if (ctx->ExecuteFlag) { - CALL_BlendEquationiARB(ctx->Exec, (buf, mode)); - } -} - -/* GL_ARB_draw_buffers_blend */ -static void GLAPIENTRY -save_BlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeA) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_BLEND_EQUATION_SEPARATE_I, 3); - if (n) { - n[1].ui = buf; - n[2].e = modeRGB; - n[3].e = modeA; - } - if (ctx->ExecuteFlag) { - CALL_BlendEquationSeparateiARB(ctx->Exec, (buf, modeRGB, modeA)); - } -} - - -/* GL_ARB_draw_instanced. */ -static void GLAPIENTRY -save_DrawArraysInstancedARB(GLenum mode, - GLint first, - GLsizei count, - GLsizei primcount) -{ - GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_OPERATION, - "glDrawArraysInstanced() during display list compile"); -} - -static void GLAPIENTRY -save_DrawElementsInstancedARB(GLenum mode, - GLsizei count, - GLenum type, - const GLvoid *indices, - GLsizei primcount) -{ - GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_OPERATION, - "glDrawElementsInstanced() during display list compile"); -} - -static void GLAPIENTRY -save_DrawElementsInstancedBaseVertexARB(GLenum mode, - GLsizei count, - GLenum type, - const GLvoid *indices, - GLsizei primcount, - GLint basevertex) -{ - GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_OPERATION, - "glDrawElementsInstancedBaseVertex() during display list compile"); -} - static void invalidate_saved_current_state( struct gl_context *ctx ) { GLint i; @@ -1437,110 +1060,6 @@ save_Clear(GLbitfield mask) } -static void GLAPIENTRY -save_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_CLEAR_BUFFER_IV, 6); - if (n) { - n[1].e = buffer; - n[2].i = drawbuffer; - n[3].i = value[0]; - if (buffer == GL_COLOR) { - n[4].i = value[1]; - n[5].i = value[2]; - n[6].i = value[3]; - } - else { - n[4].i = 0; - n[5].i = 0; - n[6].i = 0; - } - } - if (ctx->ExecuteFlag) { - CALL_ClearBufferiv(ctx->Exec, (buffer, drawbuffer, value)); - } -} - - -static void GLAPIENTRY -save_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_CLEAR_BUFFER_UIV, 6); - if (n) { - n[1].e = buffer; - n[2].i = drawbuffer; - n[3].ui = value[0]; - if (buffer == GL_COLOR) { - n[4].ui = value[1]; - n[5].ui = value[2]; - n[6].ui = value[3]; - } - else { - n[4].ui = 0; - n[5].ui = 0; - n[6].ui = 0; - } - } - if (ctx->ExecuteFlag) { - CALL_ClearBufferuiv(ctx->Exec, (buffer, drawbuffer, value)); - } -} - - -static void GLAPIENTRY -save_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_CLEAR_BUFFER_FV, 6); - if (n) { - n[1].e = buffer; - n[2].i = drawbuffer; - n[3].f = value[0]; - if (buffer == GL_COLOR) { - n[4].f = value[1]; - n[5].f = value[2]; - n[6].f = value[3]; - } - else { - n[4].f = 0.0F; - n[5].f = 0.0F; - n[6].f = 0.0F; - } - } - if (ctx->ExecuteFlag) { - CALL_ClearBufferfv(ctx->Exec, (buffer, drawbuffer, value)); - } -} - - -static void GLAPIENTRY -save_ClearBufferfi(GLenum buffer, GLint drawbuffer, - GLfloat depth, GLint stencil) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_CLEAR_BUFFER_FI, 4); - if (n) { - n[1].e = buffer; - n[2].i = drawbuffer; - n[3].f = depth; - n[4].i = stencil; - } - if (ctx->ExecuteFlag) { - CALL_ClearBufferfi(ctx->Exec, (buffer, drawbuffer, depth, stencil)); - } -} - - static void GLAPIENTRY save_ClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { @@ -1668,27 +1187,6 @@ save_ColorMask(GLboolean red, GLboolean green, } -static void GLAPIENTRY -save_ColorMaskIndexed(GLuint buf, GLboolean red, GLboolean green, - GLboolean blue, GLboolean alpha) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_COLOR_MASK_INDEXED, 5); - if (n) { - n[1].ui = buf; - n[2].b = red; - n[3].b = green; - n[4].b = blue; - n[5].b = alpha; - } - if (ctx->ExecuteFlag) { - /*CALL_ColorMaskIndexedEXT(ctx->Exec, (buf, red, green, blue, alpha));*/ - } -} - - static void GLAPIENTRY save_ColorMaterial(GLenum face, GLenum mode) { @@ -2245,23 +1743,6 @@ save_Disable(GLenum cap) } -static void GLAPIENTRY -save_DisableIndexed(GLuint index, GLenum cap) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_DISABLE_INDEXED, 2); - if (n) { - n[1].ui = index; - n[2].e = cap; - } - if (ctx->ExecuteFlag) { - CALL_DisableIndexedEXT(ctx->Exec, (index, cap)); - } -} - - static void GLAPIENTRY save_DrawBuffer(GLenum mode) { @@ -2320,24 +1801,6 @@ save_Enable(GLenum cap) -static void GLAPIENTRY -save_EnableIndexed(GLuint index, GLenum cap) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_ENABLE_INDEXED, 2); - if (n) { - n[1].ui = index; - n[2].e = cap; - } - if (ctx->ExecuteFlag) { - CALL_EnableIndexedEXT(ctx->Exec, (index, cap)); - } -} - - - static void GLAPIENTRY save_EvalMesh1(GLenum mode, GLint i1, GLint i2) { @@ -3821,91 +3284,6 @@ save_StencilOp(GLenum fail, GLenum zfail, GLenum zpass) } -static void GLAPIENTRY -save_StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_STENCIL_FUNC_SEPARATE, 4); - if (n) { - n[1].e = face; - n[2].e = func; - n[3].i = ref; - n[4].ui = mask; - } - if (ctx->ExecuteFlag) { - CALL_StencilFuncSeparate(ctx->Exec, (face, func, ref, mask)); - } -} - - -static void GLAPIENTRY -save_StencilFuncSeparateATI(GLenum frontfunc, GLenum backfunc, GLint ref, - GLuint mask) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - /* GL_FRONT */ - n = alloc_instruction(ctx, OPCODE_STENCIL_FUNC_SEPARATE, 4); - if (n) { - n[1].e = GL_FRONT; - n[2].e = frontfunc; - n[3].i = ref; - n[4].ui = mask; - } - /* GL_BACK */ - n = alloc_instruction(ctx, OPCODE_STENCIL_FUNC_SEPARATE, 4); - if (n) { - n[1].e = GL_BACK; - n[2].e = backfunc; - n[3].i = ref; - n[4].ui = mask; - } - if (ctx->ExecuteFlag) { - CALL_StencilFuncSeparate(ctx->Exec, (GL_FRONT, frontfunc, ref, mask)); - CALL_StencilFuncSeparate(ctx->Exec, (GL_BACK, backfunc, ref, mask)); - } -} - - -static void GLAPIENTRY -save_StencilMaskSeparate(GLenum face, GLuint mask) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_STENCIL_MASK_SEPARATE, 2); - if (n) { - n[1].e = face; - n[2].ui = mask; - } - if (ctx->ExecuteFlag) { - CALL_StencilMaskSeparate(ctx->Exec, (face, mask)); - } -} - - -static void GLAPIENTRY -save_StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_STENCIL_OP_SEPARATE, 4); - if (n) { - n[1].e = face; - n[2].e = fail; - n[3].e = zfail; - n[4].e = zpass; - } - if (ctx->ExecuteFlag) { - CALL_StencilOpSeparate(ctx->Exec, (face, fail, zfail, zpass)); - } -} - - static void GLAPIENTRY save_TexEnvfv(GLenum target, GLenum pname, const GLfloat *params) { @@ -4506,24 +3884,6 @@ save_WindowPos4svMESA(const GLshort * v) } - -/* GL_ARB_multitexture */ -static void GLAPIENTRY -save_ActiveTextureARB(GLenum target) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_ACTIVE_TEXTURE, 1); - if (n) { - n[1].e = target; - } - if (ctx->ExecuteFlag) { - CALL_ActiveTextureARB(ctx->Exec, (target)); - } -} - - /* GL_ARB_transpose_matrix */ static void GLAPIENTRY @@ -4561,227 +3921,6 @@ save_MultTransposeMatrixfARB(const GLfloat m[16]) save_MultMatrixf(tm); } -static GLvoid *copy_data(const GLvoid *data, GLsizei size, const char *func) -{ - GET_CURRENT_CONTEXT(ctx); - GLvoid *image; - - if (!data) - return NULL; - - image = malloc(size); - if (!image) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "%s", func); - return NULL; - } - memcpy(image, data, size); - - return image; -} - - -/* GL_ARB_texture_compression */ -static void GLAPIENTRY -save_CompressedTexImage1DARB(GLenum target, GLint level, - GLenum internalFormat, GLsizei width, - GLint border, GLsizei imageSize, - const GLvoid * data) -{ - GET_CURRENT_CONTEXT(ctx); - if (target == GL_PROXY_TEXTURE_1D) { - /* don't compile, execute immediately */ - CALL_CompressedTexImage1DARB(ctx->Exec, (target, level, internalFormat, - width, border, imageSize, - data)); - } - else { - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_IMAGE_1D, 7); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].e = internalFormat; - n[4].i = (GLint) width; - n[5].i = border; - n[6].i = imageSize; - n[7].data = copy_data(data, imageSize, "glCompressedTexImage1DARB"); - } - if (ctx->ExecuteFlag) { - CALL_CompressedTexImage1DARB(ctx->Exec, - (target, level, internalFormat, width, - border, imageSize, data)); - } - } -} - - -static void GLAPIENTRY -save_CompressedTexImage2DARB(GLenum target, GLint level, - GLenum internalFormat, GLsizei width, - GLsizei height, GLint border, GLsizei imageSize, - const GLvoid * data) -{ - GET_CURRENT_CONTEXT(ctx); - if (target == GL_PROXY_TEXTURE_2D) { - /* don't compile, execute immediately */ - CALL_CompressedTexImage2DARB(ctx->Exec, (target, level, internalFormat, - width, height, border, - imageSize, data)); - } - else { - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_IMAGE_2D, 8); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].e = internalFormat; - n[4].i = (GLint) width; - n[5].i = (GLint) height; - n[6].i = border; - n[7].i = imageSize; - n[8].data = copy_data(data, imageSize, "glCompressedTexImage2DARB"); - } - if (ctx->ExecuteFlag) { - CALL_CompressedTexImage2DARB(ctx->Exec, - (target, level, internalFormat, width, - height, border, imageSize, data)); - } - } -} - - -static void GLAPIENTRY -save_CompressedTexImage3DARB(GLenum target, GLint level, - GLenum internalFormat, GLsizei width, - GLsizei height, GLsizei depth, GLint border, - GLsizei imageSize, const GLvoid * data) -{ - GET_CURRENT_CONTEXT(ctx); - if (target == GL_PROXY_TEXTURE_3D) { - /* don't compile, execute immediately */ - CALL_CompressedTexImage3DARB(ctx->Exec, (target, level, internalFormat, - width, height, depth, border, - imageSize, data)); - } - else { - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_IMAGE_3D, 9); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].e = internalFormat; - n[4].i = (GLint) width; - n[5].i = (GLint) height; - n[6].i = (GLint) depth; - n[7].i = border; - n[8].i = imageSize; - n[9].data = copy_data(data, imageSize, "glCompressedTexImage3DARB"); - } - if (ctx->ExecuteFlag) { - CALL_CompressedTexImage3DARB(ctx->Exec, - (target, level, internalFormat, width, - height, depth, border, imageSize, - data)); - } - } -} - - -static void GLAPIENTRY -save_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset, - GLsizei width, GLenum format, - GLsizei imageSize, const GLvoid * data) -{ - Node *n; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D, 7); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].i = xoffset; - n[4].i = (GLint) width; - n[5].e = format; - n[6].i = imageSize; - n[7].data = copy_data(data, imageSize, "glCompressedTexSubImage1DARB"); - } - if (ctx->ExecuteFlag) { - CALL_CompressedTexSubImage1DARB(ctx->Exec, (target, level, xoffset, - width, format, imageSize, - data)); - } -} - - -static void GLAPIENTRY -save_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, - GLenum format, GLsizei imageSize, - const GLvoid * data) -{ - Node *n; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D, 9); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].i = xoffset; - n[4].i = yoffset; - n[5].i = (GLint) width; - n[6].i = (GLint) height; - n[7].e = format; - n[8].i = imageSize; - n[9].data = copy_data(data, imageSize, "glCompressedTexSubImage2DARB"); - } - if (ctx->ExecuteFlag) { - CALL_CompressedTexSubImage2DARB(ctx->Exec, - (target, level, xoffset, yoffset, width, - height, format, imageSize, data)); - } -} - - -static void GLAPIENTRY -save_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, GLenum format, - GLsizei imageSize, const GLvoid * data) -{ - Node *n; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D, 11); - if (n) { - n[1].e = target; - n[2].i = level; - n[3].i = xoffset; - n[4].i = yoffset; - n[5].i = zoffset; - n[6].i = (GLint) width; - n[7].i = (GLint) height; - n[8].i = (GLint) depth; - n[9].e = format; - n[10].i = imageSize; - n[11].data = copy_data(data, imageSize, "glCompressedTexSubImage3DARB"); - } - if (ctx->ExecuteFlag) { - CALL_CompressedTexSubImage3DARB(ctx->Exec, - (target, level, xoffset, yoffset, - zoffset, width, height, depth, format, - imageSize, data)); - } -} - /* GL_ARB_multisample */ static void GLAPIENTRY @@ -4804,350 +3943,8 @@ save_SampleCoverageARB(GLclampf value, GLboolean invert) /* * GL_NV_vertex_program */ -#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program -static void GLAPIENTRY -save_BindProgramNV(GLenum target, GLuint id) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_BIND_PROGRAM_NV, 2); - if (n) { - n[1].e = target; - n[2].ui = id; - } - if (ctx->ExecuteFlag) { - CALL_BindProgramNV(ctx->Exec, (target, id)); - } -} -static void GLAPIENTRY -save_ProgramEnvParameter4fARB(GLenum target, GLuint index, - GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_PROGRAM_ENV_PARAMETER_ARB, 6); - if (n) { - n[1].e = target; - n[2].ui = index; - n[3].f = x; - n[4].f = y; - n[5].f = z; - n[6].f = w; - } - if (ctx->ExecuteFlag) { - CALL_ProgramEnvParameter4fARB(ctx->Exec, (target, index, x, y, z, w)); - } -} - - -static void GLAPIENTRY -save_ProgramEnvParameter4fvARB(GLenum target, GLuint index, - const GLfloat *params) -{ - save_ProgramEnvParameter4fARB(target, index, params[0], params[1], - params[2], params[3]); -} - - -static void GLAPIENTRY -save_ProgramEnvParameters4fvEXT(GLenum target, GLuint index, GLsizei count, - const GLfloat * params) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - if (count > 0) { - GLint i; - const GLfloat * p = params; - - for (i = 0 ; i < count ; i++) { - n = alloc_instruction(ctx, OPCODE_PROGRAM_ENV_PARAMETER_ARB, 6); - if (n) { - n[1].e = target; - n[2].ui = index; - n[3].f = p[0]; - n[4].f = p[1]; - n[5].f = p[2]; - n[6].f = p[3]; - p += 4; - } - } - } - - if (ctx->ExecuteFlag) { - CALL_ProgramEnvParameters4fvEXT(ctx->Exec, (target, index, count, params)); - } -} - - -static void GLAPIENTRY -save_ProgramEnvParameter4dARB(GLenum target, GLuint index, - GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - save_ProgramEnvParameter4fARB(target, index, - (GLfloat) x, - (GLfloat) y, (GLfloat) z, (GLfloat) w); -} - - -static void GLAPIENTRY -save_ProgramEnvParameter4dvARB(GLenum target, GLuint index, - const GLdouble *params) -{ - save_ProgramEnvParameter4fARB(target, index, - (GLfloat) params[0], - (GLfloat) params[1], - (GLfloat) params[2], (GLfloat) params[3]); -} - -#endif /* FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program || FEATURE_NV_vertex_program */ - -#if FEATURE_NV_vertex_program -static void GLAPIENTRY -save_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_EXECUTE_PROGRAM_NV, 6); - if (n) { - n[1].e = target; - n[2].ui = id; - n[3].f = params[0]; - n[4].f = params[1]; - n[5].f = params[2]; - n[6].f = params[3]; - } - if (ctx->ExecuteFlag) { - CALL_ExecuteProgramNV(ctx->Exec, (target, id, params)); - } -} - - -static void GLAPIENTRY -save_ProgramParameters4dvNV(GLenum target, GLuint index, - GLsizei num, const GLdouble *params) -{ - GLint i; - for (i = 0; i < num; i++) { - save_ProgramEnvParameter4dvARB(target, index + i, params + 4 * i); - } -} - - -static void GLAPIENTRY -save_ProgramParameters4fvNV(GLenum target, GLuint index, - GLsizei num, const GLfloat *params) -{ - GLint i; - for (i = 0; i < num; i++) { - save_ProgramEnvParameter4fvARB(target, index + i, params + 4 * i); - } -} - - -static void GLAPIENTRY -save_LoadProgramNV(GLenum target, GLuint id, GLsizei len, - const GLubyte * program) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - n = alloc_instruction(ctx, OPCODE_LOAD_PROGRAM_NV, 4); - if (n) { - GLubyte *programCopy = (GLubyte *) malloc(len); - if (!programCopy) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glLoadProgramNV"); - return; - } - memcpy(programCopy, program, len); - n[1].e = target; - n[2].ui = id; - n[3].i = len; - n[4].data = programCopy; - } - if (ctx->ExecuteFlag) { - CALL_LoadProgramNV(ctx->Exec, (target, id, len, program)); - } -} - - -static void GLAPIENTRY -save_RequestResidentProgramsNV(GLsizei num, const GLuint * ids) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - n = alloc_instruction(ctx, OPCODE_TRACK_MATRIX_NV, 2); - if (n) { - GLuint *idCopy = (GLuint *) malloc(num * sizeof(GLuint)); - if (!idCopy) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glRequestResidentProgramsNV"); - return; - } - memcpy(idCopy, ids, num * sizeof(GLuint)); - n[1].i = num; - n[2].data = idCopy; - } - if (ctx->ExecuteFlag) { - CALL_RequestResidentProgramsNV(ctx->Exec, (num, ids)); - } -} - - -static void GLAPIENTRY -save_TrackMatrixNV(GLenum target, GLuint address, - GLenum matrix, GLenum transform) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_TRACK_MATRIX_NV, 4); - if (n) { - n[1].e = target; - n[2].ui = address; - n[3].e = matrix; - n[4].e = transform; - } - if (ctx->ExecuteFlag) { - CALL_TrackMatrixNV(ctx->Exec, (target, address, matrix, transform)); - } -} -#endif /* FEATURE_NV_vertex_program */ - - -/* - * GL_NV_fragment_program - */ #if FEATURE_NV_fragment_program -static void GLAPIENTRY -save_ProgramLocalParameter4fARB(GLenum target, GLuint index, - GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6); - if (n) { - n[1].e = target; - n[2].ui = index; - n[3].f = x; - n[4].f = y; - n[5].f = z; - n[6].f = w; - } - if (ctx->ExecuteFlag) { - CALL_ProgramLocalParameter4fARB(ctx->Exec, (target, index, x, y, z, w)); - } -} - - -static void GLAPIENTRY -save_ProgramLocalParameter4fvARB(GLenum target, GLuint index, - const GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6); - if (n) { - n[1].e = target; - n[2].ui = index; - n[3].f = params[0]; - n[4].f = params[1]; - n[5].f = params[2]; - n[6].f = params[3]; - } - if (ctx->ExecuteFlag) { - CALL_ProgramLocalParameter4fvARB(ctx->Exec, (target, index, params)); - } -} - - -static void GLAPIENTRY -save_ProgramLocalParameters4fvEXT(GLenum target, GLuint index, GLsizei count, - const GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - if (count > 0) { - GLint i; - const GLfloat * p = params; - - for (i = 0 ; i < count ; i++) { - n = alloc_instruction(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6); - if (n) { - n[1].e = target; - n[2].ui = index; - n[3].f = p[0]; - n[4].f = p[1]; - n[5].f = p[2]; - n[6].f = p[3]; - p += 4; - } - } - } - - if (ctx->ExecuteFlag) { - CALL_ProgramLocalParameters4fvEXT(ctx->Exec, (target, index, count, params)); - } -} - - -static void GLAPIENTRY -save_ProgramLocalParameter4dARB(GLenum target, GLuint index, - GLdouble x, GLdouble y, - GLdouble z, GLdouble w) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6); - if (n) { - n[1].e = target; - n[2].ui = index; - n[3].f = (GLfloat) x; - n[4].f = (GLfloat) y; - n[5].f = (GLfloat) z; - n[6].f = (GLfloat) w; - } - if (ctx->ExecuteFlag) { - CALL_ProgramLocalParameter4dARB(ctx->Exec, (target, index, x, y, z, w)); - } -} - - -static void GLAPIENTRY -save_ProgramLocalParameter4dvARB(GLenum target, GLuint index, - const GLdouble *params) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6); - if (n) { - n[1].e = target; - n[2].ui = index; - n[3].f = (GLfloat) params[0]; - n[4].f = (GLfloat) params[1]; - n[5].f = (GLfloat) params[2]; - n[6].f = (GLfloat) params[3]; - } - if (ctx->ExecuteFlag) { - CALL_ProgramLocalParameter4dvARB(ctx->Exec, (target, index, params)); - } -} - static void GLAPIENTRY save_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w) @@ -5178,7 +3975,6 @@ save_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name, } } - static void GLAPIENTRY save_ProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte * name, const float v[]) @@ -5204,26 +4000,7 @@ save_ProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte * name, (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3]); } - -#endif /* FEATURE_NV_fragment_program */ - - - -/* GL_EXT_stencil_two_side */ -static void GLAPIENTRY -save_ActiveStencilFaceEXT(GLenum face) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_ACTIVE_STENCIL_FACE_EXT, 1); - if (n) { - n[1].e = face; - } - if (ctx->ExecuteFlag) { - CALL_ActiveStencilFaceEXT(ctx->Exec, (face)); - } -} +#endif /* GL_EXT_depth_bounds_test */ @@ -5243,164 +4020,6 @@ save_DepthBoundsEXT(GLclampd zmin, GLclampd zmax) } } - - -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program - -static void GLAPIENTRY -save_ProgramStringARB(GLenum target, GLenum format, GLsizei len, - const GLvoid * string) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - - n = alloc_instruction(ctx, OPCODE_PROGRAM_STRING_ARB, 4); - if (n) { - GLubyte *programCopy = (GLubyte *) malloc(len); - if (!programCopy) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glProgramStringARB"); - return; - } - memcpy(programCopy, string, len); - n[1].e = target; - n[2].e = format; - n[3].i = len; - n[4].data = programCopy; - } - if (ctx->ExecuteFlag) { - CALL_ProgramStringARB(ctx->Exec, (target, format, len, string)); - } -} - -#endif /* FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program */ - - -#if FEATURE_queryobj - -static void GLAPIENTRY -save_BeginQueryARB(GLenum target, GLuint id) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_BEGIN_QUERY_ARB, 2); - if (n) { - n[1].e = target; - n[2].ui = id; - } - if (ctx->ExecuteFlag) { - CALL_BeginQueryARB(ctx->Exec, (target, id)); - } -} - - -static void GLAPIENTRY -save_EndQueryARB(GLenum target) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_END_QUERY_ARB, 1); - if (n) { - n[1].e = target; - } - if (ctx->ExecuteFlag) { - CALL_EndQueryARB(ctx->Exec, (target)); - } -} - -#endif /* FEATURE_queryobj */ - - -static void GLAPIENTRY -save_DrawBuffersARB(GLsizei count, const GLenum * buffers) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_DRAW_BUFFERS_ARB, 1 + MAX_DRAW_BUFFERS); - if (n) { - GLint i; - n[1].i = count; - if (count > MAX_DRAW_BUFFERS) - count = MAX_DRAW_BUFFERS; - for (i = 0; i < count; i++) { - n[2 + i].e = buffers[i]; - } - } - if (ctx->ExecuteFlag) { - CALL_DrawBuffersARB(ctx->Exec, (count, buffers)); - } -} - -static void GLAPIENTRY -save_TexBumpParameterfvATI(GLenum pname, const GLfloat *param) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - - n = alloc_instruction(ctx, OPCODE_TEX_BUMP_PARAMETER_ATI, 5); - if (n) { - n[1].ui = pname; - n[2].f = param[0]; - n[3].f = param[1]; - n[4].f = param[2]; - n[5].f = param[3]; - } - if (ctx->ExecuteFlag) { - CALL_TexBumpParameterfvATI(ctx->Exec, (pname, param)); - } -} - -static void GLAPIENTRY -save_TexBumpParameterivATI(GLenum pname, const GLint *param) -{ - GLfloat p[4]; - p[0] = INT_TO_FLOAT(param[0]); - p[1] = INT_TO_FLOAT(param[1]); - p[2] = INT_TO_FLOAT(param[2]); - p[3] = INT_TO_FLOAT(param[3]); - save_TexBumpParameterfvATI(pname, p); -} - -#if FEATURE_ATI_fragment_shader -static void GLAPIENTRY -save_BindFragmentShaderATI(GLuint id) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - - n = alloc_instruction(ctx, OPCODE_BIND_FRAGMENT_SHADER_ATI, 1); - if (n) { - n[1].ui = id; - } - if (ctx->ExecuteFlag) { - CALL_BindFragmentShaderATI(ctx->Exec, (id)); - } -} - -static void GLAPIENTRY -save_SetFragmentShaderConstantATI(GLuint dst, const GLfloat *value) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - - n = alloc_instruction(ctx, OPCODE_SET_FRAGMENT_SHADER_CONSTANTS_ATI, 5); - if (n) { - n[1].ui = dst; - n[2].f = value[0]; - n[3].f = value[1]; - n[4].f = value[2]; - n[5].f = value[3]; - } - if (ctx->ExecuteFlag) { - CALL_SetFragmentShaderConstantATI(ctx->Exec, (dst, value)); - } -} -#endif - static void GLAPIENTRY save_Attr1fNV(GLenum attr, GLfloat x) { @@ -5491,98 +4110,6 @@ save_Attr4fNV(GLenum attr, GLfloat x, GLfloat y, GLfloat z, GLfloat w) } } - -static void GLAPIENTRY -save_Attr1fARB(GLenum attr, GLfloat x) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - SAVE_FLUSH_VERTICES(ctx); - n = alloc_instruction(ctx, OPCODE_ATTR_1F_ARB, 2); - if (n) { - n[1].e = attr; - n[2].f = x; - } - - ASSERT(attr < MAX_VERTEX_GENERIC_ATTRIBS); - ctx->ListState.ActiveAttribSize[attr] = 1; - ASSIGN_4V(ctx->ListState.CurrentAttrib[attr], x, 0, 0, 1); - - if (ctx->ExecuteFlag) { - CALL_VertexAttrib1fARB(ctx->Exec, (attr, x)); - } -} - -static void GLAPIENTRY -save_Attr2fARB(GLenum attr, GLfloat x, GLfloat y) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - SAVE_FLUSH_VERTICES(ctx); - n = alloc_instruction(ctx, OPCODE_ATTR_2F_ARB, 3); - if (n) { - n[1].e = attr; - n[2].f = x; - n[3].f = y; - } - - ASSERT(attr < MAX_VERTEX_GENERIC_ATTRIBS); - ctx->ListState.ActiveAttribSize[attr] = 2; - ASSIGN_4V(ctx->ListState.CurrentAttrib[attr], x, y, 0, 1); - - if (ctx->ExecuteFlag) { - CALL_VertexAttrib2fARB(ctx->Exec, (attr, x, y)); - } -} - -static void GLAPIENTRY -save_Attr3fARB(GLenum attr, GLfloat x, GLfloat y, GLfloat z) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - SAVE_FLUSH_VERTICES(ctx); - n = alloc_instruction(ctx, OPCODE_ATTR_3F_ARB, 4); - if (n) { - n[1].e = attr; - n[2].f = x; - n[3].f = y; - n[4].f = z; - } - - ASSERT(attr < MAX_VERTEX_GENERIC_ATTRIBS); - ctx->ListState.ActiveAttribSize[attr] = 3; - ASSIGN_4V(ctx->ListState.CurrentAttrib[attr], x, y, z, 1); - - if (ctx->ExecuteFlag) { - CALL_VertexAttrib3fARB(ctx->Exec, (attr, x, y, z)); - } -} - -static void GLAPIENTRY -save_Attr4fARB(GLenum attr, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - SAVE_FLUSH_VERTICES(ctx); - n = alloc_instruction(ctx, OPCODE_ATTR_4F_ARB, 5); - if (n) { - n[1].e = attr; - n[2].f = x; - n[3].f = y; - n[4].f = z; - n[5].f = w; - } - - ASSERT(attr < MAX_VERTEX_GENERIC_ATTRIBS); - ctx->ListState.ActiveAttribSize[attr] = 4; - ASSIGN_4V(ctx->ListState.CurrentAttrib[attr], x, y, z, w); - - if (ctx->ExecuteFlag) { - CALL_VertexAttrib4fARB(ctx->Exec, (attr, x, y, z, w)); - } -} - - static void GLAPIENTRY save_EvalCoord1f(GLfloat x) { @@ -5875,49 +4402,49 @@ save_Vertex4fv(const GLfloat * v) static void GLAPIENTRY save_TexCoord1f(GLfloat x) { - save_Attr1fNV(VERT_ATTRIB_TEX0, x); + save_Attr1fNV(VERT_ATTRIB_TEX, x); } static void GLAPIENTRY save_TexCoord1fv(const GLfloat * v) { - save_Attr1fNV(VERT_ATTRIB_TEX0, v[0]); + save_Attr1fNV(VERT_ATTRIB_TEX, v[0]); } static void GLAPIENTRY save_TexCoord2f(GLfloat x, GLfloat y) { - save_Attr2fNV(VERT_ATTRIB_TEX0, x, y); + save_Attr2fNV(VERT_ATTRIB_TEX, x, y); } static void GLAPIENTRY save_TexCoord2fv(const GLfloat * v) { - save_Attr2fNV(VERT_ATTRIB_TEX0, v[0], v[1]); + save_Attr2fNV(VERT_ATTRIB_TEX, v[0], v[1]); } static void GLAPIENTRY save_TexCoord3f(GLfloat x, GLfloat y, GLfloat z) { - save_Attr3fNV(VERT_ATTRIB_TEX0, x, y, z); + save_Attr3fNV(VERT_ATTRIB_TEX, x, y, z); } static void GLAPIENTRY save_TexCoord3fv(const GLfloat * v) { - save_Attr3fNV(VERT_ATTRIB_TEX0, v[0], v[1], v[2]); + save_Attr3fNV(VERT_ATTRIB_TEX, v[0], v[1], v[2]); } static void GLAPIENTRY save_TexCoord4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) { - save_Attr4fNV(VERT_ATTRIB_TEX0, x, y, z, w); + save_Attr4fNV(VERT_ATTRIB_TEX, x, y, z, w); } static void GLAPIENTRY save_TexCoord4fv(const GLfloat * v) { - save_Attr4fNV(VERT_ATTRIB_TEX0, v[0], v[1], v[2], v[3]); + save_Attr4fNV(VERT_ATTRIB_TEX, v[0], v[1], v[2], v[3]); } static void GLAPIENTRY @@ -5981,66 +4508,6 @@ save_SecondaryColor3fvEXT(const GLfloat * v) } -/* Just call the respective ATTR for texcoord - */ -static void GLAPIENTRY -save_MultiTexCoord1f(GLenum target, GLfloat x) -{ - GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0; - save_Attr1fNV(attr, x); -} - -static void GLAPIENTRY -save_MultiTexCoord1fv(GLenum target, const GLfloat * v) -{ - GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0; - save_Attr1fNV(attr, v[0]); -} - -static void GLAPIENTRY -save_MultiTexCoord2f(GLenum target, GLfloat x, GLfloat y) -{ - GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0; - save_Attr2fNV(attr, x, y); -} - -static void GLAPIENTRY -save_MultiTexCoord2fv(GLenum target, const GLfloat * v) -{ - GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0; - save_Attr2fNV(attr, v[0], v[1]); -} - -static void GLAPIENTRY -save_MultiTexCoord3f(GLenum target, GLfloat x, GLfloat y, GLfloat z) -{ - GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0; - save_Attr3fNV(attr, x, y, z); -} - -static void GLAPIENTRY -save_MultiTexCoord3fv(GLenum target, const GLfloat * v) -{ - GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0; - save_Attr3fNV(attr, v[0], v[1], v[2]); -} - -static void GLAPIENTRY -save_MultiTexCoord4f(GLenum target, GLfloat x, GLfloat y, - GLfloat z, GLfloat w) -{ - GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0; - save_Attr4fNV(attr, x, y, z, w); -} - -static void GLAPIENTRY -save_MultiTexCoord4fv(GLenum target, const GLfloat * v) -{ - GLuint attr = (target & 0x7) + VERT_ATTRIB_TEX0; - save_Attr4fNV(attr, v[0], v[1], v[2], v[3]); -} - - /** * Record a GL_INVALID_VALUE error when a invalid vertex attribute * index is found. @@ -6131,919 +4598,6 @@ save_VertexAttrib4fvNV(GLuint index, const GLfloat * v) } - - -static void GLAPIENTRY -save_VertexAttrib1fARB(GLuint index, GLfloat x) -{ - if (index < MAX_VERTEX_GENERIC_ATTRIBS) - save_Attr1fARB(index, x); - else - index_error(); -} - -static void GLAPIENTRY -save_VertexAttrib1fvARB(GLuint index, const GLfloat * v) -{ - if (index < MAX_VERTEX_GENERIC_ATTRIBS) - save_Attr1fARB(index, v[0]); - else - index_error(); -} - -static void GLAPIENTRY -save_VertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y) -{ - if (index < MAX_VERTEX_GENERIC_ATTRIBS) - save_Attr2fARB(index, x, y); - else - index_error(); -} - -static void GLAPIENTRY -save_VertexAttrib2fvARB(GLuint index, const GLfloat * v) -{ - if (index < MAX_VERTEX_GENERIC_ATTRIBS) - save_Attr2fARB(index, v[0], v[1]); - else - index_error(); -} - -static void GLAPIENTRY -save_VertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z) -{ - if (index < MAX_VERTEX_GENERIC_ATTRIBS) - save_Attr3fARB(index, x, y, z); - else - index_error(); -} - -static void GLAPIENTRY -save_VertexAttrib3fvARB(GLuint index, const GLfloat * v) -{ - if (index < MAX_VERTEX_GENERIC_ATTRIBS) - save_Attr3fARB(index, v[0], v[1], v[2]); - else - index_error(); -} - -static void GLAPIENTRY -save_VertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z, - GLfloat w) -{ - if (index < MAX_VERTEX_GENERIC_ATTRIBS) - save_Attr4fARB(index, x, y, z, w); - else - index_error(); -} - -static void GLAPIENTRY -save_VertexAttrib4fvARB(GLuint index, const GLfloat * v) -{ - if (index < MAX_VERTEX_GENERIC_ATTRIBS) - save_Attr4fARB(index, v[0], v[1], v[2], v[3]); - else - index_error(); -} - - -/* GL_ARB_shader_objects, GL_ARB_vertex/fragment_shader */ - -static void GLAPIENTRY -exec_BindAttribLocationARB(GLuint program, GLuint index, const GLchar *name) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - CALL_BindAttribLocationARB(ctx->Exec, (program, index, name)); -} - -static GLint GLAPIENTRY -exec_GetAttribLocationARB(GLuint program, const GLchar *name) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - return CALL_GetAttribLocationARB(ctx->Exec, (program, name)); -} - -static GLint GLAPIENTRY -exec_GetUniformLocationARB(GLuint program, const GLchar *name) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - return CALL_GetUniformLocationARB(ctx->Exec, (program, name)); -} -/* XXX more shader functions needed here */ - - -#if FEATURE_EXT_framebuffer_blit -static void GLAPIENTRY -save_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, - GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, - GLbitfield mask, GLenum filter) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_BLIT_FRAMEBUFFER, 10); - if (n) { - n[1].i = srcX0; - n[2].i = srcY0; - n[3].i = srcX1; - n[4].i = srcY1; - n[5].i = dstX0; - n[6].i = dstY0; - n[7].i = dstX1; - n[8].i = dstY1; - n[9].i = mask; - n[10].e = filter; - } - if (ctx->ExecuteFlag) { - CALL_BlitFramebufferEXT(ctx->Exec, (srcX0, srcY0, srcX1, srcY1, - dstX0, dstY0, dstX1, dstY1, - mask, filter)); - } -} -#endif - - -/** GL_EXT_provoking_vertex */ -static void GLAPIENTRY -save_ProvokingVertexEXT(GLenum mode) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_PROVOKING_VERTEX, 1); - if (n) { - n[1].e = mode; - } - if (ctx->ExecuteFlag) { - /*CALL_ProvokingVertexEXT(ctx->Exec, (mode));*/ - _mesa_ProvokingVertexEXT(mode); - } -} - - -/** GL_EXT_transform_feedback */ -static void GLAPIENTRY -save_BeginTransformFeedback(GLenum mode) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_BEGIN_TRANSFORM_FEEDBACK, 1); - if (n) { - n[1].e = mode; - } - if (ctx->ExecuteFlag) { - CALL_BeginTransformFeedbackEXT(ctx->Exec, (mode)); - } -} - - -/** GL_EXT_transform_feedback */ -static void GLAPIENTRY -save_EndTransformFeedback(void) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - (void) alloc_instruction(ctx, OPCODE_END_TRANSFORM_FEEDBACK, 0); - if (ctx->ExecuteFlag) { - CALL_EndTransformFeedbackEXT(ctx->Exec, ()); - } -} - -static void GLAPIENTRY -save_BindTransformFeedback(GLenum target, GLuint name) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_BIND_TRANSFORM_FEEDBACK, 2); - if (n) { - n[1].e = target; - n[2].ui = name; - } - if (ctx->ExecuteFlag) { - CALL_BindTransformFeedback(ctx->Exec, (target, name)); - } -} - -static void GLAPIENTRY -save_PauseTransformFeedback(void) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - (void) alloc_instruction(ctx, OPCODE_PAUSE_TRANSFORM_FEEDBACK, 0); - if (ctx->ExecuteFlag) { - CALL_PauseTransformFeedback(ctx->Exec, ()); - } -} - -static void GLAPIENTRY -save_ResumeTransformFeedback(void) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - (void) alloc_instruction(ctx, OPCODE_RESUME_TRANSFORM_FEEDBACK, 0); - if (ctx->ExecuteFlag) { - CALL_ResumeTransformFeedback(ctx->Exec, ()); - } -} - -static void GLAPIENTRY -save_DrawTransformFeedback(GLenum mode, GLuint name) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_DRAW_TRANSFORM_FEEDBACK, 2); - if (n) { - n[1].e = mode; - n[2].ui = name; - } - if (ctx->ExecuteFlag) { - CALL_DrawTransformFeedback(ctx->Exec, (mode, name)); - } -} - - -/* aka UseProgram() */ -static void GLAPIENTRY -save_UseProgramObjectARB(GLhandleARB program) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_USE_PROGRAM, 1); - if (n) { - n[1].ui = program; - } - if (ctx->ExecuteFlag) { - CALL_UseProgramObjectARB(ctx->Exec, (program)); - } -} - - -static void GLAPIENTRY -save_Uniform1fARB(GLint location, GLfloat x) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_1F, 2); - if (n) { - n[1].i = location; - n[2].f = x; - } - if (ctx->ExecuteFlag) { - CALL_Uniform1fARB(ctx->Exec, (location, x)); - } -} - - -static void GLAPIENTRY -save_Uniform2fARB(GLint location, GLfloat x, GLfloat y) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_2F, 3); - if (n) { - n[1].i = location; - n[2].f = x; - n[3].f = y; - } - if (ctx->ExecuteFlag) { - CALL_Uniform2fARB(ctx->Exec, (location, x, y)); - } -} - - -static void GLAPIENTRY -save_Uniform3fARB(GLint location, GLfloat x, GLfloat y, GLfloat z) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_3F, 4); - if (n) { - n[1].i = location; - n[2].f = x; - n[3].f = y; - n[4].f = z; - } - if (ctx->ExecuteFlag) { - CALL_Uniform3fARB(ctx->Exec, (location, x, y, z)); - } -} - - -static void GLAPIENTRY -save_Uniform4fARB(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_4F, 5); - if (n) { - n[1].i = location; - n[2].f = x; - n[3].f = y; - n[4].f = z; - n[5].f = w; - } - if (ctx->ExecuteFlag) { - CALL_Uniform4fARB(ctx->Exec, (location, x, y, z, w)); - } -} - - -/** Return copy of memory */ -static void * -memdup(const void *src, GLsizei bytes) -{ - void *b = bytes >= 0 ? malloc(bytes) : NULL; - if (b) - memcpy(b, src, bytes); - return b; -} - - -static void GLAPIENTRY -save_Uniform1fvARB(GLint location, GLsizei count, const GLfloat *v) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_1FV, 3); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].data = memdup(v, count * 1 * sizeof(GLfloat)); - } - if (ctx->ExecuteFlag) { - CALL_Uniform1fvARB(ctx->Exec, (location, count, v)); - } -} - -static void GLAPIENTRY -save_Uniform2fvARB(GLint location, GLsizei count, const GLfloat *v) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_2FV, 3); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].data = memdup(v, count * 2 * sizeof(GLfloat)); - } - if (ctx->ExecuteFlag) { - CALL_Uniform2fvARB(ctx->Exec, (location, count, v)); - } -} - -static void GLAPIENTRY -save_Uniform3fvARB(GLint location, GLsizei count, const GLfloat *v) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_3FV, 3); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].data = memdup(v, count * 3 * sizeof(GLfloat)); - } - if (ctx->ExecuteFlag) { - CALL_Uniform3fvARB(ctx->Exec, (location, count, v)); - } -} - -static void GLAPIENTRY -save_Uniform4fvARB(GLint location, GLsizei count, const GLfloat *v) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_4FV, 3); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].data = memdup(v, count * 4 * sizeof(GLfloat)); - } - if (ctx->ExecuteFlag) { - CALL_Uniform4fvARB(ctx->Exec, (location, count, v)); - } -} - - -static void GLAPIENTRY -save_Uniform1iARB(GLint location, GLint x) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_1I, 2); - if (n) { - n[1].i = location; - n[2].i = x; - } - if (ctx->ExecuteFlag) { - CALL_Uniform1iARB(ctx->Exec, (location, x)); - } -} - -static void GLAPIENTRY -save_Uniform2iARB(GLint location, GLint x, GLint y) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_2I, 3); - if (n) { - n[1].i = location; - n[2].i = x; - n[3].i = y; - } - if (ctx->ExecuteFlag) { - CALL_Uniform2iARB(ctx->Exec, (location, x, y)); - } -} - -static void GLAPIENTRY -save_Uniform3iARB(GLint location, GLint x, GLint y, GLint z) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_3I, 4); - if (n) { - n[1].i = location; - n[2].i = x; - n[3].i = y; - n[4].i = z; - } - if (ctx->ExecuteFlag) { - CALL_Uniform3iARB(ctx->Exec, (location, x, y, z)); - } -} - -static void GLAPIENTRY -save_Uniform4iARB(GLint location, GLint x, GLint y, GLint z, GLint w) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_4I, 5); - if (n) { - n[1].i = location; - n[2].i = x; - n[3].i = y; - n[4].i = z; - n[5].i = w; - } - if (ctx->ExecuteFlag) { - CALL_Uniform4iARB(ctx->Exec, (location, x, y, z, w)); - } -} - - - -static void GLAPIENTRY -save_Uniform1ivARB(GLint location, GLsizei count, const GLint *v) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_1IV, 3); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].data = memdup(v, count * 1 * sizeof(GLint)); - } - if (ctx->ExecuteFlag) { - CALL_Uniform1ivARB(ctx->Exec, (location, count, v)); - } -} - -static void GLAPIENTRY -save_Uniform2ivARB(GLint location, GLsizei count, const GLint *v) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_2IV, 3); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].data = memdup(v, count * 2 * sizeof(GLint)); - } - if (ctx->ExecuteFlag) { - CALL_Uniform2ivARB(ctx->Exec, (location, count, v)); - } -} - -static void GLAPIENTRY -save_Uniform3ivARB(GLint location, GLsizei count, const GLint *v) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_3IV, 3); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].data = memdup(v, count * 3 * sizeof(GLint)); - } - if (ctx->ExecuteFlag) { - CALL_Uniform3ivARB(ctx->Exec, (location, count, v)); - } -} - -static void GLAPIENTRY -save_Uniform4ivARB(GLint location, GLsizei count, const GLint *v) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_4IV, 3); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].data = memdup(v, count * 4 * sizeof(GLfloat)); - } - if (ctx->ExecuteFlag) { - CALL_Uniform4ivARB(ctx->Exec, (location, count, v)); - } -} - - - -static void GLAPIENTRY -save_Uniform1ui(GLint location, GLuint x) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_1UI, 2); - if (n) { - n[1].i = location; - n[2].i = x; - } - if (ctx->ExecuteFlag) { - /*CALL_Uniform1ui(ctx->Exec, (location, x));*/ - } -} - -static void GLAPIENTRY -save_Uniform2ui(GLint location, GLuint x, GLuint y) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_2UI, 3); - if (n) { - n[1].i = location; - n[2].i = x; - n[3].i = y; - } - if (ctx->ExecuteFlag) { - /*CALL_Uniform2ui(ctx->Exec, (location, x, y));*/ - } -} - -static void GLAPIENTRY -save_Uniform3ui(GLint location, GLuint x, GLuint y, GLuint z) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_3UI, 4); - if (n) { - n[1].i = location; - n[2].i = x; - n[3].i = y; - n[4].i = z; - } - if (ctx->ExecuteFlag) { - /*CALL_Uniform3ui(ctx->Exec, (location, x, y, z));*/ - } -} - -static void GLAPIENTRY -save_Uniform4ui(GLint location, GLuint x, GLuint y, GLuint z, GLuint w) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_4UI, 5); - if (n) { - n[1].i = location; - n[2].i = x; - n[3].i = y; - n[4].i = z; - n[5].i = w; - } - if (ctx->ExecuteFlag) { - /*CALL_Uniform4ui(ctx->Exec, (location, x, y, z, w));*/ - } -} - - - -static void GLAPIENTRY -save_Uniform1uiv(GLint location, GLsizei count, const GLuint *v) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_1UIV, 3); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].data = memdup(v, count * 1 * sizeof(*v)); - } - if (ctx->ExecuteFlag) { - /*CALL_Uniform1uiv(ctx->Exec, (location, count, v));*/ - } -} - -static void GLAPIENTRY -save_Uniform2uiv(GLint location, GLsizei count, const GLuint *v) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_2UIV, 3); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].data = memdup(v, count * 2 * sizeof(*v)); - } - if (ctx->ExecuteFlag) { - /*CALL_Uniform2uiv(ctx->Exec, (location, count, v));*/ - } -} - -static void GLAPIENTRY -save_Uniform3uiv(GLint location, GLsizei count, const GLuint *v) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_3UIV, 3); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].data = memdup(v, count * 3 * sizeof(*v)); - } - if (ctx->ExecuteFlag) { - /*CALL_Uniform3uiv(ctx->Exec, (location, count, v));*/ - } -} - -static void GLAPIENTRY -save_Uniform4uiv(GLint location, GLsizei count, const GLuint *v) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_4UIV, 3); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].data = memdup(v, count * 4 * sizeof(*v)); - } - if (ctx->ExecuteFlag) { - /*CALL_Uniform4uiv(ctx->Exec, (location, count, v));*/ - } -} - - - -static void GLAPIENTRY -save_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *m) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX22, 4); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].b = transpose; - n[4].data = memdup(m, count * 2 * 2 * sizeof(GLfloat)); - } - if (ctx->ExecuteFlag) { - CALL_UniformMatrix2fvARB(ctx->Exec, (location, count, transpose, m)); - } -} - -static void GLAPIENTRY -save_UniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *m) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX33, 4); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].b = transpose; - n[4].data = memdup(m, count * 3 * 3 * sizeof(GLfloat)); - } - if (ctx->ExecuteFlag) { - CALL_UniformMatrix3fvARB(ctx->Exec, (location, count, transpose, m)); - } -} - -static void GLAPIENTRY -save_UniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *m) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX44, 4); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].b = transpose; - n[4].data = memdup(m, count * 4 * 4 * sizeof(GLfloat)); - } - if (ctx->ExecuteFlag) { - CALL_UniformMatrix4fvARB(ctx->Exec, (location, count, transpose, m)); - } -} - - -static void GLAPIENTRY -save_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *m) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX23, 4); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].b = transpose; - n[4].data = memdup(m, count * 2 * 3 * sizeof(GLfloat)); - } - if (ctx->ExecuteFlag) { - CALL_UniformMatrix2x3fv(ctx->Exec, (location, count, transpose, m)); - } -} - -static void GLAPIENTRY -save_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *m) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX32, 4); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].b = transpose; - n[4].data = memdup(m, count * 3 * 2 * sizeof(GLfloat)); - } - if (ctx->ExecuteFlag) { - CALL_UniformMatrix3x2fv(ctx->Exec, (location, count, transpose, m)); - } -} - - -static void GLAPIENTRY -save_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *m) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX24, 4); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].b = transpose; - n[4].data = memdup(m, count * 2 * 4 * sizeof(GLfloat)); - } - if (ctx->ExecuteFlag) { - CALL_UniformMatrix2x4fv(ctx->Exec, (location, count, transpose, m)); - } -} - -static void GLAPIENTRY -save_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *m) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX42, 4); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].b = transpose; - n[4].data = memdup(m, count * 4 * 2 * sizeof(GLfloat)); - } - if (ctx->ExecuteFlag) { - CALL_UniformMatrix4x2fv(ctx->Exec, (location, count, transpose, m)); - } -} - - -static void GLAPIENTRY -save_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *m) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX34, 4); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].b = transpose; - n[4].data = memdup(m, count * 3 * 4 * sizeof(GLfloat)); - } - if (ctx->ExecuteFlag) { - CALL_UniformMatrix3x4fv(ctx->Exec, (location, count, transpose, m)); - } -} - -static void GLAPIENTRY -save_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, - const GLfloat *m) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX43, 4); - if (n) { - n[1].i = location; - n[2].i = count; - n[3].b = transpose; - n[4].data = memdup(m, count * 4 * 3 * sizeof(GLfloat)); - } - if (ctx->ExecuteFlag) { - CALL_UniformMatrix4x3fv(ctx->Exec, (location, count, transpose, m)); - } -} - -static void GLAPIENTRY -save_ClampColorARB(GLenum target, GLenum clamp) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_CLAMP_COLOR, 2); - if (n) { - n[1].e = target; - n[2].e = clamp; - } - if (ctx->ExecuteFlag) { - CALL_ClampColorARB(ctx->Exec, (target, clamp)); - } -} - -static void GLAPIENTRY -save_UseShaderProgramEXT(GLenum type, GLuint program) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_USE_SHADER_PROGRAM_EXT, 2); - if (n) { - n[1].ui = type; - n[2].ui = program; - } - if (ctx->ExecuteFlag) { - CALL_UseShaderProgramEXT(ctx->Exec, (type, program)); - } -} - -static void GLAPIENTRY -save_ActiveProgramEXT(GLuint program) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_ACTIVE_PROGRAM_EXT, 1); - if (n) { - n[1].ui = program; - } - if (ctx->ExecuteFlag) { - CALL_ActiveProgramEXT(ctx->Exec, (program)); - } -} - /** GL_EXT_texture_integer */ static void GLAPIENTRY save_ClearColorIi(GLint red, GLint green, GLint blue, GLint alpha) @@ -7143,24 +4697,6 @@ exec_GetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params) } -/* GL_ARB_instanced_arrays */ -static void GLAPIENTRY -save_VertexAttribDivisor(GLuint index, GLuint divisor) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_VERTEX_ATTRIB_DIVISOR, 2); - if (n) { - n[1].ui = index; - n[2].ui = divisor; - } - if (ctx->ExecuteFlag) { - CALL_VertexAttribDivisorARB(ctx->Exec, (index, divisor)); - } -} - - /* GL_NV_texture_barrier */ static void GLAPIENTRY save_TextureBarrierNV(void) @@ -7173,246 +4709,6 @@ save_TextureBarrierNV(void) } } - -/* GL_ARB_sampler_objects */ -static void GLAPIENTRY -save_BindSampler(GLuint unit, GLuint sampler) -{ - Node *n; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_BIND_SAMPLER, 2); - if (n) { - n[1].ui = unit; - n[2].ui = sampler; - } - if (ctx->ExecuteFlag) { - CALL_BindSampler(ctx->Exec, (unit, sampler)); - } -} - -static void GLAPIENTRY -save_SamplerParameteriv(GLuint sampler, GLenum pname, const GLint *params) -{ - Node *n; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_SAMPLER_PARAMETERIV, 6); - if (n) { - n[1].ui = sampler; - n[2].e = pname; - n[3].i = params[0]; - if (pname == GL_TEXTURE_BORDER_COLOR) { - n[4].i = params[1]; - n[5].i = params[2]; - n[6].i = params[3]; - } - else { - n[4].i = n[5].i = n[6].i = 0; - } - } - if (ctx->ExecuteFlag) { - CALL_SamplerParameteriv(ctx->Exec, (sampler, pname, params)); - } -} - -static void GLAPIENTRY -save_SamplerParameteri(GLuint sampler, GLenum pname, GLint param) -{ - save_SamplerParameteriv(sampler, pname, ¶m); -} - -static void GLAPIENTRY -save_SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *params) -{ - Node *n; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_SAMPLER_PARAMETERFV, 6); - if (n) { - n[1].ui = sampler; - n[2].e = pname; - n[3].f = params[0]; - if (pname == GL_TEXTURE_BORDER_COLOR) { - n[4].f = params[1]; - n[5].f = params[2]; - n[6].f = params[3]; - } - else { - n[4].f = n[5].f = n[6].f = 0.0F; - } - } - if (ctx->ExecuteFlag) { - CALL_SamplerParameterfv(ctx->Exec, (sampler, pname, params)); - } -} - -static void GLAPIENTRY -save_SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) -{ - save_SamplerParameterfv(sampler, pname, ¶m); -} - -static void GLAPIENTRY -save_SamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *params) -{ - Node *n; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_SAMPLER_PARAMETERIIV, 6); - if (n) { - n[1].ui = sampler; - n[2].e = pname; - n[3].i = params[0]; - if (pname == GL_TEXTURE_BORDER_COLOR) { - n[4].i = params[1]; - n[5].i = params[2]; - n[6].i = params[3]; - } - else { - n[4].i = n[5].i = n[6].i = 0; - } - } - if (ctx->ExecuteFlag) { - CALL_SamplerParameterIiv(ctx->Exec, (sampler, pname, params)); - } -} - -static void GLAPIENTRY -save_SamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *params) -{ - Node *n; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_SAMPLER_PARAMETERUIV, 6); - if (n) { - n[1].ui = sampler; - n[2].e = pname; - n[3].ui = params[0]; - if (pname == GL_TEXTURE_BORDER_COLOR) { - n[4].ui = params[1]; - n[5].ui = params[2]; - n[6].ui = params[3]; - } - else { - n[4].ui = n[5].ui = n[6].ui = 0; - } - } - if (ctx->ExecuteFlag) { - CALL_SamplerParameterIuiv(ctx->Exec, (sampler, pname, params)); - } -} - -/* GL_ARB_geometry_shader4 */ -static void GLAPIENTRY -save_ProgramParameteri(GLuint program, GLenum pname, GLint value) -{ - Node *n; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_PROGRAM_PARAMETERI, 3); - if (n) { - n[1].ui = program; - n[2].e = pname; - n[3].i = value; - } - if (ctx->ExecuteFlag) { - CALL_ProgramParameteriARB(ctx->Exec, (program, pname, value)); - } -} - -static void GLAPIENTRY -save_FramebufferTexture(GLenum target, GLenum attachment, - GLuint texture, GLint level) -{ - Node *n; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_FRAMEBUFFER_TEXTURE, 4); - if (n) { - n[1].e = target; - n[2].e = attachment; - n[3].ui = texture; - n[4].i = level; - } - if (ctx->ExecuteFlag) { - CALL_FramebufferTextureARB(ctx->Exec, (target, attachment, texture, level)); - } -} - -static void GLAPIENTRY -save_FramebufferTextureFace(GLenum target, GLenum attachment, - GLuint texture, GLint level, GLenum face) -{ - Node *n; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_FRAMEBUFFER_TEXTURE_FACE, 5); - if (n) { - n[1].e = target; - n[2].e = attachment; - n[3].ui = texture; - n[4].i = level; - n[5].e = face; - } - if (ctx->ExecuteFlag) { - CALL_FramebufferTextureFaceARB(ctx->Exec, (target, attachment, texture, - level, face)); - } -} - - - -static void GLAPIENTRY -save_WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) -{ - Node *n; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_WAIT_SYNC, 4); - if (n) { - union uint64_pair p; - p.uint64 = timeout; - n[1].data = sync; - n[2].e = flags; - n[3].ui = p.uint32[0]; - n[4].ui = p.uint32[1]; - } - if (ctx->ExecuteFlag) { - CALL_WaitSync(ctx->Exec, (sync, flags, timeout)); - } -} - - -/** GL_NV_conditional_render */ -static void GLAPIENTRY -save_BeginConditionalRender(GLuint queryId, GLenum mode) -{ - GET_CURRENT_CONTEXT(ctx); - Node *n; - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - n = alloc_instruction(ctx, OPCODE_BEGIN_CONDITIONAL_RENDER, 2); - if (n) { - n[1].i = queryId; - n[2].e = mode; - } - if (ctx->ExecuteFlag) { - CALL_BeginConditionalRenderNV(ctx->Exec, (queryId, mode)); - } -} - -static void GLAPIENTRY -save_EndConditionalRender(void) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx); - alloc_instruction(ctx, OPCODE_END_CONDITIONAL_RENDER, 0); - if (ctx->ExecuteFlag) { - CALL_EndConditionalRenderNV(ctx->Exec, ()); - } -} - - /** * Save an error-generating command into display list. * @@ -7542,25 +4838,6 @@ execute_list(struct gl_context *ctx, GLuint list) (n[1].e, n[2].e, n[3].e, n[4].e)); break; - case OPCODE_BLEND_FUNC_I: - /* GL_ARB_draw_buffers_blend */ - CALL_BlendFunciARB(ctx->Exec, (n[1].ui, n[2].e, n[3].e)); - break; - case OPCODE_BLEND_FUNC_SEPARATE_I: - /* GL_ARB_draw_buffers_blend */ - CALL_BlendFuncSeparateiARB(ctx->Exec, (n[1].ui, n[2].e, n[3].e, - n[4].e, n[5].e)); - break; - case OPCODE_BLEND_EQUATION_I: - /* GL_ARB_draw_buffers_blend */ - CALL_BlendEquationiARB(ctx->Exec, (n[1].ui, n[2].e)); - break; - case OPCODE_BLEND_EQUATION_SEPARATE_I: - /* GL_ARB_draw_buffers_blend */ - CALL_BlendEquationSeparateiARB(ctx->Exec, - (n[1].ui, n[2].e, n[3].e)); - break; - case OPCODE_CALL_LIST: /* Generated by glCallList(), don't add ListBase */ if (ctx->ListState.CallDepth < MAX_LIST_NESTING) { @@ -7581,39 +4858,6 @@ execute_list(struct gl_context *ctx, GLuint list) case OPCODE_CLEAR: CALL_Clear(ctx->Exec, (n[1].bf)); break; - case OPCODE_CLEAR_BUFFER_IV: - { - GLint value[4]; - value[0] = n[3].i; - value[1] = n[4].i; - value[2] = n[5].i; - value[3] = n[6].i; - CALL_ClearBufferiv(ctx->Exec, (n[1].e, n[2].i, value)); - } - break; - case OPCODE_CLEAR_BUFFER_UIV: - { - GLuint value[4]; - value[0] = n[3].ui; - value[1] = n[4].ui; - value[2] = n[5].ui; - value[3] = n[6].ui; - CALL_ClearBufferuiv(ctx->Exec, (n[1].e, n[2].i, value)); - } - break; - case OPCODE_CLEAR_BUFFER_FV: - { - GLfloat value[4]; - value[0] = n[3].f; - value[1] = n[4].f; - value[2] = n[5].f; - value[3] = n[6].f; - CALL_ClearBufferfv(ctx->Exec, (n[1].e, n[2].i, value)); - } - break; - case OPCODE_CLEAR_BUFFER_FI: - CALL_ClearBufferfi(ctx->Exec, (n[1].e, n[2].i, n[3].f, n[4].i)); - break; case OPCODE_CLEAR_COLOR: CALL_ClearColor(ctx->Exec, (n[1].f, n[2].f, n[3].f, n[4].f)); break; @@ -7642,10 +4886,6 @@ execute_list(struct gl_context *ctx, GLuint list) case OPCODE_COLOR_MASK: CALL_ColorMask(ctx->Exec, (n[1].b, n[2].b, n[3].b, n[4].b)); break; - case OPCODE_COLOR_MASK_INDEXED: - CALL_ColorMaskIndexedEXT(ctx->Exec, (n[1].ui, n[2].b, n[3].b, - n[4].b, n[5].b)); - break; case OPCODE_COLOR_MATERIAL: CALL_ColorMaterial(ctx->Exec, (n[1].e, n[2].e)); break; @@ -7788,9 +5028,6 @@ execute_list(struct gl_context *ctx, GLuint list) case OPCODE_DISABLE: CALL_Disable(ctx->Exec, (n[1].e)); break; - case OPCODE_DISABLE_INDEXED: - CALL_DisableIndexedEXT(ctx->Exec, (n[1].ui, n[2].e)); - break; case OPCODE_DRAW_BUFFER: CALL_DrawBuffer(ctx->Exec, (n[1].e)); break; @@ -7806,9 +5043,6 @@ execute_list(struct gl_context *ctx, GLuint list) case OPCODE_ENABLE: CALL_Enable(ctx->Exec, (n[1].e)); break; - case OPCODE_ENABLE_INDEXED: - CALL_EnableIndexedEXT(ctx->Exec, (n[1].ui, n[2].e)); - break; case OPCODE_EVALMESH1: CALL_EvalMesh1(ctx->Exec, (n[1].e, n[2].i, n[3].i)); break; @@ -8037,9 +5271,6 @@ execute_list(struct gl_context *ctx, GLuint list) case OPCODE_SHADE_MODEL: CALL_ShadeModel(ctx->Exec, (n[1].e)); break; - case OPCODE_PROVOKING_VERTEX: - CALL_ProvokingVertexEXT(ctx->Exec, (n[1].e)); - break; case OPCODE_STENCIL_FUNC: CALL_StencilFunc(ctx->Exec, (n[1].e, n[2].i, n[3].ui)); break; @@ -8049,17 +5280,6 @@ execute_list(struct gl_context *ctx, GLuint list) case OPCODE_STENCIL_OP: CALL_StencilOp(ctx->Exec, (n[1].e, n[2].e, n[3].e)); break; - case OPCODE_STENCIL_FUNC_SEPARATE: - CALL_StencilFuncSeparate(ctx->Exec, - (n[1].e, n[2].e, n[3].i, n[4].ui)); - break; - case OPCODE_STENCIL_MASK_SEPARATE: - CALL_StencilMaskSeparate(ctx->Exec, (n[1].e, n[2].ui)); - break; - case OPCODE_STENCIL_OP_SEPARATE: - CALL_StencilOpSeparate(ctx->Exec, - (n[1].e, n[2].e, n[3].e, n[4].e)); - break; case OPCODE_TEXENV: { GLfloat params[4]; @@ -8180,53 +5400,12 @@ execute_list(struct gl_context *ctx, GLuint list) case OPCODE_WINDOW_POS: CALL_WindowPos4fMESA(ctx->Exec, (n[1].f, n[2].f, n[3].f, n[4].f)); break; - case OPCODE_ACTIVE_TEXTURE: /* GL_ARB_multitexture */ - CALL_ActiveTextureARB(ctx->Exec, (n[1].e)); - break; - case OPCODE_COMPRESSED_TEX_IMAGE_1D: /* GL_ARB_texture_compression */ - CALL_CompressedTexImage1DARB(ctx->Exec, (n[1].e, n[2].i, n[3].e, - n[4].i, n[5].i, n[6].i, - n[7].data)); - break; - case OPCODE_COMPRESSED_TEX_IMAGE_2D: /* GL_ARB_texture_compression */ - CALL_CompressedTexImage2DARB(ctx->Exec, (n[1].e, n[2].i, n[3].e, - n[4].i, n[5].i, n[6].i, - n[7].i, n[8].data)); - break; - case OPCODE_COMPRESSED_TEX_IMAGE_3D: /* GL_ARB_texture_compression */ - CALL_CompressedTexImage3DARB(ctx->Exec, (n[1].e, n[2].i, n[3].e, - n[4].i, n[5].i, n[6].i, - n[7].i, n[8].i, - n[9].data)); - break; - case OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D: /* GL_ARB_texture_compress */ - CALL_CompressedTexSubImage1DARB(ctx->Exec, - (n[1].e, n[2].i, n[3].i, n[4].i, - n[5].e, n[6].i, n[7].data)); - break; - case OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D: /* GL_ARB_texture_compress */ - CALL_CompressedTexSubImage2DARB(ctx->Exec, - (n[1].e, n[2].i, n[3].i, n[4].i, - n[5].i, n[6].i, n[7].e, n[8].i, - n[9].data)); - break; - case OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D: /* GL_ARB_texture_compress */ - CALL_CompressedTexSubImage3DARB(ctx->Exec, - (n[1].e, n[2].i, n[3].i, n[4].i, - n[5].i, n[6].i, n[7].i, n[8].i, - n[9].e, n[10].i, n[11].data)); - break; case OPCODE_SAMPLE_COVERAGE: /* GL_ARB_multisample */ CALL_SampleCoverageARB(ctx->Exec, (n[1].f, n[2].b)); break; case OPCODE_WINDOW_POS_ARB: /* GL_ARB_window_pos */ CALL_WindowPos3fMESA(ctx->Exec, (n[1].f, n[2].f, n[3].f)); break; -#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program - case OPCODE_BIND_PROGRAM_NV: /* GL_NV_vertex_program */ - CALL_BindProgramNV(ctx->Exec, (n[1].e, n[2].ui)); - break; -#endif #if FEATURE_NV_vertex_program case OPCODE_EXECUTE_PROGRAM_NV: { @@ -8252,11 +5431,6 @@ execute_list(struct gl_context *ctx, GLuint list) #endif #if FEATURE_NV_fragment_program - case OPCODE_PROGRAM_LOCAL_PARAMETER_ARB: - CALL_ProgramLocalParameter4fARB(ctx->Exec, - (n[1].e, n[2].ui, n[3].f, n[4].f, - n[5].f, n[6].f)); - break; case OPCODE_PROGRAM_NAMED_PARAMETER_NV: CALL_ProgramNamedParameter4fNV(ctx->Exec, (n[1].ui, n[2].i, (const GLubyte *) n[3]. @@ -8265,201 +5439,10 @@ execute_list(struct gl_context *ctx, GLuint list) break; #endif - case OPCODE_ACTIVE_STENCIL_FACE_EXT: - CALL_ActiveStencilFaceEXT(ctx->Exec, (n[1].e)); - break; case OPCODE_DEPTH_BOUNDS_EXT: CALL_DepthBoundsEXT(ctx->Exec, (n[1].f, n[2].f)); break; -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program - case OPCODE_PROGRAM_STRING_ARB: - CALL_ProgramStringARB(ctx->Exec, - (n[1].e, n[2].e, n[3].i, n[4].data)); - break; -#endif -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program || FEATURE_NV_vertex_program - case OPCODE_PROGRAM_ENV_PARAMETER_ARB: - CALL_ProgramEnvParameter4fARB(ctx->Exec, (n[1].e, n[2].ui, n[3].f, - n[4].f, n[5].f, - n[6].f)); - break; -#endif -#if FEATURE_queryobj - case OPCODE_BEGIN_QUERY_ARB: - CALL_BeginQueryARB(ctx->Exec, (n[1].e, n[2].ui)); - break; - case OPCODE_END_QUERY_ARB: - CALL_EndQueryARB(ctx->Exec, (n[1].e)); - break; -#endif - case OPCODE_DRAW_BUFFERS_ARB: - { - GLenum buffers[MAX_DRAW_BUFFERS]; - GLint i, count = MIN2(n[1].i, MAX_DRAW_BUFFERS); - for (i = 0; i < count; i++) - buffers[i] = n[2 + i].e; - CALL_DrawBuffersARB(ctx->Exec, (n[1].i, buffers)); - } - break; -#if FEATURE_EXT_framebuffer_blit - case OPCODE_BLIT_FRAMEBUFFER: - CALL_BlitFramebufferEXT(ctx->Exec, (n[1].i, n[2].i, n[3].i, n[4].i, - n[5].i, n[6].i, n[7].i, n[8].i, - n[9].i, n[10].e)); - break; -#endif - case OPCODE_USE_PROGRAM: - CALL_UseProgramObjectARB(ctx->Exec, (n[1].ui)); - break; - case OPCODE_USE_SHADER_PROGRAM_EXT: - CALL_UseShaderProgramEXT(ctx->Exec, (n[1].ui, n[2].ui)); - break; - case OPCODE_ACTIVE_PROGRAM_EXT: - CALL_ActiveProgramEXT(ctx->Exec, (n[1].ui)); - break; - case OPCODE_UNIFORM_1F: - CALL_Uniform1fARB(ctx->Exec, (n[1].i, n[2].f)); - break; - case OPCODE_UNIFORM_2F: - CALL_Uniform2fARB(ctx->Exec, (n[1].i, n[2].f, n[3].f)); - break; - case OPCODE_UNIFORM_3F: - CALL_Uniform3fARB(ctx->Exec, (n[1].i, n[2].f, n[3].f, n[4].f)); - break; - case OPCODE_UNIFORM_4F: - CALL_Uniform4fARB(ctx->Exec, - (n[1].i, n[2].f, n[3].f, n[4].f, n[5].f)); - break; - case OPCODE_UNIFORM_1FV: - CALL_Uniform1fvARB(ctx->Exec, (n[1].i, n[2].i, n[3].data)); - break; - case OPCODE_UNIFORM_2FV: - CALL_Uniform2fvARB(ctx->Exec, (n[1].i, n[2].i, n[3].data)); - break; - case OPCODE_UNIFORM_3FV: - CALL_Uniform3fvARB(ctx->Exec, (n[1].i, n[2].i, n[3].data)); - break; - case OPCODE_UNIFORM_4FV: - CALL_Uniform4fvARB(ctx->Exec, (n[1].i, n[2].i, n[3].data)); - break; - case OPCODE_UNIFORM_1I: - CALL_Uniform1iARB(ctx->Exec, (n[1].i, n[2].i)); - break; - case OPCODE_UNIFORM_2I: - CALL_Uniform2iARB(ctx->Exec, (n[1].i, n[2].i, n[3].i)); - break; - case OPCODE_UNIFORM_3I: - CALL_Uniform3iARB(ctx->Exec, (n[1].i, n[2].i, n[3].i, n[4].i)); - break; - case OPCODE_UNIFORM_4I: - CALL_Uniform4iARB(ctx->Exec, - (n[1].i, n[2].i, n[3].i, n[4].i, n[5].i)); - break; - case OPCODE_UNIFORM_1IV: - CALL_Uniform1ivARB(ctx->Exec, (n[1].i, n[2].i, n[3].data)); - break; - case OPCODE_UNIFORM_2IV: - CALL_Uniform2ivARB(ctx->Exec, (n[1].i, n[2].i, n[3].data)); - break; - case OPCODE_UNIFORM_3IV: - CALL_Uniform3ivARB(ctx->Exec, (n[1].i, n[2].i, n[3].data)); - break; - case OPCODE_UNIFORM_4IV: - CALL_Uniform4ivARB(ctx->Exec, (n[1].i, n[2].i, n[3].data)); - break; - case OPCODE_UNIFORM_1UI: - /*CALL_Uniform1uiARB(ctx->Exec, (n[1].i, n[2].i));*/ - break; - case OPCODE_UNIFORM_2UI: - /*CALL_Uniform2uiARB(ctx->Exec, (n[1].i, n[2].i, n[3].i));*/ - break; - case OPCODE_UNIFORM_3UI: - /*CALL_Uniform3uiARB(ctx->Exec, (n[1].i, n[2].i, n[3].i, n[4].i));*/ - break; - case OPCODE_UNIFORM_4UI: - /*CALL_Uniform4uiARB(ctx->Exec, - (n[1].i, n[2].i, n[3].i, n[4].i, n[5].i)); - */ - break; - case OPCODE_UNIFORM_1UIV: - /*CALL_Uniform1uivARB(ctx->Exec, (n[1].i, n[2].i, n[3].data));*/ - break; - case OPCODE_UNIFORM_2UIV: - /*CALL_Uniform2uivARB(ctx->Exec, (n[1].i, n[2].i, n[3].data));*/ - break; - case OPCODE_UNIFORM_3UIV: - /*CALL_Uniform3uivARB(ctx->Exec, (n[1].i, n[2].i, n[3].data));*/ - break; - case OPCODE_UNIFORM_4UIV: - /*CALL_Uniform4uivARB(ctx->Exec, (n[1].i, n[2].i, n[3].data));*/ - break; - case OPCODE_UNIFORM_MATRIX22: - CALL_UniformMatrix2fvARB(ctx->Exec, - (n[1].i, n[2].i, n[3].b, n[4].data)); - break; - case OPCODE_UNIFORM_MATRIX33: - CALL_UniformMatrix3fvARB(ctx->Exec, - (n[1].i, n[2].i, n[3].b, n[4].data)); - break; - case OPCODE_UNIFORM_MATRIX44: - CALL_UniformMatrix4fvARB(ctx->Exec, - (n[1].i, n[2].i, n[3].b, n[4].data)); - break; - case OPCODE_UNIFORM_MATRIX23: - CALL_UniformMatrix2x3fv(ctx->Exec, - (n[1].i, n[2].i, n[3].b, n[4].data)); - break; - case OPCODE_UNIFORM_MATRIX32: - CALL_UniformMatrix3x2fv(ctx->Exec, - (n[1].i, n[2].i, n[3].b, n[4].data)); - break; - case OPCODE_UNIFORM_MATRIX24: - CALL_UniformMatrix2x4fv(ctx->Exec, - (n[1].i, n[2].i, n[3].b, n[4].data)); - break; - case OPCODE_UNIFORM_MATRIX42: - CALL_UniformMatrix4x2fv(ctx->Exec, - (n[1].i, n[2].i, n[3].b, n[4].data)); - break; - case OPCODE_UNIFORM_MATRIX34: - CALL_UniformMatrix3x4fv(ctx->Exec, - (n[1].i, n[2].i, n[3].b, n[4].data)); - break; - case OPCODE_UNIFORM_MATRIX43: - CALL_UniformMatrix4x3fv(ctx->Exec, - (n[1].i, n[2].i, n[3].b, n[4].data)); - break; - - case OPCODE_CLAMP_COLOR: - CALL_ClampColorARB(ctx->Exec, (n[1].e, n[2].e)); - break; - - case OPCODE_TEX_BUMP_PARAMETER_ATI: - { - GLfloat values[4]; - GLuint i, pname = n[1].ui; - - for (i = 0; i < 4; i++) - values[i] = n[1 + i].f; - CALL_TexBumpParameterfvATI(ctx->Exec, (pname, values)); - } - break; -#if FEATURE_ATI_fragment_shader - case OPCODE_BIND_FRAGMENT_SHADER_ATI: - CALL_BindFragmentShaderATI(ctx->Exec, (n[1].i)); - break; - case OPCODE_SET_FRAGMENT_SHADER_CONSTANTS_ATI: - { - GLfloat values[4]; - GLuint i, dst = n[1].ui; - - for (i = 0; i < 4; i++) - values[i] = n[1 + i].f; - CALL_SetFragmentShaderConstantATI(ctx->Exec, (dst, values)); - } - break; -#endif case OPCODE_ATTR_1F_NV: CALL_VertexAttrib1fNV(ctx->Exec, (n[1].e, n[2].f)); break; @@ -8489,39 +5472,8 @@ execute_list(struct gl_context *ctx, GLuint list) CALL_VertexAttrib4fNV(ctx->Exec, (n[1].e, n[2].f, n[3].f, n[4].f, n[5].f)); break; - case OPCODE_ATTR_1F_ARB: - CALL_VertexAttrib1fARB(ctx->Exec, (n[1].e, n[2].f)); - break; - case OPCODE_ATTR_2F_ARB: - /* Really shouldn't have to do this - the Node structure - * is convenient, but it would be better to store the data - * packed appropriately so that it can be sent directly - * on. With x86_64 becoming common, this will start to - * matter more. - */ - if (sizeof(Node) == sizeof(GLfloat)) - CALL_VertexAttrib2fvARB(ctx->Exec, (n[1].e, &n[2].f)); - else - CALL_VertexAttrib2fARB(ctx->Exec, (n[1].e, n[2].f, n[3].f)); - break; - case OPCODE_ATTR_3F_ARB: - if (sizeof(Node) == sizeof(GLfloat)) - CALL_VertexAttrib3fvARB(ctx->Exec, (n[1].e, &n[2].f)); - else - CALL_VertexAttrib3fARB(ctx->Exec, (n[1].e, n[2].f, n[3].f, - n[4].f)); - break; - case OPCODE_ATTR_4F_ARB: - if (sizeof(Node) == sizeof(GLfloat)) - CALL_VertexAttrib4fvARB(ctx->Exec, (n[1].e, &n[2].f)); - else - CALL_VertexAttrib4fARB(ctx->Exec, (n[1].e, n[2].f, n[3].f, - n[4].f, n[5].f)); - break; case OPCODE_MATERIAL: - if (sizeof(Node) == sizeof(GLfloat)) - CALL_Materialfv(ctx->Exec, (n[1].e, n[2].e, &n[3].f)); - else { + { GLfloat f[4]; f[0] = n[3].f; f[1] = n[4].f; @@ -8581,111 +5533,10 @@ execute_list(struct gl_context *ctx, GLuint list) } break; - case OPCODE_VERTEX_ATTRIB_DIVISOR: - /* GL_ARB_instanced_arrays */ - CALL_VertexAttribDivisorARB(ctx->Exec, (n[1].ui, n[2].ui)); - break; - case OPCODE_TEXTURE_BARRIER_NV: CALL_TextureBarrierNV(ctx->Exec, ()); break; - /* GL_EXT/ARB_transform_feedback */ - case OPCODE_BEGIN_TRANSFORM_FEEDBACK: - CALL_BeginTransformFeedbackEXT(ctx->Exec, (n[1].e)); - break; - case OPCODE_END_TRANSFORM_FEEDBACK: - CALL_EndTransformFeedbackEXT(ctx->Exec, ()); - break; - case OPCODE_BIND_TRANSFORM_FEEDBACK: - CALL_BindTransformFeedback(ctx->Exec, (n[1].e, n[2].ui)); - break; - case OPCODE_PAUSE_TRANSFORM_FEEDBACK: - CALL_PauseTransformFeedback(ctx->Exec, ()); - break; - case OPCODE_RESUME_TRANSFORM_FEEDBACK: - CALL_ResumeTransformFeedback(ctx->Exec, ()); - break; - case OPCODE_DRAW_TRANSFORM_FEEDBACK: - CALL_DrawTransformFeedback(ctx->Exec, (n[1].e, n[2].ui)); - break; - - - case OPCODE_BIND_SAMPLER: - CALL_BindSampler(ctx->Exec, (n[1].ui, n[2].ui)); - break; - case OPCODE_SAMPLER_PARAMETERIV: - { - GLint params[4]; - params[0] = n[3].i; - params[1] = n[4].i; - params[2] = n[5].i; - params[3] = n[6].i; - CALL_SamplerParameteriv(ctx->Exec, (n[1].ui, n[2].e, params)); - } - break; - case OPCODE_SAMPLER_PARAMETERFV: - { - GLfloat params[4]; - params[0] = n[3].f; - params[1] = n[4].f; - params[2] = n[5].f; - params[3] = n[6].f; - CALL_SamplerParameterfv(ctx->Exec, (n[1].ui, n[2].e, params)); - } - break; - case OPCODE_SAMPLER_PARAMETERIIV: - { - GLint params[4]; - params[0] = n[3].i; - params[1] = n[4].i; - params[2] = n[5].i; - params[3] = n[6].i; - CALL_SamplerParameterIiv(ctx->Exec, (n[1].ui, n[2].e, params)); - } - break; - case OPCODE_SAMPLER_PARAMETERUIV: - { - GLuint params[4]; - params[0] = n[3].ui; - params[1] = n[4].ui; - params[2] = n[5].ui; - params[3] = n[6].ui; - CALL_SamplerParameterIuiv(ctx->Exec, (n[1].ui, n[2].e, params)); - } - break; - - /* GL_ARB_geometry_shader4 */ - case OPCODE_PROGRAM_PARAMETERI: - CALL_ProgramParameteriARB(ctx->Exec, (n[1].ui, n[2].e, n[3].i)); - break; - case OPCODE_FRAMEBUFFER_TEXTURE: - CALL_FramebufferTextureARB(ctx->Exec, (n[1].e, n[2].e, - n[3].ui, n[4].i)); - break; - case OPCODE_FRAMEBUFFER_TEXTURE_FACE: - CALL_FramebufferTextureFaceARB(ctx->Exec, (n[1].e, n[2].e, - n[3].ui, n[4].i, n[5].e)); - break; - - /* GL_ARB_sync */ - case OPCODE_WAIT_SYNC: - { - union uint64_pair p; - p.uint32[0] = n[3].ui; - p.uint32[1] = n[4].ui; - CALL_WaitSync(ctx->Exec, (n[1].data, n[2].bf, p.uint64)); - } - break; - - /* GL_NV_conditional_render */ - case OPCODE_BEGIN_CONDITIONAL_RENDER: - CALL_BeginConditionalRenderNV(ctx->Exec, (n[1].i, n[2].e)); - break; - case OPCODE_END_CONDITIONAL_RENDER: - CALL_EndConditionalRenderNV(ctx->Exec, ()); - break; - case OPCODE_CONTINUE: n = (Node *) n[1].next; break; @@ -9419,14 +6270,6 @@ exec_TexCoordPointer(GLint size, GLenum type, GLsizei stride, CALL_TexCoordPointer(ctx->Exec, (size, type, stride, ptr)); } -static void GLAPIENTRY -exec_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid * img) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - CALL_GetCompressedTexImageARB(ctx->Exec, (target, level, img)); -} - static void GLAPIENTRY exec_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) @@ -9647,14 +6490,6 @@ exec_UnlockArraysEXT(void) CALL_UnlockArraysEXT(ctx->Exec, ()); } -static void GLAPIENTRY -exec_ClientActiveTextureARB(GLenum target) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - CALL_ClientActiveTextureARB(ctx->Exec, (target)); -} - static void GLAPIENTRY exec_SecondaryColorPointerEXT(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) @@ -9672,16 +6507,6 @@ exec_FogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid *ptr) CALL_FogCoordPointerEXT(ctx->Exec, (type, stride, ptr)); } -/* GL_EXT_multi_draw_arrays */ -static void GLAPIENTRY -exec_MultiDrawArraysEXT(GLenum mode, const GLint *first, - const GLsizei *count, GLsizei primcount) -{ - GET_CURRENT_CONTEXT(ctx); - FLUSH_VERTICES(ctx, 0); - CALL_MultiDrawArraysEXT(ctx->Exec, (mode, first, count, primcount)); -} - /* GL_IBM_multimode_draw_arrays */ static void GLAPIENTRY exec_MultiModeDrawArraysIBM(const GLenum * mode, const GLint * first, @@ -9743,7 +6568,6 @@ _mesa_create_save_table(void) SET_ClearStencil(table, save_ClearStencil); SET_ClipPlane(table, save_ClipPlane); SET_ColorMask(table, save_ColorMask); - SET_ColorMaskIndexedEXT(table, save_ColorMaskIndexed); SET_ColorMaterial(table, save_ColorMaterial); SET_CopyPixels(table, save_CopyPixels); SET_CullFace(table, save_CullFace); @@ -9752,11 +6576,9 @@ _mesa_create_save_table(void) SET_DepthMask(table, save_DepthMask); SET_DepthRange(table, save_DepthRange); SET_Disable(table, save_Disable); - SET_DisableIndexedEXT(table, save_DisableIndexed); SET_DrawBuffer(table, save_DrawBuffer); SET_DrawPixels(table, save_DrawPixels); SET_Enable(table, save_Enable); - SET_EnableIndexedEXT(table, save_EnableIndexed); SET_EndList(table, _mesa_EndList); SET_EvalMesh1(table, save_EvalMesh1); SET_EvalMesh2(table, save_EvalMesh2); @@ -9939,14 +6761,6 @@ _mesa_create_save_table(void) SET_TexImage3D(table, save_TexImage3D); SET_TexSubImage3D(table, save_TexSubImage3D); - /* GL 2.0 */ - SET_StencilFuncSeparate(table, save_StencilFuncSeparate); - SET_StencilMaskSeparate(table, save_StencilMaskSeparate); - SET_StencilOpSeparate(table, save_StencilOpSeparate); - - /* ATI_separate_stencil */ - SET_StencilFuncSeparateATI(table, save_StencilFuncSeparateATI); - /* GL_ARB_imaging */ /* Not all are supported */ SET_BlendColor(table, save_BlendColor); @@ -10032,18 +6846,12 @@ _mesa_create_save_table(void) /* 145. GL_EXT_secondary_color */ SET_SecondaryColorPointerEXT(table, exec_SecondaryColorPointerEXT); - /* 148. GL_EXT_multi_draw_arrays */ - SET_MultiDrawArraysEXT(table, exec_MultiDrawArraysEXT); - /* 149. GL_EXT_fog_coord */ SET_FogCoordPointerEXT(table, exec_FogCoordPointerEXT); /* 173. GL_EXT_blend_func_separate */ SET_BlendFuncSeparateEXT(table, save_BlendFuncSeparateEXT); - /* 196. GL_MESA_resize_buffers */ - SET_ResizeBuffersMESA(table, _mesa_ResizeBuffersMESA); - /* 197. GL_MESA_window_pos */ SET_WindowPos2dMESA(table, save_WindowPos2dMESA); SET_WindowPos2dvMESA(table, save_WindowPos2dvMESA); @@ -10080,41 +6888,16 @@ _mesa_create_save_table(void) * AreProgramsResidentNV, IsProgramNV, GenProgramsNV, DeleteProgramsNV, * VertexAttribPointerNV, GetProgram*, GetVertexAttrib* */ - SET_BindProgramNV(table, save_BindProgramNV); - SET_DeleteProgramsNV(table, _mesa_DeletePrograms); SET_ExecuteProgramNV(table, save_ExecuteProgramNV); - SET_GenProgramsNV(table, _mesa_GenPrograms); SET_AreProgramsResidentNV(table, _mesa_AreProgramsResidentNV); SET_RequestResidentProgramsNV(table, save_RequestResidentProgramsNV); SET_GetProgramParameterfvNV(table, _mesa_GetProgramParameterfvNV); SET_GetProgramParameterdvNV(table, _mesa_GetProgramParameterdvNV); - SET_GetProgramivNV(table, _mesa_GetProgramivNV); - SET_GetProgramStringNV(table, _mesa_GetProgramStringNV); SET_GetTrackMatrixivNV(table, _mesa_GetTrackMatrixivNV); - SET_GetVertexAttribdvNV(table, _mesa_GetVertexAttribdvNV); - SET_GetVertexAttribfvNV(table, _mesa_GetVertexAttribfvNV); - SET_GetVertexAttribivNV(table, _mesa_GetVertexAttribivNV); - SET_GetVertexAttribPointervNV(table, _mesa_GetVertexAttribPointervNV); - SET_IsProgramNV(table, _mesa_IsProgramARB); SET_LoadProgramNV(table, save_LoadProgramNV); - SET_ProgramEnvParameter4dARB(table, save_ProgramEnvParameter4dARB); - SET_ProgramEnvParameter4dvARB(table, save_ProgramEnvParameter4dvARB); - SET_ProgramEnvParameter4fARB(table, save_ProgramEnvParameter4fARB); - SET_ProgramEnvParameter4fvARB(table, save_ProgramEnvParameter4fvARB); SET_ProgramParameters4dvNV(table, save_ProgramParameters4dvNV); SET_ProgramParameters4fvNV(table, save_ProgramParameters4fvNV); SET_TrackMatrixNV(table, save_TrackMatrixNV); - SET_VertexAttribPointerNV(table, _mesa_VertexAttribPointerNV); -#endif - - /* 244. GL_ATI_envmap_bumpmap */ - SET_TexBumpParameterivATI(table, save_TexBumpParameterivATI); - SET_TexBumpParameterfvATI(table, save_TexBumpParameterfvATI); - - /* 245. GL_ATI_fragment_shader */ -#if FEATURE_ATI_fragment_shader - SET_BindFragmentShaderATI(table, save_BindFragmentShaderATI); - SET_SetFragmentShaderConstantATI(table, save_SetFragmentShaderConstantATI); #endif /* 282. GL_NV_fragment_program */ @@ -10127,47 +6910,18 @@ _mesa_create_save_table(void) _mesa_GetProgramNamedParameterfvNV); SET_GetProgramNamedParameterdvNV(table, _mesa_GetProgramNamedParameterdvNV); - SET_ProgramLocalParameter4dARB(table, save_ProgramLocalParameter4dARB); - SET_ProgramLocalParameter4dvARB(table, save_ProgramLocalParameter4dvARB); - SET_ProgramLocalParameter4fARB(table, save_ProgramLocalParameter4fARB); - SET_ProgramLocalParameter4fvARB(table, save_ProgramLocalParameter4fvARB); - SET_GetProgramLocalParameterdvARB(table, - _mesa_GetProgramLocalParameterdvARB); - SET_GetProgramLocalParameterfvARB(table, - _mesa_GetProgramLocalParameterfvARB); #endif /* 262. GL_NV_point_sprite */ SET_PointParameteriNV(table, save_PointParameteriNV); SET_PointParameterivNV(table, save_PointParameterivNV); - /* 268. GL_EXT_stencil_two_side */ - SET_ActiveStencilFaceEXT(table, save_ActiveStencilFaceEXT); - /* 273. GL_APPLE_vertex_array_object */ SET_BindVertexArrayAPPLE(table, _mesa_BindVertexArrayAPPLE); SET_DeleteVertexArraysAPPLE(table, _mesa_DeleteVertexArraysAPPLE); SET_GenVertexArraysAPPLE(table, _mesa_GenVertexArraysAPPLE); SET_IsVertexArrayAPPLE(table, _mesa_IsVertexArrayAPPLE); - /* 310. GL_EXT_framebuffer_object */ - SET_GenFramebuffersEXT(table, _mesa_GenFramebuffersEXT); - SET_BindFramebufferEXT(table, _mesa_BindFramebufferEXT); - SET_DeleteFramebuffersEXT(table, _mesa_DeleteFramebuffersEXT); - SET_CheckFramebufferStatusEXT(table, _mesa_CheckFramebufferStatusEXT); - SET_GenRenderbuffersEXT(table, _mesa_GenRenderbuffersEXT); - SET_BindRenderbufferEXT(table, _mesa_BindRenderbufferEXT); - SET_DeleteRenderbuffersEXT(table, _mesa_DeleteRenderbuffersEXT); - SET_RenderbufferStorageEXT(table, _mesa_RenderbufferStorageEXT); - SET_FramebufferTexture1DEXT(table, _mesa_FramebufferTexture1DEXT); - SET_FramebufferTexture2DEXT(table, _mesa_FramebufferTexture2DEXT); - SET_FramebufferTexture3DEXT(table, _mesa_FramebufferTexture3DEXT); - SET_FramebufferRenderbufferEXT(table, _mesa_FramebufferRenderbufferEXT); - SET_GenerateMipmapEXT(table, _mesa_GenerateMipmapEXT); - - /* 317. GL_EXT_framebuffer_multisample */ - SET_RenderbufferStorageMultisample(table, _mesa_RenderbufferStorageMultisample); - /* GL_ARB_vertex_array_object */ SET_BindVertexArray(table, _mesa_BindVertexArray); SET_GenVertexArrays(table, _mesa_GenVertexArrays); @@ -10175,10 +6929,6 @@ _mesa_create_save_table(void) /* ???. GL_EXT_depth_bounds_test */ SET_DepthBoundsEXT(table, save_DepthBoundsEXT); - /* ARB 1. GL_ARB_multitexture */ - SET_ActiveTextureARB(table, save_ActiveTextureARB); - SET_ClientActiveTextureARB(table, exec_ClientActiveTextureARB); - /* ARB 3. GL_ARB_transpose_matrix */ SET_LoadTransposeMatrixdARB(table, save_LoadTransposeMatrixdARB); SET_LoadTransposeMatrixfARB(table, save_LoadTransposeMatrixfARB); @@ -10188,55 +6938,6 @@ _mesa_create_save_table(void) /* ARB 5. GL_ARB_multisample */ SET_SampleCoverageARB(table, save_SampleCoverageARB); - /* ARB 12. GL_ARB_texture_compression */ - SET_CompressedTexImage3DARB(table, save_CompressedTexImage3DARB); - SET_CompressedTexImage2DARB(table, save_CompressedTexImage2DARB); - SET_CompressedTexImage1DARB(table, save_CompressedTexImage1DARB); - SET_CompressedTexSubImage3DARB(table, save_CompressedTexSubImage3DARB); - SET_CompressedTexSubImage2DARB(table, save_CompressedTexSubImage2DARB); - SET_CompressedTexSubImage1DARB(table, save_CompressedTexSubImage1DARB); - SET_GetCompressedTexImageARB(table, exec_GetCompressedTexImageARB); - - /* ARB 14. GL_ARB_point_parameters */ - /* aliased with EXT_point_parameters functions */ - - /* ARB 25. GL_ARB_window_pos */ - /* aliased with MESA_window_pos functions */ - - /* ARB 26. GL_ARB_vertex_program */ - /* ARB 27. GL_ARB_fragment_program */ -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program - /* glVertexAttrib* functions alias the NV ones, handled elsewhere */ - SET_VertexAttribPointerARB(table, _mesa_VertexAttribPointerARB); - SET_EnableVertexAttribArrayARB(table, _mesa_EnableVertexAttribArrayARB); - SET_DisableVertexAttribArrayARB(table, _mesa_DisableVertexAttribArrayARB); - SET_ProgramStringARB(table, save_ProgramStringARB); - SET_BindProgramNV(table, save_BindProgramNV); - SET_DeleteProgramsNV(table, _mesa_DeletePrograms); - SET_GenProgramsNV(table, _mesa_GenPrograms); - SET_IsProgramNV(table, _mesa_IsProgramARB); - SET_GetVertexAttribdvARB(table, _mesa_GetVertexAttribdvARB); - SET_GetVertexAttribfvARB(table, _mesa_GetVertexAttribfvARB); - SET_GetVertexAttribivARB(table, _mesa_GetVertexAttribivARB); - SET_GetVertexAttribPointervNV(table, _mesa_GetVertexAttribPointervNV); - SET_ProgramEnvParameter4dARB(table, save_ProgramEnvParameter4dARB); - SET_ProgramEnvParameter4dvARB(table, save_ProgramEnvParameter4dvARB); - SET_ProgramEnvParameter4fARB(table, save_ProgramEnvParameter4fARB); - SET_ProgramEnvParameter4fvARB(table, save_ProgramEnvParameter4fvARB); - SET_ProgramLocalParameter4dARB(table, save_ProgramLocalParameter4dARB); - SET_ProgramLocalParameter4dvARB(table, save_ProgramLocalParameter4dvARB); - SET_ProgramLocalParameter4fARB(table, save_ProgramLocalParameter4fARB); - SET_ProgramLocalParameter4fvARB(table, save_ProgramLocalParameter4fvARB); - SET_GetProgramEnvParameterdvARB(table, _mesa_GetProgramEnvParameterdvARB); - SET_GetProgramEnvParameterfvARB(table, _mesa_GetProgramEnvParameterfvARB); - SET_GetProgramLocalParameterdvARB(table, - _mesa_GetProgramLocalParameterdvARB); - SET_GetProgramLocalParameterfvARB(table, - _mesa_GetProgramLocalParameterfvARB); - SET_GetProgramivARB(table, _mesa_GetProgramivARB); - SET_GetProgramStringARB(table, _mesa_GetProgramStringARB); -#endif - /* ARB 28. GL_ARB_vertex_buffer_object */ /* None of the extension's functions get compiled */ SET_BindBufferARB(table, _mesa_BindBufferARB); @@ -10251,74 +6952,15 @@ _mesa_create_save_table(void) SET_MapBufferARB(table, _mesa_MapBufferARB); SET_UnmapBufferARB(table, _mesa_UnmapBufferARB); -#if FEATURE_queryobj - _mesa_init_queryobj_dispatch(table); /* glGetQuery, etc */ - SET_BeginQueryARB(table, save_BeginQueryARB); - SET_EndQueryARB(table, save_EndQueryARB); -#endif - - SET_DrawBuffersARB(table, save_DrawBuffersARB); - -#if FEATURE_EXT_framebuffer_blit - SET_BlitFramebufferEXT(table, save_BlitFramebufferEXT); -#endif - - /* GL_ARB_shader_objects */ - _mesa_init_shader_dispatch(table); /* Plug in glCreate/Delete/Get, etc */ - SET_UseProgramObjectARB(table, save_UseProgramObjectARB); - SET_Uniform1fARB(table, save_Uniform1fARB); - SET_Uniform2fARB(table, save_Uniform2fARB); - SET_Uniform3fARB(table, save_Uniform3fARB); - SET_Uniform4fARB(table, save_Uniform4fARB); - SET_Uniform1fvARB(table, save_Uniform1fvARB); - SET_Uniform2fvARB(table, save_Uniform2fvARB); - SET_Uniform3fvARB(table, save_Uniform3fvARB); - SET_Uniform4fvARB(table, save_Uniform4fvARB); - SET_Uniform1iARB(table, save_Uniform1iARB); - SET_Uniform2iARB(table, save_Uniform2iARB); - SET_Uniform3iARB(table, save_Uniform3iARB); - SET_Uniform4iARB(table, save_Uniform4iARB); - SET_Uniform1ivARB(table, save_Uniform1ivARB); - SET_Uniform2ivARB(table, save_Uniform2ivARB); - SET_Uniform3ivARB(table, save_Uniform3ivARB); - SET_Uniform4ivARB(table, save_Uniform4ivARB); - SET_UniformMatrix2fvARB(table, save_UniformMatrix2fvARB); - SET_UniformMatrix3fvARB(table, save_UniformMatrix3fvARB); - SET_UniformMatrix4fvARB(table, save_UniformMatrix4fvARB); - SET_UniformMatrix2x3fv(table, save_UniformMatrix2x3fv); - SET_UniformMatrix3x2fv(table, save_UniformMatrix3x2fv); - SET_UniformMatrix2x4fv(table, save_UniformMatrix2x4fv); - SET_UniformMatrix4x2fv(table, save_UniformMatrix4x2fv); - SET_UniformMatrix3x4fv(table, save_UniformMatrix3x4fv); - SET_UniformMatrix4x3fv(table, save_UniformMatrix4x3fv); - - /* ARB 30/31/32. GL_ARB_shader_objects, GL_ARB_vertex/fragment_shader */ - SET_BindAttribLocationARB(table, exec_BindAttribLocationARB); - SET_GetAttribLocationARB(table, exec_GetAttribLocationARB); - SET_GetUniformLocationARB(table, exec_GetUniformLocationARB); - /* XXX additional functions need to be implemented here! */ - /* 299. GL_EXT_blend_equation_separate */ SET_BlendEquationSeparateEXT(table, save_BlendEquationSeparateEXT); - /* GL_EXT_gpu_program_parameters */ -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program - SET_ProgramEnvParameters4fvEXT(table, save_ProgramEnvParameters4fvEXT); - SET_ProgramLocalParameters4fvEXT(table, save_ProgramLocalParameters4fvEXT); -#endif - /* ARB 50. GL_ARB_map_buffer_range */ #if FEATURE_ARB_map_buffer_range SET_MapBufferRange(table, _mesa_MapBufferRange); /* no dlist save */ SET_FlushMappedBufferRange(table, _mesa_FlushMappedBufferRange); /* no dl */ #endif - /* ARB 59. GL_ARB_copy_buffer */ - SET_CopyBufferSubData(table, _mesa_CopyBufferSubData); /* no dlist save */ - - /* 364. GL_EXT_provoking_vertex */ - SET_ProvokingVertexEXT(table, save_ProvokingVertexEXT); - /* 371. GL_APPLE_object_purgeable */ #if FEATURE_APPLE_object_purgeable SET_ObjectPurgeableAPPLE(table, _mesa_ObjectPurgeableAPPLE); @@ -10334,89 +6976,9 @@ _mesa_create_save_table(void) SET_GetTexParameterIivEXT(table, exec_GetTexParameterIiv); SET_GetTexParameterIuivEXT(table, exec_GetTexParameterIuiv); - /* 377. GL_EXT_separate_shader_objects */ - SET_UseShaderProgramEXT(table, save_UseShaderProgramEXT); - SET_ActiveProgramEXT(table, save_ActiveProgramEXT); - - /* GL_ARB_color_buffer_float */ - SET_ClampColorARB(table, save_ClampColorARB); - SET_ClampColor(table, save_ClampColorARB); - - /* GL 3.0 */ - SET_ClearBufferiv(table, save_ClearBufferiv); - SET_ClearBufferuiv(table, save_ClearBufferuiv); - SET_ClearBufferfv(table, save_ClearBufferfv); - SET_ClearBufferfi(table, save_ClearBufferfi); -#if 0 - SET_Uniform1ui(table, save_Uniform1ui); - SET_Uniform2ui(table, save_Uniform2ui); - SET_Uniform3ui(table, save_Uniform3ui); - SET_Uniform4ui(table, save_Uniform4ui); - SET_Uniform1uiv(table, save_Uniform1uiv); - SET_Uniform2uiv(table, save_Uniform2uiv); - SET_Uniform3uiv(table, save_Uniform3uiv); - SET_Uniform4uiv(table, save_Uniform4uiv); -#else - (void) save_Uniform1ui; - (void) save_Uniform2ui; - (void) save_Uniform3ui; - (void) save_Uniform4ui; - (void) save_Uniform1uiv; - (void) save_Uniform2uiv; - (void) save_Uniform3uiv; - (void) save_Uniform4uiv; -#endif - -#if FEATURE_EXT_transform_feedback - /* These are not compiled into display lists: */ - SET_BindBufferBaseEXT(table, _mesa_BindBufferBase); - SET_BindBufferOffsetEXT(table, _mesa_BindBufferOffsetEXT); - SET_BindBufferRangeEXT(table, _mesa_BindBufferRange); - SET_TransformFeedbackVaryingsEXT(table, _mesa_TransformFeedbackVaryings); - /* These are: */ - SET_BeginTransformFeedbackEXT(table, save_BeginTransformFeedback); - SET_EndTransformFeedbackEXT(table, save_EndTransformFeedback); - SET_BindTransformFeedback(table, save_BindTransformFeedback); - SET_PauseTransformFeedback(table, save_PauseTransformFeedback); - SET_ResumeTransformFeedback(table, save_ResumeTransformFeedback); - SET_DrawTransformFeedback(table, save_DrawTransformFeedback); -#endif - - /* GL_ARB_instanced_arrays */ - SET_VertexAttribDivisorARB(table, save_VertexAttribDivisor); - /* GL_NV_texture_barrier */ SET_TextureBarrierNV(table, save_TextureBarrierNV); - /* GL_ARB_sampler_objects */ - _mesa_init_sampler_object_dispatch(table); /* plug in Gen/Get/etc functions */ - SET_BindSampler(table, save_BindSampler); - SET_SamplerParameteri(table, save_SamplerParameteri); - SET_SamplerParameterf(table, save_SamplerParameterf); - SET_SamplerParameteriv(table, save_SamplerParameteriv); - SET_SamplerParameterfv(table, save_SamplerParameterfv); - SET_SamplerParameterIiv(table, save_SamplerParameterIiv); - SET_SamplerParameterIuiv(table, save_SamplerParameterIuiv); - - /* GL_ARB_draw_buffer_blend */ - SET_BlendFunciARB(table, save_BlendFunci); - SET_BlendFuncSeparateiARB(table, save_BlendFuncSeparatei); - SET_BlendEquationiARB(table, save_BlendEquationi); - SET_BlendEquationSeparateiARB(table, save_BlendEquationSeparatei); - - /* GL_ARB_geometry_shader4 */ - SET_ProgramParameteriARB(table, save_ProgramParameteri); - SET_FramebufferTextureARB(table, save_FramebufferTexture); - SET_FramebufferTextureFaceARB(table, save_FramebufferTextureFace); - - /* GL_NV_conditional_render */ - SET_BeginConditionalRenderNV(table, save_BeginConditionalRender); - SET_EndConditionalRenderNV(table, save_EndConditionalRender); - - /* GL_ARB_sync */ - _mesa_init_sync_dispatch(table); - SET_WaitSync(table, save_WaitSync); - /* GL_ARB_texture_storage (no dlist support) */ SET_TexStorage1D(table, _mesa_TexStorage1D); SET_TexStorage2D(table, _mesa_TexStorage2D); @@ -10616,21 +7178,6 @@ print_list(struct gl_context *ctx, GLuint list) printf("ATTR_4F_NV attr %d: %f %f %f %f\n", n[1].i, n[2].f, n[3].f, n[4].f, n[5].f); break; - case OPCODE_ATTR_1F_ARB: - printf("ATTR_1F_ARB attr %d: %f\n", n[1].i, n[2].f); - break; - case OPCODE_ATTR_2F_ARB: - printf("ATTR_2F_ARB attr %d: %f %f\n", - n[1].i, n[2].f, n[3].f); - break; - case OPCODE_ATTR_3F_ARB: - printf("ATTR_3F_ARB attr %d: %f %f %f\n", - n[1].i, n[2].f, n[3].f, n[4].f); - break; - case OPCODE_ATTR_4F_ARB: - printf("ATTR_4F_ARB attr %d: %f %f %f %f\n", - n[1].i, n[2].f, n[3].f, n[4].f, n[5].f); - break; case OPCODE_MATERIAL: printf("MATERIAL %x %x: %f %f %f %f\n", @@ -10659,11 +7206,6 @@ print_list(struct gl_context *ctx, GLuint list) printf("EVAL_P2 %d %d\n", n[1].i, n[2].i); break; - case OPCODE_PROVOKING_VERTEX: - printf("ProvokingVertex %s\n", - _mesa_lookup_enum_by_nr(n[1].ui)); - break; - /* * meta opcodes/commands */ @@ -10741,14 +7283,6 @@ _mesa_save_vtxfmt_init(GLvertexformat * vfmt) vfmt->Indexf = save_Indexf; vfmt->Indexfv = save_Indexfv; vfmt->Materialfv = save_Materialfv; - vfmt->MultiTexCoord1fARB = save_MultiTexCoord1f; - vfmt->MultiTexCoord1fvARB = save_MultiTexCoord1fv; - vfmt->MultiTexCoord2fARB = save_MultiTexCoord2f; - vfmt->MultiTexCoord2fvARB = save_MultiTexCoord2fv; - vfmt->MultiTexCoord3fARB = save_MultiTexCoord3f; - vfmt->MultiTexCoord3fvARB = save_MultiTexCoord3fv; - vfmt->MultiTexCoord4fARB = save_MultiTexCoord4f; - vfmt->MultiTexCoord4fvARB = save_MultiTexCoord4fv; vfmt->Normal3f = save_Normal3f; vfmt->Normal3fv = save_Normal3fv; vfmt->SecondaryColor3fEXT = save_SecondaryColor3fEXT; @@ -10775,24 +7309,9 @@ _mesa_save_vtxfmt_init(GLvertexformat * vfmt) vfmt->VertexAttrib3fvNV = save_VertexAttrib3fvNV; vfmt->VertexAttrib4fNV = save_VertexAttrib4fNV; vfmt->VertexAttrib4fvNV = save_VertexAttrib4fvNV; - vfmt->VertexAttrib1fARB = save_VertexAttrib1fARB; - vfmt->VertexAttrib1fvARB = save_VertexAttrib1fvARB; - vfmt->VertexAttrib2fARB = save_VertexAttrib2fARB; - vfmt->VertexAttrib2fvARB = save_VertexAttrib2fvARB; - vfmt->VertexAttrib3fARB = save_VertexAttrib3fARB; - vfmt->VertexAttrib3fvARB = save_VertexAttrib3fvARB; - vfmt->VertexAttrib4fARB = save_VertexAttrib4fARB; - vfmt->VertexAttrib4fvARB = save_VertexAttrib4fvARB; vfmt->Rectf = save_Rectf; - /* GL_ARB_draw_instanced */ - vfmt->DrawArraysInstanced = save_DrawArraysInstancedARB; - vfmt->DrawElementsInstanced = save_DrawElementsInstancedARB; - - /* GL_ARB_draw_elements_base_vertex */ - vfmt->DrawElementsInstancedBaseVertex = save_DrawElementsInstancedBaseVertexARB; - /* The driver is required to implement these as * 1) They can probably do a better job. * 2) A lot of new mechanisms would have to be added to this module @@ -10803,10 +7322,6 @@ _mesa_save_vtxfmt_init(GLvertexformat * vfmt) vfmt->DrawArrays = 0; vfmt->DrawElements = 0; vfmt->DrawRangeElements = 0; - vfmt->MultiDrawElemementsEXT = 0; - vfmt->DrawElementsBaseVertex = 0; - vfmt->DrawRangeElementsBaseVertex = 0; - vfmt->MultiDrawElemementsBaseVertex = 0; #endif } diff --git a/dll/opengl/mesa/src/mesa/main/dlist.h b/dll/opengl/mesa/main/dlist.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/dlist.h rename to dll/opengl/mesa/main/dlist.h diff --git a/dll/opengl/mesa/src/mesa/main/dlopen.c b/dll/opengl/mesa/main/dlopen.c similarity index 100% rename from dll/opengl/mesa/src/mesa/main/dlopen.c rename to dll/opengl/mesa/main/dlopen.c diff --git a/dll/opengl/mesa/src/mesa/main/dlopen.h b/dll/opengl/mesa/main/dlopen.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/dlopen.h rename to dll/opengl/mesa/main/dlopen.h diff --git a/dll/opengl/mesa/src/mesa/main/drawpix.c b/dll/opengl/mesa/main/drawpix.c similarity index 74% rename from dll/opengl/mesa/src/mesa/main/drawpix.c rename to dll/opengl/mesa/main/drawpix.c index 01983d945ca..c18b9362294 100644 --- a/dll/opengl/mesa/src/mesa/main/drawpix.c +++ b/dll/opengl/mesa/main/drawpix.c @@ -32,7 +32,6 @@ #include "framebuffer.h" #include "image.h" #include "mfeatures.h" -#include "pbo.h" #include "readpix.h" #include "state.h" #include "dispatch.h" @@ -57,7 +56,7 @@ _mesa_DrawPixels( GLsizei width, GLsizei height, _mesa_lookup_enum_by_nr(format), _mesa_lookup_enum_by_nr(type), pixels, - _mesa_lookup_enum_by_nr(ctx->DrawBuffer->ColorDrawBuffer[0]), + _mesa_lookup_enum_by_nr(ctx->DrawBuffer->ColorDrawBuffer), IROUND(ctx->Current.RasterPos[0]), IROUND(ctx->Current.RasterPos[1])); @@ -67,14 +66,9 @@ _mesa_DrawPixels( GLsizei width, GLsizei height, return; } - /* We're not using the current vertex program, and the driver may install - * its own. Note: this may dirty some state. - */ - _mesa_set_vp_override(ctx, GL_TRUE); - /* Note: this call does state validation */ if (!_mesa_valid_to_render(ctx, "glDrawPixels")) { - goto end; /* the error code was recorded */ + return; /* the error code was recorded */ } /* GL 3.0 introduced a new restriction on glDrawPixels() over what was in @@ -91,19 +85,19 @@ _mesa_DrawPixels( GLsizei width, GLsizei height, */ if (_mesa_is_integer_format(format)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawPixels(integer format)"); - goto end; + return; } if (_mesa_error_check_format_type(ctx, format, type, GL_TRUE)) { - goto end; /* the error code was recorded */ + return; /* the error code was recorded */ } if (ctx->RasterDiscard) { - goto end; + return; } if (!ctx->Current.RasterPosValid) { - goto end; /* no-op, not an error */ + return; /* no-op, not an error */ } if (ctx->RenderMode == GL_RENDER) { @@ -112,22 +106,6 @@ _mesa_DrawPixels( GLsizei width, GLsizei height, GLint x = IROUND(ctx->Current.RasterPos[0]); GLint y = IROUND(ctx->Current.RasterPos[1]); - if (_mesa_is_bufferobj(ctx->Unpack.BufferObj)) { - /* unpack from PBO */ - if (!_mesa_validate_pbo_access(2, &ctx->Unpack, width, height, - 1, format, type, INT_MAX, pixels)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glDrawPixels(invalid PBO access)"); - goto end; - } - if (_mesa_bufferobj_mapped(ctx->Unpack.BufferObj)) { - /* buffer is mapped - that's an error */ - _mesa_error(ctx, GL_INVALID_OPERATION, - "glDrawPixels(PBO is mapped)"); - goto end; - } - } - ctx->Driver.DrawPixels(ctx, x, y, width, height, format, type, &ctx->Unpack, pixels); } @@ -139,15 +117,12 @@ _mesa_DrawPixels( GLsizei width, GLsizei height, _mesa_feedback_vertex( ctx, ctx->Current.RasterPos, ctx->Current.RasterColor, - ctx->Current.RasterTexCoords[0] ); + ctx->Current.RasterTexCoords ); } else { ASSERT(ctx->RenderMode == GL_SELECT); /* Do nothing. See OpenGL Spec, Appendix B, Corollary 6. */ } - -end: - _mesa_set_vp_override(ctx, GL_FALSE); } @@ -164,7 +139,7 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height, srcx, srcy, width, height, _mesa_lookup_enum_by_nr(type), _mesa_lookup_enum_by_nr(ctx->ReadBuffer->ColorReadBuffer), - _mesa_lookup_enum_by_nr(ctx->DrawBuffer->ColorDrawBuffer[0]), + _mesa_lookup_enum_by_nr(ctx->DrawBuffer->ColorDrawBuffer), IROUND(ctx->Current.RasterPos[0]), IROUND(ctx->Current.RasterPos[1])); @@ -179,49 +154,30 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height, */ if (type != GL_COLOR && type != GL_DEPTH && - type != GL_STENCIL && - type != GL_DEPTH_STENCIL) { + type != GL_STENCIL) { _mesa_error(ctx, GL_INVALID_ENUM, "glCopyPixels(type=%s)", _mesa_lookup_enum_by_nr(type)); return; } - /* We're not using the current vertex program, and the driver may install - * it's own. Note: this may dirty some state. - */ - _mesa_set_vp_override(ctx, GL_TRUE); - /* Note: this call does state validation */ if (!_mesa_valid_to_render(ctx, "glCopyPixels")) { - goto end; /* the error code was recorded */ - } - - /* Check read buffer's status (draw buffer was already checked) */ - if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, - "glCopyPixels(incomplete framebuffer)" ); - goto end; - } - - if (ctx->ReadBuffer->Name != 0 && ctx->ReadBuffer->Visual.samples > 0) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION, - "glCopyPixels(multisample FBO)"); - goto end; + return; /* the error code was recorded */ } if (!_mesa_source_buffer_exists(ctx, type) || !_mesa_dest_buffer_exists(ctx, type)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glCopyPixels(missing source or dest buffer)"); - goto end; + return; } if (ctx->RasterDiscard) { - goto end; + return; } if (!ctx->Current.RasterPosValid || width == 0 || height == 0) { - goto end; /* no-op, not an error */ + return; /* no-op, not an error */ } if (ctx->RenderMode == GL_RENDER) { @@ -239,15 +195,12 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height, _mesa_feedback_vertex( ctx, ctx->Current.RasterPos, ctx->Current.RasterColor, - ctx->Current.RasterTexCoords[0] ); + ctx->Current.RasterTexCoords ); } else { ASSERT(ctx->RenderMode == GL_SELECT); /* Do nothing. See OpenGL Spec, Appendix B, Corollary 6. */ } - -end: - _mesa_set_vp_override(ctx, GL_FALSE); } @@ -284,23 +237,6 @@ _mesa_Bitmap( GLsizei width, GLsizei height, GLint x = IFLOOR(ctx->Current.RasterPos[0] + epsilon - xorig); GLint y = IFLOOR(ctx->Current.RasterPos[1] + epsilon - yorig); - if (_mesa_is_bufferobj(ctx->Unpack.BufferObj)) { - /* unpack from PBO */ - if (!_mesa_validate_pbo_access(2, &ctx->Unpack, width, height, - 1, GL_COLOR_INDEX, GL_BITMAP, - INT_MAX, (const GLvoid *) bitmap)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glBitmap(invalid PBO access)"); - return; - } - if (_mesa_bufferobj_mapped(ctx->Unpack.BufferObj)) { - /* buffer is mapped - that's an error */ - _mesa_error(ctx, GL_INVALID_OPERATION, - "glBitmap(PBO is mapped)"); - return; - } - } - ctx->Driver.Bitmap( ctx, x, y, width, height, &ctx->Unpack, bitmap ); } } @@ -311,7 +247,7 @@ _mesa_Bitmap( GLsizei width, GLsizei height, _mesa_feedback_vertex( ctx, ctx->Current.RasterPos, ctx->Current.RasterColor, - ctx->Current.RasterTexCoords[0] ); + ctx->Current.RasterTexCoords ); } else { ASSERT(ctx->RenderMode == GL_SELECT); diff --git a/dll/opengl/mesa/src/mesa/main/drawpix.h b/dll/opengl/mesa/main/drawpix.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/drawpix.h rename to dll/opengl/mesa/main/drawpix.h diff --git a/dll/opengl/mesa/src/mesa/main/enable.c b/dll/opengl/mesa/main/enable.c similarity index 66% rename from dll/opengl/mesa/src/mesa/main/enable.c rename to dll/opengl/mesa/main/enable.c index 270b24045ba..78d0f39435f 100644 --- a/dll/opengl/mesa/src/mesa/main/enable.c +++ b/dll/opengl/mesa/main/enable.c @@ -75,8 +75,8 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state) flag = VERT_BIT_COLOR_INDEX; break; case GL_TEXTURE_COORD_ARRAY: - var = &arrayObj->VertexAttrib[VERT_ATTRIB_TEX(ctx->Array.ActiveTexture)].Enabled; - flag = VERT_BIT_TEX(ctx->Array.ActiveTexture); + var = &arrayObj->VertexAttrib[VERT_ATTRIB_TEX].Enabled; + flag = VERT_BIT_TEX; break; case GL_EDGE_FLAG_ARRAY: var = &arrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled; @@ -125,15 +125,6 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state) break; #endif /* FEATURE_NV_vertex_program */ - /* GL_NV_primitive_restart */ - case GL_PRIMITIVE_RESTART_NV: - if (!ctx->Extensions.NV_primitive_restart) { - goto invalid_enum_error; - } - var = &ctx->Array.PrimitiveRestart; - flag = 0; - break; - default: goto invalid_enum_error; } @@ -216,16 +207,10 @@ _mesa_DisableClientState( GLenum cap ) * Note that we'll set GL_INVALID_OPERATION and return NULL if the active * texture unit is higher than the number of supported coordinate units. */ -static struct gl_texture_unit * +static inline struct gl_texture_unit * get_texcoord_unit(struct gl_context *ctx) { - if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glEnable/Disable(texcoord unit)"); - return NULL; - } - else { - return &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - } + return &ctx->Texture.Unit; } @@ -237,7 +222,7 @@ get_texcoord_unit(struct gl_context *ctx) static GLboolean enable_texture(struct gl_context *ctx, GLboolean state, GLbitfield texBit) { - struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx); + struct gl_texture_unit *texUnit = &ctx->Texture.Unit; const GLbitfield newenabled = state ? (texUnit->Enabled | texBit) : (texUnit->Enabled & ~texBit); @@ -286,11 +271,9 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) break; case GL_BLEND: { - GLbitfield newEnabled = - state * ((1 << ctx->Const.MaxDrawBuffers) - 1); - if (newEnabled != ctx->Color.BlendEnabled) { + if (state != ctx->Color.BlendEnabled) { FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.BlendEnabled = newEnabled; + ctx->Color.BlendEnabled = state; } } break; @@ -661,15 +644,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) } break; - /* GL_EXT_secondary_color */ - case GL_COLOR_SUM_EXT: - CHECK_EXTENSION2(EXT_secondary_color, ARB_vertex_program, cap); - if (ctx->Fog.ColorSumEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_FOG); - ctx->Fog.ColorSumEnabled = state; - break; - /* GL_ARB_multisample */ case GL_MULTISAMPLE_ARB: if (ctx->Multisample.Enabled == state) @@ -720,122 +694,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) ctx->Point.PointSprite = state; break; -#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program - case GL_VERTEX_PROGRAM_ARB: - CHECK_EXTENSION2(ARB_vertex_program, NV_vertex_program, cap); - if (ctx->VertexProgram.Enabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - ctx->VertexProgram.Enabled = state; - break; - case GL_VERTEX_PROGRAM_POINT_SIZE_ARB: - CHECK_EXTENSION2(ARB_vertex_program, NV_vertex_program, cap); - if (ctx->VertexProgram.PointSizeEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - ctx->VertexProgram.PointSizeEnabled = state; - break; - case GL_VERTEX_PROGRAM_TWO_SIDE_ARB: - CHECK_EXTENSION2(ARB_vertex_program, NV_vertex_program, cap); - if (ctx->VertexProgram.TwoSideEnabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - ctx->VertexProgram.TwoSideEnabled = state; - break; -#endif -#if FEATURE_NV_vertex_program - case GL_MAP1_VERTEX_ATTRIB0_4_NV: - case GL_MAP1_VERTEX_ATTRIB1_4_NV: - case GL_MAP1_VERTEX_ATTRIB2_4_NV: - case GL_MAP1_VERTEX_ATTRIB3_4_NV: - case GL_MAP1_VERTEX_ATTRIB4_4_NV: - case GL_MAP1_VERTEX_ATTRIB5_4_NV: - case GL_MAP1_VERTEX_ATTRIB6_4_NV: - case GL_MAP1_VERTEX_ATTRIB7_4_NV: - case GL_MAP1_VERTEX_ATTRIB8_4_NV: - case GL_MAP1_VERTEX_ATTRIB9_4_NV: - case GL_MAP1_VERTEX_ATTRIB10_4_NV: - case GL_MAP1_VERTEX_ATTRIB11_4_NV: - case GL_MAP1_VERTEX_ATTRIB12_4_NV: - case GL_MAP1_VERTEX_ATTRIB13_4_NV: - case GL_MAP1_VERTEX_ATTRIB14_4_NV: - case GL_MAP1_VERTEX_ATTRIB15_4_NV: - CHECK_EXTENSION(NV_vertex_program, cap); - { - const GLuint map = (GLuint) (cap - GL_MAP1_VERTEX_ATTRIB0_4_NV); - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map1Attrib[map] = state; - } - break; - case GL_MAP2_VERTEX_ATTRIB0_4_NV: - case GL_MAP2_VERTEX_ATTRIB1_4_NV: - case GL_MAP2_VERTEX_ATTRIB2_4_NV: - case GL_MAP2_VERTEX_ATTRIB3_4_NV: - case GL_MAP2_VERTEX_ATTRIB4_4_NV: - case GL_MAP2_VERTEX_ATTRIB5_4_NV: - case GL_MAP2_VERTEX_ATTRIB6_4_NV: - case GL_MAP2_VERTEX_ATTRIB7_4_NV: - case GL_MAP2_VERTEX_ATTRIB8_4_NV: - case GL_MAP2_VERTEX_ATTRIB9_4_NV: - case GL_MAP2_VERTEX_ATTRIB10_4_NV: - case GL_MAP2_VERTEX_ATTRIB11_4_NV: - case GL_MAP2_VERTEX_ATTRIB12_4_NV: - case GL_MAP2_VERTEX_ATTRIB13_4_NV: - case GL_MAP2_VERTEX_ATTRIB14_4_NV: - case GL_MAP2_VERTEX_ATTRIB15_4_NV: - CHECK_EXTENSION(NV_vertex_program, cap); - { - const GLuint map = (GLuint) (cap - GL_MAP2_VERTEX_ATTRIB0_4_NV); - FLUSH_VERTICES(ctx, _NEW_EVAL); - ctx->Eval.Map2Attrib[map] = state; - } - break; -#endif /* FEATURE_NV_vertex_program */ - -#if FEATURE_NV_fragment_program - case GL_FRAGMENT_PROGRAM_NV: - CHECK_EXTENSION(NV_fragment_program, cap); - if (ctx->FragmentProgram.Enabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - ctx->FragmentProgram.Enabled = state; - break; -#endif /* FEATURE_NV_fragment_program */ - - /* GL_NV_texture_rectangle */ - case GL_TEXTURE_RECTANGLE_NV: - CHECK_EXTENSION(NV_texture_rectangle, cap); - if (!enable_texture(ctx, state, TEXTURE_RECT_BIT)) { - return; - } - break; - - /* GL_EXT_stencil_two_side */ - case GL_STENCIL_TEST_TWO_SIDE_EXT: - CHECK_EXTENSION(EXT_stencil_two_side, cap); - if (ctx->Stencil.TestTwoSide == state) - return; - FLUSH_VERTICES(ctx, _NEW_STENCIL); - ctx->Stencil.TestTwoSide = state; - if (state) { - ctx->Stencil._BackFace = 2; - ctx->_TriangleCaps |= DD_TRI_TWOSTENCIL; - } else { - ctx->Stencil._BackFace = 1; - ctx->_TriangleCaps &= ~DD_TRI_TWOSTENCIL; - } - break; - -#if FEATURE_ARB_fragment_program - case GL_FRAGMENT_PROGRAM_ARB: - CHECK_EXTENSION(ARB_fragment_program, cap); - if (ctx->FragmentProgram.Enabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - ctx->FragmentProgram.Enabled = state; - break; -#endif /* FEATURE_ARB_fragment_program */ - /* GL_EXT_depth_bounds_test */ case GL_DEPTH_BOUNDS_TEST_EXT: CHECK_EXTENSION(EXT_depth_bounds_test, cap); @@ -845,85 +703,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) ctx->Depth.BoundsTest = state; break; - case GL_DEPTH_CLAMP: - if (ctx->Transform.DepthClamp == state) - return; - CHECK_EXTENSION(ARB_depth_clamp, cap); - FLUSH_VERTICES(ctx, _NEW_TRANSFORM); - ctx->Transform.DepthClamp = state; - break; - -#if FEATURE_ATI_fragment_shader - case GL_FRAGMENT_SHADER_ATI: - CHECK_EXTENSION(ATI_fragment_shader, cap); - if (ctx->ATIFragmentShader.Enabled == state) - return; - FLUSH_VERTICES(ctx, _NEW_PROGRAM); - ctx->ATIFragmentShader.Enabled = state; - break; -#endif - - /* GL_MESA_texture_array */ - case GL_TEXTURE_1D_ARRAY_EXT: - CHECK_EXTENSION(MESA_texture_array, cap); - if (!enable_texture(ctx, state, TEXTURE_1D_ARRAY_BIT)) { - return; - } - break; - - case GL_TEXTURE_2D_ARRAY_EXT: - CHECK_EXTENSION(MESA_texture_array, cap); - if (!enable_texture(ctx, state, TEXTURE_2D_ARRAY_BIT)) { - return; - } - break; - - case GL_TEXTURE_CUBE_MAP_SEAMLESS: - CHECK_EXTENSION(ARB_seamless_cube_map, cap); - if (ctx->Texture.CubeMapSeamless != state) { - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - ctx->Texture.CubeMapSeamless = state; - } - break; - -#if FEATURE_EXT_transform_feedback - case GL_RASTERIZER_DISCARD: - CHECK_EXTENSION(EXT_transform_feedback, cap); - if (ctx->RasterDiscard != state) { - FLUSH_VERTICES(ctx, _NEW_RASTERIZER_DISCARD); - ctx->RasterDiscard = state; - } - break; -#endif - - /* GL 3.1 primitive restart. Note: this enum is different from - * GL_PRIMITIVE_RESTART_NV (which is client state). - */ - case GL_PRIMITIVE_RESTART: - if (ctx->VersionMajor * 10 + ctx->VersionMinor < 31) { - goto invalid_enum_error; - } - if (ctx->Array.PrimitiveRestart != state) { - FLUSH_VERTICES(ctx, _NEW_TRANSFORM); - ctx->Array.PrimitiveRestart = state; - } - break; - - /* GL3.0 - GL_framebuffer_sRGB */ - case GL_FRAMEBUFFER_SRGB_EXT: - CHECK_EXTENSION(EXT_framebuffer_sRGB, cap); - FLUSH_VERTICES(ctx, _NEW_BUFFERS); - ctx->Color.sRGBEnabled = state; - break; - - /* GL_OES_EGL_image_external */ - case GL_TEXTURE_EXTERNAL_OES: - CHECK_EXTENSION(OES_EGL_image_external, cap); - if (!enable_texture(ctx, state, TEXTURE_EXTERNAL_BIT)) { - return; - } - break; - default: goto invalid_enum_error; } @@ -968,86 +747,6 @@ _mesa_Disable( GLenum cap ) } - -/** - * Enable/disable an indexed state var. - */ -void -_mesa_set_enablei(struct gl_context *ctx, GLenum cap, - GLuint index, GLboolean state) -{ - ASSERT(state == 0 || state == 1); - switch (cap) { - case GL_BLEND: - if (!ctx->Extensions.EXT_draw_buffers2) { - goto invalid_enum_error; - } - if (index >= ctx->Const.MaxDrawBuffers) { - _mesa_error(ctx, GL_INVALID_VALUE, "%s(index=%u)", - state ? "glEnableIndexed" : "glDisableIndexed", index); - return; - } - if (((ctx->Color.BlendEnabled >> index) & 1) != state) { - FLUSH_VERTICES(ctx, _NEW_COLOR); - if (state) - ctx->Color.BlendEnabled |= (1 << index); - else - ctx->Color.BlendEnabled &= ~(1 << index); - } - break; - default: - goto invalid_enum_error; - } - return; - -invalid_enum_error: - _mesa_error(ctx, GL_INVALID_ENUM, "%s(cap=%s)", - state ? "glEnablei" : "glDisablei", - _mesa_lookup_enum_by_nr(cap)); -} - - -void GLAPIENTRY -_mesa_DisableIndexed( GLenum cap, GLuint index ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - _mesa_set_enablei(ctx, cap, index, GL_FALSE); -} - - -void GLAPIENTRY -_mesa_EnableIndexed( GLenum cap, GLuint index ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - _mesa_set_enablei(ctx, cap, index, GL_TRUE); -} - - -GLboolean GLAPIENTRY -_mesa_IsEnabledIndexed( GLenum cap, GLuint index ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0); - switch (cap) { - case GL_BLEND: - if (index >= ctx->Const.MaxDrawBuffers) { - _mesa_error(ctx, GL_INVALID_VALUE, "glIsEnabledIndexed(index=%u)", - index); - return GL_FALSE; - } - return (ctx->Color.BlendEnabled >> index) & 1; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabledIndexed(cap=%s)", - _mesa_lookup_enum_by_nr(cap)); - return GL_FALSE; - } -} - - - - #undef CHECK_EXTENSION #define CHECK_EXTENSION(EXTNAME) \ if (!ctx->Extensions.EXTNAME) { \ @@ -1068,7 +767,7 @@ static GLboolean is_texture_enabled(struct gl_context *ctx, GLbitfield bit) { const struct gl_texture_unit *const texUnit = - &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; + &ctx->Texture.Unit; return (texUnit->Enabled & bit) ? GL_TRUE : GL_FALSE; } @@ -1234,7 +933,7 @@ _mesa_IsEnabled( GLenum cap ) case GL_INDEX_ARRAY: return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled != 0); case GL_TEXTURE_COORD_ARRAY: - return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_TEX(ctx->Array.ActiveTexture)] + return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_TEX] .Enabled != 0); case GL_EDGE_FLAG_ARRAY: return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled != 0); @@ -1254,11 +953,6 @@ _mesa_IsEnabled( GLenum cap ) CHECK_EXTENSION(ARB_texture_cube_map); return is_texture_enabled(ctx, TEXTURE_CUBE_BIT); - /* GL_EXT_secondary_color */ - case GL_COLOR_SUM_EXT: - CHECK_EXTENSION2(EXT_secondary_color, ARB_vertex_program); - return ctx->Fog.ColorSumEnabled; - /* GL_ARB_multisample */ case GL_MULTISAMPLE_ARB: return ctx->Multisample.Enabled; @@ -1281,155 +975,11 @@ _mesa_IsEnabled( GLenum cap ) CHECK_EXTENSION2(NV_point_sprite, ARB_point_sprite) return ctx->Point.PointSprite; -#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program - case GL_VERTEX_PROGRAM_ARB: - CHECK_EXTENSION2(ARB_vertex_program, NV_vertex_program); - return ctx->VertexProgram.Enabled; - case GL_VERTEX_PROGRAM_POINT_SIZE_ARB: - CHECK_EXTENSION2(ARB_vertex_program, NV_vertex_program); - return ctx->VertexProgram.PointSizeEnabled; - case GL_VERTEX_PROGRAM_TWO_SIDE_ARB: - CHECK_EXTENSION2(ARB_vertex_program, NV_vertex_program); - return ctx->VertexProgram.TwoSideEnabled; -#endif -#if FEATURE_NV_vertex_program - case GL_VERTEX_ATTRIB_ARRAY0_NV: - case GL_VERTEX_ATTRIB_ARRAY1_NV: - case GL_VERTEX_ATTRIB_ARRAY2_NV: - case GL_VERTEX_ATTRIB_ARRAY3_NV: - case GL_VERTEX_ATTRIB_ARRAY4_NV: - case GL_VERTEX_ATTRIB_ARRAY5_NV: - case GL_VERTEX_ATTRIB_ARRAY6_NV: - case GL_VERTEX_ATTRIB_ARRAY7_NV: - case GL_VERTEX_ATTRIB_ARRAY8_NV: - case GL_VERTEX_ATTRIB_ARRAY9_NV: - case GL_VERTEX_ATTRIB_ARRAY10_NV: - case GL_VERTEX_ATTRIB_ARRAY11_NV: - case GL_VERTEX_ATTRIB_ARRAY12_NV: - case GL_VERTEX_ATTRIB_ARRAY13_NV: - case GL_VERTEX_ATTRIB_ARRAY14_NV: - case GL_VERTEX_ATTRIB_ARRAY15_NV: - CHECK_EXTENSION(NV_vertex_program); - { - GLint n = (GLint) cap - GL_VERTEX_ATTRIB_ARRAY0_NV; - ASSERT(VERT_ATTRIB_GENERIC(n) < Elements(ctx->Array.ArrayObj->VertexAttrib)); - return (ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(n)].Enabled != 0); - } - case GL_MAP1_VERTEX_ATTRIB0_4_NV: - case GL_MAP1_VERTEX_ATTRIB1_4_NV: - case GL_MAP1_VERTEX_ATTRIB2_4_NV: - case GL_MAP1_VERTEX_ATTRIB3_4_NV: - case GL_MAP1_VERTEX_ATTRIB4_4_NV: - case GL_MAP1_VERTEX_ATTRIB5_4_NV: - case GL_MAP1_VERTEX_ATTRIB6_4_NV: - case GL_MAP1_VERTEX_ATTRIB7_4_NV: - case GL_MAP1_VERTEX_ATTRIB8_4_NV: - case GL_MAP1_VERTEX_ATTRIB9_4_NV: - case GL_MAP1_VERTEX_ATTRIB10_4_NV: - case GL_MAP1_VERTEX_ATTRIB11_4_NV: - case GL_MAP1_VERTEX_ATTRIB12_4_NV: - case GL_MAP1_VERTEX_ATTRIB13_4_NV: - case GL_MAP1_VERTEX_ATTRIB14_4_NV: - case GL_MAP1_VERTEX_ATTRIB15_4_NV: - CHECK_EXTENSION(NV_vertex_program); - { - const GLuint map = (GLuint) (cap - GL_MAP1_VERTEX_ATTRIB0_4_NV); - return ctx->Eval.Map1Attrib[map]; - } - case GL_MAP2_VERTEX_ATTRIB0_4_NV: - case GL_MAP2_VERTEX_ATTRIB1_4_NV: - case GL_MAP2_VERTEX_ATTRIB2_4_NV: - case GL_MAP2_VERTEX_ATTRIB3_4_NV: - case GL_MAP2_VERTEX_ATTRIB4_4_NV: - case GL_MAP2_VERTEX_ATTRIB5_4_NV: - case GL_MAP2_VERTEX_ATTRIB6_4_NV: - case GL_MAP2_VERTEX_ATTRIB7_4_NV: - case GL_MAP2_VERTEX_ATTRIB8_4_NV: - case GL_MAP2_VERTEX_ATTRIB9_4_NV: - case GL_MAP2_VERTEX_ATTRIB10_4_NV: - case GL_MAP2_VERTEX_ATTRIB11_4_NV: - case GL_MAP2_VERTEX_ATTRIB12_4_NV: - case GL_MAP2_VERTEX_ATTRIB13_4_NV: - case GL_MAP2_VERTEX_ATTRIB14_4_NV: - case GL_MAP2_VERTEX_ATTRIB15_4_NV: - CHECK_EXTENSION(NV_vertex_program); - { - const GLuint map = (GLuint) (cap - GL_MAP2_VERTEX_ATTRIB0_4_NV); - return ctx->Eval.Map2Attrib[map]; - } -#endif /* FEATURE_NV_vertex_program */ - -#if FEATURE_NV_fragment_program - case GL_FRAGMENT_PROGRAM_NV: - CHECK_EXTENSION(NV_fragment_program); - return ctx->FragmentProgram.Enabled; -#endif /* FEATURE_NV_fragment_program */ - - /* GL_NV_texture_rectangle */ - case GL_TEXTURE_RECTANGLE_NV: - CHECK_EXTENSION(NV_texture_rectangle); - return is_texture_enabled(ctx, TEXTURE_RECT_BIT); - - /* GL_EXT_stencil_two_side */ - case GL_STENCIL_TEST_TWO_SIDE_EXT: - CHECK_EXTENSION(EXT_stencil_two_side); - return ctx->Stencil.TestTwoSide; - -#if FEATURE_ARB_fragment_program - case GL_FRAGMENT_PROGRAM_ARB: - return ctx->FragmentProgram.Enabled; -#endif /* FEATURE_ARB_fragment_program */ - /* GL_EXT_depth_bounds_test */ case GL_DEPTH_BOUNDS_TEST_EXT: CHECK_EXTENSION(EXT_depth_bounds_test); return ctx->Depth.BoundsTest; - /* GL_ARB_depth_clamp */ - case GL_DEPTH_CLAMP: - CHECK_EXTENSION(ARB_depth_clamp); - return ctx->Transform.DepthClamp; - -#if FEATURE_ATI_fragment_shader - case GL_FRAGMENT_SHADER_ATI: - CHECK_EXTENSION(ATI_fragment_shader); - return ctx->ATIFragmentShader.Enabled; -#endif /* FEATURE_ATI_fragment_shader */ - - case GL_TEXTURE_CUBE_MAP_SEAMLESS: - CHECK_EXTENSION(ARB_seamless_cube_map); - return ctx->Texture.CubeMapSeamless; - -#if FEATURE_EXT_transform_feedback - case GL_RASTERIZER_DISCARD: - CHECK_EXTENSION(EXT_transform_feedback); - return ctx->RasterDiscard; -#endif - - /* GL_NV_primitive_restart */ - case GL_PRIMITIVE_RESTART_NV: - if (!ctx->Extensions.NV_primitive_restart) { - goto invalid_enum_error; - } - return ctx->Array.PrimitiveRestart; - - /* GL 3.1 primitive restart */ - case GL_PRIMITIVE_RESTART: - if (ctx->VersionMajor * 10 + ctx->VersionMinor < 31) { - goto invalid_enum_error; - } - return ctx->Array.PrimitiveRestart; - - /* GL3.0 - GL_framebuffer_sRGB */ - case GL_FRAMEBUFFER_SRGB_EXT: - CHECK_EXTENSION(EXT_framebuffer_sRGB); - return ctx->Color.sRGBEnabled; - - /* GL_OES_EGL_image_external */ - case GL_TEXTURE_EXTERNAL_OES: - CHECK_EXTENSION(OES_EGL_image_external); - return is_texture_enabled(ctx, TEXTURE_EXTERNAL_BIT); - default: goto invalid_enum_error; } diff --git a/dll/opengl/mesa/src/mesa/main/enable.h b/dll/opengl/mesa/main/enable.h similarity index 83% rename from dll/opengl/mesa/src/mesa/main/enable.h rename to dll/opengl/mesa/main/enable.h index 6d90c170c8a..7fe88732647 100644 --- a/dll/opengl/mesa/src/mesa/main/enable.h +++ b/dll/opengl/mesa/main/enable.h @@ -49,18 +49,6 @@ _mesa_Enable( GLenum cap ); extern GLboolean GLAPIENTRY _mesa_IsEnabled( GLenum cap ); -extern void -_mesa_set_enablei(struct gl_context *ctx, GLenum cap, GLuint index, GLboolean state); - -extern void GLAPIENTRY -_mesa_DisableIndexed( GLenum cap, GLuint index ); - -extern void GLAPIENTRY -_mesa_EnableIndexed( GLenum cap, GLuint index ); - -extern GLboolean GLAPIENTRY -_mesa_IsEnabledIndexed( GLenum cap, GLuint index ); - extern void GLAPIENTRY _mesa_EnableClientState( GLenum cap ); diff --git a/dll/opengl/mesa/src/mesa/main/enums.c b/dll/opengl/mesa/main/enums.c similarity index 100% rename from dll/opengl/mesa/src/mesa/main/enums.c rename to dll/opengl/mesa/main/enums.c diff --git a/dll/opengl/mesa/src/mesa/main/enums.h b/dll/opengl/mesa/main/enums.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/enums.h rename to dll/opengl/mesa/main/enums.h diff --git a/dll/opengl/mesa/src/mesa/main/eval.c b/dll/opengl/mesa/main/eval.c similarity index 82% rename from dll/opengl/mesa/src/mesa/main/eval.c rename to dll/opengl/mesa/main/eval.c index e651715f788..a70897bcfcf 100644 --- a/dll/opengl/mesa/src/mesa/main/eval.c +++ b/dll/opengl/mesa/main/eval.c @@ -122,25 +122,6 @@ get_1d_map( struct gl_context *ctx, GLenum target ) return &ctx->EvalMap.Map1Texture3; case GL_MAP1_TEXTURE_COORD_4: return &ctx->EvalMap.Map1Texture4; - case GL_MAP1_VERTEX_ATTRIB0_4_NV: - case GL_MAP1_VERTEX_ATTRIB1_4_NV: - case GL_MAP1_VERTEX_ATTRIB2_4_NV: - case GL_MAP1_VERTEX_ATTRIB3_4_NV: - case GL_MAP1_VERTEX_ATTRIB4_4_NV: - case GL_MAP1_VERTEX_ATTRIB5_4_NV: - case GL_MAP1_VERTEX_ATTRIB6_4_NV: - case GL_MAP1_VERTEX_ATTRIB7_4_NV: - case GL_MAP1_VERTEX_ATTRIB8_4_NV: - case GL_MAP1_VERTEX_ATTRIB9_4_NV: - case GL_MAP1_VERTEX_ATTRIB10_4_NV: - case GL_MAP1_VERTEX_ATTRIB11_4_NV: - case GL_MAP1_VERTEX_ATTRIB12_4_NV: - case GL_MAP1_VERTEX_ATTRIB13_4_NV: - case GL_MAP1_VERTEX_ATTRIB14_4_NV: - case GL_MAP1_VERTEX_ATTRIB15_4_NV: - if (!ctx->Extensions.NV_vertex_program) - return NULL; - return &ctx->EvalMap.Map1Attrib[target - GL_MAP1_VERTEX_ATTRIB0_4_NV]; default: return NULL; } @@ -172,25 +153,6 @@ get_2d_map( struct gl_context *ctx, GLenum target ) return &ctx->EvalMap.Map2Texture3; case GL_MAP2_TEXTURE_COORD_4: return &ctx->EvalMap.Map2Texture4; - case GL_MAP2_VERTEX_ATTRIB0_4_NV: - case GL_MAP2_VERTEX_ATTRIB1_4_NV: - case GL_MAP2_VERTEX_ATTRIB2_4_NV: - case GL_MAP2_VERTEX_ATTRIB3_4_NV: - case GL_MAP2_VERTEX_ATTRIB4_4_NV: - case GL_MAP2_VERTEX_ATTRIB5_4_NV: - case GL_MAP2_VERTEX_ATTRIB6_4_NV: - case GL_MAP2_VERTEX_ATTRIB7_4_NV: - case GL_MAP2_VERTEX_ATTRIB8_4_NV: - case GL_MAP2_VERTEX_ATTRIB9_4_NV: - case GL_MAP2_VERTEX_ATTRIB10_4_NV: - case GL_MAP2_VERTEX_ATTRIB11_4_NV: - case GL_MAP2_VERTEX_ATTRIB12_4_NV: - case GL_MAP2_VERTEX_ATTRIB13_4_NV: - case GL_MAP2_VERTEX_ATTRIB14_4_NV: - case GL_MAP2_VERTEX_ATTRIB15_4_NV: - if (!ctx->Extensions.NV_vertex_program) - return NULL; - return &ctx->EvalMap.Map2Attrib[target - GL_MAP2_VERTEX_ATTRIB0_4_NV]; default: return NULL; } @@ -391,12 +353,6 @@ map1(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, return; } - if (ctx->Texture.CurrentUnit != 0) { - /* See OpenGL 1.2.1 spec, section F.2.13 */ - _mesa_error( ctx, GL_INVALID_OPERATION, "glMap2(ACTIVE_TEXTURE != 0)" ); - return; - } - map = get_1d_map(ctx, target); if (!map) { _mesa_error( ctx, GL_INVALID_ENUM, "glMap1(target)" ); @@ -485,12 +441,6 @@ map2( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, return; } - if (ctx->Texture.CurrentUnit != 0) { - /* See OpenGL 1.2.1 spec, section F.2.13 */ - _mesa_error( ctx, GL_INVALID_OPERATION, "glMap2(ACTIVE_TEXTURE != 0)" ); - return; - } - map = get_2d_map(ctx, target); if (!map) { _mesa_error( ctx, GL_INVALID_ENUM, "glMap2(target)" ); @@ -545,7 +495,7 @@ _mesa_Map2d( GLenum target, static void GLAPIENTRY -_mesa_GetnMapdvARB( GLenum target, GLenum query, GLsizei bufSize, GLdouble *v ) +_mesa_GetMapdv( GLenum target, GLenum query, GLdouble *v ) { GET_CURRENT_CONTEXT(ctx); struct gl_1d_map *map1d; @@ -553,7 +503,6 @@ _mesa_GetnMapdvARB( GLenum target, GLenum query, GLsizei bufSize, GLdouble *v ) GLint i, n; GLfloat *data; GLuint comps; - GLsizei numBytes; ASSERT_OUTSIDE_BEGIN_END(ctx); @@ -578,9 +527,6 @@ _mesa_GetnMapdvARB( GLenum target, GLenum query, GLsizei bufSize, GLdouble *v ) n = map2d->Uorder * map2d->Vorder * comps; } if (data) { - numBytes = n * sizeof *v; - if (bufSize < numBytes) - goto overflow; for (i=0;iOrder; } else { - numBytes = 2 * sizeof *v; - if (bufSize < numBytes) - goto overflow; v[0] = (GLdouble) map2d->Uorder; v[1] = (GLdouble) map2d->Vorder; } break; case GL_DOMAIN: if (map1d) { - numBytes = 2 * sizeof *v; - if (bufSize < numBytes) - goto overflow; v[0] = (GLdouble) map1d->u1; v[1] = (GLdouble) map1d->u2; } else { - numBytes = 4 * sizeof *v; - if (bufSize < numBytes) - goto overflow; v[0] = (GLdouble) map2d->u1; v[1] = (GLdouble) map2d->u2; v[2] = (GLdouble) map2d->v1; @@ -623,21 +557,10 @@ _mesa_GetnMapdvARB( GLenum target, GLenum query, GLsizei bufSize, GLdouble *v ) _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapdv(query)" ); } return; - -overflow: - _mesa_error( ctx, GL_INVALID_OPERATION, - "glGetnMapdvARB(out of bounds: bufSize is %d," - " but %d bytes are required)", bufSize, numBytes ); } static void GLAPIENTRY -_mesa_GetMapdv( GLenum target, GLenum query, GLdouble *v ) -{ - _mesa_GetnMapdvARB(target, query, INT_MAX, v); -} - -static void GLAPIENTRY -_mesa_GetnMapfvARB( GLenum target, GLenum query, GLsizei bufSize, GLfloat *v ) +_mesa_GetMapfv( GLenum target, GLenum query, GLfloat *v ) { GET_CURRENT_CONTEXT(ctx); struct gl_1d_map *map1d; @@ -645,7 +568,6 @@ _mesa_GetnMapfvARB( GLenum target, GLenum query, GLsizei bufSize, GLfloat *v ) GLint i, n; GLfloat *data; GLuint comps; - GLsizei numBytes; ASSERT_OUTSIDE_BEGIN_END(ctx); @@ -670,9 +592,6 @@ _mesa_GetnMapfvARB( GLenum target, GLenum query, GLsizei bufSize, GLfloat *v ) n = map2d->Uorder * map2d->Vorder * comps; } if (data) { - numBytes = n * sizeof *v; - if (bufSize < numBytes) - goto overflow; for (i=0;iOrder; } else { - numBytes = 2 * sizeof *v; - if (bufSize < numBytes) - goto overflow; v[0] = (GLfloat) map2d->Uorder; v[1] = (GLfloat) map2d->Vorder; } break; case GL_DOMAIN: if (map1d) { - numBytes = 2 * sizeof *v; - if (bufSize < numBytes) - goto overflow; v[0] = map1d->u1; v[1] = map1d->u2; } else { - numBytes = 4 * sizeof *v; - if (bufSize < numBytes) - goto overflow; v[0] = map2d->u1; v[1] = map2d->u2; v[2] = map2d->v1; @@ -715,23 +622,11 @@ _mesa_GetnMapfvARB( GLenum target, GLenum query, GLsizei bufSize, GLfloat *v ) _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapfv(query)" ); } return; - -overflow: - _mesa_error( ctx, GL_INVALID_OPERATION, - "glGetnMapfvARB(out of bounds: bufSize is %d," - " but %d bytes are required)", bufSize, numBytes ); } static void GLAPIENTRY -_mesa_GetMapfv( GLenum target, GLenum query, GLfloat *v ) -{ - _mesa_GetnMapfvARB(target, query, INT_MAX, v); -} - - -static void GLAPIENTRY -_mesa_GetnMapivARB( GLenum target, GLenum query, GLsizei bufSize, GLint *v ) +_mesa_GetMapiv( GLenum target, GLenum query, GLint *v ) { GET_CURRENT_CONTEXT(ctx); struct gl_1d_map *map1d; @@ -739,7 +634,6 @@ _mesa_GetnMapivARB( GLenum target, GLenum query, GLsizei bufSize, GLint *v ) GLuint i, n; GLfloat *data; GLuint comps; - GLsizei numBytes; ASSERT_OUTSIDE_BEGIN_END(ctx); @@ -764,9 +658,6 @@ _mesa_GetnMapivARB( GLenum target, GLenum query, GLsizei bufSize, GLint *v ) n = map2d->Uorder * map2d->Vorder * comps; } if (data) { - numBytes = n * sizeof *v; - if (bufSize < numBytes) - goto overflow; for (i=0;iOrder; } else { - numBytes = 2 * sizeof *v; - if (bufSize < numBytes) - goto overflow; v[0] = map2d->Uorder; v[1] = map2d->Vorder; } break; case GL_DOMAIN: if (map1d) { - numBytes = 2 * sizeof *v; - if (bufSize < numBytes) - goto overflow; v[0] = IROUND(map1d->u1); v[1] = IROUND(map1d->u2); } else { - numBytes = 4 * sizeof *v; - if (bufSize < numBytes) - goto overflow; v[0] = IROUND(map2d->u1); v[1] = IROUND(map2d->u2); v[2] = IROUND(map2d->v1); @@ -809,18 +688,6 @@ _mesa_GetnMapivARB( GLenum target, GLenum query, GLsizei bufSize, GLint *v ) _mesa_error( ctx, GL_INVALID_ENUM, "glGetMapiv(query)" ); } return; - -overflow: - _mesa_error( ctx, GL_INVALID_OPERATION, - "glGetnMapivARB(out of bounds: bufSize is %d," - " but %d bytes are required)", bufSize, numBytes ); -} - - -static void GLAPIENTRY -_mesa_GetMapiv( GLenum target, GLenum query, GLint *v ) -{ - _mesa_GetnMapivARB(target, query, INT_MAX, v); } @@ -916,11 +783,6 @@ _mesa_init_eval_dispatch(struct _glapi_table *disp) SET_MapGrid1f(disp, _mesa_MapGrid1f); SET_MapGrid2d(disp, _mesa_MapGrid2d); SET_MapGrid2f(disp, _mesa_MapGrid2f); - - /* GL_ARB_robustness */ - SET_GetnMapdvARB(disp, _mesa_GetnMapdvARB); - SET_GetnMapfvARB(disp, _mesa_GetnMapfvARB); - SET_GetnMapivARB(disp, _mesa_GetnMapivARB); } @@ -972,7 +834,6 @@ init_2d_map( struct gl_2d_map *map, int n, const float *initial ) void _mesa_init_eval( struct gl_context *ctx ) { - int i; /* Evaluators group */ ctx->Eval.Map1Color4 = GL_FALSE; @@ -984,7 +845,6 @@ void _mesa_init_eval( struct gl_context *ctx ) ctx->Eval.Map1TextureCoord4 = GL_FALSE; ctx->Eval.Map1Vertex3 = GL_FALSE; ctx->Eval.Map1Vertex4 = GL_FALSE; - memset(ctx->Eval.Map1Attrib, 0, sizeof(ctx->Eval.Map1Attrib)); ctx->Eval.Map2Color4 = GL_FALSE; ctx->Eval.Map2Index = GL_FALSE; ctx->Eval.Map2Normal = GL_FALSE; @@ -994,7 +854,6 @@ void _mesa_init_eval( struct gl_context *ctx ) ctx->Eval.Map2TextureCoord4 = GL_FALSE; ctx->Eval.Map2Vertex3 = GL_FALSE; ctx->Eval.Map2Vertex4 = GL_FALSE; - memset(ctx->Eval.Map2Attrib, 0, sizeof(ctx->Eval.Map2Attrib)); ctx->Eval.AutoNormal = GL_FALSE; ctx->Eval.MapGrid1un = 1; ctx->Eval.MapGrid1u1 = 0.0; @@ -1013,7 +872,6 @@ void _mesa_init_eval( struct gl_context *ctx ) static GLfloat index[1] = { 1.0 }; static GLfloat color[4] = { 1.0, 1.0, 1.0, 1.0 }; static GLfloat texcoord[4] = { 0.0, 0.0, 0.0, 1.0 }; - static GLfloat attrib[4] = { 0.0, 0.0, 0.0, 1.0 }; init_1d_map( &ctx->EvalMap.Map1Vertex3, 3, vertex ); init_1d_map( &ctx->EvalMap.Map1Vertex4, 4, vertex ); @@ -1024,8 +882,6 @@ void _mesa_init_eval( struct gl_context *ctx ) init_1d_map( &ctx->EvalMap.Map1Texture2, 2, texcoord ); init_1d_map( &ctx->EvalMap.Map1Texture3, 3, texcoord ); init_1d_map( &ctx->EvalMap.Map1Texture4, 4, texcoord ); - for (i = 0; i < 16; i++) - init_1d_map( ctx->EvalMap.Map1Attrib + i, 4, attrib ); init_2d_map( &ctx->EvalMap.Map2Vertex3, 3, vertex ); init_2d_map( &ctx->EvalMap.Map2Vertex4, 4, vertex ); @@ -1036,16 +892,12 @@ void _mesa_init_eval( struct gl_context *ctx ) init_2d_map( &ctx->EvalMap.Map2Texture2, 2, texcoord ); init_2d_map( &ctx->EvalMap.Map2Texture3, 3, texcoord ); init_2d_map( &ctx->EvalMap.Map2Texture4, 4, texcoord ); - for (i = 0; i < 16; i++) - init_2d_map( ctx->EvalMap.Map2Attrib + i, 4, attrib ); } } void _mesa_free_eval_data( struct gl_context *ctx ) { - int i; - /* Free evaluator data */ if (ctx->EvalMap.Map1Vertex3.Points) FREE( ctx->EvalMap.Map1Vertex3.Points ); @@ -1065,8 +917,6 @@ void _mesa_free_eval_data( struct gl_context *ctx ) FREE( ctx->EvalMap.Map1Texture3.Points ); if (ctx->EvalMap.Map1Texture4.Points) FREE( ctx->EvalMap.Map1Texture4.Points ); - for (i = 0; i < 16; i++) - FREE((ctx->EvalMap.Map1Attrib[i].Points)); if (ctx->EvalMap.Map2Vertex3.Points) FREE( ctx->EvalMap.Map2Vertex3.Points ); @@ -1086,6 +936,4 @@ void _mesa_free_eval_data( struct gl_context *ctx ) FREE( ctx->EvalMap.Map2Texture3.Points ); if (ctx->EvalMap.Map2Texture4.Points) FREE( ctx->EvalMap.Map2Texture4.Points ); - for (i = 0; i < 16; i++) - FREE((ctx->EvalMap.Map2Attrib[i].Points)); } diff --git a/dll/opengl/mesa/src/mesa/main/eval.h b/dll/opengl/mesa/main/eval.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/eval.h rename to dll/opengl/mesa/main/eval.h diff --git a/dll/opengl/mesa/src/mesa/main/execmem.c b/dll/opengl/mesa/main/execmem.c similarity index 99% rename from dll/opengl/mesa/src/mesa/main/execmem.c rename to dll/opengl/mesa/main/execmem.c index ccd6ab43fc1..aef5494d583 100644 --- a/dll/opengl/mesa/src/mesa/main/execmem.c +++ b/dll/opengl/mesa/main/execmem.c @@ -32,7 +32,6 @@ #include "imports.h" -#include "glapi/glthread.h" diff --git a/dll/opengl/mesa/main/extensions.c b/dll/opengl/mesa/main/extensions.c new file mode 100644 index 00000000000..0b781e4009b --- /dev/null +++ b/dll/opengl/mesa/main/extensions.c @@ -0,0 +1,652 @@ +/* + * Mesa 3-D graphics library + * Version: 7.6 + * + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. + * Copyright (C) 2009 VMware, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +/** + * \file + * \brief Extension handling + */ + + +#include "glheader.h" +#include "imports.h" +#include "context.h" +#include "extensions.h" +#include "mfeatures.h" +#include "mtypes.h" + +#define ALIGN(value, alignment) (((value) + alignment - 1) & ~(alignment - 1)) + +/** + * \brief An element of the \c extension_table. + */ +struct extension { + /** Name of extension, such as "GL_ARB_depth_clamp". */ + const char *name; + + /** Offset (in bytes) of the corresponding member in struct gl_extensions. */ + size_t offset; + + /** Year the extension was proposed or approved. Used to sort the + * extension string chronologically. */ + uint16_t year; +}; + + +/** + * Given a member \c x of struct gl_extensions, return offset of + * \c x in bytes. + */ +#define o(x) offsetof(struct gl_extensions, x) + + +/** + * \brief Table of supported OpenGL extensions for all API's. + */ +static const struct extension extension_table[] = { + /* ARB Extensions */ + { "GL_ARB_half_float_pixel", o(ARB_half_float_pixel), 2003 }, + { "GL_ARB_half_float_vertex", o(ARB_half_float_vertex), 2008 }, + { "GL_ARB_map_buffer_range", o(ARB_map_buffer_range), 2008 }, + { "GL_ARB_multisample", o(dummy_true), 1994 }, + { "GL_ARB_point_parameters", o(EXT_point_parameters), 1997 }, + { "GL_ARB_point_sprite", o(ARB_point_sprite), 2003 }, + { "GL_ARB_texture_cube_map", o(ARB_texture_cube_map), 1999 }, + { "GL_ARB_texture_env_add", o(dummy_true), 1999 }, + { "GL_ARB_texture_env_combine", o(ARB_texture_env_combine), 2001 }, + { "GL_ARB_texture_env_crossbar", o(ARB_texture_env_crossbar), 2001 }, + { "GL_ARB_texture_env_dot3", o(ARB_texture_env_dot3), 2001 }, + { "GL_ARB_texture_float", o(ARB_texture_float), 2004 }, + { "GL_ARB_texture_mirrored_repeat", o(dummy_true), 2001 }, + { "GL_ARB_texture_non_power_of_two", o(ARB_texture_non_power_of_two), 2003 }, + { "GL_ARB_texture_storage", o(ARB_texture_storage), 2011 }, + { "GL_ARB_transpose_matrix", o(ARB_transpose_matrix), 1999 }, + { "GL_ARB_vertex_array_object", o(ARB_vertex_array_object), 2006 }, + { "GL_ARB_vertex_buffer_object", o(dummy_true), 2003 }, + { "GL_ARB_window_pos", o(ARB_window_pos), 2001 }, + /* EXT extensions */ + { "GL_EXT_abgr", o(dummy_true), 1995 }, + { "GL_EXT_bgra", o(dummy_true), 1995 }, + { "GL_EXT_blend_color", o(EXT_blend_color), 1995 }, + { "GL_EXT_blend_equation_separate", o(EXT_blend_equation_separate), 2003 }, + { "GL_EXT_blend_func_separate", o(EXT_blend_func_separate), 1999 }, + { "GL_EXT_blend_minmax", o(EXT_blend_minmax), 1995 }, + { "GL_EXT_blend_subtract", o(dummy_true), 1995 }, + { "GL_EXT_clip_volume_hint", o(EXT_clip_volume_hint), 1996 }, + { "GL_EXT_compiled_vertex_array", o(EXT_compiled_vertex_array), 1996 }, + { "GL_EXT_copy_texture", o(dummy_true), 1995 }, + { "GL_EXT_depth_bounds_test", o(EXT_depth_bounds_test), 2002 }, + { "GL_EXT_draw_range_elements", o(EXT_draw_range_elements), 1997 }, + { "GL_EXT_fog_coord", o(EXT_fog_coord), 1999 }, + { "GL_EXT_packed_pixels", o(EXT_packed_pixels), 1997 }, + { "GL_EXT_point_parameters", o(EXT_point_parameters), 1997 }, + { "GL_EXT_polygon_offset", o(dummy_true), 1995 }, + { "GL_EXT_rescale_normal", o(EXT_rescale_normal), 1997 }, + { "GL_EXT_secondary_color", o(EXT_secondary_color), 1999 }, + { "GL_EXT_separate_shader_objects", o(EXT_separate_shader_objects), 2008 }, + { "GL_EXT_separate_specular_color", o(EXT_separate_specular_color), 1997 }, + { "GL_EXT_shadow_funcs", o(EXT_shadow_funcs), 2002 }, + { "GL_EXT_stencil_wrap", o(dummy_true), 2002 }, + { "GL_EXT_subtexture", o(dummy_true), 1995 }, + { "GL_EXT_texture3D", o(EXT_texture3D), 1996 }, + { "GL_EXT_texture_cube_map", o(ARB_texture_cube_map), 2001 }, + { "GL_EXT_texture_env_add", o(dummy_true), 1999 }, + { "GL_EXT_texture_env_combine", o(dummy_true), 2000 }, + { "GL_EXT_texture_env_dot3", o(EXT_texture_env_dot3), 2000 }, + { "GL_EXT_texture_filter_anisotropic", o(EXT_texture_filter_anisotropic), 1999 }, + { "GL_EXT_texture_integer", o(EXT_texture_integer), 2006 }, + { "GL_EXT_texture_object", o(dummy_true), 1995 }, + { "GL_EXT_texture", o(dummy_true), 1996 }, + { "GL_EXT_vertex_array", o(dummy_true), 1995 }, + + /* Vendor extensions */ + { "GL_APPLE_object_purgeable", o(APPLE_object_purgeable), 2006 }, + { "GL_APPLE_packed_pixels", o(APPLE_packed_pixels), 2002 }, + { "GL_APPLE_vertex_array_object", o(APPLE_vertex_array_object), 2002 }, + { "GL_ATI_blend_equation_separate", o(EXT_blend_equation_separate), 2003 }, + { "GL_ATI_texture_env_combine3", o(ATI_texture_env_combine3), 2002 }, + { "GL_ATI_texture_float", o(ARB_texture_float), 2002 }, + { "GL_IBM_multimode_draw_arrays", o(IBM_multimode_draw_arrays), 1998 }, + { "GL_IBM_rasterpos_clip", o(IBM_rasterpos_clip), 1996 }, + { "GL_IBM_texture_mirrored_repeat", o(dummy_true), 1998 }, + { "GL_INGR_blend_func_separate", o(EXT_blend_func_separate), 1999 }, + { "GL_MESA_pack_invert", o(MESA_pack_invert), 2002 }, + { "GL_MESA_resize_buffers", o(MESA_resize_buffers), 1999 }, + { "GL_MESA_window_pos", o(ARB_window_pos), 2000 }, + { "GL_MESA_ycbcr_texture", o(MESA_ycbcr_texture), 2002 }, + { "GL_NV_blend_square", o(NV_blend_square), 1999 }, + { "GL_NV_fog_distance", o(NV_fog_distance), 2001 }, + { "GL_NV_light_max_exponent", o(NV_light_max_exponent), 1999 }, + { "GL_NV_point_sprite", o(NV_point_sprite), 2001 }, + { "GL_NV_texgen_reflection", o(NV_texgen_reflection), 1999 }, + { "GL_NV_texture_barrier", o(NV_texture_barrier), 2009 }, + { "GL_NV_texture_env_combine4", o(NV_texture_env_combine4), 1999 }, + + { 0, 0, 0}, +}; + + +/** + * Given an extension name, lookup up the corresponding member of struct + * gl_extensions and return that member's offset (in bytes). If the name is + * not found in the \c extension_table, return 0. + * + * \param name Name of extension. + * \return Offset of member in struct gl_extensions. + */ +static size_t +name_to_offset(const char* name) +{ + const struct extension *i; + + if (name == 0) + return 0; + + for (i = extension_table; i->name != 0; ++i) { + if (strcmp(name, i->name) == 0) + return i->offset; + } + + return 0; +} + + +/** + * \brief Extensions enabled by default. + * + * These extensions are enabled by _mesa_init_extensions(). + * + * XXX: Should these defaults also apply to GLES? + */ +static const size_t default_extensions[] = { + o(ARB_transpose_matrix), + o(ARB_window_pos), + + o(EXT_compiled_vertex_array), + o(EXT_draw_range_elements), + o(EXT_packed_pixels), + o(EXT_rescale_normal), + o(EXT_separate_specular_color), + o(EXT_texture3D), + + /* Vendor Extensions */ + o(APPLE_packed_pixels), + o(IBM_multimode_draw_arrays), + o(IBM_rasterpos_clip), + o(NV_light_max_exponent), + o(NV_texgen_reflection), + + 0, +}; + + +/** + * Enable all extensions suitable for a software-only renderer. + * This is a convenience function used by the XMesa, OSMesa, GGI drivers, etc. + */ +void +_mesa_enable_sw_extensions(struct gl_context *ctx) +{ + ctx->Extensions.ARB_half_float_pixel = GL_TRUE; + ctx->Extensions.ARB_half_float_vertex = GL_TRUE; + ctx->Extensions.ARB_map_buffer_range = GL_TRUE; + ctx->Extensions.ARB_point_sprite = GL_TRUE; + ctx->Extensions.ARB_texture_cube_map = GL_TRUE; + ctx->Extensions.ARB_texture_env_combine = GL_TRUE; + ctx->Extensions.ARB_texture_env_crossbar = GL_TRUE; + ctx->Extensions.ARB_texture_env_dot3 = GL_TRUE; + /*ctx->Extensions.ARB_texture_float = GL_TRUE;*/ + ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE; + ctx->Extensions.ARB_texture_storage = GL_TRUE; + ctx->Extensions.ARB_vertex_array_object = GL_TRUE; + ctx->Extensions.APPLE_vertex_array_object = GL_TRUE; +#if FEATURE_APPLE_object_purgeable + ctx->Extensions.APPLE_object_purgeable = GL_TRUE; +#endif + ctx->Extensions.ATI_texture_env_combine3 = GL_TRUE; + ctx->Extensions.EXT_blend_color = GL_TRUE; + ctx->Extensions.EXT_blend_equation_separate = GL_TRUE; + ctx->Extensions.EXT_blend_func_separate = GL_TRUE; + ctx->Extensions.EXT_blend_minmax = GL_TRUE; + ctx->Extensions.EXT_depth_bounds_test = GL_TRUE; + ctx->Extensions.EXT_fog_coord = GL_TRUE; + ctx->Extensions.EXT_point_parameters = GL_TRUE; + ctx->Extensions.EXT_shadow_funcs = GL_TRUE; + ctx->Extensions.EXT_secondary_color = GL_TRUE; + ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE; + ctx->Extensions.EXT_texture_filter_anisotropic = GL_TRUE; + /*ctx->Extensions.IBM_multimode_draw_arrays = GL_TRUE;*/ + ctx->Extensions.MESA_pack_invert = GL_TRUE; + ctx->Extensions.MESA_resize_buffers = GL_TRUE; + ctx->Extensions.MESA_ycbcr_texture = GL_TRUE; + ctx->Extensions.NV_blend_square = GL_TRUE; + /*ctx->Extensions.NV_light_max_exponent = GL_TRUE;*/ + ctx->Extensions.NV_point_sprite = GL_TRUE; + ctx->Extensions.NV_texture_env_combine4 = GL_TRUE; + /*ctx->Extensions.NV_texgen_reflection = GL_TRUE;*/ +#if FEATURE_texture_fxt1 + _mesa_enable_extension(ctx, "GL_3DFX_texture_compression_FXT1"); +#endif +} + + +/** + * Enable all OpenGL 1.3 features and extensions. + * A convenience function to be called by drivers. + */ +void +_mesa_enable_1_3_extensions(struct gl_context *ctx) +{ + ctx->Extensions.ARB_texture_cube_map = GL_TRUE; + ctx->Extensions.ARB_texture_env_combine = GL_TRUE; + ctx->Extensions.ARB_texture_env_dot3 = GL_TRUE; + /*ctx->Extensions.ARB_transpose_matrix = GL_TRUE;*/ +} + + + +/** + * Enable all OpenGL 1.4 features and extensions. + * A convenience function to be called by drivers. + */ +void +_mesa_enable_1_4_extensions(struct gl_context *ctx) +{ + ctx->Extensions.ARB_texture_env_crossbar = GL_TRUE; + ctx->Extensions.ARB_window_pos = GL_TRUE; + ctx->Extensions.EXT_blend_color = GL_TRUE; + ctx->Extensions.EXT_blend_func_separate = GL_TRUE; + ctx->Extensions.EXT_blend_minmax = GL_TRUE; + ctx->Extensions.EXT_fog_coord = GL_TRUE; + ctx->Extensions.EXT_point_parameters = GL_TRUE; + ctx->Extensions.EXT_secondary_color = GL_TRUE; +} + + +/** + * Enable all OpenGL 1.5 features and extensions. + * A convenience function to be called by drivers. + */ +void +_mesa_enable_1_5_extensions(struct gl_context *ctx) +{ + ctx->Extensions.EXT_shadow_funcs = GL_TRUE; +} + + +/** + * Enable all OpenGL 2.0 features and extensions. + * A convenience function to be called by drivers. + */ +void +_mesa_enable_2_0_extensions(struct gl_context *ctx) +{ + ctx->Extensions.ARB_point_sprite = GL_TRUE; + ctx->Extensions.EXT_blend_equation_separate = GL_TRUE; + ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE; +} + + +/** + * Enable all OpenGL 2.1 features and extensions. + * A convenience function to be called by drivers. + */ +void +_mesa_enable_2_1_extensions(struct gl_context *ctx) +{ +} + + +/** + * Either enable or disable the named extension. + * \return GL_TRUE for success, GL_FALSE if invalid extension name + */ +static GLboolean +set_extension( struct gl_context *ctx, const char *name, GLboolean state ) +{ + size_t offset; + + if (ctx->Extensions.String) { + /* The string was already queried - can't change it now! */ + _mesa_problem(ctx, "Trying to enable/disable extension after glGetString(GL_EXTENSIONS): %s", name); + return GL_FALSE; + } + + offset = name_to_offset(name); + if (offset == 0) { + _mesa_problem(ctx, "Trying to enable/disable unknown extension %s", + name); + return GL_FALSE; + } else if (offset == o(dummy_true) && state == GL_FALSE) { + _mesa_problem(ctx, "Trying to disable a permanently enabled extension: " + "%s", name); + return GL_FALSE; + } else { + GLboolean *base = (GLboolean *) &ctx->Extensions; + base[offset] = state; + return GL_TRUE; + } +} + + +/** + * Enable the named extension. + * Typically called by drivers. + */ +void +_mesa_enable_extension( struct gl_context *ctx, const char *name ) +{ + if (!set_extension(ctx, name, GL_TRUE)) + _mesa_problem(ctx, "Trying to enable unknown extension: %s", name); +} + + +/** + * Disable the named extension. + * XXX is this really needed??? + */ +void +_mesa_disable_extension( struct gl_context *ctx, const char *name ) +{ + if (!set_extension(ctx, name, GL_FALSE)) + _mesa_problem(ctx, "Trying to disable unknown extension: %s", name); +} + + +/** + * Test if the named extension is enabled in this context. + */ +GLboolean +_mesa_extension_is_enabled( struct gl_context *ctx, const char *name ) +{ + size_t offset; + GLboolean *base; + + if (name == 0) + return GL_FALSE; + + offset = name_to_offset(name); + if (offset == 0) + return GL_FALSE; + base = (GLboolean *) &ctx->Extensions; + return base[offset]; +} + + +/** + * \brief Apply the \c MESA_EXTENSION_OVERRIDE environment variable. + * + * \c MESA_EXTENSION_OVERRIDE is a space-separated list of extensions to + * enable or disable. The list is processed thus: + * - Enable recognized extension names that are prefixed with '+'. + * - Disable recognized extension names that are prefixed with '-'. + * - Enable recognized extension names that are not prefixed. + * - Collect unrecognized extension names in a new string. + * + * \return Space-separated list of unrecognized extension names (which must + * be freed). Does not return \c NULL. + */ +static char * +get_extension_override( struct gl_context *ctx ) +{ + const char *env_const = _mesa_getenv("MESA_EXTENSION_OVERRIDE"); + char *env; + char *ext; + char *extra_exts; + int len; + + if (env_const == NULL) { + /* Return the empty string rather than NULL. This simplifies the logic + * of client functions. */ + return calloc(4, sizeof(char)); + } + + /* extra_exts: List of unrecognized extensions. */ + extra_exts = calloc(ALIGN(strlen(env_const) + 2, 4), sizeof(char)); + + /* Copy env_const because strtok() is destructive. */ + env = _strdup(env_const); + for (ext = strtok(env, " "); ext != NULL; ext = strtok(NULL, " ")) { + int enable; + int recognized; + switch (ext[0]) { + case '+': + enable = 1; + ++ext; + break; + case '-': + enable = 0; + ++ext; + break; + default: + enable = 1; + break; + } + recognized = set_extension(ctx, ext, enable); + if (!recognized) { + strcat(extra_exts, ext); + strcat(extra_exts, " "); + } + } + + free(env); + + /* Remove trailing space. */ + len = strlen(extra_exts); + if (extra_exts[len - 1] == ' ') + extra_exts[len - 1] = '\0'; + + return extra_exts; +} + + +/** + * \brief Initialize extension tables and enable default extensions. + * + * This should be called during context initialization. + * Note: Sets gl_extensions.dummy_true to true. + */ +void +_mesa_init_extensions( struct gl_context *ctx ) +{ + GLboolean *base = (GLboolean *) &ctx->Extensions; + GLboolean *sentinel = base + o(extension_sentinel); + GLboolean *i; + const size_t *j; + + /* First, turn all extensions off. */ + for (i = base; i != sentinel; ++i) + *i = GL_FALSE; + + /* Then, selectively turn default extensions on. */ + ctx->Extensions.dummy_true = GL_TRUE; + for (j = default_extensions; *j != 0; ++j) + base[*j] = GL_TRUE; +} + + +typedef unsigned short extension_index; + + +/** + * Compare two entries of the extensions table. Sorts first by year, + * then by name. + * + * Arguments are indices into extension_table. + */ +static int +extension_compare(const void *p1, const void *p2) +{ + extension_index i1 = * (const extension_index *) p1; + extension_index i2 = * (const extension_index *) p2; + const struct extension *e1 = &extension_table[i1]; + const struct extension *e2 = &extension_table[i2]; + int res; + + res = (int)e1->year - (int)e2->year; + + if (res == 0) { + res = strcmp(e1->name, e2->name); + } + + return res; +} + + +/** + * Construct the GL_EXTENSIONS string. Called the first time that + * glGetString(GL_EXTENSIONS) is called. + */ +GLubyte* +_mesa_make_extension_string(struct gl_context *ctx) +{ + /* The extension string. */ + char *exts = 0; + /* Length of extension string. */ + size_t length = 0; + /* Number of extensions */ + unsigned count; + /* Indices of the extensions sorted by year */ + extension_index *extension_indices; + /* String of extra extensions. */ + char *extra_extensions = get_extension_override(ctx); + GLboolean *base = (GLboolean *) &ctx->Extensions; + const struct extension *i; + unsigned j; + unsigned maxYear = ~0; + + /* Check if the MESA_EXTENSION_MAX_YEAR env var is set */ + { + const char *env = getenv("MESA_EXTENSION_MAX_YEAR"); + if (env) { + maxYear = atoi(env); + _mesa_debug(ctx, "Note: limiting GL extensions to %u or earlier\n", + maxYear); + } + } + + /* Compute length of the extension string. */ + count = 0; + for (i = extension_table; i->name != 0; ++i) { + if (base[i->offset] && + i->year <= maxYear) { + length += strlen(i->name) + 1; /* +1 for space */ + ++count; + } + } + if (extra_extensions != NULL) + length += 1 + strlen(extra_extensions); /* +1 for space */ + + exts = (char *) calloc(ALIGN(length + 1, 4), sizeof(char)); + if (exts == NULL) { + free(extra_extensions); + return NULL; + } + + extension_indices = malloc(count * sizeof(extension_index)); + if (extension_indices == NULL) { + free(exts); + free(extra_extensions); + return NULL; + } + + /* Sort extensions in chronological order because certain old applications (e.g., + * Quake3 demo) store the extension list in a static size buffer so chronologically + * order ensure that the extensions that such applications expect will fit into + * that buffer. + */ + j = 0; + for (i = extension_table; i->name != 0; ++i) { + if (base[i->offset] && + i->year <= maxYear) { + extension_indices[j++] = i - extension_table; + } + } + assert(j == count); + qsort(extension_indices, count, sizeof *extension_indices, extension_compare); + + /* Build the extension string.*/ + for (j = 0; j < count; ++j) { + i = &extension_table[extension_indices[j]]; + assert(base[i->offset]); + strcat(exts, i->name); + strcat(exts, " "); + } + free(extension_indices); + if (extra_extensions != 0) { + strcat(exts, extra_extensions); + free(extra_extensions); + } + + return (GLubyte *) exts; +} + +/** + * Return number of enabled extensions. + */ +GLuint +_mesa_get_extension_count(struct gl_context *ctx) +{ + GLboolean *base; + const struct extension *i; + + /* only count once */ + if (ctx->Extensions.Count != 0) + return ctx->Extensions.Count; + + base = (GLboolean *) &ctx->Extensions; + for (i = extension_table; i->name != 0; ++i) { + if (base[i->offset]) { + ctx->Extensions.Count++; + } + } + return ctx->Extensions.Count; +} + +/** + * Return name of i-th enabled extension + */ +const GLubyte * +_mesa_get_enabled_extension(struct gl_context *ctx, GLuint index) +{ + const GLboolean *base; + size_t n; + const struct extension *i; + + if (index < 0) + return NULL; + + base = (GLboolean*) &ctx->Extensions; + n = 0; + for (i = extension_table; i->name != 0; ++i) { + if (n == index && base[i->offset]) { + return (GLubyte*) i->name; + } else if (base[i->offset]) { + ++n; + } + } + + return NULL; +} diff --git a/dll/opengl/mesa/src/mesa/main/extensions.h b/dll/opengl/mesa/main/extensions.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/extensions.h rename to dll/opengl/mesa/main/extensions.h diff --git a/dll/opengl/mesa/src/mesa/main/feedback.c b/dll/opengl/mesa/main/feedback.c similarity index 100% rename from dll/opengl/mesa/src/mesa/main/feedback.c rename to dll/opengl/mesa/main/feedback.c diff --git a/dll/opengl/mesa/src/mesa/main/feedback.h b/dll/opengl/mesa/main/feedback.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/feedback.h rename to dll/opengl/mesa/main/feedback.h diff --git a/dll/opengl/mesa/src/mesa/main/fog.c b/dll/opengl/mesa/main/fog.c similarity index 92% rename from dll/opengl/mesa/src/mesa/main/fog.c rename to dll/opengl/mesa/main/fog.c index d65add9302d..a8ed4d99722 100644 --- a/dll/opengl/mesa/src/mesa/main/fog.c +++ b/dll/opengl/mesa/main/fog.c @@ -150,14 +150,10 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params ) if (TEST_EQ_4V(ctx->Fog.Color, params)) return; FLUSH_VERTICES(ctx, _NEW_FOG); - ctx->Fog.ColorUnclamped[0] = params[0]; - ctx->Fog.ColorUnclamped[1] = params[1]; - ctx->Fog.ColorUnclamped[2] = params[2]; - ctx->Fog.ColorUnclamped[3] = params[3]; - ctx->Fog.Color[0] = CLAMP(params[0], 0.0F, 1.0F); - ctx->Fog.Color[1] = CLAMP(params[1], 0.0F, 1.0F); - ctx->Fog.Color[2] = CLAMP(params[2], 0.0F, 1.0F); - ctx->Fog.Color[3] = CLAMP(params[3], 0.0F, 1.0F); + ctx->Fog.Color[0] = params[0]; + ctx->Fog.Color[1] = params[1]; + ctx->Fog.Color[2] = params[2]; + ctx->Fog.Color[3] = params[3]; break; case GL_FOG_COORDINATE_SOURCE_EXT: { GLenum p = (GLenum) (GLint) *params; @@ -206,7 +202,6 @@ void _mesa_init_fog( struct gl_context * ctx ) ctx->Fog.Enabled = GL_FALSE; ctx->Fog.Mode = GL_EXP; ASSIGN_4V( ctx->Fog.Color, 0.0, 0.0, 0.0, 0.0 ); - ASSIGN_4V( ctx->Fog.ColorUnclamped, 0.0, 0.0, 0.0, 0.0 ); ctx->Fog.Index = 0.0; ctx->Fog.Density = 1.0; ctx->Fog.Start = 0.0; diff --git a/dll/opengl/mesa/src/mesa/main/fog.h b/dll/opengl/mesa/main/fog.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/fog.h rename to dll/opengl/mesa/main/fog.h diff --git a/dll/opengl/mesa/src/mesa/main/format_pack.c b/dll/opengl/mesa/main/format_pack.c similarity index 65% rename from dll/opengl/mesa/src/mesa/main/format_pack.c rename to dll/opengl/mesa/main/format_pack.c index 85b2c691c54..67ae9cfb671 100644 --- a/dll/opengl/mesa/src/mesa/main/format_pack.c +++ b/dll/opengl/mesa/main/format_pack.c @@ -38,8 +38,6 @@ #include "colormac.h" #include "format_pack.h" #include "macros.h" -#include "../../gallium/auxiliary/util/u_format_rgb9e5.h" -#include "../../gallium/auxiliary/util/u_format_r11g11b10f.h" typedef void (*pack_ubyte_rgba_row_func)(GLuint n, @@ -48,40 +46,6 @@ typedef void (*pack_ubyte_rgba_row_func)(GLuint n, typedef void (*pack_float_rgba_row_func)(GLuint n, const GLfloat src[][4], void *dst); - - -static inline GLfloat -linear_to_srgb(GLfloat cl) -{ - if (cl < 0.0f) - return 0.0f; - else if (cl < 0.0031308f) - return 12.92f * cl; - else if (cl < 1.0f) - return 1.055f * powf(cl, 0.41666f) - 0.055f; - else - return 1.0f; -} - - -static inline GLubyte -linear_float_to_srgb_ubyte(GLfloat cl) -{ - GLubyte res = FLOAT_TO_UBYTE(linear_to_srgb(cl)); - return res; -} - - -static inline GLubyte -linear_ubyte_to_srgb_ubyte(GLubyte cl) -{ - GLubyte res = FLOAT_TO_UBYTE(linear_to_srgb(cl / 255.0f)); - return res; -} - - - - /* * MESA_FORMAT_RGBA8888 */ @@ -850,262 +814,6 @@ pack_float_YCBCR_REV(const GLfloat src[4], void *dst) } -/* MESA_FORMAT_R8 */ - -static void -pack_ubyte_R8(const GLubyte src[4], void *dst) -{ - GLubyte *d = ((GLubyte *) dst); - *d = src[RCOMP]; -} - -static void -pack_float_R8(const GLfloat src[4], void *dst) -{ - GLubyte *d = ((GLubyte *) dst); - GLubyte r; - UNCLAMPED_FLOAT_TO_UBYTE(r, src[RCOMP]); - d[0] = r; -} - - -/* MESA_FORMAT_GR88 */ - -static void -pack_ubyte_GR88(const GLubyte src[4], void *dst) -{ - GLubyte *d = ((GLubyte *) dst); - *d = PACK_COLOR_88(src[GCOMP], src[RCOMP]); -} - -static void -pack_float_GR88(const GLfloat src[4], void *dst) -{ - GLushort *d = ((GLushort *) dst); - GLubyte r, g; - UNCLAMPED_FLOAT_TO_UBYTE(r, src[RCOMP]); - UNCLAMPED_FLOAT_TO_UBYTE(g, src[GCOMP]); - *d = PACK_COLOR_88(g, r); -} - - -/* MESA_FORMAT_RG88 */ - -static void -pack_ubyte_RG88(const GLubyte src[4], void *dst) -{ - GLubyte *d = ((GLubyte *) dst); - *d = PACK_COLOR_88(src[RCOMP], src[GCOMP]); -} - -static void -pack_float_RG88(const GLfloat src[4], void *dst) -{ - GLushort *d = ((GLushort *) dst); - GLubyte r, g; - UNCLAMPED_FLOAT_TO_UBYTE(r, src[RCOMP]); - UNCLAMPED_FLOAT_TO_UBYTE(g, src[GCOMP]); - *d = PACK_COLOR_88(r, g); -} - - -/* MESA_FORMAT_R16 */ - -static void -pack_ubyte_R16(const GLubyte src[4], void *dst) -{ - GLushort *d = ((GLushort *) dst); - *d = UBYTE_TO_USHORT(src[RCOMP]); -} - -static void -pack_float_R16(const GLfloat src[4], void *dst) -{ - GLushort *d = ((GLushort *) dst); - UNCLAMPED_FLOAT_TO_USHORT(d[0], src[RCOMP]); -} - - -/* MESA_FORMAT_RG1616 */ - -static void -pack_ubyte_RG1616(const GLubyte src[4], void *dst) -{ - GLuint *d = ((GLuint *) dst); - GLushort r = UBYTE_TO_USHORT(src[RCOMP]); - GLushort g = UBYTE_TO_USHORT(src[GCOMP]); - *d = PACK_COLOR_1616(g, r); -} - -static void -pack_float_RG1616(const GLfloat src[4], void *dst) -{ - GLuint *d = ((GLuint *) dst); - GLushort r, g; - UNCLAMPED_FLOAT_TO_USHORT(r, src[RCOMP]); - UNCLAMPED_FLOAT_TO_USHORT(g, src[GCOMP]); - *d = PACK_COLOR_1616(g, r); -} - - -/* MESA_FORMAT_RG1616_REV */ - -static void -pack_ubyte_RG1616_REV(const GLubyte src[4], void *dst) -{ - GLuint *d = ((GLuint *) dst); - GLushort r = UBYTE_TO_USHORT(src[RCOMP]); - GLushort g = UBYTE_TO_USHORT(src[GCOMP]); - *d = PACK_COLOR_1616(r, g); -} - - -static void -pack_float_RG1616_REV(const GLfloat src[4], void *dst) -{ - GLuint *d = ((GLuint *) dst); - GLushort r, g; - UNCLAMPED_FLOAT_TO_USHORT(r, src[RCOMP]); - UNCLAMPED_FLOAT_TO_USHORT(g, src[GCOMP]); - *d = PACK_COLOR_1616(r, g); -} - - -/* MESA_FORMAT_ARGB2101010 */ - -static void -pack_ubyte_ARGB2101010(const GLubyte src[4], void *dst) -{ - GLuint *d = ((GLuint *) dst); - GLushort r = UBYTE_TO_USHORT(src[RCOMP]); - GLushort g = UBYTE_TO_USHORT(src[GCOMP]); - GLushort b = UBYTE_TO_USHORT(src[BCOMP]); - GLushort a = UBYTE_TO_USHORT(src[ACOMP]); - *d = PACK_COLOR_2101010_US(a, r, g, b); -} - -static void -pack_float_ARGB2101010(const GLfloat src[4], void *dst) -{ - GLuint *d = ((GLuint *) dst); - GLushort r, g, b, a; - UNCLAMPED_FLOAT_TO_USHORT(r, src[RCOMP]); - UNCLAMPED_FLOAT_TO_USHORT(g, src[GCOMP]); - UNCLAMPED_FLOAT_TO_USHORT(b, src[BCOMP]); - UNCLAMPED_FLOAT_TO_USHORT(a, src[ACOMP]); - *d = PACK_COLOR_2101010_US(a, r, g, b); -} - - -/* MESA_FORMAT_SRGB8 */ - -static void -pack_ubyte_SRGB8(const GLubyte src[4], void *dst) -{ - GLubyte *d = ((GLubyte *) dst); - d[2] = linear_ubyte_to_srgb_ubyte(src[RCOMP]); - d[1] = linear_ubyte_to_srgb_ubyte(src[RCOMP]); - d[0] = linear_ubyte_to_srgb_ubyte(src[RCOMP]); -} - -static void -pack_float_SRGB8(const GLfloat src[4], void *dst) -{ - GLubyte *d = ((GLubyte *) dst); - d[2] = linear_float_to_srgb_ubyte(src[RCOMP]); - d[1] = linear_float_to_srgb_ubyte(src[GCOMP]); - d[0] = linear_float_to_srgb_ubyte(src[BCOMP]); -} - - -/* MESA_FORMAT_SRGBA8 */ - -static void -pack_ubyte_SRGBA8(const GLubyte src[4], void *dst) -{ - GLuint *d = ((GLuint *) dst); - GLubyte r = linear_ubyte_to_srgb_ubyte(src[RCOMP]); - GLubyte g = linear_ubyte_to_srgb_ubyte(src[GCOMP]); - GLubyte b = linear_ubyte_to_srgb_ubyte(src[BCOMP]); - *d = PACK_COLOR_8888(r, g, b, src[ACOMP]); -} - -static void -pack_float_SRGBA8(const GLfloat src[4], void *dst) -{ - GLuint *d = ((GLuint *) dst); - GLubyte r, g, b, a; - r = linear_float_to_srgb_ubyte(src[RCOMP]); - g = linear_float_to_srgb_ubyte(src[GCOMP]); - b = linear_float_to_srgb_ubyte(src[BCOMP]); - UNCLAMPED_FLOAT_TO_UBYTE(a, src[ACOMP]); - *d = PACK_COLOR_8888(r, g, b, a); -} - - -/* MESA_FORMAT_SARGB8 */ - -static void -pack_ubyte_SARGB8(const GLubyte src[4], void *dst) -{ - GLuint *d = ((GLuint *) dst); - GLubyte r = linear_ubyte_to_srgb_ubyte(src[RCOMP]); - GLubyte g = linear_ubyte_to_srgb_ubyte(src[RCOMP]); - GLubyte b = linear_ubyte_to_srgb_ubyte(src[RCOMP]); - *d = PACK_COLOR_8888(src[ACOMP], r, g, b); -} - -static void -pack_float_SARGB8(const GLfloat src[4], void *dst) -{ - GLuint *d = ((GLuint *) dst); - GLubyte r, g, b, a; - r = linear_float_to_srgb_ubyte(src[RCOMP]); - g = linear_float_to_srgb_ubyte(src[GCOMP]); - b = linear_float_to_srgb_ubyte(src[BCOMP]); - UNCLAMPED_FLOAT_TO_UBYTE(a, src[ACOMP]); - *d = PACK_COLOR_8888(a, r, g, b); -} - - -/* MESA_FORMAT_SL8 */ - -static void -pack_ubyte_SL8(const GLubyte src[4], void *dst) -{ - GLubyte *d = ((GLubyte *) dst); - *d = linear_ubyte_to_srgb_ubyte(src[RCOMP]); -} - -static void -pack_float_SL8(const GLfloat src[4], void *dst) -{ - GLubyte *d = ((GLubyte *) dst); - GLubyte l = linear_float_to_srgb_ubyte(src[RCOMP]); - *d = l; -} - - -/* MESA_FORMAT_SLA8 */ - -static void -pack_ubyte_SLA8(const GLubyte src[4], void *dst) -{ - GLushort *d = ((GLushort *) dst); - GLubyte l = linear_ubyte_to_srgb_ubyte(src[RCOMP]); - *d = PACK_COLOR_88(src[ACOMP], l); -} - -static void -pack_float_SLA8(const GLfloat src[4], void *dst) -{ - GLushort *d = ((GLushort *) dst); - GLubyte a, l = linear_float_to_srgb_ubyte(src[RCOMP]); - CLAMPED_FLOAT_TO_UBYTE(a, src[ACOMP]); - *d = PACK_COLOR_88(a, l); -} - - /* MESA_FORMAT_RGBA_FLOAT32 */ static void @@ -1300,65 +1008,6 @@ pack_float_LUMINANCE_ALPHA_FLOAT16(const GLfloat src[4], void *dst) } -/* MESA_FORMAT_RG_FLOAT32 */ - -static void -pack_ubyte_RG_FLOAT32(const GLubyte src[4], void *dst) -{ - GLfloat *d = ((GLfloat *) dst); - d[0] = UBYTE_TO_FLOAT(src[RCOMP]); - d[1] = UBYTE_TO_FLOAT(src[GCOMP]); -} - -static void -pack_float_RG_FLOAT32(const GLfloat src[4], void *dst) -{ - GLfloat *d = ((GLfloat *) dst); - d[0] = src[RCOMP]; - d[1] = src[GCOMP]; -} - - -/* MESA_FORMAT_RG_FLOAT16 */ - -static void -pack_ubyte_RG_FLOAT16(const GLubyte src[4], void *dst) -{ - GLhalfARB *d = ((GLhalfARB *) dst); - d[0] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[RCOMP])); - d[1] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[GCOMP])); -} - -static void -pack_float_RG_FLOAT16(const GLfloat src[4], void *dst) -{ - GLhalfARB *d = ((GLhalfARB *) dst); - d[0] = _mesa_float_to_half(src[RCOMP]); - d[1] = _mesa_float_to_half(src[GCOMP]); -} - - -/* MESA_FORMAT_DUDV8 */ - -static void -pack_ubyte_DUDV8(const GLubyte src[4], void *dst) -{ - /* XXX is this ever used? */ - GLushort *d = ((GLushort *) dst); - *d = PACK_COLOR_88(src[0], src[1]); -} - -static void -pack_float_DUDV8(const GLfloat src[4], void *dst) -{ - GLushort *d = ((GLushort *) dst); - GLbyte du, dv; - du = FLOAT_TO_BYTE(CLAMP(src[0], 0.0F, 1.0F)); - dv = FLOAT_TO_BYTE(CLAMP(src[1], 0.0F, 1.0F)); - *d = PACK_COLOR_88(du, dv); -} - - /* MESA_FORMAT_RGBA_16 */ static void @@ -1381,122 +1030,6 @@ pack_float_RGBA_16(const GLfloat src[4], void *dst) UNCLAMPED_FLOAT_TO_USHORT(d[3], src[ACOMP]); } - - -/* - * MESA_FORMAT_SIGNED_R8 - */ - -static void -pack_float_SIGNED_R8(const GLfloat src[4], void *dst) -{ - GLbyte *d = (GLbyte *) dst; - *d = FLOAT_TO_BYTE(CLAMP(src[RCOMP], -1.0f, 1.0f)); -} - - -/* - * MESA_FORMAT_SIGNED_RG88_REV - */ - -static void -pack_float_SIGNED_RG88_REV(const GLfloat src[4], void *dst) -{ - GLushort *d = (GLushort *) dst; - GLbyte r = FLOAT_TO_BYTE(CLAMP(src[RCOMP], -1.0f, 1.0f)); - GLbyte g = FLOAT_TO_BYTE(CLAMP(src[GCOMP], -1.0f, 1.0f)); - *d = (g << 8) | r; -} - - -/* - * MESA_FORMAT_SIGNED_RGBX8888 - */ - -static void -pack_float_SIGNED_RGBX8888(const GLfloat src[4], void *dst) -{ - GLuint *d = (GLuint *) dst; - GLbyte r = FLOAT_TO_BYTE(CLAMP(src[RCOMP], -1.0f, 1.0f)); - GLbyte g = FLOAT_TO_BYTE(CLAMP(src[GCOMP], -1.0f, 1.0f)); - GLbyte b = FLOAT_TO_BYTE(CLAMP(src[BCOMP], -1.0f, 1.0f)); - GLbyte a = 127; - *d = PACK_COLOR_8888(r, g, b, a); -} - - -/* - * MESA_FORMAT_SIGNED_RGBA8888 - */ - -static void -pack_float_SIGNED_RGBA8888(const GLfloat src[4], void *dst) -{ - GLuint *d = (GLuint *) dst; - GLbyte r = FLOAT_TO_BYTE(CLAMP(src[RCOMP], -1.0f, 1.0f)); - GLbyte g = FLOAT_TO_BYTE(CLAMP(src[GCOMP], -1.0f, 1.0f)); - GLbyte b = FLOAT_TO_BYTE(CLAMP(src[BCOMP], -1.0f, 1.0f)); - GLbyte a = FLOAT_TO_BYTE(CLAMP(src[ACOMP], -1.0f, 1.0f)); - *d = PACK_COLOR_8888(r, g, b, a); -} - - -/* - * MESA_FORMAT_SIGNED_RGBA8888_REV - */ - -static void -pack_float_SIGNED_RGBA8888_REV(const GLfloat src[4], void *dst) -{ - GLuint *d = (GLuint *) dst; - GLbyte r = FLOAT_TO_BYTE(CLAMP(src[RCOMP], -1.0f, 1.0f)); - GLbyte g = FLOAT_TO_BYTE(CLAMP(src[GCOMP], -1.0f, 1.0f)); - GLbyte b = FLOAT_TO_BYTE(CLAMP(src[BCOMP], -1.0f, 1.0f)); - GLbyte a = FLOAT_TO_BYTE(CLAMP(src[ACOMP], -1.0f, 1.0f)); - *d = PACK_COLOR_8888(a, b, g, r); -} - - -/* - * MESA_FORMAT_SIGNED_R16 - */ - -static void -pack_float_SIGNED_R16(const GLfloat src[4], void *dst) -{ - GLshort *d = (GLshort *) dst; - *d = FLOAT_TO_SHORT(CLAMP(src[RCOMP], -1.0f, 1.0f)); -} - - -/* - * MESA_FORMAT_SIGNED_GR1616 - */ - -static void -pack_float_SIGNED_GR1616(const GLfloat src[4], void *dst) -{ - GLuint *d = (GLuint *) dst; - GLshort r = FLOAT_TO_SHORT(CLAMP(src[RCOMP], -1.0f, 1.0f)); - GLshort g = FLOAT_TO_SHORT(CLAMP(src[GCOMP], -1.0f, 1.0f)); - *d = (g << 16) | (r & 0xffff); -} - - -/* - * MESA_FORMAT_SIGNED_RGB_16 - */ - -static void -pack_float_SIGNED_RGB_16(const GLfloat src[4], void *dst) -{ - GLshort *d = (GLshort *) dst; - d[0] = FLOAT_TO_SHORT(CLAMP(src[RCOMP], -1.0f, 1.0f)); - d[1] = FLOAT_TO_SHORT(CLAMP(src[GCOMP], -1.0f, 1.0f)); - d[2] = FLOAT_TO_SHORT(CLAMP(src[BCOMP], -1.0f, 1.0f)); -} - - /* * MESA_FORMAT_SIGNED_RGBA_16 */ @@ -1512,129 +1045,6 @@ pack_float_SIGNED_RGBA_16(const GLfloat src[4], void *dst) } -/* - * MESA_FORMAT_SIGNED_A8 - */ - -static void -pack_float_SIGNED_A8(const GLfloat src[4], void *dst) -{ - GLbyte *d = (GLbyte *) dst; - *d = FLOAT_TO_BYTE(CLAMP(src[ACOMP], -1.0f, 1.0f)); -} - - -/* - * MESA_FORMAT_SIGNED_L8 - */ - -static void -pack_float_SIGNED_L8(const GLfloat src[4], void *dst) -{ - GLbyte *d = (GLbyte *) dst; - *d = FLOAT_TO_BYTE(CLAMP(src[RCOMP], -1.0f, 1.0f)); -} - - -/* - * MESA_FORMAT_SIGNED_AL88 - */ - -static void -pack_float_SIGNED_AL88(const GLfloat src[4], void *dst) -{ - GLushort *d = (GLushort *) dst; - GLbyte l = FLOAT_TO_BYTE(CLAMP(src[RCOMP], -1.0f, 1.0f)); - GLbyte a = FLOAT_TO_BYTE(CLAMP(src[ACOMP], -1.0f, 1.0f)); - *d = (a << 8) | l; -} - - -/* - * MESA_FORMAT_SIGNED_A16 - */ - -static void -pack_float_SIGNED_A16(const GLfloat src[4], void *dst) -{ - GLshort *d = (GLshort *) dst; - *d = FLOAT_TO_SHORT(CLAMP(src[ACOMP], -1.0f, 1.0f)); -} - - -/* - * MESA_FORMAT_SIGNED_L16 - */ - -static void -pack_float_SIGNED_L16(const GLfloat src[4], void *dst) -{ - GLshort *d = (GLshort *) dst; - *d = FLOAT_TO_SHORT(CLAMP(src[RCOMP], -1.0f, 1.0f)); -} - - -/* - * MESA_FORMAT_SIGNED_AL1616 - */ - -static void -pack_float_SIGNED_AL1616(const GLfloat src[4], void *dst) -{ - GLuint *d = (GLuint *) dst; - GLshort l = FLOAT_TO_SHORT(CLAMP(src[RCOMP], -1.0f, 1.0f)); - GLshort a = FLOAT_TO_SHORT(CLAMP(src[ACOMP], -1.0f, 1.0f)); - *d = PACK_COLOR_1616(a, l); -} - - -/* - * MESA_FORMAT_RGB9_E5_FLOAT; - */ - -static void -pack_float_RGB9_E5_FLOAT(const GLfloat src[4], void *dst) -{ - GLuint *d = (GLuint *) dst; - *d = float3_to_rgb9e5(src); -} - -static void -pack_ubyte_RGB9_E5_FLOAT(const GLubyte src[4], void *dst) -{ - GLuint *d = (GLuint *) dst; - GLfloat rgb[3]; - rgb[0] = UBYTE_TO_FLOAT(src[RCOMP]); - rgb[1] = UBYTE_TO_FLOAT(src[GCOMP]); - rgb[2] = UBYTE_TO_FLOAT(src[BCOMP]); - *d = float3_to_rgb9e5(rgb); -} - - - -/* - * MESA_FORMAT_R11_G11_B10_FLOAT; - */ - -static void -pack_ubyte_R11_G11_B10_FLOAT(const GLubyte src[4], void *dst) -{ - GLuint *d = (GLuint *) dst; - GLfloat rgb[3]; - rgb[0] = UBYTE_TO_FLOAT(src[RCOMP]); - rgb[1] = UBYTE_TO_FLOAT(src[GCOMP]); - rgb[2] = UBYTE_TO_FLOAT(src[BCOMP]); - *d = float3_to_r11g11b10f(rgb); -} - -static void -pack_float_R11_G11_B10_FLOAT(const GLfloat src[4], void *dst) -{ - GLuint *d = (GLuint *) dst; - *d = float3_to_r11g11b10f(src); -} - - /** * Return a function that can pack a GLubyte rgba[4] color. @@ -1681,43 +1091,14 @@ _mesa_get_pack_ubyte_rgba_function(gl_format format) table[MESA_FORMAT_I16] = pack_ubyte_L16; /* reuse pack_ubyte_L16 */ table[MESA_FORMAT_YCBCR] = pack_ubyte_YCBCR; table[MESA_FORMAT_YCBCR_REV] = pack_ubyte_YCBCR_REV; - table[MESA_FORMAT_R8] = pack_ubyte_R8; - table[MESA_FORMAT_GR88] = pack_ubyte_GR88; - table[MESA_FORMAT_RG88] = pack_ubyte_RG88; - table[MESA_FORMAT_R16] = pack_ubyte_R16; - table[MESA_FORMAT_RG1616] = pack_ubyte_RG1616; - table[MESA_FORMAT_RG1616_REV] = pack_ubyte_RG1616_REV; - table[MESA_FORMAT_ARGB2101010] = pack_ubyte_ARGB2101010; /* should never convert RGBA to these formats */ - table[MESA_FORMAT_Z24_S8] = NULL; - table[MESA_FORMAT_S8_Z24] = NULL; table[MESA_FORMAT_Z16] = NULL; table[MESA_FORMAT_X8_Z24] = NULL; table[MESA_FORMAT_Z24_X8] = NULL; table[MESA_FORMAT_Z32] = NULL; table[MESA_FORMAT_S8] = NULL; - /* sRGB */ - table[MESA_FORMAT_SRGB8] = pack_ubyte_SRGB8; - table[MESA_FORMAT_SRGBA8] = pack_ubyte_SRGBA8; - table[MESA_FORMAT_SARGB8] = pack_ubyte_SARGB8; - table[MESA_FORMAT_SL8] = pack_ubyte_SL8; - table[MESA_FORMAT_SLA8] = pack_ubyte_SLA8; - - /* n/a */ - table[MESA_FORMAT_SRGB_DXT1] = NULL; /* pack_ubyte_SRGB_DXT1; */ - table[MESA_FORMAT_SRGBA_DXT1] = NULL; /* pack_ubyte_SRGBA_DXT1; */ - table[MESA_FORMAT_SRGBA_DXT3] = NULL; /* pack_ubyte_SRGBA_DXT3; */ - table[MESA_FORMAT_SRGBA_DXT5] = NULL; /* pack_ubyte_SRGBA_DXT5; */ - - table[MESA_FORMAT_RGB_FXT1] = NULL; /* pack_ubyte_RGB_FXT1; */ - table[MESA_FORMAT_RGBA_FXT1] = NULL; /* pack_ubyte_RGBA_FXT1; */ - table[MESA_FORMAT_RGB_DXT1] = NULL; /* pack_ubyte_RGB_DXT1; */ - table[MESA_FORMAT_RGBA_DXT1] = NULL; /* pack_ubyte_RGBA_DXT1; */ - table[MESA_FORMAT_RGBA_DXT3] = NULL; /* pack_ubyte_RGBA_DXT3; */ - table[MESA_FORMAT_RGBA_DXT5] = NULL; /* pack_ubyte_RGBA_DXT5; */ - table[MESA_FORMAT_RGBA_FLOAT32] = pack_ubyte_RGBA_FLOAT32; table[MESA_FORMAT_RGBA_FLOAT16] = pack_ubyte_RGBA_FLOAT16; table[MESA_FORMAT_RGB_FLOAT32] = pack_ubyte_RGB_FLOAT32; @@ -1730,10 +1111,6 @@ _mesa_get_pack_ubyte_rgba_function(gl_format format) table[MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16] = pack_ubyte_LUMINANCE_ALPHA_FLOAT16; table[MESA_FORMAT_INTENSITY_FLOAT32] = pack_ubyte_LUMINANCE_FLOAT32; table[MESA_FORMAT_INTENSITY_FLOAT16] = pack_ubyte_LUMINANCE_FLOAT16; - table[MESA_FORMAT_R_FLOAT32] = pack_ubyte_LUMINANCE_FLOAT32; - table[MESA_FORMAT_R_FLOAT16] = pack_ubyte_LUMINANCE_FLOAT16; - table[MESA_FORMAT_RG_FLOAT32] = pack_ubyte_RG_FLOAT32; - table[MESA_FORMAT_RG_FLOAT16] = pack_ubyte_RG_FLOAT16; /* n/a */ table[MESA_FORMAT_RGBA_INT8] = NULL; /* pack_ubyte_RGBA_INT8 */ @@ -1743,35 +1120,13 @@ _mesa_get_pack_ubyte_rgba_function(gl_format format) table[MESA_FORMAT_RGBA_UINT16] = NULL; /* pack_ubyte_RGBA_UINT16 */ table[MESA_FORMAT_RGBA_UINT32] = NULL; /* pack_ubyte_RGBA_UINT32 */ - table[MESA_FORMAT_DUDV8] = pack_ubyte_DUDV8; - table[MESA_FORMAT_RGBA_16] = pack_ubyte_RGBA_16; - /* n/a */ - table[MESA_FORMAT_SIGNED_R8] = NULL; - table[MESA_FORMAT_SIGNED_RG88_REV] = NULL; - table[MESA_FORMAT_SIGNED_RGBX8888] = NULL; - table[MESA_FORMAT_SIGNED_RGBA8888] = NULL; - table[MESA_FORMAT_SIGNED_RGBA8888_REV] = NULL; - table[MESA_FORMAT_SIGNED_R16] = NULL; - table[MESA_FORMAT_SIGNED_GR1616] = NULL; - table[MESA_FORMAT_SIGNED_RGB_16] = NULL; table[MESA_FORMAT_SIGNED_RGBA_16] = NULL; - table[MESA_FORMAT_SIGNED_A8] = NULL; - table[MESA_FORMAT_SIGNED_L8] = NULL; - table[MESA_FORMAT_SIGNED_AL88] = NULL; - table[MESA_FORMAT_SIGNED_I8] = NULL; - table[MESA_FORMAT_SIGNED_A16] = NULL; - table[MESA_FORMAT_SIGNED_L16] = NULL; - table[MESA_FORMAT_SIGNED_AL1616] = NULL; - table[MESA_FORMAT_SIGNED_I16] = NULL; table[MESA_FORMAT_RGBA_16] = pack_ubyte_RGBA_16; - table[MESA_FORMAT_RGB9_E5_FLOAT] = pack_ubyte_RGB9_E5_FLOAT; - table[MESA_FORMAT_R11_G11_B10_FLOAT] = pack_ubyte_R11_G11_B10_FLOAT; - initialized = GL_TRUE; } @@ -1826,42 +1181,14 @@ _mesa_get_pack_float_rgba_function(gl_format format) table[MESA_FORMAT_I16] = pack_float_L16; /* reuse pack_float_L16 */ table[MESA_FORMAT_YCBCR] = pack_float_YCBCR; table[MESA_FORMAT_YCBCR_REV] = pack_float_YCBCR_REV; - table[MESA_FORMAT_R8] = pack_float_R8; - table[MESA_FORMAT_GR88] = pack_float_GR88; - table[MESA_FORMAT_RG88] = pack_float_RG88; - table[MESA_FORMAT_R16] = pack_float_R16; - table[MESA_FORMAT_RG1616] = pack_float_RG1616; - table[MESA_FORMAT_RG1616_REV] = pack_float_RG1616_REV; - table[MESA_FORMAT_ARGB2101010] = pack_float_ARGB2101010; /* should never convert RGBA to these formats */ - table[MESA_FORMAT_Z24_S8] = NULL; - table[MESA_FORMAT_S8_Z24] = NULL; table[MESA_FORMAT_Z16] = NULL; table[MESA_FORMAT_X8_Z24] = NULL; table[MESA_FORMAT_Z24_X8] = NULL; table[MESA_FORMAT_Z32] = NULL; table[MESA_FORMAT_S8] = NULL; - table[MESA_FORMAT_SRGB8] = pack_float_SRGB8; - table[MESA_FORMAT_SRGBA8] = pack_float_SRGBA8; - table[MESA_FORMAT_SARGB8] = pack_float_SARGB8; - table[MESA_FORMAT_SL8] = pack_float_SL8; - table[MESA_FORMAT_SLA8] = pack_float_SLA8; - - /* n/a */ - table[MESA_FORMAT_SRGB_DXT1] = NULL; - table[MESA_FORMAT_SRGBA_DXT1] = NULL; - table[MESA_FORMAT_SRGBA_DXT3] = NULL; - table[MESA_FORMAT_SRGBA_DXT5] = NULL; - - table[MESA_FORMAT_RGB_FXT1] = NULL; - table[MESA_FORMAT_RGBA_FXT1] = NULL; - table[MESA_FORMAT_RGB_DXT1] = NULL; - table[MESA_FORMAT_RGBA_DXT1] = NULL; - table[MESA_FORMAT_RGBA_DXT3] = NULL; - table[MESA_FORMAT_RGBA_DXT5] = NULL; - table[MESA_FORMAT_RGBA_FLOAT32] = pack_float_RGBA_FLOAT32; table[MESA_FORMAT_RGBA_FLOAT16] = pack_float_RGBA_FLOAT16; table[MESA_FORMAT_RGB_FLOAT32] = pack_float_RGB_FLOAT32; @@ -1875,10 +1202,6 @@ _mesa_get_pack_float_rgba_function(gl_format format) table[MESA_FORMAT_INTENSITY_FLOAT32] = pack_float_LUMINANCE_FLOAT32; table[MESA_FORMAT_INTENSITY_FLOAT16] = pack_float_LUMINANCE_FLOAT16; - table[MESA_FORMAT_R_FLOAT32] = pack_float_LUMINANCE_FLOAT32; - table[MESA_FORMAT_R_FLOAT16] = pack_float_LUMINANCE_FLOAT16; - table[MESA_FORMAT_RG_FLOAT32] = pack_float_RG_FLOAT32; - table[MESA_FORMAT_RG_FLOAT16] = pack_float_RG_FLOAT16; /* n/a */ table[MESA_FORMAT_RGBA_INT8] = NULL; @@ -1888,30 +1211,10 @@ _mesa_get_pack_float_rgba_function(gl_format format) table[MESA_FORMAT_RGBA_UINT16] = NULL; table[MESA_FORMAT_RGBA_UINT32] = NULL; - table[MESA_FORMAT_DUDV8] = pack_float_DUDV8; - table[MESA_FORMAT_RGBA_16] = pack_float_RGBA_16; - table[MESA_FORMAT_SIGNED_R8] = pack_float_SIGNED_R8; - table[MESA_FORMAT_SIGNED_RG88_REV] = pack_float_SIGNED_RG88_REV; - table[MESA_FORMAT_SIGNED_RGBX8888] = pack_float_SIGNED_RGBX8888; - table[MESA_FORMAT_SIGNED_RGBA8888] = pack_float_SIGNED_RGBA8888; - table[MESA_FORMAT_SIGNED_RGBA8888_REV] = pack_float_SIGNED_RGBA8888_REV; - table[MESA_FORMAT_SIGNED_R16] = pack_float_SIGNED_R16; - table[MESA_FORMAT_SIGNED_GR1616] = pack_float_SIGNED_GR1616; - table[MESA_FORMAT_SIGNED_RGB_16] = pack_float_SIGNED_RGB_16; table[MESA_FORMAT_SIGNED_RGBA_16] = pack_float_SIGNED_RGBA_16; - table[MESA_FORMAT_SIGNED_A8] = pack_float_SIGNED_A8; - table[MESA_FORMAT_SIGNED_L8] = pack_float_SIGNED_L8; - table[MESA_FORMAT_SIGNED_AL88] = pack_float_SIGNED_AL88; - table[MESA_FORMAT_SIGNED_I8] = pack_float_SIGNED_L8; /* reused */ - table[MESA_FORMAT_SIGNED_A16] = pack_float_SIGNED_A16; - table[MESA_FORMAT_SIGNED_L16] = pack_float_SIGNED_L16; - table[MESA_FORMAT_SIGNED_AL1616] = pack_float_SIGNED_AL1616; - table[MESA_FORMAT_SIGNED_I16] = pack_float_SIGNED_L16; /* reused */ - table[MESA_FORMAT_RGB9_E5_FLOAT] = pack_float_RGB9_E5_FLOAT; - table[MESA_FORMAT_R11_G11_B10_FLOAT] = pack_float_R11_G11_B10_FLOAT; initialized = GL_TRUE; } @@ -2093,30 +1396,18 @@ pack_float_z_Z32(const GLfloat *src, void *dst) *d = (GLuint) (*src * scale); } -static void -pack_float_z_Z32_FLOAT(const GLfloat *src, void *dst) -{ - GLfloat *d = (GLfloat *) dst; - *d = *src; -} - gl_pack_float_z_func _mesa_get_pack_float_z_func(gl_format format) { switch (format) { - case MESA_FORMAT_Z24_S8: case MESA_FORMAT_Z24_X8: return pack_float_z_Z24_S8; - case MESA_FORMAT_S8_Z24: case MESA_FORMAT_X8_Z24: return pack_float_z_S8_Z24; case MESA_FORMAT_Z16: return pack_float_z_Z16; case MESA_FORMAT_Z32: return pack_float_z_Z32; - case MESA_FORMAT_Z32_FLOAT: - case MESA_FORMAT_Z32_FLOAT_X24S8: - return pack_float_z_Z32_FLOAT; default: _mesa_problem(NULL, "unexpected format in _mesa_get_pack_float_z_func()"); @@ -2165,44 +1456,18 @@ pack_uint_z_Z32(const GLuint *src, void *dst) *d = *src; } -static void -pack_uint_z_Z32_FLOAT(const GLuint *src, void *dst) -{ - GLuint *d = ((GLuint *) dst); - const GLdouble scale = 1.0 / (GLdouble) 0xffffffff; - *d = *src * scale; - assert(*d >= 0.0f); - assert(*d <= 1.0f); -} - -static void -pack_uint_z_Z32_FLOAT_X24S8(const GLuint *src, void *dst) -{ - GLfloat *d = ((GLfloat *) dst); - const GLdouble scale = 1.0 / (GLdouble) 0xffffffff; - *d = *src * scale; - assert(*d >= 0.0f); - assert(*d <= 1.0f); -} - gl_pack_uint_z_func _mesa_get_pack_uint_z_func(gl_format format) { switch (format) { - case MESA_FORMAT_Z24_S8: case MESA_FORMAT_Z24_X8: return pack_uint_z_Z24_S8; - case MESA_FORMAT_S8_Z24: case MESA_FORMAT_X8_Z24: return pack_uint_z_S8_Z24; case MESA_FORMAT_Z16: return pack_uint_z_Z16; case MESA_FORMAT_Z32: return pack_uint_z_Z32; - case MESA_FORMAT_Z32_FLOAT: - return pack_uint_z_Z32_FLOAT; - case MESA_FORMAT_Z32_FLOAT_X24S8: - return pack_uint_z_Z32_FLOAT_X24S8; default: _mesa_problem(NULL, "unexpected format in _mesa_get_pack_uint_z_func()"); return NULL; @@ -2214,26 +1479,6 @@ _mesa_get_pack_uint_z_func(gl_format format) ** Pack ubyte stencil pixels **/ -static void -pack_ubyte_stencil_Z24_S8(const GLubyte *src, void *dst) -{ - /* don't disturb the Z values */ - GLuint *d = ((GLuint *) dst); - GLuint s = *src; - GLuint z = *d & 0xffffff00; - *d = z | s; -} - -static void -pack_ubyte_stencil_S8_Z24(const GLubyte *src, void *dst) -{ - /* don't disturb the Z values */ - GLuint *d = ((GLuint *) dst); - GLuint s = *src << 24; - GLuint z = *d & 0xffffff; - *d = s | z; -} - static void pack_ubyte_stencil_S8(const GLubyte *src, void *dst) { @@ -2241,31 +1486,11 @@ pack_ubyte_stencil_S8(const GLubyte *src, void *dst) *d = *src; } -static void -pack_ubyte_stencil_Z32_FLOAT_X24S8(const GLubyte *src, void *dst) -{ - GLfloat *d = ((GLfloat *) dst); - d[1] = *src; -} - gl_pack_ubyte_stencil_func _mesa_get_pack_ubyte_stencil_func(gl_format format) { - switch (format) { - case MESA_FORMAT_Z24_S8: - return pack_ubyte_stencil_Z24_S8; - case MESA_FORMAT_S8_Z24: - return pack_ubyte_stencil_S8_Z24; - case MESA_FORMAT_S8: - return pack_ubyte_stencil_S8; - case MESA_FORMAT_Z32_FLOAT_X24S8: - return pack_ubyte_stencil_Z32_FLOAT_X24S8; - default: - _mesa_problem(NULL, - "unexpected format in _mesa_pack_ubyte_stencil_func()"); - return NULL; - } + return pack_ubyte_stencil_S8; } @@ -2275,7 +1500,6 @@ _mesa_pack_float_z_row(gl_format format, GLuint n, const GLfloat *src, void *dst) { switch (format) { - case MESA_FORMAT_Z24_S8: case MESA_FORMAT_Z24_X8: { /* don't disturb the stencil values */ @@ -2290,7 +1514,6 @@ _mesa_pack_float_z_row(gl_format format, GLuint n, } } break; - case MESA_FORMAT_S8_Z24: case MESA_FORMAT_X8_Z24: { /* don't disturb the stencil values */ @@ -2325,18 +1548,6 @@ _mesa_pack_float_z_row(gl_format format, GLuint n, } } break; - case MESA_FORMAT_Z32_FLOAT: - memcpy(dst, src, n * sizeof(GLfloat)); - break; - case MESA_FORMAT_Z32_FLOAT_X24S8: - { - GLfloat *d = ((GLfloat *) dst); - GLuint i; - for (i = 0; i < n; i++) { - d[i * 2] = src[i]; - } - } - break; default: _mesa_problem(NULL, "unexpected format in _mesa_pack_float_z_row()"); } @@ -2351,7 +1562,6 @@ _mesa_pack_uint_z_row(gl_format format, GLuint n, const GLuint *src, void *dst) { switch (format) { - case MESA_FORMAT_Z24_S8: case MESA_FORMAT_Z24_X8: { /* don't disturb the stencil values */ @@ -2364,7 +1574,6 @@ _mesa_pack_uint_z_row(gl_format format, GLuint n, } } break; - case MESA_FORMAT_S8_Z24: case MESA_FORMAT_X8_Z24: { /* don't disturb the stencil values */ @@ -2389,30 +1598,6 @@ _mesa_pack_uint_z_row(gl_format format, GLuint n, case MESA_FORMAT_Z32: memcpy(dst, src, n * sizeof(GLfloat)); break; - case MESA_FORMAT_Z32_FLOAT: - { - GLuint *d = ((GLuint *) dst); - const GLdouble scale = 1.0 / (GLdouble) 0xffffffff; - GLuint i; - for (i = 0; i < n; i++) { - d[i] = src[i] * scale; - assert(d[i] >= 0.0f); - assert(d[i] <= 1.0f); - } - } - break; - case MESA_FORMAT_Z32_FLOAT_X24S8: - { - GLfloat *d = ((GLfloat *) dst); - const GLdouble scale = 1.0 / (GLdouble) 0xffffffff; - GLuint i; - for (i = 0; i < n; i++) { - d[i * 2] = src[i] * scale; - assert(d[i * 2] >= 0.0f); - assert(d[i * 2] <= 1.0f); - } - } - break; default: _mesa_problem(NULL, "unexpected format in _mesa_pack_uint_z_row()"); } @@ -2423,80 +1608,10 @@ void _mesa_pack_ubyte_stencil_row(gl_format format, GLuint n, const GLubyte *src, void *dst) { - switch (format) { - case MESA_FORMAT_Z24_S8: - { - /* don't disturb the Z values */ - GLuint *d = ((GLuint *) dst); - GLuint i; - for (i = 0; i < n; i++) { - GLuint s = src[i]; - GLuint z = d[i] & 0xffffff00; - d[i] = z | s; - } - } - break; - case MESA_FORMAT_S8_Z24: - { - /* don't disturb the Z values */ - GLuint *d = ((GLuint *) dst); - GLuint i; - for (i = 0; i < n; i++) { - GLuint s = src[i] << 24; - GLuint z = d[i] & 0xffffff; - d[i] = s | z; - } - } - break; - case MESA_FORMAT_S8: - memcpy(dst, src, n * sizeof(GLubyte)); - break; - case MESA_FORMAT_Z32_FLOAT_X24S8: - { - GLuint *d = dst; - GLuint i; - for (i = 0; i < n; i++) { - d[i * 2 + 1] = src[i]; - } - } - break; - default: - _mesa_problem(NULL, "unexpected format in _mesa_pack_ubyte_stencil_row()"); - } + memcpy(dst, src, n * sizeof(GLubyte)); } -/** - * Incoming Z/stencil values are always in uint_24_8 format. - */ -void -_mesa_pack_uint_24_8_depth_stencil_row(gl_format format, GLuint n, - const GLuint *src, void *dst) -{ - switch (format) { - case MESA_FORMAT_Z24_S8: - memcpy(dst, src, n * sizeof(GLuint)); - break; - case MESA_FORMAT_S8_Z24: - { - GLuint *d = ((GLuint *) dst); - GLuint i; - for (i = 0; i < n; i++) { - GLuint s = src[i] << 24; - GLuint z = src[i] >> 8; - d[i] = s | z; - } - } - break; - default: - _mesa_problem(NULL, "bad format %s in _mesa_pack_ubyte_s_row", - _mesa_get_format_name(format)); - return; - } -} - - - /** * Convert a boolean color mask to a packed color where each channel of * the packed value at dst will be 0 or ~0 depending on the colorMask. diff --git a/dll/opengl/mesa/src/mesa/main/format_pack.h b/dll/opengl/mesa/main/format_pack.h similarity index 95% rename from dll/opengl/mesa/src/mesa/main/format_pack.h rename to dll/opengl/mesa/main/format_pack.h index f1b48051065..d83805c6e5d 100644 --- a/dll/opengl/mesa/src/mesa/main/format_pack.h +++ b/dll/opengl/mesa/main/format_pack.h @@ -90,10 +90,6 @@ extern void _mesa_pack_ubyte_stencil_row(gl_format format, GLuint n, const GLubyte *src, void *dst); -extern void -_mesa_pack_uint_24_8_depth_stencil_row(gl_format format, GLuint n, - const GLuint *src, void *dst); - extern void _mesa_pack_colormask(gl_format format, const GLubyte colorMask[4], void *dst); diff --git a/dll/opengl/mesa/src/mesa/main/format_unpack.c b/dll/opengl/mesa/main/format_unpack.c similarity index 68% rename from dll/opengl/mesa/src/mesa/main/format_unpack.c rename to dll/opengl/mesa/main/format_unpack.c index fece8d9c296..efe33a80955 100644 --- a/dll/opengl/mesa/src/mesa/main/format_unpack.c +++ b/dll/opengl/mesa/main/format_unpack.c @@ -25,8 +25,6 @@ #include "colormac.h" #include "format_unpack.h" #include "macros.h" -#include "../../gallium/auxiliary/util/u_format_rgb9e5.h" -#include "../../gallium/auxiliary/util/u_format_r11g11b10f.h" @@ -510,97 +508,6 @@ unpack_YCBCR_REV(const void *src, GLfloat dst[][4], GLuint n) } } -static void -unpack_R8(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLubyte *s = ((const GLubyte *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][0] = UBYTE_TO_FLOAT(s[i]); - dst[i][1] = - dst[i][2] = 0.0F; - dst[i][3] = 1.0F; - } -} - -static void -unpack_GR88(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLushort *s = ((const GLushort *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = UBYTE_TO_FLOAT( s[i] & 0xff ); - dst[i][GCOMP] = UBYTE_TO_FLOAT( s[i] >> 8 ); - dst[i][BCOMP] = 0.0; - dst[i][ACOMP] = 1.0; - } -} - -static void -unpack_RG88(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLushort *s = ((const GLushort *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = UBYTE_TO_FLOAT( s[i] >> 8 ); - dst[i][GCOMP] = UBYTE_TO_FLOAT( s[i] & 0xff ); - dst[i][BCOMP] = 0.0; - dst[i][ACOMP] = 1.0; - } -} - -static void -unpack_R16(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLushort *s = ((const GLushort *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = USHORT_TO_FLOAT(s[i]); - dst[i][GCOMP] = 0.0; - dst[i][BCOMP] = 0.0; - dst[i][ACOMP] = 1.0; - } -} - -static void -unpack_RG1616(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLuint *s = ((const GLuint *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = USHORT_TO_FLOAT( s[i] & 0xffff ); - dst[i][GCOMP] = USHORT_TO_FLOAT( s[i] >> 16 ); - dst[i][BCOMP] = 0.0; - dst[i][ACOMP] = 1.0; - } -} - -static void -unpack_RG1616_REV(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLuint *s = ((const GLuint *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = USHORT_TO_FLOAT( s[i] >> 16 ); - dst[i][GCOMP] = USHORT_TO_FLOAT( s[i] & 0xffff ); - dst[i][BCOMP] = 0.0; - dst[i][ACOMP] = 1.0; - } -} - -static void -unpack_ARGB2101010(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLuint *s = ((const GLuint *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = ((s[i] >> 20) & 0x3ff) * (1.0F / 1023.0F); - dst[i][GCOMP] = ((s[i] >> 10) & 0x3ff) * (1.0F / 1023.0F); - dst[i][BCOMP] = ((s[i] >> 0) & 0x3ff) * (1.0F / 1023.0F); - dst[i][ACOMP] = ((s[i] >> 30) & 0x03) * (1.0F / 3.0F); - } -} - static void unpack_Z24_S8(const void *src, GLfloat dst[][4], GLuint n) @@ -674,32 +581,6 @@ unpack_Z32(const void *src, GLfloat dst[][4], GLuint n) } } -static void -unpack_Z32_FLOAT(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLfloat *s = ((const GLfloat *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][0] = - dst[i][1] = - dst[i][2] = s[i * 2]; - dst[i][3] = 1.0F; - } -} - -static void -unpack_Z32_FLOAT_X24S8(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLfloat *s = ((const GLfloat *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][0] = - dst[i][1] = - dst[i][2] = s[i]; - dst[i][3] = 1.0F; - } -} - static void unpack_S8(const void *src, GLfloat dst[][4], GLuint n) @@ -714,123 +595,6 @@ unpack_S8(const void *src, GLfloat dst[][4], GLuint n) } } - -static void -unpack_SRGB8(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLubyte *s = (const GLubyte *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = nonlinear_to_linear(s[i*3+2]); - dst[i][GCOMP] = nonlinear_to_linear(s[i*3+1]); - dst[i][BCOMP] = nonlinear_to_linear(s[i*3+0]); - dst[i][ACOMP] = 1.0F; - } -} - -static void -unpack_SRGBA8(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLuint *s = ((const GLuint *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = nonlinear_to_linear( (s[i] >> 24) ); - dst[i][GCOMP] = nonlinear_to_linear( (s[i] >> 16) & 0xff ); - dst[i][BCOMP] = nonlinear_to_linear( (s[i] >> 8) & 0xff ); - dst[i][ACOMP] = UBYTE_TO_FLOAT( s[i] & 0xff ); /* linear! */ - } -} - -static void -unpack_SARGB8(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLuint *s = ((const GLuint *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = nonlinear_to_linear( (s[i] >> 16) & 0xff ); - dst[i][GCOMP] = nonlinear_to_linear( (s[i] >> 8) & 0xff ); - dst[i][BCOMP] = nonlinear_to_linear( (s[i] ) & 0xff ); - dst[i][ACOMP] = UBYTE_TO_FLOAT( s[i] >> 24 ); /* linear! */ - } -} - -static void -unpack_SL8(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLubyte *s = ((const GLubyte *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = - dst[i][GCOMP] = - dst[i][BCOMP] = nonlinear_to_linear(s[i]); - dst[i][ACOMP] = 1.0F; - } -} - -static void -unpack_SLA8(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLushort *s = (const GLushort *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = - dst[i][GCOMP] = - dst[i][BCOMP] = nonlinear_to_linear(s[i] & 0xff); - dst[i][ACOMP] = UBYTE_TO_FLOAT(s[i] >> 8); /* linear! */ - } -} - -static void -unpack_SRGB_DXT1(const void *src, GLfloat dst[][4], GLuint n) -{ -} - -static void -unpack_SRGBA_DXT1(const void *src, GLfloat dst[][4], GLuint n) -{ -} - -static void -unpack_SRGBA_DXT3(const void *src, GLfloat dst[][4], GLuint n) -{ -} - -static void -unpack_SRGBA_DXT5(const void *src, GLfloat dst[][4], GLuint n) -{ -} - -static void -unpack_RGB_FXT1(const void *src, GLfloat dst[][4], GLuint n) -{ -} - -static void -unpack_RGBA_FXT1(const void *src, GLfloat dst[][4], GLuint n) -{ -} - -static void -unpack_RGB_DXT1(const void *src, GLfloat dst[][4], GLuint n) -{ -} - -static void -unpack_RGBA_DXT1(const void *src, GLfloat dst[][4], GLuint n) -{ -} - -static void -unpack_RGBA_DXT3(const void *src, GLfloat dst[][4], GLuint n) -{ -} - -static void -unpack_RGBA_DXT5(const void *src, GLfloat dst[][4], GLuint n) -{ -} - - static void unpack_RGBA_FLOAT32(const void *src, GLfloat dst[][4], GLuint n) { @@ -987,59 +751,6 @@ unpack_INTENSITY_FLOAT16(const void *src, GLfloat dst[][4], GLuint n) } } -static void -unpack_R_FLOAT32(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLfloat *s = (const GLfloat *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = s[i]; - dst[i][GCOMP] = 0.0F; - dst[i][BCOMP] = 0.0F; - dst[i][ACOMP] = 1.0F; - } -} - -static void -unpack_R_FLOAT16(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLhalfARB *s = (const GLhalfARB *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = _mesa_half_to_float(s[i]); - dst[i][GCOMP] = 0.0F; - dst[i][BCOMP] = 0.0F; - dst[i][ACOMP] = 1.0F; - } -} - -static void -unpack_RG_FLOAT32(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLfloat *s = (const GLfloat *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = s[i*2+0]; - dst[i][GCOMP] = s[i*2+1]; - dst[i][BCOMP] = 0.0F; - dst[i][ACOMP] = 1.0F; - } -} - -static void -unpack_RG_FLOAT16(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLhalfARB *s = (const GLhalfARB *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = _mesa_half_to_float(s[i*2+0]); - dst[i][GCOMP] = _mesa_half_to_float(s[i*2+1]); - dst[i][BCOMP] = 0.0F; - dst[i][ACOMP] = 1.0F; - } -} - - static void unpack_RGBA_INT8(const void *src, GLfloat dst[][4], GLuint n) { @@ -1118,123 +829,6 @@ unpack_RGBA_UINT32(const void *src, GLfloat dst[][4], GLuint n) } } -static void -unpack_DUDV8(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLbyte *s = (const GLbyte *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = BYTE_TO_FLOAT(s[i*2+0]); - dst[i][GCOMP] = BYTE_TO_FLOAT(s[i*2+1]); - dst[i][BCOMP] = 0; - dst[i][ACOMP] = 0; - } -} - -static void -unpack_SIGNED_R8(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLbyte *s = ((const GLbyte *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = BYTE_TO_FLOAT_TEX( s[i] ); - dst[i][GCOMP] = 0.0F; - dst[i][BCOMP] = 0.0F; - dst[i][ACOMP] = 1.0F; - } -} - -static void -unpack_SIGNED_RG88_REV(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLushort *s = ((const GLushort *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] & 0xff) ); - dst[i][GCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 8) ); - dst[i][BCOMP] = 0.0F; - dst[i][ACOMP] = 1.0F; - } -} - -static void -unpack_SIGNED_RGBX8888(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLuint *s = ((const GLuint *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 24) ); - dst[i][GCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 16) ); - dst[i][BCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 8) ); - dst[i][ACOMP] = 1.0f; - } -} - -static void -unpack_SIGNED_RGBA8888(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLuint *s = ((const GLuint *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 24) ); - dst[i][GCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 16) ); - dst[i][BCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 8) ); - dst[i][ACOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] ) ); - } -} - -static void -unpack_SIGNED_RGBA8888_REV(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLuint *s = ((const GLuint *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] ) ); - dst[i][GCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 8) ); - dst[i][BCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 16) ); - dst[i][ACOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 24) ); - } -} - -static void -unpack_SIGNED_R16(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLshort *s = ((const GLshort *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = SHORT_TO_FLOAT_TEX( s[i] ); - dst[i][GCOMP] = 0.0F; - dst[i][BCOMP] = 0.0F; - dst[i][ACOMP] = 1.0F; - } -} - -static void -unpack_SIGNED_GR1616(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLuint *s = ((const GLuint *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = SHORT_TO_FLOAT_TEX( (GLshort) (s[i] & 0xffff) ); - dst[i][GCOMP] = SHORT_TO_FLOAT_TEX( (GLshort) (s[i] >> 16) ); - dst[i][BCOMP] = 0.0F; - dst[i][ACOMP] = 1.0F; - } -} - -static void -unpack_SIGNED_RGB_16(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLshort *s = (const GLshort *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = SHORT_TO_FLOAT_TEX( s[i*3+0] ); - dst[i][GCOMP] = SHORT_TO_FLOAT_TEX( s[i*3+1] ); - dst[i][BCOMP] = SHORT_TO_FLOAT_TEX( s[i*3+2] ); - dst[i][ACOMP] = 1.0F; - } -} - static void unpack_SIGNED_RGBA_16(const void *src, GLfloat dst[][4], GLuint n) { @@ -1261,186 +855,6 @@ unpack_RGBA_16(const void *src, GLfloat dst[][4], GLuint n) } } -static void -unpack_RED_RGTC1(const void *src, GLfloat dst[][4], GLuint n) -{ - /* XXX to do */ -} - -static void -unpack_SIGNED_RED_RGTC1(const void *src, GLfloat dst[][4], GLuint n) -{ - /* XXX to do */ -} - -static void -unpack_RG_RGTC2(const void *src, GLfloat dst[][4], GLuint n) -{ - /* XXX to do */ -} - -static void -unpack_SIGNED_RG_RGTC2(const void *src, GLfloat dst[][4], GLuint n) -{ - /* XXX to do */ -} - -static void -unpack_L_LATC1(const void *src, GLfloat dst[][4], GLuint n) -{ - /* XXX to do */ -} - -static void -unpack_SIGNED_L_LATC1(const void *src, GLfloat dst[][4], GLuint n) -{ - /* XXX to do */ -} - -static void -unpack_LA_LATC2(const void *src, GLfloat dst[][4], GLuint n) -{ - /* XXX to do */ -} - -static void -unpack_SIGNED_LA_LATC2(const void *src, GLfloat dst[][4], GLuint n) -{ - /* XXX to do */ -} - -static void -unpack_ETC1_RGB8(const void *src, GLfloat dst[][4], GLuint n) -{ - /* XXX to do */ -} - -static void -unpack_SIGNED_A8(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLbyte *s = ((const GLbyte *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = 0.0F; - dst[i][GCOMP] = 0.0F; - dst[i][BCOMP] = 0.0F; - dst[i][ACOMP] = BYTE_TO_FLOAT_TEX( s[i] ); - } -} - -static void -unpack_SIGNED_L8(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLbyte *s = ((const GLbyte *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = - dst[i][GCOMP] = - dst[i][BCOMP] = BYTE_TO_FLOAT_TEX( s[i] ); - dst[i][ACOMP] = 1.0F; - } -} - -static void -unpack_SIGNED_AL88(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLshort *s = ((const GLshort *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = - dst[i][GCOMP] = - dst[i][BCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] & 0xff) ); - dst[i][ACOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s[i] >> 8) ); - } -} - -static void -unpack_SIGNED_I8(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLbyte *s = ((const GLbyte *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = - dst[i][GCOMP] = - dst[i][BCOMP] = - dst[i][ACOMP] = BYTE_TO_FLOAT_TEX( s[i] ); - } -} - -static void -unpack_SIGNED_A16(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLshort *s = ((const GLshort *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = 0.0F; - dst[i][GCOMP] = 0.0F; - dst[i][BCOMP] = 0.0F; - dst[i][ACOMP] = SHORT_TO_FLOAT_TEX( s[i] ); - } -} - -static void -unpack_SIGNED_L16(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLshort *s = ((const GLshort *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = - dst[i][GCOMP] = - dst[i][BCOMP] = SHORT_TO_FLOAT_TEX( s[i] ); - dst[i][ACOMP] = 1.0F; - } -} - -static void -unpack_SIGNED_AL1616(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLshort *s = (const GLshort *) src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = - dst[i][GCOMP] = - dst[i][BCOMP] = SHORT_TO_FLOAT_TEX( s[i*2+0] ); - dst[i][ACOMP] = SHORT_TO_FLOAT_TEX( s[i*2+1] ); - } -} - -static void -unpack_SIGNED_I16(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLshort *s = ((const GLshort *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = - dst[i][GCOMP] = - dst[i][BCOMP] = - dst[i][ACOMP] = SHORT_TO_FLOAT_TEX( s[i] ); - } -} - -static void -unpack_RGB9_E5_FLOAT(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLuint *s = (const GLuint *) src; - GLuint i; - for (i = 0; i < n; i++) { - rgb9e5_to_float3(s[i], dst[i]); - dst[i][ACOMP] = 1.0F; - } -} - -static void -unpack_R11_G11_B10_FLOAT(const void *src, GLfloat dst[][4], GLuint n) -{ - const GLuint *s = (const GLuint *) src; - GLuint i; - for (i = 0; i < n; i++) { - r11g11b10f_to_float3(s[i], dst[i]); - dst[i][ACOMP] = 1.0F; - } -} - /** * Return the unpacker function for the given format. @@ -1485,36 +899,11 @@ get_unpack_rgba_function(gl_format format) table[MESA_FORMAT_I16] = unpack_I16; table[MESA_FORMAT_YCBCR] = unpack_YCBCR; table[MESA_FORMAT_YCBCR_REV] = unpack_YCBCR_REV; - table[MESA_FORMAT_R8] = unpack_R8; - table[MESA_FORMAT_GR88] = unpack_GR88; - table[MESA_FORMAT_RG88] = unpack_RG88; - table[MESA_FORMAT_R16] = unpack_R16; - table[MESA_FORMAT_RG1616] = unpack_RG1616; - table[MESA_FORMAT_RG1616_REV] = unpack_RG1616_REV; - table[MESA_FORMAT_ARGB2101010] = unpack_ARGB2101010; - table[MESA_FORMAT_Z24_S8] = unpack_Z24_S8; - table[MESA_FORMAT_S8_Z24] = unpack_S8_Z24; table[MESA_FORMAT_Z16] = unpack_Z16; table[MESA_FORMAT_X8_Z24] = unpack_X8_Z24; table[MESA_FORMAT_Z24_X8] = unpack_Z24_X8; table[MESA_FORMAT_Z32] = unpack_Z32; table[MESA_FORMAT_S8] = unpack_S8; - table[MESA_FORMAT_SRGB8] = unpack_SRGB8; - table[MESA_FORMAT_SRGBA8] = unpack_SRGBA8; - table[MESA_FORMAT_SARGB8] = unpack_SARGB8; - table[MESA_FORMAT_SL8] = unpack_SL8; - table[MESA_FORMAT_SLA8] = unpack_SLA8; - table[MESA_FORMAT_SRGB_DXT1] = unpack_SRGB_DXT1; - table[MESA_FORMAT_SRGBA_DXT1] = unpack_SRGBA_DXT1; - table[MESA_FORMAT_SRGBA_DXT3] = unpack_SRGBA_DXT3; - table[MESA_FORMAT_SRGBA_DXT5] = unpack_SRGBA_DXT5; - - table[MESA_FORMAT_RGB_FXT1] = unpack_RGB_FXT1; - table[MESA_FORMAT_RGBA_FXT1] = unpack_RGBA_FXT1; - table[MESA_FORMAT_RGB_DXT1] = unpack_RGB_DXT1; - table[MESA_FORMAT_RGBA_DXT1] = unpack_RGBA_DXT1; - table[MESA_FORMAT_RGBA_DXT3] = unpack_RGBA_DXT3; - table[MESA_FORMAT_RGBA_DXT5] = unpack_RGBA_DXT5; table[MESA_FORMAT_RGBA_FLOAT32] = unpack_RGBA_FLOAT32; table[MESA_FORMAT_RGBA_FLOAT16] = unpack_RGBA_FLOAT16; @@ -1528,10 +917,6 @@ get_unpack_rgba_function(gl_format format) table[MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16] = unpack_LUMINANCE_ALPHA_FLOAT16; table[MESA_FORMAT_INTENSITY_FLOAT32] = unpack_INTENSITY_FLOAT32; table[MESA_FORMAT_INTENSITY_FLOAT16] = unpack_INTENSITY_FLOAT16; - table[MESA_FORMAT_R_FLOAT32] = unpack_R_FLOAT32; - table[MESA_FORMAT_R_FLOAT16] = unpack_R_FLOAT16; - table[MESA_FORMAT_RG_FLOAT32] = unpack_RG_FLOAT32; - table[MESA_FORMAT_RG_FLOAT16] = unpack_RG_FLOAT16; table[MESA_FORMAT_RGBA_INT8] = unpack_RGBA_INT8; table[MESA_FORMAT_RGBA_INT16] = unpack_RGBA_INT16; @@ -1540,45 +925,9 @@ get_unpack_rgba_function(gl_format format) table[MESA_FORMAT_RGBA_UINT16] = unpack_RGBA_UINT16; table[MESA_FORMAT_RGBA_UINT32] = unpack_RGBA_UINT32; - table[MESA_FORMAT_DUDV8] = unpack_DUDV8; - table[MESA_FORMAT_SIGNED_R8] = unpack_SIGNED_R8; - table[MESA_FORMAT_SIGNED_RG88_REV] = unpack_SIGNED_RG88_REV; - table[MESA_FORMAT_SIGNED_RGBX8888] = unpack_SIGNED_RGBX8888; - table[MESA_FORMAT_SIGNED_RGBA8888] = unpack_SIGNED_RGBA8888; - table[MESA_FORMAT_SIGNED_RGBA8888_REV] = unpack_SIGNED_RGBA8888_REV; - table[MESA_FORMAT_SIGNED_R16] = unpack_SIGNED_R16; - table[MESA_FORMAT_SIGNED_GR1616] = unpack_SIGNED_GR1616; - table[MESA_FORMAT_SIGNED_RGB_16] = unpack_SIGNED_RGB_16; table[MESA_FORMAT_SIGNED_RGBA_16] = unpack_SIGNED_RGBA_16; table[MESA_FORMAT_RGBA_16] = unpack_RGBA_16; - table[MESA_FORMAT_RED_RGTC1] = unpack_RED_RGTC1; - table[MESA_FORMAT_SIGNED_RED_RGTC1] = unpack_SIGNED_RED_RGTC1; - table[MESA_FORMAT_RG_RGTC2] = unpack_RG_RGTC2; - table[MESA_FORMAT_SIGNED_RG_RGTC2] = unpack_SIGNED_RG_RGTC2; - - table[MESA_FORMAT_L_LATC1] = unpack_L_LATC1; - table[MESA_FORMAT_SIGNED_L_LATC1] = unpack_SIGNED_L_LATC1; - table[MESA_FORMAT_LA_LATC2] = unpack_LA_LATC2; - table[MESA_FORMAT_SIGNED_LA_LATC2] = unpack_SIGNED_LA_LATC2; - - table[MESA_FORMAT_ETC1_RGB8] = unpack_ETC1_RGB8; - - table[MESA_FORMAT_SIGNED_A8] = unpack_SIGNED_A8; - table[MESA_FORMAT_SIGNED_L8] = unpack_SIGNED_L8; - table[MESA_FORMAT_SIGNED_AL88] = unpack_SIGNED_AL88; - table[MESA_FORMAT_SIGNED_I8] = unpack_SIGNED_I8; - table[MESA_FORMAT_SIGNED_A16] = unpack_SIGNED_A16; - table[MESA_FORMAT_SIGNED_L16] = unpack_SIGNED_L16; - table[MESA_FORMAT_SIGNED_AL1616] = unpack_SIGNED_AL1616; - table[MESA_FORMAT_SIGNED_I16] = unpack_SIGNED_I16; - - table[MESA_FORMAT_RGB9_E5_FLOAT] = unpack_RGB9_E5_FLOAT; - table[MESA_FORMAT_R11_G11_B10_FLOAT] = unpack_R11_G11_B10_FLOAT; - - table[MESA_FORMAT_Z32_FLOAT] = unpack_Z32_FLOAT; - table[MESA_FORMAT_Z32_FLOAT_X24S8] = unpack_Z32_FLOAT_X24S8; - initialized = GL_TRUE; } @@ -1918,45 +1267,6 @@ unpack_ubyte_I8(const void *src, GLubyte dst[][4], GLuint n) } } -static void -unpack_ubyte_R8(const void *src, GLubyte dst[][4], GLuint n) -{ - const GLubyte *s = ((const GLubyte *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][0] = s[i]; - dst[i][1] = - dst[i][2] = 0; - dst[i][3] = 0xff; - } -} - -static void -unpack_ubyte_GR88(const void *src, GLubyte dst[][4], GLuint n) -{ - const GLushort *s = ((const GLushort *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = s[i] & 0xff; - dst[i][GCOMP] = s[i] >> 8; - dst[i][BCOMP] = 0; - dst[i][ACOMP] = 0xff; - } -} - -static void -unpack_ubyte_RG88(const void *src, GLubyte dst[][4], GLuint n) -{ - const GLushort *s = ((const GLushort *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i][RCOMP] = s[i] >> 8; - dst[i][GCOMP] = s[i] & 0xff; - dst[i][BCOMP] = 0; - dst[i][ACOMP] = 0xff; - } -} - /** * Unpack rgba colors, returning as GLubyte values. This should usually @@ -2039,15 +1349,6 @@ _mesa_unpack_ubyte_rgba_row(gl_format format, GLuint n, case MESA_FORMAT_I8: unpack_ubyte_I8(src, dst, n); break; - case MESA_FORMAT_R8: - unpack_ubyte_R8(src, dst, n); - break; - case MESA_FORMAT_GR88: - unpack_ubyte_GR88(src, dst, n); - break; - case MESA_FORMAT_RG88: - unpack_ubyte_RG88(src, dst, n); - break; default: /* get float values, convert to ubyte */ { @@ -2196,136 +1497,6 @@ unpack_int_rgba_RGB_INT8(const GLbyte *src, GLuint dst[][4], GLuint n) } } -static void -unpack_int_rgba_RG_UINT32(const GLuint *src, GLuint dst[][4], GLuint n) -{ - unsigned int i; - - for (i = 0; i < n; i++) { - dst[i][0] = src[i * 2 + 0]; - dst[i][1] = src[i * 2 + 1]; - dst[i][2] = 0; - dst[i][3] = 1; - } -} - -static void -unpack_int_rgba_RG_UINT16(const GLushort *src, GLuint dst[][4], GLuint n) -{ - unsigned int i; - - for (i = 0; i < n; i++) { - dst[i][0] = src[i * 2 + 0]; - dst[i][1] = src[i * 2 + 1]; - dst[i][2] = 0; - dst[i][3] = 1; - } -} - -static void -unpack_int_rgba_RG_INT16(const GLshort *src, GLuint dst[][4], GLuint n) -{ - unsigned int i; - - for (i = 0; i < n; i++) { - dst[i][0] = src[i * 2 + 0]; - dst[i][1] = src[i * 2 + 1]; - dst[i][2] = 0; - dst[i][3] = 1; - } -} - -static void -unpack_int_rgba_RG_UINT8(const GLubyte *src, GLuint dst[][4], GLuint n) -{ - unsigned int i; - - for (i = 0; i < n; i++) { - dst[i][0] = src[i * 2 + 0]; - dst[i][1] = src[i * 2 + 1]; - dst[i][2] = 0; - dst[i][3] = 1; - } -} - -static void -unpack_int_rgba_RG_INT8(const GLbyte *src, GLuint dst[][4], GLuint n) -{ - unsigned int i; - - for (i = 0; i < n; i++) { - dst[i][0] = src[i * 2 + 0]; - dst[i][1] = src[i * 2 + 1]; - dst[i][2] = 0; - dst[i][3] = 1; - } -} - -static void -unpack_int_rgba_R_UINT32(const GLuint *src, GLuint dst[][4], GLuint n) -{ - unsigned int i; - - for (i = 0; i < n; i++) { - dst[i][0] = src[i]; - dst[i][1] = 0; - dst[i][2] = 0; - dst[i][3] = 1; - } -} - -static void -unpack_int_rgba_R_UINT16(const GLushort *src, GLuint dst[][4], GLuint n) -{ - unsigned int i; - - for (i = 0; i < n; i++) { - dst[i][0] = src[i]; - dst[i][1] = 0; - dst[i][2] = 0; - dst[i][3] = 1; - } -} - -static void -unpack_int_rgba_R_INT16(const GLshort *src, GLuint dst[][4], GLuint n) -{ - unsigned int i; - - for (i = 0; i < n; i++) { - dst[i][0] = src[i]; - dst[i][1] = 0; - dst[i][2] = 0; - dst[i][3] = 1; - } -} - -static void -unpack_int_rgba_R_UINT8(const GLubyte *src, GLuint dst[][4], GLuint n) -{ - unsigned int i; - - for (i = 0; i < n; i++) { - dst[i][0] = src[i]; - dst[i][1] = 0; - dst[i][2] = 0; - dst[i][3] = 1; - } -} - -static void -unpack_int_rgba_R_INT8(const GLbyte *src, GLuint dst[][4], GLuint n) -{ - unsigned int i; - - for (i = 0; i < n; i++) { - dst[i][0] = src[i]; - dst[i][1] = 0; - dst[i][2] = 0; - dst[i][3] = 1; - } -} - static void unpack_int_rgba_ALPHA_UINT32(const GLuint *src, GLuint dst[][4], GLuint n) { @@ -2542,20 +1713,6 @@ unpack_int_rgba_INTENSITY_INT8(const GLbyte *src, GLuint dst[][4], GLuint n) } } -static void -unpack_int_rgba_ARGB2101010_UINT(const GLuint *src, GLuint dst[][4], GLuint n) -{ - unsigned int i; - - for (i = 0; i < n; i++) { - GLuint tmp = src[i]; - dst[i][0] = (tmp >> 20) & 0x3ff; - dst[i][1] = (tmp >> 10) & 0x3ff; - dst[i][2] = (tmp >> 0) & 0x3ff; - dst[i][3] = (tmp >> 30) & 0x3; - } -} - void _mesa_unpack_uint_rgba_row(gl_format format, GLuint n, const void *src, GLuint dst[][4]) @@ -2602,44 +1759,6 @@ _mesa_unpack_uint_rgba_row(gl_format format, GLuint n, unpack_int_rgba_RGB_INT8(src, dst, n); break; - case MESA_FORMAT_RG_UINT32: - case MESA_FORMAT_RG_INT32: - unpack_int_rgba_RG_UINT32(src, dst, n); - break; - - case MESA_FORMAT_RG_UINT16: - unpack_int_rgba_RG_UINT16(src, dst, n); - break; - case MESA_FORMAT_RG_INT16: - unpack_int_rgba_RG_INT16(src, dst, n); - break; - - case MESA_FORMAT_RG_UINT8: - unpack_int_rgba_RG_UINT8(src, dst, n); - break; - case MESA_FORMAT_RG_INT8: - unpack_int_rgba_RG_INT8(src, dst, n); - break; - - case MESA_FORMAT_R_UINT32: - case MESA_FORMAT_R_INT32: - unpack_int_rgba_R_UINT32(src, dst, n); - break; - - case MESA_FORMAT_R_UINT16: - unpack_int_rgba_R_UINT16(src, dst, n); - break; - case MESA_FORMAT_R_INT16: - unpack_int_rgba_R_INT16(src, dst, n); - break; - - case MESA_FORMAT_R_UINT8: - unpack_int_rgba_R_UINT8(src, dst, n); - break; - case MESA_FORMAT_R_INT8: - unpack_int_rgba_R_INT8(src, dst, n); - break; - case MESA_FORMAT_ALPHA_UINT32: case MESA_FORMAT_ALPHA_INT32: unpack_int_rgba_ALPHA_UINT32(src, dst, n); @@ -2715,9 +1834,6 @@ _mesa_unpack_uint_rgba_row(gl_format format, GLuint n, unpack_int_rgba_INTENSITY_INT8(src, dst, n); break; - case MESA_FORMAT_ARGB2101010_UINT: - unpack_int_rgba_ARGB2101010_UINT(src, dst, n); - break; default: _mesa_problem(NULL, "%s: bad format %s", __FUNCTION__, _mesa_get_format_name(format)); @@ -2816,22 +1932,6 @@ unpack_float_z_Z32(GLuint n, const void *src, GLfloat *dst) } } -static void -unpack_float_z_Z32F(GLuint n, const void *src, GLfloat *dst) -{ - memcpy(dst, src, n * sizeof(float)); -} - -static void -unpack_float_z_Z32X24S8(GLuint n, const void *src, GLfloat *dst) -{ - const GLfloat *s = ((const GLfloat *) src); - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = s[i * 2]; - } -} - /** @@ -2845,11 +1945,9 @@ _mesa_unpack_float_z_row(gl_format format, GLuint n, unpack_float_z_func unpack; switch (format) { - case MESA_FORMAT_Z24_S8: case MESA_FORMAT_Z24_X8: unpack = unpack_float_z_Z24_X8; break; - case MESA_FORMAT_S8_Z24: case MESA_FORMAT_X8_Z24: unpack = unpack_float_z_X8_Z24; break; @@ -2859,12 +1957,6 @@ _mesa_unpack_float_z_row(gl_format format, GLuint n, case MESA_FORMAT_Z32: unpack = unpack_float_z_Z32; break; - case MESA_FORMAT_Z32_FLOAT: - unpack = unpack_float_z_Z32F; - break; - case MESA_FORMAT_Z32_FLOAT_X24S8: - unpack = unpack_float_z_Z32X24S8; - break; default: _mesa_problem(NULL, "bad format %s in _mesa_unpack_float_z_row", _mesa_get_format_name(format)); @@ -2916,32 +2008,6 @@ unpack_uint_z_Z32(const void *src, GLuint *dst, GLuint n) memcpy(dst, src, n * sizeof(GLuint)); } -static void -unpack_uint_z_Z32_FLOAT(const void *src, GLuint *dst, GLuint n) -{ - const float *s = (const float *)src; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = FLOAT_TO_UINT(CLAMP(s[i], 0.0F, 1.0F)); - } -} - -static void -unpack_uint_z_Z32_FLOAT_X24S8(const void *src, GLuint *dst, GLuint n) -{ - struct z32f_x24s8 { - float z; - uint32_t x24s8; - }; - - const struct z32f_x24s8 *s = (const struct z32f_x24s8 *) src; - GLuint i; - - for (i = 0; i < n; i++) { - dst[i] = FLOAT_TO_UINT(CLAMP(s[i].z, 0.0F, 1.0F)); - } -} - /** * Unpack Z values. @@ -2955,11 +2021,9 @@ _mesa_unpack_uint_z_row(gl_format format, GLuint n, const GLubyte *srcPtr = (GLubyte *) src; switch (format) { - case MESA_FORMAT_Z24_S8: case MESA_FORMAT_Z24_X8: unpack = unpack_uint_z_Z24_X8; break; - case MESA_FORMAT_S8_Z24: case MESA_FORMAT_X8_Z24: unpack = unpack_uint_z_X8_Z24; break; @@ -2969,12 +2033,6 @@ _mesa_unpack_uint_z_row(gl_format format, GLuint n, case MESA_FORMAT_Z32: unpack = unpack_uint_z_Z32; break; - case MESA_FORMAT_Z32_FLOAT: - unpack = unpack_uint_z_Z32_FLOAT; - break; - case MESA_FORMAT_Z32_FLOAT_X24S8: - unpack = unpack_uint_z_Z32_FLOAT_X24S8; - break; default: _mesa_problem(NULL, "bad format %s in _mesa_unpack_uint_z_row", _mesa_get_format_name(format)); @@ -2991,36 +2049,6 @@ unpack_ubyte_s_S8(const void *src, GLubyte *dst, GLuint n) memcpy(dst, src, n); } -static void -unpack_ubyte_s_Z24_S8(const void *src, GLubyte *dst, GLuint n) -{ - GLuint i; - const GLuint *src32 = src; - - for (i = 0; i < n; i++) - dst[i] = src32[i] & 0xff; -} - -static void -unpack_ubyte_s_S8_Z24(const void *src, GLubyte *dst, GLuint n) -{ - GLuint i; - const GLuint *src32 = src; - - for (i = 0; i < n; i++) - dst[i] = src32[i] >> 24; -} - -static void -unpack_ubyte_s_Z32_FLOAT_X24S8(const void *src, GLubyte *dst, GLuint n) -{ - GLuint i; - const GLuint *src32 = src; - - for (i = 0; i < n; i++) - dst[i] = src32[i * 2 + 1] & 0xff; -} - void _mesa_unpack_ubyte_stencil_row(gl_format format, GLuint n, const void *src, GLubyte *dst) @@ -3029,54 +2057,9 @@ _mesa_unpack_ubyte_stencil_row(gl_format format, GLuint n, case MESA_FORMAT_S8: unpack_ubyte_s_S8(src, dst, n); break; - case MESA_FORMAT_Z24_S8: - unpack_ubyte_s_Z24_S8(src, dst, n); - break; - case MESA_FORMAT_S8_Z24: - unpack_ubyte_s_S8_Z24(src, dst, n); - break; - case MESA_FORMAT_Z32_FLOAT_X24S8: - unpack_ubyte_s_Z32_FLOAT_X24S8(src, dst, n); - break; default: _mesa_problem(NULL, "bad format %s in _mesa_unpack_ubyte_s_row", _mesa_get_format_name(format)); return; } } - -static void -unpack_uint_24_8_depth_stencil_S8_Z24(const GLuint *src, GLuint *dst, GLuint n) -{ - GLuint i; - - for (i = 0; i < n; i++) { - GLuint val = src[i]; - dst[i] = val >> 24 | val << 8; - } -} - -static void -unpack_uint_24_8_depth_stencil_Z24_S8(const GLuint *src, GLuint *dst, GLuint n) -{ - memcpy(dst, src, n * 4); -} - -void -_mesa_unpack_uint_24_8_depth_stencil_row(gl_format format, GLuint n, - const void *src, GLuint *dst) -{ - switch (format) { - case MESA_FORMAT_Z24_S8: - unpack_uint_24_8_depth_stencil_Z24_S8(src, dst, n); - break; - case MESA_FORMAT_S8_Z24: - unpack_uint_24_8_depth_stencil_S8_Z24(src, dst, n); - break; - default: - _mesa_problem(NULL, - "bad format %s in _mesa_unpack_uint_24_8_depth_stencil_row", - _mesa_get_format_name(format)); - return; - } -} diff --git a/dll/opengl/mesa/src/mesa/main/format_unpack.h b/dll/opengl/mesa/main/format_unpack.h similarity index 95% rename from dll/opengl/mesa/src/mesa/main/format_unpack.h rename to dll/opengl/mesa/main/format_unpack.h index aad800dd15a..09610483b3e 100644 --- a/dll/opengl/mesa/src/mesa/main/format_unpack.h +++ b/dll/opengl/mesa/main/format_unpack.h @@ -55,9 +55,5 @@ void _mesa_unpack_ubyte_stencil_row(gl_format format, GLuint n, const void *src, GLubyte *dst); -void -_mesa_unpack_uint_24_8_depth_stencil_row(gl_format format, GLuint n, - const void *src, GLuint *dst); - #endif /* FORMAT_UNPACK_H */ diff --git a/dll/opengl/mesa/src/mesa/main/formats.c b/dll/opengl/mesa/main/formats.c similarity index 65% rename from dll/opengl/mesa/src/mesa/main/formats.c rename to dll/opengl/mesa/main/formats.c index d11b167f900..c060b7f4726 100644 --- a/dll/opengl/mesa/src/mesa/main/formats.c +++ b/dll/opengl/mesa/main/formats.c @@ -43,7 +43,7 @@ struct gl_format_info /** * Base format is one of GL_RED, GL_RG, GL_RGB, GL_RGBA, GL_ALPHA, * GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_INTENSITY, GL_YCBCR_MESA, - * GL_DEPTH_COMPONENT, GL_STENCIL_INDEX, GL_DEPTH_STENCIL, GL_DUDV_ATI. + * GL_DEPTH_COMPONENT, GL_STENCIL_INDEX, GL_DEPTH_STENCIL. */ GLenum BaseFormat; @@ -366,87 +366,6 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] = 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */ 1, 1, 2 /* BlockWidth/Height,Bytes */ }, - { - MESA_FORMAT_R8, - "MESA_FORMAT_R8", - GL_RED, - GL_UNSIGNED_NORMALIZED, - 8, 0, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 1 - }, - { - MESA_FORMAT_GR88, - "MESA_FORMAT_GR88", - GL_RG, - GL_UNSIGNED_NORMALIZED, - 8, 8, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 2 - }, - { - MESA_FORMAT_RG88, - "MESA_FORMAT_RG88", - GL_RG, - GL_UNSIGNED_NORMALIZED, - 8, 8, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 2 - }, - { - MESA_FORMAT_R16, - "MESA_FORMAT_R16", - GL_RED, - GL_UNSIGNED_NORMALIZED, - 16, 0, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 2 - }, - { - MESA_FORMAT_RG1616, - "MESA_FORMAT_RG1616", - GL_RG, - GL_UNSIGNED_NORMALIZED, - 16, 16, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 4 - }, - { - MESA_FORMAT_RG1616_REV, - "MESA_FORMAT_RG1616_REV", - GL_RG, - GL_UNSIGNED_NORMALIZED, - 16, 16, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 4 - }, - { - MESA_FORMAT_ARGB2101010, - "MESA_FORMAT_ARGB2101010", - GL_RGBA, - GL_UNSIGNED_NORMALIZED, - 10, 10, 10, 2, - 0, 0, 0, 0, 0, - 1, 1, 4 - }, - { - MESA_FORMAT_Z24_S8, /* Name */ - "MESA_FORMAT_Z24_S8", /* StrName */ - GL_DEPTH_STENCIL, /* BaseFormat */ - GL_UNSIGNED_NORMALIZED, /* DataType */ - 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */ - 0, 0, 0, 24, 8, /* Lum/Int/Index/Depth/StencilBits */ - 1, 1, 4 /* BlockWidth/Height,Bytes */ - }, - { - MESA_FORMAT_S8_Z24, /* Name */ - "MESA_FORMAT_S8_Z24", /* StrName */ - GL_DEPTH_STENCIL, /* BaseFormat */ - GL_UNSIGNED_NORMALIZED, /* DataType */ - 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */ - 0, 0, 0, 24, 8, /* Lum/Int/Index/Depth/StencilBits */ - 1, 1, 4 /* BlockWidth/Height,Bytes */ - }, { MESA_FORMAT_Z16, /* Name */ "MESA_FORMAT_Z16", /* StrName */ @@ -492,143 +411,6 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] = 0, 0, 0, 0, 8, /* Lum/Int/Index/Depth/StencilBits */ 1, 1, 1 /* BlockWidth/Height,Bytes */ }, - { - MESA_FORMAT_SRGB8, - "MESA_FORMAT_SRGB8", - GL_RGB, - GL_UNSIGNED_NORMALIZED, - 8, 8, 8, 0, - 0, 0, 0, 0, 0, - 1, 1, 3 - }, - { - MESA_FORMAT_SRGBA8, - "MESA_FORMAT_SRGBA8", - GL_RGBA, - GL_UNSIGNED_NORMALIZED, - 8, 8, 8, 8, - 0, 0, 0, 0, 0, - 1, 1, 4 - }, - { - MESA_FORMAT_SARGB8, - "MESA_FORMAT_SARGB8", - GL_RGBA, - GL_UNSIGNED_NORMALIZED, - 8, 8, 8, 8, - 0, 0, 0, 0, 0, - 1, 1, 4 - }, - { - MESA_FORMAT_SL8, - "MESA_FORMAT_SL8", - GL_LUMINANCE, - GL_UNSIGNED_NORMALIZED, - 0, 0, 0, 0, - 8, 0, 0, 0, 0, - 1, 1, 1 - }, - { - MESA_FORMAT_SLA8, - "MESA_FORMAT_SLA8", - GL_LUMINANCE_ALPHA, - GL_UNSIGNED_NORMALIZED, - 0, 0, 0, 8, - 8, 0, 0, 0, 0, - 1, 1, 2 - }, - { - MESA_FORMAT_SRGB_DXT1, /* Name */ - "MESA_FORMAT_SRGB_DXT1", /* StrName */ - GL_RGB, /* BaseFormat */ - GL_UNSIGNED_NORMALIZED, /* DataType */ - 4, 4, 4, 0, /* approx Red/Green/Blue/AlphaBits */ - 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */ - 4, 4, 8 /* 8 bytes per 4x4 block */ - }, - { - MESA_FORMAT_SRGBA_DXT1, - "MESA_FORMAT_SRGBA_DXT1", - GL_RGBA, - GL_UNSIGNED_NORMALIZED, - 4, 4, 4, 4, - 0, 0, 0, 0, 0, - 4, 4, 8 /* 8 bytes per 4x4 block */ - }, - { - MESA_FORMAT_SRGBA_DXT3, - "MESA_FORMAT_SRGBA_DXT3", - GL_RGBA, - GL_UNSIGNED_NORMALIZED, - 4, 4, 4, 4, - 0, 0, 0, 0, 0, - 4, 4, 16 /* 16 bytes per 4x4 block */ - }, - { - MESA_FORMAT_SRGBA_DXT5, - "MESA_FORMAT_SRGBA_DXT5", - GL_RGBA, - GL_UNSIGNED_NORMALIZED, - 4, 4, 4, 4, - 0, 0, 0, 0, 0, - 4, 4, 16 /* 16 bytes per 4x4 block */ - }, - - { - MESA_FORMAT_RGB_FXT1, - "MESA_FORMAT_RGB_FXT1", - GL_RGB, - GL_UNSIGNED_NORMALIZED, - 4, 4, 4, 0, /* approx Red/Green/BlueBits */ - 0, 0, 0, 0, 0, - 8, 4, 16 /* 16 bytes per 8x4 block */ - }, - { - MESA_FORMAT_RGBA_FXT1, - "MESA_FORMAT_RGBA_FXT1", - GL_RGBA, - GL_UNSIGNED_NORMALIZED, - 4, 4, 4, 1, /* approx Red/Green/Blue/AlphaBits */ - 0, 0, 0, 0, 0, - 8, 4, 16 /* 16 bytes per 8x4 block */ - }, - - { - MESA_FORMAT_RGB_DXT1, /* Name */ - "MESA_FORMAT_RGB_DXT1", /* StrName */ - GL_RGB, /* BaseFormat */ - GL_UNSIGNED_NORMALIZED, /* DataType */ - 4, 4, 4, 0, /* approx Red/Green/Blue/AlphaBits */ - 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */ - 4, 4, 8 /* 8 bytes per 4x4 block */ - }, - { - MESA_FORMAT_RGBA_DXT1, - "MESA_FORMAT_RGBA_DXT1", - GL_RGBA, - GL_UNSIGNED_NORMALIZED, - 4, 4, 4, 4, - 0, 0, 0, 0, 0, - 4, 4, 8 /* 8 bytes per 4x4 block */ - }, - { - MESA_FORMAT_RGBA_DXT3, - "MESA_FORMAT_RGBA_DXT3", - GL_RGBA, - GL_UNSIGNED_NORMALIZED, - 4, 4, 4, 4, - 0, 0, 0, 0, 0, - 4, 4, 16 /* 16 bytes per 4x4 block */ - }, - { - MESA_FORMAT_RGBA_DXT5, - "MESA_FORMAT_RGBA_DXT5", - GL_RGBA, - GL_UNSIGNED_NORMALIZED, - 4, 4, 4, 4, - 0, 0, 0, 0, 0, - 4, 4, 16 /* 16 bytes per 4x4 block */ - }, { MESA_FORMAT_RGBA_FLOAT32, "MESA_FORMAT_RGBA_FLOAT32", @@ -737,42 +519,6 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] = 0, 16, 0, 0, 0, 1, 1, 2 }, - { - MESA_FORMAT_R_FLOAT32, - "MESA_FORMAT_R_FLOAT32", - GL_RED, - GL_FLOAT, - 32, 0, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 4 - }, - { - MESA_FORMAT_R_FLOAT16, - "MESA_FORMAT_R_FLOAT16", - GL_RED, - GL_FLOAT, - 16, 0, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 2 - }, - { - MESA_FORMAT_RG_FLOAT32, - "MESA_FORMAT_RG_FLOAT32", - GL_RG, - GL_FLOAT, - 32, 32, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 8 - }, - { - MESA_FORMAT_RG_FLOAT16, - "MESA_FORMAT_RG_FLOAT16", - GL_RG, - GL_FLOAT, - 16, 16, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 4 - }, /* unnormalized signed int formats */ /* unnormalized unsigned int formats */ @@ -992,25 +738,6 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] = 32, 0, 0, 0, 0, 1, 1, 8 }, - - { - MESA_FORMAT_R_INT8, - "MESA_FORMAT_R_INT8", - GL_RED, - GL_INT, - 8, 0, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 1 - }, - { - MESA_FORMAT_RG_INT8, - "MESA_FORMAT_RG_INT8", - GL_RG, - GL_INT, - 8, 8, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 2 - }, { MESA_FORMAT_RGB_INT8, "MESA_FORMAT_RGB_INT8", @@ -1029,24 +756,6 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] = 0, 0, 0, 0, 0, 1, 1, 4 }, - { - MESA_FORMAT_R_INT16, - "MESA_FORMAT_R_INT16", - GL_RED, - GL_INT, - 16, 0, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 2 - }, - { - MESA_FORMAT_RG_INT16, - "MESA_FORMAT_RG_INT16", - GL_RG, - GL_INT, - 16, 16, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 4 - }, { MESA_FORMAT_RGB_INT16, "MESA_FORMAT_RGB_INT16", @@ -1065,24 +774,6 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] = 0, 0, 0, 0, 0, 1, 1, 8 }, - { - MESA_FORMAT_R_INT32, - "MESA_FORMAT_R_INT32", - GL_RED, - GL_INT, - 32, 0, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 4 - }, - { - MESA_FORMAT_RG_INT32, - "MESA_FORMAT_RG_INT32", - GL_RG, - GL_INT, - 32, 32, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 8 - }, { MESA_FORMAT_RGB_INT32, "MESA_FORMAT_RGB_INT32", @@ -1101,24 +792,6 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] = 0, 0, 0, 0, 0, 1, 1, 16 }, - { - MESA_FORMAT_R_UINT8, - "MESA_FORMAT_R_UINT8", - GL_RED, - GL_UNSIGNED_INT, - 8, 0, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 1 - }, - { - MESA_FORMAT_RG_UINT8, - "MESA_FORMAT_RG_UINT8", - GL_RG, - GL_UNSIGNED_INT, - 8, 8, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 2 - }, { MESA_FORMAT_RGB_UINT8, "MESA_FORMAT_RGB_UINT8", @@ -1137,24 +810,6 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] = 0, 0, 0, 0, 0, 1, 1, 4 }, - { - MESA_FORMAT_R_UINT16, - "MESA_FORMAT_R_UINT16", - GL_RED, - GL_UNSIGNED_INT, - 16, 0, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 2 - }, - { - MESA_FORMAT_RG_UINT16, - "MESA_FORMAT_RG_UINT16", - GL_RG, - GL_UNSIGNED_INT, - 16, 16, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 4 - }, { MESA_FORMAT_RGB_UINT16, "MESA_FORMAT_RGB_UINT16", @@ -1173,24 +828,6 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] = 0, 0, 0, 0, 0, 1, 1, 8 }, - { - MESA_FORMAT_R_UINT32, - "MESA_FORMAT_R_UINT32", - GL_RED, - GL_UNSIGNED_INT, - 32, 0, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 4 - }, - { - MESA_FORMAT_RG_UINT32, - "MESA_FORMAT_RG_UINT32", - GL_RG, - GL_UNSIGNED_INT, - 32, 32, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 8 - }, { MESA_FORMAT_RGB_UINT32, "MESA_FORMAT_RGB_UINT32", @@ -1211,91 +848,6 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] = }, - { - MESA_FORMAT_DUDV8, - "MESA_FORMAT_DUDV8", - GL_DUDV_ATI, - GL_SIGNED_NORMALIZED, - 0, 0, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 2 - }, - - /* Signed 8 bits / channel */ - { - MESA_FORMAT_SIGNED_R8, /* Name */ - "MESA_FORMAT_SIGNED_R8", /* StrName */ - GL_RED, /* BaseFormat */ - GL_SIGNED_NORMALIZED, /* DataType */ - 8, 0, 0, 0, /* Red/Green/Blue/AlphaBits */ - 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */ - 1, 1, 1 /* BlockWidth/Height,Bytes */ - }, - { - MESA_FORMAT_SIGNED_RG88_REV, - "MESA_FORMAT_SIGNED_RG88_REV", - GL_RG, - GL_SIGNED_NORMALIZED, - 8, 8, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 2 - }, - { - MESA_FORMAT_SIGNED_RGBX8888, - "MESA_FORMAT_SIGNED_RGBX8888", - GL_RGB, - GL_SIGNED_NORMALIZED, - 8, 8, 8, 0, - 0, 0, 0, 0, 0, - 1, 1, 4 /* 4 bpp, but no alpha */ - }, - { - MESA_FORMAT_SIGNED_RGBA8888, - "MESA_FORMAT_SIGNED_RGBA8888", - GL_RGBA, - GL_SIGNED_NORMALIZED, - 8, 8, 8, 8, - 0, 0, 0, 0, 0, - 1, 1, 4 - }, - { - MESA_FORMAT_SIGNED_RGBA8888_REV, - "MESA_FORMAT_SIGNED_RGBA8888_REV", - GL_RGBA, - GL_SIGNED_NORMALIZED, - 8, 8, 8, 8, - 0, 0, 0, 0, 0, - 1, 1, 4 - }, - - /* Signed 16 bits / channel */ - { - MESA_FORMAT_SIGNED_R16, - "MESA_FORMAT_SIGNED_R16", - GL_RED, - GL_SIGNED_NORMALIZED, - 16, 0, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 2 - }, - { - MESA_FORMAT_SIGNED_GR1616, - "MESA_FORMAT_SIGNED_GR1616", - GL_RG, - GL_SIGNED_NORMALIZED, - 16, 16, 0, 0, - 0, 0, 0, 0, 0, - 1, 1, 4 - }, - { - MESA_FORMAT_SIGNED_RGB_16, - "MESA_FORMAT_SIGNED_RGB_16", - GL_RGB, - GL_SIGNED_NORMALIZED, - 16, 16, 16, 0, - 0, 0, 0, 0, 0, - 1, 1, 6 - }, { MESA_FORMAT_SIGNED_RGBA_16, "MESA_FORMAT_SIGNED_RGBA_16", @@ -1313,212 +865,7 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] = 16, 16, 16, 16, 0, 0, 0, 0, 0, 1, 1, 8 - }, - { - MESA_FORMAT_RED_RGTC1, - "MESA_FORMAT_RED_RGTC1", - GL_RED, - GL_UNSIGNED_NORMALIZED, - 4, 0, 0, 0, - 0, 0, 0, 0, 0, - 4, 4, 8 /* 8 bytes per 4x4 block */ - }, - { - MESA_FORMAT_SIGNED_RED_RGTC1, - "MESA_FORMAT_SIGNED_RED_RGTC1", - GL_RED, - GL_SIGNED_NORMALIZED, - 4, 0, 0, 0, - 0, 0, 0, 0, 0, - 4, 4, 8 /* 8 bytes per 4x4 block */ - }, - { - MESA_FORMAT_RG_RGTC2, - "MESA_FORMAT_RG_RGTC2", - GL_RG, - GL_UNSIGNED_NORMALIZED, - 4, 4, 0, 0, - 0, 0, 0, 0, 0, - 4, 4, 16 /* 16 bytes per 4x4 block */ - }, - { - MESA_FORMAT_SIGNED_RG_RGTC2, - "MESA_FORMAT_SIGNED_RG_RGTC2", - GL_RG, - GL_SIGNED_NORMALIZED, - 4, 4, 0, 0, - 0, 0, 0, 0, 0, - 4, 4, 16 /* 16 bytes per 4x4 block */ - }, - { - MESA_FORMAT_L_LATC1, - "MESA_FORMAT_L_LATC1", - GL_LUMINANCE, - GL_UNSIGNED_NORMALIZED, - 0, 0, 0, 0, - 4, 0, 0, 0, 0, - 4, 4, 8 /* 8 bytes per 4x4 block */ - }, - { - MESA_FORMAT_SIGNED_L_LATC1, - "MESA_FORMAT_SIGNED_L_LATC1", - GL_LUMINANCE, - GL_SIGNED_NORMALIZED, - 0, 0, 0, 0, - 4, 0, 0, 0, 0, - 4, 4, 8 /* 8 bytes per 4x4 block */ - }, - { - MESA_FORMAT_LA_LATC2, - "MESA_FORMAT_LA_LATC2", - GL_LUMINANCE_ALPHA, - GL_UNSIGNED_NORMALIZED, - 0, 0, 0, 4, - 4, 0, 0, 0, 0, - 4, 4, 16 /* 16 bytes per 4x4 block */ - }, - { - MESA_FORMAT_SIGNED_LA_LATC2, - "MESA_FORMAT_SIGNED_LA_LATC2", - GL_LUMINANCE_ALPHA, - GL_SIGNED_NORMALIZED, - 0, 0, 0, 4, - 4, 0, 0, 0, 0, - 4, 4, 16 /* 16 bytes per 4x4 block */ - }, - - { - MESA_FORMAT_ETC1_RGB8, - "MESA_FORMAT_ETC1_RGB8", - GL_RGB, - GL_UNSIGNED_NORMALIZED, - 8, 8, 8, 0, - 0, 0, 0, 0, 0, - 4, 4, 8 /* 8 bytes per 4x4 block */ - }, - - /* Signed formats from EXT_texture_snorm that are not in GL3.1 */ - { - MESA_FORMAT_SIGNED_A8, - "MESA_FORMAT_SIGNED_A8", - GL_ALPHA, - GL_SIGNED_NORMALIZED, - 0, 0, 0, 8, - 0, 0, 0, 0, 0, - 1, 1, 1 - }, - { - MESA_FORMAT_SIGNED_L8, - "MESA_FORMAT_SIGNED_L8", - GL_LUMINANCE, - GL_SIGNED_NORMALIZED, - 0, 0, 0, 0, - 8, 0, 0, 0, 0, - 1, 1, 1 - }, - { - MESA_FORMAT_SIGNED_AL88, - "MESA_FORMAT_SIGNED_AL88", - GL_LUMINANCE_ALPHA, - GL_SIGNED_NORMALIZED, - 0, 0, 0, 8, - 8, 0, 0, 0, 0, - 1, 1, 2 - }, - { - MESA_FORMAT_SIGNED_I8, - "MESA_FORMAT_SIGNED_I8", - GL_INTENSITY, - GL_SIGNED_NORMALIZED, - 0, 0, 0, 0, - 0, 8, 0, 0, 0, - 1, 1, 1 - }, - { - MESA_FORMAT_SIGNED_A16, - "MESA_FORMAT_SIGNED_A16", - GL_ALPHA, - GL_SIGNED_NORMALIZED, - 0, 0, 0, 16, - 0, 0, 0, 0, 0, - 1, 1, 2 - }, - { - MESA_FORMAT_SIGNED_L16, - "MESA_FORMAT_SIGNED_L16", - GL_LUMINANCE, - GL_SIGNED_NORMALIZED, - 0, 0, 0, 0, - 16, 0, 0, 0, 0, - 1, 1, 2 - }, - { - MESA_FORMAT_SIGNED_AL1616, - "MESA_FORMAT_SIGNED_AL1616", - GL_LUMINANCE_ALPHA, - GL_SIGNED_NORMALIZED, - 0, 0, 0, 16, - 16, 0, 0, 0, 0, - 1, 1, 4 - }, - { - MESA_FORMAT_SIGNED_I16, - "MESA_FORMAT_SIGNED_I16", - GL_INTENSITY, - GL_SIGNED_NORMALIZED, - 0, 0, 0, 0, - 0, 16, 0, 0, 0, - 1, 1, 2 - }, - { - MESA_FORMAT_RGB9_E5_FLOAT, - "MESA_FORMAT_RGB9_E5", - GL_RGB, - GL_FLOAT, - 9, 9, 9, 0, - 0, 0, 0, 0, 0, - 1, 1, 4 - }, - { - MESA_FORMAT_R11_G11_B10_FLOAT, - "MESA_FORMAT_R11_G11_B10_FLOAT", - GL_RGB, - GL_FLOAT, - 11, 11, 10, 0, - 0, 0, 0, 0, 0, - 1, 1, 4 - }, - /* ARB_depth_buffer_float */ - { - MESA_FORMAT_Z32_FLOAT, /* Name */ - "MESA_FORMAT_Z32_FLOAT", /* StrName */ - GL_DEPTH_COMPONENT, /* BaseFormat */ - GL_FLOAT, /* DataType */ - 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */ - 0, 0, 0, 32, 0, /* Lum/Int/Index/Depth/StencilBits */ - 1, 1, 4 /* BlockWidth/Height,Bytes */ - }, - { - MESA_FORMAT_Z32_FLOAT_X24S8, /* Name */ - "MESA_FORMAT_Z32_FLOAT_X24S8", /* StrName */ - GL_DEPTH_STENCIL, /* BaseFormat */ - /* DataType here is used to answer GL_TEXTURE_DEPTH_TYPE queries, and is - * never used for stencil because stencil is always GL_UNSIGNED_INT. - */ - GL_FLOAT, /* DataType */ - 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */ - 0, 0, 0, 32, 8, /* Lum/Int/Index/Depth/StencilBits */ - 1, 1, 8 /* BlockWidth/Height,Bytes */ - }, - { - MESA_FORMAT_ARGB2101010_UINT, - "MESA_FORMAT_ARGB2101010_UINT", - GL_RGBA, - GL_UNSIGNED_INT, - 10, 10, 10, 2, - 0, 0, 0, 0, 0, - 1, 1, 4 - }, + } }; @@ -1554,8 +901,7 @@ _mesa_get_format_bytes(gl_format format) { const struct gl_format_info *info = _mesa_get_format_info(format); ASSERT(info->BytesPerBlock); - ASSERT(info->BytesPerBlock <= MAX_PIXEL_BYTES || - _mesa_is_format_compressed(format)); + ASSERT(info->BytesPerBlock <= MAX_PIXEL_BYTES); return info->BytesPerBlock; } @@ -1603,7 +949,6 @@ _mesa_get_format_bits(gl_format format, GLenum pname) case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: return info->DepthBits; case GL_STENCIL_BITS: - case GL_TEXTURE_STENCIL_SIZE_EXT: case GL_RENDERBUFFER_STENCIL_SIZE_EXT: case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: return info->StencilBits; @@ -1676,27 +1021,6 @@ _mesa_get_format_block_size(gl_format format, GLuint *bw, GLuint *bh) } -/** Is the given format a compressed format? */ -GLboolean -_mesa_is_format_compressed(gl_format format) -{ - const struct gl_format_info *info = _mesa_get_format_info(format); - return info->BlockWidth > 1 || info->BlockHeight > 1; -} - - -/** - * Determine if the given format represents a packed depth/stencil buffer. - */ -GLboolean -_mesa_is_format_packed_depth_stencil(gl_format format) -{ - const struct gl_format_info *info = _mesa_get_format_info(format); - - return info->BaseFormat == GL_DEPTH_STENCIL; -} - - /** * Is the given format a signed/unsigned integer color format? */ @@ -1706,129 +1030,10 @@ _mesa_is_format_integer_color(gl_format format) const struct gl_format_info *info = _mesa_get_format_info(format); return (info->DataType == GL_INT || info->DataType == GL_UNSIGNED_INT) && info->BaseFormat != GL_DEPTH_COMPONENT && - info->BaseFormat != GL_DEPTH_STENCIL && info->BaseFormat != GL_STENCIL_INDEX; } -/** - * Return color encoding for given format. - * \return GL_LINEAR or GL_SRGB - */ -GLenum -_mesa_get_format_color_encoding(gl_format format) -{ - /* XXX this info should be encoded in gl_format_info */ - switch (format) { - case MESA_FORMAT_SRGB8: - case MESA_FORMAT_SRGBA8: - case MESA_FORMAT_SARGB8: - case MESA_FORMAT_SL8: - case MESA_FORMAT_SLA8: - case MESA_FORMAT_SRGB_DXT1: - case MESA_FORMAT_SRGBA_DXT1: - case MESA_FORMAT_SRGBA_DXT3: - case MESA_FORMAT_SRGBA_DXT5: - return GL_SRGB; - default: - return GL_LINEAR; - } -} - - -/** - * For an sRGB format, return the corresponding linear color space format. - * For non-sRGB formats, return the format as-is. - */ -gl_format -_mesa_get_srgb_format_linear(gl_format format) -{ - switch (format) { - case MESA_FORMAT_SRGB8: - format = MESA_FORMAT_RGB888; - break; - case MESA_FORMAT_SRGBA8: - format = MESA_FORMAT_RGBA8888; - break; - case MESA_FORMAT_SARGB8: - format = MESA_FORMAT_ARGB8888; - break; - case MESA_FORMAT_SL8: - format = MESA_FORMAT_L8; - break; - case MESA_FORMAT_SLA8: - format = MESA_FORMAT_AL88; - break; - case MESA_FORMAT_SRGB_DXT1: - format = MESA_FORMAT_RGB_DXT1; - break; - case MESA_FORMAT_SRGBA_DXT1: - format = MESA_FORMAT_RGBA_DXT1; - break; - case MESA_FORMAT_SRGBA_DXT3: - format = MESA_FORMAT_RGBA_DXT3; - break; - case MESA_FORMAT_SRGBA_DXT5: - format = MESA_FORMAT_RGBA_DXT5; - break; - default: - break; - } - return format; -} - - -/** - * If the given format is a compressed format, return a corresponding - * uncompressed format. - */ -gl_format -_mesa_get_uncompressed_format(gl_format format) -{ - switch (format) { - case MESA_FORMAT_RGB_FXT1: - return MESA_FORMAT_RGB888; - case MESA_FORMAT_RGBA_FXT1: - return MESA_FORMAT_RGBA8888; - case MESA_FORMAT_RGB_DXT1: - case MESA_FORMAT_SRGB_DXT1: - return MESA_FORMAT_RGB888; - case MESA_FORMAT_RGBA_DXT1: - case MESA_FORMAT_SRGBA_DXT1: - return MESA_FORMAT_RGBA8888; - case MESA_FORMAT_RGBA_DXT3: - case MESA_FORMAT_SRGBA_DXT3: - return MESA_FORMAT_RGBA8888; - case MESA_FORMAT_RGBA_DXT5: - case MESA_FORMAT_SRGBA_DXT5: - return MESA_FORMAT_RGBA8888; - case MESA_FORMAT_RED_RGTC1: - return MESA_FORMAT_R8; - case MESA_FORMAT_SIGNED_RED_RGTC1: - return MESA_FORMAT_SIGNED_R8; - case MESA_FORMAT_RG_RGTC2: - return MESA_FORMAT_GR88; - case MESA_FORMAT_SIGNED_RG_RGTC2: - return MESA_FORMAT_SIGNED_RG88_REV; - case MESA_FORMAT_L_LATC1: - return MESA_FORMAT_L8; - case MESA_FORMAT_SIGNED_L_LATC1: - return MESA_FORMAT_SIGNED_L8; - case MESA_FORMAT_LA_LATC2: - return MESA_FORMAT_AL88; - case MESA_FORMAT_SIGNED_LA_LATC2: - return MESA_FORMAT_SIGNED_AL88; - case MESA_FORMAT_ETC1_RGB8: - return MESA_FORMAT_RGB888; - default: -#ifdef DEBUG - assert(!_mesa_is_format_compressed(format)); -#endif - return format; - } -} - - GLuint _mesa_format_num_components(gl_format format) { @@ -2077,11 +1282,6 @@ _mesa_format_to_type_and_comps(gl_format format, *comps = 4; return; - case MESA_FORMAT_ARGB2101010: - *datatype = GL_UNSIGNED_INT_2_10_10_10_REV; - *comps = 4; - return; - case MESA_FORMAT_RGBA5551: *datatype = GL_UNSIGNED_SHORT_5_5_5_1; *comps = 4; @@ -2094,21 +1294,16 @@ _mesa_format_to_type_and_comps(gl_format format, case MESA_FORMAT_AL88: case MESA_FORMAT_AL88_REV: - case MESA_FORMAT_GR88: - case MESA_FORMAT_RG88: *datatype = GL_UNSIGNED_BYTE; *comps = 2; return; case MESA_FORMAT_AL1616: case MESA_FORMAT_AL1616_REV: - case MESA_FORMAT_RG1616: - case MESA_FORMAT_RG1616_REV: *datatype = GL_UNSIGNED_SHORT; *comps = 2; return; - case MESA_FORMAT_R16: case MESA_FORMAT_A16: case MESA_FORMAT_L16: case MESA_FORMAT_I16: @@ -2124,7 +1319,6 @@ _mesa_format_to_type_and_comps(gl_format format, case MESA_FORMAT_A8: case MESA_FORMAT_L8: case MESA_FORMAT_I8: - case MESA_FORMAT_R8: case MESA_FORMAT_S8: *datatype = GL_UNSIGNED_BYTE; *comps = 1; @@ -2136,16 +1330,6 @@ _mesa_format_to_type_and_comps(gl_format format, *comps = 2; return; - case MESA_FORMAT_Z24_S8: - *datatype = GL_UNSIGNED_INT_24_8_MESA; - *comps = 2; - return; - - case MESA_FORMAT_S8_Z24: - *datatype = GL_UNSIGNED_INT_8_24_REV_MESA; - *comps = 2; - return; - case MESA_FORMAT_Z16: *datatype = GL_UNSIGNED_SHORT; *comps = 1; @@ -2166,116 +1350,16 @@ _mesa_format_to_type_and_comps(gl_format format, *comps = 1; return; - case MESA_FORMAT_Z32_FLOAT: - *datatype = GL_FLOAT; - *comps = 1; - return; - - case MESA_FORMAT_Z32_FLOAT_X24S8: - *datatype = GL_FLOAT_32_UNSIGNED_INT_24_8_REV; - *comps = 1; - return; - - case MESA_FORMAT_DUDV8: - *datatype = GL_BYTE; - *comps = 2; - return; - - case MESA_FORMAT_SIGNED_R8: - case MESA_FORMAT_SIGNED_A8: - case MESA_FORMAT_SIGNED_L8: - case MESA_FORMAT_SIGNED_I8: - *datatype = GL_BYTE; - *comps = 1; - return; - case MESA_FORMAT_SIGNED_RG88_REV: - case MESA_FORMAT_SIGNED_AL88: - *datatype = GL_BYTE; - *comps = 2; - return; - case MESA_FORMAT_SIGNED_RGBA8888: - case MESA_FORMAT_SIGNED_RGBA8888_REV: - case MESA_FORMAT_SIGNED_RGBX8888: - *datatype = GL_BYTE; - *comps = 4; - return; - case MESA_FORMAT_RGBA_16: *datatype = GL_UNSIGNED_SHORT; *comps = 4; return; - case MESA_FORMAT_SIGNED_R16: - case MESA_FORMAT_SIGNED_A16: - case MESA_FORMAT_SIGNED_L16: - case MESA_FORMAT_SIGNED_I16: - *datatype = GL_SHORT; - *comps = 1; - return; - case MESA_FORMAT_SIGNED_GR1616: - case MESA_FORMAT_SIGNED_AL1616: - *datatype = GL_SHORT; - *comps = 2; - return; - case MESA_FORMAT_SIGNED_RGB_16: - *datatype = GL_SHORT; - *comps = 3; - return; case MESA_FORMAT_SIGNED_RGBA_16: *datatype = GL_SHORT; *comps = 4; return; -#if FEATURE_EXT_texture_sRGB - case MESA_FORMAT_SRGB8: - *datatype = GL_UNSIGNED_BYTE; - *comps = 3; - return; - case MESA_FORMAT_SRGBA8: - case MESA_FORMAT_SARGB8: - *datatype = GL_UNSIGNED_BYTE; - *comps = 4; - return; - case MESA_FORMAT_SL8: - *datatype = GL_UNSIGNED_BYTE; - *comps = 1; - return; - case MESA_FORMAT_SLA8: - *datatype = GL_UNSIGNED_BYTE; - *comps = 2; - return; -#endif - -#if FEATURE_texture_fxt1 - case MESA_FORMAT_RGB_FXT1: - case MESA_FORMAT_RGBA_FXT1: -#endif -#if FEATURE_texture_s3tc - case MESA_FORMAT_RGB_DXT1: - case MESA_FORMAT_RGBA_DXT1: - case MESA_FORMAT_RGBA_DXT3: - case MESA_FORMAT_RGBA_DXT5: -#if FEATURE_EXT_texture_sRGB - case MESA_FORMAT_SRGB_DXT1: - case MESA_FORMAT_SRGBA_DXT1: - case MESA_FORMAT_SRGBA_DXT3: - case MESA_FORMAT_SRGBA_DXT5: -#endif -#endif - case MESA_FORMAT_RED_RGTC1: - case MESA_FORMAT_SIGNED_RED_RGTC1: - case MESA_FORMAT_RG_RGTC2: - case MESA_FORMAT_SIGNED_RG_RGTC2: - case MESA_FORMAT_L_LATC1: - case MESA_FORMAT_SIGNED_L_LATC1: - case MESA_FORMAT_LA_LATC2: - case MESA_FORMAT_SIGNED_LA_LATC2: - case MESA_FORMAT_ETC1_RGB8: - /* XXX generate error instead? */ - *datatype = GL_UNSIGNED_BYTE; - *comps = 0; - return; - case MESA_FORMAT_RGBA_FLOAT32: *datatype = GL_FLOAT; *comps = 4; @@ -2293,26 +1377,22 @@ _mesa_format_to_type_and_comps(gl_format format, *comps = 3; return; case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32: - case MESA_FORMAT_RG_FLOAT32: *datatype = GL_FLOAT; *comps = 2; return; case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16: - case MESA_FORMAT_RG_FLOAT16: *datatype = GL_HALF_FLOAT_ARB; *comps = 2; return; case MESA_FORMAT_ALPHA_FLOAT32: case MESA_FORMAT_LUMINANCE_FLOAT32: case MESA_FORMAT_INTENSITY_FLOAT32: - case MESA_FORMAT_R_FLOAT32: *datatype = GL_FLOAT; *comps = 1; return; case MESA_FORMAT_ALPHA_FLOAT16: case MESA_FORMAT_LUMINANCE_FLOAT16: case MESA_FORMAT_INTENSITY_FLOAT16: - case MESA_FORMAT_R_FLOAT16: *datatype = GL_HALF_FLOAT_ARB; *comps = 1; return; @@ -2381,14 +1461,6 @@ _mesa_format_to_type_and_comps(gl_format format, *comps = 2; return; - case MESA_FORMAT_R_INT8: - *datatype = GL_BYTE; - *comps = 1; - return; - case MESA_FORMAT_RG_INT8: - *datatype = GL_BYTE; - *comps = 2; - return; case MESA_FORMAT_RGB_INT8: *datatype = GL_BYTE; *comps = 3; @@ -2397,14 +1469,6 @@ _mesa_format_to_type_and_comps(gl_format format, *datatype = GL_BYTE; *comps = 4; return; - case MESA_FORMAT_R_INT16: - *datatype = GL_SHORT; - *comps = 1; - return; - case MESA_FORMAT_RG_INT16: - *datatype = GL_SHORT; - *comps = 2; - return; case MESA_FORMAT_RGB_INT16: *datatype = GL_SHORT; *comps = 3; @@ -2413,14 +1477,6 @@ _mesa_format_to_type_and_comps(gl_format format, *datatype = GL_SHORT; *comps = 4; return; - case MESA_FORMAT_R_INT32: - *datatype = GL_INT; - *comps = 1; - return; - case MESA_FORMAT_RG_INT32: - *datatype = GL_INT; - *comps = 2; - return; case MESA_FORMAT_RGB_INT32: *datatype = GL_INT; *comps = 3; @@ -2433,14 +1489,6 @@ _mesa_format_to_type_and_comps(gl_format format, /** * \name Non-normalized unsigned integer formats. */ - case MESA_FORMAT_R_UINT8: - *datatype = GL_UNSIGNED_BYTE; - *comps = 1; - return; - case MESA_FORMAT_RG_UINT8: - *datatype = GL_UNSIGNED_BYTE; - *comps = 2; - return; case MESA_FORMAT_RGB_UINT8: *datatype = GL_UNSIGNED_BYTE; *comps = 3; @@ -2449,14 +1497,6 @@ _mesa_format_to_type_and_comps(gl_format format, *datatype = GL_UNSIGNED_BYTE; *comps = 4; return; - case MESA_FORMAT_R_UINT16: - *datatype = GL_UNSIGNED_SHORT; - *comps = 1; - return; - case MESA_FORMAT_RG_UINT16: - *datatype = GL_UNSIGNED_SHORT; - *comps = 2; - return; case MESA_FORMAT_RGB_UINT16: *datatype = GL_UNSIGNED_SHORT; *comps = 3; @@ -2465,14 +1505,6 @@ _mesa_format_to_type_and_comps(gl_format format, *datatype = GL_UNSIGNED_SHORT; *comps = 4; return; - case MESA_FORMAT_R_UINT32: - *datatype = GL_UNSIGNED_INT; - *comps = 1; - return; - case MESA_FORMAT_RG_UINT32: - *datatype = GL_UNSIGNED_INT; - *comps = 2; - return; case MESA_FORMAT_RGB_UINT32: *datatype = GL_UNSIGNED_INT; *comps = 3; @@ -2482,21 +1514,6 @@ _mesa_format_to_type_and_comps(gl_format format, *comps = 4; return; - case MESA_FORMAT_RGB9_E5_FLOAT: - *datatype = GL_UNSIGNED_INT_5_9_9_9_REV; - *comps = 3; - return; - - case MESA_FORMAT_R11_G11_B10_FLOAT: - *datatype = GL_UNSIGNED_INT_10F_11F_11F_REV; - *comps = 3; - return; - - case MESA_FORMAT_ARGB2101010_UINT: - *datatype = GL_UNSIGNED_INT_2_10_10_10_REV; - *comps = 4; - return; - case MESA_FORMAT_COUNT: assert(0); return; @@ -2627,27 +1644,7 @@ _mesa_format_matches_format_and_type(gl_format gl_format, case MESA_FORMAT_YCBCR_REV: return GL_FALSE; - case MESA_FORMAT_R8: - return format == GL_RED && type == GL_UNSIGNED_BYTE; - case MESA_FORMAT_GR88: - return format == GL_RG && type == GL_UNSIGNED_BYTE && littleEndian; - case MESA_FORMAT_RG88: - return GL_FALSE; - - case MESA_FORMAT_R16: - return format == GL_RED && type == GL_UNSIGNED_SHORT && littleEndian; - case MESA_FORMAT_RG1616: - return format == GL_RG && type == GL_UNSIGNED_SHORT && littleEndian; - case MESA_FORMAT_RG1616_REV: - return GL_FALSE; - - case MESA_FORMAT_ARGB2101010: - return format == GL_BGRA && type == GL_UNSIGNED_INT_2_10_10_10_REV; - - case MESA_FORMAT_Z24_S8: - return format == GL_DEPTH_STENCIL && type == GL_UNSIGNED_INT_24_8; case MESA_FORMAT_Z24_X8: - case MESA_FORMAT_S8_Z24: return GL_FALSE; case MESA_FORMAT_Z16: @@ -2662,25 +1659,6 @@ _mesa_format_matches_format_and_type(gl_format gl_format, case MESA_FORMAT_S8: return GL_FALSE; - case MESA_FORMAT_SRGB8: - case MESA_FORMAT_SRGBA8: - case MESA_FORMAT_SARGB8: - case MESA_FORMAT_SL8: - case MESA_FORMAT_SLA8: - case MESA_FORMAT_SRGB_DXT1: - case MESA_FORMAT_SRGBA_DXT1: - case MESA_FORMAT_SRGBA_DXT3: - case MESA_FORMAT_SRGBA_DXT5: - return GL_FALSE; - - case MESA_FORMAT_RGB_FXT1: - case MESA_FORMAT_RGBA_FXT1: - case MESA_FORMAT_RGB_DXT1: - case MESA_FORMAT_RGBA_DXT1: - case MESA_FORMAT_RGBA_DXT3: - case MESA_FORMAT_RGBA_DXT5: - return GL_FALSE; - case MESA_FORMAT_RGBA_FLOAT32: return format == GL_RGBA && type == GL_FLOAT; case MESA_FORMAT_RGBA_FLOAT16: @@ -2711,16 +1689,6 @@ _mesa_format_matches_format_and_type(gl_format gl_format, case MESA_FORMAT_INTENSITY_FLOAT16: return format == GL_INTENSITY && type == GL_HALF_FLOAT; - case MESA_FORMAT_R_FLOAT32: - return format == GL_RED && type == GL_FLOAT; - case MESA_FORMAT_R_FLOAT16: - return format == GL_RED && type == GL_HALF_FLOAT; - - case MESA_FORMAT_RG_FLOAT32: - return format == GL_RG && type == GL_FLOAT; - case MESA_FORMAT_RG_FLOAT16: - return format == GL_RG && type == GL_HALF_FLOAT; - /* FINISHME: What do we want to do for GL_EXT_texture_integer? */ case MESA_FORMAT_ALPHA_UINT8: case MESA_FORMAT_ALPHA_UINT16: @@ -2754,87 +1722,26 @@ _mesa_format_matches_format_and_type(gl_format gl_format, case MESA_FORMAT_LUMINANCE_ALPHA_INT32: return GL_FALSE; - case MESA_FORMAT_R_INT8: - case MESA_FORMAT_RG_INT8: case MESA_FORMAT_RGB_INT8: case MESA_FORMAT_RGBA_INT8: - case MESA_FORMAT_R_INT16: - case MESA_FORMAT_RG_INT16: case MESA_FORMAT_RGB_INT16: case MESA_FORMAT_RGBA_INT16: - case MESA_FORMAT_R_INT32: - case MESA_FORMAT_RG_INT32: case MESA_FORMAT_RGB_INT32: case MESA_FORMAT_RGBA_INT32: return GL_FALSE; - case MESA_FORMAT_R_UINT8: - case MESA_FORMAT_RG_UINT8: case MESA_FORMAT_RGB_UINT8: case MESA_FORMAT_RGBA_UINT8: - case MESA_FORMAT_R_UINT16: - case MESA_FORMAT_RG_UINT16: case MESA_FORMAT_RGB_UINT16: case MESA_FORMAT_RGBA_UINT16: - case MESA_FORMAT_R_UINT32: - case MESA_FORMAT_RG_UINT32: case MESA_FORMAT_RGB_UINT32: case MESA_FORMAT_RGBA_UINT32: return GL_FALSE; - case MESA_FORMAT_DUDV8: - case MESA_FORMAT_SIGNED_R8: - case MESA_FORMAT_SIGNED_RG88_REV: - case MESA_FORMAT_SIGNED_RGBX8888: - case MESA_FORMAT_SIGNED_RGBA8888: - case MESA_FORMAT_SIGNED_RGBA8888_REV: - case MESA_FORMAT_SIGNED_R16: - case MESA_FORMAT_SIGNED_GR1616: - case MESA_FORMAT_SIGNED_RGB_16: case MESA_FORMAT_SIGNED_RGBA_16: case MESA_FORMAT_RGBA_16: /* FINISHME: SNORM */ return GL_FALSE; - - case MESA_FORMAT_RED_RGTC1: - case MESA_FORMAT_SIGNED_RED_RGTC1: - case MESA_FORMAT_RG_RGTC2: - case MESA_FORMAT_SIGNED_RG_RGTC2: - return GL_FALSE; - - case MESA_FORMAT_L_LATC1: - case MESA_FORMAT_SIGNED_L_LATC1: - case MESA_FORMAT_LA_LATC2: - case MESA_FORMAT_SIGNED_LA_LATC2: - return GL_FALSE; - - case MESA_FORMAT_ETC1_RGB8: - return GL_FALSE; - - case MESA_FORMAT_SIGNED_A8: - case MESA_FORMAT_SIGNED_L8: - case MESA_FORMAT_SIGNED_AL88: - case MESA_FORMAT_SIGNED_I8: - case MESA_FORMAT_SIGNED_A16: - case MESA_FORMAT_SIGNED_L16: - case MESA_FORMAT_SIGNED_AL1616: - case MESA_FORMAT_SIGNED_I16: - /* FINISHME: SNORM */ - return GL_FALSE; - - case MESA_FORMAT_ARGB2101010_UINT: - return GL_FALSE; - - case MESA_FORMAT_RGB9_E5_FLOAT: - return format == GL_RGB && type == GL_UNSIGNED_INT_5_9_9_9_REV; - case MESA_FORMAT_R11_G11_B10_FLOAT: - return format == GL_RGB && type == GL_UNSIGNED_INT_10F_11F_11F_REV; - - case MESA_FORMAT_Z32_FLOAT: - return format == GL_DEPTH_COMPONENT && type == GL_FLOAT; - - case MESA_FORMAT_Z32_FLOAT_X24S8: - return GL_FALSE; } return GL_FALSE; diff --git a/dll/opengl/mesa/src/mesa/main/formats.h b/dll/opengl/mesa/main/formats.h similarity index 66% rename from dll/opengl/mesa/src/mesa/main/formats.h rename to dll/opengl/mesa/main/formats.h index 9609343387f..2ff4af1fa59 100644 --- a/dll/opengl/mesa/src/mesa/main/formats.h +++ b/dll/opengl/mesa/main/formats.h @@ -98,15 +98,6 @@ typedef enum MESA_FORMAT_I16, /* IIII IIII IIII IIII */ MESA_FORMAT_YCBCR, /* YYYY YYYY UorV UorV */ MESA_FORMAT_YCBCR_REV, /* UorV UorV YYYY YYYY */ - MESA_FORMAT_R8, /* RRRR RRRR */ - MESA_FORMAT_GR88, /* GGGG GGGG RRRR RRRR */ - MESA_FORMAT_RG88, /* RRRR RRRR GGGG GGGG */ - MESA_FORMAT_R16, /* RRRR RRRR RRRR RRRR */ - MESA_FORMAT_RG1616, /* GGGG GGGG GGGG GGGG RRRR RRRR RRRR RRRR */ - MESA_FORMAT_RG1616_REV, /* RRRR RRRR RRRR RRRR GGGG GGGG GGGG GGGG */ - MESA_FORMAT_ARGB2101010, /* AARR RRRR RRRR GGGG GGGG GGBB BBBB BBBB */ - MESA_FORMAT_Z24_S8, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ SSSS SSSS */ - MESA_FORMAT_S8_Z24, /* SSSS SSSS ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */ MESA_FORMAT_Z16, /* ZZZZ ZZZZ ZZZZ ZZZZ */ MESA_FORMAT_X8_Z24, /* xxxx xxxx ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ */ MESA_FORMAT_Z24_X8, /* ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ ZZZZ xxxx xxxx */ @@ -114,33 +105,6 @@ typedef enum MESA_FORMAT_S8, /* SSSS SSSS */ /*@}*/ - /** - * \name 8-bit/channel sRGB formats - */ - /*@{*/ - MESA_FORMAT_SRGB8, /* RRRR RRRR GGGG GGGG BBBB BBBB */ - MESA_FORMAT_SRGBA8, /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */ - MESA_FORMAT_SARGB8, /* AAAA AAAA RRRR RRRR GGGG GGGG BBBB BBBB */ - MESA_FORMAT_SL8, /* LLLL LLLL */ - MESA_FORMAT_SLA8, /* AAAA AAAA LLLL LLLL */ - MESA_FORMAT_SRGB_DXT1, - MESA_FORMAT_SRGBA_DXT1, - MESA_FORMAT_SRGBA_DXT3, - MESA_FORMAT_SRGBA_DXT5, - /*@}*/ - - /** - * \name Compressed texture formats. - */ - /*@{*/ - MESA_FORMAT_RGB_FXT1, - MESA_FORMAT_RGBA_FXT1, - MESA_FORMAT_RGB_DXT1, - MESA_FORMAT_RGBA_DXT1, - MESA_FORMAT_RGBA_DXT3, - MESA_FORMAT_RGBA_DXT5, - /*@}*/ - /** * \name Floating point texture formats. */ @@ -157,10 +121,6 @@ typedef enum MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16, MESA_FORMAT_INTENSITY_FLOAT32, MESA_FORMAT_INTENSITY_FLOAT16, - MESA_FORMAT_R_FLOAT32, - MESA_FORMAT_R_FLOAT16, - MESA_FORMAT_RG_FLOAT32, - MESA_FORMAT_RG_FLOAT16, /*@}*/ /** @@ -196,32 +156,20 @@ typedef enum MESA_FORMAT_LUMINANCE_ALPHA_INT16, MESA_FORMAT_LUMINANCE_ALPHA_INT32, - MESA_FORMAT_R_INT8, - MESA_FORMAT_RG_INT8, MESA_FORMAT_RGB_INT8, MESA_FORMAT_RGBA_INT8, - MESA_FORMAT_R_INT16, - MESA_FORMAT_RG_INT16, MESA_FORMAT_RGB_INT16, MESA_FORMAT_RGBA_INT16, - MESA_FORMAT_R_INT32, - MESA_FORMAT_RG_INT32, MESA_FORMAT_RGB_INT32, MESA_FORMAT_RGBA_INT32, /** * \name Non-normalized unsigned integer formats. */ - MESA_FORMAT_R_UINT8, - MESA_FORMAT_RG_UINT8, MESA_FORMAT_RGB_UINT8, MESA_FORMAT_RGBA_UINT8, - MESA_FORMAT_R_UINT16, - MESA_FORMAT_RG_UINT16, MESA_FORMAT_RGB_UINT16, MESA_FORMAT_RGBA_UINT16, - MESA_FORMAT_R_UINT32, - MESA_FORMAT_RG_UINT32, MESA_FORMAT_RGB_UINT32, MESA_FORMAT_RGBA_UINT32, @@ -231,52 +179,10 @@ typedef enum * \name Signed fixed point texture formats. */ /*@{*/ - MESA_FORMAT_DUDV8, /* DUDU DUDU DVDV DVDV */ - MESA_FORMAT_SIGNED_R8, /* RRRR RRRR */ - MESA_FORMAT_SIGNED_RG88_REV, /* GGGG GGGG RRRR RRRR */ - MESA_FORMAT_SIGNED_RGBX8888, /* RRRR RRRR GGGG GGGG BBBB BBBB xxxx xxxx */ - MESA_FORMAT_SIGNED_RGBA8888, /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */ - MESA_FORMAT_SIGNED_RGBA8888_REV,/*AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */ - MESA_FORMAT_SIGNED_R16, /* RRRR RRRR RRRR RRRR */ - MESA_FORMAT_SIGNED_GR1616, /* GGGG GGGG GGGG GGGG RRRR RRRR RRRR RRRR */ - MESA_FORMAT_SIGNED_RGB_16, /* ushort[0]=R, ushort[1]=G, ushort[2]=B */ MESA_FORMAT_SIGNED_RGBA_16, /* ... */ MESA_FORMAT_RGBA_16, /* ... */ /*@}*/ - /*@{*/ - MESA_FORMAT_RED_RGTC1, - MESA_FORMAT_SIGNED_RED_RGTC1, - MESA_FORMAT_RG_RGTC2, - MESA_FORMAT_SIGNED_RG_RGTC2, - /*@}*/ - - /*@{*/ - MESA_FORMAT_L_LATC1, - MESA_FORMAT_SIGNED_L_LATC1, - MESA_FORMAT_LA_LATC2, - MESA_FORMAT_SIGNED_LA_LATC2, - /*@}*/ - - MESA_FORMAT_ETC1_RGB8, - - MESA_FORMAT_SIGNED_A8, /* AAAA AAAA */ - MESA_FORMAT_SIGNED_L8, /* LLLL LLLL */ - MESA_FORMAT_SIGNED_AL88, /* AAAA AAAA LLLL LLLL */ - MESA_FORMAT_SIGNED_I8, /* IIII IIII */ - MESA_FORMAT_SIGNED_A16, /* AAAA AAAA AAAA AAAA */ - MESA_FORMAT_SIGNED_L16, /* LLLL LLLL LLLL LLLL */ - MESA_FORMAT_SIGNED_AL1616, /* AAAA AAAA AAAA AAAA LLLL LLLL LLLL LLLL */ - MESA_FORMAT_SIGNED_I16, /* IIII IIII IIII IIII */ - - MESA_FORMAT_RGB9_E5_FLOAT, - MESA_FORMAT_R11_G11_B10_FLOAT, - - MESA_FORMAT_Z32_FLOAT, - MESA_FORMAT_Z32_FLOAT_X24S8, - - MESA_FORMAT_ARGB2101010_UINT, - MESA_FORMAT_COUNT } gl_format; @@ -302,18 +208,9 @@ _mesa_get_format_base_format(gl_format format); extern void _mesa_get_format_block_size(gl_format format, GLuint *bw, GLuint *bh); -extern GLboolean -_mesa_is_format_compressed(gl_format format); - -extern GLboolean -_mesa_is_format_packed_depth_stencil(gl_format format); - extern GLboolean _mesa_is_format_integer_color(gl_format format); -extern GLenum -_mesa_get_format_color_encoding(gl_format format); - extern GLuint _mesa_format_image_size(gl_format format, GLsizei width, GLsizei height, GLsizei depth); @@ -332,12 +229,6 @@ _mesa_format_to_type_and_comps(gl_format format, extern void _mesa_test_formats(void); -extern gl_format -_mesa_get_srgb_format_linear(gl_format format); - -extern gl_format -_mesa_get_uncompressed_format(gl_format format); - extern GLuint _mesa_format_num_components(gl_format format); diff --git a/dll/opengl/mesa/src/mesa/main/framebuffer.c b/dll/opengl/mesa/main/framebuffer.c similarity index 64% rename from dll/opengl/mesa/src/mesa/main/framebuffer.c rename to dll/opengl/mesa/main/framebuffer.c index 730de620611..b54cfcf73e9 100644 --- a/dll/opengl/mesa/src/mesa/main/framebuffer.c +++ b/dll/opengl/mesa/main/framebuffer.c @@ -38,7 +38,6 @@ #include "formats.h" #include "macros.h" #include "mtypes.h" -#include "fbobject.h" #include "framebuffer.h" #include "renderbuffer.h" #include "texobj.h" @@ -93,27 +92,6 @@ _mesa_create_framebuffer(const struct gl_config *visual) } -/** - * Allocate a new gl_framebuffer object. - * This is the default function for ctx->Driver.NewFramebuffer(). - * This is for allocating user-created framebuffers, not window-system - * framebuffers! - * \sa _mesa_create_framebuffer - */ -struct gl_framebuffer * -_mesa_new_framebuffer(struct gl_context *ctx, GLuint name) -{ - struct gl_framebuffer *fb; - (void) ctx; - assert(name != 0); - fb = CALLOC_STRUCT(gl_framebuffer); - if (fb) { - _mesa_initialize_user_framebuffer(fb, name); - } - return fb; -} - - /** * Initialize a gl_framebuffer object. Typically used to initialize * window system-created framebuffers, not user-created framebuffers. @@ -137,51 +115,24 @@ _mesa_initialize_window_framebuffer(struct gl_framebuffer *fb, /* Init read/draw renderbuffer state */ if (visual->doubleBufferMode) { - fb->_NumColorDrawBuffers = 1; - fb->ColorDrawBuffer[0] = GL_BACK; - fb->_ColorDrawBufferIndexes[0] = BUFFER_BACK_LEFT; + fb->ColorDrawBuffer = GL_BACK; + fb->_ColorDrawBufferIndex = BUFFER_BACK_LEFT; fb->ColorReadBuffer = GL_BACK; fb->_ColorReadBufferIndex = BUFFER_BACK_LEFT; } else { - fb->_NumColorDrawBuffers = 1; - fb->ColorDrawBuffer[0] = GL_FRONT; - fb->_ColorDrawBufferIndexes[0] = BUFFER_FRONT_LEFT; + fb->ColorDrawBuffer = GL_FRONT; + fb->_ColorDrawBufferIndex = BUFFER_FRONT_LEFT; fb->ColorReadBuffer = GL_FRONT; fb->_ColorReadBufferIndex = BUFFER_FRONT_LEFT; } fb->Delete = _mesa_destroy_framebuffer; - fb->_Status = GL_FRAMEBUFFER_COMPLETE_EXT; compute_depth_max(fb); } -/** - * Initialize a user-created gl_framebuffer object. - * \sa _mesa_initialize_window_framebuffer - */ -void -_mesa_initialize_user_framebuffer(struct gl_framebuffer *fb, GLuint name) -{ - assert(fb); - assert(name); - - memset(fb, 0, sizeof(struct gl_framebuffer)); - - fb->Name = name; - fb->RefCount = 1; - fb->_NumColorDrawBuffers = 1; - fb->ColorDrawBuffer[0] = GL_COLOR_ATTACHMENT0_EXT; - fb->_ColorDrawBufferIndexes[0] = BUFFER_COLOR0; - fb->ColorReadBuffer = GL_COLOR_ATTACHMENT0_EXT; - fb->_ColorReadBufferIndex = BUFFER_COLOR0; - fb->Delete = _mesa_destroy_framebuffer; - _glthread_INIT_MUTEX(fb->Mutex); -} - - /** * Deallocate buffer and everything attached to it. * Typically called via the gl_framebuffer->Delete() method. @@ -215,12 +166,6 @@ _mesa_free_framebuffer_data(struct gl_framebuffer *fb) if (att->Renderbuffer) { _mesa_reference_renderbuffer(&att->Renderbuffer, NULL); } - if (att->Texture) { - _mesa_reference_texobj(&att->Texture, NULL); - } - ASSERT(!att->Renderbuffer); - ASSERT(!att->Texture); - att->Type = GL_NONE; } } @@ -276,17 +221,9 @@ _mesa_resize_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb, GLuint width, GLuint height) { GLuint i; - - /* XXX I think we could check if the size is not changing - * and return early. - */ - - /* For window system framebuffers, Name is zero */ - assert(fb->Name == 0); - for (i = 0; i < BUFFER_COUNT; i++) { struct gl_renderbuffer_attachment *att = &fb->Attachment[i]; - if (att->Type == GL_RENDERBUFFER_EXT && att->Renderbuffer) { + if (att->Renderbuffer) { struct gl_renderbuffer *rb = att->Renderbuffer; /* only resize if size is changing */ if (rb->Width != width || rb->Height != height) { @@ -347,8 +284,6 @@ _mesa_resizebuffers( struct gl_context *ctx ) GLuint newWidth, newHeight; struct gl_framebuffer *buffer = ctx->WinSysDrawBuffer; - assert(buffer->Name == 0); - /* ask device driver for size of output buffer */ ctx->Driver.GetBufferSize( buffer, &newWidth, &newHeight ); @@ -364,8 +299,6 @@ _mesa_resizebuffers( struct gl_context *ctx ) GLuint newWidth, newHeight; struct gl_framebuffer *buffer = ctx->WinSysReadBuffer; - assert(buffer->Name == 0); - /* ask device driver for size of read buffer */ ctx->Driver.GetBufferSize( buffer, &newWidth, &newHeight ); @@ -379,57 +312,6 @@ _mesa_resizebuffers( struct gl_context *ctx ) ctx->NewState |= _NEW_BUFFERS; /* to update scissor / window bounds */ } - -/* - * XXX THIS IS OBSOLETE - */ -void GLAPIENTRY -_mesa_ResizeBuffersMESA( void ) -{ - GET_CURRENT_CONTEXT(ctx); - - if (ctx->Extensions.MESA_resize_buffers) - _mesa_resizebuffers( ctx ); -} - - - -/** - * Examine all the framebuffer's renderbuffers to update the Width/Height - * fields of the framebuffer. If we have renderbuffers with different - * sizes, set the framebuffer's width and height to the min size. - * Note: this is only intended for user-created framebuffers, not - * window-system framebuffes. - */ -static void -update_framebuffer_size(struct gl_context *ctx, struct gl_framebuffer *fb) -{ - GLuint minWidth = ~0, minHeight = ~0; - GLuint i; - - /* user-created framebuffers only */ - assert(fb->Name); - - for (i = 0; i < BUFFER_COUNT; i++) { - struct gl_renderbuffer_attachment *att = &fb->Attachment[i]; - const struct gl_renderbuffer *rb = att->Renderbuffer; - if (rb) { - minWidth = MIN2(minWidth, rb->Width); - minHeight = MIN2(minHeight, rb->Height); - } - } - - if (minWidth != ~0) { - fb->Width = minWidth; - fb->Height = minHeight; - } - else { - fb->Width = 0; - fb->Height = 0; - } -} - - /** * Update the context's current drawing buffer's Xmin, Xmax, Ymin, Ymax fields. * These values are computed from the buffer's width and height and @@ -444,11 +326,6 @@ _mesa_update_draw_buffer_bounds(struct gl_context *ctx) if (!buffer) return; - if (buffer->Name) { - /* user-created framebuffer size depends on the renderbuffers */ - update_framebuffer_size(ctx, buffer); - } - buffer->_Xmin = 0; buffer->_Ymin = 0; buffer->_Xmax = buffer->Width; @@ -480,103 +357,6 @@ _mesa_update_draw_buffer_bounds(struct gl_context *ctx) ASSERT(buffer->_Ymin <= buffer->_Ymax); } - -/** - * The glGet queries of the framebuffer red/green/blue size, stencil size, - * etc. are satisfied by the fields of ctx->DrawBuffer->Visual. These can - * change depending on the renderbuffer bindings. This function updates - * the given framebuffer's Visual from the current renderbuffer bindings. - * - * This may apply to user-created framebuffers or window system framebuffers. - * - * Also note: ctx->DrawBuffer->Visual.depthBits might not equal - * ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer.DepthBits. - * The former one is used to convert floating point depth values into - * integer Z values. - */ -void -_mesa_update_framebuffer_visual(struct gl_context *ctx, - struct gl_framebuffer *fb) -{ - GLuint i; - - memset(&fb->Visual, 0, sizeof(fb->Visual)); - fb->Visual.rgbMode = GL_TRUE; /* assume this */ - -#if 0 /* this _might_ be needed */ - if (fb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - /* leave visual fields zero'd */ - return; - } -#endif - - /* find first RGB renderbuffer */ - for (i = 0; i < BUFFER_COUNT; i++) { - if (fb->Attachment[i].Renderbuffer) { - const struct gl_renderbuffer *rb = fb->Attachment[i].Renderbuffer; - const GLenum baseFormat = _mesa_get_format_base_format(rb->Format); - const gl_format fmt = rb->Format; - - if (_mesa_is_legal_color_format(ctx, baseFormat)) { - fb->Visual.redBits = _mesa_get_format_bits(fmt, GL_RED_BITS); - fb->Visual.greenBits = _mesa_get_format_bits(fmt, GL_GREEN_BITS); - fb->Visual.blueBits = _mesa_get_format_bits(fmt, GL_BLUE_BITS); - fb->Visual.alphaBits = _mesa_get_format_bits(fmt, GL_ALPHA_BITS); - fb->Visual.rgbBits = fb->Visual.redBits - + fb->Visual.greenBits + fb->Visual.blueBits; - fb->Visual.samples = rb->NumSamples; - fb->Visual.sampleBuffers = rb->NumSamples > 0 ? 1 : 0; - if (_mesa_get_format_color_encoding(fmt) == GL_SRGB) - fb->Visual.sRGBCapable = ctx->Const.sRGBCapable; - break; - } - } - } - - fb->Visual.floatMode = GL_FALSE; - for (i = 0; i < BUFFER_COUNT; i++) { - if (fb->Attachment[i].Renderbuffer) { - const struct gl_renderbuffer *rb = fb->Attachment[i].Renderbuffer; - const gl_format fmt = rb->Format; - - if (_mesa_get_format_datatype(fmt) == GL_FLOAT) { - fb->Visual.floatMode = GL_TRUE; - break; - } - } - } - - if (fb->Attachment[BUFFER_DEPTH].Renderbuffer) { - const struct gl_renderbuffer *rb = - fb->Attachment[BUFFER_DEPTH].Renderbuffer; - const gl_format fmt = rb->Format; - fb->Visual.haveDepthBuffer = GL_TRUE; - fb->Visual.depthBits = _mesa_get_format_bits(fmt, GL_DEPTH_BITS); - } - - if (fb->Attachment[BUFFER_STENCIL].Renderbuffer) { - const struct gl_renderbuffer *rb = - fb->Attachment[BUFFER_STENCIL].Renderbuffer; - const gl_format fmt = rb->Format; - fb->Visual.haveStencilBuffer = GL_TRUE; - fb->Visual.stencilBits = _mesa_get_format_bits(fmt, GL_STENCIL_BITS); - } - - if (fb->Attachment[BUFFER_ACCUM].Renderbuffer) { - const struct gl_renderbuffer *rb = - fb->Attachment[BUFFER_ACCUM].Renderbuffer; - const gl_format fmt = rb->Format; - fb->Visual.haveAccumBuffer = GL_TRUE; - fb->Visual.accumRedBits = _mesa_get_format_bits(fmt, GL_RED_BITS); - fb->Visual.accumGreenBits = _mesa_get_format_bits(fmt, GL_GREEN_BITS); - fb->Visual.accumBlueBits = _mesa_get_format_bits(fmt, GL_BLUE_BITS); - fb->Visual.accumAlphaBits = _mesa_get_format_bits(fmt, GL_ALPHA_BITS); - } - - compute_depth_max(fb); -} - - /* * Example DrawBuffers scenarios: * @@ -630,19 +410,12 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx, static void update_color_draw_buffers(struct gl_context *ctx, struct gl_framebuffer *fb) { - GLuint output; - - /* set 0th buffer to NULL now in case _NumColorDrawBuffers is zero */ - fb->_ColorDrawBuffers[0] = NULL; - - for (output = 0; output < fb->_NumColorDrawBuffers; output++) { - GLint buf = fb->_ColorDrawBufferIndexes[output]; - if (buf >= 0) { - fb->_ColorDrawBuffers[output] = fb->Attachment[buf].Renderbuffer; - } - else { - fb->_ColorDrawBuffers[output] = NULL; - } + GLint buf = fb->_ColorDrawBufferIndex; + if (buf >= 0) { + fb->_ColorDrawBuffer = fb->Attachment[buf].Renderbuffer; + } + else { + fb->_ColorDrawBuffer = NULL; } } @@ -687,24 +460,7 @@ update_color_read_buffer(struct gl_context *ctx, struct gl_framebuffer *fb) static void update_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb) { - if (fb->Name == 0) { - /* This is a window-system framebuffer */ - /* Need to update the FB's GL_DRAW_BUFFER state to match the - * context state (GL_READ_BUFFER too). - */ - if (fb->ColorDrawBuffer[0] != ctx->Color.DrawBuffer[0]) { - _mesa_drawbuffers(ctx, ctx->Const.MaxDrawBuffers, - ctx->Color.DrawBuffer, NULL); - } - } - else { - /* This is a user-created framebuffer. - * Completeness only matters for user-created framebuffers. - */ - if (fb->_Status != GL_FRAMEBUFFER_COMPLETE) { - _mesa_test_framebuffer_completeness(ctx, fb); - } - } + _mesa_drawbuffer(ctx, ctx->Color.DrawBuffer, 0); /* Strictly speaking, we don't need to update the draw-state * if this FB is bound as ctx->ReadBuffer (and conversely, the @@ -753,15 +509,6 @@ renderbuffer_exists(struct gl_context *ctx, { const struct gl_renderbuffer_attachment *att = fb->Attachment; - /* If we don't know the framebuffer status, update it now */ - if (fb->_Status == 0) { - _mesa_test_framebuffer_completeness(ctx, fb); - } - - if (fb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - return GL_FALSE; - } - switch (format) { case GL_COLOR: case GL_RED: @@ -807,19 +554,13 @@ renderbuffer_exists(struct gl_context *ctx, break; case GL_DEPTH: case GL_DEPTH_COMPONENT: - if (att[BUFFER_DEPTH].Type == GL_NONE) { + if (att[BUFFER_DEPTH].Renderbuffer == NULL) { return GL_FALSE; } break; case GL_STENCIL: case GL_STENCIL_INDEX: - if (att[BUFFER_STENCIL].Type == GL_NONE) { - return GL_FALSE; - } - break; - case GL_DEPTH_STENCIL_EXT: - if (att[BUFFER_DEPTH].Type == GL_NONE || - att[BUFFER_STENCIL].Type == GL_NONE) { + if (att[BUFFER_STENCIL].Renderbuffer == NULL) { return GL_FALSE; } break; @@ -894,41 +635,3 @@ _mesa_get_color_read_type(struct gl_context *ctx) } -/** - * Print framebuffer info to stderr, for debugging. - */ -void -_mesa_print_framebuffer(const struct gl_framebuffer *fb) -{ - GLuint i; - - fprintf(stderr, "Mesa Framebuffer %u at %p\n", fb->Name, (void *) fb); - fprintf(stderr, " Size: %u x %u Status: %s\n", fb->Width, fb->Height, - _mesa_lookup_enum_by_nr(fb->_Status)); - fprintf(stderr, " Attachments:\n"); - - for (i = 0; i < BUFFER_COUNT; i++) { - const struct gl_renderbuffer_attachment *att = &fb->Attachment[i]; - if (att->Type == GL_TEXTURE) { - const struct gl_texture_image *texImage = - _mesa_get_attachment_teximage_const(att); - fprintf(stderr, - " %2d: Texture %u, level %u, face %u, slice %u, complete %d\n", - i, att->Texture->Name, att->TextureLevel, att->CubeMapFace, - att->Zoffset, att->Complete); - fprintf(stderr, " Size: %u x %u x %u Format %s\n", - texImage->Width, texImage->Height, texImage->Depth, - _mesa_get_format_name(texImage->TexFormat)); - } - else if (att->Type == GL_RENDERBUFFER) { - fprintf(stderr, " %2d: Renderbuffer %u, complete %d\n", - i, att->Renderbuffer->Name, att->Complete); - fprintf(stderr, " Size: %u x %u Format %s\n", - att->Renderbuffer->Width, att->Renderbuffer->Height, - _mesa_get_format_name(att->Renderbuffer->Format)); - } - else { - fprintf(stderr, " %2d: none\n", i); - } - } -} diff --git a/dll/opengl/mesa/src/mesa/main/framebuffer.h b/dll/opengl/mesa/main/framebuffer.h similarity index 86% rename from dll/opengl/mesa/src/mesa/main/framebuffer.h rename to dll/opengl/mesa/main/framebuffer.h index ad53d8cbeb0..09ed6ed1df8 100644 --- a/dll/opengl/mesa/src/mesa/main/framebuffer.h +++ b/dll/opengl/mesa/main/framebuffer.h @@ -34,16 +34,10 @@ struct gl_context; extern struct gl_framebuffer * _mesa_create_framebuffer(const struct gl_config *visual); -extern struct gl_framebuffer * -_mesa_new_framebuffer(struct gl_context *ctx, GLuint name); - extern void _mesa_initialize_window_framebuffer(struct gl_framebuffer *fb, const struct gl_config *visual); -extern void -_mesa_initialize_user_framebuffer(struct gl_framebuffer *fb, GLuint name); - extern void _mesa_destroy_framebuffer(struct gl_framebuffer *buffer); @@ -70,17 +64,10 @@ _mesa_resize_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb, extern void _mesa_resizebuffers( struct gl_context *ctx ); -extern void GLAPIENTRY -_mesa_ResizeBuffersMESA( void ); - extern void _mesa_update_draw_buffer_bounds(struct gl_context *ctx); -extern void -_mesa_update_framebuffer_visual(struct gl_context *ctx, - struct gl_framebuffer *fb); - extern void _mesa_update_framebuffer(struct gl_context *ctx); @@ -96,7 +83,4 @@ _mesa_get_color_read_type(struct gl_context *ctx); extern GLenum _mesa_get_color_read_format(struct gl_context *ctx); -extern void -_mesa_print_framebuffer(const struct gl_framebuffer *fb); - #endif /* FRAMEBUFFER_H */ diff --git a/dll/opengl/mesa/src/mesa/main/get.c b/dll/opengl/mesa/main/get.c similarity index 60% rename from dll/opengl/mesa/src/mesa/main/get.c rename to dll/opengl/mesa/main/get.c index 5ad601242f4..79730d76e1d 100644 --- a/dll/opengl/mesa/src/mesa/main/get.c +++ b/dll/opengl/mesa/main/get.c @@ -32,7 +32,6 @@ #include "mfeatures.h" #include "mtypes.h" #include "state.h" -#include "texcompress.h" #include "framebuffer.h" /* This is a table driven implemetation of the glGet*v() functions. @@ -86,7 +85,6 @@ enum value_type { TYPE_INVALID, - TYPE_API_MASK, TYPE_INT, TYPE_INT_2, TYPE_INT_3, @@ -131,14 +129,10 @@ enum value_extra { EXTRA_VERSION_30, EXTRA_VERSION_31, EXTRA_VERSION_32, - EXTRA_VERSION_ES2, - EXTRA_NEW_BUFFERS, - EXTRA_NEW_FRAG_CLAMP, - EXTRA_VALID_DRAW_BUFFER, + EXTRA_NEW_BUFFERS, EXTRA_VALID_TEXTURE_UNIT, EXTRA_VALID_CLIP_DISTANCE, EXTRA_FLUSH_CURRENT, - EXTRA_GLSL_130, }; #define NO_EXTRA NULL @@ -230,16 +224,6 @@ static const int extra_new_buffers[] = { EXTRA_END }; -static const int extra_new_frag_clamp[] = { - EXTRA_NEW_FRAG_CLAMP, - EXTRA_END -}; - -static const int extra_valid_draw_buffer[] = { - EXTRA_VALID_DRAW_BUFFER, - EXTRA_END -}; - static const int extra_valid_texture_unit[] = { EXTRA_VALID_TEXTURE_UNIT, EXTRA_END @@ -278,99 +262,25 @@ static const int extra_EXT_texture_integer[] = { EXTRA_END }; -static const int extra_GLSL_130[] = { - EXTRA_GLSL_130, - EXTRA_END -}; -static const int extra_ARB_sampler_objects[] = { - EXT(ARB_sampler_objects), - EXTRA_END -}; - - -EXTRA_EXT(ARB_ES2_compatibility); EXTRA_EXT(ARB_texture_cube_map); -EXTRA_EXT(MESA_texture_array); -EXTRA_EXT2(EXT_secondary_color, ARB_vertex_program); EXTRA_EXT(EXT_secondary_color); EXTRA_EXT(EXT_fog_coord); EXTRA_EXT(NV_fog_distance); EXTRA_EXT(EXT_texture_filter_anisotropic); EXTRA_EXT(IBM_rasterpos_clip); EXTRA_EXT(NV_point_sprite); -EXTRA_EXT(NV_vertex_program); -EXTRA_EXT(NV_fragment_program); -EXTRA_EXT(NV_texture_rectangle); -EXTRA_EXT(EXT_stencil_two_side); EXTRA_EXT(NV_light_max_exponent); EXTRA_EXT(EXT_depth_bounds_test); -EXTRA_EXT(ARB_depth_clamp); -EXTRA_EXT(ATI_fragment_shader); -EXTRA_EXT(EXT_framebuffer_blit); -EXTRA_EXT(ARB_shader_objects); -EXTRA_EXT(EXT_provoking_vertex); -EXTRA_EXT(ARB_fragment_shader); -EXTRA_EXT(ARB_fragment_program); -EXTRA_EXT2(ARB_framebuffer_object, EXT_framebuffer_multisample); -EXTRA_EXT(EXT_framebuffer_object); EXTRA_EXT(APPLE_vertex_array_object); -EXTRA_EXT(ARB_seamless_cube_map); EXTRA_EXT(EXT_compiled_vertex_array); -EXTRA_EXT(ARB_sync); -EXTRA_EXT(ARB_vertex_shader); -EXTRA_EXT(EXT_transform_feedback); -EXTRA_EXT(ARB_transform_feedback2); -EXTRA_EXT(EXT_pixel_buffer_object); -EXTRA_EXT(ARB_vertex_program); EXTRA_EXT2(NV_point_sprite, ARB_point_sprite); -EXTRA_EXT2(ARB_fragment_program, NV_fragment_program); -EXTRA_EXT2(ARB_vertex_program, NV_vertex_program); -EXTRA_EXT2(ARB_vertex_program, ARB_fragment_program); -EXTRA_EXT(ARB_geometry_shader4); -EXTRA_EXT(ARB_color_buffer_float); -EXTRA_EXT(ARB_copy_buffer); -EXTRA_EXT(EXT_framebuffer_sRGB); -EXTRA_EXT(ARB_texture_buffer_object); -EXTRA_EXT(OES_EGL_image_external); - -static const int -extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program[] = { - EXT(ARB_vertex_program), - EXT(ARB_fragment_program), - EXT(NV_vertex_program), - EXTRA_END -}; - -static const int -extra_NV_vertex_program_ARB_vertex_program_ARB_fragment_program_NV_vertex_program[] = { - EXT(NV_vertex_program), - EXT(ARB_vertex_program), - EXT(ARB_fragment_program), - EXT(NV_vertex_program), - EXTRA_END -}; - -static const int -extra_NV_primitive_restart[] = { - EXT(NV_primitive_restart), - EXTRA_END -}; static const int extra_version_30[] = { EXTRA_VERSION_30, EXTRA_END }; static const int extra_version_31[] = { EXTRA_VERSION_31, EXTRA_END }; static const int extra_version_32[] = { EXTRA_VERSION_32, EXTRA_END }; -static const int -extra_ARB_vertex_program_version_es2[] = { - EXT(ARB_vertex_program), - EXTRA_VERSION_ES2, - EXTRA_END -}; - #define API_OPENGL_BIT (1 << API_OPENGL) -#define API_OPENGLES_BIT (1 << API_OPENGLES) -#define API_OPENGLES2_BIT (1 << API_OPENGLES2) /* This is the big table describing all the enums we accept in * glGet*v(). The table is partitioned into six parts: enums @@ -383,14 +293,11 @@ extra_ARB_vertex_program_version_es2[] = { * need. */ static const struct value_desc values[] = { - /* Enums shared between OpenGL, GLES1 and GLES2 */ - { 0, 0, TYPE_API_MASK, - API_OPENGL_BIT | API_OPENGLES_BIT | API_OPENGLES2_BIT, NO_EXTRA}, { GL_ALPHA_BITS, BUFFER_INT(Visual.alphaBits), extra_new_buffers }, { GL_BLEND, CONTEXT_BIT0(Color.BlendEnabled), NO_EXTRA }, - { GL_BLEND_SRC, CONTEXT_ENUM(Color.Blend[0].SrcRGB), NO_EXTRA }, + { GL_BLEND_SRC, CONTEXT_ENUM(Color.SrcRGB), NO_EXTRA }, { GL_BLUE_BITS, BUFFER_INT(Visual.blueBits), extra_new_buffers }, - { GL_COLOR_CLEAR_VALUE, LOC_CUSTOM, TYPE_FLOATN_4, 0, extra_new_frag_clamp }, + { GL_COLOR_CLEAR_VALUE, LOC_CUSTOM, TYPE_FLOATN_4, 0, NO_EXTRA }, { GL_COLOR_WRITEMASK, LOC_CUSTOM, TYPE_INT_4, 0, NO_EXTRA }, { GL_CULL_FACE, CONTEXT_BOOL(Polygon.CullFlag), NO_EXTRA }, { GL_CULL_FACE_MODE, CONTEXT_ENUM(Polygon.CullFaceMode), NO_EXTRA }, @@ -450,15 +357,15 @@ static const struct value_desc values[] = { extra_ARB_texture_cube_map }, /* XXX: OES_texture_cube_map */ /* XXX: OES_blend_subtract */ - { GL_BLEND_SRC_RGB_EXT, CONTEXT_ENUM(Color.Blend[0].SrcRGB), NO_EXTRA }, - { GL_BLEND_DST_RGB_EXT, CONTEXT_ENUM(Color.Blend[0].DstRGB), NO_EXTRA }, - { GL_BLEND_SRC_ALPHA_EXT, CONTEXT_ENUM(Color.Blend[0].SrcA), NO_EXTRA }, - { GL_BLEND_DST_ALPHA_EXT, CONTEXT_ENUM(Color.Blend[0].DstA), NO_EXTRA }, + { GL_BLEND_SRC_RGB_EXT, CONTEXT_ENUM(Color.SrcRGB), NO_EXTRA }, + { GL_BLEND_DST_RGB_EXT, CONTEXT_ENUM(Color.DstRGB), NO_EXTRA }, + { GL_BLEND_SRC_ALPHA_EXT, CONTEXT_ENUM(Color.SrcA), NO_EXTRA }, + { GL_BLEND_DST_ALPHA_EXT, CONTEXT_ENUM(Color.DstA), NO_EXTRA }, /* GL_BLEND_EQUATION_RGB, which is what we're really after, is * defined identically to GL_BLEND_EQUATION. */ - { GL_BLEND_EQUATION, CONTEXT_ENUM(Color.Blend[0].EquationRGB), NO_EXTRA }, - { GL_BLEND_EQUATION_ALPHA_EXT, CONTEXT_ENUM(Color.Blend[0].EquationA), NO_EXTRA }, + { GL_BLEND_EQUATION, CONTEXT_ENUM(Color.EquationRGB), NO_EXTRA }, + { GL_BLEND_EQUATION_ALPHA_EXT, CONTEXT_ENUM(Color.EquationA), NO_EXTRA }, /* GL_ARB_texture_compression */ { GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA }, @@ -472,11 +379,6 @@ static const struct value_desc values[] = { CONTEXT_FLOAT(Multisample.SampleCoverageValue), NO_EXTRA }, { GL_SAMPLE_COVERAGE_INVERT_ARB, CONTEXT_BOOL(Multisample.SampleCoverageInvert), NO_EXTRA }, - { GL_SAMPLE_BUFFERS_ARB, BUFFER_INT(Visual.sampleBuffers), NO_EXTRA }, - { GL_SAMPLES_ARB, BUFFER_INT(Visual.samples), NO_EXTRA }, - - /* GL_SGIS_generate_mipmap */ - { GL_GENERATE_MIPMAP_HINT_SGIS, CONTEXT_ENUM(Hint.GenerateMipmap), NO_EXTRA }, /* GL_ARB_vertex_buffer_object */ { GL_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA }, @@ -485,36 +387,16 @@ static const struct value_desc values[] = { /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB - not supported */ { GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA }, - /* GL_ARB_color_buffer_float */ - { GL_CLAMP_VERTEX_COLOR, CONTEXT_ENUM(Light.ClampVertexColor), extra_ARB_color_buffer_float }, - { GL_CLAMP_FRAGMENT_COLOR, CONTEXT_ENUM(Color.ClampFragmentColor), extra_ARB_color_buffer_float }, - { GL_CLAMP_READ_COLOR, CONTEXT_ENUM(Color.ClampReadColor), extra_ARB_color_buffer_float }, - - /* GL_ARB_copy_buffer */ - { GL_COPY_READ_BUFFER, LOC_CUSTOM, TYPE_INT, 0, extra_ARB_copy_buffer }, - { GL_COPY_WRITE_BUFFER, LOC_CUSTOM, TYPE_INT, 0, extra_ARB_copy_buffer }, - /* GL_OES_read_format */ { GL_IMPLEMENTATION_COLOR_READ_TYPE_OES, LOC_CUSTOM, TYPE_INT, 0, extra_new_buffers }, { GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES, LOC_CUSTOM, TYPE_INT, 0, extra_new_buffers }, - /* GL_EXT_framebuffer_object */ - { GL_FRAMEBUFFER_BINDING_EXT, BUFFER_INT(Name), - extra_EXT_framebuffer_object }, - { GL_RENDERBUFFER_BINDING_EXT, LOC_CUSTOM, TYPE_INT, 0, - extra_EXT_framebuffer_object }, - { GL_MAX_RENDERBUFFER_SIZE_EXT, CONTEXT_INT(Const.MaxRenderbufferSize), - extra_EXT_framebuffer_object }, - /* This entry isn't spec'ed for GLES 2, but is needed for Mesa's * GLSL: */ { GL_MAX_CLIP_PLANES, CONTEXT_INT(Const.MaxClipPlanes), NO_EXTRA }, -#if FEATURE_GL || FEATURE_ES1 - /* Enums in OpenGL and GLES1 */ - { 0, 0, TYPE_API_MASK, API_OPENGL_BIT | API_OPENGLES_BIT, NO_EXTRA }, { GL_MAX_LIGHTS, CONTEXT_INT(Const.MaxLights), NO_EXTRA }, { GL_LIGHT0, CONTEXT_BOOL(Light.Light[0].Enabled), NO_EXTRA }, { GL_LIGHT1, CONTEXT_BOOL(Light.Light[1].Enabled), NO_EXTRA }, @@ -530,8 +412,8 @@ static const struct value_desc values[] = { { GL_LIGHT_MODEL_TWO_SIDE, CONTEXT_BOOL(Light.Model.TwoSide), NO_EXTRA }, { GL_ALPHA_TEST, CONTEXT_BOOL(Color.AlphaEnabled), NO_EXTRA }, { GL_ALPHA_TEST_FUNC, CONTEXT_ENUM(Color.AlphaFunc), NO_EXTRA }, - { GL_ALPHA_TEST_REF, LOC_CUSTOM, TYPE_FLOATN, 0, extra_new_frag_clamp }, - { GL_BLEND_DST, CONTEXT_ENUM(Color.Blend[0].DstRGB), NO_EXTRA }, + { GL_ALPHA_TEST_REF, LOC_CUSTOM, TYPE_FLOATN, 0, NO_EXTRA }, + { GL_BLEND_DST, CONTEXT_ENUM(Color.DstRGB), NO_EXTRA }, { GL_CLIP_DISTANCE0, CONTEXT_BIT0(Transform.ClipPlanesEnabled), extra_valid_clip_distance }, { GL_CLIP_DISTANCE1, CONTEXT_BIT1(Transform.ClipPlanesEnabled), extra_valid_clip_distance }, { GL_CLIP_DISTANCE2, CONTEXT_BIT2(Transform.ClipPlanesEnabled), extra_valid_clip_distance }, @@ -551,7 +433,7 @@ static const struct value_desc values[] = { extra_flush_current_valid_texture_unit }, { GL_DISTANCE_ATTENUATION_EXT, CONTEXT_FLOAT3(Point.Params[0]), NO_EXTRA }, { GL_FOG, CONTEXT_BOOL(Fog.Enabled), NO_EXTRA }, - { GL_FOG_COLOR, LOC_CUSTOM, TYPE_FLOATN_4, 0, extra_new_frag_clamp }, + { GL_FOG_COLOR, LOC_CUSTOM, TYPE_FLOATN_4, 0, NO_EXTRA }, { GL_FOG_DENSITY, CONTEXT_FLOAT(Fog.Density), NO_EXTRA }, { GL_FOG_END, CONTEXT_FLOAT(Fog.End), NO_EXTRA }, { GL_FOG_HINT, CONTEXT_ENUM(Hint.Fog), NO_EXTRA }, @@ -609,19 +491,6 @@ static const struct value_desc values[] = { { GL_TEXTURE_COORD_ARRAY_STRIDE, LOC_CUSTOM, TYPE_INT, offsetof(struct gl_client_array, Stride), NO_EXTRA }, - /* GL_ARB_ES2_compatibility */ - { GL_SHADER_COMPILER, CONST(1), extra_ARB_ES2_compatibility }, - { GL_MAX_VARYING_VECTORS, CONTEXT_INT(Const.MaxVarying), - extra_ARB_ES2_compatibility }, - { GL_MAX_VERTEX_UNIFORM_VECTORS, LOC_CUSTOM, TYPE_INT, 0, - extra_ARB_ES2_compatibility }, - { GL_MAX_FRAGMENT_UNIFORM_VECTORS, LOC_CUSTOM, TYPE_INT, 0, - extra_ARB_ES2_compatibility }, - - /* GL_ARB_multitexture */ - { GL_MAX_TEXTURE_UNITS, CONTEXT_INT(Const.MaxTextureUnits), NO_EXTRA }, - { GL_CLIENT_ACTIVE_TEXTURE, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA }, - /* GL_ARB_texture_cube_map */ { GL_TEXTURE_CUBE_MAP_ARB, LOC_CUSTOM, TYPE_BOOLEAN, 0, NO_EXTRA }, /* S, T, and R are always set at the same time */ @@ -646,132 +515,18 @@ static const struct value_desc values[] = { CONTEXT_BOOL(Point.PointSprite), extra_NV_point_sprite_ARB_point_sprite }, - /* GL_ARB_fragment_shader */ - { GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB, - CONTEXT_INT(Const.FragmentProgram.MaxUniformComponents), - extra_ARB_fragment_shader }, - - /* GL_ARB_vertex_shader */ - { GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB, - CONTEXT_INT(Const.VertexProgram.MaxUniformComponents), - extra_ARB_vertex_shader }, - { GL_MAX_VARYING_FLOATS_ARB, LOC_CUSTOM, TYPE_INT, 0, - extra_ARB_vertex_shader }, - - /* GL_EXT_texture_lod_bias */ - { GL_MAX_TEXTURE_LOD_BIAS_EXT, CONTEXT_FLOAT(Const.MaxTextureLodBias), - NO_EXTRA }, - /* GL_EXT_texture_filter_anisotropic */ { GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, CONTEXT_FLOAT(Const.MaxTextureMaxAnisotropy), extra_EXT_texture_filter_anisotropic }, -#endif /* FEATURE_GL || FEATURE_ES1 */ -#if FEATURE_ES1 - { 0, 0, TYPE_API_MASK, API_OPENGLES_BIT }, - /* XXX: OES_matrix_get */ - { GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES }, - { GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES }, - { GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES }, - - /* OES_point_size_array */ - { GL_POINT_SIZE_ARRAY_OES, ARRAY_FIELD(VertexAttrib[VERT_ATTRIB_POINT_SIZE].Enabled, TYPE_BOOLEAN) }, - { GL_POINT_SIZE_ARRAY_TYPE_OES, ARRAY_FIELD(VertexAttrib[VERT_ATTRIB_POINT_SIZE].Type, TYPE_ENUM) }, - { GL_POINT_SIZE_ARRAY_STRIDE_OES, ARRAY_FIELD(VertexAttrib[VERT_ATTRIB_POINT_SIZE].Stride, TYPE_INT) }, - { GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES, LOC_CUSTOM, TYPE_INT, 0 }, -#endif /* FEATURE_ES1 */ - -#if FEATURE_GL || FEATURE_ES2 - { 0, 0, TYPE_API_MASK, API_OPENGL_BIT | API_OPENGLES2_BIT, NO_EXTRA }, - { GL_MAX_TEXTURE_COORDS_ARB, /* == GL_MAX_TEXTURE_COORDS_NV */ - CONTEXT_INT(Const.MaxTextureCoordUnits), - extra_ARB_fragment_program_NV_fragment_program }, - - /* GL_ARB_draw_buffers */ - { GL_MAX_DRAW_BUFFERS_ARB, CONTEXT_INT(Const.MaxDrawBuffers), NO_EXTRA }, - - /* GL_EXT_framebuffer_object / GL_NV_fbo_color_attachments */ - { GL_MAX_COLOR_ATTACHMENTS, CONTEXT_INT(Const.MaxColorAttachments), - extra_EXT_framebuffer_object }, - - /* GL_ARB_draw_buffers / GL_NV_draw_buffers (for ES 2.0) */ - { GL_DRAW_BUFFER0_ARB, BUFFER_ENUM(ColorDrawBuffer[0]), NO_EXTRA }, - { GL_DRAW_BUFFER1_ARB, BUFFER_ENUM(ColorDrawBuffer[1]), - extra_valid_draw_buffer }, - { GL_DRAW_BUFFER2_ARB, BUFFER_ENUM(ColorDrawBuffer[2]), - extra_valid_draw_buffer }, - { GL_DRAW_BUFFER3_ARB, BUFFER_ENUM(ColorDrawBuffer[3]), - extra_valid_draw_buffer }, - { GL_DRAW_BUFFER4_ARB, BUFFER_ENUM(ColorDrawBuffer[4]), - extra_valid_draw_buffer }, - { GL_DRAW_BUFFER5_ARB, BUFFER_ENUM(ColorDrawBuffer[5]), - extra_valid_draw_buffer }, - { GL_DRAW_BUFFER6_ARB, BUFFER_ENUM(ColorDrawBuffer[6]), - extra_valid_draw_buffer }, - { GL_DRAW_BUFFER7_ARB, BUFFER_ENUM(ColorDrawBuffer[7]), - extra_valid_draw_buffer }, - - { GL_BLEND_COLOR_EXT, LOC_CUSTOM, TYPE_FLOATN_4, 0, extra_new_frag_clamp }, - /* GL_ARB_fragment_program */ - { GL_MAX_TEXTURE_IMAGE_UNITS_ARB, /* == GL_MAX_TEXTURE_IMAGE_UNITS_NV */ - CONTEXT_INT(Const.MaxTextureImageUnits), - extra_ARB_fragment_program_NV_fragment_program }, - { GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB, - CONTEXT_INT(Const.MaxVertexTextureImageUnits), extra_ARB_vertex_shader }, - { GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB, - CONTEXT_INT(Const.MaxCombinedTextureImageUnits), - extra_ARB_vertex_shader }, - - /* GL_ARB_shader_objects - * Actually, this token isn't part of GL_ARB_shader_objects, but is - * close enough for now. */ - { GL_CURRENT_PROGRAM, LOC_CUSTOM, TYPE_INT, 0, extra_ARB_shader_objects }, - - /* OpenGL 2.0 */ - { GL_STENCIL_BACK_FUNC, CONTEXT_ENUM(Stencil.Function[1]), NO_EXTRA }, - { GL_STENCIL_BACK_VALUE_MASK, CONTEXT_INT(Stencil.ValueMask[1]), NO_EXTRA }, - { GL_STENCIL_BACK_WRITEMASK, CONTEXT_INT(Stencil.WriteMask[1]), NO_EXTRA }, - { GL_STENCIL_BACK_REF, CONTEXT_INT(Stencil.Ref[1]), NO_EXTRA }, - { GL_STENCIL_BACK_FAIL, CONTEXT_ENUM(Stencil.FailFunc[1]), NO_EXTRA }, - { GL_STENCIL_BACK_PASS_DEPTH_FAIL, CONTEXT_ENUM(Stencil.ZFailFunc[1]), NO_EXTRA }, - { GL_STENCIL_BACK_PASS_DEPTH_PASS, CONTEXT_ENUM(Stencil.ZPassFunc[1]), NO_EXTRA }, - - { GL_MAX_VERTEX_ATTRIBS_ARB, - CONTEXT_INT(Const.VertexProgram.MaxAttribs), - extra_ARB_vertex_program_version_es2 }, + { GL_BLEND_COLOR_EXT, LOC_CUSTOM, TYPE_FLOATN_4, 0, NO_EXTRA }, /* OES_texture_3D */ { GL_TEXTURE_BINDING_3D, LOC_CUSTOM, TYPE_INT, TEXTURE_3D_INDEX, NO_EXTRA }, { GL_MAX_3D_TEXTURE_SIZE, LOC_CUSTOM, TYPE_INT, offsetof(struct gl_context, Const.Max3DTextureLevels), NO_EXTRA }, - /* GL_ARB_fragment_program/OES_standard_derivatives */ - { GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB, - CONTEXT_ENUM(Hint.FragmentShaderDerivative), extra_ARB_fragment_shader }, -#endif /* FEATURE_GL || FEATURE_ES2 */ - -#if FEATURE_ES2 - /* Enums unique to OpenGL ES 2.0 */ - { 0, 0, TYPE_API_MASK, API_OPENGLES2_BIT, NO_EXTRA }, - { GL_MAX_FRAGMENT_UNIFORM_VECTORS, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA }, - { GL_MAX_VARYING_VECTORS, CONTEXT_INT(Const.MaxVarying), NO_EXTRA }, - { GL_MAX_VERTEX_UNIFORM_VECTORS, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA }, - { GL_SHADER_COMPILER, CONST(1), NO_EXTRA }, - /* OES_get_program_binary */ - { GL_NUM_SHADER_BINARY_FORMATS, CONST(0), NO_EXTRA }, - { GL_SHADER_BINARY_FORMATS, CONST(0), NO_EXTRA }, -#endif /* FEATURE_ES2 */ - - /* GL_OES_EGL_image_external */ - { GL_TEXTURE_BINDING_EXTERNAL_OES, LOC_CUSTOM, - TYPE_INT, TEXTURE_EXTERNAL_INDEX, extra_OES_EGL_image_external }, - { GL_TEXTURE_EXTERNAL_OES, LOC_CUSTOM, - TYPE_BOOLEAN, 0, extra_OES_EGL_image_external }, - -#if FEATURE_GL - /* Remaining enums are only in OpenGL */ - { 0, 0, TYPE_API_MASK, API_OPENGL_BIT, NO_EXTRA }, { GL_ACCUM_RED_BITS, BUFFER_INT(Visual.accumRedBits), NO_EXTRA }, { GL_ACCUM_GREEN_BITS, BUFFER_INT(Visual.accumGreenBits), NO_EXTRA }, { GL_ACCUM_BLUE_BITS, BUFFER_INT(Visual.accumBlueBits), NO_EXTRA }, @@ -803,7 +558,7 @@ static const struct value_desc values[] = { { GL_DEPTH_BIAS, CONTEXT_FLOAT(Pixel.DepthBias), NO_EXTRA }, { GL_DEPTH_SCALE, CONTEXT_FLOAT(Pixel.DepthScale), NO_EXTRA }, { GL_DOUBLEBUFFER, BUFFER_INT(Visual.doubleBufferMode), NO_EXTRA }, - { GL_DRAW_BUFFER, BUFFER_ENUM(ColorDrawBuffer[0]), NO_EXTRA }, + { GL_DRAW_BUFFER, BUFFER_ENUM(ColorDrawBuffer), NO_EXTRA }, { GL_EDGE_FLAG, LOC_CUSTOM, TYPE_BOOLEAN, 0, NO_EXTRA }, { GL_FEEDBACK_BUFFER_SIZE, CONTEXT_INT(Feedback.BufferSize), NO_EXTRA }, { GL_FEEDBACK_BUFFER_TYPE, CONTEXT_ENUM(Feedback.Type), NO_EXTRA }, @@ -894,16 +649,8 @@ static const struct value_desc values[] = { { GL_TEXTURE_1D, LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA }, { GL_TEXTURE_3D, LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA }, - { GL_TEXTURE_1D_ARRAY_EXT, LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA }, - { GL_TEXTURE_2D_ARRAY_EXT, LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA }, { GL_TEXTURE_BINDING_1D, LOC_CUSTOM, TYPE_INT, TEXTURE_1D_INDEX, NO_EXTRA }, - { GL_TEXTURE_BINDING_1D_ARRAY, LOC_CUSTOM, TYPE_INT, - TEXTURE_1D_ARRAY_INDEX, extra_MESA_texture_array }, - { GL_TEXTURE_BINDING_2D_ARRAY, LOC_CUSTOM, TYPE_INT, - TEXTURE_1D_ARRAY_INDEX, extra_MESA_texture_array }, - { GL_MAX_ARRAY_TEXTURE_LAYERS_EXT, - CONTEXT_INT(Const.MaxArrayTextureLayers), extra_MESA_texture_array }, { GL_TEXTURE_GEN_S, LOC_TEXUNIT, TYPE_BIT_0, offsetof(struct gl_texture_unit, TexGenEnabled), NO_EXTRA }, @@ -936,9 +683,6 @@ static const struct value_desc values[] = { { GL_EDGE_FLAG_ARRAY_STRIDE, ARRAY_INT(VertexAttrib[VERT_ATTRIB_EDGEFLAG].Stride), NO_EXTRA }, { GL_EDGE_FLAG_ARRAY_COUNT_EXT, CONST(0), NO_EXTRA }, - /* GL_ARB_texture_compression */ - { GL_TEXTURE_COMPRESSION_HINT_ARB, CONTEXT_INT(Hint.TextureCompression), NO_EXTRA }, - /* GL_EXT_compiled_vertex_array */ { GL_ARRAY_ELEMENT_LOCK_FIRST_EXT, CONTEXT_INT(Array.LockFirst), extra_EXT_compiled_vertex_array }, @@ -953,8 +697,6 @@ static const struct value_desc values[] = { { GL_TRANSPOSE_TEXTURE_MATRIX_ARB, CONTEXT_MATRIX_T(TextureMatrixStack), NO_EXTRA }, /* GL_EXT_secondary_color */ - { GL_COLOR_SUM_EXT, CONTEXT_BOOL(Fog.ColorSumEnabled), - extra_EXT_secondary_color_ARB_vertex_program }, { GL_CURRENT_SECONDARY_COLOR_EXT, CONTEXT_FIELD(Current.Attrib[VERT_ATTRIB_COLOR1][0], TYPE_FLOATN_4), extra_EXT_secondary_color_flush_current }, @@ -995,107 +737,11 @@ static const struct value_desc values[] = { { GL_POINT_SPRITE_COORD_ORIGIN, CONTEXT_ENUM(Point.SpriteOrigin), extra_NV_point_sprite_ARB_point_sprite }, - /* GL_NV_vertex_program */ - { GL_VERTEX_PROGRAM_BINDING_NV, LOC_CUSTOM, TYPE_INT, 0, - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY0_NV, ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_GENERIC(0)].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY1_NV, ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_GENERIC(1)].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY2_NV, ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_GENERIC(2)].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY3_NV, ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_GENERIC(3)].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY4_NV, ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_GENERIC(4)].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY5_NV, ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_GENERIC(5)].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY6_NV, ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_GENERIC(6)].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY7_NV, ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_GENERIC(7)].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY8_NV, ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_GENERIC(8)].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY9_NV, ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_GENERIC(9)].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY10_NV, ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_GENERIC(10)].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY11_NV, ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_GENERIC(11)].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY12_NV, ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_GENERIC(12)].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY13_NV, ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_GENERIC(13)].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY14_NV, ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_GENERIC(14)].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY15_NV, ARRAY_BOOL(VertexAttrib[VERT_ATTRIB_GENERIC(15)].Enabled), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB0_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[0]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB1_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[1]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB2_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[2]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB3_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[3]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB4_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[4]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB5_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[5]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB6_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[6]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB7_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[7]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB8_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[8]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB9_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[9]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB10_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[10]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB11_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[11]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB12_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[12]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB13_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[13]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB14_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[14]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB15_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[15]), - extra_NV_vertex_program }, - - /* GL_NV_fragment_program */ - { GL_FRAGMENT_PROGRAM_NV, CONTEXT_BOOL(FragmentProgram.Enabled), - extra_NV_fragment_program }, - { GL_FRAGMENT_PROGRAM_BINDING_NV, LOC_CUSTOM, TYPE_INT, 0, - extra_NV_fragment_program }, - { GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV, - CONST(MAX_NV_FRAGMENT_PROGRAM_PARAMS), - extra_NV_fragment_program }, - - /* GL_NV_texture_rectangle */ - { GL_TEXTURE_RECTANGLE_NV, - LOC_CUSTOM, TYPE_BOOLEAN, 0, extra_NV_texture_rectangle }, - { GL_TEXTURE_BINDING_RECTANGLE_NV, - LOC_CUSTOM, TYPE_INT, TEXTURE_RECT_INDEX, extra_NV_texture_rectangle }, - { GL_MAX_RECTANGLE_TEXTURE_SIZE_NV, - CONTEXT_INT(Const.MaxTextureRectSize), extra_NV_texture_rectangle }, - - /* GL_EXT_stencil_two_side */ - { GL_STENCIL_TEST_TWO_SIDE_EXT, CONTEXT_BOOL(Stencil.TestTwoSide), - extra_EXT_stencil_two_side }, - { GL_ACTIVE_STENCIL_FACE_EXT, LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA }, - /* GL_NV_light_max_exponent */ { GL_MAX_SHININESS_NV, CONTEXT_FLOAT(Const.MaxShininess), extra_NV_light_max_exponent }, { GL_MAX_SPOT_EXPONENT_NV, CONTEXT_FLOAT(Const.MaxSpotExponent), extra_NV_light_max_exponent }, - - /* GL_NV_primitive_restart */ - { GL_PRIMITIVE_RESTART_NV, CONTEXT_BOOL(Array.PrimitiveRestart), - extra_NV_primitive_restart }, - { GL_PRIMITIVE_RESTART_INDEX_NV, CONTEXT_INT(Array.RestartIndex), - extra_NV_primitive_restart }, /* GL_ARB_vertex_buffer_object */ { GL_INDEX_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, @@ -1107,197 +753,30 @@ static const struct value_desc values[] = { { GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, offsetof(struct gl_array_object, VertexAttrib[VERT_ATTRIB_FOG].BufferObj), NO_EXTRA }, - /* GL_EXT_pixel_buffer_object */ - { GL_PIXEL_PACK_BUFFER_BINDING_EXT, LOC_CUSTOM, TYPE_INT, 0, - extra_EXT_pixel_buffer_object }, - { GL_PIXEL_UNPACK_BUFFER_BINDING_EXT, LOC_CUSTOM, TYPE_INT, 0, - extra_EXT_pixel_buffer_object }, - - /* GL_ARB_vertex_program */ - { GL_VERTEX_PROGRAM_ARB, /* == GL_VERTEX_PROGRAM_NV */ - CONTEXT_BOOL(VertexProgram.Enabled), - extra_ARB_vertex_program_NV_vertex_program }, - { GL_VERTEX_PROGRAM_POINT_SIZE_ARB, /* == GL_VERTEX_PROGRAM_POINT_SIZE_NV*/ - CONTEXT_BOOL(VertexProgram.PointSizeEnabled), - extra_ARB_vertex_program_NV_vertex_program }, - { GL_VERTEX_PROGRAM_TWO_SIDE_ARB, /* == GL_VERTEX_PROGRAM_TWO_SIDE_NV */ - CONTEXT_BOOL(VertexProgram.TwoSideEnabled), - extra_ARB_vertex_program_NV_vertex_program }, - { GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB, /* == GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */ - CONTEXT_INT(Const.MaxProgramMatrixStackDepth), - extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program }, - { GL_MAX_PROGRAM_MATRICES_ARB, /* == GL_MAX_TRACK_MATRICES_NV */ - CONTEXT_INT(Const.MaxProgramMatrices), - extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program }, - { GL_CURRENT_MATRIX_STACK_DEPTH_ARB, /* == GL_CURRENT_MATRIX_STACK_DEPTH_NV */ - LOC_CUSTOM, TYPE_INT, 0, - extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program }, - - { GL_CURRENT_MATRIX_ARB, /* == GL_CURRENT_MATRIX_NV */ - LOC_CUSTOM, TYPE_MATRIX, 0, - extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program }, - { GL_TRANSPOSE_CURRENT_MATRIX_ARB, /* == GL_CURRENT_MATRIX_NV */ - LOC_CUSTOM, TYPE_MATRIX, 0, - extra_ARB_vertex_program_ARB_fragment_program }, - - { GL_PROGRAM_ERROR_POSITION_ARB, /* == GL_PROGRAM_ERROR_POSITION_NV */ - CONTEXT_INT(Program.ErrorPos), - extra_NV_vertex_program_ARB_vertex_program_ARB_fragment_program_NV_vertex_program }, - - /* GL_ARB_fragment_program */ - { GL_FRAGMENT_PROGRAM_ARB, CONTEXT_BOOL(FragmentProgram.Enabled), - extra_ARB_fragment_program }, - /* GL_EXT_depth_bounds_test */ { GL_DEPTH_BOUNDS_TEST_EXT, CONTEXT_BOOL(Depth.BoundsTest), extra_EXT_depth_bounds_test }, { GL_DEPTH_BOUNDS_EXT, CONTEXT_FLOAT2(Depth.BoundsMin), extra_EXT_depth_bounds_test }, - /* GL_ARB_depth_clamp*/ - { GL_DEPTH_CLAMP, CONTEXT_BOOL(Transform.DepthClamp), - extra_ARB_depth_clamp }, - - /* GL_ATI_fragment_shader */ - { GL_NUM_FRAGMENT_REGISTERS_ATI, CONST(6), extra_ATI_fragment_shader }, - { GL_NUM_FRAGMENT_CONSTANTS_ATI, CONST(8), extra_ATI_fragment_shader }, - { GL_NUM_PASSES_ATI, CONST(2), extra_ATI_fragment_shader }, - { GL_NUM_INSTRUCTIONS_PER_PASS_ATI, CONST(8), extra_ATI_fragment_shader }, - { GL_NUM_INSTRUCTIONS_TOTAL_ATI, CONST(16), extra_ATI_fragment_shader }, - { GL_COLOR_ALPHA_PAIRING_ATI, CONST(GL_TRUE), extra_ATI_fragment_shader }, - { GL_NUM_LOOPBACK_COMPONENTS_ATI, CONST(3), extra_ATI_fragment_shader }, - { GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI, - CONST(3), extra_ATI_fragment_shader }, - - /* GL_EXT_framebuffer_blit - * NOTE: GL_DRAW_FRAMEBUFFER_BINDING_EXT == GL_FRAMEBUFFER_BINDING_EXT */ - { GL_READ_FRAMEBUFFER_BINDING_EXT, LOC_CUSTOM, TYPE_INT, 0, - extra_EXT_framebuffer_blit }, - - /* GL_EXT_provoking_vertex */ - { GL_PROVOKING_VERTEX_EXT, - CONTEXT_ENUM(Light.ProvokingVertex), extra_EXT_provoking_vertex }, - { GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT, - CONTEXT_BOOL(Const.QuadsFollowProvokingVertexConvention), - extra_EXT_provoking_vertex }, - - /* GL_ARB_framebuffer_object */ - { GL_MAX_SAMPLES, CONTEXT_INT(Const.MaxSamples), - extra_ARB_framebuffer_object_EXT_framebuffer_multisample }, - /* GL_APPLE_vertex_array_object */ { GL_VERTEX_ARRAY_BINDING_APPLE, ARRAY_INT(Name), extra_APPLE_vertex_array_object }, - /* GL_ARB_seamless_cube_map */ - { GL_TEXTURE_CUBE_MAP_SEAMLESS, - CONTEXT_BOOL(Texture.CubeMapSeamless), extra_ARB_seamless_cube_map }, - - /* GL_ARB_sync */ - { GL_MAX_SERVER_WAIT_TIMEOUT, - CONTEXT_INT64(Const.MaxServerWaitTimeout), extra_ARB_sync }, - /* GL_EXT_texture_integer */ { GL_RGBA_INTEGER_MODE_EXT, BUFFER_BOOL(_IntegerColor), extra_EXT_texture_integer }, - /* GL_EXT_transform_feedback */ - { GL_TRANSFORM_FEEDBACK_BUFFER_BINDING, LOC_CUSTOM, TYPE_INT, 0, - extra_EXT_transform_feedback }, - { GL_RASTERIZER_DISCARD, CONTEXT_BOOL(RasterDiscard), - extra_EXT_transform_feedback }, - { GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS, - CONTEXT_INT(Const.MaxTransformFeedbackInterleavedComponents), - extra_EXT_transform_feedback }, - { GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, - CONTEXT_INT(Const.MaxTransformFeedbackSeparateAttribs), - extra_EXT_transform_feedback }, - { GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS, - CONTEXT_INT(Const.MaxTransformFeedbackSeparateComponents), - extra_EXT_transform_feedback }, - - /* GL_ARB_transform_feedback2 */ - { GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED, LOC_CUSTOM, TYPE_BOOLEAN, 0, - extra_ARB_transform_feedback2 }, - { GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE, LOC_CUSTOM, TYPE_BOOLEAN, 0, - extra_ARB_transform_feedback2 }, - { GL_TRANSFORM_FEEDBACK_BINDING, LOC_CUSTOM, TYPE_INT, 0, - extra_ARB_transform_feedback2 }, - - /* GL_ARB_geometry_shader4 */ - { GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB, - CONTEXT_INT(Const.MaxGeometryTextureImageUnits), - extra_ARB_geometry_shader4 }, - { GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB, - CONTEXT_INT(Const.MaxGeometryOutputVertices), - extra_ARB_geometry_shader4 }, - { GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB, - CONTEXT_INT(Const.MaxGeometryTotalOutputComponents), - extra_ARB_geometry_shader4 }, - { GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB, - CONTEXT_INT(Const.GeometryProgram.MaxUniformComponents), - extra_ARB_geometry_shader4 }, - { GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB, - CONTEXT_INT(Const.MaxGeometryVaryingComponents), - extra_ARB_geometry_shader4 }, - { GL_MAX_VERTEX_VARYING_COMPONENTS_ARB, - CONTEXT_INT(Const.MaxVertexVaryingComponents), - extra_ARB_geometry_shader4 }, - - /* GL_ARB_color_buffer_float */ - { GL_RGBA_FLOAT_MODE_ARB, BUFFER_FIELD(Visual.floatMode, TYPE_BOOLEAN), 0 }, - - /* GL_EXT_gpu_shader4 / GLSL 1.30 */ - { GL_MIN_PROGRAM_TEXEL_OFFSET, - CONTEXT_INT(Const.MinProgramTexelOffset), - extra_GLSL_130 }, - { GL_MAX_PROGRAM_TEXEL_OFFSET, - CONTEXT_INT(Const.MaxProgramTexelOffset), - extra_GLSL_130 }, - - /* GL_ARB_texture_buffer_object */ - { GL_MAX_TEXTURE_BUFFER_SIZE_ARB, CONTEXT_INT(Const.MaxTextureBufferSize), - extra_ARB_texture_buffer_object }, - { GL_TEXTURE_BINDING_BUFFER_ARB, LOC_CUSTOM, TYPE_INT, 0, - extra_ARB_texture_buffer_object }, - { GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB, LOC_CUSTOM, TYPE_INT, - TEXTURE_BUFFER_INDEX, extra_ARB_texture_buffer_object }, - { GL_TEXTURE_BUFFER_FORMAT_ARB, LOC_CUSTOM, TYPE_INT, 0, - extra_ARB_texture_buffer_object }, - { GL_TEXTURE_BUFFER_ARB, LOC_CUSTOM, TYPE_INT, 0, - extra_ARB_texture_buffer_object }, - - /* GL_ARB_sampler_objects / GL 3.3 */ - { GL_SAMPLER_BINDING, - LOC_CUSTOM, TYPE_INT, GL_SAMPLER_BINDING, extra_ARB_sampler_objects }, - /* GL 3.0 */ { GL_NUM_EXTENSIONS, LOC_CUSTOM, TYPE_INT, 0, extra_version_30 }, { GL_MAJOR_VERSION, CONTEXT_INT(VersionMajor), extra_version_30 }, { GL_MINOR_VERSION, CONTEXT_INT(VersionMinor), extra_version_30 }, { GL_CONTEXT_FLAGS, CONTEXT_INT(Const.ContextFlags), extra_version_30 }, - - /* GL3.0 / GL_EXT_framebuffer_sRGB */ - { GL_FRAMEBUFFER_SRGB_EXT, CONTEXT_BOOL(Color.sRGBEnabled), extra_EXT_framebuffer_sRGB }, - { GL_FRAMEBUFFER_SRGB_CAPABLE_EXT, BUFFER_INT(Visual.sRGBCapable), extra_EXT_framebuffer_sRGB }, - - /* GL 3.1 */ - /* NOTE: different enum values for GL_PRIMITIVE_RESTART_NV - * vs. GL_PRIMITIVE_RESTART! - */ - { GL_PRIMITIVE_RESTART, CONTEXT_BOOL(Array.PrimitiveRestart), - extra_version_31 }, - { GL_PRIMITIVE_RESTART_INDEX, CONTEXT_INT(Array.RestartIndex), - extra_version_31 }, /* GL 3.2 */ { GL_CONTEXT_PROFILE_MASK, CONTEXT_INT(Const.ProfileMask), extra_version_32 }, - - /* GL_ARB_robustness */ - { GL_RESET_NOTIFICATION_STRATEGY_ARB, CONTEXT_ENUM(Const.ResetStrategy), NO_EXTRA }, -#endif /* FEATURE_GL */ }; /* All we need now is a way to look up the value struct from the enum. @@ -1366,18 +845,10 @@ print_table_stats(void) void _mesa_init_get_hash(struct gl_context *ctx) { int i, hash, index, mask; - int api_mask = 0, api_bit; mask = Elements(table) - 1; - api_bit = 1 << ctx->API; for (i = 0; i < Elements(values); i++) { - if (values[i].type == TYPE_API_MASK) { - api_mask = values[i].offset; - continue; - } - if (!(api_mask & api_bit)) - continue; hash = (values[i].pname * prime_factor) & mask; while (1) { @@ -1416,17 +887,13 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu { struct gl_buffer_object **buffer_obj; struct gl_client_array *array; - GLuint unit, *p; + GLuint *p; switch (d->pname) { case GL_TEXTURE_1D: case GL_TEXTURE_2D: case GL_TEXTURE_3D: - case GL_TEXTURE_1D_ARRAY_EXT: - case GL_TEXTURE_2D_ARRAY_EXT: case GL_TEXTURE_CUBE_MAP_ARB: - case GL_TEXTURE_RECTANGLE_NV: - case GL_TEXTURE_EXTERNAL_OES: v->value_bool = _mesa_IsEnabled(d->pname); break; @@ -1437,26 +904,24 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu break; case GL_CURRENT_RASTER_TEXTURE_COORDS: - unit = ctx->Texture.CurrentUnit; - v->value_float_4[0] = ctx->Current.RasterTexCoords[unit][0]; - v->value_float_4[1] = ctx->Current.RasterTexCoords[unit][1]; - v->value_float_4[2] = ctx->Current.RasterTexCoords[unit][2]; - v->value_float_4[3] = ctx->Current.RasterTexCoords[unit][3]; + v->value_float_4[0] = ctx->Current.RasterTexCoords[0]; + v->value_float_4[1] = ctx->Current.RasterTexCoords[1]; + v->value_float_4[2] = ctx->Current.RasterTexCoords[2]; + v->value_float_4[3] = ctx->Current.RasterTexCoords[3]; break; case GL_CURRENT_TEXTURE_COORDS: - unit = ctx->Texture.CurrentUnit; - v->value_float_4[0] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][0]; - v->value_float_4[1] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][1]; - v->value_float_4[2] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][2]; - v->value_float_4[3] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][3]; + v->value_float_4[0] = ctx->Current.Attrib[VERT_ATTRIB_TEX][0]; + v->value_float_4[1] = ctx->Current.Attrib[VERT_ATTRIB_TEX][1]; + v->value_float_4[2] = ctx->Current.Attrib[VERT_ATTRIB_TEX][2]; + v->value_float_4[3] = ctx->Current.Attrib[VERT_ATTRIB_TEX][3]; break; case GL_COLOR_WRITEMASK: - v->value_int_4[0] = ctx->Color.ColorMask[0][RCOMP] ? 1 : 0; - v->value_int_4[1] = ctx->Color.ColorMask[0][GCOMP] ? 1 : 0; - v->value_int_4[2] = ctx->Color.ColorMask[0][BCOMP] ? 1 : 0; - v->value_int_4[3] = ctx->Color.ColorMask[0][ACOMP] ? 1 : 0; + v->value_int_4[0] = ctx->Color.ColorMask[RCOMP] ? 1 : 0; + v->value_int_4[1] = ctx->Color.ColorMask[GCOMP] ? 1 : 0; + v->value_int_4[2] = ctx->Color.ColorMask[BCOMP] ? 1 : 0; + v->value_int_4[3] = ctx->Color.ColorMask[ACOMP] ? 1 : 0; break; case GL_EDGE_FLAG: @@ -1475,29 +940,20 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu break; case GL_TEXTURE_STACK_DEPTH: - unit = ctx->Texture.CurrentUnit; - v->value_int = ctx->TextureMatrixStack[unit].Depth + 1; + v->value_int = ctx->TextureMatrixStack.Depth + 1; break; case GL_TEXTURE_MATRIX: - unit = ctx->Texture.CurrentUnit; - v->value_matrix = ctx->TextureMatrixStack[unit].Top; + v->value_matrix = ctx->TextureMatrixStack.Top; break; case GL_TEXTURE_COORD_ARRAY: case GL_TEXTURE_COORD_ARRAY_SIZE: case GL_TEXTURE_COORD_ARRAY_TYPE: case GL_TEXTURE_COORD_ARRAY_STRIDE: - array = &ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_TEX(ctx->Array.ActiveTexture)]; + array = &ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_TEX]; v->value_int = *(GLuint *) ((char *) array + d->offset); break; - case GL_ACTIVE_TEXTURE_ARB: - v->value_int = GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit; - break; - case GL_CLIENT_ACTIVE_TEXTURE_ARB: - v->value_int = GL_TEXTURE0_ARB + ctx->Array.ActiveTexture; - break; - case GL_MODELVIEW_STACK_DEPTH: case GL_PROJECTION_STACK_DEPTH: v->value_int = *(GLint *) ((char *) ctx + d->offset) + 1; @@ -1537,30 +993,26 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu v->value_int_4[3] = ctx->Viewport.Height; break; - case GL_ACTIVE_STENCIL_FACE_EXT: - v->value_enum = ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT; - break; - case GL_STENCIL_FAIL: - v->value_enum = ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]; + v->value_enum = ctx->Stencil.FailFunc; break; case GL_STENCIL_FUNC: - v->value_enum = ctx->Stencil.Function[ctx->Stencil.ActiveFace]; + v->value_enum = ctx->Stencil.Function; break; case GL_STENCIL_PASS_DEPTH_FAIL: - v->value_enum = ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]; + v->value_enum = ctx->Stencil.ZFailFunc; break; case GL_STENCIL_PASS_DEPTH_PASS: - v->value_enum = ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]; + v->value_enum = ctx->Stencil.ZPassFunc; break; case GL_STENCIL_REF: - v->value_int = ctx->Stencil.Ref[ctx->Stencil.ActiveFace]; + v->value_int = ctx->Stencil.Ref; break; case GL_STENCIL_VALUE_MASK: - v->value_int = ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]; + v->value_int = ctx->Stencil.ValueMask; break; case GL_STENCIL_WRITEMASK: - v->value_int = ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]; + v->value_int = ctx->Stencil.WriteMask; break; case GL_NUM_EXTENSIONS: @@ -1582,32 +1034,14 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu v->value_matrix = ctx->CurrentStack->Top; break; - case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB: - v->value_int = _mesa_get_compressed_formats(ctx, NULL); - break; - case GL_COMPRESSED_TEXTURE_FORMATS_ARB: - v->value_int_n.n = - _mesa_get_compressed_formats(ctx, v->value_int_n.ints); - ASSERT(v->value_int_n.n <= 100); - break; - - case GL_MAX_VARYING_FLOATS_ARB: - v->value_int = ctx->Const.MaxVarying * 4; - break; - /* Various object names */ case GL_TEXTURE_BINDING_1D: case GL_TEXTURE_BINDING_2D: case GL_TEXTURE_BINDING_3D: - case GL_TEXTURE_BINDING_1D_ARRAY_EXT: - case GL_TEXTURE_BINDING_2D_ARRAY_EXT: case GL_TEXTURE_BINDING_CUBE_MAP_ARB: - case GL_TEXTURE_BINDING_RECTANGLE_NV: - case GL_TEXTURE_BINDING_EXTERNAL_OES: - unit = ctx->Texture.CurrentUnit; v->value_int = - ctx->Texture.Unit[unit].CurrentTex[d->offset]->Name; + ctx->Texture.Unit.CurrentTex[d->offset]->Name; break; /* GL_ARB_vertex_buffer_object */ @@ -1627,126 +1061,27 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu break; case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB: v->value_int = - ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_TEX(ctx->Array.ActiveTexture)].BufferObj->Name; + ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_TEX].BufferObj->Name; break; case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB: v->value_int = ctx->Array.ArrayObj->ElementArrayBufferObj->Name; break; - /* ARB_copy_buffer */ - case GL_COPY_READ_BUFFER: - v->value_int = ctx->CopyReadBuffer->Name; - break; - case GL_COPY_WRITE_BUFFER: - v->value_int = ctx->CopyWriteBuffer->Name; - break; - - case GL_FRAGMENT_PROGRAM_BINDING_NV: - v->value_int = - ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0; - break; - case GL_VERTEX_PROGRAM_BINDING_NV: - v->value_int = - ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0; - break; - case GL_PIXEL_PACK_BUFFER_BINDING_EXT: - v->value_int = ctx->Pack.BufferObj->Name; - break; - case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT: - v->value_int = ctx->Unpack.BufferObj->Name; - break; - case GL_TRANSFORM_FEEDBACK_BUFFER_BINDING: - v->value_int = ctx->TransformFeedback.CurrentBuffer->Name; - break; - case GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED: - v->value_int = ctx->TransformFeedback.CurrentObject->Paused; - break; - case GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE: - v->value_int = ctx->TransformFeedback.CurrentObject->Active; - break; - case GL_TRANSFORM_FEEDBACK_BINDING: - v->value_int = ctx->TransformFeedback.CurrentObject->Name; - break; - case GL_CURRENT_PROGRAM: - v->value_int = - ctx->Shader.ActiveProgram ? ctx->Shader.ActiveProgram->Name : 0; - break; - case GL_READ_FRAMEBUFFER_BINDING_EXT: - v->value_int = ctx->ReadBuffer->Name; - break; - case GL_RENDERBUFFER_BINDING_EXT: - v->value_int = - ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0; - break; - case GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES: - v->value_int = ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_POINT_SIZE].BufferObj->Name; - break; - case GL_FOG_COLOR: - if(ctx->Color._ClampFragmentColor) - COPY_4FV(v->value_float_4, ctx->Fog.Color); - else - COPY_4FV(v->value_float_4, ctx->Fog.ColorUnclamped); + COPY_4FV(v->value_float_4, ctx->Fog.Color); break; case GL_COLOR_CLEAR_VALUE: - if(ctx->Color._ClampFragmentColor) { - v->value_float_4[0] = CLAMP(ctx->Color.ClearColor.f[0], 0.0F, 1.0F); - v->value_float_4[1] = CLAMP(ctx->Color.ClearColor.f[1], 0.0F, 1.0F); - v->value_float_4[2] = CLAMP(ctx->Color.ClearColor.f[2], 0.0F, 1.0F); - v->value_float_4[3] = CLAMP(ctx->Color.ClearColor.f[3], 0.0F, 1.0F); - } else - COPY_4FV(v->value_float_4, ctx->Color.ClearColor.f); + v->value_float_4[0] = ctx->Color.ClearColor.f[0], 0.0F, 1.0F; + v->value_float_4[1] = ctx->Color.ClearColor.f[1], 0.0F, 1.0F; + v->value_float_4[2] = ctx->Color.ClearColor.f[2], 0.0F, 1.0F; + v->value_float_4[3] = ctx->Color.ClearColor.f[3], 0.0F, 1.0F; break; case GL_BLEND_COLOR_EXT: - if(ctx->Color._ClampFragmentColor) - COPY_4FV(v->value_float_4, ctx->Color.BlendColor); - else - COPY_4FV(v->value_float_4, ctx->Color.BlendColorUnclamped); + COPY_4FV(v->value_float_4, ctx->Color.BlendColor); break; case GL_ALPHA_TEST_REF: - if(ctx->Color._ClampFragmentColor) v->value_float = ctx->Color.AlphaRef; - else - v->value_float = ctx->Color.AlphaRefUnclamped; - break; - case GL_MAX_VERTEX_UNIFORM_VECTORS: - v->value_int = ctx->Const.VertexProgram.MaxUniformComponents / 4; - break; - - case GL_MAX_FRAGMENT_UNIFORM_VECTORS: - v->value_int = ctx->Const.FragmentProgram.MaxUniformComponents / 4; - break; - - /* GL_ARB_texture_buffer_object */ - case GL_TEXTURE_BUFFER_ARB: - v->value_int = ctx->Texture.BufferObject->Name; - break; - case GL_TEXTURE_BINDING_BUFFER_ARB: - unit = ctx->Texture.CurrentUnit; - v->value_int = - ctx->Texture.Unit[unit].CurrentTex[TEXTURE_BUFFER_INDEX]->Name; - break; - case GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB: - { - struct gl_buffer_object *buf = - ctx->Texture.Unit[ctx->Texture.CurrentUnit] - .CurrentTex[TEXTURE_BUFFER_INDEX]->BufferObject; - v->value_int = buf ? buf->Name : 0; - } - break; - case GL_TEXTURE_BUFFER_FORMAT_ARB: - v->value_int = ctx->Texture.Unit[ctx->Texture.CurrentUnit] - .CurrentTex[TEXTURE_BUFFER_INDEX]->BufferObjectFormat; - break; - - /* GL_ARB_sampler_objects */ - case GL_SAMPLER_BINDING: - { - struct gl_sampler_object *samp = - ctx->Texture.Unit[ctx->Texture.CurrentUnit].Sampler; - v->value_int = samp ? samp->Name : 0; - } - break; + break; } } @@ -1794,16 +1129,6 @@ check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d enabled++; } break; - case EXTRA_NEW_FRAG_CLAMP: - if (ctx->NewState & (_NEW_BUFFERS | _NEW_FRAG_CLAMP)) - _mesa_update_state(ctx); - break; - case EXTRA_VERSION_ES2: - if (ctx->API == API_OPENGLES2) { - total++; - enabled++; - } - break; case EXTRA_NEW_BUFFERS: if (ctx->NewState & _NEW_BUFFERS) _mesa_update_state(ctx); @@ -1811,20 +1136,6 @@ check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d case EXTRA_FLUSH_CURRENT: FLUSH_CURRENT(ctx, 0); break; - case EXTRA_VALID_DRAW_BUFFER: - if (d->pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) { - _mesa_error(ctx, GL_INVALID_OPERATION, "%s(draw buffer %u)", - func, d->pname - GL_DRAW_BUFFER0_ARB); - return GL_FALSE; - } - break; - case EXTRA_VALID_TEXTURE_UNIT: - if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) { - _mesa_error(ctx, GL_INVALID_OPERATION, "%s(texture %u)", - func, ctx->Texture.CurrentUnit); - return GL_FALSE; - } - break; case EXTRA_VALID_CLIP_DISTANCE: if (d->pname - GL_CLIP_DISTANCE0 >= ctx->Const.MaxClipPlanes) { _mesa_error(ctx, GL_INVALID_ENUM, "%s(clip distance %u)", @@ -1832,12 +1143,6 @@ check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d return GL_FALSE; } break; - case EXTRA_GLSL_130: - if (ctx->Const.GLSLVersion >= 130) { - total++; - enabled++; - } - break; case EXTRA_END: break; default: /* *e is a offset into the extension struct */ @@ -1894,14 +1199,6 @@ find_value(const char *func, GLenum pname, void **p, union value *v) while (1) { d = &values[table[hash & mask]]; - /* If the enum isn't valid, the hash walk ends with index 0, - * which is the API mask entry at the beginning of values[]. */ - if (unlikely(d->type == TYPE_API_MASK)) { - _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func, - _mesa_lookup_enum_by_nr(pname)); - return &error_value; - } - if (likely(d->pname == pname)) break; @@ -1922,7 +1219,7 @@ find_value(const char *func, GLenum pname, void **p, union value *v) *p = ((char *) ctx->Array.ArrayObj + d->offset); return d; case LOC_TEXUNIT: - unit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; + unit = &ctx->Texture.Unit; *p = ((char *) unit + d->offset); return d; case LOC_CUSTOM: @@ -2218,102 +1515,6 @@ _mesa_GetIntegerv(GLenum pname, GLint *params) } } -#if FEATURE_ARB_sync -void GLAPIENTRY -_mesa_GetInteger64v(GLenum pname, GLint64 *params) -{ - const struct value_desc *d; - union value v; - GLmatrix *m; - int shift, i; - void *p; - GET_CURRENT_CONTEXT(ctx); - - ASSERT_OUTSIDE_BEGIN_END(ctx); - - d = find_value("glGetInteger64v", pname, &p, &v); - switch (d->type) { - case TYPE_INVALID: - break; - case TYPE_CONST: - params[0] = d->offset; - break; - - case TYPE_FLOAT_4: - params[3] = IROUND64(((GLfloat *) p)[3]); - case TYPE_FLOAT_3: - params[2] = IROUND64(((GLfloat *) p)[2]); - case TYPE_FLOAT_2: - params[1] = IROUND64(((GLfloat *) p)[1]); - case TYPE_FLOAT: - params[0] = IROUND64(((GLfloat *) p)[0]); - break; - - case TYPE_FLOATN_4: - params[3] = FLOAT_TO_INT64(((GLfloat *) p)[3]); - case TYPE_FLOATN_3: - params[2] = FLOAT_TO_INT64(((GLfloat *) p)[2]); - case TYPE_FLOATN_2: - params[1] = FLOAT_TO_INT64(((GLfloat *) p)[1]); - case TYPE_FLOATN: - params[0] = FLOAT_TO_INT64(((GLfloat *) p)[0]); - break; - - case TYPE_DOUBLEN: - params[0] = FLOAT_TO_INT64(((GLdouble *) p)[0]); - break; - - case TYPE_INT_4: - params[3] = ((GLint *) p)[3]; - case TYPE_INT_3: - params[2] = ((GLint *) p)[2]; - case TYPE_INT_2: - case TYPE_ENUM_2: - params[1] = ((GLint *) p)[1]; - case TYPE_INT: - case TYPE_ENUM: - params[0] = ((GLint *) p)[0]; - break; - - case TYPE_INT_N: - for (i = 0; i < v.value_int_n.n; i++) - params[i] = INT_TO_BOOLEAN(v.value_int_n.ints[i]); - break; - - case TYPE_INT64: - params[0] = ((GLint64 *) p)[0]; - break; - - case TYPE_BOOLEAN: - params[0] = ((GLboolean*) p)[0]; - break; - - case TYPE_MATRIX: - m = *(GLmatrix **) p; - for (i = 0; i < 16; i++) - params[i] = FLOAT_TO_INT64(m->m[i]); - break; - - case TYPE_MATRIX_T: - m = *(GLmatrix **) p; - for (i = 0; i < 16; i++) - params[i] = FLOAT_TO_INT64(m->m[transpose[i]]); - break; - - case TYPE_BIT_0: - case TYPE_BIT_1: - case TYPE_BIT_2: - case TYPE_BIT_3: - case TYPE_BIT_4: - case TYPE_BIT_5: - case TYPE_BIT_6: - case TYPE_BIT_7: - shift = d->type - TYPE_BIT_0; - params[0] = (*(GLbitfield *) p >> shift) & 1; - break; - } -} -#endif /* FEATURE_ARB_sync */ void GLAPIENTRY _mesa_GetDoublev(GLenum pname, GLdouble *params) @@ -2404,191 +1605,6 @@ _mesa_GetDoublev(GLenum pname, GLdouble *params) } } -static enum value_type -find_value_indexed(const char *func, GLenum pname, int index, union value *v) -{ - GET_CURRENT_CONTEXT(ctx); - - switch (pname) { - - case GL_BLEND: - if (index >= ctx->Const.MaxDrawBuffers) - goto invalid_value; - if (!ctx->Extensions.EXT_draw_buffers2) - goto invalid_enum; - v->value_int = (ctx->Color.BlendEnabled >> index) & 1; - return TYPE_INT; - - case GL_BLEND_SRC: - /* fall-through */ - case GL_BLEND_SRC_RGB: - if (index >= ctx->Const.MaxDrawBuffers) - goto invalid_value; - if (!ctx->Extensions.ARB_draw_buffers_blend) - goto invalid_enum; - v->value_int = ctx->Color.Blend[index].SrcRGB; - return TYPE_INT; - case GL_BLEND_SRC_ALPHA: - if (index >= ctx->Const.MaxDrawBuffers) - goto invalid_value; - if (!ctx->Extensions.ARB_draw_buffers_blend) - goto invalid_enum; - v->value_int = ctx->Color.Blend[index].SrcA; - return TYPE_INT; - case GL_BLEND_DST: - /* fall-through */ - case GL_BLEND_DST_RGB: - if (index >= ctx->Const.MaxDrawBuffers) - goto invalid_value; - if (!ctx->Extensions.ARB_draw_buffers_blend) - goto invalid_enum; - v->value_int = ctx->Color.Blend[index].DstRGB; - return TYPE_INT; - case GL_BLEND_DST_ALPHA: - if (index >= ctx->Const.MaxDrawBuffers) - goto invalid_value; - if (!ctx->Extensions.ARB_draw_buffers_blend) - goto invalid_enum; - v->value_int = ctx->Color.Blend[index].DstA; - return TYPE_INT; - case GL_BLEND_EQUATION_RGB: - if (index >= ctx->Const.MaxDrawBuffers) - goto invalid_value; - if (!ctx->Extensions.ARB_draw_buffers_blend) - goto invalid_enum; - v->value_int = ctx->Color.Blend[index].EquationRGB; - return TYPE_INT; - case GL_BLEND_EQUATION_ALPHA: - if (index >= ctx->Const.MaxDrawBuffers) - goto invalid_value; - if (!ctx->Extensions.ARB_draw_buffers_blend) - goto invalid_enum; - v->value_int = ctx->Color.Blend[index].EquationA; - return TYPE_INT; - - case GL_COLOR_WRITEMASK: - if (index >= ctx->Const.MaxDrawBuffers) - goto invalid_value; - if (!ctx->Extensions.EXT_draw_buffers2) - goto invalid_enum; - v->value_int_4[0] = ctx->Color.ColorMask[index][RCOMP] ? 1 : 0; - v->value_int_4[1] = ctx->Color.ColorMask[index][GCOMP] ? 1 : 0; - v->value_int_4[2] = ctx->Color.ColorMask[index][BCOMP] ? 1 : 0; - v->value_int_4[3] = ctx->Color.ColorMask[index][ACOMP] ? 1 : 0; - return TYPE_INT_4; - - case GL_TRANSFORM_FEEDBACK_BUFFER_START: - if (index >= ctx->Const.MaxTransformFeedbackSeparateAttribs) - goto invalid_value; - if (!ctx->Extensions.EXT_transform_feedback) - goto invalid_enum; - v->value_int64 = ctx->TransformFeedback.CurrentObject->Offset[index]; - return TYPE_INT64; - - case GL_TRANSFORM_FEEDBACK_BUFFER_SIZE: - if (index >= ctx->Const.MaxTransformFeedbackSeparateAttribs) - goto invalid_value; - if (!ctx->Extensions.EXT_transform_feedback) - goto invalid_enum; - v->value_int64 = ctx->TransformFeedback.CurrentObject->Size[index]; - return TYPE_INT64; - - case GL_TRANSFORM_FEEDBACK_BUFFER_BINDING: - if (index >= ctx->Const.MaxTransformFeedbackSeparateAttribs) - goto invalid_value; - if (!ctx->Extensions.EXT_transform_feedback) - goto invalid_enum; - v->value_int = ctx->TransformFeedback.CurrentObject->BufferNames[index]; - return TYPE_INT; - } - - invalid_enum: - _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func, - _mesa_lookup_enum_by_nr(pname)); - return TYPE_INVALID; - invalid_value: - _mesa_error(ctx, GL_INVALID_VALUE, "%s(pname=%s)", func, - _mesa_lookup_enum_by_nr(pname)); - return TYPE_INVALID; -} - -void GLAPIENTRY -_mesa_GetBooleanIndexedv( GLenum pname, GLuint index, GLboolean *params ) -{ - union value v; - enum value_type type = - find_value_indexed("glGetBooleanIndexedv", pname, index, &v); - - switch (type) { - case TYPE_INT: - params[0] = INT_TO_BOOLEAN(v.value_int); - break; - case TYPE_INT_4: - params[0] = INT_TO_BOOLEAN(v.value_int_4[0]); - params[1] = INT_TO_BOOLEAN(v.value_int_4[1]); - params[2] = INT_TO_BOOLEAN(v.value_int_4[2]); - params[3] = INT_TO_BOOLEAN(v.value_int_4[3]); - break; - case TYPE_INT64: - params[0] = INT64_TO_BOOLEAN(v.value_int); - break; - default: - ; /* nothing - GL error was recorded */ - } -} - -void GLAPIENTRY -_mesa_GetIntegerIndexedv( GLenum pname, GLuint index, GLint *params ) -{ - union value v; - enum value_type type = - find_value_indexed("glGetIntegerIndexedv", pname, index, &v); - - switch (type) { - case TYPE_INT: - params[0] = v.value_int; - break; - case TYPE_INT_4: - params[0] = v.value_int_4[0]; - params[1] = v.value_int_4[1]; - params[2] = v.value_int_4[2]; - params[3] = v.value_int_4[3]; - break; - case TYPE_INT64: - params[0] = INT64_TO_INT(v.value_int); - break; - default: - ; /* nothing - GL error was recorded */ - } -} - -#if FEATURE_ARB_sync -void GLAPIENTRY -_mesa_GetInteger64Indexedv( GLenum pname, GLuint index, GLint64 *params ) -{ - union value v; - enum value_type type = - find_value_indexed("glGetIntegerIndexedv", pname, index, &v); - - switch (type) { - case TYPE_INT: - params[0] = v.value_int; - break; - case TYPE_INT_4: - params[0] = v.value_int_4[0]; - params[1] = v.value_int_4[1]; - params[2] = v.value_int_4[2]; - params[3] = v.value_int_4[3]; - break; - case TYPE_INT64: - params[0] = v.value_int; - break; - default: - ; /* nothing - GL error was recorded */ - } -} -#endif /* FEATURE_ARB_sync */ - #if FEATURE_ES1 void GLAPIENTRY _mesa_GetFixedv(GLenum pname, GLfixed *params) diff --git a/dll/opengl/mesa/src/mesa/main/get.h b/dll/opengl/mesa/main/get.h similarity index 88% rename from dll/opengl/mesa/src/mesa/main/get.h rename to dll/opengl/mesa/main/get.h index 9422efec565..5e7a59c224c 100644 --- a/dll/opengl/mesa/src/mesa/main/get.h +++ b/dll/opengl/mesa/main/get.h @@ -53,12 +53,6 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params ); extern void GLAPIENTRY _mesa_GetFixedv(GLenum pname, GLfixed *params); -extern void GLAPIENTRY -_mesa_GetBooleanIndexedv( GLenum pname, GLuint index, GLboolean *params ); - -extern void GLAPIENTRY -_mesa_GetIntegerIndexedv( GLenum pname, GLuint index, GLint *params ); - extern void GLAPIENTRY _mesa_GetInteger64Indexedv( GLenum pname, GLuint index, GLint64 *params ); @@ -74,8 +68,4 @@ _mesa_GetStringi(GLenum name, GLuint index); extern GLenum GLAPIENTRY _mesa_GetError( void ); -/* GL_ARB_robustness */ -extern GLenum GLAPIENTRY -_mesa_GetGraphicsResetStatusARB( void ); - #endif diff --git a/dll/opengl/mesa/src/mesa/main/getstring.c b/dll/opengl/mesa/main/getstring.c similarity index 73% rename from dll/opengl/mesa/src/mesa/main/getstring.c rename to dll/opengl/mesa/main/getstring.c index dbf6c3f5e42..76f7361e23c 100644 --- a/dll/opengl/mesa/src/mesa/main/getstring.c +++ b/dll/opengl/mesa/main/getstring.c @@ -33,46 +33,6 @@ #include "mtypes.h" -/** - * Return the string for a glGetString(GL_SHADING_LANGUAGE_VERSION) query. - */ -static const GLubyte * -shading_language_version(struct gl_context *ctx) -{ - switch (ctx->API) { - case API_OPENGL: - if (!ctx->Extensions.ARB_shader_objects) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetString"); - return (const GLubyte *) 0; - } - - switch (ctx->Const.GLSLVersion) { - case 110: - return (const GLubyte *) "1.10"; - case 120: - return (const GLubyte *) "1.20"; - case 130: - return (const GLubyte *) "1.30"; - default: - _mesa_problem(ctx, - "Invalid GLSL version in shading_language_version()"); - return (const GLubyte *) 0; - } - break; - - case API_OPENGLES2: - return (const GLubyte *) "OpenGL ES GLSL ES 1.0.16"; - - case API_OPENGLES: - /* fall-through */ - - default: - _mesa_problem(ctx, "Unexpected API value in shading_language_version()"); - return (const GLubyte *) 0; - } -} - - /** * Query string-valued state. The return value should _not_ be freed by * the caller. @@ -114,21 +74,6 @@ _mesa_GetString( GLenum name ) return (const GLubyte *) ctx->VersionString; case GL_EXTENSIONS: return (const GLubyte *) ctx->Extensions.String; -#if FEATURE_ARB_shading_language_100 || FEATURE_ES2 - case GL_SHADING_LANGUAGE_VERSION: - return shading_language_version(ctx); -#endif -#if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program || \ - FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program - case GL_PROGRAM_ERROR_STRING_NV: - if (ctx->Extensions.NV_fragment_program || - ctx->Extensions.ARB_fragment_program || - ctx->Extensions.NV_vertex_program || - ctx->Extensions.ARB_vertex_program) { - return (const GLubyte *) ctx->Program.ErrorString; - } - /* FALL-THROUGH */ -#endif default: _mesa_error( ctx, GL_INVALID_ENUM, "glGetString" ); return (const GLubyte *) 0; @@ -179,7 +124,6 @@ void GLAPIENTRY _mesa_GetPointerv( GLenum pname, GLvoid **params ) { GET_CURRENT_CONTEXT(ctx); - const GLuint clientUnit = ctx->Array.ActiveTexture; ASSERT_OUTSIDE_BEGIN_END(ctx); if (!params) @@ -208,7 +152,7 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params ) *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Ptr; break; case GL_TEXTURE_COORD_ARRAY_POINTER: - *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_TEX(clientUnit)].Ptr; + *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_TEX].Ptr; break; case GL_EDGE_FLAG_ARRAY_POINTER: *params = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Ptr; @@ -251,20 +195,3 @@ _mesa_GetError( void ) ctx->ErrorDebugCount = 0; return e; } - -/** - * Returns an error code specified by GL_ARB_robustness, or GL_NO_ERROR. - * \return current context status - */ -GLenum GLAPIENTRY -_mesa_GetGraphicsResetStatusARB( void ) -{ - GET_CURRENT_CONTEXT(ctx); - GLenum status = ctx->ResetStatus; - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glGetGraphicsResetStatusARB" - "(always returns GL_NO_ERROR)\n"); - - return status; -} diff --git a/dll/opengl/mesa/src/mesa/main/git_sha1.h b/dll/opengl/mesa/main/git_sha1.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/git_sha1.h rename to dll/opengl/mesa/main/git_sha1.h diff --git a/dll/opengl/mesa/src/mesa/main/glheader.h b/dll/opengl/mesa/main/glheader.h similarity index 85% rename from dll/opengl/mesa/src/mesa/main/glheader.h rename to dll/opengl/mesa/main/glheader.h index d2bca9bf444..9bf3970f0db 100644 --- a/dll/opengl/mesa/src/mesa/main/glheader.h +++ b/dll/opengl/mesa/main/glheader.h @@ -53,6 +53,25 @@ #include #include +/* Threading glue for WINAPI */ +#include +#include +typedef CRITICAL_SECTION _glthread_Mutex; +#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = {(PCRITICAL_SECTION_DEBUG)-1, -1, 0, 0, 0, 0} +#define _glthread_INIT_MUTEX(name) InitializeCriticalSection(&name) +#define _glthread_DESTROY_MUTEX(name) DeleteCriticalSection(&name) +#define _glthread_LOCK_MUTEX(name) EnterCriticalSection(&name) +#define _glthread_UNLOCK_MUTEX(name) LeaveCriticalSection(&name) + +/* Context glue with opengl32 */ +#include "../opengl32/opengl32.h" +#define GET_CURRENT_CONTEXT(__ctx__) struct gl_context* __ctx__ = (struct gl_context*)IntGetCurrentICDPrivate() +#define GET_DISPATCH() ((struct _glapi_table*)IntGetCurrentDispatchTable()) +#define _glapi_set_dispatch(table) IntSetCurrentDispatchTable((const GLDISPATCHTABLE*)(table)) +#define _glapi_get_dispatch_table_size() (OPENGL_VERSION_110_ENTRIES) +#define _glapi_get_context() ((void*)IntGetCurrentICDPrivate()) +#define _glapi_set_context(__ctx__) IntSetCurrentICDPrivate((void*)(__ctx__)) + #ifdef __cplusplus extern "C" { @@ -139,10 +158,6 @@ typedef void *GLeglImageOES; #define GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI 0x8837 #endif -#ifndef GL_OES_compressed_ETC1_RGB8_texture -#define GL_ETC1_RGB8_OES 0x8D64 -#endif - /** * Internal token to represent a GLSL shader program (a collection of @@ -153,13 +168,6 @@ typedef void *GLeglImageOES; */ #define GL_SHADER_PROGRAM_MESA 0x9999 - -/** - * Internal token for geometry programs. - * Use the value for GL_GEOMETRY_PROGRAM_NV for now. - */ -#define MESA_GEOMETRY_PROGRAM 0x8c26 - /* Several fields of struct gl_config can take these as values. Since * GLX header files may not be available everywhere they need to be used, * redefine them here. diff --git a/dll/opengl/mesa/src/mesa/main/hash.c b/dll/opengl/mesa/main/hash.c similarity index 99% rename from dll/opengl/mesa/src/mesa/main/hash.c rename to dll/opengl/mesa/main/hash.c index 61c369a80cd..c7a750bfeb0 100644 --- a/dll/opengl/mesa/src/mesa/main/hash.c +++ b/dll/opengl/mesa/main/hash.c @@ -37,7 +37,6 @@ #include "glheader.h" #include "imports.h" -#include "glapi/glthread.h" #include "hash.h" diff --git a/dll/opengl/mesa/src/mesa/main/hash.h b/dll/opengl/mesa/main/hash.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/hash.h rename to dll/opengl/mesa/main/hash.h diff --git a/dll/opengl/mesa/src/mesa/main/hint.c b/dll/opengl/mesa/main/hint.c similarity index 78% rename from dll/opengl/mesa/src/mesa/main/hint.c rename to dll/opengl/mesa/main/hint.c index ff8d88fffe0..869c4125408 100644 --- a/dll/opengl/mesa/src/mesa/main/hint.c +++ b/dll/opengl/mesa/main/hint.c @@ -89,34 +89,6 @@ _mesa_Hint( GLenum target, GLenum mode ) ctx->Hint.ClipVolumeClipping = mode; break; - /* GL_ARB_texture_compression */ - case GL_TEXTURE_COMPRESSION_HINT_ARB: - if (ctx->Hint.TextureCompression == mode) - return; - FLUSH_VERTICES(ctx, _NEW_HINT); - ctx->Hint.TextureCompression = mode; - break; - - /* GL_SGIS_generate_mipmap */ - case GL_GENERATE_MIPMAP_HINT_SGIS: - if (ctx->Hint.GenerateMipmap == mode) - return; - FLUSH_VERTICES(ctx, _NEW_HINT); - ctx->Hint.GenerateMipmap = mode; - break; - - /* GL_ARB_fragment_shader */ - case GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB: - if (!ctx->Extensions.ARB_fragment_shader) { - _mesa_error(ctx, GL_INVALID_ENUM, "glHint(target)"); - return; - } - if (ctx->Hint.FragmentShaderDerivative == mode) - return; - FLUSH_VERTICES(ctx, _NEW_HINT); - ctx->Hint.FragmentShaderDerivative = mode; - break; - default: _mesa_error(ctx, GL_INVALID_ENUM, "glHint(target)"); return; @@ -141,7 +113,4 @@ void _mesa_init_hint( struct gl_context * ctx ) ctx->Hint.PolygonSmooth = GL_DONT_CARE; ctx->Hint.Fog = GL_DONT_CARE; ctx->Hint.ClipVolumeClipping = GL_DONT_CARE; - ctx->Hint.TextureCompression = GL_DONT_CARE; - ctx->Hint.GenerateMipmap = GL_DONT_CARE; - ctx->Hint.FragmentShaderDerivative = GL_DONT_CARE; } diff --git a/dll/opengl/mesa/src/mesa/main/hint.h b/dll/opengl/mesa/main/hint.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/hint.h rename to dll/opengl/mesa/main/hint.h diff --git a/dll/opengl/mesa/src/mesa/main/histogram.c b/dll/opengl/mesa/main/histogram.c similarity index 83% rename from dll/opengl/mesa/src/mesa/main/histogram.c rename to dll/opengl/mesa/main/histogram.c index 44fc1325ceb..d603fdc3393 100644 --- a/dll/opengl/mesa/src/mesa/main/histogram.c +++ b/dll/opengl/mesa/main/histogram.c @@ -44,8 +44,8 @@ static void GLAPIENTRY _mesa_ResetMinmax(GLenum target); static void GLAPIENTRY -_mesa_GetnMinmaxARB(GLenum target, GLboolean reset, GLenum format, - GLenum type, GLsizei bufSize, GLvoid *values) +_mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, + GLenum type, GLvoid *values) { GET_CURRENT_CONTEXT(ctx); @@ -54,16 +54,8 @@ _mesa_GetnMinmaxARB(GLenum target, GLboolean reset, GLenum format, static void GLAPIENTRY -_mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, - GLvoid *values) -{ - _mesa_GetnMinmaxARB(target, reset, format, type, INT_MAX, values); -} - - -static void GLAPIENTRY -_mesa_GetnHistogramARB(GLenum target, GLboolean reset, GLenum format, - GLenum type, GLsizei bufSize, GLvoid *values) +_mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format, + GLenum type, GLvoid *values) { GET_CURRENT_CONTEXT(ctx); @@ -71,14 +63,6 @@ _mesa_GetnHistogramARB(GLenum target, GLboolean reset, GLenum format, } -static void GLAPIENTRY -_mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, - GLvoid *values) -{ - _mesa_GetnHistogramARB(target, reset, format, type, INT_MAX, values); -} - - static void GLAPIENTRY _mesa_GetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params) { @@ -164,10 +148,6 @@ _mesa_init_histogram_dispatch(struct _glapi_table *disp) SET_Minmax(disp, _mesa_Minmax); SET_ResetHistogram(disp, _mesa_ResetHistogram); SET_ResetMinmax(disp, _mesa_ResetMinmax); - - /* GL_ARB_robustness */ - SET_GetnHistogramARB(disp, _mesa_GetnHistogramARB); - SET_GetnMinmaxARB(disp, _mesa_GetnMinmaxARB); } #endif /* FEATURE_histogram */ diff --git a/dll/opengl/mesa/src/mesa/main/histogram.h b/dll/opengl/mesa/main/histogram.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/histogram.h rename to dll/opengl/mesa/main/histogram.h diff --git a/dll/opengl/mesa/src/mesa/main/image.c b/dll/opengl/mesa/main/image.c similarity index 83% rename from dll/opengl/mesa/src/mesa/main/image.c rename to dll/opengl/mesa/main/image.c index b6c2645e9b0..48f0fb472b0 100644 --- a/dll/opengl/mesa/src/mesa/main/image.c +++ b/dll/opengl/mesa/main/image.c @@ -58,14 +58,10 @@ _mesa_type_is_packed(GLenum type) case GL_UNSIGNED_SHORT_1_5_5_5_REV: case GL_UNSIGNED_INT_8_8_8_8: case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: case GL_UNSIGNED_SHORT_8_8_MESA: case GL_UNSIGNED_SHORT_8_8_REV_MESA: - case GL_UNSIGNED_INT_24_8_EXT: case GL_UNSIGNED_INT_5_9_9_9_REV: case GL_UNSIGNED_INT_10F_11F_11F_REV: - case GL_FLOAT_32_UNSIGNED_INT_24_8_REV: return GL_TRUE; } @@ -190,14 +186,9 @@ _mesa_sizeof_packed_type( GLenum type ) return sizeof(GLushort); case GL_UNSIGNED_INT_8_8_8_8: case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - case GL_UNSIGNED_INT_24_8_EXT: case GL_UNSIGNED_INT_5_9_9_9_REV: case GL_UNSIGNED_INT_10F_11F_11F_REV: return sizeof(GLuint); - case GL_FLOAT_32_UNSIGNED_INT_24_8_REV: - return 8; default: return -1; } @@ -235,9 +226,6 @@ _mesa_components_in_format( GLenum format ) case GL_LUMINANCE_ALPHA_INTEGER_EXT: case GL_RG: case GL_YCBCR_MESA: - case GL_DEPTH_STENCIL_EXT: - case GL_DUDV_ATI: - case GL_DU8DV8_ATI: case GL_RG_INTEGER: return 2; @@ -316,8 +304,6 @@ _mesa_bytes_per_pixel( GLenum format, GLenum type ) return -1; case GL_UNSIGNED_INT_8_8_8_8: case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: if (format == GL_RGBA || format == GL_BGRA || format == GL_ABGR_EXT || format == GL_RGBA_INTEGER_EXT || format == GL_BGRA_INTEGER_EXT) return sizeof(GLuint); @@ -329,11 +315,6 @@ _mesa_bytes_per_pixel( GLenum format, GLenum type ) return sizeof(GLushort); else return -1; - case GL_UNSIGNED_INT_24_8_EXT: - if (format == GL_DEPTH_STENCIL_EXT) - return sizeof(GLuint); - else - return -1; case GL_UNSIGNED_INT_5_9_9_9_REV: if (format == GL_RGB) return sizeof(GLuint); @@ -344,11 +325,6 @@ _mesa_bytes_per_pixel( GLenum format, GLenum type ) return sizeof(GLuint); else return -1; - case GL_FLOAT_32_UNSIGNED_INT_24_8_REV: - if (format == GL_DEPTH_STENCIL) - return 8; - else - return -1; default: return -1; } @@ -385,10 +361,6 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, if (format == GL_RGB) { break; /* OK */ } - if (format == GL_RGB_INTEGER_EXT && - ctx->Extensions.ARB_texture_rgb10_a2ui) { - break; /* OK */ - } return GL_INVALID_OPERATION; case GL_UNSIGNED_SHORT_4_4_4_4: @@ -397,46 +369,13 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, case GL_UNSIGNED_SHORT_1_5_5_5_REV: case GL_UNSIGNED_INT_8_8_8_8: case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: if (format == GL_RGBA || format == GL_BGRA || format == GL_ABGR_EXT) { break; /* OK */ } - if ((format == GL_RGBA_INTEGER_EXT || format == GL_BGRA_INTEGER_EXT) && - ctx->Extensions.ARB_texture_rgb10_a2ui) { - break; /* OK */ - } return GL_INVALID_OPERATION; - case GL_UNSIGNED_INT_24_8: - if (!ctx->Extensions.EXT_packed_depth_stencil) { - return GL_INVALID_ENUM; - } - if (format != GL_DEPTH_STENCIL) { - return GL_INVALID_OPERATION; - } - return GL_NO_ERROR; - - case GL_FLOAT_32_UNSIGNED_INT_24_8_REV: - if (!ctx->Extensions.ARB_depth_buffer_float) { - return GL_INVALID_ENUM; - } - if (format != GL_DEPTH_STENCIL) { - return GL_INVALID_OPERATION; - } - return GL_NO_ERROR; - - case GL_UNSIGNED_INT_10F_11F_11F_REV: - if (!ctx->Extensions.EXT_packed_float) { - return GL_INVALID_ENUM; - } - if (format != GL_RGB) { - return GL_INVALID_OPERATION; - } - return GL_NO_ERROR; - default: ; /* fall-through */ } @@ -488,25 +427,6 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, return GL_INVALID_ENUM; } - case GL_RG: - if (!ctx->Extensions.ARB_texture_rg) - return GL_INVALID_ENUM; - switch (type) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - case GL_SHORT: - case GL_UNSIGNED_SHORT: - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - return GL_NO_ERROR; - case GL_HALF_FLOAT: - return ctx->Extensions.ARB_half_float_pixel - ? GL_NO_ERROR : GL_INVALID_ENUM; - default: - return GL_INVALID_ENUM; - } - case GL_RGB: switch (type) { case GL_BYTE: @@ -524,12 +444,6 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, case GL_HALF_FLOAT: return ctx->Extensions.ARB_half_float_pixel ? GL_NO_ERROR : GL_INVALID_ENUM; - case GL_UNSIGNED_INT_5_9_9_9_REV: - return ctx->Extensions.EXT_texture_shared_exponent - ? GL_NO_ERROR : GL_INVALID_ENUM; - case GL_UNSIGNED_INT_10F_11F_11F_REV: - return ctx->Extensions.EXT_packed_float - ? GL_NO_ERROR : GL_INVALID_ENUM; default: return GL_INVALID_ENUM; } @@ -571,8 +485,6 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, case GL_UNSIGNED_SHORT_1_5_5_5_REV: case GL_UNSIGNED_INT_8_8_8_8: case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: return GL_NO_ERROR; case GL_HALF_FLOAT: return ctx->Extensions.ARB_half_float_pixel @@ -590,33 +502,6 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, else return GL_INVALID_OPERATION; - case GL_DEPTH_STENCIL_EXT: - if (ctx->Extensions.EXT_packed_depth_stencil && - type == GL_UNSIGNED_INT_24_8) - return GL_NO_ERROR; - else if (ctx->Extensions.ARB_depth_buffer_float && - type == GL_FLOAT_32_UNSIGNED_INT_24_8_REV) - return GL_NO_ERROR; - else - return GL_INVALID_ENUM; - - case GL_DUDV_ATI: - case GL_DU8DV8_ATI: - if (!ctx->Extensions.ATI_envmap_bumpmap) - return GL_INVALID_ENUM; - switch (type) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - case GL_SHORT: - case GL_UNSIGNED_SHORT: - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - return GL_NO_ERROR; - default: - return GL_INVALID_ENUM; - } - /* integer-valued formats */ case GL_RED_INTEGER_EXT: case GL_GREEN_INTEGER_EXT: @@ -648,12 +533,6 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, return (ctx->VersionMajor >= 3 || ctx->Extensions.EXT_texture_integer) ? GL_NO_ERROR : GL_INVALID_ENUM; - case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_5_6_5_REV: - return ctx->Extensions.ARB_texture_rgb10_a2ui - ? GL_NO_ERROR : GL_INVALID_ENUM; default: return GL_INVALID_ENUM; } @@ -686,16 +565,6 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx, return (ctx->VersionMajor >= 3 || ctx->Extensions.EXT_texture_integer) ? GL_NO_ERROR : GL_INVALID_ENUM; - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_4_4_4_4_REV: - case GL_UNSIGNED_SHORT_5_5_5_1: - case GL_UNSIGNED_SHORT_1_5_5_5_REV: - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - case GL_UNSIGNED_INT_10_10_10_2: - case GL_UNSIGNED_INT_2_10_10_10_REV: - return ctx->Extensions.ARB_texture_rgb10_a2ui - ? GL_NO_ERROR : GL_INVALID_ENUM; default: return GL_INVALID_ENUM; } @@ -802,53 +671,6 @@ _mesa_is_color_format(GLenum format) case GL_RGB32F_ARB: case GL_RGBA16F_ARB: case GL_RGBA32F_ARB: - /* compressed formats */ - case GL_COMPRESSED_ALPHA: - case GL_COMPRESSED_LUMINANCE: - case GL_COMPRESSED_LUMINANCE_ALPHA: - case GL_COMPRESSED_INTENSITY: - case GL_COMPRESSED_RED: - case GL_COMPRESSED_RG: - case GL_COMPRESSED_RGB: - case GL_COMPRESSED_RGBA: - case GL_RGB_S3TC: - case GL_RGB4_S3TC: - case GL_RGBA_S3TC: - case GL_RGBA4_S3TC: - case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: - case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: - case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: - case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: - case GL_COMPRESSED_RGB_FXT1_3DFX: - case GL_COMPRESSED_RGBA_FXT1_3DFX: -#if FEATURE_EXT_texture_sRGB - case GL_SRGB_EXT: - case GL_SRGB8_EXT: - case GL_SRGB_ALPHA_EXT: - case GL_SRGB8_ALPHA8_EXT: - case GL_SLUMINANCE_ALPHA_EXT: - case GL_SLUMINANCE8_ALPHA8_EXT: - case GL_SLUMINANCE_EXT: - case GL_SLUMINANCE8_EXT: - case GL_COMPRESSED_SRGB_EXT: - case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT: - case GL_COMPRESSED_SRGB_ALPHA_EXT: - case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: - case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: - case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: - case GL_COMPRESSED_SLUMINANCE_EXT: - case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT: -#endif /* FEATURE_EXT_texture_sRGB */ - case GL_COMPRESSED_RED_RGTC1: - case GL_COMPRESSED_SIGNED_RED_RGTC1: - case GL_COMPRESSED_RG_RGTC2: - case GL_COMPRESSED_SIGNED_RG_RGTC2: - case GL_COMPRESSED_LUMINANCE_LATC1_EXT: - case GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT: - case GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT: - case GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT: - case GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI: - case GL_ETC1_RGB8_OES: /* generic integer formats */ case GL_RED_INTEGER_EXT: case GL_GREEN_INTEGER_EXT: @@ -858,84 +680,45 @@ _mesa_is_color_format(GLenum format) case GL_RGBA_INTEGER_EXT: case GL_BGR_INTEGER_EXT: case GL_BGRA_INTEGER_EXT: - case GL_RG_INTEGER: case GL_LUMINANCE_INTEGER_EXT: case GL_LUMINANCE_ALPHA_INTEGER_EXT: /* sized integer formats */ case GL_RGBA32UI_EXT: case GL_RGB32UI_EXT: - case GL_RG32UI: - case GL_R32UI: case GL_ALPHA32UI_EXT: case GL_INTENSITY32UI_EXT: case GL_LUMINANCE32UI_EXT: case GL_LUMINANCE_ALPHA32UI_EXT: case GL_RGBA16UI_EXT: case GL_RGB16UI_EXT: - case GL_RG16UI: - case GL_R16UI: case GL_ALPHA16UI_EXT: case GL_INTENSITY16UI_EXT: case GL_LUMINANCE16UI_EXT: case GL_LUMINANCE_ALPHA16UI_EXT: case GL_RGBA8UI_EXT: case GL_RGB8UI_EXT: - case GL_RG8UI: - case GL_R8UI: case GL_ALPHA8UI_EXT: case GL_INTENSITY8UI_EXT: case GL_LUMINANCE8UI_EXT: case GL_LUMINANCE_ALPHA8UI_EXT: case GL_RGBA32I_EXT: case GL_RGB32I_EXT: - case GL_RG32I: - case GL_R32I: case GL_ALPHA32I_EXT: case GL_INTENSITY32I_EXT: case GL_LUMINANCE32I_EXT: case GL_LUMINANCE_ALPHA32I_EXT: case GL_RGBA16I_EXT: case GL_RGB16I_EXT: - case GL_RG16I: - case GL_R16I: case GL_ALPHA16I_EXT: case GL_INTENSITY16I_EXT: case GL_LUMINANCE16I_EXT: case GL_LUMINANCE_ALPHA16I_EXT: case GL_RGBA8I_EXT: case GL_RGB8I_EXT: - case GL_RG8I: - case GL_R8I: case GL_ALPHA8I_EXT: case GL_INTENSITY8I_EXT: case GL_LUMINANCE8I_EXT: case GL_LUMINANCE_ALPHA8I_EXT: - /* signed, normalized texture formats */ - case GL_RED_SNORM: - case GL_R8_SNORM: - case GL_R16_SNORM: - case GL_RG_SNORM: - case GL_RG8_SNORM: - case GL_RG16_SNORM: - case GL_RGB_SNORM: - case GL_RGB8_SNORM: - case GL_RGB16_SNORM: - case GL_RGBA_SNORM: - case GL_RGBA8_SNORM: - case GL_RGBA16_SNORM: - case GL_ALPHA_SNORM: - case GL_ALPHA8_SNORM: - case GL_ALPHA16_SNORM: - case GL_LUMINANCE_SNORM: - case GL_LUMINANCE8_SNORM: - case GL_LUMINANCE16_SNORM: - case GL_LUMINANCE_ALPHA_SNORM: - case GL_LUMINANCE8_ALPHA8_SNORM: - case GL_LUMINANCE16_ALPHA16_SNORM: - case GL_INTENSITY_SNORM: - case GL_INTENSITY8_SNORM: - case GL_INTENSITY16_SNORM: - case GL_RGB9_E5: case GL_R11F_G11F_B10F: case GL_RGB10_A2UI: return GL_TRUE; @@ -958,7 +741,6 @@ _mesa_is_depth_format(GLenum format) case GL_DEPTH_COMPONENT16: case GL_DEPTH_COMPONENT24: case GL_DEPTH_COMPONENT32: - case GL_DEPTH_COMPONENT32F: return GL_TRUE; default: return GL_FALSE; @@ -996,23 +778,6 @@ _mesa_is_ycbcr_format(GLenum format) } -/** - * Test if the given image format is a depth+stencil format. - */ -GLboolean -_mesa_is_depthstencil_format(GLenum format) -{ - switch (format) { - case GL_DEPTH24_STENCIL8_EXT: - case GL_DEPTH_STENCIL_EXT: - case GL_DEPTH32F_STENCIL8: - return GL_TRUE; - default: - return GL_FALSE; - } -} - - /** * Test if the given image format is a depth or stencil format. */ @@ -1029,26 +794,6 @@ _mesa_is_depth_or_stencil_format(GLenum format) case GL_STENCIL_INDEX4_EXT: case GL_STENCIL_INDEX8_EXT: case GL_STENCIL_INDEX16_EXT: - case GL_DEPTH_STENCIL_EXT: - case GL_DEPTH24_STENCIL8_EXT: - case GL_DEPTH_COMPONENT32F: - case GL_DEPTH32F_STENCIL8: - return GL_TRUE; - default: - return GL_FALSE; - } -} - - -/** - * Test if the given image format is a dudv format. - */ -GLboolean -_mesa_is_dudv_format(GLenum format) -{ - switch (format) { - case GL_DUDV_ATI: - case GL_DU8DV8_ATI: return GL_TRUE; default: return GL_FALSE; @@ -1132,67 +877,6 @@ _mesa_is_integer_format(GLenum format) } -/** - * Test if an image format is a supported compressed format. - * \param format the internal format token provided by the user. - * \return GL_TRUE if compressed, GL_FALSE if uncompressed - */ -GLboolean -_mesa_is_compressed_format(struct gl_context *ctx, GLenum format) -{ - switch (format) { - case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: - case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: - case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: - case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: - return ctx->Extensions.EXT_texture_compression_s3tc; - case GL_RGB_S3TC: - case GL_RGB4_S3TC: - case GL_RGBA_S3TC: - case GL_RGBA4_S3TC: - return ctx->Extensions.S3_s3tc; - case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT: - case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: - case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: - case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: - return ctx->Extensions.EXT_texture_sRGB - && ctx->Extensions.EXT_texture_compression_s3tc; - case GL_COMPRESSED_RGB_FXT1_3DFX: - case GL_COMPRESSED_RGBA_FXT1_3DFX: - return ctx->Extensions.TDFX_texture_compression_FXT1; - case GL_COMPRESSED_RED_RGTC1: - case GL_COMPRESSED_SIGNED_RED_RGTC1: - case GL_COMPRESSED_RG_RGTC2: - case GL_COMPRESSED_SIGNED_RG_RGTC2: - return ctx->Extensions.ARB_texture_compression_rgtc; - case GL_COMPRESSED_LUMINANCE_LATC1_EXT: - case GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT: - case GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT: - case GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT: - return ctx->Extensions.EXT_texture_compression_latc; - case GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI: - return ctx->Extensions.ATI_texture_compression_3dc; - case GL_ETC1_RGB8_OES: - return ctx->Extensions.OES_compressed_ETC1_RGB8_texture; -#if FEATURE_ES - case GL_PALETTE4_RGB8_OES: - case GL_PALETTE4_RGBA8_OES: - case GL_PALETTE4_R5_G6_B5_OES: - case GL_PALETTE4_RGBA4_OES: - case GL_PALETTE4_RGB5_A1_OES: - case GL_PALETTE8_RGB8_OES: - case GL_PALETTE8_RGBA8_OES: - case GL_PALETTE8_R5_G6_B5_OES: - case GL_PALETTE8_RGBA4_OES: - case GL_PALETTE8_RGB5_A1_OES: - return ctx->API == API_OPENGLES; -#endif - default: - return GL_FALSE; - } -} - - /** * Does the given base texture/renderbuffer format have the channel * named by 'pname'? @@ -1258,15 +942,13 @@ _mesa_base_format_has_channel(GLenum base_format, GLenum pname) case GL_TEXTURE_DEPTH_TYPE: case GL_RENDERBUFFER_DEPTH_SIZE_EXT: case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: - if (base_format == GL_DEPTH_STENCIL || - base_format == GL_DEPTH_COMPONENT) { + if (base_format == GL_DEPTH_COMPONENT) { return GL_TRUE; } return GL_FALSE; case GL_RENDERBUFFER_STENCIL_SIZE_EXT: case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: - if (base_format == GL_DEPTH_STENCIL || - base_format == GL_STENCIL_INDEX) { + if (base_format == GL_STENCIL_INDEX) { return GL_TRUE; } return GL_FALSE; diff --git a/dll/opengl/mesa/src/mesa/main/image.h b/dll/opengl/mesa/main/image.h similarity index 96% rename from dll/opengl/mesa/src/mesa/main/image.h rename to dll/opengl/mesa/main/image.h index f1ed883794f..6cd7b08dce4 100644 --- a/dll/opengl/mesa/src/mesa/main/image.h +++ b/dll/opengl/mesa/main/image.h @@ -69,21 +69,12 @@ _mesa_is_stencil_format(GLenum format); extern GLboolean _mesa_is_ycbcr_format(GLenum format); -extern GLboolean -_mesa_is_depthstencil_format(GLenum format); - extern GLboolean _mesa_is_depth_or_stencil_format(GLenum format); -extern GLboolean -_mesa_is_dudv_format(GLenum format); - extern GLboolean _mesa_is_integer_format(GLenum format); -extern GLboolean -_mesa_is_compressed_format(struct gl_context *ctx, GLenum format); - extern GLboolean _mesa_base_format_has_channel(GLenum base_format, GLenum pname); diff --git a/dll/opengl/mesa/src/mesa/main/imports.c b/dll/opengl/mesa/main/imports.c similarity index 100% rename from dll/opengl/mesa/src/mesa/main/imports.c rename to dll/opengl/mesa/main/imports.c diff --git a/dll/opengl/mesa/src/mesa/main/imports.h b/dll/opengl/mesa/main/imports.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/imports.h rename to dll/opengl/mesa/main/imports.h diff --git a/dll/opengl/mesa/src/mesa/main/light.c b/dll/opengl/mesa/main/light.c similarity index 97% rename from dll/opengl/mesa/src/mesa/main/light.c rename to dll/opengl/mesa/main/light.c index af83365fe42..60bdac74d96 100644 --- a/dll/opengl/mesa/src/mesa/main/light.c +++ b/dll/opengl/mesa/main/light.c @@ -63,38 +63,6 @@ _mesa_ShadeModel( GLenum mode ) ctx->Driver.ShadeModel( ctx, mode ); } - -/** - * Set the provoking vertex (the vertex which specifies the prim's - * color when flat shading) to either the first or last vertex of the - * triangle or line. - */ -void GLAPIENTRY -_mesa_ProvokingVertexEXT(GLenum mode) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE&VERBOSE_API) - _mesa_debug(ctx, "glProvokingVertexEXT 0x%x\n", mode); - - switch (mode) { - case GL_FIRST_VERTEX_CONVENTION_EXT: - case GL_LAST_VERTEX_CONVENTION_EXT: - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glProvokingVertexEXT(0x%x)", mode); - return; - } - - if (ctx->Light.ProvokingVertex == mode) - return; - - FLUSH_VERTICES(ctx, _NEW_LIGHT); - ctx->Light.ProvokingVertex = mode; -} - - /** * Helper function called by _mesa_Lightfv and _mesa_PopAttrib to set * per-light state. @@ -1372,7 +1340,6 @@ _mesa_init_lighting( struct gl_context *ctx ) init_lightmodel( &ctx->Light.Model ); init_material( &ctx->Light.Material ); ctx->Light.ShadeModel = GL_SMOOTH; - ctx->Light.ProvokingVertex = GL_LAST_VERTEX_CONVENTION_EXT; ctx->Light.Enabled = GL_FALSE; ctx->Light.ColorMaterialFace = GL_FRONT_AND_BACK; ctx->Light.ColorMaterialMode = GL_AMBIENT_AND_DIFFUSE; @@ -1382,7 +1349,6 @@ _mesa_init_lighting( struct gl_context *ctx ) NULL ); ctx->Light.ColorMaterialEnabled = GL_FALSE; - ctx->Light.ClampVertexColor = GL_TRUE; /* Lighting miscellaneous */ ctx->_ShineTabList = MALLOC_STRUCT( gl_shine_tab ); diff --git a/dll/opengl/mesa/src/mesa/main/light.h b/dll/opengl/mesa/main/light.h similarity index 98% rename from dll/opengl/mesa/src/mesa/main/light.h rename to dll/opengl/mesa/main/light.h index 9b66c7ed853..decf7be6bc9 100644 --- a/dll/opengl/mesa/src/mesa/main/light.h +++ b/dll/opengl/mesa/main/light.h @@ -38,9 +38,6 @@ struct gl_material; extern void GLAPIENTRY _mesa_ShadeModel( GLenum mode ); -extern void GLAPIENTRY -_mesa_ProvokingVertexEXT(GLenum mode); - #if _HAVE_FULL_GL extern void GLAPIENTRY diff --git a/dll/opengl/mesa/src/mesa/main/lines.c b/dll/opengl/mesa/main/lines.c similarity index 100% rename from dll/opengl/mesa/src/mesa/main/lines.c rename to dll/opengl/mesa/main/lines.c diff --git a/dll/opengl/mesa/src/mesa/main/lines.h b/dll/opengl/mesa/main/lines.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/lines.h rename to dll/opengl/mesa/main/lines.h diff --git a/dll/opengl/mesa/src/mesa/main/macros.h b/dll/opengl/mesa/main/macros.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/macros.h rename to dll/opengl/mesa/main/macros.h diff --git a/dll/opengl/mesa/src/mesa/main/matrix.c b/dll/opengl/mesa/main/matrix.c similarity index 87% rename from dll/opengl/mesa/src/mesa/main/matrix.c rename to dll/opengl/mesa/main/matrix.c index f479a22b073..c614f0fa712 100644 --- a/dll/opengl/mesa/src/mesa/main/matrix.c +++ b/dll/opengl/mesa/main/matrix.c @@ -161,62 +161,7 @@ _mesa_MatrixMode( GLenum mode ) ctx->CurrentStack = &ctx->ProjectionMatrixStack; break; case GL_TEXTURE: - /* This error check is disabled because if we're called from - * glPopAttrib() when the active texture unit is >= MaxTextureCoordUnits - * we'll generate an unexpected error. - * From the GL_ARB_vertex_shader spec it sounds like we should instead - * do error checking in other places when we actually try to access - * texture matrices beyond MaxTextureCoordUnits. - */ -#if 0 - if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glMatrixMode(invalid tex unit %d)", - ctx->Texture.CurrentUnit); - return; - } -#endif - ASSERT(ctx->Texture.CurrentUnit < Elements(ctx->TextureMatrixStack)); - ctx->CurrentStack = &ctx->TextureMatrixStack[ctx->Texture.CurrentUnit]; - break; - case GL_MATRIX0_NV: - case GL_MATRIX1_NV: - case GL_MATRIX2_NV: - case GL_MATRIX3_NV: - case GL_MATRIX4_NV: - case GL_MATRIX5_NV: - case GL_MATRIX6_NV: - case GL_MATRIX7_NV: - if (ctx->Extensions.NV_vertex_program) { - ctx->CurrentStack = &ctx->ProgramMatrixStack[mode - GL_MATRIX0_NV]; - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glMatrixMode(mode)" ); - return; - } - break; - case GL_MATRIX0_ARB: - case GL_MATRIX1_ARB: - case GL_MATRIX2_ARB: - case GL_MATRIX3_ARB: - case GL_MATRIX4_ARB: - case GL_MATRIX5_ARB: - case GL_MATRIX6_ARB: - case GL_MATRIX7_ARB: - if (ctx->Extensions.ARB_vertex_program || - ctx->Extensions.ARB_fragment_program) { - const GLuint m = mode - GL_MATRIX0_ARB; - if (m > ctx->Const.MaxProgramMatrices) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glMatrixMode(GL_MATRIX%d_ARB)", m); - return; - } - ctx->CurrentStack = &ctx->ProgramMatrixStack[m]; - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glMatrixMode(mode)" ); - return; - } + ctx->CurrentStack = &ctx->TextureMatrixStack; break; default: _mesa_error( ctx, GL_INVALID_ENUM, "glMatrixMode(mode)" ); @@ -250,8 +195,7 @@ _mesa_PushMatrix( void ) if (stack->Depth + 1 >= stack->MaxDepth) { if (ctx->Transform.MatrixMode == GL_TEXTURE) { _mesa_error(ctx, GL_STACK_OVERFLOW, - "glPushMatrix(mode=GL_TEXTURE, unit=%d)", - ctx->Texture.CurrentUnit); + "glPushMatrix(mode=GL_TEXTURE)"); } else { _mesa_error(ctx, GL_STACK_OVERFLOW, "glPushMatrix(mode=%s)", @@ -290,8 +234,7 @@ _mesa_PopMatrix( void ) if (stack->Depth == 0) { if (ctx->Transform.MatrixMode == GL_TEXTURE) { _mesa_error(ctx, GL_STACK_UNDERFLOW, - "glPopMatrix(mode=GL_TEXTURE, unit=%d)", - ctx->Texture.CurrentUnit); + "glPopMatrix(mode=GL_TEXTURE)"); } else { _mesa_error(ctx, GL_STACK_UNDERFLOW, "glPopMatrix(mode=%s)", @@ -716,19 +659,13 @@ free_matrix_stack( struct gl_matrix_stack *stack ) */ void _mesa_init_matrix( struct gl_context * ctx ) { - GLint i; - /* Initialize matrix stacks */ init_matrix_stack(&ctx->ModelviewMatrixStack, MAX_MODELVIEW_STACK_DEPTH, _NEW_MODELVIEW); init_matrix_stack(&ctx->ProjectionMatrixStack, MAX_PROJECTION_STACK_DEPTH, _NEW_PROJECTION); - for (i = 0; i < Elements(ctx->TextureMatrixStack); i++) - init_matrix_stack(&ctx->TextureMatrixStack[i], MAX_TEXTURE_STACK_DEPTH, - _NEW_TEXTURE_MATRIX); - for (i = 0; i < Elements(ctx->ProgramMatrixStack); i++) - init_matrix_stack(&ctx->ProgramMatrixStack[i], - MAX_PROGRAM_MATRIX_STACK_DEPTH, _NEW_TRACK_MATRIX); + init_matrix_stack(&ctx->TextureMatrixStack, MAX_TEXTURE_STACK_DEPTH, + _NEW_TEXTURE_MATRIX); ctx->CurrentStack = &ctx->ModelviewMatrixStack; /* Init combined Modelview*Projection matrix */ @@ -746,14 +683,9 @@ void _mesa_init_matrix( struct gl_context * ctx ) */ void _mesa_free_matrix_data( struct gl_context *ctx ) { - GLint i; - free_matrix_stack(&ctx->ModelviewMatrixStack); free_matrix_stack(&ctx->ProjectionMatrixStack); - for (i = 0; i < Elements(ctx->TextureMatrixStack); i++) - free_matrix_stack(&ctx->TextureMatrixStack[i]); - for (i = 0; i < Elements(ctx->ProgramMatrixStack); i++) - free_matrix_stack(&ctx->ProgramMatrixStack[i]); + free_matrix_stack(&ctx->TextureMatrixStack); /* combined Modelview*Projection matrix */ _math_matrix_dtr( &ctx->_ModelProjectMatrix ); diff --git a/dll/opengl/mesa/src/mesa/main/matrix.h b/dll/opengl/mesa/main/matrix.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/matrix.h rename to dll/opengl/mesa/main/matrix.h diff --git a/dll/opengl/mesa/src/mesa/main/mfeatures.h b/dll/opengl/mesa/main/mfeatures.h similarity index 97% rename from dll/opengl/mesa/src/mesa/main/mfeatures.h rename to dll/opengl/mesa/main/mfeatures.h index b67f046ca6c..940151abbe7 100644 --- a/dll/opengl/mesa/src/mesa/main/mfeatures.h +++ b/dll/opengl/mesa/main/mfeatures.h @@ -132,10 +132,10 @@ #define FEATURE_EXT_transform_feedback FEATURE_GL #define FEATURE_APPLE_object_purgeable FEATURE_GL -#define FEATURE_ATI_fragment_shader FEATURE_GL +#define FEATURE_ATI_fragment_shader 0 #define FEATURE_NV_fence FEATURE_GL -#define FEATURE_NV_fragment_program FEATURE_GL -#define FEATURE_NV_vertex_program FEATURE_GL +#define FEATURE_NV_fragment_program 0 +#define FEATURE_NV_vertex_program 0 #define FEATURE_OES_EGL_image 1 #define FEATURE_OES_draw_texture FEATURE_ES1 diff --git a/dll/opengl/mesa/src/mesa/main/mm.c b/dll/opengl/mesa/main/mm.c similarity index 100% rename from dll/opengl/mesa/src/mesa/main/mm.c rename to dll/opengl/mesa/main/mm.c diff --git a/dll/opengl/mesa/src/mesa/main/mm.h b/dll/opengl/mesa/main/mm.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/mm.h rename to dll/opengl/mesa/main/mm.h diff --git a/dll/opengl/mesa/src/mesa/main/mtypes.h b/dll/opengl/mesa/main/mtypes.h similarity index 54% rename from dll/opengl/mesa/src/mesa/main/mtypes.h rename to dll/opengl/mesa/main/mtypes.h index b86aeb6c1f1..7cc01fef843 100644 --- a/dll/opengl/mesa/src/mesa/main/mtypes.h +++ b/dll/opengl/mesa/main/mtypes.h @@ -37,7 +37,6 @@ #include "main/glheader.h" #include "main/config.h" #include "main/mfeatures.h" -#include "glapi/glapi.h" #include "math/m_matrix.h" /* GLmatrix */ #include "main/simple_list.h" /* struct simple_node */ #include "main/formats.h" /* MESA_FORMAT_COUNT */ @@ -72,11 +71,9 @@ struct _mesa_HashTable; struct gl_attrib_node; struct gl_list_extensions; struct gl_meta_state; -struct gl_program_cache; struct gl_texture_object; struct gl_context; struct st_context; -struct gl_uniform_storage; /*@}*/ @@ -86,19 +83,6 @@ struct gl_uniform_storage; #define PRIM_UNKNOWN (GL_POLYGON+3) -/** - * Shader stages. Note that these will become 5 with tessellation. - * These MUST have the same values as gallium's PIPE_SHADER_* - */ -typedef enum -{ - MESA_SHADER_VERTEX = 0, - MESA_SHADER_FRAGMENT = 1, - MESA_SHADER_GEOMETRY = 2, - MESA_SHADER_TYPES = 3 -} gl_shader_type; - - /** * Indexes for vertex program attributes. @@ -117,62 +101,17 @@ typedef enum VERT_ATTRIB_FOG = 5, VERT_ATTRIB_COLOR_INDEX = 6, VERT_ATTRIB_EDGEFLAG = 7, - VERT_ATTRIB_TEX0 = 8, - VERT_ATTRIB_TEX1 = 9, - VERT_ATTRIB_TEX2 = 10, - VERT_ATTRIB_TEX3 = 11, - VERT_ATTRIB_TEX4 = 12, - VERT_ATTRIB_TEX5 = 13, - VERT_ATTRIB_TEX6 = 14, - VERT_ATTRIB_TEX7 = 15, - VERT_ATTRIB_POINT_SIZE = 16, - VERT_ATTRIB_GENERIC0 = 17, - VERT_ATTRIB_GENERIC1 = 18, - VERT_ATTRIB_GENERIC2 = 19, - VERT_ATTRIB_GENERIC3 = 20, - VERT_ATTRIB_GENERIC4 = 21, - VERT_ATTRIB_GENERIC5 = 22, - VERT_ATTRIB_GENERIC6 = 23, - VERT_ATTRIB_GENERIC7 = 24, - VERT_ATTRIB_GENERIC8 = 25, - VERT_ATTRIB_GENERIC9 = 26, - VERT_ATTRIB_GENERIC10 = 27, - VERT_ATTRIB_GENERIC11 = 28, - VERT_ATTRIB_GENERIC12 = 29, - VERT_ATTRIB_GENERIC13 = 30, - VERT_ATTRIB_GENERIC14 = 31, - VERT_ATTRIB_GENERIC15 = 32, - VERT_ATTRIB_MAX = 33 + VERT_ATTRIB_TEX = 8, + VERT_ATTRIB_POINT_SIZE = 9, + VERT_ATTRIB_MAX = 10 } gl_vert_attrib; /** * Symbolic constats to help iterating over * specific blocks of vertex attributes. * - * VERT_ATTRIB_FF - * includes all fixed function attributes as well as - * the aliased GL_NV_vertex_program shader attributes. - * VERT_ATTRIB_TEX - * include the classic texture coordinate attributes. - * Is a subset of VERT_ATTRIB_FF. - * VERT_ATTRIB_GENERIC_NV - * include the NV shader attributes. - * Is a subset of VERT_ATTRIB_FF. - * VERT_ATTRIB_GENERIC - * include the OpenGL 2.0+ GLSL generic shader attributes. - * These alias the generic GL_ARB_vertex_shader attributes. */ -#define VERT_ATTRIB_FF(i) (VERT_ATTRIB_POS + (i)) -#define VERT_ATTRIB_FF_MAX VERT_ATTRIB_GENERIC0 - -#define VERT_ATTRIB_TEX(i) (VERT_ATTRIB_TEX0 + (i)) -#define VERT_ATTRIB_TEX_MAX MAX_TEXTURE_COORD_UNITS - -#define VERT_ATTRIB_GENERIC_NV(i) (VERT_ATTRIB_POS + (i)) -#define VERT_ATTRIB_GENERIC_NV_MAX MAX_VERTEX_GENERIC_ATTRIBS - -#define VERT_ATTRIB_GENERIC(i) (VERT_ATTRIB_GENERIC0 + (i)) -#define VERT_ATTRIB_GENERIC_MAX MAX_VERTEX_GENERIC_ATTRIBS +#define VERT_ATTRIB(i) (VERT_ATTRIB_POS + (i)) /** * Bitflags for vertex attributes. @@ -187,137 +126,15 @@ typedef enum #define VERT_BIT_FOG BITFIELD64_BIT(VERT_ATTRIB_FOG) #define VERT_BIT_COLOR_INDEX BITFIELD64_BIT(VERT_ATTRIB_COLOR_INDEX) #define VERT_BIT_EDGEFLAG BITFIELD64_BIT(VERT_ATTRIB_EDGEFLAG) -#define VERT_BIT_TEX0 BITFIELD64_BIT(VERT_ATTRIB_TEX0) -#define VERT_BIT_TEX1 BITFIELD64_BIT(VERT_ATTRIB_TEX1) -#define VERT_BIT_TEX2 BITFIELD64_BIT(VERT_ATTRIB_TEX2) -#define VERT_BIT_TEX3 BITFIELD64_BIT(VERT_ATTRIB_TEX3) -#define VERT_BIT_TEX4 BITFIELD64_BIT(VERT_ATTRIB_TEX4) -#define VERT_BIT_TEX5 BITFIELD64_BIT(VERT_ATTRIB_TEX5) -#define VERT_BIT_TEX6 BITFIELD64_BIT(VERT_ATTRIB_TEX6) -#define VERT_BIT_TEX7 BITFIELD64_BIT(VERT_ATTRIB_TEX7) +#define VERT_BIT_TEX BITFIELD64_BIT(VERT_ATTRIB_TEX) #define VERT_BIT_POINT_SIZE BITFIELD64_BIT(VERT_ATTRIB_POINT_SIZE) -#define VERT_BIT_GENERIC0 BITFIELD64_BIT(VERT_ATTRIB_GENERIC0) #define VERT_BIT(i) BITFIELD64_BIT(i) #define VERT_BIT_ALL (BITFIELD64_BIT(VERT_ATTRIB_MAX) - 1) -#define VERT_BIT_FF(i) VERT_BIT(i) -#define VERT_BIT_FF_ALL (BITFIELD64_BIT(VERT_ATTRIB_FF_MAX) - 1) -#define VERT_BIT_TEX(i) VERT_BIT(VERT_ATTRIB_TEX(i)) -#define VERT_BIT_TEX_ALL \ - ((BITFIELD64_BIT(VERT_ATTRIB_TEX_MAX) - 1) << VERT_ATTRIB_TEX(0)) -#define VERT_BIT_GENERIC_NV(i) VERT_BIT(VERT_ATTRIB_GENERIC_NV(i)) -#define VERT_BIT_GENERIC_NV_ALL \ - ((BITFIELD64_BIT(VERT_ATTRIB_GENERIC_NV_MAX) - 1) << (VERT_ATTRIB_GENERIC_NV(0))) -#define VERT_BIT_GENERIC(i) VERT_BIT(VERT_ATTRIB_GENERIC(i)) -#define VERT_BIT_GENERIC_ALL \ - ((BITFIELD64_BIT(VERT_ATTRIB_GENERIC_MAX) - 1) << (VERT_ATTRIB_GENERIC(0))) /*@}*/ -/** - * Indexes for vertex program result attributes. Note that - * _mesa_vert_result_to_frag_attrib() and _mesa_frag_attrib_to_vert_result() make - * assumptions about the layout of this enum. - */ -typedef enum -{ - VERT_RESULT_HPOS = 0, - VERT_RESULT_COL0 = 1, - VERT_RESULT_COL1 = 2, - VERT_RESULT_FOGC = 3, - VERT_RESULT_TEX0 = 4, - VERT_RESULT_TEX1 = 5, - VERT_RESULT_TEX2 = 6, - VERT_RESULT_TEX3 = 7, - VERT_RESULT_TEX4 = 8, - VERT_RESULT_TEX5 = 9, - VERT_RESULT_TEX6 = 10, - VERT_RESULT_TEX7 = 11, - VERT_RESULT_PSIZ = 12, - VERT_RESULT_BFC0 = 13, - VERT_RESULT_BFC1 = 14, - VERT_RESULT_EDGE = 15, - VERT_RESULT_CLIP_VERTEX = 16, - VERT_RESULT_CLIP_DIST0 = 17, - VERT_RESULT_CLIP_DIST1 = 18, - VERT_RESULT_VAR0 = 19, /**< shader varying */ - VERT_RESULT_MAX = (VERT_RESULT_VAR0 + MAX_VARYING) -} gl_vert_result; - - -/*********************************************/ - -/** - * Indexes for geometry program attributes. - */ -typedef enum -{ - GEOM_ATTRIB_POSITION = 0, - GEOM_ATTRIB_COLOR0 = 1, - GEOM_ATTRIB_COLOR1 = 2, - GEOM_ATTRIB_SECONDARY_COLOR0 = 3, - GEOM_ATTRIB_SECONDARY_COLOR1 = 4, - GEOM_ATTRIB_FOG_FRAG_COORD = 5, - GEOM_ATTRIB_POINT_SIZE = 6, - GEOM_ATTRIB_CLIP_VERTEX = 7, - GEOM_ATTRIB_PRIMITIVE_ID = 8, - GEOM_ATTRIB_TEX_COORD = 9, - - GEOM_ATTRIB_VAR0 = 16, - GEOM_ATTRIB_MAX = (GEOM_ATTRIB_VAR0 + MAX_VARYING) -} gl_geom_attrib; - -/** - * Bitflags for geometry attributes. - * These are used in bitfields in many places. - */ -/*@{*/ -#define GEOM_BIT_COLOR0 (1 << GEOM_ATTRIB_COLOR0) -#define GEOM_BIT_COLOR1 (1 << GEOM_ATTRIB_COLOR1) -#define GEOM_BIT_SCOLOR0 (1 << GEOM_ATTRIB_SECONDARY_COLOR0) -#define GEOM_BIT_SCOLOR1 (1 << GEOM_ATTRIB_SECONDARY_COLOR1) -#define GEOM_BIT_TEX_COORD (1 << GEOM_ATTRIB_TEX_COORD) -#define GEOM_BIT_FOG_COORD (1 << GEOM_ATTRIB_FOG_FRAG_COORD) -#define GEOM_BIT_POSITION (1 << GEOM_ATTRIB_POSITION) -#define GEOM_BIT_POINT_SIDE (1 << GEOM_ATTRIB_POINT_SIZE) -#define GEOM_BIT_CLIP_VERTEX (1 << GEOM_ATTRIB_CLIP_VERTEX) -#define GEOM_BIT_PRIM_ID (1 << GEOM_ATTRIB_PRIMITIVE_ID) -#define GEOM_BIT_VAR0 (1 << GEOM_ATTRIB_VAR0) - -#define GEOM_BIT_VAR(g) (1 << (GEOM_BIT_VAR0 + (g))) -/*@}*/ - - -/** - * Indexes for geometry program result attributes - */ -typedef enum -{ - GEOM_RESULT_POS = 0, - GEOM_RESULT_COL0 = 1, - GEOM_RESULT_COL1 = 2, - GEOM_RESULT_SCOL0 = 3, - GEOM_RESULT_SCOL1 = 4, - GEOM_RESULT_FOGC = 5, - GEOM_RESULT_TEX0 = 6, - GEOM_RESULT_TEX1 = 7, - GEOM_RESULT_TEX2 = 8, - GEOM_RESULT_TEX3 = 9, - GEOM_RESULT_TEX4 = 10, - GEOM_RESULT_TEX5 = 11, - GEOM_RESULT_TEX6 = 12, - GEOM_RESULT_TEX7 = 13, - GEOM_RESULT_PSIZ = 14, - GEOM_RESULT_CLPV = 15, - GEOM_RESULT_PRID = 16, - GEOM_RESULT_LAYR = 17, - GEOM_RESULT_VAR0 = 18, /**< shader varying, should really be 16 */ - /* ### we need to -2 because var0 is 18 instead 16 like in the others */ - GEOM_RESULT_MAX = (GEOM_RESULT_VAR0 + MAX_VARYING - 2) -} gl_geom_result; - - /** * Indexes for fragment program input attributes. Note that * _mesa_vert_result_to_frag_attrib() and frag_attrib_to_vert_result() make @@ -329,118 +146,19 @@ typedef enum FRAG_ATTRIB_COL0 = 1, FRAG_ATTRIB_COL1 = 2, FRAG_ATTRIB_FOGC = 3, - FRAG_ATTRIB_TEX0 = 4, - FRAG_ATTRIB_TEX1 = 5, - FRAG_ATTRIB_TEX2 = 6, - FRAG_ATTRIB_TEX3 = 7, - FRAG_ATTRIB_TEX4 = 8, - FRAG_ATTRIB_TEX5 = 9, - FRAG_ATTRIB_TEX6 = 10, - FRAG_ATTRIB_TEX7 = 11, - FRAG_ATTRIB_FACE = 12, /**< front/back face */ - FRAG_ATTRIB_PNTC = 13, /**< sprite/point coord */ - FRAG_ATTRIB_CLIP_DIST0 = 14, - FRAG_ATTRIB_CLIP_DIST1 = 15, - FRAG_ATTRIB_VAR0 = 16, /**< shader varying */ - FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + MAX_VARYING) + FRAG_ATTRIB_TEX = 4, + FRAG_ATTRIB_FACE = 5, /**< front/back face */ + FRAG_ATTRIB_PNTC = 6, /**< sprite/point coord */ + FRAG_ATTRIB_CLIP_DIST0 = 7, + FRAG_ATTRIB_CLIP_DIST1 = 8, + FRAG_ATTRIB_MAX = 9 } gl_frag_attrib; -/** - * Convert from a gl_vert_result value to the corresponding gl_frag_attrib. - * - * VERT_RESULT_HPOS is converted to FRAG_ATTRIB_WPOS. - * - * gl_vert_result values which have no corresponding gl_frag_attrib - * (VERT_RESULT_PSIZ, VERT_RESULT_BFC0, VERT_RESULT_BFC1, and - * VERT_RESULT_EDGE) are converted to a value of -1. - */ -static inline int -_mesa_vert_result_to_frag_attrib(gl_vert_result vert_result) -{ - if (vert_result >= VERT_RESULT_CLIP_DIST0) - return vert_result - VERT_RESULT_CLIP_DIST0 + FRAG_ATTRIB_CLIP_DIST0; - else if (vert_result <= VERT_RESULT_TEX7) - return vert_result; - else - return -1; -} - - -/** - * Convert from a gl_frag_attrib value to the corresponding gl_vert_result. - * - * FRAG_ATTRIB_WPOS is converted to VERT_RESULT_HPOS. - * - * gl_frag_attrib values which have no corresponding gl_vert_result - * (FRAG_ATTRIB_FACE and FRAG_ATTRIB_PNTC) are converted to a value of -1. - */ -static inline int -_mesa_frag_attrib_to_vert_result(gl_frag_attrib frag_attrib) -{ - if (frag_attrib <= FRAG_ATTRIB_TEX7) - return frag_attrib; - else if (frag_attrib >= FRAG_ATTRIB_CLIP_DIST0) - return frag_attrib - FRAG_ATTRIB_CLIP_DIST0 + VERT_RESULT_CLIP_DIST0; - else - return -1; -} - - -/** - * Bitflags for fragment program input attributes. - */ -/*@{*/ -#define FRAG_BIT_WPOS (1 << FRAG_ATTRIB_WPOS) #define FRAG_BIT_COL0 (1 << FRAG_ATTRIB_COL0) #define FRAG_BIT_COL1 (1 << FRAG_ATTRIB_COL1) #define FRAG_BIT_FOGC (1 << FRAG_ATTRIB_FOGC) -#define FRAG_BIT_FACE (1 << FRAG_ATTRIB_FACE) -#define FRAG_BIT_PNTC (1 << FRAG_ATTRIB_PNTC) -#define FRAG_BIT_TEX0 (1 << FRAG_ATTRIB_TEX0) -#define FRAG_BIT_TEX1 (1 << FRAG_ATTRIB_TEX1) -#define FRAG_BIT_TEX2 (1 << FRAG_ATTRIB_TEX2) -#define FRAG_BIT_TEX3 (1 << FRAG_ATTRIB_TEX3) -#define FRAG_BIT_TEX4 (1 << FRAG_ATTRIB_TEX4) -#define FRAG_BIT_TEX5 (1 << FRAG_ATTRIB_TEX5) -#define FRAG_BIT_TEX6 (1 << FRAG_ATTRIB_TEX6) -#define FRAG_BIT_TEX7 (1 << FRAG_ATTRIB_TEX7) -#define FRAG_BIT_VAR0 (1 << FRAG_ATTRIB_VAR0) - -#define FRAG_BIT_TEX(U) (FRAG_BIT_TEX0 << (U)) -#define FRAG_BIT_VAR(V) (FRAG_BIT_VAR0 << (V)) - -#define FRAG_BITS_TEX_ANY (FRAG_BIT_TEX0| \ - FRAG_BIT_TEX1| \ - FRAG_BIT_TEX2| \ - FRAG_BIT_TEX3| \ - FRAG_BIT_TEX4| \ - FRAG_BIT_TEX5| \ - FRAG_BIT_TEX6| \ - FRAG_BIT_TEX7) -/*@}*/ - - -/** - * Fragment program results - */ -typedef enum -{ - FRAG_RESULT_DEPTH = 0, - FRAG_RESULT_STENCIL = 1, - /* If a single color should be written to all render targets, this - * register is written. No FRAG_RESULT_DATAn will be written. - */ - FRAG_RESULT_COLOR = 2, - - /* FRAG_RESULT_DATAn are the per-render-target (GLSL gl_FragData[n] - * or ARB_fragment_program fragment.color[n]) color results. If - * any are written, FRAG_RESULT_COLOR will not be written. - */ - FRAG_RESULT_DATA0 = 3, - FRAG_RESULT_MAX = (FRAG_RESULT_DATA0 + MAX_DRAW_BUFFERS) -} gl_frag_result; - +#define FRAG_BIT_TEX (1 << FRAG_ATTRIB_TEX) /** * Indexes for all renderbuffers @@ -457,15 +175,6 @@ typedef enum BUFFER_ACCUM, /* optional aux buffer */ BUFFER_AUX0, - /* generic renderbuffers */ - BUFFER_COLOR0, - BUFFER_COLOR1, - BUFFER_COLOR2, - BUFFER_COLOR3, - BUFFER_COLOR4, - BUFFER_COLOR5, - BUFFER_COLOR6, - BUFFER_COLOR7, BUFFER_COUNT } gl_buffer_index; @@ -483,14 +192,6 @@ typedef enum #define BUFFER_BIT_DEPTH (1 << BUFFER_DEPTH) #define BUFFER_BIT_STENCIL (1 << BUFFER_STENCIL) #define BUFFER_BIT_ACCUM (1 << BUFFER_ACCUM) -#define BUFFER_BIT_COLOR0 (1 << BUFFER_COLOR0) -#define BUFFER_BIT_COLOR1 (1 << BUFFER_COLOR1) -#define BUFFER_BIT_COLOR2 (1 << BUFFER_COLOR2) -#define BUFFER_BIT_COLOR3 (1 << BUFFER_COLOR3) -#define BUFFER_BIT_COLOR4 (1 << BUFFER_COLOR4) -#define BUFFER_BIT_COLOR5 (1 << BUFFER_COLOR5) -#define BUFFER_BIT_COLOR6 (1 << BUFFER_COLOR6) -#define BUFFER_BIT_COLOR7 (1 << BUFFER_COLOR7) /** * Mask of all the color buffer bits (but not accum). @@ -499,15 +200,7 @@ typedef enum BUFFER_BIT_BACK_LEFT | \ BUFFER_BIT_FRONT_RIGHT | \ BUFFER_BIT_BACK_RIGHT | \ - BUFFER_BIT_AUX0 | \ - BUFFER_BIT_COLOR0 | \ - BUFFER_BIT_COLOR1 | \ - BUFFER_BIT_COLOR2 | \ - BUFFER_BIT_COLOR3 | \ - BUFFER_BIT_COLOR4 | \ - BUFFER_BIT_COLOR5 | \ - BUFFER_BIT_COLOR6 | \ - BUFFER_BIT_COLOR7) + BUFFER_BIT_AUX0) /** @@ -518,7 +211,6 @@ typedef enum struct gl_config { GLboolean rgbMode; - GLboolean floatMode; GLboolean colorIndexMode; /* XXX is this used anywhere? */ GLuint doubleBufferMode; GLuint stereoMode; @@ -549,10 +241,6 @@ struct gl_config GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha; GLint transparentIndex; - /* ARB_multisample / SGIS_multisample */ - GLint sampleBuffers; - GLint samples; - /* SGIX_pbuffer / GLX 1.3 */ GLint maxPbufferWidth; GLint maxPbufferHeight; @@ -569,9 +257,6 @@ struct gl_config GLint bindToMipmapTexture; GLint bindToTextureTargets; GLint yInverted; - - /* EXT_framebuffer_sRGB */ - GLint sRGBCapable; }; @@ -744,9 +429,9 @@ struct gl_colorbuffer_attrib GLuint ClearIndex; /**< Index for glClear */ union gl_color_union ClearColor; /**< Color for glClear, unclamped */ GLuint IndexMask; /**< Color index write mask */ - GLubyte ColorMask[MAX_DRAW_BUFFERS][4]; /**< Each flag is 0xff or 0x0 */ + GLubyte ColorMask[4]; /**< Each flag is 0xff or 0x0 */ - GLenum DrawBuffer[MAX_DRAW_BUFFERS]; /**< Which buffer to draw into */ + GLenum DrawBuffer; /**< Which buffer to draw into */ /** * \name alpha testing @@ -754,7 +439,6 @@ struct gl_colorbuffer_attrib /*@{*/ GLboolean AlphaEnabled; /**< Alpha test enabled flag */ GLenum AlphaFunc; /**< Alpha test function */ - GLfloat AlphaRefUnclamped; GLclampf AlphaRef; /**< Alpha reference value */ /*@}*/ @@ -768,22 +452,14 @@ struct gl_colorbuffer_attrib * control, only on the fixed-pointness of the render target. * The query does however depend on fragment color clamping. */ - GLfloat BlendColorUnclamped[4]; /**< Blending color */ - GLfloat BlendColor[4]; /**< Blending color */ + GLfloat BlendColor[4]; /**< Blending color */ - struct - { - GLenum SrcRGB; /**< RGB blend source term */ - GLenum DstRGB; /**< RGB blend dest term */ - GLenum SrcA; /**< Alpha blend source term */ - GLenum DstA; /**< Alpha blend dest term */ - GLenum EquationRGB; /**< GL_ADD, GL_SUBTRACT, etc. */ - GLenum EquationA; /**< GL_ADD, GL_SUBTRACT, etc. */ - } Blend[MAX_DRAW_BUFFERS]; - /** Are the blend func terms currently different for each buffer/target? */ - GLboolean _BlendFuncPerBuffer; - /** Are the blend equations currently different for each buffer/target? */ - GLboolean _BlendEquationPerBuffer; + GLenum SrcRGB; /**< RGB blend source term */ + GLenum DstRGB; /**< RGB blend dest term */ + GLenum SrcA; /**< Alpha blend source term */ + GLenum DstA; /**< Alpha blend dest term */ + GLenum EquationRGB; /**< GL_ADD, GL_SUBTRACT, etc. */ + GLenum EquationA; /**< GL_ADD, GL_SUBTRACT, etc. */ /*@}*/ /** @@ -796,13 +472,6 @@ struct gl_colorbuffer_attrib /*@}*/ GLboolean DitherFlag; /**< Dither enable flag */ - - GLenum ClampFragmentColor; /**< GL_TRUE, GL_FALSE or GL_FIXED_ONLY_ARB */ - GLboolean _ClampFragmentColor; /** < with GL_FIXED_ONLY_ARB resolved */ - GLenum ClampReadColor; /**< GL_TRUE, GL_FALSE or GL_FIXED_ONLY_ARB */ - GLboolean _ClampReadColor; /** < with GL_FIXED_ONLY_ARB resolved */ - - GLboolean sRGBEnabled; /**< Framebuffer sRGB blending/updating requested */ }; @@ -828,7 +497,7 @@ struct gl_current_attrib GLfloat RasterDistance; GLfloat RasterColor[4]; GLfloat RasterSecondaryColor[4]; - GLfloat RasterTexCoords[MAX_TEXTURE_COORD_UNITS][4]; + GLfloat RasterTexCoords[4]; GLboolean RasterPosValid; /*@}*/ }; @@ -866,7 +535,6 @@ struct gl_eval_attrib GLboolean Map1TextureCoord4; GLboolean Map1Vertex3; GLboolean Map1Vertex4; - GLboolean Map1Attrib[16]; /* GL_NV_vertex_program */ GLboolean Map2Color4; GLboolean Map2Index; GLboolean Map2Normal; @@ -876,7 +544,6 @@ struct gl_eval_attrib GLboolean Map2TextureCoord4; GLboolean Map2Vertex3; GLboolean Map2Vertex4; - GLboolean Map2Attrib[16]; /* GL_NV_vertex_program */ GLboolean AutoNormal; /*@}*/ @@ -899,7 +566,6 @@ struct gl_eval_attrib struct gl_fog_attrib { GLboolean Enabled; /**< Fog enabled flag */ - GLfloat ColorUnclamped[4]; /**< Fog color */ GLfloat Color[4]; /**< Fog color */ GLfloat Density; /**< Density >= 0.0 */ GLfloat Start; /**< Start distance in eye coords */ @@ -943,9 +609,6 @@ struct gl_hint_attrib GLenum PolygonSmooth; GLenum Fog; GLenum ClipVolumeClipping; /**< GL_EXT_clip_volume_hint */ - GLenum TextureCompression; /**< GL_ARB_texture_compression */ - GLenum GenerateMipmap; /**< GL_SGIS_generate_mipmap */ - GLenum FragmentShaderDerivative; /**< GL_ARB_fragment_shader */ }; /** @@ -976,13 +639,10 @@ struct gl_light_attrib GLboolean Enabled; /**< Lighting enabled flag */ GLenum ShadeModel; /**< GL_FLAT or GL_SMOOTH */ - GLenum ProvokingVertex; /**< GL_EXT_provoking_vertex */ GLenum ColorMaterialFace; /**< GL_FRONT, BACK or FRONT_AND_BACK */ GLenum ColorMaterialMode; /**< GL_AMBIENT, GL_DIFFUSE, etc */ GLbitfield ColorMaterialBitmask; /**< bitmask formed from Face and Mode */ GLboolean ColorMaterialEnabled; - GLenum ClampVertexColor; - GLboolean _ClampVertexColor; struct gl_light EnabledList; /**< List sentinel */ @@ -1108,7 +768,7 @@ struct gl_point_attrib GLfloat Threshold; /**< GL_EXT_point_parameters */ GLboolean _Attenuated; /**< True if Params != [1, 0, 0] */ GLboolean PointSprite; /**< GL_NV/ARB_point_sprite */ - GLboolean CoordReplace[MAX_TEXTURE_COORD_UNITS]; /**< GL_ARB_point_sprite*/ + GLboolean CoordReplace; /**< GL_ARB_point_sprite*/ GLenum SpriteRMode; /**< GL_NV_point_sprite (only!) */ GLenum SpriteOrigin; /**< GL_ARB_point_sprite */ }; @@ -1149,34 +809,18 @@ struct gl_scissor_attrib /** * Stencil attribute group (GL_STENCIL_BUFFER_BIT). * - * Three sets of stencil data are tracked so that OpenGL 2.0, - * GL_EXT_stencil_two_side, and GL_ATI_separate_stencil can all be supported - * simultaneously. In each of the stencil state arrays, element 0 corresponds - * to GL_FRONT. Element 1 corresponds to the OpenGL 2.0 / - * GL_ATI_separate_stencil GL_BACK state. Element 2 corresponds to the - * GL_EXT_stencil_two_side GL_BACK state. - * - * The derived value \c _BackFace is either 1 or 2 depending on whether or - * not GL_STENCIL_TEST_TWO_SIDE_EXT is enabled. - * - * The derived value \c _TestTwoSide is set when the front-face and back-face - * stencil state are different. */ struct gl_stencil_attrib { GLboolean Enabled; /**< Enabled flag */ - GLboolean TestTwoSide; /**< GL_EXT_stencil_two_side */ - GLubyte ActiveFace; /**< GL_EXT_stencil_two_side (0 or 2) */ GLboolean _Enabled; /**< Enabled and stencil buffer present */ - GLboolean _TestTwoSide; - GLubyte _BackFace; /**< Current back stencil state (1 or 2) */ - GLenum Function[3]; /**< Stencil function */ - GLenum FailFunc[3]; /**< Fail function */ - GLenum ZPassFunc[3]; /**< Depth buffer pass function */ - GLenum ZFailFunc[3]; /**< Depth buffer fail function */ - GLint Ref[3]; /**< Reference value */ - GLuint ValueMask[3]; /**< Value mask */ - GLuint WriteMask[3]; /**< Write mask */ + GLenum Function; /**< Stencil function */ + GLenum FailFunc; /**< Fail function */ + GLenum ZPassFunc; /**< Depth buffer pass function */ + GLenum ZFailFunc; /**< Depth buffer fail function */ + GLint Ref; /**< Reference value */ + GLuint ValueMask; /**< Value mask */ + GLuint WriteMask; /**< Write mask */ GLuint Clear; /**< Clear value */ }; @@ -1188,13 +832,8 @@ struct gl_stencil_attrib */ typedef enum { - TEXTURE_BUFFER_INDEX, - TEXTURE_2D_ARRAY_INDEX, - TEXTURE_1D_ARRAY_INDEX, - TEXTURE_EXTERNAL_INDEX, TEXTURE_CUBE_INDEX, TEXTURE_3D_INDEX, - TEXTURE_RECT_INDEX, TEXTURE_2D_INDEX, TEXTURE_1D_INDEX, NUM_TEXTURE_TARGETS @@ -1206,13 +845,8 @@ typedef enum * Used for Texture.Unit[]._ReallyEnabled flags. */ /*@{*/ -#define TEXTURE_BUFFER_BIT (1 << TEXTURE_BUFFER_INDEX) -#define TEXTURE_2D_ARRAY_BIT (1 << TEXTURE_2D_ARRAY_INDEX) -#define TEXTURE_1D_ARRAY_BIT (1 << TEXTURE_1D_ARRAY_INDEX) -#define TEXTURE_EXTERNAL_BIT (1 << TEXTURE_EXTERNAL_INDEX) #define TEXTURE_CUBE_BIT (1 << TEXTURE_CUBE_INDEX) #define TEXTURE_3D_BIT (1 << TEXTURE_3D_INDEX) -#define TEXTURE_RECT_BIT (1 << TEXTURE_RECT_INDEX) #define TEXTURE_2D_BIT (1 << TEXTURE_2D_INDEX) #define TEXTURE_1D_BIT (1 << TEXTURE_1D_INDEX) /*@}*/ @@ -1306,7 +940,6 @@ typedef enum MAX_FACES = 6 } gl_face_index; - /** * Sampler object state. These objects are new with GL_ARB_sampler_objects * and OpenGL 3.3. Legacy texture objects also contain a sampler object. @@ -1322,18 +955,8 @@ struct gl_sampler_object GLenum MinFilter; /**< minification filter */ GLenum MagFilter; /**< magnification filter */ union gl_color_union BorderColor; /**< Interpreted according to texture format */ - GLfloat MinLod; /**< min lambda, OpenGL 1.2 */ - GLfloat MaxLod; /**< max lambda, OpenGL 1.2 */ - GLfloat LodBias; /**< OpenGL 1.4 */ GLfloat MaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */ - GLenum CompareMode; /**< GL_ARB_shadow */ - GLenum CompareFunc; /**< GL_ARB_shadow */ - GLfloat CompareFailValue; /**< GL_ARB_shadow_ambient */ - GLenum sRGBDecode; /**< GL_DECODE_EXT or GL_SKIP_DECODE_EXT */ - GLboolean CubeMapSeamless; /**< GL_AMD_seamless_cubemap_per_texture */ - /* deprecated sampler state */ - GLenum DepthMode; /**< GL_ARB_depth_texture */ }; @@ -1355,24 +978,12 @@ struct gl_texture_object GLint MaxLevel; /**< max mipmap level, OpenGL 1.2 */ GLint _MaxLevel; /**< actual max mipmap level (q in the spec) */ GLfloat _MaxLambda; /**< = _MaxLevel - BaseLevel (q - b in spec) */ - GLint CropRect[4]; /**< GL_OES_draw_texture */ - GLenum Swizzle[4]; /**< GL_EXT_texture_swizzle */ - GLuint _Swizzle; /**< same as Swizzle, but SWIZZLE_* format */ - GLboolean GenerateMipmap; /**< GL_SGIS_generate_mipmap */ GLboolean _Complete; /**< Is texture object complete? */ - GLboolean _RenderToTexture; /**< Any rendering to this texture? */ GLboolean Purgeable; /**< Is the buffer purgeable under memory pressure? */ GLboolean Immutable; /**< GL_ARB_texture_storage */ /** Actual texture images, indexed by [cube face] and [mipmap level] */ struct gl_texture_image *Image[MAX_FACES][MAX_TEXTURE_LEVELS]; - - /** GL_ARB_texture_buffer_object */ - struct gl_buffer_object *BufferObject; - GLenum BufferObjectFormat; - - /** GL_OES_EGL_image_external */ - GLint RequiredTextureImageUnits; }; @@ -1423,7 +1034,6 @@ struct gl_texture_unit GLenum EnvMode; /**< GL_MODULATE, GL_DECAL, GL_BLEND, etc. */ GLclampf EnvColor[4]; - GLfloat EnvColorUnclamped[4]; struct gl_texgen GenS; struct gl_texgen GenT; @@ -1433,11 +1043,6 @@ struct gl_texture_unit GLbitfield _GenFlags; /**< Bitwise-OR of Gen[STRQ]._ModeBit */ GLfloat LodBias; /**< for biasing mipmap levels */ - GLenum BumpTarget; - GLfloat RotMatrix[4]; /* 2x2 matrix */ - - /** Current sampler object (GL_ARB_sampler_objects) */ - struct gl_sampler_object *Sampler; /** * \name GL_EXT_texture_env_combine @@ -1469,28 +1074,20 @@ struct gl_texture_unit */ struct gl_texture_attrib { - GLuint CurrentUnit; /**< GL_ACTIVE_TEXTURE */ - struct gl_texture_unit Unit[MAX_COMBINED_TEXTURE_IMAGE_UNITS]; + struct gl_texture_unit Unit; struct gl_texture_object *ProxyTex[NUM_TEXTURE_TARGETS]; - - /** GL_ARB_texture_buffer_object */ - struct gl_buffer_object *BufferObject; - - /** GL_ARB_seamless_cubemap */ - GLboolean CubeMapSeamless; - - /** Texture units/samplers used by vertex or fragment texturing */ - GLbitfield _EnabledUnits; + + GLboolean _Enabled; /** Texture coord units/sets used for fragment texturing */ - GLbitfield _EnabledCoordUnits; + GLboolean _EnabledCoord; /** Texture coord units that have texgen enabled */ - GLbitfield _TexGenEnabled; + GLboolean _TexGenEnabled; /** Texture coord units that have non-identity matrices */ - GLbitfield _TexMatEnabled; + GLboolean _TexMatEnabled; /** Bitwise-OR of all Texture.Unit[i]._GenFlags */ GLbitfield _GenFlags; @@ -1516,7 +1113,6 @@ struct gl_transform_attrib GLboolean Normalize; /**< Normalize all normals? */ GLboolean RescaleNormals; /**< GL_EXT_rescale_normal */ GLboolean RasterPositionUnclipped; /**< GL_IBM_rasterpos_clip */ - GLboolean DepthClamp; /**< GL_ARB_depth_clamp */ GLfloat CullEyePos[4]; GLfloat CullObjPos[4]; @@ -1573,7 +1169,6 @@ struct gl_pixelstore_attrib GLboolean SwapBytes; GLboolean LsbFirst; GLboolean Invert; /**< GL_MESA_pack_invert */ - struct gl_buffer_object *BufferObj; /**< GL_ARB_pixel_buffer_object */ }; @@ -1584,14 +1179,12 @@ struct gl_client_array { GLint Size; /**< components per element (1,2,3,4) */ GLenum Type; /**< datatype: GL_FLOAT, GL_INT, etc */ - GLenum Format; /**< default: GL_RGBA, but may be GL_BGRA */ GLsizei Stride; /**< user-specified stride */ GLsizei StrideB; /**< actual stride in bytes */ const GLubyte *Ptr; /**< Points to array data */ GLboolean Enabled; /**< Enabled flag is a boolean */ GLboolean Normalized; /**< GL_ARB_vertex_program */ GLboolean Integer; /**< Integer-valued? */ - GLuint InstanceDivisor; /**< GL_ARB_instanced_arrays */ GLuint _ElementSize; /**< size of each element in bytes */ struct gl_buffer_object *BufferObj;/**< GL_ARB_vertex_buffer_object */ @@ -1662,14 +1255,9 @@ struct gl_array_attrib /** Array objects (GL_ARB/APPLE_vertex_array_object) */ struct _mesa_HashTable *Objects; - GLint ActiveTexture; /**< Client Active Texture */ GLuint LockFirst; /**< GL_EXT_compiled_vertex_array */ GLuint LockCount; /**< GL_EXT_compiled_vertex_array */ - /** GL 3.1 (slightly different from GL_NV_primitive_restart) */ - GLboolean PrimitiveRestart; - GLuint RestartIndex; - GLbitfield64 NewState; /**< mask of VERT_BIT_* values */ GLboolean RebindArrays; /**< whether the VBO module should rebind arrays */ @@ -1750,7 +1338,6 @@ struct gl_evaluators struct gl_1d_map Map1Texture2; struct gl_1d_map Map1Texture3; struct gl_1d_map Map1Texture4; - struct gl_1d_map Map1Attrib[16]; /**< GL_NV_vertex_program */ /*@}*/ /** @@ -1766,707 +1353,10 @@ struct gl_evaluators struct gl_2d_map Map2Texture2; struct gl_2d_map Map2Texture3; struct gl_2d_map Map2Texture4; - struct gl_2d_map Map2Attrib[16]; /**< GL_NV_vertex_program */ /*@}*/ }; -/** - * Names of the various vertex/fragment program register files, etc. - * - * NOTE: first four tokens must fit into 2 bits (see t_vb_arbprogram.c) - * All values should fit in a 4-bit field. - * - * NOTE: PROGRAM_ENV_PARAM, PROGRAM_STATE_VAR, PROGRAM_NAMED_PARAM, - * PROGRAM_CONSTANT, and PROGRAM_UNIFORM can all be considered to - * be "uniform" variables since they can only be set outside glBegin/End. - * They're also all stored in the same Parameters array. - */ -typedef enum -{ - PROGRAM_TEMPORARY, /**< machine->Temporary[] */ - PROGRAM_INPUT, /**< machine->Inputs[] */ - PROGRAM_OUTPUT, /**< machine->Outputs[] */ - PROGRAM_VARYING, /**< machine->Inputs[]/Outputs[] */ - PROGRAM_LOCAL_PARAM, /**< gl_program->LocalParams[] */ - PROGRAM_ENV_PARAM, /**< gl_program->Parameters[] */ - PROGRAM_STATE_VAR, /**< gl_program->Parameters[] */ - PROGRAM_NAMED_PARAM, /**< gl_program->Parameters[] */ - PROGRAM_CONSTANT, /**< gl_program->Parameters[] */ - PROGRAM_UNIFORM, /**< gl_program->Parameters[] */ - PROGRAM_WRITE_ONLY, /**< A dummy, write-only register */ - PROGRAM_ADDRESS, /**< machine->AddressReg */ - PROGRAM_SAMPLER, /**< for shader samplers, compile-time only */ - PROGRAM_SYSTEM_VALUE,/**< InstanceId, PrimitiveID, etc. */ - PROGRAM_UNDEFINED, /**< Invalid/TBD value */ - PROGRAM_FILE_MAX -} gl_register_file; - - -/** - * If the register file is PROGRAM_SYSTEM_VALUE, the register index will be - * one of these values. - */ -typedef enum -{ - SYSTEM_VALUE_FRONT_FACE, /**< Fragment shader only (not done yet) */ - SYSTEM_VALUE_VERTEX_ID, /**< Vertex shader only */ - SYSTEM_VALUE_INSTANCE_ID, /**< Vertex shader only */ - SYSTEM_VALUE_MAX /**< Number of values */ -} gl_system_value; - - -/** - * The possible interpolation qualifiers that can be applied to a fragment - * shader input in GLSL. - * - * Note: INTERP_QUALIFIER_NONE must be 0 so that memsetting the - * gl_fragment_program data structure to 0 causes the default behavior. - */ -enum glsl_interp_qualifier -{ - INTERP_QUALIFIER_NONE = 0, - INTERP_QUALIFIER_SMOOTH, - INTERP_QUALIFIER_FLAT, - INTERP_QUALIFIER_NOPERSPECTIVE -}; - - -/** Vertex and fragment instructions */ -struct prog_instruction; -struct gl_program_parameter_list; -struct gl_uniform_list; - -struct gl_transform_feedback_varying_info { - char *Name; - GLenum Type; - GLint Size; -}; - -struct gl_transform_feedback_output { - unsigned OutputRegister; - unsigned OutputBuffer; - unsigned NumComponents; - - /** offset (in DWORDs) of this output within the interleaved structure */ - unsigned DstOffset; - - /** - * Offset into the output register of the data to output. For example, - * if NumComponents is 2 and ComponentOffset is 1, then the data to - * offset is in the y and z components of the output register. - */ - unsigned ComponentOffset; -}; - -/** Post-link transform feedback info. */ -struct gl_transform_feedback_info { - unsigned NumOutputs; - - /** - * Number of transform feedback buffers in use by this program. - */ - unsigned NumBuffers; - - struct gl_transform_feedback_output *Outputs; - - /** Transform feedback varyings used for the linking of this shader program. - * - * Use for glGetTransformFeedbackVarying(). - */ - struct gl_transform_feedback_varying_info *Varyings; - GLint NumVarying; - - /** - * Total number of components stored in each buffer. This may be used by - * hardware back-ends to determine the correct stride when interleaving - * multiple transform feedback outputs in the same buffer. - */ - unsigned BufferStride[MAX_FEEDBACK_ATTRIBS]; -}; - -/** - * Base class for any kind of program object - */ -struct gl_program -{ - GLuint Id; - GLubyte *String; /**< Null-terminated program text */ - GLint RefCount; - GLenum Target; /**< GL_VERTEX/FRAGMENT_PROGRAM_ARB, GL_FRAGMENT_PROGRAM_NV */ - GLenum Format; /**< String encoding format */ - GLboolean Resident; - - struct prog_instruction *Instructions; - - GLbitfield64 InputsRead; /**< Bitmask of which input regs are read */ - GLbitfield64 OutputsWritten; /**< Bitmask of which output regs are written */ - GLbitfield SystemValuesRead; /**< Bitmask of SYSTEM_VALUE_x inputs used */ - GLbitfield InputFlags[MAX_PROGRAM_INPUTS]; /**< PROG_PARAM_BIT_x flags */ - GLbitfield OutputFlags[MAX_PROGRAM_OUTPUTS]; /**< PROG_PARAM_BIT_x flags */ - GLbitfield TexturesUsed[MAX_COMBINED_TEXTURE_IMAGE_UNITS]; /**< TEXTURE_x_BIT bitmask */ - GLbitfield SamplersUsed; /**< Bitfield of which samplers are used */ - GLbitfield ShadowSamplers; /**< Texture units used for shadow sampling. */ - - - /** Named parameters, constants, etc. from program text */ - struct gl_program_parameter_list *Parameters; - /** Numbered local parameters */ - GLfloat LocalParams[MAX_PROGRAM_LOCAL_PARAMS][4]; - - /** Map from sampler unit to texture unit (set by glUniform1i()) */ - GLubyte SamplerUnits[MAX_SAMPLERS]; - - /** Bitmask of which register files are read/written with indirect - * addressing. Mask of (1 << PROGRAM_x) bits. - */ - GLbitfield IndirectRegisterFiles; - - /** Logical counts */ - /*@{*/ - GLuint NumInstructions; - GLuint NumTemporaries; - GLuint NumParameters; - GLuint NumAttributes; - GLuint NumAddressRegs; - GLuint NumAluInstructions; - GLuint NumTexInstructions; - GLuint NumTexIndirections; - /*@}*/ - /** Native, actual h/w counts */ - /*@{*/ - GLuint NumNativeInstructions; - GLuint NumNativeTemporaries; - GLuint NumNativeParameters; - GLuint NumNativeAttributes; - GLuint NumNativeAddressRegs; - GLuint NumNativeAluInstructions; - GLuint NumNativeTexInstructions; - GLuint NumNativeTexIndirections; - /*@}*/ -}; - - -/** Vertex program object */ -struct gl_vertex_program -{ - struct gl_program Base; /**< base class */ - GLboolean IsNVProgram; /**< is this a GL_NV_vertex_program program? */ - GLboolean IsPositionInvariant; - GLboolean UsesClipDistance; -}; - - -/** Geometry program object */ -struct gl_geometry_program -{ - struct gl_program Base; /**< base class */ - - GLint VerticesOut; - GLenum InputType; /**< GL_POINTS, GL_LINES, GL_LINES_ADJACENCY_ARB, - GL_TRIANGLES, or GL_TRIANGLES_ADJACENCY_ARB */ - GLenum OutputType; /**< GL_POINTS, GL_LINE_STRIP or GL_TRIANGLE_STRIP */ -}; - - -/** Fragment program object */ -struct gl_fragment_program -{ - struct gl_program Base; /**< base class */ - GLboolean UsesKill; /**< shader uses KIL instruction */ - GLboolean OriginUpperLeft; - GLboolean PixelCenterInteger; - enum gl_frag_depth_layout FragDepthLayout; - - /** - * GLSL interpolation qualifier associated with each fragment shader input. - * For inputs that do not have an interpolation qualifier specified in - * GLSL, the value is INTERP_QUALIFIER_NONE. - */ - enum glsl_interp_qualifier InterpQualifier[FRAG_ATTRIB_MAX]; -}; - - -/** - * State common to vertex and fragment programs. - */ -struct gl_program_state -{ - GLint ErrorPos; /* GL_PROGRAM_ERROR_POSITION_ARB/NV */ - const char *ErrorString; /* GL_PROGRAM_ERROR_STRING_ARB/NV */ -}; - - -/** - * Context state for vertex programs. - */ -struct gl_vertex_program_state -{ - GLboolean Enabled; /**< User-set GL_VERTEX_PROGRAM_ARB/NV flag */ - GLboolean _Enabled; /**< Enabled and _valid_ user program? */ - GLboolean PointSizeEnabled; /**< GL_VERTEX_PROGRAM_POINT_SIZE_ARB/NV */ - GLboolean TwoSideEnabled; /**< GL_VERTEX_PROGRAM_TWO_SIDE_ARB/NV */ - /** Computed two sided lighting for fixed function/programs. */ - GLboolean _TwoSideEnabled; - struct gl_vertex_program *Current; /**< User-bound vertex program */ - - /** Currently enabled and valid vertex program (including internal - * programs, user-defined vertex programs and GLSL vertex shaders). - * This is the program we must use when rendering. - */ - struct gl_vertex_program *_Current; - - GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */ - - /* For GL_NV_vertex_program only: */ - GLenum TrackMatrix[MAX_PROGRAM_ENV_PARAMS / 4]; - GLenum TrackMatrixTransform[MAX_PROGRAM_ENV_PARAMS / 4]; - - /** Should fixed-function T&L be implemented with a vertex prog? */ - GLboolean _MaintainTnlProgram; - - /** Program to emulate fixed-function T&L (see above) */ - struct gl_vertex_program *_TnlProgram; - - /** Cache of fixed-function programs */ - struct gl_program_cache *Cache; - - GLboolean _Overriden; -}; - - -/** - * Context state for geometry programs. - */ -struct gl_geometry_program_state -{ - GLboolean Enabled; /**< GL_ARB_GEOMETRY_SHADER4 */ - GLboolean _Enabled; /**< Enabled and valid program? */ - struct gl_geometry_program *Current; /**< user-bound geometry program */ - - /** Currently enabled and valid program (including internal programs - * and compiled shader programs). - */ - struct gl_geometry_program *_Current; - - GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */ - - /** Cache of fixed-function programs */ - struct gl_program_cache *Cache; -}; - -/** - * Context state for fragment programs. - */ -struct gl_fragment_program_state -{ - GLboolean Enabled; /**< User-set fragment program enable flag */ - GLboolean _Enabled; /**< Enabled and _valid_ user program? */ - struct gl_fragment_program *Current; /**< User-bound fragment program */ - - /** Currently enabled and valid fragment program (including internal - * programs, user-defined fragment programs and GLSL fragment shaders). - * This is the program we must use when rendering. - */ - struct gl_fragment_program *_Current; - - GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */ - - /** Should fixed-function texturing be implemented with a fragment prog? */ - GLboolean _MaintainTexEnvProgram; - - /** Program to emulate fixed-function texture env/combine (see above) */ - struct gl_fragment_program *_TexEnvProgram; - - /** Cache of fixed-function programs */ - struct gl_program_cache *Cache; -}; - - -/** - * ATI_fragment_shader runtime state - */ -#define ATI_FS_INPUT_PRIMARY 0 -#define ATI_FS_INPUT_SECONDARY 1 - -struct atifs_instruction; -struct atifs_setupinst; - -/** - * ATI fragment shader - */ -struct ati_fragment_shader -{ - GLuint Id; - GLint RefCount; - struct atifs_instruction *Instructions[2]; - struct atifs_setupinst *SetupInst[2]; - GLfloat Constants[8][4]; - GLbitfield LocalConstDef; /**< Indicates which constants have been set */ - GLubyte numArithInstr[2]; - GLubyte regsAssigned[2]; - GLubyte NumPasses; /**< 1 or 2 */ - GLubyte cur_pass; - GLubyte last_optype; - GLboolean interpinp1; - GLboolean isValid; - GLuint swizzlerq; -}; - -/** - * Context state for GL_ATI_fragment_shader - */ -struct gl_ati_fragment_shader_state -{ - GLboolean Enabled; - GLboolean _Enabled; /**< enabled and valid shader? */ - GLboolean Compiling; - GLfloat GlobalConstants[8][4]; - struct ati_fragment_shader *Current; -}; - - -/** - * Occlusion/timer query object. - */ -struct gl_query_object -{ - GLenum Target; /**< The query target, when active */ - GLuint Id; /**< hash table ID/name */ - GLuint64EXT Result; /**< the counter */ - GLboolean Active; /**< inside Begin/EndQuery */ - GLboolean Ready; /**< result is ready? */ -}; - - -/** - * Context state for query objects. - */ -struct gl_query_state -{ - struct _mesa_HashTable *QueryObjects; - struct gl_query_object *CurrentOcclusionObject; /* GL_ARB_occlusion_query */ - struct gl_query_object *CurrentTimerObject; /* GL_EXT_timer_query */ - - /** GL_NV_conditional_render */ - struct gl_query_object *CondRenderQuery; - - /** GL_EXT_transform_feedback */ - struct gl_query_object *PrimitivesGenerated; - struct gl_query_object *PrimitivesWritten; - - /** GL_ARB_timer_query */ - struct gl_query_object *TimeElapsed; - - GLenum CondRenderMode; -}; - - -/** Sync object state */ -struct gl_sync_object { - struct simple_node link; - GLenum Type; /**< GL_SYNC_FENCE */ - GLuint Name; /**< Fence name */ - GLint RefCount; /**< Reference count */ - GLboolean DeletePending; /**< Object was deleted while there were still - * live references (e.g., sync not yet finished) - */ - GLenum SyncCondition; - GLbitfield Flags; /**< Flags passed to glFenceSync */ - GLuint StatusFlag:1; /**< Has the sync object been signaled? */ -}; - - -/** Set by #pragma directives */ -struct gl_sl_pragmas -{ - GLboolean IgnoreOptimize; /**< ignore #pragma optimize(on/off) ? */ - GLboolean IgnoreDebug; /**< ignore #pragma debug(on/off) ? */ - GLboolean Optimize; /**< defaults on */ - GLboolean Debug; /**< defaults off */ -}; - - -/** - * A GLSL vertex or fragment shader object. - */ -struct gl_shader -{ - GLenum Type; /**< GL_FRAGMENT_SHADER || GL_VERTEX_SHADER || GL_GEOMETRY_SHADER_ARB (first field!) */ - GLuint Name; /**< AKA the handle */ - GLint RefCount; /**< Reference count */ - GLboolean DeletePending; - GLboolean CompileStatus; - const GLchar *Source; /**< Source code string */ - GLuint SourceChecksum; /**< for debug/logging purposes */ - struct gl_program *Program; /**< Post-compile assembly code */ - GLchar *InfoLog; - struct gl_sl_pragmas Pragmas; - - unsigned Version; /**< GLSL version used for linking */ - - /** - * \name Sampler tracking - * - * \note Each of these fields is only set post-linking. - */ - /*@{*/ - unsigned num_samplers; /**< Number of samplers used by this shader. */ - GLbitfield active_samplers; /**< Bitfield of which samplers are used */ - GLbitfield shadow_samplers; /**< Samplers used for shadow sampling. */ - /*@}*/ - - /** - * Number of uniform components used by this shader. - * - * This field is only set post-linking. - */ - unsigned num_uniform_components; - - struct exec_list *ir; - struct glsl_symbol_table *symbols; - - /** Shaders containing built-in functions that are used for linking. */ - struct gl_shader *builtins_to_link[16]; - unsigned num_builtins_to_link; -}; - - -/** - * A GLSL program object. - * Basically a linked collection of vertex and fragment shaders. - */ -struct gl_shader_program -{ - GLenum Type; /**< Always GL_SHADER_PROGRAM (internal token) */ - GLuint Name; /**< aka handle or ID */ - GLint RefCount; /**< Reference count */ - GLboolean DeletePending; - - /** - * Flags that the linker should not reject the program if it lacks - * a vertex or fragment shader. GLES2 doesn't allow separate - * shader objects, and would reject them. However, we internally - * build separate shader objects for fixed function programs, which - * we use for drivers/common/meta.c and for handling - * _mesa_update_state with no program bound (for example in - * glClear()). - */ - GLboolean InternalSeparateShader; - - GLuint NumShaders; /**< number of attached shaders */ - struct gl_shader **Shaders; /**< List of attached the shaders */ - - /** - * User-defined attribute bindings - * - * These are set via \c glBindAttribLocation and are used to direct the - * GLSL linker. These are \b not the values used in the compiled shader, - * and they are \b not the values returned by \c glGetAttribLocation. - */ - struct string_to_uint_map *AttributeBindings; - - /** - * User-defined fragment data bindings - * - * These are set via \c glBindFragDataLocation and are used to direct the - * GLSL linker. These are \b not the values used in the compiled shader, - * and they are \b not the values returned by \c glGetFragDataLocation. - */ - struct string_to_uint_map *FragDataBindings; - - /** - * Transform feedback varyings last specified by - * glTransformFeedbackVaryings(). - * - * For the current set of transform feeedback varyings used for transform - * feedback output, see LinkedTransformFeedback. - */ - struct { - GLenum BufferMode; - GLuint NumVarying; - GLchar **VaryingNames; /**< Array [NumVarying] of char * */ - } TransformFeedback; - - /** Post-link transform feedback info. */ - struct gl_transform_feedback_info LinkedTransformFeedback; - - /** Post-link gl_FragDepth layout for ARB_conservative_depth. */ - enum gl_frag_depth_layout FragDepthLayout; - - /** Geometry shader state - copied into gl_geometry_program at link time */ - struct { - GLint VerticesOut; - GLenum InputType; /**< GL_POINTS, GL_LINES, GL_LINES_ADJACENCY_ARB, - GL_TRIANGLES, or GL_TRIANGLES_ADJACENCY_ARB */ - GLenum OutputType; /**< GL_POINTS, GL_LINE_STRIP or GL_TRIANGLE_STRIP */ - } Geom; - - /** Vertex shader state - copied into gl_vertex_program at link time */ - struct { - GLboolean UsesClipDistance; /**< True if gl_ClipDistance is written to. */ - GLuint ClipDistanceArraySize; /**< Size of the gl_ClipDistance array, or - 0 if not present. */ - } Vert; - - /* post-link info: */ - unsigned NumUserUniformStorage; - struct gl_uniform_storage *UniformStorage; - - /** - * Map of active uniform names to locations - * - * Maps any active uniform that is not an array element to a location. - * Each active uniform, including individual structure members will appear - * in this map. This roughly corresponds to the set of names that would be - * enumerated by \c glGetActiveUniform. - */ - struct string_to_uint_map *UniformHash; - - /** - * Map from sampler unit to texture unit (set by glUniform1i()) - * - * A sampler unit is associated with each sampler uniform by the linker. - * The sampler unit associated with each uniform is stored in the - * \c gl_uniform_storage::sampler field. - */ - GLubyte SamplerUnits[MAX_SAMPLERS]; - /** Which texture target is being sampled (TEXTURE_1D/2D/3D/etc_INDEX) */ - gl_texture_index SamplerTargets[MAX_SAMPLERS]; - - GLboolean LinkStatus; /**< GL_LINK_STATUS */ - GLboolean Validated; - GLboolean _Used; /**< Ever used for drawing? */ - GLchar *InfoLog; - - unsigned Version; /**< GLSL version used for linking */ - - /** - * Per-stage shaders resulting from the first stage of linking. - * - * Set of linked shaders for this program. The array is accessed using the - * \c MESA_SHADER_* defines. Entries for non-existent stages will be - * \c NULL. - */ - struct gl_shader *_LinkedShaders[MESA_SHADER_TYPES]; -}; - - -#define GLSL_DUMP 0x1 /**< Dump shaders to stdout */ -#define GLSL_LOG 0x2 /**< Write shaders to files */ -#define GLSL_OPT 0x4 /**< Force optimizations (override pragmas) */ -#define GLSL_NO_OPT 0x8 /**< Force no optimizations (override pragmas) */ -#define GLSL_UNIFORMS 0x10 /**< Print glUniform calls */ -#define GLSL_NOP_VERT 0x20 /**< Force no-op vertex shaders */ -#define GLSL_NOP_FRAG 0x40 /**< Force no-op fragment shaders */ -#define GLSL_USE_PROG 0x80 /**< Log glUseProgram calls */ - - -/** - * Context state for GLSL vertex/fragment shaders. - */ -struct gl_shader_state -{ - /** - * Programs used for rendering - * - * There is a separate program set for each shader stage. If - * GL_EXT_separate_shader_objects is not supported, each of these must point - * to \c NULL or to the same program. - */ - struct gl_shader_program *CurrentVertexProgram; - struct gl_shader_program *CurrentGeometryProgram; - struct gl_shader_program *CurrentFragmentProgram; - - struct gl_shader_program *_CurrentFragmentProgram; - - /** - * Program used by glUniform calls. - * - * Explicitly set by \c glUseProgram and \c glActiveProgramEXT. - */ - struct gl_shader_program *ActiveProgram; - - GLbitfield Flags; /**< Mask of GLSL_x flags */ -}; - -/** - * Compiler options for a single GLSL shaders type - */ -struct gl_shader_compiler_options -{ - /** Driver-selectable options: */ - GLboolean EmitCondCodes; /**< Use condition codes? */ - GLboolean EmitNVTempInitialization; /**< 0-fill NV temp registers */ - GLboolean EmitNoLoops; - GLboolean EmitNoFunctions; - GLboolean EmitNoCont; /**< Emit CONT opcode? */ - GLboolean EmitNoMainReturn; /**< Emit CONT/RET opcodes? */ - GLboolean EmitNoNoise; /**< Emit NOISE opcodes? */ - GLboolean EmitNoPow; /**< Emit POW opcodes? */ - GLboolean LowerClipDistance; /**< Lower gl_ClipDistance from float[8] to vec4[2]? */ - - /** - * \name Forms of indirect addressing the driver cannot do. - */ - /*@{*/ - GLboolean EmitNoIndirectInput; /**< No indirect addressing of inputs */ - GLboolean EmitNoIndirectOutput; /**< No indirect addressing of outputs */ - GLboolean EmitNoIndirectTemp; /**< No indirect addressing of temps */ - GLboolean EmitNoIndirectUniform; /**< No indirect addressing of constants */ - /*@}*/ - - GLuint MaxIfDepth; /**< Maximum nested IF blocks */ - GLuint MaxUnrollIterations; - - struct gl_sl_pragmas DefaultPragmas; /**< Default #pragma settings */ -}; - -/** - * Transform feedback object state - */ -struct gl_transform_feedback_object -{ - GLuint Name; /**< AKA the object ID */ - GLint RefCount; - GLboolean Active; /**< Is transform feedback enabled? */ - GLboolean Paused; /**< Is transform feedback paused? */ - GLboolean EndedAnytime; /**< Has EndTransformFeedback been called - at least once? */ - - /** The feedback buffers */ - GLuint BufferNames[MAX_FEEDBACK_ATTRIBS]; - struct gl_buffer_object *Buffers[MAX_FEEDBACK_ATTRIBS]; - - /** Start of feedback data in dest buffer */ - GLintptr Offset[MAX_FEEDBACK_ATTRIBS]; - /** Max data to put into dest buffer (in bytes) */ - GLsizeiptr Size[MAX_FEEDBACK_ATTRIBS]; -}; - - -/** - * Context state for transform feedback. - */ -struct gl_transform_feedback -{ - GLenum Mode; /**< GL_POINTS, GL_LINES or GL_TRIANGLES */ - - /** The general binding point (GL_TRANSFORM_FEEDBACK_BUFFER) */ - struct gl_buffer_object *CurrentBuffer; - - /** The table of all transform feedback objects */ - struct _mesa_HashTable *Objects; - - /** The current xform-fb object (GL_TRANSFORM_FEEDBACK_BINDING) */ - struct gl_transform_feedback_object *CurrentObject; - - /** The default xform-fb object (Name==0) */ - struct gl_transform_feedback_object *DefaultObject; -}; - - - /** * State which can be shared by multiple contexts: */ @@ -2497,35 +1387,8 @@ struct gl_shared_state /** Default buffer object for vertex arrays that aren't in VBOs */ struct gl_buffer_object *NullBufferObj; - /** - * \name Vertex/geometry/fragment programs - */ - /*@{*/ - struct _mesa_HashTable *Programs; /**< All vertex/fragment programs */ - struct gl_vertex_program *DefaultVertexProgram; - struct gl_fragment_program *DefaultFragmentProgram; - struct gl_geometry_program *DefaultGeometryProgram; - /*@}*/ - - /* GL_ATI_fragment_shader */ - struct _mesa_HashTable *ATIShaders; - struct ati_fragment_shader *DefaultFragmentShader; - struct _mesa_HashTable *BufferObjects; - /** Table of both gl_shader and gl_shader_program objects */ - struct _mesa_HashTable *ShaderObjects; - - /* GL_EXT_framebuffer_object */ - struct _mesa_HashTable *RenderBuffers; - struct _mesa_HashTable *FrameBuffers; - - /* GL_ARB_sync */ - struct simple_node SyncObjects; - - /** GL_ARB_sampler_objects */ - struct _mesa_HashTable *SamplerObjects; - void *DriverData; /**< Device driver shared state */ }; @@ -2540,12 +1403,10 @@ struct gl_renderbuffer { _glthread_Mutex Mutex; /**< for thread safety */ GLuint ClassID; /**< Useful for drivers */ - GLuint Name; GLint RefCount; GLuint Width, Height; GLboolean Purgeable; /**< Is the buffer purgeable under memory pressure? */ GLboolean AttachedAnytime; /**< TRUE if it was attached to a framebuffer */ - GLubyte NumSamples; GLenum InternalFormat; /**< The user-specified format */ GLenum _BaseFormat; /**< Either GL_RGB, GL_RGBA, GL_DEPTH_COMPONENT or GL_STENCIL_INDEX. */ @@ -2568,24 +1429,11 @@ struct gl_renderbuffer */ struct gl_renderbuffer_attachment { - GLenum Type; /**< \c GL_NONE or \c GL_TEXTURE or \c GL_RENDERBUFFER_EXT */ - GLboolean Complete; - /** * If \c Type is \c GL_RENDERBUFFER_EXT, this stores a pointer to the * application supplied renderbuffer object. */ struct gl_renderbuffer *Renderbuffer; - - /** - * If \c Type is \c GL_TEXTURE, this stores a pointer to the application - * supplied texture object. - */ - struct gl_texture_object *Texture; - GLuint TextureLevel; /**< Attached mipmap level. */ - GLuint CubeMapFace; /**< 0 .. 5, for cube map textures. */ - GLuint Zoffset; /**< Slice for 3D textures, or layer for both 1D - * and 2D array textures */ }; @@ -2597,14 +1445,6 @@ struct gl_renderbuffer_attachment struct gl_framebuffer { _glthread_Mutex Mutex; /**< for thread safety */ - /** - * If zero, this is a window system framebuffer. If non-zero, this - * is a FBO framebuffer; note that for some devices (i.e. those with - * a natural pixel coordinate system for FBOs that differs from the - * OpenGL/Mesa coordinate system), this means that the viewport, - * polygon face orientation, and polygon stipple will have to be inverted. - */ - GLuint Name; GLint RefCount; GLboolean DeletePending; @@ -2632,9 +1472,6 @@ struct gl_framebuffer GLfloat _MRD; /**< minimum resolvable difference in Z values */ /*@}*/ - /** One of the GL_FRAMEBUFFER_(IN)COMPLETE_* tokens */ - GLenum _Status; - /** Integer color values */ GLboolean _IntegerColor; @@ -2644,14 +1481,13 @@ struct gl_framebuffer /* In unextended OpenGL these vars are part of the GL_COLOR_BUFFER * attribute group and GL_PIXEL attribute group, respectively. */ - GLenum ColorDrawBuffer[MAX_DRAW_BUFFERS]; + GLenum ColorDrawBuffer; GLenum ColorReadBuffer; /** Computed from ColorDraw/ReadBuffer above */ - GLuint _NumColorDrawBuffers; - GLint _ColorDrawBufferIndexes[MAX_DRAW_BUFFERS]; /**< BUFFER_x or -1 */ + GLint _ColorDrawBufferIndex; /**< BUFFER_x or -1 */ GLint _ColorReadBufferIndex; /* -1 = None */ - struct gl_renderbuffer *_ColorDrawBuffers[MAX_DRAW_BUFFERS]; + struct gl_renderbuffer *_ColorDrawBuffer; struct gl_renderbuffer *_ColorReadBuffer; /** Delete this framebuffer */ @@ -2669,41 +1505,6 @@ struct gl_precision GLushort Precision; /**< number of mantissa bits */ }; - -/** - * Limits for vertex, geometry and fragment programs/shaders. - */ -struct gl_program_constants -{ - /* logical limits */ - GLuint MaxInstructions; - GLuint MaxAluInstructions; - GLuint MaxTexInstructions; - GLuint MaxTexIndirections; - GLuint MaxAttribs; - GLuint MaxTemps; - GLuint MaxAddressRegs; - GLuint MaxAddressOffset; /**< [-MaxAddressOffset, MaxAddressOffset-1] */ - GLuint MaxParameters; - GLuint MaxLocalParams; - GLuint MaxEnvParams; - /* native/hardware limits */ - GLuint MaxNativeInstructions; - GLuint MaxNativeAluInstructions; - GLuint MaxNativeTexInstructions; - GLuint MaxNativeTexIndirections; - GLuint MaxNativeAttribs; - GLuint MaxNativeTemps; - GLuint MaxNativeAddressRegs; - GLuint MaxNativeParameters; - /* For shaders */ - GLuint MaxUniformComponents; /**< Usually == MaxParameters * 4 */ - /* ES 2.0 and GL_ARB_ES2_compatibility */ - struct gl_precision LowFloat, MediumFloat, HighFloat; - struct gl_precision LowInt, MediumInt, HighInt; -}; - - /** * Constants which may be overridden by device driver during context creation * but are never changed after that. @@ -2714,17 +1515,7 @@ struct gl_constants GLint MaxTextureLevels; /**< Max mipmap levels. */ GLint Max3DTextureLevels; /**< Max mipmap levels for 3D textures */ GLint MaxCubeTextureLevels; /**< Max mipmap levels for cube textures */ - GLint MaxArrayTextureLayers; /**< Max layers in array textures */ - GLint MaxTextureRectSize; /**< Max rectangle texture size, in pixes */ - GLuint MaxTextureCoordUnits; - GLuint MaxTextureImageUnits; - GLuint MaxVertexTextureImageUnits; - GLuint MaxCombinedTextureImageUnits; - GLuint MaxGeometryTextureImageUnits; - GLuint MaxTextureUnits; /**< = MIN(CoordUnits, ImageUnits) */ GLfloat MaxTextureMaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */ - GLfloat MaxTextureLodBias; /**< GL_EXT_texture_lod_bias */ - GLuint MaxTextureBufferSize; /**< GL_ARB_texture_buffer_object */ GLuint MaxArrayLockSize; @@ -2746,81 +1537,21 @@ struct gl_constants GLuint MaxViewportWidth, MaxViewportHeight; - struct gl_program_constants VertexProgram; /**< GL_ARB_vertex_program */ - struct gl_program_constants FragmentProgram; /**< GL_ARB_fragment_program */ - struct gl_program_constants GeometryProgram; /**< GL_ARB_geometry_shader4 */ - GLuint MaxProgramMatrices; - GLuint MaxProgramMatrixStackDepth; - /** vertex array / buffer object bounds checking */ GLboolean CheckArrayBounds; - GLuint MaxDrawBuffers; /**< GL_ARB_draw_buffers */ - - GLuint MaxColorAttachments; /**< GL_EXT_framebuffer_object */ - GLuint MaxRenderbufferSize; /**< GL_EXT_framebuffer_object */ - GLuint MaxSamples; /**< GL_ARB_framebuffer_object */ - - /** Number of varying vectors between vertex and fragment shaders */ - GLuint MaxVarying; - GLuint MaxVertexVaryingComponents; /**< Between vert and geom shader */ - GLuint MaxGeometryVaryingComponents; /**< Between geom and frag shader */ - - /** GL_ARB_geometry_shader4 */ - GLuint MaxGeometryOutputVertices; - GLuint MaxGeometryTotalOutputComponents; - - GLuint GLSLVersion; /**< GLSL version supported (ex: 120 = 1.20) */ - - /** - * Changes default GLSL extension behavior from "error" to "warn". It's out - * of spec, but it can make some apps work that otherwise wouldn't. - */ - GLboolean ForceGLSLExtensionsWarn; - /** * Does the driver support real 32-bit integers? (Otherwise, integers are * simulated via floats.) */ GLboolean NativeIntegers; - /** - * If the driver supports real 32-bit integers, what integer value should be - * used for boolean true in uniform uploads? (Usually 1 or ~0.) - */ - GLuint UniformBooleanTrue; - - /** Which texture units support GL_ATI_envmap_bumpmap as targets */ - GLbitfield SupportedBumpUnits; - - /** - * Maximum amount of time, measured in nanseconds, that the server can wait. - */ - GLuint64 MaxServerWaitTimeout; - - /** GL_EXT_provoking_vertex */ - GLboolean QuadsFollowProvokingVertexConvention; - /** OpenGL version 3.0 */ GLbitfield ContextFlags; /**< Ex: GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT */ /** OpenGL version 3.2 */ GLbitfield ProfileMask; /**< Mask of CONTEXT_x_PROFILE_BIT */ - /** GL_EXT_transform_feedback */ - GLuint MaxTransformFeedbackSeparateAttribs; - GLuint MaxTransformFeedbackSeparateComponents; - GLuint MaxTransformFeedbackInterleavedComponents; - - /** GL_EXT_gpu_shader4 */ - GLint MinProgramTexelOffset, MaxProgramTexelOffset; - - /* GL_EXT_framebuffer_sRGB */ - GLboolean sRGBCapable; /* can enable sRGB blend/update on FBOs */ - - /* GL_ARB_robustness */ - GLenum ResetStrategy; - /** * Whether the implementation strips out and ignores texture borders. * @@ -2834,15 +1565,6 @@ struct gl_constants * Texture borders are deprecated in GL 3.0. **/ GLboolean StripTextureBorder; - - /** - * For drivers which can do a better job at eliminating unused varyings - * and uniforms than the GLSL compiler. - * - * XXX Remove these as soon as a better solution is available. - */ - GLboolean GLSLSkipStrictMaxVaryingLimitCheck; - GLboolean GLSLSkipStrictMaxUniformLimitCheck; }; @@ -2855,61 +1577,19 @@ struct gl_extensions GLboolean dummy; /* don't remove this! */ GLboolean dummy_true; /* Set true by _mesa_init_extensions(). */ GLboolean dummy_false; /* Set false by _mesa_init_extensions(). */ - GLboolean ARB_ES2_compatibility; - GLboolean ARB_blend_func_extended; - GLboolean ARB_color_buffer_float; - GLboolean ARB_conservative_depth; - GLboolean ARB_copy_buffer; - GLboolean ARB_depth_buffer_float; - GLboolean ARB_depth_clamp; - GLboolean ARB_depth_texture; - GLboolean ARB_draw_buffers_blend; - GLboolean ARB_draw_elements_base_vertex; - GLboolean ARB_draw_instanced; - GLboolean ARB_fragment_coord_conventions; - GLboolean ARB_fragment_program; - GLboolean ARB_fragment_program_shadow; - GLboolean ARB_fragment_shader; - GLboolean ARB_framebuffer_object; - GLboolean ARB_explicit_attrib_location; - GLboolean ARB_geometry_shader4; GLboolean ARB_half_float_pixel; GLboolean ARB_half_float_vertex; - GLboolean ARB_instanced_arrays; GLboolean ARB_map_buffer_range; - GLboolean ARB_occlusion_query; - GLboolean ARB_occlusion_query2; GLboolean ARB_point_sprite; - GLboolean ARB_sampler_objects; - GLboolean ARB_seamless_cube_map; - GLboolean ARB_shader_objects; - GLboolean ARB_shader_stencil_export; - GLboolean ARB_shader_texture_lod; - GLboolean ARB_shading_language_100; - GLboolean ARB_shadow; - GLboolean ARB_shadow_ambient; - GLboolean ARB_sync; - GLboolean ARB_texture_border_clamp; - GLboolean ARB_texture_buffer_object; - GLboolean ARB_texture_compression_rgtc; GLboolean ARB_texture_cube_map; GLboolean ARB_texture_env_combine; GLboolean ARB_texture_env_crossbar; GLboolean ARB_texture_env_dot3; GLboolean ARB_texture_float; - GLboolean ARB_texture_multisample; GLboolean ARB_texture_non_power_of_two; - GLboolean ARB_texture_rg; - GLboolean ARB_texture_rgb10_a2ui; GLboolean ARB_texture_storage; - GLboolean ARB_timer_query; - GLboolean ARB_transform_feedback2; GLboolean ARB_transpose_matrix; - GLboolean ARB_uniform_buffer_object; GLboolean ARB_vertex_array_object; - GLboolean ARB_vertex_program; - GLboolean ARB_vertex_shader; - GLboolean ARB_vertex_type_2_10_10_10_rev; GLboolean ARB_window_pos; GLboolean EXT_blend_color; GLboolean EXT_blend_equation_separate; @@ -2918,82 +1598,36 @@ struct gl_extensions GLboolean EXT_clip_volume_hint; GLboolean EXT_compiled_vertex_array; GLboolean EXT_depth_bounds_test; - GLboolean EXT_draw_buffers2; GLboolean EXT_draw_range_elements; GLboolean EXT_fog_coord; - GLboolean EXT_framebuffer_blit; - GLboolean EXT_framebuffer_multisample; - GLboolean EXT_framebuffer_object; - GLboolean EXT_framebuffer_sRGB; - GLboolean EXT_gpu_program_parameters; - GLboolean EXT_gpu_shader4; - GLboolean EXT_packed_depth_stencil; - GLboolean EXT_packed_float; GLboolean EXT_packed_pixels; - GLboolean EXT_pixel_buffer_object; GLboolean EXT_point_parameters; - GLboolean EXT_provoking_vertex; GLboolean EXT_rescale_normal; GLboolean EXT_shadow_funcs; GLboolean EXT_secondary_color; GLboolean EXT_separate_shader_objects; GLboolean EXT_separate_specular_color; - GLboolean EXT_stencil_two_side; GLboolean EXT_texture3D; - GLboolean EXT_texture_array; - GLboolean EXT_texture_compression_latc; - GLboolean EXT_texture_compression_s3tc; GLboolean EXT_texture_env_dot3; GLboolean EXT_texture_filter_anisotropic; GLboolean EXT_texture_integer; - GLboolean EXT_texture_mirror_clamp; - GLboolean EXT_texture_shared_exponent; - GLboolean EXT_texture_snorm; - GLboolean EXT_texture_sRGB; - GLboolean EXT_texture_sRGB_decode; - GLboolean EXT_texture_swizzle; - GLboolean EXT_transform_feedback; - GLboolean EXT_timer_query; - GLboolean EXT_vertex_array_bgra; - GLboolean OES_standard_derivatives; /* vendor extensions */ - GLboolean AMD_seamless_cubemap_per_texture; GLboolean APPLE_packed_pixels; GLboolean APPLE_vertex_array_object; GLboolean APPLE_object_purgeable; - GLboolean ATI_envmap_bumpmap; - GLboolean ATI_texture_compression_3dc; - GLboolean ATI_texture_mirror_once; GLboolean ATI_texture_env_combine3; - GLboolean ATI_fragment_shader; - GLboolean ATI_separate_stencil; GLboolean IBM_rasterpos_clip; GLboolean IBM_multimode_draw_arrays; GLboolean MESA_pack_invert; GLboolean MESA_resize_buffers; GLboolean MESA_ycbcr_texture; - GLboolean MESA_texture_array; GLboolean NV_blend_square; - GLboolean NV_conditional_render; GLboolean NV_fog_distance; - GLboolean NV_fragment_program; - GLboolean NV_fragment_program_option; GLboolean NV_light_max_exponent; GLboolean NV_point_sprite; - GLboolean NV_primitive_restart; GLboolean NV_texture_barrier; GLboolean NV_texgen_reflection; GLboolean NV_texture_env_combine4; - GLboolean NV_texture_rectangle; - GLboolean NV_vertex_program; - GLboolean NV_vertex_program1_1; - GLboolean SGIS_texture_lod; - GLboolean TDFX_texture_compression_FXT1; - GLboolean S3_s3tc; - GLboolean OES_EGL_image; - GLboolean OES_draw_texture; - GLboolean OES_EGL_image_external; - GLboolean OES_compressed_ETC1_RGB8_texture; GLboolean extension_sentinel; /** The extension string */ const GLubyte *String; @@ -3061,11 +1695,7 @@ struct gl_matrix_stack #define _NEW_CURRENT_ATTRIB (1 << 23) /**< gl_context::Current */ #define _NEW_MULTISAMPLE (1 << 24) /**< gl_context::Multisample */ #define _NEW_TRACK_MATRIX (1 << 25) /**< gl_context::VertexProgram */ -#define _NEW_PROGRAM (1 << 26) /**< New program/shader state */ -#define _NEW_PROGRAM_CONSTANTS (1 << 27) -#define _NEW_BUFFER_OBJECT (1 << 28) -#define _NEW_FRAG_CLAMP (1 << 29) -#define _NEW_TRANSFORM_FEEDBACK (1 << 30) /**< gl_context::TransformFeedback */ +#define _NEW_BUFFER_OBJECT (1 << 26) #define _NEW_ALL ~0 /** @@ -3094,7 +1724,6 @@ struct gl_matrix_stack #define DD_LINE_STIPPLE 0x200 #define DD_POINT_SMOOTH 0x400 #define DD_POINT_ATTEN 0x800 -#define DD_TRI_TWOSTENCIL 0x1000 /*@}*/ @@ -3103,7 +1732,7 @@ struct gl_matrix_stack */ /*@{*/ #define _DD_NEW_FLATSHADE _NEW_LIGHT -#define _DD_NEW_SEPARATE_SPECULAR (_NEW_LIGHT | _NEW_FOG | _NEW_PROGRAM) +#define _DD_NEW_SEPARATE_SPECULAR (_NEW_LIGHT | _NEW_FOG) #define _DD_NEW_TRI_CULL_FRONT_BACK _NEW_POLYGON #define _DD_NEW_TRI_LIGHT_TWOSIDE _NEW_LIGHT #define _DD_NEW_TRI_UNFILLED _NEW_POLYGON @@ -3126,7 +1755,6 @@ struct gl_matrix_stack #define _MESA_NEW_NEED_EYE_COORDS (_NEW_LIGHT | \ _NEW_TEXTURE | \ _NEW_POINT | \ - _NEW_PROGRAM | \ _NEW_MODELVIEW) /*@}*/ @@ -3198,17 +1826,6 @@ struct gl_dlist_state }; -/** - * Enum for the OpenGL APIs we know about and may support. - */ -typedef enum -{ - API_OPENGL, - API_OPENGLES, - API_OPENGLES2 -} gl_api; - - /** * Mesa rendering context. * @@ -3226,7 +1843,6 @@ struct gl_context /** \name API function pointer tables */ /*@{*/ - gl_api API; struct _glapi_table *Save; /**< Display list save functions */ struct _glapi_table *Exec; /**< Execute functions */ struct _glapi_table *CurrentDispatch; /**< == Save or Exec !! */ @@ -3252,8 +1868,7 @@ struct gl_context /*@{*/ struct gl_matrix_stack ModelviewMatrixStack; struct gl_matrix_stack ProjectionMatrixStack; - struct gl_matrix_stack TextureMatrixStack[MAX_TEXTURE_UNITS]; - struct gl_matrix_stack ProgramMatrixStack[MAX_PROGRAM_MATRICES]; + struct gl_matrix_stack TextureMatrixStack; struct gl_matrix_stack *CurrentStack; /**< Points to one of the above stacks */ /*@}*/ @@ -3328,22 +1943,6 @@ struct gl_context struct gl_evaluators EvalMap; /**< All evaluators */ struct gl_feedback Feedback; /**< Feedback */ struct gl_selection Select; /**< Selection */ - - struct gl_program_state Program; /**< general program state */ - struct gl_vertex_program_state VertexProgram; - struct gl_fragment_program_state FragmentProgram; - struct gl_geometry_program_state GeometryProgram; - struct gl_ati_fragment_shader_state ATIFragmentShader; - - struct gl_shader_state Shader; /**< GLSL shader object state */ - struct gl_shader_compiler_options ShaderCompilerOptions[MESA_SHADER_TYPES]; - - struct gl_query_state Query; /**< occlusion, timer queries */ - - struct gl_transform_feedback TransformFeedback; - - struct gl_buffer_object *CopyReadBuffer; /**< GL_ARB_copy_buffer */ - struct gl_buffer_object *CopyWriteBuffer; /**< GL_ARB_copy_buffer */ /*@}*/ struct gl_meta_state *Meta; /**< for "meta" operations */ @@ -3353,9 +1952,6 @@ struct gl_context GLenum ErrorValue; /**< Last error code */ - /* GL_ARB_robustness */ - GLenum ResetStatus; - /** * Recognize and silence repeated error debug messages in buggy apps. */ @@ -3367,8 +1963,6 @@ struct gl_context GLboolean ViewportInitialized; /**< has viewport size been initialized? */ - GLbitfield64 varying_vp_inputs; /**< mask of VERT_BIT_* flags */ - /** \name Derived state */ /*@{*/ /** Bitwise-or of DD_* flags. Note that this bitfield may be used before @@ -3394,9 +1988,6 @@ struct gl_context GLboolean FirstTimeCurrent; /*@}*/ - /** software compression/decompression supported or not */ - GLboolean Mesa_DXTn; - GLboolean TextureFormatSupported[MESA_FORMAT_COUNT]; /** diff --git a/dll/opengl/mesa/src/mesa/main/multisample.c b/dll/opengl/mesa/main/multisample.c similarity index 100% rename from dll/opengl/mesa/src/mesa/main/multisample.c rename to dll/opengl/mesa/main/multisample.c diff --git a/dll/opengl/mesa/src/mesa/main/multisample.h b/dll/opengl/mesa/main/multisample.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/multisample.h rename to dll/opengl/mesa/main/multisample.h diff --git a/dll/opengl/mesa/src/mesa/main/pack.c b/dll/opengl/mesa/main/pack.c similarity index 87% rename from dll/opengl/mesa/src/mesa/main/pack.c rename to dll/opengl/mesa/main/pack.c index 4b0ee798691..b6a99d97666 100644 --- a/dll/opengl/mesa/src/mesa/main/pack.c +++ b/dll/opengl/mesa/main/pack.c @@ -39,9 +39,6 @@ #include "pack.h" #include "pixeltransfer.h" #include "imports.h" -#include "../../gallium/auxiliary/util/u_format_rgb9e5.h" -#include "../../gallium/auxiliary/util/u_format_r11g11b10f.h" - /** * Flip the 8 bits in each byte of the given array. @@ -406,11 +403,6 @@ get_component_indexes(GLenum format, *blueIndex = 1; *alphaIndex = 0; break; - case GL_DU8DV8_ATI: - case GL_DUDV_ATI: - *redIndex = 0; - *greenIndex = 1; - break; default: assert(0 && "bad format in get_component_indexes()"); } @@ -753,13 +745,6 @@ _mesa_pack_rgba_span_float(struct gl_context *ctx, GLuint n, GLfloat rgba[][4], rgba[i][BCOMP]); } break; - case GL_DUDV_ATI: - case GL_DU8DV8_ATI: - for (i=0;iSwapBytes) { - for (i = 0; i < n; i++) { - GLuint value = s[i]; - SWAP4BYTE(value); - indexes[i] = value & 0xff; /* lower 8 bits */ - } - } - else { - for (i = 0; i < n; i++) - indexes[i] = s[i] & 0xff; /* lower 8 bits */ - } - } - break; - case GL_FLOAT_32_UNSIGNED_INT_24_8_REV: - { - GLuint i; - const GLuint *s = (const GLuint *) src; - if (unpack->SwapBytes) { - for (i = 0; i < n; i++) { - GLuint value = s[i*2+1]; - SWAP4BYTE(value); - indexes[i] = value & 0xff; /* lower 8 bits */ - } - } - else { - for (i = 0; i < n; i++) - indexes[i] = s[i*2+1] & 0xff; /* lower 8 bits */ - } - } - break; default: _mesa_problem(NULL, "bad srcType in extract_uint_indexes"); @@ -2381,13 +2207,6 @@ get_component_mapping(GLenum format, *bDst = 1; *aDst = 0; break; - case GL_DU8DV8_ATI: - case GL_DUDV_ATI: - *rSrc = 0; - *gSrc = 1; - *bSrc = -1; - *aSrc = -1; - break; default: _mesa_problem(NULL, "bad srcFormat %s in get_component_mapping", _mesa_lookup_enum_by_nr(format)); @@ -2437,8 +2256,6 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4], srcFormat == GL_RGBA || srcFormat == GL_BGRA || srcFormat == GL_ABGR_EXT || - srcFormat == GL_DU8DV8_ATI || - srcFormat == GL_DUDV_ATI || srcFormat == GL_RED_INTEGER_EXT || srcFormat == GL_GREEN_INTEGER_EXT || srcFormat == GL_BLUE_INTEGER_EXT || @@ -2469,8 +2286,6 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4], srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV || srcType == GL_UNSIGNED_INT_8_8_8_8 || srcType == GL_UNSIGNED_INT_8_8_8_8_REV || - srcType == GL_UNSIGNED_INT_10_10_10_2 || - srcType == GL_UNSIGNED_INT_2_10_10_10_REV || srcType == GL_UNSIGNED_INT_5_9_9_9_REV || srcType == GL_UNSIGNED_INT_10F_11F_11F_REV); @@ -2880,124 +2695,6 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4], } } break; - case GL_UNSIGNED_INT_10_10_10_2: - if (!intFormat) { - rs = 1.0F / 1023.0F; - gs = 1.0F / 1023.0F; - bs = 1.0F / 1023.0F; - as = 1.0F / 3.0F; - } - if (swapBytes) { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - SWAP4BYTE(p); - rgba[i][rDst] = ((p >> 22) ) * rs; - rgba[i][gDst] = ((p >> 12) & 0x3ff) * gs; - rgba[i][bDst] = ((p >> 2) & 0x3ff) * bs; - rgba[i][aDst] = ((p ) & 0x3 ) * as; - } - } - else { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - rgba[i][rDst] = ((p >> 22) ) * rs; - rgba[i][gDst] = ((p >> 12) & 0x3ff) * gs; - rgba[i][bDst] = ((p >> 2) & 0x3ff) * bs; - rgba[i][aDst] = ((p ) & 0x3 ) * as; - } - } - break; - case GL_UNSIGNED_INT_2_10_10_10_REV: - if (!intFormat) { - rs = 1.0F / 1023.0F; - gs = 1.0F / 1023.0F; - bs = 1.0F / 1023.0F; - as = 1.0F / 3.0F; - } - if (swapBytes) { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - SWAP4BYTE(p); - rgba[i][rDst] = ((p ) & 0x3ff) * rs; - rgba[i][gDst] = ((p >> 10) & 0x3ff) * gs; - rgba[i][bDst] = ((p >> 20) & 0x3ff) * bs; - rgba[i][aDst] = ((p >> 30) ) * as; - } - } - else { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - rgba[i][rDst] = ((p ) & 0x3ff) * rs; - rgba[i][gDst] = ((p >> 10) & 0x3ff) * gs; - rgba[i][bDst] = ((p >> 20) & 0x3ff) * bs; - rgba[i][aDst] = ((p >> 30) ) * as; - } - } - break; - case GL_UNSIGNED_INT_5_9_9_9_REV: - if (swapBytes) { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - GLfloat f[3]; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - SWAP4BYTE(p); - rgb9e5_to_float3(p, f); - rgba[i][rDst] = f[0]; - rgba[i][gDst] = f[1]; - rgba[i][bDst] = f[2]; - rgba[i][aDst] = 1.0F; - } - } - else { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - GLfloat f[3]; - for (i = 0; i < n; i ++) { - rgb9e5_to_float3(uisrc[i], f); - rgba[i][rDst] = f[0]; - rgba[i][gDst] = f[1]; - rgba[i][bDst] = f[2]; - rgba[i][aDst] = 1.0F; - } - } - break; - case GL_UNSIGNED_INT_10F_11F_11F_REV: - if (swapBytes) { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - GLfloat f[3]; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - SWAP4BYTE(p); - r11g11b10f_to_float3(p, f); - rgba[i][rDst] = f[0]; - rgba[i][gDst] = f[1]; - rgba[i][bDst] = f[2]; - rgba[i][aDst] = 1.0F; - } - } - else { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - GLfloat f[3]; - for (i = 0; i < n; i ++) { - r11g11b10f_to_float3(uisrc[i], f); - rgba[i][rDst] = f[0]; - rgba[i][gDst] = f[1]; - rgba[i][bDst] = f[2]; - rgba[i][aDst] = 1.0F; - } - } - break; default: _mesa_problem(NULL, "bad srcType in extract float data"); break; @@ -3046,8 +2743,6 @@ extract_uint_rgba(GLuint n, GLuint rgba[][4], srcFormat == GL_RGBA || srcFormat == GL_BGRA || srcFormat == GL_ABGR_EXT || - srcFormat == GL_DU8DV8_ATI || - srcFormat == GL_DUDV_ATI || srcFormat == GL_RED_INTEGER_EXT || srcFormat == GL_RG_INTEGER || srcFormat == GL_GREEN_INTEGER_EXT || @@ -3078,8 +2773,6 @@ extract_uint_rgba(GLuint n, GLuint rgba[][4], srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV || srcType == GL_UNSIGNED_INT_8_8_8_8 || srcType == GL_UNSIGNED_INT_8_8_8_8_REV || - srcType == GL_UNSIGNED_INT_10_10_10_2 || - srcType == GL_UNSIGNED_INT_2_10_10_10_REV || srcType == GL_UNSIGNED_INT_5_9_9_9_REV || srcType == GL_UNSIGNED_INT_10F_11F_11F_REV); @@ -3393,114 +3086,6 @@ extract_uint_rgba(GLuint n, GLuint rgba[][4], } } break; - case GL_UNSIGNED_INT_10_10_10_2: - if (swapBytes) { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - SWAP4BYTE(p); - rgba[i][rDst] = ((p >> 22) ); - rgba[i][gDst] = ((p >> 12) & 0x3ff); - rgba[i][bDst] = ((p >> 2) & 0x3ff); - rgba[i][aDst] = ((p ) & 0x3 ); - } - } - else { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - rgba[i][rDst] = ((p >> 22) ); - rgba[i][gDst] = ((p >> 12) & 0x3ff); - rgba[i][bDst] = ((p >> 2) & 0x3ff); - rgba[i][aDst] = ((p ) & 0x3 ); - } - } - break; - case GL_UNSIGNED_INT_2_10_10_10_REV: - if (swapBytes) { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - SWAP4BYTE(p); - rgba[i][rDst] = ((p ) & 0x3ff); - rgba[i][gDst] = ((p >> 10) & 0x3ff); - rgba[i][bDst] = ((p >> 20) & 0x3ff); - rgba[i][aDst] = ((p >> 30) ); - } - } - else { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - rgba[i][rDst] = ((p ) & 0x3ff); - rgba[i][gDst] = ((p >> 10) & 0x3ff); - rgba[i][bDst] = ((p >> 20) & 0x3ff); - rgba[i][aDst] = ((p >> 30) ); - } - } - break; - case GL_UNSIGNED_INT_5_9_9_9_REV: - if (swapBytes) { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - float f[3]; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - SWAP4BYTE(p); - rgb9e5_to_float3(p, f); - rgba[i][rDst] = clamp_float_to_uint(f[0]); - rgba[i][gDst] = clamp_float_to_uint(f[1]); - rgba[i][bDst] = clamp_float_to_uint(f[2]); - rgba[i][aDst] = 1; - } - } - else { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - float f[3]; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - rgb9e5_to_float3(p, f); - rgba[i][rDst] = clamp_float_to_uint(f[0]); - rgba[i][gDst] = clamp_float_to_uint(f[1]); - rgba[i][bDst] = clamp_float_to_uint(f[2]); - rgba[i][aDst] = 1; - } - } - break; - case GL_UNSIGNED_INT_10F_11F_11F_REV: - if (swapBytes) { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - float f[3]; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - SWAP4BYTE(p); - r11g11b10f_to_float3(p, f); - rgba[i][rDst] = clamp_float_to_uint(f[0]); - rgba[i][gDst] = clamp_float_to_uint(f[1]); - rgba[i][bDst] = clamp_float_to_uint(f[2]); - rgba[i][aDst] = 1; - } - } - else { - const GLuint *uisrc = (const GLuint *) src; - GLuint i; - float f[3]; - for (i = 0; i < n; i ++) { - GLuint p = uisrc[i]; - r11g11b10f_to_float3(p, f); - rgba[i][rDst] = clamp_float_to_uint(f[0]); - rgba[i][gDst] = clamp_float_to_uint(f[1]); - rgba[i][bDst] = clamp_float_to_uint(f[2]); - rgba[i][aDst] = 1; - } - } - break; default: _mesa_problem(NULL, "bad srcType in extract uint data"); break; @@ -3579,8 +3164,6 @@ _mesa_unpack_color_span_ubyte(struct gl_context *ctx, srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV || srcType == GL_UNSIGNED_INT_8_8_8_8 || srcType == GL_UNSIGNED_INT_8_8_8_8_REV || - srcType == GL_UNSIGNED_INT_10_10_10_2 || - srcType == GL_UNSIGNED_INT_2_10_10_10_REV || srcType == GL_UNSIGNED_INT_5_9_9_9_REV || srcType == GL_UNSIGNED_INT_10F_11F_11F_REV); @@ -3832,8 +3415,6 @@ _mesa_unpack_color_span_float( struct gl_context *ctx, srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV || srcType == GL_UNSIGNED_INT_8_8_8_8 || srcType == GL_UNSIGNED_INT_8_8_8_8_REV || - srcType == GL_UNSIGNED_INT_10_10_10_2 || - srcType == GL_UNSIGNED_INT_2_10_10_10_REV || srcType == GL_UNSIGNED_INT_5_9_9_9_REV || srcType == GL_UNSIGNED_INT_10F_11F_11F_REV); @@ -4036,8 +3617,6 @@ _mesa_unpack_color_span_uint(struct gl_context *ctx, srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV || srcType == GL_UNSIGNED_INT_8_8_8_8 || srcType == GL_UNSIGNED_INT_8_8_8_8_REV || - srcType == GL_UNSIGNED_INT_10_10_10_2 || - srcType == GL_UNSIGNED_INT_2_10_10_10_REV || srcType == GL_UNSIGNED_INT_5_9_9_9_REV || srcType == GL_UNSIGNED_INT_10F_11F_11F_REV); @@ -4124,71 +3703,6 @@ _mesa_unpack_color_span_uint(struct gl_context *ctx, } - -/** - * Similar to _mesa_unpack_color_span_float(), but for dudv data instead of rgba, - * directly return GLbyte data, no transfer ops apply. - */ -void -_mesa_unpack_dudv_span_byte( struct gl_context *ctx, - GLuint n, GLenum dstFormat, GLbyte dest[], - GLenum srcFormat, GLenum srcType, - const GLvoid *source, - const struct gl_pixelstore_attrib *srcPacking, - GLbitfield transferOps ) -{ - ASSERT(dstFormat == GL_DUDV_ATI); - ASSERT(srcFormat == GL_DUDV_ATI || - srcFormat == GL_DU8DV8_ATI); - - ASSERT(srcType == GL_UNSIGNED_BYTE || - srcType == GL_BYTE || - srcType == GL_UNSIGNED_SHORT || - srcType == GL_SHORT || - srcType == GL_UNSIGNED_INT || - srcType == GL_INT || - srcType == GL_HALF_FLOAT_ARB || - srcType == GL_FLOAT); - - /* general solution */ - { - GLint dstComponents; - GLbyte *dst = dest; - GLuint i; - GLfloat (*rgba)[4] = (GLfloat (*)[4]) malloc(4 * n * sizeof(GLfloat)); - - if (!rgba) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "pixel unpacking"); - return; - } - - dstComponents = _mesa_components_in_format( dstFormat ); - /* source & dest image formats should have been error checked by now */ - assert(dstComponents > 0); - - /* - * Extract image data and convert to RGBA floats - */ - extract_float_rgba(n, rgba, srcFormat, srcType, source, - srcPacking->SwapBytes); - - - /* Now determine which color channels we need to produce. - * And determine the dest index (offset) within each color tuple. - */ - - /* Now pack results in the requested dstFormat */ - for (i = 0; i < n; i++) { - /* not sure - need clamp[-1,1] here? */ - dst[0] = FLOAT_TO_BYTE(rgba[i][RCOMP]); - dst[1] = FLOAT_TO_BYTE(rgba[i][GCOMP]); - dst += dstComponents; - } - - free(rgba); - } -} - /* * Unpack a row of color index data from a client buffer according to * the pixel unpacking parameters. @@ -4436,15 +3950,12 @@ _mesa_unpack_stencil_span( struct gl_context *ctx, GLuint n, srcType == GL_SHORT || srcType == GL_UNSIGNED_INT || srcType == GL_INT || - srcType == GL_UNSIGNED_INT_24_8_EXT || srcType == GL_HALF_FLOAT_ARB || - srcType == GL_FLOAT || - srcType == GL_FLOAT_32_UNSIGNED_INT_24_8_REV); + srcType == GL_FLOAT); ASSERT(dstType == GL_UNSIGNED_BYTE || dstType == GL_UNSIGNED_SHORT || - dstType == GL_UNSIGNED_INT || - dstType == GL_FLOAT_32_UNSIGNED_INT_24_8_REV); + dstType == GL_UNSIGNED_INT); /* only shift and offset apply to stencil */ transferOps &= IMAGE_SHIFT_OFFSET_BIT; @@ -4516,15 +4027,6 @@ _mesa_unpack_stencil_span( struct gl_context *ctx, GLuint n, case GL_UNSIGNED_INT: memcpy(dest, indexes, n * sizeof(GLuint)); break; - case GL_FLOAT_32_UNSIGNED_INT_24_8_REV: - { - GLuint *dst = (GLuint *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i*2+1] = indexes[i] & 0xff; /* lower 8 bits */ - } - } - break; default: _mesa_problem(ctx, "bad dstType in _mesa_unpack_stencil_span"); } @@ -4741,17 +4243,6 @@ _mesa_unpack_depth_span( struct gl_context *ctx, GLuint n, } return; } - if (srcType == GL_UNSIGNED_INT_24_8 - && dstType == GL_UNSIGNED_INT - && depthMax == 0xffffff) { - const GLuint *src = (const GLuint *) source; - GLuint *dst = (GLuint *) dest; - GLuint i; - for (i = 0; i < n; i++) { - dst[i] = src[i] >> 8; - } - return; - } /* XXX may want to add additional cases here someday */ } @@ -4795,51 +4286,6 @@ _mesa_unpack_depth_span( struct gl_context *ctx, GLuint n, case GL_UNSIGNED_INT: DEPTH_VALUES(GLuint, UINT_TO_FLOAT); break; - case GL_UNSIGNED_INT_24_8_EXT: /* GL_EXT_packed_depth_stencil */ - if (dstType == GL_UNSIGNED_INT_24_8_EXT && - depthMax == 0xffffff && - ctx->Pixel.DepthScale == 1.0 && - ctx->Pixel.DepthBias == 0.0) { - const GLuint *src = (const GLuint *) source; - GLuint *zValues = (GLuint *) dest; - GLuint i; - for (i = 0; i < n; i++) { - GLuint value = src[i]; - if (srcPacking->SwapBytes) { - SWAP4BYTE(value); - } - zValues[i] = value & 0xffffff00; - } - free(depthTemp); - return; - } - else { - const GLuint *src = (const GLuint *) source; - const GLfloat scale = 1.0f / 0xffffff; - GLuint i; - for (i = 0; i < n; i++) { - GLuint value = src[i]; - if (srcPacking->SwapBytes) { - SWAP4BYTE(value); - } - depthValues[i] = (value >> 8) * scale; - } - } - break; - case GL_FLOAT_32_UNSIGNED_INT_24_8_REV: - { - GLuint i; - const GLfloat *src = (const GLfloat *)source; - for (i = 0; i < n; i++) { - GLfloat value = src[i * 2]; - if (srcPacking->SwapBytes) { - SWAP4BYTE(value); - } - depthValues[i] = value; - } - needClamp = GL_TRUE; - } - break; case GL_FLOAT: DEPTH_VALUES(GLfloat, 1*); needClamp = GL_TRUE; @@ -4919,13 +4365,6 @@ _mesa_unpack_depth_span( struct gl_context *ctx, GLuint n, else if (dstType == GL_FLOAT) { /* Nothing to do. depthValues is pointing to dest. */ } - else if (dstType == GL_FLOAT_32_UNSIGNED_INT_24_8_REV) { - GLfloat *zValues = (GLfloat*) dest; - GLuint i; - for (i = 0; i < n; i++) { - zValues[i*2] = depthValues[i]; - } - } else { ASSERT(0); } @@ -5054,67 +4493,6 @@ _mesa_pack_depth_span( struct gl_context *ctx, GLuint n, GLvoid *dest, -/** - * Pack depth and stencil values as GL_DEPTH_STENCIL (GL_UNSIGNED_INT_24_8 etc) - */ -void -_mesa_pack_depth_stencil_span(struct gl_context *ctx,GLuint n, - GLenum dstType, GLuint *dest, - const GLfloat *depthVals, - const GLubyte *stencilVals, - const struct gl_pixelstore_attrib *dstPacking) -{ - GLfloat *depthCopy = (GLfloat *) malloc(n * sizeof(GLfloat)); - GLubyte *stencilCopy = (GLubyte *) malloc(n * sizeof(GLubyte)); - GLuint i; - - if (!depthCopy || !stencilCopy) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "pixel packing"); - free(depthCopy); - free(stencilCopy); - return; - } - - if (ctx->Pixel.DepthScale != 1.0 || ctx->Pixel.DepthBias != 0.0) { - memcpy(depthCopy, depthVals, n * sizeof(GLfloat)); - _mesa_scale_and_bias_depth(ctx, n, depthCopy); - depthVals = depthCopy; - } - - if (ctx->Pixel.IndexShift || - ctx->Pixel.IndexOffset || - ctx->Pixel.MapStencilFlag) { - memcpy(stencilCopy, stencilVals, n * sizeof(GLubyte)); - _mesa_apply_stencil_transfer_ops(ctx, n, stencilCopy); - stencilVals = stencilCopy; - } - - switch (dstType) { - case GL_UNSIGNED_INT_24_8: - for (i = 0; i < n; i++) { - GLuint z = (GLuint) (depthVals[i] * 0xffffff); - dest[i] = (z << 8) | (stencilVals[i] & 0xff); - } - break; - case GL_FLOAT_32_UNSIGNED_INT_24_8_REV: - for (i = 0; i < n; i++) { - ((GLfloat*)dest)[i*2] = depthVals[i]; - dest[i*2+1] = stencilVals[i] & 0xff; - } - break; - } - - if (dstPacking->SwapBytes) { - _mesa_swap4(dest, n); - } - - free(depthCopy); - free(stencilCopy); -} - - - - /** * Unpack image data. Apply byte swapping, byte flipping (bitmap). * Return all image data in a contiguous block. This is used when we diff --git a/dll/opengl/mesa/src/mesa/main/pack.h b/dll/opengl/mesa/main/pack.h similarity index 88% rename from dll/opengl/mesa/src/mesa/main/pack.h rename to dll/opengl/mesa/main/pack.h index cd49c74954a..c5ccc9f493a 100644 --- a/dll/opengl/mesa/src/mesa/main/pack.h +++ b/dll/opengl/mesa/main/pack.h @@ -81,14 +81,6 @@ _mesa_unpack_color_span_uint(struct gl_context *ctx, const GLvoid *source, const struct gl_pixelstore_attrib *srcPacking); -extern void -_mesa_unpack_dudv_span_byte(struct gl_context *ctx, - GLuint n, GLenum dstFormat, GLbyte dest[], - GLenum srcFormat, GLenum srcType, - const GLvoid *source, - const struct gl_pixelstore_attrib *srcPacking, - GLbitfield transferOps); - extern void _mesa_unpack_index_span(struct gl_context *ctx, GLuint n, GLenum dstType, GLvoid *dest, @@ -129,14 +121,6 @@ _mesa_pack_depth_span(struct gl_context *ctx, GLuint n, GLvoid *dest, const struct gl_pixelstore_attrib *dstPacking); -extern void -_mesa_pack_depth_stencil_span(struct gl_context *ctx,GLuint n, - GLenum dstType, GLuint *dest, - const GLfloat *depthVals, - const GLubyte *stencilVals, - const struct gl_pixelstore_attrib *dstPacking); - - extern void * _mesa_unpack_image(GLuint dimensions, GLsizei width, GLsizei height, GLsizei depth, diff --git a/dll/opengl/mesa/src/mesa/main/pack_tmp.h b/dll/opengl/mesa/main/pack_tmp.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/pack_tmp.h rename to dll/opengl/mesa/main/pack_tmp.h diff --git a/dll/opengl/mesa/src/mesa/main/pixel.c b/dll/opengl/mesa/main/pixel.c similarity index 77% rename from dll/opengl/mesa/src/mesa/main/pixel.c rename to dll/opengl/mesa/main/pixel.c index e73c5a49a4a..c4c12da9e9b 100644 --- a/dll/opengl/mesa/src/mesa/main/pixel.c +++ b/dll/opengl/mesa/main/pixel.c @@ -35,7 +35,6 @@ #include "macros.h" #include "mfeatures.h" #include "pixel.h" -#include "pbo.h" #include "mtypes.h" #include "main/dispatch.h" @@ -143,44 +142,6 @@ store_pixelmap(struct gl_context *ctx, GLenum map, GLsizei mapsize, } -/** - * Convenience wrapper for _mesa_validate_pbo_access() for gl[Get]PixelMap(). - */ -static GLboolean -validate_pbo_access(struct gl_context *ctx, - struct gl_pixelstore_attrib *pack, GLsizei mapsize, - GLenum format, GLenum type, GLsizei clientMemSize, - const GLvoid *ptr) -{ - GLboolean ok; - - /* Note, need to use DefaultPacking and Unpack's buffer object */ - _mesa_reference_buffer_object(ctx, - &ctx->DefaultPacking.BufferObj, - pack->BufferObj); - - ok = _mesa_validate_pbo_access(1, &ctx->DefaultPacking, mapsize, 1, 1, - format, type, clientMemSize, ptr); - - /* restore */ - _mesa_reference_buffer_object(ctx, - &ctx->DefaultPacking.BufferObj, - ctx->Shared->NullBufferObj); - - if (!ok) { - if (_mesa_is_bufferobj(pack->BufferObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "gl[Get]PixelMap*v(out of bounds PBO access)"); - } else { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetnPixelMap*vARB(out of bounds access:" - " bufSize (%d) is too small)", clientMemSize); - } - } - return ok; -} - - static void GLAPIENTRY _mesa_PixelMapfv( GLenum map, GLsizei mapsize, const GLfloat *values ) { @@ -203,23 +164,11 @@ _mesa_PixelMapfv( GLenum map, GLsizei mapsize, const GLfloat *values ) FLUSH_VERTICES(ctx, _NEW_PIXEL); - if (!validate_pbo_access(ctx, &ctx->Unpack, mapsize, GL_INTENSITY, - GL_FLOAT, INT_MAX, values)) { - return; - } - - values = (const GLfloat *) _mesa_map_pbo_source(ctx, &ctx->Unpack, values); if (!values) { - if (_mesa_is_bufferobj(ctx->Unpack.BufferObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glPixelMapfv(PBO is mapped)"); - } return; } store_pixelmap(ctx, map, mapsize, values); - - _mesa_unmap_pbo_source(ctx, &ctx->Unpack); } @@ -245,17 +194,7 @@ _mesa_PixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values ) FLUSH_VERTICES(ctx, _NEW_PIXEL); - if (!validate_pbo_access(ctx, &ctx->Unpack, mapsize, GL_INTENSITY, - GL_UNSIGNED_INT, INT_MAX, values)) { - return; - } - - values = (const GLuint *) _mesa_map_pbo_source(ctx, &ctx->Unpack, values); if (!values) { - if (_mesa_is_bufferobj(ctx->Unpack.BufferObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glPixelMapuiv(PBO is mapped)"); - } return; } @@ -273,8 +212,6 @@ _mesa_PixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values ) } } - _mesa_unmap_pbo_source(ctx, &ctx->Unpack); - store_pixelmap(ctx, map, mapsize, fvalues); } @@ -301,17 +238,7 @@ _mesa_PixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values ) FLUSH_VERTICES(ctx, _NEW_PIXEL); - if (!validate_pbo_access(ctx, &ctx->Unpack, mapsize, GL_INTENSITY, - GL_UNSIGNED_SHORT, INT_MAX, values)) { - return; - } - - values = (const GLushort *) _mesa_map_pbo_source(ctx, &ctx->Unpack, values); if (!values) { - if (_mesa_is_bufferobj(ctx->Unpack.BufferObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glPixelMapusv(PBO is mapped)"); - } return; } @@ -329,14 +256,12 @@ _mesa_PixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values ) } } - _mesa_unmap_pbo_source(ctx, &ctx->Unpack); - store_pixelmap(ctx, map, mapsize, fvalues); } static void GLAPIENTRY -_mesa_GetnPixelMapfvARB( GLenum map, GLsizei bufSize, GLfloat *values ) +_mesa_GetPixelMapfv( GLenum map, GLfloat *values ) { GET_CURRENT_CONTEXT(ctx); GLint mapsize, i; @@ -352,17 +277,7 @@ _mesa_GetnPixelMapfvARB( GLenum map, GLsizei bufSize, GLfloat *values ) mapsize = pm->Size; - if (!validate_pbo_access(ctx, &ctx->Pack, mapsize, GL_INTENSITY, - GL_FLOAT, bufSize, values)) { - return; - } - - values = (GLfloat *) _mesa_map_pbo_dest(ctx, &ctx->Pack, values); if (!values) { - if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetPixelMapfv(PBO is mapped)"); - } return; } @@ -375,19 +290,11 @@ _mesa_GetnPixelMapfvARB( GLenum map, GLsizei bufSize, GLfloat *values ) else { memcpy(values, pm->Map, mapsize * sizeof(GLfloat)); } - - _mesa_unmap_pbo_dest(ctx, &ctx->Pack); } static void GLAPIENTRY -_mesa_GetPixelMapfv( GLenum map, GLfloat *values ) -{ - _mesa_GetnPixelMapfvARB(map, INT_MAX, values); -} - -static void GLAPIENTRY -_mesa_GetnPixelMapuivARB( GLenum map, GLsizei bufSize, GLuint *values ) +_mesa_GetPixelMapuiv( GLenum map, GLuint *values ) { GET_CURRENT_CONTEXT(ctx); GLint mapsize, i; @@ -403,17 +310,7 @@ _mesa_GetnPixelMapuivARB( GLenum map, GLsizei bufSize, GLuint *values ) mapsize = pm->Size; - if (!validate_pbo_access(ctx, &ctx->Pack, mapsize, GL_INTENSITY, - GL_UNSIGNED_INT, bufSize, values)) { - return; - } - - values = (GLuint *) _mesa_map_pbo_dest(ctx, &ctx->Pack, values); if (!values) { - if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetPixelMapuiv(PBO is mapped)"); - } return; } @@ -426,19 +323,11 @@ _mesa_GetnPixelMapuivARB( GLenum map, GLsizei bufSize, GLuint *values ) values[i] = FLOAT_TO_UINT( pm->Map[i] ); } } - - _mesa_unmap_pbo_dest(ctx, &ctx->Pack); } static void GLAPIENTRY -_mesa_GetPixelMapuiv( GLenum map, GLuint *values ) -{ - _mesa_GetnPixelMapuivARB(map, INT_MAX, values); -} - -static void GLAPIENTRY -_mesa_GetnPixelMapusvARB( GLenum map, GLsizei bufSize, GLushort *values ) +_mesa_GetPixelMapusv( GLenum map, GLushort *values ) { GET_CURRENT_CONTEXT(ctx); GLint mapsize, i; @@ -454,17 +343,7 @@ _mesa_GetnPixelMapusvARB( GLenum map, GLsizei bufSize, GLushort *values ) mapsize = pm->Size; - if (!validate_pbo_access(ctx, &ctx->Pack, mapsize, GL_INTENSITY, - GL_UNSIGNED_SHORT, bufSize, values)) { - return; - } - - values = (GLushort *) _mesa_map_pbo_dest(ctx, &ctx->Pack, values); if (!values) { - if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetPixelMapusv(PBO is mapped)"); - } return; } @@ -485,15 +364,6 @@ _mesa_GetnPixelMapusvARB( GLenum map, GLsizei bufSize, GLushort *values ) CLAMPED_FLOAT_TO_USHORT(values[i], pm->Map[i] ); } } - - _mesa_unmap_pbo_dest(ctx, &ctx->Pack); -} - - -static void GLAPIENTRY -_mesa_GetPixelMapusv( GLenum map, GLushort *values ) -{ - _mesa_GetnPixelMapusvARB(map, INT_MAX, values); } @@ -663,11 +533,6 @@ _mesa_init_pixel_dispatch(struct _glapi_table *disp) SET_PixelTransferf(disp, _mesa_PixelTransferf); SET_PixelTransferi(disp, _mesa_PixelTransferi); SET_PixelZoom(disp, _mesa_PixelZoom); - - /* GL_ARB_robustness */ - SET_GetnPixelMapfvARB(disp, _mesa_GetnPixelMapfvARB); - SET_GetnPixelMapuivARB(disp, _mesa_GetnPixelMapuivARB); - SET_GetnPixelMapusvARB(disp, _mesa_GetnPixelMapusvARB); } diff --git a/dll/opengl/mesa/src/mesa/main/pixel.h b/dll/opengl/mesa/main/pixel.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/pixel.h rename to dll/opengl/mesa/main/pixel.h diff --git a/dll/opengl/mesa/src/mesa/main/pixelstore.c b/dll/opengl/mesa/main/pixelstore.c similarity index 93% rename from dll/opengl/mesa/src/mesa/main/pixelstore.c rename to dll/opengl/mesa/main/pixelstore.c index 81474491dc5..bbc4e5d6fb4 100644 --- a/dll/opengl/mesa/src/mesa/main/pixelstore.c +++ b/dll/opengl/mesa/main/pixelstore.c @@ -235,10 +235,6 @@ _mesa_init_pixelstore( struct gl_context *ctx ) ctx->Pack.SwapBytes = GL_FALSE; ctx->Pack.LsbFirst = GL_FALSE; ctx->Pack.Invert = GL_FALSE; -#if FEATURE_EXT_pixel_buffer_object - _mesa_reference_buffer_object(ctx, &ctx->Pack.BufferObj, - ctx->Shared->NullBufferObj); -#endif ctx->Unpack.Alignment = 4; ctx->Unpack.RowLength = 0; ctx->Unpack.ImageHeight = 0; @@ -248,10 +244,6 @@ _mesa_init_pixelstore( struct gl_context *ctx ) ctx->Unpack.SwapBytes = GL_FALSE; ctx->Unpack.LsbFirst = GL_FALSE; ctx->Unpack.Invert = GL_FALSE; -#if FEATURE_EXT_pixel_buffer_object - _mesa_reference_buffer_object(ctx, &ctx->Unpack.BufferObj, - ctx->Shared->NullBufferObj); -#endif /* * _mesa_unpack_image() returns image data in this format. When we @@ -268,8 +260,4 @@ _mesa_init_pixelstore( struct gl_context *ctx ) ctx->DefaultPacking.SwapBytes = GL_FALSE; ctx->DefaultPacking.LsbFirst = GL_FALSE; ctx->DefaultPacking.Invert = GL_FALSE; -#if FEATURE_EXT_pixel_buffer_object - _mesa_reference_buffer_object(ctx, &ctx->DefaultPacking.BufferObj, - ctx->Shared->NullBufferObj); -#endif } diff --git a/dll/opengl/mesa/src/mesa/main/pixelstore.h b/dll/opengl/mesa/main/pixelstore.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/pixelstore.h rename to dll/opengl/mesa/main/pixelstore.h diff --git a/dll/opengl/mesa/src/mesa/main/pixeltransfer.c b/dll/opengl/mesa/main/pixeltransfer.c similarity index 100% rename from dll/opengl/mesa/src/mesa/main/pixeltransfer.c rename to dll/opengl/mesa/main/pixeltransfer.c diff --git a/dll/opengl/mesa/src/mesa/main/pixeltransfer.h b/dll/opengl/mesa/main/pixeltransfer.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/pixeltransfer.h rename to dll/opengl/mesa/main/pixeltransfer.h diff --git a/dll/opengl/mesa/src/mesa/main/points.c b/dll/opengl/mesa/main/points.c similarity index 98% rename from dll/opengl/mesa/src/mesa/main/points.c rename to dll/opengl/mesa/main/points.c index 87bfae27eba..f9870c72e46 100644 --- a/dll/opengl/mesa/src/mesa/main/points.c +++ b/dll/opengl/mesa/main/points.c @@ -251,8 +251,6 @@ _mesa_PointParameterfv( GLenum pname, const GLfloat *params) void _mesa_init_point(struct gl_context *ctx) { - GLuint i; - ctx->Point.SmoothFlag = GL_FALSE; ctx->Point.Size = 1.0; ctx->Point.Params[0] = 1.0; @@ -266,7 +264,5 @@ _mesa_init_point(struct gl_context *ctx) ctx->Point.PointSprite = GL_FALSE; /* GL_ARB/NV_point_sprite */ ctx->Point.SpriteRMode = GL_ZERO; /* GL_NV_point_sprite (only!) */ ctx->Point.SpriteOrigin = GL_UPPER_LEFT; /* GL_ARB_point_sprite */ - for (i = 0; i < Elements(ctx->Point.CoordReplace); i++) { - ctx->Point.CoordReplace[i] = GL_FALSE; /* GL_ARB/NV_point_sprite */ - } + ctx->Point.CoordReplace = GL_FALSE; /* GL_ARB/NV_point_sprite */ } diff --git a/dll/opengl/mesa/src/mesa/main/points.h b/dll/opengl/mesa/main/points.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/points.h rename to dll/opengl/mesa/main/points.h diff --git a/dll/opengl/mesa/src/mesa/main/polygon.c b/dll/opengl/mesa/main/polygon.c similarity index 90% rename from dll/opengl/mesa/src/mesa/main/polygon.c rename to dll/opengl/mesa/main/polygon.c index addca0228d5..ab84ae318fd 100644 --- a/dll/opengl/mesa/src/mesa/main/polygon.c +++ b/dll/opengl/mesa/main/polygon.c @@ -34,7 +34,6 @@ #include "image.h" #include "enums.h" #include "pack.h" -#include "pbo.h" #include "polygon.h" #include "mtypes.h" @@ -193,17 +192,10 @@ _mesa_PolygonMode( GLenum face, GLenum mode ) void _mesa_polygon_stipple(struct gl_context *ctx, const GLubyte *pattern) { - pattern = _mesa_map_validate_pbo_source(ctx, 2, - &ctx->Unpack, 32, 32, 1, - GL_COLOR_INDEX, GL_BITMAP, - INT_MAX, pattern, - "glPolygonStipple"); if (!pattern) return; _mesa_unpack_polygon_stipple(pattern, ctx->PolygonStipple, &ctx->Unpack); - - _mesa_unmap_pbo_source(ctx, &ctx->Unpack); } @@ -232,31 +224,17 @@ _mesa_PolygonStipple( const GLubyte *pattern ) * Called by glPolygonStipple. */ void GLAPIENTRY -_mesa_GetnPolygonStippleARB( GLsizei bufSize, GLubyte *dest ) +_mesa_GetPolygonStipple( GLubyte *dest ) { GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); if (MESA_VERBOSE&VERBOSE_API) _mesa_debug(ctx, "glGetPolygonStipple\n"); - - dest = _mesa_map_validate_pbo_dest(ctx, 2, - &ctx->Pack, 32, 32, 1, - GL_COLOR_INDEX, GL_BITMAP, - bufSize, dest, "glGetPolygonStipple"); if (!dest) return; _mesa_pack_polygon_stipple(ctx->PolygonStipple, dest, &ctx->Pack); - - _mesa_unmap_pbo_dest(ctx, &ctx->Pack); -} - - -void GLAPIENTRY -_mesa_GetPolygonStipple( GLubyte *dest ) -{ - _mesa_GetnPolygonStippleARB(INT_MAX, dest); } diff --git a/dll/opengl/mesa/src/mesa/main/polygon.h b/dll/opengl/mesa/main/polygon.h similarity index 95% rename from dll/opengl/mesa/src/mesa/main/polygon.h rename to dll/opengl/mesa/main/polygon.h index 35f222f269d..13f7c91ed07 100644 --- a/dll/opengl/mesa/src/mesa/main/polygon.h +++ b/dll/opengl/mesa/main/polygon.h @@ -36,9 +36,6 @@ struct gl_context; -extern void GLAPIENTRY -_mesa_GetnPolygonStippleARB( GLsizei bufSize, GLubyte *dest ); - extern void _mesa_polygon_stipple(struct gl_context *ctx, const GLubyte *pattern); diff --git a/dll/opengl/mesa/src/mesa/main/rastpos.c b/dll/opengl/mesa/main/rastpos.c similarity index 96% rename from dll/opengl/mesa/src/mesa/main/rastpos.c rename to dll/opengl/mesa/main/rastpos.c index a1f6f423416..0cf4e4e95f7 100644 --- a/dll/opengl/mesa/src/mesa/main/rastpos.c +++ b/dll/opengl/mesa/main/rastpos.c @@ -266,14 +266,7 @@ window_pos3f(GLfloat x, GLfloat y, GLfloat z) = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3], 0.0F, 1.0F); /* raster texcoord = current texcoord */ - { - GLuint texSet; - for (texSet = 0; texSet < ctx->Const.MaxTextureCoordUnits; texSet++) { - assert(texSet < Elements(ctx->Current.RasterTexCoords)); - COPY_4FV( ctx->Current.RasterTexCoords[texSet], - ctx->Current.Attrib[VERT_ATTRIB_TEX0 + texSet] ); - } - } + COPY_4FV( ctx->Current.RasterTexCoords, ctx->Current.Attrib[VERT_ATTRIB_TEX] ); if (ctx->RenderMode==GL_SELECT) { _mesa_update_hitflag( ctx, ctx->Current.RasterPos[2] ); @@ -552,14 +545,11 @@ _mesa_init_rastpos_dispatch(struct _glapi_table *disp) */ void _mesa_init_rastpos( struct gl_context * ctx ) { - int i; - ASSIGN_4V( ctx->Current.RasterPos, 0.0, 0.0, 0.0, 1.0 ); ctx->Current.RasterDistance = 0.0; ASSIGN_4V( ctx->Current.RasterColor, 1.0, 1.0, 1.0, 1.0 ); ASSIGN_4V( ctx->Current.RasterSecondaryColor, 0.0, 0.0, 0.0, 1.0 ); - for (i = 0; i < Elements(ctx->Current.RasterTexCoords); i++) - ASSIGN_4V( ctx->Current.RasterTexCoords[i], 0.0, 0.0, 0.0, 1.0 ); + ASSIGN_4V( ctx->Current.RasterTexCoords, 0.0, 0.0, 0.0, 1.0 ); ctx->Current.RasterPosValid = GL_TRUE; } diff --git a/dll/opengl/mesa/src/mesa/main/rastpos.h b/dll/opengl/mesa/main/rastpos.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/rastpos.h rename to dll/opengl/mesa/main/rastpos.h diff --git a/dll/opengl/mesa/src/mesa/main/readpix.c b/dll/opengl/mesa/main/readpix.c similarity index 64% rename from dll/opengl/mesa/src/mesa/main/readpix.c rename to dll/opengl/mesa/main/readpix.c index d0947d6c1cd..819b22d59dc 100644 --- a/dll/opengl/mesa/src/mesa/main/readpix.c +++ b/dll/opengl/mesa/main/readpix.c @@ -34,7 +34,6 @@ #include "image.h" #include "mtypes.h" #include "pack.h" -#include "pbo.h" #include "state.h" @@ -306,7 +305,7 @@ slow_read_rgba_pixels( struct gl_context *ctx, GLbitfield transferOps ) { struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer; - const gl_format rbFormat = _mesa_get_srgb_format_linear(rb->Format); + const gl_format rbFormat = rb->Format; void *rgba; GLubyte *dst, *map; int dstStride, stride, j; @@ -367,8 +366,7 @@ read_rgba_pixels( struct gl_context *ctx, if (!rb) return; - if ((ctx->Color._ClampReadColor == GL_TRUE || type != GL_FLOAT) && - !_mesa_is_integer_format(format)) { + if (!_mesa_is_integer_format(format)) { transferOps |= IMAGE_CLAMP_BIT; } @@ -383,213 +381,6 @@ read_rgba_pixels( struct gl_context *ctx, format, type, pixels, packing, transferOps); } -/** - * For a packed depth/stencil buffer being read as depth/stencil, just memcpy the - * data (possibly swapping 8/24 vs 24/8 as we go). - */ -static GLboolean -fast_read_depth_stencil_pixels(struct gl_context *ctx, - GLint x, GLint y, - GLsizei width, GLsizei height, - GLubyte *dst, int dstStride) -{ - struct gl_framebuffer *fb = ctx->ReadBuffer; - struct gl_renderbuffer *rb = fb->Attachment[BUFFER_DEPTH].Renderbuffer; - struct gl_renderbuffer *stencilRb = fb->Attachment[BUFFER_STENCIL].Renderbuffer; - GLubyte *map; - int stride, i; - - if (rb != stencilRb) - return GL_FALSE; - - if (rb->Format != MESA_FORMAT_Z24_S8 && - rb->Format != MESA_FORMAT_S8_Z24) - return GL_FALSE; - - ctx->Driver.MapRenderbuffer(ctx, rb, x, y, width, height, GL_MAP_READ_BIT, - &map, &stride); - if (!map) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels"); - return GL_TRUE; /* don't bother trying the slow path */ - } - - for (i = 0; i < height; i++) { - _mesa_unpack_uint_24_8_depth_stencil_row(rb->Format, width, - map, (GLuint *)dst); - map += stride; - dst += dstStride; - } - - ctx->Driver.UnmapRenderbuffer(ctx, rb); - - return GL_TRUE; -} - - -/** - * For non-float-depth and stencil buffers being read as 24/8 depth/stencil, - * copy the integer data directly instead of converting depth to float and - * re-packing. - */ -static GLboolean -fast_read_depth_stencil_pixels_separate(struct gl_context *ctx, - GLint x, GLint y, - GLsizei width, GLsizei height, - uint32_t *dst, int dstStride) -{ - struct gl_framebuffer *fb = ctx->ReadBuffer; - struct gl_renderbuffer *depthRb = fb->Attachment[BUFFER_DEPTH].Renderbuffer; - struct gl_renderbuffer *stencilRb = fb->Attachment[BUFFER_STENCIL].Renderbuffer; - GLubyte *depthMap, *stencilMap; - int depthStride, stencilStride, i, j; - - if (_mesa_get_format_datatype(depthRb->Format) != GL_UNSIGNED_NORMALIZED) - return GL_FALSE; - - ctx->Driver.MapRenderbuffer(ctx, depthRb, x, y, width, height, - GL_MAP_READ_BIT, &depthMap, &depthStride); - if (!depthMap) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels"); - return GL_TRUE; /* don't bother trying the slow path */ - } - - ctx->Driver.MapRenderbuffer(ctx, stencilRb, x, y, width, height, - GL_MAP_READ_BIT, &stencilMap, &stencilStride); - if (!stencilMap) { - ctx->Driver.UnmapRenderbuffer(ctx, depthRb); - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels"); - return GL_TRUE; /* don't bother trying the slow path */ - } - - for (j = 0; j < height; j++) { - GLubyte stencilVals[MAX_WIDTH]; - - _mesa_unpack_uint_z_row(depthRb->Format, width, depthMap, dst); - _mesa_unpack_ubyte_stencil_row(stencilRb->Format, width, - stencilMap, stencilVals); - - for (i = 0; i < width; i++) { - dst[i] = (dst[i] & 0xffffff00) | stencilVals[i]; - } - - depthMap += depthStride; - stencilMap += stencilStride; - dst += dstStride / 4; - } - - ctx->Driver.UnmapRenderbuffer(ctx, depthRb); - ctx->Driver.UnmapRenderbuffer(ctx, stencilRb); - - return GL_TRUE; -} - -static void -slow_read_depth_stencil_pixels_separate(struct gl_context *ctx, - GLint x, GLint y, - GLsizei width, GLsizei height, - GLenum type, - const struct gl_pixelstore_attrib *packing, - GLubyte *dst, int dstStride) -{ - struct gl_framebuffer *fb = ctx->ReadBuffer; - struct gl_renderbuffer *depthRb = fb->Attachment[BUFFER_DEPTH].Renderbuffer; - struct gl_renderbuffer *stencilRb = fb->Attachment[BUFFER_STENCIL].Renderbuffer; - GLubyte *depthMap, *stencilMap; - int depthStride, stencilStride, j; - - /* The depth and stencil buffers might be separate, or a single buffer. - * If one buffer, only map it once. - */ - ctx->Driver.MapRenderbuffer(ctx, depthRb, x, y, width, height, - GL_MAP_READ_BIT, &depthMap, &depthStride); - if (!depthMap) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels"); - return; - } - - if (stencilRb != depthRb) { - ctx->Driver.MapRenderbuffer(ctx, stencilRb, x, y, width, height, - GL_MAP_READ_BIT, &stencilMap, - &stencilStride); - if (!stencilMap) { - ctx->Driver.UnmapRenderbuffer(ctx, depthRb); - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glReadPixels"); - return; - } - } - else { - stencilMap = depthMap; - stencilStride = depthStride; - } - - for (j = 0; j < height; j++) { - GLubyte stencilVals[MAX_WIDTH]; - GLfloat depthVals[MAX_WIDTH]; - - _mesa_unpack_float_z_row(depthRb->Format, width, depthMap, depthVals); - _mesa_unpack_ubyte_stencil_row(stencilRb->Format, width, - stencilMap, stencilVals); - - _mesa_pack_depth_stencil_span(ctx, width, type, (GLuint *)dst, - depthVals, stencilVals, packing); - - depthMap += depthStride; - stencilMap += stencilStride; - dst += dstStride; - } - - ctx->Driver.UnmapRenderbuffer(ctx, depthRb); - if (stencilRb != depthRb) { - ctx->Driver.UnmapRenderbuffer(ctx, stencilRb); - } -} - - -/** - * Read combined depth/stencil values. - * We'll have already done error checking to be sure the expected - * depth and stencil buffers really exist. - */ -static void -read_depth_stencil_pixels(struct gl_context *ctx, - GLint x, GLint y, - GLsizei width, GLsizei height, - GLenum type, GLvoid *pixels, - const struct gl_pixelstore_attrib *packing ) -{ - const GLboolean scaleOrBias - = ctx->Pixel.DepthScale != 1.0 || ctx->Pixel.DepthBias != 0.0; - const GLboolean stencilTransfer = ctx->Pixel.IndexShift - || ctx->Pixel.IndexOffset || ctx->Pixel.MapStencilFlag; - GLubyte *dst; - int dstStride; - - dst = (GLubyte *) _mesa_image_address2d(packing, pixels, - width, height, - GL_DEPTH_STENCIL_EXT, - type, 0, 0); - dstStride = _mesa_image_row_stride(packing, width, - GL_DEPTH_STENCIL_EXT, type); - - /* Fast 24/8 reads. */ - if (type == GL_UNSIGNED_INT_24_8 && - !scaleOrBias && !stencilTransfer && !packing->SwapBytes) { - if (fast_read_depth_stencil_pixels(ctx, x, y, width, height, - dst, dstStride)) - return; - - if (fast_read_depth_stencil_pixels_separate(ctx, x, y, width, height, - (uint32_t *)dst, dstStride)) - return; - } - - slow_read_depth_stencil_pixels_separate(ctx, x, y, width, height, - type, packing, - dst, dstStride); -} - - - /** * Software fallback routine for ctx->Driver.ReadPixels(). * By time we get here, all error checking will have been done. @@ -609,8 +400,6 @@ _mesa_readpixels(struct gl_context *ctx, /* Do all needed clipping here, so that we can forget about it later */ if (_mesa_clip_readpixels(ctx, &x, &y, &width, &height, &clippedPacking)) { - pixels = _mesa_map_pbo_dest(ctx, &clippedPacking, pixels); - if (pixels) { switch (format) { case GL_STENCIL_INDEX: @@ -621,17 +410,11 @@ _mesa_readpixels(struct gl_context *ctx, read_depth_pixels(ctx, x, y, width, height, type, pixels, &clippedPacking); break; - case GL_DEPTH_STENCIL_EXT: - read_depth_stencil_pixels(ctx, x, y, width, height, type, pixels, - &clippedPacking); - break; default: /* all other formats should be color formats */ read_rgba_pixels(ctx, x, y, width, height, format, type, pixels, &clippedPacking); } - - _mesa_unmap_pbo_dest(ctx, &clippedPacking); } } } @@ -655,22 +438,6 @@ _mesa_error_check_format_type(struct gl_context *ctx, GLenum format, /* state validation should have already been done */ ASSERT(ctx->NewState == 0x0); - if (ctx->Extensions.EXT_packed_depth_stencil - && type == GL_UNSIGNED_INT_24_8_EXT - && format != GL_DEPTH_STENCIL_EXT) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "gl%sPixels(format is not GL_DEPTH_STENCIL_EXT)", readDraw); - return GL_TRUE; - } - - if (ctx->Extensions.ARB_depth_buffer_float - && type == GL_FLOAT_32_UNSIGNED_INT_24_8_REV - && format != GL_DEPTH_STENCIL_EXT) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "gl%sPixels(format is not GL_DEPTH_STENCIL_EXT)", readDraw); - return GL_TRUE; - } - /* basic combinations test */ err = _mesa_error_check_format_and_type(ctx, format, type); if (err != GL_NO_ERROR) { @@ -751,32 +518,6 @@ _mesa_error_check_format_type(struct gl_context *ctx, GLenum format, return GL_TRUE; } break; - case GL_DEPTH_STENCIL_EXT: - /* Check validity of the type first. */ - switch (type) { - case GL_UNSIGNED_INT_24_8_EXT: - if (!ctx->Extensions.EXT_packed_depth_stencil) { - _mesa_error(ctx, GL_INVALID_ENUM, "gl%sPixels(type)", readDraw); - return GL_TRUE; - } - break; - case GL_FLOAT_32_UNSIGNED_INT_24_8_REV: - if (!ctx->Extensions.ARB_depth_buffer_float) { - _mesa_error(ctx, GL_INVALID_ENUM, "gl%sPixels(type)", readDraw); - return GL_TRUE; - } - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "gl%sPixels(type)", readDraw); - return GL_TRUE; - } - if ((drawing && !_mesa_dest_buffer_exists(ctx, format)) || - (reading && !_mesa_source_buffer_exists(ctx, format))) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "gl%sPixels(no depth or stencil buffer)", readDraw); - return GL_TRUE; - } - break; default: /* this should have been caught in _mesa_error_check_format_type() */ _mesa_problem(ctx, "unexpected format in _mesa_%sPixels", readDraw); @@ -790,9 +531,8 @@ _mesa_error_check_format_type(struct gl_context *ctx, GLenum format, void GLAPIENTRY -_mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, GLsizei bufSize, - GLvoid *pixels ) +_mesa_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, GLvoid *pixels ) { GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); @@ -820,12 +560,6 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height, return; } - if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, - "glReadPixels(incomplete framebuffer)" ); - return; - } - /* Check that the destination format and source buffer are both * integer-valued or both non-integer-valued. */ @@ -840,11 +574,6 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height, } } - if (ctx->ReadBuffer->Name != 0 && ctx->ReadBuffer->Visual.samples > 0) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(multisample FBO)"); - return; - } - if (!_mesa_source_buffer_exists(ctx, format)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(no readbuffer)"); return; @@ -853,33 +582,6 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height, if (width == 0 || height == 0) return; /* nothing to do */ - if (!_mesa_validate_pbo_access(2, &ctx->Pack, width, height, 1, - format, type, bufSize, pixels)) { - if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glReadPixels(out of bounds PBO access)"); - } else { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glReadnPixelsARB(out of bounds access:" - " bufSize (%d) is too small)", bufSize); - } - return; - } - - if (_mesa_is_bufferobj(ctx->Pack.BufferObj) && - _mesa_bufferobj_mapped(ctx->Pack.BufferObj)) { - /* buffer is mapped - that's an error */ - _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(PBO is mapped)"); - return; - } - ctx->Driver.ReadPixels(ctx, x, y, width, height, format, type, &ctx->Pack, pixels); } - -void GLAPIENTRY -_mesa_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, GLvoid *pixels ) -{ - _mesa_ReadnPixelsARB(x, y, width, height, format, type, INT_MAX, pixels); -} diff --git a/dll/opengl/mesa/src/mesa/main/readpix.h b/dll/opengl/mesa/main/readpix.h similarity index 90% rename from dll/opengl/mesa/src/mesa/main/readpix.h rename to dll/opengl/mesa/main/readpix.h index 6caaf3adce1..6fca7b99c97 100644 --- a/dll/opengl/mesa/src/mesa/main/readpix.h +++ b/dll/opengl/mesa/main/readpix.h @@ -48,9 +48,4 @@ extern void GLAPIENTRY _mesa_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels ); -extern void GLAPIENTRY -_mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, GLsizei bufSize, - GLvoid *pixels ); - #endif diff --git a/dll/opengl/mesa/src/mesa/main/renderbuffer.c b/dll/opengl/mesa/main/renderbuffer.c similarity index 86% rename from dll/opengl/mesa/src/mesa/main/renderbuffer.c rename to dll/opengl/mesa/main/renderbuffer.c index d139386d648..8613db861cd 100644 --- a/dll/opengl/mesa/src/mesa/main/renderbuffer.c +++ b/dll/opengl/mesa/main/renderbuffer.c @@ -26,7 +26,6 @@ #include "glheader.h" #include "imports.h" #include "context.h" -#include "fbobject.h" #include "formats.h" #include "mtypes.h" #include "renderbuffer.h" @@ -41,7 +40,6 @@ _mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name) _glthread_INIT_MUTEX(rb->Mutex); rb->ClassID = 0; - rb->Name = name; rb->RefCount = 0; rb->Delete = _mesa_delete_renderbuffer; @@ -57,21 +55,6 @@ _mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name) } -/** - * Allocate a new gl_renderbuffer object. This can be used for user-created - * renderbuffers or window-system renderbuffers. - */ -struct gl_renderbuffer * -_mesa_new_renderbuffer(struct gl_context *ctx, GLuint name) -{ - struct gl_renderbuffer *rb = CALLOC_STRUCT(gl_renderbuffer); - if (rb) { - _mesa_init_renderbuffer(rb, name); - } - return rb; -} - - /** * Delete a gl_framebuffer. * This is the default function for renderbuffer->Delete(). @@ -103,16 +86,6 @@ _mesa_add_renderbuffer(struct gl_framebuffer *fb, bufferName == BUFFER_STENCIL || fb->Attachment[bufferName].Renderbuffer == NULL); - /* winsys vs. user-created buffer cross check */ - if (fb->Name) { - assert(rb->Name); - } - else { - assert(!rb->Name); - } - - fb->Attachment[bufferName].Type = GL_RENDERBUFFER_EXT; - fb->Attachment[bufferName].Complete = GL_TRUE; _mesa_reference_renderbuffer(&fb->Attachment[bufferName].Renderbuffer, rb); } diff --git a/dll/opengl/mesa/src/mesa/main/renderbuffer.h b/dll/opengl/mesa/main/renderbuffer.h similarity index 95% rename from dll/opengl/mesa/src/mesa/main/renderbuffer.h rename to dll/opengl/mesa/main/renderbuffer.h index 0934d85df04..ee3a159afe1 100644 --- a/dll/opengl/mesa/src/mesa/main/renderbuffer.h +++ b/dll/opengl/mesa/main/renderbuffer.h @@ -36,9 +36,6 @@ struct gl_renderbuffer; extern void _mesa_init_renderbuffer(struct gl_renderbuffer *rb, GLuint name); -extern struct gl_renderbuffer * -_mesa_new_renderbuffer(struct gl_context *ctx, GLuint name); - extern void _mesa_delete_renderbuffer(struct gl_renderbuffer *rb); diff --git a/dll/opengl/mesa/src/mesa/main/scissor.c b/dll/opengl/mesa/main/scissor.c similarity index 100% rename from dll/opengl/mesa/src/mesa/main/scissor.c rename to dll/opengl/mesa/main/scissor.c diff --git a/dll/opengl/mesa/src/mesa/main/scissor.h b/dll/opengl/mesa/main/scissor.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/scissor.h rename to dll/opengl/mesa/main/scissor.h diff --git a/dll/opengl/mesa/src/mesa/main/shared.c b/dll/opengl/mesa/main/shared.c similarity index 51% rename from dll/opengl/mesa/src/mesa/main/shared.c rename to dll/opengl/mesa/main/shared.c index c07ce823846..bcf2c3a8d14 100644 --- a/dll/opengl/mesa/src/mesa/main/shared.c +++ b/dll/opengl/mesa/main/shared.c @@ -31,18 +31,9 @@ #include "mfeatures.h" #include "mtypes.h" #include "hash.h" -#if FEATURE_ATI_fragment_shader -#include "atifragshader.h" -#endif #include "bufferobj.h" #include "shared.h" -#include "program/program.h" #include "dlist.h" -#if FEATURE_ARB_sampler_objects -#include "samplerobj.h" -#endif -#include "shaderobj.h" -#include "syncobj.h" /** @@ -68,34 +59,9 @@ _mesa_alloc_shared_state(struct gl_context *ctx) shared->DisplayList = _mesa_NewHashTable(); shared->TexObjects = _mesa_NewHashTable(); - shared->Programs = _mesa_NewHashTable(); - -#if FEATURE_ARB_vertex_program - shared->DefaultVertexProgram = (struct gl_vertex_program *) - ctx->Driver.NewProgram(ctx, GL_VERTEX_PROGRAM_ARB, 0); -#endif - -#if FEATURE_ARB_fragment_program - shared->DefaultFragmentProgram = (struct gl_fragment_program *) - ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, 0); -#endif - -#if FEATURE_ATI_fragment_shader - shared->ATIShaders = _mesa_NewHashTable(); - shared->DefaultFragmentShader = _mesa_new_ati_fragment_shader(ctx, 0); -#endif - -#if FEATURE_ARB_shader_objects - shared->ShaderObjects = _mesa_NewHashTable(); -#endif shared->BufferObjects = _mesa_NewHashTable(); -#if FEATURE_ARB_sampler_objects - /* GL_ARB_sampler_objects */ - shared->SamplerObjects = _mesa_NewHashTable(); -#endif - /* Allocate the default buffer object */ shared->NullBufferObj = ctx->Driver.NewBufferObject(ctx, 0, 0); @@ -103,13 +69,8 @@ _mesa_alloc_shared_state(struct gl_context *ctx) for (i = 0; i < NUM_TEXTURE_TARGETS; i++) { /* NOTE: the order of these enums matches the TEXTURE_x_INDEX values */ static const GLenum targets[NUM_TEXTURE_TARGETS] = { - GL_TEXTURE_BUFFER, - GL_TEXTURE_2D_ARRAY_EXT, - GL_TEXTURE_1D_ARRAY_EXT, - GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_CUBE_MAP, GL_TEXTURE_3D, - GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_2D, GL_TEXTURE_1D }; @@ -124,13 +85,6 @@ _mesa_alloc_shared_state(struct gl_context *ctx) _glthread_INIT_MUTEX(shared->TexMutex); shared->TextureStateStamp = 0; -#if FEATURE_EXT_framebuffer_object - shared->FrameBuffers = _mesa_NewHashTable(); - shared->RenderBuffers = _mesa_NewHashTable(); -#endif - - make_empty_list(& shared->SyncObjects); - return shared; } @@ -159,37 +113,6 @@ delete_texture_cb(GLuint id, void *data, void *userData) } -/** - * Callback for deleting a program object. Called by _mesa_HashDeleteAll(). - */ -static void -delete_program_cb(GLuint id, void *data, void *userData) -{ - struct gl_program *prog = (struct gl_program *) data; - struct gl_context *ctx = (struct gl_context *) userData; - if(prog != &_mesa_DummyProgram) { - ASSERT(prog->RefCount == 1); /* should only be referenced by hash table */ - prog->RefCount = 0; /* now going away */ - ctx->Driver.DeleteProgram(ctx, prog); - } -} - - -#if FEATURE_ATI_fragment_shader -/** - * Callback for deleting an ATI fragment shader object. - * Called by _mesa_HashDeleteAll(). - */ -static void -delete_fragshader_cb(GLuint id, void *data, void *userData) -{ - struct ati_fragment_shader *shader = (struct ati_fragment_shader *) data; - struct gl_context *ctx = (struct gl_context *) userData; - _mesa_delete_ati_fragment_shader(ctx, shader); -} -#endif - - /** * Callback for deleting a buffer object. Called by _mesa_HashDeleteAll(). */ @@ -206,90 +129,6 @@ delete_bufferobj_cb(GLuint id, void *data, void *userData) } -/** - * Callback for freeing shader program data. Call it before delete_shader_cb - * to avoid memory access error. - */ -static void -free_shader_program_data_cb(GLuint id, void *data, void *userData) -{ - struct gl_context *ctx = (struct gl_context *) userData; - struct gl_shader_program *shProg = (struct gl_shader_program *) data; - - if (shProg->Type == GL_SHADER_PROGRAM_MESA) { - _mesa_free_shader_program_data(ctx, shProg); - } -} - - -/** - * Callback for deleting shader and shader programs objects. - * Called by _mesa_HashDeleteAll(). - */ -static void -delete_shader_cb(GLuint id, void *data, void *userData) -{ - struct gl_context *ctx = (struct gl_context *) userData; - struct gl_shader *sh = (struct gl_shader *) data; - if (sh->Type == GL_FRAGMENT_SHADER || sh->Type == GL_VERTEX_SHADER) { - ctx->Driver.DeleteShader(ctx, sh); - } - else { - struct gl_shader_program *shProg = (struct gl_shader_program *) data; - ASSERT(shProg->Type == GL_SHADER_PROGRAM_MESA); - ctx->Driver.DeleteShaderProgram(ctx, shProg); - } -} - - -/** - * Callback for deleting a framebuffer object. Called by _mesa_HashDeleteAll() - */ -static void -delete_framebuffer_cb(GLuint id, void *data, void *userData) -{ - struct gl_framebuffer *fb = (struct gl_framebuffer *) data; - /* The fact that the framebuffer is in the hashtable means its refcount - * is one, but we're removing from the hashtable now. So clear refcount. - */ - /*assert(fb->RefCount == 1);*/ - fb->RefCount = 0; - - /* NOTE: Delete should always be defined but there are two reports - * of it being NULL (bugs 13507, 14293). Work-around for now. - */ - if (fb->Delete) - fb->Delete(fb); -} - - -/** - * Callback for deleting a renderbuffer object. Called by _mesa_HashDeleteAll() - */ -static void -delete_renderbuffer_cb(GLuint id, void *data, void *userData) -{ - struct gl_renderbuffer *rb = (struct gl_renderbuffer *) data; - rb->RefCount = 0; /* see comment for FBOs above */ - if (rb->Delete) - rb->Delete(rb); -} - - -#if FEATURE_ARB_sampler_objects -/** - * Callback for deleting a sampler object. Called by _mesa_HashDeleteAll() - */ -static void -delete_sampler_object_cb(GLuint id, void *data, void *userData) -{ - struct gl_context *ctx = (struct gl_context *) userData; - struct gl_sampler_object *sampObj = (struct gl_sampler_object *) data; - _mesa_reference_sampler_object(ctx, &sampObj, NULL); -} -#endif - - /** * Deallocate a shared state object and all children structures. * @@ -317,55 +156,11 @@ free_shared_state(struct gl_context *ctx, struct gl_shared_state *shared) _mesa_HashDeleteAll(shared->DisplayList, delete_displaylist_cb, ctx); _mesa_DeleteHashTable(shared->DisplayList); -#if FEATURE_ARB_shader_objects - _mesa_HashWalk(shared->ShaderObjects, free_shader_program_data_cb, ctx); - _mesa_HashDeleteAll(shared->ShaderObjects, delete_shader_cb, ctx); - _mesa_DeleteHashTable(shared->ShaderObjects); -#endif - - _mesa_HashDeleteAll(shared->Programs, delete_program_cb, ctx); - _mesa_DeleteHashTable(shared->Programs); - -#if FEATURE_ARB_vertex_program - _mesa_reference_vertprog(ctx, &shared->DefaultVertexProgram, NULL); -#endif - -#if FEATURE_ARB_fragment_program - _mesa_reference_fragprog(ctx, &shared->DefaultFragmentProgram, NULL); -#endif - -#if FEATURE_ATI_fragment_shader - _mesa_HashDeleteAll(shared->ATIShaders, delete_fragshader_cb, ctx); - _mesa_DeleteHashTable(shared->ATIShaders); - _mesa_delete_ati_fragment_shader(ctx, shared->DefaultFragmentShader); -#endif - _mesa_HashDeleteAll(shared->BufferObjects, delete_bufferobj_cb, ctx); _mesa_DeleteHashTable(shared->BufferObjects); -#if FEATURE_EXT_framebuffer_object - _mesa_HashDeleteAll(shared->FrameBuffers, delete_framebuffer_cb, ctx); - _mesa_DeleteHashTable(shared->FrameBuffers); - _mesa_HashDeleteAll(shared->RenderBuffers, delete_renderbuffer_cb, ctx); - _mesa_DeleteHashTable(shared->RenderBuffers); -#endif - _mesa_reference_buffer_object(ctx, &shared->NullBufferObj, NULL); - { - struct simple_node *node; - struct simple_node *temp; - - foreach_s(node, temp, & shared->SyncObjects) { - _mesa_unref_sync_object(ctx, (struct gl_sync_object *) node); - } - } - -#if FEATURE_ARB_sampler_objects - _mesa_HashDeleteAll(shared->SamplerObjects, delete_sampler_object_cb, ctx); - _mesa_DeleteHashTable(shared->SamplerObjects); -#endif - /* * Free texture objects (after FBOs since some textures might have * been bound to FBOs). diff --git a/dll/opengl/mesa/src/mesa/main/shared.h b/dll/opengl/mesa/main/shared.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/shared.h rename to dll/opengl/mesa/main/shared.h diff --git a/dll/opengl/mesa/src/mesa/main/simple_list.h b/dll/opengl/mesa/main/simple_list.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/simple_list.h rename to dll/opengl/mesa/main/simple_list.h diff --git a/dll/opengl/mesa/main/state.c b/dll/opengl/mesa/main/state.c new file mode 100644 index 00000000000..5810e434290 --- /dev/null +++ b/dll/opengl/mesa/main/state.c @@ -0,0 +1,335 @@ +/* + * Mesa 3-D graphics library + * Version: 7.3 + * + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +/** + * \file state.c + * State management. + * + * This file manages recalculation of derived values in struct gl_context. + */ + + +#include "glheader.h" +#include "mtypes.h" +#include "context.h" +#include "macros.h" +#include "framebuffer.h" +#include "light.h" +#include "matrix.h" +#include "pixel.h" +#include "state.h" +#include "stencil.h" +#include "texobj.h" +#include "texstate.h" +#include "varray.h" + + +static void +update_separate_specular(struct gl_context *ctx) +{ + if (_mesa_need_secondary_color(ctx)) + ctx->_TriangleCaps |= DD_SEPARATE_SPECULAR; + else + ctx->_TriangleCaps &= ~DD_SEPARATE_SPECULAR; +} + + +/** + * Helper for update_arrays(). + * \return min(current min, array->_MaxElement). + */ +static GLuint +update_min(GLuint min, struct gl_client_array *array) +{ + _mesa_update_array_max_element(array); + return MIN2(min, array->_MaxElement); +} + + +/** + * Update ctx->Array._MaxElement (the max legal index into all enabled arrays). + * Need to do this upon new array state or new buffer object state. + */ +static void +update_arrays( struct gl_context *ctx ) +{ + struct gl_array_object *arrayObj = ctx->Array.ArrayObj; + GLuint min = ~0; + + /* find min of _MaxElement values for all enabled arrays. + * Note that the generic arrays always take precedence over + * the legacy arrays. + */ + + /* 0 */ + if (arrayObj->VertexAttrib[VERT_ATTRIB_POS].Enabled) { + min = update_min(min, &arrayObj->VertexAttrib[VERT_ATTRIB_POS]); + } + + /* 2 */ + if (arrayObj->VertexAttrib[VERT_ATTRIB_NORMAL].Enabled) { + min = update_min(min, &arrayObj->VertexAttrib[VERT_ATTRIB_NORMAL]); + } + + /* 3 */ + if (arrayObj->VertexAttrib[VERT_ATTRIB_COLOR0].Enabled) { + min = update_min(min, &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR0]); + } + + /* 4 */ + if (arrayObj->VertexAttrib[VERT_ATTRIB_COLOR1].Enabled) { + min = update_min(min, &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR1]); + } + + /* 5 */ + if (arrayObj->VertexAttrib[VERT_ATTRIB_FOG].Enabled) { + min = update_min(min, &arrayObj->VertexAttrib[VERT_ATTRIB_FOG]); + } + + /* 6 */ + if (arrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled) { + min = update_min(min, &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR_INDEX]); + } + + /* 8 */ + if (arrayObj->VertexAttrib[VERT_ATTRIB_TEX].Enabled) { + min = update_min(min, &arrayObj->VertexAttrib[VERT_ATTRIB_TEX]); + } + + if (arrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled) { + min = update_min(min, &arrayObj->VertexAttrib[VERT_ATTRIB_EDGEFLAG]); + } + + /* _MaxElement is one past the last legal array element */ + arrayObj->_MaxElement = min; +} + +static void +update_viewport_matrix(struct gl_context *ctx) +{ + const GLfloat depthMax = ctx->DrawBuffer->_DepthMaxF; + + ASSERT(depthMax > 0); + + /* Compute scale and bias values. This is really driver-specific + * and should be maintained elsewhere if at all. + * NOTE: RasterPos uses this. + */ + _math_matrix_viewport(&ctx->Viewport._WindowMap, + ctx->Viewport.X, ctx->Viewport.Y, + ctx->Viewport.Width, ctx->Viewport.Height, + ctx->Viewport.Near, ctx->Viewport.Far, + depthMax); +} + + +/* + * Check polygon state and set DD_TRI_CULL_FRONT_BACK and/or DD_TRI_OFFSET + * in ctx->_TriangleCaps if needed. + */ +static void +update_polygon(struct gl_context *ctx) +{ + ctx->_TriangleCaps &= ~(DD_TRI_CULL_FRONT_BACK | DD_TRI_OFFSET); + + if (ctx->Polygon.CullFlag && ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK) + ctx->_TriangleCaps |= DD_TRI_CULL_FRONT_BACK; + + if ( ctx->Polygon.OffsetPoint + || ctx->Polygon.OffsetLine + || ctx->Polygon.OffsetFill) + ctx->_TriangleCaps |= DD_TRI_OFFSET; +} + + +/** + * Update the ctx->_TriangleCaps bitfield. + * XXX that bitfield should really go away someday! + * This function must be called after other update_*() functions since + * there are dependencies on some other derived values. + */ +#if 0 +static void +update_tricaps(struct gl_context *ctx, GLbitfield new_state) +{ + ctx->_TriangleCaps = 0; + + /* + * Points + */ + if (1/*new_state & _NEW_POINT*/) { + if (ctx->Point.SmoothFlag) + ctx->_TriangleCaps |= DD_POINT_SMOOTH; + if (ctx->Point._Attenuated) + ctx->_TriangleCaps |= DD_POINT_ATTEN; + } + + /* + * Lines + */ + if (1/*new_state & _NEW_LINE*/) { + if (ctx->Line.SmoothFlag) + ctx->_TriangleCaps |= DD_LINE_SMOOTH; + if (ctx->Line.StippleFlag) + ctx->_TriangleCaps |= DD_LINE_STIPPLE; + } + + /* + * Polygons + */ + if (1/*new_state & _NEW_POLYGON*/) { + if (ctx->Polygon.SmoothFlag) + ctx->_TriangleCaps |= DD_TRI_SMOOTH; + if (ctx->Polygon.StippleFlag) + ctx->_TriangleCaps |= DD_TRI_STIPPLE; + if (ctx->Polygon.FrontMode != GL_FILL + || ctx->Polygon.BackMode != GL_FILL) + ctx->_TriangleCaps |= DD_TRI_UNFILLED; + if (ctx->Polygon.CullFlag + && ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK) + ctx->_TriangleCaps |= DD_TRI_CULL_FRONT_BACK; + if (ctx->Polygon.OffsetPoint || + ctx->Polygon.OffsetLine || + ctx->Polygon.OffsetFill) + ctx->_TriangleCaps |= DD_TRI_OFFSET; + } + + /* + * Lighting and shading + */ + if (ctx->Light.Enabled && ctx->Light.Model.TwoSide) + ctx->_TriangleCaps |= DD_TRI_LIGHT_TWOSIDE; + if (ctx->Light.ShadeModel == GL_FLAT) + ctx->_TriangleCaps |= DD_FLATSHADE; + if (_mesa_need_secondary_color(ctx)) + ctx->_TriangleCaps |= DD_SEPARATE_SPECULAR; +} +#endif + + +/** + * Compute derived GL state. + * If __struct gl_contextRec::NewState is non-zero then this function \b must + * be called before rendering anything. + * + * Calls dd_function_table::UpdateState to perform any internal state + * management necessary. + * + * \sa _mesa_update_modelview_project(), _mesa_update_texture(), + * _mesa_update_buffer_bounds(), + * _mesa_update_lighting() and _mesa_update_tnl_spaces(). + */ +void +_mesa_update_state_locked( struct gl_context *ctx ) +{ + GLbitfield new_state = ctx->NewState; + + if (new_state == _NEW_CURRENT_ATTRIB) + goto out; + + /* + * Now update derived state info + */ + + if (new_state & (_NEW_MODELVIEW|_NEW_PROJECTION)) + _mesa_update_modelview_project( ctx, new_state ); + + if (new_state & (_NEW_TEXTURE|_NEW_TEXTURE_MATRIX)) + _mesa_update_texture( ctx, new_state ); + + if (new_state & _NEW_BUFFERS) + _mesa_update_framebuffer(ctx); + + if (new_state & (_NEW_SCISSOR | _NEW_BUFFERS | _NEW_VIEWPORT)) + _mesa_update_draw_buffer_bounds( ctx ); + + if (new_state & _NEW_POLYGON) + update_polygon( ctx ); + + if (new_state & _NEW_LIGHT) + _mesa_update_lighting( ctx ); + + if (new_state & (_NEW_STENCIL | _NEW_BUFFERS)) + _mesa_update_stencil( ctx ); + + if (new_state & _NEW_PIXEL) + _mesa_update_pixel( ctx, new_state ); + + if (new_state & _DD_NEW_SEPARATE_SPECULAR) + update_separate_specular( ctx ); + + if (new_state & (_NEW_BUFFERS | _NEW_VIEWPORT)) + update_viewport_matrix(ctx); + +#if 0 + if (new_state & (_NEW_POINT | _NEW_LINE | _NEW_POLYGON | _NEW_LIGHT + | _NEW_STENCIL | _DD_NEW_SEPARATE_SPECULAR)) + update_tricaps( ctx, new_state ); +#endif + + /* ctx->_NeedEyeCoords is now up to date. + * + * If the truth value of this variable has changed, update for the + * new lighting space and recompute the positions of lights and the + * normal transform. + * + * If the lighting space hasn't changed, may still need to recompute + * light positions & normal transforms for other reasons. + */ + if (new_state & _MESA_NEW_NEED_EYE_COORDS) + _mesa_update_tnl_spaces( ctx, new_state ); + + if (new_state & (_NEW_ARRAY | _NEW_BUFFER_OBJECT)) + update_arrays( ctx ); + + out: + + /* + * Give the driver a chance to act upon the new_state flags. + * The driver might plug in different span functions, for example. + * Also, this is where the driver can invalidate the state of any + * active modules (such as swrast_setup, swrast, tnl, etc). + * + * Set ctx->NewState to zero to avoid recursion if + * Driver.UpdateState() has to call FLUSH_VERTICES(). (fixed?) + */ + new_state = ctx->NewState; + ctx->NewState = 0; + ctx->Driver.UpdateState(ctx, new_state); + ctx->Array.NewState = 0; + if (!ctx->Array.RebindArrays) + ctx->Array.RebindArrays = (new_state & _NEW_ARRAY) != 0; +} + + +/* This is the usual entrypoint for state updates: + */ +void +_mesa_update_state( struct gl_context *ctx ) +{ + _mesa_lock_context_textures(ctx); + _mesa_update_state_locked(ctx); + _mesa_unlock_context_textures(ctx); +} diff --git a/dll/opengl/mesa/src/mesa/main/state.h b/dll/opengl/mesa/main/state.h similarity index 75% rename from dll/opengl/mesa/src/mesa/main/state.h rename to dll/opengl/mesa/main/state.h index 29a25409268..5268effb31a 100644 --- a/dll/opengl/mesa/src/mesa/main/state.h +++ b/dll/opengl/mesa/main/state.h @@ -38,14 +38,6 @@ extern void _mesa_update_state_locked(struct gl_context *ctx); -extern void -_mesa_set_varying_vp_inputs(struct gl_context *ctx, GLbitfield64 varying_inputs); - - -extern void -_mesa_set_vp_override(struct gl_context *ctx, GLboolean flag); - - /** * Is the secondary color needed? */ @@ -59,16 +51,6 @@ _mesa_need_secondary_color(const struct gl_context *ctx) if (ctx->Fog.ColorSumEnabled) return GL_TRUE; - if (ctx->VertexProgram._Current && - (ctx->VertexProgram._Current != ctx->VertexProgram._TnlProgram) && - (ctx->VertexProgram._Current->Base.InputsRead & VERT_BIT_COLOR1)) - return GL_TRUE; - - if (ctx->FragmentProgram._Current && - (ctx->FragmentProgram._Current != ctx->FragmentProgram._TexEnvProgram) && - (ctx->FragmentProgram._Current->Base.InputsRead & FRAG_BIT_COL1)) - return GL_TRUE; - return GL_FALSE; } diff --git a/dll/opengl/mesa/main/stencil.c b/dll/opengl/mesa/main/stencil.c new file mode 100644 index 00000000000..5b3d328ab62 --- /dev/null +++ b/dll/opengl/mesa/main/stencil.c @@ -0,0 +1,256 @@ +/* + * Mesa 3-D graphics library + * Version: 7.1 + * + * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +/** + * \file stencil.c + * Stencil operations. + * + */ + + +#include "glheader.h" +#include "imports.h" +#include "context.h" +#include "macros.h" +#include "stencil.h" +#include "mtypes.h" + + +static GLboolean +validate_stencil_op(struct gl_context *ctx, GLenum op) +{ + switch (op) { + case GL_KEEP: + case GL_ZERO: + case GL_REPLACE: + case GL_INCR: + case GL_DECR: + case GL_INVERT: + case GL_INCR_WRAP: + case GL_DECR_WRAP: + return GL_TRUE; + default: + return GL_FALSE; + } +} + + +static GLboolean +validate_stencil_func(struct gl_context *ctx, GLenum func) +{ + switch (func) { + case GL_NEVER: + case GL_LESS: + case GL_LEQUAL: + case GL_GREATER: + case GL_GEQUAL: + case GL_EQUAL: + case GL_NOTEQUAL: + case GL_ALWAYS: + return GL_TRUE; + default: + return GL_FALSE; + } +} + + +/** + * Set the clear value for the stencil buffer. + * + * \param s clear value. + * + * \sa glClearStencil(). + * + * Updates gl_stencil_attrib::Clear. On change + * flushes the vertices and notifies the driver via + * the dd_function_table::ClearStencil callback. + */ +void GLAPIENTRY +_mesa_ClearStencil( GLint s ) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (ctx->Stencil.Clear == (GLuint) s) + return; + + FLUSH_VERTICES(ctx, _NEW_STENCIL); + ctx->Stencil.Clear = (GLuint) s; + + if (ctx->Driver.ClearStencil) { + ctx->Driver.ClearStencil( ctx, s ); + } +} + +/** + * Set the function and reference value for stencil testing. + * + * \param func test function. + * \param ref reference value. + * \param mask bitmask. + * + * \sa glStencilFunc(). + * + * Verifies the parameters and updates the respective values in + * __struct gl_contextRec::Stencil. On change flushes the vertices and notifies the + * driver via the dd_function_table::StencilFunc callback. + */ +void GLAPIENTRY +_mesa_StencilFunc( GLenum func, GLint ref, GLuint mask ) +{ + GET_CURRENT_CONTEXT(ctx); + const GLint stencilMax = (1 << ctx->DrawBuffer->Visual.stencilBits) - 1; + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glStencilFunc()\n"); + + if (!validate_stencil_func(ctx, func)) { + _mesa_error(ctx, GL_INVALID_ENUM, "glStencilFunc(func)"); + return; + } + + ref = CLAMP( ref, 0, stencilMax ); + + /* set both front and back state */ + if (ctx->Stencil.Function == func && + ctx->Stencil.ValueMask == mask && + ctx->Stencil.Ref == ref) + return; + FLUSH_VERTICES(ctx, _NEW_STENCIL); + ctx->Stencil.Function = func; + ctx->Stencil.Ref = ref; + ctx->Stencil.ValueMask = mask; +} + + +/** + * Set the stencil writing mask. + * + * \param mask bit-mask to enable/disable writing of individual bits in the + * stencil planes. + * + * \sa glStencilMask(). + * + * Updates gl_stencil_attrib::WriteMask. On change flushes the vertices and + * notifies the driver via the dd_function_table::StencilMask callback. + */ +void GLAPIENTRY +_mesa_StencilMask( GLuint mask ) +{ + GET_CURRENT_CONTEXT(ctx); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glStencilMask()\n"); + + ASSERT_OUTSIDE_BEGIN_END(ctx); + + /* set both front and back state */ + if (ctx->Stencil.WriteMask == mask) + return; + FLUSH_VERTICES(ctx, _NEW_STENCIL); + ctx->Stencil.WriteMask = mask; +} + + +/** + * Set the stencil test actions. + * + * \param fail action to take when stencil test fails. + * \param zfail action to take when stencil test passes, but depth test fails. + * \param zpass action to take when stencil test passes and the depth test + * passes (or depth testing is not enabled). + * + * \sa glStencilOp(). + * + * Verifies the parameters and updates the respective fields in + * __struct gl_contextRec::Stencil. On change flushes the vertices and notifies the + * driver via the dd_function_table::StencilOp callback. + */ +void GLAPIENTRY +_mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass) +{ + GET_CURRENT_CONTEXT(ctx); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glStencilOp()\n"); + + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (!validate_stencil_op(ctx, fail)) { + _mesa_error(ctx, GL_INVALID_ENUM, "glStencilOp(sfail)"); + return; + } + if (!validate_stencil_op(ctx, zfail)) { + _mesa_error(ctx, GL_INVALID_ENUM, "glStencilOp(zfail)"); + return; + } + if (!validate_stencil_op(ctx, zpass)) { + _mesa_error(ctx, GL_INVALID_ENUM, "glStencilOp(zpass)"); + return; + } + + /* set both front and back state */ + if (ctx->Stencil.ZFailFunc == zfail && + ctx->Stencil.ZPassFunc == zpass && + ctx->Stencil.FailFunc == fail) + return; + FLUSH_VERTICES(ctx, _NEW_STENCIL); + ctx->Stencil.ZFailFunc = zfail; + ctx->Stencil.ZPassFunc = zpass; + ctx->Stencil.FailFunc = fail; +} + +/** + * Update derived stencil state. + */ +void +_mesa_update_stencil(struct gl_context *ctx) +{ + ctx->Stencil._Enabled = (ctx->Stencil.Enabled && + ctx->DrawBuffer->Visual.stencilBits > 0); +} + + +/** + * Initialize the context stipple state. + * + * \param ctx GL context. + * + * Initializes __struct gl_contextRec::Stencil attribute group. + */ +void +_mesa_init_stencil(struct gl_context *ctx) +{ + ctx->Stencil.Enabled = GL_FALSE; + ctx->Stencil.Function = GL_ALWAYS; + ctx->Stencil.FailFunc = GL_KEEP; + ctx->Stencil.ZPassFunc = GL_KEEP; + ctx->Stencil.ZFailFunc = GL_KEEP; + ctx->Stencil.Ref = 0; + ctx->Stencil.ValueMask = ~0U; + ctx->Stencil.WriteMask = ~0U; + ctx->Stencil.Clear = 0; +} diff --git a/dll/opengl/mesa/src/mesa/main/stencil.h b/dll/opengl/mesa/main/stencil.h similarity index 85% rename from dll/opengl/mesa/src/mesa/main/stencil.h rename to dll/opengl/mesa/main/stencil.h index b772bfd6e6f..74f97c7eda1 100644 --- a/dll/opengl/mesa/src/mesa/main/stencil.h +++ b/dll/opengl/mesa/main/stencil.h @@ -55,18 +55,6 @@ _mesa_StencilOp( GLenum fail, GLenum zfail, GLenum zpass ); extern void GLAPIENTRY _mesa_ActiveStencilFaceEXT(GLenum face); - -extern void GLAPIENTRY -_mesa_StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); - - -extern void GLAPIENTRY -_mesa_StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask); - - -extern void GLAPIENTRY -_mesa_StencilFuncSeparateATI(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); - extern void GLAPIENTRY _mesa_StencilMaskSeparate(GLenum face, GLuint mask); diff --git a/dll/opengl/mesa/src/mesa/main/texenv.c b/dll/opengl/mesa/main/texenv.c similarity index 61% rename from dll/opengl/mesa/src/mesa/main/texenv.c rename to dll/opengl/mesa/main/texenv.c index e5f1bd39ee7..9b8c9bdd780 100644 --- a/dll/opengl/mesa/src/mesa/main/texenv.c +++ b/dll/opengl/mesa/main/texenv.c @@ -90,14 +90,10 @@ set_env_color(struct gl_context *ctx, struct gl_texture_unit *texUnit, const GLfloat *color) { - if (TEST_EQ_4V(color, texUnit->EnvColorUnclamped)) + if (TEST_EQ_4V(color, texUnit->EnvColor)) return; FLUSH_VERTICES(ctx, _NEW_TEXTURE); - COPY_4FV(texUnit->EnvColorUnclamped, color); - texUnit->EnvColor[0] = CLAMP(color[0], 0.0F, 1.0F); - texUnit->EnvColor[1] = CLAMP(color[1], 0.0F, 1.0F); - texUnit->EnvColor[2] = CLAMP(color[2], 0.0F, 1.0F); - texUnit->EnvColor[3] = CLAMP(color[3], 0.0F, 1.0F); + COPY_4FV(texUnit->EnvColor, color); } @@ -135,10 +131,6 @@ set_combiner_mode(struct gl_context *ctx, case GL_MODULATE_SUBTRACT_ATI: legal = ctx->Extensions.ATI_texture_env_combine3; break; - case GL_BUMP_ENVMAP_ATI: - legal = (ctx->Extensions.ATI_envmap_bumpmap && - pname == GL_COMBINE_RGB); - break; default: legal = GL_FALSE; } @@ -220,17 +212,6 @@ set_combiner_source(struct gl_context *ctx, case GL_PREVIOUS: legal = GL_TRUE; break; - case GL_TEXTURE0: - case GL_TEXTURE1: - case GL_TEXTURE2: - case GL_TEXTURE3: - case GL_TEXTURE4: - case GL_TEXTURE5: - case GL_TEXTURE6: - case GL_TEXTURE7: - legal = (ctx->Extensions.ARB_texture_env_crossbar && - param - GL_TEXTURE0 < ctx->Const.MaxTextureUnits); - break; case GL_ZERO: legal = (ctx->Extensions.ATI_texture_env_combine3 || ctx->Extensions.NV_texture_env_combine4); @@ -384,19 +365,10 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) { const GLint iparam0 = (GLint) param[0]; struct gl_texture_unit *texUnit; - GLuint maxUnit; - GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - maxUnit = (target == GL_POINT_SPRITE_NV && pname == GL_COORD_REPLACE_NV) - ? ctx->Const.MaxTextureCoordUnits : ctx->Const.MaxCombinedTextureImageUnits; - if (ctx->Texture.CurrentUnit >= maxUnit) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glTexEnvfv(current unit)"); - return; - } - - texUnit = _mesa_get_current_tex_unit(ctx); + texUnit = &ctx->Texture.Unit; if (target == GL_TEXTURE_ENV) { switch (pname) { @@ -434,26 +406,6 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) case GL_ALPHA_SCALE: set_combiner_scale(ctx, texUnit, pname, param[0]); break; - case GL_BUMP_TARGET_ATI: - if (!ctx->Extensions.ATI_envmap_bumpmap) { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(pname=0x%x)", pname ); - return; - } - if ((iparam0 < GL_TEXTURE0) || - (iparam0 > GL_TEXTURE31)) { - /* spec doesn't say this but it seems logical */ - _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(param=0x%x)", iparam0); - return; - } - if (!((1 << (iparam0 - GL_TEXTURE0)) & ctx->Const.SupportedBumpUnits)) { - _mesa_error( ctx, GL_INVALID_VALUE, "glTexEnv(param=0x%x)", iparam0); - return; - } - else { - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texUnit->BumpTarget = iparam0; - } - break; default: _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(pname)" ); return; @@ -471,34 +423,6 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) return; } } - else if (target == GL_POINT_SPRITE_NV) { - /* GL_ARB_point_sprite / GL_NV_point_sprite */ - if (!ctx->Extensions.NV_point_sprite - && !ctx->Extensions.ARB_point_sprite) { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(target=0x%x)", target ); - return; - } - if (pname == GL_COORD_REPLACE_NV) { - if (iparam0 == GL_TRUE || iparam0 == GL_FALSE) { - /* It's kind of weird to set point state via glTexEnv, - * but that's what the spec calls for. - */ - const GLboolean state = (GLboolean) iparam0; - if (ctx->Point.CoordReplace[ctx->Texture.CurrentUnit] == state) - return; - FLUSH_VERTICES(ctx, _NEW_POINT); - ctx->Point.CoordReplace[ctx->Texture.CurrentUnit] = state; - } - else { - _mesa_error( ctx, GL_INVALID_VALUE, "glTexEnv(param=0x%x)", iparam0); - return; - } - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(pname=0x%x)", pname ); - return; - } - } else { _mesa_error( ctx, GL_INVALID_ENUM, "glTexEnv(target=0x%x)",target ); return; @@ -634,15 +558,6 @@ get_texenvi(struct gl_context *ctx, const struct gl_texture_unit *texUnit, return 1 << texUnit->Combine.ScaleShiftRGB; case GL_ALPHA_SCALE: return 1 << texUnit->Combine.ScaleShiftA; - case GL_BUMP_TARGET_ATI: - /* spec doesn't say so, but I think this should be queryable */ - if (ctx->Extensions.ATI_envmap_bumpmap) { - return texUnit->BumpTarget; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); - } - break; default: _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)"); @@ -657,28 +572,15 @@ get_texenvi(struct gl_context *ctx, const struct gl_texture_unit *texUnit, void GLAPIENTRY _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ) { - GLuint maxUnit; - const struct gl_texture_unit *texUnit; GET_CURRENT_CONTEXT(ctx); + const struct gl_texture_unit *texUnit = &ctx->Texture.Unit; ASSERT_OUTSIDE_BEGIN_END(ctx); - maxUnit = (target == GL_POINT_SPRITE_NV && pname == GL_COORD_REPLACE_NV) - ? ctx->Const.MaxTextureCoordUnits : ctx->Const.MaxCombinedTextureImageUnits; - if (ctx->Texture.CurrentUnit >= maxUnit) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexEnvfv(current unit)"); - return; - } - - texUnit = _mesa_get_current_tex_unit(ctx); - if (target == GL_TEXTURE_ENV) { if (pname == GL_TEXTURE_ENV_COLOR) { - if(ctx->NewState & (_NEW_BUFFERS | _NEW_FRAG_CLAMP)) + if(ctx->NewState & _NEW_BUFFERS) _mesa_update_state(ctx); - if(ctx->Color._ClampFragmentColor) - COPY_4FV( params, texUnit->EnvColor ); - else - COPY_4FV( params, texUnit->EnvColorUnclamped ); + COPY_4FV( params, texUnit->EnvColor ); } else { GLint val = get_texenvi(ctx, texUnit, pname); @@ -696,21 +598,6 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ) return; } } - else if (target == GL_POINT_SPRITE_NV) { - /* GL_ARB_point_sprite / GL_NV_point_sprite */ - if (!ctx->Extensions.NV_point_sprite - && !ctx->Extensions.ARB_point_sprite) { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnvfv(target)" ); - return; - } - if (pname == GL_COORD_REPLACE_NV) { - *params = (GLfloat) ctx->Point.CoordReplace[ctx->Texture.CurrentUnit]; - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnvfv(pname)" ); - return; - } - } else { _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnvfv(target)" ); return; @@ -721,20 +608,10 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ) void GLAPIENTRY _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) { - GLuint maxUnit; - const struct gl_texture_unit *texUnit; GET_CURRENT_CONTEXT(ctx); + const struct gl_texture_unit *texUnit = &ctx->Texture.Unit;; ASSERT_OUTSIDE_BEGIN_END(ctx); - maxUnit = (target == GL_POINT_SPRITE_NV && pname == GL_COORD_REPLACE_NV) - ? ctx->Const.MaxTextureCoordUnits : ctx->Const.MaxCombinedTextureImageUnits; - if (ctx->Texture.CurrentUnit >= maxUnit) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexEnviv(current unit)"); - return; - } - - texUnit = _mesa_get_current_tex_unit(ctx); - if (target == GL_TEXTURE_ENV) { if (pname == GL_TEXTURE_ENV_COLOR) { params[0] = FLOAT_TO_INT( texUnit->EnvColor[0] ); @@ -758,21 +635,6 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) return; } } - else if (target == GL_POINT_SPRITE_NV) { - /* GL_ARB_point_sprite / GL_NV_point_sprite */ - if (!ctx->Extensions.NV_point_sprite - && !ctx->Extensions.ARB_point_sprite) { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnviv(target)" ); - return; - } - if (pname == GL_COORD_REPLACE_NV) { - *params = (GLint) ctx->Point.CoordReplace[ctx->Texture.CurrentUnit]; - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnviv(pname)" ); - return; - } - } else { _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexEnviv(target)" ); return; @@ -780,169 +642,3 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ) } -/** - * Why does ATI_envmap_bumpmap require new entrypoints? Should just - * reuse TexEnv ones... - */ -void GLAPIENTRY -_mesa_TexBumpParameterivATI( GLenum pname, const GLint *param ) -{ - GLfloat p[4]; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (!ctx->Extensions.ATI_envmap_bumpmap) { - /* This isn't an "official" error case, but let's tell the user - * that something's wrong. - */ - _mesa_error(ctx, GL_INVALID_OPERATION, "glTexBumpParameterivATI"); - return; - } - - if (pname == GL_BUMP_ROT_MATRIX_ATI) { - /* hope that conversion is correct here */ - p[0] = INT_TO_FLOAT( param[0] ); - p[1] = INT_TO_FLOAT( param[1] ); - p[2] = INT_TO_FLOAT( param[2] ); - p[3] = INT_TO_FLOAT( param[3] ); - } - else { - p[0] = (GLfloat) param[0]; - p[1] = p[2] = p[3] = 0.0F; /* init to zero, just to be safe */ - } - _mesa_TexBumpParameterfvATI( pname, p ); -} - - -void GLAPIENTRY -_mesa_TexBumpParameterfvATI( GLenum pname, const GLfloat *param ) -{ - struct gl_texture_unit *texUnit; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (!ctx->Extensions.ATI_envmap_bumpmap) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glTexBumpParameterfvATI"); - return; - } - - texUnit = _mesa_get_current_tex_unit(ctx); - - if (pname == GL_BUMP_ROT_MATRIX_ATI) { - if (TEST_EQ_4V(param, texUnit->RotMatrix)) - return; - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - COPY_4FV(texUnit->RotMatrix, param); - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glTexBumpParameter(pname)" ); - return; - } - /* Drivers might want to know about this, instead of dedicated function - just shove it into TexEnv where it really belongs anyway */ - if (ctx->Driver.TexEnv) { - (*ctx->Driver.TexEnv)( ctx, 0, pname, param ); - } -} - - -void GLAPIENTRY -_mesa_GetTexBumpParameterivATI( GLenum pname, GLint *param ) -{ - const struct gl_texture_unit *texUnit; - GLuint i; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (!ctx->Extensions.ATI_envmap_bumpmap) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexBumpParameterivATI"); - return; - } - - texUnit = _mesa_get_current_tex_unit(ctx); - - if (pname == GL_BUMP_ROT_MATRIX_SIZE_ATI) { - /* spec leaves open to support larger matrices. - Don't think anyone would ever want to use it - (and apps almost certainly would not understand it and - thus fail to submit matrices correctly) so hardcode this. */ - *param = 4; - } - else if (pname == GL_BUMP_ROT_MATRIX_ATI) { - /* hope that conversion is correct here */ - param[0] = FLOAT_TO_INT(texUnit->RotMatrix[0]); - param[1] = FLOAT_TO_INT(texUnit->RotMatrix[1]); - param[2] = FLOAT_TO_INT(texUnit->RotMatrix[2]); - param[3] = FLOAT_TO_INT(texUnit->RotMatrix[3]); - } - else if (pname == GL_BUMP_NUM_TEX_UNITS_ATI) { - GLint count = 0; - for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) { - if (ctx->Const.SupportedBumpUnits & (1 << i)) { - count++; - } - } - *param = count; - } - else if (pname == GL_BUMP_TEX_UNITS_ATI) { - for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) { - if (ctx->Const.SupportedBumpUnits & (1 << i)) { - *param++ = i + GL_TEXTURE0; - } - } - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexBumpParameter(pname)" ); - return; - } -} - - -void GLAPIENTRY -_mesa_GetTexBumpParameterfvATI( GLenum pname, GLfloat *param ) -{ - const struct gl_texture_unit *texUnit; - GLuint i; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (!ctx->Extensions.ATI_envmap_bumpmap) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexBumpParameterfvATI"); - return; - } - - texUnit = _mesa_get_current_tex_unit(ctx); - - if (pname == GL_BUMP_ROT_MATRIX_SIZE_ATI) { - /* spec leaves open to support larger matrices. - Don't think anyone would ever want to use it - (and apps might not understand it) so hardcode this. */ - *param = 4.0F; - } - else if (pname == GL_BUMP_ROT_MATRIX_ATI) { - param[0] = texUnit->RotMatrix[0]; - param[1] = texUnit->RotMatrix[1]; - param[2] = texUnit->RotMatrix[2]; - param[3] = texUnit->RotMatrix[3]; - } - else if (pname == GL_BUMP_NUM_TEX_UNITS_ATI) { - GLint count = 0; - for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) { - if (ctx->Const.SupportedBumpUnits & (1 << i)) { - count++; - } - } - *param = (GLfloat) count; - } - else if (pname == GL_BUMP_TEX_UNITS_ATI) { - for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) { - if (ctx->Const.SupportedBumpUnits & (1 << i)) { - *param++ = (GLfloat) (i + GL_TEXTURE0); - } - } - } - else { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexBumpParameter(pname)" ); - return; - } -} diff --git a/dll/opengl/mesa/src/mesa/main/texenv.h b/dll/opengl/mesa/main/texenv.h similarity index 83% rename from dll/opengl/mesa/src/mesa/main/texenv.h rename to dll/opengl/mesa/main/texenv.h index 1e9c5faed79..d967f5d4219 100644 --- a/dll/opengl/mesa/src/mesa/main/texenv.h +++ b/dll/opengl/mesa/main/texenv.h @@ -48,16 +48,4 @@ _mesa_TexEnvi( GLenum target, GLenum pname, GLint param ); extern void GLAPIENTRY _mesa_TexEnviv( GLenum target, GLenum pname, const GLint *param ); -extern void GLAPIENTRY -_mesa_TexBumpParameterivATI( GLenum pname, const GLint *param ); - -extern void GLAPIENTRY -_mesa_TexBumpParameterfvATI( GLenum pname, const GLfloat *param ); - -extern void GLAPIENTRY -_mesa_GetTexBumpParameterivATI( GLenum pname, GLint *param ); - -extern void GLAPIENTRY -_mesa_GetTexBumpParameterfvATI( GLenum pname, GLfloat *param ); - #endif /* TEXENV_H */ diff --git a/dll/opengl/mesa/main/texformat.c b/dll/opengl/mesa/main/texformat.c new file mode 100644 index 00000000000..2c75c570569 --- /dev/null +++ b/dll/opengl/mesa/main/texformat.c @@ -0,0 +1,442 @@ +/* + * Mesa 3-D graphics library + * Version: 7.7 + * + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. + * Copyright (c) 2008-2009 VMware, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +/** + * \file texformat.c + * Texture formats. + * + * \author Gareth Hughes + * \author Brian Paul + */ + + +#include "context.h" +#include "enums.h" +#include "mfeatures.h" +#include "mtypes.h" +#include "texformat.h" + +#define RETURN_IF_SUPPORTED(f) do { \ + if (ctx->TextureFormatSupported[f]) \ + return f; \ +} while (0) + +/** + * Choose an appropriate texture format given the format, type and + * internalFormat parameters passed to glTexImage(). + * + * \param ctx the GL context. + * \param internalFormat user's prefered internal texture format. + * \param format incoming image pixel format. + * \param type incoming image data type. + * + * \return a pointer to a gl_texture_format object which describes the + * choosen texture format, or NULL on failure. + * + * This is called via dd_function_table::ChooseTextureFormat. Hardware drivers + * will typically override this function with a specialized version. + */ +gl_format +_mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat, + GLenum format, GLenum type ) +{ + (void) format; + (void) type; + + switch (internalFormat) { + /* shallow RGBA formats */ + case 4: + case GL_RGBA: + if (type == GL_UNSIGNED_SHORT_4_4_4_4_REV) { + RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444); + } else if (type == GL_UNSIGNED_SHORT_1_5_5_5_REV) { + RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB1555); + } + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888); + RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888); + break; + + case GL_RGBA8: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888); + RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888); + break; + case GL_RGB5_A1: + RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB1555); + break; + case GL_RGBA2: + RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444_REV); /* just to test another format*/ + RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444); + break; + case GL_RGBA4: + RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB4444); + break; + + /* deep RGBA formats */ + case GL_RGB10_A2: + RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888); + break; + case GL_RGBA12: + case GL_RGBA16: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA8888); + RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888); + break; + + /* shallow RGB formats */ + case 3: + case GL_RGB: + case GL_RGB8: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGB888); + RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888); + RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888); + break; + case GL_R3_G3_B2: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGB332); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_REV); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGB888); + RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888); + RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888); + break; + case GL_RGB4: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565_REV); /* just to test another format */ + RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565); + break; + case GL_RGB5: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGB565); + break; + + /* deep RGB formats */ + case GL_RGB10: + case GL_RGB12: + case GL_RGB16: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_16); + RETURN_IF_SUPPORTED(MESA_FORMAT_XRGB8888); + RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888); + break; + + /* Alpha formats */ + case GL_ALPHA: + case GL_ALPHA4: + case GL_ALPHA8: + RETURN_IF_SUPPORTED(MESA_FORMAT_A8); + break; + + case GL_ALPHA12: + case GL_ALPHA16: + RETURN_IF_SUPPORTED(MESA_FORMAT_A16); + RETURN_IF_SUPPORTED(MESA_FORMAT_A8); + break; + + /* Luminance formats */ + case 1: + case GL_LUMINANCE: + case GL_LUMINANCE4: + case GL_LUMINANCE8: + RETURN_IF_SUPPORTED(MESA_FORMAT_L8); + break; + + case GL_LUMINANCE12: + case GL_LUMINANCE16: + RETURN_IF_SUPPORTED(MESA_FORMAT_L16); + RETURN_IF_SUPPORTED(MESA_FORMAT_L8); + break; + + /* Luminance/Alpha formats */ + case GL_LUMINANCE4_ALPHA4: + RETURN_IF_SUPPORTED(MESA_FORMAT_AL44); + RETURN_IF_SUPPORTED(MESA_FORMAT_AL88); + break; + + case 2: + case GL_LUMINANCE_ALPHA: + case GL_LUMINANCE6_ALPHA2: + case GL_LUMINANCE8_ALPHA8: + RETURN_IF_SUPPORTED(MESA_FORMAT_AL88); + break; + + case GL_LUMINANCE12_ALPHA4: + case GL_LUMINANCE12_ALPHA12: + case GL_LUMINANCE16_ALPHA16: + RETURN_IF_SUPPORTED(MESA_FORMAT_AL1616); + RETURN_IF_SUPPORTED(MESA_FORMAT_AL88); + break; + + case GL_INTENSITY: + case GL_INTENSITY4: + case GL_INTENSITY8: + RETURN_IF_SUPPORTED(MESA_FORMAT_I8); + break; + + case GL_INTENSITY12: + case GL_INTENSITY16: + RETURN_IF_SUPPORTED(MESA_FORMAT_I16); + RETURN_IF_SUPPORTED(MESA_FORMAT_I8); + break; + + default: + ; /* fallthrough */ + } + + if (ctx->Extensions.MESA_ycbcr_texture) { + if (internalFormat == GL_YCBCR_MESA) { + if (type == GL_UNSIGNED_SHORT_8_8_MESA) + RETURN_IF_SUPPORTED(MESA_FORMAT_YCBCR); + else + RETURN_IF_SUPPORTED(MESA_FORMAT_YCBCR_REV); + } + } + + if (ctx->Extensions.ARB_texture_float) { + switch (internalFormat) { + case GL_ALPHA16F_ARB: + RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); + break; + case GL_ALPHA32F_ARB: + RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); + break; + case GL_LUMINANCE16F_ARB: + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); + break; + case GL_LUMINANCE32F_ARB: + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); + break; + case GL_LUMINANCE_ALPHA16F_ARB: + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); + break; + case GL_LUMINANCE_ALPHA32F_ARB: + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); + break; + case GL_INTENSITY16F_ARB: + RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); + break; + case GL_INTENSITY32F_ARB: + RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); + break; + case GL_RGB16F_ARB: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); + break; + case GL_RGB32F_ARB: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); + break; + case GL_RGBA16F_ARB: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); + break; + case GL_RGBA32F_ARB: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16); + break; + default: + ; /* fallthrough */ + } + } + + if (ctx->Extensions.EXT_texture_integer) { + switch (internalFormat) { + case GL_ALPHA8UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_UINT8); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8); + break; + case GL_ALPHA16UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_UINT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16); + break; + case GL_ALPHA32UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_UINT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32); + break; + case GL_ALPHA8I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_INT8); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8); + break; + case GL_ALPHA16I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_INT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16); + break; + case GL_ALPHA32I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_INT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32); + break; + case GL_LUMINANCE8UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_UINT8); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8); + break; + case GL_LUMINANCE16UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_UINT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16); + break; + case GL_LUMINANCE32UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_UINT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32); + break; + case GL_LUMINANCE8I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_INT8); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8); + break; + case GL_LUMINANCE16I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_INT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16); + break; + case GL_LUMINANCE32I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_INT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32); + break; + case GL_LUMINANCE_ALPHA8UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_UINT8); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8); + break; + case GL_LUMINANCE_ALPHA16UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_UINT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16); + break; + case GL_LUMINANCE_ALPHA32UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_UINT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32); + break; + case GL_LUMINANCE_ALPHA8I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_INT8); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8); + break; + case GL_LUMINANCE_ALPHA16I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_INT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16); + break; + case GL_LUMINANCE_ALPHA32I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_INT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32); + break; + case GL_INTENSITY8UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_UINT8); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8); + break; + case GL_INTENSITY16UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_UINT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16); + break; + case GL_INTENSITY32UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_UINT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32); + break; + case GL_INTENSITY8I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_INT8); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8); + break; + case GL_INTENSITY16I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_INT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16); + break; + case GL_INTENSITY32I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_INT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32); + break; + } + } + + if (ctx->VersionMajor >= 3 || + ctx->Extensions.EXT_texture_integer) { + switch (internalFormat) { + case GL_RGB8UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_UINT8); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8); + break; + case GL_RGB16UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_UINT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16); + break; + case GL_RGB32UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_UINT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32); + break; + case GL_RGB8I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_INT8); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8); + break; + case GL_RGB16I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_INT16); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16); + break; + case GL_RGB32I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_INT32); + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32); + break; + case GL_RGBA8UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT8); + break; + case GL_RGBA16UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT16); + break; + case GL_RGBA32UI_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_UINT32); + break; + case GL_RGBA8I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT8); + break; + case GL_RGBA16I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT16); + break; + case GL_RGBA32I_EXT: + RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_INT32); + break; + } + } + + _mesa_problem(ctx, "unexpected format %s in _mesa_choose_tex_format()", + _mesa_lookup_enum_by_nr(internalFormat)); + return MESA_FORMAT_NONE; +} + diff --git a/dll/opengl/mesa/src/mesa/main/texformat.h b/dll/opengl/mesa/main/texformat.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/texformat.h rename to dll/opengl/mesa/main/texformat.h diff --git a/dll/opengl/mesa/src/mesa/main/texgen.c b/dll/opengl/mesa/main/texgen.c similarity index 91% rename from dll/opengl/mesa/src/mesa/main/texgen.c rename to dll/opengl/mesa/main/texgen.c index 0ace0b9364d..5c4889da9eb 100644 --- a/dll/opengl/mesa/src/mesa/main/texgen.c +++ b/dll/opengl/mesa/main/texgen.c @@ -80,12 +80,7 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ) *params, _mesa_lookup_enum_by_nr((GLenum) (GLint) *params)); - if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glTexGen(current unit)"); - return; - } - - texUnit = _mesa_get_current_tex_unit(ctx); + texUnit = &ctx->Texture.Unit; texgen = get_texgen(texUnit, coord); if (!texgen) { @@ -272,12 +267,7 @@ _mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params ) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexGendv(current unit)"); - return; - } - - texUnit = _mesa_get_current_tex_unit(ctx); + texUnit = &ctx->Texture.Unit; texgen = get_texgen(texUnit, coord); if (!texgen) { @@ -310,12 +300,7 @@ _mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexGenfv(current unit)"); - return; - } - - texUnit = _mesa_get_current_tex_unit(ctx); + texUnit = &ctx->Texture.Unit; texgen = get_texgen(texUnit, coord); if (!texgen) { @@ -348,12 +333,7 @@ _mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params ) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexGeniv(current unit)"); - return; - } - - texUnit = _mesa_get_current_tex_unit(ctx); + texUnit = &ctx->Texture.Unit; texgen = get_texgen(texUnit, coord); if (!texgen) { diff --git a/dll/opengl/mesa/src/mesa/main/texgen.h b/dll/opengl/mesa/main/texgen.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/texgen.h rename to dll/opengl/mesa/main/texgen.h diff --git a/dll/opengl/mesa/src/mesa/main/texgetimage.c b/dll/opengl/mesa/main/texgetimage.c similarity index 54% rename from dll/opengl/mesa/src/mesa/main/texgetimage.c rename to dll/opengl/mesa/main/texgetimage.c index 411a92402a3..64955d7046b 100644 --- a/dll/opengl/mesa/src/mesa/main/texgetimage.c +++ b/dll/opengl/mesa/main/texgetimage.c @@ -39,8 +39,6 @@ #include "mfeatures.h" #include "mtypes.h" #include "pack.h" -#include "pbo.h" -#include "texcompress.h" #include "texgetimage.h" #include "teximage.h" @@ -116,52 +114,6 @@ get_tex_depth(struct gl_context *ctx, GLuint dimensions, free(depthRow); } - -/** - * glGetTexImage for depth/stencil pixels. - */ -static void -get_tex_depth_stencil(struct gl_context *ctx, GLuint dimensions, - GLenum format, GLenum type, GLvoid *pixels, - struct gl_texture_image *texImage) -{ - const GLint width = texImage->Width; - const GLint height = texImage->Height; - const GLint depth = texImage->Depth; - GLint img, row; - - for (img = 0; img < depth; img++) { - GLubyte *srcMap; - GLint rowstride; - - /* map src texture buffer */ - ctx->Driver.MapTextureImage(ctx, texImage, img, - 0, 0, width, height, GL_MAP_READ_BIT, - &srcMap, &rowstride); - - if (srcMap) { - for (row = 0; row < height; row++) { - const GLubyte *src = srcMap + row * rowstride; - void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels, - width, height, format, type, - img, row, 0); - /* XXX Z24_S8 vs. S8_Z24??? */ - memcpy(dest, src, width * sizeof(GLuint)); - if (ctx->Pack.SwapBytes) { - _mesa_swap4((GLuint *) dest, width); - } - } - - ctx->Driver.UnmapTextureImage(ctx, texImage, img); - } - else { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage"); - break; - } - } -} - - /** * glGetTexImage for YCbCr pixels. */ @@ -214,86 +166,6 @@ get_tex_ycbcr(struct gl_context *ctx, GLuint dimensions, } } - -/** - * Get a color texture image with decompression. - */ -static void -get_tex_rgba_compressed(struct gl_context *ctx, GLuint dimensions, - GLenum format, GLenum type, GLvoid *pixels, - struct gl_texture_image *texImage, - GLbitfield transferOps) -{ - /* don't want to apply sRGB -> RGB conversion here so override the format */ - const gl_format texFormat = - _mesa_get_srgb_format_linear(texImage->TexFormat); - const GLenum baseFormat = _mesa_get_format_base_format(texFormat); - const GLuint width = texImage->Width; - const GLuint height = texImage->Height; - const GLuint depth = texImage->Depth; - GLfloat *tempImage, *srcRow; - GLuint row; - - /* Decompress into temp float buffer, then pack into user buffer */ - tempImage = (GLfloat *) malloc(width * height * depth - * 4 * sizeof(GLfloat)); - if (!tempImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage()"); - return; - } - - /* Decompress the texture image - results in 'tempImage' */ - { - GLubyte *srcMap; - GLint srcRowStride; - GLuint bytes, bw, bh; - - bytes = _mesa_get_format_bytes(texFormat); - _mesa_get_format_block_size(texFormat, &bw, &bh); - - ctx->Driver.MapTextureImage(ctx, texImage, 0, - 0, 0, width, height, - GL_MAP_READ_BIT, - &srcMap, &srcRowStride); - if (srcMap) { - /* XXX This line is a bit of a hack to work around the - * mismatch of compressed row strides as returned by - * MapTextureImage() vs. what the texture decompression code - * uses. This will be fixed in the future. - */ - srcRowStride = srcRowStride * bh / bytes; - - _mesa_decompress_image(texFormat, width, height, - srcMap, srcRowStride, tempImage); - - ctx->Driver.UnmapTextureImage(ctx, texImage, 0); - } - else { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage"); - } - } - - if (baseFormat == GL_LUMINANCE || - baseFormat == GL_LUMINANCE_ALPHA) { - _mesa_rebase_rgba_float(width * height, (GLfloat (*)[4]) tempImage, - baseFormat); - } - - srcRow = tempImage; - for (row = 0; row < height; row++) { - void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels, - width, height, format, type, - 0, row, 0); - - _mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) srcRow, - format, type, dest, &ctx->Pack, transferOps); - srcRow += width * 4; - } - - free(tempImage); -} - - /** * Get an uncompressed color texture image. */ @@ -303,9 +175,7 @@ get_tex_rgba_uncompressed(struct gl_context *ctx, GLuint dimensions, struct gl_texture_image *texImage, GLbitfield transferOps) { - /* don't want to apply sRGB -> RGB conversion here so override the format */ - const gl_format texFormat = - _mesa_get_srgb_format_linear(texImage->TexFormat); + const gl_format texFormat = texImage->TexFormat; const GLuint width = texImage->Width; const GLenum destBaseFormat = _mesa_base_tex_format(ctx, format); GLenum rebaseFormat = GL_NONE; @@ -324,11 +194,6 @@ get_tex_rgba_uncompressed(struct gl_context *ctx, GLuint dimensions, return; } - if (texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY) { - depth = height; - height = 1; - } - if (texImage->_BaseFormat == GL_LUMINANCE || texImage->_BaseFormat == GL_INTENSITY || texImage->_BaseFormat == GL_LUMINANCE_ALPHA) { @@ -428,15 +293,8 @@ get_tex_rgba(struct gl_context *ctx, GLuint dimensions, dataType == GL_UNSIGNED_NORMALIZED) { transferOps |= IMAGE_CLAMP_BIT; } - - if (_mesa_is_format_compressed(texImage->TexFormat)) { - get_tex_rgba_compressed(ctx, dimensions, format, type, - pixels, texImage, transferOps); - } - else { - get_tex_rgba_uncompressed(ctx, dimensions, format, type, - pixels, texImage, transferOps); - } + get_tex_rgba_uncompressed(ctx, dimensions, format, type, + pixels, texImage, transferOps); } @@ -460,26 +318,22 @@ get_tex_memcpy(struct gl_context *ctx, GLenum format, GLenum type, */ if (target == GL_TEXTURE_1D || target == GL_TEXTURE_2D || - target == GL_TEXTURE_RECTANGLE || _mesa_is_cube_face(target)) { - if ((texImage->TexFormat == MESA_FORMAT_ARGB8888 || - texImage->TexFormat == MESA_FORMAT_SARGB8) && + if ((texImage->TexFormat == MESA_FORMAT_ARGB8888) && format == GL_BGRA && (type == GL_UNSIGNED_BYTE || type == GL_UNSIGNED_INT_8_8_8_8_REV) && !ctx->Pack.SwapBytes && _mesa_little_endian()) { memCopy = GL_TRUE; } - else if ((texImage->TexFormat == MESA_FORMAT_AL88 || - texImage->TexFormat == MESA_FORMAT_SLA8) && + else if ((texImage->TexFormat == MESA_FORMAT_AL88) && format == GL_LUMINANCE_ALPHA && type == GL_UNSIGNED_BYTE && !ctx->Pack.SwapBytes && _mesa_little_endian()) { memCopy = GL_TRUE; } - else if ((texImage->TexFormat == MESA_FORMAT_L8 || - texImage->TexFormat == MESA_FORMAT_SL8) && + else if ((texImage->TexFormat == MESA_FORMAT_L8) && format == GL_LUMINANCE && type == GL_UNSIGNED_BYTE) { memCopy = GL_TRUE; @@ -566,131 +420,31 @@ _mesa_get_teximage(struct gl_context *ctx, dimensions = 2; } - /* map dest buffer, if PBO */ - if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { - /* Packing texture image into a PBO. - * Map the (potentially) VRAM-based buffer into our process space so - * we can write into it with the code below. - * A hardware driver might use a sophisticated blit to move the - * texture data to the PBO if the PBO is in VRAM along with the texture. - */ - GLubyte *buf = (GLubyte *) - ctx->Driver.MapBufferRange(ctx, 0, ctx->Pack.BufferObj->Size, - GL_MAP_WRITE_BIT, ctx->Pack.BufferObj); - if (!buf) { - /* out of memory or other unexpected error */ - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage(map PBO failed)"); - return; - } - /* was an offset into the PBO. - * Now make it a real, client-side pointer inside the mapped region. - */ - pixels = ADD_POINTERS(buf, pixels); - } - if (get_tex_memcpy(ctx, format, type, pixels, texImage)) { /* all done */ } else if (format == GL_DEPTH_COMPONENT) { get_tex_depth(ctx, dimensions, format, type, pixels, texImage); } - else if (format == GL_DEPTH_STENCIL_EXT) { - get_tex_depth_stencil(ctx, dimensions, format, type, pixels, texImage); - } else if (format == GL_YCBCR_MESA) { get_tex_ycbcr(ctx, dimensions, format, type, pixels, texImage); } else { get_tex_rgba(ctx, dimensions, format, type, pixels, texImage); } - - if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { - ctx->Driver.UnmapBuffer(ctx, ctx->Pack.BufferObj); - } } - - -/** - * This is the software fallback for Driver.GetCompressedTexImage(). - * All error checking will have been done before this routine is called. - */ -void -_mesa_get_compressed_teximage(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLvoid *img) -{ - const GLuint row_stride = - _mesa_format_row_stride(texImage->TexFormat, texImage->Width); - GLuint i; - GLubyte *src; - GLint srcRowStride; - - if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { - /* pack texture image into a PBO */ - GLubyte *buf = (GLubyte *) - ctx->Driver.MapBufferRange(ctx, 0, ctx->Pack.BufferObj->Size, - GL_MAP_WRITE_BIT, ctx->Pack.BufferObj); - if (!buf) { - /* out of memory or other unexpected error */ - _mesa_error(ctx, GL_OUT_OF_MEMORY, - "glGetCompresssedTexImage(map PBO failed)"); - return; - } - img = ADD_POINTERS(buf, img); - } - - /* map src texture buffer */ - ctx->Driver.MapTextureImage(ctx, texImage, 0, - 0, 0, texImage->Width, texImage->Height, - GL_MAP_READ_BIT, &src, &srcRowStride); - - if (src) { - /* no pixelstore or pixel transfer, but respect stride */ - - if (row_stride == srcRowStride) { - const GLuint size = _mesa_format_image_size(texImage->TexFormat, - texImage->Width, - texImage->Height, - texImage->Depth); - memcpy(img, src, size); - } - else { - GLuint bw, bh; - _mesa_get_format_block_size(texImage->TexFormat, &bw, &bh); - for (i = 0; i < (texImage->Height + bh - 1) / bh; i++) { - memcpy((GLubyte *)img + i * row_stride, - (GLubyte *)src + i * srcRowStride, - row_stride); - } - } - - ctx->Driver.UnmapTextureImage(ctx, texImage, 0); - } - else { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetCompresssedTexImage"); - } - - if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { - ctx->Driver.UnmapBuffer(ctx, ctx->Pack.BufferObj); - } -} - - - /** * Do error checking for a glGetTexImage() call. * \return GL_TRUE if any error, GL_FALSE if no errors. */ static GLboolean getteximage_error_check(struct gl_context *ctx, GLenum target, GLint level, - GLenum format, GLenum type, GLsizei clientMemSize, - GLvoid *pixels ) + GLenum format, GLenum type, GLvoid *pixels ) { struct gl_texture_object *texObj; struct gl_texture_image *texImage; const GLint maxLevels = _mesa_max_texture_levels(ctx, target); - const GLuint dimensions = (target == GL_TEXTURE_3D) ? 3 : 2; GLenum baseFormat, err; if (maxLevels == 0) { @@ -715,7 +469,7 @@ getteximage_error_check(struct gl_context *ctx, GLenum target, GLint level, return GL_TRUE; } - if (!ctx->Extensions.ARB_depth_texture && _mesa_is_depth_format(format)) { + if (_mesa_is_depth_format(format)) { _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); return GL_TRUE; } @@ -725,25 +479,13 @@ getteximage_error_check(struct gl_context *ctx, GLenum target, GLint level, return GL_TRUE; } - if (!ctx->Extensions.EXT_packed_depth_stencil - && _mesa_is_depthstencil_format(format)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); - return GL_TRUE; - } - - if (!ctx->Extensions.ATI_envmap_bumpmap - && _mesa_is_dudv_format(format)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); - return GL_TRUE; - } - err = _mesa_error_check_format_and_type(ctx, format, type); if (err != GL_NO_ERROR) { _mesa_error(ctx, err, "glGetTexImage(format/type)"); return GL_TRUE; } - texObj = _mesa_get_current_tex_object(ctx, target); + texObj = _mesa_select_tex_object(ctx, target); if (!texObj || _mesa_is_proxy_texture(target)) { _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(target)"); @@ -767,8 +509,7 @@ getteximage_error_check(struct gl_context *ctx, GLenum target, GLint level, return GL_TRUE; } else if (_mesa_is_depth_format(format) - && !_mesa_is_depth_format(baseFormat) - && !_mesa_is_depthstencil_format(baseFormat)) { + && !_mesa_is_depth_format(baseFormat)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)"); return GL_TRUE; } @@ -777,39 +518,6 @@ getteximage_error_check(struct gl_context *ctx, GLenum target, GLint level, _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)"); return GL_TRUE; } - else if (_mesa_is_depthstencil_format(format) - && !_mesa_is_depthstencil_format(baseFormat)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)"); - return GL_TRUE; - } - else if (_mesa_is_dudv_format(format) - && !_mesa_is_dudv_format(baseFormat)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)"); - return GL_TRUE; - } - - if (!_mesa_validate_pbo_access(dimensions, &ctx->Pack, texImage->Width, - texImage->Height, texImage->Depth, - format, type, clientMemSize, pixels)) { - if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetTexImage(out of bounds PBO access)"); - } else { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetnTexImageARB(out of bounds access:" - " bufSize (%d) is too small)", clientMemSize); - } - return GL_TRUE; - } - - if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { - /* PBO should not be mapped */ - if (_mesa_bufferobj_mapped(ctx->Pack.BufferObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetTexImage(PBO is mapped)"); - return GL_TRUE; - } - } return GL_FALSE; } @@ -827,25 +535,24 @@ getteximage_error_check(struct gl_context *ctx, GLenum target, GLint level, * \param pixels returned pixel data. */ void GLAPIENTRY -_mesa_GetnTexImageARB( GLenum target, GLint level, GLenum format, - GLenum type, GLsizei bufSize, GLvoid *pixels ) +_mesa_GetTexImage( GLenum target, GLint level, GLenum format, + GLenum type, GLvoid *pixels ) { struct gl_texture_object *texObj; struct gl_texture_image *texImage; GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - if (getteximage_error_check(ctx, target, level, format, type, - bufSize, pixels)) { + if (getteximage_error_check(ctx, target, level, format, type, pixels)) { return; } - if (!_mesa_is_bufferobj(ctx->Pack.BufferObj) && !pixels) { + if (!pixels) { /* not an error, do nothing */ return; } - texObj = _mesa_get_current_tex_object(ctx, target); + texObj = _mesa_select_tex_object(ctx, target); texImage = _mesa_select_tex_image(ctx, texObj, target, level); if (_mesa_is_zero_size_texture(texImage)) @@ -867,143 +574,3 @@ _mesa_GetnTexImageARB( GLenum target, GLint level, GLenum format, _mesa_unlock_texture(ctx, texObj); } - -void GLAPIENTRY -_mesa_GetTexImage( GLenum target, GLint level, GLenum format, - GLenum type, GLvoid *pixels ) -{ - _mesa_GetnTexImageARB(target, level, format, type, INT_MAX, pixels); -} - - -/** - * Do error checking for a glGetCompressedTexImage() call. - * \return GL_TRUE if any error, GL_FALSE if no errors. - */ -static GLboolean -getcompressedteximage_error_check(struct gl_context *ctx, GLenum target, - GLint level, GLsizei clientMemSize, GLvoid *img) -{ - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - const GLint maxLevels = _mesa_max_texture_levels(ctx, target); - GLuint compressedSize; - - if (maxLevels == 0) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetCompressedTexImage(target=0x%x)", - target); - return GL_TRUE; - } - - if (level < 0 || level >= maxLevels) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glGetCompressedTexImageARB(bad level = %d)", level); - return GL_TRUE; - } - - if (_mesa_is_proxy_texture(target)) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetCompressedTexImageARB(bad target = %s)", - _mesa_lookup_enum_by_nr(target)); - return GL_TRUE; - } - - texObj = _mesa_get_current_tex_object(ctx, target); - if (!texObj) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetCompressedTexImageARB(target)"); - return GL_TRUE; - } - - texImage = _mesa_select_tex_image(ctx, texObj, target, level); - - if (!texImage) { - /* probably invalid mipmap level */ - _mesa_error(ctx, GL_INVALID_VALUE, - "glGetCompressedTexImageARB(level)"); - return GL_TRUE; - } - - if (!_mesa_is_format_compressed(texImage->TexFormat)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetCompressedTexImageARB(texture is not compressed)"); - return GL_TRUE; - } - - compressedSize = _mesa_format_image_size(texImage->TexFormat, - texImage->Width, - texImage->Height, - texImage->Depth); - - if (!_mesa_is_bufferobj(ctx->Pack.BufferObj)) { - /* do bounds checking on writing to client memory */ - if (clientMemSize < compressedSize) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetnCompressedTexImageARB(out of bounds access:" - " bufSize (%d) is too small)", clientMemSize); - return GL_TRUE; - } - } else { - /* do bounds checking on PBO write */ - if ((const GLubyte *) img + compressedSize > - (const GLubyte *) ctx->Pack.BufferObj->Size) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetCompressedTexImage(out of bounds PBO access)"); - return GL_TRUE; - } - - /* make sure PBO is not mapped */ - if (_mesa_bufferobj_mapped(ctx->Pack.BufferObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetCompressedTexImage(PBO is mapped)"); - return GL_TRUE; - } - } - - return GL_FALSE; -} - - -void GLAPIENTRY -_mesa_GetnCompressedTexImageARB(GLenum target, GLint level, GLsizei bufSize, - GLvoid *img) -{ - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (getcompressedteximage_error_check(ctx, target, level, bufSize, img)) { - return; - } - - if (!_mesa_is_bufferobj(ctx->Pack.BufferObj) && !img) { - /* not an error, do nothing */ - return; - } - - texObj = _mesa_get_current_tex_object(ctx, target); - texImage = _mesa_select_tex_image(ctx, texObj, target, level); - - if (_mesa_is_zero_size_texture(texImage)) - return; - - if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE)) { - _mesa_debug(ctx, - "glGetCompressedTexImage(tex %u) format = %s, w=%d, h=%d\n", - texObj->Name, - _mesa_get_format_name(texImage->TexFormat), - texImage->Width, texImage->Height); - } - - _mesa_lock_texture(ctx, texObj); - { - ctx->Driver.GetCompressedTexImage(ctx, texImage, img); - } - _mesa_unlock_texture(ctx, texObj); -} - -void GLAPIENTRY -_mesa_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid *img) -{ - _mesa_GetnCompressedTexImageARB(target, level, INT_MAX, img); -} diff --git a/dll/opengl/mesa/src/mesa/main/texgetimage.h b/dll/opengl/mesa/main/texgetimage.h similarity index 74% rename from dll/opengl/mesa/src/mesa/main/texgetimage.h rename to dll/opengl/mesa/main/texgetimage.h index cd8e76e7a3e..eedf2ebfb47 100644 --- a/dll/opengl/mesa/src/mesa/main/texgetimage.h +++ b/dll/opengl/mesa/main/texgetimage.h @@ -39,25 +39,9 @@ _mesa_get_teximage(struct gl_context *ctx, struct gl_texture_image *texImage); -extern void -_mesa_get_compressed_teximage(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLvoid *data); - - extern void GLAPIENTRY _mesa_GetTexImage( GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels ); -extern void GLAPIENTRY -_mesa_GetnTexImageARB( GLenum target, GLint level, GLenum format, - GLenum type, GLsizei bufSize, GLvoid *pixels ); - -extern void GLAPIENTRY -_mesa_GetCompressedTexImageARB(GLenum target, GLint lod, GLvoid *img); - -extern void GLAPIENTRY -_mesa_GetnCompressedTexImageARB(GLenum target, GLint level, GLsizei bufSize, - GLvoid *img); #endif /* TEXGETIMAGE_H */ diff --git a/dll/opengl/mesa/src/mesa/main/teximage.c b/dll/opengl/mesa/main/teximage.c similarity index 56% rename from dll/opengl/mesa/src/mesa/main/teximage.c rename to dll/opengl/mesa/main/teximage.c index 077c1960f1a..e9b83b538ea 100644 --- a/dll/opengl/mesa/src/mesa/main/teximage.c +++ b/dll/opengl/mesa/main/teximage.c @@ -33,7 +33,6 @@ #include "bufferobj.h" #include "context.h" #include "enums.h" -#include "fbobject.h" #include "framebuffer.h" #include "hash.h" #include "image.h" @@ -41,7 +40,6 @@ #include "macros.h" #include "mfeatures.h" #include "state.h" -#include "texcompress.h" #include "teximage.h" #include "texstate.h" #include "texpal.h" @@ -128,83 +126,6 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat ) ; /* fallthrough */ } - /* GL_BGRA can be an internal format *only* in OpenGL ES (1.x or 2.0). - */ - if (ctx->API != API_OPENGL) { - switch (internalFormat) { - case GL_BGRA: - return GL_RGBA; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.ARB_depth_texture) { - switch (internalFormat) { - case GL_DEPTH_COMPONENT: - case GL_DEPTH_COMPONENT16: - case GL_DEPTH_COMPONENT24: - case GL_DEPTH_COMPONENT32: - return GL_DEPTH_COMPONENT; - default: - ; /* fallthrough */ - } - } - - switch (internalFormat) { - case GL_COMPRESSED_ALPHA: - return GL_ALPHA; - case GL_COMPRESSED_LUMINANCE: - return GL_LUMINANCE; - case GL_COMPRESSED_LUMINANCE_ALPHA: - return GL_LUMINANCE_ALPHA; - case GL_COMPRESSED_INTENSITY: - return GL_INTENSITY; - case GL_COMPRESSED_RGB: - return GL_RGB; - case GL_COMPRESSED_RGBA: - return GL_RGBA; - default: - ; /* fallthrough */ - } - - if (ctx->Extensions.TDFX_texture_compression_FXT1) { - switch (internalFormat) { - case GL_COMPRESSED_RGB_FXT1_3DFX: - return GL_RGB; - case GL_COMPRESSED_RGBA_FXT1_3DFX: - return GL_RGBA; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.EXT_texture_compression_s3tc) { - switch (internalFormat) { - case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: - return GL_RGB; - case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: - case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: - case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: - return GL_RGBA; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.S3_s3tc) { - switch (internalFormat) { - case GL_RGB_S3TC: - case GL_RGB4_S3TC: - return GL_RGB; - case GL_RGBA_S3TC: - case GL_RGBA4_S3TC: - return GL_RGBA; - default: - ; /* fallthrough */ - } - } - if (ctx->Extensions.MESA_ycbcr_texture) { if (internalFormat == GL_YCBCR_MESA) return GL_YCBCR_MESA; @@ -235,94 +156,6 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat ) } } - if (ctx->Extensions.ATI_envmap_bumpmap) { - switch (internalFormat) { - case GL_DUDV_ATI: - case GL_DU8DV8_ATI: - return GL_DUDV_ATI; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.EXT_texture_snorm) { - switch (internalFormat) { - case GL_RED_SNORM: - case GL_R8_SNORM: - case GL_R16_SNORM: - return GL_RED; - case GL_RG_SNORM: - case GL_RG8_SNORM: - case GL_RG16_SNORM: - return GL_RG; - case GL_RGB_SNORM: - case GL_RGB8_SNORM: - case GL_RGB16_SNORM: - return GL_RGB; - case GL_RGBA_SNORM: - case GL_RGBA8_SNORM: - case GL_RGBA16_SNORM: - return GL_RGBA; - case GL_ALPHA_SNORM: - case GL_ALPHA8_SNORM: - case GL_ALPHA16_SNORM: - return GL_ALPHA; - case GL_LUMINANCE_SNORM: - case GL_LUMINANCE8_SNORM: - case GL_LUMINANCE16_SNORM: - return GL_LUMINANCE; - case GL_LUMINANCE_ALPHA_SNORM: - case GL_LUMINANCE8_ALPHA8_SNORM: - case GL_LUMINANCE16_ALPHA16_SNORM: - return GL_LUMINANCE_ALPHA; - case GL_INTENSITY_SNORM: - case GL_INTENSITY8_SNORM: - case GL_INTENSITY16_SNORM: - return GL_INTENSITY; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.EXT_packed_depth_stencil) { - switch (internalFormat) { - case GL_DEPTH_STENCIL_EXT: - case GL_DEPTH24_STENCIL8_EXT: - return GL_DEPTH_STENCIL_EXT; - default: - ; /* fallthrough */ - } - } - -#if FEATURE_EXT_texture_sRGB - if (ctx->Extensions.EXT_texture_sRGB) { - switch (internalFormat) { - case GL_SRGB_EXT: - case GL_SRGB8_EXT: - case GL_COMPRESSED_SRGB_EXT: - case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT: - return GL_RGB; - case GL_SRGB_ALPHA_EXT: - case GL_SRGB8_ALPHA8_EXT: - case GL_COMPRESSED_SRGB_ALPHA_EXT: - case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: - case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: - case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: - return GL_RGBA; - case GL_SLUMINANCE_ALPHA_EXT: - case GL_SLUMINANCE8_ALPHA8_EXT: - case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT: - return GL_LUMINANCE_ALPHA; - case GL_SLUMINANCE_EXT: - case GL_SLUMINANCE8_EXT: - case GL_COMPRESSED_SLUMINANCE_EXT: - return GL_LUMINANCE; - default: - ; /* fallthrough */ - } - } -#endif /* FEATURE_EXT_texture_sRGB */ - if (ctx->VersionMajor >= 3 || ctx->Extensions.EXT_texture_integer) { switch (internalFormat) { @@ -379,154 +212,6 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat ) } } - if (ctx->Extensions.ARB_texture_rg) { - switch (internalFormat) { - case GL_R16F: - /* R16F depends on both ARB_half_float_pixel and ARB_texture_float. - */ - if (!ctx->Extensions.ARB_half_float_pixel) - break; - /* FALLTHROUGH */ - case GL_R32F: - if (!ctx->Extensions.ARB_texture_float) - break; - return GL_RED; - case GL_R8I: - case GL_R8UI: - case GL_R16I: - case GL_R16UI: - case GL_R32I: - case GL_R32UI: - if (ctx->VersionMajor < 3 && !ctx->Extensions.EXT_texture_integer) - break; - /* FALLTHROUGH */ - case GL_R8: - case GL_R16: - case GL_RED: - case GL_COMPRESSED_RED: - return GL_RED; - - case GL_RG16F: - /* RG16F depends on both ARB_half_float_pixel and ARB_texture_float. - */ - if (!ctx->Extensions.ARB_half_float_pixel) - break; - /* FALLTHROUGH */ - case GL_RG32F: - if (!ctx->Extensions.ARB_texture_float) - break; - return GL_RG; - case GL_RG8I: - case GL_RG8UI: - case GL_RG16I: - case GL_RG16UI: - case GL_RG32I: - case GL_RG32UI: - if (ctx->VersionMajor < 3 && !ctx->Extensions.EXT_texture_integer) - break; - /* FALLTHROUGH */ - case GL_RG: - case GL_RG8: - case GL_RG16: - case GL_COMPRESSED_RG: - return GL_RG; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.EXT_texture_shared_exponent) { - switch (internalFormat) { - case GL_RGB9_E5_EXT: - return GL_RGB; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.EXT_packed_float) { - switch (internalFormat) { - case GL_R11F_G11F_B10F_EXT: - return GL_RGB; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.ARB_depth_buffer_float) { - switch (internalFormat) { - case GL_DEPTH_COMPONENT32F: - return GL_DEPTH_COMPONENT; - case GL_DEPTH32F_STENCIL8: - return GL_DEPTH_STENCIL; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.ARB_texture_compression_rgtc) { - switch (internalFormat) { - case GL_COMPRESSED_RED_RGTC1: - case GL_COMPRESSED_SIGNED_RED_RGTC1: - return GL_RED; - case GL_COMPRESSED_RG_RGTC2: - case GL_COMPRESSED_SIGNED_RG_RGTC2: - return GL_RG; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.EXT_texture_compression_latc) { - switch (internalFormat) { - case GL_COMPRESSED_LUMINANCE_LATC1_EXT: - case GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT: - return GL_LUMINANCE; - case GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT: - case GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT: - return GL_LUMINANCE_ALPHA; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.ATI_texture_compression_3dc) { - switch (internalFormat) { - case GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI: - return GL_LUMINANCE_ALPHA; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.OES_compressed_ETC1_RGB8_texture) { - switch (internalFormat) { - case GL_ETC1_RGB8_OES: - return GL_RGB; - default: - ; /* fallthrough */ - } - } - - if (ctx->API == API_OPENGLES) { - switch (internalFormat) { - case GL_PALETTE4_RGB8_OES: - case GL_PALETTE4_R5_G6_B5_OES: - case GL_PALETTE8_RGB8_OES: - case GL_PALETTE8_R5_G6_B5_OES: - return GL_RGB; - case GL_PALETTE4_RGBA8_OES: - case GL_PALETTE8_RGB5_A1_OES: - case GL_PALETTE4_RGBA4_OES: - case GL_PALETTE4_RGB5_A1_OES: - case GL_PALETTE8_RGBA8_OES: - case GL_PALETTE8_RGBA4_OES: - return GL_RGBA; - default: - ; /* fallthrough */ - } - } - return -1; /* error */ } @@ -534,27 +219,6 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat ) /** * Is the given texture format a generic compressed format? */ -static GLboolean -is_generic_compressed_format(GLenum format) -{ - switch (format) { - case GL_COMPRESSED_RED: - case GL_COMPRESSED_RG: - case GL_COMPRESSED_RGB: - case GL_COMPRESSED_RGBA: - case GL_COMPRESSED_ALPHA: - case GL_COMPRESSED_LUMINANCE: - case GL_COMPRESSED_LUMINANCE_ALPHA: - case GL_COMPRESSED_INTENSITY: - case GL_COMPRESSED_SRGB: - case GL_COMPRESSED_SRGB_ALPHA: - case GL_COMPRESSED_SLUMINANCE: - case GL_COMPRESSED_SLUMINANCE_ALPHA: - return GL_TRUE; - default: - return GL_FALSE; - } -} /** @@ -590,8 +254,6 @@ set_tex_image(struct gl_texture_object *tObj, ASSERT(tObj); ASSERT(texImage); - if (target == GL_TEXTURE_RECTANGLE_NV || target == GL_TEXTURE_EXTERNAL_OES) - assert(level == 0); tObj->Image[face][level] = texImage; @@ -659,10 +321,7 @@ _mesa_is_proxy_texture(GLenum target) return (target == GL_PROXY_TEXTURE_1D || target == GL_PROXY_TEXTURE_2D || target == GL_PROXY_TEXTURE_3D || - target == GL_PROXY_TEXTURE_CUBE_MAP_ARB || - target == GL_PROXY_TEXTURE_RECTANGLE_NV || - target == GL_PROXY_TEXTURE_1D_ARRAY_EXT || - target == GL_PROXY_TEXTURE_2D_ARRAY_EXT); + target == GL_PROXY_TEXTURE_CUBE_MAP_ARB); } @@ -691,15 +350,6 @@ get_proxy_target(GLenum target) case GL_TEXTURE_CUBE_MAP_ARB: case GL_PROXY_TEXTURE_CUBE_MAP_ARB: return GL_PROXY_TEXTURE_CUBE_MAP_ARB; - case GL_TEXTURE_RECTANGLE_NV: - case GL_PROXY_TEXTURE_RECTANGLE_NV: - return GL_PROXY_TEXTURE_RECTANGLE_NV; - case GL_TEXTURE_1D_ARRAY_EXT: - case GL_PROXY_TEXTURE_1D_ARRAY_EXT: - return GL_PROXY_TEXTURE_1D_ARRAY_EXT; - case GL_TEXTURE_2D_ARRAY_EXT: - case GL_PROXY_TEXTURE_2D_ARRAY_EXT: - return GL_PROXY_TEXTURE_2D_ARRAY_EXT; default: _mesa_problem(NULL, "unexpected target in get_proxy_target()"); return 0; @@ -719,57 +369,21 @@ get_proxy_target(GLenum target) */ struct gl_texture_object * _mesa_select_tex_object(struct gl_context *ctx, - const struct gl_texture_unit *texUnit, GLenum target) { - const GLboolean arrayTex = (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); - switch (target) { case GL_TEXTURE_1D: - return texUnit->CurrentTex[TEXTURE_1D_INDEX]; + return ctx->Texture.Unit.CurrentTex[TEXTURE_1D_INDEX]; case GL_PROXY_TEXTURE_1D: return ctx->Texture.ProxyTex[TEXTURE_1D_INDEX]; case GL_TEXTURE_2D: - return texUnit->CurrentTex[TEXTURE_2D_INDEX]; + return ctx->Texture.Unit.CurrentTex[TEXTURE_2D_INDEX]; case GL_PROXY_TEXTURE_2D: return ctx->Texture.ProxyTex[TEXTURE_2D_INDEX]; case GL_TEXTURE_3D: - return texUnit->CurrentTex[TEXTURE_3D_INDEX]; + return ctx->Texture.Unit.CurrentTex[TEXTURE_3D_INDEX]; case GL_PROXY_TEXTURE_3D: return ctx->Texture.ProxyTex[TEXTURE_3D_INDEX]; - case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB: - case GL_TEXTURE_CUBE_MAP_ARB: - return ctx->Extensions.ARB_texture_cube_map - ? texUnit->CurrentTex[TEXTURE_CUBE_INDEX] : NULL; - case GL_PROXY_TEXTURE_CUBE_MAP_ARB: - return ctx->Extensions.ARB_texture_cube_map - ? ctx->Texture.ProxyTex[TEXTURE_CUBE_INDEX] : NULL; - case GL_TEXTURE_RECTANGLE_NV: - return ctx->Extensions.NV_texture_rectangle - ? texUnit->CurrentTex[TEXTURE_RECT_INDEX] : NULL; - case GL_PROXY_TEXTURE_RECTANGLE_NV: - return ctx->Extensions.NV_texture_rectangle - ? ctx->Texture.ProxyTex[TEXTURE_RECT_INDEX] : NULL; - case GL_TEXTURE_1D_ARRAY_EXT: - return arrayTex ? texUnit->CurrentTex[TEXTURE_1D_ARRAY_INDEX] : NULL; - case GL_PROXY_TEXTURE_1D_ARRAY_EXT: - return arrayTex ? ctx->Texture.ProxyTex[TEXTURE_1D_ARRAY_INDEX] : NULL; - case GL_TEXTURE_2D_ARRAY_EXT: - return arrayTex ? texUnit->CurrentTex[TEXTURE_2D_ARRAY_INDEX] : NULL; - case GL_PROXY_TEXTURE_2D_ARRAY_EXT: - return arrayTex ? ctx->Texture.ProxyTex[TEXTURE_2D_ARRAY_INDEX] : NULL; - case GL_TEXTURE_BUFFER: - return ctx->Extensions.ARB_texture_buffer_object - ? texUnit->CurrentTex[TEXTURE_BUFFER_INDEX] : NULL; - case GL_TEXTURE_EXTERNAL_OES: - return ctx->Extensions.OES_EGL_image_external - ? texUnit->CurrentTex[TEXTURE_EXTERNAL_INDEX] : NULL; default: _mesa_problem(NULL, "bad target in _mesa_select_tex_object()"); return NULL; @@ -777,17 +391,6 @@ _mesa_select_tex_object(struct gl_context *ctx, } -/** - * Return pointer to texture object for given target on current texture unit. - */ -struct gl_texture_object * -_mesa_get_current_tex_object(struct gl_context *ctx, GLenum target) -{ - struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx); - return _mesa_select_tex_object(ctx, texUnit, target); -} - - /** * Get a texture image pointer from a texture object, given a texture * target and mipmap level. The target and level parameters should @@ -880,21 +483,6 @@ _mesa_get_proxy_tex_image(struct gl_context *ctx, GLenum target, GLint level) return NULL; texIndex = TEXTURE_CUBE_INDEX; break; - case GL_PROXY_TEXTURE_RECTANGLE_NV: - if (level > 0) - return NULL; - texIndex = TEXTURE_RECT_INDEX; - break; - case GL_PROXY_TEXTURE_1D_ARRAY_EXT: - if (level >= ctx->Const.MaxTextureLevels) - return NULL; - texIndex = TEXTURE_1D_ARRAY_INDEX; - break; - case GL_PROXY_TEXTURE_2D_ARRAY_EXT: - if (level >= ctx->Const.MaxTextureLevels) - return NULL; - texIndex = TEXTURE_2D_ARRAY_INDEX; - break; default: return NULL; } @@ -946,19 +534,6 @@ _mesa_max_texture_levels(struct gl_context *ctx, GLenum target) case GL_PROXY_TEXTURE_CUBE_MAP_ARB: return ctx->Extensions.ARB_texture_cube_map ? ctx->Const.MaxCubeTextureLevels : 0; - case GL_TEXTURE_RECTANGLE_NV: - case GL_PROXY_TEXTURE_RECTANGLE_NV: - return ctx->Extensions.NV_texture_rectangle ? 1 : 0; - case GL_TEXTURE_1D_ARRAY_EXT: - case GL_PROXY_TEXTURE_1D_ARRAY_EXT: - case GL_TEXTURE_2D_ARRAY_EXT: - case GL_PROXY_TEXTURE_2D_ARRAY_EXT: - return (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array) - ? ctx->Const.MaxTextureLevels : 0; - case GL_TEXTURE_BUFFER: - case GL_TEXTURE_EXTERNAL_OES: - /* fall-through */ default: return 0; /* bad target */ } @@ -976,10 +551,8 @@ _mesa_get_texture_dimensions(GLenum target) case GL_PROXY_TEXTURE_1D: return 1; case GL_TEXTURE_2D: - case GL_TEXTURE_RECTANGLE: case GL_TEXTURE_CUBE_MAP: case GL_PROXY_TEXTURE_2D: - case GL_PROXY_TEXTURE_RECTANGLE: case GL_PROXY_TEXTURE_CUBE_MAP: case GL_TEXTURE_CUBE_MAP_POSITIVE_X: case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: @@ -987,17 +560,10 @@ _mesa_get_texture_dimensions(GLenum target) case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: - case GL_TEXTURE_1D_ARRAY: - case GL_PROXY_TEXTURE_1D_ARRAY: - case GL_TEXTURE_EXTERNAL_OES: return 2; case GL_TEXTURE_3D: case GL_PROXY_TEXTURE_3D: - case GL_TEXTURE_2D_ARRAY: - case GL_PROXY_TEXTURE_2D_ARRAY: return 3; - case GL_TEXTURE_BUFFER: - /* fall-through */ default: _mesa_problem(NULL, "invalid target 0x%x in get_texture_dimensions()", target); @@ -1128,7 +694,6 @@ _mesa_init_teximage_fields(struct gl_context *ctx, switch(target) { case GL_TEXTURE_1D: - case GL_TEXTURE_BUFFER: case GL_PROXY_TEXTURE_1D: if (height == 0) img->Height2 = 0; @@ -1141,18 +706,7 @@ _mesa_init_teximage_fields(struct gl_context *ctx, img->Depth2 = 1; img->DepthLog2 = 0; break; - case GL_TEXTURE_1D_ARRAY: - case GL_PROXY_TEXTURE_1D_ARRAY: - img->Height2 = height; /* no border */ - img->HeightLog2 = 0; /* not used */ - if (depth == 0) - img->Depth2 = 0; - else - img->Depth2 = 1; - img->DepthLog2 = 0; - break; case GL_TEXTURE_2D: - case GL_TEXTURE_RECTANGLE: case GL_TEXTURE_CUBE_MAP: case GL_TEXTURE_CUBE_MAP_POSITIVE_X: case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: @@ -1160,9 +714,7 @@ _mesa_init_teximage_fields(struct gl_context *ctx, case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: - case GL_TEXTURE_EXTERNAL_OES: case GL_PROXY_TEXTURE_2D: - case GL_PROXY_TEXTURE_RECTANGLE: case GL_PROXY_TEXTURE_CUBE_MAP: img->Height2 = height - 2 * border; /* == 1 << img->HeightLog2; */ img->HeightLog2 = _mesa_logbase2(img->Height2); @@ -1172,13 +724,6 @@ _mesa_init_teximage_fields(struct gl_context *ctx, img->Depth2 = 1; img->DepthLog2 = 0; break; - case GL_TEXTURE_2D_ARRAY: - case GL_PROXY_TEXTURE_2D_ARRAY: - img->Height2 = height - 2 * border; /* == 1 << img->HeightLog2; */ - img->HeightLog2 = _mesa_logbase2(img->Height2); - img->Depth2 = depth; /* no border */ - img->DepthLog2 = 0; /* not used */ - break; case GL_TEXTURE_3D: case GL_PROXY_TEXTURE_3D: img->Height2 = height - 2 * border; /* == 1 << img->HeightLog2; */ @@ -1298,16 +843,6 @@ _mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level, } return GL_TRUE; - case GL_PROXY_TEXTURE_RECTANGLE_NV: - maxSize = ctx->Const.MaxTextureRectSize; - if (width < 0 || width > maxSize) - return GL_FALSE; - if (height < 0 || height > maxSize) - return GL_FALSE; - if (level != 0) - return GL_FALSE; - return GL_TRUE; - case GL_PROXY_TEXTURE_CUBE_MAP_ARB: maxSize = 1 << (ctx->Const.MaxCubeTextureLevels - 1); if (width < 2 * border || width > 2 * border + maxSize) @@ -1324,38 +859,6 @@ _mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level, } return GL_TRUE; - case GL_PROXY_TEXTURE_1D_ARRAY_EXT: - maxSize = 1 << (ctx->Const.MaxTextureLevels - 1); - if (width < 2 * border || width > 2 * border + maxSize) - return GL_FALSE; - if (height < 1 || height > ctx->Const.MaxArrayTextureLayers) - return GL_FALSE; - if (level >= ctx->Const.MaxTextureLevels) - return GL_FALSE; - if (!ctx->Extensions.ARB_texture_non_power_of_two) { - if (width > 0 && !_mesa_is_pow_two(width - 2 * border)) - return GL_FALSE; - } - return GL_TRUE; - - case GL_PROXY_TEXTURE_2D_ARRAY_EXT: - maxSize = 1 << (ctx->Const.MaxTextureLevels - 1); - if (width < 2 * border || width > 2 * border + maxSize) - return GL_FALSE; - if (height < 2 * border || height > 2 * border + maxSize) - return GL_FALSE; - if (depth < 1 || depth > ctx->Const.MaxArrayTextureLayers) - return GL_FALSE; - if (level >= ctx->Const.MaxTextureLevels) - return GL_FALSE; - if (!ctx->Extensions.ARB_texture_non_power_of_two) { - if (width > 0 && !_mesa_is_pow_two(width - 2 * border)) - return GL_FALSE; - if (height > 0 && !_mesa_is_pow_two(height - 2 * border)) - return GL_FALSE; - } - return GL_TRUE; - default: _mesa_problem(ctx, "Invalid target in _mesa_test_proxy_teximage"); return GL_FALSE; @@ -1379,54 +882,6 @@ legal_texture_size(struct gl_context *ctx, gl_format format, return mbytes <= (uint64_t) ctx->Const.MaxTextureMbytes; } - -/** - * Return true if the format is only valid for glCompressedTexImage. - */ -static GLboolean -compressedteximage_only_format(const struct gl_context *ctx, GLenum format) -{ - switch (format) { - case GL_ETC1_RGB8_OES: - return GL_TRUE; - default: - return GL_FALSE; - } -} - - -/** - * Helper function to determine whether a target and specific compression - * format are supported. - */ -static GLboolean -target_can_be_compressed(const struct gl_context *ctx, GLenum target, - GLenum intFormat) -{ - (void) intFormat; /* not used yet */ - - switch (target) { - case GL_TEXTURE_2D: - case GL_PROXY_TEXTURE_2D: - return GL_TRUE; /* true for any compressed format so far */ - case GL_PROXY_TEXTURE_CUBE_MAP: - case GL_TEXTURE_CUBE_MAP_POSITIVE_X: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: - return ctx->Extensions.ARB_texture_cube_map; - case GL_PROXY_TEXTURE_2D_ARRAY_EXT: - case GL_TEXTURE_2D_ARRAY_EXT: - return (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); - default: - return GL_FALSE; - } -} - - /** * Check if the given texture target value is legal for a * glTexImage1/2/3D call. @@ -1456,13 +911,6 @@ legal_teximage_target(struct gl_context *ctx, GLuint dims, GLenum target) case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: return ctx->Extensions.ARB_texture_cube_map; - case GL_TEXTURE_RECTANGLE_NV: - case GL_PROXY_TEXTURE_RECTANGLE_NV: - return ctx->Extensions.NV_texture_rectangle; - case GL_TEXTURE_1D_ARRAY_EXT: - case GL_PROXY_TEXTURE_1D_ARRAY_EXT: - return (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); default: return GL_FALSE; } @@ -1471,10 +919,6 @@ legal_teximage_target(struct gl_context *ctx, GLuint dims, GLenum target) case GL_TEXTURE_3D: case GL_PROXY_TEXTURE_3D: return GL_TRUE; - case GL_TEXTURE_2D_ARRAY_EXT: - case GL_PROXY_TEXTURE_2D_ARRAY_EXT: - return (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); default: return GL_FALSE; } @@ -1508,11 +952,6 @@ legal_texsubimage_target(struct gl_context *ctx, GLuint dims, GLenum target) case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: return ctx->Extensions.ARB_texture_cube_map; - case GL_TEXTURE_RECTANGLE_NV: - return ctx->Extensions.NV_texture_rectangle; - case GL_TEXTURE_1D_ARRAY_EXT: - return (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); default: return GL_FALSE; } @@ -1520,9 +959,6 @@ legal_texsubimage_target(struct gl_context *ctx, GLuint dims, GLenum target) switch (target) { case GL_TEXTURE_3D: return GL_TRUE; - case GL_TEXTURE_2D_ARRAY_EXT: - return (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); default: return GL_FALSE; } @@ -1543,7 +979,7 @@ mutable_tex_object(struct gl_context *ctx, GLenum target) { if (ctx->Extensions.ARB_texture_storage) { struct gl_texture_object *texObj = - _mesa_get_current_tex_object(ctx, target); + _mesa_select_tex_object(ctx, target); return !texObj->Immutable; } return GL_TRUE; @@ -1602,9 +1038,7 @@ texture_error_check( struct gl_context *ctx, } /* Check border */ - if (border < 0 || border > 1 || - ((target == GL_TEXTURE_RECTANGLE_NV || - target == GL_PROXY_TEXTURE_RECTANGLE_NV) && border != 0)) { + if (border < 0 || border > 1) { if (!isProxy) { _mesa_error(ctx, GL_INVALID_VALUE, "glTexImage%dD(border=%d)", dimensions, border); @@ -1667,9 +1101,7 @@ texture_error_check( struct gl_context *ctx, colorFormat = _mesa_is_color_format(format); if ((_mesa_is_color_format(internalFormat) && !colorFormat && !indexFormat) || (_mesa_is_depth_format(internalFormat) != _mesa_is_depth_format(format)) || - (_mesa_is_ycbcr_format(internalFormat) != _mesa_is_ycbcr_format(format)) || - (_mesa_is_depthstencil_format(internalFormat) != _mesa_is_depthstencil_format(format)) || - (_mesa_is_dudv_format(internalFormat) != _mesa_is_dudv_format(format))) { + (_mesa_is_ycbcr_format(internalFormat) != _mesa_is_ycbcr_format(format))) { if (!isProxy) _mesa_error(ctx, GL_INVALID_OPERATION, "glTexImage%dD(incompatible internalFormat 0x%x, format 0x%x)", @@ -1689,9 +1121,7 @@ texture_error_check( struct gl_context *ctx, return GL_TRUE; /* error */ } if (target != GL_TEXTURE_2D && - target != GL_PROXY_TEXTURE_2D && - target != GL_TEXTURE_RECTANGLE_NV && - target != GL_PROXY_TEXTURE_RECTANGLE_NV) { + target != GL_PROXY_TEXTURE_2D) { if (!isProxy) _mesa_error(ctx, GL_INVALID_ENUM, "glTexImage(target)"); return GL_TRUE; @@ -1716,14 +1146,8 @@ texture_error_check( struct gl_context *ctx, target != GL_PROXY_TEXTURE_1D && target != GL_TEXTURE_2D && target != GL_PROXY_TEXTURE_2D && - target != GL_TEXTURE_1D_ARRAY && - target != GL_PROXY_TEXTURE_1D_ARRAY && - target != GL_TEXTURE_2D_ARRAY && - target != GL_PROXY_TEXTURE_2D_ARRAY && - target != GL_TEXTURE_RECTANGLE_ARB && - target != GL_PROXY_TEXTURE_RECTANGLE_ARB && !((_mesa_is_cube_face(target) || target == GL_PROXY_TEXTURE_CUBE_MAP) && - (ctx->VersionMajor >= 3 || ctx->Extensions.EXT_gpu_shader4))) { + (ctx->VersionMajor >= 3))) { if (!isProxy) _mesa_error(ctx, GL_INVALID_ENUM, "glTexImage(target/internalFormat)"); @@ -1731,29 +1155,6 @@ texture_error_check( struct gl_context *ctx, } } - /* additional checks for compressed textures */ - if (_mesa_is_compressed_format(ctx, internalFormat) || - is_generic_compressed_format(internalFormat)) { - if (!target_can_be_compressed(ctx, target, internalFormat)) { - if (!isProxy) - _mesa_error(ctx, GL_INVALID_ENUM, - "glTexImage%dD(target)", dimensions); - return GL_TRUE; - } - if (compressedteximage_only_format(ctx, internalFormat)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glTexImage%dD(no compression for format)", dimensions); - return GL_TRUE; - } - if (border != 0) { - if (!isProxy) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glTexImage%dD(border!=0)", dimensions); - } - return GL_TRUE; - } - } - /* additional checks for integer textures */ if ((ctx->VersionMajor >= 3 || ctx->Extensions.EXT_texture_integer) && (_mesa_is_integer_format(format) != @@ -1894,38 +1295,6 @@ subtexture_error_check2( struct gl_context *ctx, GLuint dimensions, } } - if (_mesa_is_format_compressed(destTex->TexFormat)) { - GLuint bw, bh; - - if (compressedteximage_only_format(ctx, destTex->InternalFormat)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glTexSubImage%dD(no compression for format)", dimensions); - return GL_TRUE; - } - - /* do tests which depend on compression block size */ - _mesa_get_format_block_size(destTex->TexFormat, &bw, &bh); - - /* offset must be multiple of block size */ - if ((xoffset % bw != 0) || (yoffset % bh != 0)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glTexSubImage%dD(xoffset = %d, yoffset = %d)", - dimensions, xoffset, yoffset); - return GL_TRUE; - } - /* size must be multiple of bw by bh or equal to whole texture size */ - if ((width % bw != 0) && (GLuint) width != destTex->Width) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glTexSubImage%dD(width = %d)", dimensions, width); - return GL_TRUE; - } - if ((height % bh != 0) && (GLuint) height != destTex->Height) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glTexSubImage%dD(height = %d)", dimensions, height); - return GL_TRUE; - } - } - if (ctx->VersionMajor >= 3 || ctx->Extensions.EXT_texture_integer) { /* both source and dest must be integer-valued, or neither */ if (_mesa_is_format_integer_color(destTex->TexFormat) != @@ -1983,29 +1352,8 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions, return GL_TRUE; } - /* Check that the source buffer is complete */ - if (ctx->ReadBuffer->Name) { - if (ctx->ReadBuffer->_Status == 0) { - _mesa_test_framebuffer_completeness(ctx, ctx->ReadBuffer); - } - if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, - "glCopyTexImage%dD(invalid readbuffer)", dimensions); - return GL_TRUE; - } - - if (ctx->ReadBuffer->Visual.samples > 0) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION, - "glCopyTexImage%dD(multisample FBO)", - dimensions); - return GL_TRUE; - } - } - /* Check border */ - if (border < 0 || border > 1 || - ((target == GL_TEXTURE_RECTANGLE_NV || - target == GL_PROXY_TEXTURE_RECTANGLE_NV) && border != 0)) { + if (border < 0 || border > 1) { return GL_TRUE; } @@ -2062,25 +1410,6 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions, return GL_TRUE; } - if (_mesa_is_compressed_format(ctx, internalFormat) || - is_generic_compressed_format(internalFormat)) { - if (!target_can_be_compressed(ctx, target, internalFormat)) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glCopyTexImage%dD(target)", dimensions); - return GL_TRUE; - } - if (compressedteximage_only_format(ctx, internalFormat)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCopyTexImage%dD(no compression for format)", dimensions); - return GL_TRUE; - } - if (border != 0) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCopyTexImage%dD(border!=0)", dimensions); - return GL_TRUE; - } - } - if (!mutable_tex_object(ctx, target)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glCopyTexImage%dD(immutable texture)", dimensions); @@ -2108,25 +1437,6 @@ static GLboolean copytexsubimage_error_check1( struct gl_context *ctx, GLuint dimensions, GLenum target, GLint level) { - /* Check that the source buffer is complete */ - if (ctx->ReadBuffer->Name) { - if (ctx->ReadBuffer->_Status == 0) { - _mesa_test_framebuffer_completeness(ctx, ctx->ReadBuffer); - } - if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, - "glCopyTexImage%dD(invalid readbuffer)", dimensions); - return GL_TRUE; - } - - if (ctx->ReadBuffer->Visual.samples > 0) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION, - "glCopyTexSubImage%dD(multisample FBO)", - dimensions); - return GL_TRUE; - } - } - /* check target (proxies not allowed) */ if (!legal_texsubimage_target(ctx, dimensions, target)) { _mesa_error(ctx, GL_INVALID_ENUM, "glCopyTexSubImage%uD(target=%s)", @@ -2219,31 +1529,6 @@ copytexsubimage_error_check2( struct gl_context *ctx, GLuint dimensions, } } - if (_mesa_is_format_compressed(teximage->TexFormat)) { - if (compressedteximage_only_format(ctx, teximage->InternalFormat)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCopyTexSubImage%dD(no compression for format)", dimensions); - return GL_TRUE; - } - /* offset must be multiple of 4 */ - if ((xoffset & 3) || (yoffset & 3)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(xoffset or yoffset)", dimensions); - return GL_TRUE; - } - /* size must be multiple of 4 */ - if ((width & 3) != 0 && (GLuint) width != teximage->Width) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(width)", dimensions); - return GL_TRUE; - } - if ((height & 3) != 0 && (GLuint) height != teximage->Height) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(height)", dimensions); - return GL_TRUE; - } - } - if (teximage->InternalFormat == GL_YCBCR_MESA) { _mesa_error(ctx, GL_INVALID_OPERATION, "glCopyTexSubImage2D"); return GL_TRUE; @@ -2287,82 +1572,6 @@ struct cb_info GLuint level, face; }; - -/** - * Check render to texture callback. Called from _mesa_HashWalk(). - */ -static void -check_rtt_cb(GLuint key, void *data, void *userData) -{ - struct gl_framebuffer *fb = (struct gl_framebuffer *) data; - const struct cb_info *info = (struct cb_info *) userData; - struct gl_context *ctx = info->ctx; - const struct gl_texture_object *texObj = info->texObj; - const GLuint level = info->level, face = info->face; - - /* If this is a user-created FBO */ - if (fb->Name) { - GLuint i; - /* check if any of the FBO's attachments point to 'texObj' */ - for (i = 0; i < BUFFER_COUNT; i++) { - struct gl_renderbuffer_attachment *att = fb->Attachment + i; - if (att->Type == GL_TEXTURE && - att->Texture == texObj && - att->TextureLevel == level && - att->CubeMapFace == face) { - ASSERT(_mesa_get_attachment_teximage(att)); - /* Tell driver about the new renderbuffer texture */ - ctx->Driver.RenderTexture(ctx, ctx->DrawBuffer, att); - /* Mark fb status as indeterminate to force re-validation */ - fb->_Status = 0; - } - } - } -} - - -/** - * When a texture image is specified we have to check if it's bound to - * any framebuffer objects (render to texture) in order to detect changes - * in size or format since that effects FBO completeness. - * Any FBOs rendering into the texture must be re-validated. - */ -void -_mesa_update_fbo_texture(struct gl_context *ctx, - struct gl_texture_object *texObj, - GLuint face, GLuint level) -{ - /* Only check this texture if it's been marked as RenderToTexture */ - if (texObj->_RenderToTexture) { - struct cb_info info; - info.ctx = ctx; - info.texObj = texObj; - info.level = level; - info.face = face; - _mesa_HashWalk(ctx->Shared->FrameBuffers, check_rtt_cb, &info); - } -} - - -/** - * If the texture object's GenerateMipmap flag is set and we've - * changed the texture base level image, regenerate the rest of the - * mipmap levels now. - */ -static inline void -check_gen_mipmap(struct gl_context *ctx, GLenum target, - struct gl_texture_object *texObj, GLint level) -{ - ASSERT(target != GL_TEXTURE_CUBE_MAP); - if (texObj->GenerateMipmap && - level == texObj->BaseLevel && - level < texObj->MaxLevel) { - ASSERT(ctx->Driver.GenerateMipmap); - ctx->Driver.GenerateMipmap(ctx, target, texObj); - } -} - - /** Debug helper: override the user-requested internal format */ static GLenum override_internal_format(GLenum internalFormat, GLint width, GLint height) @@ -2393,11 +1602,6 @@ override_internal_format(GLenum internalFormat, GLint width, GLint height) printf("Convert luminance float tex to int %d x %d\n", width, height); return GL_ALPHA; } - /* - else if (internalFormat == GL_COMPRESSED_RGBA_S3TC_DXT1_EXT) { - internalFormat = GL_RGBA; - } - */ else { return internalFormat; } @@ -2536,7 +1740,7 @@ teximage(struct gl_context *ctx, GLuint dims, else { /* no error, set the tex image parameters */ struct gl_texture_object *texObj = - _mesa_get_current_tex_object(ctx, target); + _mesa_select_tex_object(ctx, target); gl_format texFormat = _mesa_choose_texture_format(ctx, texObj, target, level, internalFormat, @@ -2554,7 +1758,6 @@ teximage(struct gl_context *ctx, GLuint dims, } else { /* non-proxy target */ - const GLuint face = _mesa_tex_target_to_face(target); struct gl_texture_object *texObj; struct gl_texture_image *texImage; @@ -2575,7 +1778,7 @@ teximage(struct gl_context *ctx, GLuint dims, if (ctx->NewState & _NEW_PIXEL) _mesa_update_state(ctx); - texObj = _mesa_get_current_tex_object(ctx, target); + texObj = _mesa_select_tex_object(ctx, target); _mesa_lock_texture(ctx, texObj); { @@ -2620,10 +1823,6 @@ teximage(struct gl_context *ctx, GLuint dims, _mesa_problem(ctx, "invalid dims=%u in teximage()", dims); } - check_gen_mipmap(ctx, target, texObj, level); - - _mesa_update_fbo_texture(ctx, texObj, face, level); - /* state update */ texObj->_Complete = GL_FALSE; ctx->NewState |= _NEW_TEXTURE; @@ -2691,50 +1890,6 @@ _mesa_TexImage3DEXT( GLenum target, GLint level, GLenum internalFormat, } -#if FEATURE_OES_EGL_image -void GLAPIENTRY -_mesa_EGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image) -{ - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if ((target == GL_TEXTURE_2D && - !ctx->Extensions.OES_EGL_image) || - (target == GL_TEXTURE_EXTERNAL_OES && - !ctx->Extensions.OES_EGL_image_external)) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glEGLImageTargetTexture2D(target=%d)", target); - return; - } - - if (ctx->NewState & _NEW_PIXEL) - _mesa_update_state(ctx); - - texObj = _mesa_get_current_tex_object(ctx, target); - _mesa_lock_texture(ctx, texObj); - - texImage = _mesa_get_tex_image(ctx, texObj, target, 0); - if (!texImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glEGLImageTargetTexture2D"); - } else { - ctx->Driver.FreeTextureImageBuffer(ctx, texImage); - - ctx->Driver.EGLImageTargetTexture2D(ctx, target, - texObj, texImage, image); - - /* state update */ - texObj->_Complete = GL_FALSE; - ctx->NewState |= _NEW_TEXTURE; - } - _mesa_unlock_texture(ctx, texObj); - -} -#endif - - - /** * Implement all the glTexSubImage1/2/3D() functions. */ @@ -2772,7 +1927,7 @@ texsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level, return; /* error was detected */ } - texObj = _mesa_get_current_tex_object(ctx, target); + texObj = _mesa_select_tex_object(ctx, target); _mesa_lock_texture(ctx, texObj); { @@ -2818,8 +1973,6 @@ texsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level, _mesa_problem(ctx, "unexpected dims in subteximage()"); } - check_gen_mipmap(ctx, target, texObj, level); - ctx->NewState |= _NEW_TEXTURE; } } @@ -2902,7 +2055,6 @@ copyteximage(struct gl_context *ctx, GLuint dims, { struct gl_texture_object *texObj; struct gl_texture_image *texImage; - const GLuint face = _mesa_tex_target_to_face(target); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); @@ -2920,7 +2072,7 @@ copyteximage(struct gl_context *ctx, GLuint dims, width, height, border)) return; - texObj = _mesa_get_current_tex_object(ctx, target); + texObj = _mesa_select_tex_object(ctx, target); if (border && ctx->Const.StripTextureBorder) { x += border; @@ -2981,10 +2133,6 @@ copyteximage(struct gl_context *ctx, GLuint dims, srcRb, srcX, srcY, width, height); } - check_gen_mipmap(ctx, target, texObj, level); - - _mesa_update_fbo_texture(ctx, texObj, face, level); - /* state update */ texObj->_Complete = GL_FALSE; ctx->NewState |= _NEW_TEXTURE; @@ -3049,7 +2197,7 @@ copytexsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level, if (copytexsubimage_error_check1(ctx, dims, target, level)) return; - texObj = _mesa_get_current_tex_object(ctx, target); + texObj = _mesa_select_tex_object(ctx, target); _mesa_lock_texture(ctx, texObj); { @@ -3095,8 +2243,6 @@ copytexsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level, _mesa_problem(ctx, "bad dims in copytexsubimage()"); } - check_gen_mipmap(ctx, target, texObj, level); - ctx->NewState |= _NEW_TEXTURE; } } @@ -3136,906 +2282,3 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level, copytexsubimage(ctx, 3, target, level, xoffset, yoffset, zoffset, x, y, width, height); } - - - - -/**********************************************************************/ -/****** Compressed Textures ******/ -/**********************************************************************/ - - -/** - * Return expected size of a compressed texture. - */ -static GLuint -compressed_tex_size(GLsizei width, GLsizei height, GLsizei depth, - GLenum glformat) -{ - gl_format mesaFormat = _mesa_glenum_to_compressed_format(glformat); - return _mesa_format_image_size(mesaFormat, width, height, depth); -} - - -/* - * Return compressed texture block size, in pixels. - */ -static void -get_compressed_block_size(GLenum glformat, GLuint *bw, GLuint *bh) -{ - gl_format mesaFormat = _mesa_glenum_to_compressed_format(glformat); - _mesa_get_format_block_size(mesaFormat, bw, bh); -} - - -/** - * Error checking for glCompressedTexImage[123]D(). - * \param reason returns reason for error, if any - * \return error code or GL_NO_ERROR. - */ -static GLenum -compressed_texture_error_check(struct gl_context *ctx, GLint dimensions, - GLenum target, GLint level, - GLenum internalFormat, GLsizei width, - GLsizei height, GLsizei depth, GLint border, - GLsizei imageSize, char **reason) -{ - const GLenum proxyTarget = get_proxy_target(target); - const GLint maxLevels = _mesa_max_texture_levels(ctx, target); - GLint expectedSize; - GLenum choose_format; - GLenum choose_type; - GLenum proxy_format; - - *reason = ""; /* no error */ - - if (!target_can_be_compressed(ctx, target, internalFormat)) { - *reason = "target"; - return GL_INVALID_ENUM; - } - - /* This will detect any invalid internalFormat value */ - if (!_mesa_is_compressed_format(ctx, internalFormat)) { - *reason = "internalFormat"; - return GL_INVALID_ENUM; - } - - switch (internalFormat) { -#if FEATURE_ES - case GL_PALETTE4_RGB8_OES: - case GL_PALETTE4_RGBA8_OES: - case GL_PALETTE4_R5_G6_B5_OES: - case GL_PALETTE4_RGBA4_OES: - case GL_PALETTE4_RGB5_A1_OES: - case GL_PALETTE8_RGB8_OES: - case GL_PALETTE8_RGBA8_OES: - case GL_PALETTE8_R5_G6_B5_OES: - case GL_PALETTE8_RGBA4_OES: - case GL_PALETTE8_RGB5_A1_OES: - _mesa_cpal_compressed_format_type(internalFormat, &choose_format, - &choose_type); - proxy_format = choose_format; - - /* check level */ - if (level > 0 || level < -maxLevels) { - *reason = "level"; - return GL_INVALID_VALUE; - } - - if (dimensions != 2) { - *reason = "compressed paletted textures must be 2D"; - return GL_INVALID_OPERATION; - } - - /* Figure out the expected texture size (in bytes). This will be - * checked against the actual size later. - */ - expectedSize = _mesa_cpal_compressed_size(level, internalFormat, - width, height); - - /* This is for the benefit of the TestProxyTexImage below. It expects - * level to be non-negative. OES_compressed_paletted_texture uses a - * weird mechanism where the level specified to glCompressedTexImage2D - * is -(n-1) number of levels in the texture, and the data specifies the - * complete mipmap stack. This is done to ensure the palette is the - * same for all levels. - */ - level = -level; - break; -#endif - - default: - choose_format = GL_NONE; - choose_type = GL_NONE; - proxy_format = internalFormat; - - /* check level */ - if (level < 0 || level >= maxLevels) { - *reason = "level"; - return GL_INVALID_VALUE; - } - - /* Figure out the expected texture size (in bytes). This will be - * checked against the actual size later. - */ - expectedSize = compressed_tex_size(width, height, depth, internalFormat); - break; - } - - /* This should really never fail */ - if (_mesa_base_tex_format(ctx, internalFormat) < 0) { - *reason = "internalFormat"; - return GL_INVALID_ENUM; - } - - /* No compressed formats support borders at this time */ - if (border != 0) { - *reason = "border != 0"; - return GL_INVALID_VALUE; - } - - /* For cube map, width must equal height */ - if (_mesa_is_cube_face(target) && width != height) { - *reason = "width != height"; - return GL_INVALID_VALUE; - } - - /* check image size against compression block size */ - { - gl_format texFormat = - ctx->Driver.ChooseTextureFormat(ctx, proxy_format, - choose_format, choose_type); - GLuint bw, bh; - - _mesa_get_format_block_size(texFormat, &bw, &bh); - if ((width > bw && width % bw > 0) || - (height > bh && height % bh > 0)) { - /* - * Per GL_ARB_texture_compression: GL_INVALID_OPERATION is - * generated [...] if any parameter combinations are not - * supported by the specific compressed internal format. - */ - *reason = "invalid width or height for compression format"; - return GL_INVALID_OPERATION; - } - } - - /* check image sizes */ - if (!ctx->Driver.TestProxyTexImage(ctx, proxyTarget, level, - proxy_format, choose_format, - choose_type, - width, height, depth, border)) { - /* See error comment above */ - *reason = "invalid width, height or format"; - return GL_INVALID_OPERATION; - } - - /* check image size in bytes */ - if (expectedSize != imageSize) { - /* Per GL_ARB_texture_compression: GL_INVALID_VALUE is generated [...] - * if is not consistent with the format, dimensions, and - * contents of the specified image. - */ - *reason = "imageSize inconsistant with width/height/format"; - return GL_INVALID_VALUE; - } - - if (!mutable_tex_object(ctx, target)) { - *reason = "immutable texture"; - return GL_INVALID_OPERATION; - } - - return GL_NO_ERROR; -} - - -/** - * Error checking for glCompressedTexSubImage[123]D(). - * \warning There are some bad assumptions here about the size of compressed - * texture tiles (multiple of 4) used to test the validity of the - * offset and size parameters. - * \return error code or GL_NO_ERROR. - */ -static GLenum -compressed_subtexture_error_check(struct gl_context *ctx, GLint dimensions, - GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLsizei imageSize) -{ - GLint expectedSize, maxLevels = 0, maxTextureSize; - GLuint bw, bh; - (void) zoffset; - - if (dimensions == 1) { - /* 1D compressed textures not allowed */ - return GL_INVALID_ENUM; - } - else if (dimensions == 2) { - if (target == GL_PROXY_TEXTURE_2D) { - maxLevels = ctx->Const.MaxTextureLevels; - } - else if (target == GL_TEXTURE_2D) { - maxLevels = ctx->Const.MaxTextureLevels; - } - else if (target == GL_PROXY_TEXTURE_CUBE_MAP_ARB) { - if (!ctx->Extensions.ARB_texture_cube_map) - return GL_INVALID_ENUM; /*target*/ - maxLevels = ctx->Const.MaxCubeTextureLevels; - } - else if (_mesa_is_cube_face(target)) { - if (!ctx->Extensions.ARB_texture_cube_map) - return GL_INVALID_ENUM; /*target*/ - maxLevels = ctx->Const.MaxCubeTextureLevels; - } - else { - return GL_INVALID_ENUM; /*target*/ - } - } - else if (dimensions == 3) { - /* 3D compressed textures not allowed */ - return GL_INVALID_ENUM; - } - - maxTextureSize = 1 << (maxLevels - 1); - - /* this will catch any invalid compressed format token */ - if (!_mesa_is_compressed_format(ctx, format)) - return GL_INVALID_ENUM; - - if (width < 1 || width > maxTextureSize) - return GL_INVALID_VALUE; - - if ((height < 1 || height > maxTextureSize) - && dimensions > 1) - return GL_INVALID_VALUE; - - if (level < 0 || level >= maxLevels) - return GL_INVALID_VALUE; - - /* - * do checks which depend on compression block size - */ - get_compressed_block_size(format, &bw, &bh); - - if ((xoffset % bw != 0) || (yoffset % bh != 0)) - return GL_INVALID_VALUE; - - if ((width % bw != 0) && width != 2 && width != 1) - return GL_INVALID_VALUE; - - if ((height % bh != 0) && height != 2 && height != 1) - return GL_INVALID_VALUE; - - expectedSize = compressed_tex_size(width, height, depth, format); - if (expectedSize != imageSize) - return GL_INVALID_VALUE; - - return GL_NO_ERROR; -} - - -/** - * Do second part of glCompressedTexSubImage error checking. - * \return GL_TRUE if error found, GL_FALSE otherwise. - */ -static GLboolean -compressed_subtexture_error_check2(struct gl_context *ctx, GLuint dims, - GLsizei width, GLsizei height, - GLsizei depth, GLenum format, - struct gl_texture_image *texImage) -{ - - if ((GLint) format != texImage->InternalFormat) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCompressedTexSubImage%uD(format=0x%x)", dims, format); - return GL_TRUE; - } - - if (compressedteximage_only_format(ctx, format)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCompressedTexSubImage%uD(format=0x%x cannot be updated)" - , dims, format); - return GL_TRUE; - } - - if (((width == 1 || width == 2) && - width != (GLsizei) texImage->Width) || - (width > (GLsizei) texImage->Width)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCompressedTexSubImage%uD(width=%d)", dims, width); - return GL_TRUE; - } - - if (dims >= 2) { - if (((height == 1 || height == 2) && - height != (GLsizei) texImage->Height) || - (height > (GLsizei) texImage->Height)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCompressedTexSubImage%uD(height=%d)", dims, height); - return GL_TRUE; - } - } - - if (dims >= 3) { - if (((depth == 1 || depth == 2) && - depth != (GLsizei) texImage->Depth) || - (depth > (GLsizei) texImage->Depth)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCompressedTexSubImage%uD(depth=%d)", dims, depth); - return GL_TRUE; - } - } - - return GL_FALSE; -} - - -/** - * Implementation of the glCompressedTexImage1/2/3D() functions. - */ -static void -compressedteximage(struct gl_context *ctx, GLuint dims, - GLenum target, GLint level, - GLenum internalFormat, GLsizei width, - GLsizei height, GLsizei depth, GLint border, - GLsizei imageSize, const GLvoid *data) -{ - GLenum error; - char *reason = ""; - - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, - "glCompressedTexImage%uDARB %s %d %s %d %d %d %d %d %p\n", - dims, - _mesa_lookup_enum_by_nr(target), level, - _mesa_lookup_enum_by_nr(internalFormat), - width, height, depth, border, imageSize, data); - - /* check target */ - if (!legal_teximage_target(ctx, dims, target)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glCompressedTexImage%uD(target=%s)", - dims, _mesa_lookup_enum_by_nr(target)); - return; - } - - error = compressed_texture_error_check(ctx, dims, target, level, - internalFormat, width, height, depth, - border, imageSize, &reason); - -#if FEATURE_ES - /* XXX this is kind of a hack */ - if (!error && dims == 2) { - switch (internalFormat) { - case GL_PALETTE4_RGB8_OES: - case GL_PALETTE4_RGBA8_OES: - case GL_PALETTE4_R5_G6_B5_OES: - case GL_PALETTE4_RGBA4_OES: - case GL_PALETTE4_RGB5_A1_OES: - case GL_PALETTE8_RGB8_OES: - case GL_PALETTE8_RGBA8_OES: - case GL_PALETTE8_R5_G6_B5_OES: - case GL_PALETTE8_RGBA4_OES: - case GL_PALETTE8_RGB5_A1_OES: - _mesa_cpal_compressed_teximage2d(target, level, internalFormat, - width, height, imageSize, data); - return; - } - } -#endif - - if (_mesa_is_proxy_texture(target)) { - /* Proxy texture: just check for errors and update proxy state */ - struct gl_texture_image *texImage; - - if (!error) { - struct gl_texture_object *texObj = - _mesa_get_current_tex_object(ctx, target); - gl_format texFormat = - _mesa_choose_texture_format(ctx, texObj, target, level, - internalFormat, GL_NONE, GL_NONE); - if (!legal_texture_size(ctx, texFormat, width, height, depth)) { - error = GL_OUT_OF_MEMORY; - } - } - - texImage = _mesa_get_proxy_tex_image(ctx, target, level); - if (texImage) { - if (error) { - /* if error, clear all proxy texture image parameters */ - clear_teximage_fields(texImage); - } - else { - /* no error: store the teximage parameters */ - _mesa_init_teximage_fields(ctx, texImage, width, height, - depth, border, internalFormat, - MESA_FORMAT_NONE); - } - } - } - else { - /* non-proxy target */ - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - - if (error) { - _mesa_error(ctx, error, "glCompressedTexImage%uD(%s)", dims, reason); - return; - } - - texObj = _mesa_get_current_tex_object(ctx, target); - - _mesa_lock_texture(ctx, texObj); - { - texImage = _mesa_get_tex_image(ctx, texObj, target, level); - if (!texImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, - "glCompressedTexImage%uD", dims); - } - else { - gl_format texFormat; - - ctx->Driver.FreeTextureImageBuffer(ctx, texImage); - - texFormat = _mesa_choose_texture_format(ctx, texObj, target, level, - internalFormat, GL_NONE, - GL_NONE); - - if (legal_texture_size(ctx, texFormat, width, height, depth)) { - _mesa_init_teximage_fields(ctx, texImage, - width, height, depth, - border, internalFormat, texFormat); - - switch (dims) { - case 1: - ASSERT(ctx->Driver.CompressedTexImage1D); - ctx->Driver.CompressedTexImage1D(ctx, texImage, - internalFormat, - width, - border, imageSize, data); - break; - case 2: - ASSERT(ctx->Driver.CompressedTexImage2D); - ctx->Driver.CompressedTexImage2D(ctx, texImage, - internalFormat, - width, height, - border, imageSize, data); - break; - case 3: - ASSERT(ctx->Driver.CompressedTexImage3D); - ctx->Driver.CompressedTexImage3D(ctx, texImage, - internalFormat, - width, height, depth, - border, imageSize, data); - break; - default: - _mesa_problem(ctx, "bad dims in compressedteximage"); - } - - check_gen_mipmap(ctx, target, texObj, level); - - /* state update */ - texObj->_Complete = GL_FALSE; - ctx->NewState |= _NEW_TEXTURE; - } - else { - _mesa_error(ctx, GL_OUT_OF_MEMORY, - "glCompressedTexImage%uD", dims); - } - } - } - _mesa_unlock_texture(ctx, texObj); - } -} - - -void GLAPIENTRY -_mesa_CompressedTexImage1DARB(GLenum target, GLint level, - GLenum internalFormat, GLsizei width, - GLint border, GLsizei imageSize, - const GLvoid *data) -{ - GET_CURRENT_CONTEXT(ctx); - compressedteximage(ctx, 1, target, level, internalFormat, - width, 1, 1, border, imageSize, data); -} - - -void GLAPIENTRY -_mesa_CompressedTexImage2DARB(GLenum target, GLint level, - GLenum internalFormat, GLsizei width, - GLsizei height, GLint border, GLsizei imageSize, - const GLvoid *data) -{ - GET_CURRENT_CONTEXT(ctx); - compressedteximage(ctx, 2, target, level, internalFormat, - width, height, 1, border, imageSize, data); -} - - -void GLAPIENTRY -_mesa_CompressedTexImage3DARB(GLenum target, GLint level, - GLenum internalFormat, GLsizei width, - GLsizei height, GLsizei depth, GLint border, - GLsizei imageSize, const GLvoid *data) -{ - GET_CURRENT_CONTEXT(ctx); - compressedteximage(ctx, 3, target, level, internalFormat, - width, height, depth, border, imageSize, data); -} - - -/** - * Common helper for glCompressedTexSubImage1/2/3D(). - */ -static void -compressed_tex_sub_image(GLuint dims, GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLsizei imageSize, const GLvoid *data) -{ - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - GLenum error; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - error = compressed_subtexture_error_check(ctx, dims, target, level, - xoffset, 0, 0, /* pos */ - width, height, depth, /* size */ - format, imageSize); - if (error) { - _mesa_error(ctx, error, "glCompressedTexSubImage%uD", dims); - return; - } - - texObj = _mesa_get_current_tex_object(ctx, target); - - _mesa_lock_texture(ctx, texObj); - { - texImage = _mesa_select_tex_image(ctx, texObj, target, level); - assert(texImage); - - if (compressed_subtexture_error_check2(ctx, dims, width, height, depth, - format, texImage)) { - /* error was recorded */ - } - else if (width > 0 && height > 0 && depth > 0) { - switch (dims) { - case 1: - if (ctx->Driver.CompressedTexSubImage1D) { - ctx->Driver.CompressedTexSubImage1D(ctx, texImage, - xoffset, width, - format, imageSize, data); - } - break; - case 2: - if (ctx->Driver.CompressedTexSubImage2D) { - ctx->Driver.CompressedTexSubImage2D(ctx, texImage, - xoffset, yoffset, - width, height, - format, imageSize, data); - } - break; - case 3: - if (ctx->Driver.CompressedTexSubImage3D) { - ctx->Driver.CompressedTexSubImage3D(ctx, texImage, - xoffset, yoffset, zoffset, - width, height, depth, - format, imageSize, data); - } - break; - default: - ; - } - - check_gen_mipmap(ctx, target, texObj, level); - - ctx->NewState |= _NEW_TEXTURE; - } - } - _mesa_unlock_texture(ctx, texObj); -} - - -void GLAPIENTRY -_mesa_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset, - GLsizei width, GLenum format, - GLsizei imageSize, const GLvoid *data) -{ - compressed_tex_sub_image(1, target, level, xoffset, 0, 0, width, 1, 1, - format, imageSize, data); -} - - -void GLAPIENTRY -_mesa_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, - GLenum format, GLsizei imageSize, - const GLvoid *data) -{ - compressed_tex_sub_image(2, target, level, xoffset, yoffset, 0, - width, height, 1, format, imageSize, data); -} - - -void GLAPIENTRY -_mesa_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, GLenum format, - GLsizei imageSize, const GLvoid *data) -{ - compressed_tex_sub_image(3, target, level, xoffset, yoffset, zoffset, - width, height, depth, format, imageSize, data); -} - - -/** - * Helper for glTexBuffer(). Check if internalFormat is legal. If so, - * return the basic data type and number of components for the format. - * \param return GL_TRUE if internalFormat is legal, GL_FALSE otherwise - */ -static GLboolean -get_sized_format_info(const struct gl_context *ctx, GLenum internalFormat, - GLenum *datatype, GLuint *components) -{ - switch (internalFormat) { - case GL_ALPHA8: - *datatype = GL_UNSIGNED_BYTE; - *components = 1; - break; - case GL_ALPHA16: - *datatype = GL_UNSIGNED_SHORT; - *components = 1; - break; - case GL_ALPHA16F_ARB: - *datatype = GL_HALF_FLOAT; - *components = 1; - break; - case GL_ALPHA32F_ARB: - *datatype = GL_FLOAT; - *components = 1; - break; - case GL_ALPHA8I_EXT: - *datatype = GL_BYTE; - *components = 1; - break; - case GL_ALPHA16I_EXT: - *datatype = GL_SHORT; - *components = 1; - break; - case GL_ALPHA32I_EXT: - *datatype = GL_INT; - *components = 1; - break; - case GL_ALPHA8UI_EXT: - *datatype = GL_UNSIGNED_BYTE; - *components = 1; - break; - case GL_ALPHA16UI_EXT: - *datatype = GL_UNSIGNED_SHORT; - *components = 1; - break; - case GL_ALPHA32UI_EXT: - *datatype = GL_UNSIGNED_INT; - *components = 1; - break; - case GL_LUMINANCE8: - *datatype = GL_UNSIGNED_BYTE; - *components = 1; - break; - case GL_LUMINANCE16: - *datatype = GL_UNSIGNED_SHORT; - *components = 1; - break; - case GL_LUMINANCE16F_ARB: - *datatype = GL_HALF_FLOAT; - *components = 1; - break; - case GL_LUMINANCE32F_ARB: - *datatype = GL_FLOAT; - *components = 1; - break; - case GL_LUMINANCE8I_EXT: - *datatype = GL_BYTE; - *components = 1; - break; - case GL_LUMINANCE16I_EXT: - *datatype = GL_SHORT; - *components = 1; - break; - case GL_LUMINANCE32I_EXT: - *datatype = GL_INT; - *components = 1; - break; - case GL_LUMINANCE8UI_EXT: - *datatype = GL_UNSIGNED_BYTE; - *components = 1; - break; - case GL_LUMINANCE16UI_EXT: - *datatype = GL_UNSIGNED_SHORT; - *components = 1; - break; - case GL_LUMINANCE32UI_EXT: - *datatype = GL_UNSIGNED_INT; - *components = 1; - break; - case GL_LUMINANCE8_ALPHA8: - *datatype = GL_UNSIGNED_BYTE; - *components = 2; - break; - case GL_LUMINANCE16_ALPHA16: - *datatype = GL_UNSIGNED_SHORT; - *components = 2; - break; - case GL_LUMINANCE_ALPHA16F_ARB: - *datatype = GL_HALF_FLOAT; - *components = 2; - break; - case GL_LUMINANCE_ALPHA32F_ARB: - *datatype = GL_FLOAT; - *components = 2; - break; - case GL_LUMINANCE_ALPHA8I_EXT: - *datatype = GL_BYTE; - *components = 2; - break; - case GL_LUMINANCE_ALPHA16I_EXT: - *datatype = GL_SHORT; - *components = 2; - break; - case GL_LUMINANCE_ALPHA32I_EXT: - *datatype = GL_INT; - *components = 2; - break; - case GL_LUMINANCE_ALPHA8UI_EXT: - *datatype = GL_UNSIGNED_BYTE; - *components = 2; - break; - case GL_LUMINANCE_ALPHA16UI_EXT: - *datatype = GL_UNSIGNED_SHORT; - *components = 2; - break; - case GL_LUMINANCE_ALPHA32UI_EXT: - *datatype = GL_UNSIGNED_INT; - *components = 2; - break; - case GL_INTENSITY8: - *datatype = GL_UNSIGNED_BYTE; - *components = 1; - break; - case GL_INTENSITY16: - *datatype = GL_UNSIGNED_SHORT; - *components = 1; - break; - case GL_INTENSITY16F_ARB: - *datatype = GL_HALF_FLOAT; - *components = 1; - break; - case GL_INTENSITY32F_ARB: - *datatype = GL_FLOAT; - *components = 1; - break; - case GL_INTENSITY8I_EXT: - *datatype = GL_BYTE; - *components = 1; - break; - case GL_INTENSITY16I_EXT: - *datatype = GL_SHORT; - *components = 1; - break; - case GL_INTENSITY32I_EXT: - *datatype = GL_INT; - *components = 1; - break; - case GL_INTENSITY8UI_EXT: - *datatype = GL_UNSIGNED_BYTE; - *components = 1; - break; - case GL_INTENSITY16UI_EXT: - *datatype = GL_UNSIGNED_SHORT; - *components = 1; - break; - case GL_INTENSITY32UI_EXT: - *datatype = GL_UNSIGNED_INT; - *components = 1; - break; - case GL_RGBA8: - *datatype = GL_UNSIGNED_BYTE; - *components = 4; - break; - case GL_RGBA16: - *datatype = GL_UNSIGNED_SHORT; - *components = 4; - break; - case GL_RGBA16F_ARB: - *datatype = GL_HALF_FLOAT; - *components = 4; - break; - case GL_RGBA32F_ARB: - *datatype = GL_FLOAT; - *components = 4; - break; - case GL_RGBA8I_EXT: - *datatype = GL_BYTE; - *components = 4; - break; - case GL_RGBA16I_EXT: - *datatype = GL_SHORT; - *components = 4; - break; - case GL_RGBA32I_EXT: - *datatype = GL_INT; - *components = 4; - break; - case GL_RGBA8UI_EXT: - *datatype = GL_UNSIGNED_BYTE; - *components = 4; - break; - case GL_RGBA16UI_EXT: - *datatype = GL_UNSIGNED_SHORT; - *components = 4; - break; - case GL_RGBA32UI_EXT: - *datatype = GL_UNSIGNED_INT; - *components = 4; - break; - default: - return GL_FALSE; - } - - if (*datatype == GL_FLOAT && !ctx->Extensions.ARB_texture_float) - return GL_FALSE; - - if (*datatype == GL_HALF_FLOAT && !ctx->Extensions.ARB_half_float_pixel) - return GL_FALSE; - - return GL_TRUE; -} - - -/** GL_ARB_texture_buffer_object */ -void GLAPIENTRY -_mesa_TexBuffer(GLenum target, GLenum internalFormat, GLuint buffer) -{ - struct gl_texture_object *texObj; - struct gl_buffer_object *bufObj; - GLenum dataType; - GLuint comps; - - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (!ctx->Extensions.ARB_texture_buffer_object) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glTexBuffer"); - return; - } - - if (target != GL_TEXTURE_BUFFER_ARB) { - _mesa_error(ctx, GL_INVALID_ENUM, "glTexBuffer(target)"); - return; - } - - if (!get_sized_format_info(ctx, internalFormat, &dataType, &comps)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glTexBuffer(internalFormat 0x%x)", - internalFormat); - return; - } - - bufObj = _mesa_lookup_bufferobj(ctx, buffer); - if (buffer && !bufObj) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glTexBuffer(buffer %u)", buffer); - return; - } - - texObj = _mesa_get_current_tex_object(ctx, target); - - _mesa_lock_texture(ctx, texObj); - { - _mesa_reference_buffer_object(ctx, &texObj->BufferObject, bufObj); - texObj->BufferObjectFormat = internalFormat; - } - _mesa_unlock_texture(ctx, texObj); -} diff --git a/dll/opengl/mesa/src/mesa/main/teximage.h b/dll/opengl/mesa/main/teximage.h similarity index 74% rename from dll/opengl/mesa/src/mesa/main/teximage.h rename to dll/opengl/mesa/main/teximage.h index e2bdaca0150..776e3b80478 100644 --- a/dll/opengl/mesa/src/mesa/main/teximage.h +++ b/dll/opengl/mesa/main/teximage.h @@ -87,11 +87,6 @@ _mesa_choose_texture_format(struct gl_context *ctx, GLenum target, GLint level, GLenum internalFormat, GLenum format, GLenum type); -extern void -_mesa_update_fbo_texture(struct gl_context *ctx, - struct gl_texture_object *texObj, - GLuint face, GLuint level); - extern void _mesa_clear_texture_image(struct gl_context *ctx, struct gl_texture_image *texImage); @@ -99,12 +94,8 @@ _mesa_clear_texture_image(struct gl_context *ctx, extern struct gl_texture_object * _mesa_select_tex_object(struct gl_context *ctx, - const struct gl_texture_unit *texUnit, GLenum target); -extern struct gl_texture_object * -_mesa_get_current_tex_object(struct gl_context *ctx, GLenum target); - extern struct gl_texture_image * _mesa_select_tex_image(struct gl_context *ctx, @@ -185,9 +176,6 @@ _mesa_TexImage3DEXT( GLenum target, GLint level, GLenum internalformat, GLint border, GLenum format, GLenum type, const GLvoid *pixels ); -extern void GLAPIENTRY -_mesa_EGLImageTargetTexture2DOES( GLenum target, GLeglImageOES image ); - extern void GLAPIENTRY _mesa_TexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, @@ -238,53 +226,6 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ); - - -extern void GLAPIENTRY -_mesa_CompressedTexImage1DARB(GLenum target, GLint level, - GLenum internalformat, GLsizei width, - GLint border, GLsizei imageSize, - const GLvoid *data); - -extern void GLAPIENTRY -_mesa_CompressedTexImage2DARB(GLenum target, GLint level, - GLenum internalformat, GLsizei width, - GLsizei height, GLint border, GLsizei imageSize, - const GLvoid *data); - -extern void GLAPIENTRY -_mesa_CompressedTexImage3DARB(GLenum target, GLint level, - GLenum internalformat, GLsizei width, - GLsizei height, GLsizei depth, GLint border, - GLsizei imageSize, const GLvoid *data); - -#ifdef VMS -#define _mesa_CompressedTexSubImage1DARB _mesa_CompressedTexSubImage1DAR -#define _mesa_CompressedTexSubImage2DARB _mesa_CompressedTexSubImage2DAR -#define _mesa_CompressedTexSubImage3DARB _mesa_CompressedTexSubImage3DAR -#endif -extern void GLAPIENTRY -_mesa_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset, - GLsizei width, GLenum format, - GLsizei imageSize, const GLvoid *data); - -extern void GLAPIENTRY -_mesa_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, - GLenum format, GLsizei imageSize, - const GLvoid *data); - -extern void GLAPIENTRY -_mesa_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, GLenum format, - GLsizei imageSize, const GLvoid *data); - - -extern void GLAPIENTRY -_mesa_TexBuffer(GLenum target, GLenum internalFormat, GLuint buffer); - - /*@}*/ #endif diff --git a/dll/opengl/mesa/src/mesa/main/texobj.c b/dll/opengl/mesa/main/texobj.c similarity index 83% rename from dll/opengl/mesa/src/mesa/main/texobj.c rename to dll/opengl/mesa/main/texobj.c index dc6e309865c..ec0abacaf90 100644 --- a/dll/opengl/mesa/src/mesa/main/texobj.c +++ b/dll/opengl/mesa/main/texobj.c @@ -33,7 +33,6 @@ #include "colortab.h" #include "context.h" #include "enums.h" -#include "fbobject.h" #include "formats.h" #include "hash.h" #include "imports.h" @@ -42,7 +41,6 @@ #include "texobj.h" #include "texstate.h" #include "mtypes.h" -#include "program/prog_instruction.h" @@ -103,12 +101,7 @@ _mesa_initialize_texture_object( struct gl_texture_object *obj, target == GL_TEXTURE_1D || target == GL_TEXTURE_2D || target == GL_TEXTURE_3D || - target == GL_TEXTURE_CUBE_MAP_ARB || - target == GL_TEXTURE_RECTANGLE_NV || - target == GL_TEXTURE_1D_ARRAY_EXT || - target == GL_TEXTURE_2D_ARRAY_EXT || - target == GL_TEXTURE_EXTERNAL_OES || - target == GL_TEXTURE_BUFFER); + target == GL_TEXTURE_CUBE_MAP_ARB); memset(obj, 0, sizeof(*obj)); /* init the non-zero fields */ @@ -120,68 +113,14 @@ _mesa_initialize_texture_object( struct gl_texture_object *obj, obj->BaseLevel = 0; obj->MaxLevel = 1000; - /* must be one; no support for (YUV) planes in separate buffers */ - obj->RequiredTextureImageUnits = 1; - /* sampler state */ - if (target == GL_TEXTURE_RECTANGLE_NV || - target == GL_TEXTURE_EXTERNAL_OES) { - obj->Sampler.WrapS = GL_CLAMP_TO_EDGE; - obj->Sampler.WrapT = GL_CLAMP_TO_EDGE; - obj->Sampler.WrapR = GL_CLAMP_TO_EDGE; - obj->Sampler.MinFilter = GL_LINEAR; - } - else { - obj->Sampler.WrapS = GL_REPEAT; - obj->Sampler.WrapT = GL_REPEAT; - obj->Sampler.WrapR = GL_REPEAT; - obj->Sampler.MinFilter = GL_NEAREST_MIPMAP_LINEAR; - } + obj->Sampler.WrapS = GL_REPEAT; + obj->Sampler.WrapT = GL_REPEAT; + obj->Sampler.WrapR = GL_REPEAT; + obj->Sampler.MinFilter = GL_NEAREST_MIPMAP_LINEAR; + obj->Sampler.MagFilter = GL_LINEAR; - obj->Sampler.MinLod = -1000.0; - obj->Sampler.MaxLod = 1000.0; - obj->Sampler.LodBias = 0.0; obj->Sampler.MaxAnisotropy = 1.0; - obj->Sampler.CompareMode = GL_NONE; /* ARB_shadow */ - obj->Sampler.CompareFunc = GL_LEQUAL; /* ARB_shadow */ - obj->Sampler.CompareFailValue = 0.0F; /* ARB_shadow_ambient */ - obj->Sampler.DepthMode = GL_LUMINANCE; /* ARB_depth_texture */ - obj->Sampler.CubeMapSeamless = GL_FALSE; - obj->Swizzle[0] = GL_RED; - obj->Swizzle[1] = GL_GREEN; - obj->Swizzle[2] = GL_BLUE; - obj->Swizzle[3] = GL_ALPHA; - obj->_Swizzle = SWIZZLE_NOOP; - obj->Sampler.sRGBDecode = GL_DECODE_EXT; -} - - -/** - * Some texture initialization can't be finished until we know which - * target it's getting bound to (GL_TEXTURE_1D/2D/etc). - */ -static void -finish_texture_init(struct gl_context *ctx, GLenum target, - struct gl_texture_object *obj) -{ - assert(obj->Target == 0); - - if (target == GL_TEXTURE_RECTANGLE_NV || - target == GL_TEXTURE_EXTERNAL_OES) { - /* have to init wrap and filter state here - kind of klunky */ - obj->Sampler.WrapS = GL_CLAMP_TO_EDGE; - obj->Sampler.WrapT = GL_CLAMP_TO_EDGE; - obj->Sampler.WrapR = GL_CLAMP_TO_EDGE; - obj->Sampler.MinFilter = GL_LINEAR; - if (ctx->Driver.TexParameter) { - static const GLfloat fparam_wrap[1] = {(GLfloat) GL_CLAMP_TO_EDGE}; - static const GLfloat fparam_filter[1] = {(GLfloat) GL_LINEAR}; - ctx->Driver.TexParameter(ctx, target, obj, GL_TEXTURE_WRAP_S, fparam_wrap); - ctx->Driver.TexParameter(ctx, target, obj, GL_TEXTURE_WRAP_T, fparam_wrap); - ctx->Driver.TexParameter(ctx, target, obj, GL_TEXTURE_WRAP_R, fparam_wrap); - ctx->Driver.TexParameter(ctx, target, obj, GL_TEXTURE_MIN_FILTER, fparam_filter); - } - } } @@ -213,8 +152,6 @@ _mesa_delete_texture_object(struct gl_context *ctx, } } - _mesa_reference_buffer_object(ctx, &texObj->BufferObject, NULL); - /* destroy the mutex -- it may have allocated memory (eg on bsd) */ _glthread_DESTROY_MUTEX(texObj->Mutex); @@ -247,26 +184,12 @@ _mesa_copy_texture_object( struct gl_texture_object *dest, dest->Sampler.WrapR = src->Sampler.WrapR; dest->Sampler.MinFilter = src->Sampler.MinFilter; dest->Sampler.MagFilter = src->Sampler.MagFilter; - dest->Sampler.MinLod = src->Sampler.MinLod; - dest->Sampler.MaxLod = src->Sampler.MaxLod; - dest->Sampler.LodBias = src->Sampler.LodBias; dest->BaseLevel = src->BaseLevel; dest->MaxLevel = src->MaxLevel; dest->Sampler.MaxAnisotropy = src->Sampler.MaxAnisotropy; - dest->Sampler.CompareMode = src->Sampler.CompareMode; - dest->Sampler.CompareFunc = src->Sampler.CompareFunc; - dest->Sampler.CompareFailValue = src->Sampler.CompareFailValue; - dest->Sampler.CubeMapSeamless = src->Sampler.CubeMapSeamless; - dest->Sampler.DepthMode = src->Sampler.DepthMode; - dest->Sampler.sRGBDecode = src->Sampler.sRGBDecode; dest->_MaxLevel = src->_MaxLevel; dest->_MaxLambda = src->_MaxLambda; - dest->GenerateMipmap = src->GenerateMipmap; dest->_Complete = src->_Complete; - COPY_4V(dest->Swizzle, src->Swizzle); - dest->_Swizzle = src->_Swizzle; - - dest->RequiredTextureImageUnits = src->RequiredTextureImageUnits; } @@ -310,11 +233,6 @@ valid_texture_object(const struct gl_texture_object *tex) case GL_TEXTURE_2D: case GL_TEXTURE_3D: case GL_TEXTURE_CUBE_MAP_ARB: - case GL_TEXTURE_RECTANGLE_NV: - case GL_TEXTURE_1D_ARRAY_EXT: - case GL_TEXTURE_2D_ARRAY_EXT: - case GL_TEXTURE_BUFFER: - case GL_TEXTURE_EXTERNAL_OES: return GL_TRUE; case 0x99: _mesa_problem(NULL, "invalid reference to a deleted texture object"); @@ -453,13 +371,11 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx, } /* Compute _MaxLevel */ - if ((t->Target == GL_TEXTURE_1D) || - (t->Target == GL_TEXTURE_1D_ARRAY_EXT)) { + if (t->Target == GL_TEXTURE_1D) { maxLog2 = t->Image[0][baseLevel]->WidthLog2; maxLevels = ctx->Const.MaxTextureLevels; } - else if ((t->Target == GL_TEXTURE_2D) || - (t->Target == GL_TEXTURE_2D_ARRAY_EXT)) { + else if (t->Target == GL_TEXTURE_2D) { maxLog2 = MAX2(t->Image[0][baseLevel]->WidthLog2, t->Image[0][baseLevel]->HeightLog2); maxLevels = ctx->Const.MaxTextureLevels; @@ -475,11 +391,6 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx, t->Image[0][baseLevel]->HeightLog2); maxLevels = ctx->Const.MaxCubeTextureLevels; } - else if (t->Target == GL_TEXTURE_RECTANGLE_NV || - t->Target == GL_TEXTURE_EXTERNAL_OES) { - maxLog2 = 0; /* not applicable */ - maxLevels = 1; /* no mipmapping */ - } else { _mesa_problem(ctx, "Bad t->Target in _mesa_test_texobj_completeness"); return; @@ -553,8 +464,7 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx, } /* Test things which depend on number of texture image dimensions */ - if ((t->Target == GL_TEXTURE_1D) || - (t->Target == GL_TEXTURE_1D_ARRAY_EXT)) { + if (t->Target == GL_TEXTURE_1D) { /* Test 1-D mipmaps */ GLuint width = t->Image[0][baseLevel]->Width2; for (i = baseLevel + 1; i < maxLevels; i++) { @@ -577,8 +487,7 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx, } } } - else if ((t->Target == GL_TEXTURE_2D) || - (t->Target == GL_TEXTURE_2D_ARRAY_EXT)) { + else if (t->Target == GL_TEXTURE_2D) { /* Test 2-D mipmaps */ GLuint width = t->Image[0][baseLevel]->Width2; GLuint height = t->Image[0][baseLevel]->Height2; @@ -672,7 +581,7 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx, return; } /* Don't support GL_DEPTH_COMPONENT for cube maps */ - if (ctx->VersionMajor < 3 && !ctx->Extensions.EXT_gpu_shader4) { + if (ctx->VersionMajor < 3) { if (t->Image[face][i]->_BaseFormat == GL_DEPTH_COMPONENT) { incomplete(t, "GL_DEPTH_COMPONENT only works with 1/2D tex"); return; @@ -691,9 +600,6 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx, } } } - else if (t->Target == GL_TEXTURE_RECTANGLE_NV) { - /* XXX special checking? */ - } else { /* Target = ??? */ _mesa_problem(ctx, "Bug in gl_test_texture_object_completeness\n"); @@ -879,35 +785,6 @@ _mesa_GenTextures( GLsizei n, GLuint *textures ) _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); } - -/** - * Check if the given texture object is bound to the current draw or - * read framebuffer. If so, Unbind it. - */ -static void -unbind_texobj_from_fbo(struct gl_context *ctx, - struct gl_texture_object *texObj) -{ - const GLuint n = (ctx->DrawBuffer == ctx->ReadBuffer) ? 1 : 2; - GLuint i; - - for (i = 0; i < n; i++) { - struct gl_framebuffer *fb = (i == 0) ? ctx->DrawBuffer : ctx->ReadBuffer; - if (fb->Name) { - GLuint j; - for (j = 0; j < BUFFER_COUNT; j++) { - if (fb->Attachment[j].Type == GL_TEXTURE && - fb->Attachment[j].Texture == texObj) { - /* Vertices are already flushed by _mesa_DeleteTextures */ - ctx->NewState |= _NEW_BUFFERS; - _mesa_remove_attachment(ctx, fb->Attachment + j); - } - } - } - } -} - - /** * Check if the given texture object is bound to any texture image units and * unbind it if so (revert to default textures). @@ -916,17 +793,14 @@ static void unbind_texobj_from_texunits(struct gl_context *ctx, struct gl_texture_object *texObj) { - GLuint u, tex; - - for (u = 0; u < Elements(ctx->Texture.Unit); u++) { - struct gl_texture_unit *unit = &ctx->Texture.Unit[u]; - for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) { - if (texObj == unit->CurrentTex[tex]) { - _mesa_reference_texobj(&unit->CurrentTex[tex], - ctx->Shared->DefaultTex[tex]); - ASSERT(unit->CurrentTex[tex]); - break; - } + GLuint tex; + struct gl_texture_unit *unit = &ctx->Texture.Unit; + for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) { + if (texObj == unit->CurrentTex[tex]) { + _mesa_reference_texobj(&unit->CurrentTex[tex], + ctx->Shared->DefaultTex[tex]); + ASSERT(unit->CurrentTex[tex]); + break; } } } @@ -964,12 +838,6 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures) if (delObj) { _mesa_lock_texture(ctx, delObj); - /* Check if texture is bound to any framebuffer objects. - * If so, unbind. - * See section 4.4.2.3 of GL_EXT_framebuffer_object. - */ - unbind_texobj_from_fbo(ctx, delObj); - /* Check if this texture is currently bound to any texture units. * If so, unbind it. */ @@ -1014,16 +882,6 @@ target_enum_to_index(GLenum target) return TEXTURE_3D_INDEX; case GL_TEXTURE_CUBE_MAP_ARB: return TEXTURE_CUBE_INDEX; - case GL_TEXTURE_RECTANGLE_NV: - return TEXTURE_RECT_INDEX; - case GL_TEXTURE_1D_ARRAY_EXT: - return TEXTURE_1D_ARRAY_INDEX; - case GL_TEXTURE_2D_ARRAY_EXT: - return TEXTURE_2D_ARRAY_INDEX; - case GL_TEXTURE_BUFFER_ARB: - return TEXTURE_BUFFER_INDEX; - case GL_TEXTURE_EXTERNAL_OES: - return TEXTURE_EXTERNAL_INDEX; default: return -1; } @@ -1049,7 +907,7 @@ void GLAPIENTRY _mesa_BindTexture( GLenum target, GLuint texName ) { GET_CURRENT_CONTEXT(ctx); - struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx); + struct gl_texture_unit *texUnit = &ctx->Texture.Unit; struct gl_texture_object *newTexObj = NULL; GLint targetIndex; ASSERT_OUTSIDE_BEGIN_END(ctx); @@ -1083,9 +941,6 @@ _mesa_BindTexture( GLenum target, GLuint texName ) "glBindTexture(target mismatch)" ); return; } - if (newTexObj->Target == 0) { - finish_texture_init(ctx, target, newTexObj); - } } else { /* if this is a new texture id, allocate a texture object now */ diff --git a/dll/opengl/mesa/src/mesa/main/texobj.h b/dll/opengl/mesa/main/texobj.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/texobj.h rename to dll/opengl/mesa/main/texobj.h diff --git a/dll/opengl/mesa/src/mesa/main/texpal.c b/dll/opengl/mesa/main/texpal.c similarity index 100% rename from dll/opengl/mesa/src/mesa/main/texpal.c rename to dll/opengl/mesa/main/texpal.c diff --git a/dll/opengl/mesa/src/mesa/main/texpal.h b/dll/opengl/mesa/main/texpal.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/texpal.h rename to dll/opengl/mesa/main/texpal.h diff --git a/dll/opengl/mesa/src/mesa/main/texparam.c b/dll/opengl/mesa/main/texparam.c similarity index 57% rename from dll/opengl/mesa/src/mesa/main/texparam.c rename to dll/opengl/mesa/main/texparam.c index 0f92a5b988e..d403db1756a 100644 --- a/dll/opengl/mesa/src/mesa/main/texparam.c +++ b/dll/opengl/mesa/main/texparam.c @@ -40,11 +40,9 @@ #include "main/mfeatures.h" #include "main/mtypes.h" #include "main/state.h" -#include "main/texcompress.h" #include "main/texparam.h" #include "main/teximage.h" #include "main/texstate.h" -#include "program/prog_instruction.h" /** @@ -54,40 +52,13 @@ static GLboolean validate_texture_wrap_mode(struct gl_context * ctx, GLenum target, GLenum wrap) { - const struct gl_extensions * const e = & ctx->Extensions; - - if (target == GL_TEXTURE_RECTANGLE_NV) { - if (wrap == GL_CLAMP || wrap == GL_CLAMP_TO_EDGE || - (wrap == GL_CLAMP_TO_BORDER && e->ARB_texture_border_clamp)) - return GL_TRUE; - } - else if (target == GL_TEXTURE_EXTERNAL_OES) { - if (wrap == GL_CLAMP_TO_EDGE) - return GL_TRUE; - } - else { - switch (wrap) { - case GL_CLAMP: - case GL_REPEAT: - case GL_CLAMP_TO_EDGE: - case GL_MIRRORED_REPEAT: - return GL_TRUE; - case GL_CLAMP_TO_BORDER: - if (e->ARB_texture_border_clamp) - return GL_TRUE; - break; - case GL_MIRROR_CLAMP_EXT: - case GL_MIRROR_CLAMP_TO_EDGE_EXT: - if (e->ATI_texture_mirror_once || e->EXT_texture_mirror_clamp) - return GL_TRUE; - break; - case GL_MIRROR_CLAMP_TO_BORDER_EXT: - if (e->EXT_texture_mirror_clamp) - return GL_TRUE; - break; - default: - break; - } + switch (wrap) { + case GL_CLAMP: + case GL_REPEAT: + case GL_MIRRORED_REPEAT: + return GL_TRUE; + default: + break; } _mesa_error( ctx, GL_INVALID_ENUM, "glTexParameter(param=0x%x)", wrap ); @@ -107,13 +78,7 @@ get_texobj(struct gl_context *ctx, GLenum target, GLboolean get) { struct gl_texture_unit *texUnit; - if (ctx->Texture.CurrentUnit >= ctx->Const.MaxCombinedTextureImageUnits) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "gl%sTexParameter(current unit)", get ? "Get" : ""); - return NULL; - } - - texUnit = _mesa_get_current_tex_unit(ctx); + texUnit = &ctx->Texture.Unit; switch (target) { case GL_TEXTURE_1D: @@ -127,28 +92,6 @@ get_texobj(struct gl_context *ctx, GLenum target, GLboolean get) return texUnit->CurrentTex[TEXTURE_CUBE_INDEX]; } break; - case GL_TEXTURE_RECTANGLE_NV: - if (ctx->Extensions.NV_texture_rectangle) { - return texUnit->CurrentTex[TEXTURE_RECT_INDEX]; - } - break; - case GL_TEXTURE_1D_ARRAY_EXT: - if (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array) { - return texUnit->CurrentTex[TEXTURE_1D_ARRAY_INDEX]; - } - break; - case GL_TEXTURE_2D_ARRAY_EXT: - if (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array) { - return texUnit->CurrentTex[TEXTURE_2D_ARRAY_INDEX]; - } - break; - case GL_TEXTURE_EXTERNAL_OES: - if (ctx->Extensions.OES_EGL_image_external) { - return texUnit->CurrentTex[TEXTURE_EXTERNAL_INDEX]; - } - break; default: ; } @@ -159,45 +102,6 @@ get_texobj(struct gl_context *ctx, GLenum target, GLboolean get) } -/** - * Convert GL_RED/GREEN/BLUE/ALPHA/ZERO/ONE to SWIZZLE_X/Y/Z/W/ZERO/ONE. - * \return -1 if error. - */ -static GLint -comp_to_swizzle(GLenum comp) -{ - switch (comp) { - case GL_RED: - return SWIZZLE_X; - case GL_GREEN: - return SWIZZLE_Y; - case GL_BLUE: - return SWIZZLE_Z; - case GL_ALPHA: - return SWIZZLE_W; - case GL_ZERO: - return SWIZZLE_ZERO; - case GL_ONE: - return SWIZZLE_ONE; - default: - return -1; - } -} - - -static void -set_swizzle_component(GLuint *swizzle, GLuint comp, GLuint swz) -{ - ASSERT(comp < 4); - ASSERT(swz <= SWIZZLE_NIL); - { - GLuint mask = 0x7 << (3 * comp); - GLuint s = (*swizzle & ~mask) | (swz << (3 * comp)); - *swizzle = s; - } -} - - /** * This is called just prior to changing any texture object state which * will not effect texture completeness. @@ -248,12 +152,9 @@ set_tex_parameteri(struct gl_context *ctx, case GL_LINEAR_MIPMAP_NEAREST: case GL_NEAREST_MIPMAP_LINEAR: case GL_LINEAR_MIPMAP_LINEAR: - if (texObj->Target != GL_TEXTURE_RECTANGLE_NV && - texObj->Target != GL_TEXTURE_EXTERNAL_OES) { - incomplete(ctx, texObj); - texObj->Sampler.MinFilter = params[0]; - return GL_TRUE; - } + incomplete(ctx, texObj); + texObj->Sampler.MinFilter = params[0]; + return GL_TRUE; /* fall-through */ default: goto invalid_param; @@ -304,176 +205,6 @@ set_tex_parameteri(struct gl_context *ctx, } return GL_FALSE; - case GL_TEXTURE_BASE_LEVEL: - if (texObj->BaseLevel == params[0]) - return GL_FALSE; - if (params[0] < 0 || - (texObj->Target == GL_TEXTURE_RECTANGLE_ARB && params[0] != 0)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glTexParameter(param=%d)", params[0]); - return GL_FALSE; - } - incomplete(ctx, texObj); - texObj->BaseLevel = params[0]; - return GL_TRUE; - - case GL_TEXTURE_MAX_LEVEL: - if (texObj->MaxLevel == params[0]) - return GL_FALSE; - if (params[0] < 0 || texObj->Target == GL_TEXTURE_RECTANGLE_ARB) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glTexParameter(param=%d)", params[0]); - return GL_FALSE; - } - incomplete(ctx, texObj); - texObj->MaxLevel = params[0]; - return GL_TRUE; - - case GL_GENERATE_MIPMAP_SGIS: - if (params[0] && texObj->Target == GL_TEXTURE_EXTERNAL_OES) - goto invalid_param; - if (texObj->GenerateMipmap != params[0]) { - /* no flush() */ - texObj->GenerateMipmap = params[0] ? GL_TRUE : GL_FALSE; - return GL_TRUE; - } - return GL_FALSE; - - case GL_TEXTURE_COMPARE_MODE_ARB: - if (ctx->Extensions.ARB_shadow) { - if (texObj->Sampler.CompareMode == params[0]) - return GL_FALSE; - if (params[0] == GL_NONE || - params[0] == GL_COMPARE_R_TO_TEXTURE_ARB) { - flush(ctx); - texObj->Sampler.CompareMode = params[0]; - return GL_TRUE; - } - goto invalid_param; - } - goto invalid_pname; - - case GL_TEXTURE_COMPARE_FUNC_ARB: - if (ctx->Extensions.ARB_shadow) { - if (texObj->Sampler.CompareFunc == params[0]) - return GL_FALSE; - switch (params[0]) { - case GL_LEQUAL: - case GL_GEQUAL: - flush(ctx); - texObj->Sampler.CompareFunc = params[0]; - return GL_TRUE; - case GL_EQUAL: - case GL_NOTEQUAL: - case GL_LESS: - case GL_GREATER: - case GL_ALWAYS: - case GL_NEVER: - if (ctx->Extensions.EXT_shadow_funcs) { - flush(ctx); - texObj->Sampler.CompareFunc = params[0]; - return GL_TRUE; - } - /* fall-through */ - default: - goto invalid_param; - } - } - goto invalid_pname; - - case GL_DEPTH_TEXTURE_MODE_ARB: - if (ctx->Extensions.ARB_depth_texture) { - if (texObj->Sampler.DepthMode == params[0]) - return GL_FALSE; - if (params[0] == GL_LUMINANCE || - params[0] == GL_INTENSITY || - params[0] == GL_ALPHA || - (ctx->Extensions.ARB_texture_rg && params[0] == GL_RED)) { - flush(ctx); - texObj->Sampler.DepthMode = params[0]; - return GL_TRUE; - } - goto invalid_param; - } - goto invalid_pname; - -#if FEATURE_OES_draw_texture - case GL_TEXTURE_CROP_RECT_OES: - texObj->CropRect[0] = params[0]; - texObj->CropRect[1] = params[1]; - texObj->CropRect[2] = params[2]; - texObj->CropRect[3] = params[3]; - return GL_TRUE; -#endif - - case GL_TEXTURE_SWIZZLE_R_EXT: - case GL_TEXTURE_SWIZZLE_G_EXT: - case GL_TEXTURE_SWIZZLE_B_EXT: - case GL_TEXTURE_SWIZZLE_A_EXT: - if (ctx->Extensions.EXT_texture_swizzle) { - const GLuint comp = pname - GL_TEXTURE_SWIZZLE_R_EXT; - const GLint swz = comp_to_swizzle(params[0]); - if (swz < 0) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glTexParameter(swizzle 0x%x)", params[0]); - return GL_FALSE; - } - ASSERT(comp < 4); - - flush(ctx); - texObj->Swizzle[comp] = params[0]; - set_swizzle_component(&texObj->_Swizzle, comp, swz); - return GL_TRUE; - } - goto invalid_pname; - - case GL_TEXTURE_SWIZZLE_RGBA_EXT: - if (ctx->Extensions.EXT_texture_swizzle) { - GLuint comp; - flush(ctx); - for (comp = 0; comp < 4; comp++) { - const GLint swz = comp_to_swizzle(params[comp]); - if (swz >= 0) { - texObj->Swizzle[comp] = params[comp]; - set_swizzle_component(&texObj->_Swizzle, comp, swz); - } - else { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glTexParameter(swizzle 0x%x)", params[comp]); - return GL_FALSE; - } - } - return GL_TRUE; - } - goto invalid_pname; - - case GL_TEXTURE_SRGB_DECODE_EXT: - if (ctx->Extensions.EXT_texture_sRGB_decode) { - GLenum decode = params[0]; - if (decode == GL_DECODE_EXT || decode == GL_SKIP_DECODE_EXT) { - if (texObj->Sampler.sRGBDecode != decode) { - flush(ctx); - texObj->Sampler.sRGBDecode = decode; - } - return GL_TRUE; - } - } - goto invalid_pname; - - case GL_TEXTURE_CUBE_MAP_SEAMLESS: - if (ctx->Extensions.AMD_seamless_cubemap_per_texture) { - GLenum param = params[0]; - if (param != GL_TRUE && param != GL_FALSE) { - goto invalid_param; - } - if (param != texObj->Sampler.CubeMapSeamless) { - flush(ctx); - texObj->Sampler.CubeMapSeamless = param; - } - return GL_TRUE; - } - goto invalid_pname; - default: goto invalid_pname; } @@ -500,19 +231,6 @@ set_tex_parameterf(struct gl_context *ctx, GLenum pname, const GLfloat *params) { switch (pname) { - case GL_TEXTURE_MIN_LOD: - if (texObj->Sampler.MinLod == params[0]) - return GL_FALSE; - flush(ctx); - texObj->Sampler.MinLod = params[0]; - return GL_TRUE; - - case GL_TEXTURE_MAX_LOD: - if (texObj->Sampler.MaxLod == params[0]) - return GL_FALSE; - flush(ctx); - texObj->Sampler.MaxLod = params[0]; - return GL_TRUE; case GL_TEXTURE_PRIORITY: flush(ctx); @@ -541,29 +259,6 @@ set_tex_parameterf(struct gl_context *ctx, } return GL_FALSE; - case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: - if (ctx->Extensions.ARB_shadow_ambient) { - if (texObj->Sampler.CompareFailValue != params[0]) { - flush(ctx); - texObj->Sampler.CompareFailValue = CLAMP(params[0], 0.0F, 1.0F); - return GL_TRUE; - } - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glTexParameter(pname=GL_TEXTURE_COMPARE_FAIL_VALUE_ARB)"); - } - return GL_FALSE; - - case GL_TEXTURE_LOD_BIAS: - /* NOTE: this is really part of OpenGL 1.4, not EXT_texture_lod_bias */ - if (texObj->Sampler.LodBias != params[0]) { - flush(ctx); - texObj->Sampler.LodBias = params[0]; - return GL_TRUE; - } - break; - case GL_TEXTURE_BORDER_COLOR: flush(ctx); /* ARB_texture_float disables clamping */ @@ -605,13 +300,9 @@ _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param) case GL_TEXTURE_WRAP_S: case GL_TEXTURE_WRAP_T: case GL_TEXTURE_WRAP_R: - case GL_TEXTURE_BASE_LEVEL: - case GL_TEXTURE_MAX_LEVEL: - case GL_GENERATE_MIPMAP_SGIS: case GL_TEXTURE_COMPARE_MODE_ARB: case GL_TEXTURE_COMPARE_FUNC_ARB: case GL_DEPTH_TEXTURE_MODE_ARB: - case GL_TEXTURE_SRGB_DECODE_EXT: case GL_TEXTURE_CUBE_MAP_SEAMLESS: { /* convert float param to int */ @@ -666,13 +357,9 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params) case GL_TEXTURE_WRAP_S: case GL_TEXTURE_WRAP_T: case GL_TEXTURE_WRAP_R: - case GL_TEXTURE_BASE_LEVEL: - case GL_TEXTURE_MAX_LEVEL: - case GL_GENERATE_MIPMAP_SGIS: case GL_TEXTURE_COMPARE_MODE_ARB: case GL_TEXTURE_COMPARE_FUNC_ARB: case GL_DEPTH_TEXTURE_MODE_ARB: - case GL_TEXTURE_SRGB_DECODE_EXT: case GL_TEXTURE_CUBE_MAP_SEAMLESS: { /* convert float param to int */ @@ -683,20 +370,6 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params) } break; -#if FEATURE_OES_draw_texture - case GL_TEXTURE_CROP_RECT_OES: - { - /* convert float params to int */ - GLint iparams[4]; - iparams[0] = (GLint) params[0]; - iparams[1] = (GLint) params[1]; - iparams[2] = (GLint) params[2]; - iparams[3] = (GLint) params[3]; - need_update = set_tex_parameteri(ctx, texObj, pname, iparams); - } - break; -#endif - case GL_TEXTURE_SWIZZLE_R_EXT: case GL_TEXTURE_SWIZZLE_G_EXT: case GL_TEXTURE_SWIZZLE_B_EXT: @@ -899,7 +572,6 @@ void GLAPIENTRY _mesa_GetTexLevelParameteriv( GLenum target, GLint level, GLenum pname, GLint *params ) { - const struct gl_texture_unit *texUnit; struct gl_texture_object *texObj; const struct gl_texture_image *img = NULL; GLint maxLevels; @@ -907,14 +579,6 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - if (ctx->Texture.CurrentUnit >= ctx->Const.MaxCombinedTextureImageUnits) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetTexLevelParameteriv(current unit)"); - return; - } - - texUnit = _mesa_get_current_tex_unit(ctx); - /* this will catch bad target values */ maxLevels = _mesa_max_texture_levels(ctx, target); if (maxLevels == 0) { @@ -928,7 +592,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level, return; } - texObj = _mesa_select_tex_object(ctx, texUnit, target); + texObj = _mesa_select_tex_object(ctx, target); img = _mesa_select_tex_image(ctx, texObj, target, level); if (!img || img->TexFormat == MESA_FORMAT_NONE) { @@ -953,28 +617,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level, *params = img->Depth; break; case GL_TEXTURE_INTERNAL_FORMAT: - if (_mesa_is_format_compressed(texFormat)) { - /* need to return the actual compressed format */ - *params = _mesa_compressed_format_to_glenum(ctx, texFormat); - } - else { - /* If the true internal format is not compressed but the user - * requested a generic compressed format, we have to return the - * generic base format that matches. - * - * From page 119 (page 129 of the PDF) of the OpenGL 1.3 spec: - * - * "If no specific compressed format is available, - * internalformat is instead replaced by the corresponding base - * internal format." - * - * Otherwise just return the user's requested internal format - */ - const GLenum f = - _mesa_gl_compressed_format_base_format(img->InternalFormat); - - *params = (f != 0) ? f : img->InternalFormat; - } + *params = img->InternalFormat; break; case GL_TEXTURE_BORDER: *params = img->Border; @@ -1004,39 +647,6 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level, *params = 0; } break; - case GL_TEXTURE_DEPTH_SIZE_ARB: - if (!ctx->Extensions.ARB_depth_texture) - goto invalid_pname; - *params = _mesa_get_format_bits(texFormat, pname); - break; - case GL_TEXTURE_STENCIL_SIZE_EXT: - if (!ctx->Extensions.EXT_packed_depth_stencil && - !ctx->Extensions.ARB_framebuffer_object) - goto invalid_pname; - *params = _mesa_get_format_bits(texFormat, pname); - break; - case GL_TEXTURE_SHARED_SIZE: - if (ctx->VersionMajor < 3 && - !ctx->Extensions.EXT_texture_shared_exponent) - goto invalid_pname; - *params = texFormat == MESA_FORMAT_RGB9_E5_FLOAT ? 5 : 0; - break; - - /* GL_ARB_texture_compression */ - case GL_TEXTURE_COMPRESSED_IMAGE_SIZE: - if (_mesa_is_format_compressed(texFormat) && - !_mesa_is_proxy_texture(target)) { - *params = _mesa_format_image_size(texFormat, img->Width, - img->Height, img->Depth); - } - else { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetTexLevelParameter[if]v(pname)"); - } - break; - case GL_TEXTURE_COMPRESSED: - *params = (GLint) _mesa_is_format_compressed(texFormat); - break; /* GL_ARB_texture_float */ case GL_TEXTURE_RED_TYPE_ARB: @@ -1098,20 +708,12 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) *params = ENUM_TO_FLOAT(obj->Sampler.WrapR); break; case GL_TEXTURE_BORDER_COLOR: - if (ctx->NewState & (_NEW_BUFFERS | _NEW_FRAG_CLAMP)) + if (ctx->NewState & _NEW_BUFFERS) _mesa_update_state_locked(ctx); - if (ctx->Color._ClampFragmentColor) { - params[0] = CLAMP(obj->Sampler.BorderColor.f[0], 0.0F, 1.0F); - params[1] = CLAMP(obj->Sampler.BorderColor.f[1], 0.0F, 1.0F); - params[2] = CLAMP(obj->Sampler.BorderColor.f[2], 0.0F, 1.0F); - params[3] = CLAMP(obj->Sampler.BorderColor.f[3], 0.0F, 1.0F); - } - else { - params[0] = obj->Sampler.BorderColor.f[0]; - params[1] = obj->Sampler.BorderColor.f[1]; - params[2] = obj->Sampler.BorderColor.f[2]; - params[3] = obj->Sampler.BorderColor.f[3]; - } + params[0] = obj->Sampler.BorderColor.f[0]; + params[1] = obj->Sampler.BorderColor.f[1]; + params[2] = obj->Sampler.BorderColor.f[2]; + params[3] = obj->Sampler.BorderColor.f[3]; break; case GL_TEXTURE_RESIDENT: *params = 1.0F; @@ -1119,84 +721,11 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ) case GL_TEXTURE_PRIORITY: *params = obj->Priority; break; - case GL_TEXTURE_MIN_LOD: - *params = obj->Sampler.MinLod; - break; - case GL_TEXTURE_MAX_LOD: - *params = obj->Sampler.MaxLod; - break; - case GL_TEXTURE_BASE_LEVEL: - *params = (GLfloat) obj->BaseLevel; - break; - case GL_TEXTURE_MAX_LEVEL: - *params = (GLfloat) obj->MaxLevel; - break; case GL_TEXTURE_MAX_ANISOTROPY_EXT: if (!ctx->Extensions.EXT_texture_filter_anisotropic) goto invalid_pname; *params = obj->Sampler.MaxAnisotropy; break; - case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: - if (!ctx->Extensions.ARB_shadow_ambient) - goto invalid_pname; - *params = obj->Sampler.CompareFailValue; - break; - case GL_GENERATE_MIPMAP_SGIS: - *params = (GLfloat) obj->GenerateMipmap; - break; - case GL_TEXTURE_COMPARE_MODE_ARB: - if (!ctx->Extensions.ARB_shadow) - goto invalid_pname; - *params = (GLfloat) obj->Sampler.CompareMode; - break; - case GL_TEXTURE_COMPARE_FUNC_ARB: - if (!ctx->Extensions.ARB_shadow) - goto invalid_pname; - *params = (GLfloat) obj->Sampler.CompareFunc; - break; - case GL_DEPTH_TEXTURE_MODE_ARB: - if (!ctx->Extensions.ARB_depth_texture) - goto invalid_pname; - *params = (GLfloat) obj->Sampler.DepthMode; - break; - case GL_TEXTURE_LOD_BIAS: - *params = obj->Sampler.LodBias; - break; -#if FEATURE_OES_draw_texture - case GL_TEXTURE_CROP_RECT_OES: - params[0] = obj->CropRect[0]; - params[1] = obj->CropRect[1]; - params[2] = obj->CropRect[2]; - params[3] = obj->CropRect[3]; - break; -#endif - - case GL_TEXTURE_SWIZZLE_R_EXT: - case GL_TEXTURE_SWIZZLE_G_EXT: - case GL_TEXTURE_SWIZZLE_B_EXT: - case GL_TEXTURE_SWIZZLE_A_EXT: - if (!ctx->Extensions.EXT_texture_swizzle) - goto invalid_pname; - *params = (GLfloat) obj->Swizzle[pname - GL_TEXTURE_SWIZZLE_R_EXT]; - break; - - case GL_TEXTURE_SWIZZLE_RGBA_EXT: - if (!ctx->Extensions.EXT_texture_swizzle) { - goto invalid_pname; - } - else { - GLuint comp; - for (comp = 0; comp < 4; comp++) { - params[comp] = (GLfloat) obj->Swizzle[comp]; - } - } - break; - - case GL_TEXTURE_CUBE_MAP_SEAMLESS: - if (!ctx->Extensions.AMD_seamless_cubemap_per_texture) - goto invalid_pname; - *params = (GLfloat) obj->Sampler.CubeMapSeamless; - break; case GL_TEXTURE_IMMUTABLE_FORMAT: if (!ctx->Extensions.ARB_texture_storage) @@ -1264,78 +793,12 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) break;; case GL_TEXTURE_PRIORITY: *params = FLOAT_TO_INT(obj->Priority); - break;; - case GL_TEXTURE_MIN_LOD: - *params = (GLint) obj->Sampler.MinLod; - break;; - case GL_TEXTURE_MAX_LOD: - *params = (GLint) obj->Sampler.MaxLod; - break;; - case GL_TEXTURE_BASE_LEVEL: - *params = obj->BaseLevel; - break;; - case GL_TEXTURE_MAX_LEVEL: - *params = obj->MaxLevel; - break;; + break; case GL_TEXTURE_MAX_ANISOTROPY_EXT: if (!ctx->Extensions.EXT_texture_filter_anisotropic) goto invalid_pname; *params = (GLint) obj->Sampler.MaxAnisotropy; break; - case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: - if (!ctx->Extensions.ARB_shadow_ambient) - goto invalid_pname; - *params = (GLint) FLOAT_TO_INT(obj->Sampler.CompareFailValue); - break; - case GL_GENERATE_MIPMAP_SGIS: - *params = (GLint) obj->GenerateMipmap; - break; - case GL_TEXTURE_COMPARE_MODE_ARB: - if (!ctx->Extensions.ARB_shadow) - goto invalid_pname; - *params = (GLint) obj->Sampler.CompareMode; - break; - case GL_TEXTURE_COMPARE_FUNC_ARB: - if (!ctx->Extensions.ARB_shadow) - goto invalid_pname; - *params = (GLint) obj->Sampler.CompareFunc; - break; - case GL_DEPTH_TEXTURE_MODE_ARB: - if (!ctx->Extensions.ARB_depth_texture) - goto invalid_pname; - *params = (GLint) obj->Sampler.DepthMode; - break; - case GL_TEXTURE_LOD_BIAS: - *params = (GLint) obj->Sampler.LodBias; - break; -#if FEATURE_OES_draw_texture - case GL_TEXTURE_CROP_RECT_OES: - params[0] = obj->CropRect[0]; - params[1] = obj->CropRect[1]; - params[2] = obj->CropRect[2]; - params[3] = obj->CropRect[3]; - break; -#endif - case GL_TEXTURE_SWIZZLE_R_EXT: - case GL_TEXTURE_SWIZZLE_G_EXT: - case GL_TEXTURE_SWIZZLE_B_EXT: - case GL_TEXTURE_SWIZZLE_A_EXT: - if (!ctx->Extensions.EXT_texture_swizzle) - goto invalid_pname; - *params = obj->Swizzle[pname - GL_TEXTURE_SWIZZLE_R_EXT]; - break; - - case GL_TEXTURE_SWIZZLE_RGBA_EXT: - if (!ctx->Extensions.EXT_texture_swizzle) - goto invalid_pname; - COPY_4V(params, obj->Swizzle); - break; - - case GL_TEXTURE_CUBE_MAP_SEAMLESS: - if (!ctx->Extensions.AMD_seamless_cubemap_per_texture) - goto invalid_pname; - *params = (GLint) obj->Sampler.CubeMapSeamless; - break; case GL_TEXTURE_IMMUTABLE_FORMAT: if (!ctx->Extensions.ARB_texture_storage) @@ -1343,12 +806,6 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) *params = (GLint) obj->Immutable; break; - case GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES: - if (!ctx->Extensions.OES_EGL_image_external) - goto invalid_pname; - *params = obj->RequiredTextureImageUnits; - break; - default: goto invalid_pname; } diff --git a/dll/opengl/mesa/src/mesa/main/texparam.h b/dll/opengl/mesa/main/texparam.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/texparam.h rename to dll/opengl/mesa/main/texparam.h diff --git a/dll/opengl/mesa/src/mesa/main/texstate.c b/dll/opengl/mesa/main/texstate.c similarity index 59% rename from dll/opengl/mesa/src/mesa/main/texstate.c rename to dll/opengl/mesa/main/texstate.c index cc49916a92c..7f0dc1b8493 100644 --- a/dll/opengl/mesa/src/mesa/main/texstate.c +++ b/dll/opengl/mesa/main/texstate.c @@ -66,51 +66,43 @@ static const struct gl_tex_env_combine_state default_combine_state = { void _mesa_copy_texture_state( const struct gl_context *src, struct gl_context *dst ) { - GLuint u, tex; + GLuint tex; ASSERT(src); ASSERT(dst); - dst->Texture.CurrentUnit = src->Texture.CurrentUnit; dst->Texture._GenFlags = src->Texture._GenFlags; dst->Texture._TexGenEnabled = src->Texture._TexGenEnabled; dst->Texture._TexMatEnabled = src->Texture._TexMatEnabled; - /* per-unit state */ - for (u = 0; u < src->Const.MaxCombinedTextureImageUnits; u++) { - dst->Texture.Unit[u].Enabled = src->Texture.Unit[u].Enabled; - dst->Texture.Unit[u].EnvMode = src->Texture.Unit[u].EnvMode; - COPY_4V(dst->Texture.Unit[u].EnvColor, src->Texture.Unit[u].EnvColor); - dst->Texture.Unit[u].TexGenEnabled = src->Texture.Unit[u].TexGenEnabled; - dst->Texture.Unit[u].GenS = src->Texture.Unit[u].GenS; - dst->Texture.Unit[u].GenT = src->Texture.Unit[u].GenT; - dst->Texture.Unit[u].GenR = src->Texture.Unit[u].GenR; - dst->Texture.Unit[u].GenQ = src->Texture.Unit[u].GenQ; - dst->Texture.Unit[u].LodBias = src->Texture.Unit[u].LodBias; + dst->Texture.Unit.Enabled = src->Texture.Unit.Enabled; + dst->Texture.Unit.EnvMode = src->Texture.Unit.EnvMode; + COPY_4V(dst->Texture.Unit.EnvColor, src->Texture.Unit.EnvColor); + dst->Texture.Unit.TexGenEnabled = src->Texture.Unit.TexGenEnabled; + dst->Texture.Unit.GenS = src->Texture.Unit.GenS; + dst->Texture.Unit.GenT = src->Texture.Unit.GenT; + dst->Texture.Unit.GenR = src->Texture.Unit.GenR; + dst->Texture.Unit.GenQ = src->Texture.Unit.GenQ; + dst->Texture.Unit.LodBias = src->Texture.Unit.LodBias; - /* GL_EXT_texture_env_combine */ - dst->Texture.Unit[u].Combine = src->Texture.Unit[u].Combine; + /* GL_EXT_texture_env_combine */ + dst->Texture.Unit.Combine = src->Texture.Unit.Combine; - /* GL_ATI_envmap_bumpmap - need this? */ - dst->Texture.Unit[u].BumpTarget = src->Texture.Unit[u].BumpTarget; - COPY_4V(dst->Texture.Unit[u].RotMatrix, src->Texture.Unit[u].RotMatrix); + /* + * XXX strictly speaking, we should compare texture names/ids and + * bind textures in the dest context according to id. For now, only + * copy bindings if the contexts share the same pool of textures to + * avoid refcounting bugs. + */ + if (dst->Shared == src->Shared) { + /* copy texture object bindings, not contents of texture objects */ + _mesa_lock_context_textures(dst); - /* - * XXX strictly speaking, we should compare texture names/ids and - * bind textures in the dest context according to id. For now, only - * copy bindings if the contexts share the same pool of textures to - * avoid refcounting bugs. - */ - if (dst->Shared == src->Shared) { - /* copy texture object bindings, not contents of texture objects */ - _mesa_lock_context_textures(dst); - - for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) { - _mesa_reference_texobj(&dst->Texture.Unit[u].CurrentTex[tex], - src->Texture.Unit[u].CurrentTex[tex]); - } - _mesa_unlock_context_textures(dst); + for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) { + _mesa_reference_texobj(&dst->Texture.Unit.CurrentTex[tex], + src->Texture.Unit.CurrentTex[tex]); } + _mesa_unlock_context_textures(dst); } } @@ -119,10 +111,10 @@ _mesa_copy_texture_state( const struct gl_context *src, struct gl_context *dst ) * For debugging */ void -_mesa_print_texunit_state( struct gl_context *ctx, GLuint unit ) +_mesa_print_texunit_state( struct gl_context *ctx ) { - const struct gl_texture_unit *texUnit = ctx->Texture.Unit + unit; - printf("Texture Unit %d\n", unit); + const struct gl_texture_unit *texUnit = &ctx->Texture.Unit; + printf("Texture Unit\n"); printf(" GL_TEXTURE_ENV_MODE = %s\n", _mesa_lookup_enum_by_nr(texUnit->EnvMode)); printf(" GL_COMBINE_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.ModeRGB)); printf(" GL_COMBINE_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.ModeA)); @@ -183,7 +175,6 @@ calculate_derived_texenv( struct gl_tex_env_combine_state *state, case GL_RG: case GL_RGB: case GL_YCBCR_MESA: - case GL_DUDV_ATI: state->SourceA[0] = GL_PREVIOUS; break; @@ -225,7 +216,6 @@ calculate_derived_texenv( struct gl_tex_env_combine_state *state, case GL_RG: case GL_RGB: case GL_YCBCR_MESA: - case GL_DUDV_ATI: mode_rgb = GL_REPLACE; break; case GL_RGBA: @@ -254,7 +244,6 @@ calculate_derived_texenv( struct gl_tex_env_combine_state *state, case GL_LUMINANCE_ALPHA: case GL_RGBA: case GL_YCBCR_MESA: - case GL_DUDV_ATI: state->SourceRGB[2] = GL_TEXTURE; state->SourceA[2] = GL_TEXTURE; state->SourceRGB[0] = GL_CONSTANT; @@ -281,74 +270,6 @@ calculate_derived_texenv( struct gl_tex_env_combine_state *state, ? mode_a : GL_REPLACE; } - - - -/* GL_ARB_multitexture */ -void GLAPIENTRY -_mesa_ActiveTextureARB(GLenum texture) -{ - const GLuint texUnit = texture - GL_TEXTURE0; - GLuint k; - GET_CURRENT_CONTEXT(ctx); - - /* See OpenGL spec for glActiveTexture: */ - k = MAX2(ctx->Const.MaxCombinedTextureImageUnits, - ctx->Const.MaxTextureCoordUnits); - - ASSERT(k <= Elements(ctx->Texture.Unit)); - - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glActiveTexture %s\n", - _mesa_lookup_enum_by_nr(texture)); - - if (texUnit >= k) { - _mesa_error(ctx, GL_INVALID_ENUM, "glActiveTexture(texture=%s)", - _mesa_lookup_enum_by_nr(texture)); - return; - } - - if (ctx->Texture.CurrentUnit == texUnit) - return; - - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - - ctx->Texture.CurrentUnit = texUnit; - if (ctx->Transform.MatrixMode == GL_TEXTURE) { - /* update current stack pointer */ - ctx->CurrentStack = &ctx->TextureMatrixStack[texUnit]; - } -} - - -/* GL_ARB_multitexture */ -void GLAPIENTRY -_mesa_ClientActiveTextureARB(GLenum texture) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint texUnit = texture - GL_TEXTURE0; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glClientActiveTexture %s\n", - _mesa_lookup_enum_by_nr(texture)); - - if (texUnit >= ctx->Const.MaxTextureCoordUnits) { - _mesa_error(ctx, GL_INVALID_ENUM, "glClientActiveTexture(texture)"); - return; - } - - if (ctx->Array.ActiveTexture == texUnit) - return; - - FLUSH_VERTICES(ctx, _NEW_ARRAY); - ctx->Array.ActiveTexture = texUnit; -} - - - /**********************************************************************/ /***** State management *****/ /**********************************************************************/ @@ -365,19 +286,14 @@ _mesa_ClientActiveTextureARB(GLenum texture) static void update_texture_matrices( struct gl_context *ctx ) { - GLuint u; - ctx->Texture._TexMatEnabled = 0x0; - for (u = 0; u < ctx->Const.MaxTextureCoordUnits; u++) { - ASSERT(u < Elements(ctx->TextureMatrixStack)); - if (_math_matrix_is_dirty(ctx->TextureMatrixStack[u].Top)) { - _math_matrix_analyse( ctx->TextureMatrixStack[u].Top ); + if (_math_matrix_is_dirty(ctx->TextureMatrixStack.Top)) { + _math_matrix_analyse( ctx->TextureMatrixStack.Top ); - if (ctx->Texture.Unit[u]._ReallyEnabled && - ctx->TextureMatrixStack[u].Top->type != MATRIX_IDENTITY) - ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(u); - } + if (ctx->Texture.Unit._ReallyEnabled && + ctx->TextureMatrixStack.Top->type != MATRIX_IDENTITY) + ctx->Texture._TexMatEnabled = GL_TRUE; } } @@ -402,9 +318,6 @@ update_tex_combine(struct gl_context *ctx, struct gl_texture_unit *texUnit) const struct gl_texture_object *texObj = texUnit->_Current; GLenum format = texObj->Image[0][texObj->BaseLevel]->_BaseFormat; - if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) { - format = texObj->Sampler.DepthMode; - } calculate_derived_texenv(&texUnit->_EnvMode, texUnit->EnvMode, format); texUnit->_CurrentCombine = & texUnit->_EnvMode; } @@ -437,10 +350,6 @@ update_tex_combine(struct gl_context *ctx, struct gl_texture_unit *texUnit) case GL_MODULATE_SUBTRACT_ATI: combine->_NumArgsRGB = 3; break; - case GL_BUMP_ENVMAP_ATI: - /* no real arguments for this case */ - combine->_NumArgsRGB = 0; - break; default: combine->_NumArgsRGB = 0; _mesa_problem(ctx, "invalid RGB combine mode in update_texture_state"); @@ -488,144 +397,64 @@ update_tex_combine(struct gl_context *ctx, struct gl_texture_unit *texUnit) static void update_texture_state( struct gl_context *ctx ) { - GLuint unit; - struct gl_program *fprog = NULL; - struct gl_program *vprog = NULL; - GLbitfield enabledFragUnits = 0x0; - - if (ctx->Shader.CurrentVertexProgram && - ctx->Shader.CurrentVertexProgram->LinkStatus) { - vprog = ctx->Shader.CurrentVertexProgram->_LinkedShaders[MESA_SHADER_VERTEX]->Program; - } else if (ctx->VertexProgram._Enabled) { - /* XXX enable this if/when non-shader vertex programs get - * texture fetches: - vprog = &ctx->VertexProgram.Current->Base; - */ - } - - if (ctx->Shader.CurrentFragmentProgram && - ctx->Shader.CurrentFragmentProgram->LinkStatus) { - fprog = ctx->Shader.CurrentFragmentProgram->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program; - } - else if (ctx->FragmentProgram._Enabled) { - fprog = &ctx->FragmentProgram.Current->Base; - } - - /* FINISHME: Geometry shader texture accesses should also be considered - * FINISHME: here. - */ - /* TODO: only set this if there are actual changes */ ctx->NewState |= _NEW_TEXTURE; - ctx->Texture._EnabledUnits = 0x0; + ctx->Texture._Enabled = GL_FALSE; ctx->Texture._GenFlags = 0x0; - ctx->Texture._TexMatEnabled = 0x0; - ctx->Texture._TexGenEnabled = 0x0; + ctx->Texture._TexMatEnabled = GL_FALSE; + ctx->Texture._TexGenEnabled = GL_FALSE; /* * Update texture unit state. */ - for (unit = 0; unit < ctx->Const.MaxCombinedTextureImageUnits; unit++) { - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; - GLbitfield enabledVertTargets = 0x0; - GLbitfield enabledFragTargets = 0x0; - GLbitfield enabledTargets = 0x0; - GLuint texIndex; - - /* Get the bitmask of texture target enables. - * enableBits will be a mask of the TEXTURE_*_BIT flags indicating - * which texture targets are enabled (fixed function) or referenced - * by a fragment program/program. When multiple flags are set, we'll - * settle on the one with highest priority (see below). - */ - if (vprog) { - enabledVertTargets |= vprog->TexturesUsed[unit]; - } - - if (fprog) { - enabledFragTargets |= fprog->TexturesUsed[unit]; - } - else { - /* fixed-function fragment program */ - enabledFragTargets |= texUnit->Enabled; - } - - enabledTargets = enabledVertTargets | enabledFragTargets; + { + struct gl_texture_unit *texUnit = &ctx->Texture.Unit; + GLbitfield enabledTargets = texUnit->Enabled; texUnit->_ReallyEnabled = 0x0; - if (enabledTargets == 0x0) { - /* neither vertex nor fragment processing uses this unit */ - continue; - } - - /* Look for the highest priority texture target that's enabled (or used - * by the vert/frag shaders) and "complete". That's the one we'll use - * for texturing. If we're using vert/frag program we're guaranteed - * that bitcount(enabledBits) <= 1. - * Note that the TEXTURE_x_INDEX values are in high to low priority. - */ - for (texIndex = 0; texIndex < NUM_TEXTURE_TARGETS; texIndex++) { - if (enabledTargets & (1 << texIndex)) { - struct gl_texture_object *texObj = texUnit->CurrentTex[texIndex]; - if (!texObj->_Complete) { - _mesa_test_texobj_completeness(ctx, texObj); - } - if (texObj->_Complete) { - texUnit->_ReallyEnabled = 1 << texIndex; - _mesa_reference_texobj(&texUnit->_Current, texObj); - break; + if (enabledTargets) { + GLuint texIndex; + /* Look for the highest priority texture target that's enabled (or used + * by the vert/frag shaders) and "complete". That's the one we'll use + * for texturing. If we're using vert/frag program we're guaranteed + * that bitcount(enabledBits) <= 1. + * Note that the TEXTURE_x_INDEX values are in high to low priority. + */ + for (texIndex = 0; texIndex < NUM_TEXTURE_TARGETS; texIndex++) { + if (enabledTargets & (1 << texIndex)) { + struct gl_texture_object *texObj = texUnit->CurrentTex[texIndex]; + if (!texObj->_Complete) { + _mesa_test_texobj_completeness(ctx, texObj); + } + if (texObj->_Complete) { + texUnit->_ReallyEnabled = 1 << texIndex; + _mesa_reference_texobj(&texUnit->_Current, texObj); + break; + } } } - } - if (!texUnit->_ReallyEnabled) { - if (fprog) { - /* If we get here it means the shader is expecting a texture - * object, but there isn't one (or it's incomplete). Use the - * fallback texture. - */ - struct gl_texture_object *texObj = _mesa_get_fallback_texture(ctx); - texUnit->_ReallyEnabled = 1 << TEXTURE_2D_INDEX; - _mesa_reference_texobj(&texUnit->_Current, texObj); - } - else { - /* fixed-function: texture unit is really disabled */ - continue; + if (texUnit->_ReallyEnabled) { + /* if we get here, we know this texture unit is enabled */ + ctx->Texture._Enabled = GL_TRUE; + update_tex_combine(ctx, texUnit); } } - - /* if we get here, we know this texture unit is enabled */ - - ctx->Texture._EnabledUnits |= (1 << unit); - - if (enabledFragTargets) - enabledFragUnits |= (1 << unit); - - update_tex_combine(ctx, texUnit); } - /* Determine which texture coordinate sets are actually needed */ - if (fprog) { - const GLuint coordMask = (1 << MAX_TEXTURE_COORD_UNITS) - 1; - ctx->Texture._EnabledCoordUnits - = (fprog->InputsRead >> FRAG_ATTRIB_TEX0) & coordMask; - } - else { - ctx->Texture._EnabledCoordUnits = enabledFragUnits; - } + /* Determine if texture coordinates are actually needed */ + ctx->Texture._EnabledCoord = ctx->Texture._Enabled; /* Setup texgen for those texture coordinate sets that are in use */ - for (unit = 0; unit < ctx->Const.MaxTextureCoordUnits; unit++) { - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + if(ctx->Texture._EnabledCoord) + { + struct gl_texture_unit *texUnit = &ctx->Texture.Unit; texUnit->_GenFlags = 0x0; - if (!(ctx->Texture._EnabledCoordUnits & (1 << unit))) - continue; - if (texUnit->TexGenEnabled) { if (texUnit->TexGenEnabled & S_BIT) { texUnit->_GenFlags |= texUnit->GenS._ModeBit; @@ -640,13 +469,12 @@ update_texture_state( struct gl_context *ctx ) texUnit->_GenFlags |= texUnit->GenQ._ModeBit; } - ctx->Texture._TexGenEnabled |= ENABLE_TEXGEN(unit); + ctx->Texture._TexGenEnabled = GL_TRUE; ctx->Texture._GenFlags |= texUnit->_GenFlags; } - ASSERT(unit < Elements(ctx->TextureMatrixStack)); - if (ctx->TextureMatrixStack[unit].Top->type != MATRIX_IDENTITY) - ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(unit); + if (ctx->TextureMatrixStack.Top->type != MATRIX_IDENTITY) + ctx->Texture._TexMatEnabled = GL_TRUE; } } @@ -660,7 +488,7 @@ _mesa_update_texture( struct gl_context *ctx, GLuint new_state ) if (new_state & _NEW_TEXTURE_MATRIX) update_texture_matrices( ctx ); - if (new_state & (_NEW_TEXTURE | _NEW_PROGRAM)) + if (new_state & _NEW_TEXTURE) update_texture_state( ctx ); } @@ -686,13 +514,8 @@ alloc_proxy_textures( struct gl_context *ctx ) * values! */ static const GLenum targets[] = { - GL_TEXTURE_BUFFER, - GL_TEXTURE_2D_ARRAY_EXT, - GL_TEXTURE_1D_ARRAY_EXT, - GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_3D, - GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_2D, GL_TEXTURE_1D, }; @@ -725,9 +548,9 @@ alloc_proxy_textures( struct gl_context *ctx ) * \param unit texture unit number to be initialized. */ static void -init_texture_unit( struct gl_context *ctx, GLuint unit ) +init_texture_unit( struct gl_context *ctx) { - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + struct gl_texture_unit *texUnit = &ctx->Texture.Unit; GLuint tex; texUnit->EnvMode = GL_MODULATE; @@ -736,7 +559,6 @@ init_texture_unit( struct gl_context *ctx, GLuint unit ) texUnit->Combine = default_combine_state; texUnit->_EnvMode = default_combine_state; texUnit->_CurrentCombine = & texUnit->_EnvMode; - texUnit->BumpTarget = GL_TEXTURE0; texUnit->TexGenEnabled = 0x0; texUnit->GenS.Mode = GL_EYE_LINEAR; @@ -758,9 +580,6 @@ init_texture_unit( struct gl_context *ctx, GLuint unit ) ASSIGN_4V( texUnit->GenR.EyePlane, 0.0, 0.0, 0.0, 0.0 ); ASSIGN_4V( texUnit->GenQ.EyePlane, 0.0, 0.0, 0.0, 0.0 ); - /* no mention of this in spec, but maybe id matrix expected? */ - ASSIGN_4V( texUnit->RotMatrix, 1.0, 0.0, 0.0, 1.0 ); - /* initialize current texture object ptrs to the shared default objects */ for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) { _mesa_reference_texobj(&texUnit->CurrentTex[tex], @@ -775,30 +594,15 @@ init_texture_unit( struct gl_context *ctx, GLuint unit ) GLboolean _mesa_init_texture(struct gl_context *ctx) { - GLuint u; - /* Texture group */ - ctx->Texture.CurrentUnit = 0; /* multitexture */ - ctx->Texture._EnabledUnits = 0x0; + ctx->Texture._Enabled = GL_FALSE; - for (u = 0; u < Elements(ctx->Texture.Unit); u++) - init_texture_unit(ctx, u); - - /* After we're done initializing the context's texture state the default - * texture objects' refcounts should be at least - * MAX_COMBINED_TEXTURE_IMAGE_UNITS + 1. - */ - assert(ctx->Shared->DefaultTex[TEXTURE_1D_INDEX]->RefCount - >= MAX_COMBINED_TEXTURE_IMAGE_UNITS + 1); + init_texture_unit(ctx); /* Allocate proxy textures */ if (!alloc_proxy_textures( ctx )) return GL_FALSE; - /* GL_ARB_texture_buffer_object */ - _mesa_reference_buffer_object(ctx, &ctx->Texture.BufferObject, - ctx->Shared->NullBufferObj); - return GL_TRUE; } @@ -809,29 +613,22 @@ _mesa_init_texture(struct gl_context *ctx) void _mesa_free_texture_data(struct gl_context *ctx) { - GLuint u, tgt; + GLuint tgt; /* unreference current textures */ - for (u = 0; u < Elements(ctx->Texture.Unit); u++) { - /* The _Current texture could account for another reference */ - _mesa_reference_texobj(&ctx->Texture.Unit[u]._Current, NULL); + /* The _Current texture could account for another reference */ + _mesa_reference_texobj(&ctx->Texture.Unit._Current, NULL); - for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) { - _mesa_reference_texobj(&ctx->Texture.Unit[u].CurrentTex[tgt], NULL); - } + for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) { + _mesa_reference_texobj(&ctx->Texture.Unit.CurrentTex[tgt], NULL); } /* Free proxy texture objects */ for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) ctx->Driver.DeleteTexture(ctx, ctx->Texture.ProxyTex[tgt]); - /* GL_ARB_texture_buffer_object */ - _mesa_reference_buffer_object(ctx, &ctx->Texture.BufferObject, NULL); - #if FEATURE_sampler_objects - for (u = 0; u < Elements(ctx->Texture.Unit); u++) { - _mesa_reference_sampler_object(ctx, &ctx->Texture.Unit[u].Sampler, NULL); - } + _mesa_reference_sampler_object(ctx, &ctx->Texture.Unit.Sampler, NULL); #endif } @@ -844,13 +641,10 @@ _mesa_free_texture_data(struct gl_context *ctx) void _mesa_update_default_objects_texture(struct gl_context *ctx) { - GLuint u, tex; - - for (u = 0; u < Elements(ctx->Texture.Unit); u++) { - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[u]; - for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) { - _mesa_reference_texobj(&texUnit->CurrentTex[tex], - ctx->Shared->DefaultTex[tex]); - } + GLuint tex; + struct gl_texture_unit *texUnit = &ctx->Texture.Unit; + for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) { + _mesa_reference_texobj(&texUnit->CurrentTex[tex], + ctx->Shared->DefaultTex[tex]); } } diff --git a/dll/opengl/mesa/src/mesa/main/texstate.h b/dll/opengl/mesa/main/texstate.h similarity index 74% rename from dll/opengl/mesa/src/mesa/main/texstate.h rename to dll/opengl/mesa/main/texstate.h index 7dc6dc6a2cd..2183589d98b 100644 --- a/dll/opengl/mesa/src/mesa/main/texstate.h +++ b/dll/opengl/mesa/main/texstate.h @@ -36,38 +36,11 @@ #include "mtypes.h" -/** - * Return pointer to current texture unit. - * This the texture unit set by glActiveTexture(), not glClientActiveTexture(). - */ -static inline struct gl_texture_unit * -_mesa_get_current_tex_unit(struct gl_context *ctx) -{ - ASSERT(ctx->Texture.CurrentUnit < Elements(ctx->Texture.Unit)); - return &(ctx->Texture.Unit[ctx->Texture.CurrentUnit]); -} - - extern void _mesa_copy_texture_state( const struct gl_context *src, struct gl_context *dst ); extern void -_mesa_print_texunit_state( struct gl_context *ctx, GLuint unit ); - - - -/** - * \name Called from API - */ -/*@{*/ - -extern void GLAPIENTRY -_mesa_ActiveTextureARB( GLenum target ); - -extern void GLAPIENTRY -_mesa_ClientActiveTextureARB( GLenum target ); - -/*@}*/ +_mesa_print_texunit_state( struct gl_context *ctx ); /** diff --git a/dll/opengl/mesa/src/mesa/main/texstorage.c b/dll/opengl/mesa/main/texstorage.c similarity index 94% rename from dll/opengl/mesa/src/mesa/main/texstorage.c rename to dll/opengl/mesa/main/texstorage.c index 5e1f31a9377..a70305db38d 100644 --- a/dll/opengl/mesa/src/mesa/main/texstorage.c +++ b/dll/opengl/mesa/main/texstorage.c @@ -67,13 +67,6 @@ legal_texobj_target(struct gl_context *ctx, GLuint dims, GLenum target) case GL_TEXTURE_CUBE_MAP: case GL_PROXY_TEXTURE_CUBE_MAP: return ctx->Extensions.ARB_texture_cube_map; - case GL_TEXTURE_RECTANGLE: - case GL_PROXY_TEXTURE_RECTANGLE: - return ctx->Extensions.NV_texture_rectangle; - case GL_TEXTURE_1D_ARRAY: - case GL_PROXY_TEXTURE_1D_ARRAY: - return (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); default: return GL_FALSE; } @@ -82,10 +75,6 @@ legal_texobj_target(struct gl_context *ctx, GLuint dims, GLenum target) case GL_TEXTURE_3D: case GL_PROXY_TEXTURE_3D: return GL_TRUE; - case GL_TEXTURE_2D_ARRAY: - case GL_PROXY_TEXTURE_2D_ARRAY: - return (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); default: return GL_FALSE; } @@ -107,11 +96,11 @@ next_mipmap_level_size(GLenum target, *width /= 2; } - if ((*height > 1) && (target != GL_TEXTURE_1D_ARRAY)) { + if (*height > 1) { *height /= 2; } - if ((*depth > 1) && (target != GL_TEXTURE_2D_ARRAY)) { + if (*depth > 1) { *depth /= 2; } } @@ -292,7 +281,7 @@ tex_storage_error_check(struct gl_context *ctx, GLuint dims, GLenum target, } /* non-default texture object check */ - texObj = _mesa_get_current_tex_object(ctx, target); + texObj = _mesa_select_tex_object(ctx, target); if (!texObj || (texObj->Name == 0 && !isProxy)) { if (!isProxy) { _mesa_error(ctx, GL_INVALID_OPERATION, @@ -326,7 +315,7 @@ texstorage(GLuint dims, GLenum target, GLsizei levels, GLenum internalformat, GET_CURRENT_CONTEXT(ctx); - texObj = _mesa_get_current_tex_object(ctx, target); + texObj = _mesa_select_tex_object(ctx, target); error = tex_storage_error_check(ctx, dims, target, levels, internalformat, width, height, depth); diff --git a/dll/opengl/mesa/src/mesa/main/texstorage.h b/dll/opengl/mesa/main/texstorage.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/texstorage.h rename to dll/opengl/mesa/main/texstorage.h diff --git a/dll/opengl/mesa/src/mesa/main/texstore.c b/dll/opengl/mesa/main/texstore.c similarity index 71% rename from dll/opengl/mesa/src/mesa/main/texstore.c rename to dll/opengl/mesa/main/texstore.c index f5cd1000446..1c30455d618 100644 --- a/dll/opengl/mesa/src/mesa/main/texstore.c +++ b/dll/opengl/mesa/main/texstore.c @@ -57,22 +57,13 @@ #include "colormac.h" #include "image.h" #include "macros.h" -#include "mipmap.h" #include "mfeatures.h" #include "mtypes.h" #include "pack.h" -#include "pbo.h" #include "imports.h" -#include "texcompress.h" -#include "texcompress_fxt1.h" -#include "texcompress_rgtc.h" -#include "texcompress_s3tc.h" -#include "texcompress_etc.h" #include "teximage.h" #include "texstore.h" #include "enums.h" -#include "../../gallium/auxiliary/util/u_format_rgb9e5.h" -#include "../../gallium/auxiliary/util/u_format_r11g11b10f.h" enum { @@ -1945,82 +1936,6 @@ _mesa_texstore_argb1555(TEXSTORE_PARAMS) return GL_TRUE; } - -static GLboolean -_mesa_texstore_argb2101010(TEXSTORE_PARAMS) -{ - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_ARGB2101010); - ASSERT(_mesa_get_format_bytes(dstFormat) == 4); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - dstFormat == MESA_FORMAT_ARGB2101010 && - srcFormat == GL_BGRA && - srcType == GL_UNSIGNED_INT_2_10_10_10_REV && - baseInternalFormat == GL_RGBA) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = dstSlices[img]; - if (baseInternalFormat == GL_RGBA) { - for (row = 0; row < srcHeight; row++) { - GLuint *dstUI = (GLuint *) dstRow; - for (col = 0; col < srcWidth; col++) { - GLushort a,r,g,b; - - UNCLAMPED_FLOAT_TO_USHORT(a, src[ACOMP]); - UNCLAMPED_FLOAT_TO_USHORT(r, src[RCOMP]); - UNCLAMPED_FLOAT_TO_USHORT(g, src[GCOMP]); - UNCLAMPED_FLOAT_TO_USHORT(b, src[BCOMP]); - dstUI[col] = PACK_COLOR_2101010_US(a, r, g, b); - src += 4; - } - dstRow += dstRowStride; - } - } else if (baseInternalFormat == GL_RGB) { - for (row = 0; row < srcHeight; row++) { - GLuint *dstUI = (GLuint *) dstRow; - for (col = 0; col < srcWidth; col++) { - GLushort r,g,b; - - UNCLAMPED_FLOAT_TO_USHORT(r, src[RCOMP]); - UNCLAMPED_FLOAT_TO_USHORT(g, src[GCOMP]); - UNCLAMPED_FLOAT_TO_USHORT(b, src[BCOMP]); - dstUI[col] = PACK_COLOR_2101010_US(0xffff, r, g, b); - src += 4; - } - dstRow += dstRowStride; - } - } else { - ASSERT(0); - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - /** * Do texstore for 2-channel, 4-bit/channel, unsigned normalized formats. */ @@ -2073,18 +1988,14 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS) const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); ASSERT(dstFormat == MESA_FORMAT_AL88 || - dstFormat == MESA_FORMAT_AL88_REV || - dstFormat == MESA_FORMAT_GR88 || - dstFormat == MESA_FORMAT_RG88); + dstFormat == MESA_FORMAT_AL88_REV); ASSERT(_mesa_get_format_bytes(dstFormat) == 2); if (!ctx->_ImageTransferState && !srcPacking->SwapBytes && - ((dstFormat == MESA_FORMAT_AL88 && + (dstFormat == MESA_FORMAT_AL88 && baseInternalFormat == GL_LUMINANCE_ALPHA && - srcFormat == GL_LUMINANCE_ALPHA) || - (dstFormat == MESA_FORMAT_GR88 && - baseInternalFormat == srcFormat)) && + srcFormat == GL_LUMINANCE_ALPHA) && srcType == GL_UNSIGNED_BYTE && littleEndian) { /* simple memcpy path */ @@ -2114,17 +2025,6 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS) dstmap[1] = 0; } } - else { - if ((littleEndian && dstFormat == MESA_FORMAT_GR88) || - (!littleEndian && dstFormat == MESA_FORMAT_RG88)) { - dstmap[0] = 0; - dstmap[1] = 1; - } - else { - dstmap[0] = 1; - dstmap[1] = 0; - } - } dstmap[2] = ZERO; /* ? */ dstmap[3] = ONE; /* ? */ @@ -2153,8 +2053,7 @@ _mesa_texstore_unorm88(TEXSTORE_PARAMS) GLubyte *dstRow = dstSlices[img]; for (row = 0; row < srcHeight; row++) { GLushort *dstUS = (GLushort *) dstRow; - if (dstFormat == MESA_FORMAT_AL88 || - dstFormat == MESA_FORMAT_GR88) { + if (dstFormat == MESA_FORMAT_AL88) { for (col = 0; col < srcWidth; col++) { /* src[0] is luminance (or R), src[1] is alpha (or G) */ dstUS[col] = PACK_COLOR_88( src[1], @@ -2196,11 +2095,9 @@ _mesa_texstore_unorm1616(TEXSTORE_PARAMS) if (!ctx->_ImageTransferState && !srcPacking->SwapBytes && - ((dstFormat == MESA_FORMAT_AL1616 && + (dstFormat == MESA_FORMAT_AL1616 && baseInternalFormat == GL_LUMINANCE_ALPHA && - srcFormat == GL_LUMINANCE_ALPHA) || - (dstFormat == MESA_FORMAT_RG1616 && - baseInternalFormat == srcFormat)) && + srcFormat == GL_LUMINANCE_ALPHA) && srcType == GL_UNSIGNED_SHORT && littleEndian) { /* simple memcpy path */ @@ -2227,8 +2124,7 @@ _mesa_texstore_unorm1616(TEXSTORE_PARAMS) GLubyte *dstRow = dstSlices[img]; for (row = 0; row < srcHeight; row++) { GLuint *dstUI = (GLuint *) dstRow; - if (dstFormat == MESA_FORMAT_AL1616 || - dstFormat == MESA_FORMAT_RG1616) { + if (dstFormat == MESA_FORMAT_AL1616) { for (col = 0; col < srcWidth; col++) { GLushort l, a; @@ -2623,604 +2519,6 @@ _mesa_texstore_ycbcr(TEXSTORE_PARAMS) return GL_TRUE; } -static GLboolean -_mesa_texstore_dudv8(TEXSTORE_PARAMS) -{ - const GLboolean littleEndian = _mesa_little_endian(); - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_DUDV8); - ASSERT(texelBytes == 2); - ASSERT(ctx->Extensions.ATI_envmap_bumpmap); - ASSERT((srcFormat == GL_DU8DV8_ATI) || - (srcFormat == GL_DUDV_ATI)); - ASSERT(baseInternalFormat == GL_DUDV_ATI); - - if (!srcPacking->SwapBytes && srcType == GL_BYTE && - littleEndian) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else if (srcType == GL_BYTE) { - GLubyte dstmap[4]; - - /* dstmap - how to swizzle from RGBA to dst format: - */ - if (littleEndian) { - dstmap[0] = 0; - dstmap[1] = 3; - } - else { - dstmap[0] = 3; - dstmap[1] = 0; - } - dstmap[2] = ZERO; /* ? */ - dstmap[3] = ONE; /* ? */ - - _mesa_swizzle_ubyte_image(ctx, dims, - GL_LUMINANCE_ALPHA, /* hack */ - GL_UNSIGNED_BYTE, /* hack */ - GL_LUMINANCE_ALPHA, /* hack */ - dstmap, 2, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, srcAddr, - srcPacking); - } - else { - /* general path - note this is defined for 2d textures only */ - const GLint components = _mesa_components_in_format(baseInternalFormat); - const GLint srcStride = _mesa_image_row_stride(srcPacking, srcWidth, - srcFormat, srcType); - GLbyte *tempImage, *dst, *src; - GLint row; - - tempImage = (GLbyte *) malloc(srcWidth * srcHeight * srcDepth - * components * sizeof(GLbyte)); - if (!tempImage) - return GL_FALSE; - - src = (GLbyte *) _mesa_image_address(dims, srcPacking, srcAddr, - srcWidth, srcHeight, - srcFormat, srcType, - 0, 0, 0); - - dst = tempImage; - for (row = 0; row < srcHeight; row++) { - _mesa_unpack_dudv_span_byte(ctx, srcWidth, baseInternalFormat, - dst, srcFormat, srcType, src, - srcPacking, 0); - dst += srcWidth * components; - src += srcStride; - } - - src = tempImage; - dst = (GLbyte *) dstSlices[0]; - for (row = 0; row < srcHeight; row++) { - memcpy(dst, src, srcWidth * texelBytes); - dst += dstRowStride; - src += srcWidth * texelBytes; - } - free((void *) tempImage); - } - return GL_TRUE; -} - - -/** - * Store a texture in a signed normalized 8-bit format. - */ -static GLboolean -_mesa_texstore_snorm8(TEXSTORE_PARAMS) -{ - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_SIGNED_A8 || - dstFormat == MESA_FORMAT_SIGNED_L8 || - dstFormat == MESA_FORMAT_SIGNED_I8 || - dstFormat == MESA_FORMAT_SIGNED_R8); - ASSERT(_mesa_get_format_bytes(dstFormat) == 1); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - srcType == GL_BYTE) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLbyte *dstRow = (GLbyte *) dstSlices[img]; - for (row = 0; row < srcHeight; row++) { - for (col = 0; col < srcWidth; col++) { - dstRow[col] = FLOAT_TO_BYTE_TEX(src[col]); - } - dstRow += dstRowStride; - src += srcWidth; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - -/** - * Store a texture in a signed normalized two-channel 16-bit format. - */ -static GLboolean -_mesa_texstore_snorm88(TEXSTORE_PARAMS) -{ - const GLboolean littleEndian = _mesa_little_endian(); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_SIGNED_AL88 || - dstFormat == MESA_FORMAT_SIGNED_RG88_REV); - ASSERT(_mesa_get_format_bytes(dstFormat) == 2); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - srcType == GL_BYTE && - littleEndian) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLbyte *dstRow = (GLbyte *) dstSlices[img]; - for (row = 0; row < srcHeight; row++) { - GLbyte *dst = dstRow; - for (col = 0; col < srcWidth; col++) { - dst[0] = FLOAT_TO_BYTE_TEX(src[0]); - dst[1] = FLOAT_TO_BYTE_TEX(src[1]); - src += 2; - dst += 2; - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - -/* Texstore for signed R16, A16, L16, I16. */ -static GLboolean -_mesa_texstore_snorm16(TEXSTORE_PARAMS) -{ - const GLboolean littleEndian = _mesa_little_endian(); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_SIGNED_R16 || - dstFormat == MESA_FORMAT_SIGNED_A16 || - dstFormat == MESA_FORMAT_SIGNED_L16 || - dstFormat == MESA_FORMAT_SIGNED_I16); - ASSERT(_mesa_get_format_bytes(dstFormat) == 2); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - srcType == GL_SHORT && - littleEndian) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = dstSlices[img]; - for (row = 0; row < srcHeight; row++) { - GLshort *dstUS = (GLshort *) dstRow; - for (col = 0; col < srcWidth; col++) { - GLushort r; - - UNCLAMPED_FLOAT_TO_SHORT(r, src[0]); - dstUS[col] = r; - src += 1; - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - -/** - * Do texstore for 2-channel, 16-bit/channel, signed normalized formats. - */ -static GLboolean -_mesa_texstore_snorm1616(TEXSTORE_PARAMS) -{ - const GLboolean littleEndian = _mesa_little_endian(); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_SIGNED_AL1616 || - dstFormat == MESA_FORMAT_SIGNED_GR1616); - ASSERT(_mesa_get_format_bytes(dstFormat) == 4); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - srcType == GL_SHORT && - littleEndian) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = dstSlices[img]; - for (row = 0; row < srcHeight; row++) { - GLshort *dst = (GLshort *) dstRow; - for (col = 0; col < srcWidth; col++) { - GLushort l, a; - - UNCLAMPED_FLOAT_TO_SHORT(l, src[0]); - UNCLAMPED_FLOAT_TO_SHORT(a, src[1]); - dst[0] = l; - dst[1] = a; - src += 2; - dst += 2; - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - -/** - * Store a texture in MESA_FORMAT_SIGNED_RGBX8888. - */ -static GLboolean -_mesa_texstore_signed_rgbx8888(TEXSTORE_PARAMS) -{ - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_SIGNED_RGBX8888); - ASSERT(_mesa_get_format_bytes(dstFormat) == 4); - - { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *srcRow = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLbyte *dstRow = (GLbyte *) dstSlices[img]; - for (row = 0; row < srcHeight; row++) { - GLbyte *dst = dstRow; - for (col = 0; col < srcWidth; col++) { - dst[3] = FLOAT_TO_BYTE_TEX(srcRow[RCOMP]); - dst[2] = FLOAT_TO_BYTE_TEX(srcRow[GCOMP]); - dst[1] = FLOAT_TO_BYTE_TEX(srcRow[BCOMP]); - dst[0] = 127; - srcRow += 3; - dst += 4; - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - - -/** - * Store a texture in MESA_FORMAT_SIGNED_RGBA8888 or - * MESA_FORMAT_SIGNED_RGBA8888_REV - */ -static GLboolean -_mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS) -{ - const GLboolean littleEndian = _mesa_little_endian(); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_SIGNED_RGBA8888 || - dstFormat == MESA_FORMAT_SIGNED_RGBA8888_REV); - ASSERT(_mesa_get_format_bytes(dstFormat) == 4); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - dstFormat == MESA_FORMAT_SIGNED_RGBA8888 && - baseInternalFormat == GL_RGBA && - ((srcFormat == GL_RGBA && srcType == GL_BYTE && !littleEndian) || - (srcFormat == GL_ABGR_EXT && srcType == GL_BYTE && littleEndian))) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - dstFormat == MESA_FORMAT_SIGNED_RGBA8888_REV && - baseInternalFormat == GL_RGBA && - ((srcFormat == GL_RGBA && srcType == GL_BYTE && littleEndian) || - (srcFormat == GL_ABGR_EXT && srcType == GL_BYTE && !littleEndian))) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *srcRow = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLbyte *dstRow = (GLbyte *) dstSlices[img]; - for (row = 0; row < srcHeight; row++) { - GLbyte *dst = dstRow; - if (dstFormat == MESA_FORMAT_SIGNED_RGBA8888) { - for (col = 0; col < srcWidth; col++) { - dst[3] = FLOAT_TO_BYTE_TEX(srcRow[RCOMP]); - dst[2] = FLOAT_TO_BYTE_TEX(srcRow[GCOMP]); - dst[1] = FLOAT_TO_BYTE_TEX(srcRow[BCOMP]); - dst[0] = FLOAT_TO_BYTE_TEX(srcRow[ACOMP]); - srcRow += 4; - dst += 4; - } - } - else { - for (col = 0; col < srcWidth; col++) { - dst[0] = FLOAT_TO_BYTE_TEX(srcRow[RCOMP]); - dst[1] = FLOAT_TO_BYTE_TEX(srcRow[GCOMP]); - dst[2] = FLOAT_TO_BYTE_TEX(srcRow[BCOMP]); - dst[3] = FLOAT_TO_BYTE_TEX(srcRow[ACOMP]); - srcRow += 4; - dst += 4; - } - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - -/** - * Store a combined depth/stencil texture image. - */ -static GLboolean -_mesa_texstore_z24_s8(TEXSTORE_PARAMS) -{ - const GLuint depthScale = 0xffffff; - const GLint srcRowStride - = _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType); - GLint img, row; - - ASSERT(dstFormat == MESA_FORMAT_Z24_S8); - ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT || - srcFormat == GL_DEPTH_COMPONENT || - srcFormat == GL_STENCIL_INDEX); - ASSERT(srcFormat != GL_DEPTH_STENCIL_EXT || srcType == GL_UNSIGNED_INT_24_8_EXT); - - if (srcFormat == GL_DEPTH_STENCIL && ctx->Pixel.DepthScale == 1.0f && - ctx->Pixel.DepthBias == 0.0f && - !srcPacking->SwapBytes) { - /* simple path */ - memcpy_texture(ctx, dims, - dstFormat, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else if (srcFormat == GL_DEPTH_COMPONENT || - srcFormat == GL_STENCIL_INDEX) { - /* In case we only upload depth we need to preserve the stencil */ - for (img = 0; img < srcDepth; img++) { - GLuint *dstRow = (GLuint *) dstSlices[img]; - const GLubyte *src - = (const GLubyte *) _mesa_image_address(dims, srcPacking, srcAddr, - srcWidth, srcHeight, - srcFormat, srcType, - img, 0, 0); - for (row = 0; row < srcHeight; row++) { - GLuint depth[MAX_WIDTH]; - GLubyte stencil[MAX_WIDTH]; - GLint i; - GLboolean keepdepth = GL_FALSE, keepstencil = GL_FALSE; - - if (srcFormat == GL_DEPTH_COMPONENT) { /* preserve stencil */ - keepstencil = GL_TRUE; - } - else if (srcFormat == GL_STENCIL_INDEX) { /* preserve depth */ - keepdepth = GL_TRUE; - } - - if (keepdepth == GL_FALSE) - /* the 24 depth bits will be in the low position: */ - _mesa_unpack_depth_span(ctx, srcWidth, - GL_UNSIGNED_INT, /* dst type */ - keepstencil ? depth : dstRow, /* dst addr */ - depthScale, - srcType, src, srcPacking); - - if (keepstencil == GL_FALSE) - /* get the 8-bit stencil values */ - _mesa_unpack_stencil_span(ctx, srcWidth, - GL_UNSIGNED_BYTE, /* dst type */ - stencil, /* dst addr */ - srcType, src, srcPacking, - ctx->_ImageTransferState); - - for (i = 0; i < srcWidth; i++) { - if (keepstencil) - dstRow[i] = depth[i] << 8 | (dstRow[i] & 0x000000FF); - else - dstRow[i] = (dstRow[i] & 0xFFFFFF00) | (stencil[i] & 0xFF); - } - - src += srcRowStride; - dstRow += dstRowStride / sizeof(GLuint); - } - } - } - return GL_TRUE; -} - - -/** - * Store a combined depth/stencil texture image. - */ -static GLboolean -_mesa_texstore_s8_z24(TEXSTORE_PARAMS) -{ - const GLuint depthScale = 0xffffff; - const GLint srcRowStride - = _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType); - GLint img, row; - - ASSERT(dstFormat == MESA_FORMAT_S8_Z24); - ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT || - srcFormat == GL_DEPTH_COMPONENT || - srcFormat == GL_STENCIL_INDEX); - ASSERT(srcFormat != GL_DEPTH_STENCIL_EXT || - srcType == GL_UNSIGNED_INT_24_8_EXT); - - for (img = 0; img < srcDepth; img++) { - GLuint *dstRow = (GLuint *) dstSlices[img]; - const GLubyte *src - = (const GLubyte *) _mesa_image_address(dims, srcPacking, srcAddr, - srcWidth, srcHeight, - srcFormat, srcType, - img, 0, 0); - for (row = 0; row < srcHeight; row++) { - GLuint depth[MAX_WIDTH]; - GLubyte stencil[MAX_WIDTH]; - GLint i; - GLboolean keepdepth = GL_FALSE, keepstencil = GL_FALSE; - - if (srcFormat == GL_DEPTH_COMPONENT) { /* preserve stencil */ - keepstencil = GL_TRUE; - } - else if (srcFormat == GL_STENCIL_INDEX) { /* preserve depth */ - keepdepth = GL_TRUE; - } - - if (keepdepth == GL_FALSE) - /* the 24 depth bits will be in the low position: */ - _mesa_unpack_depth_span(ctx, srcWidth, - GL_UNSIGNED_INT, /* dst type */ - keepstencil ? depth : dstRow, /* dst addr */ - depthScale, - srcType, src, srcPacking); - - if (keepstencil == GL_FALSE) - /* get the 8-bit stencil values */ - _mesa_unpack_stencil_span(ctx, srcWidth, - GL_UNSIGNED_BYTE, /* dst type */ - stencil, /* dst addr */ - srcType, src, srcPacking, - ctx->_ImageTransferState); - - /* merge stencil values into depth values */ - for (i = 0; i < srcWidth; i++) { - if (keepstencil) - dstRow[i] = depth[i] | (dstRow[i] & 0xFF000000); - else - dstRow[i] = (dstRow[i] & 0xFFFFFF) | (stencil[i] << 24); - - } - src += srcRowStride; - dstRow += dstRowStride / sizeof(GLuint); - } - } - return GL_TRUE; -} - - /** * Store simple 8-bit/value stencil texture data. */ @@ -3835,340 +3133,6 @@ _mesa_texstore_rgba_uint32(TEXSTORE_PARAMS) return GL_TRUE; } - - - -#if FEATURE_EXT_texture_sRGB -static GLboolean -_mesa_texstore_srgb8(TEXSTORE_PARAMS) -{ - gl_format newDstFormat; - GLboolean k; - - ASSERT(dstFormat == MESA_FORMAT_SRGB8); - - /* reuse normal rgb texstore code */ - newDstFormat = MESA_FORMAT_RGB888; - - k = _mesa_texstore_rgb888(ctx, dims, baseInternalFormat, - newDstFormat, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, - srcAddr, srcPacking); - return k; -} - - -static GLboolean -_mesa_texstore_srgba8(TEXSTORE_PARAMS) -{ - gl_format newDstFormat; - GLboolean k; - - ASSERT(dstFormat == MESA_FORMAT_SRGBA8); - - /* reuse normal rgba texstore code */ - newDstFormat = MESA_FORMAT_RGBA8888; - k = _mesa_texstore_rgba8888(ctx, dims, baseInternalFormat, - newDstFormat, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, - srcAddr, srcPacking); - return k; -} - - -static GLboolean -_mesa_texstore_sargb8(TEXSTORE_PARAMS) -{ - gl_format newDstFormat; - GLboolean k; - - ASSERT(dstFormat == MESA_FORMAT_SARGB8); - - /* reuse normal rgba texstore code */ - newDstFormat = MESA_FORMAT_ARGB8888; - - k = _mesa_texstore_argb8888(ctx, dims, baseInternalFormat, - newDstFormat, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, - srcAddr, srcPacking); - return k; -} - - -static GLboolean -_mesa_texstore_sl8(TEXSTORE_PARAMS) -{ - gl_format newDstFormat; - GLboolean k; - - ASSERT(dstFormat == MESA_FORMAT_SL8); - - newDstFormat = MESA_FORMAT_L8; - - /* _mesa_textore_a8 handles luminance8 too */ - k = _mesa_texstore_unorm8(ctx, dims, baseInternalFormat, - newDstFormat, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, - srcAddr, srcPacking); - return k; -} - - -static GLboolean -_mesa_texstore_sla8(TEXSTORE_PARAMS) -{ - gl_format newDstFormat; - GLboolean k; - - ASSERT(dstFormat == MESA_FORMAT_SLA8); - - /* reuse normal luminance/alpha texstore code */ - newDstFormat = MESA_FORMAT_AL88; - - k = _mesa_texstore_unorm88(ctx, dims, baseInternalFormat, - newDstFormat, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, - srcAddr, srcPacking); - return k; -} - -#else - -/* these are used only in texstore_funcs[] below */ -#define _mesa_texstore_srgb8 NULL -#define _mesa_texstore_srgba8 NULL -#define _mesa_texstore_sargb8 NULL -#define _mesa_texstore_sl8 NULL -#define _mesa_texstore_sla8 NULL - -#endif /* FEATURE_EXT_texture_sRGB */ - -static GLboolean -_mesa_texstore_rgb9_e5(TEXSTORE_PARAMS) -{ - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_RGB9_E5_FLOAT); - ASSERT(baseInternalFormat == GL_RGB); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - srcFormat == GL_RGB && - srcType == GL_UNSIGNED_INT_5_9_9_9_REV) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *srcRow = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = dstSlices[img]; - for (row = 0; row < srcHeight; row++) { - GLuint *dstUI = (GLuint*)dstRow; - for (col = 0; col < srcWidth; col++) { - dstUI[col] = float3_to_rgb9e5(&srcRow[col * 3]); - } - dstRow += dstRowStride; - srcRow += srcWidth * 3; - } - } - - free((void *) tempImage); - } - return GL_TRUE; -} - -static GLboolean -_mesa_texstore_r11_g11_b10f(TEXSTORE_PARAMS) -{ - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_R11_G11_B10_FLOAT); - ASSERT(baseInternalFormat == GL_RGB); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - srcFormat == GL_RGB && - srcType == GL_UNSIGNED_INT_10F_11F_11F_REV) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *srcRow = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = dstSlices[img]; - for (row = 0; row < srcHeight; row++) { - GLuint *dstUI = (GLuint*)dstRow; - for (col = 0; col < srcWidth; col++) { - dstUI[col] = float3_to_r11g11b10f(&srcRow[col * 3]); - } - dstRow += dstRowStride; - srcRow += srcWidth * 3; - } - } - - free((void *) tempImage); - } - return GL_TRUE; -} - - -static GLboolean -_mesa_texstore_z32f_x24s8(TEXSTORE_PARAMS) -{ - ASSERT(dstFormat == MESA_FORMAT_Z32_FLOAT_X24S8); - ASSERT(srcFormat == GL_DEPTH_STENCIL || - srcFormat == GL_DEPTH_COMPONENT || - srcFormat == GL_STENCIL_INDEX); - ASSERT(srcFormat != GL_DEPTH_STENCIL || - srcType == GL_FLOAT_32_UNSIGNED_INT_24_8_REV); - - if (srcFormat == GL_DEPTH_STENCIL && - ctx->Pixel.DepthScale == 1.0f && - ctx->Pixel.DepthBias == 0.0f && - !srcPacking->SwapBytes) { - /* simple path */ - memcpy_texture(ctx, dims, - dstFormat, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else if (srcFormat == GL_DEPTH_COMPONENT || - srcFormat == GL_STENCIL_INDEX) { - GLint img, row; - const GLint srcRowStride - = _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType) - / sizeof(uint64_t); - - /* In case we only upload depth we need to preserve the stencil */ - for (img = 0; img < srcDepth; img++) { - uint64_t *dstRow = (uint64_t *) dstSlices[img]; - const uint64_t *src - = (const uint64_t *) _mesa_image_address(dims, srcPacking, srcAddr, - srcWidth, srcHeight, - srcFormat, srcType, - img, 0, 0); - for (row = 0; row < srcHeight; row++) { - /* The unpack functions with: - * dstType = GL_FLOAT_32_UNSIGNED_INT_24_8_REV - * only write their own dword, so the other dword (stencil - * or depth) is preserved. */ - if (srcFormat != GL_STENCIL_INDEX) - _mesa_unpack_depth_span(ctx, srcWidth, - GL_FLOAT_32_UNSIGNED_INT_24_8_REV, /* dst type */ - dstRow, /* dst addr */ - ~0U, srcType, src, srcPacking); - - if (srcFormat != GL_DEPTH_COMPONENT) - _mesa_unpack_stencil_span(ctx, srcWidth, - GL_FLOAT_32_UNSIGNED_INT_24_8_REV, /* dst type */ - dstRow, /* dst addr */ - srcType, src, srcPacking, - ctx->_ImageTransferState); - - src += srcRowStride; - dstRow += dstRowStride / sizeof(uint64_t); - } - } - } - return GL_TRUE; -} - -static GLboolean -_mesa_texstore_argb2101010_uint(TEXSTORE_PARAMS) -{ - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_ARGB2101010_UINT); - ASSERT(_mesa_get_format_bytes(dstFormat) == 4); - - if (!srcPacking->SwapBytes && - dstFormat == MESA_FORMAT_ARGB2101010_UINT && - srcFormat == GL_BGRA_INTEGER_EXT && - srcType == GL_UNSIGNED_INT_2_10_10_10_REV && - baseInternalFormat == GL_RGBA) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, - dstRowStride, dstSlices, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLuint *tempImage = make_temp_uint_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, - srcDepth, srcFormat, - srcType, srcAddr, - srcPacking); - const GLuint *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = dstSlices[img]; - - for (row = 0; row < srcHeight; row++) { - GLuint *dstUI = (GLuint *) dstRow; - for (col = 0; col < srcWidth; col++) { - GLushort a,r,g,b; - r = src[RCOMP]; - g = src[GCOMP]; - b = src[BCOMP]; - a = src[ACOMP]; - dstUI[col] = (a << 30) | (r << 20) | (g << 10) | (b); - src += 4; - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - static GLboolean _mesa_texstore_null(TEXSTORE_PARAMS) { @@ -4230,35 +3194,11 @@ _mesa_get_texstore_func(gl_format format) table[MESA_FORMAT_I16] = _mesa_texstore_unorm16; table[MESA_FORMAT_YCBCR] = _mesa_texstore_ycbcr; table[MESA_FORMAT_YCBCR_REV] = _mesa_texstore_ycbcr; - table[MESA_FORMAT_R8] = _mesa_texstore_unorm8; - table[MESA_FORMAT_GR88] = _mesa_texstore_unorm88; - table[MESA_FORMAT_RG88] = _mesa_texstore_unorm88; - table[MESA_FORMAT_R16] = _mesa_texstore_unorm16; - table[MESA_FORMAT_RG1616] = _mesa_texstore_unorm1616; - table[MESA_FORMAT_RG1616_REV] = _mesa_texstore_unorm1616; - table[MESA_FORMAT_ARGB2101010] = _mesa_texstore_argb2101010; - table[MESA_FORMAT_Z24_S8] = _mesa_texstore_z24_s8; - table[MESA_FORMAT_S8_Z24] = _mesa_texstore_s8_z24; table[MESA_FORMAT_Z16] = _mesa_texstore_z16; table[MESA_FORMAT_X8_Z24] = _mesa_texstore_x8_z24; table[MESA_FORMAT_Z24_X8] = _mesa_texstore_z24_x8; table[MESA_FORMAT_Z32] = _mesa_texstore_z32; table[MESA_FORMAT_S8] = _mesa_texstore_s8; - table[MESA_FORMAT_SRGB8] = _mesa_texstore_srgb8; - table[MESA_FORMAT_SRGBA8] = _mesa_texstore_srgba8; - table[MESA_FORMAT_SARGB8] = _mesa_texstore_sargb8; - table[MESA_FORMAT_SL8] = _mesa_texstore_sl8; - table[MESA_FORMAT_SLA8] = _mesa_texstore_sla8; - table[MESA_FORMAT_SRGB_DXT1] = _mesa_texstore_rgb_dxt1; - table[MESA_FORMAT_SRGBA_DXT1] = _mesa_texstore_rgba_dxt1; - table[MESA_FORMAT_SRGBA_DXT3] = _mesa_texstore_rgba_dxt3; - table[MESA_FORMAT_SRGBA_DXT5] = _mesa_texstore_rgba_dxt5; - table[MESA_FORMAT_RGB_FXT1] = _mesa_texstore_rgb_fxt1; - table[MESA_FORMAT_RGBA_FXT1] = _mesa_texstore_rgba_fxt1; - table[MESA_FORMAT_RGB_DXT1] = _mesa_texstore_rgb_dxt1; - table[MESA_FORMAT_RGBA_DXT1] = _mesa_texstore_rgba_dxt1; - table[MESA_FORMAT_RGBA_DXT3] = _mesa_texstore_rgba_dxt3; - table[MESA_FORMAT_RGBA_DXT5] = _mesa_texstore_rgba_dxt5; table[MESA_FORMAT_RGBA_FLOAT32] = _mesa_texstore_rgba_float32; table[MESA_FORMAT_RGBA_FLOAT16] = _mesa_texstore_rgba_float16; table[MESA_FORMAT_RGB_FLOAT32] = _mesa_texstore_rgba_float32; @@ -4271,42 +3211,8 @@ _mesa_get_texstore_func(gl_format format) table[MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16] = _mesa_texstore_rgba_float16; table[MESA_FORMAT_INTENSITY_FLOAT32] = _mesa_texstore_rgba_float32; table[MESA_FORMAT_INTENSITY_FLOAT16] = _mesa_texstore_rgba_float16; - table[MESA_FORMAT_R_FLOAT32] = _mesa_texstore_rgba_float32; - table[MESA_FORMAT_R_FLOAT16] = _mesa_texstore_rgba_float16; - table[MESA_FORMAT_RG_FLOAT32] = _mesa_texstore_rgba_float32; - table[MESA_FORMAT_RG_FLOAT16] = _mesa_texstore_rgba_float16; - table[MESA_FORMAT_DUDV8] = _mesa_texstore_dudv8; - table[MESA_FORMAT_SIGNED_R8] = _mesa_texstore_snorm8; - table[MESA_FORMAT_SIGNED_RG88_REV] = _mesa_texstore_snorm88; - table[MESA_FORMAT_SIGNED_RGBX8888] = _mesa_texstore_signed_rgbx8888; - table[MESA_FORMAT_SIGNED_RGBA8888] = _mesa_texstore_signed_rgba8888; - table[MESA_FORMAT_SIGNED_RGBA8888_REV] = _mesa_texstore_signed_rgba8888; - table[MESA_FORMAT_SIGNED_R16] = _mesa_texstore_snorm16; - table[MESA_FORMAT_SIGNED_GR1616] = _mesa_texstore_snorm1616; - table[MESA_FORMAT_SIGNED_RGB_16] = _mesa_texstore_signed_rgba_16; table[MESA_FORMAT_SIGNED_RGBA_16] = _mesa_texstore_signed_rgba_16; table[MESA_FORMAT_RGBA_16] = _mesa_texstore_rgba_16; - table[MESA_FORMAT_RED_RGTC1] = _mesa_texstore_red_rgtc1; - table[MESA_FORMAT_SIGNED_RED_RGTC1] = _mesa_texstore_signed_red_rgtc1; - table[MESA_FORMAT_RG_RGTC2] = _mesa_texstore_rg_rgtc2; - table[MESA_FORMAT_SIGNED_RG_RGTC2] = _mesa_texstore_signed_rg_rgtc2; - table[MESA_FORMAT_L_LATC1] = _mesa_texstore_red_rgtc1; - table[MESA_FORMAT_SIGNED_L_LATC1] = _mesa_texstore_signed_red_rgtc1; - table[MESA_FORMAT_LA_LATC2] = _mesa_texstore_rg_rgtc2; - table[MESA_FORMAT_SIGNED_LA_LATC2] = _mesa_texstore_signed_rg_rgtc2; - table[MESA_FORMAT_ETC1_RGB8] = _mesa_texstore_etc1_rgb8; - table[MESA_FORMAT_SIGNED_A8] = _mesa_texstore_snorm8; - table[MESA_FORMAT_SIGNED_L8] = _mesa_texstore_snorm8; - table[MESA_FORMAT_SIGNED_AL88] = _mesa_texstore_snorm88; - table[MESA_FORMAT_SIGNED_I8] = _mesa_texstore_snorm8; - table[MESA_FORMAT_SIGNED_A16] = _mesa_texstore_snorm16; - table[MESA_FORMAT_SIGNED_L16] = _mesa_texstore_snorm16; - table[MESA_FORMAT_SIGNED_AL1616] = _mesa_texstore_snorm1616; - table[MESA_FORMAT_SIGNED_I16] = _mesa_texstore_snorm16; - table[MESA_FORMAT_RGB9_E5_FLOAT] = _mesa_texstore_rgb9_e5; - table[MESA_FORMAT_R11_G11_B10_FLOAT] = _mesa_texstore_r11_g11_b10f; - table[MESA_FORMAT_Z32_FLOAT] = _mesa_texstore_z32; - table[MESA_FORMAT_Z32_FLOAT_X24S8] = _mesa_texstore_z32f_x24s8; table[MESA_FORMAT_ALPHA_UINT8] = _mesa_texstore_rgba_uint8; table[MESA_FORMAT_ALPHA_UINT16] = _mesa_texstore_rgba_uint16; @@ -4336,33 +3242,20 @@ _mesa_get_texstore_func(gl_format format) table[MESA_FORMAT_LUMINANCE_ALPHA_INT16] = _mesa_texstore_rgba_int16; table[MESA_FORMAT_LUMINANCE_ALPHA_INT32] = _mesa_texstore_rgba_int32; - table[MESA_FORMAT_R_INT8] = _mesa_texstore_rgba_int8; - table[MESA_FORMAT_RG_INT8] = _mesa_texstore_rgba_int8; table[MESA_FORMAT_RGB_INT8] = _mesa_texstore_rgba_int8; table[MESA_FORMAT_RGBA_INT8] = _mesa_texstore_rgba_int8; - table[MESA_FORMAT_R_INT16] = _mesa_texstore_rgba_int16; - table[MESA_FORMAT_RG_INT16] = _mesa_texstore_rgba_int16; table[MESA_FORMAT_RGB_INT16] = _mesa_texstore_rgba_int16; table[MESA_FORMAT_RGBA_INT16] = _mesa_texstore_rgba_int16; - table[MESA_FORMAT_R_INT32] = _mesa_texstore_rgba_int32; - table[MESA_FORMAT_RG_INT32] = _mesa_texstore_rgba_int32; table[MESA_FORMAT_RGB_INT32] = _mesa_texstore_rgba_int32; table[MESA_FORMAT_RGBA_INT32] = _mesa_texstore_rgba_int32; - table[MESA_FORMAT_R_UINT8] = _mesa_texstore_rgba_uint8; - table[MESA_FORMAT_RG_UINT8] = _mesa_texstore_rgba_uint8; table[MESA_FORMAT_RGB_UINT8] = _mesa_texstore_rgba_uint8; table[MESA_FORMAT_RGBA_UINT8] = _mesa_texstore_rgba_uint8; - table[MESA_FORMAT_R_UINT16] = _mesa_texstore_rgba_uint16; - table[MESA_FORMAT_RG_UINT16] = _mesa_texstore_rgba_uint16; table[MESA_FORMAT_RGB_UINT16] = _mesa_texstore_rgba_uint16; table[MESA_FORMAT_RGBA_UINT16] = _mesa_texstore_rgba_uint16; - table[MESA_FORMAT_R_UINT32] = _mesa_texstore_rgba_uint32; - table[MESA_FORMAT_RG_UINT32] = _mesa_texstore_rgba_uint32; table[MESA_FORMAT_RGB_UINT32] = _mesa_texstore_rgba_uint32; table[MESA_FORMAT_RGBA_UINT32] = _mesa_texstore_rgba_uint32; - table[MESA_FORMAT_ARGB2101010_UINT] = _mesa_texstore_argb2101010_uint; initialized = GL_TRUE; } @@ -4403,11 +3296,7 @@ _mesa_texstore(TEXSTORE_PARAMS) static GLbitfield get_read_write_mode(GLenum userFormat, gl_format texFormat) { - if ((userFormat == GL_STENCIL_INDEX || userFormat == GL_DEPTH_COMPONENT) - && _mesa_get_format_base_format(texFormat) == GL_DEPTH_STENCIL) - return GL_MAP_READ_BIT | GL_MAP_WRITE_BIT; - else - return GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_RANGE_BIT; + return GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_RANGE_BIT; } @@ -4442,7 +3331,6 @@ store_texsubimage(struct gl_context *ctx, case GL_TEXTURE_1D: dims = 1; break; - case GL_TEXTURE_2D_ARRAY: case GL_TEXTURE_3D: dims = 3; break; @@ -4451,16 +3339,13 @@ store_texsubimage(struct gl_context *ctx, } /* get pointer to src pixels (may be in a pbo which we'll map here) */ - src = (const GLubyte *) - _mesa_validate_pbo_teximage(ctx, dims, width, height, depth, - format, type, pixels, packing, caller); + src = (const GLubyte *)pixels; if (!src) return; /* compute slice info (and do some sanity checks) */ switch (target) { case GL_TEXTURE_2D: - case GL_TEXTURE_RECTANGLE: case GL_TEXTURE_CUBE_MAP: /* one image slice, nothing special needs to be done */ break; @@ -4470,23 +3355,6 @@ store_texsubimage(struct gl_context *ctx, assert(yoffset == 0); assert(zoffset == 0); break; - case GL_TEXTURE_1D_ARRAY: - assert(depth == 1); - assert(zoffset == 0); - numSlices = height; - sliceOffset = yoffset; - height = 1; - yoffset = 0; - srcImageStride = _mesa_image_row_stride(packing, width, format, type); - break; - case GL_TEXTURE_2D_ARRAY: - numSlices = depth; - sliceOffset = zoffset; - depth = 1; - zoffset = 0; - srcImageStride = _mesa_image_image_stride(packing, width, height, - format, type); - break; case GL_TEXTURE_3D: /* we'll store 3D images as a series of slices */ numSlices = depth; @@ -4532,8 +3400,6 @@ store_texsubimage(struct gl_context *ctx, if (!success) _mesa_error(ctx, GL_OUT_OF_MEMORY, "%s", caller); - - _mesa_unmap_teximage_pbo(ctx, packing); } @@ -4671,183 +3537,3 @@ _mesa_store_texsubimage3d(struct gl_context *ctx, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, packing, "glTexSubImage3D"); } - - -/* - * Fallback for Driver.CompressedTexImage1D() - */ -void -_mesa_store_compressed_teximage1d(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLint internalFormat, - GLint width, GLint border, - GLsizei imageSize, const GLvoid *data) -{ - /* no compressed 1D image formats at this time */ - (void) ctx; - (void) internalFormat; - (void) width; (void) border; - (void) imageSize; (void) data; - (void) texImage; -} - - - -/** - * Fallback for Driver.CompressedTexImage2D() - */ -void -_mesa_store_compressed_teximage2d(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLint internalFormat, - GLint width, GLint height, GLint border, - GLsizei imageSize, const GLvoid *data) -{ - /* This is pretty simple, because unlike the general texstore path we don't - * have to worry about the usual image unpacking or image transfer - * operations. - */ - ASSERT(texImage); - ASSERT(texImage->Width > 0); - ASSERT(texImage->Height > 0); - ASSERT(texImage->Depth == 1); - - /* allocate storage for texture data */ - if (!ctx->Driver.AllocTextureImageBuffer(ctx, texImage, texImage->TexFormat, - width, height, 1)) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2D"); - return; - } - - _mesa_store_compressed_texsubimage2d(ctx, texImage, - 0, 0, - width, height, - texImage->TexFormat, - imageSize, data); -} - - - -/* - * Fallback for Driver.CompressedTexImage3D() - */ -void -_mesa_store_compressed_teximage3d(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLint internalFormat, - GLint width, GLint height, GLint depth, - GLint border, - GLsizei imageSize, const GLvoid *data) -{ - /* this space intentionally left blank */ - (void) ctx; - (void) internalFormat; - (void) width; (void) height; (void) depth; - (void) border; - (void) imageSize; (void) data; - (void) texImage; -} - - - -/** - * Fallback for Driver.CompressedTexSubImage1D() - */ -void -_mesa_store_compressed_texsubimage1d(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLint xoffset, GLsizei width, - GLenum format, - GLsizei imageSize, const GLvoid *data) -{ - /* there are no compressed 1D texture formats yet */ - (void) ctx; - (void) xoffset; (void) width; - (void) format; - (void) imageSize; (void) data; - (void) texImage; -} - - -/** - * Fallback for Driver.CompressedTexSubImage2D() - */ -void -_mesa_store_compressed_texsubimage2d(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, - GLsizei imageSize, const GLvoid *data) -{ - GLint bytesPerRow, dstRowStride, srcRowStride; - GLint i, rows; - GLubyte *dstMap; - const GLubyte *src; - const gl_format texFormat = texImage->TexFormat; - GLuint bw, bh; - - _mesa_get_format_block_size(texFormat, &bw, &bh); - - /* these should have been caught sooner */ - ASSERT((width % bw) == 0 || width < bw); - ASSERT((height % bh) == 0 || height < bh); - ASSERT((xoffset % bw) == 0); - ASSERT((yoffset % bh) == 0); - - /* get pointer to src pixels (may be in a pbo which we'll map here) */ - data = _mesa_validate_pbo_compressed_teximage(ctx, imageSize, data, - &ctx->Unpack, - "glCompressedTexSubImage2D"); - if (!data) - return; - - srcRowStride = _mesa_format_row_stride(texFormat, width); - src = (const GLubyte *) data; - - /* Map dest texture buffer */ - ctx->Driver.MapTextureImage(ctx, texImage, 0, - xoffset, yoffset, width, height, - GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_RANGE_BIT, - &dstMap, &dstRowStride); - - if (dstMap) { - bytesPerRow = srcRowStride; /* bytes per row of blocks */ - rows = (height + bh - 1) / bh; /* rows in blocks */ - - /* copy rows of blocks */ - for (i = 0; i < rows; i++) { - memcpy(dstMap, src, bytesPerRow); - dstMap += dstRowStride; - src += srcRowStride; - } - - ctx->Driver.UnmapTextureImage(ctx, texImage, 0); - } - else { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage2D"); - } - - _mesa_unmap_teximage_pbo(ctx, &ctx->Unpack); -} - - -/** - * Fallback for Driver.CompressedTexSubImage3D() - */ -void -_mesa_store_compressed_texsubimage3d(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format, - GLsizei imageSize, const GLvoid *data) -{ - /* there are no compressed 3D texture formats yet */ - (void) ctx; - (void) xoffset; (void) yoffset; (void) zoffset; - (void) width; (void) height; (void) depth; - (void) format; - (void) imageSize; (void) data; - (void) texImage; -} diff --git a/dll/opengl/mesa/src/mesa/main/texstore.h b/dll/opengl/mesa/main/texstore.h similarity index 70% rename from dll/opengl/mesa/src/mesa/main/texstore.h rename to dll/opengl/mesa/main/texstore.h index 85e33b0fe26..42067ddcc25 100644 --- a/dll/opengl/mesa/src/mesa/main/texstore.h +++ b/dll/opengl/mesa/main/texstore.h @@ -142,51 +142,4 @@ _mesa_store_texsubimage3d(struct gl_context *ctx, const struct gl_pixelstore_attrib *packing); -extern void -_mesa_store_compressed_teximage1d(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLint internalFormat, - GLint width, GLint border, - GLsizei imageSize, const GLvoid *data); - -extern void -_mesa_store_compressed_teximage2d(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLint internalFormat, - GLint width, GLint height, GLint border, - GLsizei imageSize, const GLvoid *data); - -extern void -_mesa_store_compressed_teximage3d(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLint internalFormat, - GLint width, GLint height, GLint depth, - GLint border, - GLsizei imageSize, const GLvoid *data); - - -extern void -_mesa_store_compressed_texsubimage1d(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLint xoffset, GLsizei width, - GLenum format, - GLsizei imageSize, const GLvoid *data); - -extern void -_mesa_store_compressed_texsubimage2d(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, - GLsizei imageSize, const GLvoid *data); - -extern void -_mesa_store_compressed_texsubimage3d(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format, - GLsizei imageSize, const GLvoid *data); - - #endif diff --git a/dll/opengl/mesa/src/mesa/main/texturebarrier.c b/dll/opengl/mesa/main/texturebarrier.c similarity index 100% rename from dll/opengl/mesa/src/mesa/main/texturebarrier.c rename to dll/opengl/mesa/main/texturebarrier.c diff --git a/dll/opengl/mesa/src/mesa/main/texturebarrier.h b/dll/opengl/mesa/main/texturebarrier.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/texturebarrier.h rename to dll/opengl/mesa/main/texturebarrier.h diff --git a/dll/opengl/mesa/src/mesa/main/varray.c b/dll/opengl/mesa/main/varray.c similarity index 54% rename from dll/opengl/mesa/src/mesa/main/varray.c rename to dll/opengl/mesa/main/varray.c index dfe5064e3c0..8d86a8250cc 100644 --- a/dll/opengl/mesa/src/mesa/main/varray.c +++ b/dll/opengl/mesa/main/varray.c @@ -40,10 +40,6 @@ #include "main/dispatch.h" -/** Used to do error checking for GL_EXT_vertex_array_bgra */ -#define BGRA_OR_4 5 - - /** Used to indicate which GL datatypes are accepted by each of the * glVertex/Color/Attrib/EtcPointer() functions. */ @@ -57,10 +53,6 @@ #define HALF_BIT 0x80 #define FLOAT_BIT 0x100 #define DOUBLE_BIT 0x200 -#define FIXED_ES_BIT 0x400 -#define FIXED_GL_BIT 0x800 -#define UNSIGNED_INT_2_10_10_10_REV_BIT 0x1000 -#define INT_2_10_10_10_REV_BIT 0x2000 /** Convert GL datatype enum into a _BIT value seen above */ @@ -91,12 +83,6 @@ type_to_bit(const struct gl_context *ctx, GLenum type) return FLOAT_BIT; case GL_DOUBLE: return DOUBLE_BIT; - case GL_FIXED: - return ctx->API == API_OPENGL ? FIXED_GL_BIT : FIXED_ES_BIT; - case GL_UNSIGNED_INT_2_10_10_10_REV: - return UNSIGNED_INT_2_10_10_10_REV_BIT; - case GL_INT_2_10_10_10_REV: - return INT_2_10_10_10_REV_BIT; default: return 0; } @@ -111,7 +97,7 @@ type_to_bit(const struct gl_context *ctx, GLenum type) * \param attrib the attribute array index to update * \param legalTypes bitmask of *_BIT above indicating legal datatypes * \param sizeMin min allowable size value - * \param sizeMax max allowable size value (may also be BGRA_OR_4) + * \param sizeMax max allowable size value * \param size components per element (1, 2, 3 or 4) * \param type datatype of each component (GL_FLOAT, GL_INT, etc) * \param stride stride between elements, in elements @@ -131,19 +117,6 @@ update_array(struct gl_context *ctx, struct gl_client_array *array; GLbitfield typeBit; GLsizei elementSize; - GLenum format = GL_RGBA; - - if (ctx->API != API_OPENGLES && ctx->API != API_OPENGLES2) { - /* fixed point arrays / data is only allowed with OpenGL ES 1.x/2.0 */ - legalTypesMask &= ~FIXED_ES_BIT; - } - if (!ctx->Extensions.ARB_ES2_compatibility) { - legalTypesMask &= ~FIXED_GL_BIT; - } - if (!ctx->Extensions.ARB_vertex_type_2_10_10_10_rev) { - legalTypesMask &= ~(UNSIGNED_INT_2_10_10_10_REV_BIT | - INT_2_10_10_10_REV_BIT); - } typeBit = type_to_bit(ctx, type); if (typeBit == 0x0 || (typeBit & legalTypesMask) == 0x0) { @@ -152,42 +125,12 @@ update_array(struct gl_context *ctx, return; } - /* Do size parameter checking. - * If sizeMax = BGRA_OR_4 it means that size = GL_BGRA is legal and - * must be handled specially. - */ - if (ctx->Extensions.EXT_vertex_array_bgra && - sizeMax == BGRA_OR_4 && - size == GL_BGRA) { - GLboolean bgra_error = GL_FALSE; - - if (ctx->Extensions.ARB_vertex_type_2_10_10_10_rev) { - if (type != GL_UNSIGNED_INT_2_10_10_10_REV && - type != GL_INT_2_10_10_10_REV && - type != GL_UNSIGNED_BYTE) - bgra_error = GL_TRUE; - } else if (type != GL_UNSIGNED_BYTE) - bgra_error = GL_TRUE; - - if (bgra_error) { - _mesa_error(ctx, GL_INVALID_VALUE, "%s(GL_BGRA/GLubyte)", func); - return; - } - format = GL_BGRA; - size = 4; - } - else if (size < sizeMin || size > sizeMax || size > 4) { + /* Do size parameter checking. */ + if (size < sizeMin || size > sizeMax || size > 4) { _mesa_error(ctx, GL_INVALID_VALUE, "%s(size=%d)", func, size); return; } - if (ctx->Extensions.ARB_vertex_type_2_10_10_10_rev && - (type == GL_UNSIGNED_INT_2_10_10_10_REV || - type == GL_INT_2_10_10_10_REV) && size != 4) { - _mesa_error(ctx, GL_INVALID_OPERATION, "%s(size=%d)", func, size); - return; - } - ASSERT(size <= 4); if (stride < 0) { @@ -209,7 +152,6 @@ update_array(struct gl_context *ctx, array = &ctx->Array.ArrayObj->VertexAttrib[attrib]; array->Size = size; array->Type = type; - array->Format = format; array->Stride = stride; array->StrideB = stride ? stride : elementSize; array->Normalized = normalized; @@ -229,15 +171,10 @@ void GLAPIENTRY _mesa_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) { GLbitfield legalTypes = (SHORT_BIT | INT_BIT | FLOAT_BIT | - DOUBLE_BIT | HALF_BIT | FIXED_ES_BIT | - UNSIGNED_INT_2_10_10_10_REV_BIT | - INT_2_10_10_10_REV_BIT); + DOUBLE_BIT | HALF_BIT); GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - if (ctx->API == API_OPENGLES) - legalTypes |= BYTE_BIT; - update_array(ctx, "glVertexPointer", VERT_ATTRIB_POS, legalTypes, 2, 4, size, type, stride, GL_FALSE, GL_FALSE, ptr); @@ -248,10 +185,7 @@ void GLAPIENTRY _mesa_NormalPointer(GLenum type, GLsizei stride, const GLvoid *ptr ) { const GLbitfield legalTypes = (BYTE_BIT | SHORT_BIT | INT_BIT | - HALF_BIT | FLOAT_BIT | DOUBLE_BIT | - FIXED_ES_BIT | - UNSIGNED_INT_2_10_10_10_REV_BIT | - INT_2_10_10_10_REV_BIT); + HALF_BIT | FLOAT_BIT | DOUBLE_BIT); GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); @@ -267,15 +201,12 @@ _mesa_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) const GLbitfield legalTypes = (BYTE_BIT | UNSIGNED_BYTE_BIT | SHORT_BIT | UNSIGNED_SHORT_BIT | INT_BIT | UNSIGNED_INT_BIT | - HALF_BIT | FLOAT_BIT | DOUBLE_BIT | - FIXED_ES_BIT | - UNSIGNED_INT_2_10_10_10_REV_BIT | - INT_2_10_10_10_REV_BIT); + HALF_BIT | FLOAT_BIT | DOUBLE_BIT); GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); update_array(ctx, "glColorPointer", VERT_ATTRIB_COLOR0, - legalTypes, 3, BGRA_OR_4, + legalTypes, 3, 4, size, type, stride, GL_TRUE, GL_FALSE, ptr); } @@ -314,14 +245,12 @@ _mesa_SecondaryColorPointerEXT(GLint size, GLenum type, const GLbitfield legalTypes = (BYTE_BIT | UNSIGNED_BYTE_BIT | SHORT_BIT | UNSIGNED_SHORT_BIT | INT_BIT | UNSIGNED_INT_BIT | - HALF_BIT | FLOAT_BIT | DOUBLE_BIT | - UNSIGNED_INT_2_10_10_10_REV_BIT | - INT_2_10_10_10_REV_BIT); + HALF_BIT | FLOAT_BIT | DOUBLE_BIT); GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); update_array(ctx, "glSecondaryColorPointer", VERT_ATTRIB_COLOR1, - legalTypes, 3, BGRA_OR_4, + legalTypes, 3, 4, size, type, stride, GL_TRUE, GL_FALSE, ptr); } @@ -331,18 +260,11 @@ _mesa_TexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr) { GLbitfield legalTypes = (SHORT_BIT | INT_BIT | - HALF_BIT | FLOAT_BIT | DOUBLE_BIT | - FIXED_ES_BIT | - UNSIGNED_INT_2_10_10_10_REV_BIT | - INT_2_10_10_10_REV_BIT); + HALF_BIT | FLOAT_BIT | DOUBLE_BIT); GET_CURRENT_CONTEXT(ctx); - const GLuint unit = ctx->Array.ActiveTexture; ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - if (ctx->API == API_OPENGLES) - legalTypes |= BYTE_BIT; - - update_array(ctx, "glTexCoordPointer", VERT_ATTRIB_TEX(unit), + update_array(ctx, "glTexCoordPointer", VERT_ATTRIB_TEX, legalTypes, 1, 4, size, type, stride, GL_FALSE, GL_FALSE, ptr); @@ -363,375 +285,6 @@ _mesa_EdgeFlagPointer(GLsizei stride, const GLvoid *ptr) 1, GL_UNSIGNED_BYTE, stride, GL_FALSE, integer, ptr); } - -void GLAPIENTRY -_mesa_PointSizePointer(GLenum type, GLsizei stride, const GLvoid *ptr) -{ - const GLbitfield legalTypes = (FLOAT_BIT | FIXED_ES_BIT); - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (ctx->API != API_OPENGLES) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glPointSizePointer(ES 1.x only)"); - return; - } - - update_array(ctx, "glPointSizePointer", VERT_ATTRIB_POINT_SIZE, - legalTypes, 1, 1, - 1, type, stride, GL_FALSE, GL_FALSE, ptr); -} - - -#if FEATURE_NV_vertex_program -/** - * Set a vertex attribute array. - * Note that these arrays DO alias the conventional GL vertex arrays - * (position, normal, color, fog, texcoord, etc). - * The generic attribute slots at #16 and above are not touched. - */ -void GLAPIENTRY -_mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr) -{ - const GLbitfield legalTypes = (UNSIGNED_BYTE_BIT | SHORT_BIT | - FLOAT_BIT | DOUBLE_BIT); - GLboolean normalized = GL_FALSE; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (index >= MAX_NV_VERTEX_PROGRAM_INPUTS) { - _mesa_error(ctx, GL_INVALID_VALUE, "glVertexAttribPointerNV(index)"); - return; - } - - if (type == GL_UNSIGNED_BYTE && size != 4) { - _mesa_error(ctx, GL_INVALID_VALUE, "glVertexAttribPointerNV(size!=4)"); - return; - } - - update_array(ctx, "glVertexAttribPointerNV", VERT_ATTRIB_GENERIC(index), - legalTypes, 1, BGRA_OR_4, - size, type, stride, normalized, GL_FALSE, ptr); -} -#endif - - -#if FEATURE_ARB_vertex_program -/** - * Set a generic vertex attribute array. - * Note that these arrays DO NOT alias the conventional GL vertex arrays - * (position, normal, color, fog, texcoord, etc). - */ -void GLAPIENTRY -_mesa_VertexAttribPointerARB(GLuint index, GLint size, GLenum type, - GLboolean normalized, - GLsizei stride, const GLvoid *ptr) -{ - const GLbitfield legalTypes = (BYTE_BIT | UNSIGNED_BYTE_BIT | - SHORT_BIT | UNSIGNED_SHORT_BIT | - INT_BIT | UNSIGNED_INT_BIT | - HALF_BIT | FLOAT_BIT | DOUBLE_BIT | - FIXED_ES_BIT | FIXED_GL_BIT | - UNSIGNED_INT_2_10_10_10_REV_BIT | - INT_2_10_10_10_REV_BIT); - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (index >= ctx->Const.VertexProgram.MaxAttribs) { - _mesa_error(ctx, GL_INVALID_VALUE, "glVertexAttribPointerARB(index)"); - return; - } - - update_array(ctx, "glVertexAttribPointer", VERT_ATTRIB_GENERIC(index), - legalTypes, 1, BGRA_OR_4, - size, type, stride, normalized, GL_FALSE, ptr); -} -#endif - - -/** - * GL_EXT_gpu_shader4 / GL 3.0. - * Set an integer-valued vertex attribute array. - * Note that these arrays DO NOT alias the conventional GL vertex arrays - * (position, normal, color, fog, texcoord, etc). - */ -void GLAPIENTRY -_mesa_VertexAttribIPointer(GLuint index, GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr) -{ - const GLbitfield legalTypes = (BYTE_BIT | UNSIGNED_BYTE_BIT | - SHORT_BIT | UNSIGNED_SHORT_BIT | - INT_BIT | UNSIGNED_INT_BIT); - const GLboolean normalized = GL_FALSE; - const GLboolean integer = GL_TRUE; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (index >= ctx->Const.VertexProgram.MaxAttribs) { - _mesa_error(ctx, GL_INVALID_VALUE, "glVertexAttribIPointer(index)"); - return; - } - - update_array(ctx, "glVertexAttribIPointer", VERT_ATTRIB_GENERIC(index), - legalTypes, 1, 4, - size, type, stride, normalized, integer, ptr); -} - - - -void GLAPIENTRY -_mesa_EnableVertexAttribArrayARB(GLuint index) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (index >= ctx->Const.VertexProgram.MaxAttribs) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glEnableVertexAttribArrayARB(index)"); - return; - } - - ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.ArrayObj->VertexAttrib)); - - FLUSH_VERTICES(ctx, _NEW_ARRAY); - ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)].Enabled = GL_TRUE; - ctx->Array.ArrayObj->_Enabled |= VERT_BIT_GENERIC(index); - ctx->Array.NewState |= VERT_BIT_GENERIC(index); -} - - -void GLAPIENTRY -_mesa_DisableVertexAttribArrayARB(GLuint index) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (index >= ctx->Const.VertexProgram.MaxAttribs) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glDisableVertexAttribArrayARB(index)"); - return; - } - - ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.ArrayObj->VertexAttrib)); - - FLUSH_VERTICES(ctx, _NEW_ARRAY); - ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)].Enabled = GL_FALSE; - ctx->Array.ArrayObj->_Enabled &= ~VERT_BIT_GENERIC(index); - ctx->Array.NewState |= VERT_BIT_GENERIC(index); -} - - -/** - * Return info for a vertex attribute array (no alias with legacy - * vertex attributes (pos, normal, color, etc)). This function does - * not handle the 4-element GL_CURRENT_VERTEX_ATTRIB_ARB query. - */ -static GLuint -get_vertex_array_attrib(struct gl_context *ctx, GLuint index, GLenum pname, - const char *caller) -{ - const struct gl_client_array *array; - - if (index >= ctx->Const.VertexProgram.MaxAttribs) { - _mesa_error(ctx, GL_INVALID_VALUE, "%s(index=%u)", caller, index); - return 0; - } - - ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.ArrayObj->VertexAttrib)); - - array = &ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)]; - - switch (pname) { - case GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB: - return array->Enabled; - case GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB: - return array->Size; - case GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB: - return array->Stride; - case GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB: - return array->Type; - case GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB: - return array->Normalized; - case GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB: - return array->BufferObj->Name; - case GL_VERTEX_ATTRIB_ARRAY_INTEGER: - if (ctx->VersionMajor >= 3 || ctx->Extensions.EXT_gpu_shader4) { - return array->Integer; - } - goto error; - case GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB: - if (ctx->Extensions.ARB_instanced_arrays) { - return array->InstanceDivisor; - } - goto error; - default: - ; /* fall-through */ - } - -error: - _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=0x%x)", caller, pname); - return 0; -} - - -static const GLfloat * -get_current_attrib(struct gl_context *ctx, GLuint index, const char *function) -{ - if (index == 0) { - if (ctx->API != API_OPENGLES2) { - _mesa_error(ctx, GL_INVALID_OPERATION, "%s(index==0)", function); - return NULL; - } - } - else if (index >= ctx->Const.VertexProgram.MaxAttribs) { - _mesa_error(ctx, GL_INVALID_VALUE, - "%s(index>=GL_MAX_VERTEX_ATTRIBS)", function); - return NULL; - } - - ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.ArrayObj->VertexAttrib)); - - FLUSH_CURRENT(ctx, 0); - return ctx->Current.Attrib[VERT_ATTRIB_GENERIC(index)]; -} - -void GLAPIENTRY -_mesa_GetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat *params) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) { - const GLfloat *v = get_current_attrib(ctx, index, "glGetVertexAttribfv"); - if (v != NULL) { - COPY_4V(params, v); - } - } - else { - params[0] = (GLfloat) get_vertex_array_attrib(ctx, index, pname, - "glGetVertexAttribfv"); - } -} - - -void GLAPIENTRY -_mesa_GetVertexAttribdvARB(GLuint index, GLenum pname, GLdouble *params) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) { - const GLfloat *v = get_current_attrib(ctx, index, "glGetVertexAttribdv"); - if (v != NULL) { - params[0] = (GLdouble) v[0]; - params[1] = (GLdouble) v[1]; - params[2] = (GLdouble) v[2]; - params[3] = (GLdouble) v[3]; - } - } - else { - params[0] = (GLdouble) get_vertex_array_attrib(ctx, index, pname, - "glGetVertexAttribdv"); - } -} - - -void GLAPIENTRY -_mesa_GetVertexAttribivARB(GLuint index, GLenum pname, GLint *params) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) { - const GLfloat *v = get_current_attrib(ctx, index, "glGetVertexAttribiv"); - if (v != NULL) { - /* XXX should floats in[0,1] be scaled to full int range? */ - params[0] = (GLint) v[0]; - params[1] = (GLint) v[1]; - params[2] = (GLint) v[2]; - params[3] = (GLint) v[3]; - } - } - else { - params[0] = (GLint) get_vertex_array_attrib(ctx, index, pname, - "glGetVertexAttribiv"); - } -} - - -/** GL 3.0 */ -void GLAPIENTRY -_mesa_GetVertexAttribIiv(GLuint index, GLenum pname, GLint *params) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) { - const GLfloat *v = - get_current_attrib(ctx, index, "glGetVertexAttribIiv"); - if (v != NULL) { - /* XXX we don't have true integer-valued vertex attribs yet */ - params[0] = (GLint) v[0]; - params[1] = (GLint) v[1]; - params[2] = (GLint) v[2]; - params[3] = (GLint) v[3]; - } - } - else { - params[0] = (GLint) get_vertex_array_attrib(ctx, index, pname, - "glGetVertexAttribIiv"); - } -} - - -/** GL 3.0 */ -void GLAPIENTRY -_mesa_GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (pname == GL_CURRENT_VERTEX_ATTRIB_ARB) { - const GLfloat *v = - get_current_attrib(ctx, index, "glGetVertexAttribIuiv"); - if (v != NULL) { - /* XXX we don't have true integer-valued vertex attribs yet */ - params[0] = (GLuint) v[0]; - params[1] = (GLuint) v[1]; - params[2] = (GLuint) v[2]; - params[3] = (GLuint) v[3]; - } - } - else { - params[0] = get_vertex_array_attrib(ctx, index, pname, - "glGetVertexAttribIuiv"); - } -} - - -void GLAPIENTRY -_mesa_GetVertexAttribPointervARB(GLuint index, GLenum pname, GLvoid **pointer) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (index >= ctx->Const.VertexProgram.MaxAttribs) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGetVertexAttribPointerARB(index)"); - return; - } - - if (pname != GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetVertexAttribPointerARB(pname)"); - return; - } - - ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.ArrayObj->VertexAttrib)); - - *pointer = (GLvoid *) ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)].Ptr; -} - - void GLAPIENTRY _mesa_VertexPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *ptr) @@ -1013,25 +566,6 @@ _mesa_UnlockArraysEXT( void ) ctx->Array.NewState |= VERT_BIT_ALL; } - -/* GL_EXT_multi_draw_arrays */ -void GLAPIENTRY -_mesa_MultiDrawArraysEXT( GLenum mode, const GLint *first, - const GLsizei *count, GLsizei primcount ) -{ - GET_CURRENT_CONTEXT(ctx); - GLint i; - - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - for (i = 0; i < primcount; i++) { - if (count[i] > 0) { - CALL_DrawArrays(ctx->Exec, (mode, first[i], count[i])); - } - } -} - - /* GL_IBM_multimode_draw_arrays */ void GLAPIENTRY _mesa_MultiModeDrawArraysIBM( const GLenum * mode, const GLint * first, @@ -1074,57 +608,6 @@ _mesa_MultiModeDrawElementsIBM( const GLenum * mode, const GLsizei * count, } -/** - * GL_NV_primitive_restart and GL 3.1 - */ -void GLAPIENTRY -_mesa_PrimitiveRestartIndex(GLuint index) -{ - GET_CURRENT_CONTEXT(ctx); - - if (!ctx->Extensions.NV_primitive_restart && - ctx->VersionMajor * 10 + ctx->VersionMinor < 31) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glPrimitiveRestartIndexNV()"); - return; - } - - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - FLUSH_VERTICES(ctx, _NEW_TRANSFORM); - - ctx->Array.RestartIndex = index; -} - - -/** - * See GL_ARB_instanced_arrays. - * Note that the instance divisor only applies to generic arrays, not - * the legacy vertex arrays. - */ -void GLAPIENTRY -_mesa_VertexAttribDivisor(GLuint index, GLuint divisor) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (!ctx->Extensions.ARB_instanced_arrays) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glVertexAttribDivisor()"); - return; - } - - if (index >= ctx->Const.VertexProgram.MaxAttribs) { - _mesa_error(ctx, GL_INVALID_ENUM, "glVertexAttribDivisor(index = %u)", - index); - return; - } - - ASSERT(VERT_ATTRIB_GENERIC(index) < Elements(ctx->Array.ArrayObj->VertexAttrib)); - - ctx->Array.ArrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(index)].InstanceDivisor = divisor; -} - - - /** * Copy one client vertex array to another. */ @@ -1135,14 +618,12 @@ _mesa_copy_client_array(struct gl_context *ctx, { dst->Size = src->Size; dst->Type = src->Type; - dst->Format = src->Format; dst->Stride = src->Stride; dst->StrideB = src->StrideB; dst->Ptr = src->Ptr; dst->Enabled = src->Enabled; dst->Normalized = src->Normalized; dst->Integer = src->Integer; - dst->InstanceDivisor = src->InstanceDivisor; dst->_ElementSize = src->_ElementSize; _mesa_reference_buffer_object(ctx, &dst->BufferObj, src->BufferObj); dst->_MaxElement = src->_MaxElement; @@ -1175,7 +656,6 @@ void _mesa_print_arrays(struct gl_context *ctx) { struct gl_array_object *arrayObj = ctx->Array.ArrayObj; - GLuint i; _mesa_update_array_object_max_element(ctx, arrayObj); @@ -1186,12 +666,8 @@ _mesa_print_arrays(struct gl_context *ctx) print_array("Normal", -1, &arrayObj->VertexAttrib[VERT_ATTRIB_NORMAL]); if (arrayObj->VertexAttrib[VERT_ATTRIB_COLOR0].Enabled) print_array("Color", -1, &arrayObj->VertexAttrib[VERT_ATTRIB_COLOR0]); - for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) - if (arrayObj->VertexAttrib[VERT_ATTRIB_TEX(i)].Enabled) - print_array("TexCoord", i, &arrayObj->VertexAttrib[VERT_ATTRIB_TEX(i)]); - for (i = 0; i < VERT_ATTRIB_GENERIC_MAX; i++) - if (arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(i)].Enabled) - print_array("Attrib", i, &arrayObj->VertexAttrib[VERT_ATTRIB_GENERIC(i)]); + if (arrayObj->VertexAttrib[VERT_ATTRIB_TEX].Enabled) + print_array("TexCoord", -1, &arrayObj->VertexAttrib[VERT_ATTRIB_TEX]); printf(" _MaxElement = %u\n", arrayObj->_MaxElement); } @@ -1205,7 +681,6 @@ _mesa_init_varray(struct gl_context *ctx) ctx->Array.DefaultArrayObj = _mesa_new_array_object(ctx, 0); _mesa_reference_array_object(ctx, &ctx->Array.ArrayObj, ctx->Array.DefaultArrayObj); - ctx->Array.ActiveTexture = 0; /* GL_ARB_multitexture */ ctx->Array.Objects = _mesa_NewHashTable(); } diff --git a/dll/opengl/mesa/src/mesa/main/varray.h b/dll/opengl/mesa/main/varray.h similarity index 69% rename from dll/opengl/mesa/src/mesa/main/varray.h rename to dll/opengl/mesa/main/varray.h index b6041bd787e..9b3b1c50604 100644 --- a/dll/opengl/mesa/src/mesa/main/varray.h +++ b/dll/opengl/mesa/main/varray.h @@ -137,75 +137,9 @@ _mesa_SecondaryColorPointerEXT(GLint size, GLenum type, GLsizei stride, const GLvoid *ptr); -extern void GLAPIENTRY -_mesa_PointSizePointer(GLenum type, GLsizei stride, const GLvoid *ptr); - - -extern void GLAPIENTRY -_mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type, - GLsizei stride, const GLvoid *pointer); - - -extern void GLAPIENTRY -_mesa_VertexAttribPointerARB(GLuint index, GLint size, GLenum type, - GLboolean normalized, GLsizei stride, - const GLvoid *pointer); - -void GLAPIENTRY -_mesa_VertexAttribIPointer(GLuint index, GLint size, GLenum type, - GLsizei stride, const GLvoid *ptr); - - -extern void GLAPIENTRY -_mesa_EnableVertexAttribArrayARB(GLuint index); - - -extern void GLAPIENTRY -_mesa_DisableVertexAttribArrayARB(GLuint index); - - -extern void GLAPIENTRY -_mesa_GetVertexAttribdvARB(GLuint index, GLenum pname, GLdouble *params); - - -extern void GLAPIENTRY -_mesa_GetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat *params); - - -extern void GLAPIENTRY -_mesa_GetVertexAttribivARB(GLuint index, GLenum pname, GLint *params); - - -extern void GLAPIENTRY -_mesa_GetVertexAttribIiv(GLuint index, GLenum pname, GLint *params); - - -extern void GLAPIENTRY -_mesa_GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params); - - -extern void GLAPIENTRY -_mesa_GetVertexAttribPointervARB(GLuint index, GLenum pname, GLvoid **pointer); - - extern void GLAPIENTRY _mesa_InterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer); - -extern void GLAPIENTRY -_mesa_MultiDrawArraysEXT( GLenum mode, const GLint *first, - const GLsizei *count, GLsizei primcount ); - -extern void GLAPIENTRY -_mesa_MultiDrawElementsEXT( GLenum mode, const GLsizei *count, GLenum type, - const GLvoid **indices, GLsizei primcount ); - -extern void GLAPIENTRY -_mesa_MultiDrawElementsBaseVertex( GLenum mode, - const GLsizei *count, GLenum type, - const GLvoid **indices, GLsizei primcount, - const GLint *basevertex); - extern void GLAPIENTRY _mesa_MultiModeDrawArraysIBM( const GLenum * mode, const GLint * first, const GLsizei * count, @@ -235,30 +169,6 @@ extern void GLAPIENTRY _mesa_DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -extern void GLAPIENTRY -_mesa_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices, GLint basevertex); - -extern void GLAPIENTRY -_mesa_DrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, - GLsizei count, GLenum type, - const GLvoid *indices, - GLint basevertex); - -#if FEATURE_EXT_transform_feedback - -extern void GLAPIENTRY -_mesa_DrawTransformFeedback(GLenum mode, GLuint name); - -#endif - -extern void GLAPIENTRY -_mesa_PrimitiveRestartIndex(GLuint index); - - -extern void GLAPIENTRY -_mesa_VertexAttribDivisor(GLuint index, GLuint divisor); - extern void _mesa_copy_client_array(struct gl_context *ctx, diff --git a/dll/opengl/mesa/main/version.c b/dll/opengl/mesa/main/version.c new file mode 100644 index 00000000000..7d43d707505 --- /dev/null +++ b/dll/opengl/mesa/main/version.c @@ -0,0 +1,149 @@ +/* + * Mesa 3-D graphics library + * + * Copyright (C) 2010 VMware, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#include "imports.h" +#include "mtypes.h" +#include "version.h" +#include "git_sha1.h" + +/** + * Override the context's GL version if the environment variable + * MESA_GL_VERSION_OVERRIDE is set. Valid values of MESA_GL_VERSION_OVERRIDE + * are point-separated version numbers, such as "3.0". + */ +static void +override_version(struct gl_context *ctx, GLuint *major, GLuint *minor) +{ + const char *env_var = "MESA_GL_VERSION_OVERRIDE"; + const char *version; + int n; + + version = getenv(env_var); + if (!version) { + return; + } + + n = sscanf(version, "%u.%u", major, minor); + if (n != 2) { + fprintf(stderr, "error: invalid value for %s: %s\n", env_var, version); + return; + } +} + +/** + * Examine enabled GL extensions to determine GL version. + * Return major and minor version numbers. + */ +static void +compute_version(struct gl_context *ctx) +{ + GLuint major, minor; + static const int max = 100; + + const GLboolean ver_1_3 = (ctx->Extensions.ARB_texture_cube_map && + ctx->Extensions.ARB_texture_env_combine && + ctx->Extensions.ARB_texture_env_dot3); + const GLboolean ver_1_4 = (ver_1_3 && + ctx->Extensions.ARB_texture_env_crossbar && + ctx->Extensions.ARB_window_pos && + ctx->Extensions.EXT_blend_color && + ctx->Extensions.EXT_blend_func_separate && + ctx->Extensions.EXT_blend_minmax && + ctx->Extensions.EXT_fog_coord && + ctx->Extensions.EXT_point_parameters && + ctx->Extensions.EXT_secondary_color); + const GLboolean ver_1_5 = (ver_1_4 && + ctx->Extensions.EXT_shadow_funcs); + const GLboolean ver_2_0 = (ver_1_5 && + ctx->Extensions.ARB_point_sprite && + ctx->Extensions.ARB_texture_non_power_of_two && + ctx->Extensions.EXT_blend_equation_separate); + const GLboolean ver_2_1 = (ver_2_0); + const GLboolean ver_3_0 = (ver_2_1 && + ctx->Extensions.ARB_half_float_pixel && + ctx->Extensions.ARB_half_float_vertex && + ctx->Extensions.ARB_map_buffer_range && + ctx->Extensions.ARB_texture_float && + ctx->Extensions.APPLE_vertex_array_object); + + + if (ver_3_0) { + major = 3; + minor = 0; + } + else if (ver_2_1) { + major = 2; + minor = 1; + } + else if (ver_2_0) { + major = 2; + minor = 0; + } + else if (ver_1_5) { + major = 1; + minor = 5; + } + else if (ver_1_4) { + major = 1; + minor = 4; + } + else if (ver_1_3) { + major = 1; + minor = 3; + } + else { + major = 1; + minor = 2; + } + + ctx->VersionMajor = major; + ctx->VersionMinor = minor; + + override_version(ctx, &ctx->VersionMajor, &ctx->VersionMinor); + + ctx->VersionString = (char *) malloc(max); + if (ctx->VersionString) { + _mesa_snprintf(ctx->VersionString, max, + "%u.%u Mesa " MESA_VERSION_STRING +#ifdef MESA_GIT_SHA1 + " (" MESA_GIT_SHA1 ")" +#endif + , + ctx->VersionMajor, ctx->VersionMinor); + } +} + +/** + * Set the context's VersionMajor, VersionMinor, VersionString fields. + * This should only be called once as part of context initialization + * or to perform version check for GLX_ARB_create_context_profile. + */ +void +_mesa_compute_version(struct gl_context *ctx) +{ + if (ctx->VersionMajor) + return; + + compute_version(ctx); +} diff --git a/dll/opengl/mesa/src/mesa/main/version.h b/dll/opengl/mesa/main/version.h similarity index 96% rename from dll/opengl/mesa/src/mesa/main/version.h rename to dll/opengl/mesa/main/version.h index 6afeff4ea83..a34cc52000a 100644 --- a/dll/opengl/mesa/src/mesa/main/version.h +++ b/dll/opengl/mesa/main/version.h @@ -45,7 +45,4 @@ struct gl_context; extern void _mesa_compute_version(struct gl_context *ctx); -extern void -_mesa_override_glsl_version(struct gl_context *ctx); - #endif /* VERSION_H */ diff --git a/dll/opengl/mesa/src/mesa/main/viewport.c b/dll/opengl/mesa/main/viewport.c similarity index 98% rename from dll/opengl/mesa/src/mesa/main/viewport.c rename to dll/opengl/mesa/main/viewport.c index a58697ab370..2f1cd3034eb 100644 --- a/dll/opengl/mesa/src/mesa/main/viewport.c +++ b/dll/opengl/mesa/main/viewport.c @@ -146,12 +146,6 @@ _mesa_DepthRange(GLclampd nearval, GLclampd farval) } } -void GLAPIENTRY -_mesa_DepthRangef(GLclampf nearval, GLclampf farval) -{ - _mesa_DepthRange(nearval, farval); -} - /** * Initialize the context viewport attribute group. * \param ctx the GL context. diff --git a/dll/opengl/mesa/src/mesa/main/viewport.h b/dll/opengl/mesa/main/viewport.h similarity index 95% rename from dll/opengl/mesa/src/mesa/main/viewport.h rename to dll/opengl/mesa/main/viewport.h index db4507beaaf..909ff92eee5 100644 --- a/dll/opengl/mesa/src/mesa/main/viewport.h +++ b/dll/opengl/mesa/main/viewport.h @@ -43,9 +43,6 @@ _mesa_set_viewport(struct gl_context *ctx, GLint x, GLint y, extern void GLAPIENTRY _mesa_DepthRange(GLclampd nearval, GLclampd farval); -extern void GLAPIENTRY -_mesa_DepthRangef(GLclampf nearval, GLclampf farval); - extern void _mesa_init_viewport(struct gl_context *ctx); diff --git a/dll/opengl/mesa/src/mesa/main/vsnprintf.c b/dll/opengl/mesa/main/vsnprintf.c similarity index 100% rename from dll/opengl/mesa/src/mesa/main/vsnprintf.c rename to dll/opengl/mesa/main/vsnprintf.c diff --git a/dll/opengl/mesa/main/vtxfmt.c b/dll/opengl/mesa/main/vtxfmt.c new file mode 100644 index 00000000000..ba3bf93d3c4 --- /dev/null +++ b/dll/opengl/mesa/main/vtxfmt.c @@ -0,0 +1,128 @@ +/* + * Mesa 3-D graphics library + * Version: 6.3 + * + * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Keith Whitwell + * Gareth Hughes + */ + +#include "glheader.h" +#include "api_arrayelt.h" +#include "context.h" +#include "imports.h" +#include "mfeatures.h" +#include "mtypes.h" +#include "vtxfmt.h" +#include "eval.h" +#include "dlist.h" +#include "main/dispatch.h" + + +#if FEATURE_beginend + +/** + * Use the per-vertex functions found in to initialoze the given + * API dispatch table. + */ +static void +install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt ) +{ + _mesa_install_arrayelt_vtxfmt(tab, vfmt); + + SET_Color3f(tab, vfmt->Color3f); + SET_Color3fv(tab, vfmt->Color3fv); + SET_Color4f(tab, vfmt->Color4f); + SET_Color4fv(tab, vfmt->Color4fv); + SET_EdgeFlag(tab, vfmt->EdgeFlag); + + _mesa_install_eval_vtxfmt(tab, vfmt); + + SET_FogCoordfEXT(tab, vfmt->FogCoordfEXT); + SET_FogCoordfvEXT(tab, vfmt->FogCoordfvEXT); + SET_Indexf(tab, vfmt->Indexf); + SET_Indexfv(tab, vfmt->Indexfv); + SET_Materialfv(tab, vfmt->Materialfv); + SET_Normal3f(tab, vfmt->Normal3f); + SET_Normal3fv(tab, vfmt->Normal3fv); + SET_SecondaryColor3fEXT(tab, vfmt->SecondaryColor3fEXT); + SET_SecondaryColor3fvEXT(tab, vfmt->SecondaryColor3fvEXT); + SET_TexCoord1f(tab, vfmt->TexCoord1f); + SET_TexCoord1fv(tab, vfmt->TexCoord1fv); + SET_TexCoord2f(tab, vfmt->TexCoord2f); + SET_TexCoord2fv(tab, vfmt->TexCoord2fv); + SET_TexCoord3f(tab, vfmt->TexCoord3f); + SET_TexCoord3fv(tab, vfmt->TexCoord3fv); + SET_TexCoord4f(tab, vfmt->TexCoord4f); + SET_TexCoord4fv(tab, vfmt->TexCoord4fv); + SET_Vertex2f(tab, vfmt->Vertex2f); + SET_Vertex2fv(tab, vfmt->Vertex2fv); + SET_Vertex3f(tab, vfmt->Vertex3f); + SET_Vertex3fv(tab, vfmt->Vertex3fv); + SET_Vertex4f(tab, vfmt->Vertex4f); + SET_Vertex4fv(tab, vfmt->Vertex4fv); + + _mesa_install_dlist_vtxfmt(tab, vfmt); /* glCallList / glCallLists */ + + SET_Begin(tab, vfmt->Begin); + SET_End(tab, vfmt->End); + + SET_Rectf(tab, vfmt->Rectf); + + SET_DrawArrays(tab, vfmt->DrawArrays); + SET_DrawElements(tab, vfmt->DrawElements); + SET_DrawRangeElements(tab, vfmt->DrawRangeElements); + + /* GL_NV_vertex_program */ + SET_VertexAttrib1fNV(tab, vfmt->VertexAttrib1fNV); + SET_VertexAttrib1fvNV(tab, vfmt->VertexAttrib1fvNV); + SET_VertexAttrib2fNV(tab, vfmt->VertexAttrib2fNV); + SET_VertexAttrib2fvNV(tab, vfmt->VertexAttrib2fvNV); + SET_VertexAttrib3fNV(tab, vfmt->VertexAttrib3fNV); + SET_VertexAttrib3fvNV(tab, vfmt->VertexAttrib3fvNV); + SET_VertexAttrib4fNV(tab, vfmt->VertexAttrib4fNV); + SET_VertexAttrib4fvNV(tab, vfmt->VertexAttrib4fvNV); +} + + +/** + * Install per-vertex functions into the API dispatch table for execution. + */ +void +_mesa_install_exec_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt) +{ + install_vtxfmt( ctx->Exec, vfmt ); +} + + +/** + * Install per-vertex functions into the API dispatch table for display + * list compilation. + */ +void +_mesa_install_save_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt) +{ + install_vtxfmt( ctx->Save, vfmt ); +} + + +#endif /* FEATURE_beginend */ diff --git a/dll/opengl/mesa/src/mesa/main/vtxfmt.h b/dll/opengl/mesa/main/vtxfmt.h similarity index 100% rename from dll/opengl/mesa/src/mesa/main/vtxfmt.h rename to dll/opengl/mesa/main/vtxfmt.h diff --git a/dll/opengl/mesa/math/CMakeLists.txt b/dll/opengl/mesa/math/CMakeLists.txt new file mode 100644 index 00000000000..19b1f1878ae --- /dev/null +++ b/dll/opengl/mesa/math/CMakeLists.txt @@ -0,0 +1,13 @@ + +list(APPEND SOURCE + m_debug_clip.c + m_debug_norm.c + m_debug_xform.c + m_eval.c + m_matrix.c + m_translate.c + m_vector.c + m_xform.c +) + +add_library(mesa_math STATIC ${SOURCE}) \ No newline at end of file diff --git a/dll/opengl/mesa/src/mesa/math/m_clip_tmp.h b/dll/opengl/mesa/math/m_clip_tmp.h similarity index 95% rename from dll/opengl/mesa/src/mesa/math/m_clip_tmp.h rename to dll/opengl/mesa/math/m_clip_tmp.h index 2e30964057c..09b266a2518 100644 --- a/dll/opengl/mesa/src/mesa/math/m_clip_tmp.h +++ b/dll/opengl/mesa/math/m_clip_tmp.h @@ -44,8 +44,7 @@ static GLvector4f * _XFORMAPI TAG(cliptest_points4)( GLvector4f *clip_vec, GLvector4f *proj_vec, GLubyte clipMask[], GLubyte *orMask, - GLubyte *andMask, - GLboolean viewport_z_clip ) + GLubyte *andMask) { const GLuint stride = clip_vec->stride; const GLfloat *from = (GLfloat *)clip_vec->start; @@ -67,20 +66,16 @@ static GLvector4f * _XFORMAPI TAG(cliptest_points4)( GLvector4f *clip_vec, mask |= (((cw < -cx) << CLIP_LEFT_SHIFT)); mask |= (((cw < cy) << CLIP_TOP_SHIFT)); mask |= (((cw < -cy) << CLIP_BOTTOM_SHIFT)); - if (viewport_z_clip) { mask |= (((cw < cz) << CLIP_FAR_SHIFT)); mask |= (((cw < -cz) << CLIP_NEAR_SHIFT)); - } #else /* !defined(macintosh)) */ GLubyte mask = 0; if (-cx + cw < 0) mask |= CLIP_RIGHT_BIT; if ( cx + cw < 0) mask |= CLIP_LEFT_BIT; if (-cy + cw < 0) mask |= CLIP_TOP_BIT; if ( cy + cw < 0) mask |= CLIP_BOTTOM_BIT; - if (viewport_z_clip) { if (-cz + cw < 0) mask |= CLIP_FAR_BIT; if ( cz + cw < 0) mask |= CLIP_NEAR_BIT; - } #endif /* defined(macintosh) */ clipMask[i] = mask; @@ -124,8 +119,7 @@ static GLvector4f * _XFORMAPI TAG(cliptest_np_points4)( GLvector4f *clip_vec, GLvector4f *proj_vec, GLubyte clipMask[], GLubyte *orMask, - GLubyte *andMask, - GLboolean viewport_z_clip ) + GLubyte *andMask) { const GLuint stride = clip_vec->stride; const GLuint count = clip_vec->count; @@ -147,20 +141,16 @@ static GLvector4f * _XFORMAPI TAG(cliptest_np_points4)( GLvector4f *clip_vec, mask |= (((cw < -cx) << CLIP_LEFT_SHIFT)); mask |= (((cw < cy) << CLIP_TOP_SHIFT)); mask |= (((cw < -cy) << CLIP_BOTTOM_SHIFT)); - if (viewport_z_clip) { mask |= (((cw < cz) << CLIP_FAR_SHIFT)); mask |= (((cw < -cz) << CLIP_NEAR_SHIFT)); - } #else /* !defined(macintosh)) */ GLubyte mask = 0; if (-cx + cw < 0) mask |= CLIP_RIGHT_BIT; if ( cx + cw < 0) mask |= CLIP_LEFT_BIT; if (-cy + cw < 0) mask |= CLIP_TOP_BIT; if ( cy + cw < 0) mask |= CLIP_BOTTOM_BIT; - if (viewport_z_clip) { if (-cz + cw < 0) mask |= CLIP_FAR_BIT; if ( cz + cw < 0) mask |= CLIP_NEAR_BIT; - } #endif /* defined(macintosh) */ clipMask[i] = mask; @@ -181,8 +171,7 @@ static GLvector4f * _XFORMAPI TAG(cliptest_points3)( GLvector4f *clip_vec, GLvector4f *proj_vec, GLubyte clipMask[], GLubyte *orMask, - GLubyte *andMask, - GLboolean viewport_z_clip ) + GLubyte *andMask) { const GLuint stride = clip_vec->stride; const GLuint count = clip_vec->count; @@ -198,10 +187,8 @@ static GLvector4f * _XFORMAPI TAG(cliptest_points3)( GLvector4f *clip_vec, else if (cx < -1.0) mask |= CLIP_LEFT_BIT; if (cy > 1.0) mask |= CLIP_TOP_BIT; else if (cy < -1.0) mask |= CLIP_BOTTOM_BIT; - if (viewport_z_clip) { if (cz > 1.0) mask |= CLIP_FAR_BIT; else if (cz < -1.0) mask |= CLIP_NEAR_BIT; - } clipMask[i] = mask; tmpOrMask |= mask; tmpAndMask &= mask; @@ -217,8 +204,7 @@ static GLvector4f * _XFORMAPI TAG(cliptest_points2)( GLvector4f *clip_vec, GLvector4f *proj_vec, GLubyte clipMask[], GLubyte *orMask, - GLubyte *andMask, - GLboolean viewport_z_clip ) + GLubyte *andMask) { const GLuint stride = clip_vec->stride; const GLuint count = clip_vec->count; diff --git a/dll/opengl/mesa/src/mesa/math/m_copy_tmp.h b/dll/opengl/mesa/math/m_copy_tmp.h similarity index 100% rename from dll/opengl/mesa/src/mesa/math/m_copy_tmp.h rename to dll/opengl/mesa/math/m_copy_tmp.h diff --git a/dll/opengl/mesa/src/mesa/math/m_debug.h b/dll/opengl/mesa/math/m_debug.h similarity index 100% rename from dll/opengl/mesa/src/mesa/math/m_debug.h rename to dll/opengl/mesa/math/m_debug.h diff --git a/dll/opengl/mesa/src/mesa/math/m_debug_clip.c b/dll/opengl/mesa/math/m_debug_clip.c similarity index 98% rename from dll/opengl/mesa/src/mesa/math/m_debug_clip.c rename to dll/opengl/mesa/math/m_debug_clip.c index bbad6ef024b..13d893d7edf 100644 --- a/dll/opengl/mesa/src/mesa/math/m_debug_clip.c +++ b/dll/opengl/mesa/math/m_debug_clip.c @@ -67,8 +67,7 @@ static GLvector4f *ref_cliptest_points4( GLvector4f *clip_vec, GLvector4f *proj_vec, GLubyte clipMask[], GLubyte *orMask, - GLubyte *andMask, - GLboolean viewport_z_clip ) + GLubyte *andMask ) { const GLuint stride = clip_vec->stride; const GLuint count = clip_vec->count; @@ -88,10 +87,8 @@ static GLvector4f *ref_cliptest_points4( GLvector4f *clip_vec, if ( cx + cw < 0 ) mask |= CLIP_LEFT_BIT; if ( -cy + cw < 0 ) mask |= CLIP_TOP_BIT; if ( cy + cw < 0 ) mask |= CLIP_BOTTOM_BIT; - if (viewport_z_clip) { if ( -cz + cw < 0 ) mask |= CLIP_FAR_BIT; if ( cz + cw < 0 ) mask |= CLIP_NEAR_BIT; - } clipMask[i] = mask; if ( mask ) { c++; @@ -125,8 +122,7 @@ static GLvector4f *ref_cliptest_points3( GLvector4f *clip_vec, GLvector4f *proj_vec, GLubyte clipMask[], GLubyte *orMask, - GLubyte *andMask, - GLboolean viewport_z_clip ) + GLubyte *andMask) { const GLuint stride = clip_vec->stride; const GLuint count = clip_vec->count; @@ -142,10 +138,8 @@ static GLvector4f *ref_cliptest_points3( GLvector4f *clip_vec, else if ( cx < -1.0 ) mask |= CLIP_LEFT_BIT; if ( cy > 1.0 ) mask |= CLIP_TOP_BIT; else if ( cy < -1.0 ) mask |= CLIP_BOTTOM_BIT; - if (viewport_z_clip) { if ( cz > 1.0 ) mask |= CLIP_FAR_BIT; else if ( cz < -1.0 ) mask |= CLIP_NEAR_BIT; - } clipMask[i] = mask; tmpOrMask |= mask; tmpAndMask &= mask; diff --git a/dll/opengl/mesa/src/mesa/math/m_debug_norm.c b/dll/opengl/mesa/math/m_debug_norm.c similarity index 100% rename from dll/opengl/mesa/src/mesa/math/m_debug_norm.c rename to dll/opengl/mesa/math/m_debug_norm.c diff --git a/dll/opengl/mesa/src/mesa/math/m_debug_util.h b/dll/opengl/mesa/math/m_debug_util.h similarity index 100% rename from dll/opengl/mesa/src/mesa/math/m_debug_util.h rename to dll/opengl/mesa/math/m_debug_util.h diff --git a/dll/opengl/mesa/src/mesa/math/m_debug_xform.c b/dll/opengl/mesa/math/m_debug_xform.c similarity index 100% rename from dll/opengl/mesa/src/mesa/math/m_debug_xform.c rename to dll/opengl/mesa/math/m_debug_xform.c diff --git a/dll/opengl/mesa/src/mesa/math/m_dotprod_tmp.h b/dll/opengl/mesa/math/m_dotprod_tmp.h similarity index 100% rename from dll/opengl/mesa/src/mesa/math/m_dotprod_tmp.h rename to dll/opengl/mesa/math/m_dotprod_tmp.h diff --git a/dll/opengl/mesa/src/mesa/math/m_eval.c b/dll/opengl/mesa/math/m_eval.c similarity index 100% rename from dll/opengl/mesa/src/mesa/math/m_eval.c rename to dll/opengl/mesa/math/m_eval.c diff --git a/dll/opengl/mesa/src/mesa/math/m_eval.h b/dll/opengl/mesa/math/m_eval.h similarity index 100% rename from dll/opengl/mesa/src/mesa/math/m_eval.h rename to dll/opengl/mesa/math/m_eval.h diff --git a/dll/opengl/mesa/src/mesa/math/m_matrix.c b/dll/opengl/mesa/math/m_matrix.c similarity index 100% rename from dll/opengl/mesa/src/mesa/math/m_matrix.c rename to dll/opengl/mesa/math/m_matrix.c diff --git a/dll/opengl/mesa/src/mesa/math/m_matrix.h b/dll/opengl/mesa/math/m_matrix.h similarity index 100% rename from dll/opengl/mesa/src/mesa/math/m_matrix.h rename to dll/opengl/mesa/math/m_matrix.h diff --git a/dll/opengl/mesa/src/mesa/math/m_norm_tmp.h b/dll/opengl/mesa/math/m_norm_tmp.h similarity index 100% rename from dll/opengl/mesa/src/mesa/math/m_norm_tmp.h rename to dll/opengl/mesa/math/m_norm_tmp.h diff --git a/dll/opengl/mesa/src/mesa/math/m_trans_tmp.h b/dll/opengl/mesa/math/m_trans_tmp.h similarity index 100% rename from dll/opengl/mesa/src/mesa/math/m_trans_tmp.h rename to dll/opengl/mesa/math/m_trans_tmp.h diff --git a/dll/opengl/mesa/src/mesa/math/m_translate.c b/dll/opengl/mesa/math/m_translate.c similarity index 100% rename from dll/opengl/mesa/src/mesa/math/m_translate.c rename to dll/opengl/mesa/math/m_translate.c diff --git a/dll/opengl/mesa/src/mesa/math/m_translate.h b/dll/opengl/mesa/math/m_translate.h similarity index 100% rename from dll/opengl/mesa/src/mesa/math/m_translate.h rename to dll/opengl/mesa/math/m_translate.h diff --git a/dll/opengl/mesa/src/mesa/math/m_vector.c b/dll/opengl/mesa/math/m_vector.c similarity index 100% rename from dll/opengl/mesa/src/mesa/math/m_vector.c rename to dll/opengl/mesa/math/m_vector.c diff --git a/dll/opengl/mesa/src/mesa/math/m_vector.h b/dll/opengl/mesa/math/m_vector.h similarity index 100% rename from dll/opengl/mesa/src/mesa/math/m_vector.h rename to dll/opengl/mesa/math/m_vector.h diff --git a/dll/opengl/mesa/src/mesa/math/m_xform.c b/dll/opengl/mesa/math/m_xform.c similarity index 100% rename from dll/opengl/mesa/src/mesa/math/m_xform.c rename to dll/opengl/mesa/math/m_xform.c diff --git a/dll/opengl/mesa/src/mesa/math/m_xform.h b/dll/opengl/mesa/math/m_xform.h similarity index 98% rename from dll/opengl/mesa/src/mesa/math/m_xform.h rename to dll/opengl/mesa/math/m_xform.h index 14ac956a7bc..ee7166116f2 100644 --- a/dll/opengl/mesa/src/mesa/math/m_xform.h +++ b/dll/opengl/mesa/math/m_xform.h @@ -103,8 +103,7 @@ typedef GLvector4f * (_XFORMAPIP clip_func)( GLvector4f *vClip, GLvector4f *vProj, GLubyte clipMask[], GLubyte *orMask, - GLubyte *andMask, - GLboolean viewport_z_clip ); + GLubyte *andMask ); typedef void (*dotprod_func)( GLfloat *out, GLuint out_stride, diff --git a/dll/opengl/mesa/src/mesa/math/m_xform_tmp.h b/dll/opengl/mesa/math/m_xform_tmp.h similarity index 100% rename from dll/opengl/mesa/src/mesa/math/m_xform_tmp.h rename to dll/opengl/mesa/math/m_xform_tmp.h diff --git a/dll/opengl/mesa/src/CMakeLists.txt b/dll/opengl/mesa/src/CMakeLists.txt deleted file mode 100644 index 758d7a77f2f..00000000000 --- a/dll/opengl/mesa/src/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ - -add_subdirectory(gallium) -add_subdirectory(glsl) -add_subdirectory(mapi/glapi) -add_subdirectory(mesa) diff --git a/dll/opengl/mesa/src/SConscript b/dll/opengl/mesa/src/SConscript deleted file mode 100644 index 0a30838def9..00000000000 --- a/dll/opengl/mesa/src/SConscript +++ /dev/null @@ -1,35 +0,0 @@ -Import('*') - - -if env['platform'] == 'windows': - SConscript('getopt/SConscript') - -SConscript('glsl/SConscript') - -if env['hostonly']: - # We are just compiling the things necessary on the host for cross - # compilation - Return() - - -# When env['gles'] is set, the targets defined in mapi/glapi/SConscript are not -# used. libgl-xlib and libgl-gdi adapt themselves to use the targets defined -# in mapi/glapi-shared/SConscript. mesa/SConscript also adapts itself to -# enable OpenGL ES support. -SConscript('mapi/glapi/SConscript') -SConscript('mesa/SConscript') - -SConscript('mapi/vgapi/SConscript') - -if not env['embedded']: - if env['platform'] not in ['windows', 'darwin']: - SConscript('glx/SConscript') - if env['platform'] not in ['darwin']: - SConscript('egl/main/SConscript') - SConscript('glu/sgi/SConscript') - - if env['gles']: - SConscript('mapi/shared-glapi/SConscript') - -SConscript('gallium/SConscript') - diff --git a/dll/opengl/mesa/src/gallium/CMakeLists.txt b/dll/opengl/mesa/src/gallium/CMakeLists.txt deleted file mode 100644 index 39d1ac24590..00000000000 --- a/dll/opengl/mesa/src/gallium/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ - -add_subdirectory(auxiliary) -add_subdirectory(drivers/softpipe) -add_subdirectory(state_trackers/wgl) -add_subdirectory(targets/libgl-gdi) -add_subdirectory(winsys/sw/gdi) diff --git a/dll/opengl/mesa/src/gallium/SConscript b/dll/opengl/mesa/src/gallium/SConscript deleted file mode 100644 index 4f4650698bd..00000000000 --- a/dll/opengl/mesa/src/gallium/SConscript +++ /dev/null @@ -1,134 +0,0 @@ -Import('env') - -# -# Auxiliary modules -# - -SConscript('auxiliary/SConscript') - -# -# Drivers -# - -SConscript([ - 'drivers/galahad/SConscript', - 'drivers/identity/SConscript', - 'drivers/llvmpipe/SConscript', - 'drivers/rbug/SConscript', - 'drivers/softpipe/SConscript', - 'drivers/svga/SConscript', - 'drivers/trace/SConscript', -]) - -if not env['msvc']: - # These drivers do not build on MSVC compilers - SConscript([ - 'drivers/i915/SConscript', - 'drivers/r300/SConscript', - ]) - -if env['drm']: - # These drivers depend on drm headers - if env['drm_radeon']: - SConscript([ - 'drivers/r600/SConscript', - ]) - # XXX: nouveau drivers have a tight dependency on libdrm, so to enable - # we need some version logic before we enable them. Also, ATM there is - # no nouveau target in scons - # if env['drm_nouveau']: - # SConscript([ - # 'drivers/nouveau/SConscript', - # 'drivers/nv50/SConscript', - # 'drivers/nvc0/SConscript', - # 'drivers/nvfx/SConscript', - # ]) - -# -# State trackers -# - -# Needed by some state trackers -SConscript('winsys/sw/null/SConscript') - -if not env['embedded']: - SConscript('state_trackers/vega/SConscript') - if env['platform'] not in ['darwin']: - SConscript('state_trackers/egl/SConscript') - - if env['x11']: - SConscript('state_trackers/glx/xlib/SConscript') - - if env['dri']: - SConscript('state_trackers/dri/SConscript') - - if env['dri'] and env['xorg']: - SConscript('state_trackers/xorg/SConscript') - - if env['platform'] == 'windows': - SConscript('state_trackers/wgl/SConscript') - -# -# Winsys -# - -SConscript('winsys/SConscript') - -# -# Targets -# - -SConscript([ - 'targets/graw-null/SConscript', -]) - -if not env['embedded']: - if env['platform'] not in ['darwin']: - SConscript([ - 'targets/egl-static/SConscript' - ]) - - if env['x11']: - SConscript([ - 'targets/graw-xlib/SConscript', - 'targets/libgl-xlib/SConscript', - ]) - - if env['platform'] == 'windows': - SConscript([ - 'targets/graw-gdi/SConscript', - 'targets/libgl-gdi/SConscript', - ]) - - if env['dri']: - SConscript([ - 'targets/SConscript.dri', - 'targets/dri-swrast/SConscript', - 'targets/dri-vmwgfx/SConscript', - #'targets/dri-nouveau/SConscript', - ]) - if env['drm_intel']: - SConscript([ - 'targets/dri-i915/SConscript', - ]) - if env['drm_radeon']: - SConscript([ - 'targets/dri-r300/SConscript', - 'targets/dri-r600/SConscript', - ]) - - if env['xorg'] and env['drm']: - SConscript([ - #'targets/xorg-i915/SConscript', - #'targets/xorg-nouveau/SConscript', - #'targets/xorg-radeon/SConscript', - ]) - - -# -# Unit tests & tools -# - -if not env['embedded']: - SConscript('tests/unit/SConscript') - SConscript('tests/graw/SConscript') diff --git a/dll/opengl/mesa/src/gallium/auxiliary/CMakeLists.txt b/dll/opengl/mesa/src/gallium/auxiliary/CMakeLists.txt deleted file mode 100644 index c449d873b13..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/CMakeLists.txt +++ /dev/null @@ -1,164 +0,0 @@ - -include_directories( - indices - util) - -add_definitions(-DWIN32_LEAN_AND_MEAN) - -list(APPEND SOURCE -#generated files - ../../../generated/gallium/auxiliary/indices/u_indices_gen.c - ../../../generated/gallium/auxiliary/indices/u_unfilled_gen.c - ../../../generated/gallium/auxiliary/util/u_format_srgb.c - ../../../generated/gallium/auxiliary/util/u_format_table.c - ../../../generated/gallium/auxiliary/util/u_half.c -# regular files - cso_cache/cso_cache.c - cso_cache/cso_context.c - cso_cache/cso_hash.c - draw/draw_context.c - draw/draw_fs.c - draw/draw_gs.c - draw/draw_pipe.c - draw/draw_pipe_aaline.c - draw/draw_pipe_aapoint.c - draw/draw_pipe_clip.c - draw/draw_pipe_cull.c - draw/draw_pipe_flatshade.c - draw/draw_pipe_offset.c - draw/draw_pipe_pstipple.c - draw/draw_pipe_stipple.c - draw/draw_pipe_twoside.c - draw/draw_pipe_unfilled.c - draw/draw_pipe_util.c - draw/draw_pipe_validate.c - draw/draw_pipe_vbuf.c - draw/draw_pipe_wide_line.c - draw/draw_pipe_wide_point.c - draw/draw_pt.c - draw/draw_pt_emit.c - draw/draw_pt_fetch.c - draw/draw_pt_fetch_emit.c - draw/draw_pt_fetch_shade_emit.c - draw/draw_pt_fetch_shade_pipeline.c - draw/draw_pt_post_vs.c - draw/draw_pt_so_emit.c - draw/draw_pt_util.c - draw/draw_pt_vsplit.c - draw/draw_vertex.c - draw/draw_vs.c - draw/draw_vs_exec.c - draw/draw_vs_ppc.c - draw/draw_vs_variant.c - os/os_misc.c - os/os_time.c - pipebuffer/pb_buffer_fenced.c - pipebuffer/pb_buffer_malloc.c - pipebuffer/pb_bufmgr_alt.c - pipebuffer/pb_bufmgr_cache.c - pipebuffer/pb_bufmgr_debug.c - pipebuffer/pb_bufmgr_mm.c - pipebuffer/pb_bufmgr_ondemand.c - pipebuffer/pb_bufmgr_pool.c - pipebuffer/pb_bufmgr_slab.c - pipebuffer/pb_validate.c - postprocess/pp_celshade.c - postprocess/pp_colors.c - postprocess/pp_init.c - postprocess/pp_mlaa.c - postprocess/pp_run.c - postprocess/pp_program.c - rbug/rbug_connection.c - rbug/rbug_context.c - rbug/rbug_core.c - rbug/rbug_demarshal.c - rbug/rbug_texture.c - rbug/rbug_shader.c - rtasm/rtasm_cpu.c - rtasm/rtasm_execmem.c - rtasm/rtasm_ppc.c - rtasm/rtasm_x86sse.c - tgsi/tgsi_build.c - tgsi/tgsi_dump.c - tgsi/tgsi_exec.c - tgsi/tgsi_info.c - tgsi/tgsi_iterate.c - tgsi/tgsi_parse.c - tgsi/tgsi_ppc.c - tgsi/tgsi_sanity.c - tgsi/tgsi_scan.c - tgsi/tgsi_strings.c - tgsi/tgsi_text.c - tgsi/tgsi_transform.c - tgsi/tgsi_ureg.c - tgsi/tgsi_util.c - translate/translate.c - translate/translate_cache.c - translate/translate_generic.c - translate/translate_sse.c - util/u_debug.c - util/u_debug_describe.c - util/u_debug_memory.c - util/u_debug_refcnt.c - util/u_debug_stack.c - util/u_debug_symbol.c - util/u_dump_defines.c - util/u_dump_state.c - util/u_bitmask.c - util/u_blit.c - util/u_blitter.c - util/u_cache.c - util/u_caps.c - util/u_cpu_detect.c - util/u_dl.c - util/u_draw.c - util/u_draw_quad.c - util/u_format.c - util/u_format_other.c - util/u_format_latc.c - util/u_format_s3tc.c - util/u_format_rgtc.c - util/u_format_etc.c - util/u_format_tests.c - util/u_format_yuv.c - util/u_format_zs.c - util/u_framebuffer.c - util/u_gen_mipmap.c - util/u_handle_table.c - util/u_hash.c - util/u_hash_table.c - util/u_index_modify.c - util/u_keymap.c - util/u_linear.c - util/u_linkage.c - util/u_network.c - util/u_math.c - util/u_mm.c - util/u_pstipple.c - util/u_rect.c - util/u_ringbuffer.c - util/u_sampler.c - util/u_simple_shaders.c - util/u_slab.c - util/u_snprintf.c - util/u_staging.c - util/u_surface.c - util/u_surfaces.c - util/u_texture.c - util/u_tile.c - util/u_transfer.c - util/u_resource.c - util/u_upload_mgr.c - util/u_vbuf.c - vl/vl_csc.c - vl/vl_compositor.c - vl/vl_decoder.c - vl/vl_mpeg12_decoder.c - vl/vl_mpeg12_bitstream.c - vl/vl_zscan.c - vl/vl_idct.c - vl/vl_mc.c - vl/vl_vertex_buffers.c - vl/vl_video_buffer.c) - -add_library(gallium_core STATIC EXCLUDE_FROM_ALL ${SOURCE}) \ No newline at end of file diff --git a/dll/opengl/mesa/src/gallium/auxiliary/Makefile.sources b/dll/opengl/mesa/src/gallium/auxiliary/Makefile.sources deleted file mode 100644 index f55a4eb8451..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/Makefile.sources +++ /dev/null @@ -1,191 +0,0 @@ -C_SOURCES := \ - cso_cache/cso_cache.c \ - cso_cache/cso_context.c \ - cso_cache/cso_hash.c \ - draw/draw_context.c \ - draw/draw_fs.c \ - draw/draw_gs.c \ - draw/draw_pipe.c \ - draw/draw_pipe_aaline.c \ - draw/draw_pipe_aapoint.c \ - draw/draw_pipe_clip.c \ - draw/draw_pipe_cull.c \ - draw/draw_pipe_flatshade.c \ - draw/draw_pipe_offset.c \ - draw/draw_pipe_pstipple.c \ - draw/draw_pipe_stipple.c \ - draw/draw_pipe_twoside.c \ - draw/draw_pipe_unfilled.c \ - draw/draw_pipe_util.c \ - draw/draw_pipe_validate.c \ - draw/draw_pipe_vbuf.c \ - draw/draw_pipe_wide_line.c \ - draw/draw_pipe_wide_point.c \ - draw/draw_pt.c \ - draw/draw_pt_emit.c \ - draw/draw_pt_fetch.c \ - draw/draw_pt_fetch_emit.c \ - draw/draw_pt_fetch_shade_emit.c \ - draw/draw_pt_fetch_shade_pipeline.c \ - draw/draw_pt_post_vs.c \ - draw/draw_pt_so_emit.c \ - draw/draw_pt_util.c \ - draw/draw_pt_vsplit.c \ - draw/draw_vertex.c \ - draw/draw_vs.c \ - draw/draw_vs_exec.c \ - draw/draw_vs_ppc.c \ - draw/draw_vs_variant.c \ - os/os_misc.c \ - os/os_time.c \ - pipebuffer/pb_buffer_fenced.c \ - pipebuffer/pb_buffer_malloc.c \ - pipebuffer/pb_bufmgr_alt.c \ - pipebuffer/pb_bufmgr_cache.c \ - pipebuffer/pb_bufmgr_debug.c \ - pipebuffer/pb_bufmgr_mm.c \ - pipebuffer/pb_bufmgr_ondemand.c \ - pipebuffer/pb_bufmgr_pool.c \ - pipebuffer/pb_bufmgr_slab.c \ - pipebuffer/pb_validate.c \ - postprocess/pp_celshade.c \ - postprocess/pp_colors.c \ - postprocess/pp_init.c \ - postprocess/pp_mlaa.c \ - postprocess/pp_run.c \ - postprocess/pp_program.c \ - rbug/rbug_connection.c \ - rbug/rbug_context.c \ - rbug/rbug_core.c \ - rbug/rbug_demarshal.c \ - rbug/rbug_texture.c \ - rbug/rbug_shader.c \ - rtasm/rtasm_cpu.c \ - rtasm/rtasm_execmem.c \ - rtasm/rtasm_ppc.c \ - rtasm/rtasm_x86sse.c \ - tgsi/tgsi_build.c \ - tgsi/tgsi_dump.c \ - tgsi/tgsi_exec.c \ - tgsi/tgsi_info.c \ - tgsi/tgsi_iterate.c \ - tgsi/tgsi_parse.c \ - tgsi/tgsi_ppc.c \ - tgsi/tgsi_sanity.c \ - tgsi/tgsi_scan.c \ - tgsi/tgsi_strings.c \ - tgsi/tgsi_text.c \ - tgsi/tgsi_transform.c \ - tgsi/tgsi_ureg.c \ - tgsi/tgsi_util.c \ - translate/translate.c \ - translate/translate_cache.c \ - translate/translate_generic.c \ - translate/translate_sse.c \ - util/u_debug.c \ - util/u_debug_describe.c \ - util/u_debug_memory.c \ - util/u_debug_refcnt.c \ - util/u_debug_stack.c \ - util/u_debug_symbol.c \ - util/u_dump_defines.c \ - util/u_dump_state.c \ - util/u_bitmask.c \ - util/u_blit.c \ - util/u_blitter.c \ - util/u_cache.c \ - util/u_caps.c \ - util/u_cpu_detect.c \ - util/u_dl.c \ - util/u_draw.c \ - util/u_draw_quad.c \ - util/u_format.c \ - util/u_format_other.c \ - util/u_format_latc.c \ - util/u_format_s3tc.c \ - util/u_format_rgtc.c \ - util/u_format_etc.c \ - util/u_format_tests.c \ - util/u_format_yuv.c \ - util/u_format_zs.c \ - util/u_framebuffer.c \ - util/u_gen_mipmap.c \ - util/u_handle_table.c \ - util/u_hash.c \ - util/u_hash_table.c \ - util/u_index_modify.c \ - util/u_keymap.c \ - util/u_linear.c \ - util/u_linkage.c \ - util/u_network.c \ - util/u_math.c \ - util/u_mm.c \ - util/u_pstipple.c \ - util/u_rect.c \ - util/u_ringbuffer.c \ - util/u_sampler.c \ - util/u_simple_shaders.c \ - util/u_slab.c \ - util/u_snprintf.c \ - util/u_staging.c \ - util/u_surface.c \ - util/u_surfaces.c \ - util/u_texture.c \ - util/u_tile.c \ - util/u_transfer.c \ - util/u_resource.c \ - util/u_upload_mgr.c \ - util/u_vbuf.c \ - vl/vl_csc.c \ - vl/vl_compositor.c \ - vl/vl_decoder.c \ - vl/vl_mpeg12_decoder.c \ - vl/vl_mpeg12_bitstream.c \ - vl/vl_zscan.c \ - vl/vl_idct.c \ - vl/vl_mc.c \ - vl/vl_vertex_buffers.c \ - vl/vl_video_buffer.c - -GENERATED_SOURCES := \ - indices/u_indices_gen.c \ - indices/u_unfilled_gen.c \ - util/u_format_srgb.c \ - util/u_format_table.c \ - util/u_half.c - -GALLIVM_SOURCES := \ - gallivm/lp_bld_arit.c \ - gallivm/lp_bld_assert.c \ - gallivm/lp_bld_bitarit.c \ - gallivm/lp_bld_const.c \ - gallivm/lp_bld_conv.c \ - gallivm/lp_bld_flow.c \ - gallivm/lp_bld_format_aos.c \ - gallivm/lp_bld_format_soa.c \ - gallivm/lp_bld_format_yuv.c \ - gallivm/lp_bld_gather.c \ - gallivm/lp_bld_init.c \ - gallivm/lp_bld_intr.c \ - gallivm/lp_bld_logic.c \ - gallivm/lp_bld_pack.c \ - gallivm/lp_bld_printf.c \ - gallivm/lp_bld_quad.c \ - gallivm/lp_bld_sample.c \ - gallivm/lp_bld_sample_aos.c \ - gallivm/lp_bld_sample_soa.c \ - gallivm/lp_bld_struct.c \ - gallivm/lp_bld_swizzle.c \ - gallivm/lp_bld_tgsi_aos.c \ - gallivm/lp_bld_tgsi_info.c \ - gallivm/lp_bld_tgsi_soa.c \ - gallivm/lp_bld_type.c \ - draw/draw_llvm.c \ - draw/draw_llvm_sample.c \ - draw/draw_llvm_translate.c \ - draw/draw_vs_llvm.c \ - draw/draw_pt_fetch_shade_pipeline_llvm.c - -GALLIVM_CPP_SOURCES := \ - gallivm/lp_bld_debug.cpp \ - gallivm/lp_bld_misc.cpp diff --git a/dll/opengl/mesa/src/gallium/auxiliary/SConscript b/dll/opengl/mesa/src/gallium/auxiliary/SConscript deleted file mode 100644 index 07c420e138d..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/SConscript +++ /dev/null @@ -1,72 +0,0 @@ -Import('*') - -from sys import executable as python_cmd - -env.Append(CPPPATH = [ - 'indices', - 'util', -]) - -env.CodeGenerate( - target = 'indices/u_indices_gen.c', - script = 'indices/u_indices_gen.py', - source = [], - command = python_cmd + ' $SCRIPT > $TARGET' -) - -env.CodeGenerate( - target = 'indices/u_unfilled_gen.c', - script = 'indices/u_unfilled_gen.py', - source = [], - command = python_cmd + ' $SCRIPT > $TARGET' -) - -env.CodeGenerate( - target = 'util/u_format_srgb.c', - script = 'util/u_format_srgb.py', - source = [], - command = python_cmd + ' $SCRIPT > $TARGET' -) - -env.CodeGenerate( - target = 'util/u_format_table.c', - script = '#src/gallium/auxiliary/util/u_format_table.py', - source = ['#src/gallium/auxiliary/util/u_format.csv'], - command = python_cmd + ' $SCRIPT $SOURCE > $TARGET' -) - -env.CodeGenerate( - target = 'util/u_half.c', - script = 'util/u_half.py', - source = [], - command = python_cmd + ' $SCRIPT > $TARGET' -) - -env.Depends('util/u_format_table.c', [ - '#src/gallium/auxiliary/util/u_format_parse.py', - 'util/u_format_pack.py', -]) - -source = env.ParseSourceList('Makefile.sources', [ - 'C_SOURCES', - 'GENERATED_SOURCES' -]) - -if env['llvm']: - source += env.ParseSourceList('Makefile.sources', [ - 'GALLIVM_SOURCES', - 'GALLIVM_CPP_SOURCES' - ]) - - if env['toolchain'] == 'crossmingw': - # compile lp_bld_misc.cpp without -gstabs option - source = env.compile_without_gstabs(source, "gallivm/lp_bld_misc.cpp") - -gallium = env.ConvenienceLibrary( - target = 'gallium', - source = source, -) - -env.Alias('gallium', gallium) - -Export('gallium') diff --git a/dll/opengl/mesa/src/gallium/auxiliary/cso_cache/cso_cache.c b/dll/opengl/mesa/src/gallium/auxiliary/cso_cache/cso_cache.c deleted file mode 100644 index c6069927b25..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/cso_cache/cso_cache.c +++ /dev/null @@ -1,346 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: Zack Rusin - */ - -#include "util/u_debug.h" - -#include "util/u_memory.h" - -#include "cso_cache.h" -#include "cso_hash.h" - - -struct cso_cache { - struct cso_hash *hashes[CSO_CACHE_MAX]; - int max_size; - - cso_sanitize_callback sanitize_cb; - void *sanitize_data; -}; - -#if 1 -static unsigned hash_key(const void *key, unsigned key_size) -{ - unsigned *ikey = (unsigned *)key; - unsigned hash = 0, i; - - assert(key_size % 4 == 0); - - /* I'm sure this can be improved on: - */ - for (i = 0; i < key_size/4; i++) - hash ^= ikey[i]; - - return hash; -} -#else -static unsigned hash_key(const unsigned char *p, int n) -{ - unsigned h = 0; - unsigned g; - - while (n--) { - h = (h << 4) + *p++; - if ((g = (h & 0xf0000000)) != 0) - h ^= g >> 23; - h &= ~g; - } - return h; -} -#endif - -unsigned cso_construct_key(void *item, int item_size) -{ - return hash_key((item), item_size); -} - -static INLINE struct cso_hash *_cso_hash_for_type(struct cso_cache *sc, enum cso_cache_type type) -{ - struct cso_hash *hash; - hash = sc->hashes[type]; - return hash; -} - -static void delete_blend_state(void *state, void *data) -{ - struct cso_blend *cso = (struct cso_blend *)state; - if (cso->delete_state) - cso->delete_state(cso->context, cso->data); - FREE(state); -} - -static void delete_depth_stencil_state(void *state, void *data) -{ - struct cso_depth_stencil_alpha *cso = (struct cso_depth_stencil_alpha *)state; - if (cso->delete_state) - cso->delete_state(cso->context, cso->data); - FREE(state); -} - -static void delete_sampler_state(void *state, void *data) -{ - struct cso_sampler *cso = (struct cso_sampler *)state; - if (cso->delete_state) - cso->delete_state(cso->context, cso->data); - FREE(state); -} - -static void delete_rasterizer_state(void *state, void *data) -{ - struct cso_rasterizer *cso = (struct cso_rasterizer *)state; - if (cso->delete_state) - cso->delete_state(cso->context, cso->data); - FREE(state); -} - -static void delete_fs_state(void *state, void *data) -{ - struct cso_fragment_shader *cso = (struct cso_fragment_shader *)state; - if (cso->delete_state) - cso->delete_state(cso->context, cso->data); - FREE(state); -} - -static void delete_vs_state(void *state, void *data) -{ - struct cso_vertex_shader *cso = (struct cso_vertex_shader *)state; - if (cso->delete_state) - cso->delete_state(cso->context, cso->data); - FREE(state); -} - -static void delete_velements(void *state, void *data) -{ - struct cso_velements *cso = (struct cso_velements *)state; - if (cso->delete_state) - cso->delete_state(cso->context, cso->data); - FREE(state); -} - -static INLINE void delete_cso(void *state, enum cso_cache_type type) -{ - switch (type) { - case CSO_BLEND: - delete_blend_state(state, 0); - break; - case CSO_SAMPLER: - delete_sampler_state(state, 0); - break; - case CSO_DEPTH_STENCIL_ALPHA: - delete_depth_stencil_state(state, 0); - break; - case CSO_RASTERIZER: - delete_rasterizer_state(state, 0); - break; - case CSO_FRAGMENT_SHADER: - delete_fs_state(state, 0); - break; - case CSO_VERTEX_SHADER: - delete_vs_state(state, 0); - break; - case CSO_VELEMENTS: - delete_velements(state, 0); - break; - default: - assert(0); - FREE(state); - } -} - - -static INLINE void sanitize_hash(struct cso_cache *sc, - struct cso_hash *hash, - enum cso_cache_type type, - int max_size) -{ - if (sc->sanitize_cb) - sc->sanitize_cb(hash, type, max_size, sc->sanitize_data); -} - - -static INLINE void sanitize_cb(struct cso_hash *hash, enum cso_cache_type type, - int max_size, void *user_data) -{ - /* if we're approach the maximum size, remove fourth of the entries - * otherwise every subsequent call will go through the same */ - int hash_size = cso_hash_size(hash); - int max_entries = (max_size > hash_size) ? max_size : hash_size; - int to_remove = (max_size < max_entries) * max_entries/4; - if (hash_size > max_size) - to_remove += hash_size - max_size; - while (to_remove) { - /*remove elements until we're good */ - /*fixme: currently we pick the nodes to remove at random*/ - struct cso_hash_iter iter = cso_hash_first_node(hash); - void *cso = cso_hash_take(hash, cso_hash_iter_key(iter)); - delete_cso(cso, type); - --to_remove; - } -} - -struct cso_hash_iter -cso_insert_state(struct cso_cache *sc, - unsigned hash_key, enum cso_cache_type type, - void *state) -{ - struct cso_hash *hash = _cso_hash_for_type(sc, type); - sanitize_hash(sc, hash, type, sc->max_size); - - return cso_hash_insert(hash, hash_key, state); -} - -struct cso_hash_iter -cso_find_state(struct cso_cache *sc, - unsigned hash_key, enum cso_cache_type type) -{ - struct cso_hash *hash = _cso_hash_for_type(sc, type); - - return cso_hash_find(hash, hash_key); -} - - -void *cso_hash_find_data_from_template( struct cso_hash *hash, - unsigned hash_key, - void *templ, - int size ) -{ - struct cso_hash_iter iter = cso_hash_find(hash, hash_key); - while (!cso_hash_iter_is_null(iter)) { - void *iter_data = cso_hash_iter_data(iter); - if (!memcmp(iter_data, templ, size)) { - /* We found a match - */ - return iter_data; - } - iter = cso_hash_iter_next(iter); - } - return NULL; -} - - -struct cso_hash_iter cso_find_state_template(struct cso_cache *sc, - unsigned hash_key, enum cso_cache_type type, - void *templ, unsigned size) -{ - struct cso_hash_iter iter = cso_find_state(sc, hash_key, type); - while (!cso_hash_iter_is_null(iter)) { - void *iter_data = cso_hash_iter_data(iter); - if (!memcmp(iter_data, templ, size)) - return iter; - iter = cso_hash_iter_next(iter); - } - return iter; -} - -void * cso_take_state(struct cso_cache *sc, - unsigned hash_key, enum cso_cache_type type) -{ - struct cso_hash *hash = _cso_hash_for_type(sc, type); - return cso_hash_take(hash, hash_key); -} - -struct cso_cache *cso_cache_create(void) -{ - struct cso_cache *sc = MALLOC_STRUCT(cso_cache); - int i; - if (sc == NULL) - return NULL; - - sc->max_size = 4096; - for (i = 0; i < CSO_CACHE_MAX; i++) - sc->hashes[i] = cso_hash_create(); - - sc->sanitize_cb = sanitize_cb; - sc->sanitize_data = 0; - - return sc; -} - -void cso_for_each_state(struct cso_cache *sc, enum cso_cache_type type, - cso_state_callback func, void *user_data) -{ - struct cso_hash *hash = _cso_hash_for_type(sc, type); - struct cso_hash_iter iter; - - iter = cso_hash_first_node(hash); - while (!cso_hash_iter_is_null(iter)) { - void *state = cso_hash_iter_data(iter); - iter = cso_hash_iter_next(iter); - if (state) { - func(state, user_data); - } - } -} - -void cso_cache_delete(struct cso_cache *sc) -{ - int i; - assert(sc); - - if (!sc) - return; - - /* delete driver data */ - cso_for_each_state(sc, CSO_BLEND, delete_blend_state, 0); - cso_for_each_state(sc, CSO_DEPTH_STENCIL_ALPHA, delete_depth_stencil_state, 0); - cso_for_each_state(sc, CSO_FRAGMENT_SHADER, delete_fs_state, 0); - cso_for_each_state(sc, CSO_VERTEX_SHADER, delete_vs_state, 0); - cso_for_each_state(sc, CSO_RASTERIZER, delete_rasterizer_state, 0); - cso_for_each_state(sc, CSO_SAMPLER, delete_sampler_state, 0); - cso_for_each_state(sc, CSO_VELEMENTS, delete_velements, 0); - - for (i = 0; i < CSO_CACHE_MAX; i++) - cso_hash_delete(sc->hashes[i]); - - FREE(sc); -} - -void cso_set_maximum_cache_size(struct cso_cache *sc, int number) -{ - int i; - - sc->max_size = number; - - for (i = 0; i < CSO_CACHE_MAX; i++) - sanitize_hash(sc, sc->hashes[i], i, sc->max_size); -} - -int cso_maximum_cache_size(const struct cso_cache *sc) -{ - return sc->max_size; -} - -void cso_cache_set_sanitize_callback(struct cso_cache *sc, - cso_sanitize_callback cb, - void *user_data) -{ - sc->sanitize_cb = cb; - sc->sanitize_data = user_data; -} - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/cso_cache/cso_cache.h b/dll/opengl/mesa/src/gallium/auxiliary/cso_cache/cso_cache.h deleted file mode 100644 index 1b17423c72b..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/cso_cache/cso_cache.h +++ /dev/null @@ -1,191 +0,0 @@ -/************************************************************************** - * - * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - /** - * @file - * Constant State Object (CSO) cache. - * - * The basic idea is that the states are created via the - * create_state/bind_state/delete_state semantics. The driver is expected to - * perform as much of the Gallium state translation to whatever its internal - * representation is during the create call. Gallium then has a caching - * mechanism where it stores the created states. When the pipeline needs an - * actual state change, a bind call is issued. In the bind call the driver - * gets its already translated representation. - * - * Those semantics mean that the driver doesn't do the repeated translations - * of states on every frame, but only once, when a new state is actually - * created. - * - * Even on hardware that doesn't do any kind of state cache, it makes the - * driver look a lot neater, plus it avoids all the redundant state - * translations on every frame. - * - * Currently our constant state objects are: - * - alpha test - * - blend - * - depth stencil - * - fragment shader - * - rasterizer (old setup) - * - sampler - * - vertex shader - * - vertex elements - * - * Things that are not constant state objects include: - * - blend_color - * - clip_state - * - clear_color_state - * - constant_buffer - * - feedback_state - * - framebuffer_state - * - polygon_stipple - * - scissor_state - * - texture_state - * - viewport_state - * - * @author Zack Rusin - */ - -#ifndef CSO_CACHE_H -#define CSO_CACHE_H - -#include "pipe/p_context.h" -#include "pipe/p_state.h" - -/* cso_hash.h is necessary for cso_hash_iter, as MSVC requires structures - * returned by value to be fully defined */ -#include "cso_hash.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -enum cso_cache_type { - CSO_RASTERIZER, - CSO_BLEND, - CSO_DEPTH_STENCIL_ALPHA, - CSO_FRAGMENT_SHADER, - CSO_VERTEX_SHADER, - CSO_SAMPLER, - CSO_VELEMENTS, - CSO_CACHE_MAX, -}; - -typedef void (*cso_state_callback)(void *ctx, void *obj); - -typedef void (*cso_sanitize_callback)(struct cso_hash *hash, - enum cso_cache_type type, - int max_size, - void *user_data); - -struct cso_cache; - -struct cso_blend { - struct pipe_blend_state state; - void *data; - cso_state_callback delete_state; - struct pipe_context *context; -}; - -struct cso_depth_stencil_alpha { - struct pipe_depth_stencil_alpha_state state; - void *data; - cso_state_callback delete_state; - struct pipe_context *context; -}; - -struct cso_rasterizer { - struct pipe_rasterizer_state state; - void *data; - cso_state_callback delete_state; - struct pipe_context *context; -}; - -struct cso_fragment_shader { - struct pipe_shader_state state; - void *data; - cso_state_callback delete_state; - struct pipe_context *context; -}; - -struct cso_vertex_shader { - struct pipe_shader_state state; - void *data; - cso_state_callback delete_state; - struct pipe_context *context; -}; - -struct cso_sampler { - struct pipe_sampler_state state; - void *data; - cso_state_callback delete_state; - struct pipe_context *context; -}; - -struct cso_velems_state { - unsigned count; - struct pipe_vertex_element velems[PIPE_MAX_ATTRIBS]; -}; - -struct cso_velements { - struct cso_velems_state state; - void *data; - cso_state_callback delete_state; - struct pipe_context *context; -}; - -unsigned cso_construct_key(void *item, int item_size); - -struct cso_cache *cso_cache_create(void); -void cso_cache_delete(struct cso_cache *sc); - -void cso_cache_set_sanitize_callback(struct cso_cache *sc, - cso_sanitize_callback cb, - void *user_data); - -struct cso_hash_iter cso_insert_state(struct cso_cache *sc, - unsigned hash_key, enum cso_cache_type type, - void *state); -struct cso_hash_iter cso_find_state(struct cso_cache *sc, - unsigned hash_key, enum cso_cache_type type); -struct cso_hash_iter cso_find_state_template(struct cso_cache *sc, - unsigned hash_key, enum cso_cache_type type, - void *templ, unsigned size); -void cso_for_each_state(struct cso_cache *sc, enum cso_cache_type type, - cso_state_callback func, void *user_data); -void * cso_take_state(struct cso_cache *sc, unsigned hash_key, - enum cso_cache_type type); - -void cso_set_maximum_cache_size(struct cso_cache *sc, int number); -int cso_maximum_cache_size(const struct cso_cache *sc); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/cso_cache/cso_context.c b/dll/opengl/mesa/src/gallium/auxiliary/cso_cache/cso_context.c deleted file mode 100644 index c95a1ba4117..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/cso_cache/cso_context.c +++ /dev/null @@ -1,1402 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - /** - * @file - * - * Wrap the cso cache & hash mechanisms in a simplified - * pipe-driver-specific interface. - * - * @author Zack Rusin - * @author Keith Whitwell - */ - -#include "pipe/p_state.h" -#include "util/u_framebuffer.h" -#include "util/u_inlines.h" -#include "util/u_math.h" -#include "util/u_memory.h" -#include "tgsi/tgsi_parse.h" - -#include "cso_cache/cso_context.h" -#include "cso_cache/cso_cache.h" -#include "cso_cache/cso_hash.h" -#include "cso_context.h" - - -/** - * Info related to samplers and sampler views. - * We have one of these for fragment samplers and another for vertex samplers. - */ -struct sampler_info -{ - struct { - void *samplers[PIPE_MAX_SAMPLERS]; - unsigned nr_samplers; - } hw; - - void *samplers[PIPE_MAX_SAMPLERS]; - unsigned nr_samplers; - - void *samplers_saved[PIPE_MAX_SAMPLERS]; - unsigned nr_samplers_saved; - - struct pipe_sampler_view *views[PIPE_MAX_SAMPLERS]; - unsigned nr_views; - - struct pipe_sampler_view *views_saved[PIPE_MAX_SAMPLERS]; - unsigned nr_views_saved; -}; - - - -struct cso_context { - struct pipe_context *pipe; - struct cso_cache *cache; - - boolean has_geometry_shader; - boolean has_streamout; - - struct sampler_info fragment_samplers; - struct sampler_info vertex_samplers; - - uint nr_vertex_buffers; - struct pipe_vertex_buffer vertex_buffers[PIPE_MAX_ATTRIBS]; - - uint nr_vertex_buffers_saved; - struct pipe_vertex_buffer vertex_buffers_saved[PIPE_MAX_ATTRIBS]; - - unsigned nr_so_targets; - struct pipe_stream_output_target *so_targets[PIPE_MAX_SO_BUFFERS]; - - unsigned nr_so_targets_saved; - struct pipe_stream_output_target *so_targets_saved[PIPE_MAX_SO_BUFFERS]; - - /** Current and saved state. - * The saved state is used as a 1-deep stack. - */ - void *blend, *blend_saved; - void *depth_stencil, *depth_stencil_saved; - void *rasterizer, *rasterizer_saved; - void *fragment_shader, *fragment_shader_saved, *geometry_shader; - void *vertex_shader, *vertex_shader_saved, *geometry_shader_saved; - void *velements, *velements_saved; - - struct pipe_clip_state clip; - struct pipe_clip_state clip_saved; - - struct pipe_framebuffer_state fb, fb_saved; - struct pipe_viewport_state vp, vp_saved; - struct pipe_blend_color blend_color; - unsigned sample_mask; - struct pipe_stencil_ref stencil_ref, stencil_ref_saved; -}; - - -static boolean delete_blend_state(struct cso_context *ctx, void *state) -{ - struct cso_blend *cso = (struct cso_blend *)state; - - if (ctx->blend == cso->data) - return FALSE; - - if (cso->delete_state) - cso->delete_state(cso->context, cso->data); - FREE(state); - return TRUE; -} - -static boolean delete_depth_stencil_state(struct cso_context *ctx, void *state) -{ - struct cso_depth_stencil_alpha *cso = (struct cso_depth_stencil_alpha *)state; - - if (ctx->depth_stencil == cso->data) - return FALSE; - - if (cso->delete_state) - cso->delete_state(cso->context, cso->data); - FREE(state); - - return TRUE; -} - -static boolean delete_sampler_state(struct cso_context *ctx, void *state) -{ - struct cso_sampler *cso = (struct cso_sampler *)state; - if (cso->delete_state) - cso->delete_state(cso->context, cso->data); - FREE(state); - return TRUE; -} - -static boolean delete_rasterizer_state(struct cso_context *ctx, void *state) -{ - struct cso_rasterizer *cso = (struct cso_rasterizer *)state; - - if (ctx->rasterizer == cso->data) - return FALSE; - if (cso->delete_state) - cso->delete_state(cso->context, cso->data); - FREE(state); - return TRUE; -} - -static boolean delete_fs_state(struct cso_context *ctx, void *state) -{ - struct cso_fragment_shader *cso = (struct cso_fragment_shader *)state; - if (ctx->fragment_shader == cso->data) - return FALSE; - if (cso->delete_state) - cso->delete_state(cso->context, cso->data); - FREE(state); - return TRUE; -} - -static boolean delete_vs_state(struct cso_context *ctx, void *state) -{ - struct cso_vertex_shader *cso = (struct cso_vertex_shader *)state; - if (ctx->vertex_shader == cso->data) - return TRUE; - if (cso->delete_state) - cso->delete_state(cso->context, cso->data); - FREE(state); - return FALSE; -} - -static boolean delete_vertex_elements(struct cso_context *ctx, - void *state) -{ - struct cso_velements *cso = (struct cso_velements *)state; - - if (ctx->velements == cso->data) - return FALSE; - - if (cso->delete_state) - cso->delete_state(cso->context, cso->data); - FREE(state); - return TRUE; -} - - -static INLINE boolean delete_cso(struct cso_context *ctx, - void *state, enum cso_cache_type type) -{ - switch (type) { - case CSO_BLEND: - return delete_blend_state(ctx, state); - break; - case CSO_SAMPLER: - return delete_sampler_state(ctx, state); - break; - case CSO_DEPTH_STENCIL_ALPHA: - return delete_depth_stencil_state(ctx, state); - break; - case CSO_RASTERIZER: - return delete_rasterizer_state(ctx, state); - break; - case CSO_FRAGMENT_SHADER: - return delete_fs_state(ctx, state); - break; - case CSO_VERTEX_SHADER: - return delete_vs_state(ctx, state); - break; - case CSO_VELEMENTS: - return delete_vertex_elements(ctx, state); - break; - default: - assert(0); - FREE(state); - } - return FALSE; -} - -static INLINE void sanitize_hash(struct cso_hash *hash, enum cso_cache_type type, - int max_size, void *user_data) -{ - struct cso_context *ctx = (struct cso_context *)user_data; - /* if we're approach the maximum size, remove fourth of the entries - * otherwise every subsequent call will go through the same */ - int hash_size = cso_hash_size(hash); - int max_entries = (max_size > hash_size) ? max_size : hash_size; - int to_remove = (max_size < max_entries) * max_entries/4; - struct cso_hash_iter iter = cso_hash_first_node(hash); - if (hash_size > max_size) - to_remove += hash_size - max_size; - while (to_remove) { - /*remove elements until we're good */ - /*fixme: currently we pick the nodes to remove at random*/ - void *cso = cso_hash_iter_data(iter); - if (delete_cso(ctx, cso, type)) { - iter = cso_hash_erase(hash, iter); - --to_remove; - } else - iter = cso_hash_iter_next(iter); - } -} - - -struct cso_context *cso_create_context( struct pipe_context *pipe ) -{ - struct cso_context *ctx = CALLOC_STRUCT(cso_context); - if (ctx == NULL) - goto out; - - assert(PIPE_MAX_SAMPLERS == PIPE_MAX_VERTEX_SAMPLERS); - - ctx->cache = cso_cache_create(); - if (ctx->cache == NULL) - goto out; - cso_cache_set_sanitize_callback(ctx->cache, - sanitize_hash, - ctx); - - ctx->pipe = pipe; - - /* Enable for testing: */ - if (0) cso_set_maximum_cache_size( ctx->cache, 4 ); - - if (pipe->screen->get_shader_param(pipe->screen, PIPE_SHADER_GEOMETRY, - PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0) { - ctx->has_geometry_shader = TRUE; - } - if (pipe->screen->get_param(pipe->screen, - PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS) != 0) { - ctx->has_streamout = TRUE; - } - - return ctx; - -out: - cso_destroy_context( ctx ); - return NULL; -} - - -/** - * Prior to context destruction, this function unbinds all state objects. - */ -void cso_release_all( struct cso_context *ctx ) -{ - unsigned i; - struct sampler_info *info; - - if (ctx->pipe) { - ctx->pipe->bind_blend_state( ctx->pipe, NULL ); - ctx->pipe->bind_rasterizer_state( ctx->pipe, NULL ); - ctx->pipe->bind_fragment_sampler_states( ctx->pipe, 0, NULL ); - if (ctx->pipe->bind_vertex_sampler_states) - ctx->pipe->bind_vertex_sampler_states(ctx->pipe, 0, NULL); - ctx->pipe->bind_depth_stencil_alpha_state( ctx->pipe, NULL ); - ctx->pipe->bind_fs_state( ctx->pipe, NULL ); - ctx->pipe->bind_vs_state( ctx->pipe, NULL ); - ctx->pipe->bind_vertex_elements_state( ctx->pipe, NULL ); - ctx->pipe->set_fragment_sampler_views(ctx->pipe, 0, NULL); - if (ctx->pipe->set_vertex_sampler_views) - ctx->pipe->set_vertex_sampler_views(ctx->pipe, 0, NULL); - if (ctx->pipe->set_stream_output_targets) - ctx->pipe->set_stream_output_targets(ctx->pipe, 0, NULL, 0); - } - - /* free fragment samplers, views */ - info = &ctx->fragment_samplers; - for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { - pipe_sampler_view_reference(&info->views[i], NULL); - pipe_sampler_view_reference(&info->views_saved[i], NULL); - } - - /* free vertex samplers, views */ - info = &ctx->vertex_samplers; - for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { - pipe_sampler_view_reference(&info->views[i], NULL); - pipe_sampler_view_reference(&info->views_saved[i], NULL); - } - - util_unreference_framebuffer_state(&ctx->fb); - util_unreference_framebuffer_state(&ctx->fb_saved); - - util_copy_vertex_buffers(ctx->vertex_buffers, - &ctx->nr_vertex_buffers, - NULL, 0); - util_copy_vertex_buffers(ctx->vertex_buffers_saved, - &ctx->nr_vertex_buffers_saved, - NULL, 0); - - for (i = 0; i < PIPE_MAX_SO_BUFFERS; i++) { - pipe_so_target_reference(&ctx->so_targets[i], NULL); - pipe_so_target_reference(&ctx->so_targets_saved[i], NULL); - } - - if (ctx->cache) { - cso_cache_delete( ctx->cache ); - ctx->cache = NULL; - } -} - - -/** - * Free the CSO context. NOTE: the state tracker should have previously called - * cso_release_all(). - */ -void cso_destroy_context( struct cso_context *ctx ) -{ - if (ctx) { - FREE( ctx ); - } -} - - -/* Those function will either find the state of the given template - * in the cache or they will create a new state from the given - * template, insert it in the cache and return it. - */ - -/* - * If the driver returns 0 from the create method then they will assign - * the data member of the cso to be the template itself. - */ - -enum pipe_error cso_set_blend(struct cso_context *ctx, - const struct pipe_blend_state *templ) -{ - unsigned key_size, hash_key; - struct cso_hash_iter iter; - void *handle; - - key_size = templ->independent_blend_enable ? sizeof(struct pipe_blend_state) : - (char *)&(templ->rt[1]) - (char *)templ; - hash_key = cso_construct_key((void*)templ, key_size); - iter = cso_find_state_template(ctx->cache, hash_key, CSO_BLEND, (void*)templ, key_size); - - if (cso_hash_iter_is_null(iter)) { - struct cso_blend *cso = MALLOC(sizeof(struct cso_blend)); - if (!cso) - return PIPE_ERROR_OUT_OF_MEMORY; - - memset(&cso->state, 0, sizeof cso->state); - memcpy(&cso->state, templ, key_size); - cso->data = ctx->pipe->create_blend_state(ctx->pipe, &cso->state); - cso->delete_state = (cso_state_callback)ctx->pipe->delete_blend_state; - cso->context = ctx->pipe; - - iter = cso_insert_state(ctx->cache, hash_key, CSO_BLEND, cso); - if (cso_hash_iter_is_null(iter)) { - FREE(cso); - return PIPE_ERROR_OUT_OF_MEMORY; - } - - handle = cso->data; - } - else { - handle = ((struct cso_blend *)cso_hash_iter_data(iter))->data; - } - - if (ctx->blend != handle) { - ctx->blend = handle; - ctx->pipe->bind_blend_state(ctx->pipe, handle); - } - return PIPE_OK; -} - -void cso_save_blend(struct cso_context *ctx) -{ - assert(!ctx->blend_saved); - ctx->blend_saved = ctx->blend; -} - -void cso_restore_blend(struct cso_context *ctx) -{ - if (ctx->blend != ctx->blend_saved) { - ctx->blend = ctx->blend_saved; - ctx->pipe->bind_blend_state(ctx->pipe, ctx->blend_saved); - } - ctx->blend_saved = NULL; -} - - - -enum pipe_error cso_set_depth_stencil_alpha(struct cso_context *ctx, - const struct pipe_depth_stencil_alpha_state *templ) -{ - unsigned key_size = sizeof(struct pipe_depth_stencil_alpha_state); - unsigned hash_key = cso_construct_key((void*)templ, key_size); - struct cso_hash_iter iter = cso_find_state_template(ctx->cache, - hash_key, - CSO_DEPTH_STENCIL_ALPHA, - (void*)templ, key_size); - void *handle; - - if (cso_hash_iter_is_null(iter)) { - struct cso_depth_stencil_alpha *cso = MALLOC(sizeof(struct cso_depth_stencil_alpha)); - if (!cso) - return PIPE_ERROR_OUT_OF_MEMORY; - - memcpy(&cso->state, templ, sizeof(*templ)); - cso->data = ctx->pipe->create_depth_stencil_alpha_state(ctx->pipe, &cso->state); - cso->delete_state = (cso_state_callback)ctx->pipe->delete_depth_stencil_alpha_state; - cso->context = ctx->pipe; - - iter = cso_insert_state(ctx->cache, hash_key, CSO_DEPTH_STENCIL_ALPHA, cso); - if (cso_hash_iter_is_null(iter)) { - FREE(cso); - return PIPE_ERROR_OUT_OF_MEMORY; - } - - handle = cso->data; - } - else { - handle = ((struct cso_depth_stencil_alpha *)cso_hash_iter_data(iter))->data; - } - - if (ctx->depth_stencil != handle) { - ctx->depth_stencil = handle; - ctx->pipe->bind_depth_stencil_alpha_state(ctx->pipe, handle); - } - return PIPE_OK; -} - -void cso_save_depth_stencil_alpha(struct cso_context *ctx) -{ - assert(!ctx->depth_stencil_saved); - ctx->depth_stencil_saved = ctx->depth_stencil; -} - -void cso_restore_depth_stencil_alpha(struct cso_context *ctx) -{ - if (ctx->depth_stencil != ctx->depth_stencil_saved) { - ctx->depth_stencil = ctx->depth_stencil_saved; - ctx->pipe->bind_depth_stencil_alpha_state(ctx->pipe, ctx->depth_stencil_saved); - } - ctx->depth_stencil_saved = NULL; -} - - - -enum pipe_error cso_set_rasterizer(struct cso_context *ctx, - const struct pipe_rasterizer_state *templ) -{ - unsigned key_size = sizeof(struct pipe_rasterizer_state); - unsigned hash_key = cso_construct_key((void*)templ, key_size); - struct cso_hash_iter iter = cso_find_state_template(ctx->cache, - hash_key, CSO_RASTERIZER, - (void*)templ, key_size); - void *handle = NULL; - - if (cso_hash_iter_is_null(iter)) { - struct cso_rasterizer *cso = MALLOC(sizeof(struct cso_rasterizer)); - if (!cso) - return PIPE_ERROR_OUT_OF_MEMORY; - - memcpy(&cso->state, templ, sizeof(*templ)); - cso->data = ctx->pipe->create_rasterizer_state(ctx->pipe, &cso->state); - cso->delete_state = (cso_state_callback)ctx->pipe->delete_rasterizer_state; - cso->context = ctx->pipe; - - iter = cso_insert_state(ctx->cache, hash_key, CSO_RASTERIZER, cso); - if (cso_hash_iter_is_null(iter)) { - FREE(cso); - return PIPE_ERROR_OUT_OF_MEMORY; - } - - handle = cso->data; - } - else { - handle = ((struct cso_rasterizer *)cso_hash_iter_data(iter))->data; - } - - if (ctx->rasterizer != handle) { - ctx->rasterizer = handle; - ctx->pipe->bind_rasterizer_state(ctx->pipe, handle); - } - return PIPE_OK; -} - -void cso_save_rasterizer(struct cso_context *ctx) -{ - assert(!ctx->rasterizer_saved); - ctx->rasterizer_saved = ctx->rasterizer; -} - -void cso_restore_rasterizer(struct cso_context *ctx) -{ - if (ctx->rasterizer != ctx->rasterizer_saved) { - ctx->rasterizer = ctx->rasterizer_saved; - ctx->pipe->bind_rasterizer_state(ctx->pipe, ctx->rasterizer_saved); - } - ctx->rasterizer_saved = NULL; -} - - - -enum pipe_error cso_set_fragment_shader_handle(struct cso_context *ctx, - void *handle ) -{ - if (ctx->fragment_shader != handle) { - ctx->fragment_shader = handle; - ctx->pipe->bind_fs_state(ctx->pipe, handle); - } - return PIPE_OK; -} - -void cso_delete_fragment_shader(struct cso_context *ctx, void *handle ) -{ - if (handle == ctx->fragment_shader) { - /* unbind before deleting */ - ctx->pipe->bind_fs_state(ctx->pipe, NULL); - ctx->fragment_shader = NULL; - } - ctx->pipe->delete_fs_state(ctx->pipe, handle); -} - -/* Not really working: - */ -#if 0 -enum pipe_error cso_set_fragment_shader(struct cso_context *ctx, - const struct pipe_shader_state *templ) -{ - const struct tgsi_token *tokens = templ->tokens; - unsigned num_tokens = tgsi_num_tokens(tokens); - size_t tokens_size = num_tokens*sizeof(struct tgsi_token); - unsigned hash_key = cso_construct_key((void*)tokens, tokens_size); - struct cso_hash_iter iter = cso_find_state_template(ctx->cache, - hash_key, - CSO_FRAGMENT_SHADER, - (void*)tokens, - sizeof(*templ)); /* XXX correct? tokens_size? */ - void *handle = NULL; - - if (cso_hash_iter_is_null(iter)) { - struct cso_fragment_shader *cso = MALLOC(sizeof(struct cso_fragment_shader) + tokens_size); - struct tgsi_token *cso_tokens = (struct tgsi_token *)((char *)cso + sizeof(*cso)); - - if (!cso) - return PIPE_ERROR_OUT_OF_MEMORY; - - memcpy(cso_tokens, tokens, tokens_size); - cso->state.tokens = cso_tokens; - cso->data = ctx->pipe->create_fs_state(ctx->pipe, &cso->state); - cso->delete_state = (cso_state_callback)ctx->pipe->delete_fs_state; - cso->context = ctx->pipe; - - iter = cso_insert_state(ctx->cache, hash_key, CSO_FRAGMENT_SHADER, cso); - if (cso_hash_iter_is_null(iter)) { - FREE(cso); - return PIPE_ERROR_OUT_OF_MEMORY; - } - - handle = cso->data; - } - else { - handle = ((struct cso_fragment_shader *)cso_hash_iter_data(iter))->data; - } - - return cso_set_fragment_shader_handle( ctx, handle ); -} -#endif - -void cso_save_fragment_shader(struct cso_context *ctx) -{ - assert(!ctx->fragment_shader_saved); - ctx->fragment_shader_saved = ctx->fragment_shader; -} - -void cso_restore_fragment_shader(struct cso_context *ctx) -{ - if (ctx->fragment_shader_saved != ctx->fragment_shader) { - ctx->pipe->bind_fs_state(ctx->pipe, ctx->fragment_shader_saved); - ctx->fragment_shader = ctx->fragment_shader_saved; - } - ctx->fragment_shader_saved = NULL; -} - - -enum pipe_error cso_set_vertex_shader_handle(struct cso_context *ctx, - void *handle ) -{ - if (ctx->vertex_shader != handle) { - ctx->vertex_shader = handle; - ctx->pipe->bind_vs_state(ctx->pipe, handle); - } - return PIPE_OK; -} - -void cso_delete_vertex_shader(struct cso_context *ctx, void *handle ) -{ - if (handle == ctx->vertex_shader) { - /* unbind before deleting */ - ctx->pipe->bind_vs_state(ctx->pipe, NULL); - ctx->vertex_shader = NULL; - } - ctx->pipe->delete_vs_state(ctx->pipe, handle); -} - - -/* Not really working: - */ -#if 0 -enum pipe_error cso_set_vertex_shader(struct cso_context *ctx, - const struct pipe_shader_state *templ) -{ - unsigned hash_key = cso_construct_key((void*)templ, - sizeof(struct pipe_shader_state)); - struct cso_hash_iter iter = cso_find_state_template(ctx->cache, - hash_key, CSO_VERTEX_SHADER, - (void*)templ, - sizeof(*templ)); - void *handle = NULL; - - if (cso_hash_iter_is_null(iter)) { - struct cso_vertex_shader *cso = MALLOC(sizeof(struct cso_vertex_shader)); - - if (!cso) - return PIPE_ERROR_OUT_OF_MEMORY; - - memcpy(cso->state, templ, sizeof(*templ)); - cso->data = ctx->pipe->create_vs_state(ctx->pipe, &cso->state); - cso->delete_state = (cso_state_callback)ctx->pipe->delete_vs_state; - cso->context = ctx->pipe; - - iter = cso_insert_state(ctx->cache, hash_key, CSO_VERTEX_SHADER, cso); - if (cso_hash_iter_is_null(iter)) { - FREE(cso); - return PIPE_ERROR_OUT_OF_MEMORY; - } - - handle = cso->data; - } - else { - handle = ((struct cso_vertex_shader *)cso_hash_iter_data(iter))->data; - } - - return cso_set_vertex_shader_handle( ctx, handle ); -} -#endif - - - -void cso_save_vertex_shader(struct cso_context *ctx) -{ - assert(!ctx->vertex_shader_saved); - ctx->vertex_shader_saved = ctx->vertex_shader; -} - -void cso_restore_vertex_shader(struct cso_context *ctx) -{ - if (ctx->vertex_shader_saved != ctx->vertex_shader) { - ctx->pipe->bind_vs_state(ctx->pipe, ctx->vertex_shader_saved); - ctx->vertex_shader = ctx->vertex_shader_saved; - } - ctx->vertex_shader_saved = NULL; -} - - -enum pipe_error cso_set_framebuffer(struct cso_context *ctx, - const struct pipe_framebuffer_state *fb) -{ - if (memcmp(&ctx->fb, fb, sizeof(*fb)) != 0) { - util_copy_framebuffer_state(&ctx->fb, fb); - ctx->pipe->set_framebuffer_state(ctx->pipe, fb); - } - return PIPE_OK; -} - -void cso_save_framebuffer(struct cso_context *ctx) -{ - util_copy_framebuffer_state(&ctx->fb_saved, &ctx->fb); -} - -void cso_restore_framebuffer(struct cso_context *ctx) -{ - if (memcmp(&ctx->fb, &ctx->fb_saved, sizeof(ctx->fb))) { - util_copy_framebuffer_state(&ctx->fb, &ctx->fb_saved); - ctx->pipe->set_framebuffer_state(ctx->pipe, &ctx->fb); - util_unreference_framebuffer_state(&ctx->fb_saved); - } -} - - -enum pipe_error cso_set_viewport(struct cso_context *ctx, - const struct pipe_viewport_state *vp) -{ - if (memcmp(&ctx->vp, vp, sizeof(*vp))) { - ctx->vp = *vp; - ctx->pipe->set_viewport_state(ctx->pipe, vp); - } - return PIPE_OK; -} - -void cso_save_viewport(struct cso_context *ctx) -{ - ctx->vp_saved = ctx->vp; -} - - -void cso_restore_viewport(struct cso_context *ctx) -{ - if (memcmp(&ctx->vp, &ctx->vp_saved, sizeof(ctx->vp))) { - ctx->vp = ctx->vp_saved; - ctx->pipe->set_viewport_state(ctx->pipe, &ctx->vp); - } -} - - -enum pipe_error cso_set_blend_color(struct cso_context *ctx, - const struct pipe_blend_color *bc) -{ - if (memcmp(&ctx->blend_color, bc, sizeof(ctx->blend_color))) { - ctx->blend_color = *bc; - ctx->pipe->set_blend_color(ctx->pipe, bc); - } - return PIPE_OK; -} - -enum pipe_error cso_set_sample_mask(struct cso_context *ctx, - unsigned sample_mask) -{ - if (ctx->sample_mask != sample_mask) { - ctx->sample_mask = sample_mask; - ctx->pipe->set_sample_mask(ctx->pipe, sample_mask); - } - return PIPE_OK; -} - -enum pipe_error cso_set_stencil_ref(struct cso_context *ctx, - const struct pipe_stencil_ref *sr) -{ - if (memcmp(&ctx->stencil_ref, sr, sizeof(ctx->stencil_ref))) { - ctx->stencil_ref = *sr; - ctx->pipe->set_stencil_ref(ctx->pipe, sr); - } - return PIPE_OK; -} - -void cso_save_stencil_ref(struct cso_context *ctx) -{ - ctx->stencil_ref_saved = ctx->stencil_ref; -} - - -void cso_restore_stencil_ref(struct cso_context *ctx) -{ - if (memcmp(&ctx->stencil_ref, &ctx->stencil_ref_saved, sizeof(ctx->stencil_ref))) { - ctx->stencil_ref = ctx->stencil_ref_saved; - ctx->pipe->set_stencil_ref(ctx->pipe, &ctx->stencil_ref); - } -} - -enum pipe_error cso_set_geometry_shader_handle(struct cso_context *ctx, - void *handle) -{ - assert(ctx->has_geometry_shader || !handle); - - if (ctx->has_geometry_shader && ctx->geometry_shader != handle) { - ctx->geometry_shader = handle; - ctx->pipe->bind_gs_state(ctx->pipe, handle); - } - return PIPE_OK; -} - -void cso_delete_geometry_shader(struct cso_context *ctx, void *handle) -{ - if (handle == ctx->geometry_shader) { - /* unbind before deleting */ - ctx->pipe->bind_gs_state(ctx->pipe, NULL); - ctx->geometry_shader = NULL; - } - ctx->pipe->delete_gs_state(ctx->pipe, handle); -} - -void cso_save_geometry_shader(struct cso_context *ctx) -{ - if (!ctx->has_geometry_shader) { - return; - } - - assert(!ctx->geometry_shader_saved); - ctx->geometry_shader_saved = ctx->geometry_shader; -} - -void cso_restore_geometry_shader(struct cso_context *ctx) -{ - if (!ctx->has_geometry_shader) { - return; - } - - if (ctx->geometry_shader_saved != ctx->geometry_shader) { - ctx->pipe->bind_gs_state(ctx->pipe, ctx->geometry_shader_saved); - ctx->geometry_shader = ctx->geometry_shader_saved; - } - ctx->geometry_shader_saved = NULL; -} - -/* clip state */ - -static INLINE void -clip_state_cpy(struct pipe_clip_state *dst, - const struct pipe_clip_state *src) -{ - memcpy(dst->ucp, src->ucp, sizeof(dst->ucp)); -} - -static INLINE int -clip_state_cmp(const struct pipe_clip_state *a, - const struct pipe_clip_state *b) -{ - return memcmp(a->ucp, b->ucp, sizeof(a->ucp)); -} - -void -cso_set_clip(struct cso_context *ctx, - const struct pipe_clip_state *clip) -{ - if (clip_state_cmp(&ctx->clip, clip)) { - clip_state_cpy(&ctx->clip, clip); - ctx->pipe->set_clip_state(ctx->pipe, clip); - } -} - -void -cso_save_clip(struct cso_context *ctx) -{ - clip_state_cpy(&ctx->clip_saved, &ctx->clip); -} - -void -cso_restore_clip(struct cso_context *ctx) -{ - if (clip_state_cmp(&ctx->clip, &ctx->clip_saved)) { - clip_state_cpy(&ctx->clip, &ctx->clip_saved); - ctx->pipe->set_clip_state(ctx->pipe, &ctx->clip_saved); - } -} - -enum pipe_error cso_set_vertex_elements(struct cso_context *ctx, - unsigned count, - const struct pipe_vertex_element *states) -{ - unsigned key_size, hash_key; - struct cso_hash_iter iter; - void *handle; - struct cso_velems_state velems_state; - - /* need to include the count into the stored state data too. - Otherwise first few count pipe_vertex_elements could be identical even if count - is different, and there's no guarantee the hash would be different in that - case neither */ - key_size = sizeof(struct pipe_vertex_element) * count + sizeof(unsigned); - velems_state.count = count; - memcpy(velems_state.velems, states, sizeof(struct pipe_vertex_element) * count); - hash_key = cso_construct_key((void*)&velems_state, key_size); - iter = cso_find_state_template(ctx->cache, hash_key, CSO_VELEMENTS, (void*)&velems_state, key_size); - - if (cso_hash_iter_is_null(iter)) { - struct cso_velements *cso = MALLOC(sizeof(struct cso_velements)); - if (!cso) - return PIPE_ERROR_OUT_OF_MEMORY; - - memcpy(&cso->state, &velems_state, key_size); - cso->data = ctx->pipe->create_vertex_elements_state(ctx->pipe, count, &cso->state.velems[0]); - cso->delete_state = (cso_state_callback)ctx->pipe->delete_vertex_elements_state; - cso->context = ctx->pipe; - - iter = cso_insert_state(ctx->cache, hash_key, CSO_VELEMENTS, cso); - if (cso_hash_iter_is_null(iter)) { - FREE(cso); - return PIPE_ERROR_OUT_OF_MEMORY; - } - - handle = cso->data; - } - else { - handle = ((struct cso_velements *)cso_hash_iter_data(iter))->data; - } - - if (ctx->velements != handle) { - ctx->velements = handle; - ctx->pipe->bind_vertex_elements_state(ctx->pipe, handle); - } - return PIPE_OK; -} - -void cso_save_vertex_elements(struct cso_context *ctx) -{ - assert(!ctx->velements_saved); - ctx->velements_saved = ctx->velements; -} - -void cso_restore_vertex_elements(struct cso_context *ctx) -{ - if (ctx->velements != ctx->velements_saved) { - ctx->velements = ctx->velements_saved; - ctx->pipe->bind_vertex_elements_state(ctx->pipe, ctx->velements_saved); - } - ctx->velements_saved = NULL; -} - -/* vertex buffers */ - -void cso_set_vertex_buffers(struct cso_context *ctx, - unsigned count, - const struct pipe_vertex_buffer *buffers) -{ - if (count != ctx->nr_vertex_buffers || - memcmp(buffers, ctx->vertex_buffers, - sizeof(struct pipe_vertex_buffer) * count) != 0) { - util_copy_vertex_buffers(ctx->vertex_buffers, &ctx->nr_vertex_buffers, - buffers, count); - ctx->pipe->set_vertex_buffers(ctx->pipe, count, buffers); - } -} - -void cso_save_vertex_buffers(struct cso_context *ctx) -{ - util_copy_vertex_buffers(ctx->vertex_buffers_saved, - &ctx->nr_vertex_buffers_saved, - ctx->vertex_buffers, - ctx->nr_vertex_buffers); -} - -void cso_restore_vertex_buffers(struct cso_context *ctx) -{ - util_copy_vertex_buffers(ctx->vertex_buffers, - &ctx->nr_vertex_buffers, - ctx->vertex_buffers_saved, - ctx->nr_vertex_buffers_saved); - ctx->pipe->set_vertex_buffers(ctx->pipe, ctx->nr_vertex_buffers, - ctx->vertex_buffers); -} - - -/**************** fragment/vertex sampler view state *************************/ - -static enum pipe_error -single_sampler(struct cso_context *ctx, - struct sampler_info *info, - unsigned idx, - const struct pipe_sampler_state *templ) -{ - void *handle = NULL; - - if (templ != NULL) { - unsigned key_size = sizeof(struct pipe_sampler_state); - unsigned hash_key = cso_construct_key((void*)templ, key_size); - struct cso_hash_iter iter = - cso_find_state_template(ctx->cache, - hash_key, CSO_SAMPLER, - (void *) templ, key_size); - - if (cso_hash_iter_is_null(iter)) { - struct cso_sampler *cso = MALLOC(sizeof(struct cso_sampler)); - if (!cso) - return PIPE_ERROR_OUT_OF_MEMORY; - - memcpy(&cso->state, templ, sizeof(*templ)); - cso->data = ctx->pipe->create_sampler_state(ctx->pipe, &cso->state); - cso->delete_state = (cso_state_callback)ctx->pipe->delete_sampler_state; - cso->context = ctx->pipe; - - iter = cso_insert_state(ctx->cache, hash_key, CSO_SAMPLER, cso); - if (cso_hash_iter_is_null(iter)) { - FREE(cso); - return PIPE_ERROR_OUT_OF_MEMORY; - } - - handle = cso->data; - } - else { - handle = ((struct cso_sampler *)cso_hash_iter_data(iter))->data; - } - } - - info->samplers[idx] = handle; - - return PIPE_OK; -} - -enum pipe_error -cso_single_sampler(struct cso_context *ctx, - unsigned idx, - const struct pipe_sampler_state *templ) -{ - return single_sampler(ctx, &ctx->fragment_samplers, idx, templ); -} - -enum pipe_error -cso_single_vertex_sampler(struct cso_context *ctx, - unsigned idx, - const struct pipe_sampler_state *templ) -{ - return single_sampler(ctx, &ctx->vertex_samplers, idx, templ); -} - - - -static void -single_sampler_done(struct cso_context *ctx, - struct sampler_info *info) -{ - unsigned i; - - /* find highest non-null sampler */ - for (i = PIPE_MAX_SAMPLERS; i > 0; i--) { - if (info->samplers[i - 1] != NULL) - break; - } - - info->nr_samplers = i; - - if (info->hw.nr_samplers != info->nr_samplers || - memcmp(info->hw.samplers, - info->samplers, - info->nr_samplers * sizeof(void *)) != 0) - { - memcpy(info->hw.samplers, - info->samplers, - info->nr_samplers * sizeof(void *)); - info->hw.nr_samplers = info->nr_samplers; - - if (info == &ctx->fragment_samplers) { - ctx->pipe->bind_fragment_sampler_states(ctx->pipe, - info->nr_samplers, - info->samplers); - } - else if (info == &ctx->vertex_samplers) { - ctx->pipe->bind_vertex_sampler_states(ctx->pipe, - info->nr_samplers, - info->samplers); - } - else { - assert(0); - } - } -} - -void -cso_single_sampler_done( struct cso_context *ctx ) -{ - single_sampler_done(ctx, &ctx->fragment_samplers); -} - -void -cso_single_vertex_sampler_done(struct cso_context *ctx) -{ - single_sampler_done(ctx, &ctx->vertex_samplers); -} - - -/* - * If the function encouters any errors it will return the - * last one. Done to always try to set as many samplers - * as possible. - */ -static enum pipe_error -set_samplers(struct cso_context *ctx, - struct sampler_info *info, - unsigned nr, - const struct pipe_sampler_state **templates) -{ - unsigned i; - enum pipe_error temp, error = PIPE_OK; - - /* TODO: fastpath - */ - - for (i = 0; i < nr; i++) { - temp = single_sampler(ctx, info, i, templates[i]); - if (temp != PIPE_OK) - error = temp; - } - - for ( ; i < info->nr_samplers; i++) { - temp = single_sampler(ctx, info, i, NULL); - if (temp != PIPE_OK) - error = temp; - } - - single_sampler_done(ctx, info); - - return error; -} - -enum pipe_error -cso_set_samplers(struct cso_context *ctx, - unsigned nr, - const struct pipe_sampler_state **templates) -{ - return set_samplers(ctx, &ctx->fragment_samplers, nr, templates); -} - -enum pipe_error -cso_set_vertex_samplers(struct cso_context *ctx, - unsigned nr, - const struct pipe_sampler_state **templates) -{ - return set_samplers(ctx, &ctx->vertex_samplers, nr, templates); -} - - - -static void -save_samplers(struct cso_context *ctx, struct sampler_info *info) -{ - info->nr_samplers_saved = info->nr_samplers; - memcpy(info->samplers_saved, info->samplers, sizeof(info->samplers)); -} - -void -cso_save_samplers(struct cso_context *ctx) -{ - save_samplers(ctx, &ctx->fragment_samplers); -} - -void -cso_save_vertex_samplers(struct cso_context *ctx) -{ - save_samplers(ctx, &ctx->vertex_samplers); -} - - - -static void -restore_samplers(struct cso_context *ctx, struct sampler_info *info) -{ - info->nr_samplers = info->nr_samplers_saved; - memcpy(info->samplers, info->samplers_saved, sizeof(info->samplers)); - single_sampler_done(ctx, info); -} - -void -cso_restore_samplers(struct cso_context *ctx) -{ - restore_samplers(ctx, &ctx->fragment_samplers); -} - -void -cso_restore_vertex_samplers(struct cso_context *ctx) -{ - restore_samplers(ctx, &ctx->vertex_samplers); -} - - - -static void -set_sampler_views(struct cso_context *ctx, - struct sampler_info *info, - void (*set_views)(struct pipe_context *, - unsigned num_views, - struct pipe_sampler_view **), - uint count, - struct pipe_sampler_view **views) -{ - uint i; - - /* reference new views */ - for (i = 0; i < count; i++) { - pipe_sampler_view_reference(&info->views[i], views[i]); - } - /* unref extra old views, if any */ - for (; i < info->nr_views; i++) { - pipe_sampler_view_reference(&info->views[i], NULL); - } - - info->nr_views = count; - - /* bind the new sampler views */ - set_views(ctx->pipe, count, info->views); -} - -void -cso_set_fragment_sampler_views(struct cso_context *ctx, - uint count, - struct pipe_sampler_view **views) -{ - set_sampler_views(ctx, &ctx->fragment_samplers, - ctx->pipe->set_fragment_sampler_views, - count, views); -} - -void -cso_set_vertex_sampler_views(struct cso_context *ctx, - uint count, - struct pipe_sampler_view **views) -{ - set_sampler_views(ctx, &ctx->vertex_samplers, - ctx->pipe->set_vertex_sampler_views, - count, views); -} - - - -static void -save_sampler_views(struct cso_context *ctx, - struct sampler_info *info) -{ - uint i; - - info->nr_views_saved = info->nr_views; - - for (i = 0; i < info->nr_views; i++) { - assert(!info->views_saved[i]); - pipe_sampler_view_reference(&info->views_saved[i], info->views[i]); - } -} - -void -cso_save_fragment_sampler_views(struct cso_context *ctx) -{ - save_sampler_views(ctx, &ctx->fragment_samplers); -} - -void -cso_save_vertex_sampler_views(struct cso_context *ctx) -{ - save_sampler_views(ctx, &ctx->vertex_samplers); -} - - -static void -restore_sampler_views(struct cso_context *ctx, - struct sampler_info *info, - void (*set_views)(struct pipe_context *, - unsigned num_views, - struct pipe_sampler_view **)) -{ - uint i; - - for (i = 0; i < info->nr_views_saved; i++) { - pipe_sampler_view_reference(&info->views[i], NULL); - /* move the reference from one pointer to another */ - info->views[i] = info->views_saved[i]; - info->views_saved[i] = NULL; - } - for (; i < info->nr_views; i++) { - pipe_sampler_view_reference(&info->views[i], NULL); - } - - /* bind the old/saved sampler views */ - set_views(ctx->pipe, info->nr_views_saved, info->views); - - info->nr_views = info->nr_views_saved; - info->nr_views_saved = 0; -} - -void -cso_restore_fragment_sampler_views(struct cso_context *ctx) -{ - restore_sampler_views(ctx, &ctx->fragment_samplers, - ctx->pipe->set_fragment_sampler_views); -} - -void -cso_restore_vertex_sampler_views(struct cso_context *ctx) -{ - restore_sampler_views(ctx, &ctx->vertex_samplers, - ctx->pipe->set_vertex_sampler_views); -} - - -void -cso_set_stream_outputs(struct cso_context *ctx, - unsigned num_targets, - struct pipe_stream_output_target **targets, - unsigned append_bitmask) -{ - struct pipe_context *pipe = ctx->pipe; - uint i; - - if (!ctx->has_streamout) { - assert(num_targets == 0); - return; - } - - if (ctx->nr_so_targets == 0 && num_targets == 0) { - /* Nothing to do. */ - return; - } - - /* reference new targets */ - for (i = 0; i < num_targets; i++) { - pipe_so_target_reference(&ctx->so_targets[i], targets[i]); - } - /* unref extra old targets, if any */ - for (; i < ctx->nr_so_targets; i++) { - pipe_so_target_reference(&ctx->so_targets[i], NULL); - } - - pipe->set_stream_output_targets(pipe, num_targets, targets, - append_bitmask); - ctx->nr_so_targets = num_targets; -} - -void -cso_save_stream_outputs(struct cso_context *ctx) -{ - uint i; - - if (!ctx->has_streamout) { - return; - } - - ctx->nr_so_targets_saved = ctx->nr_so_targets; - - for (i = 0; i < ctx->nr_so_targets; i++) { - assert(!ctx->so_targets_saved[i]); - pipe_so_target_reference(&ctx->so_targets_saved[i], ctx->so_targets[i]); - } -} - -void -cso_restore_stream_outputs(struct cso_context *ctx) -{ - struct pipe_context *pipe = ctx->pipe; - uint i; - - if (!ctx->has_streamout) { - return; - } - - if (ctx->nr_so_targets == 0 && ctx->nr_so_targets_saved == 0) { - /* Nothing to do. */ - return; - } - - for (i = 0; i < ctx->nr_so_targets_saved; i++) { - pipe_so_target_reference(&ctx->so_targets[i], NULL); - /* move the reference from one pointer to another */ - ctx->so_targets[i] = ctx->so_targets_saved[i]; - ctx->so_targets_saved[i] = NULL; - } - for (; i < ctx->nr_so_targets; i++) { - pipe_so_target_reference(&ctx->so_targets[i], NULL); - } - - /* ~0 means append */ - pipe->set_stream_output_targets(pipe, ctx->nr_so_targets_saved, - ctx->so_targets, ~0); - - ctx->nr_so_targets = ctx->nr_so_targets_saved; - ctx->nr_so_targets_saved = 0; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/cso_cache/cso_context.h b/dll/opengl/mesa/src/gallium/auxiliary/cso_cache/cso_context.h deleted file mode 100644 index 5102d706e33..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/cso_cache/cso_context.h +++ /dev/null @@ -1,231 +0,0 @@ -/************************************************************************** - * - * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#ifndef CSO_CONTEXT_H -#define CSO_CONTEXT_H - -#include "pipe/p_context.h" -#include "pipe/p_state.h" -#include "pipe/p_defines.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -struct cso_context; - -struct cso_context *cso_create_context( struct pipe_context *pipe ); - -void cso_release_all( struct cso_context *ctx ); - -void cso_destroy_context( struct cso_context *cso ); - - - -enum pipe_error cso_set_blend( struct cso_context *cso, - const struct pipe_blend_state *blend ); -void cso_save_blend(struct cso_context *cso); -void cso_restore_blend(struct cso_context *cso); - - - -enum pipe_error cso_set_depth_stencil_alpha( struct cso_context *cso, - const struct pipe_depth_stencil_alpha_state *dsa ); -void cso_save_depth_stencil_alpha(struct cso_context *cso); -void cso_restore_depth_stencil_alpha(struct cso_context *cso); - - - -enum pipe_error cso_set_rasterizer( struct cso_context *cso, - const struct pipe_rasterizer_state *rasterizer ); -void cso_save_rasterizer(struct cso_context *cso); -void cso_restore_rasterizer(struct cso_context *cso); - - - -enum pipe_error cso_set_samplers( struct cso_context *cso, - unsigned count, - const struct pipe_sampler_state **states ); -void cso_save_samplers(struct cso_context *cso); -void cso_restore_samplers(struct cso_context *cso); - -/* Alternate interface to support state trackers that like to modify - * samplers one at a time: - */ -enum pipe_error cso_single_sampler( struct cso_context *cso, - unsigned nr, - const struct pipe_sampler_state *states ); - -void cso_single_sampler_done( struct cso_context *cso ); - -enum pipe_error cso_set_vertex_samplers(struct cso_context *cso, - unsigned count, - const struct pipe_sampler_state **states); - -void -cso_save_vertex_samplers(struct cso_context *cso); - -void -cso_restore_vertex_samplers(struct cso_context *cso); - -enum pipe_error -cso_single_vertex_sampler(struct cso_context *cso, - unsigned nr, - const struct pipe_sampler_state *states); - -void -cso_single_vertex_sampler_done(struct cso_context *cso); - - -enum pipe_error cso_set_vertex_elements(struct cso_context *ctx, - unsigned count, - const struct pipe_vertex_element *states); -void cso_save_vertex_elements(struct cso_context *ctx); -void cso_restore_vertex_elements(struct cso_context *ctx); - - -void cso_set_vertex_buffers(struct cso_context *ctx, - unsigned count, - const struct pipe_vertex_buffer *buffers); -void cso_save_vertex_buffers(struct cso_context *ctx); -void cso_restore_vertex_buffers(struct cso_context *ctx); - - -void cso_set_stream_outputs(struct cso_context *ctx, - unsigned num_targets, - struct pipe_stream_output_target **targets, - unsigned append_bitmask); -void cso_save_stream_outputs(struct cso_context *ctx); -void cso_restore_stream_outputs(struct cso_context *ctx); - - -/* These aren't really sensible -- most of the time the api provides - * object semantics for shaders anyway, and the cases where it doesn't - * (eg mesa's internall-generated texenv programs), it will be up to - * the state tracker to implement their own specialized caching. - */ -enum pipe_error cso_set_fragment_shader_handle(struct cso_context *ctx, - void *handle ); -void cso_delete_fragment_shader(struct cso_context *ctx, void *handle ); -/* -enum pipe_error cso_set_fragment_shader( struct cso_context *cso, - const struct pipe_shader_state *shader ); -*/ -void cso_save_fragment_shader(struct cso_context *cso); -void cso_restore_fragment_shader(struct cso_context *cso); - - -enum pipe_error cso_set_vertex_shader_handle(struct cso_context *ctx, - void *handle ); -void cso_delete_vertex_shader(struct cso_context *ctx, void *handle ); -/* -enum pipe_error cso_set_vertex_shader( struct cso_context *cso, - const struct pipe_shader_state *shader ); -*/ -void cso_save_vertex_shader(struct cso_context *cso); -void cso_restore_vertex_shader(struct cso_context *cso); - - -enum pipe_error cso_set_geometry_shader_handle(struct cso_context *ctx, - void *handle); -void cso_delete_geometry_shader(struct cso_context *ctx, void *handle); -void cso_save_geometry_shader(struct cso_context *cso); -void cso_restore_geometry_shader(struct cso_context *cso); - - -enum pipe_error cso_set_framebuffer(struct cso_context *cso, - const struct pipe_framebuffer_state *fb); -void cso_save_framebuffer(struct cso_context *cso); -void cso_restore_framebuffer(struct cso_context *cso); - - -enum pipe_error cso_set_viewport(struct cso_context *cso, - const struct pipe_viewport_state *vp); -void cso_save_viewport(struct cso_context *cso); -void cso_restore_viewport(struct cso_context *cso); - - -enum pipe_error cso_set_blend_color(struct cso_context *cso, - const struct pipe_blend_color *bc); - -enum pipe_error cso_set_sample_mask(struct cso_context *cso, - unsigned stencil_mask); - -enum pipe_error cso_set_stencil_ref(struct cso_context *cso, - const struct pipe_stencil_ref *sr); -void cso_save_stencil_ref(struct cso_context *cso); -void cso_restore_stencil_ref(struct cso_context *cso); - - -/* clip state */ - -void -cso_set_clip(struct cso_context *cso, - const struct pipe_clip_state *clip); - -void -cso_save_clip(struct cso_context *cso); - -void -cso_restore_clip(struct cso_context *cso); - - -/* fragment sampler view state */ - -void -cso_set_fragment_sampler_views(struct cso_context *cso, - uint count, - struct pipe_sampler_view **views); - -void -cso_save_fragment_sampler_views(struct cso_context *cso); - -void -cso_restore_fragment_sampler_views(struct cso_context *cso); - - -/* vertex sampler view state */ - -void -cso_set_vertex_sampler_views(struct cso_context *cso, - uint count, - struct pipe_sampler_view **views); - -void -cso_save_vertex_sampler_views(struct cso_context *cso); - -void -cso_restore_vertex_sampler_views(struct cso_context *cso); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/cso_cache/cso_hash.c b/dll/opengl/mesa/src/gallium/auxiliary/cso_cache/cso_hash.c deleted file mode 100644 index 288cef7b6fa..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/cso_cache/cso_hash.c +++ /dev/null @@ -1,439 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - /* - * Authors: - * Zack Rusin - */ - -#include "util/u_debug.h" -#include "util/u_memory.h" - -#include "cso_hash.h" - -#define MAX(a, b) ((a > b) ? (a) : (b)) - -static const int MinNumBits = 4; - -static const unsigned char prime_deltas[] = { - 0, 0, 1, 3, 1, 5, 3, 3, 1, 9, 7, 5, 3, 9, 25, 3, - 1, 21, 3, 21, 7, 15, 9, 5, 3, 29, 15, 0, 0, 0, 0, 0 -}; - -static int primeForNumBits(int numBits) -{ - return (1 << numBits) + prime_deltas[numBits]; -} - -/* - Returns the smallest integer n such that - primeForNumBits(n) >= hint. -*/ -static int countBits(int hint) -{ - int numBits = 0; - int bits = hint; - - while (bits > 1) { - bits >>= 1; - numBits++; - } - - if (numBits >= (int)sizeof(prime_deltas)) { - numBits = sizeof(prime_deltas) - 1; - } else if (primeForNumBits(numBits) < hint) { - ++numBits; - } - return numBits; -} - -struct cso_node { - struct cso_node *next; - unsigned key; - void *value; -}; - -struct cso_hash_data { - struct cso_node *fakeNext; - struct cso_node **buckets; - int size; - int nodeSize; - short userNumBits; - short numBits; - int numBuckets; -}; - -struct cso_hash { - union { - struct cso_hash_data *d; - struct cso_node *e; - } data; -}; - -static void *cso_data_allocate_node(struct cso_hash_data *hash) -{ - return MALLOC(hash->nodeSize); -} - -static void cso_free_node(struct cso_node *node) -{ - FREE(node); -} - -static struct cso_node * -cso_hash_create_node(struct cso_hash *hash, - unsigned akey, void *avalue, - struct cso_node **anextNode) -{ - struct cso_node *node = cso_data_allocate_node(hash->data.d); - - if (!node) - return NULL; - - node->key = akey; - node->value = avalue; - - node->next = (struct cso_node*)(*anextNode); - *anextNode = node; - ++hash->data.d->size; - return node; -} - -static void cso_data_rehash(struct cso_hash_data *hash, int hint) -{ - if (hint < 0) { - hint = countBits(-hint); - if (hint < MinNumBits) - hint = MinNumBits; - hash->userNumBits = (short)hint; - while (primeForNumBits(hint) < (hash->size >> 1)) - ++hint; - } else if (hint < MinNumBits) { - hint = MinNumBits; - } - - if (hash->numBits != hint) { - struct cso_node *e = (struct cso_node *)(hash); - struct cso_node **oldBuckets = hash->buckets; - int oldNumBuckets = hash->numBuckets; - int i = 0; - - hash->numBits = (short)hint; - hash->numBuckets = primeForNumBits(hint); - hash->buckets = MALLOC(sizeof(struct cso_node*) * hash->numBuckets); - for (i = 0; i < hash->numBuckets; ++i) - hash->buckets[i] = e; - - for (i = 0; i < oldNumBuckets; ++i) { - struct cso_node *firstNode = oldBuckets[i]; - while (firstNode != e) { - unsigned h = firstNode->key; - struct cso_node *lastNode = firstNode; - struct cso_node *afterLastNode; - struct cso_node **beforeFirstNode; - - while (lastNode->next != e && lastNode->next->key == h) - lastNode = lastNode->next; - - afterLastNode = lastNode->next; - beforeFirstNode = &hash->buckets[h % hash->numBuckets]; - while (*beforeFirstNode != e) - beforeFirstNode = &(*beforeFirstNode)->next; - lastNode->next = *beforeFirstNode; - *beforeFirstNode = firstNode; - firstNode = afterLastNode; - } - } - FREE(oldBuckets); - } -} - -static void cso_data_might_grow(struct cso_hash_data *hash) -{ - if (hash->size >= hash->numBuckets) - cso_data_rehash(hash, hash->numBits + 1); -} - -static void cso_data_has_shrunk(struct cso_hash_data *hash) -{ - if (hash->size <= (hash->numBuckets >> 3) && - hash->numBits > hash->userNumBits) { - int max = MAX(hash->numBits-2, hash->userNumBits); - cso_data_rehash(hash, max); - } -} - -static struct cso_node *cso_data_first_node(struct cso_hash_data *hash) -{ - struct cso_node *e = (struct cso_node *)(hash); - struct cso_node **bucket = hash->buckets; - int n = hash->numBuckets; - while (n--) { - if (*bucket != e) - return *bucket; - ++bucket; - } - return e; -} - -static struct cso_node **cso_hash_find_node(struct cso_hash *hash, unsigned akey) -{ - struct cso_node **node; - - if (hash->data.d->numBuckets) { - node = (struct cso_node **)(&hash->data.d->buckets[akey % hash->data.d->numBuckets]); - assert(*node == hash->data.e || (*node)->next); - while (*node != hash->data.e && (*node)->key != akey) - node = &(*node)->next; - } else { - node = (struct cso_node **)((const struct cso_node * const *)(&hash->data.e)); - } - return node; -} - -struct cso_hash_iter cso_hash_insert(struct cso_hash *hash, - unsigned key, void *data) -{ - cso_data_might_grow(hash->data.d); - - { - struct cso_node **nextNode = cso_hash_find_node(hash, key); - struct cso_node *node = cso_hash_create_node(hash, key, data, nextNode); - if (!node) { - struct cso_hash_iter null_iter = {hash, 0}; - return null_iter; - } - - { - struct cso_hash_iter iter = {hash, node}; - return iter; - } - } -} - -struct cso_hash * cso_hash_create(void) -{ - struct cso_hash *hash = MALLOC_STRUCT(cso_hash); - if (!hash) - return NULL; - - hash->data.d = MALLOC_STRUCT(cso_hash_data); - if (!hash->data.d) { - FREE(hash); - return NULL; - } - - hash->data.d->fakeNext = 0; - hash->data.d->buckets = 0; - hash->data.d->size = 0; - hash->data.d->nodeSize = sizeof(struct cso_node); - hash->data.d->userNumBits = (short)MinNumBits; - hash->data.d->numBits = 0; - hash->data.d->numBuckets = 0; - - return hash; -} - -void cso_hash_delete(struct cso_hash *hash) -{ - struct cso_node *e_for_x = (struct cso_node *)(hash->data.d); - struct cso_node **bucket = (struct cso_node **)(hash->data.d->buckets); - int n = hash->data.d->numBuckets; - while (n--) { - struct cso_node *cur = *bucket++; - while (cur != e_for_x) { - struct cso_node *next = cur->next; - cso_free_node(cur); - cur = next; - } - } - FREE(hash->data.d->buckets); - FREE(hash->data.d); - FREE(hash); -} - -struct cso_hash_iter cso_hash_find(struct cso_hash *hash, - unsigned key) -{ - struct cso_node **nextNode = cso_hash_find_node(hash, key); - struct cso_hash_iter iter = {hash, *nextNode}; - return iter; -} - -unsigned cso_hash_iter_key(struct cso_hash_iter iter) -{ - if (!iter.node || iter.hash->data.e == iter.node) - return 0; - return iter.node->key; -} - -void * cso_hash_iter_data(struct cso_hash_iter iter) -{ - if (!iter.node || iter.hash->data.e == iter.node) - return 0; - return iter.node->value; -} - -static struct cso_node *cso_hash_data_next(struct cso_node *node) -{ - union { - struct cso_node *next; - struct cso_node *e; - struct cso_hash_data *d; - } a; - int start; - struct cso_node **bucket; - int n; - - a.next = node->next; - if (!a.next) { - debug_printf("iterating beyond the last element\n"); - return 0; - } - if (a.next->next) - return a.next; - - start = (node->key % a.d->numBuckets) + 1; - bucket = a.d->buckets + start; - n = a.d->numBuckets - start; - while (n--) { - if (*bucket != a.e) - return *bucket; - ++bucket; - } - return a.e; -} - - -static struct cso_node *cso_hash_data_prev(struct cso_node *node) -{ - union { - struct cso_node *e; - struct cso_hash_data *d; - } a; - int start; - struct cso_node *sentinel; - struct cso_node **bucket; - - a.e = node; - while (a.e->next) - a.e = a.e->next; - - if (node == a.e) - start = a.d->numBuckets - 1; - else - start = node->key % a.d->numBuckets; - - sentinel = node; - bucket = a.d->buckets + start; - while (start >= 0) { - if (*bucket != sentinel) { - struct cso_node *prev = *bucket; - while (prev->next != sentinel) - prev = prev->next; - return prev; - } - - sentinel = a.e; - --bucket; - --start; - } - debug_printf("iterating backward beyond first element\n"); - return a.e; -} - -struct cso_hash_iter cso_hash_iter_next(struct cso_hash_iter iter) -{ - struct cso_hash_iter next = {iter.hash, cso_hash_data_next(iter.node)}; - return next; -} - -int cso_hash_iter_is_null(struct cso_hash_iter iter) -{ - if (!iter.node || iter.node == iter.hash->data.e) - return 1; - return 0; -} - -void * cso_hash_take(struct cso_hash *hash, - unsigned akey) -{ - struct cso_node **node = cso_hash_find_node(hash, akey); - if (*node != hash->data.e) { - void *t = (*node)->value; - struct cso_node *next = (*node)->next; - cso_free_node(*node); - *node = next; - --hash->data.d->size; - cso_data_has_shrunk(hash->data.d); - return t; - } - return 0; -} - -struct cso_hash_iter cso_hash_iter_prev(struct cso_hash_iter iter) -{ - struct cso_hash_iter prev = {iter.hash, - cso_hash_data_prev(iter.node)}; - return prev; -} - -struct cso_hash_iter cso_hash_first_node(struct cso_hash *hash) -{ - struct cso_hash_iter iter = {hash, cso_data_first_node(hash->data.d)}; - return iter; -} - -int cso_hash_size(struct cso_hash *hash) -{ - return hash->data.d->size; -} - -struct cso_hash_iter cso_hash_erase(struct cso_hash *hash, struct cso_hash_iter iter) -{ - struct cso_hash_iter ret = iter; - struct cso_node *node = iter.node; - struct cso_node **node_ptr; - - if (node == hash->data.e) - return iter; - - ret = cso_hash_iter_next(ret); - node_ptr = (struct cso_node**)(&hash->data.d->buckets[node->key % hash->data.d->numBuckets]); - while (*node_ptr != node) - node_ptr = &(*node_ptr)->next; - *node_ptr = node->next; - cso_free_node(node); - --hash->data.d->size; - return ret; -} - -boolean cso_hash_contains(struct cso_hash *hash, unsigned key) -{ - struct cso_node **node = cso_hash_find_node(hash, key); - return (*node != hash->data.e); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/cso_cache/cso_hash.h b/dll/opengl/mesa/src/gallium/auxiliary/cso_cache/cso_hash.h deleted file mode 100644 index 5891c325fa5..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/cso_cache/cso_hash.h +++ /dev/null @@ -1,129 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Hash table implementation. - * - * This file provides a hash implementation that is capable of dealing - * with collisions. It stores colliding entries in linked list. All - * functions operating on the hash return an iterator. The iterator - * itself points to the collision list. If there wasn't any collision - * the list will have just one entry, otherwise client code should - * iterate over the entries to find the exact entry among ones that - * had the same key (e.g. memcmp could be used on the data to check - * that) - * - * @author Zack Rusin - */ - -#ifndef CSO_HASH_H -#define CSO_HASH_H - -#include "pipe/p_compiler.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -struct cso_hash; -struct cso_node; - - -struct cso_hash_iter { - struct cso_hash *hash; - struct cso_node *node; -}; - - -struct cso_hash *cso_hash_create(void); -void cso_hash_delete(struct cso_hash *hash); - - -int cso_hash_size(struct cso_hash *hash); - - -/** - * Adds a data with the given key to the hash. If entry with the given - * key is already in the hash, this current entry is instered before it - * in the collision list. - * Function returns iterator pointing to the inserted item in the hash. - */ -struct cso_hash_iter cso_hash_insert(struct cso_hash *hash, unsigned key, - void *data); -/** - * Removes the item pointed to by the current iterator from the hash. - * Note that the data itself is not erased and if it was a malloc'ed pointer - * it will have to be freed after calling this function by the callee. - * Function returns iterator pointing to the item after the removed one in - * the hash. - */ -struct cso_hash_iter cso_hash_erase(struct cso_hash *hash, struct cso_hash_iter iter); - -void *cso_hash_take(struct cso_hash *hash, unsigned key); - - - -struct cso_hash_iter cso_hash_first_node(struct cso_hash *hash); - -/** - * Return an iterator pointing to the first entry in the collision list. - */ -struct cso_hash_iter cso_hash_find(struct cso_hash *hash, unsigned key); - -/** - * Returns true if a value with the given key exists in the hash - */ -boolean cso_hash_contains(struct cso_hash *hash, unsigned key); - - -int cso_hash_iter_is_null(struct cso_hash_iter iter); -unsigned cso_hash_iter_key(struct cso_hash_iter iter); -void *cso_hash_iter_data(struct cso_hash_iter iter); - - -struct cso_hash_iter cso_hash_iter_next(struct cso_hash_iter iter); -struct cso_hash_iter cso_hash_iter_prev(struct cso_hash_iter iter); - - -/** - * Convenience routine to iterate over the collision list while doing a memory - * comparison to see which entry in the list is a direct copy of our template - * and returns that entry. - */ -void *cso_hash_find_data_from_template( struct cso_hash *hash, - unsigned hash_key, - void *templ, - int size ); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_cliptest_tmp.h b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_cliptest_tmp.h deleted file mode 100644 index bff266b8f98..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_cliptest_tmp.h +++ /dev/null @@ -1,158 +0,0 @@ -/************************************************************************** - * - * Copyright 2010, VMware, inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - - -static boolean TAG(do_cliptest)( struct pt_post_vs *pvs, - struct draw_vertex_info *info ) -{ - struct vertex_header *out = info->verts; - const float *scale = pvs->draw->viewport.scale; - const float *trans = pvs->draw->viewport.translate; - /* const */ float (*plane)[4] = pvs->draw->plane; - const unsigned pos = draw_current_shader_position_output(pvs->draw); - const unsigned cv = draw_current_shader_clipvertex_output(pvs->draw); - unsigned cd[2]; - const unsigned ef = pvs->draw->vs.edgeflag_output; - const unsigned ucp_enable = pvs->draw->rasterizer->clip_plane_enable; - const unsigned flags = (FLAGS); - unsigned need_pipeline = 0; - unsigned j; - unsigned i; - bool have_cd = false; - cd[0] = draw_current_shader_clipdistance_output(pvs->draw, 0); - cd[1] = draw_current_shader_clipdistance_output(pvs->draw, 1); - - if (cd[0] != pos || cd[1] != pos) - have_cd = true; - - for (j = 0; j < info->count; j++) { - float *position = out->data[pos]; - unsigned mask = 0x0; - - initialize_vertex_header(out); - - if (flags & (DO_CLIP_XY | DO_CLIP_XY_GUARD_BAND | - DO_CLIP_FULL_Z | DO_CLIP_HALF_Z | DO_CLIP_USER)) { - float *clipvertex = position; - - if ((flags & DO_CLIP_USER) && cv != pos) - clipvertex = out->data[cv]; - - for (i = 0; i < 4; i++) { - out->clip[i] = clipvertex[i]; - out->pre_clip_pos[i] = position[i]; - } - - /* Do the hardwired planes first: - */ - if (flags & DO_CLIP_XY_GUARD_BAND) { - if (-0.50 * position[0] + position[3] < 0) mask |= (1<<0); - if ( 0.50 * position[0] + position[3] < 0) mask |= (1<<1); - if (-0.50 * position[1] + position[3] < 0) mask |= (1<<2); - if ( 0.50 * position[1] + position[3] < 0) mask |= (1<<3); - } - else if (flags & DO_CLIP_XY) { - if (-position[0] + position[3] < 0) mask |= (1<<0); - if ( position[0] + position[3] < 0) mask |= (1<<1); - if (-position[1] + position[3] < 0) mask |= (1<<2); - if ( position[1] + position[3] < 0) mask |= (1<<3); - } - - /* Clip Z planes according to full cube, half cube or none. - */ - if (flags & DO_CLIP_FULL_Z) { - if ( position[2] + position[3] < 0) mask |= (1<<4); - if (-position[2] + position[3] < 0) mask |= (1<<5); - } - else if (flags & DO_CLIP_HALF_Z) { - if ( position[2] < 0) mask |= (1<<4); - if (-position[2] + position[3] < 0) mask |= (1<<5); - } - - if (flags & DO_CLIP_USER) { - unsigned ucp_mask = ucp_enable; - int num_written_clipdistance = pvs->draw->vs.vertex_shader->info.num_written_clipdistance; - while (ucp_mask) { - unsigned plane_idx = ffs(ucp_mask)-1; - ucp_mask &= ~(1 << plane_idx); - plane_idx += 6; - - /* - * for user clipping check if we have a clip distance output - * and the shader has written to it, otherwise use clipvertex - * to decide when the plane is clipping. - */ - if (have_cd && num_written_clipdistance) { - float clipdist; - i = plane_idx - 6; - out->have_clipdist = 1; - /* first four clip distance in first vector etc. */ - if (i < 4) - clipdist = out->data[cd[0]][i]; - else - clipdist = out->data[cd[1]][i-4]; - if (clipdist < 0) - mask |= 1 << plane_idx; - } else { - if (dot4(clipvertex, plane[plane_idx]) < 0) - mask |= 1 << plane_idx; - } - } - } - - out->clipmask = mask; - need_pipeline |= out->clipmask; - } - - if ((flags & DO_VIEWPORT) && mask == 0) - { - /* divide by w */ - float w = 1.0f / position[3]; - - /* Viewport mapping */ - position[0] = position[0] * w * scale[0] + trans[0]; - position[1] = position[1] * w * scale[1] + trans[1]; - position[2] = position[2] * w * scale[2] + trans[2]; - position[3] = w; - } - - if ((flags & DO_EDGEFLAG) && ef) { - const float *edgeflag = out->data[ef]; - out->edgeflag = !(edgeflag[0] != 1.0f); - need_pipeline |= !out->edgeflag; - } - - out = (struct vertex_header *)( (char *)out + info->stride ); - } - - return need_pipeline != 0; -} - - -#undef FLAGS -#undef TAG diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_context.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_context.c deleted file mode 100644 index 7e554dcbb00..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_context.c +++ /dev/null @@ -1,829 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - /* - * Authors: - * Keith Whitwell - */ - - -#include "pipe/p_context.h" -#include "util/u_memory.h" -#include "util/u_math.h" -#include "util/u_cpu_detect.h" -#include "util/u_inlines.h" -#include "draw_context.h" -#include "draw_vs.h" -#include "draw_gs.h" - -#if HAVE_LLVM -#include "gallivm/lp_bld_init.h" -#include "draw_llvm.h" - -static boolean -draw_get_option_use_llvm(void) -{ - static boolean first = TRUE; - static boolean value; - if (first) { - first = FALSE; - value = debug_get_bool_option("DRAW_USE_LLVM", TRUE); - -#ifdef PIPE_ARCH_X86 - util_cpu_detect(); - /* require SSE2 due to LLVM PR6960. */ - if (!util_cpu_caps.has_sse2) - value = FALSE; -#endif - } - return value; -} -#endif - - -/** - * Create new draw module context with gallivm state for LLVM JIT. - */ -static struct draw_context * -draw_create_context(struct pipe_context *pipe, boolean try_llvm, - struct gallivm_state *gallivm) -{ - struct draw_context *draw = CALLOC_STRUCT( draw_context ); - if (draw == NULL) - goto err_out; - -#if HAVE_LLVM - if (try_llvm && draw_get_option_use_llvm()) { - if (!gallivm) { - gallivm = gallivm_create(); - draw->own_gallivm = gallivm; - } - - if (!gallivm) - goto err_destroy; - - draw->llvm = draw_llvm_create(draw, gallivm); - - if (!draw->llvm) - goto err_destroy; - } -#endif - - if (!draw_init(draw)) - goto err_destroy; - - draw->pipe = pipe; - - return draw; - -err_destroy: - draw_destroy( draw ); -err_out: - return NULL; -} - - -/** - * Create new draw module context, with LLVM JIT. - */ -struct draw_context * -draw_create(struct pipe_context *pipe) -{ - return draw_create_context(pipe, TRUE, NULL); -} - - -/** - * Create a new draw context, without LLVM JIT. - */ -struct draw_context * -draw_create_no_llvm(struct pipe_context *pipe) -{ - return draw_create_context(pipe, FALSE, NULL); -} - - -/** - * Create new draw module context with gallivm state for LLVM JIT. - */ -struct draw_context * -draw_create_gallivm(struct pipe_context *pipe, struct gallivm_state *gallivm) -{ - return draw_create_context(pipe, TRUE, gallivm); -} - - -boolean draw_init(struct draw_context *draw) -{ - /* - * Note that several functions compute the clipmask of the predefined - * formats with hardcoded formulas instead of using these. So modifications - * here must be reflected there too. - */ - - ASSIGN_4V( draw->plane[0], -1, 0, 0, 1 ); - ASSIGN_4V( draw->plane[1], 1, 0, 0, 1 ); - ASSIGN_4V( draw->plane[2], 0, -1, 0, 1 ); - ASSIGN_4V( draw->plane[3], 0, 1, 0, 1 ); - ASSIGN_4V( draw->plane[4], 0, 0, 1, 1 ); /* yes these are correct */ - ASSIGN_4V( draw->plane[5], 0, 0, -1, 1 ); /* mesa's a bit wonky */ - draw->clip_xy = TRUE; - draw->clip_z = TRUE; - - draw->pt.user.planes = (float (*) [DRAW_TOTAL_CLIP_PLANES][4]) &(draw->plane[0]); - draw->reduced_prim = ~0; /* != any of PIPE_PRIM_x */ - - - if (!draw_pipeline_init( draw )) - return FALSE; - - if (!draw_pt_init( draw )) - return FALSE; - - if (!draw_vs_init( draw )) - return FALSE; - - if (!draw_gs_init( draw )) - return FALSE; - - return TRUE; -} - - -void draw_destroy( struct draw_context *draw ) -{ - struct pipe_context *pipe; - int i, j; - - if (!draw) - return; - - pipe = draw->pipe; - - /* free any rasterizer CSOs that we may have created. - */ - for (i = 0; i < 2; i++) { - for (j = 0; j < 2; j++) { - if (draw->rasterizer_no_cull[i][j]) { - pipe->delete_rasterizer_state(pipe, draw->rasterizer_no_cull[i][j]); - } - } - } - - for (i = 0; i < draw->pt.nr_vertex_buffers; i++) { - pipe_resource_reference(&draw->pt.vertex_buffer[i].buffer, NULL); - } - - /* Not so fast -- we're just borrowing this at the moment. - * - if (draw->render) - draw->render->destroy( draw->render ); - */ - - draw_pipeline_destroy( draw ); - draw_pt_destroy( draw ); - draw_vs_destroy( draw ); - draw_gs_destroy( draw ); -#ifdef HAVE_LLVM - if (draw->llvm) - draw_llvm_destroy( draw->llvm ); - - if (draw->own_gallivm) - gallivm_destroy(draw->own_gallivm); -#endif - - FREE( draw ); -} - - - -void draw_flush( struct draw_context *draw ) -{ - draw_do_flush( draw, DRAW_FLUSH_BACKEND ); -} - - -/** - * Specify the Minimum Resolvable Depth factor for polygon offset. - * This factor potentially depends on the number of Z buffer bits, - * the rasterization algorithm and the arithmetic performed on Z - * values between vertex shading and rasterization. It will vary - * from one driver to another. - */ -void draw_set_mrd(struct draw_context *draw, double mrd) -{ - draw->mrd = mrd; -} - - -static void update_clip_flags( struct draw_context *draw ) -{ - draw->clip_xy = !draw->driver.bypass_clip_xy; - draw->guard_band_xy = (!draw->driver.bypass_clip_xy && - draw->driver.guard_band_xy); - draw->clip_z = (!draw->driver.bypass_clip_z && - draw->rasterizer && draw->rasterizer->depth_clip); - draw->clip_user = draw->rasterizer && - draw->rasterizer->clip_plane_enable != 0; -} - -/** - * Register new primitive rasterization/rendering state. - * This causes the drawing pipeline to be rebuilt. - */ -void draw_set_rasterizer_state( struct draw_context *draw, - const struct pipe_rasterizer_state *raster, - void *rast_handle ) -{ - if (!draw->suspend_flushing) { - draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE ); - - draw->rasterizer = raster; - draw->rast_handle = rast_handle; - update_clip_flags(draw); - } -} - -/* With a little more work, llvmpipe will be able to turn this off and - * do its own x/y clipping. - * - * Some hardware can turn off clipping altogether - in particular any - * hardware with a TNL unit can do its own clipping, even if it is - * relying on the draw module for some other reason. - */ -void draw_set_driver_clipping( struct draw_context *draw, - boolean bypass_clip_xy, - boolean bypass_clip_z, - boolean guard_band_xy) -{ - draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE ); - - draw->driver.bypass_clip_xy = bypass_clip_xy; - draw->driver.bypass_clip_z = bypass_clip_z; - draw->driver.guard_band_xy = guard_band_xy; - update_clip_flags(draw); -} - - -/** - * Plug in the primitive rendering/rasterization stage (which is the last - * stage in the drawing pipeline). - * This is provided by the device driver. - */ -void draw_set_rasterize_stage( struct draw_context *draw, - struct draw_stage *stage ) -{ - draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE ); - - draw->pipeline.rasterize = stage; -} - - -/** - * Set the draw module's clipping state. - */ -void draw_set_clip_state( struct draw_context *draw, - const struct pipe_clip_state *clip ) -{ - draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE ); - - memcpy(&draw->plane[6], clip->ucp, sizeof(clip->ucp)); -} - - -/** - * Set the draw module's viewport state. - */ -void draw_set_viewport_state( struct draw_context *draw, - const struct pipe_viewport_state *viewport ) -{ - draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE ); - draw->viewport = *viewport; /* struct copy */ - draw->identity_viewport = (viewport->scale[0] == 1.0f && - viewport->scale[1] == 1.0f && - viewport->scale[2] == 1.0f && - viewport->scale[3] == 1.0f && - viewport->translate[0] == 0.0f && - viewport->translate[1] == 0.0f && - viewport->translate[2] == 0.0f && - viewport->translate[3] == 0.0f); - - draw_vs_set_viewport( draw, viewport ); -} - - - -void -draw_set_vertex_buffers(struct draw_context *draw, - unsigned count, - const struct pipe_vertex_buffer *buffers) -{ - assert(count <= PIPE_MAX_ATTRIBS); - - util_copy_vertex_buffers(draw->pt.vertex_buffer, - &draw->pt.nr_vertex_buffers, - buffers, count); -} - - -void -draw_set_vertex_elements(struct draw_context *draw, - unsigned count, - const struct pipe_vertex_element *elements) -{ - assert(count <= PIPE_MAX_ATTRIBS); - - memcpy(draw->pt.vertex_element, elements, count * sizeof(elements[0])); - draw->pt.nr_vertex_elements = count; -} - - -/** - * Tell drawing context where to find mapped vertex buffers. - */ -void -draw_set_mapped_vertex_buffer(struct draw_context *draw, - unsigned attr, const void *buffer) -{ - draw->pt.user.vbuffer[attr] = buffer; -} - - -void -draw_set_mapped_constant_buffer(struct draw_context *draw, - unsigned shader_type, - unsigned slot, - const void *buffer, - unsigned size ) -{ - debug_assert(shader_type == PIPE_SHADER_VERTEX || - shader_type == PIPE_SHADER_GEOMETRY); - debug_assert(slot < PIPE_MAX_CONSTANT_BUFFERS); - - switch (shader_type) { - case PIPE_SHADER_VERTEX: - draw->pt.user.vs_constants[slot] = buffer; - draw->pt.user.vs_constants_size[slot] = size; - draw_vs_set_constants(draw, slot, buffer, size); - break; - case PIPE_SHADER_GEOMETRY: - draw->pt.user.gs_constants[slot] = buffer; - draw->pt.user.gs_constants_size[slot] = size; - draw_gs_set_constants(draw, slot, buffer, size); - break; - default: - assert(0 && "invalid shader type in draw_set_mapped_constant_buffer"); - } -} - - -/** - * Tells the draw module to draw points with triangles if their size - * is greater than this threshold. - */ -void -draw_wide_point_threshold(struct draw_context *draw, float threshold) -{ - draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE ); - draw->pipeline.wide_point_threshold = threshold; -} - - -/** - * Should the draw module handle point->quad conversion for drawing sprites? - */ -void -draw_wide_point_sprites(struct draw_context *draw, boolean draw_sprite) -{ - draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE ); - draw->pipeline.wide_point_sprites = draw_sprite; -} - - -/** - * Tells the draw module to draw lines with triangles if their width - * is greater than this threshold. - */ -void -draw_wide_line_threshold(struct draw_context *draw, float threshold) -{ - draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE ); - draw->pipeline.wide_line_threshold = roundf(threshold); -} - - -/** - * Tells the draw module whether or not to implement line stipple. - */ -void -draw_enable_line_stipple(struct draw_context *draw, boolean enable) -{ - draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE ); - draw->pipeline.line_stipple = enable; -} - - -/** - * Tells draw module whether to convert points to quads for sprite mode. - */ -void -draw_enable_point_sprites(struct draw_context *draw, boolean enable) -{ - draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE ); - draw->pipeline.point_sprite = enable; -} - - -void -draw_set_force_passthrough( struct draw_context *draw, boolean enable ) -{ - draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE ); - draw->force_passthrough = enable; -} - - - -/** - * Allocate an extra vertex/geometry shader vertex attribute, if it doesn't - * exist already. - * - * This is used by some of the optional draw module stages such - * as wide_point which may need to allocate additional generic/texcoord - * attributes. - */ -int -draw_alloc_extra_vertex_attrib(struct draw_context *draw, - uint semantic_name, uint semantic_index) -{ - int slot; - uint num_outputs; - uint n; - - slot = draw_find_shader_output(draw, semantic_name, semantic_index); - if (slot > 0) { - return slot; - } - - num_outputs = draw_current_shader_outputs(draw); - n = draw->extra_shader_outputs.num; - - assert(n < Elements(draw->extra_shader_outputs.semantic_name)); - - draw->extra_shader_outputs.semantic_name[n] = semantic_name; - draw->extra_shader_outputs.semantic_index[n] = semantic_index; - draw->extra_shader_outputs.slot[n] = num_outputs + n; - draw->extra_shader_outputs.num++; - - return draw->extra_shader_outputs.slot[n]; -} - - -/** - * Remove all extra vertex attributes that were allocated with - * draw_alloc_extra_vertex_attrib(). - */ -void -draw_remove_extra_vertex_attribs(struct draw_context *draw) -{ - draw->extra_shader_outputs.num = 0; -} - - -/** - * If a geometry shader is present, return its info, else the vertex shader's - * info. - */ -struct tgsi_shader_info * -draw_get_shader_info(const struct draw_context *draw) -{ - - if (draw->gs.geometry_shader) { - return &draw->gs.geometry_shader->info; - } else { - return &draw->vs.vertex_shader->info; - } -} - - -/** - * Ask the draw module for the location/slot of the given vertex attribute in - * a post-transformed vertex. - * - * With this function, drivers that use the draw module should have no reason - * to track the current vertex/geometry shader. - * - * Note that the draw module may sometimes generate vertices with extra - * attributes (such as texcoords for AA lines). The driver can call this - * function to find those attributes. - * - * Zero is returned if the attribute is not found since this is - * a don't care / undefined situtation. Returning -1 would be a bit more - * work for the drivers. - */ -int -draw_find_shader_output(const struct draw_context *draw, - uint semantic_name, uint semantic_index) -{ - const struct tgsi_shader_info *info = draw_get_shader_info(draw); - uint i; - - for (i = 0; i < info->num_outputs; i++) { - if (info->output_semantic_name[i] == semantic_name && - info->output_semantic_index[i] == semantic_index) - return i; - } - - /* Search the extra vertex attributes */ - for (i = 0; i < draw->extra_shader_outputs.num; i++) { - if (draw->extra_shader_outputs.semantic_name[i] == semantic_name && - draw->extra_shader_outputs.semantic_index[i] == semantic_index) { - return draw->extra_shader_outputs.slot[i]; - } - } - - return 0; -} - - -/** - * Return total number of the shader outputs. This function is similar to - * draw_current_shader_outputs() but this function also counts any extra - * vertex/geometry output attributes that may be filled in by some draw - * stages (such as AA point, AA line). - * - * If geometry shader is present, its output will be returned, - * if not vertex shader is used. - */ -uint -draw_num_shader_outputs(const struct draw_context *draw) -{ - const struct tgsi_shader_info *info = draw_get_shader_info(draw); - uint count; - - count = info->num_outputs; - count += draw->extra_shader_outputs.num; - - return count; -} - - -/** - * Provide TGSI sampler objects for vertex/geometry shaders that use - * texture fetches. - * This might only be used by software drivers for the time being. - */ -void -draw_texture_samplers(struct draw_context *draw, - uint shader, - uint num_samplers, - struct tgsi_sampler **samplers) -{ - if (shader == PIPE_SHADER_VERTEX) { - draw->vs.num_samplers = num_samplers; - draw->vs.samplers = samplers; - } else { - debug_assert(shader == PIPE_SHADER_GEOMETRY); - draw->gs.num_samplers = num_samplers; - draw->gs.samplers = samplers; - } -} - - - - -void draw_set_render( struct draw_context *draw, - struct vbuf_render *render ) -{ - draw->render = render; -} - - -void -draw_set_index_buffer(struct draw_context *draw, - const struct pipe_index_buffer *ib) -{ - if (ib) - memcpy(&draw->pt.index_buffer, ib, sizeof(draw->pt.index_buffer)); - else - memset(&draw->pt.index_buffer, 0, sizeof(draw->pt.index_buffer)); -} - - -/** - * Tell drawing context where to find mapped index/element buffer. - */ -void -draw_set_mapped_index_buffer(struct draw_context *draw, - const void *elements) -{ - draw->pt.user.elts = elements; -} - - -/* Revamp me please: - */ -void draw_do_flush( struct draw_context *draw, unsigned flags ) -{ - if (!draw->suspend_flushing) - { - assert(!draw->flushing); /* catch inadvertant recursion */ - - draw->flushing = TRUE; - - draw_pipeline_flush( draw, flags ); - - draw->reduced_prim = ~0; /* is reduced_prim needed any more? */ - - draw->flushing = FALSE; - } -} - - -/** - * Return the number of output attributes produced by the geometry - * shader, if present. If no geometry shader, return the number of - * outputs from the vertex shader. - * \sa draw_num_shader_outputs - */ -uint -draw_current_shader_outputs(const struct draw_context *draw) -{ - if (draw->gs.geometry_shader) - return draw->gs.num_gs_outputs; - return draw->vs.num_vs_outputs; -} - - -/** - * Return the index of the shader output which will contain the - * vertex position. - */ -uint -draw_current_shader_position_output(const struct draw_context *draw) -{ - if (draw->gs.geometry_shader) - return draw->gs.position_output; - return draw->vs.position_output; -} - - -/** - * Return the index of the shader output which will contain the - * vertex position. - */ -uint -draw_current_shader_clipvertex_output(const struct draw_context *draw) -{ - return draw->vs.clipvertex_output; -} - -uint -draw_current_shader_clipdistance_output(const struct draw_context *draw, int index) -{ - return draw->vs.clipdistance_output[index]; -} - -/** - * Return a pointer/handle for a driver/CSO rasterizer object which - * disabled culling, stippling, unfilled tris, etc. - * This is used by some pipeline stages (such as wide_point, aa_line - * and aa_point) which convert points/lines into triangles. In those - * cases we don't want to accidentally cull the triangles. - * - * \param scissor should the rasterizer state enable scissoring? - * \param flatshade should the rasterizer state use flat shading? - * \return rasterizer CSO handle - */ -void * -draw_get_rasterizer_no_cull( struct draw_context *draw, - boolean scissor, - boolean flatshade ) -{ - if (!draw->rasterizer_no_cull[scissor][flatshade]) { - /* create now */ - struct pipe_context *pipe = draw->pipe; - struct pipe_rasterizer_state rast; - - memset(&rast, 0, sizeof(rast)); - rast.scissor = scissor; - rast.flatshade = flatshade; - rast.front_ccw = 1; - rast.gl_rasterization_rules = draw->rasterizer->gl_rasterization_rules; - - draw->rasterizer_no_cull[scissor][flatshade] = - pipe->create_rasterizer_state(pipe, &rast); - } - return draw->rasterizer_no_cull[scissor][flatshade]; -} - -void -draw_set_mapped_so_targets(struct draw_context *draw, - int num_targets, - struct draw_so_target *targets[PIPE_MAX_SO_BUFFERS]) -{ - int i; - - for (i = 0; i < num_targets; i++) - draw->so.targets[i] = targets[i]; - for (i = num_targets; i < PIPE_MAX_SO_BUFFERS; i++) - draw->so.targets[i] = NULL; - - draw->so.num_targets = num_targets; -} - -void -draw_set_mapped_so_buffers(struct draw_context *draw, - void *buffers[PIPE_MAX_SO_BUFFERS], - unsigned num_buffers) -{ -} - -void -draw_set_so_state(struct draw_context *draw, - struct pipe_stream_output_info *state) -{ - memcpy(&draw->so.state, - state, - sizeof(struct pipe_stream_output_info)); -} - -void -draw_set_sampler_views(struct draw_context *draw, - struct pipe_sampler_view **views, - unsigned num) -{ - unsigned i; - - debug_assert(num <= PIPE_MAX_VERTEX_SAMPLERS); - - for (i = 0; i < num; ++i) - draw->sampler_views[i] = views[i]; - for (i = num; i < PIPE_MAX_VERTEX_SAMPLERS; ++i) - draw->sampler_views[i] = NULL; - - draw->num_sampler_views = num; -} - -void -draw_set_samplers(struct draw_context *draw, - struct pipe_sampler_state **samplers, - unsigned num) -{ - unsigned i; - - debug_assert(num <= PIPE_MAX_VERTEX_SAMPLERS); - - for (i = 0; i < num; ++i) - draw->samplers[i] = samplers[i]; - for (i = num; i < PIPE_MAX_VERTEX_SAMPLERS; ++i) - draw->samplers[i] = NULL; - - draw->num_samplers = num; - -#ifdef HAVE_LLVM - if (draw->llvm) - draw_llvm_set_sampler_state(draw); -#endif -} - -void -draw_set_mapped_texture(struct draw_context *draw, - unsigned sampler_idx, - uint32_t width, uint32_t height, uint32_t depth, - uint32_t first_level, uint32_t last_level, - uint32_t row_stride[PIPE_MAX_TEXTURE_LEVELS], - uint32_t img_stride[PIPE_MAX_TEXTURE_LEVELS], - const void *data[PIPE_MAX_TEXTURE_LEVELS]) -{ -#ifdef HAVE_LLVM - if(draw->llvm) - draw_llvm_set_mapped_texture(draw, - sampler_idx, - width, height, depth, first_level, last_level, - row_stride, img_stride, data); -#endif -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_context.h b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_context.h deleted file mode 100644 index f3a3f232322..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_context.h +++ /dev/null @@ -1,295 +0,0 @@ - -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \brief Public interface into the drawing module. - */ - -/* Authors: Keith Whitwell - */ - - -#ifndef DRAW_CONTEXT_H -#define DRAW_CONTEXT_H - - -#include "pipe/p_state.h" -#include "tgsi/tgsi_exec.h" - -struct pipe_context; -struct draw_context; -struct draw_stage; -struct draw_vertex_shader; -struct draw_geometry_shader; -struct draw_fragment_shader; -struct tgsi_sampler; -struct gallivm_state; - -/* - * structure to contain driver internal information - * for stream out support. mapping stores the pointer - * to the buffer contents, and internal offset stores - * stores an internal counter to how much of the stream - * out buffer is used (in bytes). - */ -struct draw_so_target { - struct pipe_stream_output_target target; - void *mapping; - int internal_offset; -}; - -struct draw_context *draw_create( struct pipe_context *pipe ); - -struct draw_context *draw_create_no_llvm(struct pipe_context *pipe); - -struct draw_context * -draw_create_gallivm(struct pipe_context *pipe, struct gallivm_state *gallivm); - -void draw_destroy( struct draw_context *draw ); - -void draw_flush(struct draw_context *draw); - -void draw_set_viewport_state( struct draw_context *draw, - const struct pipe_viewport_state *viewport ); - -void draw_set_clip_state( struct draw_context *pipe, - const struct pipe_clip_state *clip ); - -/** - * Sets the rasterization state used by the draw module. - * The rast_handle is used to pass the driver specific representation - * of the rasterization state. It's going to be used when the - * draw module sets the state back on the driver itself using the - * pipe::bind_rasterizer_state method. - * - * NOTE: if you're calling this function from within the pipe's - * bind_rasterizer_state you should always call it before binding - * the actual state - that's because the draw module can try to - * bind its own rasterizer state which would reset your newly - * set state. i.e. always do - * draw_set_rasterizer_state(driver->draw, state->pipe_state, state); - * driver->state.raster = state; - */ -void draw_set_rasterizer_state( struct draw_context *draw, - const struct pipe_rasterizer_state *raster, - void *rast_handle ); - -void draw_set_rasterize_stage( struct draw_context *draw, - struct draw_stage *stage ); - -void draw_wide_point_threshold(struct draw_context *draw, float threshold); - -void draw_wide_point_sprites(struct draw_context *draw, boolean draw_sprite); - -void draw_wide_line_threshold(struct draw_context *draw, float threshold); - -void draw_enable_line_stipple(struct draw_context *draw, boolean enable); - -void draw_enable_point_sprites(struct draw_context *draw, boolean enable); - -void draw_set_mrd(struct draw_context *draw, double mrd); - -boolean -draw_install_aaline_stage(struct draw_context *draw, struct pipe_context *pipe); - -boolean -draw_install_aapoint_stage(struct draw_context *draw, struct pipe_context *pipe); - -boolean -draw_install_pstipple_stage(struct draw_context *draw, struct pipe_context *pipe); - - -struct tgsi_shader_info * -draw_get_shader_info(const struct draw_context *draw); - -int -draw_find_shader_output(const struct draw_context *draw, - uint semantic_name, uint semantic_index); - -uint -draw_num_shader_outputs(const struct draw_context *draw); - - -void -draw_texture_samplers(struct draw_context *draw, - uint shader_type, - uint num_samplers, - struct tgsi_sampler **samplers); - -void -draw_set_sampler_views(struct draw_context *draw, - struct pipe_sampler_view **views, - unsigned num); -void -draw_set_samplers(struct draw_context *draw, - struct pipe_sampler_state **samplers, - unsigned num); - -void -draw_set_mapped_texture(struct draw_context *draw, - unsigned sampler_idx, - uint32_t width, uint32_t height, uint32_t depth, - uint32_t first_level, uint32_t last_level, - uint32_t row_stride[PIPE_MAX_TEXTURE_LEVELS], - uint32_t img_stride[PIPE_MAX_TEXTURE_LEVELS], - const void *data[PIPE_MAX_TEXTURE_LEVELS]); - - -/* - * Vertex shader functions - */ - -struct draw_vertex_shader * -draw_create_vertex_shader(struct draw_context *draw, - const struct pipe_shader_state *shader); -void draw_bind_vertex_shader(struct draw_context *draw, - struct draw_vertex_shader *dvs); -void draw_delete_vertex_shader(struct draw_context *draw, - struct draw_vertex_shader *dvs); - - -/* - * Fragment shader functions - */ -struct draw_fragment_shader * -draw_create_fragment_shader(struct draw_context *draw, - const struct pipe_shader_state *shader); -void draw_bind_fragment_shader(struct draw_context *draw, - struct draw_fragment_shader *dvs); -void draw_delete_fragment_shader(struct draw_context *draw, - struct draw_fragment_shader *dvs); - -/* - * Geometry shader functions - */ -struct draw_geometry_shader * -draw_create_geometry_shader(struct draw_context *draw, - const struct pipe_shader_state *shader); -void draw_bind_geometry_shader(struct draw_context *draw, - struct draw_geometry_shader *dvs); -void draw_delete_geometry_shader(struct draw_context *draw, - struct draw_geometry_shader *dvs); - - -/* - * Vertex data functions - */ - -void draw_set_vertex_buffers(struct draw_context *draw, - unsigned count, - const struct pipe_vertex_buffer *buffers); - -void draw_set_vertex_elements(struct draw_context *draw, - unsigned count, - const struct pipe_vertex_element *elements); - -void draw_set_index_buffer(struct draw_context *draw, - const struct pipe_index_buffer *ib); - -void draw_set_mapped_index_buffer(struct draw_context *draw, - const void *elements); - -void draw_set_mapped_vertex_buffer(struct draw_context *draw, - unsigned attr, const void *buffer); - -void -draw_set_mapped_constant_buffer(struct draw_context *draw, - unsigned shader_type, - unsigned slot, - const void *buffer, - unsigned size); - -void -draw_set_mapped_so_buffers(struct draw_context *draw, - void *buffers[PIPE_MAX_SO_BUFFERS], - unsigned num_buffers); - -void -draw_set_mapped_so_targets(struct draw_context *draw, - int num_targets, - struct draw_so_target *targets[PIPE_MAX_SO_BUFFERS]); - -void -draw_set_so_state(struct draw_context *draw, - struct pipe_stream_output_info *state); - - -/*********************************************************************** - * draw_pt.c - */ - -void draw_vbo(struct draw_context *draw, - const struct pipe_draw_info *info); - -void draw_arrays(struct draw_context *draw, unsigned prim, - unsigned start, unsigned count); - -void -draw_arrays_instanced(struct draw_context *draw, - unsigned mode, - unsigned start, - unsigned count, - unsigned startInstance, - unsigned instanceCount); - - -/******************************************************************************* - * Driver backend interface - */ -struct vbuf_render; -void draw_set_render( struct draw_context *draw, - struct vbuf_render *render ); - -void draw_set_driver_clipping( struct draw_context *draw, - boolean bypass_clip_xy, - boolean bypass_clip_z, - boolean guard_band_xy); - -void draw_set_force_passthrough( struct draw_context *draw, - boolean enable ); - -/******************************************************************************* - * Draw pipeline - */ -boolean draw_need_pipeline(const struct draw_context *draw, - const struct pipe_rasterizer_state *rasterizer, - unsigned prim ); - -static INLINE int -draw_get_shader_param(unsigned shader, enum pipe_shader_cap param) -{ - switch(shader) { - case PIPE_SHADER_VERTEX: - case PIPE_SHADER_GEOMETRY: - return tgsi_exec_get_shader_param(param); - default: - return 0; - } -} - -#endif /* DRAW_CONTEXT_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_decompose_tmp.h b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_decompose_tmp.h deleted file mode 100644 index a142563af97..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_decompose_tmp.h +++ /dev/null @@ -1,431 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Keith Whitwell - * Chia-I Wu - */ - -/* these macros are optional */ -#ifndef LOCAL_VARS -#define LOCAL_VARS -#endif -#ifndef FUNC_ENTER -#define FUNC_ENTER do {} while (0) -#endif -#ifndef FUNC_EXIT -#define FUNC_EXIT do {} while (0) -#endif -#ifndef LINE_ADJ -#define LINE_ADJ(flags, a0, i0, i1, a1) LINE(flags, i0, i1) -#endif -#ifndef TRIANGLE_ADJ -#define TRIANGLE_ADJ(flags, i0, a0, i1, a1, i2, a2) TRIANGLE(flags, i0, i1, i2) -#endif - -static void -FUNC(FUNC_VARS) -{ - unsigned idx[6], i; - ushort flags; - LOCAL_VARS - - FUNC_ENTER; - - /* prim, prim_flags, count, and last_vertex_last should have been defined */ - if (0) { - debug_printf("%s: prim 0x%x, prim_flags 0x%x, count %d, last_vertex_last %d\n", - __FUNCTION__, prim, prim_flags, count, last_vertex_last); - } - - switch (prim) { - case PIPE_PRIM_POINTS: - for (i = 0; i < count; i++) { - idx[0] = GET_ELT(i); - POINT(idx[0]); - } - break; - - case PIPE_PRIM_LINES: - flags = DRAW_PIPE_RESET_STIPPLE; - for (i = 0; i + 1 < count; i += 2) { - idx[0] = GET_ELT(i); - idx[1] = GET_ELT(i + 1); - LINE(flags, idx[0], idx[1]); - } - break; - - case PIPE_PRIM_LINE_LOOP: - case PIPE_PRIM_LINE_STRIP: - if (count >= 2) { - flags = (prim_flags & DRAW_SPLIT_BEFORE) ? 0 : DRAW_PIPE_RESET_STIPPLE; - idx[1] = GET_ELT(0); - idx[2] = idx[1]; - - for (i = 1; i < count; i++, flags = 0) { - idx[0] = idx[1]; - idx[1] = GET_ELT(i); - LINE(flags, idx[0], idx[1]); - } - /* close the loop */ - if (prim == PIPE_PRIM_LINE_LOOP && !prim_flags) - LINE(flags, idx[1], idx[2]); - } - break; - - case PIPE_PRIM_TRIANGLES: - flags = DRAW_PIPE_RESET_STIPPLE | DRAW_PIPE_EDGE_FLAG_ALL; - for (i = 0; i + 2 < count; i += 3) { - idx[0] = GET_ELT(i); - idx[1] = GET_ELT(i + 1); - idx[2] = GET_ELT(i + 2); - TRIANGLE(flags, idx[0], idx[1], idx[2]); - } - break; - - case PIPE_PRIM_TRIANGLE_STRIP: - if (count >= 3) { - flags = DRAW_PIPE_RESET_STIPPLE | DRAW_PIPE_EDGE_FLAG_ALL; - idx[1] = GET_ELT(0); - idx[2] = GET_ELT(1); - - if (last_vertex_last) { - for (i = 0; i + 2 < count; i++) { - idx[0] = idx[1]; - idx[1] = idx[2]; - idx[2] = GET_ELT(i + 2); - /* always emit idx[2] last */ - if (i & 1) - TRIANGLE(flags, idx[1], idx[0], idx[2]); - else - TRIANGLE(flags, idx[0], idx[1], idx[2]); - } - } - else { - for (i = 0; i + 2 < count; i++) { - idx[0] = idx[1]; - idx[1] = idx[2]; - idx[2] = GET_ELT(i + 2); - /* always emit idx[0] first */ - if (i & 1) - TRIANGLE(flags, idx[0], idx[2], idx[1]); - else - TRIANGLE(flags, idx[0], idx[1], idx[2]); - } - } - } - break; - - case PIPE_PRIM_TRIANGLE_FAN: - if (count >= 3) { - flags = DRAW_PIPE_RESET_STIPPLE | DRAW_PIPE_EDGE_FLAG_ALL; - idx[0] = GET_ELT(0); - idx[2] = GET_ELT(1); - - /* idx[0] is neither the first nor the last vertex */ - if (last_vertex_last) { - for (i = 0; i + 2 < count; i++) { - idx[1] = idx[2]; - idx[2] = GET_ELT(i + 2); - /* always emit idx[2] last */ - TRIANGLE(flags, idx[0], idx[1], idx[2]); - } - } - else { - for (i = 0; i + 2 < count; i++) { - idx[1] = idx[2]; - idx[2] = GET_ELT(i + 2); - /* always emit idx[1] first */ - TRIANGLE(flags, idx[1], idx[2], idx[0]); - } - } - } - break; - - case PIPE_PRIM_QUADS: - if (last_vertex_last) { - for (i = 0; i + 3 < count; i += 4) { - idx[0] = GET_ELT(i); - idx[1] = GET_ELT(i + 1); - idx[2] = GET_ELT(i + 2); - idx[3] = GET_ELT(i + 3); - - flags = DRAW_PIPE_RESET_STIPPLE | - DRAW_PIPE_EDGE_FLAG_0 | - DRAW_PIPE_EDGE_FLAG_2; - /* always emit idx[3] last */ - TRIANGLE(flags, idx[0], idx[1], idx[3]); - - flags = DRAW_PIPE_EDGE_FLAG_0 | - DRAW_PIPE_EDGE_FLAG_1; - TRIANGLE(flags, idx[1], idx[2], idx[3]); - } - } - else { - for (i = 0; i + 3 < count; i += 4) { - idx[0] = GET_ELT(i); - idx[1] = GET_ELT(i + 1); - idx[2] = GET_ELT(i + 2); - idx[3] = GET_ELT(i + 3); - - flags = DRAW_PIPE_RESET_STIPPLE | - DRAW_PIPE_EDGE_FLAG_0 | - DRAW_PIPE_EDGE_FLAG_1; - /* XXX should always emit idx[0] first */ - /* always emit idx[3] first */ - TRIANGLE(flags, idx[3], idx[0], idx[1]); - - flags = DRAW_PIPE_EDGE_FLAG_1 | - DRAW_PIPE_EDGE_FLAG_2; - TRIANGLE(flags, idx[3], idx[1], idx[2]); - } - } - break; - - case PIPE_PRIM_QUAD_STRIP: - if (count >= 4) { - idx[2] = GET_ELT(0); - idx[3] = GET_ELT(1); - - if (last_vertex_last) { - for (i = 0; i + 3 < count; i += 2) { - idx[0] = idx[2]; - idx[1] = idx[3]; - idx[2] = GET_ELT(i + 2); - idx[3] = GET_ELT(i + 3); - - /* always emit idx[3] last */ - flags = DRAW_PIPE_RESET_STIPPLE | - DRAW_PIPE_EDGE_FLAG_0 | - DRAW_PIPE_EDGE_FLAG_2; - TRIANGLE(flags, idx[2], idx[0], idx[3]); - - flags = DRAW_PIPE_EDGE_FLAG_0 | - DRAW_PIPE_EDGE_FLAG_1; - TRIANGLE(flags, idx[0], idx[1], idx[3]); - } - } - else { - for (i = 0; i + 3 < count; i += 2) { - idx[0] = idx[2]; - idx[1] = idx[3]; - idx[2] = GET_ELT(i + 2); - idx[3] = GET_ELT(i + 3); - - flags = DRAW_PIPE_RESET_STIPPLE | - DRAW_PIPE_EDGE_FLAG_0 | - DRAW_PIPE_EDGE_FLAG_1; - /* XXX should always emit idx[0] first */ - /* always emit idx[3] first */ - TRIANGLE(flags, idx[3], idx[2], idx[0]); - - flags = DRAW_PIPE_EDGE_FLAG_1 | - DRAW_PIPE_EDGE_FLAG_2; - TRIANGLE(flags, idx[3], idx[0], idx[1]); - } - } - } - break; - - case PIPE_PRIM_POLYGON: - if (count >= 3) { - ushort edge_next, edge_finish; - - if (last_vertex_last) { - flags = (DRAW_PIPE_RESET_STIPPLE | - DRAW_PIPE_EDGE_FLAG_0); - if (!(prim_flags & DRAW_SPLIT_BEFORE)) - flags |= DRAW_PIPE_EDGE_FLAG_2; - - edge_next = DRAW_PIPE_EDGE_FLAG_0; - edge_finish = - (prim_flags & DRAW_SPLIT_AFTER) ? 0 : DRAW_PIPE_EDGE_FLAG_1; - } - else { - flags = (DRAW_PIPE_RESET_STIPPLE | - DRAW_PIPE_EDGE_FLAG_1); - if (!(prim_flags & DRAW_SPLIT_BEFORE)) - flags |= DRAW_PIPE_EDGE_FLAG_0; - - edge_next = DRAW_PIPE_EDGE_FLAG_1; - edge_finish = - (prim_flags & DRAW_SPLIT_AFTER) ? 0 : DRAW_PIPE_EDGE_FLAG_2; - } - - idx[0] = GET_ELT(0); - idx[2] = GET_ELT(1); - - for (i = 0; i + 2 < count; i++, flags = edge_next) { - idx[1] = idx[2]; - idx[2] = GET_ELT(i + 2); - - if (i + 3 == count) - flags |= edge_finish; - - /* idx[0] is both the first and the last vertex */ - if (last_vertex_last) - TRIANGLE(flags, idx[1], idx[2], idx[0]); - else - TRIANGLE(flags, idx[0], idx[1], idx[2]); - } - } - break; - - case PIPE_PRIM_LINES_ADJACENCY: - flags = DRAW_PIPE_RESET_STIPPLE; - for (i = 0; i + 3 < count; i += 4) { - idx[0] = GET_ELT(i); - idx[1] = GET_ELT(i + 1); - idx[2] = GET_ELT(i + 2); - idx[3] = GET_ELT(i + 3); - LINE_ADJ(flags, idx[0], idx[1], idx[2], idx[3]); - } - break; - - case PIPE_PRIM_LINE_STRIP_ADJACENCY: - if (count >= 4) { - flags = (prim_flags & DRAW_SPLIT_BEFORE) ? 0 : DRAW_PIPE_RESET_STIPPLE; - idx[1] = GET_ELT(0); - idx[2] = GET_ELT(1); - idx[3] = GET_ELT(2); - - for (i = 1; i + 2 < count; i++, flags = 0) { - idx[0] = idx[1]; - idx[1] = idx[2]; - idx[2] = idx[3]; - idx[3] = GET_ELT(i + 2); - LINE_ADJ(flags, idx[0], idx[1], idx[2], idx[3]); - } - } - break; - - case PIPE_PRIM_TRIANGLES_ADJACENCY: - flags = DRAW_PIPE_RESET_STIPPLE | DRAW_PIPE_EDGE_FLAG_ALL; - for (i = 0; i + 5 < count; i += 6) { - idx[0] = GET_ELT(i); - idx[1] = GET_ELT(i + 1); - idx[2] = GET_ELT(i + 2); - idx[3] = GET_ELT(i + 3); - idx[4] = GET_ELT(i + 4); - idx[5] = GET_ELT(i + 5); - TRIANGLE_ADJ(flags, idx[0], idx[1], idx[2], idx[3], idx[4], idx[5]); - } - break; - - case PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY: - if (count >= 6) { - flags = DRAW_PIPE_RESET_STIPPLE | DRAW_PIPE_EDGE_FLAG_ALL; - idx[0] = GET_ELT(1); - idx[2] = GET_ELT(0); - idx[4] = GET_ELT(2); - idx[3] = GET_ELT(4); - - /* - * The vertices of the i-th triangle are stored in - * idx[0,2,4] = { 2*i, 2*i+2, 2*i+4 }; - * - * The adjacent vertices are stored in - * idx[1,3,5] = { 2*i-2, 2*i+6, 2*i+3 }. - * - * However, there are two exceptions: - * - * For the first triangle, idx[1] = 1; - * For the last triangle, idx[3] = 2*i+5. - */ - if (last_vertex_last) { - for (i = 0; i + 5 < count; i += 2) { - idx[1] = idx[0]; - - idx[0] = idx[2]; - idx[2] = idx[4]; - idx[4] = idx[3]; - - idx[3] = GET_ELT(i + ((i + 7 < count) ? 6 : 5)); - idx[5] = GET_ELT(i + 3); - - /* - * alternate the first two vertices (idx[0] and idx[2]) and the - * corresponding adjacent vertices (idx[3] and idx[5]) to have - * the correct orientation - */ - if (i & 2) { - TRIANGLE_ADJ(flags, - idx[2], idx[1], idx[0], idx[5], idx[4], idx[3]); - } - else { - TRIANGLE_ADJ(flags, - idx[0], idx[1], idx[2], idx[3], idx[4], idx[5]); - } - } - } - else { - for (i = 0; i + 5 < count; i += 2) { - idx[1] = idx[0]; - - idx[0] = idx[2]; - idx[2] = idx[4]; - idx[4] = idx[3]; - - idx[3] = GET_ELT(i + ((i + 7 < count) ? 6 : 5)); - idx[5] = GET_ELT(i + 3); - - /* - * alternate the last two vertices (idx[2] and idx[4]) and the - * corresponding adjacent vertices (idx[1] and idx[5]) to have - * the correct orientation - */ - if (i & 2) { - TRIANGLE_ADJ(flags, - idx[0], idx[5], idx[4], idx[3], idx[2], idx[1]); - } - else { - TRIANGLE_ADJ(flags, - idx[0], idx[1], idx[2], idx[3], idx[4], idx[5]); - } - } - } - } - break; - - default: - assert(0); - break; - } - - FUNC_EXIT; -} - -#undef LOCAL_VARS -#undef FUNC_ENTER -#undef FUNC_EXIT -#undef LINE_ADJ -#undef TRIANGLE_ADJ - -#undef FUNC -#undef FUNC_VARS -#undef GET_ELT -#undef POINT -#undef LINE -#undef TRIANGLE diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_fs.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_fs.c deleted file mode 100644 index 1543bd86f17..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_fs.c +++ /dev/null @@ -1,73 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "pipe/p_shader_tokens.h" - -#include "util/u_math.h" -#include "util/u_memory.h" -#include "util/u_prim.h" - -#include "tgsi/tgsi_parse.h" - -#include "draw_fs.h" -#include "draw_private.h" -#include "draw_context.h" - - -struct draw_fragment_shader * -draw_create_fragment_shader(struct draw_context *draw, - const struct pipe_shader_state *shader) -{ - struct draw_fragment_shader *dfs; - - dfs = CALLOC_STRUCT(draw_fragment_shader); - if (dfs) { - dfs->base = *shader; - tgsi_scan_shader(shader->tokens, &dfs->info); - } - - return dfs; -} - - -void -draw_bind_fragment_shader(struct draw_context *draw, - struct draw_fragment_shader *dfs) -{ - draw_do_flush(draw, DRAW_FLUSH_STATE_CHANGE); - - draw->fs.fragment_shader = dfs; -} - - -void -draw_delete_fragment_shader(struct draw_context *draw, - struct draw_fragment_shader *dfs) -{ - FREE(dfs); -} - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_fs.h b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_fs.h deleted file mode 100644 index 44995b8277f..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_fs.h +++ /dev/null @@ -1,42 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef DRAW_FS_H -#define DRAW_FS_H - - -#include "tgsi/tgsi_scan.h" - - -struct draw_fragment_shader -{ - struct pipe_shader_state base; - struct tgsi_shader_info info; -}; - - -#endif /* DRAW_FS_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_gs.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_gs.c deleted file mode 100644 index 50a03ac95a5..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_gs.c +++ /dev/null @@ -1,489 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "draw_gs.h" - -#include "draw_private.h" -#include "draw_context.h" - -#include "tgsi/tgsi_parse.h" -#include "tgsi/tgsi_exec.h" - -#include "pipe/p_shader_tokens.h" - -#include "util/u_math.h" -#include "util/u_memory.h" -#include "util/u_prim.h" - -/* fixme: move it from here */ -#define MAX_PRIMITIVES 64 - -boolean -draw_gs_init( struct draw_context *draw ) -{ - draw->gs.machine = tgsi_exec_machine_create(); - if (!draw->gs.machine) - return FALSE; - - draw->gs.machine->Primitives = align_malloc( - MAX_PRIMITIVES * sizeof(struct tgsi_exec_vector), 16); - if (!draw->gs.machine->Primitives) - return FALSE; - memset(draw->gs.machine->Primitives, 0, - MAX_PRIMITIVES * sizeof(struct tgsi_exec_vector)); - - return TRUE; -} - -void draw_gs_destroy( struct draw_context *draw ) -{ - if (!draw->gs.machine) - return; - - align_free(draw->gs.machine->Primitives); - - tgsi_exec_machine_destroy(draw->gs.machine); -} - -void -draw_gs_set_constants(struct draw_context *draw, - unsigned slot, - const void *constants, - unsigned size) -{ - /* noop. added here for symmetry with the VS - * code and in case we'll ever want to allign - * the constants, e.g. when we'll change to a - * different interpreter */ -} - - -struct draw_geometry_shader * -draw_create_geometry_shader(struct draw_context *draw, - const struct pipe_shader_state *state) -{ - struct draw_geometry_shader *gs; - int i; - - gs = CALLOC_STRUCT(draw_geometry_shader); - - if (!gs) - return NULL; - - gs->draw = draw; - gs->state = *state; - gs->state.tokens = tgsi_dup_tokens(state->tokens); - if (!gs->state.tokens) { - FREE(gs); - return NULL; - } - - tgsi_scan_shader(state->tokens, &gs->info); - - /* setup the defaults */ - gs->input_primitive = PIPE_PRIM_TRIANGLES; - gs->output_primitive = PIPE_PRIM_TRIANGLE_STRIP; - gs->max_output_vertices = 32; - - for (i = 0; i < gs->info.num_properties; ++i) { - if (gs->info.properties[i].name == - TGSI_PROPERTY_GS_INPUT_PRIM) - gs->input_primitive = gs->info.properties[i].data[0]; - else if (gs->info.properties[i].name == - TGSI_PROPERTY_GS_OUTPUT_PRIM) - gs->output_primitive = gs->info.properties[i].data[0]; - else if (gs->info.properties[i].name == - TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES) - gs->max_output_vertices = gs->info.properties[i].data[0]; - } - - gs->machine = draw->gs.machine; - - if (gs) - { - uint i; - for (i = 0; i < gs->info.num_outputs; i++) { - if (gs->info.output_semantic_name[i] == TGSI_SEMANTIC_POSITION && - gs->info.output_semantic_index[i] == 0) - gs->position_output = i; - } - } - - return gs; -} - -void draw_bind_geometry_shader(struct draw_context *draw, - struct draw_geometry_shader *dgs) -{ - draw_do_flush(draw, DRAW_FLUSH_STATE_CHANGE); - - if (dgs) { - draw->gs.geometry_shader = dgs; - draw->gs.num_gs_outputs = dgs->info.num_outputs; - draw->gs.position_output = dgs->position_output; - draw_geometry_shader_prepare(dgs, draw); - } - else { - draw->gs.geometry_shader = NULL; - draw->gs.num_gs_outputs = 0; - } -} - -void draw_delete_geometry_shader(struct draw_context *draw, - struct draw_geometry_shader *dgs) -{ - FREE(dgs); -} - -/*#define DEBUG_OUTPUTS 1*/ -static INLINE void -draw_geometry_fetch_outputs(struct draw_geometry_shader *shader, - int num_primitives, - float (**p_output)[4]) -{ - struct tgsi_exec_machine *machine = shader->machine; - unsigned prim_idx, j, slot; - float (*output)[4]; - - output = *p_output; - - /* Unswizzle all output results. - */ - - for (prim_idx = 0; prim_idx < num_primitives; ++prim_idx) { - unsigned num_verts_per_prim = machine->Primitives[prim_idx]; - shader->primitive_lengths[prim_idx + shader->emitted_primitives] = - machine->Primitives[prim_idx]; - shader->emitted_vertices += num_verts_per_prim; - for (j = 0; j < num_verts_per_prim; j++) { - int idx = (prim_idx * num_verts_per_prim + j) * - shader->info.num_outputs; -#ifdef DEBUG_OUTPUTS - debug_printf("%d) Output vert:\n", idx / shader->info.num_outputs); -#endif - for (slot = 0; slot < shader->info.num_outputs; slot++) { - output[slot][0] = machine->Outputs[idx + slot].xyzw[0].f[0]; - output[slot][1] = machine->Outputs[idx + slot].xyzw[1].f[0]; - output[slot][2] = machine->Outputs[idx + slot].xyzw[2].f[0]; - output[slot][3] = machine->Outputs[idx + slot].xyzw[3].f[0]; -#ifdef DEBUG_OUTPUTS - debug_printf("\t%d: %f %f %f %f\n", slot, - output[slot][0], - output[slot][1], - output[slot][2], - output[slot][3]); -#endif - debug_assert(!util_is_inf_or_nan(output[slot][0])); - } - output = (float (*)[4])((char *)output + shader->vertex_size); - } - } - *p_output = output; - shader->emitted_primitives += num_primitives; -} - -/*#define DEBUG_INPUTS 1*/ -static void draw_fetch_gs_input(struct draw_geometry_shader *shader, - unsigned *indices, - unsigned num_vertices, - unsigned prim_idx) -{ - struct tgsi_exec_machine *machine = shader->machine; - unsigned slot, vs_slot, i; - unsigned input_vertex_stride = shader->input_vertex_stride; - const float (*input_ptr)[4]; - - input_ptr = shader->input; - - for (i = 0; i < num_vertices; ++i) { - const float (*input)[4]; -#if DEBUG_INPUTS - debug_printf("%d) vertex index = %d (prim idx = %d)\n", - i, indices[i], prim_idx); -#endif - input = (const float (*)[4])( - (const char *)input_ptr + (indices[i] * input_vertex_stride)); - for (slot = 0, vs_slot = 0; slot < shader->info.num_inputs; ++slot) { - unsigned idx = i * TGSI_EXEC_MAX_INPUT_ATTRIBS + slot; - if (shader->info.input_semantic_name[slot] == TGSI_SEMANTIC_PRIMID) { - machine->Inputs[idx].xyzw[0].f[prim_idx] = - (float)shader->in_prim_idx; - machine->Inputs[idx].xyzw[1].f[prim_idx] = - (float)shader->in_prim_idx; - machine->Inputs[idx].xyzw[2].f[prim_idx] = - (float)shader->in_prim_idx; - machine->Inputs[idx].xyzw[3].f[prim_idx] = - (float)shader->in_prim_idx; - } else { -#if DEBUG_INPUTS - debug_printf("\tSlot = %d, vs_slot = %d, idx = %d:\n", - slot, vs_slot, idx); -#endif -#if 1 - assert(!util_is_inf_or_nan(input[vs_slot][0])); - assert(!util_is_inf_or_nan(input[vs_slot][1])); - assert(!util_is_inf_or_nan(input[vs_slot][2])); - assert(!util_is_inf_or_nan(input[vs_slot][3])); -#endif - machine->Inputs[idx].xyzw[0].f[prim_idx] = input[vs_slot][0]; - machine->Inputs[idx].xyzw[1].f[prim_idx] = input[vs_slot][1]; - machine->Inputs[idx].xyzw[2].f[prim_idx] = input[vs_slot][2]; - machine->Inputs[idx].xyzw[3].f[prim_idx] = input[vs_slot][3]; -#if DEBUG_INPUTS - debug_printf("\t\t%f %f %f %f\n", - machine->Inputs[idx].xyzw[0].f[prim_idx], - machine->Inputs[idx].xyzw[1].f[prim_idx], - machine->Inputs[idx].xyzw[2].f[prim_idx], - machine->Inputs[idx].xyzw[3].f[prim_idx]); -#endif - ++vs_slot; - } - } - } -} - -static void gs_flush(struct draw_geometry_shader *shader, - unsigned input_primitives) -{ - unsigned out_prim_count; - struct tgsi_exec_machine *machine = shader->machine; - - debug_assert(input_primitives > 0 && - input_primitives < 4); - - tgsi_set_exec_mask(machine, - 1, - input_primitives > 1, - input_primitives > 2, - input_primitives > 3); - - /* run interpreter */ - tgsi_exec_machine_run(machine); - - out_prim_count = - machine->Temps[TGSI_EXEC_TEMP_PRIMITIVE_I].xyzw[TGSI_EXEC_TEMP_PRIMITIVE_C].u[0]; - -#if 0 - debug_printf("PRIM emitted prims = %d (verts=%d), cur prim count = %d\n", - shader->emitted_primitives, shader->emitted_vertices, - out_prim_count); -#endif - draw_geometry_fetch_outputs(shader, out_prim_count, - &shader->tmp_output); -} - -static void gs_point(struct draw_geometry_shader *shader, - int idx) -{ - unsigned indices[1]; - - indices[0] = idx; - - draw_fetch_gs_input(shader, indices, 1, 0); - ++shader->in_prim_idx; - - gs_flush(shader, 1); -} - -static void gs_line(struct draw_geometry_shader *shader, - int i0, int i1) -{ - unsigned indices[2]; - - indices[0] = i0; - indices[1] = i1; - - draw_fetch_gs_input(shader, indices, 2, 0); - ++shader->in_prim_idx; - - gs_flush(shader, 1); -} - -static void gs_line_adj(struct draw_geometry_shader *shader, - int i0, int i1, int i2, int i3) -{ - unsigned indices[4]; - - indices[0] = i0; - indices[1] = i1; - indices[2] = i2; - indices[3] = i3; - - draw_fetch_gs_input(shader, indices, 4, 0); - ++shader->in_prim_idx; - - gs_flush(shader, 1); -} - -static void gs_tri(struct draw_geometry_shader *shader, - int i0, int i1, int i2) -{ - unsigned indices[3]; - - indices[0] = i0; - indices[1] = i1; - indices[2] = i2; - - draw_fetch_gs_input(shader, indices, 3, 0); - ++shader->in_prim_idx; - - gs_flush(shader, 1); -} - -static void gs_tri_adj(struct draw_geometry_shader *shader, - int i0, int i1, int i2, - int i3, int i4, int i5) -{ - unsigned indices[6]; - - indices[0] = i0; - indices[1] = i1; - indices[2] = i2; - indices[3] = i3; - indices[4] = i4; - indices[5] = i5; - - draw_fetch_gs_input(shader, indices, 6, 0); - ++shader->in_prim_idx; - - gs_flush(shader, 1); -} - -#define FUNC gs_run -#define GET_ELT(idx) (idx) -#include "draw_gs_tmp.h" - - -#define FUNC gs_run_elts -#define LOCAL_VARS const ushort *elts = input_prims->elts; -#define GET_ELT(idx) (elts[idx]) -#include "draw_gs_tmp.h" - - -/** - * Execute geometry shader using TGSI interpreter. - */ -int draw_geometry_shader_run(struct draw_geometry_shader *shader, - const void *constants[PIPE_MAX_CONSTANT_BUFFERS], - const unsigned constants_size[PIPE_MAX_CONSTANT_BUFFERS], - const struct draw_vertex_info *input_verts, - const struct draw_prim_info *input_prim, - struct draw_vertex_info *output_verts, - struct draw_prim_info *output_prims ) -{ - const float (*input)[4] = (const float (*)[4])input_verts->verts->data; - unsigned input_stride = input_verts->vertex_size; - unsigned vertex_size = input_verts->vertex_size; - struct tgsi_exec_machine *machine = shader->machine; - unsigned num_input_verts = input_prim->linear ? - input_verts->count : - input_prim->count; - unsigned num_in_primitives = - MAX2(u_gs_prims_for_vertices(input_prim->prim, num_input_verts), - u_gs_prims_for_vertices(shader->input_primitive, num_input_verts)); - unsigned max_out_prims = u_gs_prims_for_vertices(shader->output_primitive, - shader->max_output_vertices) - * num_in_primitives; - - output_verts->vertex_size = input_verts->vertex_size; - output_verts->stride = input_verts->vertex_size; - output_verts->verts = - (struct vertex_header *)MALLOC(input_verts->vertex_size * - num_in_primitives * - shader->max_output_vertices); - - -#if 0 - debug_printf("%s count = %d (in prims # = %d)\n", - __FUNCTION__, num_input_verts, num_in_primitives); - debug_printf("\tlinear = %d, prim_info->count = %d\n", - input_prim->linear, input_prim->count); - debug_printf("\tprimt pipe = %d, shader in = %d, shader out = %d, max out = %d\n", - input_prim->prim, shader->input_primitive, - shader->output_primitive, - shader->max_output_vertices); -#endif - - shader->emitted_vertices = 0; - shader->emitted_primitives = 0; - shader->vertex_size = vertex_size; - shader->tmp_output = (float (*)[4])output_verts->verts->data; - shader->in_prim_idx = 0; - shader->input_vertex_stride = input_stride; - shader->input = input; - if (shader->primitive_lengths) { - FREE(shader->primitive_lengths); - } - shader->primitive_lengths = MALLOC(max_out_prims * sizeof(unsigned)); - - tgsi_exec_set_constant_buffers(machine, PIPE_MAX_CONSTANT_BUFFERS, - constants, constants_size); - - if (input_prim->linear) - gs_run(shader, input_prim, input_verts, - output_prims, output_verts); - else - gs_run_elts(shader, input_prim, input_verts, - output_prims, output_verts); - - /* Update prim_info: - */ - output_prims->linear = TRUE; - output_prims->elts = NULL; - output_prims->start = 0; - output_prims->count = shader->emitted_vertices; - output_prims->prim = shader->output_primitive; - output_prims->flags = 0x0; - output_prims->primitive_lengths = shader->primitive_lengths; - output_prims->primitive_count = shader->emitted_primitives; - output_verts->count = shader->emitted_vertices; - -#if 0 - debug_printf("GS finished, prims = %d, verts = %d\n", - output_prims->primitive_count, - output_verts->count); -#endif - - return shader->emitted_vertices; -} - -void draw_geometry_shader_delete(struct draw_geometry_shader *shader) -{ - FREE((void*) shader->state.tokens); - FREE(shader); -} - -void draw_geometry_shader_prepare(struct draw_geometry_shader *shader, - struct draw_context *draw) -{ - if (shader && shader->machine->Tokens != shader->state.tokens) { - tgsi_exec_machine_bind_shader(shader->machine, - shader->state.tokens, - draw->gs.num_samplers, - draw->gs.samplers); - } -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_gs.h b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_gs.h deleted file mode 100644 index 67bc1aa73ff..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_gs.h +++ /dev/null @@ -1,90 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef DRAW_GS_H -#define DRAW_GS_H - -#include "draw_context.h" -#include "draw_private.h" - - -#define MAX_TGSI_PRIMITIVES 4 - -struct draw_context; - -/** - * Private version of the compiled geometry shader - */ -struct draw_geometry_shader { - struct draw_context *draw; - - struct tgsi_exec_machine *machine; - - /* This member will disappear shortly:*/ - struct pipe_shader_state state; - - struct tgsi_shader_info info; - unsigned position_output; - - unsigned max_output_vertices; - unsigned input_primitive; - unsigned output_primitive; - - unsigned *primitive_lengths; - unsigned emitted_vertices; - unsigned emitted_primitives; - - float (*tmp_output)[4]; - unsigned vertex_size; - - unsigned in_prim_idx; - unsigned input_vertex_stride; - const float (*input)[4]; -}; - -/* - * Returns the number of vertices emitted. - * The vertex shader can emit any number of vertices as long as it's - * smaller than the GS_MAX_OUTPUT_VERTICES shader property. - */ -int draw_geometry_shader_run(struct draw_geometry_shader *shader, - const void *constants[PIPE_MAX_CONSTANT_BUFFERS], - const unsigned constants_size[PIPE_MAX_CONSTANT_BUFFERS], - const struct draw_vertex_info *input_verts, - const struct draw_prim_info *input_prim, - struct draw_vertex_info *output_verts, - struct draw_prim_info *output_prims ); - -void draw_geometry_shader_prepare(struct draw_geometry_shader *shader, - struct draw_context *draw); - -void draw_geometry_shader_delete(struct draw_geometry_shader *shader); - -int draw_gs_max_output_vertices(struct draw_geometry_shader *shader, - unsigned pipe_prim); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_gs_tmp.h b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_gs_tmp.h deleted file mode 100644 index de7b02655a5..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_gs_tmp.h +++ /dev/null @@ -1,32 +0,0 @@ -#define FUNC_VARS struct draw_geometry_shader *gs, \ - const struct draw_prim_info *input_prims, \ - const struct draw_vertex_info *input_verts, \ - struct draw_prim_info *output_prims, \ - struct draw_vertex_info *output_verts - -#define FUNC_ENTER \ - /* declare more local vars */ \ - const unsigned prim = input_prims->prim; \ - const unsigned prim_flags = input_prims->flags; \ - const unsigned count = input_prims->count; \ - const boolean last_vertex_last = TRUE; \ - do { \ - debug_assert(input_prims->primitive_count == 1); \ - switch (prim) { \ - case PIPE_PRIM_QUADS: \ - case PIPE_PRIM_QUAD_STRIP: \ - case PIPE_PRIM_POLYGON: \ - debug_assert(!"unexpected primitive type in GS"); \ - return; \ - default: \ - break; \ - } \ - } while (0) \ - -#define POINT(i0) gs_point(gs,i0) -#define LINE(flags,i0,i1) gs_line(gs,i0,i1) -#define TRIANGLE(flags,i0,i1,i2) gs_tri(gs,i0,i1,i2) -#define LINE_ADJ(flags,i0,i1,i2,i3) gs_line_adj(gs,i0,i1,i2,i3) -#define TRIANGLE_ADJ(flags,i0,i1,i2,i3,i4,i5) gs_tri_adj(gs,i0,i1,i2,i3,i4,i5) - -#include "draw_decompose_tmp.h" diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_llvm.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_llvm.c deleted file mode 100644 index b81c72573bd..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_llvm.c +++ /dev/null @@ -1,1568 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "draw_llvm.h" - -#include "draw_context.h" -#include "draw_vs.h" - -#include "gallivm/lp_bld_arit.h" -#include "gallivm/lp_bld_logic.h" -#include "gallivm/lp_bld_const.h" -#include "gallivm/lp_bld_swizzle.h" -#include "gallivm/lp_bld_struct.h" -#include "gallivm/lp_bld_type.h" -#include "gallivm/lp_bld_flow.h" -#include "gallivm/lp_bld_debug.h" -#include "gallivm/lp_bld_tgsi.h" -#include "gallivm/lp_bld_printf.h" -#include "gallivm/lp_bld_intr.h" -#include "gallivm/lp_bld_init.h" -#include "gallivm/lp_bld_type.h" - -#include "tgsi/tgsi_exec.h" -#include "tgsi/tgsi_dump.h" - -#include "util/u_math.h" -#include "util/u_pointer.h" -#include "util/u_string.h" -#include "util/u_simple_list.h" - - -#define DEBUG_STORE 0 - - -/** - * This function is called by the gallivm "garbage collector" when - * the LLVM global data structures are freed. We must free all LLVM-related - * data. Specifically, all JIT'd shader variants. - */ -static void -draw_llvm_garbage_collect_callback(void *cb_data) -{ - struct draw_llvm *llvm = (struct draw_llvm *) cb_data; - struct draw_context *draw = llvm->draw; - struct draw_llvm_variant_list_item *li; - - /* Ensure prepare will be run and shaders recompiled */ - assert(!draw->suspend_flushing); - draw_do_flush(draw, DRAW_FLUSH_STATE_CHANGE); - - /* free all shader variants */ - li = first_elem(&llvm->vs_variants_list); - while (!at_end(&llvm->vs_variants_list, li)) { - struct draw_llvm_variant_list_item *next = next_elem(li); - draw_llvm_destroy_variant(li->base); - li = next; - } - - /* Null-out these pointers so they get remade next time they're needed. - * See the accessor functions below. - */ - llvm->context_ptr_type = NULL; - llvm->buffer_ptr_type = NULL; - llvm->vb_ptr_type = NULL; - llvm->vertex_header_ptr_type = NULL; -} - - -static void -draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *var, - boolean elts); - - -/** - * Create LLVM type for struct draw_jit_texture - */ -static LLVMTypeRef -create_jit_texture_type(struct gallivm_state *gallivm, const char *struct_name) -{ - LLVMTargetDataRef target = gallivm->target; - LLVMTypeRef texture_type; - LLVMTypeRef elem_types[DRAW_JIT_TEXTURE_NUM_FIELDS]; - LLVMTypeRef int32_type = LLVMInt32TypeInContext(gallivm->context); - - elem_types[DRAW_JIT_TEXTURE_WIDTH] = - elem_types[DRAW_JIT_TEXTURE_HEIGHT] = - elem_types[DRAW_JIT_TEXTURE_DEPTH] = - elem_types[DRAW_JIT_TEXTURE_FIRST_LEVEL] = - elem_types[DRAW_JIT_TEXTURE_LAST_LEVEL] = int32_type; - elem_types[DRAW_JIT_TEXTURE_ROW_STRIDE] = - elem_types[DRAW_JIT_TEXTURE_IMG_STRIDE] = - LLVMArrayType(int32_type, PIPE_MAX_TEXTURE_LEVELS); - elem_types[DRAW_JIT_TEXTURE_DATA] = - LLVMArrayType(LLVMPointerType(LLVMInt8TypeInContext(gallivm->context), 0), - PIPE_MAX_TEXTURE_LEVELS); - elem_types[DRAW_JIT_TEXTURE_MIN_LOD] = - elem_types[DRAW_JIT_TEXTURE_MAX_LOD] = - elem_types[DRAW_JIT_TEXTURE_LOD_BIAS] = LLVMFloatTypeInContext(gallivm->context); - elem_types[DRAW_JIT_TEXTURE_BORDER_COLOR] = - LLVMArrayType(LLVMFloatTypeInContext(gallivm->context), 4); - -#if HAVE_LLVM >= 0x0300 - texture_type = LLVMStructCreateNamed(gallivm->context, struct_name); - LLVMStructSetBody(texture_type, elem_types, - Elements(elem_types), 0); -#else - texture_type = LLVMStructTypeInContext(gallivm->context, elem_types, - Elements(elem_types), 0); - - LLVMAddTypeName(gallivm->module, struct_name, texture_type); - - /* Make sure the target's struct layout cache doesn't return - * stale/invalid data. - */ - LLVMInvalidateStructLayout(gallivm->target, texture_type); -#endif - - LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, width, - target, texture_type, - DRAW_JIT_TEXTURE_WIDTH); - LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, height, - target, texture_type, - DRAW_JIT_TEXTURE_HEIGHT); - LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, depth, - target, texture_type, - DRAW_JIT_TEXTURE_DEPTH); - LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, first_level, - target, texture_type, - DRAW_JIT_TEXTURE_FIRST_LEVEL); - LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, last_level, - target, texture_type, - DRAW_JIT_TEXTURE_LAST_LEVEL); - LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, row_stride, - target, texture_type, - DRAW_JIT_TEXTURE_ROW_STRIDE); - LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, img_stride, - target, texture_type, - DRAW_JIT_TEXTURE_IMG_STRIDE); - LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, data, - target, texture_type, - DRAW_JIT_TEXTURE_DATA); - LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, min_lod, - target, texture_type, - DRAW_JIT_TEXTURE_MIN_LOD); - LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, max_lod, - target, texture_type, - DRAW_JIT_TEXTURE_MAX_LOD); - LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, lod_bias, - target, texture_type, - DRAW_JIT_TEXTURE_LOD_BIAS); - LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, border_color, - target, texture_type, - DRAW_JIT_TEXTURE_BORDER_COLOR); - - LP_CHECK_STRUCT_SIZE(struct draw_jit_texture, target, texture_type); - - return texture_type; -} - - -/** - * Create LLVM type for struct draw_jit_texture - */ -static LLVMTypeRef -create_jit_context_type(struct gallivm_state *gallivm, - LLVMTypeRef texture_type, const char *struct_name) -{ - LLVMTargetDataRef target = gallivm->target; - LLVMTypeRef float_type = LLVMFloatTypeInContext(gallivm->context); - LLVMTypeRef elem_types[5]; - LLVMTypeRef context_type; - - elem_types[0] = LLVMPointerType(float_type, 0); /* vs_constants */ - elem_types[1] = LLVMPointerType(float_type, 0); /* gs_constants */ - elem_types[2] = LLVMPointerType(LLVMArrayType(LLVMArrayType(float_type, 4), - DRAW_TOTAL_CLIP_PLANES), 0); - elem_types[3] = LLVMPointerType(float_type, 0); /* viewport */ - elem_types[4] = LLVMArrayType(texture_type, - PIPE_MAX_VERTEX_SAMPLERS); /* textures */ -#if HAVE_LLVM >= 0x0300 - context_type = LLVMStructCreateNamed(gallivm->context, struct_name); - LLVMStructSetBody(context_type, elem_types, - Elements(elem_types), 0); -#else - context_type = LLVMStructTypeInContext(gallivm->context, elem_types, - Elements(elem_types), 0); - LLVMAddTypeName(gallivm->module, struct_name, context_type); - - LLVMInvalidateStructLayout(gallivm->target, context_type); -#endif - - LP_CHECK_MEMBER_OFFSET(struct draw_jit_context, vs_constants, - target, context_type, 0); - LP_CHECK_MEMBER_OFFSET(struct draw_jit_context, gs_constants, - target, context_type, 1); - LP_CHECK_MEMBER_OFFSET(struct draw_jit_context, planes, - target, context_type, 2); - LP_CHECK_MEMBER_OFFSET(struct draw_jit_context, textures, - target, context_type, - DRAW_JIT_CTX_TEXTURES); - LP_CHECK_STRUCT_SIZE(struct draw_jit_context, - target, context_type); - - return context_type; -} - - -/** - * Create LLVM type for struct pipe_vertex_buffer - */ -static LLVMTypeRef -create_jit_vertex_buffer_type(struct gallivm_state *gallivm, const char *struct_name) -{ - LLVMTargetDataRef target = gallivm->target; - LLVMTypeRef elem_types[3]; - LLVMTypeRef vb_type; - - elem_types[0] = - elem_types[1] = LLVMInt32TypeInContext(gallivm->context); - elem_types[2] = LLVMPointerType(LLVMInt8TypeInContext(gallivm->context), 0); /* vs_constants */ - -#if HAVE_LLVM >= 0x0300 - vb_type = LLVMStructCreateNamed(gallivm->context, struct_name); - LLVMStructSetBody(vb_type, elem_types, - Elements(elem_types), 0); -#else - vb_type = LLVMStructTypeInContext(gallivm->context, elem_types, - Elements(elem_types), 0); - LLVMAddTypeName(gallivm->module, struct_name, vb_type); - - LLVMInvalidateStructLayout(gallivm->target, vb_type); -#endif - - LP_CHECK_MEMBER_OFFSET(struct pipe_vertex_buffer, stride, - target, vb_type, 0); - LP_CHECK_MEMBER_OFFSET(struct pipe_vertex_buffer, buffer_offset, - target, vb_type, 1); - - LP_CHECK_STRUCT_SIZE(struct pipe_vertex_buffer, target, vb_type); - - return vb_type; -} - - -/** - * Create LLVM type for struct vertex_header; - */ -static LLVMTypeRef -create_jit_vertex_header(struct gallivm_state *gallivm, int data_elems) -{ - LLVMTargetDataRef target = gallivm->target; - LLVMTypeRef elem_types[4]; - LLVMTypeRef vertex_header; - char struct_name[24]; - - util_snprintf(struct_name, 23, "vertex_header%d", data_elems); - - elem_types[DRAW_JIT_VERTEX_VERTEX_ID] = LLVMIntTypeInContext(gallivm->context, 32); - elem_types[DRAW_JIT_VERTEX_CLIP] = LLVMArrayType(LLVMFloatTypeInContext(gallivm->context), 4); - elem_types[DRAW_JIT_VERTEX_PRE_CLIP_POS] = LLVMArrayType(LLVMFloatTypeInContext(gallivm->context), 4); - elem_types[DRAW_JIT_VERTEX_DATA] = LLVMArrayType(elem_types[1], data_elems); - -#if HAVE_LLVM >= 0x0300 - vertex_header = LLVMStructCreateNamed(gallivm->context, struct_name); - LLVMStructSetBody(vertex_header, elem_types, - Elements(elem_types), 0); -#else - vertex_header = LLVMStructTypeInContext(gallivm->context, elem_types, - Elements(elem_types), 0); - LLVMAddTypeName(gallivm->module, struct_name, vertex_header); - - LLVMInvalidateStructLayout(gallivm->target, vertex_header); -#endif - - /* these are bit-fields and we can't take address of them - LP_CHECK_MEMBER_OFFSET(struct vertex_header, clipmask, - target, vertex_header, - DRAW_JIT_VERTEX_CLIPMASK); - LP_CHECK_MEMBER_OFFSET(struct vertex_header, edgeflag, - target, vertex_header, - DRAW_JIT_VERTEX_EDGEFLAG); - LP_CHECK_MEMBER_OFFSET(struct vertex_header, pad, - target, vertex_header, - DRAW_JIT_VERTEX_PAD); - LP_CHECK_MEMBER_OFFSET(struct vertex_header, vertex_id, - target, vertex_header, - DRAW_JIT_VERTEX_VERTEX_ID); - */ - LP_CHECK_MEMBER_OFFSET(struct vertex_header, clip, - target, vertex_header, - DRAW_JIT_VERTEX_CLIP); - LP_CHECK_MEMBER_OFFSET(struct vertex_header, pre_clip_pos, - target, vertex_header, - DRAW_JIT_VERTEX_PRE_CLIP_POS); - LP_CHECK_MEMBER_OFFSET(struct vertex_header, data, - target, vertex_header, - DRAW_JIT_VERTEX_DATA); - - return vertex_header; -} - - -/** - * Create LLVM types for various structures. - */ -static void -create_jit_types(struct draw_llvm *llvm) -{ - struct gallivm_state *gallivm = llvm->gallivm; - LLVMTypeRef texture_type, context_type, buffer_type, vb_type; - - texture_type = create_jit_texture_type(gallivm, "texture"); - - context_type = create_jit_context_type(gallivm, texture_type, "draw_jit_context"); - llvm->context_ptr_type = LLVMPointerType(context_type, 0); - - buffer_type = LLVMPointerType(LLVMIntTypeInContext(gallivm->context, 8), 0); - llvm->buffer_ptr_type = LLVMPointerType(buffer_type, 0); - - vb_type = create_jit_vertex_buffer_type(gallivm, "pipe_vertex_buffer"); - llvm->vb_ptr_type = LLVMPointerType(vb_type, 0); -} - - -static LLVMTypeRef -get_context_ptr_type(struct draw_llvm *llvm) -{ - if (!llvm->context_ptr_type) - create_jit_types(llvm); - return llvm->context_ptr_type; -} - - -static LLVMTypeRef -get_buffer_ptr_type(struct draw_llvm *llvm) -{ - if (!llvm->buffer_ptr_type) - create_jit_types(llvm); - return llvm->buffer_ptr_type; -} - - -static LLVMTypeRef -get_vb_ptr_type(struct draw_llvm *llvm) -{ - if (!llvm->vb_ptr_type) - create_jit_types(llvm); - return llvm->vb_ptr_type; -} - -static LLVMTypeRef -get_vertex_header_ptr_type(struct draw_llvm *llvm) -{ - if (!llvm->vertex_header_ptr_type) - create_jit_types(llvm); - return llvm->vertex_header_ptr_type; -} - - -/** - * Create per-context LLVM info. - */ -struct draw_llvm * -draw_llvm_create(struct draw_context *draw, struct gallivm_state *gallivm) -{ - struct draw_llvm *llvm; - - llvm = CALLOC_STRUCT( draw_llvm ); - if (!llvm) - return NULL; - - lp_build_init(); - - llvm->draw = draw; - llvm->gallivm = gallivm; - - if (gallivm_debug & GALLIVM_DEBUG_IR) { - LLVMDumpModule(llvm->gallivm->module); - } - - llvm->nr_variants = 0; - make_empty_list(&llvm->vs_variants_list); - - gallivm_register_garbage_collector_callback( - draw_llvm_garbage_collect_callback, llvm); - - return llvm; -} - - -/** - * Free per-context LLVM info. - */ -void -draw_llvm_destroy(struct draw_llvm *llvm) -{ - gallivm_remove_garbage_collector_callback( - draw_llvm_garbage_collect_callback, llvm); - - /* XXX free other draw_llvm data? */ - FREE(llvm); -} - - -/** - * Create LLVM-generated code for a vertex shader. - */ -struct draw_llvm_variant * -draw_llvm_create_variant(struct draw_llvm *llvm, - unsigned num_inputs, - const struct draw_llvm_variant_key *key) -{ - struct draw_llvm_variant *variant; - struct llvm_vertex_shader *shader = - llvm_vertex_shader(llvm->draw->vs.vertex_shader); - LLVMTypeRef vertex_header; - - variant = MALLOC(sizeof *variant + - shader->variant_key_size - - sizeof variant->key); - if (variant == NULL) - return NULL; - - variant->llvm = llvm; - - memcpy(&variant->key, key, shader->variant_key_size); - - vertex_header = create_jit_vertex_header(llvm->gallivm, num_inputs); - - llvm->vertex_header_ptr_type = LLVMPointerType(vertex_header, 0); - - draw_llvm_generate(llvm, variant, FALSE); /* linear */ - draw_llvm_generate(llvm, variant, TRUE); /* elts */ - - variant->shader = shader; - variant->list_item_global.base = variant; - variant->list_item_local.base = variant; - /*variant->no = */shader->variants_created++; - variant->list_item_global.base = variant; - - return variant; -} - - -static void -generate_vs(struct draw_llvm *llvm, - LLVMBuilderRef builder, - LLVMValueRef (*outputs)[NUM_CHANNELS], - const LLVMValueRef (*inputs)[NUM_CHANNELS], - LLVMValueRef system_values_array, - LLVMValueRef context_ptr, - struct lp_build_sampler_soa *draw_sampler, - boolean clamp_vertex_color) -{ - const struct tgsi_token *tokens = llvm->draw->vs.vertex_shader->state.tokens; - struct lp_type vs_type; - LLVMValueRef consts_ptr = draw_jit_context_vs_constants(llvm->gallivm, context_ptr); - struct lp_build_sampler_soa *sampler = 0; - - memset(&vs_type, 0, sizeof vs_type); - vs_type.floating = TRUE; /* floating point values */ - vs_type.sign = TRUE; /* values are signed */ - vs_type.norm = FALSE; /* values are not limited to [0,1] or [-1,1] */ - vs_type.width = 32; /* 32-bit float */ - vs_type.length = 4; /* 4 elements per vector */ -#if 0 - num_vs = 4; /* number of vertices per block */ -#endif - - if (gallivm_debug & GALLIVM_DEBUG_IR) { - tgsi_dump(tokens, 0); - } - - if (llvm->draw->num_sampler_views && llvm->draw->num_samplers) - sampler = draw_sampler; - - lp_build_tgsi_soa(llvm->gallivm, - tokens, - vs_type, - NULL /*struct lp_build_mask_context *mask*/, - consts_ptr, - system_values_array, - NULL /*pos*/, - inputs, - outputs, - sampler, - &llvm->draw->vs.vertex_shader->info); - - if (clamp_vertex_color) { - LLVMValueRef out; - unsigned chan, attrib; - struct lp_build_context bld; - struct tgsi_shader_info* info = &llvm->draw->vs.vertex_shader->info; - lp_build_context_init(&bld, llvm->gallivm, vs_type); - - for (attrib = 0; attrib < info->num_outputs; ++attrib) { - for (chan = 0; chan < NUM_CHANNELS; ++chan) { - if (outputs[attrib][chan]) { - switch (info->output_semantic_name[attrib]) { - case TGSI_SEMANTIC_COLOR: - case TGSI_SEMANTIC_BCOLOR: - out = LLVMBuildLoad(builder, outputs[attrib][chan], ""); - out = lp_build_clamp(&bld, out, bld.zero, bld.one); - LLVMBuildStore(builder, out, outputs[attrib][chan]); - break; - } - } - } - } - } -} - - -#if DEBUG_STORE -static void print_vectorf(LLVMBuilderRef builder, - LLVMValueRef vec) -{ - LLVMValueRef val[4]; - val[0] = LLVMBuildExtractElement(builder, vec, - lp_build_const_int32(gallivm, 0), ""); - val[1] = LLVMBuildExtractElement(builder, vec, - lp_build_const_int32(gallivm, 1), ""); - val[2] = LLVMBuildExtractElement(builder, vec, - lp_build_const_int32(gallivm, 2), ""); - val[3] = LLVMBuildExtractElement(builder, vec, - lp_build_const_int32(gallivm, 3), ""); - lp_build_printf(builder, "vector = [%f, %f, %f, %f]\n", - val[0], val[1], val[2], val[3]); -} -#endif - - -static void -generate_fetch(struct gallivm_state *gallivm, - LLVMValueRef vbuffers_ptr, - LLVMValueRef *res, - struct pipe_vertex_element *velem, - LLVMValueRef vbuf, - LLVMValueRef index, - LLVMValueRef instance_id) -{ - LLVMBuilderRef builder = gallivm->builder; - LLVMValueRef indices = - LLVMConstInt(LLVMInt64TypeInContext(gallivm->context), - velem->vertex_buffer_index, 0); - LLVMValueRef vbuffer_ptr = LLVMBuildGEP(builder, vbuffers_ptr, - &indices, 1, ""); - LLVMValueRef vb_stride = draw_jit_vbuffer_stride(gallivm, vbuf); - LLVMValueRef vb_buffer_offset = draw_jit_vbuffer_offset(gallivm, vbuf); - LLVMValueRef stride; - - if (velem->instance_divisor) { - /* array index = instance_id / instance_divisor */ - index = LLVMBuildUDiv(builder, instance_id, - lp_build_const_int32(gallivm, velem->instance_divisor), - "instance_divisor"); - } - - stride = LLVMBuildMul(builder, vb_stride, index, ""); - - vbuffer_ptr = LLVMBuildLoad(builder, vbuffer_ptr, "vbuffer"); - - stride = LLVMBuildAdd(builder, stride, - vb_buffer_offset, - ""); - stride = LLVMBuildAdd(builder, stride, - lp_build_const_int32(gallivm, velem->src_offset), - ""); - - /*lp_build_printf(builder, "vbuf index = %d, stride is %d\n", indices, stride);*/ - vbuffer_ptr = LLVMBuildGEP(builder, vbuffer_ptr, &stride, 1, ""); - - *res = draw_llvm_translate_from(gallivm, vbuffer_ptr, velem->src_format); -} - - -static LLVMValueRef -aos_to_soa(struct gallivm_state *gallivm, - LLVMValueRef val0, - LLVMValueRef val1, - LLVMValueRef val2, - LLVMValueRef val3, - LLVMValueRef channel) -{ - LLVMBuilderRef builder = gallivm->builder; - LLVMValueRef ex, res; - - ex = LLVMBuildExtractElement(builder, val0, - channel, ""); - res = LLVMBuildInsertElement(builder, - LLVMConstNull(LLVMTypeOf(val0)), - ex, - lp_build_const_int32(gallivm, 0), - ""); - - ex = LLVMBuildExtractElement(builder, val1, - channel, ""); - res = LLVMBuildInsertElement(builder, - res, ex, - lp_build_const_int32(gallivm, 1), - ""); - - ex = LLVMBuildExtractElement(builder, val2, - channel, ""); - res = LLVMBuildInsertElement(builder, - res, ex, - lp_build_const_int32(gallivm, 2), - ""); - - ex = LLVMBuildExtractElement(builder, val3, - channel, ""); - res = LLVMBuildInsertElement(builder, - res, ex, - lp_build_const_int32(gallivm, 3), - ""); - - return res; -} - - -static void -soa_to_aos(struct gallivm_state *gallivm, - LLVMValueRef soa[NUM_CHANNELS], - LLVMValueRef aos[NUM_CHANNELS]) -{ - LLVMBuilderRef builder = gallivm->builder; - LLVMValueRef comp; - int i = 0; - - debug_assert(NUM_CHANNELS == 4); - - aos[0] = LLVMConstNull(LLVMTypeOf(soa[0])); - aos[1] = aos[2] = aos[3] = aos[0]; - - for (i = 0; i < NUM_CHANNELS; ++i) { - LLVMValueRef channel = lp_build_const_int32(gallivm, i); - - comp = LLVMBuildExtractElement(builder, soa[i], - lp_build_const_int32(gallivm, 0), ""); - aos[0] = LLVMBuildInsertElement(builder, aos[0], comp, channel, ""); - - comp = LLVMBuildExtractElement(builder, soa[i], - lp_build_const_int32(gallivm, 1), ""); - aos[1] = LLVMBuildInsertElement(builder, aos[1], comp, channel, ""); - - comp = LLVMBuildExtractElement(builder, soa[i], - lp_build_const_int32(gallivm, 2), ""); - aos[2] = LLVMBuildInsertElement(builder, aos[2], comp, channel, ""); - - comp = LLVMBuildExtractElement(builder, soa[i], - lp_build_const_int32(gallivm, 3), ""); - aos[3] = LLVMBuildInsertElement(builder, aos[3], comp, channel, ""); - - } -} - - -static void -convert_to_soa(struct gallivm_state *gallivm, - LLVMValueRef (*aos)[NUM_CHANNELS], - LLVMValueRef (*soa)[NUM_CHANNELS], - int num_attribs) -{ - int i; - - debug_assert(NUM_CHANNELS == 4); - - for (i = 0; i < num_attribs; ++i) { - LLVMValueRef val0 = aos[i][0]; - LLVMValueRef val1 = aos[i][1]; - LLVMValueRef val2 = aos[i][2]; - LLVMValueRef val3 = aos[i][3]; - - soa[i][0] = aos_to_soa(gallivm, val0, val1, val2, val3, - lp_build_const_int32(gallivm, 0)); - soa[i][1] = aos_to_soa(gallivm, val0, val1, val2, val3, - lp_build_const_int32(gallivm, 1)); - soa[i][2] = aos_to_soa(gallivm, val0, val1, val2, val3, - lp_build_const_int32(gallivm, 2)); - soa[i][3] = aos_to_soa(gallivm, val0, val1, val2, val3, - lp_build_const_int32(gallivm, 3)); - } -} - - -static void -store_aos(struct gallivm_state *gallivm, - LLVMValueRef io_ptr, - LLVMValueRef index, - LLVMValueRef value, - LLVMValueRef clipmask) -{ - LLVMBuilderRef builder = gallivm->builder; - LLVMValueRef id_ptr = draw_jit_header_id(gallivm, io_ptr); - LLVMValueRef data_ptr = draw_jit_header_data(gallivm, io_ptr); - LLVMValueRef indices[3]; - LLVMValueRef val; - int vertex_id_pad_edgeflag; - - indices[0] = lp_build_const_int32(gallivm, 0); - indices[1] = index; - indices[2] = lp_build_const_int32(gallivm, 0); - - /* If this assertion fails, it means we need to update the bit twidding - * code here. See struct vertex_header in draw_private.h. - */ - assert(DRAW_TOTAL_CLIP_PLANES==14); - /* initialize vertex id:16 = 0xffff, pad:1 = 0, edgeflag:1 = 1 */ - vertex_id_pad_edgeflag = (0xffff << 16) | (1 << DRAW_TOTAL_CLIP_PLANES); - val = lp_build_const_int32(gallivm, vertex_id_pad_edgeflag); - /* OR with the clipmask */ - val = LLVMBuildOr(builder, val, clipmask, ""); - - /* store vertex header */ - LLVMBuildStore(builder, val, id_ptr); - - -#if DEBUG_STORE - lp_build_printf(builder, " ---- %p storing attribute %d (io = %p)\n", data_ptr, index, io_ptr); -#endif -#if 0 - /*lp_build_printf(builder, " ---- %p storing at %d (%p) ", io_ptr, index, data_ptr); - print_vectorf(builder, value);*/ - data_ptr = LLVMBuildBitCast(builder, data_ptr, - LLVMPointerType(LLVMArrayType(LLVMVectorType(LLVMFloatTypeInContext(gallivm->context), 4), 0), 0), - "datavec"); - data_ptr = LLVMBuildGEP(builder, data_ptr, indices, 2, ""); - - LLVMBuildStore(builder, value, data_ptr); -#else - { - LLVMValueRef x, y, z, w; - LLVMValueRef idx0, idx1, idx2, idx3; - LLVMValueRef gep0, gep1, gep2, gep3; - data_ptr = LLVMBuildGEP(builder, data_ptr, indices, 3, ""); - - idx0 = lp_build_const_int32(gallivm, 0); - idx1 = lp_build_const_int32(gallivm, 1); - idx2 = lp_build_const_int32(gallivm, 2); - idx3 = lp_build_const_int32(gallivm, 3); - - x = LLVMBuildExtractElement(builder, value, - idx0, ""); - y = LLVMBuildExtractElement(builder, value, - idx1, ""); - z = LLVMBuildExtractElement(builder, value, - idx2, ""); - w = LLVMBuildExtractElement(builder, value, - idx3, ""); - - gep0 = LLVMBuildGEP(builder, data_ptr, &idx0, 1, ""); - gep1 = LLVMBuildGEP(builder, data_ptr, &idx1, 1, ""); - gep2 = LLVMBuildGEP(builder, data_ptr, &idx2, 1, ""); - gep3 = LLVMBuildGEP(builder, data_ptr, &idx3, 1, ""); - - /*lp_build_printf(builder, "##### x = %f (%p), y = %f (%p), z = %f (%p), w = %f (%p)\n", - x, gep0, y, gep1, z, gep2, w, gep3);*/ - LLVMBuildStore(builder, x, gep0); - LLVMBuildStore(builder, y, gep1); - LLVMBuildStore(builder, z, gep2); - LLVMBuildStore(builder, w, gep3); - } -#endif -} - - -static void -store_aos_array(struct gallivm_state *gallivm, - LLVMValueRef io_ptr, - LLVMValueRef aos[NUM_CHANNELS], - int attrib, - int num_outputs, - LLVMValueRef clipmask) -{ - LLVMBuilderRef builder = gallivm->builder; - LLVMValueRef attr_index = lp_build_const_int32(gallivm, attrib); - LLVMValueRef ind0 = lp_build_const_int32(gallivm, 0); - LLVMValueRef ind1 = lp_build_const_int32(gallivm, 1); - LLVMValueRef ind2 = lp_build_const_int32(gallivm, 2); - LLVMValueRef ind3 = lp_build_const_int32(gallivm, 3); - LLVMValueRef io0_ptr, io1_ptr, io2_ptr, io3_ptr; - LLVMValueRef clipmask0, clipmask1, clipmask2, clipmask3; - - debug_assert(NUM_CHANNELS == 4); - - io0_ptr = LLVMBuildGEP(builder, io_ptr, - &ind0, 1, ""); - io1_ptr = LLVMBuildGEP(builder, io_ptr, - &ind1, 1, ""); - io2_ptr = LLVMBuildGEP(builder, io_ptr, - &ind2, 1, ""); - io3_ptr = LLVMBuildGEP(builder, io_ptr, - &ind3, 1, ""); - - clipmask0 = LLVMBuildExtractElement(builder, clipmask, - ind0, ""); - clipmask1 = LLVMBuildExtractElement(builder, clipmask, - ind1, ""); - clipmask2 = LLVMBuildExtractElement(builder, clipmask, - ind2, ""); - clipmask3 = LLVMBuildExtractElement(builder, clipmask, - ind3, ""); - -#if DEBUG_STORE - lp_build_printf(builder, "io = %p, indexes[%d, %d, %d, %d]\n, clipmask0 = %x, clipmask1 = %x, clipmask2 = %x, clipmask3 = %x\n", - io_ptr, ind0, ind1, ind2, ind3, clipmask0, clipmask1, clipmask2, clipmask3); -#endif - /* store for each of the 4 vertices */ - store_aos(gallivm, io0_ptr, attr_index, aos[0], clipmask0); - store_aos(gallivm, io1_ptr, attr_index, aos[1], clipmask1); - store_aos(gallivm, io2_ptr, attr_index, aos[2], clipmask2); - store_aos(gallivm, io3_ptr, attr_index, aos[3], clipmask3); -} - - -static void -convert_to_aos(struct gallivm_state *gallivm, - LLVMValueRef io, - LLVMValueRef (*outputs)[NUM_CHANNELS], - LLVMValueRef clipmask, - int num_outputs, - int max_vertices) -{ - LLVMBuilderRef builder = gallivm->builder; - unsigned chan, attrib; - -#if DEBUG_STORE - lp_build_printf(builder, " # storing begin\n"); -#endif - for (attrib = 0; attrib < num_outputs; ++attrib) { - LLVMValueRef soa[4]; - LLVMValueRef aos[4]; - for (chan = 0; chan < NUM_CHANNELS; ++chan) { - if (outputs[attrib][chan]) { - LLVMValueRef out = LLVMBuildLoad(builder, outputs[attrib][chan], ""); - lp_build_name(out, "output%u.%c", attrib, "xyzw"[chan]); - /*lp_build_printf(builder, "output %d : %d ", - LLVMConstInt(LLVMInt32Type(), attrib, 0), - LLVMConstInt(LLVMInt32Type(), chan, 0)); - print_vectorf(builder, out);*/ - soa[chan] = out; - } - else { - soa[chan] = 0; - } - } - soa_to_aos(gallivm, soa, aos); - store_aos_array(gallivm, - io, - aos, - attrib, - num_outputs, - clipmask); - } -#if DEBUG_STORE - lp_build_printf(builder, " # storing end\n"); -#endif -} - - -/** - * Stores original vertex positions in clip coordinates - * There is probably a more efficient way to do this, 4 floats at once - * rather than extracting each element one by one. - */ -static void -store_clip(struct gallivm_state *gallivm, - LLVMValueRef io_ptr, - LLVMValueRef (*outputs)[NUM_CHANNELS], - boolean pre_clip_pos) -{ - LLVMBuilderRef builder = gallivm->builder; - LLVMValueRef out[4]; - LLVMValueRef indices[2]; - LLVMValueRef io0_ptr, io1_ptr, io2_ptr, io3_ptr; - LLVMValueRef clip_ptr0, clip_ptr1, clip_ptr2, clip_ptr3; - LLVMValueRef clip0_ptr, clip1_ptr, clip2_ptr, clip3_ptr; - LLVMValueRef out0elem, out1elem, out2elem, out3elem; - int i; - - LLVMValueRef ind0 = lp_build_const_int32(gallivm, 0); - LLVMValueRef ind1 = lp_build_const_int32(gallivm, 1); - LLVMValueRef ind2 = lp_build_const_int32(gallivm, 2); - LLVMValueRef ind3 = lp_build_const_int32(gallivm, 3); - - indices[0] = - indices[1] = lp_build_const_int32(gallivm, 0); - - out[0] = LLVMBuildLoad(builder, outputs[0][0], ""); /*x0 x1 x2 x3*/ - out[1] = LLVMBuildLoad(builder, outputs[0][1], ""); /*y0 y1 y2 y3*/ - out[2] = LLVMBuildLoad(builder, outputs[0][2], ""); /*z0 z1 z2 z3*/ - out[3] = LLVMBuildLoad(builder, outputs[0][3], ""); /*w0 w1 w2 w3*/ - - io0_ptr = LLVMBuildGEP(builder, io_ptr, &ind0, 1, ""); - io1_ptr = LLVMBuildGEP(builder, io_ptr, &ind1, 1, ""); - io2_ptr = LLVMBuildGEP(builder, io_ptr, &ind2, 1, ""); - io3_ptr = LLVMBuildGEP(builder, io_ptr, &ind3, 1, ""); - - /* FIXME: this needs updating for clip vertex support */ - if (!pre_clip_pos) { - clip_ptr0 = draw_jit_header_clip(gallivm, io0_ptr); - clip_ptr1 = draw_jit_header_clip(gallivm, io1_ptr); - clip_ptr2 = draw_jit_header_clip(gallivm, io2_ptr); - clip_ptr3 = draw_jit_header_clip(gallivm, io3_ptr); - } else { - clip_ptr0 = draw_jit_header_pre_clip_pos(gallivm, io0_ptr); - clip_ptr1 = draw_jit_header_pre_clip_pos(gallivm, io1_ptr); - clip_ptr2 = draw_jit_header_pre_clip_pos(gallivm, io2_ptr); - clip_ptr3 = draw_jit_header_pre_clip_pos(gallivm, io3_ptr); - } - - for (i = 0; i<4; i++) { - clip0_ptr = LLVMBuildGEP(builder, clip_ptr0, indices, 2, ""); /* x0 */ - clip1_ptr = LLVMBuildGEP(builder, clip_ptr1, indices, 2, ""); /* x1 */ - clip2_ptr = LLVMBuildGEP(builder, clip_ptr2, indices, 2, ""); /* x2 */ - clip3_ptr = LLVMBuildGEP(builder, clip_ptr3, indices, 2, ""); /* x3 */ - - out0elem = LLVMBuildExtractElement(builder, out[i], ind0, ""); /* x0 */ - out1elem = LLVMBuildExtractElement(builder, out[i], ind1, ""); /* x1 */ - out2elem = LLVMBuildExtractElement(builder, out[i], ind2, ""); /* x2 */ - out3elem = LLVMBuildExtractElement(builder, out[i], ind3, ""); /* x3 */ - - LLVMBuildStore(builder, out0elem, clip0_ptr); - LLVMBuildStore(builder, out1elem, clip1_ptr); - LLVMBuildStore(builder, out2elem, clip2_ptr); - LLVMBuildStore(builder, out3elem, clip3_ptr); - - indices[1]= LLVMBuildAdd(builder, indices[1], ind1, ""); - } - -} - - -/** - * Equivalent of _mm_set1_ps(a) - */ -static LLVMValueRef -vec4f_from_scalar(struct gallivm_state *gallivm, - LLVMValueRef a, - const char *name) -{ - LLVMTypeRef float_type = LLVMFloatTypeInContext(gallivm->context); - LLVMValueRef res = LLVMGetUndef(LLVMVectorType(float_type, 4)); - int i; - - for (i = 0; i < 4; ++i) { - LLVMValueRef index = lp_build_const_int32(gallivm, i); - res = LLVMBuildInsertElement(gallivm->builder, res, a, - index, i == 3 ? name : ""); - } - - return res; -} - - -/** - * Transforms the outputs for viewport mapping - */ -static void -generate_viewport(struct draw_llvm *llvm, - LLVMBuilderRef builder, - LLVMValueRef (*outputs)[NUM_CHANNELS], - LLVMValueRef context_ptr) -{ - int i; - struct gallivm_state *gallivm = llvm->gallivm; - struct lp_type f32_type = lp_type_float_vec(32); - LLVMValueRef out3 = LLVMBuildLoad(builder, outputs[0][3], ""); /*w0 w1 w2 w3*/ - LLVMValueRef const1 = lp_build_const_vec(gallivm, f32_type, 1.0); /*1.0 1.0 1.0 1.0*/ - LLVMValueRef vp_ptr = draw_jit_context_viewport(gallivm, context_ptr); - - /* for 1/w convention*/ - out3 = LLVMBuildFDiv(builder, const1, out3, ""); - LLVMBuildStore(builder, out3, outputs[0][3]); - - /* Viewport Mapping */ - for (i=0; i<3; i++) { - LLVMValueRef out = LLVMBuildLoad(builder, outputs[0][i], ""); /*x0 x1 x2 x3*/ - LLVMValueRef scale; - LLVMValueRef trans; - LLVMValueRef scale_i; - LLVMValueRef trans_i; - LLVMValueRef index; - - index = lp_build_const_int32(gallivm, i); - scale_i = LLVMBuildGEP(builder, vp_ptr, &index, 1, ""); - - index = lp_build_const_int32(gallivm, i+4); - trans_i = LLVMBuildGEP(builder, vp_ptr, &index, 1, ""); - - scale = vec4f_from_scalar(gallivm, LLVMBuildLoad(builder, scale_i, ""), "scale"); - trans = vec4f_from_scalar(gallivm, LLVMBuildLoad(builder, trans_i, ""), "trans"); - - /* divide by w */ - out = LLVMBuildFMul(builder, out, out3, ""); - /* mult by scale */ - out = LLVMBuildFMul(builder, out, scale, ""); - /* add translation */ - out = LLVMBuildFAdd(builder, out, trans, ""); - - /* store transformed outputs */ - LLVMBuildStore(builder, out, outputs[0][i]); - } - -} - - -/** - * Returns clipmask as 4xi32 bitmask for the 4 vertices - */ -static LLVMValueRef -generate_clipmask(struct gallivm_state *gallivm, - LLVMValueRef (*outputs)[NUM_CHANNELS], - boolean clip_xy, - boolean clip_z, - boolean clip_user, - boolean clip_halfz, - unsigned ucp_enable, - LLVMValueRef context_ptr) -{ - LLVMBuilderRef builder = gallivm->builder; - LLVMValueRef mask; /* stores the <4xi32> clipmasks */ - LLVMValueRef test, temp; - LLVMValueRef zero, shift; - LLVMValueRef pos_x, pos_y, pos_z, pos_w; - LLVMValueRef plane1, planes, plane_ptr, sum; - struct lp_type f32_type = lp_type_float_vec(32); - - mask = lp_build_const_int_vec(gallivm, lp_type_int_vec(32), 0); - temp = lp_build_const_int_vec(gallivm, lp_type_int_vec(32), 0); - zero = lp_build_const_vec(gallivm, f32_type, 0); /* 0.0f 0.0f 0.0f 0.0f */ - shift = lp_build_const_int_vec(gallivm, lp_type_int_vec(32), 1); /* 1 1 1 1 */ - - /* Assuming position stored at output[0] */ - pos_x = LLVMBuildLoad(builder, outputs[0][0], ""); /*x0 x1 x2 x3*/ - pos_y = LLVMBuildLoad(builder, outputs[0][1], ""); /*y0 y1 y2 y3*/ - pos_z = LLVMBuildLoad(builder, outputs[0][2], ""); /*z0 z1 z2 z3*/ - pos_w = LLVMBuildLoad(builder, outputs[0][3], ""); /*w0 w1 w2 w3*/ - - /* Cliptest, for hardwired planes */ - if (clip_xy) { - /* plane 1 */ - test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, pos_x , pos_w); - temp = shift; - test = LLVMBuildAnd(builder, test, temp, ""); - mask = test; - - /* plane 2 */ - test = LLVMBuildFAdd(builder, pos_x, pos_w, ""); - test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, zero, test); - temp = LLVMBuildShl(builder, temp, shift, ""); - test = LLVMBuildAnd(builder, test, temp, ""); - mask = LLVMBuildOr(builder, mask, test, ""); - - /* plane 3 */ - test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, pos_y, pos_w); - temp = LLVMBuildShl(builder, temp, shift, ""); - test = LLVMBuildAnd(builder, test, temp, ""); - mask = LLVMBuildOr(builder, mask, test, ""); - - /* plane 4 */ - test = LLVMBuildFAdd(builder, pos_y, pos_w, ""); - test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, zero, test); - temp = LLVMBuildShl(builder, temp, shift, ""); - test = LLVMBuildAnd(builder, test, temp, ""); - mask = LLVMBuildOr(builder, mask, test, ""); - } - - if (clip_z) { - temp = lp_build_const_int_vec(gallivm, lp_type_int_vec(32), 16); - if (clip_halfz) { - /* plane 5 */ - test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, zero, pos_z); - test = LLVMBuildAnd(builder, test, temp, ""); - mask = LLVMBuildOr(builder, mask, test, ""); - } - else { - /* plane 5 */ - test = LLVMBuildFAdd(builder, pos_z, pos_w, ""); - test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, zero, test); - test = LLVMBuildAnd(builder, test, temp, ""); - mask = LLVMBuildOr(builder, mask, test, ""); - } - /* plane 6 */ - test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, pos_z, pos_w); - temp = LLVMBuildShl(builder, temp, shift, ""); - test = LLVMBuildAnd(builder, test, temp, ""); - mask = LLVMBuildOr(builder, mask, test, ""); - } - - if (clip_user) { - LLVMValueRef planes_ptr = draw_jit_context_planes(gallivm, context_ptr); - LLVMValueRef indices[3]; - - /* userclip planes */ - while (ucp_enable) { - unsigned plane_idx = ffs(ucp_enable)-1; - ucp_enable &= ~(1 << plane_idx); - plane_idx += 6; - - indices[0] = lp_build_const_int32(gallivm, 0); - indices[1] = lp_build_const_int32(gallivm, plane_idx); - - indices[2] = lp_build_const_int32(gallivm, 0); - plane_ptr = LLVMBuildGEP(builder, planes_ptr, indices, 3, ""); - plane1 = LLVMBuildLoad(builder, plane_ptr, "plane_x"); - planes = vec4f_from_scalar(gallivm, plane1, "plane4_x"); - sum = LLVMBuildFMul(builder, planes, pos_x, ""); - - indices[2] = lp_build_const_int32(gallivm, 1); - plane_ptr = LLVMBuildGEP(builder, planes_ptr, indices, 3, ""); - plane1 = LLVMBuildLoad(builder, plane_ptr, "plane_y"); - planes = vec4f_from_scalar(gallivm, plane1, "plane4_y"); - test = LLVMBuildFMul(builder, planes, pos_y, ""); - sum = LLVMBuildFAdd(builder, sum, test, ""); - - indices[2] = lp_build_const_int32(gallivm, 2); - plane_ptr = LLVMBuildGEP(builder, planes_ptr, indices, 3, ""); - plane1 = LLVMBuildLoad(builder, plane_ptr, "plane_z"); - planes = vec4f_from_scalar(gallivm, plane1, "plane4_z"); - test = LLVMBuildFMul(builder, planes, pos_z, ""); - sum = LLVMBuildFAdd(builder, sum, test, ""); - - indices[2] = lp_build_const_int32(gallivm, 3); - plane_ptr = LLVMBuildGEP(builder, planes_ptr, indices, 3, ""); - plane1 = LLVMBuildLoad(builder, plane_ptr, "plane_w"); - planes = vec4f_from_scalar(gallivm, plane1, "plane4_w"); - test = LLVMBuildFMul(builder, planes, pos_w, ""); - sum = LLVMBuildFAdd(builder, sum, test, ""); - - test = lp_build_compare(gallivm, f32_type, PIPE_FUNC_GREATER, zero, sum); - temp = lp_build_const_int_vec(gallivm, lp_type_int_vec(32), 1 << plane_idx); - test = LLVMBuildAnd(builder, test, temp, ""); - mask = LLVMBuildOr(builder, mask, test, ""); - } - } - return mask; -} - - -/** - * Returns boolean if any clipping has occurred - * Used zero/non-zero i32 value to represent boolean - */ -static void -clipmask_bool(struct gallivm_state *gallivm, - LLVMValueRef clipmask, - LLVMValueRef ret_ptr) -{ - LLVMBuilderRef builder = gallivm->builder; - LLVMValueRef ret = LLVMBuildLoad(builder, ret_ptr, ""); - LLVMValueRef temp; - int i; - - for (i=0; i<4; i++) { - temp = LLVMBuildExtractElement(builder, clipmask, - lp_build_const_int32(gallivm, i) , ""); - ret = LLVMBuildOr(builder, ret, temp, ""); - } - - LLVMBuildStore(builder, ret, ret_ptr); -} - - -static void -draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant, - boolean elts) -{ - struct gallivm_state *gallivm = llvm->gallivm; - LLVMContextRef context = gallivm->context; - LLVMTypeRef int32_type = LLVMInt32TypeInContext(context); - LLVMTypeRef arg_types[8]; - LLVMTypeRef func_type; - LLVMValueRef context_ptr; - LLVMBasicBlockRef block; - LLVMBuilderRef builder; - LLVMValueRef end, start; - LLVMValueRef count, fetch_elts, fetch_count; - LLVMValueRef stride, step, io_itr; - LLVMValueRef io_ptr, vbuffers_ptr, vb_ptr; - LLVMValueRef instance_id; - LLVMValueRef system_values_array; - LLVMValueRef zero = lp_build_const_int32(gallivm, 0); - LLVMValueRef one = lp_build_const_int32(gallivm, 1); - struct draw_context *draw = llvm->draw; - const struct tgsi_shader_info *vs_info = &draw->vs.vertex_shader->info; - unsigned i, j; - struct lp_build_context bld; - struct lp_build_loop_state lp_loop; - const int max_vertices = 4; - LLVMValueRef outputs[PIPE_MAX_SHADER_OUTPUTS][NUM_CHANNELS]; - LLVMValueRef fetch_max; - void *code; - struct lp_build_sampler_soa *sampler = 0; - LLVMValueRef ret, ret_ptr; - const boolean bypass_viewport = variant->key.bypass_viewport; - const boolean enable_cliptest = variant->key.clip_xy || - variant->key.clip_z || - variant->key.clip_user; - LLVMValueRef variant_func; - - arg_types[0] = get_context_ptr_type(llvm); /* context */ - arg_types[1] = get_vertex_header_ptr_type(llvm); /* vertex_header */ - arg_types[2] = get_buffer_ptr_type(llvm); /* vbuffers */ - if (elts) - arg_types[3] = LLVMPointerType(int32_type, 0);/* fetch_elts * */ - else - arg_types[3] = int32_type; /* start */ - arg_types[4] = int32_type; /* fetch_count / count */ - arg_types[5] = int32_type; /* stride */ - arg_types[6] = get_vb_ptr_type(llvm); /* pipe_vertex_buffer's */ - arg_types[7] = int32_type; /* instance_id */ - - func_type = LLVMFunctionType(int32_type, arg_types, Elements(arg_types), 0); - - variant_func = LLVMAddFunction(gallivm->module, - elts ? "draw_llvm_shader_elts" : "draw_llvm_shader", - func_type); - - if (elts) - variant->function_elts = variant_func; - else - variant->function = variant_func; - - LLVMSetFunctionCallConv(variant_func, LLVMCCallConv); - for (i = 0; i < Elements(arg_types); ++i) - if (LLVMGetTypeKind(arg_types[i]) == LLVMPointerTypeKind) - LLVMAddAttribute(LLVMGetParam(variant_func, i), - LLVMNoAliasAttribute); - - context_ptr = LLVMGetParam(variant_func, 0); - io_ptr = LLVMGetParam(variant_func, 1); - vbuffers_ptr = LLVMGetParam(variant_func, 2); - stride = LLVMGetParam(variant_func, 5); - vb_ptr = LLVMGetParam(variant_func, 6); - instance_id = LLVMGetParam(variant_func, 7); - - lp_build_name(context_ptr, "context"); - lp_build_name(io_ptr, "io"); - lp_build_name(vbuffers_ptr, "vbuffers"); - lp_build_name(stride, "stride"); - lp_build_name(vb_ptr, "vb"); - lp_build_name(instance_id, "instance_id"); - - if (elts) { - fetch_elts = LLVMGetParam(variant_func, 3); - fetch_count = LLVMGetParam(variant_func, 4); - lp_build_name(fetch_elts, "fetch_elts"); - lp_build_name(fetch_count, "fetch_count"); - start = count = NULL; - } - else { - start = LLVMGetParam(variant_func, 3); - count = LLVMGetParam(variant_func, 4); - lp_build_name(start, "start"); - lp_build_name(count, "count"); - fetch_elts = fetch_count = NULL; - } - - /* - * Function body - */ - - block = LLVMAppendBasicBlockInContext(gallivm->context, variant_func, "entry"); - builder = gallivm->builder; - LLVMPositionBuilderAtEnd(builder, block); - - lp_build_context_init(&bld, gallivm, lp_type_int(32)); - - system_values_array = lp_build_system_values_array(gallivm, vs_info, - instance_id, NULL); - - /* function will return non-zero i32 value if any clipped vertices */ - ret_ptr = lp_build_alloca(gallivm, int32_type, ""); - LLVMBuildStore(builder, zero, ret_ptr); - - /* code generated texture sampling */ - sampler = draw_llvm_sampler_soa_create( - draw_llvm_variant_key_samplers(&variant->key), - context_ptr); - - if (elts) { - start = zero; - end = fetch_count; - } - else { - end = lp_build_add(&bld, start, count); - } - - step = lp_build_const_int32(gallivm, max_vertices); - - fetch_max = LLVMBuildSub(builder, end, one, "fetch_max"); - - lp_build_loop_begin(&lp_loop, gallivm, start); - { - LLVMValueRef inputs[PIPE_MAX_SHADER_INPUTS][NUM_CHANNELS]; - LLVMValueRef aos_attribs[PIPE_MAX_SHADER_INPUTS][NUM_CHANNELS] = { { 0 } }; - LLVMValueRef io; - LLVMValueRef clipmask; /* holds the clipmask value */ - const LLVMValueRef (*ptr_aos)[NUM_CHANNELS]; - - if (elts) - io_itr = lp_loop.counter; - else - io_itr = LLVMBuildSub(builder, lp_loop.counter, start, ""); - - io = LLVMBuildGEP(builder, io_ptr, &io_itr, 1, ""); -#if DEBUG_STORE - lp_build_printf(builder, " --- io %d = %p, loop counter %d\n", - io_itr, io, lp_loop.counter); -#endif - for (i = 0; i < NUM_CHANNELS; ++i) { - LLVMValueRef true_index = - LLVMBuildAdd(builder, - lp_loop.counter, - lp_build_const_int32(gallivm, i), ""); - - /* make sure we're not out of bounds which can happen - * if fetch_count % 4 != 0, because on the last iteration - * a few of the 4 vertex fetches will be out of bounds */ - true_index = lp_build_min(&bld, true_index, fetch_max); - - if (elts) { - LLVMValueRef fetch_ptr; - fetch_ptr = LLVMBuildGEP(builder, fetch_elts, - &true_index, 1, ""); - true_index = LLVMBuildLoad(builder, fetch_ptr, "fetch_elt"); - } - - for (j = 0; j < draw->pt.nr_vertex_elements; ++j) { - struct pipe_vertex_element *velem = &draw->pt.vertex_element[j]; - LLVMValueRef vb_index = - lp_build_const_int32(gallivm, velem->vertex_buffer_index); - LLVMValueRef vb = LLVMBuildGEP(builder, vb_ptr, &vb_index, 1, ""); - generate_fetch(gallivm, vbuffers_ptr, - &aos_attribs[j][i], velem, vb, true_index, - instance_id); - } - } - convert_to_soa(gallivm, aos_attribs, inputs, - draw->pt.nr_vertex_elements); - - ptr_aos = (const LLVMValueRef (*)[NUM_CHANNELS]) inputs; - generate_vs(llvm, - builder, - outputs, - ptr_aos, - system_values_array, - context_ptr, - sampler, - variant->key.clamp_vertex_color); - - /* store original positions in clip before further manipulation */ - store_clip(gallivm, io, outputs, 0); - store_clip(gallivm, io, outputs, 1); - - /* do cliptest */ - if (enable_cliptest) { - /* allocate clipmask, assign it integer type */ - clipmask = generate_clipmask(gallivm, outputs, - variant->key.clip_xy, - variant->key.clip_z, - variant->key.clip_user, - variant->key.clip_halfz, - variant->key.ucp_enable, - context_ptr); - /* return clipping boolean value for function */ - clipmask_bool(gallivm, clipmask, ret_ptr); - } - else { - clipmask = lp_build_const_int_vec(gallivm, lp_type_int_vec(32), 0); - } - - /* do viewport mapping */ - if (!bypass_viewport) { - generate_viewport(llvm, builder, outputs, context_ptr); - } - - /* store clipmask in vertex header, - * original positions in clip - * and transformed positions in data - */ - convert_to_aos(gallivm, io, outputs, clipmask, - vs_info->num_outputs, max_vertices); - } - - lp_build_loop_end_cond(&lp_loop, end, step, LLVMIntUGE); - - sampler->destroy(sampler); - - ret = LLVMBuildLoad(builder, ret_ptr, ""); - LLVMBuildRet(builder, ret); - - /* - * Translate the LLVM IR into machine code. - */ -#ifdef DEBUG - if (LLVMVerifyFunction(variant_func, LLVMPrintMessageAction)) { - lp_debug_dump_value(variant_func); - assert(0); - } -#endif - - LLVMRunFunctionPassManager(gallivm->passmgr, variant_func); - - if (gallivm_debug & GALLIVM_DEBUG_IR) { - lp_debug_dump_value(variant_func); - debug_printf("\n"); - } - - code = LLVMGetPointerToGlobal(gallivm->engine, variant_func); - if (elts) - variant->jit_func_elts = (draw_jit_vert_func_elts) pointer_to_func(code); - else - variant->jit_func = (draw_jit_vert_func) pointer_to_func(code); - - if (gallivm_debug & GALLIVM_DEBUG_ASM) { - lp_disassemble(code); - } - lp_func_delete_body(variant_func); -} - - -struct draw_llvm_variant_key * -draw_llvm_make_variant_key(struct draw_llvm *llvm, char *store) -{ - unsigned i; - struct draw_llvm_variant_key *key; - struct lp_sampler_static_state *sampler; - - key = (struct draw_llvm_variant_key *)store; - - key->clamp_vertex_color = llvm->draw->rasterizer->clamp_vertex_color; /**/ - - /* Presumably all variants of the shader should have the same - * number of vertex elements - ie the number of shader inputs. - */ - key->nr_vertex_elements = llvm->draw->pt.nr_vertex_elements; - - /* will have to rig this up properly later */ - key->clip_xy = llvm->draw->clip_xy; - key->clip_z = llvm->draw->clip_z; - key->clip_user = llvm->draw->clip_user; - key->bypass_viewport = llvm->draw->identity_viewport; - key->clip_halfz = !llvm->draw->rasterizer->gl_rasterization_rules; - key->need_edgeflags = (llvm->draw->vs.edgeflag_output ? TRUE : FALSE); - key->ucp_enable = llvm->draw->rasterizer->clip_plane_enable; - key->pad = 0; - - /* All variants of this shader will have the same value for - * nr_samplers. Not yet trying to compact away holes in the - * sampler array. - */ - key->nr_samplers = llvm->draw->vs.vertex_shader->info.file_max[TGSI_FILE_SAMPLER] + 1; - - sampler = draw_llvm_variant_key_samplers(key); - - memcpy(key->vertex_element, - llvm->draw->pt.vertex_element, - sizeof(struct pipe_vertex_element) * key->nr_vertex_elements); - - memset(sampler, 0, key->nr_samplers * sizeof *sampler); - - for (i = 0 ; i < key->nr_samplers; i++) { - lp_sampler_static_state(&sampler[i], - llvm->draw->sampler_views[i], - llvm->draw->samplers[i]); - } - - return key; -} - - -void -draw_llvm_set_mapped_texture(struct draw_context *draw, - unsigned sampler_idx, - uint32_t width, uint32_t height, uint32_t depth, - uint32_t first_level, uint32_t last_level, - uint32_t row_stride[PIPE_MAX_TEXTURE_LEVELS], - uint32_t img_stride[PIPE_MAX_TEXTURE_LEVELS], - const void *data[PIPE_MAX_TEXTURE_LEVELS]) -{ - unsigned j; - struct draw_jit_texture *jit_tex; - - assert(sampler_idx < PIPE_MAX_VERTEX_SAMPLERS); - - jit_tex = &draw->llvm->jit_context.textures[sampler_idx]; - - jit_tex->width = width; - jit_tex->height = height; - jit_tex->depth = depth; - jit_tex->first_level = first_level; - jit_tex->last_level = last_level; - - for (j = first_level; j <= last_level; j++) { - jit_tex->data[j] = data[j]; - jit_tex->row_stride[j] = row_stride[j]; - jit_tex->img_stride[j] = img_stride[j]; - } -} - - -void -draw_llvm_set_sampler_state(struct draw_context *draw) -{ - unsigned i; - - for (i = 0; i < draw->num_samplers; i++) { - struct draw_jit_texture *jit_tex = &draw->llvm->jit_context.textures[i]; - - if (draw->samplers[i]) { - jit_tex->min_lod = draw->samplers[i]->min_lod; - jit_tex->max_lod = draw->samplers[i]->max_lod; - jit_tex->lod_bias = draw->samplers[i]->lod_bias; - COPY_4V(jit_tex->border_color, draw->samplers[i]->border_color.f); - } - } -} - - -void -draw_llvm_destroy_variant(struct draw_llvm_variant *variant) -{ - struct draw_llvm *llvm = variant->llvm; - - if (variant->function_elts) { - LLVMFreeMachineCodeForFunction(llvm->gallivm->engine, - variant->function_elts); - LLVMDeleteFunction(variant->function_elts); - } - - if (variant->function) { - LLVMFreeMachineCodeForFunction(llvm->gallivm->engine, - variant->function); - LLVMDeleteFunction(variant->function); - } - - remove_from_list(&variant->list_item_local); - variant->shader->variants_cached--; - remove_from_list(&variant->list_item_global); - llvm->nr_variants--; - FREE(variant); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_llvm.h b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_llvm.h deleted file mode 100644 index 31fc2db05bd..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_llvm.h +++ /dev/null @@ -1,310 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef DRAW_LLVM_H -#define DRAW_LLVM_H - -#include "draw/draw_private.h" - -#include "draw/draw_vs.h" -#include "gallivm/lp_bld_sample.h" - -#include "pipe/p_context.h" -#include "util/u_simple_list.h" - -#include -#include -#include -#include - - -struct draw_llvm; -struct llvm_vertex_shader; - -struct draw_jit_texture -{ - uint32_t width; - uint32_t height; - uint32_t depth; - uint32_t first_level; - uint32_t last_level; - uint32_t row_stride[PIPE_MAX_TEXTURE_LEVELS]; - uint32_t img_stride[PIPE_MAX_TEXTURE_LEVELS]; - const void *data[PIPE_MAX_TEXTURE_LEVELS]; - float min_lod; - float max_lod; - float lod_bias; - float border_color[4]; -}; - -enum { - DRAW_JIT_TEXTURE_WIDTH = 0, - DRAW_JIT_TEXTURE_HEIGHT, - DRAW_JIT_TEXTURE_DEPTH, - DRAW_JIT_TEXTURE_FIRST_LEVEL, - DRAW_JIT_TEXTURE_LAST_LEVEL, - DRAW_JIT_TEXTURE_ROW_STRIDE, - DRAW_JIT_TEXTURE_IMG_STRIDE, - DRAW_JIT_TEXTURE_DATA, - DRAW_JIT_TEXTURE_MIN_LOD, - DRAW_JIT_TEXTURE_MAX_LOD, - DRAW_JIT_TEXTURE_LOD_BIAS, - DRAW_JIT_TEXTURE_BORDER_COLOR, - DRAW_JIT_TEXTURE_NUM_FIELDS /* number of fields above */ -}; - -enum { - DRAW_JIT_VERTEX_VERTEX_ID = 0, - DRAW_JIT_VERTEX_CLIP, - DRAW_JIT_VERTEX_PRE_CLIP_POS, - DRAW_JIT_VERTEX_DATA -}; - -/** - * This structure is passed directly to the generated vertex shader. - * - * It contains the derived state. - * - * Changes here must be reflected in the draw_jit_context_* macros. - * Changes to the ordering should be avoided. - * - * Only use types with a clear size and padding here, in particular prefer the - * stdint.h types to the basic integer types. - */ -struct draw_jit_context -{ - const float *vs_constants; - const float *gs_constants; - float (*planes) [DRAW_TOTAL_CLIP_PLANES][4]; - float *viewport; - - struct draw_jit_texture textures[PIPE_MAX_VERTEX_SAMPLERS]; -}; - - -#define draw_jit_context_vs_constants(_gallivm, _ptr) \ - lp_build_struct_get(_gallivm, _ptr, 0, "vs_constants") - -#define draw_jit_context_gs_constants(_gallivm, _ptr) \ - lp_build_struct_get(_gallivm, _ptr, 1, "gs_constants") - -#define draw_jit_context_planes(_gallivm, _ptr) \ - lp_build_struct_get(_gallivm, _ptr, 2, "planes") - -#define draw_jit_context_viewport(_gallivm, _ptr) \ - lp_build_struct_get(_gallivm, _ptr, 3, "viewport") - -#define DRAW_JIT_CTX_TEXTURES 4 - -#define draw_jit_context_textures(_gallivm, _ptr) \ - lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_JIT_CTX_TEXTURES, "textures") - -#define draw_jit_header_id(_gallivm, _ptr) \ - lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_JIT_VERTEX_VERTEX_ID, "id") - -#define draw_jit_header_clip(_gallivm, _ptr) \ - lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_JIT_VERTEX_CLIP, "clip") - -#define draw_jit_header_pre_clip_pos(_gallivm, _ptr) \ - lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_JIT_VERTEX_PRE_CLIP_POS, "pre_clip_pos") - -#define draw_jit_header_data(_gallivm, _ptr) \ - lp_build_struct_get_ptr(_gallivm, _ptr, DRAW_JIT_VERTEX_DATA, "data") - - -#define draw_jit_vbuffer_stride(_gallivm, _ptr) \ - lp_build_struct_get(_gallivm, _ptr, 0, "stride") - -#define draw_jit_vbuffer_offset(_gallivm, _ptr) \ - lp_build_struct_get(_gallivm, _ptr, 1, "buffer_offset") - - -typedef int -(*draw_jit_vert_func)(struct draw_jit_context *context, - struct vertex_header *io, - const char *vbuffers[PIPE_MAX_ATTRIBS], - unsigned start, - unsigned count, - unsigned stride, - struct pipe_vertex_buffer *vertex_buffers, - unsigned instance_id); - - -typedef int -(*draw_jit_vert_func_elts)(struct draw_jit_context *context, - struct vertex_header *io, - const char *vbuffers[PIPE_MAX_ATTRIBS], - const unsigned *fetch_elts, - unsigned fetch_count, - unsigned stride, - struct pipe_vertex_buffer *vertex_buffers, - unsigned instance_id); - -struct draw_llvm_variant_key -{ - unsigned nr_vertex_elements:8; - unsigned nr_samplers:8; - unsigned clamp_vertex_color:1; - unsigned clip_xy:1; - unsigned clip_z:1; - unsigned clip_user:1; - unsigned clip_halfz:1; - unsigned bypass_viewport:1; - unsigned need_edgeflags:1; - unsigned ucp_enable:PIPE_MAX_CLIP_PLANES; - unsigned pad:9-PIPE_MAX_CLIP_PLANES; - - /* Variable number of vertex elements: - */ - struct pipe_vertex_element vertex_element[1]; - - /* Followed by variable number of samplers: - */ -/* struct lp_sampler_static_state sampler; */ -}; - -#define DRAW_LLVM_MAX_VARIANT_KEY_SIZE \ - (sizeof(struct draw_llvm_variant_key) + \ - PIPE_MAX_VERTEX_SAMPLERS * sizeof(struct lp_sampler_static_state) + \ - (PIPE_MAX_ATTRIBS-1) * sizeof(struct pipe_vertex_element)) - - -static INLINE size_t -draw_llvm_variant_key_size(unsigned nr_vertex_elements, - unsigned nr_samplers) -{ - return (sizeof(struct draw_llvm_variant_key) + - nr_samplers * sizeof(struct lp_sampler_static_state) + - (nr_vertex_elements - 1) * sizeof(struct pipe_vertex_element)); -} - - -static INLINE struct lp_sampler_static_state * -draw_llvm_variant_key_samplers(struct draw_llvm_variant_key *key) -{ - return (struct lp_sampler_static_state *) - &key->vertex_element[key->nr_vertex_elements]; -} - - - -struct draw_llvm_variant_list_item -{ - struct draw_llvm_variant *base; - struct draw_llvm_variant_list_item *next, *prev; -}; - -struct draw_llvm_variant -{ - LLVMValueRef function; - LLVMValueRef function_elts; - draw_jit_vert_func jit_func; - draw_jit_vert_func_elts jit_func_elts; - - struct llvm_vertex_shader *shader; - - struct draw_llvm *llvm; - struct draw_llvm_variant_list_item list_item_global; - struct draw_llvm_variant_list_item list_item_local; - - /* key is variable-sized, must be last */ - struct draw_llvm_variant_key key; -}; - -struct llvm_vertex_shader { - struct draw_vertex_shader base; - - unsigned variant_key_size; - struct draw_llvm_variant_list_item variants; - unsigned variants_created; - unsigned variants_cached; -}; - -struct draw_llvm { - struct draw_context *draw; - - struct draw_jit_context jit_context; - - struct gallivm_state *gallivm; - - struct draw_llvm_variant_list_item vs_variants_list; - int nr_variants; - - /* LLVM JIT builder types */ - LLVMTypeRef context_ptr_type; - LLVMTypeRef buffer_ptr_type; - LLVMTypeRef vb_ptr_type; - LLVMTypeRef vertex_header_ptr_type; -}; - - -static INLINE struct llvm_vertex_shader * -llvm_vertex_shader(struct draw_vertex_shader *vs) -{ - return (struct llvm_vertex_shader *)vs; -} - - -struct draw_llvm * -draw_llvm_create(struct draw_context *draw, struct gallivm_state *gallivm); - -void -draw_llvm_destroy(struct draw_llvm *llvm); - -struct draw_llvm_variant * -draw_llvm_create_variant(struct draw_llvm *llvm, - unsigned num_vertex_header_attribs, - const struct draw_llvm_variant_key *key); - -void -draw_llvm_destroy_variant(struct draw_llvm_variant *variant); - -struct draw_llvm_variant_key * -draw_llvm_make_variant_key(struct draw_llvm *llvm, char *store); - -LLVMValueRef -draw_llvm_translate_from(struct gallivm_state *gallivm, - LLVMValueRef vbuffer, - enum pipe_format from_format); - -struct lp_build_sampler_soa * -draw_llvm_sampler_soa_create(const struct lp_sampler_static_state *static_state, - LLVMValueRef context_ptr); - -void -draw_llvm_set_sampler_state(struct draw_context *draw); - -void -draw_llvm_set_mapped_texture(struct draw_context *draw, - unsigned sampler_idx, - uint32_t width, uint32_t height, uint32_t depth, - uint32_t first_level, uint32_t last_level, - uint32_t row_stride[PIPE_MAX_TEXTURE_LEVELS], - uint32_t img_stride[PIPE_MAX_TEXTURE_LEVELS], - const void *data[PIPE_MAX_TEXTURE_LEVELS]); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_llvm_sample.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_llvm_sample.c deleted file mode 100644 index 8af34617353..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_llvm_sample.c +++ /dev/null @@ -1,227 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * Texture sampling code generation - * @author Jose Fonseca - */ - -#include "pipe/p_defines.h" -#include "pipe/p_shader_tokens.h" -#include "gallivm/lp_bld_const.h" -#include "gallivm/lp_bld_debug.h" -#include "gallivm/lp_bld_type.h" -#include "gallivm/lp_bld_sample.h" -#include "gallivm/lp_bld_tgsi.h" - - -#include "util/u_debug.h" -#include "util/u_memory.h" -#include "util/u_pointer.h" -#include "util/u_string.h" - -#include "draw_llvm.h" - - -/** - * This provides the bridge between the sampler state store in - * lp_jit_context and lp_jit_texture and the sampler code - * generator. It provides the texture layout information required by - * the texture sampler code generator in terms of the state stored in - * lp_jit_context and lp_jit_texture in runtime. - */ -struct draw_llvm_sampler_dynamic_state -{ - struct lp_sampler_dynamic_state base; - - const struct lp_sampler_static_state *static_state; - - LLVMValueRef context_ptr; -}; - - -/** - * This is the bridge between our sampler and the TGSI translator. - */ -struct draw_llvm_sampler_soa -{ - struct lp_build_sampler_soa base; - - struct draw_llvm_sampler_dynamic_state dynamic_state; -}; - - -/** - * Fetch the specified member of the lp_jit_texture structure. - * \param emit_load if TRUE, emit the LLVM load instruction to actually - * fetch the field's value. Otherwise, just emit the - * GEP code to address the field. - * - * @sa http://llvm.org/docs/GetElementPtr.html - */ -static LLVMValueRef -draw_llvm_texture_member(const struct lp_sampler_dynamic_state *base, - struct gallivm_state *gallivm, - unsigned unit, - unsigned member_index, - const char *member_name, - boolean emit_load) -{ - LLVMBuilderRef builder = gallivm->builder; - struct draw_llvm_sampler_dynamic_state *state = - (struct draw_llvm_sampler_dynamic_state *)base; - LLVMValueRef indices[4]; - LLVMValueRef ptr; - LLVMValueRef res; - - debug_assert(unit < PIPE_MAX_VERTEX_SAMPLERS); - - /* context[0] */ - indices[0] = lp_build_const_int32(gallivm, 0); - /* context[0].textures */ - indices[1] = lp_build_const_int32(gallivm, DRAW_JIT_CTX_TEXTURES); - /* context[0].textures[unit] */ - indices[2] = lp_build_const_int32(gallivm, unit); - /* context[0].textures[unit].member */ - indices[3] = lp_build_const_int32(gallivm, member_index); - - ptr = LLVMBuildGEP(builder, state->context_ptr, indices, Elements(indices), ""); - - if (emit_load) - res = LLVMBuildLoad(builder, ptr, ""); - else - res = ptr; - - lp_build_name(res, "context.texture%u.%s", unit, member_name); - - return res; -} - - -/** - * Helper macro to instantiate the functions that generate the code to - * fetch the members of lp_jit_texture to fulfill the sampler code - * generator requests. - * - * This complexity is the price we have to pay to keep the texture - * sampler code generator a reusable module without dependencies to - * llvmpipe internals. - */ -#define DRAW_LLVM_TEXTURE_MEMBER(_name, _index, _emit_load) \ - static LLVMValueRef \ - draw_llvm_texture_##_name( const struct lp_sampler_dynamic_state *base, \ - struct gallivm_state *gallivm, \ - unsigned unit) \ - { \ - return draw_llvm_texture_member(base, gallivm, unit, _index, #_name, _emit_load ); \ - } - - -DRAW_LLVM_TEXTURE_MEMBER(width, DRAW_JIT_TEXTURE_WIDTH, TRUE) -DRAW_LLVM_TEXTURE_MEMBER(height, DRAW_JIT_TEXTURE_HEIGHT, TRUE) -DRAW_LLVM_TEXTURE_MEMBER(depth, DRAW_JIT_TEXTURE_DEPTH, TRUE) -DRAW_LLVM_TEXTURE_MEMBER(first_level,DRAW_JIT_TEXTURE_FIRST_LEVEL, TRUE) -DRAW_LLVM_TEXTURE_MEMBER(last_level, DRAW_JIT_TEXTURE_LAST_LEVEL, TRUE) -DRAW_LLVM_TEXTURE_MEMBER(row_stride, DRAW_JIT_TEXTURE_ROW_STRIDE, FALSE) -DRAW_LLVM_TEXTURE_MEMBER(img_stride, DRAW_JIT_TEXTURE_IMG_STRIDE, FALSE) -DRAW_LLVM_TEXTURE_MEMBER(data_ptr, DRAW_JIT_TEXTURE_DATA, FALSE) -DRAW_LLVM_TEXTURE_MEMBER(min_lod, DRAW_JIT_TEXTURE_MIN_LOD, TRUE) -DRAW_LLVM_TEXTURE_MEMBER(max_lod, DRAW_JIT_TEXTURE_MAX_LOD, TRUE) -DRAW_LLVM_TEXTURE_MEMBER(lod_bias, DRAW_JIT_TEXTURE_LOD_BIAS, TRUE) -DRAW_LLVM_TEXTURE_MEMBER(border_color, DRAW_JIT_TEXTURE_BORDER_COLOR, FALSE) - - -static void -draw_llvm_sampler_soa_destroy(struct lp_build_sampler_soa *sampler) -{ - FREE(sampler); -} - - -/** - * Fetch filtered values from texture. - * The 'texel' parameter returns four vectors corresponding to R, G, B, A. - */ -static void -draw_llvm_sampler_soa_emit_fetch_texel(const struct lp_build_sampler_soa *base, - struct gallivm_state *gallivm, - struct lp_type type, - unsigned unit, - unsigned num_coords, - const LLVMValueRef *coords, - const LLVMValueRef *ddx, - const LLVMValueRef *ddy, - LLVMValueRef lod_bias, /* optional */ - LLVMValueRef explicit_lod, /* optional */ - LLVMValueRef *texel) -{ - struct draw_llvm_sampler_soa *sampler = (struct draw_llvm_sampler_soa *)base; - - assert(unit < PIPE_MAX_VERTEX_SAMPLERS); - - lp_build_sample_soa(gallivm, - &sampler->dynamic_state.static_state[unit], - &sampler->dynamic_state.base, - type, - unit, - num_coords, coords, - ddx, ddy, - lod_bias, explicit_lod, - texel); -} - - -struct lp_build_sampler_soa * -draw_llvm_sampler_soa_create(const struct lp_sampler_static_state *static_state, - LLVMValueRef context_ptr) -{ - struct draw_llvm_sampler_soa *sampler; - - sampler = CALLOC_STRUCT(draw_llvm_sampler_soa); - if(!sampler) - return NULL; - - sampler->base.destroy = draw_llvm_sampler_soa_destroy; - sampler->base.emit_fetch_texel = draw_llvm_sampler_soa_emit_fetch_texel; - sampler->dynamic_state.base.width = draw_llvm_texture_width; - sampler->dynamic_state.base.height = draw_llvm_texture_height; - sampler->dynamic_state.base.depth = draw_llvm_texture_depth; - sampler->dynamic_state.base.first_level = draw_llvm_texture_first_level; - sampler->dynamic_state.base.last_level = draw_llvm_texture_last_level; - sampler->dynamic_state.base.row_stride = draw_llvm_texture_row_stride; - sampler->dynamic_state.base.img_stride = draw_llvm_texture_img_stride; - sampler->dynamic_state.base.data_ptr = draw_llvm_texture_data_ptr; - sampler->dynamic_state.base.min_lod = draw_llvm_texture_min_lod; - sampler->dynamic_state.base.max_lod = draw_llvm_texture_max_lod; - sampler->dynamic_state.base.lod_bias = draw_llvm_texture_lod_bias; - sampler->dynamic_state.base.border_color = draw_llvm_texture_border_color; - sampler->dynamic_state.static_state = static_state; - sampler->dynamic_state.context_ptr = context_ptr; - - return &sampler->base; -} - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_llvm_translate.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_llvm_translate.c deleted file mode 100644 index 77d0af74733..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_llvm_translate.c +++ /dev/null @@ -1,506 +0,0 @@ -#include "draw_private.h" -#include "draw_context.h" - -#include "draw_llvm.h" - -#include "gallivm/lp_bld_const.h" -#include "gallivm/lp_bld_struct.h" -#include "gallivm/lp_bld_format.h" -#include "gallivm/lp_bld_debug.h" -#include "gallivm/lp_bld_type.h" - -#include "util/u_memory.h" -#include "util/u_format.h" -#include "pipe/p_state.h" - - -#define DRAW_DBG 0 - -static LLVMValueRef -from_64_float(struct gallivm_state *gallivm, LLVMValueRef val) -{ - LLVMValueRef bc = LLVMBuildBitCast(gallivm->builder, val, - LLVMPointerType(LLVMDoubleTypeInContext(gallivm->context), 0) , ""); - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, bc, ""); - return LLVMBuildFPTrunc(gallivm->builder, l, LLVMFloatTypeInContext(gallivm->context), ""); -} - -static LLVMValueRef -from_32_float(struct gallivm_state *gallivm, LLVMValueRef val) -{ - LLVMValueRef bc = LLVMBuildBitCast(gallivm->builder, val, - LLVMPointerType(LLVMFloatTypeInContext(gallivm->context), 0) , ""); - return LLVMBuildLoad(gallivm->builder, bc, ""); -} - -static INLINE LLVMValueRef -from_8_uscaled(struct gallivm_state *gallivm, LLVMValueRef val) -{ - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, val, ""); - return LLVMBuildUIToFP(gallivm->builder, l, LLVMFloatTypeInContext(gallivm->context), ""); -} - -static INLINE LLVMValueRef -from_16_uscaled(struct gallivm_state *gallivm, LLVMValueRef val) -{ - LLVMValueRef bc = LLVMBuildBitCast(gallivm->builder, val, - LLVMPointerType(LLVMIntTypeInContext(gallivm->context, 16), 0) , ""); - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, bc, ""); - return LLVMBuildUIToFP(gallivm->builder, l, LLVMFloatTypeInContext(gallivm->context), ""); -} - -static INLINE LLVMValueRef -from_32_uscaled(struct gallivm_state *gallivm, LLVMValueRef val) -{ - LLVMValueRef bc = LLVMBuildBitCast(gallivm->builder, val, - LLVMPointerType(LLVMIntTypeInContext(gallivm->context, 32), 0) , ""); - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, bc, ""); - return LLVMBuildUIToFP(gallivm->builder, l, LLVMFloatTypeInContext(gallivm->context), ""); -} - -static INLINE LLVMValueRef -from_8_sscaled(struct gallivm_state *gallivm, LLVMValueRef val) -{ - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, val, ""); - return LLVMBuildSIToFP(gallivm->builder, l, LLVMFloatTypeInContext(gallivm->context), ""); -} - -static INLINE LLVMValueRef -from_16_sscaled(struct gallivm_state *gallivm, LLVMValueRef val) -{ - LLVMValueRef bc = LLVMBuildBitCast(gallivm->builder, val, - LLVMPointerType(LLVMIntTypeInContext(gallivm->context, 16), 0) , ""); - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, bc, ""); - return LLVMBuildSIToFP(gallivm->builder, l, LLVMFloatTypeInContext(gallivm->context), ""); -} - -static INLINE LLVMValueRef -from_32_sscaled(struct gallivm_state *gallivm, LLVMValueRef val) -{ - LLVMValueRef bc = LLVMBuildBitCast(gallivm->builder, val, - LLVMPointerType(LLVMIntTypeInContext(gallivm->context, 32), 0) , ""); - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, bc, ""); - return LLVMBuildSIToFP(gallivm->builder, l, LLVMFloatTypeInContext(gallivm->context), ""); -} - - -static INLINE LLVMValueRef -from_8_unorm(struct gallivm_state *gallivm, LLVMValueRef val) -{ - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, val, ""); - LLVMValueRef uscaled = LLVMBuildUIToFP(gallivm->builder, l, LLVMFloatTypeInContext(gallivm->context), ""); - return LLVMBuildFDiv(gallivm->builder, uscaled, - lp_build_const_float(gallivm, 255.), ""); -} - -static INLINE LLVMValueRef -from_16_unorm(struct gallivm_state *gallivm, LLVMValueRef val) -{ - LLVMValueRef bc = LLVMBuildBitCast(gallivm->builder, val, - LLVMPointerType(LLVMIntTypeInContext(gallivm->context, 16), 0) , ""); - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, bc, ""); - LLVMValueRef uscaled = LLVMBuildUIToFP(gallivm->builder, l, LLVMFloatTypeInContext(gallivm->context), ""); - return LLVMBuildFDiv(gallivm->builder, uscaled, - lp_build_const_float(gallivm, 65535.), ""); -} - -static INLINE LLVMValueRef -from_32_unorm(struct gallivm_state *gallivm, LLVMValueRef val) -{ - LLVMValueRef bc = LLVMBuildBitCast(gallivm->builder, val, - LLVMPointerType(LLVMIntTypeInContext(gallivm->context, 32), 0) , ""); - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, bc, ""); - LLVMValueRef uscaled = LLVMBuildUIToFP(gallivm->builder, l, LLVMFloatTypeInContext(gallivm->context), ""); - - return LLVMBuildFDiv(gallivm->builder, uscaled, - lp_build_const_float(gallivm, 4294967295.), ""); -} - -static INLINE LLVMValueRef -from_8_snorm(struct gallivm_state *gallivm, LLVMValueRef val) -{ - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, val, ""); - LLVMValueRef uscaled = LLVMBuildSIToFP(gallivm->builder, l, LLVMFloatTypeInContext(gallivm->context), ""); - return LLVMBuildFDiv(gallivm->builder, uscaled, - lp_build_const_float(gallivm, 127.0), ""); -} - -static INLINE LLVMValueRef -from_16_snorm(struct gallivm_state *gallivm, LLVMValueRef val) -{ - LLVMValueRef bc = LLVMBuildBitCast(gallivm->builder, val, - LLVMPointerType(LLVMIntTypeInContext(gallivm->context, 16), 0) , ""); - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, bc, ""); - LLVMValueRef uscaled = LLVMBuildSIToFP(gallivm->builder, l, LLVMFloatTypeInContext(gallivm->context), ""); - return LLVMBuildFDiv(gallivm->builder, uscaled, - lp_build_const_float(gallivm, 32767.0f), ""); -} - -static INLINE LLVMValueRef -from_32_snorm(struct gallivm_state *gallivm, LLVMValueRef val) -{ - LLVMValueRef bc = LLVMBuildBitCast(gallivm->builder, val, - LLVMPointerType(LLVMIntTypeInContext(gallivm->context, 32), 0) , ""); - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, bc, ""); - LLVMValueRef uscaled = LLVMBuildSIToFP(gallivm->builder, l, LLVMFloatTypeInContext(gallivm->context), ""); - - return LLVMBuildFDiv(gallivm->builder, uscaled, - lp_build_const_float(gallivm, 2147483647.0), ""); -} - -static INLINE LLVMValueRef -from_32_fixed(struct gallivm_state *gallivm, LLVMValueRef val) -{ - LLVMValueRef bc = LLVMBuildBitCast(gallivm->builder, val, - LLVMPointerType(LLVMIntTypeInContext(gallivm->context, 32), 0) , ""); - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, bc, ""); - LLVMValueRef uscaled = LLVMBuildSIToFP(gallivm->builder, l, LLVMFloatTypeInContext(gallivm->context), ""); - - return LLVMBuildFDiv(gallivm->builder, uscaled, - lp_build_const_float(gallivm, 65536.0), ""); -} - -static LLVMValueRef -to_64_float(struct gallivm_state *gallivm, LLVMValueRef fp) -{ - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, fp, ""); - return LLVMBuildFPExt(gallivm->builder, l, LLVMDoubleTypeInContext(gallivm->context), ""); -} - -static LLVMValueRef -to_32_float(struct gallivm_state *gallivm, LLVMValueRef fp) -{ - return LLVMBuildLoad(gallivm->builder, fp, ""); -} - -static INLINE LLVMValueRef -to_8_uscaled(struct gallivm_state *gallivm, LLVMValueRef fp) -{ - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, fp, ""); - return LLVMBuildFPToUI(gallivm->builder, l, LLVMIntTypeInContext(gallivm->context, 8), ""); -} - -static INLINE LLVMValueRef -to_16_uscaled(struct gallivm_state *gallivm, LLVMValueRef fp) -{ - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, fp, ""); - return LLVMBuildFPToUI(gallivm->builder, l, LLVMIntTypeInContext(gallivm->context, 16), ""); -} - -static INLINE LLVMValueRef -to_32_uscaled(struct gallivm_state *gallivm, LLVMValueRef fp) -{ - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, fp, ""); - return LLVMBuildFPToUI(gallivm->builder, l, LLVMIntTypeInContext(gallivm->context, 32), ""); -} - -static INLINE LLVMValueRef -to_8_sscaled(struct gallivm_state *gallivm, LLVMValueRef fp) -{ - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, fp, ""); - return LLVMBuildFPToSI(gallivm->builder, l, LLVMIntTypeInContext(gallivm->context, 8), ""); -} - -static INLINE LLVMValueRef -to_16_sscaled(struct gallivm_state *gallivm, LLVMValueRef fp) -{ - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, fp, ""); - return LLVMBuildFPToSI(gallivm->builder, l, LLVMIntTypeInContext(gallivm->context, 16), ""); -} - -static INLINE LLVMValueRef -to_32_sscaled(struct gallivm_state *gallivm, LLVMValueRef fp) -{ - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, fp, ""); - return LLVMBuildFPToSI(gallivm->builder, l, LLVMIntTypeInContext(gallivm->context, 32), ""); -} - -static INLINE LLVMValueRef -to_8_unorm(struct gallivm_state *gallivm, LLVMValueRef fp) -{ - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, fp, ""); - LLVMValueRef uscaled = LLVMBuildFPToUI(gallivm->builder, l, - LLVMIntTypeInContext(gallivm->context, 8), ""); - return LLVMBuildFMul(gallivm->builder, uscaled, - lp_build_const_float(gallivm, 255.), ""); -} - -static INLINE LLVMValueRef -to_16_unorm(struct gallivm_state *gallivm, LLVMValueRef fp) -{ - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, fp, ""); - LLVMValueRef uscaled = LLVMBuildFPToUI(gallivm->builder, l, - LLVMIntTypeInContext(gallivm->context, 32), ""); - return LLVMBuildFMul(gallivm->builder, uscaled, - lp_build_const_float(gallivm, 65535.), ""); -} - -static INLINE LLVMValueRef -to_32_unorm(struct gallivm_state *gallivm, LLVMValueRef fp) -{ - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, fp, ""); - LLVMValueRef uscaled = LLVMBuildFPToUI(gallivm->builder, l, - LLVMIntTypeInContext(gallivm->context, 32), ""); - - return LLVMBuildFMul(gallivm->builder, uscaled, - lp_build_const_float(gallivm, 4294967295.), ""); -} - -static INLINE LLVMValueRef -to_8_snorm(struct gallivm_state *gallivm, LLVMValueRef val) -{ - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, val, ""); - LLVMValueRef uscaled = LLVMBuildFPToSI(gallivm->builder, l, - LLVMIntTypeInContext(gallivm->context, 8), ""); - return LLVMBuildFMul(gallivm->builder, uscaled, - lp_build_const_float(gallivm, 127.0), ""); -} - -static INLINE LLVMValueRef -to_16_snorm(struct gallivm_state *gallivm, LLVMValueRef fp) -{ - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, fp, ""); - LLVMValueRef uscaled = LLVMBuildFPToSI(gallivm->builder, l, - LLVMIntTypeInContext(gallivm->context, 16), ""); - return LLVMBuildFMul(gallivm->builder, uscaled, - lp_build_const_float(gallivm, 32767.0f), ""); -} - -static INLINE LLVMValueRef -to_32_snorm(struct gallivm_state *gallivm, LLVMValueRef fp) -{ - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, fp, ""); - LLVMValueRef uscaled = LLVMBuildFPToSI(gallivm->builder, l, - LLVMIntTypeInContext(gallivm->context, 32), ""); - - return LLVMBuildFMul(gallivm->builder, uscaled, - lp_build_const_float(gallivm, 2147483647.0), ""); -} - -static INLINE LLVMValueRef -to_32_fixed(struct gallivm_state *gallivm, LLVMValueRef fp) -{ - LLVMValueRef l = LLVMBuildLoad(gallivm->builder, fp, ""); - LLVMValueRef uscaled = LLVMBuildFPToSI(gallivm->builder, l, - LLVMIntTypeInContext(gallivm->context, 32), ""); - - return LLVMBuildFMul(gallivm->builder, uscaled, - lp_build_const_float(gallivm, 65536.0), ""); -} - -typedef LLVMValueRef (*from_func)(struct gallivm_state *, LLVMValueRef); -typedef LLVMValueRef (*to_func)(struct gallivm_state *, LLVMValueRef); - -/* so that underneath can avoid function calls which are prohibited - * for static initialization we need this conversion */ -enum ll_type { - LL_Double, - LL_Float, - LL_Int32, - LL_Int16, - LL_Int8 -}; - -static INLINE LLVMTypeRef -ll_type_to_llvm(struct gallivm_state *gallivm, enum ll_type type) -{ - switch (type) { - case LL_Double: - return LLVMDoubleTypeInContext(gallivm->context); - case LL_Float: - return LLVMFloatTypeInContext(gallivm->context); - case LL_Int32: - return LLVMInt32TypeInContext(gallivm->context); - case LL_Int16: - return LLVMIntTypeInContext(gallivm->context, 16); - case LL_Int8: - return LLVMIntTypeInContext(gallivm->context, 8); - } - return LLVMIntTypeInContext(gallivm->context, 8); -} - -static INLINE int -ll_type_size(enum ll_type type) -{ - switch (type) { - case LL_Double: - return 8; - case LL_Float: - return 4; - case LL_Int32: - return 4; - case LL_Int16: - return 2; - case LL_Int8: - return 1; - } - return 1; -} - -struct draw_llvm_translate { - int format; - from_func from; - to_func to; - enum ll_type type; - int num_components; -} translates[] = -{ - {PIPE_FORMAT_R64_FLOAT, from_64_float, to_64_float, LL_Double, 1}, - {PIPE_FORMAT_R64G64_FLOAT, from_64_float, to_64_float, LL_Double, 2}, - {PIPE_FORMAT_R64G64B64_FLOAT, from_64_float, to_64_float, LL_Double, 3}, - {PIPE_FORMAT_R64G64B64A64_FLOAT, from_64_float, to_64_float, LL_Double, 4}, - {PIPE_FORMAT_R32_FLOAT, from_32_float, to_32_float, LL_Float, 1}, - {PIPE_FORMAT_R32G32_FLOAT, from_32_float, to_32_float, LL_Float, 2}, - {PIPE_FORMAT_R32G32B32_FLOAT, from_32_float, to_32_float, LL_Float, 3}, - {PIPE_FORMAT_R32G32B32A32_FLOAT, from_32_float, to_32_float, LL_Float, 4}, - - {PIPE_FORMAT_R32_UNORM, from_32_unorm, to_32_unorm, LL_Int32, 1}, - {PIPE_FORMAT_R32G32_UNORM, from_32_unorm, to_32_unorm, LL_Int32, 2}, - {PIPE_FORMAT_R32G32B32_UNORM, from_32_unorm, to_32_unorm, LL_Int32, 3}, - {PIPE_FORMAT_R32G32B32A32_UNORM, from_32_unorm, to_32_unorm, LL_Int32, 4}, - - {PIPE_FORMAT_R32_USCALED, from_32_uscaled, to_32_uscaled, LL_Int32, 1}, - {PIPE_FORMAT_R32G32_USCALED, from_32_uscaled, to_32_uscaled, LL_Int32, 2}, - {PIPE_FORMAT_R32G32B32_USCALED, from_32_uscaled, to_32_uscaled, LL_Int32, 3}, - {PIPE_FORMAT_R32G32B32A32_USCALED, from_32_uscaled, to_32_uscaled, LL_Int32, 4}, - - {PIPE_FORMAT_R32_SNORM, from_32_snorm, to_32_snorm, LL_Int32, 1}, - {PIPE_FORMAT_R32G32_SNORM, from_32_snorm, to_32_snorm, LL_Int32, 2}, - {PIPE_FORMAT_R32G32B32_SNORM, from_32_snorm, to_32_snorm, LL_Int32, 3}, - {PIPE_FORMAT_R32G32B32A32_SNORM, from_32_snorm, to_32_snorm, LL_Int32, 4}, - - {PIPE_FORMAT_R32_SSCALED, from_32_sscaled, to_32_sscaled, LL_Int32, 1}, - {PIPE_FORMAT_R32G32_SSCALED, from_32_sscaled, to_32_sscaled, LL_Int32, 2}, - {PIPE_FORMAT_R32G32B32_SSCALED, from_32_sscaled, to_32_sscaled, LL_Int32, 3}, - {PIPE_FORMAT_R32G32B32A32_SSCALED, from_32_sscaled, to_32_sscaled, LL_Int32, 4}, - - {PIPE_FORMAT_R16_UNORM, from_16_unorm, to_16_unorm, LL_Int16, 1}, - {PIPE_FORMAT_R16G16_UNORM, from_16_unorm, to_16_unorm, LL_Int16, 2}, - {PIPE_FORMAT_R16G16B16_UNORM, from_16_unorm, to_16_unorm, LL_Int16, 3}, - {PIPE_FORMAT_R16G16B16A16_UNORM, from_16_unorm, to_16_unorm, LL_Int16, 4}, - - {PIPE_FORMAT_R16_USCALED, from_16_uscaled, to_16_uscaled, LL_Int16, 1}, - {PIPE_FORMAT_R16G16_USCALED, from_16_uscaled, to_16_uscaled, LL_Int16, 2}, - {PIPE_FORMAT_R16G16B16_USCALED, from_16_uscaled, to_16_uscaled, LL_Int16, 3}, - {PIPE_FORMAT_R16G16B16A16_USCALED, from_16_uscaled, to_16_uscaled, LL_Int16, 4}, - - {PIPE_FORMAT_R16_SNORM, from_16_snorm, to_16_snorm, LL_Int16, 1}, - {PIPE_FORMAT_R16G16_SNORM, from_16_snorm, to_16_snorm, LL_Int16, 2}, - {PIPE_FORMAT_R16G16B16_SNORM, from_16_snorm, to_16_snorm, LL_Int16, 3}, - {PIPE_FORMAT_R16G16B16A16_SNORM, from_16_snorm, to_16_snorm, LL_Int16, 4}, - - {PIPE_FORMAT_R16_SSCALED, from_16_sscaled, to_16_sscaled, LL_Int16, 1}, - {PIPE_FORMAT_R16G16_SSCALED, from_16_sscaled, to_16_sscaled, LL_Int16, 2}, - {PIPE_FORMAT_R16G16B16_SSCALED, from_16_sscaled, to_16_sscaled, LL_Int16, 3}, - {PIPE_FORMAT_R16G16B16A16_SSCALED, from_16_sscaled, to_16_sscaled, LL_Int16, 4}, - - {PIPE_FORMAT_R8_UNORM, from_8_unorm, to_8_unorm, LL_Int8, 1}, - {PIPE_FORMAT_R8G8_UNORM, from_8_unorm, to_8_unorm, LL_Int8, 2}, - {PIPE_FORMAT_R8G8B8_UNORM, from_8_unorm, to_8_unorm, LL_Int8, 3}, - {PIPE_FORMAT_R8G8B8A8_UNORM, from_8_unorm, to_8_unorm, LL_Int8, 4}, - - {PIPE_FORMAT_R8_USCALED, from_8_uscaled, to_8_uscaled, LL_Int8, 1}, - {PIPE_FORMAT_R8G8_USCALED, from_8_uscaled, to_8_uscaled, LL_Int8, 2}, - {PIPE_FORMAT_R8G8B8_USCALED, from_8_uscaled, to_8_uscaled, LL_Int8, 3}, - {PIPE_FORMAT_R8G8B8A8_USCALED, from_8_uscaled, to_8_uscaled, LL_Int8, 4}, - - {PIPE_FORMAT_R8_SNORM, from_8_snorm, to_8_snorm, LL_Int8, 1}, - {PIPE_FORMAT_R8G8_SNORM, from_8_snorm, to_8_snorm, LL_Int8, 2}, - {PIPE_FORMAT_R8G8B8_SNORM, from_8_snorm, to_8_snorm, LL_Int8, 3}, - {PIPE_FORMAT_R8G8B8A8_SNORM, from_8_snorm, to_8_snorm, LL_Int8, 4}, - - {PIPE_FORMAT_R8_SSCALED, from_8_sscaled, to_8_sscaled, LL_Int8, 1}, - {PIPE_FORMAT_R8G8_SSCALED, from_8_sscaled, to_8_sscaled, LL_Int8, 2}, - {PIPE_FORMAT_R8G8B8_SSCALED, from_8_sscaled, to_8_sscaled, LL_Int8, 3}, - {PIPE_FORMAT_R8G8B8A8_SSCALED, from_8_sscaled, to_8_sscaled, LL_Int8, 4}, - - {PIPE_FORMAT_R32_FIXED, from_32_fixed, to_32_fixed, LL_Int32, 1}, - {PIPE_FORMAT_R32G32_FIXED, from_32_fixed, to_32_fixed, LL_Int32, 2}, - {PIPE_FORMAT_R32G32B32_FIXED, from_32_fixed, to_32_fixed, LL_Int32, 3}, - {PIPE_FORMAT_R32G32B32A32_FIXED, from_32_fixed, to_32_fixed, LL_Int32, 4}, -}; - - -static LLVMValueRef -fetch(struct gallivm_state *gallivm, - LLVMValueRef ptr, int val_size, int nr_components, - from_func func) -{ - int i; - int offset = 0; - LLVMValueRef res = - LLVMConstNull(LLVMVectorType(LLVMFloatTypeInContext(gallivm->context), 4)); - LLVMValueRef defaults[4]; - - defaults[0] = - defaults[1] = - defaults[2] = lp_build_const_float(gallivm, 0.0); - defaults[3] = lp_build_const_float(gallivm, 1.0); - - for (i = 0; i < nr_components; ++i) { - LLVMValueRef src_index = lp_build_const_int32(gallivm, offset); - LLVMValueRef dst_index = lp_build_const_int32(gallivm, i); - LLVMValueRef src_tmp; - LLVMValueRef component; - - src_tmp = LLVMBuildGEP(gallivm->builder, ptr, &src_index, 1, "src_tmp"); - - /* convert src_tmp to float */ - component = func(gallivm, src_tmp); - - /* vec.comp = component */ - res = LLVMBuildInsertElement(gallivm->builder, - res, - component, - dst_index, ""); - offset += val_size; - } - for (; i < 4; ++i) { - LLVMValueRef dst_index = lp_build_const_int32(gallivm, i); - res = LLVMBuildInsertElement(gallivm->builder, - res, - defaults[i], - dst_index, ""); - } - return res; -} - - -LLVMValueRef -draw_llvm_translate_from(struct gallivm_state *gallivm, - LLVMValueRef vbuffer, - enum pipe_format from_format) -{ - const struct util_format_description *format_desc; - LLVMValueRef zero; - int i; - struct lp_type type = lp_float32_vec4_type(); - - /* - * The above can only cope with straight arrays: no bitfields, - * swizzles, or half floats. - */ - - for (i = 0; i < Elements(translates); ++i) { - if (translates[i].format == from_format) { - /*LLVMTypeRef type = ll_type_to_llvm(translates[i].type);*/ - return fetch(gallivm, - vbuffer, - ll_type_size(translates[i].type), - translates[i].num_components, - translates[i].from); - } - } - - - /* - * This doesn't handle anything bigger than 32bits, or half floats - * yet. - * - * TODO: unify all this code into lp_build_fetch_rgba_aos(). - */ - - format_desc = util_format_description(from_format); - zero = LLVMConstNull(LLVMInt32TypeInContext(gallivm->context)); - return lp_build_fetch_rgba_aos(gallivm, format_desc, type, vbuffer, zero, zero, zero); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe.c deleted file mode 100644 index f1b0171f520..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe.c +++ /dev/null @@ -1,348 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - /* - * Authors: - * Keith Whitwell - */ - -#include "draw/draw_private.h" -#include "draw/draw_pipe.h" -#include "util/u_debug.h" - - - -boolean draw_pipeline_init( struct draw_context *draw ) -{ - /* create pipeline stages */ - draw->pipeline.wide_line = draw_wide_line_stage( draw ); - draw->pipeline.wide_point = draw_wide_point_stage( draw ); - draw->pipeline.stipple = draw_stipple_stage( draw ); - draw->pipeline.unfilled = draw_unfilled_stage( draw ); - draw->pipeline.twoside = draw_twoside_stage( draw ); - draw->pipeline.offset = draw_offset_stage( draw ); - draw->pipeline.clip = draw_clip_stage( draw ); - draw->pipeline.flatshade = draw_flatshade_stage( draw ); - draw->pipeline.cull = draw_cull_stage( draw ); - draw->pipeline.validate = draw_validate_stage( draw ); - draw->pipeline.first = draw->pipeline.validate; - - if (!draw->pipeline.wide_line || - !draw->pipeline.wide_point || - !draw->pipeline.stipple || - !draw->pipeline.unfilled || - !draw->pipeline.twoside || - !draw->pipeline.offset || - !draw->pipeline.clip || - !draw->pipeline.flatshade || - !draw->pipeline.cull || - !draw->pipeline.validate) - return FALSE; - - /* these defaults are oriented toward the needs of softpipe */ - draw->pipeline.wide_point_threshold = 1000000.0f; /* infinity */ - draw->pipeline.wide_line_threshold = 1.0f; - draw->pipeline.wide_point_sprites = FALSE; - draw->pipeline.line_stipple = TRUE; - draw->pipeline.point_sprite = TRUE; - - return TRUE; -} - - -void draw_pipeline_destroy( struct draw_context *draw ) -{ - if (draw->pipeline.wide_line) - draw->pipeline.wide_line->destroy( draw->pipeline.wide_line ); - if (draw->pipeline.wide_point) - draw->pipeline.wide_point->destroy( draw->pipeline.wide_point ); - if (draw->pipeline.stipple) - draw->pipeline.stipple->destroy( draw->pipeline.stipple ); - if (draw->pipeline.unfilled) - draw->pipeline.unfilled->destroy( draw->pipeline.unfilled ); - if (draw->pipeline.twoside) - draw->pipeline.twoside->destroy( draw->pipeline.twoside ); - if (draw->pipeline.offset) - draw->pipeline.offset->destroy( draw->pipeline.offset ); - if (draw->pipeline.clip) - draw->pipeline.clip->destroy( draw->pipeline.clip ); - if (draw->pipeline.flatshade) - draw->pipeline.flatshade->destroy( draw->pipeline.flatshade ); - if (draw->pipeline.cull) - draw->pipeline.cull->destroy( draw->pipeline.cull ); - if (draw->pipeline.validate) - draw->pipeline.validate->destroy( draw->pipeline.validate ); - if (draw->pipeline.aaline) - draw->pipeline.aaline->destroy( draw->pipeline.aaline ); - if (draw->pipeline.aapoint) - draw->pipeline.aapoint->destroy( draw->pipeline.aapoint ); - if (draw->pipeline.pstipple) - draw->pipeline.pstipple->destroy( draw->pipeline.pstipple ); - if (draw->pipeline.rasterize) - draw->pipeline.rasterize->destroy( draw->pipeline.rasterize ); -} - - - -/** - * Build primitive to render a point with vertex at v0. - */ -static void do_point( struct draw_context *draw, - const char *v0 ) -{ - struct prim_header prim; - - prim.flags = 0; - prim.pad = 0; - prim.v[0] = (struct vertex_header *)v0; - - draw->pipeline.first->point( draw->pipeline.first, &prim ); -} - - -/** - * Build primitive to render a line with vertices at v0, v1. - * \param flags bitmask of DRAW_PIPE_EDGE_x, DRAW_PIPE_RESET_STIPPLE - */ -static void do_line( struct draw_context *draw, - ushort flags, - const char *v0, - const char *v1 ) -{ - struct prim_header prim; - - prim.flags = flags; - prim.pad = 0; - prim.v[0] = (struct vertex_header *)v0; - prim.v[1] = (struct vertex_header *)v1; - - draw->pipeline.first->line( draw->pipeline.first, &prim ); -} - - -/** - * Build primitive to render a triangle with vertices at v0, v1, v2. - * \param flags bitmask of DRAW_PIPE_EDGE_x, DRAW_PIPE_RESET_STIPPLE - */ -static void do_triangle( struct draw_context *draw, - ushort flags, - char *v0, - char *v1, - char *v2 ) -{ - struct prim_header prim; - - prim.v[0] = (struct vertex_header *)v0; - prim.v[1] = (struct vertex_header *)v1; - prim.v[2] = (struct vertex_header *)v2; - prim.flags = flags; - prim.pad = 0; - - draw->pipeline.first->tri( draw->pipeline.first, &prim ); -} - - -/* - * Set up macros for draw_pt_decompose.h template code. - * This code uses vertex indexes / elements. - */ - -#define TRIANGLE(flags,i0,i1,i2) \ - do { \ - do_triangle( draw, \ - flags, \ - verts + stride * (i0), \ - verts + stride * (i1), \ - verts + stride * (i2) ); \ - } while (0) - -#define LINE(flags,i0,i1) \ - do { \ - do_line( draw, \ - flags, \ - verts + stride * (i0), \ - verts + stride * (i1) ); \ - } while (0) - -#define POINT(i0) \ - do { \ - do_point( draw, verts + stride * (i0) ); \ - } while (0) - -#define GET_ELT(idx) (elts[idx]) - -#define FUNC pipe_run_elts -#define FUNC_VARS \ - struct draw_context *draw, \ - unsigned prim, \ - unsigned prim_flags, \ - struct vertex_header *vertices, \ - unsigned stride, \ - const ushort *elts, \ - unsigned count - -#include "draw_pt_decompose.h" - - - -/** - * Code to run the pipeline on a fairly arbitrary collection of vertices. - * For drawing indexed primitives. - * - * Vertex headers must be pre-initialized with the - * UNDEFINED_VERTEX_ID, this code will cause that id to become - * overwritten, so it may have to be reset if there is the intention - * to reuse the vertices. - * - * This code provides a callback to reset the vertex id's which the - * draw_vbuf.c code uses when it has to perform a flush. - */ -void draw_pipeline_run( struct draw_context *draw, - const struct draw_vertex_info *vert_info, - const struct draw_prim_info *prim_info) -{ - unsigned i, start; - - draw->pipeline.verts = (char *)vert_info->verts; - draw->pipeline.vertex_stride = vert_info->stride; - draw->pipeline.vertex_count = vert_info->count; - - for (start = i = 0; - i < prim_info->primitive_count; - start += prim_info->primitive_lengths[i], i++) - { - const unsigned count = prim_info->primitive_lengths[i]; - -#if DEBUG - /* Warn if one of the element indexes go outside the vertex buffer */ - { - unsigned max_index = 0x0, i; - /* find the largest element index */ - for (i = 0; i < count; i++) { - unsigned int index = prim_info->elts[start + i]; - if (index > max_index) - max_index = index; - } - if (max_index >= vert_info->count) { - debug_printf("%s: max_index (%u) outside vertex buffer (%u)\n", - __FUNCTION__, - max_index, - vert_info->count); - } - } -#endif - - pipe_run_elts(draw, - prim_info->prim, - prim_info->flags, - vert_info->verts, - vert_info->stride, - prim_info->elts + start, - count); - } - - draw->pipeline.verts = NULL; - draw->pipeline.vertex_count = 0; -} - - -/* - * Set up macros for draw_pt_decompose.h template code. - * This code is for non-indexed (aka linear) rendering (no elts). - */ - -#define TRIANGLE(flags,i0,i1,i2) \ - do_triangle( draw, flags, \ - verts + stride * (i0), \ - verts + stride * (i1), \ - verts + stride * (i2) ) - -#define LINE(flags,i0,i1) \ - do_line( draw, flags, \ - verts + stride * (i0), \ - verts + stride * (i1) ) - -#define POINT(i0) \ - do_point( draw, verts + stride * (i0) ) - - -#define GET_ELT(idx) (idx) - -#define FUNC pipe_run_linear -#define FUNC_VARS \ - struct draw_context *draw, \ - unsigned prim, \ - unsigned prim_flags, \ - struct vertex_header *vertices, \ - unsigned stride, \ - unsigned count - -#include "draw_pt_decompose.h" - - -/* - * For drawing non-indexed primitives. - */ -void draw_pipeline_run_linear( struct draw_context *draw, - const struct draw_vertex_info *vert_info, - const struct draw_prim_info *prim_info) -{ - unsigned i, start; - - for (start = i = 0; - i < prim_info->primitive_count; - start += prim_info->primitive_lengths[i], i++) - { - unsigned count = prim_info->primitive_lengths[i]; - char *verts = ((char*)vert_info->verts) + - (start * vert_info->stride); - - draw->pipeline.verts = verts; - draw->pipeline.vertex_stride = vert_info->stride; - draw->pipeline.vertex_count = count; - - assert(count <= vert_info->count); - - pipe_run_linear(draw, - prim_info->prim, - prim_info->flags, - (struct vertex_header*)verts, - vert_info->stride, - count); - } - - draw->pipeline.verts = NULL; - draw->pipeline.vertex_count = 0; -} - - -void draw_pipeline_flush( struct draw_context *draw, - unsigned flags ) -{ - draw->pipeline.first->flush( draw->pipeline.first, flags ); - draw->pipeline.first = draw->pipeline.validate; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe.h b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe.h deleted file mode 100644 index 479250729ff..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe.h +++ /dev/null @@ -1,126 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - /* - * Authors: - * Keith Whitwell - */ - -#ifndef DRAW_PIPE_H -#define DRAW_PIPE_H - -#include "pipe/p_compiler.h" -#include "draw_private.h" /* for sizeof(vertex_header) */ - - -/** - * Basic info for a point/line/triangle primitive. - */ -struct prim_header { - float det; /**< front/back face determinant */ - ushort flags; - ushort pad; - struct vertex_header *v[3]; /**< 1 to 3 vertex pointers */ -}; - - - -/** - * Base class for all primitive drawing stages. - */ -struct draw_stage -{ - struct draw_context *draw; /**< parent context */ - - struct draw_stage *next; /**< next stage in pipeline */ - const char *name; /**< for debugging */ - - struct vertex_header **tmp; /**< temp vert storage, such as for clipping */ - unsigned nr_tmps; - - void (*point)( struct draw_stage *, - struct prim_header * ); - - void (*line)( struct draw_stage *, - struct prim_header * ); - - void (*tri)( struct draw_stage *, - struct prim_header * ); - - void (*flush)( struct draw_stage *, - unsigned flags ); - - void (*reset_stipple_counter)( struct draw_stage * ); - - void (*destroy)( struct draw_stage * ); -}; - - -extern struct draw_stage *draw_unfilled_stage( struct draw_context *context ); -extern struct draw_stage *draw_twoside_stage( struct draw_context *context ); -extern struct draw_stage *draw_offset_stage( struct draw_context *context ); -extern struct draw_stage *draw_clip_stage( struct draw_context *context ); -extern struct draw_stage *draw_flatshade_stage( struct draw_context *context ); -extern struct draw_stage *draw_cull_stage( struct draw_context *context ); -extern struct draw_stage *draw_stipple_stage( struct draw_context *context ); -extern struct draw_stage *draw_wide_line_stage( struct draw_context *context ); -extern struct draw_stage *draw_wide_point_stage( struct draw_context *context ); -extern struct draw_stage *draw_validate_stage( struct draw_context *context ); - - -extern void draw_free_temp_verts( struct draw_stage *stage ); -extern boolean draw_alloc_temp_verts( struct draw_stage *stage, unsigned nr ); - -extern void draw_reset_vertex_ids( struct draw_context *draw ); - -void draw_pipe_passthrough_tri(struct draw_stage *stage, struct prim_header *header); -void draw_pipe_passthrough_line(struct draw_stage *stage, struct prim_header *header); -void draw_pipe_passthrough_point(struct draw_stage *stage, struct prim_header *header); - - - -/** - * Get a writeable copy of a vertex. - * \param stage drawing stage info - * \param vert the vertex to copy (source) - * \param idx index into stage's tmp[] array to put the copy (dest) - * \return pointer to the copied vertex - */ -static INLINE struct vertex_header * -dup_vert( struct draw_stage *stage, - const struct vertex_header *vert, - unsigned idx ) -{ - struct vertex_header *tmp = stage->tmp[idx]; - const uint vsize = sizeof(struct vertex_header) - + stage->draw->vs.num_vs_outputs * 4 * sizeof(float); - memcpy(tmp, vert, vsize); - tmp->vertex_id = UNDEFINED_VERTEX_ID; - return tmp; -} - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_aaline.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_aaline.c deleted file mode 100644 index 0b368da6747..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_aaline.c +++ /dev/null @@ -1,983 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * AA line stage: AA lines are converted to texture mapped triangles. - * - * Authors: Brian Paul - */ - - -#include "pipe/p_context.h" -#include "pipe/p_defines.h" -#include "pipe/p_shader_tokens.h" -#include "util/u_inlines.h" - -#include "util/u_format.h" -#include "util/u_math.h" -#include "util/u_memory.h" -#include "util/u_sampler.h" - -#include "tgsi/tgsi_transform.h" -#include "tgsi/tgsi_dump.h" - -#include "draw_context.h" -#include "draw_private.h" -#include "draw_pipe.h" - - -/** Approx number of new tokens for instructions in aa_transform_inst() */ -#define NUM_NEW_TOKENS 50 - - -/** - * Size for the alpha texture used for antialiasing - */ -#define TEXTURE_SIZE_LOG2 5 /* 32 x 32 */ - -/** - * Max texture level for the alpha texture used for antialiasing - * - * Don't use the 1x1 and 2x2 mipmap levels. - */ -#define MAX_TEXTURE_LEVEL (TEXTURE_SIZE_LOG2 - 2) - - -/** - * Subclass of pipe_shader_state to carry extra fragment shader info. - */ -struct aaline_fragment_shader -{ - struct pipe_shader_state state; - void *driver_fs; - void *aaline_fs; - uint sampler_unit; - int generic_attrib; /**< texcoord/generic used for texture */ -}; - - -/** - * Subclass of draw_stage - */ -struct aaline_stage -{ - struct draw_stage stage; - - float half_line_width; - - /** For AA lines, this is the vertex attrib slot for the new texcoords */ - uint tex_slot; - /** position, not necessarily output zero */ - uint pos_slot; - - void *sampler_cso; - struct pipe_resource *texture; - struct pipe_sampler_view *sampler_view; - uint num_samplers; - uint num_sampler_views; - - - /* - * Currently bound state - */ - struct aaline_fragment_shader *fs; - struct { - void *sampler[PIPE_MAX_SAMPLERS]; - struct pipe_sampler_view *sampler_views[PIPE_MAX_SAMPLERS]; - } state; - - /* - * Driver interface/override functions - */ - void * (*driver_create_fs_state)(struct pipe_context *, - const struct pipe_shader_state *); - void (*driver_bind_fs_state)(struct pipe_context *, void *); - void (*driver_delete_fs_state)(struct pipe_context *, void *); - - void (*driver_bind_sampler_states)(struct pipe_context *, unsigned, - void **); - - void (*driver_set_sampler_views)(struct pipe_context *, - unsigned, - struct pipe_sampler_view **); -}; - - - -/** - * Subclass of tgsi_transform_context, used for transforming the - * user's fragment shader to add the special AA instructions. - */ -struct aa_transform_context { - struct tgsi_transform_context base; - uint tempsUsed; /**< bitmask */ - int colorOutput; /**< which output is the primary color */ - uint samplersUsed; /**< bitfield of samplers used */ - int freeSampler; /** an available sampler for the pstipple */ - int maxInput, maxGeneric; /**< max input index found */ - int colorTemp, texTemp; /**< temp registers */ - boolean firstInstruction; -}; - - -/** - * TGSI declaration transform callback. - * Look for a free sampler, a free input attrib, and two free temp regs. - */ -static void -aa_transform_decl(struct tgsi_transform_context *ctx, - struct tgsi_full_declaration *decl) -{ - struct aa_transform_context *aactx = (struct aa_transform_context *) ctx; - - if (decl->Declaration.File == TGSI_FILE_OUTPUT && - decl->Semantic.Name == TGSI_SEMANTIC_COLOR && - decl->Semantic.Index == 0) { - aactx->colorOutput = decl->Range.First; - } - else if (decl->Declaration.File == TGSI_FILE_SAMPLER) { - uint i; - for (i = decl->Range.First; - i <= decl->Range.Last; i++) { - aactx->samplersUsed |= 1 << i; - } - } - else if (decl->Declaration.File == TGSI_FILE_INPUT) { - if ((int) decl->Range.Last > aactx->maxInput) - aactx->maxInput = decl->Range.Last; - if (decl->Semantic.Name == TGSI_SEMANTIC_GENERIC && - (int) decl->Semantic.Index > aactx->maxGeneric) { - aactx->maxGeneric = decl->Semantic.Index; - } - } - else if (decl->Declaration.File == TGSI_FILE_TEMPORARY) { - uint i; - for (i = decl->Range.First; - i <= decl->Range.Last; i++) { - aactx->tempsUsed |= (1 << i); - } - } - - ctx->emit_declaration(ctx, decl); -} - - -/** - * Find the lowest zero bit in the given word, or -1 if bitfield is all ones. - */ -static int -free_bit(uint bitfield) -{ - return ffs(~bitfield) - 1; -} - - -/** - * TGSI instruction transform callback. - * Replace writes to result.color w/ a temp reg. - * Upon END instruction, insert texture sampling code for antialiasing. - */ -static void -aa_transform_inst(struct tgsi_transform_context *ctx, - struct tgsi_full_instruction *inst) -{ - struct aa_transform_context *aactx = (struct aa_transform_context *) ctx; - - if (aactx->firstInstruction) { - /* emit our new declarations before the first instruction */ - - struct tgsi_full_declaration decl; - uint i; - - /* find free sampler */ - aactx->freeSampler = free_bit(aactx->samplersUsed); - if (aactx->freeSampler >= PIPE_MAX_SAMPLERS) - aactx->freeSampler = PIPE_MAX_SAMPLERS - 1; - - /* find two free temp regs */ - for (i = 0; i < 32; i++) { - if ((aactx->tempsUsed & (1 << i)) == 0) { - /* found a free temp */ - if (aactx->colorTemp < 0) - aactx->colorTemp = i; - else if (aactx->texTemp < 0) - aactx->texTemp = i; - else - break; - } - } - assert(aactx->colorTemp >= 0); - assert(aactx->texTemp >= 0); - - /* declare new generic input/texcoord */ - decl = tgsi_default_full_declaration(); - decl.Declaration.File = TGSI_FILE_INPUT; - /* XXX this could be linear... */ - decl.Declaration.Interpolate = TGSI_INTERPOLATE_PERSPECTIVE; - decl.Declaration.Semantic = 1; - decl.Semantic.Name = TGSI_SEMANTIC_GENERIC; - decl.Semantic.Index = aactx->maxGeneric + 1; - decl.Range.First = - decl.Range.Last = aactx->maxInput + 1; - ctx->emit_declaration(ctx, &decl); - - /* declare new sampler */ - decl = tgsi_default_full_declaration(); - decl.Declaration.File = TGSI_FILE_SAMPLER; - decl.Range.First = - decl.Range.Last = aactx->freeSampler; - ctx->emit_declaration(ctx, &decl); - - /* declare new temp regs */ - decl = tgsi_default_full_declaration(); - decl.Declaration.File = TGSI_FILE_TEMPORARY; - decl.Range.First = - decl.Range.Last = aactx->texTemp; - ctx->emit_declaration(ctx, &decl); - - decl = tgsi_default_full_declaration(); - decl.Declaration.File = TGSI_FILE_TEMPORARY; - decl.Range.First = - decl.Range.Last = aactx->colorTemp; - ctx->emit_declaration(ctx, &decl); - - aactx->firstInstruction = FALSE; - } - - if (inst->Instruction.Opcode == TGSI_OPCODE_END && - aactx->colorOutput != -1) { - struct tgsi_full_instruction newInst; - - /* TEX */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_TEX; - newInst.Instruction.NumDstRegs = 1; - newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Dst[0].Register.Index = aactx->texTemp; - newInst.Instruction.NumSrcRegs = 2; - newInst.Instruction.Texture = TRUE; - newInst.Texture.Texture = TGSI_TEXTURE_2D; - newInst.Src[0].Register.File = TGSI_FILE_INPUT; - newInst.Src[0].Register.Index = aactx->maxInput + 1; - newInst.Src[1].Register.File = TGSI_FILE_SAMPLER; - newInst.Src[1].Register.Index = aactx->freeSampler; - - ctx->emit_instruction(ctx, &newInst); - - /* MOV rgb */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_MOV; - newInst.Instruction.NumDstRegs = 1; - newInst.Dst[0].Register.File = TGSI_FILE_OUTPUT; - newInst.Dst[0].Register.Index = aactx->colorOutput; - newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_XYZ; - newInst.Instruction.NumSrcRegs = 1; - newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[0].Register.Index = aactx->colorTemp; - ctx->emit_instruction(ctx, &newInst); - - /* MUL alpha */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_MUL; - newInst.Instruction.NumDstRegs = 1; - newInst.Dst[0].Register.File = TGSI_FILE_OUTPUT; - newInst.Dst[0].Register.Index = aactx->colorOutput; - newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_W; - newInst.Instruction.NumSrcRegs = 2; - newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[0].Register.Index = aactx->colorTemp; - newInst.Src[1].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[1].Register.Index = aactx->texTemp; - ctx->emit_instruction(ctx, &newInst); - - /* END */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_END; - newInst.Instruction.NumDstRegs = 0; - newInst.Instruction.NumSrcRegs = 0; - ctx->emit_instruction(ctx, &newInst); - } - else { - /* Not an END instruction. - * Look for writes to result.color and replace with colorTemp reg. - */ - uint i; - - for (i = 0; i < inst->Instruction.NumDstRegs; i++) { - struct tgsi_full_dst_register *dst = &inst->Dst[i]; - if (dst->Register.File == TGSI_FILE_OUTPUT && - dst->Register.Index == aactx->colorOutput) { - dst->Register.File = TGSI_FILE_TEMPORARY; - dst->Register.Index = aactx->colorTemp; - } - } - - ctx->emit_instruction(ctx, inst); - } -} - - -/** - * Generate the frag shader we'll use for drawing AA lines. - * This will be the user's shader plus some texture/modulate instructions. - */ -static boolean -generate_aaline_fs(struct aaline_stage *aaline) -{ - struct pipe_context *pipe = aaline->stage.draw->pipe; - const struct pipe_shader_state *orig_fs = &aaline->fs->state; - struct pipe_shader_state aaline_fs; - struct aa_transform_context transform; - const uint newLen = tgsi_num_tokens(orig_fs->tokens) + NUM_NEW_TOKENS; - - aaline_fs = *orig_fs; /* copy to init */ - aaline_fs.tokens = tgsi_alloc_tokens(newLen); - if (aaline_fs.tokens == NULL) - return FALSE; - - memset(&transform, 0, sizeof(transform)); - transform.colorOutput = -1; - transform.maxInput = -1; - transform.maxGeneric = -1; - transform.colorTemp = -1; - transform.texTemp = -1; - transform.firstInstruction = TRUE; - transform.base.transform_instruction = aa_transform_inst; - transform.base.transform_declaration = aa_transform_decl; - - tgsi_transform_shader(orig_fs->tokens, - (struct tgsi_token *) aaline_fs.tokens, - newLen, &transform.base); - -#if 0 /* DEBUG */ - debug_printf("draw_aaline, orig shader:\n"); - tgsi_dump(orig_fs->tokens, 0); - debug_printf("draw_aaline, new shader:\n"); - tgsi_dump(aaline_fs.tokens, 0); -#endif - - aaline->fs->sampler_unit = transform.freeSampler; - - aaline->fs->aaline_fs = aaline->driver_create_fs_state(pipe, &aaline_fs); - if (aaline->fs->aaline_fs == NULL) - goto fail; - - aaline->fs->generic_attrib = transform.maxGeneric + 1; - FREE((void *)aaline_fs.tokens); - return TRUE; - -fail: - FREE((void *)aaline_fs.tokens); - return FALSE; -} - - -/** - * Create the texture map we'll use for antialiasing the lines. - */ -static boolean -aaline_create_texture(struct aaline_stage *aaline) -{ - struct pipe_context *pipe = aaline->stage.draw->pipe; - struct pipe_screen *screen = pipe->screen; - struct pipe_resource texTemp; - struct pipe_sampler_view viewTempl; - uint level; - - memset(&texTemp, 0, sizeof(texTemp)); - texTemp.target = PIPE_TEXTURE_2D; - texTemp.format = PIPE_FORMAT_A8_UNORM; /* XXX verify supported by driver! */ - texTemp.last_level = MAX_TEXTURE_LEVEL; - texTemp.width0 = 1 << TEXTURE_SIZE_LOG2; - texTemp.height0 = 1 << TEXTURE_SIZE_LOG2; - texTemp.depth0 = 1; - texTemp.array_size = 1; - texTemp.bind = PIPE_BIND_SAMPLER_VIEW; - - aaline->texture = screen->resource_create(screen, &texTemp); - if (!aaline->texture) - return FALSE; - - u_sampler_view_default_template(&viewTempl, - aaline->texture, - aaline->texture->format); - aaline->sampler_view = pipe->create_sampler_view(pipe, - aaline->texture, - &viewTempl); - if (!aaline->sampler_view) { - return FALSE; - } - - /* Fill in mipmap images. - * Basically each level is solid opaque, except for the outermost - * texels which are zero. Special case the 1x1 and 2x2 levels - * (though, those levels shouldn't be used - see the max_lod setting). - */ - for (level = 0; level <= MAX_TEXTURE_LEVEL; level++) { - struct pipe_transfer *transfer; - struct pipe_box box; - const uint size = u_minify(aaline->texture->width0, level); - ubyte *data; - uint i, j; - - assert(aaline->texture->width0 == aaline->texture->height0); - - u_box_origin_2d( size, size, &box ); - - /* This texture is new, no need to flush. - */ - transfer = pipe->get_transfer(pipe, - aaline->texture, - level, - PIPE_TRANSFER_WRITE, - &box); - - data = pipe->transfer_map(pipe, transfer); - if (data == NULL) - return FALSE; - - for (i = 0; i < size; i++) { - for (j = 0; j < size; j++) { - ubyte d; - if (size == 1) { - d = 255; - } - else if (size == 2) { - d = 200; /* tuneable */ - } - else if (i == 0 || j == 0 || i == size - 1 || j == size - 1) { - d = 35; /* edge texel */ - } - else { - d = 255; - } - data[i * transfer->stride + j] = d; - } - } - - /* unmap */ - pipe->transfer_unmap(pipe, transfer); - pipe->transfer_destroy(pipe, transfer); - } - return TRUE; -} - - -/** - * Create the sampler CSO that'll be used for antialiasing. - * By using a mipmapped texture, we don't have to generate a different - * texture image for each line size. - */ -static boolean -aaline_create_sampler(struct aaline_stage *aaline) -{ - struct pipe_sampler_state sampler; - struct pipe_context *pipe = aaline->stage.draw->pipe; - - memset(&sampler, 0, sizeof(sampler)); - sampler.wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - sampler.wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - sampler.wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - sampler.min_mip_filter = PIPE_TEX_MIPFILTER_LINEAR; - sampler.min_img_filter = PIPE_TEX_FILTER_LINEAR; - sampler.mag_img_filter = PIPE_TEX_FILTER_LINEAR; - sampler.normalized_coords = 1; - sampler.min_lod = 0.0f; - sampler.max_lod = MAX_TEXTURE_LEVEL; - - aaline->sampler_cso = pipe->create_sampler_state(pipe, &sampler); - if (aaline->sampler_cso == NULL) - return FALSE; - - return TRUE; -} - - -/** - * When we're about to draw our first AA line in a batch, this function is - * called to tell the driver to bind our modified fragment shader. - */ -static boolean -bind_aaline_fragment_shader(struct aaline_stage *aaline) -{ - struct draw_context *draw = aaline->stage.draw; - struct pipe_context *pipe = draw->pipe; - - if (!aaline->fs->aaline_fs && - !generate_aaline_fs(aaline)) - return FALSE; - - draw->suspend_flushing = TRUE; - aaline->driver_bind_fs_state(pipe, aaline->fs->aaline_fs); - draw->suspend_flushing = FALSE; - - return TRUE; -} - - - -static INLINE struct aaline_stage * -aaline_stage( struct draw_stage *stage ) -{ - return (struct aaline_stage *) stage; -} - - -/** - * Draw a wide line by drawing a quad, using geometry which will - * fullfill GL's antialiased line requirements. - */ -static void -aaline_line(struct draw_stage *stage, struct prim_header *header) -{ - const struct aaline_stage *aaline = aaline_stage(stage); - const float half_width = aaline->half_line_width; - struct prim_header tri; - struct vertex_header *v[8]; - uint texPos = aaline->tex_slot; - uint posPos = aaline->pos_slot; - float *pos, *tex; - float dx = header->v[1]->data[posPos][0] - header->v[0]->data[posPos][0]; - float dy = header->v[1]->data[posPos][1] - header->v[0]->data[posPos][1]; - double a = atan2(dy, dx); - float c_a = (float) cos(a), s_a = (float) sin(a); - uint i; - - /* XXX the ends of lines aren't quite perfect yet, but probably passable */ - dx = 0.5F * half_width; - dy = half_width; - - /* allocate/dup new verts */ - for (i = 0; i < 8; i++) { - v[i] = dup_vert(stage, header->v[i/4], i); - } - - /* - * Quad strip for line from v0 to v1 (*=endpoints): - * - * 1 3 5 7 - * +---+---------------------+---+ - * | | - * | *v0 v1* | - * | | - * +---+---------------------+---+ - * 0 2 4 6 - */ - - /* new verts */ - pos = v[0]->data[posPos]; - pos[0] += (-dx * c_a - dy * s_a); - pos[1] += (-dx * s_a + dy * c_a); - - pos = v[1]->data[posPos]; - pos[0] += (-dx * c_a - -dy * s_a); - pos[1] += (-dx * s_a + -dy * c_a); - - pos = v[2]->data[posPos]; - pos[0] += ( dx * c_a - dy * s_a); - pos[1] += ( dx * s_a + dy * c_a); - - pos = v[3]->data[posPos]; - pos[0] += ( dx * c_a - -dy * s_a); - pos[1] += ( dx * s_a + -dy * c_a); - - pos = v[4]->data[posPos]; - pos[0] += (-dx * c_a - dy * s_a); - pos[1] += (-dx * s_a + dy * c_a); - - pos = v[5]->data[posPos]; - pos[0] += (-dx * c_a - -dy * s_a); - pos[1] += (-dx * s_a + -dy * c_a); - - pos = v[6]->data[posPos]; - pos[0] += ( dx * c_a - dy * s_a); - pos[1] += ( dx * s_a + dy * c_a); - - pos = v[7]->data[posPos]; - pos[0] += ( dx * c_a - -dy * s_a); - pos[1] += ( dx * s_a + -dy * c_a); - - /* new texcoords */ - tex = v[0]->data[texPos]; - ASSIGN_4V(tex, 0, 0, 0, 1); - - tex = v[1]->data[texPos]; - ASSIGN_4V(tex, 0, 1, 0, 1); - - tex = v[2]->data[texPos]; - ASSIGN_4V(tex, .5, 0, 0, 1); - - tex = v[3]->data[texPos]; - ASSIGN_4V(tex, .5, 1, 0, 1); - - tex = v[4]->data[texPos]; - ASSIGN_4V(tex, .5, 0, 0, 1); - - tex = v[5]->data[texPos]; - ASSIGN_4V(tex, .5, 1, 0, 1); - - tex = v[6]->data[texPos]; - ASSIGN_4V(tex, 1, 0, 0, 1); - - tex = v[7]->data[texPos]; - ASSIGN_4V(tex, 1, 1, 0, 1); - - /* emit 6 tris for the quad strip */ - tri.v[0] = v[2]; tri.v[1] = v[1]; tri.v[2] = v[0]; - stage->next->tri( stage->next, &tri ); - - tri.v[0] = v[3]; tri.v[1] = v[1]; tri.v[2] = v[2]; - stage->next->tri( stage->next, &tri ); - - tri.v[0] = v[4]; tri.v[1] = v[3]; tri.v[2] = v[2]; - stage->next->tri( stage->next, &tri ); - - tri.v[0] = v[5]; tri.v[1] = v[3]; tri.v[2] = v[4]; - stage->next->tri( stage->next, &tri ); - - tri.v[0] = v[6]; tri.v[1] = v[5]; tri.v[2] = v[4]; - stage->next->tri( stage->next, &tri ); - - tri.v[0] = v[7]; tri.v[1] = v[5]; tri.v[2] = v[6]; - stage->next->tri( stage->next, &tri ); -} - - -static void -aaline_first_line(struct draw_stage *stage, struct prim_header *header) -{ - auto struct aaline_stage *aaline = aaline_stage(stage); - struct draw_context *draw = stage->draw; - struct pipe_context *pipe = draw->pipe; - const struct pipe_rasterizer_state *rast = draw->rasterizer; - uint num_samplers; - void *r; - - assert(draw->rasterizer->line_smooth); - - if (draw->rasterizer->line_width <= 2.2) - aaline->half_line_width = 1.1f; - else - aaline->half_line_width = 0.5f * draw->rasterizer->line_width; - - /* - * Bind (generate) our fragprog, sampler and texture - */ - if (!bind_aaline_fragment_shader(aaline)) { - stage->line = draw_pipe_passthrough_line; - stage->line(stage, header); - return; - } - - /* update vertex attrib info */ - aaline->pos_slot = draw_current_shader_position_output(draw);; - - /* allocate the extra post-transformed vertex attribute */ - aaline->tex_slot = draw_alloc_extra_vertex_attrib(draw, - TGSI_SEMANTIC_GENERIC, - aaline->fs->generic_attrib); - - /* how many samplers? */ - /* we'll use sampler/texture[pstip->sampler_unit] for the stipple */ - num_samplers = MAX2(aaline->num_sampler_views, aaline->num_samplers); - num_samplers = MAX2(num_samplers, aaline->fs->sampler_unit + 1); - - aaline->state.sampler[aaline->fs->sampler_unit] = aaline->sampler_cso; - pipe_sampler_view_reference(&aaline->state.sampler_views[aaline->fs->sampler_unit], - aaline->sampler_view); - - draw->suspend_flushing = TRUE; - aaline->driver_bind_sampler_states(pipe, num_samplers, aaline->state.sampler); - aaline->driver_set_sampler_views(pipe, num_samplers, aaline->state.sampler_views); - - /* Disable triangle culling, stippling, unfilled mode etc. */ - r = draw_get_rasterizer_no_cull(draw, rast->scissor, rast->flatshade); - pipe->bind_rasterizer_state(pipe, r); - - draw->suspend_flushing = FALSE; - - /* now really draw first line */ - stage->line = aaline_line; - stage->line(stage, header); -} - - -static void -aaline_flush(struct draw_stage *stage, unsigned flags) -{ - struct draw_context *draw = stage->draw; - struct aaline_stage *aaline = aaline_stage(stage); - struct pipe_context *pipe = draw->pipe; - - stage->line = aaline_first_line; - stage->next->flush( stage->next, flags ); - - /* restore original frag shader, texture, sampler state */ - draw->suspend_flushing = TRUE; - aaline->driver_bind_fs_state(pipe, aaline->fs->driver_fs); - aaline->driver_bind_sampler_states(pipe, aaline->num_samplers, - aaline->state.sampler); - aaline->driver_set_sampler_views(pipe, - aaline->num_sampler_views, - aaline->state.sampler_views); - - /* restore original rasterizer state */ - if (draw->rast_handle) { - pipe->bind_rasterizer_state(pipe, draw->rast_handle); - } - - draw->suspend_flushing = FALSE; - - draw_remove_extra_vertex_attribs(draw); -} - - -static void -aaline_reset_stipple_counter(struct draw_stage *stage) -{ - stage->next->reset_stipple_counter( stage->next ); -} - - -static void -aaline_destroy(struct draw_stage *stage) -{ - struct aaline_stage *aaline = aaline_stage(stage); - struct pipe_context *pipe = stage->draw->pipe; - uint i; - - for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { - pipe_sampler_view_reference(&aaline->state.sampler_views[i], NULL); - } - - if (aaline->sampler_cso) - pipe->delete_sampler_state(pipe, aaline->sampler_cso); - - if (aaline->texture) - pipe_resource_reference(&aaline->texture, NULL); - - if (aaline->sampler_view) { - pipe_sampler_view_reference(&aaline->sampler_view, NULL); - } - - draw_free_temp_verts( stage ); - - /* restore the old entry points */ - pipe->create_fs_state = aaline->driver_create_fs_state; - pipe->bind_fs_state = aaline->driver_bind_fs_state; - pipe->delete_fs_state = aaline->driver_delete_fs_state; - - pipe->bind_fragment_sampler_states = aaline->driver_bind_sampler_states; - pipe->set_fragment_sampler_views = aaline->driver_set_sampler_views; - - FREE( stage ); -} - - -static struct aaline_stage * -draw_aaline_stage(struct draw_context *draw) -{ - struct aaline_stage *aaline = CALLOC_STRUCT(aaline_stage); - if (aaline == NULL) - return NULL; - - aaline->stage.draw = draw; - aaline->stage.name = "aaline"; - aaline->stage.next = NULL; - aaline->stage.point = draw_pipe_passthrough_point; - aaline->stage.line = aaline_first_line; - aaline->stage.tri = draw_pipe_passthrough_tri; - aaline->stage.flush = aaline_flush; - aaline->stage.reset_stipple_counter = aaline_reset_stipple_counter; - aaline->stage.destroy = aaline_destroy; - - if (!draw_alloc_temp_verts( &aaline->stage, 8 )) - goto fail; - - return aaline; - - fail: - if (aaline) - aaline->stage.destroy(&aaline->stage); - - return NULL; -} - - -static struct aaline_stage * -aaline_stage_from_pipe(struct pipe_context *pipe) -{ - struct draw_context *draw = (struct draw_context *) pipe->draw; - return aaline_stage(draw->pipeline.aaline); -} - - -/** - * This function overrides the driver's create_fs_state() function and - * will typically be called by the state tracker. - */ -static void * -aaline_create_fs_state(struct pipe_context *pipe, - const struct pipe_shader_state *fs) -{ - struct aaline_stage *aaline = aaline_stage_from_pipe(pipe); - struct aaline_fragment_shader *aafs = CALLOC_STRUCT(aaline_fragment_shader); - - if (aafs == NULL) - return NULL; - - aafs->state.tokens = tgsi_dup_tokens(fs->tokens); - - /* pass-through */ - aafs->driver_fs = aaline->driver_create_fs_state(pipe, fs); - - return aafs; -} - - -static void -aaline_bind_fs_state(struct pipe_context *pipe, void *fs) -{ - struct aaline_stage *aaline = aaline_stage_from_pipe(pipe); - struct aaline_fragment_shader *aafs = (struct aaline_fragment_shader *) fs; - - /* save current */ - aaline->fs = aafs; - /* pass-through */ - aaline->driver_bind_fs_state(pipe, (aafs ? aafs->driver_fs : NULL)); -} - - -static void -aaline_delete_fs_state(struct pipe_context *pipe, void *fs) -{ - struct aaline_stage *aaline = aaline_stage_from_pipe(pipe); - struct aaline_fragment_shader *aafs = (struct aaline_fragment_shader *) fs; - - /* pass-through */ - aaline->driver_delete_fs_state(pipe, aafs->driver_fs); - - if (aafs->aaline_fs) - aaline->driver_delete_fs_state(pipe, aafs->aaline_fs); - - FREE((void*)aafs->state.tokens); - - FREE(aafs); -} - - -static void -aaline_bind_sampler_states(struct pipe_context *pipe, - unsigned num, void **sampler) -{ - struct aaline_stage *aaline = aaline_stage_from_pipe(pipe); - - /* save current */ - memcpy(aaline->state.sampler, sampler, num * sizeof(void *)); - aaline->num_samplers = num; - - /* pass-through */ - aaline->driver_bind_sampler_states(pipe, num, sampler); -} - - -static void -aaline_set_sampler_views(struct pipe_context *pipe, - unsigned num, - struct pipe_sampler_view **views) -{ - struct aaline_stage *aaline = aaline_stage_from_pipe(pipe); - uint i; - - /* save current */ - for (i = 0; i < num; i++) { - pipe_sampler_view_reference(&aaline->state.sampler_views[i], views[i]); - } - for ( ; i < PIPE_MAX_SAMPLERS; i++) { - pipe_sampler_view_reference(&aaline->state.sampler_views[i], NULL); - } - aaline->num_sampler_views = num; - - /* pass-through */ - aaline->driver_set_sampler_views(pipe, num, views); -} - - -/** - * Called by drivers that want to install this AA line prim stage - * into the draw module's pipeline. This will not be used if the - * hardware has native support for AA lines. - */ -boolean -draw_install_aaline_stage(struct draw_context *draw, struct pipe_context *pipe) -{ - struct aaline_stage *aaline; - - pipe->draw = (void *) draw; - - /* - * Create / install AA line drawing / prim stage - */ - aaline = draw_aaline_stage( draw ); - if (!aaline) - goto fail; - - /* create special texture, sampler state */ - if (!aaline_create_texture(aaline)) - goto fail; - - if (!aaline_create_sampler(aaline)) - goto fail; - - /* save original driver functions */ - aaline->driver_create_fs_state = pipe->create_fs_state; - aaline->driver_bind_fs_state = pipe->bind_fs_state; - aaline->driver_delete_fs_state = pipe->delete_fs_state; - - aaline->driver_bind_sampler_states = pipe->bind_fragment_sampler_states; - aaline->driver_set_sampler_views = pipe->set_fragment_sampler_views; - - /* override the driver's functions */ - pipe->create_fs_state = aaline_create_fs_state; - pipe->bind_fs_state = aaline_bind_fs_state; - pipe->delete_fs_state = aaline_delete_fs_state; - - pipe->bind_fragment_sampler_states = aaline_bind_sampler_states; - pipe->set_fragment_sampler_views = aaline_set_sampler_views; - - /* Install once everything is known to be OK: - */ - draw->pipeline.aaline = &aaline->stage; - - return TRUE; - - fail: - if (aaline) - aaline->stage.destroy( &aaline->stage ); - - return FALSE; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_aapoint.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_aapoint.c deleted file mode 100644 index 248f26b91fd..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_aapoint.c +++ /dev/null @@ -1,909 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * AA point stage: AA points are converted to quads and rendered with a - * special fragment shader. Another approach would be to use a texture - * map image of a point, but experiments indicate the quality isn't nearly - * as good as this approach. - * - * Note: this looks a lot like draw_aaline.c but there's actually little - * if any code that can be shared. - * - * Authors: Brian Paul - */ - - -#include "pipe/p_context.h" -#include "pipe/p_defines.h" -#include "pipe/p_shader_tokens.h" - -#include "tgsi/tgsi_transform.h" -#include "tgsi/tgsi_dump.h" - -#include "util/u_math.h" -#include "util/u_memory.h" - -#include "draw_context.h" -#include "draw_vs.h" -#include "draw_pipe.h" - - -/** Approx number of new tokens for instructions in aa_transform_inst() */ -#define NUM_NEW_TOKENS 200 - - -/* - * Enabling NORMALIZE might give _slightly_ better results. - * Basically, it controls whether we compute distance as d=sqrt(x*x+y*y) or - * d=x*x+y*y. Since we're working with a unit circle, the later seems - * close enough and saves some costly instructions. - */ -#define NORMALIZE 0 - - -/** - * Subclass of pipe_shader_state to carry extra fragment shader info. - */ -struct aapoint_fragment_shader -{ - struct pipe_shader_state state; - void *driver_fs; /**< the regular shader */ - void *aapoint_fs; /**< the aa point-augmented shader */ - int generic_attrib; /**< The generic input attrib/texcoord we'll use */ -}; - - -/** - * Subclass of draw_stage - */ -struct aapoint_stage -{ - struct draw_stage stage; - - /** half of pipe_rasterizer_state::point_size */ - float radius; - - /** vertex attrib slot containing point size */ - int psize_slot; - - /** this is the vertex attrib slot for the new texcoords */ - uint tex_slot; - - /** vertex attrib slot containing position */ - uint pos_slot; - - /** Currently bound fragment shader */ - struct aapoint_fragment_shader *fs; - - /* - * Driver interface/override functions - */ - void * (*driver_create_fs_state)(struct pipe_context *, - const struct pipe_shader_state *); - void (*driver_bind_fs_state)(struct pipe_context *, void *); - void (*driver_delete_fs_state)(struct pipe_context *, void *); -}; - - - -/** - * Subclass of tgsi_transform_context, used for transforming the - * user's fragment shader to add the special AA instructions. - */ -struct aa_transform_context { - struct tgsi_transform_context base; - uint tempsUsed; /**< bitmask */ - int colorOutput; /**< which output is the primary color */ - int maxInput, maxGeneric; /**< max input index found */ - int tmp0, colorTemp; /**< temp registers */ - boolean firstInstruction; -}; - - -/** - * TGSI declaration transform callback. - * Look for two free temp regs and available input reg for new texcoords. - */ -static void -aa_transform_decl(struct tgsi_transform_context *ctx, - struct tgsi_full_declaration *decl) -{ - struct aa_transform_context *aactx = (struct aa_transform_context *) ctx; - - if (decl->Declaration.File == TGSI_FILE_OUTPUT && - decl->Semantic.Name == TGSI_SEMANTIC_COLOR && - decl->Semantic.Index == 0) { - aactx->colorOutput = decl->Range.First; - } - else if (decl->Declaration.File == TGSI_FILE_INPUT) { - if ((int) decl->Range.Last > aactx->maxInput) - aactx->maxInput = decl->Range.Last; - if (decl->Semantic.Name == TGSI_SEMANTIC_GENERIC && - (int) decl->Semantic.Index > aactx->maxGeneric) { - aactx->maxGeneric = decl->Semantic.Index; - } - } - else if (decl->Declaration.File == TGSI_FILE_TEMPORARY) { - uint i; - for (i = decl->Range.First; - i <= decl->Range.Last; i++) { - aactx->tempsUsed |= (1 << i); - } - } - - ctx->emit_declaration(ctx, decl); -} - - -/** - * TGSI instruction transform callback. - * Replace writes to result.color w/ a temp reg. - * Upon END instruction, insert texture sampling code for antialiasing. - */ -static void -aa_transform_inst(struct tgsi_transform_context *ctx, - struct tgsi_full_instruction *inst) -{ - struct aa_transform_context *aactx = (struct aa_transform_context *) ctx; - struct tgsi_full_instruction newInst; - - if (aactx->firstInstruction) { - /* emit our new declarations before the first instruction */ - - struct tgsi_full_declaration decl; - const int texInput = aactx->maxInput + 1; - int tmp0; - uint i; - - /* find two free temp regs */ - for (i = 0; i < 32; i++) { - if ((aactx->tempsUsed & (1 << i)) == 0) { - /* found a free temp */ - if (aactx->tmp0 < 0) - aactx->tmp0 = i; - else if (aactx->colorTemp < 0) - aactx->colorTemp = i; - else - break; - } - } - - assert(aactx->colorTemp != aactx->tmp0); - - tmp0 = aactx->tmp0; - - /* declare new generic input/texcoord */ - decl = tgsi_default_full_declaration(); - decl.Declaration.File = TGSI_FILE_INPUT; - /* XXX this could be linear... */ - decl.Declaration.Interpolate = TGSI_INTERPOLATE_PERSPECTIVE; - decl.Declaration.Semantic = 1; - decl.Semantic.Name = TGSI_SEMANTIC_GENERIC; - decl.Semantic.Index = aactx->maxGeneric + 1; - decl.Range.First = - decl.Range.Last = texInput; - ctx->emit_declaration(ctx, &decl); - - /* declare new temp regs */ - decl = tgsi_default_full_declaration(); - decl.Declaration.File = TGSI_FILE_TEMPORARY; - decl.Range.First = - decl.Range.Last = tmp0; - ctx->emit_declaration(ctx, &decl); - - decl = tgsi_default_full_declaration(); - decl.Declaration.File = TGSI_FILE_TEMPORARY; - decl.Range.First = - decl.Range.Last = aactx->colorTemp; - ctx->emit_declaration(ctx, &decl); - - aactx->firstInstruction = FALSE; - - - /* - * Emit code to compute fragment coverage, kill if outside point radius - * - * Temp reg0 usage: - * t0.x = distance of fragment from center point - * t0.y = boolean, is t0.x > 1.0, also misc temp usage - * t0.z = temporary for computing 1/(1-k) value - * t0.w = final coverage value - */ - - /* MUL t0.xy, tex, tex; # compute x^2, y^2 */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_MUL; - newInst.Instruction.NumDstRegs = 1; - newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Dst[0].Register.Index = tmp0; - newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_XY; - newInst.Instruction.NumSrcRegs = 2; - newInst.Src[0].Register.File = TGSI_FILE_INPUT; - newInst.Src[0].Register.Index = texInput; - newInst.Src[1].Register.File = TGSI_FILE_INPUT; - newInst.Src[1].Register.Index = texInput; - ctx->emit_instruction(ctx, &newInst); - - /* ADD t0.x, t0.x, t0.y; # x^2 + y^2 */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_ADD; - newInst.Instruction.NumDstRegs = 1; - newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Dst[0].Register.Index = tmp0; - newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_X; - newInst.Instruction.NumSrcRegs = 2; - newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[0].Register.Index = tmp0; - newInst.Src[0].Register.SwizzleX = TGSI_SWIZZLE_X; - newInst.Src[1].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[1].Register.Index = tmp0; - newInst.Src[1].Register.SwizzleX = TGSI_SWIZZLE_Y; - ctx->emit_instruction(ctx, &newInst); - -#if NORMALIZE /* OPTIONAL normalization of length */ - /* RSQ t0.x, t0.x; */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_RSQ; - newInst.Instruction.NumDstRegs = 1; - newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Dst[0].Register.Index = tmp0; - newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_X; - newInst.Instruction.NumSrcRegs = 1; - newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[0].Register.Index = tmp0; - ctx->emit_instruction(ctx, &newInst); - - /* RCP t0.x, t0.x; */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_RCP; - newInst.Instruction.NumDstRegs = 1; - newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Dst[0].Register.Index = tmp0; - newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_X; - newInst.Instruction.NumSrcRegs = 1; - newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[0].Register.Index = tmp0; - ctx->emit_instruction(ctx, &newInst); -#endif - - /* SGT t0.y, t0.xxxx, tex.wwww; # bool b = d > 1 (NOTE tex.w == 1) */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_SGT; - newInst.Instruction.NumDstRegs = 1; - newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Dst[0].Register.Index = tmp0; - newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_Y; - newInst.Instruction.NumSrcRegs = 2; - newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[0].Register.Index = tmp0; - newInst.Src[0].Register.SwizzleY = TGSI_SWIZZLE_X; - newInst.Src[1].Register.File = TGSI_FILE_INPUT; - newInst.Src[1].Register.Index = texInput; - newInst.Src[1].Register.SwizzleY = TGSI_SWIZZLE_W; - ctx->emit_instruction(ctx, &newInst); - - /* KIL -tmp0.yyyy; # if -tmp0.y < 0, KILL */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_KIL; - newInst.Instruction.NumDstRegs = 0; - newInst.Instruction.NumSrcRegs = 1; - newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[0].Register.Index = tmp0; - newInst.Src[0].Register.SwizzleX = TGSI_SWIZZLE_Y; - newInst.Src[0].Register.SwizzleY = TGSI_SWIZZLE_Y; - newInst.Src[0].Register.SwizzleZ = TGSI_SWIZZLE_Y; - newInst.Src[0].Register.SwizzleW = TGSI_SWIZZLE_Y; - newInst.Src[0].Register.Negate = 1; - ctx->emit_instruction(ctx, &newInst); - - - /* compute coverage factor = (1-d)/(1-k) */ - - /* SUB t0.z, tex.w, tex.z; # m = 1 - k */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_SUB; - newInst.Instruction.NumDstRegs = 1; - newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Dst[0].Register.Index = tmp0; - newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_Z; - newInst.Instruction.NumSrcRegs = 2; - newInst.Src[0].Register.File = TGSI_FILE_INPUT; - newInst.Src[0].Register.Index = texInput; - newInst.Src[0].Register.SwizzleZ = TGSI_SWIZZLE_W; - newInst.Src[1].Register.File = TGSI_FILE_INPUT; - newInst.Src[1].Register.Index = texInput; - newInst.Src[1].Register.SwizzleZ = TGSI_SWIZZLE_Z; - ctx->emit_instruction(ctx, &newInst); - - /* RCP t0.z, t0.z; # t0.z = 1 / m */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_RCP; - newInst.Instruction.NumDstRegs = 1; - newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Dst[0].Register.Index = tmp0; - newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_Z; - newInst.Instruction.NumSrcRegs = 1; - newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[0].Register.Index = tmp0; - newInst.Src[0].Register.SwizzleX = TGSI_SWIZZLE_Z; - ctx->emit_instruction(ctx, &newInst); - - /* SUB t0.y, 1, t0.x; # d = 1 - d */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_SUB; - newInst.Instruction.NumDstRegs = 1; - newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Dst[0].Register.Index = tmp0; - newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_Y; - newInst.Instruction.NumSrcRegs = 2; - newInst.Src[0].Register.File = TGSI_FILE_INPUT; - newInst.Src[0].Register.Index = texInput; - newInst.Src[0].Register.SwizzleY = TGSI_SWIZZLE_W; - newInst.Src[1].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[1].Register.Index = tmp0; - newInst.Src[1].Register.SwizzleY = TGSI_SWIZZLE_X; - ctx->emit_instruction(ctx, &newInst); - - /* MUL t0.w, t0.y, t0.z; # coverage = d * m */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_MUL; - newInst.Instruction.NumDstRegs = 1; - newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Dst[0].Register.Index = tmp0; - newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_W; - newInst.Instruction.NumSrcRegs = 2; - newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[0].Register.Index = tmp0; - newInst.Src[0].Register.SwizzleW = TGSI_SWIZZLE_Y; - newInst.Src[1].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[1].Register.Index = tmp0; - newInst.Src[1].Register.SwizzleW = TGSI_SWIZZLE_Z; - ctx->emit_instruction(ctx, &newInst); - - /* SLE t0.y, t0.x, tex.z; # bool b = distance <= k */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_SLE; - newInst.Instruction.NumDstRegs = 1; - newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Dst[0].Register.Index = tmp0; - newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_Y; - newInst.Instruction.NumSrcRegs = 2; - newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[0].Register.Index = tmp0; - newInst.Src[0].Register.SwizzleY = TGSI_SWIZZLE_X; - newInst.Src[1].Register.File = TGSI_FILE_INPUT; - newInst.Src[1].Register.Index = texInput; - newInst.Src[1].Register.SwizzleY = TGSI_SWIZZLE_Z; - ctx->emit_instruction(ctx, &newInst); - - /* CMP t0.w, -t0.y, tex.w, t0.w; - * # if -t0.y < 0 then - * t0.w = 1 - * else - * t0.w = t0.w - */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_CMP; - newInst.Instruction.NumDstRegs = 1; - newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Dst[0].Register.Index = tmp0; - newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_W; - newInst.Instruction.NumSrcRegs = 3; - newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[0].Register.Index = tmp0; - newInst.Src[0].Register.SwizzleX = TGSI_SWIZZLE_Y; - newInst.Src[0].Register.SwizzleY = TGSI_SWIZZLE_Y; - newInst.Src[0].Register.SwizzleZ = TGSI_SWIZZLE_Y; - newInst.Src[0].Register.SwizzleW = TGSI_SWIZZLE_Y; - newInst.Src[0].Register.Negate = 1; - newInst.Src[1].Register.File = TGSI_FILE_INPUT; - newInst.Src[1].Register.Index = texInput; - newInst.Src[1].Register.SwizzleX = TGSI_SWIZZLE_W; - newInst.Src[1].Register.SwizzleY = TGSI_SWIZZLE_W; - newInst.Src[1].Register.SwizzleZ = TGSI_SWIZZLE_W; - newInst.Src[1].Register.SwizzleW = TGSI_SWIZZLE_W; - newInst.Src[2].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[2].Register.Index = tmp0; - newInst.Src[2].Register.SwizzleX = TGSI_SWIZZLE_W; - newInst.Src[2].Register.SwizzleY = TGSI_SWIZZLE_W; - newInst.Src[2].Register.SwizzleZ = TGSI_SWIZZLE_W; - newInst.Src[2].Register.SwizzleW = TGSI_SWIZZLE_W; - ctx->emit_instruction(ctx, &newInst); - - } - - if (inst->Instruction.Opcode == TGSI_OPCODE_END) { - /* add alpha modulation code at tail of program */ - - /* MOV result.color.xyz, colorTemp; */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_MOV; - newInst.Instruction.NumDstRegs = 1; - newInst.Dst[0].Register.File = TGSI_FILE_OUTPUT; - newInst.Dst[0].Register.Index = aactx->colorOutput; - newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_XYZ; - newInst.Instruction.NumSrcRegs = 1; - newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[0].Register.Index = aactx->colorTemp; - ctx->emit_instruction(ctx, &newInst); - - /* MUL result.color.w, colorTemp, tmp0.w; */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_MUL; - newInst.Instruction.NumDstRegs = 1; - newInst.Dst[0].Register.File = TGSI_FILE_OUTPUT; - newInst.Dst[0].Register.Index = aactx->colorOutput; - newInst.Dst[0].Register.WriteMask = TGSI_WRITEMASK_W; - newInst.Instruction.NumSrcRegs = 2; - newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[0].Register.Index = aactx->colorTemp; - newInst.Src[1].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[1].Register.Index = aactx->tmp0; - ctx->emit_instruction(ctx, &newInst); - } - else { - /* Not an END instruction. - * Look for writes to result.color and replace with colorTemp reg. - */ - uint i; - - for (i = 0; i < inst->Instruction.NumDstRegs; i++) { - struct tgsi_full_dst_register *dst = &inst->Dst[i]; - if (dst->Register.File == TGSI_FILE_OUTPUT && - dst->Register.Index == aactx->colorOutput) { - dst->Register.File = TGSI_FILE_TEMPORARY; - dst->Register.Index = aactx->colorTemp; - } - } - } - - ctx->emit_instruction(ctx, inst); -} - - -/** - * Generate the frag shader we'll use for drawing AA points. - * This will be the user's shader plus some texture/modulate instructions. - */ -static boolean -generate_aapoint_fs(struct aapoint_stage *aapoint) -{ - const struct pipe_shader_state *orig_fs = &aapoint->fs->state; - struct pipe_shader_state aapoint_fs; - struct aa_transform_context transform; - const uint newLen = tgsi_num_tokens(orig_fs->tokens) + NUM_NEW_TOKENS; - struct pipe_context *pipe = aapoint->stage.draw->pipe; - - aapoint_fs = *orig_fs; /* copy to init */ - aapoint_fs.tokens = tgsi_alloc_tokens(newLen); - if (aapoint_fs.tokens == NULL) - return FALSE; - - memset(&transform, 0, sizeof(transform)); - transform.colorOutput = -1; - transform.maxInput = -1; - transform.maxGeneric = -1; - transform.colorTemp = -1; - transform.tmp0 = -1; - transform.firstInstruction = TRUE; - transform.base.transform_instruction = aa_transform_inst; - transform.base.transform_declaration = aa_transform_decl; - - tgsi_transform_shader(orig_fs->tokens, - (struct tgsi_token *) aapoint_fs.tokens, - newLen, &transform.base); - -#if 0 /* DEBUG */ - debug_printf("draw_aapoint, orig shader:\n"); - tgsi_dump(orig_fs->tokens, 0); - debug_printf("draw_aapoint, new shader:\n"); - tgsi_dump(aapoint_fs.tokens, 0); -#endif - - aapoint->fs->aapoint_fs - = aapoint->driver_create_fs_state(pipe, &aapoint_fs); - if (aapoint->fs->aapoint_fs == NULL) - goto fail; - - aapoint->fs->generic_attrib = transform.maxGeneric + 1; - FREE((void *)aapoint_fs.tokens); - return TRUE; - -fail: - FREE((void *)aapoint_fs.tokens); - return FALSE; -} - - -/** - * When we're about to draw our first AA point in a batch, this function is - * called to tell the driver to bind our modified fragment shader. - */ -static boolean -bind_aapoint_fragment_shader(struct aapoint_stage *aapoint) -{ - struct draw_context *draw = aapoint->stage.draw; - struct pipe_context *pipe = draw->pipe; - - if (!aapoint->fs->aapoint_fs && - !generate_aapoint_fs(aapoint)) - return FALSE; - - draw->suspend_flushing = TRUE; - aapoint->driver_bind_fs_state(pipe, aapoint->fs->aapoint_fs); - draw->suspend_flushing = FALSE; - - return TRUE; -} - - - -static INLINE struct aapoint_stage * -aapoint_stage( struct draw_stage *stage ) -{ - return (struct aapoint_stage *) stage; -} - - - - -/** - * Draw an AA point by drawing a quad. - */ -static void -aapoint_point(struct draw_stage *stage, struct prim_header *header) -{ - const struct aapoint_stage *aapoint = aapoint_stage(stage); - struct prim_header tri; - struct vertex_header *v[4]; - const uint tex_slot = aapoint->tex_slot; - const uint pos_slot = aapoint->pos_slot; - float radius, *pos, *tex; - uint i; - float k; - - if (aapoint->psize_slot >= 0) { - radius = 0.5f * header->v[0]->data[aapoint->psize_slot][0]; - } - else { - radius = aapoint->radius; - } - - /* - * Note: the texcoords (generic attrib, really) we use are special: - * The S and T components simply vary from -1 to +1. - * The R component is k, below. - * The Q component is 1.0 and will used as a handy constant in the - * fragment shader. - */ - - /* - * k is the threshold distance from the point's center at which - * we begin alpha attenuation (the coverage value). - * Operating within a unit circle, we'll compute the fragment's - * distance 'd' from the center point using the texcoords. - * IF d > 1.0 THEN - * KILL fragment - * ELSE IF d > k THEN - * compute coverage in [0,1] proportional to d in [k, 1]. - * ELSE - * coverage = 1.0; // full coverage - * ENDIF - * - * Note: the ELSEIF and ELSE clauses are actually implemented with CMP to - * avoid using IF/ELSE/ENDIF TGSI opcodes. - */ - -#if !NORMALIZE - k = 1.0f / radius; - k = 1.0f - 2.0f * k + k * k; -#else - k = 1.0f - 1.0f / radius; -#endif - - /* allocate/dup new verts */ - for (i = 0; i < 4; i++) { - v[i] = dup_vert(stage, header->v[0], i); - } - - /* new verts */ - pos = v[0]->data[pos_slot]; - pos[0] -= radius; - pos[1] -= radius; - - pos = v[1]->data[pos_slot]; - pos[0] += radius; - pos[1] -= radius; - - pos = v[2]->data[pos_slot]; - pos[0] += radius; - pos[1] += radius; - - pos = v[3]->data[pos_slot]; - pos[0] -= radius; - pos[1] += radius; - - /* new texcoords */ - tex = v[0]->data[tex_slot]; - ASSIGN_4V(tex, -1, -1, k, 1); - - tex = v[1]->data[tex_slot]; - ASSIGN_4V(tex, 1, -1, k, 1); - - tex = v[2]->data[tex_slot]; - ASSIGN_4V(tex, 1, 1, k, 1); - - tex = v[3]->data[tex_slot]; - ASSIGN_4V(tex, -1, 1, k, 1); - - /* emit 2 tris for the quad strip */ - tri.v[0] = v[0]; - tri.v[1] = v[1]; - tri.v[2] = v[2]; - stage->next->tri( stage->next, &tri ); - - tri.v[0] = v[0]; - tri.v[1] = v[2]; - tri.v[2] = v[3]; - stage->next->tri( stage->next, &tri ); -} - - -static void -aapoint_first_point(struct draw_stage *stage, struct prim_header *header) -{ - auto struct aapoint_stage *aapoint = aapoint_stage(stage); - struct draw_context *draw = stage->draw; - struct pipe_context *pipe = draw->pipe; - const struct pipe_rasterizer_state *rast = draw->rasterizer; - void *r; - - assert(draw->rasterizer->point_smooth); - - if (draw->rasterizer->point_size <= 2.0) - aapoint->radius = 1.0; - else - aapoint->radius = 0.5f * draw->rasterizer->point_size; - - /* - * Bind (generate) our fragprog. - */ - bind_aapoint_fragment_shader(aapoint); - - /* update vertex attrib info */ - aapoint->pos_slot = draw_current_shader_position_output(draw); - - /* allocate the extra post-transformed vertex attribute */ - aapoint->tex_slot = draw_alloc_extra_vertex_attrib(draw, - TGSI_SEMANTIC_GENERIC, - aapoint->fs->generic_attrib); - assert(aapoint->tex_slot > 0); /* output[0] is vertex pos */ - - /* find psize slot in post-transform vertex */ - aapoint->psize_slot = -1; - if (draw->rasterizer->point_size_per_vertex) { - const struct tgsi_shader_info *info = draw_get_shader_info(draw); - uint i; - /* find PSIZ vertex output */ - for (i = 0; i < info->num_outputs; i++) { - if (info->output_semantic_name[i] == TGSI_SEMANTIC_PSIZE) { - aapoint->psize_slot = i; - break; - } - } - } - - draw->suspend_flushing = TRUE; - - /* Disable triangle culling, stippling, unfilled mode etc. */ - r = draw_get_rasterizer_no_cull(draw, rast->scissor, rast->flatshade); - pipe->bind_rasterizer_state(pipe, r); - - draw->suspend_flushing = FALSE; - - /* now really draw first point */ - stage->point = aapoint_point; - stage->point(stage, header); -} - - -static void -aapoint_flush(struct draw_stage *stage, unsigned flags) -{ - struct draw_context *draw = stage->draw; - struct aapoint_stage *aapoint = aapoint_stage(stage); - struct pipe_context *pipe = draw->pipe; - - stage->point = aapoint_first_point; - stage->next->flush( stage->next, flags ); - - /* restore original frag shader */ - draw->suspend_flushing = TRUE; - aapoint->driver_bind_fs_state(pipe, aapoint->fs->driver_fs); - - /* restore original rasterizer state */ - if (draw->rast_handle) { - pipe->bind_rasterizer_state(pipe, draw->rast_handle); - } - - draw->suspend_flushing = FALSE; - - draw_remove_extra_vertex_attribs(draw); -} - - -static void -aapoint_reset_stipple_counter(struct draw_stage *stage) -{ - stage->next->reset_stipple_counter( stage->next ); -} - - -static void -aapoint_destroy(struct draw_stage *stage) -{ - struct aapoint_stage* aapoint = aapoint_stage(stage); - struct pipe_context *pipe = stage->draw->pipe; - - draw_free_temp_verts( stage ); - - /* restore the old entry points */ - pipe->create_fs_state = aapoint->driver_create_fs_state; - pipe->bind_fs_state = aapoint->driver_bind_fs_state; - pipe->delete_fs_state = aapoint->driver_delete_fs_state; - - FREE( stage ); -} - - -static struct aapoint_stage * -draw_aapoint_stage(struct draw_context *draw) -{ - struct aapoint_stage *aapoint = CALLOC_STRUCT(aapoint_stage); - if (aapoint == NULL) - goto fail; - - aapoint->stage.draw = draw; - aapoint->stage.name = "aapoint"; - aapoint->stage.next = NULL; - aapoint->stage.point = aapoint_first_point; - aapoint->stage.line = draw_pipe_passthrough_line; - aapoint->stage.tri = draw_pipe_passthrough_tri; - aapoint->stage.flush = aapoint_flush; - aapoint->stage.reset_stipple_counter = aapoint_reset_stipple_counter; - aapoint->stage.destroy = aapoint_destroy; - - if (!draw_alloc_temp_verts( &aapoint->stage, 4 )) - goto fail; - - return aapoint; - - fail: - if (aapoint) - aapoint->stage.destroy(&aapoint->stage); - - return NULL; - -} - - -static struct aapoint_stage * -aapoint_stage_from_pipe(struct pipe_context *pipe) -{ - struct draw_context *draw = (struct draw_context *) pipe->draw; - return aapoint_stage(draw->pipeline.aapoint); -} - - -/** - * This function overrides the driver's create_fs_state() function and - * will typically be called by the state tracker. - */ -static void * -aapoint_create_fs_state(struct pipe_context *pipe, - const struct pipe_shader_state *fs) -{ - struct aapoint_stage *aapoint = aapoint_stage_from_pipe(pipe); - struct aapoint_fragment_shader *aafs = CALLOC_STRUCT(aapoint_fragment_shader); - if (aafs == NULL) - return NULL; - - aafs->state.tokens = tgsi_dup_tokens(fs->tokens); - - /* pass-through */ - aafs->driver_fs = aapoint->driver_create_fs_state(pipe, fs); - - return aafs; -} - - -static void -aapoint_bind_fs_state(struct pipe_context *pipe, void *fs) -{ - struct aapoint_stage *aapoint = aapoint_stage_from_pipe(pipe); - struct aapoint_fragment_shader *aafs = (struct aapoint_fragment_shader *) fs; - /* save current */ - aapoint->fs = aafs; - /* pass-through */ - aapoint->driver_bind_fs_state(pipe, - (aafs ? aafs->driver_fs : NULL)); -} - - -static void -aapoint_delete_fs_state(struct pipe_context *pipe, void *fs) -{ - struct aapoint_stage *aapoint = aapoint_stage_from_pipe(pipe); - struct aapoint_fragment_shader *aafs = (struct aapoint_fragment_shader *) fs; - - /* pass-through */ - aapoint->driver_delete_fs_state(pipe, aafs->driver_fs); - - if (aafs->aapoint_fs) - aapoint->driver_delete_fs_state(pipe, aafs->aapoint_fs); - - FREE((void*)aafs->state.tokens); - - FREE(aafs); -} - - -/** - * Called by drivers that want to install this AA point prim stage - * into the draw module's pipeline. This will not be used if the - * hardware has native support for AA points. - */ -boolean -draw_install_aapoint_stage(struct draw_context *draw, - struct pipe_context *pipe) -{ - struct aapoint_stage *aapoint; - - pipe->draw = (void *) draw; - - /* - * Create / install AA point drawing / prim stage - */ - aapoint = draw_aapoint_stage( draw ); - if (aapoint == NULL) - return FALSE; - - /* save original driver functions */ - aapoint->driver_create_fs_state = pipe->create_fs_state; - aapoint->driver_bind_fs_state = pipe->bind_fs_state; - aapoint->driver_delete_fs_state = pipe->delete_fs_state; - - /* override the driver's functions */ - pipe->create_fs_state = aapoint_create_fs_state; - pipe->bind_fs_state = aapoint_bind_fs_state; - pipe->delete_fs_state = aapoint_delete_fs_state; - - draw->pipeline.aapoint = &aapoint->stage; - - return TRUE; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_clip.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_clip.c deleted file mode 100644 index f7019725fdf..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_clip.c +++ /dev/null @@ -1,645 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \brief Clipping stage - * - * \author Keith Whitwell - */ - - -#include "util/u_memory.h" -#include "util/u_math.h" - -#include "pipe/p_shader_tokens.h" - -#include "draw_vs.h" -#include "draw_pipe.h" - - -#ifndef IS_NEGATIVE -#define IS_NEGATIVE(X) ((X) < 0.0) -#endif - -#ifndef DIFFERENT_SIGNS -#define DIFFERENT_SIGNS(x, y) ((x) * (y) <= 0.0F && (x) - (y) != 0.0F) -#endif - -#define MAX_CLIPPED_VERTICES ((2 * (6 + PIPE_MAX_CLIP_PLANES))+1) - - - -struct clip_stage { - struct draw_stage stage; /**< base class */ - - /* Basically duplicate some of the flatshading logic here: - */ - boolean flat; - uint num_color_attribs; - uint color_attribs[4]; /* front/back primary/secondary colors */ - - float (*plane)[4]; -}; - - -/** Cast wrapper */ -static INLINE struct clip_stage *clip_stage( struct draw_stage *stage ) -{ - return (struct clip_stage *)stage; -} - - -#define LINTERP(T, OUT, IN) ((OUT) + (T) * ((IN) - (OUT))) - - -/* All attributes are float[4], so this is easy: - */ -static void interp_attr( float dst[4], - float t, - const float in[4], - const float out[4] ) -{ - dst[0] = LINTERP( t, out[0], in[0] ); - dst[1] = LINTERP( t, out[1], in[1] ); - dst[2] = LINTERP( t, out[2], in[2] ); - dst[3] = LINTERP( t, out[3], in[3] ); -} - - -/** - * Copy front/back, primary/secondary colors from src vertex to dst vertex. - * Used when flat shading. - */ -static void copy_colors( struct draw_stage *stage, - struct vertex_header *dst, - const struct vertex_header *src ) -{ - const struct clip_stage *clipper = clip_stage(stage); - uint i; - for (i = 0; i < clipper->num_color_attribs; i++) { - const uint attr = clipper->color_attribs[i]; - COPY_4FV(dst->data[attr], src->data[attr]); - } -} - - - -/* Interpolate between two vertices to produce a third. - */ -static void interp( const struct clip_stage *clip, - struct vertex_header *dst, - float t, - const struct vertex_header *out, - const struct vertex_header *in ) -{ - const unsigned nr_attrs = draw_current_shader_outputs(clip->stage.draw); - const unsigned pos_attr = draw_current_shader_position_output(clip->stage.draw); - const unsigned clip_attr = draw_current_shader_clipvertex_output(clip->stage.draw); - unsigned clip_dist[2]; - unsigned j; - - clip_dist[0] = draw_current_shader_clipdistance_output(clip->stage.draw, 0); - clip_dist[1] = draw_current_shader_clipdistance_output(clip->stage.draw, 1); - - /* Vertex header. - */ - dst->clipmask = 0; - dst->edgeflag = 0; /* will get overwritten later */ - dst->have_clipdist = in->have_clipdist; - dst->vertex_id = UNDEFINED_VERTEX_ID; - - /* Interpolate the clip-space coords. - */ - interp_attr(dst->clip, t, in->clip, out->clip); - /* interpolate the clip-space position */ - interp_attr(dst->pre_clip_pos, t, in->pre_clip_pos, out->pre_clip_pos); - - /* Do the projective divide and viewport transformation to get - * new window coordinates: - */ - { - const float *pos = dst->pre_clip_pos; - const float *scale = clip->stage.draw->viewport.scale; - const float *trans = clip->stage.draw->viewport.translate; - const float oow = 1.0f / pos[3]; - - dst->data[pos_attr][0] = pos[0] * oow * scale[0] + trans[0]; - dst->data[pos_attr][1] = pos[1] * oow * scale[1] + trans[1]; - dst->data[pos_attr][2] = pos[2] * oow * scale[2] + trans[2]; - dst->data[pos_attr][3] = oow; - } - - /* Other attributes - */ - for (j = 0; j < nr_attrs; j++) { - if (j != pos_attr && j != clip_attr) - interp_attr(dst->data[j], t, in->data[j], out->data[j]); - } -} - - -/** - * Emit a post-clip polygon to the next pipeline stage. The polygon - * will be convex and the provoking vertex will always be vertex[0]. - */ -static void emit_poly( struct draw_stage *stage, - struct vertex_header **inlist, - const boolean *edgeflags, - unsigned n, - const struct prim_header *origPrim) -{ - struct prim_header header; - unsigned i; - ushort edge_first, edge_middle, edge_last; - - if (stage->draw->rasterizer->flatshade_first) { - edge_first = DRAW_PIPE_EDGE_FLAG_0; - edge_middle = DRAW_PIPE_EDGE_FLAG_1; - edge_last = DRAW_PIPE_EDGE_FLAG_2; - } - else { - edge_first = DRAW_PIPE_EDGE_FLAG_2; - edge_middle = DRAW_PIPE_EDGE_FLAG_0; - edge_last = DRAW_PIPE_EDGE_FLAG_1; - } - - if (!edgeflags[0]) - edge_first = 0; - - /* later stages may need the determinant, but only the sign matters */ - header.det = origPrim->det; - header.flags = DRAW_PIPE_RESET_STIPPLE | edge_first | edge_middle; - header.pad = 0; - - for (i = 2; i < n; i++, header.flags = edge_middle) { - /* order the triangle verts to respect the provoking vertex mode */ - if (stage->draw->rasterizer->flatshade_first) { - header.v[0] = inlist[0]; /* the provoking vertex */ - header.v[1] = inlist[i-1]; - header.v[2] = inlist[i]; - } - else { - header.v[0] = inlist[i-1]; - header.v[1] = inlist[i]; - header.v[2] = inlist[0]; /* the provoking vertex */ - } - - if (!edgeflags[i-1]) { - header.flags &= ~edge_middle; - } - - if (i == n - 1 && edgeflags[i]) - header.flags |= edge_last; - - if (0) { - const struct draw_vertex_shader *vs = stage->draw->vs.vertex_shader; - uint j, k; - debug_printf("Clipped tri: (flat-shade-first = %d)\n", - stage->draw->rasterizer->flatshade_first); - for (j = 0; j < 3; j++) { - for (k = 0; k < vs->info.num_outputs; k++) { - debug_printf(" Vert %d: Attr %d: %f %f %f %f\n", j, k, - header.v[j]->data[k][0], - header.v[j]->data[k][1], - header.v[j]->data[k][2], - header.v[j]->data[k][3]); - } - } - } - - stage->next->tri( stage->next, &header ); - } -} - - -static INLINE float -dot4(const float *a, const float *b) -{ - return (a[0] * b[0] + - a[1] * b[1] + - a[2] * b[2] + - a[3] * b[3]); -} - -/* - * this function extracts the clip distance for the current plane, - * it first checks if the shader provided a clip distance, otherwise - * it works out the value using the clipvertex - */ -static INLINE float getclipdist(const struct clip_stage *clipper, - struct vertex_header *vert, - int plane_idx) -{ - const float *plane; - float dp; - if (vert->have_clipdist && plane_idx >= 6) { - /* pick the correct clipdistance element from the output vectors */ - int _idx = plane_idx - 6; - int cdi = _idx >= 4; - int vidx = cdi ? _idx - 4 : _idx; - dp = vert->data[draw_current_shader_clipdistance_output(clipper->stage.draw, cdi)][vidx]; - } else { - plane = clipper->plane[plane_idx]; - dp = dot4(vert->clip, plane); - } - return dp; -} - -/* Clip a triangle against the viewport and user clip planes. - */ -static void -do_clip_tri( struct draw_stage *stage, - struct prim_header *header, - unsigned clipmask ) -{ - struct clip_stage *clipper = clip_stage( stage ); - struct vertex_header *a[MAX_CLIPPED_VERTICES]; - struct vertex_header *b[MAX_CLIPPED_VERTICES]; - struct vertex_header **inlist = a; - struct vertex_header **outlist = b; - unsigned tmpnr = 0; - unsigned n = 3; - unsigned i; - boolean aEdges[MAX_CLIPPED_VERTICES]; - boolean bEdges[MAX_CLIPPED_VERTICES]; - boolean *inEdges = aEdges; - boolean *outEdges = bEdges; - - inlist[0] = header->v[0]; - inlist[1] = header->v[1]; - inlist[2] = header->v[2]; - - /* - * Note: at this point we can't just use the per-vertex edge flags. - * We have to observe the edge flag bits set in header->flags which - * were set during primitive decomposition. Put those flags into - * an edge flags array which parallels the vertex array. - * Later, in the 'unfilled' pipeline stage we'll draw the edge if both - * the header.flags bit is set AND the per-vertex edgeflag field is set. - */ - inEdges[0] = !!(header->flags & DRAW_PIPE_EDGE_FLAG_0); - inEdges[1] = !!(header->flags & DRAW_PIPE_EDGE_FLAG_1); - inEdges[2] = !!(header->flags & DRAW_PIPE_EDGE_FLAG_2); - - while (clipmask && n >= 3) { - const unsigned plane_idx = ffs(clipmask)-1; - const boolean is_user_clip_plane = plane_idx >= 6; - struct vertex_header *vert_prev = inlist[0]; - boolean *edge_prev = &inEdges[0]; - float dp_prev; - unsigned outcount = 0; - - dp_prev = getclipdist(clipper, vert_prev, plane_idx); - clipmask &= ~(1<= MAX_CLIPPED_VERTICES) - return; - inlist[n] = inlist[0]; /* prevent rotation of vertices */ - inEdges[n] = inEdges[0]; - - for (i = 1; i <= n; i++) { - struct vertex_header *vert = inlist[i]; - boolean *edge = &inEdges[i]; - - float dp = getclipdist(clipper, vert, plane_idx); - - if (!IS_NEGATIVE(dp_prev)) { - assert(outcount < MAX_CLIPPED_VERTICES); - if (outcount >= MAX_CLIPPED_VERTICES) - return; - outEdges[outcount] = *edge_prev; - outlist[outcount++] = vert_prev; - } - - if (DIFFERENT_SIGNS(dp, dp_prev)) { - struct vertex_header *new_vert; - boolean *new_edge; - - assert(tmpnr < MAX_CLIPPED_VERTICES + 1); - if (tmpnr >= MAX_CLIPPED_VERTICES + 1) - return; - new_vert = clipper->stage.tmp[tmpnr++]; - - assert(outcount < MAX_CLIPPED_VERTICES); - if (outcount >= MAX_CLIPPED_VERTICES) - return; - - new_edge = &outEdges[outcount]; - outlist[outcount++] = new_vert; - - if (IS_NEGATIVE(dp)) { - /* Going out of bounds. Avoid division by zero as we - * know dp != dp_prev from DIFFERENT_SIGNS, above. - */ - float t = dp / (dp - dp_prev); - interp( clipper, new_vert, t, vert, vert_prev ); - - /* Whether or not to set edge flag for the new vert depends - * on whether it's a user-defined clipping plane. We're - * copying NVIDIA's behaviour here. - */ - if (is_user_clip_plane) { - /* we want to see an edge along the clip plane */ - *new_edge = TRUE; - new_vert->edgeflag = TRUE; - } - else { - /* we don't want to see an edge along the frustum clip plane */ - *new_edge = *edge_prev; - new_vert->edgeflag = FALSE; - } - } - else { - /* Coming back in. - */ - float t = dp_prev / (dp_prev - dp); - interp( clipper, new_vert, t, vert_prev, vert ); - - /* Copy starting vert's edgeflag: - */ - new_vert->edgeflag = vert_prev->edgeflag; - *new_edge = *edge_prev; - } - } - - vert_prev = vert; - edge_prev = edge; - dp_prev = dp; - } - - /* swap in/out lists */ - { - struct vertex_header **tmp = inlist; - inlist = outlist; - outlist = tmp; - n = outcount; - } - { - boolean *tmp = inEdges; - inEdges = outEdges; - outEdges = tmp; - } - - } - - /* If flat-shading, copy provoking vertex color to polygon vertex[0] - */ - if (n >= 3) { - if (clipper->flat) { - if (stage->draw->rasterizer->flatshade_first) { - if (inlist[0] != header->v[0]) { - assert(tmpnr < MAX_CLIPPED_VERTICES + 1); - if (tmpnr >= MAX_CLIPPED_VERTICES + 1) - return; - inlist[0] = dup_vert(stage, inlist[0], tmpnr++); - copy_colors(stage, inlist[0], header->v[0]); - } - } - else { - if (inlist[0] != header->v[2]) { - assert(tmpnr < MAX_CLIPPED_VERTICES + 1); - if (tmpnr >= MAX_CLIPPED_VERTICES + 1) - return; - inlist[0] = dup_vert(stage, inlist[0], tmpnr++); - copy_colors(stage, inlist[0], header->v[2]); - } - } - } - - /* Emit the polygon as triangles to the setup stage: - */ - emit_poly( stage, inlist, inEdges, n, header ); - } -} - - -/* Clip a line against the viewport and user clip planes. - */ -static void -do_clip_line( struct draw_stage *stage, - struct prim_header *header, - unsigned clipmask ) -{ - const struct clip_stage *clipper = clip_stage( stage ); - struct vertex_header *v0 = header->v[0]; - struct vertex_header *v1 = header->v[1]; - float t0 = 0.0F; - float t1 = 0.0F; - struct prim_header newprim; - - while (clipmask) { - const unsigned plane_idx = ffs(clipmask)-1; - const float dp0 = getclipdist(clipper, v0, plane_idx); - const float dp1 = getclipdist(clipper, v1, plane_idx); - - if (dp1 < 0.0F) { - float t = dp1 / (dp1 - dp0); - t1 = MAX2(t1, t); - } - - if (dp0 < 0.0F) { - float t = dp0 / (dp0 - dp1); - t0 = MAX2(t0, t); - } - - if (t0 + t1 >= 1.0F) - return; /* discard */ - - clipmask &= ~(1 << plane_idx); /* turn off this plane's bit */ - } - - if (v0->clipmask) { - interp( clipper, stage->tmp[0], t0, v0, v1 ); - - if (clipper->flat) - copy_colors(stage, stage->tmp[0], v0); - - newprim.v[0] = stage->tmp[0]; - } - else { - newprim.v[0] = v0; - } - - if (v1->clipmask) { - interp( clipper, stage->tmp[1], t1, v1, v0 ); - newprim.v[1] = stage->tmp[1]; - } - else { - newprim.v[1] = v1; - } - - stage->next->line( stage->next, &newprim ); -} - - -static void -clip_point( struct draw_stage *stage, - struct prim_header *header ) -{ - if (header->v[0]->clipmask == 0) - stage->next->point( stage->next, header ); -} - - -static void -clip_line( struct draw_stage *stage, - struct prim_header *header ) -{ - unsigned clipmask = (header->v[0]->clipmask | - header->v[1]->clipmask); - - if (clipmask == 0) { - /* no clipping needed */ - stage->next->line( stage->next, header ); - } - else if ((header->v[0]->clipmask & - header->v[1]->clipmask) == 0) { - do_clip_line(stage, header, clipmask); - } - /* else, totally clipped */ -} - - -static void -clip_tri( struct draw_stage *stage, - struct prim_header *header ) -{ - unsigned clipmask = (header->v[0]->clipmask | - header->v[1]->clipmask | - header->v[2]->clipmask); - - if (clipmask == 0) { - /* no clipping needed */ - stage->next->tri( stage->next, header ); - } - else if ((header->v[0]->clipmask & - header->v[1]->clipmask & - header->v[2]->clipmask) == 0) { - do_clip_tri(stage, header, clipmask); - } -} - - -/* Update state. Could further delay this until we hit the first - * primitive that really requires clipping. - */ -static void -clip_init_state( struct draw_stage *stage ) -{ - struct clip_stage *clipper = clip_stage( stage ); - - clipper->flat = stage->draw->rasterizer->flatshade ? TRUE : FALSE; - - if (clipper->flat) { - const struct draw_vertex_shader *vs = stage->draw->vs.vertex_shader; - uint i; - - clipper->num_color_attribs = 0; - for (i = 0; i < vs->info.num_outputs; i++) { - if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_COLOR || - vs->info.output_semantic_name[i] == TGSI_SEMANTIC_BCOLOR) { - clipper->color_attribs[clipper->num_color_attribs++] = i; - } - } - } - - stage->tri = clip_tri; - stage->line = clip_line; -} - - - -static void clip_first_tri( struct draw_stage *stage, - struct prim_header *header ) -{ - clip_init_state( stage ); - stage->tri( stage, header ); -} - -static void clip_first_line( struct draw_stage *stage, - struct prim_header *header ) -{ - clip_init_state( stage ); - stage->line( stage, header ); -} - - -static void clip_flush( struct draw_stage *stage, - unsigned flags ) -{ - stage->tri = clip_first_tri; - stage->line = clip_first_line; - stage->next->flush( stage->next, flags ); -} - - -static void clip_reset_stipple_counter( struct draw_stage *stage ) -{ - stage->next->reset_stipple_counter( stage->next ); -} - - -static void clip_destroy( struct draw_stage *stage ) -{ - draw_free_temp_verts( stage ); - FREE( stage ); -} - - -/** - * Allocate a new clipper stage. - * \return pointer to new stage object - */ -struct draw_stage *draw_clip_stage( struct draw_context *draw ) -{ - struct clip_stage *clipper = CALLOC_STRUCT(clip_stage); - if (clipper == NULL) - goto fail; - - clipper->stage.draw = draw; - clipper->stage.name = "clipper"; - clipper->stage.point = clip_point; - clipper->stage.line = clip_first_line; - clipper->stage.tri = clip_first_tri; - clipper->stage.flush = clip_flush; - clipper->stage.reset_stipple_counter = clip_reset_stipple_counter; - clipper->stage.destroy = clip_destroy; - - clipper->plane = draw->plane; - - if (!draw_alloc_temp_verts( &clipper->stage, MAX_CLIPPED_VERTICES+1 )) - goto fail; - - return &clipper->stage; - - fail: - if (clipper) - clipper->stage.destroy( &clipper->stage ); - - return NULL; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_cull.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_cull.c deleted file mode 100644 index 2f4d01d23ab..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_cull.c +++ /dev/null @@ -1,152 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \brief Drawing stage for polygon culling - */ - -/* Authors: Keith Whitwell - */ - - -#include "util/u_memory.h" -#include "pipe/p_defines.h" -#include "draw_pipe.h" - - -struct cull_stage { - struct draw_stage stage; - unsigned cull_face; /**< which face(s) to cull (one of PIPE_FACE_x) */ - unsigned front_ccw; -}; - - -static INLINE struct cull_stage *cull_stage( struct draw_stage *stage ) -{ - return (struct cull_stage *)stage; -} - - -static void cull_tri( struct draw_stage *stage, - struct prim_header *header ) -{ - const unsigned pos = draw_current_shader_position_output(stage->draw); - - /* Window coords: */ - const float *v0 = header->v[0]->data[pos]; - const float *v1 = header->v[1]->data[pos]; - const float *v2 = header->v[2]->data[pos]; - - /* edge vectors: e = v0 - v2, f = v1 - v2 */ - const float ex = v0[0] - v2[0]; - const float ey = v0[1] - v2[1]; - const float fx = v1[0] - v2[0]; - const float fy = v1[1] - v2[1]; - - /* det = cross(e,f).z */ - header->det = ex * fy - ey * fx; - - if (header->det != 0) { - /* if det < 0 then Z points toward the camera and the triangle is - * counter-clockwise winding. - */ - unsigned ccw = (header->det < 0); - unsigned face = ((ccw == cull_stage(stage)->front_ccw) ? - PIPE_FACE_FRONT : - PIPE_FACE_BACK); - - if ((face & cull_stage(stage)->cull_face) == 0) { - /* triangle is not culled, pass to next stage */ - stage->next->tri( stage->next, header ); - } - } -} - - -static void cull_first_tri( struct draw_stage *stage, - struct prim_header *header ) -{ - struct cull_stage *cull = cull_stage(stage); - - cull->cull_face = stage->draw->rasterizer->cull_face; - cull->front_ccw = stage->draw->rasterizer->front_ccw; - - stage->tri = cull_tri; - stage->tri( stage, header ); -} - - -static void cull_flush( struct draw_stage *stage, unsigned flags ) -{ - stage->tri = cull_first_tri; - stage->next->flush( stage->next, flags ); -} - - -static void cull_reset_stipple_counter( struct draw_stage *stage ) -{ - stage->next->reset_stipple_counter( stage->next ); -} - - -static void cull_destroy( struct draw_stage *stage ) -{ - draw_free_temp_verts( stage ); - FREE( stage ); -} - - -/** - * Create a new polygon culling stage. - */ -struct draw_stage *draw_cull_stage( struct draw_context *draw ) -{ - struct cull_stage *cull = CALLOC_STRUCT(cull_stage); - if (cull == NULL) - goto fail; - - cull->stage.draw = draw; - cull->stage.name = "cull"; - cull->stage.next = NULL; - cull->stage.point = draw_pipe_passthrough_point; - cull->stage.line = draw_pipe_passthrough_line; - cull->stage.tri = cull_first_tri; - cull->stage.flush = cull_flush; - cull->stage.reset_stipple_counter = cull_reset_stipple_counter; - cull->stage.destroy = cull_destroy; - - if (!draw_alloc_temp_verts( &cull->stage, 0 )) - goto fail; - - return &cull->stage; - -fail: - if (cull) - cull->stage.destroy( &cull->stage ); - - return NULL; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_flatshade.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_flatshade.c deleted file mode 100644 index 693f2895aad..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_flatshade.c +++ /dev/null @@ -1,282 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: Keith Whitwell - */ - -#include "util/u_math.h" -#include "util/u_memory.h" - -#include "pipe/p_shader_tokens.h" -#include "draw_vs.h" -#include "draw_pipe.h" - - -/** subclass of draw_stage */ -struct flat_stage -{ - struct draw_stage stage; - - uint num_color_attribs; - uint color_attribs[2]; /* front/back primary colors */ - - uint num_spec_attribs; - uint spec_attribs[2]; /* front/back secondary colors */ -}; - -#define COPY_3FV( DST, SRC ) \ -do { \ - (DST)[0] = (SRC)[0]; \ - (DST)[1] = (SRC)[1]; \ - (DST)[2] = (SRC)[2]; \ -} while (0) - - -static INLINE struct flat_stage * -flat_stage(struct draw_stage *stage) -{ - return (struct flat_stage *) stage; -} - - -/** Copy all the color attributes from 'src' vertex to 'dst' vertex */ -static INLINE void copy_colors( struct draw_stage *stage, - struct vertex_header *dst, - const struct vertex_header *src ) -{ - const struct flat_stage *flat = flat_stage(stage); - uint i; - - for (i = 0; i < flat->num_color_attribs; i++) { - const uint attr = flat->color_attribs[i]; - COPY_4FV(dst->data[attr], src->data[attr]); - } - - for (i = 0; i < flat->num_spec_attribs; i++) { - const uint attr = flat->spec_attribs[i]; - COPY_3FV(dst->data[attr], src->data[attr]); - } -} - - -/** Copy all the color attributes from src vertex to dst0 & dst1 vertices */ -static INLINE void copy_colors2( struct draw_stage *stage, - struct vertex_header *dst0, - struct vertex_header *dst1, - const struct vertex_header *src ) -{ - const struct flat_stage *flat = flat_stage(stage); - uint i; - for (i = 0; i < flat->num_color_attribs; i++) { - const uint attr = flat->color_attribs[i]; - COPY_4FV(dst0->data[attr], src->data[attr]); - COPY_4FV(dst1->data[attr], src->data[attr]); - } - - for (i = 0; i < flat->num_spec_attribs; i++) { - const uint attr = flat->spec_attribs[i]; - COPY_3FV(dst0->data[attr], src->data[attr]); - COPY_3FV(dst1->data[attr], src->data[attr]); - } -} - - -/** - * Flatshade tri. Required for clipping and when unfilled tris are - * active, otherwise handled by hardware. - */ -static void flatshade_tri_0( struct draw_stage *stage, - struct prim_header *header ) -{ - struct prim_header tmp; - - tmp.det = header->det; - tmp.flags = header->flags; - tmp.pad = header->pad; - tmp.v[0] = header->v[0]; - tmp.v[1] = dup_vert(stage, header->v[1], 0); - tmp.v[2] = dup_vert(stage, header->v[2], 1); - - copy_colors2(stage, tmp.v[1], tmp.v[2], tmp.v[0]); - - stage->next->tri( stage->next, &tmp ); -} - - -static void flatshade_tri_2( struct draw_stage *stage, - struct prim_header *header ) -{ - struct prim_header tmp; - - tmp.det = header->det; - tmp.flags = header->flags; - tmp.pad = header->pad; - tmp.v[0] = dup_vert(stage, header->v[0], 0); - tmp.v[1] = dup_vert(stage, header->v[1], 1); - tmp.v[2] = header->v[2]; - - copy_colors2(stage, tmp.v[0], tmp.v[1], tmp.v[2]); - - stage->next->tri( stage->next, &tmp ); -} - - - - - -/** - * Flatshade line. Required for clipping. - */ -static void flatshade_line_0( struct draw_stage *stage, - struct prim_header *header ) -{ - struct prim_header tmp; - - tmp.v[0] = header->v[0]; - tmp.v[1] = dup_vert(stage, header->v[1], 0); - - copy_colors(stage, tmp.v[1], tmp.v[0]); - - stage->next->line( stage->next, &tmp ); -} - -static void flatshade_line_1( struct draw_stage *stage, - struct prim_header *header ) -{ - struct prim_header tmp; - - tmp.v[0] = dup_vert(stage, header->v[0], 0); - tmp.v[1] = header->v[1]; - - copy_colors(stage, tmp.v[0], tmp.v[1]); - - stage->next->line( stage->next, &tmp ); -} - - - - -static void flatshade_init_state( struct draw_stage *stage ) -{ - struct flat_stage *flat = flat_stage(stage); - const struct draw_vertex_shader *vs = stage->draw->vs.vertex_shader; - uint i; - - /* Find which vertex shader outputs are colors, make a list */ - flat->num_color_attribs = 0; - flat->num_spec_attribs = 0; - for (i = 0; i < vs->info.num_outputs; i++) { - if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_COLOR || - vs->info.output_semantic_name[i] == TGSI_SEMANTIC_BCOLOR) { - if (vs->info.output_semantic_index[i] == 0) - flat->color_attribs[flat->num_color_attribs++] = i; - else - flat->spec_attribs[flat->num_spec_attribs++] = i; - } - } - - /* Choose flatshade routine according to provoking vertex: - */ - if (stage->draw->rasterizer->flatshade_first) { - stage->line = flatshade_line_0; - stage->tri = flatshade_tri_0; - } - else { - stage->line = flatshade_line_1; - stage->tri = flatshade_tri_2; - } -} - -static void flatshade_first_tri( struct draw_stage *stage, - struct prim_header *header ) -{ - flatshade_init_state( stage ); - stage->tri( stage, header ); -} - -static void flatshade_first_line( struct draw_stage *stage, - struct prim_header *header ) -{ - flatshade_init_state( stage ); - stage->line( stage, header ); -} - - -static void flatshade_flush( struct draw_stage *stage, - unsigned flags ) -{ - stage->tri = flatshade_first_tri; - stage->line = flatshade_first_line; - stage->next->flush( stage->next, flags ); -} - - -static void flatshade_reset_stipple_counter( struct draw_stage *stage ) -{ - stage->next->reset_stipple_counter( stage->next ); -} - - -static void flatshade_destroy( struct draw_stage *stage ) -{ - draw_free_temp_verts( stage ); - FREE( stage ); -} - - -/** - * Create flatshading drawing stage. - */ -struct draw_stage *draw_flatshade_stage( struct draw_context *draw ) -{ - struct flat_stage *flatshade = CALLOC_STRUCT(flat_stage); - if (flatshade == NULL) - goto fail; - - flatshade->stage.draw = draw; - flatshade->stage.name = "flatshade"; - flatshade->stage.next = NULL; - flatshade->stage.point = draw_pipe_passthrough_point; - flatshade->stage.line = flatshade_first_line; - flatshade->stage.tri = flatshade_first_tri; - flatshade->stage.flush = flatshade_flush; - flatshade->stage.reset_stipple_counter = flatshade_reset_stipple_counter; - flatshade->stage.destroy = flatshade_destroy; - - if (!draw_alloc_temp_verts( &flatshade->stage, 2 )) - goto fail; - - return &flatshade->stage; - - fail: - if (flatshade) - flatshade->stage.destroy( &flatshade->stage ); - - return NULL; -} - - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_offset.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_offset.c deleted file mode 100644 index 3da52b10624..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_offset.c +++ /dev/null @@ -1,192 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \brief polygon offset state - * - * \author Keith Whitwell - * \author Brian Paul - */ - -#include "util/u_math.h" -#include "util/u_memory.h" -#include "draw_pipe.h" - - - -struct offset_stage { - struct draw_stage stage; - - float scale; - float units; - float clamp; -}; - - - -static INLINE struct offset_stage *offset_stage( struct draw_stage *stage ) -{ - return (struct offset_stage *) stage; -} - - - - - -/** - * Offset tri Z. Some hardware can handle this, but not usually when - * doing unfilled rendering. - */ -static void do_offset_tri( struct draw_stage *stage, - struct prim_header *header ) -{ - const unsigned pos = draw_current_shader_position_output(stage->draw); - struct offset_stage *offset = offset_stage(stage); - float inv_det = 1.0f / header->det; - - /* Window coords: - */ - float *v0 = header->v[0]->data[pos]; - float *v1 = header->v[1]->data[pos]; - float *v2 = header->v[2]->data[pos]; - - /* edge vectors e = v0 - v2, f = v1 - v2 */ - float ex = v0[0] - v2[0]; - float ey = v0[1] - v2[1]; - float ez = v0[2] - v2[2]; - float fx = v1[0] - v2[0]; - float fy = v1[1] - v2[1]; - float fz = v1[2] - v2[2]; - - /* (a,b) = cross(e,f).xy */ - float a = ey*fz - ez*fy; - float b = ez*fx - ex*fz; - - float dzdx = fabsf(a * inv_det); - float dzdy = fabsf(b * inv_det); - - float zoffset = offset->units + MAX2(dzdx, dzdy) * offset->scale; - - if (offset->clamp) - zoffset = (offset->clamp < 0.0f) ? MAX2(zoffset, offset->clamp) : - MIN2(zoffset, offset->clamp); - - /* - * Note: we're applying the offset and clamping per-vertex. - * Ideally, the offset is applied per-fragment prior to fragment shading. - */ - v0[2] = CLAMP(v0[2] + zoffset, 0.0f, 1.0f); - v1[2] = CLAMP(v1[2] + zoffset, 0.0f, 1.0f); - v2[2] = CLAMP(v2[2] + zoffset, 0.0f, 1.0f); - - stage->next->tri( stage->next, header ); -} - - -static void offset_tri( struct draw_stage *stage, - struct prim_header *header ) -{ - struct prim_header tmp; - - tmp.det = header->det; - tmp.flags = header->flags; - tmp.pad = header->pad; - tmp.v[0] = dup_vert(stage, header->v[0], 0); - tmp.v[1] = dup_vert(stage, header->v[1], 1); - tmp.v[2] = dup_vert(stage, header->v[2], 2); - - do_offset_tri( stage, &tmp ); -} - - -static void offset_first_tri( struct draw_stage *stage, - struct prim_header *header ) -{ - struct offset_stage *offset = offset_stage(stage); - - offset->units = (float) (stage->draw->rasterizer->offset_units * stage->draw->mrd); - offset->scale = stage->draw->rasterizer->offset_scale; - offset->clamp = stage->draw->rasterizer->offset_clamp; - - stage->tri = offset_tri; - stage->tri( stage, header ); -} - - - - -static void offset_flush( struct draw_stage *stage, - unsigned flags ) -{ - stage->tri = offset_first_tri; - stage->next->flush( stage->next, flags ); -} - - -static void offset_reset_stipple_counter( struct draw_stage *stage ) -{ - stage->next->reset_stipple_counter( stage->next ); -} - - -static void offset_destroy( struct draw_stage *stage ) -{ - draw_free_temp_verts( stage ); - FREE( stage ); -} - - -/** - * Create polygon offset drawing stage. - */ -struct draw_stage *draw_offset_stage( struct draw_context *draw ) -{ - struct offset_stage *offset = CALLOC_STRUCT(offset_stage); - if (offset == NULL) - goto fail; - - offset->stage.draw = draw; - offset->stage.name = "offset"; - offset->stage.next = NULL; - offset->stage.point = draw_pipe_passthrough_point; - offset->stage.line = draw_pipe_passthrough_line; - offset->stage.tri = offset_first_tri; - offset->stage.flush = offset_flush; - offset->stage.reset_stipple_counter = offset_reset_stipple_counter; - offset->stage.destroy = offset_destroy; - - if (!draw_alloc_temp_verts( &offset->stage, 3 )) - goto fail; - - return &offset->stage; - -fail: - if (offset) - offset->stage.destroy( &offset->stage ); - - return NULL; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_pstipple.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_pstipple.c deleted file mode 100644 index 9ed425d150b..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_pstipple.c +++ /dev/null @@ -1,816 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * Polygon stipple stage: implement polygon stipple with texture map and - * fragment program. The fragment program samples the texture using the - * fragment window coordinate register and does a fragment kill for the - * stipple-failing fragments. - * - * Authors: Brian Paul - */ - - -#include "pipe/p_context.h" -#include "pipe/p_defines.h" -#include "pipe/p_shader_tokens.h" -#include "util/u_inlines.h" - -#include "util/u_format.h" -#include "util/u_math.h" -#include "util/u_memory.h" -#include "util/u_sampler.h" - -#include "tgsi/tgsi_transform.h" -#include "tgsi/tgsi_dump.h" - -#include "draw_context.h" -#include "draw_pipe.h" - - -/** Approx number of new tokens for instructions in pstip_transform_inst() */ -#define NUM_NEW_TOKENS 50 - - -/** - * Subclass of pipe_shader_state to carry extra fragment shader info. - */ -struct pstip_fragment_shader -{ - struct pipe_shader_state state; - void *driver_fs; - void *pstip_fs; - uint sampler_unit; -}; - - -/** - * Subclass of draw_stage - */ -struct pstip_stage -{ - struct draw_stage stage; - - void *sampler_cso; - struct pipe_resource *texture; - struct pipe_sampler_view *sampler_view; - uint num_samplers; - uint num_sampler_views; - - /* - * Currently bound state - */ - struct pstip_fragment_shader *fs; - struct { - void *samplers[PIPE_MAX_SAMPLERS]; - struct pipe_sampler_view *sampler_views[PIPE_MAX_SAMPLERS]; - const struct pipe_poly_stipple *stipple; - } state; - - /* - * Driver interface/override functions - */ - void * (*driver_create_fs_state)(struct pipe_context *, - const struct pipe_shader_state *); - void (*driver_bind_fs_state)(struct pipe_context *, void *); - void (*driver_delete_fs_state)(struct pipe_context *, void *); - - void (*driver_bind_sampler_states)(struct pipe_context *, unsigned, void **); - - void (*driver_set_sampler_views)(struct pipe_context *, - unsigned, - struct pipe_sampler_view **); - - void (*driver_set_polygon_stipple)(struct pipe_context *, - const struct pipe_poly_stipple *); - - struct pipe_context *pipe; -}; - - - -/** - * Subclass of tgsi_transform_context, used for transforming the - * user's fragment shader to add the extra texture sample and fragment kill - * instructions. - */ -struct pstip_transform_context { - struct tgsi_transform_context base; - uint tempsUsed; /**< bitmask */ - int wincoordInput; - int maxInput; - uint samplersUsed; /**< bitfield of samplers used */ - int freeSampler; /** an available sampler for the pstipple */ - int texTemp; /**< temp registers */ - int numImmed; - boolean firstInstruction; -}; - - -/** - * TGSI declaration transform callback. - * Look for a free sampler, a free input attrib, and two free temp regs. - */ -static void -pstip_transform_decl(struct tgsi_transform_context *ctx, - struct tgsi_full_declaration *decl) -{ - struct pstip_transform_context *pctx = (struct pstip_transform_context *) ctx; - - if (decl->Declaration.File == TGSI_FILE_SAMPLER) { - uint i; - for (i = decl->Range.First; - i <= decl->Range.Last; i++) { - pctx->samplersUsed |= 1 << i; - } - } - else if (decl->Declaration.File == TGSI_FILE_INPUT) { - pctx->maxInput = MAX2(pctx->maxInput, (int) decl->Range.Last); - if (decl->Semantic.Name == TGSI_SEMANTIC_POSITION) - pctx->wincoordInput = (int) decl->Range.First; - } - else if (decl->Declaration.File == TGSI_FILE_TEMPORARY) { - uint i; - for (i = decl->Range.First; - i <= decl->Range.Last; i++) { - pctx->tempsUsed |= (1 << i); - } - } - - ctx->emit_declaration(ctx, decl); -} - - -/** - * TGSI immediate declaration transform callback. - * We're just counting the number of immediates here. - */ -static void -pstip_transform_immed(struct tgsi_transform_context *ctx, - struct tgsi_full_immediate *immed) -{ - struct pstip_transform_context *pctx = (struct pstip_transform_context *) ctx; - ctx->emit_immediate(ctx, immed); /* emit to output shader */ - pctx->numImmed++; -} - - -/** - * Find the lowest zero bit in the given word, or -1 if bitfield is all ones. - */ -static int -free_bit(uint bitfield) -{ - return ffs(~bitfield) - 1; -} - - -/** - * TGSI instruction transform callback. - * Replace writes to result.color w/ a temp reg. - * Upon END instruction, insert texture sampling code for antialiasing. - */ -static void -pstip_transform_inst(struct tgsi_transform_context *ctx, - struct tgsi_full_instruction *inst) -{ - struct pstip_transform_context *pctx = (struct pstip_transform_context *) ctx; - - if (pctx->firstInstruction) { - /* emit our new declarations before the first instruction */ - - struct tgsi_full_declaration decl; - struct tgsi_full_instruction newInst; - uint i; - int wincoordInput; - - /* find free sampler */ - pctx->freeSampler = free_bit(pctx->samplersUsed); - if (pctx->freeSampler >= PIPE_MAX_SAMPLERS) - pctx->freeSampler = PIPE_MAX_SAMPLERS - 1; - - if (pctx->wincoordInput < 0) - wincoordInput = pctx->maxInput + 1; - else - wincoordInput = pctx->wincoordInput; - - /* find one free temp reg */ - for (i = 0; i < 32; i++) { - if ((pctx->tempsUsed & (1 << i)) == 0) { - /* found a free temp */ - if (pctx->texTemp < 0) - pctx->texTemp = i; - else - break; - } - } - assert(pctx->texTemp >= 0); - - if (pctx->wincoordInput < 0) { - /* declare new position input reg */ - decl = tgsi_default_full_declaration(); - decl.Declaration.File = TGSI_FILE_INPUT; - decl.Declaration.Interpolate = TGSI_INTERPOLATE_LINEAR; /* XXX? */ - decl.Declaration.Semantic = 1; - decl.Semantic.Name = TGSI_SEMANTIC_POSITION; - decl.Semantic.Index = 0; - decl.Range.First = - decl.Range.Last = wincoordInput; - ctx->emit_declaration(ctx, &decl); - } - - /* declare new sampler */ - decl = tgsi_default_full_declaration(); - decl.Declaration.File = TGSI_FILE_SAMPLER; - decl.Range.First = - decl.Range.Last = pctx->freeSampler; - ctx->emit_declaration(ctx, &decl); - - /* declare new temp regs */ - decl = tgsi_default_full_declaration(); - decl.Declaration.File = TGSI_FILE_TEMPORARY; - decl.Range.First = - decl.Range.Last = pctx->texTemp; - ctx->emit_declaration(ctx, &decl); - - /* emit immediate = {1/32, 1/32, 1, 1} - * The index/position of this immediate will be pctx->numImmed - */ - { - static const float value[4] = { 1.0/32, 1.0/32, 1.0, 1.0 }; - struct tgsi_full_immediate immed; - uint size = 4; - immed = tgsi_default_full_immediate(); - immed.Immediate.NrTokens = 1 + size; /* one for the token itself */ - immed.u[0].Float = value[0]; - immed.u[1].Float = value[1]; - immed.u[2].Float = value[2]; - immed.u[3].Float = value[3]; - ctx->emit_immediate(ctx, &immed); - } - - pctx->firstInstruction = FALSE; - - - /* - * Insert new MUL/TEX/KILP instructions at start of program - * Take gl_FragCoord, divide by 32 (stipple size), sample the - * texture and kill fragment if needed. - * - * We'd like to use non-normalized texcoords to index into a RECT - * texture, but we can only use GL_REPEAT wrap mode with normalized - * texcoords. Darn. - */ - - /* MUL texTemp, INPUT[wincoord], 1/32; */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_MUL; - newInst.Instruction.NumDstRegs = 1; - newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Dst[0].Register.Index = pctx->texTemp; - newInst.Instruction.NumSrcRegs = 2; - newInst.Src[0].Register.File = TGSI_FILE_INPUT; - newInst.Src[0].Register.Index = wincoordInput; - newInst.Src[1].Register.File = TGSI_FILE_IMMEDIATE; - newInst.Src[1].Register.Index = pctx->numImmed; - ctx->emit_instruction(ctx, &newInst); - - /* TEX texTemp, texTemp, sampler; */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_TEX; - newInst.Instruction.NumDstRegs = 1; - newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Dst[0].Register.Index = pctx->texTemp; - newInst.Instruction.NumSrcRegs = 2; - newInst.Instruction.Texture = TRUE; - newInst.Texture.Texture = TGSI_TEXTURE_2D; - newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[0].Register.Index = pctx->texTemp; - newInst.Src[1].Register.File = TGSI_FILE_SAMPLER; - newInst.Src[1].Register.Index = pctx->freeSampler; - ctx->emit_instruction(ctx, &newInst); - - /* KIL -texTemp; # if -texTemp < 0, KILL fragment */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_KIL; - newInst.Instruction.NumDstRegs = 0; - newInst.Instruction.NumSrcRegs = 1; - newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[0].Register.Index = pctx->texTemp; - newInst.Src[0].Register.Negate = 1; - ctx->emit_instruction(ctx, &newInst); - } - - /* emit this instruction */ - ctx->emit_instruction(ctx, inst); -} - - -/** - * Generate the frag shader we'll use for doing polygon stipple. - * This will be the user's shader prefixed with a TEX and KIL instruction. - */ -static boolean -generate_pstip_fs(struct pstip_stage *pstip) -{ - const struct pipe_shader_state *orig_fs = &pstip->fs->state; - /*struct draw_context *draw = pstip->stage.draw;*/ - struct pipe_shader_state pstip_fs; - struct pstip_transform_context transform; - const uint newLen = tgsi_num_tokens(orig_fs->tokens) + NUM_NEW_TOKENS; - - pstip_fs = *orig_fs; /* copy to init */ - pstip_fs.tokens = tgsi_alloc_tokens(newLen); - if (pstip_fs.tokens == NULL) - return FALSE; - - memset(&transform, 0, sizeof(transform)); - transform.wincoordInput = -1; - transform.maxInput = -1; - transform.texTemp = -1; - transform.firstInstruction = TRUE; - transform.base.transform_instruction = pstip_transform_inst; - transform.base.transform_declaration = pstip_transform_decl; - transform.base.transform_immediate = pstip_transform_immed; - - tgsi_transform_shader(orig_fs->tokens, - (struct tgsi_token *) pstip_fs.tokens, - newLen, &transform.base); - -#if 0 /* DEBUG */ - tgsi_dump(orig_fs->tokens, 0); - tgsi_dump(pstip_fs.tokens, 0); -#endif - - assert(pstip->fs); - - pstip->fs->sampler_unit = transform.freeSampler; - assert(pstip->fs->sampler_unit < PIPE_MAX_SAMPLERS); - - pstip->fs->pstip_fs = pstip->driver_create_fs_state(pstip->pipe, &pstip_fs); - - FREE((void *)pstip_fs.tokens); - - if (!pstip->fs->pstip_fs) - return FALSE; - - return TRUE; -} - - -/** - * Load texture image with current stipple pattern. - */ -static void -pstip_update_texture(struct pstip_stage *pstip) -{ - static const uint bit31 = 1 << 31; - struct pipe_context *pipe = pstip->pipe; - struct pipe_transfer *transfer; - const uint *stipple = pstip->state.stipple->stipple; - uint i, j; - ubyte *data; - - transfer = pipe_get_transfer(pipe, pstip->texture, 0, 0, - PIPE_TRANSFER_WRITE, 0, 0, 32, 32); - data = pipe->transfer_map(pipe, transfer); - - /* - * Load alpha texture. - * Note: 0 means keep the fragment, 255 means kill it. - * We'll negate the texel value and use KILP which kills if value - * is negative. - */ - for (i = 0; i < 32; i++) { - for (j = 0; j < 32; j++) { - if (stipple[i] & (bit31 >> j)) { - /* fragment "on" */ - data[i * transfer->stride + j] = 0; - } - else { - /* fragment "off" */ - data[i * transfer->stride + j] = 255; - } - } - } - - /* unmap */ - pipe->transfer_unmap(pipe, transfer); - pipe->transfer_destroy(pipe, transfer); -} - - -/** - * Create the texture map we'll use for stippling. - */ -static boolean -pstip_create_texture(struct pstip_stage *pstip) -{ - struct pipe_context *pipe = pstip->pipe; - struct pipe_screen *screen = pipe->screen; - struct pipe_resource texTemp; - struct pipe_sampler_view viewTempl; - - memset(&texTemp, 0, sizeof(texTemp)); - texTemp.target = PIPE_TEXTURE_2D; - texTemp.format = PIPE_FORMAT_A8_UNORM; /* XXX verify supported by driver! */ - texTemp.last_level = 0; - texTemp.width0 = 32; - texTemp.height0 = 32; - texTemp.depth0 = 1; - texTemp.array_size = 1; - texTemp.bind = PIPE_BIND_SAMPLER_VIEW; - - pstip->texture = screen->resource_create(screen, &texTemp); - if (pstip->texture == NULL) - return FALSE; - - u_sampler_view_default_template(&viewTempl, - pstip->texture, - pstip->texture->format); - pstip->sampler_view = pipe->create_sampler_view(pipe, - pstip->texture, - &viewTempl); - if (!pstip->sampler_view) { - return FALSE; - } - - return TRUE; -} - - -/** - * Create the sampler CSO that'll be used for stippling. - */ -static boolean -pstip_create_sampler(struct pstip_stage *pstip) -{ - struct pipe_sampler_state sampler; - struct pipe_context *pipe = pstip->pipe; - - memset(&sampler, 0, sizeof(sampler)); - sampler.wrap_s = PIPE_TEX_WRAP_REPEAT; - sampler.wrap_t = PIPE_TEX_WRAP_REPEAT; - sampler.wrap_r = PIPE_TEX_WRAP_REPEAT; - sampler.min_mip_filter = PIPE_TEX_MIPFILTER_NONE; - sampler.min_img_filter = PIPE_TEX_FILTER_NEAREST; - sampler.mag_img_filter = PIPE_TEX_FILTER_NEAREST; - sampler.normalized_coords = 1; - sampler.min_lod = 0.0f; - sampler.max_lod = 0.0f; - - pstip->sampler_cso = pipe->create_sampler_state(pipe, &sampler); - if (pstip->sampler_cso == NULL) - return FALSE; - - return TRUE; -} - - -/** - * When we're about to draw our first stipple polygon in a batch, this function - * is called to tell the driver to bind our modified fragment shader. - */ -static boolean -bind_pstip_fragment_shader(struct pstip_stage *pstip) -{ - struct draw_context *draw = pstip->stage.draw; - if (!pstip->fs->pstip_fs && - !generate_pstip_fs(pstip)) - return FALSE; - - draw->suspend_flushing = TRUE; - pstip->driver_bind_fs_state(pstip->pipe, pstip->fs->pstip_fs); - draw->suspend_flushing = FALSE; - return TRUE; -} - - -static INLINE struct pstip_stage * -pstip_stage( struct draw_stage *stage ) -{ - return (struct pstip_stage *) stage; -} - - -static void -pstip_first_tri(struct draw_stage *stage, struct prim_header *header) -{ - struct pstip_stage *pstip = pstip_stage(stage); - struct pipe_context *pipe = pstip->pipe; - struct draw_context *draw = stage->draw; - uint num_samplers; - - assert(stage->draw->rasterizer->poly_stipple_enable); - - /* bind our fragprog */ - if (!bind_pstip_fragment_shader(pstip)) { - stage->tri = draw_pipe_passthrough_tri; - stage->tri(stage, header); - return; - } - - - /* how many samplers? */ - /* we'll use sampler/texture[pstip->sampler_unit] for the stipple */ - num_samplers = MAX2(pstip->num_sampler_views, pstip->num_samplers); - num_samplers = MAX2(num_samplers, pstip->fs->sampler_unit + 1); - - /* plug in our sampler, texture */ - pstip->state.samplers[pstip->fs->sampler_unit] = pstip->sampler_cso; - pipe_sampler_view_reference(&pstip->state.sampler_views[pstip->fs->sampler_unit], - pstip->sampler_view); - - assert(num_samplers <= PIPE_MAX_SAMPLERS); - - draw->suspend_flushing = TRUE; - pstip->driver_bind_sampler_states(pipe, num_samplers, pstip->state.samplers); - pstip->driver_set_sampler_views(pipe, num_samplers, pstip->state.sampler_views); - draw->suspend_flushing = FALSE; - - /* now really draw first triangle */ - stage->tri = draw_pipe_passthrough_tri; - stage->tri(stage, header); -} - - -static void -pstip_flush(struct draw_stage *stage, unsigned flags) -{ - struct draw_context *draw = stage->draw; - struct pstip_stage *pstip = pstip_stage(stage); - struct pipe_context *pipe = pstip->pipe; - - stage->tri = pstip_first_tri; - stage->next->flush( stage->next, flags ); - - /* restore original frag shader, texture, sampler state */ - draw->suspend_flushing = TRUE; - pstip->driver_bind_fs_state(pipe, pstip->fs->driver_fs); - pstip->driver_bind_sampler_states(pipe, pstip->num_samplers, - pstip->state.samplers); - pstip->driver_set_sampler_views(pipe, - pstip->num_sampler_views, - pstip->state.sampler_views); - draw->suspend_flushing = FALSE; -} - - -static void -pstip_reset_stipple_counter(struct draw_stage *stage) -{ - stage->next->reset_stipple_counter( stage->next ); -} - - -static void -pstip_destroy(struct draw_stage *stage) -{ - struct pstip_stage *pstip = pstip_stage(stage); - uint i; - - for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { - pipe_sampler_view_reference(&pstip->state.sampler_views[i], NULL); - } - - pstip->pipe->delete_sampler_state(pstip->pipe, pstip->sampler_cso); - - pipe_resource_reference(&pstip->texture, NULL); - - if (pstip->sampler_view) { - pipe_sampler_view_reference(&pstip->sampler_view, NULL); - } - - draw_free_temp_verts( stage ); - FREE( stage ); -} - - -/** Create a new polygon stipple drawing stage object */ -static struct pstip_stage * -draw_pstip_stage(struct draw_context *draw, struct pipe_context *pipe) -{ - struct pstip_stage *pstip = CALLOC_STRUCT(pstip_stage); - if (pstip == NULL) - goto fail; - - pstip->pipe = pipe; - - pstip->stage.draw = draw; - pstip->stage.name = "pstip"; - pstip->stage.next = NULL; - pstip->stage.point = draw_pipe_passthrough_point; - pstip->stage.line = draw_pipe_passthrough_line; - pstip->stage.tri = pstip_first_tri; - pstip->stage.flush = pstip_flush; - pstip->stage.reset_stipple_counter = pstip_reset_stipple_counter; - pstip->stage.destroy = pstip_destroy; - - if (!draw_alloc_temp_verts( &pstip->stage, 8 )) - goto fail; - - return pstip; - -fail: - if (pstip) - pstip->stage.destroy( &pstip->stage ); - - return NULL; -} - - -static struct pstip_stage * -pstip_stage_from_pipe(struct pipe_context *pipe) -{ - struct draw_context *draw = (struct draw_context *) pipe->draw; - return pstip_stage(draw->pipeline.pstipple); -} - - -/** - * This function overrides the driver's create_fs_state() function and - * will typically be called by the state tracker. - */ -static void * -pstip_create_fs_state(struct pipe_context *pipe, - const struct pipe_shader_state *fs) -{ - struct pstip_stage *pstip = pstip_stage_from_pipe(pipe); - struct pstip_fragment_shader *pstipfs = CALLOC_STRUCT(pstip_fragment_shader); - - if (pstipfs) { - pstipfs->state = *fs; - - /* pass-through */ - pstipfs->driver_fs = pstip->driver_create_fs_state(pstip->pipe, fs); - } - - return pstipfs; -} - - -static void -pstip_bind_fs_state(struct pipe_context *pipe, void *fs) -{ - struct pstip_stage *pstip = pstip_stage_from_pipe(pipe); - struct pstip_fragment_shader *pstipfs = (struct pstip_fragment_shader *) fs; - /* save current */ - pstip->fs = pstipfs; - /* pass-through */ - pstip->driver_bind_fs_state(pstip->pipe, - (pstipfs ? pstipfs->driver_fs : NULL)); -} - - -static void -pstip_delete_fs_state(struct pipe_context *pipe, void *fs) -{ - struct pstip_stage *pstip = pstip_stage_from_pipe(pipe); - struct pstip_fragment_shader *pstipfs = (struct pstip_fragment_shader *) fs; - /* pass-through */ - pstip->driver_delete_fs_state(pstip->pipe, pstipfs->driver_fs); - - if (pstipfs->pstip_fs) - pstip->driver_delete_fs_state(pstip->pipe, pstipfs->pstip_fs); - - FREE(pstipfs); -} - - -static void -pstip_bind_sampler_states(struct pipe_context *pipe, - unsigned num, void **sampler) -{ - struct pstip_stage *pstip = pstip_stage_from_pipe(pipe); - uint i; - - /* save current */ - memcpy(pstip->state.samplers, sampler, num * sizeof(void *)); - for (i = num; i < PIPE_MAX_SAMPLERS; i++) { - pstip->state.samplers[i] = NULL; - } - - pstip->num_samplers = num; - /* pass-through */ - pstip->driver_bind_sampler_states(pstip->pipe, num, sampler); -} - - -static void -pstip_set_sampler_views(struct pipe_context *pipe, - unsigned num, - struct pipe_sampler_view **views) -{ - struct pstip_stage *pstip = pstip_stage_from_pipe(pipe); - uint i; - - /* save current */ - for (i = 0; i < num; i++) { - pipe_sampler_view_reference(&pstip->state.sampler_views[i], views[i]); - } - for (; i < PIPE_MAX_SAMPLERS; i++) { - pipe_sampler_view_reference(&pstip->state.sampler_views[i], NULL); - } - - pstip->num_sampler_views = num; - - /* pass-through */ - pstip->driver_set_sampler_views(pstip->pipe, num, views); -} - - -static void -pstip_set_polygon_stipple(struct pipe_context *pipe, - const struct pipe_poly_stipple *stipple) -{ - struct pstip_stage *pstip = pstip_stage_from_pipe(pipe); - - /* save current */ - pstip->state.stipple = stipple; - - /* pass-through */ - pstip->driver_set_polygon_stipple(pstip->pipe, stipple); - - pstip_update_texture(pstip); -} - - -/** - * Called by drivers that want to install this polygon stipple stage - * into the draw module's pipeline. This will not be used if the - * hardware has native support for polygon stipple. - */ -boolean -draw_install_pstipple_stage(struct draw_context *draw, - struct pipe_context *pipe) -{ - struct pstip_stage *pstip; - - pipe->draw = (void *) draw; - - /* - * Create / install pgon stipple drawing / prim stage - */ - pstip = draw_pstip_stage( draw, pipe ); - if (pstip == NULL) - goto fail; - - draw->pipeline.pstipple = &pstip->stage; - - /* create special texture, sampler state */ - if (!pstip_create_texture(pstip)) - goto fail; - - if (!pstip_create_sampler(pstip)) - goto fail; - - /* save original driver functions */ - pstip->driver_create_fs_state = pipe->create_fs_state; - pstip->driver_bind_fs_state = pipe->bind_fs_state; - pstip->driver_delete_fs_state = pipe->delete_fs_state; - - pstip->driver_bind_sampler_states = pipe->bind_fragment_sampler_states; - pstip->driver_set_sampler_views = pipe->set_fragment_sampler_views; - pstip->driver_set_polygon_stipple = pipe->set_polygon_stipple; - - /* override the driver's functions */ - pipe->create_fs_state = pstip_create_fs_state; - pipe->bind_fs_state = pstip_bind_fs_state; - pipe->delete_fs_state = pstip_delete_fs_state; - - pipe->bind_fragment_sampler_states = pstip_bind_sampler_states; - pipe->set_fragment_sampler_views = pstip_set_sampler_views; - pipe->set_polygon_stipple = pstip_set_polygon_stipple; - - return TRUE; - - fail: - if (pstip) - pstip->stage.destroy( &pstip->stage ); - - return FALSE; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_stipple.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_stipple.c deleted file mode 100644 index 4b3f4e7ae11..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_stipple.c +++ /dev/null @@ -1,261 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: Keith Whitwell - */ - -/* Implement line stipple by cutting lines up into smaller lines. - * There are hundreds of ways to implement line stipple, this is one - * choice that should work in all situations, requires no state - * manipulations, but with a penalty in terms of large amounts of - * generated geometry. - */ - - -#include "pipe/p_defines.h" -#include "pipe/p_shader_tokens.h" -#include "util/u_math.h" -#include "util/u_memory.h" - -#include "draw/draw_pipe.h" - - -/** Subclass of draw_stage */ -struct stipple_stage { - struct draw_stage stage; - float counter; - uint pattern; - uint factor; -}; - - -static INLINE struct stipple_stage * -stipple_stage(struct draw_stage *stage) -{ - return (struct stipple_stage *) stage; -} - - -/** - * Compute interpolated vertex attributes for 'dst' at position 't' - * between 'v0' and 'v1'. - * XXX using linear interpolation for all attribs at this time. - */ -static void -screen_interp( struct draw_context *draw, - struct vertex_header *dst, - float t, - const struct vertex_header *v0, - const struct vertex_header *v1 ) -{ - uint attr; - int num_outputs = draw_current_shader_outputs(draw); - for (attr = 0; attr < num_outputs; attr++) { - const float *val0 = v0->data[attr]; - const float *val1 = v1->data[attr]; - float *newv = dst->data[attr]; - uint i; - for (i = 0; i < 4; i++) { - newv[i] = val0[i] + t * (val1[i] - val0[i]); - } - } -} - - -static void -emit_segment(struct draw_stage *stage, struct prim_header *header, - float t0, float t1) -{ - struct vertex_header *v0new = dup_vert(stage, header->v[0], 0); - struct vertex_header *v1new = dup_vert(stage, header->v[1], 1); - struct prim_header newprim = *header; - - if (t0 > 0.0) { - screen_interp( stage->draw, v0new, t0, header->v[0], header->v[1] ); - newprim.v[0] = v0new; - } - - if (t1 < 1.0) { - screen_interp( stage->draw, v1new, t1, header->v[0], header->v[1] ); - newprim.v[1] = v1new; - } - - stage->next->line( stage->next, &newprim ); -} - - -static INLINE unsigned -stipple_test(int counter, ushort pattern, int factor) -{ - int b = (counter / factor) & 0xf; - return (1 << b) & pattern; -} - - -static void -stipple_line(struct draw_stage *stage, struct prim_header *header) -{ - struct stipple_stage *stipple = stipple_stage(stage); - struct vertex_header *v0 = header->v[0]; - struct vertex_header *v1 = header->v[1]; - const unsigned pos = draw_current_shader_position_output(stage->draw); - const float *pos0 = v0->data[pos]; - const float *pos1 = v1->data[pos]; - float start = 0; - int state = 0; - - float x0 = pos0[0]; - float x1 = pos1[0]; - float y0 = pos0[1]; - float y1 = pos1[1]; - - float dx = x0 > x1 ? x0 - x1 : x1 - x0; - float dy = y0 > y1 ? y0 - y1 : y1 - y0; - - float length = MAX2(dx, dy); - int i; - - if (header->flags & DRAW_PIPE_RESET_STIPPLE) - stipple->counter = 0; - - - /* XXX ToDo: intead of iterating pixel-by-pixel, use a look-up table. - */ - for (i = 0; i < length; i++) { - int result = stipple_test( (int) stipple->counter+i, - (ushort) stipple->pattern, stipple->factor ); - if (result != state) { - /* changing from "off" to "on" or vice versa */ - if (state) { - if (start != i) { - /* finishing an "on" segment */ - emit_segment( stage, header, start / length, i / length ); - } - } - else { - /* starting an "on" segment */ - start = (float) i; - } - state = result; - } - } - - if (state && start < length) - emit_segment( stage, header, start / length, 1.0 ); - - stipple->counter += length; -} - - -static void -reset_stipple_counter(struct draw_stage *stage) -{ - struct stipple_stage *stipple = stipple_stage(stage); - stipple->counter = 0; - stage->next->reset_stipple_counter( stage->next ); -} - -static void -stipple_reset_point(struct draw_stage *stage, struct prim_header *header) -{ - struct stipple_stage *stipple = stipple_stage(stage); - stipple->counter = 0; - stage->next->point(stage->next, header); -} - -static void -stipple_reset_tri(struct draw_stage *stage, struct prim_header *header) -{ - struct stipple_stage *stipple = stipple_stage(stage); - stipple->counter = 0; - stage->next->tri(stage->next, header); -} - - -static void -stipple_first_line(struct draw_stage *stage, - struct prim_header *header) -{ - struct stipple_stage *stipple = stipple_stage(stage); - struct draw_context *draw = stage->draw; - - stipple->pattern = draw->rasterizer->line_stipple_pattern; - stipple->factor = draw->rasterizer->line_stipple_factor + 1; - - stage->line = stipple_line; - stage->line( stage, header ); -} - - -static void -stipple_flush(struct draw_stage *stage, unsigned flags) -{ - stage->line = stipple_first_line; - stage->next->flush( stage->next, flags ); -} - - - - -static void -stipple_destroy( struct draw_stage *stage ) -{ - draw_free_temp_verts( stage ); - FREE( stage ); -} - - -/** - * Create line stippler stage - */ -struct draw_stage *draw_stipple_stage( struct draw_context *draw ) -{ - struct stipple_stage *stipple = CALLOC_STRUCT(stipple_stage); - if (stipple == NULL) - goto fail; - - stipple->stage.draw = draw; - stipple->stage.name = "stipple"; - stipple->stage.next = NULL; - stipple->stage.point = stipple_reset_point; - stipple->stage.line = stipple_first_line; - stipple->stage.tri = stipple_reset_tri; - stipple->stage.reset_stipple_counter = reset_stipple_counter; - stipple->stage.flush = stipple_flush; - stipple->stage.destroy = stipple_destroy; - - if (!draw_alloc_temp_verts( &stipple->stage, 2 )) - goto fail; - - return &stipple->stage; - -fail: - if (stipple) - stipple->stage.destroy( &stipple->stage ); - - return NULL; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_twoside.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_twoside.c deleted file mode 100644 index b1a70a02e47..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_twoside.c +++ /dev/null @@ -1,191 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: Keith Whitwell - */ - -#include "util/u_math.h" -#include "util/u_memory.h" -#include "pipe/p_defines.h" -#include "pipe/p_shader_tokens.h" -#include "draw_vs.h" -#include "draw_pipe.h" - -struct twoside_stage { - struct draw_stage stage; - float sign; /**< +1 or -1 */ - int attrib_front0, attrib_back0; - int attrib_front1, attrib_back1; -}; - - -static INLINE struct twoside_stage *twoside_stage( struct draw_stage *stage ) -{ - return (struct twoside_stage *)stage; -} - -/** - * Copy back color(s) to front color(s). - */ -static INLINE struct vertex_header * -copy_bfc( struct twoside_stage *twoside, - const struct vertex_header *v, - unsigned idx ) -{ - struct vertex_header *tmp = dup_vert( &twoside->stage, v, idx ); - - if (twoside->attrib_back0 >= 0 && twoside->attrib_front0 >= 0) { - COPY_4FV(tmp->data[twoside->attrib_front0], - tmp->data[twoside->attrib_back0]); - } - if (twoside->attrib_back1 >= 0 && twoside->attrib_front1 >= 0) { - COPY_4FV(tmp->data[twoside->attrib_front1], - tmp->data[twoside->attrib_back1]); - } - - return tmp; -} - - -/* Twoside tri: - */ -static void twoside_tri( struct draw_stage *stage, - struct prim_header *header ) -{ - struct twoside_stage *twoside = twoside_stage(stage); - - if (header->det * twoside->sign < 0.0) { - /* this is a back-facing triangle */ - struct prim_header tmp; - - tmp.det = header->det; - tmp.flags = header->flags; - tmp.pad = header->pad; - /* copy back attribs to front attribs */ - tmp.v[0] = copy_bfc(twoside, header->v[0], 0); - tmp.v[1] = copy_bfc(twoside, header->v[1], 1); - tmp.v[2] = copy_bfc(twoside, header->v[2], 2); - - stage->next->tri( stage->next, &tmp ); - } - else { - stage->next->tri( stage->next, header ); - } -} - - - -static void twoside_first_tri( struct draw_stage *stage, - struct prim_header *header ) -{ - struct twoside_stage *twoside = twoside_stage(stage); - const struct draw_vertex_shader *vs = stage->draw->vs.vertex_shader; - uint i; - - twoside->attrib_front0 = -1; - twoside->attrib_front1 = -1; - twoside->attrib_back0 = -1; - twoside->attrib_back1 = -1; - - /* Find which vertex shader outputs are front/back colors */ - for (i = 0; i < vs->info.num_outputs; i++) { - if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_COLOR) { - if (vs->info.output_semantic_index[i] == 0) - twoside->attrib_front0 = i; - else - twoside->attrib_front1 = i; - } - if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_BCOLOR) { - if (vs->info.output_semantic_index[i] == 0) - twoside->attrib_back0 = i; - else - twoside->attrib_back1 = i; - } - } - - /* - * We'll multiply the primitive's determinant by this sign to determine - * if the triangle is back-facing (negative). - * sign = -1 for CCW, +1 for CW - */ - twoside->sign = stage->draw->rasterizer->front_ccw ? -1.0f : 1.0f; - - stage->tri = twoside_tri; - stage->tri( stage, header ); -} - - -static void twoside_flush( struct draw_stage *stage, unsigned flags ) -{ - stage->tri = twoside_first_tri; - stage->next->flush( stage->next, flags ); -} - - -static void twoside_reset_stipple_counter( struct draw_stage *stage ) -{ - stage->next->reset_stipple_counter( stage->next ); -} - - -static void twoside_destroy( struct draw_stage *stage ) -{ - draw_free_temp_verts( stage ); - FREE( stage ); -} - - -/** - * Create twoside pipeline stage. - */ -struct draw_stage *draw_twoside_stage( struct draw_context *draw ) -{ - struct twoside_stage *twoside = CALLOC_STRUCT(twoside_stage); - if (twoside == NULL) - goto fail; - - twoside->stage.draw = draw; - twoside->stage.name = "twoside"; - twoside->stage.next = NULL; - twoside->stage.point = draw_pipe_passthrough_point; - twoside->stage.line = draw_pipe_passthrough_line; - twoside->stage.tri = twoside_first_tri; - twoside->stage.flush = twoside_flush; - twoside->stage.reset_stipple_counter = twoside_reset_stipple_counter; - twoside->stage.destroy = twoside_destroy; - - if (!draw_alloc_temp_verts( &twoside->stage, 3 )) - goto fail; - - return &twoside->stage; - - fail: - if (twoside) - twoside->stage.destroy( &twoside->stage ); - - return NULL; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_unfilled.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_unfilled.c deleted file mode 100644 index d87741b91e7..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_unfilled.c +++ /dev/null @@ -1,226 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \brief Drawing stage for handling glPolygonMode(line/point). - * Convert triangles to points or lines as needed. - */ - -/* Authors: Keith Whitwell - */ - -#include "util/u_memory.h" -#include "pipe/p_defines.h" -#include "draw_private.h" -#include "draw_pipe.h" - - -struct unfilled_stage { - struct draw_stage stage; - - /** [0] = front face, [1] = back face. - * legal values: PIPE_POLYGON_MODE_FILL, PIPE_POLYGON_MODE_LINE, - * and PIPE_POLYGON_MODE_POINT, - */ - unsigned mode[2]; -}; - - -static INLINE struct unfilled_stage *unfilled_stage( struct draw_stage *stage ) -{ - return (struct unfilled_stage *)stage; -} - - - -static void point( struct draw_stage *stage, - struct vertex_header *v0 ) -{ - struct prim_header tmp; - tmp.v[0] = v0; - stage->next->point( stage->next, &tmp ); -} - -static void line( struct draw_stage *stage, - struct vertex_header *v0, - struct vertex_header *v1 ) -{ - struct prim_header tmp; - tmp.v[0] = v0; - tmp.v[1] = v1; - stage->next->line( stage->next, &tmp ); -} - - -static void points( struct draw_stage *stage, - struct prim_header *header ) -{ - struct vertex_header *v0 = header->v[0]; - struct vertex_header *v1 = header->v[1]; - struct vertex_header *v2 = header->v[2]; - - if ((header->flags & DRAW_PIPE_EDGE_FLAG_0) && v0->edgeflag) point( stage, v0 ); - if ((header->flags & DRAW_PIPE_EDGE_FLAG_1) && v1->edgeflag) point( stage, v1 ); - if ((header->flags & DRAW_PIPE_EDGE_FLAG_2) && v2->edgeflag) point( stage, v2 ); -} - - -static void lines( struct draw_stage *stage, - struct prim_header *header ) -{ - struct vertex_header *v0 = header->v[0]; - struct vertex_header *v1 = header->v[1]; - struct vertex_header *v2 = header->v[2]; - - if (header->flags & DRAW_PIPE_RESET_STIPPLE) - stage->next->reset_stipple_counter( stage->next ); - - if ((header->flags & DRAW_PIPE_EDGE_FLAG_2) && v2->edgeflag) line( stage, v2, v0 ); - if ((header->flags & DRAW_PIPE_EDGE_FLAG_0) && v0->edgeflag) line( stage, v0, v1 ); - if ((header->flags & DRAW_PIPE_EDGE_FLAG_1) && v1->edgeflag) line( stage, v1, v2 ); -} - - -/** For debugging */ -static void -print_header_flags(unsigned flags) -{ - debug_printf("header->flags = "); - if (flags & DRAW_PIPE_RESET_STIPPLE) - debug_printf("RESET_STIPPLE "); - if (flags & DRAW_PIPE_EDGE_FLAG_0) - debug_printf("EDGE_FLAG_0 "); - if (flags & DRAW_PIPE_EDGE_FLAG_1) - debug_printf("EDGE_FLAG_1 "); - if (flags & DRAW_PIPE_EDGE_FLAG_2) - debug_printf("EDGE_FLAG_2 "); - debug_printf("\n"); -} - - -/* Unfilled tri: - * - * Note edgeflags in the vertex struct is not sufficient as we will - * need to manipulate them when decomposing primitives. - * - * We currently keep the vertex edgeflag and primitive edgeflag mask - * separate until the last possible moment. - */ -static void unfilled_tri( struct draw_stage *stage, - struct prim_header *header ) -{ - struct unfilled_stage *unfilled = unfilled_stage(stage); - unsigned cw = header->det >= 0.0; - unsigned mode = unfilled->mode[cw]; - - if (0) - print_header_flags(header->flags); - - switch (mode) { - case PIPE_POLYGON_MODE_FILL: - stage->next->tri( stage->next, header ); - break; - case PIPE_POLYGON_MODE_LINE: - lines( stage, header ); - break; - case PIPE_POLYGON_MODE_POINT: - points( stage, header ); - break; - default: - assert(0); - } -} - - -static void unfilled_first_tri( struct draw_stage *stage, - struct prim_header *header ) -{ - struct unfilled_stage *unfilled = unfilled_stage(stage); - const struct pipe_rasterizer_state *rast = stage->draw->rasterizer; - - unfilled->mode[0] = rast->front_ccw ? rast->fill_front : rast->fill_back; - unfilled->mode[1] = rast->front_ccw ? rast->fill_back : rast->fill_front; - - stage->tri = unfilled_tri; - stage->tri( stage, header ); -} - - - -static void unfilled_flush( struct draw_stage *stage, - unsigned flags ) -{ - stage->next->flush( stage->next, flags ); - - stage->tri = unfilled_first_tri; -} - - -static void unfilled_reset_stipple_counter( struct draw_stage *stage ) -{ - stage->next->reset_stipple_counter( stage->next ); -} - - -static void unfilled_destroy( struct draw_stage *stage ) -{ - draw_free_temp_verts( stage ); - FREE( stage ); -} - - -/** - * Create unfilled triangle stage. - */ -struct draw_stage *draw_unfilled_stage( struct draw_context *draw ) -{ - struct unfilled_stage *unfilled = CALLOC_STRUCT(unfilled_stage); - if (unfilled == NULL) - goto fail; - - unfilled->stage.draw = draw; - unfilled->stage.name = "unfilled"; - unfilled->stage.next = NULL; - unfilled->stage.tmp = NULL; - unfilled->stage.point = draw_pipe_passthrough_point; - unfilled->stage.line = draw_pipe_passthrough_line; - unfilled->stage.tri = unfilled_first_tri; - unfilled->stage.flush = unfilled_flush; - unfilled->stage.reset_stipple_counter = unfilled_reset_stipple_counter; - unfilled->stage.destroy = unfilled_destroy; - - if (!draw_alloc_temp_verts( &unfilled->stage, 0 )) - goto fail; - - return &unfilled->stage; - - fail: - if (unfilled) - unfilled->stage.destroy( &unfilled->stage ); - - return NULL; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_util.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_util.c deleted file mode 100644 index e22e5fed0c6..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_util.c +++ /dev/null @@ -1,137 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - /* - * Authors: - * Keith Whitwell - */ - -#include "util/u_memory.h" -#include "draw/draw_private.h" -#include "draw/draw_pipe.h" - - - -void -draw_pipe_passthrough_point(struct draw_stage *stage, struct prim_header *header) -{ - stage->next->point(stage->next, header); -} - -void -draw_pipe_passthrough_line(struct draw_stage *stage, struct prim_header *header) -{ - stage->next->line(stage->next, header); -} - -void -draw_pipe_passthrough_tri(struct draw_stage *stage, struct prim_header *header) -{ - stage->next->tri(stage->next, header); -} - - - - - -/* This is only used for temporary verts. - */ -#define MAX_VERTEX_SIZE ((2 + PIPE_MAX_SHADER_OUTPUTS) * 4 * sizeof(float)) - - -/** - * Allocate space for temporary post-transform vertices, such as for clipping. - */ -boolean draw_alloc_temp_verts( struct draw_stage *stage, unsigned nr ) -{ - assert(!stage->tmp); - - stage->tmp = NULL; - stage->nr_tmps = nr; - - if (nr != 0) - { - unsigned i; - ubyte *store = (ubyte *) MALLOC( MAX_VERTEX_SIZE * nr ); - - if (store == NULL) - return FALSE; - - stage->tmp = (struct vertex_header **) MALLOC( sizeof(struct vertex_header *) * nr ); - if (stage->tmp == NULL) { - FREE(store); - return FALSE; - } - - for (i = 0; i < nr; i++) - stage->tmp[i] = (struct vertex_header *)(store + i * MAX_VERTEX_SIZE); - } - - return TRUE; -} - - -void draw_free_temp_verts( struct draw_stage *stage ) -{ - if (stage->tmp) { - FREE( stage->tmp[0] ); - FREE( stage->tmp ); - stage->tmp = NULL; - } -} - - -/* Reset vertex ids. This is basically a type of flush. - * - * Called only from draw_pipe_vbuf.c - */ -void draw_reset_vertex_ids(struct draw_context *draw) -{ - struct draw_stage *stage = draw->pipeline.first; - - while (stage) { - unsigned i; - - for (i = 0; i < stage->nr_tmps; i++) - stage->tmp[i]->vertex_id = UNDEFINED_VERTEX_ID; - - stage = stage->next; - } - - if (draw->pipeline.verts) - { - unsigned i; - char *verts = draw->pipeline.verts; - unsigned stride = draw->pipeline.vertex_stride; - - for (i = 0; i < draw->pipeline.vertex_count; i++) { - ((struct vertex_header *)verts)->vertex_id = UNDEFINED_VERTEX_ID; - verts += stride; - } - } -} - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_validate.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_validate.c deleted file mode 100644 index 27afba5af3d..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_validate.c +++ /dev/null @@ -1,351 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: Keith Whitwell - */ - -#include "util/u_memory.h" -#include "util/u_math.h" -#include "pipe/p_defines.h" -#include "draw_private.h" -#include "draw_pipe.h" -#include "draw_context.h" -#include "draw_vbuf.h" - -static boolean points( unsigned prim ) -{ - return (prim == PIPE_PRIM_POINTS); -} - -static boolean lines( unsigned prim ) -{ - return (prim == PIPE_PRIM_LINES || - prim == PIPE_PRIM_LINE_STRIP || - prim == PIPE_PRIM_LINE_LOOP); -} - -static boolean triangles( unsigned prim ) -{ - return prim >= PIPE_PRIM_TRIANGLES; -} - -/** - * Default version of a function to check if we need any special - * pipeline stages, or whether prims/verts can go through untouched. - * Don't test for bypass clipping or vs modes, this function is just - * about the primitive pipeline stages. - * - * This can be overridden by the driver. - */ -boolean -draw_need_pipeline(const struct draw_context *draw, - const struct pipe_rasterizer_state *rasterizer, - unsigned int prim ) -{ - /* If the driver has overridden this, use that version: - */ - if (draw->render && - draw->render->need_pipeline) - { - return draw->render->need_pipeline( draw->render, - rasterizer, - prim ); - } - - /* Don't have to worry about triangles turning into lines/points - * and triggering the pipeline, because we have to trigger the - * pipeline *anyway* if unfilled mode is active. - */ - if (lines(prim)) - { - /* line stipple */ - if (rasterizer->line_stipple_enable && draw->pipeline.line_stipple) - return TRUE; - - /* wide lines */ - if (roundf(rasterizer->line_width) > draw->pipeline.wide_line_threshold) - return TRUE; - - /* AA lines */ - if (rasterizer->line_smooth && draw->pipeline.aaline) - return TRUE; - } - - if (points(prim)) - { - /* large points */ - if (rasterizer->point_size > draw->pipeline.wide_point_threshold) - return TRUE; - - /* sprite points */ - if (rasterizer->point_quad_rasterization - && draw->pipeline.wide_point_sprites) - return TRUE; - - /* AA points */ - if (rasterizer->point_smooth && draw->pipeline.aapoint) - return TRUE; - - /* point sprites */ - if (rasterizer->sprite_coord_enable && draw->pipeline.point_sprite) - return TRUE; - } - - - if (triangles(prim)) - { - /* polygon stipple */ - if (rasterizer->poly_stipple_enable && draw->pipeline.pstipple) - return TRUE; - - /* unfilled polygons */ - if (rasterizer->fill_front != PIPE_POLYGON_MODE_FILL || - rasterizer->fill_back != PIPE_POLYGON_MODE_FILL) - return TRUE; - - /* polygon offset */ - if (rasterizer->offset_point || - rasterizer->offset_line || - rasterizer->offset_tri) - return TRUE; - - /* two-side lighting */ - if (rasterizer->light_twoside) - return TRUE; - } - - /* polygon cull - this is difficult - hardware can cull just fine - * most of the time (though sometimes CULL_NEITHER is unsupported. - * - * Generally this isn't a reason to require the pipeline, though. - * - if (rasterizer->cull_mode) - return TRUE; - */ - - return FALSE; -} - - - -/** - * Rebuild the rendering pipeline. - */ -static struct draw_stage *validate_pipeline( struct draw_stage *stage ) -{ - struct draw_context *draw = stage->draw; - struct draw_stage *next = draw->pipeline.rasterize; - boolean need_det = FALSE; - boolean precalc_flat = FALSE; - boolean wide_lines, wide_points; - const struct pipe_rasterizer_state *rast = draw->rasterizer; - - /* Set the validate's next stage to the rasterize stage, so that it - * can be found later if needed for flushing. - */ - stage->next = next; - - /* drawing wide lines? */ - wide_lines = (roundf(rast->line_width) > draw->pipeline.wide_line_threshold - && !rast->line_smooth); - - /* drawing large/sprite points (but not AA points)? */ - if (rast->sprite_coord_enable && draw->pipeline.point_sprite) - wide_points = TRUE; - else if (rast->point_smooth && draw->pipeline.aapoint) - wide_points = FALSE; - else if (rast->point_size > draw->pipeline.wide_point_threshold) - wide_points = TRUE; - else if (rast->point_quad_rasterization && draw->pipeline.wide_point_sprites) - wide_points = TRUE; - else - wide_points = FALSE; - - /* - * NOTE: we build up the pipeline in end-to-start order. - * - * TODO: make the current primitive part of the state and build - * shorter pipelines for lines & points. - */ - - if (rast->line_smooth && draw->pipeline.aaline) { - draw->pipeline.aaline->next = next; - next = draw->pipeline.aaline; - } - - if (rast->point_smooth && draw->pipeline.aapoint) { - draw->pipeline.aapoint->next = next; - next = draw->pipeline.aapoint; - } - - if (wide_lines) { - draw->pipeline.wide_line->next = next; - next = draw->pipeline.wide_line; - precalc_flat = TRUE; - } - - if (wide_points) { - draw->pipeline.wide_point->next = next; - next = draw->pipeline.wide_point; - } - - if (rast->line_stipple_enable && draw->pipeline.line_stipple) { - draw->pipeline.stipple->next = next; - next = draw->pipeline.stipple; - precalc_flat = TRUE; /* only needed for lines really */ - } - - if (rast->poly_stipple_enable - && draw->pipeline.pstipple) { - draw->pipeline.pstipple->next = next; - next = draw->pipeline.pstipple; - } - - if (rast->fill_front != PIPE_POLYGON_MODE_FILL || - rast->fill_back != PIPE_POLYGON_MODE_FILL) { - draw->pipeline.unfilled->next = next; - next = draw->pipeline.unfilled; - precalc_flat = TRUE; /* only needed for triangles really */ - need_det = TRUE; - } - - if (rast->flatshade && precalc_flat) { - draw->pipeline.flatshade->next = next; - next = draw->pipeline.flatshade; - } - - if (rast->offset_point || - rast->offset_line || - rast->offset_tri) { - draw->pipeline.offset->next = next; - next = draw->pipeline.offset; - need_det = TRUE; - } - - if (rast->light_twoside) { - draw->pipeline.twoside->next = next; - next = draw->pipeline.twoside; - need_det = TRUE; - } - - /* Always run the cull stage as we calculate determinant there - * also. - * - * This can actually be a win as culling out the triangles can lead - * to less work emitting vertices, smaller vertex buffers, etc. - * It's difficult to say whether this will be true in general. - */ - if (need_det || rast->cull_face != PIPE_FACE_NONE) { - draw->pipeline.cull->next = next; - next = draw->pipeline.cull; - } - - /* Clip stage - */ - if (draw->clip_xy || draw->clip_z || draw->clip_user) - { - draw->pipeline.clip->next = next; - next = draw->pipeline.clip; - } - - - draw->pipeline.first = next; - - if (0) { - debug_printf("draw pipeline:\n"); - for (next = draw->pipeline.first; next ; next = next->next ) - debug_printf(" %s\n", next->name); - debug_printf("\n"); - } - - return draw->pipeline.first; -} - -static void validate_tri( struct draw_stage *stage, - struct prim_header *header ) -{ - struct draw_stage *pipeline = validate_pipeline( stage ); - pipeline->tri( pipeline, header ); -} - -static void validate_line( struct draw_stage *stage, - struct prim_header *header ) -{ - struct draw_stage *pipeline = validate_pipeline( stage ); - pipeline->line( pipeline, header ); -} - -static void validate_point( struct draw_stage *stage, - struct prim_header *header ) -{ - struct draw_stage *pipeline = validate_pipeline( stage ); - pipeline->point( pipeline, header ); -} - -static void validate_reset_stipple_counter( struct draw_stage *stage ) -{ - struct draw_stage *pipeline = validate_pipeline( stage ); - pipeline->reset_stipple_counter( pipeline ); -} - -static void validate_flush( struct draw_stage *stage, - unsigned flags ) -{ - /* May need to pass a backend flush on to the rasterize stage. - */ - if (stage->next) - stage->next->flush( stage->next, flags ); -} - - -static void validate_destroy( struct draw_stage *stage ) -{ - FREE( stage ); -} - - -/** - * Create validate pipeline stage. - */ -struct draw_stage *draw_validate_stage( struct draw_context *draw ) -{ - struct draw_stage *stage = CALLOC_STRUCT(draw_stage); - if (stage == NULL) - return NULL; - - stage->draw = draw; - stage->name = "validate"; - stage->next = NULL; - stage->point = validate_point; - stage->line = validate_line; - stage->tri = validate_tri; - stage->flush = validate_flush; - stage->reset_stipple_counter = validate_reset_stipple_counter; - stage->destroy = validate_destroy; - - return stage; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_vbuf.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_vbuf.c deleted file mode 100644 index 578433c2006..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_vbuf.c +++ /dev/null @@ -1,465 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \file - * Vertex buffer drawing stage. - * - * \author Jose Fonseca - * \author Keith Whitwell - */ - - -#include "util/u_debug.h" -#include "util/u_math.h" -#include "util/u_memory.h" - -#include "draw_vbuf.h" -#include "draw_private.h" -#include "draw_vertex.h" -#include "draw_pipe.h" -#include "translate/translate.h" -#include "translate/translate_cache.h" - - -/** - * Vertex buffer emit stage. - */ -struct vbuf_stage { - struct draw_stage stage; /**< This must be first (base class) */ - - struct vbuf_render *render; - - const struct vertex_info *vinfo; - - /** Vertex size in bytes */ - unsigned vertex_size; - - struct translate *translate; - - /* FIXME: we have no guarantee that 'unsigned' is 32bit */ - - /** Vertices in hardware format */ - unsigned *vertices; - unsigned *vertex_ptr; - unsigned max_vertices; - unsigned nr_vertices; - - /** Indices */ - ushort *indices; - unsigned max_indices; - unsigned nr_indices; - - /* Cache point size somewhere it's address won't change: - */ - float point_size; - - struct translate_cache *cache; -}; - - -/** - * Basically a cast wrapper. - */ -static INLINE struct vbuf_stage * -vbuf_stage( struct draw_stage *stage ) -{ - assert(stage); - return (struct vbuf_stage *)stage; -} - - -static void vbuf_flush_vertices( struct vbuf_stage *vbuf ); -static void vbuf_alloc_vertices( struct vbuf_stage *vbuf ); - - -static INLINE boolean -overflow( void *map, void *ptr, unsigned bytes, unsigned bufsz ) -{ - unsigned long used = (unsigned long) ((char *)ptr - (char *)map); - return (used + bytes) > bufsz; -} - - -static INLINE void -check_space( struct vbuf_stage *vbuf, unsigned nr ) -{ - if (vbuf->nr_vertices + nr > vbuf->max_vertices || - vbuf->nr_indices + nr > vbuf->max_indices) - { - vbuf_flush_vertices( vbuf ); - vbuf_alloc_vertices( vbuf ); - } -} - - - - -/** - * Extract the needed fields from post-transformed vertex and emit - * a hardware(driver) vertex. - * Recall that the vertices are constructed by the 'draw' module and - * have a couple of slots at the beginning (1-dword header, 4-dword - * clip pos) that we ignore here. We only use the vertex->data[] fields. - */ -static INLINE ushort -emit_vertex( struct vbuf_stage *vbuf, - struct vertex_header *vertex ) -{ - if (vertex->vertex_id == UNDEFINED_VERTEX_ID && vbuf->vertex_ptr) { - /* Hmm - vertices are emitted one at a time - better make sure - * set_buffer is efficient. Consider a special one-shot mode for - * translate. - */ - /* Note: we really do want data[0] here, not data[pos]: - */ - vbuf->translate->set_buffer(vbuf->translate, 0, vertex->data[0], 0, ~0); - vbuf->translate->run(vbuf->translate, 0, 1, 0, vbuf->vertex_ptr); - - if (0) draw_dump_emitted_vertex(vbuf->vinfo, (uint8_t *)vbuf->vertex_ptr); - - vbuf->vertex_ptr += vbuf->vertex_size/4; - vertex->vertex_id = vbuf->nr_vertices++; - } - - return (ushort)vertex->vertex_id; -} - - -static void -vbuf_tri( struct draw_stage *stage, - struct prim_header *prim ) -{ - struct vbuf_stage *vbuf = vbuf_stage( stage ); - unsigned i; - - check_space( vbuf, 3 ); - - for (i = 0; i < 3; i++) { - vbuf->indices[vbuf->nr_indices++] = emit_vertex( vbuf, prim->v[i] ); - } -} - - -static void -vbuf_line( struct draw_stage *stage, - struct prim_header *prim ) -{ - struct vbuf_stage *vbuf = vbuf_stage( stage ); - unsigned i; - - check_space( vbuf, 2 ); - - for (i = 0; i < 2; i++) { - vbuf->indices[vbuf->nr_indices++] = emit_vertex( vbuf, prim->v[i] ); - } -} - - -static void -vbuf_point( struct draw_stage *stage, - struct prim_header *prim ) -{ - struct vbuf_stage *vbuf = vbuf_stage( stage ); - - check_space( vbuf, 1 ); - - vbuf->indices[vbuf->nr_indices++] = emit_vertex( vbuf, prim->v[0] ); -} - - - - -/** - * Set the prim type for subsequent vertices. - * This may result in a new vertex size. The existing vbuffer (if any) - * will be flushed if needed and a new one allocated. - */ -static void -vbuf_start_prim( struct vbuf_stage *vbuf, uint prim ) -{ - struct translate_key hw_key; - unsigned dst_offset; - unsigned i; - - vbuf->render->set_primitive(vbuf->render, prim); - - /* Must do this after set_primitive() above: - * - * XXX: need some state managment to track when this needs to be - * recalculated. The driver should tell us whether there was a - * state change. - */ - vbuf->vinfo = vbuf->render->get_vertex_info(vbuf->render); - vbuf->vertex_size = vbuf->vinfo->size * sizeof(float); - - /* Translate from pipeline vertices to hw vertices. - */ - dst_offset = 0; - - for (i = 0; i < vbuf->vinfo->num_attribs; i++) { - unsigned emit_sz = 0; - unsigned src_buffer = 0; - enum pipe_format output_format; - unsigned src_offset = (vbuf->vinfo->attrib[i].src_index * 4 * sizeof(float) ); - - output_format = draw_translate_vinfo_format(vbuf->vinfo->attrib[i].emit); - emit_sz = draw_translate_vinfo_size(vbuf->vinfo->attrib[i].emit); - - /* doesn't handle EMIT_OMIT */ - assert(emit_sz != 0); - - if (vbuf->vinfo->attrib[i].emit == EMIT_1F_PSIZE) { - src_buffer = 1; - src_offset = 0; - } - - hw_key.element[i].type = TRANSLATE_ELEMENT_NORMAL; - hw_key.element[i].input_format = PIPE_FORMAT_R32G32B32A32_FLOAT; - hw_key.element[i].input_buffer = src_buffer; - hw_key.element[i].input_offset = src_offset; - hw_key.element[i].instance_divisor = 0; - hw_key.element[i].output_format = output_format; - hw_key.element[i].output_offset = dst_offset; - - dst_offset += emit_sz; - } - - hw_key.nr_elements = vbuf->vinfo->num_attribs; - hw_key.output_stride = vbuf->vinfo->size * 4; - - /* Don't bother with caching at this stage: - */ - if (!vbuf->translate || - translate_key_compare(&vbuf->translate->key, &hw_key) != 0) - { - translate_key_sanitize(&hw_key); - vbuf->translate = translate_cache_find(vbuf->cache, &hw_key); - - vbuf->translate->set_buffer(vbuf->translate, 1, &vbuf->point_size, 0, ~0); - } - - vbuf->point_size = vbuf->stage.draw->rasterizer->point_size; - - /* Allocate new buffer? - */ - assert(vbuf->vertices == NULL); - vbuf_alloc_vertices(vbuf); -} - - -static void -vbuf_first_tri( struct draw_stage *stage, - struct prim_header *prim ) -{ - struct vbuf_stage *vbuf = vbuf_stage( stage ); - - vbuf_flush_vertices( vbuf ); - vbuf_start_prim(vbuf, PIPE_PRIM_TRIANGLES); - stage->tri = vbuf_tri; - stage->tri( stage, prim ); -} - - -static void -vbuf_first_line( struct draw_stage *stage, - struct prim_header *prim ) -{ - struct vbuf_stage *vbuf = vbuf_stage( stage ); - - vbuf_flush_vertices( vbuf ); - vbuf_start_prim(vbuf, PIPE_PRIM_LINES); - stage->line = vbuf_line; - stage->line( stage, prim ); -} - - -static void -vbuf_first_point( struct draw_stage *stage, - struct prim_header *prim ) -{ - struct vbuf_stage *vbuf = vbuf_stage( stage ); - - vbuf_flush_vertices(vbuf); - vbuf_start_prim(vbuf, PIPE_PRIM_POINTS); - stage->point = vbuf_point; - stage->point( stage, prim ); -} - - - -/** - * Flush existing vertex buffer and allocate a new one. - */ -static void -vbuf_flush_vertices( struct vbuf_stage *vbuf ) -{ - if(vbuf->vertices) { - - vbuf->render->unmap_vertices( vbuf->render, 0, vbuf->nr_vertices - 1 ); - - if (vbuf->nr_indices) - { - vbuf->render->draw_elements(vbuf->render, - vbuf->indices, - vbuf->nr_indices ); - - vbuf->nr_indices = 0; - } - - /* Reset temporary vertices ids */ - if(vbuf->nr_vertices) - draw_reset_vertex_ids( vbuf->stage.draw ); - - /* Free the vertex buffer */ - vbuf->render->release_vertices( vbuf->render ); - - vbuf->max_vertices = vbuf->nr_vertices = 0; - vbuf->vertex_ptr = vbuf->vertices = NULL; - } - - /* Reset point/line/tri function pointers. - * If (for example) we transition from points to tris and back to points - * again, we need to call the vbuf_first_point() function again to flush - * the triangles before drawing more points. This can happen when drawing - * with front polygon mode = filled and back polygon mode = line or point. - */ - vbuf->stage.point = vbuf_first_point; - vbuf->stage.line = vbuf_first_line; - vbuf->stage.tri = vbuf_first_tri; -} - - -static void -vbuf_alloc_vertices( struct vbuf_stage *vbuf ) -{ - if (vbuf->vertex_ptr) { - assert(!vbuf->nr_indices); - assert(!vbuf->vertices); - } - - /* Allocate a new vertex buffer */ - vbuf->max_vertices = vbuf->render->max_vertex_buffer_bytes / vbuf->vertex_size; - - if(vbuf->max_vertices >= UNDEFINED_VERTEX_ID) - vbuf->max_vertices = UNDEFINED_VERTEX_ID - 1; - - /* Must always succeed -- driver gives us a - * 'max_vertex_buffer_bytes' which it guarantees it can allocate, - * and it will flush itself if necessary to do so. If this does - * fail, we are basically without usable hardware. - */ - vbuf->render->allocate_vertices(vbuf->render, - (ushort) vbuf->vertex_size, - (ushort) vbuf->max_vertices); - - vbuf->vertices = (uint *) vbuf->render->map_vertices( vbuf->render ); - - vbuf->vertex_ptr = vbuf->vertices; -} - - - -static void -vbuf_flush( struct draw_stage *stage, unsigned flags ) -{ - struct vbuf_stage *vbuf = vbuf_stage( stage ); - - vbuf_flush_vertices( vbuf ); -} - - -static void -vbuf_reset_stipple_counter( struct draw_stage *stage ) -{ - /* XXX: Need to do something here for hardware with linestipple. - */ - (void) stage; -} - - -static void vbuf_destroy( struct draw_stage *stage ) -{ - struct vbuf_stage *vbuf = vbuf_stage( stage ); - - if(vbuf->indices) - align_free( vbuf->indices ); - - if (vbuf->render) - vbuf->render->destroy( vbuf->render ); - - if (vbuf->cache) - translate_cache_destroy(vbuf->cache); - - FREE( stage ); -} - - -/** - * Create a new primitive vbuf/render stage. - */ -struct draw_stage *draw_vbuf_stage( struct draw_context *draw, - struct vbuf_render *render ) -{ - struct vbuf_stage *vbuf = CALLOC_STRUCT(vbuf_stage); - if (vbuf == NULL) - goto fail; - - vbuf->stage.draw = draw; - vbuf->stage.name = "vbuf"; - vbuf->stage.point = vbuf_first_point; - vbuf->stage.line = vbuf_first_line; - vbuf->stage.tri = vbuf_first_tri; - vbuf->stage.flush = vbuf_flush; - vbuf->stage.reset_stipple_counter = vbuf_reset_stipple_counter; - vbuf->stage.destroy = vbuf_destroy; - - vbuf->render = render; - vbuf->max_indices = MIN2(render->max_indices, UNDEFINED_VERTEX_ID-1); - - vbuf->indices = (ushort *) align_malloc( vbuf->max_indices * - sizeof(vbuf->indices[0]), - 16 ); - if (!vbuf->indices) - goto fail; - - vbuf->cache = translate_cache_create(); - if (!vbuf->cache) - goto fail; - - - vbuf->vertices = NULL; - vbuf->vertex_ptr = vbuf->vertices; - - return &vbuf->stage; - - fail: - if (vbuf) - vbuf_destroy(&vbuf->stage); - - return NULL; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_wide_line.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_wide_line.c deleted file mode 100644 index 98da9cfb999..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_wide_line.c +++ /dev/null @@ -1,228 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: Keith Whitwell - */ - -#include "pipe/p_context.h" -#include "pipe/p_defines.h" -#include "pipe/p_shader_tokens.h" -#include "util/u_math.h" -#include "util/u_memory.h" -#include "draw_private.h" -#include "draw_pipe.h" - - -struct wideline_stage { - struct draw_stage stage; - - float half_line_width; -}; - - - -static INLINE struct wideline_stage *wideline_stage( struct draw_stage *stage ) -{ - return (struct wideline_stage *)stage; -} - - - -/** - * Draw a wide line by drawing a quad (two triangles). - */ -static void wideline_line( struct draw_stage *stage, - struct prim_header *header ) -{ - /*const struct wideline_stage *wide = wideline_stage(stage);*/ - const unsigned pos = draw_current_shader_position_output(stage->draw); - const float half_width = 0.5f * stage->draw->rasterizer->line_width; - - struct prim_header tri; - - struct vertex_header *v0 = dup_vert(stage, header->v[0], 0); - struct vertex_header *v1 = dup_vert(stage, header->v[0], 1); - struct vertex_header *v2 = dup_vert(stage, header->v[1], 2); - struct vertex_header *v3 = dup_vert(stage, header->v[1], 3); - - float *pos0 = v0->data[pos]; - float *pos1 = v1->data[pos]; - float *pos2 = v2->data[pos]; - float *pos3 = v3->data[pos]; - - const float dx = fabsf(pos0[0] - pos2[0]); - const float dy = fabsf(pos0[1] - pos2[1]); - - const boolean gl_rasterization_rules = - stage->draw->rasterizer->gl_rasterization_rules; - - /* small tweak to meet GL specification */ - const float bias = gl_rasterization_rules ? 0.125f : 0.0f; - - /* - * Draw wide line as a quad (two tris) by "stretching" the line along - * X or Y. - * We need to tweak coords in several ways to be conformant here. - */ - - if (dx > dy) { - /* x-major line */ - pos0[1] = pos0[1] - half_width - bias; - pos1[1] = pos1[1] + half_width - bias; - pos2[1] = pos2[1] - half_width - bias; - pos3[1] = pos3[1] + half_width - bias; - if (gl_rasterization_rules) { - if (pos0[0] < pos2[0]) { - /* left to right line */ - pos0[0] -= 0.5f; - pos1[0] -= 0.5f; - pos2[0] -= 0.5f; - pos3[0] -= 0.5f; - } - else { - /* right to left line */ - pos0[0] += 0.5f; - pos1[0] += 0.5f; - pos2[0] += 0.5f; - pos3[0] += 0.5f; - } - } - } - else { - /* y-major line */ - pos0[0] = pos0[0] - half_width + bias; - pos1[0] = pos1[0] + half_width + bias; - pos2[0] = pos2[0] - half_width + bias; - pos3[0] = pos3[0] + half_width + bias; - if (gl_rasterization_rules) { - if (pos0[1] < pos2[1]) { - /* top to bottom line */ - pos0[1] -= 0.5f; - pos1[1] -= 0.5f; - pos2[1] -= 0.5f; - pos3[1] -= 0.5f; - } - else { - /* bottom to top line */ - pos0[1] += 0.5f; - pos1[1] += 0.5f; - pos2[1] += 0.5f; - pos3[1] += 0.5f; - } - } - } - - tri.det = header->det; /* only the sign matters */ - tri.v[0] = v0; - tri.v[1] = v2; - tri.v[2] = v3; - stage->next->tri( stage->next, &tri ); - - tri.v[0] = v0; - tri.v[1] = v3; - tri.v[2] = v1; - stage->next->tri( stage->next, &tri ); -} - - -static void wideline_first_line( struct draw_stage *stage, - struct prim_header *header ) -{ - struct draw_context *draw = stage->draw; - struct pipe_context *pipe = draw->pipe; - const struct pipe_rasterizer_state *rast = draw->rasterizer; - void *r; - - /* Disable triangle culling, stippling, unfilled mode etc. */ - r = draw_get_rasterizer_no_cull(draw, rast->scissor, rast->flatshade); - draw->suspend_flushing = TRUE; - pipe->bind_rasterizer_state(pipe, r); - draw->suspend_flushing = FALSE; - - stage->line = wideline_line; - - wideline_line(stage, header); -} - - -static void wideline_flush( struct draw_stage *stage, unsigned flags ) -{ - struct draw_context *draw = stage->draw; - struct pipe_context *pipe = draw->pipe; - - stage->line = wideline_first_line; - stage->next->flush( stage->next, flags ); - - /* restore original rasterizer state */ - if (draw->rast_handle) { - draw->suspend_flushing = TRUE; - pipe->bind_rasterizer_state(pipe, draw->rast_handle); - draw->suspend_flushing = FALSE; - } -} - - -static void wideline_reset_stipple_counter( struct draw_stage *stage ) -{ - stage->next->reset_stipple_counter( stage->next ); -} - - -static void wideline_destroy( struct draw_stage *stage ) -{ - draw_free_temp_verts( stage ); - FREE( stage ); -} - - -struct draw_stage *draw_wide_line_stage( struct draw_context *draw ) -{ - struct wideline_stage *wide = CALLOC_STRUCT(wideline_stage); - if (wide == NULL) - goto fail; - - wide->stage.draw = draw; - wide->stage.name = "wide-line"; - wide->stage.next = NULL; - wide->stage.point = draw_pipe_passthrough_point; - wide->stage.line = wideline_first_line; - wide->stage.tri = draw_pipe_passthrough_tri; - wide->stage.flush = wideline_flush; - wide->stage.reset_stipple_counter = wideline_reset_stipple_counter; - wide->stage.destroy = wideline_destroy; - - if (!draw_alloc_temp_verts( &wide->stage, 4 )) - goto fail; - - return &wide->stage; - -fail: - if (wide) - wide->stage.destroy( &wide->stage ); - - return NULL; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_wide_point.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_wide_point.c deleted file mode 100644 index 8e0a117843e..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pipe_wide_point.c +++ /dev/null @@ -1,336 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: Keith Whitwell - */ - -/** - * Notes on wide points and sprite mode: - * - * In wide point/sprite mode we effectively need to convert each incoming - * vertex into four outgoing vertices specifying the corners of a quad. - * Since we don't (yet) have geometry shaders, we have to handle this here - * in the draw module. - * - * For sprites, it also means that this is where we have to handle texcoords - * for the vertices of the quad. OpenGL's GL_COORD_REPLACE state specifies - * if/how enabled texcoords are automatically generated for sprites. We pass - * that info through gallium in the pipe_rasterizer_state::sprite_coord_mode - * array. - * - * Additionally, GLSL's gl_PointCoord fragment attribute has to be handled - * here as well. This is basically an additional texture/generic attribute - * that varies .x from 0 to 1 horizontally across the point and varies .y - * vertically from 0 to 1 down the sprite. - * - * With geometry shaders, the state tracker could create a GS to do - * most/all of this. - */ - - -#include "pipe/p_context.h" -#include "util/u_math.h" -#include "util/u_memory.h" -#include "pipe/p_defines.h" -#include "pipe/p_shader_tokens.h" -#include "draw_fs.h" -#include "draw_vs.h" -#include "draw_pipe.h" - - -struct widepoint_stage { - struct draw_stage stage; /**< base class */ - - float half_point_size; - - float xbias; - float ybias; - - /** for automatic texcoord generation/replacement */ - uint num_texcoord_gen; - uint texcoord_gen_slot[PIPE_MAX_SHADER_OUTPUTS]; - - int psize_slot; -}; - - - -static INLINE struct widepoint_stage * -widepoint_stage( struct draw_stage *stage ) -{ - return (struct widepoint_stage *)stage; -} - - -/** - * Set the vertex texcoords for sprite mode. - * Coords may be left untouched or set to a right-side-up or upside-down - * orientation. - */ -static void set_texcoords(const struct widepoint_stage *wide, - struct vertex_header *v, const float tc[4]) -{ - const struct draw_context *draw = wide->stage.draw; - const struct pipe_rasterizer_state *rast = draw->rasterizer; - const uint texcoord_mode = rast->sprite_coord_mode; - uint i; - - for (i = 0; i < wide->num_texcoord_gen; i++) { - const uint slot = wide->texcoord_gen_slot[i]; - v->data[slot][0] = tc[0]; - if (texcoord_mode == PIPE_SPRITE_COORD_LOWER_LEFT) - v->data[slot][1] = 1.0f - tc[1]; - else - v->data[slot][1] = tc[1]; - v->data[slot][2] = tc[2]; - v->data[slot][3] = tc[3]; - } -} - - -/* If there are lots of sprite points (and why wouldn't there be?) it - * would probably be more sensible to change hardware setup to - * optimize this rather than doing the whole thing in software like - * this. - */ -static void widepoint_point( struct draw_stage *stage, - struct prim_header *header ) -{ - const struct widepoint_stage *wide = widepoint_stage(stage); - const unsigned pos = draw_current_shader_position_output(stage->draw); - const boolean sprite = (boolean) stage->draw->rasterizer->point_quad_rasterization; - float half_size; - float left_adj, right_adj, bot_adj, top_adj; - - struct prim_header tri; - - /* four dups of original vertex */ - struct vertex_header *v0 = dup_vert(stage, header->v[0], 0); - struct vertex_header *v1 = dup_vert(stage, header->v[0], 1); - struct vertex_header *v2 = dup_vert(stage, header->v[0], 2); - struct vertex_header *v3 = dup_vert(stage, header->v[0], 3); - - float *pos0 = v0->data[pos]; - float *pos1 = v1->data[pos]; - float *pos2 = v2->data[pos]; - float *pos3 = v3->data[pos]; - - /* point size is either per-vertex or fixed size */ - if (wide->psize_slot >= 0) { - half_size = header->v[0]->data[wide->psize_slot][0]; - half_size *= 0.5f; - } - else { - half_size = wide->half_point_size; - } - - left_adj = -half_size + wide->xbias; - right_adj = half_size + wide->xbias; - bot_adj = half_size + wide->ybias; - top_adj = -half_size + wide->ybias; - - pos0[0] += left_adj; - pos0[1] += top_adj; - - pos1[0] += left_adj; - pos1[1] += bot_adj; - - pos2[0] += right_adj; - pos2[1] += top_adj; - - pos3[0] += right_adj; - pos3[1] += bot_adj; - - if (sprite) { - static const float tex00[4] = { 0, 0, 0, 1 }; - static const float tex01[4] = { 0, 1, 0, 1 }; - static const float tex11[4] = { 1, 1, 0, 1 }; - static const float tex10[4] = { 1, 0, 0, 1 }; - set_texcoords( wide, v0, tex00 ); - set_texcoords( wide, v1, tex01 ); - set_texcoords( wide, v2, tex10 ); - set_texcoords( wide, v3, tex11 ); - } - - tri.det = header->det; /* only the sign matters */ - tri.v[0] = v0; - tri.v[1] = v2; - tri.v[2] = v3; - stage->next->tri( stage->next, &tri ); - - tri.v[0] = v0; - tri.v[1] = v3; - tri.v[2] = v1; - stage->next->tri( stage->next, &tri ); -} - - -static void -widepoint_first_point(struct draw_stage *stage, - struct prim_header *header) -{ - struct widepoint_stage *wide = widepoint_stage(stage); - struct draw_context *draw = stage->draw; - struct pipe_context *pipe = draw->pipe; - const struct pipe_rasterizer_state *rast = draw->rasterizer; - void *r; - - wide->half_point_size = 0.5f * rast->point_size; - wide->xbias = 0.0; - wide->ybias = 0.0; - - if (rast->gl_rasterization_rules) { - wide->xbias = 0.125; - wide->ybias = -0.125; - } - - /* Disable triangle culling, stippling, unfilled mode etc. */ - r = draw_get_rasterizer_no_cull(draw, rast->scissor, rast->flatshade); - draw->suspend_flushing = TRUE; - pipe->bind_rasterizer_state(pipe, r); - draw->suspend_flushing = FALSE; - - /* XXX we won't know the real size if it's computed by the vertex shader! */ - if ((rast->point_size > draw->pipeline.wide_point_threshold) || - (rast->point_quad_rasterization && draw->pipeline.point_sprite)) { - stage->point = widepoint_point; - } - else { - stage->point = draw_pipe_passthrough_point; - } - - draw_remove_extra_vertex_attribs(draw); - - if (rast->point_quad_rasterization) { - const struct draw_fragment_shader *fs = draw->fs.fragment_shader; - uint i; - - assert(fs); - - wide->num_texcoord_gen = 0; - - /* Loop over fragment shader inputs looking for generic inputs - * for which bit 'k' in sprite_coord_enable is set. - */ - for (i = 0; i < fs->info.num_inputs; i++) { - if (fs->info.input_semantic_name[i] == TGSI_SEMANTIC_GENERIC) { - const int generic_index = fs->info.input_semantic_index[i]; - /* Note that sprite_coord enable is a bitfield of - * PIPE_MAX_SHADER_OUTPUTS bits. - */ - if (generic_index < PIPE_MAX_SHADER_OUTPUTS && - (rast->sprite_coord_enable & (1 << generic_index))) { - /* OK, this generic attribute needs to be replaced with a - * texcoord (see above). - */ - int slot = draw_alloc_extra_vertex_attrib(draw, - TGSI_SEMANTIC_GENERIC, - generic_index); - - /* add this slot to the texcoord-gen list */ - wide->texcoord_gen_slot[wide->num_texcoord_gen++] = slot; - } - } - } - } - - wide->psize_slot = -1; - if (rast->point_size_per_vertex) { - /* find PSIZ vertex output */ - const struct draw_vertex_shader *vs = draw->vs.vertex_shader; - uint i; - for (i = 0; i < vs->info.num_outputs; i++) { - if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_PSIZE) { - wide->psize_slot = i; - break; - } - } - } - - stage->point( stage, header ); -} - - -static void widepoint_flush( struct draw_stage *stage, unsigned flags ) -{ - struct draw_context *draw = stage->draw; - struct pipe_context *pipe = draw->pipe; - - stage->point = widepoint_first_point; - stage->next->flush( stage->next, flags ); - - draw_remove_extra_vertex_attribs(draw); - - /* restore original rasterizer state */ - if (draw->rast_handle) { - draw->suspend_flushing = TRUE; - pipe->bind_rasterizer_state(pipe, draw->rast_handle); - draw->suspend_flushing = FALSE; - } -} - - -static void widepoint_reset_stipple_counter( struct draw_stage *stage ) -{ - stage->next->reset_stipple_counter( stage->next ); -} - - -static void widepoint_destroy( struct draw_stage *stage ) -{ - draw_free_temp_verts( stage ); - FREE( stage ); -} - - -struct draw_stage *draw_wide_point_stage( struct draw_context *draw ) -{ - struct widepoint_stage *wide = CALLOC_STRUCT(widepoint_stage); - if (wide == NULL) - goto fail; - - wide->stage.draw = draw; - wide->stage.name = "wide-point"; - wide->stage.next = NULL; - wide->stage.point = widepoint_first_point; - wide->stage.line = draw_pipe_passthrough_line; - wide->stage.tri = draw_pipe_passthrough_tri; - wide->stage.flush = widepoint_flush; - wide->stage.reset_stipple_counter = widepoint_reset_stipple_counter; - wide->stage.destroy = widepoint_destroy; - - if (!draw_alloc_temp_verts( &wide->stage, 4 )) - goto fail; - - return &wide->stage; - - fail: - if (wide) - wide->stage.destroy( &wide->stage ); - - return NULL; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_private.h b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_private.h deleted file mode 100644 index 31beb4b98e3..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_private.h +++ /dev/null @@ -1,453 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * Private data structures, etc for the draw module. - */ - - -/** - * Authors: - * Keith Whitwell - * Brian Paul - */ - - -#ifndef DRAW_PRIVATE_H -#define DRAW_PRIVATE_H - - -#include "pipe/p_state.h" -#include "pipe/p_defines.h" - -#include "tgsi/tgsi_scan.h" - -#ifdef HAVE_LLVM -#include -struct draw_llvm; -#endif - - -/** Sum of frustum planes and user-defined planes */ -#define DRAW_TOTAL_CLIP_PLANES (6 + PIPE_MAX_CLIP_PLANES) - - -struct pipe_context; -struct draw_vertex_shader; -struct draw_context; -struct draw_stage; -struct vbuf_render; -struct tgsi_exec_machine; -struct tgsi_sampler; - - -/** - * Basic vertex info. - * Carry some useful information around with the vertices in the prim pipe. - */ -struct vertex_header { - unsigned clipmask:DRAW_TOTAL_CLIP_PLANES; - unsigned edgeflag:1; - unsigned have_clipdist:1; - unsigned vertex_id:16; - - float clip[4]; - float pre_clip_pos[4]; - - /* This will probably become float (*data)[4] soon: - */ - float data[][4]; -}; - -/* NOTE: It should match vertex_id size above */ -#define UNDEFINED_VERTEX_ID 0xffff - - -/* maximum number of shader variants we can cache */ -#define DRAW_MAX_SHADER_VARIANTS 128 - -/** - * Private context for the drawing module. - */ -struct draw_context -{ - struct pipe_context *pipe; - - /** Drawing/primitive pipeline stages */ - struct { - struct draw_stage *first; /**< one of the following */ - - struct draw_stage *validate; - - /* stages (in logical order) */ - struct draw_stage *flatshade; - struct draw_stage *clip; - struct draw_stage *cull; - struct draw_stage *twoside; - struct draw_stage *offset; - struct draw_stage *unfilled; - struct draw_stage *stipple; - struct draw_stage *aapoint; - struct draw_stage *aaline; - struct draw_stage *pstipple; - struct draw_stage *wide_line; - struct draw_stage *wide_point; - struct draw_stage *rasterize; - - float wide_point_threshold; /**< convert pnts to tris if larger than this */ - float wide_line_threshold; /**< convert lines to tris if wider than this */ - boolean wide_point_sprites; /**< convert points to tris for sprite mode */ - boolean line_stipple; /**< do line stipple? */ - boolean point_sprite; /**< convert points to quads for sprites? */ - - /* Temporary storage while the pipeline is being run: - */ - char *verts; - unsigned vertex_stride; - unsigned vertex_count; - } pipeline; - - - struct vbuf_render *render; - - /* Support prototype passthrough path: - */ - struct { - struct { - struct draw_pt_middle_end *fetch_emit; - struct draw_pt_middle_end *fetch_shade_emit; - struct draw_pt_middle_end *general; - struct draw_pt_middle_end *llvm; - } middle; - - struct { - struct draw_pt_front_end *vsplit; - } front; - - struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS]; - unsigned nr_vertex_buffers; - - /* - * This is the largest legal index value for the current set of - * bound vertex buffers. Regardless of any other consideration, - * all vertex lookups need to be clamped to 0..max_index to - * prevent out-of-bound access. - */ - unsigned max_index; - - struct pipe_vertex_element vertex_element[PIPE_MAX_ATTRIBS]; - unsigned nr_vertex_elements; - - struct pipe_index_buffer index_buffer; - - /* user-space vertex data, buffers */ - struct { - /** vertex element/index buffer (ex: glDrawElements) */ - const void *elts; - /** bytes per index (0, 1, 2 or 4) */ - unsigned eltSize; - int eltBias; - unsigned min_index; - unsigned max_index; - - /** vertex arrays */ - const void *vbuffer[PIPE_MAX_ATTRIBS]; - - /** constant buffers (for vertex/geometry shader) */ - const void *vs_constants[PIPE_MAX_CONSTANT_BUFFERS]; - unsigned vs_constants_size[PIPE_MAX_CONSTANT_BUFFERS]; - const void *gs_constants[PIPE_MAX_CONSTANT_BUFFERS]; - unsigned gs_constants_size[PIPE_MAX_CONSTANT_BUFFERS]; - - /* pointer to planes */ - float (*planes)[DRAW_TOTAL_CLIP_PLANES][4]; - } user; - - boolean test_fse; /* enable FSE even though its not correct (eg for softpipe) */ - boolean no_fse; /* disable FSE even when it is correct */ - } pt; - - struct { - boolean bypass_clip_xy; - boolean bypass_clip_z; - boolean guard_band_xy; - } driver; - - boolean flushing; /**< debugging/sanity */ - boolean suspend_flushing; /**< internally set */ - - /* Flags set if API requires clipping in these planes and the - * driver doesn't indicate that it can do it for us. - */ - boolean clip_xy; - boolean clip_z; - boolean clip_user; - boolean guard_band_xy; - - boolean force_passthrough; /**< never clip or shade */ - - boolean dump_vs; - - double mrd; /**< minimum resolvable depth value, for polygon offset */ - - /** Current rasterizer state given to us by the driver */ - const struct pipe_rasterizer_state *rasterizer; - /** Driver CSO handle for the current rasterizer state */ - void *rast_handle; - - /** Rasterizer CSOs without culling/stipple/etc */ - void *rasterizer_no_cull[2][2]; - - struct pipe_viewport_state viewport; - boolean identity_viewport; - - /** Vertex shader state */ - struct { - struct draw_vertex_shader *vertex_shader; - uint num_vs_outputs; /**< convenience, from vertex_shader */ - uint position_output; - uint edgeflag_output; - uint clipvertex_output; - uint clipdistance_output[2]; - /** TGSI program interpreter runtime state */ - struct tgsi_exec_machine *machine; - - uint num_samplers; - struct tgsi_sampler **samplers; - - - const void *aligned_constants[PIPE_MAX_CONSTANT_BUFFERS]; - - const void *aligned_constant_storage[PIPE_MAX_CONSTANT_BUFFERS]; - unsigned const_storage_size[PIPE_MAX_CONSTANT_BUFFERS]; - - - struct translate *fetch; - struct translate_cache *fetch_cache; - struct translate *emit; - struct translate_cache *emit_cache; - } vs; - - /** Geometry shader state */ - struct { - struct draw_geometry_shader *geometry_shader; - uint num_gs_outputs; /**< convenience, from geometry_shader */ - uint position_output; - - /** TGSI program interpreter runtime state */ - struct tgsi_exec_machine *machine; - - uint num_samplers; - struct tgsi_sampler **samplers; - } gs; - - /** Fragment shader state */ - struct { - struct draw_fragment_shader *fragment_shader; - } fs; - - /** Stream output (vertex feedback) state */ - struct { - struct pipe_stream_output_info state; - struct draw_so_target *targets[PIPE_MAX_SO_BUFFERS]; - uint num_targets; - } so; - - /* Clip derived state: - */ - float plane[DRAW_TOTAL_CLIP_PLANES][4]; - - /* If a prim stage introduces new vertex attributes, they'll be stored here - */ - struct { - uint num; - uint semantic_name[10]; - uint semantic_index[10]; - uint slot[10]; - } extra_shader_outputs; - - unsigned reduced_prim; - - unsigned instance_id; - -#ifdef HAVE_LLVM - struct draw_llvm *llvm; - struct gallivm_state *own_gallivm; -#endif - - struct pipe_sampler_view *sampler_views[PIPE_MAX_VERTEX_SAMPLERS]; - unsigned num_sampler_views; - const struct pipe_sampler_state *samplers[PIPE_MAX_VERTEX_SAMPLERS]; - unsigned num_samplers; - - void *driver_private; -}; - - -struct draw_fetch_info { - boolean linear; - unsigned start; - const unsigned *elts; - unsigned count; -}; - -struct draw_vertex_info { - struct vertex_header *verts; - unsigned vertex_size; - unsigned stride; - unsigned count; -}; - -/* these flags are set if the primitive is a segment of a larger one */ -#define DRAW_SPLIT_BEFORE 0x1 -#define DRAW_SPLIT_AFTER 0x2 - -struct draw_prim_info { - boolean linear; - unsigned start; - - const ushort *elts; - unsigned count; - - unsigned prim; - unsigned flags; - unsigned *primitive_lengths; - unsigned primitive_count; -}; - - -/******************************************************************************* - * Draw common initialization code - */ -boolean draw_init(struct draw_context *draw); - -/******************************************************************************* - * Vertex shader code: - */ -boolean draw_vs_init( struct draw_context *draw ); -void draw_vs_destroy( struct draw_context *draw ); - -void draw_vs_set_viewport( struct draw_context *, - const struct pipe_viewport_state * ); - -void -draw_vs_set_constants(struct draw_context *, - unsigned slot, - const void *constants, - unsigned size); - - - -/******************************************************************************* - * Geometry shading code: - */ -boolean draw_gs_init( struct draw_context *draw ); - -void -draw_gs_set_constants(struct draw_context *, - unsigned slot, - const void *constants, - unsigned size); - -void draw_gs_destroy( struct draw_context *draw ); - -/******************************************************************************* - * Common shading code: - */ -uint draw_current_shader_outputs(const struct draw_context *draw); -uint draw_current_shader_position_output(const struct draw_context *draw); -uint draw_current_shader_clipvertex_output(const struct draw_context *draw); -uint draw_current_shader_clipdistance_output(const struct draw_context *draw, int index); -int draw_alloc_extra_vertex_attrib(struct draw_context *draw, - uint semantic_name, uint semantic_index); -void draw_remove_extra_vertex_attribs(struct draw_context *draw); - - -/******************************************************************************* - * Vertex processing (was passthrough) code: - */ -boolean draw_pt_init( struct draw_context *draw ); -void draw_pt_destroy( struct draw_context *draw ); -void draw_pt_reset_vertex_ids( struct draw_context *draw ); - - -/******************************************************************************* - * Primitive processing (pipeline) code: - */ - -boolean draw_pipeline_init( struct draw_context *draw ); -void draw_pipeline_destroy( struct draw_context *draw ); - - - - - -/* - * These flags are used by the pipeline when unfilled and/or line stipple modes - * are operational. - */ -#define DRAW_PIPE_EDGE_FLAG_0 0x1 -#define DRAW_PIPE_EDGE_FLAG_1 0x2 -#define DRAW_PIPE_EDGE_FLAG_2 0x4 -#define DRAW_PIPE_EDGE_FLAG_ALL 0x7 -#define DRAW_PIPE_RESET_STIPPLE 0x8 - -void draw_pipeline_run( struct draw_context *draw, - const struct draw_vertex_info *vert, - const struct draw_prim_info *prim); - -void draw_pipeline_run_linear( struct draw_context *draw, - const struct draw_vertex_info *vert, - const struct draw_prim_info *prim); - - - - -void draw_pipeline_flush( struct draw_context *draw, - unsigned flags ); - - - -/******************************************************************************* - * Flushing - */ - -#define DRAW_FLUSH_STATE_CHANGE 0x8 -#define DRAW_FLUSH_BACKEND 0x10 - - -void draw_do_flush( struct draw_context *draw, unsigned flags ); - - - -void * -draw_get_rasterizer_no_cull( struct draw_context *draw, - boolean scissor, - boolean flatshade ); - - -#endif /* DRAW_PRIVATE_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt.c deleted file mode 100644 index c098c053b7a..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt.c +++ /dev/null @@ -1,507 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - /* - * Authors: - * Keith Whitwell - */ - -#include "draw/draw_context.h" -#include "draw/draw_gs.h" -#include "draw/draw_private.h" -#include "draw/draw_pt.h" -#include "draw/draw_vs.h" -#include "tgsi/tgsi_dump.h" -#include "util/u_math.h" -#include "util/u_prim.h" -#include "util/u_format.h" -#include "util/u_draw.h" - - -DEBUG_GET_ONCE_BOOL_OPTION(draw_fse, "DRAW_FSE", FALSE) -DEBUG_GET_ONCE_BOOL_OPTION(draw_no_fse, "DRAW_NO_FSE", FALSE) - -/* Overall we split things into: - * - frontend -- prepare fetch_elts, draw_elts - eg vsplit - * - middle -- fetch, shade, cliptest, viewport - * - pipeline -- the prim pipeline: clipping, wide lines, etc - * - backend -- the vbuf_render provided by the driver. - */ -static boolean -draw_pt_arrays(struct draw_context *draw, - unsigned prim, - unsigned start, - unsigned count) -{ - struct draw_pt_front_end *frontend = NULL; - struct draw_pt_middle_end *middle = NULL; - unsigned opt = 0; - - /* Sanitize primitive length: - */ - { - unsigned first, incr; - draw_pt_split_prim(prim, &first, &incr); - count = draw_pt_trim_count(count, first, incr); - if (count < first) - return TRUE; - } - - if (!draw->force_passthrough) { - unsigned gs_out_prim = (draw->gs.geometry_shader ? - draw->gs.geometry_shader->output_primitive : - prim); - - if (!draw->render) { - opt |= PT_PIPELINE; - } - - if (draw_need_pipeline(draw, - draw->rasterizer, - gs_out_prim)) { - opt |= PT_PIPELINE; - } - - if ((draw->clip_xy || - draw->clip_z || - draw->clip_user) && !draw->pt.test_fse) { - opt |= PT_CLIPTEST; - } - - opt |= PT_SHADE; - } - - if (draw->pt.middle.llvm) { - middle = draw->pt.middle.llvm; - } else { - if (opt == 0) - middle = draw->pt.middle.fetch_emit; - else if (opt == PT_SHADE && !draw->pt.no_fse) - middle = draw->pt.middle.fetch_shade_emit; - else - middle = draw->pt.middle.general; - } - - frontend = draw->pt.front.vsplit; - - frontend->prepare( frontend, prim, middle, opt ); - - frontend->run(frontend, start, count); - - frontend->finish( frontend ); - - return TRUE; -} - - -boolean draw_pt_init( struct draw_context *draw ) -{ - draw->pt.test_fse = debug_get_option_draw_fse(); - draw->pt.no_fse = debug_get_option_draw_no_fse(); - - draw->pt.front.vsplit = draw_pt_vsplit(draw); - if (!draw->pt.front.vsplit) - return FALSE; - - draw->pt.middle.fetch_emit = draw_pt_fetch_emit( draw ); - if (!draw->pt.middle.fetch_emit) - return FALSE; - - draw->pt.middle.fetch_shade_emit = draw_pt_middle_fse( draw ); - if (!draw->pt.middle.fetch_shade_emit) - return FALSE; - - draw->pt.middle.general = draw_pt_fetch_pipeline_or_emit( draw ); - if (!draw->pt.middle.general) - return FALSE; - -#if HAVE_LLVM - if (draw->llvm) - draw->pt.middle.llvm = draw_pt_fetch_pipeline_or_emit_llvm( draw ); -#endif - - return TRUE; -} - - -void draw_pt_destroy( struct draw_context *draw ) -{ - if (draw->pt.middle.llvm) { - draw->pt.middle.llvm->destroy( draw->pt.middle.llvm ); - draw->pt.middle.llvm = NULL; - } - - if (draw->pt.middle.general) { - draw->pt.middle.general->destroy( draw->pt.middle.general ); - draw->pt.middle.general = NULL; - } - - if (draw->pt.middle.fetch_emit) { - draw->pt.middle.fetch_emit->destroy( draw->pt.middle.fetch_emit ); - draw->pt.middle.fetch_emit = NULL; - } - - if (draw->pt.middle.fetch_shade_emit) { - draw->pt.middle.fetch_shade_emit->destroy( draw->pt.middle.fetch_shade_emit ); - draw->pt.middle.fetch_shade_emit = NULL; - } - - if (draw->pt.front.vsplit) { - draw->pt.front.vsplit->destroy( draw->pt.front.vsplit ); - draw->pt.front.vsplit = NULL; - } -} - - -/** - * Debug- print the first 'count' vertices. - */ -static void -draw_print_arrays(struct draw_context *draw, uint prim, int start, uint count) -{ - uint i; - - debug_printf("Draw arrays(prim = %u, start = %u, count = %u)\n", - prim, start, count); - - for (i = 0; i < count; i++) { - uint ii = 0; - uint j; - - if (draw->pt.user.eltSize) { - const char *elts; - - /* indexed arrays */ - elts = (const char *) draw->pt.user.elts; - elts += draw->pt.index_buffer.offset; - - switch (draw->pt.user.eltSize) { - case 1: - { - const ubyte *elem = (const ubyte *) elts; - ii = elem[start + i]; - } - break; - case 2: - { - const ushort *elem = (const ushort *) elts; - ii = elem[start + i]; - } - break; - case 4: - { - const uint *elem = (const uint *) elts; - ii = elem[start + i]; - } - break; - default: - assert(0); - return; - } - ii += draw->pt.user.eltBias; - debug_printf("Element[%u + %u] + %i -> Vertex %u:\n", start, i, - draw->pt.user.eltBias, ii); - } - else { - /* non-indexed arrays */ - ii = start + i; - debug_printf("Vertex %u:\n", ii); - } - - for (j = 0; j < draw->pt.nr_vertex_elements; j++) { - uint buf = draw->pt.vertex_element[j].vertex_buffer_index; - ubyte *ptr = (ubyte *) draw->pt.user.vbuffer[buf]; - - if (draw->pt.vertex_element[j].instance_divisor) { - ii = draw->instance_id / draw->pt.vertex_element[j].instance_divisor; - } - - ptr += draw->pt.vertex_buffer[buf].buffer_offset; - ptr += draw->pt.vertex_buffer[buf].stride * ii; - ptr += draw->pt.vertex_element[j].src_offset; - - debug_printf(" Attr %u: ", j); - switch (draw->pt.vertex_element[j].src_format) { - case PIPE_FORMAT_R32_FLOAT: - { - float *v = (float *) ptr; - debug_printf("R %f @ %p\n", v[0], (void *) v); - } - break; - case PIPE_FORMAT_R32G32_FLOAT: - { - float *v = (float *) ptr; - debug_printf("RG %f %f @ %p\n", v[0], v[1], (void *) v); - } - break; - case PIPE_FORMAT_R32G32B32_FLOAT: - { - float *v = (float *) ptr; - debug_printf("RGB %f %f %f @ %p\n", v[0], v[1], v[2], (void *) v); - } - break; - case PIPE_FORMAT_R32G32B32A32_FLOAT: - { - float *v = (float *) ptr; - debug_printf("RGBA %f %f %f %f @ %p\n", v[0], v[1], v[2], v[3], - (void *) v); - } - break; - case PIPE_FORMAT_B8G8R8A8_UNORM: - { - ubyte *u = (ubyte *) ptr; - debug_printf("BGRA %d %d %d %d @ %p\n", u[0], u[1], u[2], u[3], - (void *) u); - } - break; - default: - debug_printf("other format %s (fix me)\n", - util_format_name(draw->pt.vertex_element[j].src_format)); - } - } - } -} - - -/** Helper code for below */ -#define PRIM_RESTART_LOOP(elements) \ - do { \ - for (i = start; i < end; i++) { \ - if (elements[i] == info->restart_index) { \ - if (cur_count > 0) { \ - /* draw elts up to prev pos */ \ - draw_pt_arrays(draw, prim, cur_start, cur_count); \ - } \ - /* begin new prim at next elt */ \ - cur_start = i + 1; \ - cur_count = 0; \ - } \ - else { \ - cur_count++; \ - } \ - } \ - if (cur_count > 0) { \ - draw_pt_arrays(draw, prim, cur_start, cur_count); \ - } \ - } while (0) - - -/** - * For drawing prims with primitive restart enabled. - * Scan for restart indexes and draw the runs of elements/vertices between - * the restarts. - */ -static void -draw_pt_arrays_restart(struct draw_context *draw, - const struct pipe_draw_info *info) -{ - const unsigned prim = info->mode; - const unsigned start = info->start; - const unsigned count = info->count; - const unsigned end = start + count; - unsigned i, cur_start, cur_count; - - assert(info->primitive_restart); - - if (draw->pt.user.elts) { - /* indexed prims (draw_elements) */ - const char *elts = - (const char *) draw->pt.user.elts + draw->pt.index_buffer.offset; - - cur_start = start; - cur_count = 0; - - switch (draw->pt.user.eltSize) { - case 1: - { - const ubyte *elt_ub = (const ubyte *) elts; - PRIM_RESTART_LOOP(elt_ub); - } - break; - case 2: - { - const ushort *elt_us = (const ushort *) elts; - PRIM_RESTART_LOOP(elt_us); - } - break; - case 4: - { - const uint *elt_ui = (const uint *) elts; - PRIM_RESTART_LOOP(elt_ui); - } - break; - default: - assert(0 && "bad eltSize in draw_arrays()"); - } - } - else { - /* Non-indexed prims (draw_arrays). - * Primitive restart should have been handled in the state tracker. - */ - draw_pt_arrays(draw, prim, start, count); - } -} - - - -/** - * Non-instanced drawing. - * \sa draw_arrays_instanced - */ -void -draw_arrays(struct draw_context *draw, unsigned prim, - unsigned start, unsigned count) -{ - draw_arrays_instanced(draw, prim, start, count, 0, 1); -} - - -/** - * Instanced drawing. - * \sa draw_vbo - */ -void -draw_arrays_instanced(struct draw_context *draw, - unsigned mode, - unsigned start, - unsigned count, - unsigned startInstance, - unsigned instanceCount) -{ - struct pipe_draw_info info; - - util_draw_init_info(&info); - - info.mode = mode; - info.start = start; - info.count = count; - info.start_instance = startInstance; - info.instance_count = instanceCount; - - info.indexed = (draw->pt.user.elts != NULL); - if (!info.indexed) { - info.min_index = start; - info.max_index = start + count - 1; - } - - draw_vbo(draw, &info); -} - - -/** - * Draw vertex arrays. - * This is the main entrypoint into the drawing module. If drawing an indexed - * primitive, the draw_set_index_buffer() and draw_set_mapped_index_buffer() - * functions should have already been called to specify the element/index - * buffer information. - */ -void -draw_vbo(struct draw_context *draw, - const struct pipe_draw_info *info) -{ - unsigned reduced_prim = u_reduced_prim(info->mode); - unsigned instance; - unsigned index_limit; - - assert(info->instance_count > 0); - if (info->indexed) - assert(draw->pt.user.elts); - - draw->pt.user.eltSize = - (info->indexed) ? draw->pt.index_buffer.index_size : 0; - - draw->pt.user.eltBias = info->index_bias; - draw->pt.user.min_index = info->min_index; - draw->pt.user.max_index = info->max_index; - - if (reduced_prim != draw->reduced_prim) { - draw_do_flush(draw, DRAW_FLUSH_STATE_CHANGE); - draw->reduced_prim = reduced_prim; - } - - if (0) - debug_printf("draw_vbo(mode=%u start=%u count=%u):\n", - info->mode, info->start, info->count); - - if (0) - tgsi_dump(draw->vs.vertex_shader->state.tokens, 0); - - if (0) { - unsigned int i; - debug_printf("Elements:\n"); - for (i = 0; i < draw->pt.nr_vertex_elements; i++) { - debug_printf(" %u: src_offset=%u inst_div=%u vbuf=%u format=%s\n", - i, - draw->pt.vertex_element[i].src_offset, - draw->pt.vertex_element[i].instance_divisor, - draw->pt.vertex_element[i].vertex_buffer_index, - util_format_name(draw->pt.vertex_element[i].src_format)); - } - debug_printf("Buffers:\n"); - for (i = 0; i < draw->pt.nr_vertex_buffers; i++) { - debug_printf(" %u: stride=%u offset=%u ptr=%p\n", - i, - draw->pt.vertex_buffer[i].stride, - draw->pt.vertex_buffer[i].buffer_offset, - draw->pt.user.vbuffer[i]); - } - } - - if (0) - draw_print_arrays(draw, info->mode, info->start, MIN2(info->count, 20)); - - index_limit = util_draw_max_index(draw->pt.vertex_buffer, - draw->pt.nr_vertex_buffers, - draw->pt.vertex_element, - draw->pt.nr_vertex_elements, - info); - - if (index_limit == 0) { - /* one of the buffers is too small to do any valid drawing */ - debug_warning("draw: VBO too small to draw anything\n"); - return; - } - - draw->pt.max_index = index_limit - 1; - - - /* - * TODO: We could use draw->pt.max_index to further narrow - * the min_index/max_index hints given by the state tracker. - */ - - for (instance = 0; instance < info->instance_count; instance++) { - draw->instance_id = instance + info->start_instance; - - if (info->primitive_restart) { - draw_pt_arrays_restart(draw, info); - } - else { - draw_pt_arrays(draw, info->mode, info->start, info->count); - } - } -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt.h b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt.h deleted file mode 100644 index 9a45845521a..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt.h +++ /dev/null @@ -1,244 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - /* - * Authors: - * Keith Whitwell - */ - -#ifndef DRAW_PT_H -#define DRAW_PT_H - -#include "pipe/p_compiler.h" - -struct draw_pt_middle_end; -struct draw_context; -struct draw_prim_info; -struct draw_vertex_info; - - -#define PT_SHADE 0x1 -#define PT_CLIPTEST 0x2 -#define PT_PIPELINE 0x4 -#define PT_MAX_MIDDLE 0x8 - - -/* The "front end" - prepare sets of fetch, draw elements for the - * middle end. - * - * The fetch elements are indices to the vertices. The draw elements are - * indices to the fetched vertices. When both arrays of elements are both - * linear, middle->run_linear is called; When only the fetch elements are - * linear, middle->run_linear_elts is called; Otherwise, middle->run is - * called. - * - * When the number of the draw elements exceeds max_vertex of the middle end, - * the draw elements (as well as the fetch elements) are splitted and the - * middle end is called multiple times. - * - * Currenly there is: - * - vsplit - catchall implementation, splits big prims - */ -struct draw_pt_front_end { - void (*prepare)( struct draw_pt_front_end *, - unsigned prim, - struct draw_pt_middle_end *, - unsigned opt ); - - void (*run)( struct draw_pt_front_end *, - unsigned start, - unsigned count ); - - void (*finish)( struct draw_pt_front_end * ); - void (*destroy)( struct draw_pt_front_end * ); -}; - - -/* The "middle end" - prepares actual hardware vertices for the - * hardware backend. - * - * prim_flags is as defined by pipe_draw_info::flags. - * - * Currently two versions of this: - * - fetch, vertex shade, cliptest, prim-pipeline - * - fetch, emit (ie passthrough) - */ -struct draw_pt_middle_end { - void (*prepare)( struct draw_pt_middle_end *, - unsigned prim, - unsigned opt, - unsigned *max_vertices ); - - void (*run)( struct draw_pt_middle_end *, - const unsigned *fetch_elts, - unsigned fetch_count, - const ushort *draw_elts, - unsigned draw_count, - unsigned prim_flags ); - - void (*run_linear)(struct draw_pt_middle_end *, - unsigned start, - unsigned count, - unsigned prim_flags ); - - /* Transform all vertices in a linear range and then draw them with - * the supplied element list. May fail and return FALSE. - */ - boolean (*run_linear_elts)( struct draw_pt_middle_end *, - unsigned fetch_start, - unsigned fetch_count, - const ushort *draw_elts, - unsigned draw_count, - unsigned prim_flags ); - - int (*get_max_vertex_count)( struct draw_pt_middle_end * ); - - void (*finish)( struct draw_pt_middle_end * ); - void (*destroy)( struct draw_pt_middle_end * ); -}; - - -/* The "back end" - supplied by the driver, defined in draw_vbuf.h. - */ -struct vbuf_render; -struct vertex_header; - - -/* Frontends: - * - * Currently only the general-purpose vsplit implementation. - */ -struct draw_pt_front_end *draw_pt_vsplit(struct draw_context *draw); - - -/* Middle-ends: - * - * Currently one general-purpose case which can do all possibilities, - * at the slight expense of creating a vertex_header in some cases - * unecessarily. - * - * The special case fetch_emit code avoids pipeline vertices - * altogether and builds hardware vertices directly from API - * vertex_elements. - */ -struct draw_pt_middle_end *draw_pt_fetch_emit( struct draw_context *draw ); -struct draw_pt_middle_end *draw_pt_middle_fse( struct draw_context *draw ); -struct draw_pt_middle_end *draw_pt_fetch_pipeline_or_emit(struct draw_context *draw); -struct draw_pt_middle_end *draw_pt_fetch_pipeline_or_emit_llvm(struct draw_context *draw); - - - -/******************************************************************************* - * HW vertex emit: - */ -struct pt_emit; - -void draw_pt_emit_prepare( struct pt_emit *emit, - unsigned prim, - unsigned *max_vertices ); - -void draw_pt_emit( struct pt_emit *emit, - const struct draw_vertex_info *vert_info, - const struct draw_prim_info *prim_info); - -void draw_pt_emit_linear( struct pt_emit *emit, - const struct draw_vertex_info *vert_info, - const struct draw_prim_info *prim_info); - -void draw_pt_emit_destroy( struct pt_emit *emit ); - -struct pt_emit *draw_pt_emit_create( struct draw_context *draw ); - -/******************************************************************************* - * HW stream output emit: - */ -struct pt_so_emit; - -void draw_pt_so_emit_prepare( struct pt_so_emit *emit ); - -void draw_pt_so_emit( struct pt_so_emit *emit, - const struct draw_vertex_info *vert_info, - const struct draw_prim_info *prim_info ); - -void draw_pt_so_emit_destroy( struct pt_so_emit *emit ); - -struct pt_so_emit *draw_pt_so_emit_create( struct draw_context *draw ); - -/******************************************************************************* - * API vertex fetch: - */ - -struct pt_fetch; -void draw_pt_fetch_prepare( struct pt_fetch *fetch, - unsigned vertex_input_count, - unsigned vertex_size, - unsigned instance_id_index ); - -void draw_pt_fetch_run( struct pt_fetch *fetch, - const unsigned *elts, - unsigned count, - char *verts ); - -void draw_pt_fetch_run_linear( struct pt_fetch *fetch, - unsigned start, - unsigned count, - char *verts ); - -void draw_pt_fetch_destroy( struct pt_fetch *fetch ); - -struct pt_fetch *draw_pt_fetch_create( struct draw_context *draw ); - -/******************************************************************************* - * Post-VS: cliptest, rhw, viewport - */ -struct pt_post_vs; - -boolean draw_pt_post_vs_run( struct pt_post_vs *pvs, - struct draw_vertex_info *info ); - -void draw_pt_post_vs_prepare( struct pt_post_vs *pvs, - boolean clip_xy, - boolean clip_z, - boolean clip_user, - boolean guard_band, - boolean bypass_viewport, - boolean opengl, - boolean need_edgeflags ); - -struct pt_post_vs *draw_pt_post_vs_create( struct draw_context *draw ); - -void draw_pt_post_vs_destroy( struct pt_post_vs *pvs ); - - -/******************************************************************************* - * Utils: - */ -void draw_pt_split_prim(unsigned prim, unsigned *first, unsigned *incr); -unsigned draw_pt_trim_count(unsigned count, unsigned first, unsigned incr); - - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_decompose.h b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_decompose.h deleted file mode 100644 index 3127aad7310..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_decompose.h +++ /dev/null @@ -1,7 +0,0 @@ -#define LOCAL_VARS \ - char *verts = (char *) vertices; \ - const boolean last_vertex_last = \ - !(draw->rasterizer->flatshade && \ - draw->rasterizer->flatshade_first); - -#include "draw_decompose_tmp.h" diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_emit.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_emit.c deleted file mode 100644 index 942ddc4d7bc..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_emit.c +++ /dev/null @@ -1,295 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_memory.h" -#include "draw/draw_context.h" -#include "draw/draw_private.h" -#include "draw/draw_vbuf.h" -#include "draw/draw_vertex.h" -#include "draw/draw_pt.h" -#include "translate/translate.h" -#include "translate/translate_cache.h" - -struct pt_emit { - struct draw_context *draw; - - struct translate *translate; - - struct translate_cache *cache; - unsigned prim; - - const struct vertex_info *vinfo; -}; - - -void -draw_pt_emit_prepare(struct pt_emit *emit, - unsigned prim, - unsigned *max_vertices) -{ - struct draw_context *draw = emit->draw; - const struct vertex_info *vinfo; - unsigned dst_offset; - struct translate_key hw_key; - unsigned i; - - /* XXX: need to flush to get prim_vbuf.c to release its allocation?? - */ - draw_do_flush( draw, DRAW_FLUSH_BACKEND ); - - /* XXX: may need to defensively reset this later on as clipping can - * clobber this state in the render backend. - */ - emit->prim = prim; - - draw->render->set_primitive(draw->render, emit->prim); - - /* Must do this after set_primitive() above: - */ - emit->vinfo = vinfo = draw->render->get_vertex_info(draw->render); - - /* Translate from pipeline vertices to hw vertices. - */ - dst_offset = 0; - for (i = 0; i < vinfo->num_attribs; i++) { - unsigned emit_sz = 0; - unsigned src_buffer = 0; - unsigned output_format; - unsigned src_offset = (vinfo->attrib[i].src_index * 4 * sizeof(float) ); - - output_format = draw_translate_vinfo_format(vinfo->attrib[i].emit); - emit_sz = draw_translate_vinfo_size(vinfo->attrib[i].emit); - - /* doesn't handle EMIT_OMIT */ - assert(emit_sz != 0); - - if (vinfo->attrib[i].emit == EMIT_1F_PSIZE) { - src_buffer = 1; - src_offset = 0; - } - - hw_key.element[i].type = TRANSLATE_ELEMENT_NORMAL; - hw_key.element[i].input_format = PIPE_FORMAT_R32G32B32A32_FLOAT; - hw_key.element[i].input_buffer = src_buffer; - hw_key.element[i].input_offset = src_offset; - hw_key.element[i].instance_divisor = 0; - hw_key.element[i].output_format = output_format; - hw_key.element[i].output_offset = dst_offset; - - dst_offset += emit_sz; - } - - hw_key.nr_elements = vinfo->num_attribs; - hw_key.output_stride = vinfo->size * 4; - - if (!emit->translate || - translate_key_compare(&emit->translate->key, &hw_key) != 0) { - translate_key_sanitize(&hw_key); - emit->translate = translate_cache_find(emit->cache, &hw_key); - } - - *max_vertices = (draw->render->max_vertex_buffer_bytes / - (vinfo->size * 4)); -} - - -void -draw_pt_emit(struct pt_emit *emit, - const struct draw_vertex_info *vert_info, - const struct draw_prim_info *prim_info) -{ - const float (*vertex_data)[4] = (const float (*)[4])vert_info->verts->data; - unsigned vertex_count = vert_info->count; - unsigned stride = vert_info->stride; - const ushort *elts = prim_info->elts; - struct draw_context *draw = emit->draw; - struct translate *translate = emit->translate; - struct vbuf_render *render = draw->render; - unsigned start, i; - void *hw_verts; - - /* XXX: need to flush to get prim_vbuf.c to release its allocation?? - */ - draw_do_flush( draw, DRAW_FLUSH_BACKEND ); - - if (vertex_count == 0) - return; - - /* XXX: and work out some way to coordinate the render primitive - * between vbuf.c and here... - */ - draw->render->set_primitive(draw->render, emit->prim); - - render->allocate_vertices(render, - (ushort)translate->key.output_stride, - (ushort)vertex_count); - - hw_verts = render->map_vertices( render ); - if (!hw_verts) { - debug_warn_once("map of vertex buffer failed (out of memory?)"); - return; - } - - translate->set_buffer(translate, - 0, - vertex_data, - stride, - ~0); - - translate->set_buffer(translate, - 1, - &draw->rasterizer->point_size, - 0, - ~0); - - /* fetch/translate vertex attribs to fill hw_verts[] */ - translate->run(translate, - 0, - vertex_count, - draw->instance_id, - hw_verts ); - - render->unmap_vertices(render, 0, vertex_count - 1); - - for (start = i = 0; - i < prim_info->primitive_count; - start += prim_info->primitive_lengths[i], i++) - { - render->draw_elements(render, - elts + start, - prim_info->primitive_lengths[i]); - } - - render->release_vertices(render); -} - - -void -draw_pt_emit_linear(struct pt_emit *emit, - const struct draw_vertex_info *vert_info, - const struct draw_prim_info *prim_info) -{ - const float (*vertex_data)[4] = (const float (*)[4])vert_info->verts->data; - unsigned stride = vert_info->stride; - unsigned count = vert_info->count; - struct draw_context *draw = emit->draw; - struct translate *translate = emit->translate; - struct vbuf_render *render = draw->render; - void *hw_verts; - unsigned start, i; - -#if 0 - debug_printf("Linear emit\n"); -#endif - /* XXX: need to flush to get prim_vbuf.c to release its allocation?? - */ - draw_do_flush( draw, DRAW_FLUSH_BACKEND ); - - /* XXX: and work out some way to coordinate the render primitive - * between vbuf.c and here... - */ - draw->render->set_primitive(draw->render, emit->prim); - - if (!render->allocate_vertices(render, - (ushort)translate->key.output_stride, - (ushort)count)) - goto fail; - - hw_verts = render->map_vertices( render ); - if (!hw_verts) - goto fail; - - translate->set_buffer(translate, 0, - vertex_data, stride, count - 1); - - translate->set_buffer(translate, 1, - &draw->rasterizer->point_size, - 0, ~0); - - translate->run(translate, - 0, - count, - draw->instance_id, - hw_verts); - - if (0) { - unsigned i; - for (i = 0; i < count; i++) { - debug_printf("\n\n%s vertex %d:\n", __FUNCTION__, i); - draw_dump_emitted_vertex( emit->vinfo, - (const uint8_t *)hw_verts + - translate->key.output_stride * i ); - } - } - - render->unmap_vertices( render, 0, count - 1 ); - - for (start = i = 0; - i < prim_info->primitive_count; - start += prim_info->primitive_lengths[i], i++) - { - render->draw_arrays(render, - start, - prim_info->primitive_lengths[i]); - } - - render->release_vertices(render); - - return; - -fail: - debug_warn_once("allocate or map of vertex buffer failed (out of memory?)"); - return; -} - - -struct pt_emit * -draw_pt_emit_create(struct draw_context *draw) -{ - struct pt_emit *emit = CALLOC_STRUCT(pt_emit); - if (!emit) - return NULL; - - emit->draw = draw; - emit->cache = translate_cache_create(); - if (!emit->cache) { - FREE(emit); - return NULL; - } - - return emit; -} - - -void -draw_pt_emit_destroy(struct pt_emit *emit) -{ - if (emit->cache) - translate_cache_destroy(emit->cache); - - FREE(emit); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_fetch.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_fetch.c deleted file mode 100644 index a6cc1834e6c..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_fetch.c +++ /dev/null @@ -1,228 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_memory.h" -#include "util/u_math.h" -#include "util/u_format.h" -#include "draw/draw_context.h" -#include "draw/draw_private.h" -#include "draw/draw_pt.h" -#include "translate/translate.h" -#include "translate/translate_cache.h" - - -struct pt_fetch { - struct draw_context *draw; - - struct translate *translate; - - unsigned vertex_size; - - struct translate_cache *cache; -}; - - -/** - * Perform the fetch from API vertex elements & vertex buffers, to a - * contiguous set of float[4] attributes as required for the - * vertex_shader->run_linear() method. - * - * This is used in all cases except pure passthrough - * (draw_pt_fetch_emit.c) which has its own version to translate - * directly to hw vertices. - * - */ -void -draw_pt_fetch_prepare(struct pt_fetch *fetch, - unsigned vs_input_count, - unsigned vertex_size, - unsigned instance_id_index) -{ - struct draw_context *draw = fetch->draw; - unsigned nr_inputs; - unsigned i, nr = 0, ei = 0; - unsigned dst_offset = 0; - unsigned num_extra_inputs = 0; - struct translate_key key; - - fetch->vertex_size = vertex_size; - - /* Leave the clipmask/edgeflags/pad/vertex_id untouched - */ - dst_offset += 1 * sizeof(float); - /* Just leave the clip[] and pre_clip_pos[] array untouched. - */ - dst_offset += 8 * sizeof(float); - - if (instance_id_index != ~0) { - num_extra_inputs++; - } - - assert(draw->pt.nr_vertex_elements + num_extra_inputs >= vs_input_count); - - nr_inputs = MIN2(vs_input_count, draw->pt.nr_vertex_elements + num_extra_inputs); - - for (i = 0; i < nr_inputs; i++) { - if (i == instance_id_index) { - key.element[nr].type = TRANSLATE_ELEMENT_INSTANCE_ID; - key.element[nr].input_format = PIPE_FORMAT_R32_USCALED; - key.element[nr].output_format = PIPE_FORMAT_R32_USCALED; - key.element[nr].output_offset = dst_offset; - - dst_offset += sizeof(uint); - } else if (util_format_is_pure_sint(draw->pt.vertex_element[i].src_format)) { - key.element[nr].type = TRANSLATE_ELEMENT_NORMAL; - key.element[nr].input_format = draw->pt.vertex_element[ei].src_format; - key.element[nr].input_buffer = draw->pt.vertex_element[ei].vertex_buffer_index; - key.element[nr].input_offset = draw->pt.vertex_element[ei].src_offset; - key.element[nr].instance_divisor = draw->pt.vertex_element[ei].instance_divisor; - key.element[nr].output_format = PIPE_FORMAT_R32G32B32A32_SINT; - key.element[nr].output_offset = dst_offset; - - ei++; - dst_offset += 4 * sizeof(int); - } else if (util_format_is_pure_uint(draw->pt.vertex_element[i].src_format)) { - key.element[nr].type = TRANSLATE_ELEMENT_NORMAL; - key.element[nr].input_format = draw->pt.vertex_element[ei].src_format; - key.element[nr].input_buffer = draw->pt.vertex_element[ei].vertex_buffer_index; - key.element[nr].input_offset = draw->pt.vertex_element[ei].src_offset; - key.element[nr].instance_divisor = draw->pt.vertex_element[ei].instance_divisor; - key.element[nr].output_format = PIPE_FORMAT_R32G32B32A32_UINT; - key.element[nr].output_offset = dst_offset; - - ei++; - dst_offset += 4 * sizeof(unsigned); - } else { - key.element[nr].type = TRANSLATE_ELEMENT_NORMAL; - key.element[nr].input_format = draw->pt.vertex_element[ei].src_format; - key.element[nr].input_buffer = draw->pt.vertex_element[ei].vertex_buffer_index; - key.element[nr].input_offset = draw->pt.vertex_element[ei].src_offset; - key.element[nr].instance_divisor = draw->pt.vertex_element[ei].instance_divisor; - key.element[nr].output_format = PIPE_FORMAT_R32G32B32A32_FLOAT; - key.element[nr].output_offset = dst_offset; - - ei++; - dst_offset += 4 * sizeof(float); - } - - nr++; - } - - assert(dst_offset <= vertex_size); - - key.nr_elements = nr; - key.output_stride = vertex_size; - - if (!fetch->translate || - translate_key_compare(&fetch->translate->key, &key) != 0) - { - translate_key_sanitize(&key); - fetch->translate = translate_cache_find(fetch->cache, &key); - } -} - - -void -draw_pt_fetch_run(struct pt_fetch *fetch, - const unsigned *elts, - unsigned count, - char *verts) -{ - struct draw_context *draw = fetch->draw; - struct translate *translate = fetch->translate; - unsigned i; - - for (i = 0; i < draw->pt.nr_vertex_buffers; i++) { - translate->set_buffer(translate, - i, - ((char *)draw->pt.user.vbuffer[i] + - draw->pt.vertex_buffer[i].buffer_offset), - draw->pt.vertex_buffer[i].stride, - draw->pt.max_index); - } - - translate->run_elts( translate, - elts, - count, - draw->instance_id, - verts ); -} - - -void -draw_pt_fetch_run_linear(struct pt_fetch *fetch, - unsigned start, - unsigned count, - char *verts) -{ - struct draw_context *draw = fetch->draw; - struct translate *translate = fetch->translate; - unsigned i; - - for (i = 0; i < draw->pt.nr_vertex_buffers; i++) { - translate->set_buffer(translate, - i, - ((char *)draw->pt.user.vbuffer[i] + - draw->pt.vertex_buffer[i].buffer_offset), - draw->pt.vertex_buffer[i].stride, - draw->pt.user.max_index + draw->pt.user.eltBias); - } - - translate->run( translate, - start, - count, - draw->instance_id, - verts ); -} - - -struct pt_fetch * -draw_pt_fetch_create(struct draw_context *draw) -{ - struct pt_fetch *fetch = CALLOC_STRUCT(pt_fetch); - if (!fetch) - return NULL; - - fetch->draw = draw; - fetch->cache = translate_cache_create(); - if (!fetch->cache) { - FREE(fetch); - return NULL; - } - - return fetch; -} - - -void -draw_pt_fetch_destroy(struct pt_fetch *fetch) -{ - if (fetch->cache) - translate_cache_destroy(fetch->cache); - - FREE(fetch); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c deleted file mode 100644 index f30db1386cc..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c +++ /dev/null @@ -1,389 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - /* - * Authors: - * Keith Whitwell - */ - -#include "util/u_memory.h" -#include "draw/draw_context.h" -#include "draw/draw_private.h" -#include "draw/draw_vbuf.h" -#include "draw/draw_vertex.h" -#include "draw/draw_pt.h" -#include "draw/draw_gs.h" -#include "translate/translate.h" -#include "translate/translate_cache.h" - -/* The simplest 'middle end' in the new vertex code. - * - * The responsibilities of a middle end are to: - * - perform vertex fetch using - * - draw vertex element/buffer state - * - a list of fetch indices we received as an input - * - run the vertex shader - * - cliptest, - * - clip coord calculation - * - viewport transformation - * - if necessary, run the primitive pipeline, passing it: - * - a linear array of vertex_header vertices constructed here - * - a set of draw indices we received as an input - * - otherwise, drive the hw backend, - * - allocate space for hardware format vertices - * - translate the vertex-shader output vertices to hw format - * - calling the backend draw functions. - * - * For convenience, we provide a helper function to drive the hardware - * backend given similar inputs to those required to run the pipeline. - * - * In the case of passthrough mode, many of these actions are disabled - * or noops, so we end up doing: - * - * - perform vertex fetch - * - drive the hw backend - * - * IE, basically just vertex fetch to post-vs-format vertices, - * followed by a call to the backend helper function. - */ - - -struct fetch_emit_middle_end { - struct draw_pt_middle_end base; - struct draw_context *draw; - - struct translate *translate; - const struct vertex_info *vinfo; - - /* Cache point size somewhere it's address won't change: - */ - float point_size; - - struct translate_cache *cache; -}; - - -static void fetch_emit_prepare( struct draw_pt_middle_end *middle, - unsigned prim, - unsigned opt, - unsigned *max_vertices ) -{ - struct fetch_emit_middle_end *feme = (struct fetch_emit_middle_end *)middle; - struct draw_context *draw = feme->draw; - const struct vertex_info *vinfo; - unsigned i, dst_offset; - struct translate_key key; - unsigned gs_out_prim = (draw->gs.geometry_shader ? - draw->gs.geometry_shader->output_primitive : - prim); - - draw->render->set_primitive(draw->render, gs_out_prim); - - /* Must do this after set_primitive() above: - */ - vinfo = feme->vinfo = draw->render->get_vertex_info(draw->render); - - /* Transform from API vertices to HW vertices, skipping the - * pipeline_vertex intermediate step. - */ - dst_offset = 0; - memset(&key, 0, sizeof(key)); - - for (i = 0; i < vinfo->num_attribs; i++) { - const struct pipe_vertex_element *src = &draw->pt.vertex_element[vinfo->attrib[i].src_index]; - - unsigned emit_sz = 0; - unsigned input_format = src->src_format; - unsigned input_buffer = src->vertex_buffer_index; - unsigned input_offset = src->src_offset; - unsigned output_format; - - output_format = draw_translate_vinfo_format(vinfo->attrib[i].emit); - emit_sz = draw_translate_vinfo_size(vinfo->attrib[i].emit); - - if (vinfo->attrib[i].emit == EMIT_OMIT) - continue; - - if (vinfo->attrib[i].emit == EMIT_1F_PSIZE) { - input_format = PIPE_FORMAT_R32_FLOAT; - input_buffer = draw->pt.nr_vertex_buffers; - input_offset = 0; - } - - key.element[i].type = TRANSLATE_ELEMENT_NORMAL; - key.element[i].input_format = input_format; - key.element[i].input_buffer = input_buffer; - key.element[i].input_offset = input_offset; - key.element[i].instance_divisor = src->instance_divisor; - key.element[i].output_format = output_format; - key.element[i].output_offset = dst_offset; - - dst_offset += emit_sz; - } - - key.nr_elements = vinfo->num_attribs; - key.output_stride = vinfo->size * 4; - - /* Don't bother with caching at this stage: - */ - if (!feme->translate || - translate_key_compare(&feme->translate->key, &key) != 0) - { - translate_key_sanitize(&key); - feme->translate = translate_cache_find(feme->cache, - &key); - - feme->translate->set_buffer(feme->translate, - draw->pt.nr_vertex_buffers, - &feme->point_size, - 0, - ~0); - } - - feme->point_size = draw->rasterizer->point_size; - - for (i = 0; i < draw->pt.nr_vertex_buffers; i++) { - feme->translate->set_buffer(feme->translate, - i, - ((char *)draw->pt.user.vbuffer[i] + - draw->pt.vertex_buffer[i].buffer_offset), - draw->pt.vertex_buffer[i].stride, - draw->pt.max_index); - } - - *max_vertices = (draw->render->max_vertex_buffer_bytes / - (vinfo->size * 4)); -} - - -static void fetch_emit_run( struct draw_pt_middle_end *middle, - const unsigned *fetch_elts, - unsigned fetch_count, - const ushort *draw_elts, - unsigned draw_count, - unsigned prim_flags ) -{ - struct fetch_emit_middle_end *feme = (struct fetch_emit_middle_end *)middle; - struct draw_context *draw = feme->draw; - void *hw_verts; - - /* XXX: need to flush to get prim_vbuf.c to release its allocation?? - */ - draw_do_flush( draw, DRAW_FLUSH_BACKEND ); - - draw->render->allocate_vertices( draw->render, - (ushort)feme->translate->key.output_stride, - (ushort)fetch_count ); - - hw_verts = draw->render->map_vertices( draw->render ); - if (!hw_verts) { - debug_warn_once("vertex buffer allocation failed (out of memory?)"); - return; - } - - /* Single routine to fetch vertices and emit HW verts. - */ - feme->translate->run_elts( feme->translate, - fetch_elts, - fetch_count, - draw->instance_id, - hw_verts ); - - if (0) { - unsigned i; - for (i = 0; i < fetch_count; i++) { - debug_printf("\n\nvertex %d:\n", i); - draw_dump_emitted_vertex( feme->vinfo, - (const uint8_t *)hw_verts + feme->vinfo->size * 4 * i ); - } - } - - draw->render->unmap_vertices( draw->render, - 0, - (ushort)(fetch_count - 1) ); - - /* XXX: Draw arrays path to avoid re-emitting index list again and - * again. - */ - draw->render->draw_elements( draw->render, - draw_elts, - draw_count ); - - /* Done -- that was easy, wasn't it: - */ - draw->render->release_vertices( draw->render ); - -} - - -static void fetch_emit_run_linear( struct draw_pt_middle_end *middle, - unsigned start, - unsigned count, - unsigned prim_flags ) -{ - struct fetch_emit_middle_end *feme = (struct fetch_emit_middle_end *)middle; - struct draw_context *draw = feme->draw; - void *hw_verts; - - /* XXX: need to flush to get prim_vbuf.c to release its allocation?? - */ - draw_do_flush( draw, DRAW_FLUSH_BACKEND ); - - if (!draw->render->allocate_vertices( draw->render, - (ushort)feme->translate->key.output_stride, - (ushort)count )) - goto fail; - - hw_verts = draw->render->map_vertices( draw->render ); - if (!hw_verts) - goto fail; - - /* Single routine to fetch vertices and emit HW verts. - */ - feme->translate->run( feme->translate, - start, - count, - draw->instance_id, - hw_verts ); - - if (0) { - unsigned i; - for (i = 0; i < count; i++) { - debug_printf("\n\nvertex %d:\n", i); - draw_dump_emitted_vertex( feme->vinfo, - (const uint8_t *)hw_verts + feme->vinfo->size * 4 * i ); - } - } - - draw->render->unmap_vertices( draw->render, 0, count - 1 ); - - /* XXX: Draw arrays path to avoid re-emitting index list again and - * again. - */ - draw->render->draw_arrays( draw->render, 0, count ); - - /* Done -- that was easy, wasn't it: - */ - draw->render->release_vertices( draw->render ); - return; - -fail: - debug_warn_once("allocate or map of vertex buffer failed (out of memory?)"); - return; -} - - -static boolean fetch_emit_run_linear_elts( struct draw_pt_middle_end *middle, - unsigned start, - unsigned count, - const ushort *draw_elts, - unsigned draw_count, - unsigned prim_flags ) -{ - struct fetch_emit_middle_end *feme = (struct fetch_emit_middle_end *)middle; - struct draw_context *draw = feme->draw; - void *hw_verts; - - /* XXX: need to flush to get prim_vbuf.c to release its allocation?? - */ - draw_do_flush( draw, DRAW_FLUSH_BACKEND ); - - if (!draw->render->allocate_vertices( draw->render, - (ushort)feme->translate->key.output_stride, - (ushort)count )) - return FALSE; - - hw_verts = draw->render->map_vertices( draw->render ); - if (!hw_verts) - return FALSE; - - /* Single routine to fetch vertices and emit HW verts. - */ - feme->translate->run( feme->translate, - start, - count, - draw->instance_id, - hw_verts ); - - draw->render->unmap_vertices( draw->render, 0, (ushort)(count - 1) ); - - /* XXX: Draw arrays path to avoid re-emitting index list again and - * again. - */ - draw->render->draw_elements( draw->render, - draw_elts, - draw_count ); - - /* Done -- that was easy, wasn't it: - */ - draw->render->release_vertices( draw->render ); - - return TRUE; -} - - -static void fetch_emit_finish( struct draw_pt_middle_end *middle ) -{ - /* nothing to do */ -} - - -static void fetch_emit_destroy( struct draw_pt_middle_end *middle ) -{ - struct fetch_emit_middle_end *feme = (struct fetch_emit_middle_end *)middle; - - if (feme->cache) - translate_cache_destroy(feme->cache); - - FREE(middle); -} - - -struct draw_pt_middle_end *draw_pt_fetch_emit( struct draw_context *draw ) -{ - struct fetch_emit_middle_end *fetch_emit = CALLOC_STRUCT( fetch_emit_middle_end ); - if (fetch_emit == NULL) - return NULL; - - fetch_emit->cache = translate_cache_create(); - if (!fetch_emit->cache) { - FREE(fetch_emit); - return NULL; - } - - fetch_emit->base.prepare = fetch_emit_prepare; - fetch_emit->base.run = fetch_emit_run; - fetch_emit->base.run_linear = fetch_emit_run_linear; - fetch_emit->base.run_linear_elts = fetch_emit_run_linear_elts; - fetch_emit->base.finish = fetch_emit_finish; - fetch_emit->base.destroy = fetch_emit_destroy; - - fetch_emit->draw = draw; - - return &fetch_emit->base; -} - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c deleted file mode 100644 index 870b23bbf58..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c +++ /dev/null @@ -1,377 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - /* - * Authors: - * Keith Whitwell - */ - - -#include "util/u_math.h" -#include "util/u_memory.h" -#include "draw/draw_context.h" -#include "draw/draw_private.h" -#include "draw/draw_vbuf.h" -#include "draw/draw_vertex.h" -#include "draw/draw_pt.h" -#include "draw/draw_vs.h" - - -struct fetch_shade_emit; - - -/* Prototype fetch, shade, emit-hw-verts all in one go. - */ -struct fetch_shade_emit { - struct draw_pt_middle_end base; - struct draw_context *draw; - - /* Temporaries: - */ - const float *constants; - unsigned pitch[PIPE_MAX_ATTRIBS]; - const ubyte *src[PIPE_MAX_ATTRIBS]; - unsigned prim; - - struct draw_vs_variant_key key; - struct draw_vs_variant *active; - - const struct vertex_info *vinfo; -}; - - - -static void -fse_prepare(struct draw_pt_middle_end *middle, - unsigned prim, - unsigned opt, - unsigned *max_vertices) -{ - struct fetch_shade_emit *fse = (struct fetch_shade_emit *)middle; - struct draw_context *draw = fse->draw; - unsigned num_vs_inputs = draw->vs.vertex_shader->info.num_inputs; - const struct vertex_info *vinfo; - unsigned i; - unsigned nr_vbs = 0; - - /* Can't support geometry shader on this path. - */ - assert(!draw->gs.geometry_shader); - - draw->render->set_primitive(draw->render, prim); - - /* Must do this after set_primitive() above: - */ - fse->vinfo = vinfo = draw->render->get_vertex_info(draw->render); - - fse->key.output_stride = vinfo->size * 4; - fse->key.nr_outputs = vinfo->num_attribs; - fse->key.nr_inputs = num_vs_inputs; - - fse->key.nr_elements = MAX2(fse->key.nr_outputs, /* outputs - translate to hw format */ - fse->key.nr_inputs); /* inputs - fetch from api format */ - - fse->key.viewport = !draw->identity_viewport; - fse->key.clip = draw->clip_xy || draw->clip_z || draw->clip_user; - fse->key.const_vbuffers = 0; - - memset(fse->key.element, 0, - fse->key.nr_elements * sizeof(fse->key.element[0])); - - for (i = 0; i < num_vs_inputs; i++) { - const struct pipe_vertex_element *src = &draw->pt.vertex_element[i]; - fse->key.element[i].in.format = src->src_format; - - /* Consider ignoring these, ie make generated programs - * independent of this state: - */ - fse->key.element[i].in.buffer = src->vertex_buffer_index; - fse->key.element[i].in.offset = src->src_offset; - nr_vbs = MAX2(nr_vbs, src->vertex_buffer_index + 1); - } - - for (i = 0; i < 5 && i < nr_vbs; i++) { - if (draw->pt.vertex_buffer[i].stride == 0) - fse->key.const_vbuffers |= (1<key.const_vbuffers); - - { - unsigned dst_offset = 0; - - for (i = 0; i < vinfo->num_attribs; i++) { - unsigned emit_sz = draw_translate_vinfo_size(vinfo->attrib[i].emit); - - /* doesn't handle EMIT_OMIT */ - assert(emit_sz != 0); - - /* The elements in the key correspond to vertex shader output - * numbers, not to positions in the hw vertex description -- - * that's handled by the output_offset field. - */ - fse->key.element[i].out.format = vinfo->attrib[i].emit; - fse->key.element[i].out.vs_output = vinfo->attrib[i].src_index; - fse->key.element[i].out.offset = dst_offset; - - dst_offset += emit_sz; - assert(fse->key.output_stride >= dst_offset); - } - } - - fse->active = draw_vs_lookup_variant( draw->vs.vertex_shader, - &fse->key ); - - if (!fse->active) { - assert(0); - return ; - } - - if (0) debug_printf("%s: found const_vbuffers: %x\n", __FUNCTION__, - fse->active->key.const_vbuffers); - - /* Now set buffer pointers: - */ - for (i = 0; i < draw->pt.nr_vertex_buffers; i++) { - fse->active->set_buffer( fse->active, - i, - ((const ubyte *) draw->pt.user.vbuffer[i] + - draw->pt.vertex_buffer[i].buffer_offset), - draw->pt.vertex_buffer[i].stride, - draw->pt.max_index ); - } - - *max_vertices = (draw->render->max_vertex_buffer_bytes / - (vinfo->size * 4)); - - /* Probably need to do this somewhere (or fix exec shader not to - * need it): - */ - if (1) { - struct draw_vertex_shader *vs = draw->vs.vertex_shader; - vs->prepare(vs, draw); - } -} - - - -static void -fse_run_linear(struct draw_pt_middle_end *middle, - unsigned start, - unsigned count, - unsigned prim_flags) -{ - struct fetch_shade_emit *fse = (struct fetch_shade_emit *)middle; - struct draw_context *draw = fse->draw; - char *hw_verts; - - /* XXX: need to flush to get prim_vbuf.c to release its allocation?? - */ - draw_do_flush( draw, DRAW_FLUSH_BACKEND ); - - if (!draw->render->allocate_vertices( draw->render, - (ushort)fse->key.output_stride, - (ushort)count )) - goto fail; - - hw_verts = draw->render->map_vertices( draw->render ); - if (!hw_verts) - goto fail; - - /* Single routine to fetch vertices, run shader and emit HW verts. - * Clipping is done elsewhere -- either by the API or on hardware, - * or for some other reason not required... - */ - fse->active->run_linear( fse->active, - start, count, - hw_verts ); - - if (0) { - unsigned i; - for (i = 0; i < count; i++) { - debug_printf("\n\n%s vertex %d: (stride %d, offset %d)\n", __FUNCTION__, i, - fse->key.output_stride, - fse->key.output_stride * i); - - draw_dump_emitted_vertex( fse->vinfo, - (const uint8_t *)hw_verts + fse->key.output_stride * i ); - } - } - - draw->render->unmap_vertices( draw->render, 0, (ushort)(count - 1) ); - - /* Draw arrays path to avoid re-emitting index list again and - * again. - */ - draw->render->draw_arrays( draw->render, - 0, - count ); - - draw->render->release_vertices( draw->render ); - - return; - -fail: - debug_warn_once("allocate or map of vertex buffer failed (out of memory?)"); - return; -} - - -static void -fse_run(struct draw_pt_middle_end *middle, - const unsigned *fetch_elts, - unsigned fetch_count, - const ushort *draw_elts, - unsigned draw_count, - unsigned prim_flags ) -{ - struct fetch_shade_emit *fse = (struct fetch_shade_emit *)middle; - struct draw_context *draw = fse->draw; - void *hw_verts; - - /* XXX: need to flush to get prim_vbuf.c to release its allocation?? - */ - draw_do_flush( draw, DRAW_FLUSH_BACKEND ); - - if (!draw->render->allocate_vertices( draw->render, - (ushort)fse->key.output_stride, - (ushort)fetch_count )) - goto fail; - - hw_verts = draw->render->map_vertices( draw->render ); - if (!hw_verts) - goto fail; - - /* Single routine to fetch vertices, run shader and emit HW verts. - */ - fse->active->run_elts( fse->active, - fetch_elts, - fetch_count, - hw_verts ); - - if (0) { - unsigned i; - for (i = 0; i < fetch_count; i++) { - debug_printf("\n\n%s vertex %d:\n", __FUNCTION__, i); - draw_dump_emitted_vertex( fse->vinfo, - (const uint8_t *)hw_verts + - fse->key.output_stride * i ); - } - } - - draw->render->unmap_vertices( draw->render, 0, (ushort)(fetch_count - 1) ); - - draw->render->draw_elements( draw->render, - draw_elts, - draw_count ); - - draw->render->release_vertices( draw->render ); - return; - -fail: - debug_warn_once("allocate or map of vertex buffer failed (out of memory?)"); - return; -} - - - -static boolean -fse_run_linear_elts(struct draw_pt_middle_end *middle, - unsigned start, - unsigned count, - const ushort *draw_elts, - unsigned draw_count, - unsigned prim_flags) -{ - struct fetch_shade_emit *fse = (struct fetch_shade_emit *)middle; - struct draw_context *draw = fse->draw; - char *hw_verts; - - /* XXX: need to flush to get prim_vbuf.c to release its allocation?? - */ - draw_do_flush( draw, DRAW_FLUSH_BACKEND ); - - if (!draw->render->allocate_vertices( draw->render, - (ushort)fse->key.output_stride, - (ushort)count )) - return FALSE; - - hw_verts = draw->render->map_vertices( draw->render ); - if (!hw_verts) - return FALSE; - - /* Single routine to fetch vertices, run shader and emit HW verts. - * Clipping is done elsewhere -- either by the API or on hardware, - * or for some other reason not required... - */ - fse->active->run_linear( fse->active, - start, count, - hw_verts ); - - draw->render->draw_elements( draw->render, - draw_elts, - draw_count ); - - draw->render->unmap_vertices( draw->render, 0, (ushort)(count - 1) ); - - draw->render->release_vertices( draw->render ); - - return TRUE; -} - - - -static void -fse_finish(struct draw_pt_middle_end *middle) -{ -} - - -static void -fse_destroy(struct draw_pt_middle_end *middle) -{ - FREE(middle); -} - - -struct draw_pt_middle_end * -draw_pt_middle_fse(struct draw_context *draw) -{ - struct fetch_shade_emit *fse = CALLOC_STRUCT(fetch_shade_emit); - if (!fse) - return NULL; - - fse->base.prepare = fse_prepare; - fse->base.run = fse_run; - fse->base.run_linear = fse_run_linear; - fse->base.run_linear_elts = fse_run_linear_elts; - fse->base.finish = fse_finish; - fse->base.destroy = fse_destroy; - fse->draw = draw; - - return &fse->base; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c deleted file mode 100644 index 27420f06798..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c +++ /dev/null @@ -1,446 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_math.h" -#include "util/u_memory.h" -#include "util/u_prim.h" -#include "draw/draw_context.h" -#include "draw/draw_vbuf.h" -#include "draw/draw_vertex.h" -#include "draw/draw_pt.h" -#include "draw/draw_vs.h" -#include "draw/draw_gs.h" - - -struct fetch_pipeline_middle_end { - struct draw_pt_middle_end base; - struct draw_context *draw; - - struct pt_emit *emit; - struct pt_so_emit *so_emit; - struct pt_fetch *fetch; - struct pt_post_vs *post_vs; - - unsigned vertex_data_offset; - unsigned vertex_size; - unsigned input_prim; - unsigned opt; -}; - -static void fetch_pipeline_prepare( struct draw_pt_middle_end *middle, - unsigned prim, - unsigned opt, - unsigned *max_vertices ) -{ - struct fetch_pipeline_middle_end *fpme = (struct fetch_pipeline_middle_end *)middle; - struct draw_context *draw = fpme->draw; - struct draw_vertex_shader *vs = draw->vs.vertex_shader; - unsigned i; - unsigned instance_id_index = ~0; - - unsigned gs_out_prim = (draw->gs.geometry_shader ? - draw->gs.geometry_shader->output_primitive : - prim); - - /* Add one to num_outputs because the pipeline occasionally tags on - * an additional texcoord, eg for AA lines. - */ - unsigned nr = MAX2( vs->info.num_inputs, - vs->info.num_outputs + 1 ); - - /* Scan for instanceID system value. - */ - for (i = 0; i < vs->info.num_inputs; i++) { - if (vs->info.input_semantic_name[i] == TGSI_SEMANTIC_INSTANCEID) { - instance_id_index = i; - break; - } - } - - fpme->input_prim = prim; - fpme->opt = opt; - - /* Always leave room for the vertex header whether we need it or - * not. It's hard to get rid of it in particular because of the - * viewport code in draw_pt_post_vs.c. - */ - fpme->vertex_size = sizeof(struct vertex_header) + nr * 4 * sizeof(float); - - - - draw_pt_fetch_prepare( fpme->fetch, - vs->info.num_inputs, - fpme->vertex_size, - instance_id_index ); - /* XXX: it's not really gl rasterization rules we care about here, - * but gl vs dx9 clip spaces. - */ - draw_pt_post_vs_prepare( fpme->post_vs, - draw->clip_xy, - draw->clip_z, - draw->clip_user, - draw->guard_band_xy, - draw->identity_viewport, - (boolean)draw->rasterizer->gl_rasterization_rules, - (draw->vs.edgeflag_output ? TRUE : FALSE) ); - - draw_pt_so_emit_prepare( fpme->so_emit ); - - if (!(opt & PT_PIPELINE)) { - draw_pt_emit_prepare( fpme->emit, - gs_out_prim, - max_vertices ); - - *max_vertices = MAX2( *max_vertices, 4096 ); - } - else { - /* limit max fetches by limiting max_vertices */ - *max_vertices = 4096; - } - - /* No need to prepare the shader. - */ - vs->prepare(vs, draw); -} - - -static void fetch( struct pt_fetch *fetch, - const struct draw_fetch_info *fetch_info, - char *output) -{ - if (fetch_info->linear) { - draw_pt_fetch_run_linear( fetch, - fetch_info->start, - fetch_info->count, - output ); - } - else { - draw_pt_fetch_run( fetch, - fetch_info->elts, - fetch_info->count, - output ); - } -} - - -static void pipeline(struct fetch_pipeline_middle_end *fpme, - const struct draw_vertex_info *vert_info, - const struct draw_prim_info *prim_info) -{ - if (prim_info->linear) - draw_pipeline_run_linear( fpme->draw, - vert_info, - prim_info); - else - draw_pipeline_run( fpme->draw, - vert_info, - prim_info ); -} - -static void emit(struct pt_emit *emit, - const struct draw_vertex_info *vert_info, - const struct draw_prim_info *prim_info) -{ - if (prim_info->linear) { - draw_pt_emit_linear(emit, vert_info, prim_info); - } - else { - draw_pt_emit(emit, vert_info, prim_info); - } -} - - -static void draw_vertex_shader_run(struct draw_vertex_shader *vshader, - const void *constants[PIPE_MAX_CONSTANT_BUFFERS], - unsigned const_size[PIPE_MAX_CONSTANT_BUFFERS], - const struct draw_vertex_info *input_verts, - struct draw_vertex_info *output_verts ) -{ - output_verts->vertex_size = input_verts->vertex_size; - output_verts->stride = input_verts->vertex_size; - output_verts->count = input_verts->count; - output_verts->verts = - (struct vertex_header *)MALLOC(output_verts->vertex_size * - align(output_verts->count, 4)); - - vshader->run_linear(vshader, - (const float (*)[4])input_verts->verts->data, - ( float (*)[4])output_verts->verts->data, - constants, - const_size, - input_verts->count, - input_verts->vertex_size, - input_verts->vertex_size); -} - -static void fetch_pipeline_generic( struct draw_pt_middle_end *middle, - const struct draw_fetch_info *fetch_info, - const struct draw_prim_info *prim_info ) -{ - struct fetch_pipeline_middle_end *fpme = (struct fetch_pipeline_middle_end *)middle; - struct draw_context *draw = fpme->draw; - struct draw_vertex_shader *vshader = draw->vs.vertex_shader; - struct draw_geometry_shader *gshader = draw->gs.geometry_shader; - struct draw_prim_info gs_prim_info; - struct draw_vertex_info fetched_vert_info; - struct draw_vertex_info vs_vert_info; - struct draw_vertex_info gs_vert_info; - struct draw_vertex_info *vert_info; - unsigned opt = fpme->opt; - - fetched_vert_info.count = fetch_info->count; - fetched_vert_info.vertex_size = fpme->vertex_size; - fetched_vert_info.stride = fpme->vertex_size; - fetched_vert_info.verts = - (struct vertex_header *)MALLOC(fpme->vertex_size * - align(fetch_info->count, 4)); - if (!fetched_vert_info.verts) { - assert(0); - return; - } - - /* Fetch into our vertex buffer. - */ - fetch( fpme->fetch, fetch_info, (char *)fetched_vert_info.verts ); - - /* Finished with fetch: - */ - fetch_info = NULL; - vert_info = &fetched_vert_info; - - /* Run the shader, note that this overwrites the data[] parts of - * the pipeline verts. - */ - if (fpme->opt & PT_SHADE) { - draw_vertex_shader_run(vshader, - draw->pt.user.vs_constants, - draw->pt.user.vs_constants_size, - vert_info, - &vs_vert_info); - - FREE(vert_info->verts); - vert_info = &vs_vert_info; - } - - if ((fpme->opt & PT_SHADE) && gshader) { - draw_geometry_shader_run(gshader, - draw->pt.user.gs_constants, - draw->pt.user.gs_constants_size, - vert_info, - prim_info, - &gs_vert_info, - &gs_prim_info); - - FREE(vert_info->verts); - vert_info = &gs_vert_info; - prim_info = &gs_prim_info; - } - - - /* Stream output needs to be done before clipping. - * - * XXX: Stream output surely needs to respect the prim_info->elt - * lists. - */ - draw_pt_so_emit( fpme->so_emit, - vert_info, - prim_info ); - - if (draw_pt_post_vs_run( fpme->post_vs, - vert_info )) - { - opt |= PT_PIPELINE; - } - - /* Do we need to run the pipeline? - */ - if (opt & PT_PIPELINE) { - pipeline( fpme, - vert_info, - prim_info ); - } - else { - emit( fpme->emit, - vert_info, - prim_info ); - } - FREE(vert_info->verts); -} - -static void fetch_pipeline_run( struct draw_pt_middle_end *middle, - const unsigned *fetch_elts, - unsigned fetch_count, - const ushort *draw_elts, - unsigned draw_count, - unsigned prim_flags ) -{ - struct fetch_pipeline_middle_end *fpme = (struct fetch_pipeline_middle_end *)middle; - struct draw_fetch_info fetch_info; - struct draw_prim_info prim_info; - - fetch_info.linear = FALSE; - fetch_info.start = 0; - fetch_info.elts = fetch_elts; - fetch_info.count = fetch_count; - - prim_info.linear = FALSE; - prim_info.start = 0; - prim_info.count = draw_count; - prim_info.elts = draw_elts; - prim_info.prim = fpme->input_prim; - prim_info.flags = prim_flags; - prim_info.primitive_count = 1; - prim_info.primitive_lengths = &draw_count; - - fetch_pipeline_generic( middle, &fetch_info, &prim_info ); -} - - -static void fetch_pipeline_linear_run( struct draw_pt_middle_end *middle, - unsigned start, - unsigned count, - unsigned prim_flags) -{ - struct fetch_pipeline_middle_end *fpme = (struct fetch_pipeline_middle_end *)middle; - struct draw_fetch_info fetch_info; - struct draw_prim_info prim_info; - - fetch_info.linear = TRUE; - fetch_info.start = start; - fetch_info.count = count; - fetch_info.elts = NULL; - - prim_info.linear = TRUE; - prim_info.start = 0; - prim_info.count = count; - prim_info.elts = NULL; - prim_info.prim = fpme->input_prim; - prim_info.flags = prim_flags; - prim_info.primitive_count = 1; - prim_info.primitive_lengths = &count; - - fetch_pipeline_generic( middle, &fetch_info, &prim_info ); -} - - - -static boolean fetch_pipeline_linear_run_elts( struct draw_pt_middle_end *middle, - unsigned start, - unsigned count, - const ushort *draw_elts, - unsigned draw_count, - unsigned prim_flags ) -{ - struct fetch_pipeline_middle_end *fpme = (struct fetch_pipeline_middle_end *)middle; - struct draw_fetch_info fetch_info; - struct draw_prim_info prim_info; - - fetch_info.linear = TRUE; - fetch_info.start = start; - fetch_info.count = count; - fetch_info.elts = NULL; - - prim_info.linear = FALSE; - prim_info.start = 0; - prim_info.count = draw_count; - prim_info.elts = draw_elts; - prim_info.prim = fpme->input_prim; - prim_info.flags = prim_flags; - prim_info.primitive_count = 1; - prim_info.primitive_lengths = &draw_count; - - fetch_pipeline_generic( middle, &fetch_info, &prim_info ); - - return TRUE; -} - - - -static void fetch_pipeline_finish( struct draw_pt_middle_end *middle ) -{ - /* nothing to do */ -} - -static void fetch_pipeline_destroy( struct draw_pt_middle_end *middle ) -{ - struct fetch_pipeline_middle_end *fpme = (struct fetch_pipeline_middle_end *)middle; - - if (fpme->fetch) - draw_pt_fetch_destroy( fpme->fetch ); - - if (fpme->emit) - draw_pt_emit_destroy( fpme->emit ); - - if (fpme->so_emit) - draw_pt_so_emit_destroy( fpme->so_emit ); - - if (fpme->post_vs) - draw_pt_post_vs_destroy( fpme->post_vs ); - - FREE(middle); -} - - -struct draw_pt_middle_end *draw_pt_fetch_pipeline_or_emit( struct draw_context *draw ) -{ - struct fetch_pipeline_middle_end *fpme = CALLOC_STRUCT( fetch_pipeline_middle_end ); - if (!fpme) - goto fail; - - fpme->base.prepare = fetch_pipeline_prepare; - fpme->base.run = fetch_pipeline_run; - fpme->base.run_linear = fetch_pipeline_linear_run; - fpme->base.run_linear_elts = fetch_pipeline_linear_run_elts; - fpme->base.finish = fetch_pipeline_finish; - fpme->base.destroy = fetch_pipeline_destroy; - - fpme->draw = draw; - - fpme->fetch = draw_pt_fetch_create( draw ); - if (!fpme->fetch) - goto fail; - - fpme->post_vs = draw_pt_post_vs_create( draw ); - if (!fpme->post_vs) - goto fail; - - fpme->emit = draw_pt_emit_create( draw ); - if (!fpme->emit) - goto fail; - - fpme->so_emit = draw_pt_so_emit_create( draw ); - if (!fpme->so_emit) - goto fail; - - return &fpme->base; - - fail: - if (fpme) - fetch_pipeline_destroy( &fpme->base ); - - return NULL; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c deleted file mode 100644 index 1e17f808408..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c +++ /dev/null @@ -1,471 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_math.h" -#include "util/u_memory.h" -#include "draw/draw_context.h" -#include "draw/draw_gs.h" -#include "draw/draw_vbuf.h" -#include "draw/draw_vertex.h" -#include "draw/draw_pt.h" -#include "draw/draw_vs.h" -#include "draw/draw_llvm.h" -#include "gallivm/lp_bld_init.h" - - -struct llvm_middle_end { - struct draw_pt_middle_end base; - struct draw_context *draw; - - struct pt_emit *emit; - struct pt_so_emit *so_emit; - struct pt_fetch *fetch; - struct pt_post_vs *post_vs; - - - unsigned vertex_data_offset; - unsigned vertex_size; - unsigned input_prim; - unsigned opt; - - struct draw_llvm *llvm; - struct draw_llvm_variant *current_variant; -}; - - -static void -llvm_middle_end_prepare( struct draw_pt_middle_end *middle, - unsigned in_prim, - unsigned opt, - unsigned *max_vertices ) -{ - struct llvm_middle_end *fpme = (struct llvm_middle_end *)middle; - struct draw_context *draw = fpme->draw; - struct llvm_vertex_shader *shader = - llvm_vertex_shader(draw->vs.vertex_shader); - char store[DRAW_LLVM_MAX_VARIANT_KEY_SIZE]; - struct draw_llvm_variant_key *key; - struct draw_llvm_variant *variant = NULL; - struct draw_llvm_variant_list_item *li; - const unsigned out_prim = (draw->gs.geometry_shader ? - draw->gs.geometry_shader->output_primitive : - in_prim); - - /* Add one to num_outputs because the pipeline occasionally tags on - * an additional texcoord, eg for AA lines. - */ - const unsigned nr = MAX2( shader->base.info.num_inputs, - shader->base.info.num_outputs + 1 ); - - fpme->input_prim = in_prim; - fpme->opt = opt; - - /* Always leave room for the vertex header whether we need it or - * not. It's hard to get rid of it in particular because of the - * viewport code in draw_pt_post_vs.c. - */ - fpme->vertex_size = sizeof(struct vertex_header) + nr * 4 * sizeof(float); - - - /* XXX: it's not really gl rasterization rules we care about here, - * but gl vs dx9 clip spaces. - */ - draw_pt_post_vs_prepare( fpme->post_vs, - draw->clip_xy, - draw->clip_z, - draw->clip_user, - draw->guard_band_xy, - draw->identity_viewport, - (boolean)draw->rasterizer->gl_rasterization_rules, - (draw->vs.edgeflag_output ? TRUE : FALSE) ); - - draw_pt_so_emit_prepare( fpme->so_emit ); - - if (!(opt & PT_PIPELINE)) { - draw_pt_emit_prepare( fpme->emit, - out_prim, - max_vertices ); - - *max_vertices = MAX2( *max_vertices, 4096 ); - } - else { - /* limit max fetches by limiting max_vertices */ - *max_vertices = 4096; - } - - /* return even number */ - *max_vertices = *max_vertices & ~1; - - key = draw_llvm_make_variant_key(fpme->llvm, store); - - /* Search shader's list of variants for the key */ - li = first_elem(&shader->variants); - while (!at_end(&shader->variants, li)) { - if (memcmp(&li->base->key, key, shader->variant_key_size) == 0) { - variant = li->base; - break; - } - li = next_elem(li); - } - - if (variant) { - /* found the variant, move to head of global list (for LRU) */ - move_to_head(&fpme->llvm->vs_variants_list, &variant->list_item_global); - } - else { - /* Need to create new variant */ - unsigned i; - - /* First check if we've created too many variants. If so, free - * 25% of the LRU to avoid using too much memory. - */ - if (fpme->llvm->nr_variants >= DRAW_MAX_SHADER_VARIANTS) { - /* - * XXX: should we flush here ? - */ - for (i = 0; i < DRAW_MAX_SHADER_VARIANTS / 4; i++) { - struct draw_llvm_variant_list_item *item; - if (is_empty_list(&fpme->llvm->vs_variants_list)) { - break; - } - item = last_elem(&fpme->llvm->vs_variants_list); - assert(item); - assert(item->base); - draw_llvm_destroy_variant(item->base); - } - } - - variant = draw_llvm_create_variant(fpme->llvm, nr, key); - - if (variant) { - insert_at_head(&shader->variants, &variant->list_item_local); - insert_at_head(&fpme->llvm->vs_variants_list, &variant->list_item_global); - fpme->llvm->nr_variants++; - shader->variants_cached++; - } - } - - fpme->current_variant = variant; - - /*XXX we only support one constant buffer */ - fpme->llvm->jit_context.vs_constants = - draw->pt.user.vs_constants[0]; - fpme->llvm->jit_context.gs_constants = - draw->pt.user.gs_constants[0]; - fpme->llvm->jit_context.planes = - (float (*) [DRAW_TOTAL_CLIP_PLANES][4]) draw->pt.user.planes[0]; - fpme->llvm->jit_context.viewport = - (float *)draw->viewport.scale; - -} - - -static void pipeline(struct llvm_middle_end *llvm, - const struct draw_vertex_info *vert_info, - const struct draw_prim_info *prim_info) -{ - if (prim_info->linear) - draw_pipeline_run_linear( llvm->draw, - vert_info, - prim_info); - else - draw_pipeline_run( llvm->draw, - vert_info, - prim_info ); -} - -static void emit(struct pt_emit *emit, - const struct draw_vertex_info *vert_info, - const struct draw_prim_info *prim_info) -{ - if (prim_info->linear) { - draw_pt_emit_linear(emit, vert_info, prim_info); - } - else { - draw_pt_emit(emit, vert_info, prim_info); - } -} - -static void -llvm_pipeline_generic( struct draw_pt_middle_end *middle, - const struct draw_fetch_info *fetch_info, - const struct draw_prim_info *prim_info ) -{ - struct llvm_middle_end *fpme = (struct llvm_middle_end *)middle; - struct draw_context *draw = fpme->draw; - struct draw_geometry_shader *gshader = draw->gs.geometry_shader; - struct draw_prim_info gs_prim_info; - struct draw_vertex_info llvm_vert_info; - struct draw_vertex_info gs_vert_info; - struct draw_vertex_info *vert_info; - unsigned opt = fpme->opt; - unsigned clipped = 0; - - llvm_vert_info.count = fetch_info->count; - llvm_vert_info.vertex_size = fpme->vertex_size; - llvm_vert_info.stride = fpme->vertex_size; - llvm_vert_info.verts = - (struct vertex_header *)MALLOC(fpme->vertex_size * - align(fetch_info->count, 4)); - if (!llvm_vert_info.verts) { - assert(0); - return; - } - - if (fetch_info->linear) - clipped = fpme->current_variant->jit_func( &fpme->llvm->jit_context, - llvm_vert_info.verts, - (const char **)draw->pt.user.vbuffer, - fetch_info->start, - fetch_info->count, - fpme->vertex_size, - draw->pt.vertex_buffer, - draw->instance_id); - else - clipped = fpme->current_variant->jit_func_elts( &fpme->llvm->jit_context, - llvm_vert_info.verts, - (const char **)draw->pt.user.vbuffer, - fetch_info->elts, - fetch_info->count, - fpme->vertex_size, - draw->pt.vertex_buffer, - draw->instance_id); - - /* Finished with fetch and vs: - */ - fetch_info = NULL; - vert_info = &llvm_vert_info; - - - if ((opt & PT_SHADE) && gshader) { - draw_geometry_shader_run(gshader, - draw->pt.user.gs_constants, - draw->pt.user.gs_constants_size, - vert_info, - prim_info, - &gs_vert_info, - &gs_prim_info); - - FREE(vert_info->verts); - vert_info = &gs_vert_info; - prim_info = &gs_prim_info; - - clipped = draw_pt_post_vs_run( fpme->post_vs, vert_info ); - - } - - /* stream output needs to be done before clipping */ - draw_pt_so_emit( fpme->so_emit, - vert_info, - prim_info ); - - if (clipped) { - opt |= PT_PIPELINE; - } - - /* Do we need to run the pipeline? Now will come here if clipped - */ - if (opt & PT_PIPELINE) { - pipeline( fpme, - vert_info, - prim_info ); - } - else { - emit( fpme->emit, - vert_info, - prim_info ); - } - FREE(vert_info->verts); -} - - -static void llvm_middle_end_run( struct draw_pt_middle_end *middle, - const unsigned *fetch_elts, - unsigned fetch_count, - const ushort *draw_elts, - unsigned draw_count, - unsigned prim_flags ) -{ - struct llvm_middle_end *fpme = (struct llvm_middle_end *)middle; - struct draw_fetch_info fetch_info; - struct draw_prim_info prim_info; - - fetch_info.linear = FALSE; - fetch_info.start = 0; - fetch_info.elts = fetch_elts; - fetch_info.count = fetch_count; - - prim_info.linear = FALSE; - prim_info.start = 0; - prim_info.count = draw_count; - prim_info.elts = draw_elts; - prim_info.prim = fpme->input_prim; - prim_info.flags = prim_flags; - prim_info.primitive_count = 1; - prim_info.primitive_lengths = &draw_count; - - llvm_pipeline_generic( middle, &fetch_info, &prim_info ); -} - - -static void llvm_middle_end_linear_run( struct draw_pt_middle_end *middle, - unsigned start, - unsigned count, - unsigned prim_flags) -{ - struct llvm_middle_end *fpme = (struct llvm_middle_end *)middle; - struct draw_fetch_info fetch_info; - struct draw_prim_info prim_info; - - fetch_info.linear = TRUE; - fetch_info.start = start; - fetch_info.count = count; - fetch_info.elts = NULL; - - prim_info.linear = TRUE; - prim_info.start = 0; - prim_info.count = count; - prim_info.elts = NULL; - prim_info.prim = fpme->input_prim; - prim_info.flags = prim_flags; - prim_info.primitive_count = 1; - prim_info.primitive_lengths = &count; - - llvm_pipeline_generic( middle, &fetch_info, &prim_info ); -} - - - -static boolean -llvm_middle_end_linear_run_elts( struct draw_pt_middle_end *middle, - unsigned start, - unsigned count, - const ushort *draw_elts, - unsigned draw_count, - unsigned prim_flags ) -{ - struct llvm_middle_end *fpme = (struct llvm_middle_end *)middle; - struct draw_fetch_info fetch_info; - struct draw_prim_info prim_info; - - fetch_info.linear = TRUE; - fetch_info.start = start; - fetch_info.count = count; - fetch_info.elts = NULL; - - prim_info.linear = FALSE; - prim_info.start = 0; - prim_info.count = draw_count; - prim_info.elts = draw_elts; - prim_info.prim = fpme->input_prim; - prim_info.flags = prim_flags; - prim_info.primitive_count = 1; - prim_info.primitive_lengths = &draw_count; - - llvm_pipeline_generic( middle, &fetch_info, &prim_info ); - - return TRUE; -} - - - -static void llvm_middle_end_finish( struct draw_pt_middle_end *middle ) -{ - /* nothing to do */ -} - -static void llvm_middle_end_destroy( struct draw_pt_middle_end *middle ) -{ - struct llvm_middle_end *fpme = (struct llvm_middle_end *)middle; - - if (fpme->fetch) - draw_pt_fetch_destroy( fpme->fetch ); - - if (fpme->emit) - draw_pt_emit_destroy( fpme->emit ); - - if (fpme->so_emit) - draw_pt_so_emit_destroy( fpme->so_emit ); - - if (fpme->post_vs) - draw_pt_post_vs_destroy( fpme->post_vs ); - - FREE(middle); -} - - -struct draw_pt_middle_end * -draw_pt_fetch_pipeline_or_emit_llvm(struct draw_context *draw) -{ - struct llvm_middle_end *fpme = 0; - - if (!draw->llvm || !draw->llvm->gallivm->engine) - return NULL; - - fpme = CALLOC_STRUCT( llvm_middle_end ); - if (!fpme) - goto fail; - - fpme->base.prepare = llvm_middle_end_prepare; - fpme->base.run = llvm_middle_end_run; - fpme->base.run_linear = llvm_middle_end_linear_run; - fpme->base.run_linear_elts = llvm_middle_end_linear_run_elts; - fpme->base.finish = llvm_middle_end_finish; - fpme->base.destroy = llvm_middle_end_destroy; - - fpme->draw = draw; - - fpme->fetch = draw_pt_fetch_create( draw ); - if (!fpme->fetch) - goto fail; - - fpme->post_vs = draw_pt_post_vs_create( draw ); - if (!fpme->post_vs) - goto fail; - - fpme->emit = draw_pt_emit_create( draw ); - if (!fpme->emit) - goto fail; - - fpme->so_emit = draw_pt_so_emit_create( draw ); - if (!fpme->so_emit) - goto fail; - - fpme->llvm = draw->llvm; - if (!fpme->llvm) - goto fail; - - fpme->current_variant = NULL; - - return &fpme->base; - - fail: - if (fpme) - llvm_middle_end_destroy( &fpme->base ); - - return NULL; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_post_vs.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_post_vs.c deleted file mode 100644 index a83bb59a748..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_post_vs.c +++ /dev/null @@ -1,231 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_memory.h" -#include "util/u_math.h" -#include "pipe/p_context.h" -#include "draw/draw_context.h" -#include "draw/draw_private.h" -#include "draw/draw_pt.h" -#include "draw/draw_vs.h" - -#define DO_CLIP_XY 0x1 -#define DO_CLIP_FULL_Z 0x2 -#define DO_CLIP_HALF_Z 0x4 -#define DO_CLIP_USER 0x8 -#define DO_VIEWPORT 0x10 -#define DO_EDGEFLAG 0x20 -#define DO_CLIP_XY_GUARD_BAND 0x40 - - -struct pt_post_vs { - struct draw_context *draw; - - unsigned flags; - - boolean (*run)( struct pt_post_vs *pvs, - struct draw_vertex_info *info ); -}; - -static INLINE void -initialize_vertex_header(struct vertex_header *header) -{ - header->clipmask = 0; - header->edgeflag = 1; - header->have_clipdist = 0; - header->vertex_id = UNDEFINED_VERTEX_ID; -} - -static INLINE float -dot4(const float *a, const float *b) -{ - return (a[0]*b[0] + - a[1]*b[1] + - a[2]*b[2] + - a[3]*b[3]); -} - -#define FLAGS (0) -#define TAG(x) x##_none -#include "draw_cliptest_tmp.h" - -#define FLAGS (DO_CLIP_XY | DO_CLIP_FULL_Z | DO_VIEWPORT) -#define TAG(x) x##_xy_fullz_viewport -#include "draw_cliptest_tmp.h" - -#define FLAGS (DO_CLIP_XY | DO_CLIP_HALF_Z | DO_VIEWPORT) -#define TAG(x) x##_xy_halfz_viewport -#include "draw_cliptest_tmp.h" - -#define FLAGS (DO_CLIP_XY_GUARD_BAND | DO_CLIP_HALF_Z | DO_VIEWPORT) -#define TAG(x) x##_xy_gb_halfz_viewport -#include "draw_cliptest_tmp.h" - -#define FLAGS (DO_CLIP_FULL_Z | DO_VIEWPORT) -#define TAG(x) x##_fullz_viewport -#include "draw_cliptest_tmp.h" - -#define FLAGS (DO_CLIP_HALF_Z | DO_VIEWPORT) -#define TAG(x) x##_halfz_viewport -#include "draw_cliptest_tmp.h" - -#define FLAGS (DO_CLIP_XY | DO_CLIP_FULL_Z | DO_CLIP_USER | DO_VIEWPORT) -#define TAG(x) x##_xy_fullz_user_viewport -#include "draw_cliptest_tmp.h" - -#define FLAGS (DO_CLIP_XY | DO_CLIP_FULL_Z | DO_CLIP_USER | DO_VIEWPORT | DO_EDGEFLAG) -#define TAG(x) x##_xy_fullz_user_viewport_edgeflag -#include "draw_cliptest_tmp.h" - - - -/* Don't want to create 64 versions of this function, so catch the - * less common ones here. This is looking like something which should - * be code-generated, perhaps appended to the end of the vertex - * shader. - */ -#define FLAGS (pvs->flags) -#define TAG(x) x##_generic -#include "draw_cliptest_tmp.h" - - - -boolean draw_pt_post_vs_run( struct pt_post_vs *pvs, - struct draw_vertex_info *info ) -{ - return pvs->run( pvs, info ); -} - - -void draw_pt_post_vs_prepare( struct pt_post_vs *pvs, - boolean clip_xy, - boolean clip_z, - boolean clip_user, - boolean guard_band, - boolean bypass_viewport, - boolean opengl, - boolean need_edgeflags ) -{ - pvs->flags = 0; - - /* This combination not currently tested/in use: - */ - if (opengl) - guard_band = FALSE; - - if (clip_xy && !guard_band) { - pvs->flags |= DO_CLIP_XY; - ASSIGN_4V( pvs->draw->plane[0], -1, 0, 0, 1 ); - ASSIGN_4V( pvs->draw->plane[1], 1, 0, 0, 1 ); - ASSIGN_4V( pvs->draw->plane[2], 0, -1, 0, 1 ); - ASSIGN_4V( pvs->draw->plane[3], 0, 1, 0, 1 ); - } - else if (clip_xy && guard_band) { - pvs->flags |= DO_CLIP_XY_GUARD_BAND; - ASSIGN_4V( pvs->draw->plane[0], -0.5, 0, 0, 1 ); - ASSIGN_4V( pvs->draw->plane[1], 0.5, 0, 0, 1 ); - ASSIGN_4V( pvs->draw->plane[2], 0, -0.5, 0, 1 ); - ASSIGN_4V( pvs->draw->plane[3], 0, 0.5, 0, 1 ); - } - - if (clip_z && opengl) { - pvs->flags |= DO_CLIP_FULL_Z; - ASSIGN_4V( pvs->draw->plane[4], 0, 0, 1, 1 ); - } - - if (clip_z && !opengl) { - pvs->flags |= DO_CLIP_HALF_Z; - ASSIGN_4V( pvs->draw->plane[4], 0, 0, 1, 0 ); - } - - if (clip_user) - pvs->flags |= DO_CLIP_USER; - - if (!bypass_viewport) - pvs->flags |= DO_VIEWPORT; - - if (need_edgeflags) - pvs->flags |= DO_EDGEFLAG; - - /* Now select the relevant function: - */ - switch (pvs->flags) { - case 0: - pvs->run = do_cliptest_none; - break; - - case DO_CLIP_XY | DO_CLIP_FULL_Z | DO_VIEWPORT: - pvs->run = do_cliptest_xy_fullz_viewport; - break; - - case DO_CLIP_XY | DO_CLIP_HALF_Z | DO_VIEWPORT: - pvs->run = do_cliptest_xy_halfz_viewport; - break; - - case DO_CLIP_XY_GUARD_BAND | DO_CLIP_HALF_Z | DO_VIEWPORT: - pvs->run = do_cliptest_xy_gb_halfz_viewport; - break; - - case DO_CLIP_FULL_Z | DO_VIEWPORT: - pvs->run = do_cliptest_fullz_viewport; - break; - - case DO_CLIP_HALF_Z | DO_VIEWPORT: - pvs->run = do_cliptest_halfz_viewport; - break; - - case DO_CLIP_XY | DO_CLIP_FULL_Z | DO_CLIP_USER | DO_VIEWPORT: - pvs->run = do_cliptest_xy_fullz_user_viewport; - break; - - case (DO_CLIP_XY | DO_CLIP_FULL_Z | DO_CLIP_USER | - DO_VIEWPORT | DO_EDGEFLAG): - pvs->run = do_cliptest_xy_fullz_user_viewport_edgeflag; - break; - - default: - pvs->run = do_cliptest_generic; - break; - } -} - - -struct pt_post_vs *draw_pt_post_vs_create( struct draw_context *draw ) -{ - struct pt_post_vs *pvs = CALLOC_STRUCT( pt_post_vs ); - if (!pvs) - return NULL; - - pvs->draw = draw; - - return pvs; -} - -void draw_pt_post_vs_destroy( struct pt_post_vs *pvs ) -{ - FREE(pvs); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_so_emit.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_so_emit.c deleted file mode 100644 index 466f46abab3..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_so_emit.c +++ /dev/null @@ -1,311 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "draw/draw_private.h" -#include "draw/draw_vs.h" -#include "draw/draw_context.h" -#include "draw/draw_vbuf.h" -#include "draw/draw_vertex.h" -#include "draw/draw_pt.h" - -#include "pipe/p_state.h" - -#include "util/u_math.h" -#include "util/u_memory.h" - -struct pt_so_emit { - struct draw_context *draw; - - unsigned input_vertex_stride; - const float (*inputs)[4]; - - boolean has_so; - - unsigned emitted_primitives; - unsigned emitted_vertices; - unsigned generated_primitives; -}; - - -void draw_pt_so_emit_prepare(struct pt_so_emit *emit) -{ - struct draw_context *draw = emit->draw; - - emit->has_so = (draw->vs.vertex_shader->state.stream_output.num_outputs > 0); - - /* if we have a state with outputs make sure we have - * buffers to output to */ - if (emit->has_so) { - boolean has_valid_buffer = FALSE; - unsigned i; - for (i = 0; i < draw->so.num_targets; ++i) { - if (draw->so.targets[i]) { - has_valid_buffer = TRUE; - break; - } - } - emit->has_so = has_valid_buffer; - } - - if (!emit->has_so) - return; - - /* XXX: need to flush to get prim_vbuf.c to release its allocation?? - */ - draw_do_flush( draw, DRAW_FLUSH_BACKEND ); -} - -static boolean -is_component_writable(unsigned mask, - unsigned compo) -{ - switch (mask) { - case TGSI_WRITEMASK_NONE: - return FALSE; - case TGSI_WRITEMASK_X: - return compo == 0; - case TGSI_WRITEMASK_Y: - return compo == 1; - case TGSI_WRITEMASK_XY: - return compo == 0 || compo == 1; - case TGSI_WRITEMASK_Z: - return compo == 2; - case TGSI_WRITEMASK_XZ: - return compo == 0 || compo == 2; - case TGSI_WRITEMASK_YZ: - return compo == 1 || compo == 2; - case TGSI_WRITEMASK_XYZ: - return compo == 0 || compo == 1 || compo == 2; - case TGSI_WRITEMASK_W: - return compo == 3; - case TGSI_WRITEMASK_XW: - return compo == 0 || compo == 3; - case TGSI_WRITEMASK_YW: - return compo == 1 || compo == 3; - case TGSI_WRITEMASK_XYW: - return compo == 0 || compo == 1 || compo == 3; - case TGSI_WRITEMASK_ZW: - return compo == 2 || compo == 3; - case TGSI_WRITEMASK_XZW: - return compo == 0 || compo == 1 || compo == 3; - case TGSI_WRITEMASK_YZW: - return compo == 1 || compo == 2 || compo == 4; - case TGSI_WRITEMASK_XYZW: - return compo < 4; - default: - debug_assert(!"Unknown writemask in stream out"); - return compo < 4; - } -} - -static INLINE int mask_num_comps(int register_mask) -{ - int comps = 0; - switch (register_mask) { - case TGSI_WRITEMASK_XYZW: - comps = 4; - break; - case TGSI_WRITEMASK_XYZ: - comps = 3; - break; - case TGSI_WRITEMASK_XY: - comps = 2; - break; - case TGSI_WRITEMASK_X: - comps = 1; - break; - default: - assert(0); - break; - } - return comps; -} - -static void so_emit_prim(struct pt_so_emit *so, - unsigned *indices, - unsigned num_vertices) -{ - unsigned slot, i; - unsigned input_vertex_stride = so->input_vertex_stride; - struct draw_context *draw = so->draw; - const float (*input_ptr)[4]; - const struct pipe_stream_output_info *state = - &draw->vs.vertex_shader->state.stream_output; - float *buffer; - int buffer_total_bytes[PIPE_MAX_SO_BUFFERS]; - - input_ptr = so->inputs; - - ++so->generated_primitives; - - for (i = 0; i < draw->so.num_targets; i++) { - struct draw_so_target *target = draw->so.targets[i]; - buffer_total_bytes[i] = target->internal_offset; - } - - /* check have we space to emit prim first - if not don't do anything */ - for (i = 0; i < num_vertices; ++i) { - for (slot = 0; slot < state->num_outputs; ++slot) { - unsigned writemask = state->output[slot].register_mask; - int ob = state->output[slot].output_buffer; - - if ((buffer_total_bytes[ob] + mask_num_comps(writemask) * sizeof(float)) > - draw->so.targets[ob]->target.buffer_size) { - return; - } - buffer_total_bytes[ob] += mask_num_comps(writemask) * sizeof(float); - } - } - - for (i = 0; i < num_vertices; ++i) { - const float (*input)[4]; - unsigned total_written_compos = 0; - /*debug_printf("%d) vertex index = %d (prim idx = %d)\n", i, indices[i], prim_idx);*/ - input = (const float (*)[4])( - (const char *)input_ptr + (indices[i] * input_vertex_stride)); - - for (slot = 0; slot < state->num_outputs; ++slot) { - unsigned idx = state->output[slot].register_index; - unsigned writemask = state->output[slot].register_mask; - unsigned written_compos = 0; - unsigned compo; - int ob = state->output[slot].output_buffer; - - buffer = (float *)((char *)draw->so.targets[ob]->mapping + - draw->so.targets[ob]->target.buffer_offset + - draw->so.targets[ob]->internal_offset); - for (compo = 0; compo < 4; ++compo) { - if (is_component_writable(writemask, compo)) { - buffer[written_compos++] = input[idx][compo]; - } - } - draw->so.targets[ob]->internal_offset += written_compos * sizeof(float); - total_written_compos += written_compos; - } - } - so->emitted_vertices += num_vertices; - ++so->emitted_primitives; -} - -static void so_point(struct pt_so_emit *so, int idx) -{ - unsigned indices[1]; - - indices[0] = idx; - - so_emit_prim(so, indices, 1); -} - -static void so_line(struct pt_so_emit *so, int i0, int i1) -{ - unsigned indices[2]; - - indices[0] = i0; - indices[1] = i1; - - so_emit_prim(so, indices, 2); -} - -static void so_tri(struct pt_so_emit *so, int i0, int i1, int i2) -{ - unsigned indices[3]; - - indices[0] = i0; - indices[1] = i1; - indices[2] = i2; - - so_emit_prim(so, indices, 3); -} - - -#define FUNC so_run_linear -#define GET_ELT(idx) (start + (idx)) -#include "draw_so_emit_tmp.h" - - -#define FUNC so_run_elts -#define LOCAL_VARS const ushort *elts = input_prims->elts; -#define GET_ELT(idx) (elts[start + (idx)]) -#include "draw_so_emit_tmp.h" - - -void draw_pt_so_emit( struct pt_so_emit *emit, - const struct draw_vertex_info *input_verts, - const struct draw_prim_info *input_prims ) -{ - struct draw_context *draw = emit->draw; - struct vbuf_render *render = draw->render; - unsigned start, i; - - if (!emit->has_so) - return; - - emit->emitted_vertices = 0; - emit->emitted_primitives = 0; - emit->generated_primitives = 0; - emit->input_vertex_stride = input_verts->stride; - emit->inputs = (const float (*)[4])input_verts->verts->data; - - /* XXX: need to flush to get prim_vbuf.c to release its allocation??*/ - draw_do_flush( draw, DRAW_FLUSH_BACKEND ); - - for (start = i = 0; i < input_prims->primitive_count; - start += input_prims->primitive_lengths[i], i++) - { - unsigned count = input_prims->primitive_lengths[i]; - - if (input_prims->linear) { - so_run_linear(emit, input_prims, input_verts, - start, count); - } else { - so_run_elts(emit, input_prims, input_verts, - start, count); - } - } - - render->set_stream_output_info(render, - emit->emitted_primitives, - emit->emitted_vertices, - emit->generated_primitives); -} - - -struct pt_so_emit *draw_pt_so_emit_create( struct draw_context *draw ) -{ - struct pt_so_emit *emit = CALLOC_STRUCT(pt_so_emit); - if (!emit) - return NULL; - - emit->draw = draw; - - return emit; -} - -void draw_pt_so_emit_destroy( struct pt_so_emit *emit ) -{ - FREE(emit); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_util.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_util.c deleted file mode 100644 index 513bbbed216..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_util.c +++ /dev/null @@ -1,101 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - /* - * Authors: - * Keith Whitwell - */ - -#include "draw/draw_context.h" -#include "draw/draw_private.h" -#include "draw/draw_pt.h" -#include "util/u_debug.h" - -void draw_pt_split_prim(unsigned prim, unsigned *first, unsigned *incr) -{ - switch (prim) { - case PIPE_PRIM_POINTS: - *first = 1; - *incr = 1; - break; - case PIPE_PRIM_LINES: - *first = 2; - *incr = 2; - break; - case PIPE_PRIM_LINE_STRIP: - case PIPE_PRIM_LINE_LOOP: - *first = 2; - *incr = 1; - break; - case PIPE_PRIM_LINES_ADJACENCY: - *first = 4; - *incr = 4; - break; - case PIPE_PRIM_LINE_STRIP_ADJACENCY: - *first = 4; - *incr = 1; - break; - case PIPE_PRIM_TRIANGLES: - *first = 3; - *incr = 3; - break; - case PIPE_PRIM_TRIANGLES_ADJACENCY: - *first = 6; - *incr = 6; - break; - case PIPE_PRIM_TRIANGLE_STRIP: - case PIPE_PRIM_TRIANGLE_FAN: - case PIPE_PRIM_POLYGON: - *first = 3; - *incr = 1; - break; - case PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY: - *first = 6; - *incr = 2; - break; - case PIPE_PRIM_QUADS: - *first = 4; - *incr = 4; - break; - case PIPE_PRIM_QUAD_STRIP: - *first = 4; - *incr = 2; - break; - default: - assert(0); - *first = 0; - *incr = 1; /* set to one so that count % incr works */ - break; - } -} - -unsigned draw_pt_trim_count(unsigned count, unsigned first, unsigned incr) -{ - if (count < first) - return 0; - return count - (count - first) % incr; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_vsplit.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_vsplit.c deleted file mode 100644 index c19dcd9e1f7..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_vsplit.c +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "util/u_math.h" -#include "util/u_memory.h" - -#include "draw/draw_context.h" -#include "draw/draw_private.h" -#include "draw/draw_pt.h" - -#define SEGMENT_SIZE 1024 -#define MAP_SIZE 256 - -struct vsplit_frontend { - struct draw_pt_front_end base; - struct draw_context *draw; - - unsigned prim; - - struct draw_pt_middle_end *middle; - - unsigned max_vertices; - ushort segment_size; - - /* buffers for splitting */ - unsigned fetch_elts[SEGMENT_SIZE]; - ushort draw_elts[SEGMENT_SIZE]; - ushort identity_draw_elts[SEGMENT_SIZE]; - - struct { - /* map a fetch element to a draw element */ - unsigned fetches[MAP_SIZE]; - ushort draws[MAP_SIZE]; - boolean has_max_fetch; - - ushort num_fetch_elts; - ushort num_draw_elts; - } cache; -}; - - -static void -vsplit_clear_cache(struct vsplit_frontend *vsplit) -{ - memset(vsplit->cache.fetches, 0xff, sizeof(vsplit->cache.fetches)); - vsplit->cache.has_max_fetch = FALSE; - vsplit->cache.num_fetch_elts = 0; - vsplit->cache.num_draw_elts = 0; -} - -static void -vsplit_flush_cache(struct vsplit_frontend *vsplit, unsigned flags) -{ - vsplit->middle->run(vsplit->middle, - vsplit->fetch_elts, vsplit->cache.num_fetch_elts, - vsplit->draw_elts, vsplit->cache.num_draw_elts, flags); -} - -/** - * Add a fetch element and add it to the draw elements. - */ -static INLINE void -vsplit_add_cache(struct vsplit_frontend *vsplit, unsigned fetch) -{ - struct draw_context *draw = vsplit->draw; - unsigned hash; - - fetch = MIN2(fetch, draw->pt.max_index); - - hash = fetch % MAP_SIZE; - - if (vsplit->cache.fetches[hash] != fetch) { - /* update cache */ - vsplit->cache.fetches[hash] = fetch; - vsplit->cache.draws[hash] = vsplit->cache.num_fetch_elts; - - /* add fetch */ - assert(vsplit->cache.num_fetch_elts < vsplit->segment_size); - vsplit->fetch_elts[vsplit->cache.num_fetch_elts++] = fetch; - } - - vsplit->draw_elts[vsplit->cache.num_draw_elts++] = vsplit->cache.draws[hash]; -} - - -/** - * Add a fetch element and add it to the draw elements. The fetch element is - * in full range (uint). - */ -static INLINE void -vsplit_add_cache_uint(struct vsplit_frontend *vsplit, unsigned fetch) -{ - /* special care for 0xffffffff */ - if (fetch == 0xffffffff && !vsplit->cache.has_max_fetch) { - unsigned hash = fetch % MAP_SIZE; - vsplit->cache.fetches[hash] = fetch - 1; /* force update */ - vsplit->cache.has_max_fetch = TRUE; - } - - vsplit_add_cache(vsplit, fetch); -} - - -#define FUNC vsplit_run_linear -#include "draw_pt_vsplit_tmp.h" - -#define FUNC vsplit_run_ubyte -#define ELT_TYPE ubyte -#define ADD_CACHE(vsplit, fetch) vsplit_add_cache(vsplit, fetch) -#include "draw_pt_vsplit_tmp.h" - -#define FUNC vsplit_run_ushort -#define ELT_TYPE ushort -#define ADD_CACHE(vsplit, fetch) vsplit_add_cache(vsplit, fetch) -#include "draw_pt_vsplit_tmp.h" - -#define FUNC vsplit_run_uint -#define ELT_TYPE uint -#define ADD_CACHE(vsplit, fetch) vsplit_add_cache_uint(vsplit, fetch) -#include "draw_pt_vsplit_tmp.h" - - -static void vsplit_prepare(struct draw_pt_front_end *frontend, - unsigned in_prim, - struct draw_pt_middle_end *middle, - unsigned opt) -{ - struct vsplit_frontend *vsplit = (struct vsplit_frontend *) frontend; - - switch (vsplit->draw->pt.user.eltSize) { - case 0: - vsplit->base.run = vsplit_run_linear; - break; - case 1: - vsplit->base.run = vsplit_run_ubyte; - break; - case 2: - vsplit->base.run = vsplit_run_ushort; - break; - case 4: - vsplit->base.run = vsplit_run_uint; - break; - default: - assert(0); - break; - } - - /* split only */ - vsplit->prim = in_prim; - - vsplit->middle = middle; - middle->prepare(middle, vsplit->prim, opt, &vsplit->max_vertices); - - vsplit->segment_size = MIN2(SEGMENT_SIZE, vsplit->max_vertices); -} - - -static void vsplit_finish(struct draw_pt_front_end *frontend) -{ - struct vsplit_frontend *vsplit = (struct vsplit_frontend *) frontend; - vsplit->middle->finish(vsplit->middle); - vsplit->middle = NULL; -} - - -static void vsplit_destroy(struct draw_pt_front_end *frontend) -{ - FREE(frontend); -} - - -struct draw_pt_front_end *draw_pt_vsplit(struct draw_context *draw) -{ - struct vsplit_frontend *vsplit = CALLOC_STRUCT(vsplit_frontend); - ushort i; - - if (!vsplit) - return NULL; - - vsplit->base.prepare = vsplit_prepare; - vsplit->base.run = NULL; - vsplit->base.finish = vsplit_finish; - vsplit->base.destroy = vsplit_destroy; - vsplit->draw = draw; - - for (i = 0; i < SEGMENT_SIZE; i++) - vsplit->identity_draw_elts[i] = i; - - return &vsplit->base; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h deleted file mode 100644 index bb3cbf80ad7..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#define CONCAT2(name, elt_type) name ## elt_type -#define CONCAT(name, elt_type) CONCAT2(name, elt_type) - -#ifdef ELT_TYPE - -/** - * Fetch all elements in [min_index, max_index] with bias, and use the - * (rebased) index buffer as the draw elements. - */ -static boolean -CONCAT(vsplit_primitive_, ELT_TYPE)(struct vsplit_frontend *vsplit, - unsigned istart, unsigned icount) -{ - struct draw_context *draw = vsplit->draw; - const ELT_TYPE *ib = (const ELT_TYPE *) - ((const char *) draw->pt.user.elts + draw->pt.index_buffer.offset); - const unsigned min_index = draw->pt.user.min_index; - const unsigned max_index = draw->pt.user.max_index; - const int elt_bias = draw->pt.user.eltBias; - unsigned fetch_start, fetch_count; - const ushort *draw_elts = NULL; - unsigned i; - - ib += istart; - - /* use the ib directly */ - if (min_index == 0 && sizeof(ib[0]) == sizeof(draw_elts[0])) { - if (icount > vsplit->max_vertices) - return FALSE; - - for (i = 0; i < icount; i++) { - ELT_TYPE idx = ib[i]; - if (idx < min_index || idx > max_index) { - debug_printf("warning: index out of range\n"); - } - } - draw_elts = (const ushort *) ib; - } - else { - /* have to go through vsplit->draw_elts */ - if (icount > vsplit->segment_size) - return FALSE; - } - - /* this is faster only when we fetch less elements than the normal path */ - if (max_index - min_index > icount - 1) - return FALSE; - - if (elt_bias < 0 && min_index < -elt_bias) - return FALSE; - - /* why this check? */ - for (i = 0; i < draw->pt.nr_vertex_elements; i++) { - if (draw->pt.vertex_element[i].instance_divisor) - return FALSE; - } - - fetch_start = min_index + elt_bias; - fetch_count = max_index - min_index + 1; - - if (!draw_elts) { - if (min_index == 0) { - for (i = 0; i < icount; i++) { - ELT_TYPE idx = ib[i]; - - if (idx < min_index || idx > max_index) { - debug_printf("warning: index out of range\n"); - } - vsplit->draw_elts[i] = (ushort) idx; - } - } - else { - for (i = 0; i < icount; i++) { - ELT_TYPE idx = ib[i]; - - if (idx < min_index || idx > max_index) { - debug_printf("warning: index out of range\n"); - } - vsplit->draw_elts[i] = (ushort) (idx - min_index); - } - } - - draw_elts = vsplit->draw_elts; - } - - return vsplit->middle->run_linear_elts(vsplit->middle, - fetch_start, fetch_count, - draw_elts, icount, 0x0); -} - -/** - * Use the cache to prepare the fetch and draw elements, and flush. - * - * When spoken is TRUE, ispoken replaces istart; When close is TRUE, iclose is - * appended. - */ -static INLINE void -CONCAT(vsplit_segment_cache_, ELT_TYPE)(struct vsplit_frontend *vsplit, - unsigned flags, - unsigned istart, unsigned icount, - boolean spoken, unsigned ispoken, - boolean close, unsigned iclose) -{ - struct draw_context *draw = vsplit->draw; - const ELT_TYPE *ib = (const ELT_TYPE *) - ((const char *) draw->pt.user.elts + draw->pt.index_buffer.offset); - const int ibias = draw->pt.user.eltBias; - unsigned i; - - assert(icount + !!close <= vsplit->segment_size); - - vsplit_clear_cache(vsplit); - - spoken = !!spoken; - if (ibias == 0) { - if (spoken) - ADD_CACHE(vsplit, ib[ispoken]); - - for (i = spoken; i < icount; i++) - ADD_CACHE(vsplit, ib[istart + i]); - - if (close) - ADD_CACHE(vsplit, ib[iclose]); - } - else if (ibias > 0) { - if (spoken) - ADD_CACHE(vsplit, (uint) ib[ispoken] + ibias); - - for (i = spoken; i < icount; i++) - ADD_CACHE(vsplit, (uint) ib[istart + i] + ibias); - - if (close) - ADD_CACHE(vsplit, (uint) ib[iclose] + ibias); - } - else { - if (spoken) { - if (ib[ispoken] < -ibias) - return; - ADD_CACHE(vsplit, ib[ispoken] + ibias); - } - - for (i = spoken; i < icount; i++) { - if (ib[istart + i] < -ibias) - return; - ADD_CACHE(vsplit, ib[istart + i] + ibias); - } - - if (close) { - if (ib[iclose] < -ibias) - return; - ADD_CACHE(vsplit, ib[iclose] + ibias); - } - } - - vsplit_flush_cache(vsplit, flags); -} - -static void -CONCAT(vsplit_segment_simple_, ELT_TYPE)(struct vsplit_frontend *vsplit, - unsigned flags, - unsigned istart, - unsigned icount) -{ - CONCAT(vsplit_segment_cache_, ELT_TYPE)(vsplit, - flags, istart, icount, FALSE, 0, FALSE, 0); -} - -static void -CONCAT(vsplit_segment_loop_, ELT_TYPE)(struct vsplit_frontend *vsplit, - unsigned flags, - unsigned istart, - unsigned icount, - unsigned i0) -{ - const boolean close_loop = ((flags) == DRAW_SPLIT_BEFORE); - - CONCAT(vsplit_segment_cache_, ELT_TYPE)(vsplit, - flags, istart, icount, FALSE, 0, close_loop, i0); -} - -static void -CONCAT(vsplit_segment_fan_, ELT_TYPE)(struct vsplit_frontend *vsplit, - unsigned flags, - unsigned istart, - unsigned icount, - unsigned i0) -{ - const boolean use_spoken = (((flags) & DRAW_SPLIT_BEFORE) != 0); - - CONCAT(vsplit_segment_cache_, ELT_TYPE)(vsplit, - flags, istart, icount, use_spoken, i0, FALSE, 0); -} - -#define LOCAL_VARS \ - struct vsplit_frontend *vsplit = (struct vsplit_frontend *) frontend; \ - const unsigned prim = vsplit->prim; \ - const unsigned max_count_simple = vsplit->segment_size; \ - const unsigned max_count_loop = vsplit->segment_size - 1; \ - const unsigned max_count_fan = vsplit->segment_size; - -#define PRIMITIVE(istart, icount) \ - CONCAT(vsplit_primitive_, ELT_TYPE)(vsplit, istart, icount) - -#else /* ELT_TYPE */ - -static void -vsplit_segment_simple_linear(struct vsplit_frontend *vsplit, unsigned flags, - unsigned istart, unsigned icount) -{ - assert(icount <= vsplit->max_vertices); - vsplit->middle->run_linear(vsplit->middle, istart, icount, flags); -} - -static void -vsplit_segment_loop_linear(struct vsplit_frontend *vsplit, unsigned flags, - unsigned istart, unsigned icount, unsigned i0) -{ - boolean close_loop = (flags == DRAW_SPLIT_BEFORE); - unsigned nr; - - assert(icount + !!close_loop <= vsplit->segment_size); - - if (close_loop) { - for (nr = 0; nr < icount; nr++) - vsplit->fetch_elts[nr] = istart + nr; - vsplit->fetch_elts[nr++] = i0; - - vsplit->middle->run(vsplit->middle, vsplit->fetch_elts, nr, - vsplit->identity_draw_elts, nr, flags); - } - else { - vsplit->middle->run_linear(vsplit->middle, istart, icount, flags); - } -} - -static void -vsplit_segment_fan_linear(struct vsplit_frontend *vsplit, unsigned flags, - unsigned istart, unsigned icount, unsigned i0) -{ - boolean use_spoken = ((flags & DRAW_SPLIT_BEFORE) != 0); - unsigned nr = 0, i; - - assert(icount <= vsplit->segment_size); - - if (use_spoken) { - /* replace istart by i0 */ - vsplit->fetch_elts[nr++] = i0; - for (i = 1 ; i < icount; i++) - vsplit->fetch_elts[nr++] = istart + i; - - vsplit->middle->run(vsplit->middle, vsplit->fetch_elts, nr, - vsplit->identity_draw_elts, nr, flags); - } - else { - vsplit->middle->run_linear(vsplit->middle, istart, icount, flags); - } -} - -#define LOCAL_VARS \ - struct vsplit_frontend *vsplit = (struct vsplit_frontend *) frontend; \ - const unsigned prim = vsplit->prim; \ - const unsigned max_count_simple = vsplit->max_vertices; \ - const unsigned max_count_loop = vsplit->segment_size - 1; \ - const unsigned max_count_fan = vsplit->segment_size; - -#define PRIMITIVE(istart, icount) FALSE - -#define ELT_TYPE linear - -#endif /* ELT_TYPE */ - -#define FUNC_VARS \ - struct draw_pt_front_end *frontend, \ - unsigned start, \ - unsigned count - -#define SEGMENT_SIMPLE(flags, istart, icount) \ - CONCAT(vsplit_segment_simple_, ELT_TYPE)(vsplit, flags, istart, icount) - -#define SEGMENT_LOOP(flags, istart, icount, i0) \ - CONCAT(vsplit_segment_loop_, ELT_TYPE)(vsplit, flags, istart, icount, i0) - -#define SEGMENT_FAN(flags, istart, icount, i0) \ - CONCAT(vsplit_segment_fan_, ELT_TYPE)(vsplit, flags, istart, icount, i0) - -#include "draw_split_tmp.h" - -#undef CONCAT2 -#undef CONCAT - -#undef ELT_TYPE -#undef ADD_CACHE diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_so_emit_tmp.h b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_so_emit_tmp.h deleted file mode 100644 index 7fafde9d5e6..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_so_emit_tmp.h +++ /dev/null @@ -1,31 +0,0 @@ -#define FUNC_VARS \ - struct pt_so_emit *so, \ - const struct draw_prim_info *input_prims, \ - const struct draw_vertex_info *input_verts, \ - unsigned start, \ - unsigned count - -#define FUNC_ENTER \ - /* declare more local vars */ \ - const unsigned prim = input_prims->prim; \ - const unsigned prim_flags = input_prims->flags; \ - const boolean last_vertex_last = TRUE; \ - do { \ - debug_assert(input_prims->primitive_count == 1); \ - switch (prim) { \ - case PIPE_PRIM_LINES_ADJACENCY: \ - case PIPE_PRIM_LINE_STRIP_ADJACENCY: \ - case PIPE_PRIM_TRIANGLES_ADJACENCY: \ - case PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY: \ - debug_assert(!"unexpected primitive type in stream output"); \ - return; \ - default: \ - break; \ - } \ - } while (0) \ - -#define POINT(i0) so_point(so,i0) -#define LINE(flags,i0,i1) so_line(so,i0,i1) -#define TRIANGLE(flags,i0,i1,i2) so_tri(so,i0,i1,i2) - -#include "draw_decompose_tmp.h" diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_split_tmp.h b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_split_tmp.h deleted file mode 100644 index 47defc62b96..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_split_tmp.h +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -static void -FUNC(FUNC_VARS) -{ - unsigned first, incr; - LOCAL_VARS - - /* - * prim, start, count, and max_count_{simple,loop,fan} should have been - * defined - */ - if (0) { - debug_printf("%s: prim 0x%x, start %d, count %d, max_count_simple %d, " - "max_count_loop %d, max_count_fan %d\n", - __FUNCTION__, prim, start, count, max_count_simple, - max_count_loop, max_count_fan); - } - - draw_pt_split_prim(prim, &first, &incr); - /* sanitize primitive length */ - count = draw_pt_trim_count(count, first, incr); - if (count < first) - return; - - /* try flushing the entire primitive */ - if (PRIMITIVE(start, count)) - return; - - /* must be able to at least flush two complete primitives */ - assert(max_count_simple >= first + incr && - max_count_loop >= first + incr && - max_count_fan >= first + incr); - - /* no splitting required */ - if (count <= max_count_simple) { - SEGMENT_SIMPLE(0x0, start, count); - } - else { - const unsigned rollback = first - incr; - unsigned flags = DRAW_SPLIT_AFTER, seg_start = 0, seg_max; - - /* - * Both count and seg_max below are explicitly trimmed. Because - * - * seg_start = N * (seg_max - rollback) = N' * incr, - * - * we have - * - * remaining = count - seg_start = first + N'' * incr. - * - * That is, remaining is implicitly trimmed. - */ - switch (prim) { - case PIPE_PRIM_POINTS: - case PIPE_PRIM_LINES: - case PIPE_PRIM_LINE_STRIP: - case PIPE_PRIM_TRIANGLES: - case PIPE_PRIM_TRIANGLE_STRIP: - case PIPE_PRIM_QUADS: - case PIPE_PRIM_QUAD_STRIP: - case PIPE_PRIM_LINES_ADJACENCY: - case PIPE_PRIM_LINE_STRIP_ADJACENCY: - case PIPE_PRIM_TRIANGLES_ADJACENCY: - case PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY: - seg_max = - draw_pt_trim_count(MIN2(max_count_simple, count), first, incr); - if (prim == PIPE_PRIM_TRIANGLE_STRIP || - prim == PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY) { - /* make sure we flush even number of triangles at a time */ - if (seg_max < count && !(((seg_max - first) / incr) & 1)) - seg_max -= incr; - } - - do { - const unsigned remaining = count - seg_start; - - if (remaining > seg_max) { - SEGMENT_SIMPLE(flags, start + seg_start, seg_max); - seg_start += seg_max - rollback; - - flags |= DRAW_SPLIT_BEFORE; - } - else { - flags &= ~DRAW_SPLIT_AFTER; - - SEGMENT_SIMPLE(flags, start + seg_start, remaining); - seg_start += remaining; - } - } while (seg_start < count); - break; - - case PIPE_PRIM_LINE_LOOP: - seg_max = - draw_pt_trim_count(MIN2(max_count_loop, count), first, incr); - - do { - const unsigned remaining = count - seg_start; - - if (remaining > seg_max) { - SEGMENT_LOOP(flags, start + seg_start, seg_max, start); - seg_start += seg_max - rollback; - - flags |= DRAW_SPLIT_BEFORE; - } - else { - flags &= ~DRAW_SPLIT_AFTER; - - SEGMENT_LOOP(flags, start + seg_start, remaining, start); - seg_start += remaining; - } - } while (seg_start < count); - break; - - case PIPE_PRIM_TRIANGLE_FAN: - case PIPE_PRIM_POLYGON: - seg_max = - draw_pt_trim_count(MIN2(max_count_fan, count), first, incr); - - do { - const unsigned remaining = count - seg_start; - - if (remaining > seg_max) { - SEGMENT_FAN(flags, start + seg_start, seg_max, start); - seg_start += seg_max - rollback; - - flags |= DRAW_SPLIT_BEFORE; - } - else { - flags &= ~DRAW_SPLIT_AFTER; - - SEGMENT_FAN(flags, start + seg_start, remaining, start); - seg_start += remaining; - } - } while (seg_start < count); - break; - - default: - assert(0); - break; - } - } -} - -#undef FUNC -#undef FUNC_VARS -#undef LOCAL_VARS - -#undef PRIMITIVE -#undef SEGMENT_SIMPLE -#undef SEGMENT_LOOP -#undef SEGMENT_FAN diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vbuf.h b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vbuf.h deleted file mode 100644 index f10d185868d..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vbuf.h +++ /dev/null @@ -1,138 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \file - * Vertex buffer drawing stage. - * - * \author Keith Whitwell - * \author Jose Fonseca - */ - -#ifndef DRAW_VBUF_H_ -#define DRAW_VBUF_H_ - - -#include "pipe/p_compiler.h" - - -struct pipe_rasterizer_state; -struct draw_context; -struct vertex_info; - - -/** - * Interface for hardware vertex buffer rendering. - */ -struct vbuf_render { - - /** - * Driver limits. May be tuned lower to improve cache hits on - * index list. - */ - unsigned max_indices; - unsigned max_vertex_buffer_bytes; - - /** - * Query if the hardware driver needs assistance for a particular - * combination of rasterizer state and primitive. - * - * Currently optional. - */ - boolean (*need_pipeline)(const struct vbuf_render *render, - const struct pipe_rasterizer_state *rasterizer, - unsigned int prim ); - - - /** - * Get the hardware vertex format. - * - * XXX: have this in draw_context instead? - */ - const struct vertex_info *(*get_vertex_info)( struct vbuf_render * ); - - /** - * Request a destination for vertices. - * Hardware renderers will use ttm memory, others will just malloc - * something. - */ - boolean (*allocate_vertices)( struct vbuf_render *, - ushort vertex_size, - ushort nr_vertices ); - - void *(*map_vertices)( struct vbuf_render * ); - void (*unmap_vertices)( struct vbuf_render *, - ushort min_index, - ushort max_index ); - - /** - * Notify the renderer of the current primitive when it changes. - * Must succeed for TRIANGLES, LINES and POINTS. Other prims at - * the discretion of the driver, for the benefit of the passthrough - * path. - */ - void (*set_primitive)( struct vbuf_render *, unsigned prim ); - - /** - * Draw indexed primitives. Note that indices are ushort. The driver - * must complete this call, if necessary splitting the index list itself. - */ - void (*draw_elements)( struct vbuf_render *, - const ushort *indices, - uint nr_indices ); - - /* Draw non-indexed primitives. - */ - void (*draw_arrays)( struct vbuf_render *, - unsigned start, - uint nr ); - - /** - * Called when vbuf is done with this set of vertices: - */ - void (*release_vertices)( struct vbuf_render * ); - - void (*destroy)( struct vbuf_render * ); - - - /** - * Called after writing data to the stream out buffers - */ - void (*set_stream_output_info)( struct vbuf_render *vbufr, - unsigned primitive_count, - unsigned vertices_count, - unsigned primitive_generated ); -}; - - - -struct draw_stage * -draw_vbuf_stage( struct draw_context *draw, - struct vbuf_render *render ); - - -#endif /*DRAW_VBUF_H_*/ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vertex.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vertex.c deleted file mode 100644 index a1b2b8ff975..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vertex.c +++ /dev/null @@ -1,117 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* - * Functions for specifying the post-transformation vertex layout. - * - * Author: - * Brian Paul - * Keith Whitwell - */ - - -#include "draw/draw_private.h" -#include "draw/draw_vertex.h" - - -/** - * Compute the size of a vertex, in dwords/floats, to update the - * vinfo->size field. - */ -void -draw_compute_vertex_size(struct vertex_info *vinfo) -{ - uint i; - - vinfo->size = 0; - for (i = 0; i < vinfo->num_attribs; i++) - vinfo->size += draw_translate_vinfo_size(vinfo->attrib[i].emit); - - assert(vinfo->size % 4 == 0); - /* in dwords */ - vinfo->size /= 4; -} - - -void -draw_dump_emitted_vertex(const struct vertex_info *vinfo, const uint8_t *data) -{ - unsigned i; - - for (i = 0; i < vinfo->num_attribs; i++) { - switch (vinfo->attrib[i].emit) { - case EMIT_OMIT: - debug_printf("EMIT_OMIT:"); - break; - case EMIT_1F: - debug_printf("EMIT_1F:\t"); - debug_printf("%f ", *(float *)data); data += sizeof(float); - break; - case EMIT_1F_PSIZE: - debug_printf("EMIT_1F_PSIZE:\t"); - debug_printf("%f ", *(float *)data); data += sizeof(float); - break; - case EMIT_2F: - debug_printf("EMIT_2F:\t"); - debug_printf("%f ", *(float *)data); data += sizeof(float); - debug_printf("%f ", *(float *)data); data += sizeof(float); - break; - case EMIT_3F: - debug_printf("EMIT_3F:\t"); - debug_printf("%f ", *(float *)data); data += sizeof(float); - debug_printf("%f ", *(float *)data); data += sizeof(float); - debug_printf("%f ", *(float *)data); data += sizeof(float); - data += sizeof(float); - break; - case EMIT_4F: - debug_printf("EMIT_4F:\t"); - debug_printf("%f ", *(float *)data); data += sizeof(float); - debug_printf("%f ", *(float *)data); data += sizeof(float); - debug_printf("%f ", *(float *)data); data += sizeof(float); - debug_printf("%f ", *(float *)data); data += sizeof(float); - break; - case EMIT_4UB: - debug_printf("EMIT_4UB:\t"); - debug_printf("%u ", *data++); - debug_printf("%u ", *data++); - debug_printf("%u ", *data++); - debug_printf("%u ", *data++); - break; - case EMIT_4UB_BGRA: - debug_printf("EMIT_4UB_BGRA:\t"); - debug_printf("%u ", *data++); - debug_printf("%u ", *data++); - debug_printf("%u ", *data++); - debug_printf("%u ", *data++); - break; - default: - assert(0); - } - debug_printf("\n"); - } - debug_printf("\n"); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vertex.h b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vertex.h deleted file mode 100644 index e63cf5f4f98..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vertex.h +++ /dev/null @@ -1,193 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * Post-transform vertex format info. The vertex_info struct is used by - * the draw_vbuf code to emit hardware-specific vertex layouts into hw - * vertex buffers. - * - * Author: - * Brian Paul - */ - - -#ifndef DRAW_VERTEX_H -#define DRAW_VERTEX_H - - -#include "pipe/p_compiler.h" -#include "pipe/p_state.h" -#include "util/u_debug.h" - - -/** - * Vertex attribute emit modes - */ -enum attrib_emit { - EMIT_OMIT, /**< don't emit the attribute */ - EMIT_1F, - EMIT_1F_PSIZE, /**< insert constant point size */ - EMIT_2F, - EMIT_3F, - EMIT_4F, - EMIT_4UB, /**< is RGBA like the rest */ - EMIT_4UB_BGRA -}; - - -/** - * Attribute interpolation mode - */ -enum interp_mode { - INTERP_NONE, /**< never interpolate vertex header info */ - INTERP_POS, /**< special case for frag position */ - INTERP_CONSTANT, - INTERP_LINEAR, - INTERP_PERSPECTIVE -}; - - -/** - * Information about hardware/rasterization vertex layout. - */ -struct vertex_info -{ - uint num_attribs; - uint hwfmt[4]; /**< hardware format info for this format */ - uint size; /**< total vertex size in dwords */ - - /* Keep this small and at the end of the struct to allow quick - * memcmp() comparisons. - */ - struct { - unsigned interp_mode:4; /**< INTERP_x */ - unsigned emit:4; /**< EMIT_x */ - unsigned src_index:8; /**< map to post-xform attribs */ - } attrib[PIPE_MAX_SHADER_INPUTS]; -}; - -static INLINE size_t -draw_vinfo_size( const struct vertex_info *a ) -{ - return offsetof(const struct vertex_info, attrib[a->num_attribs]); -} - -static INLINE int -draw_vinfo_compare( const struct vertex_info *a, - const struct vertex_info *b ) -{ - size_t sizea = draw_vinfo_size( a ); - return memcmp( a, b, sizea ); -} - -static INLINE void -draw_vinfo_copy( struct vertex_info *dst, - const struct vertex_info *src ) -{ - size_t size = draw_vinfo_size( src ); - memcpy( dst, src, size ); -} - - - -/** - * Add another attribute to the given vertex_info object. - * \param src_index indicates which post-transformed vertex attrib slot - * corresponds to this attribute. - * \return slot in which the attribute was added - */ -static INLINE uint -draw_emit_vertex_attr(struct vertex_info *vinfo, - enum attrib_emit emit, - enum interp_mode interp, /* only used by softpipe??? */ - uint src_index) -{ - const uint n = vinfo->num_attribs; - assert(n < PIPE_MAX_SHADER_INPUTS); - vinfo->attrib[n].emit = emit; - vinfo->attrib[n].interp_mode = interp; - vinfo->attrib[n].src_index = src_index; - vinfo->num_attribs++; - return n; -} - - -extern void draw_compute_vertex_size(struct vertex_info *vinfo); - -void draw_dump_emitted_vertex(const struct vertex_info *vinfo, - const uint8_t *data); - - -static INLINE enum pipe_format draw_translate_vinfo_format(enum attrib_emit emit) -{ - switch (emit) { - case EMIT_OMIT: - return PIPE_FORMAT_NONE; - case EMIT_1F: - case EMIT_1F_PSIZE: - return PIPE_FORMAT_R32_FLOAT; - case EMIT_2F: - return PIPE_FORMAT_R32G32_FLOAT; - case EMIT_3F: - return PIPE_FORMAT_R32G32B32_FLOAT; - case EMIT_4F: - return PIPE_FORMAT_R32G32B32A32_FLOAT; - case EMIT_4UB: - return PIPE_FORMAT_R8G8B8A8_UNORM; - case EMIT_4UB_BGRA: - return PIPE_FORMAT_B8G8R8A8_UNORM; - default: - assert(!"unexpected format"); - return PIPE_FORMAT_NONE; - } -} - -static INLINE unsigned draw_translate_vinfo_size(enum attrib_emit emit) -{ - switch (emit) { - case EMIT_OMIT: - return 0; - case EMIT_1F: - case EMIT_1F_PSIZE: - return 1 * sizeof(float); - case EMIT_2F: - return 2 * sizeof(float); - case EMIT_3F: - return 3 * sizeof(float); - case EMIT_4F: - return 4 * sizeof(float); - case EMIT_4UB: - return 4 * sizeof(unsigned char); - case EMIT_4UB_BGRA: - return 4 * sizeof(unsigned char); - default: - assert(!"unexpected format"); - return 0; - } -} - -#endif /* DRAW_VERTEX_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vs.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vs.c deleted file mode 100644 index 56c4f882cae..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vs.c +++ /dev/null @@ -1,295 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - /* - * Authors: - * Keith Whitwell - * Brian Paul - */ - -#include "util/u_math.h" -#include "util/u_memory.h" - -#include "pipe/p_shader_tokens.h" - -#include "draw_private.h" -#include "draw_context.h" -#include "draw_vs.h" - -#include "translate/translate.h" -#include "translate/translate_cache.h" - -#include "tgsi/tgsi_dump.h" -#include "tgsi/tgsi_exec.h" - -DEBUG_GET_ONCE_BOOL_OPTION(gallium_dump_vs, "GALLIUM_DUMP_VS", FALSE) - - -/** - * Set a vertex shader constant buffer. - * \param slot which constant buffer in [0, PIPE_MAX_CONSTANT_BUFFERS-1] - * \param constants the mapped buffer - * \param size size of buffer in bytes - */ -void -draw_vs_set_constants(struct draw_context *draw, - unsigned slot, - const void *constants, - unsigned size) -{ - const int alignment = 16; - - /* check if buffer is 16-byte aligned */ - if (((uintptr_t)constants) & (alignment - 1)) { - /* if not, copy the constants into a new, 16-byte aligned buffer */ - if (size > draw->vs.const_storage_size[slot]) { - if (draw->vs.aligned_constant_storage[slot]) { - align_free((void *)draw->vs.aligned_constant_storage[slot]); - draw->vs.const_storage_size[slot] = 0; - } - draw->vs.aligned_constant_storage[slot] = - align_malloc(size, alignment); - if (draw->vs.aligned_constant_storage[slot]) { - draw->vs.const_storage_size[slot] = size; - } - } - assert(constants); - if (draw->vs.aligned_constant_storage[slot]) { - memcpy((void *)draw->vs.aligned_constant_storage[slot], - constants, - size); - } - constants = draw->vs.aligned_constant_storage[slot]; - } - - draw->vs.aligned_constants[slot] = constants; -} - - -void draw_vs_set_viewport( struct draw_context *draw, - const struct pipe_viewport_state *viewport ) -{ -} - - - -struct draw_vertex_shader * -draw_create_vertex_shader(struct draw_context *draw, - const struct pipe_shader_state *shader) -{ - struct draw_vertex_shader *vs = NULL; - - if (draw->dump_vs) { - tgsi_dump(shader->tokens, 0); - } - -#if HAVE_LLVM - if (draw->pt.middle.llvm) { - vs = draw_create_vs_llvm(draw, shader); - } -#endif - - if (!vs) { - vs = draw_create_vs_exec( draw, shader ); - } - - if (vs) - { - uint i; - bool found_clipvertex = FALSE; - for (i = 0; i < vs->info.num_outputs; i++) { - if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_POSITION && - vs->info.output_semantic_index[i] == 0) - vs->position_output = i; - else if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_EDGEFLAG && - vs->info.output_semantic_index[i] == 0) - vs->edgeflag_output = i; - else if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_CLIPVERTEX && - vs->info.output_semantic_index[i] == 0) { - found_clipvertex = TRUE; - vs->clipvertex_output = i; - } else if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_CLIPDIST) { - if (vs->info.output_semantic_index[i] == 0) - vs->clipdistance_output[0] = i; - else - vs->clipdistance_output[1] = i; - } - } - if (!found_clipvertex) - vs->clipvertex_output = vs->position_output; - } - - assert(vs); - return vs; -} - - -void -draw_bind_vertex_shader(struct draw_context *draw, - struct draw_vertex_shader *dvs) -{ - draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE ); - - if (dvs) - { - draw->vs.vertex_shader = dvs; - draw->vs.num_vs_outputs = dvs->info.num_outputs; - draw->vs.position_output = dvs->position_output; - draw->vs.edgeflag_output = dvs->edgeflag_output; - draw->vs.clipvertex_output = dvs->clipvertex_output; - draw->vs.clipdistance_output[0] = dvs->clipdistance_output[0]; - draw->vs.clipdistance_output[1] = dvs->clipdistance_output[1]; - dvs->prepare( dvs, draw ); - } - else { - draw->vs.vertex_shader = NULL; - draw->vs.num_vs_outputs = 0; - } -} - - -void -draw_delete_vertex_shader(struct draw_context *draw, - struct draw_vertex_shader *dvs) -{ - unsigned i; - - for (i = 0; i < dvs->nr_variants; i++) - dvs->variant[i]->destroy( dvs->variant[i] ); - - dvs->nr_variants = 0; - - dvs->delete( dvs ); -} - - - -boolean -draw_vs_init( struct draw_context *draw ) -{ - draw->dump_vs = debug_get_option_gallium_dump_vs(); - - draw->vs.machine = tgsi_exec_machine_create(); - if (!draw->vs.machine) - return FALSE; - - draw->vs.emit_cache = translate_cache_create(); - if (!draw->vs.emit_cache) - return FALSE; - - draw->vs.fetch_cache = translate_cache_create(); - if (!draw->vs.fetch_cache) - return FALSE; - - return TRUE; -} - -void -draw_vs_destroy( struct draw_context *draw ) -{ - uint i; - - if (draw->vs.fetch_cache) - translate_cache_destroy(draw->vs.fetch_cache); - - if (draw->vs.emit_cache) - translate_cache_destroy(draw->vs.emit_cache); - - for (i = 0; i < PIPE_MAX_CONSTANT_BUFFERS; i++) { - if (draw->vs.aligned_constant_storage[i]) { - align_free((void *)draw->vs.aligned_constant_storage[i]); - } - } - - tgsi_exec_machine_destroy(draw->vs.machine); -} - - -struct draw_vs_variant * -draw_vs_lookup_variant( struct draw_vertex_shader *vs, - const struct draw_vs_variant_key *key ) -{ - struct draw_vs_variant *variant; - unsigned i; - - /* Lookup existing variant: - */ - for (i = 0; i < vs->nr_variants; i++) - if (draw_vs_variant_key_compare(key, &vs->variant[i]->key) == 0) - return vs->variant[i]; - - /* Else have to create a new one: - */ - variant = vs->create_variant( vs, key ); - if (variant == NULL) - return NULL; - - /* Add it to our list, could be smarter: - */ - if (vs->nr_variants < Elements(vs->variant)) { - vs->variant[vs->nr_variants++] = variant; - } - else { - vs->last_variant++; - vs->last_variant %= Elements(vs->variant); - vs->variant[vs->last_variant]->destroy(vs->variant[vs->last_variant]); - vs->variant[vs->last_variant] = variant; - } - - /* Done - */ - return variant; -} - - -struct translate * -draw_vs_get_fetch( struct draw_context *draw, - struct translate_key *key ) -{ - if (!draw->vs.fetch || - translate_key_compare(&draw->vs.fetch->key, key) != 0) - { - translate_key_sanitize(key); - draw->vs.fetch = translate_cache_find(draw->vs.fetch_cache, key); - } - - return draw->vs.fetch; -} - -struct translate * -draw_vs_get_emit( struct draw_context *draw, - struct translate_key *key ) -{ - if (!draw->vs.emit || - translate_key_compare(&draw->vs.emit->key, key) != 0) - { - translate_key_sanitize(key); - draw->vs.emit = translate_cache_find(draw->vs.emit_cache, key); - } - - return draw->vs.emit; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vs.h b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vs.h deleted file mode 100644 index 8a440911af7..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vs.h +++ /dev/null @@ -1,214 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: Keith Whitwell - */ - -#ifndef DRAW_VS_H -#define DRAW_VS_H - -#include "draw_context.h" -#include "draw_private.h" -#include "draw_vertex.h" - - -struct draw_context; -struct pipe_shader_state; - -struct draw_variant_input -{ - enum pipe_format format; - unsigned buffer; - unsigned offset; - unsigned instance_divisor; -}; - -struct draw_variant_output -{ - enum attrib_emit format; /* output format */ - unsigned vs_output:8; /* which vertex shader output is this? */ - unsigned offset:24; /* offset into output vertex */ -}; - -struct draw_variant_element { - struct draw_variant_input in; - struct draw_variant_output out; -}; - -struct draw_vs_variant_key { - unsigned output_stride; - unsigned nr_elements:8; /* max2(nr_inputs, nr_outputs) */ - unsigned nr_inputs:8; - unsigned nr_outputs:8; - unsigned viewport:1; - unsigned clip:1; - unsigned const_vbuffers:5; - struct draw_variant_element element[PIPE_MAX_ATTRIBS]; -}; - -struct draw_vs_variant; - - -struct draw_vs_variant { - struct draw_vs_variant_key key; - - struct draw_vertex_shader *vs; - - void (*set_buffer)( struct draw_vs_variant *, - unsigned i, - const void *ptr, - unsigned stride, - unsigned max_stride ); - - void (PIPE_CDECL *run_linear)( struct draw_vs_variant *shader, - unsigned start, - unsigned count, - void *output_buffer ); - - void (PIPE_CDECL *run_elts)( struct draw_vs_variant *shader, - const unsigned *elts, - unsigned count, - void *output_buffer ); - - void (*destroy)( struct draw_vs_variant * ); -}; - - -/** - * Private version of the compiled vertex_shader - */ -struct draw_vertex_shader { - struct draw_context *draw; - - /* This member will disappear shortly: - */ - struct pipe_shader_state state; - - struct tgsi_shader_info info; - unsigned position_output; - unsigned edgeflag_output; - unsigned clipvertex_output; - unsigned clipdistance_output[2]; - /* Extracted from shader: - */ - const float (*immediates)[4]; - - /* - */ - struct draw_vs_variant *variant[16]; - unsigned nr_variants; - unsigned last_variant; - struct draw_vs_variant *(*create_variant)( struct draw_vertex_shader *shader, - const struct draw_vs_variant_key *key ); - - - void (*prepare)( struct draw_vertex_shader *shader, - struct draw_context *draw ); - - /* Run the shader - this interface will get cleaned up in the - * future: - */ - void (*run_linear)( struct draw_vertex_shader *shader, - const float (*input)[4], - float (*output)[4], - const void *constants[PIPE_MAX_CONSTANT_BUFFERS], - const unsigned const_size[PIPE_MAX_CONSTANT_BUFFERS], - unsigned count, - unsigned input_stride, - unsigned output_stride ); - - - void (*delete)( struct draw_vertex_shader * ); -}; - - -struct draw_vs_variant * -draw_vs_lookup_variant( struct draw_vertex_shader *base, - const struct draw_vs_variant_key *key ); - - -/******************************************************************************** - * Internal functions: - */ - -struct draw_vertex_shader * -draw_create_vs_exec(struct draw_context *draw, - const struct pipe_shader_state *templ); - -struct draw_vertex_shader * -draw_create_vs_ppc(struct draw_context *draw, - const struct pipe_shader_state *templ); - - -struct draw_vs_variant_key; -struct draw_vertex_shader; - -#if HAVE_LLVM -struct draw_vertex_shader * -draw_create_vs_llvm(struct draw_context *draw, - const struct pipe_shader_state *state); -#endif - - -/******************************************************************************** - * Helpers for vs implementations that don't do their own fetch/emit variants. - * Means these can be shared between shaders. - */ -struct translate; -struct translate_key; - -struct translate *draw_vs_get_fetch( struct draw_context *draw, - struct translate_key *key ); - - -struct translate *draw_vs_get_emit( struct draw_context *draw, - struct translate_key *key ); - -struct draw_vs_variant * -draw_vs_create_variant_generic( struct draw_vertex_shader *vs, - const struct draw_vs_variant_key *key ); - - - -static INLINE int draw_vs_variant_keysize( const struct draw_vs_variant_key *key ) -{ - return 2 * sizeof(int) + key->nr_elements * sizeof(struct draw_variant_element); -} - -static INLINE int draw_vs_variant_key_compare( const struct draw_vs_variant_key *a, - const struct draw_vs_variant_key *b ) -{ - int keysize = draw_vs_variant_keysize(a); - return memcmp(a, b, keysize); -} - - -#define MAX_TGSI_VERTICES 4 - - - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vs_exec.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vs_exec.c deleted file mode 100644 index bfe7aea737b..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vs_exec.c +++ /dev/null @@ -1,236 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - /* - * Authors: - * Keith Whitwell - * Brian Paul - */ - -#include "util/u_math.h" -#include "util/u_memory.h" -#include "pipe/p_shader_tokens.h" - -#include "draw_private.h" -#include "draw_context.h" -#include "draw_vs.h" - -#include "tgsi/tgsi_parse.h" -#include "tgsi/tgsi_scan.h" -#include "tgsi/tgsi_exec.h" - - -struct exec_vertex_shader { - struct draw_vertex_shader base; - struct tgsi_exec_machine *machine; -}; - -static struct exec_vertex_shader *exec_vertex_shader( struct draw_vertex_shader *vs ) -{ - return (struct exec_vertex_shader *)vs; -} - - -/* Not required for run_linear. - */ -static void -vs_exec_prepare( struct draw_vertex_shader *shader, - struct draw_context *draw ) -{ - struct exec_vertex_shader *evs = exec_vertex_shader(shader); - - /* Specify the vertex program to interpret/execute. - * Avoid rebinding when possible. - */ - if (evs->machine->Tokens != shader->state.tokens) { - tgsi_exec_machine_bind_shader(evs->machine, - shader->state.tokens, - draw->vs.num_samplers, - draw->vs.samplers); - } -} - - - - -/* Simplified vertex shader interface for the pt paths. Given the - * complexity of code-generating all the above operations together, - * it's time to try doing all the other stuff separately. - */ -static void -vs_exec_run_linear( struct draw_vertex_shader *shader, - const float (*input)[4], - float (*output)[4], - const void *constants[PIPE_MAX_CONSTANT_BUFFERS], - const unsigned const_size[PIPE_MAX_CONSTANT_BUFFERS], - unsigned count, - unsigned input_stride, - unsigned output_stride ) -{ - struct exec_vertex_shader *evs = exec_vertex_shader(shader); - struct tgsi_exec_machine *machine = evs->machine; - unsigned int i, j; - unsigned slot; - boolean clamp_vertex_color = shader->draw->rasterizer->clamp_vertex_color; - - tgsi_exec_set_constant_buffers(machine, PIPE_MAX_CONSTANT_BUFFERS, - constants, const_size); - - if (shader->info.uses_instanceid) { - unsigned i = machine->SysSemanticToIndex[TGSI_SEMANTIC_INSTANCEID]; - assert(i < Elements(machine->SystemValue)); - for (j = 0; j < QUAD_SIZE; j++) - machine->SystemValue[i].i[j] = shader->draw->instance_id; - } - - for (i = 0; i < count; i += MAX_TGSI_VERTICES) { - unsigned int max_vertices = MIN2(MAX_TGSI_VERTICES, count - i); - - /* Swizzle inputs. - */ - for (j = 0; j < max_vertices; j++) { -#if 0 - debug_printf("%d) Input vert:\n", i + j); - for (slot = 0; slot < shader->info.num_inputs; slot++) { - debug_printf("\t%d: %f %f %f %f\n", slot, - input[slot][0], - input[slot][1], - input[slot][2], - input[slot][3]); - } -#endif - - if (shader->info.uses_vertexid) { - unsigned vid = machine->SysSemanticToIndex[TGSI_SEMANTIC_VERTEXID]; - assert(vid < Elements(machine->SystemValue)); - machine->SystemValue[vid].i[j] = i + j; - } - - for (slot = 0; slot < shader->info.num_inputs; slot++) { -#if 0 - assert(!util_is_inf_or_nan(input[slot][0])); - assert(!util_is_inf_or_nan(input[slot][1])); - assert(!util_is_inf_or_nan(input[slot][2])); - assert(!util_is_inf_or_nan(input[slot][3])); -#endif - machine->Inputs[slot].xyzw[0].f[j] = input[slot][0]; - machine->Inputs[slot].xyzw[1].f[j] = input[slot][1]; - machine->Inputs[slot].xyzw[2].f[j] = input[slot][2]; - machine->Inputs[slot].xyzw[3].f[j] = input[slot][3]; - } - - input = (const float (*)[4])((const char *)input + input_stride); - } - - tgsi_set_exec_mask(machine, - 1, - max_vertices > 1, - max_vertices > 2, - max_vertices > 3); - - /* run interpreter */ - tgsi_exec_machine_run( machine ); - - /* Unswizzle all output results. - */ - for (j = 0; j < max_vertices; j++) { - for (slot = 0; slot < shader->info.num_outputs; slot++) { - unsigned name = shader->info.output_semantic_name[slot]; - if(clamp_vertex_color && - (name == TGSI_SEMANTIC_COLOR || name == TGSI_SEMANTIC_BCOLOR)) - { - output[slot][0] = CLAMP(machine->Outputs[slot].xyzw[0].f[j], 0.0f, 1.0f); - output[slot][1] = CLAMP(machine->Outputs[slot].xyzw[1].f[j], 0.0f, 1.0f); - output[slot][2] = CLAMP(machine->Outputs[slot].xyzw[2].f[j], 0.0f, 1.0f); - output[slot][3] = CLAMP(machine->Outputs[slot].xyzw[3].f[j], 0.0f, 1.0f); - } - else - { - output[slot][0] = machine->Outputs[slot].xyzw[0].f[j]; - output[slot][1] = machine->Outputs[slot].xyzw[1].f[j]; - output[slot][2] = machine->Outputs[slot].xyzw[2].f[j]; - output[slot][3] = machine->Outputs[slot].xyzw[3].f[j]; - } - } - -#if 0 - debug_printf("%d) Post xform vert:\n", i + j); - for (slot = 0; slot < shader->info.num_outputs; slot++) { - debug_printf("\t%d: %f %f %f %f\n", slot, - output[slot][0], - output[slot][1], - output[slot][2], - output[slot][3]); - assert(!util_is_inf_or_nan(output[slot][0])); - } -#endif - - output = (float (*)[4])((char *)output + output_stride); - } - - } -} - - - - -static void -vs_exec_delete( struct draw_vertex_shader *dvs ) -{ - FREE((void*) dvs->state.tokens); - FREE( dvs ); -} - - -struct draw_vertex_shader * -draw_create_vs_exec(struct draw_context *draw, - const struct pipe_shader_state *state) -{ - struct exec_vertex_shader *vs = CALLOC_STRUCT( exec_vertex_shader ); - - if (vs == NULL) - return NULL; - - /* we make a private copy of the tokens */ - vs->base.state.tokens = tgsi_dup_tokens(state->tokens); - if (!vs->base.state.tokens) { - FREE(vs); - return NULL; - } - - tgsi_scan_shader(state->tokens, &vs->base.info); - - vs->base.state.stream_output = state->stream_output; - vs->base.draw = draw; - vs->base.prepare = vs_exec_prepare; - vs->base.run_linear = vs_exec_run_linear; - vs->base.delete = vs_exec_delete; - vs->base.create_variant = draw_vs_create_variant_generic; - vs->machine = draw->vs.machine; - - return &vs->base; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vs_llvm.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vs_llvm.c deleted file mode 100644 index 54a5574f73f..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vs_llvm.c +++ /dev/null @@ -1,115 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_math.h" -#include "util/u_memory.h" -#include "pipe/p_shader_tokens.h" -#include "pipe/p_screen.h" - -#include "draw_private.h" -#include "draw_context.h" -#include "draw_vs.h" -#include "draw_llvm.h" - -#include "tgsi/tgsi_parse.h" -#include "tgsi/tgsi_scan.h" - -static void -vs_llvm_prepare(struct draw_vertex_shader *shader, - struct draw_context *draw) -{ - /*struct llvm_vertex_shader *evs = llvm_vertex_shader(shader);*/ -} - -static void -vs_llvm_run_linear( struct draw_vertex_shader *shader, - const float (*input)[4], - float (*output)[4], - const void *constants[PIPE_MAX_CONSTANT_BUFFERS], - const unsigned constants_size[PIPE_MAX_CONSTANT_BUFFERS], - unsigned count, - unsigned input_stride, - unsigned output_stride ) -{ - /* we should never get here since the entire pipeline is - * generated in draw_pt_fetch_shade_pipeline_llvm.c */ - debug_assert(0); -} - - -static void -vs_llvm_delete( struct draw_vertex_shader *dvs ) -{ - struct llvm_vertex_shader *shader = llvm_vertex_shader(dvs); - struct draw_llvm_variant_list_item *li; - - li = first_elem(&shader->variants); - while(!at_end(&shader->variants, li)) { - struct draw_llvm_variant_list_item *next = next_elem(li); - draw_llvm_destroy_variant(li->base); - li = next; - } - - assert(shader->variants_cached == 0); - FREE((void*) dvs->state.tokens); - FREE( dvs ); -} - - -struct draw_vertex_shader * -draw_create_vs_llvm(struct draw_context *draw, - const struct pipe_shader_state *state) -{ - struct llvm_vertex_shader *vs = CALLOC_STRUCT( llvm_vertex_shader ); - - if (vs == NULL) - return NULL; - - /* we make a private copy of the tokens */ - vs->base.state.tokens = tgsi_dup_tokens(state->tokens); - if (!vs->base.state.tokens) { - FREE(vs); - return NULL; - } - - tgsi_scan_shader(state->tokens, &vs->base.info); - - vs->variant_key_size = - draw_llvm_variant_key_size( - vs->base.info.file_max[TGSI_FILE_INPUT]+1, - vs->base.info.file_max[TGSI_FILE_SAMPLER]+1); - - vs->base.draw = draw; - vs->base.prepare = vs_llvm_prepare; - vs->base.run_linear = vs_llvm_run_linear; - vs->base.delete = vs_llvm_delete; - vs->base.create_variant = draw_vs_create_variant_generic; - - make_empty_list(&vs->variants); - - return &vs->base; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vs_ppc.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vs_ppc.c deleted file mode 100644 index 7fb0e0953e2..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vs_ppc.c +++ /dev/null @@ -1,240 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - /* - * Authors: - * Keith Whitwell - * Brian Paul - */ - -#include "util/u_math.h" -#include "util/u_memory.h" -#include "pipe/p_config.h" - -#include "draw_vs.h" - -#if defined(PIPE_ARCH_PPC) - -#include "pipe/p_shader_tokens.h" - -#include "draw_private.h" -#include "draw_context.h" - -#include "rtasm/rtasm_cpu.h" -#include "rtasm/rtasm_ppc.h" -#include "tgsi/tgsi_ppc.h" -#include "tgsi/tgsi_parse.h" -#include "tgsi/tgsi_exec.h" - - - -typedef void (PIPE_CDECL *codegen_function) (float (*inputs)[4][4], - float (*outputs)[4][4], - float (*temps)[4][4], - float (*immeds)[4], - float (*consts)[4], - const float *builtins); - - -struct draw_ppc_vertex_shader { - struct draw_vertex_shader base; - struct ppc_function ppc_program; - - codegen_function func; -}; - - -static void -vs_ppc_prepare( struct draw_vertex_shader *base, - struct draw_context *draw ) -{ - /* nothing */ -} - - -/** - * Simplified vertex shader interface for the pt paths. Given the - * complexity of code-generating all the above operations together, - * it's time to try doing all the other stuff separately. - */ -static void -vs_ppc_run_linear( struct draw_vertex_shader *base, - const float (*input)[4], - float (*output)[4], - const void *constants[PIPE_MAX_CONSTANT_BUFFERS], - unsigned count, - unsigned input_stride, - unsigned output_stride ) -{ - struct draw_ppc_vertex_shader *shader = (struct draw_ppc_vertex_shader *)base; - unsigned int i; - -#define MAX_VERTICES 4 - - /* loop over verts */ - for (i = 0; i < count; i += MAX_VERTICES) { - const uint max_vertices = MIN2(MAX_VERTICES, count - i); - PIPE_ALIGN_VAR(16) float inputs_soa[PIPE_MAX_SHADER_INPUTS][4][4]; - PIPE_ALIGN_VAR(16) float outputs_soa[PIPE_MAX_SHADER_OUTPUTS][4][4]; - PIPE_ALIGN_VAR(16) float temps_soa[TGSI_EXEC_NUM_TEMPS][4][4]; - uint attr; - - /* convert (up to) four input verts to SoA format */ - for (attr = 0; attr < base->info.num_inputs; attr++) { - const float *vIn = (const float *) input; - uint vert; - for (vert = 0; vert < max_vertices; vert++) { -#if 0 - if (attr==0) - printf("Input v%d a%d: %f %f %f %f\n", - vert, attr, vIn[0], vIn[1], vIn[2], vIn[3]); -#endif - inputs_soa[attr][0][vert] = vIn[attr * 4 + 0]; - inputs_soa[attr][1][vert] = vIn[attr * 4 + 1]; - inputs_soa[attr][2][vert] = vIn[attr * 4 + 2]; - inputs_soa[attr][3][vert] = vIn[attr * 4 + 3]; - vIn += input_stride / 4; - } - } - - /* run compiled shader - */ - shader->func(inputs_soa, outputs_soa, temps_soa, - (float (*)[4]) shader->base.immediates, - (float (*)[4])constants[0], - ppc_builtin_constants); - - /* convert (up to) four output verts from SoA back to AoS format */ - for (attr = 0; attr < base->info.num_outputs; attr++) { - float *vOut = (float *) output; - uint vert; - for (vert = 0; vert < max_vertices; vert++) { - vOut[attr * 4 + 0] = outputs_soa[attr][0][vert]; - vOut[attr * 4 + 1] = outputs_soa[attr][1][vert]; - vOut[attr * 4 + 2] = outputs_soa[attr][2][vert]; - vOut[attr * 4 + 3] = outputs_soa[attr][3][vert]; -#if 0 - if (attr==0) - printf("Output v%d a%d: %f %f %f %f\n", - vert, attr, vOut[0], vOut[1], vOut[2], vOut[3]); -#endif - vOut += output_stride / 4; - } - } - - /* advance to next group of four input/output verts */ - input = (const float (*)[4])((const char *)input + input_stride * max_vertices); - output = (float (*)[4])((char *)output + output_stride * max_vertices); - } -} - - -static void -vs_ppc_delete( struct draw_vertex_shader *base ) -{ - struct draw_ppc_vertex_shader *shader = (struct draw_ppc_vertex_shader *)base; - - ppc_release_func( &shader->ppc_program ); - - align_free( (void *) shader->base.immediates ); - - FREE( (void*) shader->base.state.tokens ); - FREE( shader ); -} - - -struct draw_vertex_shader * -draw_create_vs_ppc(struct draw_context *draw, - const struct pipe_shader_state *templ) -{ - struct draw_ppc_vertex_shader *vs; - - vs = CALLOC_STRUCT( draw_ppc_vertex_shader ); - if (vs == NULL) - return NULL; - - /* we make a private copy of the tokens */ - vs->base.state.tokens = tgsi_dup_tokens(templ->tokens); - if (!vs->base.state.tokens) - goto fail; - - tgsi_scan_shader(templ->tokens, &vs->base.info); - - vs->base.draw = draw; - vs->base.create_variant = draw_vs_create_variant_generic; - vs->base.prepare = vs_ppc_prepare; - vs->base.run_linear = vs_ppc_run_linear; - vs->base.delete = vs_ppc_delete; - - vs->base.immediates = align_malloc(TGSI_EXEC_NUM_IMMEDIATES * 4 * - sizeof(float), 16); - - ppc_init_func( &vs->ppc_program ); - -#if 0 - ppc_print_code(&vs->ppc_program, TRUE); - ppc_indent(&vs->ppc_program, 8); -#endif - - if (!tgsi_emit_ppc( (struct tgsi_token *) vs->base.state.tokens, - &vs->ppc_program, - (float (*)[4]) vs->base.immediates, - TRUE )) - goto fail; - - vs->func = (codegen_function) ppc_get_func( &vs->ppc_program ); - if (!vs->func) { - goto fail; - } - - return &vs->base; - -fail: - /* - debug_error("tgsi_emit_ppc() failed, falling back to interpreter\n"); - */ - - ppc_release_func( &vs->ppc_program ); - - FREE(vs); - return NULL; -} - - - -#else /* PIPE_ARCH_PPC */ - - -struct draw_vertex_shader * -draw_create_vs_ppc( struct draw_context *draw, - const struct pipe_shader_state *templ ) -{ - return (void *) 0; -} - - -#endif /* PIPE_ARCH_PPC */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vs_variant.c b/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vs_variant.c deleted file mode 100644 index d8f030f61eb..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/draw/draw_vs_variant.c +++ /dev/null @@ -1,341 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - /* - * Authors: - * Keith Whitwell - */ - -#include "util/u_memory.h" -#include "util/u_math.h" -#include "draw/draw_context.h" -#include "draw/draw_private.h" -#include "draw/draw_vbuf.h" -#include "draw/draw_vertex.h" -#include "draw/draw_vs.h" -#include "translate/translate.h" - -/* A first pass at incorporating vertex fetch/emit functionality into - */ -struct draw_vs_variant_generic { - struct draw_vs_variant base; - - struct draw_vertex_shader *shader; - struct draw_context *draw; - - /* Basic plan is to run these two translate functions before/after - * the vertex shader's existing run_linear() routine to simulate - * the inclusion of this functionality into the shader... - * - * Next will look at actually including it. - */ - struct translate *fetch; - struct translate *emit; - - unsigned temp_vertex_stride; -}; - - - - - -static void vsvg_set_buffer( struct draw_vs_variant *variant, - unsigned buffer, - const void *ptr, - unsigned stride, - unsigned max_index ) -{ - struct draw_vs_variant_generic *vsvg = (struct draw_vs_variant_generic *)variant; - - vsvg->fetch->set_buffer(vsvg->fetch, - buffer, - ptr, - stride, - max_index ); -} - - -/* Mainly for debug at this stage: - */ -static void do_rhw_viewport( struct draw_vs_variant_generic *vsvg, - unsigned count, - void *output_buffer ) -{ - char *ptr = (char *)output_buffer; - const float *scale = vsvg->base.vs->draw->viewport.scale; - const float *trans = vsvg->base.vs->draw->viewport.translate; - unsigned stride = vsvg->temp_vertex_stride; - unsigned j; - - ptr += vsvg->base.vs->position_output * 4 * sizeof(float); - - for (j = 0; j < count; j++, ptr += stride) { - float *data = (float *)ptr; - float w = 1.0f / data[3]; - - data[0] = data[0] * w * scale[0] + trans[0]; - data[1] = data[1] * w * scale[1] + trans[1]; - data[2] = data[2] * w * scale[2] + trans[2]; - data[3] = w; - } -} - -static void do_viewport( struct draw_vs_variant_generic *vsvg, - unsigned count, - void *output_buffer ) -{ - char *ptr = (char *)output_buffer; - const float *scale = vsvg->base.vs->draw->viewport.scale; - const float *trans = vsvg->base.vs->draw->viewport.translate; - unsigned stride = vsvg->temp_vertex_stride; - unsigned j; - - ptr += vsvg->base.vs->position_output * 4 * sizeof(float); - - for (j = 0; j < count; j++, ptr += stride) { - float *data = (float *)ptr; - - data[0] = data[0] * scale[0] + trans[0]; - data[1] = data[1] * scale[1] + trans[1]; - data[2] = data[2] * scale[2] + trans[2]; - } -} - - -static void PIPE_CDECL vsvg_run_elts( struct draw_vs_variant *variant, - const unsigned *elts, - unsigned count, - void *output_buffer) -{ - struct draw_vs_variant_generic *vsvg = (struct draw_vs_variant_generic *)variant; - unsigned temp_vertex_stride = vsvg->temp_vertex_stride; - void *temp_buffer = MALLOC( align(count,4) * temp_vertex_stride ); - - if (0) debug_printf("%s %d \n", __FUNCTION__, count); - - /* Want to do this in small batches for cache locality? - */ - - vsvg->fetch->run_elts( vsvg->fetch, - elts, - count, - vsvg->draw->instance_id, - temp_buffer ); - - vsvg->base.vs->run_linear( vsvg->base.vs, - temp_buffer, - temp_buffer, - vsvg->base.vs->draw->pt.user.vs_constants, - vsvg->base.vs->draw->pt.user.vs_constants_size, - count, - temp_vertex_stride, - temp_vertex_stride); - - /* FIXME: geometry shading? */ - - if (vsvg->base.key.clip) { - /* not really handling clipping, just do the rhw so we can - * see the results... - */ - do_rhw_viewport( vsvg, - count, - temp_buffer ); - } - else if (vsvg->base.key.viewport) { - do_viewport( vsvg, - count, - temp_buffer ); - } - - - vsvg->emit->set_buffer( vsvg->emit, - 0, - temp_buffer, - temp_vertex_stride, - ~0 ); - - vsvg->emit->set_buffer( vsvg->emit, - 1, - &vsvg->draw->rasterizer->point_size, - 0, - ~0 ); - - vsvg->emit->run( vsvg->emit, - 0, count, - vsvg->draw->instance_id, - output_buffer ); - - FREE(temp_buffer); -} - - -static void PIPE_CDECL vsvg_run_linear( struct draw_vs_variant *variant, - unsigned start, - unsigned count, - void *output_buffer ) -{ - struct draw_vs_variant_generic *vsvg = (struct draw_vs_variant_generic *)variant; - unsigned temp_vertex_stride = vsvg->temp_vertex_stride; - void *temp_buffer = MALLOC( align(count,4) * temp_vertex_stride ); - - if (0) debug_printf("%s %d %d (sz %d, %d)\n", __FUNCTION__, start, count, - vsvg->base.key.output_stride, - temp_vertex_stride); - - vsvg->fetch->run( vsvg->fetch, - start, - count, - vsvg->draw->instance_id, - temp_buffer ); - - vsvg->base.vs->run_linear( vsvg->base.vs, - temp_buffer, - temp_buffer, - vsvg->base.vs->draw->pt.user.vs_constants, - vsvg->base.vs->draw->pt.user.vs_constants_size, - count, - temp_vertex_stride, - temp_vertex_stride); - - if (vsvg->base.key.clip) { - /* not really handling clipping, just do the rhw so we can - * see the results... - */ - do_rhw_viewport( vsvg, - count, - temp_buffer ); - } - else if (vsvg->base.key.viewport) { - do_viewport( vsvg, - count, - temp_buffer ); - } - - vsvg->emit->set_buffer( vsvg->emit, - 0, - temp_buffer, - temp_vertex_stride, - ~0 ); - - vsvg->emit->set_buffer( vsvg->emit, - 1, - &vsvg->draw->rasterizer->point_size, - 0, - ~0 ); - - vsvg->emit->run( vsvg->emit, - 0, count, - vsvg->draw->instance_id, - output_buffer ); - - FREE(temp_buffer); -} - - - - - -static void vsvg_destroy( struct draw_vs_variant *variant ) -{ - FREE(variant); -} - - -struct draw_vs_variant * -draw_vs_create_variant_generic( struct draw_vertex_shader *vs, - const struct draw_vs_variant_key *key ) -{ - unsigned i; - struct translate_key fetch, emit; - - struct draw_vs_variant_generic *vsvg = CALLOC_STRUCT( draw_vs_variant_generic ); - if (vsvg == NULL) - return NULL; - - vsvg->base.key = *key; - vsvg->base.vs = vs; - vsvg->base.set_buffer = vsvg_set_buffer; - vsvg->base.run_elts = vsvg_run_elts; - vsvg->base.run_linear = vsvg_run_linear; - vsvg->base.destroy = vsvg_destroy; - - vsvg->draw = vs->draw; - - vsvg->temp_vertex_stride = MAX2(key->nr_inputs, - vsvg->base.vs->info.num_outputs) * 4 * sizeof(float); - - /* Build free-standing fetch and emit functions: - */ - fetch.nr_elements = key->nr_inputs; - fetch.output_stride = vsvg->temp_vertex_stride; - for (i = 0; i < key->nr_inputs; i++) { - fetch.element[i].type = TRANSLATE_ELEMENT_NORMAL; - fetch.element[i].input_format = key->element[i].in.format; - fetch.element[i].input_buffer = key->element[i].in.buffer; - fetch.element[i].input_offset = key->element[i].in.offset; - fetch.element[i].instance_divisor = 0; - fetch.element[i].output_format = PIPE_FORMAT_R32G32B32A32_FLOAT; - fetch.element[i].output_offset = i * 4 * sizeof(float); - assert(fetch.element[i].output_offset < fetch.output_stride); - } - - - emit.nr_elements = key->nr_outputs; - emit.output_stride = key->output_stride; - for (i = 0; i < key->nr_outputs; i++) { - if (key->element[i].out.format != EMIT_1F_PSIZE) - { - emit.element[i].type = TRANSLATE_ELEMENT_NORMAL; - emit.element[i].input_format = PIPE_FORMAT_R32G32B32A32_FLOAT; - emit.element[i].input_buffer = 0; - emit.element[i].input_offset = key->element[i].out.vs_output * 4 * sizeof(float); - emit.element[i].instance_divisor = 0; - emit.element[i].output_format = draw_translate_vinfo_format(key->element[i].out.format); - emit.element[i].output_offset = key->element[i].out.offset; - assert(emit.element[i].input_offset <= fetch.output_stride); - } - else { - emit.element[i].type = TRANSLATE_ELEMENT_NORMAL; - emit.element[i].input_format = PIPE_FORMAT_R32_FLOAT; - emit.element[i].input_buffer = 1; - emit.element[i].input_offset = 0; - emit.element[i].instance_divisor = 0; - emit.element[i].output_format = PIPE_FORMAT_R32_FLOAT; - emit.element[i].output_offset = key->element[i].out.offset; - } - } - - vsvg->fetch = draw_vs_get_fetch( vs->draw, &fetch ); - vsvg->emit = draw_vs_get_emit( vs->draw, &emit ); - - return &vsvg->base; -} - - - - - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/indices/u_indices.c b/dll/opengl/mesa/src/gallium/auxiliary/indices/u_indices.c deleted file mode 100644 index 03d7453f303..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/indices/u_indices.c +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "u_indices.h" -#include "u_indices_priv.h" - -static void translate_memcpy_ushort( const void *in, - unsigned nr, - void *out ) -{ - memcpy(out, in, nr*sizeof(short)); -} - -static void translate_memcpy_uint( const void *in, - unsigned nr, - void *out ) -{ - memcpy(out, in, nr*sizeof(int)); -} - - -int u_index_translator( unsigned hw_mask, - unsigned prim, - unsigned in_index_size, - unsigned nr, - unsigned in_pv, - unsigned out_pv, - unsigned *out_prim, - unsigned *out_index_size, - unsigned *out_nr, - u_translate_func *out_translate ) -{ - unsigned in_idx; - unsigned out_idx; - int ret = U_TRANSLATE_NORMAL; - - u_index_init(); - - in_idx = in_size_idx(in_index_size); - *out_index_size = (in_index_size == 4) ? 4 : 2; - out_idx = out_size_idx(*out_index_size); - - if ((hw_mask & (1< 0xfffe) ? 4 : 2; - out_idx = out_size_idx(*out_index_size); - - if ((hw_mask & (1< 0xfffe) ? 4 : 2; - out_idx = out_size_idx(*out_index_size); - - if (unfilled_mode == PIPE_POLYGON_MODE_POINT) { - - if (*out_index_size == 4) - *out_generate = generate_linear_uint; - else - *out_generate = generate_linear_ushort; - - *out_prim = PIPE_PRIM_POINTS; - *out_nr = nr; - return U_GENERATE_LINEAR; - } - else { - assert(unfilled_mode == PIPE_POLYGON_MODE_LINE); - *out_prim = PIPE_PRIM_LINES; - *out_generate = generate_line[out_idx][prim]; - *out_nr = nr_lines( prim, nr ); - - return U_GENERATE_REUSABLE; - } -} - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/os/os_memory.h b/dll/opengl/mesa/src/gallium/auxiliary/os/os_memory.h deleted file mode 100644 index 46a6b6e4572..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/os/os_memory.h +++ /dev/null @@ -1,80 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Vmware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -/* - * OS memory management abstractions - */ - - -#ifndef _OS_MEMORY_H_ -#define _OS_MEMORY_H_ - - -#include "pipe/p_config.h" -#include "pipe/p_compiler.h" - - -#if defined(PIPE_SUBSYSTEM_EMBEDDED) - -#ifdef __cplusplus -extern "C" { -#endif - -void * -os_malloc(size_t size); - -void * -os_calloc(size_t count, size_t size); - -void -os_free(void *ptr); - -void * -os_realloc(void *ptr, size_t old_size, size_t new_size); - -void * -os_malloc_aligned(size_t size, size_t alignment); - -void -os_free_aligned(void *ptr); - -#ifdef __cplusplus -} -#endif - -#elif defined(PIPE_OS_WINDOWS) && defined(DEBUG) && !defined(DEBUG_MEMORY_IMPLEMENTATION) - -# include "os_memory_debug.h" - -#else - -# include "os_memory_stdc.h" - -#endif - -#endif /* _OS_MEMORY_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/os/os_memory_aligned.h b/dll/opengl/mesa/src/gallium/auxiliary/os/os_memory_aligned.h deleted file mode 100644 index 72c5cf65b66..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/os/os_memory_aligned.h +++ /dev/null @@ -1,72 +0,0 @@ -/************************************************************************** - * - * Copyright 2008-2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -/* - * Memory alignment wrappers. - */ - - -#ifndef _OS_MEMORY_H_ -#error "Must not be included directly. Include os_memory.h instead" -#endif - - -#include "pipe/p_compiler.h" - - -/** - * Return memory on given byte alignment - */ -static INLINE void * -os_malloc_aligned(size_t size, size_t alignment) -{ - char *ptr, *buf; - - ptr = (char *) os_malloc(size + alignment + sizeof(void *)); - if (!ptr) - return NULL; - - buf = (char *)(((uintptr_t)ptr + sizeof(void *) + alignment - 1) & ~((uintptr_t)(alignment - 1))); - *(char **)(buf - sizeof(void *)) = ptr; - - return buf; -} - - -/** - * Free memory returned by align_malloc(). - */ -static INLINE void -os_free_aligned(void *ptr) -{ - if (ptr) { - void **cubbyHole = (void **) ((char *) ptr - sizeof(void *)); - void *realAddr = *cubbyHole; - os_free(realAddr); - } -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/os/os_memory_debug.h b/dll/opengl/mesa/src/gallium/auxiliary/os/os_memory_debug.h deleted file mode 100644 index c664be9aad5..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/os/os_memory_debug.h +++ /dev/null @@ -1,83 +0,0 @@ -/************************************************************************** - * - * Copyright 2008-2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -/* - * Debugging wrappers for OS memory management abstractions. - */ - - -#ifndef _OS_MEMORY_H_ -#error "Must not be included directly. Include os_memory.h instead" -#endif - - -#include "pipe/p_compiler.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -void * -debug_malloc(const char *file, unsigned line, const char *function, - size_t size); - -void * -debug_calloc(const char *file, unsigned line, const char *function, - size_t count, size_t size ); - -void -debug_free(const char *file, unsigned line, const char *function, - void *ptr); - -void * -debug_realloc(const char *file, unsigned line, const char *function, - void *old_ptr, size_t old_size, size_t new_size ); - - -#ifdef __cplusplus -} -#endif - - -#ifndef DEBUG_MEMORY_IMPLEMENTATION - -#define os_malloc( _size ) \ - debug_malloc( __FILE__, __LINE__, __FUNCTION__, _size ) -#define os_calloc( _count, _size ) \ - debug_calloc(__FILE__, __LINE__, __FUNCTION__, _count, _size ) -#define os_free( _ptr ) \ - debug_free( __FILE__, __LINE__, __FUNCTION__, _ptr ) -#define os_realloc( _ptr, _old_size, _new_size ) \ - debug_realloc( __FILE__, __LINE__, __FUNCTION__, _ptr, _old_size, _new_size ) - -/* TODO: wrap os_malloc_aligned() and os_free_aligned() too */ -#include "os_memory_aligned.h" - -#endif /* !DEBUG_MEMORY_IMPLEMENTATION */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/os/os_memory_stdc.h b/dll/opengl/mesa/src/gallium/auxiliary/os/os_memory_stdc.h deleted file mode 100644 index 806e5363568..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/os/os_memory_stdc.h +++ /dev/null @@ -1,76 +0,0 @@ -/************************************************************************** - * - * Copyright 2008-2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -/* - * OS memory management abstractions for the standard C library. - */ - - -#ifndef _OS_MEMORY_H_ -#error "Must not be included directly. Include os_memory.h instead" -#endif - -#include - -#include "pipe/p_compiler.h" - - -#define os_malloc(_size) malloc(_size) -#define os_calloc(_count, _size ) calloc(_count, _size ) -#define os_free(_ptr) free(_ptr) - -#define os_realloc( _old_ptr, _old_size, _new_size) \ - realloc(_old_ptr, _new_size + 0*(_old_size)) - - -#if defined(HAVE_POSIX_MEMALIGN) - -static INLINE void * -os_malloc_aligned(size_t size, size_t alignment) -{ - void *ptr; - alignment = (alignment + sizeof(void*) - 1) & ~(sizeof(void*) - 1); - if(posix_memalign(&ptr, alignment, size) != 0) - return NULL; - return ptr; -} - -#define os_free_aligned(_ptr) free(_ptr) - -#elif defined(PIPE_OS_WINDOWS) - -#include - -#define os_malloc_aligned(_size, _align) _aligned_malloc(_size, _align) -#define os_free_aligned(_ptr) _aligned_free(_ptr) - -#else - -#include "os_memory_aligned.h" - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/os/os_misc.c b/dll/opengl/mesa/src/gallium/auxiliary/os/os_misc.c deleted file mode 100644 index 43c00823342..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/os/os_misc.c +++ /dev/null @@ -1,75 +0,0 @@ -/************************************************************************** - * - * Copyright 2008-2010 Vmware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#include "os_misc.h" - -#include - - -#if defined(PIPE_SUBSYSTEM_WINDOWS_USER) - -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -#endif -//#include -#include -#include -#include -#include - -#else - -#include -#include - -#endif - - -void -os_log_message(const char *message) -{ -#if defined(PIPE_SUBSYSTEM_WINDOWS_USER) - OutputDebugStringA(message); - if(GetConsoleWindow() && !IsDebuggerPresent()) { - fflush(stdout); - fputs(message, stderr); - fflush(stderr); - } -#else /* !PIPE_SUBSYSTEM_WINDOWS */ - fflush(stdout); - fputs(message, stderr); -#endif -} - - -const char * -os_get_option(const char *name) -{ - return getenv(name); -} - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/os/os_misc.h b/dll/opengl/mesa/src/gallium/auxiliary/os/os_misc.h deleted file mode 100644 index 5029ab96aac..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/os/os_misc.h +++ /dev/null @@ -1,95 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Vmware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -/* - * Miscellaneous OS services. - */ - - -#ifndef _OS_MISC_H_ -#define _OS_MISC_H_ - - -#include "pipe/p_compiler.h" - - -#if defined(PIPE_OS_UNIX) -# include /* for kill() */ -# include /* getpid() */ -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* - * Trap into the debugger. - */ -#if (defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)) && defined(PIPE_CC_GCC) -# define os_break() __asm("int3") -#elif defined(PIPE_CC_MSVC) -# define os_break() __debugbreak() -#elif defined(PIPE_OS_UNIX) -# define os_break() kill(getpid(), SIGTRAP) -#else -# define os_break() abort() -#endif - - -/* - * Abort the program. - */ -#if defined(DEBUG) -# define os_abort() os_break() -#else -# define os_abort() abort() -#endif - - -/* - * Output a message. Message should preferably end in a newline. - */ -void -os_log_message(const char *message); - - -/* - * Get an option. Should return NULL if specified option is not set. - */ -const char * -os_get_option(const char *name); - - -#ifdef __cplusplus -} -#endif - - -#endif /* _OS_MISC_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/os/os_mman.h b/dll/opengl/mesa/src/gallium/auxiliary/os/os_mman.h deleted file mode 100644 index b48eb053023..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/os/os_mman.h +++ /dev/null @@ -1,87 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 LunarG, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * OS independent memory mapping (with large file support). - * - * @author Chia-I Wu - */ - -#ifndef _OS_MMAN_H_ -#define _OS_MMAN_H_ - - -#include "pipe/p_config.h" -#include "pipe/p_compiler.h" - -#if defined(PIPE_OS_UNIX) -# ifndef _FILE_OFFSET_BITS -# error _FILE_OFFSET_BITS must be defined to 64 -# endif -# include -#else -# error Unsupported OS -#endif - -#if defined(PIPE_OS_ANDROID) -# include /* for EINVAL */ -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - -#if defined(PIPE_OS_ANDROID) - -extern void *__mmap2(void *, size_t, int, int, int, size_t); - -static INLINE void *os_mmap(void *addr, size_t length, int prot, int flags, int fd, loff_t offset) -{ - /* offset must be aligned to 4096 (not necessarily the page size) */ - if (unlikely(offset & 4095)) { - errno = EINVAL; - return MAP_FAILED; - } - - return __mmap2(addr, length, prot, flags, fd, (size_t) (offset >> 12)); -} - -#else -/* assume large file support exists */ -# define os_mmap(addr, length, prot, flags, fd, offset) mmap(addr, length, prot, flags, fd, offset) -#endif - -#define os_munmap(addr, length) munmap(addr, length) - - -#ifdef __cplusplus -} -#endif - -#endif /* _OS_MMAN_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/os/os_thread.h b/dll/opengl/mesa/src/gallium/auxiliary/os/os_thread.h deleted file mode 100644 index 3860c38b016..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/os/os_thread.h +++ /dev/null @@ -1,511 +0,0 @@ -/************************************************************************** - * - * Copyright 1999-2006 Brian Paul - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -/** - * @file - * - * Thread, mutex, condition variable, barrier, semaphore and - * thread-specific data functions. - */ - - -#ifndef OS_THREAD_H_ -#define OS_THREAD_H_ - - -#include "pipe/p_compiler.h" -#include "util/u_debug.h" /* for assert */ - - -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_CYGWIN) - -#include /* POSIX threads headers */ -#include /* for perror() */ - - -/* pipe_thread - */ -typedef pthread_t pipe_thread; - -#define PIPE_THREAD_ROUTINE( name, param ) \ - void *name( void *param ) - -static INLINE pipe_thread pipe_thread_create( void *(* routine)( void *), void *param ) -{ - pipe_thread thread; - sigset_t saved_set, new_set; - int ret; - - sigfillset(&new_set); - pthread_sigmask(SIG_SETMASK, &new_set, &saved_set); - ret = pthread_create( &thread, NULL, routine, param ); - pthread_sigmask(SIG_SETMASK, &saved_set, NULL); - if (ret) - return 0; - return thread; -} - -static INLINE int pipe_thread_wait( pipe_thread thread ) -{ - return pthread_join( thread, NULL ); -} - -static INLINE int pipe_thread_destroy( pipe_thread thread ) -{ - return pthread_detach( thread ); -} - - -/* pipe_mutex - */ -typedef pthread_mutex_t pipe_mutex; - -#define pipe_static_mutex(mutex) \ - static pipe_mutex mutex = PTHREAD_MUTEX_INITIALIZER - -#define pipe_mutex_init(mutex) \ - (void) pthread_mutex_init(&(mutex), NULL) - -#define pipe_mutex_destroy(mutex) \ - pthread_mutex_destroy(&(mutex)) - -#define pipe_mutex_lock(mutex) \ - (void) pthread_mutex_lock(&(mutex)) - -#define pipe_mutex_unlock(mutex) \ - (void) pthread_mutex_unlock(&(mutex)) - - -/* pipe_condvar - */ -typedef pthread_cond_t pipe_condvar; - -#define pipe_static_condvar(mutex) \ - static pipe_condvar mutex = PTHREAD_COND_INITIALIZER - -#define pipe_condvar_init(cond) \ - pthread_cond_init(&(cond), NULL) - -#define pipe_condvar_destroy(cond) \ - pthread_cond_destroy(&(cond)) - -#define pipe_condvar_wait(cond, mutex) \ - pthread_cond_wait(&(cond), &(mutex)) - -#define pipe_condvar_signal(cond) \ - pthread_cond_signal(&(cond)) - -#define pipe_condvar_broadcast(cond) \ - pthread_cond_broadcast(&(cond)) - - - -#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) - -//#include -#include -#include -#include - -/* pipe_thread - */ -typedef HANDLE pipe_thread; - -#define PIPE_THREAD_ROUTINE( name, param ) \ - void * WINAPI name( void *param ) - -static INLINE pipe_thread pipe_thread_create( void *(WINAPI * routine)( void *), void *param ) -{ - DWORD id; - return CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE) routine, param, 0, &id ); -} - -static INLINE int pipe_thread_wait( pipe_thread thread ) -{ - if (WaitForSingleObject( thread, INFINITE ) == WAIT_OBJECT_0) - return 0; - return -1; -} - -static INLINE int pipe_thread_destroy( pipe_thread thread ) -{ - if (CloseHandle( thread )) - return 0; - return -1; -} - - -/* pipe_mutex - */ -typedef CRITICAL_SECTION pipe_mutex; - -/* http://locklessinc.com/articles/pthreads_on_windows/ */ -#define pipe_static_mutex(mutex) \ - static pipe_mutex mutex = {(PCRITICAL_SECTION_DEBUG)-1, -1, 0, 0, 0, 0} - -#define pipe_mutex_init(mutex) \ - InitializeCriticalSection(&mutex) - -#define pipe_mutex_destroy(mutex) \ - DeleteCriticalSection(&mutex) - -#define pipe_mutex_lock(mutex) \ - EnterCriticalSection(&mutex) - -#define pipe_mutex_unlock(mutex) \ - LeaveCriticalSection(&mutex) - -/* TODO: Need a macro to declare "I don't care about WinXP compatibilty" */ -#if 0 && defined (_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600) -/* CONDITION_VARIABLE is only available on newer versions of Windows - * (Server 2008/Vista or later). - * http://msdn.microsoft.com/en-us/library/ms682052(VS.85).aspx - * - * pipe_condvar - */ -typedef CONDITION_VARIABLE pipe_condvar; - -#define pipe_static_condvar(cond) \ - /*static*/ pipe_condvar cond = CONDITION_VARIABLE_INIT - -#define pipe_condvar_init(cond) \ - InitializeConditionVariable(&(cond)) - -#define pipe_condvar_destroy(cond) \ - (void) cond /* nothing to do */ - -#define pipe_condvar_wait(cond, mutex) \ - SleepConditionVariableCS(&(cond), &(mutex), INFINITE) - -#define pipe_condvar_signal(cond) \ - WakeConditionVariable(&(cond)) - -#define pipe_condvar_broadcast(cond) \ - WakeAllConditionVariable(&(cond)) - -#else /* need compatibility with pre-Vista Win32 */ - -/* pipe_condvar (XXX FIX THIS) - * See http://www.cs.wustl.edu/~schmidt/win32-cv-1.html - * for potential pitfalls in implementation. - */ -typedef DWORD pipe_condvar; - -#define pipe_static_condvar(cond) \ - /*static*/ pipe_condvar cond = 1 - -#define pipe_condvar_init(cond) \ - (void) (cond = 1) - -#define pipe_condvar_destroy(cond) \ - (void) cond - -/* Poor man's pthread_cond_wait(): - Just release the mutex and sleep for one millisecond. - The caller's while() loop does all the work. */ -#define pipe_condvar_wait(cond, mutex) \ - do { pipe_mutex_unlock(mutex); \ - Sleep(cond); \ - pipe_mutex_lock(mutex); \ - } while (0) - -#define pipe_condvar_signal(cond) \ - (void) cond - -#define pipe_condvar_broadcast(cond) \ - (void) cond - -#endif /* pre-Vista win32 */ - -#else - -#include "os/os_time.h" - -/** Dummy definitions */ - -typedef unsigned pipe_thread; - -#define PIPE_THREAD_ROUTINE( name, param ) \ - void * name( void *param ) - -static INLINE pipe_thread pipe_thread_create( void *(* routine)( void *), void *param ) -{ - return 0; -} - -static INLINE int pipe_thread_wait( pipe_thread thread ) -{ - return -1; -} - -static INLINE int pipe_thread_destroy( pipe_thread thread ) -{ - return -1; -} - -typedef unsigned pipe_mutex; - -#define pipe_static_mutex(mutex) \ - static pipe_mutex mutex = 0 - -#define pipe_mutex_init(mutex) \ - (void) mutex - -#define pipe_mutex_destroy(mutex) \ - (void) mutex - -#define pipe_mutex_lock(mutex) \ - (void) mutex - -#define pipe_mutex_unlock(mutex) \ - (void) mutex - -typedef int64_t pipe_condvar; - -#define pipe_static_condvar(condvar) \ - static pipe_condvar condvar = 1000 - -#define pipe_condvar_init(condvar) \ - (void) (condvar = 1000) - -#define pipe_condvar_destroy(condvar) \ - (void) condvar - -/* Poor man's pthread_cond_wait(): - Just release the mutex and sleep for one millisecond. - The caller's while() loop does all the work. */ -#define pipe_condvar_wait(condvar, mutex) \ - do { pipe_mutex_unlock(mutex); \ - os_time_sleep(condvar); \ - pipe_mutex_lock(mutex); \ - } while (0) - -#define pipe_condvar_signal(condvar) \ - (void) condvar - -#define pipe_condvar_broadcast(condvar) \ - (void) condvar - - -#endif /* PIPE_OS_? */ - - -/* - * pipe_barrier - */ - -#if (defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS)) && !defined(PIPE_OS_ANDROID) - -typedef pthread_barrier_t pipe_barrier; - -static INLINE void pipe_barrier_init(pipe_barrier *barrier, unsigned count) -{ - pthread_barrier_init(barrier, NULL, count); -} - -static INLINE void pipe_barrier_destroy(pipe_barrier *barrier) -{ - pthread_barrier_destroy(barrier); -} - -static INLINE void pipe_barrier_wait(pipe_barrier *barrier) -{ - pthread_barrier_wait(barrier); -} - - -#else /* If the OS doesn't have its own, implement barriers using a mutex and a condvar */ - -typedef struct { - unsigned count; - unsigned waiters; - uint64_t sequence; - pipe_mutex mutex; - pipe_condvar condvar; -} pipe_barrier; - -static INLINE void pipe_barrier_init(pipe_barrier *barrier, unsigned count) -{ - barrier->count = count; - barrier->waiters = 0; - barrier->sequence = 0; - pipe_mutex_init(barrier->mutex); - pipe_condvar_init(barrier->condvar); -} - -static INLINE void pipe_barrier_destroy(pipe_barrier *barrier) -{ - assert(barrier->waiters == 0); - pipe_mutex_destroy(barrier->mutex); - pipe_condvar_destroy(barrier->condvar); -} - -static INLINE void pipe_barrier_wait(pipe_barrier *barrier) -{ - pipe_mutex_lock(barrier->mutex); - - assert(barrier->waiters < barrier->count); - barrier->waiters++; - - if (barrier->waiters < barrier->count) { - uint64_t sequence = barrier->sequence; - - do { - pipe_condvar_wait(barrier->condvar, barrier->mutex); - } while (sequence == barrier->sequence); - } else { - barrier->waiters = 0; - barrier->sequence++; - pipe_condvar_broadcast(barrier->condvar); - } - - pipe_mutex_unlock(barrier->mutex); -} - - -#endif - - -/* - * Semaphores - */ - -typedef struct -{ - pipe_mutex mutex; - pipe_condvar cond; - int counter; -} pipe_semaphore; - - -static INLINE void -pipe_semaphore_init(pipe_semaphore *sema, int init_val) -{ - pipe_mutex_init(sema->mutex); - pipe_condvar_init(sema->cond); - sema->counter = init_val; -} - -static INLINE void -pipe_semaphore_destroy(pipe_semaphore *sema) -{ - pipe_mutex_destroy(sema->mutex); - pipe_condvar_destroy(sema->cond); -} - -/** Signal/increment semaphore counter */ -static INLINE void -pipe_semaphore_signal(pipe_semaphore *sema) -{ - pipe_mutex_lock(sema->mutex); - sema->counter++; - pipe_condvar_signal(sema->cond); - pipe_mutex_unlock(sema->mutex); -} - -/** Wait for semaphore counter to be greater than zero */ -static INLINE void -pipe_semaphore_wait(pipe_semaphore *sema) -{ - pipe_mutex_lock(sema->mutex); - while (sema->counter <= 0) { - pipe_condvar_wait(sema->cond, sema->mutex); - } - sema->counter--; - pipe_mutex_unlock(sema->mutex); -} - - - -/* - * Thread-specific data. - */ - -typedef struct { -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_CYGWIN) - pthread_key_t key; -#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) - DWORD key; -#endif - int initMagic; -} pipe_tsd; - - -#define PIPE_TSD_INIT_MAGIC 0xff8adc98 - - -static INLINE void -pipe_tsd_init(pipe_tsd *tsd) -{ -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_CYGWIN) - if (pthread_key_create(&tsd->key, NULL/*free*/) != 0) { - perror("pthread_key_create(): failed to allocate key for thread specific data"); - exit(-1); - } -#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) - assert(0); -#endif - tsd->initMagic = PIPE_TSD_INIT_MAGIC; -} - -static INLINE void * -pipe_tsd_get(pipe_tsd *tsd) -{ - if (tsd->initMagic != (int) PIPE_TSD_INIT_MAGIC) { - pipe_tsd_init(tsd); - } -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_CYGWIN) - return pthread_getspecific(tsd->key); -#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) - assert(0); - return NULL; -#else - assert(0); - return NULL; -#endif -} - -static INLINE void -pipe_tsd_set(pipe_tsd *tsd, void *value) -{ - if (tsd->initMagic != (int) PIPE_TSD_INIT_MAGIC) { - pipe_tsd_init(tsd); - } -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) || defined(PIPE_OS_APPLE) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_CYGWIN) - if (pthread_setspecific(tsd->key, value) != 0) { - perror("pthread_set_specific() failed"); - exit(-1); - } -#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) - assert(0); -#else - assert(0); -#endif -} - - - -#endif /* OS_THREAD_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/os/os_time.c b/dll/opengl/mesa/src/gallium/auxiliary/os/os_time.c deleted file mode 100644 index 939b3876e91..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/os/os_time.c +++ /dev/null @@ -1,82 +0,0 @@ -/************************************************************************** - * - * Copyright 2008-2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * OS independent time-manipulation functions. - * - * @author Jose Fonseca - */ - - -#include "pipe/p_config.h" - -#if defined(PIPE_OS_UNIX) -# include /* timeval */ -#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) -//# include -# include -# include -# include -#else -# error Unsupported OS -#endif - -#include "os_time.h" - - -int64_t -os_time_get(void) -{ -#if defined(PIPE_OS_UNIX) - - struct timeval tv; - gettimeofday(&tv, NULL); - return tv.tv_usec + tv.tv_sec*1000000LL; - -#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) - - static LARGE_INTEGER frequency; - LARGE_INTEGER counter; - if(!frequency.QuadPart) - QueryPerformanceFrequency(&frequency); - QueryPerformanceCounter(&counter); - return counter.QuadPart*INT64_C(1000000)/frequency.QuadPart; - -#endif -} - - -#if defined(PIPE_SUBSYSTEM_WINDOWS_USER) - -void -os_time_sleep(int64_t usecs) -{ - Sleep((usecs + 999) / 1000); -} - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/os/os_time.h b/dll/opengl/mesa/src/gallium/auxiliary/os/os_time.h deleted file mode 100644 index 7e0f67a76b0..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/os/os_time.h +++ /dev/null @@ -1,92 +0,0 @@ -/************************************************************************** - * - * Copyright 2008-2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * OS independent time-manipulation functions. - * - * @author Jose Fonseca - */ - -#ifndef _OS_TIME_H_ -#define _OS_TIME_H_ - - -#include "pipe/p_config.h" - -#if defined(PIPE_OS_UNIX) -# include /* usleep */ -#endif - -#include "pipe/p_compiler.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* - * Get the current time in microseconds from an unknown base. - */ -int64_t -os_time_get(void); - - -/* - * Sleep. - */ -#if defined(PIPE_OS_UNIX) -#define os_time_sleep(_usecs) usleep(_usecs) -#else -void -os_time_sleep(int64_t usecs); -#endif - - -/* - * Helper function for detecting time outs, taking in account overflow. - * - * Returns true if the current time has elapsed beyond the specified interval. - */ -static INLINE boolean -os_time_timeout(int64_t start, - int64_t end, - int64_t curr) -{ - if(start <= end) - return !(start <= curr && curr < end); - else - return !((start <= curr) || (curr < end)); -} - - -#ifdef __cplusplus -} -#endif - -#endif /* _OS_TIME_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/Makefile b/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/Makefile deleted file mode 100644 index 21d25d24748..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -TOP = ../../../.. -include $(TOP)/configs/current - -LIBNAME = pipebuffer - -C_SOURCES = \ - pb_buffer_fenced.c \ - pb_buffer_malloc.c \ - pb_bufmgr_alt.c \ - pb_bufmgr_cache.c \ - pb_bufmgr_debug.c \ - pb_bufmgr_mm.c \ - pb_bufmgr_ondemand.c \ - pb_bufmgr_pool.c \ - pb_bufmgr_slab.c \ - pb_validate.c - -include ../../Makefile.template diff --git a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_buffer.h b/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_buffer.h deleted file mode 100644 index a5ec93c255e..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_buffer.h +++ /dev/null @@ -1,288 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \file - * Generic code for buffers. - * - * Behind a pipe buffle handle there can be DMA buffers, client (or user) - * buffers, regular malloced buffers, etc. This file provides an abstract base - * buffer handle that allows the driver to cope with all those kinds of buffers - * in a more flexible way. - * - * There is no obligation of a winsys driver to use this library. And a pipe - * driver should be completly agnostic about it. - * - * \author Jose Fonseca - */ - -#ifndef PB_BUFFER_H_ -#define PB_BUFFER_H_ - - -#include "pipe/p_compiler.h" -#include "util/u_debug.h" -#include "util/u_inlines.h" -#include "pipe/p_defines.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -struct pb_vtbl; -struct pb_validate; -struct pipe_fence_handle; - - -#define PB_USAGE_CPU_READ (1 << 0) -#define PB_USAGE_CPU_WRITE (1 << 1) -#define PB_USAGE_GPU_READ (1 << 2) -#define PB_USAGE_GPU_WRITE (1 << 3) -#define PB_USAGE_UNSYNCHRONIZED (1 << 10) -#define PB_USAGE_DONTBLOCK (1 << 9) - -#define PB_USAGE_CPU_READ_WRITE \ - ( PB_USAGE_CPU_READ | PB_USAGE_CPU_WRITE ) -#define PB_USAGE_GPU_READ_WRITE \ - ( PB_USAGE_GPU_READ | PB_USAGE_GPU_WRITE ) -#define PB_USAGE_WRITE \ - ( PB_USAGE_CPU_WRITE | PB_USAGE_GPU_WRITE ) - -/** - * Buffer description. - * - * Used when allocating the buffer. - */ -struct pb_desc -{ - unsigned alignment; - unsigned usage; -}; - - -/** - * Size. Regular (32bit) unsigned for now. - */ -typedef unsigned pb_size; - - -/** - * Base class for all pb_* buffers. - */ -struct pb_buffer -{ - struct pipe_reference reference; - unsigned size; - unsigned alignment; - unsigned usage; - - /** - * Pointer to the virtual function table. - * - * Avoid accessing this table directly. Use the inline functions below - * instead to avoid mistakes. - */ - const struct pb_vtbl *vtbl; -}; - - -/** - * Virtual function table for the buffer storage operations. - * - * Note that creation is not done through this table. - */ -struct pb_vtbl -{ - void (*destroy)( struct pb_buffer *buf ); - - /** - * Map the entire data store of a buffer object into the client's address. - * flags is bitmask of PB_USAGE_CPU_READ/WRITE. - */ - void *(*map)( struct pb_buffer *buf, - unsigned flags, void *flush_ctx ); - - void (*unmap)( struct pb_buffer *buf ); - - enum pipe_error (*validate)( struct pb_buffer *buf, - struct pb_validate *vl, - unsigned flags ); - - void (*fence)( struct pb_buffer *buf, - struct pipe_fence_handle *fence ); - - /** - * Get the base buffer and the offset. - * - * A buffer can be subdivided in smaller buffers. This method should return - * the underlaying buffer, and the relative offset. - * - * Buffers without an underlaying base buffer should return themselves, with - * a zero offset. - * - * Note that this will increase the reference count of the base buffer. - */ - void (*get_base_buffer)( struct pb_buffer *buf, - struct pb_buffer **base_buf, - pb_size *offset ); - -}; - - - -/* Accessor functions for pb->vtbl: - */ -static INLINE void * -pb_map(struct pb_buffer *buf, - unsigned flags, void *flush_ctx) -{ - assert(buf); - if(!buf) - return NULL; - assert(pipe_is_referenced(&buf->reference)); - return buf->vtbl->map(buf, flags, flush_ctx); -} - - -static INLINE void -pb_unmap(struct pb_buffer *buf) -{ - assert(buf); - if(!buf) - return; - assert(pipe_is_referenced(&buf->reference)); - buf->vtbl->unmap(buf); -} - - -static INLINE void -pb_get_base_buffer( struct pb_buffer *buf, - struct pb_buffer **base_buf, - pb_size *offset ) -{ - assert(buf); - if(!buf) { - base_buf = NULL; - offset = 0; - return; - } - assert(pipe_is_referenced(&buf->reference)); - assert(buf->vtbl->get_base_buffer); - buf->vtbl->get_base_buffer(buf, base_buf, offset); - assert(*base_buf); - assert(*offset < (*base_buf)->size); -} - - -static INLINE enum pipe_error -pb_validate(struct pb_buffer *buf, struct pb_validate *vl, unsigned flags) -{ - assert(buf); - if(!buf) - return PIPE_ERROR; - assert(buf->vtbl->validate); - return buf->vtbl->validate(buf, vl, flags); -} - - -static INLINE void -pb_fence(struct pb_buffer *buf, struct pipe_fence_handle *fence) -{ - assert(buf); - if(!buf) - return; - assert(buf->vtbl->fence); - buf->vtbl->fence(buf, fence); -} - - -static INLINE void -pb_destroy(struct pb_buffer *buf) -{ - assert(buf); - if(!buf) - return; - assert(!pipe_is_referenced(&buf->reference)); - buf->vtbl->destroy(buf); -} - -static INLINE void -pb_reference(struct pb_buffer **dst, - struct pb_buffer *src) -{ - struct pb_buffer *old = *dst; - - if (pipe_reference(&(*dst)->reference, &src->reference)) - pb_destroy( old ); - *dst = src; -} - - -/** - * Utility function to check whether the provided alignment is consistent with - * the requested or not. - */ -static INLINE boolean -pb_check_alignment(pb_size requested, pb_size provided) -{ - if(!requested) - return TRUE; - if(requested > provided) - return FALSE; - if(provided % requested != 0) - return FALSE; - return TRUE; -} - - -/** - * Utility function to check whether the provided alignment is consistent with - * the requested or not. - */ -static INLINE boolean -pb_check_usage(unsigned requested, unsigned provided) -{ - return (requested & provided) == requested ? TRUE : FALSE; -} - - -/** - * Malloc-based buffer to store data that can't be used by the graphics - * hardware. - */ -struct pb_buffer * -pb_malloc_buffer_create(pb_size size, - const struct pb_desc *desc); - - -#ifdef __cplusplus -} -#endif - -#endif /*PB_BUFFER_H_*/ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c b/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c deleted file mode 100644 index 9e0cacecac1..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c +++ /dev/null @@ -1,1069 +0,0 @@ -/************************************************************************** - * - * Copyright 2007-2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \file - * Implementation of fenced buffers. - * - * \author Jose Fonseca - * \author Thomas Hellström - */ - - -#include "pipe/p_config.h" - -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) -#include -#include -#endif - -#include "pipe/p_compiler.h" -#include "pipe/p_defines.h" -#include "util/u_debug.h" -#include "os/os_thread.h" -#include "util/u_memory.h" -#include "util/u_double_list.h" - -#include "pb_buffer.h" -#include "pb_buffer_fenced.h" -#include "pb_bufmgr.h" - - - -/** - * Convenience macro (type safe). - */ -#define SUPER(__derived) (&(__derived)->base) - - -struct fenced_manager -{ - struct pb_manager base; - struct pb_manager *provider; - struct pb_fence_ops *ops; - - /** - * Maximum buffer size that can be safely allocated. - */ - pb_size max_buffer_size; - - /** - * Maximum cpu memory we can allocate before we start waiting for the - * GPU to idle. - */ - pb_size max_cpu_total_size; - - /** - * Following members are mutable and protected by this mutex. - */ - pipe_mutex mutex; - - /** - * Fenced buffer list. - * - * All fenced buffers are placed in this listed, ordered from the oldest - * fence to the newest fence. - */ - struct list_head fenced; - pb_size num_fenced; - - struct list_head unfenced; - pb_size num_unfenced; - - /** - * How much temporary CPU memory is being used to hold unvalidated buffers. - */ - pb_size cpu_total_size; -}; - - -/** - * Fenced buffer. - * - * Wrapper around a pipe buffer which adds fencing and reference counting. - */ -struct fenced_buffer -{ - /* - * Immutable members. - */ - - struct pb_buffer base; - struct fenced_manager *mgr; - - /* - * Following members are mutable and protected by fenced_manager::mutex. - */ - - struct list_head head; - - /** - * Buffer with storage. - */ - struct pb_buffer *buffer; - pb_size size; - struct pb_desc desc; - - /** - * Temporary CPU storage data. Used when there isn't enough GPU memory to - * store the buffer. - */ - void *data; - - /** - * A bitmask of PB_USAGE_CPU/GPU_READ/WRITE describing the current - * buffer usage. - */ - unsigned flags; - - unsigned mapcount; - - struct pb_validate *vl; - unsigned validation_flags; - - struct pipe_fence_handle *fence; -}; - - -static INLINE struct fenced_manager * -fenced_manager(struct pb_manager *mgr) -{ - assert(mgr); - return (struct fenced_manager *)mgr; -} - - -static INLINE struct fenced_buffer * -fenced_buffer(struct pb_buffer *buf) -{ - assert(buf); - return (struct fenced_buffer *)buf; -} - - -static void -fenced_buffer_destroy_cpu_storage_locked(struct fenced_buffer *fenced_buf); - -static enum pipe_error -fenced_buffer_create_cpu_storage_locked(struct fenced_manager *fenced_mgr, - struct fenced_buffer *fenced_buf); - -static void -fenced_buffer_destroy_gpu_storage_locked(struct fenced_buffer *fenced_buf); - -static enum pipe_error -fenced_buffer_create_gpu_storage_locked(struct fenced_manager *fenced_mgr, - struct fenced_buffer *fenced_buf, - boolean wait); - -static enum pipe_error -fenced_buffer_copy_storage_to_gpu_locked(struct fenced_buffer *fenced_buf); - -static enum pipe_error -fenced_buffer_copy_storage_to_cpu_locked(struct fenced_buffer *fenced_buf); - - -/** - * Dump the fenced buffer list. - * - * Useful to understand failures to allocate buffers. - */ -static void -fenced_manager_dump_locked(struct fenced_manager *fenced_mgr) -{ -#ifdef DEBUG - struct pb_fence_ops *ops = fenced_mgr->ops; - struct list_head *curr, *next; - struct fenced_buffer *fenced_buf; - - debug_printf("%10s %7s %8s %7s %10s %s\n", - "buffer", "size", "refcount", "storage", "fence", "signalled"); - - curr = fenced_mgr->unfenced.next; - next = curr->next; - while(curr != &fenced_mgr->unfenced) { - fenced_buf = LIST_ENTRY(struct fenced_buffer, curr, head); - assert(!fenced_buf->fence); - debug_printf("%10p %7u %8u %7s\n", - (void *) fenced_buf, - fenced_buf->base.size, - p_atomic_read(&fenced_buf->base.reference.count), - fenced_buf->buffer ? "gpu" : (fenced_buf->data ? "cpu" : "none")); - curr = next; - next = curr->next; - } - - curr = fenced_mgr->fenced.next; - next = curr->next; - while(curr != &fenced_mgr->fenced) { - int signaled; - fenced_buf = LIST_ENTRY(struct fenced_buffer, curr, head); - assert(fenced_buf->buffer); - signaled = ops->fence_signalled(ops, fenced_buf->fence, 0); - debug_printf("%10p %7u %8u %7s %10p %s\n", - (void *) fenced_buf, - fenced_buf->base.size, - p_atomic_read(&fenced_buf->base.reference.count), - "gpu", - (void *) fenced_buf->fence, - signaled == 0 ? "y" : "n"); - curr = next; - next = curr->next; - } -#else - (void)fenced_mgr; -#endif -} - - -static INLINE void -fenced_buffer_destroy_locked(struct fenced_manager *fenced_mgr, - struct fenced_buffer *fenced_buf) -{ - assert(!pipe_is_referenced(&fenced_buf->base.reference)); - - assert(!fenced_buf->fence); - assert(fenced_buf->head.prev); - assert(fenced_buf->head.next); - LIST_DEL(&fenced_buf->head); - assert(fenced_mgr->num_unfenced); - --fenced_mgr->num_unfenced; - - fenced_buffer_destroy_gpu_storage_locked(fenced_buf); - fenced_buffer_destroy_cpu_storage_locked(fenced_buf); - - FREE(fenced_buf); -} - - -/** - * Add the buffer to the fenced list. - * - * Reference count should be incremented before calling this function. - */ -static INLINE void -fenced_buffer_add_locked(struct fenced_manager *fenced_mgr, - struct fenced_buffer *fenced_buf) -{ - assert(pipe_is_referenced(&fenced_buf->base.reference)); - assert(fenced_buf->flags & PB_USAGE_GPU_READ_WRITE); - assert(fenced_buf->fence); - - p_atomic_inc(&fenced_buf->base.reference.count); - - LIST_DEL(&fenced_buf->head); - assert(fenced_mgr->num_unfenced); - --fenced_mgr->num_unfenced; - LIST_ADDTAIL(&fenced_buf->head, &fenced_mgr->fenced); - ++fenced_mgr->num_fenced; -} - - -/** - * Remove the buffer from the fenced list, and potentially destroy the buffer - * if the reference count reaches zero. - * - * Returns TRUE if the buffer was detroyed. - */ -static INLINE boolean -fenced_buffer_remove_locked(struct fenced_manager *fenced_mgr, - struct fenced_buffer *fenced_buf) -{ - struct pb_fence_ops *ops = fenced_mgr->ops; - - assert(fenced_buf->fence); - assert(fenced_buf->mgr == fenced_mgr); - - ops->fence_reference(ops, &fenced_buf->fence, NULL); - fenced_buf->flags &= ~PB_USAGE_GPU_READ_WRITE; - - assert(fenced_buf->head.prev); - assert(fenced_buf->head.next); - - LIST_DEL(&fenced_buf->head); - assert(fenced_mgr->num_fenced); - --fenced_mgr->num_fenced; - - LIST_ADDTAIL(&fenced_buf->head, &fenced_mgr->unfenced); - ++fenced_mgr->num_unfenced; - - if (p_atomic_dec_zero(&fenced_buf->base.reference.count)) { - fenced_buffer_destroy_locked(fenced_mgr, fenced_buf); - return TRUE; - } - - return FALSE; -} - - -/** - * Wait for the fence to expire, and remove it from the fenced list. - * - * This function will release and re-aquire the mutex, so any copy of mutable - * state must be discarded after calling it. - */ -static INLINE enum pipe_error -fenced_buffer_finish_locked(struct fenced_manager *fenced_mgr, - struct fenced_buffer *fenced_buf) -{ - struct pb_fence_ops *ops = fenced_mgr->ops; - enum pipe_error ret = PIPE_ERROR; - -#if 0 - debug_warning("waiting for GPU"); -#endif - - assert(pipe_is_referenced(&fenced_buf->base.reference)); - assert(fenced_buf->fence); - - if(fenced_buf->fence) { - struct pipe_fence_handle *fence = NULL; - int finished; - boolean proceed; - - ops->fence_reference(ops, &fence, fenced_buf->fence); - - pipe_mutex_unlock(fenced_mgr->mutex); - - finished = ops->fence_finish(ops, fenced_buf->fence, 0); - - pipe_mutex_lock(fenced_mgr->mutex); - - assert(pipe_is_referenced(&fenced_buf->base.reference)); - - /* - * Only proceed if the fence object didn't change in the meanwhile. - * Otherwise assume the work has been already carried out by another - * thread that re-aquired the lock before us. - */ - proceed = fence == fenced_buf->fence ? TRUE : FALSE; - - ops->fence_reference(ops, &fence, NULL); - - if(proceed && finished == 0) { - /* - * Remove from the fenced list - */ - - boolean destroyed; - - destroyed = fenced_buffer_remove_locked(fenced_mgr, fenced_buf); - - /* TODO: remove consequents buffers with the same fence? */ - - assert(!destroyed); - - fenced_buf->flags &= ~PB_USAGE_GPU_READ_WRITE; - - ret = PIPE_OK; - } - } - - return ret; -} - - -/** - * Remove as many fenced buffers from the fenced list as possible. - * - * Returns TRUE if at least one buffer was removed. - */ -static boolean -fenced_manager_check_signalled_locked(struct fenced_manager *fenced_mgr, - boolean wait) -{ - struct pb_fence_ops *ops = fenced_mgr->ops; - struct list_head *curr, *next; - struct fenced_buffer *fenced_buf; - struct pipe_fence_handle *prev_fence = NULL; - boolean ret = FALSE; - - curr = fenced_mgr->fenced.next; - next = curr->next; - while(curr != &fenced_mgr->fenced) { - fenced_buf = LIST_ENTRY(struct fenced_buffer, curr, head); - - if(fenced_buf->fence != prev_fence) { - int signaled; - - if (wait) { - signaled = ops->fence_finish(ops, fenced_buf->fence, 0); - - /* - * Don't return just now. Instead preemptively check if the - * following buffers' fences already expired, without further waits. - */ - wait = FALSE; - } - else { - signaled = ops->fence_signalled(ops, fenced_buf->fence, 0); - } - - if (signaled != 0) { - return ret; - } - - prev_fence = fenced_buf->fence; - } - else { - /* This buffer's fence object is identical to the previous buffer's - * fence object, so no need to check the fence again. - */ - assert(ops->fence_signalled(ops, fenced_buf->fence, 0) == 0); - } - - fenced_buffer_remove_locked(fenced_mgr, fenced_buf); - - ret = TRUE; - - curr = next; - next = curr->next; - } - - return ret; -} - - -/** - * Try to free some GPU memory by backing it up into CPU memory. - * - * Returns TRUE if at least one buffer was freed. - */ -static boolean -fenced_manager_free_gpu_storage_locked(struct fenced_manager *fenced_mgr) -{ - struct list_head *curr, *next; - struct fenced_buffer *fenced_buf; - - curr = fenced_mgr->unfenced.next; - next = curr->next; - while(curr != &fenced_mgr->unfenced) { - fenced_buf = LIST_ENTRY(struct fenced_buffer, curr, head); - - /* - * We can only move storage if the buffer is not mapped and not - * validated. - */ - if(fenced_buf->buffer && - !fenced_buf->mapcount && - !fenced_buf->vl) { - enum pipe_error ret; - - ret = fenced_buffer_create_cpu_storage_locked(fenced_mgr, fenced_buf); - if(ret == PIPE_OK) { - ret = fenced_buffer_copy_storage_to_cpu_locked(fenced_buf); - if(ret == PIPE_OK) { - fenced_buffer_destroy_gpu_storage_locked(fenced_buf); - return TRUE; - } - fenced_buffer_destroy_cpu_storage_locked(fenced_buf); - } - } - - curr = next; - next = curr->next; - } - - return FALSE; -} - - -/** - * Destroy CPU storage for this buffer. - */ -static void -fenced_buffer_destroy_cpu_storage_locked(struct fenced_buffer *fenced_buf) -{ - if(fenced_buf->data) { - align_free(fenced_buf->data); - fenced_buf->data = NULL; - assert(fenced_buf->mgr->cpu_total_size >= fenced_buf->size); - fenced_buf->mgr->cpu_total_size -= fenced_buf->size; - } -} - - -/** - * Create CPU storage for this buffer. - */ -static enum pipe_error -fenced_buffer_create_cpu_storage_locked(struct fenced_manager *fenced_mgr, - struct fenced_buffer *fenced_buf) -{ - assert(!fenced_buf->data); - if(fenced_buf->data) - return PIPE_OK; - - if (fenced_mgr->cpu_total_size + fenced_buf->size > fenced_mgr->max_cpu_total_size) - return PIPE_ERROR_OUT_OF_MEMORY; - - fenced_buf->data = align_malloc(fenced_buf->size, fenced_buf->desc.alignment); - if(!fenced_buf->data) - return PIPE_ERROR_OUT_OF_MEMORY; - - fenced_mgr->cpu_total_size += fenced_buf->size; - - return PIPE_OK; -} - - -/** - * Destroy the GPU storage. - */ -static void -fenced_buffer_destroy_gpu_storage_locked(struct fenced_buffer *fenced_buf) -{ - if(fenced_buf->buffer) { - pb_reference(&fenced_buf->buffer, NULL); - } -} - - -/** - * Try to create GPU storage for this buffer. - * - * This function is a shorthand around pb_manager::create_buffer for - * fenced_buffer_create_gpu_storage_locked()'s benefit. - */ -static INLINE boolean -fenced_buffer_try_create_gpu_storage_locked(struct fenced_manager *fenced_mgr, - struct fenced_buffer *fenced_buf) -{ - struct pb_manager *provider = fenced_mgr->provider; - - assert(!fenced_buf->buffer); - - fenced_buf->buffer = provider->create_buffer(fenced_mgr->provider, - fenced_buf->size, - &fenced_buf->desc); - return fenced_buf->buffer ? TRUE : FALSE; -} - - -/** - * Create GPU storage for this buffer. - */ -static enum pipe_error -fenced_buffer_create_gpu_storage_locked(struct fenced_manager *fenced_mgr, - struct fenced_buffer *fenced_buf, - boolean wait) -{ - assert(!fenced_buf->buffer); - - /* - * Check for signaled buffers before trying to allocate. - */ - fenced_manager_check_signalled_locked(fenced_mgr, FALSE); - - fenced_buffer_try_create_gpu_storage_locked(fenced_mgr, fenced_buf); - - /* - * Keep trying while there is some sort of progress: - * - fences are expiring, - * - or buffers are being being swapped out from GPU memory into CPU memory. - */ - while(!fenced_buf->buffer && - (fenced_manager_check_signalled_locked(fenced_mgr, FALSE) || - fenced_manager_free_gpu_storage_locked(fenced_mgr))) { - fenced_buffer_try_create_gpu_storage_locked(fenced_mgr, fenced_buf); - } - - if(!fenced_buf->buffer && wait) { - /* - * Same as before, but this time around, wait to free buffers if - * necessary. - */ - while(!fenced_buf->buffer && - (fenced_manager_check_signalled_locked(fenced_mgr, TRUE) || - fenced_manager_free_gpu_storage_locked(fenced_mgr))) { - fenced_buffer_try_create_gpu_storage_locked(fenced_mgr, fenced_buf); - } - } - - if(!fenced_buf->buffer) { - if(0) - fenced_manager_dump_locked(fenced_mgr); - - /* give up */ - return PIPE_ERROR_OUT_OF_MEMORY; - } - - return PIPE_OK; -} - - -static enum pipe_error -fenced_buffer_copy_storage_to_gpu_locked(struct fenced_buffer *fenced_buf) -{ - uint8_t *map; - - assert(fenced_buf->data); - assert(fenced_buf->buffer); - - map = pb_map(fenced_buf->buffer, PB_USAGE_CPU_WRITE, NULL); - if(!map) - return PIPE_ERROR; - - memcpy(map, fenced_buf->data, fenced_buf->size); - - pb_unmap(fenced_buf->buffer); - - return PIPE_OK; -} - - -static enum pipe_error -fenced_buffer_copy_storage_to_cpu_locked(struct fenced_buffer *fenced_buf) -{ - const uint8_t *map; - - assert(fenced_buf->data); - assert(fenced_buf->buffer); - - map = pb_map(fenced_buf->buffer, PB_USAGE_CPU_READ, NULL); - if(!map) - return PIPE_ERROR; - - memcpy(fenced_buf->data, map, fenced_buf->size); - - pb_unmap(fenced_buf->buffer); - - return PIPE_OK; -} - - -static void -fenced_buffer_destroy(struct pb_buffer *buf) -{ - struct fenced_buffer *fenced_buf = fenced_buffer(buf); - struct fenced_manager *fenced_mgr = fenced_buf->mgr; - - assert(!pipe_is_referenced(&fenced_buf->base.reference)); - - pipe_mutex_lock(fenced_mgr->mutex); - - fenced_buffer_destroy_locked(fenced_mgr, fenced_buf); - - pipe_mutex_unlock(fenced_mgr->mutex); -} - - -static void * -fenced_buffer_map(struct pb_buffer *buf, - unsigned flags, void *flush_ctx) -{ - struct fenced_buffer *fenced_buf = fenced_buffer(buf); - struct fenced_manager *fenced_mgr = fenced_buf->mgr; - struct pb_fence_ops *ops = fenced_mgr->ops; - void *map = NULL; - - pipe_mutex_lock(fenced_mgr->mutex); - - assert(!(flags & PB_USAGE_GPU_READ_WRITE)); - - /* - * Serialize writes. - */ - while((fenced_buf->flags & PB_USAGE_GPU_WRITE) || - ((fenced_buf->flags & PB_USAGE_GPU_READ) && - (flags & PB_USAGE_CPU_WRITE))) { - - /* - * Don't wait for the GPU to finish accessing it, if blocking is forbidden. - */ - if((flags & PB_USAGE_DONTBLOCK) && - ops->fence_signalled(ops, fenced_buf->fence, 0) != 0) { - goto done; - } - - if (flags & PB_USAGE_UNSYNCHRONIZED) { - break; - } - - /* - * Wait for the GPU to finish accessing. This will release and re-acquire - * the mutex, so all copies of mutable state must be discarded. - */ - fenced_buffer_finish_locked(fenced_mgr, fenced_buf); - } - - if(fenced_buf->buffer) { - map = pb_map(fenced_buf->buffer, flags, flush_ctx); - } - else { - assert(fenced_buf->data); - map = fenced_buf->data; - } - - if(map) { - ++fenced_buf->mapcount; - fenced_buf->flags |= flags & PB_USAGE_CPU_READ_WRITE; - } - -done: - pipe_mutex_unlock(fenced_mgr->mutex); - - return map; -} - - -static void -fenced_buffer_unmap(struct pb_buffer *buf) -{ - struct fenced_buffer *fenced_buf = fenced_buffer(buf); - struct fenced_manager *fenced_mgr = fenced_buf->mgr; - - pipe_mutex_lock(fenced_mgr->mutex); - - assert(fenced_buf->mapcount); - if(fenced_buf->mapcount) { - if (fenced_buf->buffer) - pb_unmap(fenced_buf->buffer); - --fenced_buf->mapcount; - if(!fenced_buf->mapcount) - fenced_buf->flags &= ~PB_USAGE_CPU_READ_WRITE; - } - - pipe_mutex_unlock(fenced_mgr->mutex); -} - - -static enum pipe_error -fenced_buffer_validate(struct pb_buffer *buf, - struct pb_validate *vl, - unsigned flags) -{ - struct fenced_buffer *fenced_buf = fenced_buffer(buf); - struct fenced_manager *fenced_mgr = fenced_buf->mgr; - enum pipe_error ret; - - pipe_mutex_lock(fenced_mgr->mutex); - - if(!vl) { - /* invalidate */ - fenced_buf->vl = NULL; - fenced_buf->validation_flags = 0; - ret = PIPE_OK; - goto done; - } - - assert(flags & PB_USAGE_GPU_READ_WRITE); - assert(!(flags & ~PB_USAGE_GPU_READ_WRITE)); - flags &= PB_USAGE_GPU_READ_WRITE; - - /* Buffer cannot be validated in two different lists */ - if(fenced_buf->vl && fenced_buf->vl != vl) { - ret = PIPE_ERROR_RETRY; - goto done; - } - - if(fenced_buf->vl == vl && - (fenced_buf->validation_flags & flags) == flags) { - /* Nothing to do -- buffer already validated */ - ret = PIPE_OK; - goto done; - } - - /* - * Create and update GPU storage. - */ - if(!fenced_buf->buffer) { - assert(!fenced_buf->mapcount); - - ret = fenced_buffer_create_gpu_storage_locked(fenced_mgr, fenced_buf, TRUE); - if(ret != PIPE_OK) { - goto done; - } - - ret = fenced_buffer_copy_storage_to_gpu_locked(fenced_buf); - if(ret != PIPE_OK) { - fenced_buffer_destroy_gpu_storage_locked(fenced_buf); - goto done; - } - - if(fenced_buf->mapcount) { - debug_printf("warning: validating a buffer while it is still mapped\n"); - } - else { - fenced_buffer_destroy_cpu_storage_locked(fenced_buf); - } - } - - ret = pb_validate(fenced_buf->buffer, vl, flags); - if (ret != PIPE_OK) - goto done; - - fenced_buf->vl = vl; - fenced_buf->validation_flags |= flags; - -done: - pipe_mutex_unlock(fenced_mgr->mutex); - - return ret; -} - - -static void -fenced_buffer_fence(struct pb_buffer *buf, - struct pipe_fence_handle *fence) -{ - struct fenced_buffer *fenced_buf = fenced_buffer(buf); - struct fenced_manager *fenced_mgr = fenced_buf->mgr; - struct pb_fence_ops *ops = fenced_mgr->ops; - - pipe_mutex_lock(fenced_mgr->mutex); - - assert(pipe_is_referenced(&fenced_buf->base.reference)); - assert(fenced_buf->buffer); - - if(fence != fenced_buf->fence) { - assert(fenced_buf->vl); - assert(fenced_buf->validation_flags); - - if (fenced_buf->fence) { - boolean destroyed; - destroyed = fenced_buffer_remove_locked(fenced_mgr, fenced_buf); - assert(!destroyed); - } - if (fence) { - ops->fence_reference(ops, &fenced_buf->fence, fence); - fenced_buf->flags |= fenced_buf->validation_flags; - fenced_buffer_add_locked(fenced_mgr, fenced_buf); - } - - pb_fence(fenced_buf->buffer, fence); - - fenced_buf->vl = NULL; - fenced_buf->validation_flags = 0; - } - - pipe_mutex_unlock(fenced_mgr->mutex); -} - - -static void -fenced_buffer_get_base_buffer(struct pb_buffer *buf, - struct pb_buffer **base_buf, - pb_size *offset) -{ - struct fenced_buffer *fenced_buf = fenced_buffer(buf); - struct fenced_manager *fenced_mgr = fenced_buf->mgr; - - pipe_mutex_lock(fenced_mgr->mutex); - - /* - * This should only be called when the buffer is validated. Typically - * when processing relocations. - */ - assert(fenced_buf->vl); - assert(fenced_buf->buffer); - - if(fenced_buf->buffer) - pb_get_base_buffer(fenced_buf->buffer, base_buf, offset); - else { - *base_buf = buf; - *offset = 0; - } - - pipe_mutex_unlock(fenced_mgr->mutex); -} - - -static const struct pb_vtbl -fenced_buffer_vtbl = { - fenced_buffer_destroy, - fenced_buffer_map, - fenced_buffer_unmap, - fenced_buffer_validate, - fenced_buffer_fence, - fenced_buffer_get_base_buffer -}; - - -/** - * Wrap a buffer in a fenced buffer. - */ -static struct pb_buffer * -fenced_bufmgr_create_buffer(struct pb_manager *mgr, - pb_size size, - const struct pb_desc *desc) -{ - struct fenced_manager *fenced_mgr = fenced_manager(mgr); - struct fenced_buffer *fenced_buf; - enum pipe_error ret; - - /* - * Don't stall the GPU, waste time evicting buffers, or waste memory - * trying to create a buffer that will most likely never fit into the - * graphics aperture. - */ - if(size > fenced_mgr->max_buffer_size) { - goto no_buffer; - } - - fenced_buf = CALLOC_STRUCT(fenced_buffer); - if(!fenced_buf) - goto no_buffer; - - pipe_reference_init(&fenced_buf->base.reference, 1); - fenced_buf->base.alignment = desc->alignment; - fenced_buf->base.usage = desc->usage; - fenced_buf->base.size = size; - fenced_buf->size = size; - fenced_buf->desc = *desc; - - fenced_buf->base.vtbl = &fenced_buffer_vtbl; - fenced_buf->mgr = fenced_mgr; - - pipe_mutex_lock(fenced_mgr->mutex); - - /* - * Try to create GPU storage without stalling, - */ - ret = fenced_buffer_create_gpu_storage_locked(fenced_mgr, fenced_buf, FALSE); - - /* - * Attempt to use CPU memory to avoid stalling the GPU. - */ - if(ret != PIPE_OK) { - ret = fenced_buffer_create_cpu_storage_locked(fenced_mgr, fenced_buf); - } - - /* - * Create GPU storage, waiting for some to be available. - */ - if(ret != PIPE_OK) { - ret = fenced_buffer_create_gpu_storage_locked(fenced_mgr, fenced_buf, TRUE); - } - - /* - * Give up. - */ - if(ret != PIPE_OK) { - goto no_storage; - } - - assert(fenced_buf->buffer || fenced_buf->data); - - LIST_ADDTAIL(&fenced_buf->head, &fenced_mgr->unfenced); - ++fenced_mgr->num_unfenced; - pipe_mutex_unlock(fenced_mgr->mutex); - - return &fenced_buf->base; - -no_storage: - pipe_mutex_unlock(fenced_mgr->mutex); - FREE(fenced_buf); -no_buffer: - return NULL; -} - - -static void -fenced_bufmgr_flush(struct pb_manager *mgr) -{ - struct fenced_manager *fenced_mgr = fenced_manager(mgr); - - pipe_mutex_lock(fenced_mgr->mutex); - while(fenced_manager_check_signalled_locked(fenced_mgr, TRUE)) - ; - pipe_mutex_unlock(fenced_mgr->mutex); - - assert(fenced_mgr->provider->flush); - if(fenced_mgr->provider->flush) - fenced_mgr->provider->flush(fenced_mgr->provider); -} - - -static void -fenced_bufmgr_destroy(struct pb_manager *mgr) -{ - struct fenced_manager *fenced_mgr = fenced_manager(mgr); - - pipe_mutex_lock(fenced_mgr->mutex); - - /* Wait on outstanding fences */ - while (fenced_mgr->num_fenced) { - pipe_mutex_unlock(fenced_mgr->mutex); -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) - sched_yield(); -#endif - pipe_mutex_lock(fenced_mgr->mutex); - while(fenced_manager_check_signalled_locked(fenced_mgr, TRUE)) - ; - } - -#ifdef DEBUG - /*assert(!fenced_mgr->num_unfenced);*/ -#endif - - pipe_mutex_unlock(fenced_mgr->mutex); - pipe_mutex_destroy(fenced_mgr->mutex); - - if(fenced_mgr->provider) - fenced_mgr->provider->destroy(fenced_mgr->provider); - - fenced_mgr->ops->destroy(fenced_mgr->ops); - - FREE(fenced_mgr); -} - - -struct pb_manager * -fenced_bufmgr_create(struct pb_manager *provider, - struct pb_fence_ops *ops, - pb_size max_buffer_size, - pb_size max_cpu_total_size) -{ - struct fenced_manager *fenced_mgr; - - if(!provider) - return NULL; - - fenced_mgr = CALLOC_STRUCT(fenced_manager); - if (!fenced_mgr) - return NULL; - - fenced_mgr->base.destroy = fenced_bufmgr_destroy; - fenced_mgr->base.create_buffer = fenced_bufmgr_create_buffer; - fenced_mgr->base.flush = fenced_bufmgr_flush; - - fenced_mgr->provider = provider; - fenced_mgr->ops = ops; - fenced_mgr->max_buffer_size = max_buffer_size; - fenced_mgr->max_cpu_total_size = max_cpu_total_size; - - LIST_INITHEAD(&fenced_mgr->fenced); - fenced_mgr->num_fenced = 0; - - LIST_INITHEAD(&fenced_mgr->unfenced); - fenced_mgr->num_unfenced = 0; - - pipe_mutex_init(fenced_mgr->mutex); - - return &fenced_mgr->base; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h b/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h deleted file mode 100644 index 004c2b939a2..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.h +++ /dev/null @@ -1,104 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \file - * Buffer fencing. - * - * "Fenced buffers" is actually a misnomer. They should be referred as - * "fenceable buffers", i.e, buffers that can be fenced, but I couldn't find - * the word "fenceable" in the dictionary. - * - * A "fenced buffer" is a decorator around a normal buffer, which adds two - * special properties: - * - the ability for the destruction to be delayed by a fence; - * - reference counting. - * - * Usually DMA buffers have a life-time that will extend the life-time of its - * handle. The end-of-life is dictated by the fence signalling. - * - * Between the handle's destruction, and the fence signalling, the buffer is - * stored in a fenced buffer list. - * - * \author Jose Fonseca - */ - -#ifndef PB_BUFFER_FENCED_H_ -#define PB_BUFFER_FENCED_H_ - - -#include "util/u_debug.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -struct pipe_fence_handle; - - -/** - * List of buffers which are awaiting fence signalling. - */ -struct fenced_buffer_list; - - -struct pb_fence_ops -{ - void (*destroy)( struct pb_fence_ops *ops ); - - /** Set ptr = fence, with reference counting */ - void (*fence_reference)( struct pb_fence_ops *ops, - struct pipe_fence_handle **ptr, - struct pipe_fence_handle *fence ); - - /** - * Checks whether the fence has been signalled. - * \param flags driver-specific meaning - * \return zero on success. - */ - int (*fence_signalled)( struct pb_fence_ops *ops, - struct pipe_fence_handle *fence, - unsigned flag ); - - /** - * Wait for the fence to finish. - * \param flags driver-specific meaning - * \return zero on success. - */ - int (*fence_finish)( struct pb_fence_ops *ops, - struct pipe_fence_handle *fence, - unsigned flag ); -}; - - -#ifdef __cplusplus -} -#endif - -#endif /*PB_BUFFER_FENCED_H_*/ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c b/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c deleted file mode 100644 index b106a1a0279..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_buffer_malloc.c +++ /dev/null @@ -1,198 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \file - * Implementation of malloc-based buffers to store data that can't be processed - * by the hardware. - * - * \author Jose Fonseca - */ - - -#include "util/u_debug.h" -#include "util/u_memory.h" -#include "pb_buffer.h" -#include "pb_bufmgr.h" - - -struct malloc_buffer -{ - struct pb_buffer base; - void *data; -}; - - -extern const struct pb_vtbl malloc_buffer_vtbl; - -static INLINE struct malloc_buffer * -malloc_buffer(struct pb_buffer *buf) -{ - assert(buf); - if (!buf) - return NULL; - assert(buf->vtbl == &malloc_buffer_vtbl); - return (struct malloc_buffer *)buf; -} - - -static void -malloc_buffer_destroy(struct pb_buffer *buf) -{ - align_free(malloc_buffer(buf)->data); - FREE(buf); -} - - -static void * -malloc_buffer_map(struct pb_buffer *buf, - unsigned flags, - void *flush_ctx) -{ - return malloc_buffer(buf)->data; -} - - -static void -malloc_buffer_unmap(struct pb_buffer *buf) -{ - /* No-op */ -} - - -static enum pipe_error -malloc_buffer_validate(struct pb_buffer *buf, - struct pb_validate *vl, - unsigned flags) -{ - assert(0); - return PIPE_ERROR; -} - - -static void -malloc_buffer_fence(struct pb_buffer *buf, - struct pipe_fence_handle *fence) -{ - assert(0); -} - - -static void -malloc_buffer_get_base_buffer(struct pb_buffer *buf, - struct pb_buffer **base_buf, - pb_size *offset) -{ - *base_buf = buf; - *offset = 0; -} - - -const struct pb_vtbl -malloc_buffer_vtbl = { - malloc_buffer_destroy, - malloc_buffer_map, - malloc_buffer_unmap, - malloc_buffer_validate, - malloc_buffer_fence, - malloc_buffer_get_base_buffer -}; - - -struct pb_buffer * -pb_malloc_buffer_create(pb_size size, - const struct pb_desc *desc) -{ - struct malloc_buffer *buf; - - /* TODO: do a single allocation */ - - buf = CALLOC_STRUCT(malloc_buffer); - if(!buf) - return NULL; - - pipe_reference_init(&buf->base.reference, 1); - buf->base.usage = desc->usage; - buf->base.size = size; - buf->base.alignment = desc->alignment; - buf->base.vtbl = &malloc_buffer_vtbl; - - buf->data = align_malloc(size, desc->alignment < sizeof(void*) ? sizeof(void*) : desc->alignment); - if(!buf->data) { - FREE(buf); - return NULL; - } - - return &buf->base; -} - - -static struct pb_buffer * -pb_malloc_bufmgr_create_buffer(struct pb_manager *mgr, - pb_size size, - const struct pb_desc *desc) -{ - return pb_malloc_buffer_create(size, desc); -} - - -static void -pb_malloc_bufmgr_flush(struct pb_manager *mgr) -{ - /* No-op */ -} - - -static void -pb_malloc_bufmgr_destroy(struct pb_manager *mgr) -{ - /* No-op */ -} - - -static boolean -pb_malloc_bufmgr_is_buffer_busy( struct pb_manager *mgr, - struct pb_buffer *buf ) -{ - return FALSE; -} - - -static struct pb_manager -pb_malloc_bufmgr = { - pb_malloc_bufmgr_destroy, - pb_malloc_bufmgr_create_buffer, - pb_malloc_bufmgr_flush, - pb_malloc_bufmgr_is_buffer_busy -}; - - -struct pb_manager * -pb_malloc_bufmgr_create(void) -{ - return &pb_malloc_bufmgr; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h b/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h deleted file mode 100644 index 960068c494d..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr.h +++ /dev/null @@ -1,218 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \file - * Buffer management. - * - * A buffer manager does only one basic thing: it creates buffers. Actually, - * "buffer factory" would probably a more accurate description. - * - * You can chain buffer managers so that you can have a finer grained memory - * management and pooling. - * - * For example, for a simple batch buffer manager you would chain: - * - the native buffer manager, which provides DMA memory from the graphics - * memory space; - * - the pool buffer manager, which keep around a pool of equally sized buffers - * to avoid latency associated with the native buffer manager; - * - the fenced buffer manager, which will delay buffer destruction until the - * the moment the card finishing processing it. - * - * \author Jose Fonseca - */ - -#ifndef PB_BUFMGR_H_ -#define PB_BUFMGR_H_ - - -#include "pb_buffer.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -struct pb_desc; - - -/** - * Abstract base class for all buffer managers. - */ -struct pb_manager -{ - void - (*destroy)( struct pb_manager *mgr ); - - struct pb_buffer * - (*create_buffer)( struct pb_manager *mgr, - pb_size size, - const struct pb_desc *desc); - - /** - * Flush all temporary-held buffers. - * - * Used mostly to aid debugging memory issues or to clean up resources when - * the drivers are long lived. - */ - void - (*flush)( struct pb_manager *mgr ); - - boolean - (*is_buffer_busy)( struct pb_manager *mgr, - struct pb_buffer *buf ); -}; - - -/** - * Malloc buffer provider. - * - * Simple wrapper around pb_malloc_buffer_create for convenience. - */ -struct pb_manager * -pb_malloc_bufmgr_create(void); - - -/** - * Static buffer pool sub-allocator. - * - * Manages the allocation of equally sized buffers. It does so by allocating - * a single big buffer and divide it equally sized buffers. - * - * It is meant to manage the allocation of batch buffer pools. - */ -struct pb_manager * -pool_bufmgr_create(struct pb_manager *provider, - pb_size n, pb_size size, - const struct pb_desc *desc); - - -/** - * Static sub-allocator based the old memory manager. - * - * It managers buffers of different sizes. It does so by allocating a buffer - * with the size of the heap, and then using the old mm memory manager to manage - * that heap. - */ -struct pb_manager * -mm_bufmgr_create(struct pb_manager *provider, - pb_size size, pb_size align2); - -/** - * Same as mm_bufmgr_create. - * - * Buffer will be release when the manager is destroyed. - */ -struct pb_manager * -mm_bufmgr_create_from_buffer(struct pb_buffer *buffer, - pb_size size, pb_size align2); - - -/** - * Slab sub-allocator. - */ -struct pb_manager * -pb_slab_manager_create(struct pb_manager *provider, - pb_size bufSize, - pb_size slabSize, - const struct pb_desc *desc); - -/** - * Allow a range of buffer size, by aggregating multiple slabs sub-allocators - * with different bucket sizes. - */ -struct pb_manager * -pb_slab_range_manager_create(struct pb_manager *provider, - pb_size minBufSize, - pb_size maxBufSize, - pb_size slabSize, - const struct pb_desc *desc); - - -/** - * Time-based buffer cache. - * - * This manager keeps a cache of destroyed buffers during a time interval. - */ -struct pb_manager * -pb_cache_manager_create(struct pb_manager *provider, - unsigned usecs); - - -struct pb_fence_ops; - -/** - * Fenced buffer manager. - * - * This manager is just meant for convenience. It wraps the buffers returned - * by another manager in fenced buffers, so that - * - * NOTE: the buffer manager that provides the buffers will be destroyed - * at the same time. - */ -struct pb_manager * -fenced_bufmgr_create(struct pb_manager *provider, - struct pb_fence_ops *ops, - pb_size max_buffer_size, - pb_size max_cpu_total_size); - - -struct pb_manager * -pb_alt_manager_create(struct pb_manager *provider1, - struct pb_manager *provider2); - - -/** - * Ondemand buffer manager. - * - * Buffers are created in malloc'ed memory (fast and cached), and the constents - * is transfered to a buffer from the provider (typically in slow uncached - * memory) when there is an attempt to validate the buffer. - * - * Ideal for situations where one does not know before hand whether a given - * buffer will effectively be used by the hardware or not. - */ -struct pb_manager * -pb_ondemand_manager_create(struct pb_manager *provider); - - -/** - * Debug buffer manager to detect buffer under- and overflows. - * - * Under/overflow sizes should be a multiple of the largest alignment - */ -struct pb_manager * -pb_debug_manager_create(struct pb_manager *provider, - pb_size underflow_size, pb_size overflow_size); - - -#ifdef __cplusplus -} -#endif - -#endif /*PB_BUFMGR_H_*/ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_alt.c b/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_alt.c deleted file mode 100644 index f60c836f18b..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_alt.c +++ /dev/null @@ -1,120 +0,0 @@ -/************************************************************************** - * - * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \file - * Allocate buffers from two alternative buffer providers. - * - * \author Jose Fonseca - */ - - -#include "pipe/p_compiler.h" -#include "util/u_debug.h" -#include "util/u_memory.h" - -#include "pb_buffer.h" -#include "pb_bufmgr.h" - - -struct pb_alt_manager -{ - struct pb_manager base; - - struct pb_manager *provider1; - struct pb_manager *provider2; -}; - - -static INLINE struct pb_alt_manager * -pb_alt_manager(struct pb_manager *mgr) -{ - assert(mgr); - return (struct pb_alt_manager *)mgr; -} - - -static struct pb_buffer * -pb_alt_manager_create_buffer(struct pb_manager *_mgr, - pb_size size, - const struct pb_desc *desc) -{ - struct pb_alt_manager *mgr = pb_alt_manager(_mgr); - struct pb_buffer *buf; - - buf = mgr->provider1->create_buffer(mgr->provider1, size, desc); - if(buf) - return buf; - - buf = mgr->provider2->create_buffer(mgr->provider2, size, desc); - return buf; -} - - -static void -pb_alt_manager_flush(struct pb_manager *_mgr) -{ - struct pb_alt_manager *mgr = pb_alt_manager(_mgr); - - assert(mgr->provider1->flush); - if(mgr->provider1->flush) - mgr->provider1->flush(mgr->provider1); - - assert(mgr->provider2->flush); - if(mgr->provider2->flush) - mgr->provider2->flush(mgr->provider2); -} - - -static void -pb_alt_manager_destroy(struct pb_manager *mgr) -{ - FREE(mgr); -} - - -struct pb_manager * -pb_alt_manager_create(struct pb_manager *provider1, - struct pb_manager *provider2) -{ - struct pb_alt_manager *mgr; - - if(!provider1 || !provider2) - return NULL; - - mgr = CALLOC_STRUCT(pb_alt_manager); - if (!mgr) - return NULL; - - mgr->base.destroy = pb_alt_manager_destroy; - mgr->base.create_buffer = pb_alt_manager_create_buffer; - mgr->base.flush = pb_alt_manager_flush; - mgr->provider1 = provider1; - mgr->provider2 = provider2; - - return &mgr->base; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c b/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c deleted file mode 100644 index 0e6896afd0a..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c +++ /dev/null @@ -1,411 +0,0 @@ -/************************************************************************** - * - * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \file - * Buffer cache. - * - * \author Jose Fonseca - * \author Thomas Hellström - */ - - -#include "pipe/p_compiler.h" -#include "util/u_debug.h" -#include "os/os_thread.h" -#include "util/u_memory.h" -#include "util/u_double_list.h" -#include "util/u_time.h" - -#include "pb_buffer.h" -#include "pb_bufmgr.h" - - -/** - * Convenience macro (type safe). - */ -#define SUPER(__derived) (&(__derived)->base) - - -struct pb_cache_manager; - - -/** - * Wrapper around a pipe buffer which adds delayed destruction. - */ -struct pb_cache_buffer -{ - struct pb_buffer base; - - struct pb_buffer *buffer; - struct pb_cache_manager *mgr; - - /** Caching time interval */ - int64_t start, end; - - struct list_head head; -}; - - -struct pb_cache_manager -{ - struct pb_manager base; - - struct pb_manager *provider; - unsigned usecs; - - pipe_mutex mutex; - - struct list_head delayed; - pb_size numDelayed; -}; - - -static INLINE struct pb_cache_buffer * -pb_cache_buffer(struct pb_buffer *buf) -{ - assert(buf); - return (struct pb_cache_buffer *)buf; -} - - -static INLINE struct pb_cache_manager * -pb_cache_manager(struct pb_manager *mgr) -{ - assert(mgr); - return (struct pb_cache_manager *)mgr; -} - - -/** - * Actually destroy the buffer. - */ -static INLINE void -_pb_cache_buffer_destroy(struct pb_cache_buffer *buf) -{ - struct pb_cache_manager *mgr = buf->mgr; - - LIST_DEL(&buf->head); - assert(mgr->numDelayed); - --mgr->numDelayed; - assert(!pipe_is_referenced(&buf->base.reference)); - pb_reference(&buf->buffer, NULL); - FREE(buf); -} - - -/** - * Free as many cache buffers from the list head as possible. - */ -static void -_pb_cache_buffer_list_check_free(struct pb_cache_manager *mgr) -{ - struct list_head *curr, *next; - struct pb_cache_buffer *buf; - int64_t now; - - now = os_time_get(); - - curr = mgr->delayed.next; - next = curr->next; - while(curr != &mgr->delayed) { - buf = LIST_ENTRY(struct pb_cache_buffer, curr, head); - - if(!os_time_timeout(buf->start, buf->end, now)) - break; - - _pb_cache_buffer_destroy(buf); - - curr = next; - next = curr->next; - } -} - - -static void -pb_cache_buffer_destroy(struct pb_buffer *_buf) -{ - struct pb_cache_buffer *buf = pb_cache_buffer(_buf); - struct pb_cache_manager *mgr = buf->mgr; - - pipe_mutex_lock(mgr->mutex); - assert(!pipe_is_referenced(&buf->base.reference)); - - _pb_cache_buffer_list_check_free(mgr); - - buf->start = os_time_get(); - buf->end = buf->start + mgr->usecs; - LIST_ADDTAIL(&buf->head, &mgr->delayed); - ++mgr->numDelayed; - pipe_mutex_unlock(mgr->mutex); -} - - -static void * -pb_cache_buffer_map(struct pb_buffer *_buf, - unsigned flags, void *flush_ctx) -{ - struct pb_cache_buffer *buf = pb_cache_buffer(_buf); - return pb_map(buf->buffer, flags, flush_ctx); -} - - -static void -pb_cache_buffer_unmap(struct pb_buffer *_buf) -{ - struct pb_cache_buffer *buf = pb_cache_buffer(_buf); - pb_unmap(buf->buffer); -} - - -static enum pipe_error -pb_cache_buffer_validate(struct pb_buffer *_buf, - struct pb_validate *vl, - unsigned flags) -{ - struct pb_cache_buffer *buf = pb_cache_buffer(_buf); - return pb_validate(buf->buffer, vl, flags); -} - - -static void -pb_cache_buffer_fence(struct pb_buffer *_buf, - struct pipe_fence_handle *fence) -{ - struct pb_cache_buffer *buf = pb_cache_buffer(_buf); - pb_fence(buf->buffer, fence); -} - - -static void -pb_cache_buffer_get_base_buffer(struct pb_buffer *_buf, - struct pb_buffer **base_buf, - pb_size *offset) -{ - struct pb_cache_buffer *buf = pb_cache_buffer(_buf); - pb_get_base_buffer(buf->buffer, base_buf, offset); -} - - -const struct pb_vtbl -pb_cache_buffer_vtbl = { - pb_cache_buffer_destroy, - pb_cache_buffer_map, - pb_cache_buffer_unmap, - pb_cache_buffer_validate, - pb_cache_buffer_fence, - pb_cache_buffer_get_base_buffer -}; - - -static INLINE int -pb_cache_is_buffer_compat(struct pb_cache_buffer *buf, - pb_size size, - const struct pb_desc *desc) -{ - if(buf->base.size < size) - return 0; - - /* be lenient with size */ - if(buf->base.size >= 2*size) - return 0; - - if(!pb_check_alignment(desc->alignment, buf->base.alignment)) - return 0; - - if(!pb_check_usage(desc->usage, buf->base.usage)) - return 0; - - if (buf->mgr->provider->is_buffer_busy) { - if (buf->mgr->provider->is_buffer_busy(buf->mgr->provider, buf->buffer)) - return -1; - } else { - void *ptr = pb_map(buf->buffer, PB_USAGE_DONTBLOCK, NULL); - - if (!ptr) - return -1; - - pb_unmap(buf->buffer); - } - - return 1; -} - - -static struct pb_buffer * -pb_cache_manager_create_buffer(struct pb_manager *_mgr, - pb_size size, - const struct pb_desc *desc) -{ - struct pb_cache_manager *mgr = pb_cache_manager(_mgr); - struct pb_cache_buffer *buf; - struct pb_cache_buffer *curr_buf; - struct list_head *curr, *next; - int64_t now; - int ret = 0; - - pipe_mutex_lock(mgr->mutex); - - buf = NULL; - curr = mgr->delayed.next; - next = curr->next; - - /* search in the expired buffers, freeing them in the process */ - now = os_time_get(); - while(curr != &mgr->delayed) { - curr_buf = LIST_ENTRY(struct pb_cache_buffer, curr, head); - if(!buf && (ret = pb_cache_is_buffer_compat(curr_buf, size, desc) > 0)) - buf = curr_buf; - else if(os_time_timeout(curr_buf->start, curr_buf->end, now)) - _pb_cache_buffer_destroy(curr_buf); - else - /* This buffer (and all hereafter) are still hot in cache */ - break; - if (ret == -1) - break; - curr = next; - next = curr->next; - } - - /* keep searching in the hot buffers */ - if(!buf && ret != -1) { - while(curr != &mgr->delayed) { - curr_buf = LIST_ENTRY(struct pb_cache_buffer, curr, head); - ret = pb_cache_is_buffer_compat(curr_buf, size, desc); - if (ret > 0) { - buf = curr_buf; - break; - } - if (ret == -1) - break; - /* no need to check the timeout here */ - curr = next; - next = curr->next; - } - } - - if(buf) { - LIST_DEL(&buf->head); - --mgr->numDelayed; - pipe_mutex_unlock(mgr->mutex); - /* Increase refcount */ - pipe_reference_init(&buf->base.reference, 1); - return &buf->base; - } - - pipe_mutex_unlock(mgr->mutex); - - buf = CALLOC_STRUCT(pb_cache_buffer); - if(!buf) - return NULL; - - buf->buffer = mgr->provider->create_buffer(mgr->provider, size, desc); - - /* Empty the cache and try again. */ - if (!buf->buffer) { - mgr->base.flush(&mgr->base); - buf->buffer = mgr->provider->create_buffer(mgr->provider, size, desc); - } - - if(!buf->buffer) { - FREE(buf); - return NULL; - } - - assert(pipe_is_referenced(&buf->buffer->reference)); - assert(pb_check_alignment(desc->alignment, buf->buffer->alignment)); - assert(pb_check_usage(desc->usage, buf->buffer->usage)); - assert(buf->buffer->size >= size); - - pipe_reference_init(&buf->base.reference, 1); - buf->base.alignment = buf->buffer->alignment; - buf->base.usage = buf->buffer->usage; - buf->base.size = buf->buffer->size; - - buf->base.vtbl = &pb_cache_buffer_vtbl; - buf->mgr = mgr; - - return &buf->base; -} - - -static void -pb_cache_manager_flush(struct pb_manager *_mgr) -{ - struct pb_cache_manager *mgr = pb_cache_manager(_mgr); - struct list_head *curr, *next; - struct pb_cache_buffer *buf; - - pipe_mutex_lock(mgr->mutex); - curr = mgr->delayed.next; - next = curr->next; - while(curr != &mgr->delayed) { - buf = LIST_ENTRY(struct pb_cache_buffer, curr, head); - _pb_cache_buffer_destroy(buf); - curr = next; - next = curr->next; - } - pipe_mutex_unlock(mgr->mutex); - - assert(mgr->provider->flush); - if(mgr->provider->flush) - mgr->provider->flush(mgr->provider); -} - - -static void -pb_cache_manager_destroy(struct pb_manager *mgr) -{ - pb_cache_manager_flush(mgr); - FREE(mgr); -} - - -struct pb_manager * -pb_cache_manager_create(struct pb_manager *provider, - unsigned usecs) -{ - struct pb_cache_manager *mgr; - - if(!provider) - return NULL; - - mgr = CALLOC_STRUCT(pb_cache_manager); - if (!mgr) - return NULL; - - mgr->base.destroy = pb_cache_manager_destroy; - mgr->base.create_buffer = pb_cache_manager_create_buffer; - mgr->base.flush = pb_cache_manager_flush; - mgr->provider = provider; - mgr->usecs = usecs; - LIST_INITHEAD(&mgr->delayed); - mgr->numDelayed = 0; - pipe_mutex_init(mgr->mutex); - - return &mgr->base; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c b/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c deleted file mode 100644 index 2ea63d6cc79..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c +++ /dev/null @@ -1,496 +0,0 @@ -/************************************************************************** - * - * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \file - * Debug buffer manager to detect buffer under- and overflows. - * - * \author Jose Fonseca - */ - - -#include "pipe/p_compiler.h" -#include "util/u_debug.h" -#include "os/os_thread.h" -#include "util/u_math.h" -#include "util/u_memory.h" -#include "util/u_double_list.h" -#include "util/u_time.h" -#include "util/u_debug_stack.h" - -#include "pb_buffer.h" -#include "pb_bufmgr.h" - - -#ifdef DEBUG - - -#define PB_DEBUG_CREATE_BACKTRACE 8 -#define PB_DEBUG_MAP_BACKTRACE 8 - - -/** - * Convenience macro (type safe). - */ -#define SUPER(__derived) (&(__derived)->base) - - -struct pb_debug_manager; - - -/** - * Wrapper around a pipe buffer which adds delayed destruction. - */ -struct pb_debug_buffer -{ - struct pb_buffer base; - - struct pb_buffer *buffer; - struct pb_debug_manager *mgr; - - pb_size underflow_size; - pb_size overflow_size; - - struct debug_stack_frame create_backtrace[PB_DEBUG_CREATE_BACKTRACE]; - - pipe_mutex mutex; - unsigned map_count; - struct debug_stack_frame map_backtrace[PB_DEBUG_MAP_BACKTRACE]; - - struct list_head head; -}; - - -struct pb_debug_manager -{ - struct pb_manager base; - - struct pb_manager *provider; - - pb_size underflow_size; - pb_size overflow_size; - - pipe_mutex mutex; - struct list_head list; -}; - - -static INLINE struct pb_debug_buffer * -pb_debug_buffer(struct pb_buffer *buf) -{ - assert(buf); - return (struct pb_debug_buffer *)buf; -} - - -static INLINE struct pb_debug_manager * -pb_debug_manager(struct pb_manager *mgr) -{ - assert(mgr); - return (struct pb_debug_manager *)mgr; -} - - -static const uint8_t random_pattern[32] = { - 0xaf, 0xcf, 0xa5, 0xa2, 0xc2, 0x63, 0x15, 0x1a, - 0x7e, 0xe2, 0x7e, 0x84, 0x15, 0x49, 0xa2, 0x1e, - 0x49, 0x63, 0xf5, 0x52, 0x74, 0x66, 0x9e, 0xc4, - 0x6d, 0xcf, 0x2c, 0x4a, 0x74, 0xe6, 0xfd, 0x94 -}; - - -static INLINE void -fill_random_pattern(uint8_t *dst, pb_size size) -{ - pb_size i = 0; - while(size--) { - *dst++ = random_pattern[i++]; - i &= sizeof(random_pattern) - 1; - } -} - - -static INLINE boolean -check_random_pattern(const uint8_t *dst, pb_size size, - pb_size *min_ofs, pb_size *max_ofs) -{ - boolean result = TRUE; - pb_size i; - *min_ofs = size; - *max_ofs = 0; - for(i = 0; i < size; ++i) { - if(*dst++ != random_pattern[i % sizeof(random_pattern)]) { - *min_ofs = MIN2(*min_ofs, i); - *max_ofs = MAX2(*max_ofs, i); - result = FALSE; - } - } - return result; -} - - -static void -pb_debug_buffer_fill(struct pb_debug_buffer *buf) -{ - uint8_t *map; - - map = pb_map(buf->buffer, PB_USAGE_CPU_WRITE, NULL); - assert(map); - if(map) { - fill_random_pattern(map, buf->underflow_size); - fill_random_pattern(map + buf->underflow_size + buf->base.size, - buf->overflow_size); - pb_unmap(buf->buffer); - } -} - - -/** - * Check for under/over flows. - * - * Should be called with the buffer unmaped. - */ -static void -pb_debug_buffer_check(struct pb_debug_buffer *buf) -{ - uint8_t *map; - - map = pb_map(buf->buffer, - PB_USAGE_CPU_READ | - PB_USAGE_UNSYNCHRONIZED, NULL); - assert(map); - if(map) { - boolean underflow, overflow; - pb_size min_ofs, max_ofs; - - underflow = !check_random_pattern(map, buf->underflow_size, - &min_ofs, &max_ofs); - if(underflow) { - debug_printf("buffer underflow (offset -%u%s to -%u bytes) detected\n", - buf->underflow_size - min_ofs, - min_ofs == 0 ? "+" : "", - buf->underflow_size - max_ofs); - } - - overflow = !check_random_pattern(map + buf->underflow_size + buf->base.size, - buf->overflow_size, - &min_ofs, &max_ofs); - if(overflow) { - debug_printf("buffer overflow (size %u plus offset %u to %u%s bytes) detected\n", - buf->base.size, - min_ofs, - max_ofs, - max_ofs == buf->overflow_size - 1 ? "+" : ""); - } - - if(underflow || overflow) - debug_backtrace_dump(buf->create_backtrace, PB_DEBUG_CREATE_BACKTRACE); - - debug_assert(!underflow && !overflow); - - /* re-fill if not aborted */ - if(underflow) - fill_random_pattern(map, buf->underflow_size); - if(overflow) - fill_random_pattern(map + buf->underflow_size + buf->base.size, - buf->overflow_size); - - pb_unmap(buf->buffer); - } -} - - -static void -pb_debug_buffer_destroy(struct pb_buffer *_buf) -{ - struct pb_debug_buffer *buf = pb_debug_buffer(_buf); - struct pb_debug_manager *mgr = buf->mgr; - - assert(!pipe_is_referenced(&buf->base.reference)); - - pb_debug_buffer_check(buf); - - pipe_mutex_lock(mgr->mutex); - LIST_DEL(&buf->head); - pipe_mutex_unlock(mgr->mutex); - - pipe_mutex_destroy(buf->mutex); - - pb_reference(&buf->buffer, NULL); - FREE(buf); -} - - -static void * -pb_debug_buffer_map(struct pb_buffer *_buf, - unsigned flags, void *flush_ctx) -{ - struct pb_debug_buffer *buf = pb_debug_buffer(_buf); - void *map; - - pb_debug_buffer_check(buf); - - map = pb_map(buf->buffer, flags, flush_ctx); - if(!map) - return NULL; - - if(map) { - pipe_mutex_lock(buf->mutex); - ++buf->map_count; - debug_backtrace_capture(buf->map_backtrace, 1, PB_DEBUG_MAP_BACKTRACE); - pipe_mutex_unlock(buf->mutex); - } - - return (uint8_t *)map + buf->underflow_size; -} - - -static void -pb_debug_buffer_unmap(struct pb_buffer *_buf) -{ - struct pb_debug_buffer *buf = pb_debug_buffer(_buf); - - pipe_mutex_lock(buf->mutex); - assert(buf->map_count); - if(buf->map_count) - --buf->map_count; - pipe_mutex_unlock(buf->mutex); - - pb_unmap(buf->buffer); - - pb_debug_buffer_check(buf); -} - - -static void -pb_debug_buffer_get_base_buffer(struct pb_buffer *_buf, - struct pb_buffer **base_buf, - pb_size *offset) -{ - struct pb_debug_buffer *buf = pb_debug_buffer(_buf); - pb_get_base_buffer(buf->buffer, base_buf, offset); - *offset += buf->underflow_size; -} - - -static enum pipe_error -pb_debug_buffer_validate(struct pb_buffer *_buf, - struct pb_validate *vl, - unsigned flags) -{ - struct pb_debug_buffer *buf = pb_debug_buffer(_buf); - - pipe_mutex_lock(buf->mutex); - if(buf->map_count) { - debug_printf("%s: attempting to validate a mapped buffer\n", __FUNCTION__); - debug_printf("last map backtrace is\n"); - debug_backtrace_dump(buf->map_backtrace, PB_DEBUG_MAP_BACKTRACE); - } - pipe_mutex_unlock(buf->mutex); - - pb_debug_buffer_check(buf); - - return pb_validate(buf->buffer, vl, flags); -} - - -static void -pb_debug_buffer_fence(struct pb_buffer *_buf, - struct pipe_fence_handle *fence) -{ - struct pb_debug_buffer *buf = pb_debug_buffer(_buf); - pb_fence(buf->buffer, fence); -} - - -const struct pb_vtbl -pb_debug_buffer_vtbl = { - pb_debug_buffer_destroy, - pb_debug_buffer_map, - pb_debug_buffer_unmap, - pb_debug_buffer_validate, - pb_debug_buffer_fence, - pb_debug_buffer_get_base_buffer -}; - - -static void -pb_debug_manager_dump_locked(struct pb_debug_manager *mgr) -{ - struct list_head *curr, *next; - struct pb_debug_buffer *buf; - - curr = mgr->list.next; - next = curr->next; - while(curr != &mgr->list) { - buf = LIST_ENTRY(struct pb_debug_buffer, curr, head); - - debug_printf("buffer = %p\n", (void *) buf); - debug_printf(" .size = 0x%x\n", buf->base.size); - debug_backtrace_dump(buf->create_backtrace, PB_DEBUG_CREATE_BACKTRACE); - - curr = next; - next = curr->next; - } - -} - - -static struct pb_buffer * -pb_debug_manager_create_buffer(struct pb_manager *_mgr, - pb_size size, - const struct pb_desc *desc) -{ - struct pb_debug_manager *mgr = pb_debug_manager(_mgr); - struct pb_debug_buffer *buf; - struct pb_desc real_desc; - pb_size real_size; - - assert(size); - assert(desc->alignment); - - buf = CALLOC_STRUCT(pb_debug_buffer); - if(!buf) - return NULL; - - real_size = mgr->underflow_size + size + mgr->overflow_size; - real_desc = *desc; - real_desc.usage |= PB_USAGE_CPU_WRITE; - real_desc.usage |= PB_USAGE_CPU_READ; - - buf->buffer = mgr->provider->create_buffer(mgr->provider, - real_size, - &real_desc); - if(!buf->buffer) { - FREE(buf); -#if 0 - pipe_mutex_lock(mgr->mutex); - debug_printf("%s: failed to create buffer\n", __FUNCTION__); - if(!LIST_IS_EMPTY(&mgr->list)) - pb_debug_manager_dump_locked(mgr); - pipe_mutex_unlock(mgr->mutex); -#endif - return NULL; - } - - assert(pipe_is_referenced(&buf->buffer->reference)); - assert(pb_check_alignment(real_desc.alignment, buf->buffer->alignment)); - assert(pb_check_usage(real_desc.usage, buf->buffer->usage)); - assert(buf->buffer->size >= real_size); - - pipe_reference_init(&buf->base.reference, 1); - buf->base.alignment = desc->alignment; - buf->base.usage = desc->usage; - buf->base.size = size; - - buf->base.vtbl = &pb_debug_buffer_vtbl; - buf->mgr = mgr; - - buf->underflow_size = mgr->underflow_size; - buf->overflow_size = buf->buffer->size - buf->underflow_size - size; - - debug_backtrace_capture(buf->create_backtrace, 1, PB_DEBUG_CREATE_BACKTRACE); - - pb_debug_buffer_fill(buf); - - pipe_mutex_init(buf->mutex); - - pipe_mutex_lock(mgr->mutex); - LIST_ADDTAIL(&buf->head, &mgr->list); - pipe_mutex_unlock(mgr->mutex); - - return &buf->base; -} - - -static void -pb_debug_manager_flush(struct pb_manager *_mgr) -{ - struct pb_debug_manager *mgr = pb_debug_manager(_mgr); - assert(mgr->provider->flush); - if(mgr->provider->flush) - mgr->provider->flush(mgr->provider); -} - - -static void -pb_debug_manager_destroy(struct pb_manager *_mgr) -{ - struct pb_debug_manager *mgr = pb_debug_manager(_mgr); - - pipe_mutex_lock(mgr->mutex); - if(!LIST_IS_EMPTY(&mgr->list)) { - debug_printf("%s: unfreed buffers\n", __FUNCTION__); - pb_debug_manager_dump_locked(mgr); - } - pipe_mutex_unlock(mgr->mutex); - - pipe_mutex_destroy(mgr->mutex); - mgr->provider->destroy(mgr->provider); - FREE(mgr); -} - - -struct pb_manager * -pb_debug_manager_create(struct pb_manager *provider, - pb_size underflow_size, pb_size overflow_size) -{ - struct pb_debug_manager *mgr; - - if(!provider) - return NULL; - - mgr = CALLOC_STRUCT(pb_debug_manager); - if (!mgr) - return NULL; - - mgr->base.destroy = pb_debug_manager_destroy; - mgr->base.create_buffer = pb_debug_manager_create_buffer; - mgr->base.flush = pb_debug_manager_flush; - mgr->provider = provider; - mgr->underflow_size = underflow_size; - mgr->overflow_size = overflow_size; - - pipe_mutex_init(mgr->mutex); - LIST_INITHEAD(&mgr->list); - - return &mgr->base; -} - - -#else /* !DEBUG */ - - -struct pb_manager * -pb_debug_manager_create(struct pb_manager *provider, - pb_size underflow_size, pb_size overflow_size) -{ - return provider; -} - - -#endif /* !DEBUG */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c b/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c deleted file mode 100644 index fe96e5c9d49..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c +++ /dev/null @@ -1,321 +0,0 @@ -/************************************************************************** - * - * Copyright 2006 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \file - * Buffer manager using the old texture memory manager. - * - * \author Jose Fonseca - */ - - -#include "pipe/p_defines.h" -#include "util/u_debug.h" -#include "os/os_thread.h" -#include "util/u_memory.h" -#include "util/u_double_list.h" -#include "util/u_mm.h" -#include "pb_buffer.h" -#include "pb_bufmgr.h" - - -/** - * Convenience macro (type safe). - */ -#define SUPER(__derived) (&(__derived)->base) - - -struct mm_pb_manager -{ - struct pb_manager base; - - pipe_mutex mutex; - - pb_size size; - struct mem_block *heap; - - pb_size align2; - - struct pb_buffer *buffer; - void *map; -}; - - -static INLINE struct mm_pb_manager * -mm_pb_manager(struct pb_manager *mgr) -{ - assert(mgr); - return (struct mm_pb_manager *)mgr; -} - - -struct mm_buffer -{ - struct pb_buffer base; - - struct mm_pb_manager *mgr; - - struct mem_block *block; -}; - - -static INLINE struct mm_buffer * -mm_buffer(struct pb_buffer *buf) -{ - assert(buf); - return (struct mm_buffer *)buf; -} - - -static void -mm_buffer_destroy(struct pb_buffer *buf) -{ - struct mm_buffer *mm_buf = mm_buffer(buf); - struct mm_pb_manager *mm = mm_buf->mgr; - - assert(!pipe_is_referenced(&mm_buf->base.reference)); - - pipe_mutex_lock(mm->mutex); - u_mmFreeMem(mm_buf->block); - FREE(mm_buf); - pipe_mutex_unlock(mm->mutex); -} - - -static void * -mm_buffer_map(struct pb_buffer *buf, - unsigned flags, - void *flush_ctx) -{ - struct mm_buffer *mm_buf = mm_buffer(buf); - struct mm_pb_manager *mm = mm_buf->mgr; - - /* XXX: it will be necessary to remap here to propagate flush_ctx */ - - return (unsigned char *) mm->map + mm_buf->block->ofs; -} - - -static void -mm_buffer_unmap(struct pb_buffer *buf) -{ - /* No-op */ -} - - -static enum pipe_error -mm_buffer_validate(struct pb_buffer *buf, - struct pb_validate *vl, - unsigned flags) -{ - struct mm_buffer *mm_buf = mm_buffer(buf); - struct mm_pb_manager *mm = mm_buf->mgr; - return pb_validate(mm->buffer, vl, flags); -} - - -static void -mm_buffer_fence(struct pb_buffer *buf, - struct pipe_fence_handle *fence) -{ - struct mm_buffer *mm_buf = mm_buffer(buf); - struct mm_pb_manager *mm = mm_buf->mgr; - pb_fence(mm->buffer, fence); -} - - -static void -mm_buffer_get_base_buffer(struct pb_buffer *buf, - struct pb_buffer **base_buf, - pb_size *offset) -{ - struct mm_buffer *mm_buf = mm_buffer(buf); - struct mm_pb_manager *mm = mm_buf->mgr; - pb_get_base_buffer(mm->buffer, base_buf, offset); - *offset += mm_buf->block->ofs; -} - - -static const struct pb_vtbl -mm_buffer_vtbl = { - mm_buffer_destroy, - mm_buffer_map, - mm_buffer_unmap, - mm_buffer_validate, - mm_buffer_fence, - mm_buffer_get_base_buffer -}; - - -static struct pb_buffer * -mm_bufmgr_create_buffer(struct pb_manager *mgr, - pb_size size, - const struct pb_desc *desc) -{ - struct mm_pb_manager *mm = mm_pb_manager(mgr); - struct mm_buffer *mm_buf; - - /* We don't handle alignments larger then the one initially setup */ - assert(pb_check_alignment(desc->alignment, (pb_size)1 << mm->align2)); - if(!pb_check_alignment(desc->alignment, (pb_size)1 << mm->align2)) - return NULL; - - pipe_mutex_lock(mm->mutex); - - mm_buf = CALLOC_STRUCT(mm_buffer); - if (!mm_buf) { - pipe_mutex_unlock(mm->mutex); - return NULL; - } - - pipe_reference_init(&mm_buf->base.reference, 1); - mm_buf->base.alignment = desc->alignment; - mm_buf->base.usage = desc->usage; - mm_buf->base.size = size; - - mm_buf->base.vtbl = &mm_buffer_vtbl; - - mm_buf->mgr = mm; - - mm_buf->block = u_mmAllocMem(mm->heap, (int)size, (int)mm->align2, 0); - if(!mm_buf->block) { -#if 0 - debug_printf("warning: heap full\n"); - mmDumpMemInfo(mm->heap); -#endif - FREE(mm_buf); - pipe_mutex_unlock(mm->mutex); - return NULL; - } - - /* Some sanity checks */ - assert(0 <= (pb_size)mm_buf->block->ofs && (pb_size)mm_buf->block->ofs < mm->size); - assert(size <= (pb_size)mm_buf->block->size && (pb_size)mm_buf->block->ofs + (pb_size)mm_buf->block->size <= mm->size); - - pipe_mutex_unlock(mm->mutex); - return SUPER(mm_buf); -} - - -static void -mm_bufmgr_flush(struct pb_manager *mgr) -{ - /* No-op */ -} - - -static void -mm_bufmgr_destroy(struct pb_manager *mgr) -{ - struct mm_pb_manager *mm = mm_pb_manager(mgr); - - pipe_mutex_lock(mm->mutex); - - u_mmDestroy(mm->heap); - - pb_unmap(mm->buffer); - pb_reference(&mm->buffer, NULL); - - pipe_mutex_unlock(mm->mutex); - - FREE(mgr); -} - - -struct pb_manager * -mm_bufmgr_create_from_buffer(struct pb_buffer *buffer, - pb_size size, pb_size align2) -{ - struct mm_pb_manager *mm; - - if(!buffer) - return NULL; - - mm = CALLOC_STRUCT(mm_pb_manager); - if (!mm) - return NULL; - - mm->base.destroy = mm_bufmgr_destroy; - mm->base.create_buffer = mm_bufmgr_create_buffer; - mm->base.flush = mm_bufmgr_flush; - - mm->size = size; - mm->align2 = align2; /* 64-byte alignment */ - - pipe_mutex_init(mm->mutex); - - mm->buffer = buffer; - - mm->map = pb_map(mm->buffer, - PB_USAGE_CPU_READ | - PB_USAGE_CPU_WRITE, NULL); - if(!mm->map) - goto failure; - - mm->heap = u_mmInit(0, (int)size); - if (!mm->heap) - goto failure; - - return SUPER(mm); - -failure: -if(mm->heap) - u_mmDestroy(mm->heap); - if(mm->map) - pb_unmap(mm->buffer); - if(mm) - FREE(mm); - return NULL; -} - - -struct pb_manager * -mm_bufmgr_create(struct pb_manager *provider, - pb_size size, pb_size align2) -{ - struct pb_buffer *buffer; - struct pb_manager *mgr; - struct pb_desc desc; - - if(!provider) - return NULL; - - memset(&desc, 0, sizeof(desc)); - desc.alignment = 1 << align2; - - buffer = provider->create_buffer(provider, size, &desc); - if (!buffer) - return NULL; - - mgr = mm_bufmgr_create_from_buffer(buffer, size, align2); - if (!mgr) { - pb_reference(&buffer, NULL); - return NULL; - } - - return mgr; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_ondemand.c b/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_ondemand.c deleted file mode 100644 index e44bc9b17e4..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_ondemand.c +++ /dev/null @@ -1,305 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * A variation of malloc buffers which get transferred to real graphics memory - * when there is an attempt to validate them. - * - * @author Jose Fonseca - */ - - -#include "util/u_debug.h" -#include "util/u_memory.h" -#include "pb_buffer.h" -#include "pb_bufmgr.h" - - -struct pb_ondemand_manager; - - -struct pb_ondemand_buffer -{ - struct pb_buffer base; - - struct pb_ondemand_manager *mgr; - - /** Regular malloc'ed memory */ - void *data; - unsigned mapcount; - - /** Real buffer */ - struct pb_buffer *buffer; - pb_size size; - struct pb_desc desc; -}; - - -struct pb_ondemand_manager -{ - struct pb_manager base; - - struct pb_manager *provider; -}; - - -extern const struct pb_vtbl pb_ondemand_buffer_vtbl; - -static INLINE struct pb_ondemand_buffer * -pb_ondemand_buffer(struct pb_buffer *buf) -{ - assert(buf); - if (!buf) - return NULL; - assert(buf->vtbl == &pb_ondemand_buffer_vtbl); - return (struct pb_ondemand_buffer *)buf; -} - -static INLINE struct pb_ondemand_manager * -pb_ondemand_manager(struct pb_manager *mgr) -{ - assert(mgr); - return (struct pb_ondemand_manager *)mgr; -} - - -static void -pb_ondemand_buffer_destroy(struct pb_buffer *_buf) -{ - struct pb_ondemand_buffer *buf = pb_ondemand_buffer(_buf); - - pb_reference(&buf->buffer, NULL); - - align_free(buf->data); - - FREE(buf); -} - - -static void * -pb_ondemand_buffer_map(struct pb_buffer *_buf, - unsigned flags, void *flush_ctx) -{ - struct pb_ondemand_buffer *buf = pb_ondemand_buffer(_buf); - - if(buf->buffer) { - assert(!buf->data); - return pb_map(buf->buffer, flags, flush_ctx); - } - else { - assert(buf->data); - ++buf->mapcount; - return buf->data; - } -} - - -static void -pb_ondemand_buffer_unmap(struct pb_buffer *_buf) -{ - struct pb_ondemand_buffer *buf = pb_ondemand_buffer(_buf); - - if(buf->buffer) { - assert(!buf->data); - pb_unmap(buf->buffer); - } - else { - assert(buf->data); - assert(buf->mapcount); - if(buf->mapcount) - --buf->mapcount; - } -} - - -static enum pipe_error -pb_ondemand_buffer_instantiate(struct pb_ondemand_buffer *buf) -{ - if(!buf->buffer) { - struct pb_manager *provider = buf->mgr->provider; - uint8_t *map; - - assert(!buf->mapcount); - - buf->buffer = provider->create_buffer(provider, buf->size, &buf->desc); - if(!buf->buffer) - return PIPE_ERROR_OUT_OF_MEMORY; - - map = pb_map(buf->buffer, PB_USAGE_CPU_READ, NULL); - if(!map) { - pb_reference(&buf->buffer, NULL); - return PIPE_ERROR; - } - - memcpy(map, buf->data, buf->size); - - pb_unmap(buf->buffer); - - if(!buf->mapcount) { - FREE(buf->data); - buf->data = NULL; - } - } - - return PIPE_OK; -} - -static enum pipe_error -pb_ondemand_buffer_validate(struct pb_buffer *_buf, - struct pb_validate *vl, - unsigned flags) -{ - struct pb_ondemand_buffer *buf = pb_ondemand_buffer(_buf); - enum pipe_error ret; - - assert(!buf->mapcount); - if(buf->mapcount) - return PIPE_ERROR; - - ret = pb_ondemand_buffer_instantiate(buf); - if(ret != PIPE_OK) - return ret; - - return pb_validate(buf->buffer, vl, flags); -} - - -static void -pb_ondemand_buffer_fence(struct pb_buffer *_buf, - struct pipe_fence_handle *fence) -{ - struct pb_ondemand_buffer *buf = pb_ondemand_buffer(_buf); - - assert(buf->buffer); - if(!buf->buffer) - return; - - pb_fence(buf->buffer, fence); -} - - -static void -pb_ondemand_buffer_get_base_buffer(struct pb_buffer *_buf, - struct pb_buffer **base_buf, - pb_size *offset) -{ - struct pb_ondemand_buffer *buf = pb_ondemand_buffer(_buf); - - if(pb_ondemand_buffer_instantiate(buf) != PIPE_OK) { - assert(0); - *base_buf = &buf->base; - *offset = 0; - return; - } - - pb_get_base_buffer(buf->buffer, base_buf, offset); -} - - -const struct pb_vtbl -pb_ondemand_buffer_vtbl = { - pb_ondemand_buffer_destroy, - pb_ondemand_buffer_map, - pb_ondemand_buffer_unmap, - pb_ondemand_buffer_validate, - pb_ondemand_buffer_fence, - pb_ondemand_buffer_get_base_buffer -}; - - -static struct pb_buffer * -pb_ondemand_manager_create_buffer(struct pb_manager *_mgr, - pb_size size, - const struct pb_desc *desc) -{ - struct pb_ondemand_manager *mgr = pb_ondemand_manager(_mgr); - struct pb_ondemand_buffer *buf; - - buf = CALLOC_STRUCT(pb_ondemand_buffer); - if(!buf) - return NULL; - - pipe_reference_init(&buf->base.reference, 1); - buf->base.alignment = desc->alignment; - buf->base.usage = desc->usage; - buf->base.size = size; - buf->base.vtbl = &pb_ondemand_buffer_vtbl; - - buf->mgr = mgr; - - buf->data = align_malloc(size, desc->alignment < sizeof(void*) ? sizeof(void*) : desc->alignment); - if(!buf->data) { - FREE(buf); - return NULL; - } - - buf->size = size; - buf->desc = *desc; - - return &buf->base; -} - - -static void -pb_ondemand_manager_flush(struct pb_manager *_mgr) -{ - struct pb_ondemand_manager *mgr = pb_ondemand_manager(_mgr); - - mgr->provider->flush(mgr->provider); -} - - -static void -pb_ondemand_manager_destroy(struct pb_manager *_mgr) -{ - struct pb_ondemand_manager *mgr = pb_ondemand_manager(_mgr); - - FREE(mgr); -} - - -struct pb_manager * -pb_ondemand_manager_create(struct pb_manager *provider) -{ - struct pb_ondemand_manager *mgr; - - if(!provider) - return NULL; - - mgr = CALLOC_STRUCT(pb_ondemand_manager); - if(!mgr) - return NULL; - - mgr->base.destroy = pb_ondemand_manager_destroy; - mgr->base.create_buffer = pb_ondemand_manager_create_buffer; - mgr->base.flush = pb_ondemand_manager_flush; - - mgr->provider = provider; - - return &mgr->base; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c b/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c deleted file mode 100644 index a8e9a34d519..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_pool.c +++ /dev/null @@ -1,323 +0,0 @@ -/************************************************************************** - * - * Copyright 2006 Tungsten Graphics, Inc., Bismarck, ND., USA - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * - **************************************************************************/ - -/** - * \file - * Batch buffer pool management. - * - * \author Jose Fonseca - * \author Thomas Hellström - */ - - -#include "pipe/p_compiler.h" -#include "util/u_debug.h" -#include "os/os_thread.h" -#include "pipe/p_defines.h" -#include "util/u_memory.h" -#include "util/u_double_list.h" - -#include "pb_buffer.h" -#include "pb_bufmgr.h" - - -/** - * Convenience macro (type safe). - */ -#define SUPER(__derived) (&(__derived)->base) - - -struct pool_pb_manager -{ - struct pb_manager base; - - pipe_mutex mutex; - - pb_size bufSize; - pb_size bufAlign; - - pb_size numFree; - pb_size numTot; - - struct list_head free; - - struct pb_buffer *buffer; - void *map; - - struct pool_buffer *bufs; -}; - - -static INLINE struct pool_pb_manager * -pool_pb_manager(struct pb_manager *mgr) -{ - assert(mgr); - return (struct pool_pb_manager *)mgr; -} - - -struct pool_buffer -{ - struct pb_buffer base; - - struct pool_pb_manager *mgr; - - struct list_head head; - - pb_size start; -}; - - -static INLINE struct pool_buffer * -pool_buffer(struct pb_buffer *buf) -{ - assert(buf); - return (struct pool_buffer *)buf; -} - - - -static void -pool_buffer_destroy(struct pb_buffer *buf) -{ - struct pool_buffer *pool_buf = pool_buffer(buf); - struct pool_pb_manager *pool = pool_buf->mgr; - - assert(!pipe_is_referenced(&pool_buf->base.reference)); - - pipe_mutex_lock(pool->mutex); - LIST_ADD(&pool_buf->head, &pool->free); - pool->numFree++; - pipe_mutex_unlock(pool->mutex); -} - - -static void * -pool_buffer_map(struct pb_buffer *buf, unsigned flags, void *flush_ctx) -{ - struct pool_buffer *pool_buf = pool_buffer(buf); - struct pool_pb_manager *pool = pool_buf->mgr; - void *map; - - /* XXX: it will be necessary to remap here to propagate flush_ctx */ - - pipe_mutex_lock(pool->mutex); - map = (unsigned char *) pool->map + pool_buf->start; - pipe_mutex_unlock(pool->mutex); - return map; -} - - -static void -pool_buffer_unmap(struct pb_buffer *buf) -{ - /* No-op */ -} - - -static enum pipe_error -pool_buffer_validate(struct pb_buffer *buf, - struct pb_validate *vl, - unsigned flags) -{ - struct pool_buffer *pool_buf = pool_buffer(buf); - struct pool_pb_manager *pool = pool_buf->mgr; - return pb_validate(pool->buffer, vl, flags); -} - - -static void -pool_buffer_fence(struct pb_buffer *buf, - struct pipe_fence_handle *fence) -{ - struct pool_buffer *pool_buf = pool_buffer(buf); - struct pool_pb_manager *pool = pool_buf->mgr; - pb_fence(pool->buffer, fence); -} - - -static void -pool_buffer_get_base_buffer(struct pb_buffer *buf, - struct pb_buffer **base_buf, - pb_size *offset) -{ - struct pool_buffer *pool_buf = pool_buffer(buf); - struct pool_pb_manager *pool = pool_buf->mgr; - pb_get_base_buffer(pool->buffer, base_buf, offset); - *offset += pool_buf->start; -} - - -static const struct pb_vtbl -pool_buffer_vtbl = { - pool_buffer_destroy, - pool_buffer_map, - pool_buffer_unmap, - pool_buffer_validate, - pool_buffer_fence, - pool_buffer_get_base_buffer -}; - - -static struct pb_buffer * -pool_bufmgr_create_buffer(struct pb_manager *mgr, - pb_size size, - const struct pb_desc *desc) -{ - struct pool_pb_manager *pool = pool_pb_manager(mgr); - struct pool_buffer *pool_buf; - struct list_head *item; - - assert(size == pool->bufSize); - assert(pool->bufAlign % desc->alignment == 0); - - pipe_mutex_lock(pool->mutex); - - if (pool->numFree == 0) { - pipe_mutex_unlock(pool->mutex); - debug_printf("warning: out of fixed size buffer objects\n"); - return NULL; - } - - item = pool->free.next; - - if (item == &pool->free) { - pipe_mutex_unlock(pool->mutex); - debug_printf("error: fixed size buffer pool corruption\n"); - return NULL; - } - - LIST_DEL(item); - --pool->numFree; - - pipe_mutex_unlock(pool->mutex); - - pool_buf = LIST_ENTRY(struct pool_buffer, item, head); - assert(!pipe_is_referenced(&pool_buf->base.reference)); - pipe_reference_init(&pool_buf->base.reference, 1); - pool_buf->base.alignment = desc->alignment; - pool_buf->base.usage = desc->usage; - - return SUPER(pool_buf); -} - - -static void -pool_bufmgr_flush(struct pb_manager *mgr) -{ - /* No-op */ -} - - -static void -pool_bufmgr_destroy(struct pb_manager *mgr) -{ - struct pool_pb_manager *pool = pool_pb_manager(mgr); - pipe_mutex_lock(pool->mutex); - - FREE(pool->bufs); - - pb_unmap(pool->buffer); - pb_reference(&pool->buffer, NULL); - - pipe_mutex_unlock(pool->mutex); - - FREE(mgr); -} - - -struct pb_manager * -pool_bufmgr_create(struct pb_manager *provider, - pb_size numBufs, - pb_size bufSize, - const struct pb_desc *desc) -{ - struct pool_pb_manager *pool; - struct pool_buffer *pool_buf; - pb_size i; - - if(!provider) - return NULL; - - pool = CALLOC_STRUCT(pool_pb_manager); - if (!pool) - return NULL; - - pool->base.destroy = pool_bufmgr_destroy; - pool->base.create_buffer = pool_bufmgr_create_buffer; - pool->base.flush = pool_bufmgr_flush; - - LIST_INITHEAD(&pool->free); - - pool->numTot = numBufs; - pool->numFree = numBufs; - pool->bufSize = bufSize; - pool->bufAlign = desc->alignment; - - pipe_mutex_init(pool->mutex); - - pool->buffer = provider->create_buffer(provider, numBufs*bufSize, desc); - if (!pool->buffer) - goto failure; - - pool->map = pb_map(pool->buffer, - PB_USAGE_CPU_READ | - PB_USAGE_CPU_WRITE, NULL); - if(!pool->map) - goto failure; - - pool->bufs = (struct pool_buffer *)CALLOC(numBufs, sizeof(*pool->bufs)); - if (!pool->bufs) - goto failure; - - pool_buf = pool->bufs; - for (i = 0; i < numBufs; ++i) { - pipe_reference_init(&pool_buf->base.reference, 0); - pool_buf->base.alignment = 0; - pool_buf->base.usage = 0; - pool_buf->base.size = bufSize; - pool_buf->base.vtbl = &pool_buffer_vtbl; - pool_buf->mgr = pool; - pool_buf->start = i * bufSize; - LIST_ADDTAIL(&pool_buf->head, &pool->free); - pool_buf++; - } - - return SUPER(pool); - -failure: - if(pool->bufs) - FREE(pool->bufs); - if(pool->map) - pb_unmap(pool->buffer); - if(pool->buffer) - pb_reference(&pool->buffer, NULL); - if(pool) - FREE(pool); - return NULL; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c b/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c deleted file mode 100644 index bd84b622b62..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c +++ /dev/null @@ -1,590 +0,0 @@ -/************************************************************************** - * - * Copyright 2006-2008 Tungsten Graphics, Inc., Cedar Park, TX., USA - * All Rights Reserved. - * - * Permission is hereby granted, FREE of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * - **************************************************************************/ - -/** - * @file - * S-lab pool implementation. - * - * @sa http://en.wikipedia.org/wiki/Slab_allocation - * - * @author Thomas Hellstrom - * @author Jose Fonseca - */ - -#include "pipe/p_compiler.h" -#include "util/u_debug.h" -#include "os/os_thread.h" -#include "pipe/p_defines.h" -#include "util/u_memory.h" -#include "util/u_double_list.h" -#include "util/u_time.h" - -#include "pb_buffer.h" -#include "pb_bufmgr.h" - - -struct pb_slab; - - -/** - * Buffer in a slab. - * - * Sub-allocation of a contiguous buffer. - */ -struct pb_slab_buffer -{ - struct pb_buffer base; - - struct pb_slab *slab; - - struct list_head head; - - unsigned mapCount; - - /** Offset relative to the start of the slab buffer. */ - pb_size start; - - /** Use when validating, to signal that all mappings are finished */ - /* TODO: Actually validation does not reach this stage yet */ - pipe_condvar event; -}; - - -/** - * Slab -- a contiguous piece of memory. - */ -struct pb_slab -{ - struct list_head head; - struct list_head freeBuffers; - pb_size numBuffers; - pb_size numFree; - - struct pb_slab_buffer *buffers; - struct pb_slab_manager *mgr; - - /** Buffer from the provider */ - struct pb_buffer *bo; - - void *virtual; -}; - - -/** - * It adds/removes slabs as needed in order to meet the allocation/destruction - * of individual buffers. - */ -struct pb_slab_manager -{ - struct pb_manager base; - - /** From where we get our buffers */ - struct pb_manager *provider; - - /** Size of the buffers we hand on downstream */ - pb_size bufSize; - - /** Size of the buffers we request upstream */ - pb_size slabSize; - - /** - * Alignment, usage to be used to allocate the slab buffers. - * - * We can only provide buffers which are consistent (in alignment, usage) - * with this description. - */ - struct pb_desc desc; - - /** - * Partial slabs - * - * Full slabs are not stored in any list. Empty slabs are destroyed - * immediatly. - */ - struct list_head slabs; - - pipe_mutex mutex; -}; - - -/** - * Wrapper around several slabs, therefore capable of handling buffers of - * multiple sizes. - * - * This buffer manager just dispatches buffer allocations to the appropriate slab - * manager, according to the requested buffer size, or by passes the slab - * managers altogether for even greater sizes. - * - * The data of this structure remains constant after - * initialization and thus needs no mutex protection. - */ -struct pb_slab_range_manager -{ - struct pb_manager base; - - struct pb_manager *provider; - - pb_size minBufSize; - pb_size maxBufSize; - - /** @sa pb_slab_manager::desc */ - struct pb_desc desc; - - unsigned numBuckets; - pb_size *bucketSizes; - - /** Array of pb_slab_manager, one for each bucket size */ - struct pb_manager **buckets; -}; - - -static INLINE struct pb_slab_buffer * -pb_slab_buffer(struct pb_buffer *buf) -{ - assert(buf); - return (struct pb_slab_buffer *)buf; -} - - -static INLINE struct pb_slab_manager * -pb_slab_manager(struct pb_manager *mgr) -{ - assert(mgr); - return (struct pb_slab_manager *)mgr; -} - - -static INLINE struct pb_slab_range_manager * -pb_slab_range_manager(struct pb_manager *mgr) -{ - assert(mgr); - return (struct pb_slab_range_manager *)mgr; -} - - -/** - * Delete a buffer from the slab delayed list and put - * it on the slab FREE list. - */ -static void -pb_slab_buffer_destroy(struct pb_buffer *_buf) -{ - struct pb_slab_buffer *buf = pb_slab_buffer(_buf); - struct pb_slab *slab = buf->slab; - struct pb_slab_manager *mgr = slab->mgr; - struct list_head *list = &buf->head; - - pipe_mutex_lock(mgr->mutex); - - assert(!pipe_is_referenced(&buf->base.reference)); - - buf->mapCount = 0; - - LIST_DEL(list); - LIST_ADDTAIL(list, &slab->freeBuffers); - slab->numFree++; - - if (slab->head.next == &slab->head) - LIST_ADDTAIL(&slab->head, &mgr->slabs); - - /* If the slab becomes totally empty, free it */ - if (slab->numFree == slab->numBuffers) { - list = &slab->head; - LIST_DELINIT(list); - pb_reference(&slab->bo, NULL); - FREE(slab->buffers); - FREE(slab); - } - - pipe_mutex_unlock(mgr->mutex); -} - - -static void * -pb_slab_buffer_map(struct pb_buffer *_buf, - unsigned flags, - void *flush_ctx) -{ - struct pb_slab_buffer *buf = pb_slab_buffer(_buf); - - /* XXX: it will be necessary to remap here to propagate flush_ctx */ - - ++buf->mapCount; - return (void *) ((uint8_t *) buf->slab->virtual + buf->start); -} - - -static void -pb_slab_buffer_unmap(struct pb_buffer *_buf) -{ - struct pb_slab_buffer *buf = pb_slab_buffer(_buf); - - --buf->mapCount; - if (buf->mapCount == 0) - pipe_condvar_broadcast(buf->event); -} - - -static enum pipe_error -pb_slab_buffer_validate(struct pb_buffer *_buf, - struct pb_validate *vl, - unsigned flags) -{ - struct pb_slab_buffer *buf = pb_slab_buffer(_buf); - return pb_validate(buf->slab->bo, vl, flags); -} - - -static void -pb_slab_buffer_fence(struct pb_buffer *_buf, - struct pipe_fence_handle *fence) -{ - struct pb_slab_buffer *buf = pb_slab_buffer(_buf); - pb_fence(buf->slab->bo, fence); -} - - -static void -pb_slab_buffer_get_base_buffer(struct pb_buffer *_buf, - struct pb_buffer **base_buf, - pb_size *offset) -{ - struct pb_slab_buffer *buf = pb_slab_buffer(_buf); - pb_get_base_buffer(buf->slab->bo, base_buf, offset); - *offset += buf->start; -} - - -static const struct pb_vtbl -pb_slab_buffer_vtbl = { - pb_slab_buffer_destroy, - pb_slab_buffer_map, - pb_slab_buffer_unmap, - pb_slab_buffer_validate, - pb_slab_buffer_fence, - pb_slab_buffer_get_base_buffer -}; - - -/** - * Create a new slab. - * - * Called when we ran out of free slabs. - */ -static enum pipe_error -pb_slab_create(struct pb_slab_manager *mgr) -{ - struct pb_slab *slab; - struct pb_slab_buffer *buf; - unsigned numBuffers; - unsigned i; - enum pipe_error ret; - - slab = CALLOC_STRUCT(pb_slab); - if (!slab) - return PIPE_ERROR_OUT_OF_MEMORY; - - slab->bo = mgr->provider->create_buffer(mgr->provider, mgr->slabSize, &mgr->desc); - if(!slab->bo) { - ret = PIPE_ERROR_OUT_OF_MEMORY; - goto out_err0; - } - - /* Note down the slab virtual address. All mappings are accessed directly - * through this address so it is required that the buffer is pinned. */ - slab->virtual = pb_map(slab->bo, - PB_USAGE_CPU_READ | - PB_USAGE_CPU_WRITE, NULL); - if(!slab->virtual) { - ret = PIPE_ERROR_OUT_OF_MEMORY; - goto out_err1; - } - pb_unmap(slab->bo); - - numBuffers = slab->bo->size / mgr->bufSize; - - slab->buffers = CALLOC(numBuffers, sizeof(*slab->buffers)); - if (!slab->buffers) { - ret = PIPE_ERROR_OUT_OF_MEMORY; - goto out_err1; - } - - LIST_INITHEAD(&slab->head); - LIST_INITHEAD(&slab->freeBuffers); - slab->numBuffers = numBuffers; - slab->numFree = 0; - slab->mgr = mgr; - - buf = slab->buffers; - for (i=0; i < numBuffers; ++i) { - pipe_reference_init(&buf->base.reference, 0); - buf->base.size = mgr->bufSize; - buf->base.alignment = 0; - buf->base.usage = 0; - buf->base.vtbl = &pb_slab_buffer_vtbl; - buf->slab = slab; - buf->start = i* mgr->bufSize; - buf->mapCount = 0; - pipe_condvar_init(buf->event); - LIST_ADDTAIL(&buf->head, &slab->freeBuffers); - slab->numFree++; - buf++; - } - - /* Add this slab to the list of partial slabs */ - LIST_ADDTAIL(&slab->head, &mgr->slabs); - - return PIPE_OK; - -out_err1: - pb_reference(&slab->bo, NULL); -out_err0: - FREE(slab); - return ret; -} - - -static struct pb_buffer * -pb_slab_manager_create_buffer(struct pb_manager *_mgr, - pb_size size, - const struct pb_desc *desc) -{ - struct pb_slab_manager *mgr = pb_slab_manager(_mgr); - static struct pb_slab_buffer *buf; - struct pb_slab *slab; - struct list_head *list; - - /* check size */ - assert(size <= mgr->bufSize); - if(size > mgr->bufSize) - return NULL; - - /* check if we can provide the requested alignment */ - assert(pb_check_alignment(desc->alignment, mgr->desc.alignment)); - if(!pb_check_alignment(desc->alignment, mgr->desc.alignment)) - return NULL; - assert(pb_check_alignment(desc->alignment, mgr->bufSize)); - if(!pb_check_alignment(desc->alignment, mgr->bufSize)) - return NULL; - - assert(pb_check_usage(desc->usage, mgr->desc.usage)); - if(!pb_check_usage(desc->usage, mgr->desc.usage)) - return NULL; - - pipe_mutex_lock(mgr->mutex); - - /* Create a new slab, if we run out of partial slabs */ - if (mgr->slabs.next == &mgr->slabs) { - (void) pb_slab_create(mgr); - if (mgr->slabs.next == &mgr->slabs) { - pipe_mutex_unlock(mgr->mutex); - return NULL; - } - } - - /* Allocate the buffer from a partial (or just created) slab */ - list = mgr->slabs.next; - slab = LIST_ENTRY(struct pb_slab, list, head); - - /* If totally full remove from the partial slab list */ - if (--slab->numFree == 0) - LIST_DELINIT(list); - - list = slab->freeBuffers.next; - LIST_DELINIT(list); - - pipe_mutex_unlock(mgr->mutex); - buf = LIST_ENTRY(struct pb_slab_buffer, list, head); - - pipe_reference_init(&buf->base.reference, 1); - buf->base.alignment = desc->alignment; - buf->base.usage = desc->usage; - - return &buf->base; -} - - -static void -pb_slab_manager_flush(struct pb_manager *_mgr) -{ - struct pb_slab_manager *mgr = pb_slab_manager(_mgr); - - assert(mgr->provider->flush); - if(mgr->provider->flush) - mgr->provider->flush(mgr->provider); -} - - -static void -pb_slab_manager_destroy(struct pb_manager *_mgr) -{ - struct pb_slab_manager *mgr = pb_slab_manager(_mgr); - - /* TODO: cleanup all allocated buffers */ - FREE(mgr); -} - - -struct pb_manager * -pb_slab_manager_create(struct pb_manager *provider, - pb_size bufSize, - pb_size slabSize, - const struct pb_desc *desc) -{ - struct pb_slab_manager *mgr; - - mgr = CALLOC_STRUCT(pb_slab_manager); - if (!mgr) - return NULL; - - mgr->base.destroy = pb_slab_manager_destroy; - mgr->base.create_buffer = pb_slab_manager_create_buffer; - mgr->base.flush = pb_slab_manager_flush; - - mgr->provider = provider; - mgr->bufSize = bufSize; - mgr->slabSize = slabSize; - mgr->desc = *desc; - - LIST_INITHEAD(&mgr->slabs); - - pipe_mutex_init(mgr->mutex); - - return &mgr->base; -} - - -static struct pb_buffer * -pb_slab_range_manager_create_buffer(struct pb_manager *_mgr, - pb_size size, - const struct pb_desc *desc) -{ - struct pb_slab_range_manager *mgr = pb_slab_range_manager(_mgr); - pb_size bufSize; - pb_size reqSize = size; - unsigned i; - - if(desc->alignment > reqSize) - reqSize = desc->alignment; - - bufSize = mgr->minBufSize; - for (i = 0; i < mgr->numBuckets; ++i) { - if(bufSize >= reqSize) - return mgr->buckets[i]->create_buffer(mgr->buckets[i], size, desc); - bufSize *= 2; - } - - /* Fall back to allocate a buffer object directly from the provider. */ - return mgr->provider->create_buffer(mgr->provider, size, desc); -} - - -static void -pb_slab_range_manager_flush(struct pb_manager *_mgr) -{ - struct pb_slab_range_manager *mgr = pb_slab_range_manager(_mgr); - - /* Individual slabs don't hold any temporary buffers so no need to call them */ - - assert(mgr->provider->flush); - if(mgr->provider->flush) - mgr->provider->flush(mgr->provider); -} - - -static void -pb_slab_range_manager_destroy(struct pb_manager *_mgr) -{ - struct pb_slab_range_manager *mgr = pb_slab_range_manager(_mgr); - unsigned i; - - for (i = 0; i < mgr->numBuckets; ++i) - mgr->buckets[i]->destroy(mgr->buckets[i]); - FREE(mgr->buckets); - FREE(mgr->bucketSizes); - FREE(mgr); -} - - -struct pb_manager * -pb_slab_range_manager_create(struct pb_manager *provider, - pb_size minBufSize, - pb_size maxBufSize, - pb_size slabSize, - const struct pb_desc *desc) -{ - struct pb_slab_range_manager *mgr; - pb_size bufSize; - unsigned i; - - if(!provider) - return NULL; - - mgr = CALLOC_STRUCT(pb_slab_range_manager); - if (!mgr) - goto out_err0; - - mgr->base.destroy = pb_slab_range_manager_destroy; - mgr->base.create_buffer = pb_slab_range_manager_create_buffer; - mgr->base.flush = pb_slab_range_manager_flush; - - mgr->provider = provider; - mgr->minBufSize = minBufSize; - mgr->maxBufSize = maxBufSize; - - mgr->numBuckets = 1; - bufSize = minBufSize; - while(bufSize < maxBufSize) { - bufSize *= 2; - ++mgr->numBuckets; - } - - mgr->buckets = CALLOC(mgr->numBuckets, sizeof(*mgr->buckets)); - if (!mgr->buckets) - goto out_err1; - - bufSize = minBufSize; - for (i = 0; i < mgr->numBuckets; ++i) { - mgr->buckets[i] = pb_slab_manager_create(provider, bufSize, slabSize, desc); - if(!mgr->buckets[i]) - goto out_err2; - bufSize *= 2; - } - - return &mgr->base; - -out_err2: - for (i = 0; i < mgr->numBuckets; ++i) - if(mgr->buckets[i]) - mgr->buckets[i]->destroy(mgr->buckets[i]); - FREE(mgr->buckets); -out_err1: - FREE(mgr); -out_err0: - return NULL; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_validate.c b/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_validate.c deleted file mode 100644 index b585422460b..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_validate.c +++ /dev/null @@ -1,192 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Buffer validation. - * - * @author Jose Fonseca - */ - - -#include "pipe/p_compiler.h" -#include "pipe/p_defines.h" -#include "util/u_memory.h" -#include "util/u_debug.h" - -#include "pb_buffer.h" -#include "pb_validate.h" - - -#define PB_VALIDATE_INITIAL_SIZE 1 /* 512 */ - - -struct pb_validate_entry -{ - struct pb_buffer *buf; - unsigned flags; -}; - - -struct pb_validate -{ - struct pb_validate_entry *entries; - unsigned used; - unsigned size; -}; - - -enum pipe_error -pb_validate_add_buffer(struct pb_validate *vl, - struct pb_buffer *buf, - unsigned flags) -{ - assert(buf); - if(!buf) - return PIPE_ERROR; - - assert(flags & PB_USAGE_GPU_READ_WRITE); - assert(!(flags & ~PB_USAGE_GPU_READ_WRITE)); - flags &= PB_USAGE_GPU_READ_WRITE; - - /* We only need to store one reference for each buffer, so avoid storing - * consecutive references for the same buffer. It might not be the most - * common pattern, but it is easy to implement. - */ - if(vl->used && vl->entries[vl->used - 1].buf == buf) { - vl->entries[vl->used - 1].flags |= flags; - return PIPE_OK; - } - - /* Grow the table */ - if(vl->used == vl->size) { - unsigned new_size; - struct pb_validate_entry *new_entries; - - new_size = vl->size * 2; - if(!new_size) - return PIPE_ERROR_OUT_OF_MEMORY; - - new_entries = (struct pb_validate_entry *)REALLOC(vl->entries, - vl->size*sizeof(struct pb_validate_entry), - new_size*sizeof(struct pb_validate_entry)); - if(!new_entries) - return PIPE_ERROR_OUT_OF_MEMORY; - - memset(new_entries + vl->size, 0, (new_size - vl->size)*sizeof(struct pb_validate_entry)); - - vl->size = new_size; - vl->entries = new_entries; - } - - assert(!vl->entries[vl->used].buf); - pb_reference(&vl->entries[vl->used].buf, buf); - vl->entries[vl->used].flags = flags; - ++vl->used; - - return PIPE_OK; -} - - -enum pipe_error -pb_validate_foreach(struct pb_validate *vl, - enum pipe_error (*callback)(struct pb_buffer *buf, void *data), - void *data) -{ - unsigned i; - for(i = 0; i < vl->used; ++i) { - enum pipe_error ret; - ret = callback(vl->entries[i].buf, data); - if(ret != PIPE_OK) - return ret; - } - return PIPE_OK; -} - - -enum pipe_error -pb_validate_validate(struct pb_validate *vl) -{ - unsigned i; - - for(i = 0; i < vl->used; ++i) { - enum pipe_error ret; - ret = pb_validate(vl->entries[i].buf, vl, vl->entries[i].flags); - if(ret != PIPE_OK) { - while(i--) - pb_validate(vl->entries[i].buf, NULL, 0); - return ret; - } - } - - return PIPE_OK; -} - - -void -pb_validate_fence(struct pb_validate *vl, - struct pipe_fence_handle *fence) -{ - unsigned i; - for(i = 0; i < vl->used; ++i) { - pb_fence(vl->entries[i].buf, fence); - pb_reference(&vl->entries[i].buf, NULL); - } - vl->used = 0; -} - - -void -pb_validate_destroy(struct pb_validate *vl) -{ - unsigned i; - for(i = 0; i < vl->used; ++i) - pb_reference(&vl->entries[i].buf, NULL); - FREE(vl->entries); - FREE(vl); -} - - -struct pb_validate * -pb_validate_create() -{ - struct pb_validate *vl; - - vl = CALLOC_STRUCT(pb_validate); - if(!vl) - return NULL; - - vl->size = PB_VALIDATE_INITIAL_SIZE; - vl->entries = (struct pb_validate_entry *)CALLOC(vl->size, sizeof(struct pb_validate_entry)); - if(!vl->entries) { - FREE(vl); - return NULL; - } - - return vl; -} - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_validate.h b/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_validate.h deleted file mode 100644 index 3c93f30f201..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/pipebuffer/pb_validate.h +++ /dev/null @@ -1,97 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Buffer validation. - * - * @author Jose Fonseca - */ - -#ifndef PB_VALIDATE_H_ -#define PB_VALIDATE_H_ - - -#include "pipe/p_compiler.h" -#include "pipe/p_defines.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -struct pb_buffer; -struct pipe_fence_handle; - - -/** - * Buffer validation list. - * - * It holds a list of buffers to be validated and fenced when flushing. - */ -struct pb_validate; - - -enum pipe_error -pb_validate_add_buffer(struct pb_validate *vl, - struct pb_buffer *buf, - unsigned flags); - -enum pipe_error -pb_validate_foreach(struct pb_validate *vl, - enum pipe_error (*callback)(struct pb_buffer *buf, void *data), - void *data); - -/** - * Validate all buffers for hardware access. - * - * Should be called right before issuing commands to the hardware. - */ -enum pipe_error -pb_validate_validate(struct pb_validate *vl); - -/** - * Fence all buffers and clear the list. - * - * Should be called right after issuing commands to the hardware. - */ -void -pb_validate_fence(struct pb_validate *vl, - struct pipe_fence_handle *fence); - -struct pb_validate * -pb_validate_create(void); - -void -pb_validate_destroy(struct pb_validate *vl); - - -#ifdef __cplusplus -} -#endif - -#endif /*PB_VALIDATE_H_*/ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/ADDING b/dll/opengl/mesa/src/gallium/auxiliary/postprocess/ADDING deleted file mode 100644 index 3735835142a..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/ADDING +++ /dev/null @@ -1,87 +0,0 @@ -How to add a new post-processing filter -======================================= - -The Gallium post-processing queue works by passing the current screen to a fragment shader. -These shaders may be written in any supported language, but are added here in TGSI text -assembly. - -You can translate GLSL/ARB fairly easily via llvmpipe (LP_DEBUG=tgsi). I don't know the -status of the D3D state tracker, but if/when that works, I'd assume HLSL would be possible -too. - - - -Steps -===== - -1. Add it to PP -2. Make it known to PP -3. Make it known to driconf -4. ???? -5. Profit - - - - -1. Add it to PP ---------------- - -Once you have the shader(s) in TGSI asm, put them to static const char arrays in a header -file (see pp_colors.h). - -Add the filter's prototypes (main and init functions) to postprocess.h. This is mostly a -copy-paste job with only changing the name. - -Then create a file containing empty main and init functions, named as you specified above. -See pp_colors.c for an example. - - - -2. Make it known to PP ----------------------- - -Add your filter to filters.h, in a correct place. Placement is important, AA should usually -be the last effect in the queue for example. - -Name is the config option your filter will be enabled by, both in driconf and as an env var. - -Inner temp means an intermediate framebuffer you may use in your filter to store -results between passes. If you have a single-pass filter, request 0 of those. - -Shaders is the number of shaders your filter needs. The minimum is 2. - - -You could also write the init and main functions now. If your filter is single-pass without -a vertex shader and any other input than the main screen, you can use pp_nocolor as your -main function as is. - - - -3. Make it known to driconf ---------------------------- - -First time outside of auxiliary/postprocess. First, add a suitable description to -drivers/dri/common/xmlpool/t_options.h, and regenerate options.h by running make in that -directory. Use the name you put into filters.h as the config option name. - -With driconf aware of the option, make Gallium aware of it too. Add it to -state_trackers/dri/common/dri_screen.c in a proper section, specifying its default value and -the accepted range (if applicable). - -Do check that __driNConfigOptions is still correct after the addition. - - - -4. ???? -------- - -Testing, praying, hookers, blow, sacrificial lambs... - - - -5. Profit ---------- - -Assuming you got here, sharing is caring. Send your filter to mesa-dev. - - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/filters.h b/dll/opengl/mesa/src/gallium/auxiliary/postprocess/filters.h deleted file mode 100644 index 2454088707d..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/filters.h +++ /dev/null @@ -1,58 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Lauri Kasanen - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef PP_EXTERNAL_FILTERS_H -#define PP_EXTERNAL_FILTERS_H - -#include "postprocess/postprocess.h" - -typedef void (*pp_init_func) (struct pp_queue_t *, unsigned int, - unsigned int); - -struct pp_filter_t -{ - const char *name; /* Config name */ - unsigned int inner_tmps; /* Request how many inner temps */ - unsigned int shaders; /* Request how many shaders */ - unsigned int verts; /* How many are vertex shaders */ - pp_init_func init; /* Init function */ - pp_func main; /* Run function */ -}; - -/* Order matters. Put new filters in a suitable place. */ - -static const struct pp_filter_t pp_filters[PP_FILTERS] = { -/* name inner shaders verts init run */ - { "pp_noblue", 0, 2, 1, pp_noblue_init, pp_nocolor }, - { "pp_nogreen", 0, 2, 1, pp_nogreen_init, pp_nocolor }, - { "pp_nored", 0, 2, 1, pp_nored_init, pp_nocolor }, - { "pp_celshade", 0, 2, 1, pp_celshade_init, pp_nocolor }, - { "pp_jimenezmlaa", 2, 5, 2, pp_jimenezmlaa_init, pp_jimenezmlaa }, - { "pp_jimenezmlaa_color", 2, 5, 2, pp_jimenezmlaa_init_color, pp_jimenezmlaa_color }, -}; - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/postprocess.h b/dll/opengl/mesa/src/gallium/auxiliary/postprocess/postprocess.h deleted file mode 100644 index dfa15f713ac..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/postprocess.h +++ /dev/null @@ -1,99 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Lauri Kasanen - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef POSTPROCESS_H -#define POSTPROCESS_H - -#include "postprocess/pp_program.h" - -#define PP_FILTERS 6 /* Increment this if you add filters */ -#define PP_MAX_PASSES 6 - -struct pp_queue_t; /* Forward definition */ - -/* Less typing later on */ -typedef void (*pp_func) (struct pp_queue_t *, struct pipe_resource *, - struct pipe_resource *, unsigned int); -/** -* The main post-processing queue. -*/ -struct pp_queue_t -{ - pp_func *pp_queue; /* An array of pp_funcs */ - unsigned int n_filters; /* Number of enabled filters */ - - struct pipe_resource *tmp[2]; /* Two temp FBOs for the queue */ - struct pipe_resource *inner_tmp[3]; /* Three for filter use */ - - unsigned int n_tmp, n_inner_tmp; - - struct pipe_resource *depth; /* depth of original input */ - struct pipe_resource *stencil; /* stencil shared by inner_tmps */ - - struct pipe_surface *tmps[2], *inner_tmps[3], *stencils; - - void ***shaders; /* Shaders in TGSI form */ - unsigned int *verts; - struct program *p; - - bool fbos_init; -}; - -/* Main functions */ - -struct pp_queue_t *pp_init(struct pipe_screen *, const unsigned int *); -void pp_run(struct pp_queue_t *, struct pipe_resource *, - struct pipe_resource *, struct pipe_resource *); -void pp_free(struct pp_queue_t *); -void pp_free_fbos(struct pp_queue_t *); -void pp_debug(const char *, ...); -struct program *pp_init_prog(struct pp_queue_t *, struct pipe_screen *); -void pp_init_fbos(struct pp_queue_t *, unsigned int, unsigned int); - -/* The filters */ - -void pp_nocolor(struct pp_queue_t *, struct pipe_resource *, - struct pipe_resource *, unsigned int); - -void pp_jimenezmlaa(struct pp_queue_t *, struct pipe_resource *, - struct pipe_resource *, unsigned int); -void pp_jimenezmlaa_color(struct pp_queue_t *, struct pipe_resource *, - struct pipe_resource *, unsigned int); - -/* The filter init functions */ - -void pp_celshade_init(struct pp_queue_t *, unsigned int, unsigned int); - -void pp_nored_init(struct pp_queue_t *, unsigned int, unsigned int); -void pp_nogreen_init(struct pp_queue_t *, unsigned int, unsigned int); -void pp_noblue_init(struct pp_queue_t *, unsigned int, unsigned int); - -void pp_jimenezmlaa_init(struct pp_queue_t *, unsigned int, unsigned int); -void pp_jimenezmlaa_init_color(struct pp_queue_t *, unsigned int, - unsigned int); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_celshade.c b/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_celshade.c deleted file mode 100644 index 4454764ea84..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_celshade.c +++ /dev/null @@ -1,38 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Lauri Kasanen - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "postprocess/postprocess.h" -#include "postprocess/pp_celshade.h" -#include "postprocess/pp_filters.h" - -/** Init function */ -void -pp_celshade_init(struct pp_queue_t *ppq, unsigned int n, unsigned int val) -{ - ppq->shaders[n][1] = - pp_tgsi_to_state(ppq->p->pipe, celshade, false, "celshade"); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_celshade.h b/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_celshade.h deleted file mode 100644 index 536ac7f1f1c..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_celshade.h +++ /dev/null @@ -1,79 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Lauri Kasanen - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef CELSHADE_H -#define CELSHADE_H - -static const char celshade[] = "FRAG\n" - "PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n" - "DCL IN[0], GENERIC[0], PERSPECTIVE\n" - "DCL OUT[0], COLOR\n" - "DCL SAMP[0]\n" - "DCL TEMP[0..4]\n" - "IMM FLT32 { 0.2126, 0.7152, 0.0722, 4.0000}\n" - "IMM FLT32 { 0.5000, 2.0000, 1.0000, -0.1250}\n" - "IMM FLT32 { 0.2500, 0.1000, 0.1250, 3.0000}\n" - " 0: TEX TEMP[0], IN[0].xyyy, SAMP[0], 2D\n" - " 1: DP3 TEMP[1].x, TEMP[0].xyzz, IMM[0]\n" - " 2: MUL TEMP[3].x, TEMP[1].xxxx, IMM[0].wwww\n" - " 3: ROUND TEMP[2].x, TEMP[3].xxxx\n" - " 4: MUL TEMP[3].x, TEMP[2].xxxx, IMM[2].xxxx\n" - " 5: MOV TEMP[2].x, TEMP[3].xxxx\n" - " 6: ADD TEMP[4].x, TEMP[1].xxxx, -TEMP[3].xxxx\n" - " 7: SGT TEMP[1].w, TEMP[4].xxxx, IMM[2].yyyy\n" - " 8: IF TEMP[1].wwww :19\n" - " 9: ADD TEMP[4].y, TEMP[3].xxxx, IMM[2].yyyy\n" - " 10: ADD TEMP[1].z, TEMP[1].xxxx, -TEMP[4].yyyy\n" - " 11: ADD TEMP[1].y, TEMP[3].xxxx, IMM[2].zzzz\n" - " 12: ADD TEMP[2].x, TEMP[1].yyyy, -TEMP[4].yyyy\n" - " 13: RCP TEMP[4].y, TEMP[2].xxxx\n" - " 14: MUL TEMP[2].x, TEMP[1].zzzz, TEMP[4].yyyy\n" - " 15: MAD TEMP[1].y, -IMM[1].yyyy, TEMP[2].xxxx, IMM[2].wwww\n" - " 16: MUL TEMP[1].z, TEMP[2].xxxx, TEMP[1].yyyy\n" - " 17: MUL TEMP[1].y, TEMP[2].xxxx, TEMP[1].zzzz\n" - " 18: MAD TEMP[2].x, TEMP[1].yyyy, IMM[2].zzzz, TEMP[3].xxxx\n" - " 19: ENDIF\n" - " 20: SLT TEMP[3].x, TEMP[4].xxxx, -IMM[2].yyyy\n" - " 21: IF TEMP[3].xxxx :34\n" - " 22: ADD TEMP[3].x, TEMP[2].xxxx, -IMM[2].zzzz\n" - " 23: ADD TEMP[4].x, TEMP[1].xxxx, -TEMP[3].xxxx\n" - " 24: ADD TEMP[1].x, TEMP[2].xxxx, -IMM[2].yyyy\n" - " 25: ADD TEMP[4].y, TEMP[1].xxxx, -TEMP[3].xxxx\n" - " 26: RCP TEMP[3].x, TEMP[4].yyyy\n" - " 27: MUL TEMP[1].x, TEMP[4].xxxx, TEMP[3].xxxx\n" - " 28: MAD TEMP[4].x, -IMM[1].yyyy, TEMP[1].xxxx, IMM[2].wwww\n" - " 29: MUL TEMP[3].x, TEMP[1].xxxx, TEMP[4].xxxx\n" - " 30: MUL TEMP[4].x, TEMP[1].xxxx, TEMP[3].xxxx\n" - " 31: ADD TEMP[3].x, IMM[1].zzzz, -TEMP[4].xxxx\n" - " 32: MAD TEMP[1].x, TEMP[3].xxxx, -IMM[2].zzzz, TEMP[2].xxxx\n" - " 33: MOV TEMP[2].x, TEMP[1].xxxx\n" - " 34: ENDIF\n" - " 35: MAD TEMP[1].x, TEMP[2].xxxx, IMM[1].yyyy, IMM[2].yyyy\n" - " 36: MUL OUT[0], TEMP[0], TEMP[1].xxxx\n" - " 37: END\n"; - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_colors.c b/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_colors.c deleted file mode 100644 index 36bb1f552f5..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_colors.c +++ /dev/null @@ -1,80 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Lauri Kasanen - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "postprocess/postprocess.h" -#include "postprocess/pp_colors.h" -#include "postprocess/pp_filters.h" - -/** The run function of the color filters */ -void -pp_nocolor(struct pp_queue_t *ppq, struct pipe_resource *in, - struct pipe_resource *out, unsigned int n) -{ - - struct program *p = ppq->p; - - pp_filter_setup_in(p, in); - pp_filter_setup_out(p, out); - - pp_filter_set_fb(p); - pp_filter_misc_state(p); - - cso_single_sampler(p->cso, 0, &p->sampler_point); - cso_single_sampler_done(p->cso); - cso_set_fragment_sampler_views(p->cso, 1, &p->view); - - cso_set_vertex_shader_handle(p->cso, ppq->shaders[n][0]); - cso_set_fragment_shader_handle(p->cso, ppq->shaders[n][1]); - - pp_filter_draw(p); - pp_filter_end_pass(p); -} - - -/* Init functions */ - -void -pp_nored_init(struct pp_queue_t *ppq, unsigned int n, unsigned int val) -{ - ppq->shaders[n][1] = pp_tgsi_to_state(ppq->p->pipe, nored, false, "nored"); -} - - -void -pp_nogreen_init(struct pp_queue_t *ppq, unsigned int n, unsigned int val) -{ - ppq->shaders[n][1] = - pp_tgsi_to_state(ppq->p->pipe, nogreen, false, "nogreen"); -} - - -void -pp_noblue_init(struct pp_queue_t *ppq, unsigned int n, unsigned int val) -{ - ppq->shaders[n][1] = - pp_tgsi_to_state(ppq->p->pipe, noblue, false, "noblue"); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_colors.h b/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_colors.h deleted file mode 100644 index 588cd2f0c52..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_colors.h +++ /dev/null @@ -1,69 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Lauri Kasanen - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef PP_COLORS_H -#define PP_COLORS_H - -static const char nored[] = "FRAG\n" - "PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n" - "DCL IN[0], GENERIC[0], PERSPECTIVE\n" - "DCL OUT[0], COLOR\n" - "DCL SAMP[0]\n" - "DCL TEMP[0]\n" - "IMM FLT32 { 0.0000, 0.0000, 0.0000, 0.0000}\n" - " 0: TEX TEMP[0], IN[0].xyyy, SAMP[0], 2D\n" - " 1: MOV TEMP[0].x, IMM[0].xxxx\n" - " 2: MOV OUT[0], TEMP[0]\n" - " 3: END\n"; - - -static const char nogreen[] = "FRAG\n" - "PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n" - "DCL IN[0], GENERIC[0], PERSPECTIVE\n" - "DCL OUT[0], COLOR\n" - "DCL SAMP[0]\n" - "DCL TEMP[0]\n" - "IMM FLT32 { 0.0000, 0.0000, 0.0000, 0.0000}\n" - " 0: TEX TEMP[0], IN[0].xyyy, SAMP[0], 2D\n" - " 1: MOV TEMP[0].y, IMM[0].xxxx\n" - " 2: MOV OUT[0], TEMP[0]\n" - " 3: END\n"; - - -static const char noblue[] = "FRAG\n" - "PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n" - "DCL IN[0], GENERIC[0], PERSPECTIVE\n" - "DCL OUT[0], COLOR\n" - "DCL SAMP[0]\n" - "DCL TEMP[0]\n" - "IMM FLT32 { 0.0000, 0.0000, 0.0000, 0.0000}\n" - " 0: TEX TEMP[0], IN[0].xyyy, SAMP[0], 2D\n" - " 1: MOV TEMP[0].z, IMM[0].xxxx\n" - " 2: MOV OUT[0], TEMP[0]\n" - " 3: END\n"; - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_filters.h b/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_filters.h deleted file mode 100644 index 0e34bb6d20f..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_filters.h +++ /dev/null @@ -1,57 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Lauri Kasanen - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef PP_FILTERS_H -#define PP_FILTERS_H - -/* Internal include, mainly for the filters */ - -#include "cso_cache/cso_context.h" -#include "pipe/p_context.h" -#include "pipe/p_shader_tokens.h" -#include "pipe/p_state.h" -#include "tgsi/tgsi_text.h" -#include "util/u_memory.h" -#include "util/u_draw_quad.h" - -#define PP_MAX_TOKENS 2048 - - -/* Helper functions for the filters */ - -void pp_filter_setup_in(struct program *, struct pipe_resource *); -void pp_filter_setup_out(struct program *, struct pipe_resource *); -void pp_filter_end_pass(struct program *); -void *pp_tgsi_to_state(struct pipe_context *, const char *, bool, - const char *); -void pp_filter_misc_state(struct program *); -void pp_filter_draw(struct program *); -void pp_filter_set_fb(struct program *); -void pp_filter_set_clear_fb(struct program *); - - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_init.c b/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_init.c deleted file mode 100644 index e2068c25e5b..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_init.c +++ /dev/null @@ -1,279 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Lauri Kasanen - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "pipe/p_compiler.h" - -#include "postprocess/filters.h" - -#include "pipe/p_screen.h" -#include "util/u_inlines.h" -#include "util/u_blit.h" -#include "util/u_math.h" -#include "util/u_debug.h" -#include "util/u_memory.h" -#include "cso_cache/cso_context.h" - -/** Initialize the post-processing queue. */ -struct pp_queue_t * -pp_init(struct pipe_screen *pscreen, const unsigned int *enabled) -{ - - unsigned int curpos = 0, i, tmp_req = 0; - struct pp_queue_t *ppq; - pp_func *tmp_q; - - pp_debug("Initializing the post-processing queue.\n"); - - /* How many filters were requested? */ - for (i = 0; i < PP_FILTERS; i++) { - if (enabled[i]) - curpos++; - } - if (!curpos) - return NULL; - - ppq = CALLOC(1, sizeof(struct pp_queue_t)); - tmp_q = CALLOC(curpos, sizeof(pp_func)); - ppq->shaders = CALLOC(curpos, sizeof(void *)); - ppq->verts = CALLOC(curpos, sizeof(unsigned int)); - - if (!tmp_q || !ppq || !ppq->shaders || !ppq->verts) - goto error; - - ppq->p = pp_init_prog(ppq, pscreen); - if (!ppq->p) - goto error; - - /* Add the enabled filters to the queue, in order */ - curpos = 0; - ppq->pp_queue = tmp_q; - for (i = 0; i < PP_FILTERS; i++) { - if (enabled[i]) { - ppq->pp_queue[curpos] = pp_filters[i].main; - tmp_req = MAX2(tmp_req, pp_filters[i].inner_tmps); - - if (pp_filters[i].shaders) { - ppq->shaders[curpos] = - CALLOC(pp_filters[i].shaders + 1, sizeof(void *)); - ppq->verts[curpos] = pp_filters[i].verts; - if (!ppq->shaders[curpos]) - goto error; - } - pp_filters[i].init(ppq, curpos, enabled[i]); - - curpos++; - } - } - - ppq->p->blitctx = util_create_blit(ppq->p->pipe, ppq->p->cso); - if (!ppq->p->blitctx) - goto error; - - ppq->n_filters = curpos; - ppq->n_tmp = (curpos > 2 ? 2 : 1); - ppq->n_inner_tmp = tmp_req; - - ppq->fbos_init = false; - - for (i = 0; i < curpos; i++) - ppq->shaders[i][0] = ppq->p->passvs; - - pp_debug("Queue successfully allocated. %u filter(s).\n", curpos); - - return ppq; - - error: - pp_debug("Error setting up pp\n"); - - if (ppq) - FREE(ppq->p); - FREE(ppq); - FREE(tmp_q); - - return NULL; -} - -/** Free any allocated FBOs (temp buffers). Called after resizing for example. */ -void -pp_free_fbos(struct pp_queue_t *ppq) -{ - - unsigned int i; - - if (!ppq->fbos_init) - return; - - for (i = 0; i < ppq->n_tmp; i++) { - pipe_surface_reference(&ppq->tmps[i], NULL); - pipe_resource_reference(&ppq->tmp[i], NULL); - } - for (i = 0; i < ppq->n_inner_tmp; i++) { - pipe_surface_reference(&ppq->inner_tmps[i], NULL); - pipe_resource_reference(&ppq->inner_tmp[i], NULL); - } - pipe_surface_reference(&ppq->stencils, NULL); - pipe_resource_reference(&ppq->stencil, NULL); - - ppq->fbos_init = false; -} - -/** Free the pp queue. Called on context termination. */ -void -pp_free(struct pp_queue_t *ppq) -{ - - unsigned int i, j; - - pp_free_fbos(ppq); - - util_destroy_blit(ppq->p->blitctx); - - cso_set_fragment_sampler_views(ppq->p->cso, 0, NULL); - cso_release_all(ppq->p->cso); - - for (i = 0; i < ppq->n_filters; i++) { - for (j = 0; j < PP_MAX_PASSES && ppq->shaders[i][j]; j++) { - if (j >= ppq->verts[i]) { - ppq->p->pipe->delete_fs_state(ppq->p->pipe, ppq->shaders[i][j]); - ppq->shaders[i][j] = NULL; - } - else if (ppq->shaders[i][j] != ppq->p->passvs) { - ppq->p->pipe->delete_vs_state(ppq->p->pipe, ppq->shaders[i][j]); - ppq->shaders[i][j] = NULL; - } - } - } - - cso_destroy_context(ppq->p->cso); - ppq->p->pipe->destroy(ppq->p->pipe); - - FREE(ppq->p); - FREE(ppq->pp_queue); - FREE(ppq); - - pp_debug("Queue taken down.\n"); -} - -/** Internal debug function. Should be available to final users. */ -void -pp_debug(const char *fmt, ...) -{ - va_list ap; - - if (!debug_get_bool_option("PP_DEBUG", FALSE)) - return; - - va_start(ap, fmt); - _debug_vprintf(fmt, ap); - va_end(ap); -} - -/** Allocate the temp FBOs. Called on makecurrent and resize. */ -void -pp_init_fbos(struct pp_queue_t *ppq, unsigned int w, - unsigned int h) -{ - - struct program *p = ppq->p; /* The lazy will inherit the earth */ - - unsigned int i; - struct pipe_resource tmp_res; - - if (ppq->fbos_init) - return; - - pp_debug("Initializing FBOs, size %ux%u\n", w, h); - pp_debug("Requesting %u temps and %u inner temps\n", ppq->n_tmp, - ppq->n_inner_tmp); - - memset(&tmp_res, 0, sizeof(tmp_res)); - tmp_res.target = PIPE_TEXTURE_2D; - tmp_res.format = p->surf.format = PIPE_FORMAT_B8G8R8A8_UNORM; - tmp_res.width0 = w; - tmp_res.height0 = h; - tmp_res.depth0 = 1; - tmp_res.array_size = 1; - tmp_res.last_level = 0; - tmp_res.bind = p->surf.usage = PIPE_BIND_RENDER_TARGET; - - if (!p->screen->is_format_supported(p->screen, tmp_res.format, - tmp_res.target, 1, tmp_res.bind)) - pp_debug("Temp buffers' format fail\n"); - - for (i = 0; i < ppq->n_tmp; i++) { - ppq->tmp[i] = p->screen->resource_create(p->screen, &tmp_res); - ppq->tmps[i] = p->pipe->create_surface(p->pipe, ppq->tmp[i], &p->surf); - - if (!ppq->tmp[i] || !ppq->tmps[i]) - goto error; - } - - for (i = 0; i < ppq->n_inner_tmp; i++) { - ppq->inner_tmp[i] = p->screen->resource_create(p->screen, &tmp_res); - ppq->inner_tmps[i] = p->pipe->create_surface(p->pipe, - ppq->inner_tmp[i], - &p->surf); - - if (!ppq->inner_tmp[i] || !ppq->inner_tmps[i]) - goto error; - } - - tmp_res.bind = p->surf.usage = PIPE_BIND_DEPTH_STENCIL; - - tmp_res.format = p->surf.format = PIPE_FORMAT_S8_UINT_Z24_UNORM; - - if (!p->screen->is_format_supported(p->screen, tmp_res.format, - tmp_res.target, 1, tmp_res.bind)) { - - tmp_res.format = p->surf.format = PIPE_FORMAT_Z24_UNORM_S8_UINT; - - if (!p->screen->is_format_supported(p->screen, tmp_res.format, - tmp_res.target, 1, tmp_res.bind)) - pp_debug("Temp Sbuffer format fail\n"); - } - - ppq->stencil = p->screen->resource_create(p->screen, &tmp_res); - ppq->stencils = p->pipe->create_surface(p->pipe, ppq->stencil, &p->surf); - if (!ppq->stencil || !ppq->stencils) - goto error; - - - p->framebuffer.width = w; - p->framebuffer.height = h; - - p->viewport.scale[0] = p->viewport.translate[0] = (float) w / 2.0; - p->viewport.scale[1] = p->viewport.translate[1] = (float) h / 2.0; - p->viewport.scale[3] = 1.0f; - p->viewport.translate[3] = 0.0f; - - ppq->fbos_init = true; - - return; - - error: - pp_debug("Failed to allocate temp buffers!\n"); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_mlaa.c b/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_mlaa.c deleted file mode 100644 index 51bc02edacc..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_mlaa.c +++ /dev/null @@ -1,307 +0,0 @@ -/** - * Copyright (C) 2010 Jorge Jimenez (jorge@iryoku.com) - * Copyright (C) 2010 Belen Masia (bmasia@unizar.es) - * Copyright (C) 2010 Jose I. Echevarria (joseignacioechevarria@gmail.com) - * Copyright (C) 2010 Fernando Navarro (fernandn@microsoft.com) - * Copyright (C) 2010 Diego Gutierrez (diegog@unizar.es) - * Copyright (C) 2011 Lauri Kasanen (cand@gmx.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the following statement: - * - * "Uses Jimenez's MLAA. Copyright (C) 2010 by Jorge Jimenez, Belen Masia, - * Jose I. Echevarria, Fernando Navarro and Diego Gutierrez." - * - * Only for use in the Mesa project, this point 2 is filled by naming the - * technique Jimenez's MLAA in the Mesa config options. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS - * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are - * those of the authors and should not be interpreted as representing official - * policies, either expressed or implied, of the copyright holders. - */ - -#include "pipe/p_compiler.h" - -#include "postprocess/postprocess.h" -#include "postprocess/pp_mlaa.h" -#include "postprocess/pp_filters.h" -#include "util/u_blit.h" -#include "util/u_box.h" -#include "util/u_sampler.h" -#include "util/u_inlines.h" -#include "util/u_memory.h" -#include "util/u_string.h" -#include "pipe/p_screen.h" - -#define IMM_SPACE 80 - -static float constants[] = { 1, 1, 0, 0 }; -static unsigned int dimensions[2] = { 0, 0 }; - -static struct pipe_resource *constbuf, *areamaptex; - -/** Upload the constants. */ -static void -up_consts(struct pipe_context *pipe) -{ - struct pipe_box box; - - u_box_2d(0, 0, sizeof(constants), 1, &box); - pipe->transfer_inline_write(pipe, constbuf, 0, PIPE_TRANSFER_WRITE, - &box, constants, sizeof(constants), - sizeof(constants)); -} - -/** Run function of the MLAA filter. */ -static void -pp_jimenezmlaa_run(struct pp_queue_t *ppq, struct pipe_resource *in, - struct pipe_resource *out, unsigned int n, bool iscolor) -{ - - struct program *p = ppq->p; - - struct pipe_depth_stencil_alpha_state mstencil; - struct pipe_sampler_view v_tmp, *arr[3]; - - unsigned int w = p->framebuffer.width; - unsigned int h = p->framebuffer.height; - - const struct pipe_stencil_ref ref = { {1} }; - memset(&mstencil, 0, sizeof(mstencil)); - cso_set_stencil_ref(p->cso, &ref); - - /* Init the pixel size constant */ - if (dimensions[0] != p->framebuffer.width || - dimensions[1] != p->framebuffer.height) { - constants[0] = 1.0 / p->framebuffer.width; - constants[1] = 1.0 / p->framebuffer.height; - - up_consts(p->pipe); - dimensions[0] = p->framebuffer.width; - dimensions[1] = p->framebuffer.height; - } - - p->pipe->set_constant_buffer(p->pipe, PIPE_SHADER_VERTEX, 0, constbuf); - p->pipe->set_constant_buffer(p->pipe, PIPE_SHADER_FRAGMENT, 0, constbuf); - - mstencil.stencil[0].enabled = 1; - mstencil.stencil[0].valuemask = mstencil.stencil[0].writemask = ~0; - mstencil.stencil[0].func = PIPE_FUNC_ALWAYS; - mstencil.stencil[0].fail_op = PIPE_STENCIL_OP_KEEP; - mstencil.stencil[0].zfail_op = PIPE_STENCIL_OP_KEEP; - mstencil.stencil[0].zpass_op = PIPE_STENCIL_OP_REPLACE; - - p->framebuffer.zsbuf = ppq->stencils; - - /* First pass: depth edge detection */ - if (iscolor) - pp_filter_setup_in(p, in); - else - pp_filter_setup_in(p, ppq->depth); - - pp_filter_setup_out(p, ppq->inner_tmp[0]); - - pp_filter_set_fb(p); - pp_filter_misc_state(p); - cso_set_depth_stencil_alpha(p->cso, &mstencil); - p->pipe->clear(p->pipe, PIPE_CLEAR_STENCIL | PIPE_CLEAR_COLOR, - &p->clear_color, 0, 0); - - cso_single_sampler(p->cso, 0, &p->sampler_point); - cso_single_sampler_done(p->cso); - cso_set_fragment_sampler_views(p->cso, 1, &p->view); - - cso_set_vertex_shader_handle(p->cso, ppq->shaders[n][1]); /* offsetvs */ - cso_set_fragment_shader_handle(p->cso, ppq->shaders[n][2]); - - pp_filter_draw(p); - pp_filter_end_pass(p); - - - /* Second pass: blend weights */ - /* Sampler order: areamap, edgesmap, edgesmapL (reversed, thx compiler) */ - mstencil.stencil[0].func = PIPE_FUNC_EQUAL; - mstencil.stencil[0].zpass_op = PIPE_STENCIL_OP_KEEP; - cso_set_depth_stencil_alpha(p->cso, &mstencil); - - pp_filter_setup_in(p, areamaptex); - pp_filter_setup_out(p, ppq->inner_tmp[1]); - - u_sampler_view_default_template(&v_tmp, ppq->inner_tmp[0], - ppq->inner_tmp[0]->format); - arr[1] = arr[2] = p->pipe->create_sampler_view(p->pipe, - ppq->inner_tmp[0], &v_tmp); - - pp_filter_set_clear_fb(p); - - cso_single_sampler(p->cso, 0, &p->sampler_point); - cso_single_sampler(p->cso, 1, &p->sampler_point); - cso_single_sampler(p->cso, 2, &p->sampler); - cso_single_sampler_done(p->cso); - - arr[0] = p->view; - cso_set_fragment_sampler_views(p->cso, 3, arr); - - cso_set_vertex_shader_handle(p->cso, ppq->shaders[n][0]); /* passvs */ - cso_set_fragment_shader_handle(p->cso, ppq->shaders[n][3]); - - pp_filter_draw(p); - pp_filter_end_pass(p); - pipe_sampler_view_reference(&arr[1], NULL); - - - /* Third pass: smoothed edges */ - /* Sampler order: colormap, blendmap (wtf compiler) */ - pp_filter_setup_in(p, ppq->inner_tmp[1]); - pp_filter_setup_out(p, out); - - pp_filter_set_fb(p); - - /* Blit the input to the output */ - util_blit_pixels(p->blitctx, in, 0, 0, 0, - w, h, 0, p->framebuffer.cbufs[0], - 0, 0, w, h, 0, PIPE_TEX_MIPFILTER_NEAREST); - - u_sampler_view_default_template(&v_tmp, in, in->format); - arr[0] = p->pipe->create_sampler_view(p->pipe, in, &v_tmp); - - cso_single_sampler(p->cso, 0, &p->sampler_point); - cso_single_sampler(p->cso, 1, &p->sampler_point); - cso_single_sampler_done(p->cso); - - arr[1] = p->view; - cso_set_fragment_sampler_views(p->cso, 2, arr); - - cso_set_vertex_shader_handle(p->cso, ppq->shaders[n][1]); /* offsetvs */ - cso_set_fragment_shader_handle(p->cso, ppq->shaders[n][4]); - - p->blend.rt[0].blend_enable = 1; - cso_set_blend(p->cso, &p->blend); - - pp_filter_draw(p); - pp_filter_end_pass(p); - pipe_sampler_view_reference(&arr[0], NULL); - - p->blend.rt[0].blend_enable = 0; - p->framebuffer.zsbuf = NULL; -} - -/** The init function of the MLAA filter. */ -static void -pp_jimenezmlaa_init_run(struct pp_queue_t *ppq, unsigned int n, - unsigned int val, bool iscolor) -{ - - struct pipe_box box; - struct pipe_resource res; - char *tmp_text; - - constbuf = pipe_buffer_create(ppq->p->screen, PIPE_BIND_CONSTANT_BUFFER, - PIPE_USAGE_STATIC, sizeof(constants)); - if (!constbuf) { - pp_debug("Failed to allocate constant buffer\n"); - return; - } - - - pp_debug("mlaa: using %u max search steps\n", val); - - tmp_text = CALLOC(sizeof(blend2fs_1) + sizeof(blend2fs_2) + - IMM_SPACE, sizeof(char)); - - if (!tmp_text) { - pp_debug("Failed to allocate shader space\n"); - return; - } - util_sprintf(tmp_text, "%s" - "IMM FLT32 { %.8f, 0.0000, 0.0000, 0.0000}\n" - "%s\n", blend2fs_1, (float) val, blend2fs_2); - - memset(&res, 0, sizeof(res)); - - res.target = PIPE_TEXTURE_2D; - res.format = PIPE_FORMAT_R8G8_UNORM; - res.width0 = res.height0 = 165; - res.bind = PIPE_BIND_SAMPLER_VIEW; - res.usage = PIPE_USAGE_STATIC; - res.depth0 = res.array_size = res.nr_samples = 1; - - if (!ppq->p->screen->is_format_supported(ppq->p->screen, res.format, - res.target, 1, res.bind)) - pp_debug("Areamap format not supported\n"); - - areamaptex = ppq->p->screen->resource_create(ppq->p->screen, &res); - u_box_2d(0, 0, 165, 165, &box); - - ppq->p->pipe->transfer_inline_write(ppq->p->pipe, areamaptex, 0, - PIPE_TRANSFER_WRITE, &box, - areamap, 165 * 2, sizeof(areamap)); - - - - ppq->shaders[n][1] = pp_tgsi_to_state(ppq->p->pipe, offsetvs, true, - "offsetvs"); - if (iscolor) - ppq->shaders[n][2] = pp_tgsi_to_state(ppq->p->pipe, color1fs, - false, "color1fs"); - else - ppq->shaders[n][2] = pp_tgsi_to_state(ppq->p->pipe, depth1fs, - false, "depth1fs"); - ppq->shaders[n][3] = pp_tgsi_to_state(ppq->p->pipe, tmp_text, false, - "blend2fs"); - ppq->shaders[n][4] = pp_tgsi_to_state(ppq->p->pipe, neigh3fs, false, - "neigh3fs"); - - FREE(tmp_text); -} - -/** Short wrapper to init the depth version. */ -void -pp_jimenezmlaa_init(struct pp_queue_t *ppq, unsigned int n, unsigned int val) -{ - - pp_jimenezmlaa_init_run(ppq, n, val, false); -} - -/** Short wrapper to init the color version. */ -void -pp_jimenezmlaa_init_color(struct pp_queue_t *ppq, unsigned int n, - unsigned int val) -{ - - pp_jimenezmlaa_init_run(ppq, n, val, true); -} - -/** Short wrapper to run the depth version. */ -void -pp_jimenezmlaa(struct pp_queue_t *ppq, struct pipe_resource *in, - struct pipe_resource *out, unsigned int n) -{ - pp_jimenezmlaa_run(ppq, in, out, n, false); -} - -/** Short wrapper to run the color version. */ -void -pp_jimenezmlaa_color(struct pp_queue_t *ppq, struct pipe_resource *in, - struct pipe_resource *out, unsigned int n) -{ - pp_jimenezmlaa_run(ppq, in, out, n, true); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_mlaa.h b/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_mlaa.h deleted file mode 100644 index 9972d59c6a6..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_mlaa.h +++ /dev/null @@ -1,342 +0,0 @@ -/** - * Copyright (C) 2010 Jorge Jimenez (jorge@iryoku.com) - * Copyright (C) 2010 Belen Masia (bmasia@unizar.es) - * Copyright (C) 2010 Jose I. Echevarria (joseignacioechevarria@gmail.com) - * Copyright (C) 2010 Fernando Navarro (fernandn@microsoft.com) - * Copyright (C) 2010 Diego Gutierrez (diegog@unizar.es) - * Copyright (C) 2011 Lauri Kasanen (cand@gmx.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the following statement: - * - * "Uses Jimenez's MLAA. Copyright (C) 2010 by Jorge Jimenez, Belen Masia, - * Jose I. Echevarria, Fernando Navarro and Diego Gutierrez." - * - * Only for use in the Mesa project, this point 2 is filled by naming the - * technique Jimenez's MLAA in the Mesa config options. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS - * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are - * those of the authors and should not be interpreted as representing official - * policies, either expressed or implied, of the copyright holders. - */ - -#ifndef PP_MLAA_H -#define PP_MLAA_H - -#include "postprocess/pp_mlaa_areamap.h" - -static const char depth1fs[] = "FRAG\n" - "PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n" - "DCL IN[0], GENERIC[0], PERSPECTIVE\n" - "DCL IN[1], GENERIC[10], PERSPECTIVE\n" - "DCL IN[2], GENERIC[11], PERSPECTIVE\n" - "DCL OUT[0], COLOR\n" - "DCL SAMP[0]\n" - "DCL TEMP[0..2]\n" - "IMM FLT32 { 0.0030, 0.0000, 1.0000, 0.0000}\n" - " 0: TEX TEMP[0].x, IN[1].xyyy, SAMP[0], 2D\n" - " 1: MOV TEMP[1].x, TEMP[0].xxxx\n" - " 2: TEX TEMP[0].x, IN[1].zwww, SAMP[0], 2D\n" - " 3: MOV TEMP[1].y, TEMP[0].xxxx\n" - " 4: TEX TEMP[0].x, IN[2].xyyy, SAMP[0], 2D\n" - " 5: MOV TEMP[1].z, TEMP[0].xxxx\n" - " 6: TEX TEMP[0].x, IN[2].zwww, SAMP[0], 2D\n" - " 7: MOV TEMP[1].w, TEMP[0].xxxx\n" - " 8: TEX TEMP[0].x, IN[0].xyyy, SAMP[0], 2D\n" - " 9: ADD TEMP[2], TEMP[0].xxxx, -TEMP[1]\n" - " 10: ABS TEMP[0], TEMP[2]\n" - " 11: SGE TEMP[2], TEMP[0], IMM[0].xxxx\n" - " 12: DP4 TEMP[0].x, TEMP[2], IMM[0].zzzz\n" - " 13: SEQ TEMP[1].x, TEMP[0].xxxx, IMM[0].yyyy\n" - " 14: IF TEMP[1].xxxx :16\n" - " 15: KILP\n" - " 16: ENDIF\n" - " 17: MOV OUT[0], TEMP[2]\n" - " 18: END\n"; - - -static const char color1fs[] = "FRAG\n" - "PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n" - "DCL IN[0], GENERIC[0], PERSPECTIVE\n" - "DCL IN[1], GENERIC[10], PERSPECTIVE\n" - "DCL IN[2], GENERIC[11], PERSPECTIVE\n" - "DCL OUT[0], COLOR\n" - "DCL SAMP[0]\n" - "DCL TEMP[0..2]\n" - "IMM FLT32 { 0.2126, 0.7152, 0.0722, 0.1000}\n" - "IMM FLT32 { 1.0000, 0.0000, 0.0000, 0.0000}\n" - " 0: TEX TEMP[1].xyz, IN[1].xyyy, SAMP[0], 2D\n" - " 1: DP3 TEMP[0].x, TEMP[1].xyzz, IMM[0]\n" - " 2: TEX TEMP[1].xyz, IN[1].zwww, SAMP[0], 2D\n" - " 3: DP3 TEMP[0].y, TEMP[1].xyzz, IMM[0].xyzz\n" - " 4: TEX TEMP[1].xyz, IN[2].xyyy, SAMP[0], 2D\n" - " 5: DP3 TEMP[0].z, TEMP[1].xyzz, IMM[0].xyzz\n" - " 6: TEX TEMP[1].xyz, IN[2].zwww, SAMP[0], 2D\n" - " 7: DP3 TEMP[0].w, TEMP[1].xyzz, IMM[0].xyzz\n" - " 8: TEX TEMP[1].xyz, IN[0].xyyy, SAMP[0], 2D\n" - " 9: DP3 TEMP[2].x, TEMP[1].xyzz, IMM[0].xyzz\n" - " 10: ADD TEMP[1], TEMP[2].xxxx, -TEMP[0]\n" - " 11: ABS TEMP[0], TEMP[1]\n" - " 12: SGE TEMP[2], TEMP[0], IMM[0].wwww\n" - " 13: DP4 TEMP[0].x, TEMP[2], IMM[1].xxxx\n" - " 14: SEQ TEMP[1].x, TEMP[0].xxxx, IMM[1].yyyy\n" - " 15: IF TEMP[1].xxxx :17\n" - " 16: KILP\n" - " 17: ENDIF\n" - " 18: MOV OUT[0], TEMP[2]\n" - " 19: END\n"; - - -static const char neigh3fs[] = "FRAG\n" - "PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n" - "DCL IN[0], GENERIC[0], PERSPECTIVE\n" - "DCL IN[1], GENERIC[10], PERSPECTIVE\n" - "DCL IN[2], GENERIC[11], PERSPECTIVE\n" - "DCL OUT[0], COLOR\n" - "DCL SAMP[0]\n" - "DCL SAMP[1]\n" - "DCL TEMP[0..8]\n" - "IMM FLT32 { 1.0000, 0.00001, 0.0000, 0.0000}\n" - " 0: TEX TEMP[0], IN[0].xyyy, SAMP[1], 2D\n" - " 1: MOV TEMP[1].x, TEMP[0].xxxx\n" - " 2: TEX TEMP[2].y, IN[2].zwww, SAMP[1], 2D\n" - " 3: MOV TEMP[1].y, TEMP[2].yyyy\n" - " 4: MOV TEMP[1].z, TEMP[0].zzzz\n" - " 5: TEX TEMP[1].w, IN[2].xyyy, SAMP[1], 2D\n" - " 6: MUL TEMP[4], TEMP[1], TEMP[1]\n" - " 7: MUL TEMP[5], TEMP[4], TEMP[1]\n" - " 8: DP4 TEMP[1].x, TEMP[5], IMM[0].xxxx\n" - " 9: SLT TEMP[4].x, TEMP[1].xxxx, IMM[0].yyyy\n" - " 10: IF TEMP[4].xxxx :12\n" - " 11: KILP\n" - " 12: ENDIF\n" - " 13: TEX TEMP[4], IN[0].xyyy, SAMP[0], 2D\n" - " 14: TEX TEMP[6], IN[1].zwww, SAMP[0], 2D\n" - " 15: ADD TEMP[7].x, IMM[0].xxxx, -TEMP[0].xxxx\n" - " 16: MUL TEMP[8], TEMP[4], TEMP[7].xxxx\n" - " 17: MAD TEMP[7], TEMP[6], TEMP[0].xxxx, TEMP[8]\n" - " 18: MUL TEMP[6], TEMP[7], TEMP[5].xxxx\n" - " 19: TEX TEMP[7], IN[2].zwww, SAMP[0], 2D\n" - " 20: ADD TEMP[8].x, IMM[0].xxxx, -TEMP[2].yyyy\n" - " 21: MUL TEMP[3], TEMP[4], TEMP[8].xxxx\n" - " 22: MAD TEMP[8], TEMP[7], TEMP[2].yyyy, TEMP[3]\n" - " 23: MAD TEMP[2], TEMP[8], TEMP[5].yyyy, TEMP[6]\n" - " 24: TEX TEMP[6], IN[1].xyyy, SAMP[0], 2D\n" - " 25: ADD TEMP[7].x, IMM[0].xxxx, -TEMP[0].zzzz\n" - " 26: MUL TEMP[8], TEMP[4], TEMP[7].xxxx\n" - " 27: MAD TEMP[7], TEMP[6], TEMP[0].zzzz, TEMP[8]\n" - " 28: MAD TEMP[0], TEMP[7], TEMP[5].zzzz, TEMP[2]\n" - " 29: TEX TEMP[2], IN[2].xyyy, SAMP[0], 2D\n" - " 30: ADD TEMP[6].x, IMM[0].xxxx, -TEMP[1].wwww\n" - " 31: MUL TEMP[7], TEMP[4], TEMP[6].xxxx\n" - " 32: MAD TEMP[4], TEMP[2], TEMP[1].wwww, TEMP[7]\n" - " 33: MAD TEMP[2], TEMP[4], TEMP[5].wwww, TEMP[0]\n" - " 34: RCP TEMP[0].x, TEMP[1].xxxx\n" - " 35: MUL OUT[0], TEMP[2], TEMP[0].xxxx\n" - " 36: END\n"; - - -static const char offsetvs[] = "VERT\n" - "DCL IN[0]\n" - "DCL IN[1]\n" - "DCL OUT[0], POSITION\n" - "DCL OUT[1], GENERIC[0]\n" - "DCL OUT[2], GENERIC[10]\n" - "DCL OUT[3], GENERIC[11]\n" - "DCL CONST[0]\n" - "IMM FLT32 { 1.0000, 0.0000, -1.0000, 0.0000}\n" - " 0: MOV OUT[0], IN[0]\n" - " 1: MOV OUT[1], IN[1]\n" - " 2: MAD OUT[2], CONST[0].xyxy, IMM[0].zyyz, IN[1].xyxy\n" - " 3: MAD OUT[3], CONST[0].xyxy, IMM[0].xyyx, IN[1].xyxy\n" - " 4: END\n"; - - -static const char blend2fs_1[] = "FRAG\n" - "PROPERTY FS_COLOR0_WRITES_ALL_CBUFS 1\n" - "DCL IN[0], GENERIC[0], PERSPECTIVE\n" - "DCL OUT[0], COLOR\n" - "DCL SAMP[0]\n" - "DCL SAMP[1]\n" - "DCL SAMP[2]\n" - "DCL CONST[0]\n" - "DCL TEMP[0..6]\n" - "IMM FLT32 { 0.0000, -0.2500, 0.00609756, 0.5000}\n" - "IMM FLT32 { -1.5000, -2.0000, 0.9000, 1.5000}\n" - "IMM FLT32 { 2.0000, 1.0000, 4.0000, 33.0000}\n"; - -static const char blend2fs_2[] = - " 0: MOV TEMP[0], IMM[0].xxxx\n" - " 1: TEX TEMP[1], IN[0].xyyy, SAMP[1], 2D\n" - " 2: MOV TEMP[2].x, TEMP[1]\n" - " 3: SNE TEMP[3].x, TEMP[1].yyyy, IMM[0].xxxx\n" - " 4: IF TEMP[3].xxxx :76\n" - " 5: MOV TEMP[1].xy, IN[0].xyxx\n" - " 6: MOV TEMP[4].x, IMM[1].xxxx\n" - " 7: BGNLOOP :24\n" - " 8: MUL TEMP[5].x, IMM[1].yyyy, IMM[3].xxxx\n" - " 9: SLE TEMP[6].x, TEMP[4].xxxx, TEMP[5].xxxx\n" - " 10: IF TEMP[6].xxxx :12\n" - " 11: BRK\n" - " 12: ENDIF\n" - " 13: MOV TEMP[4].y, IMM[0].xxxx\n" - " 14: MAD TEMP[3].xyz, CONST[0].xyyy, TEMP[4].xyyy, TEMP[1].xyyy\n" - " 15: MOV TEMP[3].w, IMM[0].xxxx\n" - " 16: TXL TEMP[5], TEMP[3], SAMP[2], 2D\n" - " 17: MOV TEMP[3].x, TEMP[5].yyyy\n" - " 18: SLT TEMP[6].x, TEMP[5].yyyy, IMM[1].zzzz\n" - " 19: IF TEMP[6].xxxx :21\n" - " 20: BRK\n" - " 21: ENDIF\n" - " 22: ADD TEMP[6].x, TEMP[4].xxxx, IMM[1].yyyy\n" - " 23: MOV TEMP[4].x, TEMP[6].xxxx\n" - " 24: ENDLOOP :7\n" - " 25: ADD TEMP[1].x, TEMP[4].xxxx, IMM[1].wwww\n" - " 26: MAD TEMP[6].x, -IMM[2].xxxx, TEMP[3].xxxx, TEMP[1].xxxx\n" - " 27: MUL TEMP[1].x, IMM[1].yyyy, IMM[3].xxxx\n" - " 28: MAX TEMP[4].x, TEMP[6].xxxx, TEMP[1].xxxx\n" - " 29: MOV TEMP[1].x, TEMP[4].xxxx\n" - " 30: MOV TEMP[3].xy, IN[0].xyxx\n" - " 31: MOV TEMP[5].x, IMM[1].wwww\n" - " 32: BGNLOOP :49\n" - " 33: MUL TEMP[6].x, IMM[2].xxxx, IMM[3].xxxx\n" - " 34: SGE TEMP[4].x, TEMP[5].xxxx, TEMP[6].xxxx\n" - " 35: IF TEMP[4].xxxx :37\n" - " 36: BRK\n" - " 37: ENDIF\n" - " 38: MOV TEMP[5].y, IMM[0].xxxx\n" - " 39: MAD TEMP[4].xyz, CONST[0].xyyy, TEMP[5].xyyy, TEMP[3].xyyy\n" - " 40: MOV TEMP[4].w, IMM[0].xxxx\n" - " 41: TXL TEMP[6].xy, TEMP[4], SAMP[2], 2D\n" - " 42: MOV TEMP[4].x, TEMP[6].yyyy\n" - " 43: SLT TEMP[0].x, TEMP[6].yyyy, IMM[1].zzzz\n" - " 44: IF TEMP[0].xxxx :46\n" - " 45: BRK\n" - " 46: ENDIF\n" - " 47: ADD TEMP[6].x, TEMP[5].xxxx, IMM[2].xxxx\n" - " 48: MOV TEMP[5].x, TEMP[6].xxxx\n" - " 49: ENDLOOP :32\n" - " 50: ADD TEMP[3].x, TEMP[5].xxxx, IMM[1].xxxx\n" - " 51: MAD TEMP[5].x, IMM[2].xxxx, TEMP[4].xxxx, TEMP[3].xxxx\n" - " 52: MUL TEMP[3].x, IMM[2].xxxx, IMM[3].xxxx\n" - " 53: MIN TEMP[4].x, TEMP[5].xxxx, TEMP[3].xxxx\n" - " 54: MOV TEMP[3].x, TEMP[1].xxxx\n" - " 55: MOV TEMP[3].y, TEMP[4].xxxx\n" - " 56: MOV TEMP[5].yw, IMM[0].yyyy\n" - " 57: MOV TEMP[5].x, TEMP[1].xxxx\n" - " 58: ADD TEMP[1].x, TEMP[4].xxxx, IMM[2].yyyy\n" - " 59: MOV TEMP[5].z, TEMP[1].xxxx\n" - " 60: MAD TEMP[1], TEMP[5], CONST[0].xyxy, IN[0].xyxy\n" - " 61: MOV TEMP[4], TEMP[1].xyyy\n" - " 62: MOV TEMP[4].w, IMM[0].xxxx\n" - " 63: TXL TEMP[5].x, TEMP[4], SAMP[2], 2D\n" - " 64: MOV TEMP[4].x, TEMP[5].xxxx\n" - " 65: MOV TEMP[5], TEMP[1].zwww\n" - " 66: MOV TEMP[5].w, IMM[0].xxxx\n" - " 67: TXL TEMP[1].x, TEMP[5], SAMP[2], 2D\n" - " 68: MOV TEMP[4].y, TEMP[1].xxxx\n" - " 69: MUL TEMP[5].xy, IMM[2].zzzz, TEMP[4].xyyy\n" - " 70: ROUND TEMP[1].xy, TEMP[5].xyyy\n" - " 71: ABS TEMP[4].xy, TEMP[3].xyyy\n" - " 72: MAD TEMP[3].xy, IMM[2].wwww, TEMP[1].xyyy, TEMP[4].xyyy\n" - " 73: MUL TEMP[5].xyz, TEMP[3].xyyy, IMM[0].zzzz\n" - " 74: MOV TEMP[5].w, IMM[0].xxxx\n" - " 75: TXL TEMP[0].xy, TEMP[5], SAMP[0], 2D\n" - " 76: ENDIF\n" - " 77: SNE TEMP[1].x, TEMP[2].xxxx, IMM[0].xxxx\n" - " 78: IF TEMP[1].xxxx :151\n" - " 79: MOV TEMP[1].xy, IN[0].xyxx\n" - " 80: MOV TEMP[3].x, IMM[1].xxxx\n" - " 81: BGNLOOP :98\n" - " 82: MUL TEMP[4].x, IMM[1].yyyy, IMM[3].xxxx\n" - " 83: SLE TEMP[5].x, TEMP[3].xxxx, TEMP[4].xxxx\n" - " 84: IF TEMP[5].xxxx :86\n" - " 85: BRK\n" - " 86: ENDIF\n" - " 87: MOV TEMP[3].y, IMM[0].xxxx\n" - " 88: MAD TEMP[5].xyz, CONST[0].xyyy, TEMP[3].yxxx, TEMP[1].xyyy\n" - " 89: MOV TEMP[5].w, IMM[0].xxxx\n" - " 90: TXL TEMP[4], TEMP[5], SAMP[2], 2D\n" - " 91: MOV TEMP[2].x, TEMP[4].xxxx\n" - " 92: SLT TEMP[5].x, TEMP[4].xxxx, IMM[1].zzzz\n" - " 93: IF TEMP[5].xxxx :95\n" - " 94: BRK\n" - " 95: ENDIF\n" - " 96: ADD TEMP[4].x, TEMP[3].xxxx, IMM[1].yyyy\n" - " 97: MOV TEMP[3].x, TEMP[4].xxxx\n" - " 98: ENDLOOP :81\n" - " 99: ADD TEMP[1].x, TEMP[3].xxxx, IMM[1].wwww\n" - "100: MAD TEMP[6].x, -IMM[2].xxxx, TEMP[2].xxxx, TEMP[1].xxxx\n" - "101: MUL TEMP[1].x, IMM[1].yyyy, IMM[3].xxxx\n" - "102: MAX TEMP[3].x, TEMP[6].xxxx, TEMP[1].xxxx\n" - "103: MOV TEMP[1].x, TEMP[3].xxxx\n" - "104: MOV TEMP[2].xy, IN[0].xyxx\n" - "105: MOV TEMP[4].x, IMM[1].wwww\n" - "106: BGNLOOP :123\n" - "107: MUL TEMP[5].x, IMM[2].xxxx, IMM[3].xxxx\n" - "108: SGE TEMP[6].x, TEMP[4].xxxx, TEMP[5].xxxx\n" - "109: IF TEMP[6].xxxx :111\n" - "110: BRK\n" - "111: ENDIF\n" - "112: MOV TEMP[4].y, IMM[0].xxxx\n" - "113: MAD TEMP[5].xyz, CONST[0].xyyy, TEMP[4].yxxx, TEMP[2].xyyy\n" - "114: MOV TEMP[5].w, IMM[0].xxxx\n" - "115: TXL TEMP[6], TEMP[5], SAMP[2], 2D\n" - "116: MOV TEMP[3].x, TEMP[6].xxxx\n" - "117: SLT TEMP[5].x, TEMP[6].xxxx, IMM[1].zzzz\n" - "118: IF TEMP[5].xxxx :120\n" - "119: BRK\n" - "120: ENDIF\n" - "121: ADD TEMP[6].x, TEMP[4].xxxx, IMM[2].xxxx\n" - "122: MOV TEMP[4].x, TEMP[6].xxxx\n" - "123: ENDLOOP :106\n" - "124: ADD TEMP[2].x, TEMP[4].xxxx, IMM[1].xxxx\n" - "125: MAD TEMP[4].x, IMM[2].xxxx, TEMP[3].xxxx, TEMP[2].xxxx\n" - "126: MUL TEMP[2].x, IMM[2].xxxx, IMM[3].xxxx\n" - "127: MIN TEMP[3].x, TEMP[4].xxxx, TEMP[2].xxxx\n" - "128: MOV TEMP[2].x, TEMP[1].xxxx\n" - "129: MOV TEMP[2].y, TEMP[3].xxxx\n" - "130: MOV TEMP[4].xz, IMM[0].yyyy\n" - "131: MOV TEMP[4].y, TEMP[1].xxxx\n" - "132: ADD TEMP[1].x, TEMP[3].xxxx, IMM[2].yyyy\n" - "133: MOV TEMP[4].w, TEMP[1].xxxx\n" - "134: MAD TEMP[1], TEMP[4], CONST[0].xyxy, IN[0].xyxy\n" - "135: MOV TEMP[3], TEMP[1].xyyy\n" - "136: MOV TEMP[3].w, IMM[0].xxxx\n" - "137: TXL TEMP[4].y, TEMP[3], SAMP[2], 2D\n" - "138: MOV TEMP[3].x, TEMP[4].yyyy\n" - "139: MOV TEMP[4], TEMP[1].zwww\n" - "140: MOV TEMP[4].w, IMM[0].xxxx\n" - "141: TXL TEMP[1].y, TEMP[4], SAMP[2], 2D\n" - "142: MOV TEMP[3].y, TEMP[1].yyyy\n" - "143: MUL TEMP[4].xy, IMM[2].zzzz, TEMP[3].xyyy\n" - "144: ROUND TEMP[1].xy, TEMP[4].xyyy\n" - "145: ABS TEMP[3].xy, TEMP[2].xyyy\n" - "146: MAD TEMP[2].xy, IMM[2].wwww, TEMP[1].xyyy, TEMP[3].xyyy\n" - "147: MUL TEMP[3].xyz, TEMP[2].xyyy, IMM[0].zzzz\n" - "148: MOV TEMP[3].w, IMM[0].xxxx\n" - "149: TXL TEMP[1].xy, TEMP[3], SAMP[0], 2D\n" - "150: MOV TEMP[0].zw, TEMP[1].yyxy\n" - "151: ENDIF\n" - "152: MOV OUT[0], TEMP[0]\n" - "153: END\n"; - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_mlaa_areamap.h b/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_mlaa_areamap.h deleted file mode 100644 index 1446ff2cdf0..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_mlaa_areamap.h +++ /dev/null @@ -1,2821 +0,0 @@ -/** - * Copyright (C) 2010 Jorge Jimenez (jorge@iryoku.com) - * Copyright (C) 2010 Belen Masia (bmasia@unizar.es) - * Copyright (C) 2010 Jose I. Echevarria (joseignacioechevarria@gmail.com) - * Copyright (C) 2010 Fernando Navarro (fernandn@microsoft.com) - * Copyright (C) 2010 Diego Gutierrez (diegog@unizar.es) - * Copyright (C) 2011 Lauri Kasanen (cand@gmx.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the following statement: - * - * "Uses Jimenez's MLAA. Copyright (C) 2010 by Jorge Jimenez, Belen Masia, - * Jose I. Echevarria, Fernando Navarro and Diego Gutierrez." - * - * Only for use in the Mesa project, this point 2 is filled by naming the - * technique Jimenez's MLAA in the Mesa config options. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS - * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are - * those of the authors and should not be interpreted as representing official - * policies, either expressed or implied, of the copyright holders. - */ - -#ifndef PP_MLAA_AREAMAP_H -#define PP_MLAA_AREAMAP_H - -static const unsigned char areamap[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 10, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 85, 0, 31, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 0, - 31, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 0, 51, - 0, 21, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 95, 0, 51, 0, 21, 0, 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 102, 0, 63, 0, 36, 0, 15, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 0, - 63, 0, 36, 0, 15, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 0, 72, - 0, 47, 0, 28, 0, 12, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 106, 0, 72, 0, 47, 0, 28, 0, 12, 0, 2, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 109, 0, 79, 0, 56, 0, 38, 0, 23, 0, 10, 0, 2, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 0, - 79, 0, 56, 0, 38, 0, 23, 0, 10, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 0, 85, - 0, 63, 0, 46, 0, 31, 0, 19, 0, 9, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 111, 0, 85, 0, 63, 0, 46, 0, 31, 0, 19, 0, - 9, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 113, 0, 89, 0, 69, 0, 53, 0, 39, 0, 27, 0, 17, - 0, 7, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 113, 0, - 89, 0, 69, 0, 53, 0, 39, 0, 27, 0, 17, 0, 7, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114, 0, 92, - 0, 74, 0, 58, 0, 45, 0, 34, 0, 23, 0, 15, 0, 7, 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 114, 0, 92, 0, 74, 0, 58, 0, 45, 0, 34, 0, - 23, 0, 15, 0, 7, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 115, 0, 95, 0, 78, 0, 63, 0, 51, 0, 39, 0, 30, - 0, 21, 0, 13, 0, 6, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115, 0, - 95, 0, 78, 0, 63, 0, 51, 0, 39, 0, 30, 0, 21, 0, 13, 0, 6, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 0, 98, - 0, 81, 0, 68, 0, 55, 0, 44, 0, 35, 0, 26, 0, 19, 0, 12, 0, 5, 0, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 116, 0, 98, 0, 81, 0, 68, 0, 55, 0, 44, 0, - 35, 0, 26, 0, 19, 0, 12, 0, 5, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 117, 0, 100, 0, 85, 0, 71, 0, 60, 0, 49, 0, 40, - 0, 31, 0, 24, 0, 17, 0, 11, 0, 5, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 0, - 100, 0, 85, 0, 71, 0, 60, 0, 49, 0, 40, 0, 31, 0, 24, 0, 17, 0, 11, 0, - 5, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 0, 102, - 0, 87, 0, 75, 0, 63, 0, 53, 0, 44, 0, 36, 0, 28, 0, 22, 0, 15, 0, 10, - 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 118, 0, 102, 0, 87, 0, 75, 0, 63, 0, 53, 0, - 44, 0, 36, 0, 28, 0, 22, 0, 15, 0, 10, 0, 4, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 119, 0, 103, 0, 89, 0, 77, 0, 67, 0, 57, 0, 48, - 0, 40, 0, 33, 0, 26, 0, 20, 0, 14, 0, 9, 0, 4, 0, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 0, - 103, 0, 89, 0, 77, 0, 67, 0, 57, 0, 48, 0, 40, 0, 33, 0, 26, 0, 20, 0, - 14, 0, 9, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 0, 105, - 0, 92, 0, 80, 0, 70, 0, 60, 0, 52, 0, 44, 0, 37, 0, 30, 0, 24, 0, 18, - 0, 13, 0, 8, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 119, 0, 105, 0, 92, 0, 80, 0, 70, 0, 60, 0, - 52, 0, 44, 0, 37, 0, 30, 0, 24, 0, 18, 0, 13, 0, 8, 0, 4, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 120, 0, 106, 0, 93, 0, 82, 0, 72, 0, 63, 0, 55, - 0, 47, 0, 40, 0, 34, 0, 28, 0, 22, 0, 17, 0, 12, 0, 8, 0, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, - 106, 0, 93, 0, 82, 0, 72, 0, 63, 0, 55, 0, 47, 0, 40, 0, 34, 0, 28, 0, - 22, 0, 17, 0, 12, 0, 8, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 107, - 0, 95, 0, 85, 0, 75, 0, 66, 0, 58, 0, 51, 0, 44, 0, 37, 0, 31, 0, 26, - 0, 21, 0, 16, 0, 11, 0, 7, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 107, 0, 95, 0, 85, 0, 75, 0, 66, 0, - 58, 0, 51, 0, 44, 0, 37, 0, 31, 0, 26, 0, 21, 0, 16, 0, 11, 0, 7, 0, - 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 120, 0, 108, 0, 97, 0, 86, 0, 77, 0, 69, 0, 61, - 0, 53, 0, 47, 0, 40, 0, 35, 0, 29, 0, 24, 0, 19, 0, 15, 0, 11, 0, 7, - 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, - 108, 0, 97, 0, 86, 0, 77, 0, 69, 0, 61, 0, 53, 0, 47, 0, 40, 0, 35, 0, - 29, 0, 24, 0, 19, 0, 15, 0, 11, 0, 7, 0, 3, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, 109, - 0, 98, 0, 88, 0, 79, 0, 71, 0, 63, 0, 56, 0, 50, 0, 43, 0, 38, 0, 32, - 0, 27, 0, 23, 0, 18, 0, 14, 0, 10, 0, 6, 0, 3, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, 109, 0, 98, 0, 88, 0, 79, 0, 71, 0, - 63, 0, 56, 0, 50, 0, 43, 0, 38, 0, 32, 0, 27, 0, 23, 0, 18, 0, 14, 0, - 10, 0, 6, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 121, 0, 110, 0, 99, 0, 90, 0, 81, 0, 73, 0, 66, - 0, 59, 0, 52, 0, 46, 0, 41, 0, 35, 0, 30, 0, 26, 0, 21, 0, 17, 0, 13, - 0, 10, 0, 6, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, - 110, 0, 99, 0, 90, 0, 81, 0, 73, 0, 66, 0, 59, 0, 52, 0, 46, 0, 41, 0, - 35, 0, 30, 0, 26, 0, 21, 0, 17, 0, 13, 0, 10, 0, 6, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, 110, - 0, 100, 0, 91, 0, 83, 0, 75, 0, 68, 0, 61, 0, 55, 0, 49, 0, 43, 0, 38, - 0, 33, 0, 29, 0, 24, 0, 20, 0, 16, 0, 13, 0, 9, 0, 6, 0, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, 110, 0, 100, 0, 91, 0, 83, 0, 75, 0, - 68, 0, 61, 0, 55, 0, 49, 0, 43, 0, 38, 0, 33, 0, 29, 0, 24, 0, 20, 0, - 16, 0, 13, 0, 9, 0, 6, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 121, 0, 111, 0, 102, 0, 93, 0, 85, 0, 77, 0, 70, - 0, 63, 0, 57, 0, 51, 0, 46, 0, 41, 0, 36, 0, 31, 0, 27, 0, 23, 0, 19, - 0, 15, 0, 12, 0, 9, 0, 5, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, - 111, 0, 102, 0, 93, 0, 85, 0, 77, 0, 70, 0, 63, 0, 57, 0, 51, 0, 46, 0, - 41, 0, 36, 0, 31, 0, 27, 0, 23, 0, 19, 0, 15, 0, 12, 0, 9, 0, 5, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, 112, - 0, 102, 0, 94, 0, 86, 0, 79, 0, 72, 0, 65, 0, 59, 0, 54, 0, 48, 0, 43, - 0, 38, 0, 34, 0, 30, 0, 26, 0, 22, 0, 18, 0, 15, 0, 11, 0, 8, 0, 5, - 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, 112, 0, 102, 0, 94, 0, 86, 0, 79, 0, - 72, 0, 65, 0, 59, 0, 54, 0, 48, 0, 43, 0, 38, 0, 34, 0, 30, 0, 26, 0, - 22, 0, 18, 0, 15, 0, 11, 0, 8, 0, 5, 0, 2, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 122, 0, 112, 0, 103, 0, 95, 0, 87, 0, 80, 0, 74, - 0, 67, 0, 61, 0, 56, 0, 51, 0, 46, 0, 41, 0, 36, 0, 32, 0, 28, 0, 24, - 0, 21, 0, 17, 0, 14, 0, 11, 0, 8, 0, 5, 0, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, - 112, 0, 103, 0, 95, 0, 87, 0, 80, 0, 74, 0, 67, 0, 61, 0, 56, 0, 51, 0, - 46, 0, 41, 0, 36, 0, 32, 0, 28, 0, 24, 0, 21, 0, 17, 0, 14, 0, 11, 0, - 8, 0, 5, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, 113, - 0, 104, 0, 96, 0, 89, 0, 82, 0, 75, 0, 69, 0, 63, 0, 58, 0, 53, 0, 48, - 0, 43, 0, 39, 0, 35, 0, 31, 0, 27, 0, 23, 0, 20, 0, 17, 0, 13, 0, 10, - 0, 7, 0, 5, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, 113, 0, 104, 0, 96, 0, 89, 0, 82, 0, - 75, 0, 69, 0, 63, 0, 58, 0, 53, 0, 48, 0, 43, 0, 39, 0, 35, 0, 31, 0, - 27, 0, 23, 0, 20, 0, 17, 0, 13, 0, 10, 0, 7, 0, 5, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 122, 0, 113, 0, 105, 0, 97, 0, 90, 0, 83, 0, 77, - 0, 71, 0, 65, 0, 60, 0, 55, 0, 50, 0, 45, 0, 41, 0, 37, 0, 33, 0, 29, - 0, 26, 0, 22, 0, 19, 0, 16, 0, 13, 0, 10, 0, 7, 0, 5, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, - 113, 0, 105, 0, 97, 0, 90, 0, 83, 0, 77, 0, 71, 0, 65, 0, 60, 0, 55, 0, - 50, 0, 45, 0, 41, 0, 37, 0, 33, 0, 29, 0, 26, 0, 22, 0, 19, 0, 16, 0, - 13, 0, 10, 0, 7, 0, 5, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, 114, - 0, 106, 0, 98, 0, 91, 0, 85, 0, 78, 0, 72, 0, 67, 0, 62, 0, 57, 0, 52, - 0, 47, 0, 43, 0, 39, 0, 35, 0, 31, 0, 28, 0, 24, 0, 21, 0, 18, 0, 15, - 0, 12, 0, 10, 0, 7, 0, 4, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, 114, 0, 106, 0, 98, 0, 91, 0, 85, 0, - 78, 0, 72, 0, 67, 0, 62, 0, 57, 0, 52, 0, 47, 0, 43, 0, 39, 0, 35, 0, - 31, 0, 28, 0, 24, 0, 21, 0, 18, 0, 15, 0, 12, 0, 10, 0, 7, 0, 4, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 123, 0, 114, 0, 106, 0, 99, 0, 92, 0, 86, 0, 80, - 0, 74, 0, 68, 0, 63, 0, 58, 0, 54, 0, 49, 0, 45, 0, 41, 0, 37, 0, 34, - 0, 30, 0, 27, 0, 23, 0, 20, 0, 17, 0, 15, 0, 12, 0, 9, 0, 7, 0, 4, - 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, - 114, 0, 106, 0, 99, 0, 92, 0, 86, 0, 80, 0, 74, 0, 68, 0, 63, 0, 58, 0, - 54, 0, 49, 0, 45, 0, 41, 0, 37, 0, 34, 0, 30, 0, 27, 0, 23, 0, 20, 0, - 17, 0, 15, 0, 12, 0, 9, 0, 7, 0, 4, 0, 2, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 115, - 0, 107, 0, 100, 0, 93, 0, 87, 0, 81, 0, 75, 0, 70, 0, 65, 0, 60, 0, 55, - 0, 51, 0, 47, 0, 43, 0, 39, 0, 36, 0, 32, 0, 29, 0, 26, 0, 22, 0, 20, - 0, 17, 0, 14, 0, 11, 0, 9, 0, 6, 0, 4, 0, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 115, 0, 107, 0, 100, 0, 93, 0, 87, 0, - 81, 0, 75, 0, 70, 0, 65, 0, 60, 0, 55, 0, 51, 0, 47, 0, 43, 0, 39, 0, - 36, 0, 32, 0, 29, 0, 26, 0, 22, 0, 20, 0, 17, 0, 14, 0, 11, 0, 9, 0, - 6, 0, 4, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 123, 0, 115, 0, 108, 0, 101, 0, 94, 0, 88, 0, 82, - 0, 77, 0, 71, 0, 66, 0, 62, 0, 57, 0, 53, 0, 49, 0, 45, 0, 41, 0, 37, - 0, 34, 0, 31, 0, 28, 0, 25, 0, 22, 0, 19, 0, 16, 0, 13, 0, 11, 0, 8, - 0, 6, 0, 4, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, - 115, 0, 108, 0, 101, 0, 94, 0, 88, 0, 82, 0, 77, 0, 71, 0, 66, 0, 62, 0, - 57, 0, 53, 0, 49, 0, 45, 0, 41, 0, 37, 0, 34, 0, 31, 0, 28, 0, 25, 0, - 22, 0, 19, 0, 16, 0, 13, 0, 11, 0, 8, 0, 6, 0, 4, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 115, - 0, 108, 0, 102, 0, 95, 0, 89, 0, 83, 0, 78, 0, 73, 0, 68, 0, 63, 0, 59, - 0, 55, 0, 51, 0, 47, 0, 43, 0, 39, 0, 36, 0, 33, 0, 30, 0, 26, 0, 24, - 0, 21, 0, 18, 0, 15, 0, 13, 0, 10, 0, 8, 0, 6, 0, 4, 0, 2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 115, 0, 108, 0, 102, 0, 95, 0, 89, 0, - 83, 0, 78, 0, 73, 0, 68, 0, 63, 0, 59, 0, 55, 0, 51, 0, 47, 0, 43, 0, - 39, 0, 36, 0, 33, 0, 30, 0, 26, 0, 24, 0, 21, 0, 18, 0, 15, 0, 13, 0, - 10, 0, 8, 0, 6, 0, 4, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 123, 0, 116, 0, 109, 0, 102, 0, 96, 0, 90, 0, 85, - 0, 79, 0, 74, 0, 69, 0, 65, 0, 60, 0, 56, 0, 52, 0, 48, 0, 45, 0, 41, - 0, 38, 0, 35, 0, 31, 0, 28, 0, 25, 0, 23, 0, 20, 0, 17, 0, 15, 0, 12, - 0, 10, 0, 8, 0, 6, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, - 116, 0, 109, 0, 102, 0, 96, 0, 90, 0, 85, 0, 79, 0, 74, 0, 69, 0, 65, 0, - 60, 0, 56, 0, 52, 0, 48, 0, 45, 0, 41, 0, 38, 0, 35, 0, 31, 0, 28, 0, - 25, 0, 23, 0, 20, 0, 17, 0, 15, 0, 12, 0, 10, 0, 8, 0, 6, 0, 4, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 63, 0, 85, 0, 95, 0, 102, - 0, 106, 0, 109, 0, 111, 0, 113, 0, 114, 0, 115, 0, 116, 0, 117, 0, 118, 0, - 119, - 0, 119, 0, 120, 0, 120, 0, 120, 0, 121, 0, 121, 0, 121, 0, 121, 0, 122, 0, - 122, - 0, 122, 0, 122, 0, 122, 0, 123, 0, 123, 0, 123, 0, 123, 0, 123, 0, 62, 0, - 63, - 0, 85, 0, 95, 0, 102, 0, 106, 0, 109, 0, 111, 0, 113, 0, 114, 0, 115, 0, - 116, - 0, 117, 0, 118, 0, 119, 0, 119, 0, 120, 0, 120, 0, 120, 0, 121, 0, 121, 0, - 121, - 0, 121, 0, 122, 0, 122, 0, 122, 0, 122, 0, 122, 0, 123, 0, 123, 0, 123, 0, - 123, - 0, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 31, 31, 0, 63, 0, 85, 0, 95, 0, 102, 0, 106, - 0, 109, 0, 111, 0, 113, 0, 114, 0, 115, 0, 116, 0, 117, 0, 118, 0, 119, 0, - 119, - 0, 120, 0, 120, 0, 120, 0, 121, 0, 121, 0, 121, 0, 121, 0, 122, 0, 122, 0, - 122, - 0, 122, 0, 122, 0, 123, 0, 123, 0, 123, 0, 123, 0, 123, 31, 31, 0, 63, 0, - 85, - 0, 95, 0, 102, 0, 106, 0, 109, 0, 111, 0, 113, 0, 114, 0, 115, 0, 116, 0, - 117, - 0, 118, 0, 119, 0, 119, 0, 120, 0, 120, 0, 120, 0, 121, 0, 121, 0, 121, 0, - 121, - 0, 122, 0, 122, 0, 122, 0, 122, 0, 122, 0, 123, 0, 123, 0, 123, 0, 123, 0, - 123, - 0, 0, 0, 10, 0, 31, 0, 51, 0, 63, 0, 72, 0, 79, 0, 85, 0, 89, 0, 92, - 0, 95, 0, 98, 0, 100, 0, 102, 0, 103, 0, 105, 0, 106, 0, 107, 0, 108, 0, - 109, - 0, 110, 0, 110, 0, 111, 0, 112, 0, 112, 0, 113, 0, 113, 0, 114, 0, 114, 0, - 115, - 0, 115, 0, 115, 0, 116, 0, 63, 0, 20, 0, 31, 0, 51, 0, 63, 0, 72, 0, 79, - 0, 85, 0, 89, 0, 92, 0, 95, 0, 98, 0, 100, 0, 102, 0, 103, 0, 105, 0, 106, - 0, 107, 0, 108, 0, 109, 0, 110, 0, 110, 0, 111, 0, 112, 0, 112, 0, 113, 0, - 113, - 0, 114, 0, 114, 0, 115, 0, 115, 0, 115, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, - 10, 10, 0, 31, 0, 51, 0, 63, 0, 72, 0, 79, 0, 85, 0, 89, 0, 92, 0, 95, - 0, 98, 0, 100, 0, 102, 0, 103, 0, 105, 0, 106, 0, 107, 0, 108, 0, 109, 0, - 110, - 0, 110, 0, 111, 0, 112, 0, 112, 0, 113, 0, 113, 0, 114, 0, 114, 0, 115, 0, - 115, - 0, 115, 0, 116, 63, 0, 10, 10, 0, 31, 0, 51, 0, 63, 0, 72, 0, 79, 0, 85, - 0, 89, 0, 92, 0, 95, 0, 98, 0, 100, 0, 102, 0, 103, 0, 105, 0, 106, 0, 107, - 0, 108, 0, 109, 0, 110, 0, 110, 0, 111, 0, 112, 0, 112, 0, 113, 0, 113, 0, - 114, - 0, 114, 0, 115, 0, 115, 0, 115, 0, 116, 0, 0, 0, 0, 0, 6, 0, 21, 0, 36, - 0, 47, 0, 56, 0, 63, 0, 69, 0, 74, 0, 78, 0, 81, 0, 85, 0, 87, 0, 89, - 0, 92, 0, 93, 0, 95, 0, 97, 0, 98, 0, 99, 0, 100, 0, 102, 0, 102, 0, 103, - 0, 104, 0, 105, 0, 106, 0, 106, 0, 107, 0, 108, 0, 108, 0, 109, 0, 85, 0, - 31, - 0, 12, 0, 21, 0, 36, 0, 47, 0, 56, 0, 63, 0, 69, 0, 74, 0, 78, 0, 81, - 0, 85, 0, 87, 0, 89, 0, 92, 0, 93, 0, 95, 0, 97, 0, 98, 0, 99, 0, 100, - 0, 102, 0, 102, 0, 103, 0, 104, 0, 105, 0, 106, 0, 106, 0, 107, 0, 108, 0, - 108, - 0, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 85, 0, 31, 0, 6, 6, 0, 21, 0, 36, 0, 47, - 0, 56, 0, 63, 0, 69, 0, 74, 0, 78, 0, 81, 0, 85, 0, 87, 0, 89, 0, 92, - 0, 93, 0, 95, 0, 97, 0, 98, 0, 99, 0, 100, 0, 102, 0, 102, 0, 103, 0, 104, - 0, 105, 0, 106, 0, 106, 0, 107, 0, 108, 0, 108, 0, 109, 85, 0, 31, 0, 6, 6, - 0, 21, 0, 36, 0, 47, 0, 56, 0, 63, 0, 69, 0, 74, 0, 78, 0, 81, 0, 85, - 0, 87, 0, 89, 0, 92, 0, 93, 0, 95, 0, 97, 0, 98, 0, 99, 0, 100, 0, 102, - 0, 102, 0, 103, 0, 104, 0, 105, 0, 106, 0, 106, 0, 107, 0, 108, 0, 108, 0, - 109, - 0, 0, 0, 0, 0, 0, 0, 4, 0, 15, 0, 28, 0, 38, 0, 46, 0, 53, 0, 58, - 0, 63, 0, 68, 0, 71, 0, 75, 0, 77, 0, 80, 0, 82, 0, 85, 0, 86, 0, 88, - 0, 90, 0, 91, 0, 93, 0, 94, 0, 95, 0, 96, 0, 97, 0, 98, 0, 99, 0, 100, - 0, 101, 0, 102, 0, 102, 0, 95, 0, 51, 0, 21, 0, 8, 0, 15, 0, 28, 0, 38, - 0, 46, 0, 53, 0, 58, 0, 63, 0, 68, 0, 71, 0, 75, 0, 77, 0, 80, 0, 82, - 0, 85, 0, 86, 0, 88, 0, 90, 0, 91, 0, 93, 0, 94, 0, 95, 0, 96, 0, 97, - 0, 98, 0, 99, 0, 100, 0, 101, 0, 102, 0, 102, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 0, - 51, 0, 21, 0, 4, 4, 0, 15, 0, 28, 0, 38, 0, 46, 0, 53, 0, 58, 0, 63, - 0, 68, 0, 71, 0, 75, 0, 77, 0, 80, 0, 82, 0, 85, 0, 86, 0, 88, 0, 90, - 0, 91, 0, 93, 0, 94, 0, 95, 0, 96, 0, 97, 0, 98, 0, 99, 0, 100, 0, 101, - 0, 102, 0, 102, 95, 0, 51, 0, 21, 0, 4, 4, 0, 15, 0, 28, 0, 38, 0, 46, - 0, 53, 0, 58, 0, 63, 0, 68, 0, 71, 0, 75, 0, 77, 0, 80, 0, 82, 0, 85, - 0, 86, 0, 88, 0, 90, 0, 91, 0, 93, 0, 94, 0, 95, 0, 96, 0, 97, 0, 98, - 0, 99, 0, 100, 0, 101, 0, 102, 0, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, - 0, 12, 0, 23, 0, 31, 0, 39, 0, 45, 0, 51, 0, 55, 0, 60, 0, 63, 0, 67, - 0, 70, 0, 72, 0, 75, 0, 77, 0, 79, 0, 81, 0, 83, 0, 85, 0, 86, 0, 87, - 0, 89, 0, 90, 0, 91, 0, 92, 0, 93, 0, 94, 0, 95, 0, 96, 0, 102, 0, 63, - 0, 36, 0, 15, 0, 6, 0, 12, 0, 23, 0, 31, 0, 39, 0, 45, 0, 51, 0, 55, - 0, 60, 0, 63, 0, 67, 0, 70, 0, 72, 0, 75, 0, 77, 0, 79, 0, 81, 0, 83, - 0, 85, 0, 86, 0, 87, 0, 89, 0, 90, 0, 91, 0, 92, 0, 93, 0, 94, 0, 95, - 0, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 102, 0, 63, 0, 36, 0, 15, 0, 3, 3, 0, 12, - 0, 23, 0, 31, 0, 39, 0, 45, 0, 51, 0, 55, 0, 60, 0, 63, 0, 67, 0, 70, - 0, 72, 0, 75, 0, 77, 0, 79, 0, 81, 0, 83, 0, 85, 0, 86, 0, 87, 0, 89, - 0, 90, 0, 91, 0, 92, 0, 93, 0, 94, 0, 95, 0, 96, 102, 0, 63, 0, 36, 0, - 15, 0, 3, 3, 0, 12, 0, 23, 0, 31, 0, 39, 0, 45, 0, 51, 0, 55, 0, 60, - 0, 63, 0, 67, 0, 70, 0, 72, 0, 75, 0, 77, 0, 79, 0, 81, 0, 83, 0, 85, - 0, 86, 0, 87, 0, 89, 0, 90, 0, 91, 0, 92, 0, 93, 0, 94, 0, 95, 0, 96, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 10, 0, 19, 0, 27, 0, 34, - 0, 39, 0, 44, 0, 49, 0, 53, 0, 57, 0, 60, 0, 63, 0, 66, 0, 69, 0, 71, - 0, 73, 0, 75, 0, 77, 0, 79, 0, 80, 0, 82, 0, 83, 0, 85, 0, 86, 0, 87, - 0, 88, 0, 89, 0, 90, 0, 106, 0, 72, 0, 47, 0, 28, 0, 12, 0, 4, 0, 10, - 0, 19, 0, 27, 0, 34, 0, 39, 0, 44, 0, 49, 0, 53, 0, 57, 0, 60, 0, 63, - 0, 66, 0, 69, 0, 71, 0, 73, 0, 75, 0, 77, 0, 79, 0, 80, 0, 82, 0, 83, - 0, 85, 0, 86, 0, 87, 0, 88, 0, 89, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 0, - 72, 0, 47, 0, 28, 0, 12, 0, 2, 2, 0, 10, 0, 19, 0, 27, 0, 34, 0, 39, - 0, 44, 0, 49, 0, 53, 0, 57, 0, 60, 0, 63, 0, 66, 0, 69, 0, 71, 0, 73, - 0, 75, 0, 77, 0, 79, 0, 80, 0, 82, 0, 83, 0, 85, 0, 86, 0, 87, 0, 88, - 0, 89, 0, 90, 106, 0, 72, 0, 47, 0, 28, 0, 12, 0, 2, 2, 0, 10, 0, 19, - 0, 27, 0, 34, 0, 39, 0, 44, 0, 49, 0, 53, 0, 57, 0, 60, 0, 63, 0, 66, - 0, 69, 0, 71, 0, 73, 0, 75, 0, 77, 0, 79, 0, 80, 0, 82, 0, 83, 0, 85, - 0, 86, 0, 87, 0, 88, 0, 89, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 9, 0, 17, 0, 23, 0, 30, 0, 35, 0, 40, 0, 44, 0, 48, - 0, 52, 0, 55, 0, 58, 0, 61, 0, 63, 0, 66, 0, 68, 0, 70, 0, 72, 0, 74, - 0, 75, 0, 77, 0, 78, 0, 80, 0, 81, 0, 82, 0, 83, 0, 85, 0, 109, 0, 79, - 0, 56, 0, 38, 0, 23, 0, 10, 0, 4, 0, 9, 0, 17, 0, 23, 0, 30, 0, 35, - 0, 40, 0, 44, 0, 48, 0, 52, 0, 55, 0, 58, 0, 61, 0, 63, 0, 66, 0, 68, - 0, 70, 0, 72, 0, 74, 0, 75, 0, 77, 0, 78, 0, 80, 0, 81, 0, 82, 0, 83, - 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 109, 0, 79, 0, 56, 0, 38, 0, 23, 0, 10, 0, - 2, 2, 0, 9, 0, 17, 0, 23, 0, 30, 0, 35, 0, 40, 0, 44, 0, 48, 0, 52, - 0, 55, 0, 58, 0, 61, 0, 63, 0, 66, 0, 68, 0, 70, 0, 72, 0, 74, 0, 75, - 0, 77, 0, 78, 0, 80, 0, 81, 0, 82, 0, 83, 0, 85, 109, 0, 79, 0, 56, 0, - 38, 0, 23, 0, 10, 0, 2, 2, 0, 9, 0, 17, 0, 23, 0, 30, 0, 35, 0, 40, - 0, 44, 0, 48, 0, 52, 0, 55, 0, 58, 0, 61, 0, 63, 0, 66, 0, 68, 0, 70, - 0, 72, 0, 74, 0, 75, 0, 77, 0, 78, 0, 80, 0, 81, 0, 82, 0, 83, 0, 85, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 7, 0, 15, - 0, 21, 0, 26, 0, 31, 0, 36, 0, 40, 0, 44, 0, 47, 0, 51, 0, 53, 0, 56, - 0, 59, 0, 61, 0, 63, 0, 65, 0, 67, 0, 69, 0, 71, 0, 72, 0, 74, 0, 75, - 0, 77, 0, 78, 0, 79, 0, 111, 0, 85, 0, 63, 0, 46, 0, 31, 0, 19, 0, 9, - 0, 4, 0, 7, 0, 15, 0, 21, 0, 26, 0, 31, 0, 36, 0, 40, 0, 44, 0, 47, - 0, 51, 0, 53, 0, 56, 0, 59, 0, 61, 0, 63, 0, 65, 0, 67, 0, 69, 0, 71, - 0, 72, 0, 74, 0, 75, 0, 77, 0, 78, 0, 79, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 0, - 85, 0, 63, 0, 46, 0, 31, 0, 19, 0, 9, 0, 2, 2, 0, 7, 0, 15, 0, 21, - 0, 26, 0, 31, 0, 36, 0, 40, 0, 44, 0, 47, 0, 51, 0, 53, 0, 56, 0, 59, - 0, 61, 0, 63, 0, 65, 0, 67, 0, 69, 0, 71, 0, 72, 0, 74, 0, 75, 0, 77, - 0, 78, 0, 79, 111, 0, 85, 0, 63, 0, 46, 0, 31, 0, 19, 0, 9, 0, 2, 2, - 0, 7, 0, 15, 0, 21, 0, 26, 0, 31, 0, 36, 0, 40, 0, 44, 0, 47, 0, 51, - 0, 53, 0, 56, 0, 59, 0, 61, 0, 63, 0, 65, 0, 67, 0, 69, 0, 71, 0, 72, - 0, 74, 0, 75, 0, 77, 0, 78, 0, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1, 0, 7, 0, 13, 0, 19, 0, 24, 0, 28, 0, 33, - 0, 37, 0, 40, 0, 44, 0, 47, 0, 50, 0, 52, 0, 55, 0, 57, 0, 59, 0, 61, - 0, 63, 0, 65, 0, 67, 0, 68, 0, 70, 0, 71, 0, 73, 0, 74, 0, 113, 0, 89, - 0, 69, 0, 53, 0, 39, 0, 27, 0, 17, 0, 7, 0, 2, 0, 7, 0, 13, 0, 19, - 0, 24, 0, 28, 0, 33, 0, 37, 0, 40, 0, 44, 0, 47, 0, 50, 0, 52, 0, 55, - 0, 57, 0, 59, 0, 61, 0, 63, 0, 65, 0, 67, 0, 68, 0, 70, 0, 71, 0, 73, - 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 113, 0, 89, 0, 69, 0, 53, 0, 39, 0, 27, 0, - 17, 0, 7, 0, 1, 1, 0, 7, 0, 13, 0, 19, 0, 24, 0, 28, 0, 33, 0, 37, - 0, 40, 0, 44, 0, 47, 0, 50, 0, 52, 0, 55, 0, 57, 0, 59, 0, 61, 0, 63, - 0, 65, 0, 67, 0, 68, 0, 70, 0, 71, 0, 73, 0, 74, 113, 0, 89, 0, 69, 0, - 53, 0, 39, 0, 27, 0, 17, 0, 7, 0, 1, 1, 0, 7, 0, 13, 0, 19, 0, 24, - 0, 28, 0, 33, 0, 37, 0, 40, 0, 44, 0, 47, 0, 50, 0, 52, 0, 55, 0, 57, - 0, 59, 0, 61, 0, 63, 0, 65, 0, 67, 0, 68, 0, 70, 0, 71, 0, 73, 0, 74, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, - 0, 6, 0, 12, 0, 17, 0, 22, 0, 26, 0, 30, 0, 34, 0, 37, 0, 40, 0, 43, - 0, 46, 0, 49, 0, 51, 0, 54, 0, 56, 0, 58, 0, 60, 0, 62, 0, 63, 0, 65, - 0, 66, 0, 68, 0, 69, 0, 114, 0, 92, 0, 74, 0, 58, 0, 45, 0, 34, 0, 23, - 0, 15, 0, 7, 0, 2, 0, 6, 0, 12, 0, 17, 0, 22, 0, 26, 0, 30, 0, 34, - 0, 37, 0, 40, 0, 43, 0, 46, 0, 49, 0, 51, 0, 54, 0, 56, 0, 58, 0, 60, - 0, 62, 0, 63, 0, 65, 0, 66, 0, 68, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114, 0, - 92, 0, 74, 0, 58, 0, 45, 0, 34, 0, 23, 0, 15, 0, 7, 0, 1, 1, 0, 6, - 0, 12, 0, 17, 0, 22, 0, 26, 0, 30, 0, 34, 0, 37, 0, 40, 0, 43, 0, 46, - 0, 49, 0, 51, 0, 54, 0, 56, 0, 58, 0, 60, 0, 62, 0, 63, 0, 65, 0, 66, - 0, 68, 0, 69, 114, 0, 92, 0, 74, 0, 58, 0, 45, 0, 34, 0, 23, 0, 15, 0, - 7, 0, 1, 1, 0, 6, 0, 12, 0, 17, 0, 22, 0, 26, 0, 30, 0, 34, 0, 37, - 0, 40, 0, 43, 0, 46, 0, 49, 0, 51, 0, 54, 0, 56, 0, 58, 0, 60, 0, 62, - 0, 63, 0, 65, 0, 66, 0, 68, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 5, 0, 11, 0, 15, 0, 20, - 0, 24, 0, 28, 0, 31, 0, 35, 0, 38, 0, 41, 0, 43, 0, 46, 0, 48, 0, 51, - 0, 53, 0, 55, 0, 57, 0, 58, 0, 60, 0, 62, 0, 63, 0, 65, 0, 115, 0, 95, - 0, 78, 0, 63, 0, 51, 0, 39, 0, 30, 0, 21, 0, 13, 0, 6, 0, 2, 0, 5, - 0, 11, 0, 15, 0, 20, 0, 24, 0, 28, 0, 31, 0, 35, 0, 38, 0, 41, 0, 43, - 0, 46, 0, 48, 0, 51, 0, 53, 0, 55, 0, 57, 0, 58, 0, 60, 0, 62, 0, 63, - 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 115, 0, 95, 0, 78, 0, 63, 0, 51, 0, 39, 0, - 30, 0, 21, 0, 13, 0, 6, 0, 1, 1, 0, 5, 0, 11, 0, 15, 0, 20, 0, 24, - 0, 28, 0, 31, 0, 35, 0, 38, 0, 41, 0, 43, 0, 46, 0, 48, 0, 51, 0, 53, - 0, 55, 0, 57, 0, 58, 0, 60, 0, 62, 0, 63, 0, 65, 115, 0, 95, 0, 78, 0, - 63, 0, 51, 0, 39, 0, 30, 0, 21, 0, 13, 0, 6, 0, 1, 1, 0, 5, 0, 11, - 0, 15, 0, 20, 0, 24, 0, 28, 0, 31, 0, 35, 0, 38, 0, 41, 0, 43, 0, 46, - 0, 48, 0, 51, 0, 53, 0, 55, 0, 57, 0, 58, 0, 60, 0, 62, 0, 63, 0, 65, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 5, 0, 10, 0, 14, 0, 18, 0, 22, 0, 26, 0, 29, 0, 32, - 0, 35, 0, 38, 0, 41, 0, 43, 0, 46, 0, 48, 0, 50, 0, 52, 0, 54, 0, 55, - 0, 57, 0, 59, 0, 60, 0, 116, 0, 98, 0, 81, 0, 68, 0, 55, 0, 44, 0, 35, - 0, 26, 0, 19, 0, 12, 0, 5, 0, 2, 0, 5, 0, 10, 0, 14, 0, 18, 0, 22, - 0, 26, 0, 29, 0, 32, 0, 35, 0, 38, 0, 41, 0, 43, 0, 46, 0, 48, 0, 50, - 0, 52, 0, 54, 0, 55, 0, 57, 0, 59, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 0, - 98, 0, 81, 0, 68, 0, 55, 0, 44, 0, 35, 0, 26, 0, 19, 0, 12, 0, 5, 0, - 1, 1, 0, 5, 0, 10, 0, 14, 0, 18, 0, 22, 0, 26, 0, 29, 0, 32, 0, 35, - 0, 38, 0, 41, 0, 43, 0, 46, 0, 48, 0, 50, 0, 52, 0, 54, 0, 55, 0, 57, - 0, 59, 0, 60, 116, 0, 98, 0, 81, 0, 68, 0, 55, 0, 44, 0, 35, 0, 26, 0, - 19, 0, 12, 0, 5, 0, 1, 1, 0, 5, 0, 10, 0, 14, 0, 18, 0, 22, 0, 26, - 0, 29, 0, 32, 0, 35, 0, 38, 0, 41, 0, 43, 0, 46, 0, 48, 0, 50, 0, 52, - 0, 54, 0, 55, 0, 57, 0, 59, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 4, 0, 9, - 0, 13, 0, 17, 0, 21, 0, 24, 0, 27, 0, 30, 0, 33, 0, 36, 0, 38, 0, 41, - 0, 43, 0, 45, 0, 47, 0, 49, 0, 51, 0, 53, 0, 55, 0, 56, 0, 117, 0, 100, - 0, 85, 0, 71, 0, 60, 0, 49, 0, 40, 0, 31, 0, 24, 0, 17, 0, 11, 0, 5, - 0, 2, 0, 4, 0, 9, 0, 13, 0, 17, 0, 21, 0, 24, 0, 27, 0, 30, 0, 33, - 0, 36, 0, 38, 0, 41, 0, 43, 0, 45, 0, 47, 0, 49, 0, 51, 0, 53, 0, 55, - 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 117, 0, 100, 0, 85, 0, 71, 0, 60, 0, 49, 0, - 40, 0, 31, 0, 24, 0, 17, 0, 11, 0, 5, 0, 1, 1, 0, 4, 0, 9, 0, 13, - 0, 17, 0, 21, 0, 24, 0, 27, 0, 30, 0, 33, 0, 36, 0, 38, 0, 41, 0, 43, - 0, 45, 0, 47, 0, 49, 0, 51, 0, 53, 0, 55, 0, 56, 117, 0, 100, 0, 85, 0, - 71, 0, 60, 0, 49, 0, 40, 0, 31, 0, 24, 0, 17, 0, 11, 0, 5, 0, 1, 1, - 0, 4, 0, 9, 0, 13, 0, 17, 0, 21, 0, 24, 0, 27, 0, 30, 0, 33, 0, 36, - 0, 38, 0, 41, 0, 43, 0, 45, 0, 47, 0, 49, 0, 51, 0, 53, 0, 55, 0, 56, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1, 0, 4, 0, 8, 0, 12, 0, 16, 0, 19, 0, 23, - 0, 26, 0, 29, 0, 31, 0, 34, 0, 36, 0, 39, 0, 41, 0, 43, 0, 45, 0, 47, - 0, 49, 0, 51, 0, 52, 0, 118, 0, 102, 0, 87, 0, 75, 0, 63, 0, 53, 0, 44, - 0, 36, 0, 28, 0, 22, 0, 15, 0, 10, 0, 4, 0, 2, 0, 4, 0, 8, 0, 12, - 0, 16, 0, 19, 0, 23, 0, 26, 0, 29, 0, 31, 0, 34, 0, 36, 0, 39, 0, 41, - 0, 43, 0, 45, 0, 47, 0, 49, 0, 51, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 0, - 102, 0, 87, 0, 75, 0, 63, 0, 53, 0, 44, 0, 36, 0, 28, 0, 22, 0, 15, 0, - 10, 0, 4, 0, 1, 1, 0, 4, 0, 8, 0, 12, 0, 16, 0, 19, 0, 23, 0, 26, - 0, 29, 0, 31, 0, 34, 0, 36, 0, 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, 49, - 0, 51, 0, 52, 118, 0, 102, 0, 87, 0, 75, 0, 63, 0, 53, 0, 44, 0, 36, 0, - 28, 0, 22, 0, 15, 0, 10, 0, 4, 0, 1, 1, 0, 4, 0, 8, 0, 12, 0, 16, - 0, 19, 0, 23, 0, 26, 0, 29, 0, 31, 0, 34, 0, 36, 0, 39, 0, 41, 0, 43, - 0, 45, 0, 47, 0, 49, 0, 51, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, - 0, 4, 0, 8, 0, 11, 0, 15, 0, 18, 0, 21, 0, 24, 0, 27, 0, 30, 0, 32, - 0, 35, 0, 37, 0, 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, 48, 0, 119, 0, 103, - 0, 89, 0, 77, 0, 67, 0, 57, 0, 48, 0, 40, 0, 33, 0, 26, 0, 20, 0, 14, - 0, 9, 0, 4, 0, 2, 0, 4, 0, 8, 0, 11, 0, 15, 0, 18, 0, 21, 0, 24, - 0, 27, 0, 30, 0, 32, 0, 35, 0, 37, 0, 39, 0, 41, 0, 43, 0, 45, 0, 47, - 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 119, 0, 103, 0, 89, 0, 77, 0, 67, 0, 57, 0, - 48, 0, 40, 0, 33, 0, 26, 0, 20, 0, 14, 0, 9, 0, 4, 0, 1, 1, 0, 4, - 0, 8, 0, 11, 0, 15, 0, 18, 0, 21, 0, 24, 0, 27, 0, 30, 0, 32, 0, 35, - 0, 37, 0, 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, 48, 119, 0, 103, 0, 89, 0, - 77, 0, 67, 0, 57, 0, 48, 0, 40, 0, 33, 0, 26, 0, 20, 0, 14, 0, 9, 0, - 4, 0, 1, 1, 0, 4, 0, 8, 0, 11, 0, 15, 0, 18, 0, 21, 0, 24, 0, 27, - 0, 30, 0, 32, 0, 35, 0, 37, 0, 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, 48, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 7, 0, 11, 0, 14, - 0, 17, 0, 20, 0, 23, 0, 26, 0, 28, 0, 31, 0, 33, 0, 35, 0, 37, 0, 39, - 0, 41, 0, 43, 0, 45, 0, 119, 0, 105, 0, 92, 0, 80, 0, 70, 0, 60, 0, 52, - 0, 44, 0, 37, 0, 30, 0, 24, 0, 18, 0, 13, 0, 8, 0, 4, 0, 2, 0, 3, - 0, 7, 0, 11, 0, 14, 0, 17, 0, 20, 0, 23, 0, 26, 0, 28, 0, 31, 0, 33, - 0, 35, 0, 37, 0, 39, 0, 41, 0, 43, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 0, - 105, 0, 92, 0, 80, 0, 70, 0, 60, 0, 52, 0, 44, 0, 37, 0, 30, 0, 24, 0, - 18, 0, 13, 0, 8, 0, 4, 0, 1, 1, 0, 3, 0, 7, 0, 11, 0, 14, 0, 17, - 0, 20, 0, 23, 0, 26, 0, 28, 0, 31, 0, 33, 0, 35, 0, 37, 0, 39, 0, 41, - 0, 43, 0, 45, 119, 0, 105, 0, 92, 0, 80, 0, 70, 0, 60, 0, 52, 0, 44, 0, - 37, 0, 30, 0, 24, 0, 18, 0, 13, 0, 8, 0, 4, 0, 1, 1, 0, 3, 0, 7, - 0, 11, 0, 14, 0, 17, 0, 20, 0, 23, 0, 26, 0, 28, 0, 31, 0, 33, 0, 35, - 0, 37, 0, 39, 0, 41, 0, 43, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 3, 0, 7, 0, 10, 0, 13, 0, 16, 0, 19, 0, 22, 0, 24, - 0, 27, 0, 29, 0, 31, 0, 34, 0, 36, 0, 37, 0, 39, 0, 41, 0, 120, 0, 106, - 0, 93, 0, 82, 0, 72, 0, 63, 0, 55, 0, 47, 0, 40, 0, 34, 0, 28, 0, 22, - 0, 17, 0, 12, 0, 8, 0, 3, 0, 0, 0, 3, 0, 7, 0, 10, 0, 13, 0, 16, - 0, 19, 0, 22, 0, 24, 0, 27, 0, 29, 0, 31, 0, 34, 0, 36, 0, 37, 0, 39, - 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 106, 0, 93, 0, 82, 0, 72, 0, 63, 0, - 55, 0, 47, 0, 40, 0, 34, 0, 28, 0, 22, 0, 17, 0, 12, 0, 8, 0, 3, 0, - 0, 0, 0, 3, 0, 7, 0, 10, 0, 13, 0, 16, 0, 19, 0, 22, 0, 24, 0, 27, - 0, 29, 0, 31, 0, 34, 0, 36, 0, 37, 0, 39, 0, 41, 120, 0, 106, 0, 93, 0, - 82, 0, 72, 0, 63, 0, 55, 0, 47, 0, 40, 0, 34, 0, 28, 0, 22, 0, 17, 0, - 12, 0, 8, 0, 3, 0, 0, 0, 0, 3, 0, 7, 0, 10, 0, 13, 0, 16, 0, 19, - 0, 22, 0, 24, 0, 27, 0, 29, 0, 31, 0, 34, 0, 36, 0, 37, 0, 39, 0, 41, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 6, - 0, 10, 0, 13, 0, 15, 0, 18, 0, 21, 0, 23, 0, 26, 0, 28, 0, 30, 0, 32, - 0, 34, 0, 36, 0, 38, 0, 120, 0, 107, 0, 95, 0, 85, 0, 75, 0, 66, 0, 58, - 0, 51, 0, 44, 0, 37, 0, 31, 0, 26, 0, 21, 0, 16, 0, 11, 0, 7, 0, 3, - 0, 0, 0, 3, 0, 6, 0, 10, 0, 13, 0, 15, 0, 18, 0, 21, 0, 23, 0, 26, - 0, 28, 0, 30, 0, 32, 0, 34, 0, 36, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, - 107, 0, 95, 0, 85, 0, 75, 0, 66, 0, 58, 0, 51, 0, 44, 0, 37, 0, 31, 0, - 26, 0, 21, 0, 16, 0, 11, 0, 7, 0, 3, 0, 0, 0, 0, 3, 0, 6, 0, 10, - 0, 13, 0, 15, 0, 18, 0, 21, 0, 23, 0, 26, 0, 28, 0, 30, 0, 32, 0, 34, - 0, 36, 0, 38, 120, 0, 107, 0, 95, 0, 85, 0, 75, 0, 66, 0, 58, 0, 51, 0, - 44, 0, 37, 0, 31, 0, 26, 0, 21, 0, 16, 0, 11, 0, 7, 0, 3, 0, 0, 0, - 0, 3, 0, 6, 0, 10, 0, 13, 0, 15, 0, 18, 0, 21, 0, 23, 0, 26, 0, 28, - 0, 30, 0, 32, 0, 34, 0, 36, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 6, 0, 9, 0, 12, 0, 15, 0, 17, - 0, 20, 0, 22, 0, 24, 0, 27, 0, 29, 0, 31, 0, 33, 0, 35, 0, 120, 0, 108, - 0, 97, 0, 86, 0, 77, 0, 69, 0, 61, 0, 53, 0, 47, 0, 40, 0, 35, 0, 29, - 0, 24, 0, 19, 0, 15, 0, 11, 0, 7, 0, 3, 0, 0, 0, 3, 0, 6, 0, 9, - 0, 12, 0, 15, 0, 17, 0, 20, 0, 22, 0, 24, 0, 27, 0, 29, 0, 31, 0, 33, - 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 108, 0, 97, 0, 86, 0, 77, 0, 69, 0, - 61, 0, 53, 0, 47, 0, 40, 0, 35, 0, 29, 0, 24, 0, 19, 0, 15, 0, 11, 0, - 7, 0, 3, 0, 0, 0, 0, 3, 0, 6, 0, 9, 0, 12, 0, 15, 0, 17, 0, 20, - 0, 22, 0, 24, 0, 27, 0, 29, 0, 31, 0, 33, 0, 35, 120, 0, 108, 0, 97, 0, - 86, 0, 77, 0, 69, 0, 61, 0, 53, 0, 47, 0, 40, 0, 35, 0, 29, 0, 24, 0, - 19, 0, 15, 0, 11, 0, 7, 0, 3, 0, 0, 0, 0, 3, 0, 6, 0, 9, 0, 12, - 0, 15, 0, 17, 0, 20, 0, 22, 0, 24, 0, 27, 0, 29, 0, 31, 0, 33, 0, 35, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 3, 0, 6, 0, 9, 0, 11, 0, 14, 0, 17, 0, 19, 0, 21, 0, 23, 0, 26, - 0, 28, 0, 30, 0, 31, 0, 121, 0, 109, 0, 98, 0, 88, 0, 79, 0, 71, 0, 63, - 0, 56, 0, 50, 0, 43, 0, 38, 0, 32, 0, 27, 0, 23, 0, 18, 0, 14, 0, 10, - 0, 6, 0, 3, 0, 0, 0, 3, 0, 6, 0, 9, 0, 11, 0, 14, 0, 17, 0, 19, - 0, 21, 0, 23, 0, 26, 0, 28, 0, 30, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, - 109, 0, 98, 0, 88, 0, 79, 0, 71, 0, 63, 0, 56, 0, 50, 0, 43, 0, 38, 0, - 32, 0, 27, 0, 23, 0, 18, 0, 14, 0, 10, 0, 6, 0, 3, 0, 0, 0, 0, 3, - 0, 6, 0, 9, 0, 11, 0, 14, 0, 17, 0, 19, 0, 21, 0, 23, 0, 26, 0, 28, - 0, 30, 0, 31, 121, 0, 109, 0, 98, 0, 88, 0, 79, 0, 71, 0, 63, 0, 56, 0, - 50, 0, 43, 0, 38, 0, 32, 0, 27, 0, 23, 0, 18, 0, 14, 0, 10, 0, 6, 0, - 3, 0, 0, 0, 0, 3, 0, 6, 0, 9, 0, 11, 0, 14, 0, 17, 0, 19, 0, 21, - 0, 23, 0, 26, 0, 28, 0, 30, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 5, 0, 8, 0, 11, - 0, 13, 0, 16, 0, 18, 0, 20, 0, 22, 0, 25, 0, 26, 0, 28, 0, 121, 0, 110, - 0, 99, 0, 90, 0, 81, 0, 73, 0, 66, 0, 59, 0, 52, 0, 46, 0, 41, 0, 35, - 0, 30, 0, 26, 0, 21, 0, 17, 0, 13, 0, 10, 0, 6, 0, 3, 0, 0, 0, 3, - 0, 5, 0, 8, 0, 11, 0, 13, 0, 16, 0, 18, 0, 20, 0, 22, 0, 25, 0, 26, - 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, 110, 0, 99, 0, 90, 0, 81, 0, 73, 0, - 66, 0, 59, 0, 52, 0, 46, 0, 41, 0, 35, 0, 30, 0, 26, 0, 21, 0, 17, 0, - 13, 0, 10, 0, 6, 0, 3, 0, 0, 0, 0, 3, 0, 5, 0, 8, 0, 11, 0, 13, - 0, 16, 0, 18, 0, 20, 0, 22, 0, 25, 0, 26, 0, 28, 121, 0, 110, 0, 99, 0, - 90, 0, 81, 0, 73, 0, 66, 0, 59, 0, 52, 0, 46, 0, 41, 0, 35, 0, 30, 0, - 26, 0, 21, 0, 17, 0, 13, 0, 10, 0, 6, 0, 3, 0, 0, 0, 0, 3, 0, 5, - 0, 8, 0, 11, 0, 13, 0, 16, 0, 18, 0, 20, 0, 22, 0, 25, 0, 26, 0, 28, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, 0, 5, 0, 8, 0, 10, 0, 13, 0, 15, 0, 17, 0, 20, - 0, 22, 0, 24, 0, 25, 0, 121, 0, 110, 0, 100, 0, 91, 0, 83, 0, 75, 0, 68, - 0, 61, 0, 55, 0, 49, 0, 43, 0, 38, 0, 33, 0, 29, 0, 24, 0, 20, 0, 16, - 0, 13, 0, 9, 0, 6, 0, 3, 0, 0, 0, 2, 0, 5, 0, 8, 0, 10, 0, 13, - 0, 15, 0, 17, 0, 20, 0, 22, 0, 24, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, - 110, 0, 100, 0, 91, 0, 83, 0, 75, 0, 68, 0, 61, 0, 55, 0, 49, 0, 43, 0, - 38, 0, 33, 0, 29, 0, 24, 0, 20, 0, 16, 0, 13, 0, 9, 0, 6, 0, 3, 0, - 0, 0, 0, 2, 0, 5, 0, 8, 0, 10, 0, 13, 0, 15, 0, 17, 0, 20, 0, 22, - 0, 24, 0, 25, 121, 0, 110, 0, 100, 0, 91, 0, 83, 0, 75, 0, 68, 0, 61, 0, - 55, 0, 49, 0, 43, 0, 38, 0, 33, 0, 29, 0, 24, 0, 20, 0, 16, 0, 13, 0, - 9, 0, 6, 0, 3, 0, 0, 0, 0, 2, 0, 5, 0, 8, 0, 10, 0, 13, 0, 15, - 0, 17, 0, 20, 0, 22, 0, 24, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 5, - 0, 7, 0, 10, 0, 12, 0, 15, 0, 17, 0, 19, 0, 21, 0, 23, 0, 121, 0, 111, - 0, 102, 0, 93, 0, 85, 0, 77, 0, 70, 0, 63, 0, 57, 0, 51, 0, 46, 0, 41, - 0, 36, 0, 31, 0, 27, 0, 23, 0, 19, 0, 15, 0, 12, 0, 9, 0, 5, 0, 2, - 0, 0, 0, 2, 0, 5, 0, 7, 0, 10, 0, 12, 0, 15, 0, 17, 0, 19, 0, 21, - 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, 111, 0, 102, 0, 93, 0, 85, 0, 77, 0, - 70, 0, 63, 0, 57, 0, 51, 0, 46, 0, 41, 0, 36, 0, 31, 0, 27, 0, 23, 0, - 19, 0, 15, 0, 12, 0, 9, 0, 5, 0, 2, 0, 0, 0, 0, 2, 0, 5, 0, 7, - 0, 10, 0, 12, 0, 15, 0, 17, 0, 19, 0, 21, 0, 23, 121, 0, 111, 0, 102, 0, - 93, 0, 85, 0, 77, 0, 70, 0, 63, 0, 57, 0, 51, 0, 46, 0, 41, 0, 36, 0, - 31, 0, 27, 0, 23, 0, 19, 0, 15, 0, 12, 0, 9, 0, 5, 0, 2, 0, 0, 0, - 0, 2, 0, 5, 0, 7, 0, 10, 0, 12, 0, 15, 0, 17, 0, 19, 0, 21, 0, 23, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 5, 0, 7, 0, 10, 0, 12, 0, 14, - 0, 16, 0, 18, 0, 20, 0, 122, 0, 112, 0, 102, 0, 94, 0, 86, 0, 79, 0, 72, - 0, 65, 0, 59, 0, 54, 0, 48, 0, 43, 0, 38, 0, 34, 0, 30, 0, 26, 0, 22, - 0, 18, 0, 15, 0, 11, 0, 8, 0, 5, 0, 2, 0, 0, 0, 2, 0, 5, 0, 7, - 0, 10, 0, 12, 0, 14, 0, 16, 0, 18, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, - 112, 0, 102, 0, 94, 0, 86, 0, 79, 0, 72, 0, 65, 0, 59, 0, 54, 0, 48, 0, - 43, 0, 38, 0, 34, 0, 30, 0, 26, 0, 22, 0, 18, 0, 15, 0, 11, 0, 8, 0, - 5, 0, 2, 0, 0, 0, 0, 2, 0, 5, 0, 7, 0, 10, 0, 12, 0, 14, 0, 16, - 0, 18, 0, 20, 122, 0, 112, 0, 102, 0, 94, 0, 86, 0, 79, 0, 72, 0, 65, 0, - 59, 0, 54, 0, 48, 0, 43, 0, 38, 0, 34, 0, 30, 0, 26, 0, 22, 0, 18, 0, - 15, 0, 11, 0, 8, 0, 5, 0, 2, 0, 0, 0, 0, 2, 0, 5, 0, 7, 0, 10, - 0, 12, 0, 14, 0, 16, 0, 18, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 0, 5, 0, 7, 0, 9, 0, 11, 0, 13, 0, 15, 0, 17, 0, 122, 0, 112, - 0, 103, 0, 95, 0, 87, 0, 80, 0, 74, 0, 67, 0, 61, 0, 56, 0, 51, 0, 46, - 0, 41, 0, 36, 0, 32, 0, 28, 0, 24, 0, 21, 0, 17, 0, 14, 0, 11, 0, 8, - 0, 5, 0, 2, 0, 0, 0, 2, 0, 5, 0, 7, 0, 9, 0, 11, 0, 13, 0, 15, - 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, 112, 0, 103, 0, 95, 0, 87, 0, 80, 0, - 74, 0, 67, 0, 61, 0, 56, 0, 51, 0, 46, 0, 41, 0, 36, 0, 32, 0, 28, 0, - 24, 0, 21, 0, 17, 0, 14, 0, 11, 0, 8, 0, 5, 0, 2, 0, 0, 0, 0, 2, - 0, 5, 0, 7, 0, 9, 0, 11, 0, 13, 0, 15, 0, 17, 122, 0, 112, 0, 103, 0, - 95, 0, 87, 0, 80, 0, 74, 0, 67, 0, 61, 0, 56, 0, 51, 0, 46, 0, 41, 0, - 36, 0, 32, 0, 28, 0, 24, 0, 21, 0, 17, 0, 14, 0, 11, 0, 8, 0, 5, 0, - 2, 0, 0, 0, 0, 2, 0, 5, 0, 7, 0, 9, 0, 11, 0, 13, 0, 15, 0, 17, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 0, 7, 0, 9, - 0, 11, 0, 13, 0, 15, 0, 122, 0, 113, 0, 104, 0, 96, 0, 89, 0, 82, 0, 75, - 0, 69, 0, 63, 0, 58, 0, 53, 0, 48, 0, 43, 0, 39, 0, 35, 0, 31, 0, 27, - 0, 23, 0, 20, 0, 17, 0, 13, 0, 10, 0, 7, 0, 5, 0, 2, 0, 0, 0, 2, - 0, 4, 0, 7, 0, 9, 0, 11, 0, 13, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, - 113, 0, 104, 0, 96, 0, 89, 0, 82, 0, 75, 0, 69, 0, 63, 0, 58, 0, 53, 0, - 48, 0, 43, 0, 39, 0, 35, 0, 31, 0, 27, 0, 23, 0, 20, 0, 17, 0, 13, 0, - 10, 0, 7, 0, 5, 0, 2, 0, 0, 0, 0, 2, 0, 4, 0, 7, 0, 9, 0, 11, - 0, 13, 0, 15, 122, 0, 113, 0, 104, 0, 96, 0, 89, 0, 82, 0, 75, 0, 69, 0, - 63, 0, 58, 0, 53, 0, 48, 0, 43, 0, 39, 0, 35, 0, 31, 0, 27, 0, 23, 0, - 20, 0, 17, 0, 13, 0, 10, 0, 7, 0, 5, 0, 2, 0, 0, 0, 0, 2, 0, 4, - 0, 7, 0, 9, 0, 11, 0, 13, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 10, 0, 12, 0, 122, 0, 113, - 0, 105, 0, 97, 0, 90, 0, 83, 0, 77, 0, 71, 0, 65, 0, 60, 0, 55, 0, 50, - 0, 45, 0, 41, 0, 37, 0, 33, 0, 29, 0, 26, 0, 22, 0, 19, 0, 16, 0, 13, - 0, 10, 0, 7, 0, 5, 0, 2, 0, 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 10, - 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, 113, 0, 105, 0, 97, 0, 90, 0, 83, 0, - 77, 0, 71, 0, 65, 0, 60, 0, 55, 0, 50, 0, 45, 0, 41, 0, 37, 0, 33, 0, - 29, 0, 26, 0, 22, 0, 19, 0, 16, 0, 13, 0, 10, 0, 7, 0, 5, 0, 2, 0, - 0, 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 10, 0, 12, 122, 0, 113, 0, 105, 0, - 97, 0, 90, 0, 83, 0, 77, 0, 71, 0, 65, 0, 60, 0, 55, 0, 50, 0, 45, 0, - 41, 0, 37, 0, 33, 0, 29, 0, 26, 0, 22, 0, 19, 0, 16, 0, 13, 0, 10, 0, - 7, 0, 5, 0, 2, 0, 0, 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 10, 0, 12, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, - 0, 6, 0, 8, 0, 10, 0, 122, 0, 114, 0, 106, 0, 98, 0, 91, 0, 85, 0, 78, - 0, 72, 0, 67, 0, 62, 0, 57, 0, 52, 0, 47, 0, 43, 0, 39, 0, 35, 0, 31, - 0, 28, 0, 24, 0, 21, 0, 18, 0, 15, 0, 12, 0, 10, 0, 7, 0, 4, 0, 2, - 0, 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, - 114, 0, 106, 0, 98, 0, 91, 0, 85, 0, 78, 0, 72, 0, 67, 0, 62, 0, 57, 0, - 52, 0, 47, 0, 43, 0, 39, 0, 35, 0, 31, 0, 28, 0, 24, 0, 21, 0, 18, 0, - 15, 0, 12, 0, 10, 0, 7, 0, 4, 0, 2, 0, 0, 0, 0, 2, 0, 4, 0, 6, - 0, 8, 0, 10, 122, 0, 114, 0, 106, 0, 98, 0, 91, 0, 85, 0, 78, 0, 72, 0, - 67, 0, 62, 0, 57, 0, 52, 0, 47, 0, 43, 0, 39, 0, 35, 0, 31, 0, 28, 0, - 24, 0, 21, 0, 18, 0, 15, 0, 12, 0, 10, 0, 7, 0, 4, 0, 2, 0, 0, 0, - 0, 2, 0, 4, 0, 6, 0, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 123, 0, 114, - 0, 106, 0, 99, 0, 92, 0, 86, 0, 80, 0, 74, 0, 68, 0, 63, 0, 58, 0, 54, - 0, 49, 0, 45, 0, 41, 0, 37, 0, 34, 0, 30, 0, 27, 0, 23, 0, 20, 0, 17, - 0, 15, 0, 12, 0, 9, 0, 7, 0, 4, 0, 2, 0, 0, 0, 2, 0, 4, 0, 6, - 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 114, 0, 106, 0, 99, 0, 92, 0, 86, 0, - 80, 0, 74, 0, 68, 0, 63, 0, 58, 0, 54, 0, 49, 0, 45, 0, 41, 0, 37, 0, - 34, 0, 30, 0, 27, 0, 23, 0, 20, 0, 17, 0, 15, 0, 12, 0, 9, 0, 7, 0, - 4, 0, 2, 0, 0, 0, 0, 2, 0, 4, 0, 6, 0, 8, 123, 0, 114, 0, 106, 0, - 99, 0, 92, 0, 86, 0, 80, 0, 74, 0, 68, 0, 63, 0, 58, 0, 54, 0, 49, 0, - 45, 0, 41, 0, 37, 0, 34, 0, 30, 0, 27, 0, 23, 0, 20, 0, 17, 0, 15, 0, - 12, 0, 9, 0, 7, 0, 4, 0, 2, 0, 0, 0, 0, 2, 0, 4, 0, 6, 0, 8, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 2, 0, 4, 0, 6, 0, 123, 0, 115, 0, 107, 0, 100, 0, 93, 0, 87, 0, 81, - 0, 75, 0, 70, 0, 65, 0, 60, 0, 55, 0, 51, 0, 47, 0, 43, 0, 39, 0, 36, - 0, 32, 0, 29, 0, 26, 0, 22, 0, 20, 0, 17, 0, 14, 0, 11, 0, 9, 0, 6, - 0, 4, 0, 2, 0, 0, 0, 2, 0, 4, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, - 115, 0, 107, 0, 100, 0, 93, 0, 87, 0, 81, 0, 75, 0, 70, 0, 65, 0, 60, 0, - 55, 0, 51, 0, 47, 0, 43, 0, 39, 0, 36, 0, 32, 0, 29, 0, 26, 0, 22, 0, - 20, 0, 17, 0, 14, 0, 11, 0, 9, 0, 6, 0, 4, 0, 2, 0, 0, 0, 0, 2, - 0, 4, 0, 6, 123, 0, 115, 0, 107, 0, 100, 0, 93, 0, 87, 0, 81, 0, 75, 0, - 70, 0, 65, 0, 60, 0, 55, 0, 51, 0, 47, 0, 43, 0, 39, 0, 36, 0, 32, 0, - 29, 0, 26, 0, 22, 0, 20, 0, 17, 0, 14, 0, 11, 0, 9, 0, 6, 0, 4, 0, - 2, 0, 0, 0, 0, 2, 0, 4, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 0, 123, 0, 115, - 0, 108, 0, 101, 0, 94, 0, 88, 0, 82, 0, 77, 0, 71, 0, 66, 0, 62, 0, 57, - 0, 53, 0, 49, 0, 45, 0, 41, 0, 37, 0, 34, 0, 31, 0, 28, 0, 25, 0, 22, - 0, 19, 0, 16, 0, 13, 0, 11, 0, 8, 0, 6, 0, 4, 0, 2, 0, 0, 0, 2, - 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 115, 0, 108, 0, 101, 0, 94, 0, 88, 0, - 82, 0, 77, 0, 71, 0, 66, 0, 62, 0, 57, 0, 53, 0, 49, 0, 45, 0, 41, 0, - 37, 0, 34, 0, 31, 0, 28, 0, 25, 0, 22, 0, 19, 0, 16, 0, 13, 0, 11, 0, - 8, 0, 6, 0, 4, 0, 2, 0, 0, 0, 0, 2, 0, 4, 123, 0, 115, 0, 108, 0, - 101, 0, 94, 0, 88, 0, 82, 0, 77, 0, 71, 0, 66, 0, 62, 0, 57, 0, 53, 0, - 49, 0, 45, 0, 41, 0, 37, 0, 34, 0, 31, 0, 28, 0, 25, 0, 22, 0, 19, 0, - 16, 0, 13, 0, 11, 0, 8, 0, 6, 0, 4, 0, 2, 0, 0, 0, 0, 2, 0, 4, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1, 0, 123, 0, 115, 0, 108, 0, 102, 0, 95, 0, 89, 0, 83, - 0, 78, 0, 73, 0, 68, 0, 63, 0, 59, 0, 55, 0, 51, 0, 47, 0, 43, 0, 39, - 0, 36, 0, 33, 0, 30, 0, 26, 0, 24, 0, 21, 0, 18, 0, 15, 0, 13, 0, 10, - 0, 8, 0, 6, 0, 4, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, - 115, 0, 108, 0, 102, 0, 95, 0, 89, 0, 83, 0, 78, 0, 73, 0, 68, 0, 63, 0, - 59, 0, 55, 0, 51, 0, 47, 0, 43, 0, 39, 0, 36, 0, 33, 0, 30, 0, 26, 0, - 24, 0, 21, 0, 18, 0, 15, 0, 13, 0, 10, 0, 8, 0, 6, 0, 4, 0, 2, 0, - 0, 0, 0, 1, 123, 0, 115, 0, 108, 0, 102, 0, 95, 0, 89, 0, 83, 0, 78, 0, - 73, 0, 68, 0, 63, 0, 59, 0, 55, 0, 51, 0, 47, 0, 43, 0, 39, 0, 36, 0, - 33, 0, 30, 0, 26, 0, 24, 0, 21, 0, 18, 0, 15, 0, 13, 0, 10, 0, 8, 0, - 6, 0, 4, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 116, - 0, 109, 0, 102, 0, 96, 0, 90, 0, 85, 0, 79, 0, 74, 0, 69, 0, 65, 0, 60, - 0, 56, 0, 52, 0, 48, 0, 45, 0, 41, 0, 38, 0, 35, 0, 31, 0, 28, 0, 25, - 0, 23, 0, 20, 0, 17, 0, 15, 0, 12, 0, 10, 0, 8, 0, 6, 0, 4, 0, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 116, 0, 109, 0, 102, 0, 96, 0, 90, 0, - 85, 0, 79, 0, 74, 0, 69, 0, 65, 0, 60, 0, 56, 0, 52, 0, 48, 0, 45, 0, - 41, 0, 38, 0, 35, 0, 31, 0, 28, 0, 25, 0, 23, 0, 20, 0, 17, 0, 15, 0, - 12, 0, 10, 0, 8, 0, 6, 0, 4, 0, 1, 0, 0, 0, 123, 0, 116, 0, 109, 0, - 102, 0, 96, 0, 90, 0, 85, 0, 79, 0, 74, 0, 69, 0, 65, 0, 60, 0, 56, 0, - 52, 0, 48, 0, 45, 0, 41, 0, 38, 0, 35, 0, 31, 0, 28, 0, 25, 0, 23, 0, - 20, 0, 17, 0, 15, 0, 12, 0, 10, 0, 8, 0, 6, 0, 4, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 63, 0, 85, 0, 95, 0, 102, 0, - 106, 0, 109, 0, 111, 0, 113, 0, 114, 0, 115, 0, 116, 0, 117, 0, 118, 0, - 119, 0, - 119, 0, 120, 0, 120, 0, 120, 0, 121, 0, 121, 0, 121, 0, 121, 0, 122, 0, - 122, 0, - 122, 0, 122, 0, 122, 0, 123, 0, 123, 0, 123, 0, 123, 0, 123, 0, 31, 31, 63, - 0, - 85, 0, 95, 0, 102, 0, 106, 0, 109, 0, 111, 0, 113, 0, 114, 0, 115, 0, 116, - 0, - 117, 0, 118, 0, 119, 0, 119, 0, 120, 0, 120, 0, 120, 0, 121, 0, 121, 0, - 121, 0, - 121, 0, 122, 0, 122, 0, 122, 0, 122, 0, 122, 0, 123, 0, 123, 0, 123, 0, - 123, 0, - 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 63, 0, 85, 0, 95, 0, 102, 0, 106, 0, - 109, 0, 111, 0, 113, 0, 114, 0, 115, 0, 116, 0, 117, 0, 118, 0, 119, 0, - 119, 0, - 120, 0, 120, 0, 120, 0, 121, 0, 121, 0, 121, 0, 121, 0, 122, 0, 122, 0, - 122, 0, - 122, 0, 122, 0, 123, 0, 123, 0, 123, 0, 123, 0, 123, 0, 31, 31, 63, 0, 85, - 0, - 95, 0, 102, 0, 106, 0, 109, 0, 111, 0, 113, 0, 114, 0, 115, 0, 116, 0, 117, - 0, - 118, 0, 119, 0, 119, 0, 120, 0, 120, 0, 120, 0, 121, 0, 121, 0, 121, 0, - 121, 0, - 122, 0, 122, 0, 122, 0, 122, 0, 122, 0, 123, 0, 123, 0, 123, 0, 123, 0, - 123, 0, - 0, 0, 10, 0, 31, 0, 51, 0, 63, 0, 72, 0, 79, 0, 85, 0, 89, 0, 92, 0, - 95, 0, 98, 0, 100, 0, 102, 0, 103, 0, 105, 0, 106, 0, 107, 0, 108, 0, 109, - 0, - 110, 0, 110, 0, 111, 0, 112, 0, 112, 0, 113, 0, 113, 0, 114, 0, 114, 0, - 115, 0, - 115, 0, 115, 0, 116, 0, 0, 63, 10, 10, 31, 0, 51, 0, 63, 0, 72, 0, 79, 0, - 85, 0, 89, 0, 92, 0, 95, 0, 98, 0, 100, 0, 102, 0, 103, 0, 105, 0, 106, 0, - 107, 0, 108, 0, 109, 0, 110, 0, 110, 0, 111, 0, 112, 0, 112, 0, 113, 0, - 113, 0, - 114, 0, 114, 0, 115, 0, 115, 0, 115, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, - 20, 0, 31, 0, 51, 0, 63, 0, 72, 0, 79, 0, 85, 0, 89, 0, 92, 0, 95, 0, - 98, 0, 100, 0, 102, 0, 103, 0, 105, 0, 106, 0, 107, 0, 108, 0, 109, 0, 110, - 0, - 110, 0, 111, 0, 112, 0, 112, 0, 113, 0, 113, 0, 114, 0, 114, 0, 115, 0, - 115, 0, - 115, 0, 116, 0, 0, 63, 10, 10, 31, 0, 51, 0, 63, 0, 72, 0, 79, 0, 85, 0, - 89, 0, 92, 0, 95, 0, 98, 0, 100, 0, 102, 0, 103, 0, 105, 0, 106, 0, 107, 0, - 108, 0, 109, 0, 110, 0, 110, 0, 111, 0, 112, 0, 112, 0, 113, 0, 113, 0, - 114, 0, - 114, 0, 115, 0, 115, 0, 115, 0, 116, 0, 0, 0, 0, 0, 6, 0, 21, 0, 36, 0, - 47, 0, 56, 0, 63, 0, 69, 0, 74, 0, 78, 0, 81, 0, 85, 0, 87, 0, 89, 0, - 92, 0, 93, 0, 95, 0, 97, 0, 98, 0, 99, 0, 100, 0, 102, 0, 102, 0, 103, 0, - 104, 0, 105, 0, 106, 0, 106, 0, 107, 0, 108, 0, 108, 0, 109, 0, 0, 85, 0, - 31, - 6, 6, 21, 0, 36, 0, 47, 0, 56, 0, 63, 0, 69, 0, 74, 0, 78, 0, 81, 0, - 85, 0, 87, 0, 89, 0, 92, 0, 93, 0, 95, 0, 97, 0, 98, 0, 99, 0, 100, 0, - 102, 0, 102, 0, 103, 0, 104, 0, 105, 0, 106, 0, 106, 0, 107, 0, 108, 0, - 108, 0, - 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 85, 0, 31, 0, 12, 0, 21, 0, 36, 0, 47, 0, - 56, 0, 63, 0, 69, 0, 74, 0, 78, 0, 81, 0, 85, 0, 87, 0, 89, 0, 92, 0, - 93, 0, 95, 0, 97, 0, 98, 0, 99, 0, 100, 0, 102, 0, 102, 0, 103, 0, 104, 0, - 105, 0, 106, 0, 106, 0, 107, 0, 108, 0, 108, 0, 109, 0, 0, 85, 0, 31, 6, 6, - 21, 0, 36, 0, 47, 0, 56, 0, 63, 0, 69, 0, 74, 0, 78, 0, 81, 0, 85, 0, - 87, 0, 89, 0, 92, 0, 93, 0, 95, 0, 97, 0, 98, 0, 99, 0, 100, 0, 102, 0, - 102, 0, 103, 0, 104, 0, 105, 0, 106, 0, 106, 0, 107, 0, 108, 0, 108, 0, - 109, 0, - 0, 0, 0, 0, 0, 0, 4, 0, 15, 0, 28, 0, 38, 0, 46, 0, 53, 0, 58, 0, - 63, 0, 68, 0, 71, 0, 75, 0, 77, 0, 80, 0, 82, 0, 85, 0, 86, 0, 88, 0, - 90, 0, 91, 0, 93, 0, 94, 0, 95, 0, 96, 0, 97, 0, 98, 0, 99, 0, 100, 0, - 101, 0, 102, 0, 102, 0, 0, 95, 0, 51, 0, 21, 4, 4, 15, 0, 28, 0, 38, 0, - 46, 0, 53, 0, 58, 0, 63, 0, 68, 0, 71, 0, 75, 0, 77, 0, 80, 0, 82, 0, - 85, 0, 86, 0, 88, 0, 90, 0, 91, 0, 93, 0, 94, 0, 95, 0, 96, 0, 97, 0, - 98, 0, 99, 0, 100, 0, 101, 0, 102, 0, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 0, - 51, 0, 21, 0, 8, 0, 15, 0, 28, 0, 38, 0, 46, 0, 53, 0, 58, 0, 63, 0, - 68, 0, 71, 0, 75, 0, 77, 0, 80, 0, 82, 0, 85, 0, 86, 0, 88, 0, 90, 0, - 91, 0, 93, 0, 94, 0, 95, 0, 96, 0, 97, 0, 98, 0, 99, 0, 100, 0, 101, 0, - 102, 0, 102, 0, 0, 95, 0, 51, 0, 21, 4, 4, 15, 0, 28, 0, 38, 0, 46, 0, - 53, 0, 58, 0, 63, 0, 68, 0, 71, 0, 75, 0, 77, 0, 80, 0, 82, 0, 85, 0, - 86, 0, 88, 0, 90, 0, 91, 0, 93, 0, 94, 0, 95, 0, 96, 0, 97, 0, 98, 0, - 99, 0, 100, 0, 101, 0, 102, 0, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, - 12, 0, 23, 0, 31, 0, 39, 0, 45, 0, 51, 0, 55, 0, 60, 0, 63, 0, 67, 0, - 70, 0, 72, 0, 75, 0, 77, 0, 79, 0, 81, 0, 83, 0, 85, 0, 86, 0, 87, 0, - 89, 0, 90, 0, 91, 0, 92, 0, 93, 0, 94, 0, 95, 0, 96, 0, 0, 102, 0, 63, - 0, 36, 0, 15, 3, 3, 12, 0, 23, 0, 31, 0, 39, 0, 45, 0, 51, 0, 55, 0, - 60, 0, 63, 0, 67, 0, 70, 0, 72, 0, 75, 0, 77, 0, 79, 0, 81, 0, 83, 0, - 85, 0, 86, 0, 87, 0, 89, 0, 90, 0, 91, 0, 92, 0, 93, 0, 94, 0, 95, 0, - 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 102, 0, 63, 0, 36, 0, 15, 0, 6, 0, 12, 0, - 23, 0, 31, 0, 39, 0, 45, 0, 51, 0, 55, 0, 60, 0, 63, 0, 67, 0, 70, 0, - 72, 0, 75, 0, 77, 0, 79, 0, 81, 0, 83, 0, 85, 0, 86, 0, 87, 0, 89, 0, - 90, 0, 91, 0, 92, 0, 93, 0, 94, 0, 95, 0, 96, 0, 0, 102, 0, 63, 0, 36, - 0, 15, 3, 3, 12, 0, 23, 0, 31, 0, 39, 0, 45, 0, 51, 0, 55, 0, 60, 0, - 63, 0, 67, 0, 70, 0, 72, 0, 75, 0, 77, 0, 79, 0, 81, 0, 83, 0, 85, 0, - 86, 0, 87, 0, 89, 0, 90, 0, 91, 0, 92, 0, 93, 0, 94, 0, 95, 0, 96, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 10, 0, 19, 0, 27, 0, 34, 0, - 39, 0, 44, 0, 49, 0, 53, 0, 57, 0, 60, 0, 63, 0, 66, 0, 69, 0, 71, 0, - 73, 0, 75, 0, 77, 0, 79, 0, 80, 0, 82, 0, 83, 0, 85, 0, 86, 0, 87, 0, - 88, 0, 89, 0, 90, 0, 0, 106, 0, 72, 0, 47, 0, 28, 0, 12, 2, 2, 10, 0, - 19, 0, 27, 0, 34, 0, 39, 0, 44, 0, 49, 0, 53, 0, 57, 0, 60, 0, 63, 0, - 66, 0, 69, 0, 71, 0, 73, 0, 75, 0, 77, 0, 79, 0, 80, 0, 82, 0, 83, 0, - 85, 0, 86, 0, 87, 0, 88, 0, 89, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 0, - 72, 0, 47, 0, 28, 0, 12, 0, 4, 0, 10, 0, 19, 0, 27, 0, 34, 0, 39, 0, - 44, 0, 49, 0, 53, 0, 57, 0, 60, 0, 63, 0, 66, 0, 69, 0, 71, 0, 73, 0, - 75, 0, 77, 0, 79, 0, 80, 0, 82, 0, 83, 0, 85, 0, 86, 0, 87, 0, 88, 0, - 89, 0, 90, 0, 0, 106, 0, 72, 0, 47, 0, 28, 0, 12, 2, 2, 10, 0, 19, 0, - 27, 0, 34, 0, 39, 0, 44, 0, 49, 0, 53, 0, 57, 0, 60, 0, 63, 0, 66, 0, - 69, 0, 71, 0, 73, 0, 75, 0, 77, 0, 79, 0, 80, 0, 82, 0, 83, 0, 85, 0, - 86, 0, 87, 0, 88, 0, 89, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 2, 0, 9, 0, 17, 0, 23, 0, 30, 0, 35, 0, 40, 0, 44, 0, 48, 0, - 52, 0, 55, 0, 58, 0, 61, 0, 63, 0, 66, 0, 68, 0, 70, 0, 72, 0, 74, 0, - 75, 0, 77, 0, 78, 0, 80, 0, 81, 0, 82, 0, 83, 0, 85, 0, 0, 109, 0, 79, - 0, 56, 0, 38, 0, 23, 0, 10, 2, 2, 9, 0, 17, 0, 23, 0, 30, 0, 35, 0, - 40, 0, 44, 0, 48, 0, 52, 0, 55, 0, 58, 0, 61, 0, 63, 0, 66, 0, 68, 0, - 70, 0, 72, 0, 74, 0, 75, 0, 77, 0, 78, 0, 80, 0, 81, 0, 82, 0, 83, 0, - 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 109, 0, 79, 0, 56, 0, 38, 0, 23, 0, 10, 0, - 4, 0, 9, 0, 17, 0, 23, 0, 30, 0, 35, 0, 40, 0, 44, 0, 48, 0, 52, 0, - 55, 0, 58, 0, 61, 0, 63, 0, 66, 0, 68, 0, 70, 0, 72, 0, 74, 0, 75, 0, - 77, 0, 78, 0, 80, 0, 81, 0, 82, 0, 83, 0, 85, 0, 0, 109, 0, 79, 0, 56, - 0, 38, 0, 23, 0, 10, 2, 2, 9, 0, 17, 0, 23, 0, 30, 0, 35, 0, 40, 0, - 44, 0, 48, 0, 52, 0, 55, 0, 58, 0, 61, 0, 63, 0, 66, 0, 68, 0, 70, 0, - 72, 0, 74, 0, 75, 0, 77, 0, 78, 0, 80, 0, 81, 0, 82, 0, 83, 0, 85, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 7, 0, 15, 0, - 21, 0, 26, 0, 31, 0, 36, 0, 40, 0, 44, 0, 47, 0, 51, 0, 53, 0, 56, 0, - 59, 0, 61, 0, 63, 0, 65, 0, 67, 0, 69, 0, 71, 0, 72, 0, 74, 0, 75, 0, - 77, 0, 78, 0, 79, 0, 0, 111, 0, 85, 0, 63, 0, 46, 0, 31, 0, 19, 0, 9, - 2, 2, 7, 0, 15, 0, 21, 0, 26, 0, 31, 0, 36, 0, 40, 0, 44, 0, 47, 0, - 51, 0, 53, 0, 56, 0, 59, 0, 61, 0, 63, 0, 65, 0, 67, 0, 69, 0, 71, 0, - 72, 0, 74, 0, 75, 0, 77, 0, 78, 0, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 0, - 85, 0, 63, 0, 46, 0, 31, 0, 19, 0, 9, 0, 4, 0, 7, 0, 15, 0, 21, 0, - 26, 0, 31, 0, 36, 0, 40, 0, 44, 0, 47, 0, 51, 0, 53, 0, 56, 0, 59, 0, - 61, 0, 63, 0, 65, 0, 67, 0, 69, 0, 71, 0, 72, 0, 74, 0, 75, 0, 77, 0, - 78, 0, 79, 0, 0, 111, 0, 85, 0, 63, 0, 46, 0, 31, 0, 19, 0, 9, 2, 2, - 7, 0, 15, 0, 21, 0, 26, 0, 31, 0, 36, 0, 40, 0, 44, 0, 47, 0, 51, 0, - 53, 0, 56, 0, 59, 0, 61, 0, 63, 0, 65, 0, 67, 0, 69, 0, 71, 0, 72, 0, - 74, 0, 75, 0, 77, 0, 78, 0, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, 7, 0, 13, 0, 19, 0, 24, 0, 28, 0, 33, 0, - 37, 0, 40, 0, 44, 0, 47, 0, 50, 0, 52, 0, 55, 0, 57, 0, 59, 0, 61, 0, - 63, 0, 65, 0, 67, 0, 68, 0, 70, 0, 71, 0, 73, 0, 74, 0, 0, 113, 0, 89, - 0, 69, 0, 53, 0, 39, 0, 27, 0, 17, 0, 7, 1, 1, 7, 0, 13, 0, 19, 0, - 24, 0, 28, 0, 33, 0, 37, 0, 40, 0, 44, 0, 47, 0, 50, 0, 52, 0, 55, 0, - 57, 0, 59, 0, 61, 0, 63, 0, 65, 0, 67, 0, 68, 0, 70, 0, 71, 0, 73, 0, - 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 113, 0, 89, 0, 69, 0, 53, 0, 39, 0, 27, 0, - 17, 0, 7, 0, 2, 0, 7, 0, 13, 0, 19, 0, 24, 0, 28, 0, 33, 0, 37, 0, - 40, 0, 44, 0, 47, 0, 50, 0, 52, 0, 55, 0, 57, 0, 59, 0, 61, 0, 63, 0, - 65, 0, 67, 0, 68, 0, 70, 0, 71, 0, 73, 0, 74, 0, 0, 113, 0, 89, 0, 69, - 0, 53, 0, 39, 0, 27, 0, 17, 0, 7, 1, 1, 7, 0, 13, 0, 19, 0, 24, 0, - 28, 0, 33, 0, 37, 0, 40, 0, 44, 0, 47, 0, 50, 0, 52, 0, 55, 0, 57, 0, - 59, 0, 61, 0, 63, 0, 65, 0, 67, 0, 68, 0, 70, 0, 71, 0, 73, 0, 74, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, - 6, 0, 12, 0, 17, 0, 22, 0, 26, 0, 30, 0, 34, 0, 37, 0, 40, 0, 43, 0, - 46, 0, 49, 0, 51, 0, 54, 0, 56, 0, 58, 0, 60, 0, 62, 0, 63, 0, 65, 0, - 66, 0, 68, 0, 69, 0, 0, 114, 0, 92, 0, 74, 0, 58, 0, 45, 0, 34, 0, 23, - 0, 15, 0, 7, 1, 1, 6, 0, 12, 0, 17, 0, 22, 0, 26, 0, 30, 0, 34, 0, - 37, 0, 40, 0, 43, 0, 46, 0, 49, 0, 51, 0, 54, 0, 56, 0, 58, 0, 60, 0, - 62, 0, 63, 0, 65, 0, 66, 0, 68, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114, 0, - 92, 0, 74, 0, 58, 0, 45, 0, 34, 0, 23, 0, 15, 0, 7, 0, 2, 0, 6, 0, - 12, 0, 17, 0, 22, 0, 26, 0, 30, 0, 34, 0, 37, 0, 40, 0, 43, 0, 46, 0, - 49, 0, 51, 0, 54, 0, 56, 0, 58, 0, 60, 0, 62, 0, 63, 0, 65, 0, 66, 0, - 68, 0, 69, 0, 0, 114, 0, 92, 0, 74, 0, 58, 0, 45, 0, 34, 0, 23, 0, 15, - 0, 7, 1, 1, 6, 0, 12, 0, 17, 0, 22, 0, 26, 0, 30, 0, 34, 0, 37, 0, - 40, 0, 43, 0, 46, 0, 49, 0, 51, 0, 54, 0, 56, 0, 58, 0, 60, 0, 62, 0, - 63, 0, 65, 0, 66, 0, 68, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 5, 0, 11, 0, 15, 0, 20, 0, - 24, 0, 28, 0, 31, 0, 35, 0, 38, 0, 41, 0, 43, 0, 46, 0, 48, 0, 51, 0, - 53, 0, 55, 0, 57, 0, 58, 0, 60, 0, 62, 0, 63, 0, 65, 0, 0, 115, 0, 95, - 0, 78, 0, 63, 0, 51, 0, 39, 0, 30, 0, 21, 0, 13, 0, 6, 1, 1, 5, 0, - 11, 0, 15, 0, 20, 0, 24, 0, 28, 0, 31, 0, 35, 0, 38, 0, 41, 0, 43, 0, - 46, 0, 48, 0, 51, 0, 53, 0, 55, 0, 57, 0, 58, 0, 60, 0, 62, 0, 63, 0, - 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 115, 0, 95, 0, 78, 0, 63, 0, 51, 0, 39, 0, - 30, 0, 21, 0, 13, 0, 6, 0, 2, 0, 5, 0, 11, 0, 15, 0, 20, 0, 24, 0, - 28, 0, 31, 0, 35, 0, 38, 0, 41, 0, 43, 0, 46, 0, 48, 0, 51, 0, 53, 0, - 55, 0, 57, 0, 58, 0, 60, 0, 62, 0, 63, 0, 65, 0, 0, 115, 0, 95, 0, 78, - 0, 63, 0, 51, 0, 39, 0, 30, 0, 21, 0, 13, 0, 6, 1, 1, 5, 0, 11, 0, - 15, 0, 20, 0, 24, 0, 28, 0, 31, 0, 35, 0, 38, 0, 41, 0, 43, 0, 46, 0, - 48, 0, 51, 0, 53, 0, 55, 0, 57, 0, 58, 0, 60, 0, 62, 0, 63, 0, 65, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 0, 5, 0, 10, 0, 14, 0, 18, 0, 22, 0, 26, 0, 29, 0, 32, 0, - 35, 0, 38, 0, 41, 0, 43, 0, 46, 0, 48, 0, 50, 0, 52, 0, 54, 0, 55, 0, - 57, 0, 59, 0, 60, 0, 0, 116, 0, 98, 0, 81, 0, 68, 0, 55, 0, 44, 0, 35, - 0, 26, 0, 19, 0, 12, 0, 5, 1, 1, 5, 0, 10, 0, 14, 0, 18, 0, 22, 0, - 26, 0, 29, 0, 32, 0, 35, 0, 38, 0, 41, 0, 43, 0, 46, 0, 48, 0, 50, 0, - 52, 0, 54, 0, 55, 0, 57, 0, 59, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 0, - 98, 0, 81, 0, 68, 0, 55, 0, 44, 0, 35, 0, 26, 0, 19, 0, 12, 0, 5, 0, - 2, 0, 5, 0, 10, 0, 14, 0, 18, 0, 22, 0, 26, 0, 29, 0, 32, 0, 35, 0, - 38, 0, 41, 0, 43, 0, 46, 0, 48, 0, 50, 0, 52, 0, 54, 0, 55, 0, 57, 0, - 59, 0, 60, 0, 0, 116, 0, 98, 0, 81, 0, 68, 0, 55, 0, 44, 0, 35, 0, 26, - 0, 19, 0, 12, 0, 5, 1, 1, 5, 0, 10, 0, 14, 0, 18, 0, 22, 0, 26, 0, - 29, 0, 32, 0, 35, 0, 38, 0, 41, 0, 43, 0, 46, 0, 48, 0, 50, 0, 52, 0, - 54, 0, 55, 0, 57, 0, 59, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 4, 0, 9, 0, - 13, 0, 17, 0, 21, 0, 24, 0, 27, 0, 30, 0, 33, 0, 36, 0, 38, 0, 41, 0, - 43, 0, 45, 0, 47, 0, 49, 0, 51, 0, 53, 0, 55, 0, 56, 0, 0, 117, 0, 100, - 0, 85, 0, 71, 0, 60, 0, 49, 0, 40, 0, 31, 0, 24, 0, 17, 0, 11, 0, 5, - 1, 1, 4, 0, 9, 0, 13, 0, 17, 0, 21, 0, 24, 0, 27, 0, 30, 0, 33, 0, - 36, 0, 38, 0, 41, 0, 43, 0, 45, 0, 47, 0, 49, 0, 51, 0, 53, 0, 55, 0, - 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 117, 0, 100, 0, 85, 0, 71, 0, 60, 0, 49, 0, - 40, 0, 31, 0, 24, 0, 17, 0, 11, 0, 5, 0, 2, 0, 4, 0, 9, 0, 13, 0, - 17, 0, 21, 0, 24, 0, 27, 0, 30, 0, 33, 0, 36, 0, 38, 0, 41, 0, 43, 0, - 45, 0, 47, 0, 49, 0, 51, 0, 53, 0, 55, 0, 56, 0, 0, 117, 0, 100, 0, 85, - 0, 71, 0, 60, 0, 49, 0, 40, 0, 31, 0, 24, 0, 17, 0, 11, 0, 5, 1, 1, - 4, 0, 9, 0, 13, 0, 17, 0, 21, 0, 24, 0, 27, 0, 30, 0, 33, 0, 36, 0, - 38, 0, 41, 0, 43, 0, 45, 0, 47, 0, 49, 0, 51, 0, 53, 0, 55, 0, 56, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, 4, 0, 8, 0, 12, 0, 16, 0, 19, 0, 23, 0, - 26, 0, 29, 0, 31, 0, 34, 0, 36, 0, 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, - 49, 0, 51, 0, 52, 0, 0, 118, 0, 102, 0, 87, 0, 75, 0, 63, 0, 53, 0, 44, - 0, 36, 0, 28, 0, 22, 0, 15, 0, 10, 0, 4, 1, 1, 4, 0, 8, 0, 12, 0, - 16, 0, 19, 0, 23, 0, 26, 0, 29, 0, 31, 0, 34, 0, 36, 0, 39, 0, 41, 0, - 43, 0, 45, 0, 47, 0, 49, 0, 51, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 0, - 102, 0, 87, 0, 75, 0, 63, 0, 53, 0, 44, 0, 36, 0, 28, 0, 22, 0, 15, 0, - 10, 0, 4, 0, 2, 0, 4, 0, 8, 0, 12, 0, 16, 0, 19, 0, 23, 0, 26, 0, - 29, 0, 31, 0, 34, 0, 36, 0, 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, 49, 0, - 51, 0, 52, 0, 0, 118, 0, 102, 0, 87, 0, 75, 0, 63, 0, 53, 0, 44, 0, 36, - 0, 28, 0, 22, 0, 15, 0, 10, 0, 4, 1, 1, 4, 0, 8, 0, 12, 0, 16, 0, - 19, 0, 23, 0, 26, 0, 29, 0, 31, 0, 34, 0, 36, 0, 39, 0, 41, 0, 43, 0, - 45, 0, 47, 0, 49, 0, 51, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, - 4, 0, 8, 0, 11, 0, 15, 0, 18, 0, 21, 0, 24, 0, 27, 0, 30, 0, 32, 0, - 35, 0, 37, 0, 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, 48, 0, 0, 119, 0, 103, - 0, 89, 0, 77, 0, 67, 0, 57, 0, 48, 0, 40, 0, 33, 0, 26, 0, 20, 0, 14, - 0, 9, 0, 4, 1, 1, 4, 0, 8, 0, 11, 0, 15, 0, 18, 0, 21, 0, 24, 0, - 27, 0, 30, 0, 32, 0, 35, 0, 37, 0, 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, - 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 119, 0, 103, 0, 89, 0, 77, 0, 67, 0, 57, 0, - 48, 0, 40, 0, 33, 0, 26, 0, 20, 0, 14, 0, 9, 0, 4, 0, 2, 0, 4, 0, - 8, 0, 11, 0, 15, 0, 18, 0, 21, 0, 24, 0, 27, 0, 30, 0, 32, 0, 35, 0, - 37, 0, 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, 48, 0, 0, 119, 0, 103, 0, 89, - 0, 77, 0, 67, 0, 57, 0, 48, 0, 40, 0, 33, 0, 26, 0, 20, 0, 14, 0, 9, - 0, 4, 1, 1, 4, 0, 8, 0, 11, 0, 15, 0, 18, 0, 21, 0, 24, 0, 27, 0, - 30, 0, 32, 0, 35, 0, 37, 0, 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, 48, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 7, 0, 11, 0, 14, 0, - 17, 0, 20, 0, 23, 0, 26, 0, 28, 0, 31, 0, 33, 0, 35, 0, 37, 0, 39, 0, - 41, 0, 43, 0, 45, 0, 0, 119, 0, 105, 0, 92, 0, 80, 0, 70, 0, 60, 0, 52, - 0, 44, 0, 37, 0, 30, 0, 24, 0, 18, 0, 13, 0, 8, 0, 4, 1, 1, 3, 0, - 7, 0, 11, 0, 14, 0, 17, 0, 20, 0, 23, 0, 26, 0, 28, 0, 31, 0, 33, 0, - 35, 0, 37, 0, 39, 0, 41, 0, 43, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 0, - 105, 0, 92, 0, 80, 0, 70, 0, 60, 0, 52, 0, 44, 0, 37, 0, 30, 0, 24, 0, - 18, 0, 13, 0, 8, 0, 4, 0, 2, 0, 3, 0, 7, 0, 11, 0, 14, 0, 17, 0, - 20, 0, 23, 0, 26, 0, 28, 0, 31, 0, 33, 0, 35, 0, 37, 0, 39, 0, 41, 0, - 43, 0, 45, 0, 0, 119, 0, 105, 0, 92, 0, 80, 0, 70, 0, 60, 0, 52, 0, 44, - 0, 37, 0, 30, 0, 24, 0, 18, 0, 13, 0, 8, 0, 4, 1, 1, 3, 0, 7, 0, - 11, 0, 14, 0, 17, 0, 20, 0, 23, 0, 26, 0, 28, 0, 31, 0, 33, 0, 35, 0, - 37, 0, 39, 0, 41, 0, 43, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 7, 0, 10, 0, 13, 0, 16, 0, 19, 0, 22, 0, 24, 0, - 27, 0, 29, 0, 31, 0, 34, 0, 36, 0, 37, 0, 39, 0, 41, 0, 0, 120, 0, 106, - 0, 93, 0, 82, 0, 72, 0, 63, 0, 55, 0, 47, 0, 40, 0, 34, 0, 28, 0, 22, - 0, 17, 0, 12, 0, 8, 0, 3, 0, 0, 3, 0, 7, 0, 10, 0, 13, 0, 16, 0, - 19, 0, 22, 0, 24, 0, 27, 0, 29, 0, 31, 0, 34, 0, 36, 0, 37, 0, 39, 0, - 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 106, 0, 93, 0, 82, 0, 72, 0, 63, 0, - 55, 0, 47, 0, 40, 0, 34, 0, 28, 0, 22, 0, 17, 0, 12, 0, 8, 0, 3, 0, - 0, 0, 3, 0, 7, 0, 10, 0, 13, 0, 16, 0, 19, 0, 22, 0, 24, 0, 27, 0, - 29, 0, 31, 0, 34, 0, 36, 0, 37, 0, 39, 0, 41, 0, 0, 120, 0, 106, 0, 93, - 0, 82, 0, 72, 0, 63, 0, 55, 0, 47, 0, 40, 0, 34, 0, 28, 0, 22, 0, 17, - 0, 12, 0, 8, 0, 3, 0, 0, 3, 0, 7, 0, 10, 0, 13, 0, 16, 0, 19, 0, - 22, 0, 24, 0, 27, 0, 29, 0, 31, 0, 34, 0, 36, 0, 37, 0, 39, 0, 41, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 6, 0, - 10, 0, 13, 0, 15, 0, 18, 0, 21, 0, 23, 0, 26, 0, 28, 0, 30, 0, 32, 0, - 34, 0, 36, 0, 38, 0, 0, 120, 0, 107, 0, 95, 0, 85, 0, 75, 0, 66, 0, 58, - 0, 51, 0, 44, 0, 37, 0, 31, 0, 26, 0, 21, 0, 16, 0, 11, 0, 7, 0, 3, - 0, 0, 3, 0, 6, 0, 10, 0, 13, 0, 15, 0, 18, 0, 21, 0, 23, 0, 26, 0, - 28, 0, 30, 0, 32, 0, 34, 0, 36, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, - 107, 0, 95, 0, 85, 0, 75, 0, 66, 0, 58, 0, 51, 0, 44, 0, 37, 0, 31, 0, - 26, 0, 21, 0, 16, 0, 11, 0, 7, 0, 3, 0, 0, 0, 3, 0, 6, 0, 10, 0, - 13, 0, 15, 0, 18, 0, 21, 0, 23, 0, 26, 0, 28, 0, 30, 0, 32, 0, 34, 0, - 36, 0, 38, 0, 0, 120, 0, 107, 0, 95, 0, 85, 0, 75, 0, 66, 0, 58, 0, 51, - 0, 44, 0, 37, 0, 31, 0, 26, 0, 21, 0, 16, 0, 11, 0, 7, 0, 3, 0, 0, - 3, 0, 6, 0, 10, 0, 13, 0, 15, 0, 18, 0, 21, 0, 23, 0, 26, 0, 28, 0, - 30, 0, 32, 0, 34, 0, 36, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 6, 0, 9, 0, 12, 0, 15, 0, 17, 0, - 20, 0, 22, 0, 24, 0, 27, 0, 29, 0, 31, 0, 33, 0, 35, 0, 0, 120, 0, 108, - 0, 97, 0, 86, 0, 77, 0, 69, 0, 61, 0, 53, 0, 47, 0, 40, 0, 35, 0, 29, - 0, 24, 0, 19, 0, 15, 0, 11, 0, 7, 0, 3, 0, 0, 3, 0, 6, 0, 9, 0, - 12, 0, 15, 0, 17, 0, 20, 0, 22, 0, 24, 0, 27, 0, 29, 0, 31, 0, 33, 0, - 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 108, 0, 97, 0, 86, 0, 77, 0, 69, 0, - 61, 0, 53, 0, 47, 0, 40, 0, 35, 0, 29, 0, 24, 0, 19, 0, 15, 0, 11, 0, - 7, 0, 3, 0, 0, 0, 3, 0, 6, 0, 9, 0, 12, 0, 15, 0, 17, 0, 20, 0, - 22, 0, 24, 0, 27, 0, 29, 0, 31, 0, 33, 0, 35, 0, 0, 120, 0, 108, 0, 97, - 0, 86, 0, 77, 0, 69, 0, 61, 0, 53, 0, 47, 0, 40, 0, 35, 0, 29, 0, 24, - 0, 19, 0, 15, 0, 11, 0, 7, 0, 3, 0, 0, 3, 0, 6, 0, 9, 0, 12, 0, - 15, 0, 17, 0, 20, 0, 22, 0, 24, 0, 27, 0, 29, 0, 31, 0, 33, 0, 35, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 6, 0, 9, 0, 11, 0, 14, 0, 17, 0, 19, 0, 21, 0, 23, 0, 26, 0, - 28, 0, 30, 0, 31, 0, 0, 121, 0, 109, 0, 98, 0, 88, 0, 79, 0, 71, 0, 63, - 0, 56, 0, 50, 0, 43, 0, 38, 0, 32, 0, 27, 0, 23, 0, 18, 0, 14, 0, 10, - 0, 6, 0, 3, 0, 0, 3, 0, 6, 0, 9, 0, 11, 0, 14, 0, 17, 0, 19, 0, - 21, 0, 23, 0, 26, 0, 28, 0, 30, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, - 109, 0, 98, 0, 88, 0, 79, 0, 71, 0, 63, 0, 56, 0, 50, 0, 43, 0, 38, 0, - 32, 0, 27, 0, 23, 0, 18, 0, 14, 0, 10, 0, 6, 0, 3, 0, 0, 0, 3, 0, - 6, 0, 9, 0, 11, 0, 14, 0, 17, 0, 19, 0, 21, 0, 23, 0, 26, 0, 28, 0, - 30, 0, 31, 0, 0, 121, 0, 109, 0, 98, 0, 88, 0, 79, 0, 71, 0, 63, 0, 56, - 0, 50, 0, 43, 0, 38, 0, 32, 0, 27, 0, 23, 0, 18, 0, 14, 0, 10, 0, 6, - 0, 3, 0, 0, 3, 0, 6, 0, 9, 0, 11, 0, 14, 0, 17, 0, 19, 0, 21, 0, - 23, 0, 26, 0, 28, 0, 30, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 5, 0, 8, 0, 11, 0, - 13, 0, 16, 0, 18, 0, 20, 0, 22, 0, 25, 0, 26, 0, 28, 0, 0, 121, 0, 110, - 0, 99, 0, 90, 0, 81, 0, 73, 0, 66, 0, 59, 0, 52, 0, 46, 0, 41, 0, 35, - 0, 30, 0, 26, 0, 21, 0, 17, 0, 13, 0, 10, 0, 6, 0, 3, 0, 0, 3, 0, - 5, 0, 8, 0, 11, 0, 13, 0, 16, 0, 18, 0, 20, 0, 22, 0, 25, 0, 26, 0, - 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, 110, 0, 99, 0, 90, 0, 81, 0, 73, 0, - 66, 0, 59, 0, 52, 0, 46, 0, 41, 0, 35, 0, 30, 0, 26, 0, 21, 0, 17, 0, - 13, 0, 10, 0, 6, 0, 3, 0, 0, 0, 3, 0, 5, 0, 8, 0, 11, 0, 13, 0, - 16, 0, 18, 0, 20, 0, 22, 0, 25, 0, 26, 0, 28, 0, 0, 121, 0, 110, 0, 99, - 0, 90, 0, 81, 0, 73, 0, 66, 0, 59, 0, 52, 0, 46, 0, 41, 0, 35, 0, 30, - 0, 26, 0, 21, 0, 17, 0, 13, 0, 10, 0, 6, 0, 3, 0, 0, 3, 0, 5, 0, - 8, 0, 11, 0, 13, 0, 16, 0, 18, 0, 20, 0, 22, 0, 25, 0, 26, 0, 28, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, 5, 0, 8, 0, 10, 0, 13, 0, 15, 0, 17, 0, 20, 0, - 22, 0, 24, 0, 25, 0, 0, 121, 0, 110, 0, 100, 0, 91, 0, 83, 0, 75, 0, 68, - 0, 61, 0, 55, 0, 49, 0, 43, 0, 38, 0, 33, 0, 29, 0, 24, 0, 20, 0, 16, - 0, 13, 0, 9, 0, 6, 0, 3, 0, 0, 2, 0, 5, 0, 8, 0, 10, 0, 13, 0, - 15, 0, 17, 0, 20, 0, 22, 0, 24, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, - 110, 0, 100, 0, 91, 0, 83, 0, 75, 0, 68, 0, 61, 0, 55, 0, 49, 0, 43, 0, - 38, 0, 33, 0, 29, 0, 24, 0, 20, 0, 16, 0, 13, 0, 9, 0, 6, 0, 3, 0, - 0, 0, 2, 0, 5, 0, 8, 0, 10, 0, 13, 0, 15, 0, 17, 0, 20, 0, 22, 0, - 24, 0, 25, 0, 0, 121, 0, 110, 0, 100, 0, 91, 0, 83, 0, 75, 0, 68, 0, 61, - 0, 55, 0, 49, 0, 43, 0, 38, 0, 33, 0, 29, 0, 24, 0, 20, 0, 16, 0, 13, - 0, 9, 0, 6, 0, 3, 0, 0, 2, 0, 5, 0, 8, 0, 10, 0, 13, 0, 15, 0, - 17, 0, 20, 0, 22, 0, 24, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 5, 0, - 7, 0, 10, 0, 12, 0, 15, 0, 17, 0, 19, 0, 21, 0, 23, 0, 0, 121, 0, 111, - 0, 102, 0, 93, 0, 85, 0, 77, 0, 70, 0, 63, 0, 57, 0, 51, 0, 46, 0, 41, - 0, 36, 0, 31, 0, 27, 0, 23, 0, 19, 0, 15, 0, 12, 0, 9, 0, 5, 0, 2, - 0, 0, 2, 0, 5, 0, 7, 0, 10, 0, 12, 0, 15, 0, 17, 0, 19, 0, 21, 0, - 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, 111, 0, 102, 0, 93, 0, 85, 0, 77, 0, - 70, 0, 63, 0, 57, 0, 51, 0, 46, 0, 41, 0, 36, 0, 31, 0, 27, 0, 23, 0, - 19, 0, 15, 0, 12, 0, 9, 0, 5, 0, 2, 0, 0, 0, 2, 0, 5, 0, 7, 0, - 10, 0, 12, 0, 15, 0, 17, 0, 19, 0, 21, 0, 23, 0, 0, 121, 0, 111, 0, 102, - 0, 93, 0, 85, 0, 77, 0, 70, 0, 63, 0, 57, 0, 51, 0, 46, 0, 41, 0, 36, - 0, 31, 0, 27, 0, 23, 0, 19, 0, 15, 0, 12, 0, 9, 0, 5, 0, 2, 0, 0, - 2, 0, 5, 0, 7, 0, 10, 0, 12, 0, 15, 0, 17, 0, 19, 0, 21, 0, 23, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 5, 0, 7, 0, 10, 0, 12, 0, 14, 0, - 16, 0, 18, 0, 20, 0, 0, 122, 0, 112, 0, 102, 0, 94, 0, 86, 0, 79, 0, 72, - 0, 65, 0, 59, 0, 54, 0, 48, 0, 43, 0, 38, 0, 34, 0, 30, 0, 26, 0, 22, - 0, 18, 0, 15, 0, 11, 0, 8, 0, 5, 0, 2, 0, 0, 2, 0, 5, 0, 7, 0, - 10, 0, 12, 0, 14, 0, 16, 0, 18, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, - 112, 0, 102, 0, 94, 0, 86, 0, 79, 0, 72, 0, 65, 0, 59, 0, 54, 0, 48, 0, - 43, 0, 38, 0, 34, 0, 30, 0, 26, 0, 22, 0, 18, 0, 15, 0, 11, 0, 8, 0, - 5, 0, 2, 0, 0, 0, 2, 0, 5, 0, 7, 0, 10, 0, 12, 0, 14, 0, 16, 0, - 18, 0, 20, 0, 0, 122, 0, 112, 0, 102, 0, 94, 0, 86, 0, 79, 0, 72, 0, 65, - 0, 59, 0, 54, 0, 48, 0, 43, 0, 38, 0, 34, 0, 30, 0, 26, 0, 22, 0, 18, - 0, 15, 0, 11, 0, 8, 0, 5, 0, 2, 0, 0, 2, 0, 5, 0, 7, 0, 10, 0, - 12, 0, 14, 0, 16, 0, 18, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 0, 5, 0, 7, 0, 9, 0, 11, 0, 13, 0, 15, 0, 17, 0, 0, 122, 0, 112, - 0, 103, 0, 95, 0, 87, 0, 80, 0, 74, 0, 67, 0, 61, 0, 56, 0, 51, 0, 46, - 0, 41, 0, 36, 0, 32, 0, 28, 0, 24, 0, 21, 0, 17, 0, 14, 0, 11, 0, 8, - 0, 5, 0, 2, 0, 0, 2, 0, 5, 0, 7, 0, 9, 0, 11, 0, 13, 0, 15, 0, - 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, 112, 0, 103, 0, 95, 0, 87, 0, 80, 0, - 74, 0, 67, 0, 61, 0, 56, 0, 51, 0, 46, 0, 41, 0, 36, 0, 32, 0, 28, 0, - 24, 0, 21, 0, 17, 0, 14, 0, 11, 0, 8, 0, 5, 0, 2, 0, 0, 0, 2, 0, - 5, 0, 7, 0, 9, 0, 11, 0, 13, 0, 15, 0, 17, 0, 0, 122, 0, 112, 0, 103, - 0, 95, 0, 87, 0, 80, 0, 74, 0, 67, 0, 61, 0, 56, 0, 51, 0, 46, 0, 41, - 0, 36, 0, 32, 0, 28, 0, 24, 0, 21, 0, 17, 0, 14, 0, 11, 0, 8, 0, 5, - 0, 2, 0, 0, 2, 0, 5, 0, 7, 0, 9, 0, 11, 0, 13, 0, 15, 0, 17, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 0, 7, 0, 9, 0, - 11, 0, 13, 0, 15, 0, 0, 122, 0, 113, 0, 104, 0, 96, 0, 89, 0, 82, 0, 75, - 0, 69, 0, 63, 0, 58, 0, 53, 0, 48, 0, 43, 0, 39, 0, 35, 0, 31, 0, 27, - 0, 23, 0, 20, 0, 17, 0, 13, 0, 10, 0, 7, 0, 5, 0, 2, 0, 0, 2, 0, - 4, 0, 7, 0, 9, 0, 11, 0, 13, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, - 113, 0, 104, 0, 96, 0, 89, 0, 82, 0, 75, 0, 69, 0, 63, 0, 58, 0, 53, 0, - 48, 0, 43, 0, 39, 0, 35, 0, 31, 0, 27, 0, 23, 0, 20, 0, 17, 0, 13, 0, - 10, 0, 7, 0, 5, 0, 2, 0, 0, 0, 2, 0, 4, 0, 7, 0, 9, 0, 11, 0, - 13, 0, 15, 0, 0, 122, 0, 113, 0, 104, 0, 96, 0, 89, 0, 82, 0, 75, 0, 69, - 0, 63, 0, 58, 0, 53, 0, 48, 0, 43, 0, 39, 0, 35, 0, 31, 0, 27, 0, 23, - 0, 20, 0, 17, 0, 13, 0, 10, 0, 7, 0, 5, 0, 2, 0, 0, 2, 0, 4, 0, - 7, 0, 9, 0, 11, 0, 13, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 10, 0, 12, 0, 0, 122, 0, 113, - 0, 105, 0, 97, 0, 90, 0, 83, 0, 77, 0, 71, 0, 65, 0, 60, 0, 55, 0, 50, - 0, 45, 0, 41, 0, 37, 0, 33, 0, 29, 0, 26, 0, 22, 0, 19, 0, 16, 0, 13, - 0, 10, 0, 7, 0, 5, 0, 2, 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 10, 0, - 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, 113, 0, 105, 0, 97, 0, 90, 0, 83, 0, - 77, 0, 71, 0, 65, 0, 60, 0, 55, 0, 50, 0, 45, 0, 41, 0, 37, 0, 33, 0, - 29, 0, 26, 0, 22, 0, 19, 0, 16, 0, 13, 0, 10, 0, 7, 0, 5, 0, 2, 0, - 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 10, 0, 12, 0, 0, 122, 0, 113, 0, 105, - 0, 97, 0, 90, 0, 83, 0, 77, 0, 71, 0, 65, 0, 60, 0, 55, 0, 50, 0, 45, - 0, 41, 0, 37, 0, 33, 0, 29, 0, 26, 0, 22, 0, 19, 0, 16, 0, 13, 0, 10, - 0, 7, 0, 5, 0, 2, 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 10, 0, 12, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 0, - 6, 0, 8, 0, 10, 0, 0, 122, 0, 114, 0, 106, 0, 98, 0, 91, 0, 85, 0, 78, - 0, 72, 0, 67, 0, 62, 0, 57, 0, 52, 0, 47, 0, 43, 0, 39, 0, 35, 0, 31, - 0, 28, 0, 24, 0, 21, 0, 18, 0, 15, 0, 12, 0, 10, 0, 7, 0, 4, 0, 2, - 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, - 114, 0, 106, 0, 98, 0, 91, 0, 85, 0, 78, 0, 72, 0, 67, 0, 62, 0, 57, 0, - 52, 0, 47, 0, 43, 0, 39, 0, 35, 0, 31, 0, 28, 0, 24, 0, 21, 0, 18, 0, - 15, 0, 12, 0, 10, 0, 7, 0, 4, 0, 2, 0, 0, 0, 2, 0, 4, 0, 6, 0, - 8, 0, 10, 0, 0, 122, 0, 114, 0, 106, 0, 98, 0, 91, 0, 85, 0, 78, 0, 72, - 0, 67, 0, 62, 0, 57, 0, 52, 0, 47, 0, 43, 0, 39, 0, 35, 0, 31, 0, 28, - 0, 24, 0, 21, 0, 18, 0, 15, 0, 12, 0, 10, 0, 7, 0, 4, 0, 2, 0, 0, - 2, 0, 4, 0, 6, 0, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 0, 123, 0, 114, - 0, 106, 0, 99, 0, 92, 0, 86, 0, 80, 0, 74, 0, 68, 0, 63, 0, 58, 0, 54, - 0, 49, 0, 45, 0, 41, 0, 37, 0, 34, 0, 30, 0, 27, 0, 23, 0, 20, 0, 17, - 0, 15, 0, 12, 0, 9, 0, 7, 0, 4, 0, 2, 0, 0, 2, 0, 4, 0, 6, 0, - 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 114, 0, 106, 0, 99, 0, 92, 0, 86, 0, - 80, 0, 74, 0, 68, 0, 63, 0, 58, 0, 54, 0, 49, 0, 45, 0, 41, 0, 37, 0, - 34, 0, 30, 0, 27, 0, 23, 0, 20, 0, 17, 0, 15, 0, 12, 0, 9, 0, 7, 0, - 4, 0, 2, 0, 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 0, 123, 0, 114, 0, 106, - 0, 99, 0, 92, 0, 86, 0, 80, 0, 74, 0, 68, 0, 63, 0, 58, 0, 54, 0, 49, - 0, 45, 0, 41, 0, 37, 0, 34, 0, 30, 0, 27, 0, 23, 0, 20, 0, 17, 0, 15, - 0, 12, 0, 9, 0, 7, 0, 4, 0, 2, 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 0, 4, 0, 6, 0, 0, 123, 0, 115, 0, 107, 0, 100, 0, 93, 0, 87, 0, 81, - 0, 75, 0, 70, 0, 65, 0, 60, 0, 55, 0, 51, 0, 47, 0, 43, 0, 39, 0, 36, - 0, 32, 0, 29, 0, 26, 0, 22, 0, 20, 0, 17, 0, 14, 0, 11, 0, 9, 0, 6, - 0, 4, 0, 2, 0, 0, 2, 0, 4, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, - 115, 0, 107, 0, 100, 0, 93, 0, 87, 0, 81, 0, 75, 0, 70, 0, 65, 0, 60, 0, - 55, 0, 51, 0, 47, 0, 43, 0, 39, 0, 36, 0, 32, 0, 29, 0, 26, 0, 22, 0, - 20, 0, 17, 0, 14, 0, 11, 0, 9, 0, 6, 0, 4, 0, 2, 0, 0, 0, 2, 0, - 4, 0, 6, 0, 0, 123, 0, 115, 0, 107, 0, 100, 0, 93, 0, 87, 0, 81, 0, 75, - 0, 70, 0, 65, 0, 60, 0, 55, 0, 51, 0, 47, 0, 43, 0, 39, 0, 36, 0, 32, - 0, 29, 0, 26, 0, 22, 0, 20, 0, 17, 0, 14, 0, 11, 0, 9, 0, 6, 0, 4, - 0, 2, 0, 0, 2, 0, 4, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 0, 0, 123, 0, 115, - 0, 108, 0, 101, 0, 94, 0, 88, 0, 82, 0, 77, 0, 71, 0, 66, 0, 62, 0, 57, - 0, 53, 0, 49, 0, 45, 0, 41, 0, 37, 0, 34, 0, 31, 0, 28, 0, 25, 0, 22, - 0, 19, 0, 16, 0, 13, 0, 11, 0, 8, 0, 6, 0, 4, 0, 2, 0, 0, 2, 0, - 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 115, 0, 108, 0, 101, 0, 94, 0, 88, 0, - 82, 0, 77, 0, 71, 0, 66, 0, 62, 0, 57, 0, 53, 0, 49, 0, 45, 0, 41, 0, - 37, 0, 34, 0, 31, 0, 28, 0, 25, 0, 22, 0, 19, 0, 16, 0, 13, 0, 11, 0, - 8, 0, 6, 0, 4, 0, 2, 0, 0, 0, 2, 0, 4, 0, 0, 123, 0, 115, 0, 108, - 0, 101, 0, 94, 0, 88, 0, 82, 0, 77, 0, 71, 0, 66, 0, 62, 0, 57, 0, 53, - 0, 49, 0, 45, 0, 41, 0, 37, 0, 34, 0, 31, 0, 28, 0, 25, 0, 22, 0, 19, - 0, 16, 0, 13, 0, 11, 0, 8, 0, 6, 0, 4, 0, 2, 0, 0, 2, 0, 4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 123, 0, 115, 0, 108, 0, 102, 0, 95, 0, 89, 0, 83, - 0, 78, 0, 73, 0, 68, 0, 63, 0, 59, 0, 55, 0, 51, 0, 47, 0, 43, 0, 39, - 0, 36, 0, 33, 0, 30, 0, 26, 0, 24, 0, 21, 0, 18, 0, 15, 0, 13, 0, 10, - 0, 8, 0, 6, 0, 4, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, - 115, 0, 108, 0, 102, 0, 95, 0, 89, 0, 83, 0, 78, 0, 73, 0, 68, 0, 63, 0, - 59, 0, 55, 0, 51, 0, 47, 0, 43, 0, 39, 0, 36, 0, 33, 0, 30, 0, 26, 0, - 24, 0, 21, 0, 18, 0, 15, 0, 13, 0, 10, 0, 8, 0, 6, 0, 4, 0, 2, 0, - 0, 0, 1, 0, 0, 123, 0, 115, 0, 108, 0, 102, 0, 95, 0, 89, 0, 83, 0, 78, - 0, 73, 0, 68, 0, 63, 0, 59, 0, 55, 0, 51, 0, 47, 0, 43, 0, 39, 0, 36, - 0, 33, 0, 30, 0, 26, 0, 24, 0, 21, 0, 18, 0, 15, 0, 13, 0, 10, 0, 8, - 0, 6, 0, 4, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 116, - 0, 109, 0, 102, 0, 96, 0, 90, 0, 85, 0, 79, 0, 74, 0, 69, 0, 65, 0, 60, - 0, 56, 0, 52, 0, 48, 0, 45, 0, 41, 0, 38, 0, 35, 0, 31, 0, 28, 0, 25, - 0, 23, 0, 20, 0, 17, 0, 15, 0, 12, 0, 10, 0, 8, 0, 6, 0, 4, 0, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 116, 0, 109, 0, 102, 0, 96, 0, 90, 0, - 85, 0, 79, 0, 74, 0, 69, 0, 65, 0, 60, 0, 56, 0, 52, 0, 48, 0, 45, 0, - 41, 0, 38, 0, 35, 0, 31, 0, 28, 0, 25, 0, 23, 0, 20, 0, 17, 0, 15, 0, - 12, 0, 10, 0, 8, 0, 6, 0, 4, 0, 1, 0, 0, 0, 0, 123, 0, 116, 0, 109, - 0, 102, 0, 96, 0, 90, 0, 85, 0, 79, 0, 74, 0, 69, 0, 65, 0, 60, 0, 56, - 0, 52, 0, 48, 0, 45, 0, 41, 0, 38, 0, 35, 0, 31, 0, 28, 0, 25, 0, 23, - 0, 20, 0, 17, 0, 15, 0, 12, 0, 10, 0, 8, 0, 6, 0, 4, 0, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 31, 31, 63, 0, 85, 0, 95, 0, 102, 0, 106, 0, 109, 0, - 111, 0, 113, 0, 114, 0, 115, 0, 116, 0, 117, 0, 118, 0, 119, 0, 119, 0, - 120, 0, - 120, 0, 120, 0, 121, 0, 121, 0, 121, 0, 121, 0, 122, 0, 122, 0, 122, 0, - 122, 0, - 122, 0, 123, 0, 123, 0, 123, 0, 123, 0, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 31, - 0, 63, 0, 85, 0, 95, 0, 102, 0, 106, 0, 109, 0, 111, 0, 113, 0, 114, 0, - 115, - 0, 116, 0, 117, 0, 118, 0, 119, 0, 119, 0, 120, 0, 120, 0, 120, 0, 121, 0, - 121, - 0, 121, 0, 121, 0, 122, 0, 122, 0, 122, 0, 122, 0, 122, 0, 123, 0, 123, 0, - 123, - 0, 123, 0, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 10, 10, - 31, 0, 51, 0, 63, 0, 72, 0, 79, 0, 85, 0, 89, 0, 92, 0, 95, 0, 98, 0, - 100, 0, 102, 0, 103, 0, 105, 0, 106, 0, 107, 0, 108, 0, 109, 0, 110, 0, - 110, 0, - 111, 0, 112, 0, 112, 0, 113, 0, 113, 0, 114, 0, 114, 0, 115, 0, 115, 0, - 115, 0, - 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 10, 10, 0, 31, 0, 51, 0, 63, 0, 72, - 0, 79, 0, 85, 0, 89, 0, 92, 0, 95, 0, 98, 0, 100, 0, 102, 0, 103, 0, 105, - 0, 106, 0, 107, 0, 108, 0, 109, 0, 110, 0, 110, 0, 111, 0, 112, 0, 112, 0, - 113, - 0, 113, 0, 114, 0, 114, 0, 115, 0, 115, 0, 115, 0, 116, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 85, 0, 31, 6, 6, 21, 0, 36, 0, 47, 0, 56, 0, - 63, 0, 69, 0, 74, 0, 78, 0, 81, 0, 85, 0, 87, 0, 89, 0, 92, 0, 93, 0, - 95, 0, 97, 0, 98, 0, 99, 0, 100, 0, 102, 0, 102, 0, 103, 0, 104, 0, 105, 0, - 106, 0, 106, 0, 107, 0, 108, 0, 108, 0, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85, 0, - 31, 0, 6, 6, 0, 21, 0, 36, 0, 47, 0, 56, 0, 63, 0, 69, 0, 74, 0, 78, - 0, 81, 0, 85, 0, 87, 0, 89, 0, 92, 0, 93, 0, 95, 0, 97, 0, 98, 0, 99, - 0, 100, 0, 102, 0, 102, 0, 103, 0, 104, 0, 105, 0, 106, 0, 106, 0, 107, 0, - 108, - 0, 108, 0, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 0, 51, - 0, 21, 4, 4, 15, 0, 28, 0, 38, 0, 46, 0, 53, 0, 58, 0, 63, 0, 68, 0, - 71, 0, 75, 0, 77, 0, 80, 0, 82, 0, 85, 0, 86, 0, 88, 0, 90, 0, 91, 0, - 93, 0, 94, 0, 95, 0, 96, 0, 97, 0, 98, 0, 99, 0, 100, 0, 101, 0, 102, 0, - 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 95, 0, 51, 0, 21, 0, 4, 4, 0, 15, 0, 28, - 0, 38, 0, 46, 0, 53, 0, 58, 0, 63, 0, 68, 0, 71, 0, 75, 0, 77, 0, 80, - 0, 82, 0, 85, 0, 86, 0, 88, 0, 90, 0, 91, 0, 93, 0, 94, 0, 95, 0, 96, - 0, 97, 0, 98, 0, 99, 0, 100, 0, 101, 0, 102, 0, 102, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 102, 0, 63, 0, 36, 0, 15, 3, 3, 12, 0, 23, 0, - 31, 0, 39, 0, 45, 0, 51, 0, 55, 0, 60, 0, 63, 0, 67, 0, 70, 0, 72, 0, - 75, 0, 77, 0, 79, 0, 81, 0, 83, 0, 85, 0, 86, 0, 87, 0, 89, 0, 90, 0, - 91, 0, 92, 0, 93, 0, 94, 0, 95, 0, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102, 0, - 63, 0, 36, 0, 15, 0, 3, 3, 0, 12, 0, 23, 0, 31, 0, 39, 0, 45, 0, 51, - 0, 55, 0, 60, 0, 63, 0, 67, 0, 70, 0, 72, 0, 75, 0, 77, 0, 79, 0, 81, - 0, 83, 0, 85, 0, 86, 0, 87, 0, 89, 0, 90, 0, 91, 0, 92, 0, 93, 0, 94, - 0, 95, 0, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 0, 72, - 0, 47, 0, 28, 0, 12, 2, 2, 10, 0, 19, 0, 27, 0, 34, 0, 39, 0, 44, 0, - 49, 0, 53, 0, 57, 0, 60, 0, 63, 0, 66, 0, 69, 0, 71, 0, 73, 0, 75, 0, - 77, 0, 79, 0, 80, 0, 82, 0, 83, 0, 85, 0, 86, 0, 87, 0, 88, 0, 89, 0, - 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 106, 0, 72, 0, 47, 0, 28, 0, 12, 0, 2, 2, - 0, 10, 0, 19, 0, 27, 0, 34, 0, 39, 0, 44, 0, 49, 0, 53, 0, 57, 0, 60, - 0, 63, 0, 66, 0, 69, 0, 71, 0, 73, 0, 75, 0, 77, 0, 79, 0, 80, 0, 82, - 0, 83, 0, 85, 0, 86, 0, 87, 0, 88, 0, 89, 0, 90, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 109, 0, 79, 0, 56, 0, 38, 0, 23, 0, 10, 2, 2, - 9, 0, 17, 0, 23, 0, 30, 0, 35, 0, 40, 0, 44, 0, 48, 0, 52, 0, 55, 0, - 58, 0, 61, 0, 63, 0, 66, 0, 68, 0, 70, 0, 72, 0, 74, 0, 75, 0, 77, 0, - 78, 0, 80, 0, 81, 0, 82, 0, 83, 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 0, - 79, 0, 56, 0, 38, 0, 23, 0, 10, 0, 2, 2, 0, 9, 0, 17, 0, 23, 0, 30, - 0, 35, 0, 40, 0, 44, 0, 48, 0, 52, 0, 55, 0, 58, 0, 61, 0, 63, 0, 66, - 0, 68, 0, 70, 0, 72, 0, 74, 0, 75, 0, 77, 0, 78, 0, 80, 0, 81, 0, 82, - 0, 83, 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 0, 85, - 0, 63, 0, 46, 0, 31, 0, 19, 0, 9, 2, 2, 7, 0, 15, 0, 21, 0, 26, 0, - 31, 0, 36, 0, 40, 0, 44, 0, 47, 0, 51, 0, 53, 0, 56, 0, 59, 0, 61, 0, - 63, 0, 65, 0, 67, 0, 69, 0, 71, 0, 72, 0, 74, 0, 75, 0, 77, 0, 78, 0, - 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 111, 0, 85, 0, 63, 0, 46, 0, 31, 0, 19, 0, - 9, 0, 2, 2, 0, 7, 0, 15, 0, 21, 0, 26, 0, 31, 0, 36, 0, 40, 0, 44, - 0, 47, 0, 51, 0, 53, 0, 56, 0, 59, 0, 61, 0, 63, 0, 65, 0, 67, 0, 69, - 0, 71, 0, 72, 0, 74, 0, 75, 0, 77, 0, 78, 0, 79, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 113, 0, 89, 0, 69, 0, 53, 0, 39, 0, 27, 0, 17, - 0, 7, 1, 1, 7, 0, 13, 0, 19, 0, 24, 0, 28, 0, 33, 0, 37, 0, 40, 0, - 44, 0, 47, 0, 50, 0, 52, 0, 55, 0, 57, 0, 59, 0, 61, 0, 63, 0, 65, 0, - 67, 0, 68, 0, 70, 0, 71, 0, 73, 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 113, 0, - 89, 0, 69, 0, 53, 0, 39, 0, 27, 0, 17, 0, 7, 0, 1, 1, 0, 7, 0, 13, - 0, 19, 0, 24, 0, 28, 0, 33, 0, 37, 0, 40, 0, 44, 0, 47, 0, 50, 0, 52, - 0, 55, 0, 57, 0, 59, 0, 61, 0, 63, 0, 65, 0, 67, 0, 68, 0, 70, 0, 71, - 0, 73, 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114, 0, 92, - 0, 74, 0, 58, 0, 45, 0, 34, 0, 23, 0, 15, 0, 7, 1, 1, 6, 0, 12, 0, - 17, 0, 22, 0, 26, 0, 30, 0, 34, 0, 37, 0, 40, 0, 43, 0, 46, 0, 49, 0, - 51, 0, 54, 0, 56, 0, 58, 0, 60, 0, 62, 0, 63, 0, 65, 0, 66, 0, 68, 0, - 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 114, 0, 92, 0, 74, 0, 58, 0, 45, 0, 34, 0, - 23, 0, 15, 0, 7, 0, 1, 1, 0, 6, 0, 12, 0, 17, 0, 22, 0, 26, 0, 30, - 0, 34, 0, 37, 0, 40, 0, 43, 0, 46, 0, 49, 0, 51, 0, 54, 0, 56, 0, 58, - 0, 60, 0, 62, 0, 63, 0, 65, 0, 66, 0, 68, 0, 69, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 115, 0, 95, 0, 78, 0, 63, 0, 51, 0, 39, 0, 30, - 0, 21, 0, 13, 0, 6, 1, 1, 5, 0, 11, 0, 15, 0, 20, 0, 24, 0, 28, 0, - 31, 0, 35, 0, 38, 0, 41, 0, 43, 0, 46, 0, 48, 0, 51, 0, 53, 0, 55, 0, - 57, 0, 58, 0, 60, 0, 62, 0, 63, 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115, 0, - 95, 0, 78, 0, 63, 0, 51, 0, 39, 0, 30, 0, 21, 0, 13, 0, 6, 0, 1, 1, - 0, 5, 0, 11, 0, 15, 0, 20, 0, 24, 0, 28, 0, 31, 0, 35, 0, 38, 0, 41, - 0, 43, 0, 46, 0, 48, 0, 51, 0, 53, 0, 55, 0, 57, 0, 58, 0, 60, 0, 62, - 0, 63, 0, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 0, 98, - 0, 81, 0, 68, 0, 55, 0, 44, 0, 35, 0, 26, 0, 19, 0, 12, 0, 5, 1, 1, - 5, 0, 10, 0, 14, 0, 18, 0, 22, 0, 26, 0, 29, 0, 32, 0, 35, 0, 38, 0, - 41, 0, 43, 0, 46, 0, 48, 0, 50, 0, 52, 0, 54, 0, 55, 0, 57, 0, 59, 0, - 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 116, 0, 98, 0, 81, 0, 68, 0, 55, 0, 44, 0, - 35, 0, 26, 0, 19, 0, 12, 0, 5, 0, 1, 1, 0, 5, 0, 10, 0, 14, 0, 18, - 0, 22, 0, 26, 0, 29, 0, 32, 0, 35, 0, 38, 0, 41, 0, 43, 0, 46, 0, 48, - 0, 50, 0, 52, 0, 54, 0, 55, 0, 57, 0, 59, 0, 60, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 117, 0, 100, 0, 85, 0, 71, 0, 60, 0, 49, 0, 40, - 0, 31, 0, 24, 0, 17, 0, 11, 0, 5, 1, 1, 4, 0, 9, 0, 13, 0, 17, 0, - 21, 0, 24, 0, 27, 0, 30, 0, 33, 0, 36, 0, 38, 0, 41, 0, 43, 0, 45, 0, - 47, 0, 49, 0, 51, 0, 53, 0, 55, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 0, - 100, 0, 85, 0, 71, 0, 60, 0, 49, 0, 40, 0, 31, 0, 24, 0, 17, 0, 11, 0, - 5, 0, 1, 1, 0, 4, 0, 9, 0, 13, 0, 17, 0, 21, 0, 24, 0, 27, 0, 30, - 0, 33, 0, 36, 0, 38, 0, 41, 0, 43, 0, 45, 0, 47, 0, 49, 0, 51, 0, 53, - 0, 55, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 0, 102, - 0, 87, 0, 75, 0, 63, 0, 53, 0, 44, 0, 36, 0, 28, 0, 22, 0, 15, 0, 10, - 0, 4, 1, 1, 4, 0, 8, 0, 12, 0, 16, 0, 19, 0, 23, 0, 26, 0, 29, 0, - 31, 0, 34, 0, 36, 0, 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, 49, 0, 51, 0, - 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 118, 0, 102, 0, 87, 0, 75, 0, 63, 0, 53, 0, - 44, 0, 36, 0, 28, 0, 22, 0, 15, 0, 10, 0, 4, 0, 1, 1, 0, 4, 0, 8, - 0, 12, 0, 16, 0, 19, 0, 23, 0, 26, 0, 29, 0, 31, 0, 34, 0, 36, 0, 39, - 0, 41, 0, 43, 0, 45, 0, 47, 0, 49, 0, 51, 0, 52, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 119, 0, 103, 0, 89, 0, 77, 0, 67, 0, 57, 0, 48, - 0, 40, 0, 33, 0, 26, 0, 20, 0, 14, 0, 9, 0, 4, 1, 1, 4, 0, 8, 0, - 11, 0, 15, 0, 18, 0, 21, 0, 24, 0, 27, 0, 30, 0, 32, 0, 35, 0, 37, 0, - 39, 0, 41, 0, 43, 0, 45, 0, 47, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 0, - 103, 0, 89, 0, 77, 0, 67, 0, 57, 0, 48, 0, 40, 0, 33, 0, 26, 0, 20, 0, - 14, 0, 9, 0, 4, 0, 1, 1, 0, 4, 0, 8, 0, 11, 0, 15, 0, 18, 0, 21, - 0, 24, 0, 27, 0, 30, 0, 32, 0, 35, 0, 37, 0, 39, 0, 41, 0, 43, 0, 45, - 0, 47, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 119, 0, 105, - 0, 92, 0, 80, 0, 70, 0, 60, 0, 52, 0, 44, 0, 37, 0, 30, 0, 24, 0, 18, - 0, 13, 0, 8, 0, 4, 1, 1, 3, 0, 7, 0, 11, 0, 14, 0, 17, 0, 20, 0, - 23, 0, 26, 0, 28, 0, 31, 0, 33, 0, 35, 0, 37, 0, 39, 0, 41, 0, 43, 0, - 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 119, 0, 105, 0, 92, 0, 80, 0, 70, 0, 60, 0, - 52, 0, 44, 0, 37, 0, 30, 0, 24, 0, 18, 0, 13, 0, 8, 0, 4, 0, 1, 1, - 0, 3, 0, 7, 0, 11, 0, 14, 0, 17, 0, 20, 0, 23, 0, 26, 0, 28, 0, 31, - 0, 33, 0, 35, 0, 37, 0, 39, 0, 41, 0, 43, 0, 45, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 120, 0, 106, 0, 93, 0, 82, 0, 72, 0, 63, 0, 55, - 0, 47, 0, 40, 0, 34, 0, 28, 0, 22, 0, 17, 0, 12, 0, 8, 0, 3, 0, 0, - 3, 0, 7, 0, 10, 0, 13, 0, 16, 0, 19, 0, 22, 0, 24, 0, 27, 0, 29, 0, - 31, 0, 34, 0, 36, 0, 37, 0, 39, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, - 106, 0, 93, 0, 82, 0, 72, 0, 63, 0, 55, 0, 47, 0, 40, 0, 34, 0, 28, 0, - 22, 0, 17, 0, 12, 0, 8, 0, 3, 0, 0, 0, 0, 3, 0, 7, 0, 10, 0, 13, - 0, 16, 0, 19, 0, 22, 0, 24, 0, 27, 0, 29, 0, 31, 0, 34, 0, 36, 0, 37, - 0, 39, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 107, - 0, 95, 0, 85, 0, 75, 0, 66, 0, 58, 0, 51, 0, 44, 0, 37, 0, 31, 0, 26, - 0, 21, 0, 16, 0, 11, 0, 7, 0, 3, 0, 0, 3, 0, 6, 0, 10, 0, 13, 0, - 15, 0, 18, 0, 21, 0, 23, 0, 26, 0, 28, 0, 30, 0, 32, 0, 34, 0, 36, 0, - 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 107, 0, 95, 0, 85, 0, 75, 0, 66, 0, - 58, 0, 51, 0, 44, 0, 37, 0, 31, 0, 26, 0, 21, 0, 16, 0, 11, 0, 7, 0, - 3, 0, 0, 0, 0, 3, 0, 6, 0, 10, 0, 13, 0, 15, 0, 18, 0, 21, 0, 23, - 0, 26, 0, 28, 0, 30, 0, 32, 0, 34, 0, 36, 0, 38, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 120, 0, 108, 0, 97, 0, 86, 0, 77, 0, 69, 0, 61, - 0, 53, 0, 47, 0, 40, 0, 35, 0, 29, 0, 24, 0, 19, 0, 15, 0, 11, 0, 7, - 0, 3, 0, 0, 3, 0, 6, 0, 9, 0, 12, 0, 15, 0, 17, 0, 20, 0, 22, 0, - 24, 0, 27, 0, 29, 0, 31, 0, 33, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, - 108, 0, 97, 0, 86, 0, 77, 0, 69, 0, 61, 0, 53, 0, 47, 0, 40, 0, 35, 0, - 29, 0, 24, 0, 19, 0, 15, 0, 11, 0, 7, 0, 3, 0, 0, 0, 0, 3, 0, 6, - 0, 9, 0, 12, 0, 15, 0, 17, 0, 20, 0, 22, 0, 24, 0, 27, 0, 29, 0, 31, - 0, 33, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, 109, - 0, 98, 0, 88, 0, 79, 0, 71, 0, 63, 0, 56, 0, 50, 0, 43, 0, 38, 0, 32, - 0, 27, 0, 23, 0, 18, 0, 14, 0, 10, 0, 6, 0, 3, 0, 0, 3, 0, 6, 0, - 9, 0, 11, 0, 14, 0, 17, 0, 19, 0, 21, 0, 23, 0, 26, 0, 28, 0, 30, 0, - 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, 109, 0, 98, 0, 88, 0, 79, 0, 71, 0, - 63, 0, 56, 0, 50, 0, 43, 0, 38, 0, 32, 0, 27, 0, 23, 0, 18, 0, 14, 0, - 10, 0, 6, 0, 3, 0, 0, 0, 0, 3, 0, 6, 0, 9, 0, 11, 0, 14, 0, 17, - 0, 19, 0, 21, 0, 23, 0, 26, 0, 28, 0, 30, 0, 31, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 121, 0, 110, 0, 99, 0, 90, 0, 81, 0, 73, 0, 66, - 0, 59, 0, 52, 0, 46, 0, 41, 0, 35, 0, 30, 0, 26, 0, 21, 0, 17, 0, 13, - 0, 10, 0, 6, 0, 3, 0, 0, 3, 0, 5, 0, 8, 0, 11, 0, 13, 0, 16, 0, - 18, 0, 20, 0, 22, 0, 25, 0, 26, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, - 110, 0, 99, 0, 90, 0, 81, 0, 73, 0, 66, 0, 59, 0, 52, 0, 46, 0, 41, 0, - 35, 0, 30, 0, 26, 0, 21, 0, 17, 0, 13, 0, 10, 0, 6, 0, 3, 0, 0, 0, - 0, 3, 0, 5, 0, 8, 0, 11, 0, 13, 0, 16, 0, 18, 0, 20, 0, 22, 0, 25, - 0, 26, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, 110, - 0, 100, 0, 91, 0, 83, 0, 75, 0, 68, 0, 61, 0, 55, 0, 49, 0, 43, 0, 38, - 0, 33, 0, 29, 0, 24, 0, 20, 0, 16, 0, 13, 0, 9, 0, 6, 0, 3, 0, 0, - 2, 0, 5, 0, 8, 0, 10, 0, 13, 0, 15, 0, 17, 0, 20, 0, 22, 0, 24, 0, - 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, 110, 0, 100, 0, 91, 0, 83, 0, 75, 0, - 68, 0, 61, 0, 55, 0, 49, 0, 43, 0, 38, 0, 33, 0, 29, 0, 24, 0, 20, 0, - 16, 0, 13, 0, 9, 0, 6, 0, 3, 0, 0, 0, 0, 2, 0, 5, 0, 8, 0, 10, - 0, 13, 0, 15, 0, 17, 0, 20, 0, 22, 0, 24, 0, 25, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 121, 0, 111, 0, 102, 0, 93, 0, 85, 0, 77, 0, 70, - 0, 63, 0, 57, 0, 51, 0, 46, 0, 41, 0, 36, 0, 31, 0, 27, 0, 23, 0, 19, - 0, 15, 0, 12, 0, 9, 0, 5, 0, 2, 0, 0, 2, 0, 5, 0, 7, 0, 10, 0, - 12, 0, 15, 0, 17, 0, 19, 0, 21, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121, 0, - 111, 0, 102, 0, 93, 0, 85, 0, 77, 0, 70, 0, 63, 0, 57, 0, 51, 0, 46, 0, - 41, 0, 36, 0, 31, 0, 27, 0, 23, 0, 19, 0, 15, 0, 12, 0, 9, 0, 5, 0, - 2, 0, 0, 0, 0, 2, 0, 5, 0, 7, 0, 10, 0, 12, 0, 15, 0, 17, 0, 19, - 0, 21, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, 112, - 0, 102, 0, 94, 0, 86, 0, 79, 0, 72, 0, 65, 0, 59, 0, 54, 0, 48, 0, 43, - 0, 38, 0, 34, 0, 30, 0, 26, 0, 22, 0, 18, 0, 15, 0, 11, 0, 8, 0, 5, - 0, 2, 0, 0, 2, 0, 5, 0, 7, 0, 10, 0, 12, 0, 14, 0, 16, 0, 18, 0, - 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, 112, 0, 102, 0, 94, 0, 86, 0, 79, 0, - 72, 0, 65, 0, 59, 0, 54, 0, 48, 0, 43, 0, 38, 0, 34, 0, 30, 0, 26, 0, - 22, 0, 18, 0, 15, 0, 11, 0, 8, 0, 5, 0, 2, 0, 0, 0, 0, 2, 0, 5, - 0, 7, 0, 10, 0, 12, 0, 14, 0, 16, 0, 18, 0, 20, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 122, 0, 112, 0, 103, 0, 95, 0, 87, 0, 80, 0, 74, - 0, 67, 0, 61, 0, 56, 0, 51, 0, 46, 0, 41, 0, 36, 0, 32, 0, 28, 0, 24, - 0, 21, 0, 17, 0, 14, 0, 11, 0, 8, 0, 5, 0, 2, 0, 0, 2, 0, 5, 0, - 7, 0, 9, 0, 11, 0, 13, 0, 15, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, - 112, 0, 103, 0, 95, 0, 87, 0, 80, 0, 74, 0, 67, 0, 61, 0, 56, 0, 51, 0, - 46, 0, 41, 0, 36, 0, 32, 0, 28, 0, 24, 0, 21, 0, 17, 0, 14, 0, 11, 0, - 8, 0, 5, 0, 2, 0, 0, 0, 0, 2, 0, 5, 0, 7, 0, 9, 0, 11, 0, 13, - 0, 15, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, 113, - 0, 104, 0, 96, 0, 89, 0, 82, 0, 75, 0, 69, 0, 63, 0, 58, 0, 53, 0, 48, - 0, 43, 0, 39, 0, 35, 0, 31, 0, 27, 0, 23, 0, 20, 0, 17, 0, 13, 0, 10, - 0, 7, 0, 5, 0, 2, 0, 0, 2, 0, 4, 0, 7, 0, 9, 0, 11, 0, 13, 0, - 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, 113, 0, 104, 0, 96, 0, 89, 0, 82, 0, - 75, 0, 69, 0, 63, 0, 58, 0, 53, 0, 48, 0, 43, 0, 39, 0, 35, 0, 31, 0, - 27, 0, 23, 0, 20, 0, 17, 0, 13, 0, 10, 0, 7, 0, 5, 0, 2, 0, 0, 0, - 0, 2, 0, 4, 0, 7, 0, 9, 0, 11, 0, 13, 0, 15, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 122, 0, 113, 0, 105, 0, 97, 0, 90, 0, 83, 0, 77, - 0, 71, 0, 65, 0, 60, 0, 55, 0, 50, 0, 45, 0, 41, 0, 37, 0, 33, 0, 29, - 0, 26, 0, 22, 0, 19, 0, 16, 0, 13, 0, 10, 0, 7, 0, 5, 0, 2, 0, 0, - 2, 0, 4, 0, 6, 0, 8, 0, 10, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, - 113, 0, 105, 0, 97, 0, 90, 0, 83, 0, 77, 0, 71, 0, 65, 0, 60, 0, 55, 0, - 50, 0, 45, 0, 41, 0, 37, 0, 33, 0, 29, 0, 26, 0, 22, 0, 19, 0, 16, 0, - 13, 0, 10, 0, 7, 0, 5, 0, 2, 0, 0, 0, 0, 2, 0, 4, 0, 6, 0, 8, - 0, 10, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, 114, - 0, 106, 0, 98, 0, 91, 0, 85, 0, 78, 0, 72, 0, 67, 0, 62, 0, 57, 0, 52, - 0, 47, 0, 43, 0, 39, 0, 35, 0, 31, 0, 28, 0, 24, 0, 21, 0, 18, 0, 15, - 0, 12, 0, 10, 0, 7, 0, 4, 0, 2, 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, - 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 122, 0, 114, 0, 106, 0, 98, 0, 91, 0, 85, 0, - 78, 0, 72, 0, 67, 0, 62, 0, 57, 0, 52, 0, 47, 0, 43, 0, 39, 0, 35, 0, - 31, 0, 28, 0, 24, 0, 21, 0, 18, 0, 15, 0, 12, 0, 10, 0, 7, 0, 4, 0, - 2, 0, 0, 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 10, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 123, 0, 114, 0, 106, 0, 99, 0, 92, 0, 86, 0, 80, - 0, 74, 0, 68, 0, 63, 0, 58, 0, 54, 0, 49, 0, 45, 0, 41, 0, 37, 0, 34, - 0, 30, 0, 27, 0, 23, 0, 20, 0, 17, 0, 15, 0, 12, 0, 9, 0, 7, 0, 4, - 0, 2, 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, - 114, 0, 106, 0, 99, 0, 92, 0, 86, 0, 80, 0, 74, 0, 68, 0, 63, 0, 58, 0, - 54, 0, 49, 0, 45, 0, 41, 0, 37, 0, 34, 0, 30, 0, 27, 0, 23, 0, 20, 0, - 17, 0, 15, 0, 12, 0, 9, 0, 7, 0, 4, 0, 2, 0, 0, 0, 0, 2, 0, 4, - 0, 6, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 115, - 0, 107, 0, 100, 0, 93, 0, 87, 0, 81, 0, 75, 0, 70, 0, 65, 0, 60, 0, 55, - 0, 51, 0, 47, 0, 43, 0, 39, 0, 36, 0, 32, 0, 29, 0, 26, 0, 22, 0, 20, - 0, 17, 0, 14, 0, 11, 0, 9, 0, 6, 0, 4, 0, 2, 0, 0, 2, 0, 4, 0, - 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 115, 0, 107, 0, 100, 0, 93, 0, 87, 0, - 81, 0, 75, 0, 70, 0, 65, 0, 60, 0, 55, 0, 51, 0, 47, 0, 43, 0, 39, 0, - 36, 0, 32, 0, 29, 0, 26, 0, 22, 0, 20, 0, 17, 0, 14, 0, 11, 0, 9, 0, - 6, 0, 4, 0, 2, 0, 0, 0, 0, 2, 0, 4, 0, 6, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 123, 0, 115, 0, 108, 0, 101, 0, 94, 0, 88, 0, 82, - 0, 77, 0, 71, 0, 66, 0, 62, 0, 57, 0, 53, 0, 49, 0, 45, 0, 41, 0, 37, - 0, 34, 0, 31, 0, 28, 0, 25, 0, 22, 0, 19, 0, 16, 0, 13, 0, 11, 0, 8, - 0, 6, 0, 4, 0, 2, 0, 0, 2, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, - 115, 0, 108, 0, 101, 0, 94, 0, 88, 0, 82, 0, 77, 0, 71, 0, 66, 0, 62, 0, - 57, 0, 53, 0, 49, 0, 45, 0, 41, 0, 37, 0, 34, 0, 31, 0, 28, 0, 25, 0, - 22, 0, 19, 0, 16, 0, 13, 0, 11, 0, 8, 0, 6, 0, 4, 0, 2, 0, 0, 0, - 0, 2, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 115, - 0, 108, 0, 102, 0, 95, 0, 89, 0, 83, 0, 78, 0, 73, 0, 68, 0, 63, 0, 59, - 0, 55, 0, 51, 0, 47, 0, 43, 0, 39, 0, 36, 0, 33, 0, 30, 0, 26, 0, 24, - 0, 21, 0, 18, 0, 15, 0, 13, 0, 10, 0, 8, 0, 6, 0, 4, 0, 2, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 115, 0, 108, 0, 102, 0, 95, 0, 89, 0, - 83, 0, 78, 0, 73, 0, 68, 0, 63, 0, 59, 0, 55, 0, 51, 0, 47, 0, 43, 0, - 39, 0, 36, 0, 33, 0, 30, 0, 26, 0, 24, 0, 21, 0, 18, 0, 15, 0, 13, 0, - 10, 0, 8, 0, 6, 0, 4, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 123, 0, 116, 0, 109, 0, 102, 0, 96, 0, 90, 0, 85, - 0, 79, 0, 74, 0, 69, 0, 65, 0, 60, 0, 56, 0, 52, 0, 48, 0, 45, 0, 41, - 0, 38, 0, 35, 0, 31, 0, 28, 0, 25, 0, 23, 0, 20, 0, 17, 0, 15, 0, 12, - 0, 10, 0, 8, 0, 6, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, - 116, 0, 109, 0, 102, 0, 96, 0, 90, 0, 85, 0, 79, 0, 74, 0, 69, 0, 65, 0, - 60, 0, 56, 0, 52, 0, 48, 0, 45, 0, 41, 0, 38, 0, 35, 0, 31, 0, 28, 0, - 25, 0, 23, 0, 20, 0, 17, 0, 15, 0, 12, 0, 10, 0, 8, 0, 6, 0, 4, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_program.c b/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_program.c deleted file mode 100644 index 5c819a9c603..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_program.c +++ /dev/null @@ -1,142 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Jakob Bornecrantz - * Copyright 2011 Lauri Kasanen - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "postprocess/postprocess.h" -#include "cso_cache/cso_context.h" -#include "pipe/p_screen.h" -#include "pipe/p_context.h" -#include "pipe/p_state.h" -#include "pipe/p_shader_tokens.h" -#include "util/u_inlines.h" -#include "util/u_simple_shaders.h" -#include "util/u_memory.h" - -/** Initialize the internal details */ -struct program * -pp_init_prog(struct pp_queue_t *ppq, struct pipe_screen *pscreen) -{ - - struct program *p; - - pp_debug("Initializing program\n"); - if (!pscreen) - return NULL; - - p = CALLOC(1, sizeof(struct program)); - if (!p) - return NULL; - - p->screen = pscreen; - p->pipe = pscreen->context_create(pscreen, NULL); - p->cso = cso_create_context(p->pipe); - - { - static const float verts[4][2][4] = { - { - {1.0f, 1.0f, 0.0f, 1.0f}, - {1.0f, 1.0f, 0.0f, 1.0f} - }, - { - {-1.0f, 1.0f, 0.0f, 1.0f}, - {0.0f, 1.0f, 0.0f, 1.0f} - }, - { - {-1.0f, -1.0f, 0.0f, 1.0f}, - {0.0f, 0.0f, 0.0f, 1.0f} - }, - { - {1.0f, -1.0f, 0.0f, 1.0f}, - {1.0f, 0.0f, 0.0f, 1.0f} - } - }; - - p->vbuf = pipe_buffer_create(pscreen, PIPE_BIND_VERTEX_BUFFER, - PIPE_USAGE_STATIC, sizeof(verts)); - pipe_buffer_write(p->pipe, p->vbuf, 0, sizeof(verts), verts); - } - - p->blend.rt[0].colormask = PIPE_MASK_RGBA; - p->blend.rt[0].rgb_src_factor = p->blend.rt[0].alpha_src_factor = - PIPE_BLENDFACTOR_SRC_ALPHA; - p->blend.rt[0].rgb_dst_factor = p->blend.rt[0].alpha_dst_factor = - PIPE_BLENDFACTOR_INV_SRC_ALPHA; - - p->rasterizer.cull_face = PIPE_FACE_NONE; - p->rasterizer.gl_rasterization_rules = 1; - p->rasterizer.depth_clip = 1; - - p->sampler.wrap_s = p->sampler.wrap_t = p->sampler.wrap_r = - PIPE_TEX_WRAP_CLAMP_TO_EDGE; - - p->sampler.min_mip_filter = PIPE_TEX_MIPFILTER_NONE; - p->sampler.min_img_filter = p->sampler.mag_img_filter = - PIPE_TEX_FILTER_LINEAR; - p->sampler.normalized_coords = 1; - - p->sampler_point.wrap_s = p->sampler_point.wrap_t = - p->sampler_point.wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - p->sampler_point.min_mip_filter = PIPE_TEX_MIPFILTER_NONE; - p->sampler_point.min_img_filter = p->sampler_point.mag_img_filter = - PIPE_TEX_FILTER_NEAREST; - p->sampler_point.normalized_coords = 1; - - p->velem[0].src_offset = 0; - p->velem[0].instance_divisor = 0; - p->velem[0].vertex_buffer_index = 0; - p->velem[0].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT; - p->velem[1].src_offset = 1 * 4 * sizeof(float); - p->velem[1].instance_divisor = 0; - p->velem[1].vertex_buffer_index = 0; - p->velem[1].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT; - - if (!p->screen->is_format_supported(p->screen, - PIPE_FORMAT_R32G32B32A32_FLOAT, - PIPE_BUFFER, 1, - PIPE_BIND_VERTEX_BUFFER)) - pp_debug("Vertex buf format fail\n"); - - - { - const uint semantic_names[] = { TGSI_SEMANTIC_POSITION, - TGSI_SEMANTIC_GENERIC - }; - const uint semantic_indexes[] = { 0, 0 }; - p->passvs = util_make_vertex_passthrough_shader(p->pipe, 2, - semantic_names, - semantic_indexes); - } - - p->framebuffer.nr_cbufs = 1; - - p->surf.usage = PIPE_BIND_RENDER_TARGET; - p->surf.format = PIPE_FORMAT_B8G8R8A8_UNORM; - - p->pipe->set_sample_mask(p->pipe, ~0); - - return p; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_program.h b/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_program.h deleted file mode 100644 index a85ba6ea797..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_program.h +++ /dev/null @@ -1,64 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Jakob Bornecrantz - * Copyright 2011 Lauri Kasanen - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef PP_PROGRAM_H -#define PP_PROGRAM_H - -#include "pipe/p_state.h" - -/** -* Internal control details. -*/ -struct program -{ - struct pipe_screen *screen; - struct pipe_context *pipe; - struct cso_context *cso; - - struct pipe_blend_state blend; - struct pipe_depth_stencil_alpha_state depthstencil; - struct pipe_rasterizer_state rasterizer; - struct pipe_sampler_state sampler; /* bilinear */ - struct pipe_sampler_state sampler_point; /* point */ - struct pipe_viewport_state viewport; - struct pipe_framebuffer_state framebuffer; - struct pipe_vertex_element velem[2]; - - union pipe_color_union clear_color; - - void *passvs; - - struct pipe_resource *vbuf; - struct pipe_surface surf; - struct pipe_sampler_view *view; - - struct blit_state *blitctx; -}; - - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_run.c b/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_run.c deleted file mode 100644 index 89b88a5214c..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/postprocess/pp_run.c +++ /dev/null @@ -1,198 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Lauri Kasanen - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "postprocess.h" - -#include "postprocess/pp_filters.h" -#include "util/u_blit.h" -#include "util/u_inlines.h" -#include "util/u_sampler.h" - -/** -* Main run function of the PP queue. Called on swapbuffers/flush. -* -* Runs all requested filters in order and handles shuffling the temp -* buffers in between. -*/ -void -pp_run(struct pp_queue_t *ppq, struct pipe_resource *in, - struct pipe_resource *out, struct pipe_resource *indepth) -{ - struct pipe_resource *refin = NULL, *refout = NULL; - unsigned int i; - - if (in->width0 != ppq->p->framebuffer.width || - in->height0 != ppq->p->framebuffer.height) { - pp_debug("Resizing the temp pp buffers\n"); - pp_free_fbos(ppq); - pp_init_fbos(ppq, in->width0, in->height0); - } - - if (in == out && ppq->n_filters == 1) { - /* Make a copy of in to tmp[0] in this case. */ - unsigned int w = ppq->p->framebuffer.width; - unsigned int h = ppq->p->framebuffer.height; - - util_blit_pixels(ppq->p->blitctx, in, 0, 0, 0, - w, h, 0, ppq->tmps[0], - 0, 0, w, h, 0, PIPE_TEX_MIPFILTER_NEAREST); - - in = ppq->tmp[0]; - } - - // Kept only for this frame. - pipe_resource_reference(&ppq->depth, indepth); - pipe_resource_reference(&refin, in); - pipe_resource_reference(&refout, out); - - switch (ppq->n_filters) { - case 1: /* No temp buf */ - ppq->pp_queue[0] (ppq, in, out, 0); - break; - case 2: /* One temp buf */ - - ppq->pp_queue[0] (ppq, in, ppq->tmp[0], 0); - ppq->pp_queue[1] (ppq, ppq->tmp[0], out, 1); - - break; - default: /* Two temp bufs */ - ppq->pp_queue[0] (ppq, in, ppq->tmp[0], 0); - - for (i = 1; i < (ppq->n_filters - 1); i++) { - if (i % 2 == 0) - ppq->pp_queue[i] (ppq, ppq->tmp[1], ppq->tmp[0], i); - - else - ppq->pp_queue[i] (ppq, ppq->tmp[0], ppq->tmp[1], i); - } - - if (i % 2 == 0) - ppq->pp_queue[i] (ppq, ppq->tmp[1], out, i); - - else - ppq->pp_queue[i] (ppq, ppq->tmp[0], out, i); - - break; - } - - pipe_resource_reference(&ppq->depth, NULL); - pipe_resource_reference(&refin, NULL); - pipe_resource_reference(&refout, NULL); -} - - -/* Utility functions for the filters. You're not forced to use these if */ -/* your filter is more complicated. */ - -/** Setup this resource as the filter input. */ -void -pp_filter_setup_in(struct program *p, struct pipe_resource *in) -{ - struct pipe_sampler_view v_tmp; - u_sampler_view_default_template(&v_tmp, in, in->format); - p->view = p->pipe->create_sampler_view(p->pipe, in, &v_tmp); -} - -/** Setup this resource as the filter output. */ -void -pp_filter_setup_out(struct program *p, struct pipe_resource *out) -{ - p->surf.format = out->format; - p->surf.usage = PIPE_BIND_RENDER_TARGET; - - p->framebuffer.cbufs[0] = p->pipe->create_surface(p->pipe, out, &p->surf); -} - -/** Clean up the input and output set with the above. */ -void -pp_filter_end_pass(struct program *p) -{ - pipe_surface_reference(&p->framebuffer.cbufs[0], NULL); - pipe_sampler_view_reference(&p->view, NULL); -} - -/** -* Convert the TGSI assembly to a runnable shader. -* -* We need not care about geometry shaders. All we have is screen quads. -*/ -void * -pp_tgsi_to_state(struct pipe_context *pipe, const char *text, bool isvs, - const char *name) -{ - struct pipe_shader_state state; - struct tgsi_token tokens[PP_MAX_TOKENS]; - - if (tgsi_text_translate(text, tokens, Elements(tokens)) == FALSE) { - pp_debug("Failed to translate %s\n", name); - return NULL; - } - - state.tokens = tokens; - memset(&state.stream_output, 0, sizeof(state.stream_output)); - - if (isvs) - return pipe->create_vs_state(pipe, &state); - else - return pipe->create_fs_state(pipe, &state); -} - -/** Setup misc state for the filter. */ -void -pp_filter_misc_state(struct program *p) -{ - cso_set_blend(p->cso, &p->blend); - cso_set_depth_stencil_alpha(p->cso, &p->depthstencil); - cso_set_rasterizer(p->cso, &p->rasterizer); - cso_set_viewport(p->cso, &p->viewport); - - cso_set_vertex_elements(p->cso, 2, p->velem); -} - -/** Draw with the filter to the set output. */ -void -pp_filter_draw(struct program *p) -{ - util_draw_vertex_buffer(p->pipe, p->cso, p->vbuf, 0, - PIPE_PRIM_QUADS, 4, 2); - p->pipe->flush(p->pipe, NULL); -} - -/** Set the framebuffer as active. */ -void -pp_filter_set_fb(struct program *p) -{ - cso_set_framebuffer(p->cso, &p->framebuffer); -} - -/** Set the framebuffer as active and clear it. */ -void -pp_filter_set_clear_fb(struct program *p) -{ - cso_set_framebuffer(p->cso, &p->framebuffer); - p->pipe->clear(p->pipe, PIPE_CLEAR_COLOR, &p->clear_color, 0, 0); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rbug/README b/dll/opengl/mesa/src/gallium/auxiliary/rbug/README deleted file mode 100644 index c5156438a1b..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rbug/README +++ /dev/null @@ -1,25 +0,0 @@ - GALLIUM REMOTE DEBUGGING COMMON CODE - -= About = - -This directory contains the common code for the Gallium 3D remote debugging -driver and clients. The code is two parts the connection managment code and -the (de)marsheller. - -The code currently uses tcp and ip4v for connections. - -Information about driver integration can be found in: - -src/gallium/drivers/rbug/README - -for information about applications look in: - -progs/rbug/README - -for a GUI see: - - http://cgit.freedesktop.org/mesa/rbug-gui - - --- -Jakob Bornecrantz diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug.h b/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug.h deleted file mode 100644 index 259bfc6c79c..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Include all for users the remote debugger protocol code. - */ - -#include "rbug/rbug_core.h" -#include "rbug/rbug_shader.h" -#include "rbug/rbug_context.h" -#include "rbug/rbug_texture.h" -#include "rbug/rbug_connection.h" diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_connection.c b/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_connection.c deleted file mode 100644 index ae4e27f9f6b..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_connection.c +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "rbug/rbug.h" -#include "rbug/rbug_internal.h" - -#include "util/u_network.h" - -struct rbug_connection -{ - int socket; - uint32_t send_serial; - uint32_t recv_serial; - enum rbug_opcode opcode; -}; - -/** - * Create a rbug connection from a socket created with u_socket. - * - * Result: - * A new allocated connection using socket as communication path - */ -struct rbug_connection * -rbug_from_socket(int socket) -{ - struct rbug_connection *c = CALLOC_STRUCT(rbug_connection); - c->socket = socket; - return c; -} - -/** - * Free a connection, also closes socket. - */ -void -rbug_disconnect(struct rbug_connection *c) -{ - u_socket_close(c->socket); - FREE(c); -} - -/** - * Waits for a message to be fully received. - * Also returns the serial for the message, serial is not touched for replys. - * - * Result: - * demarshaled message on success, NULL on connection error - */ -struct rbug_header * -rbug_get_message(struct rbug_connection *c, uint32_t *serial) -{ - struct rbug_proto_header header; - struct rbug_header *out; - struct rbug_proto_header *data; - size_t length = 0; - size_t read = 0; - int ret; - - - ret = u_socket_peek(c->socket, &header, sizeof(header)); - if (ret <= 0) { - return NULL; - } - - length = (size_t)header.length * 4; - data = MALLOC(length); - if (!data) { - return NULL; - } - data->opcode = 0; - - do { - uint8_t *ptr = ((uint8_t*)data) + read; - ret = u_socket_recv(c->socket, ptr, length - read); - - if (ret <= 0) { - FREE(data); - return NULL; - } - - read += ret; - } while(read < length); - - out = rbug_demarshal(data); - if (!out) - FREE(data); - else if (serial) - *serial = c->recv_serial++; - else - c->recv_serial++; - - return out; -} - -/** - * Frees a message and associated data. - */ -void -rbug_free_header(struct rbug_header *header) -{ - if (!header) - return; - - FREE(header->__message); - FREE(header); -} - -/** - * Internal function used by rbug_send_* functions. - * - * Start sending a message. - */ -int -rbug_connection_send_start(struct rbug_connection *c, enum rbug_opcode opcode, uint32_t length) -{ - c->opcode = opcode; - return 0; -} - -/** - * Internal function used by rbug_send_* functions. - * - * Write data to the socket. - */ -int -rbug_connection_write(struct rbug_connection *c, void *to, uint32_t size) -{ - int ret = u_socket_send(c->socket, to, size); - return ret; -} - -/** - * Internal function used by rbug_send_* functions. - * - * Finish writeing data to the socket. - * Ups the send_serial and sets the serial argument if supplied. - */ -int rbug_connection_send_finish(struct rbug_connection *c, uint32_t *serial) -{ - if (c->opcode < 0) - return 0; - else if (serial) - *serial = c->send_serial++; - else - c->send_serial++; - - return 0; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_connection.h b/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_connection.h deleted file mode 100644 index 1f2c9ff347c..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_connection.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * This file contains the function defentions for connection see c file for - * more comments covering function use. - */ - -#ifndef _RBUG_CONNECTION_H_ -#define _RBUG_CONNECTION_H_ - -#include "rbug/rbug_proto.h" - -struct rbug_connection * rbug_from_socket(int socket); - -void rbug_disconnect(struct rbug_connection *c); - -struct rbug_header * rbug_get_message(struct rbug_connection *c, uint32_t *serial); - -void rbug_free_header(struct rbug_header *header); - -struct rbug_header * rbug_demarshal(struct rbug_proto_header *header); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_context.c b/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_context.c deleted file mode 100644 index 1188dd966e4..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_context.c +++ /dev/null @@ -1,748 +0,0 @@ -/* - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * This file holds the function implementation for one of the rbug extensions. - * Prototypes and declerations of functions and structs is in the same folder - * in the header file matching this file's name. - * - * The functions starting rbug_send_* encodes a call to the write format and - * sends that to the supplied connection, while functions starting with - * rbug_demarshal_* demarshal data in the wire protocol. - * - * Functions ending with _reply are replies to requests. - */ - -#include "rbug_internal.h" -#include "rbug/rbug_context.h" - -int rbug_send_context_list(struct rbug_connection *__con, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_CONTEXT_LIST)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_CONTEXT_LIST, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_context_info(struct rbug_connection *__con, - rbug_context_t context, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(8); /* context */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_CONTEXT_INFO)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(8, rbug_context_t, context); /* context */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_CONTEXT_INFO, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_context_draw_block(struct rbug_connection *__con, - rbug_context_t context, - rbug_block_t block, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(8); /* context */ - LEN(4); /* block */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_CONTEXT_DRAW_BLOCK)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(8, rbug_context_t, context); /* context */ - WRITE(4, rbug_block_t, block); /* block */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_CONTEXT_DRAW_BLOCK, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_context_draw_step(struct rbug_connection *__con, - rbug_context_t context, - rbug_block_t step, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(8); /* context */ - LEN(4); /* step */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_CONTEXT_DRAW_STEP)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(8, rbug_context_t, context); /* context */ - WRITE(4, rbug_block_t, step); /* step */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_CONTEXT_DRAW_STEP, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_context_draw_unblock(struct rbug_connection *__con, - rbug_context_t context, - rbug_block_t unblock, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(8); /* context */ - LEN(4); /* unblock */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_CONTEXT_DRAW_UNBLOCK)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(8, rbug_context_t, context); /* context */ - WRITE(4, rbug_block_t, unblock); /* unblock */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_CONTEXT_DRAW_UNBLOCK, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_context_draw_rule(struct rbug_connection *__con, - rbug_context_t context, - rbug_shader_t vertex, - rbug_shader_t fragment, - rbug_texture_t texture, - rbug_texture_t surface, - rbug_block_t block, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(8); /* context */ - LEN(8); /* vertex */ - LEN(8); /* fragment */ - LEN(8); /* texture */ - LEN(8); /* surface */ - LEN(4); /* block */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_CONTEXT_DRAW_RULE)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(8, rbug_context_t, context); /* context */ - WRITE(8, rbug_shader_t, vertex); /* vertex */ - WRITE(8, rbug_shader_t, fragment); /* fragment */ - WRITE(8, rbug_texture_t, texture); /* texture */ - WRITE(8, rbug_texture_t, surface); /* surface */ - WRITE(4, rbug_block_t, block); /* block */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_CONTEXT_DRAW_RULE, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_context_flush(struct rbug_connection *__con, - rbug_context_t context, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(8); /* context */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_CONTEXT_FLUSH)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(8, rbug_context_t, context); /* context */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_CONTEXT_FLUSH, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_context_list_reply(struct rbug_connection *__con, - uint32_t serial, - rbug_context_t *contexts, - uint32_t contexts_len, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(4); /* serial */ - LEN_ARRAY(8, contexts); /* contexts */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_CONTEXT_LIST_REPLY)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(4, uint32_t, serial); /* serial */ - WRITE_ARRAY(8, rbug_context_t, contexts); /* contexts */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_CONTEXT_LIST_REPLY, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_context_info_reply(struct rbug_connection *__con, - uint32_t serial, - rbug_shader_t vertex, - rbug_shader_t fragment, - rbug_texture_t *texs, - uint32_t texs_len, - rbug_texture_t *cbufs, - uint32_t cbufs_len, - rbug_texture_t zsbuf, - rbug_block_t blocker, - rbug_block_t blocked, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(4); /* serial */ - LEN(8); /* vertex */ - LEN(8); /* fragment */ - LEN_ARRAY(8, texs); /* texs */ - LEN_ARRAY(8, cbufs); /* cbufs */ - LEN(8); /* zsbuf */ - LEN(4); /* blocker */ - LEN(4); /* blocked */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_CONTEXT_INFO_REPLY)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(4, uint32_t, serial); /* serial */ - WRITE(8, rbug_shader_t, vertex); /* vertex */ - WRITE(8, rbug_shader_t, fragment); /* fragment */ - WRITE_ARRAY(8, rbug_texture_t, texs); /* texs */ - WRITE_ARRAY(8, rbug_texture_t, cbufs); /* cbufs */ - WRITE(8, rbug_texture_t, zsbuf); /* zsbuf */ - WRITE(4, rbug_block_t, blocker); /* blocker */ - WRITE(4, rbug_block_t, blocked); /* blocked */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_CONTEXT_INFO_REPLY, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_context_draw_blocked(struct rbug_connection *__con, - rbug_context_t context, - rbug_block_t block, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(8); /* context */ - LEN(4); /* block */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_CONTEXT_DRAW_BLOCKED)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(8, rbug_context_t, context); /* context */ - WRITE(4, rbug_block_t, block); /* block */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_CONTEXT_DRAW_BLOCKED, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -struct rbug_proto_context_list * rbug_demarshal_context_list(struct rbug_proto_header *header) -{ - struct rbug_proto_context_list *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_CONTEXT_LIST) - return NULL; - - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - return ret; -} - -struct rbug_proto_context_info * rbug_demarshal_context_info(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_context_info *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_CONTEXT_INFO) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(8, rbug_context_t, context); /* context */ - - return ret; -} - -struct rbug_proto_context_draw_block * rbug_demarshal_context_draw_block(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_context_draw_block *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_CONTEXT_DRAW_BLOCK) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(8, rbug_context_t, context); /* context */ - READ(4, rbug_block_t, block); /* block */ - - return ret; -} - -struct rbug_proto_context_draw_step * rbug_demarshal_context_draw_step(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_context_draw_step *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_CONTEXT_DRAW_STEP) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(8, rbug_context_t, context); /* context */ - READ(4, rbug_block_t, step); /* step */ - - return ret; -} - -struct rbug_proto_context_draw_unblock * rbug_demarshal_context_draw_unblock(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_context_draw_unblock *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_CONTEXT_DRAW_UNBLOCK) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(8, rbug_context_t, context); /* context */ - READ(4, rbug_block_t, unblock); /* unblock */ - - return ret; -} - -struct rbug_proto_context_draw_rule * rbug_demarshal_context_draw_rule(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_context_draw_rule *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_CONTEXT_DRAW_RULE) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(8, rbug_context_t, context); /* context */ - READ(8, rbug_shader_t, vertex); /* vertex */ - READ(8, rbug_shader_t, fragment); /* fragment */ - READ(8, rbug_texture_t, texture); /* texture */ - READ(8, rbug_texture_t, surface); /* surface */ - READ(4, rbug_block_t, block); /* block */ - - return ret; -} - -struct rbug_proto_context_flush * rbug_demarshal_context_flush(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_context_flush *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_CONTEXT_FLUSH) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(8, rbug_context_t, context); /* context */ - - return ret; -} - -struct rbug_proto_context_list_reply * rbug_demarshal_context_list_reply(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_context_list_reply *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_CONTEXT_LIST_REPLY) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(4, uint32_t, serial); /* serial */ - READ_ARRAY(8, rbug_context_t, contexts); /* contexts */ - - return ret; -} - -struct rbug_proto_context_info_reply * rbug_demarshal_context_info_reply(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_context_info_reply *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_CONTEXT_INFO_REPLY) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(4, uint32_t, serial); /* serial */ - READ(8, rbug_shader_t, vertex); /* vertex */ - READ(8, rbug_shader_t, fragment); /* fragment */ - READ_ARRAY(8, rbug_texture_t, texs); /* texs */ - READ_ARRAY(8, rbug_texture_t, cbufs); /* cbufs */ - READ(8, rbug_texture_t, zsbuf); /* zsbuf */ - READ(4, rbug_block_t, blocker); /* blocker */ - READ(4, rbug_block_t, blocked); /* blocked */ - - return ret; -} - -struct rbug_proto_context_draw_blocked * rbug_demarshal_context_draw_blocked(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_context_draw_blocked *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_CONTEXT_DRAW_BLOCKED) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(8, rbug_context_t, context); /* context */ - READ(4, rbug_block_t, block); /* block */ - - return ret; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_context.h b/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_context.h deleted file mode 100644 index 4a865c25fc5..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_context.h +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * This file holds structs decelerations and function prototypes for one of - * the rbug extensions. Implementation of the functions is in the same folder - * in the c file matching this file's name. - * - * The structs what is returned from the demarshal functions. The functions - * starting rbug_send_* encodes a call to the write format and sends that to - * the supplied connection, while functions starting with rbug_demarshal_* - * demarshal data from the wire protocol. - * - * Structs and functions ending with _reply are replies to requests. - */ - -#ifndef _RBUG_PROTO_CONTEXT_H_ -#define _RBUG_PROTO_CONTEXT_H_ - -#include "rbug/rbug_proto.h" -#include "rbug/rbug_core.h" - -typedef enum -{ - RBUG_BLOCK_BEFORE = 1, - RBUG_BLOCK_AFTER = 2, - RBUG_BLOCK_RULE = 4, - RBUG_BLOCK_MASK = 7 -} rbug_block_t; - -struct rbug_proto_context_list -{ - struct rbug_header header; -}; - -struct rbug_proto_context_info -{ - struct rbug_header header; - rbug_context_t context; -}; - -struct rbug_proto_context_draw_block -{ - struct rbug_header header; - rbug_context_t context; - rbug_block_t block; -}; - -struct rbug_proto_context_draw_step -{ - struct rbug_header header; - rbug_context_t context; - rbug_block_t step; -}; - -struct rbug_proto_context_draw_unblock -{ - struct rbug_header header; - rbug_context_t context; - rbug_block_t unblock; -}; - -struct rbug_proto_context_draw_rule -{ - struct rbug_header header; - rbug_context_t context; - rbug_shader_t vertex; - rbug_shader_t fragment; - rbug_texture_t texture; - rbug_texture_t surface; - rbug_block_t block; -}; - -struct rbug_proto_context_flush -{ - struct rbug_header header; - rbug_context_t context; -}; - -struct rbug_proto_context_list_reply -{ - struct rbug_header header; - uint32_t serial; - rbug_context_t *contexts; - uint32_t contexts_len; -}; - -struct rbug_proto_context_info_reply -{ - struct rbug_header header; - uint32_t serial; - rbug_shader_t vertex; - rbug_shader_t fragment; - rbug_texture_t *texs; - uint32_t texs_len; - rbug_texture_t *cbufs; - uint32_t cbufs_len; - rbug_texture_t zsbuf; - rbug_block_t blocker; - rbug_block_t blocked; -}; - -struct rbug_proto_context_draw_blocked -{ - struct rbug_header header; - rbug_context_t context; - rbug_block_t block; -}; - -int rbug_send_context_list(struct rbug_connection *__con, - uint32_t *__serial); - -int rbug_send_context_info(struct rbug_connection *__con, - rbug_context_t context, - uint32_t *__serial); - -int rbug_send_context_draw_block(struct rbug_connection *__con, - rbug_context_t context, - rbug_block_t block, - uint32_t *__serial); - -int rbug_send_context_draw_step(struct rbug_connection *__con, - rbug_context_t context, - rbug_block_t step, - uint32_t *__serial); - -int rbug_send_context_draw_unblock(struct rbug_connection *__con, - rbug_context_t context, - rbug_block_t unblock, - uint32_t *__serial); - -int rbug_send_context_draw_rule(struct rbug_connection *__con, - rbug_context_t context, - rbug_shader_t vertex, - rbug_shader_t fragment, - rbug_texture_t texture, - rbug_texture_t surface, - rbug_block_t block, - uint32_t *__serial); - -int rbug_send_context_flush(struct rbug_connection *__con, - rbug_context_t context, - uint32_t *__serial); - -int rbug_send_context_list_reply(struct rbug_connection *__con, - uint32_t serial, - rbug_context_t *contexts, - uint32_t contexts_len, - uint32_t *__serial); - -int rbug_send_context_info_reply(struct rbug_connection *__con, - uint32_t serial, - rbug_shader_t vertex, - rbug_shader_t fragment, - rbug_texture_t *texs, - uint32_t texs_len, - rbug_texture_t *cbufs, - uint32_t cbufs_len, - rbug_texture_t zsbuf, - rbug_block_t blocker, - rbug_block_t blocked, - uint32_t *__serial); - -int rbug_send_context_draw_blocked(struct rbug_connection *__con, - rbug_context_t context, - rbug_block_t block, - uint32_t *__serial); - -struct rbug_proto_context_list * rbug_demarshal_context_list(struct rbug_proto_header *header); - -struct rbug_proto_context_info * rbug_demarshal_context_info(struct rbug_proto_header *header); - -struct rbug_proto_context_draw_block * rbug_demarshal_context_draw_block(struct rbug_proto_header *header); - -struct rbug_proto_context_draw_step * rbug_demarshal_context_draw_step(struct rbug_proto_header *header); - -struct rbug_proto_context_draw_unblock * rbug_demarshal_context_draw_unblock(struct rbug_proto_header *header); - -struct rbug_proto_context_draw_rule * rbug_demarshal_context_draw_rule(struct rbug_proto_header *header); - -struct rbug_proto_context_flush * rbug_demarshal_context_flush(struct rbug_proto_header *header); - -struct rbug_proto_context_list_reply * rbug_demarshal_context_list_reply(struct rbug_proto_header *header); - -struct rbug_proto_context_info_reply * rbug_demarshal_context_info_reply(struct rbug_proto_header *header); - -struct rbug_proto_context_draw_blocked * rbug_demarshal_context_draw_blocked(struct rbug_proto_header *header); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_core.c b/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_core.c deleted file mode 100644 index 514a10932bc..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_core.c +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * This file holds the function implementation for one of the rbug extensions. - * Prototypes and declerations of functions and structs is in the same folder - * in the header file matching this file's name. - * - * The functions starting rbug_send_* encodes a call to the write format and - * sends that to the supplied connection, while functions starting with - * rbug_demarshal_* demarshal data in the wire protocol. - * - * Functions ending with _reply are replies to requests. - */ - -#include "rbug_internal.h" -#include "rbug/rbug_core.h" - -int rbug_send_noop(struct rbug_connection *__con, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_NOOP)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_NOOP, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_ping(struct rbug_connection *__con, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_PING)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_PING, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_error(struct rbug_connection *__con, - uint32_t error, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(4); /* error */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_ERROR)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(4, uint32_t, error); /* error */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_ERROR, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_ping_reply(struct rbug_connection *__con, - uint32_t serial, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(4); /* serial */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_PING_REPLY)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(4, uint32_t, serial); /* serial */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_PING_REPLY, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_error_reply(struct rbug_connection *__con, - uint32_t serial, - uint32_t error, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(4); /* serial */ - LEN(4); /* error */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_ERROR_REPLY)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(4, uint32_t, serial); /* serial */ - WRITE(4, uint32_t, error); /* error */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_ERROR_REPLY, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -struct rbug_proto_noop * rbug_demarshal_noop(struct rbug_proto_header *header) -{ - struct rbug_proto_noop *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_NOOP) - return NULL; - - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - return ret; -} - -struct rbug_proto_ping * rbug_demarshal_ping(struct rbug_proto_header *header) -{ - struct rbug_proto_ping *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_PING) - return NULL; - - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - return ret; -} - -struct rbug_proto_error * rbug_demarshal_error(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_error *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_ERROR) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(4, uint32_t, error); /* error */ - - return ret; -} - -struct rbug_proto_ping_reply * rbug_demarshal_ping_reply(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_ping_reply *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_PING_REPLY) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(4, uint32_t, serial); /* serial */ - - return ret; -} - -struct rbug_proto_error_reply * rbug_demarshal_error_reply(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_error_reply *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_ERROR_REPLY) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(4, uint32_t, serial); /* serial */ - READ(4, uint32_t, error); /* error */ - - return ret; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_core.h b/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_core.h deleted file mode 100644 index 99a36a0163e..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_core.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * This file holds structs decelerations and function prototypes for one of - * the rbug extensions. Implementation of the functions is in the same folder - * in the c file matching this file's name. - * - * The structs what is returned from the demarshal functions. The functions - * starting rbug_send_* encodes a call to the write format and sends that to - * the supplied connection, while functions starting with rbug_demarshal_* - * demarshal data from the wire protocol. - * - * Structs and functions ending with _reply are replies to requests. - */ - -#ifndef _RBUG_PROTO_CORE_H_ -#define _RBUG_PROTO_CORE_H_ - -#include "rbug/rbug_proto.h" - -typedef uint64_t rbug_shader_t; -typedef uint64_t rbug_context_t; -typedef uint64_t rbug_texture_t; - -struct rbug_proto_noop -{ - struct rbug_header header; -}; - -struct rbug_proto_ping -{ - struct rbug_header header; -}; - -struct rbug_proto_error -{ - struct rbug_header header; - uint32_t error; -}; - -struct rbug_proto_ping_reply -{ - struct rbug_header header; - uint32_t serial; -}; - -struct rbug_proto_error_reply -{ - struct rbug_header header; - uint32_t serial; - uint32_t error; -}; - -int rbug_send_noop(struct rbug_connection *__con, - uint32_t *__serial); - -int rbug_send_ping(struct rbug_connection *__con, - uint32_t *__serial); - -int rbug_send_error(struct rbug_connection *__con, - uint32_t error, - uint32_t *__serial); - -int rbug_send_ping_reply(struct rbug_connection *__con, - uint32_t serial, - uint32_t *__serial); - -int rbug_send_error_reply(struct rbug_connection *__con, - uint32_t serial, - uint32_t error, - uint32_t *__serial); - -struct rbug_proto_noop * rbug_demarshal_noop(struct rbug_proto_header *header); - -struct rbug_proto_ping * rbug_demarshal_ping(struct rbug_proto_header *header); - -struct rbug_proto_error * rbug_demarshal_error(struct rbug_proto_header *header); - -struct rbug_proto_ping_reply * rbug_demarshal_ping_reply(struct rbug_proto_header *header); - -struct rbug_proto_error_reply * rbug_demarshal_error_reply(struct rbug_proto_header *header); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_demarshal.c b/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_demarshal.c deleted file mode 100644 index 06caa45469d..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_demarshal.c +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "rbug.h" - -/** - * Small function that looks at the proto_header and selects the correct - * demarshal functions and return the result. - */ -struct rbug_header * rbug_demarshal(struct rbug_proto_header *header) -{ - switch(header->opcode) { - case RBUG_OP_NOOP: - return (struct rbug_header *)rbug_demarshal_noop(header); - case RBUG_OP_PING: - return (struct rbug_header *)rbug_demarshal_ping(header); - case RBUG_OP_ERROR: - return (struct rbug_header *)rbug_demarshal_error(header); - case RBUG_OP_PING_REPLY: - return (struct rbug_header *)rbug_demarshal_ping_reply(header); - case RBUG_OP_ERROR_REPLY: - return (struct rbug_header *)rbug_demarshal_error_reply(header); - case RBUG_OP_TEXTURE_LIST: - return (struct rbug_header *)rbug_demarshal_texture_list(header); - case RBUG_OP_TEXTURE_INFO: - return (struct rbug_header *)rbug_demarshal_texture_info(header); - case RBUG_OP_TEXTURE_WRITE: - return (struct rbug_header *)rbug_demarshal_texture_write(header); - case RBUG_OP_TEXTURE_READ: - return (struct rbug_header *)rbug_demarshal_texture_read(header); - case RBUG_OP_TEXTURE_LIST_REPLY: - return (struct rbug_header *)rbug_demarshal_texture_list_reply(header); - case RBUG_OP_TEXTURE_INFO_REPLY: - return (struct rbug_header *)rbug_demarshal_texture_info_reply(header); - case RBUG_OP_TEXTURE_READ_REPLY: - return (struct rbug_header *)rbug_demarshal_texture_read_reply(header); - case RBUG_OP_CONTEXT_LIST: - return (struct rbug_header *)rbug_demarshal_context_list(header); - case RBUG_OP_CONTEXT_INFO: - return (struct rbug_header *)rbug_demarshal_context_info(header); - case RBUG_OP_CONTEXT_DRAW_BLOCK: - return (struct rbug_header *)rbug_demarshal_context_draw_block(header); - case RBUG_OP_CONTEXT_DRAW_STEP: - return (struct rbug_header *)rbug_demarshal_context_draw_step(header); - case RBUG_OP_CONTEXT_DRAW_UNBLOCK: - return (struct rbug_header *)rbug_demarshal_context_draw_unblock(header); - case RBUG_OP_CONTEXT_DRAW_RULE: - return (struct rbug_header *)rbug_demarshal_context_draw_rule(header); - case RBUG_OP_CONTEXT_FLUSH: - return (struct rbug_header *)rbug_demarshal_context_flush(header); - case RBUG_OP_CONTEXT_LIST_REPLY: - return (struct rbug_header *)rbug_demarshal_context_list_reply(header); - case RBUG_OP_CONTEXT_INFO_REPLY: - return (struct rbug_header *)rbug_demarshal_context_info_reply(header); - case RBUG_OP_CONTEXT_DRAW_BLOCKED: - return (struct rbug_header *)rbug_demarshal_context_draw_blocked(header); - case RBUG_OP_SHADER_LIST: - return (struct rbug_header *)rbug_demarshal_shader_list(header); - case RBUG_OP_SHADER_INFO: - return (struct rbug_header *)rbug_demarshal_shader_info(header); - case RBUG_OP_SHADER_DISABLE: - return (struct rbug_header *)rbug_demarshal_shader_disable(header); - case RBUG_OP_SHADER_REPLACE: - return (struct rbug_header *)rbug_demarshal_shader_replace(header); - case RBUG_OP_SHADER_LIST_REPLY: - return (struct rbug_header *)rbug_demarshal_shader_list_reply(header); - case RBUG_OP_SHADER_INFO_REPLY: - return (struct rbug_header *)rbug_demarshal_shader_info_reply(header); - default: - return NULL; - } -} - -const char* rbug_proto_get_name(enum rbug_opcode opcode) -{ - switch(opcode) { - case RBUG_OP_NOOP: - return "RBUG_OP_NOOP"; - case RBUG_OP_PING: - return "RBUG_OP_PING"; - case RBUG_OP_ERROR: - return "RBUG_OP_ERROR"; - case RBUG_OP_PING_REPLY: - return "RBUG_OP_PING_REPLY"; - case RBUG_OP_ERROR_REPLY: - return "RBUG_OP_ERROR_REPLY"; - case RBUG_OP_TEXTURE_LIST: - return "RBUG_OP_TEXTURE_LIST"; - case RBUG_OP_TEXTURE_INFO: - return "RBUG_OP_TEXTURE_INFO"; - case RBUG_OP_TEXTURE_WRITE: - return "RBUG_OP_TEXTURE_WRITE"; - case RBUG_OP_TEXTURE_READ: - return "RBUG_OP_TEXTURE_READ"; - case RBUG_OP_TEXTURE_LIST_REPLY: - return "RBUG_OP_TEXTURE_LIST_REPLY"; - case RBUG_OP_TEXTURE_INFO_REPLY: - return "RBUG_OP_TEXTURE_INFO_REPLY"; - case RBUG_OP_TEXTURE_READ_REPLY: - return "RBUG_OP_TEXTURE_READ_REPLY"; - case RBUG_OP_CONTEXT_LIST: - return "RBUG_OP_CONTEXT_LIST"; - case RBUG_OP_CONTEXT_INFO: - return "RBUG_OP_CONTEXT_INFO"; - case RBUG_OP_CONTEXT_DRAW_BLOCK: - return "RBUG_OP_CONTEXT_DRAW_BLOCK"; - case RBUG_OP_CONTEXT_DRAW_STEP: - return "RBUG_OP_CONTEXT_DRAW_STEP"; - case RBUG_OP_CONTEXT_DRAW_UNBLOCK: - return "RBUG_OP_CONTEXT_DRAW_UNBLOCK"; - case RBUG_OP_CONTEXT_DRAW_RULE: - return "RBUG_OP_CONTEXT_DRAW_RULE"; - case RBUG_OP_CONTEXT_FLUSH: - return "RBUG_OP_CONTEXT_FLUSH"; - case RBUG_OP_CONTEXT_LIST_REPLY: - return "RBUG_OP_CONTEXT_LIST_REPLY"; - case RBUG_OP_CONTEXT_INFO_REPLY: - return "RBUG_OP_CONTEXT_INFO_REPLY"; - case RBUG_OP_CONTEXT_DRAW_BLOCKED: - return "RBUG_OP_CONTEXT_DRAW_BLOCKED"; - case RBUG_OP_SHADER_LIST: - return "RBUG_OP_SHADER_LIST"; - case RBUG_OP_SHADER_INFO: - return "RBUG_OP_SHADER_INFO"; - case RBUG_OP_SHADER_DISABLE: - return "RBUG_OP_SHADER_DISABLE"; - case RBUG_OP_SHADER_REPLACE: - return "RBUG_OP_SHADER_REPLACE"; - case RBUG_OP_SHADER_LIST_REPLY: - return "RBUG_OP_SHADER_LIST_REPLY"; - case RBUG_OP_SHADER_INFO_REPLY: - return "RBUG_OP_SHADER_INFO_REPLY"; - default: - return NULL; - } -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_internal.h b/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_internal.h deleted file mode 100644 index 4aba1a810f6..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_internal.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * This file is internal to the rbug protocol code, and contains asorted - * features needed by the code. - */ - -#ifndef _RBUG_INTERNAL_H_ -#define _RBUG_INTERNAL_H_ - -#include "rbug/rbug_proto.h" - -#include "util/u_memory.h" -#include "util/u_debug.h" -#include - -int rbug_connection_send_start(struct rbug_connection *con, enum rbug_opcode opcode, uint32_t length); -int rbug_connection_write(struct rbug_connection *con, void *data, uint32_t size); -int rbug_connection_send_finish(struct rbug_connection *con, uint32_t *c); - -/** - * Only works with multiples of 2 - */ -#define PAD(from, to) \ -do { \ - from = (from + to - 1) & ~(to - 1); \ -} while(0) - -#define LEN(size) \ -do { \ - PAD(__len, size); \ - __len += size; \ -} while(0) - -#define LEN_ARRAY(size, name) \ -do { \ - LEN(4); \ - PAD(__len, size); \ - __len += size * name##_len; \ -} while(0) - -#define WRITE(size, type, name) \ -do { \ - PAD(__pos, size); \ - *((type *)(&__data[__pos])) = name; \ - __pos += size; \ -} while(0) - -#define WRITE_ARRAY(size, type, name) \ -do { \ - WRITE(4, uint32_t, name##_len); \ - PAD(__pos, size); \ - memcpy(&__data[__pos], name, size * name##_len); \ - __pos += size * name##_len; \ -} while(0) - -#define READ(size, type, name) \ -do { \ - PAD(pos, size); \ - pos += size; \ - if (pos > len) \ - break; \ - ret->name = *((type *)(&data[pos - size])); \ -} while(0) - -#define READ_ARRAY(size, type, name) \ -do { \ - READ(4, uint32_t, name##_len); \ - if (pos > len) \ - break; \ - PAD(pos, size); \ - pos += size * ret->name##_len; \ - if (pos > len) \ - break; \ - ret->name = (type *)&data[pos - size * ret->name##_len]; \ -} while(0) - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_proto.h b/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_proto.h deleted file mode 100644 index 2fce725bc9e..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_proto.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * This file holds common definitions of the gallium remote debugging protocol. - */ - -#ifndef _RBUG_PROTO_H_ -#define _RBUG_PROTO_H_ - -#include "pipe/p_compiler.h" - -/** - * Uniqe indentifier for each command. - * - * Replys are designated by negative. - */ -enum rbug_opcode -{ - RBUG_OP_NOOP = 0, - RBUG_OP_PING = 1, - RBUG_OP_ERROR = 2, - RBUG_OP_PING_REPLY = -1, - RBUG_OP_ERROR_REPLY = -2, - RBUG_OP_TEXTURE_LIST = 256, - RBUG_OP_TEXTURE_INFO = 257, - RBUG_OP_TEXTURE_WRITE = 258, - RBUG_OP_TEXTURE_READ = 259, - RBUG_OP_TEXTURE_LIST_REPLY = -256, - RBUG_OP_TEXTURE_INFO_REPLY = -257, - RBUG_OP_TEXTURE_READ_REPLY = -259, - RBUG_OP_CONTEXT_LIST = 512, - RBUG_OP_CONTEXT_INFO = 513, - RBUG_OP_CONTEXT_DRAW_BLOCK = 514, - RBUG_OP_CONTEXT_DRAW_STEP = 515, - RBUG_OP_CONTEXT_DRAW_UNBLOCK = 516, - RBUG_OP_CONTEXT_DRAW_RULE = 518, - RBUG_OP_CONTEXT_FLUSH = 519, - RBUG_OP_CONTEXT_LIST_REPLY = -512, - RBUG_OP_CONTEXT_INFO_REPLY = -513, - RBUG_OP_CONTEXT_DRAW_BLOCKED = 517, - RBUG_OP_SHADER_LIST = 768, - RBUG_OP_SHADER_INFO = 769, - RBUG_OP_SHADER_DISABLE = 770, - RBUG_OP_SHADER_REPLACE = 771, - RBUG_OP_SHADER_LIST_REPLY = -768, - RBUG_OP_SHADER_INFO_REPLY = -769 -}; - -/** - * Header for demarshaled message. - */ -struct rbug_header -{ - enum rbug_opcode opcode; - void *__message; -}; - -/** - * Header for a message in wire format. - */ -struct rbug_proto_header -{ - int32_t opcode; - uint32_t length; -}; - -/** - * Forward declare connection here, as this file is included by all users. - */ -struct rbug_connection; - -/** - * Get printable string for opcode. - */ -const char* rbug_proto_get_name(enum rbug_opcode opcode); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_shader.c b/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_shader.c deleted file mode 100644 index 1742941cc17..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_shader.c +++ /dev/null @@ -1,468 +0,0 @@ -/* - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * This file holds the function implementation for one of the rbug extensions. - * Prototypes and declerations of functions and structs is in the same folder - * in the header file matching this file's name. - * - * The functions starting rbug_send_* encodes a call to the write format and - * sends that to the supplied connection, while functions starting with - * rbug_demarshal_* demarshal data in the wire protocol. - * - * Functions ending with _reply are replies to requests. - */ - -#include "rbug_internal.h" -#include "rbug/rbug_shader.h" - -int rbug_send_shader_list(struct rbug_connection *__con, - rbug_context_t context, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(8); /* context */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_SHADER_LIST)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(8, rbug_context_t, context); /* context */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_SHADER_LIST, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_shader_info(struct rbug_connection *__con, - rbug_context_t context, - rbug_shader_t shader, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(8); /* context */ - LEN(8); /* shader */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_SHADER_INFO)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(8, rbug_context_t, context); /* context */ - WRITE(8, rbug_shader_t, shader); /* shader */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_SHADER_INFO, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_shader_disable(struct rbug_connection *__con, - rbug_context_t context, - rbug_shader_t shader, - uint8_t disable, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(8); /* context */ - LEN(8); /* shader */ - LEN(1); /* disable */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_SHADER_DISABLE)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(8, rbug_context_t, context); /* context */ - WRITE(8, rbug_shader_t, shader); /* shader */ - WRITE(1, uint8_t, disable); /* disable */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_SHADER_DISABLE, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_shader_replace(struct rbug_connection *__con, - rbug_context_t context, - rbug_shader_t shader, - uint32_t *tokens, - uint32_t tokens_len, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(8); /* context */ - LEN(8); /* shader */ - LEN_ARRAY(4, tokens); /* tokens */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_SHADER_REPLACE)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(8, rbug_context_t, context); /* context */ - WRITE(8, rbug_shader_t, shader); /* shader */ - WRITE_ARRAY(4, uint32_t, tokens); /* tokens */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_SHADER_REPLACE, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_shader_list_reply(struct rbug_connection *__con, - uint32_t serial, - rbug_shader_t *shaders, - uint32_t shaders_len, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(4); /* serial */ - LEN_ARRAY(8, shaders); /* shaders */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_SHADER_LIST_REPLY)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(4, uint32_t, serial); /* serial */ - WRITE_ARRAY(8, rbug_shader_t, shaders); /* shaders */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_SHADER_LIST_REPLY, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_shader_info_reply(struct rbug_connection *__con, - uint32_t serial, - uint32_t *original, - uint32_t original_len, - uint32_t *replaced, - uint32_t replaced_len, - uint8_t disabled, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(4); /* serial */ - LEN_ARRAY(4, original); /* original */ - LEN_ARRAY(4, replaced); /* replaced */ - LEN(1); /* disabled */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_SHADER_INFO_REPLY)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(4, uint32_t, serial); /* serial */ - WRITE_ARRAY(4, uint32_t, original); /* original */ - WRITE_ARRAY(4, uint32_t, replaced); /* replaced */ - WRITE(1, uint8_t, disabled); /* disabled */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_SHADER_INFO_REPLY, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -struct rbug_proto_shader_list * rbug_demarshal_shader_list(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_shader_list *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_SHADER_LIST) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(8, rbug_context_t, context); /* context */ - - return ret; -} - -struct rbug_proto_shader_info * rbug_demarshal_shader_info(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_shader_info *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_SHADER_INFO) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(8, rbug_context_t, context); /* context */ - READ(8, rbug_shader_t, shader); /* shader */ - - return ret; -} - -struct rbug_proto_shader_disable * rbug_demarshal_shader_disable(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_shader_disable *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_SHADER_DISABLE) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(8, rbug_context_t, context); /* context */ - READ(8, rbug_shader_t, shader); /* shader */ - READ(1, uint8_t, disable); /* disable */ - - return ret; -} - -struct rbug_proto_shader_replace * rbug_demarshal_shader_replace(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_shader_replace *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_SHADER_REPLACE) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(8, rbug_context_t, context); /* context */ - READ(8, rbug_shader_t, shader); /* shader */ - READ_ARRAY(4, uint32_t, tokens); /* tokens */ - - return ret; -} - -struct rbug_proto_shader_list_reply * rbug_demarshal_shader_list_reply(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_shader_list_reply *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_SHADER_LIST_REPLY) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(4, uint32_t, serial); /* serial */ - READ_ARRAY(8, rbug_shader_t, shaders); /* shaders */ - - return ret; -} - -struct rbug_proto_shader_info_reply * rbug_demarshal_shader_info_reply(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_shader_info_reply *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_SHADER_INFO_REPLY) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(4, uint32_t, serial); /* serial */ - READ_ARRAY(4, uint32_t, original); /* original */ - READ_ARRAY(4, uint32_t, replaced); /* replaced */ - READ(1, uint8_t, disabled); /* disabled */ - - return ret; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_shader.h b/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_shader.h deleted file mode 100644 index b5d886781d8..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_shader.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * This file holds structs decelerations and function prototypes for one of - * the rbug extensions. Implementation of the functions is in the same folder - * in the c file matching this file's name. - * - * The structs what is returned from the demarshal functions. The functions - * starting rbug_send_* encodes a call to the write format and sends that to - * the supplied connection, while functions starting with rbug_demarshal_* - * demarshal data from the wire protocol. - * - * Structs and functions ending with _reply are replies to requests. - */ - -#ifndef _RBUG_PROTO_SHADER_H_ -#define _RBUG_PROTO_SHADER_H_ - -#include "rbug/rbug_proto.h" -#include "rbug/rbug_core.h" - -struct rbug_proto_shader_list -{ - struct rbug_header header; - rbug_context_t context; -}; - -struct rbug_proto_shader_info -{ - struct rbug_header header; - rbug_context_t context; - rbug_shader_t shader; -}; - -struct rbug_proto_shader_disable -{ - struct rbug_header header; - rbug_context_t context; - rbug_shader_t shader; - uint8_t disable; -}; - -struct rbug_proto_shader_replace -{ - struct rbug_header header; - rbug_context_t context; - rbug_shader_t shader; - uint32_t *tokens; - uint32_t tokens_len; -}; - -struct rbug_proto_shader_list_reply -{ - struct rbug_header header; - uint32_t serial; - rbug_shader_t *shaders; - uint32_t shaders_len; -}; - -struct rbug_proto_shader_info_reply -{ - struct rbug_header header; - uint32_t serial; - uint32_t *original; - uint32_t original_len; - uint32_t *replaced; - uint32_t replaced_len; - uint8_t disabled; -}; - -int rbug_send_shader_list(struct rbug_connection *__con, - rbug_context_t context, - uint32_t *__serial); - -int rbug_send_shader_info(struct rbug_connection *__con, - rbug_context_t context, - rbug_shader_t shader, - uint32_t *__serial); - -int rbug_send_shader_disable(struct rbug_connection *__con, - rbug_context_t context, - rbug_shader_t shader, - uint8_t disable, - uint32_t *__serial); - -int rbug_send_shader_replace(struct rbug_connection *__con, - rbug_context_t context, - rbug_shader_t shader, - uint32_t *tokens, - uint32_t tokens_len, - uint32_t *__serial); - -int rbug_send_shader_list_reply(struct rbug_connection *__con, - uint32_t serial, - rbug_shader_t *shaders, - uint32_t shaders_len, - uint32_t *__serial); - -int rbug_send_shader_info_reply(struct rbug_connection *__con, - uint32_t serial, - uint32_t *original, - uint32_t original_len, - uint32_t *replaced, - uint32_t replaced_len, - uint8_t disabled, - uint32_t *__serial); - -struct rbug_proto_shader_list * rbug_demarshal_shader_list(struct rbug_proto_header *header); - -struct rbug_proto_shader_info * rbug_demarshal_shader_info(struct rbug_proto_header *header); - -struct rbug_proto_shader_disable * rbug_demarshal_shader_disable(struct rbug_proto_header *header); - -struct rbug_proto_shader_replace * rbug_demarshal_shader_replace(struct rbug_proto_header *header); - -struct rbug_proto_shader_list_reply * rbug_demarshal_shader_list_reply(struct rbug_proto_header *header); - -struct rbug_proto_shader_info_reply * rbug_demarshal_shader_info_reply(struct rbug_proto_header *header); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_texture.c b/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_texture.c deleted file mode 100644 index 017c8d0b99b..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_texture.c +++ /dev/null @@ -1,624 +0,0 @@ -/* - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * This file holds the function implementation for one of the rbug extensions. - * Prototypes and declerations of functions and structs is in the same folder - * in the header file matching this file's name. - * - * The functions starting rbug_send_* encodes a call to the write format and - * sends that to the supplied connection, while functions starting with - * rbug_demarshal_* demarshal data in the wire protocol. - * - * Functions ending with _reply are replies to requests. - */ - -#include "rbug_internal.h" -#include "rbug/rbug_texture.h" - -int rbug_send_texture_list(struct rbug_connection *__con, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_TEXTURE_LIST)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_TEXTURE_LIST, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_texture_info(struct rbug_connection *__con, - rbug_texture_t texture, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(8); /* texture */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_TEXTURE_INFO)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(8, rbug_texture_t, texture); /* texture */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_TEXTURE_INFO, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_texture_write(struct rbug_connection *__con, - rbug_texture_t texture, - uint32_t face, - uint32_t level, - uint32_t zslice, - uint32_t x, - uint32_t y, - uint32_t w, - uint32_t h, - uint8_t *data, - uint32_t data_len, - uint32_t stride, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(8); /* texture */ - LEN(4); /* face */ - LEN(4); /* level */ - LEN(4); /* zslice */ - LEN(4); /* x */ - LEN(4); /* y */ - LEN(4); /* w */ - LEN(4); /* h */ - LEN_ARRAY(1, data); /* data */ - LEN(4); /* stride */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_TEXTURE_WRITE)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(8, rbug_texture_t, texture); /* texture */ - WRITE(4, uint32_t, face); /* face */ - WRITE(4, uint32_t, level); /* level */ - WRITE(4, uint32_t, zslice); /* zslice */ - WRITE(4, uint32_t, x); /* x */ - WRITE(4, uint32_t, y); /* y */ - WRITE(4, uint32_t, w); /* w */ - WRITE(4, uint32_t, h); /* h */ - WRITE_ARRAY(1, uint8_t, data); /* data */ - WRITE(4, uint32_t, stride); /* stride */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_TEXTURE_WRITE, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_texture_read(struct rbug_connection *__con, - rbug_texture_t texture, - uint32_t face, - uint32_t level, - uint32_t zslice, - uint32_t x, - uint32_t y, - uint32_t w, - uint32_t h, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(8); /* texture */ - LEN(4); /* face */ - LEN(4); /* level */ - LEN(4); /* zslice */ - LEN(4); /* x */ - LEN(4); /* y */ - LEN(4); /* w */ - LEN(4); /* h */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_TEXTURE_READ)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(8, rbug_texture_t, texture); /* texture */ - WRITE(4, uint32_t, face); /* face */ - WRITE(4, uint32_t, level); /* level */ - WRITE(4, uint32_t, zslice); /* zslice */ - WRITE(4, uint32_t, x); /* x */ - WRITE(4, uint32_t, y); /* y */ - WRITE(4, uint32_t, w); /* w */ - WRITE(4, uint32_t, h); /* h */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_TEXTURE_READ, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_texture_list_reply(struct rbug_connection *__con, - uint32_t serial, - rbug_texture_t *textures, - uint32_t textures_len, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(4); /* serial */ - LEN_ARRAY(8, textures); /* textures */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_TEXTURE_LIST_REPLY)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(4, uint32_t, serial); /* serial */ - WRITE_ARRAY(8, rbug_texture_t, textures); /* textures */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_TEXTURE_LIST_REPLY, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_texture_info_reply(struct rbug_connection *__con, - uint32_t serial, - uint32_t target, - uint32_t format, - uint32_t *width, - uint32_t width_len, - uint32_t *height, - uint32_t height_len, - uint32_t *depth, - uint32_t depth_len, - uint32_t blockw, - uint32_t blockh, - uint32_t blocksize, - uint32_t last_level, - uint32_t nr_samples, - uint32_t tex_usage, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(4); /* serial */ - LEN(4); /* target */ - LEN(4); /* format */ - LEN_ARRAY(4, width); /* width */ - LEN_ARRAY(4, height); /* height */ - LEN_ARRAY(4, depth); /* depth */ - LEN(4); /* blockw */ - LEN(4); /* blockh */ - LEN(4); /* blocksize */ - LEN(4); /* last_level */ - LEN(4); /* nr_samples */ - LEN(4); /* tex_usage */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_TEXTURE_INFO_REPLY)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(4, uint32_t, serial); /* serial */ - WRITE(4, uint32_t, target); /* target */ - WRITE(4, uint32_t, format); /* format */ - WRITE_ARRAY(4, uint32_t, width); /* width */ - WRITE_ARRAY(4, uint32_t, height); /* height */ - WRITE_ARRAY(4, uint32_t, depth); /* depth */ - WRITE(4, uint32_t, blockw); /* blockw */ - WRITE(4, uint32_t, blockh); /* blockh */ - WRITE(4, uint32_t, blocksize); /* blocksize */ - WRITE(4, uint32_t, last_level); /* last_level */ - WRITE(4, uint32_t, nr_samples); /* nr_samples */ - WRITE(4, uint32_t, tex_usage); /* tex_usage */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_TEXTURE_INFO_REPLY, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -int rbug_send_texture_read_reply(struct rbug_connection *__con, - uint32_t serial, - uint32_t format, - uint32_t blockw, - uint32_t blockh, - uint32_t blocksize, - uint8_t *data, - uint32_t data_len, - uint32_t stride, - uint32_t *__serial) -{ - uint32_t __len = 0; - uint32_t __pos = 0; - uint8_t *__data = NULL; - int __ret = 0; - - LEN(8); /* header */ - LEN(4); /* serial */ - LEN(4); /* format */ - LEN(4); /* blockw */ - LEN(4); /* blockh */ - LEN(4); /* blocksize */ - LEN_ARRAY(1, data); /* data */ - LEN(4); /* stride */ - - /* align */ - PAD(__len, 8); - - __data = (uint8_t*)MALLOC(__len); - if (!__data) - return -ENOMEM; - - WRITE(4, int32_t, ((int32_t)RBUG_OP_TEXTURE_READ_REPLY)); - WRITE(4, uint32_t, ((uint32_t)(__len / 4))); - WRITE(4, uint32_t, serial); /* serial */ - WRITE(4, uint32_t, format); /* format */ - WRITE(4, uint32_t, blockw); /* blockw */ - WRITE(4, uint32_t, blockh); /* blockh */ - WRITE(4, uint32_t, blocksize); /* blocksize */ - WRITE_ARRAY(1, uint8_t, data); /* data */ - WRITE(4, uint32_t, stride); /* stride */ - - /* final pad */ - PAD(__pos, 8); - - if (__pos != __len) { - __ret = -EINVAL; - } else { - rbug_connection_send_start(__con, RBUG_OP_TEXTURE_READ_REPLY, __len); - rbug_connection_write(__con, __data, __len); - __ret = rbug_connection_send_finish(__con, __serial); - } - - FREE(__data); - return __ret; -} - -struct rbug_proto_texture_list * rbug_demarshal_texture_list(struct rbug_proto_header *header) -{ - struct rbug_proto_texture_list *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_TEXTURE_LIST) - return NULL; - - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - return ret; -} - -struct rbug_proto_texture_info * rbug_demarshal_texture_info(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_texture_info *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_TEXTURE_INFO) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(8, rbug_texture_t, texture); /* texture */ - - return ret; -} - -struct rbug_proto_texture_write * rbug_demarshal_texture_write(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_texture_write *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_TEXTURE_WRITE) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(8, rbug_texture_t, texture); /* texture */ - READ(4, uint32_t, face); /* face */ - READ(4, uint32_t, level); /* level */ - READ(4, uint32_t, zslice); /* zslice */ - READ(4, uint32_t, x); /* x */ - READ(4, uint32_t, y); /* y */ - READ(4, uint32_t, w); /* w */ - READ(4, uint32_t, h); /* h */ - READ_ARRAY(1, uint8_t, data); /* data */ - READ(4, uint32_t, stride); /* stride */ - - return ret; -} - -struct rbug_proto_texture_read * rbug_demarshal_texture_read(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_texture_read *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_TEXTURE_READ) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(8, rbug_texture_t, texture); /* texture */ - READ(4, uint32_t, face); /* face */ - READ(4, uint32_t, level); /* level */ - READ(4, uint32_t, zslice); /* zslice */ - READ(4, uint32_t, x); /* x */ - READ(4, uint32_t, y); /* y */ - READ(4, uint32_t, w); /* w */ - READ(4, uint32_t, h); /* h */ - - return ret; -} - -struct rbug_proto_texture_list_reply * rbug_demarshal_texture_list_reply(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_texture_list_reply *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_TEXTURE_LIST_REPLY) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(4, uint32_t, serial); /* serial */ - READ_ARRAY(8, rbug_texture_t, textures); /* textures */ - - return ret; -} - -struct rbug_proto_texture_info_reply * rbug_demarshal_texture_info_reply(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_texture_info_reply *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_TEXTURE_INFO_REPLY) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(4, uint32_t, serial); /* serial */ - READ(4, uint32_t, target); /* target */ - READ(4, uint32_t, format); /* format */ - READ_ARRAY(4, uint32_t, width); /* width */ - READ_ARRAY(4, uint32_t, height); /* height */ - READ_ARRAY(4, uint32_t, depth); /* depth */ - READ(4, uint32_t, blockw); /* blockw */ - READ(4, uint32_t, blockh); /* blockh */ - READ(4, uint32_t, blocksize); /* blocksize */ - READ(4, uint32_t, last_level); /* last_level */ - READ(4, uint32_t, nr_samples); /* nr_samples */ - READ(4, uint32_t, tex_usage); /* tex_usage */ - - return ret; -} - -struct rbug_proto_texture_read_reply * rbug_demarshal_texture_read_reply(struct rbug_proto_header *header) -{ - uint32_t len = 0; - uint32_t pos = 0; - uint8_t *data = NULL; - struct rbug_proto_texture_read_reply *ret; - - if (!header) - return NULL; - if (header->opcode != (int32_t)RBUG_OP_TEXTURE_READ_REPLY) - return NULL; - - pos = 0; - len = header->length * 4; - data = (uint8_t*)&header[1]; - ret = MALLOC(sizeof(*ret)); - if (!ret) - return NULL; - - ret->header.__message = header; - ret->header.opcode = header->opcode; - - READ(4, uint32_t, serial); /* serial */ - READ(4, uint32_t, format); /* format */ - READ(4, uint32_t, blockw); /* blockw */ - READ(4, uint32_t, blockh); /* blockh */ - READ(4, uint32_t, blocksize); /* blocksize */ - READ_ARRAY(1, uint8_t, data); /* data */ - READ(4, uint32_t, stride); /* stride */ - - return ret; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_texture.h b/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_texture.h deleted file mode 100644 index fbb247e1d4f..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rbug/rbug_texture.h +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * VMWARE AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * This file holds structs decelerations and function prototypes for one of - * the rbug extensions. Implementation of the functions is in the same folder - * in the c file matching this file's name. - * - * The structs what is returned from the demarshal functions. The functions - * starting rbug_send_* encodes a call to the write format and sends that to - * the supplied connection, while functions starting with rbug_demarshal_* - * demarshal data from the wire protocol. - * - * Structs and functions ending with _reply are replies to requests. - */ - -#ifndef _RBUG_PROTO_TEXTURE_H_ -#define _RBUG_PROTO_TEXTURE_H_ - -#include "rbug/rbug_proto.h" -#include "rbug/rbug_core.h" - -struct rbug_proto_texture_list -{ - struct rbug_header header; -}; - -struct rbug_proto_texture_info -{ - struct rbug_header header; - rbug_texture_t texture; -}; - -struct rbug_proto_texture_write -{ - struct rbug_header header; - rbug_texture_t texture; - uint32_t face; - uint32_t level; - uint32_t zslice; - uint32_t x; - uint32_t y; - uint32_t w; - uint32_t h; - uint8_t *data; - uint32_t data_len; - uint32_t stride; -}; - -struct rbug_proto_texture_read -{ - struct rbug_header header; - rbug_texture_t texture; - uint32_t face; - uint32_t level; - uint32_t zslice; - uint32_t x; - uint32_t y; - uint32_t w; - uint32_t h; -}; - -struct rbug_proto_texture_list_reply -{ - struct rbug_header header; - uint32_t serial; - rbug_texture_t *textures; - uint32_t textures_len; -}; - -struct rbug_proto_texture_info_reply -{ - struct rbug_header header; - uint32_t serial; - uint32_t target; - uint32_t format; - uint32_t *width; - uint32_t width_len; - uint32_t *height; - uint32_t height_len; - uint32_t *depth; - uint32_t depth_len; - uint32_t blockw; - uint32_t blockh; - uint32_t blocksize; - uint32_t last_level; - uint32_t nr_samples; - uint32_t tex_usage; -}; - -struct rbug_proto_texture_read_reply -{ - struct rbug_header header; - uint32_t serial; - uint32_t format; - uint32_t blockw; - uint32_t blockh; - uint32_t blocksize; - uint8_t *data; - uint32_t data_len; - uint32_t stride; -}; - -int rbug_send_texture_list(struct rbug_connection *__con, - uint32_t *__serial); - -int rbug_send_texture_info(struct rbug_connection *__con, - rbug_texture_t texture, - uint32_t *__serial); - -int rbug_send_texture_write(struct rbug_connection *__con, - rbug_texture_t texture, - uint32_t face, - uint32_t level, - uint32_t zslice, - uint32_t x, - uint32_t y, - uint32_t w, - uint32_t h, - uint8_t *data, - uint32_t data_len, - uint32_t stride, - uint32_t *__serial); - -int rbug_send_texture_read(struct rbug_connection *__con, - rbug_texture_t texture, - uint32_t face, - uint32_t level, - uint32_t zslice, - uint32_t x, - uint32_t y, - uint32_t w, - uint32_t h, - uint32_t *__serial); - -int rbug_send_texture_list_reply(struct rbug_connection *__con, - uint32_t serial, - rbug_texture_t *textures, - uint32_t textures_len, - uint32_t *__serial); - -int rbug_send_texture_info_reply(struct rbug_connection *__con, - uint32_t serial, - uint32_t target, - uint32_t format, - uint32_t *width, - uint32_t width_len, - uint32_t *height, - uint32_t height_len, - uint32_t *depth, - uint32_t depth_len, - uint32_t blockw, - uint32_t blockh, - uint32_t blocksize, - uint32_t last_level, - uint32_t nr_samples, - uint32_t tex_usage, - uint32_t *__serial); - -int rbug_send_texture_read_reply(struct rbug_connection *__con, - uint32_t serial, - uint32_t format, - uint32_t blockw, - uint32_t blockh, - uint32_t blocksize, - uint8_t *data, - uint32_t data_len, - uint32_t stride, - uint32_t *__serial); - -struct rbug_proto_texture_list * rbug_demarshal_texture_list(struct rbug_proto_header *header); - -struct rbug_proto_texture_info * rbug_demarshal_texture_info(struct rbug_proto_header *header); - -struct rbug_proto_texture_write * rbug_demarshal_texture_write(struct rbug_proto_header *header); - -struct rbug_proto_texture_read * rbug_demarshal_texture_read(struct rbug_proto_header *header); - -struct rbug_proto_texture_list_reply * rbug_demarshal_texture_list_reply(struct rbug_proto_header *header); - -struct rbug_proto_texture_info_reply * rbug_demarshal_texture_info_reply(struct rbug_proto_header *header); - -struct rbug_proto_texture_read_reply * rbug_demarshal_texture_read_reply(struct rbug_proto_header *header); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_cpu.c b/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_cpu.c deleted file mode 100644 index 7afcf1452b1..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_cpu.c +++ /dev/null @@ -1,67 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "pipe/p_config.h" -#include "rtasm_cpu.h" - -#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) - -#include "util/u_debug.h" -#include "util/u_cpu_detect.h" - -DEBUG_GET_ONCE_BOOL_OPTION(nosse, "GALLIUM_NOSSE", FALSE); - -static struct util_cpu_caps *get_cpu_caps(void) -{ - util_cpu_detect(); - return &util_cpu_caps; -} - -int rtasm_cpu_has_sse(void) -{ - return !debug_get_option_nosse() && get_cpu_caps()->has_sse; -} - -int rtasm_cpu_has_sse2(void) -{ - return !debug_get_option_nosse() && get_cpu_caps()->has_sse2; -} - - -#else - -int rtasm_cpu_has_sse(void) -{ - return 0; -} - -int rtasm_cpu_has_sse2(void) -{ - return 0; -} - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_cpu.h b/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_cpu.h deleted file mode 100644 index ebc71634fdf..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_cpu.h +++ /dev/null @@ -1,42 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Runtime detection of CPU capabilities. - */ - -#ifndef _RTASM_CPU_H_ -#define _RTASM_CPU_H_ - - -int rtasm_cpu_has_sse(void); - -int rtasm_cpu_has_sse2(void); - - -#endif /* _RTASM_CPU_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_execmem.c b/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_execmem.c deleted file mode 100644 index 5296e9c61a2..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_execmem.c +++ /dev/null @@ -1,168 +0,0 @@ -/************************************************************************** - * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -/** - * \file exemem.c - * Functions for allocating executable memory. - * - * \author Keith Whitwell - */ - - -#include "pipe/p_compiler.h" -#include "util/u_debug.h" -#include "os/os_thread.h" -#include "util/u_memory.h" - -#include "rtasm_execmem.h" - -#if defined(PIPE_OS_BSD) -#define MAP_ANONYMOUS MAP_ANON -#endif - -#if defined(PIPE_OS_WINDOWS) -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN 1 -#endif -//#include -#endif - -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) - - -/* - * Allocate a large block of memory which can hold code then dole it out - * in pieces by means of the generic memory manager code. - */ - -#include -#include -#include "util/u_mm.h" - -#define EXEC_HEAP_SIZE (10*1024*1024) - -pipe_static_mutex(exec_mutex); - -static struct mem_block *exec_heap = NULL; -static unsigned char *exec_mem = NULL; - - -static void -init_heap(void) -{ - if (!exec_heap) - exec_heap = u_mmInit( 0, EXEC_HEAP_SIZE ); - - if (!exec_mem) - exec_mem = (unsigned char *) mmap(0, EXEC_HEAP_SIZE, - PROT_EXEC | PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); -} - - -void * -rtasm_exec_malloc(size_t size) -{ - struct mem_block *block = NULL; - void *addr = NULL; - - pipe_mutex_lock(exec_mutex); - - init_heap(); - - if (exec_heap) { - size = (size + 31) & ~31; /* next multiple of 32 bytes */ - block = u_mmAllocMem( exec_heap, size, 5, 0 ); /* 5 -> 32-byte alignment */ - } - - if (block) - addr = exec_mem + block->ofs; - else - debug_printf("rtasm_exec_malloc failed\n"); - - pipe_mutex_unlock(exec_mutex); - - return addr; -} - - -void -rtasm_exec_free(void *addr) -{ - pipe_mutex_lock(exec_mutex); - - if (exec_heap) { - struct mem_block *block = u_mmFindBlock(exec_heap, (unsigned char *)addr - exec_mem); - - if (block) - u_mmFreeMem(block); - } - - pipe_mutex_unlock(exec_mutex); -} - - -#elif defined(PIPE_OS_WINDOWS) - - -/* - * Avoid Data Execution Prevention. - */ - -void * -rtasm_exec_malloc(size_t size) -{ - return VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE); -} - - -void -rtasm_exec_free(void *addr) -{ - VirtualFree(addr, 0, MEM_RELEASE); -} - - -#else - - -/* - * Just use regular memory. - */ - -void * -rtasm_exec_malloc(size_t size) -{ - return MALLOC( size ); -} - - -void -rtasm_exec_free(void *addr) -{ - FREE(addr); -} - - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_execmem.h b/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_execmem.h deleted file mode 100644 index 155c6d34e0a..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_execmem.h +++ /dev/null @@ -1,45 +0,0 @@ -/************************************************************************** - * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \file exemem.c - * Functions for allocating executable memory. - * - * \author Keith Whitwell - */ - -#ifndef _RTASM_EXECMEM_H_ -#define _RTASM_EXECMEM_H_ - -#include "pipe/p_compiler.h" - - -extern void * -rtasm_exec_malloc( size_t size ); - - -extern void -rtasm_exec_free( void *addr ); - - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_ppc.c b/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_ppc.c deleted file mode 100644 index 330838d23cf..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_ppc.c +++ /dev/null @@ -1,1077 +0,0 @@ -/************************************************************************** - * - * Copyright (C) 2008 Tungsten Graphics, Inc. All Rights Reserved. - * Copyright (C) 2009 VMware, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * PPC code generation. - * For reference, see http://www.power.org/resources/reading/PowerISA_V2.05.pdf - * ABI info: http://www.cs.utsa.edu/~whaley/teach/cs6463FHPO/LEC/lec12_ho.pdf - * - * Other PPC refs: - * http://www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/852569B20050FF778525699600719DF2 - * http://www.ibm.com/developerworks/eserver/library/es-archguide-v2.html - * http://www.freescale.com/files/product/doc/MPCFPE32B.pdf - * - * \author Brian Paul - */ - - -#include -#include "util/u_memory.h" -#include "util/u_debug.h" -#include "rtasm_execmem.h" -#include "rtasm_ppc.h" - - -void -ppc_init_func(struct ppc_function *p) -{ - uint i; - - memset(p, 0, sizeof(*p)); - - p->num_inst = 0; - p->max_inst = 100; /* first guess at buffer size */ - p->store = rtasm_exec_malloc(p->max_inst * PPC_INST_SIZE); - p->reg_used = 0x0; - p->fp_used = 0x0; - p->vec_used = 0x0; - - p->print = FALSE; - p->indent = 0; - - /* only allow using gp registers 3..12 for now */ - for (i = 0; i < 3; i++) - ppc_reserve_register(p, i); - for (i = 12; i < PPC_NUM_REGS; i++) - ppc_reserve_register(p, i); -} - - -void -ppc_release_func(struct ppc_function *p) -{ - assert(p->num_inst <= p->max_inst); - if (p->store != NULL) { - rtasm_exec_free(p->store); - } - p->store = NULL; -} - - -uint -ppc_num_instructions(const struct ppc_function *p) -{ - return p->num_inst; -} - - -void (*ppc_get_func(struct ppc_function *p))(void) -{ -#if 0 - DUMP_END(); - if (DISASSEM && p->store) - debug_printf("disassemble %p %p\n", p->store, p->csr); - - if (p->store == p->error_overflow) - return (void (*)(void)) NULL; - else -#endif - return (void (*)(void)) pointer_to_func(p->store); -} - - -void -ppc_dump_func(const struct ppc_function *p) -{ - uint i; - for (i = 0; i < p->num_inst; i++) { - debug_printf("%3u: 0x%08x\n", i, p->store[i]); - } -} - - -void -ppc_print_code(struct ppc_function *p, boolean enable) -{ - p->print = enable; -} - - -void -ppc_indent(struct ppc_function *p, int spaces) -{ - p->indent += spaces; -} - - -static void -indent(const struct ppc_function *p) -{ - int i; - for (i = 0; i < p->indent; i++) { - putchar(' '); - } -} - - -void -ppc_comment(struct ppc_function *p, int rel_indent, const char *s) -{ - if (p->print) { - p->indent += rel_indent; - indent(p); - p->indent -= rel_indent; - printf("# %s\n", s); - } -} - - -/** - * Mark a register as being unavailable. - */ -int -ppc_reserve_register(struct ppc_function *p, int reg) -{ - assert(reg < PPC_NUM_REGS); - p->reg_used |= (1 << reg); - return reg; -} - - -/** - * Allocate a general purpose register. - * \return register index or -1 if none left. - */ -int -ppc_allocate_register(struct ppc_function *p) -{ - unsigned i; - for (i = 0; i < PPC_NUM_REGS; i++) { - const uint32_t mask = 1 << i; - if ((p->reg_used & mask) == 0) { - p->reg_used |= mask; - return i; - } - } - printf("OUT OF PPC registers!\n"); - return -1; -} - - -/** - * Mark the given general purpose register as "unallocated". - */ -void -ppc_release_register(struct ppc_function *p, int reg) -{ - assert(reg < PPC_NUM_REGS); - assert(p->reg_used & (1 << reg)); - p->reg_used &= ~(1 << reg); -} - - -/** - * Allocate a floating point register. - * \return register index or -1 if none left. - */ -int -ppc_allocate_fp_register(struct ppc_function *p) -{ - unsigned i; - for (i = 0; i < PPC_NUM_FP_REGS; i++) { - const uint32_t mask = 1 << i; - if ((p->fp_used & mask) == 0) { - p->fp_used |= mask; - return i; - } - } - printf("OUT OF PPC FP registers!\n"); - return -1; -} - - -/** - * Mark the given floating point register as "unallocated". - */ -void -ppc_release_fp_register(struct ppc_function *p, int reg) -{ - assert(reg < PPC_NUM_FP_REGS); - assert(p->fp_used & (1 << reg)); - p->fp_used &= ~(1 << reg); -} - - -/** - * Allocate a vector register. - * \return register index or -1 if none left. - */ -int -ppc_allocate_vec_register(struct ppc_function *p) -{ - unsigned i; - for (i = 0; i < PPC_NUM_VEC_REGS; i++) { - const uint32_t mask = 1 << i; - if ((p->vec_used & mask) == 0) { - p->vec_used |= mask; - return i; - } - } - printf("OUT OF PPC VEC registers!\n"); - return -1; -} - - -/** - * Mark the given vector register as "unallocated". - */ -void -ppc_release_vec_register(struct ppc_function *p, int reg) -{ - assert(reg < PPC_NUM_VEC_REGS); - assert(p->vec_used & (1 << reg)); - p->vec_used &= ~(1 << reg); -} - - -/** - * Append instruction to instruction buffer. Grow buffer if out of room. - */ -static void -emit_instruction(struct ppc_function *p, uint32_t inst_bits) -{ - if (!p->store) - return; /* out of memory, drop the instruction */ - - if (p->num_inst == p->max_inst) { - /* allocate larger buffer */ - uint32_t *newbuf; - p->max_inst *= 2; /* 2x larger */ - newbuf = rtasm_exec_malloc(p->max_inst * PPC_INST_SIZE); - if (newbuf) { - memcpy(newbuf, p->store, p->num_inst * PPC_INST_SIZE); - } - rtasm_exec_free(p->store); - p->store = newbuf; - if (!p->store) { - /* out of memory */ - p->num_inst = 0; - return; - } - } - - p->store[p->num_inst++] = inst_bits; -} - - -union vx_inst { - uint32_t bits; - struct { - unsigned op:6; - unsigned vD:5; - unsigned vA:5; - unsigned vB:5; - unsigned op2:11; - } inst; -}; - -static INLINE void -emit_vx(struct ppc_function *p, uint op2, uint vD, uint vA, uint vB, - const char *format, boolean transpose) -{ - union vx_inst inst; - inst.inst.op = 4; - inst.inst.vD = vD; - inst.inst.vA = vA; - inst.inst.vB = vB; - inst.inst.op2 = op2; - emit_instruction(p, inst.bits); - if (p->print) { - indent(p); - if (transpose) - printf(format, vD, vB, vA); - else - printf(format, vD, vA, vB); - } -} - - -union vxr_inst { - uint32_t bits; - struct { - unsigned op:6; - unsigned vD:5; - unsigned vA:5; - unsigned vB:5; - unsigned rC:1; - unsigned op2:10; - } inst; -}; - -static INLINE void -emit_vxr(struct ppc_function *p, uint op2, uint vD, uint vA, uint vB, - const char *format) -{ - union vxr_inst inst; - inst.inst.op = 4; - inst.inst.vD = vD; - inst.inst.vA = vA; - inst.inst.vB = vB; - inst.inst.rC = 0; - inst.inst.op2 = op2; - emit_instruction(p, inst.bits); - if (p->print) { - indent(p); - printf(format, vD, vA, vB); - } -} - - -union va_inst { - uint32_t bits; - struct { - unsigned op:6; - unsigned vD:5; - unsigned vA:5; - unsigned vB:5; - unsigned vC:5; - unsigned op2:6; - } inst; -}; - -static INLINE void -emit_va(struct ppc_function *p, uint op2, uint vD, uint vA, uint vB, uint vC, - const char *format) -{ - union va_inst inst; - inst.inst.op = 4; - inst.inst.vD = vD; - inst.inst.vA = vA; - inst.inst.vB = vB; - inst.inst.vC = vC; - inst.inst.op2 = op2; - emit_instruction(p, inst.bits); - if (p->print) { - indent(p); - printf(format, vD, vA, vB, vC); - } -} - - -union i_inst { - uint32_t bits; - struct { - unsigned op:6; - unsigned li:24; - unsigned aa:1; - unsigned lk:1; - } inst; -}; - -static INLINE void -emit_i(struct ppc_function *p, uint op, uint li, uint aa, uint lk) -{ - union i_inst inst; - inst.inst.op = op; - inst.inst.li = li; - inst.inst.aa = aa; - inst.inst.lk = lk; - emit_instruction(p, inst.bits); -} - - -union xl_inst { - uint32_t bits; - struct { - unsigned op:6; - unsigned bo:5; - unsigned bi:5; - unsigned unused:3; - unsigned bh:2; - unsigned op2:10; - unsigned lk:1; - } inst; -}; - -static INLINE void -emit_xl(struct ppc_function *p, uint op, uint bo, uint bi, uint bh, - uint op2, uint lk) -{ - union xl_inst inst; - inst.inst.op = op; - inst.inst.bo = bo; - inst.inst.bi = bi; - inst.inst.unused = 0x0; - inst.inst.bh = bh; - inst.inst.op2 = op2; - inst.inst.lk = lk; - emit_instruction(p, inst.bits); -} - -static INLINE void -dump_xl(const char *name, uint inst) -{ - union xl_inst i; - - i.bits = inst; - debug_printf("%s = 0x%08x\n", name, inst); - debug_printf(" op: %d 0x%x\n", i.inst.op, i.inst.op); - debug_printf(" bo: %d 0x%x\n", i.inst.bo, i.inst.bo); - debug_printf(" bi: %d 0x%x\n", i.inst.bi, i.inst.bi); - debug_printf(" unused: %d 0x%x\n", i.inst.unused, i.inst.unused); - debug_printf(" bh: %d 0x%x\n", i.inst.bh, i.inst.bh); - debug_printf(" op2: %d 0x%x\n", i.inst.op2, i.inst.op2); - debug_printf(" lk: %d 0x%x\n", i.inst.lk, i.inst.lk); -} - - -union x_inst { - uint32_t bits; - struct { - unsigned op:6; - unsigned vrs:5; - unsigned ra:5; - unsigned rb:5; - unsigned op2:10; - unsigned unused:1; - } inst; -}; - -static INLINE void -emit_x(struct ppc_function *p, uint op, uint vrs, uint ra, uint rb, uint op2, - const char *format) -{ - union x_inst inst; - inst.inst.op = op; - inst.inst.vrs = vrs; - inst.inst.ra = ra; - inst.inst.rb = rb; - inst.inst.op2 = op2; - inst.inst.unused = 0x0; - emit_instruction(p, inst.bits); - if (p->print) { - indent(p); - printf(format, vrs, ra, rb); - } -} - - -union d_inst { - uint32_t bits; - struct { - unsigned op:6; - unsigned rt:5; - unsigned ra:5; - unsigned si:16; - } inst; -}; - -static INLINE void -emit_d(struct ppc_function *p, uint op, uint rt, uint ra, int si, - const char *format, boolean transpose) -{ - union d_inst inst; - assert(si >= -32768); - assert(si <= 32767); - inst.inst.op = op; - inst.inst.rt = rt; - inst.inst.ra = ra; - inst.inst.si = (unsigned) (si & 0xffff); - emit_instruction(p, inst.bits); - if (p->print) { - indent(p); - if (transpose) - printf(format, rt, si, ra); - else - printf(format, rt, ra, si); - } -} - - -union a_inst { - uint32_t bits; - struct { - unsigned op:6; - unsigned frt:5; - unsigned fra:5; - unsigned frb:5; - unsigned unused:5; - unsigned op2:5; - unsigned rc:1; - } inst; -}; - -static INLINE void -emit_a(struct ppc_function *p, uint op, uint frt, uint fra, uint frb, uint op2, - uint rc, const char *format) -{ - union a_inst inst; - inst.inst.op = op; - inst.inst.frt = frt; - inst.inst.fra = fra; - inst.inst.frb = frb; - inst.inst.unused = 0x0; - inst.inst.op2 = op2; - inst.inst.rc = rc; - emit_instruction(p, inst.bits); - if (p->print) { - indent(p); - printf(format, frt, fra, frb); - } -} - - -union xo_inst { - uint32_t bits; - struct { - unsigned op:6; - unsigned rt:5; - unsigned ra:5; - unsigned rb:5; - unsigned oe:1; - unsigned op2:9; - unsigned rc:1; - } inst; -}; - -static INLINE void -emit_xo(struct ppc_function *p, uint op, uint rt, uint ra, uint rb, uint oe, - uint op2, uint rc, const char *format) -{ - union xo_inst inst; - inst.inst.op = op; - inst.inst.rt = rt; - inst.inst.ra = ra; - inst.inst.rb = rb; - inst.inst.oe = oe; - inst.inst.op2 = op2; - inst.inst.rc = rc; - emit_instruction(p, inst.bits); - if (p->print) { - indent(p); - printf(format, rt, ra, rb); - } -} - - - - - -/** - ** float vector arithmetic - **/ - -/** vector float add */ -void -ppc_vaddfp(struct ppc_function *p, uint vD, uint vA, uint vB) -{ - emit_vx(p, 10, vD, vA, vB, "vaddfp\t%u, v%u, v%u\n", FALSE); -} - -/** vector float substract */ -void -ppc_vsubfp(struct ppc_function *p, uint vD, uint vA, uint vB) -{ - emit_vx(p, 74, vD, vA, vB, "vsubfp\tv%u, v%u, v%u\n", FALSE); -} - -/** vector float min */ -void -ppc_vminfp(struct ppc_function *p, uint vD, uint vA, uint vB) -{ - emit_vx(p, 1098, vD, vA, vB, "vminfp\tv%u, v%u, v%u\n", FALSE); -} - -/** vector float max */ -void -ppc_vmaxfp(struct ppc_function *p, uint vD, uint vA, uint vB) -{ - emit_vx(p, 1034, vD, vA, vB, "vmaxfp\tv%u, v%u, v%u\n", FALSE); -} - -/** vector float mult add: vD = vA * vB + vC */ -void -ppc_vmaddfp(struct ppc_function *p, uint vD, uint vA, uint vB, uint vC) -{ - /* note arg order */ - emit_va(p, 46, vD, vA, vC, vB, "vmaddfp\tv%u, v%u, v%u, v%u\n"); -} - -/** vector float negative mult subtract: vD = vA - vB * vC */ -void -ppc_vnmsubfp(struct ppc_function *p, uint vD, uint vA, uint vB, uint vC) -{ - /* note arg order */ - emit_va(p, 47, vD, vB, vA, vC, "vnmsubfp\tv%u, v%u, v%u, v%u\n"); -} - -/** vector float compare greater than */ -void -ppc_vcmpgtfpx(struct ppc_function *p, uint vD, uint vA, uint vB) -{ - emit_vxr(p, 710, vD, vA, vB, "vcmpgtfpx\tv%u, v%u, v%u"); -} - -/** vector float compare greater than or equal to */ -void -ppc_vcmpgefpx(struct ppc_function *p, uint vD, uint vA, uint vB) -{ - emit_vxr(p, 454, vD, vA, vB, "vcmpgefpx\tv%u, v%u, v%u"); -} - -/** vector float compare equal */ -void -ppc_vcmpeqfpx(struct ppc_function *p, uint vD, uint vA, uint vB) -{ - emit_vxr(p, 198, vD, vA, vB, "vcmpeqfpx\tv%u, v%u, v%u"); -} - -/** vector float 2^x */ -void -ppc_vexptefp(struct ppc_function *p, uint vD, uint vB) -{ - emit_vx(p, 394, vD, 0, vB, "vexptefp\tv%u, 0%u, v%u\n", FALSE); -} - -/** vector float log2(x) */ -void -ppc_vlogefp(struct ppc_function *p, uint vD, uint vB) -{ - emit_vx(p, 458, vD, 0, vB, "vlogefp\tv%u, 0%u, v%u\n", FALSE); -} - -/** vector float reciprocol */ -void -ppc_vrefp(struct ppc_function *p, uint vD, uint vB) -{ - emit_vx(p, 266, vD, 0, vB, "vrefp\tv%u, 0%u, v%u\n", FALSE); -} - -/** vector float reciprocol sqrt estimate */ -void -ppc_vrsqrtefp(struct ppc_function *p, uint vD, uint vB) -{ - emit_vx(p, 330, vD, 0, vB, "vrsqrtefp\tv%u, 0%u, v%u\n", FALSE); -} - -/** vector float round to negative infinity */ -void -ppc_vrfim(struct ppc_function *p, uint vD, uint vB) -{ - emit_vx(p, 714, vD, 0, vB, "vrfim\tv%u, 0%u, v%u\n", FALSE); -} - -/** vector float round to positive infinity */ -void -ppc_vrfip(struct ppc_function *p, uint vD, uint vB) -{ - emit_vx(p, 650, vD, 0, vB, "vrfip\tv%u, 0%u, v%u\n", FALSE); -} - -/** vector float round to nearest int */ -void -ppc_vrfin(struct ppc_function *p, uint vD, uint vB) -{ - emit_vx(p, 522, vD, 0, vB, "vrfin\tv%u, 0%u, v%u\n", FALSE); -} - -/** vector float round to int toward zero */ -void -ppc_vrfiz(struct ppc_function *p, uint vD, uint vB) -{ - emit_vx(p, 586, vD, 0, vB, "vrfiz\tv%u, 0%u, v%u\n", FALSE); -} - -/** vector store: store vR at mem[rA+rB] */ -void -ppc_stvx(struct ppc_function *p, uint vR, uint rA, uint rB) -{ - emit_x(p, 31, vR, rA, rB, 231, "stvx\tv%u, r%u, r%u\n"); -} - -/** vector load: vR = mem[rA+rB] */ -void -ppc_lvx(struct ppc_function *p, uint vR, uint rA, uint rB) -{ - emit_x(p, 31, vR, rA, rB, 103, "lvx\tv%u, r%u, r%u\n"); -} - -/** load vector element word: vR = mem_word[ra+rb] */ -void -ppc_lvewx(struct ppc_function *p, uint vR, uint rA, uint rB) -{ - emit_x(p, 31, vR, rA, rB, 71, "lvewx\tv%u, r%u, r%u\n"); -} - - - - -/** - ** vector bitwise operations - **/ - -/** vector and */ -void -ppc_vand(struct ppc_function *p, uint vD, uint vA, uint vB) -{ - emit_vx(p, 1028, vD, vA, vB, "vand\tv%u, v%u, v%u\n", FALSE); -} - -/** vector and complement */ -void -ppc_vandc(struct ppc_function *p, uint vD, uint vA, uint vB) -{ - emit_vx(p, 1092, vD, vA, vB, "vandc\tv%u, v%u, v%u\n", FALSE); -} - -/** vector or */ -void -ppc_vor(struct ppc_function *p, uint vD, uint vA, uint vB) -{ - emit_vx(p, 1156, vD, vA, vB, "vor\tv%u, v%u, v%u\n", FALSE); -} - -/** vector nor */ -void -ppc_vnor(struct ppc_function *p, uint vD, uint vA, uint vB) -{ - emit_vx(p, 1284, vD, vA, vB, "vnor\tv%u, v%u, v%u\n", FALSE); -} - -/** vector xor */ -void -ppc_vxor(struct ppc_function *p, uint vD, uint vA, uint vB) -{ - emit_vx(p, 1220, vD, vA, vB, "vxor\tv%u, v%u, v%u\n", FALSE); -} - -/** Pseudo-instruction: vector move */ -void -ppc_vmove(struct ppc_function *p, uint vD, uint vA) -{ - boolean print = p->print; - p->print = FALSE; - ppc_vor(p, vD, vA, vA); - if (print) { - indent(p); - printf("vor\tv%u, v%u, v%u \t# v%u = v%u\n", vD, vA, vA, vD, vA); - } - p->print = print; -} - -/** Set vector register to {0,0,0,0} */ -void -ppc_vzero(struct ppc_function *p, uint vr) -{ - boolean print = p->print; - p->print = FALSE; - ppc_vxor(p, vr, vr, vr); - if (print) { - indent(p); - printf("vxor\tv%u, v%u, v%u \t# v%u = {0,0,0,0}\n", vr, vr, vr, vr); - } - p->print = print; -} - - - - -/** - ** Vector shuffle / select / splat / etc - **/ - -/** vector permute */ -void -ppc_vperm(struct ppc_function *p, uint vD, uint vA, uint vB, uint vC) -{ - emit_va(p, 43, vD, vA, vB, vC, "vperm\tr%u, r%u, r%u, r%u"); -} - -/** vector select */ -void -ppc_vsel(struct ppc_function *p, uint vD, uint vA, uint vB, uint vC) -{ - emit_va(p, 42, vD, vA, vB, vC, "vsel\tr%u, r%u, r%u, r%u"); -} - -/** vector splat byte */ -void -ppc_vspltb(struct ppc_function *p, uint vD, uint vB, uint imm) -{ - emit_vx(p, 42, vD, imm, vB, "vspltb\tv%u, v%u, %u\n", TRUE); -} - -/** vector splat half word */ -void -ppc_vsplthw(struct ppc_function *p, uint vD, uint vB, uint imm) -{ - emit_vx(p, 588, vD, imm, vB, "vsplthw\tv%u, v%u, %u\n", TRUE); -} - -/** vector splat word */ -void -ppc_vspltw(struct ppc_function *p, uint vD, uint vB, uint imm) -{ - emit_vx(p, 652, vD, imm, vB, "vspltw\tv%u, v%u, %u\n", TRUE); -} - -/** vector splat signed immediate word */ -void -ppc_vspltisw(struct ppc_function *p, uint vD, int imm) -{ - assert(imm >= -16); - assert(imm < 15); - emit_vx(p, 908, vD, imm, 0, "vspltisw\tv%u, %d, %u\n", FALSE); -} - -/** vector shift left word: vD[word] = vA[word] << (vB[word] & 0x1f) */ -void -ppc_vslw(struct ppc_function *p, uint vD, uint vA, uint vB) -{ - emit_vx(p, 388, vD, vA, vB, "vslw\tv%u, v%u, v%u\n", FALSE); -} - - - - -/** - ** integer arithmetic - **/ - -/** rt = ra + imm */ -void -ppc_addi(struct ppc_function *p, uint rt, uint ra, int imm) -{ - emit_d(p, 14, rt, ra, imm, "addi\tr%u, r%u, %d\n", FALSE); -} - -/** rt = ra + (imm << 16) */ -void -ppc_addis(struct ppc_function *p, uint rt, uint ra, int imm) -{ - emit_d(p, 15, rt, ra, imm, "addis\tr%u, r%u, %d\n", FALSE); -} - -/** rt = ra + rb */ -void -ppc_add(struct ppc_function *p, uint rt, uint ra, uint rb) -{ - emit_xo(p, 31, rt, ra, rb, 0, 266, 0, "add\tr%u, r%u, r%u\n"); -} - -/** rt = ra AND ra */ -void -ppc_and(struct ppc_function *p, uint rt, uint ra, uint rb) -{ - emit_x(p, 31, ra, rt, rb, 28, "and\tr%u, r%u, r%u\n"); /* note argument order */ -} - -/** rt = ra AND imm */ -void -ppc_andi(struct ppc_function *p, uint rt, uint ra, int imm) -{ - /* note argument order */ - emit_d(p, 28, ra, rt, imm, "andi\tr%u, r%u, %d\n", FALSE); -} - -/** rt = ra OR ra */ -void -ppc_or(struct ppc_function *p, uint rt, uint ra, uint rb) -{ - emit_x(p, 31, ra, rt, rb, 444, "or\tr%u, r%u, r%u\n"); /* note argument order */ -} - -/** rt = ra OR imm */ -void -ppc_ori(struct ppc_function *p, uint rt, uint ra, int imm) -{ - /* note argument order */ - emit_d(p, 24, ra, rt, imm, "ori\tr%u, r%u, %d\n", FALSE); -} - -/** rt = ra XOR ra */ -void -ppc_xor(struct ppc_function *p, uint rt, uint ra, uint rb) -{ - emit_x(p, 31, ra, rt, rb, 316, "xor\tr%u, r%u, r%u\n"); /* note argument order */ -} - -/** rt = ra XOR imm */ -void -ppc_xori(struct ppc_function *p, uint rt, uint ra, int imm) -{ - /* note argument order */ - emit_d(p, 26, ra, rt, imm, "xori\tr%u, r%u, %d\n", FALSE); -} - -/** pseudo instruction: move: rt = ra */ -void -ppc_mr(struct ppc_function *p, uint rt, uint ra) -{ - ppc_or(p, rt, ra, ra); -} - -/** pseudo instruction: load immediate: rt = imm */ -void -ppc_li(struct ppc_function *p, uint rt, int imm) -{ - boolean print = p->print; - p->print = FALSE; - ppc_addi(p, rt, 0, imm); - if (print) { - indent(p); - printf("addi\tr%u, r0, %d \t# r%u = %d\n", rt, imm, rt, imm); - } - p->print = print; -} - -/** rt = imm << 16 */ -void -ppc_lis(struct ppc_function *p, uint rt, int imm) -{ - ppc_addis(p, rt, 0, imm); -} - -/** rt = imm */ -void -ppc_load_int(struct ppc_function *p, uint rt, int imm) -{ - ppc_lis(p, rt, (imm >> 16)); /* rt = imm >> 16 */ - ppc_ori(p, rt, rt, (imm & 0xffff)); /* rt = rt | (imm & 0xffff) */ -} - - - - -/** - ** integer load/store - **/ - -/** store rs at memory[(ra)+d], - * then update ra = (ra)+d - */ -void -ppc_stwu(struct ppc_function *p, uint rs, uint ra, int d) -{ - emit_d(p, 37, rs, ra, d, "stwu\tr%u, %d(r%u)\n", TRUE); -} - -/** store rs at memory[(ra)+d] */ -void -ppc_stw(struct ppc_function *p, uint rs, uint ra, int d) -{ - emit_d(p, 36, rs, ra, d, "stw\tr%u, %d(r%u)\n", TRUE); -} - -/** Load rt = mem[(ra)+d]; then zero set high 32 bits to zero. */ -void -ppc_lwz(struct ppc_function *p, uint rt, uint ra, int d) -{ - emit_d(p, 32, rt, ra, d, "lwz\tr%u, %d(r%u)\n", TRUE); -} - - - -/** - ** Float (non-vector) arithmetic - **/ - -/** add: frt = fra + frb */ -void -ppc_fadd(struct ppc_function *p, uint frt, uint fra, uint frb) -{ - emit_a(p, 63, frt, fra, frb, 21, 0, "fadd\tf%u, f%u, f%u\n"); -} - -/** sub: frt = fra - frb */ -void -ppc_fsub(struct ppc_function *p, uint frt, uint fra, uint frb) -{ - emit_a(p, 63, frt, fra, frb, 20, 0, "fsub\tf%u, f%u, f%u\n"); -} - -/** convert to int: rt = (int) ra */ -void -ppc_fctiwz(struct ppc_function *p, uint rt, uint fra) -{ - emit_x(p, 63, rt, 0, fra, 15, "fctiwz\tr%u, r%u, r%u\n"); -} - -/** store frs at mem[(ra)+offset] */ -void -ppc_stfs(struct ppc_function *p, uint frs, uint ra, int offset) -{ - emit_d(p, 52, frs, ra, offset, "stfs\tr%u, %d(r%u)\n", TRUE); -} - -/** store frs at mem[(ra)+(rb)] */ -void -ppc_stfiwx(struct ppc_function *p, uint frs, uint ra, uint rb) -{ - emit_x(p, 31, frs, ra, rb, 983, "stfiwx\tr%u, r%u, r%u\n"); -} - -/** load frt = mem[(ra)+offset] */ -void -ppc_lfs(struct ppc_function *p, uint frt, uint ra, int offset) -{ - emit_d(p, 48, frt, ra, offset, "stfs\tr%u, %d(r%u)\n", TRUE); -} - - - - - -/** - ** branch instructions - **/ - -/** BLR: Branch to link register (p. 35) */ -void -ppc_blr(struct ppc_function *p) -{ - emit_i(p, 18, 0, 0, 1); - if (p->print) { - indent(p); - printf("blr\n"); - } -} - -/** Branch Conditional to Link Register (p. 36) */ -void -ppc_bclr(struct ppc_function *p, uint condOp, uint branchHint, uint condReg) -{ - emit_xl(p, 19, condOp, condReg, branchHint, 16, 0); - if (p->print) { - indent(p); - printf("bclr\t%u %u %u\n", condOp, branchHint, condReg); - } -} - -/** Pseudo instruction: return from subroutine */ -void -ppc_return(struct ppc_function *p) -{ - ppc_bclr(p, BRANCH_COND_ALWAYS, BRANCH_HINT_SUB_RETURN, 0); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_ppc.h b/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_ppc.h deleted file mode 100644 index 93e5f5187de..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_ppc.h +++ /dev/null @@ -1,342 +0,0 @@ -/************************************************************************** - * - * Copyright (C) 2008 Tungsten Graphics, Inc. All Rights Reserved. - * Copyright (C) 2009 VMware, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * PPC code generation. - * \author Brian Paul - */ - - -#ifndef RTASM_PPC_H -#define RTASM_PPC_H - - -#include "pipe/p_compiler.h" - - -#define PPC_INST_SIZE 4 /**< 4 bytes / instruction */ - -#define PPC_NUM_REGS 32 -#define PPC_NUM_FP_REGS 32 -#define PPC_NUM_VEC_REGS 32 - -/** Stack pointer register */ -#define PPC_REG_SP 1 - -/** Branch conditions */ -#define BRANCH_COND_ALWAYS 0x14 /* binary 1z1zz (z=ignored) */ - -/** Branch hints */ -#define BRANCH_HINT_SUB_RETURN 0x0 /* binary 00 */ - - -struct ppc_function -{ - uint32_t *store; /**< instruction buffer */ - uint num_inst; - uint max_inst; - uint32_t reg_used; /** used/free general-purpose registers bitmask */ - uint32_t fp_used; /** used/free floating point registers bitmask */ - uint32_t vec_used; /** used/free vector registers bitmask */ - int indent; - boolean print; -}; - - - -extern void ppc_init_func(struct ppc_function *p); -extern void ppc_release_func(struct ppc_function *p); -extern uint ppc_num_instructions(const struct ppc_function *p); -extern void (*ppc_get_func( struct ppc_function *p ))( void ); -extern void ppc_dump_func(const struct ppc_function *p); - -extern void ppc_print_code(struct ppc_function *p, boolean enable); -extern void ppc_indent(struct ppc_function *p, int spaces); -extern void ppc_comment(struct ppc_function *p, int rel_indent, const char *s); - -extern int ppc_reserve_register(struct ppc_function *p, int reg); -extern int ppc_allocate_register(struct ppc_function *p); -extern void ppc_release_register(struct ppc_function *p, int reg); -extern int ppc_allocate_fp_register(struct ppc_function *p); -extern void ppc_release_fp_register(struct ppc_function *p, int reg); -extern int ppc_allocate_vec_register(struct ppc_function *p); -extern void ppc_release_vec_register(struct ppc_function *p, int reg); - - - -/** - ** float vector arithmetic - **/ - -/** vector float add */ -extern void -ppc_vaddfp(struct ppc_function *p,uint vD, uint vA, uint vB); - -/** vector float substract */ -extern void -ppc_vsubfp(struct ppc_function *p, uint vD, uint vA, uint vB); - -/** vector float min */ -extern void -ppc_vminfp(struct ppc_function *p, uint vD, uint vA, uint vB); - -/** vector float max */ -extern void -ppc_vmaxfp(struct ppc_function *p, uint vD, uint vA, uint vB); - -/** vector float mult add: vD = vA * vB + vC */ -extern void -ppc_vmaddfp(struct ppc_function *p, uint vD, uint vA, uint vB, uint vC); - -/** vector float negative mult subtract: vD = vA - vB * vC */ -extern void -ppc_vnmsubfp(struct ppc_function *p, uint vD, uint vA, uint vB, uint vC); - -/** vector float compare greater than */ -extern void -ppc_vcmpgtfpx(struct ppc_function *p, uint vD, uint vA, uint vB); - -/** vector float compare greater than or equal to */ -extern void -ppc_vcmpgefpx(struct ppc_function *p, uint vD, uint vA, uint vB); - -/** vector float compare equal */ -extern void -ppc_vcmpeqfpx(struct ppc_function *p, uint vD, uint vA, uint vB); - -/** vector float 2^x */ -extern void -ppc_vexptefp(struct ppc_function *p, uint vD, uint vB); - -/** vector float log2(x) */ -extern void -ppc_vlogefp(struct ppc_function *p, uint vD, uint vB); - -/** vector float reciprocol */ -extern void -ppc_vrefp(struct ppc_function *p, uint vD, uint vB); - -/** vector float reciprocol sqrt estimate */ -extern void -ppc_vrsqrtefp(struct ppc_function *p, uint vD, uint vB); - -/** vector float round to negative infinity */ -extern void -ppc_vrfim(struct ppc_function *p, uint vD, uint vB); - -/** vector float round to positive infinity */ -extern void -ppc_vrfip(struct ppc_function *p, uint vD, uint vB); - -/** vector float round to nearest int */ -extern void -ppc_vrfin(struct ppc_function *p, uint vD, uint vB); - -/** vector float round to int toward zero */ -extern void -ppc_vrfiz(struct ppc_function *p, uint vD, uint vB); - - -/** vector store: store vR at mem[vA+vB] */ -extern void -ppc_stvx(struct ppc_function *p, uint vR, uint vA, uint vB); - -/** vector load: vR = mem[vA+vB] */ -extern void -ppc_lvx(struct ppc_function *p, uint vR, uint vA, uint vB); - -/** load vector element word: vR = mem_word[vA+vB] */ -extern void -ppc_lvewx(struct ppc_function *p, uint vR, uint vA, uint vB); - - - -/** - ** vector bitwise operations - **/ - - -/** vector and */ -extern void -ppc_vand(struct ppc_function *p, uint vD, uint vA, uint vB); - -/** vector and complement */ -extern void -ppc_vandc(struct ppc_function *p, uint vD, uint vA, uint vB); - -/** vector or */ -extern void -ppc_vor(struct ppc_function *p, uint vD, uint vA, uint vB); - -/** vector nor */ -extern void -ppc_vnor(struct ppc_function *p, uint vD, uint vA, uint vB); - -/** vector xor */ -extern void -ppc_vxor(struct ppc_function *p, uint vD, uint vA, uint vB); - -/** Pseudo-instruction: vector move */ -extern void -ppc_vmove(struct ppc_function *p, uint vD, uint vA); - -/** Set vector register to {0,0,0,0} */ -extern void -ppc_vzero(struct ppc_function *p, uint vr); - - - -/** - ** Vector shuffle / select / splat / etc - **/ - -/** vector permute */ -extern void -ppc_vperm(struct ppc_function *p, uint vD, uint vA, uint vB, uint vC); - -/** vector select */ -extern void -ppc_vsel(struct ppc_function *p, uint vD, uint vA, uint vB, uint vC); - -/** vector splat byte */ -extern void -ppc_vspltb(struct ppc_function *p, uint vD, uint vB, uint imm); - -/** vector splat half word */ -extern void -ppc_vsplthw(struct ppc_function *p, uint vD, uint vB, uint imm); - -/** vector splat word */ -extern void -ppc_vspltw(struct ppc_function *p, uint vD, uint vB, uint imm); - -/** vector splat signed immediate word */ -extern void -ppc_vspltisw(struct ppc_function *p, uint vD, int imm); - -/** vector shift left word: vD[word] = vA[word] << (vB[word] & 0x1f) */ -extern void -ppc_vslw(struct ppc_function *p, uint vD, uint vA, uint vB); - - - -/** - ** scalar arithmetic - **/ - -extern void -ppc_add(struct ppc_function *p, uint rt, uint ra, uint rb); - -extern void -ppc_addi(struct ppc_function *p, uint rt, uint ra, int imm); - -extern void -ppc_addis(struct ppc_function *p, uint rt, uint ra, int imm); - -extern void -ppc_and(struct ppc_function *p, uint rt, uint ra, uint rb); - -extern void -ppc_andi(struct ppc_function *p, uint rt, uint ra, int imm); - -extern void -ppc_or(struct ppc_function *p, uint rt, uint ra, uint rb); - -extern void -ppc_ori(struct ppc_function *p, uint rt, uint ra, int imm); - -extern void -ppc_xor(struct ppc_function *p, uint rt, uint ra, uint rb); - -extern void -ppc_xori(struct ppc_function *p, uint rt, uint ra, int imm); - -extern void -ppc_mr(struct ppc_function *p, uint rt, uint ra); - -extern void -ppc_li(struct ppc_function *p, uint rt, int imm); - -extern void -ppc_lis(struct ppc_function *p, uint rt, int imm); - -extern void -ppc_load_int(struct ppc_function *p, uint rt, int imm); - - - -/** - ** scalar load/store - **/ - -extern void -ppc_stwu(struct ppc_function *p, uint rs, uint ra, int d); - -extern void -ppc_stw(struct ppc_function *p, uint rs, uint ra, int d); - -extern void -ppc_lwz(struct ppc_function *p, uint rs, uint ra, int d); - - - -/** - ** Float (non-vector) arithmetic - **/ - -extern void -ppc_fadd(struct ppc_function *p, uint frt, uint fra, uint frb); - -extern void -ppc_fsub(struct ppc_function *p, uint frt, uint fra, uint frb); - -extern void -ppc_fctiwz(struct ppc_function *p, uint rt, uint ra); - -extern void -ppc_stfs(struct ppc_function *p, uint frs, uint ra, int offset); - -extern void -ppc_stfiwx(struct ppc_function *p, uint frs, uint ra, uint rb); - -extern void -ppc_lfs(struct ppc_function *p, uint frt, uint ra, int offset); - - - -/** - ** branch instructions - **/ - -extern void -ppc_blr(struct ppc_function *p); - -void -ppc_bclr(struct ppc_function *p, uint condOp, uint branchHint, uint condReg); - -extern void -ppc_return(struct ppc_function *p); - - -#endif /* RTASM_PPC_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_x86sse.c b/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_x86sse.c deleted file mode 100644 index cb880825d79..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_x86sse.c +++ /dev/null @@ -1,2231 +0,0 @@ -/************************************************************************** - * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "pipe/p_config.h" -#include "util/u_cpu_detect.h" - -#if defined(PIPE_ARCH_X86) || (defined(PIPE_ARCH_X86_64) && !defined(__MINGW32__)) - -#include "pipe/p_compiler.h" -#include "util/u_debug.h" -#include "util/u_pointer.h" - -#include "rtasm_execmem.h" -#include "rtasm_x86sse.h" - -#define DISASSEM 0 -#define X86_TWOB 0x0f - - -#define DUMP_SSE 0 - - -void x86_print_reg( struct x86_reg reg ) -{ - if (reg.mod != mod_REG) - debug_printf( "[" ); - - switch( reg.file ) { - case file_REG32: - switch( reg.idx ) { - case reg_AX: debug_printf( "EAX" ); break; - case reg_CX: debug_printf( "ECX" ); break; - case reg_DX: debug_printf( "EDX" ); break; - case reg_BX: debug_printf( "EBX" ); break; - case reg_SP: debug_printf( "ESP" ); break; - case reg_BP: debug_printf( "EBP" ); break; - case reg_SI: debug_printf( "ESI" ); break; - case reg_DI: debug_printf( "EDI" ); break; - } - break; - case file_MMX: - debug_printf( "MMX%u", reg.idx ); - break; - case file_XMM: - debug_printf( "XMM%u", reg.idx ); - break; - case file_x87: - debug_printf( "fp%u", reg.idx ); - break; - } - - if (reg.mod == mod_DISP8 || - reg.mod == mod_DISP32) - debug_printf("+%d", reg.disp); - - if (reg.mod != mod_REG) - debug_printf( "]" ); -} - -#if DUMP_SSE - -#define DUMP_START() debug_printf( "\n" ) -#define DUMP_END() debug_printf( "\n" ) - -#define DUMP() do { \ - const char *foo = __FUNCTION__; \ - while (*foo && *foo != '_') \ - foo++; \ - if (*foo) \ - foo++; \ - debug_printf( "\n%4x %14s ", p->csr - p->store, foo ); \ -} while (0) - -#define DUMP_I( I ) do { \ - DUMP(); \ - debug_printf( "%u", I ); \ -} while( 0 ) - -#define DUMP_R( R0 ) do { \ - DUMP(); \ - x86_print_reg( R0 ); \ -} while( 0 ) - -#define DUMP_RR( R0, R1 ) do { \ - DUMP(); \ - x86_print_reg( R0 ); \ - debug_printf( ", " ); \ - x86_print_reg( R1 ); \ -} while( 0 ) - -#define DUMP_RI( R0, I ) do { \ - DUMP(); \ - x86_print_reg( R0 ); \ - debug_printf( ", %u", I ); \ -} while( 0 ) - -#define DUMP_RRI( R0, R1, I ) do { \ - DUMP(); \ - x86_print_reg( R0 ); \ - debug_printf( ", " ); \ - x86_print_reg( R1 ); \ - debug_printf( ", %u", I ); \ -} while( 0 ) - -#else - -#define DUMP_START() -#define DUMP_END() -#define DUMP( ) -#define DUMP_I( I ) -#define DUMP_R( R0 ) -#define DUMP_RR( R0, R1 ) -#define DUMP_RI( R0, I ) -#define DUMP_RRI( R0, R1, I ) - -#endif - - -static void do_realloc( struct x86_function *p ) -{ - if (p->store == p->error_overflow) { - p->csr = p->store; - } - else if (p->size == 0) { - p->size = 1024; - p->store = rtasm_exec_malloc(p->size); - p->csr = p->store; - } - else { - uintptr_t used = pointer_to_uintptr( p->csr ) - pointer_to_uintptr( p->store ); - unsigned char *tmp = p->store; - p->size *= 2; - p->store = rtasm_exec_malloc(p->size); - - if (p->store) { - memcpy(p->store, tmp, used); - p->csr = p->store + used; - } - else { - p->csr = p->store; - } - - rtasm_exec_free(tmp); - } - - if (p->store == NULL) { - p->store = p->csr = p->error_overflow; - p->size = sizeof(p->error_overflow); - } -} - -/* Emit bytes to the instruction stream: - */ -static unsigned char *reserve( struct x86_function *p, int bytes ) -{ - if (p->csr + bytes - p->store > (int) p->size) - do_realloc(p); - - { - unsigned char *csr = p->csr; - p->csr += bytes; - return csr; - } -} - - - -static void emit_1b( struct x86_function *p, char b0 ) -{ - char *csr = (char *)reserve(p, 1); - *csr = b0; -} - -static void emit_1i( struct x86_function *p, int i0 ) -{ - int *icsr = (int *)reserve(p, sizeof(i0)); - *icsr = i0; -} - -static void emit_1ub( struct x86_function *p, unsigned char b0 ) -{ - unsigned char *csr = reserve(p, 1); - *csr++ = b0; -} - -static void emit_2ub( struct x86_function *p, unsigned char b0, unsigned char b1 ) -{ - unsigned char *csr = reserve(p, 2); - *csr++ = b0; - *csr++ = b1; -} - -static void emit_3ub( struct x86_function *p, unsigned char b0, unsigned char b1, unsigned char b2 ) -{ - unsigned char *csr = reserve(p, 3); - *csr++ = b0; - *csr++ = b1; - *csr++ = b2; -} - - -/* Build a modRM byte + possible displacement. No treatment of SIB - * indexing. BZZT - no way to encode an absolute address. - * - * This is the "/r" field in the x86 manuals... - */ -static void emit_modrm( struct x86_function *p, - struct x86_reg reg, - struct x86_reg regmem ) -{ - unsigned char val = 0; - - assert(reg.mod == mod_REG); - - /* TODO: support extended x86-64 registers */ - assert(reg.idx < 8); - assert(regmem.idx < 8); - - val |= regmem.mod << 6; /* mod field */ - val |= reg.idx << 3; /* reg field */ - val |= regmem.idx; /* r/m field */ - - emit_1ub(p, val); - - /* Oh-oh we've stumbled into the SIB thing. - */ - if (regmem.file == file_REG32 && - regmem.idx == reg_SP && - regmem.mod != mod_REG) { - emit_1ub(p, 0x24); /* simplistic! */ - } - - switch (regmem.mod) { - case mod_REG: - case mod_INDIRECT: - break; - case mod_DISP8: - emit_1b(p, (char) regmem.disp); - break; - case mod_DISP32: - emit_1i(p, regmem.disp); - break; - default: - assert(0); - break; - } -} - -/* Emits the "/0".."/7" specialized versions of the modrm ("/r") bytes. - */ -static void emit_modrm_noreg( struct x86_function *p, - unsigned op, - struct x86_reg regmem ) -{ - struct x86_reg dummy = x86_make_reg(file_REG32, op); - emit_modrm(p, dummy, regmem); -} - -/* Many x86 instructions have two opcodes to cope with the situations - * where the destination is a register or memory reference - * respectively. This function selects the correct opcode based on - * the arguments presented. - */ -static void emit_op_modrm( struct x86_function *p, - unsigned char op_dst_is_reg, - unsigned char op_dst_is_mem, - struct x86_reg dst, - struct x86_reg src ) -{ - switch (dst.mod) { - case mod_REG: - emit_1ub(p, op_dst_is_reg); - emit_modrm(p, dst, src); - break; - case mod_INDIRECT: - case mod_DISP32: - case mod_DISP8: - assert(src.mod == mod_REG); - emit_1ub(p, op_dst_is_mem); - emit_modrm(p, src, dst); - break; - default: - assert(0); - break; - } -} - - - - - - - -/* Create and manipulate registers and regmem values: - */ -struct x86_reg x86_make_reg( enum x86_reg_file file, - enum x86_reg_name idx ) -{ - struct x86_reg reg; - - reg.file = file; - reg.idx = idx; - reg.mod = mod_REG; - reg.disp = 0; - - return reg; -} - -struct x86_reg x86_make_disp( struct x86_reg reg, - int disp ) -{ - assert(reg.file == file_REG32); - - if (reg.mod == mod_REG) - reg.disp = disp; - else - reg.disp += disp; - - if (reg.disp == 0 && reg.idx != reg_BP) - reg.mod = mod_INDIRECT; - else if (reg.disp <= 127 && reg.disp >= -128) - reg.mod = mod_DISP8; - else - reg.mod = mod_DISP32; - - return reg; -} - -struct x86_reg x86_deref( struct x86_reg reg ) -{ - return x86_make_disp(reg, 0); -} - -struct x86_reg x86_get_base_reg( struct x86_reg reg ) -{ - return x86_make_reg( reg.file, reg.idx ); -} - -int x86_get_label( struct x86_function *p ) -{ - return p->csr - p->store; -} - - - -/*********************************************************************** - * x86 instructions - */ - - -void x64_rexw(struct x86_function *p) -{ - if(x86_target(p) != X86_32) - emit_1ub(p, 0x48); -} - -void x86_jcc( struct x86_function *p, - enum x86_cc cc, - int label ) -{ - int offset = label - (x86_get_label(p) + 2); - DUMP_I(cc); - - if (offset < 0) { - /*assert(p->csr - p->store > -offset);*/ - if (p->csr - p->store <= -offset) { - /* probably out of memory (using the error_overflow buffer) */ - return; - } - } - - if (offset <= 127 && offset >= -128) { - emit_1ub(p, 0x70 + cc); - emit_1b(p, (char) offset); - } - else { - offset = label - (x86_get_label(p) + 6); - emit_2ub(p, 0x0f, 0x80 + cc); - emit_1i(p, offset); - } -} - -/* Always use a 32bit offset for forward jumps: - */ -int x86_jcc_forward( struct x86_function *p, - enum x86_cc cc ) -{ - DUMP_I(cc); - emit_2ub(p, 0x0f, 0x80 + cc); - emit_1i(p, 0); - return x86_get_label(p); -} - -int x86_jmp_forward( struct x86_function *p) -{ - DUMP(); - emit_1ub(p, 0xe9); - emit_1i(p, 0); - return x86_get_label(p); -} - -int x86_call_forward( struct x86_function *p) -{ - DUMP(); - - emit_1ub(p, 0xe8); - emit_1i(p, 0); - return x86_get_label(p); -} - -/* Fixup offset from forward jump: - */ -void x86_fixup_fwd_jump( struct x86_function *p, - int fixup ) -{ - *(int *)(p->store + fixup - 4) = x86_get_label(p) - fixup; -} - -void x86_jmp( struct x86_function *p, int label) -{ - DUMP_I( label ); - emit_1ub(p, 0xe9); - emit_1i(p, label - x86_get_label(p) - 4); -} - -void x86_call( struct x86_function *p, struct x86_reg reg) -{ - DUMP_R( reg ); - emit_1ub(p, 0xff); - emit_modrm_noreg(p, 2, reg); -} - - -void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, int imm ) -{ - DUMP_RI( dst, imm ); - assert(dst.file == file_REG32); - assert(dst.mod == mod_REG); - emit_1ub(p, 0xb8 + dst.idx); - emit_1i(p, imm); -} - -void x86_mov_imm( struct x86_function *p, struct x86_reg dst, int imm ) -{ - DUMP_RI( dst, imm ); - if(dst.mod == mod_REG) - x86_mov_reg_imm(p, dst, imm); - else - { - emit_1ub(p, 0xc7); - emit_modrm_noreg(p, 0, dst); - emit_1i(p, imm); - } -} - -void x86_mov16_imm( struct x86_function *p, struct x86_reg dst, uint16_t imm ) -{ - DUMP_RI( dst, imm ); - emit_1ub(p, 0x66); - if(dst.mod == mod_REG) - { - emit_1ub(p, 0xb8 + dst.idx); - emit_2ub(p, imm & 0xff, imm >> 8); - } - else - { - emit_1ub(p, 0xc7); - emit_modrm_noreg(p, 0, dst); - emit_2ub(p, imm & 0xff, imm >> 8); - } -} - -void x86_mov8_imm( struct x86_function *p, struct x86_reg dst, uint8_t imm ) -{ - DUMP_RI( dst, imm ); - if(dst.mod == mod_REG) - { - emit_1ub(p, 0xb0 + dst.idx); - emit_1ub(p, imm); - } - else - { - emit_1ub(p, 0xc6); - emit_modrm_noreg(p, 0, dst); - emit_1ub(p, imm); - } -} - -/** - * Immediate group 1 instructions. - */ -static INLINE void -x86_group1_imm( struct x86_function *p, - unsigned op, struct x86_reg dst, int imm ) -{ - assert(dst.file == file_REG32); - assert(dst.mod == mod_REG); - if(-0x80 <= imm && imm < 0x80) { - emit_1ub(p, 0x83); - emit_modrm_noreg(p, op, dst); - emit_1b(p, (char)imm); - } - else { - emit_1ub(p, 0x81); - emit_modrm_noreg(p, op, dst); - emit_1i(p, imm); - } -} - -void x86_add_imm( struct x86_function *p, struct x86_reg dst, int imm ) -{ - DUMP_RI( dst, imm ); - x86_group1_imm(p, 0, dst, imm); -} - -void x86_or_imm( struct x86_function *p, struct x86_reg dst, int imm ) -{ - DUMP_RI( dst, imm ); - x86_group1_imm(p, 1, dst, imm); -} - -void x86_and_imm( struct x86_function *p, struct x86_reg dst, int imm ) -{ - DUMP_RI( dst, imm ); - x86_group1_imm(p, 4, dst, imm); -} - -void x86_sub_imm( struct x86_function *p, struct x86_reg dst, int imm ) -{ - DUMP_RI( dst, imm ); - x86_group1_imm(p, 5, dst, imm); -} - -void x86_xor_imm( struct x86_function *p, struct x86_reg dst, int imm ) -{ - DUMP_RI( dst, imm ); - x86_group1_imm(p, 6, dst, imm); -} - -void x86_cmp_imm( struct x86_function *p, struct x86_reg dst, int imm ) -{ - DUMP_RI( dst, imm ); - x86_group1_imm(p, 7, dst, imm); -} - - -void x86_push( struct x86_function *p, - struct x86_reg reg ) -{ - DUMP_R( reg ); - if (reg.mod == mod_REG) - emit_1ub(p, 0x50 + reg.idx); - else - { - emit_1ub(p, 0xff); - emit_modrm_noreg(p, 6, reg); - } - - - p->stack_offset += sizeof(void*); -} - -void x86_push_imm32( struct x86_function *p, - int imm32 ) -{ - DUMP_I( imm32 ); - emit_1ub(p, 0x68); - emit_1i(p, imm32); - - p->stack_offset += sizeof(void*); -} - - -void x86_pop( struct x86_function *p, - struct x86_reg reg ) -{ - DUMP_R( reg ); - assert(reg.mod == mod_REG); - emit_1ub(p, 0x58 + reg.idx); - p->stack_offset -= sizeof(void*); -} - -void x86_inc( struct x86_function *p, - struct x86_reg reg ) -{ - DUMP_R( reg ); - if(x86_target(p) == X86_32 && reg.mod == mod_REG) - { - emit_1ub(p, 0x40 + reg.idx); - return; - } - emit_1ub(p, 0xff); - emit_modrm_noreg(p, 0, reg); -} - -void x86_dec( struct x86_function *p, - struct x86_reg reg ) -{ - DUMP_R( reg ); - if(x86_target(p) == X86_32 && reg.mod == mod_REG) - { - emit_1ub(p, 0x48 + reg.idx); - return; - } - emit_1ub(p, 0xff); - emit_modrm_noreg(p, 1, reg); -} - -void x86_ret( struct x86_function *p ) -{ - DUMP(); - assert(p->stack_offset == 0); - emit_1ub(p, 0xc3); -} - -void x86_retw( struct x86_function *p, unsigned short imm ) -{ - DUMP(); - emit_3ub(p, 0xc2, imm & 0xff, (imm >> 8) & 0xff); -} - -void x86_sahf( struct x86_function *p ) -{ - DUMP(); - emit_1ub(p, 0x9e); -} - -void x86_mov( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - /* special hack for reading arguments until we support x86-64 registers everywhere */ - if(src.mod == mod_REG && dst.mod == mod_REG && (src.idx >= 8 || dst.idx >= 8)) - { - uint8_t rex = 0x40; - if(dst.idx >= 8) - { - rex |= 4; - dst.idx -= 8; - } - if(src.idx >= 8) - { - rex |= 1; - src.idx -= 8; - } - emit_1ub(p, rex); - } - emit_op_modrm( p, 0x8b, 0x89, dst, src ); -} - -void x86_mov16( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_1ub(p, 0x66); - emit_op_modrm( p, 0x8b, 0x89, dst, src ); -} - -void x86_mov8( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_op_modrm( p, 0x8a, 0x88, dst, src ); -} - -void x64_mov64( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - uint8_t rex = 0x48; - DUMP_RR( dst, src ); - assert(x86_target(p) != X86_32); - - /* special hack for reading arguments until we support x86-64 registers everywhere */ - if(src.mod == mod_REG && dst.mod == mod_REG && (src.idx >= 8 || dst.idx >= 8)) - { - if(dst.idx >= 8) - { - rex |= 4; - dst.idx -= 8; - } - if(src.idx >= 8) - { - rex |= 1; - src.idx -= 8; - } - } - emit_1ub(p, rex); - emit_op_modrm( p, 0x8b, 0x89, dst, src ); -} - -void x86_movzx8(struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_2ub(p, 0x0f, 0xb6); - emit_modrm(p, dst, src); -} - -void x86_movzx16(struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_2ub(p, 0x0f, 0xb7); - emit_modrm(p, dst, src); -} - -void x86_cmovcc( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src, - enum x86_cc cc) -{ - DUMP_RRI( dst, src, cc ); - emit_2ub( p, 0x0f, 0x40 + cc ); - emit_modrm( p, dst, src ); -} - -void x86_xor( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_op_modrm( p, 0x33, 0x31, dst, src ); -} - -void x86_cmp( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_op_modrm( p, 0x3b, 0x39, dst, src ); -} - -void x86_lea( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_1ub(p, 0x8d); - emit_modrm( p, dst, src ); -} - -void x86_test( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_1ub(p, 0x85); - emit_modrm( p, dst, src ); -} - -void x86_add( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_op_modrm(p, 0x03, 0x01, dst, src ); -} - -/* Calculate EAX * src, results in EDX:EAX. - */ -void x86_mul( struct x86_function *p, - struct x86_reg src ) -{ - DUMP_R( src ); - emit_1ub(p, 0xf7); - emit_modrm_noreg(p, 4, src ); -} - - -void x86_imul( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_2ub(p, X86_TWOB, 0xAF); - emit_modrm(p, dst, src); -} - - -void x86_sub( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_op_modrm(p, 0x2b, 0x29, dst, src ); -} - -void x86_or( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_op_modrm( p, 0x0b, 0x09, dst, src ); -} - -void x86_and( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_op_modrm( p, 0x23, 0x21, dst, src ); -} - -void x86_div( struct x86_function *p, - struct x86_reg src ) -{ - assert(src.file == file_REG32 && src.mod == mod_REG); - emit_op_modrm(p, 0xf7, 0, x86_make_reg(file_REG32, 6), src); -} - -void x86_bswap( struct x86_function *p, struct x86_reg reg ) -{ - DUMP_R(reg); - assert(reg.file == file_REG32); - assert(reg.mod == mod_REG); - emit_2ub(p, 0x0f, 0xc8 + reg.idx); -} - -void x86_shr_imm( struct x86_function *p, struct x86_reg reg, unsigned imm ) -{ - DUMP_RI(reg, imm); - if(imm == 1) - { - emit_1ub(p, 0xd1); - emit_modrm_noreg(p, 5, reg); - } - else - { - emit_1ub(p, 0xc1); - emit_modrm_noreg(p, 5, reg); - emit_1ub(p, imm); - } -} - -void x86_sar_imm( struct x86_function *p, struct x86_reg reg, unsigned imm ) -{ - DUMP_RI(reg, imm); - if(imm == 1) - { - emit_1ub(p, 0xd1); - emit_modrm_noreg(p, 7, reg); - } - else - { - emit_1ub(p, 0xc1); - emit_modrm_noreg(p, 7, reg); - emit_1ub(p, imm); - } -} - -void x86_shl_imm( struct x86_function *p, struct x86_reg reg, unsigned imm ) -{ - DUMP_RI(reg, imm); - if(imm == 1) - { - emit_1ub(p, 0xd1); - emit_modrm_noreg(p, 4, reg); - } - else - { - emit_1ub(p, 0xc1); - emit_modrm_noreg(p, 4, reg); - emit_1ub(p, imm); - } -} - - -/*********************************************************************** - * SSE instructions - */ - -void sse_prefetchnta( struct x86_function *p, struct x86_reg ptr) -{ - DUMP_R( ptr ); - assert(ptr.mod != mod_REG); - emit_2ub(p, 0x0f, 0x18); - emit_modrm_noreg(p, 0, ptr); -} - -void sse_prefetch0( struct x86_function *p, struct x86_reg ptr) -{ - DUMP_R( ptr ); - assert(ptr.mod != mod_REG); - emit_2ub(p, 0x0f, 0x18); - emit_modrm_noreg(p, 1, ptr); -} - -void sse_prefetch1( struct x86_function *p, struct x86_reg ptr) -{ - DUMP_R( ptr ); - assert(ptr.mod != mod_REG); - emit_2ub(p, 0x0f, 0x18); - emit_modrm_noreg(p, 2, ptr); -} - -void sse_movntps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src) -{ - DUMP_RR( dst, src ); - - assert(dst.mod != mod_REG); - assert(src.mod == mod_REG); - emit_2ub(p, 0x0f, 0x2b); - emit_modrm(p, src, dst); -} - - - - -void sse_movss( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_2ub(p, 0xF3, X86_TWOB); - emit_op_modrm( p, 0x10, 0x11, dst, src ); -} - -void sse_movaps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_1ub(p, X86_TWOB); - emit_op_modrm( p, 0x28, 0x29, dst, src ); -} - -void sse_movups( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_1ub(p, X86_TWOB); - emit_op_modrm( p, 0x10, 0x11, dst, src ); -} - -void sse_movhps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - assert(dst.mod != mod_REG || src.mod != mod_REG); - emit_1ub(p, X86_TWOB); - emit_op_modrm( p, 0x16, 0x17, dst, src ); /* cf movlhps */ -} - -void sse_movlps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - assert(dst.mod != mod_REG || src.mod != mod_REG); - emit_1ub(p, X86_TWOB); - emit_op_modrm( p, 0x12, 0x13, dst, src ); /* cf movhlps */ -} - -void sse_maxps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_2ub(p, X86_TWOB, 0x5F); - emit_modrm( p, dst, src ); -} - -void sse_maxss( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_3ub(p, 0xF3, X86_TWOB, 0x5F); - emit_modrm( p, dst, src ); -} - -void sse_divss( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_3ub(p, 0xF3, X86_TWOB, 0x5E); - emit_modrm( p, dst, src ); -} - -void sse_minps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_2ub(p, X86_TWOB, 0x5D); - emit_modrm( p, dst, src ); -} - -void sse_subps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_2ub(p, X86_TWOB, 0x5C); - emit_modrm( p, dst, src ); -} - -void sse_mulps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_2ub(p, X86_TWOB, 0x59); - emit_modrm( p, dst, src ); -} - -void sse_mulss( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_3ub(p, 0xF3, X86_TWOB, 0x59); - emit_modrm( p, dst, src ); -} - -void sse_addps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_2ub(p, X86_TWOB, 0x58); - emit_modrm( p, dst, src ); -} - -void sse_addss( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_3ub(p, 0xF3, X86_TWOB, 0x58); - emit_modrm( p, dst, src ); -} - -void sse_andnps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_2ub(p, X86_TWOB, 0x55); - emit_modrm( p, dst, src ); -} - -void sse_andps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_2ub(p, X86_TWOB, 0x54); - emit_modrm( p, dst, src ); -} - -void sse_rsqrtps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_2ub(p, X86_TWOB, 0x52); - emit_modrm( p, dst, src ); -} - -void sse_rsqrtss( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_3ub(p, 0xF3, X86_TWOB, 0x52); - emit_modrm( p, dst, src ); - -} - -void sse_movhlps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - assert(dst.mod == mod_REG && src.mod == mod_REG); - emit_2ub(p, X86_TWOB, 0x12); - emit_modrm( p, dst, src ); -} - -void sse_movlhps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - assert(dst.mod == mod_REG && src.mod == mod_REG); - emit_2ub(p, X86_TWOB, 0x16); - emit_modrm( p, dst, src ); -} - -void sse_orps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_2ub(p, X86_TWOB, 0x56); - emit_modrm( p, dst, src ); -} - -void sse_xorps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_2ub(p, X86_TWOB, 0x57); - emit_modrm( p, dst, src ); -} - -void sse_cvtps2pi( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - assert(dst.file == file_MMX && - (src.file == file_XMM || src.mod != mod_REG)); - - p->need_emms = 1; - - emit_2ub(p, X86_TWOB, 0x2d); - emit_modrm( p, dst, src ); -} - -void sse2_cvtdq2ps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_2ub(p, X86_TWOB, 0x5b); - emit_modrm( p, dst, src ); -} - - -/* Shufps can also be used to implement a reduced swizzle when dest == - * arg0. - */ -void sse_shufps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src, - unsigned char shuf) -{ - DUMP_RRI( dst, src, shuf ); - emit_2ub(p, X86_TWOB, 0xC6); - emit_modrm(p, dst, src); - emit_1ub(p, shuf); -} - -void sse_unpckhps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_2ub( p, X86_TWOB, 0x15 ); - emit_modrm( p, dst, src ); -} - -void sse_unpcklps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_2ub( p, X86_TWOB, 0x14 ); - emit_modrm( p, dst, src ); -} - -void sse_cmpps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src, - enum sse_cc cc) -{ - DUMP_RRI( dst, src, cc ); - emit_2ub(p, X86_TWOB, 0xC2); - emit_modrm(p, dst, src); - emit_1ub(p, cc); -} - -void sse_pmovmskb( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src) -{ - DUMP_RR( dst, src ); - emit_3ub(p, 0x66, X86_TWOB, 0xD7); - emit_modrm(p, dst, src); -} - -void sse_movmskps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src) -{ - DUMP_RR( dst, src ); - emit_2ub(p, X86_TWOB, 0x50); - emit_modrm(p, dst, src); -} - -/*********************************************************************** - * SSE2 instructions - */ - -void sse2_movd( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR(dst, src); - emit_2ub(p, 0x66, 0x0f); - if(dst.mod == mod_REG && dst.file == file_REG32) - { - emit_1ub(p, 0x7e); - emit_modrm(p, src, dst); - } - else - { - emit_op_modrm(p, 0x6e, 0x7e, dst, src); - } -} - -void sse2_movq( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR(dst, src); - switch (dst.mod) { - case mod_REG: - emit_3ub(p, 0xf3, 0x0f, 0x7e); - emit_modrm(p, dst, src); - break; - case mod_INDIRECT: - case mod_DISP32: - case mod_DISP8: - assert(src.mod == mod_REG); - emit_3ub(p, 0x66, 0x0f, 0xd6); - emit_modrm(p, src, dst); - break; - default: - assert(0); - break; - } -} - -void sse2_movdqu( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR(dst, src); - emit_2ub(p, 0xf3, 0x0f); - emit_op_modrm(p, 0x6f, 0x7f, dst, src); -} - -void sse2_movdqa( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR(dst, src); - emit_2ub(p, 0x66, 0x0f); - emit_op_modrm(p, 0x6f, 0x7f, dst, src); -} - -void sse2_movsd( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR(dst, src); - emit_2ub(p, 0xf2, 0x0f); - emit_op_modrm(p, 0x10, 0x11, dst, src); -} - -void sse2_movupd( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR(dst, src); - emit_2ub(p, 0x66, 0x0f); - emit_op_modrm(p, 0x10, 0x11, dst, src); -} - -void sse2_movapd( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR(dst, src); - emit_2ub(p, 0x66, 0x0f); - emit_op_modrm(p, 0x28, 0x29, dst, src); -} - -/** - * Perform a reduced swizzle: - */ -void sse2_pshufd( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src, - unsigned char shuf) -{ - DUMP_RRI( dst, src, shuf ); - emit_3ub(p, 0x66, X86_TWOB, 0x70); - emit_modrm(p, dst, src); - emit_1ub(p, shuf); -} - -void sse2_pshuflw( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src, - unsigned char shuf) -{ - DUMP_RRI( dst, src, shuf ); - emit_3ub(p, 0xf2, X86_TWOB, 0x70); - emit_modrm(p, dst, src); - emit_1ub(p, shuf); -} - -void sse2_pshufhw( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src, - unsigned char shuf) -{ - DUMP_RRI( dst, src, shuf ); - emit_3ub(p, 0xf3, X86_TWOB, 0x70); - emit_modrm(p, dst, src); - emit_1ub(p, shuf); -} - -void sse2_cvttps2dq( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_3ub( p, 0xF3, X86_TWOB, 0x5B ); - emit_modrm( p, dst, src ); -} - -void sse2_cvtps2dq( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_3ub(p, 0x66, X86_TWOB, 0x5B); - emit_modrm( p, dst, src ); -} - -void sse2_cvtsd2ss( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_3ub(p, 0xf2, 0x0f, 0x5a); - emit_modrm( p, dst, src ); -} - -void sse2_cvtpd2ps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_3ub(p, 0x66, 0x0f, 0x5a); - emit_modrm( p, dst, src ); -} - -void sse2_packssdw( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_3ub(p, 0x66, X86_TWOB, 0x6B); - emit_modrm( p, dst, src ); -} - -void sse2_packsswb( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_3ub(p, 0x66, X86_TWOB, 0x63); - emit_modrm( p, dst, src ); -} - -void sse2_packuswb( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_3ub(p, 0x66, X86_TWOB, 0x67); - emit_modrm( p, dst, src ); -} - -void sse2_punpcklbw( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_3ub(p, 0x66, X86_TWOB, 0x60); - emit_modrm( p, dst, src ); -} - -void sse2_punpcklwd( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_3ub(p, 0x66, 0x0f, 0x61); - emit_modrm( p, dst, src ); -} - -void sse2_punpckldq( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_3ub(p, 0x66, 0x0f, 0x62); - emit_modrm( p, dst, src ); -} - -void sse2_punpcklqdq( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_3ub(p, 0x66, 0x0f, 0x6c); - emit_modrm( p, dst, src ); -} - -void sse2_psllw_imm( struct x86_function *p, struct x86_reg dst, unsigned imm ) -{ - DUMP_RI(dst, imm); - emit_3ub(p, 0x66, 0x0f, 0x71); - emit_modrm_noreg(p, 6, dst); - emit_1ub(p, imm); -} - -void sse2_pslld_imm( struct x86_function *p, struct x86_reg dst, unsigned imm ) -{ - DUMP_RI(dst, imm); - emit_3ub(p, 0x66, 0x0f, 0x72); - emit_modrm_noreg(p, 6, dst); - emit_1ub(p, imm); -} - -void sse2_psllq_imm( struct x86_function *p, struct x86_reg dst, unsigned imm ) -{ - DUMP_RI(dst, imm); - emit_3ub(p, 0x66, 0x0f, 0x73); - emit_modrm_noreg(p, 6, dst); - emit_1ub(p, imm); -} - -void sse2_psrlw_imm( struct x86_function *p, struct x86_reg dst, unsigned imm ) -{ - DUMP_RI(dst, imm); - emit_3ub(p, 0x66, 0x0f, 0x71); - emit_modrm_noreg(p, 2, dst); - emit_1ub(p, imm); -} - -void sse2_psrld_imm( struct x86_function *p, struct x86_reg dst, unsigned imm ) -{ - DUMP_RI(dst, imm); - emit_3ub(p, 0x66, 0x0f, 0x72); - emit_modrm_noreg(p, 2, dst); - emit_1ub(p, imm); -} - -void sse2_psrlq_imm( struct x86_function *p, struct x86_reg dst, unsigned imm ) -{ - DUMP_RI(dst, imm); - emit_3ub(p, 0x66, 0x0f, 0x73); - emit_modrm_noreg(p, 2, dst); - emit_1ub(p, imm); -} - -void sse2_psraw_imm( struct x86_function *p, struct x86_reg dst, unsigned imm ) -{ - DUMP_RI(dst, imm); - emit_3ub(p, 0x66, 0x0f, 0x71); - emit_modrm_noreg(p, 4, dst); - emit_1ub(p, imm); -} - -void sse2_psrad_imm( struct x86_function *p, struct x86_reg dst, unsigned imm ) -{ - DUMP_RI(dst, imm); - emit_3ub(p, 0x66, 0x0f, 0x72); - emit_modrm_noreg(p, 4, dst); - emit_1ub(p, imm); -} - -void sse2_por( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR(dst, src); - emit_3ub(p, 0x66, 0x0f, 0xeb); - emit_modrm(p, dst, src); -} - -void sse2_rcpps( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_2ub(p, X86_TWOB, 0x53); - emit_modrm( p, dst, src ); -} - -void sse2_rcpss( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - emit_3ub(p, 0xF3, X86_TWOB, 0x53); - emit_modrm( p, dst, src ); -} - -/*********************************************************************** - * x87 instructions - */ -static void note_x87_pop( struct x86_function *p ) -{ - p->x87_stack--; - assert(p->x87_stack >= 0); -} - -static void note_x87_push( struct x86_function *p ) -{ - p->x87_stack++; - assert(p->x87_stack <= 7); -} - -void x87_assert_stack_empty( struct x86_function *p ) -{ - assert (p->x87_stack == 0); -} - - -void x87_fist( struct x86_function *p, struct x86_reg dst ) -{ - DUMP_R( dst ); - emit_1ub(p, 0xdb); - emit_modrm_noreg(p, 2, dst); -} - -void x87_fistp( struct x86_function *p, struct x86_reg dst ) -{ - DUMP_R( dst ); - emit_1ub(p, 0xdb); - emit_modrm_noreg(p, 3, dst); - note_x87_pop(p); -} - -void x87_fild( struct x86_function *p, struct x86_reg arg ) -{ - DUMP_R( arg ); - emit_1ub(p, 0xdf); - emit_modrm_noreg(p, 0, arg); - note_x87_push(p); -} - -void x87_fldz( struct x86_function *p ) -{ - DUMP(); - emit_2ub(p, 0xd9, 0xee); - note_x87_push(p); -} - - -void x87_fldcw( struct x86_function *p, struct x86_reg arg ) -{ - DUMP_R( arg ); - assert(arg.file == file_REG32); - assert(arg.mod != mod_REG); - emit_1ub(p, 0xd9); - emit_modrm_noreg(p, 5, arg); -} - -void x87_fld1( struct x86_function *p ) -{ - DUMP(); - emit_2ub(p, 0xd9, 0xe8); - note_x87_push(p); -} - -void x87_fldl2e( struct x86_function *p ) -{ - DUMP(); - emit_2ub(p, 0xd9, 0xea); - note_x87_push(p); -} - -void x87_fldln2( struct x86_function *p ) -{ - DUMP(); - emit_2ub(p, 0xd9, 0xed); - note_x87_push(p); -} - -void x87_fwait( struct x86_function *p ) -{ - DUMP(); - emit_1ub(p, 0x9b); -} - -void x87_fnclex( struct x86_function *p ) -{ - DUMP(); - emit_2ub(p, 0xdb, 0xe2); -} - -void x87_fclex( struct x86_function *p ) -{ - x87_fwait(p); - x87_fnclex(p); -} - -void x87_fcmovb( struct x86_function *p, struct x86_reg arg ) -{ - DUMP_R( arg ); - assert(arg.file == file_x87); - emit_2ub(p, 0xda, 0xc0+arg.idx); -} - -void x87_fcmove( struct x86_function *p, struct x86_reg arg ) -{ - DUMP_R( arg ); - assert(arg.file == file_x87); - emit_2ub(p, 0xda, 0xc8+arg.idx); -} - -void x87_fcmovbe( struct x86_function *p, struct x86_reg arg ) -{ - DUMP_R( arg ); - assert(arg.file == file_x87); - emit_2ub(p, 0xda, 0xd0+arg.idx); -} - -void x87_fcmovnb( struct x86_function *p, struct x86_reg arg ) -{ - DUMP_R( arg ); - assert(arg.file == file_x87); - emit_2ub(p, 0xdb, 0xc0+arg.idx); -} - -void x87_fcmovne( struct x86_function *p, struct x86_reg arg ) -{ - DUMP_R( arg ); - assert(arg.file == file_x87); - emit_2ub(p, 0xdb, 0xc8+arg.idx); -} - -void x87_fcmovnbe( struct x86_function *p, struct x86_reg arg ) -{ - DUMP_R( arg ); - assert(arg.file == file_x87); - emit_2ub(p, 0xdb, 0xd0+arg.idx); -} - - - -static void x87_arith_op( struct x86_function *p, struct x86_reg dst, struct x86_reg arg, - unsigned char dst0ub0, - unsigned char dst0ub1, - unsigned char arg0ub0, - unsigned char arg0ub1, - unsigned char argmem_noreg) -{ - assert(dst.file == file_x87); - - if (arg.file == file_x87) { - if (dst.idx == 0) - emit_2ub(p, dst0ub0, dst0ub1+arg.idx); - else if (arg.idx == 0) - emit_2ub(p, arg0ub0, arg0ub1+arg.idx); - else - assert(0); - } - else if (dst.idx == 0) { - assert(arg.file == file_REG32); - emit_1ub(p, 0xd8); - emit_modrm_noreg(p, argmem_noreg, arg); - } - else - assert(0); -} - -void x87_fmul( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR( dst, src ); - x87_arith_op(p, dst, src, - 0xd8, 0xc8, - 0xdc, 0xc8, - 4); -} - -void x87_fsub( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR( dst, src ); - x87_arith_op(p, dst, src, - 0xd8, 0xe0, - 0xdc, 0xe8, - 4); -} - -void x87_fsubr( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR( dst, src ); - x87_arith_op(p, dst, src, - 0xd8, 0xe8, - 0xdc, 0xe0, - 5); -} - -void x87_fadd( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR( dst, src ); - x87_arith_op(p, dst, src, - 0xd8, 0xc0, - 0xdc, 0xc0, - 0); -} - -void x87_fdiv( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR( dst, src ); - x87_arith_op(p, dst, src, - 0xd8, 0xf0, - 0xdc, 0xf8, - 6); -} - -void x87_fdivr( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) -{ - DUMP_RR( dst, src ); - x87_arith_op(p, dst, src, - 0xd8, 0xf8, - 0xdc, 0xf0, - 7); -} - -void x87_fmulp( struct x86_function *p, struct x86_reg dst ) -{ - DUMP_R( dst ); - assert(dst.file == file_x87); - assert(dst.idx >= 1); - emit_2ub(p, 0xde, 0xc8+dst.idx); - note_x87_pop(p); -} - -void x87_fsubp( struct x86_function *p, struct x86_reg dst ) -{ - DUMP_R( dst ); - assert(dst.file == file_x87); - assert(dst.idx >= 1); - emit_2ub(p, 0xde, 0xe8+dst.idx); - note_x87_pop(p); -} - -void x87_fsubrp( struct x86_function *p, struct x86_reg dst ) -{ - DUMP_R( dst ); - assert(dst.file == file_x87); - assert(dst.idx >= 1); - emit_2ub(p, 0xde, 0xe0+dst.idx); - note_x87_pop(p); -} - -void x87_faddp( struct x86_function *p, struct x86_reg dst ) -{ - DUMP_R( dst ); - assert(dst.file == file_x87); - assert(dst.idx >= 1); - emit_2ub(p, 0xde, 0xc0+dst.idx); - note_x87_pop(p); -} - -void x87_fdivp( struct x86_function *p, struct x86_reg dst ) -{ - DUMP_R( dst ); - assert(dst.file == file_x87); - assert(dst.idx >= 1); - emit_2ub(p, 0xde, 0xf8+dst.idx); - note_x87_pop(p); -} - -void x87_fdivrp( struct x86_function *p, struct x86_reg dst ) -{ - DUMP_R( dst ); - assert(dst.file == file_x87); - assert(dst.idx >= 1); - emit_2ub(p, 0xde, 0xf0+dst.idx); - note_x87_pop(p); -} - -void x87_ftst( struct x86_function *p ) -{ - DUMP(); - emit_2ub(p, 0xd9, 0xe4); -} - -void x87_fucom( struct x86_function *p, struct x86_reg arg ) -{ - DUMP_R( arg ); - assert(arg.file == file_x87); - emit_2ub(p, 0xdd, 0xe0+arg.idx); -} - -void x87_fucomp( struct x86_function *p, struct x86_reg arg ) -{ - DUMP_R( arg ); - assert(arg.file == file_x87); - emit_2ub(p, 0xdd, 0xe8+arg.idx); - note_x87_pop(p); -} - -void x87_fucompp( struct x86_function *p ) -{ - DUMP(); - emit_2ub(p, 0xda, 0xe9); - note_x87_pop(p); /* pop twice */ - note_x87_pop(p); /* pop twice */ -} - -void x87_fxch( struct x86_function *p, struct x86_reg arg ) -{ - DUMP_R( arg ); - assert(arg.file == file_x87); - emit_2ub(p, 0xd9, 0xc8+arg.idx); -} - -void x87_fabs( struct x86_function *p ) -{ - DUMP(); - emit_2ub(p, 0xd9, 0xe1); -} - -void x87_fchs( struct x86_function *p ) -{ - DUMP(); - emit_2ub(p, 0xd9, 0xe0); -} - -void x87_fcos( struct x86_function *p ) -{ - DUMP(); - emit_2ub(p, 0xd9, 0xff); -} - - -void x87_fprndint( struct x86_function *p ) -{ - DUMP(); - emit_2ub(p, 0xd9, 0xfc); -} - -void x87_fscale( struct x86_function *p ) -{ - DUMP(); - emit_2ub(p, 0xd9, 0xfd); -} - -void x87_fsin( struct x86_function *p ) -{ - DUMP(); - emit_2ub(p, 0xd9, 0xfe); -} - -void x87_fsincos( struct x86_function *p ) -{ - DUMP(); - emit_2ub(p, 0xd9, 0xfb); -} - -void x87_fsqrt( struct x86_function *p ) -{ - DUMP(); - emit_2ub(p, 0xd9, 0xfa); -} - -void x87_fxtract( struct x86_function *p ) -{ - DUMP(); - emit_2ub(p, 0xd9, 0xf4); -} - -/* st0 = (2^st0)-1 - * - * Restrictions: -1.0 <= st0 <= 1.0 - */ -void x87_f2xm1( struct x86_function *p ) -{ - DUMP(); - emit_2ub(p, 0xd9, 0xf0); -} - -/* st1 = st1 * log2(st0); - * pop_stack; - */ -void x87_fyl2x( struct x86_function *p ) -{ - DUMP(); - emit_2ub(p, 0xd9, 0xf1); - note_x87_pop(p); -} - -/* st1 = st1 * log2(st0 + 1.0); - * pop_stack; - * - * A fast operation, with restrictions: -.29 < st0 < .29 - */ -void x87_fyl2xp1( struct x86_function *p ) -{ - DUMP(); - emit_2ub(p, 0xd9, 0xf9); - note_x87_pop(p); -} - - -void x87_fld( struct x86_function *p, struct x86_reg arg ) -{ - DUMP_R( arg ); - if (arg.file == file_x87) - emit_2ub(p, 0xd9, 0xc0 + arg.idx); - else { - emit_1ub(p, 0xd9); - emit_modrm_noreg(p, 0, arg); - } - note_x87_push(p); -} - -void x87_fst( struct x86_function *p, struct x86_reg dst ) -{ - DUMP_R( dst ); - if (dst.file == file_x87) - emit_2ub(p, 0xdd, 0xd0 + dst.idx); - else { - emit_1ub(p, 0xd9); - emit_modrm_noreg(p, 2, dst); - } -} - -void x87_fstp( struct x86_function *p, struct x86_reg dst ) -{ - DUMP_R( dst ); - if (dst.file == file_x87) - emit_2ub(p, 0xdd, 0xd8 + dst.idx); - else { - emit_1ub(p, 0xd9); - emit_modrm_noreg(p, 3, dst); - } - note_x87_pop(p); -} - -void x87_fpop( struct x86_function *p ) -{ - x87_fstp( p, x86_make_reg( file_x87, 0 )); -} - - -void x87_fcom( struct x86_function *p, struct x86_reg dst ) -{ - DUMP_R( dst ); - if (dst.file == file_x87) - emit_2ub(p, 0xd8, 0xd0 + dst.idx); - else { - emit_1ub(p, 0xd8); - emit_modrm_noreg(p, 2, dst); - } -} - - -void x87_fcomp( struct x86_function *p, struct x86_reg dst ) -{ - DUMP_R( dst ); - if (dst.file == file_x87) - emit_2ub(p, 0xd8, 0xd8 + dst.idx); - else { - emit_1ub(p, 0xd8); - emit_modrm_noreg(p, 3, dst); - } - note_x87_pop(p); -} - -void x87_fcomi( struct x86_function *p, struct x86_reg arg ) -{ - DUMP_R( arg ); - emit_2ub(p, 0xdb, 0xf0+arg.idx); -} - -void x87_fcomip( struct x86_function *p, struct x86_reg arg ) -{ - DUMP_R( arg ); - emit_2ub(p, 0xdb, 0xf0+arg.idx); - note_x87_pop(p); -} - - -void x87_fnstsw( struct x86_function *p, struct x86_reg dst ) -{ - DUMP_R( dst ); - assert(dst.file == file_REG32); - - if (dst.idx == reg_AX && - dst.mod == mod_REG) - emit_2ub(p, 0xdf, 0xe0); - else { - emit_1ub(p, 0xdd); - emit_modrm_noreg(p, 7, dst); - } -} - - -void x87_fnstcw( struct x86_function *p, struct x86_reg dst ) -{ - DUMP_R( dst ); - assert(dst.file == file_REG32); - - emit_1ub(p, 0x9b); /* WAIT -- needed? */ - emit_1ub(p, 0xd9); - emit_modrm_noreg(p, 7, dst); -} - - - - -/*********************************************************************** - * MMX instructions - */ - -void mmx_emms( struct x86_function *p ) -{ - DUMP(); - assert(p->need_emms); - emit_2ub(p, 0x0f, 0x77); - p->need_emms = 0; -} - -void mmx_packssdw( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - assert(dst.file == file_MMX && - (src.file == file_MMX || src.mod != mod_REG)); - - p->need_emms = 1; - - emit_2ub(p, X86_TWOB, 0x6b); - emit_modrm( p, dst, src ); -} - -void mmx_packuswb( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - assert(dst.file == file_MMX && - (src.file == file_MMX || src.mod != mod_REG)); - - p->need_emms = 1; - - emit_2ub(p, X86_TWOB, 0x67); - emit_modrm( p, dst, src ); -} - -void mmx_movd( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - p->need_emms = 1; - emit_1ub(p, X86_TWOB); - emit_op_modrm( p, 0x6e, 0x7e, dst, src ); -} - -void mmx_movq( struct x86_function *p, - struct x86_reg dst, - struct x86_reg src ) -{ - DUMP_RR( dst, src ); - p->need_emms = 1; - emit_1ub(p, X86_TWOB); - emit_op_modrm( p, 0x6f, 0x7f, dst, src ); -} - - -/*********************************************************************** - * Helper functions - */ - - -void x86_cdecl_caller_push_regs( struct x86_function *p ) -{ - x86_push(p, x86_make_reg(file_REG32, reg_AX)); - x86_push(p, x86_make_reg(file_REG32, reg_CX)); - x86_push(p, x86_make_reg(file_REG32, reg_DX)); -} - -void x86_cdecl_caller_pop_regs( struct x86_function *p ) -{ - x86_pop(p, x86_make_reg(file_REG32, reg_DX)); - x86_pop(p, x86_make_reg(file_REG32, reg_CX)); - x86_pop(p, x86_make_reg(file_REG32, reg_AX)); -} - - -struct x86_reg x86_fn_arg( struct x86_function *p, - unsigned arg ) -{ - switch(x86_target(p)) - { - case X86_64_WIN64_ABI: - /* Microsoft uses a different calling convention than the rest of the world */ - switch(arg) - { - case 1: - return x86_make_reg(file_REG32, reg_CX); - case 2: - return x86_make_reg(file_REG32, reg_DX); - case 3: - return x86_make_reg(file_REG32, reg_R8); - case 4: - return x86_make_reg(file_REG32, reg_R9); - default: - /* Win64 allocates stack slots as if it pushed the first 4 arguments too */ - return x86_make_disp(x86_make_reg(file_REG32, reg_SP), - p->stack_offset + arg * 8); - } - case X86_64_STD_ABI: - switch(arg) - { - case 1: - return x86_make_reg(file_REG32, reg_DI); - case 2: - return x86_make_reg(file_REG32, reg_SI); - case 3: - return x86_make_reg(file_REG32, reg_DX); - case 4: - return x86_make_reg(file_REG32, reg_CX); - case 5: - return x86_make_reg(file_REG32, reg_R8); - case 6: - return x86_make_reg(file_REG32, reg_R9); - default: - return x86_make_disp(x86_make_reg(file_REG32, reg_SP), - p->stack_offset + (arg - 6) * 8); /* ??? */ - } - case X86_32: - return x86_make_disp(x86_make_reg(file_REG32, reg_SP), - p->stack_offset + arg * 4); /* ??? */ - default: - assert(0 && "Unexpected x86 target ABI in x86_fn_arg"); - return x86_make_reg(file_REG32, reg_CX); /* not used / silence warning */ - } -} - -static void x86_init_func_common( struct x86_function *p ) -{ - util_cpu_detect(); - p->caps = 0; - if(util_cpu_caps.has_mmx) - p->caps |= X86_MMX; - if(util_cpu_caps.has_mmx2) - p->caps |= X86_MMX2; - if(util_cpu_caps.has_sse) - p->caps |= X86_SSE; - if(util_cpu_caps.has_sse2) - p->caps |= X86_SSE2; - if(util_cpu_caps.has_sse3) - p->caps |= X86_SSE3; - if(util_cpu_caps.has_sse4_1) - p->caps |= X86_SSE4_1; - p->csr = p->store; - DUMP_START(); -} - -void x86_init_func( struct x86_function *p ) -{ - p->size = 0; - p->store = NULL; - x86_init_func_common(p); -} - -void x86_init_func_size( struct x86_function *p, unsigned code_size ) -{ - p->size = code_size; - p->store = rtasm_exec_malloc(code_size); - if (p->store == NULL) { - p->store = p->error_overflow; - } - x86_init_func_common(p); -} - -void x86_release_func( struct x86_function *p ) -{ - if (p->store && p->store != p->error_overflow) - rtasm_exec_free(p->store); - - p->store = NULL; - p->csr = NULL; - p->size = 0; -} - - -static INLINE x86_func -voidptr_to_x86_func(void *v) -{ - union { - void *v; - x86_func f; - } u; - assert(sizeof(u.v) == sizeof(u.f)); - u.v = v; - return u.f; -} - - -x86_func x86_get_func( struct x86_function *p ) -{ - DUMP_END(); - if (DISASSEM && p->store) - debug_printf("disassemble %p %p\n", p->store, p->csr); - - if (p->store == p->error_overflow) - return voidptr_to_x86_func(NULL); - else - return voidptr_to_x86_func(p->store); -} - -#else - -void x86sse_dummy( void ); - -void x86sse_dummy( void ) -{ -} - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_x86sse.h b/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_x86sse.h deleted file mode 100644 index af0565bb59d..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/rtasm/rtasm_x86sse.h +++ /dev/null @@ -1,415 +0,0 @@ -/************************************************************************** - * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef _RTASM_X86SSE_H_ -#define _RTASM_X86SSE_H_ - -#include "pipe/p_compiler.h" -#include "pipe/p_config.h" - -#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) - -/* It is up to the caller to ensure that instructions issued are - * suitable for the host cpu. There are no checks made in this module - * for mmx/sse/sse2 support on the cpu. - */ -struct x86_reg { - unsigned file:2; - unsigned idx:4; - unsigned mod:2; /* mod_REG if this is just a register */ - int disp:24; /* only +/- 23bits of offset - should be enough... */ -}; - -#define X86_MMX 1 -#define X86_MMX2 2 -#define X86_SSE 4 -#define X86_SSE2 8 -#define X86_SSE3 0x10 -#define X86_SSE4_1 0x20 - -struct x86_function { - unsigned caps; - unsigned size; - unsigned char *store; - unsigned char *csr; - - unsigned stack_offset:16; - unsigned need_emms:8; - int x87_stack:8; - - unsigned char error_overflow[4]; -}; - -enum x86_reg_file { - file_REG32, - file_MMX, - file_XMM, - file_x87 -}; - -/* Values for mod field of modr/m byte - */ -enum x86_reg_mod { - mod_INDIRECT, - mod_DISP8, - mod_DISP32, - mod_REG -}; - -enum x86_reg_name { - reg_AX, - reg_CX, - reg_DX, - reg_BX, - reg_SP, - reg_BP, - reg_SI, - reg_DI, - reg_R8, - reg_R9, - reg_R10, - reg_R11, - reg_R12, - reg_R13, - reg_R14, - reg_R15 -}; - - -enum x86_cc { - cc_O, /* overflow */ - cc_NO, /* not overflow */ - cc_NAE, /* not above or equal / carry */ - cc_AE, /* above or equal / not carry */ - cc_E, /* equal / zero */ - cc_NE /* not equal / not zero */ -}; - -enum sse_cc { - cc_Equal, - cc_LessThan, - cc_LessThanEqual, - cc_Unordered, - cc_NotEqual, - cc_NotLessThan, - cc_NotLessThanEqual, - cc_Ordered -}; - -#define cc_Z cc_E -#define cc_NZ cc_NE - - -/** generic pointer to function */ -typedef void (*x86_func)(void); - - -/* Begin/end/retrieve function creation: - */ - -enum x86_target -{ - X86_32, - X86_64_STD_ABI, - X86_64_WIN64_ABI -}; - -/* make this read a member of x86_function if target != host is desired */ -static INLINE enum x86_target x86_target( struct x86_function* p ) -{ -#ifdef PIPE_ARCH_X86 - return X86_32; -#elif defined(_WIN64) - return X86_64_WIN64_ABI; -#elif defined(PIPE_ARCH_X86_64) - return X86_64_STD_ABI; -#endif -} - -static INLINE unsigned x86_target_caps( struct x86_function* p ) -{ - return p->caps; -} - -void x86_init_func( struct x86_function *p ); -void x86_init_func_size( struct x86_function *p, unsigned code_size ); -void x86_release_func( struct x86_function *p ); -x86_func x86_get_func( struct x86_function *p ); - -/* Debugging: - */ -void x86_print_reg( struct x86_reg reg ); - - -/* Create and manipulate registers and regmem values: - */ -struct x86_reg x86_make_reg( enum x86_reg_file file, - enum x86_reg_name idx ); - -struct x86_reg x86_make_disp( struct x86_reg reg, - int disp ); - -struct x86_reg x86_deref( struct x86_reg reg ); - -struct x86_reg x86_get_base_reg( struct x86_reg reg ); - - -/* Labels, jumps and fixup: - */ -int x86_get_label( struct x86_function *p ); - -void x64_rexw(struct x86_function *p); - -void x86_jcc( struct x86_function *p, - enum x86_cc cc, - int label ); - -int x86_jcc_forward( struct x86_function *p, - enum x86_cc cc ); - -int x86_jmp_forward( struct x86_function *p); - -int x86_call_forward( struct x86_function *p); - -void x86_fixup_fwd_jump( struct x86_function *p, - int fixup ); - -void x86_jmp( struct x86_function *p, int label ); - -/* void x86_call( struct x86_function *p, void (*label)() ); */ -void x86_call( struct x86_function *p, struct x86_reg reg); - -void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, int imm ); -void x86_add_imm( struct x86_function *p, struct x86_reg dst, int imm ); -void x86_or_imm( struct x86_function *p, struct x86_reg dst, int imm ); -void x86_and_imm( struct x86_function *p, struct x86_reg dst, int imm ); -void x86_sub_imm( struct x86_function *p, struct x86_reg dst, int imm ); -void x86_xor_imm( struct x86_function *p, struct x86_reg dst, int imm ); -void x86_cmp_imm( struct x86_function *p, struct x86_reg dst, int imm ); - - -/* Macro for sse_shufps() and sse2_pshufd(): - */ -#define SHUF(_x,_y,_z,_w) (((_x)<<0) | ((_y)<<2) | ((_z)<<4) | ((_w)<<6)) -#define SHUF_NOOP RSW(0,1,2,3) -#define GET_SHUF(swz, idx) (((swz) >> ((idx)*2)) & 0x3) - -void mmx_emms( struct x86_function *p ); -void mmx_movd( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void mmx_movq( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void mmx_packssdw( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void mmx_packuswb( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); - -void sse2_movd( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_movq( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_movdqu( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_movdqa( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_movsd( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_movupd( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_movapd( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); - -void sse2_cvtps2dq( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_cvttps2dq( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_cvtdq2ps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_cvtsd2ss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_cvtpd2ps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); - -void sse2_movd( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_packssdw( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_packsswb( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_packuswb( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_pshufd( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, - unsigned char shuf ); -void sse2_pshuflw( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, - unsigned char shuf ); -void sse2_pshufhw( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, - unsigned char shuf ); -void sse2_rcpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_rcpss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); - -void sse2_punpcklbw( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_punpcklwd( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_punpckldq( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse2_punpcklqdq( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); - -void sse2_psllw_imm( struct x86_function *p, struct x86_reg dst, unsigned imm ); -void sse2_pslld_imm( struct x86_function *p, struct x86_reg dst, unsigned imm ); -void sse2_psllq_imm( struct x86_function *p, struct x86_reg dst, unsigned imm ); - -void sse2_psrlw_imm( struct x86_function *p, struct x86_reg dst, unsigned imm ); -void sse2_psrld_imm( struct x86_function *p, struct x86_reg dst, unsigned imm ); -void sse2_psrlq_imm( struct x86_function *p, struct x86_reg dst, unsigned imm ); - -void sse2_psraw_imm( struct x86_function *p, struct x86_reg dst, unsigned imm ); -void sse2_psrad_imm( struct x86_function *p, struct x86_reg dst, unsigned imm ); - -void sse2_por( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); - -void sse2_pshuflw( struct x86_function *p, struct x86_reg dst, struct x86_reg src, uint8_t imm ); -void sse2_pshufhw( struct x86_function *p, struct x86_reg dst, struct x86_reg src, uint8_t imm ); -void sse2_pshufd( struct x86_function *p, struct x86_reg dst, struct x86_reg src, uint8_t imm ); - -void sse_prefetchnta( struct x86_function *p, struct x86_reg ptr); -void sse_prefetch0( struct x86_function *p, struct x86_reg ptr); -void sse_prefetch1( struct x86_function *p, struct x86_reg ptr); - -void sse_movntps( struct x86_function *p, struct x86_reg dst, struct x86_reg src); - -void sse_addps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_addss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_cvtps2pi( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_divss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_andnps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_andps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_cmpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src, - enum sse_cc cc ); -void sse_maxps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_maxss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_minps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_movaps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_movhlps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_movhps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_movlhps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_movlps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_movss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_movups( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_mulps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_mulss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_orps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_xorps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_subps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_rsqrtps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_rsqrtss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_shufps( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, - unsigned char shuf ); -void sse_unpckhps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_unpcklps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void sse_pmovmskb( struct x86_function *p, struct x86_reg dest, struct x86_reg src ); -void sse_movmskps( struct x86_function *p, struct x86_reg dst, struct x86_reg src); - -void x86_add( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_and( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_cmovcc( struct x86_function *p, struct x86_reg dst, struct x86_reg src, enum x86_cc cc ); -void x86_cmp( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_dec( struct x86_function *p, struct x86_reg reg ); -void x86_inc( struct x86_function *p, struct x86_reg reg ); -void x86_lea( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_mov( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x64_mov64( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_mov8( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_mov16( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_movzx8(struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_movzx16(struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_mov_imm(struct x86_function *p, struct x86_reg dst, int imm ); -void x86_mov8_imm(struct x86_function *p, struct x86_reg dst, uint8_t imm ); -void x86_mov16_imm(struct x86_function *p, struct x86_reg dst, uint16_t imm ); -void x86_mul( struct x86_function *p, struct x86_reg src ); -void x86_imul( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_or( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_pop( struct x86_function *p, struct x86_reg reg ); -void x86_push( struct x86_function *p, struct x86_reg reg ); -void x86_push_imm32( struct x86_function *p, int imm ); -void x86_ret( struct x86_function *p ); -void x86_retw( struct x86_function *p, unsigned short imm ); -void x86_sub( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_test( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_xor( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); -void x86_sahf( struct x86_function *p ); -void x86_div( struct x86_function *p, struct x86_reg src ); -void x86_bswap( struct x86_function *p, struct x86_reg src ); -void x86_shr_imm( struct x86_function *p, struct x86_reg reg, unsigned imm ); -void x86_sar_imm( struct x86_function *p, struct x86_reg reg, unsigned imm ); -void x86_shl_imm( struct x86_function *p, struct x86_reg reg, unsigned imm ); - -void x86_cdecl_caller_push_regs( struct x86_function *p ); -void x86_cdecl_caller_pop_regs( struct x86_function *p ); - -void x87_assert_stack_empty( struct x86_function *p ); - -void x87_f2xm1( struct x86_function *p ); -void x87_fabs( struct x86_function *p ); -void x87_fadd( struct x86_function *p, struct x86_reg dst, struct x86_reg arg ); -void x87_faddp( struct x86_function *p, struct x86_reg dst ); -void x87_fchs( struct x86_function *p ); -void x87_fclex( struct x86_function *p ); -void x87_fcmovb( struct x86_function *p, struct x86_reg src ); -void x87_fcmovbe( struct x86_function *p, struct x86_reg src ); -void x87_fcmove( struct x86_function *p, struct x86_reg src ); -void x87_fcmovnb( struct x86_function *p, struct x86_reg src ); -void x87_fcmovnbe( struct x86_function *p, struct x86_reg src ); -void x87_fcmovne( struct x86_function *p, struct x86_reg src ); -void x87_fcom( struct x86_function *p, struct x86_reg dst ); -void x87_fcomi( struct x86_function *p, struct x86_reg dst ); -void x87_fcomip( struct x86_function *p, struct x86_reg dst ); -void x87_fcomp( struct x86_function *p, struct x86_reg dst ); -void x87_fcos( struct x86_function *p ); -void x87_fdiv( struct x86_function *p, struct x86_reg dst, struct x86_reg arg ); -void x87_fdivp( struct x86_function *p, struct x86_reg dst ); -void x87_fdivr( struct x86_function *p, struct x86_reg dst, struct x86_reg arg ); -void x87_fdivrp( struct x86_function *p, struct x86_reg dst ); -void x87_fild( struct x86_function *p, struct x86_reg arg ); -void x87_fist( struct x86_function *p, struct x86_reg dst ); -void x87_fistp( struct x86_function *p, struct x86_reg dst ); -void x87_fld( struct x86_function *p, struct x86_reg arg ); -void x87_fld1( struct x86_function *p ); -void x87_fldcw( struct x86_function *p, struct x86_reg arg ); -void x87_fldl2e( struct x86_function *p ); -void x87_fldln2( struct x86_function *p ); -void x87_fldz( struct x86_function *p ); -void x87_fmul( struct x86_function *p, struct x86_reg dst, struct x86_reg arg ); -void x87_fmulp( struct x86_function *p, struct x86_reg dst ); -void x87_fnclex( struct x86_function *p ); -void x87_fprndint( struct x86_function *p ); -void x87_fpop( struct x86_function *p ); -void x87_fscale( struct x86_function *p ); -void x87_fsin( struct x86_function *p ); -void x87_fsincos( struct x86_function *p ); -void x87_fsqrt( struct x86_function *p ); -void x87_fst( struct x86_function *p, struct x86_reg dst ); -void x87_fstp( struct x86_function *p, struct x86_reg dst ); -void x87_fsub( struct x86_function *p, struct x86_reg dst, struct x86_reg arg ); -void x87_fsubp( struct x86_function *p, struct x86_reg dst ); -void x87_fsubr( struct x86_function *p, struct x86_reg dst, struct x86_reg arg ); -void x87_fsubrp( struct x86_function *p, struct x86_reg dst ); -void x87_ftst( struct x86_function *p ); -void x87_fxch( struct x86_function *p, struct x86_reg dst ); -void x87_fxtract( struct x86_function *p ); -void x87_fyl2x( struct x86_function *p ); -void x87_fyl2xp1( struct x86_function *p ); -void x87_fwait( struct x86_function *p ); -void x87_fnstcw( struct x86_function *p, struct x86_reg dst ); -void x87_fnstsw( struct x86_function *p, struct x86_reg dst ); -void x87_fucompp( struct x86_function *p ); -void x87_fucomp( struct x86_function *p, struct x86_reg arg ); -void x87_fucom( struct x86_function *p, struct x86_reg arg ); - - - -/* Retrieve a reference to one of the function arguments, taking into - * account any push/pop activity. Note - doesn't track explicit - * manipulation of ESP by other instructions. - */ -struct x86_reg x86_fn_arg( struct x86_function *p, unsigned arg ); - -#endif -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_build.c b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_build.c deleted file mode 100644 index 6ec2b0d8f21..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_build.c +++ /dev/null @@ -1,1254 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_debug.h" -#include "pipe/p_format.h" -#include "pipe/p_shader_tokens.h" -#include "tgsi_build.h" -#include "tgsi_parse.h" - - -/* - * header - */ - -struct tgsi_header -tgsi_build_header( void ) -{ - struct tgsi_header header; - - header.HeaderSize = 1; - header.BodySize = 0; - - return header; -} - -static void -header_headersize_grow( struct tgsi_header *header ) -{ - assert( header->HeaderSize < 0xFF ); - assert( header->BodySize == 0 ); - - header->HeaderSize++; -} - -static void -header_bodysize_grow( struct tgsi_header *header ) -{ - assert( header->BodySize < 0xFFFFFF ); - - header->BodySize++; -} - -struct tgsi_processor -tgsi_build_processor( - unsigned type, - struct tgsi_header *header ) -{ - struct tgsi_processor processor; - - processor.Processor = type; - processor.Padding = 0; - - header_headersize_grow( header ); - - return processor; -} - -/* - * declaration - */ - -static void -declaration_grow( - struct tgsi_declaration *declaration, - struct tgsi_header *header ) -{ - assert( declaration->NrTokens < 0xFF ); - - declaration->NrTokens++; - - header_bodysize_grow( header ); -} - -static struct tgsi_declaration -tgsi_default_declaration( void ) -{ - struct tgsi_declaration declaration; - - declaration.Type = TGSI_TOKEN_TYPE_DECLARATION; - declaration.NrTokens = 1; - declaration.File = TGSI_FILE_NULL; - declaration.UsageMask = TGSI_WRITEMASK_XYZW; - declaration.Interpolate = TGSI_INTERPOLATE_CONSTANT; - declaration.Dimension = 0; - declaration.Semantic = 0; - declaration.Centroid = 0; - declaration.Invariant = 0; - declaration.CylindricalWrap = 0; - - return declaration; -} - -static struct tgsi_declaration -tgsi_build_declaration( - unsigned file, - unsigned usage_mask, - unsigned interpolate, - unsigned dimension, - unsigned semantic, - unsigned centroid, - unsigned invariant, - unsigned cylindrical_wrap, - struct tgsi_header *header ) -{ - struct tgsi_declaration declaration; - - assert( file < TGSI_FILE_COUNT ); - assert( interpolate < TGSI_INTERPOLATE_COUNT ); - - declaration = tgsi_default_declaration(); - declaration.File = file; - declaration.UsageMask = usage_mask; - declaration.Interpolate = interpolate; - declaration.Dimension = dimension; - declaration.Semantic = semantic; - declaration.Centroid = centroid; - declaration.Invariant = invariant; - declaration.CylindricalWrap = cylindrical_wrap; - - header_bodysize_grow( header ); - - return declaration; -} - -static struct tgsi_declaration_range -tgsi_default_declaration_range( void ) -{ - struct tgsi_declaration_range dr; - - dr.First = 0; - dr.Last = 0; - - return dr; -} - -static struct tgsi_declaration_range -tgsi_build_declaration_range( - unsigned first, - unsigned last, - struct tgsi_declaration *declaration, - struct tgsi_header *header ) -{ - struct tgsi_declaration_range declaration_range; - - assert( last >= first ); - assert( last <= 0xFFFF ); - - declaration_range.First = first; - declaration_range.Last = last; - - declaration_grow( declaration, header ); - - return declaration_range; -} - -static struct tgsi_declaration_dimension -tgsi_build_declaration_dimension(unsigned index_2d, - struct tgsi_declaration *declaration, - struct tgsi_header *header) -{ - struct tgsi_declaration_dimension dd; - - assert(index_2d <= 0xFFFF); - - dd.Index2D = index_2d; - dd.Padding = 0; - - declaration_grow(declaration, header); - - return dd; -} - -static struct tgsi_declaration_semantic -tgsi_default_declaration_semantic( void ) -{ - struct tgsi_declaration_semantic ds; - - ds.Name = TGSI_SEMANTIC_POSITION; - ds.Index = 0; - ds.Padding = 0; - - return ds; -} - -static struct tgsi_declaration_semantic -tgsi_build_declaration_semantic( - unsigned semantic_name, - unsigned semantic_index, - struct tgsi_declaration *declaration, - struct tgsi_header *header ) -{ - struct tgsi_declaration_semantic ds; - - assert( semantic_name <= TGSI_SEMANTIC_COUNT ); - assert( semantic_index <= 0xFFFF ); - - ds.Name = semantic_name; - ds.Index = semantic_index; - ds.Padding = 0; - - declaration_grow( declaration, header ); - - return ds; -} - - -static struct tgsi_declaration_resource -tgsi_default_declaration_resource(void) -{ - struct tgsi_declaration_resource declaration_resource; - - declaration_resource.Resource = TGSI_TEXTURE_UNKNOWN; - declaration_resource.ReturnTypeX = PIPE_TYPE_UNORM; - declaration_resource.ReturnTypeY = PIPE_TYPE_UNORM; - declaration_resource.ReturnTypeZ = PIPE_TYPE_UNORM; - declaration_resource.ReturnTypeW = PIPE_TYPE_UNORM; - - return declaration_resource; -} - -static struct tgsi_declaration_resource -tgsi_build_declaration_resource(unsigned texture, - unsigned return_type_x, - unsigned return_type_y, - unsigned return_type_z, - unsigned return_type_w, - struct tgsi_declaration *declaration, - struct tgsi_header *header) -{ - struct tgsi_declaration_resource declaration_resource; - - declaration_resource = tgsi_default_declaration_resource(); - declaration_resource.Resource = texture; - declaration_resource.ReturnTypeX = return_type_x; - declaration_resource.ReturnTypeY = return_type_y; - declaration_resource.ReturnTypeZ = return_type_z; - declaration_resource.ReturnTypeW = return_type_w; - - declaration_grow(declaration, header); - - return declaration_resource; -} - - -struct tgsi_full_declaration -tgsi_default_full_declaration( void ) -{ - struct tgsi_full_declaration full_declaration; - - full_declaration.Declaration = tgsi_default_declaration(); - full_declaration.Range = tgsi_default_declaration_range(); - full_declaration.Semantic = tgsi_default_declaration_semantic(); - full_declaration.ImmediateData.u = NULL; - full_declaration.Resource = tgsi_default_declaration_resource(); - - return full_declaration; -} - -unsigned -tgsi_build_full_declaration( - const struct tgsi_full_declaration *full_decl, - struct tgsi_token *tokens, - struct tgsi_header *header, - unsigned maxsize ) -{ - unsigned size = 0; - struct tgsi_declaration *declaration; - struct tgsi_declaration_range *dr; - - if( maxsize <= size ) - return 0; - declaration = (struct tgsi_declaration *) &tokens[size]; - size++; - - *declaration = tgsi_build_declaration( - full_decl->Declaration.File, - full_decl->Declaration.UsageMask, - full_decl->Declaration.Interpolate, - full_decl->Declaration.Dimension, - full_decl->Declaration.Semantic, - full_decl->Declaration.Centroid, - full_decl->Declaration.Invariant, - full_decl->Declaration.CylindricalWrap, - header ); - - if (maxsize <= size) - return 0; - dr = (struct tgsi_declaration_range *) &tokens[size]; - size++; - - *dr = tgsi_build_declaration_range( - full_decl->Range.First, - full_decl->Range.Last, - declaration, - header ); - - if (full_decl->Declaration.Dimension) { - struct tgsi_declaration_dimension *dd; - - if (maxsize <= size) { - return 0; - } - dd = (struct tgsi_declaration_dimension *)&tokens[size]; - size++; - - *dd = tgsi_build_declaration_dimension(full_decl->Dim.Index2D, - declaration, - header); - } - - if( full_decl->Declaration.Semantic ) { - struct tgsi_declaration_semantic *ds; - - if( maxsize <= size ) - return 0; - ds = (struct tgsi_declaration_semantic *) &tokens[size]; - size++; - - *ds = tgsi_build_declaration_semantic( - full_decl->Semantic.Name, - full_decl->Semantic.Index, - declaration, - header ); - } - - if (full_decl->Declaration.File == TGSI_FILE_IMMEDIATE_ARRAY) { - unsigned i, j; - union tgsi_immediate_data *data; - - for (i = 0; i <= dr->Last; ++i) { - for (j = 0; j < 4; ++j) { - unsigned idx = i*4 + j; - if (maxsize <= size) - return 0; - data = (union tgsi_immediate_data *) &tokens[size]; - ++size; - - *data = full_decl->ImmediateData.u[idx]; - declaration_grow( declaration, header ); - } - } - } - - if (full_decl->Declaration.File == TGSI_FILE_RESOURCE) { - struct tgsi_declaration_resource *dr; - - if (maxsize <= size) { - return 0; - } - dr = (struct tgsi_declaration_resource *)&tokens[size]; - size++; - - *dr = tgsi_build_declaration_resource(full_decl->Resource.Resource, - full_decl->Resource.ReturnTypeX, - full_decl->Resource.ReturnTypeY, - full_decl->Resource.ReturnTypeZ, - full_decl->Resource.ReturnTypeW, - declaration, - header); - } - - return size; -} - -/* - * immediate - */ - -static struct tgsi_immediate -tgsi_default_immediate( void ) -{ - struct tgsi_immediate immediate; - - immediate.Type = TGSI_TOKEN_TYPE_IMMEDIATE; - immediate.NrTokens = 1; - immediate.DataType = TGSI_IMM_FLOAT32; - immediate.Padding = 0; - - return immediate; -} - -static struct tgsi_immediate -tgsi_build_immediate( - struct tgsi_header *header ) -{ - struct tgsi_immediate immediate; - - immediate = tgsi_default_immediate(); - - header_bodysize_grow( header ); - - return immediate; -} - -struct tgsi_full_immediate -tgsi_default_full_immediate( void ) -{ - struct tgsi_full_immediate fullimm; - - fullimm.Immediate = tgsi_default_immediate(); - fullimm.u[0].Float = 0.0f; - fullimm.u[1].Float = 0.0f; - fullimm.u[2].Float = 0.0f; - fullimm.u[3].Float = 0.0f; - - return fullimm; -} - -static void -immediate_grow( - struct tgsi_immediate *immediate, - struct tgsi_header *header ) -{ - assert( immediate->NrTokens < 0xFF ); - - immediate->NrTokens++; - - header_bodysize_grow( header ); -} - -static union tgsi_immediate_data -tgsi_build_immediate_float32( - float value, - struct tgsi_immediate *immediate, - struct tgsi_header *header ) -{ - union tgsi_immediate_data immediate_data; - - immediate_data.Float = value; - - immediate_grow( immediate, header ); - - return immediate_data; -} - -unsigned -tgsi_build_full_immediate( - const struct tgsi_full_immediate *full_imm, - struct tgsi_token *tokens, - struct tgsi_header *header, - unsigned maxsize ) -{ - unsigned size = 0, i; - struct tgsi_immediate *immediate; - - if( maxsize <= size ) - return 0; - immediate = (struct tgsi_immediate *) &tokens[size]; - size++; - - *immediate = tgsi_build_immediate( header ); - - assert( full_imm->Immediate.NrTokens <= 4 + 1 ); - - for( i = 0; i < full_imm->Immediate.NrTokens - 1; i++ ) { - union tgsi_immediate_data *data; - - if( maxsize <= size ) - return 0; - data = (union tgsi_immediate_data *) &tokens[size]; - size++; - - *data = tgsi_build_immediate_float32( - full_imm->u[i].Float, - immediate, - header ); - } - - return size; -} - -/* - * instruction - */ - -struct tgsi_instruction -tgsi_default_instruction( void ) -{ - struct tgsi_instruction instruction; - - instruction.Type = TGSI_TOKEN_TYPE_INSTRUCTION; - instruction.NrTokens = 0; - instruction.Opcode = TGSI_OPCODE_MOV; - instruction.Saturate = TGSI_SAT_NONE; - instruction.Predicate = 0; - instruction.NumDstRegs = 1; - instruction.NumSrcRegs = 1; - instruction.Label = 0; - instruction.Texture = 0; - instruction.Padding = 0; - - return instruction; -} - -static struct tgsi_instruction -tgsi_build_instruction(unsigned opcode, - unsigned saturate, - unsigned predicate, - unsigned num_dst_regs, - unsigned num_src_regs, - struct tgsi_header *header) -{ - struct tgsi_instruction instruction; - - assert (opcode <= TGSI_OPCODE_LAST); - assert (saturate <= TGSI_SAT_MINUS_PLUS_ONE); - assert (num_dst_regs <= 3); - assert (num_src_regs <= 15); - - instruction = tgsi_default_instruction(); - instruction.Opcode = opcode; - instruction.Saturate = saturate; - instruction.Predicate = predicate; - instruction.NumDstRegs = num_dst_regs; - instruction.NumSrcRegs = num_src_regs; - - header_bodysize_grow( header ); - - return instruction; -} - -static void -instruction_grow( - struct tgsi_instruction *instruction, - struct tgsi_header *header ) -{ - assert (instruction->NrTokens < 0xFF); - - instruction->NrTokens++; - - header_bodysize_grow( header ); -} - -struct tgsi_instruction_predicate -tgsi_default_instruction_predicate(void) -{ - struct tgsi_instruction_predicate instruction_predicate; - - instruction_predicate.SwizzleX = TGSI_SWIZZLE_X; - instruction_predicate.SwizzleY = TGSI_SWIZZLE_Y; - instruction_predicate.SwizzleZ = TGSI_SWIZZLE_Z; - instruction_predicate.SwizzleW = TGSI_SWIZZLE_W; - instruction_predicate.Negate = 0; - instruction_predicate.Index = 0; - instruction_predicate.Padding = 0; - - return instruction_predicate; -} - -static struct tgsi_instruction_predicate -tgsi_build_instruction_predicate(int index, - unsigned negate, - unsigned swizzleX, - unsigned swizzleY, - unsigned swizzleZ, - unsigned swizzleW, - struct tgsi_instruction *instruction, - struct tgsi_header *header) -{ - struct tgsi_instruction_predicate instruction_predicate; - - instruction_predicate = tgsi_default_instruction_predicate(); - instruction_predicate.SwizzleX = swizzleX; - instruction_predicate.SwizzleY = swizzleY; - instruction_predicate.SwizzleZ = swizzleZ; - instruction_predicate.SwizzleW = swizzleW; - instruction_predicate.Negate = negate; - instruction_predicate.Index = index; - - instruction_grow(instruction, header); - - return instruction_predicate; -} - -static struct tgsi_instruction_label -tgsi_default_instruction_label( void ) -{ - struct tgsi_instruction_label instruction_label; - - instruction_label.Label = 0; - instruction_label.Padding = 0; - - return instruction_label; -} - -static struct tgsi_instruction_label -tgsi_build_instruction_label( - unsigned label, - struct tgsi_token *prev_token, - struct tgsi_instruction *instruction, - struct tgsi_header *header ) -{ - struct tgsi_instruction_label instruction_label; - - instruction_label.Label = label; - instruction_label.Padding = 0; - instruction->Label = 1; - - instruction_grow( instruction, header ); - - return instruction_label; -} - -static struct tgsi_instruction_texture -tgsi_default_instruction_texture( void ) -{ - struct tgsi_instruction_texture instruction_texture; - - instruction_texture.Texture = TGSI_TEXTURE_UNKNOWN; - instruction_texture.NumOffsets = 0; - instruction_texture.Padding = 0; - - return instruction_texture; -} - -static struct tgsi_instruction_texture -tgsi_build_instruction_texture( - unsigned texture, - unsigned num_offsets, - struct tgsi_token *prev_token, - struct tgsi_instruction *instruction, - struct tgsi_header *header ) -{ - struct tgsi_instruction_texture instruction_texture; - - instruction_texture.Texture = texture; - instruction_texture.NumOffsets = num_offsets; - instruction_texture.Padding = 0; - instruction->Texture = 1; - - instruction_grow( instruction, header ); - - return instruction_texture; -} - - -static struct tgsi_texture_offset -tgsi_default_texture_offset( void ) -{ - struct tgsi_texture_offset texture_offset; - - texture_offset.Index = 0; - texture_offset.File = 0; - texture_offset.SwizzleX = 0; - texture_offset.SwizzleY = 0; - texture_offset.SwizzleZ = 0; - texture_offset.Padding = 0; - - return texture_offset; -} - -static struct tgsi_texture_offset -tgsi_build_texture_offset( - int index, int file, int swizzle_x, int swizzle_y, int swizzle_z, - struct tgsi_token *prev_token, - struct tgsi_instruction *instruction, - struct tgsi_header *header ) -{ - struct tgsi_texture_offset texture_offset; - - texture_offset.Index = index; - texture_offset.File = file; - texture_offset.SwizzleX = swizzle_x; - texture_offset.SwizzleY = swizzle_y; - texture_offset.SwizzleZ = swizzle_z; - texture_offset.Padding = 0; - - instruction_grow( instruction, header ); - - return texture_offset; -} - -static struct tgsi_src_register -tgsi_default_src_register( void ) -{ - struct tgsi_src_register src_register; - - src_register.File = TGSI_FILE_NULL; - src_register.SwizzleX = TGSI_SWIZZLE_X; - src_register.SwizzleY = TGSI_SWIZZLE_Y; - src_register.SwizzleZ = TGSI_SWIZZLE_Z; - src_register.SwizzleW = TGSI_SWIZZLE_W; - src_register.Negate = 0; - src_register.Absolute = 0; - src_register.Indirect = 0; - src_register.Dimension = 0; - src_register.Index = 0; - - return src_register; -} - -static struct tgsi_src_register -tgsi_build_src_register( - unsigned file, - unsigned swizzle_x, - unsigned swizzle_y, - unsigned swizzle_z, - unsigned swizzle_w, - unsigned negate, - unsigned absolute, - unsigned indirect, - unsigned dimension, - int index, - struct tgsi_instruction *instruction, - struct tgsi_header *header ) -{ - struct tgsi_src_register src_register; - - assert( file < TGSI_FILE_COUNT ); - assert( swizzle_x <= TGSI_SWIZZLE_W ); - assert( swizzle_y <= TGSI_SWIZZLE_W ); - assert( swizzle_z <= TGSI_SWIZZLE_W ); - assert( swizzle_w <= TGSI_SWIZZLE_W ); - assert( negate <= 1 ); - assert( index >= -0x8000 && index <= 0x7FFF ); - - src_register.File = file; - src_register.SwizzleX = swizzle_x; - src_register.SwizzleY = swizzle_y; - src_register.SwizzleZ = swizzle_z; - src_register.SwizzleW = swizzle_w; - src_register.Negate = negate; - src_register.Absolute = absolute; - src_register.Indirect = indirect; - src_register.Dimension = dimension; - src_register.Index = index; - - instruction_grow( instruction, header ); - - return src_register; -} - -static struct tgsi_dimension -tgsi_default_dimension( void ) -{ - struct tgsi_dimension dimension; - - dimension.Indirect = 0; - dimension.Dimension = 0; - dimension.Padding = 0; - dimension.Index = 0; - - return dimension; -} - -static struct tgsi_full_src_register -tgsi_default_full_src_register( void ) -{ - struct tgsi_full_src_register full_src_register; - - full_src_register.Register = tgsi_default_src_register(); - full_src_register.Indirect = tgsi_default_src_register(); - full_src_register.Dimension = tgsi_default_dimension(); - full_src_register.DimIndirect = tgsi_default_src_register(); - - return full_src_register; -} - -static struct tgsi_dimension -tgsi_build_dimension( - unsigned indirect, - unsigned index, - struct tgsi_instruction *instruction, - struct tgsi_header *header ) -{ - struct tgsi_dimension dimension; - - dimension.Indirect = indirect; - dimension.Dimension = 0; - dimension.Padding = 0; - dimension.Index = index; - - instruction_grow( instruction, header ); - - return dimension; -} - -static struct tgsi_dst_register -tgsi_default_dst_register( void ) -{ - struct tgsi_dst_register dst_register; - - dst_register.File = TGSI_FILE_NULL; - dst_register.WriteMask = TGSI_WRITEMASK_XYZW; - dst_register.Indirect = 0; - dst_register.Dimension = 0; - dst_register.Index = 0; - dst_register.Padding = 0; - - return dst_register; -} - -static struct tgsi_dst_register -tgsi_build_dst_register( - unsigned file, - unsigned mask, - unsigned indirect, - unsigned dimension, - int index, - struct tgsi_instruction *instruction, - struct tgsi_header *header ) -{ - struct tgsi_dst_register dst_register; - - assert( file < TGSI_FILE_COUNT ); - assert( mask <= TGSI_WRITEMASK_XYZW ); - assert( index >= -32768 && index <= 32767 ); - - dst_register.File = file; - dst_register.WriteMask = mask; - dst_register.Indirect = indirect; - dst_register.Dimension = dimension; - dst_register.Index = index; - dst_register.Padding = 0; - - instruction_grow( instruction, header ); - - return dst_register; -} - -static struct tgsi_full_dst_register -tgsi_default_full_dst_register( void ) -{ - struct tgsi_full_dst_register full_dst_register; - - full_dst_register.Register = tgsi_default_dst_register(); - full_dst_register.Indirect = tgsi_default_src_register(); - full_dst_register.Dimension = tgsi_default_dimension(); - full_dst_register.DimIndirect = tgsi_default_src_register(); - - return full_dst_register; -} - -struct tgsi_full_instruction -tgsi_default_full_instruction( void ) -{ - struct tgsi_full_instruction full_instruction; - unsigned i; - - full_instruction.Instruction = tgsi_default_instruction(); - full_instruction.Predicate = tgsi_default_instruction_predicate(); - full_instruction.Label = tgsi_default_instruction_label(); - full_instruction.Texture = tgsi_default_instruction_texture(); - for( i = 0; i < TGSI_FULL_MAX_TEX_OFFSETS; i++ ) { - full_instruction.TexOffsets[i] = tgsi_default_texture_offset(); - } - for( i = 0; i < TGSI_FULL_MAX_DST_REGISTERS; i++ ) { - full_instruction.Dst[i] = tgsi_default_full_dst_register(); - } - for( i = 0; i < TGSI_FULL_MAX_SRC_REGISTERS; i++ ) { - full_instruction.Src[i] = tgsi_default_full_src_register(); - } - - return full_instruction; -} - -unsigned -tgsi_build_full_instruction( - const struct tgsi_full_instruction *full_inst, - struct tgsi_token *tokens, - struct tgsi_header *header, - unsigned maxsize ) -{ - unsigned size = 0; - unsigned i; - struct tgsi_instruction *instruction; - struct tgsi_token *prev_token; - - if( maxsize <= size ) - return 0; - instruction = (struct tgsi_instruction *) &tokens[size]; - size++; - - *instruction = tgsi_build_instruction(full_inst->Instruction.Opcode, - full_inst->Instruction.Saturate, - full_inst->Instruction.Predicate, - full_inst->Instruction.NumDstRegs, - full_inst->Instruction.NumSrcRegs, - header); - prev_token = (struct tgsi_token *) instruction; - - if (full_inst->Instruction.Predicate) { - struct tgsi_instruction_predicate *instruction_predicate; - - if (maxsize <= size) { - return 0; - } - instruction_predicate = (struct tgsi_instruction_predicate *)&tokens[size]; - size++; - - *instruction_predicate = - tgsi_build_instruction_predicate(full_inst->Predicate.Index, - full_inst->Predicate.Negate, - full_inst->Predicate.SwizzleX, - full_inst->Predicate.SwizzleY, - full_inst->Predicate.SwizzleZ, - full_inst->Predicate.SwizzleW, - instruction, - header); - } - - if (full_inst->Instruction.Label) { - struct tgsi_instruction_label *instruction_label; - - if( maxsize <= size ) - return 0; - instruction_label = - (struct tgsi_instruction_label *) &tokens[size]; - size++; - - *instruction_label = tgsi_build_instruction_label( - full_inst->Label.Label, - prev_token, - instruction, - header ); - prev_token = (struct tgsi_token *) instruction_label; - } - - if (full_inst->Instruction.Texture) { - struct tgsi_instruction_texture *instruction_texture; - - if( maxsize <= size ) - return 0; - instruction_texture = - (struct tgsi_instruction_texture *) &tokens[size]; - size++; - - *instruction_texture = tgsi_build_instruction_texture( - full_inst->Texture.Texture, - full_inst->Texture.NumOffsets, - prev_token, - instruction, - header ); - prev_token = (struct tgsi_token *) instruction_texture; - - for (i = 0; i < full_inst->Texture.NumOffsets; i++) { - struct tgsi_texture_offset *texture_offset; - - if ( maxsize <= size ) - return 0; - texture_offset = (struct tgsi_texture_offset *)&tokens[size]; - size++; - *texture_offset = tgsi_build_texture_offset( - full_inst->TexOffsets[i].Index, - full_inst->TexOffsets[i].File, - full_inst->TexOffsets[i].SwizzleX, - full_inst->TexOffsets[i].SwizzleY, - full_inst->TexOffsets[i].SwizzleZ, - prev_token, - instruction, - header); - prev_token = (struct tgsi_token *) texture_offset; - } - } - for( i = 0; i < full_inst->Instruction.NumDstRegs; i++ ) { - const struct tgsi_full_dst_register *reg = &full_inst->Dst[i]; - struct tgsi_dst_register *dst_register; - - if( maxsize <= size ) - return 0; - dst_register = (struct tgsi_dst_register *) &tokens[size]; - size++; - - *dst_register = tgsi_build_dst_register( - reg->Register.File, - reg->Register.WriteMask, - reg->Register.Indirect, - reg->Register.Dimension, - reg->Register.Index, - instruction, - header ); - - if( reg->Register.Indirect ) { - struct tgsi_src_register *ind; - - if( maxsize <= size ) - return 0; - ind = (struct tgsi_src_register *) &tokens[size]; - size++; - - *ind = tgsi_build_src_register( - reg->Indirect.File, - reg->Indirect.SwizzleX, - reg->Indirect.SwizzleY, - reg->Indirect.SwizzleZ, - reg->Indirect.SwizzleW, - reg->Indirect.Negate, - reg->Indirect.Absolute, - reg->Indirect.Indirect, - reg->Indirect.Dimension, - reg->Indirect.Index, - instruction, - header ); - } - - if( reg->Register.Dimension ) { - struct tgsi_dimension *dim; - - assert( !reg->Dimension.Dimension ); - - if( maxsize <= size ) - return 0; - dim = (struct tgsi_dimension *) &tokens[size]; - size++; - - *dim = tgsi_build_dimension( - reg->Dimension.Indirect, - reg->Dimension.Index, - instruction, - header ); - - if( reg->Dimension.Indirect ) { - struct tgsi_src_register *ind; - - if( maxsize <= size ) - return 0; - ind = (struct tgsi_src_register *) &tokens[size]; - size++; - - *ind = tgsi_build_src_register( - reg->DimIndirect.File, - reg->DimIndirect.SwizzleX, - reg->DimIndirect.SwizzleY, - reg->DimIndirect.SwizzleZ, - reg->DimIndirect.SwizzleW, - reg->DimIndirect.Negate, - reg->DimIndirect.Absolute, - reg->DimIndirect.Indirect, - reg->DimIndirect.Dimension, - reg->DimIndirect.Index, - instruction, - header ); - } - } - } - - for( i = 0; i < full_inst->Instruction.NumSrcRegs; i++ ) { - const struct tgsi_full_src_register *reg = &full_inst->Src[i]; - struct tgsi_src_register *src_register; - - if( maxsize <= size ) - return 0; - src_register = (struct tgsi_src_register *) &tokens[size]; - size++; - - *src_register = tgsi_build_src_register( - reg->Register.File, - reg->Register.SwizzleX, - reg->Register.SwizzleY, - reg->Register.SwizzleZ, - reg->Register.SwizzleW, - reg->Register.Negate, - reg->Register.Absolute, - reg->Register.Indirect, - reg->Register.Dimension, - reg->Register.Index, - instruction, - header ); - - if( reg->Register.Indirect ) { - struct tgsi_src_register *ind; - - if( maxsize <= size ) - return 0; - ind = (struct tgsi_src_register *) &tokens[size]; - size++; - - *ind = tgsi_build_src_register( - reg->Indirect.File, - reg->Indirect.SwizzleX, - reg->Indirect.SwizzleY, - reg->Indirect.SwizzleZ, - reg->Indirect.SwizzleW, - reg->Indirect.Negate, - reg->Indirect.Absolute, - reg->Indirect.Indirect, - reg->Indirect.Dimension, - reg->Indirect.Index, - instruction, - header ); - } - - if( reg->Register.Dimension ) { - struct tgsi_dimension *dim; - - assert( !reg->Dimension.Dimension ); - - if( maxsize <= size ) - return 0; - dim = (struct tgsi_dimension *) &tokens[size]; - size++; - - *dim = tgsi_build_dimension( - reg->Dimension.Indirect, - reg->Dimension.Index, - instruction, - header ); - - if( reg->Dimension.Indirect ) { - struct tgsi_src_register *ind; - - if( maxsize <= size ) - return 0; - ind = (struct tgsi_src_register *) &tokens[size]; - size++; - - *ind = tgsi_build_src_register( - reg->DimIndirect.File, - reg->DimIndirect.SwizzleX, - reg->DimIndirect.SwizzleY, - reg->DimIndirect.SwizzleZ, - reg->DimIndirect.SwizzleW, - reg->DimIndirect.Negate, - reg->DimIndirect.Absolute, - reg->DimIndirect.Indirect, - reg->DimIndirect.Dimension, - reg->DimIndirect.Index, - instruction, - header ); - } - } - } - - return size; -} - -static struct tgsi_property -tgsi_default_property( void ) -{ - struct tgsi_property property; - - property.Type = TGSI_TOKEN_TYPE_PROPERTY; - property.NrTokens = 1; - property.PropertyName = TGSI_PROPERTY_GS_INPUT_PRIM; - property.Padding = 0; - - return property; -} - -static struct tgsi_property -tgsi_build_property(unsigned property_name, - struct tgsi_header *header) -{ - struct tgsi_property property; - - property = tgsi_default_property(); - property.PropertyName = property_name; - - header_bodysize_grow( header ); - - return property; -} - - -struct tgsi_full_property -tgsi_default_full_property( void ) -{ - struct tgsi_full_property full_property; - - full_property.Property = tgsi_default_property(); - memset(full_property.u, 0, - sizeof(struct tgsi_property_data) * 8); - - return full_property; -} - -static void -property_grow( - struct tgsi_property *property, - struct tgsi_header *header ) -{ - assert( property->NrTokens < 0xFF ); - - property->NrTokens++; - - header_bodysize_grow( header ); -} - -static struct tgsi_property_data -tgsi_build_property_data( - unsigned value, - struct tgsi_property *property, - struct tgsi_header *header ) -{ - struct tgsi_property_data property_data; - - property_data.Data = value; - - property_grow( property, header ); - - return property_data; -} - -unsigned -tgsi_build_full_property( - const struct tgsi_full_property *full_prop, - struct tgsi_token *tokens, - struct tgsi_header *header, - unsigned maxsize ) -{ - unsigned size = 0, i; - struct tgsi_property *property; - - if( maxsize <= size ) - return 0; - property = (struct tgsi_property *) &tokens[size]; - size++; - - *property = tgsi_build_property( - full_prop->Property.PropertyName, - header ); - - assert( full_prop->Property.NrTokens <= 8 + 1 ); - - for( i = 0; i < full_prop->Property.NrTokens - 1; i++ ) { - struct tgsi_property_data *data; - - if( maxsize <= size ) - return 0; - data = (struct tgsi_property_data *) &tokens[size]; - size++; - - *data = tgsi_build_property_data( - full_prop->u[i].Data, - property, - header ); - } - - return size; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_build.h b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_build.h deleted file mode 100644 index 3f236a9c241..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_build.h +++ /dev/null @@ -1,118 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef TGSI_BUILD_H -#define TGSI_BUILD_H - - -struct tgsi_token; - - -#if defined __cplusplus -extern "C" { -#endif - - -/* - * header - */ - -struct tgsi_header -tgsi_build_header( void ); - -struct tgsi_processor -tgsi_build_processor( - unsigned processor, - struct tgsi_header *header ); - -/* - * declaration - */ - -struct tgsi_full_declaration -tgsi_default_full_declaration( void ); - -unsigned -tgsi_build_full_declaration( - const struct tgsi_full_declaration *full_decl, - struct tgsi_token *tokens, - struct tgsi_header *header, - unsigned maxsize ); - -/* - * immediate - */ - -struct tgsi_full_immediate -tgsi_default_full_immediate( void ); - -unsigned -tgsi_build_full_immediate( - const struct tgsi_full_immediate *full_imm, - struct tgsi_token *tokens, - struct tgsi_header *header, - unsigned maxsize ); - -/* - * properties - */ - -struct tgsi_full_property -tgsi_default_full_property( void ); - -unsigned -tgsi_build_full_property( - const struct tgsi_full_property *full_prop, - struct tgsi_token *tokens, - struct tgsi_header *header, - unsigned maxsize ); - -/* - * instruction - */ - -struct tgsi_instruction -tgsi_default_instruction( void ); - -struct tgsi_full_instruction -tgsi_default_full_instruction( void ); - -unsigned -tgsi_build_full_instruction( - const struct tgsi_full_instruction *full_inst, - struct tgsi_token *tokens, - struct tgsi_header *header, - unsigned maxsize ); - -struct tgsi_instruction_predicate -tgsi_default_instruction_predicate(void); - -#if defined __cplusplus -} -#endif - -#endif /* TGSI_BUILD_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_dump.c b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_dump.c deleted file mode 100644 index 99634457ecd..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_dump.c +++ /dev/null @@ -1,712 +0,0 @@ -/************************************************************************** - * - * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_debug.h" -#include "util/u_string.h" -#include "util/u_math.h" -#include "util/u_memory.h" -#include "tgsi_dump.h" -#include "tgsi_info.h" -#include "tgsi_iterate.h" -#include "tgsi_strings.h" - - -/** Number of spaces to indent for IF/LOOP/etc */ -static const int indent_spaces = 3; - - -struct dump_ctx -{ - struct tgsi_iterate_context iter; - - uint instno; - int indent; - - uint indentation; - - void (*printf)(struct dump_ctx *ctx, const char *format, ...); -}; - -static void -dump_ctx_printf(struct dump_ctx *ctx, const char *format, ...) -{ - va_list ap; - (void)ctx; - va_start(ap, format); - _debug_vprintf(format, ap); - va_end(ap); -} - -static void -dump_enum( - struct dump_ctx *ctx, - uint e, - const char **enums, - uint enum_count ) -{ - if (e >= enum_count) - ctx->printf( ctx, "%u", e ); - else - ctx->printf( ctx, "%s", enums[e] ); -} - -#define EOL() ctx->printf( ctx, "\n" ) -#define TXT(S) ctx->printf( ctx, "%s", S ) -#define CHR(C) ctx->printf( ctx, "%c", C ) -#define UIX(I) ctx->printf( ctx, "0x%x", I ) -#define UID(I) ctx->printf( ctx, "%u", I ) -#define INSTID(I) ctx->printf( ctx, "% 3u", I ) -#define SID(I) ctx->printf( ctx, "%d", I ) -#define FLT(F) ctx->printf( ctx, "%10.4f", F ) -#define ENM(E,ENUMS) dump_enum( ctx, E, ENUMS, sizeof( ENUMS ) / sizeof( *ENUMS ) ) - -const char * -tgsi_swizzle_names[4] = -{ - "x", - "y", - "z", - "w" -}; - -static void -_dump_register_src( - struct dump_ctx *ctx, - const struct tgsi_full_src_register *src ) -{ - ENM(src->Register.File, tgsi_file_names); - if (src->Register.Dimension) { - if (src->Dimension.Indirect) { - CHR( '[' ); - ENM( src->DimIndirect.File, tgsi_file_names ); - CHR( '[' ); - SID( src->DimIndirect.Index ); - TXT( "]." ); - ENM( src->DimIndirect.SwizzleX, tgsi_swizzle_names ); - if (src->Dimension.Index != 0) { - if (src->Dimension.Index > 0) - CHR( '+' ); - SID( src->Dimension.Index ); - } - CHR( ']' ); - } else { - CHR('['); - SID(src->Dimension.Index); - CHR(']'); - } - } - if (src->Register.Indirect) { - CHR( '[' ); - ENM( src->Indirect.File, tgsi_file_names ); - CHR( '[' ); - SID( src->Indirect.Index ); - TXT( "]." ); - ENM( src->Indirect.SwizzleX, tgsi_swizzle_names ); - if (src->Register.Index != 0) { - if (src->Register.Index > 0) - CHR( '+' ); - SID( src->Register.Index ); - } - CHR( ']' ); - } else { - CHR( '[' ); - SID( src->Register.Index ); - CHR( ']' ); - } -} - - -static void -_dump_register_dst( - struct dump_ctx *ctx, - const struct tgsi_full_dst_register *dst ) -{ - ENM(dst->Register.File, tgsi_file_names); - if (dst->Register.Dimension) { - if (dst->Dimension.Indirect) { - CHR( '[' ); - ENM( dst->DimIndirect.File, tgsi_file_names ); - CHR( '[' ); - SID( dst->DimIndirect.Index ); - TXT( "]." ); - ENM( dst->DimIndirect.SwizzleX, tgsi_swizzle_names ); - if (dst->Dimension.Index != 0) { - if (dst->Dimension.Index > 0) - CHR( '+' ); - SID( dst->Dimension.Index ); - } - CHR( ']' ); - } else { - CHR('['); - SID(dst->Dimension.Index); - CHR(']'); - } - } - if (dst->Register.Indirect) { - CHR( '[' ); - ENM( dst->Indirect.File, tgsi_file_names ); - CHR( '[' ); - SID( dst->Indirect.Index ); - TXT( "]." ); - ENM( dst->Indirect.SwizzleX, tgsi_swizzle_names ); - if (dst->Register.Index != 0) { - if (dst->Register.Index > 0) - CHR( '+' ); - SID( dst->Register.Index ); - } - CHR( ']' ); - } else { - CHR( '[' ); - SID( dst->Register.Index ); - CHR( ']' ); - } -} -static void -_dump_writemask( - struct dump_ctx *ctx, - uint writemask ) -{ - if (writemask != TGSI_WRITEMASK_XYZW) { - CHR( '.' ); - if (writemask & TGSI_WRITEMASK_X) - CHR( 'x' ); - if (writemask & TGSI_WRITEMASK_Y) - CHR( 'y' ); - if (writemask & TGSI_WRITEMASK_Z) - CHR( 'z' ); - if (writemask & TGSI_WRITEMASK_W) - CHR( 'w' ); - } -} - -static void -dump_imm_data(struct tgsi_iterate_context *iter, - union tgsi_immediate_data *data, - unsigned num_tokens, - unsigned data_type) -{ - struct dump_ctx *ctx = (struct dump_ctx *)iter; - unsigned i ; - - TXT( " {" ); - - assert( num_tokens <= 4 ); - for (i = 0; i < num_tokens; i++) { - switch (data_type) { - case TGSI_IMM_FLOAT32: - FLT( data[i].Float ); - break; - case TGSI_IMM_UINT32: - UID(data[i].Uint); - break; - case TGSI_IMM_INT32: - SID(data[i].Int); - break; - default: - assert( 0 ); - } - - if (i < num_tokens - 1) - TXT( ", " ); - } - TXT( "}" ); -} - -static boolean -iter_declaration( - struct tgsi_iterate_context *iter, - struct tgsi_full_declaration *decl ) -{ - struct dump_ctx *ctx = (struct dump_ctx *)iter; - - TXT( "DCL " ); - - ENM(decl->Declaration.File, tgsi_file_names); - - /* all geometry shader inputs are two dimensional */ - if (decl->Declaration.File == TGSI_FILE_INPUT && - iter->processor.Processor == TGSI_PROCESSOR_GEOMETRY) { - TXT("[]"); - } - - if (decl->Declaration.Dimension) { - CHR('['); - SID(decl->Dim.Index2D); - CHR(']'); - } - - CHR('['); - SID(decl->Range.First); - if (decl->Range.First != decl->Range.Last) { - TXT(".."); - SID(decl->Range.Last); - } - CHR(']'); - - _dump_writemask( - ctx, - decl->Declaration.UsageMask ); - - if (decl->Declaration.Semantic) { - TXT( ", " ); - ENM( decl->Semantic.Name, tgsi_semantic_names ); - if (decl->Semantic.Index != 0 || - decl->Semantic.Name == TGSI_SEMANTIC_GENERIC) { - CHR( '[' ); - UID( decl->Semantic.Index ); - CHR( ']' ); - } - } - - if (decl->Declaration.File == TGSI_FILE_RESOURCE) { - TXT(", "); - ENM(decl->Resource.Resource, tgsi_texture_names); - TXT(", "); - if ((decl->Resource.ReturnTypeX == decl->Resource.ReturnTypeY) && - (decl->Resource.ReturnTypeX == decl->Resource.ReturnTypeZ) && - (decl->Resource.ReturnTypeX == decl->Resource.ReturnTypeW)) { - ENM(decl->Resource.ReturnTypeX, tgsi_type_names); - } else { - ENM(decl->Resource.ReturnTypeX, tgsi_type_names); - TXT(", "); - ENM(decl->Resource.ReturnTypeY, tgsi_type_names); - TXT(", "); - ENM(decl->Resource.ReturnTypeZ, tgsi_type_names); - TXT(", "); - ENM(decl->Resource.ReturnTypeW, tgsi_type_names); - } - - } - - if (iter->processor.Processor == TGSI_PROCESSOR_FRAGMENT && - decl->Declaration.File == TGSI_FILE_INPUT) - { - TXT( ", " ); - ENM( decl->Declaration.Interpolate, tgsi_interpolate_names ); - } - - if (decl->Declaration.Centroid) { - TXT( ", CENTROID" ); - } - - if (decl->Declaration.Invariant) { - TXT( ", INVARIANT" ); - } - - if (decl->Declaration.CylindricalWrap) { - TXT(", CYLWRAP_"); - if (decl->Declaration.CylindricalWrap & TGSI_CYLINDRICAL_WRAP_X) { - CHR('X'); - } - if (decl->Declaration.CylindricalWrap & TGSI_CYLINDRICAL_WRAP_Y) { - CHR('Y'); - } - if (decl->Declaration.CylindricalWrap & TGSI_CYLINDRICAL_WRAP_Z) { - CHR('Z'); - } - if (decl->Declaration.CylindricalWrap & TGSI_CYLINDRICAL_WRAP_W) { - CHR('W'); - } - } - - if (decl->Declaration.File == TGSI_FILE_IMMEDIATE_ARRAY) { - unsigned i; - char range_indent[4]; - - TXT(" {"); - - if (decl->Range.Last < 10) - range_indent[0] = '\0'; - else if (decl->Range.Last < 100) { - range_indent[0] = ' '; - range_indent[1] = '\0'; - } else if (decl->Range.Last < 1000) { - range_indent[0] = ' '; - range_indent[1] = ' '; - range_indent[2] = '\0'; - } else { - range_indent[0] = ' '; - range_indent[1] = ' '; - range_indent[2] = ' '; - range_indent[3] = '\0'; - } - - dump_imm_data(iter, decl->ImmediateData.u, - 4, TGSI_IMM_FLOAT32); - for(i = 1; i <= decl->Range.Last; ++i) { - /* indent by strlen of: - * "DCL IMMX[0..1] {" */ - CHR('\n'); - TXT( " " ); - TXT( range_indent ); - dump_imm_data(iter, decl->ImmediateData.u + i, - 4, TGSI_IMM_FLOAT32); - } - - TXT(" }"); - } - - EOL(); - - return TRUE; -} - -void -tgsi_dump_declaration( - const struct tgsi_full_declaration *decl ) -{ - struct dump_ctx ctx; - - ctx.printf = dump_ctx_printf; - - iter_declaration( &ctx.iter, (struct tgsi_full_declaration *)decl ); -} - -static boolean -iter_property( - struct tgsi_iterate_context *iter, - struct tgsi_full_property *prop ) -{ - int i; - struct dump_ctx *ctx = (struct dump_ctx *)iter; - - TXT( "PROPERTY " ); - ENM(prop->Property.PropertyName, tgsi_property_names); - - if (prop->Property.NrTokens > 1) - TXT(" "); - - for (i = 0; i < prop->Property.NrTokens - 1; ++i) { - switch (prop->Property.PropertyName) { - case TGSI_PROPERTY_GS_INPUT_PRIM: - case TGSI_PROPERTY_GS_OUTPUT_PRIM: - ENM(prop->u[i].Data, tgsi_primitive_names); - break; - case TGSI_PROPERTY_FS_COORD_ORIGIN: - ENM(prop->u[i].Data, tgsi_fs_coord_origin_names); - break; - case TGSI_PROPERTY_FS_COORD_PIXEL_CENTER: - ENM(prop->u[i].Data, tgsi_fs_coord_pixel_center_names); - break; - default: - SID( prop->u[i].Data ); - break; - } - if (i < prop->Property.NrTokens - 2) - TXT( ", " ); - } - EOL(); - - return TRUE; -} - -void tgsi_dump_property( - const struct tgsi_full_property *prop ) -{ - struct dump_ctx ctx; - - ctx.printf = dump_ctx_printf; - - iter_property( &ctx.iter, (struct tgsi_full_property *)prop ); -} - -static boolean -iter_immediate( - struct tgsi_iterate_context *iter, - struct tgsi_full_immediate *imm ) -{ - struct dump_ctx *ctx = (struct dump_ctx *) iter; - - TXT( "IMM " ); - ENM( imm->Immediate.DataType, tgsi_immediate_type_names ); - - dump_imm_data(iter, imm->u, imm->Immediate.NrTokens - 1, - imm->Immediate.DataType); - - EOL(); - - return TRUE; -} - -void -tgsi_dump_immediate( - const struct tgsi_full_immediate *imm ) -{ - struct dump_ctx ctx; - - ctx.printf = dump_ctx_printf; - - iter_immediate( &ctx.iter, (struct tgsi_full_immediate *)imm ); -} - -static boolean -iter_instruction( - struct tgsi_iterate_context *iter, - struct tgsi_full_instruction *inst ) -{ - struct dump_ctx *ctx = (struct dump_ctx *) iter; - uint instno = ctx->instno++; - const struct tgsi_opcode_info *info = tgsi_get_opcode_info( inst->Instruction.Opcode ); - uint i; - boolean first_reg = TRUE; - - INSTID( instno ); - TXT( ": " ); - - ctx->indent -= info->pre_dedent; - for(i = 0; (int)i < ctx->indent; ++i) - TXT( " " ); - ctx->indent += info->post_indent; - - if (inst->Instruction.Predicate) { - CHR( '(' ); - - if (inst->Predicate.Negate) - CHR( '!' ); - - TXT( "PRED[" ); - SID( inst->Predicate.Index ); - CHR( ']' ); - - if (inst->Predicate.SwizzleX != TGSI_SWIZZLE_X || - inst->Predicate.SwizzleY != TGSI_SWIZZLE_Y || - inst->Predicate.SwizzleZ != TGSI_SWIZZLE_Z || - inst->Predicate.SwizzleW != TGSI_SWIZZLE_W) { - CHR( '.' ); - ENM( inst->Predicate.SwizzleX, tgsi_swizzle_names ); - ENM( inst->Predicate.SwizzleY, tgsi_swizzle_names ); - ENM( inst->Predicate.SwizzleZ, tgsi_swizzle_names ); - ENM( inst->Predicate.SwizzleW, tgsi_swizzle_names ); - } - - TXT( ") " ); - } - - TXT( info->mnemonic ); - - switch (inst->Instruction.Saturate) { - case TGSI_SAT_NONE: - break; - case TGSI_SAT_ZERO_ONE: - TXT( "_SAT" ); - break; - case TGSI_SAT_MINUS_PLUS_ONE: - TXT( "_SATNV" ); - break; - default: - assert( 0 ); - } - - for (i = 0; i < inst->Instruction.NumDstRegs; i++) { - const struct tgsi_full_dst_register *dst = &inst->Dst[i]; - - if (!first_reg) - CHR( ',' ); - CHR( ' ' ); - - _dump_register_dst( ctx, dst ); - _dump_writemask( ctx, dst->Register.WriteMask ); - - first_reg = FALSE; - } - - for (i = 0; i < inst->Instruction.NumSrcRegs; i++) { - const struct tgsi_full_src_register *src = &inst->Src[i]; - - if (!first_reg) - CHR( ',' ); - CHR( ' ' ); - - if (src->Register.Negate) - CHR( '-' ); - if (src->Register.Absolute) - CHR( '|' ); - - _dump_register_src(ctx, src); - - if (src->Register.SwizzleX != TGSI_SWIZZLE_X || - src->Register.SwizzleY != TGSI_SWIZZLE_Y || - src->Register.SwizzleZ != TGSI_SWIZZLE_Z || - src->Register.SwizzleW != TGSI_SWIZZLE_W) { - CHR( '.' ); - ENM( src->Register.SwizzleX, tgsi_swizzle_names ); - ENM( src->Register.SwizzleY, tgsi_swizzle_names ); - ENM( src->Register.SwizzleZ, tgsi_swizzle_names ); - ENM( src->Register.SwizzleW, tgsi_swizzle_names ); - } - - if (src->Register.Absolute) - CHR( '|' ); - - first_reg = FALSE; - } - - if (inst->Instruction.Texture) { - TXT( ", " ); - ENM( inst->Texture.Texture, tgsi_texture_names ); - for (i = 0; i < inst->Texture.NumOffsets; i++) { - TXT( ", " ); - ENM( inst->TexOffsets[i].File, tgsi_file_names); - CHR( '[' ); - SID( inst->TexOffsets[i].Index ); - CHR( ']' ); - CHR( '.' ); - ENM( inst->TexOffsets[i].SwizzleX, tgsi_swizzle_names); - ENM( inst->TexOffsets[i].SwizzleY, tgsi_swizzle_names); - ENM( inst->TexOffsets[i].SwizzleZ, tgsi_swizzle_names); - } - } - - switch (inst->Instruction.Opcode) { - case TGSI_OPCODE_IF: - case TGSI_OPCODE_ELSE: - case TGSI_OPCODE_BGNLOOP: - case TGSI_OPCODE_ENDLOOP: - case TGSI_OPCODE_CAL: - TXT( " :" ); - UID( inst->Label.Label ); - break; - } - - /* update indentation */ - if (inst->Instruction.Opcode == TGSI_OPCODE_IF || - inst->Instruction.Opcode == TGSI_OPCODE_ELSE || - inst->Instruction.Opcode == TGSI_OPCODE_BGNLOOP) { - ctx->indentation += indent_spaces; - } - - EOL(); - - return TRUE; -} - -void -tgsi_dump_instruction( - const struct tgsi_full_instruction *inst, - uint instno ) -{ - struct dump_ctx ctx; - - ctx.instno = instno; - ctx.indent = 0; - ctx.printf = dump_ctx_printf; - ctx.indentation = 0; - - iter_instruction( &ctx.iter, (struct tgsi_full_instruction *)inst ); -} - -static boolean -prolog( - struct tgsi_iterate_context *iter ) -{ - struct dump_ctx *ctx = (struct dump_ctx *) iter; - ENM( iter->processor.Processor, tgsi_processor_type_names ); - EOL(); - return TRUE; -} - -void -tgsi_dump( - const struct tgsi_token *tokens, - uint flags ) -{ - struct dump_ctx ctx; - - ctx.iter.prolog = prolog; - ctx.iter.iterate_instruction = iter_instruction; - ctx.iter.iterate_declaration = iter_declaration; - ctx.iter.iterate_immediate = iter_immediate; - ctx.iter.iterate_property = iter_property; - ctx.iter.epilog = NULL; - - ctx.instno = 0; - ctx.indent = 0; - ctx.printf = dump_ctx_printf; - ctx.indentation = 0; - - tgsi_iterate_shader( tokens, &ctx.iter ); -} - -struct str_dump_ctx -{ - struct dump_ctx base; - char *str; - char *ptr; - int left; -}; - -static void -str_dump_ctx_printf(struct dump_ctx *ctx, const char *format, ...) -{ - struct str_dump_ctx *sctx = (struct str_dump_ctx *)ctx; - - if(sctx->left > 1) { - int written; - va_list ap; - va_start(ap, format); - written = util_vsnprintf(sctx->ptr, sctx->left, format, ap); - va_end(ap); - - /* Some complicated logic needed to handle the return value of - * vsnprintf: - */ - if (written > 0) { - written = MIN2(sctx->left, written); - sctx->ptr += written; - sctx->left -= written; - } - } -} - -void -tgsi_dump_str( - const struct tgsi_token *tokens, - uint flags, - char *str, - size_t size) -{ - struct str_dump_ctx ctx; - - ctx.base.iter.prolog = prolog; - ctx.base.iter.iterate_instruction = iter_instruction; - ctx.base.iter.iterate_declaration = iter_declaration; - ctx.base.iter.iterate_immediate = iter_immediate; - ctx.base.iter.iterate_property = iter_property; - ctx.base.iter.epilog = NULL; - - ctx.base.instno = 0; - ctx.base.indent = 0; - ctx.base.printf = &str_dump_ctx_printf; - ctx.base.indentation = 0; - - ctx.str = str; - ctx.str[0] = 0; - ctx.ptr = str; - ctx.left = (int)size; - - tgsi_iterate_shader( tokens, &ctx.base.iter ); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_dump.h b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_dump.h deleted file mode 100644 index adaef9d89fe..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_dump.h +++ /dev/null @@ -1,77 +0,0 @@ -/************************************************************************** - * - * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef TGSI_DUMP_H -#define TGSI_DUMP_H - -#include "pipe/p_compiler.h" -#include "pipe/p_defines.h" -#include "pipe/p_shader_tokens.h" - -#if defined __cplusplus -extern "C" { -#endif - -void -tgsi_dump_str( - const struct tgsi_token *tokens, - uint flags, - char *str, - size_t size); - -void -tgsi_dump( - const struct tgsi_token *tokens, - uint flags ); - -struct tgsi_full_immediate; -struct tgsi_full_instruction; -struct tgsi_full_declaration; -struct tgsi_full_property; - -void -tgsi_dump_immediate( - const struct tgsi_full_immediate *imm ); - -void -tgsi_dump_instruction( - const struct tgsi_full_instruction *inst, - uint instno ); - -void -tgsi_dump_declaration( - const struct tgsi_full_declaration *decl ); - -void -tgsi_dump_property( - const struct tgsi_full_property *prop ); - -#if defined __cplusplus -} -#endif - -#endif /* TGSI_DUMP_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_exec.c b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_exec.c deleted file mode 100644 index c0bd2d04cd7..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ /dev/null @@ -1,4358 +0,0 @@ -/************************************************************************** - * - * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * Copyright 2009-2010 VMware, Inc. All rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * TGSI interpreter/executor. - * - * Flow control information: - * - * Since we operate on 'quads' (4 pixels or 4 vertices in parallel) - * flow control statements (IF/ELSE/ENDIF, LOOP/ENDLOOP) require special - * care since a condition may be true for some quad components but false - * for other components. - * - * We basically execute all statements (even if they're in the part of - * an IF/ELSE clause that's "not taken") and use a special mask to - * control writing to destination registers. This is the ExecMask. - * See store_dest(). - * - * The ExecMask is computed from three other masks (CondMask, LoopMask and - * ContMask) which are controlled by the flow control instructions (namely: - * (IF/ELSE/ENDIF, LOOP/ENDLOOP and CONT). - * - * - * Authors: - * Michal Krol - * Brian Paul - */ - -#include "pipe/p_compiler.h" -#include "pipe/p_state.h" -#include "pipe/p_shader_tokens.h" -#include "tgsi/tgsi_dump.h" -#include "tgsi/tgsi_parse.h" -#include "tgsi/tgsi_util.h" -#include "tgsi_exec.h" -#include "util/u_memory.h" -#include "util/u_math.h" - - -#define FAST_MATH 0 - -#define TILE_TOP_LEFT 0 -#define TILE_TOP_RIGHT 1 -#define TILE_BOTTOM_LEFT 2 -#define TILE_BOTTOM_RIGHT 3 - -static void -micro_abs(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->f[0] = fabsf(src->f[0]); - dst->f[1] = fabsf(src->f[1]); - dst->f[2] = fabsf(src->f[2]); - dst->f[3] = fabsf(src->f[3]); -} - -static void -micro_arl(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->i[0] = (int)floorf(src->f[0]); - dst->i[1] = (int)floorf(src->f[1]); - dst->i[2] = (int)floorf(src->f[2]); - dst->i[3] = (int)floorf(src->f[3]); -} - -static void -micro_arr(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->i[0] = (int)floorf(src->f[0] + 0.5f); - dst->i[1] = (int)floorf(src->f[1] + 0.5f); - dst->i[2] = (int)floorf(src->f[2] + 0.5f); - dst->i[3] = (int)floorf(src->f[3] + 0.5f); -} - -static void -micro_ceil(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->f[0] = ceilf(src->f[0]); - dst->f[1] = ceilf(src->f[1]); - dst->f[2] = ceilf(src->f[2]); - dst->f[3] = ceilf(src->f[3]); -} - -static void -micro_clamp(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1, - const union tgsi_exec_channel *src2) -{ - dst->f[0] = src0->f[0] < src1->f[0] ? src1->f[0] : src0->f[0] > src2->f[0] ? src2->f[0] : src0->f[0]; - dst->f[1] = src0->f[1] < src1->f[1] ? src1->f[1] : src0->f[1] > src2->f[1] ? src2->f[1] : src0->f[1]; - dst->f[2] = src0->f[2] < src1->f[2] ? src1->f[2] : src0->f[2] > src2->f[2] ? src2->f[2] : src0->f[2]; - dst->f[3] = src0->f[3] < src1->f[3] ? src1->f[3] : src0->f[3] > src2->f[3] ? src2->f[3] : src0->f[3]; -} - -static void -micro_cmp(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1, - const union tgsi_exec_channel *src2) -{ - dst->f[0] = src0->f[0] < 0.0f ? src1->f[0] : src2->f[0]; - dst->f[1] = src0->f[1] < 0.0f ? src1->f[1] : src2->f[1]; - dst->f[2] = src0->f[2] < 0.0f ? src1->f[2] : src2->f[2]; - dst->f[3] = src0->f[3] < 0.0f ? src1->f[3] : src2->f[3]; -} - -static void -micro_cnd(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1, - const union tgsi_exec_channel *src2) -{ - dst->f[0] = src2->f[0] > 0.5f ? src0->f[0] : src1->f[0]; - dst->f[1] = src2->f[1] > 0.5f ? src0->f[1] : src1->f[1]; - dst->f[2] = src2->f[2] > 0.5f ? src0->f[2] : src1->f[2]; - dst->f[3] = src2->f[3] > 0.5f ? src0->f[3] : src1->f[3]; -} - -static void -micro_cos(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->f[0] = cosf(src->f[0]); - dst->f[1] = cosf(src->f[1]); - dst->f[2] = cosf(src->f[2]); - dst->f[3] = cosf(src->f[3]); -} - -static void -micro_ddx(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->f[0] = - dst->f[1] = - dst->f[2] = - dst->f[3] = src->f[TILE_BOTTOM_RIGHT] - src->f[TILE_BOTTOM_LEFT]; -} - -static void -micro_ddy(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->f[0] = - dst->f[1] = - dst->f[2] = - dst->f[3] = src->f[TILE_BOTTOM_LEFT] - src->f[TILE_TOP_LEFT]; -} - -static void -micro_exp2(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ -#if FAST_MATH - dst->f[0] = util_fast_exp2(src->f[0]); - dst->f[1] = util_fast_exp2(src->f[1]); - dst->f[2] = util_fast_exp2(src->f[2]); - dst->f[3] = util_fast_exp2(src->f[3]); -#else -#if DEBUG - /* Inf is okay for this instruction, so clamp it to silence assertions. */ - uint i; - union tgsi_exec_channel clamped; - - for (i = 0; i < 4; i++) { - if (src->f[i] > 127.99999f) { - clamped.f[i] = 127.99999f; - } else if (src->f[i] < -126.99999f) { - clamped.f[i] = -126.99999f; - } else { - clamped.f[i] = src->f[i]; - } - } - src = &clamped; -#endif /* DEBUG */ - - dst->f[0] = powf(2.0f, src->f[0]); - dst->f[1] = powf(2.0f, src->f[1]); - dst->f[2] = powf(2.0f, src->f[2]); - dst->f[3] = powf(2.0f, src->f[3]); -#endif /* FAST_MATH */ -} - -static void -micro_flr(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->f[0] = floorf(src->f[0]); - dst->f[1] = floorf(src->f[1]); - dst->f[2] = floorf(src->f[2]); - dst->f[3] = floorf(src->f[3]); -} - -static void -micro_frc(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->f[0] = src->f[0] - floorf(src->f[0]); - dst->f[1] = src->f[1] - floorf(src->f[1]); - dst->f[2] = src->f[2] - floorf(src->f[2]); - dst->f[3] = src->f[3] - floorf(src->f[3]); -} - -static void -micro_iabs(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->i[0] = src->i[0] >= 0 ? src->i[0] : -src->i[0]; - dst->i[1] = src->i[1] >= 0 ? src->i[1] : -src->i[1]; - dst->i[2] = src->i[2] >= 0 ? src->i[2] : -src->i[2]; - dst->i[3] = src->i[3] >= 0 ? src->i[3] : -src->i[3]; -} - -static void -micro_ineg(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->i[0] = -src->i[0]; - dst->i[1] = -src->i[1]; - dst->i[2] = -src->i[2]; - dst->i[3] = -src->i[3]; -} - -static void -micro_lg2(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ -#if FAST_MATH - dst->f[0] = util_fast_log2(src->f[0]); - dst->f[1] = util_fast_log2(src->f[1]); - dst->f[2] = util_fast_log2(src->f[2]); - dst->f[3] = util_fast_log2(src->f[3]); -#else - dst->f[0] = logf(src->f[0]) * 1.442695f; - dst->f[1] = logf(src->f[1]) * 1.442695f; - dst->f[2] = logf(src->f[2]) * 1.442695f; - dst->f[3] = logf(src->f[3]) * 1.442695f; -#endif -} - -static void -micro_lrp(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1, - const union tgsi_exec_channel *src2) -{ - dst->f[0] = src0->f[0] * (src1->f[0] - src2->f[0]) + src2->f[0]; - dst->f[1] = src0->f[1] * (src1->f[1] - src2->f[1]) + src2->f[1]; - dst->f[2] = src0->f[2] * (src1->f[2] - src2->f[2]) + src2->f[2]; - dst->f[3] = src0->f[3] * (src1->f[3] - src2->f[3]) + src2->f[3]; -} - -static void -micro_mad(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1, - const union tgsi_exec_channel *src2) -{ - dst->f[0] = src0->f[0] * src1->f[0] + src2->f[0]; - dst->f[1] = src0->f[1] * src1->f[1] + src2->f[1]; - dst->f[2] = src0->f[2] * src1->f[2] + src2->f[2]; - dst->f[3] = src0->f[3] * src1->f[3] + src2->f[3]; -} - -static void -micro_mov(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->u[0] = src->u[0]; - dst->u[1] = src->u[1]; - dst->u[2] = src->u[2]; - dst->u[3] = src->u[3]; -} - -static void -micro_rcp(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ -#if 0 /* for debugging */ - assert(src->f[0] != 0.0f); - assert(src->f[1] != 0.0f); - assert(src->f[2] != 0.0f); - assert(src->f[3] != 0.0f); -#endif - dst->f[0] = 1.0f / src->f[0]; - dst->f[1] = 1.0f / src->f[1]; - dst->f[2] = 1.0f / src->f[2]; - dst->f[3] = 1.0f / src->f[3]; -} - -static void -micro_rnd(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->f[0] = floorf(src->f[0] + 0.5f); - dst->f[1] = floorf(src->f[1] + 0.5f); - dst->f[2] = floorf(src->f[2] + 0.5f); - dst->f[3] = floorf(src->f[3] + 0.5f); -} - -static void -micro_rsq(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ -#if 0 /* for debugging */ - assert(src->f[0] != 0.0f); - assert(src->f[1] != 0.0f); - assert(src->f[2] != 0.0f); - assert(src->f[3] != 0.0f); -#endif - dst->f[0] = 1.0f / sqrtf(fabsf(src->f[0])); - dst->f[1] = 1.0f / sqrtf(fabsf(src->f[1])); - dst->f[2] = 1.0f / sqrtf(fabsf(src->f[2])); - dst->f[3] = 1.0f / sqrtf(fabsf(src->f[3])); -} - -static void -micro_seq(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->f[0] = src0->f[0] == src1->f[0] ? 1.0f : 0.0f; - dst->f[1] = src0->f[1] == src1->f[1] ? 1.0f : 0.0f; - dst->f[2] = src0->f[2] == src1->f[2] ? 1.0f : 0.0f; - dst->f[3] = src0->f[3] == src1->f[3] ? 1.0f : 0.0f; -} - -static void -micro_sge(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->f[0] = src0->f[0] >= src1->f[0] ? 1.0f : 0.0f; - dst->f[1] = src0->f[1] >= src1->f[1] ? 1.0f : 0.0f; - dst->f[2] = src0->f[2] >= src1->f[2] ? 1.0f : 0.0f; - dst->f[3] = src0->f[3] >= src1->f[3] ? 1.0f : 0.0f; -} - -static void -micro_sgn(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->f[0] = src->f[0] < 0.0f ? -1.0f : src->f[0] > 0.0f ? 1.0f : 0.0f; - dst->f[1] = src->f[1] < 0.0f ? -1.0f : src->f[1] > 0.0f ? 1.0f : 0.0f; - dst->f[2] = src->f[2] < 0.0f ? -1.0f : src->f[2] > 0.0f ? 1.0f : 0.0f; - dst->f[3] = src->f[3] < 0.0f ? -1.0f : src->f[3] > 0.0f ? 1.0f : 0.0f; -} - -static void -micro_isgn(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->i[0] = src->i[0] < 0 ? -1 : src->i[0] > 0 ? 1 : 0; - dst->i[1] = src->i[1] < 0 ? -1 : src->i[1] > 0 ? 1 : 0; - dst->i[2] = src->i[2] < 0 ? -1 : src->i[2] > 0 ? 1 : 0; - dst->i[3] = src->i[3] < 0 ? -1 : src->i[3] > 0 ? 1 : 0; -} - -static void -micro_sgt(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->f[0] = src0->f[0] > src1->f[0] ? 1.0f : 0.0f; - dst->f[1] = src0->f[1] > src1->f[1] ? 1.0f : 0.0f; - dst->f[2] = src0->f[2] > src1->f[2] ? 1.0f : 0.0f; - dst->f[3] = src0->f[3] > src1->f[3] ? 1.0f : 0.0f; -} - -static void -micro_sin(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->f[0] = sinf(src->f[0]); - dst->f[1] = sinf(src->f[1]); - dst->f[2] = sinf(src->f[2]); - dst->f[3] = sinf(src->f[3]); -} - -static void -micro_sle(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->f[0] = src0->f[0] <= src1->f[0] ? 1.0f : 0.0f; - dst->f[1] = src0->f[1] <= src1->f[1] ? 1.0f : 0.0f; - dst->f[2] = src0->f[2] <= src1->f[2] ? 1.0f : 0.0f; - dst->f[3] = src0->f[3] <= src1->f[3] ? 1.0f : 0.0f; -} - -static void -micro_slt(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->f[0] = src0->f[0] < src1->f[0] ? 1.0f : 0.0f; - dst->f[1] = src0->f[1] < src1->f[1] ? 1.0f : 0.0f; - dst->f[2] = src0->f[2] < src1->f[2] ? 1.0f : 0.0f; - dst->f[3] = src0->f[3] < src1->f[3] ? 1.0f : 0.0f; -} - -static void -micro_sne(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->f[0] = src0->f[0] != src1->f[0] ? 1.0f : 0.0f; - dst->f[1] = src0->f[1] != src1->f[1] ? 1.0f : 0.0f; - dst->f[2] = src0->f[2] != src1->f[2] ? 1.0f : 0.0f; - dst->f[3] = src0->f[3] != src1->f[3] ? 1.0f : 0.0f; -} - -static void -micro_sfl(union tgsi_exec_channel *dst) -{ - dst->f[0] = 0.0f; - dst->f[1] = 0.0f; - dst->f[2] = 0.0f; - dst->f[3] = 0.0f; -} - -static void -micro_str(union tgsi_exec_channel *dst) -{ - dst->f[0] = 1.0f; - dst->f[1] = 1.0f; - dst->f[2] = 1.0f; - dst->f[3] = 1.0f; -} - -static void -micro_trunc(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->f[0] = (float)(int)src->f[0]; - dst->f[1] = (float)(int)src->f[1]; - dst->f[2] = (float)(int)src->f[2]; - dst->f[3] = (float)(int)src->f[3]; -} - - -#define CHAN_X 0 -#define CHAN_Y 1 -#define CHAN_Z 2 -#define CHAN_W 3 - -enum tgsi_exec_datatype { - TGSI_EXEC_DATA_FLOAT, - TGSI_EXEC_DATA_INT, - TGSI_EXEC_DATA_UINT -}; - -/* - * Shorthand locations of various utility registers (_I = Index, _C = Channel) - */ -#define TEMP_KILMASK_I TGSI_EXEC_TEMP_KILMASK_I -#define TEMP_KILMASK_C TGSI_EXEC_TEMP_KILMASK_C -#define TEMP_OUTPUT_I TGSI_EXEC_TEMP_OUTPUT_I -#define TEMP_OUTPUT_C TGSI_EXEC_TEMP_OUTPUT_C -#define TEMP_PRIMITIVE_I TGSI_EXEC_TEMP_PRIMITIVE_I -#define TEMP_PRIMITIVE_C TGSI_EXEC_TEMP_PRIMITIVE_C - - -/** The execution mask depends on the conditional mask and the loop mask */ -#define UPDATE_EXEC_MASK(MACH) \ - MACH->ExecMask = MACH->CondMask & MACH->LoopMask & MACH->ContMask & MACH->Switch.mask & MACH->FuncMask - - -static const union tgsi_exec_channel ZeroVec = - { { 0.0, 0.0, 0.0, 0.0 } }; - -static const union tgsi_exec_channel OneVec = { - {1.0f, 1.0f, 1.0f, 1.0f} -}; - -static const union tgsi_exec_channel P128Vec = { - {128.0f, 128.0f, 128.0f, 128.0f} -}; - -static const union tgsi_exec_channel M128Vec = { - {-128.0f, -128.0f, -128.0f, -128.0f} -}; - - -/** - * Assert that none of the float values in 'chan' are infinite or NaN. - * NaN and Inf may occur normally during program execution and should - * not lead to crashes, etc. But when debugging, it's helpful to catch - * them. - */ -static INLINE void -check_inf_or_nan(const union tgsi_exec_channel *chan) -{ - assert(!util_is_inf_or_nan((chan)->f[0])); - assert(!util_is_inf_or_nan((chan)->f[1])); - assert(!util_is_inf_or_nan((chan)->f[2])); - assert(!util_is_inf_or_nan((chan)->f[3])); -} - - -#ifdef DEBUG -static void -print_chan(const char *msg, const union tgsi_exec_channel *chan) -{ - debug_printf("%s = {%f, %f, %f, %f}\n", - msg, chan->f[0], chan->f[1], chan->f[2], chan->f[3]); -} -#endif - - -#ifdef DEBUG -static void -print_temp(const struct tgsi_exec_machine *mach, uint index) -{ - const struct tgsi_exec_vector *tmp = &mach->Temps[index]; - int i; - debug_printf("Temp[%u] =\n", index); - for (i = 0; i < 4; i++) { - debug_printf(" %c: { %f, %f, %f, %f }\n", - "XYZW"[i], - tmp->xyzw[i].f[0], - tmp->xyzw[i].f[1], - tmp->xyzw[i].f[2], - tmp->xyzw[i].f[3]); - } -} -#endif - - -void -tgsi_exec_set_constant_buffers(struct tgsi_exec_machine *mach, - unsigned num_bufs, - const void **bufs, - const unsigned *buf_sizes) -{ - unsigned i; - - for (i = 0; i < num_bufs; i++) { - mach->Consts[i] = bufs[i]; - mach->ConstsSize[i] = buf_sizes[i]; - } -} - - -/** - * Check if there's a potential src/dst register data dependency when - * using SOA execution. - * Example: - * MOV T, T.yxwz; - * This would expand into: - * MOV t0, t1; - * MOV t1, t0; - * MOV t2, t3; - * MOV t3, t2; - * The second instruction will have the wrong value for t0 if executed as-is. - */ -boolean -tgsi_check_soa_dependencies(const struct tgsi_full_instruction *inst) -{ - uint i, chan; - - uint writemask = inst->Dst[0].Register.WriteMask; - if (writemask == TGSI_WRITEMASK_X || - writemask == TGSI_WRITEMASK_Y || - writemask == TGSI_WRITEMASK_Z || - writemask == TGSI_WRITEMASK_W || - writemask == TGSI_WRITEMASK_NONE) { - /* no chance of data dependency */ - return FALSE; - } - - /* loop over src regs */ - for (i = 0; i < inst->Instruction.NumSrcRegs; i++) { - if ((inst->Src[i].Register.File == - inst->Dst[0].Register.File) && - ((inst->Src[i].Register.Index == - inst->Dst[0].Register.Index) || - inst->Src[i].Register.Indirect || - inst->Dst[0].Register.Indirect)) { - /* loop over dest channels */ - uint channelsWritten = 0x0; - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - /* check if we're reading a channel that's been written */ - uint swizzle = tgsi_util_get_full_src_register_swizzle(&inst->Src[i], chan); - if (channelsWritten & (1 << swizzle)) { - return TRUE; - } - - channelsWritten |= (1 << chan); - } - } - } - } - return FALSE; -} - - -/** - * Initialize machine state by expanding tokens to full instructions, - * allocating temporary storage, setting up constants, etc. - * After this, we can call tgsi_exec_machine_run() many times. - */ -void -tgsi_exec_machine_bind_shader( - struct tgsi_exec_machine *mach, - const struct tgsi_token *tokens, - uint numSamplers, - struct tgsi_sampler **samplers) -{ - uint k; - struct tgsi_parse_context parse; - struct tgsi_full_instruction *instructions; - struct tgsi_full_declaration *declarations; - uint maxInstructions = 10, numInstructions = 0; - uint maxDeclarations = 10, numDeclarations = 0; - -#if 0 - tgsi_dump(tokens, 0); -#endif - - util_init_math(); - - if (numSamplers) { - assert(samplers); - } - - mach->Tokens = tokens; - mach->Samplers = samplers; - - if (!tokens) { - /* unbind and free all */ - if (mach->Declarations) { - FREE( mach->Declarations ); - } - mach->Declarations = NULL; - mach->NumDeclarations = 0; - - if (mach->Instructions) { - FREE( mach->Instructions ); - } - mach->Instructions = NULL; - mach->NumInstructions = 0; - - return; - } - - k = tgsi_parse_init (&parse, mach->Tokens); - if (k != TGSI_PARSE_OK) { - debug_printf( "Problem parsing!\n" ); - return; - } - - mach->Processor = parse.FullHeader.Processor.Processor; - mach->ImmLimit = 0; - - if (mach->Processor == TGSI_PROCESSOR_GEOMETRY && - !mach->UsedGeometryShader) { - struct tgsi_exec_vector *inputs; - struct tgsi_exec_vector *outputs; - - inputs = align_malloc(sizeof(struct tgsi_exec_vector) * - TGSI_MAX_PRIM_VERTICES * PIPE_MAX_ATTRIBS, - 16); - - if (!inputs) - return; - - outputs = align_malloc(sizeof(struct tgsi_exec_vector) * - TGSI_MAX_TOTAL_VERTICES, 16); - - if (!outputs) { - align_free(inputs); - return; - } - - align_free(mach->Inputs); - align_free(mach->Outputs); - - mach->Inputs = inputs; - mach->Outputs = outputs; - mach->UsedGeometryShader = TRUE; - } - - declarations = (struct tgsi_full_declaration *) - MALLOC( maxDeclarations * sizeof(struct tgsi_full_declaration) ); - - if (!declarations) { - return; - } - - instructions = (struct tgsi_full_instruction *) - MALLOC( maxInstructions * sizeof(struct tgsi_full_instruction) ); - - if (!instructions) { - FREE( declarations ); - return; - } - - while( !tgsi_parse_end_of_tokens( &parse ) ) { - uint i; - - tgsi_parse_token( &parse ); - switch( parse.FullToken.Token.Type ) { - case TGSI_TOKEN_TYPE_DECLARATION: - /* save expanded declaration */ - if (numDeclarations == maxDeclarations) { - declarations = REALLOC(declarations, - maxDeclarations - * sizeof(struct tgsi_full_declaration), - (maxDeclarations + 10) - * sizeof(struct tgsi_full_declaration)); - maxDeclarations += 10; - } - if (parse.FullToken.FullDeclaration.Declaration.File == TGSI_FILE_OUTPUT) { - unsigned reg; - for (reg = parse.FullToken.FullDeclaration.Range.First; - reg <= parse.FullToken.FullDeclaration.Range.Last; - ++reg) { - ++mach->NumOutputs; - } - } - if (parse.FullToken.FullDeclaration.Declaration.File == - TGSI_FILE_IMMEDIATE_ARRAY) { - unsigned reg; - struct tgsi_full_declaration *decl = - &parse.FullToken.FullDeclaration; - debug_assert(decl->Range.Last < TGSI_EXEC_NUM_IMMEDIATES); - for (reg = decl->Range.First; reg <= decl->Range.Last; ++reg) { - for( i = 0; i < 4; i++ ) { - int idx = reg * 4 + i; - mach->ImmArray[reg][i] = decl->ImmediateData.u[idx].Float; - } - } - } - memcpy(declarations + numDeclarations, - &parse.FullToken.FullDeclaration, - sizeof(declarations[0])); - numDeclarations++; - break; - - case TGSI_TOKEN_TYPE_IMMEDIATE: - { - uint size = parse.FullToken.FullImmediate.Immediate.NrTokens - 1; - assert( size <= 4 ); - assert( mach->ImmLimit + 1 <= TGSI_EXEC_NUM_IMMEDIATES ); - - for( i = 0; i < size; i++ ) { - mach->Imms[mach->ImmLimit][i] = - parse.FullToken.FullImmediate.u[i].Float; - } - mach->ImmLimit += 1; - } - break; - - case TGSI_TOKEN_TYPE_INSTRUCTION: - - /* save expanded instruction */ - if (numInstructions == maxInstructions) { - instructions = REALLOC(instructions, - maxInstructions - * sizeof(struct tgsi_full_instruction), - (maxInstructions + 10) - * sizeof(struct tgsi_full_instruction)); - maxInstructions += 10; - } - - memcpy(instructions + numInstructions, - &parse.FullToken.FullInstruction, - sizeof(instructions[0])); - - numInstructions++; - break; - - case TGSI_TOKEN_TYPE_PROPERTY: - break; - - default: - assert( 0 ); - } - } - tgsi_parse_free (&parse); - - if (mach->Declarations) { - FREE( mach->Declarations ); - } - mach->Declarations = declarations; - mach->NumDeclarations = numDeclarations; - - if (mach->Instructions) { - FREE( mach->Instructions ); - } - mach->Instructions = instructions; - mach->NumInstructions = numInstructions; -} - - -struct tgsi_exec_machine * -tgsi_exec_machine_create( void ) -{ - struct tgsi_exec_machine *mach; - uint i; - - mach = align_malloc( sizeof *mach, 16 ); - if (!mach) - goto fail; - - memset(mach, 0, sizeof(*mach)); - - mach->Addrs = &mach->Temps[TGSI_EXEC_TEMP_ADDR]; - mach->MaxGeometryShaderOutputs = TGSI_MAX_TOTAL_VERTICES; - mach->Predicates = &mach->Temps[TGSI_EXEC_TEMP_P0]; - - mach->Inputs = align_malloc(sizeof(struct tgsi_exec_vector) * PIPE_MAX_ATTRIBS, 16); - mach->Outputs = align_malloc(sizeof(struct tgsi_exec_vector) * PIPE_MAX_ATTRIBS, 16); - if (!mach->Inputs || !mach->Outputs) - goto fail; - - /* Setup constants needed by the SSE2 executor. */ - for( i = 0; i < 4; i++ ) { - mach->Temps[TGSI_EXEC_TEMP_00000000_I].xyzw[TGSI_EXEC_TEMP_00000000_C].u[i] = 0x00000000; - mach->Temps[TGSI_EXEC_TEMP_7FFFFFFF_I].xyzw[TGSI_EXEC_TEMP_7FFFFFFF_C].u[i] = 0x7FFFFFFF; - mach->Temps[TGSI_EXEC_TEMP_80000000_I].xyzw[TGSI_EXEC_TEMP_80000000_C].u[i] = 0x80000000; - mach->Temps[TGSI_EXEC_TEMP_FFFFFFFF_I].xyzw[TGSI_EXEC_TEMP_FFFFFFFF_C].u[i] = 0xFFFFFFFF; /* not used */ - mach->Temps[TGSI_EXEC_TEMP_ONE_I].xyzw[TGSI_EXEC_TEMP_ONE_C].f[i] = 1.0f; - mach->Temps[TGSI_EXEC_TEMP_TWO_I].xyzw[TGSI_EXEC_TEMP_TWO_C].f[i] = 2.0f; /* not used */ - mach->Temps[TGSI_EXEC_TEMP_128_I].xyzw[TGSI_EXEC_TEMP_128_C].f[i] = 128.0f; - mach->Temps[TGSI_EXEC_TEMP_MINUS_128_I].xyzw[TGSI_EXEC_TEMP_MINUS_128_C].f[i] = -128.0f; - mach->Temps[TGSI_EXEC_TEMP_THREE_I].xyzw[TGSI_EXEC_TEMP_THREE_C].f[i] = 3.0f; - mach->Temps[TGSI_EXEC_TEMP_HALF_I].xyzw[TGSI_EXEC_TEMP_HALF_C].f[i] = 0.5f; - } - -#ifdef DEBUG - /* silence warnings */ - (void) print_chan; - (void) print_temp; -#endif - - return mach; - -fail: - if (mach) { - align_free(mach->Inputs); - align_free(mach->Outputs); - align_free(mach); - } - return NULL; -} - - -void -tgsi_exec_machine_destroy(struct tgsi_exec_machine *mach) -{ - if (mach) { - if (mach->Instructions) - FREE(mach->Instructions); - if (mach->Declarations) - FREE(mach->Declarations); - - align_free(mach->Inputs); - align_free(mach->Outputs); - - align_free(mach); - } -} - -static void -micro_add(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->f[0] = src0->f[0] + src1->f[0]; - dst->f[1] = src0->f[1] + src1->f[1]; - dst->f[2] = src0->f[2] + src1->f[2]; - dst->f[3] = src0->f[3] + src1->f[3]; -} - -static void -micro_div( - union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1 ) -{ - if (src1->f[0] != 0) { - dst->f[0] = src0->f[0] / src1->f[0]; - } - if (src1->f[1] != 0) { - dst->f[1] = src0->f[1] / src1->f[1]; - } - if (src1->f[2] != 0) { - dst->f[2] = src0->f[2] / src1->f[2]; - } - if (src1->f[3] != 0) { - dst->f[3] = src0->f[3] / src1->f[3]; - } -} - -static void -micro_rcc(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - uint i; - - for (i = 0; i < 4; i++) { - float recip = 1.0f / src->f[i]; - - if (recip > 0.0f) { - if (recip > 1.884467e+019f) { - dst->f[i] = 1.884467e+019f; - } - else if (recip < 5.42101e-020f) { - dst->f[i] = 5.42101e-020f; - } - else { - dst->f[i] = recip; - } - } - else { - if (recip < -1.884467e+019f) { - dst->f[i] = -1.884467e+019f; - } - else if (recip > -5.42101e-020f) { - dst->f[i] = -5.42101e-020f; - } - else { - dst->f[i] = recip; - } - } - } -} - -static void -micro_lt( - union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1, - const union tgsi_exec_channel *src2, - const union tgsi_exec_channel *src3 ) -{ - dst->f[0] = src0->f[0] < src1->f[0] ? src2->f[0] : src3->f[0]; - dst->f[1] = src0->f[1] < src1->f[1] ? src2->f[1] : src3->f[1]; - dst->f[2] = src0->f[2] < src1->f[2] ? src2->f[2] : src3->f[2]; - dst->f[3] = src0->f[3] < src1->f[3] ? src2->f[3] : src3->f[3]; -} - -static void -micro_max(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->f[0] = src0->f[0] > src1->f[0] ? src0->f[0] : src1->f[0]; - dst->f[1] = src0->f[1] > src1->f[1] ? src0->f[1] : src1->f[1]; - dst->f[2] = src0->f[2] > src1->f[2] ? src0->f[2] : src1->f[2]; - dst->f[3] = src0->f[3] > src1->f[3] ? src0->f[3] : src1->f[3]; -} - -static void -micro_min(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->f[0] = src0->f[0] < src1->f[0] ? src0->f[0] : src1->f[0]; - dst->f[1] = src0->f[1] < src1->f[1] ? src0->f[1] : src1->f[1]; - dst->f[2] = src0->f[2] < src1->f[2] ? src0->f[2] : src1->f[2]; - dst->f[3] = src0->f[3] < src1->f[3] ? src0->f[3] : src1->f[3]; -} - -static void -micro_mul(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->f[0] = src0->f[0] * src1->f[0]; - dst->f[1] = src0->f[1] * src1->f[1]; - dst->f[2] = src0->f[2] * src1->f[2]; - dst->f[3] = src0->f[3] * src1->f[3]; -} - -static void -micro_neg( - union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src ) -{ - dst->f[0] = -src->f[0]; - dst->f[1] = -src->f[1]; - dst->f[2] = -src->f[2]; - dst->f[3] = -src->f[3]; -} - -static void -micro_pow( - union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1 ) -{ -#if FAST_MATH - dst->f[0] = util_fast_pow( src0->f[0], src1->f[0] ); - dst->f[1] = util_fast_pow( src0->f[1], src1->f[1] ); - dst->f[2] = util_fast_pow( src0->f[2], src1->f[2] ); - dst->f[3] = util_fast_pow( src0->f[3], src1->f[3] ); -#else - dst->f[0] = powf( src0->f[0], src1->f[0] ); - dst->f[1] = powf( src0->f[1], src1->f[1] ); - dst->f[2] = powf( src0->f[2], src1->f[2] ); - dst->f[3] = powf( src0->f[3], src1->f[3] ); -#endif -} - -static void -micro_sub(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->f[0] = src0->f[0] - src1->f[0]; - dst->f[1] = src0->f[1] - src1->f[1]; - dst->f[2] = src0->f[2] - src1->f[2]; - dst->f[3] = src0->f[3] - src1->f[3]; -} - -static void -fetch_src_file_channel(const struct tgsi_exec_machine *mach, - const uint chan_index, - const uint file, - const uint swizzle, - const union tgsi_exec_channel *index, - const union tgsi_exec_channel *index2D, - union tgsi_exec_channel *chan) -{ - uint i; - - assert(swizzle < 4); - - switch (file) { - case TGSI_FILE_CONSTANT: - for (i = 0; i < QUAD_SIZE; i++) { - assert(index2D->i[i] >= 0 && index2D->i[i] < PIPE_MAX_CONSTANT_BUFFERS); - assert(mach->Consts[index2D->i[i]]); - - if (index->i[i] < 0) { - chan->u[i] = 0; - } else { - /* NOTE: copying the const value as a uint instead of float */ - const uint constbuf = index2D->i[i]; - const uint *buf = (const uint *)mach->Consts[constbuf]; - const int pos = index->i[i] * 4 + swizzle; - /* const buffer bounds check */ - if (pos < 0 || pos >= mach->ConstsSize[constbuf]) { - if (0) { - /* Debug: print warning */ - static int count = 0; - if (count++ < 100) - debug_printf("TGSI Exec: const buffer index %d" - " out of bounds\n", pos); - } - chan->u[i] = 0; - } - else - chan->u[i] = buf[pos]; - } - } - break; - - case TGSI_FILE_INPUT: - for (i = 0; i < QUAD_SIZE; i++) { - /* - if (TGSI_PROCESSOR_GEOMETRY == mach->Processor) { - debug_printf("Fetching Input[%d] (2d=%d, 1d=%d)\n", - index2D->i[i] * TGSI_EXEC_MAX_INPUT_ATTRIBS + index->i[i], - index2D->i[i], index->i[i]); - }*/ - int pos = index2D->i[i] * TGSI_EXEC_MAX_INPUT_ATTRIBS + index->i[i]; - assert(pos >= 0); - assert(pos < TGSI_MAX_PRIM_VERTICES * PIPE_MAX_ATTRIBS); - chan->u[i] = mach->Inputs[pos].xyzw[swizzle].u[i]; - } - break; - - case TGSI_FILE_SYSTEM_VALUE: - /* XXX no swizzling at this point. Will be needed if we put - * gl_FragCoord, for example, in a sys value register. - */ - for (i = 0; i < QUAD_SIZE; i++) { - chan->u[i] = mach->SystemValue[index->i[i]].u[i]; - } - break; - - case TGSI_FILE_TEMPORARY: - for (i = 0; i < QUAD_SIZE; i++) { - assert(index->i[i] < TGSI_EXEC_NUM_TEMPS); - assert(index2D->i[i] == 0); - - chan->u[i] = mach->Temps[index->i[i]].xyzw[swizzle].u[i]; - } - break; - - case TGSI_FILE_TEMPORARY_ARRAY: - for (i = 0; i < QUAD_SIZE; i++) { - assert(index->i[i] < TGSI_EXEC_NUM_TEMPS); - assert(index2D->i[i] < TGSI_EXEC_NUM_TEMP_ARRAYS); - - chan->u[i] = - mach->TempArray[index2D->i[i]][index->i[i]].xyzw[swizzle].u[i]; - } - break; - - case TGSI_FILE_IMMEDIATE: - for (i = 0; i < QUAD_SIZE; i++) { - assert(index->i[i] >= 0 && index->i[i] < (int)mach->ImmLimit); - assert(index2D->i[i] == 0); - - chan->f[i] = mach->Imms[index->i[i]][swizzle]; - } - break; - - case TGSI_FILE_IMMEDIATE_ARRAY: - for (i = 0; i < QUAD_SIZE; i++) { - assert(index2D->i[i] == 0); - - chan->f[i] = mach->ImmArray[index->i[i]][swizzle]; - } - break; - - case TGSI_FILE_ADDRESS: - for (i = 0; i < QUAD_SIZE; i++) { - assert(index->i[i] >= 0); - assert(index2D->i[i] == 0); - - chan->u[i] = mach->Addrs[index->i[i]].xyzw[swizzle].u[i]; - } - break; - - case TGSI_FILE_PREDICATE: - for (i = 0; i < QUAD_SIZE; i++) { - assert(index->i[i] >= 0 && index->i[i] < TGSI_EXEC_NUM_PREDS); - assert(index2D->i[i] == 0); - - chan->u[i] = mach->Predicates[0].xyzw[swizzle].u[i]; - } - break; - - case TGSI_FILE_OUTPUT: - /* vertex/fragment output vars can be read too */ - for (i = 0; i < QUAD_SIZE; i++) { - assert(index->i[i] >= 0); - assert(index2D->i[i] == 0); - - chan->u[i] = mach->Outputs[index->i[i]].xyzw[swizzle].u[i]; - } - break; - - default: - assert(0); - for (i = 0; i < QUAD_SIZE; i++) { - chan->u[i] = 0; - } - } -} - -static void -fetch_source(const struct tgsi_exec_machine *mach, - union tgsi_exec_channel *chan, - const struct tgsi_full_src_register *reg, - const uint chan_index, - enum tgsi_exec_datatype src_datatype) -{ - union tgsi_exec_channel index; - union tgsi_exec_channel index2D; - uint swizzle; - - /* We start with a direct index into a register file. - * - * file[1], - * where: - * file = Register.File - * [1] = Register.Index - */ - index.i[0] = - index.i[1] = - index.i[2] = - index.i[3] = reg->Register.Index; - - /* There is an extra source register that indirectly subscripts - * a register file. The direct index now becomes an offset - * that is being added to the indirect register. - * - * file[ind[2].x+1], - * where: - * ind = Indirect.File - * [2] = Indirect.Index - * .x = Indirect.SwizzleX - */ - if (reg->Register.Indirect) { - union tgsi_exec_channel index2; - union tgsi_exec_channel indir_index; - const uint execmask = mach->ExecMask; - uint i; - - /* which address register (always zero now) */ - index2.i[0] = - index2.i[1] = - index2.i[2] = - index2.i[3] = reg->Indirect.Index; - assert(reg->Indirect.File == TGSI_FILE_ADDRESS); - /* get current value of address register[swizzle] */ - swizzle = tgsi_util_get_src_register_swizzle( ®->Indirect, CHAN_X ); - fetch_src_file_channel(mach, - chan_index, - reg->Indirect.File, - swizzle, - &index2, - &ZeroVec, - &indir_index); - - /* add value of address register to the offset */ - index.i[0] += indir_index.i[0]; - index.i[1] += indir_index.i[1]; - index.i[2] += indir_index.i[2]; - index.i[3] += indir_index.i[3]; - - /* for disabled execution channels, zero-out the index to - * avoid using a potential garbage value. - */ - for (i = 0; i < QUAD_SIZE; i++) { - if ((execmask & (1 << i)) == 0) - index.i[i] = 0; - } - } - - /* There is an extra source register that is a second - * subscript to a register file. Effectively it means that - * the register file is actually a 2D array of registers. - * - * file[3][1], - * where: - * [3] = Dimension.Index - */ - if (reg->Register.Dimension) { - index2D.i[0] = - index2D.i[1] = - index2D.i[2] = - index2D.i[3] = reg->Dimension.Index; - - /* Again, the second subscript index can be addressed indirectly - * identically to the first one. - * Nothing stops us from indirectly addressing the indirect register, - * but there is no need for that, so we won't exercise it. - * - * file[ind[4].y+3][1], - * where: - * ind = DimIndirect.File - * [4] = DimIndirect.Index - * .y = DimIndirect.SwizzleX - */ - if (reg->Dimension.Indirect) { - union tgsi_exec_channel index2; - union tgsi_exec_channel indir_index; - const uint execmask = mach->ExecMask; - uint i; - - index2.i[0] = - index2.i[1] = - index2.i[2] = - index2.i[3] = reg->DimIndirect.Index; - - swizzle = tgsi_util_get_src_register_swizzle( ®->DimIndirect, CHAN_X ); - fetch_src_file_channel(mach, - chan_index, - reg->DimIndirect.File, - swizzle, - &index2, - &ZeroVec, - &indir_index); - - index2D.i[0] += indir_index.i[0]; - index2D.i[1] += indir_index.i[1]; - index2D.i[2] += indir_index.i[2]; - index2D.i[3] += indir_index.i[3]; - - /* for disabled execution channels, zero-out the index to - * avoid using a potential garbage value. - */ - for (i = 0; i < QUAD_SIZE; i++) { - if ((execmask & (1 << i)) == 0) { - index2D.i[i] = 0; - } - } - } - - /* If by any chance there was a need for a 3D array of register - * files, we would have to check whether Dimension is followed - * by a dimension register and continue the saga. - */ - } else { - index2D.i[0] = - index2D.i[1] = - index2D.i[2] = - index2D.i[3] = 0; - } - - swizzle = tgsi_util_get_full_src_register_swizzle( reg, chan_index ); - fetch_src_file_channel(mach, - chan_index, - reg->Register.File, - swizzle, - &index, - &index2D, - chan); - - if (reg->Register.Absolute) { - if (src_datatype == TGSI_EXEC_DATA_FLOAT) { - micro_abs(chan, chan); - } else { - micro_iabs(chan, chan); - } - } - - if (reg->Register.Negate) { - if (src_datatype == TGSI_EXEC_DATA_FLOAT) { - micro_neg(chan, chan); - } else { - micro_ineg(chan, chan); - } - } -} - -static void -store_dest(struct tgsi_exec_machine *mach, - const union tgsi_exec_channel *chan, - const struct tgsi_full_dst_register *reg, - const struct tgsi_full_instruction *inst, - uint chan_index, - enum tgsi_exec_datatype dst_datatype) -{ - uint i; - union tgsi_exec_channel null; - union tgsi_exec_channel *dst; - union tgsi_exec_channel index2D; - uint execmask = mach->ExecMask; - int offset = 0; /* indirection offset */ - int index; - - /* for debugging */ - if (0 && dst_datatype == TGSI_EXEC_DATA_FLOAT) { - check_inf_or_nan(chan); - } - - /* There is an extra source register that indirectly subscripts - * a register file. The direct index now becomes an offset - * that is being added to the indirect register. - * - * file[ind[2].x+1], - * where: - * ind = Indirect.File - * [2] = Indirect.Index - * .x = Indirect.SwizzleX - */ - if (reg->Register.Indirect) { - union tgsi_exec_channel index; - union tgsi_exec_channel indir_index; - uint swizzle; - - /* which address register (always zero for now) */ - index.i[0] = - index.i[1] = - index.i[2] = - index.i[3] = reg->Indirect.Index; - - /* get current value of address register[swizzle] */ - swizzle = tgsi_util_get_src_register_swizzle( ®->Indirect, CHAN_X ); - - /* fetch values from the address/indirection register */ - fetch_src_file_channel(mach, - chan_index, - reg->Indirect.File, - swizzle, - &index, - &ZeroVec, - &indir_index); - - /* save indirection offset */ - offset = indir_index.i[0]; - } - - /* There is an extra source register that is a second - * subscript to a register file. Effectively it means that - * the register file is actually a 2D array of registers. - * - * file[3][1], - * where: - * [3] = Dimension.Index - */ - if (reg->Register.Dimension) { - index2D.i[0] = - index2D.i[1] = - index2D.i[2] = - index2D.i[3] = reg->Dimension.Index; - - /* Again, the second subscript index can be addressed indirectly - * identically to the first one. - * Nothing stops us from indirectly addressing the indirect register, - * but there is no need for that, so we won't exercise it. - * - * file[ind[4].y+3][1], - * where: - * ind = DimIndirect.File - * [4] = DimIndirect.Index - * .y = DimIndirect.SwizzleX - */ - if (reg->Dimension.Indirect) { - union tgsi_exec_channel index2; - union tgsi_exec_channel indir_index; - const uint execmask = mach->ExecMask; - unsigned swizzle; - uint i; - - index2.i[0] = - index2.i[1] = - index2.i[2] = - index2.i[3] = reg->DimIndirect.Index; - - swizzle = tgsi_util_get_src_register_swizzle( ®->DimIndirect, CHAN_X ); - fetch_src_file_channel(mach, - chan_index, - reg->DimIndirect.File, - swizzle, - &index2, - &ZeroVec, - &indir_index); - - index2D.i[0] += indir_index.i[0]; - index2D.i[1] += indir_index.i[1]; - index2D.i[2] += indir_index.i[2]; - index2D.i[3] += indir_index.i[3]; - - /* for disabled execution channels, zero-out the index to - * avoid using a potential garbage value. - */ - for (i = 0; i < QUAD_SIZE; i++) { - if ((execmask & (1 << i)) == 0) { - index2D.i[i] = 0; - } - } - } - - /* If by any chance there was a need for a 3D array of register - * files, we would have to check whether Dimension is followed - * by a dimension register and continue the saga. - */ - } else { - index2D.i[0] = - index2D.i[1] = - index2D.i[2] = - index2D.i[3] = 0; - } - - switch (reg->Register.File) { - case TGSI_FILE_NULL: - dst = &null; - break; - - case TGSI_FILE_OUTPUT: - index = mach->Temps[TEMP_OUTPUT_I].xyzw[TEMP_OUTPUT_C].u[0] - + reg->Register.Index; - dst = &mach->Outputs[offset + index].xyzw[chan_index]; -#if 0 - if (TGSI_PROCESSOR_GEOMETRY == mach->Processor) { - fprintf(stderr, "STORING OUT[%d] mask(%d), = (", offset + index, execmask); - for (i = 0; i < QUAD_SIZE; i++) - if (execmask & (1 << i)) - fprintf(stderr, "%f, ", chan->f[i]); - fprintf(stderr, ")\n"); - } -#endif - break; - - case TGSI_FILE_TEMPORARY: - index = reg->Register.Index; - assert( index < TGSI_EXEC_NUM_TEMPS ); - dst = &mach->Temps[offset + index].xyzw[chan_index]; - break; - - case TGSI_FILE_TEMPORARY_ARRAY: - index = reg->Register.Index; - assert( index < TGSI_EXEC_NUM_TEMPS ); - assert( index2D.i[0] < TGSI_EXEC_NUM_TEMP_ARRAYS ); - /* XXX we use index2D.i[0] here but somehow we might - * end up with someone trying to store indirectly in - * different buffers */ - dst = &mach->TempArray[index2D.i[0]][offset + index].xyzw[chan_index]; - break; - - case TGSI_FILE_ADDRESS: - index = reg->Register.Index; - dst = &mach->Addrs[index].xyzw[chan_index]; - break; - - case TGSI_FILE_PREDICATE: - index = reg->Register.Index; - assert(index < TGSI_EXEC_NUM_PREDS); - dst = &mach->Predicates[index].xyzw[chan_index]; - break; - - default: - assert( 0 ); - return; - } - - if (inst->Instruction.Predicate) { - uint swizzle; - union tgsi_exec_channel *pred; - - switch (chan_index) { - case CHAN_X: - swizzle = inst->Predicate.SwizzleX; - break; - case CHAN_Y: - swizzle = inst->Predicate.SwizzleY; - break; - case CHAN_Z: - swizzle = inst->Predicate.SwizzleZ; - break; - case CHAN_W: - swizzle = inst->Predicate.SwizzleW; - break; - default: - assert(0); - return; - } - - assert(inst->Predicate.Index == 0); - - pred = &mach->Predicates[inst->Predicate.Index].xyzw[swizzle]; - - if (inst->Predicate.Negate) { - for (i = 0; i < QUAD_SIZE; i++) { - if (pred->u[i]) { - execmask &= ~(1 << i); - } - } - } else { - for (i = 0; i < QUAD_SIZE; i++) { - if (!pred->u[i]) { - execmask &= ~(1 << i); - } - } - } - } - - switch (inst->Instruction.Saturate) { - case TGSI_SAT_NONE: - for (i = 0; i < QUAD_SIZE; i++) - if (execmask & (1 << i)) - dst->i[i] = chan->i[i]; - break; - - case TGSI_SAT_ZERO_ONE: - for (i = 0; i < QUAD_SIZE; i++) - if (execmask & (1 << i)) { - if (chan->f[i] < 0.0f) - dst->f[i] = 0.0f; - else if (chan->f[i] > 1.0f) - dst->f[i] = 1.0f; - else - dst->i[i] = chan->i[i]; - } - break; - - case TGSI_SAT_MINUS_PLUS_ONE: - for (i = 0; i < QUAD_SIZE; i++) - if (execmask & (1 << i)) { - if (chan->f[i] < -1.0f) - dst->f[i] = -1.0f; - else if (chan->f[i] > 1.0f) - dst->f[i] = 1.0f; - else - dst->i[i] = chan->i[i]; - } - break; - - default: - assert( 0 ); - } -} - -#define FETCH(VAL,INDEX,CHAN)\ - fetch_source(mach, VAL, &inst->Src[INDEX], CHAN, TGSI_EXEC_DATA_FLOAT) - -#define IFETCH(VAL,INDEX,CHAN)\ - fetch_source(mach, VAL, &inst->Src[INDEX], CHAN, TGSI_EXEC_DATA_INT) - - -/** - * Execute ARB-style KIL which is predicated by a src register. - * Kill fragment if any of the four values is less than zero. - */ -static void -exec_kil(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - uint uniquemask; - uint chan_index; - uint kilmask = 0; /* bit 0 = pixel 0, bit 1 = pixel 1, etc */ - union tgsi_exec_channel r[1]; - - /* This mask stores component bits that were already tested. */ - uniquemask = 0; - - for (chan_index = 0; chan_index < 4; chan_index++) - { - uint swizzle; - uint i; - - /* unswizzle channel */ - swizzle = tgsi_util_get_full_src_register_swizzle ( - &inst->Src[0], - chan_index); - - /* check if the component has not been already tested */ - if (uniquemask & (1 << swizzle)) - continue; - uniquemask |= 1 << swizzle; - - FETCH(&r[0], 0, chan_index); - for (i = 0; i < 4; i++) - if (r[0].f[i] < 0.0f) - kilmask |= 1 << i; - } - - mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0] |= kilmask; -} - -/** - * Execute NVIDIA-style KIL which is predicated by a condition code. - * Kill fragment if the condition code is TRUE. - */ -static void -exec_kilp(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - uint kilmask; /* bit 0 = pixel 0, bit 1 = pixel 1, etc */ - - /* "unconditional" kil */ - kilmask = mach->ExecMask; - mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0] |= kilmask; -} - -static void -emit_vertex(struct tgsi_exec_machine *mach) -{ - /* FIXME: check for exec mask correctly - unsigned i; - for (i = 0; i < QUAD_SIZE; ++i) { - if ((mach->ExecMask & (1 << i))) - */ - if (mach->ExecMask) { - mach->Temps[TEMP_OUTPUT_I].xyzw[TEMP_OUTPUT_C].u[0] += mach->NumOutputs; - mach->Primitives[mach->Temps[TEMP_PRIMITIVE_I].xyzw[TEMP_PRIMITIVE_C].u[0]]++; - } -} - -static void -emit_primitive(struct tgsi_exec_machine *mach) -{ - unsigned *prim_count = &mach->Temps[TEMP_PRIMITIVE_I].xyzw[TEMP_PRIMITIVE_C].u[0]; - /* FIXME: check for exec mask correctly - unsigned i; - for (i = 0; i < QUAD_SIZE; ++i) { - if ((mach->ExecMask & (1 << i))) - */ - if (mach->ExecMask) { - ++(*prim_count); - debug_assert((*prim_count * mach->NumOutputs) < mach->MaxGeometryShaderOutputs); - mach->Primitives[*prim_count] = 0; - } -} - -static void -conditional_emit_primitive(struct tgsi_exec_machine *mach) -{ - if (TGSI_PROCESSOR_GEOMETRY == mach->Processor) { - int emitted_verts = - mach->Primitives[mach->Temps[TEMP_PRIMITIVE_I].xyzw[TEMP_PRIMITIVE_C].u[0]]; - if (emitted_verts) { - emit_primitive(mach); - } - } -} - - -/* - * Fetch four texture samples using STR texture coordinates. - */ -static void -fetch_texel( struct tgsi_sampler *sampler, - const union tgsi_exec_channel *s, - const union tgsi_exec_channel *t, - const union tgsi_exec_channel *p, - const union tgsi_exec_channel *c0, - enum tgsi_sampler_control control, - union tgsi_exec_channel *r, - union tgsi_exec_channel *g, - union tgsi_exec_channel *b, - union tgsi_exec_channel *a ) -{ - uint j; - float rgba[NUM_CHANNELS][QUAD_SIZE]; - - sampler->get_samples(sampler, s->f, t->f, p->f, c0->f, control, rgba); - - for (j = 0; j < 4; j++) { - r->f[j] = rgba[0][j]; - g->f[j] = rgba[1][j]; - b->f[j] = rgba[2][j]; - a->f[j] = rgba[3][j]; - } -} - - -#define TEX_MODIFIER_NONE 0 -#define TEX_MODIFIER_PROJECTED 1 -#define TEX_MODIFIER_LOD_BIAS 2 -#define TEX_MODIFIER_EXPLICIT_LOD 3 - - -static void -exec_tex(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst, - uint modifier) -{ - const uint unit = inst->Src[1].Register.Index; - union tgsi_exec_channel r[4]; - const union tgsi_exec_channel *lod = &ZeroVec; - enum tgsi_sampler_control control; - uint chan; - - if (modifier != TEX_MODIFIER_NONE) { - FETCH(&r[3], 0, CHAN_W); - if (modifier != TEX_MODIFIER_PROJECTED) { - lod = &r[3]; - } - } - - if (modifier == TEX_MODIFIER_EXPLICIT_LOD) { - control = tgsi_sampler_lod_explicit; - } else { - control = tgsi_sampler_lod_bias; - } - - switch (inst->Texture.Texture) { - case TGSI_TEXTURE_1D: - FETCH(&r[0], 0, CHAN_X); - - if (modifier == TEX_MODIFIER_PROJECTED) { - micro_div(&r[0], &r[0], &r[3]); - } - - fetch_texel(mach->Samplers[unit], - &r[0], &ZeroVec, &ZeroVec, lod, /* S, T, P, LOD */ - control, - &r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */ - break; - case TGSI_TEXTURE_SHADOW1D: - FETCH(&r[0], 0, CHAN_X); - FETCH(&r[2], 0, CHAN_Z); - - if (modifier == TEX_MODIFIER_PROJECTED) { - micro_div(&r[0], &r[0], &r[3]); - } - - fetch_texel(mach->Samplers[unit], - &r[0], &ZeroVec, &r[2], lod, /* S, T, P, LOD */ - control, - &r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */ - break; - - case TGSI_TEXTURE_2D: - case TGSI_TEXTURE_RECT: - case TGSI_TEXTURE_SHADOW2D: - case TGSI_TEXTURE_SHADOWRECT: - FETCH(&r[0], 0, CHAN_X); - FETCH(&r[1], 0, CHAN_Y); - FETCH(&r[2], 0, CHAN_Z); - - if (modifier == TEX_MODIFIER_PROJECTED) { - micro_div(&r[0], &r[0], &r[3]); - micro_div(&r[1], &r[1], &r[3]); - micro_div(&r[2], &r[2], &r[3]); - } - - fetch_texel(mach->Samplers[unit], - &r[0], &r[1], &r[2], lod, /* S, T, P, LOD */ - control, - &r[0], &r[1], &r[2], &r[3]); /* outputs */ - break; - - case TGSI_TEXTURE_1D_ARRAY: - FETCH(&r[0], 0, CHAN_X); - FETCH(&r[1], 0, CHAN_Y); - - if (modifier == TEX_MODIFIER_PROJECTED) { - micro_div(&r[0], &r[0], &r[3]); - } - - fetch_texel(mach->Samplers[unit], - &r[0], &r[1], &ZeroVec, lod, /* S, T, P, LOD */ - control, - &r[0], &r[1], &r[2], &r[3]); /* outputs */ - break; - case TGSI_TEXTURE_SHADOW1D_ARRAY: - FETCH(&r[0], 0, CHAN_X); - FETCH(&r[1], 0, CHAN_Y); - FETCH(&r[2], 0, CHAN_Z); - - if (modifier == TEX_MODIFIER_PROJECTED) { - micro_div(&r[0], &r[0], &r[3]); - } - - fetch_texel(mach->Samplers[unit], - &r[0], &r[1], &r[2], lod, /* S, T, P, LOD */ - control, - &r[0], &r[1], &r[2], &r[3]); /* outputs */ - break; - - case TGSI_TEXTURE_2D_ARRAY: - FETCH(&r[0], 0, CHAN_X); - FETCH(&r[1], 0, CHAN_Y); - FETCH(&r[2], 0, CHAN_Z); - - if (modifier == TEX_MODIFIER_PROJECTED) { - micro_div(&r[0], &r[0], &r[3]); - micro_div(&r[1], &r[1], &r[3]); - } - - fetch_texel(mach->Samplers[unit], - &r[0], &r[1], &r[2], lod, /* S, T, P, LOD */ - control, - &r[0], &r[1], &r[2], &r[3]); /* outputs */ - break; - case TGSI_TEXTURE_SHADOW2D_ARRAY: - case TGSI_TEXTURE_SHADOWCUBE: - FETCH(&r[0], 0, CHAN_X); - FETCH(&r[1], 0, CHAN_Y); - FETCH(&r[2], 0, CHAN_Z); - FETCH(&r[3], 0, CHAN_W); - - fetch_texel(mach->Samplers[unit], - &r[0], &r[1], &r[2], &r[3], /* S, T, P, LOD */ - control, - &r[0], &r[1], &r[2], &r[3]); /* outputs */ - break; - case TGSI_TEXTURE_3D: - case TGSI_TEXTURE_CUBE: - FETCH(&r[0], 0, CHAN_X); - FETCH(&r[1], 0, CHAN_Y); - FETCH(&r[2], 0, CHAN_Z); - - if (modifier == TEX_MODIFIER_PROJECTED) { - micro_div(&r[0], &r[0], &r[3]); - micro_div(&r[1], &r[1], &r[3]); - micro_div(&r[2], &r[2], &r[3]); - } - - fetch_texel(mach->Samplers[unit], - &r[0], &r[1], &r[2], lod, - control, - &r[0], &r[1], &r[2], &r[3]); - break; - - default: - assert(0); - } - -#if 0 - debug_printf("fetch r: %g %g %g %g\n", - r[0].f[0], r[0].f[1], r[0].f[2], r[0].f[3]); - debug_printf("fetch g: %g %g %g %g\n", - r[1].f[0], r[1].f[1], r[1].f[2], r[1].f[3]); - debug_printf("fetch b: %g %g %g %g\n", - r[2].f[0], r[2].f[1], r[2].f[2], r[2].f[3]); - debug_printf("fetch a: %g %g %g %g\n", - r[3].f[0], r[3].f[1], r[3].f[2], r[3].f[3]); -#endif - - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - store_dest(mach, &r[chan], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT); - } - } -} - -static void -exec_txd(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - const uint unit = inst->Src[3].Register.Index; - union tgsi_exec_channel r[4]; - uint chan; - - /* - * XXX: This is fake TXD -- the derivatives are not taken into account, yet. - */ - - switch (inst->Texture.Texture) { - case TGSI_TEXTURE_1D: - case TGSI_TEXTURE_SHADOW1D: - - FETCH(&r[0], 0, CHAN_X); - - fetch_texel(mach->Samplers[unit], - &r[0], &ZeroVec, &ZeroVec, &ZeroVec, /* S, T, P, BIAS */ - tgsi_sampler_lod_bias, - &r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */ - break; - - case TGSI_TEXTURE_1D_ARRAY: - case TGSI_TEXTURE_2D: - case TGSI_TEXTURE_RECT: - case TGSI_TEXTURE_SHADOW1D_ARRAY: - case TGSI_TEXTURE_SHADOW2D: - case TGSI_TEXTURE_SHADOWRECT: - - FETCH(&r[0], 0, CHAN_X); - FETCH(&r[1], 0, CHAN_Y); - FETCH(&r[2], 0, CHAN_Z); - - fetch_texel(mach->Samplers[unit], - &r[0], &r[1], &r[2], &ZeroVec, /* inputs */ - tgsi_sampler_lod_bias, - &r[0], &r[1], &r[2], &r[3]); /* outputs */ - break; - - case TGSI_TEXTURE_2D_ARRAY: - case TGSI_TEXTURE_3D: - case TGSI_TEXTURE_CUBE: - - FETCH(&r[0], 0, CHAN_X); - FETCH(&r[1], 0, CHAN_Y); - FETCH(&r[2], 0, CHAN_Z); - - fetch_texel(mach->Samplers[unit], - &r[0], &r[1], &r[2], &ZeroVec, - tgsi_sampler_lod_bias, - &r[0], &r[1], &r[2], &r[3]); - break; - - case TGSI_TEXTURE_SHADOW2D_ARRAY: - - FETCH(&r[0], 0, CHAN_X); - FETCH(&r[1], 0, CHAN_Y); - FETCH(&r[2], 0, CHAN_Z); - FETCH(&r[3], 0, CHAN_W); - - fetch_texel(mach->Samplers[unit], - &r[0], &r[1], &r[2], &r[3], - tgsi_sampler_lod_bias, - &r[0], &r[1], &r[2], &r[3]); - break; - - default: - assert(0); - } - - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - store_dest(mach, &r[chan], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT); - } - } -} - - -static void -exec_txf(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - struct tgsi_sampler *sampler; - const uint unit = inst->Src[2].Register.Index; - union tgsi_exec_channel r[4]; - union tgsi_exec_channel offset[3]; - uint chan; - float rgba[NUM_CHANNELS][QUAD_SIZE]; - int j; - int8_t offsets[3]; - - if (inst->Texture.NumOffsets == 1) { - union tgsi_exec_channel index; - index.i[0] = index.i[1] = index.i[2] = index.i[3] = inst->TexOffsets[0].Index; - fetch_src_file_channel(mach, 0, inst->TexOffsets[0].File, - inst->TexOffsets[0].SwizzleX, &index, &ZeroVec, &offset[0]); - fetch_src_file_channel(mach, 0, inst->TexOffsets[0].File, - inst->TexOffsets[0].SwizzleY, &index, &ZeroVec, &offset[1]); - fetch_src_file_channel(mach, 0, inst->TexOffsets[0].File, - inst->TexOffsets[0].SwizzleZ, &index, &ZeroVec, &offset[2]); - offsets[0] = offset[0].i[0]; - offsets[1] = offset[1].i[0]; - offsets[2] = offset[2].i[0]; - } else - offsets[0] = offsets[1] = offsets[2] = 0; - - IFETCH(&r[3], 0, CHAN_W); - - switch(inst->Texture.Texture) { - case TGSI_TEXTURE_3D: - case TGSI_TEXTURE_2D_ARRAY: - case TGSI_TEXTURE_SHADOW2D_ARRAY: - IFETCH(&r[2], 0, CHAN_Z); - /* fallthrough */ - case TGSI_TEXTURE_2D: - case TGSI_TEXTURE_RECT: - case TGSI_TEXTURE_SHADOW1D_ARRAY: - case TGSI_TEXTURE_SHADOW2D: - case TGSI_TEXTURE_SHADOWRECT: - case TGSI_TEXTURE_1D_ARRAY: - IFETCH(&r[1], 0, CHAN_Y); - /* fallthrough */ - case TGSI_TEXTURE_1D: - case TGSI_TEXTURE_SHADOW1D: - IFETCH(&r[0], 0, CHAN_X); - break; - default: - assert(0); - break; - } - - sampler = mach->Samplers[unit]; - sampler->get_texel(sampler, r[0].i, r[1].i, r[2].i, r[3].i, - offsets, rgba); - - for (j = 0; j < QUAD_SIZE; j++) { - r[0].f[j] = rgba[0][j]; - r[1].f[j] = rgba[1][j]; - r[2].f[j] = rgba[2][j]; - r[3].f[j] = rgba[3][j]; - } - - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - store_dest(mach, &r[chan], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT); - } - } -} - -static void -exec_txq(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - struct tgsi_sampler *sampler; - const uint unit = inst->Src[1].Register.Index; - int result[4]; - union tgsi_exec_channel r[4], src; - uint chan; - int i,j; - - fetch_source(mach, &src, &inst->Src[0], CHAN_X, TGSI_EXEC_DATA_INT); - sampler = mach->Samplers[unit]; - - sampler->get_dims(sampler, src.i[0], result); - - for (i = 0; i < QUAD_SIZE; i++) { - for (j = 0; j < 4; j++) { - r[j].i[i] = result[j]; - } - } - - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - store_dest(mach, &r[chan], &inst->Dst[0], inst, chan, - TGSI_EXEC_DATA_INT); - } - } -} - -static void -exec_sample(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst, - uint modifier) -{ - const uint resource_unit = inst->Src[1].Register.Index; - const uint sampler_unit = inst->Src[2].Register.Index; - union tgsi_exec_channel r[4]; - const union tgsi_exec_channel *lod = &ZeroVec; - enum tgsi_sampler_control control; - uint chan; - - if (modifier != TEX_MODIFIER_NONE) { - if (modifier == TEX_MODIFIER_LOD_BIAS) - FETCH(&r[3], 3, CHAN_X); - else /*TEX_MODIFIER_LOD*/ - FETCH(&r[3], 0, CHAN_W); - - if (modifier != TEX_MODIFIER_PROJECTED) { - lod = &r[3]; - } - } - - if (modifier == TEX_MODIFIER_EXPLICIT_LOD) { - control = tgsi_sampler_lod_explicit; - } else { - control = tgsi_sampler_lod_bias; - } - - switch (mach->Resources[resource_unit].Resource) { - case TGSI_TEXTURE_1D: - case TGSI_TEXTURE_SHADOW1D: - FETCH(&r[0], 0, CHAN_X); - - if (modifier == TEX_MODIFIER_PROJECTED) { - micro_div(&r[0], &r[0], &r[3]); - } - - fetch_texel(mach->Samplers[sampler_unit], - &r[0], &ZeroVec, &ZeroVec, lod, /* S, T, P, LOD */ - control, - &r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */ - break; - - case TGSI_TEXTURE_1D_ARRAY: - case TGSI_TEXTURE_2D: - case TGSI_TEXTURE_RECT: - case TGSI_TEXTURE_SHADOW1D_ARRAY: - case TGSI_TEXTURE_SHADOW2D: - case TGSI_TEXTURE_SHADOWRECT: - FETCH(&r[0], 0, CHAN_X); - FETCH(&r[1], 0, CHAN_Y); - FETCH(&r[2], 0, CHAN_Z); - - if (modifier == TEX_MODIFIER_PROJECTED) { - micro_div(&r[0], &r[0], &r[3]); - micro_div(&r[1], &r[1], &r[3]); - micro_div(&r[2], &r[2], &r[3]); - } - - fetch_texel(mach->Samplers[sampler_unit], - &r[0], &r[1], &r[2], lod, /* S, T, P, LOD */ - control, - &r[0], &r[1], &r[2], &r[3]); /* outputs */ - break; - - case TGSI_TEXTURE_2D_ARRAY: - case TGSI_TEXTURE_3D: - case TGSI_TEXTURE_CUBE: - FETCH(&r[0], 0, CHAN_X); - FETCH(&r[1], 0, CHAN_Y); - FETCH(&r[2], 0, CHAN_Z); - - if (modifier == TEX_MODIFIER_PROJECTED) { - micro_div(&r[0], &r[0], &r[3]); - micro_div(&r[1], &r[1], &r[3]); - micro_div(&r[2], &r[2], &r[3]); - } - - fetch_texel(mach->Samplers[sampler_unit], - &r[0], &r[1], &r[2], lod, - control, - &r[0], &r[1], &r[2], &r[3]); - break; - - case TGSI_TEXTURE_SHADOW2D_ARRAY: - case TGSI_TEXTURE_SHADOWCUBE: - FETCH(&r[0], 0, CHAN_X); - FETCH(&r[1], 0, CHAN_Y); - FETCH(&r[2], 0, CHAN_Z); - FETCH(&r[3], 0, CHAN_W); - - assert(modifier != TEX_MODIFIER_PROJECTED); - - fetch_texel(mach->Samplers[sampler_unit], - &r[0], &r[1], &r[2], &r[3], - control, - &r[0], &r[1], &r[2], &r[3]); - break; - - default: - assert(0); - } - - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - store_dest(mach, &r[chan], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT); - } - } -} - -static void -exec_sample_d(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - const uint resource_unit = inst->Src[1].Register.Index; - const uint sampler_unit = inst->Src[2].Register.Index; - union tgsi_exec_channel r[4]; - uint chan; - /* - * XXX: This is fake SAMPLE_D -- the derivatives are not taken into account, yet. - */ - - switch (mach->Resources[resource_unit].Resource) { - case TGSI_TEXTURE_1D: - case TGSI_TEXTURE_SHADOW1D: - - FETCH(&r[0], 0, CHAN_X); - - fetch_texel(mach->Samplers[sampler_unit], - &r[0], &ZeroVec, &ZeroVec, &ZeroVec, /* S, T, P, BIAS */ - tgsi_sampler_lod_bias, - &r[0], &r[1], &r[2], &r[3]); /* R, G, B, A */ - break; - - case TGSI_TEXTURE_2D: - case TGSI_TEXTURE_RECT: - case TGSI_TEXTURE_SHADOW2D: - case TGSI_TEXTURE_SHADOWRECT: - - FETCH(&r[0], 0, CHAN_X); - FETCH(&r[1], 0, CHAN_Y); - FETCH(&r[2], 0, CHAN_Z); - - fetch_texel(mach->Samplers[sampler_unit], - &r[0], &r[1], &r[2], &ZeroVec, /* inputs */ - tgsi_sampler_lod_bias, - &r[0], &r[1], &r[2], &r[3]); /* outputs */ - break; - - case TGSI_TEXTURE_3D: - case TGSI_TEXTURE_CUBE: - - FETCH(&r[0], 0, CHAN_X); - FETCH(&r[1], 0, CHAN_Y); - FETCH(&r[2], 0, CHAN_Z); - - fetch_texel(mach->Samplers[sampler_unit], - &r[0], &r[1], &r[2], &ZeroVec, - tgsi_sampler_lod_bias, - &r[0], &r[1], &r[2], &r[3]); - break; - - default: - assert(0); - } - - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - store_dest(mach, &r[chan], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT); - } - } -} - - -/** - * Evaluate a constant-valued coefficient at the position of the - * current quad. - */ -static void -eval_constant_coef( - struct tgsi_exec_machine *mach, - unsigned attrib, - unsigned chan ) -{ - unsigned i; - - for( i = 0; i < QUAD_SIZE; i++ ) { - mach->Inputs[attrib].xyzw[chan].f[i] = mach->InterpCoefs[attrib].a0[chan]; - } -} - -/** - * Evaluate a linear-valued coefficient at the position of the - * current quad. - */ -static void -eval_linear_coef( - struct tgsi_exec_machine *mach, - unsigned attrib, - unsigned chan ) -{ - const float x = mach->QuadPos.xyzw[0].f[0]; - const float y = mach->QuadPos.xyzw[1].f[0]; - const float dadx = mach->InterpCoefs[attrib].dadx[chan]; - const float dady = mach->InterpCoefs[attrib].dady[chan]; - const float a0 = mach->InterpCoefs[attrib].a0[chan] + dadx * x + dady * y; - mach->Inputs[attrib].xyzw[chan].f[0] = a0; - mach->Inputs[attrib].xyzw[chan].f[1] = a0 + dadx; - mach->Inputs[attrib].xyzw[chan].f[2] = a0 + dady; - mach->Inputs[attrib].xyzw[chan].f[3] = a0 + dadx + dady; -} - -/** - * Evaluate a perspective-valued coefficient at the position of the - * current quad. - */ -static void -eval_perspective_coef( - struct tgsi_exec_machine *mach, - unsigned attrib, - unsigned chan ) -{ - const float x = mach->QuadPos.xyzw[0].f[0]; - const float y = mach->QuadPos.xyzw[1].f[0]; - const float dadx = mach->InterpCoefs[attrib].dadx[chan]; - const float dady = mach->InterpCoefs[attrib].dady[chan]; - const float a0 = mach->InterpCoefs[attrib].a0[chan] + dadx * x + dady * y; - const float *w = mach->QuadPos.xyzw[3].f; - /* divide by W here */ - mach->Inputs[attrib].xyzw[chan].f[0] = a0 / w[0]; - mach->Inputs[attrib].xyzw[chan].f[1] = (a0 + dadx) / w[1]; - mach->Inputs[attrib].xyzw[chan].f[2] = (a0 + dady) / w[2]; - mach->Inputs[attrib].xyzw[chan].f[3] = (a0 + dadx + dady) / w[3]; -} - - -typedef void (* eval_coef_func)( - struct tgsi_exec_machine *mach, - unsigned attrib, - unsigned chan ); - -static void -exec_declaration(struct tgsi_exec_machine *mach, - const struct tgsi_full_declaration *decl) -{ - if (decl->Declaration.File == TGSI_FILE_RESOURCE) { - mach->Resources[decl->Range.First] = decl->Resource; - return; - } - - if (mach->Processor == TGSI_PROCESSOR_FRAGMENT) { - if (decl->Declaration.File == TGSI_FILE_INPUT) { - uint first, last, mask; - - first = decl->Range.First; - last = decl->Range.Last; - mask = decl->Declaration.UsageMask; - - /* XXX we could remove this special-case code since - * mach->InterpCoefs[first].a0 should already have the - * front/back-face value. But we should first update the - * ureg code to emit the right UsageMask value (WRITEMASK_X). - * Then, we could remove the tgsi_exec_machine::Face field. - */ - /* XXX make FACE a system value */ - if (decl->Semantic.Name == TGSI_SEMANTIC_FACE) { - uint i; - - assert(decl->Semantic.Index == 0); - assert(first == last); - - for (i = 0; i < QUAD_SIZE; i++) { - mach->Inputs[first].xyzw[0].f[i] = mach->Face; - } - } else { - eval_coef_func eval; - uint i, j; - - switch (decl->Declaration.Interpolate) { - case TGSI_INTERPOLATE_CONSTANT: - eval = eval_constant_coef; - break; - - case TGSI_INTERPOLATE_LINEAR: - eval = eval_linear_coef; - break; - - case TGSI_INTERPOLATE_PERSPECTIVE: - eval = eval_perspective_coef; - break; - - case TGSI_INTERPOLATE_COLOR: - eval = mach->flatshade_color ? eval_constant_coef : eval_perspective_coef; - break; - - default: - assert(0); - return; - } - - for (j = 0; j < NUM_CHANNELS; j++) { - if (mask & (1 << j)) { - for (i = first; i <= last; i++) { - eval(mach, i, j); - } - } - } - } - } - } - - if (decl->Declaration.File == TGSI_FILE_SYSTEM_VALUE) { - mach->SysSemanticToIndex[decl->Declaration.Semantic] = decl->Range.First; - } -} - - -typedef void (* micro_op)(union tgsi_exec_channel *dst); - -static void -exec_vector(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst, - micro_op op, - enum tgsi_exec_datatype dst_datatype) -{ - unsigned int chan; - - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - union tgsi_exec_channel dst; - - op(&dst); - store_dest(mach, &dst, &inst->Dst[0], inst, chan, dst_datatype); - } - } -} - -typedef void (* micro_unary_op)(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src); - -static void -exec_scalar_unary(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst, - micro_unary_op op, - enum tgsi_exec_datatype dst_datatype, - enum tgsi_exec_datatype src_datatype) -{ - unsigned int chan; - union tgsi_exec_channel src; - union tgsi_exec_channel dst; - - fetch_source(mach, &src, &inst->Src[0], CHAN_X, src_datatype); - op(&dst, &src); - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - store_dest(mach, &dst, &inst->Dst[0], inst, chan, dst_datatype); - } - } -} - -static void -exec_vector_unary(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst, - micro_unary_op op, - enum tgsi_exec_datatype dst_datatype, - enum tgsi_exec_datatype src_datatype) -{ - unsigned int chan; - struct tgsi_exec_vector dst; - - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - union tgsi_exec_channel src; - - fetch_source(mach, &src, &inst->Src[0], chan, src_datatype); - op(&dst.xyzw[chan], &src); - } - } - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - store_dest(mach, &dst.xyzw[chan], &inst->Dst[0], inst, chan, dst_datatype); - } - } -} - -typedef void (* micro_binary_op)(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1); - -static void -exec_scalar_binary(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst, - micro_binary_op op, - enum tgsi_exec_datatype dst_datatype, - enum tgsi_exec_datatype src_datatype) -{ - unsigned int chan; - union tgsi_exec_channel src[2]; - union tgsi_exec_channel dst; - - fetch_source(mach, &src[0], &inst->Src[0], CHAN_X, src_datatype); - fetch_source(mach, &src[1], &inst->Src[1], CHAN_Y, src_datatype); - op(&dst, &src[0], &src[1]); - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - store_dest(mach, &dst, &inst->Dst[0], inst, chan, dst_datatype); - } - } -} - -static void -exec_vector_binary(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst, - micro_binary_op op, - enum tgsi_exec_datatype dst_datatype, - enum tgsi_exec_datatype src_datatype) -{ - unsigned int chan; - struct tgsi_exec_vector dst; - - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - union tgsi_exec_channel src[2]; - - fetch_source(mach, &src[0], &inst->Src[0], chan, src_datatype); - fetch_source(mach, &src[1], &inst->Src[1], chan, src_datatype); - op(&dst.xyzw[chan], &src[0], &src[1]); - } - } - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - store_dest(mach, &dst.xyzw[chan], &inst->Dst[0], inst, chan, dst_datatype); - } - } -} - -typedef void (* micro_trinary_op)(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1, - const union tgsi_exec_channel *src2); - -static void -exec_vector_trinary(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst, - micro_trinary_op op, - enum tgsi_exec_datatype dst_datatype, - enum tgsi_exec_datatype src_datatype) -{ - unsigned int chan; - struct tgsi_exec_vector dst; - - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - union tgsi_exec_channel src[3]; - - fetch_source(mach, &src[0], &inst->Src[0], chan, src_datatype); - fetch_source(mach, &src[1], &inst->Src[1], chan, src_datatype); - fetch_source(mach, &src[2], &inst->Src[2], chan, src_datatype); - op(&dst.xyzw[chan], &src[0], &src[1], &src[2]); - } - } - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - store_dest(mach, &dst.xyzw[chan], &inst->Dst[0], inst, chan, dst_datatype); - } - } -} - -static void -exec_dp3(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - unsigned int chan; - union tgsi_exec_channel arg[3]; - - fetch_source(mach, &arg[0], &inst->Src[0], CHAN_X, TGSI_EXEC_DATA_FLOAT); - fetch_source(mach, &arg[1], &inst->Src[1], CHAN_X, TGSI_EXEC_DATA_FLOAT); - micro_mul(&arg[2], &arg[0], &arg[1]); - - for (chan = CHAN_Y; chan <= CHAN_Z; chan++) { - fetch_source(mach, &arg[0], &inst->Src[0], chan, TGSI_EXEC_DATA_FLOAT); - fetch_source(mach, &arg[1], &inst->Src[1], chan, TGSI_EXEC_DATA_FLOAT); - micro_mad(&arg[2], &arg[0], &arg[1], &arg[2]); - } - - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - store_dest(mach, &arg[2], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT); - } - } -} - -static void -exec_dp4(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - unsigned int chan; - union tgsi_exec_channel arg[3]; - - fetch_source(mach, &arg[0], &inst->Src[0], CHAN_X, TGSI_EXEC_DATA_FLOAT); - fetch_source(mach, &arg[1], &inst->Src[1], CHAN_X, TGSI_EXEC_DATA_FLOAT); - micro_mul(&arg[2], &arg[0], &arg[1]); - - for (chan = CHAN_Y; chan <= CHAN_W; chan++) { - fetch_source(mach, &arg[0], &inst->Src[0], chan, TGSI_EXEC_DATA_FLOAT); - fetch_source(mach, &arg[1], &inst->Src[1], chan, TGSI_EXEC_DATA_FLOAT); - micro_mad(&arg[2], &arg[0], &arg[1], &arg[2]); - } - - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - store_dest(mach, &arg[2], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT); - } - } -} - -static void -exec_dp2a(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - unsigned int chan; - union tgsi_exec_channel arg[3]; - - fetch_source(mach, &arg[0], &inst->Src[0], CHAN_X, TGSI_EXEC_DATA_FLOAT); - fetch_source(mach, &arg[1], &inst->Src[1], CHAN_X, TGSI_EXEC_DATA_FLOAT); - micro_mul(&arg[2], &arg[0], &arg[1]); - - fetch_source(mach, &arg[0], &inst->Src[0], CHAN_Y, TGSI_EXEC_DATA_FLOAT); - fetch_source(mach, &arg[1], &inst->Src[1], CHAN_Y, TGSI_EXEC_DATA_FLOAT); - micro_mad(&arg[0], &arg[0], &arg[1], &arg[2]); - - fetch_source(mach, &arg[1], &inst->Src[2], CHAN_X, TGSI_EXEC_DATA_FLOAT); - micro_add(&arg[0], &arg[0], &arg[1]); - - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - store_dest(mach, &arg[0], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT); - } - } -} - -static void -exec_dph(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - unsigned int chan; - union tgsi_exec_channel arg[3]; - - fetch_source(mach, &arg[0], &inst->Src[0], CHAN_X, TGSI_EXEC_DATA_FLOAT); - fetch_source(mach, &arg[1], &inst->Src[1], CHAN_X, TGSI_EXEC_DATA_FLOAT); - micro_mul(&arg[2], &arg[0], &arg[1]); - - fetch_source(mach, &arg[0], &inst->Src[0], CHAN_Y, TGSI_EXEC_DATA_FLOAT); - fetch_source(mach, &arg[1], &inst->Src[1], CHAN_Y, TGSI_EXEC_DATA_FLOAT); - micro_mad(&arg[2], &arg[0], &arg[1], &arg[2]); - - fetch_source(mach, &arg[0], &inst->Src[0], CHAN_Z, TGSI_EXEC_DATA_FLOAT); - fetch_source(mach, &arg[1], &inst->Src[1], CHAN_Z, TGSI_EXEC_DATA_FLOAT); - micro_mad(&arg[0], &arg[0], &arg[1], &arg[2]); - - fetch_source(mach, &arg[1], &inst->Src[1], CHAN_W, TGSI_EXEC_DATA_FLOAT); - micro_add(&arg[0], &arg[0], &arg[1]); - - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - store_dest(mach, &arg[0], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT); - } - } -} - -static void -exec_dp2(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - unsigned int chan; - union tgsi_exec_channel arg[3]; - - fetch_source(mach, &arg[0], &inst->Src[0], CHAN_X, TGSI_EXEC_DATA_FLOAT); - fetch_source(mach, &arg[1], &inst->Src[1], CHAN_X, TGSI_EXEC_DATA_FLOAT); - micro_mul(&arg[2], &arg[0], &arg[1]); - - fetch_source(mach, &arg[0], &inst->Src[0], CHAN_Y, TGSI_EXEC_DATA_FLOAT); - fetch_source(mach, &arg[1], &inst->Src[1], CHAN_Y, TGSI_EXEC_DATA_FLOAT); - micro_mad(&arg[2], &arg[0], &arg[1], &arg[2]); - - for (chan = 0; chan < NUM_CHANNELS; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - store_dest(mach, &arg[2], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT); - } - } -} - -static void -exec_nrm4(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - unsigned int chan; - union tgsi_exec_channel arg[4]; - union tgsi_exec_channel scale; - - fetch_source(mach, &arg[0], &inst->Src[0], CHAN_X, TGSI_EXEC_DATA_FLOAT); - micro_mul(&scale, &arg[0], &arg[0]); - - for (chan = CHAN_Y; chan <= CHAN_W; chan++) { - union tgsi_exec_channel product; - - fetch_source(mach, &arg[chan], &inst->Src[0], chan, TGSI_EXEC_DATA_FLOAT); - micro_mul(&product, &arg[chan], &arg[chan]); - micro_add(&scale, &scale, &product); - } - - micro_rsq(&scale, &scale); - - for (chan = CHAN_X; chan <= CHAN_W; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - micro_mul(&arg[chan], &arg[chan], &scale); - store_dest(mach, &arg[chan], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT); - } - } -} - -static void -exec_nrm3(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_XYZ) { - unsigned int chan; - union tgsi_exec_channel arg[3]; - union tgsi_exec_channel scale; - - fetch_source(mach, &arg[0], &inst->Src[0], CHAN_X, TGSI_EXEC_DATA_FLOAT); - micro_mul(&scale, &arg[0], &arg[0]); - - for (chan = CHAN_Y; chan <= CHAN_Z; chan++) { - union tgsi_exec_channel product; - - fetch_source(mach, &arg[chan], &inst->Src[0], chan, TGSI_EXEC_DATA_FLOAT); - micro_mul(&product, &arg[chan], &arg[chan]); - micro_add(&scale, &scale, &product); - } - - micro_rsq(&scale, &scale); - - for (chan = CHAN_X; chan <= CHAN_Z; chan++) { - if (inst->Dst[0].Register.WriteMask & (1 << chan)) { - micro_mul(&arg[chan], &arg[chan], &scale); - store_dest(mach, &arg[chan], &inst->Dst[0], inst, chan, TGSI_EXEC_DATA_FLOAT); - } - } - } - - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) { - store_dest(mach, &OneVec, &inst->Dst[0], inst, CHAN_W, TGSI_EXEC_DATA_FLOAT); - } -} - -static void -exec_scs(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_XY) { - union tgsi_exec_channel arg; - union tgsi_exec_channel result; - - fetch_source(mach, &arg, &inst->Src[0], CHAN_X, TGSI_EXEC_DATA_FLOAT); - - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_X) { - micro_cos(&result, &arg); - store_dest(mach, &result, &inst->Dst[0], inst, CHAN_X, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Y) { - micro_sin(&result, &arg); - store_dest(mach, &result, &inst->Dst[0], inst, CHAN_Y, TGSI_EXEC_DATA_FLOAT); - } - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Z) { - store_dest(mach, &ZeroVec, &inst->Dst[0], inst, CHAN_Z, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) { - store_dest(mach, &OneVec, &inst->Dst[0], inst, CHAN_W, TGSI_EXEC_DATA_FLOAT); - } -} - -static void -exec_x2d(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - union tgsi_exec_channel r[4]; - union tgsi_exec_channel d[2]; - - fetch_source(mach, &r[0], &inst->Src[1], CHAN_X, TGSI_EXEC_DATA_FLOAT); - fetch_source(mach, &r[1], &inst->Src[1], CHAN_Y, TGSI_EXEC_DATA_FLOAT); - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_XZ) { - fetch_source(mach, &r[2], &inst->Src[2], CHAN_X, TGSI_EXEC_DATA_FLOAT); - micro_mul(&r[2], &r[2], &r[0]); - fetch_source(mach, &r[3], &inst->Src[2], CHAN_Y, TGSI_EXEC_DATA_FLOAT); - micro_mul(&r[3], &r[3], &r[1]); - micro_add(&r[2], &r[2], &r[3]); - fetch_source(mach, &r[3], &inst->Src[0], CHAN_X, TGSI_EXEC_DATA_FLOAT); - micro_add(&d[0], &r[2], &r[3]); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_YW) { - fetch_source(mach, &r[2], &inst->Src[2], CHAN_Z, TGSI_EXEC_DATA_FLOAT); - micro_mul(&r[2], &r[2], &r[0]); - fetch_source(mach, &r[3], &inst->Src[2], CHAN_W, TGSI_EXEC_DATA_FLOAT); - micro_mul(&r[3], &r[3], &r[1]); - micro_add(&r[2], &r[2], &r[3]); - fetch_source(mach, &r[3], &inst->Src[0], CHAN_Y, TGSI_EXEC_DATA_FLOAT); - micro_add(&d[1], &r[2], &r[3]); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_X) { - store_dest(mach, &d[0], &inst->Dst[0], inst, CHAN_X, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Y) { - store_dest(mach, &d[1], &inst->Dst[0], inst, CHAN_Y, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Z) { - store_dest(mach, &d[0], &inst->Dst[0], inst, CHAN_Z, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) { - store_dest(mach, &d[1], &inst->Dst[0], inst, CHAN_W, TGSI_EXEC_DATA_FLOAT); - } -} - -static void -exec_rfl(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - union tgsi_exec_channel r[9]; - - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_XYZ) { - /* r0 = dp3(src0, src0) */ - fetch_source(mach, &r[2], &inst->Src[0], CHAN_X, TGSI_EXEC_DATA_FLOAT); - micro_mul(&r[0], &r[2], &r[2]); - fetch_source(mach, &r[4], &inst->Src[0], CHAN_Y, TGSI_EXEC_DATA_FLOAT); - micro_mul(&r[8], &r[4], &r[4]); - micro_add(&r[0], &r[0], &r[8]); - fetch_source(mach, &r[6], &inst->Src[0], CHAN_Z, TGSI_EXEC_DATA_FLOAT); - micro_mul(&r[8], &r[6], &r[6]); - micro_add(&r[0], &r[0], &r[8]); - - /* r1 = dp3(src0, src1) */ - fetch_source(mach, &r[3], &inst->Src[1], CHAN_X, TGSI_EXEC_DATA_FLOAT); - micro_mul(&r[1], &r[2], &r[3]); - fetch_source(mach, &r[5], &inst->Src[1], CHAN_Y, TGSI_EXEC_DATA_FLOAT); - micro_mul(&r[8], &r[4], &r[5]); - micro_add(&r[1], &r[1], &r[8]); - fetch_source(mach, &r[7], &inst->Src[1], CHAN_Z, TGSI_EXEC_DATA_FLOAT); - micro_mul(&r[8], &r[6], &r[7]); - micro_add(&r[1], &r[1], &r[8]); - - /* r1 = 2 * r1 / r0 */ - micro_add(&r[1], &r[1], &r[1]); - micro_div(&r[1], &r[1], &r[0]); - - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_X) { - micro_mul(&r[2], &r[2], &r[1]); - micro_sub(&r[2], &r[2], &r[3]); - store_dest(mach, &r[2], &inst->Dst[0], inst, CHAN_X, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Y) { - micro_mul(&r[4], &r[4], &r[1]); - micro_sub(&r[4], &r[4], &r[5]); - store_dest(mach, &r[4], &inst->Dst[0], inst, CHAN_Y, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Z) { - micro_mul(&r[6], &r[6], &r[1]); - micro_sub(&r[6], &r[6], &r[7]); - store_dest(mach, &r[6], &inst->Dst[0], inst, CHAN_Z, TGSI_EXEC_DATA_FLOAT); - } - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) { - store_dest(mach, &OneVec, &inst->Dst[0], inst, CHAN_W, TGSI_EXEC_DATA_FLOAT); - } -} - -static void -exec_xpd(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - union tgsi_exec_channel r[6]; - union tgsi_exec_channel d[3]; - - fetch_source(mach, &r[0], &inst->Src[0], CHAN_Y, TGSI_EXEC_DATA_FLOAT); - fetch_source(mach, &r[1], &inst->Src[1], CHAN_Z, TGSI_EXEC_DATA_FLOAT); - - micro_mul(&r[2], &r[0], &r[1]); - - fetch_source(mach, &r[3], &inst->Src[0], CHAN_Z, TGSI_EXEC_DATA_FLOAT); - fetch_source(mach, &r[4], &inst->Src[1], CHAN_Y, TGSI_EXEC_DATA_FLOAT); - - micro_mul(&r[5], &r[3], &r[4] ); - micro_sub(&d[CHAN_X], &r[2], &r[5]); - - fetch_source(mach, &r[2], &inst->Src[1], CHAN_X, TGSI_EXEC_DATA_FLOAT); - - micro_mul(&r[3], &r[3], &r[2]); - - fetch_source(mach, &r[5], &inst->Src[0], CHAN_X, TGSI_EXEC_DATA_FLOAT); - - micro_mul(&r[1], &r[1], &r[5]); - micro_sub(&d[CHAN_Y], &r[3], &r[1]); - - micro_mul(&r[5], &r[5], &r[4]); - micro_mul(&r[0], &r[0], &r[2]); - micro_sub(&d[CHAN_Z], &r[5], &r[0]); - - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_X) { - store_dest(mach, &d[CHAN_X], &inst->Dst[0], inst, CHAN_X, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Y) { - store_dest(mach, &d[CHAN_Y], &inst->Dst[0], inst, CHAN_Y, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Z) { - store_dest(mach, &d[CHAN_Z], &inst->Dst[0], inst, CHAN_Z, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) { - store_dest(mach, &OneVec, &inst->Dst[0], inst, CHAN_W, TGSI_EXEC_DATA_FLOAT); - } -} - -static void -exec_dst(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - union tgsi_exec_channel r[2]; - union tgsi_exec_channel d[4]; - - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Y) { - fetch_source(mach, &r[0], &inst->Src[0], CHAN_Y, TGSI_EXEC_DATA_FLOAT); - fetch_source(mach, &r[1], &inst->Src[1], CHAN_Y, TGSI_EXEC_DATA_FLOAT); - micro_mul(&d[CHAN_Y], &r[0], &r[1]); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Z) { - fetch_source(mach, &d[CHAN_Z], &inst->Src[0], CHAN_Z, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) { - fetch_source(mach, &d[CHAN_W], &inst->Src[1], CHAN_W, TGSI_EXEC_DATA_FLOAT); - } - - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_X) { - store_dest(mach, &OneVec, &inst->Dst[0], inst, CHAN_X, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Y) { - store_dest(mach, &d[CHAN_Y], &inst->Dst[0], inst, CHAN_Y, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Z) { - store_dest(mach, &d[CHAN_Z], &inst->Dst[0], inst, CHAN_Z, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) { - store_dest(mach, &d[CHAN_W], &inst->Dst[0], inst, CHAN_W, TGSI_EXEC_DATA_FLOAT); - } -} - -static void -exec_log(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - union tgsi_exec_channel r[3]; - - fetch_source(mach, &r[0], &inst->Src[0], CHAN_X, TGSI_EXEC_DATA_FLOAT); - micro_abs(&r[2], &r[0]); /* r2 = abs(r0) */ - micro_lg2(&r[1], &r[2]); /* r1 = lg2(r2) */ - micro_flr(&r[0], &r[1]); /* r0 = floor(r1) */ - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_X) { - store_dest(mach, &r[0], &inst->Dst[0], inst, CHAN_X, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Y) { - micro_exp2(&r[0], &r[0]); /* r0 = 2 ^ r0 */ - micro_div(&r[0], &r[2], &r[0]); /* r0 = r2 / r0 */ - store_dest(mach, &r[0], &inst->Dst[0], inst, CHAN_Y, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Z) { - store_dest(mach, &r[1], &inst->Dst[0], inst, CHAN_Z, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) { - store_dest(mach, &OneVec, &inst->Dst[0], inst, CHAN_W, TGSI_EXEC_DATA_FLOAT); - } -} - -static void -exec_exp(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - union tgsi_exec_channel r[3]; - - fetch_source(mach, &r[0], &inst->Src[0], CHAN_X, TGSI_EXEC_DATA_FLOAT); - micro_flr(&r[1], &r[0]); /* r1 = floor(r0) */ - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_X) { - micro_exp2(&r[2], &r[1]); /* r2 = 2 ^ r1 */ - store_dest(mach, &r[2], &inst->Dst[0], inst, CHAN_X, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Y) { - micro_sub(&r[2], &r[0], &r[1]); /* r2 = r0 - r1 */ - store_dest(mach, &r[2], &inst->Dst[0], inst, CHAN_Y, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Z) { - micro_exp2(&r[2], &r[0]); /* r2 = 2 ^ r0 */ - store_dest(mach, &r[2], &inst->Dst[0], inst, CHAN_Z, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) { - store_dest(mach, &OneVec, &inst->Dst[0], inst, CHAN_W, TGSI_EXEC_DATA_FLOAT); - } -} - -static void -exec_lit(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - union tgsi_exec_channel r[3]; - union tgsi_exec_channel d[3]; - - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_YZ) { - fetch_source(mach, &r[0], &inst->Src[0], CHAN_X, TGSI_EXEC_DATA_FLOAT); - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Z) { - fetch_source(mach, &r[1], &inst->Src[0], CHAN_Y, TGSI_EXEC_DATA_FLOAT); - micro_max(&r[1], &r[1], &ZeroVec); - - fetch_source(mach, &r[2], &inst->Src[0], CHAN_W, TGSI_EXEC_DATA_FLOAT); - micro_min(&r[2], &r[2], &P128Vec); - micro_max(&r[2], &r[2], &M128Vec); - micro_pow(&r[1], &r[1], &r[2]); - micro_lt(&d[CHAN_Z], &ZeroVec, &r[0], &r[1], &ZeroVec); - store_dest(mach, &d[CHAN_Z], &inst->Dst[0], inst, CHAN_Z, TGSI_EXEC_DATA_FLOAT); - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_Y) { - micro_max(&d[CHAN_Y], &r[0], &ZeroVec); - store_dest(mach, &d[CHAN_Y], &inst->Dst[0], inst, CHAN_Y, TGSI_EXEC_DATA_FLOAT); - } - } - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_X) { - store_dest(mach, &OneVec, &inst->Dst[0], inst, CHAN_X, TGSI_EXEC_DATA_FLOAT); - } - - if (inst->Dst[0].Register.WriteMask & TGSI_WRITEMASK_W) { - store_dest(mach, &OneVec, &inst->Dst[0], inst, CHAN_W, TGSI_EXEC_DATA_FLOAT); - } -} - -static void -exec_break(struct tgsi_exec_machine *mach) -{ - if (mach->BreakType == TGSI_EXEC_BREAK_INSIDE_LOOP) { - /* turn off loop channels for each enabled exec channel */ - mach->LoopMask &= ~mach->ExecMask; - /* Todo: if mach->LoopMask == 0, jump to end of loop */ - UPDATE_EXEC_MASK(mach); - } else { - assert(mach->BreakType == TGSI_EXEC_BREAK_INSIDE_SWITCH); - - mach->Switch.mask = 0x0; - - UPDATE_EXEC_MASK(mach); - } -} - -static void -exec_switch(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - assert(mach->SwitchStackTop < TGSI_EXEC_MAX_SWITCH_NESTING); - assert(mach->BreakStackTop < TGSI_EXEC_MAX_BREAK_STACK); - - mach->SwitchStack[mach->SwitchStackTop++] = mach->Switch; - fetch_source(mach, &mach->Switch.selector, &inst->Src[0], CHAN_X, TGSI_EXEC_DATA_UINT); - mach->Switch.mask = 0x0; - mach->Switch.defaultMask = 0x0; - - mach->BreakStack[mach->BreakStackTop++] = mach->BreakType; - mach->BreakType = TGSI_EXEC_BREAK_INSIDE_SWITCH; - - UPDATE_EXEC_MASK(mach); -} - -static void -exec_case(struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst) -{ - uint prevMask = mach->SwitchStack[mach->SwitchStackTop - 1].mask; - union tgsi_exec_channel src; - uint mask = 0; - - fetch_source(mach, &src, &inst->Src[0], CHAN_X, TGSI_EXEC_DATA_UINT); - - if (mach->Switch.selector.u[0] == src.u[0]) { - mask |= 0x1; - } - if (mach->Switch.selector.u[1] == src.u[1]) { - mask |= 0x2; - } - if (mach->Switch.selector.u[2] == src.u[2]) { - mask |= 0x4; - } - if (mach->Switch.selector.u[3] == src.u[3]) { - mask |= 0x8; - } - - mach->Switch.defaultMask |= mask; - - mach->Switch.mask |= mask & prevMask; - - UPDATE_EXEC_MASK(mach); -} - -static void -exec_default(struct tgsi_exec_machine *mach) -{ - uint prevMask = mach->SwitchStack[mach->SwitchStackTop - 1].mask; - - mach->Switch.mask |= ~mach->Switch.defaultMask & prevMask; - - UPDATE_EXEC_MASK(mach); -} - -static void -exec_endswitch(struct tgsi_exec_machine *mach) -{ - mach->Switch = mach->SwitchStack[--mach->SwitchStackTop]; - mach->BreakType = mach->BreakStack[--mach->BreakStackTop]; - - UPDATE_EXEC_MASK(mach); -} - -static void -micro_i2f(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->f[0] = (float)src->i[0]; - dst->f[1] = (float)src->i[1]; - dst->f[2] = (float)src->i[2]; - dst->f[3] = (float)src->i[3]; -} - -static void -micro_not(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->u[0] = ~src->u[0]; - dst->u[1] = ~src->u[1]; - dst->u[2] = ~src->u[2]; - dst->u[3] = ~src->u[3]; -} - -static void -micro_shl(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->u[0] = src0->u[0] << src1->u[0]; - dst->u[1] = src0->u[1] << src1->u[1]; - dst->u[2] = src0->u[2] << src1->u[2]; - dst->u[3] = src0->u[3] << src1->u[3]; -} - -static void -micro_and(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->u[0] = src0->u[0] & src1->u[0]; - dst->u[1] = src0->u[1] & src1->u[1]; - dst->u[2] = src0->u[2] & src1->u[2]; - dst->u[3] = src0->u[3] & src1->u[3]; -} - -static void -micro_or(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->u[0] = src0->u[0] | src1->u[0]; - dst->u[1] = src0->u[1] | src1->u[1]; - dst->u[2] = src0->u[2] | src1->u[2]; - dst->u[3] = src0->u[3] | src1->u[3]; -} - -static void -micro_xor(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->u[0] = src0->u[0] ^ src1->u[0]; - dst->u[1] = src0->u[1] ^ src1->u[1]; - dst->u[2] = src0->u[2] ^ src1->u[2]; - dst->u[3] = src0->u[3] ^ src1->u[3]; -} - -static void -micro_mod(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->i[0] = src0->i[0] % src1->i[0]; - dst->i[1] = src0->i[1] % src1->i[1]; - dst->i[2] = src0->i[2] % src1->i[2]; - dst->i[3] = src0->i[3] % src1->i[3]; -} - -static void -micro_f2i(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->i[0] = (int)src->f[0]; - dst->i[1] = (int)src->f[1]; - dst->i[2] = (int)src->f[2]; - dst->i[3] = (int)src->f[3]; -} - -static void -micro_idiv(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->i[0] = src0->i[0] / src1->i[0]; - dst->i[1] = src0->i[1] / src1->i[1]; - dst->i[2] = src0->i[2] / src1->i[2]; - dst->i[3] = src0->i[3] / src1->i[3]; -} - -static void -micro_imax(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->i[0] = src0->i[0] > src1->i[0] ? src0->i[0] : src1->i[0]; - dst->i[1] = src0->i[1] > src1->i[1] ? src0->i[1] : src1->i[1]; - dst->i[2] = src0->i[2] > src1->i[2] ? src0->i[2] : src1->i[2]; - dst->i[3] = src0->i[3] > src1->i[3] ? src0->i[3] : src1->i[3]; -} - -static void -micro_imin(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->i[0] = src0->i[0] < src1->i[0] ? src0->i[0] : src1->i[0]; - dst->i[1] = src0->i[1] < src1->i[1] ? src0->i[1] : src1->i[1]; - dst->i[2] = src0->i[2] < src1->i[2] ? src0->i[2] : src1->i[2]; - dst->i[3] = src0->i[3] < src1->i[3] ? src0->i[3] : src1->i[3]; -} - -static void -micro_isge(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->i[0] = src0->i[0] >= src1->i[0] ? -1 : 0; - dst->i[1] = src0->i[1] >= src1->i[1] ? -1 : 0; - dst->i[2] = src0->i[2] >= src1->i[2] ? -1 : 0; - dst->i[3] = src0->i[3] >= src1->i[3] ? -1 : 0; -} - -static void -micro_ishr(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->i[0] = src0->i[0] >> src1->i[0]; - dst->i[1] = src0->i[1] >> src1->i[1]; - dst->i[2] = src0->i[2] >> src1->i[2]; - dst->i[3] = src0->i[3] >> src1->i[3]; -} - -static void -micro_islt(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->i[0] = src0->i[0] < src1->i[0] ? -1 : 0; - dst->i[1] = src0->i[1] < src1->i[1] ? -1 : 0; - dst->i[2] = src0->i[2] < src1->i[2] ? -1 : 0; - dst->i[3] = src0->i[3] < src1->i[3] ? -1 : 0; -} - -static void -micro_f2u(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->u[0] = (uint)src->f[0]; - dst->u[1] = (uint)src->f[1]; - dst->u[2] = (uint)src->f[2]; - dst->u[3] = (uint)src->f[3]; -} - -static void -micro_u2f(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->f[0] = (float)src->u[0]; - dst->f[1] = (float)src->u[1]; - dst->f[2] = (float)src->u[2]; - dst->f[3] = (float)src->u[3]; -} - -static void -micro_uadd(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->u[0] = src0->u[0] + src1->u[0]; - dst->u[1] = src0->u[1] + src1->u[1]; - dst->u[2] = src0->u[2] + src1->u[2]; - dst->u[3] = src0->u[3] + src1->u[3]; -} - -static void -micro_udiv(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->u[0] = src0->u[0] / src1->u[0]; - dst->u[1] = src0->u[1] / src1->u[1]; - dst->u[2] = src0->u[2] / src1->u[2]; - dst->u[3] = src0->u[3] / src1->u[3]; -} - -static void -micro_umad(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1, - const union tgsi_exec_channel *src2) -{ - dst->u[0] = src0->u[0] * src1->u[0] + src2->u[0]; - dst->u[1] = src0->u[1] * src1->u[1] + src2->u[1]; - dst->u[2] = src0->u[2] * src1->u[2] + src2->u[2]; - dst->u[3] = src0->u[3] * src1->u[3] + src2->u[3]; -} - -static void -micro_umax(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->u[0] = src0->u[0] > src1->u[0] ? src0->u[0] : src1->u[0]; - dst->u[1] = src0->u[1] > src1->u[1] ? src0->u[1] : src1->u[1]; - dst->u[2] = src0->u[2] > src1->u[2] ? src0->u[2] : src1->u[2]; - dst->u[3] = src0->u[3] > src1->u[3] ? src0->u[3] : src1->u[3]; -} - -static void -micro_umin(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->u[0] = src0->u[0] < src1->u[0] ? src0->u[0] : src1->u[0]; - dst->u[1] = src0->u[1] < src1->u[1] ? src0->u[1] : src1->u[1]; - dst->u[2] = src0->u[2] < src1->u[2] ? src0->u[2] : src1->u[2]; - dst->u[3] = src0->u[3] < src1->u[3] ? src0->u[3] : src1->u[3]; -} - -static void -micro_umod(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->u[0] = src0->u[0] % src1->u[0]; - dst->u[1] = src0->u[1] % src1->u[1]; - dst->u[2] = src0->u[2] % src1->u[2]; - dst->u[3] = src0->u[3] % src1->u[3]; -} - -static void -micro_umul(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->u[0] = src0->u[0] * src1->u[0]; - dst->u[1] = src0->u[1] * src1->u[1]; - dst->u[2] = src0->u[2] * src1->u[2]; - dst->u[3] = src0->u[3] * src1->u[3]; -} - -static void -micro_useq(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->u[0] = src0->u[0] == src1->u[0] ? ~0 : 0; - dst->u[1] = src0->u[1] == src1->u[1] ? ~0 : 0; - dst->u[2] = src0->u[2] == src1->u[2] ? ~0 : 0; - dst->u[3] = src0->u[3] == src1->u[3] ? ~0 : 0; -} - -static void -micro_usge(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->u[0] = src0->u[0] >= src1->u[0] ? ~0 : 0; - dst->u[1] = src0->u[1] >= src1->u[1] ? ~0 : 0; - dst->u[2] = src0->u[2] >= src1->u[2] ? ~0 : 0; - dst->u[3] = src0->u[3] >= src1->u[3] ? ~0 : 0; -} - -static void -micro_ushr(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->u[0] = src0->u[0] >> src1->u[0]; - dst->u[1] = src0->u[1] >> src1->u[1]; - dst->u[2] = src0->u[2] >> src1->u[2]; - dst->u[3] = src0->u[3] >> src1->u[3]; -} - -static void -micro_uslt(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->u[0] = src0->u[0] < src1->u[0] ? ~0 : 0; - dst->u[1] = src0->u[1] < src1->u[1] ? ~0 : 0; - dst->u[2] = src0->u[2] < src1->u[2] ? ~0 : 0; - dst->u[3] = src0->u[3] < src1->u[3] ? ~0 : 0; -} - -static void -micro_usne(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1) -{ - dst->u[0] = src0->u[0] != src1->u[0] ? ~0 : 0; - dst->u[1] = src0->u[1] != src1->u[1] ? ~0 : 0; - dst->u[2] = src0->u[2] != src1->u[2] ? ~0 : 0; - dst->u[3] = src0->u[3] != src1->u[3] ? ~0 : 0; -} - -static void -micro_uarl(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src) -{ - dst->i[0] = src->u[0]; - dst->i[1] = src->u[1]; - dst->i[2] = src->u[2]; - dst->i[3] = src->u[3]; -} - -static void -micro_ucmp(union tgsi_exec_channel *dst, - const union tgsi_exec_channel *src0, - const union tgsi_exec_channel *src1, - const union tgsi_exec_channel *src2) -{ - dst->u[0] = src0->u[0] ? src1->u[0] : src2->u[0]; - dst->u[1] = src0->u[1] ? src1->u[1] : src2->u[1]; - dst->u[2] = src0->u[2] ? src1->u[2] : src2->u[2]; - dst->u[3] = src0->u[3] ? src1->u[3] : src2->u[3]; -} - -static void -exec_instruction( - struct tgsi_exec_machine *mach, - const struct tgsi_full_instruction *inst, - int *pc ) -{ - union tgsi_exec_channel r[10]; - - (*pc)++; - - switch (inst->Instruction.Opcode) { - case TGSI_OPCODE_ARL: - exec_vector_unary(mach, inst, micro_arl, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_MOV: - exec_vector_unary(mach, inst, micro_mov, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_LIT: - exec_lit(mach, inst); - break; - - case TGSI_OPCODE_RCP: - exec_scalar_unary(mach, inst, micro_rcp, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_RSQ: - exec_scalar_unary(mach, inst, micro_rsq, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_EXP: - exec_exp(mach, inst); - break; - - case TGSI_OPCODE_LOG: - exec_log(mach, inst); - break; - - case TGSI_OPCODE_MUL: - exec_vector_binary(mach, inst, micro_mul, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_ADD: - exec_vector_binary(mach, inst, micro_add, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_DP3: - exec_dp3(mach, inst); - break; - - case TGSI_OPCODE_DP4: - exec_dp4(mach, inst); - break; - - case TGSI_OPCODE_DST: - exec_dst(mach, inst); - break; - - case TGSI_OPCODE_MIN: - exec_vector_binary(mach, inst, micro_min, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_MAX: - exec_vector_binary(mach, inst, micro_max, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_SLT: - exec_vector_binary(mach, inst, micro_slt, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_SGE: - exec_vector_binary(mach, inst, micro_sge, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_MAD: - exec_vector_trinary(mach, inst, micro_mad, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_SUB: - exec_vector_binary(mach, inst, micro_sub, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_LRP: - exec_vector_trinary(mach, inst, micro_lrp, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_CND: - exec_vector_trinary(mach, inst, micro_cnd, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_DP2A: - exec_dp2a(mach, inst); - break; - - case TGSI_OPCODE_FRC: - exec_vector_unary(mach, inst, micro_frc, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_CLAMP: - exec_vector_trinary(mach, inst, micro_clamp, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_FLR: - exec_vector_unary(mach, inst, micro_flr, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_ROUND: - exec_vector_unary(mach, inst, micro_rnd, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_EX2: - exec_scalar_unary(mach, inst, micro_exp2, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_LG2: - exec_scalar_unary(mach, inst, micro_lg2, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_POW: - exec_scalar_binary(mach, inst, micro_pow, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_XPD: - exec_xpd(mach, inst); - break; - - case TGSI_OPCODE_ABS: - exec_vector_unary(mach, inst, micro_abs, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_RCC: - exec_scalar_unary(mach, inst, micro_rcc, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_DPH: - exec_dph(mach, inst); - break; - - case TGSI_OPCODE_COS: - exec_scalar_unary(mach, inst, micro_cos, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_DDX: - exec_vector_unary(mach, inst, micro_ddx, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_DDY: - exec_vector_unary(mach, inst, micro_ddy, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_KILP: - exec_kilp (mach, inst); - break; - - case TGSI_OPCODE_KIL: - exec_kil (mach, inst); - break; - - case TGSI_OPCODE_PK2H: - assert (0); - break; - - case TGSI_OPCODE_PK2US: - assert (0); - break; - - case TGSI_OPCODE_PK4B: - assert (0); - break; - - case TGSI_OPCODE_PK4UB: - assert (0); - break; - - case TGSI_OPCODE_RFL: - exec_rfl(mach, inst); - break; - - case TGSI_OPCODE_SEQ: - exec_vector_binary(mach, inst, micro_seq, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_SFL: - exec_vector(mach, inst, micro_sfl, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_SGT: - exec_vector_binary(mach, inst, micro_sgt, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_SIN: - exec_scalar_unary(mach, inst, micro_sin, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_SLE: - exec_vector_binary(mach, inst, micro_sle, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_SNE: - exec_vector_binary(mach, inst, micro_sne, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_STR: - exec_vector(mach, inst, micro_str, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_TEX: - /* simple texture lookup */ - /* src[0] = texcoord */ - /* src[1] = sampler unit */ - exec_tex(mach, inst, TEX_MODIFIER_NONE); - break; - - case TGSI_OPCODE_TXB: - /* Texture lookup with lod bias */ - /* src[0] = texcoord (src[0].w = LOD bias) */ - /* src[1] = sampler unit */ - exec_tex(mach, inst, TEX_MODIFIER_LOD_BIAS); - break; - - case TGSI_OPCODE_TXD: - /* Texture lookup with explict partial derivatives */ - /* src[0] = texcoord */ - /* src[1] = d[strq]/dx */ - /* src[2] = d[strq]/dy */ - /* src[3] = sampler unit */ - exec_txd(mach, inst); - break; - - case TGSI_OPCODE_TXL: - /* Texture lookup with explit LOD */ - /* src[0] = texcoord (src[0].w = LOD) */ - /* src[1] = sampler unit */ - exec_tex(mach, inst, TEX_MODIFIER_EXPLICIT_LOD); - break; - - case TGSI_OPCODE_TXP: - /* Texture lookup with projection */ - /* src[0] = texcoord (src[0].w = projection) */ - /* src[1] = sampler unit */ - exec_tex(mach, inst, TEX_MODIFIER_PROJECTED); - break; - - case TGSI_OPCODE_UP2H: - assert (0); - break; - - case TGSI_OPCODE_UP2US: - assert (0); - break; - - case TGSI_OPCODE_UP4B: - assert (0); - break; - - case TGSI_OPCODE_UP4UB: - assert (0); - break; - - case TGSI_OPCODE_X2D: - exec_x2d(mach, inst); - break; - - case TGSI_OPCODE_ARA: - assert (0); - break; - - case TGSI_OPCODE_ARR: - exec_vector_unary(mach, inst, micro_arr, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_BRA: - assert (0); - break; - - case TGSI_OPCODE_CAL: - /* skip the call if no execution channels are enabled */ - if (mach->ExecMask) { - /* do the call */ - - /* First, record the depths of the execution stacks. - * This is important for deeply nested/looped return statements. - * We have to unwind the stacks by the correct amount. For a - * real code generator, we could determine the number of entries - * to pop off each stack with simple static analysis and avoid - * implementing this data structure at run time. - */ - mach->CallStack[mach->CallStackTop].CondStackTop = mach->CondStackTop; - mach->CallStack[mach->CallStackTop].LoopStackTop = mach->LoopStackTop; - mach->CallStack[mach->CallStackTop].ContStackTop = mach->ContStackTop; - mach->CallStack[mach->CallStackTop].SwitchStackTop = mach->SwitchStackTop; - mach->CallStack[mach->CallStackTop].BreakStackTop = mach->BreakStackTop; - /* note that PC was already incremented above */ - mach->CallStack[mach->CallStackTop].ReturnAddr = *pc; - - mach->CallStackTop++; - - /* Second, push the Cond, Loop, Cont, Func stacks */ - assert(mach->CondStackTop < TGSI_EXEC_MAX_COND_NESTING); - assert(mach->LoopStackTop < TGSI_EXEC_MAX_LOOP_NESTING); - assert(mach->ContStackTop < TGSI_EXEC_MAX_LOOP_NESTING); - assert(mach->SwitchStackTop < TGSI_EXEC_MAX_SWITCH_NESTING); - assert(mach->BreakStackTop < TGSI_EXEC_MAX_BREAK_STACK); - assert(mach->FuncStackTop < TGSI_EXEC_MAX_CALL_NESTING); - - mach->CondStack[mach->CondStackTop++] = mach->CondMask; - mach->LoopStack[mach->LoopStackTop++] = mach->LoopMask; - mach->ContStack[mach->ContStackTop++] = mach->ContMask; - mach->SwitchStack[mach->SwitchStackTop++] = mach->Switch; - mach->BreakStack[mach->BreakStackTop++] = mach->BreakType; - mach->FuncStack[mach->FuncStackTop++] = mach->FuncMask; - - /* Finally, jump to the subroutine */ - *pc = inst->Label.Label; - } - break; - - case TGSI_OPCODE_RET: - mach->FuncMask &= ~mach->ExecMask; - UPDATE_EXEC_MASK(mach); - - if (mach->FuncMask == 0x0) { - /* really return now (otherwise, keep executing */ - - if (mach->CallStackTop == 0) { - /* returning from main() */ - mach->CondStackTop = 0; - mach->LoopStackTop = 0; - *pc = -1; - return; - } - - assert(mach->CallStackTop > 0); - mach->CallStackTop--; - - mach->CondStackTop = mach->CallStack[mach->CallStackTop].CondStackTop; - mach->CondMask = mach->CondStack[mach->CondStackTop]; - - mach->LoopStackTop = mach->CallStack[mach->CallStackTop].LoopStackTop; - mach->LoopMask = mach->LoopStack[mach->LoopStackTop]; - - mach->ContStackTop = mach->CallStack[mach->CallStackTop].ContStackTop; - mach->ContMask = mach->ContStack[mach->ContStackTop]; - - mach->SwitchStackTop = mach->CallStack[mach->CallStackTop].SwitchStackTop; - mach->Switch = mach->SwitchStack[mach->SwitchStackTop]; - - mach->BreakStackTop = mach->CallStack[mach->CallStackTop].BreakStackTop; - mach->BreakType = mach->BreakStack[mach->BreakStackTop]; - - assert(mach->FuncStackTop > 0); - mach->FuncMask = mach->FuncStack[--mach->FuncStackTop]; - - *pc = mach->CallStack[mach->CallStackTop].ReturnAddr; - - UPDATE_EXEC_MASK(mach); - } - break; - - case TGSI_OPCODE_SSG: - exec_vector_unary(mach, inst, micro_sgn, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_CMP: - exec_vector_trinary(mach, inst, micro_cmp, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_SCS: - exec_scs(mach, inst); - break; - - case TGSI_OPCODE_NRM: - exec_nrm3(mach, inst); - break; - - case TGSI_OPCODE_NRM4: - exec_nrm4(mach, inst); - break; - - case TGSI_OPCODE_DIV: - exec_vector_binary(mach, inst, micro_div, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_DP2: - exec_dp2(mach, inst); - break; - - case TGSI_OPCODE_IF: - /* push CondMask */ - assert(mach->CondStackTop < TGSI_EXEC_MAX_COND_NESTING); - mach->CondStack[mach->CondStackTop++] = mach->CondMask; - FETCH( &r[0], 0, CHAN_X ); - /* update CondMask */ - if( ! r[0].u[0] ) { - mach->CondMask &= ~0x1; - } - if( ! r[0].u[1] ) { - mach->CondMask &= ~0x2; - } - if( ! r[0].u[2] ) { - mach->CondMask &= ~0x4; - } - if( ! r[0].u[3] ) { - mach->CondMask &= ~0x8; - } - UPDATE_EXEC_MASK(mach); - /* Todo: If CondMask==0, jump to ELSE */ - break; - - case TGSI_OPCODE_ELSE: - /* invert CondMask wrt previous mask */ - { - uint prevMask; - assert(mach->CondStackTop > 0); - prevMask = mach->CondStack[mach->CondStackTop - 1]; - mach->CondMask = ~mach->CondMask & prevMask; - UPDATE_EXEC_MASK(mach); - /* Todo: If CondMask==0, jump to ENDIF */ - } - break; - - case TGSI_OPCODE_ENDIF: - /* pop CondMask */ - assert(mach->CondStackTop > 0); - mach->CondMask = mach->CondStack[--mach->CondStackTop]; - UPDATE_EXEC_MASK(mach); - break; - - case TGSI_OPCODE_END: - /* make sure we end primitives which haven't - * been explicitly emitted */ - conditional_emit_primitive(mach); - /* halt execution */ - *pc = -1; - break; - - case TGSI_OPCODE_PUSHA: - assert (0); - break; - - case TGSI_OPCODE_POPA: - assert (0); - break; - - case TGSI_OPCODE_CEIL: - exec_vector_unary(mach, inst, micro_ceil, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_I2F: - exec_vector_unary(mach, inst, micro_i2f, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_INT); - break; - - case TGSI_OPCODE_NOT: - exec_vector_unary(mach, inst, micro_not, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT); - break; - - case TGSI_OPCODE_TRUNC: - exec_vector_unary(mach, inst, micro_trunc, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_SHL: - exec_vector_binary(mach, inst, micro_shl, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT); - break; - - case TGSI_OPCODE_AND: - exec_vector_binary(mach, inst, micro_and, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT); - break; - - case TGSI_OPCODE_OR: - exec_vector_binary(mach, inst, micro_or, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT); - break; - - case TGSI_OPCODE_MOD: - exec_vector_binary(mach, inst, micro_mod, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT); - break; - - case TGSI_OPCODE_XOR: - exec_vector_binary(mach, inst, micro_xor, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT); - break; - - case TGSI_OPCODE_SAD: - assert (0); - break; - - case TGSI_OPCODE_TXF: - exec_txf(mach, inst); - break; - - case TGSI_OPCODE_TXQ: - exec_txq(mach, inst); - break; - - case TGSI_OPCODE_EMIT: - emit_vertex(mach); - break; - - case TGSI_OPCODE_ENDPRIM: - emit_primitive(mach); - break; - - case TGSI_OPCODE_BGNLOOP: - /* push LoopMask and ContMasks */ - assert(mach->LoopStackTop < TGSI_EXEC_MAX_LOOP_NESTING); - assert(mach->ContStackTop < TGSI_EXEC_MAX_LOOP_NESTING); - assert(mach->LoopLabelStackTop < TGSI_EXEC_MAX_LOOP_NESTING); - assert(mach->BreakStackTop < TGSI_EXEC_MAX_BREAK_STACK); - - mach->LoopStack[mach->LoopStackTop++] = mach->LoopMask; - mach->ContStack[mach->ContStackTop++] = mach->ContMask; - mach->LoopLabelStack[mach->LoopLabelStackTop++] = *pc - 1; - mach->BreakStack[mach->BreakStackTop++] = mach->BreakType; - mach->BreakType = TGSI_EXEC_BREAK_INSIDE_LOOP; - break; - - case TGSI_OPCODE_ENDLOOP: - /* Restore ContMask, but don't pop */ - assert(mach->ContStackTop > 0); - mach->ContMask = mach->ContStack[mach->ContStackTop - 1]; - UPDATE_EXEC_MASK(mach); - if (mach->ExecMask) { - /* repeat loop: jump to instruction just past BGNLOOP */ - assert(mach->LoopLabelStackTop > 0); - *pc = mach->LoopLabelStack[mach->LoopLabelStackTop - 1] + 1; - } - else { - /* exit loop: pop LoopMask */ - assert(mach->LoopStackTop > 0); - mach->LoopMask = mach->LoopStack[--mach->LoopStackTop]; - /* pop ContMask */ - assert(mach->ContStackTop > 0); - mach->ContMask = mach->ContStack[--mach->ContStackTop]; - assert(mach->LoopLabelStackTop > 0); - --mach->LoopLabelStackTop; - - mach->BreakType = mach->BreakStack[--mach->BreakStackTop]; - } - UPDATE_EXEC_MASK(mach); - break; - - case TGSI_OPCODE_BRK: - exec_break(mach); - break; - - case TGSI_OPCODE_CONT: - /* turn off cont channels for each enabled exec channel */ - mach->ContMask &= ~mach->ExecMask; - /* Todo: if mach->LoopMask == 0, jump to end of loop */ - UPDATE_EXEC_MASK(mach); - break; - - case TGSI_OPCODE_BGNSUB: - /* no-op */ - break; - - case TGSI_OPCODE_ENDSUB: - /* - * XXX: This really should be a no-op. We should never reach this opcode. - */ - - assert(mach->CallStackTop > 0); - mach->CallStackTop--; - - mach->CondStackTop = mach->CallStack[mach->CallStackTop].CondStackTop; - mach->CondMask = mach->CondStack[mach->CondStackTop]; - - mach->LoopStackTop = mach->CallStack[mach->CallStackTop].LoopStackTop; - mach->LoopMask = mach->LoopStack[mach->LoopStackTop]; - - mach->ContStackTop = mach->CallStack[mach->CallStackTop].ContStackTop; - mach->ContMask = mach->ContStack[mach->ContStackTop]; - - mach->SwitchStackTop = mach->CallStack[mach->CallStackTop].SwitchStackTop; - mach->Switch = mach->SwitchStack[mach->SwitchStackTop]; - - mach->BreakStackTop = mach->CallStack[mach->CallStackTop].BreakStackTop; - mach->BreakType = mach->BreakStack[mach->BreakStackTop]; - - assert(mach->FuncStackTop > 0); - mach->FuncMask = mach->FuncStack[--mach->FuncStackTop]; - - *pc = mach->CallStack[mach->CallStackTop].ReturnAddr; - - UPDATE_EXEC_MASK(mach); - break; - - case TGSI_OPCODE_NOP: - break; - - case TGSI_OPCODE_BREAKC: - FETCH(&r[0], 0, CHAN_X); - /* update CondMask */ - if (r[0].u[0] && (mach->ExecMask & 0x1)) { - mach->LoopMask &= ~0x1; - } - if (r[0].u[1] && (mach->ExecMask & 0x2)) { - mach->LoopMask &= ~0x2; - } - if (r[0].u[2] && (mach->ExecMask & 0x4)) { - mach->LoopMask &= ~0x4; - } - if (r[0].u[3] && (mach->ExecMask & 0x8)) { - mach->LoopMask &= ~0x8; - } - /* Todo: if mach->LoopMask == 0, jump to end of loop */ - UPDATE_EXEC_MASK(mach); - break; - - case TGSI_OPCODE_F2I: - exec_vector_unary(mach, inst, micro_f2i, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_IDIV: - exec_vector_binary(mach, inst, micro_idiv, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT); - break; - - case TGSI_OPCODE_IMAX: - exec_vector_binary(mach, inst, micro_imax, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT); - break; - - case TGSI_OPCODE_IMIN: - exec_vector_binary(mach, inst, micro_imin, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT); - break; - - case TGSI_OPCODE_INEG: - exec_vector_unary(mach, inst, micro_ineg, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT); - break; - - case TGSI_OPCODE_ISGE: - exec_vector_binary(mach, inst, micro_isge, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT); - break; - - case TGSI_OPCODE_ISHR: - exec_vector_binary(mach, inst, micro_ishr, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT); - break; - - case TGSI_OPCODE_ISLT: - exec_vector_binary(mach, inst, micro_islt, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT); - break; - - case TGSI_OPCODE_F2U: - exec_vector_unary(mach, inst, micro_f2u, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_FLOAT); - break; - - case TGSI_OPCODE_U2F: - exec_vector_unary(mach, inst, micro_u2f, TGSI_EXEC_DATA_FLOAT, TGSI_EXEC_DATA_UINT); - break; - - case TGSI_OPCODE_UADD: - exec_vector_binary(mach, inst, micro_uadd, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT); - break; - - case TGSI_OPCODE_UDIV: - exec_vector_binary(mach, inst, micro_udiv, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT); - break; - - case TGSI_OPCODE_UMAD: - exec_vector_trinary(mach, inst, micro_umad, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT); - break; - - case TGSI_OPCODE_UMAX: - exec_vector_binary(mach, inst, micro_umax, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT); - break; - - case TGSI_OPCODE_UMIN: - exec_vector_binary(mach, inst, micro_umin, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT); - break; - - case TGSI_OPCODE_UMOD: - exec_vector_binary(mach, inst, micro_umod, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT); - break; - - case TGSI_OPCODE_UMUL: - exec_vector_binary(mach, inst, micro_umul, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT); - break; - - case TGSI_OPCODE_USEQ: - exec_vector_binary(mach, inst, micro_useq, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT); - break; - - case TGSI_OPCODE_USGE: - exec_vector_binary(mach, inst, micro_usge, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT); - break; - - case TGSI_OPCODE_USHR: - exec_vector_binary(mach, inst, micro_ushr, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT); - break; - - case TGSI_OPCODE_USLT: - exec_vector_binary(mach, inst, micro_uslt, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT); - break; - - case TGSI_OPCODE_USNE: - exec_vector_binary(mach, inst, micro_usne, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT); - break; - - case TGSI_OPCODE_SWITCH: - exec_switch(mach, inst); - break; - - case TGSI_OPCODE_CASE: - exec_case(mach, inst); - break; - - case TGSI_OPCODE_DEFAULT: - exec_default(mach); - break; - - case TGSI_OPCODE_ENDSWITCH: - exec_endswitch(mach); - break; - - case TGSI_OPCODE_LOAD: - assert(0); - break; - - case TGSI_OPCODE_LOAD_MS: - assert(0); - break; - - case TGSI_OPCODE_SAMPLE: - exec_sample(mach, inst, TEX_MODIFIER_NONE); - break; - - case TGSI_OPCODE_SAMPLE_B: - exec_sample(mach, inst, TEX_MODIFIER_LOD_BIAS); - break; - - case TGSI_OPCODE_SAMPLE_C: - exec_sample(mach, inst, TEX_MODIFIER_NONE); - break; - - case TGSI_OPCODE_SAMPLE_C_LZ: - exec_sample(mach, inst, TEX_MODIFIER_LOD_BIAS); - break; - - case TGSI_OPCODE_SAMPLE_D: - exec_sample_d(mach, inst); - break; - - case TGSI_OPCODE_SAMPLE_L: - exec_sample(mach, inst, TEX_MODIFIER_EXPLICIT_LOD); - break; - - case TGSI_OPCODE_GATHER4: - assert(0); - break; - - case TGSI_OPCODE_RESINFO: - assert(0); - break; - - case TGSI_OPCODE_SAMPLE_POS: - assert(0); - break; - - case TGSI_OPCODE_SAMPLE_INFO: - assert(0); - break; - - case TGSI_OPCODE_UARL: - exec_vector_unary(mach, inst, micro_uarl, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_UINT); - break; - - case TGSI_OPCODE_UCMP: - exec_vector_trinary(mach, inst, micro_ucmp, TGSI_EXEC_DATA_UINT, TGSI_EXEC_DATA_UINT); - break; - - case TGSI_OPCODE_IABS: - exec_vector_unary(mach, inst, micro_iabs, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT); - break; - - case TGSI_OPCODE_ISSG: - exec_vector_unary(mach, inst, micro_isgn, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT); - break; - - default: - assert( 0 ); - } -} - - -#define DEBUG_EXECUTION 0 - - -/** - * Run TGSI interpreter. - * \return bitmask of "alive" quad components - */ -uint -tgsi_exec_machine_run( struct tgsi_exec_machine *mach ) -{ - uint i; - int pc = 0; - - mach->CondMask = 0xf; - mach->LoopMask = 0xf; - mach->ContMask = 0xf; - mach->FuncMask = 0xf; - mach->ExecMask = 0xf; - - mach->Switch.mask = 0xf; - - assert(mach->CondStackTop == 0); - assert(mach->LoopStackTop == 0); - assert(mach->ContStackTop == 0); - assert(mach->SwitchStackTop == 0); - assert(mach->BreakStackTop == 0); - assert(mach->CallStackTop == 0); - - mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0] = 0; - mach->Temps[TEMP_OUTPUT_I].xyzw[TEMP_OUTPUT_C].u[0] = 0; - - if( mach->Processor == TGSI_PROCESSOR_GEOMETRY ) { - mach->Temps[TEMP_PRIMITIVE_I].xyzw[TEMP_PRIMITIVE_C].u[0] = 0; - mach->Primitives[0] = 0; - } - - /* execute declarations (interpolants) */ - for (i = 0; i < mach->NumDeclarations; i++) { - exec_declaration( mach, mach->Declarations+i ); - } - - { -#if DEBUG_EXECUTION - struct tgsi_exec_vector temps[TGSI_EXEC_NUM_TEMPS + TGSI_EXEC_NUM_TEMP_EXTRAS]; - struct tgsi_exec_vector outputs[PIPE_MAX_ATTRIBS]; - uint inst = 1; - - memcpy(temps, mach->Temps, sizeof(temps)); - memcpy(outputs, mach->Outputs, sizeof(outputs)); -#endif - - /* execute instructions, until pc is set to -1 */ - while (pc != -1) { - -#if DEBUG_EXECUTION - uint i; - - tgsi_dump_instruction(&mach->Instructions[pc], inst++); -#endif - - assert(pc < (int) mach->NumInstructions); - exec_instruction(mach, mach->Instructions + pc, &pc); - -#if DEBUG_EXECUTION - for (i = 0; i < TGSI_EXEC_NUM_TEMPS + TGSI_EXEC_NUM_TEMP_EXTRAS; i++) { - if (memcmp(&temps[i], &mach->Temps[i], sizeof(temps[i]))) { - uint j; - - memcpy(&temps[i], &mach->Temps[i], sizeof(temps[i])); - debug_printf("TEMP[%2u] = ", i); - for (j = 0; j < 4; j++) { - if (j > 0) { - debug_printf(" "); - } - debug_printf("(%6f %u, %6f %u, %6f %u, %6f %u)\n", - temps[i].xyzw[0].f[j], temps[i].xyzw[0].u[j], - temps[i].xyzw[1].f[j], temps[i].xyzw[1].u[j], - temps[i].xyzw[2].f[j], temps[i].xyzw[2].u[j], - temps[i].xyzw[3].f[j], temps[i].xyzw[3].u[j]); - } - } - } - for (i = 0; i < PIPE_MAX_ATTRIBS; i++) { - if (memcmp(&outputs[i], &mach->Outputs[i], sizeof(outputs[i]))) { - uint j; - - memcpy(&outputs[i], &mach->Outputs[i], sizeof(outputs[i])); - debug_printf("OUT[%2u] = ", i); - for (j = 0; j < 4; j++) { - if (j > 0) { - debug_printf(" "); - } - debug_printf("(%6f %u, %6f %u, %6f %u, %6f %u)\n", - outputs[i].xyzw[0].f[j], outputs[i].xyzw[0].u[j], - outputs[i].xyzw[1].f[j], outputs[i].xyzw[1].u[j], - outputs[i].xyzw[2].f[j], outputs[i].xyzw[2].u[j], - outputs[i].xyzw[3].f[j], outputs[i].xyzw[3].u[j]); - } - } - } -#endif - } - } - -#if 0 - /* we scale from floats in [0,1] to Zbuffer ints in sp_quad_depth_test.c */ - if (mach->Processor == TGSI_PROCESSOR_FRAGMENT) { - /* - * Scale back depth component. - */ - for (i = 0; i < 4; i++) - mach->Outputs[0].xyzw[2].f[i] *= ctx->DrawBuffer->_DepthMaxF; - } -#endif - - /* Strictly speaking, these assertions aren't really needed but they - * can potentially catch some bugs in the control flow code. - */ - assert(mach->CondStackTop == 0); - assert(mach->LoopStackTop == 0); - assert(mach->ContStackTop == 0); - assert(mach->SwitchStackTop == 0); - assert(mach->BreakStackTop == 0); - assert(mach->CallStackTop == 0); - - return ~mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0]; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_exec.h b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_exec.h deleted file mode 100644 index 2fd1f97d06f..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_exec.h +++ /dev/null @@ -1,422 +0,0 @@ -/************************************************************************** - * - * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * Copyright 2009-2010 VMware, Inc. All rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef TGSI_EXEC_H -#define TGSI_EXEC_H - -#include "pipe/p_compiler.h" -#include "pipe/p_state.h" -#include "pipe/p_shader_tokens.h" - -#if defined __cplusplus -extern "C" { -#endif - - -#define NUM_CHANNELS 4 /* R,G,B,A */ -#define QUAD_SIZE 4 /* 4 pixel/quad */ - - -/** - * Registers may be treated as float, signed int or unsigned int. - */ -union tgsi_exec_channel -{ - float f[QUAD_SIZE]; - int i[QUAD_SIZE]; - unsigned u[QUAD_SIZE]; -}; - -/** - * A vector[RGBA] of channels[4 pixels] - */ -struct tgsi_exec_vector -{ - union tgsi_exec_channel xyzw[NUM_CHANNELS]; -}; - -/** - * For fragment programs, information for computing fragment input - * values from plane equation of the triangle/line. - */ -struct tgsi_interp_coef -{ - float a0[NUM_CHANNELS]; /* in an xyzw layout */ - float dadx[NUM_CHANNELS]; - float dady[NUM_CHANNELS]; -}; - -enum tgsi_sampler_control { - tgsi_sampler_lod_bias, - tgsi_sampler_lod_explicit -}; - -/** - * Information for sampling textures, which must be implemented - * by code outside the TGSI executor. - */ -struct tgsi_sampler -{ - /** Get samples for four fragments in a quad */ - void (*get_samples)(struct tgsi_sampler *sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]); - void (*get_dims)(struct tgsi_sampler *sampler, int level, - int dims[4]); - void (*get_texel)(struct tgsi_sampler *sampler, const int i[QUAD_SIZE], - const int j[QUAD_SIZE], const int k[QUAD_SIZE], - const int lod[QUAD_SIZE], const int8_t offset[3], - float rgba[NUM_CHANNELS][QUAD_SIZE]); -}; - -#define TGSI_EXEC_NUM_TEMPS 128 -#define TGSI_EXEC_NUM_IMMEDIATES 256 -#define TGSI_EXEC_NUM_TEMP_ARRAYS 8 - -/* - * Locations of various utility registers (_I = Index, _C = Channel) - */ -#define TGSI_EXEC_TEMP_00000000_I (TGSI_EXEC_NUM_TEMPS + 0) -#define TGSI_EXEC_TEMP_00000000_C 0 - -#define TGSI_EXEC_TEMP_7FFFFFFF_I (TGSI_EXEC_NUM_TEMPS + 0) -#define TGSI_EXEC_TEMP_7FFFFFFF_C 1 - -#define TGSI_EXEC_TEMP_80000000_I (TGSI_EXEC_NUM_TEMPS + 0) -#define TGSI_EXEC_TEMP_80000000_C 2 - -#define TGSI_EXEC_TEMP_FFFFFFFF_I (TGSI_EXEC_NUM_TEMPS + 0) -#define TGSI_EXEC_TEMP_FFFFFFFF_C 3 - -#define TGSI_EXEC_TEMP_ONE_I (TGSI_EXEC_NUM_TEMPS + 1) -#define TGSI_EXEC_TEMP_ONE_C 0 - -#define TGSI_EXEC_TEMP_TWO_I (TGSI_EXEC_NUM_TEMPS + 1) -#define TGSI_EXEC_TEMP_TWO_C 1 - -#define TGSI_EXEC_TEMP_128_I (TGSI_EXEC_NUM_TEMPS + 1) -#define TGSI_EXEC_TEMP_128_C 2 - -#define TGSI_EXEC_TEMP_MINUS_128_I (TGSI_EXEC_NUM_TEMPS + 1) -#define TGSI_EXEC_TEMP_MINUS_128_C 3 - -#define TGSI_EXEC_TEMP_KILMASK_I (TGSI_EXEC_NUM_TEMPS + 2) -#define TGSI_EXEC_TEMP_KILMASK_C 0 - -#define TGSI_EXEC_TEMP_OUTPUT_I (TGSI_EXEC_NUM_TEMPS + 2) -#define TGSI_EXEC_TEMP_OUTPUT_C 1 - -#define TGSI_EXEC_TEMP_PRIMITIVE_I (TGSI_EXEC_NUM_TEMPS + 2) -#define TGSI_EXEC_TEMP_PRIMITIVE_C 2 - -#define TGSI_EXEC_TEMP_THREE_I (TGSI_EXEC_NUM_TEMPS + 2) -#define TGSI_EXEC_TEMP_THREE_C 3 - -#define TGSI_EXEC_TEMP_HALF_I (TGSI_EXEC_NUM_TEMPS + 3) -#define TGSI_EXEC_TEMP_HALF_C 0 - -/* execution mask, each value is either 0 or ~0 */ -#define TGSI_EXEC_MASK_I (TGSI_EXEC_NUM_TEMPS + 3) -#define TGSI_EXEC_MASK_C 1 - -/* 4 register buffer for various purposes */ -#define TGSI_EXEC_TEMP_R0 (TGSI_EXEC_NUM_TEMPS + 4) -#define TGSI_EXEC_NUM_TEMP_R 4 - -#define TGSI_EXEC_TEMP_ADDR (TGSI_EXEC_NUM_TEMPS + 8) -#define TGSI_EXEC_NUM_ADDRS 1 - -/* predicate register */ -#define TGSI_EXEC_TEMP_P0 (TGSI_EXEC_NUM_TEMPS + 9) -#define TGSI_EXEC_NUM_PREDS 1 - -#define TGSI_EXEC_NUM_TEMP_EXTRAS 10 - - - -#define TGSI_EXEC_MAX_NESTING 32 -#define TGSI_EXEC_MAX_COND_NESTING TGSI_EXEC_MAX_NESTING -#define TGSI_EXEC_MAX_LOOP_NESTING TGSI_EXEC_MAX_NESTING -#define TGSI_EXEC_MAX_SWITCH_NESTING TGSI_EXEC_MAX_NESTING -#define TGSI_EXEC_MAX_CALL_NESTING TGSI_EXEC_MAX_NESTING - -/* The maximum number of input attributes per vertex. For 2D - * input register files, this is the stride between two 1D - * arrays. - */ -#define TGSI_EXEC_MAX_INPUT_ATTRIBS 17 - -/* The maximum number of constant vectors per constant buffer. - */ -#define TGSI_EXEC_MAX_CONST_BUFFER 4096 - -/* The maximum number of vertices per primitive */ -#define TGSI_MAX_PRIM_VERTICES 6 - -/* The maximum number of primitives to be generated */ -#define TGSI_MAX_PRIMITIVES 64 - -/* The maximum total number of vertices */ -#define TGSI_MAX_TOTAL_VERTICES (TGSI_MAX_PRIM_VERTICES * TGSI_MAX_PRIMITIVES * PIPE_MAX_ATTRIBS) - -#define TGSI_MAX_MISC_INPUTS 8 - -/** function call/activation record */ -struct tgsi_call_record -{ - uint CondStackTop; - uint LoopStackTop; - uint ContStackTop; - int SwitchStackTop; - int BreakStackTop; - uint ReturnAddr; -}; - - -/* Switch-case block state. */ -struct tgsi_switch_record { - uint mask; /**< execution mask */ - union tgsi_exec_channel selector; /**< a value case statements are compared to */ - uint defaultMask; /**< non-execute mask for default case */ -}; - - -enum tgsi_break_type { - TGSI_EXEC_BREAK_INSIDE_LOOP, - TGSI_EXEC_BREAK_INSIDE_SWITCH -}; - - -#define TGSI_EXEC_MAX_BREAK_STACK (TGSI_EXEC_MAX_LOOP_NESTING + TGSI_EXEC_MAX_SWITCH_NESTING) - - -/** - * Run-time virtual machine state for executing TGSI shader. - */ -struct tgsi_exec_machine -{ - /* Total = program temporaries + internal temporaries - */ - struct tgsi_exec_vector Temps[TGSI_EXEC_NUM_TEMPS + - TGSI_EXEC_NUM_TEMP_EXTRAS]; - struct tgsi_exec_vector TempArray[TGSI_EXEC_NUM_TEMP_ARRAYS][TGSI_EXEC_NUM_TEMPS]; - - float Imms[TGSI_EXEC_NUM_IMMEDIATES][4]; - - float ImmArray[TGSI_EXEC_NUM_IMMEDIATES][4]; - - struct tgsi_exec_vector *Inputs; - struct tgsi_exec_vector *Outputs; - - /* System values */ - unsigned SysSemanticToIndex[TGSI_SEMANTIC_COUNT]; - union tgsi_exec_channel SystemValue[TGSI_MAX_MISC_INPUTS]; - - struct tgsi_exec_vector *Addrs; - struct tgsi_exec_vector *Predicates; - - struct tgsi_sampler **Samplers; - - unsigned ImmLimit; - - const void *Consts[PIPE_MAX_CONSTANT_BUFFERS]; - unsigned ConstsSize[PIPE_MAX_CONSTANT_BUFFERS]; - - const struct tgsi_token *Tokens; /**< Declarations, instructions */ - unsigned Processor; /**< TGSI_PROCESSOR_x */ - - /* GEOMETRY processor only. */ - unsigned *Primitives; - unsigned NumOutputs; - unsigned MaxGeometryShaderOutputs; - - /* FRAGMENT processor only. */ - const struct tgsi_interp_coef *InterpCoefs; - struct tgsi_exec_vector QuadPos; - float Face; /**< +1 if front facing, -1 if back facing */ - bool flatshade_color; - /* Conditional execution masks */ - uint CondMask; /**< For IF/ELSE/ENDIF */ - uint LoopMask; /**< For BGNLOOP/ENDLOOP */ - uint ContMask; /**< For loop CONT statements */ - uint FuncMask; /**< For function calls */ - uint ExecMask; /**< = CondMask & LoopMask */ - - /* Current switch-case state. */ - struct tgsi_switch_record Switch; - - /* Current break type. */ - enum tgsi_break_type BreakType; - - /** Condition mask stack (for nested conditionals) */ - uint CondStack[TGSI_EXEC_MAX_COND_NESTING]; - int CondStackTop; - - /** Loop mask stack (for nested loops) */ - uint LoopStack[TGSI_EXEC_MAX_LOOP_NESTING]; - int LoopStackTop; - - /** Loop label stack */ - uint LoopLabelStack[TGSI_EXEC_MAX_LOOP_NESTING]; - int LoopLabelStackTop; - - /** Loop continue mask stack (see comments in tgsi_exec.c) */ - uint ContStack[TGSI_EXEC_MAX_LOOP_NESTING]; - int ContStackTop; - - /** Switch case stack */ - struct tgsi_switch_record SwitchStack[TGSI_EXEC_MAX_SWITCH_NESTING]; - int SwitchStackTop; - - enum tgsi_break_type BreakStack[TGSI_EXEC_MAX_BREAK_STACK]; - int BreakStackTop; - - /** Function execution mask stack (for executing subroutine code) */ - uint FuncStack[TGSI_EXEC_MAX_CALL_NESTING]; - int FuncStackTop; - - /** Function call stack for saving/restoring the program counter */ - struct tgsi_call_record CallStack[TGSI_EXEC_MAX_CALL_NESTING]; - int CallStackTop; - - struct tgsi_full_instruction *Instructions; - uint NumInstructions; - - struct tgsi_full_declaration *Declarations; - uint NumDeclarations; - - struct tgsi_declaration_resource Resources[PIPE_MAX_SHADER_RESOURCES]; - - boolean UsedGeometryShader; -}; - -struct tgsi_exec_machine * -tgsi_exec_machine_create( void ); - -void -tgsi_exec_machine_destroy(struct tgsi_exec_machine *mach); - - -void -tgsi_exec_machine_bind_shader( - struct tgsi_exec_machine *mach, - const struct tgsi_token *tokens, - uint numSamplers, - struct tgsi_sampler **samplers); - -uint -tgsi_exec_machine_run( - struct tgsi_exec_machine *mach ); - - -void -tgsi_exec_machine_free_data(struct tgsi_exec_machine *mach); - - -boolean -tgsi_check_soa_dependencies(const struct tgsi_full_instruction *inst); - - -static INLINE void -tgsi_set_kill_mask(struct tgsi_exec_machine *mach, unsigned mask) -{ - mach->Temps[TGSI_EXEC_TEMP_KILMASK_I].xyzw[TGSI_EXEC_TEMP_KILMASK_C].u[0] = - mask; -} - - -/** Set execution mask values prior to executing the shader */ -static INLINE void -tgsi_set_exec_mask(struct tgsi_exec_machine *mach, - boolean ch0, boolean ch1, boolean ch2, boolean ch3) -{ - int *mask = mach->Temps[TGSI_EXEC_MASK_I].xyzw[TGSI_EXEC_MASK_C].i; - mask[0] = ch0 ? ~0 : 0; - mask[1] = ch1 ? ~0 : 0; - mask[2] = ch2 ? ~0 : 0; - mask[3] = ch3 ? ~0 : 0; -} - - -extern void -tgsi_exec_set_constant_buffers(struct tgsi_exec_machine *mach, - unsigned num_bufs, - const void **bufs, - const unsigned *buf_sizes); - - -static INLINE int -tgsi_exec_get_shader_param(enum pipe_shader_cap param) -{ - switch(param) { - case PIPE_SHADER_CAP_MAX_INSTRUCTIONS: - case PIPE_SHADER_CAP_MAX_ALU_INSTRUCTIONS: - case PIPE_SHADER_CAP_MAX_TEX_INSTRUCTIONS: - case PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS: - return INT_MAX; - case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH: - return TGSI_EXEC_MAX_NESTING; - case PIPE_SHADER_CAP_MAX_INPUTS: - return TGSI_EXEC_MAX_INPUT_ATTRIBS; - case PIPE_SHADER_CAP_MAX_CONSTS: - return TGSI_EXEC_MAX_CONST_BUFFER; - case PIPE_SHADER_CAP_MAX_CONST_BUFFERS: - return PIPE_MAX_CONSTANT_BUFFERS; - case PIPE_SHADER_CAP_MAX_TEMPS: - return TGSI_EXEC_NUM_TEMPS; - case PIPE_SHADER_CAP_MAX_ADDRS: - return TGSI_EXEC_NUM_ADDRS; - case PIPE_SHADER_CAP_MAX_PREDS: - return TGSI_EXEC_NUM_PREDS; - case PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED: - return 1; - case PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR: - case PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR: - case PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR: - case PIPE_SHADER_CAP_INDIRECT_CONST_ADDR: - return 1; - case PIPE_SHADER_CAP_SUBROUTINES: - return 1; - case PIPE_SHADER_CAP_INTEGERS: - return 1; - case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: - return PIPE_MAX_SAMPLERS; - default: - return 0; - } -} - -#if defined __cplusplus -} /* extern "C" */ -#endif - -#endif /* TGSI_EXEC_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_info.c b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_info.c deleted file mode 100644 index 5b26d8ff09b..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_info.c +++ /dev/null @@ -1,240 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_debug.h" -#include "util/u_memory.h" -#include "tgsi_info.h" - -static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] = -{ - { 1, 1, 0, 0, 0, 0, "ARL", TGSI_OPCODE_ARL }, - { 1, 1, 0, 0, 0, 0, "MOV", TGSI_OPCODE_MOV }, - { 1, 1, 0, 0, 0, 0, "LIT", TGSI_OPCODE_LIT }, - { 1, 1, 0, 0, 0, 0, "RCP", TGSI_OPCODE_RCP }, - { 1, 1, 0, 0, 0, 0, "RSQ", TGSI_OPCODE_RSQ }, - { 1, 1, 0, 0, 0, 0, "EXP", TGSI_OPCODE_EXP }, - { 1, 1, 0, 0, 0, 0, "LOG", TGSI_OPCODE_LOG }, - { 1, 2, 0, 0, 0, 0, "MUL", TGSI_OPCODE_MUL }, - { 1, 2, 0, 0, 0, 0, "ADD", TGSI_OPCODE_ADD }, - { 1, 2, 0, 0, 0, 0, "DP3", TGSI_OPCODE_DP3 }, - { 1, 2, 0, 0, 0, 0, "DP4", TGSI_OPCODE_DP4 }, - { 1, 2, 0, 0, 0, 0, "DST", TGSI_OPCODE_DST }, - { 1, 2, 0, 0, 0, 0, "MIN", TGSI_OPCODE_MIN }, - { 1, 2, 0, 0, 0, 0, "MAX", TGSI_OPCODE_MAX }, - { 1, 2, 0, 0, 0, 0, "SLT", TGSI_OPCODE_SLT }, - { 1, 2, 0, 0, 0, 0, "SGE", TGSI_OPCODE_SGE }, - { 1, 3, 0, 0, 0, 0, "MAD", TGSI_OPCODE_MAD }, - { 1, 2, 0, 0, 0, 0, "SUB", TGSI_OPCODE_SUB }, - { 1, 3, 0, 0, 0, 0, "LRP", TGSI_OPCODE_LRP }, - { 1, 3, 0, 0, 0, 0, "CND", TGSI_OPCODE_CND }, - { 0, 0, 0, 0, 0, 0, "", 20 }, /* removed */ - { 1, 3, 0, 0, 0, 0, "DP2A", TGSI_OPCODE_DP2A }, - { 0, 0, 0, 0, 0, 0, "", 22 }, /* removed */ - { 0, 0, 0, 0, 0, 0, "", 23 }, /* removed */ - { 1, 1, 0, 0, 0, 0, "FRC", TGSI_OPCODE_FRC }, - { 1, 3, 0, 0, 0, 0, "CLAMP", TGSI_OPCODE_CLAMP }, - { 1, 1, 0, 0, 0, 0, "FLR", TGSI_OPCODE_FLR }, - { 1, 1, 0, 0, 0, 0, "ROUND", TGSI_OPCODE_ROUND }, - { 1, 1, 0, 0, 0, 0, "EX2", TGSI_OPCODE_EX2 }, - { 1, 1, 0, 0, 0, 0, "LG2", TGSI_OPCODE_LG2 }, - { 1, 2, 0, 0, 0, 0, "POW", TGSI_OPCODE_POW }, - { 1, 2, 0, 0, 0, 0, "XPD", TGSI_OPCODE_XPD }, - { 0, 0, 0, 0, 0, 0, "", 32 }, /* removed */ - { 1, 1, 0, 0, 0, 0, "ABS", TGSI_OPCODE_ABS }, - { 1, 1, 0, 0, 0, 0, "RCC", TGSI_OPCODE_RCC }, - { 1, 2, 0, 0, 0, 0, "DPH", TGSI_OPCODE_DPH }, - { 1, 1, 0, 0, 0, 0, "COS", TGSI_OPCODE_COS }, - { 1, 1, 0, 0, 0, 0, "DDX", TGSI_OPCODE_DDX }, - { 1, 1, 0, 0, 0, 0, "DDY", TGSI_OPCODE_DDY }, - { 0, 0, 0, 0, 0, 0, "KILP", TGSI_OPCODE_KILP }, - { 1, 1, 0, 0, 0, 0, "PK2H", TGSI_OPCODE_PK2H }, - { 1, 1, 0, 0, 0, 0, "PK2US", TGSI_OPCODE_PK2US }, - { 1, 1, 0, 0, 0, 0, "PK4B", TGSI_OPCODE_PK4B }, - { 1, 1, 0, 0, 0, 0, "PK4UB", TGSI_OPCODE_PK4UB }, - { 1, 2, 0, 0, 0, 0, "RFL", TGSI_OPCODE_RFL }, - { 1, 2, 0, 0, 0, 0, "SEQ", TGSI_OPCODE_SEQ }, - { 1, 2, 0, 0, 0, 0, "SFL", TGSI_OPCODE_SFL }, - { 1, 2, 0, 0, 0, 0, "SGT", TGSI_OPCODE_SGT }, - { 1, 1, 0, 0, 0, 0, "SIN", TGSI_OPCODE_SIN }, - { 1, 2, 0, 0, 0, 0, "SLE", TGSI_OPCODE_SLE }, - { 1, 2, 0, 0, 0, 0, "SNE", TGSI_OPCODE_SNE }, - { 1, 2, 0, 0, 0, 0, "STR", TGSI_OPCODE_STR }, - { 1, 2, 1, 0, 0, 0, "TEX", TGSI_OPCODE_TEX }, - { 1, 4, 1, 0, 0, 0, "TXD", TGSI_OPCODE_TXD }, - { 1, 2, 1, 0, 0, 0, "TXP", TGSI_OPCODE_TXP }, - { 1, 1, 0, 0, 0, 0, "UP2H", TGSI_OPCODE_UP2H }, - { 1, 1, 0, 0, 0, 0, "UP2US", TGSI_OPCODE_UP2US }, - { 1, 1, 0, 0, 0, 0, "UP4B", TGSI_OPCODE_UP4B }, - { 1, 1, 0, 0, 0, 0, "UP4UB", TGSI_OPCODE_UP4UB }, - { 1, 3, 0, 0, 0, 0, "X2D", TGSI_OPCODE_X2D }, - { 1, 1, 0, 0, 0, 0, "ARA", TGSI_OPCODE_ARA }, - { 1, 1, 0, 0, 0, 0, "ARR", TGSI_OPCODE_ARR }, - { 0, 1, 0, 0, 0, 0, "BRA", TGSI_OPCODE_BRA }, - { 0, 0, 0, 1, 0, 0, "CAL", TGSI_OPCODE_CAL }, - { 0, 0, 0, 0, 0, 0, "RET", TGSI_OPCODE_RET }, - { 1, 1, 0, 0, 0, 0, "SSG", TGSI_OPCODE_SSG }, - { 1, 3, 0, 0, 0, 0, "CMP", TGSI_OPCODE_CMP }, - { 1, 1, 0, 0, 0, 0, "SCS", TGSI_OPCODE_SCS }, - { 1, 2, 1, 0, 0, 0, "TXB", TGSI_OPCODE_TXB }, - { 1, 1, 0, 0, 0, 0, "NRM", TGSI_OPCODE_NRM }, - { 1, 2, 0, 0, 0, 0, "DIV", TGSI_OPCODE_DIV }, - { 1, 2, 0, 0, 0, 0, "DP2", TGSI_OPCODE_DP2 }, - { 1, 2, 1, 0, 0, 0, "TXL", TGSI_OPCODE_TXL }, - { 0, 0, 0, 0, 0, 0, "BRK", TGSI_OPCODE_BRK }, - { 0, 1, 0, 1, 0, 1, "IF", TGSI_OPCODE_IF }, - { 1, 1, 0, 0, 0, 1, "", 75 }, /* removed */ - { 0, 1, 0, 0, 0, 1, "", 76 }, /* removed */ - { 0, 0, 0, 1, 1, 1, "ELSE", TGSI_OPCODE_ELSE }, - { 0, 0, 0, 0, 1, 0, "ENDIF", TGSI_OPCODE_ENDIF }, - { 1, 0, 0, 0, 1, 0, "", 79 }, /* removed */ - { 0, 0, 0, 0, 1, 0, "", 80 }, /* removed */ - { 0, 1, 0, 0, 0, 0, "PUSHA", TGSI_OPCODE_PUSHA }, - { 1, 0, 0, 0, 0, 0, "POPA", TGSI_OPCODE_POPA }, - { 1, 1, 0, 0, 0, 0, "CEIL", TGSI_OPCODE_CEIL }, - { 1, 1, 0, 0, 0, 0, "I2F", TGSI_OPCODE_I2F }, - { 1, 1, 0, 0, 0, 0, "NOT", TGSI_OPCODE_NOT }, - { 1, 1, 0, 0, 0, 0, "TRUNC", TGSI_OPCODE_TRUNC }, - { 1, 2, 0, 0, 0, 0, "SHL", TGSI_OPCODE_SHL }, - { 0, 0, 0, 0, 0, 0, "", 88 }, /* removed */ - { 1, 2, 0, 0, 0, 0, "AND", TGSI_OPCODE_AND }, - { 1, 2, 0, 0, 0, 0, "OR", TGSI_OPCODE_OR }, - { 1, 2, 0, 0, 0, 0, "MOD", TGSI_OPCODE_MOD }, - { 1, 2, 0, 0, 0, 0, "XOR", TGSI_OPCODE_XOR }, - { 1, 3, 0, 0, 0, 0, "SAD", TGSI_OPCODE_SAD }, - { 1, 2, 1, 0, 0, 0, "TXF", TGSI_OPCODE_TXF }, - { 1, 2, 1, 0, 0, 0, "TXQ", TGSI_OPCODE_TXQ }, - { 0, 0, 0, 0, 0, 0, "CONT", TGSI_OPCODE_CONT }, - { 0, 0, 0, 0, 0, 0, "EMIT", TGSI_OPCODE_EMIT }, - { 0, 0, 0, 0, 0, 0, "ENDPRIM", TGSI_OPCODE_ENDPRIM }, - { 0, 0, 0, 1, 0, 1, "BGNLOOP", TGSI_OPCODE_BGNLOOP }, - { 0, 0, 0, 0, 0, 1, "BGNSUB", TGSI_OPCODE_BGNSUB }, - { 0, 0, 0, 1, 1, 0, "ENDLOOP", TGSI_OPCODE_ENDLOOP }, - { 0, 0, 0, 0, 1, 0, "ENDSUB", TGSI_OPCODE_ENDSUB }, - { 0, 0, 0, 0, 0, 0, "", 103 }, /* removed */ - { 0, 0, 0, 0, 0, 0, "", 104 }, /* removed */ - { 0, 0, 0, 0, 0, 0, "", 105 }, /* removed */ - { 0, 0, 0, 0, 0, 0, "", 106 }, /* removed */ - { 0, 0, 0, 0, 0, 0, "NOP", TGSI_OPCODE_NOP }, - { 0, 0, 0, 0, 0, 0, "", 108 }, /* removed */ - { 0, 0, 0, 0, 0, 0, "", 109 }, /* removed */ - { 0, 0, 0, 0, 0, 0, "", 110 }, /* removed */ - { 0, 0, 0, 0, 0, 0, "", 111 }, /* removed */ - { 1, 1, 0, 0, 0, 0, "NRM4", TGSI_OPCODE_NRM4 }, - { 0, 1, 0, 0, 0, 0, "CALLNZ", TGSI_OPCODE_CALLNZ }, - { 0, 1, 0, 0, 0, 0, "IFC", TGSI_OPCODE_IFC }, - { 0, 1, 0, 0, 0, 0, "BREAKC", TGSI_OPCODE_BREAKC }, - { 0, 1, 0, 0, 0, 0, "KIL", TGSI_OPCODE_KIL }, - { 0, 0, 0, 0, 0, 0, "END", TGSI_OPCODE_END }, - { 0, 0, 0, 0, 0, 0, "", 118 }, /* removed */ - { 1, 1, 0, 0, 0, 0, "F2I", TGSI_OPCODE_F2I }, - { 1, 2, 0, 0, 0, 0, "IDIV", TGSI_OPCODE_IDIV }, - { 1, 2, 0, 0, 0, 0, "IMAX", TGSI_OPCODE_IMAX }, - { 1, 2, 0, 0, 0, 0, "IMIN", TGSI_OPCODE_IMIN }, - { 1, 1, 0, 0, 0, 0, "INEG", TGSI_OPCODE_INEG }, - { 1, 2, 0, 0, 0, 0, "ISGE", TGSI_OPCODE_ISGE }, - { 1, 2, 0, 0, 0, 0, "ISHR", TGSI_OPCODE_ISHR }, - { 1, 2, 0, 0, 0, 0, "ISLT", TGSI_OPCODE_ISLT }, - { 1, 1, 0, 0, 0, 0, "F2U", TGSI_OPCODE_F2U }, - { 1, 1, 0, 0, 0, 0, "U2F", TGSI_OPCODE_U2F }, - { 1, 2, 0, 0, 0, 0, "UADD", TGSI_OPCODE_UADD }, - { 1, 2, 0, 0, 0, 0, "UDIV", TGSI_OPCODE_UDIV }, - { 1, 3, 0, 0, 0, 0, "UMAD", TGSI_OPCODE_UMAD }, - { 1, 2, 0, 0, 0, 0, "UMAX", TGSI_OPCODE_UMAX }, - { 1, 2, 0, 0, 0, 0, "UMIN", TGSI_OPCODE_UMIN }, - { 1, 2, 0, 0, 0, 0, "UMOD", TGSI_OPCODE_UMOD }, - { 1, 2, 0, 0, 0, 0, "UMUL", TGSI_OPCODE_UMUL }, - { 1, 2, 0, 0, 0, 0, "USEQ", TGSI_OPCODE_USEQ }, - { 1, 2, 0, 0, 0, 0, "USGE", TGSI_OPCODE_USGE }, - { 1, 2, 0, 0, 0, 0, "USHR", TGSI_OPCODE_USHR }, - { 1, 2, 0, 0, 0, 0, "USLT", TGSI_OPCODE_USLT }, - { 1, 2, 0, 0, 0, 0, "USNE", TGSI_OPCODE_USNE }, - { 0, 1, 0, 0, 0, 0, "SWITCH", TGSI_OPCODE_SWITCH }, - { 0, 1, 0, 0, 0, 0, "CASE", TGSI_OPCODE_CASE }, - { 0, 0, 0, 0, 0, 0, "DEFAULT", TGSI_OPCODE_DEFAULT }, - { 0, 0, 0, 0, 0, 0, "ENDSWITCH", TGSI_OPCODE_ENDSWITCH }, - - { 1, 2, 0, 0, 0, 0, "LOAD", TGSI_OPCODE_LOAD }, - { 1, 2, 0, 0, 0, 0, "LOAD_MS", TGSI_OPCODE_LOAD_MS }, - { 1, 3, 0, 0, 0, 0, "SAMPLE", TGSI_OPCODE_SAMPLE }, - { 1, 4, 0, 0, 0, 0, "SAMPLE_B", TGSI_OPCODE_SAMPLE_B }, - { 1, 4, 0, 0, 0, 0, "SAMPLE_C", TGSI_OPCODE_SAMPLE_C }, - { 1, 4, 0, 0, 0, 0, "SAMPLE_C_LZ", TGSI_OPCODE_SAMPLE_C_LZ }, - { 1, 5, 0, 0, 0, 0, "SAMPLE_D", TGSI_OPCODE_SAMPLE_D }, - { 1, 3, 0, 0, 0, 0, "SAMPLE_L", TGSI_OPCODE_SAMPLE_L }, - { 1, 3, 0, 0, 0, 0, "GATHER4", TGSI_OPCODE_GATHER4 }, - { 1, 2, 0, 0, 0, 0, "RESINFO", TGSI_OPCODE_RESINFO }, - { 1, 2, 0, 0, 0, 0, "SAMPLE_POS", TGSI_OPCODE_SAMPLE_POS }, - { 1, 2, 0, 0, 0, 0, "SAMPLE_INFO", TGSI_OPCODE_SAMPLE_INFO }, - - { 1, 1, 0, 0, 0, 0, "UARL", TGSI_OPCODE_UARL }, - { 1, 3, 0, 0, 0, 0, "UCMP", TGSI_OPCODE_UCMP }, - { 1, 1, 0, 0, 0, 0, "IABS", TGSI_OPCODE_IABS }, - { 1, 1, 0, 0, 0, 0, "ISSG", TGSI_OPCODE_ISSG }, -}; - -const struct tgsi_opcode_info * -tgsi_get_opcode_info( uint opcode ) -{ - static boolean firsttime = 1; - - if (firsttime) { - unsigned i; - firsttime = 0; - for (i = 0; i < Elements(opcode_info); i++) - assert(opcode_info[i].opcode == i); - } - - if (opcode < TGSI_OPCODE_LAST) - return &opcode_info[opcode]; - - assert( 0 ); - return NULL; -} - - -const char * -tgsi_get_opcode_name( uint opcode ) -{ - const struct tgsi_opcode_info *info = tgsi_get_opcode_info(opcode); - return info->mnemonic; -} - - -const char * -tgsi_get_processor_name( uint processor ) -{ - switch (processor) { - case TGSI_PROCESSOR_VERTEX: - return "vertex shader"; - case TGSI_PROCESSOR_FRAGMENT: - return "fragment shader"; - case TGSI_PROCESSOR_GEOMETRY: - return "geometry shader"; - default: - return "unknown shader type!"; - } -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_info.h b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_info.h deleted file mode 100644 index 1992d11bbe8..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_info.h +++ /dev/null @@ -1,64 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef TGSI_INFO_H -#define TGSI_INFO_H - -#include "pipe/p_compiler.h" -#include "pipe/p_shader_tokens.h" - -#if defined __cplusplus -extern "C" { -#endif - -struct tgsi_opcode_info -{ - unsigned num_dst:3; - unsigned num_src:3; - unsigned is_tex:1; - unsigned is_branch:1; - int pre_dedent:2; - int post_indent:2; - const char *mnemonic; - uint opcode; -}; - -const struct tgsi_opcode_info * -tgsi_get_opcode_info( uint opcode ); - -const char * -tgsi_get_opcode_name( uint opcode ); - -const char * -tgsi_get_processor_name( uint processor ); - - -#if defined __cplusplus -} -#endif - -#endif /* TGSI_INFO_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_iterate.c b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_iterate.c deleted file mode 100644 index 0ba5fe48419..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_iterate.c +++ /dev/null @@ -1,90 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_debug.h" -#include "tgsi_iterate.h" - -boolean -tgsi_iterate_shader( - const struct tgsi_token *tokens, - struct tgsi_iterate_context *ctx ) -{ - struct tgsi_parse_context parse; - - if (tgsi_parse_init( &parse, tokens ) != TGSI_PARSE_OK) - return FALSE; - - ctx->processor = parse.FullHeader.Processor; - - if (ctx->prolog) - if (!ctx->prolog( ctx )) - goto fail; - - while (!tgsi_parse_end_of_tokens( &parse )) { - tgsi_parse_token( &parse ); - - switch (parse.FullToken.Token.Type) { - case TGSI_TOKEN_TYPE_INSTRUCTION: - if (ctx->iterate_instruction) - if (!ctx->iterate_instruction( ctx, &parse.FullToken.FullInstruction )) - goto fail; - break; - - case TGSI_TOKEN_TYPE_DECLARATION: - if (ctx->iterate_declaration) - if (!ctx->iterate_declaration( ctx, &parse.FullToken.FullDeclaration )) - goto fail; - break; - - case TGSI_TOKEN_TYPE_IMMEDIATE: - if (ctx->iterate_immediate) - if (!ctx->iterate_immediate( ctx, &parse.FullToken.FullImmediate )) - goto fail; - break; - - case TGSI_TOKEN_TYPE_PROPERTY: - if (ctx->iterate_property) - if (!ctx->iterate_property( ctx, &parse.FullToken.FullProperty )) - goto fail; - break; - - default: - assert( 0 ); - } - } - - if (ctx->epilog) - if (!ctx->epilog( ctx )) - goto fail; - - tgsi_parse_free( &parse ); - return TRUE; - -fail: - tgsi_parse_free( &parse ); - return FALSE; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_iterate.h b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_iterate.h deleted file mode 100644 index 8d67f22c429..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_iterate.h +++ /dev/null @@ -1,80 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef TGSI_ITERATE_H -#define TGSI_ITERATE_H - -#include "pipe/p_shader_tokens.h" -#include "tgsi/tgsi_parse.h" - -#if defined __cplusplus -extern "C" { -#endif - -struct tgsi_iterate_context -{ - boolean - (* prolog)( - struct tgsi_iterate_context *ctx ); - - boolean - (* iterate_instruction)( - struct tgsi_iterate_context *ctx, - struct tgsi_full_instruction *inst ); - - boolean - (* iterate_declaration)( - struct tgsi_iterate_context *ctx, - struct tgsi_full_declaration *decl ); - - boolean - (* iterate_immediate)( - struct tgsi_iterate_context *ctx, - struct tgsi_full_immediate *imm ); - - boolean - (* iterate_property)( - struct tgsi_iterate_context *ctx, - struct tgsi_full_property *prop ); - - boolean - (* epilog)( - struct tgsi_iterate_context *ctx ); - - struct tgsi_processor processor; -}; - -boolean -tgsi_iterate_shader( - const struct tgsi_token *tokens, - struct tgsi_iterate_context *ctx ); - -#if defined __cplusplus -} -#endif - -#endif /* TGSI_ITERATE_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h deleted file mode 100644 index b5d4504425b..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h +++ /dev/null @@ -1,205 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ -#ifndef OP12_TEX -#define OP12_TEX(a) OP12(a) -#endif - -#ifndef OP14_TEX -#define OP14_TEX(a) OP14(a) -#endif - -#ifndef OP00_LBL -#define OP00_LBL(a) OP00(a) -#endif - -#ifndef OP01_LBL -#define OP01_LBL(a) OP01(a) -#endif - -OP11(ARL) -OP11(MOV) -OP11(LIT) -OP11(RCP) -OP11(RSQ) -OP11(EXP) -OP11(LOG) -OP12(MUL) -OP12(ADD) -OP12(DP3) -OP12(DP4) -OP12(DST) -OP12(MIN) -OP12(MAX) -OP12(SLT) -OP12(SGE) -OP13(MAD) -OP12(SUB) -OP13(LRP) -OP13(CND) -OP13(DP2A) -OP11(FRC) -OP13(CLAMP) -OP11(FLR) -OP11(ROUND) -OP11(EX2) -OP11(LG2) -OP12(POW) -OP12(XPD) -OP11(ABS) -OP11(RCC) -OP12(DPH) -OP11(COS) -OP11(DDX) -OP11(DDY) -OP00(KILP) -OP11(PK2H) -OP11(PK2US) -OP11(PK4B) -OP11(PK4UB) -OP12(RFL) -OP12(SEQ) -OP12(SFL) -OP12(SGT) -OP11(SIN) -OP12(SLE) -OP12(SNE) -OP12(STR) -OP12_TEX(TEX) -OP14_TEX(TXD) -OP12_TEX(TXP) -OP11(UP2H) -OP11(UP2US) -OP11(UP4B) -OP11(UP4UB) -OP13(X2D) -OP11(ARA) -OP11(ARR) -OP01(BRA) -OP00_LBL(CAL) -OP00(RET) -OP11(SSG) -OP13(CMP) -OP11(SCS) -OP12_TEX(TXB) -OP11(NRM) -OP12(DIV) -OP12(DP2) -OP12_TEX(TXL) -OP00(BRK) -OP01_LBL(IF) -OP00_LBL(ELSE) -OP00(ENDIF) -OP01(PUSHA) -OP10(POPA) -OP11(CEIL) -OP11(I2F) -OP11(NOT) -OP11(TRUNC) -OP12(SHL) -OP12(AND) -OP12(OR) -OP12(MOD) -OP12(XOR) -OP13(SAD) -OP12_TEX(TXF) -OP12_TEX(TXQ) -OP00(CONT) -OP00(EMIT) -OP00(ENDPRIM) -OP00_LBL(BGNLOOP) -OP00(BGNSUB) -OP00_LBL(ENDLOOP) -OP00(ENDSUB) -OP00(NOP) -OP11(NRM4) -OP01(CALLNZ) -OP01(IFC) -OP01(BREAKC) -OP01(KIL) -OP00(END) -OP11(F2I) -OP12(IDIV) -OP12(IMAX) -OP12(IMIN) -OP11(INEG) -OP12(ISGE) -OP12(ISHR) -OP12(ISLT) -OP11(F2U) -OP11(U2F) -OP12(UADD) -OP12(UDIV) -OP13(UMAD) -OP12(UMAX) -OP12(UMIN) -OP12(UMOD) -OP12(UMUL) -OP12(USEQ) -OP12(USGE) -OP12(USHR) -OP12(USLT) -OP12(USNE) -OP01(SWITCH) -OP01(CASE) -OP00(DEFAULT) -OP00(ENDSWITCH) - -OP12(LOAD) -OP12(LOAD_MS) -OP13(SAMPLE) -OP14(SAMPLE_B) -OP14(SAMPLE_C) -OP14(SAMPLE_C_LZ) -OP15(SAMPLE_D) -OP13(SAMPLE_L) -OP13(GATHER4) -OP12(RESINFO) -OP13(SAMPLE_POS) -OP12(SAMPLE_INFO) - - -#undef OP00 -#undef OP01 -#undef OP10 -#undef OP11 -#undef OP12 -#undef OP13 - -#ifdef OP14 -#undef OP14 -#endif - -#ifdef OP15 -#undef OP15 -#endif - -#undef OP00_LBL -#undef OP01_LBL - -#undef OP12_TEX -#undef OP14_TEX - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_parse.c b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_parse.c deleted file mode 100644 index e1902eb1862..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_parse.c +++ /dev/null @@ -1,333 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_debug.h" -#include "pipe/p_shader_tokens.h" -#include "tgsi_parse.h" -#include "util/u_memory.h" - -unsigned -tgsi_parse_init( - struct tgsi_parse_context *ctx, - const struct tgsi_token *tokens ) -{ - ctx->FullHeader.Header = *(struct tgsi_header *) &tokens[0]; - if( ctx->FullHeader.Header.HeaderSize >= 2 ) { - ctx->FullHeader.Processor = *(struct tgsi_processor *) &tokens[1]; - } - else { - return TGSI_PARSE_ERROR; - } - - ctx->Tokens = tokens; - ctx->Position = ctx->FullHeader.Header.HeaderSize; - - return TGSI_PARSE_OK; -} - -void -tgsi_parse_free( - struct tgsi_parse_context *ctx ) -{ -} - -boolean -tgsi_parse_end_of_tokens( - struct tgsi_parse_context *ctx ) -{ - return ctx->Position >= - ctx->FullHeader.Header.HeaderSize + ctx->FullHeader.Header.BodySize; -} - - -/** - * This function is used to avoid and work-around type punning/aliasing - * warnings. The warnings seem harmless on x86 but on PPC they cause - * real failures. - */ -static INLINE void -copy_token(void *dst, const void *src) -{ - memcpy(dst, src, 4); -} - - -/** - * Get next 4-byte token, return it at address specified by 'token' - */ -static void -next_token( - struct tgsi_parse_context *ctx, - void *token ) -{ - assert( !tgsi_parse_end_of_tokens( ctx ) ); - copy_token(token, &ctx->Tokens[ctx->Position]); - ctx->Position++; -} - - -void -tgsi_parse_token( - struct tgsi_parse_context *ctx ) -{ - struct tgsi_token token; - unsigned i; - - next_token( ctx, &token ); - - switch( token.Type ) { - case TGSI_TOKEN_TYPE_DECLARATION: - { - struct tgsi_full_declaration *decl = &ctx->FullToken.FullDeclaration; - - memset(decl, 0, sizeof *decl); - copy_token(&decl->Declaration, &token); - - next_token( ctx, &decl->Range ); - - if (decl->Declaration.Dimension) { - next_token(ctx, &decl->Dim); - } - - if( decl->Declaration.Semantic ) { - next_token( ctx, &decl->Semantic ); - } - - if (decl->Declaration.File == TGSI_FILE_IMMEDIATE_ARRAY) { - unsigned i, j; - decl->ImmediateData.u = (union tgsi_immediate_data*) - &ctx->Tokens[ctx->Position]; - for (i = 0; i <= decl->Range.Last; ++i) { - for (j = 0; j < 4; ++j) { - ctx->Position++; - } - } - } - - if (decl->Declaration.File == TGSI_FILE_RESOURCE) { - next_token(ctx, &decl->Resource); - } - - break; - } - - case TGSI_TOKEN_TYPE_IMMEDIATE: - { - struct tgsi_full_immediate *imm = &ctx->FullToken.FullImmediate; - uint imm_count; - - memset(imm, 0, sizeof *imm); - copy_token(&imm->Immediate, &token); - - imm_count = imm->Immediate.NrTokens - 1; - - switch (imm->Immediate.DataType) { - case TGSI_IMM_FLOAT32: - for (i = 0; i < imm_count; i++) { - next_token(ctx, &imm->u[i].Float); - } - break; - - case TGSI_IMM_UINT32: - for (i = 0; i < imm_count; i++) { - next_token(ctx, &imm->u[i].Uint); - } - break; - - case TGSI_IMM_INT32: - for (i = 0; i < imm_count; i++) { - next_token(ctx, &imm->u[i].Int); - } - break; - - default: - assert( 0 ); - } - - break; - } - - case TGSI_TOKEN_TYPE_INSTRUCTION: - { - struct tgsi_full_instruction *inst = &ctx->FullToken.FullInstruction; - - memset(inst, 0, sizeof *inst); - copy_token(&inst->Instruction, &token); - - if (inst->Instruction.Predicate) { - next_token(ctx, &inst->Predicate); - } - - if (inst->Instruction.Label) { - next_token( ctx, &inst->Label); - } - - if (inst->Instruction.Texture) { - next_token( ctx, &inst->Texture); - for( i = 0; i < inst->Texture.NumOffsets; i++ ) { - next_token( ctx, &inst->TexOffsets[i] ); - } - } - - assert( inst->Instruction.NumDstRegs <= TGSI_FULL_MAX_DST_REGISTERS ); - - for( i = 0; i < inst->Instruction.NumDstRegs; i++ ) { - - next_token( ctx, &inst->Dst[i].Register ); - - if( inst->Dst[i].Register.Indirect ) { - next_token( ctx, &inst->Dst[i].Indirect ); - - /* - * No support for indirect or multi-dimensional addressing. - */ - assert( !inst->Dst[i].Indirect.Dimension ); - assert( !inst->Dst[i].Indirect.Indirect ); - } - if( inst->Dst[i].Register.Dimension ) { - next_token( ctx, &inst->Dst[i].Dimension ); - - /* - * No support for multi-dimensional addressing. - */ - assert( !inst->Dst[i].Dimension.Dimension ); - - if( inst->Dst[i].Dimension.Indirect ) { - next_token( ctx, &inst->Dst[i].DimIndirect ); - - /* - * No support for indirect or multi-dimensional addressing. - */ - assert( !inst->Dst[i].Indirect.Indirect ); - assert( !inst->Dst[i].Indirect.Dimension ); - } - } - } - - assert( inst->Instruction.NumSrcRegs <= TGSI_FULL_MAX_SRC_REGISTERS ); - - for( i = 0; i < inst->Instruction.NumSrcRegs; i++ ) { - - next_token( ctx, &inst->Src[i].Register ); - - if( inst->Src[i].Register.Indirect ) { - next_token( ctx, &inst->Src[i].Indirect ); - - /* - * No support for indirect or multi-dimensional addressing. - */ - assert( !inst->Src[i].Indirect.Indirect ); - assert( !inst->Src[i].Indirect.Dimension ); - } - - if( inst->Src[i].Register.Dimension ) { - next_token( ctx, &inst->Src[i].Dimension ); - - /* - * No support for multi-dimensional addressing. - */ - assert( !inst->Src[i].Dimension.Dimension ); - - if( inst->Src[i].Dimension.Indirect ) { - next_token( ctx, &inst->Src[i].DimIndirect ); - - /* - * No support for indirect or multi-dimensional addressing. - */ - assert( !inst->Src[i].Indirect.Indirect ); - assert( !inst->Src[i].Indirect.Dimension ); - } - } - } - - break; - } - - case TGSI_TOKEN_TYPE_PROPERTY: - { - struct tgsi_full_property *prop = &ctx->FullToken.FullProperty; - uint prop_count; - - memset(prop, 0, sizeof *prop); - copy_token(&prop->Property, &token); - - prop_count = prop->Property.NrTokens - 1; - for (i = 0; i < prop_count; i++) { - next_token(ctx, &prop->u[i]); - } - - break; - } - - default: - assert( 0 ); - } -} - - - - -/** - * Make a new copy of a token array. - */ -struct tgsi_token * -tgsi_dup_tokens(const struct tgsi_token *tokens) -{ - unsigned n = tgsi_num_tokens(tokens); - unsigned bytes = n * sizeof(struct tgsi_token); - struct tgsi_token *new_tokens = (struct tgsi_token *) MALLOC(bytes); - if (new_tokens) - memcpy(new_tokens, tokens, bytes); - return new_tokens; -} - - -/** - * Allocate memory for num_tokens tokens. - */ -struct tgsi_token * -tgsi_alloc_tokens(unsigned num_tokens) -{ - unsigned bytes = num_tokens * sizeof(struct tgsi_token); - return (struct tgsi_token *) MALLOC(bytes); -} - - -void -tgsi_dump_tokens(const struct tgsi_token *tokens) -{ - const unsigned *dwords = (const unsigned *)tokens; - int nr = tgsi_num_tokens(tokens); - int i; - - assert(sizeof(*tokens) == sizeof(unsigned)); - - debug_printf("const unsigned tokens[%d] = {\n", nr); - for (i = 0; i < nr; i++) - debug_printf("0x%08x,\n", dwords[i]); - debug_printf("};\n"); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_parse.h b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_parse.h deleted file mode 100644 index f7b7e6edc98..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_parse.h +++ /dev/null @@ -1,162 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef TGSI_PARSE_H -#define TGSI_PARSE_H - -#include "pipe/p_compiler.h" -#include "pipe/p_shader_tokens.h" - -#if defined __cplusplus -extern "C" { -#endif - -struct tgsi_full_header -{ - struct tgsi_header Header; - struct tgsi_processor Processor; -}; - -struct tgsi_full_dst_register -{ - struct tgsi_dst_register Register; - struct tgsi_src_register Indirect; - struct tgsi_dimension Dimension; - struct tgsi_src_register DimIndirect; -}; - -struct tgsi_full_src_register -{ - struct tgsi_src_register Register; - struct tgsi_src_register Indirect; - struct tgsi_dimension Dimension; - struct tgsi_src_register DimIndirect; -}; - -struct tgsi_immediate_array_data -{ - union tgsi_immediate_data *u; -}; - -struct tgsi_full_declaration -{ - struct tgsi_declaration Declaration; - struct tgsi_declaration_range Range; - struct tgsi_declaration_dimension Dim; - struct tgsi_declaration_semantic Semantic; - struct tgsi_immediate_array_data ImmediateData; - struct tgsi_declaration_resource Resource; -}; - -struct tgsi_full_immediate -{ - struct tgsi_immediate Immediate; - union tgsi_immediate_data u[4]; -}; - -struct tgsi_full_property -{ - struct tgsi_property Property; - struct tgsi_property_data u[8]; -}; - -#define TGSI_FULL_MAX_DST_REGISTERS 2 -#define TGSI_FULL_MAX_SRC_REGISTERS 5 /* SAMPLE_D has 5 */ -#define TGSI_FULL_MAX_TEX_OFFSETS 4 - -struct tgsi_full_instruction -{ - struct tgsi_instruction Instruction; - struct tgsi_instruction_predicate Predicate; - struct tgsi_instruction_label Label; - struct tgsi_instruction_texture Texture; - struct tgsi_full_dst_register Dst[TGSI_FULL_MAX_DST_REGISTERS]; - struct tgsi_full_src_register Src[TGSI_FULL_MAX_SRC_REGISTERS]; - struct tgsi_texture_offset TexOffsets[TGSI_FULL_MAX_TEX_OFFSETS]; -}; - -union tgsi_full_token -{ - struct tgsi_token Token; - struct tgsi_full_declaration FullDeclaration; - struct tgsi_full_immediate FullImmediate; - struct tgsi_full_instruction FullInstruction; - struct tgsi_full_property FullProperty; -}; - -struct tgsi_parse_context -{ - const struct tgsi_token *Tokens; - unsigned Position; - struct tgsi_full_header FullHeader; - union tgsi_full_token FullToken; -}; - -#define TGSI_PARSE_OK 0 -#define TGSI_PARSE_ERROR 1 - -unsigned -tgsi_parse_init( - struct tgsi_parse_context *ctx, - const struct tgsi_token *tokens ); - -void -tgsi_parse_free( - struct tgsi_parse_context *ctx ); - -boolean -tgsi_parse_end_of_tokens( - struct tgsi_parse_context *ctx ); - -void -tgsi_parse_token( - struct tgsi_parse_context *ctx ); - -static INLINE unsigned -tgsi_num_tokens(const struct tgsi_token *tokens) -{ - struct tgsi_header header; - memcpy(&header, tokens, sizeof(header)); - return header.HeaderSize + header.BodySize; -} - -void -tgsi_dump_tokens(const struct tgsi_token *tokens); - -struct tgsi_token * -tgsi_dup_tokens(const struct tgsi_token *tokens); - -struct tgsi_token * -tgsi_alloc_tokens(unsigned num_tokens); - - -#if defined __cplusplus -} -#endif - -#endif /* TGSI_PARSE_H */ - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_ppc.c b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_ppc.c deleted file mode 100644 index 537a0f6c5e4..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_ppc.c +++ /dev/null @@ -1,1379 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * TGSI to PowerPC code generation. - */ - -#include "pipe/p_config.h" - -#if defined(PIPE_ARCH_PPC) - -#include "util/u_debug.h" -#include "pipe/p_shader_tokens.h" -#include "util/u_math.h" -#include "util/u_memory.h" -#include "util/u_sse.h" -#include "tgsi/tgsi_info.h" -#include "tgsi/tgsi_parse.h" -#include "tgsi/tgsi_util.h" -#include "tgsi_dump.h" -#include "tgsi_exec.h" -#include "tgsi_ppc.h" -#include "rtasm/rtasm_ppc.h" - - -/** - * Since it's pretty much impossible to form PPC vector immediates, load - * them from memory here: - */ -PIPE_ALIGN_VAR(16) const float -ppc_builtin_constants[] = { - 1.0f, -128.0f, 128.0, 0.0 -}; - - -#define FOR_EACH_CHANNEL( CHAN )\ - for (CHAN = 0; CHAN < NUM_CHANNELS; CHAN++) - -#define IS_DST0_CHANNEL_ENABLED( INST, CHAN )\ - ((INST).Dst[0].Register.WriteMask & (1 << (CHAN))) - -#define IF_IS_DST0_CHANNEL_ENABLED( INST, CHAN )\ - if (IS_DST0_CHANNEL_ENABLED( INST, CHAN )) - -#define FOR_EACH_DST0_ENABLED_CHANNEL( INST, CHAN )\ - FOR_EACH_CHANNEL( CHAN )\ - IF_IS_DST0_CHANNEL_ENABLED( INST, CHAN ) - -#define CHAN_X 0 -#define CHAN_Y 1 -#define CHAN_Z 2 -#define CHAN_W 3 - - -/** - * How many TGSI temps should be implemented with real PPC vector registers - * rather than memory. - */ -#define MAX_PPC_TEMPS 3 - - -/** - * Context/state used during code gen. - */ -struct gen_context -{ - struct ppc_function *f; - int inputs_reg; /**< GP register pointing to input params */ - int outputs_reg; /**< GP register pointing to output params */ - int temps_reg; /**< GP register pointing to temporary "registers" */ - int immed_reg; /**< GP register pointing to immediates buffer */ - int const_reg; /**< GP register pointing to constants buffer */ - int builtins_reg; /**< GP register pointint to built-in constants */ - - int offset_reg; /**< used to reduce redundant li instructions */ - int offset_value; - - int one_vec; /**< vector register with {1.0, 1.0, 1.0, 1.0} */ - int bit31_vec; /**< vector register with {1<<31, 1<<31, 1<<31, 1<<31} */ - - /** - * Map TGSI temps to PPC vector temps. - * We have 32 PPC vector regs. Use 16 of them for storing 4 TGSI temps. - * XXX currently only do this for TGSI temps [0..MAX_PPC_TEMPS-1]. - */ - int temps_map[MAX_PPC_TEMPS][4]; - - /** - * Cache of src registers. - * This is used to avoid redundant load instructions. - */ - struct { - struct tgsi_full_src_register src; - uint chan; - uint vec; - } regs[12]; /* 3 src regs, 4 channels */ - uint num_regs; -}; - - -/** - * Initialize code generation context. - */ -static void -init_gen_context(struct gen_context *gen, struct ppc_function *func) -{ - uint i; - - memset(gen, 0, sizeof(*gen)); - gen->f = func; - gen->inputs_reg = ppc_reserve_register(func, 3); /* first function param */ - gen->outputs_reg = ppc_reserve_register(func, 4); /* second function param */ - gen->temps_reg = ppc_reserve_register(func, 5); /* ... */ - gen->immed_reg = ppc_reserve_register(func, 6); - gen->const_reg = ppc_reserve_register(func, 7); - gen->builtins_reg = ppc_reserve_register(func, 8); - gen->one_vec = -1; - gen->bit31_vec = -1; - gen->offset_reg = -1; - gen->offset_value = -9999999; - for (i = 0; i < MAX_PPC_TEMPS; i++) { - gen->temps_map[i][0] = ppc_allocate_vec_register(gen->f); - gen->temps_map[i][1] = ppc_allocate_vec_register(gen->f); - gen->temps_map[i][2] = ppc_allocate_vec_register(gen->f); - gen->temps_map[i][3] = ppc_allocate_vec_register(gen->f); - } -} - - -/** - * Is the given TGSI register stored as a real PPC vector register? - */ -static boolean -is_ppc_vec_temporary(const struct tgsi_full_src_register *reg) -{ - return (reg->Register.File == TGSI_FILE_TEMPORARY && - reg->Register.Index < MAX_PPC_TEMPS); -} - - -/** - * Is the given TGSI register stored as a real PPC vector register? - */ -static boolean -is_ppc_vec_temporary_dst(const struct tgsi_full_dst_register *reg) -{ - return (reg->Register.File == TGSI_FILE_TEMPORARY && - reg->Register.Index < MAX_PPC_TEMPS); -} - - - -/** - * All PPC vector load/store instructions form an effective address - * by adding the contents of two registers. For example: - * lvx v2,r8,r9 # v2 = memory[r8 + r9] - * stvx v2,r8,r9 # memory[r8 + r9] = v2; - * So our lvx/stvx instructions are typically preceded by an 'li' instruction - * to load r9 (above) with an immediate (an offset). - * This code emits that 'li' instruction, but only if the offset value is - * different than the previous 'li'. - * This optimization seems to save about 10% in the instruction count. - * Note that we need to unconditionally emit an 'li' inside basic blocks - * (such as inside loops). - */ -static int -emit_li_offset(struct gen_context *gen, int offset) -{ - if (gen->offset_reg <= 0) { - /* allocate a GP register for storing load/store offset */ - gen->offset_reg = ppc_allocate_register(gen->f); - } - - /* emit new 'li' if offset is changing */ - if (gen->offset_value < 0 || gen->offset_value != offset) { - gen->offset_value = offset; - ppc_li(gen->f, gen->offset_reg, offset); - } - - return gen->offset_reg; -} - - -/** - * Forces subsequent emit_li_offset() calls to emit an 'li'. - * To be called at the top of basic blocks. - */ -static void -reset_li_offset(struct gen_context *gen) -{ - gen->offset_value = -9999999; -} - - - -/** - * Load the given vector register with {value, value, value, value}. - * The value must be in the ppu_builtin_constants[] array. - * We wouldn't need this if there was a simple way to load PPC vector - * registers with immediate values! - */ -static void -load_constant_vec(struct gen_context *gen, int dst_vec, float value) -{ - uint pos; - for (pos = 0; pos < Elements(ppc_builtin_constants); pos++) { - if (ppc_builtin_constants[pos] == value) { - int offset = pos * 4; - int offset_reg = emit_li_offset(gen, offset); - - /* Load 4-byte word into vector register. - * The vector slot depends on the effective address we load from. - * We know that our builtins start at a 16-byte boundary so we - * know that 'swizzle' tells us which vector slot will have the - * loaded word. The other vector slots will be undefined. - */ - ppc_lvewx(gen->f, dst_vec, gen->builtins_reg, offset_reg); - /* splat word[pos % 4] across the vector reg */ - ppc_vspltw(gen->f, dst_vec, dst_vec, pos % 4); - return; - } - } - assert(0 && "Need to add new constant to ppc_builtin_constants array"); -} - - -/** - * Return index of vector register containing {1.0, 1.0, 1.0, 1.0}. - */ -static int -gen_one_vec(struct gen_context *gen) -{ - if (gen->one_vec < 0) { - gen->one_vec = ppc_allocate_vec_register(gen->f); - load_constant_vec(gen, gen->one_vec, 1.0f); - } - return gen->one_vec; -} - -/** - * Return index of vector register containing {1<<31, 1<<31, 1<<31, 1<<31}. - */ -static int -gen_get_bit31_vec(struct gen_context *gen) -{ - if (gen->bit31_vec < 0) { - gen->bit31_vec = ppc_allocate_vec_register(gen->f); - ppc_vspltisw(gen->f, gen->bit31_vec, -1); - ppc_vslw(gen->f, gen->bit31_vec, gen->bit31_vec, gen->bit31_vec); - } - return gen->bit31_vec; -} - - -/** - * Register fetch. Return PPC vector register with result. - */ -static int -emit_fetch(struct gen_context *gen, - const struct tgsi_full_src_register *reg, - const unsigned chan_index) -{ - uint swizzle = tgsi_util_get_full_src_register_swizzle(reg, chan_index); - int dst_vec = -1; - - switch (swizzle) { - case TGSI_SWIZZLE_X: - case TGSI_SWIZZLE_Y: - case TGSI_SWIZZLE_Z: - case TGSI_SWIZZLE_W: - switch (reg->Register.File) { - case TGSI_FILE_INPUT: - { - int offset = (reg->Register.Index * 4 + swizzle) * 16; - int offset_reg = emit_li_offset(gen, offset); - dst_vec = ppc_allocate_vec_register(gen->f); - ppc_lvx(gen->f, dst_vec, gen->inputs_reg, offset_reg); - } - break; - case TGSI_FILE_SYSTEM_VALUE: - assert(!"unhandled system value in tgsi_ppc.c"); - break; - case TGSI_FILE_TEMPORARY: - if (is_ppc_vec_temporary(reg)) { - /* use PPC vec register */ - dst_vec = gen->temps_map[reg->Register.Index][swizzle]; - } - else { - /* use memory-based temp register "file" */ - int offset = (reg->Register.Index * 4 + swizzle) * 16; - int offset_reg = emit_li_offset(gen, offset); - dst_vec = ppc_allocate_vec_register(gen->f); - ppc_lvx(gen->f, dst_vec, gen->temps_reg, offset_reg); - } - break; - case TGSI_FILE_IMMEDIATE: - { - int offset = (reg->Register.Index * 4 + swizzle) * 4; - int offset_reg = emit_li_offset(gen, offset); - dst_vec = ppc_allocate_vec_register(gen->f); - /* Load 4-byte word into vector register. - * The vector slot depends on the effective address we load from. - * We know that our immediates start at a 16-byte boundary so we - * know that 'swizzle' tells us which vector slot will have the - * loaded word. The other vector slots will be undefined. - */ - ppc_lvewx(gen->f, dst_vec, gen->immed_reg, offset_reg); - /* splat word[swizzle] across the vector reg */ - ppc_vspltw(gen->f, dst_vec, dst_vec, swizzle); - } - break; - case TGSI_FILE_CONSTANT: - { - int offset = (reg->Register.Index * 4 + swizzle) * 4; - int offset_reg = emit_li_offset(gen, offset); - dst_vec = ppc_allocate_vec_register(gen->f); - /* Load 4-byte word into vector register. - * The vector slot depends on the effective address we load from. - * We know that our constants start at a 16-byte boundary so we - * know that 'swizzle' tells us which vector slot will have the - * loaded word. The other vector slots will be undefined. - */ - ppc_lvewx(gen->f, dst_vec, gen->const_reg, offset_reg); - /* splat word[swizzle] across the vector reg */ - ppc_vspltw(gen->f, dst_vec, dst_vec, swizzle); - } - break; - default: - assert( 0 ); - } - break; - default: - assert( 0 ); - } - - assert(dst_vec >= 0); - - { - uint sign_op = tgsi_util_get_full_src_register_sign_mode(reg, chan_index); - if (sign_op != TGSI_UTIL_SIGN_KEEP) { - int bit31_vec = gen_get_bit31_vec(gen); - int dst_vec2; - - if (is_ppc_vec_temporary(reg)) { - /* need to use a new temp */ - dst_vec2 = ppc_allocate_vec_register(gen->f); - } - else { - dst_vec2 = dst_vec; - } - - switch (sign_op) { - case TGSI_UTIL_SIGN_CLEAR: - /* vec = vec & ~bit31 */ - ppc_vandc(gen->f, dst_vec2, dst_vec, bit31_vec); - break; - case TGSI_UTIL_SIGN_SET: - /* vec = vec | bit31 */ - ppc_vor(gen->f, dst_vec2, dst_vec, bit31_vec); - break; - case TGSI_UTIL_SIGN_TOGGLE: - /* vec = vec ^ bit31 */ - ppc_vxor(gen->f, dst_vec2, dst_vec, bit31_vec); - break; - default: - assert(0); - } - return dst_vec2; - } - } - - return dst_vec; -} - - - -/** - * Test if two TGSI src registers refer to the same memory location. - * We use this to avoid redundant register loads. - */ -static boolean -equal_src_locs(const struct tgsi_full_src_register *a, uint chan_a, - const struct tgsi_full_src_register *b, uint chan_b) -{ - int swz_a, swz_b; - int sign_a, sign_b; - if (a->Register.File != b->Register.File) - return FALSE; - if (a->Register.Index != b->Register.Index) - return FALSE; - swz_a = tgsi_util_get_full_src_register_swizzle(a, chan_a); - swz_b = tgsi_util_get_full_src_register_swizzle(b, chan_b); - if (swz_a != swz_b) - return FALSE; - sign_a = tgsi_util_get_full_src_register_sign_mode(a, chan_a); - sign_b = tgsi_util_get_full_src_register_sign_mode(b, chan_b); - if (sign_a != sign_b) - return FALSE; - return TRUE; -} - - -/** - * Given a TGSI src register and channel index, return the PPC vector - * register containing the value. We use a cache to prevent re-loading - * the same register multiple times. - * \return index of PPC vector register with the desired src operand - */ -static int -get_src_vec(struct gen_context *gen, - struct tgsi_full_instruction *inst, int src_reg, uint chan) -{ - const const struct tgsi_full_src_register *src = - &inst->Src[src_reg]; - int vec; - uint i; - - /* check the cache */ - for (i = 0; i < gen->num_regs; i++) { - if (equal_src_locs(&gen->regs[i].src, gen->regs[i].chan, src, chan)) { - /* cache hit */ - assert(gen->regs[i].vec >= 0); - return gen->regs[i].vec; - } - } - - /* cache miss: allocate new vec reg and emit fetch/load code */ - vec = emit_fetch(gen, src, chan); - gen->regs[gen->num_regs].src = *src; - gen->regs[gen->num_regs].chan = chan; - gen->regs[gen->num_regs].vec = vec; - gen->num_regs++; - - assert(gen->num_regs <= Elements(gen->regs)); - - assert(vec >= 0); - - return vec; -} - - -/** - * Clear the src operand cache. To be called at the end of each emit function. - */ -static void -release_src_vecs(struct gen_context *gen) -{ - uint i; - for (i = 0; i < gen->num_regs; i++) { - const const struct tgsi_full_src_register src = gen->regs[i].src; - if (!is_ppc_vec_temporary(&src)) { - ppc_release_vec_register(gen->f, gen->regs[i].vec); - } - } - gen->num_regs = 0; -} - - - -static int -get_dst_vec(struct gen_context *gen, - const struct tgsi_full_instruction *inst, - unsigned chan_index) -{ - const struct tgsi_full_dst_register *reg = &inst->Dst[0]; - - if (is_ppc_vec_temporary_dst(reg)) { - int vec = gen->temps_map[reg->Register.Index][chan_index]; - return vec; - } - else { - return ppc_allocate_vec_register(gen->f); - } -} - - -/** - * Register store. Store 'src_vec' at location indicated by 'reg'. - * \param free_vec Should the src_vec be released when done? - */ -static void -emit_store(struct gen_context *gen, - int src_vec, - const struct tgsi_full_instruction *inst, - unsigned chan_index, - boolean free_vec) -{ - const struct tgsi_full_dst_register *reg = &inst->Dst[0]; - - switch (reg->Register.File) { - case TGSI_FILE_OUTPUT: - { - int offset = (reg->Register.Index * 4 + chan_index) * 16; - int offset_reg = emit_li_offset(gen, offset); - ppc_stvx(gen->f, src_vec, gen->outputs_reg, offset_reg); - } - break; - case TGSI_FILE_TEMPORARY: - if (is_ppc_vec_temporary_dst(reg)) { - if (!free_vec) { - int dst_vec = gen->temps_map[reg->Register.Index][chan_index]; - if (dst_vec != src_vec) - ppc_vmove(gen->f, dst_vec, src_vec); - } - free_vec = FALSE; - } - else { - int offset = (reg->Register.Index * 4 + chan_index) * 16; - int offset_reg = emit_li_offset(gen, offset); - ppc_stvx(gen->f, src_vec, gen->temps_reg, offset_reg); - } - break; -#if 0 - case TGSI_FILE_ADDRESS: - emit_addrs( - func, - xmm, - reg->Register.Index, - chan_index ); - break; -#endif - default: - assert( 0 ); - } - -#if 0 - switch( inst->Instruction.Saturate ) { - case TGSI_SAT_NONE: - break; - - case TGSI_SAT_ZERO_ONE: - /* assert( 0 ); */ - break; - - case TGSI_SAT_MINUS_PLUS_ONE: - assert( 0 ); - break; - } -#endif - - if (free_vec) - ppc_release_vec_register(gen->f, src_vec); -} - - -static void -emit_scalar_unaryop(struct gen_context *gen, struct tgsi_full_instruction *inst) -{ - int v0, v1; - uint chan_index; - - v0 = get_src_vec(gen, inst, 0, CHAN_X); - v1 = ppc_allocate_vec_register(gen->f); - - switch (inst->Instruction.Opcode) { - case TGSI_OPCODE_RSQ: - /* v1 = 1.0 / sqrt(v0) */ - ppc_vrsqrtefp(gen->f, v1, v0); - break; - case TGSI_OPCODE_RCP: - /* v1 = 1.0 / v0 */ - ppc_vrefp(gen->f, v1, v0); - break; - default: - assert(0); - } - - FOR_EACH_DST0_ENABLED_CHANNEL( *inst, chan_index ) { - emit_store(gen, v1, inst, chan_index, FALSE); - } - - release_src_vecs(gen); - ppc_release_vec_register(gen->f, v1); -} - - -static void -emit_unaryop(struct gen_context *gen, struct tgsi_full_instruction *inst) -{ - uint chan_index; - - FOR_EACH_DST0_ENABLED_CHANNEL(*inst, chan_index) { - int v0 = get_src_vec(gen, inst, 0, chan_index); /* v0 = srcreg[0] */ - int v1 = get_dst_vec(gen, inst, chan_index); - switch (inst->Instruction.Opcode) { - case TGSI_OPCODE_ABS: - /* turn off the most significant bit of each vector float word */ - { - int bit31_vec = gen_get_bit31_vec(gen); - ppc_vandc(gen->f, v1, v0, bit31_vec); /* v1 = v0 & ~bit31 */ - } - break; - case TGSI_OPCODE_FLR: - ppc_vrfim(gen->f, v1, v0); /* v1 = floor(v0) */ - break; - case TGSI_OPCODE_FRC: - ppc_vrfim(gen->f, v1, v0); /* tmp = floor(v0) */ - ppc_vsubfp(gen->f, v1, v0, v1); /* v1 = v0 - v1 */ - break; - case TGSI_OPCODE_EX2: - ppc_vexptefp(gen->f, v1, v0); /* v1 = 2^v0 */ - break; - case TGSI_OPCODE_LG2: - /* XXX this may be broken! */ - ppc_vlogefp(gen->f, v1, v0); /* v1 = log2(v0) */ - break; - case TGSI_OPCODE_MOV: - if (v0 != v1) - ppc_vmove(gen->f, v1, v0); - break; - default: - assert(0); - } - emit_store(gen, v1, inst, chan_index, TRUE); /* store v0 */ - } - - release_src_vecs(gen); -} - - -static void -emit_binop(struct gen_context *gen, struct tgsi_full_instruction *inst) -{ - int zero_vec = -1; - uint chan; - - if (inst->Instruction.Opcode == TGSI_OPCODE_MUL) { - zero_vec = ppc_allocate_vec_register(gen->f); - ppc_vzero(gen->f, zero_vec); - } - - FOR_EACH_DST0_ENABLED_CHANNEL(*inst, chan) { - /* fetch src operands */ - int v0 = get_src_vec(gen, inst, 0, chan); - int v1 = get_src_vec(gen, inst, 1, chan); - int v2 = get_dst_vec(gen, inst, chan); - - /* emit binop */ - switch (inst->Instruction.Opcode) { - case TGSI_OPCODE_ADD: - ppc_vaddfp(gen->f, v2, v0, v1); - break; - case TGSI_OPCODE_SUB: - ppc_vsubfp(gen->f, v2, v0, v1); - break; - case TGSI_OPCODE_MUL: - ppc_vmaddfp(gen->f, v2, v0, v1, zero_vec); - break; - case TGSI_OPCODE_MIN: - ppc_vminfp(gen->f, v2, v0, v1); - break; - case TGSI_OPCODE_MAX: - ppc_vmaxfp(gen->f, v2, v0, v1); - break; - default: - assert(0); - } - - /* store v2 */ - emit_store(gen, v2, inst, chan, TRUE); - } - - if (inst->Instruction.Opcode == TGSI_OPCODE_MUL) - ppc_release_vec_register(gen->f, zero_vec); - - release_src_vecs(gen); -} - - -static void -emit_triop(struct gen_context *gen, struct tgsi_full_instruction *inst) -{ - uint chan; - - FOR_EACH_DST0_ENABLED_CHANNEL(*inst, chan) { - /* fetch src operands */ - int v0 = get_src_vec(gen, inst, 0, chan); - int v1 = get_src_vec(gen, inst, 1, chan); - int v2 = get_src_vec(gen, inst, 2, chan); - int v3 = get_dst_vec(gen, inst, chan); - - /* emit ALU */ - switch (inst->Instruction.Opcode) { - case TGSI_OPCODE_MAD: - ppc_vmaddfp(gen->f, v3, v0, v1, v2); /* v3 = v0 * v1 + v2 */ - break; - case TGSI_OPCODE_LRP: - ppc_vsubfp(gen->f, v3, v1, v2); /* v3 = v1 - v2 */ - ppc_vmaddfp(gen->f, v3, v0, v3, v2); /* v3 = v0 * v3 + v2 */ - break; - default: - assert(0); - } - - /* store v3 */ - emit_store(gen, v3, inst, chan, TRUE); - } - - release_src_vecs(gen); -} - - -/** - * Vector comparisons, resulting in 1.0 or 0.0 values. - */ -static void -emit_inequality(struct gen_context *gen, struct tgsi_full_instruction *inst) -{ - uint chan; - int one_vec = gen_one_vec(gen); - - FOR_EACH_DST0_ENABLED_CHANNEL(*inst, chan) { - /* fetch src operands */ - int v0 = get_src_vec(gen, inst, 0, chan); - int v1 = get_src_vec(gen, inst, 1, chan); - int v2 = get_dst_vec(gen, inst, chan); - boolean complement = FALSE; - - switch (inst->Instruction.Opcode) { - case TGSI_OPCODE_SNE: - complement = TRUE; - /* fall-through */ - case TGSI_OPCODE_SEQ: - ppc_vcmpeqfpx(gen->f, v2, v0, v1); /* v2 = v0 == v1 ? ~0 : 0 */ - break; - - case TGSI_OPCODE_SGE: - complement = TRUE; - /* fall-through */ - case TGSI_OPCODE_SLT: - ppc_vcmpgtfpx(gen->f, v2, v1, v0); /* v2 = v1 > v0 ? ~0 : 0 */ - break; - - case TGSI_OPCODE_SLE: - complement = TRUE; - /* fall-through */ - case TGSI_OPCODE_SGT: - ppc_vcmpgtfpx(gen->f, v2, v0, v1); /* v2 = v0 > v1 ? ~0 : 0 */ - break; - default: - assert(0); - } - - /* v2 is now {0,0,0,0} or {~0,~0,~0,~0} */ - - if (complement) - ppc_vandc(gen->f, v2, one_vec, v2); /* v2 = one_vec & ~v2 */ - else - ppc_vand(gen->f, v2, one_vec, v2); /* v2 = one_vec & v2 */ - - /* store v2 */ - emit_store(gen, v2, inst, chan, TRUE); - } - - release_src_vecs(gen); -} - - -static void -emit_dotprod(struct gen_context *gen, struct tgsi_full_instruction *inst) -{ - int v0, v1, v2; - uint chan_index; - - v2 = ppc_allocate_vec_register(gen->f); - - ppc_vzero(gen->f, v2); /* v2 = {0, 0, 0, 0} */ - - v0 = get_src_vec(gen, inst, 0, CHAN_X); /* v0 = src0.XXXX */ - v1 = get_src_vec(gen, inst, 1, CHAN_X); /* v1 = src1.XXXX */ - ppc_vmaddfp(gen->f, v2, v0, v1, v2); /* v2 = v0 * v1 + v2 */ - - v0 = get_src_vec(gen, inst, 0, CHAN_Y); /* v0 = src0.YYYY */ - v1 = get_src_vec(gen, inst, 1, CHAN_Y); /* v1 = src1.YYYY */ - ppc_vmaddfp(gen->f, v2, v0, v1, v2); /* v2 = v0 * v1 + v2 */ - - v0 = get_src_vec(gen, inst, 0, CHAN_Z); /* v0 = src0.ZZZZ */ - v1 = get_src_vec(gen, inst, 1, CHAN_Z); /* v1 = src1.ZZZZ */ - ppc_vmaddfp(gen->f, v2, v0, v1, v2); /* v2 = v0 * v1 + v2 */ - - if (inst->Instruction.Opcode == TGSI_OPCODE_DP4) { - v0 = get_src_vec(gen, inst, 0, CHAN_W); /* v0 = src0.WWWW */ - v1 = get_src_vec(gen, inst, 1, CHAN_W); /* v1 = src1.WWWW */ - ppc_vmaddfp(gen->f, v2, v0, v1, v2); /* v2 = v0 * v1 + v2 */ - } - else if (inst->Instruction.Opcode == TGSI_OPCODE_DPH) { - v1 = get_src_vec(gen, inst, 1, CHAN_W); /* v1 = src1.WWWW */ - ppc_vaddfp(gen->f, v2, v2, v1); /* v2 = v2 + v1 */ - } - - FOR_EACH_DST0_ENABLED_CHANNEL(*inst, chan_index) { - emit_store(gen, v2, inst, chan_index, FALSE); /* store v2, free v2 later */ - } - - release_src_vecs(gen); - - ppc_release_vec_register(gen->f, v2); -} - - -/** Approximation for vr = pow(va, vb) */ -static void -ppc_vec_pow(struct ppc_function *f, int vr, int va, int vb) -{ - /* pow(a,b) ~= exp2(log2(a) * b) */ - int t_vec = ppc_allocate_vec_register(f); - int zero_vec = ppc_allocate_vec_register(f); - - ppc_vzero(f, zero_vec); - - ppc_vlogefp(f, t_vec, va); /* t = log2(va) */ - ppc_vmaddfp(f, t_vec, t_vec, vb, zero_vec); /* t = t * vb + zero */ - ppc_vexptefp(f, vr, t_vec); /* vr = 2^t */ - - ppc_release_vec_register(f, t_vec); - ppc_release_vec_register(f, zero_vec); -} - - -static void -emit_lit(struct gen_context *gen, struct tgsi_full_instruction *inst) -{ - int one_vec = gen_one_vec(gen); - - /* Compute X */ - if (IS_DST0_CHANNEL_ENABLED(*inst, CHAN_X)) { - emit_store(gen, one_vec, inst, CHAN_X, FALSE); - } - - /* Compute Y, Z */ - if (IS_DST0_CHANNEL_ENABLED(*inst, CHAN_Y) || - IS_DST0_CHANNEL_ENABLED(*inst, CHAN_Z)) { - int x_vec; - int zero_vec = ppc_allocate_vec_register(gen->f); - - x_vec = get_src_vec(gen, inst, 0, CHAN_X); /* x_vec = src[0].x */ - - ppc_vzero(gen->f, zero_vec); /* zero = {0,0,0,0} */ - ppc_vmaxfp(gen->f, x_vec, x_vec, zero_vec); /* x_vec = max(x_vec, 0) */ - - if (IS_DST0_CHANNEL_ENABLED(*inst, CHAN_Y)) { - emit_store(gen, x_vec, inst, CHAN_Y, FALSE); - } - - if (IS_DST0_CHANNEL_ENABLED(*inst, CHAN_Z)) { - int y_vec, w_vec; - int z_vec = ppc_allocate_vec_register(gen->f); - int pow_vec = ppc_allocate_vec_register(gen->f); - int pos_vec = ppc_allocate_vec_register(gen->f); - int p128_vec = ppc_allocate_vec_register(gen->f); - int n128_vec = ppc_allocate_vec_register(gen->f); - - y_vec = get_src_vec(gen, inst, 0, CHAN_Y); /* y_vec = src[0].y */ - ppc_vmaxfp(gen->f, y_vec, y_vec, zero_vec); /* y_vec = max(y_vec, 0) */ - - w_vec = get_src_vec(gen, inst, 0, CHAN_W); /* w_vec = src[0].w */ - - /* clamp W to [-128, 128] */ - load_constant_vec(gen, p128_vec, 128.0f); - load_constant_vec(gen, n128_vec, -128.0f); - ppc_vmaxfp(gen->f, w_vec, w_vec, n128_vec); /* w = max(w, -128) */ - ppc_vminfp(gen->f, w_vec, w_vec, p128_vec); /* w = min(w, 128) */ - - /* if temp.x > 0 - * z = pow(tmp.y, tmp.w) - * else - * z = 0.0 - */ - ppc_vec_pow(gen->f, pow_vec, y_vec, w_vec); /* pow = pow(y, w) */ - ppc_vcmpgtfpx(gen->f, pos_vec, x_vec, zero_vec); /* pos = x > 0 */ - ppc_vand(gen->f, z_vec, pow_vec, pos_vec); /* z = pow & pos */ - - emit_store(gen, z_vec, inst, CHAN_Z, FALSE); - - ppc_release_vec_register(gen->f, z_vec); - ppc_release_vec_register(gen->f, pow_vec); - ppc_release_vec_register(gen->f, pos_vec); - ppc_release_vec_register(gen->f, p128_vec); - ppc_release_vec_register(gen->f, n128_vec); - } - - ppc_release_vec_register(gen->f, zero_vec); - } - - /* Compute W */ - if (IS_DST0_CHANNEL_ENABLED(*inst, CHAN_W)) { - emit_store(gen, one_vec, inst, CHAN_W, FALSE); - } - - release_src_vecs(gen); -} - - -static void -emit_exp(struct gen_context *gen, struct tgsi_full_instruction *inst) -{ - const int one_vec = gen_one_vec(gen); - int src_vec; - - /* get src arg */ - src_vec = get_src_vec(gen, inst, 0, CHAN_X); - - /* Compute X = 2^floor(src) */ - if (IS_DST0_CHANNEL_ENABLED(*inst, CHAN_X)) { - int dst_vec = get_dst_vec(gen, inst, CHAN_X); - int tmp_vec = ppc_allocate_vec_register(gen->f); - ppc_vrfim(gen->f, tmp_vec, src_vec); /* tmp = floor(src); */ - ppc_vexptefp(gen->f, dst_vec, tmp_vec); /* dst = 2 ^ tmp */ - emit_store(gen, dst_vec, inst, CHAN_X, TRUE); - ppc_release_vec_register(gen->f, tmp_vec); - } - - /* Compute Y = src - floor(src) */ - if (IS_DST0_CHANNEL_ENABLED(*inst, CHAN_Y)) { - int dst_vec = get_dst_vec(gen, inst, CHAN_Y); - int tmp_vec = ppc_allocate_vec_register(gen->f); - ppc_vrfim(gen->f, tmp_vec, src_vec); /* tmp = floor(src); */ - ppc_vsubfp(gen->f, dst_vec, src_vec, tmp_vec); /* dst = src - tmp */ - emit_store(gen, dst_vec, inst, CHAN_Y, TRUE); - ppc_release_vec_register(gen->f, tmp_vec); - } - - /* Compute Z = RoughApprox2ToX(src) */ - if (IS_DST0_CHANNEL_ENABLED(*inst, CHAN_Z)) { - int dst_vec = get_dst_vec(gen, inst, CHAN_Z); - ppc_vexptefp(gen->f, dst_vec, src_vec); /* dst = 2 ^ src */ - emit_store(gen, dst_vec, inst, CHAN_Z, TRUE); - } - - /* Compute W = 1.0 */ - if (IS_DST0_CHANNEL_ENABLED(*inst, CHAN_W)) { - emit_store(gen, one_vec, inst, CHAN_W, FALSE); - } - - release_src_vecs(gen); -} - - -static void -emit_log(struct gen_context *gen, struct tgsi_full_instruction *inst) -{ - const int bit31_vec = gen_get_bit31_vec(gen); - const int one_vec = gen_one_vec(gen); - int src_vec, abs_vec; - - /* get src arg */ - src_vec = get_src_vec(gen, inst, 0, CHAN_X); - - /* compute abs(src) */ - abs_vec = ppc_allocate_vec_register(gen->f); - ppc_vandc(gen->f, abs_vec, src_vec, bit31_vec); /* abs = src & ~bit31 */ - - if (IS_DST0_CHANNEL_ENABLED(*inst, CHAN_X) && - IS_DST0_CHANNEL_ENABLED(*inst, CHAN_Y)) { - - /* compute tmp = floor(log2(abs)) */ - int tmp_vec = ppc_allocate_vec_register(gen->f); - ppc_vlogefp(gen->f, tmp_vec, abs_vec); /* tmp = log2(abs) */ - ppc_vrfim(gen->f, tmp_vec, tmp_vec); /* tmp = floor(tmp); */ - - /* Compute X = tmp */ - if (IS_DST0_CHANNEL_ENABLED(*inst, CHAN_X)) { - emit_store(gen, tmp_vec, inst, CHAN_X, FALSE); - } - - /* Compute Y = abs / 2^tmp */ - if (IS_DST0_CHANNEL_ENABLED(*inst, CHAN_Y)) { - const int zero_vec = ppc_allocate_vec_register(gen->f); - ppc_vzero(gen->f, zero_vec); - ppc_vexptefp(gen->f, tmp_vec, tmp_vec); /* tmp = 2 ^ tmp */ - ppc_vrefp(gen->f, tmp_vec, tmp_vec); /* tmp = 1 / tmp */ - /* tmp = abs * tmp + zero */ - ppc_vmaddfp(gen->f, tmp_vec, abs_vec, tmp_vec, zero_vec); - emit_store(gen, tmp_vec, inst, CHAN_Y, FALSE); - ppc_release_vec_register(gen->f, zero_vec); - } - - ppc_release_vec_register(gen->f, tmp_vec); - } - - /* Compute Z = RoughApproxLog2(abs) */ - if (IS_DST0_CHANNEL_ENABLED(*inst, CHAN_Z)) { - int dst_vec = get_dst_vec(gen, inst, CHAN_Z); - ppc_vlogefp(gen->f, dst_vec, abs_vec); /* dst = log2(abs) */ - emit_store(gen, dst_vec, inst, CHAN_Z, TRUE); - } - - /* Compute W = 1.0 */ - if (IS_DST0_CHANNEL_ENABLED(*inst, CHAN_W)) { - emit_store(gen, one_vec, inst, CHAN_W, FALSE); - } - - ppc_release_vec_register(gen->f, abs_vec); - release_src_vecs(gen); -} - - -static void -emit_pow(struct gen_context *gen, struct tgsi_full_instruction *inst) -{ - int s0_vec = get_src_vec(gen, inst, 0, CHAN_X); - int s1_vec = get_src_vec(gen, inst, 1, CHAN_X); - int pow_vec = ppc_allocate_vec_register(gen->f); - int chan; - - ppc_vec_pow(gen->f, pow_vec, s0_vec, s1_vec); - - FOR_EACH_DST0_ENABLED_CHANNEL(*inst, chan) { - emit_store(gen, pow_vec, inst, chan, FALSE); - } - - ppc_release_vec_register(gen->f, pow_vec); - - release_src_vecs(gen); -} - - -static void -emit_xpd(struct gen_context *gen, struct tgsi_full_instruction *inst) -{ - int x0_vec, y0_vec, z0_vec; - int x1_vec, y1_vec, z1_vec; - int zero_vec, tmp_vec; - int tmp2_vec; - - zero_vec = ppc_allocate_vec_register(gen->f); - ppc_vzero(gen->f, zero_vec); - - tmp_vec = ppc_allocate_vec_register(gen->f); - tmp2_vec = ppc_allocate_vec_register(gen->f); - - if (IS_DST0_CHANNEL_ENABLED(*inst, CHAN_Y) || - IS_DST0_CHANNEL_ENABLED(*inst, CHAN_Z)) { - x0_vec = get_src_vec(gen, inst, 0, CHAN_X); - x1_vec = get_src_vec(gen, inst, 1, CHAN_X); - } - if (IS_DST0_CHANNEL_ENABLED(*inst, CHAN_X) || - IS_DST0_CHANNEL_ENABLED(*inst, CHAN_Z)) { - y0_vec = get_src_vec(gen, inst, 0, CHAN_Y); - y1_vec = get_src_vec(gen, inst, 1, CHAN_Y); - } - if (IS_DST0_CHANNEL_ENABLED(*inst, CHAN_X) || - IS_DST0_CHANNEL_ENABLED(*inst, CHAN_Y)) { - z0_vec = get_src_vec(gen, inst, 0, CHAN_Z); - z1_vec = get_src_vec(gen, inst, 1, CHAN_Z); - } - - IF_IS_DST0_CHANNEL_ENABLED(*inst, CHAN_X) { - /* tmp = y0 * z1 */ - ppc_vmaddfp(gen->f, tmp_vec, y0_vec, z1_vec, zero_vec); - /* tmp = tmp - z0 * y1*/ - ppc_vnmsubfp(gen->f, tmp_vec, tmp_vec, z0_vec, y1_vec); - emit_store(gen, tmp_vec, inst, CHAN_X, FALSE); - } - IF_IS_DST0_CHANNEL_ENABLED(*inst, CHAN_Y) { - /* tmp = z0 * x1 */ - ppc_vmaddfp(gen->f, tmp_vec, z0_vec, x1_vec, zero_vec); - /* tmp = tmp - x0 * z1 */ - ppc_vnmsubfp(gen->f, tmp_vec, tmp_vec, x0_vec, z1_vec); - emit_store(gen, tmp_vec, inst, CHAN_Y, FALSE); - } - IF_IS_DST0_CHANNEL_ENABLED(*inst, CHAN_Z) { - /* tmp = x0 * y1 */ - ppc_vmaddfp(gen->f, tmp_vec, x0_vec, y1_vec, zero_vec); - /* tmp = tmp - y0 * x1 */ - ppc_vnmsubfp(gen->f, tmp_vec, tmp_vec, y0_vec, x1_vec); - emit_store(gen, tmp_vec, inst, CHAN_Z, FALSE); - } - /* W is undefined */ - - ppc_release_vec_register(gen->f, tmp_vec); - ppc_release_vec_register(gen->f, zero_vec); - release_src_vecs(gen); -} - -static int -emit_instruction(struct gen_context *gen, - struct tgsi_full_instruction *inst) -{ - - /* we don't handle saturation/clamping yet */ - if (inst->Instruction.Saturate != TGSI_SAT_NONE) - return 0; - - /* need to use extra temps to fix SOA dependencies : */ - if (tgsi_check_soa_dependencies(inst)) - return FALSE; - - switch (inst->Instruction.Opcode) { - case TGSI_OPCODE_MOV: - case TGSI_OPCODE_ABS: - case TGSI_OPCODE_FLR: - case TGSI_OPCODE_FRC: - case TGSI_OPCODE_EX2: - case TGSI_OPCODE_LG2: - emit_unaryop(gen, inst); - break; - case TGSI_OPCODE_RSQ: - case TGSI_OPCODE_RCP: - emit_scalar_unaryop(gen, inst); - break; - case TGSI_OPCODE_ADD: - case TGSI_OPCODE_SUB: - case TGSI_OPCODE_MUL: - case TGSI_OPCODE_MIN: - case TGSI_OPCODE_MAX: - emit_binop(gen, inst); - break; - case TGSI_OPCODE_SEQ: - case TGSI_OPCODE_SNE: - case TGSI_OPCODE_SLT: - case TGSI_OPCODE_SGT: - case TGSI_OPCODE_SLE: - case TGSI_OPCODE_SGE: - emit_inequality(gen, inst); - break; - case TGSI_OPCODE_MAD: - case TGSI_OPCODE_LRP: - emit_triop(gen, inst); - break; - case TGSI_OPCODE_DP3: - case TGSI_OPCODE_DP4: - case TGSI_OPCODE_DPH: - emit_dotprod(gen, inst); - break; - case TGSI_OPCODE_LIT: - emit_lit(gen, inst); - break; - case TGSI_OPCODE_LOG: - emit_log(gen, inst); - break; - case TGSI_OPCODE_EXP: - emit_exp(gen, inst); - break; - case TGSI_OPCODE_POW: - emit_pow(gen, inst); - break; - case TGSI_OPCODE_XPD: - emit_xpd(gen, inst); - break; - case TGSI_OPCODE_END: - /* normal end */ - return 1; - default: - return 0; - } - return 1; -} - - -static void -emit_declaration( - struct ppc_function *func, - struct tgsi_full_declaration *decl ) -{ - if( decl->Declaration.File == TGSI_FILE_INPUT || - decl->Declaration.File == TGSI_FILE_SYSTEM_VALUE ) { -#if 0 - unsigned first, last, mask; - unsigned i, j; - - first = decl->Range.First; - last = decl->Range.Last; - mask = decl->Declaration.UsageMask; - - for( i = first; i <= last; i++ ) { - for( j = 0; j < NUM_CHANNELS; j++ ) { - if( mask & (1 << j) ) { - switch( decl->Declaration.Interpolate ) { - case TGSI_INTERPOLATE_CONSTANT: - emit_coef_a0( func, 0, i, j ); - emit_inputs( func, 0, i, j ); - break; - - case TGSI_INTERPOLATE_LINEAR: - emit_tempf( func, 0, 0, TGSI_SWIZZLE_X ); - emit_coef_dadx( func, 1, i, j ); - emit_tempf( func, 2, 0, TGSI_SWIZZLE_Y ); - emit_coef_dady( func, 3, i, j ); - emit_mul( func, 0, 1 ); /* x * dadx */ - emit_coef_a0( func, 4, i, j ); - emit_mul( func, 2, 3 ); /* y * dady */ - emit_add( func, 0, 4 ); /* x * dadx + a0 */ - emit_add( func, 0, 2 ); /* x * dadx + y * dady + a0 */ - emit_inputs( func, 0, i, j ); - break; - - case TGSI_INTERPOLATE_PERSPECTIVE: - emit_tempf( func, 0, 0, TGSI_SWIZZLE_X ); - emit_coef_dadx( func, 1, i, j ); - emit_tempf( func, 2, 0, TGSI_SWIZZLE_Y ); - emit_coef_dady( func, 3, i, j ); - emit_mul( func, 0, 1 ); /* x * dadx */ - emit_tempf( func, 4, 0, TGSI_SWIZZLE_W ); - emit_coef_a0( func, 5, i, j ); - emit_rcp( func, 4, 4 ); /* 1.0 / w */ - emit_mul( func, 2, 3 ); /* y * dady */ - emit_add( func, 0, 5 ); /* x * dadx + a0 */ - emit_add( func, 0, 2 ); /* x * dadx + y * dady + a0 */ - emit_mul( func, 0, 4 ); /* (x * dadx + y * dady + a0) / w */ - emit_inputs( func, 0, i, j ); - break; - - default: - assert( 0 ); - break; - } - } - } - } -#endif - } -} - - - -static void -emit_prologue(struct ppc_function *func) -{ - /* XXX set up stack frame */ -} - - -static void -emit_epilogue(struct ppc_function *func) -{ - ppc_comment(func, -4, "Epilogue:"); - ppc_return(func); - /* XXX restore prev stack frame */ -#if 0 - debug_printf("PPC: Emitted %u instructions\n", func->num_inst); -#endif -} - - - -/** - * Translate a TGSI vertex/fragment shader to PPC code. - * - * \param tokens the TGSI input shader - * \param func the output PPC code/function - * \param immediates buffer to place immediates, later passed to PPC func - * \return TRUE for success, FALSE if translation failed - */ -boolean -tgsi_emit_ppc(const struct tgsi_token *tokens, - struct ppc_function *func, - float (*immediates)[4], - boolean do_swizzles ) -{ - static int use_ppc_asm = -1; - struct tgsi_parse_context parse; - /*boolean instruction_phase = FALSE;*/ - unsigned ok = 1; - uint num_immediates = 0; - struct gen_context gen; - uint ic = 0; - - if (use_ppc_asm < 0) { - /* If GALLIUM_NOPPC is set, don't use PPC codegen */ - use_ppc_asm = !debug_get_bool_option("GALLIUM_NOPPC", FALSE); - } - if (!use_ppc_asm) - return FALSE; - - if (0) { - debug_printf("\n********* TGSI->PPC ********\n"); - tgsi_dump(tokens, 0); - } - - util_init_math(); - - init_gen_context(&gen, func); - - emit_prologue(func); - - tgsi_parse_init( &parse, tokens ); - - while (!tgsi_parse_end_of_tokens(&parse) && ok) { - tgsi_parse_token(&parse); - - switch (parse.FullToken.Token.Type) { - case TGSI_TOKEN_TYPE_DECLARATION: - if (parse.FullHeader.Processor.Processor == TGSI_PROCESSOR_FRAGMENT) { - emit_declaration(func, &parse.FullToken.FullDeclaration ); - } - break; - - case TGSI_TOKEN_TYPE_INSTRUCTION: - if (func->print) { - _debug_printf("# "); - ic++; - tgsi_dump_instruction(&parse.FullToken.FullInstruction, ic); - } - - ok = emit_instruction(&gen, &parse.FullToken.FullInstruction); - - if (!ok) { - uint opcode = parse.FullToken.FullInstruction.Instruction.Opcode; - debug_printf("failed to translate tgsi opcode %d (%s) to PPC (%s)\n", - opcode, - tgsi_get_opcode_name(opcode), - parse.FullHeader.Processor.Processor == TGSI_PROCESSOR_VERTEX ? - "vertex shader" : "fragment shader"); - } - break; - - case TGSI_TOKEN_TYPE_IMMEDIATE: - /* splat each immediate component into a float[4] vector for SoA */ - { - const uint size = parse.FullToken.FullImmediate.Immediate.NrTokens - 1; - uint i; - assert(size <= 4); - assert(num_immediates < TGSI_EXEC_NUM_IMMEDIATES); - for (i = 0; i < size; i++) { - immediates[num_immediates][i] = - parse.FullToken.FullImmediate.u[i].Float; - } - num_immediates++; - } - break; - - case TGSI_TOKEN_TYPE_PROPERTY: - break; - - default: - ok = 0; - assert( 0 ); - } - } - - emit_epilogue(func); - - tgsi_parse_free( &parse ); - - if (ppc_num_instructions(func) == 0) { - /* ran out of memory for instructions */ - ok = FALSE; - } - - if (!ok) - debug_printf("TGSI->PPC translation failed\n"); - - return ok; -} - -#else - -void ppc_dummy_func(void); - -void ppc_dummy_func(void) -{ -} - -#endif /* PIPE_ARCH_PPC */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_ppc.h b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_ppc.h deleted file mode 100644 index 829ec075e7f..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_ppc.h +++ /dev/null @@ -1,51 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef TGSI_PPC_H -#define TGSI_PPC_H - -#if defined __cplusplus -extern "C" { -#endif - -struct tgsi_token; -struct ppc_function; - -extern const float ppc_builtin_constants[]; - - -boolean -tgsi_emit_ppc(const struct tgsi_token *tokens, - struct ppc_function *function, - float (*immediates)[4], - boolean do_swizzles); - -#if defined __cplusplus -} -#endif - -#endif /* TGSI_PPC_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_sanity.c b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_sanity.c deleted file mode 100644 index 509c5346837..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_sanity.c +++ /dev/null @@ -1,564 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_debug.h" -#include "util/u_memory.h" -#include "util/u_prim.h" -#include "cso_cache/cso_hash.h" -#include "tgsi_sanity.h" -#include "tgsi_info.h" -#include "tgsi_iterate.h" - - -DEBUG_GET_ONCE_BOOL_OPTION(print_sanity, "TGSI_PRINT_SANITY", FALSE) - - -typedef struct { - uint file : 28; - /* max 2 dimensions */ - uint dimensions : 4; - uint indices[2]; -} scan_register; - -struct sanity_check_ctx -{ - struct tgsi_iterate_context iter; - struct cso_hash *regs_decl; - struct cso_hash *regs_used; - struct cso_hash *regs_ind_used; - - uint num_imms; - uint num_instructions; - uint index_of_END; - - uint errors; - uint warnings; - uint implied_array_size; - - boolean print; -}; - -static INLINE unsigned -scan_register_key(const scan_register *reg) -{ - unsigned key = reg->file; - key |= (reg->indices[0] << 4); - key |= (reg->indices[1] << 18); - - return key; -} - -static void -fill_scan_register1d(scan_register *reg, - uint file, uint index) -{ - reg->file = file; - reg->dimensions = 1; - reg->indices[0] = index; - reg->indices[1] = 0; -} - -static void -fill_scan_register2d(scan_register *reg, - uint file, uint index1, uint index2) -{ - reg->file = file; - reg->dimensions = 2; - reg->indices[0] = index1; - reg->indices[1] = index2; -} - -static void -scan_register_dst(scan_register *reg, - struct tgsi_full_dst_register *dst) -{ - if (dst->Register.Dimension) { - /*FIXME: right now we don't support indirect - * multidimensional addressing */ - fill_scan_register2d(reg, - dst->Register.File, - dst->Register.Index, - dst->Dimension.Index); - } else { - fill_scan_register1d(reg, - dst->Register.File, - dst->Register.Index); - } -} - -static void -scan_register_src(scan_register *reg, - struct tgsi_full_src_register *src) -{ - if (src->Register.Dimension) { - /*FIXME: right now we don't support indirect - * multidimensional addressing */ - fill_scan_register2d(reg, - src->Register.File, - src->Register.Index, - src->Dimension.Index); - } else { - fill_scan_register1d(reg, - src->Register.File, - src->Register.Index); - } -} - -static scan_register * -create_scan_register_src(struct tgsi_full_src_register *src) -{ - scan_register *reg = MALLOC(sizeof(scan_register)); - scan_register_src(reg, src); - - return reg; -} - -static scan_register * -create_scan_register_dst(struct tgsi_full_dst_register *dst) -{ - scan_register *reg = MALLOC(sizeof(scan_register)); - scan_register_dst(reg, dst); - - return reg; -} - -static void -report_error( - struct sanity_check_ctx *ctx, - const char *format, - ... ) -{ - va_list args; - - if (!ctx->print) - return; - - debug_printf( "Error : " ); - va_start( args, format ); - _debug_vprintf( format, args ); - va_end( args ); - debug_printf( "\n" ); - ctx->errors++; -} - -static void -report_warning( - struct sanity_check_ctx *ctx, - const char *format, - ... ) -{ - va_list args; - - if (!ctx->print) - return; - - debug_printf( "Warning: " ); - va_start( args, format ); - _debug_vprintf( format, args ); - va_end( args ); - debug_printf( "\n" ); - ctx->warnings++; -} - -static boolean -check_file_name( - struct sanity_check_ctx *ctx, - uint file ) -{ - if (file <= TGSI_FILE_NULL || file >= TGSI_FILE_COUNT) { - report_error( ctx, "(%u): Invalid register file name", file ); - return FALSE; - } - return TRUE; -} - -static boolean -is_register_declared( - struct sanity_check_ctx *ctx, - const scan_register *reg) -{ - void *data = cso_hash_find_data_from_template( - ctx->regs_decl, scan_register_key(reg), - (void*)reg, sizeof(scan_register)); - return data ? TRUE : FALSE; -} - -static boolean -is_any_register_declared( - struct sanity_check_ctx *ctx, - uint file ) -{ - struct cso_hash_iter iter = - cso_hash_first_node(ctx->regs_decl); - - while (!cso_hash_iter_is_null(iter)) { - scan_register *reg = (scan_register *)cso_hash_iter_data(iter); - if (reg->file == file) - return TRUE; - iter = cso_hash_iter_next(iter); - } - - return FALSE; -} - -static boolean -is_register_used( - struct sanity_check_ctx *ctx, - scan_register *reg) -{ - void *data = cso_hash_find_data_from_template( - ctx->regs_used, scan_register_key(reg), - reg, sizeof(scan_register)); - return data ? TRUE : FALSE; -} - - -static boolean -is_ind_register_used( - struct sanity_check_ctx *ctx, - scan_register *reg) -{ - return cso_hash_contains(ctx->regs_ind_used, reg->file); -} - -static const char *file_names[TGSI_FILE_COUNT] = -{ - "NULL", - "CONST", - "IN", - "OUT", - "TEMP", - "SAMP", - "ADDR", - "IMM", - "PRED", - "SV", - "IMMX", - "TEMPX", - "RES" -}; - -static boolean -check_register_usage( - struct sanity_check_ctx *ctx, - scan_register *reg, - const char *name, - boolean indirect_access ) -{ - if (!check_file_name( ctx, reg->file )) { - FREE(reg); - return FALSE; - } - - if (indirect_access) { - /* Note that 'index' is an offset relative to the value of the - * address register. No range checking done here.*/ - reg->indices[0] = 0; - reg->indices[1] = 0; - if (!is_any_register_declared( ctx, reg->file )) - report_error( ctx, "%s: Undeclared %s register", file_names[reg->file], name ); - if (!is_ind_register_used(ctx, reg)) - cso_hash_insert(ctx->regs_ind_used, reg->file, reg); - else - FREE(reg); - } - else { - if (!is_register_declared( ctx, reg )) { - if (reg->dimensions == 2) { - report_error( ctx, "%s[%d][%d]: Undeclared %s register", file_names[reg->file], - reg->indices[0], reg->indices[1], name ); - } - else { - report_error( ctx, "%s[%d]: Undeclared %s register", file_names[reg->file], - reg->indices[0], name ); - } - } - if (!is_register_used( ctx, reg )) - cso_hash_insert(ctx->regs_used, scan_register_key(reg), reg); - else - FREE(reg); - } - return TRUE; -} - -static boolean -iter_instruction( - struct tgsi_iterate_context *iter, - struct tgsi_full_instruction *inst ) -{ - struct sanity_check_ctx *ctx = (struct sanity_check_ctx *) iter; - const struct tgsi_opcode_info *info; - uint i; - - if (inst->Instruction.Opcode == TGSI_OPCODE_END) { - if (ctx->index_of_END != ~0) { - report_error( ctx, "Too many END instructions" ); - } - ctx->index_of_END = ctx->num_instructions; - } - - info = tgsi_get_opcode_info( inst->Instruction.Opcode ); - if (info == NULL) { - report_error( ctx, "(%u): Invalid instruction opcode", inst->Instruction.Opcode ); - return TRUE; - } - - if (info->num_dst != inst->Instruction.NumDstRegs) { - report_error( ctx, "%s: Invalid number of destination operands, should be %u", info->mnemonic, info->num_dst ); - } - if (info->num_src != inst->Instruction.NumSrcRegs) { - report_error( ctx, "%s: Invalid number of source operands, should be %u", info->mnemonic, info->num_src ); - } - - /* Check destination and source registers' validity. - * Mark the registers as used. - */ - for (i = 0; i < inst->Instruction.NumDstRegs; i++) { - scan_register *reg = create_scan_register_dst(&inst->Dst[i]); - check_register_usage( - ctx, - reg, - "destination", - FALSE ); - if (!inst->Dst[i].Register.WriteMask) { - report_error(ctx, "Destination register has empty writemask"); - } - } - for (i = 0; i < inst->Instruction.NumSrcRegs; i++) { - scan_register *reg = create_scan_register_src(&inst->Src[i]); - check_register_usage( - ctx, - reg, - "source", - (boolean)inst->Src[i].Register.Indirect ); - if (inst->Src[i].Register.Indirect) { - scan_register *ind_reg = MALLOC(sizeof(scan_register)); - - fill_scan_register1d(ind_reg, - inst->Src[i].Indirect.File, - inst->Src[i].Indirect.Index); - check_register_usage( - ctx, - ind_reg, - "indirect", - FALSE ); - } - } - - ctx->num_instructions++; - - return TRUE; -} - -static void -check_and_declare(struct sanity_check_ctx *ctx, - scan_register *reg) -{ - if (is_register_declared( ctx, reg)) - report_error( ctx, "%s[%u]: The same register declared more than once", - file_names[reg->file], reg->indices[0] ); - cso_hash_insert(ctx->regs_decl, - scan_register_key(reg), - reg); -} - - -static boolean -iter_declaration( - struct tgsi_iterate_context *iter, - struct tgsi_full_declaration *decl ) -{ - struct sanity_check_ctx *ctx = (struct sanity_check_ctx *) iter; - uint file; - uint i; - - /* No declarations allowed after the first instruction. - */ - if (ctx->num_instructions > 0) - report_error( ctx, "Instruction expected but declaration found" ); - - /* Check registers' validity. - * Mark the registers as declared. - */ - file = decl->Declaration.File; - if (!check_file_name( ctx, file )) - return TRUE; - for (i = decl->Range.First; i <= decl->Range.Last; i++) { - /* declared TGSI_FILE_INPUT's for geometry processor - * have an implied second dimension */ - if (file == TGSI_FILE_INPUT && - ctx->iter.processor.Processor == TGSI_PROCESSOR_GEOMETRY) { - uint vert; - for (vert = 0; vert < ctx->implied_array_size; ++vert) { - scan_register *reg = MALLOC(sizeof(scan_register)); - fill_scan_register2d(reg, file, i, vert); - check_and_declare(ctx, reg); - } - } else { - scan_register *reg = MALLOC(sizeof(scan_register)); - if (decl->Declaration.Dimension) { - fill_scan_register2d(reg, file, i, decl->Dim.Index2D); - } else { - fill_scan_register1d(reg, file, i); - } - check_and_declare(ctx, reg); - } - } - - return TRUE; -} - -static boolean -iter_immediate( - struct tgsi_iterate_context *iter, - struct tgsi_full_immediate *imm ) -{ - struct sanity_check_ctx *ctx = (struct sanity_check_ctx *) iter; - scan_register *reg; - - /* No immediates allowed after the first instruction. - */ - if (ctx->num_instructions > 0) - report_error( ctx, "Instruction expected but immediate found" ); - - /* Mark the register as declared. - */ - reg = MALLOC(sizeof(scan_register)); - fill_scan_register1d(reg, TGSI_FILE_IMMEDIATE, ctx->num_imms); - cso_hash_insert(ctx->regs_decl, scan_register_key(reg), reg); - ctx->num_imms++; - - /* Check data type validity. - */ - if (imm->Immediate.DataType != TGSI_IMM_FLOAT32 && - imm->Immediate.DataType != TGSI_IMM_UINT32 && - imm->Immediate.DataType != TGSI_IMM_INT32) { - report_error( ctx, "(%u): Invalid immediate data type", imm->Immediate.DataType ); - return TRUE; - } - - return TRUE; -} - - -static boolean -iter_property( - struct tgsi_iterate_context *iter, - struct tgsi_full_property *prop ) -{ - struct sanity_check_ctx *ctx = (struct sanity_check_ctx *) iter; - - if (iter->processor.Processor == TGSI_PROCESSOR_GEOMETRY && - prop->Property.PropertyName == TGSI_PROPERTY_GS_INPUT_PRIM) { - ctx->implied_array_size = u_vertices_per_prim(prop->u[0].Data); - } - return TRUE; -} - -static boolean -epilog( - struct tgsi_iterate_context *iter ) -{ - struct sanity_check_ctx *ctx = (struct sanity_check_ctx *) iter; - - /* There must be an END instruction somewhere. - */ - if (ctx->index_of_END == ~0) { - report_error( ctx, "Missing END instruction" ); - } - - /* Check if all declared registers were used. - */ - { - struct cso_hash_iter iter = - cso_hash_first_node(ctx->regs_decl); - - while (!cso_hash_iter_is_null(iter)) { - scan_register *reg = (scan_register *)cso_hash_iter_data(iter); - if (!is_register_used(ctx, reg) && !is_ind_register_used(ctx, reg)) { - report_warning( ctx, "%s[%u]: Register never used", - file_names[reg->file], reg->indices[0] ); - } - iter = cso_hash_iter_next(iter); - } - } - - /* Print totals, if any. - */ - if (ctx->errors || ctx->warnings) - debug_printf( "%u errors, %u warnings\n", ctx->errors, ctx->warnings ); - - return TRUE; -} - -static void -regs_hash_destroy(struct cso_hash *hash) -{ - struct cso_hash_iter iter = cso_hash_first_node(hash); - while (!cso_hash_iter_is_null(iter)) { - scan_register *reg = (scan_register *)cso_hash_iter_data(iter); - iter = cso_hash_erase(hash, iter); - assert(reg->file < TGSI_FILE_COUNT); - FREE(reg); - } - cso_hash_delete(hash); -} - -boolean -tgsi_sanity_check( - const struct tgsi_token *tokens ) -{ - struct sanity_check_ctx ctx; - - ctx.iter.prolog = NULL; - ctx.iter.iterate_instruction = iter_instruction; - ctx.iter.iterate_declaration = iter_declaration; - ctx.iter.iterate_immediate = iter_immediate; - ctx.iter.iterate_property = iter_property; - ctx.iter.epilog = epilog; - - ctx.regs_decl = cso_hash_create(); - ctx.regs_used = cso_hash_create(); - ctx.regs_ind_used = cso_hash_create(); - - ctx.num_imms = 0; - ctx.num_instructions = 0; - ctx.index_of_END = ~0; - - ctx.errors = 0; - ctx.warnings = 0; - ctx.implied_array_size = 0; - ctx.print = debug_get_option_print_sanity(); - - if (!tgsi_iterate_shader( tokens, &ctx.iter )) - return FALSE; - - regs_hash_destroy(ctx.regs_decl); - regs_hash_destroy(ctx.regs_used); - regs_hash_destroy(ctx.regs_ind_used); - return ctx.errors == 0; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_sanity.h b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_sanity.h deleted file mode 100644 index 707d11ec6dd..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_sanity.h +++ /dev/null @@ -1,52 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef TGSI_SANITY_H -#define TGSI_SANITY_H - -#if defined __cplusplus -extern "C" { -#endif - -#include "pipe/p_compiler.h" - -struct tgsi_token; - -/* Check the given token stream for errors and common mistakes. - * Diagnostic messages are printed out to the debug output, and is - * controlled by the debug option TGSI_PRINT_SANITY (default false). - * Returns TRUE if there are no errors, even though there could be some warnings. - */ -boolean -tgsi_sanity_check( - const struct tgsi_token *tokens ); - -#if defined __cplusplus -} -#endif - -#endif /* TGSI_SANITY_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_scan.c b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_scan.c deleted file mode 100644 index e4e9c032e02..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ /dev/null @@ -1,343 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * Copyright 2008 VMware, Inc. All rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * TGSI program scan utility. - * Used to determine which registers and instructions are used by a shader. - * - * Authors: Brian Paul - */ - - -#include "util/u_math.h" -#include "tgsi/tgsi_parse.h" -#include "tgsi/tgsi_util.h" -#include "tgsi/tgsi_scan.h" - - - - -/** - * Scan the given TGSI shader to collect information such as number of - * registers used, special instructions used, etc. - * \return info the result of the scan - */ -void -tgsi_scan_shader(const struct tgsi_token *tokens, - struct tgsi_shader_info *info) -{ - uint procType, i; - struct tgsi_parse_context parse; - - memset(info, 0, sizeof(*info)); - for (i = 0; i < TGSI_FILE_COUNT; i++) - info->file_max[i] = -1; - - /** - ** Setup to begin parsing input shader - **/ - if (tgsi_parse_init( &parse, tokens ) != TGSI_PARSE_OK) { - debug_printf("tgsi_parse_init() failed in tgsi_scan_shader()!\n"); - return; - } - procType = parse.FullHeader.Processor.Processor; - assert(procType == TGSI_PROCESSOR_FRAGMENT || - procType == TGSI_PROCESSOR_VERTEX || - procType == TGSI_PROCESSOR_GEOMETRY); - - - /** - ** Loop over incoming program tokens/instructions - */ - while( !tgsi_parse_end_of_tokens( &parse ) ) { - - info->num_tokens++; - - tgsi_parse_token( &parse ); - - switch( parse.FullToken.Token.Type ) { - case TGSI_TOKEN_TYPE_INSTRUCTION: - { - const struct tgsi_full_instruction *fullinst - = &parse.FullToken.FullInstruction; - uint i; - - assert(fullinst->Instruction.Opcode < TGSI_OPCODE_LAST); - info->opcode_count[fullinst->Instruction.Opcode]++; - - for (i = 0; i < fullinst->Instruction.NumSrcRegs; i++) { - const struct tgsi_full_src_register *src = - &fullinst->Src[i]; - int ind = src->Register.Index; - - /* Mark which inputs are effectively used */ - if (src->Register.File == TGSI_FILE_INPUT) { - unsigned usage_mask; - usage_mask = tgsi_util_get_inst_usage_mask(fullinst, i); - if (src->Register.Indirect) { - for (ind = 0; ind < info->num_inputs; ++ind) { - info->input_usage_mask[ind] |= usage_mask; - } - } else { - assert(ind >= 0); - assert(ind < PIPE_MAX_SHADER_INPUTS); - info->input_usage_mask[ind] |= usage_mask; - } - - if (procType == TGSI_PROCESSOR_FRAGMENT && - src->Register.File == TGSI_FILE_INPUT && - info->reads_position && - src->Register.Index == 0 && - (src->Register.SwizzleX == TGSI_SWIZZLE_Z || - src->Register.SwizzleY == TGSI_SWIZZLE_Z || - src->Register.SwizzleZ == TGSI_SWIZZLE_Z || - src->Register.SwizzleW == TGSI_SWIZZLE_Z)) { - info->reads_z = TRUE; - } - } - - /* check for indirect register reads */ - if (src->Register.Indirect) { - info->indirect_files |= (1 << src->Register.File); - } - } - - /* check for indirect register writes */ - for (i = 0; i < fullinst->Instruction.NumDstRegs; i++) { - const struct tgsi_full_dst_register *dst = &fullinst->Dst[i]; - if (dst->Register.Indirect) { - info->indirect_files |= (1 << dst->Register.File); - } - } - - info->num_instructions++; - } - break; - - case TGSI_TOKEN_TYPE_DECLARATION: - { - const struct tgsi_full_declaration *fulldecl - = &parse.FullToken.FullDeclaration; - const uint file = fulldecl->Declaration.File; - uint reg; - for (reg = fulldecl->Range.First; - reg <= fulldecl->Range.Last; - reg++) { - - /* only first 32 regs will appear in this bitfield */ - info->file_mask[file] |= (1 << reg); - info->file_count[file]++; - info->file_max[file] = MAX2(info->file_max[file], (int)reg); - - if (file == TGSI_FILE_INPUT) { - info->input_semantic_name[reg] = (ubyte)fulldecl->Semantic.Name; - info->input_semantic_index[reg] = (ubyte)fulldecl->Semantic.Index; - info->input_interpolate[reg] = (ubyte)fulldecl->Declaration.Interpolate; - info->input_centroid[reg] = (ubyte)fulldecl->Declaration.Centroid; - info->input_cylindrical_wrap[reg] = (ubyte)fulldecl->Declaration.CylindricalWrap; - info->num_inputs++; - - if (procType == TGSI_PROCESSOR_FRAGMENT && - fulldecl->Semantic.Name == TGSI_SEMANTIC_POSITION) - info->reads_position = TRUE; - } - else if (file == TGSI_FILE_SYSTEM_VALUE) { - unsigned index = fulldecl->Range.First; - unsigned semName = fulldecl->Semantic.Name; - - info->system_value_semantic_name[index] = semName; - info->num_system_values = MAX2(info->num_system_values, - index + 1); - - /* - info->system_value_semantic_name[info->num_system_values++] = - fulldecl->Semantic.Name; - */ - - if (fulldecl->Semantic.Name == TGSI_SEMANTIC_INSTANCEID) { - info->uses_instanceid = TRUE; - } - else if (fulldecl->Semantic.Name == TGSI_SEMANTIC_VERTEXID) { - info->uses_vertexid = TRUE; - } - } - else if (file == TGSI_FILE_OUTPUT) { - info->output_semantic_name[reg] = (ubyte)fulldecl->Semantic.Name; - info->output_semantic_index[reg] = (ubyte)fulldecl->Semantic.Index; - info->num_outputs++; - - if (procType == TGSI_PROCESSOR_VERTEX && - fulldecl->Semantic.Name == TGSI_SEMANTIC_CLIPDIST) { - info->num_written_clipdistance += util_bitcount(fulldecl->Declaration.UsageMask); - } - /* extra info for special outputs */ - if (procType == TGSI_PROCESSOR_FRAGMENT && - fulldecl->Semantic.Name == TGSI_SEMANTIC_POSITION) - info->writes_z = TRUE; - if (procType == TGSI_PROCESSOR_FRAGMENT && - fulldecl->Semantic.Name == TGSI_SEMANTIC_STENCIL) - info->writes_stencil = TRUE; - if (procType == TGSI_PROCESSOR_VERTEX && - fulldecl->Semantic.Name == TGSI_SEMANTIC_EDGEFLAG) { - info->writes_edgeflag = TRUE; - } - } - - } - } - break; - - case TGSI_TOKEN_TYPE_IMMEDIATE: - { - uint reg = info->immediate_count++; - uint file = TGSI_FILE_IMMEDIATE; - - info->file_mask[file] |= (1 << reg); - info->file_count[file]++; - info->file_max[file] = MAX2(info->file_max[file], (int)reg); - } - break; - - case TGSI_TOKEN_TYPE_PROPERTY: - { - const struct tgsi_full_property *fullprop - = &parse.FullToken.FullProperty; - - info->properties[info->num_properties].name = - fullprop->Property.PropertyName; - memcpy(info->properties[info->num_properties].data, - fullprop->u, 8 * sizeof(unsigned));; - - ++info->num_properties; - } - break; - - default: - assert( 0 ); - } - } - - info->uses_kill = (info->opcode_count[TGSI_OPCODE_KIL] || - info->opcode_count[TGSI_OPCODE_KILP]); - - /* extract simple properties */ - for (i = 0; i < info->num_properties; ++i) { - switch (info->properties[i].name) { - case TGSI_PROPERTY_FS_COORD_ORIGIN: - info->origin_lower_left = info->properties[i].data[0]; - break; - case TGSI_PROPERTY_FS_COORD_PIXEL_CENTER: - info->pixel_center_integer = info->properties[i].data[0]; - break; - case TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS: - info->color0_writes_all_cbufs = info->properties[i].data[0]; - break; - default: - ; - } - } - - tgsi_parse_free (&parse); -} - - - -/** - * Check if the given shader is a "passthrough" shader consisting of only - * MOV instructions of the form: MOV OUT[n], IN[n] - * - */ -boolean -tgsi_is_passthrough_shader(const struct tgsi_token *tokens) -{ - struct tgsi_parse_context parse; - - /** - ** Setup to begin parsing input shader - **/ - if (tgsi_parse_init(&parse, tokens) != TGSI_PARSE_OK) { - debug_printf("tgsi_parse_init() failed in tgsi_is_passthrough_shader()!\n"); - return FALSE; - } - - /** - ** Loop over incoming program tokens/instructions - */ - while (!tgsi_parse_end_of_tokens(&parse)) { - - tgsi_parse_token(&parse); - - switch (parse.FullToken.Token.Type) { - case TGSI_TOKEN_TYPE_INSTRUCTION: - { - struct tgsi_full_instruction *fullinst = - &parse.FullToken.FullInstruction; - const struct tgsi_full_src_register *src = - &fullinst->Src[0]; - const struct tgsi_full_dst_register *dst = - &fullinst->Dst[0]; - - /* Do a whole bunch of checks for a simple move */ - if (fullinst->Instruction.Opcode != TGSI_OPCODE_MOV || - (src->Register.File != TGSI_FILE_INPUT && - src->Register.File != TGSI_FILE_SYSTEM_VALUE) || - dst->Register.File != TGSI_FILE_OUTPUT || - src->Register.Index != dst->Register.Index || - - src->Register.Negate || - src->Register.Absolute || - - src->Register.SwizzleX != TGSI_SWIZZLE_X || - src->Register.SwizzleY != TGSI_SWIZZLE_Y || - src->Register.SwizzleZ != TGSI_SWIZZLE_Z || - src->Register.SwizzleW != TGSI_SWIZZLE_W || - - dst->Register.WriteMask != TGSI_WRITEMASK_XYZW) - { - tgsi_parse_free(&parse); - return FALSE; - } - } - break; - - case TGSI_TOKEN_TYPE_DECLARATION: - /* fall-through */ - case TGSI_TOKEN_TYPE_IMMEDIATE: - /* fall-through */ - case TGSI_TOKEN_TYPE_PROPERTY: - /* fall-through */ - default: - ; /* no-op */ - } - } - - tgsi_parse_free(&parse); - - /* if we get here, it's a pass-through shader */ - return TRUE; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_scan.h b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_scan.h deleted file mode 100644 index 235e6a3fae0..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_scan.h +++ /dev/null @@ -1,101 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef TGSI_SCAN_H -#define TGSI_SCAN_H - - -#include "pipe/p_compiler.h" -#include "pipe/p_state.h" -#include "pipe/p_shader_tokens.h" - -/** - * Shader summary info - */ -struct tgsi_shader_info -{ - uint num_tokens; - - ubyte num_inputs; - ubyte num_outputs; - ubyte input_semantic_name[PIPE_MAX_SHADER_INPUTS]; /**< TGSI_SEMANTIC_x */ - ubyte input_semantic_index[PIPE_MAX_SHADER_INPUTS]; - ubyte input_interpolate[PIPE_MAX_SHADER_INPUTS]; - ubyte input_centroid[PIPE_MAX_SHADER_INPUTS]; - ubyte input_usage_mask[PIPE_MAX_SHADER_INPUTS]; - ubyte input_cylindrical_wrap[PIPE_MAX_SHADER_INPUTS]; - ubyte output_semantic_name[PIPE_MAX_SHADER_OUTPUTS]; /**< TGSI_SEMANTIC_x */ - ubyte output_semantic_index[PIPE_MAX_SHADER_OUTPUTS]; - - ubyte num_system_values; - ubyte system_value_semantic_name[PIPE_MAX_SHADER_INPUTS]; - - uint file_mask[TGSI_FILE_COUNT]; /**< bitmask of declared registers */ - uint file_count[TGSI_FILE_COUNT]; /**< number of declared registers */ - int file_max[TGSI_FILE_COUNT]; /**< highest index of declared registers */ - - uint immediate_count; /**< number of immediates declared */ - uint num_instructions; - - uint opcode_count[TGSI_OPCODE_LAST]; /**< opcode histogram */ - - boolean reads_position; /**< does fragment shader read position? */ - boolean reads_z; /**< does fragment shader read depth? */ - boolean writes_z; /**< does fragment shader write Z value? */ - boolean writes_stencil; /**< does fragment shader write stencil value? */ - boolean writes_edgeflag; /**< vertex shader outputs edgeflag */ - boolean uses_kill; /**< KIL or KILP instruction used? */ - boolean uses_instanceid; - boolean uses_vertexid; - boolean origin_lower_left; - boolean pixel_center_integer; - boolean color0_writes_all_cbufs; - - unsigned num_written_clipdistance; - /** - * Bitmask indicating which register files are accessed with - * indirect addressing. The bits are (1 << TGSI_FILE_x), etc. - */ - unsigned indirect_files; - - struct { - unsigned name; - unsigned data[8]; - } properties[TGSI_PROPERTY_COUNT]; - uint num_properties; -}; - -extern void -tgsi_scan_shader(const struct tgsi_token *tokens, - struct tgsi_shader_info *info); - - -extern boolean -tgsi_is_passthrough_shader(const struct tgsi_token *tokens); - - -#endif /* TGSI_SCAN_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_strings.c b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_strings.c deleted file mode 100644 index 520452ce1b8..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_strings.c +++ /dev/null @@ -1,177 +0,0 @@ -/************************************************************************** - * - * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * Copyright 2012 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#include "pipe/p_compiler.h" -#include "util/u_memory.h" -#include "tgsi_strings.h" - - -const char *tgsi_processor_type_names[3] = -{ - "FRAG", - "VERT", - "GEOM" -}; - -const char *tgsi_file_names[TGSI_FILE_COUNT] = -{ - "NULL", - "CONST", - "IN", - "OUT", - "TEMP", - "SAMP", - "ADDR", - "IMM", - "PRED", - "SV", - "IMMX", - "TEMPX", - "RES" -}; - -const char *tgsi_semantic_names[TGSI_SEMANTIC_COUNT] = -{ - "POSITION", - "COLOR", - "BCOLOR", - "FOG", - "PSIZE", - "GENERIC", - "NORMAL", - "FACE", - "EDGEFLAG", - "PRIM_ID", - "INSTANCEID", - "VERTEXID", - "STENCIL", - "CLIPDIST", - "CLIPVERTEX" -}; - -const char *tgsi_texture_names[TGSI_TEXTURE_COUNT] = -{ - "UNKNOWN", - "1D", - "2D", - "3D", - "CUBE", - "RECT", - "SHADOW1D", - "SHADOW2D", - "SHADOWRECT", - "1DARRAY", - "2DARRAY", - "SHADOW1DARRAY", - "SHADOW2DARRAY", - "SHADOWCUBE" -}; - -const char *tgsi_property_names[TGSI_PROPERTY_COUNT] = -{ - "GS_INPUT_PRIMITIVE", - "GS_OUTPUT_PRIMITIVE", - "GS_MAX_OUTPUT_VERTICES", - "FS_COORD_ORIGIN", - "FS_COORD_PIXEL_CENTER", - "FS_COLOR0_WRITES_ALL_CBUFS", - "FS_DEPTH_LAYOUT", - "VS_PROHIBIT_UCPS" -}; - -const char *tgsi_type_names[5] = -{ - "UNORM", - "SNORM", - "SINT", - "UINT", - "FLOAT" -}; - -const char *tgsi_interpolate_names[TGSI_INTERPOLATE_COUNT] = -{ - "CONSTANT", - "LINEAR", - "PERSPECTIVE", - "COLOR" -}; - -const char *tgsi_primitive_names[PIPE_PRIM_MAX] = -{ - "POINTS", - "LINES", - "LINE_LOOP", - "LINE_STRIP", - "TRIANGLES", - "TRIANGLE_STRIP", - "TRIANGLE_FAN", - "QUADS", - "QUAD_STRIP", - "POLYGON", - "LINES_ADJACENCY", - "LINE_STRIP_ADJACENCY", - "TRIANGLES_ADJACENCY", - "TRIANGLE_STRIP_ADJACENCY" -}; - -const char *tgsi_fs_coord_origin_names[2] = -{ - "UPPER_LEFT", - "LOWER_LEFT" -}; - -const char *tgsi_fs_coord_pixel_center_names[2] = -{ - "HALF_INTEGER", - "INTEGER" -}; - -const char *tgsi_immediate_type_names[3] = -{ - "FLT32", - "UINT32", - "INT32" -}; - - -static INLINE void -tgsi_strings_check(void) -{ - STATIC_ASSERT(Elements(tgsi_file_names) == TGSI_FILE_COUNT); - STATIC_ASSERT(Elements(tgsi_semantic_names) == TGSI_SEMANTIC_COUNT); - STATIC_ASSERT(Elements(tgsi_texture_names) == TGSI_TEXTURE_COUNT); - STATIC_ASSERT(Elements(tgsi_property_names) == TGSI_PROPERTY_COUNT); - STATIC_ASSERT(Elements(tgsi_primitive_names) == PIPE_PRIM_MAX); - STATIC_ASSERT(Elements(tgsi_interpolate_names) == TGSI_INTERPOLATE_COUNT); - (void) tgsi_processor_type_names; - (void) tgsi_type_names; - (void) tgsi_immediate_type_names; - (void) tgsi_fs_coord_origin_names; - (void) tgsi_fs_coord_pixel_center_names; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_strings.h b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_strings.h deleted file mode 100644 index 0946a58f135..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_strings.h +++ /dev/null @@ -1,69 +0,0 @@ -/************************************************************************** - * - * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * Copyright 2012 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef TGSI_STRINGS_H -#define TGSI_STRINGS_H - -#include "pipe/p_shader_tokens.h" -#include "pipe/p_state.h" - - -#if defined __cplusplus -extern "C" { -#endif - - -extern const char *tgsi_processor_type_names[3]; - -extern const char *tgsi_file_names[TGSI_FILE_COUNT]; - -extern const char *tgsi_semantic_names[TGSI_SEMANTIC_COUNT]; - -extern const char *tgsi_texture_names[TGSI_TEXTURE_COUNT]; - -extern const char *tgsi_property_names[TGSI_PROPERTY_COUNT]; - -extern const char *tgsi_type_names[5]; - -extern const char *tgsi_interpolate_names[TGSI_INTERPOLATE_COUNT]; - -extern const char *tgsi_primitive_names[PIPE_PRIM_MAX]; - -extern const char *tgsi_fs_coord_origin_names[2]; - -extern const char *tgsi_fs_coord_pixel_center_names[2]; - -extern const char *tgsi_immediate_type_names[3]; - - -#if defined __cplusplus -} -#endif - - -#endif /* TGSI_STRINGS_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_text.c b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_text.c deleted file mode 100644 index 4b3d22c3072..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_text.c +++ /dev/null @@ -1,1465 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_debug.h" -#include "util/u_memory.h" -#include "util/u_prim.h" -#include "pipe/p_defines.h" -#include "util/u_inlines.h" -#include "tgsi_text.h" -#include "tgsi_build.h" -#include "tgsi_info.h" -#include "tgsi_parse.h" -#include "tgsi_sanity.h" -#include "tgsi_strings.h" -#include "tgsi_util.h" -#include "tgsi_dump.h" - -static boolean is_alpha_underscore( const char *cur ) -{ - return - (*cur >= 'a' && *cur <= 'z') || - (*cur >= 'A' && *cur <= 'Z') || - *cur == '_'; -} - -static boolean is_digit( const char *cur ) -{ - return *cur >= '0' && *cur <= '9'; -} - -static boolean is_digit_alpha_underscore( const char *cur ) -{ - return is_digit( cur ) || is_alpha_underscore( cur ); -} - -static char uprcase( char c ) -{ - if (c >= 'a' && c <= 'z') - return c + 'A' - 'a'; - return c; -} - -/* - * Ignore case of str1 and assume str1 is already uppercase. - * Return TRUE iff str1 and str2 are equal. - */ -static int -streq_nocase_uprcase(const char *str1, - const char *str2) -{ - while (*str1 && *str2) { - if (*str1 != uprcase(*str2)) - return FALSE; - str1++; - str2++; - } - return *str1 == 0 && *str2 == 0; -} - -static boolean str_match_no_case( const char **pcur, const char *str ) -{ - const char *cur = *pcur; - - while (*str != '\0' && *str == uprcase( *cur )) { - str++; - cur++; - } - if (*str == '\0') { - *pcur = cur; - return TRUE; - } - return FALSE; -} - -/* Eat zero or more whitespaces. - */ -static void eat_opt_white( const char **pcur ) -{ - while (**pcur == ' ' || **pcur == '\t' || **pcur == '\n') - (*pcur)++; -} - -/* Eat one or more whitespaces. - * Return TRUE if at least one whitespace eaten. - */ -static boolean eat_white( const char **pcur ) -{ - const char *cur = *pcur; - - eat_opt_white( pcur ); - return *pcur > cur; -} - -/* Parse unsigned integer. - * No checks for overflow. - */ -static boolean parse_uint( const char **pcur, uint *val ) -{ - const char *cur = *pcur; - - if (is_digit( cur )) { - *val = *cur++ - '0'; - while (is_digit( cur )) - *val = *val * 10 + *cur++ - '0'; - *pcur = cur; - return TRUE; - } - return FALSE; -} - -static boolean parse_identifier( const char **pcur, char *ret ) -{ - const char *cur = *pcur; - int i = 0; - if (is_alpha_underscore( cur )) { - ret[i++] = *cur++; - while (is_alpha_underscore( cur ) || is_digit( cur )) - ret[i++] = *cur++; - ret[i++] = '\0'; - *pcur = cur; - return TRUE; - } - return FALSE; -} - -/* Parse floating point. - */ -static boolean parse_float( const char **pcur, float *val ) -{ - const char *cur = *pcur; - boolean integral_part = FALSE; - boolean fractional_part = FALSE; - - *val = (float) atof( cur ); - - if (*cur == '-' || *cur == '+') - cur++; - if (is_digit( cur )) { - cur++; - integral_part = TRUE; - while (is_digit( cur )) - cur++; - } - if (*cur == '.') { - cur++; - if (is_digit( cur )) { - cur++; - fractional_part = TRUE; - while (is_digit( cur )) - cur++; - } - } - if (!integral_part && !fractional_part) - return FALSE; - if (uprcase( *cur ) == 'E') { - cur++; - if (*cur == '-' || *cur == '+') - cur++; - if (is_digit( cur )) { - cur++; - while (is_digit( cur )) - cur++; - } - else - return FALSE; - } - *pcur = cur; - return TRUE; -} - -struct translate_ctx -{ - const char *text; - const char *cur; - struct tgsi_token *tokens; - struct tgsi_token *tokens_cur; - struct tgsi_token *tokens_end; - struct tgsi_header *header; - unsigned processor : 4; - int implied_array_size : 5; -}; - -static void report_error( struct translate_ctx *ctx, const char *msg ) -{ - int line = 1; - int column = 1; - const char *itr = ctx->text; - - while (itr != ctx->cur) { - if (*itr == '\n') { - column = 1; - ++line; - } - ++column; - ++itr; - } - - debug_printf( "\nTGSI asm error: %s [%d : %d] \n", msg, line, column ); -} - -/* Parse shader header. - * Return TRUE for one of the following headers. - * FRAG - * GEOM - * VERT - */ -static boolean parse_header( struct translate_ctx *ctx ) -{ - uint processor; - - if (str_match_no_case( &ctx->cur, "FRAG" )) - processor = TGSI_PROCESSOR_FRAGMENT; - else if (str_match_no_case( &ctx->cur, "VERT" )) - processor = TGSI_PROCESSOR_VERTEX; - else if (str_match_no_case( &ctx->cur, "GEOM" )) - processor = TGSI_PROCESSOR_GEOMETRY; - else { - report_error( ctx, "Unknown header" ); - return FALSE; - } - - if (ctx->tokens_cur >= ctx->tokens_end) - return FALSE; - ctx->header = (struct tgsi_header *) ctx->tokens_cur++; - *ctx->header = tgsi_build_header(); - - if (ctx->tokens_cur >= ctx->tokens_end) - return FALSE; - *(struct tgsi_processor *) ctx->tokens_cur++ = tgsi_build_processor( processor, ctx->header ); - ctx->processor = processor; - - return TRUE; -} - -static boolean parse_label( struct translate_ctx *ctx, uint *val ) -{ - const char *cur = ctx->cur; - - if (parse_uint( &cur, val )) { - eat_opt_white( &cur ); - if (*cur == ':') { - cur++; - ctx->cur = cur; - return TRUE; - } - } - return FALSE; -} - -static boolean -parse_file( const char **pcur, uint *file ) -{ - uint i; - - for (i = 0; i < TGSI_FILE_COUNT; i++) { - const char *cur = *pcur; - - if (str_match_no_case( &cur, tgsi_file_names[i] )) { - if (!is_digit_alpha_underscore( cur )) { - *pcur = cur; - *file = i; - return TRUE; - } - } - } - return FALSE; -} - -static boolean -parse_opt_writemask( - struct translate_ctx *ctx, - uint *writemask ) -{ - const char *cur; - - cur = ctx->cur; - eat_opt_white( &cur ); - if (*cur == '.') { - cur++; - *writemask = TGSI_WRITEMASK_NONE; - eat_opt_white( &cur ); - if (uprcase( *cur ) == 'X') { - cur++; - *writemask |= TGSI_WRITEMASK_X; - } - if (uprcase( *cur ) == 'Y') { - cur++; - *writemask |= TGSI_WRITEMASK_Y; - } - if (uprcase( *cur ) == 'Z') { - cur++; - *writemask |= TGSI_WRITEMASK_Z; - } - if (uprcase( *cur ) == 'W') { - cur++; - *writemask |= TGSI_WRITEMASK_W; - } - - if (*writemask == TGSI_WRITEMASK_NONE) { - report_error( ctx, "Writemask expected" ); - return FALSE; - } - - ctx->cur = cur; - } - else { - *writemask = TGSI_WRITEMASK_XYZW; - } - return TRUE; -} - - -/* ::= `[' - */ -static boolean -parse_register_file_bracket( - struct translate_ctx *ctx, - uint *file ) -{ - if (!parse_file( &ctx->cur, file )) { - report_error( ctx, "Unknown register file" ); - return FALSE; - } - eat_opt_white( &ctx->cur ); - if (*ctx->cur != '[') { - report_error( ctx, "Expected `['" ); - return FALSE; - } - ctx->cur++; - return TRUE; -} - -/* ::= - */ -static boolean -parse_register_file_bracket_index( - struct translate_ctx *ctx, - uint *file, - int *index ) -{ - uint uindex; - - if (!parse_register_file_bracket( ctx, file )) - return FALSE; - eat_opt_white( &ctx->cur ); - if (!parse_uint( &ctx->cur, &uindex )) { - report_error( ctx, "Expected literal unsigned integer" ); - return FALSE; - } - *index = (int) uindex; - return TRUE; -} - -/* Parse simple 1d register operand. - * ::= `]' - */ -static boolean -parse_register_1d(struct translate_ctx *ctx, - uint *file, - int *index ) -{ - if (!parse_register_file_bracket_index( ctx, file, index )) - return FALSE; - eat_opt_white( &ctx->cur ); - if (*ctx->cur != ']') { - report_error( ctx, "Expected `]'" ); - return FALSE; - } - ctx->cur++; - return TRUE; -} - -struct parsed_bracket { - int index; - - uint ind_file; - int ind_index; - uint ind_comp; -}; - - -static boolean -parse_register_bracket( - struct translate_ctx *ctx, - struct parsed_bracket *brackets) -{ - const char *cur; - uint uindex; - - memset(brackets, 0, sizeof(struct parsed_bracket)); - - eat_opt_white( &ctx->cur ); - - cur = ctx->cur; - if (parse_file( &cur, &brackets->ind_file )) { - if (!parse_register_1d( ctx, &brackets->ind_file, - &brackets->ind_index )) - return FALSE; - eat_opt_white( &ctx->cur ); - - if (*ctx->cur == '.') { - ctx->cur++; - eat_opt_white(&ctx->cur); - - switch (uprcase(*ctx->cur)) { - case 'X': - brackets->ind_comp = TGSI_SWIZZLE_X; - break; - case 'Y': - brackets->ind_comp = TGSI_SWIZZLE_Y; - break; - case 'Z': - brackets->ind_comp = TGSI_SWIZZLE_Z; - break; - case 'W': - brackets->ind_comp = TGSI_SWIZZLE_W; - break; - default: - report_error(ctx, "Expected indirect register swizzle component `x', `y', `z' or `w'"); - return FALSE; - } - ctx->cur++; - eat_opt_white(&ctx->cur); - } - - if (*ctx->cur == '+' || *ctx->cur == '-') { - boolean negate; - - negate = *ctx->cur == '-'; - ctx->cur++; - eat_opt_white( &ctx->cur ); - if (!parse_uint( &ctx->cur, &uindex )) { - report_error( ctx, "Expected literal unsigned integer" ); - return FALSE; - } - if (negate) - brackets->index = -(int) uindex; - else - brackets->index = (int) uindex; - } - else { - brackets->index = 0; - } - } - else { - if (!parse_uint( &ctx->cur, &uindex )) { - report_error( ctx, "Expected literal unsigned integer" ); - return FALSE; - } - brackets->index = (int) uindex; - brackets->ind_file = TGSI_FILE_NULL; - brackets->ind_index = 0; - } - eat_opt_white( &ctx->cur ); - if (*ctx->cur != ']') { - report_error( ctx, "Expected `]'" ); - return FALSE; - } - ctx->cur++; - return TRUE; -} - -static boolean -parse_opt_register_src_bracket( - struct translate_ctx *ctx, - struct parsed_bracket *brackets, - int *parsed_brackets) -{ - const char *cur = ctx->cur; - - *parsed_brackets = 0; - - eat_opt_white( &cur ); - if (cur[0] == '[') { - ++cur; - ctx->cur = cur; - - if (!parse_register_bracket(ctx, brackets)) - return FALSE; - - *parsed_brackets = 1; - } - - return TRUE; -} - - -/* Parse source register operand. - * ::= `]' | - * [`.' (`x' | `y' | `z' | `w')] `]' | - * [`.' (`x' | `y' | `z' | `w')] `+' `]' | - * [`.' (`x' | `y' | `z' | `w')] `-' `]' - */ -static boolean -parse_register_src( - struct translate_ctx *ctx, - uint *file, - struct parsed_bracket *brackets) -{ - brackets->ind_comp = TGSI_SWIZZLE_X; - if (!parse_register_file_bracket( ctx, file )) - return FALSE; - if (!parse_register_bracket( ctx, brackets )) - return FALSE; - - return TRUE; -} - -struct parsed_dcl_bracket { - uint first; - uint last; -}; - -static boolean -parse_register_dcl_bracket( - struct translate_ctx *ctx, - struct parsed_dcl_bracket *bracket) -{ - uint uindex; - memset(bracket, 0, sizeof(struct parsed_dcl_bracket)); - - eat_opt_white( &ctx->cur ); - - if (!parse_uint( &ctx->cur, &uindex )) { - /* it can be an empty bracket [] which means its range - * is from 0 to some implied size */ - if (ctx->cur[0] == ']' && ctx->implied_array_size != 0) { - bracket->first = 0; - bracket->last = ctx->implied_array_size - 1; - goto cleanup; - } - report_error( ctx, "Expected literal unsigned integer" ); - return FALSE; - } - bracket->first = uindex; - - eat_opt_white( &ctx->cur ); - - if (ctx->cur[0] == '.' && ctx->cur[1] == '.') { - uint uindex; - - ctx->cur += 2; - eat_opt_white( &ctx->cur ); - if (!parse_uint( &ctx->cur, &uindex )) { - report_error( ctx, "Expected literal integer" ); - return FALSE; - } - bracket->last = (int) uindex; - eat_opt_white( &ctx->cur ); - } - else { - bracket->last = bracket->first; - } - -cleanup: - if (*ctx->cur != ']') { - report_error( ctx, "Expected `]' or `..'" ); - return FALSE; - } - ctx->cur++; - return TRUE; -} - -/* Parse register declaration. - * ::= `]' | - * `..' `]' - */ -static boolean -parse_register_dcl( - struct translate_ctx *ctx, - uint *file, - struct parsed_dcl_bracket *brackets, - int *num_brackets) -{ - const char *cur; - - *num_brackets = 0; - - if (!parse_register_file_bracket( ctx, file )) - return FALSE; - if (!parse_register_dcl_bracket( ctx, &brackets[0] )) - return FALSE; - - *num_brackets = 1; - - cur = ctx->cur; - eat_opt_white( &cur ); - - if (cur[0] == '[') { - ++cur; - ctx->cur = cur; - if (!parse_register_dcl_bracket( ctx, &brackets[1] )) - return FALSE; - /* for geometry shader we don't really care about - * the first brackets it's always the size of the - * input primitive. so we want to declare just - * the index relevant to the semantics which is in - * the second bracket */ - if (ctx->processor == TGSI_PROCESSOR_GEOMETRY && *file == TGSI_FILE_INPUT) { - brackets[0] = brackets[1]; - *num_brackets = 1; - } else { - *num_brackets = 2; - } - } - - return TRUE; -} - - -/* Parse destination register operand.*/ -static boolean -parse_register_dst( - struct translate_ctx *ctx, - uint *file, - struct parsed_bracket *brackets) -{ - brackets->ind_comp = TGSI_SWIZZLE_X; - if (!parse_register_file_bracket( ctx, file )) - return FALSE; - if (!parse_register_bracket( ctx, brackets )) - return FALSE; - - return TRUE; -} - -static boolean -parse_dst_operand( - struct translate_ctx *ctx, - struct tgsi_full_dst_register *dst ) -{ - uint file; - uint writemask; - const char *cur; - struct parsed_bracket bracket[2]; - int parsed_opt_brackets; - - if (!parse_register_dst( ctx, &file, &bracket[0] )) - return FALSE; - if (!parse_opt_register_src_bracket(ctx, &bracket[1], &parsed_opt_brackets)) - return FALSE; - - cur = ctx->cur; - eat_opt_white( &cur ); - - if (!parse_opt_writemask( ctx, &writemask )) - return FALSE; - - dst->Register.File = file; - if (parsed_opt_brackets) { - dst->Register.Dimension = 1; - dst->Dimension.Indirect = 0; - dst->Dimension.Dimension = 0; - dst->Dimension.Index = bracket[0].index; - bracket[0] = bracket[1]; - } - dst->Register.Index = bracket[0].index; - dst->Register.WriteMask = writemask; - if (bracket[0].ind_file != TGSI_FILE_NULL) { - dst->Register.Indirect = 1; - dst->Indirect.File = bracket[0].ind_file; - dst->Indirect.Index = bracket[0].ind_index; - dst->Indirect.SwizzleX = bracket[0].ind_comp; - dst->Indirect.SwizzleY = bracket[0].ind_comp; - dst->Indirect.SwizzleZ = bracket[0].ind_comp; - dst->Indirect.SwizzleW = bracket[0].ind_comp; - } - return TRUE; -} - -static boolean -parse_optional_swizzle( - struct translate_ctx *ctx, - uint swizzle[4], - boolean *parsed_swizzle ) -{ - const char *cur = ctx->cur; - - *parsed_swizzle = FALSE; - - eat_opt_white( &cur ); - if (*cur == '.') { - uint i; - - cur++; - eat_opt_white( &cur ); - for (i = 0; i < 4; i++) { - if (uprcase( *cur ) == 'X') - swizzle[i] = TGSI_SWIZZLE_X; - else if (uprcase( *cur ) == 'Y') - swizzle[i] = TGSI_SWIZZLE_Y; - else if (uprcase( *cur ) == 'Z') - swizzle[i] = TGSI_SWIZZLE_Z; - else if (uprcase( *cur ) == 'W') - swizzle[i] = TGSI_SWIZZLE_W; - else { - report_error( ctx, "Expected register swizzle component `x', `y', `z' or `w'" ); - return FALSE; - } - cur++; - } - *parsed_swizzle = TRUE; - ctx->cur = cur; - } - return TRUE; -} - -static boolean -parse_src_operand( - struct translate_ctx *ctx, - struct tgsi_full_src_register *src ) -{ - uint file; - uint swizzle[4]; - boolean parsed_swizzle; - struct parsed_bracket bracket[2]; - int parsed_opt_brackets; - - if (*ctx->cur == '-') { - ctx->cur++; - eat_opt_white( &ctx->cur ); - src->Register.Negate = 1; - } - - if (*ctx->cur == '|') { - ctx->cur++; - eat_opt_white( &ctx->cur ); - src->Register.Absolute = 1; - } - - if (!parse_register_src(ctx, &file, &bracket[0])) - return FALSE; - if (!parse_opt_register_src_bracket(ctx, &bracket[1], &parsed_opt_brackets)) - return FALSE; - - src->Register.File = file; - if (parsed_opt_brackets) { - src->Register.Dimension = 1; - src->Dimension.Indirect = 0; - src->Dimension.Dimension = 0; - src->Dimension.Index = bracket[0].index; - bracket[0] = bracket[1]; - } - src->Register.Index = bracket[0].index; - if (bracket[0].ind_file != TGSI_FILE_NULL) { - src->Register.Indirect = 1; - src->Indirect.File = bracket[0].ind_file; - src->Indirect.Index = bracket[0].ind_index; - src->Indirect.SwizzleX = bracket[0].ind_comp; - src->Indirect.SwizzleY = bracket[0].ind_comp; - src->Indirect.SwizzleZ = bracket[0].ind_comp; - src->Indirect.SwizzleW = bracket[0].ind_comp; - } - - /* Parse optional swizzle. - */ - if (parse_optional_swizzle( ctx, swizzle, &parsed_swizzle )) { - if (parsed_swizzle) { - src->Register.SwizzleX = swizzle[0]; - src->Register.SwizzleY = swizzle[1]; - src->Register.SwizzleZ = swizzle[2]; - src->Register.SwizzleW = swizzle[3]; - } - } - - if (src->Register.Absolute) { - eat_opt_white( &ctx->cur ); - if (*ctx->cur != '|') { - report_error( ctx, "Expected `|'" ); - return FALSE; - } - ctx->cur++; - } - - - return TRUE; -} - -static boolean -match_inst_mnemonic(const char **pcur, - const struct tgsi_opcode_info *info) -{ - if (str_match_no_case(pcur, info->mnemonic)) { - return TRUE; - } - return FALSE; -} - -static boolean -parse_instruction( - struct translate_ctx *ctx, - boolean has_label ) -{ - uint i; - uint saturate = TGSI_SAT_NONE; - const struct tgsi_opcode_info *info; - struct tgsi_full_instruction inst; - uint advance; - - inst = tgsi_default_full_instruction(); - - /* Parse predicate. - */ - eat_opt_white( &ctx->cur ); - if (*ctx->cur == '(') { - uint file; - int index; - uint swizzle[4]; - boolean parsed_swizzle; - - inst.Instruction.Predicate = 1; - - ctx->cur++; - if (*ctx->cur == '!') { - ctx->cur++; - inst.Predicate.Negate = 1; - } - - if (!parse_register_1d( ctx, &file, &index )) - return FALSE; - - if (parse_optional_swizzle( ctx, swizzle, &parsed_swizzle )) { - if (parsed_swizzle) { - inst.Predicate.SwizzleX = swizzle[0]; - inst.Predicate.SwizzleY = swizzle[1]; - inst.Predicate.SwizzleZ = swizzle[2]; - inst.Predicate.SwizzleW = swizzle[3]; - } - } - - if (*ctx->cur != ')') { - report_error( ctx, "Expected `)'" ); - return FALSE; - } - - ctx->cur++; - } - - /* Parse instruction name. - */ - eat_opt_white( &ctx->cur ); - for (i = 0; i < TGSI_OPCODE_LAST; i++) { - const char *cur = ctx->cur; - - info = tgsi_get_opcode_info( i ); - if (match_inst_mnemonic(&cur, info)) { - if (str_match_no_case( &cur, "_SATNV" )) - saturate = TGSI_SAT_MINUS_PLUS_ONE; - else if (str_match_no_case( &cur, "_SAT" )) - saturate = TGSI_SAT_ZERO_ONE; - - if (info->num_dst + info->num_src + info->is_tex == 0) { - if (!is_digit_alpha_underscore( cur )) { - ctx->cur = cur; - break; - } - } - else if (*cur == '\0' || eat_white( &cur )) { - ctx->cur = cur; - break; - } - } - } - if (i == TGSI_OPCODE_LAST) { - if (has_label) - report_error( ctx, "Unknown opcode" ); - else - report_error( ctx, "Expected `DCL', `IMM' or a label" ); - return FALSE; - } - - inst.Instruction.Opcode = i; - inst.Instruction.Saturate = saturate; - inst.Instruction.NumDstRegs = info->num_dst; - inst.Instruction.NumSrcRegs = info->num_src; - - /* Parse instruction operands. - */ - for (i = 0; i < info->num_dst + info->num_src + info->is_tex; i++) { - if (i > 0) { - eat_opt_white( &ctx->cur ); - if (*ctx->cur != ',') { - report_error( ctx, "Expected `,'" ); - return FALSE; - } - ctx->cur++; - eat_opt_white( &ctx->cur ); - } - - if (i < info->num_dst) { - if (!parse_dst_operand( ctx, &inst.Dst[i] )) - return FALSE; - } - else if (i < info->num_dst + info->num_src) { - if (!parse_src_operand( ctx, &inst.Src[i - info->num_dst] )) - return FALSE; - } - else { - uint j; - - for (j = 0; j < TGSI_TEXTURE_COUNT; j++) { - if (str_match_no_case( &ctx->cur, tgsi_texture_names[j] )) { - if (!is_digit_alpha_underscore( ctx->cur )) { - inst.Instruction.Texture = 1; - inst.Texture.Texture = j; - break; - } - } - } - if (j == TGSI_TEXTURE_COUNT) { - report_error( ctx, "Expected texture target" ); - return FALSE; - } - } - } - - if (info->is_branch) { - uint target; - - eat_opt_white( &ctx->cur ); - if (*ctx->cur != ':') { - report_error( ctx, "Expected `:'" ); - return FALSE; - } - ctx->cur++; - eat_opt_white( &ctx->cur ); - if (!parse_uint( &ctx->cur, &target )) { - report_error( ctx, "Expected a label" ); - return FALSE; - } - inst.Instruction.Label = 1; - inst.Label.Label = target; - } - - advance = tgsi_build_full_instruction( - &inst, - ctx->tokens_cur, - ctx->header, - (uint) (ctx->tokens_end - ctx->tokens_cur) ); - if (advance == 0) - return FALSE; - ctx->tokens_cur += advance; - - return TRUE; -} - -/* parses a 4-touple of the form {x, y, z, w} - * where x, y, z, w are numbers */ -static boolean parse_immediate_data(struct translate_ctx *ctx, - float *values) -{ - unsigned i; - - eat_opt_white( &ctx->cur ); - if (*ctx->cur != '{') { - report_error( ctx, "Expected `{'" ); - return FALSE; - } - ctx->cur++; - for (i = 0; i < 4; i++) { - eat_opt_white( &ctx->cur ); - if (i > 0) { - if (*ctx->cur != ',') { - report_error( ctx, "Expected `,'" ); - return FALSE; - } - ctx->cur++; - eat_opt_white( &ctx->cur ); - } - if (!parse_float( &ctx->cur, &values[i] )) { - report_error( ctx, "Expected literal floating point" ); - return FALSE; - } - } - eat_opt_white( &ctx->cur ); - if (*ctx->cur != '}') { - report_error( ctx, "Expected `}'" ); - return FALSE; - } - ctx->cur++; - - return TRUE; -} - -static boolean parse_declaration( struct translate_ctx *ctx ) -{ - struct tgsi_full_declaration decl; - uint file; - struct parsed_dcl_bracket brackets[2]; - int num_brackets; - uint writemask; - const char *cur; - uint advance; - boolean is_vs_input; - boolean is_imm_array; - - if (!eat_white( &ctx->cur )) { - report_error( ctx, "Syntax error" ); - return FALSE; - } - if (!parse_register_dcl( ctx, &file, brackets, &num_brackets)) - return FALSE; - if (!parse_opt_writemask( ctx, &writemask )) - return FALSE; - - decl = tgsi_default_full_declaration(); - decl.Declaration.File = file; - decl.Declaration.UsageMask = writemask; - - if (num_brackets == 1) { - decl.Range.First = brackets[0].first; - decl.Range.Last = brackets[0].last; - } else { - decl.Range.First = brackets[1].first; - decl.Range.Last = brackets[1].last; - - decl.Declaration.Dimension = 1; - decl.Dim.Index2D = brackets[0].first; - } - - is_vs_input = (file == TGSI_FILE_INPUT && - ctx->processor == TGSI_PROCESSOR_VERTEX); - is_imm_array = (file == TGSI_FILE_IMMEDIATE_ARRAY); - - cur = ctx->cur; - eat_opt_white( &cur ); - if (*cur == ',' && !is_vs_input) { - uint i, j; - - cur++; - eat_opt_white( &cur ); - if (file == TGSI_FILE_RESOURCE) { - for (i = 0; i < TGSI_TEXTURE_COUNT; i++) { - if (str_match_no_case(&cur, tgsi_texture_names[i])) { - if (!is_digit_alpha_underscore(cur)) { - decl.Resource.Resource = i; - break; - } - } - } - if (i == TGSI_TEXTURE_COUNT) { - report_error(ctx, "Expected texture target"); - return FALSE; - } - eat_opt_white( &cur ); - if (*cur != ',') { - report_error( ctx, "Expected `,'" ); - return FALSE; - } - ++cur; - eat_opt_white( &cur ); - for (j = 0; j < 4; ++j) { - for (i = 0; i < PIPE_TYPE_COUNT; ++i) { - if (str_match_no_case(&cur, tgsi_type_names[i])) { - if (!is_digit_alpha_underscore(cur)) { - switch (j) { - case 0: - decl.Resource.ReturnTypeX = i; - break; - case 1: - decl.Resource.ReturnTypeY = i; - break; - case 2: - decl.Resource.ReturnTypeZ = i; - break; - case 3: - decl.Resource.ReturnTypeW = i; - break; - default: - assert(0); - } - break; - } - } - } - if (i == PIPE_TYPE_COUNT) { - if (j == 0 || j > 2) { - report_error(ctx, "Expected type name"); - return FALSE; - } - break; - } else { - const char *cur2 = cur; - eat_opt_white( &cur2 ); - if (*cur2 == ',') { - cur2++; - eat_opt_white( &cur2 ); - cur = cur2; - continue; - } else - break; - } - } - if (j < 4) { - decl.Resource.ReturnTypeY = - decl.Resource.ReturnTypeZ = - decl.Resource.ReturnTypeW = - decl.Resource.ReturnTypeX; - } - ctx->cur = cur; - } else { - for (i = 0; i < TGSI_SEMANTIC_COUNT; i++) { - if (str_match_no_case( &cur, tgsi_semantic_names[i] )) { - const char *cur2 = cur; - uint index; - - if (is_digit_alpha_underscore( cur )) - continue; - eat_opt_white( &cur2 ); - if (*cur2 == '[') { - cur2++; - eat_opt_white( &cur2 ); - if (!parse_uint( &cur2, &index )) { - report_error( ctx, "Expected literal integer" ); - return FALSE; - } - eat_opt_white( &cur2 ); - if (*cur2 != ']') { - report_error( ctx, "Expected `]'" ); - return FALSE; - } - cur2++; - - decl.Semantic.Index = index; - - cur = cur2; - } - - decl.Declaration.Semantic = 1; - decl.Semantic.Name = i; - - ctx->cur = cur; - break; - } - } - } - } else if (is_imm_array) { - unsigned i; - float *vals_itr; - /* we have our immediate data */ - if (*cur != '{') { - report_error( ctx, "Immediate array without data" ); - return FALSE; - } - ++cur; - ctx->cur = cur; - - decl.ImmediateData.u = - MALLOC(sizeof(union tgsi_immediate_data) * 4 * - (decl.Range.Last + 1)); - vals_itr = (float*)decl.ImmediateData.u; - for (i = 0; i <= decl.Range.Last; ++i) { - if (!parse_immediate_data(ctx, vals_itr)) { - FREE(decl.ImmediateData.u); - return FALSE; - } - vals_itr += 4; - eat_opt_white( &ctx->cur ); - if (*ctx->cur != ',') { - if (i != decl.Range.Last) { - report_error( ctx, "Not enough data in immediate array!" ); - FREE(decl.ImmediateData.u); - return FALSE; - } - } else - ++ctx->cur; - } - eat_opt_white( &ctx->cur ); - if (*ctx->cur != '}') { - FREE(decl.ImmediateData.u); - report_error( ctx, "Immediate array data missing closing '}'" ); - return FALSE; - } - ++ctx->cur; - } - - cur = ctx->cur; - eat_opt_white( &cur ); - if (*cur == ',' && !is_vs_input) { - uint i; - - cur++; - eat_opt_white( &cur ); - for (i = 0; i < TGSI_INTERPOLATE_COUNT; i++) { - if (str_match_no_case( &cur, tgsi_interpolate_names[i] )) { - if (is_digit_alpha_underscore( cur )) - continue; - decl.Declaration.Interpolate = i; - - ctx->cur = cur; - break; - } - } - if (i == TGSI_INTERPOLATE_COUNT) { - report_error( ctx, "Expected semantic or interpolate attribute" ); - return FALSE; - } - } - - advance = tgsi_build_full_declaration( - &decl, - ctx->tokens_cur, - ctx->header, - (uint) (ctx->tokens_end - ctx->tokens_cur) ); - - if (is_imm_array) - FREE(decl.ImmediateData.u); - - if (advance == 0) - return FALSE; - ctx->tokens_cur += advance; - - return TRUE; -} - -static boolean parse_immediate( struct translate_ctx *ctx ) -{ - struct tgsi_full_immediate imm; - float values[4]; - uint advance; - - if (!eat_white( &ctx->cur )) { - report_error( ctx, "Syntax error" ); - return FALSE; - } - if (!str_match_no_case( &ctx->cur, "FLT32" ) || - is_digit_alpha_underscore( ctx->cur )) { - report_error( ctx, "Expected `FLT32'" ); - return FALSE; - } - - parse_immediate_data(ctx, values); - - imm = tgsi_default_full_immediate(); - imm.Immediate.NrTokens += 4; - imm.Immediate.DataType = TGSI_IMM_FLOAT32; - imm.u[0].Float = values[0]; - imm.u[1].Float = values[1]; - imm.u[2].Float = values[2]; - imm.u[3].Float = values[3]; - - advance = tgsi_build_full_immediate( - &imm, - ctx->tokens_cur, - ctx->header, - (uint) (ctx->tokens_end - ctx->tokens_cur) ); - if (advance == 0) - return FALSE; - ctx->tokens_cur += advance; - - return TRUE; -} - -static boolean -parse_primitive( const char **pcur, uint *primitive ) -{ - uint i; - - for (i = 0; i < PIPE_PRIM_MAX; i++) { - const char *cur = *pcur; - - if (str_match_no_case( &cur, tgsi_primitive_names[i])) { - *primitive = i; - *pcur = cur; - return TRUE; - } - } - return FALSE; -} - -static boolean -parse_fs_coord_origin( const char **pcur, uint *fs_coord_origin ) -{ - uint i; - - for (i = 0; i < Elements(tgsi_fs_coord_origin_names); i++) { - const char *cur = *pcur; - - if (str_match_no_case( &cur, tgsi_fs_coord_origin_names[i])) { - *fs_coord_origin = i; - *pcur = cur; - return TRUE; - } - } - return FALSE; -} - -static boolean -parse_fs_coord_pixel_center( const char **pcur, uint *fs_coord_pixel_center ) -{ - uint i; - - for (i = 0; i < Elements(tgsi_fs_coord_pixel_center_names); i++) { - const char *cur = *pcur; - - if (str_match_no_case( &cur, tgsi_fs_coord_pixel_center_names[i])) { - *fs_coord_pixel_center = i; - *pcur = cur; - return TRUE; - } - } - return FALSE; -} - - -static boolean parse_property( struct translate_ctx *ctx ) -{ - struct tgsi_full_property prop; - uint property_name; - uint values[8]; - uint advance; - char id[64]; - - if (!eat_white( &ctx->cur )) { - report_error( ctx, "Syntax error" ); - return FALSE; - } - if (!parse_identifier( &ctx->cur, id )) { - report_error( ctx, "Syntax error" ); - return FALSE; - } - for (property_name = 0; property_name < TGSI_PROPERTY_COUNT; - ++property_name) { - if (streq_nocase_uprcase(tgsi_property_names[property_name], id)) { - break; - } - } - if (property_name >= TGSI_PROPERTY_COUNT) { - debug_printf( "\nError: Unknown property : '%s'", id ); - return FALSE; - } - - eat_opt_white( &ctx->cur ); - switch(property_name) { - case TGSI_PROPERTY_GS_INPUT_PRIM: - case TGSI_PROPERTY_GS_OUTPUT_PRIM: - if (!parse_primitive(&ctx->cur, &values[0] )) { - report_error( ctx, "Unknown primitive name as property!" ); - return FALSE; - } - if (property_name == TGSI_PROPERTY_GS_INPUT_PRIM && - ctx->processor == TGSI_PROCESSOR_GEOMETRY) { - ctx->implied_array_size = u_vertices_per_prim(values[0]); - } - break; - case TGSI_PROPERTY_FS_COORD_ORIGIN: - if (!parse_fs_coord_origin(&ctx->cur, &values[0] )) { - report_error( ctx, "Unknown coord origin as property: must be UPPER_LEFT or LOWER_LEFT!" ); - return FALSE; - } - break; - case TGSI_PROPERTY_FS_COORD_PIXEL_CENTER: - if (!parse_fs_coord_pixel_center(&ctx->cur, &values[0] )) { - report_error( ctx, "Unknown coord pixel center as property: must be HALF_INTEGER or INTEGER!" ); - return FALSE; - } - break; - case TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS: - default: - if (!parse_uint(&ctx->cur, &values[0] )) { - report_error( ctx, "Expected unsigned integer as property!" ); - return FALSE; - } - } - - prop = tgsi_default_full_property(); - prop.Property.PropertyName = property_name; - prop.Property.NrTokens += 1; - prop.u[0].Data = values[0]; - - advance = tgsi_build_full_property( - &prop, - ctx->tokens_cur, - ctx->header, - (uint) (ctx->tokens_end - ctx->tokens_cur) ); - if (advance == 0) - return FALSE; - ctx->tokens_cur += advance; - - return TRUE; -} - - -static boolean translate( struct translate_ctx *ctx ) -{ - eat_opt_white( &ctx->cur ); - if (!parse_header( ctx )) - return FALSE; - - while (*ctx->cur != '\0') { - uint label_val = 0; - if (!eat_white( &ctx->cur )) { - report_error( ctx, "Syntax error" ); - return FALSE; - } - - if (*ctx->cur == '\0') - break; - if (parse_label( ctx, &label_val )) { - if (!parse_instruction( ctx, TRUE )) - return FALSE; - } - else if (str_match_no_case( &ctx->cur, "DCL" )) { - if (!parse_declaration( ctx )) - return FALSE; - } - else if (str_match_no_case( &ctx->cur, "IMM" )) { - if (!parse_immediate( ctx )) - return FALSE; - } - else if (str_match_no_case( &ctx->cur, "PROPERTY" )) { - if (!parse_property( ctx )) - return FALSE; - } - else if (!parse_instruction( ctx, FALSE )) { - return FALSE; - } - } - - return TRUE; -} - -boolean -tgsi_text_translate( - const char *text, - struct tgsi_token *tokens, - uint num_tokens ) -{ - struct translate_ctx ctx; - - ctx.text = text; - ctx.cur = text; - ctx.tokens = tokens; - ctx.tokens_cur = tokens; - ctx.tokens_end = tokens + num_tokens; - - if (!translate( &ctx )) - return FALSE; - - return tgsi_sanity_check( tokens ); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_text.h b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_text.h deleted file mode 100644 index 5fe53cf007d..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_text.h +++ /dev/null @@ -1,49 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef TGSI_TEXT_H -#define TGSI_TEXT_H - -#if defined __cplusplus -extern "C" { -#endif - -#include "pipe/p_compiler.h" - -struct tgsi_token; - -boolean -tgsi_text_translate( - const char *text, - struct tgsi_token *tokens, - uint num_tokens ); - -#if defined __cplusplus -} -#endif - -#endif /* TGSI_TEXT_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_transform.c b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_transform.c deleted file mode 100644 index ae875f29abf..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_transform.c +++ /dev/null @@ -1,250 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * TGSI program transformation utility. - * - * Authors: Brian Paul - */ - -#include "util/u_debug.h" - -#include "tgsi_transform.h" - - - -static void -emit_instruction(struct tgsi_transform_context *ctx, - const struct tgsi_full_instruction *inst) -{ - uint ti = ctx->ti; - - ti += tgsi_build_full_instruction(inst, - ctx->tokens_out + ti, - ctx->header, - ctx->max_tokens_out - ti); - ctx->ti = ti; -} - - -static void -emit_declaration(struct tgsi_transform_context *ctx, - const struct tgsi_full_declaration *decl) -{ - uint ti = ctx->ti; - - ti += tgsi_build_full_declaration(decl, - ctx->tokens_out + ti, - ctx->header, - ctx->max_tokens_out - ti); - ctx->ti = ti; -} - - -static void -emit_immediate(struct tgsi_transform_context *ctx, - const struct tgsi_full_immediate *imm) -{ - uint ti = ctx->ti; - - ti += tgsi_build_full_immediate(imm, - ctx->tokens_out + ti, - ctx->header, - ctx->max_tokens_out - ti); - ctx->ti = ti; -} - - -static void -emit_property(struct tgsi_transform_context *ctx, - const struct tgsi_full_property *prop) -{ - uint ti = ctx->ti; - - ti += tgsi_build_full_property(prop, - ctx->tokens_out + ti, - ctx->header, - ctx->max_tokens_out - ti); - ctx->ti = ti; -} - - -/** - * Apply user-defined transformations to the input shader to produce - * the output shader. - * For example, a register search-and-replace operation could be applied - * by defining a transform_instruction() callback that examined and changed - * the instruction src/dest regs. - * - * \return number of tokens emitted - */ -int -tgsi_transform_shader(const struct tgsi_token *tokens_in, - struct tgsi_token *tokens_out, - uint max_tokens_out, - struct tgsi_transform_context *ctx) -{ - uint procType; - - /* input shader */ - struct tgsi_parse_context parse; - - /* output shader */ - struct tgsi_processor *processor; - - - /** - ** callback context init - **/ - ctx->emit_instruction = emit_instruction; - ctx->emit_declaration = emit_declaration; - ctx->emit_immediate = emit_immediate; - ctx->emit_property = emit_property; - ctx->tokens_out = tokens_out; - ctx->max_tokens_out = max_tokens_out; - - - /** - ** Setup to begin parsing input shader - **/ - if (tgsi_parse_init( &parse, tokens_in ) != TGSI_PARSE_OK) { - debug_printf("tgsi_parse_init() failed in tgsi_transform_shader()!\n"); - return -1; - } - procType = parse.FullHeader.Processor.Processor; - assert(procType == TGSI_PROCESSOR_FRAGMENT || - procType == TGSI_PROCESSOR_VERTEX || - procType == TGSI_PROCESSOR_GEOMETRY); - - - /** - ** Setup output shader - **/ - ctx->header = (struct tgsi_header *)tokens_out; - *ctx->header = tgsi_build_header(); - - processor = (struct tgsi_processor *) (tokens_out + 1); - *processor = tgsi_build_processor( procType, ctx->header ); - - ctx->ti = 2; - - - /** - ** Loop over incoming program tokens/instructions - */ - while( !tgsi_parse_end_of_tokens( &parse ) ) { - - tgsi_parse_token( &parse ); - - switch( parse.FullToken.Token.Type ) { - case TGSI_TOKEN_TYPE_INSTRUCTION: - { - struct tgsi_full_instruction *fullinst - = &parse.FullToken.FullInstruction; - - if (ctx->transform_instruction) - ctx->transform_instruction(ctx, fullinst); - else - ctx->emit_instruction(ctx, fullinst); - } - break; - - case TGSI_TOKEN_TYPE_DECLARATION: - { - struct tgsi_full_declaration *fulldecl - = &parse.FullToken.FullDeclaration; - - if (ctx->transform_declaration) - ctx->transform_declaration(ctx, fulldecl); - else - ctx->emit_declaration(ctx, fulldecl); - } - break; - - case TGSI_TOKEN_TYPE_IMMEDIATE: - { - struct tgsi_full_immediate *fullimm - = &parse.FullToken.FullImmediate; - - if (ctx->transform_immediate) - ctx->transform_immediate(ctx, fullimm); - else - ctx->emit_immediate(ctx, fullimm); - } - break; - case TGSI_TOKEN_TYPE_PROPERTY: - { - struct tgsi_full_property *fullprop - = &parse.FullToken.FullProperty; - - if (ctx->transform_property) - ctx->transform_property(ctx, fullprop); - else - ctx->emit_property(ctx, fullprop); - } - break; - - default: - assert( 0 ); - } - } - - if (ctx->epilog) { - ctx->epilog(ctx); - } - - tgsi_parse_free (&parse); - - return ctx->ti; -} - - -#include "tgsi_text.h" - -extern int tgsi_transform_foo( struct tgsi_token *tokens_out, - uint max_tokens_out ); - -/* This function exists only so that tgsi_text_translate() doesn't get - * magic-ed out of the libtgsi.a archive by the build system. Don't - * remove unless you know this has been fixed - check on mingw/scons - * builds as well. - */ -int -tgsi_transform_foo( struct tgsi_token *tokens_out, - uint max_tokens_out ) -{ - const char *text = - "FRAG\n" - "DCL IN[0], COLOR, CONSTANT\n" - "DCL OUT[0], COLOR\n" - " 0: MOV OUT[0], IN[0]\n" - " 1: END"; - - return tgsi_text_translate( text, - tokens_out, - max_tokens_out ); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_transform.h b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_transform.h deleted file mode 100644 index 818478e277a..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_transform.h +++ /dev/null @@ -1,96 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef TGSI_TRANSFORM_H -#define TGSI_TRANSFORM_H - - -#include "pipe/p_shader_tokens.h" -#include "tgsi/tgsi_parse.h" -#include "tgsi/tgsi_build.h" - - - -/** - * Subclass this to add caller-specific data - */ -struct tgsi_transform_context -{ -/**** PUBLIC ***/ - - /** - * User-defined callbacks invoked per instruction. - */ - void (*transform_instruction)(struct tgsi_transform_context *ctx, - struct tgsi_full_instruction *inst); - - void (*transform_declaration)(struct tgsi_transform_context *ctx, - struct tgsi_full_declaration *decl); - - void (*transform_immediate)(struct tgsi_transform_context *ctx, - struct tgsi_full_immediate *imm); - void (*transform_property)(struct tgsi_transform_context *ctx, - struct tgsi_full_property *prop); - - /** - * Called at end of input program to allow caller to append extra - * instructions. Return number of tokens emitted. - */ - void (*epilog)(struct tgsi_transform_context *ctx); - - -/*** PRIVATE ***/ - - /** - * These are setup by tgsi_transform_shader() and cannot be overridden. - * Meant to be called from in the above user callback functions. - */ - void (*emit_instruction)(struct tgsi_transform_context *ctx, - const struct tgsi_full_instruction *inst); - void (*emit_declaration)(struct tgsi_transform_context *ctx, - const struct tgsi_full_declaration *decl); - void (*emit_immediate)(struct tgsi_transform_context *ctx, - const struct tgsi_full_immediate *imm); - void (*emit_property)(struct tgsi_transform_context *ctx, - const struct tgsi_full_property *prop); - - struct tgsi_header *header; - uint max_tokens_out; - struct tgsi_token *tokens_out; - uint ti; -}; - - - -extern int -tgsi_transform_shader(const struct tgsi_token *tokens_in, - struct tgsi_token *tokens_out, - uint max_tokens_out, - struct tgsi_transform_context *ctx); - - -#endif /* TGSI_TRANSFORM_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_ureg.c b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_ureg.c deleted file mode 100644 index 0f9aa3ab43a..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_ureg.c +++ /dev/null @@ -1,1686 +0,0 @@ -/************************************************************************** - * - * Copyright 2009-2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE, INC AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#include "pipe/p_context.h" -#include "pipe/p_state.h" -#include "tgsi/tgsi_ureg.h" -#include "tgsi/tgsi_build.h" -#include "tgsi/tgsi_info.h" -#include "tgsi/tgsi_dump.h" -#include "tgsi/tgsi_sanity.h" -#include "util/u_debug.h" -#include "util/u_memory.h" -#include "util/u_math.h" - -union tgsi_any_token { - struct tgsi_header header; - struct tgsi_processor processor; - struct tgsi_token token; - struct tgsi_property prop; - struct tgsi_property_data prop_data; - struct tgsi_declaration decl; - struct tgsi_declaration_range decl_range; - struct tgsi_declaration_dimension decl_dim; - struct tgsi_declaration_semantic decl_semantic; - struct tgsi_declaration_resource decl_resource; - struct tgsi_immediate imm; - union tgsi_immediate_data imm_data; - struct tgsi_instruction insn; - struct tgsi_instruction_predicate insn_predicate; - struct tgsi_instruction_label insn_label; - struct tgsi_instruction_texture insn_texture; - struct tgsi_texture_offset insn_texture_offset; - struct tgsi_src_register src; - struct tgsi_dimension dim; - struct tgsi_dst_register dst; - unsigned value; -}; - - -struct ureg_tokens { - union tgsi_any_token *tokens; - unsigned size; - unsigned order; - unsigned count; -}; - -#define UREG_MAX_INPUT PIPE_MAX_ATTRIBS -#define UREG_MAX_SYSTEM_VALUE PIPE_MAX_ATTRIBS -#define UREG_MAX_OUTPUT PIPE_MAX_ATTRIBS -#define UREG_MAX_CONSTANT_RANGE 32 -#define UREG_MAX_IMMEDIATE 256 -#define UREG_MAX_TEMP 256 -#define UREG_MAX_ADDR 2 -#define UREG_MAX_PRED 1 - -struct const_decl { - struct { - unsigned first; - unsigned last; - } constant_range[UREG_MAX_CONSTANT_RANGE]; - unsigned nr_constant_ranges; -}; - -#define DOMAIN_DECL 0 -#define DOMAIN_INSN 1 - -struct ureg_program -{ - unsigned processor; - struct pipe_context *pipe; - - struct { - unsigned semantic_name; - unsigned semantic_index; - unsigned interp; - unsigned char cylindrical_wrap; - unsigned char centroid; - } fs_input[UREG_MAX_INPUT]; - unsigned nr_fs_inputs; - - unsigned vs_inputs[UREG_MAX_INPUT/32]; - - struct { - unsigned index; - unsigned semantic_name; - unsigned semantic_index; - } gs_input[UREG_MAX_INPUT]; - unsigned nr_gs_inputs; - - struct { - unsigned index; - unsigned semantic_name; - unsigned semantic_index; - } system_value[UREG_MAX_SYSTEM_VALUE]; - unsigned nr_system_values; - - struct { - unsigned semantic_name; - unsigned semantic_index; - unsigned usage_mask; /* = TGSI_WRITEMASK_* */ - } output[UREG_MAX_OUTPUT]; - unsigned nr_outputs; - - struct { - union { - float f[4]; - unsigned u[4]; - int i[4]; - } value; - unsigned nr; - unsigned type; - } immediate[UREG_MAX_IMMEDIATE]; - unsigned nr_immediates; - - struct ureg_src sampler[PIPE_MAX_SAMPLERS]; - unsigned nr_samplers; - - struct { - unsigned index; - unsigned target; - unsigned return_type_x; - unsigned return_type_y; - unsigned return_type_z; - unsigned return_type_w; - } resource[PIPE_MAX_SHADER_RESOURCES]; - unsigned nr_resources; - - unsigned temps_active[UREG_MAX_TEMP / 32]; - unsigned nr_temps; - - struct const_decl const_decls; - struct const_decl const_decls2D[PIPE_MAX_CONSTANT_BUFFERS]; - - unsigned property_gs_input_prim; - unsigned property_gs_output_prim; - unsigned property_gs_max_vertices; - unsigned char property_fs_coord_origin; /* = TGSI_FS_COORD_ORIGIN_* */ - unsigned char property_fs_coord_pixel_center; /* = TGSI_FS_COORD_PIXEL_CENTER_* */ - unsigned char property_fs_color0_writes_all_cbufs; /* = TGSI_FS_COLOR0_WRITES_ALL_CBUFS * */ - unsigned char property_fs_depth_layout; /* TGSI_FS_DEPTH_LAYOUT */ - - unsigned nr_addrs; - unsigned nr_preds; - unsigned nr_instructions; - - struct ureg_tokens domain[2]; -}; - -static union tgsi_any_token error_tokens[32]; - -static void tokens_error( struct ureg_tokens *tokens ) -{ - if (tokens->tokens && tokens->tokens != error_tokens) - FREE(tokens->tokens); - - tokens->tokens = error_tokens; - tokens->size = Elements(error_tokens); - tokens->count = 0; -} - - -static void tokens_expand( struct ureg_tokens *tokens, - unsigned count ) -{ - unsigned old_size = tokens->size * sizeof(unsigned); - - if (tokens->tokens == error_tokens) { - return; - } - - while (tokens->count + count > tokens->size) { - tokens->size = (1 << ++tokens->order); - } - - tokens->tokens = REALLOC(tokens->tokens, - old_size, - tokens->size * sizeof(unsigned)); - if (tokens->tokens == NULL) { - tokens_error(tokens); - } -} - -static void set_bad( struct ureg_program *ureg ) -{ - tokens_error(&ureg->domain[0]); -} - - - -static union tgsi_any_token *get_tokens( struct ureg_program *ureg, - unsigned domain, - unsigned count ) -{ - struct ureg_tokens *tokens = &ureg->domain[domain]; - union tgsi_any_token *result; - - if (tokens->count + count > tokens->size) - tokens_expand(tokens, count); - - result = &tokens->tokens[tokens->count]; - tokens->count += count; - return result; -} - - -static union tgsi_any_token *retrieve_token( struct ureg_program *ureg, - unsigned domain, - unsigned nr ) -{ - if (ureg->domain[domain].tokens == error_tokens) - return &error_tokens[0]; - - return &ureg->domain[domain].tokens[nr]; -} - - - -static INLINE struct ureg_dst -ureg_dst_register( unsigned file, - unsigned index ) -{ - struct ureg_dst dst; - - dst.File = file; - dst.WriteMask = TGSI_WRITEMASK_XYZW; - dst.Indirect = 0; - dst.IndirectIndex = 0; - dst.IndirectSwizzle = 0; - dst.Saturate = 0; - dst.Predicate = 0; - dst.PredNegate = 0; - dst.PredSwizzleX = TGSI_SWIZZLE_X; - dst.PredSwizzleY = TGSI_SWIZZLE_Y; - dst.PredSwizzleZ = TGSI_SWIZZLE_Z; - dst.PredSwizzleW = TGSI_SWIZZLE_W; - dst.Index = index; - - return dst; -} - - -void -ureg_property_gs_input_prim(struct ureg_program *ureg, - unsigned input_prim) -{ - ureg->property_gs_input_prim = input_prim; -} - -void -ureg_property_gs_output_prim(struct ureg_program *ureg, - unsigned output_prim) -{ - ureg->property_gs_output_prim = output_prim; -} - -void -ureg_property_gs_max_vertices(struct ureg_program *ureg, - unsigned max_vertices) -{ - ureg->property_gs_max_vertices = max_vertices; -} - -void -ureg_property_fs_coord_origin(struct ureg_program *ureg, - unsigned fs_coord_origin) -{ - ureg->property_fs_coord_origin = fs_coord_origin; -} - -void -ureg_property_fs_coord_pixel_center(struct ureg_program *ureg, - unsigned fs_coord_pixel_center) -{ - ureg->property_fs_coord_pixel_center = fs_coord_pixel_center; -} - -void -ureg_property_fs_color0_writes_all_cbufs(struct ureg_program *ureg, - unsigned fs_color0_writes_all_cbufs) -{ - ureg->property_fs_color0_writes_all_cbufs = fs_color0_writes_all_cbufs; -} - -void -ureg_property_fs_depth_layout(struct ureg_program *ureg, - unsigned fs_depth_layout) -{ - ureg->property_fs_depth_layout = fs_depth_layout; -} - -struct ureg_src -ureg_DECL_fs_input_cyl_centroid(struct ureg_program *ureg, - unsigned semantic_name, - unsigned semantic_index, - unsigned interp_mode, - unsigned cylindrical_wrap, - unsigned centroid) -{ - unsigned i; - - for (i = 0; i < ureg->nr_fs_inputs; i++) { - if (ureg->fs_input[i].semantic_name == semantic_name && - ureg->fs_input[i].semantic_index == semantic_index) { - goto out; - } - } - - if (ureg->nr_fs_inputs < UREG_MAX_INPUT) { - ureg->fs_input[i].semantic_name = semantic_name; - ureg->fs_input[i].semantic_index = semantic_index; - ureg->fs_input[i].interp = interp_mode; - ureg->fs_input[i].cylindrical_wrap = cylindrical_wrap; - ureg->fs_input[i].centroid = centroid; - ureg->nr_fs_inputs++; - } else { - set_bad(ureg); - } - -out: - return ureg_src_register(TGSI_FILE_INPUT, i); -} - - -struct ureg_src -ureg_DECL_vs_input( struct ureg_program *ureg, - unsigned index ) -{ - assert(ureg->processor == TGSI_PROCESSOR_VERTEX); - - ureg->vs_inputs[index/32] |= 1 << (index % 32); - return ureg_src_register( TGSI_FILE_INPUT, index ); -} - - -struct ureg_src -ureg_DECL_gs_input(struct ureg_program *ureg, - unsigned index, - unsigned semantic_name, - unsigned semantic_index) -{ - if (ureg->nr_gs_inputs < UREG_MAX_INPUT) { - ureg->gs_input[ureg->nr_gs_inputs].index = index; - ureg->gs_input[ureg->nr_gs_inputs].semantic_name = semantic_name; - ureg->gs_input[ureg->nr_gs_inputs].semantic_index = semantic_index; - ureg->nr_gs_inputs++; - } else { - set_bad(ureg); - } - - /* XXX: Add suport for true 2D input registers. */ - return ureg_src_register(TGSI_FILE_INPUT, index); -} - - -struct ureg_src -ureg_DECL_system_value(struct ureg_program *ureg, - unsigned index, - unsigned semantic_name, - unsigned semantic_index) -{ - if (ureg->nr_system_values < UREG_MAX_SYSTEM_VALUE) { - ureg->system_value[ureg->nr_system_values].index = index; - ureg->system_value[ureg->nr_system_values].semantic_name = semantic_name; - ureg->system_value[ureg->nr_system_values].semantic_index = semantic_index; - ureg->nr_system_values++; - } else { - set_bad(ureg); - } - - return ureg_src_register(TGSI_FILE_SYSTEM_VALUE, index); -} - - -struct ureg_dst -ureg_DECL_output_masked( struct ureg_program *ureg, - unsigned name, - unsigned index, - unsigned usage_mask ) -{ - unsigned i; - - assert(usage_mask != 0); - - for (i = 0; i < ureg->nr_outputs; i++) { - if (ureg->output[i].semantic_name == name && - ureg->output[i].semantic_index == index) { - ureg->output[i].usage_mask |= usage_mask; - goto out; - } - } - - if (ureg->nr_outputs < UREG_MAX_OUTPUT) { - ureg->output[i].semantic_name = name; - ureg->output[i].semantic_index = index; - ureg->output[i].usage_mask = usage_mask; - ureg->nr_outputs++; - } - else { - set_bad( ureg ); - } - -out: - return ureg_dst_register( TGSI_FILE_OUTPUT, i ); -} - - -struct ureg_dst -ureg_DECL_output( struct ureg_program *ureg, - unsigned name, - unsigned index ) -{ - return ureg_DECL_output_masked(ureg, name, index, TGSI_WRITEMASK_XYZW); -} - - -/* Returns a new constant register. Keep track of which have been - * referred to so that we can emit decls later. - * - * Constant operands declared with this function must be addressed - * with a two-dimensional index. - * - * There is nothing in this code to bind this constant to any tracked - * value or manage any constant_buffer contents -- that's the - * resposibility of the calling code. - */ -void -ureg_DECL_constant2D(struct ureg_program *ureg, - unsigned first, - unsigned last, - unsigned index2D) -{ - struct const_decl *decl = &ureg->const_decls2D[index2D]; - - assert(index2D < PIPE_MAX_CONSTANT_BUFFERS); - - if (decl->nr_constant_ranges < UREG_MAX_CONSTANT_RANGE) { - uint i = decl->nr_constant_ranges++; - - decl->constant_range[i].first = first; - decl->constant_range[i].last = last; - } -} - - -/* A one-dimensional, depricated version of ureg_DECL_constant2D(). - * - * Constant operands declared with this function must be addressed - * with a one-dimensional index. - */ -struct ureg_src -ureg_DECL_constant(struct ureg_program *ureg, - unsigned index) -{ - struct const_decl *decl = &ureg->const_decls; - unsigned minconst = index, maxconst = index; - unsigned i; - - /* Inside existing range? - */ - for (i = 0; i < decl->nr_constant_ranges; i++) { - if (decl->constant_range[i].first <= index && - decl->constant_range[i].last >= index) { - goto out; - } - } - - /* Extend existing range? - */ - for (i = 0; i < decl->nr_constant_ranges; i++) { - if (decl->constant_range[i].last == index - 1) { - decl->constant_range[i].last = index; - goto out; - } - - if (decl->constant_range[i].first == index + 1) { - decl->constant_range[i].first = index; - goto out; - } - - minconst = MIN2(minconst, decl->constant_range[i].first); - maxconst = MAX2(maxconst, decl->constant_range[i].last); - } - - /* Create new range? - */ - if (decl->nr_constant_ranges < UREG_MAX_CONSTANT_RANGE) { - i = decl->nr_constant_ranges++; - decl->constant_range[i].first = index; - decl->constant_range[i].last = index; - goto out; - } - - /* Collapse all ranges down to one: - */ - i = 0; - decl->constant_range[0].first = minconst; - decl->constant_range[0].last = maxconst; - decl->nr_constant_ranges = 1; - -out: - assert(i < decl->nr_constant_ranges); - assert(decl->constant_range[i].first <= index); - assert(decl->constant_range[i].last >= index); - return ureg_src_register(TGSI_FILE_CONSTANT, index); -} - - -/* Allocate a new temporary. Temporaries greater than UREG_MAX_TEMP - * are legal, but will not be released. - */ -struct ureg_dst ureg_DECL_temporary( struct ureg_program *ureg ) -{ - unsigned i; - - for (i = 0; i < UREG_MAX_TEMP; i += 32) { - int bit = ffs(~ureg->temps_active[i/32]); - if (bit != 0) { - i += bit - 1; - goto out; - } - } - - /* No reusable temps, so allocate a new one: - */ - i = ureg->nr_temps++; - -out: - if (i < UREG_MAX_TEMP) - ureg->temps_active[i/32] |= 1 << (i % 32); - - if (i >= ureg->nr_temps) - ureg->nr_temps = i + 1; - - return ureg_dst_register( TGSI_FILE_TEMPORARY, i ); -} - - -void ureg_release_temporary( struct ureg_program *ureg, - struct ureg_dst tmp ) -{ - if(tmp.File == TGSI_FILE_TEMPORARY) - if (tmp.Index < UREG_MAX_TEMP) - ureg->temps_active[tmp.Index/32] &= ~(1 << (tmp.Index % 32)); -} - - -/* Allocate a new address register. - */ -struct ureg_dst ureg_DECL_address( struct ureg_program *ureg ) -{ - if (ureg->nr_addrs < UREG_MAX_ADDR) - return ureg_dst_register( TGSI_FILE_ADDRESS, ureg->nr_addrs++ ); - - assert( 0 ); - return ureg_dst_register( TGSI_FILE_ADDRESS, 0 ); -} - -/* Allocate a new predicate register. - */ -struct ureg_dst -ureg_DECL_predicate(struct ureg_program *ureg) -{ - if (ureg->nr_preds < UREG_MAX_PRED) { - return ureg_dst_register(TGSI_FILE_PREDICATE, ureg->nr_preds++); - } - - assert(0); - return ureg_dst_register(TGSI_FILE_PREDICATE, 0); -} - -/* Allocate a new sampler. - */ -struct ureg_src ureg_DECL_sampler( struct ureg_program *ureg, - unsigned nr ) -{ - unsigned i; - - for (i = 0; i < ureg->nr_samplers; i++) - if (ureg->sampler[i].Index == nr) - return ureg->sampler[i]; - - if (i < PIPE_MAX_SAMPLERS) { - ureg->sampler[i] = ureg_src_register( TGSI_FILE_SAMPLER, nr ); - ureg->nr_samplers++; - return ureg->sampler[i]; - } - - assert( 0 ); - return ureg->sampler[0]; -} - -/* - * Allocate a new shader resource. - */ -struct ureg_src -ureg_DECL_resource(struct ureg_program *ureg, - unsigned index, - unsigned target, - unsigned return_type_x, - unsigned return_type_y, - unsigned return_type_z, - unsigned return_type_w) -{ - struct ureg_src reg = ureg_src_register(TGSI_FILE_RESOURCE, index); - uint i; - - for (i = 0; i < ureg->nr_resources; i++) { - if (ureg->resource[i].index == index) { - return reg; - } - } - - if (i < PIPE_MAX_SHADER_RESOURCES) { - ureg->resource[i].index = index; - ureg->resource[i].target = target; - ureg->resource[i].return_type_x = return_type_x; - ureg->resource[i].return_type_y = return_type_y; - ureg->resource[i].return_type_z = return_type_z; - ureg->resource[i].return_type_w = return_type_w; - ureg->nr_resources++; - return reg; - } - - assert(0); - return reg; -} - -static int -match_or_expand_immediate( const unsigned *v, - unsigned nr, - unsigned *v2, - unsigned *pnr2, - unsigned *swizzle ) -{ - unsigned nr2 = *pnr2; - unsigned i, j; - - *swizzle = 0; - - for (i = 0; i < nr; i++) { - boolean found = FALSE; - - for (j = 0; j < nr2 && !found; j++) { - if (v[i] == v2[j]) { - *swizzle |= j << (i * 2); - found = TRUE; - } - } - - if (!found) { - if (nr2 >= 4) { - return FALSE; - } - - v2[nr2] = v[i]; - *swizzle |= nr2 << (i * 2); - nr2++; - } - } - - /* Actually expand immediate only when fully succeeded. - */ - *pnr2 = nr2; - return TRUE; -} - - -static struct ureg_src -decl_immediate( struct ureg_program *ureg, - const unsigned *v, - unsigned nr, - unsigned type ) -{ - unsigned i, j; - unsigned swizzle = 0; - - /* Could do a first pass where we examine all existing immediates - * without expanding. - */ - - for (i = 0; i < ureg->nr_immediates; i++) { - if (ureg->immediate[i].type != type) { - continue; - } - if (match_or_expand_immediate(v, - nr, - ureg->immediate[i].value.u, - &ureg->immediate[i].nr, - &swizzle)) { - goto out; - } - } - - if (ureg->nr_immediates < UREG_MAX_IMMEDIATE) { - i = ureg->nr_immediates++; - ureg->immediate[i].type = type; - if (match_or_expand_immediate(v, - nr, - ureg->immediate[i].value.u, - &ureg->immediate[i].nr, - &swizzle)) { - goto out; - } - } - - set_bad(ureg); - -out: - /* Make sure that all referenced elements are from this immediate. - * Has the effect of making size-one immediates into scalars. - */ - for (j = nr; j < 4; j++) { - swizzle |= (swizzle & 0x3) << (j * 2); - } - - return ureg_swizzle(ureg_src_register(TGSI_FILE_IMMEDIATE, i), - (swizzle >> 0) & 0x3, - (swizzle >> 2) & 0x3, - (swizzle >> 4) & 0x3, - (swizzle >> 6) & 0x3); -} - - -struct ureg_src -ureg_DECL_immediate( struct ureg_program *ureg, - const float *v, - unsigned nr ) -{ - union { - float f[4]; - unsigned u[4]; - } fu; - unsigned int i; - - for (i = 0; i < nr; i++) { - fu.f[i] = v[i]; - } - - return decl_immediate(ureg, fu.u, nr, TGSI_IMM_FLOAT32); -} - - -struct ureg_src -ureg_DECL_immediate_uint( struct ureg_program *ureg, - const unsigned *v, - unsigned nr ) -{ - return decl_immediate(ureg, v, nr, TGSI_IMM_UINT32); -} - - -struct ureg_src -ureg_DECL_immediate_block_uint( struct ureg_program *ureg, - const unsigned *v, - unsigned nr ) -{ - uint index; - uint i; - - if (ureg->nr_immediates + (nr + 3) / 4 > UREG_MAX_IMMEDIATE) { - set_bad(ureg); - return ureg_src_register(TGSI_FILE_IMMEDIATE, 0); - } - - index = ureg->nr_immediates; - ureg->nr_immediates += (nr + 3) / 4; - - for (i = index; i < ureg->nr_immediates; i++) { - ureg->immediate[i].type = TGSI_IMM_UINT32; - ureg->immediate[i].nr = nr > 4 ? 4 : nr; - memcpy(ureg->immediate[i].value.u, - &v[(i - index) * 4], - ureg->immediate[i].nr * sizeof(uint)); - nr -= 4; - } - - return ureg_src_register(TGSI_FILE_IMMEDIATE, index); -} - - -struct ureg_src -ureg_DECL_immediate_int( struct ureg_program *ureg, - const int *v, - unsigned nr ) -{ - return decl_immediate(ureg, (const unsigned *)v, nr, TGSI_IMM_INT32); -} - - -void -ureg_emit_src( struct ureg_program *ureg, - struct ureg_src src ) -{ - unsigned size = 1 + (src.Indirect ? 1 : 0) + - (src.Dimension ? (src.DimIndirect ? 2 : 1) : 0); - - union tgsi_any_token *out = get_tokens( ureg, DOMAIN_INSN, size ); - unsigned n = 0; - - assert(src.File != TGSI_FILE_NULL); - assert(src.File < TGSI_FILE_COUNT); - - out[n].value = 0; - out[n].src.File = src.File; - out[n].src.SwizzleX = src.SwizzleX; - out[n].src.SwizzleY = src.SwizzleY; - out[n].src.SwizzleZ = src.SwizzleZ; - out[n].src.SwizzleW = src.SwizzleW; - out[n].src.Index = src.Index; - out[n].src.Negate = src.Negate; - out[0].src.Absolute = src.Absolute; - n++; - - if (src.Indirect) { - out[0].src.Indirect = 1; - out[n].value = 0; - out[n].src.File = src.IndirectFile; - out[n].src.SwizzleX = src.IndirectSwizzle; - out[n].src.SwizzleY = src.IndirectSwizzle; - out[n].src.SwizzleZ = src.IndirectSwizzle; - out[n].src.SwizzleW = src.IndirectSwizzle; - out[n].src.Index = src.IndirectIndex; - n++; - } - - if (src.Dimension) { - if (src.DimIndirect) { - out[0].src.Dimension = 1; - out[n].dim.Indirect = 1; - out[n].dim.Dimension = 0; - out[n].dim.Padding = 0; - out[n].dim.Index = src.DimensionIndex; - n++; - out[n].value = 0; - out[n].src.File = src.DimIndFile; - out[n].src.SwizzleX = src.DimIndSwizzle; - out[n].src.SwizzleY = src.DimIndSwizzle; - out[n].src.SwizzleZ = src.DimIndSwizzle; - out[n].src.SwizzleW = src.DimIndSwizzle; - out[n].src.Index = src.DimIndIndex; - } else { - out[0].src.Dimension = 1; - out[n].dim.Indirect = 0; - out[n].dim.Dimension = 0; - out[n].dim.Padding = 0; - out[n].dim.Index = src.DimensionIndex; - } - n++; - } - - assert(n == size); -} - - -void -ureg_emit_dst( struct ureg_program *ureg, - struct ureg_dst dst ) -{ - unsigned size = (1 + - (dst.Indirect ? 1 : 0)); - - union tgsi_any_token *out = get_tokens( ureg, DOMAIN_INSN, size ); - unsigned n = 0; - - assert(dst.File != TGSI_FILE_NULL); - assert(dst.File != TGSI_FILE_CONSTANT); - assert(dst.File != TGSI_FILE_INPUT); - assert(dst.File != TGSI_FILE_SAMPLER); - assert(dst.File != TGSI_FILE_RESOURCE); - assert(dst.File != TGSI_FILE_IMMEDIATE); - assert(dst.File < TGSI_FILE_COUNT); - - out[n].value = 0; - out[n].dst.File = dst.File; - out[n].dst.WriteMask = dst.WriteMask; - out[n].dst.Indirect = dst.Indirect; - out[n].dst.Index = dst.Index; - n++; - - if (dst.Indirect) { - out[n].value = 0; - out[n].src.File = TGSI_FILE_ADDRESS; - out[n].src.SwizzleX = dst.IndirectSwizzle; - out[n].src.SwizzleY = dst.IndirectSwizzle; - out[n].src.SwizzleZ = dst.IndirectSwizzle; - out[n].src.SwizzleW = dst.IndirectSwizzle; - out[n].src.Index = dst.IndirectIndex; - n++; - } - - assert(n == size); -} - - -static void validate( unsigned opcode, - unsigned nr_dst, - unsigned nr_src ) -{ -#ifdef DEBUG - const struct tgsi_opcode_info *info = tgsi_get_opcode_info( opcode ); - assert(info); - if(info) { - assert(nr_dst == info->num_dst); - assert(nr_src == info->num_src); - } -#endif -} - -struct ureg_emit_insn_result -ureg_emit_insn(struct ureg_program *ureg, - unsigned opcode, - boolean saturate, - boolean predicate, - boolean pred_negate, - unsigned pred_swizzle_x, - unsigned pred_swizzle_y, - unsigned pred_swizzle_z, - unsigned pred_swizzle_w, - unsigned num_dst, - unsigned num_src ) -{ - union tgsi_any_token *out; - uint count = predicate ? 2 : 1; - struct ureg_emit_insn_result result; - - validate( opcode, num_dst, num_src ); - - out = get_tokens( ureg, DOMAIN_INSN, count ); - out[0].insn = tgsi_default_instruction(); - out[0].insn.Opcode = opcode; - out[0].insn.Saturate = saturate; - out[0].insn.NumDstRegs = num_dst; - out[0].insn.NumSrcRegs = num_src; - - result.insn_token = ureg->domain[DOMAIN_INSN].count - count; - result.extended_token = result.insn_token; - - if (predicate) { - out[0].insn.Predicate = 1; - out[1].insn_predicate = tgsi_default_instruction_predicate(); - out[1].insn_predicate.Negate = pred_negate; - out[1].insn_predicate.SwizzleX = pred_swizzle_x; - out[1].insn_predicate.SwizzleY = pred_swizzle_y; - out[1].insn_predicate.SwizzleZ = pred_swizzle_z; - out[1].insn_predicate.SwizzleW = pred_swizzle_w; - } - - ureg->nr_instructions++; - - return result; -} - - -void -ureg_emit_label(struct ureg_program *ureg, - unsigned extended_token, - unsigned *label_token ) -{ - union tgsi_any_token *out, *insn; - - if(!label_token) - return; - - out = get_tokens( ureg, DOMAIN_INSN, 1 ); - out[0].value = 0; - - insn = retrieve_token( ureg, DOMAIN_INSN, extended_token ); - insn->insn.Label = 1; - - *label_token = ureg->domain[DOMAIN_INSN].count - 1; -} - -/* Will return a number which can be used in a label to point to the - * next instruction to be emitted. - */ -unsigned -ureg_get_instruction_number( struct ureg_program *ureg ) -{ - return ureg->nr_instructions; -} - -/* Patch a given label (expressed as a token number) to point to a - * given instruction (expressed as an instruction number). - */ -void -ureg_fixup_label(struct ureg_program *ureg, - unsigned label_token, - unsigned instruction_number ) -{ - union tgsi_any_token *out = retrieve_token( ureg, DOMAIN_INSN, label_token ); - - out->insn_label.Label = instruction_number; -} - - -void -ureg_emit_texture(struct ureg_program *ureg, - unsigned extended_token, - unsigned target, unsigned num_offsets) -{ - union tgsi_any_token *out, *insn; - - out = get_tokens( ureg, DOMAIN_INSN, 1 ); - insn = retrieve_token( ureg, DOMAIN_INSN, extended_token ); - - insn->insn.Texture = 1; - - out[0].value = 0; - out[0].insn_texture.Texture = target; - out[0].insn_texture.NumOffsets = num_offsets; -} - -void -ureg_emit_texture_offset(struct ureg_program *ureg, - const struct tgsi_texture_offset *offset) -{ - union tgsi_any_token *out; - - out = get_tokens( ureg, DOMAIN_INSN, 1); - - out[0].value = 0; - out[0].insn_texture_offset = *offset; - -} - - -void -ureg_fixup_insn_size(struct ureg_program *ureg, - unsigned insn ) -{ - union tgsi_any_token *out = retrieve_token( ureg, DOMAIN_INSN, insn ); - - assert(out->insn.Type == TGSI_TOKEN_TYPE_INSTRUCTION); - out->insn.NrTokens = ureg->domain[DOMAIN_INSN].count - insn - 1; -} - - -void -ureg_insn(struct ureg_program *ureg, - unsigned opcode, - const struct ureg_dst *dst, - unsigned nr_dst, - const struct ureg_src *src, - unsigned nr_src ) -{ - struct ureg_emit_insn_result insn; - unsigned i; - boolean saturate; - boolean predicate; - boolean negate = FALSE; - unsigned swizzle[4] = { 0 }; - - saturate = nr_dst ? dst[0].Saturate : FALSE; - predicate = nr_dst ? dst[0].Predicate : FALSE; - if (predicate) { - negate = dst[0].PredNegate; - swizzle[0] = dst[0].PredSwizzleX; - swizzle[1] = dst[0].PredSwizzleY; - swizzle[2] = dst[0].PredSwizzleZ; - swizzle[3] = dst[0].PredSwizzleW; - } - - insn = ureg_emit_insn(ureg, - opcode, - saturate, - predicate, - negate, - swizzle[0], - swizzle[1], - swizzle[2], - swizzle[3], - nr_dst, - nr_src); - - for (i = 0; i < nr_dst; i++) - ureg_emit_dst( ureg, dst[i] ); - - for (i = 0; i < nr_src; i++) - ureg_emit_src( ureg, src[i] ); - - ureg_fixup_insn_size( ureg, insn.insn_token ); -} - -void -ureg_tex_insn(struct ureg_program *ureg, - unsigned opcode, - const struct ureg_dst *dst, - unsigned nr_dst, - unsigned target, - const struct tgsi_texture_offset *texoffsets, - unsigned nr_offset, - const struct ureg_src *src, - unsigned nr_src ) -{ - struct ureg_emit_insn_result insn; - unsigned i; - boolean saturate; - boolean predicate; - boolean negate = FALSE; - unsigned swizzle[4] = { 0 }; - - saturate = nr_dst ? dst[0].Saturate : FALSE; - predicate = nr_dst ? dst[0].Predicate : FALSE; - if (predicate) { - negate = dst[0].PredNegate; - swizzle[0] = dst[0].PredSwizzleX; - swizzle[1] = dst[0].PredSwizzleY; - swizzle[2] = dst[0].PredSwizzleZ; - swizzle[3] = dst[0].PredSwizzleW; - } - - insn = ureg_emit_insn(ureg, - opcode, - saturate, - predicate, - negate, - swizzle[0], - swizzle[1], - swizzle[2], - swizzle[3], - nr_dst, - nr_src); - - ureg_emit_texture( ureg, insn.extended_token, target, nr_offset ); - - for (i = 0; i < nr_offset; i++) - ureg_emit_texture_offset( ureg, &texoffsets[i]); - - for (i = 0; i < nr_dst; i++) - ureg_emit_dst( ureg, dst[i] ); - - for (i = 0; i < nr_src; i++) - ureg_emit_src( ureg, src[i] ); - - ureg_fixup_insn_size( ureg, insn.insn_token ); -} - - -void -ureg_label_insn(struct ureg_program *ureg, - unsigned opcode, - const struct ureg_src *src, - unsigned nr_src, - unsigned *label_token ) -{ - struct ureg_emit_insn_result insn; - unsigned i; - - insn = ureg_emit_insn(ureg, - opcode, - FALSE, - FALSE, - FALSE, - TGSI_SWIZZLE_X, - TGSI_SWIZZLE_Y, - TGSI_SWIZZLE_Z, - TGSI_SWIZZLE_W, - 0, - nr_src); - - ureg_emit_label( ureg, insn.extended_token, label_token ); - - for (i = 0; i < nr_src; i++) - ureg_emit_src( ureg, src[i] ); - - ureg_fixup_insn_size( ureg, insn.insn_token ); -} - - -static void -emit_decl_semantic(struct ureg_program *ureg, - unsigned file, - unsigned index, - unsigned semantic_name, - unsigned semantic_index, - unsigned usage_mask) -{ - union tgsi_any_token *out = get_tokens(ureg, DOMAIN_DECL, 3); - - out[0].value = 0; - out[0].decl.Type = TGSI_TOKEN_TYPE_DECLARATION; - out[0].decl.NrTokens = 3; - out[0].decl.File = file; - out[0].decl.UsageMask = usage_mask; - out[0].decl.Semantic = 1; - - out[1].value = 0; - out[1].decl_range.First = index; - out[1].decl_range.Last = index; - - out[2].value = 0; - out[2].decl_semantic.Name = semantic_name; - out[2].decl_semantic.Index = semantic_index; -} - - -static void -emit_decl_fs(struct ureg_program *ureg, - unsigned file, - unsigned index, - unsigned semantic_name, - unsigned semantic_index, - unsigned interpolate, - unsigned cylindrical_wrap, - unsigned centroid) -{ - union tgsi_any_token *out = get_tokens(ureg, DOMAIN_DECL, 3); - - out[0].value = 0; - out[0].decl.Type = TGSI_TOKEN_TYPE_DECLARATION; - out[0].decl.NrTokens = 3; - out[0].decl.File = file; - out[0].decl.UsageMask = TGSI_WRITEMASK_XYZW; /* FIXME! */ - out[0].decl.Interpolate = interpolate; - out[0].decl.Semantic = 1; - out[0].decl.CylindricalWrap = cylindrical_wrap; - out[0].decl.Centroid = centroid; - - out[1].value = 0; - out[1].decl_range.First = index; - out[1].decl_range.Last = index; - - out[2].value = 0; - out[2].decl_semantic.Name = semantic_name; - out[2].decl_semantic.Index = semantic_index; -} - - -static void emit_decl_range( struct ureg_program *ureg, - unsigned file, - unsigned first, - unsigned count ) -{ - union tgsi_any_token *out = get_tokens( ureg, DOMAIN_DECL, 2 ); - - out[0].value = 0; - out[0].decl.Type = TGSI_TOKEN_TYPE_DECLARATION; - out[0].decl.NrTokens = 2; - out[0].decl.File = file; - out[0].decl.UsageMask = TGSI_WRITEMASK_XYZW; - out[0].decl.Interpolate = TGSI_INTERPOLATE_CONSTANT; - out[0].decl.Semantic = 0; - - out[1].value = 0; - out[1].decl_range.First = first; - out[1].decl_range.Last = first + count - 1; -} - -static void -emit_decl_range2D(struct ureg_program *ureg, - unsigned file, - unsigned first, - unsigned last, - unsigned index2D) -{ - union tgsi_any_token *out = get_tokens(ureg, DOMAIN_DECL, 3); - - out[0].value = 0; - out[0].decl.Type = TGSI_TOKEN_TYPE_DECLARATION; - out[0].decl.NrTokens = 3; - out[0].decl.File = file; - out[0].decl.UsageMask = TGSI_WRITEMASK_XYZW; - out[0].decl.Interpolate = TGSI_INTERPOLATE_CONSTANT; - out[0].decl.Dimension = 1; - - out[1].value = 0; - out[1].decl_range.First = first; - out[1].decl_range.Last = last; - - out[2].value = 0; - out[2].decl_dim.Index2D = index2D; -} - -static void -emit_decl_resource(struct ureg_program *ureg, - unsigned index, - unsigned target, - unsigned return_type_x, - unsigned return_type_y, - unsigned return_type_z, - unsigned return_type_w ) -{ - union tgsi_any_token *out = get_tokens(ureg, DOMAIN_DECL, 3); - - out[0].value = 0; - out[0].decl.Type = TGSI_TOKEN_TYPE_DECLARATION; - out[0].decl.NrTokens = 3; - out[0].decl.File = TGSI_FILE_RESOURCE; - out[0].decl.UsageMask = 0xf; - out[0].decl.Interpolate = TGSI_INTERPOLATE_CONSTANT; - - out[1].value = 0; - out[1].decl_range.First = index; - out[1].decl_range.Last = index; - - out[2].value = 0; - out[2].decl_resource.Resource = target; - out[2].decl_resource.ReturnTypeX = return_type_x; - out[2].decl_resource.ReturnTypeY = return_type_y; - out[2].decl_resource.ReturnTypeZ = return_type_z; - out[2].decl_resource.ReturnTypeW = return_type_w; -} - -static void -emit_immediate( struct ureg_program *ureg, - const unsigned *v, - unsigned type ) -{ - union tgsi_any_token *out = get_tokens( ureg, DOMAIN_DECL, 5 ); - - out[0].value = 0; - out[0].imm.Type = TGSI_TOKEN_TYPE_IMMEDIATE; - out[0].imm.NrTokens = 5; - out[0].imm.DataType = type; - out[0].imm.Padding = 0; - - out[1].imm_data.Uint = v[0]; - out[2].imm_data.Uint = v[1]; - out[3].imm_data.Uint = v[2]; - out[4].imm_data.Uint = v[3]; -} - -static void -emit_property(struct ureg_program *ureg, - unsigned name, - unsigned data) -{ - union tgsi_any_token *out = get_tokens(ureg, DOMAIN_DECL, 2); - - out[0].value = 0; - out[0].prop.Type = TGSI_TOKEN_TYPE_PROPERTY; - out[0].prop.NrTokens = 2; - out[0].prop.PropertyName = name; - - out[1].prop_data.Data = data; -} - - -static void emit_decls( struct ureg_program *ureg ) -{ - unsigned i; - - if (ureg->property_gs_input_prim != ~0) { - assert(ureg->processor == TGSI_PROCESSOR_GEOMETRY); - - emit_property(ureg, - TGSI_PROPERTY_GS_INPUT_PRIM, - ureg->property_gs_input_prim); - } - - if (ureg->property_gs_output_prim != ~0) { - assert(ureg->processor == TGSI_PROCESSOR_GEOMETRY); - - emit_property(ureg, - TGSI_PROPERTY_GS_OUTPUT_PRIM, - ureg->property_gs_output_prim); - } - - if (ureg->property_gs_max_vertices != ~0) { - assert(ureg->processor == TGSI_PROCESSOR_GEOMETRY); - - emit_property(ureg, - TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES, - ureg->property_gs_max_vertices); - } - - if (ureg->property_fs_coord_origin) { - assert(ureg->processor == TGSI_PROCESSOR_FRAGMENT); - - emit_property(ureg, - TGSI_PROPERTY_FS_COORD_ORIGIN, - ureg->property_fs_coord_origin); - } - - if (ureg->property_fs_coord_pixel_center) { - assert(ureg->processor == TGSI_PROCESSOR_FRAGMENT); - - emit_property(ureg, - TGSI_PROPERTY_FS_COORD_PIXEL_CENTER, - ureg->property_fs_coord_pixel_center); - } - - if (ureg->property_fs_color0_writes_all_cbufs) { - assert(ureg->processor == TGSI_PROCESSOR_FRAGMENT); - - emit_property(ureg, - TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS, - ureg->property_fs_color0_writes_all_cbufs); - } - - if (ureg->property_fs_depth_layout) { - assert(ureg->processor == TGSI_PROCESSOR_FRAGMENT); - - emit_property(ureg, - TGSI_PROPERTY_FS_DEPTH_LAYOUT, - ureg->property_fs_depth_layout); - } - - if (ureg->processor == TGSI_PROCESSOR_VERTEX) { - for (i = 0; i < UREG_MAX_INPUT; i++) { - if (ureg->vs_inputs[i/32] & (1 << (i%32))) { - emit_decl_range( ureg, TGSI_FILE_INPUT, i, 1 ); - } - } - } else if (ureg->processor == TGSI_PROCESSOR_FRAGMENT) { - for (i = 0; i < ureg->nr_fs_inputs; i++) { - emit_decl_fs(ureg, - TGSI_FILE_INPUT, - i, - ureg->fs_input[i].semantic_name, - ureg->fs_input[i].semantic_index, - ureg->fs_input[i].interp, - ureg->fs_input[i].cylindrical_wrap, - ureg->fs_input[i].centroid); - } - } else { - for (i = 0; i < ureg->nr_gs_inputs; i++) { - emit_decl_semantic(ureg, - TGSI_FILE_INPUT, - ureg->gs_input[i].index, - ureg->gs_input[i].semantic_name, - ureg->gs_input[i].semantic_index, - TGSI_WRITEMASK_XYZW); - } - } - - for (i = 0; i < ureg->nr_system_values; i++) { - emit_decl_semantic(ureg, - TGSI_FILE_SYSTEM_VALUE, - ureg->system_value[i].index, - ureg->system_value[i].semantic_name, - ureg->system_value[i].semantic_index, - TGSI_WRITEMASK_XYZW); - } - - for (i = 0; i < ureg->nr_outputs; i++) { - emit_decl_semantic(ureg, - TGSI_FILE_OUTPUT, - i, - ureg->output[i].semantic_name, - ureg->output[i].semantic_index, - ureg->output[i].usage_mask); - } - - for (i = 0; i < ureg->nr_samplers; i++) { - emit_decl_range( ureg, - TGSI_FILE_SAMPLER, - ureg->sampler[i].Index, 1 ); - } - - for (i = 0; i < ureg->nr_resources; i++) { - emit_decl_resource(ureg, - ureg->resource[i].index, - ureg->resource[i].target, - ureg->resource[i].return_type_x, - ureg->resource[i].return_type_y, - ureg->resource[i].return_type_z, - ureg->resource[i].return_type_w); - } - - if (ureg->const_decls.nr_constant_ranges) { - for (i = 0; i < ureg->const_decls.nr_constant_ranges; i++) { - emit_decl_range(ureg, - TGSI_FILE_CONSTANT, - ureg->const_decls.constant_range[i].first, - ureg->const_decls.constant_range[i].last - ureg->const_decls.constant_range[i].first + 1); - } - } - - for (i = 0; i < PIPE_MAX_CONSTANT_BUFFERS; i++) { - struct const_decl *decl = &ureg->const_decls2D[i]; - - if (decl->nr_constant_ranges) { - uint j; - - for (j = 0; j < decl->nr_constant_ranges; j++) { - emit_decl_range2D(ureg, - TGSI_FILE_CONSTANT, - decl->constant_range[j].first, - decl->constant_range[j].last, - i); - } - } - } - - if (ureg->nr_temps) { - emit_decl_range( ureg, - TGSI_FILE_TEMPORARY, - 0, ureg->nr_temps ); - } - - if (ureg->nr_addrs) { - emit_decl_range( ureg, - TGSI_FILE_ADDRESS, - 0, ureg->nr_addrs ); - } - - if (ureg->nr_preds) { - emit_decl_range(ureg, - TGSI_FILE_PREDICATE, - 0, - ureg->nr_preds); - } - - for (i = 0; i < ureg->nr_immediates; i++) { - emit_immediate( ureg, - ureg->immediate[i].value.u, - ureg->immediate[i].type ); - } -} - -/* Append the instruction tokens onto the declarations to build a - * contiguous stream suitable to send to the driver. - */ -static void copy_instructions( struct ureg_program *ureg ) -{ - unsigned nr_tokens = ureg->domain[DOMAIN_INSN].count; - union tgsi_any_token *out = get_tokens( ureg, - DOMAIN_DECL, - nr_tokens ); - - memcpy(out, - ureg->domain[DOMAIN_INSN].tokens, - nr_tokens * sizeof out[0] ); -} - - -static void -fixup_header_size(struct ureg_program *ureg) -{ - union tgsi_any_token *out = retrieve_token( ureg, DOMAIN_DECL, 0 ); - - out->header.BodySize = ureg->domain[DOMAIN_DECL].count - 2; -} - - -static void -emit_header( struct ureg_program *ureg ) -{ - union tgsi_any_token *out = get_tokens( ureg, DOMAIN_DECL, 2 ); - - out[0].header.HeaderSize = 2; - out[0].header.BodySize = 0; - - out[1].processor.Processor = ureg->processor; - out[1].processor.Padding = 0; -} - - -const struct tgsi_token *ureg_finalize( struct ureg_program *ureg ) -{ - const struct tgsi_token *tokens; - - emit_header( ureg ); - emit_decls( ureg ); - copy_instructions( ureg ); - fixup_header_size( ureg ); - - if (ureg->domain[0].tokens == error_tokens || - ureg->domain[1].tokens == error_tokens) { - debug_printf("%s: error in generated shader\n", __FUNCTION__); - assert(0); - return NULL; - } - - tokens = &ureg->domain[DOMAIN_DECL].tokens[0].token; - - if (0) { - debug_printf("%s: emitted shader %d tokens:\n", __FUNCTION__, - ureg->domain[DOMAIN_DECL].count); - tgsi_dump( tokens, 0 ); - } - -#if DEBUG - if (tokens && !tgsi_sanity_check(tokens)) { - debug_printf("tgsi_ureg.c, sanity check failed on generated tokens:\n"); - tgsi_dump(tokens, 0); - assert(0); - } -#endif - - - return tokens; -} - - -void *ureg_create_shader( struct ureg_program *ureg, - struct pipe_context *pipe, - const struct pipe_stream_output_info *so ) -{ - struct pipe_shader_state state; - - state.tokens = ureg_finalize(ureg); - if(!state.tokens) - return NULL; - - if (so) - state.stream_output = *so; - else - memset(&state.stream_output, 0, sizeof(state.stream_output)); - - if (ureg->processor == TGSI_PROCESSOR_VERTEX) - return pipe->create_vs_state( pipe, &state ); - else - return pipe->create_fs_state( pipe, &state ); -} - - -const struct tgsi_token *ureg_get_tokens( struct ureg_program *ureg, - unsigned *nr_tokens ) -{ - const struct tgsi_token *tokens; - - ureg_finalize(ureg); - - tokens = &ureg->domain[DOMAIN_DECL].tokens[0].token; - - if (nr_tokens) - *nr_tokens = ureg->domain[DOMAIN_DECL].size; - - ureg->domain[DOMAIN_DECL].tokens = 0; - ureg->domain[DOMAIN_DECL].size = 0; - ureg->domain[DOMAIN_DECL].order = 0; - ureg->domain[DOMAIN_DECL].count = 0; - - return tokens; -} - - -void ureg_free_tokens( const struct tgsi_token *tokens ) -{ - FREE((struct tgsi_token *)tokens); -} - - -struct ureg_program *ureg_create( unsigned processor ) -{ - struct ureg_program *ureg = CALLOC_STRUCT( ureg_program ); - if (ureg == NULL) - return NULL; - - ureg->processor = processor; - ureg->property_gs_input_prim = ~0; - ureg->property_gs_output_prim = ~0; - ureg->property_gs_max_vertices = ~0; - return ureg; -} - - -void ureg_destroy( struct ureg_program *ureg ) -{ - unsigned i; - - for (i = 0; i < Elements(ureg->domain); i++) { - if (ureg->domain[i].tokens && - ureg->domain[i].tokens != error_tokens) - FREE(ureg->domain[i].tokens); - } - - FREE(ureg); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_ureg.h deleted file mode 100644 index 07ab8cba0ba..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_ureg.h +++ /dev/null @@ -1,1116 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE, INC AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef TGSI_UREG_H -#define TGSI_UREG_H - -#include "pipe/p_compiler.h" -#include "pipe/p_shader_tokens.h" -#include "util/u_debug.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct ureg_program; -struct pipe_stream_output_info; - -/* Almost a tgsi_src_register, but we need to pull in the Absolute - * flag from the _ext token. Indirect flag always implies ADDR[0]. - */ -struct ureg_src -{ - unsigned File : 4; /* TGSI_FILE_ */ - unsigned SwizzleX : 2; /* TGSI_SWIZZLE_ */ - unsigned SwizzleY : 2; /* TGSI_SWIZZLE_ */ - unsigned SwizzleZ : 2; /* TGSI_SWIZZLE_ */ - unsigned SwizzleW : 2; /* TGSI_SWIZZLE_ */ - unsigned Indirect : 1; /* BOOL */ - unsigned DimIndirect : 1; /* BOOL */ - unsigned Dimension : 1; /* BOOL */ - unsigned Absolute : 1; /* BOOL */ - unsigned Negate : 1; /* BOOL */ - unsigned IndirectFile : 4; /* TGSI_FILE_ */ - unsigned IndirectSwizzle : 2; /* TGSI_SWIZZLE_ */ - unsigned DimIndFile : 4; /* TGSI_FILE_ */ - unsigned DimIndSwizzle : 2; /* TGSI_SWIZZLE_ */ - int Index : 16; /* SINT */ - int IndirectIndex : 16; /* SINT */ - int DimensionIndex : 16; /* SINT */ - int DimIndIndex : 16; /* SINT */ -}; - -/* Very similar to a tgsi_dst_register, removing unsupported fields - * and adding a Saturate flag. It's easier to push saturate into the - * destination register than to try and create a _SAT variant of each - * instruction function. - */ -struct ureg_dst -{ - unsigned File : 4; /* TGSI_FILE_ */ - unsigned WriteMask : 4; /* TGSI_WRITEMASK_ */ - unsigned Indirect : 1; /* BOOL */ - unsigned Saturate : 1; /* BOOL */ - unsigned Predicate : 1; - unsigned PredNegate : 1; /* BOOL */ - unsigned PredSwizzleX: 2; /* TGSI_SWIZZLE_ */ - unsigned PredSwizzleY: 2; /* TGSI_SWIZZLE_ */ - unsigned PredSwizzleZ: 2; /* TGSI_SWIZZLE_ */ - unsigned PredSwizzleW: 2; /* TGSI_SWIZZLE_ */ - int Index : 16; /* SINT */ - int IndirectIndex : 16; /* SINT */ - int IndirectSwizzle : 2; /* TGSI_SWIZZLE_ */ -}; - -struct pipe_context; - -struct ureg_program * -ureg_create( unsigned processor ); - -const struct tgsi_token * -ureg_finalize( struct ureg_program * ); - -/* Create and return a shader: - */ -void * -ureg_create_shader( struct ureg_program *, - struct pipe_context *pipe, - const struct pipe_stream_output_info *so ); - - -/* Alternately, return the built token stream and hand ownership of - * that memory to the caller: - */ -const struct tgsi_token * -ureg_get_tokens( struct ureg_program *ureg, - unsigned *nr_tokens ); - - -/* Free the tokens created by ureg_get_tokens() */ -void ureg_free_tokens( const struct tgsi_token *tokens ); - - -void -ureg_destroy( struct ureg_program * ); - - -/*********************************************************************** - * Convenience routine: - */ -static INLINE void * -ureg_create_shader_with_so_and_destroy( struct ureg_program *p, - struct pipe_context *pipe, - const struct pipe_stream_output_info *so ) -{ - void *result = ureg_create_shader( p, pipe, so ); - ureg_destroy( p ); - return result; -} - -static INLINE void * -ureg_create_shader_and_destroy( struct ureg_program *p, - struct pipe_context *pipe ) -{ - return ureg_create_shader_with_so_and_destroy(p, pipe, NULL); -} - - -/*********************************************************************** - * Build shader properties: - */ - -void -ureg_property_gs_input_prim(struct ureg_program *ureg, - unsigned input_prim); - -void -ureg_property_gs_output_prim(struct ureg_program *ureg, - unsigned output_prim); - -void -ureg_property_gs_max_vertices(struct ureg_program *ureg, - unsigned max_vertices); - -void -ureg_property_fs_coord_origin(struct ureg_program *ureg, - unsigned fs_coord_origin); - -void -ureg_property_fs_coord_pixel_center(struct ureg_program *ureg, - unsigned fs_coord_pixel_center); - -void -ureg_property_fs_color0_writes_all_cbufs(struct ureg_program *ureg, - unsigned fs_color0_writes_all_cbufs); - -void -ureg_property_fs_depth_layout(struct ureg_program *ureg, - unsigned fs_depth_layout); - - -/*********************************************************************** - * Build shader declarations: - */ - -struct ureg_src -ureg_DECL_fs_input_cyl_centroid(struct ureg_program *, - unsigned semantic_name, - unsigned semantic_index, - unsigned interp_mode, - unsigned cylindrical_wrap, - unsigned centroid); - -static INLINE struct ureg_src -ureg_DECL_fs_input_cyl(struct ureg_program *ureg, - unsigned semantic_name, - unsigned semantic_index, - unsigned interp_mode, - unsigned cylindrical_wrap) -{ - return ureg_DECL_fs_input_cyl_centroid(ureg, - semantic_name, - semantic_index, - interp_mode, - cylindrical_wrap, - 0); -} - -static INLINE struct ureg_src -ureg_DECL_fs_input(struct ureg_program *ureg, - unsigned semantic_name, - unsigned semantic_index, - unsigned interp_mode) -{ - return ureg_DECL_fs_input_cyl_centroid(ureg, - semantic_name, - semantic_index, - interp_mode, - 0, 0); -} - -struct ureg_src -ureg_DECL_vs_input( struct ureg_program *, - unsigned index ); - -struct ureg_src -ureg_DECL_gs_input(struct ureg_program *, - unsigned index, - unsigned semantic_name, - unsigned semantic_index); - -struct ureg_src -ureg_DECL_system_value(struct ureg_program *, - unsigned index, - unsigned semantic_name, - unsigned semantic_index); - -struct ureg_dst -ureg_DECL_output_masked( struct ureg_program *, - unsigned semantic_name, - unsigned semantic_index, - unsigned usage_mask ); - -struct ureg_dst -ureg_DECL_output( struct ureg_program *, - unsigned semantic_name, - unsigned semantic_index ); - -struct ureg_src -ureg_DECL_immediate( struct ureg_program *, - const float *v, - unsigned nr ); - -struct ureg_src -ureg_DECL_immediate_uint( struct ureg_program *, - const unsigned *v, - unsigned nr ); - -struct ureg_src -ureg_DECL_immediate_block_uint( struct ureg_program *, - const unsigned *v, - unsigned nr ); - -struct ureg_src -ureg_DECL_immediate_int( struct ureg_program *, - const int *v, - unsigned nr ); - -void -ureg_DECL_constant2D(struct ureg_program *ureg, - unsigned first, - unsigned last, - unsigned index2D); - -struct ureg_src -ureg_DECL_constant( struct ureg_program *, - unsigned index ); - -struct ureg_dst -ureg_DECL_temporary( struct ureg_program * ); - -void -ureg_release_temporary( struct ureg_program *ureg, - struct ureg_dst tmp ); - -struct ureg_dst -ureg_DECL_address( struct ureg_program * ); - -struct ureg_dst -ureg_DECL_predicate(struct ureg_program *); - -/* Supply an index to the sampler declaration as this is the hook to - * the external pipe_sampler state. Users of this function probably - * don't want just any sampler, but a specific one which they've set - * up state for in the context. - */ -struct ureg_src -ureg_DECL_sampler( struct ureg_program *, - unsigned index ); - -struct ureg_src -ureg_DECL_resource(struct ureg_program *, - unsigned index, - unsigned target, - unsigned return_type_x, - unsigned return_type_y, - unsigned return_type_z, - unsigned return_type_w ); - - -static INLINE struct ureg_src -ureg_imm4f( struct ureg_program *ureg, - float a, float b, - float c, float d) -{ - float v[4]; - v[0] = a; - v[1] = b; - v[2] = c; - v[3] = d; - return ureg_DECL_immediate( ureg, v, 4 ); -} - -static INLINE struct ureg_src -ureg_imm3f( struct ureg_program *ureg, - float a, float b, - float c) -{ - float v[3]; - v[0] = a; - v[1] = b; - v[2] = c; - return ureg_DECL_immediate( ureg, v, 3 ); -} - -static INLINE struct ureg_src -ureg_imm2f( struct ureg_program *ureg, - float a, float b) -{ - float v[2]; - v[0] = a; - v[1] = b; - return ureg_DECL_immediate( ureg, v, 2 ); -} - -static INLINE struct ureg_src -ureg_imm1f( struct ureg_program *ureg, - float a) -{ - float v[1]; - v[0] = a; - return ureg_DECL_immediate( ureg, v, 1 ); -} - -static INLINE struct ureg_src -ureg_imm4u( struct ureg_program *ureg, - unsigned a, unsigned b, - unsigned c, unsigned d) -{ - unsigned v[4]; - v[0] = a; - v[1] = b; - v[2] = c; - v[3] = d; - return ureg_DECL_immediate_uint( ureg, v, 4 ); -} - -static INLINE struct ureg_src -ureg_imm3u( struct ureg_program *ureg, - unsigned a, unsigned b, - unsigned c) -{ - unsigned v[3]; - v[0] = a; - v[1] = b; - v[2] = c; - return ureg_DECL_immediate_uint( ureg, v, 3 ); -} - -static INLINE struct ureg_src -ureg_imm2u( struct ureg_program *ureg, - unsigned a, unsigned b) -{ - unsigned v[2]; - v[0] = a; - v[1] = b; - return ureg_DECL_immediate_uint( ureg, v, 2 ); -} - -static INLINE struct ureg_src -ureg_imm1u( struct ureg_program *ureg, - unsigned a) -{ - return ureg_DECL_immediate_uint( ureg, &a, 1 ); -} - -static INLINE struct ureg_src -ureg_imm4i( struct ureg_program *ureg, - int a, int b, - int c, int d) -{ - int v[4]; - v[0] = a; - v[1] = b; - v[2] = c; - v[3] = d; - return ureg_DECL_immediate_int( ureg, v, 4 ); -} - -static INLINE struct ureg_src -ureg_imm3i( struct ureg_program *ureg, - int a, int b, - int c) -{ - int v[3]; - v[0] = a; - v[1] = b; - v[2] = c; - return ureg_DECL_immediate_int( ureg, v, 3 ); -} - -static INLINE struct ureg_src -ureg_imm2i( struct ureg_program *ureg, - int a, int b) -{ - int v[2]; - v[0] = a; - v[1] = b; - return ureg_DECL_immediate_int( ureg, v, 2 ); -} - -static INLINE struct ureg_src -ureg_imm1i( struct ureg_program *ureg, - int a) -{ - return ureg_DECL_immediate_int( ureg, &a, 1 ); -} - -/*********************************************************************** - * Functions for patching up labels - */ - - -/* Will return a number which can be used in a label to point to the - * next instruction to be emitted. - */ -unsigned -ureg_get_instruction_number( struct ureg_program *ureg ); - - -/* Patch a given label (expressed as a token number) to point to a - * given instruction (expressed as an instruction number). - * - * Labels are obtained from instruction emitters, eg ureg_CAL(). - * Instruction numbers are obtained from ureg_get_instruction_number(), - * above. - */ -void -ureg_fixup_label(struct ureg_program *ureg, - unsigned label_token, - unsigned instruction_number ); - - -/* Generic instruction emitter. Use if you need to pass the opcode as - * a parameter, rather than using the emit_OP() variants below. - */ -void -ureg_insn(struct ureg_program *ureg, - unsigned opcode, - const struct ureg_dst *dst, - unsigned nr_dst, - const struct ureg_src *src, - unsigned nr_src ); - - -void -ureg_tex_insn(struct ureg_program *ureg, - unsigned opcode, - const struct ureg_dst *dst, - unsigned nr_dst, - unsigned target, - const struct tgsi_texture_offset *texoffsets, - unsigned nr_offset, - const struct ureg_src *src, - unsigned nr_src ); - - -void -ureg_label_insn(struct ureg_program *ureg, - unsigned opcode, - const struct ureg_src *src, - unsigned nr_src, - unsigned *label); - - -/*********************************************************************** - * Internal instruction helpers, don't call these directly: - */ - -struct ureg_emit_insn_result { - unsigned insn_token; /*< Used to fixup insn size. */ - unsigned extended_token; /*< Used to set the Extended bit, usually the same as insn_token. */ -}; - -struct ureg_emit_insn_result -ureg_emit_insn(struct ureg_program *ureg, - unsigned opcode, - boolean saturate, - boolean predicate, - boolean pred_negate, - unsigned pred_swizzle_x, - unsigned pred_swizzle_y, - unsigned pred_swizzle_z, - unsigned pred_swizzle_w, - unsigned num_dst, - unsigned num_src ); - -void -ureg_emit_label(struct ureg_program *ureg, - unsigned insn_token, - unsigned *label_token ); - -void -ureg_emit_texture(struct ureg_program *ureg, - unsigned insn_token, - unsigned target, unsigned num_offsets); - -void -ureg_emit_texture_offset(struct ureg_program *ureg, - const struct tgsi_texture_offset *offset); - -void -ureg_emit_dst( struct ureg_program *ureg, - struct ureg_dst dst ); - -void -ureg_emit_src( struct ureg_program *ureg, - struct ureg_src src ); - -void -ureg_fixup_insn_size(struct ureg_program *ureg, - unsigned insn ); - - -#define OP00( op ) \ -static INLINE void ureg_##op( struct ureg_program *ureg ) \ -{ \ - unsigned opcode = TGSI_OPCODE_##op; \ - unsigned insn = ureg_emit_insn(ureg, \ - opcode, \ - FALSE, \ - FALSE, \ - FALSE, \ - TGSI_SWIZZLE_X, \ - TGSI_SWIZZLE_Y, \ - TGSI_SWIZZLE_Z, \ - TGSI_SWIZZLE_W, \ - 0, \ - 0).insn_token; \ - ureg_fixup_insn_size( ureg, insn ); \ -} - -#define OP01( op ) \ -static INLINE void ureg_##op( struct ureg_program *ureg, \ - struct ureg_src src ) \ -{ \ - unsigned opcode = TGSI_OPCODE_##op; \ - unsigned insn = ureg_emit_insn(ureg, \ - opcode, \ - FALSE, \ - FALSE, \ - FALSE, \ - TGSI_SWIZZLE_X, \ - TGSI_SWIZZLE_Y, \ - TGSI_SWIZZLE_Z, \ - TGSI_SWIZZLE_W, \ - 0, \ - 1).insn_token; \ - ureg_emit_src( ureg, src ); \ - ureg_fixup_insn_size( ureg, insn ); \ -} - -#define OP00_LBL( op ) \ -static INLINE void ureg_##op( struct ureg_program *ureg, \ - unsigned *label_token ) \ -{ \ - unsigned opcode = TGSI_OPCODE_##op; \ - struct ureg_emit_insn_result insn; \ - insn = ureg_emit_insn(ureg, \ - opcode, \ - FALSE, \ - FALSE, \ - FALSE, \ - TGSI_SWIZZLE_X, \ - TGSI_SWIZZLE_Y, \ - TGSI_SWIZZLE_Z, \ - TGSI_SWIZZLE_W, \ - 0, \ - 0); \ - ureg_emit_label( ureg, insn.extended_token, label_token ); \ - ureg_fixup_insn_size( ureg, insn.insn_token ); \ -} - -#define OP01_LBL( op ) \ -static INLINE void ureg_##op( struct ureg_program *ureg, \ - struct ureg_src src, \ - unsigned *label_token ) \ -{ \ - unsigned opcode = TGSI_OPCODE_##op; \ - struct ureg_emit_insn_result insn; \ - insn = ureg_emit_insn(ureg, \ - opcode, \ - FALSE, \ - FALSE, \ - FALSE, \ - TGSI_SWIZZLE_X, \ - TGSI_SWIZZLE_Y, \ - TGSI_SWIZZLE_Z, \ - TGSI_SWIZZLE_W, \ - 0, \ - 1); \ - ureg_emit_label( ureg, insn.extended_token, label_token ); \ - ureg_emit_src( ureg, src ); \ - ureg_fixup_insn_size( ureg, insn.insn_token ); \ -} - -#define OP10( op ) \ -static INLINE void ureg_##op( struct ureg_program *ureg, \ - struct ureg_dst dst ) \ -{ \ - unsigned opcode = TGSI_OPCODE_##op; \ - unsigned insn = ureg_emit_insn(ureg, \ - opcode, \ - dst.Saturate, \ - dst.Predicate, \ - dst.PredNegate, \ - dst.PredSwizzleX, \ - dst.PredSwizzleY, \ - dst.PredSwizzleZ, \ - dst.PredSwizzleW, \ - 1, \ - 0).insn_token; \ - ureg_emit_dst( ureg, dst ); \ - ureg_fixup_insn_size( ureg, insn ); \ -} - - -#define OP11( op ) \ -static INLINE void ureg_##op( struct ureg_program *ureg, \ - struct ureg_dst dst, \ - struct ureg_src src ) \ -{ \ - unsigned opcode = TGSI_OPCODE_##op; \ - unsigned insn = ureg_emit_insn(ureg, \ - opcode, \ - dst.Saturate, \ - dst.Predicate, \ - dst.PredNegate, \ - dst.PredSwizzleX, \ - dst.PredSwizzleY, \ - dst.PredSwizzleZ, \ - dst.PredSwizzleW, \ - 1, \ - 1).insn_token; \ - ureg_emit_dst( ureg, dst ); \ - ureg_emit_src( ureg, src ); \ - ureg_fixup_insn_size( ureg, insn ); \ -} - -#define OP12( op ) \ -static INLINE void ureg_##op( struct ureg_program *ureg, \ - struct ureg_dst dst, \ - struct ureg_src src0, \ - struct ureg_src src1 ) \ -{ \ - unsigned opcode = TGSI_OPCODE_##op; \ - unsigned insn = ureg_emit_insn(ureg, \ - opcode, \ - dst.Saturate, \ - dst.Predicate, \ - dst.PredNegate, \ - dst.PredSwizzleX, \ - dst.PredSwizzleY, \ - dst.PredSwizzleZ, \ - dst.PredSwizzleW, \ - 1, \ - 2).insn_token; \ - ureg_emit_dst( ureg, dst ); \ - ureg_emit_src( ureg, src0 ); \ - ureg_emit_src( ureg, src1 ); \ - ureg_fixup_insn_size( ureg, insn ); \ -} - -#define OP12_TEX( op ) \ -static INLINE void ureg_##op( struct ureg_program *ureg, \ - struct ureg_dst dst, \ - unsigned target, \ - struct ureg_src src0, \ - struct ureg_src src1 ) \ -{ \ - unsigned opcode = TGSI_OPCODE_##op; \ - struct ureg_emit_insn_result insn; \ - insn = ureg_emit_insn(ureg, \ - opcode, \ - dst.Saturate, \ - dst.Predicate, \ - dst.PredNegate, \ - dst.PredSwizzleX, \ - dst.PredSwizzleY, \ - dst.PredSwizzleZ, \ - dst.PredSwizzleW, \ - 1, \ - 2); \ - ureg_emit_texture( ureg, insn.extended_token, target, 0 ); \ - ureg_emit_dst( ureg, dst ); \ - ureg_emit_src( ureg, src0 ); \ - ureg_emit_src( ureg, src1 ); \ - ureg_fixup_insn_size( ureg, insn.insn_token ); \ -} - -#define OP13( op ) \ -static INLINE void ureg_##op( struct ureg_program *ureg, \ - struct ureg_dst dst, \ - struct ureg_src src0, \ - struct ureg_src src1, \ - struct ureg_src src2 ) \ -{ \ - unsigned opcode = TGSI_OPCODE_##op; \ - unsigned insn = ureg_emit_insn(ureg, \ - opcode, \ - dst.Saturate, \ - dst.Predicate, \ - dst.PredNegate, \ - dst.PredSwizzleX, \ - dst.PredSwizzleY, \ - dst.PredSwizzleZ, \ - dst.PredSwizzleW, \ - 1, \ - 3).insn_token; \ - ureg_emit_dst( ureg, dst ); \ - ureg_emit_src( ureg, src0 ); \ - ureg_emit_src( ureg, src1 ); \ - ureg_emit_src( ureg, src2 ); \ - ureg_fixup_insn_size( ureg, insn ); \ -} - -#define OP14_TEX( op ) \ -static INLINE void ureg_##op( struct ureg_program *ureg, \ - struct ureg_dst dst, \ - unsigned target, \ - struct ureg_src src0, \ - struct ureg_src src1, \ - struct ureg_src src2, \ - struct ureg_src src3 ) \ -{ \ - unsigned opcode = TGSI_OPCODE_##op; \ - struct ureg_emit_insn_result insn; \ - insn = ureg_emit_insn(ureg, \ - opcode, \ - dst.Saturate, \ - dst.Predicate, \ - dst.PredNegate, \ - dst.PredSwizzleX, \ - dst.PredSwizzleY, \ - dst.PredSwizzleZ, \ - dst.PredSwizzleW, \ - 1, \ - 4); \ - ureg_emit_texture( ureg, insn.extended_token, target, 0 ); \ - ureg_emit_dst( ureg, dst ); \ - ureg_emit_src( ureg, src0 ); \ - ureg_emit_src( ureg, src1 ); \ - ureg_emit_src( ureg, src2 ); \ - ureg_emit_src( ureg, src3 ); \ - ureg_fixup_insn_size( ureg, insn.insn_token ); \ -} - - -#define OP14( op ) \ -static INLINE void ureg_##op( struct ureg_program *ureg, \ - struct ureg_dst dst, \ - struct ureg_src src0, \ - struct ureg_src src1, \ - struct ureg_src src2, \ - struct ureg_src src3 ) \ -{ \ - unsigned opcode = TGSI_OPCODE_##op; \ - unsigned insn = ureg_emit_insn(ureg, \ - opcode, \ - dst.Saturate, \ - dst.Predicate, \ - dst.PredNegate, \ - dst.PredSwizzleX, \ - dst.PredSwizzleY, \ - dst.PredSwizzleZ, \ - dst.PredSwizzleW, \ - 1, \ - 4).insn_token; \ - ureg_emit_dst( ureg, dst ); \ - ureg_emit_src( ureg, src0 ); \ - ureg_emit_src( ureg, src1 ); \ - ureg_emit_src( ureg, src2 ); \ - ureg_emit_src( ureg, src3 ); \ - ureg_fixup_insn_size( ureg, insn ); \ -} - - -#define OP15( op ) \ -static INLINE void ureg_##op( struct ureg_program *ureg, \ - struct ureg_dst dst, \ - struct ureg_src src0, \ - struct ureg_src src1, \ - struct ureg_src src2, \ - struct ureg_src src3, \ - struct ureg_src src4 ) \ -{ \ - unsigned opcode = TGSI_OPCODE_##op; \ - unsigned insn = ureg_emit_insn(ureg, \ - opcode, \ - dst.Saturate, \ - dst.Predicate, \ - dst.PredNegate, \ - dst.PredSwizzleX, \ - dst.PredSwizzleY, \ - dst.PredSwizzleZ, \ - dst.PredSwizzleW, \ - 1, \ - 5).insn_token; \ - ureg_emit_dst( ureg, dst ); \ - ureg_emit_src( ureg, src0 ); \ - ureg_emit_src( ureg, src1 ); \ - ureg_emit_src( ureg, src2 ); \ - ureg_emit_src( ureg, src3 ); \ - ureg_emit_src( ureg, src4 ); \ - ureg_fixup_insn_size( ureg, insn ); \ -} - - -/* Use a template include to generate a correctly-typed ureg_OP() - * function for each TGSI opcode: - */ -#include "tgsi_opcode_tmp.h" - - -/*********************************************************************** - * Inline helpers for manipulating register structs: - */ -static INLINE struct ureg_src -ureg_negate( struct ureg_src reg ) -{ - assert(reg.File != TGSI_FILE_NULL); - reg.Negate ^= 1; - return reg; -} - -static INLINE struct ureg_src -ureg_abs( struct ureg_src reg ) -{ - assert(reg.File != TGSI_FILE_NULL); - reg.Absolute = 1; - reg.Negate = 0; - return reg; -} - -static INLINE struct ureg_src -ureg_swizzle( struct ureg_src reg, - int x, int y, int z, int w ) -{ - unsigned swz = ( (reg.SwizzleX << 0) | - (reg.SwizzleY << 2) | - (reg.SwizzleZ << 4) | - (reg.SwizzleW << 6)); - - assert(reg.File != TGSI_FILE_NULL); - assert(x < 4); - assert(y < 4); - assert(z < 4); - assert(w < 4); - - reg.SwizzleX = (swz >> (x*2)) & 0x3; - reg.SwizzleY = (swz >> (y*2)) & 0x3; - reg.SwizzleZ = (swz >> (z*2)) & 0x3; - reg.SwizzleW = (swz >> (w*2)) & 0x3; - return reg; -} - -static INLINE struct ureg_src -ureg_scalar( struct ureg_src reg, int x ) -{ - return ureg_swizzle(reg, x, x, x, x); -} - -static INLINE struct ureg_dst -ureg_writemask( struct ureg_dst reg, - unsigned writemask ) -{ - assert(reg.File != TGSI_FILE_NULL); - reg.WriteMask &= writemask; - return reg; -} - -static INLINE struct ureg_dst -ureg_saturate( struct ureg_dst reg ) -{ - assert(reg.File != TGSI_FILE_NULL); - reg.Saturate = 1; - return reg; -} - -static INLINE struct ureg_dst -ureg_predicate(struct ureg_dst reg, - boolean negate, - unsigned swizzle_x, - unsigned swizzle_y, - unsigned swizzle_z, - unsigned swizzle_w) -{ - assert(reg.File != TGSI_FILE_NULL); - reg.Predicate = 1; - reg.PredNegate = negate; - reg.PredSwizzleX = swizzle_x; - reg.PredSwizzleY = swizzle_y; - reg.PredSwizzleZ = swizzle_z; - reg.PredSwizzleW = swizzle_w; - return reg; -} - -static INLINE struct ureg_dst -ureg_dst_indirect( struct ureg_dst reg, struct ureg_src addr ) -{ - assert(reg.File != TGSI_FILE_NULL); - assert(addr.File == TGSI_FILE_ADDRESS); - reg.Indirect = 1; - reg.IndirectIndex = addr.Index; - reg.IndirectSwizzle = addr.SwizzleX; - return reg; -} - -static INLINE struct ureg_src -ureg_src_indirect( struct ureg_src reg, struct ureg_src addr ) -{ - assert(reg.File != TGSI_FILE_NULL); - assert(addr.File == TGSI_FILE_ADDRESS || addr.File == TGSI_FILE_TEMPORARY); - reg.Indirect = 1; - reg.IndirectFile = addr.File; - reg.IndirectIndex = addr.Index; - reg.IndirectSwizzle = addr.SwizzleX; - return reg; -} - -static INLINE struct ureg_src -ureg_src_dimension( struct ureg_src reg, int index ) -{ - assert(reg.File != TGSI_FILE_NULL); - reg.Dimension = 1; - reg.DimIndirect = 0; - reg.DimensionIndex = index; - return reg; -} - - -static INLINE struct ureg_src -ureg_src_dimension_indirect( struct ureg_src reg, struct ureg_src addr, - int index ) -{ - assert(reg.File != TGSI_FILE_NULL); - reg.Dimension = 1; - reg.DimIndirect = 1; - reg.DimensionIndex = index; - reg.DimIndFile = addr.File; - reg.DimIndIndex = addr.Index; - reg.DimIndSwizzle = addr.SwizzleX; - return reg; -} - -static INLINE struct ureg_dst -ureg_dst( struct ureg_src src ) -{ - struct ureg_dst dst; - - assert(!src.Indirect || src.IndirectFile == TGSI_FILE_ADDRESS); - - dst.File = src.File; - dst.WriteMask = TGSI_WRITEMASK_XYZW; - dst.Indirect = src.Indirect; - dst.IndirectIndex = src.IndirectIndex; - dst.IndirectSwizzle = src.IndirectSwizzle; - dst.Saturate = 0; - dst.Predicate = 0; - dst.PredNegate = 0; - dst.PredSwizzleX = TGSI_SWIZZLE_X; - dst.PredSwizzleY = TGSI_SWIZZLE_Y; - dst.PredSwizzleZ = TGSI_SWIZZLE_Z; - dst.PredSwizzleW = TGSI_SWIZZLE_W; - dst.Index = src.Index; - - return dst; -} - -static INLINE struct ureg_src -ureg_src_register(unsigned file, - unsigned index) -{ - struct ureg_src src; - - src.File = file; - src.SwizzleX = TGSI_SWIZZLE_X; - src.SwizzleY = TGSI_SWIZZLE_Y; - src.SwizzleZ = TGSI_SWIZZLE_Z; - src.SwizzleW = TGSI_SWIZZLE_W; - src.Indirect = 0; - src.IndirectFile = TGSI_FILE_NULL; - src.IndirectIndex = 0; - src.IndirectSwizzle = 0; - src.Absolute = 0; - src.Index = index; - src.Negate = 0; - src.Dimension = 0; - src.DimensionIndex = 0; - src.DimIndirect = 0; - src.DimIndFile = TGSI_FILE_NULL; - src.DimIndIndex = 0; - src.DimIndSwizzle = 0; - - return src; -} - -static INLINE struct ureg_src -ureg_src( struct ureg_dst dst ) -{ - struct ureg_src src; - - src.File = dst.File; - src.SwizzleX = TGSI_SWIZZLE_X; - src.SwizzleY = TGSI_SWIZZLE_Y; - src.SwizzleZ = TGSI_SWIZZLE_Z; - src.SwizzleW = TGSI_SWIZZLE_W; - src.Indirect = dst.Indirect; - src.IndirectFile = TGSI_FILE_ADDRESS; - src.IndirectIndex = dst.IndirectIndex; - src.IndirectSwizzle = dst.IndirectSwizzle; - src.Absolute = 0; - src.Index = dst.Index; - src.Negate = 0; - src.Dimension = 0; - src.DimensionIndex = 0; - src.DimIndirect = 0; - src.DimIndFile = TGSI_FILE_NULL; - src.DimIndIndex = 0; - src.DimIndSwizzle = 0; - - return src; -} - - - -static INLINE struct ureg_dst -ureg_dst_undef( void ) -{ - struct ureg_dst dst; - - dst.File = TGSI_FILE_NULL; - dst.WriteMask = 0; - dst.Indirect = 0; - dst.IndirectIndex = 0; - dst.IndirectSwizzle = 0; - dst.Saturate = 0; - dst.Predicate = 0; - dst.PredNegate = 0; - dst.PredSwizzleX = TGSI_SWIZZLE_X; - dst.PredSwizzleY = TGSI_SWIZZLE_Y; - dst.PredSwizzleZ = TGSI_SWIZZLE_Z; - dst.PredSwizzleW = TGSI_SWIZZLE_W; - dst.Index = 0; - - return dst; -} - -static INLINE struct ureg_src -ureg_src_undef( void ) -{ - struct ureg_src src; - - src.File = TGSI_FILE_NULL; - src.SwizzleX = 0; - src.SwizzleY = 0; - src.SwizzleZ = 0; - src.SwizzleW = 0; - src.Indirect = 0; - src.IndirectFile = TGSI_FILE_NULL; - src.IndirectIndex = 0; - src.IndirectSwizzle = 0; - src.Absolute = 0; - src.Index = 0; - src.Negate = 0; - src.Dimension = 0; - src.DimensionIndex = 0; - src.DimIndirect = 0; - src.DimIndFile = TGSI_FILE_NULL; - src.DimIndIndex = 0; - src.DimIndSwizzle = 0; - - return src; -} - -static INLINE boolean -ureg_src_is_undef( struct ureg_src src ) -{ - return src.File == TGSI_FILE_NULL; -} - -static INLINE boolean -ureg_dst_is_undef( struct ureg_dst dst ) -{ - return dst.File == TGSI_FILE_NULL; -} - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_util.c b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_util.c deleted file mode 100644 index 36dc10d555e..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_util.c +++ /dev/null @@ -1,318 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_debug.h" -#include "pipe/p_shader_tokens.h" -#include "tgsi_parse.h" -#include "tgsi_util.h" - -union pointer_hack -{ - void *pointer; - uint64_t uint64; -}; - -void * -tgsi_align_128bit( - void *unaligned ) -{ - union pointer_hack ph; - - ph.uint64 = 0; - ph.pointer = unaligned; - ph.uint64 = (ph.uint64 + 15) & ~15; - return ph.pointer; -} - -unsigned -tgsi_util_get_src_register_swizzle( - const struct tgsi_src_register *reg, - unsigned component ) -{ - switch( component ) { - case 0: - return reg->SwizzleX; - case 1: - return reg->SwizzleY; - case 2: - return reg->SwizzleZ; - case 3: - return reg->SwizzleW; - default: - assert( 0 ); - } - return 0; -} - - -unsigned -tgsi_util_get_full_src_register_swizzle( - const struct tgsi_full_src_register *reg, - unsigned component ) -{ - return tgsi_util_get_src_register_swizzle( - ®->Register, - component ); -} - -void -tgsi_util_set_src_register_swizzle( - struct tgsi_src_register *reg, - unsigned swizzle, - unsigned component ) -{ - switch( component ) { - case 0: - reg->SwizzleX = swizzle; - break; - case 1: - reg->SwizzleY = swizzle; - break; - case 2: - reg->SwizzleZ = swizzle; - break; - case 3: - reg->SwizzleW = swizzle; - break; - default: - assert( 0 ); - } -} - -unsigned -tgsi_util_get_full_src_register_sign_mode( - const struct tgsi_full_src_register *reg, - unsigned component ) -{ - unsigned sign_mode; - - if( reg->Register.Absolute ) { - /* Consider only the post-abs negation. */ - - if( reg->Register.Negate ) { - sign_mode = TGSI_UTIL_SIGN_SET; - } - else { - sign_mode = TGSI_UTIL_SIGN_CLEAR; - } - } - else { - if( reg->Register.Negate ) { - sign_mode = TGSI_UTIL_SIGN_TOGGLE; - } - else { - sign_mode = TGSI_UTIL_SIGN_KEEP; - } - } - - return sign_mode; -} - -void -tgsi_util_set_full_src_register_sign_mode( - struct tgsi_full_src_register *reg, - unsigned sign_mode ) -{ - switch (sign_mode) - { - case TGSI_UTIL_SIGN_CLEAR: - reg->Register.Negate = 0; - reg->Register.Absolute = 1; - break; - - case TGSI_UTIL_SIGN_SET: - reg->Register.Absolute = 1; - reg->Register.Negate = 1; - break; - - case TGSI_UTIL_SIGN_TOGGLE: - reg->Register.Negate = 1; - reg->Register.Absolute = 0; - break; - - case TGSI_UTIL_SIGN_KEEP: - reg->Register.Negate = 0; - reg->Register.Absolute = 0; - break; - - default: - assert( 0 ); - } -} - -/** - * Determine which channels of the specificed src register are effectively - * used by this instruction. - */ -unsigned -tgsi_util_get_inst_usage_mask(const struct tgsi_full_instruction *inst, - unsigned src_idx) -{ - const struct tgsi_full_src_register *src = &inst->Src[src_idx]; - unsigned write_mask = inst->Dst[0].Register.WriteMask; - unsigned read_mask; - unsigned usage_mask; - unsigned chan; - - switch (inst->Instruction.Opcode) { - case TGSI_OPCODE_MOV: - case TGSI_OPCODE_ARL: - case TGSI_OPCODE_ARR: - case TGSI_OPCODE_RCP: - case TGSI_OPCODE_MUL: - case TGSI_OPCODE_DIV: - case TGSI_OPCODE_ADD: - case TGSI_OPCODE_MIN: - case TGSI_OPCODE_MAX: - case TGSI_OPCODE_SLT: - case TGSI_OPCODE_SGE: - case TGSI_OPCODE_MAD: - case TGSI_OPCODE_SUB: - case TGSI_OPCODE_LRP: - case TGSI_OPCODE_CND: - case TGSI_OPCODE_FRC: - case TGSI_OPCODE_CEIL: - case TGSI_OPCODE_CLAMP: - case TGSI_OPCODE_FLR: - case TGSI_OPCODE_ROUND: - case TGSI_OPCODE_POW: - case TGSI_OPCODE_ABS: - case TGSI_OPCODE_COS: - case TGSI_OPCODE_SIN: - case TGSI_OPCODE_DDX: - case TGSI_OPCODE_DDY: - case TGSI_OPCODE_SEQ: - case TGSI_OPCODE_SGT: - case TGSI_OPCODE_SLE: - case TGSI_OPCODE_SNE: - case TGSI_OPCODE_SSG: - case TGSI_OPCODE_CMP: - case TGSI_OPCODE_TRUNC: - case TGSI_OPCODE_NOT: - case TGSI_OPCODE_AND: - case TGSI_OPCODE_OR: - case TGSI_OPCODE_XOR: - case TGSI_OPCODE_SAD: - /* Channel-wise operations */ - read_mask = write_mask; - break; - - case TGSI_OPCODE_EX2: - case TGSI_OPCODE_LG2: - case TGSI_OPCODE_RCC: - read_mask = TGSI_WRITEMASK_X; - break; - - case TGSI_OPCODE_SCS: - read_mask = write_mask & TGSI_WRITEMASK_XY ? TGSI_WRITEMASK_X : 0; - break; - - case TGSI_OPCODE_EXP: - case TGSI_OPCODE_LOG: - read_mask = write_mask & TGSI_WRITEMASK_XYZ ? TGSI_WRITEMASK_X : 0; - break; - - case TGSI_OPCODE_DP2A: - read_mask = src_idx == 2 ? TGSI_WRITEMASK_X : TGSI_WRITEMASK_XY; - break; - - case TGSI_OPCODE_DP2: - read_mask = TGSI_WRITEMASK_XY; - break; - - case TGSI_OPCODE_DP3: - read_mask = TGSI_WRITEMASK_XYZ; - break; - - case TGSI_OPCODE_DP4: - read_mask = TGSI_WRITEMASK_XYZW; - break; - - case TGSI_OPCODE_DPH: - read_mask = src_idx == 0 ? TGSI_WRITEMASK_XYZ : TGSI_WRITEMASK_XYZW; - break; - - case TGSI_OPCODE_TEX: - case TGSI_OPCODE_TXD: - case TGSI_OPCODE_TXB: - case TGSI_OPCODE_TXL: - case TGSI_OPCODE_TXP: - if (src_idx == 0) { - /* Note that the SHADOW variants use the Z component too */ - switch (inst->Texture.Texture) { - case TGSI_TEXTURE_1D: - read_mask = TGSI_WRITEMASK_X; - break; - case TGSI_TEXTURE_SHADOW1D: - read_mask = TGSI_WRITEMASK_XZ; - break; - case TGSI_TEXTURE_1D_ARRAY: - case TGSI_TEXTURE_2D: - case TGSI_TEXTURE_RECT: - read_mask = TGSI_WRITEMASK_XY; - break; - case TGSI_TEXTURE_SHADOW1D_ARRAY: - case TGSI_TEXTURE_SHADOW2D: - case TGSI_TEXTURE_SHADOWRECT: - case TGSI_TEXTURE_2D_ARRAY: - case TGSI_TEXTURE_3D: - case TGSI_TEXTURE_CUBE: - read_mask = TGSI_WRITEMASK_XYZ; - break; - case TGSI_TEXTURE_SHADOW2D_ARRAY: - case TGSI_TEXTURE_SHADOWCUBE: - read_mask = TGSI_WRITEMASK_XYZW; - break; - default: - assert(0); - read_mask = 0; - } - - if (inst->Instruction.Opcode != TGSI_OPCODE_TEX) { - read_mask |= TGSI_WRITEMASK_W; - } - } else { - /* A safe approximation */ - read_mask = TGSI_WRITEMASK_XYZW; - } - break; - - default: - /* Assume all channels are read */ - read_mask = TGSI_WRITEMASK_XYZW; - break; - } - - usage_mask = 0; - for (chan = 0; chan < 4; ++chan) { - if (read_mask & (1 << chan)) { - usage_mask |= 1 << tgsi_util_get_full_src_register_swizzle(src, chan); - } - } - - return usage_mask; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_util.h b/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_util.h deleted file mode 100644 index 04702ba9826..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/tgsi/tgsi_util.h +++ /dev/null @@ -1,83 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef TGSI_UTIL_H -#define TGSI_UTIL_H - -#if defined __cplusplus -extern "C" { -#endif - -struct tgsi_src_register; -struct tgsi_full_src_register; -struct tgsi_full_instruction; - -void * -tgsi_align_128bit( - void *unaligned ); - -unsigned -tgsi_util_get_src_register_swizzle( - const struct tgsi_src_register *reg, - unsigned component ); - - -unsigned -tgsi_util_get_full_src_register_swizzle( - const struct tgsi_full_src_register *reg, - unsigned component ); - -void -tgsi_util_set_src_register_swizzle( - struct tgsi_src_register *reg, - unsigned swizzle, - unsigned component ); - -#define TGSI_UTIL_SIGN_CLEAR 0 /* Force positive */ -#define TGSI_UTIL_SIGN_SET 1 /* Force negative */ -#define TGSI_UTIL_SIGN_TOGGLE 2 /* Negate */ -#define TGSI_UTIL_SIGN_KEEP 3 /* No change */ - -unsigned -tgsi_util_get_full_src_register_sign_mode( - const struct tgsi_full_src_register *reg, - unsigned component ); - -void -tgsi_util_set_full_src_register_sign_mode( - struct tgsi_full_src_register *reg, - unsigned sign_mode ); - -unsigned -tgsi_util_get_inst_usage_mask(const struct tgsi_full_instruction *inst, - unsigned src_idx); - -#if defined __cplusplus -} -#endif - -#endif /* TGSI_UTIL_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/translate/translate.c b/dll/opengl/mesa/src/gallium/auxiliary/translate/translate.c deleted file mode 100644 index 73287b667db..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/translate/translate.c +++ /dev/null @@ -1,55 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - /* - * Authors: - * Keith Whitwell - */ - -#include "pipe/p_config.h" -#include "pipe/p_state.h" -#include "translate.h" - -struct translate *translate_create( const struct translate_key *key ) -{ - struct translate *translate = NULL; - -#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) - translate = translate_sse2_create( key ); - if (translate) - return translate; -#else - (void)translate; -#endif - - return translate_generic_create( key ); -} - -boolean translate_is_output_format_supported(enum pipe_format format) -{ - return translate_generic_is_output_format_supported(format); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/translate/translate.h b/dll/opengl/mesa/src/gallium/auxiliary/translate/translate.h deleted file mode 100644 index 850ef39ef21..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/translate/translate.h +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright 2008 Tungsten Graphics, inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * TUNGSTEN GRAPHICS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/** - * Vertex fetch/store/convert code. This functionality is used in two places: - * 1. Vertex fetch/convert - to grab vertex data from incoming vertex - * arrays and convert to format needed by vertex shaders. - * 2. Vertex store/emit - to convert simple float[][4] vertex attributes - * (which is the organization used throughout the draw/prim pipeline) to - * hardware-specific formats and emit into hardware vertex buffers. - * - * - * Authors: - * Keith Whitwell - */ - -#ifndef _TRANSLATE_H -#define _TRANSLATE_H - - -#include "pipe/p_compiler.h" -#include "pipe/p_format.h" -#include "pipe/p_state.h" - -enum translate_element_type { - TRANSLATE_ELEMENT_NORMAL, - TRANSLATE_ELEMENT_INSTANCE_ID -}; - -struct translate_element -{ - enum translate_element_type type; - enum pipe_format input_format; - enum pipe_format output_format; - unsigned input_buffer:8; - unsigned input_offset:24; - unsigned instance_divisor; - unsigned output_offset; -}; - - -struct translate_key { - unsigned output_stride; - unsigned nr_elements; - struct translate_element element[PIPE_MAX_ATTRIBS + 1]; -}; - - -struct translate; - - -typedef void (PIPE_CDECL *run_elts_func)(struct translate *, - const unsigned *elts, - unsigned count, - unsigned instance_id, - void *output_buffer); - -typedef void (PIPE_CDECL *run_elts16_func)(struct translate *, - const uint16_t *elts, - unsigned count, - unsigned instance_id, - void *output_buffer); - -typedef void (PIPE_CDECL *run_elts8_func)(struct translate *, - const uint8_t *elts, - unsigned count, - unsigned instance_id, - void *output_buffer); - -typedef void (PIPE_CDECL *run_func)(struct translate *, - unsigned start, - unsigned count, - unsigned instance_id, - void *output_buffer); - -struct translate { - struct translate_key key; - - void (*release)( struct translate * ); - - void (*set_buffer)( struct translate *, - unsigned i, - const void *ptr, - unsigned stride, - unsigned max_index ); - - run_elts_func run_elts; - run_elts16_func run_elts16; - run_elts8_func run_elts8; - run_func run; -}; - - - -struct translate *translate_create( const struct translate_key *key ); - -boolean translate_is_output_format_supported(enum pipe_format format); - -static INLINE int translate_keysize( const struct translate_key *key ) -{ - return 2 * sizeof(int) + key->nr_elements * sizeof(struct translate_element); -} - -static INLINE int translate_key_compare( const struct translate_key *a, - const struct translate_key *b ) -{ - int keysize_a = translate_keysize(a); - int keysize_b = translate_keysize(b); - - if (keysize_a != keysize_b) { - return keysize_a - keysize_b; - } - return memcmp(a, b, keysize_a); -} - - -static INLINE void translate_key_sanitize( struct translate_key *a ) -{ - int keysize = translate_keysize(a); - char *ptr = (char *)a; - memset(ptr + keysize, 0, sizeof(*a) - keysize); -} - - -/******************************************************************************* - * Private: - */ -struct translate *translate_sse2_create( const struct translate_key *key ); - -struct translate *translate_generic_create( const struct translate_key *key ); - -boolean translate_generic_is_output_format_supported(enum pipe_format format); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/translate/translate_cache.c b/dll/opengl/mesa/src/gallium/auxiliary/translate/translate_cache.c deleted file mode 100644 index 3f1ecb630f2..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/translate/translate_cache.c +++ /dev/null @@ -1,106 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_memory.h" -#include "pipe/p_state.h" -#include "translate.h" -#include "translate_cache.h" - -#include "cso_cache/cso_cache.h" -#include "cso_cache/cso_hash.h" - -struct translate_cache { - struct cso_hash *hash; -}; - -struct translate_cache * translate_cache_create( void ) -{ - struct translate_cache *cache = MALLOC_STRUCT(translate_cache); - if (cache == NULL) { - return NULL; - } - - cache->hash = cso_hash_create(); - return cache; -} - - -static INLINE void delete_translates(struct translate_cache *cache) -{ - struct cso_hash *hash = cache->hash; - struct cso_hash_iter iter = cso_hash_first_node(hash); - while (!cso_hash_iter_is_null(iter)) { - struct translate *state = (struct translate*)cso_hash_iter_data(iter); - iter = cso_hash_iter_next(iter); - if (state) { - state->release(state); - } - } -} - -void translate_cache_destroy(struct translate_cache *cache) -{ - delete_translates(cache); - cso_hash_delete(cache->hash); - FREE(cache); -} - - -static INLINE unsigned translate_hash_key_size(struct translate_key *key) -{ - unsigned size = sizeof(struct translate_key) - - sizeof(struct translate_element) * (PIPE_MAX_ATTRIBS - key->nr_elements); - return size; -} - -static INLINE unsigned create_key(struct translate_key *key) -{ - unsigned hash_key; - unsigned size = translate_hash_key_size(key); - /*debug_printf("key size = %d, (els = %d)\n", - size, key->nr_elements);*/ - hash_key = cso_construct_key(key, size); - return hash_key; -} - -struct translate * translate_cache_find(struct translate_cache *cache, - struct translate_key *key) -{ - unsigned hash_key = create_key(key); - struct translate *translate = (struct translate*) - cso_hash_find_data_from_template(cache->hash, - hash_key, - key, sizeof(*key)); - - if (!translate) { - /* create/insert */ - translate = translate_create(key); - cso_hash_insert(cache->hash, hash_key, translate); - } - - return translate; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/translate/translate_cache.h b/dll/opengl/mesa/src/gallium/auxiliary/translate/translate_cache.h deleted file mode 100644 index 7dba871e579..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/translate/translate_cache.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2008 Tungsten Graphics, inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * TUNGSTEN GRAPHICS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - */ -#ifndef _TRANSLATE_CACHE_H -#define _TRANSLATE_CACHE_H - - -/******************************************************************************* - * Translate cache. - * Simply used to cache created translates. Avoids unecessary creation of - * translate's if one suitable for a given translate_key has already been - * created. - * - * Note: this functionality depends and requires the CSO module. - */ -struct translate_cache; - -struct translate_key; -struct translate; - -struct translate_cache *translate_cache_create( void ); -void translate_cache_destroy(struct translate_cache *cache); - -/** - * Will try to find a translate structure matched by the given key. - * If such a structure doesn't exist in the cache the function - * will automatically create it, insert it in the cache and - * return the created version. - * - */ -struct translate *translate_cache_find(struct translate_cache *cache, - struct translate_key *key); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/translate/translate_generic.c b/dll/opengl/mesa/src/gallium/auxiliary/translate/translate_generic.c deleted file mode 100644 index 0b6ebf5dabe..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/translate/translate_generic.c +++ /dev/null @@ -1,989 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - /* - * Authors: - * Keith Whitwell - */ - -#include "util/u_memory.h" -#include "util/u_format.h" -#include "util/u_half.h" -#include "util/u_math.h" -#include "pipe/p_state.h" -#include "translate.h" - - -#define DRAW_DBG 0 - -typedef void (*fetch_func)(void *dst, - const uint8_t *src, - unsigned i, unsigned j); -typedef void (*emit_func)(const void *attrib, void *ptr); - - - -struct translate_generic { - struct translate translate; - - struct { - enum translate_element_type type; - - fetch_func fetch; - unsigned buffer; - unsigned input_offset; - unsigned instance_divisor; - - emit_func emit; - unsigned output_offset; - - const uint8_t *input_ptr; - unsigned input_stride; - unsigned max_index; - - /* this value is set to -1 if this is a normal element with output_format != input_format: - * in this case, u_format is used to do a full conversion - * - * this value is set to the format size in bytes if output_format == input_format or for 32-bit instance ids: - * in this case, memcpy is used to copy this amount of bytes - */ - int copy_size; - - } attrib[PIPE_MAX_ATTRIBS]; - - unsigned nr_attrib; -}; - - -static struct translate_generic *translate_generic( struct translate *translate ) -{ - return (struct translate_generic *)translate; -} - -/** - * Fetch a dword[4] vertex attribute from memory, doing format/type - * conversion as needed. - * - * This is probably needed/dupliocated elsewhere, eg format - * conversion, texture sampling etc. - */ -#define ATTRIB( NAME, SZ, SRCTYPE, DSTTYPE, TO ) \ -static void \ -emit_##NAME(const void *attrib, void *ptr) \ -{ \ - unsigned i; \ - SRCTYPE *in = (SRCTYPE *)attrib; \ - DSTTYPE *out = (DSTTYPE *)ptr; \ - \ - for (i = 0; i < SZ; i++) { \ - out[i] = TO(in[i]); \ - } \ -} - - -#define TO_64_FLOAT(x) ((double) x) -#define TO_32_FLOAT(x) (x) -#define TO_16_FLOAT(x) util_float_to_half(x) - -#define TO_8_USCALED(x) ((unsigned char) x) -#define TO_16_USCALED(x) ((unsigned short) x) -#define TO_32_USCALED(x) ((unsigned int) x) - -#define TO_8_SSCALED(x) ((char) x) -#define TO_16_SSCALED(x) ((short) x) -#define TO_32_SSCALED(x) ((int) x) - -#define TO_8_UNORM(x) ((unsigned char) (x * 255.0f)) -#define TO_16_UNORM(x) ((unsigned short) (x * 65535.0f)) -#define TO_32_UNORM(x) ((unsigned int) (x * 4294967295.0f)) - -#define TO_8_SNORM(x) ((char) (x * 127.0f)) -#define TO_16_SNORM(x) ((short) (x * 32767.0f)) -#define TO_32_SNORM(x) ((int) (x * 2147483647.0f)) - -#define TO_32_FIXED(x) ((int) (x * 65536.0f)) - -#define TO_INT(x) (x) - - -ATTRIB( R64G64B64A64_FLOAT, 4, float, double, TO_64_FLOAT ) -ATTRIB( R64G64B64_FLOAT, 3, float, double, TO_64_FLOAT ) -ATTRIB( R64G64_FLOAT, 2, float, double, TO_64_FLOAT ) -ATTRIB( R64_FLOAT, 1, float, double, TO_64_FLOAT ) - -ATTRIB( R32G32B32A32_FLOAT, 4, float, float, TO_32_FLOAT ) -ATTRIB( R32G32B32_FLOAT, 3, float, float, TO_32_FLOAT ) -ATTRIB( R32G32_FLOAT, 2, float, float, TO_32_FLOAT ) -ATTRIB( R32_FLOAT, 1, float, float, TO_32_FLOAT ) - -ATTRIB( R16G16B16A16_FLOAT, 4, float, ushort, TO_16_FLOAT ) -ATTRIB( R16G16B16_FLOAT, 3, float, ushort, TO_16_FLOAT ) -ATTRIB( R16G16_FLOAT, 2, float, ushort, TO_16_FLOAT ) -ATTRIB( R16_FLOAT, 1, float, ushort, TO_16_FLOAT ) - -ATTRIB( R32G32B32A32_USCALED, 4, float, unsigned, TO_32_USCALED ) -ATTRIB( R32G32B32_USCALED, 3, float, unsigned, TO_32_USCALED ) -ATTRIB( R32G32_USCALED, 2, float, unsigned, TO_32_USCALED ) -ATTRIB( R32_USCALED, 1, float, unsigned, TO_32_USCALED ) - -ATTRIB( R32G32B32A32_SSCALED, 4, float, int, TO_32_SSCALED ) -ATTRIB( R32G32B32_SSCALED, 3, float, int, TO_32_SSCALED ) -ATTRIB( R32G32_SSCALED, 2, float, int, TO_32_SSCALED ) -ATTRIB( R32_SSCALED, 1, float, int, TO_32_SSCALED ) - -ATTRIB( R32G32B32A32_UNORM, 4, float, unsigned, TO_32_UNORM ) -ATTRIB( R32G32B32_UNORM, 3, float, unsigned, TO_32_UNORM ) -ATTRIB( R32G32_UNORM, 2, float, unsigned, TO_32_UNORM ) -ATTRIB( R32_UNORM, 1, float, unsigned, TO_32_UNORM ) - -ATTRIB( R32G32B32A32_SNORM, 4, float, int, TO_32_SNORM ) -ATTRIB( R32G32B32_SNORM, 3, float, int, TO_32_SNORM ) -ATTRIB( R32G32_SNORM, 2, float, int, TO_32_SNORM ) -ATTRIB( R32_SNORM, 1, float, int, TO_32_SNORM ) - -ATTRIB( R16G16B16A16_USCALED, 4, float, ushort, TO_16_USCALED ) -ATTRIB( R16G16B16_USCALED, 3, float, ushort, TO_16_USCALED ) -ATTRIB( R16G16_USCALED, 2, float, ushort, TO_16_USCALED ) -ATTRIB( R16_USCALED, 1, float, ushort, TO_16_USCALED ) - -ATTRIB( R16G16B16A16_SSCALED, 4, float, short, TO_16_SSCALED ) -ATTRIB( R16G16B16_SSCALED, 3, float, short, TO_16_SSCALED ) -ATTRIB( R16G16_SSCALED, 2, float, short, TO_16_SSCALED ) -ATTRIB( R16_SSCALED, 1, float, short, TO_16_SSCALED ) - -ATTRIB( R16G16B16A16_UNORM, 4, float, ushort, TO_16_UNORM ) -ATTRIB( R16G16B16_UNORM, 3, float, ushort, TO_16_UNORM ) -ATTRIB( R16G16_UNORM, 2, float, ushort, TO_16_UNORM ) -ATTRIB( R16_UNORM, 1, float, ushort, TO_16_UNORM ) - -ATTRIB( R16G16B16A16_SNORM, 4, float, short, TO_16_SNORM ) -ATTRIB( R16G16B16_SNORM, 3, float, short, TO_16_SNORM ) -ATTRIB( R16G16_SNORM, 2, float, short, TO_16_SNORM ) -ATTRIB( R16_SNORM, 1, float, short, TO_16_SNORM ) - -ATTRIB( R8G8B8A8_USCALED, 4, float, ubyte, TO_8_USCALED ) -ATTRIB( R8G8B8_USCALED, 3, float, ubyte, TO_8_USCALED ) -ATTRIB( R8G8_USCALED, 2, float, ubyte, TO_8_USCALED ) -ATTRIB( R8_USCALED, 1, float, ubyte, TO_8_USCALED ) - -ATTRIB( R8G8B8A8_SSCALED, 4, float, char, TO_8_SSCALED ) -ATTRIB( R8G8B8_SSCALED, 3, float, char, TO_8_SSCALED ) -ATTRIB( R8G8_SSCALED, 2, float, char, TO_8_SSCALED ) -ATTRIB( R8_SSCALED, 1, float, char, TO_8_SSCALED ) - -ATTRIB( R8G8B8A8_UNORM, 4, float, ubyte, TO_8_UNORM ) -ATTRIB( R8G8B8_UNORM, 3, float, ubyte, TO_8_UNORM ) -ATTRIB( R8G8_UNORM, 2, float, ubyte, TO_8_UNORM ) -ATTRIB( R8_UNORM, 1, float, ubyte, TO_8_UNORM ) - -ATTRIB( R8G8B8A8_SNORM, 4, float, char, TO_8_SNORM ) -ATTRIB( R8G8B8_SNORM, 3, float, char, TO_8_SNORM ) -ATTRIB( R8G8_SNORM, 2, float, char, TO_8_SNORM ) -ATTRIB( R8_SNORM, 1, float, char, TO_8_SNORM ) - -ATTRIB( R32G32B32A32_UINT, 4, uint32_t, unsigned, TO_INT ) -ATTRIB( R32G32B32_UINT, 3, uint32_t, unsigned, TO_INT ) -ATTRIB( R32G32_UINT, 2, uint32_t, unsigned, TO_INT ) -ATTRIB( R32_UINT, 1, uint32_t, unsigned, TO_INT ) - -ATTRIB( R16G16B16A16_UINT, 4, uint32_t, ushort, TO_INT ) -ATTRIB( R16G16B16_UINT, 3, uint32_t, ushort, TO_INT ) -ATTRIB( R16G16_UINT, 2, uint32_t, ushort, TO_INT ) -ATTRIB( R16_UINT, 1, uint32_t, ushort, TO_INT ) - -ATTRIB( R8G8B8A8_UINT, 4, uint32_t, ubyte, TO_INT ) -ATTRIB( R8G8B8_UINT, 3, uint32_t, ubyte, TO_INT ) -ATTRIB( R8G8_UINT, 2, uint32_t, ubyte, TO_INT ) -ATTRIB( R8_UINT, 1, uint32_t, ubyte, TO_INT ) - -ATTRIB( R32G32B32A32_SINT, 4, int32_t, int, TO_INT ) -ATTRIB( R32G32B32_SINT, 3, int32_t, int, TO_INT ) -ATTRIB( R32G32_SINT, 2, int32_t, int, TO_INT ) -ATTRIB( R32_SINT, 1, int32_t, int, TO_INT ) - -ATTRIB( R16G16B16A16_SINT, 4, int32_t, short, TO_INT ) -ATTRIB( R16G16B16_SINT, 3, int32_t, short, TO_INT ) -ATTRIB( R16G16_SINT, 2, int32_t, short, TO_INT ) -ATTRIB( R16_SINT, 1, int32_t, short, TO_INT ) - -ATTRIB( R8G8B8A8_SINT, 4, int32_t, char, TO_INT ) -ATTRIB( R8G8B8_SINT, 3, int32_t, char, TO_INT ) -ATTRIB( R8G8_SINT, 2, int32_t, char, TO_INT ) -ATTRIB( R8_SINT, 1, int32_t, char, TO_INT ) - -static void -emit_A8R8G8B8_UNORM( const void *attrib, void *ptr) -{ - float *in = (float *)attrib; - ubyte *out = (ubyte *)ptr; - out[0] = TO_8_UNORM(in[3]); - out[1] = TO_8_UNORM(in[0]); - out[2] = TO_8_UNORM(in[1]); - out[3] = TO_8_UNORM(in[2]); -} - -static void -emit_B8G8R8A8_UNORM( const void *attrib, void *ptr) -{ - float *in = (float *)attrib; - ubyte *out = (ubyte *)ptr; - out[2] = TO_8_UNORM(in[0]); - out[1] = TO_8_UNORM(in[1]); - out[0] = TO_8_UNORM(in[2]); - out[3] = TO_8_UNORM(in[3]); -} - -static void -emit_B10G10R10A2_UNORM( const void *attrib, void *ptr ) -{ - float *src = (float *)ptr; - uint32_t value = 0; - value |= ((uint32_t)(CLAMP(src[2], 0, 1) * 0x3ff)) & 0x3ff; - value |= (((uint32_t)(CLAMP(src[1], 0, 1) * 0x3ff)) & 0x3ff) << 10; - value |= (((uint32_t)(CLAMP(src[0], 0, 1) * 0x3ff)) & 0x3ff) << 20; - value |= ((uint32_t)(CLAMP(src[3], 0, 1) * 0x3)) << 30; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)attrib = value; -} - -static void -emit_B10G10R10A2_USCALED( const void *attrib, void *ptr ) -{ - float *src = (float *)ptr; - uint32_t value = 0; - value |= ((uint32_t)CLAMP(src[2], 0, 1023)) & 0x3ff; - value |= (((uint32_t)CLAMP(src[1], 0, 1023)) & 0x3ff) << 10; - value |= (((uint32_t)CLAMP(src[0], 0, 1023)) & 0x3ff) << 20; - value |= ((uint32_t)CLAMP(src[3], 0, 3)) << 30; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)attrib = value; -} - -static void -emit_B10G10R10A2_SNORM( const void *attrib, void *ptr ) -{ - float *src = (float *)ptr; - uint32_t value = 0; - value |= (uint32_t)(((uint32_t)(CLAMP(src[2], -1, 1) * 0x1ff)) & 0x3ff) ; - value |= (uint32_t)((((uint32_t)(CLAMP(src[1], -1, 1) * 0x1ff)) & 0x3ff) << 10) ; - value |= (uint32_t)((((uint32_t)(CLAMP(src[0], -1, 1) * 0x1ff)) & 0x3ff) << 20) ; - value |= (uint32_t)(((uint32_t)(CLAMP(src[3], -1, 1) * 0x1)) << 30) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)attrib = value; -} - -static void -emit_B10G10R10A2_SSCALED( const void *attrib, void *ptr ) -{ - float *src = (float *)ptr; - uint32_t value = 0; - value |= (uint32_t)(((uint32_t)CLAMP(src[2], -512, 511)) & 0x3ff) ; - value |= (uint32_t)((((uint32_t)CLAMP(src[1], -512, 511)) & 0x3ff) << 10) ; - value |= (uint32_t)((((uint32_t)CLAMP(src[0], -512, 511)) & 0x3ff) << 20) ; - value |= (uint32_t)(((uint32_t)CLAMP(src[3], -2, 1)) << 30) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)attrib = value; -} - -static void -emit_R10G10B10A2_UNORM( const void *attrib, void *ptr ) -{ - float *src = (float *)ptr; - uint32_t value = 0; - value |= ((uint32_t)(CLAMP(src[0], 0, 1) * 0x3ff)) & 0x3ff; - value |= (((uint32_t)(CLAMP(src[1], 0, 1) * 0x3ff)) & 0x3ff) << 10; - value |= (((uint32_t)(CLAMP(src[2], 0, 1) * 0x3ff)) & 0x3ff) << 20; - value |= ((uint32_t)(CLAMP(src[3], 0, 1) * 0x3)) << 30; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)attrib = value; -} - -static void -emit_R10G10B10A2_USCALED( const void *attrib, void *ptr ) -{ - float *src = (float *)ptr; - uint32_t value = 0; - value |= ((uint32_t)CLAMP(src[0], 0, 1023)) & 0x3ff; - value |= (((uint32_t)CLAMP(src[1], 0, 1023)) & 0x3ff) << 10; - value |= (((uint32_t)CLAMP(src[2], 0, 1023)) & 0x3ff) << 20; - value |= ((uint32_t)CLAMP(src[3], 0, 3)) << 30; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)attrib = value; -} - -static void -emit_R10G10B10A2_SNORM( const void *attrib, void *ptr ) -{ - float *src = (float *)ptr; - uint32_t value = 0; - value |= (uint32_t)(((uint32_t)(CLAMP(src[0], -1, 1) * 0x1ff)) & 0x3ff) ; - value |= (uint32_t)((((uint32_t)(CLAMP(src[1], -1, 1) * 0x1ff)) & 0x3ff) << 10) ; - value |= (uint32_t)((((uint32_t)(CLAMP(src[2], -1, 1) * 0x1ff)) & 0x3ff) << 20) ; - value |= (uint32_t)(((uint32_t)(CLAMP(src[3], -1, 1) * 0x1)) << 30) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)attrib = value; -} - -static void -emit_R10G10B10A2_SSCALED( const void *attrib, void *ptr) -{ - float *src = (float *)ptr; - uint32_t value = 0; - value |= (uint32_t)(((uint32_t)CLAMP(src[0], -512, 511)) & 0x3ff) ; - value |= (uint32_t)((((uint32_t)CLAMP(src[1], -512, 511)) & 0x3ff) << 10) ; - value |= (uint32_t)((((uint32_t)CLAMP(src[2], -512, 511)) & 0x3ff) << 20) ; - value |= (uint32_t)(((uint32_t)CLAMP(src[3], -2, 1)) << 30) ; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)attrib = value; -} - -static void -emit_NULL( const void *attrib, void *ptr ) -{ - /* do nothing is the only sensible option */ -} - -static emit_func get_emit_func( enum pipe_format format ) -{ - switch (format) { - case PIPE_FORMAT_R64_FLOAT: - return &emit_R64_FLOAT; - case PIPE_FORMAT_R64G64_FLOAT: - return &emit_R64G64_FLOAT; - case PIPE_FORMAT_R64G64B64_FLOAT: - return &emit_R64G64B64_FLOAT; - case PIPE_FORMAT_R64G64B64A64_FLOAT: - return &emit_R64G64B64A64_FLOAT; - - case PIPE_FORMAT_R32_FLOAT: - return &emit_R32_FLOAT; - case PIPE_FORMAT_R32G32_FLOAT: - return &emit_R32G32_FLOAT; - case PIPE_FORMAT_R32G32B32_FLOAT: - return &emit_R32G32B32_FLOAT; - case PIPE_FORMAT_R32G32B32A32_FLOAT: - return &emit_R32G32B32A32_FLOAT; - - case PIPE_FORMAT_R16_FLOAT: - return &emit_R16_FLOAT; - case PIPE_FORMAT_R16G16_FLOAT: - return &emit_R16G16_FLOAT; - case PIPE_FORMAT_R16G16B16_FLOAT: - return &emit_R16G16B16_FLOAT; - case PIPE_FORMAT_R16G16B16A16_FLOAT: - return &emit_R16G16B16A16_FLOAT; - - case PIPE_FORMAT_R32_UNORM: - return &emit_R32_UNORM; - case PIPE_FORMAT_R32G32_UNORM: - return &emit_R32G32_UNORM; - case PIPE_FORMAT_R32G32B32_UNORM: - return &emit_R32G32B32_UNORM; - case PIPE_FORMAT_R32G32B32A32_UNORM: - return &emit_R32G32B32A32_UNORM; - - case PIPE_FORMAT_R32_USCALED: - return &emit_R32_USCALED; - case PIPE_FORMAT_R32G32_USCALED: - return &emit_R32G32_USCALED; - case PIPE_FORMAT_R32G32B32_USCALED: - return &emit_R32G32B32_USCALED; - case PIPE_FORMAT_R32G32B32A32_USCALED: - return &emit_R32G32B32A32_USCALED; - - case PIPE_FORMAT_R32_SNORM: - return &emit_R32_SNORM; - case PIPE_FORMAT_R32G32_SNORM: - return &emit_R32G32_SNORM; - case PIPE_FORMAT_R32G32B32_SNORM: - return &emit_R32G32B32_SNORM; - case PIPE_FORMAT_R32G32B32A32_SNORM: - return &emit_R32G32B32A32_SNORM; - - case PIPE_FORMAT_R32_SSCALED: - return &emit_R32_SSCALED; - case PIPE_FORMAT_R32G32_SSCALED: - return &emit_R32G32_SSCALED; - case PIPE_FORMAT_R32G32B32_SSCALED: - return &emit_R32G32B32_SSCALED; - case PIPE_FORMAT_R32G32B32A32_SSCALED: - return &emit_R32G32B32A32_SSCALED; - - case PIPE_FORMAT_R16_UNORM: - return &emit_R16_UNORM; - case PIPE_FORMAT_R16G16_UNORM: - return &emit_R16G16_UNORM; - case PIPE_FORMAT_R16G16B16_UNORM: - return &emit_R16G16B16_UNORM; - case PIPE_FORMAT_R16G16B16A16_UNORM: - return &emit_R16G16B16A16_UNORM; - - case PIPE_FORMAT_R16_USCALED: - return &emit_R16_USCALED; - case PIPE_FORMAT_R16G16_USCALED: - return &emit_R16G16_USCALED; - case PIPE_FORMAT_R16G16B16_USCALED: - return &emit_R16G16B16_USCALED; - case PIPE_FORMAT_R16G16B16A16_USCALED: - return &emit_R16G16B16A16_USCALED; - - case PIPE_FORMAT_R16_SNORM: - return &emit_R16_SNORM; - case PIPE_FORMAT_R16G16_SNORM: - return &emit_R16G16_SNORM; - case PIPE_FORMAT_R16G16B16_SNORM: - return &emit_R16G16B16_SNORM; - case PIPE_FORMAT_R16G16B16A16_SNORM: - return &emit_R16G16B16A16_SNORM; - - case PIPE_FORMAT_R16_SSCALED: - return &emit_R16_SSCALED; - case PIPE_FORMAT_R16G16_SSCALED: - return &emit_R16G16_SSCALED; - case PIPE_FORMAT_R16G16B16_SSCALED: - return &emit_R16G16B16_SSCALED; - case PIPE_FORMAT_R16G16B16A16_SSCALED: - return &emit_R16G16B16A16_SSCALED; - - case PIPE_FORMAT_R8_UNORM: - return &emit_R8_UNORM; - case PIPE_FORMAT_R8G8_UNORM: - return &emit_R8G8_UNORM; - case PIPE_FORMAT_R8G8B8_UNORM: - return &emit_R8G8B8_UNORM; - case PIPE_FORMAT_R8G8B8A8_UNORM: - return &emit_R8G8B8A8_UNORM; - - case PIPE_FORMAT_R8_USCALED: - return &emit_R8_USCALED; - case PIPE_FORMAT_R8G8_USCALED: - return &emit_R8G8_USCALED; - case PIPE_FORMAT_R8G8B8_USCALED: - return &emit_R8G8B8_USCALED; - case PIPE_FORMAT_R8G8B8A8_USCALED: - return &emit_R8G8B8A8_USCALED; - - case PIPE_FORMAT_R8_SNORM: - return &emit_R8_SNORM; - case PIPE_FORMAT_R8G8_SNORM: - return &emit_R8G8_SNORM; - case PIPE_FORMAT_R8G8B8_SNORM: - return &emit_R8G8B8_SNORM; - case PIPE_FORMAT_R8G8B8A8_SNORM: - return &emit_R8G8B8A8_SNORM; - - case PIPE_FORMAT_R8_SSCALED: - return &emit_R8_SSCALED; - case PIPE_FORMAT_R8G8_SSCALED: - return &emit_R8G8_SSCALED; - case PIPE_FORMAT_R8G8B8_SSCALED: - return &emit_R8G8B8_SSCALED; - case PIPE_FORMAT_R8G8B8A8_SSCALED: - return &emit_R8G8B8A8_SSCALED; - - case PIPE_FORMAT_B8G8R8A8_UNORM: - return &emit_B8G8R8A8_UNORM; - - case PIPE_FORMAT_A8R8G8B8_UNORM: - return &emit_A8R8G8B8_UNORM; - - case PIPE_FORMAT_R32_UINT: - return &emit_R32_UINT; - case PIPE_FORMAT_R32G32_UINT: - return &emit_R32G32_UINT; - case PIPE_FORMAT_R32G32B32_UINT: - return &emit_R32G32B32_UINT; - case PIPE_FORMAT_R32G32B32A32_UINT: - return &emit_R32G32B32A32_UINT; - - case PIPE_FORMAT_R16_UINT: - return &emit_R16_UINT; - case PIPE_FORMAT_R16G16_UINT: - return &emit_R16G16_UINT; - case PIPE_FORMAT_R16G16B16_UINT: - return &emit_R16G16B16_UINT; - case PIPE_FORMAT_R16G16B16A16_UINT: - return &emit_R16G16B16A16_UINT; - - case PIPE_FORMAT_R8_UINT: - return &emit_R8_UINT; - case PIPE_FORMAT_R8G8_UINT: - return &emit_R8G8_UINT; - case PIPE_FORMAT_R8G8B8_UINT: - return &emit_R8G8B8_UINT; - case PIPE_FORMAT_R8G8B8A8_UINT: - return &emit_R8G8B8A8_UINT; - - case PIPE_FORMAT_R32_SINT: - return &emit_R32_SINT; - case PIPE_FORMAT_R32G32_SINT: - return &emit_R32G32_SINT; - case PIPE_FORMAT_R32G32B32_SINT: - return &emit_R32G32B32_SINT; - case PIPE_FORMAT_R32G32B32A32_SINT: - return &emit_R32G32B32A32_SINT; - - case PIPE_FORMAT_R16_SINT: - return &emit_R16_SINT; - case PIPE_FORMAT_R16G16_SINT: - return &emit_R16G16_SINT; - case PIPE_FORMAT_R16G16B16_SINT: - return &emit_R16G16B16_SINT; - case PIPE_FORMAT_R16G16B16A16_SINT: - return &emit_R16G16B16A16_SINT; - - case PIPE_FORMAT_R8_SINT: - return &emit_R8_SINT; - case PIPE_FORMAT_R8G8_SINT: - return &emit_R8G8_SINT; - case PIPE_FORMAT_R8G8B8_SINT: - return &emit_R8G8B8_SINT; - case PIPE_FORMAT_R8G8B8A8_SINT: - return &emit_R8G8B8A8_SINT; - - case PIPE_FORMAT_B10G10R10A2_UNORM: - return &emit_B10G10R10A2_UNORM; - case PIPE_FORMAT_B10G10R10A2_USCALED: - return &emit_B10G10R10A2_USCALED; - case PIPE_FORMAT_B10G10R10A2_SNORM: - return &emit_B10G10R10A2_SNORM; - case PIPE_FORMAT_B10G10R10A2_SSCALED: - return &emit_B10G10R10A2_SSCALED; - - case PIPE_FORMAT_R10G10B10A2_UNORM: - return &emit_R10G10B10A2_UNORM; - case PIPE_FORMAT_R10G10B10A2_USCALED: - return &emit_R10G10B10A2_USCALED; - case PIPE_FORMAT_R10G10B10A2_SNORM: - return &emit_R10G10B10A2_SNORM; - case PIPE_FORMAT_R10G10B10A2_SSCALED: - return &emit_R10G10B10A2_SSCALED; - - default: - assert(0); - return &emit_NULL; - } -} - -static ALWAYS_INLINE void PIPE_CDECL generic_run_one( struct translate_generic *tg, - unsigned elt, - unsigned instance_id, - void *vert ) -{ - unsigned nr_attrs = tg->nr_attrib; - unsigned attr; - - for (attr = 0; attr < nr_attrs; attr++) { - float data[4]; - uint8_t *dst = (uint8_t *)vert + tg->attrib[attr].output_offset; - - if (tg->attrib[attr].type == TRANSLATE_ELEMENT_NORMAL) { - const uint8_t *src; - unsigned index; - int copy_size; - - if (tg->attrib[attr].instance_divisor) { - index = instance_id / tg->attrib[attr].instance_divisor; - /* XXX we need to clamp the index here too, but to a - * per-array max value, not the draw->pt.max_index value - * that's being given to us via translate->set_buffer(). - */ - } - else { - index = elt; - /* clamp to avoid going out of bounds */ - index = MIN2(index, tg->attrib[attr].max_index); - } - - src = tg->attrib[attr].input_ptr + - tg->attrib[attr].input_stride * index; - - copy_size = tg->attrib[attr].copy_size; - if(likely(copy_size >= 0)) - memcpy(dst, src, copy_size); - else - { - tg->attrib[attr].fetch( data, src, 0, 0 ); - - if (0) - debug_printf("Fetch linear attr %d from %p stride %d index %d: " - " %f, %f, %f, %f \n", - attr, - tg->attrib[attr].input_ptr, - tg->attrib[attr].input_stride, - index, - data[0], data[1],data[2], data[3]); - - tg->attrib[attr].emit( data, dst ); - } - } else { - if(likely(tg->attrib[attr].copy_size >= 0)) - memcpy(data, &instance_id, 4); - else - { - data[0] = (float)instance_id; - tg->attrib[attr].emit( data, dst ); - } - } - } -} - -/** - * Fetch vertex attributes for 'count' vertices. - */ -static void PIPE_CDECL generic_run_elts( struct translate *translate, - const unsigned *elts, - unsigned count, - unsigned instance_id, - void *output_buffer ) -{ - struct translate_generic *tg = translate_generic(translate); - char *vert = output_buffer; - unsigned i; - - for (i = 0; i < count; i++) { - generic_run_one(tg, *elts++, instance_id, vert); - vert += tg->translate.key.output_stride; - } -} - -static void PIPE_CDECL generic_run_elts16( struct translate *translate, - const uint16_t *elts, - unsigned count, - unsigned instance_id, - void *output_buffer ) -{ - struct translate_generic *tg = translate_generic(translate); - char *vert = output_buffer; - unsigned i; - - for (i = 0; i < count; i++) { - generic_run_one(tg, *elts++, instance_id, vert); - vert += tg->translate.key.output_stride; - } -} - -static void PIPE_CDECL generic_run_elts8( struct translate *translate, - const uint8_t *elts, - unsigned count, - unsigned instance_id, - void *output_buffer ) -{ - struct translate_generic *tg = translate_generic(translate); - char *vert = output_buffer; - unsigned i; - - for (i = 0; i < count; i++) { - generic_run_one(tg, *elts++, instance_id, vert); - vert += tg->translate.key.output_stride; - } -} - -static void PIPE_CDECL generic_run( struct translate *translate, - unsigned start, - unsigned count, - unsigned instance_id, - void *output_buffer ) -{ - struct translate_generic *tg = translate_generic(translate); - char *vert = output_buffer; - unsigned i; - - for (i = 0; i < count; i++) { - generic_run_one(tg, start + i, instance_id, vert); - vert += tg->translate.key.output_stride; - } -} - - - -static void generic_set_buffer( struct translate *translate, - unsigned buf, - const void *ptr, - unsigned stride, - unsigned max_index ) -{ - struct translate_generic *tg = translate_generic(translate); - unsigned i; - - for (i = 0; i < tg->nr_attrib; i++) { - if (tg->attrib[i].buffer == buf) { - tg->attrib[i].input_ptr = ((const uint8_t *)ptr + - tg->attrib[i].input_offset); - tg->attrib[i].input_stride = stride; - tg->attrib[i].max_index = max_index; - } - } -} - - -static void generic_release( struct translate *translate ) -{ - /* Refcount? - */ - FREE(translate); -} - -static boolean -is_legal_int_format_combo( const struct util_format_description *src, - const struct util_format_description *dst ) -{ - unsigned i; - unsigned nr = MIN2(src->nr_channels, dst->nr_channels); - - for (i = 0; i < nr; i++) { - /* The signs must match. */ - if (src->channel[i].type != src->channel[i].type) { - return FALSE; - } - - /* Integers must not lose precision at any point in the pipeline. */ - if (src->channel[i].size > dst->channel[i].size) { - return FALSE; - } - } - return TRUE; -} - -struct translate *translate_generic_create( const struct translate_key *key ) -{ - struct translate_generic *tg = CALLOC_STRUCT(translate_generic); - unsigned i; - - if (tg == NULL) - return NULL; - - tg->translate.key = *key; - tg->translate.release = generic_release; - tg->translate.set_buffer = generic_set_buffer; - tg->translate.run_elts = generic_run_elts; - tg->translate.run_elts16 = generic_run_elts16; - tg->translate.run_elts8 = generic_run_elts8; - tg->translate.run = generic_run; - - for (i = 0; i < key->nr_elements; i++) { - const struct util_format_description *format_desc = - util_format_description(key->element[i].input_format); - - assert(format_desc); - assert(format_desc->fetch_rgba_float); - - tg->attrib[i].type = key->element[i].type; - - if (format_desc->channel[0].pure_integer) { - const struct util_format_description *out_format_desc = - util_format_description(key->element[i].output_format); - - if (!is_legal_int_format_combo(format_desc, out_format_desc)) { - FREE(tg); - return NULL; - } - - if (format_desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED) { - tg->attrib[i].fetch = (fetch_func)format_desc->fetch_rgba_sint; - } else { - tg->attrib[i].fetch = (fetch_func)format_desc->fetch_rgba_uint; - } - } else { - tg->attrib[i].fetch = (fetch_func)format_desc->fetch_rgba_float; - } - - tg->attrib[i].buffer = key->element[i].input_buffer; - tg->attrib[i].input_offset = key->element[i].input_offset; - tg->attrib[i].instance_divisor = key->element[i].instance_divisor; - - tg->attrib[i].output_offset = key->element[i].output_offset; - - tg->attrib[i].copy_size = -1; - if (tg->attrib[i].type == TRANSLATE_ELEMENT_INSTANCE_ID) - { - if(key->element[i].output_format == PIPE_FORMAT_R32_USCALED - || key->element[i].output_format == PIPE_FORMAT_R32_SSCALED) - tg->attrib[i].copy_size = 4; - } - else - { - if(key->element[i].input_format == key->element[i].output_format - && format_desc->block.width == 1 - && format_desc->block.height == 1 - && !(format_desc->block.bits & 7)) - tg->attrib[i].copy_size = format_desc->block.bits >> 3; - } - - if(tg->attrib[i].copy_size < 0) - tg->attrib[i].emit = get_emit_func(key->element[i].output_format); - else - tg->attrib[i].emit = NULL; - } - - tg->nr_attrib = key->nr_elements; - - - return &tg->translate; -} - -boolean translate_generic_is_output_format_supported(enum pipe_format format) -{ - switch(format) - { - case PIPE_FORMAT_R64G64B64A64_FLOAT: return TRUE; - case PIPE_FORMAT_R64G64B64_FLOAT: return TRUE; - case PIPE_FORMAT_R64G64_FLOAT: return TRUE; - case PIPE_FORMAT_R64_FLOAT: return TRUE; - - case PIPE_FORMAT_R32G32B32A32_FLOAT: return TRUE; - case PIPE_FORMAT_R32G32B32_FLOAT: return TRUE; - case PIPE_FORMAT_R32G32_FLOAT: return TRUE; - case PIPE_FORMAT_R32_FLOAT: return TRUE; - - case PIPE_FORMAT_R16G16B16A16_FLOAT: return TRUE; - case PIPE_FORMAT_R16G16B16_FLOAT: return TRUE; - case PIPE_FORMAT_R16G16_FLOAT: return TRUE; - case PIPE_FORMAT_R16_FLOAT: return TRUE; - - case PIPE_FORMAT_R32G32B32A32_USCALED: return TRUE; - case PIPE_FORMAT_R32G32B32_USCALED: return TRUE; - case PIPE_FORMAT_R32G32_USCALED: return TRUE; - case PIPE_FORMAT_R32_USCALED: return TRUE; - - case PIPE_FORMAT_R32G32B32A32_SSCALED: return TRUE; - case PIPE_FORMAT_R32G32B32_SSCALED: return TRUE; - case PIPE_FORMAT_R32G32_SSCALED: return TRUE; - case PIPE_FORMAT_R32_SSCALED: return TRUE; - - case PIPE_FORMAT_R32G32B32A32_UNORM: return TRUE; - case PIPE_FORMAT_R32G32B32_UNORM: return TRUE; - case PIPE_FORMAT_R32G32_UNORM: return TRUE; - case PIPE_FORMAT_R32_UNORM: return TRUE; - - case PIPE_FORMAT_R32G32B32A32_SNORM: return TRUE; - case PIPE_FORMAT_R32G32B32_SNORM: return TRUE; - case PIPE_FORMAT_R32G32_SNORM: return TRUE; - case PIPE_FORMAT_R32_SNORM: return TRUE; - - case PIPE_FORMAT_R16G16B16A16_USCALED: return TRUE; - case PIPE_FORMAT_R16G16B16_USCALED: return TRUE; - case PIPE_FORMAT_R16G16_USCALED: return TRUE; - case PIPE_FORMAT_R16_USCALED: return TRUE; - - case PIPE_FORMAT_R16G16B16A16_SSCALED: return TRUE; - case PIPE_FORMAT_R16G16B16_SSCALED: return TRUE; - case PIPE_FORMAT_R16G16_SSCALED: return TRUE; - case PIPE_FORMAT_R16_SSCALED: return TRUE; - - case PIPE_FORMAT_R16G16B16A16_UNORM: return TRUE; - case PIPE_FORMAT_R16G16B16_UNORM: return TRUE; - case PIPE_FORMAT_R16G16_UNORM: return TRUE; - case PIPE_FORMAT_R16_UNORM: return TRUE; - - case PIPE_FORMAT_R16G16B16A16_SNORM: return TRUE; - case PIPE_FORMAT_R16G16B16_SNORM: return TRUE; - case PIPE_FORMAT_R16G16_SNORM: return TRUE; - case PIPE_FORMAT_R16_SNORM: return TRUE; - - case PIPE_FORMAT_R8G8B8A8_USCALED: return TRUE; - case PIPE_FORMAT_R8G8B8_USCALED: return TRUE; - case PIPE_FORMAT_R8G8_USCALED: return TRUE; - case PIPE_FORMAT_R8_USCALED: return TRUE; - - case PIPE_FORMAT_R8G8B8A8_SSCALED: return TRUE; - case PIPE_FORMAT_R8G8B8_SSCALED: return TRUE; - case PIPE_FORMAT_R8G8_SSCALED: return TRUE; - case PIPE_FORMAT_R8_SSCALED: return TRUE; - - case PIPE_FORMAT_R8G8B8A8_UNORM: return TRUE; - case PIPE_FORMAT_R8G8B8_UNORM: return TRUE; - case PIPE_FORMAT_R8G8_UNORM: return TRUE; - case PIPE_FORMAT_R8_UNORM: return TRUE; - - case PIPE_FORMAT_R8G8B8A8_SNORM: return TRUE; - case PIPE_FORMAT_R8G8B8_SNORM: return TRUE; - case PIPE_FORMAT_R8G8_SNORM: return TRUE; - case PIPE_FORMAT_R8_SNORM: return TRUE; - - case PIPE_FORMAT_A8R8G8B8_UNORM: return TRUE; - case PIPE_FORMAT_B8G8R8A8_UNORM: return TRUE; - - case PIPE_FORMAT_R32G32B32A32_UINT: return TRUE; - case PIPE_FORMAT_R32G32B32_UINT: return TRUE; - case PIPE_FORMAT_R32G32_UINT: return TRUE; - case PIPE_FORMAT_R32_UINT: return TRUE; - - case PIPE_FORMAT_R16G16B16A16_UINT: return TRUE; - case PIPE_FORMAT_R16G16B16_UINT: return TRUE; - case PIPE_FORMAT_R16G16_UINT: return TRUE; - case PIPE_FORMAT_R16_UINT: return TRUE; - - case PIPE_FORMAT_R8G8B8A8_UINT: return TRUE; - case PIPE_FORMAT_R8G8B8_UINT: return TRUE; - case PIPE_FORMAT_R8G8_UINT: return TRUE; - case PIPE_FORMAT_R8_UINT: return TRUE; - - case PIPE_FORMAT_R32G32B32A32_SINT: return TRUE; - case PIPE_FORMAT_R32G32B32_SINT: return TRUE; - case PIPE_FORMAT_R32G32_SINT: return TRUE; - case PIPE_FORMAT_R32_SINT: return TRUE; - - case PIPE_FORMAT_R16G16B16A16_SINT: return TRUE; - case PIPE_FORMAT_R16G16B16_SINT: return TRUE; - case PIPE_FORMAT_R16G16_SINT: return TRUE; - case PIPE_FORMAT_R16_SINT: return TRUE; - - case PIPE_FORMAT_R8G8B8A8_SINT: return TRUE; - case PIPE_FORMAT_R8G8B8_SINT: return TRUE; - case PIPE_FORMAT_R8G8_SINT: return TRUE; - case PIPE_FORMAT_R8_SINT: return TRUE; - - case PIPE_FORMAT_B10G10R10A2_UNORM: return TRUE; - case PIPE_FORMAT_B10G10R10A2_USCALED: return TRUE; - case PIPE_FORMAT_B10G10R10A2_SNORM: return TRUE; - case PIPE_FORMAT_B10G10R10A2_SSCALED: return TRUE; - - case PIPE_FORMAT_R10G10B10A2_UNORM: return TRUE; - case PIPE_FORMAT_R10G10B10A2_USCALED: return TRUE; - case PIPE_FORMAT_R10G10B10A2_SNORM: return TRUE; - case PIPE_FORMAT_R10G10B10A2_SSCALED: return TRUE; - - default: return FALSE; - } -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/translate/translate_sse.c b/dll/opengl/mesa/src/gallium/auxiliary/translate/translate_sse.c deleted file mode 100644 index 54414ef077f..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/translate/translate_sse.c +++ /dev/null @@ -1,1551 +0,0 @@ -/* - * Copyright 2003 Tungsten Graphics, inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * TUNGSTEN GRAPHICS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Keith Whitwell - */ - - -#include "pipe/p_config.h" -#include "pipe/p_compiler.h" -#include "util/u_memory.h" -#include "util/u_math.h" -#include "util/u_format.h" - -#include "translate.h" - - -#if (defined(PIPE_ARCH_X86) || (defined(PIPE_ARCH_X86_64) && !defined(__MINGW32__))) && !defined(PIPE_SUBSYSTEM_EMBEDDED) - -#include "rtasm/rtasm_cpu.h" -#include "rtasm/rtasm_x86sse.h" - - -#define X 0 -#define Y 1 -#define Z 2 -#define W 3 - - -struct translate_buffer { - const void *base_ptr; - uintptr_t stride; - unsigned max_index; -}; - -struct translate_buffer_variant { - unsigned buffer_index; - unsigned instance_divisor; - void *ptr; /* updated either per vertex or per instance */ -}; - - -#define ELEMENT_BUFFER_INSTANCE_ID 1001 - -#define NUM_CONSTS 7 - -enum -{ - CONST_IDENTITY, - CONST_INV_127, - CONST_INV_255, - CONST_INV_32767, - CONST_INV_65535, - CONST_INV_2147483647, - CONST_255 -}; - -#define C(v) {(float)(v), (float)(v), (float)(v), (float)(v)} -static float consts[NUM_CONSTS][4] = { - {0, 0, 0, 1}, - C(1.0 / 127.0), - C(1.0 / 255.0), - C(1.0 / 32767.0), - C(1.0 / 65535.0), - C(1.0 / 2147483647.0), - C(255.0) -}; -#undef C - -struct translate_sse { - struct translate translate; - - struct x86_function linear_func; - struct x86_function elt_func; - struct x86_function elt16_func; - struct x86_function elt8_func; - struct x86_function *func; - - PIPE_ALIGN_VAR(16) float consts[NUM_CONSTS][4]; - int8_t reg_to_const[16]; - int8_t const_to_reg[NUM_CONSTS]; - - struct translate_buffer buffer[PIPE_MAX_ATTRIBS]; - unsigned nr_buffers; - - /* Multiple buffer variants can map to a single buffer. */ - struct translate_buffer_variant buffer_variant[PIPE_MAX_ATTRIBS]; - unsigned nr_buffer_variants; - - /* Multiple elements can map to a single buffer variant. */ - unsigned element_to_buffer_variant[PIPE_MAX_ATTRIBS]; - - boolean use_instancing; - unsigned instance_id; - - /* these are actually known values, but putting them in a struct - * like this is helpful to keep them in sync across the file. - */ - struct x86_reg tmp_EAX; - struct x86_reg tmp2_EDX; - struct x86_reg src_ECX; - struct x86_reg idx_ESI; /* either start+i or &elt[i] */ - struct x86_reg machine_EDI; - struct x86_reg outbuf_EBX; - struct x86_reg count_EBP; /* decrements to zero */ -}; - -static int get_offset( const void *a, const void *b ) -{ - return (const char *)b - (const char *)a; -} - -static struct x86_reg get_const( struct translate_sse *p, unsigned id) -{ - struct x86_reg reg; - unsigned i; - - if(p->const_to_reg[id] >= 0) - return x86_make_reg(file_XMM, p->const_to_reg[id]); - - for(i = 2; i < 8; ++i) - { - if(p->reg_to_const[i] < 0) - break; - } - - /* TODO: be smarter here */ - if(i == 8) - --i; - - reg = x86_make_reg(file_XMM, i); - - if(p->reg_to_const[i] >= 0) - p->const_to_reg[p->reg_to_const[i]] = -1; - - p->reg_to_const[i] = id; - p->const_to_reg[id] = i; - - /* TODO: this should happen outside the loop, if possible */ - sse_movaps(p->func, reg, - x86_make_disp(p->machine_EDI, - get_offset(p, &p->consts[id][0]))); - - return reg; -} - -/* load the data in a SSE2 register, padding with zeros */ -static boolean emit_load_sse2( struct translate_sse *p, - struct x86_reg data, - struct x86_reg src, - unsigned size) -{ - struct x86_reg tmpXMM = x86_make_reg(file_XMM, 1); - struct x86_reg tmp = p->tmp_EAX; - switch(size) - { - case 1: - x86_movzx8(p->func, tmp, src); - sse2_movd(p->func, data, tmp); - break; - case 2: - x86_movzx16(p->func, tmp, src); - sse2_movd(p->func, data, tmp); - break; - case 3: - x86_movzx8(p->func, tmp, x86_make_disp(src, 2)); - x86_shl_imm(p->func, tmp, 16); - x86_mov16(p->func, tmp, src); - sse2_movd(p->func, data, tmp); - break; - case 4: - sse2_movd(p->func, data, src); - break; - case 6: - sse2_movd(p->func, data, src); - x86_movzx16(p->func, tmp, x86_make_disp(src, 4)); - sse2_movd(p->func, tmpXMM, tmp); - sse2_punpckldq(p->func, data, tmpXMM); - break; - case 8: - sse2_movq(p->func, data, src); - break; - case 12: - sse2_movq(p->func, data, src); - sse2_movd(p->func, tmpXMM, x86_make_disp(src, 8)); - sse2_punpcklqdq(p->func, data, tmpXMM); - break; - case 16: - sse2_movdqu(p->func, data, src); - break; - default: - return FALSE; - } - return TRUE; -} - -/* this value can be passed for the out_chans argument */ -#define CHANNELS_0001 5 - -/* this function will load #chans float values, and will - * pad the register with zeroes at least up to out_chans. - * - * If out_chans is set to CHANNELS_0001, then the fourth - * value will be padded with 1. Only pass this value if - * chans < 4 or results are undefined. - */ -static void emit_load_float32( struct translate_sse *p, - struct x86_reg data, - struct x86_reg arg0, - unsigned out_chans, - unsigned chans) -{ - switch(chans) - { - case 1: - /* a 0 0 0 - * a 0 0 1 - */ - sse_movss(p->func, data, arg0); - if(out_chans == CHANNELS_0001) - sse_orps(p->func, data, get_const(p, CONST_IDENTITY) ); - break; - case 2: - /* 0 0 0 1 - * a b 0 1 - */ - if(out_chans == CHANNELS_0001) - sse_shufps(p->func, data, get_const(p, CONST_IDENTITY), SHUF(X, Y, Z, W) ); - else if(out_chans > 2) - sse_movlhps(p->func, data, get_const(p, CONST_IDENTITY) ); - sse_movlps(p->func, data, arg0); - break; - case 3: - /* Have to jump through some hoops: - * - * c 0 0 0 - * c 0 0 1 if out_chans == CHANNELS_0001 - * 0 0 c 0/1 - * a b c 0/1 - */ - sse_movss(p->func, data, x86_make_disp(arg0, 8)); - if(out_chans == CHANNELS_0001) - sse_shufps(p->func, data, get_const(p, CONST_IDENTITY), SHUF(X,Y,Z,W) ); - sse_shufps(p->func, data, data, SHUF(Y,Z,X,W) ); - sse_movlps(p->func, data, arg0); - break; - case 4: - sse_movups(p->func, data, arg0); - break; - } -} - -/* this function behaves like emit_load_float32, but loads - 64-bit floating point numbers, converting them to 32-bit - ones */ -static void emit_load_float64to32( struct translate_sse *p, - struct x86_reg data, - struct x86_reg arg0, - unsigned out_chans, - unsigned chans) -{ - struct x86_reg tmpXMM = x86_make_reg(file_XMM, 1); - switch(chans) - { - case 1: - sse2_movsd(p->func, data, arg0); - if(out_chans > 1) - sse2_cvtpd2ps(p->func, data, data); - else - sse2_cvtsd2ss(p->func, data, data); - if(out_chans == CHANNELS_0001) - sse_shufps(p->func, data, get_const(p, CONST_IDENTITY), SHUF(X, Y, Z, W) ); - break; - case 2: - sse2_movupd(p->func, data, arg0); - sse2_cvtpd2ps(p->func, data, data); - if(out_chans == CHANNELS_0001) - sse_shufps(p->func, data, get_const(p, CONST_IDENTITY), SHUF(X, Y, Z, W) ); - else if(out_chans > 2) - sse_movlhps(p->func, data, get_const(p, CONST_IDENTITY) ); - break; - case 3: - sse2_movupd(p->func, data, arg0); - sse2_cvtpd2ps(p->func, data, data); - sse2_movsd(p->func, tmpXMM, x86_make_disp(arg0, 16)); - if(out_chans > 3) - sse2_cvtpd2ps(p->func, tmpXMM, tmpXMM); - else - sse2_cvtsd2ss(p->func, tmpXMM, tmpXMM); - sse_movlhps(p->func, data, tmpXMM); - if(out_chans == CHANNELS_0001) - sse_orps(p->func, data, get_const(p, CONST_IDENTITY) ); - break; - case 4: - sse2_movupd(p->func, data, arg0); - sse2_cvtpd2ps(p->func, data, data); - sse2_movupd(p->func, tmpXMM, x86_make_disp(arg0, 16)); - sse2_cvtpd2ps(p->func, tmpXMM, tmpXMM); - sse_movlhps(p->func, data, tmpXMM); - break; - } -} - -static void emit_mov64(struct translate_sse *p, struct x86_reg dst_gpr, struct x86_reg dst_xmm, struct x86_reg src_gpr, struct x86_reg src_xmm) -{ - if(x86_target(p->func) != X86_32) - x64_mov64(p->func, dst_gpr, src_gpr); - else - { - /* TODO: when/on which CPUs is SSE2 actually better than SSE? */ - if(x86_target_caps(p->func) & X86_SSE2) - sse2_movq(p->func, dst_xmm, src_xmm); - else - sse_movlps(p->func, dst_xmm, src_xmm); - } -} - -static void emit_load64(struct translate_sse *p, struct x86_reg dst_gpr, struct x86_reg dst_xmm, struct x86_reg src) -{ - emit_mov64(p, dst_gpr, dst_xmm, src, src); -} - -static void emit_store64(struct translate_sse *p, struct x86_reg dst, struct x86_reg src_gpr, struct x86_reg src_xmm) -{ - emit_mov64(p, dst, dst, src_gpr, src_xmm); -} - -static void emit_mov128(struct translate_sse *p, struct x86_reg dst, struct x86_reg src) -{ - if(x86_target_caps(p->func) & X86_SSE2) - sse2_movdqu(p->func, dst, src); - else - sse_movups(p->func, dst, src); -} - -/* TODO: this uses unaligned accesses liberally, which is great on Nehalem, - * but may or may not be good on older processors - * TODO: may perhaps want to use non-temporal stores here if possible - */ -static void emit_memcpy(struct translate_sse *p, struct x86_reg dst, struct x86_reg src, unsigned size) -{ - struct x86_reg dataXMM = x86_make_reg(file_XMM, 0); - struct x86_reg dataXMM2 = x86_make_reg(file_XMM, 1); - struct x86_reg dataGPR = p->tmp_EAX; - struct x86_reg dataGPR2 = p->tmp2_EDX; - - if(size < 8) - { - switch (size) - { - case 1: - x86_mov8(p->func, dataGPR, src); - x86_mov8(p->func, dst, dataGPR); - break; - case 2: - x86_mov16(p->func, dataGPR, src); - x86_mov16(p->func, dst, dataGPR); - break; - case 3: - x86_mov16(p->func, dataGPR, src); - x86_mov8(p->func, dataGPR2, x86_make_disp(src, 2)); - x86_mov16(p->func, dst, dataGPR); - x86_mov8(p->func, x86_make_disp(dst, 2), dataGPR2); - break; - case 4: - x86_mov(p->func, dataGPR, src); - x86_mov(p->func, dst, dataGPR); - break; - case 6: - x86_mov(p->func, dataGPR, src); - x86_mov16(p->func, dataGPR2, x86_make_disp(src, 4)); - x86_mov(p->func, dst, dataGPR); - x86_mov16(p->func, x86_make_disp(dst, 4), dataGPR2); - break; - } - } - else if(!(x86_target_caps(p->func) & X86_SSE)) - { - unsigned i = 0; - assert((size & 3) == 0); - for(i = 0; i < size; i += 4) - { - x86_mov(p->func, dataGPR, x86_make_disp(src, i)); - x86_mov(p->func, x86_make_disp(dst, i), dataGPR); - } - } - else - { - switch(size) - { - case 8: - emit_load64(p, dataGPR, dataXMM, src); - emit_store64(p, dst, dataGPR, dataXMM); - break; - case 12: - emit_load64(p, dataGPR2, dataXMM, src); - x86_mov(p->func, dataGPR, x86_make_disp(src, 8)); - emit_store64(p, dst, dataGPR2, dataXMM); - x86_mov(p->func, x86_make_disp(dst, 8), dataGPR); - break; - case 16: - emit_mov128(p, dataXMM, src); - emit_mov128(p, dst, dataXMM); - break; - case 24: - emit_mov128(p, dataXMM, src); - emit_load64(p, dataGPR, dataXMM2, x86_make_disp(src, 16)); - emit_mov128(p, dst, dataXMM); - emit_store64(p, x86_make_disp(dst, 16), dataGPR, dataXMM2); - break; - case 32: - emit_mov128(p, dataXMM, src); - emit_mov128(p, dataXMM2, x86_make_disp(src, 16)); - emit_mov128(p, dst, dataXMM); - emit_mov128(p, x86_make_disp(dst, 16), dataXMM2); - break; - default: - assert(0); - } - } -} - -static boolean translate_attr_convert( struct translate_sse *p, - const struct translate_element *a, - struct x86_reg src, - struct x86_reg dst) - -{ - const struct util_format_description* input_desc = util_format_description(a->input_format); - const struct util_format_description* output_desc = util_format_description(a->output_format); - unsigned i; - boolean id_swizzle = TRUE; - unsigned swizzle[4] = {UTIL_FORMAT_SWIZZLE_NONE, UTIL_FORMAT_SWIZZLE_NONE, UTIL_FORMAT_SWIZZLE_NONE, UTIL_FORMAT_SWIZZLE_NONE}; - unsigned needed_chans = 0; - unsigned imms[2] = {0, 0x3f800000}; - - if(a->output_format == PIPE_FORMAT_NONE || a->input_format == PIPE_FORMAT_NONE) - return FALSE; - - if(input_desc->channel[0].size & 7) - return FALSE; - - if(input_desc->colorspace != output_desc->colorspace) - return FALSE; - - for(i = 1; i < input_desc->nr_channels; ++i) - { - if(memcmp(&input_desc->channel[i], &input_desc->channel[0], sizeof(input_desc->channel[0]))) - return FALSE; - } - - for(i = 1; i < output_desc->nr_channels; ++i) - { - if(memcmp(&output_desc->channel[i], &output_desc->channel[0], sizeof(output_desc->channel[0]))) - return FALSE; - } - - for(i = 0; i < output_desc->nr_channels; ++i) - { - if(output_desc->swizzle[i] < 4) - swizzle[output_desc->swizzle[i]] = input_desc->swizzle[i]; - } - - if((x86_target_caps(p->func) & X86_SSE) && (0 - || a->output_format == PIPE_FORMAT_R32_FLOAT - || a->output_format == PIPE_FORMAT_R32G32_FLOAT - || a->output_format == PIPE_FORMAT_R32G32B32_FLOAT - || a->output_format == PIPE_FORMAT_R32G32B32A32_FLOAT)) - { - struct x86_reg dataXMM = x86_make_reg(file_XMM, 0); - - for(i = 0; i < output_desc->nr_channels; ++i) - { - if(swizzle[i] == UTIL_FORMAT_SWIZZLE_0 && i >= input_desc->nr_channels) - swizzle[i] = i; - } - - for(i = 0; i < output_desc->nr_channels; ++i) - { - if(swizzle[i] < 4) - needed_chans = MAX2(needed_chans, swizzle[i] + 1); - if(swizzle[i] < UTIL_FORMAT_SWIZZLE_0 && swizzle[i] != i) - id_swizzle = FALSE; - } - - if(needed_chans > 0) - { - switch(input_desc->channel[0].type) - { - case UTIL_FORMAT_TYPE_UNSIGNED: - if(!(x86_target_caps(p->func) & X86_SSE2)) - return FALSE; - emit_load_sse2(p, dataXMM, src, input_desc->channel[0].size * input_desc->nr_channels >> 3); - - /* TODO: add support for SSE4.1 pmovzx */ - switch(input_desc->channel[0].size) - { - case 8: - /* TODO: this may be inefficient due to get_identity() being used both as a float and integer register */ - sse2_punpcklbw(p->func, dataXMM, get_const(p, CONST_IDENTITY)); - sse2_punpcklbw(p->func, dataXMM, get_const(p, CONST_IDENTITY)); - break; - case 16: - sse2_punpcklwd(p->func, dataXMM, get_const(p, CONST_IDENTITY)); - break; - case 32: /* we lose precision here */ - sse2_psrld_imm(p->func, dataXMM, 1); - break; - default: - return FALSE; - } - sse2_cvtdq2ps(p->func, dataXMM, dataXMM); - if(input_desc->channel[0].normalized) - { - struct x86_reg factor; - switch(input_desc->channel[0].size) - { - case 8: - factor = get_const(p, CONST_INV_255); - break; - case 16: - factor = get_const(p, CONST_INV_65535); - break; - case 32: - factor = get_const(p, CONST_INV_2147483647); - break; - default: - assert(0); - factor.disp = 0; - factor.file = 0; - factor.idx = 0; - factor.mod = 0; - break; - } - sse_mulps(p->func, dataXMM, factor); - } - else if(input_desc->channel[0].size == 32) - sse_addps(p->func, dataXMM, dataXMM); /* compensate for the bit we threw away to fit u32 into s32 */ - break; - case UTIL_FORMAT_TYPE_SIGNED: - if(!(x86_target_caps(p->func) & X86_SSE2)) - return FALSE; - emit_load_sse2(p, dataXMM, src, input_desc->channel[0].size * input_desc->nr_channels >> 3); - - /* TODO: add support for SSE4.1 pmovsx */ - switch(input_desc->channel[0].size) - { - case 8: - sse2_punpcklbw(p->func, dataXMM, dataXMM); - sse2_punpcklbw(p->func, dataXMM, dataXMM); - sse2_psrad_imm(p->func, dataXMM, 24); - break; - case 16: - sse2_punpcklwd(p->func, dataXMM, dataXMM); - sse2_psrad_imm(p->func, dataXMM, 16); - break; - case 32: /* we lose precision here */ - break; - default: - return FALSE; - } - sse2_cvtdq2ps(p->func, dataXMM, dataXMM); - if(input_desc->channel[0].normalized) - { - struct x86_reg factor; - switch(input_desc->channel[0].size) - { - case 8: - factor = get_const(p, CONST_INV_127); - break; - case 16: - factor = get_const(p, CONST_INV_32767); - break; - case 32: - factor = get_const(p, CONST_INV_2147483647); - break; - default: - assert(0); - factor.disp = 0; - factor.file = 0; - factor.idx = 0; - factor.mod = 0; - break; - } - sse_mulps(p->func, dataXMM, factor); - } - break; - - break; - case UTIL_FORMAT_TYPE_FLOAT: - if(input_desc->channel[0].size != 32 && input_desc->channel[0].size != 64) - return FALSE; - if(swizzle[3] == UTIL_FORMAT_SWIZZLE_1 && input_desc->nr_channels <= 3) - { - swizzle[3] = UTIL_FORMAT_SWIZZLE_W; - needed_chans = CHANNELS_0001; - } - switch(input_desc->channel[0].size) - { - case 32: - emit_load_float32(p, dataXMM, src, needed_chans, input_desc->nr_channels); - break; - case 64: /* we lose precision here */ - if(!(x86_target_caps(p->func) & X86_SSE2)) - return FALSE; - emit_load_float64to32(p, dataXMM, src, needed_chans, input_desc->nr_channels); - break; - default: - return FALSE; - } - break; - default: - return FALSE; - } - - if(!id_swizzle) - sse_shufps(p->func, dataXMM, dataXMM, SHUF(swizzle[0], swizzle[1], swizzle[2], swizzle[3]) ); - } - - if(output_desc->nr_channels >= 4 - && swizzle[0] < UTIL_FORMAT_SWIZZLE_0 - && swizzle[1] < UTIL_FORMAT_SWIZZLE_0 - && swizzle[2] < UTIL_FORMAT_SWIZZLE_0 - && swizzle[3] < UTIL_FORMAT_SWIZZLE_0 - ) - sse_movups(p->func, dst, dataXMM); - else - { - if(output_desc->nr_channels >= 2 - && swizzle[0] < UTIL_FORMAT_SWIZZLE_0 - && swizzle[1] < UTIL_FORMAT_SWIZZLE_0) - sse_movlps(p->func, dst, dataXMM); - else - { - if(swizzle[0] < UTIL_FORMAT_SWIZZLE_0) - sse_movss(p->func, dst, dataXMM); - else - x86_mov_imm(p->func, dst, imms[swizzle[0] - UTIL_FORMAT_SWIZZLE_0]); - - if(output_desc->nr_channels >= 2) - { - if(swizzle[1] < UTIL_FORMAT_SWIZZLE_0) - { - sse_shufps(p->func, dataXMM, dataXMM, SHUF(1, 1, 2, 3)); - sse_movss(p->func, x86_make_disp(dst, 4), dataXMM); - } - else - x86_mov_imm(p->func, x86_make_disp(dst, 4), imms[swizzle[1] - UTIL_FORMAT_SWIZZLE_0]); - } - } - - if(output_desc->nr_channels >= 3) - { - if(output_desc->nr_channels >= 4 - && swizzle[2] < UTIL_FORMAT_SWIZZLE_0 - && swizzle[3] < UTIL_FORMAT_SWIZZLE_0) - sse_movhps(p->func, x86_make_disp(dst, 8), dataXMM); - else - { - if(swizzle[2] < UTIL_FORMAT_SWIZZLE_0) - { - sse_shufps(p->func, dataXMM, dataXMM, SHUF(2, 2, 2, 3)); - sse_movss(p->func, x86_make_disp(dst, 8), dataXMM); - } - else - x86_mov_imm(p->func, x86_make_disp(dst, 8), imms[swizzle[2] - UTIL_FORMAT_SWIZZLE_0]); - - if(output_desc->nr_channels >= 4) - { - if(swizzle[3] < UTIL_FORMAT_SWIZZLE_0) - { - sse_shufps(p->func, dataXMM, dataXMM, SHUF(3, 3, 3, 3)); - sse_movss(p->func, x86_make_disp(dst, 12), dataXMM); - } - else - x86_mov_imm(p->func, x86_make_disp(dst, 12), imms[swizzle[3] - UTIL_FORMAT_SWIZZLE_0]); - } - } - } - } - return TRUE; - } - else if((x86_target_caps(p->func) & X86_SSE2) && input_desc->channel[0].size == 8 && output_desc->channel[0].size == 16 - && output_desc->channel[0].normalized == input_desc->channel[0].normalized - && (0 - || (input_desc->channel[0].type == UTIL_FORMAT_TYPE_UNSIGNED && output_desc->channel[0].type == UTIL_FORMAT_TYPE_UNSIGNED) - || (input_desc->channel[0].type == UTIL_FORMAT_TYPE_UNSIGNED && output_desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED) - || (input_desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED && output_desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED) - )) - { - struct x86_reg dataXMM = x86_make_reg(file_XMM, 0); - struct x86_reg tmpXMM = x86_make_reg(file_XMM, 1); - struct x86_reg tmp = p->tmp_EAX; - unsigned imms[2] = {0, 1}; - - for(i = 0; i < output_desc->nr_channels; ++i) - { - if(swizzle[i] == UTIL_FORMAT_SWIZZLE_0 && i >= input_desc->nr_channels) - swizzle[i] = i; - } - - for(i = 0; i < output_desc->nr_channels; ++i) - { - if(swizzle[i] < 4) - needed_chans = MAX2(needed_chans, swizzle[i] + 1); - if(swizzle[i] < UTIL_FORMAT_SWIZZLE_0 && swizzle[i] != i) - id_swizzle = FALSE; - } - - if(needed_chans > 0) - { - emit_load_sse2(p, dataXMM, src, input_desc->channel[0].size * input_desc->nr_channels >> 3); - - switch(input_desc->channel[0].type) - { - case UTIL_FORMAT_TYPE_UNSIGNED: - if(input_desc->channel[0].normalized) - { - sse2_punpcklbw(p->func, dataXMM, dataXMM); - if(output_desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED) - sse2_psrlw_imm(p->func, dataXMM, 1); - } - else - sse2_punpcklbw(p->func, dataXMM, get_const(p, CONST_IDENTITY)); - break; - case UTIL_FORMAT_TYPE_SIGNED: - if(input_desc->channel[0].normalized) - { - sse2_movq(p->func, tmpXMM, get_const(p, CONST_IDENTITY)); - sse2_punpcklbw(p->func, tmpXMM, dataXMM); - sse2_psllw_imm(p->func, dataXMM, 9); - sse2_psrlw_imm(p->func, dataXMM, 8); - sse2_por(p->func, tmpXMM, dataXMM); - sse2_psrlw_imm(p->func, dataXMM, 7); - sse2_por(p->func, tmpXMM, dataXMM); - { - struct x86_reg t = dataXMM; - dataXMM = tmpXMM; - tmpXMM = t; - } - } - else - { - sse2_punpcklbw(p->func, dataXMM, dataXMM); - sse2_psraw_imm(p->func, dataXMM, 8); - } - break; - default: - assert(0); - } - - if(output_desc->channel[0].normalized) - imms[1] = (output_desc->channel[0].type == UTIL_FORMAT_TYPE_UNSIGNED) ? 0xffff : 0x7ffff; - - if(!id_swizzle) - sse2_pshuflw(p->func, dataXMM, dataXMM, (swizzle[0] & 3) | ((swizzle[1] & 3) << 2) | ((swizzle[2] & 3) << 4) | ((swizzle[3] & 3) << 6)); - } - - if(output_desc->nr_channels >= 4 - && swizzle[0] < UTIL_FORMAT_SWIZZLE_0 - && swizzle[1] < UTIL_FORMAT_SWIZZLE_0 - && swizzle[2] < UTIL_FORMAT_SWIZZLE_0 - && swizzle[3] < UTIL_FORMAT_SWIZZLE_0 - ) - sse2_movq(p->func, dst, dataXMM); - else - { - if(swizzle[0] < UTIL_FORMAT_SWIZZLE_0) - { - if(output_desc->nr_channels >= 2 && swizzle[1] < UTIL_FORMAT_SWIZZLE_0) - sse2_movd(p->func, dst, dataXMM); - else - { - sse2_movd(p->func, tmp, dataXMM); - x86_mov16(p->func, dst, tmp); - if(output_desc->nr_channels >= 2) - x86_mov16_imm(p->func, x86_make_disp(dst, 2), imms[swizzle[1] - UTIL_FORMAT_SWIZZLE_0]); - } - } - else - { - if(output_desc->nr_channels >= 2 && swizzle[1] >= UTIL_FORMAT_SWIZZLE_0) - x86_mov_imm(p->func, dst, (imms[swizzle[1] - UTIL_FORMAT_SWIZZLE_0] << 16) | imms[swizzle[0] - UTIL_FORMAT_SWIZZLE_0]); - else - { - x86_mov16_imm(p->func, dst, imms[swizzle[0] - UTIL_FORMAT_SWIZZLE_0]); - if(output_desc->nr_channels >= 2) - { - sse2_movd(p->func, tmp, dataXMM); - x86_shr_imm(p->func, tmp, 16); - x86_mov16(p->func, x86_make_disp(dst, 2), tmp); - } - } - } - - if(output_desc->nr_channels >= 3) - { - if(swizzle[2] < UTIL_FORMAT_SWIZZLE_0) - { - if(output_desc->nr_channels >= 4 && swizzle[3] < UTIL_FORMAT_SWIZZLE_0) - { - sse2_psrlq_imm(p->func, dataXMM, 32); - sse2_movd(p->func, x86_make_disp(dst, 4), dataXMM); - } - else - { - sse2_psrlq_imm(p->func, dataXMM, 32); - sse2_movd(p->func, tmp, dataXMM); - x86_mov16(p->func, x86_make_disp(dst, 4), tmp); - if(output_desc->nr_channels >= 4) - { - x86_mov16_imm(p->func, x86_make_disp(dst, 6), imms[swizzle[3] - UTIL_FORMAT_SWIZZLE_0]); - } - } - } - else - { - if(output_desc->nr_channels >= 4 && swizzle[3] >= UTIL_FORMAT_SWIZZLE_0) - x86_mov_imm(p->func, x86_make_disp(dst, 4), (imms[swizzle[3] - UTIL_FORMAT_SWIZZLE_0] << 16) | imms[swizzle[2] - UTIL_FORMAT_SWIZZLE_0]); - else - { - x86_mov16_imm(p->func, x86_make_disp(dst, 4), imms[swizzle[2] - UTIL_FORMAT_SWIZZLE_0]); - - if(output_desc->nr_channels >= 4) - { - sse2_psrlq_imm(p->func, dataXMM, 48); - sse2_movd(p->func, tmp, dataXMM); - x86_mov16(p->func, x86_make_disp(dst, 6), tmp); - } - } - } - } - } - return TRUE; - } - else if(!memcmp(&output_desc->channel[0], &input_desc->channel[0], sizeof(output_desc->channel[0]))) - { - struct x86_reg tmp = p->tmp_EAX; - unsigned i; - if(input_desc->channel[0].size == 8 && input_desc->nr_channels == 4 && output_desc->nr_channels == 4 - && swizzle[0] == UTIL_FORMAT_SWIZZLE_W - && swizzle[1] == UTIL_FORMAT_SWIZZLE_Z - && swizzle[2] == UTIL_FORMAT_SWIZZLE_Y - && swizzle[3] == UTIL_FORMAT_SWIZZLE_X) - { - /* TODO: support movbe */ - x86_mov(p->func, tmp, src); - x86_bswap(p->func, tmp); - x86_mov(p->func, dst, tmp); - return TRUE; - } - - for(i = 0; i < output_desc->nr_channels; ++i) - { - switch(output_desc->channel[0].size) - { - case 8: - if(swizzle[i] >= UTIL_FORMAT_SWIZZLE_0) - { - unsigned v = 0; - if(swizzle[i] == UTIL_FORMAT_SWIZZLE_1) - { - switch(output_desc->channel[0].type) - { - case UTIL_FORMAT_TYPE_UNSIGNED: - v = output_desc->channel[0].normalized ? 0xff : 1; - break; - case UTIL_FORMAT_TYPE_SIGNED: - v = output_desc->channel[0].normalized ? 0x7f : 1; - break; - default: - return FALSE; - } - } - x86_mov8_imm(p->func, x86_make_disp(dst, i * 1), v); - } - else - { - x86_mov8(p->func, tmp, x86_make_disp(src, swizzle[i] * 1)); - x86_mov8(p->func, x86_make_disp(dst, i * 1), tmp); - } - break; - case 16: - if(swizzle[i] >= UTIL_FORMAT_SWIZZLE_0) - { - unsigned v = 0; - if(swizzle[i] == UTIL_FORMAT_SWIZZLE_1) - { - switch(output_desc->channel[1].type) - { - case UTIL_FORMAT_TYPE_UNSIGNED: - v = output_desc->channel[1].normalized ? 0xffff : 1; - break; - case UTIL_FORMAT_TYPE_SIGNED: - v = output_desc->channel[1].normalized ? 0x7fff : 1; - break; - case UTIL_FORMAT_TYPE_FLOAT: - v = 0x3c00; - break; - default: - return FALSE; - } - } - x86_mov16_imm(p->func, x86_make_disp(dst, i * 2), v); - } - else if(swizzle[i] == UTIL_FORMAT_SWIZZLE_0) - x86_mov16_imm(p->func, x86_make_disp(dst, i * 2), 0); - else - { - x86_mov16(p->func, tmp, x86_make_disp(src, swizzle[i] * 2)); - x86_mov16(p->func, x86_make_disp(dst, i * 2), tmp); - } - break; - case 32: - if(swizzle[i] >= UTIL_FORMAT_SWIZZLE_0) - { - unsigned v = 0; - if(swizzle[i] == UTIL_FORMAT_SWIZZLE_1) - { - switch(output_desc->channel[1].type) - { - case UTIL_FORMAT_TYPE_UNSIGNED: - v = output_desc->channel[1].normalized ? 0xffffffff : 1; - break; - case UTIL_FORMAT_TYPE_SIGNED: - v = output_desc->channel[1].normalized ? 0x7fffffff : 1; - break; - case UTIL_FORMAT_TYPE_FLOAT: - v = 0x3f800000; - break; - default: - return FALSE; - } - } - x86_mov_imm(p->func, x86_make_disp(dst, i * 4), v); - } - else - { - x86_mov(p->func, tmp, x86_make_disp(src, swizzle[i] * 4)); - x86_mov(p->func, x86_make_disp(dst, i * 4), tmp); - } - break; - case 64: - if(swizzle[i] >= UTIL_FORMAT_SWIZZLE_0) - { - unsigned l = 0; - unsigned h = 0; - if(swizzle[i] == UTIL_FORMAT_SWIZZLE_1) - { - switch(output_desc->channel[1].type) - { - case UTIL_FORMAT_TYPE_UNSIGNED: - h = output_desc->channel[1].normalized ? 0xffffffff : 0; - l = output_desc->channel[1].normalized ? 0xffffffff : 1; - break; - case UTIL_FORMAT_TYPE_SIGNED: - h = output_desc->channel[1].normalized ? 0x7fffffff : 0; - l = output_desc->channel[1].normalized ? 0xffffffff : 1; - break; - case UTIL_FORMAT_TYPE_FLOAT: - h = 0x3ff00000; - l = 0; - break; - default: - return FALSE; - } - } - x86_mov_imm(p->func, x86_make_disp(dst, i * 8), l); - x86_mov_imm(p->func, x86_make_disp(dst, i * 8 + 4), h); - } - else - { - if(x86_target_caps(p->func) & X86_SSE) - { - struct x86_reg tmpXMM = x86_make_reg(file_XMM, 0); - emit_load64(p, tmp, tmpXMM, x86_make_disp(src, swizzle[i] * 8)); - emit_store64(p, x86_make_disp(dst, i * 8), tmp, tmpXMM); - } - else - { - x86_mov(p->func, tmp, x86_make_disp(src, swizzle[i] * 8)); - x86_mov(p->func, x86_make_disp(dst, i * 8), tmp); - x86_mov(p->func, tmp, x86_make_disp(src, swizzle[i] * 8 + 4)); - x86_mov(p->func, x86_make_disp(dst, i * 8 + 4), tmp); - } - } - break; - default: - return FALSE; - } - } - return TRUE; - } - /* special case for draw's EMIT_4UB (RGBA) and EMIT_4UB_BGRA */ - else if((x86_target_caps(p->func) & X86_SSE2) && - a->input_format == PIPE_FORMAT_R32G32B32A32_FLOAT && (0 - || a->output_format == PIPE_FORMAT_B8G8R8A8_UNORM - || a->output_format == PIPE_FORMAT_R8G8B8A8_UNORM - )) - { - struct x86_reg dataXMM = x86_make_reg(file_XMM, 0); - - /* load */ - sse_movups(p->func, dataXMM, src); - - if (a->output_format == PIPE_FORMAT_B8G8R8A8_UNORM) - sse_shufps(p->func, dataXMM, dataXMM, SHUF(2,1,0,3)); - - /* scale by 255.0 */ - sse_mulps(p->func, dataXMM, get_const(p, CONST_255)); - - /* pack and emit */ - sse2_cvtps2dq(p->func, dataXMM, dataXMM); - sse2_packssdw(p->func, dataXMM, dataXMM); - sse2_packuswb(p->func, dataXMM, dataXMM); - sse2_movd(p->func, dst, dataXMM); - - return TRUE; - } - - return FALSE; -} - -static boolean translate_attr( struct translate_sse *p, - const struct translate_element *a, - struct x86_reg src, - struct x86_reg dst) -{ - if(a->input_format == a->output_format) - { - emit_memcpy(p, dst, src, util_format_get_stride(a->input_format, 1)); - return TRUE; - } - - return translate_attr_convert(p, a, src, dst); -} - -static boolean init_inputs( struct translate_sse *p, - unsigned index_size ) -{ - unsigned i; - struct x86_reg instance_id = x86_make_disp(p->machine_EDI, - get_offset(p, &p->instance_id)); - - for (i = 0; i < p->nr_buffer_variants; i++) { - struct translate_buffer_variant *variant = &p->buffer_variant[i]; - struct translate_buffer *buffer = &p->buffer[variant->buffer_index]; - - if (!index_size || variant->instance_divisor) { - struct x86_reg buf_max_index = x86_make_disp(p->machine_EDI, - get_offset(p, &buffer->max_index)); - struct x86_reg buf_stride = x86_make_disp(p->machine_EDI, - get_offset(p, &buffer->stride)); - struct x86_reg buf_ptr = x86_make_disp(p->machine_EDI, - get_offset(p, &variant->ptr)); - struct x86_reg buf_base_ptr = x86_make_disp(p->machine_EDI, - get_offset(p, &buffer->base_ptr)); - struct x86_reg elt = p->idx_ESI; - struct x86_reg tmp_EAX = p->tmp_EAX; - - /* Calculate pointer to first attrib: - * base_ptr + stride * index, where index depends on instance divisor - */ - if (variant->instance_divisor) { - /* Our index is instance ID divided by instance divisor. - */ - x86_mov(p->func, tmp_EAX, instance_id); - - if (variant->instance_divisor != 1) { - struct x86_reg tmp_EDX = p->tmp2_EDX; - struct x86_reg tmp_ECX = p->src_ECX; - - /* TODO: Add x86_shr() to rtasm and use it whenever - * instance divisor is power of two. - */ - - x86_xor(p->func, tmp_EDX, tmp_EDX); - x86_mov_reg_imm(p->func, tmp_ECX, variant->instance_divisor); - x86_div(p->func, tmp_ECX); /* EAX = EDX:EAX / ECX */ - } - - /* XXX we need to clamp the index here too, but to a - * per-array max value, not the draw->pt.max_index value - * that's being given to us via translate->set_buffer(). - */ - } else { - x86_mov(p->func, tmp_EAX, elt); - - /* Clamp to max_index - */ - x86_cmp(p->func, tmp_EAX, buf_max_index); - x86_cmovcc(p->func, tmp_EAX, buf_max_index, cc_AE); - } - - x86_imul(p->func, tmp_EAX, buf_stride); - x64_rexw(p->func); - x86_add(p->func, tmp_EAX, buf_base_ptr); - - x86_cmp(p->func, p->count_EBP, p->tmp_EAX); - - /* In the linear case, keep the buffer pointer instead of the - * index number. - */ - if (!index_size && p->nr_buffer_variants == 1) - { - x64_rexw(p->func); - x86_mov(p->func, elt, tmp_EAX); - } - else - { - x64_rexw(p->func); - x86_mov(p->func, buf_ptr, tmp_EAX); - } - } - } - - return TRUE; -} - - -static struct x86_reg get_buffer_ptr( struct translate_sse *p, - unsigned index_size, - unsigned var_idx, - struct x86_reg elt ) -{ - if (var_idx == ELEMENT_BUFFER_INSTANCE_ID) { - return x86_make_disp(p->machine_EDI, - get_offset(p, &p->instance_id)); - } - if (!index_size && p->nr_buffer_variants == 1) { - return p->idx_ESI; - } - else if (!index_size || p->buffer_variant[var_idx].instance_divisor) { - struct x86_reg ptr = p->src_ECX; - struct x86_reg buf_ptr = - x86_make_disp(p->machine_EDI, - get_offset(p, &p->buffer_variant[var_idx].ptr)); - - x64_rexw(p->func); - x86_mov(p->func, ptr, buf_ptr); - return ptr; - } - else { - struct x86_reg ptr = p->src_ECX; - const struct translate_buffer_variant *variant = &p->buffer_variant[var_idx]; - - struct x86_reg buf_stride = - x86_make_disp(p->machine_EDI, - get_offset(p, &p->buffer[variant->buffer_index].stride)); - - struct x86_reg buf_base_ptr = - x86_make_disp(p->machine_EDI, - get_offset(p, &p->buffer[variant->buffer_index].base_ptr)); - - struct x86_reg buf_max_index = - x86_make_disp(p->machine_EDI, - get_offset(p, &p->buffer[variant->buffer_index].max_index)); - - - - /* Calculate pointer to current attrib: - */ - switch(index_size) - { - case 1: - x86_movzx8(p->func, ptr, elt); - break; - case 2: - x86_movzx16(p->func, ptr, elt); - break; - case 4: - x86_mov(p->func, ptr, elt); - break; - } - - /* Clamp to max_index - */ - x86_cmp(p->func, ptr, buf_max_index); - x86_cmovcc(p->func, ptr, buf_max_index, cc_AE); - - x86_imul(p->func, ptr, buf_stride); - x64_rexw(p->func); - x86_add(p->func, ptr, buf_base_ptr); - return ptr; - } -} - - - -static boolean incr_inputs( struct translate_sse *p, - unsigned index_size ) -{ - if (!index_size && p->nr_buffer_variants == 1) { - struct x86_reg stride = x86_make_disp(p->machine_EDI, - get_offset(p, &p->buffer[0].stride)); - - if (p->buffer_variant[0].instance_divisor == 0) { - x64_rexw(p->func); - x86_add(p->func, p->idx_ESI, stride); - sse_prefetchnta(p->func, x86_make_disp(p->idx_ESI, 192)); - } - } - else if (!index_size) { - unsigned i; - - /* Is this worthwhile?? - */ - for (i = 0; i < p->nr_buffer_variants; i++) { - struct translate_buffer_variant *variant = &p->buffer_variant[i]; - struct x86_reg buf_ptr = x86_make_disp(p->machine_EDI, - get_offset(p, &variant->ptr)); - struct x86_reg buf_stride = x86_make_disp(p->machine_EDI, - get_offset(p, &p->buffer[variant->buffer_index].stride)); - - if (variant->instance_divisor == 0) { - x86_mov(p->func, p->tmp_EAX, buf_stride); - x64_rexw(p->func); - x86_add(p->func, p->tmp_EAX, buf_ptr); - if (i == 0) sse_prefetchnta(p->func, x86_make_disp(p->tmp_EAX, 192)); - x64_rexw(p->func); - x86_mov(p->func, buf_ptr, p->tmp_EAX); - } - } - } - else { - x64_rexw(p->func); - x86_lea(p->func, p->idx_ESI, x86_make_disp(p->idx_ESI, index_size)); - } - - return TRUE; -} - - -/* Build run( struct translate *machine, - * unsigned start, - * unsigned count, - * void *output_buffer ) - * or - * run_elts( struct translate *machine, - * unsigned *elts, - * unsigned count, - * void *output_buffer ) - * - * Lots of hardcoding - * - * EAX -- pointer to current output vertex - * ECX -- pointer to current attribute - * - */ -static boolean build_vertex_emit( struct translate_sse *p, - struct x86_function *func, - unsigned index_size ) -{ - int fixup, label; - unsigned j; - - memset(p->reg_to_const, 0xff, sizeof(p->reg_to_const)); - memset(p->const_to_reg, 0xff, sizeof(p->const_to_reg)); - - p->tmp_EAX = x86_make_reg(file_REG32, reg_AX); - p->idx_ESI = x86_make_reg(file_REG32, reg_SI); - p->outbuf_EBX = x86_make_reg(file_REG32, reg_BX); - p->machine_EDI = x86_make_reg(file_REG32, reg_DI); - p->count_EBP = x86_make_reg(file_REG32, reg_BP); - p->tmp2_EDX = x86_make_reg(file_REG32, reg_DX); - p->src_ECX = x86_make_reg(file_REG32, reg_CX); - - p->func = func; - - x86_init_func(p->func); - - if(x86_target(p->func) == X86_64_WIN64_ABI) - { - /* the ABI guarantees a 16-byte aligned 32-byte "shadow space" above the return address */ - sse2_movdqa(p->func, x86_make_disp(x86_make_reg(file_REG32, reg_SP), 8), x86_make_reg(file_XMM, 6)); - sse2_movdqa(p->func, x86_make_disp(x86_make_reg(file_REG32, reg_SP), 24), x86_make_reg(file_XMM, 7)); - } - - x86_push(p->func, p->outbuf_EBX); - x86_push(p->func, p->count_EBP); - -/* on non-Win64 x86-64, these are already in the right registers */ - if(x86_target(p->func) != X86_64_STD_ABI) - { - x86_push(p->func, p->machine_EDI); - x86_push(p->func, p->idx_ESI); - - x86_mov(p->func, p->machine_EDI, x86_fn_arg(p->func, 1)); - x86_mov(p->func, p->idx_ESI, x86_fn_arg(p->func, 2)); - } - - x86_mov(p->func, p->count_EBP, x86_fn_arg(p->func, 3)); - - if(x86_target(p->func) != X86_32) - x64_mov64(p->func, p->outbuf_EBX, x86_fn_arg(p->func, 5)); - else - x86_mov(p->func, p->outbuf_EBX, x86_fn_arg(p->func, 5)); - - /* Load instance ID. - */ - if (p->use_instancing) { - x86_mov(p->func, - p->tmp_EAX, - x86_fn_arg(p->func, 4)); - x86_mov(p->func, - x86_make_disp(p->machine_EDI, get_offset(p, &p->instance_id)), - p->tmp_EAX); - } - - /* Get vertex count, compare to zero - */ - x86_xor(p->func, p->tmp_EAX, p->tmp_EAX); - x86_cmp(p->func, p->count_EBP, p->tmp_EAX); - fixup = x86_jcc_forward(p->func, cc_E); - - /* always load, needed or not: - */ - init_inputs(p, index_size); - - /* Note address for loop jump - */ - label = x86_get_label(p->func); - { - struct x86_reg elt = !index_size ? p->idx_ESI : x86_deref(p->idx_ESI); - int last_variant = -1; - struct x86_reg vb; - - for (j = 0; j < p->translate.key.nr_elements; j++) { - const struct translate_element *a = &p->translate.key.element[j]; - unsigned variant = p->element_to_buffer_variant[j]; - - /* Figure out source pointer address: - */ - if (variant != last_variant) { - last_variant = variant; - vb = get_buffer_ptr(p, index_size, variant, elt); - } - - if (!translate_attr( p, a, - x86_make_disp(vb, a->input_offset), - x86_make_disp(p->outbuf_EBX, a->output_offset))) - return FALSE; - } - - /* Next output vertex: - */ - x64_rexw(p->func); - x86_lea(p->func, - p->outbuf_EBX, - x86_make_disp(p->outbuf_EBX, - p->translate.key.output_stride)); - - /* Incr index - */ - incr_inputs( p, index_size ); - } - - /* decr count, loop if not zero - */ - x86_dec(p->func, p->count_EBP); - x86_jcc(p->func, cc_NZ, label); - - /* Exit mmx state? - */ - if (p->func->need_emms) - mmx_emms(p->func); - - /* Land forward jump here: - */ - x86_fixup_fwd_jump(p->func, fixup); - - /* Pop regs and return - */ - - if(x86_target(p->func) != X86_64_STD_ABI) - { - x86_pop(p->func, p->idx_ESI); - x86_pop(p->func, p->machine_EDI); - } - - x86_pop(p->func, p->count_EBP); - x86_pop(p->func, p->outbuf_EBX); - - if(x86_target(p->func) == X86_64_WIN64_ABI) - { - sse2_movdqa(p->func, x86_make_reg(file_XMM, 6), x86_make_disp(x86_make_reg(file_REG32, reg_SP), 8)); - sse2_movdqa(p->func, x86_make_reg(file_XMM, 7), x86_make_disp(x86_make_reg(file_REG32, reg_SP), 24)); - } - x86_ret(p->func); - - return TRUE; -} - - - - - - - -static void translate_sse_set_buffer( struct translate *translate, - unsigned buf, - const void *ptr, - unsigned stride, - unsigned max_index ) -{ - struct translate_sse *p = (struct translate_sse *)translate; - - if (buf < p->nr_buffers) { - p->buffer[buf].base_ptr = (char *)ptr; - p->buffer[buf].stride = stride; - p->buffer[buf].max_index = max_index; - } - - if (0) debug_printf("%s %d/%d: %p %d\n", - __FUNCTION__, buf, - p->nr_buffers, - ptr, stride); -} - - -static void translate_sse_release( struct translate *translate ) -{ - struct translate_sse *p = (struct translate_sse *)translate; - - x86_release_func( &p->linear_func ); - x86_release_func( &p->elt_func ); - - os_free_aligned(p); -} - - -struct translate *translate_sse2_create( const struct translate_key *key ) -{ - struct translate_sse *p = NULL; - unsigned i; - - /* this is misnamed, it actually refers to whether rtasm is enabled or not */ - if (!rtasm_cpu_has_sse()) - goto fail; - - p = os_malloc_aligned(sizeof(struct translate_sse), 16); - if (p == NULL) - goto fail; - memset(p, 0, sizeof(*p)); - memcpy(p->consts, consts, sizeof(consts)); - - p->translate.key = *key; - p->translate.release = translate_sse_release; - p->translate.set_buffer = translate_sse_set_buffer; - - for (i = 0; i < key->nr_elements; i++) { - if (key->element[i].type == TRANSLATE_ELEMENT_NORMAL) { - unsigned j; - - p->nr_buffers = MAX2(p->nr_buffers, key->element[i].input_buffer + 1); - - if (key->element[i].instance_divisor) { - p->use_instancing = TRUE; - } - - /* - * Map vertex element to vertex buffer variant. - */ - for (j = 0; j < p->nr_buffer_variants; j++) { - if (p->buffer_variant[j].buffer_index == key->element[i].input_buffer && - p->buffer_variant[j].instance_divisor == key->element[i].instance_divisor) { - break; - } - } - if (j == p->nr_buffer_variants) { - p->buffer_variant[j].buffer_index = key->element[i].input_buffer; - p->buffer_variant[j].instance_divisor = key->element[i].instance_divisor; - p->nr_buffer_variants++; - } - p->element_to_buffer_variant[i] = j; - } else { - assert(key->element[i].type == TRANSLATE_ELEMENT_INSTANCE_ID); - - p->element_to_buffer_variant[i] = ELEMENT_BUFFER_INSTANCE_ID; - } - } - - if (0) debug_printf("nr_buffers: %d\n", p->nr_buffers); - - if (!build_vertex_emit(p, &p->linear_func, 0)) - goto fail; - - if (!build_vertex_emit(p, &p->elt_func, 4)) - goto fail; - - if (!build_vertex_emit(p, &p->elt16_func, 2)) - goto fail; - - if (!build_vertex_emit(p, &p->elt8_func, 1)) - goto fail; - - p->translate.run = (run_func) x86_get_func(&p->linear_func); - if (p->translate.run == NULL) - goto fail; - - p->translate.run_elts = (run_elts_func) x86_get_func(&p->elt_func); - if (p->translate.run_elts == NULL) - goto fail; - - p->translate.run_elts16 = (run_elts16_func) x86_get_func(&p->elt16_func); - if (p->translate.run_elts16 == NULL) - goto fail; - - p->translate.run_elts8 = (run_elts8_func) x86_get_func(&p->elt8_func); - if (p->translate.run_elts8 == NULL) - goto fail; - - return &p->translate; - - fail: - if (p) - translate_sse_release( &p->translate ); - - return NULL; -} - - - -#else - -struct translate *translate_sse2_create( const struct translate_key *key ) -{ - return NULL; -} - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/dbghelp.h b/dll/opengl/mesa/src/gallium/auxiliary/util/dbghelp.h deleted file mode 100644 index bc7c53cf9f2..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/dbghelp.h +++ /dev/null @@ -1,1265 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the w64 mingw-runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ -#ifndef _DBGHELP_ -#define _DBGHELP_ - -#ifdef _WIN64 -#ifndef _IMAGEHLP64 -#define _IMAGEHLP64 -#endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#define IMAGEAPI DECLSPEC_IMPORT WINAPI -#define DBHLP_DEPRECIATED __declspec(deprecated) - -#define DBHLPAPI IMAGEAPI - -#define IMAGE_SEPARATION (64*1024) - - typedef struct _LOADED_IMAGE { - PSTR ModuleName; - HANDLE hFile; - PUCHAR MappedAddress; -#ifdef _IMAGEHLP64 - PIMAGE_NT_HEADERS64 FileHeader; -#else - PIMAGE_NT_HEADERS32 FileHeader; -#endif - PIMAGE_SECTION_HEADER LastRvaSection; - ULONG NumberOfSections; - PIMAGE_SECTION_HEADER Sections; - ULONG Characteristics; - BOOLEAN fSystemImage; - BOOLEAN fDOSImage; - LIST_ENTRY Links; - ULONG SizeOfImage; - } LOADED_IMAGE,*PLOADED_IMAGE; - -#define MAX_SYM_NAME 2000 - - typedef BOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACK)(HANDLE FileHandle,PSTR FileName,PVOID CallerData); - typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACK)(PSTR filename,PVOID context); - typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACK)(HANDLE FileHandle,PSTR FileName,PVOID CallerData); - - typedef BOOL (WINAPI *PSYMBOLSERVERPROC)(LPCSTR,LPCSTR,PVOID,DWORD,DWORD,LPSTR); - typedef BOOL (WINAPI *PSYMBOLSERVEROPENPROC)(VOID); - typedef BOOL (WINAPI *PSYMBOLSERVERCLOSEPROC)(VOID); - typedef BOOL (WINAPI *PSYMBOLSERVERSETOPTIONSPROC)(UINT_PTR,ULONG64); - typedef BOOL (CALLBACK WINAPI *PSYMBOLSERVERCALLBACKPROC)(UINT_PTR action,ULONG64 data,ULONG64 context); - typedef UINT_PTR (WINAPI *PSYMBOLSERVERGETOPTIONSPROC)(); - typedef BOOL (WINAPI *PSYMBOLSERVERPINGPROC)(LPCSTR); - - HANDLE IMAGEAPI FindDebugInfoFile(PSTR FileName,PSTR SymbolPath,PSTR DebugFilePath); - HANDLE IMAGEAPI FindDebugInfoFileEx(PSTR FileName,PSTR SymbolPath,PSTR DebugFilePath,PFIND_DEBUG_FILE_CALLBACK Callback,PVOID CallerData); - BOOL IMAGEAPI SymFindFileInPath(HANDLE hprocess,LPSTR SearchPath,LPSTR FileName,PVOID id,DWORD two,DWORD three,DWORD flags,LPSTR FoundFile,PFINDFILEINPATHCALLBACK callback,PVOID context); - HANDLE IMAGEAPI FindExecutableImage(PSTR FileName,PSTR SymbolPath,PSTR ImageFilePath); - HANDLE IMAGEAPI FindExecutableImageEx(PSTR FileName,PSTR SymbolPath,PSTR ImageFilePath,PFIND_EXE_FILE_CALLBACK Callback,PVOID CallerData); - PIMAGE_NT_HEADERS IMAGEAPI ImageNtHeader(PVOID Base); - PVOID IMAGEAPI ImageDirectoryEntryToDataEx(PVOID Base,BOOLEAN MappedAsImage,USHORT DirectoryEntry,PULONG Size,PIMAGE_SECTION_HEADER *FoundHeader); - PVOID IMAGEAPI ImageDirectoryEntryToData(PVOID Base,BOOLEAN MappedAsImage,USHORT DirectoryEntry,PULONG Size); - PIMAGE_SECTION_HEADER IMAGEAPI ImageRvaToSection(PIMAGE_NT_HEADERS NtHeaders,PVOID Base,ULONG Rva); - PVOID IMAGEAPI ImageRvaToVa(PIMAGE_NT_HEADERS NtHeaders,PVOID Base,ULONG Rva,PIMAGE_SECTION_HEADER *LastRvaSection); - -#define SSRVOPT_CALLBACK 0x0001 -#define SSRVOPT_DWORD 0x0002 -#define SSRVOPT_DWORDPTR 0x0004 -#define SSRVOPT_GUIDPTR 0x0008 -#define SSRVOPT_OLDGUIDPTR 0x0010 -#define SSRVOPT_UNATTENDED 0x0020 -#define SSRVOPT_NOCOPY 0x0040 -#define SSRVOPT_PARENTWIN 0x0080 -#define SSRVOPT_PARAMTYPE 0x0100 -#define SSRVOPT_SECURE 0x0200 -#define SSRVOPT_TRACE 0x0400 -#define SSRVOPT_SETCONTEXT 0x0800 -#define SSRVOPT_PROXY 0x1000 -#define SSRVOPT_DOWNSTREAM_STORE 0x2000 -#define SSRVOPT_RESET ((ULONG_PTR)-1) - -#define SSRVACTION_TRACE 1 -#define SSRVACTION_QUERYCANCEL 2 -#define SSRVACTION_EVENT 3 - -#ifndef _WIN64 - - typedef struct _IMAGE_DEBUG_INFORMATION { - LIST_ENTRY List; - DWORD ReservedSize; - PVOID ReservedMappedBase; - USHORT ReservedMachine; - USHORT ReservedCharacteristics; - DWORD ReservedCheckSum; - DWORD ImageBase; - DWORD SizeOfImage; - DWORD ReservedNumberOfSections; - PIMAGE_SECTION_HEADER ReservedSections; - DWORD ReservedExportedNamesSize; - PSTR ReservedExportedNames; - DWORD ReservedNumberOfFunctionTableEntries; - PIMAGE_FUNCTION_ENTRY ReservedFunctionTableEntries; - DWORD ReservedLowestFunctionStartingAddress; - DWORD ReservedHighestFunctionEndingAddress; - DWORD ReservedNumberOfFpoTableEntries; - PFPO_DATA ReservedFpoTableEntries; - DWORD SizeOfCoffSymbols; - PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols; - DWORD ReservedSizeOfCodeViewSymbols; - PVOID ReservedCodeViewSymbols; - PSTR ImageFilePath; - PSTR ImageFileName; - PSTR ReservedDebugFilePath; - DWORD ReservedTimeDateStamp; - BOOL ReservedRomImage; - PIMAGE_DEBUG_DIRECTORY ReservedDebugDirectory; - DWORD ReservedNumberOfDebugDirectories; - DWORD ReservedOriginalFunctionTableBaseAddress; - DWORD Reserved[2 ]; - } IMAGE_DEBUG_INFORMATION,*PIMAGE_DEBUG_INFORMATION; - - PIMAGE_DEBUG_INFORMATION IMAGEAPI MapDebugInformation(HANDLE FileHandle,PSTR FileName,PSTR SymbolPath,DWORD ImageBase); - BOOL IMAGEAPI UnmapDebugInformation(PIMAGE_DEBUG_INFORMATION DebugInfo); -#endif - - typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACK)(LPCSTR FilePath,PVOID CallerData); - - BOOL IMAGEAPI SearchTreeForFile(PSTR RootPath,PSTR InputPathName,PSTR OutputPathBuffer); - BOOL IMAGEAPI EnumDirTree(HANDLE hProcess,PSTR RootPath,PSTR InputPathName,PSTR OutputPathBuffer,PENUMDIRTREE_CALLBACK Callback,PVOID CallbackData); - BOOL IMAGEAPI MakeSureDirectoryPathExists(PCSTR DirPath); - -#define UNDNAME_COMPLETE (0x0000) -#define UNDNAME_NO_LEADING_UNDERSCORES (0x0001) -#define UNDNAME_NO_MS_KEYWORDS (0x0002) -#define UNDNAME_NO_FUNCTION_RETURNS (0x0004) -#define UNDNAME_NO_ALLOCATION_MODEL (0x0008) -#define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010) -#define UNDNAME_NO_MS_THISTYPE (0x0020) -#define UNDNAME_NO_CV_THISTYPE (0x0040) -#define UNDNAME_NO_THISTYPE (0x0060) -#define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080) -#define UNDNAME_NO_THROW_SIGNATURES (0x0100) -#define UNDNAME_NO_MEMBER_TYPE (0x0200) -#define UNDNAME_NO_RETURN_UDT_MODEL (0x0400) -#define UNDNAME_32_BIT_DECODE (0x0800) -#define UNDNAME_NAME_ONLY (0x1000) -#define UNDNAME_NO_ARGUMENTS (0x2000) -#define UNDNAME_NO_SPECIAL_SYMS (0x4000) - - DWORD IMAGEAPI WINAPI UnDecorateSymbolName(PCSTR DecoratedName,PSTR UnDecoratedName,DWORD UndecoratedLength,DWORD Flags); - -#define DBHHEADER_DEBUGDIRS 0x1 - - typedef struct _MODLOAD_DATA { - DWORD ssize; - DWORD ssig; - PVOID data; - DWORD size; - DWORD flags; - } MODLOAD_DATA,*PMODLOAD_DATA; - - typedef enum { - AddrMode1616,AddrMode1632,AddrModeReal,AddrModeFlat - } ADDRESS_MODE; - - typedef struct _tagADDRESS64 { - DWORD64 Offset; - WORD Segment; - ADDRESS_MODE Mode; - } ADDRESS64,*LPADDRESS64; - -#ifdef _IMAGEHLP64 -#define ADDRESS ADDRESS64 -#define LPADDRESS LPADDRESS64 -#else - typedef struct _tagADDRESS { - DWORD Offset; - WORD Segment; - ADDRESS_MODE Mode; - } ADDRESS,*LPADDRESS; - - static __inline void Address32To64(LPADDRESS a32,LPADDRESS64 a64) { - a64->Offset = (ULONG64)(LONG64)(LONG)a32->Offset; - a64->Segment = a32->Segment; - a64->Mode = a32->Mode; - } - - static __inline void Address64To32(LPADDRESS64 a64,LPADDRESS a32) { - a32->Offset = (ULONG)a64->Offset; - a32->Segment = a64->Segment; - a32->Mode = a64->Mode; - } -#endif - - typedef struct _KDHELP64 { - DWORD64 Thread; - DWORD ThCallbackStack; - DWORD ThCallbackBStore; - DWORD NextCallback; - DWORD FramePointer; - DWORD64 KiCallUserMode; - DWORD64 KeUserCallbackDispatcher; - DWORD64 SystemRangeStart; - DWORD64 Reserved[8]; - } KDHELP64,*PKDHELP64; - -#ifdef _IMAGEHLP64 -#define KDHELP KDHELP64 -#define PKDHELP PKDHELP64 -#else - typedef struct _KDHELP { - DWORD Thread; - DWORD ThCallbackStack; - DWORD NextCallback; - DWORD FramePointer; - DWORD KiCallUserMode; - DWORD KeUserCallbackDispatcher; - DWORD SystemRangeStart; - DWORD ThCallbackBStore; - DWORD Reserved[8]; - } KDHELP,*PKDHELP; - - static __inline void KdHelp32To64(PKDHELP p32,PKDHELP64 p64) { - p64->Thread = p32->Thread; - p64->ThCallbackStack = p32->ThCallbackStack; - p64->NextCallback = p32->NextCallback; - p64->FramePointer = p32->FramePointer; - p64->KiCallUserMode = p32->KiCallUserMode; - p64->KeUserCallbackDispatcher = p32->KeUserCallbackDispatcher; - p64->SystemRangeStart = p32->SystemRangeStart; - } -#endif - - typedef struct _tagSTACKFRAME64 { - ADDRESS64 AddrPC; - ADDRESS64 AddrReturn; - ADDRESS64 AddrFrame; - ADDRESS64 AddrStack; - ADDRESS64 AddrBStore; - PVOID FuncTableEntry; - DWORD64 Params[4]; - BOOL Far; - BOOL Virtual; - DWORD64 Reserved[3]; - KDHELP64 KdHelp; - } STACKFRAME64,*LPSTACKFRAME64; - -#ifdef _IMAGEHLP64 -#define STACKFRAME STACKFRAME64 -#define LPSTACKFRAME LPSTACKFRAME64 -#else - typedef struct _tagSTACKFRAME { - ADDRESS AddrPC; - ADDRESS AddrReturn; - ADDRESS AddrFrame; - ADDRESS AddrStack; - PVOID FuncTableEntry; - DWORD Params[4]; - BOOL Far; - BOOL Virtual; - DWORD Reserved[3]; - KDHELP KdHelp; - ADDRESS AddrBStore; - } STACKFRAME,*LPSTACKFRAME; -#endif - - typedef BOOL (WINAPI *PREAD_PROCESS_MEMORY_ROUTINE64)(HANDLE hProcess,DWORD64 qwBaseAddress,PVOID lpBuffer,DWORD nSize,LPDWORD lpNumberOfBytesRead); - typedef PVOID (WINAPI *PFUNCTION_TABLE_ACCESS_ROUTINE64)(HANDLE hProcess,DWORD64 AddrBase); - typedef DWORD64 (WINAPI *PGET_MODULE_BASE_ROUTINE64)(HANDLE hProcess,DWORD64 Address); - typedef DWORD64 (WINAPI *PTRANSLATE_ADDRESS_ROUTINE64)(HANDLE hProcess,HANDLE hThread,LPADDRESS64 lpaddr); - - BOOL IMAGEAPI StackWalk64(DWORD MachineType,HANDLE hProcess,HANDLE hThread,LPSTACKFRAME64 StackFrame,PVOID ContextRecord,PREAD_PROCESS_MEMORY_ROUTINE64 ReadMemoryRoutine,PFUNCTION_TABLE_ACCESS_ROUTINE64 FunctionTableAccessRoutine,PGET_MODULE_BASE_ROUTINE64 GetModuleBaseRoutine,PTRANSLATE_ADDRESS_ROUTINE64 TranslateAddress); - -#ifdef _IMAGEHLP64 -#define PREAD_PROCESS_MEMORY_ROUTINE PREAD_PROCESS_MEMORY_ROUTINE64 -#define PFUNCTION_TABLE_ACCESS_ROUTINE PFUNCTION_TABLE_ACCESS_ROUTINE64 -#define PGET_MODULE_BASE_ROUTINE PGET_MODULE_BASE_ROUTINE64 -#define PTRANSLATE_ADDRESS_ROUTINE PTRANSLATE_ADDRESS_ROUTINE64 -#define StackWalk StackWalk64 -#else - typedef BOOL (WINAPI *PREAD_PROCESS_MEMORY_ROUTINE)(HANDLE hProcess,DWORD lpBaseAddress,PVOID lpBuffer,DWORD nSize,PDWORD lpNumberOfBytesRead); - typedef PVOID (WINAPI *PFUNCTION_TABLE_ACCESS_ROUTINE)(HANDLE hProcess,DWORD AddrBase); - typedef DWORD (WINAPI *PGET_MODULE_BASE_ROUTINE)(HANDLE hProcess,DWORD Address); - typedef DWORD (WINAPI *PTRANSLATE_ADDRESS_ROUTINE)(HANDLE hProcess,HANDLE hThread,LPADDRESS lpaddr); - - BOOL IMAGEAPI StackWalk(DWORD MachineType,HANDLE hProcess,HANDLE hThread,LPSTACKFRAME StackFrame,PVOID ContextRecord,PREAD_PROCESS_MEMORY_ROUTINE ReadMemoryRoutine,PFUNCTION_TABLE_ACCESS_ROUTINE FunctionTableAccessRoutine,PGET_MODULE_BASE_ROUTINE GetModuleBaseRoutine,PTRANSLATE_ADDRESS_ROUTINE TranslateAddress); -#endif - -#define API_VERSION_NUMBER 9 - - typedef struct API_VERSION { - USHORT MajorVersion; - USHORT MinorVersion; - USHORT Revision; - USHORT Reserved; - } API_VERSION,*LPAPI_VERSION; - - LPAPI_VERSION IMAGEAPI ImagehlpApiVersion(VOID); - LPAPI_VERSION IMAGEAPI ImagehlpApiVersionEx(LPAPI_VERSION AppVersion); - DWORD IMAGEAPI GetTimestampForLoadedLibrary(HMODULE Module); - - typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK64)(PSTR ModuleName,DWORD64 BaseOfDll,PVOID UserContext); - typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64)(PSTR SymbolName,DWORD64 SymbolAddress,ULONG SymbolSize,PVOID UserContext); - typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64W)(PWSTR SymbolName,DWORD64 SymbolAddress,ULONG SymbolSize,PVOID UserContext); - typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK64)(PSTR ModuleName,DWORD64 ModuleBase,ULONG ModuleSize,PVOID UserContext); - typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK64)(HANDLE hProcess,ULONG ActionCode,ULONG64 CallbackData,ULONG64 UserContext); - typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK)(HANDLE hProcess,DWORD AddrBase,PVOID UserContext); - typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK64)(HANDLE hProcess,ULONG64 AddrBase,ULONG64 UserContext); - -#ifdef _IMAGEHLP64 -#define PSYM_ENUMMODULES_CALLBACK PSYM_ENUMMODULES_CALLBACK64 -#define PSYM_ENUMSYMBOLS_CALLBACK PSYM_ENUMSYMBOLS_CALLBACK64 -#define PSYM_ENUMSYMBOLS_CALLBACKW PSYM_ENUMSYMBOLS_CALLBACK64W -#define PENUMLOADED_MODULES_CALLBACK PENUMLOADED_MODULES_CALLBACK64 -#define PSYMBOL_REGISTERED_CALLBACK PSYMBOL_REGISTERED_CALLBACK64 -#define PSYMBOL_FUNCENTRY_CALLBACK PSYMBOL_FUNCENTRY_CALLBACK64 -#else - typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(PSTR ModuleName,ULONG BaseOfDll,PVOID UserContext); - typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(PSTR SymbolName,ULONG SymbolAddress,ULONG SymbolSize,PVOID UserContext); - typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACKW)(PWSTR SymbolName,ULONG SymbolAddress,ULONG SymbolSize,PVOID UserContext); - typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(PSTR ModuleName,ULONG ModuleBase,ULONG ModuleSize,PVOID UserContext); - typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(HANDLE hProcess,ULONG ActionCode,PVOID CallbackData,PVOID UserContext); -#endif - -#define SYMFLAG_VALUEPRESENT 0x00000001 -#define SYMFLAG_REGISTER 0x00000008 -#define SYMFLAG_REGREL 0x00000010 -#define SYMFLAG_FRAMEREL 0x00000020 -#define SYMFLAG_PARAMETER 0x00000040 -#define SYMFLAG_LOCAL 0x00000080 -#define SYMFLAG_CONSTANT 0x00000100 -#define SYMFLAG_EXPORT 0x00000200 -#define SYMFLAG_FORWARDER 0x00000400 -#define SYMFLAG_FUNCTION 0x00000800 -#define SYMFLAG_VIRTUAL 0x00001000 -#define SYMFLAG_THUNK 0x00002000 -#define SYMFLAG_TLSREL 0x00004000 - - typedef enum { - SymNone = 0,SymCoff,SymCv,SymPdb,SymExport,SymDeferred,SymSym,SymDia,SymVirtual,NumSymTypes - } SYM_TYPE; - - typedef struct _IMAGEHLP_SYMBOL64 { - DWORD SizeOfStruct; - DWORD64 Address; - DWORD Size; - DWORD Flags; - DWORD MaxNameLength; - CHAR Name[1]; - } IMAGEHLP_SYMBOL64,*PIMAGEHLP_SYMBOL64; - - typedef struct _IMAGEHLP_SYMBOL64_PACKAGE { - IMAGEHLP_SYMBOL64 sym; - CHAR name[MAX_SYM_NAME + 1]; - } IMAGEHLP_SYMBOL64_PACKAGE,*PIMAGEHLP_SYMBOL64_PACKAGE; - -#ifdef _IMAGEHLP64 - -#define IMAGEHLP_SYMBOL IMAGEHLP_SYMBOL64 -#define PIMAGEHLP_SYMBOL PIMAGEHLP_SYMBOL64 -#define IMAGEHLP_SYMBOL_PACKAGE IMAGEHLP_SYMBOL64_PACKAGE -#define PIMAGEHLP_SYMBOL_PACKAGE PIMAGEHLP_SYMBOL64_PACKAGE -#else - - typedef struct _IMAGEHLP_SYMBOL { - DWORD SizeOfStruct; - DWORD Address; - DWORD Size; - DWORD Flags; - DWORD MaxNameLength; - CHAR Name[1]; - } IMAGEHLP_SYMBOL,*PIMAGEHLP_SYMBOL; - - typedef struct _IMAGEHLP_SYMBOL_PACKAGE { - IMAGEHLP_SYMBOL sym; - CHAR name[MAX_SYM_NAME + 1]; - } IMAGEHLP_SYMBOL_PACKAGE,*PIMAGEHLP_SYMBOL_PACKAGE; -#endif - - typedef struct _IMAGEHLP_MODULE64 { - DWORD SizeOfStruct; - DWORD64 BaseOfImage; - DWORD ImageSize; - DWORD TimeDateStamp; - DWORD CheckSum; - DWORD NumSyms; - SYM_TYPE SymType; - CHAR ModuleName[32]; - CHAR ImageName[256]; - CHAR LoadedImageName[256]; - CHAR LoadedPdbName[256]; - DWORD CVSig; - CHAR CVData[MAX_PATH*3]; - DWORD PdbSig; - GUID PdbSig70; - DWORD PdbAge; - BOOL PdbUnmatched; - BOOL DbgUnmatched; - BOOL LineNumbers; - BOOL GlobalSymbols; - BOOL TypeInfo; - } IMAGEHLP_MODULE64,*PIMAGEHLP_MODULE64; - - typedef struct _IMAGEHLP_MODULE64W { - DWORD SizeOfStruct; - DWORD64 BaseOfImage; - DWORD ImageSize; - DWORD TimeDateStamp; - DWORD CheckSum; - DWORD NumSyms; - SYM_TYPE SymType; - WCHAR ModuleName[32]; - WCHAR ImageName[256]; - WCHAR LoadedImageName[256]; - WCHAR LoadedPdbName[256]; - DWORD CVSig; - WCHAR CVData[MAX_PATH*3]; - DWORD PdbSig; - GUID PdbSig70; - DWORD PdbAge; - BOOL PdbUnmatched; - BOOL DbgUnmatched; - BOOL LineNumbers; - BOOL GlobalSymbols; - BOOL TypeInfo; - } IMAGEHLP_MODULEW64,*PIMAGEHLP_MODULEW64; - -#ifdef _IMAGEHLP64 -#define IMAGEHLP_MODULE IMAGEHLP_MODULE64 -#define PIMAGEHLP_MODULE PIMAGEHLP_MODULE64 -#define IMAGEHLP_MODULEW IMAGEHLP_MODULEW64 -#define PIMAGEHLP_MODULEW PIMAGEHLP_MODULEW64 -#else - typedef struct _IMAGEHLP_MODULE { - DWORD SizeOfStruct; - DWORD BaseOfImage; - DWORD ImageSize; - DWORD TimeDateStamp; - DWORD CheckSum; - DWORD NumSyms; - SYM_TYPE SymType; - CHAR ModuleName[32]; - CHAR ImageName[256]; - CHAR LoadedImageName[256]; - } IMAGEHLP_MODULE,*PIMAGEHLP_MODULE; - - typedef struct _IMAGEHLP_MODULEW { - DWORD SizeOfStruct; - DWORD BaseOfImage; - DWORD ImageSize; - DWORD TimeDateStamp; - DWORD CheckSum; - DWORD NumSyms; - SYM_TYPE SymType; - WCHAR ModuleName[32]; - WCHAR ImageName[256]; - WCHAR LoadedImageName[256]; - } IMAGEHLP_MODULEW,*PIMAGEHLP_MODULEW; -#endif - - typedef struct _IMAGEHLP_LINE64 { - DWORD SizeOfStruct; - PVOID Key; - DWORD LineNumber; - PCHAR FileName; - DWORD64 Address; - } IMAGEHLP_LINE64,*PIMAGEHLP_LINE64; - -#ifdef _IMAGEHLP64 -#define IMAGEHLP_LINE IMAGEHLP_LINE64 -#define PIMAGEHLP_LINE PIMAGEHLP_LINE64 -#else - typedef struct _IMAGEHLP_LINE { - DWORD SizeOfStruct; - PVOID Key; - DWORD LineNumber; - PCHAR FileName; - DWORD Address; - } IMAGEHLP_LINE,*PIMAGEHLP_LINE; -#endif - - typedef struct _SOURCEFILE { - DWORD64 ModBase; - PCHAR FileName; - } SOURCEFILE,*PSOURCEFILE; - -#define CBA_DEFERRED_SYMBOL_LOAD_START 0x00000001 -#define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE 0x00000002 -#define CBA_DEFERRED_SYMBOL_LOAD_FAILURE 0x00000003 -#define CBA_SYMBOLS_UNLOADED 0x00000004 -#define CBA_DUPLICATE_SYMBOL 0x00000005 -#define CBA_READ_MEMORY 0x00000006 -#define CBA_DEFERRED_SYMBOL_LOAD_CANCEL 0x00000007 -#define CBA_SET_OPTIONS 0x00000008 -#define CBA_EVENT 0x00000010 -#define CBA_DEFERRED_SYMBOL_LOAD_PARTIAL 0x00000020 -#define CBA_DEBUG_INFO 0x10000000 - - typedef struct _IMAGEHLP_CBA_READ_MEMORY { - DWORD64 addr; - PVOID buf; - DWORD bytes; - DWORD *bytesread; - } IMAGEHLP_CBA_READ_MEMORY,*PIMAGEHLP_CBA_READ_MEMORY; - - enum { - sevInfo = 0,sevProblem,sevAttn,sevFatal,sevMax - }; - - typedef struct _IMAGEHLP_CBA_EVENT { - DWORD severity; - DWORD code; - PCHAR desc; - PVOID object; - } IMAGEHLP_CBA_EVENT,*PIMAGEHLP_CBA_EVENT; - - typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD64 { - DWORD SizeOfStruct; - DWORD64 BaseOfImage; - DWORD CheckSum; - DWORD TimeDateStamp; - CHAR FileName[MAX_PATH]; - BOOLEAN Reparse; - HANDLE hFile; - DWORD Flags; - } IMAGEHLP_DEFERRED_SYMBOL_LOAD64,*PIMAGEHLP_DEFERRED_SYMBOL_LOAD64; - -#define DSLFLAG_MISMATCHED_PDB 0x1 -#define DSLFLAG_MISMATCHED_DBG 0x2 - -#ifdef _IMAGEHLP64 -#define IMAGEHLP_DEFERRED_SYMBOL_LOAD IMAGEHLP_DEFERRED_SYMBOL_LOAD64 -#define PIMAGEHLP_DEFERRED_SYMBOL_LOAD PIMAGEHLP_DEFERRED_SYMBOL_LOAD64 -#else - typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD { - DWORD SizeOfStruct; - DWORD BaseOfImage; - DWORD CheckSum; - DWORD TimeDateStamp; - CHAR FileName[MAX_PATH]; - BOOLEAN Reparse; - HANDLE hFile; - } IMAGEHLP_DEFERRED_SYMBOL_LOAD,*PIMAGEHLP_DEFERRED_SYMBOL_LOAD; -#endif - - typedef struct _IMAGEHLP_DUPLICATE_SYMBOL64 { - DWORD SizeOfStruct; - DWORD NumberOfDups; - PIMAGEHLP_SYMBOL64 Symbol; - DWORD SelectedSymbol; - } IMAGEHLP_DUPLICATE_SYMBOL64,*PIMAGEHLP_DUPLICATE_SYMBOL64; - -#ifdef _IMAGEHLP64 -#define IMAGEHLP_DUPLICATE_SYMBOL IMAGEHLP_DUPLICATE_SYMBOL64 -#define PIMAGEHLP_DUPLICATE_SYMBOL PIMAGEHLP_DUPLICATE_SYMBOL64 -#else - typedef struct _IMAGEHLP_DUPLICATE_SYMBOL { - DWORD SizeOfStruct; - DWORD NumberOfDups; - PIMAGEHLP_SYMBOL Symbol; - DWORD SelectedSymbol; - } IMAGEHLP_DUPLICATE_SYMBOL,*PIMAGEHLP_DUPLICATE_SYMBOL; -#endif - - BOOL IMAGEAPI SymSetParentWindow(HWND hwnd); - PCHAR IMAGEAPI SymSetHomeDirectory(PCSTR dir); - PCHAR IMAGEAPI SymGetHomeDirectory(DWORD type,PSTR dir,size_t size); - - enum { - hdBase = 0,hdSym,hdSrc,hdMax - }; - -#define SYMOPT_CASE_INSENSITIVE 0x00000001 -#define SYMOPT_UNDNAME 0x00000002 -#define SYMOPT_DEFERRED_LOADS 0x00000004 -#define SYMOPT_NO_CPP 0x00000008 -#define SYMOPT_LOAD_LINES 0x00000010 -#define SYMOPT_OMAP_FIND_NEAREST 0x00000020 -#define SYMOPT_LOAD_ANYTHING 0x00000040 -#define SYMOPT_IGNORE_CVREC 0x00000080 -#define SYMOPT_NO_UNQUALIFIED_LOADS 0x00000100 -#define SYMOPT_FAIL_CRITICAL_ERRORS 0x00000200 -#define SYMOPT_EXACT_SYMBOLS 0x00000400 -#define SYMOPT_ALLOW_ABSOLUTE_SYMBOLS 0x00000800 -#define SYMOPT_IGNORE_NT_SYMPATH 0x00001000 -#define SYMOPT_INCLUDE_32BIT_MODULES 0x00002000 -#define SYMOPT_PUBLICS_ONLY 0x00004000 -#define SYMOPT_NO_PUBLICS 0x00008000 -#define SYMOPT_AUTO_PUBLICS 0x00010000 -#define SYMOPT_NO_IMAGE_SEARCH 0x00020000 -#define SYMOPT_SECURE 0x00040000 -#define SYMOPT_NO_PROMPTS 0x00080000 - -#define SYMOPT_DEBUG 0x80000000 - - DWORD IMAGEAPI SymSetOptions(DWORD SymOptions); - DWORD IMAGEAPI SymGetOptions(VOID); - BOOL IMAGEAPI SymCleanup(HANDLE hProcess); - BOOL IMAGEAPI SymMatchString(LPSTR string,LPSTR expression,BOOL fCase); - - typedef BOOL (CALLBACK *PSYM_ENUMSOURCFILES_CALLBACK)(PSOURCEFILE pSourceFile,PVOID UserContext); - - BOOL IMAGEAPI SymEnumSourceFiles(HANDLE hProcess,ULONG64 ModBase,LPSTR Mask,PSYM_ENUMSOURCFILES_CALLBACK cbSrcFiles,PVOID UserContext); - BOOL IMAGEAPI SymEnumerateModules64(HANDLE hProcess,PSYM_ENUMMODULES_CALLBACK64 EnumModulesCallback,PVOID UserContext); - -#ifdef _IMAGEHLP64 -#define SymEnumerateModules SymEnumerateModules64 -#else - BOOL IMAGEAPI SymEnumerateModules(HANDLE hProcess,PSYM_ENUMMODULES_CALLBACK EnumModulesCallback,PVOID UserContext); -#endif - - BOOL IMAGEAPI SymEnumerateSymbols64(HANDLE hProcess,DWORD64 BaseOfDll,PSYM_ENUMSYMBOLS_CALLBACK64 EnumSymbolsCallback,PVOID UserContext); - BOOL IMAGEAPI SymEnumerateSymbolsW64(HANDLE hProcess,DWORD64 BaseOfDll,PSYM_ENUMSYMBOLS_CALLBACK64W EnumSymbolsCallback,PVOID UserContext); - -#ifdef _IMAGEHLP64 -#define SymEnumerateSymbols SymEnumerateSymbols64 -#define SymEnumerateSymbolsW SymEnumerateSymbolsW64 -#else - BOOL IMAGEAPI SymEnumerateSymbols(HANDLE hProcess,DWORD BaseOfDll,PSYM_ENUMSYMBOLS_CALLBACK EnumSymbolsCallback,PVOID UserContext); - BOOL IMAGEAPI SymEnumerateSymbolsW(HANDLE hProcess,DWORD BaseOfDll,PSYM_ENUMSYMBOLS_CALLBACKW EnumSymbolsCallback,PVOID UserContext); -#endif - - BOOL IMAGEAPI EnumerateLoadedModules64(HANDLE hProcess,PENUMLOADED_MODULES_CALLBACK64 EnumLoadedModulesCallback,PVOID UserContext); -#ifdef _IMAGEHLP64 -#define EnumerateLoadedModules EnumerateLoadedModules64 -#else - BOOL IMAGEAPI EnumerateLoadedModules(HANDLE hProcess,PENUMLOADED_MODULES_CALLBACK EnumLoadedModulesCallback,PVOID UserContext); -#endif - - PVOID IMAGEAPI SymFunctionTableAccess64(HANDLE hProcess,DWORD64 AddrBase); - -#ifdef _IMAGEHLP64 -#define SymFunctionTableAccess SymFunctionTableAccess64 -#else - PVOID IMAGEAPI SymFunctionTableAccess(HANDLE hProcess,DWORD AddrBase); -#endif - - BOOL IMAGEAPI SymGetModuleInfo64(HANDLE hProcess,DWORD64 qwAddr,PIMAGEHLP_MODULE64 ModuleInfo); - BOOL IMAGEAPI SymGetModuleInfoW64(HANDLE hProcess,DWORD64 qwAddr,PIMAGEHLP_MODULEW64 ModuleInfo); - -#ifdef _IMAGEHLP64 -#define SymGetModuleInfo SymGetModuleInfo64 -#define SymGetModuleInfoW SymGetModuleInfoW64 -#else - BOOL IMAGEAPI SymGetModuleInfo(HANDLE hProcess,DWORD dwAddr,PIMAGEHLP_MODULE ModuleInfo); - BOOL IMAGEAPI SymGetModuleInfoW(HANDLE hProcess,DWORD dwAddr,PIMAGEHLP_MODULEW ModuleInfo); -#endif - - DWORD64 IMAGEAPI SymGetModuleBase64(HANDLE hProcess,DWORD64 qwAddr); - -#ifdef _IMAGEHLP64 -#define SymGetModuleBase SymGetModuleBase64 -#else - DWORD IMAGEAPI SymGetModuleBase(HANDLE hProcess,DWORD dwAddr); -#endif - - BOOL IMAGEAPI SymGetSymNext64(HANDLE hProcess,PIMAGEHLP_SYMBOL64 Symbol); - -#ifdef _IMAGEHLP64 -#define SymGetSymNext SymGetSymNext64 -#else - BOOL IMAGEAPI SymGetSymNext(HANDLE hProcess,PIMAGEHLP_SYMBOL Symbol); -#endif - - BOOL IMAGEAPI SymGetSymPrev64(HANDLE hProcess,PIMAGEHLP_SYMBOL64 Symbol); - -#ifdef _IMAGEHLP64 -#define SymGetSymPrev SymGetSymPrev64 -#else - BOOL IMAGEAPI SymGetSymPrev(HANDLE hProcess,PIMAGEHLP_SYMBOL Symbol); -#endif - - typedef struct _SRCCODEINFO { - DWORD SizeOfStruct; - PVOID Key; - DWORD64 ModBase; - CHAR Obj[MAX_PATH + 1]; - CHAR FileName[MAX_PATH + 1]; - DWORD LineNumber; - DWORD64 Address; - } SRCCODEINFO,*PSRCCODEINFO; - - typedef BOOL (CALLBACK *PSYM_ENUMLINES_CALLBACK)(PSRCCODEINFO LineInfo,PVOID UserContext); - - BOOL IMAGEAPI SymEnumLines(HANDLE hProcess,ULONG64 Base,PCSTR Obj,PCSTR File,PSYM_ENUMLINES_CALLBACK EnumLinesCallback,PVOID UserContext); - BOOL IMAGEAPI SymGetLineFromAddr64(HANDLE hProcess,DWORD64 qwAddr,PDWORD pdwDisplacement,PIMAGEHLP_LINE64 Line64); - -#ifdef _IMAGEHLP64 -#define SymGetLineFromAddr SymGetLineFromAddr64 -#else - BOOL IMAGEAPI SymGetLineFromAddr(HANDLE hProcess,DWORD dwAddr,PDWORD pdwDisplacement,PIMAGEHLP_LINE Line); -#endif - - BOOL IMAGEAPI SymGetLineFromName64(HANDLE hProcess,PSTR ModuleName,PSTR FileName,DWORD dwLineNumber,PLONG plDisplacement,PIMAGEHLP_LINE64 Line); - -#ifdef _IMAGEHLP64 -#define SymGetLineFromName SymGetLineFromName64 -#else - BOOL IMAGEAPI SymGetLineFromName(HANDLE hProcess,PSTR ModuleName,PSTR FileName,DWORD dwLineNumber,PLONG plDisplacement,PIMAGEHLP_LINE Line); -#endif - - BOOL IMAGEAPI SymGetLineNext64(HANDLE hProcess,PIMAGEHLP_LINE64 Line); - -#ifdef _IMAGEHLP64 -#define SymGetLineNext SymGetLineNext64 -#else - BOOL IMAGEAPI SymGetLineNext(HANDLE hProcess,PIMAGEHLP_LINE Line); -#endif - - BOOL IMAGEAPI SymGetLinePrev64(HANDLE hProcess,PIMAGEHLP_LINE64 Line); - -#ifdef _IMAGEHLP64 -#define SymGetLinePrev SymGetLinePrev64 -#else - BOOL IMAGEAPI SymGetLinePrev(HANDLE hProcess,PIMAGEHLP_LINE Line); -#endif - - BOOL IMAGEAPI SymMatchFileName(PSTR FileName,PSTR Match,PSTR *FileNameStop,PSTR *MatchStop); - BOOL IMAGEAPI SymInitialize(HANDLE hProcess,PSTR UserSearchPath,BOOL fInvadeProcess); - BOOL IMAGEAPI SymGetSearchPath(HANDLE hProcess,PSTR SearchPath,DWORD SearchPathLength); - BOOL IMAGEAPI SymSetSearchPath(HANDLE hProcess,PSTR SearchPath); - DWORD64 IMAGEAPI SymLoadModule64(HANDLE hProcess,HANDLE hFile,PSTR ImageName,PSTR ModuleName,DWORD64 BaseOfDll,DWORD SizeOfDll); - -#define SLMFLAG_VIRTUAL 0x1 - - DWORD64 IMAGEAPI SymLoadModuleEx(HANDLE hProcess,HANDLE hFile,PSTR ImageName,PSTR ModuleName,DWORD64 BaseOfDll,DWORD DllSize,PMODLOAD_DATA Data,DWORD Flags); - -#ifdef _IMAGEHLP64 -#define SymLoadModule SymLoadModule64 -#else - DWORD IMAGEAPI SymLoadModule(HANDLE hProcess,HANDLE hFile,PSTR ImageName,PSTR ModuleName,DWORD BaseOfDll,DWORD SizeOfDll); -#endif - - BOOL IMAGEAPI SymUnloadModule64(HANDLE hProcess,DWORD64 BaseOfDll); - -#ifdef _IMAGEHLP64 -#define SymUnloadModule SymUnloadModule64 -#else - BOOL IMAGEAPI SymUnloadModule(HANDLE hProcess,DWORD BaseOfDll); -#endif - - BOOL IMAGEAPI SymUnDName64(PIMAGEHLP_SYMBOL64 sym,PSTR UnDecName,DWORD UnDecNameLength); - -#ifdef _IMAGEHLP64 -#define SymUnDName SymUnDName64 -#else - BOOL IMAGEAPI SymUnDName(PIMAGEHLP_SYMBOL sym,PSTR UnDecName,DWORD UnDecNameLength); -#endif - - BOOL IMAGEAPI SymRegisterCallback64(HANDLE hProcess,PSYMBOL_REGISTERED_CALLBACK64 CallbackFunction,ULONG64 UserContext); - - BOOL IMAGEAPI SymRegisterFunctionEntryCallback64(HANDLE hProcess,PSYMBOL_FUNCENTRY_CALLBACK64 CallbackFunction,ULONG64 UserContext); - -#ifdef _IMAGEHLP64 -#define SymRegisterCallback SymRegisterCallback64 -#define SymRegisterFunctionEntryCallback SymRegisterFunctionEntryCallback64 -#else - BOOL IMAGEAPI SymRegisterCallback(HANDLE hProcess,PSYMBOL_REGISTERED_CALLBACK CallbackFunction,PVOID UserContext); - BOOL IMAGEAPI SymRegisterFunctionEntryCallback(HANDLE hProcess,PSYMBOL_FUNCENTRY_CALLBACK CallbackFunction,PVOID UserContext); -#endif - - typedef struct _IMAGEHLP_SYMBOL_SRC { - DWORD sizeofstruct; - DWORD type; - char file[MAX_PATH]; - } IMAGEHLP_SYMBOL_SRC,*PIMAGEHLP_SYMBOL_SRC; - - typedef struct _MODULE_TYPE_INFO { - USHORT dataLength; - USHORT leaf; - BYTE data[1]; - } MODULE_TYPE_INFO,*PMODULE_TYPE_INFO; - - typedef struct _SYMBOL_INFO { - ULONG SizeOfStruct; - ULONG TypeIndex; - ULONG64 Reserved[2]; - ULONG info; - ULONG Size; - ULONG64 ModBase; - ULONG Flags; - ULONG64 Value; - ULONG64 Address; - ULONG Register; - ULONG Scope; - ULONG Tag; - ULONG NameLen; - ULONG MaxNameLen; - CHAR Name[1]; - } SYMBOL_INFO,*PSYMBOL_INFO; - - typedef struct _SYMBOL_INFO_PACKAGE { - SYMBOL_INFO si; - CHAR name[MAX_SYM_NAME + 1]; - } SYMBOL_INFO_PACKAGE,*PSYMBOL_INFO_PACKAGE; - - typedef struct _IMAGEHLP_STACK_FRAME - { - ULONG64 InstructionOffset; - ULONG64 ReturnOffset; - ULONG64 FrameOffset; - ULONG64 StackOffset; - ULONG64 BackingStoreOffset; - ULONG64 FuncTableEntry; - ULONG64 Params[4]; - ULONG64 Reserved[5]; - BOOL Virtual; - ULONG Reserved2; - } IMAGEHLP_STACK_FRAME,*PIMAGEHLP_STACK_FRAME; - - typedef VOID IMAGEHLP_CONTEXT,*PIMAGEHLP_CONTEXT; - - BOOL IMAGEAPI SymSetContext(HANDLE hProcess,PIMAGEHLP_STACK_FRAME StackFrame,PIMAGEHLP_CONTEXT Context); - BOOL IMAGEAPI SymFromAddr(HANDLE hProcess,DWORD64 Address,PDWORD64 Displacement,PSYMBOL_INFO Symbol); - BOOL IMAGEAPI SymFromToken(HANDLE hProcess,DWORD64 Base,DWORD Token,PSYMBOL_INFO Symbol); - BOOL IMAGEAPI SymFromName(HANDLE hProcess,LPSTR Name,PSYMBOL_INFO Symbol); - - typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)(PSYMBOL_INFO pSymInfo,ULONG SymbolSize,PVOID UserContext); - - BOOL IMAGEAPI SymEnumSymbols(HANDLE hProcess,ULONG64 BaseOfDll,PCSTR Mask,PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,PVOID UserContext); - BOOL IMAGEAPI SymEnumSymbolsForAddr(HANDLE hProcess,DWORD64 Address,PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,PVOID UserContext); - -#define SYMENUMFLAG_FULLSRCH 1 -#define SYMENUMFLAG_SPEEDSRCH 2 - - typedef enum _IMAGEHLP_SYMBOL_TYPE_INFO { - TI_GET_SYMTAG,TI_GET_SYMNAME,TI_GET_LENGTH,TI_GET_TYPE,TI_GET_TYPEID,TI_GET_BASETYPE,TI_GET_ARRAYINDEXTYPEID,TI_FINDCHILDREN, - TI_GET_DATAKIND,TI_GET_ADDRESSOFFSET,TI_GET_OFFSET,TI_GET_VALUE,TI_GET_COUNT,TI_GET_CHILDRENCOUNT,TI_GET_BITPOSITION,TI_GET_VIRTUALBASECLASS, - TI_GET_VIRTUALTABLESHAPEID,TI_GET_VIRTUALBASEPOINTEROFFSET,TI_GET_CLASSPARENTID,TI_GET_NESTED,TI_GET_SYMINDEX,TI_GET_LEXICALPARENT, - TI_GET_ADDRESS,TI_GET_THISADJUST,TI_GET_UDTKIND,TI_IS_EQUIV_TO,TI_GET_CALLING_CONVENTION - } IMAGEHLP_SYMBOL_TYPE_INFO; - - typedef struct _TI_FINDCHILDREN_PARAMS { - ULONG Count; - ULONG Start; - ULONG ChildId[1]; - } TI_FINDCHILDREN_PARAMS; - - BOOL IMAGEAPI SymGetTypeInfo(HANDLE hProcess,DWORD64 ModBase,ULONG TypeId,IMAGEHLP_SYMBOL_TYPE_INFO GetType,PVOID pInfo); - BOOL IMAGEAPI SymEnumTypes(HANDLE hProcess,ULONG64 BaseOfDll,PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,PVOID UserContext); - BOOL IMAGEAPI SymGetTypeFromName(HANDLE hProcess,ULONG64 BaseOfDll,LPSTR Name,PSYMBOL_INFO Symbol); - BOOL IMAGEAPI SymAddSymbol(HANDLE hProcess,ULONG64 BaseOfDll,PCSTR Name,DWORD64 Address,DWORD Size,DWORD Flags); - BOOL IMAGEAPI SymDeleteSymbol(HANDLE hProcess,ULONG64 BaseOfDll,PCSTR Name,DWORD64 Address,DWORD Flags); - - typedef BOOL (WINAPI *PDBGHELP_CREATE_USER_DUMP_CALLBACK)(DWORD DataType,PVOID *Data,LPDWORD DataLength,PVOID UserData); - - BOOL WINAPI DbgHelpCreateUserDump(LPSTR FileName,PDBGHELP_CREATE_USER_DUMP_CALLBACK Callback,PVOID UserData); - BOOL WINAPI DbgHelpCreateUserDumpW(LPWSTR FileName,PDBGHELP_CREATE_USER_DUMP_CALLBACK Callback,PVOID UserData); - BOOL IMAGEAPI SymGetSymFromAddr64(HANDLE hProcess,DWORD64 qwAddr,PDWORD64 pdwDisplacement,PIMAGEHLP_SYMBOL64 Symbol); - -#ifdef _IMAGEHLP64 -#define SymGetSymFromAddr SymGetSymFromAddr64 -#else - BOOL IMAGEAPI SymGetSymFromAddr(HANDLE hProcess,DWORD dwAddr,PDWORD pdwDisplacement,PIMAGEHLP_SYMBOL Symbol); -#endif - - BOOL IMAGEAPI SymGetSymFromName64(HANDLE hProcess,PSTR Name,PIMAGEHLP_SYMBOL64 Symbol); - -#ifdef _IMAGEHLP64 -#define SymGetSymFromName SymGetSymFromName64 -#else - BOOL IMAGEAPI SymGetSymFromName(HANDLE hProcess,PSTR Name,PIMAGEHLP_SYMBOL Symbol); -#endif - - DBHLP_DEPRECIATED BOOL IMAGEAPI FindFileInPath(HANDLE hprocess,LPSTR SearchPath,LPSTR FileName,PVOID id,DWORD two,DWORD three,DWORD flags,LPSTR FilePath); - DBHLP_DEPRECIATED BOOL IMAGEAPI FindFileInSearchPath(HANDLE hprocess,LPSTR SearchPath,LPSTR FileName,DWORD one,DWORD two,DWORD three,LPSTR FilePath); - DBHLP_DEPRECIATED BOOL IMAGEAPI SymEnumSym(HANDLE hProcess,ULONG64 BaseOfDll,PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback,PVOID UserContext); - -#define SYMF_OMAP_GENERATED 0x00000001 -#define SYMF_OMAP_MODIFIED 0x00000002 -#define SYMF_REGISTER 0x00000008 -#define SYMF_REGREL 0x00000010 -#define SYMF_FRAMEREL 0x00000020 -#define SYMF_PARAMETER 0x00000040 -#define SYMF_LOCAL 0x00000080 -#define SYMF_CONSTANT 0x00000100 -#define SYMF_EXPORT 0x00000200 -#define SYMF_FORWARDER 0x00000400 -#define SYMF_FUNCTION 0x00000800 -#define SYMF_VIRTUAL 0x00001000 -#define SYMF_THUNK 0x00002000 -#define SYMF_TLSREL 0x00004000 - -#define IMAGEHLP_SYMBOL_INFO_VALUEPRESENT 1 -#define IMAGEHLP_SYMBOL_INFO_REGISTER SYMF_REGISTER -#define IMAGEHLP_SYMBOL_INFO_REGRELATIVE SYMF_REGREL -#define IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE SYMF_FRAMEREL -#define IMAGEHLP_SYMBOL_INFO_PARAMETER SYMF_PARAMETER -#define IMAGEHLP_SYMBOL_INFO_LOCAL SYMF_LOCAL -#define IMAGEHLP_SYMBOL_INFO_CONSTANT SYMF_CONSTANT -#define IMAGEHLP_SYMBOL_FUNCTION SYMF_FUNCTION -#define IMAGEHLP_SYMBOL_VIRTUAL SYMF_VIRTUAL -#define IMAGEHLP_SYMBOL_THUNK SYMF_THUNK -#define IMAGEHLP_SYMBOL_INFO_TLSRELATIVE SYMF_TLSREL - -#include - -#define MINIDUMP_SIGNATURE ('PMDM') -#define MINIDUMP_VERSION (42899) - typedef DWORD RVA; - typedef ULONG64 RVA64; - - typedef struct _MINIDUMP_LOCATION_DESCRIPTOR { - ULONG32 DataSize; - RVA Rva; - } MINIDUMP_LOCATION_DESCRIPTOR; - - typedef struct _MINIDUMP_LOCATION_DESCRIPTOR64 { - ULONG64 DataSize; - RVA64 Rva; - } MINIDUMP_LOCATION_DESCRIPTOR64; - - typedef struct _MINIDUMP_MEMORY_DESCRIPTOR { - ULONG64 StartOfMemoryRange; - MINIDUMP_LOCATION_DESCRIPTOR Memory; - } MINIDUMP_MEMORY_DESCRIPTOR,*PMINIDUMP_MEMORY_DESCRIPTOR; - - typedef struct _MINIDUMP_MEMORY_DESCRIPTOR64 { - ULONG64 StartOfMemoryRange; - ULONG64 DataSize; - } MINIDUMP_MEMORY_DESCRIPTOR64,*PMINIDUMP_MEMORY_DESCRIPTOR64; - - typedef struct _MINIDUMP_HEADER { - ULONG32 Signature; - ULONG32 Version; - ULONG32 NumberOfStreams; - RVA StreamDirectoryRva; - ULONG32 CheckSum; - union { - ULONG32 Reserved; - ULONG32 TimeDateStamp; - } DUMMYUNIONNAME; - ULONG64 Flags; - } MINIDUMP_HEADER,*PMINIDUMP_HEADER; - - typedef struct _MINIDUMP_DIRECTORY { - ULONG32 StreamType; - MINIDUMP_LOCATION_DESCRIPTOR Location; - } MINIDUMP_DIRECTORY,*PMINIDUMP_DIRECTORY; - - typedef struct _MINIDUMP_STRING { - ULONG32 Length; - WCHAR Buffer [0]; - } MINIDUMP_STRING,*PMINIDUMP_STRING; - - typedef enum _MINIDUMP_STREAM_TYPE { - UnusedStream = 0,ReservedStream0 = 1,ReservedStream1 = 2,ThreadListStream = 3,ModuleListStream = 4,MemoryListStream = 5, - ExceptionStream = 6,SystemInfoStream = 7,ThreadExListStream = 8,Memory64ListStream = 9,CommentStreamA = 10,CommentStreamW = 11, - HandleDataStream = 12,FunctionTableStream = 13,UnloadedModuleListStream = 14,MiscInfoStream = 15,LastReservedStream = 0xffff - } MINIDUMP_STREAM_TYPE; - - typedef union _CPU_INFORMATION { - struct { - ULONG32 VendorId [3 ]; - ULONG32 VersionInformation; - ULONG32 FeatureInformation; - ULONG32 AMDExtendedCpuFeatures; - } X86CpuInfo; - struct { - ULONG64 ProcessorFeatures [2 ]; - } OtherCpuInfo; - } CPU_INFORMATION,*PCPU_INFORMATION; - - typedef struct _MINIDUMP_SYSTEM_INFO { - USHORT ProcessorArchitecture; - USHORT ProcessorLevel; - USHORT ProcessorRevision; - union { - USHORT Reserved0; - struct { - UCHAR NumberOfProcessors; - UCHAR ProductType; - } DUMMYSTRUCTNAME; - } DUMMYUNIONNAME; - ULONG32 MajorVersion; - ULONG32 MinorVersion; - ULONG32 BuildNumber; - ULONG32 PlatformId; - RVA CSDVersionRva; - union { - ULONG32 Reserved1; - struct { - USHORT SuiteMask; - USHORT Reserved2; - } DUMMYSTRUCTNAME; - } DUMMYUNIONNAME1; - CPU_INFORMATION Cpu; - } MINIDUMP_SYSTEM_INFO,*PMINIDUMP_SYSTEM_INFO; - - C_ASSERT (sizeof (((PPROCESS_INFORMATION)0)->dwThreadId)==4); - - typedef struct _MINIDUMP_THREAD { - ULONG32 ThreadId; - ULONG32 SuspendCount; - ULONG32 PriorityClass; - ULONG32 Priority; - ULONG64 Teb; - MINIDUMP_MEMORY_DESCRIPTOR Stack; - MINIDUMP_LOCATION_DESCRIPTOR ThreadContext; - } MINIDUMP_THREAD,*PMINIDUMP_THREAD; - - typedef struct _MINIDUMP_THREAD_LIST { - ULONG32 NumberOfThreads; - MINIDUMP_THREAD Threads [0]; - } MINIDUMP_THREAD_LIST,*PMINIDUMP_THREAD_LIST; - - typedef struct _MINIDUMP_THREAD_EX { - ULONG32 ThreadId; - ULONG32 SuspendCount; - ULONG32 PriorityClass; - ULONG32 Priority; - ULONG64 Teb; - MINIDUMP_MEMORY_DESCRIPTOR Stack; - MINIDUMP_LOCATION_DESCRIPTOR ThreadContext; - MINIDUMP_MEMORY_DESCRIPTOR BackingStore; - } MINIDUMP_THREAD_EX,*PMINIDUMP_THREAD_EX; - - typedef struct _MINIDUMP_THREAD_EX_LIST { - ULONG32 NumberOfThreads; - MINIDUMP_THREAD_EX Threads [0]; - } MINIDUMP_THREAD_EX_LIST,*PMINIDUMP_THREAD_EX_LIST; - - typedef struct _MINIDUMP_EXCEPTION { - ULONG32 ExceptionCode; - ULONG32 ExceptionFlags; - ULONG64 ExceptionRecord; - ULONG64 ExceptionAddress; - ULONG32 NumberParameters; - ULONG32 __unusedAlignment; - ULONG64 ExceptionInformation [EXCEPTION_MAXIMUM_PARAMETERS ]; - } MINIDUMP_EXCEPTION,*PMINIDUMP_EXCEPTION; - - typedef struct MINIDUMP_EXCEPTION_STREAM { - ULONG32 ThreadId; - ULONG32 __alignment; - MINIDUMP_EXCEPTION ExceptionRecord; - MINIDUMP_LOCATION_DESCRIPTOR ThreadContext; - } MINIDUMP_EXCEPTION_STREAM,*PMINIDUMP_EXCEPTION_STREAM; - - typedef struct _MINIDUMP_MODULE { - ULONG64 BaseOfImage; - ULONG32 SizeOfImage; - ULONG32 CheckSum; - ULONG32 TimeDateStamp; - RVA ModuleNameRva; - VS_FIXEDFILEINFO VersionInfo; - MINIDUMP_LOCATION_DESCRIPTOR CvRecord; - MINIDUMP_LOCATION_DESCRIPTOR MiscRecord; - ULONG64 Reserved0; - ULONG64 Reserved1; - } MINIDUMP_MODULE,*PMINIDUMP_MODULE; - - typedef struct _MINIDUMP_MODULE_LIST { - ULONG32 NumberOfModules; - MINIDUMP_MODULE Modules [0 ]; - } MINIDUMP_MODULE_LIST,*PMINIDUMP_MODULE_LIST; - - typedef struct _MINIDUMP_MEMORY_LIST { - ULONG32 NumberOfMemoryRanges; - MINIDUMP_MEMORY_DESCRIPTOR MemoryRanges [0]; - } MINIDUMP_MEMORY_LIST,*PMINIDUMP_MEMORY_LIST; - - typedef struct _MINIDUMP_MEMORY64_LIST { - ULONG64 NumberOfMemoryRanges; - RVA64 BaseRva; - MINIDUMP_MEMORY_DESCRIPTOR64 MemoryRanges [0]; - } MINIDUMP_MEMORY64_LIST,*PMINIDUMP_MEMORY64_LIST; - - typedef struct _MINIDUMP_EXCEPTION_INFORMATION { - DWORD ThreadId; - PEXCEPTION_POINTERS ExceptionPointers; - BOOL ClientPointers; - } MINIDUMP_EXCEPTION_INFORMATION,*PMINIDUMP_EXCEPTION_INFORMATION; - - typedef struct _MINIDUMP_EXCEPTION_INFORMATION64 { - DWORD ThreadId; - ULONG64 ExceptionRecord; - ULONG64 ContextRecord; - BOOL ClientPointers; - } MINIDUMP_EXCEPTION_INFORMATION64,*PMINIDUMP_EXCEPTION_INFORMATION64; - - typedef struct _MINIDUMP_HANDLE_DESCRIPTOR { - ULONG64 Handle; - RVA TypeNameRva; - RVA ObjectNameRva; - ULONG32 Attributes; - ULONG32 GrantedAccess; - ULONG32 HandleCount; - ULONG32 PointerCount; - } MINIDUMP_HANDLE_DESCRIPTOR,*PMINIDUMP_HANDLE_DESCRIPTOR; - - typedef struct _MINIDUMP_HANDLE_DATA_STREAM { - ULONG32 SizeOfHeader; - ULONG32 SizeOfDescriptor; - ULONG32 NumberOfDescriptors; - ULONG32 Reserved; - } MINIDUMP_HANDLE_DATA_STREAM,*PMINIDUMP_HANDLE_DATA_STREAM; - - typedef struct _MINIDUMP_FUNCTION_TABLE_DESCRIPTOR { - ULONG64 MinimumAddress; - ULONG64 MaximumAddress; - ULONG64 BaseAddress; - ULONG32 EntryCount; - ULONG32 SizeOfAlignPad; - } MINIDUMP_FUNCTION_TABLE_DESCRIPTOR,*PMINIDUMP_FUNCTION_TABLE_DESCRIPTOR; - - typedef struct _MINIDUMP_FUNCTION_TABLE_STREAM { - ULONG32 SizeOfHeader; - ULONG32 SizeOfDescriptor; - ULONG32 SizeOfNativeDescriptor; - ULONG32 SizeOfFunctionEntry; - ULONG32 NumberOfDescriptors; - ULONG32 SizeOfAlignPad; - } MINIDUMP_FUNCTION_TABLE_STREAM,*PMINIDUMP_FUNCTION_TABLE_STREAM; - - typedef struct _MINIDUMP_UNLOADED_MODULE { - ULONG64 BaseOfImage; - ULONG32 SizeOfImage; - ULONG32 CheckSum; - ULONG32 TimeDateStamp; - RVA ModuleNameRva; - } MINIDUMP_UNLOADED_MODULE,*PMINIDUMP_UNLOADED_MODULE; - - typedef struct _MINIDUMP_UNLOADED_MODULE_LIST { - ULONG32 SizeOfHeader; - ULONG32 SizeOfEntry; - ULONG32 NumberOfEntries; - } MINIDUMP_UNLOADED_MODULE_LIST,*PMINIDUMP_UNLOADED_MODULE_LIST; - -#define MINIDUMP_MISC1_PROCESS_ID 0x00000001 -#define MINIDUMP_MISC1_PROCESS_TIMES 0x00000002 - - typedef struct _MINIDUMP_MISC_INFO { - ULONG32 SizeOfInfo; - ULONG32 Flags1; - ULONG32 ProcessId; - ULONG32 ProcessCreateTime; - ULONG32 ProcessUserTime; - ULONG32 ProcessKernelTime; - } MINIDUMP_MISC_INFO,*PMINIDUMP_MISC_INFO; - - typedef struct _MINIDUMP_USER_RECORD { - ULONG32 Type; - MINIDUMP_LOCATION_DESCRIPTOR Memory; - } MINIDUMP_USER_RECORD,*PMINIDUMP_USER_RECORD; - - typedef struct _MINIDUMP_USER_STREAM { - ULONG32 Type; - ULONG BufferSize; - PVOID Buffer; - } MINIDUMP_USER_STREAM,*PMINIDUMP_USER_STREAM; - - typedef struct _MINIDUMP_USER_STREAM_INFORMATION { - ULONG UserStreamCount; - PMINIDUMP_USER_STREAM UserStreamArray; - } MINIDUMP_USER_STREAM_INFORMATION,*PMINIDUMP_USER_STREAM_INFORMATION; - - typedef enum _MINIDUMP_CALLBACK_TYPE { - ModuleCallback,ThreadCallback,ThreadExCallback,IncludeThreadCallback,IncludeModuleCallback,MemoryCallback - } MINIDUMP_CALLBACK_TYPE; - - typedef struct _MINIDUMP_THREAD_CALLBACK { - ULONG ThreadId; - HANDLE ThreadHandle; - CONTEXT Context; - ULONG SizeOfContext; - ULONG64 StackBase; - ULONG64 StackEnd; - } MINIDUMP_THREAD_CALLBACK,*PMINIDUMP_THREAD_CALLBACK; - - typedef struct _MINIDUMP_THREAD_EX_CALLBACK { - ULONG ThreadId; - HANDLE ThreadHandle; - CONTEXT Context; - ULONG SizeOfContext; - ULONG64 StackBase; - ULONG64 StackEnd; - ULONG64 BackingStoreBase; - ULONG64 BackingStoreEnd; - } MINIDUMP_THREAD_EX_CALLBACK,*PMINIDUMP_THREAD_EX_CALLBACK; - - typedef struct _MINIDUMP_INCLUDE_THREAD_CALLBACK { - ULONG ThreadId; - } MINIDUMP_INCLUDE_THREAD_CALLBACK,*PMINIDUMP_INCLUDE_THREAD_CALLBACK; - - typedef enum _THREAD_WRITE_FLAGS { - ThreadWriteThread = 0x0001,ThreadWriteStack = 0x0002,ThreadWriteContext = 0x0004,ThreadWriteBackingStore = 0x0008, - ThreadWriteInstructionWindow = 0x0010,ThreadWriteThreadData = 0x0020 - } THREAD_WRITE_FLAGS; - - typedef struct _MINIDUMP_MODULE_CALLBACK { - PWCHAR FullPath; - ULONG64 BaseOfImage; - ULONG SizeOfImage; - ULONG CheckSum; - ULONG TimeDateStamp; - VS_FIXEDFILEINFO VersionInfo; - PVOID CvRecord; - ULONG SizeOfCvRecord; - PVOID MiscRecord; - ULONG SizeOfMiscRecord; - } MINIDUMP_MODULE_CALLBACK,*PMINIDUMP_MODULE_CALLBACK; - - typedef struct _MINIDUMP_INCLUDE_MODULE_CALLBACK { - ULONG64 BaseOfImage; - } MINIDUMP_INCLUDE_MODULE_CALLBACK,*PMINIDUMP_INCLUDE_MODULE_CALLBACK; - - typedef enum _MODULE_WRITE_FLAGS { - ModuleWriteModule = 0x0001,ModuleWriteDataSeg = 0x0002,ModuleWriteMiscRecord = 0x0004,ModuleWriteCvRecord = 0x0008, - ModuleReferencedByMemory = 0x0010 - } MODULE_WRITE_FLAGS; - - typedef struct _MINIDUMP_CALLBACK_INPUT { - ULONG ProcessId; - HANDLE ProcessHandle; - ULONG CallbackType; - union { - MINIDUMP_THREAD_CALLBACK Thread; - MINIDUMP_THREAD_EX_CALLBACK ThreadEx; - MINIDUMP_MODULE_CALLBACK Module; - MINIDUMP_INCLUDE_THREAD_CALLBACK IncludeThread; - MINIDUMP_INCLUDE_MODULE_CALLBACK IncludeModule; - } DUMMYUNIONNAME; - } MINIDUMP_CALLBACK_INPUT,*PMINIDUMP_CALLBACK_INPUT; - - typedef struct _MINIDUMP_CALLBACK_OUTPUT { - union { - ULONG ModuleWriteFlags; - ULONG ThreadWriteFlags; - struct { - ULONG64 MemoryBase; - ULONG MemorySize; - } DUMMYSTRUCTNAME; - } DUMMYUNIONNAME; - } MINIDUMP_CALLBACK_OUTPUT,*PMINIDUMP_CALLBACK_OUTPUT; - - typedef enum _MINIDUMP_TYPE { - MiniDumpNormal = 0x0000,MiniDumpWithDataSegs = 0x0001,MiniDumpWithFullMemory = 0x0002,MiniDumpWithHandleData = 0x0004, - MiniDumpFilterMemory = 0x0008,MiniDumpScanMemory = 0x0010,MiniDumpWithUnloadedModules = 0x0020,MiniDumpWithIndirectlyReferencedMemory = 0x0040, - MiniDumpFilterModulePaths = 0x0080,MiniDumpWithProcessThreadData = 0x0100,MiniDumpWithPrivateReadWriteMemory = 0x0200, - MiniDumpWithoutOptionalData = 0x0400 - } MINIDUMP_TYPE; - - typedef BOOL (WINAPI *MINIDUMP_CALLBACK_ROUTINE)(PVOID CallbackParam,CONST PMINIDUMP_CALLBACK_INPUT CallbackInput,PMINIDUMP_CALLBACK_OUTPUT CallbackOutput); - - typedef struct _MINIDUMP_CALLBACK_INFORMATION { - MINIDUMP_CALLBACK_ROUTINE CallbackRoutine; - PVOID CallbackParam; - } MINIDUMP_CALLBACK_INFORMATION,*PMINIDUMP_CALLBACK_INFORMATION; - -#define RVA_TO_ADDR(Mapping,Rva) ((PVOID)(((ULONG_PTR) (Mapping)) + (Rva))) - - BOOL WINAPI MiniDumpWriteDump(HANDLE hProcess,DWORD ProcessId,HANDLE hFile,MINIDUMP_TYPE DumpType,CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam); - BOOL WINAPI MiniDumpReadDumpStream(PVOID BaseOfDump,ULONG StreamNumber,PMINIDUMP_DIRECTORY *Dir,PVOID *StreamPointer,ULONG *StreamSize); - -#include - -#ifdef __cplusplus -} -#endif -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_atomic.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_atomic.h deleted file mode 100644 index 2f2b42b346f..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_atomic.h +++ /dev/null @@ -1,349 +0,0 @@ -/** - * Many similar implementations exist. See for example libwsbm - * or the linux kernel include/atomic.h - * - * No copyright claimed on this file. - * - */ - -#ifndef U_ATOMIC_H -#define U_ATOMIC_H - -#include "pipe/p_compiler.h" -#include "pipe/p_defines.h" - -/* Favor OS-provided implementations. - * - * Where no OS-provided implementation is available, fall back to - * locally coded assembly, compiler intrinsic or ultimately a - * mutex-based implementation. - */ -#if defined(PIPE_OS_SOLARIS) -#define PIPE_ATOMIC_OS_SOLARIS -#elif defined(PIPE_CC_MSVC) -#define PIPE_ATOMIC_MSVC_INTRINSIC -#elif (defined(PIPE_CC_MSVC) && defined(PIPE_ARCH_X86)) -#define PIPE_ATOMIC_ASM_MSVC_X86 -#elif (defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86)) -#define PIPE_ATOMIC_ASM_GCC_X86 -#elif (defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86_64)) -#define PIPE_ATOMIC_ASM_GCC_X86_64 -#elif defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 401) -#define PIPE_ATOMIC_GCC_INTRINSIC -#else -#error "Unsupported platform" -#endif - - -#if defined(PIPE_ATOMIC_ASM_GCC_X86_64) -#define PIPE_ATOMIC "GCC x86_64 assembly" - -#ifdef __cplusplus -extern "C" { -#endif - -#define p_atomic_set(_v, _i) (*(_v) = (_i)) -#define p_atomic_read(_v) (*(_v)) - -static INLINE boolean -p_atomic_dec_zero(int32_t *v) -{ - unsigned char c; - - __asm__ __volatile__("lock; decl %0; sete %1":"+m"(*v), "=qm"(c) - ::"memory"); - - return c != 0; -} - -static INLINE void -p_atomic_inc(int32_t *v) -{ - __asm__ __volatile__("lock; incl %0":"+m"(*v)); -} - -static INLINE void -p_atomic_dec(int32_t *v) -{ - __asm__ __volatile__("lock; decl %0":"+m"(*v)); -} - -static INLINE int32_t -p_atomic_cmpxchg(int32_t *v, int32_t old, int32_t _new) -{ - return __sync_val_compare_and_swap(v, old, _new); -} - -#ifdef __cplusplus -} -#endif - -#endif /* PIPE_ATOMIC_ASM_GCC_X86_64 */ - - -#if defined(PIPE_ATOMIC_ASM_GCC_X86) - -#define PIPE_ATOMIC "GCC x86 assembly" - -#ifdef __cplusplus -extern "C" { -#endif - -#define p_atomic_set(_v, _i) (*(_v) = (_i)) -#define p_atomic_read(_v) (*(_v)) - -static INLINE boolean -p_atomic_dec_zero(int32_t *v) -{ - unsigned char c; - - __asm__ __volatile__("lock; decl %0; sete %1":"+m"(*v), "=qm"(c) - ::"memory"); - - return c != 0; -} - -static INLINE void -p_atomic_inc(int32_t *v) -{ - __asm__ __volatile__("lock; incl %0":"+m"(*v)); -} - -static INLINE void -p_atomic_dec(int32_t *v) -{ - __asm__ __volatile__("lock; decl %0":"+m"(*v)); -} - -static INLINE int32_t -p_atomic_cmpxchg(int32_t *v, int32_t old, int32_t _new) -{ - return __sync_val_compare_and_swap(v, old, _new); -} - -#ifdef __cplusplus -} -#endif - -#endif - - - -/* Implementation using GCC-provided synchronization intrinsics - */ -#if defined(PIPE_ATOMIC_GCC_INTRINSIC) - -#define PIPE_ATOMIC "GCC Sync Intrinsics" - -#ifdef __cplusplus -extern "C" { -#endif - -#define p_atomic_set(_v, _i) (*(_v) = (_i)) -#define p_atomic_read(_v) (*(_v)) - -static INLINE boolean -p_atomic_dec_zero(int32_t *v) -{ - return (__sync_sub_and_fetch(v, 1) == 0); -} - -static INLINE void -p_atomic_inc(int32_t *v) -{ - (void) __sync_add_and_fetch(v, 1); -} - -static INLINE void -p_atomic_dec(int32_t *v) -{ - (void) __sync_sub_and_fetch(v, 1); -} - -static INLINE int32_t -p_atomic_cmpxchg(int32_t *v, int32_t old, int32_t _new) -{ - return __sync_val_compare_and_swap(v, old, _new); -} - -#ifdef __cplusplus -} -#endif - -#endif - - - -/* Unlocked version for single threaded environments, such as some - * windows kernel modules. - */ -#if defined(PIPE_ATOMIC_OS_UNLOCKED) - -#define PIPE_ATOMIC "Unlocked" - -#define p_atomic_set(_v, _i) (*(_v) = (_i)) -#define p_atomic_read(_v) (*(_v)) -#define p_atomic_dec_zero(_v) ((boolean) --(*(_v))) -#define p_atomic_inc(_v) ((void) (*(_v))++) -#define p_atomic_dec(_v) ((void) (*(_v))--) -#define p_atomic_cmpxchg(_v, old, _new) (*(_v) == old ? *(_v) = (_new) : *(_v)) - -#endif - - -/* Locally coded assembly for MSVC on x86: - */ -#if defined(PIPE_ATOMIC_ASM_MSVC_X86) - -#define PIPE_ATOMIC "MSVC x86 assembly" - -#ifdef __cplusplus -extern "C" { -#endif - -#define p_atomic_set(_v, _i) (*(_v) = (_i)) -#define p_atomic_read(_v) (*(_v)) - -static INLINE boolean -p_atomic_dec_zero(int32_t *v) -{ - unsigned char c; - - __asm { - mov eax, [v] - lock dec dword ptr [eax] - sete byte ptr [c] - } - - return c != 0; -} - -static INLINE void -p_atomic_inc(int32_t *v) -{ - __asm { - mov eax, [v] - lock inc dword ptr [eax] - } -} - -static INLINE void -p_atomic_dec(int32_t *v) -{ - __asm { - mov eax, [v] - lock dec dword ptr [eax] - } -} - -static INLINE int32_t -p_atomic_cmpxchg(int32_t *v, int32_t old, int32_t _new) -{ - int32_t orig; - - __asm { - mov ecx, [v] - mov eax, [old] - mov edx, [_new] - lock cmpxchg [ecx], edx - mov [orig], eax - } - - return orig; -} - -#ifdef __cplusplus -} -#endif - -#endif - - -#if defined(PIPE_ATOMIC_MSVC_INTRINSIC) - -#define PIPE_ATOMIC "MSVC Intrinsics" - -#include - -#pragma intrinsic(_InterlockedIncrement) -#pragma intrinsic(_InterlockedDecrement) -#pragma intrinsic(_InterlockedCompareExchange) - -#ifdef __cplusplus -extern "C" { -#endif - -#define p_atomic_set(_v, _i) (*(_v) = (_i)) -#define p_atomic_read(_v) (*(_v)) - -static INLINE boolean -p_atomic_dec_zero(int32_t *v) -{ - return _InterlockedDecrement((long *)v) == 0; -} - -static INLINE void -p_atomic_inc(int32_t *v) -{ - _InterlockedIncrement((long *)v); -} - -static INLINE void -p_atomic_dec(int32_t *v) -{ - _InterlockedDecrement((long *)v); -} - -static INLINE int32_t -p_atomic_cmpxchg(int32_t *v, int32_t old, int32_t _new) -{ - return _InterlockedCompareExchange((long *)v, _new, old); -} - -#ifdef __cplusplus -} -#endif - -#endif - -#if defined(PIPE_ATOMIC_OS_SOLARIS) - -#define PIPE_ATOMIC "Solaris OS atomic functions" - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define p_atomic_set(_v, _i) (*(_v) = (_i)) -#define p_atomic_read(_v) (*(_v)) - -static INLINE boolean -p_atomic_dec_zero(int32_t *v) -{ - uint32_t n = atomic_dec_32_nv((uint32_t *) v); - - return n != 0; -} - -#define p_atomic_inc(_v) atomic_inc_32((uint32_t *) _v) -#define p_atomic_dec(_v) atomic_dec_32((uint32_t *) _v) - -#define p_atomic_cmpxchg(_v, _old, _new) \ - atomic_cas_32( (uint32_t *) _v, (uint32_t) _old, (uint32_t) _new) - -#ifdef __cplusplus -} -#endif - -#endif - - -#ifndef PIPE_ATOMIC -#error "No pipe_atomic implementation selected" -#endif - - - -#endif /* U_ATOMIC_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_bitmask.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_bitmask.c deleted file mode 100644 index 23c93a3ebcb..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_bitmask.c +++ /dev/null @@ -1,328 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Generic bitmask implementation. - * - * @author Jose Fonseca - */ - - -#include "pipe/p_compiler.h" -#include "util/u_debug.h" - -#include "util/u_memory.h" -#include "util/u_bitmask.h" - - -typedef uint32_t util_bitmask_word; - - -#define UTIL_BITMASK_INITIAL_WORDS 16 -#define UTIL_BITMASK_BITS_PER_BYTE 8 -#define UTIL_BITMASK_BITS_PER_WORD (sizeof(util_bitmask_word) * UTIL_BITMASK_BITS_PER_BYTE) - - -struct util_bitmask -{ - util_bitmask_word *words; - - /** Number of bits we can currently hold */ - unsigned size; - - /** Number of consecutive bits set at the start of the bitmask */ - unsigned filled; -}; - - -struct util_bitmask * -util_bitmask_create(void) -{ - struct util_bitmask *bm; - - bm = MALLOC_STRUCT(util_bitmask); - if(!bm) - return NULL; - - bm->words = (util_bitmask_word *)CALLOC(UTIL_BITMASK_INITIAL_WORDS, sizeof(util_bitmask_word)); - if(!bm->words) { - FREE(bm); - return NULL; - } - - bm->size = UTIL_BITMASK_INITIAL_WORDS * UTIL_BITMASK_BITS_PER_WORD; - bm->filled = 0; - - return bm; -} - - -/** - * Resize the bitmask if necessary - */ -static INLINE boolean -util_bitmask_resize(struct util_bitmask *bm, - unsigned minimum_index) -{ - unsigned minimum_size = minimum_index + 1; - unsigned new_size; - util_bitmask_word *new_words; - - /* Check integer overflow */ - if(!minimum_size) - return FALSE; - - if(bm->size >= minimum_size) - return TRUE; - - assert(bm->size % UTIL_BITMASK_BITS_PER_WORD == 0); - new_size = bm->size; - while(new_size < minimum_size) { - new_size *= 2; - /* Check integer overflow */ - if(new_size < bm->size) - return FALSE; - } - assert(new_size); - assert(new_size % UTIL_BITMASK_BITS_PER_WORD == 0); - - new_words = (util_bitmask_word *)REALLOC((void *)bm->words, - bm->size / UTIL_BITMASK_BITS_PER_BYTE, - new_size / UTIL_BITMASK_BITS_PER_BYTE); - if(!new_words) - return FALSE; - - memset(new_words + bm->size/UTIL_BITMASK_BITS_PER_WORD, - 0, - (new_size - bm->size)/UTIL_BITMASK_BITS_PER_BYTE); - - bm->size = new_size; - bm->words = new_words; - - return TRUE; -} - - -/** - * Lazily update the filled. - */ -static INLINE void -util_bitmask_filled_set(struct util_bitmask *bm, - unsigned index) -{ - assert(bm->filled <= bm->size); - assert(index < bm->size); - - if(index == bm->filled) { - ++bm->filled; - assert(bm->filled <= bm->size); - } -} - -static INLINE void -util_bitmask_filled_unset(struct util_bitmask *bm, - unsigned index) -{ - assert(bm->filled <= bm->size); - assert(index < bm->size); - - if(index < bm->filled) - bm->filled = index; -} - - -unsigned -util_bitmask_add(struct util_bitmask *bm) -{ - unsigned word; - unsigned bit; - util_bitmask_word mask; - - assert(bm); - - /* linear search for an empty index */ - word = bm->filled / UTIL_BITMASK_BITS_PER_WORD; - bit = bm->filled % UTIL_BITMASK_BITS_PER_WORD; - mask = 1 << bit; - while(word < bm->size / UTIL_BITMASK_BITS_PER_WORD) { - while(bit < UTIL_BITMASK_BITS_PER_WORD) { - if(!(bm->words[word] & mask)) - goto found; - ++bm->filled; - ++bit; - mask <<= 1; - } - ++word; - bit = 0; - mask = 1; - } -found: - - /* grow the bitmask if necessary */ - if(!util_bitmask_resize(bm, bm->filled)) - return UTIL_BITMASK_INVALID_INDEX; - - assert(!(bm->words[word] & mask)); - bm->words[word] |= mask; - - return bm->filled++; -} - - -unsigned -util_bitmask_set(struct util_bitmask *bm, - unsigned index) -{ - unsigned word; - unsigned bit; - util_bitmask_word mask; - - assert(bm); - - /* grow the bitmask if necessary */ - if(!util_bitmask_resize(bm, index)) - return UTIL_BITMASK_INVALID_INDEX; - - word = index / UTIL_BITMASK_BITS_PER_WORD; - bit = index % UTIL_BITMASK_BITS_PER_WORD; - mask = 1 << bit; - - bm->words[word] |= mask; - - util_bitmask_filled_set(bm, index); - - return index; -} - - -void -util_bitmask_clear(struct util_bitmask *bm, - unsigned index) -{ - unsigned word; - unsigned bit; - util_bitmask_word mask; - - assert(bm); - - if(index >= bm->size) - return; - - word = index / UTIL_BITMASK_BITS_PER_WORD; - bit = index % UTIL_BITMASK_BITS_PER_WORD; - mask = 1 << bit; - - bm->words[word] &= ~mask; - - util_bitmask_filled_unset(bm, index); -} - - -boolean -util_bitmask_get(struct util_bitmask *bm, - unsigned index) -{ - unsigned word = index / UTIL_BITMASK_BITS_PER_WORD; - unsigned bit = index % UTIL_BITMASK_BITS_PER_WORD; - util_bitmask_word mask = 1 << bit; - - assert(bm); - - if(index < bm->filled) { - assert(bm->words[word] & mask); - return TRUE; - } - - if(index >= bm->size) - return FALSE; - - if(bm->words[word] & mask) { - util_bitmask_filled_set(bm, index); - return TRUE; - } - else - return FALSE; -} - - -unsigned -util_bitmask_get_next_index(struct util_bitmask *bm, - unsigned index) -{ - unsigned word = index / UTIL_BITMASK_BITS_PER_WORD; - unsigned bit = index % UTIL_BITMASK_BITS_PER_WORD; - util_bitmask_word mask = 1 << bit; - - if(index < bm->filled) { - assert(bm->words[word] & mask); - return index; - } - - if(index >= bm->size) { - return UTIL_BITMASK_INVALID_INDEX; - } - - /* Do a linear search */ - while(word < bm->size / UTIL_BITMASK_BITS_PER_WORD) { - while(bit < UTIL_BITMASK_BITS_PER_WORD) { - if(bm->words[word] & mask) { - if(index == bm->filled) { - ++bm->filled; - assert(bm->filled <= bm->size); - } - return index; - } - ++index; - ++bit; - mask <<= 1; - } - ++word; - bit = 0; - mask = 1; - } - - return UTIL_BITMASK_INVALID_INDEX; -} - - -unsigned -util_bitmask_get_first_index(struct util_bitmask *bm) -{ - return util_bitmask_get_next_index(bm, 0); -} - - -void -util_bitmask_destroy(struct util_bitmask *bm) -{ - assert(bm); - - FREE(bm->words); - FREE(bm); -} - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_bitmask.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_bitmask.h deleted file mode 100644 index 98b85ddecd5..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_bitmask.h +++ /dev/null @@ -1,117 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Generic bitmask. - * - * @author Jose Fonseca - */ - -#ifndef U_HANDLE_BITMASK_H_ -#define U_HANDLE_BITMASK_H_ - - -#include "pipe/p_compiler.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -#define UTIL_BITMASK_INVALID_INDEX (~0U) - - -/** - * Abstract data type to represent arbitrary set of bits. - */ -struct util_bitmask; - - -struct util_bitmask * -util_bitmask_create(void); - - -/** - * Search a cleared bit and set it. - * - * It searches for the first cleared bit. - * - * Returns the bit index on success, or UTIL_BITMASK_INVALID_INDEX on out of - * memory growing the bitmask. - */ -unsigned -util_bitmask_add(struct util_bitmask *bm); - -/** - * Set a bit. - * - * Returns the input index on success, or UTIL_BITMASK_INVALID_INDEX on out of - * memory growing the bitmask. - */ -unsigned -util_bitmask_set(struct util_bitmask *bm, - unsigned index); - -void -util_bitmask_clear(struct util_bitmask *bm, - unsigned index); - -boolean -util_bitmask_get(struct util_bitmask *bm, - unsigned index); - - -void -util_bitmask_destroy(struct util_bitmask *bm); - - -/** - * Search for the first set bit. - * - * Returns UTIL_BITMASK_INVALID_INDEX if a set bit cannot be found. - */ -unsigned -util_bitmask_get_first_index(struct util_bitmask *bm); - - -/** - * Search for the first set bit, starting from the giving index. - * - * Returns UTIL_BITMASK_INVALID_INDEX if a set bit cannot be found. - */ -unsigned -util_bitmask_get_next_index(struct util_bitmask *bm, - unsigned index); - - -#ifdef __cplusplus -} -#endif - -#endif /* U_HANDLE_BITMASK_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_blit.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_blit.c deleted file mode 100644 index a10fd17cbff..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_blit.c +++ /dev/null @@ -1,804 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Copy/blit pixel rect between surfaces - * - * @author Brian Paul - */ - - -#include "pipe/p_context.h" -#include "util/u_debug.h" -#include "pipe/p_defines.h" -#include "util/u_inlines.h" -#include "pipe/p_shader_tokens.h" -#include "pipe/p_state.h" - -#include "util/u_blit.h" -#include "util/u_draw_quad.h" -#include "util/u_format.h" -#include "util/u_math.h" -#include "util/u_memory.h" -#include "util/u_sampler.h" -#include "util/u_simple_shaders.h" - -#include "cso_cache/cso_context.h" - - -struct blit_state -{ - struct pipe_context *pipe; - struct cso_context *cso; - - struct pipe_blend_state blend; - struct pipe_depth_stencil_alpha_state depthstencil_keep; - struct pipe_depth_stencil_alpha_state depthstencil_write; - struct pipe_rasterizer_state rasterizer; - struct pipe_sampler_state sampler; - struct pipe_viewport_state viewport; - struct pipe_vertex_element velem[2]; - enum pipe_texture_target internal_target; - - void *vs; - void *fs[TGSI_WRITEMASK_XYZW + 1]; - void *fs_depth; - - struct pipe_resource *vbuf; /**< quad vertices */ - unsigned vbuf_slot; - - float vertices[4][2][4]; /**< vertex/texcoords for quad */ -}; - - -/** - * Create state object for blit. - * Intended to be created once and re-used for many blit() calls. - */ -struct blit_state * -util_create_blit(struct pipe_context *pipe, struct cso_context *cso) -{ - struct blit_state *ctx; - uint i; - - ctx = CALLOC_STRUCT(blit_state); - if (!ctx) - return NULL; - - ctx->pipe = pipe; - ctx->cso = cso; - - /* disabled blending/masking */ - memset(&ctx->blend, 0, sizeof(ctx->blend)); - ctx->blend.rt[0].colormask = PIPE_MASK_RGBA; - - /* no-op depth/stencil/alpha */ - memset(&ctx->depthstencil_keep, 0, sizeof(ctx->depthstencil_keep)); - memset(&ctx->depthstencil_write, 0, sizeof(ctx->depthstencil_write)); - ctx->depthstencil_write.depth.enabled = 1; - ctx->depthstencil_write.depth.writemask = 1; - ctx->depthstencil_write.depth.func = PIPE_FUNC_ALWAYS; - - /* rasterizer */ - memset(&ctx->rasterizer, 0, sizeof(ctx->rasterizer)); - ctx->rasterizer.cull_face = PIPE_FACE_NONE; - ctx->rasterizer.gl_rasterization_rules = 1; - ctx->rasterizer.depth_clip = 1; - - /* samplers */ - memset(&ctx->sampler, 0, sizeof(ctx->sampler)); - ctx->sampler.wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - ctx->sampler.wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - ctx->sampler.wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - ctx->sampler.min_mip_filter = PIPE_TEX_MIPFILTER_NONE; - ctx->sampler.min_img_filter = 0; /* set later */ - ctx->sampler.mag_img_filter = 0; /* set later */ - - /* vertex elements state */ - memset(&ctx->velem[0], 0, sizeof(ctx->velem[0]) * 2); - for (i = 0; i < 2; i++) { - ctx->velem[i].src_offset = i * 4 * sizeof(float); - ctx->velem[i].instance_divisor = 0; - ctx->velem[i].vertex_buffer_index = 0; - ctx->velem[i].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT; - } - - ctx->vbuf = NULL; - - /* init vertex data that doesn't change */ - for (i = 0; i < 4; i++) { - ctx->vertices[i][0][3] = 1.0f; /* w */ - ctx->vertices[i][1][2] = 0.0f; /* r */ - ctx->vertices[i][1][3] = 1.0f; /* q */ - } - - if(pipe->screen->get_param(pipe->screen, PIPE_CAP_NPOT_TEXTURES)) - ctx->internal_target = PIPE_TEXTURE_2D; - else - ctx->internal_target = PIPE_TEXTURE_RECT; - - return ctx; -} - - -/** - * Destroy a blit context - */ -void -util_destroy_blit(struct blit_state *ctx) -{ - struct pipe_context *pipe = ctx->pipe; - unsigned i; - - if (ctx->vs) - pipe->delete_vs_state(pipe, ctx->vs); - - for (i = 0; i < Elements(ctx->fs); i++) - if (ctx->fs[i]) - pipe->delete_fs_state(pipe, ctx->fs[i]); - - if (ctx->fs_depth) - pipe->delete_fs_state(pipe, ctx->fs_depth); - - pipe_resource_reference(&ctx->vbuf, NULL); - - FREE(ctx); -} - - -/** - * Helper function to set the fragment shaders. - */ -static INLINE void -set_fragment_shader(struct blit_state *ctx, uint writemask) -{ - if (!ctx->fs[writemask]) - ctx->fs[writemask] = - util_make_fragment_tex_shader_writemask(ctx->pipe, TGSI_TEXTURE_2D, - TGSI_INTERPOLATE_LINEAR, - writemask); - - cso_set_fragment_shader_handle(ctx->cso, ctx->fs[writemask]); -} - - -/** - * Helper function to set the depthwrite shader. - */ -static INLINE void -set_depth_fragment_shader(struct blit_state *ctx) -{ - if (!ctx->fs_depth) - ctx->fs_depth = - util_make_fragment_tex_shader_writedepth(ctx->pipe, TGSI_TEXTURE_2D, - TGSI_INTERPOLATE_LINEAR); - - cso_set_fragment_shader_handle(ctx->cso, ctx->fs_depth); -} - - -/** - * Helper function to set the vertex shader. - */ -static INLINE void -set_vertex_shader(struct blit_state *ctx) -{ - /* vertex shader - still required to provide the linkage between - * fragment shader input semantics and vertex_element/buffers. - */ - if (!ctx->vs) { - const uint semantic_names[] = { TGSI_SEMANTIC_POSITION, - TGSI_SEMANTIC_GENERIC }; - const uint semantic_indexes[] = { 0, 0 }; - ctx->vs = util_make_vertex_passthrough_shader(ctx->pipe, 2, - semantic_names, - semantic_indexes); - } - - cso_set_vertex_shader_handle(ctx->cso, ctx->vs); -} - - -/** - * Get offset of next free slot in vertex buffer for quad vertices. - */ -static unsigned -get_next_slot( struct blit_state *ctx ) -{ - const unsigned max_slots = 4096 / sizeof ctx->vertices; - - if (ctx->vbuf_slot >= max_slots) - util_blit_flush( ctx ); - - if (!ctx->vbuf) { - ctx->vbuf = pipe_buffer_create(ctx->pipe->screen, - PIPE_BIND_VERTEX_BUFFER, - PIPE_USAGE_STREAM, - max_slots * sizeof ctx->vertices); - } - - return ctx->vbuf_slot++ * sizeof ctx->vertices; -} - - - - -/** - * Setup vertex data for the textured quad we'll draw. - * Note: y=0=top - */ -static unsigned -setup_vertex_data_tex(struct blit_state *ctx, - float x0, float y0, float x1, float y1, - float s0, float t0, float s1, float t1, - float z) -{ - unsigned offset; - - ctx->vertices[0][0][0] = x0; - ctx->vertices[0][0][1] = y0; - ctx->vertices[0][0][2] = z; - ctx->vertices[0][1][0] = s0; /*s*/ - ctx->vertices[0][1][1] = t0; /*t*/ - - ctx->vertices[1][0][0] = x1; - ctx->vertices[1][0][1] = y0; - ctx->vertices[1][0][2] = z; - ctx->vertices[1][1][0] = s1; /*s*/ - ctx->vertices[1][1][1] = t0; /*t*/ - - ctx->vertices[2][0][0] = x1; - ctx->vertices[2][0][1] = y1; - ctx->vertices[2][0][2] = z; - ctx->vertices[2][1][0] = s1; - ctx->vertices[2][1][1] = t1; - - ctx->vertices[3][0][0] = x0; - ctx->vertices[3][0][1] = y1; - ctx->vertices[3][0][2] = z; - ctx->vertices[3][1][0] = s0; - ctx->vertices[3][1][1] = t1; - - offset = get_next_slot( ctx ); - - if (ctx->vbuf) { - pipe_buffer_write_nooverlap(ctx->pipe, ctx->vbuf, - offset, sizeof(ctx->vertices), ctx->vertices); - } - - return offset; -} - - -/** - * \return TRUE if two regions overlap, FALSE otherwise - */ -static boolean -regions_overlap(int srcX0, int srcY0, - int srcX1, int srcY1, - int dstX0, int dstY0, - int dstX1, int dstY1) -{ - if (MAX2(srcX0, srcX1) < MIN2(dstX0, dstX1)) - return FALSE; /* src completely left of dst */ - - if (MAX2(dstX0, dstX1) < MIN2(srcX0, srcX1)) - return FALSE; /* dst completely left of src */ - - if (MAX2(srcY0, srcY1) < MIN2(dstY0, dstY1)) - return FALSE; /* src completely above dst */ - - if (MAX2(dstY0, dstY1) < MIN2(srcY0, srcY1)) - return FALSE; /* dst completely above src */ - - return TRUE; /* some overlap */ -} - - -/** - * Copy pixel block from src surface to dst surface. - * Overlapping regions are acceptable. - * Flipping and stretching are supported. - * \param filter one of PIPE_TEX_MIPFILTER_NEAREST/LINEAR - * \param writemask controls which channels in the dest surface are sourced - * from the src surface. Disabled channels are sourced - * from (0,0,0,1). - * XXX need some control over blitting stencil. - */ -void -util_blit_pixels_writemask(struct blit_state *ctx, - struct pipe_resource *src_tex, - unsigned src_level, - int srcX0, int srcY0, - int srcX1, int srcY1, - int srcZ0, - struct pipe_surface *dst, - int dstX0, int dstY0, - int dstX1, int dstY1, - float z, uint filter, - uint writemask) -{ - struct pipe_context *pipe = ctx->pipe; - struct pipe_screen *screen = pipe->screen; - enum pipe_format src_format, dst_format; - struct pipe_sampler_view *sampler_view = NULL; - struct pipe_sampler_view sv_templ; - struct pipe_surface *dst_surface; - struct pipe_framebuffer_state fb; - const int srcW = abs(srcX1 - srcX0); - const int srcH = abs(srcY1 - srcY0); - unsigned offset; - boolean overlap, dst_is_depth; - float s0, t0, s1, t1; - boolean normalized; - - assert(filter == PIPE_TEX_MIPFILTER_NEAREST || - filter == PIPE_TEX_MIPFILTER_LINEAR); - - assert(src_level <= src_tex->last_level); - - /* do the regions overlap? */ - overlap = src_tex == dst->texture && - dst->u.tex.level == src_level && - dst->u.tex.first_layer == srcZ0 && - regions_overlap(srcX0, srcY0, srcX1, srcY1, - dstX0, dstY0, dstX1, dstY1); - - src_format = util_format_linear(src_tex->format); - dst_format = util_format_linear(dst->format); - - /* - * Check for simple case: no format conversion, no flipping, no stretching, - * no overlapping. - * Filter mode should not matter since there's no stretching. - */ - if (dst_format == src_format && - srcX0 < srcX1 && - dstX0 < dstX1 && - srcY0 < srcY1 && - dstY0 < dstY1 && - (dstX1 - dstX0) == (srcX1 - srcX0) && - (dstY1 - dstY0) == (srcY1 - srcY0) && - !overlap) { - struct pipe_box src_box; - src_box.x = srcX0; - src_box.y = srcY0; - src_box.z = srcZ0; - src_box.width = srcW; - src_box.height = srcH; - src_box.depth = 1; - pipe->resource_copy_region(pipe, - dst->texture, dst->u.tex.level, - dstX0, dstY0, dst->u.tex.first_layer,/* dest */ - src_tex, src_level, - &src_box); - return; - } - - if (dst_format == dst->format) { - dst_surface = dst; - } else { - struct pipe_surface templ = *dst; - templ.format = dst_format; - dst_surface = pipe->create_surface(pipe, dst->texture, &templ); - } - - /* Create a temporary texture when src and dest alias or when src - * is anything other than a 2d texture. - * XXX should just use appropriate shader to access 1d / 3d slice / cube face, - * much like the u_blitter code does (should be pretty trivial). - * - * This can still be improved upon. - */ - if ((src_tex == dst_surface->texture && - dst_surface->u.tex.level == src_level && - dst_surface->u.tex.first_layer == srcZ0) || - (src_tex->target != PIPE_TEXTURE_2D && - src_tex->target != PIPE_TEXTURE_2D && - src_tex->target != PIPE_TEXTURE_RECT)) - { - struct pipe_resource texTemp; - struct pipe_resource *tex; - struct pipe_sampler_view sv_templ; - struct pipe_box src_box; - const int srcLeft = MIN2(srcX0, srcX1); - const int srcTop = MIN2(srcY0, srcY1); - - if (srcLeft != srcX0) { - /* left-right flip */ - int tmp = dstX0; - dstX0 = dstX1; - dstX1 = tmp; - } - - if (srcTop != srcY0) { - /* up-down flip */ - int tmp = dstY0; - dstY0 = dstY1; - dstY1 = tmp; - } - - /* create temp texture */ - memset(&texTemp, 0, sizeof(texTemp)); - texTemp.target = ctx->internal_target; - texTemp.format = src_format; - texTemp.last_level = 0; - texTemp.width0 = srcW; - texTemp.height0 = srcH; - texTemp.depth0 = 1; - texTemp.array_size = 1; - texTemp.bind = PIPE_BIND_SAMPLER_VIEW; - - tex = screen->resource_create(screen, &texTemp); - if (!tex) - return; - - src_box.x = srcLeft; - src_box.y = srcTop; - src_box.z = srcZ0; - src_box.width = srcW; - src_box.height = srcH; - src_box.depth = 1; - /* load temp texture */ - pipe->resource_copy_region(pipe, - tex, 0, 0, 0, 0, /* dest */ - src_tex, src_level, &src_box); - - normalized = tex->target != PIPE_TEXTURE_RECT; - if(normalized) { - s0 = 0.0f; - s1 = 1.0f; - t0 = 0.0f; - t1 = 1.0f; - } - else { - s0 = 0; - s1 = srcW; - t0 = 0; - t1 = srcH; - } - - u_sampler_view_default_template(&sv_templ, tex, tex->format); - sampler_view = pipe->create_sampler_view(pipe, tex, &sv_templ); - - if (!sampler_view) { - pipe_resource_reference(&tex, NULL); - return; - } - pipe_resource_reference(&tex, NULL); - } - else { - u_sampler_view_default_template(&sv_templ, src_tex, src_format); - sampler_view = pipe->create_sampler_view(pipe, src_tex, &sv_templ); - - if (!sampler_view) { - return; - } - - s0 = srcX0; - s1 = srcX1; - t0 = srcY0; - t1 = srcY1; - normalized = sampler_view->texture->target != PIPE_TEXTURE_RECT; - if(normalized) - { - s0 /= (float)(u_minify(sampler_view->texture->width0, src_level)); - s1 /= (float)(u_minify(sampler_view->texture->width0, src_level)); - t0 /= (float)(u_minify(sampler_view->texture->height0, src_level)); - t1 /= (float)(u_minify(sampler_view->texture->height0, src_level)); - } - } - - dst_is_depth = util_format_is_depth_or_stencil(dst_format); - - assert(screen->is_format_supported(screen, sampler_view->format, ctx->internal_target, - sampler_view->texture->nr_samples, - PIPE_BIND_SAMPLER_VIEW)); - assert(screen->is_format_supported(screen, dst_format, ctx->internal_target, - dst_surface->texture->nr_samples, - dst_is_depth ? PIPE_BIND_DEPTH_STENCIL : - PIPE_BIND_RENDER_TARGET)); - /* save state (restored below) */ - cso_save_blend(ctx->cso); - cso_save_depth_stencil_alpha(ctx->cso); - cso_save_rasterizer(ctx->cso); - cso_save_samplers(ctx->cso); - cso_save_fragment_sampler_views(ctx->cso); - cso_save_stream_outputs(ctx->cso); - cso_save_viewport(ctx->cso); - cso_save_framebuffer(ctx->cso); - cso_save_fragment_shader(ctx->cso); - cso_save_vertex_shader(ctx->cso); - cso_save_geometry_shader(ctx->cso); - cso_save_vertex_elements(ctx->cso); - cso_save_vertex_buffers(ctx->cso); - - /* set misc state we care about */ - cso_set_blend(ctx->cso, &ctx->blend); - cso_set_depth_stencil_alpha(ctx->cso, - dst_is_depth ? &ctx->depthstencil_write : - &ctx->depthstencil_keep); - cso_set_rasterizer(ctx->cso, &ctx->rasterizer); - cso_set_vertex_elements(ctx->cso, 2, ctx->velem); - cso_set_stream_outputs(ctx->cso, 0, NULL, 0); - - /* sampler */ - ctx->sampler.normalized_coords = normalized; - ctx->sampler.min_img_filter = filter; - ctx->sampler.mag_img_filter = filter; - ctx->sampler.min_lod = src_level; - ctx->sampler.max_lod = src_level; - cso_single_sampler(ctx->cso, 0, &ctx->sampler); - cso_single_sampler_done(ctx->cso); - - /* viewport */ - ctx->viewport.scale[0] = 0.5f * dst_surface->width; - ctx->viewport.scale[1] = 0.5f * dst_surface->height; - ctx->viewport.scale[2] = 0.5f; - ctx->viewport.scale[3] = 1.0f; - ctx->viewport.translate[0] = 0.5f * dst_surface->width; - ctx->viewport.translate[1] = 0.5f * dst_surface->height; - ctx->viewport.translate[2] = 0.5f; - ctx->viewport.translate[3] = 0.0f; - cso_set_viewport(ctx->cso, &ctx->viewport); - - /* texture */ - cso_set_fragment_sampler_views(ctx->cso, 1, &sampler_view); - - /* shaders */ - if (dst_is_depth) { - set_depth_fragment_shader(ctx); - } else { - set_fragment_shader(ctx, writemask); - } - set_vertex_shader(ctx); - cso_set_geometry_shader_handle(ctx->cso, NULL); - - /* drawing dest */ - memset(&fb, 0, sizeof(fb)); - fb.width = dst_surface->width; - fb.height = dst_surface->height; - if (dst_is_depth) { - fb.zsbuf = dst_surface; - } else { - fb.nr_cbufs = 1; - fb.cbufs[0] = dst_surface; - } - cso_set_framebuffer(ctx->cso, &fb); - - /* draw quad */ - offset = setup_vertex_data_tex(ctx, - (float) dstX0 / dst_surface->width * 2.0f - 1.0f, - (float) dstY0 / dst_surface->height * 2.0f - 1.0f, - (float) dstX1 / dst_surface->width * 2.0f - 1.0f, - (float) dstY1 / dst_surface->height * 2.0f - 1.0f, - s0, t0, - s1, t1, - z); - - if (ctx->vbuf) { - util_draw_vertex_buffer(ctx->pipe, ctx->cso, ctx->vbuf, offset, - PIPE_PRIM_TRIANGLE_FAN, - 4, /* verts */ - 2); /* attribs/vert */ - } - - /* restore state we changed */ - cso_restore_blend(ctx->cso); - cso_restore_depth_stencil_alpha(ctx->cso); - cso_restore_rasterizer(ctx->cso); - cso_restore_samplers(ctx->cso); - cso_restore_fragment_sampler_views(ctx->cso); - cso_restore_viewport(ctx->cso); - cso_restore_framebuffer(ctx->cso); - cso_restore_fragment_shader(ctx->cso); - cso_restore_vertex_shader(ctx->cso); - cso_restore_geometry_shader(ctx->cso); - cso_restore_vertex_elements(ctx->cso); - cso_restore_vertex_buffers(ctx->cso); - cso_restore_stream_outputs(ctx->cso); - - pipe_sampler_view_reference(&sampler_view, NULL); - if (dst_surface != dst) - pipe_surface_reference(&dst_surface, NULL); -} - - -void -util_blit_pixels(struct blit_state *ctx, - struct pipe_resource *src_tex, - unsigned src_level, - int srcX0, int srcY0, - int srcX1, int srcY1, - int srcZ, - struct pipe_surface *dst, - int dstX0, int dstY0, - int dstX1, int dstY1, - float z, uint filter ) -{ - util_blit_pixels_writemask( ctx, src_tex, - src_level, - srcX0, srcY0, - srcX1, srcY1, - srcZ, - dst, - dstX0, dstY0, - dstX1, dstY1, - z, filter, - TGSI_WRITEMASK_XYZW ); -} - - -/* Release vertex buffer at end of frame to avoid synchronous - * rendering. - */ -void util_blit_flush( struct blit_state *ctx ) -{ - pipe_resource_reference(&ctx->vbuf, NULL); - ctx->vbuf_slot = 0; -} - - - -/** - * Copy pixel block from src texture to dst surface. - * The sampler view's first_level field indicates the source - * mipmap level to use. - * XXX need some control over blitting Z and/or stencil. - */ -void -util_blit_pixels_tex(struct blit_state *ctx, - struct pipe_sampler_view *src_sampler_view, - int srcX0, int srcY0, - int srcX1, int srcY1, - struct pipe_surface *dst, - int dstX0, int dstY0, - int dstX1, int dstY1, - float z, uint filter) -{ - boolean normalized = src_sampler_view->texture->target != PIPE_TEXTURE_RECT; - struct pipe_framebuffer_state fb; - float s0, t0, s1, t1; - unsigned offset; - struct pipe_resource *tex = src_sampler_view->texture; - - assert(filter == PIPE_TEX_MIPFILTER_NEAREST || - filter == PIPE_TEX_MIPFILTER_LINEAR); - - assert(tex); - assert(tex->width0 != 0); - assert(tex->height0 != 0); - - s0 = srcX0; - s1 = srcX1; - t0 = srcY0; - t1 = srcY1; - - if(normalized) - { - /* normalize according to the mipmap level's size */ - int level = src_sampler_view->u.tex.first_level; - float w = (float) u_minify(tex->width0, level); - float h = (float) u_minify(tex->height0, level); - s0 /= w; - s1 /= w; - t0 /= h; - t1 /= h; - } - - assert(ctx->pipe->screen->is_format_supported(ctx->pipe->screen, dst->format, - PIPE_TEXTURE_2D, - dst->texture->nr_samples, - PIPE_BIND_RENDER_TARGET)); - - /* save state (restored below) */ - cso_save_blend(ctx->cso); - cso_save_depth_stencil_alpha(ctx->cso); - cso_save_rasterizer(ctx->cso); - cso_save_samplers(ctx->cso); - cso_save_fragment_sampler_views(ctx->cso); - cso_save_stream_outputs(ctx->cso); - cso_save_viewport(ctx->cso); - cso_save_framebuffer(ctx->cso); - cso_save_fragment_shader(ctx->cso); - cso_save_vertex_shader(ctx->cso); - cso_save_geometry_shader(ctx->cso); - cso_save_vertex_elements(ctx->cso); - cso_save_vertex_buffers(ctx->cso); - - /* set misc state we care about */ - cso_set_blend(ctx->cso, &ctx->blend); - cso_set_depth_stencil_alpha(ctx->cso, &ctx->depthstencil_keep); - cso_set_rasterizer(ctx->cso, &ctx->rasterizer); - cso_set_vertex_elements(ctx->cso, 2, ctx->velem); - cso_set_stream_outputs(ctx->cso, 0, NULL, 0); - - /* sampler */ - ctx->sampler.normalized_coords = normalized; - ctx->sampler.min_img_filter = filter; - ctx->sampler.mag_img_filter = filter; - cso_single_sampler(ctx->cso, 0, &ctx->sampler); - cso_single_sampler_done(ctx->cso); - - /* viewport */ - ctx->viewport.scale[0] = 0.5f * dst->width; - ctx->viewport.scale[1] = 0.5f * dst->height; - ctx->viewport.scale[2] = 0.5f; - ctx->viewport.scale[3] = 1.0f; - ctx->viewport.translate[0] = 0.5f * dst->width; - ctx->viewport.translate[1] = 0.5f * dst->height; - ctx->viewport.translate[2] = 0.5f; - ctx->viewport.translate[3] = 0.0f; - cso_set_viewport(ctx->cso, &ctx->viewport); - - /* texture */ - cso_set_fragment_sampler_views(ctx->cso, 1, &src_sampler_view); - - /* shaders */ - set_fragment_shader(ctx, TGSI_WRITEMASK_XYZW); - set_vertex_shader(ctx); - cso_set_geometry_shader_handle(ctx->cso, NULL); - - /* drawing dest */ - memset(&fb, 0, sizeof(fb)); - fb.width = dst->width; - fb.height = dst->height; - fb.nr_cbufs = 1; - fb.cbufs[0] = dst; - cso_set_framebuffer(ctx->cso, &fb); - - /* draw quad */ - offset = setup_vertex_data_tex(ctx, - (float) dstX0 / dst->width * 2.0f - 1.0f, - (float) dstY0 / dst->height * 2.0f - 1.0f, - (float) dstX1 / dst->width * 2.0f - 1.0f, - (float) dstY1 / dst->height * 2.0f - 1.0f, - s0, t0, s1, t1, - z); - - util_draw_vertex_buffer(ctx->pipe, ctx->cso, - ctx->vbuf, offset, - PIPE_PRIM_TRIANGLE_FAN, - 4, /* verts */ - 2); /* attribs/vert */ - - /* restore state we changed */ - cso_restore_blend(ctx->cso); - cso_restore_depth_stencil_alpha(ctx->cso); - cso_restore_rasterizer(ctx->cso); - cso_restore_samplers(ctx->cso); - cso_restore_fragment_sampler_views(ctx->cso); - cso_restore_viewport(ctx->cso); - cso_restore_framebuffer(ctx->cso); - cso_restore_fragment_shader(ctx->cso); - cso_restore_vertex_shader(ctx->cso); - cso_restore_geometry_shader(ctx->cso); - cso_restore_vertex_elements(ctx->cso); - cso_restore_vertex_buffers(ctx->cso); - cso_restore_stream_outputs(ctx->cso); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_blit.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_blit.h deleted file mode 100644 index 3009e25eca3..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_blit.h +++ /dev/null @@ -1,98 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#ifndef U_BLIT_H -#define U_BLIT_H - - -#include "pipe/p_compiler.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -struct cso_context; -struct pipe_context; -struct pipe_resource; -struct pipe_sampler_view; -struct pipe_surface; - - -extern struct blit_state * -util_create_blit(struct pipe_context *pipe, struct cso_context *cso); - -extern void -util_destroy_blit(struct blit_state *ctx); - -extern void -util_blit_pixels(struct blit_state *ctx, - struct pipe_resource *src_tex, - unsigned src_level, - int srcX0, int srcY0, - int srcX1, int srcY1, - int srcZ0, - struct pipe_surface *dst, - int dstX0, int dstY0, - int dstX1, int dstY1, - float z, uint filter); - -void -util_blit_pixels_writemask(struct blit_state *ctx, - struct pipe_resource *src_tex, - unsigned src_level, - int srcX0, int srcY0, - int srcX1, int srcY1, - int srcZ0, - struct pipe_surface *dst, - int dstX0, int dstY0, - int dstX1, int dstY1, - float z, uint filter, - uint writemask); - -extern void -util_blit_pixels_tex(struct blit_state *ctx, - struct pipe_sampler_view *src_sampler_view, - int srcX0, int srcY0, - int srcX1, int srcY1, - struct pipe_surface *dst, - int dstX0, int dstY0, - int dstX1, int dstY1, - float z, uint filter); - -/* Call at end of frame to avoid synchronous rendering. - */ -extern void -util_blit_flush( struct blit_state *ctx ); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_blitter.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_blitter.c deleted file mode 100644 index 59940d9cbe7..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_blitter.c +++ /dev/null @@ -1,1285 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 Marek Olšák - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Blitter utility to facilitate acceleration of the clear, clear_render_target, - * clear_depth_stencil, and resource_copy_region functions. - * - * @author Marek Olšák - */ - -#include "pipe/p_context.h" -#include "pipe/p_defines.h" -#include "util/u_inlines.h" -#include "pipe/p_shader_tokens.h" -#include "pipe/p_state.h" - -#include "util/u_format.h" -#include "util/u_memory.h" -#include "util/u_math.h" -#include "util/u_blitter.h" -#include "util/u_draw_quad.h" -#include "util/u_sampler.h" -#include "util/u_simple_shaders.h" -#include "util/u_surface.h" -#include "util/u_texture.h" - -#define INVALID_PTR ((void*)~0) - -struct blitter_context_priv -{ - struct blitter_context base; - - struct pipe_resource *vbuf; /**< quad */ - - float vertices[4][2][4]; /**< {pos, color} or {pos, texcoord} */ - - /* Templates for various state objects. */ - - /* Constant state objects. */ - /* Vertex shaders. */ - void *vs; /**< Vertex shader which passes {pos, generic} to the output.*/ - void *vs_pos_only; /**< Vertex shader which passes pos to the output.*/ - - /* Fragment shaders. */ - /* The shader at index i outputs color to color buffers 0,1,...,i-1. */ - void *fs_col[PIPE_MAX_COLOR_BUFS+1]; - void *fs_col_int[PIPE_MAX_COLOR_BUFS+1]; - - /* FS which outputs a color from a texture, - where the index is PIPE_TEXTURE_* to be sampled. */ - void *fs_texfetch_col[PIPE_MAX_TEXTURE_TYPES]; - - /* FS which outputs a depth from a texture, - where the index is PIPE_TEXTURE_* to be sampled. */ - void *fs_texfetch_depth[PIPE_MAX_TEXTURE_TYPES]; - - /* Blend state. */ - void *blend_write_color; /**< blend state with writemask of RGBA */ - void *blend_keep_color; /**< blend state with writemask of 0 */ - - /* Depth stencil alpha state. */ - void *dsa_write_depth_stencil; - void *dsa_write_depth_keep_stencil; - void *dsa_keep_depth_stencil; - void *dsa_keep_depth_write_stencil; - - /* Vertex elements states. */ - void *velem_state; - void *velem_uint_state; - void *velem_sint_state; - void *velem_state_readbuf; - - /* Sampler state. */ - void *sampler_state; - - /* Rasterizer state. */ - void *rs_state; - void *rs_discard_state; - - /* Viewport state. */ - struct pipe_viewport_state viewport; - - /* Destination surface dimensions. */ - unsigned dst_width; - unsigned dst_height; - - boolean has_geometry_shader; - boolean vertex_has_integers; - boolean has_stream_out; -}; - -static void blitter_draw_rectangle(struct blitter_context *blitter, - unsigned x, unsigned y, - unsigned width, unsigned height, - float depth, - enum blitter_attrib_type type, - const union pipe_color_union *attrib); - - -struct blitter_context *util_blitter_create(struct pipe_context *pipe) -{ - struct blitter_context_priv *ctx; - struct pipe_blend_state blend; - struct pipe_depth_stencil_alpha_state dsa; - struct pipe_rasterizer_state rs_state; - struct pipe_sampler_state sampler_state; - struct pipe_vertex_element velem[2]; - unsigned i; - - ctx = CALLOC_STRUCT(blitter_context_priv); - if (!ctx) - return NULL; - - ctx->base.pipe = pipe; - ctx->base.draw_rectangle = blitter_draw_rectangle; - - /* init state objects for them to be considered invalid */ - ctx->base.saved_blend_state = INVALID_PTR; - ctx->base.saved_dsa_state = INVALID_PTR; - ctx->base.saved_rs_state = INVALID_PTR; - ctx->base.saved_fs = INVALID_PTR; - ctx->base.saved_vs = INVALID_PTR; - ctx->base.saved_gs = INVALID_PTR; - ctx->base.saved_velem_state = INVALID_PTR; - ctx->base.saved_fb_state.nr_cbufs = ~0; - ctx->base.saved_num_sampler_views = ~0; - ctx->base.saved_num_sampler_states = ~0; - ctx->base.saved_num_vertex_buffers = ~0; - ctx->base.saved_num_so_targets = ~0; - - ctx->has_geometry_shader = - pipe->screen->get_shader_param(pipe->screen, PIPE_SHADER_GEOMETRY, - PIPE_SHADER_CAP_MAX_INSTRUCTIONS) > 0; - ctx->vertex_has_integers = - pipe->screen->get_shader_param(pipe->screen, PIPE_SHADER_VERTEX, - PIPE_SHADER_CAP_INTEGERS); - ctx->has_stream_out = - pipe->screen->get_param(pipe->screen, - PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS) != 0; - - /* blend state objects */ - memset(&blend, 0, sizeof(blend)); - ctx->blend_keep_color = pipe->create_blend_state(pipe, &blend); - - blend.rt[0].colormask = PIPE_MASK_RGBA; - ctx->blend_write_color = pipe->create_blend_state(pipe, &blend); - - /* depth stencil alpha state objects */ - memset(&dsa, 0, sizeof(dsa)); - ctx->dsa_keep_depth_stencil = - pipe->create_depth_stencil_alpha_state(pipe, &dsa); - - dsa.depth.enabled = 1; - dsa.depth.writemask = 1; - dsa.depth.func = PIPE_FUNC_ALWAYS; - ctx->dsa_write_depth_keep_stencil = - pipe->create_depth_stencil_alpha_state(pipe, &dsa); - - dsa.stencil[0].enabled = 1; - dsa.stencil[0].func = PIPE_FUNC_ALWAYS; - dsa.stencil[0].fail_op = PIPE_STENCIL_OP_REPLACE; - dsa.stencil[0].zpass_op = PIPE_STENCIL_OP_REPLACE; - dsa.stencil[0].zfail_op = PIPE_STENCIL_OP_REPLACE; - dsa.stencil[0].valuemask = 0xff; - dsa.stencil[0].writemask = 0xff; - ctx->dsa_write_depth_stencil = - pipe->create_depth_stencil_alpha_state(pipe, &dsa); - - dsa.depth.enabled = 0; - dsa.depth.writemask = 0; - ctx->dsa_keep_depth_write_stencil = - pipe->create_depth_stencil_alpha_state(pipe, &dsa); - - /* sampler state */ - memset(&sampler_state, 0, sizeof(sampler_state)); - sampler_state.wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - sampler_state.wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - sampler_state.wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - sampler_state.normalized_coords = 1; - ctx->sampler_state = pipe->create_sampler_state(pipe, &sampler_state); - - /* rasterizer state */ - memset(&rs_state, 0, sizeof(rs_state)); - rs_state.cull_face = PIPE_FACE_NONE; - rs_state.gl_rasterization_rules = 1; - rs_state.flatshade = 1; - rs_state.depth_clip = 1; - ctx->rs_state = pipe->create_rasterizer_state(pipe, &rs_state); - - if (ctx->has_stream_out) { - rs_state.rasterizer_discard = 1; - ctx->rs_discard_state = pipe->create_rasterizer_state(pipe, &rs_state); - } - - /* vertex elements states */ - memset(&velem[0], 0, sizeof(velem[0]) * 2); - for (i = 0; i < 2; i++) { - velem[i].src_offset = i * 4 * sizeof(float); - velem[i].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT; - } - ctx->velem_state = pipe->create_vertex_elements_state(pipe, 2, &velem[0]); - - if (ctx->vertex_has_integers) { - memset(&velem[0], 0, sizeof(velem[0]) * 2); - velem[0].src_offset = 0; - velem[0].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT; - velem[1].src_offset = 4 * sizeof(float); - velem[1].src_format = PIPE_FORMAT_R32G32B32A32_SINT; - ctx->velem_sint_state = pipe->create_vertex_elements_state(pipe, 2, &velem[0]); - - memset(&velem[0], 0, sizeof(velem[0]) * 2); - velem[0].src_offset = 0; - velem[0].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT; - velem[1].src_offset = 4 * sizeof(float); - velem[1].src_format = PIPE_FORMAT_R32G32B32A32_UINT; - ctx->velem_uint_state = pipe->create_vertex_elements_state(pipe, 2, &velem[0]); - } - - if (ctx->has_stream_out) { - velem[0].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT; - ctx->velem_state_readbuf = pipe->create_vertex_elements_state(pipe, 1, &velem[0]); - } - - /* fragment shaders are created on-demand */ - - /* vertex shaders */ - { - const uint semantic_names[] = { TGSI_SEMANTIC_POSITION, - TGSI_SEMANTIC_GENERIC }; - const uint semantic_indices[] = { 0, 0 }; - ctx->vs = - util_make_vertex_passthrough_shader(pipe, 2, semantic_names, - semantic_indices); - } - if (ctx->has_stream_out) { - struct pipe_stream_output_info so; - const uint semantic_names[] = { TGSI_SEMANTIC_POSITION }; - const uint semantic_indices[] = { 0 }; - - memset(&so, 0, sizeof(so)); - so.num_outputs = 1; - so.output[0].register_mask = TGSI_WRITEMASK_XYZW; - so.stride = 4; - - ctx->vs_pos_only = - util_make_vertex_passthrough_shader_with_so(pipe, 1, semantic_names, - semantic_indices, &so); - } - - /* set invariant vertex coordinates */ - for (i = 0; i < 4; i++) - ctx->vertices[i][0][3] = 1; /*v.w*/ - - /* create the vertex buffer */ - ctx->vbuf = pipe_user_buffer_create(ctx->base.pipe->screen, - ctx->vertices, - sizeof(ctx->vertices), - PIPE_BIND_VERTEX_BUFFER); - - return &ctx->base; -} - -void util_blitter_destroy(struct blitter_context *blitter) -{ - struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter; - struct pipe_context *pipe = blitter->pipe; - int i; - - pipe->delete_blend_state(pipe, ctx->blend_write_color); - pipe->delete_blend_state(pipe, ctx->blend_keep_color); - pipe->delete_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil); - pipe->delete_depth_stencil_alpha_state(pipe, - ctx->dsa_write_depth_keep_stencil); - pipe->delete_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_stencil); - pipe->delete_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_write_stencil); - - pipe->delete_rasterizer_state(pipe, ctx->rs_state); - if (ctx->rs_discard_state) - pipe->delete_rasterizer_state(pipe, ctx->rs_discard_state); - pipe->delete_vs_state(pipe, ctx->vs); - if (ctx->vs_pos_only) - pipe->delete_vs_state(pipe, ctx->vs_pos_only); - pipe->delete_vertex_elements_state(pipe, ctx->velem_state); - if (ctx->vertex_has_integers) { - pipe->delete_vertex_elements_state(pipe, ctx->velem_sint_state); - pipe->delete_vertex_elements_state(pipe, ctx->velem_uint_state); - } - if (ctx->velem_state_readbuf) - pipe->delete_vertex_elements_state(pipe, ctx->velem_state_readbuf); - - for (i = 0; i < PIPE_MAX_TEXTURE_TYPES; i++) { - if (ctx->fs_texfetch_col[i]) - pipe->delete_fs_state(pipe, ctx->fs_texfetch_col[i]); - if (ctx->fs_texfetch_depth[i]) - pipe->delete_fs_state(pipe, ctx->fs_texfetch_depth[i]); - } - - for (i = 0; i <= PIPE_MAX_COLOR_BUFS; i++) { - if (ctx->fs_col[i]) - pipe->delete_fs_state(pipe, ctx->fs_col[i]); - if (ctx->fs_col_int[i]) - pipe->delete_fs_state(pipe, ctx->fs_col_int[i]); - } - - pipe->delete_sampler_state(pipe, ctx->sampler_state); - pipe_resource_reference(&ctx->vbuf, NULL); - FREE(ctx); -} - -static void blitter_set_running_flag(struct blitter_context_priv *ctx) -{ - if (ctx->base.running) { - _debug_printf("u_blitter:%i: Caught recursion. This is a driver bug.\n", - __LINE__); - } - ctx->base.running = TRUE; -} - -static void blitter_unset_running_flag(struct blitter_context_priv *ctx) -{ - if (!ctx->base.running) { - _debug_printf("u_blitter:%i: Caught recursion. This is a driver bug.\n", - __LINE__); - } - ctx->base.running = FALSE; -} - -static void blitter_check_saved_vertex_states(struct blitter_context_priv *ctx) -{ - assert(ctx->base.saved_num_vertex_buffers != ~0 && - ctx->base.saved_velem_state != INVALID_PTR && - ctx->base.saved_vs != INVALID_PTR && - (!ctx->has_geometry_shader || ctx->base.saved_gs != INVALID_PTR) && - (!ctx->has_stream_out || ctx->base.saved_num_so_targets != ~0) && - ctx->base.saved_rs_state != INVALID_PTR); -} - -static void blitter_restore_vertex_states(struct blitter_context_priv *ctx) -{ - struct pipe_context *pipe = ctx->base.pipe; - unsigned i; - - /* Vertex buffers. */ - pipe->set_vertex_buffers(pipe, - ctx->base.saved_num_vertex_buffers, - ctx->base.saved_vertex_buffers); - - for (i = 0; i < ctx->base.saved_num_vertex_buffers; i++) { - if (ctx->base.saved_vertex_buffers[i].buffer) { - pipe_resource_reference(&ctx->base.saved_vertex_buffers[i].buffer, - NULL); - } - } - ctx->base.saved_num_vertex_buffers = ~0; - - /* Vertex elements. */ - pipe->bind_vertex_elements_state(pipe, ctx->base.saved_velem_state); - ctx->base.saved_velem_state = INVALID_PTR; - - /* Vertex shader. */ - pipe->bind_vs_state(pipe, ctx->base.saved_vs); - ctx->base.saved_vs = INVALID_PTR; - - /* Geometry shader. */ - if (ctx->has_geometry_shader) { - pipe->bind_gs_state(pipe, ctx->base.saved_gs); - ctx->base.saved_gs = INVALID_PTR; - } - - /* Stream outputs. */ - if (ctx->has_stream_out) { - pipe->set_stream_output_targets(pipe, - ctx->base.saved_num_so_targets, - ctx->base.saved_so_targets, ~0); - - for (i = 0; i < ctx->base.saved_num_so_targets; i++) - pipe_so_target_reference(&ctx->base.saved_so_targets[i], NULL); - - ctx->base.saved_num_so_targets = ~0; - } - - /* Rasterizer. */ - pipe->bind_rasterizer_state(pipe, ctx->base.saved_rs_state); - ctx->base.saved_rs_state = INVALID_PTR; -} - -static void blitter_check_saved_fragment_states(struct blitter_context_priv *ctx) -{ - assert(ctx->base.saved_fs != INVALID_PTR && - ctx->base.saved_dsa_state != INVALID_PTR && - ctx->base.saved_blend_state != INVALID_PTR); -} - -static void blitter_restore_fragment_states(struct blitter_context_priv *ctx) -{ - struct pipe_context *pipe = ctx->base.pipe; - - /* Fragment shader. */ - pipe->bind_fs_state(pipe, ctx->base.saved_fs); - ctx->base.saved_fs = INVALID_PTR; - - /* Depth, stencil, alpha. */ - pipe->bind_depth_stencil_alpha_state(pipe, ctx->base.saved_dsa_state); - ctx->base.saved_dsa_state = INVALID_PTR; - - /* Blend state. */ - pipe->bind_blend_state(pipe, ctx->base.saved_blend_state); - ctx->base.saved_blend_state = INVALID_PTR; - - /* Miscellaneous states. */ - /* XXX check whether these are saved and whether they need to be restored - * (depending on the operation) */ - pipe->set_stencil_ref(pipe, &ctx->base.saved_stencil_ref); - pipe->set_viewport_state(pipe, &ctx->base.saved_viewport); -} - -static void blitter_check_saved_fb_state(struct blitter_context_priv *ctx) -{ - assert(ctx->base.saved_fb_state.nr_cbufs != ~0); -} - -static void blitter_restore_fb_state(struct blitter_context_priv *ctx) -{ - struct pipe_context *pipe = ctx->base.pipe; - - pipe->set_framebuffer_state(pipe, &ctx->base.saved_fb_state); - util_unreference_framebuffer_state(&ctx->base.saved_fb_state); -} - -static void blitter_check_saved_textures(struct blitter_context_priv *ctx) -{ - assert(ctx->base.saved_num_sampler_states != ~0 && - ctx->base.saved_num_sampler_views != ~0); -} - -static void blitter_restore_textures(struct blitter_context_priv *ctx) -{ - struct pipe_context *pipe = ctx->base.pipe; - unsigned i; - - /* Fragment sampler states. */ - pipe->bind_fragment_sampler_states(pipe, - ctx->base.saved_num_sampler_states, - ctx->base.saved_sampler_states); - ctx->base.saved_num_sampler_states = ~0; - - /* Fragment sampler views. */ - pipe->set_fragment_sampler_views(pipe, - ctx->base.saved_num_sampler_views, - ctx->base.saved_sampler_views); - - for (i = 0; i < ctx->base.saved_num_sampler_views; i++) - pipe_sampler_view_reference(&ctx->base.saved_sampler_views[i], NULL); - - ctx->base.saved_num_sampler_views = ~0; -} - -static void blitter_set_rectangle(struct blitter_context_priv *ctx, - unsigned x1, unsigned y1, - unsigned x2, unsigned y2, - float depth) -{ - int i; - - /* set vertex positions */ - ctx->vertices[0][0][0] = (float)x1 / ctx->dst_width * 2.0f - 1.0f; /*v0.x*/ - ctx->vertices[0][0][1] = (float)y1 / ctx->dst_height * 2.0f - 1.0f; /*v0.y*/ - - ctx->vertices[1][0][0] = (float)x2 / ctx->dst_width * 2.0f - 1.0f; /*v1.x*/ - ctx->vertices[1][0][1] = (float)y1 / ctx->dst_height * 2.0f - 1.0f; /*v1.y*/ - - ctx->vertices[2][0][0] = (float)x2 / ctx->dst_width * 2.0f - 1.0f; /*v2.x*/ - ctx->vertices[2][0][1] = (float)y2 / ctx->dst_height * 2.0f - 1.0f; /*v2.y*/ - - ctx->vertices[3][0][0] = (float)x1 / ctx->dst_width * 2.0f - 1.0f; /*v3.x*/ - ctx->vertices[3][0][1] = (float)y2 / ctx->dst_height * 2.0f - 1.0f; /*v3.y*/ - - for (i = 0; i < 4; i++) - ctx->vertices[i][0][2] = depth; /*z*/ - - /* viewport */ - ctx->viewport.scale[0] = 0.5f * ctx->dst_width; - ctx->viewport.scale[1] = 0.5f * ctx->dst_height; - ctx->viewport.scale[2] = 1.0f; - ctx->viewport.scale[3] = 1.0f; - ctx->viewport.translate[0] = 0.5f * ctx->dst_width; - ctx->viewport.translate[1] = 0.5f * ctx->dst_height; - ctx->viewport.translate[2] = 0.0f; - ctx->viewport.translate[3] = 0.0f; - ctx->base.pipe->set_viewport_state(ctx->base.pipe, &ctx->viewport); -} - -static void blitter_set_clear_color(struct blitter_context_priv *ctx, - const union pipe_color_union *color) -{ - int i; - - if (color) { - for (i = 0; i < 4; i++) { - uint32_t *uiverts = (uint32_t *)ctx->vertices[i][1]; - uiverts[0] = color->ui[0]; - uiverts[1] = color->ui[1]; - uiverts[2] = color->ui[2]; - uiverts[3] = color->ui[3]; - } - } else { - for (i = 0; i < 4; i++) { - ctx->vertices[i][1][0] = 0; - ctx->vertices[i][1][1] = 0; - ctx->vertices[i][1][2] = 0; - ctx->vertices[i][1][3] = 0; - } - } -} - -static void get_texcoords(struct pipe_sampler_view *src, - unsigned src_width0, unsigned src_height0, - unsigned x1, unsigned y1, - unsigned x2, unsigned y2, - float out[4]) -{ - struct pipe_resource *tex = src->texture; - unsigned level = src->u.tex.first_level; - boolean normalized = tex->target != PIPE_TEXTURE_RECT; - - if (normalized) { - out[0] = x1 / (float)u_minify(src_width0, level); - out[1] = y1 / (float)u_minify(src_height0, level); - out[2] = x2 / (float)u_minify(src_width0, level); - out[3] = y2 / (float)u_minify(src_height0, level); - } else { - out[0] = x1; - out[1] = y1; - out[2] = x2; - out[3] = y2; - } -} - -static void set_texcoords_in_vertices(const float coord[4], - float *out, unsigned stride) -{ - out[0] = coord[0]; /*t0.s*/ - out[1] = coord[1]; /*t0.t*/ - out += stride; - out[0] = coord[2]; /*t1.s*/ - out[1] = coord[1]; /*t1.t*/ - out += stride; - out[0] = coord[2]; /*t2.s*/ - out[1] = coord[3]; /*t2.t*/ - out += stride; - out[0] = coord[0]; /*t3.s*/ - out[1] = coord[3]; /*t3.t*/ -} - -static void blitter_set_texcoords(struct blitter_context_priv *ctx, - struct pipe_sampler_view *src, - unsigned src_width0, unsigned src_height0, - unsigned layer, - unsigned x1, unsigned y1, - unsigned x2, unsigned y2) -{ - unsigned i; - float coord[4]; - float face_coord[4][2]; - - get_texcoords(src, src_width0, src_height0, x1, y1, x2, y2, coord); - - if (src->texture->target == PIPE_TEXTURE_CUBE) { - set_texcoords_in_vertices(coord, &face_coord[0][0], 2); - util_map_texcoords2d_onto_cubemap(layer, - /* pointer, stride in floats */ - &face_coord[0][0], 2, - &ctx->vertices[0][1][0], 8); - } else { - set_texcoords_in_vertices(coord, &ctx->vertices[0][1][0], 8); - } - - /* Set the layer. */ - switch (src->texture->target) { - case PIPE_TEXTURE_3D: - { - float r = layer / (float)u_minify(src->texture->depth0, - src->u.tex.first_level); - for (i = 0; i < 4; i++) - ctx->vertices[i][1][2] = r; /*r*/ - } - break; - - case PIPE_TEXTURE_1D_ARRAY: - for (i = 0; i < 4; i++) - ctx->vertices[i][1][1] = layer; /*t*/ - break; - - case PIPE_TEXTURE_2D_ARRAY: - for (i = 0; i < 4; i++) - ctx->vertices[i][1][2] = layer; /*r*/ - break; - - default:; - } -} - -static void blitter_set_dst_dimensions(struct blitter_context_priv *ctx, - unsigned width, unsigned height) -{ - ctx->dst_width = width; - ctx->dst_height = height; -} - -static INLINE -void *blitter_get_fs_col(struct blitter_context_priv *ctx, unsigned num_cbufs, - boolean int_format) -{ - struct pipe_context *pipe = ctx->base.pipe; - - assert(num_cbufs <= PIPE_MAX_COLOR_BUFS); - - if (int_format) { - if (!ctx->fs_col_int[num_cbufs]) - ctx->fs_col_int[num_cbufs] = - util_make_fragment_cloneinput_shader(pipe, num_cbufs, - TGSI_SEMANTIC_GENERIC, - TGSI_INTERPOLATE_CONSTANT); - return ctx->fs_col_int[num_cbufs]; - } else { - if (!ctx->fs_col[num_cbufs]) - ctx->fs_col[num_cbufs] = - util_make_fragment_cloneinput_shader(pipe, num_cbufs, - TGSI_SEMANTIC_GENERIC, - TGSI_INTERPOLATE_LINEAR); - return ctx->fs_col[num_cbufs]; - } -} - -/** Convert PIPE_TEXTURE_x to TGSI_TEXTURE_x */ -static unsigned -pipe_tex_to_tgsi_tex(enum pipe_texture_target pipe_tex_target) -{ - switch (pipe_tex_target) { - case PIPE_TEXTURE_1D: - return TGSI_TEXTURE_1D; - case PIPE_TEXTURE_2D: - return TGSI_TEXTURE_2D; - case PIPE_TEXTURE_RECT: - return TGSI_TEXTURE_RECT; - case PIPE_TEXTURE_3D: - return TGSI_TEXTURE_3D; - case PIPE_TEXTURE_CUBE: - return TGSI_TEXTURE_CUBE; - case PIPE_TEXTURE_1D_ARRAY: - return TGSI_TEXTURE_1D_ARRAY; - case PIPE_TEXTURE_2D_ARRAY: - return TGSI_TEXTURE_2D_ARRAY; - default: - assert(0 && "unexpected texture target"); - return TGSI_TEXTURE_UNKNOWN; - } -} - - -static INLINE -void *blitter_get_fs_texfetch_col(struct blitter_context_priv *ctx, - unsigned tex_target) -{ - struct pipe_context *pipe = ctx->base.pipe; - - assert(tex_target < PIPE_MAX_TEXTURE_TYPES); - - /* Create the fragment shader on-demand. */ - if (!ctx->fs_texfetch_col[tex_target]) { - unsigned tgsi_tex = pipe_tex_to_tgsi_tex(tex_target); - - ctx->fs_texfetch_col[tex_target] = - util_make_fragment_tex_shader(pipe, tgsi_tex, TGSI_INTERPOLATE_LINEAR); - } - - return ctx->fs_texfetch_col[tex_target]; -} - -static INLINE -void *blitter_get_fs_texfetch_depth(struct blitter_context_priv *ctx, - unsigned tex_target) -{ - struct pipe_context *pipe = ctx->base.pipe; - - assert(tex_target < PIPE_MAX_TEXTURE_TYPES); - - /* Create the fragment shader on-demand. */ - if (!ctx->fs_texfetch_depth[tex_target]) { - unsigned tgsi_tex = pipe_tex_to_tgsi_tex(tex_target); - - ctx->fs_texfetch_depth[tex_target] = - util_make_fragment_tex_shader_writedepth(pipe, tgsi_tex, - TGSI_INTERPOLATE_LINEAR); - } - - return ctx->fs_texfetch_depth[tex_target]; -} - -static void blitter_draw_rectangle(struct blitter_context *blitter, - unsigned x1, unsigned y1, - unsigned x2, unsigned y2, - float depth, - enum blitter_attrib_type type, - const union pipe_color_union *attrib) -{ - struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter; - - switch (type) { - case UTIL_BLITTER_ATTRIB_COLOR: - blitter_set_clear_color(ctx, attrib); - break; - - case UTIL_BLITTER_ATTRIB_TEXCOORD: - set_texcoords_in_vertices(attrib->f, &ctx->vertices[0][1][0], 8); - break; - - default:; - } - - blitter_set_rectangle(ctx, x1, y1, x2, y2, depth); - ctx->base.pipe->redefine_user_buffer(ctx->base.pipe, ctx->vbuf, - 0, ctx->vbuf->width0); - util_draw_vertex_buffer(ctx->base.pipe, NULL, ctx->vbuf, 0, - PIPE_PRIM_TRIANGLE_FAN, 4, 2); -} - -static void util_blitter_clear_custom(struct blitter_context *blitter, - unsigned width, unsigned height, - unsigned num_cbufs, - unsigned clear_buffers, - enum pipe_format cbuf_format, - const union pipe_color_union *color, - double depth, unsigned stencil, - void *custom_blend, void *custom_dsa) -{ - struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter; - struct pipe_context *pipe = ctx->base.pipe; - struct pipe_stencil_ref sr = { { 0 } }; - boolean int_format = util_format_is_pure_integer(cbuf_format); - assert(num_cbufs <= PIPE_MAX_COLOR_BUFS); - - blitter_set_running_flag(ctx); - blitter_check_saved_vertex_states(ctx); - blitter_check_saved_fragment_states(ctx); - - /* bind states */ - if (custom_blend) { - pipe->bind_blend_state(pipe, custom_blend); - } else if (clear_buffers & PIPE_CLEAR_COLOR) { - pipe->bind_blend_state(pipe, ctx->blend_write_color); - } else { - pipe->bind_blend_state(pipe, ctx->blend_keep_color); - } - - if (custom_dsa) { - pipe->bind_depth_stencil_alpha_state(pipe, custom_dsa); - } else if ((clear_buffers & PIPE_CLEAR_DEPTHSTENCIL) == PIPE_CLEAR_DEPTHSTENCIL) { - pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_stencil); - } else if (clear_buffers & PIPE_CLEAR_DEPTH) { - pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_keep_stencil); - } else if (clear_buffers & PIPE_CLEAR_STENCIL) { - pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_write_stencil); - } else { - pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil); - } - - sr.ref_value[0] = stencil & 0xff; - pipe->set_stencil_ref(pipe, &sr); - - pipe->bind_rasterizer_state(pipe, ctx->rs_state); - if (util_format_is_pure_sint(cbuf_format)) { - pipe->bind_vertex_elements_state(pipe, ctx->velem_sint_state); - } else if (util_format_is_pure_uint(cbuf_format)) { - pipe->bind_vertex_elements_state(pipe, ctx->velem_uint_state); - } else { - pipe->bind_vertex_elements_state(pipe, ctx->velem_state); - } - pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, num_cbufs, int_format)); - pipe->bind_vs_state(pipe, ctx->vs); - if (ctx->has_geometry_shader) - pipe->bind_gs_state(pipe, NULL); - - blitter_set_dst_dimensions(ctx, width, height); - blitter->draw_rectangle(blitter, 0, 0, width, height, depth, - UTIL_BLITTER_ATTRIB_COLOR, color); - - blitter_restore_vertex_states(ctx); - blitter_restore_fragment_states(ctx); - blitter_unset_running_flag(ctx); -} - -void util_blitter_clear(struct blitter_context *blitter, - unsigned width, unsigned height, - unsigned num_cbufs, - unsigned clear_buffers, - enum pipe_format cbuf_format, - const union pipe_color_union *color, - double depth, unsigned stencil) -{ - util_blitter_clear_custom(blitter, width, height, num_cbufs, - clear_buffers, cbuf_format, color, depth, stencil, - NULL, NULL); -} - -void util_blitter_clear_depth_custom(struct blitter_context *blitter, - unsigned width, unsigned height, - double depth, void *custom_dsa) -{ - static const union pipe_color_union color; - util_blitter_clear_custom(blitter, width, height, 0, - 0, PIPE_FORMAT_NONE, &color, depth, 0, NULL, custom_dsa); -} - -static -boolean is_overlap(unsigned sx1, unsigned sx2, unsigned sy1, unsigned sy2, - unsigned dx1, unsigned dx2, unsigned dy1, unsigned dy2) -{ - return sx1 < dx2 && sx2 > dx1 && sy1 < dy2 && sy2 > dy1; -} - -void util_blitter_default_dst_texture(struct pipe_surface *dst_templ, - struct pipe_resource *dst, - unsigned dstlevel, - unsigned dstz, - const struct pipe_box *srcbox) -{ - memset(dst_templ, 0, sizeof(*dst_templ)); - dst_templ->format = dst->format; - if (util_format_is_depth_or_stencil(dst->format)) { - dst_templ->usage = PIPE_BIND_DEPTH_STENCIL; - } else { - dst_templ->usage = PIPE_BIND_RENDER_TARGET; - } - dst_templ->format = util_format_linear(dst->format); - dst_templ->u.tex.level = dstlevel; - dst_templ->u.tex.first_layer = dstz; - dst_templ->u.tex.last_layer = dstz + srcbox->depth - 1; -} - -void util_blitter_default_src_texture(struct pipe_sampler_view *src_templ, - struct pipe_resource *src, - unsigned srclevel) -{ - memset(src_templ, 0, sizeof(*src_templ)); - src_templ->format = util_format_linear(src->format); - src_templ->u.tex.first_level = srclevel; - src_templ->u.tex.last_level = srclevel; - src_templ->u.tex.first_layer = 0; - src_templ->u.tex.last_layer = - src->target == PIPE_TEXTURE_3D ? src->depth0 - 1 - : src->array_size - 1; - src_templ->swizzle_r = PIPE_SWIZZLE_RED; - src_templ->swizzle_g = PIPE_SWIZZLE_GREEN; - src_templ->swizzle_b = PIPE_SWIZZLE_BLUE; - src_templ->swizzle_a = PIPE_SWIZZLE_ALPHA; -} - -void util_blitter_copy_texture(struct blitter_context *blitter, - struct pipe_resource *dst, - unsigned dstlevel, - unsigned dstx, unsigned dsty, unsigned dstz, - struct pipe_resource *src, - unsigned srclevel, - const struct pipe_box *srcbox, - boolean ignore_stencil) -{ - struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter; - struct pipe_context *pipe = ctx->base.pipe; - struct pipe_screen *screen = pipe->screen; - struct pipe_surface *dst_view, dst_templ; - struct pipe_sampler_view src_templ, *src_view; - unsigned bind; - boolean is_stencil, is_depth; - - /* Give up if textures are not set. */ - assert(dst && src); - if (!dst || !src) - return; - - assert(src->target < PIPE_MAX_TEXTURE_TYPES); - - /* Is this a ZS format? */ - is_depth = util_format_get_component_bits(src->format, UTIL_FORMAT_COLORSPACE_ZS, 0) != 0; - is_stencil = util_format_get_component_bits(src->format, UTIL_FORMAT_COLORSPACE_ZS, 1) != 0; - - if (is_depth || is_stencil) - bind = PIPE_BIND_DEPTH_STENCIL; - else - bind = PIPE_BIND_RENDER_TARGET; - - /* Check if we can sample from and render to the surfaces. */ - /* (assuming copying a stencil buffer is not possible) */ - if ((!ignore_stencil && is_stencil) || - !screen->is_format_supported(screen, dst->format, dst->target, - dst->nr_samples, bind) || - !screen->is_format_supported(screen, src->format, src->target, - src->nr_samples, PIPE_BIND_SAMPLER_VIEW)) { - blitter_set_running_flag(ctx); - util_resource_copy_region(pipe, dst, dstlevel, dstx, dsty, dstz, - src, srclevel, srcbox); - blitter_unset_running_flag(ctx); - return; - } - - /* Initialize the surface. */ - util_blitter_default_dst_texture(&dst_templ, dst, dstlevel, dstz, srcbox); - dst_view = pipe->create_surface(pipe, dst, &dst_templ); - - /* Initialize the sampler view. */ - util_blitter_default_src_texture(&src_templ, src, srclevel); - src_view = pipe->create_sampler_view(pipe, src, &src_templ); - - /* Copy. */ - util_blitter_copy_texture_view(blitter, dst_view, dstx, dsty, src_view, - srcbox, src->width0, src->height0); - - pipe_surface_reference(&dst_view, NULL); - pipe_sampler_view_reference(&src_view, NULL); -} - -void util_blitter_copy_texture_view(struct blitter_context *blitter, - struct pipe_surface *dst, - unsigned dstx, unsigned dsty, - struct pipe_sampler_view *src, - const struct pipe_box *srcbox, - unsigned src_width0, unsigned src_height0) -{ - struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter; - struct pipe_context *pipe = ctx->base.pipe; - struct pipe_framebuffer_state fb_state; - enum pipe_texture_target src_target = src->texture->target; - unsigned width = srcbox->width; - unsigned height = srcbox->height; - - /* Sanity checks. */ - if (dst->texture == src->texture && - dst->u.tex.level == src->u.tex.first_level) { - assert(!is_overlap(srcbox->x, srcbox->x + width, srcbox->y, srcbox->y + height, - dstx, dstx + width, dsty, dsty + height)); - } - /* XXX should handle 3d regions */ - assert(srcbox->depth == 1); - - /* Check whether the states are properly saved. */ - blitter_set_running_flag(ctx); - blitter_check_saved_vertex_states(ctx); - blitter_check_saved_fragment_states(ctx); - blitter_check_saved_textures(ctx); - blitter_check_saved_fb_state(ctx); - - /* Initialize framebuffer state. */ - fb_state.width = dst->width; - fb_state.height = dst->height; - - if (util_format_is_depth_or_stencil(dst->format)) { - pipe->bind_blend_state(pipe, ctx->blend_keep_color); - pipe->bind_depth_stencil_alpha_state(pipe, - ctx->dsa_write_depth_keep_stencil); - pipe->bind_fs_state(pipe, - blitter_get_fs_texfetch_depth(ctx, src_target)); - - fb_state.nr_cbufs = 0; - fb_state.zsbuf = dst; - } else { - pipe->bind_blend_state(pipe, ctx->blend_write_color); - pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil); - pipe->bind_fs_state(pipe, - blitter_get_fs_texfetch_col(ctx, src_target)); - - fb_state.nr_cbufs = 1; - fb_state.cbufs[0] = dst; - fb_state.zsbuf = 0; - } - - /* Set rasterizer state, shaders, and textures. */ - pipe->bind_rasterizer_state(pipe, ctx->rs_state); - pipe->bind_vs_state(pipe, ctx->vs); - if (ctx->has_geometry_shader) - pipe->bind_gs_state(pipe, NULL); - pipe->bind_fragment_sampler_states(pipe, 1, &ctx->sampler_state); - pipe->bind_vertex_elements_state(pipe, ctx->velem_state); - pipe->set_fragment_sampler_views(pipe, 1, &src); - pipe->set_framebuffer_state(pipe, &fb_state); - - blitter_set_dst_dimensions(ctx, dst->width, dst->height); - - switch (src_target) { - /* Draw the quad with the draw_rectangle callback. */ - case PIPE_TEXTURE_1D: - case PIPE_TEXTURE_2D: - case PIPE_TEXTURE_RECT: - { - /* Set texture coordinates. - use a pipe color union - * for interface purposes. - * XXX pipe_color_union is a wrong name since we use that to set - * texture coordinates too. - */ - union pipe_color_union coord; - get_texcoords(src, src_width0, src_height0, srcbox->x, srcbox->y, - srcbox->x+width, srcbox->y+height, coord.f); - - /* Draw. */ - blitter->draw_rectangle(blitter, dstx, dsty, dstx+width, dsty+height, 0, - UTIL_BLITTER_ATTRIB_TEXCOORD, &coord); - } - break; - - /* Draw the quad with the generic codepath. */ - default: - /* Set texture coordinates. */ - switch (src_target) { - case PIPE_TEXTURE_1D_ARRAY: - case PIPE_TEXTURE_2D_ARRAY: - case PIPE_TEXTURE_3D: - case PIPE_TEXTURE_CUBE: - blitter_set_texcoords(ctx, src, src_width0, src_height0, srcbox->z, - srcbox->y, srcbox->x, - srcbox->x + width, srcbox->y + height); - break; - - default: - assert(0); - } - - /* Draw. */ - blitter_set_rectangle(ctx, dstx, dsty, dstx+width, dsty+height, 0); - ctx->base.pipe->redefine_user_buffer(ctx->base.pipe, ctx->vbuf, - 0, ctx->vbuf->width0); - util_draw_vertex_buffer(ctx->base.pipe, NULL, ctx->vbuf, 0, - PIPE_PRIM_TRIANGLE_FAN, 4, 2); - break; - } - - blitter_restore_vertex_states(ctx); - blitter_restore_fragment_states(ctx); - blitter_restore_textures(ctx); - blitter_restore_fb_state(ctx); - blitter_unset_running_flag(ctx); -} - -/* Clear a region of a color surface to a constant value. */ -void util_blitter_clear_render_target(struct blitter_context *blitter, - struct pipe_surface *dstsurf, - const union pipe_color_union *color, - unsigned dstx, unsigned dsty, - unsigned width, unsigned height) -{ - struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter; - struct pipe_context *pipe = ctx->base.pipe; - struct pipe_framebuffer_state fb_state; - - assert(dstsurf->texture); - if (!dstsurf->texture) - return; - - /* check the saved state */ - blitter_set_running_flag(ctx); - blitter_check_saved_vertex_states(ctx); - blitter_check_saved_fragment_states(ctx); - blitter_check_saved_fb_state(ctx); - - /* bind states */ - pipe->bind_blend_state(pipe, ctx->blend_write_color); - pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil); - pipe->bind_rasterizer_state(pipe, ctx->rs_state); - pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, 1, FALSE)); - pipe->bind_vs_state(pipe, ctx->vs); - if (ctx->has_geometry_shader) - pipe->bind_gs_state(pipe, NULL); - pipe->bind_vertex_elements_state(pipe, ctx->velem_state); - - /* set a framebuffer state */ - fb_state.width = dstsurf->width; - fb_state.height = dstsurf->height; - fb_state.nr_cbufs = 1; - fb_state.cbufs[0] = dstsurf; - fb_state.zsbuf = 0; - pipe->set_framebuffer_state(pipe, &fb_state); - - blitter_set_dst_dimensions(ctx, dstsurf->width, dstsurf->height); - blitter->draw_rectangle(blitter, dstx, dsty, dstx+width, dsty+height, 0, - UTIL_BLITTER_ATTRIB_COLOR, color); - - blitter_restore_vertex_states(ctx); - blitter_restore_fragment_states(ctx); - blitter_restore_fb_state(ctx); - blitter_unset_running_flag(ctx); -} - -/* Clear a region of a depth stencil surface. */ -void util_blitter_clear_depth_stencil(struct blitter_context *blitter, - struct pipe_surface *dstsurf, - unsigned clear_flags, - double depth, - unsigned stencil, - unsigned dstx, unsigned dsty, - unsigned width, unsigned height) -{ - struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter; - struct pipe_context *pipe = ctx->base.pipe; - struct pipe_framebuffer_state fb_state; - struct pipe_stencil_ref sr = { { 0 } }; - - assert(dstsurf->texture); - if (!dstsurf->texture) - return; - - /* check the saved state */ - blitter_set_running_flag(ctx); - blitter_check_saved_vertex_states(ctx); - blitter_check_saved_fragment_states(ctx); - blitter_check_saved_fb_state(ctx); - - /* bind states */ - pipe->bind_blend_state(pipe, ctx->blend_keep_color); - if ((clear_flags & PIPE_CLEAR_DEPTHSTENCIL) == PIPE_CLEAR_DEPTHSTENCIL) { - sr.ref_value[0] = stencil & 0xff; - pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_stencil); - pipe->set_stencil_ref(pipe, &sr); - } - else if (clear_flags & PIPE_CLEAR_DEPTH) { - pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_write_depth_keep_stencil); - } - else if (clear_flags & PIPE_CLEAR_STENCIL) { - sr.ref_value[0] = stencil & 0xff; - pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_write_stencil); - pipe->set_stencil_ref(pipe, &sr); - } - else - /* hmm that should be illegal probably, or make it a no-op somewhere */ - pipe->bind_depth_stencil_alpha_state(pipe, ctx->dsa_keep_depth_stencil); - - pipe->bind_rasterizer_state(pipe, ctx->rs_state); - pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, 0, FALSE)); - pipe->bind_vs_state(pipe, ctx->vs); - if (ctx->has_geometry_shader) - pipe->bind_gs_state(pipe, NULL); - pipe->bind_vertex_elements_state(pipe, ctx->velem_state); - - /* set a framebuffer state */ - fb_state.width = dstsurf->width; - fb_state.height = dstsurf->height; - fb_state.nr_cbufs = 0; - fb_state.cbufs[0] = 0; - fb_state.zsbuf = dstsurf; - pipe->set_framebuffer_state(pipe, &fb_state); - - blitter_set_dst_dimensions(ctx, dstsurf->width, dstsurf->height); - blitter->draw_rectangle(blitter, dstx, dsty, dstx+width, dsty+height, depth, - UTIL_BLITTER_ATTRIB_NONE, NULL); - - blitter_restore_vertex_states(ctx); - blitter_restore_fragment_states(ctx); - blitter_restore_fb_state(ctx); - blitter_unset_running_flag(ctx); -} - -/* draw a rectangle across a region using a custom dsa stage - for r600g */ -void util_blitter_custom_depth_stencil(struct blitter_context *blitter, - struct pipe_surface *zsurf, - struct pipe_surface *cbsurf, - void *dsa_stage, float depth) -{ - struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter; - struct pipe_context *pipe = ctx->base.pipe; - struct pipe_framebuffer_state fb_state; - - assert(zsurf->texture); - if (!zsurf->texture) - return; - - /* check the saved state */ - blitter_set_running_flag(ctx); - blitter_check_saved_vertex_states(ctx); - blitter_check_saved_fragment_states(ctx); - blitter_check_saved_fb_state(ctx); - - /* bind states */ - pipe->bind_blend_state(pipe, ctx->blend_write_color); - pipe->bind_depth_stencil_alpha_state(pipe, dsa_stage); - - pipe->bind_rasterizer_state(pipe, ctx->rs_state); - pipe->bind_fs_state(pipe, blitter_get_fs_col(ctx, 0, FALSE)); - pipe->bind_vs_state(pipe, ctx->vs); - if (ctx->has_geometry_shader) - pipe->bind_gs_state(pipe, NULL); - pipe->bind_vertex_elements_state(pipe, ctx->velem_state); - - /* set a framebuffer state */ - fb_state.width = zsurf->width; - fb_state.height = zsurf->height; - fb_state.nr_cbufs = 1; - if (cbsurf) { - fb_state.cbufs[0] = cbsurf; - fb_state.nr_cbufs = 1; - } else { - fb_state.cbufs[0] = NULL; - fb_state.nr_cbufs = 0; - } - fb_state.zsbuf = zsurf; - pipe->set_framebuffer_state(pipe, &fb_state); - - blitter_set_dst_dimensions(ctx, zsurf->width, zsurf->height); - blitter->draw_rectangle(blitter, 0, 0, zsurf->width, zsurf->height, depth, - UTIL_BLITTER_ATTRIB_NONE, NULL); - - blitter_restore_vertex_states(ctx); - blitter_restore_fragment_states(ctx); - blitter_restore_fb_state(ctx); - blitter_unset_running_flag(ctx); -} - -void util_blitter_copy_buffer(struct blitter_context *blitter, - struct pipe_resource *dst, - unsigned dstx, - struct pipe_resource *src, - unsigned srcx, - unsigned size) -{ - struct blitter_context_priv *ctx = (struct blitter_context_priv*)blitter; - struct pipe_context *pipe = ctx->base.pipe; - struct pipe_vertex_buffer vb; - struct pipe_stream_output_target *so_target; - - /* Drivers not capable of Stream Out should not call this function - * in the first place. */ - assert(ctx->has_stream_out); - - /* Some alignment is required. */ - if (srcx % 4 != 0 || dstx % 4 != 0 || size % 16 != 0 || - !ctx->has_stream_out) { - struct pipe_box box; - u_box_1d(srcx, size, &box); - util_resource_copy_region(pipe, dst, 0, dstx, 0, 0, src, 0, &box); - return; - } - - blitter_set_running_flag(ctx); - blitter_check_saved_vertex_states(ctx); - - vb.buffer = src; - vb.buffer_offset = srcx; - vb.stride = 4; - - pipe->set_vertex_buffers(pipe, 1, &vb); - pipe->bind_vertex_elements_state(pipe, ctx->velem_state_readbuf); - pipe->bind_vs_state(pipe, ctx->vs_pos_only); - if (ctx->has_geometry_shader) - pipe->bind_gs_state(pipe, NULL); - pipe->bind_rasterizer_state(pipe, ctx->rs_discard_state); - - so_target = pipe->create_stream_output_target(pipe, dst, dstx, size); - pipe->set_stream_output_targets(pipe, 1, &so_target, 0); - - util_draw_arrays(pipe, PIPE_PRIM_POINTS, 0, size / 16); - - blitter_restore_vertex_states(ctx); - blitter_unset_running_flag(ctx); - pipe_so_target_reference(&so_target, NULL); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_blitter.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_blitter.h deleted file mode 100644 index d4d30852b58..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_blitter.h +++ /dev/null @@ -1,425 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 Marek Olšák - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_BLITTER_H -#define U_BLITTER_H - -#include "util/u_framebuffer.h" -#include "util/u_inlines.h" -#include "util/u_memory.h" - -#include "pipe/p_state.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -struct pipe_context; - -enum blitter_attrib_type { - UTIL_BLITTER_ATTRIB_NONE, - UTIL_BLITTER_ATTRIB_COLOR, - UTIL_BLITTER_ATTRIB_TEXCOORD -}; - -struct blitter_context -{ - /** - * Draw a rectangle. - * - * \param x1 An X coordinate of the top-left corner. - * \param y1 A Y coordinate of the top-left corner. - * \param x2 An X coordinate of the bottom-right corner. - * \param y2 A Y coordinate of the bottom-right corner. - * \param depth A depth which the rectangle is rendered at. - * - * \param type Semantics of the attributes "attrib". - * If type is UTIL_BLITTER_ATTRIB_NONE, ignore them. - * If type is UTIL_BLITTER_ATTRIB_COLOR, the attributes - * make up a constant RGBA color, and should go - * to the GENERIC0 varying slot of a fragment shader. - * If type is UTIL_BLITTER_ATTRIB_TEXCOORD, {a1, a2} and - * {a3, a4} specify top-left and bottom-right texture - * coordinates of the rectangle, respectively, and should go - * to the GENERIC0 varying slot of a fragment shader. - * - * \param attrib See type. - * - * \note A driver may optionally override this callback to implement - * a specialized hardware path for drawing a rectangle, e.g. using - * a rectangular point sprite. - */ - void (*draw_rectangle)(struct blitter_context *blitter, - unsigned x1, unsigned y1, unsigned x2, unsigned y2, - float depth, - enum blitter_attrib_type type, - const union pipe_color_union *color); - - /* Whether the blitter is running. */ - boolean running; - - /* Private members, really. */ - struct pipe_context *pipe; /**< pipe context */ - - void *saved_blend_state; /**< blend state */ - void *saved_dsa_state; /**< depth stencil alpha state */ - void *saved_velem_state; /**< vertex elements state */ - void *saved_rs_state; /**< rasterizer state */ - void *saved_fs, *saved_vs, *saved_gs; /**< shaders */ - - struct pipe_framebuffer_state saved_fb_state; /**< framebuffer state */ - struct pipe_stencil_ref saved_stencil_ref; /**< stencil ref */ - struct pipe_viewport_state saved_viewport; - - int saved_num_sampler_states; - void *saved_sampler_states[PIPE_MAX_SAMPLERS]; - - int saved_num_sampler_views; - struct pipe_sampler_view *saved_sampler_views[PIPE_MAX_SAMPLERS]; - - int saved_num_vertex_buffers; - struct pipe_vertex_buffer saved_vertex_buffers[PIPE_MAX_ATTRIBS]; - - int saved_num_so_targets; - struct pipe_stream_output_target *saved_so_targets[PIPE_MAX_SO_BUFFERS]; -}; - -/** - * Create a blitter context. - */ -struct blitter_context *util_blitter_create(struct pipe_context *pipe); - -/** - * Destroy a blitter context. - */ -void util_blitter_destroy(struct blitter_context *blitter); - -/** - * Return the pipe context associated with a blitter context. - */ -static INLINE -struct pipe_context *util_blitter_get_pipe(struct blitter_context *blitter) -{ - return blitter->pipe; -} - -/* - * These states must be saved before any of the following functions are called: - * - vertex buffers - * - vertex elements - * - vertex shader - * - geometry shader (if supported) - * - stream output targets (if supported) - * - rasterizer state - */ - -/** - * Clear a specified set of currently bound buffers to specified values. - * - * These states must be saved in the blitter in addition to the state objects - * already required to be saved: - * - fragment shader - * - depth stencil alpha state - * - blend state - */ -void util_blitter_clear(struct blitter_context *blitter, - unsigned width, unsigned height, - unsigned num_cbufs, - unsigned clear_buffers, - enum pipe_format cbuf_format, - const union pipe_color_union *color, - double depth, unsigned stencil); - -void util_blitter_clear_depth_custom(struct blitter_context *blitter, - unsigned width, unsigned height, - double depth, void *custom_dsa); - -/** - * Copy a block of pixels from one surface to another. - * - * You can copy from any color format to any other color format provided - * the former can be sampled from and the latter can be rendered to. Otherwise, - * a software fallback path is taken and both surfaces must be of the same - * format. - * - * The same holds for depth-stencil formats with the exception that stencil - * cannot be copied unless you set ignore_stencil to FALSE. In that case, - * a software fallback path is taken and both surfaces must be of the same - * format. - * XXX implement hw-accel stencil copy using shader stencil export. - * - * Use pipe_screen->is_format_supported to know your options. - * - * These states must be saved in the blitter in addition to the state objects - * already required to be saved: - * - fragment shader - * - depth stencil alpha state - * - blend state - * - fragment sampler states - * - fragment sampler textures - * - framebuffer state - */ -void util_blitter_copy_texture(struct blitter_context *blitter, - struct pipe_resource *dst, - unsigned dstlevel, - unsigned dstx, unsigned dsty, unsigned dstz, - struct pipe_resource *src, - unsigned srclevel, - const struct pipe_box *srcbox, - boolean ignore_stencil); - -/** - * Same as util_blitter_copy_texture, but dst and src are pipe_surface and - * pipe_sampler_view, respectively. The mipmap level and dstz are part of - * the views. - * - * Drivers can use this to change resource properties (like format, width, - * height) by changing how the views interpret them, instead of changing - * pipe_resource directly. This is usually needed to accelerate copying of - * compressed formats. - * - * src_width0 and src_height0 are sampler_view-private properties that - * override pipe_resource. The blitter uses them for computation of texture - * coordinates. The dst dimensions are supplied through pipe_surface::width - * and height. - * - * NOTE: There are no checks whether the blit is actually supported. - */ -void util_blitter_copy_texture_view(struct blitter_context *blitter, - struct pipe_surface *dst, - unsigned dstx, unsigned dsty, - struct pipe_sampler_view *src, - const struct pipe_box *srcbox, - unsigned src_width0, unsigned src_height0); - -/** - * Helper function to initialize a view for copy_texture_view. - * The parameters must match copy_texture_view. - */ -void util_blitter_default_dst_texture(struct pipe_surface *dst_templ, - struct pipe_resource *dst, - unsigned dstlevel, - unsigned dstz, - const struct pipe_box *srcbox); - -/** - * Helper function to initialize a view for copy_texture_view. - * The parameters must match copy_texture_view. - */ -void util_blitter_default_src_texture(struct pipe_sampler_view *src_templ, - struct pipe_resource *src, - unsigned srclevel); - -/** - * Copy data from one buffer to another using the Stream Output functionality. - * Some alignment is required, otherwise software fallback is used. - */ -void util_blitter_copy_buffer(struct blitter_context *blitter, - struct pipe_resource *dst, - unsigned dstx, - struct pipe_resource *src, - unsigned srcx, - unsigned size); - -/** - * Clear a region of a (color) surface to a constant value. - * - * These states must be saved in the blitter in addition to the state objects - * already required to be saved: - * - fragment shader - * - depth stencil alpha state - * - blend state - * - framebuffer state - */ -void util_blitter_clear_render_target(struct blitter_context *blitter, - struct pipe_surface *dst, - const union pipe_color_union *color, - unsigned dstx, unsigned dsty, - unsigned width, unsigned height); - -/** - * Clear a region of a depth-stencil surface, both stencil and depth - * or only one of them if this is a combined depth-stencil surface. - * - * These states must be saved in the blitter in addition to the state objects - * already required to be saved: - * - fragment shader - * - depth stencil alpha state - * - blend state - * - framebuffer state - */ -void util_blitter_clear_depth_stencil(struct blitter_context *blitter, - struct pipe_surface *dst, - unsigned clear_flags, - double depth, - unsigned stencil, - unsigned dstx, unsigned dsty, - unsigned width, unsigned height); - -void util_blitter_custom_depth_stencil(struct blitter_context *blitter, - struct pipe_surface *zsurf, - struct pipe_surface *cbsurf, - void *dsa_stage, float depth); - -/* The functions below should be used to save currently bound constant state - * objects inside a driver. The objects are automatically restored at the end - * of the util_blitter_{clear, copy_region, fill_region} functions and then - * forgotten. - * - * States not listed here are not affected by util_blitter. */ - -static INLINE -void util_blitter_save_blend(struct blitter_context *blitter, - void *state) -{ - blitter->saved_blend_state = state; -} - -static INLINE -void util_blitter_save_depth_stencil_alpha(struct blitter_context *blitter, - void *state) -{ - blitter->saved_dsa_state = state; -} - -static INLINE -void util_blitter_save_vertex_elements(struct blitter_context *blitter, - void *state) -{ - blitter->saved_velem_state = state; -} - -static INLINE -void util_blitter_save_stencil_ref(struct blitter_context *blitter, - const struct pipe_stencil_ref *state) -{ - blitter->saved_stencil_ref = *state; -} - -static INLINE -void util_blitter_save_rasterizer(struct blitter_context *blitter, - void *state) -{ - blitter->saved_rs_state = state; -} - -static INLINE -void util_blitter_save_fragment_shader(struct blitter_context *blitter, - void *fs) -{ - blitter->saved_fs = fs; -} - -static INLINE -void util_blitter_save_vertex_shader(struct blitter_context *blitter, - void *vs) -{ - blitter->saved_vs = vs; -} - -static INLINE -void util_blitter_save_geometry_shader(struct blitter_context *blitter, - void *gs) -{ - blitter->saved_gs = gs; -} - -static INLINE -void util_blitter_save_framebuffer(struct blitter_context *blitter, - const struct pipe_framebuffer_state *state) -{ - blitter->saved_fb_state.nr_cbufs = 0; /* It's ~0 now, meaning it's unsaved. */ - util_copy_framebuffer_state(&blitter->saved_fb_state, state); -} - -static INLINE -void util_blitter_save_viewport(struct blitter_context *blitter, - struct pipe_viewport_state *state) -{ - blitter->saved_viewport = *state; -} - -static INLINE -void util_blitter_save_fragment_sampler_states( - struct blitter_context *blitter, - int num_sampler_states, - void **sampler_states) -{ - assert(num_sampler_states <= Elements(blitter->saved_sampler_states)); - - blitter->saved_num_sampler_states = num_sampler_states; - memcpy(blitter->saved_sampler_states, sampler_states, - num_sampler_states * sizeof(void *)); -} - -static INLINE void -util_blitter_save_fragment_sampler_views(struct blitter_context *blitter, - int num_views, - struct pipe_sampler_view **views) -{ - unsigned i; - assert(num_views <= Elements(blitter->saved_sampler_views)); - - blitter->saved_num_sampler_views = num_views; - for (i = 0; i < num_views; i++) - pipe_sampler_view_reference(&blitter->saved_sampler_views[i], - views[i]); -} - -static INLINE void -util_blitter_save_vertex_buffers(struct blitter_context *blitter, - int num_vertex_buffers, - struct pipe_vertex_buffer *vertex_buffers) -{ - assert(num_vertex_buffers <= Elements(blitter->saved_vertex_buffers)); - - blitter->saved_num_vertex_buffers = 0; - util_copy_vertex_buffers(blitter->saved_vertex_buffers, - (unsigned*)&blitter->saved_num_vertex_buffers, - vertex_buffers, - num_vertex_buffers); -} - -static INLINE void -util_blitter_save_so_targets(struct blitter_context *blitter, - int num_targets, - struct pipe_stream_output_target **targets) -{ - unsigned i; - assert(num_targets <= Elements(blitter->saved_so_targets)); - - blitter->saved_num_so_targets = num_targets; - for (i = 0; i < num_targets; i++) - pipe_so_target_reference(&blitter->saved_so_targets[i], - targets[i]); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_box.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_box.h deleted file mode 100644 index 0b28d0f12c3..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_box.h +++ /dev/null @@ -1,80 +0,0 @@ -#ifndef UTIL_BOX_INLINES_H -#define UTIL_BOX_INLINES_H - -#include "pipe/p_state.h" - -static INLINE -void u_box_1d( unsigned x, - unsigned w, - struct pipe_box *box ) -{ - box->x = x; - box->y = 0; - box->z = 0; - box->width = w; - box->height = 1; - box->depth = 1; -} - -static INLINE -void u_box_2d( unsigned x, - unsigned y, - unsigned w, - unsigned h, - struct pipe_box *box ) -{ - box->x = x; - box->y = y; - box->z = 0; - box->width = w; - box->height = h; - box->depth = 1; -} - -static INLINE -void u_box_origin_2d( unsigned w, - unsigned h, - struct pipe_box *box ) -{ - box->x = 0; - box->y = 0; - box->z = 0; - box->width = w; - box->height = h; - box->depth = 1; -} - -static INLINE -void u_box_2d_zslice( unsigned x, - unsigned y, - unsigned z, - unsigned w, - unsigned h, - struct pipe_box *box ) -{ - box->x = x; - box->y = y; - box->z = z; - box->width = w; - box->height = h; - box->depth = 1; -} - -static INLINE -void u_box_3d( unsigned x, - unsigned y, - unsigned z, - unsigned w, - unsigned h, - unsigned d, - struct pipe_box *box ) -{ - box->x = x; - box->y = y; - box->z = z; - box->width = w; - box->height = h; - box->depth = d; -} - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_cache.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_cache.c deleted file mode 100644 index df08ec302a2..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_cache.c +++ /dev/null @@ -1,351 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Improved cache implementation. - * - * Fixed size array with linear probing on collision and LRU eviction - * on full. - * - * @author Jose Fonseca - */ - - -#include "pipe/p_compiler.h" -#include "util/u_debug.h" - -#include "util/u_math.h" -#include "util/u_memory.h" -#include "util/u_cache.h" -#include "util/u_simple_list.h" - - -struct util_cache_entry -{ - enum { EMPTY = 0, FILLED, DELETED } state; - uint32_t hash; - - struct util_cache_entry *next; - struct util_cache_entry *prev; - - void *key; - void *value; - -#ifdef DEBUG - unsigned count; -#endif -}; - - -struct util_cache -{ - /** Hash function */ - uint32_t (*hash)(const void *key); - - /** Compare two keys */ - int (*compare)(const void *key1, const void *key2); - - /** Destroy a (key, value) pair */ - void (*destroy)(void *key, void *value); - - uint32_t size; - - struct util_cache_entry *entries; - - unsigned count; - struct util_cache_entry lru; -}; - -static void -ensure_sanity(const struct util_cache *cache); - -#define CACHE_DEFAULT_ALPHA 2 - -struct util_cache * -util_cache_create(uint32_t (*hash)(const void *key), - int (*compare)(const void *key1, const void *key2), - void (*destroy)(void *key, void *value), - uint32_t size) -{ - struct util_cache *cache; - - cache = CALLOC_STRUCT(util_cache); - if(!cache) - return NULL; - - cache->hash = hash; - cache->compare = compare; - cache->destroy = destroy; - - make_empty_list(&cache->lru); - - size *= CACHE_DEFAULT_ALPHA; - cache->size = size; - - cache->entries = CALLOC(size, sizeof(struct util_cache_entry)); - if(!cache->entries) { - FREE(cache); - return NULL; - } - - ensure_sanity(cache); - return cache; -} - - -static struct util_cache_entry * -util_cache_entry_get(struct util_cache *cache, - uint32_t hash, - const void *key) -{ - struct util_cache_entry *first_unfilled = NULL; - uint32_t index = hash % cache->size; - uint32_t probe; - - /* Probe until we find either a matching FILLED entry or an EMPTY - * slot (which has never been occupied). - * - * Deleted or non-matching slots are not indicative of completion - * as a previous linear probe for the same key could have continued - * past this point. - */ - for (probe = 0; probe < cache->size; probe++) { - uint32_t i = (index + probe) % cache->size; - struct util_cache_entry *current = &cache->entries[i]; - - if (current->state == FILLED) { - if (current->hash == hash && - cache->compare(key, current->key) == 0) - return current; - } - else { - if (!first_unfilled) - first_unfilled = current; - - if (current->state == EMPTY) - return first_unfilled; - } - } - - return NULL; -} - -static INLINE void -util_cache_entry_destroy(struct util_cache *cache, - struct util_cache_entry *entry) -{ - void *key = entry->key; - void *value = entry->value; - - entry->key = NULL; - entry->value = NULL; - - if (entry->state == FILLED) { - remove_from_list(entry); - cache->count--; - - if(cache->destroy) - cache->destroy(key, value); - - entry->state = DELETED; - } -} - - -void -util_cache_set(struct util_cache *cache, - void *key, - void *value) -{ - struct util_cache_entry *entry; - uint32_t hash = cache->hash(key); - - assert(cache); - if (!cache) - return; - - entry = util_cache_entry_get(cache, hash, key); - if (!entry) - entry = cache->lru.prev; - - if (cache->count >= cache->size / CACHE_DEFAULT_ALPHA) - util_cache_entry_destroy(cache, cache->lru.prev); - - util_cache_entry_destroy(cache, entry); - -#ifdef DEBUG - ++entry->count; -#endif - - entry->key = key; - entry->hash = hash; - entry->value = value; - entry->state = FILLED; - insert_at_head(&cache->lru, entry); - cache->count++; - - ensure_sanity(cache); -} - - -void * -util_cache_get(struct util_cache *cache, - const void *key) -{ - struct util_cache_entry *entry; - uint32_t hash = cache->hash(key); - - assert(cache); - if (!cache) - return NULL; - - entry = util_cache_entry_get(cache, hash, key); - if (!entry) - return NULL; - - if (entry->state == FILLED) - move_to_head(&cache->lru, entry); - - return entry->value; -} - - -void -util_cache_clear(struct util_cache *cache) -{ - uint32_t i; - - assert(cache); - if (!cache) - return; - - for(i = 0; i < cache->size; ++i) { - util_cache_entry_destroy(cache, &cache->entries[i]); - cache->entries[i].state = EMPTY; - } - - assert(cache->count == 0); - assert(is_empty_list(&cache->lru)); - ensure_sanity(cache); -} - - -void -util_cache_destroy(struct util_cache *cache) -{ - assert(cache); - if (!cache) - return; - -#ifdef DEBUG - if(cache->count >= 20*cache->size) { - /* Normal approximation of the Poisson distribution */ - double mean = (double)cache->count/(double)cache->size; - double stddev = sqrt(mean); - unsigned i; - for(i = 0; i < cache->size; ++i) { - double z = fabs(cache->entries[i].count - mean)/stddev; - /* This assert should not fail 99.9999998027% of the times, unless - * the hash function is a poor one */ - assert(z <= 6.0); - } - } -#endif - - util_cache_clear(cache); - - FREE(cache->entries); - FREE(cache); -} - - -void -util_cache_remove(struct util_cache *cache, - const void *key) -{ - struct util_cache_entry *entry; - uint32_t hash; - - assert(cache); - if (!cache) - return; - - hash = cache->hash(key); - - entry = util_cache_entry_get(cache, hash, key); - if (!entry) - return; - - if (entry->state == FILLED) - util_cache_entry_destroy(cache, entry); - - ensure_sanity(cache); -} - - -static void -ensure_sanity(const struct util_cache *cache) -{ -#ifdef DEBUG - unsigned i, cnt = 0; - - assert(cache); - for (i = 0; i < cache->size; i++) { - struct util_cache_entry *header = &cache->entries[i]; - - assert(header); - assert(header->state == FILLED || - header->state == EMPTY || - header->state == DELETED); - if (header->state == FILLED) { - cnt++; - assert(header->hash == cache->hash(header->key)); - } - } - - assert(cnt == cache->count); - assert(cache->size >= cnt); - - if (cache->count == 0) { - assert (is_empty_list(&cache->lru)); - } - else { - struct util_cache_entry *header = cache->lru.next; - - assert (header); - assert (!is_empty_list(&cache->lru)); - - for (i = 0; i < cache->count; i++) - header = header->next; - - assert(header == &cache->lru); - } -#endif - - (void)cache; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_cache.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_cache.h deleted file mode 100644 index be3631b7254..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_cache.h +++ /dev/null @@ -1,91 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Simple cache. - * - * @author Jose Fonseca - */ - -#ifndef U_CACHE_H_ -#define U_CACHE_H_ - - -#include "pipe/p_compiler.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -/** - * Least Recently Used (LRU) cache. - */ -struct util_cache; - - -/** - * Create a cache. - * - * @param hash hash function - * @param compare should return 0 for two equal keys - * @param destroy destruction callback (optional) - * @param size maximum number of entries - */ -struct util_cache * -util_cache_create(uint32_t (*hash)(const void *key), - int (*compare)(const void *key1, const void *key2), - void (*destroy)(void *key, void *value), - uint32_t size); - -void -util_cache_set(struct util_cache *cache, - void *key, - void *value); - -void * -util_cache_get(struct util_cache *cache, - const void *key); - -void -util_cache_clear(struct util_cache *cache); - -void -util_cache_destroy(struct util_cache *cache); - -void -util_cache_remove(struct util_cache *cache, - const void *key); - - -#ifdef __cplusplus -} -#endif - -#endif /* U_CACHE_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_caps.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_caps.c deleted file mode 100644 index 6230707552e..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_caps.c +++ /dev/null @@ -1,269 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Vmware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "pipe/p_screen.h" -#include "util/u_format.h" -#include "util/u_debug.h" -#include "u_caps.h" - -/** - * Iterates over a list of caps checks as defined in u_caps.h. Should - * all checks pass returns TRUE and out is set to the last element of - * the list (TERMINATE). Should any check fail returns FALSE and set - * out to the index of the start of the first failing check. - */ -boolean -util_check_caps_out(struct pipe_screen *screen, const unsigned *list, int *out) -{ - int i, tmpi; - float tmpf; - - for (i = 0; list[i];) { - switch(list[i++]) { - case UTIL_CAPS_CHECK_CAP: - if (!screen->get_param(screen, list[i++])) { - *out = i - 2; - return FALSE; - } - break; - case UTIL_CAPS_CHECK_INT: - tmpi = screen->get_param(screen, list[i++]); - if (tmpi < (int)list[i++]) { - *out = i - 3; - return FALSE; - } - break; - case UTIL_CAPS_CHECK_FLOAT: - tmpf = screen->get_paramf(screen, list[i++]); - if (tmpf < (float)list[i++]) { - *out = i - 3; - return FALSE; - } - break; - case UTIL_CAPS_CHECK_FORMAT: - if (!screen->is_format_supported(screen, - list[i++], - PIPE_TEXTURE_2D, - 0, - PIPE_BIND_SAMPLER_VIEW)) { - *out = i - 2; - return FALSE; - } - break; - case UTIL_CAPS_CHECK_SHADER: - tmpi = screen->get_shader_param(screen, list[i] >> 24, list[i] & ((1 << 24) - 1)); - ++i; - if (tmpi < (int)list[i++]) { - *out = i - 3; - return FALSE; - } - break; - case UTIL_CAPS_CHECK_UNIMPLEMENTED: - *out = i - 1; - return FALSE; - default: - assert(!"Unsupported check"); - return FALSE; - } - } - - *out = i; - return TRUE; -} - -/** - * Iterates over a list of caps checks as defined in u_caps.h. - * Returns TRUE if all caps checks pass returns FALSE otherwise. - */ -boolean -util_check_caps(struct pipe_screen *screen, const unsigned *list) -{ - int out; - return util_check_caps_out(screen, list, &out); -} - - -/* - * Below follows some demo lists. - * - * None of these lists are exhausting lists of what is - * actually needed to support said API and more here for - * as example on how to uses the above functions. Especially - * for DX10 and DX11 where Gallium is missing features. - */ - -/* DX 9_1 */ -static unsigned caps_dx_9_1[] = { - UTIL_CHECK_INT(MAX_RENDER_TARGETS, 1), - UTIL_CHECK_INT(MAX_TEXTURE_2D_LEVELS, 12), /* 2048 */ - UTIL_CHECK_INT(MAX_TEXTURE_3D_LEVELS, 9), /* 256 */ - UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 10), /* 512 */ - UTIL_CHECK_FLOAT(MAX_TEXTURE_ANISOTROPY, 2), - UTIL_CHECK_TERMINATE -}; - -/* DX 9_2 */ -static unsigned caps_dx_9_2[] = { - UTIL_CHECK_CAP(OCCLUSION_QUERY), - UTIL_CHECK_CAP(BLEND_EQUATION_SEPARATE), - UTIL_CHECK_INT(MAX_RENDER_TARGETS, 1), - UTIL_CHECK_INT(MAX_TEXTURE_2D_LEVELS, 12), /* 2048 */ - UTIL_CHECK_INT(MAX_TEXTURE_3D_LEVELS, 9), /* 256 */ - UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 10), /* 512 */ - UTIL_CHECK_FLOAT(MAX_TEXTURE_ANISOTROPY, 16), - UTIL_CHECK_TERMINATE -}; - -/* DX 9_3 */ -static unsigned caps_dx_9_3[] = { - UTIL_CHECK_CAP(SM3), - //UTIL_CHECK_CAP(INSTANCING), - UTIL_CHECK_CAP(OCCLUSION_QUERY), - UTIL_CHECK_INT(MAX_RENDER_TARGETS, 4), - UTIL_CHECK_INT(MAX_TEXTURE_2D_LEVELS, 13), /* 4096 */ - UTIL_CHECK_INT(MAX_TEXTURE_3D_LEVELS, 9), /* 256 */ - UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 10), /* 512 */ - UTIL_CHECK_FLOAT(MAX_TEXTURE_ANISOTROPY, 16), - UTIL_CHECK_TERMINATE -}; - -/* DX 10 */ -static unsigned caps_dx_10[] = { - UTIL_CHECK_CAP(SM3), - //UTIL_CHECK_CAP(INSTANCING), - UTIL_CHECK_CAP(OCCLUSION_QUERY), - UTIL_CHECK_INT(MAX_RENDER_TARGETS, 8), - UTIL_CHECK_INT(MAX_TEXTURE_2D_LEVELS, 14), /* 8192 */ - UTIL_CHECK_INT(MAX_TEXTURE_3D_LEVELS, 12), /* 2048 */ - UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 14), /* 8192 */ - UTIL_CHECK_FLOAT(MAX_TEXTURE_ANISOTROPY, 16), - UTIL_CHECK_UNIMPLEMENTED, /* XXX Unimplemented features in Gallium */ - UTIL_CHECK_TERMINATE -}; - -/* DX11 */ -static unsigned caps_dx_11[] = { - UTIL_CHECK_CAP(SM3), - //UTIL_CHECK_CAP(INSTANCING), - UTIL_CHECK_CAP(OCCLUSION_QUERY), - UTIL_CHECK_INT(MAX_RENDER_TARGETS, 8), - UTIL_CHECK_INT(MAX_TEXTURE_2D_LEVELS, 14), /* 16384 */ - UTIL_CHECK_INT(MAX_TEXTURE_3D_LEVELS, 12), /* 2048 */ - UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 14), /* 16384 */ - UTIL_CHECK_FLOAT(MAX_TEXTURE_ANISOTROPY, 16), - UTIL_CHECK_FORMAT(B8G8R8A8_UNORM), - UTIL_CHECK_UNIMPLEMENTED, /* XXX Unimplemented features in Gallium */ - UTIL_CHECK_TERMINATE -}; - -/* OpenGL 2.1 */ -static unsigned caps_opengl_2_1[] = { - UTIL_CHECK_CAP(OCCLUSION_QUERY), - UTIL_CHECK_CAP(TWO_SIDED_STENCIL), - UTIL_CHECK_CAP(BLEND_EQUATION_SEPARATE), - UTIL_CHECK_INT(MAX_RENDER_TARGETS, 2), - UTIL_CHECK_TERMINATE -}; - -/* OpenGL 3.0 */ -/* UTIL_CHECK_INT(MAX_RENDER_TARGETS, 8), */ - -/* Shader Model 3 */ -static unsigned caps_sm3[] = { - UTIL_CHECK_SHADER(FRAGMENT, MAX_INSTRUCTIONS, 512), - UTIL_CHECK_SHADER(FRAGMENT, MAX_INPUTS, 10), - UTIL_CHECK_SHADER(FRAGMENT, MAX_TEMPS, 32), - UTIL_CHECK_SHADER(FRAGMENT, MAX_ADDRS, 1), - UTIL_CHECK_SHADER(FRAGMENT, MAX_CONSTS, 224), - - UTIL_CHECK_SHADER(VERTEX, MAX_INSTRUCTIONS, 512), - UTIL_CHECK_SHADER(VERTEX, MAX_INPUTS, 16), - UTIL_CHECK_SHADER(VERTEX, MAX_TEMPS, 32), - UTIL_CHECK_SHADER(VERTEX, MAX_ADDRS, 2), - UTIL_CHECK_SHADER(VERTEX, MAX_CONSTS, 256), - - UTIL_CHECK_TERMINATE -}; - -/** - * Demo function which checks against theoretical caps needed for different APIs. - */ -void util_caps_demo_print(struct pipe_screen *screen) -{ - struct { - char* name; - unsigned *list; - } list[] = { - {"DX 9.1", caps_dx_9_1}, - {"DX 9.2", caps_dx_9_2}, - {"DX 9.3", caps_dx_9_3}, - {"DX 10", caps_dx_10}, - {"DX 11", caps_dx_11}, - {"OpenGL 2.1", caps_opengl_2_1}, -/* {"OpenGL 3.0", caps_opengl_3_0},*/ - {"SM3", caps_sm3}, - {NULL, NULL} - }; - int i, out = 0; - - for (i = 0; list[i].name; i++) { - if (util_check_caps_out(screen, list[i].list, &out)) { - debug_printf("%s: %s yes\n", __FUNCTION__, list[i].name); - continue; - } - switch (list[i].list[out]) { - case UTIL_CAPS_CHECK_CAP: - debug_printf("%s: %s no (cap %u not supported)\n", __FUNCTION__, - list[i].name, - list[i].list[out + 1]); - break; - case UTIL_CAPS_CHECK_INT: - debug_printf("%s: %s no (cap %u less then %u)\n", __FUNCTION__, - list[i].name, - list[i].list[out + 1], - list[i].list[out + 2]); - break; - case UTIL_CAPS_CHECK_FLOAT: - debug_printf("%s: %s no (cap %u less then %f)\n", __FUNCTION__, - list[i].name, - list[i].list[out + 1], - (double)(int)list[i].list[out + 2]); - break; - case UTIL_CAPS_CHECK_FORMAT: - debug_printf("%s: %s no (format %s not supported)\n", __FUNCTION__, - list[i].name, - util_format_name(list[i].list[out + 1]) + 12); - break; - case UTIL_CAPS_CHECK_UNIMPLEMENTED: - debug_printf("%s: %s no (not implemented in gallium or state tracker)\n", - __FUNCTION__, list[i].name); - break; - default: - assert(!"Unsupported check"); - } - } -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_caps.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_caps.h deleted file mode 100644 index 038efc9f13e..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_caps.h +++ /dev/null @@ -1,71 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Vmware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_CAPS_H -#define U_CAPS_H - -#include "pipe/p_compiler.h" - -struct pipe_screen; - -enum u_caps_check_enum { - UTIL_CAPS_CHECK_TERMINATE = 0, - UTIL_CAPS_CHECK_CAP, - UTIL_CAPS_CHECK_INT, - UTIL_CAPS_CHECK_FLOAT, - UTIL_CAPS_CHECK_FORMAT, - UTIL_CAPS_CHECK_SHADER, - UTIL_CAPS_CHECK_UNIMPLEMENTED, -}; - -#define UTIL_CHECK_CAP(cap) \ - UTIL_CAPS_CHECK_CAP, PIPE_CAP_##cap - -#define UTIL_CHECK_INT(cap, higher) \ - UTIL_CAPS_CHECK_INT, PIPE_CAP_##cap, (unsigned)(higher) - -/* Floats currently lose precision */ -#define UTIL_CHECK_FLOAT(cap, higher) \ - UTIL_CAPS_CHECK_FLOAT, PIPE_CAPF_##cap, (unsigned)(int)(higher) - -#define UTIL_CHECK_FORMAT(format) \ - UTIL_CAPS_CHECK_FORMAT, PIPE_FORMAT_##format - -#define UTIL_CHECK_SHADER(shader, cap, higher) \ - UTIL_CAPS_CHECK_SHADER, (PIPE_SHADER_##shader << 24) | PIPE_SHADER_CAP_##cap, (unsigned)(higher) - -#define UTIL_CHECK_UNIMPLEMENTED \ - UTIL_CAPS_CHECK_UNIMPLEMENTED - -#define UTIL_CHECK_TERMINATE \ - UTIL_CAPS_CHECK_TERMINATE - -boolean util_check_caps(struct pipe_screen *screen, const unsigned *list); -boolean util_check_caps_out(struct pipe_screen *screen, const unsigned *list, int *out); -void util_caps_demo_print(struct pipe_screen *screen); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_clear.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_clear.h deleted file mode 100644 index e9fd874b1fc..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_clear.h +++ /dev/null @@ -1,59 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: - * Michel Dänzer - */ - - -#include "pipe/p_context.h" -#include "pipe/p_state.h" - - -/** - * Clear the given buffers to the specified values. - * No masking, no scissor (clear entire buffer). - */ -static INLINE void -util_clear(struct pipe_context *pipe, - struct pipe_framebuffer_state *framebuffer, unsigned buffers, - const union pipe_color_union *color, double depth, unsigned stencil) -{ - if (buffers & PIPE_CLEAR_COLOR) { - unsigned i; - for (i = 0; i < framebuffer->nr_cbufs; i++) { - struct pipe_surface *ps = framebuffer->cbufs[i]; - pipe->clear_render_target(pipe, ps, color, 0, 0, ps->width, ps->height); - } - } - - if (buffers & PIPE_CLEAR_DEPTHSTENCIL) { - struct pipe_surface *ps = framebuffer->zsbuf; - pipe->clear_depth_stencil(pipe, ps, buffers & PIPE_CLEAR_DEPTHSTENCIL, - depth, stencil, - 0, 0, ps->width, ps->height); - } -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_cpu_detect.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_cpu_detect.c deleted file mode 100644 index b267daeeae3..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_cpu_detect.c +++ /dev/null @@ -1,345 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Dennis Smit - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * AUTHORS, COPYRIGHT HOLDERS, AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * CPU feature detection. - * - * @author Dennis Smit - * @author Based on the work of Eric Anholt - */ - -#include "pipe/p_config.h" - -#include "u_debug.h" -#include "u_cpu_detect.h" - -#if defined(PIPE_ARCH_PPC) -#if defined(PIPE_OS_APPLE) -#include -#else -#include -#include -#endif -#endif - -#if defined(PIPE_OS_NETBSD) || defined(PIPE_OS_OPENBSD) -#include -#include -#include -#endif - -#if defined(PIPE_OS_FREEBSD) -#include -#include -#endif - -#if defined(PIPE_OS_LINUX) -#include -#endif - -#ifdef PIPE_OS_UNIX -#include -#endif - -#if defined(PIPE_OS_WINDOWS) -//#include -#include -#include -#if defined(MSVC) -#include -#endif -#endif - - -#ifdef DEBUG -DEBUG_GET_ONCE_BOOL_OPTION(dump_cpu, "GALLIUM_DUMP_CPU", FALSE) -#endif - - -struct util_cpu_caps util_cpu_caps; - -#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) -static int has_cpuid(void); -#endif - - -#if defined(PIPE_ARCH_PPC) && !defined(PIPE_OS_APPLE) -static jmp_buf __lv_powerpc_jmpbuf; -static volatile sig_atomic_t __lv_powerpc_canjump = 0; - -static void -sigill_handler(int sig) -{ - if (!__lv_powerpc_canjump) { - signal (sig, SIG_DFL); - raise (sig); - } - - __lv_powerpc_canjump = 0; - longjmp(__lv_powerpc_jmpbuf, 1); -} -#endif - -#if defined(PIPE_ARCH_PPC) -static void -check_os_altivec_support(void) -{ -#if defined(PIPE_OS_APPLE) - int sels[2] = {CTL_HW, HW_VECTORUNIT}; - int has_vu = 0; - int len = sizeof (has_vu); - int err; - - err = sysctl(sels, 2, &has_vu, &len, NULL, 0); - - if (err == 0) { - if (has_vu != 0) { - util_cpu_caps.has_altivec = 1; - } - } -#else /* !PIPE_OS_APPLE */ - /* not on Apple/Darwin, do it the brute-force way */ - /* this is borrowed from the libmpeg2 library */ - signal(SIGILL, sigill_handler); - if (setjmp(__lv_powerpc_jmpbuf)) { - signal(SIGILL, SIG_DFL); - } else { - __lv_powerpc_canjump = 1; - - __asm __volatile - ("mtspr 256, %0\n\t" - "vand %%v0, %%v0, %%v0" - : - : "r" (-1)); - - signal(SIGILL, SIG_DFL); - util_cpu_caps.has_altivec = 1; - } -#endif /* !PIPE_OS_APPLE */ -} -#endif /* PIPE_ARCH_PPC */ - - -#if defined(PIPE_ARCH_X86) || defined (PIPE_ARCH_X86_64) -static int has_cpuid(void) -{ -#if defined(PIPE_ARCH_X86) -#if defined(PIPE_OS_GCC) - int a, c; - - __asm __volatile - ("pushf\n" - "popl %0\n" - "movl %0, %1\n" - "xorl $0x200000, %0\n" - "push %0\n" - "popf\n" - "pushf\n" - "popl %0\n" - : "=a" (a), "=c" (c) - : - : "cc"); - - return a != c; -#else - /* FIXME */ - return 1; -#endif -#elif defined(PIPE_ARCH_X86_64) - return 1; -#else - return 0; -#endif -} - - -/** - * @sa cpuid.h included in gcc-4.3 onwards. - * @sa http://msdn.microsoft.com/en-us/library/hskdteyh.aspx - */ -static INLINE void -cpuid(uint32_t ax, uint32_t *p) -{ -#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86) - __asm __volatile ( - "xchgl %%ebx, %1\n\t" - "cpuid\n\t" - "xchgl %%ebx, %1" - : "=a" (p[0]), - "=S" (p[1]), - "=c" (p[2]), - "=d" (p[3]) - : "0" (ax) - ); -#elif defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86_64) - __asm __volatile ( - "cpuid\n\t" - : "=a" (p[0]), - "=b" (p[1]), - "=c" (p[2]), - "=d" (p[3]) - : "0" (ax) - ); -#elif defined(PIPE_CC_MSVC) - __cpuid(p, ax); -#else - p[0] = 0; - p[1] = 0; - p[2] = 0; - p[3] = 0; -#endif -} -#endif /* X86 or X86_64 */ - -void -util_cpu_detect(void) -{ - static boolean util_cpu_detect_initialized = FALSE; - - if(util_cpu_detect_initialized) - return; - - memset(&util_cpu_caps, 0, sizeof util_cpu_caps); - - /* Count the number of CPUs in system */ -#if defined(PIPE_OS_WINDOWS) - { - SYSTEM_INFO system_info; - GetSystemInfo(&system_info); - util_cpu_caps.nr_cpus = system_info.dwNumberOfProcessors; - } -#elif defined(PIPE_OS_UNIX) && defined(_SC_NPROCESSORS_ONLN) - util_cpu_caps.nr_cpus = sysconf(_SC_NPROCESSORS_ONLN); - if (util_cpu_caps.nr_cpus == -1) - util_cpu_caps.nr_cpus = 1; -#elif defined(PIPE_OS_BSD) - { - int mib[2], ncpu; - int len; - - mib[0] = CTL_HW; - mib[1] = HW_NCPU; - - len = sizeof (ncpu); - sysctl(mib, 2, &ncpu, &len, NULL, 0); - util_cpu_caps.nr_cpus = ncpu; - } -#else - util_cpu_caps.nr_cpus = 1; -#endif - -#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) - if (has_cpuid()) { - uint32_t regs[4]; - uint32_t regs2[4]; - - util_cpu_caps.cacheline = 32; - - /* Get max cpuid level */ - cpuid(0x00000000, regs); - - if (regs[0] >= 0x00000001) { - unsigned int cacheline; - - cpuid (0x00000001, regs2); - - util_cpu_caps.x86_cpu_type = (regs2[0] >> 8) & 0xf; - if (util_cpu_caps.x86_cpu_type == 0xf) - util_cpu_caps.x86_cpu_type = 8 + ((regs2[0] >> 20) & 255); /* use extended family (P4, IA64) */ - - /* general feature flags */ - util_cpu_caps.has_tsc = (regs2[3] >> 8) & 1; /* 0x0000010 */ - util_cpu_caps.has_mmx = (regs2[3] >> 23) & 1; /* 0x0800000 */ - util_cpu_caps.has_sse = (regs2[3] >> 25) & 1; /* 0x2000000 */ - util_cpu_caps.has_sse2 = (regs2[3] >> 26) & 1; /* 0x4000000 */ - util_cpu_caps.has_sse3 = (regs2[2] >> 0) & 1; /* 0x0000001 */ - util_cpu_caps.has_ssse3 = (regs2[2] >> 9) & 1; /* 0x0000020 */ - util_cpu_caps.has_sse4_1 = (regs2[2] >> 19) & 1; - util_cpu_caps.has_sse4_2 = (regs2[2] >> 20) & 1; - util_cpu_caps.has_avx = (regs2[2] >> 28) & 1; - util_cpu_caps.has_mmx2 = util_cpu_caps.has_sse; /* SSE cpus supports mmxext too */ - - cacheline = ((regs2[1] >> 8) & 0xFF) * 8; - if (cacheline > 0) - util_cpu_caps.cacheline = cacheline; - } - - cpuid(0x80000000, regs); - - if (regs[0] >= 0x80000001) { - - cpuid(0x80000001, regs2); - - util_cpu_caps.has_mmx |= (regs2[3] >> 23) & 1; - util_cpu_caps.has_mmx2 |= (regs2[3] >> 22) & 1; - util_cpu_caps.has_3dnow = (regs2[3] >> 31) & 1; - util_cpu_caps.has_3dnow_ext = (regs2[3] >> 30) & 1; - } - - if (regs[0] >= 0x80000006) { - cpuid(0x80000006, regs2); - util_cpu_caps.cacheline = regs2[2] & 0xFF; - } - - if (!util_cpu_caps.has_sse) { - util_cpu_caps.has_sse2 = 0; - util_cpu_caps.has_sse3 = 0; - util_cpu_caps.has_ssse3 = 0; - util_cpu_caps.has_sse4_1 = 0; - } - } -#endif /* PIPE_ARCH_X86 || PIPE_ARCH_X86_64 */ - -#if defined(PIPE_ARCH_PPC) - check_os_altivec_support(); -#endif /* PIPE_ARCH_PPC */ - -#ifdef DEBUG - if (debug_get_option_dump_cpu()) { - debug_printf("util_cpu_caps.nr_cpus = %u\n", util_cpu_caps.nr_cpus); - - debug_printf("util_cpu_caps.x86_cpu_type = %u\n", util_cpu_caps.x86_cpu_type); - debug_printf("util_cpu_caps.cacheline = %u\n", util_cpu_caps.cacheline); - - debug_printf("util_cpu_caps.has_tsc = %u\n", util_cpu_caps.has_tsc); - debug_printf("util_cpu_caps.has_mmx = %u\n", util_cpu_caps.has_mmx); - debug_printf("util_cpu_caps.has_mmx2 = %u\n", util_cpu_caps.has_mmx2); - debug_printf("util_cpu_caps.has_sse = %u\n", util_cpu_caps.has_sse); - debug_printf("util_cpu_caps.has_sse2 = %u\n", util_cpu_caps.has_sse2); - debug_printf("util_cpu_caps.has_sse3 = %u\n", util_cpu_caps.has_sse3); - debug_printf("util_cpu_caps.has_ssse3 = %u\n", util_cpu_caps.has_ssse3); - debug_printf("util_cpu_caps.has_sse4_1 = %u\n", util_cpu_caps.has_sse4_1); - debug_printf("util_cpu_caps.has_sse4_2 = %u\n", util_cpu_caps.has_sse4_2); - debug_printf("util_cpu_caps.has_avx = %u\n", util_cpu_caps.has_avx); - debug_printf("util_cpu_caps.has_3dnow = %u\n", util_cpu_caps.has_3dnow); - debug_printf("util_cpu_caps.has_3dnow_ext = %u\n", util_cpu_caps.has_3dnow_ext); - debug_printf("util_cpu_caps.has_altivec = %u\n", util_cpu_caps.has_altivec); - } -#endif - - util_cpu_detect_initialized = TRUE; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_cpu_detect.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_cpu_detect.h deleted file mode 100644 index 856e8d7a0ef..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_cpu_detect.h +++ /dev/null @@ -1,69 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Dennis Smit - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * AUTHORS, COPYRIGHT HOLDERS, AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - ***************************************************************************/ - -/** - * @file - * CPU feature detection. - * - * @author Dennis Smit - * @author Based on the work of Eric Anholt - */ - -#ifndef _UTIL_CPU_DETECT_H -#define _UTIL_CPU_DETECT_H - -#include "pipe/p_compiler.h" -#include "pipe/p_config.h" - -struct util_cpu_caps { - unsigned nr_cpus; - - /* Feature flags */ - int x86_cpu_type; - unsigned cacheline; - - unsigned has_tsc:1; - unsigned has_mmx:1; - unsigned has_mmx2:1; - unsigned has_sse:1; - unsigned has_sse2:1; - unsigned has_sse3:1; - unsigned has_ssse3:1; - unsigned has_sse4_1:1; - unsigned has_sse4_2:1; - unsigned has_avx:1; - unsigned has_3dnow:1; - unsigned has_3dnow_ext:1; - unsigned has_altivec:1; -}; - -extern struct util_cpu_caps -util_cpu_caps; - -void util_cpu_detect(void); - - -#endif /* _UTIL_CPU_DETECT_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug.c deleted file mode 100644 index df1d8e68cfd..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug.c +++ /dev/null @@ -1,697 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * Copyright (c) 2008 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#include "pipe/p_config.h" - -#include "pipe/p_compiler.h" -#include "util/u_debug.h" -#include "pipe/p_format.h" -#include "pipe/p_state.h" -#include "util/u_inlines.h" -#include "util/u_format.h" -#include "util/u_memory.h" -#include "util/u_string.h" -#include "util/u_math.h" -#include "util/u_tile.h" -#include "util/u_prim.h" -#include "util/u_surface.h" - -#include -#include /* CHAR_BIT */ -#include /* isalnum */ - -void _debug_vprintf(const char *format, va_list ap) -{ -#if defined(PIPE_OS_WINDOWS) || defined(PIPE_SUBSYSTEM_EMBEDDED) - /* We buffer until we find a newline. */ - static char buf[4096] = {'\0'}; - size_t len = strlen(buf); - int ret = util_vsnprintf(buf + len, sizeof(buf) - len, format, ap); - if(ret > (int)(sizeof(buf) - len - 1) || util_strchr(buf + len, '\n')) { - os_log_message(buf); - buf[0] = '\0'; - } -#else - /* Just print as-is to stderr */ - vfprintf(stderr, format, ap); -#endif -} - - -#ifdef DEBUG -void debug_print_blob( const char *name, - const void *blob, - unsigned size ) -{ - const unsigned *ublob = (const unsigned *)blob; - unsigned i; - - debug_printf("%s (%d dwords%s)\n", name, size/4, - size%4 ? "... plus a few bytes" : ""); - - for (i = 0; i < size/4; i++) { - debug_printf("%d:\t%08x\n", i, ublob[i]); - } -} -#endif - - -static boolean -debug_get_option_should_print(void) -{ - static boolean first = TRUE; - static boolean value = FALSE; - - if (!first) - return value; - - /* Oh hey this will call into this function, - * but its cool since we set first to false - */ - first = FALSE; - value = debug_get_bool_option("GALLIUM_PRINT_OPTIONS", FALSE); - /* XXX should we print this option? Currently it wont */ - return value; -} - -const char * -debug_get_option(const char *name, const char *dfault) -{ - const char *result; - - result = os_get_option(name); - if(!result) - result = dfault; - - if (debug_get_option_should_print()) - debug_printf("%s: %s = %s\n", __FUNCTION__, name, result ? result : "(null)"); - - return result; -} - -boolean -debug_get_bool_option(const char *name, boolean dfault) -{ - const char *str = os_get_option(name); - boolean result; - - if(str == NULL) - result = dfault; - else if(!util_strcmp(str, "n")) - result = FALSE; - else if(!util_strcmp(str, "no")) - result = FALSE; - else if(!util_strcmp(str, "0")) - result = FALSE; - else if(!util_strcmp(str, "f")) - result = FALSE; - else if(!util_strcmp(str, "F")) - result = FALSE; - else if(!util_strcmp(str, "false")) - result = FALSE; - else if(!util_strcmp(str, "FALSE")) - result = FALSE; - else - result = TRUE; - - if (debug_get_option_should_print()) - debug_printf("%s: %s = %s\n", __FUNCTION__, name, result ? "TRUE" : "FALSE"); - - return result; -} - - -long -debug_get_num_option(const char *name, long dfault) -{ - long result; - const char *str; - - str = os_get_option(name); - if(!str) - result = dfault; - else { - long sign; - char c; - c = *str++; - if(c == '-') { - sign = -1; - c = *str++; - } - else { - sign = 1; - } - result = 0; - while('0' <= c && c <= '9') { - result = result*10 + (c - '0'); - c = *str++; - } - result *= sign; - } - - if (debug_get_option_should_print()) - debug_printf("%s: %s = %li\n", __FUNCTION__, name, result); - - return result; -} - -static boolean str_has_option(const char *str, const char *name) -{ - /* Empty string. */ - if (!*str) { - return FALSE; - } - - /* OPTION=all */ - if (!util_strcmp(str, "all")) { - return TRUE; - } - - /* Find 'name' in 'str' surrounded by non-alphanumeric characters. */ - { - const char *start = str; - unsigned name_len = strlen(name); - - /* 'start' is the beginning of the currently-parsed word, - * we increment 'str' each iteration. - * if we find either the end of string or a non-alphanumeric character, - * we compare 'start' up to 'str-1' with 'name'. */ - - while (1) { - if (!*str || !isalnum(*str)) { - if (str-start == name_len && - !memcmp(start, name, name_len)) { - return TRUE; - } - - if (!*str) { - return FALSE; - } - - start = str+1; - } - - str++; - } - } - - return FALSE; -} - -unsigned long -debug_get_flags_option(const char *name, - const struct debug_named_value *flags, - unsigned long dfault) -{ - unsigned long result; - const char *str; - const struct debug_named_value *orig = flags; - int namealign = 0; - - str = os_get_option(name); - if(!str) - result = dfault; - else if (!util_strcmp(str, "help")) { - result = dfault; - _debug_printf("%s: help for %s:\n", __FUNCTION__, name); - for (; flags->name; ++flags) - namealign = MAX2(namealign, strlen(flags->name)); - for (flags = orig; flags->name; ++flags) - _debug_printf("| %*s [0x%0*lx]%s%s\n", namealign, flags->name, - (int)sizeof(unsigned long)*CHAR_BIT/4, flags->value, - flags->desc ? " " : "", flags->desc ? flags->desc : ""); - } - else { - result = 0; - while( flags->name ) { - if (str_has_option(str, flags->name)) - result |= flags->value; - ++flags; - } - } - - if (debug_get_option_should_print()) { - if (str) { - debug_printf("%s: %s = 0x%lx (%s)\n", __FUNCTION__, name, result, str); - } else { - debug_printf("%s: %s = 0x%lx\n", __FUNCTION__, name, result); - } - } - - return result; -} - - -void _debug_assert_fail(const char *expr, - const char *file, - unsigned line, - const char *function) -{ - _debug_printf("%s:%u:%s: Assertion `%s' failed.\n", file, line, function, expr); - if (debug_get_bool_option("GALLIUM_ABORT_ON_ASSERT", TRUE)) - os_abort(); - else - _debug_printf("continuing...\n"); -} - - -const char * -debug_dump_enum(const struct debug_named_value *names, - unsigned long value) -{ - static char rest[64]; - - while(names->name) { - if(names->value == value) - return names->name; - ++names; - } - - util_snprintf(rest, sizeof(rest), "0x%08lx", value); - return rest; -} - - -const char * -debug_dump_enum_noprefix(const struct debug_named_value *names, - const char *prefix, - unsigned long value) -{ - static char rest[64]; - - while(names->name) { - if(names->value == value) { - const char *name = names->name; - while (*name == *prefix) { - name++; - prefix++; - } - return name; - } - ++names; - } - - - - util_snprintf(rest, sizeof(rest), "0x%08lx", value); - return rest; -} - - -const char * -debug_dump_flags(const struct debug_named_value *names, - unsigned long value) -{ - static char output[4096]; - static char rest[256]; - int first = 1; - - output[0] = '\0'; - - while(names->name) { - if((names->value & value) == names->value) { - if (!first) - util_strncat(output, "|", sizeof(output)); - else - first = 0; - util_strncat(output, names->name, sizeof(output) - 1); - output[sizeof(output) - 1] = '\0'; - value &= ~names->value; - } - ++names; - } - - if (value) { - if (!first) - util_strncat(output, "|", sizeof(output)); - else - first = 0; - - util_snprintf(rest, sizeof(rest), "0x%08lx", value); - util_strncat(output, rest, sizeof(output) - 1); - output[sizeof(output) - 1] = '\0'; - } - - if(first) - return "0"; - - return output; -} - - -#ifdef DEBUG -void debug_print_format(const char *msg, unsigned fmt ) -{ - debug_printf("%s: %s\n", msg, util_format_name(fmt)); -} -#endif - - - -static const struct debug_named_value pipe_prim_names[] = { -#ifdef DEBUG - DEBUG_NAMED_VALUE(PIPE_PRIM_POINTS), - DEBUG_NAMED_VALUE(PIPE_PRIM_LINES), - DEBUG_NAMED_VALUE(PIPE_PRIM_LINE_LOOP), - DEBUG_NAMED_VALUE(PIPE_PRIM_LINE_STRIP), - DEBUG_NAMED_VALUE(PIPE_PRIM_TRIANGLES), - DEBUG_NAMED_VALUE(PIPE_PRIM_TRIANGLE_STRIP), - DEBUG_NAMED_VALUE(PIPE_PRIM_TRIANGLE_FAN), - DEBUG_NAMED_VALUE(PIPE_PRIM_QUADS), - DEBUG_NAMED_VALUE(PIPE_PRIM_QUAD_STRIP), - DEBUG_NAMED_VALUE(PIPE_PRIM_POLYGON), -#endif - DEBUG_NAMED_VALUE_END -}; - - -const char *u_prim_name( unsigned prim ) -{ - return debug_dump_enum(pipe_prim_names, prim); -} - - - -#ifdef DEBUG -int fl_indent = 0; -const char* fl_function[1024]; - -int debug_funclog_enter(const char* f, const int line, const char* file) -{ - int i; - - for (i = 0; i < fl_indent; i++) - debug_printf(" "); - debug_printf("%s\n", f); - - assert(fl_indent < 1023); - fl_function[fl_indent++] = f; - - return 0; -} - -void debug_funclog_exit(const char* f, const int line, const char* file) -{ - --fl_indent; - assert(fl_indent >= 0); - assert(fl_function[fl_indent] == f); -} - -void debug_funclog_enter_exit(const char* f, const int line, const char* file) -{ - int i; - for (i = 0; i < fl_indent; i++) - debug_printf(" "); - debug_printf("%s\n", f); -} -#endif - - - -#ifdef DEBUG -/** - * Dump an image to a .raw or .ppm file (depends on OS). - * \param format PIPE_FORMAT_x - * \param cpp bytes per pixel - * \param width width in pixels - * \param height height in pixels - * \param stride row stride in bytes - */ -void debug_dump_image(const char *prefix, - unsigned format, unsigned cpp, - unsigned width, unsigned height, - unsigned stride, - const void *data) -{ - /* write a ppm file */ - char filename[256]; - FILE *f; - - util_snprintf(filename, sizeof(filename), "%s.ppm", prefix); - - f = fopen(filename, "w"); - if (f) { - int i, x, y; - int r, g, b; - const uint8_t *ptr = (uint8_t *) data; - - /* XXX this is a hack */ - switch (format) { - case PIPE_FORMAT_B8G8R8A8_UNORM: - r = 2; - g = 1; - b = 0; - break; - default: - r = 0; - g = 1; - b = 1; - } - - fprintf(f, "P6\n"); - fprintf(f, "# ppm-file created by osdemo.c\n"); - fprintf(f, "%i %i\n", width, height); - fprintf(f, "255\n"); - fclose(f); - - f = fopen(filename, "ab"); /* reopen in binary append mode */ - for (y = 0; y < height; y++) { - for (x = 0; x < width; x++) { - i = y * stride + x * cpp; - fputc(ptr[i + r], f); /* write red */ - fputc(ptr[i + g], f); /* write green */ - fputc(ptr[i + b], f); /* write blue */ - } - } - fclose(f); - } - else { - fprintf(stderr, "Can't open %s for writing\n", filename); - } -} - -/* FIXME: dump resources, not surfaces... */ -void debug_dump_surface(struct pipe_context *pipe, - const char *prefix, - struct pipe_surface *surface) -{ - struct pipe_resource *texture; - struct pipe_transfer *transfer; - void *data; - - if (!surface) - return; - - /* XXX: this doesn't necessarily work, as the driver may be using - * temporary storage for the surface which hasn't been propagated - * back into the texture. Need to nail down the semantics of views - * and transfers a bit better before we can say if extra work needs - * to be done here: - */ - texture = surface->texture; - - transfer = pipe_get_transfer(pipe, texture, surface->u.tex.level, - surface->u.tex.first_layer, - PIPE_TRANSFER_READ, - 0, 0, surface->width, surface->height); - - data = pipe->transfer_map(pipe, transfer); - if(!data) - goto error; - - debug_dump_image(prefix, - texture->format, - util_format_get_blocksize(texture->format), - util_format_get_nblocksx(texture->format, surface->width), - util_format_get_nblocksy(texture->format, surface->height), - transfer->stride, - data); - - pipe->transfer_unmap(pipe, transfer); -error: - pipe->transfer_destroy(pipe, transfer); -} - - -void debug_dump_texture(struct pipe_context *pipe, - const char *prefix, - struct pipe_resource *texture) -{ - struct pipe_surface *surface, surf_tmpl; - - if (!texture) - return; - - /* XXX for now, just dump image for layer=0, level=0 */ - memset(&surf_tmpl, 0, sizeof(surf_tmpl)); - u_surface_default_template(&surf_tmpl, texture, 0 /* no bind flag - not a surface */); - surface = pipe->create_surface(pipe, texture, &surf_tmpl); - if (surface) { - debug_dump_surface(pipe, prefix, surface); - pipe->surface_destroy(pipe, surface); - } -} - - -#pragma pack(push,2) -struct bmp_file_header { - uint16_t bfType; - uint32_t bfSize; - uint16_t bfReserved1; - uint16_t bfReserved2; - uint32_t bfOffBits; -}; -#pragma pack(pop) - -struct bmp_info_header { - uint32_t biSize; - int32_t biWidth; - int32_t biHeight; - uint16_t biPlanes; - uint16_t biBitCount; - uint32_t biCompression; - uint32_t biSizeImage; - int32_t biXPelsPerMeter; - int32_t biYPelsPerMeter; - uint32_t biClrUsed; - uint32_t biClrImportant; -}; - -struct bmp_rgb_quad { - uint8_t rgbBlue; - uint8_t rgbGreen; - uint8_t rgbRed; - uint8_t rgbAlpha; -}; - -void -debug_dump_surface_bmp(struct pipe_context *pipe, - const char *filename, - struct pipe_surface *surface) -{ - struct pipe_transfer *transfer; - struct pipe_resource *texture = surface->texture; - - transfer = pipe_get_transfer(pipe, texture, surface->u.tex.level, - surface->u.tex.first_layer, PIPE_TRANSFER_READ, - 0, 0, surface->width, surface->height); - - debug_dump_transfer_bmp(pipe, filename, transfer); - - pipe->transfer_destroy(pipe, transfer); -} - -void -debug_dump_transfer_bmp(struct pipe_context *pipe, - const char *filename, - struct pipe_transfer *transfer) -{ - float *rgba; - - if (!transfer) - goto error1; - - rgba = MALLOC(transfer->box.width * - transfer->box.height * - transfer->box.depth * - 4*sizeof(float)); - if(!rgba) - goto error1; - - pipe_get_tile_rgba(pipe, transfer, 0, 0, - transfer->box.width, transfer->box.height, - rgba); - - debug_dump_float_rgba_bmp(filename, - transfer->box.width, transfer->box.height, - rgba, transfer->box.width); - - FREE(rgba); -error1: - ; -} - -void -debug_dump_float_rgba_bmp(const char *filename, - unsigned width, unsigned height, - float *rgba, unsigned stride) -{ - FILE *stream; - struct bmp_file_header bmfh; - struct bmp_info_header bmih; - unsigned x, y; - - if(!rgba) - goto error1; - - bmfh.bfType = 0x4d42; - bmfh.bfSize = 14 + 40 + height*width*4; - bmfh.bfReserved1 = 0; - bmfh.bfReserved2 = 0; - bmfh.bfOffBits = 14 + 40; - - bmih.biSize = 40; - bmih.biWidth = width; - bmih.biHeight = height; - bmih.biPlanes = 1; - bmih.biBitCount = 32; - bmih.biCompression = 0; - bmih.biSizeImage = height*width*4; - bmih.biXPelsPerMeter = 0; - bmih.biYPelsPerMeter = 0; - bmih.biClrUsed = 0; - bmih.biClrImportant = 0; - - stream = fopen(filename, "wb"); - if(!stream) - goto error1; - - fwrite(&bmfh, 14, 1, stream); - fwrite(&bmih, 40, 1, stream); - - y = height; - while(y--) { - float *ptr = rgba + (stride * y * 4); - for(x = 0; x < width; ++x) - { - struct bmp_rgb_quad pixel; - pixel.rgbRed = float_to_ubyte(ptr[x*4 + 0]); - pixel.rgbGreen = float_to_ubyte(ptr[x*4 + 1]); - pixel.rgbBlue = float_to_ubyte(ptr[x*4 + 2]); - pixel.rgbAlpha = float_to_ubyte(ptr[x*4 + 3]); - fwrite(&pixel, 1, 4, stream); - } - } - - fclose(stream); -error1: - ; -} - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug.h deleted file mode 100644 index ed19cda05a2..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug.h +++ /dev/null @@ -1,453 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Cross-platform debugging helpers. - * - * For now it just has assert and printf replacements, but it might be extended - * with stack trace reports and more advanced logging in the near future. - * - * @author Jose Fonseca - */ - -#ifndef U_DEBUG_H_ -#define U_DEBUG_H_ - - -#include "os/os_misc.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -#if defined(__GNUC__) -#define _util_printf_format(fmt, list) __attribute__ ((format (printf, fmt, list))) -#else -#define _util_printf_format(fmt, list) -#endif - -void _debug_vprintf(const char *format, va_list ap); - - -static INLINE void -_debug_printf(const char *format, ...) -{ - va_list ap; - va_start(ap, format); - _debug_vprintf(format, ap); - va_end(ap); -} - - -/** - * Print debug messages. - * - * The actual channel used to output debug message is platform specific. To - * avoid misformating or truncation, follow these rules of thumb: - * - output whole lines - * - avoid outputing large strings (512 bytes is the current maximum length - * that is guaranteed to be printed in all platforms) - */ -#if !defined(PIPE_OS_HAIKU) -static INLINE void -debug_printf(const char *format, ...) _util_printf_format(1,2); - -static INLINE void -debug_printf(const char *format, ...) -{ -#ifdef DEBUG - va_list ap; - va_start(ap, format); - _debug_vprintf(format, ap); - va_end(ap); -#else - (void) format; /* silence warning */ -#endif -} -#else /* is Haiku */ -/* Haiku provides debug_printf in libroot with OS.h */ -#include -#endif - - -/* - * ... isn't portable so we need to pass arguments in parentheses. - * - * usage: - * debug_printf_once(("awnser: %i\n", 42)); - */ -#define debug_printf_once(args) \ - do { \ - static boolean once = TRUE; \ - if (once) { \ - once = FALSE; \ - debug_printf args; \ - } \ - } while (0) - - -#ifdef DEBUG -#define debug_vprintf(_format, _ap) _debug_vprintf(_format, _ap) -#else -#define debug_vprintf(_format, _ap) ((void)0) -#endif - - -#ifdef DEBUG -/** - * Dump a blob in hex to the same place that debug_printf sends its - * messages. - */ -void debug_print_blob( const char *name, const void *blob, unsigned size ); - -/* Print a message along with a prettified format string - */ -void debug_print_format(const char *msg, unsigned fmt ); -#else -#define debug_print_blob(_name, _blob, _size) ((void)0) -#define debug_print_format(_msg, _fmt) ((void)0) -#endif - - -/** - * Hard-coded breakpoint. - */ -#ifdef DEBUG -#define debug_break() os_break() -#else /* !DEBUG */ -#define debug_break() ((void)0) -#endif /* !DEBUG */ - - -long -debug_get_num_option(const char *name, long dfault); - -void _debug_assert_fail(const char *expr, - const char *file, - unsigned line, - const char *function); - - -/** - * Assert macro - * - * Do not expect that the assert call terminates -- errors must be handled - * regardless of assert behavior. - * - * For non debug builds the assert macro will expand to a no-op, so do not - * call functions with side effects in the assert expression. - */ -#ifdef DEBUG -#define debug_assert(expr) ((expr) ? (void)0 : _debug_assert_fail(#expr, __FILE__, __LINE__, __FUNCTION__)) -#else -#define debug_assert(expr) do { } while (0 && (expr)) -#endif - - -/** Override standard assert macro */ -#ifdef assert -#undef assert -#endif -#define assert(expr) debug_assert(expr) - - -/** - * Output the current function name. - */ -#ifdef DEBUG -#define debug_checkpoint() \ - _debug_printf("%s\n", __FUNCTION__) -#else -#define debug_checkpoint() \ - ((void)0) -#endif - - -/** - * Output the full source code position. - */ -#ifdef DEBUG -#define debug_checkpoint_full() \ - _debug_printf("%s:%u:%s\n", __FILE__, __LINE__, __FUNCTION__) -#else -#define debug_checkpoint_full() \ - ((void)0) -#endif - - -/** - * Output a warning message. Muted on release version. - */ -#ifdef DEBUG -#define debug_warning(__msg) \ - _debug_printf("%s:%u:%s: warning: %s\n", __FILE__, __LINE__, __FUNCTION__, __msg) -#else -#define debug_warning(__msg) \ - ((void)0) -#endif - - -/** - * Emit a warning message, but only once. - */ -#ifdef DEBUG -#define debug_warn_once(__msg) \ - do { \ - static bool warned = FALSE; \ - if (!warned) { \ - _debug_printf("%s:%u:%s: one time warning: %s\n", \ - __FILE__, __LINE__, __FUNCTION__, __msg); \ - warned = TRUE; \ - } \ - } while (0) -#else -#define debug_warn_once(__msg) \ - ((void)0) -#endif - - -/** - * Output an error message. Not muted on release version. - */ -#ifdef DEBUG -#define debug_error(__msg) \ - _debug_printf("%s:%u:%s: error: %s\n", __FILE__, __LINE__, __FUNCTION__, __msg) -#else -#define debug_error(__msg) \ - _debug_printf("error: %s\n", __msg) -#endif - - -/** - * Used by debug_dump_enum and debug_dump_flags to describe symbols. - */ -struct debug_named_value -{ - const char *name; - unsigned long value; - const char *desc; -}; - - -/** - * Some C pre-processor magic to simplify creating named values. - * - * Example: - * @code - * static const debug_named_value my_names[] = { - * DEBUG_NAMED_VALUE(MY_ENUM_VALUE_X), - * DEBUG_NAMED_VALUE(MY_ENUM_VALUE_Y), - * DEBUG_NAMED_VALUE(MY_ENUM_VALUE_Z), - * DEBUG_NAMED_VALUE_END - * }; - * - * ... - * debug_printf("%s = %s\n", - * name, - * debug_dump_enum(my_names, my_value)); - * ... - * @endcode - */ -#define DEBUG_NAMED_VALUE(__symbol) DEBUG_NAMED_VALUE_WITH_DESCRIPTION(__symbol, NULL) -#define DEBUG_NAMED_VALUE_WITH_DESCRIPTION(__symbol, __desc) {#__symbol, (unsigned long)__symbol, __desc} -#define DEBUG_NAMED_VALUE_END {NULL, 0, NULL} - - -/** - * Convert a enum value to a string. - */ -const char * -debug_dump_enum(const struct debug_named_value *names, - unsigned long value); - -const char * -debug_dump_enum_noprefix(const struct debug_named_value *names, - const char *prefix, - unsigned long value); - - -/** - * Convert binary flags value to a string. - */ -const char * -debug_dump_flags(const struct debug_named_value *names, - unsigned long value); - - -/** - * Function enter exit loggers - */ -#ifdef DEBUG -int debug_funclog_enter(const char* f, const int line, const char* file); -void debug_funclog_exit(const char* f, const int line, const char* file); -void debug_funclog_enter_exit(const char* f, const int line, const char* file); - -#define DEBUG_FUNCLOG_ENTER() \ - int __debug_decleration_work_around = \ - debug_funclog_enter(__FUNCTION__, __LINE__, __FILE__) -#define DEBUG_FUNCLOG_EXIT() \ - do { \ - (void)__debug_decleration_work_around; \ - debug_funclog_exit(__FUNCTION__, __LINE__, __FILE__); \ - return; \ - } while(0) -#define DEBUG_FUNCLOG_EXIT_RET(ret) \ - do { \ - (void)__debug_decleration_work_around; \ - debug_funclog_exit(__FUNCTION__, __LINE__, __FILE__); \ - return ret; \ - } while(0) -#define DEBUG_FUNCLOG_ENTER_EXIT() \ - debug_funclog_enter_exit(__FUNCTION__, __LINE__, __FILE__) - -#else -#define DEBUG_FUNCLOG_ENTER() \ - int __debug_decleration_work_around -#define DEBUG_FUNCLOG_EXIT() \ - do { (void)__debug_decleration_work_around; return; } while(0) -#define DEBUG_FUNCLOG_EXIT_RET(ret) \ - do { (void)__debug_decleration_work_around; return ret; } while(0) -#define DEBUG_FUNCLOG_ENTER_EXIT() -#endif - - -/** - * Get option. - * - * It is an alias for getenv on Linux. - * - * On Windows it reads C:\gallium.cfg, which is a text file with CR+LF line - * endings with one option per line as - * - * NAME=value - * - * This file must be terminated with an extra empty line. - */ -const char * -debug_get_option(const char *name, const char *dfault); - -boolean -debug_get_bool_option(const char *name, boolean dfault); - -long -debug_get_num_option(const char *name, long dfault); - -unsigned long -debug_get_flags_option(const char *name, - const struct debug_named_value *flags, - unsigned long dfault); - -#define DEBUG_GET_ONCE_BOOL_OPTION(sufix, name, dfault) \ -static boolean \ -debug_get_option_ ## sufix (void) \ -{ \ - static boolean first = TRUE; \ - static boolean value; \ - if (first) { \ - first = FALSE; \ - value = debug_get_bool_option(name, dfault); \ - } \ - return value; \ -} - -#define DEBUG_GET_ONCE_NUM_OPTION(sufix, name, dfault) \ -static long \ -debug_get_option_ ## sufix (void) \ -{ \ - static boolean first = TRUE; \ - static long value; \ - if (first) { \ - first = FALSE; \ - value = debug_get_num_option(name, dfault); \ - } \ - return value; \ -} - -#define DEBUG_GET_ONCE_FLAGS_OPTION(sufix, name, flags, dfault) \ -static unsigned long \ -debug_get_option_ ## sufix (void) \ -{ \ - static boolean first = TRUE; \ - static unsigned long value; \ - if (first) { \ - first = FALSE; \ - value = debug_get_flags_option(name, flags, dfault); \ - } \ - return value; \ -} - - -unsigned long -debug_memory_begin(void); - -void -debug_memory_end(unsigned long beginning); - - -#ifdef DEBUG -struct pipe_context; -struct pipe_surface; -struct pipe_transfer; -struct pipe_resource; - -void debug_dump_image(const char *prefix, - unsigned format, unsigned cpp, - unsigned width, unsigned height, - unsigned stride, - const void *data); -void debug_dump_surface(struct pipe_context *pipe, - const char *prefix, - struct pipe_surface *surface); -void debug_dump_texture(struct pipe_context *pipe, - const char *prefix, - struct pipe_resource *texture); -void debug_dump_surface_bmp(struct pipe_context *pipe, - const char *filename, - struct pipe_surface *surface); -void debug_dump_transfer_bmp(struct pipe_context *pipe, - const char *filename, - struct pipe_transfer *transfer); -void debug_dump_float_rgba_bmp(const char *filename, - unsigned width, unsigned height, - float *rgba, unsigned stride); -#else -#define debug_dump_image(prefix, format, cpp, width, height, stride, data) ((void)0) -#define debug_dump_surface(pipe, prefix, surface) ((void)0) -#define debug_dump_surface_bmp(pipe, filename, surface) ((void)0) -#define debug_dump_transfer_bmp(filename, transfer) ((void)0) -#define debug_dump_float_rgba_bmp(filename, width, height, rgba, stride) ((void)0) -#endif - - -#ifdef __cplusplus -} -#endif - -#endif /* U_DEBUG_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_describe.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_describe.c deleted file mode 100644 index df73ed83ef6..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_describe.c +++ /dev/null @@ -1,91 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Luca Barbieri - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "pipe/p_state.h" -#include "util/u_format.h" -#include "util/u_debug_describe.h" -#include "util/u_string.h" - -void -debug_describe_reference(char* buf, const struct pipe_reference*ptr) -{ - strcpy(buf, "pipe_object"); -} - -void -debug_describe_resource(char* buf, const struct pipe_resource *ptr) -{ - switch(ptr->target) - { - case PIPE_BUFFER: - util_sprintf(buf, "pipe_buffer<%u>", (unsigned)util_format_get_stride(ptr->format, ptr->width0)); - break; - case PIPE_TEXTURE_1D: - util_sprintf(buf, "pipe_texture1d<%u,%s,%u>", ptr->width0, util_format_short_name(ptr->format), ptr->last_level); - break; - case PIPE_TEXTURE_2D: - util_sprintf(buf, "pipe_texture2d<%u,%u,%s,%u>", ptr->width0, ptr->height0, util_format_short_name(ptr->format), ptr->last_level); - break; - case PIPE_TEXTURE_RECT: - util_sprintf(buf, "pipe_texture_rect<%u,%u,%s>", ptr->width0, ptr->height0, util_format_short_name(ptr->format)); - break; - case PIPE_TEXTURE_CUBE: - util_sprintf(buf, "pipe_texture_cube<%u,%u,%s,%u>", ptr->width0, ptr->height0, util_format_short_name(ptr->format), ptr->last_level); - break; - case PIPE_TEXTURE_3D: - util_sprintf(buf, "pipe_texture3d<%u,%u,%u,%s,%u>", ptr->width0, ptr->height0, ptr->depth0, util_format_short_name(ptr->format), ptr->last_level); - break; - default: - util_sprintf(buf, "pipe_martian_resource<%u>", ptr->target); - break; - } -} - -void -debug_describe_surface(char* buf, const struct pipe_surface *ptr) -{ - char res[128]; - debug_describe_resource(res, ptr->texture); - util_sprintf(buf, "pipe_surface<%s,%u,%u,%u>", res, ptr->u.tex.level, ptr->u.tex.first_layer, ptr->u.tex.last_layer); -} - -void -debug_describe_sampler_view(char* buf, const struct pipe_sampler_view *ptr) -{ - char res[128]; - debug_describe_resource(res, ptr->texture); - util_sprintf(buf, "pipe_sampler_view<%s,%s>", res, util_format_short_name(ptr->format)); -} - -void -debug_describe_so_target(char* buf, - const struct pipe_stream_output_target *ptr) -{ - char res[128]; - debug_describe_resource(res, ptr->buffer); - util_sprintf(buf, "pipe_stream_output_target<%s,%u,%u>", res, - ptr->buffer_offset, ptr->buffer_size); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_describe.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_describe.h deleted file mode 100644 index 4f7882b0b37..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_describe.h +++ /dev/null @@ -1,51 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Luca Barbieri - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_DEBUG_DESCRIBE_H_ -#define U_DEBUG_DESCRIBE_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -struct pipe_reference; -struct pipe_resource; -struct pipe_surface; -struct pipe_sampler_view; - -/* a 256-byte buffer is necessary and sufficient */ -void debug_describe_reference(char* buf, const struct pipe_reference*ptr); -void debug_describe_resource(char* buf, const struct pipe_resource *ptr); -void debug_describe_surface(char* buf, const struct pipe_surface *ptr); -void debug_describe_sampler_view(char* buf, const struct pipe_sampler_view *ptr); -void debug_describe_so_target(char* buf, - const struct pipe_stream_output_target *ptr); - -#ifdef __cplusplus -} -#endif - -#endif /* U_DEBUG_DESCRIBE_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_memory.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_memory.c deleted file mode 100644 index e24a8bc0b43..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_memory.c +++ /dev/null @@ -1,316 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Memory debugging. - * - * @author José Fonseca - */ - -#include "pipe/p_config.h" - -#define DEBUG_MEMORY_IMPLEMENTATION - -#include "os/os_memory.h" -#include "os/os_memory_debug.h" -#include "os/os_thread.h" - -#include "util/u_debug.h" -#include "util/u_debug_stack.h" -#include "util/u_double_list.h" - - -#define DEBUG_MEMORY_MAGIC 0x6e34090aU -#define DEBUG_MEMORY_STACK 0 /* XXX: disabled until we have symbol lookup */ - - -struct debug_memory_header -{ - struct list_head head; - - unsigned long no; - const char *file; - unsigned line; - const char *function; -#if DEBUG_MEMORY_STACK - struct debug_stack_frame backtrace[DEBUG_MEMORY_STACK]; -#endif - size_t size; - - unsigned magic; -}; - -struct debug_memory_footer -{ - unsigned magic; -}; - - -static struct list_head list = { &list, &list }; - -pipe_static_mutex(list_mutex); - -static unsigned long last_no = 0; - - -static INLINE struct debug_memory_header * -header_from_data(void *data) -{ - if(data) - return (struct debug_memory_header *)((char *)data - sizeof(struct debug_memory_header)); - else - return NULL; -} - -static INLINE void * -data_from_header(struct debug_memory_header *hdr) -{ - if(hdr) - return (void *)((char *)hdr + sizeof(struct debug_memory_header)); - else - return NULL; -} - -static INLINE struct debug_memory_footer * -footer_from_header(struct debug_memory_header *hdr) -{ - if(hdr) - return (struct debug_memory_footer *)((char *)hdr + sizeof(struct debug_memory_header) + hdr->size); - else - return NULL; -} - - -void * -debug_malloc(const char *file, unsigned line, const char *function, - size_t size) -{ - struct debug_memory_header *hdr; - struct debug_memory_footer *ftr; - - hdr = os_malloc(sizeof(*hdr) + size + sizeof(*ftr)); - if(!hdr) { - debug_printf("%s:%u:%s: out of memory when trying to allocate %lu bytes\n", - file, line, function, - (long unsigned)size); - return NULL; - } - - hdr->no = last_no++; - hdr->file = file; - hdr->line = line; - hdr->function = function; - hdr->size = size; - hdr->magic = DEBUG_MEMORY_MAGIC; - -#if DEBUG_MEMORY_STACK - debug_backtrace_capture(hdr->backtrace, 0, DEBUG_MEMORY_STACK); -#endif - - ftr = footer_from_header(hdr); - ftr->magic = DEBUG_MEMORY_MAGIC; - - pipe_mutex_lock(list_mutex); - LIST_ADDTAIL(&hdr->head, &list); - pipe_mutex_unlock(list_mutex); - - return data_from_header(hdr); -} - -void -debug_free(const char *file, unsigned line, const char *function, - void *ptr) -{ - struct debug_memory_header *hdr; - struct debug_memory_footer *ftr; - - if(!ptr) - return; - - hdr = header_from_data(ptr); - if(hdr->magic != DEBUG_MEMORY_MAGIC) { - debug_printf("%s:%u:%s: freeing bad or corrupted memory %p\n", - file, line, function, - ptr); - debug_assert(0); - return; - } - - ftr = footer_from_header(hdr); - if(ftr->magic != DEBUG_MEMORY_MAGIC) { - debug_printf("%s:%u:%s: buffer overflow %p\n", - hdr->file, hdr->line, hdr->function, - ptr); - debug_assert(0); - } - - pipe_mutex_lock(list_mutex); - LIST_DEL(&hdr->head); - pipe_mutex_unlock(list_mutex); - hdr->magic = 0; - ftr->magic = 0; - - os_free(hdr); -} - -void * -debug_calloc(const char *file, unsigned line, const char *function, - size_t count, size_t size ) -{ - void *ptr = debug_malloc( file, line, function, count * size ); - if( ptr ) - memset( ptr, 0, count * size ); - return ptr; -} - -void * -debug_realloc(const char *file, unsigned line, const char *function, - void *old_ptr, size_t old_size, size_t new_size ) -{ - struct debug_memory_header *old_hdr, *new_hdr; - struct debug_memory_footer *old_ftr, *new_ftr; - void *new_ptr; - - if(!old_ptr) - return debug_malloc( file, line, function, new_size ); - - if(!new_size) { - debug_free( file, line, function, old_ptr ); - return NULL; - } - - old_hdr = header_from_data(old_ptr); - if(old_hdr->magic != DEBUG_MEMORY_MAGIC) { - debug_printf("%s:%u:%s: reallocating bad or corrupted memory %p\n", - file, line, function, - old_ptr); - debug_assert(0); - return NULL; - } - - old_ftr = footer_from_header(old_hdr); - if(old_ftr->magic != DEBUG_MEMORY_MAGIC) { - debug_printf("%s:%u:%s: buffer overflow %p\n", - old_hdr->file, old_hdr->line, old_hdr->function, - old_ptr); - debug_assert(0); - } - - /* alloc new */ - new_hdr = os_malloc(sizeof(*new_hdr) + new_size + sizeof(*new_ftr)); - if(!new_hdr) { - debug_printf("%s:%u:%s: out of memory when trying to allocate %lu bytes\n", - file, line, function, - (long unsigned)new_size); - return NULL; - } - new_hdr->no = old_hdr->no; - new_hdr->file = old_hdr->file; - new_hdr->line = old_hdr->line; - new_hdr->function = old_hdr->function; - new_hdr->size = new_size; - new_hdr->magic = DEBUG_MEMORY_MAGIC; - - new_ftr = footer_from_header(new_hdr); - new_ftr->magic = DEBUG_MEMORY_MAGIC; - - pipe_mutex_lock(list_mutex); - LIST_REPLACE(&old_hdr->head, &new_hdr->head); - pipe_mutex_unlock(list_mutex); - - /* copy data */ - new_ptr = data_from_header(new_hdr); - memcpy( new_ptr, old_ptr, old_size < new_size ? old_size : new_size ); - - /* free old */ - old_hdr->magic = 0; - old_ftr->magic = 0; - os_free(old_hdr); - - return new_ptr; -} - -unsigned long -debug_memory_begin(void) -{ - return last_no; -} - -void -debug_memory_end(unsigned long start_no) -{ - size_t total_size = 0; - struct list_head *entry; - - if(start_no == last_no) - return; - - entry = list.prev; - for (; entry != &list; entry = entry->prev) { - struct debug_memory_header *hdr; - void *ptr; - struct debug_memory_footer *ftr; - - hdr = LIST_ENTRY(struct debug_memory_header, entry, head); - ptr = data_from_header(hdr); - ftr = footer_from_header(hdr); - - if(hdr->magic != DEBUG_MEMORY_MAGIC) { - debug_printf("%s:%u:%s: bad or corrupted memory %p\n", - hdr->file, hdr->line, hdr->function, - ptr); - debug_assert(0); - } - - if((start_no <= hdr->no && hdr->no < last_no) || - (last_no < start_no && (hdr->no < last_no || start_no <= hdr->no))) { - debug_printf("%s:%u:%s: %lu bytes at %p not freed\n", - hdr->file, hdr->line, hdr->function, - (unsigned long) hdr->size, ptr); -#if DEBUG_MEMORY_STACK - debug_backtrace_dump(hdr->backtrace, DEBUG_MEMORY_STACK); -#endif - total_size += hdr->size; - } - - if(ftr->magic != DEBUG_MEMORY_MAGIC) { - debug_printf("%s:%u:%s: buffer overflow %p\n", - hdr->file, hdr->line, hdr->function, - ptr); - debug_assert(0); - } - } - - if(total_size) { - debug_printf("Total of %lu KB of system memory apparently leaked\n", - (unsigned long) (total_size + 1023)/1024); - } - else { - debug_printf("No memory leaks detected.\n"); - } -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_refcnt.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_refcnt.c deleted file mode 100644 index a51b4c55f83..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_refcnt.c +++ /dev/null @@ -1,195 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Luca Barbieri - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#if defined(DEBUG) - -/* see http://www.mozilla.org/performance/refcnt-balancer.html for what do with the output - * on Linux, use tools/addr2line.sh to postprocess it before anything else - **/ - -#include - -#include "util/u_debug.h" -#include "util/u_debug_refcnt.h" -#include "util/u_debug_stack.h" -#include "util/u_debug_symbol.h" -#include "util/u_string.h" -#include "util/u_hash_table.h" -#include "os/os_thread.h" - -int debug_refcnt_state; - -FILE* stream; - -/* TODO: maybe move this serial machinery to a stand-alone module and expose it? */ -pipe_static_mutex(serials_mutex); - -static struct util_hash_table* serials_hash; -static unsigned serials_last; - -static unsigned hash_ptr(void* p) -{ - return (unsigned)(uintptr_t)p; -} - -static int compare_ptr(void* a, void* b) -{ - if(a == b) - return 0; - else if(a < b) - return -1; - else - return 1; -} - -static boolean debug_serial(void* p, unsigned* pserial) -{ - unsigned serial; - boolean found = TRUE; -#ifdef PIPE_SUBSYSTEM_WINDOWS_USER - static boolean first = TRUE; - - if (first) { - pipe_mutex_init(serials_mutex); - first = FALSE; - } -#endif - - pipe_mutex_lock(serials_mutex); - if(!serials_hash) - serials_hash = util_hash_table_create(hash_ptr, compare_ptr); - serial = (unsigned)(uintptr_t)util_hash_table_get(serials_hash, p); - if(!serial) - { - /* time to stop logging... (you'll have a 100 GB logfile at least at this point) - * TODO: avoid this - */ - serial = ++serials_last; - if(!serial) - { - debug_error("More than 2^32 objects detected, aborting.\n"); - os_abort(); - } - - util_hash_table_set(serials_hash, p, (void*)(uintptr_t)serial); - found = FALSE; - } - pipe_mutex_unlock(serials_mutex); - *pserial = serial; - return found; -} - -static void debug_serial_delete(void* p) -{ - pipe_mutex_lock(serials_mutex); - util_hash_table_remove(serials_hash, p); - pipe_mutex_unlock(serials_mutex); -} - -#define STACK_LEN 64 - -static void dump_stack(const char* symbols[STACK_LEN]) -{ - unsigned i; - for(i = 0; i < STACK_LEN; ++i) - { - if(symbols[i]) - fprintf(stream, "%s\n", symbols[i]); - } - fprintf(stream, "\n"); -} - -void debug_reference_slowpath(const struct pipe_reference* p, debug_reference_descriptor get_desc, int change) -{ - if(debug_refcnt_state < 0) - return; - - if(!debug_refcnt_state) - { - const char* filename = debug_get_option("GALLIUM_REFCNT_LOG", NULL); - if(filename && filename[0]) - stream = fopen(filename, "wt"); - - if(stream) - debug_refcnt_state = 1; - else - debug_refcnt_state = -1; - } - - if(debug_refcnt_state > 0) - { - struct debug_stack_frame frames[STACK_LEN]; - const char* symbols[STACK_LEN]; - char buf[1024]; - - unsigned i; - unsigned refcnt = p->count; - unsigned serial; - boolean existing = debug_serial((void*)p, &serial); - - debug_backtrace_capture(frames, 1, STACK_LEN); - for(i = 0; i < STACK_LEN; ++i) - { - if(frames[i].function) - symbols[i] = debug_symbol_name_cached(frames[i].function); - else - symbols[i] = 0; - } - - get_desc(buf, p); - - if(!existing) - { - fprintf(stream, "<%s> %p %u Create\n", buf, (void *) p, serial); - dump_stack(symbols); - - /* this is there to provide a gradual change even if we don't see the initialization */ - for(i = 1; i <= refcnt - change; ++i) - { - fprintf(stream, "<%s> %p %u AddRef %u\n", buf, (void *) p, - serial, i); - dump_stack(symbols); - } - } - - if(change) - { - fprintf(stream, "<%s> %p %u %s %u\n", buf, (void *) p, serial, - change > 0 ? "AddRef" : "Release", refcnt); - dump_stack(symbols); - } - - if(!refcnt) - { - debug_serial_delete((void*)p); - fprintf(stream, "<%s> %p %u Destroy\n", buf, (void *) p, serial); - dump_stack(symbols); - } - - fflush(stream); - } -} -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_refcnt.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_refcnt.h deleted file mode 100644 index c02fba27ddf..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_refcnt.h +++ /dev/null @@ -1,63 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Luca Barbieri - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_DEBUG_REFCNT_H_ -#define U_DEBUG_REFCNT_H_ - -#include "pipe/p_config.h" -#include "pipe/p_state.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void (*debug_reference_descriptor)(char*, const struct pipe_reference*); - -#if defined(DEBUG) && (!defined(PIPE_OS_WINDOWS) || defined(PIPE_SUBSYSTEM_WINDOWS_USER)) - -extern int debug_refcnt_state; - -void debug_reference_slowpath(const struct pipe_reference* p, debug_reference_descriptor get_desc, int change); - -static INLINE void debug_reference(const struct pipe_reference* p, debug_reference_descriptor get_desc, int change) -{ - if (debug_refcnt_state >= 0) - debug_reference_slowpath(p, get_desc, change); -} - -#else - -static INLINE void debug_reference(const struct pipe_reference* p, debug_reference_descriptor get_desc, int change) -{ -} - -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* U_DEBUG_REFCNT_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_stack.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_stack.c deleted file mode 100644 index 24e039fd226..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_stack.c +++ /dev/null @@ -1,110 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Stack backtracing. - * - * @author Jose Fonseca - */ - -#include "u_debug.h" -#include "u_debug_symbol.h" -#include "u_debug_stack.h" - - -void -debug_backtrace_capture(struct debug_stack_frame *backtrace, - unsigned start_frame, - unsigned nr_frames) -{ - const void **frame_pointer = NULL; - unsigned i = 0; - - if(!nr_frames) - return; - -#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86) - __asm__ __volatile__("mov (%%ebp),%0": "=r" (frame_pointer)); - frame_pointer = (const void **)frame_pointer[0]; -#elif defined(PIPE_CC_GCC) - frame_pointer = ((const void **)__builtin_frame_address(1)); -#elif defined(PIPE_CC_MSVC) && defined(PIPE_ARCH_X86) - __asm { - mov frame_pointer, ebp - } - frame_pointer = (const void **)frame_pointer[0]; -#else - frame_pointer = NULL; -#endif - - -#ifdef PIPE_ARCH_X86 - while(nr_frames) { - const void **next_frame_pointer; - - if(!frame_pointer) - break; - - if(start_frame) - --start_frame; - else { - backtrace[i++].function = frame_pointer[1]; - --nr_frames; - } - - next_frame_pointer = (const void **)frame_pointer[0]; - - /* Limit the stack walk to avoid referencing undefined memory */ - if((uintptr_t)next_frame_pointer <= (uintptr_t)frame_pointer || - (uintptr_t)next_frame_pointer > (uintptr_t)frame_pointer + 64*1024) - break; - - frame_pointer = next_frame_pointer; - } -#endif - - while(nr_frames) { - backtrace[i++].function = NULL; - --nr_frames; - } -} - - -void -debug_backtrace_dump(const struct debug_stack_frame *backtrace, - unsigned nr_frames) -{ - unsigned i; - - for(i = 0; i < nr_frames; ++i) { - if(!backtrace[i].function) - break; - debug_symbol_print(backtrace[i].function); - } -} - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_stack.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_stack.h deleted file mode 100644 index f50f04e0f7b..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_stack.h +++ /dev/null @@ -1,65 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_DEBUG_STACK_H_ -#define U_DEBUG_STACK_H_ - - -/** - * @file - * Stack backtracing. - * - * @author Jose Fonseca - */ - - -#ifdef __cplusplus -extern "C" { -#endif - - -struct debug_stack_frame -{ - const void *function; -}; - - -void -debug_backtrace_capture(struct debug_stack_frame *backtrace, - unsigned start_frame, - unsigned nr_frames); - -void -debug_backtrace_dump(const struct debug_stack_frame *backtrace, - unsigned nr_frames); - - -#ifdef __cplusplus -} -#endif - -#endif /* U_DEBUG_STACK_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_symbol.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_symbol.c deleted file mode 100644 index ab300114dfe..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_symbol.c +++ /dev/null @@ -1,243 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Symbol lookup. - * - * @author Jose Fonseca - */ - -#include "pipe/p_compiler.h" -#include "os/os_thread.h" -#include "u_string.h" - -#include "u_debug.h" -#include "u_debug_symbol.h" -#include "u_hash_table.h" - -#if defined(PIPE_OS_WINDOWS) && defined(PIPE_ARCH_X86) - -//#include -#include - -#include "dbghelp.h" - - -static BOOL bSymInitialized = FALSE; - -static HMODULE hModule_Dbghelp = NULL; - - -static -FARPROC WINAPI __GetProcAddress(LPCSTR lpProcName) -{ -#ifdef PIPE_CC_GCC - if (!hModule_Dbghelp) { - /* - * bfdhelp.dll is a dbghelp.dll look-alike replacement, which is able to - * understand MinGW symbols using BFD library. It is available from - * http://people.freedesktop.org/~jrfonseca/bfdhelp/ for now. - */ - hModule_Dbghelp = LoadLibraryA("bfdhelp.dll"); - } -#endif - - if (!hModule_Dbghelp) { - hModule_Dbghelp = LoadLibraryA("dbghelp.dll"); - if (!hModule_Dbghelp) { - return NULL; - } - } - - return GetProcAddress(hModule_Dbghelp, lpProcName); -} - - -typedef BOOL (WINAPI *PFNSYMINITIALIZE)(HANDLE, LPSTR, BOOL); -static PFNSYMINITIALIZE pfnSymInitialize = NULL; - -static -BOOL WINAPI j_SymInitialize(HANDLE hProcess, PSTR UserSearchPath, BOOL fInvadeProcess) -{ - if( - (pfnSymInitialize || (pfnSymInitialize = (PFNSYMINITIALIZE) __GetProcAddress("SymInitialize"))) - ) - return pfnSymInitialize(hProcess, UserSearchPath, fInvadeProcess); - else - return FALSE; -} - -typedef DWORD (WINAPI *PFNSYMSETOPTIONS)(DWORD); -static PFNSYMSETOPTIONS pfnSymSetOptions = NULL; - -static -DWORD WINAPI j_SymSetOptions(DWORD SymOptions) -{ - if( - (pfnSymSetOptions || (pfnSymSetOptions = (PFNSYMSETOPTIONS) __GetProcAddress("SymSetOptions"))) - ) - return pfnSymSetOptions(SymOptions); - else - return FALSE; -} - -typedef BOOL (WINAPI *PFNSYMGETSYMFROMADDR)(HANDLE, DWORD64, PDWORD64, PSYMBOL_INFO); -static PFNSYMGETSYMFROMADDR pfnSymFromAddr = NULL; - -static -BOOL WINAPI j_SymFromAddr(HANDLE hProcess, DWORD64 Address, PDWORD64 Displacement, PSYMBOL_INFO Symbol) -{ - if( - (pfnSymFromAddr || (pfnSymFromAddr = (PFNSYMGETSYMFROMADDR) __GetProcAddress("SymFromAddr"))) - ) - return pfnSymFromAddr(hProcess, Address, Displacement, Symbol); - else - return FALSE; -} - - -static INLINE void -debug_symbol_name_dbghelp(const void *addr, char* buf, unsigned size) -{ - HANDLE hProcess; - BYTE symbolBuffer[1024]; - PSYMBOL_INFO pSymbol = (PSYMBOL_INFO) symbolBuffer; - DWORD64 dwDisplacement = 0; /* Displacement of the input address, relative to the start of the symbol */ - - hProcess = GetCurrentProcess(); - - memset(pSymbol, 0, sizeof *pSymbol); - pSymbol->SizeOfStruct = sizeof(symbolBuffer); - pSymbol->MaxNameLen = sizeof(symbolBuffer) - offsetof(SYMBOL_INFO, Name); - - if(!bSymInitialized) { - j_SymSetOptions(/* SYMOPT_UNDNAME | */ SYMOPT_LOAD_LINES); - if(j_SymInitialize(hProcess, NULL, TRUE)) - bSymInitialized = TRUE; - } - - if(!j_SymFromAddr(hProcess, (DWORD64)(uintptr_t)addr, &dwDisplacement, pSymbol)) - buf[0] = 0; - else - { - strncpy(buf, pSymbol->Name, size); - buf[size - 1] = 0; - } -} -#endif - -#ifdef __GLIBC__ -#include - -/* This can only provide dynamic symbols, or binary offsets into a file. - * - * To fix this, post-process the output with tools/addr2line.sh - */ -static INLINE void -debug_symbol_name_glibc(const void *addr, char* buf, unsigned size) -{ - char** syms = backtrace_symbols((void**)&addr, 1); - strncpy(buf, syms[0], size); - buf[size - 1] = 0; - free(syms); -} -#endif - -void -debug_symbol_name(const void *addr, char* buf, unsigned size) -{ -#if defined(PIPE_OS_WINDOWS) && defined(PIPE_ARCH_X86) - debug_symbol_name_dbghelp(addr, buf, size); - if(buf[0]) - return; -#endif - -#ifdef __GLIBC__ - debug_symbol_name_glibc(addr, buf, size); - if(buf[0]) - return; -#endif - - util_snprintf(buf, size, "%p", addr); - buf[size - 1] = 0; -} - -void -debug_symbol_print(const void *addr) -{ - char buf[1024]; - debug_symbol_name(addr, buf, sizeof(buf)); - debug_printf("\t%s\n", buf); -} - -struct util_hash_table* symbols_hash; -pipe_static_mutex(symbols_mutex); - -static unsigned hash_ptr(void* p) -{ - return (unsigned)(uintptr_t)p; -} - -static int compare_ptr(void* a, void* b) -{ - if(a == b) - return 0; - else if(a < b) - return -1; - else - return 1; -} - -const char* -debug_symbol_name_cached(const void *addr) -{ - const char* name; -#ifdef PIPE_SUBSYSTEM_WINDOWS_USER - static boolean first = TRUE; - - if (first) { - pipe_mutex_init(symbols_mutex); - first = FALSE; - } -#endif - - pipe_mutex_lock(symbols_mutex); - if(!symbols_hash) - symbols_hash = util_hash_table_create(hash_ptr, compare_ptr); - name = util_hash_table_get(symbols_hash, (void*)addr); - if(!name) - { - char buf[1024]; - debug_symbol_name(addr, buf, sizeof(buf)); - name = strdup(buf); - - util_hash_table_set(symbols_hash, (void*)addr, (void*)name); - } - pipe_mutex_unlock(symbols_mutex); - return name; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_symbol.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_symbol.h deleted file mode 100644 index b247706c2a0..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_debug_symbol.h +++ /dev/null @@ -1,58 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_DEBUG_SYMBOL_H_ -#define U_DEBUG_SYMBOL_H_ - - -/** - * @file - * Symbol lookup. - * - * @author Jose Fonseca - */ - - -#ifdef __cplusplus -extern "C" { -#endif - - -void -debug_symbol_name(const void *addr, char* buf, unsigned size); - -const char* -debug_symbol_name_cached(const void *addr); - -void -debug_symbol_print(const void *addr); - -#ifdef __cplusplus -} -#endif - -#endif /* U_DEBUG_SYMBOL_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_dirty_flags.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_dirty_flags.h deleted file mode 100644 index 40539f0b0ea..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_dirty_flags.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef U_DIRTY_FLAGS_H -#define U_DIRTY_FLAGS_H - -/* Here's a convenient list of dirty flags to use in a driver. Either - * include it directly or use it as a starting point for your own - * list. - */ -#define U_NEW_VIEWPORT 0x1 -#define U_NEW_RASTERIZER 0x2 -#define U_NEW_FS 0x4 -#define U_NEW_FS_CONSTANTS 0x8 -#define U_NEW_FS_SAMPLER_VIEW 0x10 -#define U_NEW_FS_SAMPLER_STATES 0x20 -#define U_NEW_VS 0x40 -#define U_NEW_VS_CONSTANTS 0x80 -#define U_NEW_VS_SAMPLER_VIEW 0x100 -#define U_NEW_VS_SAMPLER_STATES 0x200 -#define U_NEW_BLEND 0x400 -#define U_NEW_CLIP 0x800 -#define U_NEW_SCISSOR 0x1000 -#define U_NEW_POLYGON_STIPPLE 0x2000 -#define U_NEW_FRAMEBUFFER 0x4000 -#define U_NEW_VERTEX_ELEMENTS 0x8000 -#define U_NEW_VERTEX_BUFFER 0x10000 -#define U_NEW_QUERY 0x20000 -#define U_NEW_DEPTH_STENCIL 0x40000 -#define U_NEW_GS 0x80000 -#define U_NEW_GS_CONSTANTS 0x100000 -#define U_NEW_GS_SAMPLER_VIEW 0x200000 -#define U_NEW_GS_SAMPLER_STATES 0x400000 - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_dirty_surfaces.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_dirty_surfaces.h deleted file mode 100644 index f3618d9be74..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_dirty_surfaces.h +++ /dev/null @@ -1,119 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Luca Barbieri - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_DIRTY_SURFACES_H_ -#define U_DIRTY_SURFACES_H_ - -#include "pipe/p_state.h" - -#include "util/u_double_list.h" -#include "util/u_math.h" - -struct pipe_context; - -typedef void (*util_dirty_surface_flush_t) (struct pipe_context *, struct pipe_surface *); - -struct util_dirty_surfaces -{ - struct list_head dirty_list; -}; - -struct util_dirty_surface -{ - struct pipe_surface base; - struct list_head dirty_list; -}; - -static INLINE void -util_dirty_surfaces_init(struct util_dirty_surfaces *ds) -{ - LIST_INITHEAD(&ds->dirty_list); -} - -static INLINE void -util_dirty_surfaces_use_for_sampling(struct pipe_context *pipe, struct util_dirty_surfaces *dss, util_dirty_surface_flush_t flush) -{ - struct list_head *p, *next; - for(p = dss->dirty_list.next; p != &dss->dirty_list; p = next) - { - struct util_dirty_surface *ds = LIST_ENTRY(struct util_dirty_surface, p, dirty_list); - next = p->next; - - flush(pipe, &ds->base); - } -} - -static INLINE void -util_dirty_surfaces_use_levels_for_sampling(struct pipe_context *pipe, struct util_dirty_surfaces *dss, unsigned first, unsigned last, util_dirty_surface_flush_t flush) -{ - struct list_head *p, *next; - if(first > last) - return; - for(p = dss->dirty_list.next; p != &dss->dirty_list; p = next) - { - struct util_dirty_surface *ds = LIST_ENTRY(struct util_dirty_surface, p, dirty_list); - next = p->next; - - if(ds->base.u.tex.level >= first && ds->base.u.tex.level <= last) - flush(pipe, &ds->base); - } -} - -static INLINE void -util_dirty_surfaces_use_for_sampling_with(struct pipe_context *pipe, struct util_dirty_surfaces *dss, struct pipe_sampler_view *psv, struct pipe_sampler_state *pss, util_dirty_surface_flush_t flush) -{ - if(!LIST_IS_EMPTY(&dss->dirty_list)) - util_dirty_surfaces_use_levels_for_sampling(pipe, dss, (unsigned)pss->min_lod + psv->u.tex.first_level, - MIN2((unsigned)ceilf(pss->max_lod) + psv->u.tex.first_level, psv->u.tex.last_level), flush); -} - -static INLINE void -util_dirty_surface_init(struct util_dirty_surface *ds) -{ - LIST_INITHEAD(&ds->dirty_list); -} - -static INLINE boolean -util_dirty_surface_is_dirty(struct util_dirty_surface *ds) -{ - return !LIST_IS_EMPTY(&ds->dirty_list); -} - -static INLINE void -util_dirty_surface_set_dirty(struct util_dirty_surfaces *dss, struct util_dirty_surface *ds) -{ - if(LIST_IS_EMPTY(&ds->dirty_list)) - LIST_ADDTAIL(&ds->dirty_list, &dss->dirty_list); -} - -static INLINE void -util_dirty_surface_set_clean(struct util_dirty_surfaces *dss, struct util_dirty_surface *ds) -{ - if(!LIST_IS_EMPTY(&ds->dirty_list)) - LIST_DELINIT(&ds->dirty_list); -} - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_dl.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_dl.c deleted file mode 100644 index 51b2600c05c..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_dl.c +++ /dev/null @@ -1,96 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * Copyright 1999-2008 Brian Paul - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - **************************************************************************/ - - -#include "pipe/p_config.h" -#include "pipe/p_compiler.h" - -#if defined(PIPE_OS_UNIX) -#include -#endif -#if defined(PIPE_OS_WINDOWS) -//#include -#include -#include -#endif - -#include "u_dl.h" -#include "u_pointer.h" - - -struct util_dl_library * -util_dl_open(const char *filename) -{ -#if defined(PIPE_OS_UNIX) - return (struct util_dl_library *)dlopen(filename, RTLD_LAZY | RTLD_GLOBAL); -#elif defined(PIPE_OS_WINDOWS) - return (struct util_dl_library *)LoadLibraryA(filename); -#else - return NULL; -#endif -} - - -util_dl_proc -util_dl_get_proc_address(struct util_dl_library *library, - const char *procname) -{ -#if defined(PIPE_OS_UNIX) - return (util_dl_proc) pointer_to_func(dlsym((void *)library, procname)); -#elif defined(PIPE_OS_WINDOWS) - return (util_dl_proc)GetProcAddress((HMODULE)library, procname); -#else - return (util_dl_proc)NULL; -#endif -} - - -void -util_dl_close(struct util_dl_library *library) -{ -#if defined(PIPE_OS_UNIX) - dlclose((void *)library); -#elif defined(PIPE_OS_WINDOWS) - FreeLibrary((HMODULE)library); -#else - (void)library; -#endif -} - - -const char * -util_dl_error(void) -{ -#if defined(PIPE_OS_UNIX) - return dlerror(); -#elif defined(PIPE_OS_WINDOWS) - return "unknown error"; -#else - return "unknown error"; -#endif -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_dl.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_dl.h deleted file mode 100644 index 80a00ed6796..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_dl.h +++ /dev/null @@ -1,83 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - **************************************************************************/ - - -#ifndef U_DL_H_ -#define U_DL_H_ - - -#include "pipe/p_config.h" - - -#if defined(PIPE_OS_WINDOWS) -# define UTIL_DL_EXT ".dll" -# define UTIL_DL_PREFIX "" -#elif defined(PIPE_OS_APPLE) -# define UTIL_DL_EXT ".dylib" -# define UTIL_DL_PREFIX "lib" -#else -# define UTIL_DL_EXT ".so" -# define UTIL_DL_PREFIX "lib" -#endif - - -struct util_dl_library; - - -typedef void (*util_dl_proc)(void); - - -/** - * Open a library dynamically. - */ -struct util_dl_library * -util_dl_open(const char *filename); - - -/** - * Lookup a function in a library. - */ -util_dl_proc -util_dl_get_proc_address(struct util_dl_library *library, - const char *procname); - - -/** - * Close a library. - */ -void -util_dl_close(struct util_dl_library *library); - - -/** - * Return most recent error message. - */ -const char * -util_dl_error(void); - - -#endif /* U_DL_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_double_list.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_double_list.h deleted file mode 100644 index 9d1129b185d..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_double_list.h +++ /dev/null @@ -1,146 +0,0 @@ -/************************************************************************** - * - * Copyright 2006 Tungsten Graphics, Inc., Bismarck, ND. USA. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - **************************************************************************/ - -/** - * \file - * List macros heavily inspired by the Linux kernel - * list handling. No list looping yet. - * - * Is not threadsafe, so common operations need to - * be protected using an external mutex. - */ - -#ifndef _U_DOUBLE_LIST_H_ -#define _U_DOUBLE_LIST_H_ - - -#include -#include "pipe/p_compiler.h" - - -struct list_head -{ - struct list_head *prev; - struct list_head *next; -}; - -static INLINE void list_inithead(struct list_head *item) -{ - item->prev = item; - item->next = item; -} - -static INLINE void list_add(struct list_head *item, struct list_head *list) -{ - item->prev = list; - item->next = list->next; - list->next->prev = item; - list->next = item; -} - -static INLINE void list_addtail(struct list_head *item, struct list_head *list) -{ - item->next = list; - item->prev = list->prev; - list->prev->next = item; - list->prev = item; -} - -static INLINE void list_replace(struct list_head *from, struct list_head *to) -{ - to->prev = from->prev; - to->next = from->next; - from->next->prev = to; - from->prev->next = to; -} - -static INLINE void list_del(struct list_head *item) -{ - item->prev->next = item->next; - item->next->prev = item->prev; -} - -static INLINE void list_delinit(struct list_head *item) -{ - item->prev->next = item->next; - item->next->prev = item->prev; - item->next = item; - item->prev = item; -} - -#define LIST_INITHEAD(__item) list_inithead(__item) -#define LIST_ADD(__item, __list) list_add(__item, __list) -#define LIST_ADDTAIL(__item, __list) list_addtail(__item, __list) -#define LIST_REPLACE(__from, __to) list_replace(__from, __to) -#define LIST_DEL(__item) list_del(__item) -#define LIST_DELINIT(__item) list_delinit(__item) - -#define LIST_ENTRY(__type, __item, __field) \ - ((__type *)(((char *)(__item)) - offsetof(__type, __field))) - -#define LIST_IS_EMPTY(__list) \ - ((__list)->next == (__list)) - -/** - * Cast from a pointer to a member of a struct back to the containing struct. - * - * 'sample' MUST be initialized, or else the result is undefined! - */ -#ifndef container_of -#define container_of(ptr, sample, member) \ - (void *)((char *)(ptr) \ - - ((char *)&(sample)->member - (char *)(sample))) -#endif - -#define LIST_FOR_EACH_ENTRY(pos, head, member) \ - for (pos = NULL, pos = container_of((head)->next, pos, member); \ - &pos->member != (head); \ - pos = container_of(pos->member.next, pos, member)) - -#define LIST_FOR_EACH_ENTRY_SAFE(pos, storage, head, member) \ - for (pos = NULL, pos = container_of((head)->next, pos, member), \ - storage = container_of(pos->member.next, pos, member); \ - &pos->member != (head); \ - pos = storage, storage = container_of(storage->member.next, storage, member)) - -#define LIST_FOR_EACH_ENTRY_SAFE_REV(pos, storage, head, member) \ - for (pos = NULL, pos = container_of((head)->prev, pos, member), \ - storage = container_of(pos->member.prev, pos, member); \ - &pos->member != (head); \ - pos = storage, storage = container_of(storage->member.prev, storage, member)) - -#define LIST_FOR_EACH_ENTRY_FROM(pos, start, head, member) \ - for (pos = NULL, pos = container_of((start), pos, member); \ - &pos->member != (head); \ - pos = container_of(pos->member.next, pos, member)) - -#define LIST_FOR_EACH_ENTRY_FROM_REV(pos, start, head, member) \ - for (pos = NULL, pos = container_of((start), pos, member); \ - &pos->member != (head); \ - pos = container_of(pos->member.prev, pos, member)) - -#endif /*_U_DOUBLE_LIST_H_*/ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_draw.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_draw.c deleted file mode 100644 index d16575b7340..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_draw.c +++ /dev/null @@ -1,115 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#include "util/u_debug.h" -#include "util/u_math.h" -#include "util/u_format.h" -#include "util/u_draw.h" - - -/** - * Returns the largest legal index value plus one for the current set - * of bound vertex buffers. Regardless of any other consideration, - * all vertex lookups need to be clamped to 0..max_index-1 to prevent - * an out-of-bound access. - * - * Note that if zero is returned it means that one or more buffers is - * too small to contain any valid vertex data. - */ -unsigned -util_draw_max_index( - const struct pipe_vertex_buffer *vertex_buffers, - unsigned nr_vertex_buffers, - const struct pipe_vertex_element *vertex_elements, - unsigned nr_vertex_elements, - const struct pipe_draw_info *info) -{ - unsigned max_index; - unsigned i; - - max_index = ~0U - 1; - for (i = 0; i < nr_vertex_elements; i++) { - const struct pipe_vertex_element *element = - &vertex_elements[i]; - const struct pipe_vertex_buffer *buffer = - &vertex_buffers[element->vertex_buffer_index]; - unsigned buffer_size; - const struct util_format_description *format_desc; - unsigned format_size; - - assert(buffer->buffer->height0 == 1); - assert(buffer->buffer->depth0 == 1); - buffer_size = buffer->buffer->width0; - - format_desc = util_format_description(element->src_format); - assert(format_desc->block.width == 1); - assert(format_desc->block.height == 1); - assert(format_desc->block.bits % 8 == 0); - format_size = format_desc->block.bits/8; - - if (buffer->buffer_offset >= buffer_size) { - /* buffer is too small */ - return 0; - } - - buffer_size -= buffer->buffer_offset; - - if (element->src_offset >= buffer_size) { - /* buffer is too small */ - return 0; - } - - buffer_size -= element->src_offset; - - if (format_size > buffer_size) { - /* buffer is too small */ - return 0; - } - - buffer_size -= format_size; - - if (buffer->stride != 0) { - unsigned buffer_max_index; - - buffer_max_index = buffer_size / buffer->stride; - - if (element->instance_divisor == 0) { - /* Per-vertex data */ - max_index = MIN2(max_index, buffer_max_index); - } - else { - /* Per-instance data. Simply make sure the state tracker didn't - * request more instances than those that fit in the buffer */ - assert((info->start_instance + info->instance_count)/element->instance_divisor - <= (buffer_max_index + 1)); - } - } - } - - return max_index + 1; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_draw.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_draw.h deleted file mode 100644 index fdb683ca8a2..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_draw.h +++ /dev/null @@ -1,158 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_DRAW_H -#define U_DRAW_H - - -#include "pipe/p_compiler.h" -#include "pipe/p_context.h" -#include "pipe/p_state.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -static INLINE void -util_draw_init_info(struct pipe_draw_info *info) -{ - memset(info, 0, sizeof(*info)); - info->instance_count = 1; - info->max_index = 0xffffffff; -} - - -static INLINE void -util_draw_arrays(struct pipe_context *pipe, uint mode, uint start, uint count) -{ - struct pipe_draw_info info; - - util_draw_init_info(&info); - info.mode = mode; - info.start = start; - info.count = count; - info.min_index = start; - info.max_index = start + count - 1; - - pipe->draw_vbo(pipe, &info); -} - -static INLINE void -util_draw_elements(struct pipe_context *pipe, int index_bias, - uint mode, uint start, uint count) -{ - struct pipe_draw_info info; - - util_draw_init_info(&info); - info.indexed = TRUE; - info.mode = mode; - info.start = start; - info.count = count; - info.index_bias = index_bias; - - pipe->draw_vbo(pipe, &info); -} - -static INLINE void -util_draw_arrays_instanced(struct pipe_context *pipe, - uint mode, uint start, uint count, - uint start_instance, - uint instance_count) -{ - struct pipe_draw_info info; - - util_draw_init_info(&info); - info.mode = mode; - info.start = start; - info.count = count; - info.start_instance = start_instance; - info.instance_count = instance_count; - info.min_index = start; - info.max_index = start + count - 1; - - pipe->draw_vbo(pipe, &info); -} - -static INLINE void -util_draw_elements_instanced(struct pipe_context *pipe, - int index_bias, - uint mode, uint start, uint count, - uint start_instance, - uint instance_count) -{ - struct pipe_draw_info info; - - util_draw_init_info(&info); - info.indexed = TRUE; - info.mode = mode; - info.start = start; - info.count = count; - info.index_bias = index_bias; - info.start_instance = start_instance; - info.instance_count = instance_count; - - pipe->draw_vbo(pipe, &info); -} - -static INLINE void -util_draw_range_elements(struct pipe_context *pipe, - int index_bias, - uint min_index, - uint max_index, - uint mode, uint start, uint count) -{ - struct pipe_draw_info info; - - util_draw_init_info(&info); - info.indexed = TRUE; - info.mode = mode; - info.start = start; - info.count = count; - info.index_bias = index_bias; - info.min_index = min_index; - info.max_index = max_index; - - pipe->draw_vbo(pipe, &info); -} - - -unsigned -util_draw_max_index( - const struct pipe_vertex_buffer *vertex_buffers, - unsigned nr_vertex_buffers, - const struct pipe_vertex_element *vertex_elements, - unsigned nr_vertex_elements, - const struct pipe_draw_info *info); - - -#ifdef __cplusplus -} -#endif - -#endif /* !U_DRAW_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_draw_quad.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_draw_quad.c deleted file mode 100644 index 8ed3b3c0959..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_draw_quad.c +++ /dev/null @@ -1,135 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#include "pipe/p_context.h" -#include "pipe/p_defines.h" -#include "util/u_inlines.h" -#include "util/u_draw_quad.h" -#include "util/u_memory.h" -#include "cso_cache/cso_context.h" - - -/** - * Draw a simple vertex buffer / primitive. - * Limited to float[4] vertex attribs, tightly packed. - */ -void -util_draw_vertex_buffer(struct pipe_context *pipe, - struct cso_context *cso, - struct pipe_resource *vbuf, - uint offset, - uint prim_type, - uint num_verts, - uint num_attribs) -{ - struct pipe_vertex_buffer vbuffer; - - assert(num_attribs <= PIPE_MAX_ATTRIBS); - - /* tell pipe about the vertex buffer */ - memset(&vbuffer, 0, sizeof(vbuffer)); - vbuffer.buffer = vbuf; - vbuffer.stride = num_attribs * 4 * sizeof(float); /* vertex size */ - vbuffer.buffer_offset = offset; - - if (cso) { - cso_set_vertex_buffers(cso, 1, &vbuffer); - } else { - pipe->set_vertex_buffers(pipe, 1, &vbuffer); - } - - /* note: vertex elements already set by caller */ - - /* draw */ - util_draw_arrays(pipe, prim_type, 0, num_verts); -} - - - -/** - * Draw screen-aligned textured quad. - * Note: this isn't especially efficient. - */ -void -util_draw_texquad(struct pipe_context *pipe, struct cso_context *cso, - float x0, float y0, float x1, float y1, float z) -{ - uint numAttribs = 2, i, j; - uint vertexBytes = 4 * (4 * numAttribs * sizeof(float)); - struct pipe_resource *vbuf = NULL; - float *v = NULL; - - v = MALLOC(vertexBytes); - if (v == NULL) - goto out; - - /* - * Load vertex buffer - */ - for (i = j = 0; i < 4; i++) { - v[j + 2] = z; /* z */ - v[j + 3] = 1.0; /* w */ - v[j + 6] = 0.0; /* r */ - v[j + 7] = 1.0; /* q */ - j += 8; - } - - v[0] = x0; - v[1] = y0; - v[4] = 0.0; /*s*/ - v[5] = 0.0; /*t*/ - - v[8] = x1; - v[9] = y0; - v[12] = 1.0; - v[13] = 0.0; - - v[16] = x1; - v[17] = y1; - v[20] = 1.0; - v[21] = 1.0; - - v[24] = x0; - v[25] = y1; - v[28] = 0.0; - v[29] = 1.0; - - vbuf = pipe_user_buffer_create(pipe->screen, v, vertexBytes, - PIPE_BIND_VERTEX_BUFFER); - if (!vbuf) - goto out; - - util_draw_vertex_buffer(pipe, cso, vbuf, 0, PIPE_PRIM_TRIANGLE_FAN, 4, 2); - -out: - if (vbuf) - pipe_resource_reference(&vbuf, NULL); - - if (v) - FREE(v); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_draw_quad.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_draw_quad.h deleted file mode 100644 index f1167786f0e..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_draw_quad.h +++ /dev/null @@ -1,61 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_DRAWQUAD_H -#define U_DRAWQUAD_H - - -#include "pipe/p_compiler.h" -#include "pipe/p_context.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -struct pipe_resource; -struct cso_context; - -#include "util/u_draw.h" - -extern void -util_draw_vertex_buffer(struct pipe_context *pipe, struct cso_context *cso, - struct pipe_resource *vbuf, uint offset, - uint num_attribs, uint num_verts, uint prim_type); - - -extern void -util_draw_texquad(struct pipe_context *pipe, struct cso_context *cso, - float x0, float y0, float x1, float y1, float z); - - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_dump.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_dump.h deleted file mode 100644 index 87d84bead97..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_dump.h +++ /dev/null @@ -1,175 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Dump data in human/machine readable format. - * - * @author Jose Fonseca - */ - -#ifndef U_DEBUG_DUMP_H_ -#define U_DEBUG_DUMP_H_ - - -#include "pipe/p_compiler.h" -#include "pipe/p_state.h" - -#include - - -#ifdef __cplusplus -extern "C" { -#endif - - -#define UTIL_DUMP_INVALID_NAME "" - - -/* - * p_defines.h - * - * XXX: These functions don't really dump anything -- just translate into - * strings so a verb better than "dump" should be used instead, in order to - * free up the namespace to the true dumper functions. - */ - -const char * -util_dump_blend_factor(unsigned value, boolean shortened); - -const char * -util_dump_blend_func(unsigned value, boolean shortened); - -const char * -util_dump_logicop(unsigned value, boolean shortened); - -const char * -util_dump_func(unsigned value, boolean shortened); - -const char * -util_dump_stencil_op(unsigned value, boolean shortened); - -const char * -util_dump_tex_target(unsigned value, boolean shortened); - -const char * -util_dump_tex_wrap(unsigned value, boolean shortened); - -const char * -util_dump_tex_mipfilter(unsigned value, boolean shortened); - -const char * -util_dump_tex_filter(unsigned value, boolean shortened); - - -/* - * p_state.h, through a FILE - */ - -void -util_dump_template(FILE *stream, - const struct pipe_resource *templat); - -void -util_dump_rasterizer_state(FILE *stream, - const struct pipe_rasterizer_state *state); - -void -util_dump_poly_stipple(FILE *stream, - const struct pipe_poly_stipple *state); - -void -util_dump_viewport_state(FILE *stream, - const struct pipe_viewport_state *state); - -void -util_dump_scissor_state(FILE *stream, - const struct pipe_scissor_state *state); - -void -util_dump_clip_state(FILE *stream, - const struct pipe_clip_state *state); - -void -util_dump_shader_state(FILE *stream, - const struct pipe_shader_state *state); - -void -util_dump_depth_stencil_alpha_state(FILE *stream, - const struct pipe_depth_stencil_alpha_state *state); - -void -util_dump_rt_blend_state(FILE *stream, - const struct pipe_rt_blend_state *state); - -void -util_dump_blend_state(FILE *stream, - const struct pipe_blend_state *state); - -void -util_dump_blend_color(FILE *stream, - const struct pipe_blend_color *state); - -void -util_dump_stencil_ref(FILE *stream, - const struct pipe_stencil_ref *state); - -void -util_dump_framebuffer_state(FILE *stream, - const struct pipe_framebuffer_state *state); - -void -util_dump_sampler_state(FILE *stream, - const struct pipe_sampler_state *state); - -void -util_dump_surface(FILE *stream, - const struct pipe_surface *state); - -void -util_dump_transfer(FILE *stream, - const struct pipe_transfer *state); - -void -util_dump_vertex_buffer(FILE *stream, - const struct pipe_vertex_buffer *state); - -void -util_dump_vertex_element(FILE *stream, - const struct pipe_vertex_element *state); - -void -util_dump_draw_info(FILE *stream, const struct pipe_draw_info *state); - -/* FIXME: Move the other debug_dump_xxx functions out of u_debug.h into here. */ - - -#ifdef __cplusplus -} -#endif - -#endif /* U_DEBUG_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_dump_defines.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_dump_defines.c deleted file mode 100644 index 692d4447c66..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_dump_defines.c +++ /dev/null @@ -1,336 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#include "util/u_memory.h" -#include "util/u_debug.h" -#include "util/u_dump.h" - - -#if 0 -static const char * -util_dump_strip_prefix(const char *name, - const char *prefix) -{ - const char *stripped; - assert(name); - assert(prefix); - stripped = name; - while(*prefix) { - if(*stripped != *prefix) - return name; - - ++stripped; - ++prefix; - } - return stripped; -} -#endif - -static const char * -util_dump_enum_continuous(unsigned value, - unsigned num_names, - const char **names) -{ - if (value >= num_names) - return UTIL_DUMP_INVALID_NAME; - return names[value]; -} - - -#define DEFINE_UTIL_DUMP_CONTINUOUS(_name) \ - const char * \ - util_dump_##_name(unsigned value, boolean shortened) \ - { \ - if(shortened) \ - return util_dump_enum_continuous(value, Elements(util_dump_##_name##_short_names), util_dump_##_name##_short_names); \ - else \ - return util_dump_enum_continuous(value, Elements(util_dump_##_name##_names), util_dump_##_name##_names); \ - } - - -static const char * -util_dump_blend_factor_names[] = { - UTIL_DUMP_INVALID_NAME, /* 0x0 */ - "PIPE_BLENDFACTOR_ONE", - "PIPE_BLENDFACTOR_SRC_COLOR", - "PIPE_BLENDFACTOR_SRC_ALPHA", - "PIPE_BLENDFACTOR_DST_ALPHA", - "PIPE_BLENDFACTOR_DST_COLOR", - "PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE", - "PIPE_BLENDFACTOR_CONST_COLOR", - "PIPE_BLENDFACTOR_CONST_ALPHA", - "PIPE_BLENDFACTOR_SRC1_COLOR", - "PIPE_BLENDFACTOR_SRC1_ALPHA", - UTIL_DUMP_INVALID_NAME, /* 0x0b */ - UTIL_DUMP_INVALID_NAME, /* 0x0c */ - UTIL_DUMP_INVALID_NAME, /* 0x0d */ - UTIL_DUMP_INVALID_NAME, /* 0x0e */ - UTIL_DUMP_INVALID_NAME, /* 0x0f */ - UTIL_DUMP_INVALID_NAME, /* 0x10 */ - "PIPE_BLENDFACTOR_ZERO", - "PIPE_BLENDFACTOR_INV_SRC_COLOR", - "PIPE_BLENDFACTOR_INV_SRC_ALPHA", - "PIPE_BLENDFACTOR_INV_DST_ALPHA", - "PIPE_BLENDFACTOR_INV_DST_COLOR", - UTIL_DUMP_INVALID_NAME, /* 0x16 */ - "PIPE_BLENDFACTOR_INV_CONST_COLOR", - "PIPE_BLENDFACTOR_INV_CONST_ALPHA", - "PIPE_BLENDFACTOR_INV_SRC1_COLOR", - "PIPE_BLENDFACTOR_INV_SRC1_ALPHA" -}; - -static const char * -util_dump_blend_factor_short_names[] = { - UTIL_DUMP_INVALID_NAME, /* 0x0 */ - "one", - "src_color", - "src_alpha", - "dst_alpha", - "dst_color", - "src_alpha_saturate", - "const_color", - "const_alpha", - "src1_color", - "src1_alpha", - UTIL_DUMP_INVALID_NAME, /* 0x0b */ - UTIL_DUMP_INVALID_NAME, /* 0x0c */ - UTIL_DUMP_INVALID_NAME, /* 0x0d */ - UTIL_DUMP_INVALID_NAME, /* 0x0e */ - UTIL_DUMP_INVALID_NAME, /* 0x0f */ - UTIL_DUMP_INVALID_NAME, /* 0x10 */ - "zero", - "inv_src_color", - "inv_src_alpha", - "inv_dst_alpha", - "inv_dst_color", - UTIL_DUMP_INVALID_NAME, /* 0x16 */ - "inv_const_color", - "inv_const_alpha", - "inv_src1_color", - "inv_src1_alpha" -}; - -DEFINE_UTIL_DUMP_CONTINUOUS(blend_factor) - - -static const char * -util_dump_blend_func_names[] = { - "PIPE_BLEND_ADD", - "PIPE_BLEND_SUBTRACT", - "PIPE_BLEND_REVERSE_SUBTRACT", - "PIPE_BLEND_MIN", - "PIPE_BLEND_MAX" -}; - -static const char * -util_dump_blend_func_short_names[] = { - "add", - "sub", - "rev_sub", - "min", - "max" -}; - -DEFINE_UTIL_DUMP_CONTINUOUS(blend_func) - - -static const char * -util_dump_logicop_names[] = { - "PIPE_LOGICOP_CLEAR", - "PIPE_LOGICOP_NOR", - "PIPE_LOGICOP_AND_INVERTED", - "PIPE_LOGICOP_COPY_INVERTED", - "PIPE_LOGICOP_AND_REVERSE", - "PIPE_LOGICOP_INVERT", - "PIPE_LOGICOP_XOR", - "PIPE_LOGICOP_NAND", - "PIPE_LOGICOP_AND", - "PIPE_LOGICOP_EQUIV", - "PIPE_LOGICOP_NOOP", - "PIPE_LOGICOP_OR_INVERTED", - "PIPE_LOGICOP_COPY", - "PIPE_LOGICOP_OR_REVERSE", - "PIPE_LOGICOP_OR", - "PIPE_LOGICOP_SET" -}; - -static const char * -util_dump_logicop_short_names[] = { - "clear", - "nor", - "and_inverted", - "copy_inverted", - "and_reverse", - "invert", - "xor", - "nand", - "and", - "equiv", - "noop", - "or_inverted", - "copy", - "or_reverse", - "or", - "set" -}; - -DEFINE_UTIL_DUMP_CONTINUOUS(logicop) - - -static const char * -util_dump_func_names[] = { - "PIPE_FUNC_NEVER", - "PIPE_FUNC_LESS", - "PIPE_FUNC_EQUAL", - "PIPE_FUNC_LEQUAL", - "PIPE_FUNC_GREATER", - "PIPE_FUNC_NOTEQUAL", - "PIPE_FUNC_GEQUAL", - "PIPE_FUNC_ALWAYS" -}; - -static const char * -util_dump_func_short_names[] = { - "never", - "less", - "equal", - "less_equal", - "greater", - "not_equal", - "greater_equal", - "always" -}; - -DEFINE_UTIL_DUMP_CONTINUOUS(func) - - -static const char * -util_dump_stencil_op_names[] = { - "PIPE_STENCIL_OP_KEEP", - "PIPE_STENCIL_OP_ZERO", - "PIPE_STENCIL_OP_REPLACE", - "PIPE_STENCIL_OP_INCR", - "PIPE_STENCIL_OP_DECR", - "PIPE_STENCIL_OP_INCR_WRAP", - "PIPE_STENCIL_OP_DECR_WRAP", - "PIPE_STENCIL_OP_INVERT" -}; - -static const char * -util_dump_stencil_op_short_names[] = { - "keep", - "zero", - "replace", - "incr", - "decr", - "incr_wrap", - "decr_wrap", - "invert" -}; - -DEFINE_UTIL_DUMP_CONTINUOUS(stencil_op) - - -static const char * -util_dump_tex_target_names[] = { - "PIPE_BUFFER", - "PIPE_TEXTURE_1D", - "PIPE_TEXTURE_2D", - "PIPE_TEXTURE_3D", - "PIPE_TEXTURE_CUBE" -}; - -static const char * -util_dump_tex_target_short_names[] = { - "buffer", - "1d", - "2d", - "3d", - "cube" -}; - -DEFINE_UTIL_DUMP_CONTINUOUS(tex_target) - - -static const char * -util_dump_tex_wrap_names[] = { - "PIPE_TEX_WRAP_REPEAT", - "PIPE_TEX_WRAP_CLAMP", - "PIPE_TEX_WRAP_CLAMP_TO_EDGE", - "PIPE_TEX_WRAP_CLAMP_TO_BORDER", - "PIPE_TEX_WRAP_MIRROR_REPEAT", - "PIPE_TEX_WRAP_MIRROR_CLAMP", - "PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE", - "PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER" -}; - -static const char * -util_dump_tex_wrap_short_names[] = { - "repeat", - "clamp", - "clamp_to_edge", - "clamp_to_border", - "mirror_repeat", - "mirror_clamp", - "mirror_clamp_to_edge", - "mirror_clamp_to_border" -}; - -DEFINE_UTIL_DUMP_CONTINUOUS(tex_wrap) - - -static const char * -util_dump_tex_mipfilter_names[] = { - "PIPE_TEX_MIPFILTER_NEAREST", - "PIPE_TEX_MIPFILTER_LINEAR", - "PIPE_TEX_MIPFILTER_NONE" -}; - -static const char * -util_dump_tex_mipfilter_short_names[] = { - "nearest", - "linear", - "none" -}; - -DEFINE_UTIL_DUMP_CONTINUOUS(tex_mipfilter) - - -static const char * -util_dump_tex_filter_names[] = { - "PIPE_TEX_FILTER_NEAREST", - "PIPE_TEX_FILTER_LINEAR" -}; - -static const char * -util_dump_tex_filter_short_names[] = { - "nearest", - "linear" -}; - -DEFINE_UTIL_DUMP_CONTINUOUS(tex_filter) diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_dump_state.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_dump_state.c deleted file mode 100644 index c728bc4021c..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_dump_state.c +++ /dev/null @@ -1,762 +0,0 @@ -/************************************************************************** - * - * Copyright 2008-2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#include "pipe/p_compiler.h" -#include "util/u_memory.h" -#include "util/u_string.h" -#include "util/u_format.h" -#include "tgsi/tgsi_dump.h" - -#include "u_dump.h" - - -/* - * Dump primitives - */ - -static INLINE void -util_stream_writef(FILE *stream, const char *format, ...) -{ - static char buf[1024]; - unsigned len; - va_list ap; - va_start(ap, format); - len = util_vsnprintf(buf, sizeof(buf), format, ap); - va_end(ap); - fwrite(buf, len, 1, stream); -} - -static void -util_dump_bool(FILE *stream, int value) -{ - util_stream_writef(stream, "%c", value ? '1' : '0'); -} - -static void -util_dump_int(FILE *stream, long long int value) -{ - util_stream_writef(stream, "%lli", value); -} - -static void -util_dump_uint(FILE *stream, long long unsigned value) -{ - util_stream_writef(stream, "%llu", value); -} - -static void -util_dump_float(FILE *stream, double value) -{ - util_stream_writef(stream, "%g", value); -} - -static void -util_dump_string(FILE *stream, const char *str) -{ - fputs("\"", stream); - fputs(str, stream); - fputs("\"", stream); -} - -static void -util_dump_enum(FILE *stream, const char *value) -{ - fputs(value, stream); -} - -static void -util_dump_array_begin(FILE *stream) -{ - fputs("{", stream); -} - -static void -util_dump_array_end(FILE *stream) -{ - fputs("}", stream); -} - -static void -util_dump_elem_begin(FILE *stream) -{ -} - -static void -util_dump_elem_end(FILE *stream) -{ - fputs(", ", stream); -} - -static void -util_dump_struct_begin(FILE *stream, const char *name) -{ - fputs("{", stream); -} - -static void -util_dump_struct_end(FILE *stream) -{ - fputs("}", stream); -} - -static void -util_dump_member_begin(FILE *stream, const char *name) -{ - util_stream_writef(stream, "%s = ", name); -} - -static void -util_dump_member_end(FILE *stream) -{ - fputs(", ", stream); -} - -static void -util_dump_null(FILE *stream) -{ - fputs("NULL", stream); -} - -static void -util_dump_ptr(FILE *stream, const void *value) -{ - if(value) - util_stream_writef(stream, "0x%08lx", (unsigned long)(uintptr_t)value); - else - util_dump_null(stream); -} - - -/* - * Code saving macros. - */ - -#define util_dump_arg(_stream, _type, _arg) \ - do { \ - util_dump_arg_begin(_stream, #_arg); \ - util_dump_##_type(_stream, _arg); \ - util_dump_arg_end(_stream); \ - } while(0) - -#define util_dump_ret(_stream, _type, _arg) \ - do { \ - util_dump_ret_begin(_stream); \ - util_dump_##_type(_stream, _arg); \ - util_dump_ret_end(_stream); \ - } while(0) - -#define util_dump_array(_stream, _type, _obj, _size) \ - do { \ - size_t idx; \ - util_dump_array_begin(_stream); \ - for(idx = 0; idx < (_size); ++idx) { \ - util_dump_elem_begin(_stream); \ - util_dump_##_type(_stream, (_obj)[idx]); \ - util_dump_elem_end(_stream); \ - } \ - util_dump_array_end(_stream); \ - } while(0) - -#define util_dump_struct_array(_stream, _type, _obj, _size) \ - do { \ - size_t idx; \ - util_dump_array_begin(_stream); \ - for(idx = 0; idx < (_size); ++idx) { \ - util_dump_elem_begin(_stream); \ - util_dump_##_type(_stream, &(_obj)[idx]); \ - util_dump_elem_end(_stream); \ - } \ - util_dump_array_end(_stream); \ - } while(0) - -#define util_dump_member(_stream, _type, _obj, _member) \ - do { \ - util_dump_member_begin(_stream, #_member); \ - util_dump_##_type(_stream, (_obj)->_member); \ - util_dump_member_end(_stream); \ - } while(0) - -#define util_dump_arg_array(_stream, _type, _arg, _size) \ - do { \ - util_dump_arg_begin(_stream, #_arg); \ - util_dump_array(_stream, _type, _arg, _size); \ - util_dump_arg_end(_stream); \ - } while(0) - -#define util_dump_member_array(_stream, _type, _obj, _member) \ - do { \ - util_dump_member_begin(_stream, #_member); \ - util_dump_array(_stream, _type, (_obj)->_member, sizeof((_obj)->_member)/sizeof((_obj)->_member[0])); \ - util_dump_member_end(_stream); \ - } while(0) - - - -/* - * Wrappers for enum -> string dumpers. - */ - - -static void -util_dump_format(FILE *stream, enum pipe_format format) -{ - util_dump_enum(stream, util_format_name(format)); -} - - -static void -util_dump_enum_blend_factor(FILE *stream, unsigned value) -{ - util_dump_enum(stream, util_dump_blend_factor(value, TRUE)); -} - -static void -util_dump_enum_blend_func(FILE *stream, unsigned value) -{ - util_dump_enum(stream, util_dump_blend_func(value, TRUE)); -} - -static void -util_dump_enum_func(FILE *stream, unsigned value) -{ - util_dump_enum(stream, util_dump_func(value, TRUE)); -} - - -/* - * Public functions - */ - - -void -util_dump_template(FILE *stream, const struct pipe_resource *templat) -{ - if(!templat) { - util_dump_null(stream); - return; - } - - util_dump_struct_begin(stream, "pipe_resource"); - - util_dump_member(stream, int, templat, target); - util_dump_member(stream, format, templat, format); - - util_dump_member_begin(stream, "width"); - util_dump_uint(stream, templat->width0); - util_dump_member_end(stream); - - util_dump_member_begin(stream, "height"); - util_dump_uint(stream, templat->height0); - util_dump_member_end(stream); - - util_dump_member_begin(stream, "depth"); - util_dump_uint(stream, templat->depth0); - util_dump_member_end(stream); - - util_dump_member_begin(stream, "array_size"); - util_dump_uint(stream, templat->array_size); - util_dump_member_end(stream); - - util_dump_member(stream, uint, templat, last_level); - util_dump_member(stream, uint, templat, usage); - util_dump_member(stream, uint, templat, bind); - util_dump_member(stream, uint, templat, flags); - - util_dump_struct_end(stream); -} - - -void -util_dump_rasterizer_state(FILE *stream, const struct pipe_rasterizer_state *state) -{ - if(!state) { - util_dump_null(stream); - return; - } - - util_dump_struct_begin(stream, "pipe_rasterizer_state"); - - util_dump_member(stream, bool, state, flatshade); - util_dump_member(stream, bool, state, light_twoside); - util_dump_member(stream, bool, state, clamp_vertex_color); - util_dump_member(stream, bool, state, clamp_fragment_color); - util_dump_member(stream, uint, state, front_ccw); - util_dump_member(stream, uint, state, cull_face); - util_dump_member(stream, uint, state, fill_front); - util_dump_member(stream, uint, state, fill_back); - util_dump_member(stream, bool, state, offset_point); - util_dump_member(stream, bool, state, offset_line); - util_dump_member(stream, bool, state, offset_tri); - util_dump_member(stream, bool, state, scissor); - util_dump_member(stream, bool, state, poly_smooth); - util_dump_member(stream, bool, state, poly_stipple_enable); - util_dump_member(stream, bool, state, point_smooth); - util_dump_member(stream, uint, state, sprite_coord_enable); - util_dump_member(stream, bool, state, sprite_coord_mode); - util_dump_member(stream, bool, state, point_quad_rasterization); - util_dump_member(stream, bool, state, point_size_per_vertex); - util_dump_member(stream, bool, state, multisample); - util_dump_member(stream, bool, state, line_smooth); - util_dump_member(stream, bool, state, line_stipple_enable); - util_dump_member(stream, uint, state, line_stipple_factor); - util_dump_member(stream, uint, state, line_stipple_pattern); - util_dump_member(stream, bool, state, line_last_pixel); - util_dump_member(stream, bool, state, flatshade_first); - util_dump_member(stream, bool, state, gl_rasterization_rules); - util_dump_member(stream, bool, state, rasterizer_discard); - util_dump_member(stream, bool, state, depth_clip); - util_dump_member(stream, uint, state, clip_plane_enable); - - util_dump_member(stream, float, state, line_width); - util_dump_member(stream, float, state, point_size); - util_dump_member(stream, float, state, offset_units); - util_dump_member(stream, float, state, offset_scale); - util_dump_member(stream, float, state, offset_clamp); - - util_dump_struct_end(stream); -} - - -void -util_dump_poly_stipple(FILE *stream, const struct pipe_poly_stipple *state) -{ - if(!state) { - util_dump_null(stream); - return; - } - - util_dump_struct_begin(stream, "pipe_poly_stipple"); - - util_dump_member_begin(stream, "stipple"); - util_dump_member_array(stream, uint, state, stipple); - util_dump_member_end(stream); - - util_dump_struct_end(stream); -} - - -void -util_dump_viewport_state(FILE *stream, const struct pipe_viewport_state *state) -{ - if(!state) { - util_dump_null(stream); - return; - } - - util_dump_struct_begin(stream, "pipe_viewport_state"); - - util_dump_member_array(stream, float, state, scale); - util_dump_member_array(stream, float, state, translate); - - util_dump_struct_end(stream); -} - - -void -util_dump_scissor_state(FILE *stream, const struct pipe_scissor_state *state) -{ - if(!state) { - util_dump_null(stream); - return; - } - - util_dump_struct_begin(stream, "pipe_scissor_state"); - - util_dump_member(stream, uint, state, minx); - util_dump_member(stream, uint, state, miny); - util_dump_member(stream, uint, state, maxx); - util_dump_member(stream, uint, state, maxy); - - util_dump_struct_end(stream); -} - - -void -util_dump_clip_state(FILE *stream, const struct pipe_clip_state *state) -{ - unsigned i; - - if(!state) { - util_dump_null(stream); - return; - } - - util_dump_struct_begin(stream, "pipe_clip_state"); - - util_dump_member_begin(stream, "ucp"); - util_dump_array_begin(stream); - for(i = 0; i < PIPE_MAX_CLIP_PLANES; ++i) { - util_dump_elem_begin(stream); - util_dump_array(stream, float, state->ucp[i], 4); - util_dump_elem_end(stream); - } - util_dump_array_end(stream); - util_dump_member_end(stream); - - util_dump_struct_end(stream); -} - - -void -util_dump_shader_state(FILE *stream, const struct pipe_shader_state *state) -{ - char str[8192]; - unsigned i; - - if(!state) { - util_dump_null(stream); - return; - } - - tgsi_dump_str(state->tokens, 0, str, sizeof(str)); - - util_dump_struct_begin(stream, "pipe_shader_state"); - - util_dump_member_begin(stream, "tokens"); - util_dump_string(stream, str); - util_dump_member_end(stream); - - util_dump_member_begin(stream, "stream_output"); - util_dump_struct_begin(stream, "pipe_stream_output_info"); - util_dump_member(stream, uint, &state->stream_output, num_outputs); - util_dump_member(stream, uint, &state->stream_output, stride); - util_dump_array_begin(stream); - for(i = 0; i < state->stream_output.num_outputs; ++i) { - util_dump_elem_begin(stream); - util_dump_struct_begin(stream, ""); /* anonymous */ - util_dump_member(stream, uint, &state->stream_output.output[i], register_index); - util_dump_member(stream, uint, &state->stream_output.output[i], register_mask); - util_dump_member(stream, uint, &state->stream_output.output[i], output_buffer); - util_dump_struct_end(stream); - util_dump_elem_end(stream); - } - util_dump_array_end(stream); - util_dump_struct_end(stream); - util_dump_member_end(stream); - - util_dump_struct_end(stream); -} - - -void -util_dump_depth_stencil_alpha_state(FILE *stream, const struct pipe_depth_stencil_alpha_state *state) -{ - unsigned i; - - if(!state) { - util_dump_null(stream); - return; - } - - util_dump_struct_begin(stream, "pipe_depth_stencil_alpha_state"); - - util_dump_member_begin(stream, "depth"); - util_dump_struct_begin(stream, "pipe_depth_state"); - util_dump_member(stream, bool, &state->depth, enabled); - if (state->depth.enabled) { - util_dump_member(stream, bool, &state->depth, writemask); - util_dump_member(stream, enum_func, &state->depth, func); - } - util_dump_struct_end(stream); - util_dump_member_end(stream); - - util_dump_member_begin(stream, "stencil"); - util_dump_array_begin(stream); - for(i = 0; i < Elements(state->stencil); ++i) { - util_dump_elem_begin(stream); - util_dump_struct_begin(stream, "pipe_stencil_state"); - util_dump_member(stream, bool, &state->stencil[i], enabled); - if (state->stencil[i].enabled) { - util_dump_member(stream, enum_func, &state->stencil[i], func); - util_dump_member(stream, uint, &state->stencil[i], fail_op); - util_dump_member(stream, uint, &state->stencil[i], zpass_op); - util_dump_member(stream, uint, &state->stencil[i], zfail_op); - util_dump_member(stream, uint, &state->stencil[i], valuemask); - util_dump_member(stream, uint, &state->stencil[i], writemask); - } - util_dump_struct_end(stream); - util_dump_elem_end(stream); - } - util_dump_array_end(stream); - util_dump_member_end(stream); - - util_dump_member_begin(stream, "alpha"); - util_dump_struct_begin(stream, "pipe_alpha_state"); - util_dump_member(stream, bool, &state->alpha, enabled); - if (state->alpha.enabled) { - util_dump_member(stream, enum_func, &state->alpha, func); - util_dump_member(stream, float, &state->alpha, ref_value); - } - util_dump_struct_end(stream); - util_dump_member_end(stream); - - util_dump_struct_end(stream); -} - -void -util_dump_rt_blend_state(FILE *stream, const struct pipe_rt_blend_state *state) -{ - util_dump_struct_begin(stream, "pipe_rt_blend_state"); - - util_dump_member(stream, uint, state, blend_enable); - if (state->blend_enable) { - util_dump_member(stream, enum_blend_func, state, rgb_func); - util_dump_member(stream, enum_blend_factor, state, rgb_src_factor); - util_dump_member(stream, enum_blend_factor, state, rgb_dst_factor); - - util_dump_member(stream, enum_blend_func, state, alpha_func); - util_dump_member(stream, enum_blend_factor, state, alpha_src_factor); - util_dump_member(stream, enum_blend_factor, state, alpha_dst_factor); - } - - util_dump_member(stream, uint, state, colormask); - - util_dump_struct_end(stream); -} - -void -util_dump_blend_state(FILE *stream, const struct pipe_blend_state *state) -{ - unsigned valid_entries = 1; - - if(!state) { - util_dump_null(stream); - return; - } - - util_dump_struct_begin(stream, "pipe_blend_state"); - - util_dump_member(stream, bool, state, dither); - - util_dump_member(stream, bool, state, logicop_enable); - if (state->logicop_enable) { - util_dump_member(stream, enum_func, state, logicop_func); - } - else { - util_dump_member(stream, bool, state, independent_blend_enable); - - util_dump_member_begin(stream, "rt"); - if (state->independent_blend_enable) - valid_entries = PIPE_MAX_COLOR_BUFS; - util_dump_struct_array(stream, rt_blend_state, state->rt, valid_entries); - util_dump_member_end(stream); - } - - util_dump_struct_end(stream); -} - - -void -util_dump_blend_color(FILE *stream, const struct pipe_blend_color *state) -{ - if(!state) { - util_dump_null(stream); - return; - } - - util_dump_struct_begin(stream, "pipe_blend_color"); - - util_dump_member_array(stream, float, state, color); - - util_dump_struct_end(stream); -} - -void -util_dump_stencil_ref(FILE *stream, const struct pipe_stencil_ref *state) -{ - if(!state) { - util_dump_null(stream); - return; - } - - util_dump_struct_begin(stream, "pipe_stencil_ref"); - - util_dump_member_array(stream, uint, state, ref_value); - - util_dump_struct_end(stream); -} - -void -util_dump_framebuffer_state(FILE *stream, const struct pipe_framebuffer_state *state) -{ - util_dump_struct_begin(stream, "pipe_framebuffer_state"); - - util_dump_member(stream, uint, state, width); - util_dump_member(stream, uint, state, height); - util_dump_member(stream, uint, state, nr_cbufs); - util_dump_member_array(stream, ptr, state, cbufs); - util_dump_member(stream, ptr, state, zsbuf); - - util_dump_struct_end(stream); -} - - -void -util_dump_sampler_state(FILE *stream, const struct pipe_sampler_state *state) -{ - if(!state) { - util_dump_null(stream); - return; - } - - util_dump_struct_begin(stream, "pipe_sampler_state"); - - util_dump_member(stream, uint, state, wrap_s); - util_dump_member(stream, uint, state, wrap_t); - util_dump_member(stream, uint, state, wrap_r); - util_dump_member(stream, uint, state, min_img_filter); - util_dump_member(stream, uint, state, min_mip_filter); - util_dump_member(stream, uint, state, mag_img_filter); - util_dump_member(stream, uint, state, compare_mode); - util_dump_member(stream, enum_func, state, compare_func); - util_dump_member(stream, bool, state, normalized_coords); - util_dump_member(stream, uint, state, max_anisotropy); - util_dump_member(stream, float, state, lod_bias); - util_dump_member(stream, float, state, min_lod); - util_dump_member(stream, float, state, max_lod); - util_dump_member_array(stream, float, state, border_color.f); - - util_dump_struct_end(stream); -} - - -void -util_dump_surface(FILE *stream, const struct pipe_surface *state) -{ - if(!state) { - util_dump_null(stream); - return; - } - - util_dump_struct_begin(stream, "pipe_surface"); - - util_dump_member(stream, format, state, format); - util_dump_member(stream, uint, state, width); - util_dump_member(stream, uint, state, height); - - util_dump_member(stream, uint, state, usage); - - util_dump_member(stream, ptr, state, texture); - util_dump_member(stream, uint, state, u.tex.level); - util_dump_member(stream, uint, state, u.tex.first_layer); - util_dump_member(stream, uint, state, u.tex.last_layer); - - util_dump_struct_end(stream); -} - - -void -util_dump_transfer(FILE *stream, const struct pipe_transfer *state) -{ - if(!state) { - util_dump_null(stream); - return; - } - - util_dump_struct_begin(stream, "pipe_transfer"); - - util_dump_member(stream, ptr, state, resource); - /*util_dump_member(stream, uint, state, box);*/ - - util_dump_member(stream, uint, state, stride); - util_dump_member(stream, uint, state, layer_stride); - - /*util_dump_member(stream, ptr, state, data);*/ - - util_dump_struct_end(stream); -} - - -void -util_dump_vertex_buffer(FILE *stream, const struct pipe_vertex_buffer *state) -{ - if(!state) { - util_dump_null(stream); - return; - } - - util_dump_struct_begin(stream, "pipe_vertex_buffer"); - - util_dump_member(stream, uint, state, stride); - util_dump_member(stream, uint, state, buffer_offset); - util_dump_member(stream, ptr, state, buffer); - - util_dump_struct_end(stream); -} - - -void -util_dump_vertex_element(FILE *stream, const struct pipe_vertex_element *state) -{ - if(!state) { - util_dump_null(stream); - return; - } - - util_dump_struct_begin(stream, "pipe_vertex_element"); - - util_dump_member(stream, uint, state, src_offset); - - util_dump_member(stream, uint, state, vertex_buffer_index); - - util_dump_member(stream, format, state, src_format); - - util_dump_struct_end(stream); -} - - -void -util_dump_draw_info(FILE *stream, const struct pipe_draw_info *state) -{ - if(!state) { - util_dump_null(stream); - return; - } - - util_dump_struct_begin(stream, "pipe_draw_info"); - - util_dump_member(stream, bool, state, indexed); - - util_dump_member(stream, uint, state, mode); - util_dump_member(stream, uint, state, start); - util_dump_member(stream, uint, state, count); - - util_dump_member(stream, uint, state, start_instance); - util_dump_member(stream, uint, state, instance_count); - - util_dump_member(stream, int, state, index_bias); - util_dump_member(stream, uint, state, min_index); - util_dump_member(stream, uint, state, max_index); - - util_dump_member(stream, bool, state, primitive_restart); - util_dump_member(stream, uint, state, restart_index); - - util_dump_member(stream, ptr, state, count_from_stream_output); - - util_dump_struct_end(stream); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_dynarray.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_dynarray.h deleted file mode 100644 index 980cadf22d1..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_dynarray.h +++ /dev/null @@ -1,114 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Luca Barbieri - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_DYNARRAY_H -#define U_DYNARRAY_H - -#include "pipe/p_compiler.h" -#include "util/u_memory.h" - -/* A zero-initialized version of this is guaranteed to represent an - * empty array. - * - * Also, size <= capacity and data != 0 if and only if capacity != 0 - * capacity will always be the allocation size of data - */ -struct util_dynarray -{ - void *data; - unsigned size; - unsigned capacity; -}; - -static INLINE void -util_dynarray_init(struct util_dynarray *buf) -{ - memset(buf, 0, sizeof(*buf)); -} - -static INLINE void -util_dynarray_fini(struct util_dynarray *buf) -{ - if(buf->data) - { - FREE(buf->data); - util_dynarray_init(buf); - } -} - -/* use util_dynarray_trim to reduce the allocated storage */ -static INLINE void * -util_dynarray_resize(struct util_dynarray *buf, unsigned newsize) -{ - char *p; - if(newsize > buf->capacity) - { - unsigned newcap = buf->capacity << 1; - if(newsize > newcap) - newcap = newsize; - buf->data = REALLOC(buf->data, buf->capacity, newcap); - buf->capacity = newcap; - } - - p = (char *)buf->data + buf->size; - buf->size = newsize; - return p; -} - -static INLINE void * -util_dynarray_grow(struct util_dynarray *buf, int diff) -{ - return util_dynarray_resize(buf, buf->size + diff); -} - -static INLINE void -util_dynarray_trim(struct util_dynarray *buf) -{ - if (buf->size != buf->capacity) { - if (buf->size) { - buf->data = REALLOC(buf->data, buf->capacity, buf->size); - buf->capacity = buf->size; - } - else { - FREE(buf->data); - buf->data = 0; - buf->capacity = 0; - } - } -} - -#define util_dynarray_append(buf, type, v) do {type __v = (v); memcpy(util_dynarray_grow((buf), sizeof(type)), &__v, sizeof(type));} while(0) -#define util_dynarray_top_ptr(buf, type) (type*)((char*)(buf)->data + (buf)->size - sizeof(type)) -#define util_dynarray_top(buf, type) *util_dynarray_top_ptr(buf, type) -#define util_dynarray_pop_ptr(buf, type) (type*)((char*)(buf)->data + ((buf)->size -= sizeof(type))) -#define util_dynarray_pop(buf, type) *util_dynarray_pop_ptr(buf, type) -#define util_dynarray_contains(buf, type) ((buf)->size >= sizeof(type)) -#define util_dynarray_element(buf, type, idx) ((type*)(buf)->data + (idx)) -#define util_dynarray_begin(buf) ((buf)->data) -#define util_dynarray_end(buf) ((void*)util_dynarray_element((buf), char, (buf)->size)) - -#endif /* U_DYNARRAY_H */ - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_fifo.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_fifo.h deleted file mode 100644 index 9e007de1ada..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_fifo.h +++ /dev/null @@ -1,94 +0,0 @@ -/************************************************************************** - * - * Copyright © 2009 Jakob Bornecrantz - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_FIFO_H -#define U_FIFO_H - -#include "util/u_memory.h" - -struct util_fifo -{ - size_t head; - size_t tail; - size_t num; - size_t size; -}; - -static INLINE struct util_fifo * -u_fifo_create(size_t size) -{ - struct util_fifo *fifo; - fifo = MALLOC(sizeof(*fifo) + size * sizeof(void*)); - - fifo->head = 0; - fifo->tail = 0; - fifo->num = 0; - fifo->size = size; - - return fifo; -} - -static INLINE boolean -u_fifo_add(struct util_fifo *fifo, void *ptr) -{ - void **array = (void**)&fifo[1]; - if (fifo->num >= fifo->size) - return FALSE; - - if (++fifo->head >= fifo->size) - fifo->head = 0; - - array[fifo->head] = ptr; - - ++fifo->num; - - return TRUE; -} - -static INLINE boolean -u_fifo_pop(struct util_fifo *fifo, void **ptr) -{ - void **array = (void**)&fifo[1]; - - if (!fifo->num) - return FALSE; - - if (++fifo->tail >= fifo->size) - fifo->tail = 0; - - *ptr = array[fifo->tail]; - - ++fifo->num; - - return TRUE; -} - -static INLINE void -u_fifo_destroy(struct util_fifo *fifo) -{ - FREE(fifo); -} - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format.c deleted file mode 100644 index cfc4a17a062..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format.c +++ /dev/null @@ -1,701 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Pixel format accessor functions. - * - * @author Jose Fonseca - */ - -#include "u_math.h" -#include "u_memory.h" -#include "u_rect.h" -#include "u_format.h" -#include "u_format_s3tc.h" - -#include "pipe/p_defines.h" - - -boolean -util_format_is_float(enum pipe_format format) -{ - const struct util_format_description *desc = util_format_description(format); - unsigned i; - - assert(desc); - if (!desc) { - return FALSE; - } - - i = util_format_get_first_non_void_channel(format); - if (i == -1) { - return FALSE; - } - - return desc->channel[i].type == UTIL_FORMAT_TYPE_FLOAT ? TRUE : FALSE; -} - - -/** - * Return the number of logical channels in the given format by - * examining swizzles. - * XXX this could be made into a public function if useful elsewhere. - */ -static unsigned -nr_logical_channels(const struct util_format_description *desc) -{ - boolean swizzle_used[UTIL_FORMAT_SWIZZLE_MAX]; - - memset(swizzle_used, 0, sizeof(swizzle_used)); - - swizzle_used[desc->swizzle[0]] = TRUE; - swizzle_used[desc->swizzle[1]] = TRUE; - swizzle_used[desc->swizzle[2]] = TRUE; - swizzle_used[desc->swizzle[3]] = TRUE; - - return (swizzle_used[UTIL_FORMAT_SWIZZLE_X] + - swizzle_used[UTIL_FORMAT_SWIZZLE_Y] + - swizzle_used[UTIL_FORMAT_SWIZZLE_Z] + - swizzle_used[UTIL_FORMAT_SWIZZLE_W]); -} - - -/** Test if the format contains RGB, but not alpha */ -boolean -util_format_is_rgb_no_alpha(enum pipe_format format) -{ - const struct util_format_description *desc = - util_format_description(format); - - if ((desc->colorspace == UTIL_FORMAT_COLORSPACE_RGB || - desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) && - nr_logical_channels(desc) == 3) { - return TRUE; - } - return FALSE; -} - - -boolean -util_format_is_luminance(enum pipe_format format) -{ - const struct util_format_description *desc = - util_format_description(format); - - if ((desc->colorspace == UTIL_FORMAT_COLORSPACE_RGB || - desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) && - desc->swizzle[0] == UTIL_FORMAT_SWIZZLE_X && - desc->swizzle[1] == UTIL_FORMAT_SWIZZLE_X && - desc->swizzle[2] == UTIL_FORMAT_SWIZZLE_X && - desc->swizzle[3] == UTIL_FORMAT_SWIZZLE_1) { - return TRUE; - } - return FALSE; -} - -boolean -util_format_is_pure_integer(enum pipe_format format) -{ - const struct util_format_description *desc = util_format_description(format); - int i; - - /* Find the first non-void channel. */ - i = util_format_get_first_non_void_channel(format); - if (i == -1) - return FALSE; - - return desc->channel[i].pure_integer ? TRUE : FALSE; -} - -boolean -util_format_is_pure_sint(enum pipe_format format) -{ - const struct util_format_description *desc = util_format_description(format); - int i; - - i = util_format_get_first_non_void_channel(format); - if (i == -1) - return FALSE; - - return (desc->channel[i].type == UTIL_FORMAT_TYPE_SIGNED && desc->channel[i].pure_integer) ? TRUE : FALSE; -} - -boolean -util_format_is_pure_uint(enum pipe_format format) -{ - const struct util_format_description *desc = util_format_description(format); - int i; - - i = util_format_get_first_non_void_channel(format); - if (i == -1) - return FALSE; - - return (desc->channel[i].type == UTIL_FORMAT_TYPE_UNSIGNED && desc->channel[i].pure_integer) ? TRUE : FALSE; -} - -boolean -util_format_is_luminance_alpha(enum pipe_format format) -{ - const struct util_format_description *desc = - util_format_description(format); - - if ((desc->colorspace == UTIL_FORMAT_COLORSPACE_RGB || - desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) && - desc->swizzle[0] == UTIL_FORMAT_SWIZZLE_X && - desc->swizzle[1] == UTIL_FORMAT_SWIZZLE_X && - desc->swizzle[2] == UTIL_FORMAT_SWIZZLE_X && - desc->swizzle[3] == UTIL_FORMAT_SWIZZLE_Y) { - return TRUE; - } - return FALSE; -} - - -boolean -util_format_is_intensity(enum pipe_format format) -{ - const struct util_format_description *desc = - util_format_description(format); - - if ((desc->colorspace == UTIL_FORMAT_COLORSPACE_RGB || - desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) && - desc->swizzle[0] == UTIL_FORMAT_SWIZZLE_X && - desc->swizzle[1] == UTIL_FORMAT_SWIZZLE_X && - desc->swizzle[2] == UTIL_FORMAT_SWIZZLE_X && - desc->swizzle[3] == UTIL_FORMAT_SWIZZLE_X) { - return TRUE; - } - return FALSE; -} - - -boolean -util_format_is_supported(enum pipe_format format, unsigned bind) -{ - if (util_format_is_s3tc(format) && !util_format_s3tc_enabled) { - return FALSE; - } - -#ifndef TEXTURE_FLOAT_ENABLED - if ((bind & PIPE_BIND_RENDER_TARGET) && - format != PIPE_FORMAT_R9G9B9E5_FLOAT && - format != PIPE_FORMAT_R11G11B10_FLOAT && - util_format_is_float(format)) { - return FALSE; - } -#endif - - return TRUE; -} - - -void -util_format_read_4f(enum pipe_format format, - float *dst, unsigned dst_stride, - const void *src, unsigned src_stride, - unsigned x, unsigned y, unsigned w, unsigned h) -{ - const struct util_format_description *format_desc; - const uint8_t *src_row; - float *dst_row; - - format_desc = util_format_description(format); - - assert(x % format_desc->block.width == 0); - assert(y % format_desc->block.height == 0); - - src_row = (const uint8_t *)src + y*src_stride + x*(format_desc->block.bits/8); - dst_row = dst; - - format_desc->unpack_rgba_float(dst_row, dst_stride, src_row, src_stride, w, h); -} - - -void -util_format_write_4f(enum pipe_format format, - const float *src, unsigned src_stride, - void *dst, unsigned dst_stride, - unsigned x, unsigned y, unsigned w, unsigned h) -{ - const struct util_format_description *format_desc; - uint8_t *dst_row; - const float *src_row; - - format_desc = util_format_description(format); - - assert(x % format_desc->block.width == 0); - assert(y % format_desc->block.height == 0); - - dst_row = (uint8_t *)dst + y*dst_stride + x*(format_desc->block.bits/8); - src_row = src; - - format_desc->pack_rgba_float(dst_row, dst_stride, src_row, src_stride, w, h); -} - - -void -util_format_read_4ub(enum pipe_format format, uint8_t *dst, unsigned dst_stride, const void *src, unsigned src_stride, unsigned x, unsigned y, unsigned w, unsigned h) -{ - const struct util_format_description *format_desc; - const uint8_t *src_row; - uint8_t *dst_row; - - format_desc = util_format_description(format); - - assert(x % format_desc->block.width == 0); - assert(y % format_desc->block.height == 0); - - src_row = (const uint8_t *)src + y*src_stride + x*(format_desc->block.bits/8); - dst_row = dst; - - format_desc->unpack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, w, h); -} - - -void -util_format_write_4ub(enum pipe_format format, const uint8_t *src, unsigned src_stride, void *dst, unsigned dst_stride, unsigned x, unsigned y, unsigned w, unsigned h) -{ - const struct util_format_description *format_desc; - uint8_t *dst_row; - const uint8_t *src_row; - - format_desc = util_format_description(format); - - assert(x % format_desc->block.width == 0); - assert(y % format_desc->block.height == 0); - - dst_row = (uint8_t *)dst + y*dst_stride + x*(format_desc->block.bits/8); - src_row = src; - - format_desc->pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, w, h); -} - -void -util_format_read_4ui(enum pipe_format format, - unsigned *dst, unsigned dst_stride, - const void *src, unsigned src_stride, - unsigned x, unsigned y, unsigned w, unsigned h) -{ - const struct util_format_description *format_desc; - const uint8_t *src_row; - unsigned *dst_row; - - format_desc = util_format_description(format); - - assert(x % format_desc->block.width == 0); - assert(y % format_desc->block.height == 0); - - src_row = (const uint8_t *)src + y*src_stride + x*(format_desc->block.bits/8); - dst_row = dst; - - format_desc->unpack_rgba_uint(dst_row, dst_stride, src_row, src_stride, w, h); -} - -void -util_format_write_4ui(enum pipe_format format, - const unsigned int *src, unsigned src_stride, - void *dst, unsigned dst_stride, - unsigned x, unsigned y, unsigned w, unsigned h) -{ - const struct util_format_description *format_desc; - uint8_t *dst_row; - const unsigned *src_row; - - format_desc = util_format_description(format); - - assert(x % format_desc->block.width == 0); - assert(y % format_desc->block.height == 0); - - dst_row = (uint8_t *)dst + y*dst_stride + x*(format_desc->block.bits/8); - src_row = src; - - format_desc->pack_rgba_uint(dst_row, dst_stride, src_row, src_stride, w, h); -} - -void -util_format_read_4i(enum pipe_format format, - int *dst, unsigned dst_stride, - const void *src, unsigned src_stride, - unsigned x, unsigned y, unsigned w, unsigned h) -{ - const struct util_format_description *format_desc; - const uint8_t *src_row; - int *dst_row; - - format_desc = util_format_description(format); - - assert(x % format_desc->block.width == 0); - assert(y % format_desc->block.height == 0); - - src_row = (const uint8_t *)src + y*src_stride + x*(format_desc->block.bits/8); - dst_row = dst; - - format_desc->unpack_rgba_sint(dst_row, dst_stride, src_row, src_stride, w, h); -} - -void -util_format_write_4i(enum pipe_format format, - const int *src, unsigned src_stride, - void *dst, unsigned dst_stride, - unsigned x, unsigned y, unsigned w, unsigned h) -{ - const struct util_format_description *format_desc; - uint8_t *dst_row; - const int *src_row; - - format_desc = util_format_description(format); - - assert(x % format_desc->block.width == 0); - assert(y % format_desc->block.height == 0); - - dst_row = (uint8_t *)dst + y*dst_stride + x*(format_desc->block.bits/8); - src_row = src; - - format_desc->pack_rgba_sint(dst_row, dst_stride, src_row, src_stride, w, h); -} - -boolean -util_is_format_compatible(const struct util_format_description *src_desc, - const struct util_format_description *dst_desc) -{ - unsigned chan; - - if (src_desc->format == dst_desc->format) { - return TRUE; - } - - if (src_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN || - dst_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) { - return FALSE; - } - - if (src_desc->block.bits != dst_desc->block.bits || - src_desc->nr_channels != dst_desc->nr_channels || - src_desc->colorspace != dst_desc->colorspace) { - return FALSE; - } - - for (chan = 0; chan < 4; ++chan) { - if (src_desc->channel[chan].size != - dst_desc->channel[chan].size) { - return FALSE; - } - } - - for (chan = 0; chan < 4; ++chan) { - enum util_format_swizzle swizzle = dst_desc->swizzle[chan]; - - if (swizzle < 4) { - if (src_desc->swizzle[chan] != swizzle) { - return FALSE; - } - if ((src_desc->channel[swizzle].type != - dst_desc->channel[swizzle].type) || - (src_desc->channel[swizzle].normalized != - dst_desc->channel[swizzle].normalized)) { - return FALSE; - } - } - } - - return TRUE; -} - - -boolean -util_format_fits_8unorm(const struct util_format_description *format_desc) -{ - unsigned chan; - - /* - * After linearized sRGB values require more than 8bits. - */ - - if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) { - return FALSE; - } - - switch (format_desc->layout) { - - case UTIL_FORMAT_LAYOUT_S3TC: - /* - * These are straight forward. - */ - return TRUE; - case UTIL_FORMAT_LAYOUT_RGTC: - if (format_desc->format == PIPE_FORMAT_RGTC1_SNORM || - format_desc->format == PIPE_FORMAT_RGTC2_SNORM || - format_desc->format == PIPE_FORMAT_LATC1_SNORM || - format_desc->format == PIPE_FORMAT_LATC2_SNORM) - return FALSE; - return TRUE; - - case UTIL_FORMAT_LAYOUT_PLAIN: - /* - * For these we can find a generic rule. - */ - - for (chan = 0; chan < format_desc->nr_channels; ++chan) { - switch (format_desc->channel[chan].type) { - case UTIL_FORMAT_TYPE_VOID: - break; - case UTIL_FORMAT_TYPE_UNSIGNED: - if (!format_desc->channel[chan].normalized || - format_desc->channel[chan].size > 8) { - return FALSE; - } - break; - default: - return FALSE; - } - } - return TRUE; - - default: - /* - * Handle all others on a case by case basis. - */ - - switch (format_desc->format) { - case PIPE_FORMAT_R1_UNORM: - case PIPE_FORMAT_UYVY: - case PIPE_FORMAT_YUYV: - case PIPE_FORMAT_R8G8_B8G8_UNORM: - case PIPE_FORMAT_G8R8_G8B8_UNORM: - return TRUE; - - default: - return FALSE; - } - } -} - - -void -util_format_translate(enum pipe_format dst_format, - void *dst, unsigned dst_stride, - unsigned dst_x, unsigned dst_y, - enum pipe_format src_format, - const void *src, unsigned src_stride, - unsigned src_x, unsigned src_y, - unsigned width, unsigned height) -{ - const struct util_format_description *dst_format_desc; - const struct util_format_description *src_format_desc; - uint8_t *dst_row; - const uint8_t *src_row; - unsigned x_step, y_step; - unsigned dst_step; - unsigned src_step; - - dst_format_desc = util_format_description(dst_format); - src_format_desc = util_format_description(src_format); - - if (util_is_format_compatible(src_format_desc, dst_format_desc)) { - /* - * Trivial case. - */ - - util_copy_rect(dst, dst_format, dst_stride, dst_x, dst_y, - width, height, src, (int)src_stride, - src_x, src_y); - return; - } - - assert(dst_x % dst_format_desc->block.width == 0); - assert(dst_y % dst_format_desc->block.height == 0); - assert(src_x % src_format_desc->block.width == 0); - assert(src_y % src_format_desc->block.height == 0); - - dst_row = (uint8_t *)dst + dst_y*dst_stride + dst_x*(dst_format_desc->block.bits/8); - src_row = (const uint8_t *)src + src_y*src_stride + src_x*(src_format_desc->block.bits/8); - - /* - * This works because all pixel formats have pixel blocks with power of two - * sizes. - */ - - y_step = MAX2(dst_format_desc->block.height, src_format_desc->block.height); - x_step = MAX2(dst_format_desc->block.width, src_format_desc->block.width); - assert(y_step % dst_format_desc->block.height == 0); - assert(y_step % src_format_desc->block.height == 0); - - dst_step = y_step / dst_format_desc->block.height * dst_stride; - src_step = y_step / src_format_desc->block.height * src_stride; - - /* - * TODO: double formats will loose precision - * TODO: Add a special case for formats that are mere swizzles of each other - */ - - if (src_format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS || - dst_format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) { - float *tmp_z = NULL; - uint8_t *tmp_s = NULL; - - assert(x_step == 1); - assert(y_step == 1); - - if (src_format_desc->unpack_z_float && - dst_format_desc->pack_z_float) { - tmp_z = MALLOC(width * sizeof *tmp_z); - } - - if (src_format_desc->unpack_s_8uint && - dst_format_desc->pack_s_8uint) { - tmp_s = MALLOC(width * sizeof *tmp_s); - } - - while (height--) { - if (tmp_z) { - src_format_desc->unpack_z_float(tmp_z, 0, src_row, src_stride, width, 1); - dst_format_desc->pack_z_float(dst_row, dst_stride, tmp_z, 0, width, 1); - } - - if (tmp_s) { - src_format_desc->unpack_s_8uint(tmp_s, 0, src_row, src_stride, width, 1); - dst_format_desc->pack_s_8uint(dst_row, dst_stride, tmp_s, 0, width, 1); - } - - dst_row += dst_step; - src_row += src_step; - } - - if (tmp_s) { - FREE(tmp_s); - } - - if (tmp_z) { - FREE(tmp_z); - } - - return; - } - - if (util_format_fits_8unorm(src_format_desc) || - util_format_fits_8unorm(dst_format_desc)) { - unsigned tmp_stride; - uint8_t *tmp_row; - - tmp_stride = MAX2(width, x_step) * 4 * sizeof *tmp_row; - tmp_row = MALLOC(y_step * tmp_stride); - if (!tmp_row) - return; - - while (height >= y_step) { - src_format_desc->unpack_rgba_8unorm(tmp_row, tmp_stride, src_row, src_stride, width, y_step); - dst_format_desc->pack_rgba_8unorm(dst_row, dst_stride, tmp_row, tmp_stride, width, y_step); - - dst_row += dst_step; - src_row += src_step; - height -= y_step; - } - - if (height) { - src_format_desc->unpack_rgba_8unorm(tmp_row, tmp_stride, src_row, src_stride, width, height); - dst_format_desc->pack_rgba_8unorm(dst_row, dst_stride, tmp_row, tmp_stride, width, height); - } - - FREE(tmp_row); - } - else { - unsigned tmp_stride; - float *tmp_row; - - tmp_stride = MAX2(width, x_step) * 4 * sizeof *tmp_row; - tmp_row = MALLOC(y_step * tmp_stride); - if (!tmp_row) - return; - - while (height >= y_step) { - src_format_desc->unpack_rgba_float(tmp_row, tmp_stride, src_row, src_stride, width, y_step); - dst_format_desc->pack_rgba_float(dst_row, dst_stride, tmp_row, tmp_stride, width, y_step); - - dst_row += dst_step; - src_row += src_step; - height -= y_step; - } - - if (height) { - src_format_desc->unpack_rgba_float(tmp_row, tmp_stride, src_row, src_stride, width, height); - dst_format_desc->pack_rgba_float(dst_row, dst_stride, tmp_row, tmp_stride, width, height); - } - - FREE(tmp_row); - } -} - -void util_format_compose_swizzles(const unsigned char swz1[4], - const unsigned char swz2[4], - unsigned char dst[4]) -{ - unsigned i; - - for (i = 0; i < 4; i++) { - dst[i] = swz2[i] <= UTIL_FORMAT_SWIZZLE_W ? - swz1[swz2[i]] : swz2[i]; - } -} - -void util_format_swizzle_4f(float *dst, const float *src, - const unsigned char swz[4]) -{ - unsigned i; - - for (i = 0; i < 4; i++) { - if (swz[i] <= UTIL_FORMAT_SWIZZLE_W) - dst[i] = src[swz[i]]; - else if (swz[i] == UTIL_FORMAT_SWIZZLE_0) - dst[i] = 0; - else if (swz[i] == UTIL_FORMAT_SWIZZLE_1) - dst[i] = 1; - } -} - -void util_format_unswizzle_4f(float *dst, const float *src, - const unsigned char swz[4]) -{ - unsigned i; - - for (i = 0; i < 4; i++) { - switch (swz[i]) { - case UTIL_FORMAT_SWIZZLE_X: - dst[0] = src[i]; - break; - case UTIL_FORMAT_SWIZZLE_Y: - dst[1] = src[i]; - break; - case UTIL_FORMAT_SWIZZLE_Z: - dst[2] = src[i]; - break; - case UTIL_FORMAT_SWIZZLE_W: - dst[3] = src[i]; - break; - } - } -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format.csv b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format.csv deleted file mode 100644 index 345cc9d47c4..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format.csv +++ /dev/null @@ -1,346 +0,0 @@ -########################################################################### -# -# Copyright 2009-2010 VMware, Inc. -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sub license, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice (including the -# next paragraph) shall be included in all copies or substantial portions -# of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR -# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -########################################################################### - -# This CSV file has the input data for u_format.h's struct -# util_format_description. -# -# Each format entry contains: -# - name, per enum pipe_format -# - layout, per enum util_format_layout, in shortened lower caps -# - pixel block's width -# - pixel block's height -# - channel encoding (only meaningful for plain layout), containing for each -# channel the following information: -# - type, one of -# - 'x': void -# - 'u': unsigned -# - 's': signed -# - 'h': fixed -# - 'f': FLOAT -# - optionally followed by 'n' if it is normalized -# - optionally followed by 'p' if it is pure -# - number of bits -# - channel swizzle -# - color space: rgb, yub, sz -# -# See also: -# - http://msdn.microsoft.com/en-us/library/bb172558.aspx (D3D9) -# - http://msdn.microsoft.com/en-us/library/bb205073.aspx#mapping_texture_formats (D3D9 -> D3D10) -# - http://msdn.microsoft.com/en-us/library/bb173059.aspx (D3D10) -# -# Note that GL doesn't really specify the layout of internal formats. See -# OpenGL 2.1 specification, Table 3.16, on the "Correspondence of sized -# internal formats to base in- ternal formats, and desired component -# resolutions for each sized internal format." - -# None -# Described as regular uint_8 bytes, i.e. PIPE_FORMAT_R8_USCALED -PIPE_FORMAT_NONE , plain, 1, 1, u8 , , , , x001, rgb - -# Typical rendertarget formats -PIPE_FORMAT_B8G8R8A8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, rgb -PIPE_FORMAT_B8G8R8X8_UNORM , plain, 1, 1, un8 , un8 , un8 , x8 , zyx1, rgb -PIPE_FORMAT_A8R8G8B8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , yzwx, rgb -PIPE_FORMAT_X8R8G8B8_UNORM , plain, 1, 1, x8 , un8 , un8 , un8 , yzw1, rgb -PIPE_FORMAT_A8B8G8R8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , wzyx, rgb -PIPE_FORMAT_X8B8G8R8_UNORM , plain, 1, 1, x8 , un8 , un8 , un8 , wzy1, rgb -# PIPE_FORMAT_R8G8B8A8_UNORM is below -PIPE_FORMAT_R8G8B8X8_UNORM , plain, 1, 1, un8 , un8 , un8 , x8 , xyz1, rgb -PIPE_FORMAT_B5G5R5X1_UNORM , plain, 1, 1, un5 , un5 , un5 , x1 , zyx1, rgb -PIPE_FORMAT_B5G5R5A1_UNORM , plain, 1, 1, un5 , un5 , un5 , un1 , zyxw, rgb -PIPE_FORMAT_B4G4R4A4_UNORM , plain, 1, 1, un4 , un4 , un4 , un4 , zyxw, rgb -PIPE_FORMAT_B4G4R4X4_UNORM , plain, 1, 1, un4 , un4 , un4 , x4 , zyx1, rgb -PIPE_FORMAT_B5G6R5_UNORM , plain, 1, 1, un5 , un6 , un5 , , zyx1, rgb -PIPE_FORMAT_R10G10B10A2_UNORM , plain, 1, 1, un10, un10, un10, un2 , xyzw, rgb -PIPE_FORMAT_B10G10R10A2_UNORM , plain, 1, 1, un10, un10, un10, un2 , zyxw, rgb -PIPE_FORMAT_B2G3R3_UNORM , plain, 1, 1, un2 , un3 , un3 , , zyx1, rgb - -# Luminance/Intensity/Alpha formats -PIPE_FORMAT_L8_UNORM , plain, 1, 1, un8 , , , , xxx1, rgb -PIPE_FORMAT_A8_UNORM , plain, 1, 1, un8 , , , , 000x, rgb -PIPE_FORMAT_I8_UNORM , plain, 1, 1, un8 , , , , xxxx, rgb -PIPE_FORMAT_L4A4_UNORM , plain, 1, 1, un4 , un4 , , , xxxy, rgb -PIPE_FORMAT_L8A8_UNORM , plain, 1, 1, un8 , un8 , , , xxxy, rgb -PIPE_FORMAT_L16_UNORM , plain, 1, 1, un16, , , , xxx1, rgb -PIPE_FORMAT_A16_UNORM , plain, 1, 1, un16, , , , 000x, rgb -PIPE_FORMAT_I16_UNORM , plain, 1, 1, un16, , , , xxxx, rgb -PIPE_FORMAT_L16A16_UNORM , plain, 1, 1, un16, un16, , , xxxy, rgb -PIPE_FORMAT_A8_SNORM , plain, 1, 1, sn8 , , , , 000x, rgb -PIPE_FORMAT_L8_SNORM , plain, 1, 1, sn8 , , , , xxx1, rgb -PIPE_FORMAT_L8A8_SNORM , plain, 1, 1, sn8 , sn8 , , , xxxy, rgb -PIPE_FORMAT_I8_SNORM , plain, 1, 1, sn8 , , , , xxxx, rgb -PIPE_FORMAT_A16_SNORM , plain, 1, 1, sn16, , , , 000x, rgb -PIPE_FORMAT_L16_SNORM , plain, 1, 1, sn16, , , , xxx1, rgb -PIPE_FORMAT_L16A16_SNORM , plain, 1, 1, sn16, sn16, , , xxxy, rgb -PIPE_FORMAT_I16_SNORM , plain, 1, 1, sn16, , , , xxxx, rgb -PIPE_FORMAT_A16_FLOAT , plain, 1, 1, f16 , , , , 000x, rgb -PIPE_FORMAT_L16_FLOAT , plain, 1, 1, f16 , , , , xxx1, rgb -PIPE_FORMAT_L16A16_FLOAT , plain, 1, 1, f16 , f16 , , , xxxy, rgb -PIPE_FORMAT_I16_FLOAT , plain, 1, 1, f16 , , , , xxxx, rgb -PIPE_FORMAT_A32_FLOAT , plain, 1, 1, f32 , , , , 000x, rgb -PIPE_FORMAT_L32_FLOAT , plain, 1, 1, f32 , , , , xxx1, rgb -PIPE_FORMAT_L32A32_FLOAT , plain, 1, 1, f32 , f32 , , , xxxy, rgb -PIPE_FORMAT_I32_FLOAT , plain, 1, 1, f32 , , , , xxxx, rgb - -# SRGB formats -PIPE_FORMAT_L8_SRGB , plain, 1, 1, un8 , , , , xxx1, srgb -PIPE_FORMAT_L8A8_SRGB , plain, 1, 1, un8 , un8 , , , xxxy, srgb -PIPE_FORMAT_R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , , xyz1, srgb -PIPE_FORMAT_R8G8B8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , xyzw, srgb -PIPE_FORMAT_A8B8G8R8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , wzyx, srgb -PIPE_FORMAT_X8B8G8R8_SRGB , plain, 1, 1, x8 , un8 , un8 , un8 , wzy1, srgb -PIPE_FORMAT_B8G8R8A8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , zyxw, srgb -PIPE_FORMAT_B8G8R8X8_SRGB , plain, 1, 1, un8 , un8 , un8 , x8 , zyx1, srgb -PIPE_FORMAT_A8R8G8B8_SRGB , plain, 1, 1, un8 , un8 , un8 , un8 , yzwx, srgb -PIPE_FORMAT_X8R8G8B8_SRGB , plain, 1, 1, x8 , un8 , un8 , un8 , yzw1, srgb - -# Mixed-sign formats (typically used for bump map textures) -PIPE_FORMAT_R8SG8SB8UX8U_NORM , plain, 1, 1, sn8 , sn8 , un8 , x8 , xyz1, rgb -PIPE_FORMAT_R10SG10SB10SA2U_NORM , plain, 1, 1, sn10, sn10, sn10, un2 , xyzw, rgb -PIPE_FORMAT_R5SG5SB6U_NORM , plain, 1, 1, sn5 , sn5 , un6 , , xyz1, rgb - -# Depth-stencil formats -PIPE_FORMAT_S8_UINT , plain, 1, 1, up8 , , , , _x__, zs -PIPE_FORMAT_Z16_UNORM , plain, 1, 1, un16, , , , x___, zs -PIPE_FORMAT_Z32_UNORM , plain, 1, 1, un32, , , , x___, zs -PIPE_FORMAT_Z32_FLOAT , plain, 1, 1, f32 , , , , x___, zs -PIPE_FORMAT_Z24_UNORM_S8_UINT , plain, 1, 1, un24, up8 , , , xy__, zs -PIPE_FORMAT_S8_UINT_Z24_UNORM , plain, 1, 1, up8 , un24, , , yx__, zs -PIPE_FORMAT_X24S8_UINT , plain, 1, 1, x24 , up8 , , , _y__, zs -PIPE_FORMAT_S8X24_UINT , plain, 1, 1, up8 , x24 , , , _x__, zs -PIPE_FORMAT_Z24X8_UNORM , plain, 1, 1, un24, x8 , , , x___, zs -PIPE_FORMAT_X8Z24_UNORM , plain, 1, 1, x8 , un24, , , y___, zs -PIPE_FORMAT_Z32_FLOAT_S8X24_UINT , plain, 1, 1, f32 , up8 , x24, , xy__, zs -PIPE_FORMAT_X32_S8X24_UINT , plain, 1, 1, x32 , up8 , x24, , _y__, zs - -# YUV formats -# http://www.fourcc.org/yuv.php#UYVY -PIPE_FORMAT_UYVY , subsampled, 2, 1, x32 , , , , xyz1, yuv -# http://www.fourcc.org/yuv.php#YUYV (a.k.a http://www.fourcc.org/yuv.php#YUY2) -PIPE_FORMAT_YUYV , subsampled, 2, 1, x32 , , , , xyz1, yuv -# same subsampling but with rgb channels -PIPE_FORMAT_R8G8_B8G8_UNORM , subsampled, 2, 1, x32 , , , , xyz1, rgb -PIPE_FORMAT_G8R8_G8B8_UNORM , subsampled, 2, 1, x32 , , , , xyz1, rgb - -# some special formats not fitting anywhere else -PIPE_FORMAT_R11G11B10_FLOAT , other, 1, 1, x32 , , , , xyz1, rgb -PIPE_FORMAT_R9G9B9E5_FLOAT , other, 1, 1, x32 , , , , xyz1, rgb -PIPE_FORMAT_R1_UNORM , other, 8, 1, x8 , , , , x001, rgb -# A.k.a. D3DFMT_CxV8U8 -PIPE_FORMAT_R8G8Bx_SNORM , other, 1, 1, sn8 , sn8 , , , xyz1, rgb - -# Compressed formats -# - http://en.wikipedia.org/wiki/S3_Texture_Compression -# - http://www.opengl.org/registry/specs/EXT/texture_compression_s3tc.txt -# - http://www.opengl.org/registry/specs/ARB/texture_compression_rgtc.txt -# - http://www.opengl.org/registry/specs/EXT/texture_compression_latc.txt -# - http://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt -# - http://msdn.microsoft.com/en-us/library/bb694531.aspx -PIPE_FORMAT_DXT1_RGB , s3tc, 4, 4, x64 , , , , xyz1, rgb -PIPE_FORMAT_DXT1_RGBA , s3tc, 4, 4, x64 , , , , xyzw, rgb -PIPE_FORMAT_DXT3_RGBA , s3tc, 4, 4, x128, , , , xyzw, rgb -PIPE_FORMAT_DXT5_RGBA , s3tc, 4, 4, x128, , , , xyzw, rgb -PIPE_FORMAT_DXT1_SRGB , s3tc, 4, 4, x64 , , , , xyz1, srgb -PIPE_FORMAT_DXT1_SRGBA , s3tc, 4, 4, x64 , , , , xyzw, srgb -PIPE_FORMAT_DXT3_SRGBA , s3tc, 4, 4, x128, , , , xyzw, srgb -PIPE_FORMAT_DXT5_SRGBA , s3tc, 4, 4, x128, , , , xyzw, srgb - -PIPE_FORMAT_RGTC1_UNORM , rgtc, 4, 4, x64, , , , x001, rgb -PIPE_FORMAT_RGTC1_SNORM , rgtc, 4, 4, x64, , , , x001, rgb -PIPE_FORMAT_RGTC2_UNORM , rgtc, 4, 4, x128, , , , xy01, rgb -PIPE_FORMAT_RGTC2_SNORM , rgtc, 4, 4, x128, , , , xy01, rgb - -PIPE_FORMAT_LATC1_UNORM , rgtc, 4, 4, x64, , , , xxx1, rgb -PIPE_FORMAT_LATC1_SNORM , rgtc, 4, 4, x64, , , , xxx1, rgb -PIPE_FORMAT_LATC2_UNORM , rgtc, 4, 4, x128, , , , xxxy, rgb -PIPE_FORMAT_LATC2_SNORM , rgtc, 4, 4, x128, , , , xxxy, rgb - -PIPE_FORMAT_ETC1_RGB8 , etc, 4, 4, x64, , , , xyz1, rgb - -# Straightforward D3D10-like formats (also used for -# vertex buffer element description) -# -# See also: -# - src/gallium/auxiliary/translate/translate_generic.c -# - src/mesa/state_tracker/st_draw.c -PIPE_FORMAT_R64_FLOAT , plain, 1, 1, f64 , , , , x001, rgb -PIPE_FORMAT_R64G64_FLOAT , plain, 1, 1, f64 , f64 , , , xy01, rgb -PIPE_FORMAT_R64G64B64_FLOAT , plain, 1, 1, f64 , f64 , f64 , , xyz1, rgb -PIPE_FORMAT_R64G64B64A64_FLOAT , plain, 1, 1, f64 , f64 , f64 , f64 , xyzw, rgb -PIPE_FORMAT_R32_FLOAT , plain, 1, 1, f32 , , , , x001, rgb -PIPE_FORMAT_R32G32_FLOAT , plain, 1, 1, f32 , f32 , , , xy01, rgb -PIPE_FORMAT_R32G32B32_FLOAT , plain, 1, 1, f32 , f32 , f32 , , xyz1, rgb -PIPE_FORMAT_R32G32B32A32_FLOAT , plain, 1, 1, f32 , f32 , f32 , f32 , xyzw, rgb -PIPE_FORMAT_R32_UNORM , plain, 1, 1, un32, , , , x001, rgb -PIPE_FORMAT_R32G32_UNORM , plain, 1, 1, un32, un32, , , xy01, rgb -PIPE_FORMAT_R32G32B32_UNORM , plain, 1, 1, un32, un32, un32, , xyz1, rgb -PIPE_FORMAT_R32G32B32A32_UNORM , plain, 1, 1, un32, un32, un32, un32, xyzw, rgb -PIPE_FORMAT_R32_USCALED , plain, 1, 1, u32 , , , , x001, rgb -PIPE_FORMAT_R32G32_USCALED , plain, 1, 1, u32 , u32 , , , xy01, rgb -PIPE_FORMAT_R32G32B32_USCALED , plain, 1, 1, u32 , u32 , u32 , , xyz1, rgb -PIPE_FORMAT_R32G32B32A32_USCALED , plain, 1, 1, u32 , u32 , u32 , u32 , xyzw, rgb -PIPE_FORMAT_R32_SNORM , plain, 1, 1, sn32, , , , x001, rgb -PIPE_FORMAT_R32G32_SNORM , plain, 1, 1, sn32, sn32, , , xy01, rgb -PIPE_FORMAT_R32G32B32_SNORM , plain, 1, 1, sn32, sn32, sn32, , xyz1, rgb -PIPE_FORMAT_R32G32B32A32_SNORM , plain, 1, 1, sn32, sn32, sn32, sn32, xyzw, rgb -PIPE_FORMAT_R32_SSCALED , plain, 1, 1, s32 , , , , x001, rgb -PIPE_FORMAT_R32G32_SSCALED , plain, 1, 1, s32 , s32 , , , xy01, rgb -PIPE_FORMAT_R32G32B32_SSCALED , plain, 1, 1, s32 , s32 , s32 , , xyz1, rgb -PIPE_FORMAT_R32G32B32A32_SSCALED , plain, 1, 1, s32 , s32 , s32 , s32 , xyzw, rgb -PIPE_FORMAT_R16_FLOAT , plain, 1, 1, f16 , , , , x001, rgb -PIPE_FORMAT_R16G16_FLOAT , plain, 1, 1, f16 , f16 , , , xy01, rgb -PIPE_FORMAT_R16G16B16_FLOAT , plain, 1, 1, f16 , f16 , f16 , , xyz1, rgb -PIPE_FORMAT_R16G16B16A16_FLOAT , plain, 1, 1, f16 , f16 , f16 , f16 , xyzw, rgb -PIPE_FORMAT_R16_UNORM , plain, 1, 1, un16, , , , x001, rgb -PIPE_FORMAT_R16G16_UNORM , plain, 1, 1, un16, un16, , , xy01, rgb -PIPE_FORMAT_R16G16B16_UNORM , plain, 1, 1, un16, un16, un16, , xyz1, rgb -PIPE_FORMAT_R16G16B16A16_UNORM , plain, 1, 1, un16, un16, un16, un16, xyzw, rgb -PIPE_FORMAT_R16_USCALED , plain, 1, 1, u16 , , , , x001, rgb -PIPE_FORMAT_R16G16_USCALED , plain, 1, 1, u16 , u16 , , , xy01, rgb -PIPE_FORMAT_R16G16B16_USCALED , plain, 1, 1, u16 , u16 , u16 , , xyz1, rgb -PIPE_FORMAT_R16G16B16A16_USCALED , plain, 1, 1, u16 , u16 , u16 , u16 , xyzw, rgb -PIPE_FORMAT_R16_SNORM , plain, 1, 1, sn16, , , , x001, rgb -PIPE_FORMAT_R16G16_SNORM , plain, 1, 1, sn16, sn16, , , xy01, rgb -PIPE_FORMAT_R16G16B16_SNORM , plain, 1, 1, sn16, sn16, sn16, , xyz1, rgb -PIPE_FORMAT_R16G16B16A16_SNORM , plain, 1, 1, sn16, sn16, sn16, sn16, xyzw, rgb -PIPE_FORMAT_R16_SSCALED , plain, 1, 1, s16 , , , , x001, rgb -PIPE_FORMAT_R16G16_SSCALED , plain, 1, 1, s16 , s16 , , , xy01, rgb -PIPE_FORMAT_R16G16B16_SSCALED , plain, 1, 1, s16 , s16 , s16 , , xyz1, rgb -PIPE_FORMAT_R16G16B16A16_SSCALED , plain, 1, 1, s16 , s16 , s16 , s16 , xyzw, rgb -PIPE_FORMAT_R8_UNORM , plain, 1, 1, un8 , , , , x001, rgb -PIPE_FORMAT_R8G8_UNORM , plain, 1, 1, un8 , un8 , , , xy01, rgb -PIPE_FORMAT_R8G8B8_UNORM , plain, 1, 1, un8 , un8 , un8 , , xyz1, rgb -PIPE_FORMAT_R8G8B8A8_UNORM , plain, 1, 1, un8 , un8 , un8 , un8 , xyzw, rgb -PIPE_FORMAT_R8_USCALED , plain, 1, 1, u8 , , , , x001, rgb -PIPE_FORMAT_R8G8_USCALED , plain, 1, 1, u8 , u8 , , , xy01, rgb -PIPE_FORMAT_R8G8B8_USCALED , plain, 1, 1, u8 , u8 , u8 , , xyz1, rgb -PIPE_FORMAT_R8G8B8A8_USCALED , plain, 1, 1, u8 , u8 , u8 , u8 , xyzw, rgb -PIPE_FORMAT_R8_SNORM , plain, 1, 1, sn8 , , , , x001, rgb -PIPE_FORMAT_R8G8_SNORM , plain, 1, 1, sn8 , sn8 , , , xy01, rgb -PIPE_FORMAT_R8G8B8_SNORM , plain, 1, 1, sn8 , sn8 , sn8 , , xyz1, rgb -PIPE_FORMAT_R8G8B8A8_SNORM , plain, 1, 1, sn8 , sn8 , sn8 , sn8 , xyzw, rgb -PIPE_FORMAT_R8_SSCALED , plain, 1, 1, s8 , , , , x001, rgb -PIPE_FORMAT_R8G8_SSCALED , plain, 1, 1, s8 , s8 , , , xy01, rgb -PIPE_FORMAT_R8G8B8_SSCALED , plain, 1, 1, s8 , s8 , s8 , , xyz1, rgb -PIPE_FORMAT_R8G8B8A8_SSCALED , plain, 1, 1, s8 , s8 , s8 , s8 , xyzw, rgb - -# GL-specific vertex buffer element formats -# A.k.a. GL_FIXED -PIPE_FORMAT_R32_FIXED , plain, 1, 1, h32 , , , , x001, rgb -PIPE_FORMAT_R32G32_FIXED , plain, 1, 1, h32 , h32 , , , xy01, rgb -PIPE_FORMAT_R32G32B32_FIXED , plain, 1, 1, h32 , h32 , h32 , , xyz1, rgb -PIPE_FORMAT_R32G32B32A32_FIXED , plain, 1, 1, h32 , h32 , h32 , h32 , xyzw, rgb - -# D3D9-specific vertex buffer element formats -# See also: -# - http://msdn.microsoft.com/en-us/library/bb172533.aspx -# A.k.a. D3DDECLTYPE_UDEC3 -PIPE_FORMAT_R10G10B10X2_USCALED , plain, 1, 1, u10 , u10 , u10 , x2 , xyz1, rgb -# A.k.a. D3DDECLTYPE_DEC3N -PIPE_FORMAT_R10G10B10X2_SNORM , plain, 1, 1, sn10, sn10, sn10 , x2 , xyz1, rgb - -PIPE_FORMAT_YV12 , other, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv -PIPE_FORMAT_YV16 , other, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv -PIPE_FORMAT_IYUV , other, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv -PIPE_FORMAT_NV12 , other, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv -PIPE_FORMAT_NV21 , other, 1, 1, x8 , x8 , x8 , x8 , xyzw, yuv - -# Usually used to implement IA44 and AI44 formats in video decoding -PIPE_FORMAT_R4A4_UNORM , plain, 1, 1, un4 , un4 , , , y00x, rgb -PIPE_FORMAT_A4R4_UNORM , plain, 1, 1, un4 , un4 , , , x00y, rgb -PIPE_FORMAT_R8A8_UNORM , plain, 1, 1, un8 , un8 , , , x00y, rgb -PIPE_FORMAT_A8R8_UNORM , plain, 1, 1, un8 , un8 , , , y00x, rgb - -# ARB_vertex_type_10_10_10_2_REV -PIPE_FORMAT_R10G10B10A2_USCALED , plain, 1, 1, u10, u10, u10, u2, xyzw, rgb -PIPE_FORMAT_R10G10B10A2_SSCALED , plain, 1, 1, s10, s10, s10, s2, xyzw, rgb -PIPE_FORMAT_R10G10B10A2_SNORM , plain, 1, 1, sn10, sn10, sn10, sn2, xyzw, rgb -PIPE_FORMAT_B10G10R10A2_USCALED , plain, 1, 1, u10, u10, u10, u2, zyxw, rgb -PIPE_FORMAT_B10G10R10A2_SSCALED , plain, 1, 1, s10, s10, s10, s2, zyxw, rgb -PIPE_FORMAT_B10G10R10A2_SNORM , plain, 1, 1, sn10, sn10, sn10, sn2, zyxw, rgb - -PIPE_FORMAT_R8_UINT , plain, 1, 1, up8, , , , x001, rgb -PIPE_FORMAT_R8G8_UINT , plain, 1, 1, up8, up8, , , xy01, rgb -PIPE_FORMAT_R8G8B8_UINT , plain, 1, 1, up8, up8, up8, , xyz1, rgb -PIPE_FORMAT_R8G8B8A8_UINT , plain, 1, 1, up8, up8, up8, up8, xyzw, rgb - -PIPE_FORMAT_R8_SINT , plain, 1, 1, sp8, , , , x001, rgb -PIPE_FORMAT_R8G8_SINT , plain, 1, 1, sp8, sp8, , , xy01, rgb -PIPE_FORMAT_R8G8B8_SINT , plain, 1, 1, sp8, sp8, sp8, , xyz1, rgb -PIPE_FORMAT_R8G8B8A8_SINT , plain, 1, 1, sp8, sp8, sp8, sp8, xyzw, rgb - -PIPE_FORMAT_R16_UINT , plain, 1, 1, up16, , , , x001, rgb -PIPE_FORMAT_R16G16_UINT , plain, 1, 1, up16, up16, , , xy01, rgb -PIPE_FORMAT_R16G16B16_UINT , plain, 1, 1, up16, up16, up16, , xyz1, rgb -PIPE_FORMAT_R16G16B16A16_UINT , plain, 1, 1, up16, up16, up16, up16, xyzw, rgb - -PIPE_FORMAT_R16_SINT , plain, 1, 1, sp16, , , , x001, rgb -PIPE_FORMAT_R16G16_SINT , plain, 1, 1, sp16, sp16, , , xy01, rgb -PIPE_FORMAT_R16G16B16_SINT , plain, 1, 1, sp16, sp16, sp16, , xyz1, rgb -PIPE_FORMAT_R16G16B16A16_SINT , plain, 1, 1, sp16, sp16, sp16, sp16, xyzw, rgb - -PIPE_FORMAT_R32_UINT , plain, 1, 1, up32, , , , x001, rgb -PIPE_FORMAT_R32G32_UINT , plain, 1, 1, up32, up32, , , xy01, rgb -PIPE_FORMAT_R32G32B32_UINT , plain, 1, 1, up32, up32, up32, , xyz1, rgb -PIPE_FORMAT_R32G32B32A32_UINT , plain, 1, 1, up32, up32, up32, up32, xyzw, rgb - -PIPE_FORMAT_R32_SINT , plain, 1, 1, sp32, , , , x001, rgb -PIPE_FORMAT_R32G32_SINT , plain, 1, 1, sp32, sp32, , , xy01, rgb -PIPE_FORMAT_R32G32B32_SINT , plain, 1, 1, sp32, sp32, sp32, , xyz1, rgb -PIPE_FORMAT_R32G32B32A32_SINT , plain, 1, 1, sp32, sp32, sp32, sp32, xyzw, rgb - -PIPE_FORMAT_A8_UINT , plain, 1, 1, up8, , , , 000x, rgb -PIPE_FORMAT_I8_UINT , plain, 1, 1, up8, , , , xxxx, rgb -PIPE_FORMAT_L8_UINT , plain, 1, 1, up8, , , , xxx1, rgb -PIPE_FORMAT_L8A8_UINT , plain, 1, 1, up8, up8, , , xxxy, rgb - -PIPE_FORMAT_A8_SINT , plain, 1, 1, sp8, , , , 000x, rgb -PIPE_FORMAT_I8_SINT , plain, 1, 1, sp8, , , , xxxx, rgb -PIPE_FORMAT_L8_SINT , plain, 1, 1, sp8, , , , xxx1, rgb -PIPE_FORMAT_L8A8_SINT , plain, 1, 1, sp8, sp8, , , xxxy, rgb - -PIPE_FORMAT_A16_UINT , plain, 1, 1, up16, , , , 000x, rgb -PIPE_FORMAT_I16_UINT , plain, 1, 1, up16, , , , xxxx, rgb -PIPE_FORMAT_L16_UINT , plain, 1, 1, up16, , , , xxx1, rgb -PIPE_FORMAT_L16A16_UINT , plain, 1, 1, up16, up16, , , xxxy, rgb - -PIPE_FORMAT_A16_SINT , plain, 1, 1, sp16, , , , 000x, rgb -PIPE_FORMAT_I16_SINT , plain, 1, 1, sp16, , , , xxxx, rgb -PIPE_FORMAT_L16_SINT , plain, 1, 1, sp16, , , , xxx1, rgb -PIPE_FORMAT_L16A16_SINT , plain, 1, 1, sp16, sp16, , , xxxy, rgb - -PIPE_FORMAT_A32_UINT , plain, 1, 1, up32, , , , 000x, rgb -PIPE_FORMAT_I32_UINT , plain, 1, 1, up32, , , , xxxx, rgb -PIPE_FORMAT_L32_UINT , plain, 1, 1, up32, , , , xxx1, rgb -PIPE_FORMAT_L32A32_UINT , plain, 1, 1, up32, up32, , , xxxy, rgb - -PIPE_FORMAT_A32_SINT , plain, 1, 1, sp32, , , , 000x, rgb -PIPE_FORMAT_I32_SINT , plain, 1, 1, sp32, , , , xxxx, rgb -PIPE_FORMAT_L32_SINT , plain, 1, 1, sp32, , , , xxx1, rgb -PIPE_FORMAT_L32A32_SINT , plain, 1, 1, sp32, sp32, , , xxxy, rgb - -PIPE_FORMAT_B10G10R10A2_UINT , plain, 1, 1, up10, up10, up10, up2, zyxw, rgb diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format.h deleted file mode 100644 index 874ea7eb12a..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format.h +++ /dev/null @@ -1,985 +0,0 @@ -/************************************************************************** - * - * Copyright 2009-2010 Vmware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#ifndef U_FORMAT_H -#define U_FORMAT_H - - -#include "pipe/p_format.h" -#include "util/u_debug.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/** - * Describe how to pack/unpack pixels into/from the prescribed format. - * - * XXX: This could be renamed to something like util_format_pack, or broke down - * in flags inside util_format_block that said exactly what we want. - */ -enum util_format_layout { - /** - * Formats with util_format_block::width == util_format_block::height == 1 - * that can be described as an ordinary data structure. - */ - UTIL_FORMAT_LAYOUT_PLAIN = 0, - - /** - * Formats with sub-sampled channels. - * - * This is for formats like YV12 where there is less than one sample per - * pixel. - */ - UTIL_FORMAT_LAYOUT_SUBSAMPLED = 3, - - /** - * S3 Texture Compression formats. - */ - UTIL_FORMAT_LAYOUT_S3TC = 4, - - /** - * Red-Green Texture Compression formats. - */ - UTIL_FORMAT_LAYOUT_RGTC = 5, - - /** - * Ericsson Texture Compression - */ - UTIL_FORMAT_LAYOUT_ETC = 6, - - /** - * Everything else that doesn't fit in any of the above layouts. - */ - UTIL_FORMAT_LAYOUT_OTHER = 7 -}; - - -struct util_format_block -{ - /** Block width in pixels */ - unsigned width; - - /** Block height in pixels */ - unsigned height; - - /** Block size in bits */ - unsigned bits; -}; - - -enum util_format_type { - UTIL_FORMAT_TYPE_VOID = 0, - UTIL_FORMAT_TYPE_UNSIGNED = 1, - UTIL_FORMAT_TYPE_SIGNED = 2, - UTIL_FORMAT_TYPE_FIXED = 3, - UTIL_FORMAT_TYPE_FLOAT = 4 -}; - - -enum util_format_swizzle { - UTIL_FORMAT_SWIZZLE_X = 0, - UTIL_FORMAT_SWIZZLE_Y = 1, - UTIL_FORMAT_SWIZZLE_Z = 2, - UTIL_FORMAT_SWIZZLE_W = 3, - UTIL_FORMAT_SWIZZLE_0 = 4, - UTIL_FORMAT_SWIZZLE_1 = 5, - UTIL_FORMAT_SWIZZLE_NONE = 6, - UTIL_FORMAT_SWIZZLE_MAX = 7 /**< Number of enums counter (must be last) */ -}; - - -enum util_format_colorspace { - UTIL_FORMAT_COLORSPACE_RGB = 0, - UTIL_FORMAT_COLORSPACE_SRGB = 1, - UTIL_FORMAT_COLORSPACE_YUV = 2, - UTIL_FORMAT_COLORSPACE_ZS = 3 -}; - - -struct util_format_channel_description -{ - unsigned type:5; /**< UTIL_FORMAT_TYPE_x */ - unsigned normalized:1; - unsigned pure_integer:1; - unsigned size:9; /**< bits per channel */ -}; - - -struct util_format_description -{ - enum pipe_format format; - - const char *name; - - /** - * Short name, striped of the prefix, lower case. - */ - const char *short_name; - - /** - * Pixel block dimensions. - */ - struct util_format_block block; - - enum util_format_layout layout; - - /** - * The number of channels. - */ - unsigned nr_channels:3; - - /** - * Whether all channels have the same number of (whole) bytes. - */ - unsigned is_array:1; - - /** - * Whether the pixel format can be described as a bitfield structure. - * - * In particular: - * - pixel depth must be 8, 16, or 32 bits; - * - all channels must be unsigned, signed, or void - */ - unsigned is_bitmask:1; - - /** - * Whether channels have mixed types (ignoring UTIL_FORMAT_TYPE_VOID). - */ - unsigned is_mixed:1; - - /** - * Input channel description. - * - * Only valid for UTIL_FORMAT_LAYOUT_PLAIN formats. - */ - struct util_format_channel_description channel[4]; - - /** - * Output channel swizzle. - * - * The order is either: - * - RGBA - * - YUV(A) - * - ZS - * depending on the colorspace. - */ - unsigned char swizzle[4]; - - /** - * Colorspace transformation. - */ - enum util_format_colorspace colorspace; - - /** - * Unpack pixel blocks to R8G8B8A8_UNORM. - * Note: strides are in bytes. - * - * Only defined for non-depth-stencil formats. - */ - void - (*unpack_rgba_8unorm)(uint8_t *dst, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, - unsigned width, unsigned height); - - /** - * Pack pixel blocks from R8G8B8A8_UNORM. - * Note: strides are in bytes. - * - * Only defined for non-depth-stencil formats. - */ - void - (*pack_rgba_8unorm)(uint8_t *dst, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, - unsigned width, unsigned height); - - /** - * Fetch a single pixel (i, j) from a block. - * - * XXX: Only defined for a very few select formats. - */ - void - (*fetch_rgba_8unorm)(uint8_t *dst, - const uint8_t *src, - unsigned i, unsigned j); - - /** - * Unpack pixel blocks to R32G32B32A32_FLOAT. - * Note: strides are in bytes. - * - * Only defined for non-depth-stencil formats. - */ - void - (*unpack_rgba_float)(float *dst, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, - unsigned width, unsigned height); - - /** - * Pack pixel blocks from R32G32B32A32_FLOAT. - * Note: strides are in bytes. - * - * Only defined for non-depth-stencil formats. - */ - void - (*pack_rgba_float)(uint8_t *dst, unsigned dst_stride, - const float *src, unsigned src_stride, - unsigned width, unsigned height); - - /** - * Fetch a single pixel (i, j) from a block. - * - * Only defined for non-depth-stencil and non-integer formats. - */ - void - (*fetch_rgba_float)(float *dst, - const uint8_t *src, - unsigned i, unsigned j); - - /** - * Unpack pixels to Z32_UNORM. - * Note: strides are in bytes. - * - * Only defined for depth formats. - */ - void - (*unpack_z_32unorm)(uint32_t *dst, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, - unsigned width, unsigned height); - - /** - * Pack pixels from Z32_FLOAT. - * Note: strides are in bytes. - * - * Only defined for depth formats. - */ - void - (*pack_z_32unorm)(uint8_t *dst, unsigned dst_stride, - const uint32_t *src, unsigned src_stride, - unsigned width, unsigned height); - - /** - * Unpack pixels to Z32_FLOAT. - * Note: strides are in bytes. - * - * Only defined for depth formats. - */ - void - (*unpack_z_float)(float *dst, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, - unsigned width, unsigned height); - - /** - * Pack pixels from Z32_FLOAT. - * Note: strides are in bytes. - * - * Only defined for depth formats. - */ - void - (*pack_z_float)(uint8_t *dst, unsigned dst_stride, - const float *src, unsigned src_stride, - unsigned width, unsigned height); - - /** - * Unpack pixels to S8_UINT. - * Note: strides are in bytes. - * - * Only defined for stencil formats. - */ - void - (*unpack_s_8uint)(uint8_t *dst, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, - unsigned width, unsigned height); - - /** - * Pack pixels from S8_UINT. - * Note: strides are in bytes. - * - * Only defined for stencil formats. - */ - void - (*pack_s_8uint)(uint8_t *dst, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, - unsigned width, unsigned height); - - /** - * Unpack pixel blocks to R32G32B32A32_UINT. - * Note: strides are in bytes. - * - * Only defined for INT formats. - */ - void - (*unpack_rgba_uint)(unsigned *dst, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, - unsigned width, unsigned height); - - void - (*pack_rgba_uint)(uint8_t *dst, unsigned dst_stride, - const unsigned *src, unsigned src_stride, - unsigned width, unsigned height); - - /** - * Unpack pixel blocks to R32G32B32A32_SINT. - * Note: strides are in bytes. - * - * Only defined for INT formats. - */ - void - (*unpack_rgba_sint)(signed *dst, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, - unsigned width, unsigned height); - - void - (*pack_rgba_sint)(uint8_t *dst, unsigned dst_stride, - const int *src, unsigned src_stride, - unsigned width, unsigned height); - - /** - * Fetch a single pixel (i, j) from a block. - * - * Only defined for unsigned (pure) integer formats. - */ - void - (*fetch_rgba_uint)(uint32_t *dst, - const uint8_t *src, - unsigned i, unsigned j); - - /** - * Fetch a single pixel (i, j) from a block. - * - * Only defined for signed (pure) integer formats. - */ - void - (*fetch_rgba_sint)(int32_t *dst, - const uint8_t *src, - unsigned i, unsigned j); -}; - - -extern const struct util_format_description -util_format_description_table[]; - - -const struct util_format_description * -util_format_description(enum pipe_format format); - - -/* - * Format query functions. - */ - -static INLINE const char * -util_format_name(enum pipe_format format) -{ - const struct util_format_description *desc = util_format_description(format); - - assert(desc); - if (!desc) { - return "PIPE_FORMAT_???"; - } - - return desc->name; -} - -static INLINE const char * -util_format_short_name(enum pipe_format format) -{ - const struct util_format_description *desc = util_format_description(format); - - assert(desc); - if (!desc) { - return "???"; - } - - return desc->short_name; -} - -/** - * Whether this format is plain, see UTIL_FORMAT_LAYOUT_PLAIN for more info. - */ -static INLINE boolean -util_format_is_plain(enum pipe_format format) -{ - const struct util_format_description *desc = util_format_description(format); - - if (!format) { - return FALSE; - } - - return desc->layout == UTIL_FORMAT_LAYOUT_PLAIN ? TRUE : FALSE; -} - -static INLINE boolean -util_format_is_compressed(enum pipe_format format) -{ - const struct util_format_description *desc = util_format_description(format); - - assert(desc); - if (!desc) { - return FALSE; - } - - switch (desc->layout) { - case UTIL_FORMAT_LAYOUT_S3TC: - case UTIL_FORMAT_LAYOUT_RGTC: - /* XXX add other formats in the future */ - return TRUE; - default: - return FALSE; - } -} - -static INLINE boolean -util_format_is_s3tc(enum pipe_format format) -{ - const struct util_format_description *desc = util_format_description(format); - - assert(desc); - if (!desc) { - return FALSE; - } - - return desc->layout == UTIL_FORMAT_LAYOUT_S3TC ? TRUE : FALSE; -} - -static INLINE boolean -util_format_is_srgb(enum pipe_format format) -{ - const struct util_format_description *desc = util_format_description(format); - return desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB; -} - -static INLINE boolean -util_format_has_depth(const struct util_format_description *desc) -{ - return desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS && - desc->swizzle[0] != UTIL_FORMAT_SWIZZLE_NONE; -} - -static INLINE boolean -util_format_has_stencil(const struct util_format_description *desc) -{ - return desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS && - desc->swizzle[1] != UTIL_FORMAT_SWIZZLE_NONE; -} - -static INLINE boolean -util_format_is_depth_or_stencil(enum pipe_format format) -{ - const struct util_format_description *desc = util_format_description(format); - - assert(desc); - if (!desc) { - return FALSE; - } - - return util_format_has_depth(desc) || - util_format_has_stencil(desc); -} - -static INLINE boolean -util_format_is_depth_and_stencil(enum pipe_format format) -{ - const struct util_format_description *desc = util_format_description(format); - - assert(desc); - if (!desc) { - return FALSE; - } - - return util_format_has_depth(desc) && - util_format_has_stencil(desc); -} - - -/** - * Give the RGBA colormask of the channels that can be represented in this - * format. - * - * That is, the channels whose values are preserved. - */ -static INLINE unsigned -util_format_colormask(const struct util_format_description *desc) -{ - unsigned colormask; - unsigned chan; - - switch (desc->colorspace) { - case UTIL_FORMAT_COLORSPACE_RGB: - case UTIL_FORMAT_COLORSPACE_SRGB: - case UTIL_FORMAT_COLORSPACE_YUV: - colormask = 0; - for (chan = 0; chan < 4; ++chan) { - if (desc->swizzle[chan] < 4) { - colormask |= (1 << chan); - } - } - return colormask; - case UTIL_FORMAT_COLORSPACE_ZS: - return 0; - default: - assert(0); - return 0; - } -} - - -boolean -util_format_is_float(enum pipe_format format); - - -boolean -util_format_is_rgb_no_alpha(enum pipe_format format); - - -boolean -util_format_is_luminance(enum pipe_format format); - - -boolean -util_format_is_luminance_alpha(enum pipe_format format); - - -boolean -util_format_is_intensity(enum pipe_format format); - -boolean -util_format_is_pure_integer(enum pipe_format format); - -boolean -util_format_is_pure_sint(enum pipe_format format); - -boolean -util_format_is_pure_uint(enum pipe_format format); - -/** - * Whether the src format can be blitted to destation format with a simple - * memcpy. - */ -boolean -util_is_format_compatible(const struct util_format_description *src_desc, - const struct util_format_description *dst_desc); - -/** - * Whether the format is supported by Gallium for the given bindings. - * This covers S3TC textures and floating-point render targets. - */ -boolean -util_format_is_supported(enum pipe_format format, unsigned bind); - -/** - * Whether this format is a rgab8 variant. - * - * That is, any format that matches the - * - * PIPE_FORMAT_?8?8?8?8_UNORM - */ -static INLINE boolean -util_format_is_rgba8_variant(const struct util_format_description *desc) -{ - unsigned chan; - - if(desc->block.width != 1 || - desc->block.height != 1 || - desc->block.bits != 32) - return FALSE; - - for(chan = 0; chan < 4; ++chan) { - if(desc->channel[chan].type != UTIL_FORMAT_TYPE_UNSIGNED && - desc->channel[chan].type != UTIL_FORMAT_TYPE_VOID) - return FALSE; - if(desc->channel[chan].size != 8) - return FALSE; - } - - return TRUE; -} - - -/** - * Return total bits needed for the pixel format per block. - */ -static INLINE uint -util_format_get_blocksizebits(enum pipe_format format) -{ - const struct util_format_description *desc = util_format_description(format); - - assert(desc); - if (!desc) { - return 0; - } - - return desc->block.bits; -} - -/** - * Return bytes per block (not pixel) for the given format. - */ -static INLINE uint -util_format_get_blocksize(enum pipe_format format) -{ - uint bits = util_format_get_blocksizebits(format); - - assert(bits % 8 == 0); - - return bits / 8; -} - -static INLINE uint -util_format_get_blockwidth(enum pipe_format format) -{ - const struct util_format_description *desc = util_format_description(format); - - assert(desc); - if (!desc) { - return 1; - } - - return desc->block.width; -} - -static INLINE uint -util_format_get_blockheight(enum pipe_format format) -{ - const struct util_format_description *desc = util_format_description(format); - - assert(desc); - if (!desc) { - return 1; - } - - return desc->block.height; -} - -static INLINE unsigned -util_format_get_nblocksx(enum pipe_format format, - unsigned x) -{ - unsigned blockwidth = util_format_get_blockwidth(format); - return (x + blockwidth - 1) / blockwidth; -} - -static INLINE unsigned -util_format_get_nblocksy(enum pipe_format format, - unsigned y) -{ - unsigned blockheight = util_format_get_blockheight(format); - return (y + blockheight - 1) / blockheight; -} - -static INLINE unsigned -util_format_get_nblocks(enum pipe_format format, - unsigned width, - unsigned height) -{ - return util_format_get_nblocksx(format, width) * util_format_get_nblocksy(format, height); -} - -static INLINE size_t -util_format_get_stride(enum pipe_format format, - unsigned width) -{ - return util_format_get_nblocksx(format, width) * util_format_get_blocksize(format); -} - -static INLINE size_t -util_format_get_2d_size(enum pipe_format format, - size_t stride, - unsigned height) -{ - return util_format_get_nblocksy(format, height) * stride; -} - -static INLINE uint -util_format_get_component_bits(enum pipe_format format, - enum util_format_colorspace colorspace, - uint component) -{ - const struct util_format_description *desc = util_format_description(format); - enum util_format_colorspace desc_colorspace; - - assert(format); - if (!format) { - return 0; - } - - assert(component < 4); - - /* Treat RGB and SRGB as equivalent. */ - if (colorspace == UTIL_FORMAT_COLORSPACE_SRGB) { - colorspace = UTIL_FORMAT_COLORSPACE_RGB; - } - if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) { - desc_colorspace = UTIL_FORMAT_COLORSPACE_RGB; - } else { - desc_colorspace = desc->colorspace; - } - - if (desc_colorspace != colorspace) { - return 0; - } - - switch (desc->swizzle[component]) { - case UTIL_FORMAT_SWIZZLE_X: - return desc->channel[0].size; - case UTIL_FORMAT_SWIZZLE_Y: - return desc->channel[1].size; - case UTIL_FORMAT_SWIZZLE_Z: - return desc->channel[2].size; - case UTIL_FORMAT_SWIZZLE_W: - return desc->channel[3].size; - default: - return 0; - } -} - -static INLINE boolean -util_format_has_alpha(enum pipe_format format) -{ - const struct util_format_description *desc = util_format_description(format); - - assert(format); - if (!format) { - return FALSE; - } - - switch (desc->colorspace) { - case UTIL_FORMAT_COLORSPACE_RGB: - case UTIL_FORMAT_COLORSPACE_SRGB: - return desc->swizzle[3] != UTIL_FORMAT_SWIZZLE_1; - case UTIL_FORMAT_COLORSPACE_YUV: - return FALSE; - case UTIL_FORMAT_COLORSPACE_ZS: - return FALSE; - default: - assert(0); - return FALSE; - } -} - -/** - * Given a linear RGB colorspace format, return the corresponding SRGB - * format, or PIPE_FORMAT_NONE if none. - */ -static INLINE enum pipe_format -util_format_srgb(enum pipe_format format) -{ - switch (format) { - case PIPE_FORMAT_L8_UNORM: - return PIPE_FORMAT_L8_SRGB; - case PIPE_FORMAT_L8A8_UNORM: - return PIPE_FORMAT_L8A8_SRGB; - case PIPE_FORMAT_R8G8B8_UNORM: - return PIPE_FORMAT_R8G8B8_SRGB; - case PIPE_FORMAT_A8B8G8R8_UNORM: - return PIPE_FORMAT_A8B8G8R8_SRGB; - case PIPE_FORMAT_X8B8G8R8_UNORM: - return PIPE_FORMAT_X8B8G8R8_SRGB; - case PIPE_FORMAT_B8G8R8A8_UNORM: - return PIPE_FORMAT_B8G8R8A8_SRGB; - case PIPE_FORMAT_B8G8R8X8_UNORM: - return PIPE_FORMAT_B8G8R8X8_SRGB; - case PIPE_FORMAT_A8R8G8B8_UNORM: - return PIPE_FORMAT_A8R8G8B8_SRGB; - case PIPE_FORMAT_X8R8G8B8_UNORM: - return PIPE_FORMAT_X8R8G8B8_SRGB; - case PIPE_FORMAT_DXT1_RGB: - return PIPE_FORMAT_DXT1_SRGB; - case PIPE_FORMAT_DXT1_RGBA: - return PIPE_FORMAT_DXT1_SRGBA; - case PIPE_FORMAT_DXT3_RGBA: - return PIPE_FORMAT_DXT3_SRGBA; - case PIPE_FORMAT_DXT5_RGBA: - return PIPE_FORMAT_DXT5_SRGBA; - default: - return PIPE_FORMAT_NONE; - } -} - -/** - * Given an sRGB format, return the corresponding linear colorspace format. - * For non sRGB formats, return the format unchanged. - */ -static INLINE enum pipe_format -util_format_linear(enum pipe_format format) -{ - switch (format) { - case PIPE_FORMAT_L8_SRGB: - return PIPE_FORMAT_L8_UNORM; - case PIPE_FORMAT_L8A8_SRGB: - return PIPE_FORMAT_L8A8_UNORM; - case PIPE_FORMAT_R8G8B8_SRGB: - return PIPE_FORMAT_R8G8B8_UNORM; - case PIPE_FORMAT_A8B8G8R8_SRGB: - return PIPE_FORMAT_A8B8G8R8_UNORM; - case PIPE_FORMAT_X8B8G8R8_SRGB: - return PIPE_FORMAT_X8B8G8R8_UNORM; - case PIPE_FORMAT_B8G8R8A8_SRGB: - return PIPE_FORMAT_B8G8R8A8_UNORM; - case PIPE_FORMAT_B8G8R8X8_SRGB: - return PIPE_FORMAT_B8G8R8X8_UNORM; - case PIPE_FORMAT_A8R8G8B8_SRGB: - return PIPE_FORMAT_A8R8G8B8_UNORM; - case PIPE_FORMAT_X8R8G8B8_SRGB: - return PIPE_FORMAT_X8R8G8B8_UNORM; - case PIPE_FORMAT_DXT1_SRGB: - return PIPE_FORMAT_DXT1_RGB; - case PIPE_FORMAT_DXT1_SRGBA: - return PIPE_FORMAT_DXT1_RGBA; - case PIPE_FORMAT_DXT3_SRGBA: - return PIPE_FORMAT_DXT3_RGBA; - case PIPE_FORMAT_DXT5_SRGBA: - return PIPE_FORMAT_DXT5_RGBA; - default: - return format; - } -} - -/** - * Return the number of components stored. - * Formats with block size != 1x1 will always have 1 component (the block). - */ -static INLINE unsigned -util_format_get_nr_components(enum pipe_format format) -{ - const struct util_format_description *desc = util_format_description(format); - return desc->nr_channels; -} - -/** - * Return the index of the first non-void channel - * -1 if no non-void channels - */ -static INLINE int -util_format_get_first_non_void_channel(enum pipe_format format) -{ - const struct util_format_description *desc = util_format_description(format); - int i; - - for (i = 0; i < 4; i++) - if (desc->channel[i].type != UTIL_FORMAT_TYPE_VOID) - break; - - if (i == 4) - return -1; - - return i; -} - -/* - * Format access functions. - */ - -void -util_format_read_4f(enum pipe_format format, - float *dst, unsigned dst_stride, - const void *src, unsigned src_stride, - unsigned x, unsigned y, unsigned w, unsigned h); - -void -util_format_write_4f(enum pipe_format format, - const float *src, unsigned src_stride, - void *dst, unsigned dst_stride, - unsigned x, unsigned y, unsigned w, unsigned h); - -void -util_format_read_4ub(enum pipe_format format, - uint8_t *dst, unsigned dst_stride, - const void *src, unsigned src_stride, - unsigned x, unsigned y, unsigned w, unsigned h); - -void -util_format_write_4ub(enum pipe_format format, - const uint8_t *src, unsigned src_stride, - void *dst, unsigned dst_stride, - unsigned x, unsigned y, unsigned w, unsigned h); - -void -util_format_read_4ui(enum pipe_format format, - unsigned *dst, unsigned dst_stride, - const void *src, unsigned src_stride, - unsigned x, unsigned y, unsigned w, unsigned h); - -void -util_format_write_4ui(enum pipe_format format, - const unsigned int *src, unsigned src_stride, - void *dst, unsigned dst_stride, - unsigned x, unsigned y, unsigned w, unsigned h); - -void -util_format_read_4i(enum pipe_format format, - int *dst, unsigned dst_stride, - const void *src, unsigned src_stride, - unsigned x, unsigned y, unsigned w, unsigned h); - -void -util_format_write_4i(enum pipe_format format, - const int *src, unsigned src_stride, - void *dst, unsigned dst_stride, - unsigned x, unsigned y, unsigned w, unsigned h); - -/* - * Generic format conversion; - */ - -boolean -util_format_fits_8unorm(const struct util_format_description *format_desc); - -void -util_format_translate(enum pipe_format dst_format, - void *dst, unsigned dst_stride, - unsigned dst_x, unsigned dst_y, - enum pipe_format src_format, - const void *src, unsigned src_stride, - unsigned src_x, unsigned src_y, - unsigned width, unsigned height); - -/* - * Swizzle operations. - */ - -/* Compose two sets of swizzles. - * If V is a 4D vector and the function parameters represent functions that - * swizzle vector components, this holds: - * swz2(swz1(V)) = dst(V) - */ -void util_format_compose_swizzles(const unsigned char swz1[4], - const unsigned char swz2[4], - unsigned char dst[4]); - -void util_format_swizzle_4f(float *dst, const float *src, - const unsigned char swz[4]); - -void util_format_unswizzle_4f(float *dst, const float *src, - const unsigned char swz[4]); - -#ifdef __cplusplus -} // extern "C" { -#endif - -#endif /* ! U_FORMAT_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_etc.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_etc.c deleted file mode 100644 index 7500e1ed650..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_etc.c +++ /dev/null @@ -1,104 +0,0 @@ -#include "pipe/p_compiler.h" -#include "util/u_debug.h" -#include "util/u_math.h" -#include "u_format_etc.h" - -/* define etc1_parse_block and etc. */ -#define UINT8_TYPE uint8_t -#define TAG(x) x -#include "../../../mesa/main/texcompress_etc_tmp.h" -#undef TAG -#undef UINT8_TYPE - -void -util_format_etc1_rgb8_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - const unsigned bw = 4, bh = 4, bs = 8, comps = 4; - struct etc1_block block; - unsigned x, y, i, j; - - for (y = 0; y < height; y += bh) { - const uint8_t *src = src_row; - - for (x = 0; x < width; x+= bw) { - etc1_parse_block(&block, src); - - for (j = 0; j < bh; j++) { - uint8_t *dst = dst_row + (y + j) * dst_stride + x * comps; - for (i = 0; i < bw; i++) { - etc1_fetch_texel(&block, i, j, dst); - dst[3] = 255; - dst += comps; - } - } - - src += bs; - } - - src_row += src_stride; - } -} - -void -util_format_etc1_rgb8_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - assert(0); -} - -void -util_format_etc1_rgb8_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - const unsigned bw = 4, bh = 4, bs = 8, comps = 4; - struct etc1_block block; - unsigned x, y, i, j; - - for (y = 0; y < height; y += bh) { - const uint8_t *src = src_row; - - for (x = 0; x < width; x+= bw) { - etc1_parse_block(&block, src); - - for (j = 0; j < bh; j++) { - float *dst = dst_row + (y + j) * dst_stride / sizeof(*dst_row) + x * comps; - uint8_t tmp[3]; - - for (i = 0; i < bw; i++) { - etc1_fetch_texel(&block, i, j, tmp); - dst[0] = ubyte_to_float(tmp[0]); - dst[1] = ubyte_to_float(tmp[1]); - dst[2] = ubyte_to_float(tmp[2]); - dst[3] = 1.0f; - dst += comps; - } - } - - src += bs; - } - - src_row += src_stride; - } -} - -void -util_format_etc1_rgb8_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - assert(0); -} - -void -util_format_etc1_rgb8_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - const unsigned bw = 4, bh = 4; - struct etc1_block block; - uint8_t tmp[3]; - - assert(i < bw && j < bh); - - etc1_parse_block(&block, src); - etc1_fetch_texel(&block, i, j, tmp); - - dst[0] = ubyte_to_float(tmp[0]); - dst[1] = ubyte_to_float(tmp[1]); - dst[2] = ubyte_to_float(tmp[2]); - dst[3] = 1.0f; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_etc.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_etc.h deleted file mode 100644 index 30c3dcb920d..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_etc.h +++ /dev/null @@ -1,46 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 LunarG, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - **************************************************************************/ - -#ifndef U_FORMAT_ETC1_H_ -#define U_FORMAT_ETC1_H_ - -void -util_format_etc1_rgb8_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_etc1_rgb8_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_etc1_rgb8_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_etc1_rgb8_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_etc1_rgb8_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j); - -#endif /* U_FORMAT_ETC1_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_latc.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_latc.c deleted file mode 100644 index 20feb241ee0..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_latc.c +++ /dev/null @@ -1,331 +0,0 @@ -/************************************************************************** - * - * Copyright (C) 2011 Red Hat Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include -#include "u_math.h" -#include "u_format.h" -#include "u_format_rgtc.h" -#include "u_format_latc.h" - -static void u_format_unsigned_encode_rgtc_ubyte(uint8_t *blkaddr, uint8_t srccolors[4][4], - int numxpixels, int numypixels); - -static void u_format_unsigned_fetch_texel_rgtc(unsigned srcRowStride, const uint8_t *pixdata, - unsigned i, unsigned j, uint8_t *value, unsigned comps); - -static void u_format_signed_encode_rgtc_ubyte(int8_t *blkaddr, int8_t srccolors[4][4], - int numxpixels, int numypixels); - -static void u_format_signed_fetch_texel_rgtc(unsigned srcRowStride, const int8_t *pixdata, - unsigned i, unsigned j, int8_t *value, unsigned comps); - -void -util_format_latc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) -{ - /* Fix warnings here: */ - (void) u_format_unsigned_encode_rgtc_ubyte; - (void) u_format_signed_encode_rgtc_ubyte; - - u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 1); - dst[1] = dst[0]; - dst[2] = dst[0]; - dst[3] = 255; -} - -void -util_format_latc1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_rgtc1_unorm_unpack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_latc1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, - unsigned src_stride, unsigned width, unsigned height) -{ - util_format_rgtc1_unorm_pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_latc1_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y, i, j; - int block_size = 8; - - for(y = 0; y < height; y += 4) { - const uint8_t *src = src_row; - for(x = 0; x < width; x += 4) { - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4; - uint8_t tmp_r; - u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 1); - dst[0] = - dst[1] = - dst[2] = ubyte_to_float(tmp_r); - dst[3] = 1.0; - } - } - src += block_size; - } - src_row += src_stride; - } -} - -void -util_format_latc1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_rgtc1_unorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_latc1_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t tmp_r; - - u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 1); - dst[0] = - dst[1] = - dst[2] = ubyte_to_float(tmp_r); - dst[3] = 1.0; -} - -void -util_format_latc1_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) -{ - fprintf(stderr,"%s\n", __func__); -} - -void -util_format_latc1_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - fprintf(stderr,"%s\n", __func__); -} - -void -util_format_latc1_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - fprintf(stderr,"%s\n", __func__); -} - -void -util_format_latc1_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_rgtc1_snorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_latc1_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y, i, j; - int block_size = 8; - - for(y = 0; y < height; y += 4) { - const int8_t *src = (int8_t *)src_row; - for(x = 0; x < width; x += 4) { - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4; - int8_t tmp_r; - u_format_signed_fetch_texel_rgtc(0, src, i, j, &tmp_r, 1); - dst[0] = - dst[1] = - dst[2] = byte_to_float_tex(tmp_r); - dst[3] = 1.0; - } - } - src += block_size; - } - src_row += src_stride; - } -} - -void -util_format_latc1_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - int8_t tmp_r; - - u_format_signed_fetch_texel_rgtc(0, (int8_t *)src, i, j, &tmp_r, 1); - dst[0] = - dst[1] = - dst[2] = byte_to_float_tex(tmp_r); - dst[3] = 1.0; -} - - -void -util_format_latc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) -{ - u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 2); - dst[1] = dst[0]; - dst[2] = dst[0]; - u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, dst + 3, 2); -} - -void -util_format_latc2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_rgtc2_unorm_unpack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_latc2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_rgtc2_unorm_pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_latc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_rxtc2_unorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height, 3); -} - -void -util_format_latc2_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y, i, j; - int block_size = 16; - - for(y = 0; y < height; y += 4) { - const uint8_t *src = src_row; - for(x = 0; x < width; x += 4) { - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4; - uint8_t tmp_r, tmp_g; - u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 2); - u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, &tmp_g, 2); - dst[0] = - dst[1] = - dst[2] = ubyte_to_float(tmp_r); - dst[3] = ubyte_to_float(tmp_g); - } - } - src += block_size; - } - src_row += src_stride; - } -} - -void -util_format_latc2_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t tmp_r, tmp_g; - - u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 2); - u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, &tmp_g, 2); - dst[0] = - dst[1] = - dst[2] = ubyte_to_float(tmp_r); - dst[3] = ubyte_to_float(tmp_g); -} - - -void -util_format_latc2_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) -{ - fprintf(stderr,"%s\n", __func__); -} - -void -util_format_latc2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - fprintf(stderr,"%s\n", __func__); -} - -void -util_format_latc2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - fprintf(stderr,"%s\n", __func__); -} - -void -util_format_latc2_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y, i, j; - int block_size = 16; - - for(y = 0; y < height; y += 4) { - const int8_t *src = (int8_t *)src_row; - for(x = 0; x < width; x += 4) { - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4; - int8_t tmp_r, tmp_g; - u_format_signed_fetch_texel_rgtc(0, src, i, j, &tmp_r, 2); - u_format_signed_fetch_texel_rgtc(0, src + 8, i, j, &tmp_g, 2); - dst[0] = - dst[1] = - dst[2] = byte_to_float_tex(tmp_r); - dst[3] = byte_to_float_tex(tmp_g); - } - } - src += block_size; - } - src_row += src_stride; - } -} - -void -util_format_latc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_rxtc2_snorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height, 3); -} - -void -util_format_latc2_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - int8_t tmp_r, tmp_g; - - u_format_signed_fetch_texel_rgtc(0, (int8_t *)src, i, j, &tmp_r, 2); - u_format_signed_fetch_texel_rgtc(0, (int8_t *)src + 8, i, j, &tmp_g, 2); - dst[0] = - dst[1] = - dst[2] = byte_to_float_tex(tmp_r); - dst[3] = byte_to_float_tex(tmp_g); -} - - -#define TAG(x) u_format_unsigned_##x -#define TYPE uint8_t -#define T_MIN 0 -#define T_MAX 255 - -#include "../../../mesa/main/texcompress_rgtc_tmp.h" - -#undef TYPE -#undef TAG -#undef T_MIN -#undef T_MAX - - -#define TAG(x) u_format_signed_##x -#define TYPE int8_t -#define T_MIN (int8_t)-128 -#define T_MAX (int8_t)127 - -#include "../../../mesa/main/texcompress_rgtc_tmp.h" - -#undef TYPE -#undef TAG -#undef T_MIN -#undef T_MAX diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_latc.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_latc.h deleted file mode 100644 index 1f08887533d..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_latc.h +++ /dev/null @@ -1,108 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Red Hat Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - **************************************************************************/ - -#ifndef U_FORMAT_LATC_H_ -#define U_FORMAT_LATC_H_ - -void -util_format_latc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_latc1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_latc1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_latc1_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_latc1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_latc1_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j); - - - -void -util_format_latc1_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_latc1_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_latc1_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_latc1_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_latc1_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_latc1_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j); - - -void -util_format_latc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_latc2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_latc2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_latc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_latc2_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_latc2_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j); - - -void -util_format_latc2_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_latc2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_latc2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_latc2_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_latc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_latc2_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j); - - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_other.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_other.c deleted file mode 100644 index c23f4ee4ac5..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_other.c +++ /dev/null @@ -1,472 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - **************************************************************************/ - - -#include "u_math.h" -#include "u_format_other.h" -#include "u_format_rgb9e5.h" -#include "u_format_r11g11b10f.h" - - -void -util_format_r9g9b9e5_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb9e5_to_float3(value, dst); - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_r9g9b9e5_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = float3_to_rgb9e5(src); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -void -util_format_r9g9b9e5_float_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb9e5_to_float3(value, dst); - dst[3] = 1; /* a */ -} - - -void -util_format_r9g9b9e5_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - float p[3]; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - rgb9e5_to_float3(value, p); - dst[0] = float_to_ubyte(p[0]); /* r */ - dst[1] = float_to_ubyte(p[1]); /* g */ - dst[2] = float_to_ubyte(p[2]); /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - - -void -util_format_r9g9b9e5_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - float p[3]; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value; - p[0] = ubyte_to_float(src[0]); - p[1] = ubyte_to_float(src[1]); - p[2] = ubyte_to_float(src[2]); - value = float3_to_rgb9e5(p); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - - -void -util_format_r11g11b10_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r11g11b10f_to_float3(value, dst); - dst[3] = 1; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_r11g11b10_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value = float3_to_r11g11b10f(src); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - -void -util_format_r11g11b10_float_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j) -{ - uint32_t value = *(const uint32_t *)src; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r11g11b10f_to_float3(value, dst); - dst[3] = 1; /* a */ -} - - -void -util_format_r11g11b10_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - float p[3]; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row; - for(x = 0; x < width; x += 1) { - uint32_t value = *(const uint32_t *)src; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - r11g11b10f_to_float3(value, p); - dst[0] = float_to_ubyte(p[0]); /* r */ - dst[1] = float_to_ubyte(p[1]); /* g */ - dst[2] = float_to_ubyte(p[2]); /* b */ - dst[3] = 255; /* a */ - src += 4; - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - - -void -util_format_r11g11b10_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - float p[3]; - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 1) { - uint32_t value; - p[0] = ubyte_to_float(src[0]); - p[1] = ubyte_to_float(src[1]); - p[2] = ubyte_to_float(src[2]); - value = float3_to_r11g11b10f(p); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *(uint32_t *)dst = value; - src += 4; - dst += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - - -void -util_format_r1_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - -} - - -void -util_format_r1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - -} - - -void -util_format_r1_unorm_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j) -{ - -} - - -void -util_format_r1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - -} - - -void -util_format_r1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ -} - - -/* - * PIPE_FORMAT_R8G8Bx_SNORM - * - * A.k.a. D3DFMT_CxV8U8 - */ - -static uint8_t -r8g8bx_derive(int16_t r, int16_t g) -{ - /* Derive blue from red and green components. - * Apparently, we must always use integers to perform calculations, - * otherwise the results won't match D3D's CxV8U8 definition. - */ - return (uint8_t)sqrtf(0x7f * 0x7f - r * r - g * g) * 0xff / 0x7f; -} - -void -util_format_r8g8bx_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - - for(y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint16_t *src = (const uint16_t *)src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *src++; - int16_t r, g; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - r = ((int16_t)(value << 8)) >> 8; - g = ((int16_t)(value << 0)) >> 8; - - dst[0] = (float)(r * (1.0f/0x7f)); /* r */ - dst[1] = (float)(g * (1.0f/0x7f)); /* g */ - dst[2] = r8g8bx_derive(r, g) * (1.0f/0xff); /* b */ - dst[3] = 1.0f; /* a */ - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - - -void -util_format_r8g8bx_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint16_t *src = (const uint16_t *)src_row; - for(x = 0; x < width; x += 1) { - uint16_t value = *src++; - int16_t r, g; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - r = ((int16_t)(value << 8)) >> 8; - g = ((int16_t)(value << 0)) >> 8; - - dst[0] = (uint8_t)(((uint16_t)MAX2(r, 0)) * 0xff / 0x7f); /* r */ - dst[1] = (uint8_t)(((uint16_t)MAX2(g, 0)) * 0xff / 0x7f); /* g */ - dst[2] = r8g8bx_derive(r, g); /* b */ - dst[3] = 255; /* a */ - dst += 4; - } - src_row += src_stride; - dst_row += dst_stride/sizeof(*dst_row); - } -} - - -void -util_format_r8g8bx_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; y += 1) { - const float *src = src_row; - uint16_t *dst = (uint16_t *)dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - - value |= (uint16_t)(((int8_t)(CLAMP(src[0], -1, 1) * 0x7f)) & 0xff) ; - value |= (uint16_t)((((int8_t)(CLAMP(src[1], -1, 1) * 0x7f)) & 0xff) << 8) ; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - *dst++ = value; - - src += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - - -void -util_format_r8g8bx_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - - for(y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint16_t *dst = (uint16_t *)dst_row; - for(x = 0; x < width; x += 1) { - uint16_t value = 0; - - value |= src[0] >> 1; - value |= (src[1] >> 1) << 8; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - *dst++ = value; - - src += 4; - } - dst_row += dst_stride; - src_row += src_stride/sizeof(*src_row); - } -} - - -void -util_format_r8g8bx_snorm_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j) -{ - uint16_t value = *(const uint16_t *)src; - int16_t r, g; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - r = ((int16_t)(value << 8)) >> 8; - g = ((int16_t)(value << 0)) >> 8; - - dst[0] = r * (1.0f/0x7f); /* r */ - dst[1] = g * (1.0f/0x7f); /* g */ - dst[2] = r8g8bx_derive(r, g) * (1.0f/0xff); /* b */ - dst[3] = 1.0f; /* a */ -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_other.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_other.h deleted file mode 100644 index 2f6a908bbe8..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_other.h +++ /dev/null @@ -1,134 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - **************************************************************************/ - - -#ifndef U_FORMAT_OTHER_H_ -#define U_FORMAT_OTHER_H_ - - -#include "pipe/p_compiler.h" - - -void -util_format_r9g9b9e5_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_r9g9b9e5_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_r9g9b9e5_float_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j); - -void -util_format_r9g9b9e5_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_r9g9b9e5_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - - -void -util_format_r11g11b10_float_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_r11g11b10_float_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_r11g11b10_float_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j); - -void -util_format_r11g11b10_float_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_r11g11b10_float_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - - -void -util_format_r1_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_r1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_r1_unorm_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j); - -void -util_format_r1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_r1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_r8g8bx_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_r8g8bx_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_r8g8bx_snorm_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j); - -void -util_format_r8g8bx_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_r8g8bx_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -#endif /* U_FORMAT_OTHER_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_pack.py b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_pack.py deleted file mode 100644 index 0b3a890d591..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_pack.py +++ /dev/null @@ -1,725 +0,0 @@ -#!/usr/bin/env python - -''' -/************************************************************************** - * - * Copyright 2009-2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Pixel format packing and unpacking functions. - * - * @author Jose Fonseca - */ -''' - - -from u_format_parse import * - - -def generate_format_type(format): - '''Generate a structure that describes the format.''' - - assert format.layout == PLAIN - - print 'union util_format_%s {' % format.short_name() - - if format.block_size() in (8, 16, 32, 64): - print ' uint%u_t value;' % (format.block_size(),) - - use_bitfields = False - for channel in format.channels: - if channel.size % 8 or not is_pot(channel.size): - use_bitfields = True - - print ' struct {' - for channel in format.channels: - if use_bitfields: - if channel.type == VOID: - if channel.size: - print ' unsigned %s:%u;' % (channel.name, channel.size) - elif channel.type == UNSIGNED: - print ' unsigned %s:%u;' % (channel.name, channel.size) - elif channel.type in (SIGNED, FIXED): - print ' int %s:%u;' % (channel.name, channel.size) - elif channel.type == FLOAT: - if channel.size == 64: - print ' double %s;' % (channel.name) - elif channel.size == 32: - print ' float %s;' % (channel.name) - else: - print ' unsigned %s:%u;' % (channel.name, channel.size) - else: - assert 0 - else: - assert channel.size % 8 == 0 and is_pot(channel.size) - if channel.type == VOID: - if channel.size: - print ' uint%u_t %s;' % (channel.size, channel.name) - elif channel.type == UNSIGNED: - print ' uint%u_t %s;' % (channel.size, channel.name) - elif channel.type in (SIGNED, FIXED): - print ' int%u_t %s;' % (channel.size, channel.name) - elif channel.type == FLOAT: - if channel.size == 64: - print ' double %s;' % (channel.name) - elif channel.size == 32: - print ' float %s;' % (channel.name) - elif channel.size == 16: - print ' uint16_t %s;' % (channel.name) - else: - assert 0 - else: - assert 0 - print ' } chan;' - print '};' - print - - -def bswap_format(format): - '''Generate a structure that describes the format.''' - - if format.is_bitmask() and not format.is_array() and format.block_size() > 8: - print '#ifdef PIPE_ARCH_BIG_ENDIAN' - print ' pixel.value = util_bswap%u(pixel.value);' % format.block_size() - print '#endif' - - -def is_format_supported(format): - '''Determines whether we actually have the plumbing necessary to generate the - to read/write to/from this format.''' - - # FIXME: Ideally we would support any format combination here. - - if format.layout != PLAIN: - return False - - for i in range(4): - channel = format.channels[i] - if channel.type not in (VOID, UNSIGNED, SIGNED, FLOAT, FIXED): - return False - if channel.type == FLOAT and channel.size not in (16, 32, 64): - return False - - return True - -def is_format_pure_unsigned(format): - for i in range(4): - channel = format.channels[i] - if channel.type not in (VOID, UNSIGNED): - return False - if channel.type == UNSIGNED and channel.pure == False: - return False - - return True - - -def is_format_pure_signed(format): - for i in range(4): - channel = format.channels[i] - if channel.type not in (VOID, SIGNED): - return False - if channel.type == SIGNED and channel.pure == False: - return False - - return True - -def native_type(format): - '''Get the native appropriate for a format.''' - - if format.name == 'PIPE_FORMAT_R11G11B10_FLOAT': - return 'uint32_t' - if format.name == 'PIPE_FORMAT_R9G9B9E5_FLOAT': - return 'uint32_t' - - if format.layout == PLAIN: - if not format.is_array(): - # For arithmetic pixel formats return the integer type that matches the whole pixel - return 'uint%u_t' % format.block_size() - else: - # For array pixel formats return the integer type that matches the color channel - channel = format.channels[0] - if channel.type in (UNSIGNED, VOID): - return 'uint%u_t' % channel.size - elif channel.type in (SIGNED, FIXED): - return 'int%u_t' % channel.size - elif channel.type == FLOAT: - if channel.size == 16: - return 'uint16_t' - elif channel.size == 32: - return 'float' - elif channel.size == 64: - return 'double' - else: - assert False - else: - assert False - else: - assert False - - -def intermediate_native_type(bits, sign): - '''Find a native type adequate to hold intermediate results of the request bit size.''' - - bytes = 4 # don't use anything smaller than 32bits - while bytes * 8 < bits: - bytes *= 2 - bits = bytes*8 - - if sign: - return 'int%u_t' % bits - else: - return 'uint%u_t' % bits - - -def get_one_shift(type): - '''Get the number of the bit that matches unity for this type.''' - if type.type == 'FLOAT': - assert False - if not type.norm: - return 0 - if type.type == UNSIGNED: - return type.size - if type.type == SIGNED: - return type.size - 1 - if type.type == FIXED: - return type.size / 2 - assert False - - -def value_to_native(type, value): - '''Get the value of unity for this type.''' - if type.type == FLOAT: - return value - if type.type == FIXED: - return int(value * (1 << (type.size/2))) - if not type.norm: - return int(value) - if type.type == UNSIGNED: - return int(value * ((1 << type.size) - 1)) - if type.type == SIGNED: - return int(value * ((1 << (type.size - 1)) - 1)) - assert False - - -def native_to_constant(type, value): - '''Get the value of unity for this type.''' - if type.type == FLOAT: - if type.size <= 32: - return "%ff" % value - else: - return "%ff" % value - else: - return str(int(value)) - - -def get_one(type): - '''Get the value of unity for this type.''' - return value_to_native(type, 1) - - -def clamp_expr(src_channel, dst_channel, dst_native_type, value): - '''Generate the expression to clamp the value in the source type to the - destination type range.''' - - if src_channel == dst_channel: - return value - - src_min = src_channel.min() - src_max = src_channel.max() - dst_min = dst_channel.min() - dst_max = dst_channel.max() - - # Translate the destination range to the src native value - dst_min_native = value_to_native(src_channel, dst_min) - dst_max_native = value_to_native(src_channel, dst_max) - - if src_min < dst_min and src_max > dst_max: - return 'CLAMP(%s, %s, %s)' % (value, dst_min_native, dst_max_native) - - if src_max > dst_max: - return 'MIN2(%s, %s)' % (value, dst_max_native) - - if src_min < dst_min: - return 'MAX2(%s, %s)' % (value, dst_min_native) - - return value - - -def conversion_expr(src_channel, - dst_channel, dst_native_type, - value, - clamp=True, - src_colorspace = RGB, - dst_colorspace = RGB): - '''Generate the expression to convert a value between two types.''' - - if src_colorspace != dst_colorspace: - if src_colorspace == SRGB: - assert src_channel.type == UNSIGNED - assert src_channel.norm - assert src_channel.size == 8 - assert dst_colorspace == RGB - if dst_channel.type == FLOAT: - return 'util_format_srgb_8unorm_to_linear_float(%s)' % value - else: - assert dst_channel.type == UNSIGNED - assert dst_channel.norm - assert dst_channel.size == 8 - return 'util_format_srgb_to_linear_8unorm(%s)' % value - elif dst_colorspace == SRGB: - assert dst_channel.type == UNSIGNED - assert dst_channel.norm - assert dst_channel.size == 8 - assert src_colorspace == RGB - if src_channel.type == FLOAT: - return 'util_format_linear_float_to_srgb_8unorm(%s)' % value - else: - assert src_channel.type == UNSIGNED - assert src_channel.norm - assert src_channel.size == 8 - return 'util_format_linear_to_srgb_8unorm(%s)' % value - elif src_colorspace == ZS: - pass - elif dst_colorspace == ZS: - pass - else: - assert 0 - - if src_channel == dst_channel: - return value - - src_type = src_channel.type - src_size = src_channel.size - src_norm = src_channel.norm - src_pure = src_channel.pure - - # Promote half to float - if src_type == FLOAT and src_size == 16: - value = 'util_half_to_float(%s)' % value - src_size = 32 - - # Special case for float <-> ubytes for more accurate results - # Done before clamping since these functions already take care of that - if src_type == UNSIGNED and src_norm and src_size == 8 and dst_channel.type == FLOAT and dst_channel.size == 32: - return 'ubyte_to_float(%s)' % value - if src_type == FLOAT and src_size == 32 and dst_channel.type == UNSIGNED and dst_channel.norm and dst_channel.size == 8: - return 'float_to_ubyte(%s)' % value - - if clamp: - if dst_channel.type != FLOAT or src_type != FLOAT: - value = clamp_expr(src_channel, dst_channel, dst_native_type, value) - - if src_type in (SIGNED, UNSIGNED) and dst_channel.type in (SIGNED, UNSIGNED): - if not src_norm and not dst_channel.norm: - # neither is normalized -- just cast - return '(%s)%s' % (dst_native_type, value) - - src_one = get_one(src_channel) - dst_one = get_one(dst_channel) - - if src_one > dst_one and src_norm and dst_channel.norm: - # We can just bitshift - src_shift = get_one_shift(src_channel) - dst_shift = get_one_shift(dst_channel) - value = '(%s >> %s)' % (value, src_shift - dst_shift) - else: - # We need to rescale using an intermediate type big enough to hold the multiplication of both - tmp_native_type = intermediate_native_type(src_size + dst_channel.size, src_channel.sign and dst_channel.sign) - value = '((%s)%s)' % (tmp_native_type, value) - value = '(%s * 0x%x / 0x%x)' % (value, dst_one, src_one) - value = '(%s)%s' % (dst_native_type, value) - return value - - # Promote to either float or double - if src_type != FLOAT: - if src_norm or src_type == FIXED: - one = get_one(src_channel) - if src_size <= 23: - value = '(%s * (1.0f/0x%x))' % (value, one) - if dst_channel.size <= 32: - value = '(float)%s' % value - src_size = 32 - else: - # bigger than single precision mantissa, use double - value = '(%s * (1.0/0x%x))' % (value, one) - src_size = 64 - src_norm = False - else: - if src_size <= 23 or dst_channel.size <= 32: - value = '(float)%s' % value - src_size = 32 - else: - # bigger than single precision mantissa, use double - value = '(double)%s' % value - src_size = 64 - src_type = FLOAT - - # Convert double or float to non-float - if dst_channel.type != FLOAT: - if dst_channel.norm or dst_channel.type == FIXED: - dst_one = get_one(dst_channel) - if dst_channel.size <= 23: - value = '(%s * 0x%x)' % (value, dst_one) - else: - # bigger than single precision mantissa, use double - value = '(%s * (double)0x%x)' % (value, dst_one) - value = '(%s)%s' % (dst_native_type, value) - else: - # Cast double to float when converting to either half or float - if dst_channel.size <= 32 and src_size > 32: - value = '(float)%s' % value - src_size = 32 - - if dst_channel.size == 16: - value = 'util_float_to_half(%s)' % value - elif dst_channel.size == 64 and src_size < 64: - value = '(double)%s' % value - - return value - - -def generate_unpack_kernel(format, dst_channel, dst_native_type): - - if not is_format_supported(format): - return - - assert format.layout == PLAIN - - src_native_type = native_type(format) - - if format.is_bitmask(): - depth = format.block_size() - print ' uint%u_t value = *(const uint%u_t *)src;' % (depth, depth) - - # Declare the intermediate variables - for i in range(format.nr_channels()): - src_channel = format.channels[i] - if src_channel.type == UNSIGNED: - print ' uint%u_t %s;' % (depth, src_channel.name) - elif src_channel.type == SIGNED: - print ' int%u_t %s;' % (depth, src_channel.name) - - if depth > 8: - print '#ifdef PIPE_ARCH_BIG_ENDIAN' - print ' value = util_bswap%u(value);' % depth - print '#endif' - - # Compute the intermediate unshifted values - shift = 0 - for i in range(format.nr_channels()): - src_channel = format.channels[i] - value = 'value' - if src_channel.type == UNSIGNED: - if shift: - value = '%s >> %u' % (value, shift) - if shift + src_channel.size < depth: - value = '(%s) & 0x%x' % (value, (1 << src_channel.size) - 1) - elif src_channel.type == SIGNED: - if shift + src_channel.size < depth: - # Align the sign bit - lshift = depth - (shift + src_channel.size) - value = '%s << %u' % (value, lshift) - # Cast to signed - value = '(int%u_t)(%s) ' % (depth, value) - if src_channel.size < depth: - # Align the LSB bit - rshift = depth - src_channel.size - value = '(%s) >> %u' % (value, rshift) - else: - value = None - - if value is not None: - print ' %s = %s;' % (src_channel.name, value) - - shift += src_channel.size - - # Convert, swizzle, and store final values - for i in range(4): - swizzle = format.swizzles[i] - if swizzle < 4: - src_channel = format.channels[swizzle] - src_colorspace = format.colorspace - if src_colorspace == SRGB and i == 3: - # Alpha channel is linear - src_colorspace = RGB - value = src_channel.name - value = conversion_expr(src_channel, - dst_channel, dst_native_type, - value, - src_colorspace = src_colorspace) - elif swizzle == SWIZZLE_0: - value = '0' - elif swizzle == SWIZZLE_1: - value = get_one(dst_channel) - elif swizzle == SWIZZLE_NONE: - value = '0' - else: - assert False - print ' dst[%u] = %s; /* %s */' % (i, value, 'rgba'[i]) - - else: - print ' union util_format_%s pixel;' % format.short_name() - print ' memcpy(&pixel, src, sizeof pixel);' - bswap_format(format) - - for i in range(4): - swizzle = format.swizzles[i] - if swizzle < 4: - src_channel = format.channels[swizzle] - src_colorspace = format.colorspace - if src_colorspace == SRGB and i == 3: - # Alpha channel is linear - src_colorspace = RGB - value = 'pixel.chan.%s' % src_channel.name - value = conversion_expr(src_channel, - dst_channel, dst_native_type, - value, - src_colorspace = src_colorspace) - elif swizzle == SWIZZLE_0: - value = '0' - elif swizzle == SWIZZLE_1: - value = get_one(dst_channel) - elif swizzle == SWIZZLE_NONE: - value = '0' - else: - assert False - print ' dst[%u] = %s; /* %s */' % (i, value, 'rgba'[i]) - - -def generate_pack_kernel(format, src_channel, src_native_type): - - if not is_format_supported(format): - return - - dst_native_type = native_type(format) - - assert format.layout == PLAIN - - inv_swizzle = format.inv_swizzles() - - if format.is_bitmask(): - depth = format.block_size() - print ' uint%u_t value = 0;' % depth - - shift = 0 - for i in range(4): - dst_channel = format.channels[i] - if inv_swizzle[i] is not None: - value ='src[%u]' % inv_swizzle[i] - dst_colorspace = format.colorspace - if dst_colorspace == SRGB and inv_swizzle[i] == 3: - # Alpha channel is linear - dst_colorspace = RGB - value = conversion_expr(src_channel, - dst_channel, dst_native_type, - value, - dst_colorspace = dst_colorspace) - if dst_channel.type in (UNSIGNED, SIGNED): - if shift + dst_channel.size < depth: - value = '(%s) & 0x%x' % (value, (1 << dst_channel.size) - 1) - if shift: - value = '(%s) << %u' % (value, shift) - if dst_channel.type == SIGNED: - # Cast to unsigned - value = '(uint%u_t)(%s) ' % (depth, value) - else: - value = None - if value is not None: - print ' value |= %s;' % (value) - - shift += dst_channel.size - - if depth > 8: - print '#ifdef PIPE_ARCH_BIG_ENDIAN' - print ' value = util_bswap%u(value);' % depth - print '#endif' - - print ' *(uint%u_t *)dst = value;' % depth - - else: - print ' union util_format_%s pixel;' % format.short_name() - - for i in range(4): - dst_channel = format.channels[i] - width = dst_channel.size - if inv_swizzle[i] is None: - continue - dst_colorspace = format.colorspace - if dst_colorspace == SRGB and inv_swizzle[i] == 3: - # Alpha channel is linear - dst_colorspace = RGB - value ='src[%u]' % inv_swizzle[i] - value = conversion_expr(src_channel, - dst_channel, dst_native_type, - value, - dst_colorspace = dst_colorspace) - print ' pixel.chan.%s = %s;' % (dst_channel.name, value) - - bswap_format(format) - print ' memcpy(dst, &pixel, sizeof pixel);' - - -def generate_format_unpack(format, dst_channel, dst_native_type, dst_suffix): - '''Generate the function to unpack pixels from a particular format''' - - name = format.short_name() - - print 'static INLINE void' - print 'util_format_%s_unpack_%s(%s *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)' % (name, dst_suffix, dst_native_type) - print '{' - - if is_format_supported(format): - print ' unsigned x, y;' - print ' for(y = 0; y < height; y += %u) {' % (format.block_height,) - print ' %s *dst = dst_row;' % (dst_native_type) - print ' const uint8_t *src = src_row;' - print ' for(x = 0; x < width; x += %u) {' % (format.block_width,) - - generate_unpack_kernel(format, dst_channel, dst_native_type) - - print ' src += %u;' % (format.block_size() / 8,) - print ' dst += 4;' - print ' }' - print ' src_row += src_stride;' - print ' dst_row += dst_stride/sizeof(*dst_row);' - print ' }' - - print '}' - print - - -def generate_format_pack(format, src_channel, src_native_type, src_suffix): - '''Generate the function to pack pixels to a particular format''' - - name = format.short_name() - - print 'static INLINE void' - print 'util_format_%s_pack_%s(uint8_t *dst_row, unsigned dst_stride, const %s *src_row, unsigned src_stride, unsigned width, unsigned height)' % (name, src_suffix, src_native_type) - print '{' - - if is_format_supported(format): - print ' unsigned x, y;' - print ' for(y = 0; y < height; y += %u) {' % (format.block_height,) - print ' const %s *src = src_row;' % (src_native_type) - print ' uint8_t *dst = dst_row;' - print ' for(x = 0; x < width; x += %u) {' % (format.block_width,) - - generate_pack_kernel(format, src_channel, src_native_type) - - print ' src += 4;' - print ' dst += %u;' % (format.block_size() / 8,) - print ' }' - print ' dst_row += dst_stride;' - print ' src_row += src_stride/sizeof(*src_row);' - print ' }' - - print '}' - print - - -def generate_format_fetch(format, dst_channel, dst_native_type, dst_suffix): - '''Generate the function to unpack pixels from a particular format''' - - name = format.short_name() - - print 'static INLINE void' - print 'util_format_%s_fetch_%s(%s *dst, const uint8_t *src, unsigned i, unsigned j)' % (name, dst_suffix, dst_native_type) - print '{' - - if is_format_supported(format): - generate_unpack_kernel(format, dst_channel, dst_native_type) - - print '}' - print - - -def is_format_hand_written(format): - return format.layout in ('s3tc', 'rgtc', 'etc', 'subsampled', 'other') or format.colorspace == ZS - - -def generate(formats): - print - print '#include "pipe/p_compiler.h"' - print '#include "u_math.h"' - print '#include "u_half.h"' - print '#include "u_format.h"' - print '#include "u_format_other.h"' - print '#include "u_format_srgb.h"' - print '#include "u_format_yuv.h"' - print '#include "u_format_zs.h"' - print - - for format in formats: - if not is_format_hand_written(format): - - if is_format_supported(format): - generate_format_type(format) - - if is_format_pure_unsigned(format): - native_type = 'unsigned' - suffix = 'unsigned' - channel = Channel(UNSIGNED, False, True, 32) - - generate_format_unpack(format, channel, native_type, suffix) - generate_format_pack(format, channel, native_type, suffix) - generate_format_fetch(format, channel, native_type, suffix) - - channel = Channel(SIGNED, False, True, 32) - native_type = 'int' - suffix = 'signed' - generate_format_unpack(format, channel, native_type, suffix) - generate_format_pack(format, channel, native_type, suffix) - elif is_format_pure_signed(format): - native_type = 'int' - suffix = 'signed' - channel = Channel(SIGNED, False, True, 32) - - generate_format_unpack(format, channel, native_type, suffix) - generate_format_pack(format, channel, native_type, suffix) - generate_format_fetch(format, channel, native_type, suffix) - - native_type = 'unsigned' - suffix = 'unsigned' - channel = Channel(UNSIGNED, False, True, 32) - generate_format_unpack(format, channel, native_type, suffix) - generate_format_pack(format, channel, native_type, suffix) - else: - channel = Channel(FLOAT, False, False, 32) - native_type = 'float' - suffix = 'rgba_float' - - generate_format_unpack(format, channel, native_type, suffix) - generate_format_pack(format, channel, native_type, suffix) - generate_format_fetch(format, channel, native_type, suffix) - - channel = Channel(UNSIGNED, True, False, 8) - native_type = 'uint8_t' - suffix = 'rgba_8unorm' - - generate_format_unpack(format, channel, native_type, suffix) - generate_format_pack(format, channel, native_type, suffix) - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_parse.py b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_parse.py deleted file mode 100644 index 3a39e5ba524..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_parse.py +++ /dev/null @@ -1,304 +0,0 @@ -#!/usr/bin/env python - -''' -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ -''' - - -VOID, UNSIGNED, SIGNED, FIXED, FLOAT = range(5) - -SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_W, SWIZZLE_0, SWIZZLE_1, SWIZZLE_NONE, = range(7) - -PLAIN = 'plain' - -RGB = 'rgb' -SRGB = 'srgb' -YUV = 'yuv' -ZS = 'zs' - - -def is_pot(x): - return (x & (x - 1)) == 0 - - -VERY_LARGE = 99999999999999999999999 - - -class Channel: - '''Describe the channel of a color channel.''' - - def __init__(self, type, norm, pure, size, name = ''): - self.type = type - self.norm = norm - self.pure = pure - self.size = size - self.sign = type in (SIGNED, FIXED, FLOAT) - self.name = name - - def __str__(self): - s = str(self.type) - if self.norm: - s += 'n' - if self.pure: - s += 'p' - s += str(self.size) - return s - - def __eq__(self, other): - return self.type == other.type and self.norm == other.norm and self.pure == other.pure and self.size == other.size - - def max(self): - '''Maximum representable number.''' - if self.type == FLOAT: - return VERY_LARGE - if self.type == FIXED: - return (1 << (self.size/2)) - 1 - if self.norm: - return 1 - if self.type == UNSIGNED: - return (1 << self.size) - 1 - if self.type == SIGNED: - return (1 << (self.size - 1)) - 1 - assert False - - def min(self): - '''Minimum representable number.''' - if self.type == FLOAT: - return -VERY_LARGE - if self.type == FIXED: - return -(1 << (self.size/2)) - if self.type == UNSIGNED: - return 0 - if self.norm: - return -1 - if self.type == SIGNED: - return -(1 << (self.size - 1)) - assert False - - -class Format: - '''Describe a pixel format.''' - - def __init__(self, name, layout, block_width, block_height, channels, swizzles, colorspace): - self.name = name - self.layout = layout - self.block_width = block_width - self.block_height = block_height - self.channels = channels - self.swizzles = swizzles - self.name = name - self.colorspace = colorspace - - def __str__(self): - return self.name - - def short_name(self): - '''Make up a short norm for a format, suitable to be used as suffix in - function names.''' - - name = self.name - if name.startswith('PIPE_FORMAT_'): - name = name[len('PIPE_FORMAT_'):] - name = name.lower() - return name - - def block_size(self): - size = 0 - for channel in self.channels: - size += channel.size - return size - - def nr_channels(self): - nr_channels = 0 - for channel in self.channels: - if channel.size: - nr_channels += 1 - return nr_channels - - def is_array(self): - if self.layout != PLAIN: - return False - ref_channel = self.channels[0] - for channel in self.channels[1:]: - if channel.size and (channel.size != ref_channel.size or channel.size % 8): - return False - return True - - def is_mixed(self): - if self.layout != PLAIN: - return False - ref_channel = self.channels[0] - if ref_channel.type == VOID: - ref_channel = self.channels[1] - for channel in self.channels[1:]: - if channel.type != VOID: - if channel.type != ref_channel.type: - return True - if channel.norm != ref_channel.norm: - return True - if channel.pure != ref_channel.pure: - return True - return False - - def is_pot(self): - return is_pot(self.block_size()) - - def is_int(self): - if self.layout != PLAIN: - return False - for channel in self.channels: - if channel.type not in (VOID, UNSIGNED, SIGNED): - return False - return True - - def is_float(self): - if self.layout != PLAIN: - return False - for channel in self.channels: - if channel.type not in (VOID, FLOAT): - return False - return True - - def is_bitmask(self): - if self.layout != PLAIN: - return False - if self.block_size() not in (8, 16, 32): - return False - for channel in self.channels: - if channel.type not in (VOID, UNSIGNED, SIGNED): - return False - return True - - def inv_swizzles(self): - '''Return an array[4] of inverse swizzle terms''' - '''Only pick the first matching value to avoid l8 getting blue and i8 getting alpha''' - inv_swizzle = [None]*4 - for i in range(4): - swizzle = self.swizzles[i] - if swizzle < 4 and inv_swizzle[swizzle] == None: - inv_swizzle[swizzle] = i - return inv_swizzle - - def stride(self): - return self.block_size()/8 - - -_type_parse_map = { - '': VOID, - 'x': VOID, - 'u': UNSIGNED, - 's': SIGNED, - 'h': FIXED, - 'f': FLOAT, -} - -_swizzle_parse_map = { - 'x': SWIZZLE_X, - 'y': SWIZZLE_Y, - 'z': SWIZZLE_Z, - 'w': SWIZZLE_W, - '0': SWIZZLE_0, - '1': SWIZZLE_1, - '_': SWIZZLE_NONE, -} - -def parse(filename): - '''Parse the format descrition in CSV format in terms of the - Channel and Format classes above.''' - - stream = open(filename) - formats = [] - for line in stream: - try: - comment = line.index('#') - except ValueError: - pass - else: - line = line[:comment] - line = line.strip() - if not line: - continue - - fields = [field.strip() for field in line.split(',')] - - name = fields[0] - layout = fields[1] - block_width, block_height = map(int, fields[2:4]) - - swizzles = [_swizzle_parse_map[swizzle] for swizzle in fields[8]] - colorspace = fields[9] - - if layout == PLAIN: - names = ['']*4 - if colorspace in (RGB, SRGB): - for i in range(4): - swizzle = swizzles[i] - if swizzle < 4: - names[swizzle] += 'rgba'[i] - elif colorspace == ZS: - for i in range(4): - swizzle = swizzles[i] - if swizzle < 4: - names[swizzle] += 'zs'[i] - else: - assert False - for i in range(4): - if names[i] == '': - names[i] = 'x' - else: - names = ['x', 'y', 'z', 'w'] - - channels = [] - for i in range(0, 4): - field = fields[4 + i] - if field: - type = _type_parse_map[field[0]] - if field[1] == 'n': - norm = True - pure = False - size = int(field[2:]) - elif field[1] == 'p': - pure = True - norm = False - size = int(field[2:]) - else: - norm = False - pure = False - size = int(field[1:]) - else: - type = VOID - norm = False - pure = False - size = 0 - channel = Channel(type, norm, pure, size, names[i]) - channels.append(channel) - - format = Format(name, layout, block_width, block_height, channels, swizzles, colorspace) - formats.append(format) - return formats - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_r11g11b10f.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_r11g11b10f.h deleted file mode 100644 index bd64b2896b4..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_r11g11b10f.h +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Copyright (C) 2011 Marek Olšák - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/* Based on code from The OpenGL Programming Guide / 7th Edition, Appendix J. - * Available here: http://www.opengl-redbook.com/appendices/ - * The algorithm in the book contains a bug though, which is fixed in the code - * below. - */ - -#define UF11(e, m) ((e << 6) | (m)) -#define UF11_EXPONENT_BIAS 15 -#define UF11_EXPONENT_BITS 0x1F -#define UF11_EXPONENT_SHIFT 6 -#define UF11_MANTISSA_BITS 0x3F -#define UF11_MANTISSA_SHIFT (23 - UF11_EXPONENT_SHIFT) -#define UF11_MAX_EXPONENT (UF11_EXPONENT_BITS << UF11_EXPONENT_SHIFT) - -#define UF10(e, m) ((e << 5) | (m)) -#define UF10_EXPONENT_BIAS 15 -#define UF10_EXPONENT_BITS 0x1F -#define UF10_EXPONENT_SHIFT 5 -#define UF10_MANTISSA_BITS 0x1F -#define UF10_MANTISSA_SHIFT (23 - UF10_EXPONENT_SHIFT) -#define UF10_MAX_EXPONENT (UF10_EXPONENT_BITS << UF10_EXPONENT_SHIFT) - -#define F32_INFINITY 0x7f800000 - -static INLINE unsigned f32_to_uf11(float val) -{ - union { - float f; - uint32_t ui; - } f32 = {val}; - - uint16_t uf11 = 0; - - /* Decode little-endian 32-bit floating-point value */ - int sign = (f32.ui >> 16) & 0x8000; - /* Map exponent to the range [-127,128] */ - int exponent = ((f32.ui >> 23) & 0xff) - 127; - int mantissa = f32.ui & 0x007fffff; - - if (exponent == 128) { /* Infinity or NaN */ - /* From the GL_EXT_packed_float spec: - * - * "Additionally: negative infinity is converted to zero; positive - * infinity is converted to positive infinity; and both positive and - * negative NaN are converted to positive NaN." - */ - uf11 = UF11_MAX_EXPONENT; - if (mantissa) { - uf11 |= 1; /* NaN */ - } else { - if (sign) - uf11 = 0; /* 0.0 */ - } - } else if (sign) { - return 0; - } else if (val > 65024.0f) { - /* From the GL_EXT_packed_float spec: - * - * "Likewise, finite positive values greater than 65024 (the maximum - * finite representable unsigned 11-bit floating-point value) are - * converted to 65024." - */ - uf11 = UF11(30, 63); - } - else if (exponent > -15) { /* Representable value */ - exponent += UF11_EXPONENT_BIAS; - mantissa >>= UF11_MANTISSA_SHIFT; - uf11 = exponent << UF11_EXPONENT_SHIFT | mantissa; - } - - return uf11; -} - -static INLINE float uf11_to_f32(uint16_t val) -{ - union { - float f; - uint32_t ui; - } f32; - - int exponent = (val & 0x07c0) >> UF11_EXPONENT_SHIFT; - int mantissa = (val & 0x003f); - - f32.f = 0.0; - - if (exponent == 0) { - if (mantissa != 0) { - const float scale = 1.0 / (1 << 20); - f32.f = scale * mantissa; - } - } - else if (exponent == 31) { - f32.ui = F32_INFINITY | mantissa; - } - else { - float scale, decimal; - exponent -= 15; - if (exponent < 0) { - scale = 1.0f / (1 << -exponent); - } - else { - scale = (float) (1 << exponent); - } - decimal = 1.0f + (float) mantissa / 64; - f32.f = scale * decimal; - } - - return f32.f; -} - -static INLINE unsigned f32_to_uf10(float val) -{ - union { - float f; - uint32_t ui; - } f32 = {val}; - - uint16_t uf10 = 0; - - /* Decode little-endian 32-bit floating-point value */ - int sign = (f32.ui >> 16) & 0x8000; - /* Map exponent to the range [-127,128] */ - int exponent = ((f32.ui >> 23) & 0xff) - 127; - int mantissa = f32.ui & 0x007fffff; - - if (exponent == 128) { - /* From the GL_EXT_packed_float spec: - * - * "Additionally: negative infinity is converted to zero; positive - * infinity is converted to positive infinity; and both positive and - * negative NaN are converted to positive NaN." - */ - uf10 = UF10_MAX_EXPONENT; - if (mantissa) { - uf10 |= 1; /* NaN */ - } else { - if (sign) - uf10 = 0; /* 0.0 */ - } - } else if (sign) { - return 0; - } else if (val > 64512.0f) { /* Overflow - flush to Infinity */ - /* From the GL_EXT_packed_float spec: - * - * "Likewise, finite positive values greater than 64512 (the maximum - * finite representable unsigned 10-bit floating-point value) are - * converted to 64512." - */ - uf10 = UF10(30, 31); - } - else if (exponent > -15) { /* Representable value */ - exponent += UF10_EXPONENT_BIAS; - mantissa >>= UF10_MANTISSA_SHIFT; - uf10 = exponent << UF10_EXPONENT_SHIFT | mantissa; - } - - return uf10; -} - -static INLINE float uf10_to_f32(uint16_t val) -{ - union { - float f; - uint32_t ui; - } f32; - - int exponent = (val & 0x03e0) >> UF10_EXPONENT_SHIFT; - int mantissa = (val & 0x001f); - - f32.f = 0.0; - - if (exponent == 0) { - if (mantissa != 0) { - const float scale = 1.0 / (1 << 20); - f32.f = scale * mantissa; - } - } - else if (exponent == 31) { - f32.ui = F32_INFINITY | mantissa; - } - else { - float scale, decimal; - exponent -= 15; - if (exponent < 0) { - scale = 1.0 / (1 << -exponent); - } - else { - scale = (float) (1 << exponent); - } - decimal = 1.0f + (float) mantissa / 32; - f32.f = scale * decimal; - } - - return f32.f; -} - -static INLINE unsigned float3_to_r11g11b10f(const float rgb[3]) -{ - return ( f32_to_uf11(rgb[0]) & 0x7ff) | - ((f32_to_uf11(rgb[1]) & 0x7ff) << 11) | - ((f32_to_uf10(rgb[2]) & 0x3ff) << 22); -} - -static INLINE void r11g11b10f_to_float3(unsigned rgb, float retval[3]) -{ - retval[0] = uf11_to_f32( rgb & 0x7ff); - retval[1] = uf11_to_f32((rgb >> 11) & 0x7ff); - retval[2] = uf10_to_f32((rgb >> 22) & 0x3ff); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_rgb9e5.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_rgb9e5.h deleted file mode 100644 index c2a3f6f3e9d..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_rgb9e5.h +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright (C) 2011 Marek Olšák - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/* Copied from EXT_texture_shared_exponent and edited. */ - -#ifndef RGB9E5_H -#define RGB9E5_H - -#include -#include - -#define RGB9E5_EXPONENT_BITS 5 -#define RGB9E5_MANTISSA_BITS 9 -#define RGB9E5_EXP_BIAS 15 -#define RGB9E5_MAX_VALID_BIASED_EXP 31 - -#define MAX_RGB9E5_EXP (RGB9E5_MAX_VALID_BIASED_EXP - RGB9E5_EXP_BIAS) -#define RGB9E5_MANTISSA_VALUES (1< 0.0) { - if (x >= MAX_RGB9E5) { - return MAX_RGB9E5; - } else { - return x; - } - } else { - /* NaN gets here too since comparisons with NaN always fail! */ - return 0.0; - } -} - -/* Ok, FloorLog2 is not correct for the denorm and zero values, but we - are going to do a max of this value with the minimum rgb9e5 exponent - that will hide these problem cases. */ -static INLINE int rgb9e5_FloorLog2(float x) -{ - float754 f; - - f.value = x; - return (f.field.biasedexponent - 127); -} - -static INLINE unsigned float3_to_rgb9e5(const float rgb[3]) -{ - rgb9e5 retval; - float maxrgb; - int rm, gm, bm; - float rc, gc, bc; - int exp_shared, maxm; - double denom; - - rc = rgb9e5_ClampRange(rgb[0]); - gc = rgb9e5_ClampRange(rgb[1]); - bc = rgb9e5_ClampRange(rgb[2]); - - maxrgb = MAX3(rc, gc, bc); - exp_shared = MAX2(-RGB9E5_EXP_BIAS-1, rgb9e5_FloorLog2(maxrgb)) + 1 + RGB9E5_EXP_BIAS; - assert(exp_shared <= RGB9E5_MAX_VALID_BIASED_EXP); - assert(exp_shared >= 0); - /* This pow function could be replaced by a table. */ - denom = pow(2, exp_shared - RGB9E5_EXP_BIAS - RGB9E5_MANTISSA_BITS); - - maxm = (int) floor(maxrgb / denom + 0.5); - if (maxm == MAX_RGB9E5_MANTISSA+1) { - denom *= 2; - exp_shared += 1; - assert(exp_shared <= RGB9E5_MAX_VALID_BIASED_EXP); - } else { - assert(maxm <= MAX_RGB9E5_MANTISSA); - } - - rm = (int) floor(rc / denom + 0.5); - gm = (int) floor(gc / denom + 0.5); - bm = (int) floor(bc / denom + 0.5); - - assert(rm <= MAX_RGB9E5_MANTISSA); - assert(gm <= MAX_RGB9E5_MANTISSA); - assert(bm <= MAX_RGB9E5_MANTISSA); - assert(rm >= 0); - assert(gm >= 0); - assert(bm >= 0); - - retval.field.r = rm; - retval.field.g = gm; - retval.field.b = bm; - retval.field.biasedexponent = exp_shared; - - return retval.raw; -} - -static INLINE void rgb9e5_to_float3(unsigned rgb, float retval[3]) -{ - rgb9e5 v; - int exponent; - float scale; - - v.raw = rgb; - exponent = v.field.biasedexponent - RGB9E5_EXP_BIAS - RGB9E5_MANTISSA_BITS; - scale = (float) pow(2, exponent); - - retval[0] = v.field.r * scale; - retval[1] = v.field.g * scale; - retval[2] = v.field.b * scale; -} - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_rgtc.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_rgtc.c deleted file mode 100644 index ff04e37b59d..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_rgtc.c +++ /dev/null @@ -1,473 +0,0 @@ -/************************************************************************** - * - * Copyright (C) 2011 Red Hat Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include -#include "u_math.h" -#include "u_format.h" -#include "u_format_rgtc.h" - -static void u_format_unsigned_encode_rgtc_ubyte(uint8_t *blkaddr, uint8_t srccolors[4][4], - int numxpixels, int numypixels); - -static void u_format_unsigned_fetch_texel_rgtc(unsigned srcRowStride, const uint8_t *pixdata, - unsigned i, unsigned j, uint8_t *value, unsigned comps); - -static void u_format_signed_encode_rgtc_ubyte(int8_t *blkaddr, int8_t srccolors[4][4], - int numxpixels, int numypixels); - -static void u_format_signed_fetch_texel_rgtc(unsigned srcRowStride, const int8_t *pixdata, - unsigned i, unsigned j, int8_t *value, unsigned comps); - -void -util_format_rgtc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) -{ - u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 1); - dst[1] = 0; - dst[2] = 0; - dst[3] = 255; -} - -void -util_format_rgtc1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - const unsigned bw = 4, bh = 4, comps = 4; - unsigned x, y, i, j; - unsigned block_size = 8; - - for(y = 0; y < height; y += bh) { - const uint8_t *src = src_row; - for(x = 0; x < width; x += bw) { - for(j = 0; j < bh; ++j) { - for(i = 0; i < bw; ++i) { - uint8_t *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*comps; - u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 1); - dst[1] = 0; - dst[2] = 0; - dst[3] = 255; - } - } - src += block_size; - } - src_row += src_stride; - } -} - -void -util_format_rgtc1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, - unsigned src_stride, unsigned width, unsigned height) -{ - const unsigned bw = 4, bh = 4, bytes_per_block = 8; - unsigned x, y, i, j; - - for(y = 0; y < height; y += bh) { - uint8_t *dst = dst_row; - for(x = 0; x < width; x += bw) { - uint8_t tmp[4][4]; /* [bh][bw][comps] */ - for(j = 0; j < bh; ++j) { - for(i = 0; i < bw; ++i) { - tmp[j][i] = src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]; - } - } - u_format_unsigned_encode_rgtc_ubyte(dst, tmp, 4, 4); - dst += bytes_per_block; - } - dst_row += dst_stride / sizeof(*dst_row); - } -} - -void -util_format_rgtc1_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y, i, j; - int block_size = 8; - for(y = 0; y < height; y += 4) { - const uint8_t *src = src_row; - for(x = 0; x < width; x += 4) { - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4; - uint8_t tmp_r; - u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 1); - dst[0] = ubyte_to_float(tmp_r); - dst[1] = 0.0; - dst[2] = 0.0; - dst[3] = 1.0; - } - } - src += block_size; - } - src_row += src_stride; - } -} - -void -util_format_rgtc1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - const unsigned bw = 4, bh = 4, bytes_per_block = 8; - unsigned x, y, i, j; - - for(y = 0; y < height; y += bh) { - uint8_t *dst = dst_row; - for(x = 0; x < width; x += bw) { - uint8_t tmp[4][4]; /* [bh][bw][comps] */ - for(j = 0; j < bh; ++j) { - for(i = 0; i < bw; ++i) { - tmp[j][i] = float_to_ubyte(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]); - } - } - u_format_unsigned_encode_rgtc_ubyte(dst, tmp, 4, 4); - dst += bytes_per_block; - } - dst_row += dst_stride / sizeof(*dst_row); - } -} - -void -util_format_rgtc1_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t tmp_r; - u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 1); - dst[0] = ubyte_to_float(tmp_r); - dst[1] = 0.0; - dst[2] = 0.0; - dst[3] = 1.0; -} - -void -util_format_rgtc1_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) -{ - fprintf(stderr,"%s\n", __func__); -} - -void -util_format_rgtc1_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - fprintf(stderr,"%s\n", __func__); -} - -void -util_format_rgtc1_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - fprintf(stderr,"%s\n", __func__); -} - -void -util_format_rgtc1_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - const unsigned bw = 4, bh = 4, bytes_per_block = 8; - unsigned x, y, i, j; - - for(y = 0; y < height; y += bh) { - int8_t *dst = (int8_t *)dst_row; - for(x = 0; x < width; x += bw) { - int8_t tmp[4][4]; /* [bh][bw][comps] */ - for(j = 0; j < bh; ++j) { - for(i = 0; i < bw; ++i) { - tmp[j][i] = float_to_byte_tex(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]); - } - } - u_format_signed_encode_rgtc_ubyte(dst, tmp, 4, 4); - dst += bytes_per_block; - } - dst_row += dst_stride / sizeof(*dst_row); - } -} - -void -util_format_rgtc1_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y, i, j; - int block_size = 8; - for(y = 0; y < height; y += 4) { - const int8_t *src = (int8_t *)src_row; - for(x = 0; x < width; x += 4) { - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4; - int8_t tmp_r; - u_format_signed_fetch_texel_rgtc(0, src, i, j, &tmp_r, 1); - dst[0] = byte_to_float_tex(tmp_r); - dst[1] = 0.0; - dst[2] = 0.0; - dst[3] = 1.0; - } - } - src += block_size; - } - src_row += src_stride; - } -} - -void -util_format_rgtc1_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - int8_t tmp_r; - u_format_signed_fetch_texel_rgtc(0, (int8_t *)src, i, j, &tmp_r, 1); - dst[0] = byte_to_float_tex(tmp_r); - dst[1] = 0.0; - dst[2] = 0.0; - dst[3] = 1.0; -} - - -void -util_format_rgtc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) -{ - u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 2); - u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, dst + 1, 2); - dst[2] = 0; - dst[3] = 255; -} - -void -util_format_rgtc2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - const unsigned bw = 4, bh = 4, comps = 4; - unsigned x, y, i, j; - unsigned block_size = 16; - - for(y = 0; y < height; y += bh) { - const uint8_t *src = src_row; - for(x = 0; x < width; x += bw) { - for(j = 0; j < bh; ++j) { - for(i = 0; i < bw; ++i) { - uint8_t *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*comps; - u_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 2); - u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, dst + 1, 2); - dst[2] = 0; - dst[3] = 255; - } - } - src += block_size; - } - src_row += src_stride; - } -} - -void -util_format_rgtc2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - const unsigned bw = 4, bh = 4, bytes_per_block = 16; - unsigned x, y, i, j; - - for(y = 0; y < height; y += bh) { - uint8_t *dst = dst_row; - for(x = 0; x < width; x += bw) { - uint8_t tmp_r[4][4]; /* [bh][bw] */ - uint8_t tmp_g[4][4]; /* [bh][bw] */ - for(j = 0; j < bh; ++j) { - for(i = 0; i < bw; ++i) { - tmp_r[j][i] = src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]; - tmp_g[j][i] = src_row[((y + j)*src_stride/sizeof(*src_row) + (x + i)*4) + 1]; - } - } - u_format_unsigned_encode_rgtc_ubyte(dst, tmp_r, 4, 4); - u_format_unsigned_encode_rgtc_ubyte(dst + 8, tmp_g, 4, 4); - dst += bytes_per_block; - } - dst_row += dst_stride / sizeof(*dst_row); - } -} - -void -util_format_rxtc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height, unsigned chan2off) -{ - const unsigned bw = 4, bh = 4, bytes_per_block = 16; - unsigned x, y, i, j; - - for(y = 0; y < height; y += bh) { - uint8_t *dst = dst_row; - for(x = 0; x < width; x += bw) { - uint8_t tmp_r[4][4]; /* [bh][bw][comps] */ - uint8_t tmp_g[4][4]; /* [bh][bw][comps] */ - for(j = 0; j < bh; ++j) { - for(i = 0; i < bw; ++i) { - tmp_r[j][i] = float_to_ubyte(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]); - tmp_g[j][i] = float_to_ubyte(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4 + chan2off]); - } - } - u_format_unsigned_encode_rgtc_ubyte(dst, tmp_r, 4, 4); - u_format_unsigned_encode_rgtc_ubyte(dst + 8, tmp_g, 4, 4); - dst += bytes_per_block; - } - dst_row += dst_stride / sizeof(*dst_row); - } -} - -void -util_format_rgtc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_rxtc2_unorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height, 1); -} - -void -util_format_rgtc2_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y, i, j; - int block_size = 16; - for(y = 0; y < height; y += 4) { - const uint8_t *src = src_row; - for(x = 0; x < width; x += 4) { - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4; - uint8_t tmp_r, tmp_g; - u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 2); - u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, &tmp_g, 2); - dst[0] = ubyte_to_float(tmp_r); - dst[1] = ubyte_to_float(tmp_g); - dst[2] = 0.0; - dst[3] = 1.0; - } - } - src += block_size; - } - src_row += src_stride; - } -} - -void -util_format_rgtc2_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t tmp_r, tmp_g; - u_format_unsigned_fetch_texel_rgtc(0, src, i, j, &tmp_r, 2); - u_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, &tmp_g, 2); - dst[0] = ubyte_to_float(tmp_r); - dst[1] = ubyte_to_float(tmp_g); - dst[2] = 0.0; - dst[3] = 1.0; -} - - -void -util_format_rgtc2_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) -{ - fprintf(stderr,"%s\n", __func__); -} - -void -util_format_rgtc2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - fprintf(stderr,"%s\n", __func__); -} - -void -util_format_rgtc2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - fprintf(stderr,"%s\n", __func__); -} - -void -util_format_rgtc2_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - unsigned x, y, i, j; - int block_size = 16; - for(y = 0; y < height; y += 4) { - const int8_t *src = (int8_t *)src_row; - for(x = 0; x < width; x += 4) { - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4; - int8_t tmp_r, tmp_g; - u_format_signed_fetch_texel_rgtc(0, src, i, j, &tmp_r, 2); - u_format_signed_fetch_texel_rgtc(0, src + 8, i, j, &tmp_g, 2); - dst[0] = byte_to_float_tex(tmp_r); - dst[1] = byte_to_float_tex(tmp_g); - dst[2] = 0.0; - dst[3] = 1.0; - } - } - src += block_size; - } - src_row += src_stride; - } -} - -void -util_format_rxtc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height, unsigned chan2off) -{ - const unsigned bw = 4, bh = 4, bytes_per_block = 16; - unsigned x, y, i, j; - - for(y = 0; y < height; y += bh) { - int8_t *dst = (int8_t *)dst_row; - for(x = 0; x < width; x += bw) { - int8_t tmp_r[4][4]; /* [bh][bw][comps] */ - int8_t tmp_g[4][4]; /* [bh][bw][comps] */ - for(j = 0; j < bh; ++j) { - for(i = 0; i < bw; ++i) { - tmp_r[j][i] = float_to_byte_tex(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]); - tmp_g[j][i] = float_to_byte_tex(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4 + chan2off]); - } - } - u_format_signed_encode_rgtc_ubyte(dst, tmp_r, 4, 4); - u_format_signed_encode_rgtc_ubyte(dst + 8, tmp_g, 4, 4); - dst += bytes_per_block; - } - dst_row += dst_stride / sizeof(*dst_row); - } -} - -void -util_format_rgtc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_rxtc2_snorm_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height, 1); -} - -void -util_format_rgtc2_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - int8_t tmp_r, tmp_g; - u_format_signed_fetch_texel_rgtc(0, (int8_t *)src, i, j, &tmp_r, 2); - u_format_signed_fetch_texel_rgtc(0, (int8_t *)src + 8, i, j, &tmp_g, 2); - dst[0] = byte_to_float_tex(tmp_r); - dst[1] = byte_to_float_tex(tmp_g); - dst[2] = 0.0; - dst[3] = 1.0; -} - - -#define TAG(x) u_format_unsigned_##x -#define TYPE uint8_t -#define T_MIN 0 -#define T_MAX 255 - -#include "../../../mesa/main/texcompress_rgtc_tmp.h" - -#undef TYPE -#undef TAG -#undef T_MIN -#undef T_MAX - - -#define TAG(x) u_format_signed_##x -#define TYPE int8_t -#define T_MIN (int8_t)-128 -#define T_MAX (int8_t)127 - -#include "../../../mesa/main/texcompress_rgtc_tmp.h" - -#undef TYPE -#undef TAG -#undef T_MIN -#undef T_MAX diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_rgtc.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_rgtc.h deleted file mode 100644 index 67ac4728e56..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_rgtc.h +++ /dev/null @@ -1,114 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Red Hat Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - **************************************************************************/ - -#ifndef U_FORMAT_RGTC_H_ -#define U_FORMAT_RGTC_H_ - -void -util_format_rgtc1_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_rgtc1_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_rgtc1_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_rgtc1_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_rgtc1_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_rgtc1_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j); - - - -void -util_format_rgtc1_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_rgtc1_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_rgtc1_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_rgtc1_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_rgtc1_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_rgtc1_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j); - - -void -util_format_rgtc2_unorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_rgtc2_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_rgtc2_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_rxtc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height, unsigned chan2off); - -void -util_format_rgtc2_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_rgtc2_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_rgtc2_unorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j); - - -void -util_format_rgtc2_snorm_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_rgtc2_snorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_rgtc2_snorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_rgtc2_snorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_rxtc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height, unsigned chan2off); - -void -util_format_rgtc2_snorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_rgtc2_snorm_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j); - - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_s3tc.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_s3tc.c deleted file mode 100644 index d8a7c0d453f..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_s3tc.c +++ /dev/null @@ -1,735 +0,0 @@ -/************************************************************************** - * - * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. - * Copyright (c) 2008 VMware, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "u_dl.h" -#include "u_math.h" -#include "u_format.h" -#include "u_format_s3tc.h" - - -#if defined(_WIN32) || defined(WIN32) -#define DXTN_LIBNAME "dxtn.dll" -#elif defined(__APPLE__) -#define DXTN_LIBNAME "libtxc_dxtn.dylib" -#else -#define DXTN_LIBNAME "libtxc_dxtn.so" -#endif - - -static void -util_format_dxt1_rgb_fetch_stub(int src_stride, - const uint8_t *src, - int col, int row, - uint8_t *dst) -{ - assert(0); -} - - -static void -util_format_dxt1_rgba_fetch_stub(int src_stride, - const uint8_t *src, - int col, int row, - uint8_t *dst ) -{ - assert(0); -} - - -static void -util_format_dxt3_rgba_fetch_stub(int src_stride, - const uint8_t *src, - int col, int row, - uint8_t *dst ) -{ - assert(0); -} - - -static void -util_format_dxt5_rgba_fetch_stub(int src_stride, - const uint8_t *src, - int col, int row, - uint8_t *dst ) -{ - assert(0); -} - - -static void -util_format_dxtn_pack_stub(int src_comps, - int width, int height, - const uint8_t *src, - enum util_format_dxtn dst_format, - uint8_t *dst, - int dst_stride) -{ - assert(0); -} - - -boolean util_format_s3tc_enabled = FALSE; - -util_format_dxtn_fetch_t util_format_dxt1_rgb_fetch = util_format_dxt1_rgb_fetch_stub; -util_format_dxtn_fetch_t util_format_dxt1_rgba_fetch = util_format_dxt1_rgba_fetch_stub; -util_format_dxtn_fetch_t util_format_dxt3_rgba_fetch = util_format_dxt3_rgba_fetch_stub; -util_format_dxtn_fetch_t util_format_dxt5_rgba_fetch = util_format_dxt5_rgba_fetch_stub; - -util_format_dxtn_pack_t util_format_dxtn_pack = util_format_dxtn_pack_stub; - - -void -util_format_s3tc_init(void) -{ - static boolean first_time = TRUE; - struct util_dl_library *library = NULL; - util_dl_proc fetch_2d_texel_rgb_dxt1; - util_dl_proc fetch_2d_texel_rgba_dxt1; - util_dl_proc fetch_2d_texel_rgba_dxt3; - util_dl_proc fetch_2d_texel_rgba_dxt5; - util_dl_proc tx_compress_dxtn; - - if (!first_time) - return; - first_time = FALSE; - - if (util_format_s3tc_enabled) - return; - - library = util_dl_open(DXTN_LIBNAME); - if (!library) { - if (getenv("force_s3tc_enable") && - !strcmp(getenv("force_s3tc_enable"), "true")) { - debug_printf("couldn't open " DXTN_LIBNAME ", enabling DXTn due to " - "force_s3tc_enable=true environment variable\n"); - util_format_s3tc_enabled = TRUE; - } else { - debug_printf("couldn't open " DXTN_LIBNAME ", software DXTn " - "compression/decompression unavailable\n"); - } - return; - } - - fetch_2d_texel_rgb_dxt1 = - util_dl_get_proc_address(library, "fetch_2d_texel_rgb_dxt1"); - fetch_2d_texel_rgba_dxt1 = - util_dl_get_proc_address(library, "fetch_2d_texel_rgba_dxt1"); - fetch_2d_texel_rgba_dxt3 = - util_dl_get_proc_address(library, "fetch_2d_texel_rgba_dxt3"); - fetch_2d_texel_rgba_dxt5 = - util_dl_get_proc_address(library, "fetch_2d_texel_rgba_dxt5"); - tx_compress_dxtn = - util_dl_get_proc_address(library, "tx_compress_dxtn"); - - if (!util_format_dxt1_rgb_fetch || - !util_format_dxt1_rgba_fetch || - !util_format_dxt3_rgba_fetch || - !util_format_dxt5_rgba_fetch || - !util_format_dxtn_pack) { - debug_printf("couldn't reference all symbols in " DXTN_LIBNAME - ", software DXTn compression/decompression " - "unavailable\n"); - util_dl_close(library); - return; - } - - util_format_dxt1_rgb_fetch = (util_format_dxtn_fetch_t)fetch_2d_texel_rgb_dxt1; - util_format_dxt1_rgba_fetch = (util_format_dxtn_fetch_t)fetch_2d_texel_rgba_dxt1; - util_format_dxt3_rgba_fetch = (util_format_dxtn_fetch_t)fetch_2d_texel_rgba_dxt3; - util_format_dxt5_rgba_fetch = (util_format_dxtn_fetch_t)fetch_2d_texel_rgba_dxt5; - util_format_dxtn_pack = (util_format_dxtn_pack_t)tx_compress_dxtn; - util_format_s3tc_enabled = TRUE; -} - - -/* - * Pixel fetch. - */ - -void -util_format_dxt1_rgb_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) -{ - util_format_dxt1_rgb_fetch(0, src, i, j, dst); -} - -void -util_format_dxt1_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) -{ - util_format_dxt1_rgba_fetch(0, src, i, j, dst); -} - -void -util_format_dxt3_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) -{ - util_format_dxt3_rgba_fetch(0, src, i, j, dst); -} - -void -util_format_dxt5_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) -{ - util_format_dxt5_rgba_fetch(0, src, i, j, dst); -} - -void -util_format_dxt1_rgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t tmp[4]; - util_format_dxt1_rgb_fetch(0, src, i, j, tmp); - dst[0] = ubyte_to_float(tmp[0]); - dst[1] = ubyte_to_float(tmp[1]); - dst[2] = ubyte_to_float(tmp[2]); - dst[3] = 1.0; -} - -void -util_format_dxt1_rgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t tmp[4]; - util_format_dxt1_rgba_fetch(0, src, i, j, tmp); - dst[0] = ubyte_to_float(tmp[0]); - dst[1] = ubyte_to_float(tmp[1]); - dst[2] = ubyte_to_float(tmp[2]); - dst[3] = ubyte_to_float(tmp[3]); -} - -void -util_format_dxt3_rgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t tmp[4]; - util_format_dxt3_rgba_fetch(0, src, i, j, tmp); - dst[0] = ubyte_to_float(tmp[0]); - dst[1] = ubyte_to_float(tmp[1]); - dst[2] = ubyte_to_float(tmp[2]); - dst[3] = ubyte_to_float(tmp[3]); -} - -void -util_format_dxt5_rgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - uint8_t tmp[4]; - util_format_dxt5_rgba_fetch(0, src, i, j, tmp); - dst[0] = ubyte_to_float(tmp[0]); - dst[1] = ubyte_to_float(tmp[1]); - dst[2] = ubyte_to_float(tmp[2]); - dst[3] = ubyte_to_float(tmp[3]); -} - - -/* - * Block decompression. - */ - -static INLINE void -util_format_dxtn_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height, - util_format_dxtn_fetch_t fetch, - unsigned block_size) -{ - const unsigned bw = 4, bh = 4, comps = 4; - unsigned x, y, i, j; - for(y = 0; y < height; y += bh) { - const uint8_t *src = src_row; - for(x = 0; x < width; x += bw) { - for(j = 0; j < bh; ++j) { - for(i = 0; i < bw; ++i) { - uint8_t *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*comps; - fetch(0, src, i, j, dst); - } - } - src += block_size; - } - src_row += src_stride; - } -} - -void -util_format_dxt1_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride, - src_row, src_stride, - width, height, - util_format_dxt1_rgb_fetch, 8); -} - -void -util_format_dxt1_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride, - src_row, src_stride, - width, height, - util_format_dxt1_rgba_fetch, 8); -} - -void -util_format_dxt3_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride, - src_row, src_stride, - width, height, - util_format_dxt3_rgba_fetch, 16); -} - -void -util_format_dxt5_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride, - src_row, src_stride, - width, height, - util_format_dxt5_rgba_fetch, 16); -} - -static INLINE void -util_format_dxtn_rgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height, - util_format_dxtn_fetch_t fetch, - unsigned block_size) -{ - unsigned x, y, i, j; - for(y = 0; y < height; y += 4) { - const uint8_t *src = src_row; - for(x = 0; x < width; x += 4) { - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4; - uint8_t tmp[4]; - fetch(0, src, i, j, tmp); - dst[0] = ubyte_to_float(tmp[0]); - dst[1] = ubyte_to_float(tmp[1]); - dst[2] = ubyte_to_float(tmp[2]); - dst[3] = ubyte_to_float(tmp[3]); - } - } - src += block_size; - } - src_row += src_stride; - } -} - -void -util_format_dxt1_rgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride, - src_row, src_stride, - width, height, - util_format_dxt1_rgb_fetch, 8); -} - -void -util_format_dxt1_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride, - src_row, src_stride, - width, height, - util_format_dxt1_rgba_fetch, 8); -} - -void -util_format_dxt3_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride, - src_row, src_stride, - width, height, - util_format_dxt3_rgba_fetch, 16); -} - -void -util_format_dxt5_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride, - src_row, src_stride, - width, height, - util_format_dxt5_rgba_fetch, 16); -} - - -/* - * Block compression. - */ - -void -util_format_dxt1_rgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, - unsigned width, unsigned height) -{ - const unsigned bw = 4, bh = 4, bytes_per_block = 8; - unsigned x, y, i, j, k; - for(y = 0; y < height; y += bh) { - uint8_t *dst = dst_row; - for(x = 0; x < width; x += bw) { - uint8_t tmp[4][4][3]; /* [bh][bw][comps] */ - for(j = 0; j < bh; ++j) { - for(i = 0; i < bw; ++i) { - for(k = 0; k < 3; ++k) { - tmp[j][i][k] = src[(y + j)*src_stride/sizeof(*src) + (x + i)*4 + k]; - } - } - } - util_format_dxtn_pack(3, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT1_RGB, dst, 0); - dst += bytes_per_block; - } - dst_row += dst_stride / sizeof(*dst_row); - } -} - -void -util_format_dxt1_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, - unsigned width, unsigned height) -{ - const unsigned bw = 4, bh = 4, comps = 4, bytes_per_block = 8; - unsigned x, y, i, j, k; - for(y = 0; y < height; y += bh) { - uint8_t *dst = dst_row; - for(x = 0; x < width; x += bw) { - uint8_t tmp[4][4][4]; /* [bh][bw][comps] */ - for(j = 0; j < bh; ++j) { - for(i = 0; i < bw; ++i) { - for(k = 0; k < comps; ++k) { - tmp[j][i][k] = src[(y + j)*src_stride/sizeof(*src) + (x + i)*comps + k]; - } - } - } - util_format_dxtn_pack(4, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT1_RGBA, dst, 0); - dst += bytes_per_block; - } - dst_row += dst_stride / sizeof(*dst_row); - } -} - -void -util_format_dxt3_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, - unsigned width, unsigned height) -{ - const unsigned bw = 4, bh = 4, comps = 4, bytes_per_block = 16; - unsigned x, y, i, j, k; - for(y = 0; y < height; y += bh) { - uint8_t *dst = dst_row; - for(x = 0; x < width; x += bw) { - uint8_t tmp[4][4][4]; /* [bh][bw][comps] */ - for(j = 0; j < bh; ++j) { - for(i = 0; i < bw; ++i) { - for(k = 0; k < comps; ++k) { - tmp[j][i][k] = src[(y + j)*src_stride/sizeof(*src) + (x + i)*comps + k]; - } - } - } - util_format_dxtn_pack(4, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT3_RGBA, dst, 0); - dst += bytes_per_block; - } - dst_row += dst_stride / sizeof(*dst_row); - } -} - -void -util_format_dxt5_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src, unsigned src_stride, - unsigned width, unsigned height) -{ - const unsigned bw = 4, bh = 4, comps = 4, bytes_per_block = 16; - unsigned x, y, i, j, k; - - for(y = 0; y < height; y += bh) { - uint8_t *dst = dst_row; - for(x = 0; x < width; x += bw) { - uint8_t tmp[4][4][4]; /* [bh][bw][comps] */ - for(j = 0; j < bh; ++j) { - for(i = 0; i < bw; ++i) { - for(k = 0; k < comps; ++k) { - tmp[j][i][k] = src[(y + j)*src_stride/sizeof(*src) + (x + i)*comps + k]; - } - } - } - util_format_dxtn_pack(4, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT5_RGBA, dst, 0); - dst += bytes_per_block; - } - dst_row += dst_stride / sizeof(*dst_row); - } -} - -void -util_format_dxt1_rgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y, i, j, k; - for(y = 0; y < height; y += 4) { - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 4) { - uint8_t tmp[4][4][3]; - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - for(k = 0; k < 3; ++k) { - tmp[j][i][k] = float_to_ubyte(src[(y + j)*src_stride/sizeof(*src) + (x+i)*4 + k]); - } - } - } - util_format_dxtn_pack(3, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT1_RGB, dst, 0); - dst += 8; - } - dst_row += 4*dst_stride/sizeof(*dst_row); - } -} - -void -util_format_dxt1_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y, i, j, k; - for(y = 0; y < height; y += 4) { - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 4) { - uint8_t tmp[4][4][4]; - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - for(k = 0; k < 4; ++k) { - tmp[j][i][k] = float_to_ubyte(src[(y + j)*src_stride/sizeof(*src) + (x+i)*4 + k]); - } - } - } - util_format_dxtn_pack(4, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT1_RGBA, dst, 0); - dst += 8; - } - dst_row += 4*dst_stride/sizeof(*dst_row); - } -} - -void -util_format_dxt3_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y, i, j, k; - for(y = 0; y < height; y += 4) { - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 4) { - uint8_t tmp[4][4][4]; - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - for(k = 0; k < 4; ++k) { - tmp[j][i][k] = float_to_ubyte(src[(y + j)*src_stride/sizeof(*src) + (x+i)*4 + k]); - } - } - } - util_format_dxtn_pack(4, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT3_RGBA, dst, 0); - dst += 16; - } - dst_row += 4*dst_stride/sizeof(*dst_row); - } -} - -void -util_format_dxt5_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y, i, j, k; - for(y = 0; y < height; y += 4) { - uint8_t *dst = dst_row; - for(x = 0; x < width; x += 4) { - uint8_t tmp[4][4][4]; - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - for(k = 0; k < 4; ++k) { - tmp[j][i][k] = float_to_ubyte(src[(y + j)*src_stride/sizeof(*src) + (x+i)*4 + k]); - } - } - } - util_format_dxtn_pack(4, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT5_RGBA, dst, 0); - dst += 16; - } - dst_row += 4*dst_stride/sizeof(*dst_row); - } -} - - -/* - * SRGB variants. - * - * FIXME: shunts to RGB for now - */ - -void -util_format_dxt1_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_dxt1_rgb_unpack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_dxt1_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_dxt1_rgb_pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_dxt1_srgb_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) -{ - util_format_dxt1_rgb_fetch_rgba_8unorm(dst, src, i, j); -} - -void -util_format_dxt1_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_dxt1_rgba_unpack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_dxt1_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_dxt1_rgba_pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_dxt1_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) -{ - util_format_dxt1_rgba_fetch_rgba_8unorm(dst, src, i, j); -} - -void -util_format_dxt3_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_dxt3_rgba_unpack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_dxt3_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_dxt3_rgba_pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_dxt3_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) -{ - util_format_dxt3_rgba_fetch_rgba_8unorm(dst, src, i, j); -} - -void -util_format_dxt5_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_dxt5_rgba_unpack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_dxt5_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_dxt5_rgba_pack_rgba_8unorm(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_dxt5_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j) -{ - util_format_dxt5_rgba_fetch_rgba_8unorm(dst, src, i, j); -} - -void -util_format_dxt1_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_dxt1_rgb_unpack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_dxt1_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_dxt1_rgb_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_dxt1_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - util_format_dxt1_rgb_fetch_rgba_float(dst, src, i, j); -} - -void -util_format_dxt1_srgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_dxt1_rgba_unpack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_dxt1_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_dxt1_rgba_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_dxt1_srgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - util_format_dxt1_rgba_fetch_rgba_float(dst, src, i, j); -} - -void -util_format_dxt3_srgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_dxt3_rgba_unpack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_dxt3_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_dxt3_rgba_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_dxt3_srgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - util_format_dxt3_rgba_fetch_rgba_float(dst, src, i, j); -} - -void -util_format_dxt5_srgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_dxt5_rgba_unpack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_dxt5_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_dxt5_rgba_pack_rgba_float(dst_row, dst_stride, src_row, src_stride, width, height); -} - -void -util_format_dxt5_srgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j) -{ - util_format_dxt5_rgba_fetch_rgba_float(dst, src, i, j); -} - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_s3tc.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_s3tc.h deleted file mode 100644 index 97770abd422..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_s3tc.h +++ /dev/null @@ -1,218 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - **************************************************************************/ - - -#ifndef U_FORMAT_S3TC_H_ -#define U_FORMAT_S3TC_H_ - - -#include "pipe/p_compiler.h" - - -enum util_format_dxtn { - UTIL_FORMAT_DXT1_RGB = 0x83F0, - UTIL_FORMAT_DXT1_RGBA = 0x83F1, - UTIL_FORMAT_DXT3_RGBA = 0x83F2, - UTIL_FORMAT_DXT5_RGBA = 0x83F3 -}; - - -typedef void -(*util_format_dxtn_fetch_t)( int src_stride, - const uint8_t *src, - int col, int row, - uint8_t *dst ); - -typedef void -(*util_format_dxtn_pack_t)( int src_comps, - int width, int height, - const uint8_t *src, - enum util_format_dxtn dst_format, - uint8_t *dst, - int dst_stride); - -extern boolean util_format_s3tc_enabled; - -extern util_format_dxtn_fetch_t util_format_dxt1_rgb_fetch; -extern util_format_dxtn_fetch_t util_format_dxt1_rgba_fetch; -extern util_format_dxtn_fetch_t util_format_dxt3_rgba_fetch; -extern util_format_dxtn_fetch_t util_format_dxt5_rgba_fetch; - -extern util_format_dxtn_pack_t util_format_dxtn_pack; - - -void -util_format_s3tc_init(void); - - -void -util_format_dxt1_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt1_rgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt1_rgb_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_dxt1_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt1_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt1_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_dxt3_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt3_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt3_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_dxt5_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt5_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt5_rgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_dxt1_srgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt1_srgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt1_srgb_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_dxt1_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt1_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt1_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_dxt3_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt3_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt3_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_dxt5_srgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt5_srgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt5_srgba_fetch_rgba_8unorm(uint8_t *dst, const uint8_t *src, unsigned i, unsigned j); - - -void -util_format_dxt1_rgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt1_rgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt1_rgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_dxt1_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt1_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt1_rgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_dxt3_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt3_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt3_rgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_dxt5_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt5_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt5_rgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_dxt1_srgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt1_srgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt1_srgb_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_dxt1_srgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt1_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt1_srgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_dxt3_srgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt3_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt3_srgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j); - -void -util_format_dxt5_srgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt5_srgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_dxt5_srgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned i, unsigned j); - - -#endif /* U_FORMAT_S3TC_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_srgb.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_srgb.h deleted file mode 100644 index 43213fbeb3e..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_srgb.h +++ /dev/null @@ -1,106 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - **************************************************************************/ - -/** - * @file - * SRGB translation. - * - * @author Brian Paul - * @author Michal Krol - * @author Jose Fonseca - */ - -#ifndef U_FORMAT_SRGB_H_ -#define U_FORMAT_SRGB_H_ - - -#include "pipe/p_compiler.h" -#include "u_math.h" - - -extern const float -util_format_srgb_8unorm_to_linear_float_table[256]; - -extern const uint8_t -util_format_srgb_to_linear_8unorm_table[256]; - -extern const uint8_t -util_format_linear_to_srgb_8unorm_table[256]; - - -/** - * Convert a unclamped linear float to srgb value in the [0,255]. - * XXX this hasn't been tested (render to srgb surface). - * XXX this needs optimization. - */ -static INLINE uint8_t -util_format_linear_float_to_srgb_8unorm(float x) -{ - if (x >= 1.0f) - return 255; - else if (x >= 0.0031308f) - return float_to_ubyte(1.055f * powf(x, 0.41666f) - 0.055f); - else if (x > 0.0f) - return float_to_ubyte(12.92f * x); - else - return 0; -} - - -/** - * Convert an 8-bit sRGB value from non-linear space to a - * linear RGB value in [0, 1]. - * Implemented with a 256-entry lookup table. - */ -static INLINE float -util_format_srgb_8unorm_to_linear_float(uint8_t x) -{ - return util_format_srgb_8unorm_to_linear_float_table[x]; -} - - -/** - * Convert a 8bit normalized value from linear to srgb. - */ -static INLINE uint8_t -util_format_linear_to_srgb_8unorm(uint8_t x) -{ - return util_format_linear_to_srgb_8unorm_table[x]; -} - - -/** - * Convert a 8bit normalized value from srgb to linear. - */ -static INLINE uint8_t -util_format_srgb_to_linear_8unorm(uint8_t x) -{ - return util_format_srgb_to_linear_8unorm_table[x]; -} - - -#endif /* U_FORMAT_SRGB_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_srgb.py b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_srgb.py deleted file mode 100644 index cd63ae78919..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_srgb.py +++ /dev/null @@ -1,100 +0,0 @@ -#!/usr/bin/env python - -CopyRight = ''' -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * SRGB translation. - * - * @author Brian Paul - * @author Michal Krol - * @author Jose Fonseca - */ -''' - - -import math - - -def srgb_to_linear(x): - if x <= 0.04045: - return x / 12.92 - else: - return math.pow((x + 0.055) / 1.055, 2.4) - - -def linear_to_srgb(x): - if x >= 0.0031308: - return 1.055 * math.pow(x, 0.41666) - 0.055 - else: - return 12.92 * x - -def generate_srgb_tables(): - print 'const float' - print 'util_format_srgb_8unorm_to_linear_float_table[256] = {' - for j in range(0, 256, 4): - print ' ', - for i in range(j, j + 4): - print '%.7e,' % (srgb_to_linear(i / 255.0),), - print - print '};' - print - print 'const uint8_t' - print 'util_format_srgb_to_linear_8unorm_table[256] = {' - for j in range(0, 256, 16): - print ' ', - for i in range(j, j + 16): - print '%3u,' % (int(srgb_to_linear(i / 255.0) * 255.0 + 0.5),), - print - print '};' - print - print 'const uint8_t' - print 'util_format_linear_to_srgb_8unorm_table[256] = {' - for j in range(0, 256, 16): - print ' ', - for i in range(j, j + 16): - print '%3u,' % (int(linear_to_srgb(i / 255.0) * 255.0 + 0.5),), - print - print '};' - print - - -def main(): - print '/* This file is autogenerated by u_format_srgb.py. Do not edit directly. */' - print - # This will print the copyright message on the top of this file - print CopyRight.strip() - print - print '#include "u_format_srgb.h"' - print - generate_srgb_tables() - - -if __name__ == '__main__': - main() diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_table.py b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_table.py deleted file mode 100644 index 8edb505237d..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_table.py +++ /dev/null @@ -1,219 +0,0 @@ -#!/usr/bin/env python - -CopyRight = ''' -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ -''' - - -import sys - -from u_format_parse import * -import u_format_pack - - -def layout_map(layout): - return 'UTIL_FORMAT_LAYOUT_' + str(layout).upper() - - -def colorspace_map(colorspace): - return 'UTIL_FORMAT_COLORSPACE_' + str(colorspace).upper() - - -colorspace_channels_map = { - 'rgb': ['r', 'g', 'b', 'a'], - 'srgb': ['sr', 'sg', 'sb', 'a'], - 'zs': ['z', 's'], - 'yuv': ['y', 'u', 'v'], -} - - -type_map = { - VOID: "UTIL_FORMAT_TYPE_VOID", - UNSIGNED: "UTIL_FORMAT_TYPE_UNSIGNED", - SIGNED: "UTIL_FORMAT_TYPE_SIGNED", - FIXED: "UTIL_FORMAT_TYPE_FIXED", - FLOAT: "UTIL_FORMAT_TYPE_FLOAT", -} - - -def bool_map(value): - if value: - return "TRUE" - else: - return "FALSE" - - -swizzle_map = { - SWIZZLE_X: "UTIL_FORMAT_SWIZZLE_X", - SWIZZLE_Y: "UTIL_FORMAT_SWIZZLE_Y", - SWIZZLE_Z: "UTIL_FORMAT_SWIZZLE_Z", - SWIZZLE_W: "UTIL_FORMAT_SWIZZLE_W", - SWIZZLE_0: "UTIL_FORMAT_SWIZZLE_0", - SWIZZLE_1: "UTIL_FORMAT_SWIZZLE_1", - SWIZZLE_NONE: "UTIL_FORMAT_SWIZZLE_NONE", -} - - -def write_format_table(formats): - print '/* This file is autogenerated by u_format_table.py from u_format.csv. Do not edit directly. */' - print - # This will print the copyright message on the top of this file - print CopyRight.strip() - print - print '#include "u_format.h"' - print '#include "u_format_s3tc.h"' - print '#include "u_format_rgtc.h"' - print '#include "u_format_latc.h"' - print '#include "u_format_etc.h"' - print - - u_format_pack.generate(formats) - - for format in formats: - print 'const struct util_format_description' - print 'util_format_%s_description = {' % (format.short_name(),) - print " %s," % (format.name,) - print " \"%s\"," % (format.name,) - print " \"%s\"," % (format.short_name(),) - print " {%u, %u, %u},\t/* block */" % (format.block_width, format.block_height, format.block_size()) - print " %s," % (layout_map(format.layout),) - print " %u,\t/* nr_channels */" % (format.nr_channels(),) - print " %s,\t/* is_array */" % (bool_map(format.is_array()),) - print " %s,\t/* is_bitmask */" % (bool_map(format.is_bitmask()),) - print " %s,\t/* is_mixed */" % (bool_map(format.is_mixed()),) - print " {" - for i in range(4): - channel = format.channels[i] - if i < 3: - sep = "," - else: - sep = "" - if channel.size: - print " {%s, %s, %s, %u}%s\t/* %s = %s */" % (type_map[channel.type], bool_map(channel.norm), bool_map(channel.pure), channel.size, sep, "xyzw"[i], channel.name) - else: - print " {0, 0, 0, 0}%s" % (sep,) - print " }," - print " {" - for i in range(4): - swizzle = format.swizzles[i] - if i < 3: - sep = "," - else: - sep = "" - try: - comment = colorspace_channels_map[format.colorspace][i] - except (KeyError, IndexError): - comment = 'ignored' - print " %s%s\t/* %s */" % (swizzle_map[swizzle], sep, comment) - print " }," - print " %s," % (colorspace_map(format.colorspace),) - if format.colorspace != ZS and format.channels[0].pure == False: - print " &util_format_%s_unpack_rgba_8unorm," % format.short_name() - print " &util_format_%s_pack_rgba_8unorm," % format.short_name() - if format.layout == 's3tc' or format.layout == 'rgtc': - print " &util_format_%s_fetch_rgba_8unorm," % format.short_name() - else: - print " NULL, /* fetch_rgba_8unorm */" - print " &util_format_%s_unpack_rgba_float," % format.short_name() - print " &util_format_%s_pack_rgba_float," % format.short_name() - print " &util_format_%s_fetch_rgba_float," % format.short_name() - else: - print " NULL, /* unpack_rgba_8unorm */" - print " NULL, /* pack_rgba_8unorm */" - print " NULL, /* fetch_rgba_8unorm */" - print " NULL, /* unpack_rgba_float */" - print " NULL, /* pack_rgba_float */" - print " NULL, /* fetch_rgba_float */" - if format.colorspace == ZS and format.swizzles[0] != SWIZZLE_NONE: - print " &util_format_%s_unpack_z_32unorm," % format.short_name() - print " &util_format_%s_pack_z_32unorm," % format.short_name() - print " &util_format_%s_unpack_z_float," % format.short_name() - print " &util_format_%s_pack_z_float," % format.short_name() - else: - print " NULL, /* unpack_z_32unorm */" - print " NULL, /* pack_z_32unorm */" - print " NULL, /* unpack_z_float */" - print " NULL, /* pack_z_float */" - if format.colorspace == ZS and format.swizzles[1] != SWIZZLE_NONE: - print " &util_format_%s_unpack_s_8uint," % format.short_name() - print " &util_format_%s_pack_s_8uint," % format.short_name() - else: - print " NULL, /* unpack_s_8uint */" - print " NULL, /* pack_s_8uint */" - if format.colorspace != ZS and format.channels[0].pure == True and format.channels[0].type == UNSIGNED: - print " &util_format_%s_unpack_unsigned, /* unpack_rgba_uint */" % format.short_name() - print " &util_format_%s_pack_unsigned, /* pack_rgba_uint */" % format.short_name() - print " &util_format_%s_unpack_signed, /* unpack_rgba_sint */" % format.short_name() - print " &util_format_%s_pack_signed, /* pack_rgba_sint */" % format.short_name() - print " &util_format_%s_fetch_unsigned, /* fetch_rgba_uint */" % format.short_name() - print " NULL /* fetch_rgba_sint */" - elif format.colorspace != ZS and format.channels[0].pure == True and format.channels[0].type == SIGNED: - print " &util_format_%s_unpack_unsigned, /* unpack_rgba_uint */" % format.short_name() - print " &util_format_%s_pack_unsigned, /* pack_rgba_uint */" % format.short_name() - print " &util_format_%s_unpack_signed, /* unpack_rgba_sint */" % format.short_name() - print " &util_format_%s_pack_signed, /* pack_rgba_sint */" % format.short_name() - print " NULL, /* fetch_rgba_uint */" - print " &util_format_%s_fetch_signed /* fetch_rgba_sint */" % format.short_name() - else: - print " NULL, /* unpack_rgba_uint */" - print " NULL, /* pack_rgba_uint */" - print " NULL, /* unpack_rgba_sint */" - print " NULL, /* pack_rgba_sint */" - print " NULL, /* fetch_rgba_uint */" - print " NULL /* fetch_rgba_sint */" - print "};" - print - - print "const struct util_format_description *" - print "util_format_description(enum pipe_format format)" - print "{" - print " if (format >= PIPE_FORMAT_COUNT) {" - print " return NULL;" - print " }" - print - print " switch (format) {" - for format in formats: - print " case %s:" % format.name - print " return &util_format_%s_description;" % (format.short_name(),) - print " default:" - print " return NULL;" - print " }" - print "}" - print - - -def main(): - - formats = [] - for arg in sys.argv[1:]: - formats.extend(parse(arg)) - write_format_table(formats) - - -if __name__ == '__main__': - main() diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_tests.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_tests.c deleted file mode 100644 index fc29d8d4817..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_tests.c +++ /dev/null @@ -1,970 +0,0 @@ -/************************************************************************** - * - * Copyright 2009-2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#include "u_memory.h" -#include "u_format_tests.h" - - -/* - * Helper macros to create the packed bytes for longer words. - */ - -#define PACKED_1x8(x) {x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} -#define PACKED_2x8(x, y) {x, y, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} -#define PACKED_3x8(x, y, z) {x, y, z, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} -#define PACKED_4x8(x, y, z, w) {x, y, z, w, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} -#define PACKED_8x8(a, b, c, d, e, f, g, h) {a, b, c, d, e, f, g, h, 0, 0, 0, 0, 0, 0, 0, 0} - -#define PACKED_1x16(x) {(x) & 0xff, (x) >> 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} -#define PACKED_2x16(x, y) {(x) & 0xff, (x) >> 8, (y) & 0xff, (y) >> 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} -#define PACKED_3x16(x, y, z) {(x) & 0xff, (x) >> 8, (y) & 0xff, (y) >> 8, (z) & 0xff, (z) >> 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} -#define PACKED_4x16(x, y, z, w) {(x) & 0xff, (x) >> 8, (y) & 0xff, (y) >> 8, (z) & 0xff, (z) >> 8, (w) & 0xff, (w) >> 8, 0, 0, 0, 0, 0, 0, 0, 0} - -#define PACKED_1x32(x) {(x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, (x) >> 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} -#define PACKED_2x32(x, y) {(x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, (x) >> 24, (y) & 0xff, ((y) >> 8) & 0xff, ((y) >> 16) & 0xff, (y) >> 24, 0, 0, 0, 0, 0, 0, 0, 0} -#define PACKED_3x32(x, y, z) {(x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, (x) >> 24, (y) & 0xff, ((y) >> 8) & 0xff, ((y) >> 16) & 0xff, (y) >> 24, (z) & 0xff, ((z) >> 8) & 0xff, ((z) >> 16) & 0xff, (z) >> 24, 0, 0, 0, 0} -#define PACKED_4x32(x, y, z, w) {(x) & 0xff, ((x) >> 8) & 0xff, ((x) >> 16) & 0xff, (x) >> 24, (y) & 0xff, ((y) >> 8) & 0xff, ((y) >> 16) & 0xff, (y) >> 24, (z) & 0xff, ((z) >> 8) & 0xff, ((z) >> 16) & 0xff, (z) >> 24, (w) & 0xff, ((w) >> 8) & 0xff, ((w) >> 16) & 0xff, (w) >> 24} - -#define UNPACKED_1x1(r, g, b, a) \ - {{{r, g, b, a}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, \ - {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, \ - {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, \ - {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}} - -#define UNPACKED_2x1(r0, g0, b0, a0, r1, g1, b1, a1) \ - {{{r0, g0, b0, a0}, {r1, g1, b1, a1}, {0, 0, 0, 0}, {0, 0, 0, 0}}, \ - {{ 0, 0, 0, 0}, { 0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, \ - {{ 0, 0, 0, 0}, { 0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, \ - {{ 0, 0, 0, 0}, { 0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}} - - -/** - * Test cases. - * - * These were manually entered. We could generate these - * - * To keep this to a we cover only the corner cases, which should produce - * good enough coverage since that pixel format transformations are afine for - * non SRGB formats. - */ -const struct util_format_test_case -util_format_test_cases[] = -{ - - /* - * 32-bit rendertarget formats - */ - - {PIPE_FORMAT_B8G8R8A8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_B8G8R8A8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_B8G8R8A8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000ff00), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_B8G8R8A8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00ff0000), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_B8G8R8A8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_B8G8R8A8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_B8G8R8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_B8G8R8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_B8G8R8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x0000ff00), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_B8G8R8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00ff0000), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_B8G8R8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_B8G8R8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_A8R8G8B8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_A8R8G8B8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_A8R8G8B8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000ff00), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_A8R8G8B8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00ff0000), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_A8R8G8B8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_A8R8G8B8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_X8R8G8B8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_X8R8G8B8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_X8R8G8B8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x0000ff00), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_X8R8G8B8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x00ff0000), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_X8R8G8B8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0xff000000), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_X8R8G8B8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_A8B8G8R8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_A8B8G8R8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_A8B8G8R8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000ff00), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_A8B8G8R8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00ff0000), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_A8B8G8R8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_A8B8G8R8_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_X8B8G8R8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_X8B8G8R8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_X8B8G8R8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x0000ff00), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_X8B8G8R8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x00ff0000), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_X8B8G8R8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0xff000000), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_X8B8G8R8_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_R8G8B8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x0000ff00), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00ff0000), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_R8G8B8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_R10G10B10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R10G10B10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000003ff), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R10G10B10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000ffc00), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_R10G10B10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x3ff00000), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_R10G10B10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xc0000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R10G10B10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_B10G10R10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_B10G10R10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000003ff), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_B10G10R10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000ffc00), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_B10G10R10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x3ff00000), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_B10G10R10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xc0000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_B10G10R10A2_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - /* - * 16-bit rendertarget formats - */ - - {PIPE_FORMAT_B5G5R5X1_UNORM, PACKED_1x16(0x7fff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_B5G5R5X1_UNORM, PACKED_1x16(0x7fff), PACKED_1x16(0x001f), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_B5G5R5X1_UNORM, PACKED_1x16(0x7fff), PACKED_1x16(0x03e0), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_B5G5R5X1_UNORM, PACKED_1x16(0x7fff), PACKED_1x16(0x7c00), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_B5G5R5X1_UNORM, PACKED_1x16(0x7fff), PACKED_1x16(0x7fff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_B5G5R5A1_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_B5G5R5A1_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x001f), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_B5G5R5A1_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x03e0), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_B5G5R5A1_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x7c00), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_B5G5R5A1_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x8000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_B5G5R5A1_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_B4G4R4X4_UNORM, PACKED_1x16(0x0fff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_B4G4R4X4_UNORM, PACKED_1x16(0x0fff), PACKED_1x16(0x000f), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_B4G4R4X4_UNORM, PACKED_1x16(0x0fff), PACKED_1x16(0x00f0), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_B4G4R4X4_UNORM, PACKED_1x16(0x0fff), PACKED_1x16(0x0f00), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_B4G4R4X4_UNORM, PACKED_1x16(0x0fff), PACKED_1x16(0x0fff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_B4G4R4A4_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_B4G4R4A4_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x000f), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_B4G4R4A4_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x00f0), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_B4G4R4A4_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0f00), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_B4G4R4A4_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xf000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_B4G4R4A4_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_B5G6R5_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_B5G6R5_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x001f), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_B5G6R5_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x07e0), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_B5G6R5_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xf800), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_B5G6R5_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - /* - * Luminance/intensity/alpha formats - */ - - {PIPE_FORMAT_L8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_L8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0xff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_A8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_A8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0xff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - - {PIPE_FORMAT_I8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_I8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0xff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_L4A4_UNORM, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_L4A4_UNORM, PACKED_1x8(0xff), PACKED_1x8(0x0f), UNPACKED_1x1(1.0, 1.0, 1.0, 0.0)}, - {PIPE_FORMAT_L4A4_UNORM, PACKED_1x8(0xff), PACKED_1x8(0xf0), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_L4A4_UNORM, PACKED_1x8(0xff), PACKED_1x8(0xff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_L8A8_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_L8A8_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x00ff), UNPACKED_1x1(1.0, 1.0, 1.0, 0.0)}, - {PIPE_FORMAT_L8A8_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xff00), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_L8A8_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_L16_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_L16_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - /* - * SRGB formats - */ - - {PIPE_FORMAT_L8_SRGB, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_L8_SRGB, PACKED_1x8(0xff), PACKED_1x8(0xbc), UNPACKED_1x1(0.502886458033, 0.502886458033, 0.502886458033, 1.0)}, - {PIPE_FORMAT_L8_SRGB, PACKED_1x8(0xff), PACKED_1x8(0xff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_L8A8_SRGB, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_L8A8_SRGB, PACKED_1x16(0xffff), PACKED_1x16(0x00bc), UNPACKED_1x1(0.502886458033, 0.502886458033, 0.502886458033, 0.0)}, - {PIPE_FORMAT_L8A8_SRGB, PACKED_1x16(0xffff), PACKED_1x16(0x00ff), UNPACKED_1x1(1.0, 1.0, 1.0, 0.0)}, - {PIPE_FORMAT_L8A8_SRGB, PACKED_1x16(0xffff), PACKED_1x16(0xcc00), UNPACKED_1x1(0.0, 0.0, 0.0, 0.8)}, - {PIPE_FORMAT_L8A8_SRGB, PACKED_1x16(0xffff), PACKED_1x16(0xff00), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_L8A8_SRGB, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_R8G8B8_SRGB, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_SRGB, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0xbc, 0x00, 0x00), UNPACKED_1x1(0.502886458033, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_SRGB, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0xff, 0x00, 0x00), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_SRGB, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0xbc, 0x00), UNPACKED_1x1(0.0, 0.502886458033, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_SRGB, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0xff, 0x00), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_SRGB, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0xbc), UNPACKED_1x1(0.0, 0.0, 0.502886458033, 1.0)}, - {PIPE_FORMAT_R8G8B8_SRGB, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0xff), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_SRGB, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0xff, 0xff, 0xff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_R8G8B8A8_SRGB, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SRGB, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xbc, 0x00, 0x00, 0x00), UNPACKED_1x1(0.502886458033, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SRGB, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0x00, 0x00, 0x00), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SRGB, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0xbc, 0x00, 0x00), UNPACKED_1x1(0.0, 0.502886458033, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SRGB, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0xff, 0x00, 0x00), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SRGB, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0xbc, 0x00), UNPACKED_1x1(0.0, 0.0, 0.502886458033, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SRGB, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0xff, 0x00), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SRGB, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0xcc), UNPACKED_1x1(0.0, 0.0, 0.0, 0.8)}, - {PIPE_FORMAT_R8G8B8A8_SRGB, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0xff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8A8_SRGB, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0xff, 0xff, 0xff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_B8G8R8A8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_B8G8R8A8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000bc), UNPACKED_1x1(0.0, 0.0, 0.502886458033, 0.0)}, - {PIPE_FORMAT_B8G8R8A8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_B8G8R8A8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000bc00), UNPACKED_1x1(0.0, 0.502886458033, 0.0, 0.0)}, - {PIPE_FORMAT_B8G8R8A8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000ff00), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_B8G8R8A8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x00bc0000), UNPACKED_1x1(0.502886458033, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_B8G8R8A8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x00ff0000), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_B8G8R8A8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0xcc000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.8)}, - {PIPE_FORMAT_B8G8R8A8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_B8G8R8A8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_B8G8R8X8_SRGB, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_B8G8R8X8_SRGB, PACKED_1x32(0x00ffffff), PACKED_1x32(0x000000bc), UNPACKED_1x1(0.0, 0.0, 0.502886458033, 1.0)}, - {PIPE_FORMAT_B8G8R8X8_SRGB, PACKED_1x32(0x00ffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_B8G8R8X8_SRGB, PACKED_1x32(0x00ffffff), PACKED_1x32(0x0000bc00), UNPACKED_1x1(0.0, 0.502886458033, 0.0, 1.0)}, - {PIPE_FORMAT_B8G8R8X8_SRGB, PACKED_1x32(0x00ffffff), PACKED_1x32(0x0000ff00), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_B8G8R8X8_SRGB, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00bc0000), UNPACKED_1x1(0.502886458033, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_B8G8R8X8_SRGB, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00ff0000), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_B8G8R8X8_SRGB, PACKED_1x32(0x00ffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_A8R8G8B8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_A8R8G8B8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000cc), UNPACKED_1x1(0.0, 0.0, 0.0, 0.8)}, - {PIPE_FORMAT_A8R8G8B8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_A8R8G8B8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000bc00), UNPACKED_1x1(0.502886458033, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_A8R8G8B8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000ff00), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_A8R8G8B8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x00bc0000), UNPACKED_1x1(0.0, 0.502886458033, 0.0, 0.0)}, - {PIPE_FORMAT_A8R8G8B8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x00ff0000), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_A8R8G8B8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0xbc000000), UNPACKED_1x1(0.0, 0.0, 0.502886458033, 0.0)}, - {PIPE_FORMAT_A8R8G8B8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_A8R8G8B8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_X8R8G8B8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_X8R8G8B8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0x0000bc00), UNPACKED_1x1(0.502886458033, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_X8R8G8B8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0x0000ff00), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_X8R8G8B8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0x00bc0000), UNPACKED_1x1(0.0, 0.502886458033, 0.0, 1.0)}, - {PIPE_FORMAT_X8R8G8B8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0x00ff0000), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_X8R8G8B8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0xbc000000), UNPACKED_1x1(0.0, 0.0, 0.502886458033, 1.0)}, - {PIPE_FORMAT_X8R8G8B8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0xff000000), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_X8R8G8B8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_A8B8G8R8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_A8B8G8R8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000cc), UNPACKED_1x1(0.0, 0.0, 0.0, 0.8)}, - {PIPE_FORMAT_A8B8G8R8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_A8B8G8R8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000bc00), UNPACKED_1x1(0.0, 0.0, 0.502886458033, 0.0)}, - {PIPE_FORMAT_A8B8G8R8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x0000ff00), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_A8B8G8R8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x00bc0000), UNPACKED_1x1(0.0, 0.502886458033, 0.0, 0.0)}, - {PIPE_FORMAT_A8B8G8R8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0x00ff0000), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_A8B8G8R8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0xbc000000), UNPACKED_1x1(0.502886458033, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_A8B8G8R8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_A8B8G8R8_SRGB, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_X8B8G8R8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_X8B8G8R8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0x0000bc00), UNPACKED_1x1(0.0, 0.0, 0.502886458033, 1.0)}, - {PIPE_FORMAT_X8B8G8R8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0x0000ff00), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_X8B8G8R8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0x00bc0000), UNPACKED_1x1(0.0, 0.502886458033, 0.0, 1.0)}, - {PIPE_FORMAT_X8B8G8R8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0x00ff0000), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_X8B8G8R8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0xbc000000), UNPACKED_1x1(0.502886458033, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_X8B8G8R8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0xff000000), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_X8B8G8R8_SRGB, PACKED_1x32(0xffffff00), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - /* - * Mixed-signed formats - */ - - {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_4x8(0xff, 0xff, 0xff, 0x00), PACKED_4x8(0x00, 0x00, 0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_4x8(0xff, 0xff, 0xff, 0x00), PACKED_4x8(0x7f, 0x00, 0x00, 0x00), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_4x8(0xff, 0xff, 0xff, 0x00), PACKED_4x8(0x81, 0x00, 0x00, 0x00), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_4x8(0xff, 0xff, 0xff, 0x00), PACKED_4x8(0x00, 0x7f, 0x00, 0x00), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_4x8(0xff, 0xff, 0xff, 0x00), PACKED_4x8(0x00, 0x81, 0x00, 0x00), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8SG8SB8UX8U_NORM, PACKED_4x8(0xff, 0xff, 0xff, 0x00), PACKED_4x8(0x00, 0x00, 0xff, 0x00), UNPACKED_1x1( 0.0, 0.0, 1.0, 1.0)}, - - {PIPE_FORMAT_R10SG10SB10SA2U_NORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R10SG10SB10SA2U_NORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000001ff), UNPACKED_1x1( 1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R10SG10SB10SA2U_NORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000201), UNPACKED_1x1(-1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R10SG10SB10SA2U_NORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x0007fc00), UNPACKED_1x1( 0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_R10SG10SB10SA2U_NORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00080400), UNPACKED_1x1( 0.0, -1.0, 0.0, 0.0)}, - {PIPE_FORMAT_R10SG10SB10SA2U_NORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x1ff00000), UNPACKED_1x1( 0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_R10SG10SB10SA2U_NORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x20100000), UNPACKED_1x1( 0.0, 0.0, -1.0, 0.0)}, - {PIPE_FORMAT_R10SG10SB10SA2U_NORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xc0000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R5SG5SB6U_NORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R5SG5SB6U_NORM, PACKED_1x16(0xffff), PACKED_1x16(0x000f), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R5SG5SB6U_NORM, PACKED_1x16(0xffff), PACKED_1x16(0x0011), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R5SG5SB6U_NORM, PACKED_1x16(0xffff), PACKED_1x16(0x01e0), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R5SG5SB6U_NORM, PACKED_1x16(0xffff), PACKED_1x16(0x0220), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R5SG5SB6U_NORM, PACKED_1x16(0xffff), PACKED_1x16(0xfc00), UNPACKED_1x1( 0.0, 0.0, 1.0, 1.0)}, - - {PIPE_FORMAT_R8G8Bx_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_R8G8Bx_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x7f, 0x00), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8Bx_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x81, 0x00), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8Bx_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x7f), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8Bx_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x81), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)}, - - /* - * Depth-stencil formats - */ - - {PIPE_FORMAT_S8_UINT, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_S8_UINT, PACKED_1x8(0xff), PACKED_1x8(0xff), UNPACKED_1x1(0.0, 255.0, 0.0, 0.0)}, - - {PIPE_FORMAT_Z16_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_Z16_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - - {PIPE_FORMAT_Z32_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_Z32_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - - {PIPE_FORMAT_Z32_FLOAT, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_Z32_FLOAT, PACKED_1x32(0xffffffff), PACKED_1x32(0x3f800000), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - - {PIPE_FORMAT_Z24_UNORM_S8_UINT, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_Z24_UNORM_S8_UINT, PACKED_1x32(0xffffffff), PACKED_1x32(0x00ffffff), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_Z24_UNORM_S8_UINT, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(0.0, 255.0, 0.0, 0.0)}, - {PIPE_FORMAT_Z24_UNORM_S8_UINT, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 255.0, 0.0, 0.0)}, - - {PIPE_FORMAT_S8_UINT_Z24_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_S8_UINT_Z24_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffff00), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_S8_UINT_Z24_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x000000ff), UNPACKED_1x1(0.0, 255.0, 0.0, 0.0)}, - {PIPE_FORMAT_S8_UINT_Z24_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 255.0, 0.0, 0.0)}, - - {PIPE_FORMAT_Z24X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_Z24X8_UNORM, PACKED_1x32(0x00ffffff), PACKED_1x32(0x00ffffff), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - - {PIPE_FORMAT_X8Z24_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_X8Z24_UNORM, PACKED_1x32(0xffffff00), PACKED_1x32(0xffffff00), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - - {PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, PACKED_2x32(0xffffffff, 0x000000ff), PACKED_2x32(0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, PACKED_2x32(0xffffffff, 0x000000ff), PACKED_2x32(0x3f800000, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, PACKED_2x32(0xffffffff, 0x000000ff), PACKED_2x32(0x00000000, 0x000000ff), UNPACKED_1x1( 0.0, 255.0, 0.0, 0.0)}, - - /* - * YUV formats - */ - - {PIPE_FORMAT_R8G8_B8G8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x00), UNPACKED_2x1(0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8_B8G8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0x00, 0x00, 0x00), UNPACKED_2x1(1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8_B8G8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0xff, 0x00, 0x00), UNPACKED_2x1(0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8_B8G8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0xff, 0x00), UNPACKED_2x1(0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_R8G8_B8G8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0xff), UNPACKED_2x1(0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8_B8G8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0xff, 0xff, 0xff), UNPACKED_2x1(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_G8R8_G8B8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x00), UNPACKED_2x1(0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_G8R8_G8B8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0x00, 0x00, 0x00), UNPACKED_2x1(0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_G8R8_G8B8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0xff, 0x00, 0x00), UNPACKED_2x1(1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_G8R8_G8B8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0xff, 0x00), UNPACKED_2x1(0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_G8R8_G8B8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0xff), UNPACKED_2x1(0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_G8R8_G8B8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0xff, 0xff, 0xff), UNPACKED_2x1(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)}, - - /* - * TODO: Exercise the UV channels as well. - */ - {PIPE_FORMAT_UYVY, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x80, 0x10, 0x80, 0x10), UNPACKED_2x1(0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_UYVY, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x80, 0xeb, 0x80, 0x10), UNPACKED_2x1(1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_UYVY, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x80, 0x10, 0x80, 0xeb), UNPACKED_2x1(0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_YUYV, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x10, 0x80, 0x10, 0x80), UNPACKED_2x1(0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_YUYV, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xeb, 0x80, 0x10, 0x80), UNPACKED_2x1(1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_YUYV, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x10, 0x80, 0xeb, 0x80), UNPACKED_2x1(0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0)}, - - /* - * Compressed formats - */ - - { - PIPE_FORMAT_DXT1_RGB, - PACKED_8x8(0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff), - PACKED_8x8(0xf2, 0xd7, 0xb0, 0x20, 0xae, 0x2c, 0x6f, 0x97), - { - { - {0x99/255.0, 0xb0/255.0, 0x8e/255.0, 0xff/255.0}, - {0x5d/255.0, 0x62/255.0, 0x89/255.0, 0xff/255.0}, - {0x99/255.0, 0xb0/255.0, 0x8e/255.0, 0xff/255.0}, - {0x99/255.0, 0xb0/255.0, 0x8e/255.0, 0xff/255.0} - }, - { - {0xd6/255.0, 0xff/255.0, 0x94/255.0, 0xff/255.0}, - {0x5d/255.0, 0x62/255.0, 0x89/255.0, 0xff/255.0}, - {0x99/255.0, 0xb0/255.0, 0x8e/255.0, 0xff/255.0}, - {0xd6/255.0, 0xff/255.0, 0x94/255.0, 0xff/255.0} - }, - { - {0x5d/255.0, 0x62/255.0, 0x89/255.0, 0xff/255.0}, - {0x5d/255.0, 0x62/255.0, 0x89/255.0, 0xff/255.0}, - {0x99/255.0, 0xb0/255.0, 0x8e/255.0, 0xff/255.0}, - {0x21/255.0, 0x14/255.0, 0x84/255.0, 0xff/255.0} - }, - { - {0x5d/255.0, 0x62/255.0, 0x89/255.0, 0xff/255.0}, - {0x21/255.0, 0x14/255.0, 0x84/255.0, 0xff/255.0}, - {0x21/255.0, 0x14/255.0, 0x84/255.0, 0xff/255.0}, - {0x99/255.0, 0xb0/255.0, 0x8e/255.0, 0xff/255.0} - } - } - }, - { - PIPE_FORMAT_DXT1_RGBA, - PACKED_8x8(0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff), - PACKED_8x8(0xff, 0x2f, 0xa4, 0x72, 0xeb, 0xb2, 0xbd, 0xbe), - { - { - {0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0}, - {0x4e/255.0, 0xaa/255.0, 0x90/255.0, 0xff/255.0}, - {0x4e/255.0, 0xaa/255.0, 0x90/255.0, 0xff/255.0}, - {0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0} - }, - { - {0x4e/255.0, 0xaa/255.0, 0x90/255.0, 0xff/255.0}, - {0x29/255.0, 0xff/255.0, 0xff/255.0, 0xff/255.0}, - {0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0}, - {0x4e/255.0, 0xaa/255.0, 0x90/255.0, 0xff/255.0} - }, - { - {0x73/255.0, 0x55/255.0, 0x21/255.0, 0xff/255.0}, - {0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0}, - {0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0}, - {0x4e/255.0, 0xaa/255.0, 0x90/255.0, 0xff/255.0} - }, - { - {0x4e/255.0, 0xaa/255.0, 0x90/255.0, 0xff/255.0}, - {0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0}, - {0x00/255.0, 0x00/255.0, 0x00/255.0, 0x00/255.0}, - {0x4e/255.0, 0xaa/255.0, 0x90/255.0, 0xff/255.0} - } - } - }, - { - PIPE_FORMAT_DXT3_RGBA, - {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - {0xe7, 0x4a, 0x8f, 0x96, 0x5b, 0xc1, 0x1c, 0x84, 0xf6, 0x8f, 0xab, 0x32, 0x2a, 0x9a, 0x95, 0x5a}, - { - { - {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0x77/255.0}, - {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0xee/255.0}, - {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0xaa/255.0}, - {0x8c/255.0, 0xff/255.0, 0xb5/255.0, 0x44/255.0} - }, - { - {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0xff/255.0}, - {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0x88/255.0}, - {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0x66/255.0}, - {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0x99/255.0} - }, - { - {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0xbb/255.0}, - {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0x55/255.0}, - {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0x11/255.0}, - {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0xcc/255.0} - }, - { - {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0xcc/255.0}, - {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0x11/255.0}, - {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0x44/255.0}, - {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0x88/255.0} - } - } - }, - { - PIPE_FORMAT_DXT5_RGBA, - {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - {0xf8, 0x11, 0xc5, 0x0c, 0x9a, 0x73, 0xb4, 0x9c, 0xf6, 0x8f, 0xab, 0x32, 0x2a, 0x9a, 0x95, 0x5a}, - { - { - {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0x74/255.0}, - {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0xf8/255.0}, - {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0xb6/255.0}, - {0x8c/255.0, 0xff/255.0, 0xb5/255.0, 0x53/255.0} - }, - { - {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0xf8/255.0}, - {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0x95/255.0}, - {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0x53/255.0}, - {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0x95/255.0} - }, - { - {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0xb6/255.0}, - {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0x53/255.0}, - {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0x11/255.0}, - {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0xd7/255.0} - }, - { - {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0xb6/255.0}, - {0x6d/255.0, 0xc6/255.0, 0x96/255.0, 0x11/255.0}, - {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0x32/255.0}, - {0x31/255.0, 0x55/255.0, 0x5a/255.0, 0x95/255.0} - } - } - }, - - - /* - * Standard 8-bit integer formats - */ - - {PIPE_FORMAT_R8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8_UNORM, PACKED_1x8(0xff), PACKED_1x8(0xff), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R8G8_UNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8_UNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0xff, 0x00), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8_UNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0xff), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8_UNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0xff, 0xff), UNPACKED_1x1(1.0, 1.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R8G8B8_UNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_UNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0xff, 0x00, 0x00), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_UNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0xff, 0x00), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_UNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0xff), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_UNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0xff, 0xff, 0xff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_R8G8B8A8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x00), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0x00, 0x00, 0x00), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0xff, 0x00, 0x00), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0xff, 0x00), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0xff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8A8_UNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0xff, 0xff, 0xff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_R8_USCALED, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8_USCALED, PACKED_1x8(0xff), PACKED_1x8(0xff), UNPACKED_1x1(255.0, 0.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R8G8_USCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8_USCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0xff, 0x00), UNPACKED_1x1(255.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8_USCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0xff), UNPACKED_1x1( 0.0, 255.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8_USCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0xff, 0xff), UNPACKED_1x1(255.0, 255.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R8G8B8_USCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_USCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0xff, 0x00, 0x00), UNPACKED_1x1(255.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_USCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0xff, 0x00), UNPACKED_1x1( 0.0, 255.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_USCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0xff), UNPACKED_1x1( 0.0, 0.0, 255.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_USCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0xff, 0xff, 0xff), UNPACKED_1x1(255.0, 255.0, 255.0, 1.0)}, - - {PIPE_FORMAT_R8G8B8A8_USCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_USCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0x00, 0x00, 0x00), UNPACKED_1x1(255.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_USCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0xff, 0x00, 0x00), UNPACKED_1x1( 0.0, 255.0, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_USCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0xff, 0x00), UNPACKED_1x1( 0.0, 0.0, 255.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_USCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0xff), UNPACKED_1x1( 0.0, 0.0, 0.0, 255.0)}, - {PIPE_FORMAT_R8G8B8A8_USCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0xff, 0xff, 0xff, 0xff), UNPACKED_1x1(255.0, 255.0, 255.0, 255.0)}, - - {PIPE_FORMAT_R8_SNORM, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8_SNORM, PACKED_1x8(0xff), PACKED_1x8(0x7f), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8_SNORM, PACKED_1x8(0xff), PACKED_1x8(0x81), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R8G8_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x7f, 0x00), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x81, 0x00), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x7f), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8_SNORM, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x81), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x7f, 0x00, 0x00), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x81, 0x00, 0x00), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x7f, 0x00), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x81, 0x00), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x7f), UNPACKED_1x1( 0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_SNORM, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x81), UNPACKED_1x1( 0.0, 0.0, -1.0, 1.0)}, - - {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x7f, 0x00, 0x00, 0x00), UNPACKED_1x1( 1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x81, 0x00, 0x00, 0x00), UNPACKED_1x1(-1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x7f, 0x00, 0x00), UNPACKED_1x1( 0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x81, 0x00, 0x00), UNPACKED_1x1( 0.0, -1.0, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x7f, 0x00), UNPACKED_1x1( 0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x81, 0x00), UNPACKED_1x1( 0.0, 0.0, -1.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x7f), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8A8_SNORM, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x81), UNPACKED_1x1( 0.0, 0.0, 0.0, -1.0)}, - - {PIPE_FORMAT_R8_SSCALED, PACKED_1x8(0xff), PACKED_1x8(0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8_SSCALED, PACKED_1x8(0xff), PACKED_1x8(0x7f), UNPACKED_1x1( 127.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8_SSCALED, PACKED_1x8(0xff), PACKED_1x8(0x80), UNPACKED_1x1(-128.0, 0.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R8G8_SSCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8_SSCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x7f, 0x00), UNPACKED_1x1( 127.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8_SSCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x80, 0x00), UNPACKED_1x1(-128.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8_SSCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x7f), UNPACKED_1x1( 0.0, 127.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8_SSCALED, PACKED_2x8(0xff, 0xff), PACKED_2x8(0x00, 0x80), UNPACKED_1x1( 0.0, -128.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x7f, 0x00, 0x00), UNPACKED_1x1( 127.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x80, 0x00, 0x00), UNPACKED_1x1(-128.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x7f, 0x00), UNPACKED_1x1( 0.0, 127.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x80, 0x00), UNPACKED_1x1( 0.0, -128.0, 0.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x7f), UNPACKED_1x1( 0.0, 0.0, 127.0, 1.0)}, - {PIPE_FORMAT_R8G8B8_SSCALED, PACKED_3x8(0xff, 0xff, 0xff), PACKED_3x8(0x00, 0x00, 0x80), UNPACKED_1x1( 0.0, 0.0, -128.0, 1.0)}, - - {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x00), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x7f, 0x00, 0x00, 0x00), UNPACKED_1x1( 127.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x80, 0x00, 0x00, 0x00), UNPACKED_1x1(-128.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x7f, 0x00, 0x00), UNPACKED_1x1( 0.0, 127.0, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x80, 0x00, 0x00), UNPACKED_1x1( 0.0, -128.0, 0.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x7f, 0x00), UNPACKED_1x1( 0.0, 0.0, 127.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x80, 0x00), UNPACKED_1x1( 0.0, 0.0, -128.0, 0.0)}, - {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x7f), UNPACKED_1x1( 0.0, 0.0, 0.0, 127.0)}, - {PIPE_FORMAT_R8G8B8A8_SSCALED, PACKED_4x8(0xff, 0xff, 0xff, 0xff), PACKED_4x8(0x00, 0x00, 0x00, 0x80), UNPACKED_1x1( 0.0, 0.0, 0.0, -128.0)}, - - /* - * Standard 16-bit integer formats - */ - - {PIPE_FORMAT_R16_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16_UNORM, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R16G16_UNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16_UNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0xffff, 0x0000), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16_UNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0xffff), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16_UNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0xffff, 0xffff), UNPACKED_1x1(1.0, 1.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R16G16B16_UNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_UNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0xffff, 0x0000, 0x0000), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_UNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0xffff, 0x0000), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_UNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0xffff), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_UNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0xffff, 0xffff, 0xffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_R16G16B16A16_UNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x0000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_UNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0xffff, 0x0000, 0x0000, 0x0000), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_UNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0xffff, 0x0000, 0x0000), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_UNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0xffff, 0x0000), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_UNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0xffff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16A16_UNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_R16_USCALED, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16_USCALED, PACKED_1x16(0xffff), PACKED_1x16(0xffff), UNPACKED_1x1(65535.0, 0.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R16G16_USCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16_USCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0xffff, 0x0000), UNPACKED_1x1(65535.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16_USCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0xffff), UNPACKED_1x1( 0.0, 65535.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16_USCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0xffff, 0xffff), UNPACKED_1x1(65535.0, 65535.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R16G16B16_USCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_USCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0xffff, 0x0000, 0x0000), UNPACKED_1x1(65535.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_USCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0xffff, 0x0000), UNPACKED_1x1( 0.0, 65535.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_USCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0xffff), UNPACKED_1x1( 0.0, 0.0, 65535.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_USCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0xffff, 0xffff, 0xffff), UNPACKED_1x1(65535.0, 65535.0, 65535.0, 1.0)}, - - {PIPE_FORMAT_R16G16B16A16_USCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_USCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0xffff, 0x0000, 0x0000, 0x0000), UNPACKED_1x1(65535.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_USCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0xffff, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 65535.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_USCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0xffff, 0x0000), UNPACKED_1x1( 0.0, 0.0, 65535.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_USCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0xffff), UNPACKED_1x1( 0.0, 0.0, 0.0, 65535.0)}, - {PIPE_FORMAT_R16G16B16A16_USCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), UNPACKED_1x1(65535.0, 65535.0, 65535.0, 65535.0)}, - - {PIPE_FORMAT_R16_SNORM, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16_SNORM, PACKED_1x16(0xffff), PACKED_1x16(0x7fff), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16_SNORM, PACKED_1x16(0xffff), PACKED_1x16(0x8001), UNPACKED_1x1( -1.0, 0.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R16G16_SNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16_SNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x7fff, 0x0000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16_SNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x8001, 0x0000), UNPACKED_1x1( -1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16_SNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x7fff), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16_SNORM, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x8001), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x7fff, 0x0000, 0x0000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x8001, 0x0000, 0x0000), UNPACKED_1x1( -1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x7fff, 0x0000), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x8001, 0x0000), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x7fff), UNPACKED_1x1( 0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_SNORM, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x8001), UNPACKED_1x1( 0.0, 0.0, -1.0, 1.0)}, - - {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x7fff, 0x0000, 0x0000, 0x0000), UNPACKED_1x1( 1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x8001, 0x0000, 0x0000, 0x0000), UNPACKED_1x1( -1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x7fff, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x8001, 0x0000, 0x0000), UNPACKED_1x1( 0.0, -1.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x7fff, 0x0000), UNPACKED_1x1( 0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x8001, 0x0000), UNPACKED_1x1( 0.0, 0.0, -1.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x7fff), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16A16_SNORM, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x8001), UNPACKED_1x1( 0.0, 0.0, 0.0, -1.0)}, - - {PIPE_FORMAT_R16_SSCALED, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16_SSCALED, PACKED_1x16(0xffff), PACKED_1x16(0x7fff), UNPACKED_1x1( 32767.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16_SSCALED, PACKED_1x16(0xffff), PACKED_1x16(0x8000), UNPACKED_1x1(-32768.0, 0.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R16G16_SSCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16_SSCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x7fff, 0x0000), UNPACKED_1x1( 32767.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16_SSCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x8000, 0x0000), UNPACKED_1x1(-32768.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16_SSCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x7fff), UNPACKED_1x1( 0.0, 32767.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16_SSCALED, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x8000), UNPACKED_1x1( 0.0, -32768.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x7fff, 0x0000, 0x0000), UNPACKED_1x1( 32767.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x8000, 0x0000, 0x0000), UNPACKED_1x1(-32768.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x7fff, 0x0000), UNPACKED_1x1( 0.0, 32767.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x8000, 0x0000), UNPACKED_1x1( 0.0, -32768.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x7fff), UNPACKED_1x1( 0.0, 0.0, 32767.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_SSCALED, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x8000), UNPACKED_1x1( 0.0, 0.0, -32768.0, 1.0)}, - - {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x7fff, 0x0000, 0x0000, 0x0000), UNPACKED_1x1( 32767.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x8000, 0x0000, 0x0000, 0x0000), UNPACKED_1x1(-32768.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x7fff, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 32767.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x8000, 0x0000, 0x0000), UNPACKED_1x1( 0.0, -32768.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x7fff, 0x0000), UNPACKED_1x1( 0.0, 0.0, 32767.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x8000, 0x0000), UNPACKED_1x1( 0.0, 0.0, -32768.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x7fff), UNPACKED_1x1( 0.0, 0.0, 0.0, 32767.0)}, - {PIPE_FORMAT_R16G16B16A16_SSCALED, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x8000), UNPACKED_1x1( 0.0, 0.0, 0.0, -32768.0)}, - - /* - * Standard 32-bit integer formats - * - * NOTE: We can't accurately represent integers larger than +/-0x1000000 - * with single precision floats, so that's as far as we test. - */ - - {PIPE_FORMAT_R32_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32_UNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0xffffffff), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R32G32_UNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_UNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0xffffffff, 0x00000000), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_UNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0xffffffff), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_UNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0xffffffff, 0xffffffff), UNPACKED_1x1(1.0, 1.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R32G32B32_UNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_UNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0xffffffff, 0x00000000, 0x00000000), UNPACKED_1x1(1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_UNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0xffffffff, 0x00000000), UNPACKED_1x1(0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_UNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0xffffffff), UNPACKED_1x1(0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_UNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_R32G32B32A32_UNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1(0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_UNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0xffffffff, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1(1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_UNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0xffffffff, 0x00000000, 0x00000000), UNPACKED_1x1(0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_UNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0xffffffff, 0x00000000), UNPACKED_1x1(0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_UNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0xffffffff), UNPACKED_1x1(0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32A32_UNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), UNPACKED_1x1(1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_R32_USCALED, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32_USCALED, PACKED_1x32(0xffffffff), PACKED_1x32(0x01000000), UNPACKED_1x1(16777216.0, 0.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R32G32_USCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_USCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x01000000, 0x00000000), UNPACKED_1x1(16777216.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_USCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x01000000), UNPACKED_1x1( 0.0, 16777216.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_USCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x01000000, 0x01000000), UNPACKED_1x1(16777216.0, 16777216.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R32G32B32_USCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_USCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x01000000, 0x00000000, 0x00000000), UNPACKED_1x1(16777216.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_USCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x01000000, 0x00000000), UNPACKED_1x1( 0.0, 16777216.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_USCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x01000000), UNPACKED_1x1( 0.0, 0.0, 16777216.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_USCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x01000000, 0x01000000, 0x01000000), UNPACKED_1x1(16777216.0, 16777216.0, 16777216.0, 1.0)}, - - {PIPE_FORMAT_R32G32B32A32_USCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_USCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x01000000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1(16777216.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_USCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x01000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 16777216.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_USCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x01000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 16777216.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_USCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x01000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 16777216.0)}, - {PIPE_FORMAT_R32G32B32A32_USCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x01000000, 0x01000000, 0x01000000, 0x01000000), UNPACKED_1x1(16777216.0, 16777216.0, 16777216.0, 16777216.0)}, - - {PIPE_FORMAT_R32_SNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32_SNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x7fffffff), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32_SNORM, PACKED_1x32(0xffffffff), PACKED_1x32(0x80000001), UNPACKED_1x1( -1.0, 0.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R32G32_SNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_SNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x7fffffff, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_SNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x80000001, 0x00000000), UNPACKED_1x1( -1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_SNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x7fffffff), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_SNORM, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x80000001), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x7fffffff, 0x00000000, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x80000001, 0x00000000, 0x00000000), UNPACKED_1x1( -1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x7fffffff, 0x00000000), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x80000001, 0x00000000), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x7fffffff), UNPACKED_1x1( 0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_SNORM, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x80000001), UNPACKED_1x1( 0.0, 0.0, -1.0, 1.0)}, - - {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x7fffffff, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x80000001, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( -1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x7fffffff, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x80000001, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, -1.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x7fffffff, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x80000001, 0x00000000), UNPACKED_1x1( 0.0, 0.0, -1.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x7fffffff), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32A32_SNORM, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x80000001), UNPACKED_1x1( 0.0, 0.0, 0.0, -1.0)}, - - {PIPE_FORMAT_R32_SSCALED, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32_SSCALED, PACKED_1x32(0xffffffff), PACKED_1x32(0x01000000), UNPACKED_1x1( 16777216.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32_SSCALED, PACKED_1x32(0xffffffff), PACKED_1x32(0xff000000), UNPACKED_1x1(-16777216.0, 0.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R32G32_SSCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_SSCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x01000000, 0x00000000), UNPACKED_1x1( 16777216.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_SSCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0xff000000, 0x00000000), UNPACKED_1x1(-16777216.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_SSCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x01000000), UNPACKED_1x1( 0.0, 16777216.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_SSCALED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0xff000000), UNPACKED_1x1( 0.0, -16777216.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x01000000, 0x00000000, 0x00000000), UNPACKED_1x1( 16777216.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0xff000000, 0x00000000, 0x00000000), UNPACKED_1x1(-16777216.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x01000000, 0x00000000), UNPACKED_1x1( 0.0, 16777216.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0xff000000, 0x00000000), UNPACKED_1x1( 0.0, -16777216.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x01000000), UNPACKED_1x1( 0.0, 0.0, 16777216.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_SSCALED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0xff000000), UNPACKED_1x1( 0.0, 0.0, -16777216.0, 1.0)}, - - {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x01000000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 16777216.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0xff000000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1(-16777216.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x01000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 16777216.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0xff000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, -16777216.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x01000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 16777216.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0xff000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, -16777216.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x01000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 16777216.0)}, - {PIPE_FORMAT_R32G32B32A32_SSCALED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0xff000000), UNPACKED_1x1( 0.0, 0.0, 0.0, -16777216.0)}, - - /* - * Standard 32-bit float formats - */ - - {PIPE_FORMAT_R32_FLOAT, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32_FLOAT, PACKED_1x32(0xffffffff), PACKED_1x32(0x3f800000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32_FLOAT, PACKED_1x32(0xffffffff), PACKED_1x32(0xbf800000), UNPACKED_1x1( -1.0, 0.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R32G32_FLOAT, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_FLOAT, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x3f800000, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_FLOAT, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0xbf800000, 0x00000000), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_FLOAT, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x3f800000), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_FLOAT, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0xbf800000), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_FLOAT, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x3f800000, 0x3f800000), UNPACKED_1x1( 1.0, 1.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x3f800000, 0x00000000, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0xbf800000, 0x00000000, 0x00000000), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x3f800000, 0x00000000), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0xbf800000, 0x00000000), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x3f800000), UNPACKED_1x1( 0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0xbf800000), UNPACKED_1x1( 0.0, 0.0, -1.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_FLOAT, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x3f800000, 0x3f800000, 0x3f800000), UNPACKED_1x1( 1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x3f800000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0xbf800000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1(-1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x3f800000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0xbf800000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, -1.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x3f800000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0xbf800000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, -1.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x3f800000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0xbf800000), UNPACKED_1x1( 0.0, 0.0, 0.0, -1.0)}, - {PIPE_FORMAT_R32G32B32A32_FLOAT, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000), UNPACKED_1x1( 1.0, 1.0, 1.0, 1.0)}, - - /* - * Half float formats - */ - - {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0x3c00), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16_FLOAT, PACKED_1x16(0xffff), PACKED_1x16(0xbc00), UNPACKED_1x1( -1.0, 0.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R16G16_FLOAT, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16_FLOAT, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x3c00, 0x0000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16_FLOAT, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0xbc00, 0x0000), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16_FLOAT, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0x3c00), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16_FLOAT, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x0000, 0xbc00), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16_FLOAT, PACKED_2x16(0xffff, 0xffff), PACKED_2x16(0x3c00, 0x3c00), UNPACKED_1x1( 1.0, 1.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R16G16B16_FLOAT, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_FLOAT, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x3c00, 0x0000, 0x0000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_FLOAT, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0xbc00, 0x0000, 0x0000), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_FLOAT, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x3c00, 0x0000), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_FLOAT, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0xbc00, 0x0000), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_FLOAT, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0x3c00), UNPACKED_1x1( 0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_FLOAT, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x0000, 0x0000, 0xbc00), UNPACKED_1x1( 0.0, 0.0, -1.0, 1.0)}, - {PIPE_FORMAT_R16G16B16_FLOAT, PACKED_3x16(0xffff, 0xffff, 0xffff), PACKED_3x16(0x3c00, 0x3c00, 0x3c00), UNPACKED_1x1( 1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_R16G16B16A16_FLOAT, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_FLOAT, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x3c00, 0x0000, 0x0000, 0x0000), UNPACKED_1x1( 1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_FLOAT, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0xbc00, 0x0000, 0x0000, 0x0000), UNPACKED_1x1(-1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_FLOAT, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x3c00, 0x0000, 0x0000), UNPACKED_1x1( 0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_FLOAT, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0xbc00, 0x0000, 0x0000), UNPACKED_1x1( 0.0, -1.0, 0.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_FLOAT, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x3c00, 0x0000), UNPACKED_1x1( 0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_FLOAT, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0xbc00, 0x0000), UNPACKED_1x1( 0.0, 0.0, -1.0, 0.0)}, - {PIPE_FORMAT_R16G16B16A16_FLOAT, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0x3c00), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R16G16B16A16_FLOAT, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x0000, 0x0000, 0x0000, 0xbc00), UNPACKED_1x1( 0.0, 0.0, 0.0, -1.0)}, - {PIPE_FORMAT_R16G16B16A16_FLOAT, PACKED_4x16(0xffff, 0xffff, 0xffff, 0xffff), PACKED_4x16(0x3c00, 0x3c00, 0x3c00, 0x3c00), UNPACKED_1x1( 1.0, 1.0, 1.0, 1.0)}, - - /* - * 32-bit fixed point formats - */ - - {PIPE_FORMAT_R32_FIXED, PACKED_1x32(0xffffffff), PACKED_1x32(0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32_FIXED, PACKED_1x32(0xffffffff), PACKED_1x32(0x00010000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32_FIXED, PACKED_1x32(0xffffffff), PACKED_1x32(0xffff0000), UNPACKED_1x1( -1.0, 0.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R32G32_FIXED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_FIXED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00010000, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_FIXED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0xffff0000, 0x00000000), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_FIXED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0x00010000), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_FIXED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00000000, 0xffff0000), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32_FIXED, PACKED_2x32(0xffffffff, 0xffffffff), PACKED_2x32(0x00010000, 0x00010000), UNPACKED_1x1( 1.0, 1.0, 0.0, 1.0)}, - - {PIPE_FORMAT_R32G32B32_FIXED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_FIXED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00010000, 0x00000000, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_FIXED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0xffff0000, 0x00000000, 0x00000000), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_FIXED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00010000, 0x00000000), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_FIXED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0xffff0000, 0x00000000), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_FIXED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0x00010000), UNPACKED_1x1( 0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_FIXED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00000000, 0x00000000, 0xffff0000), UNPACKED_1x1( 0.0, 0.0, -1.0, 1.0)}, - {PIPE_FORMAT_R32G32B32_FIXED, PACKED_3x32(0xffffffff, 0xffffffff, 0xffffffff), PACKED_3x32(0x00010000, 0x00010000, 0x00010000), UNPACKED_1x1( 1.0, 1.0, 1.0, 1.0)}, - - {PIPE_FORMAT_R32G32B32A32_FIXED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_FIXED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00010000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1( 1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_FIXED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0xffff0000, 0x00000000, 0x00000000, 0x00000000), UNPACKED_1x1(-1.0, 0.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_FIXED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00010000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, 1.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_FIXED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0xffff0000, 0x00000000, 0x00000000), UNPACKED_1x1( 0.0, -1.0, 0.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_FIXED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00010000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, 1.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_FIXED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0xffff0000, 0x00000000), UNPACKED_1x1( 0.0, 0.0, -1.0, 0.0)}, - {PIPE_FORMAT_R32G32B32A32_FIXED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0x00010000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R32G32B32A32_FIXED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00000000, 0x00000000, 0x00000000, 0xffff0000), UNPACKED_1x1( 0.0, 0.0, 0.0, -1.0)}, - {PIPE_FORMAT_R32G32B32A32_FIXED, PACKED_4x32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff), PACKED_4x32(0x00010000, 0x00010000, 0x00010000, 0x00010000), UNPACKED_1x1( 1.0, 1.0, 1.0, 1.0)}, - - /* - * D3D9 specific vertex formats - */ - - {PIPE_FORMAT_R10G10B10X2_USCALED, PACKED_1x32(0x3fffffff), PACKED_1x32(0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R10G10B10X2_USCALED, PACKED_1x32(0x3fffffff), PACKED_1x32(0x000003ff), UNPACKED_1x1(1023.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R10G10B10X2_USCALED, PACKED_1x32(0x3fffffff), PACKED_1x32(0x000ffc00), UNPACKED_1x1( 0.0, 1023.0, 0.0, 1.0)}, - {PIPE_FORMAT_R10G10B10X2_USCALED, PACKED_1x32(0x3fffffff), PACKED_1x32(0x3ff00000), UNPACKED_1x1( 0.0, 0.0, 1023.0, 1.0)}, - {PIPE_FORMAT_R10G10B10X2_USCALED, PACKED_1x32(0x3fffffff), PACKED_1x32(0x3fffffff), UNPACKED_1x1(1023.0, 1023.0, 1023.0, 1.0)}, - - {PIPE_FORMAT_R10G10B10X2_SNORM, PACKED_1x32(0x3fffffff), PACKED_1x32(0x00000000), UNPACKED_1x1( 0.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R10G10B10X2_SNORM, PACKED_1x32(0x3fffffff), PACKED_1x32(0x000001ff), UNPACKED_1x1( 1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R10G10B10X2_SNORM, PACKED_1x32(0x3fffffff), PACKED_1x32(0x00000201), UNPACKED_1x1(-1.0, 0.0, 0.0, 1.0)}, - {PIPE_FORMAT_R10G10B10X2_SNORM, PACKED_1x32(0x3fffffff), PACKED_1x32(0x0007fc00), UNPACKED_1x1( 0.0, 1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R10G10B10X2_SNORM, PACKED_1x32(0x3fffffff), PACKED_1x32(0x00080400), UNPACKED_1x1( 0.0, -1.0, 0.0, 1.0)}, - {PIPE_FORMAT_R10G10B10X2_SNORM, PACKED_1x32(0x3fffffff), PACKED_1x32(0x1ff00000), UNPACKED_1x1( 0.0, 0.0, 1.0, 1.0)}, - {PIPE_FORMAT_R10G10B10X2_SNORM, PACKED_1x32(0x3fffffff), PACKED_1x32(0x20100000), UNPACKED_1x1( 0.0, 0.0, -1.0, 1.0)}, - - /* - * Special formats that not fit anywhere else - */ - -}; - - -const unsigned util_format_nr_test_cases = Elements(util_format_test_cases); diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_tests.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_tests.h deleted file mode 100644 index f59563f4f4f..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_tests.h +++ /dev/null @@ -1,71 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - **************************************************************************/ - - -#ifndef U_FORMAT_TESTS_H_ -#define U_FORMAT_TESTS_H_ - - -#include "pipe/p_compiler.h" -#include "pipe/p_format.h" - - -#define UTIL_FORMAT_MAX_PACKED_BYTES 16 -#define UTIL_FORMAT_MAX_UNPACKED_WIDTH 4 -#define UTIL_FORMAT_MAX_UNPACKED_HEIGHT 4 - - -/** - * A (packed, unpacked) color pair. - */ -struct util_format_test_case -{ - enum pipe_format format; - - /** - * Mask of the bits that actually meaningful data. Used to mask out the - * "X" channels. - */ - uint8_t mask[UTIL_FORMAT_MAX_PACKED_BYTES]; - - uint8_t packed[UTIL_FORMAT_MAX_PACKED_BYTES]; - - /** - * RGBA. - */ - double unpacked[UTIL_FORMAT_MAX_UNPACKED_HEIGHT][UTIL_FORMAT_MAX_UNPACKED_WIDTH][4]; -}; - - -extern const struct util_format_test_case -util_format_test_cases[]; - - -extern const unsigned util_format_nr_test_cases; - - -#endif /* U_FORMAT_TESTS_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_yuv.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_yuv.c deleted file mode 100644 index 38a25b18661..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_yuv.c +++ /dev/null @@ -1,1144 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - **************************************************************************/ - - -/** - * @file - * YUV and RGB subsampled formats conversion. - * - * @author Jose Fonseca - */ - - -#include "util/u_format_yuv.h" - - -void -util_format_r8g8_b8g8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - - for (y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint32_t *src = (const uint32_t *)src_row; - uint32_t value; - float r, g0, g1, b; - - for (x = 0; x + 1 < width; x += 2) { - value = *src++; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - r = ubyte_to_float((value >> 0) & 0xff); - g0 = ubyte_to_float((value >> 8) & 0xff); - b = ubyte_to_float((value >> 16) & 0xff); - g1 = ubyte_to_float((value >> 24) & 0xff); - - dst[0] = r; /* r */ - dst[1] = g0; /* g */ - dst[2] = b; /* b */ - dst[3] = 1.0f; /* a */ - dst += 4; - - dst[0] = r; /* r */ - dst[1] = g1; /* g */ - dst[2] = b; /* b */ - dst[3] = 1.0f; /* a */ - dst += 4; - } - - if (x < width) { - value = *src; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - r = ubyte_to_float((value >> 0) & 0xff); - g0 = ubyte_to_float((value >> 8) & 0xff); - b = ubyte_to_float((value >> 16) & 0xff); - g1 = ubyte_to_float((value >> 24) & 0xff); - - dst[0] = r; /* r */ - dst[1] = g0; /* g */ - dst[2] = b; /* b */ - dst[3] = 1.0f; /* a */ - } - - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - - -void -util_format_r8g8_b8g8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - - for (y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint32_t *src = (const uint32_t *)src_row; - uint32_t value; - uint8_t r, g0, g1, b; - - for (x = 0; x + 1 < width; x += 2) { - value = *src++; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - r = (value >> 0) & 0xff; - g0 = (value >> 8) & 0xff; - b = (value >> 16) & 0xff; - g1 = (value >> 24) & 0xff; - - dst[0] = r; /* r */ - dst[1] = g0; /* g */ - dst[2] = b; /* b */ - dst[3] = 0xff; /* a */ - dst += 4; - - dst[0] = r; /* r */ - dst[1] = g1; /* g */ - dst[2] = b; /* b */ - dst[3] = 0xff; /* a */ - dst += 4; - } - - if (x < width) { - value = *src; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - r = (value >> 0) & 0xff; - g0 = (value >> 8) & 0xff; - b = (value >> 16) & 0xff; - g1 = (value >> 24) & 0xff; - - dst[0] = r; /* r */ - dst[1] = g0; /* g */ - dst[2] = b; /* b */ - dst[3] = 0xff; /* a */ - } - - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - - -void -util_format_r8g8_b8g8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - - for (y = 0; y < height; y += 1) { - const float *src = src_row; - uint32_t *dst = (uint32_t *)dst_row; - float r, g0, g1, b; - uint32_t value; - - for (x = 0; x + 1 < width; x += 2) { - r = 0.5f*(src[0] + src[4]); - g0 = src[1]; - g1 = src[5]; - b = 0.5f*(src[2] + src[6]); - - value = float_to_ubyte(r); - value |= float_to_ubyte(g0) << 8; - value |= float_to_ubyte(b) << 16; - value |= float_to_ubyte(g1) << 24; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - *dst++ = value; - - src += 8; - } - - if (x < width) { - r = src[0]; - g0 = src[1]; - g1 = 0; - b = src[2]; - - value = float_to_ubyte(r); - value |= float_to_ubyte(g0) << 8; - value |= float_to_ubyte(b) << 16; - value |= float_to_ubyte(g1) << 24; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - *dst = value; - } - - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - - -void -util_format_r8g8_b8g8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - - for (y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint32_t *dst = (uint32_t *)dst_row; - uint32_t r, g0, g1, b; - uint32_t value; - - for (x = 0; x + 1 < width; x += 2) { - r = (src[0] + src[4] + 1) >> 1; - g0 = src[1]; - g1 = src[5]; - b = (src[2] + src[6] + 1) >> 1; - - value = r; - value |= g0 << 8; - value |= b << 16; - value |= g1 << 24; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - *dst++ = value; - - src += 8; - } - - if (x < width) { - r = src[0]; - g0 = src[1]; - g1 = 0; - b = src[2]; - - value = r; - value |= g0 << 8; - value |= b << 16; - value |= g1 << 24; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - *dst = value; - } - - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - - -void -util_format_r8g8_b8g8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j) -{ - assert(i < 2); - assert(j < 1); - - dst[0] = ubyte_to_float(src[0]); /* r */ - dst[1] = ubyte_to_float(src[1 + 2*i]); /* g */ - dst[2] = ubyte_to_float(src[2]); /* b */ - dst[3] = 1.0f; /* a */ -} - - -void -util_format_g8r8_g8b8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - - for (y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint32_t *src = (const uint32_t *)src_row; - uint32_t value; - float r, g0, g1, b; - - for (x = 0; x + 1 < width; x += 2) { - value = *src++; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - g0 = ubyte_to_float((value >> 0) & 0xff); - r = ubyte_to_float((value >> 8) & 0xff); - g1 = ubyte_to_float((value >> 16) & 0xff); - b = ubyte_to_float((value >> 24) & 0xff); - - dst[0] = r; /* r */ - dst[1] = g0; /* g */ - dst[2] = b; /* b */ - dst[3] = 1.0f; /* a */ - dst += 4; - - dst[0] = r; /* r */ - dst[1] = g1; /* g */ - dst[2] = b; /* b */ - dst[3] = 1.0f; /* a */ - dst += 4; - } - - if (x < width) { - value = *src; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - g0 = ubyte_to_float((value >> 0) & 0xff); - r = ubyte_to_float((value >> 8) & 0xff); - g1 = ubyte_to_float((value >> 16) & 0xff); - b = ubyte_to_float((value >> 24) & 0xff); - - dst[0] = r; /* r */ - dst[1] = g0; /* g */ - dst[2] = b; /* b */ - dst[3] = 1.0f; /* a */ - } - - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - - -void -util_format_g8r8_g8b8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - - for (y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint32_t *src = (const uint32_t *)src_row; - uint32_t value; - uint8_t r, g0, g1, b; - - for (x = 0; x + 1 < width; x += 2) { - value = *src++; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - g0 = (value >> 0) & 0xff; - r = (value >> 8) & 0xff; - g1 = (value >> 16) & 0xff; - b = (value >> 24) & 0xff; - - dst[0] = r; /* r */ - dst[1] = g0; /* g */ - dst[2] = b; /* b */ - dst[3] = 0xff; /* a */ - dst += 4; - - dst[0] = r; /* r */ - dst[1] = g1; /* g */ - dst[2] = b; /* b */ - dst[3] = 0xff; /* a */ - dst += 4; - } - - if (x < width) { - value = *src; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - g0 = (value >> 0) & 0xff; - r = (value >> 8) & 0xff; - g1 = (value >> 16) & 0xff; - b = (value >> 24) & 0xff; - - dst[0] = r; /* r */ - dst[1] = g0; /* g */ - dst[2] = b; /* b */ - dst[3] = 0xff; /* a */ - } - - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - - -void -util_format_g8r8_g8b8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - - for (y = 0; y < height; y += 1) { - const float *src = src_row; - uint32_t *dst = (uint32_t *)dst_row; - float r, g0, g1, b; - uint32_t value; - - for (x = 0; x + 1 < width; x += 2) { - r = 0.5f*(src[0] + src[4]); - g0 = src[1]; - g1 = src[5]; - b = 0.5f*(src[2] + src[6]); - - value = float_to_ubyte(g0); - value |= float_to_ubyte(r) << 8; - value |= float_to_ubyte(g1) << 16; - value |= float_to_ubyte(b) << 24; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - *dst++ = value; - - src += 8; - } - - if (x < width) { - r = src[0]; - g0 = src[1]; - g1 = 0; - b = src[2]; - - value = float_to_ubyte(g0); - value |= float_to_ubyte(r) << 8; - value |= float_to_ubyte(g1) << 16; - value |= float_to_ubyte(b) << 24; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - *dst = value; - } - - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - - -void -util_format_g8r8_g8b8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - - for (y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint32_t *dst = (uint32_t *)dst_row; - uint32_t r, g0, g1, b; - uint32_t value; - - for (x = 0; x + 1 < width; x += 2) { - r = (src[0] + src[4] + 1) >> 1; - g0 = src[1]; - g1 = src[5]; - b = (src[2] + src[6] + 1) >> 1; - - value = g0; - value |= r << 8; - value |= g1 << 16; - value |= b << 24; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - *dst++ = value; - - src += 8; - } - - if (x < width) { - r = src[0]; - g0 = src[1]; - g1 = 0; - b = src[2]; - - value = g0; - value |= r << 8; - value |= g1 << 16; - value |= b << 24; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - *dst = value; - } - - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - - -void -util_format_g8r8_g8b8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j) -{ - assert(i < 2); - assert(j < 1); - - dst[0] = ubyte_to_float(src[1]); /* r */ - dst[1] = ubyte_to_float(src[0 + 2*i]); /* g */ - dst[2] = ubyte_to_float(src[3]); /* b */ - dst[3] = 1.0f; /* a */ -} - - -void -util_format_uyvy_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - - for (y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint32_t *src = (const uint32_t *)src_row; - uint32_t value; - uint8_t y0, y1, u, v; - - for (x = 0; x + 1 < width; x += 2) { - value = *src++; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - u = (value >> 0) & 0xff; - y0 = (value >> 8) & 0xff; - v = (value >> 16) & 0xff; - y1 = (value >> 24) & 0xff; - - util_format_yuv_to_rgb_float(y0, u, v, &dst[0], &dst[1], &dst[2]); - dst[3] = 1.0f; /* a */ - dst += 4; - - util_format_yuv_to_rgb_float(y1, u, v, &dst[0], &dst[1], &dst[2]); - dst[3] = 1.0f; /* a */ - dst += 4; - } - - if (x < width) { - value = *src; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - u = (value >> 0) & 0xff; - y0 = (value >> 8) & 0xff; - v = (value >> 16) & 0xff; - y1 = (value >> 24) & 0xff; - - util_format_yuv_to_rgb_float(y0, u, v, &dst[0], &dst[1], &dst[2]); - dst[3] = 1.0f; /* a */ - } - - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - - -void -util_format_uyvy_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - - for (y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint32_t *src = (const uint32_t *)src_row; - uint32_t value; - uint8_t y0, y1, u, v; - - for (x = 0; x + 1 < width; x += 2) { - value = *src++; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - u = (value >> 0) & 0xff; - y0 = (value >> 8) & 0xff; - v = (value >> 16) & 0xff; - y1 = (value >> 24) & 0xff; - - util_format_yuv_to_rgb_8unorm(y0, u, v, &dst[0], &dst[1], &dst[2]); - dst[3] = 0xff; /* a */ - dst += 4; - - util_format_yuv_to_rgb_8unorm(y1, u, v, &dst[0], &dst[1], &dst[2]); - dst[3] = 0xff; /* a */ - dst += 4; - } - - if (x < width) { - value = *src; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - u = (value >> 0) & 0xff; - y0 = (value >> 8) & 0xff; - v = (value >> 16) & 0xff; - y1 = (value >> 24) & 0xff; - - util_format_yuv_to_rgb_8unorm(y0, u, v, &dst[0], &dst[1], &dst[2]); - dst[3] = 0xff; /* a */ - } - - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - - -void -util_format_uyvy_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - - for (y = 0; y < height; y += 1) { - const float *src = src_row; - uint32_t *dst = (uint32_t *)dst_row; - uint8_t y0, y1, u, v; - uint32_t value; - - for (x = 0; x + 1 < width; x += 2) { - uint8_t y0, y1, u0, u1, v0, v1, u, v; - - util_format_rgb_float_to_yuv(src[0], src[1], src[2], - &y0, &u0, &v0); - util_format_rgb_float_to_yuv(src[4], src[5], src[6], - &y1, &u1, &v1); - - u = (u0 + u1 + 1) >> 1; - v = (v0 + v1 + 1) >> 1; - - value = u; - value |= y0 << 8; - value |= v << 16; - value |= y1 << 24; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - *dst++ = value; - - src += 8; - } - - if (x < width) { - util_format_rgb_float_to_yuv(src[0], src[1], src[2], - &y0, &u, &v); - y1 = 0; - - value = u; - value |= y0 << 8; - value |= v << 16; - value |= y1 << 24; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - *dst = value; - } - - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - - -void -util_format_uyvy_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - - for (y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint32_t *dst = (uint32_t *)dst_row; - uint8_t y0, y1, u, v; - uint32_t value; - - for (x = 0; x + 1 < width; x += 2) { - uint8_t y0, y1, u0, u1, v0, v1, u, v; - - util_format_rgb_8unorm_to_yuv(src[0], src[1], src[2], - &y0, &u0, &v0); - util_format_rgb_8unorm_to_yuv(src[4], src[5], src[6], - &y1, &u1, &v1); - - u = (u0 + u1 + 1) >> 1; - v = (v0 + v1 + 1) >> 1; - - value = u; - value |= y0 << 8; - value |= v << 16; - value |= y1 << 24; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - *dst++ = value; - - src += 8; - } - - if (x < width) { - util_format_rgb_8unorm_to_yuv(src[0], src[1], src[2], - &y0, &u, &v); - y1 = 0; - - value = u; - value |= y0 << 8; - value |= v << 16; - value |= y1 << 24; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - *dst = value; - } - - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - - -void -util_format_uyvy_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j) -{ - uint8_t y, u, v; - - assert(i < 2); - assert(j < 1); - - y = src[1 + i*2]; - u = src[0]; - v = src[2]; - - util_format_yuv_to_rgb_float(y, u, v, &dst[0], &dst[1], &dst[2]); - - dst[3] = 1.0f; -} - - -void -util_format_yuyv_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - - for (y = 0; y < height; y += 1) { - float *dst = dst_row; - const uint32_t *src = (const uint32_t *)src_row; - uint32_t value; - uint8_t y0, y1, u, v; - - for (x = 0; x + 1 < width; x += 2) { - value = *src++; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - y0 = (value >> 0) & 0xff; - u = (value >> 8) & 0xff; - y1 = (value >> 16) & 0xff; - v = (value >> 24) & 0xff; - - util_format_yuv_to_rgb_float(y0, u, v, &dst[0], &dst[1], &dst[2]); - dst[3] = 1.0f; /* a */ - dst += 4; - - util_format_yuv_to_rgb_float(y1, u, v, &dst[0], &dst[1], &dst[2]); - dst[3] = 1.0f; /* a */ - dst += 4; - } - - if (x < width) { - value = *src; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - y0 = (value >> 0) & 0xff; - u = (value >> 8) & 0xff; - y1 = (value >> 16) & 0xff; - v = (value >> 24) & 0xff; - - util_format_yuv_to_rgb_float(y0, u, v, &dst[0], &dst[1], &dst[2]); - dst[3] = 1.0f; /* a */ - } - - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - - -void -util_format_yuyv_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - - for (y = 0; y < height; y += 1) { - uint8_t *dst = dst_row; - const uint32_t *src = (const uint32_t *)src_row; - uint32_t value; - uint8_t y0, y1, u, v; - - for (x = 0; x + 1 < width; x += 2) { - value = *src++; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - y0 = (value >> 0) & 0xff; - u = (value >> 8) & 0xff; - y1 = (value >> 16) & 0xff; - v = (value >> 24) & 0xff; - - util_format_yuv_to_rgb_8unorm(y0, u, v, &dst[0], &dst[1], &dst[2]); - dst[3] = 0xff; /* a */ - dst += 4; - - util_format_yuv_to_rgb_8unorm(y1, u, v, &dst[0], &dst[1], &dst[2]); - dst[3] = 0xff; /* a */ - dst += 4; - } - - if (x < width) { - value = *src; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - y0 = (value >> 0) & 0xff; - u = (value >> 8) & 0xff; - y1 = (value >> 16) & 0xff; - v = (value >> 24) & 0xff; - - util_format_yuv_to_rgb_8unorm(y0, u, v, &dst[0], &dst[1], &dst[2]); - dst[3] = 0xff; /* a */ - } - - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - - -void -util_format_yuyv_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - - for (y = 0; y < height; y += 1) { - const float *src = src_row; - uint32_t *dst = (uint32_t *)dst_row; - uint8_t y0, y1, u, v; - uint32_t value; - - for (x = 0; x + 1 < width; x += 2) { - uint8_t y0, y1, u0, u1, v0, v1, u, v; - - util_format_rgb_float_to_yuv(src[0], src[1], src[2], - &y0, &u0, &v0); - util_format_rgb_float_to_yuv(src[4], src[5], src[6], - &y1, &u1, &v1); - - u = (u0 + u1 + 1) >> 1; - v = (v0 + v1 + 1) >> 1; - - value = y0; - value |= u << 8; - value |= y1 << 16; - value |= v << 24; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - *dst++ = value; - - src += 8; - } - - if (x < width) { - util_format_rgb_float_to_yuv(src[0], src[1], src[2], - &y0, &u, &v); - y1 = 0; - - value = y0; - value |= u << 8; - value |= y1 << 16; - value |= v << 24; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - *dst = value; - } - - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - - -void -util_format_yuyv_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - - for (y = 0; y < height; y += 1) { - const uint8_t *src = src_row; - uint32_t *dst = (uint32_t *)dst_row; - uint8_t y0, y1, u, v; - uint32_t value; - - for (x = 0; x + 1 < width; x += 2) { - uint8_t y0, y1, u0, u1, v0, v1, u, v; - - util_format_rgb_8unorm_to_yuv(src[0], src[1], src[2], - &y0, &u0, &v0); - util_format_rgb_8unorm_to_yuv(src[4], src[5], src[6], - &y1, &u1, &v1); - - u = (u0 + u1 + 1) >> 1; - v = (v0 + v1 + 1) >> 1; - - value = y0; - value |= u << 8; - value |= y1 << 16; - value |= v << 24; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - *dst++ = value; - - src += 8; - } - - if (x < width) { - util_format_rgb_8unorm_to_yuv(src[0], src[1], src[2], - &y0, &u, &v); - y1 = 0; - - value = y0; - value |= u << 8; - value |= y1 << 16; - value |= v << 24; - -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - *dst = value; - } - - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - - -void -util_format_yuyv_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j) -{ - uint8_t y, u, v; - - assert(i < 2); - assert(j < 1); - - y = src[0 + i*2]; - u = src[1]; - v = src[3]; - - util_format_yuv_to_rgb_float(y, u, v, &dst[0], &dst[1], &dst[2]); - - dst[3] = 1.0f; -} - -/* XXX: Stubbed for now */ -void -util_format_yv12_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) {} -void -util_format_yv12_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) {} -void -util_format_yv12_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) {} -void -util_format_yv12_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) {} -void -util_format_yv12_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j) {} -void -util_format_yv16_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) {} -void -util_format_yv16_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) {} -void -util_format_yv16_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) {} -void -util_format_yv16_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) {} -void -util_format_yv16_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j) {} -void -util_format_iyuv_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) {} -void -util_format_iyuv_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) {} -void -util_format_iyuv_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) {} -void -util_format_iyuv_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) {} -void -util_format_iyuv_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j) {} -void -util_format_nv12_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) {} -void -util_format_nv12_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) {} -void -util_format_nv12_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) {} -void -util_format_nv12_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) {} -void -util_format_nv12_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j) {} -void -util_format_nv21_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) {} -void -util_format_nv21_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) {} -void -util_format_nv21_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) {} -void -util_format_nv21_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) {} -void -util_format_nv21_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j) {} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_yuv.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_yuv.h deleted file mode 100644 index 4cb22df7a3c..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_yuv.h +++ /dev/null @@ -1,318 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - **************************************************************************/ - - -/** - * @file - * YUV colorspace conversion. - * - * @author Brian Paul - * @author Michal Krol - * @author Jose Fonseca - * - * See also: - * - http://www.fourcc.org/fccyvrgb.php - * - http://msdn.microsoft.com/en-us/library/ms893078 - * - http://en.wikipedia.org/wiki/YUV - */ - - -#ifndef U_FORMAT_YUV_H_ -#define U_FORMAT_YUV_H_ - - -#include "pipe/p_compiler.h" -#include "u_math.h" - - -/* - * TODO: Ensure we use consistent and right floating formulas, with enough - * precision in the coefficients. - */ - -static INLINE void -util_format_rgb_float_to_yuv(float r, float g, float b, - uint8_t *y, uint8_t *u, uint8_t *v) -{ - const float _r = CLAMP(r, 0.0f, 1.0f); - const float _g = CLAMP(g, 0.0f, 1.0f); - const float _b = CLAMP(b, 0.0f, 1.0f); - - const float scale = 255.0f; - - const int _y = scale * ( (0.257f * _r) + (0.504f * _g) + (0.098f * _b)); - const int _u = scale * (-(0.148f * _r) - (0.291f * _g) + (0.439f * _b)); - const int _v = scale * ( (0.439f * _r) - (0.368f * _g) - (0.071f * _b)); - - *y = _y + 16; - *u = _u + 128; - *v = _v + 128; -} - - -static INLINE void -util_format_yuv_to_rgb_float(uint8_t y, uint8_t u, uint8_t v, - float *r, float *g, float *b) -{ - const int _y = y - 16; - const int _u = u - 128; - const int _v = v - 128; - - const float y_factor = 255.0f / 219.0f; - - const float scale = 1.0f / 255.0f; - - *r = scale * (y_factor * _y + 1.596f * _v); - *g = scale * (y_factor * _y - 0.391f * _u - 0.813f * _v); - *b = scale * (y_factor * _y + 2.018f * _u ); -} - - -static INLINE void -util_format_rgb_8unorm_to_yuv(uint8_t r, uint8_t g, uint8_t b, - uint8_t *y, uint8_t *u, uint8_t *v) -{ - *y = (( 66 * r + 129 * g + 25 * b + 128) >> 8) + 16; - *u = (( -38 * r - 74 * g + 112 * b + 128) >> 8) + 128; - *v = (( 112 * r - 94 * g - 18 * b + 128) >> 8) + 128; -} - - -static INLINE void -util_format_yuv_to_rgb_8unorm(uint8_t y, uint8_t u, uint8_t v, - uint8_t *r, uint8_t *g, uint8_t *b) -{ - const int _y = y - 16; - const int _u = u - 128; - const int _v = v - 128; - - const int _r = (298 * _y + 409 * _v + 128) >> 8; - const int _g = (298 * _y - 100 * _u - 208 * _v + 128) >> 8; - const int _b = (298 * _y + 516 * _u + 128) >> 8; - - *r = CLAMP(_r, 0, 255); - *g = CLAMP(_g, 0, 255); - *b = CLAMP(_b, 0, 255); -} - - - -void -util_format_uyvy_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_uyvy_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_uyvy_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_uyvy_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_uyvy_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j); - -void -util_format_yuyv_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_yuyv_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_yuyv_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_yuyv_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_yuyv_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j); - -/* XXX: Stubbed for now */ -void -util_format_yv12_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); -void -util_format_yv12_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); -void -util_format_yv12_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); -void -util_format_yv12_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height); -void -util_format_yv12_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j); -void -util_format_yv16_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); -void -util_format_yv16_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); -void -util_format_yv16_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); -void -util_format_yv16_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height); -void -util_format_yv16_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j); -void -util_format_iyuv_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); -void -util_format_iyuv_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); -void -util_format_iyuv_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); -void -util_format_iyuv_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height); -void -util_format_iyuv_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j); -void -util_format_nv12_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); -void -util_format_nv12_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); -void -util_format_nv12_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); -void -util_format_nv12_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height); -void -util_format_nv12_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j); -void -util_format_nv21_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); -void -util_format_nv21_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); -void -util_format_nv21_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); -void -util_format_nv21_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height); -void -util_format_nv21_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j); -void -util_format_r8g8_b8g8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_r8g8_b8g8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_r8g8_b8g8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_r8g8_b8g8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_r8g8_b8g8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j); - -void -util_format_g8r8_g8b8_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_g8r8_g8b8_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_g8r8_g8b8_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_g8r8_g8b8_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height); - -void -util_format_g8r8_g8b8_unorm_fetch_rgba_float(float *dst, const uint8_t *src, - unsigned i, unsigned j); - - - -#endif /* U_FORMAT_YUV_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_zs.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_zs.c deleted file mode 100644 index 816ef14204c..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_zs.c +++ /dev/null @@ -1,973 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - **************************************************************************/ - - -#include "u_debug.h" -#include "u_math.h" -#include "u_format_zs.h" - - -/* - * z32_unorm conversion functions - */ - -static INLINE uint16_t -z32_unorm_to_z16_unorm(uint32_t z) -{ - /* z * 0xffff / 0xffffffff */ - return z >> 16; -} - -static INLINE uint32_t -z16_unorm_to_z32_unorm(uint16_t z) -{ - /* z * 0xffffffff / 0xffff */ - return (z << 16) | z; -} - -static INLINE uint32_t -z32_unorm_to_z24_unorm(uint32_t z) -{ - /* z * 0xffffff / 0xffffffff */ - return z >> 8; -} - -static INLINE uint32_t -z24_unorm_to_z32_unorm(uint32_t z) -{ - /* z * 0xffffffff / 0xffffff */ - return (z << 8) | (z >> 16); -} - - -/* - * z32_float conversion functions - */ - -static INLINE uint16_t -z32_float_to_z16_unorm(float z) -{ - const float scale = 0xffff; - return (uint16_t)(z * scale); -} - -static INLINE float -z16_unorm_to_z32_float(uint16_t z) -{ - const float scale = 1.0 / 0xffff; - return (float)(z * scale); -} - -static INLINE uint32_t -z32_float_to_z24_unorm(float z) -{ - const double scale = 0xffffff; - return (uint32_t)(z * scale) & 0xffffff; -} - -static INLINE float -z24_unorm_to_z32_float(uint32_t z) -{ - const double scale = 1.0 / 0xffffff; - return (float)(z * scale); -} - -static INLINE uint32_t -z32_float_to_z32_unorm(float z) -{ - const double scale = 0xffffffff; - return (uint32_t)(z * scale); -} - -static INLINE float -z32_unorm_to_z32_float(uint32_t z) -{ - const double scale = 1.0 / 0xffffffff; - return (float)(z * scale); -} - - -void -util_format_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned y; - for(y = 0; y < height; ++y) { - memcpy(dst_row, src_row, width); - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned y; - for(y = 0; y < height; ++y) { - memcpy(dst_row, src_row, width); - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_z16_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - float *dst = dst_row; - const uint16_t *src = (const uint16_t *)src_row; - for(x = 0; x < width; ++x) { - uint16_t value = *src++; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *dst++ = z16_unorm_to_z32_float(value); - } - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_z16_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - const float *src = src_row; - uint16_t *dst = (uint16_t *)dst_row; - for(x = 0; x < width; ++x) { - uint16_t value; - value = z32_float_to_z16_unorm(*src++); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *dst++ = value; - } - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - -void -util_format_z16_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - uint32_t *dst = dst_row; - const uint16_t *src = (const uint16_t *)src_row; - for(x = 0; x < width; ++x) { - uint16_t value = *src++; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *dst++ = z16_unorm_to_z32_unorm(value); - } - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_z16_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, - const uint32_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - const uint32_t *src = src_row; - uint16_t *dst = (uint16_t *)dst_row; - for(x = 0; x < width; ++x) { - uint16_t value; - value = z32_unorm_to_z16_unorm(*src++); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap16(value); -#endif - *dst++ = value; - } - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - -void -util_format_z32_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - float *dst = dst_row; - const uint32_t *src = (const uint32_t *)src_row; - for(x = 0; x < width; ++x) { - uint32_t value = *src++; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = z32_unorm_to_z32_float(value); - } - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_z32_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - const float *src = src_row; - uint32_t *dst = (uint32_t *)dst_row; - for(x = 0; x < width; ++x) { - uint32_t value; - value = z32_float_to_z32_unorm(*src++); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = value; - } - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - -void -util_format_z32_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned y; - for(y = 0; y < height; ++y) { - memcpy(dst_row, src_row, width * 4); - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_z32_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, - const uint32_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned y; - for(y = 0; y < height; ++y) { - memcpy(dst_row, src_row, width * 4); - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_z32_float_unpack_z_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned y; - for(y = 0; y < height; ++y) { - memcpy(dst_row, src_row, width * 4); - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_z32_float_pack_z_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned y; - for(y = 0; y < height; ++y) { - memcpy(dst_row, src_row, width * 4); - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_z32_float_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - uint32_t *dst = dst_row; - const float *src = (const float *)src_row; - for(x = 0; x < width; ++x) { - *dst++ = z32_float_to_z32_unorm(*src++); - } - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_z32_float_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, - const uint32_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - const uint32_t *src = src_row; - float *dst = (float *)dst_row; - for(x = 0; x < width; ++x) { - *dst++ = z32_unorm_to_z32_float(*src++); - } - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - -void -util_format_z24_unorm_s8_uint_unpack_z_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - float *dst = dst_row; - const uint32_t *src = (const uint32_t *)src_row; - for(x = 0; x < width; ++x) { - uint32_t value = *src++; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = z24_unorm_to_z32_float(value & 0xffffff); - } - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_z24_unorm_s8_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - const float *src = src_row; - uint32_t *dst = (uint32_t *)dst_row; - for(x = 0; x < width; ++x) { - uint32_t value = *dst; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - value &= 0xff000000; - value |= z32_float_to_z24_unorm(*src++); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = value; - } - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - -void -util_format_z24_unorm_s8_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - uint32_t *dst = dst_row; - const uint32_t *src = (const uint32_t *)src_row; - for(x = 0; x < width; ++x) { - uint32_t value = *src++; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = z24_unorm_to_z32_unorm(value & 0xffffff); - } - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_z24_unorm_s8_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, - const uint32_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - const uint32_t *src = src_row; - uint32_t *dst = (uint32_t *)dst_row; - for(x = 0; x < width; ++x) { - uint32_t value= *dst; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - value &= 0xff000000; - value |= z32_unorm_to_z24_unorm(*src++); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = value; - } - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - -void -util_format_z24_unorm_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - uint8_t *dst = dst_row; - const uint32_t *src = (const uint32_t *)src_row; - for(x = 0; x < width; ++x) { - uint32_t value = *src++; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = value >> 24; - } - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_z24_unorm_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - const uint8_t *src = src_row; - uint32_t *dst = (uint32_t *)dst_row; - for(x = 0; x < width; ++x) { - uint32_t value = *dst; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - value &= 0x00ffffff; - value |= *src++ << 24; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = value; - } - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - -void -util_format_s8_uint_z24_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - float *dst = dst_row; - const uint32_t *src = (const uint32_t *)src_row; - for(x = 0; x < width; ++x) { - uint32_t value = *src++; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = z24_unorm_to_z32_float(value >> 8); - } - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_s8_uint_z24_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - const float *src = src_row; - uint32_t *dst = (uint32_t *)dst_row; - for(x = 0; x < width; ++x) { - uint32_t value = *dst; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - value &= 0x000000ff; - value |= z32_float_to_z24_unorm(*src++) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = value; - } - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - -void -util_format_s8_uint_z24_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - uint32_t *dst = dst_row; - const uint32_t *src = (const uint32_t *)src_row; - for(x = 0; x < width; ++x) { - uint32_t value = *src++; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = z24_unorm_to_z32_unorm(value >> 8); - } - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_s8_uint_z24_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, - const uint32_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - const uint32_t *src = src_row; - uint32_t *dst = (uint32_t *)dst_row; - for(x = 0; x < width; ++x) { - uint32_t value = *dst; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - value &= 0x000000ff; - value |= *src++ & 0xffffff00; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = value; - } - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - -void -util_format_s8_uint_z24_unorm_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - uint8_t *dst = dst_row; - const uint32_t *src = (const uint32_t *)src_row; - for(x = 0; x < width; ++x) { - uint32_t value = *src++; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = value & 0xff; - } - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_s8_uint_z24_unorm_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - const uint8_t *src = src_row; - uint32_t *dst = (uint32_t *)dst_row; - for(x = 0; x < width; ++x) { - uint32_t value = *dst; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - value &= 0xffffff00; - value |= *src++; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = value; - } - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - -void -util_format_z24x8_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - float *dst = dst_row; - const uint32_t *src = (const uint32_t *)src_row; - for(x = 0; x < width; ++x) { - uint32_t value = *src++; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = z24_unorm_to_z32_float(value & 0xffffff); - } - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_z24x8_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - const float *src = src_row; - uint32_t *dst = (uint32_t *)dst_row; - for(x = 0; x < width; ++x) { - uint32_t value; - value = z32_float_to_z24_unorm(*src++); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = value; - } - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - -void -util_format_z24x8_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - uint32_t *dst = dst_row; - const uint32_t *src = (const uint32_t *)src_row; - for(x = 0; x < width; ++x) { - uint32_t value = *src++; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = z24_unorm_to_z32_unorm(value & 0xffffff); - } - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_z24x8_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, - const uint32_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - const uint32_t *src = src_row; - uint32_t *dst = (uint32_t *)dst_row; - for(x = 0; x < width; ++x) { - uint32_t value; - value = z32_unorm_to_z24_unorm(*src++); -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = value; - } - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - -void -util_format_x8z24_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - float *dst = dst_row; - const uint32_t *src = (uint32_t *)src_row; - for(x = 0; x < width; ++x) { - uint32_t value = *src++; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = z24_unorm_to_z32_float(value >> 8); - } - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_x8z24_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - const float *src = src_row; - uint32_t *dst = (uint32_t *)dst_row; - for(x = 0; x < width; ++x) { - uint32_t value; - value = z32_float_to_z24_unorm(*src++) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = value; - } - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - -void -util_format_x8z24_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - uint32_t *dst = dst_row; - const uint32_t *src = (const uint32_t *)src_row; - for(x = 0; x < width; ++x) { - uint32_t value = *src++; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = z24_unorm_to_z32_unorm(value >> 8); - } - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_x8z24_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, - const uint32_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - const uint32_t *src = src_row; - uint32_t *dst = (uint32_t *)dst_row; - for(x = 0; x < width; ++x) { - uint32_t value; - value = z32_unorm_to_z24_unorm(*src++) << 8; -#ifdef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - *dst++ = value; - } - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - -void -util_format_z32_float_s8x24_uint_unpack_z_float(float *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - float *dst = dst_row; - const float *src = (const float *)src_row; - for(x = 0; x < width; ++x) { - *dst = *src; - src += 2; - dst += 1; - } - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_z32_float_s8x24_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride, - const float *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - const float *src = src_row; - float *dst = (float *)dst_row; - for(x = 0; x < width; ++x) { - *dst = *src; - src += 1; - dst += 2; - } - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - -void -util_format_z32_float_s8x24_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - uint32_t *dst = dst_row; - const float *src = (const float *)src_row; - for(x = 0; x < width; ++x) { - *dst = z32_float_to_z32_unorm(*src); - src += 2; - dst += 1; - } - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_z32_float_s8x24_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, - const uint32_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - const uint32_t *src = src_row; - float *dst = (float *)dst_row; - for(x = 0; x < width; ++x) { - *dst++ = z32_unorm_to_z32_float(*src++); - } - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - -void -util_format_z32_float_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - uint8_t *dst = dst_row; - const uint8_t *src = src_row + 4; - for(x = 0; x < width; ++x) { - *dst = *src; - src += 8; - dst += 1; - } - src_row += src_stride/sizeof(*src_row); - dst_row += dst_stride/sizeof(*dst_row); - } -} - -void -util_format_z32_float_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - unsigned x, y; - for(y = 0; y < height; ++y) { - const uint8_t *src = src_row; - uint8_t *dst = dst_row + 4; - for(x = 0; x < width; ++x) { - *dst = *src; - src += 1; - dst += 8; - } - dst_row += dst_stride/sizeof(*dst_row); - src_row += src_stride/sizeof(*src_row); - } -} - - -void -util_format_x24s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_z24_unorm_s8_uint_unpack_s_8uint(dst_row, dst_stride, - src_row, src_stride, - width, height); -} - -void -util_format_x24s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_z24_unorm_s8_uint_pack_s_8uint(dst_row, dst_stride, - src_row, src_stride, - width, height); -} - -void -util_format_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_s8_uint_z24_unorm_unpack_s_8uint(dst_row, dst_stride, - src_row, src_stride, - width, height); -} - -void -util_format_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ - util_format_s8_uint_z24_unorm_pack_s_8uint(dst_row, dst_stride, - src_row, src_stride, - width, height); -} - -void -util_format_x32_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - util_format_z32_float_s8x24_uint_unpack_s_8uint(dst_row, dst_stride, - src_row, src_stride, - width, height); - -} - -void -util_format_x32_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, - const uint8_t *src_row, unsigned src_stride, - unsigned width, unsigned height) -{ - util_format_z32_float_s8x24_uint_pack_s_8uint(dst_row, dst_stride, - src_row, src_stride, - width, height); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_zs.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_zs.h deleted file mode 100644 index adddfaf3a74..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_format_zs.h +++ /dev/null @@ -1,212 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - **************************************************************************/ - - -#ifndef U_FORMAT_ZS_H_ -#define U_FORMAT_ZS_H_ - - -#include "pipe/p_compiler.h" - - -void -util_format_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z16_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z16_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z16_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z16_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z32_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z32_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z32_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z32_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z32_float_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z32_float_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z32_float_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z32_float_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z24_unorm_s8_uint_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z24_unorm_s8_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z24_unorm_s8_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z24_unorm_s8_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z24_unorm_s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z24_unorm_s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_s8_uint_z24_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_s8_uint_z24_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_s8_uint_z24_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_s8_uint_z24_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_s8_uint_z24_unorm_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_s8_uint_z24_unorm_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z24x8_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z24x8_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z24x8_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z24x8_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_x8z24_unorm_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_x8z24_unorm_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_x8z24_unorm_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_x8z24_unorm_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z32_float_s8x24_uint_unpack_z_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z32_float_s8x24_uint_pack_z_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z32_float_s8x24_uint_unpack_z_32unorm(uint32_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z32_float_s8x24_uint_pack_z_32unorm(uint8_t *dst_row, unsigned dst_stride, const uint32_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z32_float_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - - -void -util_format_z32_float_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_x24s8_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_x24s8_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_x32_s8x24_uint_unpack_s_8uint(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); - -void -util_format_x32_s8x24_uint_pack_s_8uint(uint8_t *dst_row, unsigned dst_sride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height); -#endif /* U_FORMAT_ZS_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_framebuffer.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_framebuffer.c deleted file mode 100644 index 7803ec6a8b5..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_framebuffer.c +++ /dev/null @@ -1,148 +0,0 @@ -/************************************************************************** - * - * Copyright 2009-2010 VMware, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Framebuffer utility functions. - * - * @author Brian Paul - */ - - -#include "pipe/p_screen.h" -#include "pipe/p_state.h" -#include "pipe/p_defines.h" -#include "util/u_inlines.h" - -#include "util/u_memory.h" -#include "util/u_framebuffer.h" - - -/** - * Compare pipe_framebuffer_state objects. - * \return TRUE if same, FALSE if different - */ -boolean -util_framebuffer_state_equal(const struct pipe_framebuffer_state *dst, - const struct pipe_framebuffer_state *src) -{ - unsigned i; - - if (dst->width != src->width || - dst->height != src->height) - return FALSE; - - for (i = 0; i < Elements(src->cbufs); i++) { - if (dst->cbufs[i] != src->cbufs[i]) { - return FALSE; - } - } - - if (dst->nr_cbufs != src->nr_cbufs) { - return FALSE; - } - - if (dst->zsbuf != src->zsbuf) { - return FALSE; - } - - return TRUE; -} - - -/** - * Copy framebuffer state from src to dst, updating refcounts. - */ -void -util_copy_framebuffer_state(struct pipe_framebuffer_state *dst, - const struct pipe_framebuffer_state *src) -{ - unsigned i; - - dst->width = src->width; - dst->height = src->height; - - for (i = 0; i < src->nr_cbufs; i++) - pipe_surface_reference(&dst->cbufs[i], src->cbufs[i]); - - for (i = src->nr_cbufs; i < dst->nr_cbufs; i++) - pipe_surface_reference(&dst->cbufs[i], NULL); - - dst->nr_cbufs = src->nr_cbufs; - - pipe_surface_reference(&dst->zsbuf, src->zsbuf); -} - - -void -util_unreference_framebuffer_state(struct pipe_framebuffer_state *fb) -{ - unsigned i; - - for (i = 0; i < fb->nr_cbufs; i++) { - pipe_surface_reference(&fb->cbufs[i], NULL); - } - - pipe_surface_reference(&fb->zsbuf, NULL); - - fb->width = fb->height = 0; - fb->nr_cbufs = 0; -} - - -/* Where multiple sizes are allowed for framebuffer surfaces, find the - * minimum width and height of all bound surfaces. - */ -boolean -util_framebuffer_min_size(const struct pipe_framebuffer_state *fb, - unsigned *width, - unsigned *height) -{ - unsigned w = ~0; - unsigned h = ~0; - unsigned i; - - for (i = 0; i < fb->nr_cbufs; i++) { - w = MIN2(w, fb->cbufs[i]->width); - h = MIN2(h, fb->cbufs[i]->height); - } - - if (fb->zsbuf) { - w = MIN2(w, fb->zsbuf->width); - h = MIN2(h, fb->zsbuf->height); - } - - if (w == ~0) { - *width = 0; - *height = 0; - return FALSE; - } - else { - *width = w; - *height = h; - return TRUE; - } -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_framebuffer.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_framebuffer.h deleted file mode 100644 index e7dc1e9e41d..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_framebuffer.h +++ /dev/null @@ -1,54 +0,0 @@ -/************************************************************************** - * - * Copyright 2009-2010 VMware, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#ifndef U_FRAMEBUFFER_H -#define U_FRAMEBUFFER_H - - -#include "pipe/p_compiler.h" -#include "pipe/p_state.h" - - -extern boolean -util_framebuffer_state_equal(const struct pipe_framebuffer_state *dst, - const struct pipe_framebuffer_state *src); - -extern void -util_copy_framebuffer_state(struct pipe_framebuffer_state *dst, - const struct pipe_framebuffer_state *src); - - -extern void -util_unreference_framebuffer_state(struct pipe_framebuffer_state *fb); - - -extern boolean -util_framebuffer_min_size(const struct pipe_framebuffer_state *fb, - unsigned *width, - unsigned *height); - -#endif /* U_FRAMEBUFFER_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_gen_mipmap.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_gen_mipmap.c deleted file mode 100644 index a28d4182549..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_gen_mipmap.c +++ /dev/null @@ -1,1691 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * Copyright 2008 VMware, Inc. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Mipmap generation utility - * - * @author Brian Paul - */ - - -#include "pipe/p_context.h" -#include "util/u_debug.h" -#include "pipe/p_defines.h" -#include "util/u_inlines.h" -#include "pipe/p_shader_tokens.h" -#include "pipe/p_state.h" - -#include "util/u_format.h" -#include "util/u_memory.h" -#include "util/u_draw_quad.h" -#include "util/u_gen_mipmap.h" -#include "util/u_simple_shaders.h" -#include "util/u_math.h" -#include "util/u_texture.h" -#include "util/u_half.h" -#include "util/u_surface.h" - -#include "cso_cache/cso_context.h" - - -struct gen_mipmap_state -{ - struct pipe_context *pipe; - struct cso_context *cso; - - struct pipe_blend_state blend; - struct pipe_depth_stencil_alpha_state depthstencil; - struct pipe_rasterizer_state rasterizer; - struct pipe_sampler_state sampler; - struct pipe_vertex_element velem[2]; - - void *vs; - void *fs[TGSI_TEXTURE_COUNT]; /**< Not all are used, but simplifies code */ - - struct pipe_resource *vbuf; /**< quad vertices */ - unsigned vbuf_slot; - - float vertices[4][2][4]; /**< vertex/texcoords for quad */ -}; - - - -enum dtype -{ - DTYPE_UBYTE, - DTYPE_UBYTE_3_3_2, - DTYPE_USHORT, - DTYPE_USHORT_4_4_4_4, - DTYPE_USHORT_5_6_5, - DTYPE_USHORT_1_5_5_5_REV, - DTYPE_UINT, - DTYPE_FLOAT, - DTYPE_HALF_FLOAT -}; - - -typedef uint16_t half_float; - - -/** - * \name Support macros for do_row and do_row_3d - * - * The macro madness is here for two reasons. First, it compacts the code - * slightly. Second, it makes it much easier to adjust the specifics of the - * filter to tune the rounding characteristics. - */ -/*@{*/ -#define DECLARE_ROW_POINTERS(t, e) \ - const t(*rowA)[e] = (const t(*)[e]) srcRowA; \ - const t(*rowB)[e] = (const t(*)[e]) srcRowB; \ - const t(*rowC)[e] = (const t(*)[e]) srcRowC; \ - const t(*rowD)[e] = (const t(*)[e]) srcRowD; \ - t(*dst)[e] = (t(*)[e]) dstRow - -#define DECLARE_ROW_POINTERS0(t) \ - const t *rowA = (const t *) srcRowA; \ - const t *rowB = (const t *) srcRowB; \ - const t *rowC = (const t *) srcRowC; \ - const t *rowD = (const t *) srcRowD; \ - t *dst = (t *) dstRow - -#define FILTER_SUM_3D(Aj, Ak, Bj, Bk, Cj, Ck, Dj, Dk) \ - ((unsigned) Aj + (unsigned) Ak \ - + (unsigned) Bj + (unsigned) Bk \ - + (unsigned) Cj + (unsigned) Ck \ - + (unsigned) Dj + (unsigned) Dk \ - + 4) >> 3 - -#define FILTER_3D(e) \ - do { \ - dst[i][e] = FILTER_SUM_3D(rowA[j][e], rowA[k][e], \ - rowB[j][e], rowB[k][e], \ - rowC[j][e], rowC[k][e], \ - rowD[j][e], rowD[k][e]); \ - } while(0) - -#define FILTER_F_3D(e) \ - do { \ - dst[i][e] = (rowA[j][e] + rowA[k][e] \ - + rowB[j][e] + rowB[k][e] \ - + rowC[j][e] + rowC[k][e] \ - + rowD[j][e] + rowD[k][e]) * 0.125F; \ - } while(0) - -#define FILTER_HF_3D(e) \ - do { \ - const float aj = util_half_to_float(rowA[j][e]); \ - const float ak = util_half_to_float(rowA[k][e]); \ - const float bj = util_half_to_float(rowB[j][e]); \ - const float bk = util_half_to_float(rowB[k][e]); \ - const float cj = util_half_to_float(rowC[j][e]); \ - const float ck = util_half_to_float(rowC[k][e]); \ - const float dj = util_half_to_float(rowD[j][e]); \ - const float dk = util_half_to_float(rowD[k][e]); \ - dst[i][e] = util_float_to_half((aj + ak + bj + bk + cj + ck + dj + dk) \ - * 0.125F); \ - } while(0) -/*@}*/ - - -/** - * Average together two rows of a source image to produce a single new - * row in the dest image. It's legal for the two source rows to point - * to the same data. The source width must be equal to either the - * dest width or two times the dest width. - * \param datatype GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, GL_FLOAT, etc. - * \param comps number of components per pixel (1..4) - */ -static void -do_row(enum dtype datatype, uint comps, int srcWidth, - const void *srcRowA, const void *srcRowB, - int dstWidth, void *dstRow) -{ - const uint k0 = (srcWidth == dstWidth) ? 0 : 1; - const uint colStride = (srcWidth == dstWidth) ? 1 : 2; - - assert(comps >= 1); - assert(comps <= 4); - - /* This assertion is no longer valid with non-power-of-2 textures - assert(srcWidth == dstWidth || srcWidth == 2 * dstWidth); - */ - - if (datatype == DTYPE_UBYTE && comps == 4) { - uint i, j, k; - const ubyte(*rowA)[4] = (const ubyte(*)[4]) srcRowA; - const ubyte(*rowB)[4] = (const ubyte(*)[4]) srcRowB; - ubyte(*dst)[4] = (ubyte(*)[4]) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4; - dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4; - dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4; - dst[i][3] = (rowA[j][3] + rowA[k][3] + rowB[j][3] + rowB[k][3]) / 4; - } - } - else if (datatype == DTYPE_UBYTE && comps == 3) { - uint i, j, k; - const ubyte(*rowA)[3] = (const ubyte(*)[3]) srcRowA; - const ubyte(*rowB)[3] = (const ubyte(*)[3]) srcRowB; - ubyte(*dst)[3] = (ubyte(*)[3]) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4; - dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4; - dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4; - } - } - else if (datatype == DTYPE_UBYTE && comps == 2) { - uint i, j, k; - const ubyte(*rowA)[2] = (const ubyte(*)[2]) srcRowA; - const ubyte(*rowB)[2] = (const ubyte(*)[2]) srcRowB; - ubyte(*dst)[2] = (ubyte(*)[2]) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) >> 2; - dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) >> 2; - } - } - else if (datatype == DTYPE_UBYTE && comps == 1) { - uint i, j, k; - const ubyte *rowA = (const ubyte *) srcRowA; - const ubyte *rowB = (const ubyte *) srcRowB; - ubyte *dst = (ubyte *) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) >> 2; - } - } - - else if (datatype == DTYPE_USHORT && comps == 4) { - uint i, j, k; - const ushort(*rowA)[4] = (const ushort(*)[4]) srcRowA; - const ushort(*rowB)[4] = (const ushort(*)[4]) srcRowB; - ushort(*dst)[4] = (ushort(*)[4]) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4; - dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4; - dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4; - dst[i][3] = (rowA[j][3] + rowA[k][3] + rowB[j][3] + rowB[k][3]) / 4; - } - } - else if (datatype == DTYPE_USHORT && comps == 3) { - uint i, j, k; - const ushort(*rowA)[3] = (const ushort(*)[3]) srcRowA; - const ushort(*rowB)[3] = (const ushort(*)[3]) srcRowB; - ushort(*dst)[3] = (ushort(*)[3]) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4; - dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4; - dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4; - } - } - else if (datatype == DTYPE_USHORT && comps == 2) { - uint i, j, k; - const ushort(*rowA)[2] = (const ushort(*)[2]) srcRowA; - const ushort(*rowB)[2] = (const ushort(*)[2]) srcRowB; - ushort(*dst)[2] = (ushort(*)[2]) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4; - dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4; - } - } - else if (datatype == DTYPE_USHORT && comps == 1) { - uint i, j, k; - const ushort *rowA = (const ushort *) srcRowA; - const ushort *rowB = (const ushort *) srcRowB; - ushort *dst = (ushort *) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) / 4; - } - } - - else if (datatype == DTYPE_FLOAT && comps == 4) { - uint i, j, k; - const float(*rowA)[4] = (const float(*)[4]) srcRowA; - const float(*rowB)[4] = (const float(*)[4]) srcRowB; - float(*dst)[4] = (float(*)[4]) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i][0] = (rowA[j][0] + rowA[k][0] + - rowB[j][0] + rowB[k][0]) * 0.25F; - dst[i][1] = (rowA[j][1] + rowA[k][1] + - rowB[j][1] + rowB[k][1]) * 0.25F; - dst[i][2] = (rowA[j][2] + rowA[k][2] + - rowB[j][2] + rowB[k][2]) * 0.25F; - dst[i][3] = (rowA[j][3] + rowA[k][3] + - rowB[j][3] + rowB[k][3]) * 0.25F; - } - } - else if (datatype == DTYPE_FLOAT && comps == 3) { - uint i, j, k; - const float(*rowA)[3] = (const float(*)[3]) srcRowA; - const float(*rowB)[3] = (const float(*)[3]) srcRowB; - float(*dst)[3] = (float(*)[3]) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i][0] = (rowA[j][0] + rowA[k][0] + - rowB[j][0] + rowB[k][0]) * 0.25F; - dst[i][1] = (rowA[j][1] + rowA[k][1] + - rowB[j][1] + rowB[k][1]) * 0.25F; - dst[i][2] = (rowA[j][2] + rowA[k][2] + - rowB[j][2] + rowB[k][2]) * 0.25F; - } - } - else if (datatype == DTYPE_FLOAT && comps == 2) { - uint i, j, k; - const float(*rowA)[2] = (const float(*)[2]) srcRowA; - const float(*rowB)[2] = (const float(*)[2]) srcRowB; - float(*dst)[2] = (float(*)[2]) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i][0] = (rowA[j][0] + rowA[k][0] + - rowB[j][0] + rowB[k][0]) * 0.25F; - dst[i][1] = (rowA[j][1] + rowA[k][1] + - rowB[j][1] + rowB[k][1]) * 0.25F; - } - } - else if (datatype == DTYPE_FLOAT && comps == 1) { - uint i, j, k; - const float *rowA = (const float *) srcRowA; - const float *rowB = (const float *) srcRowB; - float *dst = (float *) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) * 0.25F; - } - } - - else if (datatype == DTYPE_HALF_FLOAT && comps == 4) { - uint i, j, k, comp; - const half_float(*rowA)[4] = (const half_float(*)[4]) srcRowA; - const half_float(*rowB)[4] = (const half_float(*)[4]) srcRowB; - half_float(*dst)[4] = (half_float(*)[4]) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - for (comp = 0; comp < 4; comp++) { - float aj, ak, bj, bk; - aj = util_half_to_float(rowA[j][comp]); - ak = util_half_to_float(rowA[k][comp]); - bj = util_half_to_float(rowB[j][comp]); - bk = util_half_to_float(rowB[k][comp]); - dst[i][comp] = util_float_to_half((aj + ak + bj + bk) * 0.25F); - } - } - } - else if (datatype == DTYPE_HALF_FLOAT && comps == 3) { - uint i, j, k, comp; - const half_float(*rowA)[3] = (const half_float(*)[3]) srcRowA; - const half_float(*rowB)[3] = (const half_float(*)[3]) srcRowB; - half_float(*dst)[3] = (half_float(*)[3]) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - for (comp = 0; comp < 3; comp++) { - float aj, ak, bj, bk; - aj = util_half_to_float(rowA[j][comp]); - ak = util_half_to_float(rowA[k][comp]); - bj = util_half_to_float(rowB[j][comp]); - bk = util_half_to_float(rowB[k][comp]); - dst[i][comp] = util_float_to_half((aj + ak + bj + bk) * 0.25F); - } - } - } - else if (datatype == DTYPE_HALF_FLOAT && comps == 2) { - uint i, j, k, comp; - const half_float(*rowA)[2] = (const half_float(*)[2]) srcRowA; - const half_float(*rowB)[2] = (const half_float(*)[2]) srcRowB; - half_float(*dst)[2] = (half_float(*)[2]) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - for (comp = 0; comp < 2; comp++) { - float aj, ak, bj, bk; - aj = util_half_to_float(rowA[j][comp]); - ak = util_half_to_float(rowA[k][comp]); - bj = util_half_to_float(rowB[j][comp]); - bk = util_half_to_float(rowB[k][comp]); - dst[i][comp] = util_float_to_half((aj + ak + bj + bk) * 0.25F); - } - } - } - else if (datatype == DTYPE_HALF_FLOAT && comps == 1) { - uint i, j, k; - const half_float *rowA = (const half_float *) srcRowA; - const half_float *rowB = (const half_float *) srcRowB; - half_float *dst = (half_float *) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - float aj, ak, bj, bk; - aj = util_half_to_float(rowA[j]); - ak = util_half_to_float(rowA[k]); - bj = util_half_to_float(rowB[j]); - bk = util_half_to_float(rowB[k]); - dst[i] = util_float_to_half((aj + ak + bj + bk) * 0.25F); - } - } - - else if (datatype == DTYPE_UINT && comps == 1) { - uint i, j, k; - const uint *rowA = (const uint *) srcRowA; - const uint *rowB = (const uint *) srcRowB; - uint *dst = (uint *) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - dst[i] = rowA[j] / 4 + rowA[k] / 4 + rowB[j] / 4 + rowB[k] / 4; - } - } - - else if (datatype == DTYPE_USHORT_5_6_5 && comps == 3) { - uint i, j, k; - const ushort *rowA = (const ushort *) srcRowA; - const ushort *rowB = (const ushort *) srcRowB; - ushort *dst = (ushort *) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - const int rowAr0 = rowA[j] & 0x1f; - const int rowAr1 = rowA[k] & 0x1f; - const int rowBr0 = rowB[j] & 0x1f; - const int rowBr1 = rowB[k] & 0x1f; - const int rowAg0 = (rowA[j] >> 5) & 0x3f; - const int rowAg1 = (rowA[k] >> 5) & 0x3f; - const int rowBg0 = (rowB[j] >> 5) & 0x3f; - const int rowBg1 = (rowB[k] >> 5) & 0x3f; - const int rowAb0 = (rowA[j] >> 11) & 0x1f; - const int rowAb1 = (rowA[k] >> 11) & 0x1f; - const int rowBb0 = (rowB[j] >> 11) & 0x1f; - const int rowBb1 = (rowB[k] >> 11) & 0x1f; - const int red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2; - const int green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2; - const int blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2; - dst[i] = (blue << 11) | (green << 5) | red; - } - } - else if (datatype == DTYPE_USHORT_4_4_4_4 && comps == 4) { - uint i, j, k; - const ushort *rowA = (const ushort *) srcRowA; - const ushort *rowB = (const ushort *) srcRowB; - ushort *dst = (ushort *) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - const int rowAr0 = rowA[j] & 0xf; - const int rowAr1 = rowA[k] & 0xf; - const int rowBr0 = rowB[j] & 0xf; - const int rowBr1 = rowB[k] & 0xf; - const int rowAg0 = (rowA[j] >> 4) & 0xf; - const int rowAg1 = (rowA[k] >> 4) & 0xf; - const int rowBg0 = (rowB[j] >> 4) & 0xf; - const int rowBg1 = (rowB[k] >> 4) & 0xf; - const int rowAb0 = (rowA[j] >> 8) & 0xf; - const int rowAb1 = (rowA[k] >> 8) & 0xf; - const int rowBb0 = (rowB[j] >> 8) & 0xf; - const int rowBb1 = (rowB[k] >> 8) & 0xf; - const int rowAa0 = (rowA[j] >> 12) & 0xf; - const int rowAa1 = (rowA[k] >> 12) & 0xf; - const int rowBa0 = (rowB[j] >> 12) & 0xf; - const int rowBa1 = (rowB[k] >> 12) & 0xf; - const int red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2; - const int green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2; - const int blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2; - const int alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 2; - dst[i] = (alpha << 12) | (blue << 8) | (green << 4) | red; - } - } - else if (datatype == DTYPE_USHORT_1_5_5_5_REV && comps == 4) { - uint i, j, k; - const ushort *rowA = (const ushort *) srcRowA; - const ushort *rowB = (const ushort *) srcRowB; - ushort *dst = (ushort *) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - const int rowAr0 = rowA[j] & 0x1f; - const int rowAr1 = rowA[k] & 0x1f; - const int rowBr0 = rowB[j] & 0x1f; - const int rowBr1 = rowB[k] & 0x1f; - const int rowAg0 = (rowA[j] >> 5) & 0x1f; - const int rowAg1 = (rowA[k] >> 5) & 0x1f; - const int rowBg0 = (rowB[j] >> 5) & 0x1f; - const int rowBg1 = (rowB[k] >> 5) & 0x1f; - const int rowAb0 = (rowA[j] >> 10) & 0x1f; - const int rowAb1 = (rowA[k] >> 10) & 0x1f; - const int rowBb0 = (rowB[j] >> 10) & 0x1f; - const int rowBb1 = (rowB[k] >> 10) & 0x1f; - const int rowAa0 = (rowA[j] >> 15) & 0x1; - const int rowAa1 = (rowA[k] >> 15) & 0x1; - const int rowBa0 = (rowB[j] >> 15) & 0x1; - const int rowBa1 = (rowB[k] >> 15) & 0x1; - const int red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2; - const int green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2; - const int blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2; - const int alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 2; - dst[i] = (alpha << 15) | (blue << 10) | (green << 5) | red; - } - } - else if (datatype == DTYPE_UBYTE_3_3_2 && comps == 3) { - uint i, j, k; - const ubyte *rowA = (const ubyte *) srcRowA; - const ubyte *rowB = (const ubyte *) srcRowB; - ubyte *dst = (ubyte *) dstRow; - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - const int rowAr0 = rowA[j] & 0x3; - const int rowAr1 = rowA[k] & 0x3; - const int rowBr0 = rowB[j] & 0x3; - const int rowBr1 = rowB[k] & 0x3; - const int rowAg0 = (rowA[j] >> 2) & 0x7; - const int rowAg1 = (rowA[k] >> 2) & 0x7; - const int rowBg0 = (rowB[j] >> 2) & 0x7; - const int rowBg1 = (rowB[k] >> 2) & 0x7; - const int rowAb0 = (rowA[j] >> 5) & 0x7; - const int rowAb1 = (rowA[k] >> 5) & 0x7; - const int rowBb0 = (rowB[j] >> 5) & 0x7; - const int rowBb1 = (rowB[k] >> 5) & 0x7; - const int red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2; - const int green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2; - const int blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2; - dst[i] = (blue << 5) | (green << 2) | red; - } - } - else { - debug_printf("bad format in do_row()"); - } -} - - -/** - * Average together four rows of a source image to produce a single new - * row in the dest image. It's legal for the two source rows to point - * to the same data. The source width must be equal to either the - * dest width or two times the dest width. - * - * \param datatype GL pixel type \c GL_UNSIGNED_BYTE, \c GL_UNSIGNED_SHORT, - * \c GL_FLOAT, etc. - * \param comps number of components per pixel (1..4) - * \param srcWidth Width of a row in the source data - * \param srcRowA Pointer to one of the rows of source data - * \param srcRowB Pointer to one of the rows of source data - * \param srcRowC Pointer to one of the rows of source data - * \param srcRowD Pointer to one of the rows of source data - * \param dstWidth Width of a row in the destination data - * \param srcRowA Pointer to the row of destination data - */ -static void -do_row_3D(enum dtype datatype, uint comps, int srcWidth, - const void *srcRowA, const void *srcRowB, - const void *srcRowC, const void *srcRowD, - int dstWidth, void *dstRow) -{ - const uint k0 = (srcWidth == dstWidth) ? 0 : 1; - const uint colStride = (srcWidth == dstWidth) ? 1 : 2; - uint i, j, k; - - assert(comps >= 1); - assert(comps <= 4); - - if ((datatype == DTYPE_UBYTE) && (comps == 4)) { - DECLARE_ROW_POINTERS(ubyte, 4); - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - FILTER_3D(0); - FILTER_3D(1); - FILTER_3D(2); - FILTER_3D(3); - } - } - else if ((datatype == DTYPE_UBYTE) && (comps == 3)) { - DECLARE_ROW_POINTERS(ubyte, 3); - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - FILTER_3D(0); - FILTER_3D(1); - FILTER_3D(2); - } - } - else if ((datatype == DTYPE_UBYTE) && (comps == 2)) { - DECLARE_ROW_POINTERS(ubyte, 2); - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - FILTER_3D(0); - FILTER_3D(1); - } - } - else if ((datatype == DTYPE_UBYTE) && (comps == 1)) { - DECLARE_ROW_POINTERS(ubyte, 1); - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - FILTER_3D(0); - } - } - else if ((datatype == DTYPE_USHORT) && (comps == 4)) { - DECLARE_ROW_POINTERS(ushort, 4); - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - FILTER_3D(0); - FILTER_3D(1); - FILTER_3D(2); - FILTER_3D(3); - } - } - else if ((datatype == DTYPE_USHORT) && (comps == 3)) { - DECLARE_ROW_POINTERS(ushort, 3); - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - FILTER_3D(0); - FILTER_3D(1); - FILTER_3D(2); - } - } - else if ((datatype == DTYPE_USHORT) && (comps == 2)) { - DECLARE_ROW_POINTERS(ushort, 2); - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - FILTER_3D(0); - FILTER_3D(1); - } - } - else if ((datatype == DTYPE_USHORT) && (comps == 1)) { - DECLARE_ROW_POINTERS(ushort, 1); - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - FILTER_3D(0); - } - } - else if ((datatype == DTYPE_FLOAT) && (comps == 4)) { - DECLARE_ROW_POINTERS(float, 4); - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - FILTER_F_3D(0); - FILTER_F_3D(1); - FILTER_F_3D(2); - FILTER_F_3D(3); - } - } - else if ((datatype == DTYPE_FLOAT) && (comps == 3)) { - DECLARE_ROW_POINTERS(float, 3); - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - FILTER_F_3D(0); - FILTER_F_3D(1); - FILTER_F_3D(2); - } - } - else if ((datatype == DTYPE_FLOAT) && (comps == 2)) { - DECLARE_ROW_POINTERS(float, 2); - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - FILTER_F_3D(0); - FILTER_F_3D(1); - } - } - else if ((datatype == DTYPE_FLOAT) && (comps == 1)) { - DECLARE_ROW_POINTERS(float, 1); - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - FILTER_F_3D(0); - } - } - else if ((datatype == DTYPE_HALF_FLOAT) && (comps == 4)) { - DECLARE_ROW_POINTERS(half_float, 4); - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - FILTER_HF_3D(0); - FILTER_HF_3D(1); - FILTER_HF_3D(2); - FILTER_HF_3D(3); - } - } - else if ((datatype == DTYPE_HALF_FLOAT) && (comps == 3)) { - DECLARE_ROW_POINTERS(half_float, 4); - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - FILTER_HF_3D(0); - FILTER_HF_3D(1); - FILTER_HF_3D(2); - } - } - else if ((datatype == DTYPE_HALF_FLOAT) && (comps == 2)) { - DECLARE_ROW_POINTERS(half_float, 4); - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - FILTER_HF_3D(0); - FILTER_HF_3D(1); - } - } - else if ((datatype == DTYPE_HALF_FLOAT) && (comps == 1)) { - DECLARE_ROW_POINTERS(half_float, 4); - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - FILTER_HF_3D(0); - } - } - else if ((datatype == DTYPE_UINT) && (comps == 1)) { - const uint *rowA = (const uint *) srcRowA; - const uint *rowB = (const uint *) srcRowB; - const uint *rowC = (const uint *) srcRowC; - const uint *rowD = (const uint *) srcRowD; - float *dst = (float *) dstRow; - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - const uint64_t tmp = (((uint64_t) rowA[j] + (uint64_t) rowA[k]) - + ((uint64_t) rowB[j] + (uint64_t) rowB[k]) - + ((uint64_t) rowC[j] + (uint64_t) rowC[k]) - + ((uint64_t) rowD[j] + (uint64_t) rowD[k])); - dst[i] = (float)((double) tmp * 0.125); - } - } - else if ((datatype == DTYPE_USHORT_5_6_5) && (comps == 3)) { - DECLARE_ROW_POINTERS0(ushort); - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - const int rowAr0 = rowA[j] & 0x1f; - const int rowAr1 = rowA[k] & 0x1f; - const int rowBr0 = rowB[j] & 0x1f; - const int rowBr1 = rowB[k] & 0x1f; - const int rowCr0 = rowC[j] & 0x1f; - const int rowCr1 = rowC[k] & 0x1f; - const int rowDr0 = rowD[j] & 0x1f; - const int rowDr1 = rowD[k] & 0x1f; - const int rowAg0 = (rowA[j] >> 5) & 0x3f; - const int rowAg1 = (rowA[k] >> 5) & 0x3f; - const int rowBg0 = (rowB[j] >> 5) & 0x3f; - const int rowBg1 = (rowB[k] >> 5) & 0x3f; - const int rowCg0 = (rowC[j] >> 5) & 0x3f; - const int rowCg1 = (rowC[k] >> 5) & 0x3f; - const int rowDg0 = (rowD[j] >> 5) & 0x3f; - const int rowDg1 = (rowD[k] >> 5) & 0x3f; - const int rowAb0 = (rowA[j] >> 11) & 0x1f; - const int rowAb1 = (rowA[k] >> 11) & 0x1f; - const int rowBb0 = (rowB[j] >> 11) & 0x1f; - const int rowBb1 = (rowB[k] >> 11) & 0x1f; - const int rowCb0 = (rowC[j] >> 11) & 0x1f; - const int rowCb1 = (rowC[k] >> 11) & 0x1f; - const int rowDb0 = (rowD[j] >> 11) & 0x1f; - const int rowDb1 = (rowD[k] >> 11) & 0x1f; - const int r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1, - rowCr0, rowCr1, rowDr0, rowDr1); - const int g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1, - rowCg0, rowCg1, rowDg0, rowDg1); - const int b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1, - rowCb0, rowCb1, rowDb0, rowDb1); - dst[i] = (b << 11) | (g << 5) | r; - } - } - else if ((datatype == DTYPE_USHORT_4_4_4_4) && (comps == 4)) { - DECLARE_ROW_POINTERS0(ushort); - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - const int rowAr0 = rowA[j] & 0xf; - const int rowAr1 = rowA[k] & 0xf; - const int rowBr0 = rowB[j] & 0xf; - const int rowBr1 = rowB[k] & 0xf; - const int rowCr0 = rowC[j] & 0xf; - const int rowCr1 = rowC[k] & 0xf; - const int rowDr0 = rowD[j] & 0xf; - const int rowDr1 = rowD[k] & 0xf; - const int rowAg0 = (rowA[j] >> 4) & 0xf; - const int rowAg1 = (rowA[k] >> 4) & 0xf; - const int rowBg0 = (rowB[j] >> 4) & 0xf; - const int rowBg1 = (rowB[k] >> 4) & 0xf; - const int rowCg0 = (rowC[j] >> 4) & 0xf; - const int rowCg1 = (rowC[k] >> 4) & 0xf; - const int rowDg0 = (rowD[j] >> 4) & 0xf; - const int rowDg1 = (rowD[k] >> 4) & 0xf; - const int rowAb0 = (rowA[j] >> 8) & 0xf; - const int rowAb1 = (rowA[k] >> 8) & 0xf; - const int rowBb0 = (rowB[j] >> 8) & 0xf; - const int rowBb1 = (rowB[k] >> 8) & 0xf; - const int rowCb0 = (rowC[j] >> 8) & 0xf; - const int rowCb1 = (rowC[k] >> 8) & 0xf; - const int rowDb0 = (rowD[j] >> 8) & 0xf; - const int rowDb1 = (rowD[k] >> 8) & 0xf; - const int rowAa0 = (rowA[j] >> 12) & 0xf; - const int rowAa1 = (rowA[k] >> 12) & 0xf; - const int rowBa0 = (rowB[j] >> 12) & 0xf; - const int rowBa1 = (rowB[k] >> 12) & 0xf; - const int rowCa0 = (rowC[j] >> 12) & 0xf; - const int rowCa1 = (rowC[k] >> 12) & 0xf; - const int rowDa0 = (rowD[j] >> 12) & 0xf; - const int rowDa1 = (rowD[k] >> 12) & 0xf; - const int r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1, - rowCr0, rowCr1, rowDr0, rowDr1); - const int g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1, - rowCg0, rowCg1, rowDg0, rowDg1); - const int b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1, - rowCb0, rowCb1, rowDb0, rowDb1); - const int a = FILTER_SUM_3D(rowAa0, rowAa1, rowBa0, rowBa1, - rowCa0, rowCa1, rowDa0, rowDa1); - - dst[i] = (a << 12) | (b << 8) | (g << 4) | r; - } - } - else if ((datatype == DTYPE_USHORT_1_5_5_5_REV) && (comps == 4)) { - DECLARE_ROW_POINTERS0(ushort); - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - const int rowAr0 = rowA[j] & 0x1f; - const int rowAr1 = rowA[k] & 0x1f; - const int rowBr0 = rowB[j] & 0x1f; - const int rowBr1 = rowB[k] & 0x1f; - const int rowCr0 = rowC[j] & 0x1f; - const int rowCr1 = rowC[k] & 0x1f; - const int rowDr0 = rowD[j] & 0x1f; - const int rowDr1 = rowD[k] & 0x1f; - const int rowAg0 = (rowA[j] >> 5) & 0x1f; - const int rowAg1 = (rowA[k] >> 5) & 0x1f; - const int rowBg0 = (rowB[j] >> 5) & 0x1f; - const int rowBg1 = (rowB[k] >> 5) & 0x1f; - const int rowCg0 = (rowC[j] >> 5) & 0x1f; - const int rowCg1 = (rowC[k] >> 5) & 0x1f; - const int rowDg0 = (rowD[j] >> 5) & 0x1f; - const int rowDg1 = (rowD[k] >> 5) & 0x1f; - const int rowAb0 = (rowA[j] >> 10) & 0x1f; - const int rowAb1 = (rowA[k] >> 10) & 0x1f; - const int rowBb0 = (rowB[j] >> 10) & 0x1f; - const int rowBb1 = (rowB[k] >> 10) & 0x1f; - const int rowCb0 = (rowC[j] >> 10) & 0x1f; - const int rowCb1 = (rowC[k] >> 10) & 0x1f; - const int rowDb0 = (rowD[j] >> 10) & 0x1f; - const int rowDb1 = (rowD[k] >> 10) & 0x1f; - const int rowAa0 = (rowA[j] >> 15) & 0x1; - const int rowAa1 = (rowA[k] >> 15) & 0x1; - const int rowBa0 = (rowB[j] >> 15) & 0x1; - const int rowBa1 = (rowB[k] >> 15) & 0x1; - const int rowCa0 = (rowC[j] >> 15) & 0x1; - const int rowCa1 = (rowC[k] >> 15) & 0x1; - const int rowDa0 = (rowD[j] >> 15) & 0x1; - const int rowDa1 = (rowD[k] >> 15) & 0x1; - const int r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1, - rowCr0, rowCr1, rowDr0, rowDr1); - const int g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1, - rowCg0, rowCg1, rowDg0, rowDg1); - const int b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1, - rowCb0, rowCb1, rowDb0, rowDb1); - const int a = FILTER_SUM_3D(rowAa0, rowAa1, rowBa0, rowBa1, - rowCa0, rowCa1, rowDa0, rowDa1); - - dst[i] = (a << 15) | (b << 10) | (g << 5) | r; - } - } - else if ((datatype == DTYPE_UBYTE_3_3_2) && (comps == 3)) { - DECLARE_ROW_POINTERS0(ushort); - - for (i = j = 0, k = k0; i < (uint) dstWidth; - i++, j += colStride, k += colStride) { - const int rowAr0 = rowA[j] & 0x3; - const int rowAr1 = rowA[k] & 0x3; - const int rowBr0 = rowB[j] & 0x3; - const int rowBr1 = rowB[k] & 0x3; - const int rowCr0 = rowC[j] & 0x3; - const int rowCr1 = rowC[k] & 0x3; - const int rowDr0 = rowD[j] & 0x3; - const int rowDr1 = rowD[k] & 0x3; - const int rowAg0 = (rowA[j] >> 2) & 0x7; - const int rowAg1 = (rowA[k] >> 2) & 0x7; - const int rowBg0 = (rowB[j] >> 2) & 0x7; - const int rowBg1 = (rowB[k] >> 2) & 0x7; - const int rowCg0 = (rowC[j] >> 2) & 0x7; - const int rowCg1 = (rowC[k] >> 2) & 0x7; - const int rowDg0 = (rowD[j] >> 2) & 0x7; - const int rowDg1 = (rowD[k] >> 2) & 0x7; - const int rowAb0 = (rowA[j] >> 5) & 0x7; - const int rowAb1 = (rowA[k] >> 5) & 0x7; - const int rowBb0 = (rowB[j] >> 5) & 0x7; - const int rowBb1 = (rowB[k] >> 5) & 0x7; - const int rowCb0 = (rowC[j] >> 5) & 0x7; - const int rowCb1 = (rowC[k] >> 5) & 0x7; - const int rowDb0 = (rowD[j] >> 5) & 0x7; - const int rowDb1 = (rowD[k] >> 5) & 0x7; - const int r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1, - rowCr0, rowCr1, rowDr0, rowDr1); - const int g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1, - rowCg0, rowCg1, rowDg0, rowDg1); - const int b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1, - rowCb0, rowCb1, rowDb0, rowDb1); - dst[i] = (b << 5) | (g << 2) | r; - } - } - else { - debug_printf("bad format in do_row_3D()"); - } -} - - - -static void -format_to_type_comps(enum pipe_format pformat, - enum dtype *datatype, uint *comps) -{ - /* XXX I think this could be implemented in terms of the pf_*() functions */ - switch (pformat) { - case PIPE_FORMAT_B8G8R8A8_UNORM: - case PIPE_FORMAT_B8G8R8X8_UNORM: - case PIPE_FORMAT_A8R8G8B8_UNORM: - case PIPE_FORMAT_X8R8G8B8_UNORM: - case PIPE_FORMAT_A8B8G8R8_SRGB: - case PIPE_FORMAT_X8B8G8R8_SRGB: - case PIPE_FORMAT_B8G8R8A8_SRGB: - case PIPE_FORMAT_B8G8R8X8_SRGB: - case PIPE_FORMAT_A8R8G8B8_SRGB: - case PIPE_FORMAT_X8R8G8B8_SRGB: - case PIPE_FORMAT_R8G8B8_SRGB: - *datatype = DTYPE_UBYTE; - *comps = 4; - return; - case PIPE_FORMAT_B5G5R5X1_UNORM: - case PIPE_FORMAT_B5G5R5A1_UNORM: - *datatype = DTYPE_USHORT_1_5_5_5_REV; - *comps = 4; - return; - case PIPE_FORMAT_B4G4R4A4_UNORM: - *datatype = DTYPE_USHORT_4_4_4_4; - *comps = 4; - return; - case PIPE_FORMAT_B5G6R5_UNORM: - *datatype = DTYPE_USHORT_5_6_5; - *comps = 3; - return; - case PIPE_FORMAT_L8_UNORM: - case PIPE_FORMAT_L8_SRGB: - case PIPE_FORMAT_A8_UNORM: - case PIPE_FORMAT_I8_UNORM: - *datatype = DTYPE_UBYTE; - *comps = 1; - return; - case PIPE_FORMAT_L8A8_UNORM: - case PIPE_FORMAT_L8A8_SRGB: - *datatype = DTYPE_UBYTE; - *comps = 2; - return; - default: - assert(0); - *datatype = DTYPE_UBYTE; - *comps = 0; - break; - } -} - - -static void -reduce_1d(enum pipe_format pformat, - int srcWidth, const ubyte *srcPtr, - int dstWidth, ubyte *dstPtr) -{ - enum dtype datatype; - uint comps; - - format_to_type_comps(pformat, &datatype, &comps); - - /* we just duplicate the input row, kind of hack, saves code */ - do_row(datatype, comps, - srcWidth, srcPtr, srcPtr, - dstWidth, dstPtr); -} - - -/** - * Strides are in bytes. If zero, it'll be computed as width * bpp. - */ -static void -reduce_2d(enum pipe_format pformat, - int srcWidth, int srcHeight, - int srcRowStride, const ubyte *srcPtr, - int dstWidth, int dstHeight, - int dstRowStride, ubyte *dstPtr) -{ - enum dtype datatype; - uint comps; - const int bpt = util_format_get_blocksize(pformat); - const ubyte *srcA, *srcB; - ubyte *dst; - int row; - - format_to_type_comps(pformat, &datatype, &comps); - - if (!srcRowStride) - srcRowStride = bpt * srcWidth; - - if (!dstRowStride) - dstRowStride = bpt * dstWidth; - - /* Compute src and dst pointers */ - srcA = srcPtr; - if (srcHeight > 1) - srcB = srcA + srcRowStride; - else - srcB = srcA; - dst = dstPtr; - - for (row = 0; row < dstHeight; row++) { - do_row(datatype, comps, - srcWidth, srcA, srcB, - dstWidth, dst); - srcA += 2 * srcRowStride; - srcB += 2 * srcRowStride; - dst += dstRowStride; - } -} - - -static void -reduce_3d(enum pipe_format pformat, - int srcWidth, int srcHeight, int srcDepth, - int srcRowStride, int srcImageStride, const ubyte *srcPtr, - int dstWidth, int dstHeight, int dstDepth, - int dstRowStride, int dstImageStride, ubyte *dstPtr) -{ - const int bpt = util_format_get_blocksize(pformat); - int img, row; - int srcImageOffset, srcRowOffset; - enum dtype datatype; - uint comps; - - format_to_type_comps(pformat, &datatype, &comps); - - /* XXX I think we should rather assert those strides */ - if (!srcImageStride) - srcImageStride = srcWidth * srcHeight * bpt; - if (!dstImageStride) - dstImageStride = dstWidth * dstHeight * bpt; - - if (!srcRowStride) - srcRowStride = srcWidth * bpt; - if (!dstRowStride) - dstRowStride = dstWidth * bpt; - - /* Offset between adjacent src images to be averaged together */ - srcImageOffset = (srcDepth == dstDepth) ? 0 : srcImageStride; - - /* Offset between adjacent src rows to be averaged together */ - srcRowOffset = (srcHeight == dstHeight) ? 0 : srcRowStride; - - /* - * Need to average together up to 8 src pixels for each dest pixel. - * Break that down into 3 operations: - * 1. take two rows from source image and average them together. - * 2. take two rows from next source image and average them together. - * 3. take the two averaged rows and average them for the final dst row. - */ - - /* - printf("mip3d %d x %d x %d -> %d x %d x %d\n", - srcWidth, srcHeight, srcDepth, dstWidth, dstHeight, dstDepth); - */ - - for (img = 0; img < dstDepth; img++) { - /* first source image pointer */ - const ubyte *imgSrcA = srcPtr - + img * (srcImageStride + srcImageOffset); - /* second source image pointer */ - const ubyte *imgSrcB = imgSrcA + srcImageOffset; - /* address of the dest image */ - ubyte *imgDst = dstPtr + img * dstImageStride; - - /* setup the four source row pointers and the dest row pointer */ - const ubyte *srcImgARowA = imgSrcA; - const ubyte *srcImgARowB = imgSrcA + srcRowOffset; - const ubyte *srcImgBRowA = imgSrcB; - const ubyte *srcImgBRowB = imgSrcB + srcRowOffset; - ubyte *dstImgRow = imgDst; - - for (row = 0; row < dstHeight; row++) { - do_row_3D(datatype, comps, srcWidth, - srcImgARowA, srcImgARowB, - srcImgBRowA, srcImgBRowB, - dstWidth, dstImgRow); - - /* advance to next rows */ - srcImgARowA += srcRowStride + srcRowOffset; - srcImgARowB += srcRowStride + srcRowOffset; - srcImgBRowA += srcRowStride + srcRowOffset; - srcImgBRowB += srcRowStride + srcRowOffset; - dstImgRow += dstImageStride; - } - } -} - - - - -static void -make_1d_mipmap(struct gen_mipmap_state *ctx, - struct pipe_resource *pt, - uint layer, uint baseLevel, uint lastLevel) -{ - struct pipe_context *pipe = ctx->pipe; - uint dstLevel; - - for (dstLevel = baseLevel + 1; dstLevel <= lastLevel; dstLevel++) { - const uint srcLevel = dstLevel - 1; - struct pipe_transfer *srcTrans, *dstTrans; - void *srcMap, *dstMap; - - srcTrans = pipe_get_transfer(pipe, pt, srcLevel, layer, - PIPE_TRANSFER_READ, 0, 0, - u_minify(pt->width0, srcLevel), - u_minify(pt->height0, srcLevel)); - dstTrans = pipe_get_transfer(pipe, pt, dstLevel, layer, - PIPE_TRANSFER_WRITE, 0, 0, - u_minify(pt->width0, dstLevel), - u_minify(pt->height0, dstLevel)); - - srcMap = (ubyte *) pipe->transfer_map(pipe, srcTrans); - dstMap = (ubyte *) pipe->transfer_map(pipe, dstTrans); - - reduce_1d(pt->format, - srcTrans->box.width, srcMap, - dstTrans->box.width, dstMap); - - pipe->transfer_unmap(pipe, srcTrans); - pipe->transfer_unmap(pipe, dstTrans); - - pipe->transfer_destroy(pipe, srcTrans); - pipe->transfer_destroy(pipe, dstTrans); - } -} - - -static void -make_2d_mipmap(struct gen_mipmap_state *ctx, - struct pipe_resource *pt, - uint layer, uint baseLevel, uint lastLevel) -{ - struct pipe_context *pipe = ctx->pipe; - uint dstLevel; - - assert(util_format_get_blockwidth(pt->format) == 1); - assert(util_format_get_blockheight(pt->format) == 1); - - for (dstLevel = baseLevel + 1; dstLevel <= lastLevel; dstLevel++) { - const uint srcLevel = dstLevel - 1; - struct pipe_transfer *srcTrans, *dstTrans; - ubyte *srcMap, *dstMap; - - srcTrans = pipe_get_transfer(pipe, pt, srcLevel, layer, - PIPE_TRANSFER_READ, 0, 0, - u_minify(pt->width0, srcLevel), - u_minify(pt->height0, srcLevel)); - dstTrans = pipe_get_transfer(pipe, pt, dstLevel, layer, - PIPE_TRANSFER_WRITE, 0, 0, - u_minify(pt->width0, dstLevel), - u_minify(pt->height0, dstLevel)); - - srcMap = (ubyte *) pipe->transfer_map(pipe, srcTrans); - dstMap = (ubyte *) pipe->transfer_map(pipe, dstTrans); - - reduce_2d(pt->format, - srcTrans->box.width, srcTrans->box.height, - srcTrans->stride, srcMap, - dstTrans->box.width, dstTrans->box.height, - dstTrans->stride, dstMap); - - pipe->transfer_unmap(pipe, srcTrans); - pipe->transfer_unmap(pipe, dstTrans); - - pipe->transfer_destroy(pipe, srcTrans); - pipe->transfer_destroy(pipe, dstTrans); - } -} - - -/* XXX looks a bit more like it could work now but need to test */ -static void -make_3d_mipmap(struct gen_mipmap_state *ctx, - struct pipe_resource *pt, - uint face, uint baseLevel, uint lastLevel) -{ - struct pipe_context *pipe = ctx->pipe; - uint dstLevel; - struct pipe_box src_box, dst_box; - - assert(util_format_get_blockwidth(pt->format) == 1); - assert(util_format_get_blockheight(pt->format) == 1); - - src_box.x = src_box.y = src_box.z = 0; - dst_box.x = dst_box.y = dst_box.z = 0; - - for (dstLevel = baseLevel + 1; dstLevel <= lastLevel; dstLevel++) { - const uint srcLevel = dstLevel - 1; - struct pipe_transfer *srcTrans, *dstTrans; - ubyte *srcMap, *dstMap; - struct pipe_box src_box, dst_box; - src_box.width = u_minify(pt->width0, srcLevel); - src_box.height = u_minify(pt->height0, srcLevel); - src_box.depth = u_minify(pt->depth0, srcLevel); - dst_box.width = u_minify(pt->width0, dstLevel); - dst_box.height = u_minify(pt->height0, dstLevel); - dst_box.depth = u_minify(pt->depth0, dstLevel); - - srcTrans = pipe->get_transfer(pipe, pt, srcLevel, - PIPE_TRANSFER_READ, - &src_box); - dstTrans = pipe->get_transfer(pipe, pt, dstLevel, - PIPE_TRANSFER_WRITE, - &dst_box); - - srcMap = (ubyte *) pipe->transfer_map(pipe, srcTrans); - dstMap = (ubyte *) pipe->transfer_map(pipe, dstTrans); - - reduce_3d(pt->format, - srcTrans->box.width, srcTrans->box.height, srcTrans->box.depth, - srcTrans->stride, srcTrans->layer_stride, srcMap, - dstTrans->box.width, dstTrans->box.height, dstTrans->box.depth, - dstTrans->stride, dstTrans->layer_stride, dstMap); - - pipe->transfer_unmap(pipe, srcTrans); - pipe->transfer_unmap(pipe, dstTrans); - - pipe->transfer_destroy(pipe, srcTrans); - pipe->transfer_destroy(pipe, dstTrans); - } -} - - -static void -fallback_gen_mipmap(struct gen_mipmap_state *ctx, - struct pipe_resource *pt, - uint layer, uint baseLevel, uint lastLevel) -{ - switch (pt->target) { - case PIPE_TEXTURE_1D: - make_1d_mipmap(ctx, pt, layer, baseLevel, lastLevel); - break; - case PIPE_TEXTURE_2D: - case PIPE_TEXTURE_RECT: - case PIPE_TEXTURE_CUBE: - make_2d_mipmap(ctx, pt, layer, baseLevel, lastLevel); - break; - case PIPE_TEXTURE_3D: - make_3d_mipmap(ctx, pt, layer, baseLevel, lastLevel); - break; - default: - assert(0); - } -} - - -/** - * Create a mipmap generation context. - * The idea is to create one of these and re-use it each time we need to - * generate a mipmap. - */ -struct gen_mipmap_state * -util_create_gen_mipmap(struct pipe_context *pipe, - struct cso_context *cso) -{ - struct gen_mipmap_state *ctx; - uint i; - - ctx = CALLOC_STRUCT(gen_mipmap_state); - if (!ctx) - return NULL; - - ctx->pipe = pipe; - ctx->cso = cso; - - /* disabled blending/masking */ - memset(&ctx->blend, 0, sizeof(ctx->blend)); - ctx->blend.rt[0].colormask = PIPE_MASK_RGBA; - - /* no-op depth/stencil/alpha */ - memset(&ctx->depthstencil, 0, sizeof(ctx->depthstencil)); - - /* rasterizer */ - memset(&ctx->rasterizer, 0, sizeof(ctx->rasterizer)); - ctx->rasterizer.cull_face = PIPE_FACE_NONE; - ctx->rasterizer.gl_rasterization_rules = 1; - ctx->rasterizer.depth_clip = 1; - - /* sampler state */ - memset(&ctx->sampler, 0, sizeof(ctx->sampler)); - ctx->sampler.wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - ctx->sampler.wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - ctx->sampler.wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - ctx->sampler.min_mip_filter = PIPE_TEX_MIPFILTER_NEAREST; - ctx->sampler.normalized_coords = 1; - - /* vertex elements state */ - memset(&ctx->velem[0], 0, sizeof(ctx->velem[0]) * 2); - for (i = 0; i < 2; i++) { - ctx->velem[i].src_offset = i * 4 * sizeof(float); - ctx->velem[i].instance_divisor = 0; - ctx->velem[i].vertex_buffer_index = 0; - ctx->velem[i].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT; - } - - /* vertex data that doesn't change */ - for (i = 0; i < 4; i++) { - ctx->vertices[i][0][2] = 0.0f; /* z */ - ctx->vertices[i][0][3] = 1.0f; /* w */ - ctx->vertices[i][1][3] = 1.0f; /* q */ - } - - /* Note: the actual vertex buffer is allocated as needed below */ - - return ctx; -} - - -/** - * Helper function to set the fragment shaders. - */ -static INLINE void -set_fragment_shader(struct gen_mipmap_state *ctx, uint type) -{ - if (!ctx->fs[type]) - ctx->fs[type] = - util_make_fragment_tex_shader(ctx->pipe, type, - TGSI_INTERPOLATE_LINEAR); - - cso_set_fragment_shader_handle(ctx->cso, ctx->fs[type]); -} - - -/** - * Helper function to set the vertex shader. - */ -static INLINE void -set_vertex_shader(struct gen_mipmap_state *ctx) -{ - /* vertex shader - still required to provide the linkage between - * fragment shader input semantics and vertex_element/buffers. - */ - if (!ctx->vs) - { - const uint semantic_names[] = { TGSI_SEMANTIC_POSITION, - TGSI_SEMANTIC_GENERIC }; - const uint semantic_indexes[] = { 0, 0 }; - ctx->vs = util_make_vertex_passthrough_shader(ctx->pipe, 2, - semantic_names, - semantic_indexes); - } - - cso_set_vertex_shader_handle(ctx->cso, ctx->vs); -} - - -/** - * Get next "slot" of vertex space in the vertex buffer. - * We're allocating one large vertex buffer and using it piece by piece. - */ -static unsigned -get_next_slot(struct gen_mipmap_state *ctx) -{ - const unsigned max_slots = 4096 / sizeof ctx->vertices; - - if (ctx->vbuf_slot >= max_slots) - util_gen_mipmap_flush( ctx ); - - if (!ctx->vbuf) { - ctx->vbuf = pipe_buffer_create(ctx->pipe->screen, - PIPE_BIND_VERTEX_BUFFER, - PIPE_USAGE_STREAM, - max_slots * sizeof ctx->vertices); - } - - return ctx->vbuf_slot++ * sizeof ctx->vertices; -} - - -static unsigned -set_vertex_data(struct gen_mipmap_state *ctx, - enum pipe_texture_target tex_target, - uint layer, float r) -{ - unsigned offset; - - /* vert[0].position */ - ctx->vertices[0][0][0] = -1.0f; /*x*/ - ctx->vertices[0][0][1] = -1.0f; /*y*/ - - /* vert[1].position */ - ctx->vertices[1][0][0] = 1.0f; - ctx->vertices[1][0][1] = -1.0f; - - /* vert[2].position */ - ctx->vertices[2][0][0] = 1.0f; - ctx->vertices[2][0][1] = 1.0f; - - /* vert[3].position */ - ctx->vertices[3][0][0] = -1.0f; - ctx->vertices[3][0][1] = 1.0f; - - /* Setup vertex texcoords. This is a little tricky for cube maps. */ - if (tex_target == PIPE_TEXTURE_CUBE) { - static const float st[4][2] = { - {0.0f, 0.0f}, {1.0f, 0.0f}, {1.0f, 1.0f}, {0.0f, 1.0f} - }; - - util_map_texcoords2d_onto_cubemap(layer, &st[0][0], 2, - &ctx->vertices[0][1][0], 8); - } - else if (tex_target == PIPE_TEXTURE_1D_ARRAY) { - /* 1D texture array */ - ctx->vertices[0][1][0] = 0.0f; /*s*/ - ctx->vertices[0][1][1] = r; /*t*/ - ctx->vertices[0][1][2] = 0.0f; /*r*/ - - ctx->vertices[1][1][0] = 1.0f; - ctx->vertices[1][1][1] = r; - ctx->vertices[1][1][2] = 0.0f; - - ctx->vertices[2][1][0] = 1.0f; - ctx->vertices[2][1][1] = r; - ctx->vertices[2][1][2] = 0.0f; - - ctx->vertices[3][1][0] = 0.0f; - ctx->vertices[3][1][1] = r; - ctx->vertices[3][1][2] = 0.0f; - } else { - /* 1D/2D/3D/2D array */ - ctx->vertices[0][1][0] = 0.0f; /*s*/ - ctx->vertices[0][1][1] = 0.0f; /*t*/ - ctx->vertices[0][1][2] = r; /*r*/ - - ctx->vertices[1][1][0] = 1.0f; - ctx->vertices[1][1][1] = 0.0f; - ctx->vertices[1][1][2] = r; - - ctx->vertices[2][1][0] = 1.0f; - ctx->vertices[2][1][1] = 1.0f; - ctx->vertices[2][1][2] = r; - - ctx->vertices[3][1][0] = 0.0f; - ctx->vertices[3][1][1] = 1.0f; - ctx->vertices[3][1][2] = r; - } - - offset = get_next_slot( ctx ); - - pipe_buffer_write_nooverlap(ctx->pipe, ctx->vbuf, - offset, sizeof(ctx->vertices), ctx->vertices); - - return offset; -} - - - -/** - * Destroy a mipmap generation context - */ -void -util_destroy_gen_mipmap(struct gen_mipmap_state *ctx) -{ - struct pipe_context *pipe = ctx->pipe; - unsigned i; - - for (i = 0; i < Elements(ctx->fs); i++) - if (ctx->fs[i]) - pipe->delete_fs_state(pipe, ctx->fs[i]); - - if (ctx->vs) - pipe->delete_vs_state(pipe, ctx->vs); - - pipe_resource_reference(&ctx->vbuf, NULL); - - FREE(ctx); -} - - - -/* Release vertex buffer at end of frame to avoid synchronous - * rendering. - */ -void util_gen_mipmap_flush( struct gen_mipmap_state *ctx ) -{ - pipe_resource_reference(&ctx->vbuf, NULL); - ctx->vbuf_slot = 0; -} - - -/** - * Generate mipmap images. It's assumed all needed texture memory is - * already allocated. - * - * \param psv the sampler view to the texture to generate mipmap levels for - * \param face which cube face to generate mipmaps for (0 for non-cube maps) - * \param baseLevel the first mipmap level to use as a src - * \param lastLevel the last mipmap level to generate - * \param filter the minification filter used to generate mipmap levels with - * \param filter one of PIPE_TEX_FILTER_LINEAR, PIPE_TEX_FILTER_NEAREST - */ -void -util_gen_mipmap(struct gen_mipmap_state *ctx, - struct pipe_sampler_view *psv, - uint face, uint baseLevel, uint lastLevel, uint filter) -{ - struct pipe_context *pipe = ctx->pipe; - struct pipe_screen *screen = pipe->screen; - struct pipe_framebuffer_state fb; - struct pipe_resource *pt = psv->texture; - uint dstLevel; - uint offset; - uint type; - - /* The texture object should have room for the levels which we're - * about to generate. - */ - assert(lastLevel <= pt->last_level); - - /* If this fails, why are we here? */ - assert(lastLevel > baseLevel); - - assert(filter == PIPE_TEX_FILTER_LINEAR || - filter == PIPE_TEX_FILTER_NEAREST); - - switch (pt->target) { - case PIPE_TEXTURE_1D: - type = TGSI_TEXTURE_1D; - break; - case PIPE_TEXTURE_2D: - type = TGSI_TEXTURE_2D; - break; - case PIPE_TEXTURE_3D: - type = TGSI_TEXTURE_3D; - break; - case PIPE_TEXTURE_CUBE: - type = TGSI_TEXTURE_CUBE; - break; - case PIPE_TEXTURE_1D_ARRAY: - type = TGSI_TEXTURE_1D_ARRAY; - break; - case PIPE_TEXTURE_2D_ARRAY: - type = TGSI_TEXTURE_2D_ARRAY; - break; - default: - assert(0); - type = TGSI_TEXTURE_2D; - } - - /* check if we can render in the texture's format */ - if (!screen->is_format_supported(screen, psv->format, pt->target, - pt->nr_samples, PIPE_BIND_RENDER_TARGET)) { - fallback_gen_mipmap(ctx, pt, face, baseLevel, lastLevel); - return; - } - - /* save state (restored below) */ - cso_save_blend(ctx->cso); - cso_save_depth_stencil_alpha(ctx->cso); - cso_save_rasterizer(ctx->cso); - cso_save_samplers(ctx->cso); - cso_save_fragment_sampler_views(ctx->cso); - cso_save_stream_outputs(ctx->cso); - cso_save_framebuffer(ctx->cso); - cso_save_fragment_shader(ctx->cso); - cso_save_vertex_shader(ctx->cso); - cso_save_geometry_shader(ctx->cso); - cso_save_viewport(ctx->cso); - cso_save_vertex_elements(ctx->cso); - - /* bind our state */ - cso_set_blend(ctx->cso, &ctx->blend); - cso_set_depth_stencil_alpha(ctx->cso, &ctx->depthstencil); - cso_set_rasterizer(ctx->cso, &ctx->rasterizer); - cso_set_vertex_elements(ctx->cso, 2, ctx->velem); - cso_set_stream_outputs(ctx->cso, 0, NULL, 0); - - set_fragment_shader(ctx, type); - set_vertex_shader(ctx); - cso_set_geometry_shader_handle(ctx->cso, NULL); - - /* init framebuffer state */ - memset(&fb, 0, sizeof(fb)); - fb.nr_cbufs = 1; - - /* set min/mag to same filter for faster sw speed */ - ctx->sampler.mag_img_filter = filter; - ctx->sampler.min_img_filter = filter; - - /* - * XXX for small mipmap levels, it may be faster to use the software - * fallback path... - */ - for (dstLevel = baseLevel + 1; dstLevel <= lastLevel; dstLevel++) { - const uint srcLevel = dstLevel - 1; - struct pipe_viewport_state vp; - unsigned nr_layers, layer, i; - float rcoord = 0.0f; - - if (pt->target == PIPE_TEXTURE_3D) - nr_layers = u_minify(pt->depth0, dstLevel); - else if (pt->target == PIPE_TEXTURE_2D_ARRAY || pt->target == PIPE_TEXTURE_1D_ARRAY) - nr_layers = pt->array_size; - else - nr_layers = 1; - - for (i = 0; i < nr_layers; i++) { - struct pipe_surface *surf, surf_templ; - if (pt->target == PIPE_TEXTURE_3D) { - /* in theory with geom shaders and driver with full layer support - could do that in one go. */ - layer = i; - /* XXX hmm really? */ - rcoord = (float)layer / (float)nr_layers + 1.0f / (float)(nr_layers * 2); - } else if (pt->target == PIPE_TEXTURE_2D_ARRAY || pt->target == PIPE_TEXTURE_1D_ARRAY) { - layer = i; - rcoord = (float)layer; - } else - layer = face; - - memset(&surf_templ, 0, sizeof(surf_templ)); - u_surface_default_template(&surf_templ, pt, PIPE_BIND_RENDER_TARGET); - surf_templ.u.tex.level = dstLevel; - surf_templ.u.tex.first_layer = layer; - surf_templ.u.tex.last_layer = layer; - surf = pipe->create_surface(pipe, pt, &surf_templ); - - /* - * Setup framebuffer / dest surface - */ - fb.cbufs[0] = surf; - fb.width = u_minify(pt->width0, dstLevel); - fb.height = u_minify(pt->height0, dstLevel); - cso_set_framebuffer(ctx->cso, &fb); - - /* viewport */ - vp.scale[0] = 0.5f * fb.width; - vp.scale[1] = 0.5f * fb.height; - vp.scale[2] = 1.0f; - vp.scale[3] = 1.0f; - vp.translate[0] = 0.5f * fb.width; - vp.translate[1] = 0.5f * fb.height; - vp.translate[2] = 0.0f; - vp.translate[3] = 0.0f; - cso_set_viewport(ctx->cso, &vp); - - /* - * Setup sampler state - * Note: we should only have to set the min/max LOD clamps to ensure - * we grab texels from the right mipmap level. But some hardware - * has trouble with min clamping so we also set the lod_bias to - * try to work around that. - */ - ctx->sampler.min_lod = ctx->sampler.max_lod = (float) srcLevel; - ctx->sampler.lod_bias = (float) srcLevel; - cso_single_sampler(ctx->cso, 0, &ctx->sampler); - cso_single_sampler_done(ctx->cso); - - cso_set_fragment_sampler_views(ctx->cso, 1, &psv); - - /* quad coords in clip coords */ - offset = set_vertex_data(ctx, - pt->target, - face, - rcoord); - - util_draw_vertex_buffer(ctx->pipe, - ctx->cso, - ctx->vbuf, - offset, - PIPE_PRIM_TRIANGLE_FAN, - 4, /* verts */ - 2); /* attribs/vert */ - - /* need to signal that the texture has changed _after_ rendering to it */ - pipe_surface_reference( &surf, NULL ); - } - } - - /* restore state we changed */ - cso_restore_blend(ctx->cso); - cso_restore_depth_stencil_alpha(ctx->cso); - cso_restore_rasterizer(ctx->cso); - cso_restore_samplers(ctx->cso); - cso_restore_fragment_sampler_views(ctx->cso); - cso_restore_framebuffer(ctx->cso); - cso_restore_fragment_shader(ctx->cso); - cso_restore_vertex_shader(ctx->cso); - cso_restore_geometry_shader(ctx->cso); - cso_restore_viewport(ctx->cso); - cso_restore_vertex_elements(ctx->cso); - cso_restore_stream_outputs(ctx->cso); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_gen_mipmap.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_gen_mipmap.h deleted file mode 100644 index a10b6a4aba9..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_gen_mipmap.h +++ /dev/null @@ -1,70 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_GENMIPMAP_H -#define U_GENMIPMAP_H - -#include "pipe/p_state.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -struct pipe_context; -struct pipe_resource; -struct cso_context; - -struct gen_mipmap_state; - - -extern struct gen_mipmap_state * -util_create_gen_mipmap(struct pipe_context *pipe, struct cso_context *cso); - - -extern void -util_destroy_gen_mipmap(struct gen_mipmap_state *ctx); - -/* Release vertex buffer at end of frame to avoid synchronous - * rendering. - */ -extern void -util_gen_mipmap_flush( struct gen_mipmap_state *ctx ); - - -extern void -util_gen_mipmap(struct gen_mipmap_state *ctx, - struct pipe_sampler_view *psv, - uint layer, uint baseLevel, uint lastLevel, uint filter); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_half.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_half.h deleted file mode 100644 index ad030e90c67..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_half.h +++ /dev/null @@ -1,90 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Luca Barbieri - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#ifndef U_HALF_H -#define U_HALF_H - -#include "pipe/p_compiler.h" -#include "util/u_math.h" - -#ifdef __cplusplus -extern "C" { -#endif - -extern const uint32_t util_half_to_float_mantissa_table[2048]; -extern const uint32_t util_half_to_float_exponent_table[64]; -extern const uint32_t util_half_to_float_offset_table[64]; -extern const uint16_t util_float_to_half_base_table[512]; -extern const uint8_t util_float_to_half_shift_table[512]; - -/* - * Note that if the half float is a signaling NaN, the x87 FPU will turn - * it into a quiet NaN immediately upon loading into a float. - * - * Additionally, denormals may be flushed to zero. - * - * To avoid this, use the floatui functions instead of the float ones - * when just doing conversion rather than computation on the resulting - * floats. - */ - -static INLINE uint32_t -util_half_to_floatui(uint16_t h) -{ - unsigned exp = h >> 10; - return util_half_to_float_mantissa_table[util_half_to_float_offset_table[exp] + (h & 0x3ff)] + util_half_to_float_exponent_table[exp]; -} - -static INLINE float -util_half_to_float(uint16_t h) -{ - union fi r; - r.ui = util_half_to_floatui(h); - return r.f; -} - -static INLINE uint16_t -util_floatui_to_half(uint32_t v) -{ - unsigned signexp = v >> 23; - return util_float_to_half_base_table[signexp] + ((v & 0x007fffff) >> util_float_to_half_shift_table[signexp]); -} - -static INLINE uint16_t -util_float_to_half(float f) -{ - union fi i; - i.f = f; - return util_floatui_to_half(i.ui); -} - -#ifdef __cplusplus -} -#endif - -#endif /* U_HALF_H */ - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_half.py b/dll/opengl/mesa/src/gallium/auxiliary/util/u_half.py deleted file mode 100644 index 915cf3b9273..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_half.py +++ /dev/null @@ -1,179 +0,0 @@ -# Copyright 2010 Luca Barbieri -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice (including the -# next paragraph) shall be included in all copies or substantial -# portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# ************************************************************************* - -# The code is a reimplementation of the algorithm in -# www.fox-toolkit.org/ftp/fasthalffloatconversion.pdf -# "Fast Half Float Conversions" by Jeroen van der Zijp, Nov 2008 -# -# The table contents have been slightly changed so that the exponent -# bias is now in the exponent table instead of the mantissa table (mostly -# for cosmetic reasons, and because it theoretically allows a variant -# that flushes denormal to zero but uses a mantissa table with 24-bit -# entries). -# -# The tables are also constructed slightly differently. -# - -# Note that using a 64K * 4 table is a terrible idea since it will not fit -# in the L1 cache and will massively pollute the L2 cache as well -# -# These should instead fit in the L1 cache. -# -# TODO: we could use a denormal bias table instead of the mantissa/offset -# tables: this would reduce the L1 cache usage from 8704 to 2304 bytes -# but would involve more computation -# -# Note however that if denormals are never encountered, the L1 cache usage -# is only about 4608 bytes anyway. - -table_index = None -table_length = None - -def begin(t, n, l): - global table_length - global table_index - table_index = 0 - table_length = l - print - print "const " + t + " " + n + "[" + str(l) + "] = {" - -def value(v): - global table_index - table_index += 1 - print "\t" + hex(v) + "," - -def end(): - global table_length - global table_index - print "};" - assert table_index == table_length - -print "/* This file is autogenerated by u_half.py. Do not edit directly. */" -print "#include \"util/u_half.h\"" - -begin("uint32_t", "util_half_to_float_mantissa_table", 2048) -# zero -value(0) - -# denormals -for i in xrange(1, 1024): - m = i << 13 - e = 0 - - # normalize number - while (m & 0x00800000) == 0: - e -= 0x00800000 - m <<= 1 - - m &= ~0x00800000 - e += 0x38800000 - value(m | e) - -# normals -for i in xrange(1024, 2048): - value((i - 1024) << 13) -end() - -begin("uint32_t", "util_half_to_float_exponent_table", 64) -# positive zero or denormals -value(0) - -# positive numbers -for i in xrange(1, 31): - value(0x38000000 + (i << 23)) - -# positive infinity/NaN -value(0x7f800000) - -# negative zero or denormals -value(0x80000000) - -# negative numbers -for i in range(33, 63): - value(0xb8000000 + ((i - 32) << 23)) - -# negative infinity/NaN -value(0xff800000) -end() - -begin("uint32_t", "util_half_to_float_offset_table", 64) -# positive zero or denormals -value(0) - -# positive normals -for i in range(1, 32): - value(1024) - -# negative zero or denormals -value(0) - -# negative normals -for i in xrange(33, 64): - value(1024) -end() - -begin("uint16_t", "util_float_to_half_base_table", 512) -for sign in (0, 0x8000): - # very small numbers mapping to zero - for i in xrange(-127, -24): - value(sign | 0) - - # small numbers mapping to denormals - for i in xrange(-24, -14): - value(sign | (0x400 >> (-14 -i))) - - # normal numbers - for i in xrange(-14, 16): - value(sign | ((i + 15) << 10)) - - # large numbers mapping to infinity - for i in xrange(16, 128): - value(sign | 0x7c00) - - # infinity and NaNs - value(sign | 0x7c00) -end() - -begin("uint8_t", "util_float_to_half_shift_table", 512) -for sign in (0, 0x8000): - # very small numbers mapping to zero - for i in xrange(-127, -24): - value(24) - - # small numbers mapping to denormals - for i in xrange(-24, -14): - value(-1 - i) - - # normal numbers - for i in xrange(-14, 16): - value(13) - - # large numbers mapping to infinity - for i in xrange(16, 128): - value(24) - - # infinity and NaNs - value(13) -end() - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_handle_table.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_handle_table.c deleted file mode 100644 index 3703718a621..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_handle_table.c +++ /dev/null @@ -1,298 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Generic handle table implementation. - * - * @author José Fonseca - */ - - -#include "pipe/p_compiler.h" -#include "util/u_debug.h" - -#include "util/u_memory.h" -#include "util/u_handle_table.h" - - -#define HANDLE_TABLE_INITIAL_SIZE 16 - - -struct handle_table -{ - /** Object array. Empty handles have a null object */ - void **objects; - - /** Number of objects the handle can currently hold */ - unsigned size; - /** Number of consecutive objects allocated at the start of the table */ - unsigned filled; - - /** Optional object destructor */ - void (*destroy)(void *object); -}; - - -struct handle_table * -handle_table_create(void) -{ - struct handle_table *ht; - - ht = MALLOC_STRUCT(handle_table); - if(!ht) - return NULL; - - ht->objects = (void **)CALLOC(HANDLE_TABLE_INITIAL_SIZE, sizeof(void *)); - if(!ht->objects) { - FREE(ht); - return NULL; - } - - ht->size = HANDLE_TABLE_INITIAL_SIZE; - ht->filled = 0; - - ht->destroy = NULL; - - return ht; -} - - -void -handle_table_set_destroy(struct handle_table *ht, - void (*destroy)(void *object)) -{ - assert(ht); - if (!ht) - return; - ht->destroy = destroy; -} - - -/** - * Resize the table if necessary - */ -static INLINE int -handle_table_resize(struct handle_table *ht, - unsigned minimum_size) -{ - unsigned new_size; - void **new_objects; - - if(ht->size > minimum_size) - return ht->size; - - new_size = ht->size; - while(!(new_size > minimum_size)) - new_size *= 2; - assert(new_size); - - new_objects = (void **)REALLOC((void *)ht->objects, - ht->size*sizeof(void *), - new_size*sizeof(void *)); - if(!new_objects) - return 0; - - memset(new_objects + ht->size, 0, (new_size - ht->size)*sizeof(void *)); - - ht->size = new_size; - ht->objects = new_objects; - - return ht->size; -} - - -static INLINE void -handle_table_clear(struct handle_table *ht, - unsigned index) -{ - void *object; - - /* The order here is important so that the object being destroyed is not - * present in the table when seen by the destroy callback, because the - * destroy callback may directly or indirectly call the other functions in - * this module. - */ - - object = ht->objects[index]; - if(object) { - ht->objects[index] = NULL; - - if(ht->destroy) - ht->destroy(object); - } -} - - -unsigned -handle_table_add(struct handle_table *ht, - void *object) -{ - unsigned index; - unsigned handle; - - assert(ht); - assert(object); - if(!object || !ht) - return 0; - - /* linear search for an empty handle */ - while(ht->filled < ht->size) { - if(!ht->objects[ht->filled]) - break; - ++ht->filled; - } - - index = ht->filled; - handle = index + 1; - - /* check integer overflow */ - if(!handle) - return 0; - - /* grow the table if necessary */ - if(!handle_table_resize(ht, index)) - return 0; - - assert(!ht->objects[index]); - ht->objects[index] = object; - ++ht->filled; - - return handle; -} - - -unsigned -handle_table_set(struct handle_table *ht, - unsigned handle, - void *object) -{ - unsigned index; - - assert(ht); - assert(handle); - if(!handle || !ht) - return 0; - - assert(object); - if(!object) - return 0; - - index = handle - 1; - - /* grow the table if necessary */ - if(!handle_table_resize(ht, index)) - return 0; - - handle_table_clear(ht, index); - - ht->objects[index] = object; - - return handle; -} - - -void * -handle_table_get(struct handle_table *ht, - unsigned handle) -{ - void *object; - - assert(ht); - assert(handle); - if(!handle || !ht || handle > ht->size) - return NULL; - - object = ht->objects[handle - 1]; - - return object; -} - - -void -handle_table_remove(struct handle_table *ht, - unsigned handle) -{ - void *object; - unsigned index; - - assert(ht); - assert(handle); - if(!handle || !ht || handle > ht->size) - return; - - index = handle - 1; - object = ht->objects[index]; - if(!object) - return; - - handle_table_clear(ht, index); - - if(index < ht->filled) - ht->filled = index; -} - - -unsigned -handle_table_get_next_handle(struct handle_table *ht, - unsigned handle) -{ - unsigned index; - - for(index = handle; index < ht->size; ++index) { - if(ht->objects[index]) - return index + 1; - } - - return 0; -} - - -unsigned -handle_table_get_first_handle(struct handle_table *ht) -{ - return handle_table_get_next_handle(ht, 0); -} - - -void -handle_table_destroy(struct handle_table *ht) -{ - unsigned index; - assert(ht); - - if (!ht) - return; - - if(ht->destroy) - for(index = 0; index < ht->size; ++index) - handle_table_clear(ht, index); - - FREE(ht->objects); - FREE(ht); -} - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_handle_table.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_handle_table.h deleted file mode 100644 index d080135c9f4..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_handle_table.h +++ /dev/null @@ -1,116 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Generic handle table. - * - * @author José Fonseca - */ - -#ifndef U_HANDLE_TABLE_H_ -#define U_HANDLE_TABLE_H_ - - -#ifdef __cplusplus -extern "C" { -#endif - - -/** - * Abstract data type to map integer handles to objects. - * - * Also referred as "pointer array". - */ -struct handle_table; - - -struct handle_table * -handle_table_create(void); - - -/** - * Set an optional destructor callback. - * - * If set, it will be called during handle_table_remove and - * handle_table_destroy calls. - */ -void -handle_table_set_destroy(struct handle_table *ht, - void (*destroy)(void *object)); - - -/** - * Add a new object. - * - * Returns a zero handle on failure (out of memory). - */ -unsigned -handle_table_add(struct handle_table *ht, - void *object); - -/** - * Returns zero on failure (out of memory). - */ -unsigned -handle_table_set(struct handle_table *ht, - unsigned handle, - void *object); - -/** - * Fetch an existing object. - * - * Returns NULL for an invalid handle. - */ -void * -handle_table_get(struct handle_table *ht, - unsigned handle); - - -void -handle_table_remove(struct handle_table *ht, - unsigned handle); - - -void -handle_table_destroy(struct handle_table *ht); - - -unsigned -handle_table_get_first_handle(struct handle_table *ht); - - -unsigned -handle_table_get_next_handle(struct handle_table *ht, - unsigned handle); - - -#ifdef __cplusplus -} -#endif - -#endif /* U_HANDLE_TABLE_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_hash.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_hash.c deleted file mode 100644 index b67653ec708..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_hash.c +++ /dev/null @@ -1,121 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Hash functions implementation. - * - * @author Jose Fonseca - */ - - -#include "u_hash.h" - - -static const uint32_t -util_crc32_table[256] = { - 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, - 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, - 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, - 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, - 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, - 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, - 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, - 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, - 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, - 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, - 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, - 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, - 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, - 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, - 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, - 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, - 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, - 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, - 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, - 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, - 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, - 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, - 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, - 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, - 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, - 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, - 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, - 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, - 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, - 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, - 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, - 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, - 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, - 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, - 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, - 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, - 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, - 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, - 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, - 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, - 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, - 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, - 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, - 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, - 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, - 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, - 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, - 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, - 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, - 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, - 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, - 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, - 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, - 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, - 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, - 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, - 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, - 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, - 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, - 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, - 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, - 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, - 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, - 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d -}; - - -/** - * @sa http://www.w3.org/TR/PNG/#D-CRCAppendix - */ -uint32_t -util_hash_crc32(const void *data, size_t size) -{ - uint8_t *p = (uint8_t *)data; - uint32_t crc = 0xffffffff; - - while (size--) - crc = util_crc32_table[(crc ^ *p++) & 0xff] ^ (crc >> 8); - - return crc; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_hash.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_hash.h deleted file mode 100644 index 8d92b07c85e..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_hash.h +++ /dev/null @@ -1,55 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Hash functions. - * - * @author Jose Fonseca - */ - -#ifndef U_HASH_H_ -#define U_HASH_H_ - - -#include "pipe/p_compiler.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -uint32_t -util_hash_crc32(const void *data, size_t size); - - -#ifdef __cplusplus -} -#endif - -#endif /* U_HASH_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_hash_table.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_hash_table.c deleted file mode 100644 index 5604e3ac374..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_hash_table.c +++ /dev/null @@ -1,293 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * General purpose hash table implementation. - * - * Just uses the cso_hash for now, but it might be better switch to a linear - * probing hash table implementation at some point -- as it is said they have - * better lookup and cache performance and it appears to be possible to write - * a lock-free implementation of such hash tables . - * - * @author José Fonseca - */ - - -#include "pipe/p_compiler.h" -#include "util/u_debug.h" - -#include "cso_cache/cso_hash.h" - -#include "util/u_memory.h" -#include "util/u_hash_table.h" - - -struct util_hash_table -{ - struct cso_hash *cso; - - /** Hash function */ - unsigned (*hash)(void *key); - - /** Compare two keys */ - int (*compare)(void *key1, void *key2); - - /* TODO: key, value destructors? */ -}; - - -struct util_hash_table_item -{ - void *key; - void *value; -}; - - -static INLINE struct util_hash_table_item * -util_hash_table_item(struct cso_hash_iter iter) -{ - return (struct util_hash_table_item *)cso_hash_iter_data(iter); -} - - -struct util_hash_table * -util_hash_table_create(unsigned (*hash)(void *key), - int (*compare)(void *key1, void *key2)) -{ - struct util_hash_table *ht; - - ht = MALLOC_STRUCT(util_hash_table); - if(!ht) - return NULL; - - ht->cso = cso_hash_create(); - if(!ht->cso) { - FREE(ht); - return NULL; - } - - ht->hash = hash; - ht->compare = compare; - - return ht; -} - - -static INLINE struct cso_hash_iter -util_hash_table_find_iter(struct util_hash_table *ht, - void *key, - unsigned key_hash) -{ - struct cso_hash_iter iter; - struct util_hash_table_item *item; - - iter = cso_hash_find(ht->cso, key_hash); - while (!cso_hash_iter_is_null(iter)) { - item = (struct util_hash_table_item *)cso_hash_iter_data(iter); - if (!ht->compare(item->key, key)) - break; - iter = cso_hash_iter_next(iter); - } - - return iter; -} - - -static INLINE struct util_hash_table_item * -util_hash_table_find_item(struct util_hash_table *ht, - void *key, - unsigned key_hash) -{ - struct cso_hash_iter iter; - struct util_hash_table_item *item; - - iter = cso_hash_find(ht->cso, key_hash); - while (!cso_hash_iter_is_null(iter)) { - item = (struct util_hash_table_item *)cso_hash_iter_data(iter); - if (!ht->compare(item->key, key)) - return item; - iter = cso_hash_iter_next(iter); - } - - return NULL; -} - - -enum pipe_error -util_hash_table_set(struct util_hash_table *ht, - void *key, - void *value) -{ - unsigned key_hash; - struct util_hash_table_item *item; - struct cso_hash_iter iter; - - assert(ht); - if (!ht) - return PIPE_ERROR_BAD_INPUT; - - key_hash = ht->hash(key); - - item = util_hash_table_find_item(ht, key, key_hash); - if(item) { - /* TODO: key/value destruction? */ - item->value = value; - return PIPE_OK; - } - - item = MALLOC_STRUCT(util_hash_table_item); - if(!item) - return PIPE_ERROR_OUT_OF_MEMORY; - - item->key = key; - item->value = value; - - iter = cso_hash_insert(ht->cso, key_hash, item); - if(cso_hash_iter_is_null(iter)) { - FREE(item); - return PIPE_ERROR_OUT_OF_MEMORY; - } - - return PIPE_OK; -} - - -void * -util_hash_table_get(struct util_hash_table *ht, - void *key) -{ - unsigned key_hash; - struct util_hash_table_item *item; - - assert(ht); - if (!ht) - return NULL; - - key_hash = ht->hash(key); - - item = util_hash_table_find_item(ht, key, key_hash); - if(!item) - return NULL; - - return item->value; -} - - -void -util_hash_table_remove(struct util_hash_table *ht, - void *key) -{ - unsigned key_hash; - struct cso_hash_iter iter; - struct util_hash_table_item *item; - - assert(ht); - if (!ht) - return; - - key_hash = ht->hash(key); - - iter = util_hash_table_find_iter(ht, key, key_hash); - if(cso_hash_iter_is_null(iter)) - return; - - item = util_hash_table_item(iter); - assert(item); - FREE(item); - - cso_hash_erase(ht->cso, iter); -} - - -void -util_hash_table_clear(struct util_hash_table *ht) -{ - struct cso_hash_iter iter; - struct util_hash_table_item *item; - - assert(ht); - if (!ht) - return; - - iter = cso_hash_first_node(ht->cso); - while (!cso_hash_iter_is_null(iter)) { - item = (struct util_hash_table_item *)cso_hash_take(ht->cso, cso_hash_iter_key(iter)); - FREE(item); - iter = cso_hash_first_node(ht->cso); - } -} - - -enum pipe_error -util_hash_table_foreach(struct util_hash_table *ht, - enum pipe_error (*callback) - (void *key, void *value, void *data), - void *data) -{ - struct cso_hash_iter iter; - struct util_hash_table_item *item; - enum pipe_error result; - - assert(ht); - if (!ht) - return PIPE_ERROR_BAD_INPUT; - - iter = cso_hash_first_node(ht->cso); - while (!cso_hash_iter_is_null(iter)) { - item = (struct util_hash_table_item *)cso_hash_iter_data(iter); - result = callback(item->key, item->value, data); - if(result != PIPE_OK) - return result; - iter = cso_hash_iter_next(iter); - } - - return PIPE_OK; -} - - -void -util_hash_table_destroy(struct util_hash_table *ht) -{ - struct cso_hash_iter iter; - struct util_hash_table_item *item; - - assert(ht); - if (!ht) - return; - - iter = cso_hash_first_node(ht->cso); - while (!cso_hash_iter_is_null(iter)) { - item = (struct util_hash_table_item *)cso_hash_iter_data(iter); - FREE(item); - iter = cso_hash_iter_next(iter); - } - - cso_hash_delete(ht->cso); - - FREE(ht); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_hash_table.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_hash_table.h deleted file mode 100644 index 51ec10a8041..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_hash_table.h +++ /dev/null @@ -1,96 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * General purpose hash table. - * - * @author José Fonseca - */ - -#ifndef U_HASH_TABLE_H_ -#define U_HASH_TABLE_H_ - - -#include "pipe/p_defines.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -/** - * Generic purpose hash table. - */ -struct util_hash_table; - - -/** - * Create an hash table. - * - * @param hash hash function - * @param compare should return 0 for two equal keys. - */ -struct util_hash_table * -util_hash_table_create(unsigned (*hash)(void *key), - int (*compare)(void *key1, void *key2)); - - -enum pipe_error -util_hash_table_set(struct util_hash_table *ht, - void *key, - void *value); - -void * -util_hash_table_get(struct util_hash_table *ht, - void *key); - - -void -util_hash_table_remove(struct util_hash_table *ht, - void *key); - - -void -util_hash_table_clear(struct util_hash_table *ht); - - -enum pipe_error -util_hash_table_foreach(struct util_hash_table *ht, - enum pipe_error (*callback) - (void *key, void *value, void *data), - void *data); - -void -util_hash_table_destroy(struct util_hash_table *ht); - - -#ifdef __cplusplus -} -#endif - -#endif /* U_HASH_TABLE_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_index_modify.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_index_modify.c deleted file mode 100644 index d0a28b5fdfa..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_index_modify.c +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright 2010 Marek Olšák - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#include "pipe/p_context.h" -#include "util/u_index_modify.h" -#include "util/u_inlines.h" - -/* Ubyte indices. */ - -void util_shorten_ubyte_elts_to_userptr(struct pipe_context *context, - struct pipe_resource *elts, - int index_bias, - unsigned start, - unsigned count, - void *out) -{ - struct pipe_transfer *src_transfer; - unsigned char *in_map; - unsigned short *out_map = out; - unsigned i; - - in_map = pipe_buffer_map(context, elts, - PIPE_TRANSFER_READ | - PIPE_TRANSFER_UNSYNCHRONIZED, - &src_transfer); - in_map += start; - - for (i = 0; i < count; i++) { - *out_map = (unsigned short)(*in_map + index_bias); - in_map++; - out_map++; - } - - pipe_buffer_unmap(context, src_transfer); -} - -void util_shorten_ubyte_elts(struct pipe_context *context, - struct pipe_resource **elts, - int index_bias, - unsigned start, - unsigned count) -{ - struct pipe_resource* new_elts; - unsigned short *out_map; - struct pipe_transfer *dst_transfer; - - new_elts = pipe_buffer_create(context->screen, - PIPE_BIND_INDEX_BUFFER, - PIPE_USAGE_STATIC, - 2 * count); - - out_map = pipe_buffer_map(context, new_elts, PIPE_TRANSFER_WRITE, - &dst_transfer); - util_shorten_ubyte_elts_to_userptr(context, *elts, index_bias, - start, count, out_map); - pipe_buffer_unmap(context, dst_transfer); - - *elts = new_elts; -} - - -/* Ushort indices. */ - -void util_rebuild_ushort_elts_to_userptr(struct pipe_context *context, - struct pipe_resource *elts, - int index_bias, - unsigned start, unsigned count, - void *out) -{ - struct pipe_transfer *in_transfer = NULL; - unsigned short *in_map; - unsigned short *out_map = out; - unsigned i; - - in_map = pipe_buffer_map(context, elts, - PIPE_TRANSFER_READ | - PIPE_TRANSFER_UNSYNCHRONIZED, - &in_transfer); - in_map += start; - - for (i = 0; i < count; i++) { - *out_map = (unsigned short)(*in_map + index_bias); - in_map++; - out_map++; - } - - pipe_buffer_unmap(context, in_transfer); -} - -void util_rebuild_ushort_elts(struct pipe_context *context, - struct pipe_resource **elts, - int index_bias, - unsigned start, unsigned count) -{ - struct pipe_transfer *out_transfer = NULL; - struct pipe_resource *new_elts; - unsigned short *out_map; - - new_elts = pipe_buffer_create(context->screen, - PIPE_BIND_INDEX_BUFFER, - PIPE_USAGE_STATIC, - 2 * count); - - out_map = pipe_buffer_map(context, new_elts, - PIPE_TRANSFER_WRITE, &out_transfer); - util_rebuild_ushort_elts_to_userptr(context, *elts, index_bias, - start, count, out_map); - pipe_buffer_unmap(context, out_transfer); - - *elts = new_elts; -} - - -/* Uint indices. */ - -void util_rebuild_uint_elts_to_userptr(struct pipe_context *context, - struct pipe_resource *elts, - int index_bias, - unsigned start, unsigned count, - void *out) -{ - struct pipe_transfer *in_transfer = NULL; - unsigned int *in_map; - unsigned int *out_map = out; - unsigned i; - - in_map = pipe_buffer_map(context, elts, - PIPE_TRANSFER_READ | - PIPE_TRANSFER_UNSYNCHRONIZED, - &in_transfer); - in_map += start; - - for (i = 0; i < count; i++) { - *out_map = (unsigned int)(*in_map + index_bias); - in_map++; - out_map++; - } - - pipe_buffer_unmap(context, in_transfer); -} - -void util_rebuild_uint_elts(struct pipe_context *context, - struct pipe_resource **elts, - int index_bias, - unsigned start, unsigned count) -{ - struct pipe_transfer *out_transfer = NULL; - struct pipe_resource *new_elts; - unsigned int *out_map; - - new_elts = pipe_buffer_create(context->screen, - PIPE_BIND_INDEX_BUFFER, - PIPE_USAGE_STATIC, - 2 * count); - - out_map = pipe_buffer_map(context, new_elts, - PIPE_TRANSFER_WRITE, &out_transfer); - util_rebuild_uint_elts_to_userptr(context, *elts, index_bias, - start, count, out_map); - pipe_buffer_unmap(context, out_transfer); - - *elts = new_elts; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_index_modify.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_index_modify.h deleted file mode 100644 index 1e9de3dfac8..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_index_modify.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2010 Marek Olšák - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#ifndef UTIL_INDEX_MODIFY_H -#define UTIL_INDEX_MODIFY_H - -struct pipe_context; -struct pipe_resource; - -void util_shorten_ubyte_elts_to_userptr(struct pipe_context *context, - struct pipe_resource *elts, - int index_bias, - unsigned start, - unsigned count, - void *out); - -void util_shorten_ubyte_elts(struct pipe_context *context, - struct pipe_resource **elts, - int index_bias, - unsigned start, - unsigned count); - - - -void util_rebuild_ushort_elts_to_userptr(struct pipe_context *context, - struct pipe_resource *elts, - int index_bias, - unsigned start, unsigned count, - void *out); - -void util_rebuild_ushort_elts(struct pipe_context *context, - struct pipe_resource **elts, - int index_bias, - unsigned start, unsigned count); - - - -void util_rebuild_uint_elts_to_userptr(struct pipe_context *context, - struct pipe_resource *elts, - int index_bias, - unsigned start, unsigned count, - void *out); - -void util_rebuild_uint_elts(struct pipe_context *context, - struct pipe_resource **elts, - int index_bias, - unsigned start, unsigned count); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_init.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_init.h deleted file mode 100644 index 7bc356a7916..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_init.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2010 Luca Barbieri - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_INIT_H -#define U_INIT_H - -/* Use UTIL_INIT(f) to have f called at program initialization. - Note that it is only guaranteed to be called if any symbol in the - .c file it is in sis referenced by the program. - - UTIL_INIT functions are called in arbitrary order. -*/ - -#ifdef __cplusplus -/* use a C++ global constructor */ -#define UTIL_INIT(f) struct f##__gctor_t {f##__gctor_t() {x();}} f##__gctor; -#elif defined(_MSC_VER) -/* add a pointer to the section where MSVC stores global constructor pointers */ -/* see http://blogs.msdn.com/vcblog/archive/2006/10/20/crt-initialization.aspx and - http://stackoverflow.com/questions/1113409/attribute-constructor-equivalent-in-vc */ -#pragma section(".CRT$XCU",read) -#define UTIL_INIT(f) static void __cdecl f##__init(void) {f();}; __declspec(allocate(".CRT$XCU")) void (__cdecl* f##__xcu)(void) = f##__init; -#elif defined(__GNUC__) -#define UTIL_INIT(f) static void f##__init(void) __attribute__((constructor)); static void f##__init(void) {f();} -#else -#error Unsupported compiler: please find out how to implement global initializers in C on it -#endif - -#endif - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_inlines.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_inlines.h deleted file mode 100644 index 9660cdc6eae..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_inlines.h +++ /dev/null @@ -1,468 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_INLINES_H -#define U_INLINES_H - -#include "pipe/p_context.h" -#include "pipe/p_defines.h" -#include "pipe/p_state.h" -#include "pipe/p_screen.h" -#include "util/u_debug.h" -#include "util/u_debug_describe.h" -#include "util/u_debug_refcnt.h" -#include "util/u_atomic.h" -#include "util/u_box.h" -#include "util/u_math.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* - * Reference counting helper functions. - */ - - -static INLINE void -pipe_reference_init(struct pipe_reference *reference, unsigned count) -{ - p_atomic_set(&reference->count, count); -} - -static INLINE boolean -pipe_is_referenced(struct pipe_reference *reference) -{ - return p_atomic_read(&reference->count) != 0; -} - -/** - * Update reference counting. - * The old thing pointed to, if any, will be unreferenced. - * Both 'ptr' and 'reference' may be NULL. - * \return TRUE if the object's refcount hits zero and should be destroyed. - */ -static INLINE boolean -pipe_reference_described(struct pipe_reference *ptr, - struct pipe_reference *reference, - debug_reference_descriptor get_desc) -{ - boolean destroy = FALSE; - - if(ptr != reference) { - /* bump the reference.count first */ - if (reference) { - assert(pipe_is_referenced(reference)); - p_atomic_inc(&reference->count); - debug_reference(reference, get_desc, 1); - } - - if (ptr) { - assert(pipe_is_referenced(ptr)); - if (p_atomic_dec_zero(&ptr->count)) { - destroy = TRUE; - } - debug_reference(ptr, get_desc, -1); - } - } - - return destroy; -} - -static INLINE boolean -pipe_reference(struct pipe_reference *ptr, struct pipe_reference *reference) -{ - return pipe_reference_described(ptr, reference, - (debug_reference_descriptor)debug_describe_reference); -} - -static INLINE void -pipe_surface_reference(struct pipe_surface **ptr, struct pipe_surface *surf) -{ - struct pipe_surface *old_surf = *ptr; - - if (pipe_reference_described(&(*ptr)->reference, &surf->reference, - (debug_reference_descriptor)debug_describe_surface)) - old_surf->context->surface_destroy(old_surf->context, old_surf); - *ptr = surf; -} - -static INLINE void -pipe_resource_reference(struct pipe_resource **ptr, struct pipe_resource *tex) -{ - struct pipe_resource *old_tex = *ptr; - - if (pipe_reference_described(&(*ptr)->reference, &tex->reference, - (debug_reference_descriptor)debug_describe_resource)) - old_tex->screen->resource_destroy(old_tex->screen, old_tex); - *ptr = tex; -} - -static INLINE void -pipe_sampler_view_reference(struct pipe_sampler_view **ptr, struct pipe_sampler_view *view) -{ - struct pipe_sampler_view *old_view = *ptr; - - if (pipe_reference_described(&(*ptr)->reference, &view->reference, - (debug_reference_descriptor)debug_describe_sampler_view)) - old_view->context->sampler_view_destroy(old_view->context, old_view); - *ptr = view; -} - -static INLINE void -pipe_so_target_reference(struct pipe_stream_output_target **ptr, - struct pipe_stream_output_target *target) -{ - struct pipe_stream_output_target *old = *ptr; - - if (pipe_reference_described(&(*ptr)->reference, &target->reference, - (debug_reference_descriptor)debug_describe_so_target)) - old->context->stream_output_target_destroy(old->context, old); - *ptr = target; -} - -static INLINE void -pipe_surface_reset(struct pipe_context *ctx, struct pipe_surface* ps, - struct pipe_resource *pt, unsigned level, unsigned layer, - unsigned flags) -{ - pipe_resource_reference(&ps->texture, pt); - ps->format = pt->format; - ps->width = u_minify(pt->width0, level); - ps->height = u_minify(pt->height0, level); - ps->usage = flags; - ps->u.tex.level = level; - ps->u.tex.first_layer = ps->u.tex.last_layer = layer; - ps->context = ctx; -} - -static INLINE void -pipe_surface_init(struct pipe_context *ctx, struct pipe_surface* ps, - struct pipe_resource *pt, unsigned level, unsigned layer, - unsigned flags) -{ - ps->texture = 0; - pipe_reference_init(&ps->reference, 1); - pipe_surface_reset(ctx, ps, pt, level, layer, flags); -} - -/* Return true if the surfaces are equal. */ -static INLINE boolean -pipe_surface_equal(struct pipe_surface *s1, struct pipe_surface *s2) -{ - return s1->texture == s2->texture && - s1->format == s2->format && - (s1->texture->target != PIPE_BUFFER || - (s1->u.buf.first_element == s2->u.buf.first_element && - s1->u.buf.last_element == s2->u.buf.last_element)) && - (s1->texture->target == PIPE_BUFFER || - (s1->u.tex.level == s2->u.tex.level && - s1->u.tex.first_layer == s2->u.tex.first_layer && - s1->u.tex.last_layer == s2->u.tex.last_layer)); -} - -/* - * Convenience wrappers for screen buffer functions. - */ - -static INLINE struct pipe_resource * -pipe_buffer_create( struct pipe_screen *screen, - unsigned bind, - unsigned usage, - unsigned size ) -{ - struct pipe_resource buffer; - memset(&buffer, 0, sizeof buffer); - buffer.target = PIPE_BUFFER; - buffer.format = PIPE_FORMAT_R8_UNORM; /* want TYPELESS or similar */ - buffer.bind = bind; - buffer.usage = usage; - buffer.flags = 0; - buffer.width0 = size; - buffer.height0 = 1; - buffer.depth0 = 1; - buffer.array_size = 1; - return screen->resource_create(screen, &buffer); -} - - -static INLINE struct pipe_resource * -pipe_user_buffer_create( struct pipe_screen *screen, void *ptr, unsigned size, - unsigned usage ) -{ - return screen->user_buffer_create(screen, ptr, size, usage); -} - -static INLINE void * -pipe_buffer_map_range(struct pipe_context *pipe, - struct pipe_resource *buffer, - unsigned offset, - unsigned length, - unsigned usage, - struct pipe_transfer **transfer) -{ - struct pipe_box box; - void *map; - - assert(offset < buffer->width0); - assert(offset + length <= buffer->width0); - assert(length); - - u_box_1d(offset, length, &box); - - *transfer = pipe->get_transfer( pipe, - buffer, - 0, - usage, - &box); - - if (*transfer == NULL) - return NULL; - - map = pipe->transfer_map( pipe, *transfer ); - if (map == NULL) { - pipe->transfer_destroy( pipe, *transfer ); - *transfer = NULL; - return NULL; - } - - return map; -} - - -static INLINE void * -pipe_buffer_map(struct pipe_context *pipe, - struct pipe_resource *buffer, - unsigned usage, - struct pipe_transfer **transfer) -{ - return pipe_buffer_map_range(pipe, buffer, 0, buffer->width0, usage, transfer); -} - - -static INLINE void -pipe_buffer_unmap(struct pipe_context *pipe, - struct pipe_transfer *transfer) -{ - if (transfer) { - pipe->transfer_unmap(pipe, transfer); - pipe->transfer_destroy(pipe, transfer); - } -} - -static INLINE void -pipe_buffer_flush_mapped_range(struct pipe_context *pipe, - struct pipe_transfer *transfer, - unsigned offset, - unsigned length) -{ - struct pipe_box box; - int transfer_offset; - - assert(length); - assert(transfer->box.x <= offset); - assert(offset + length <= transfer->box.x + transfer->box.width); - - /* Match old screen->buffer_flush_mapped_range() behaviour, where - * offset parameter is relative to the start of the buffer, not the - * mapped range. - */ - transfer_offset = offset - transfer->box.x; - - u_box_1d(transfer_offset, length, &box); - - pipe->transfer_flush_region(pipe, transfer, &box); -} - -static INLINE void -pipe_buffer_write(struct pipe_context *pipe, - struct pipe_resource *buf, - unsigned offset, - unsigned size, - const void *data) -{ - struct pipe_box box; - unsigned usage = PIPE_TRANSFER_WRITE; - - if (offset == 0 && size == buf->width0) { - usage |= PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE; - } else { - usage |= PIPE_TRANSFER_DISCARD_RANGE; - } - - u_box_1d(offset, size, &box); - - pipe->transfer_inline_write( pipe, - buf, - 0, - usage, - &box, - data, - size, - 0); -} - -/** - * Special case for writing non-overlapping ranges. - * - * We can avoid GPU/CPU synchronization when writing range that has never - * been written before. - */ -static INLINE void -pipe_buffer_write_nooverlap(struct pipe_context *pipe, - struct pipe_resource *buf, - unsigned offset, unsigned size, - const void *data) -{ - struct pipe_box box; - - u_box_1d(offset, size, &box); - - pipe->transfer_inline_write(pipe, - buf, - 0, - (PIPE_TRANSFER_WRITE | - PIPE_TRANSFER_NOOVERWRITE), - &box, - data, - 0, 0); -} - -static INLINE void -pipe_buffer_read(struct pipe_context *pipe, - struct pipe_resource *buf, - unsigned offset, - unsigned size, - void *data) -{ - struct pipe_transfer *src_transfer; - ubyte *map; - - map = (ubyte *) pipe_buffer_map_range(pipe, - buf, - offset, size, - PIPE_TRANSFER_READ, - &src_transfer); - - if (map) - memcpy(data, map, size); - - pipe_buffer_unmap(pipe, src_transfer); -} - -static INLINE struct pipe_transfer * -pipe_get_transfer( struct pipe_context *context, - struct pipe_resource *resource, - unsigned level, unsigned layer, - enum pipe_transfer_usage usage, - unsigned x, unsigned y, - unsigned w, unsigned h) -{ - struct pipe_box box; - u_box_2d_zslice( x, y, layer, w, h, &box ); - return context->get_transfer( context, - resource, - level, - usage, - &box ); -} - -static INLINE void * -pipe_transfer_map( struct pipe_context *context, - struct pipe_transfer *transfer ) -{ - return context->transfer_map( context, transfer ); -} - -static INLINE void -pipe_transfer_unmap( struct pipe_context *context, - struct pipe_transfer *transfer ) -{ - context->transfer_unmap( context, transfer ); -} - - -static INLINE void -pipe_transfer_destroy( struct pipe_context *context, - struct pipe_transfer *transfer ) -{ - context->transfer_destroy(context, transfer); -} - - -static INLINE boolean util_get_offset( - const struct pipe_rasterizer_state *templ, - unsigned fill_mode) -{ - switch(fill_mode) { - case PIPE_POLYGON_MODE_POINT: - return templ->offset_point; - case PIPE_POLYGON_MODE_LINE: - return templ->offset_line; - case PIPE_POLYGON_MODE_FILL: - return templ->offset_tri; - default: - assert(0); - return FALSE; - } -} - -/** - * This function is used to copy an array of pipe_vertex_buffer structures, - * while properly referencing the pipe_vertex_buffer::buffer member. - * - * \sa util_copy_framebuffer_state - */ -static INLINE void util_copy_vertex_buffers(struct pipe_vertex_buffer *dst, - unsigned *dst_count, - const struct pipe_vertex_buffer *src, - unsigned src_count) -{ - unsigned i; - - /* Reference the buffers of 'src' in 'dst'. */ - for (i = 0; i < src_count; i++) { - pipe_resource_reference(&dst[i].buffer, src[i].buffer); - } - /* Unreference the rest of the buffers in 'dst'. */ - for (; i < *dst_count; i++) { - pipe_resource_reference(&dst[i].buffer, NULL); - } - - /* Update the size of 'dst' and copy over the other members - * of pipe_vertex_buffer. */ - *dst_count = src_count; - memcpy(dst, src, src_count * sizeof(struct pipe_vertex_buffer)); -} - -#ifdef __cplusplus -} -#endif - -#endif /* U_INLINES_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_keymap.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_keymap.c deleted file mode 100644 index e161ccd88eb..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_keymap.c +++ /dev/null @@ -1,318 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * Key lookup/associative container. - * - * Like Jose's util_hash_table, based on CSO cache code for now. - * - * Author: Brian Paul - */ - - -#include "pipe/p_compiler.h" -#include "util/u_debug.h" - -#include "cso_cache/cso_hash.h" - -#include "util/u_memory.h" -#include "util/u_keymap.h" - - -struct keymap -{ - struct cso_hash *cso; - unsigned key_size; - unsigned max_entries; /* XXX not obeyed net */ - unsigned num_entries; - keymap_delete_func delete_func; -}; - - -struct keymap_item -{ - void *key, *value; -}; - - -/** - * This the default key-delete function used when the client doesn't - * provide one. - */ -static void -default_delete_func(const struct keymap *map, - const void *key, void *data, void *user) -{ - FREE((void*) data); -} - - -static INLINE struct keymap_item * -hash_table_item(struct cso_hash_iter iter) -{ - return (struct keymap_item *) cso_hash_iter_data(iter); -} - - -/** - * Return 4-byte hash key for a block of bytes. - */ -static unsigned -hash(const void *key, unsigned keySize) -{ - unsigned i, hash; - - keySize /= 4; /* convert from bytes to uints */ - - hash = 0; - for (i = 0; i < keySize; i++) { - hash ^= (i + 1) * ((const unsigned *) key)[i]; - } - - /*hash = hash ^ (hash >> 11) ^ (hash >> 22);*/ - - return hash; -} - - -/** - * Create a new map. - * \param keySize size of the keys in bytes - * \param maxEntries max number of entries to allow (~0 = infinity) - * \param deleteFunc optional callback to call when entries - * are deleted/replaced - */ -struct keymap * -util_new_keymap(unsigned keySize, unsigned maxEntries, - keymap_delete_func deleteFunc) -{ - struct keymap *map = MALLOC_STRUCT(keymap); - if (!map) - return NULL; - - map->cso = cso_hash_create(); - if (!map->cso) { - FREE(map); - return NULL; - } - - map->max_entries = maxEntries; - map->num_entries = 0; - map->key_size = keySize; - map->delete_func = deleteFunc ? deleteFunc : default_delete_func; - - return map; -} - - -/** - * Delete/free a keymap and all entries. The deleteFunc that was given at - * create time will be called for each entry. - * \param user user-provided pointer passed through to the delete callback - */ -void -util_delete_keymap(struct keymap *map, void *user) -{ - util_keymap_remove_all(map, user); - cso_hash_delete(map->cso); - FREE(map); -} - - -static INLINE struct cso_hash_iter -hash_table_find_iter(const struct keymap *map, const void *key, - unsigned key_hash) -{ - struct cso_hash_iter iter; - struct keymap_item *item; - - iter = cso_hash_find(map->cso, key_hash); - while (!cso_hash_iter_is_null(iter)) { - item = (struct keymap_item *) cso_hash_iter_data(iter); - if (!memcmp(item->key, key, map->key_size)) - break; - iter = cso_hash_iter_next(iter); - } - - return iter; -} - - -static INLINE struct keymap_item * -hash_table_find_item(const struct keymap *map, const void *key, - unsigned key_hash) -{ - struct cso_hash_iter iter = hash_table_find_iter(map, key, key_hash); - if (cso_hash_iter_is_null(iter)) { - return NULL; - } - else { - return hash_table_item(iter); - } -} - - -/** - * Insert a new key + data pointer into the table. - * Note: we create a copy of the key, but not the data! - * If the key is already present in the table, replace the existing - * entry (calling the delete callback on the previous entry). - * If the maximum capacity of the map is reached an old entry - * will be deleted (the delete callback will be called). - */ -boolean -util_keymap_insert(struct keymap *map, const void *key, - const void *data, void *user) -{ - unsigned key_hash; - struct keymap_item *item; - struct cso_hash_iter iter; - - assert(map); - if (!map) - return FALSE; - - key_hash = hash(key, map->key_size); - - item = hash_table_find_item(map, key, key_hash); - if (item) { - /* call delete callback for old entry/item */ - map->delete_func(map, item->key, item->value, user); - item->value = (void *) data; - return TRUE; - } - - item = MALLOC_STRUCT(keymap_item); - if (!item) - return FALSE; - - item->key = mem_dup(key, map->key_size); - item->value = (void *) data; - - iter = cso_hash_insert(map->cso, key_hash, item); - if (cso_hash_iter_is_null(iter)) { - FREE(item); - return FALSE; - } - - map->num_entries++; - - return TRUE; -} - - -/** - * Look up a key in the map and return the associated data pointer. - */ -const void * -util_keymap_lookup(const struct keymap *map, const void *key) -{ - unsigned key_hash; - struct keymap_item *item; - - assert(map); - if (!map) - return NULL; - - key_hash = hash(key, map->key_size); - - item = hash_table_find_item(map, key, key_hash); - if (!item) - return NULL; - - return item->value; -} - - -/** - * Remove an entry from the map. - * The delete callback will be called if the given key/entry is found. - * \param user passed to the delete callback as the last param. - */ -void -util_keymap_remove(struct keymap *map, const void *key, void *user) -{ - unsigned key_hash; - struct cso_hash_iter iter; - struct keymap_item *item; - - assert(map); - if (!map) - return; - - key_hash = hash(key, map->key_size); - - iter = hash_table_find_iter(map, key, key_hash); - if (cso_hash_iter_is_null(iter)) - return; - - item = hash_table_item(iter); - assert(item); - if (!item) - return; - map->delete_func(map, item->key, item->value, user); - FREE(item->key); - FREE(item); - - map->num_entries--; - - cso_hash_erase(map->cso, iter); -} - - -/** - * Remove all entries from the map, calling the delete callback for each. - * \param user passed to the delete callback as the last param. - */ -void -util_keymap_remove_all(struct keymap *map, void *user) -{ - struct cso_hash_iter iter; - struct keymap_item *item; - - assert(map); - if (!map) - return; - - iter = cso_hash_first_node(map->cso); - while (!cso_hash_iter_is_null(iter)) { - item = (struct keymap_item *) - cso_hash_take(map->cso, cso_hash_iter_key(iter)); - map->delete_func(map, item->key, item->value, user); - FREE(item->key); - FREE(item); - iter = cso_hash_first_node(map->cso); - } -} - - -extern void -util_keymap_info(const struct keymap *map) -{ - debug_printf("Keymap %p: %u of max %u entries\n", - (void *) map, map->num_entries, map->max_entries); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_keymap.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_keymap.h deleted file mode 100644 index 8d60a76fc3c..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_keymap.h +++ /dev/null @@ -1,68 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_KEYMAP_H -#define U_KEYMAP_H - -#include "pipe/p_compiler.h" - - -/** opaque keymap type */ -struct keymap; - - -/** Delete/callback function type */ -typedef void (*keymap_delete_func)(const struct keymap *map, - const void *key, void *data, - void *user); - - -extern struct keymap * -util_new_keymap(unsigned keySize, unsigned maxEntries, - keymap_delete_func deleteFunc); - -extern void -util_delete_keymap(struct keymap *map, void *user); - -extern boolean -util_keymap_insert(struct keymap *map, const void *key, - const void *data, void *user); - -extern const void * -util_keymap_lookup(const struct keymap *map, const void *key); - -extern void -util_keymap_remove(struct keymap *map, const void *key, void *user); - -extern void -util_keymap_remove_all(struct keymap *map, void *user); - -extern void -util_keymap_info(const struct keymap *map); - - -#endif /* U_KEYMAP_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_linear.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_linear.c deleted file mode 100644 index f1aef216771..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_linear.c +++ /dev/null @@ -1,101 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * Functions for converting tiled data to linear and vice versa. - */ - - -#include "util/u_debug.h" -#include "u_linear.h" - -void -pipe_linear_to_tile(size_t src_stride, const void *src_ptr, - struct pipe_tile_info *t, void *dst_ptr) -{ - int x, y, z; - char *ptr; - size_t bytes = t->cols * t->block.size; - char *dst_ptr2 = (char *) dst_ptr; - - assert(pipe_linear_check_tile(t)); - - /* lets write lineary to the tiled buffer */ - for (y = 0; y < t->tiles_y; y++) { - for (x = 0; x < t->tiles_x; x++) { - /* this inner loop could be replace with SSE magic */ - ptr = (char*)src_ptr + src_stride * t->rows * y + bytes * x; - for (z = 0; z < t->rows; z++) { - memcpy(dst_ptr2, ptr, bytes); - dst_ptr2 += bytes; - ptr += src_stride; - } - } - } -} - -void pipe_linear_from_tile(struct pipe_tile_info *t, const void *src_ptr, - size_t dst_stride, void *dst_ptr) -{ - int x, y, z; - char *ptr; - size_t bytes = t->cols * t->block.size; - const char *src_ptr2 = (const char *) src_ptr; - - /* lets read lineary from the tiled buffer */ - for (y = 0; y < t->tiles_y; y++) { - for (x = 0; x < t->tiles_x; x++) { - /* this inner loop could be replace with SSE magic */ - ptr = (char*)dst_ptr + dst_stride * t->rows * y + bytes * x; - for (z = 0; z < t->rows; z++) { - memcpy(ptr, src_ptr2, bytes); - src_ptr2 += bytes; - ptr += dst_stride; - } - } - } -} - -void -pipe_linear_fill_info(struct pipe_tile_info *t, - const struct u_linear_format_block *block, - unsigned tile_width, unsigned tile_height, - unsigned tiles_x, unsigned tiles_y) -{ - t->block = *block; - - t->tile.width = tile_width; - t->tile.height = tile_height; - t->cols = t->tile.width / t->block.width; - t->rows = t->tile.height / t->block.height; - t->tile.size = t->cols * t->rows * t->block.size; - - t->tiles_x = tiles_x; - t->tiles_y = tiles_y; - t->stride = t->cols * t->tiles_x * t->block.size; - t->size = t->tiles_x * t->tiles_y * t->tile.size; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_linear.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_linear.h deleted file mode 100644 index 81ffc9fb27d..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_linear.h +++ /dev/null @@ -1,106 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * Functions for converting tiled data to linear and vice versa. - */ - - -#ifndef U_LINEAR_H -#define U_LINEAR_H - -#include "pipe/p_compiler.h" -#include "pipe/p_format.h" - -struct u_linear_format_block -{ - /** Block size in bytes */ - unsigned size; - - /** Block width in pixels */ - unsigned width; - - /** Block height in pixels */ - unsigned height; -}; - - -struct pipe_tile_info -{ - unsigned size; - unsigned stride; - - /* The number of tiles */ - unsigned tiles_x; - unsigned tiles_y; - - /* size of each tile expressed in blocks */ - unsigned cols; - unsigned rows; - - /* Describe the tile in pixels */ - struct u_linear_format_block tile; - - /* Describe each block within the tile */ - struct u_linear_format_block block; -}; - -void pipe_linear_to_tile(size_t src_stride, const void *src_ptr, - struct pipe_tile_info *t, void *dst_ptr); - -void pipe_linear_from_tile(struct pipe_tile_info *t, const void *src_ptr, - size_t dst_stride, void *dst_ptr); - -/** - * Convenience function to fillout a pipe_tile_info struct. - * @t info to fill out. - * @block block info about pixel layout - * @tile_width the width of the tile in pixels - * @tile_height the height of the tile in pixels - * @tiles_x number of tiles in x axis - * @tiles_y number of tiles in y axis - */ -void pipe_linear_fill_info(struct pipe_tile_info *t, - const struct u_linear_format_block *block, - unsigned tile_width, unsigned tile_height, - unsigned tiles_x, unsigned tiles_y); - -static INLINE boolean pipe_linear_check_tile(const struct pipe_tile_info *t) -{ - if (t->tile.size != t->block.size * t->cols * t->rows) - return FALSE; - - if (t->stride != t->block.size * t->cols * t->tiles_x) - return FALSE; - - if (t->size < t->stride * t->rows * t->tiles_y) - return FALSE; - - return TRUE; -} - -#endif /* U_LINEAR_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_linkage.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_linkage.c deleted file mode 100644 index 2f6f41ba843..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_linkage.c +++ /dev/null @@ -1,149 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Luca Barbieri - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_debug.h" -#include "pipe/p_shader_tokens.h" -#include "tgsi/tgsi_parse.h" -#include "tgsi/tgsi_scan.h" -#include "util/u_linkage.h" - -/* we must only record the registers that are actually used, not just declared */ -static INLINE boolean -util_semantic_set_test_and_set(struct util_semantic_set *set, unsigned value) -{ - unsigned mask = 1 << (value % (sizeof(long) * 8)); - unsigned long *p = &set->masks[value / (sizeof(long) * 8)]; - unsigned long v = *p & mask; - *p |= mask; - return !!v; -} - -unsigned -util_semantic_set_from_program_file(struct util_semantic_set *set, const struct tgsi_token *tokens, enum tgsi_file_type file) -{ - struct tgsi_shader_info info; - struct tgsi_parse_context parse; - unsigned count = 0; - ubyte *semantic_name; - ubyte *semantic_index; - - tgsi_scan_shader(tokens, &info); - - if(file == TGSI_FILE_INPUT) - { - semantic_name = info.input_semantic_name; - semantic_index = info.input_semantic_index; - } - else if(file == TGSI_FILE_OUTPUT) - { - semantic_name = info.output_semantic_name; - semantic_index = info.output_semantic_index; - } - else - { - assert(0); - semantic_name = NULL; - semantic_index = NULL; - } - - tgsi_parse_init(&parse, tokens); - - memset(set->masks, 0, sizeof(set->masks)); - while(!tgsi_parse_end_of_tokens(&parse)) - { - tgsi_parse_token(&parse); - - if(parse.FullToken.Token.Type == TGSI_TOKEN_TYPE_INSTRUCTION) - { - const struct tgsi_full_instruction *finst = &parse.FullToken.FullInstruction; - unsigned i; - for(i = 0; i < finst->Instruction.NumDstRegs; ++i) - { - if(finst->Dst[i].Register.File == file) - { - unsigned idx = finst->Dst[i].Register.Index; - if(semantic_name[idx] == TGSI_SEMANTIC_GENERIC) - { - if(!util_semantic_set_test_and_set(set, semantic_index[idx])) - ++count; - } - } - } - - for(i = 0; i < finst->Instruction.NumSrcRegs; ++i) - { - if(finst->Src[i].Register.File == file) - { - unsigned idx = finst->Src[i].Register.Index; - if(semantic_name[idx] == TGSI_SEMANTIC_GENERIC) - { - if(!util_semantic_set_test_and_set(set, semantic_index[idx])) - ++count; - } - } - } - } - } - tgsi_parse_free(&parse); - - return count; -} - -#define UTIL_SEMANTIC_SET_FOR_EACH(i, set) for(i = 0; i < 256; ++i) if(set->masks[i / (sizeof(long) * 8)] & (1 << (i % (sizeof(long) * 8)))) - -void -util_semantic_layout_from_set(unsigned char *layout, const struct util_semantic_set *set, unsigned efficient_slots, unsigned num_slots) -{ - int first = -1; - int last = -1; - unsigned i; - - memset(layout, 0xff, num_slots); - - UTIL_SEMANTIC_SET_FOR_EACH(i, set) - { - if(first < 0) - first = i; - last = i; - } - - if(last < efficient_slots) - { - UTIL_SEMANTIC_SET_FOR_EACH(i, set) - layout[i] = i; - } - else if((last - first) < efficient_slots) - { - UTIL_SEMANTIC_SET_FOR_EACH(i, set) - layout[i - first] = i; - } - else - { - unsigned idx = 0; - UTIL_SEMANTIC_SET_FOR_EACH(i, set) - layout[idx++] = i; - } -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_linkage.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_linkage.h deleted file mode 100644 index 7b23123d37d..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_linkage.h +++ /dev/null @@ -1,67 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Luca Barbieri - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_LINKAGE_H_ -#define U_LINKAGE_H_ - -#include "pipe/p_compiler.h" -#include "pipe/p_shader_tokens.h" - -struct util_semantic_set -{ - unsigned long masks[256 / 8 / sizeof(unsigned long)]; -}; - -static INLINE boolean -util_semantic_set_contains(struct util_semantic_set *set, unsigned char value) -{ - return !!(set->masks[value / (sizeof(long) * 8)] & (1 << (value / (sizeof(long) * 8)))); -} - -unsigned util_semantic_set_from_program_file(struct util_semantic_set *set, const struct tgsi_token *tokens, enum tgsi_file_type file); - -/* efficient_slots is the number of slots such that hardware performance is - * the same for using that amount, with holes, or less slots but with less - * holes. - * - * num_slots is the size of the layout array and hardware limit instead. - * - * efficient_slots == 0 or efficient_slots == num_slots are typical settings. - */ -void util_semantic_layout_from_set(unsigned char *layout, const struct util_semantic_set *set, unsigned efficient_slots, unsigned num_slots); - -static INLINE void -util_semantic_table_from_layout(unsigned char *table, size_t table_size, unsigned char *layout, - unsigned char first_slot_value, unsigned char num_slots) -{ - unsigned char i; - memset(table, 0xff, table_size); - - for(i = 0; i < num_slots; ++i) - table[layout[i]] = first_slot_value + i; -} - -#endif /* U_LINKAGE_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_math.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_math.c deleted file mode 100644 index 2811475fa00..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_math.c +++ /dev/null @@ -1,73 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - - -#include "util/u_math.h" - - -/** 2^x, for x in [-1.0, 1.0) */ -float pow2_table[POW2_TABLE_SIZE]; - - -static void -init_pow2_table(void) -{ - int i; - for (i = 0; i < POW2_TABLE_SIZE; i++) - pow2_table[i] = (float) pow(2.0, (i - POW2_TABLE_OFFSET) / POW2_TABLE_SCALE); -} - - -/** log2(x), for x in [1.0, 2.0) */ -float log2_table[LOG2_TABLE_SIZE]; - - -static void -init_log2_table(void) -{ - unsigned i; - for (i = 0; i < LOG2_TABLE_SIZE; i++) - log2_table[i] = (float) log2(1.0 + i * (1.0 / LOG2_TABLE_SCALE)); -} - - -/** - * One time init for math utilities. - */ -void -util_init_math(void) -{ - static boolean initialized = FALSE; - if (!initialized) { - init_pow2_table(); - init_log2_table(); - initialized = TRUE; - } -} - - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_math.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_math.h deleted file mode 100644 index 404bd21e1c5..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_math.h +++ /dev/null @@ -1,651 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -/** - * Math utilities and approximations for common math functions. - * Reduced precision is usually acceptable in shaders... - * - * "fast" is used in the names of functions which are low-precision, - * or at least lower-precision than the normal C lib functions. - */ - - -#ifndef U_MATH_H -#define U_MATH_H - - -#include "pipe/p_compiler.h" -#include "util/u_debug.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -#include -#include - -#ifdef PIPE_OS_UNIX -#include /* for ffs */ -#endif - - -#ifndef M_SQRT2 -#define M_SQRT2 1.41421356237309504880 -#endif - - -#if defined(_MSC_VER) - -#if _MSC_VER < 1400 && !defined(__cplusplus) - -static INLINE float cosf( float f ) -{ - return (float) cos( (double) f ); -} - -static INLINE float sinf( float f ) -{ - return (float) sin( (double) f ); -} - -static INLINE float ceilf( float f ) -{ - return (float) ceil( (double) f ); -} - -static INLINE float floorf( float f ) -{ - return (float) floor( (double) f ); -} - -static INLINE float powf( float f, float g ) -{ - return (float) pow( (double) f, (double) g ); -} - -static INLINE float sqrtf( float f ) -{ - return (float) sqrt( (double) f ); -} - -static INLINE float fabsf( float f ) -{ - return (float) fabs( (double) f ); -} - -static INLINE float logf( float f ) -{ - return (float) log( (double) f ); -} - -#else -/* Work-around an extra semi-colon in VS 2005 logf definition */ -#ifdef logf -#undef logf -#define logf(x) ((float)log((double)(x))) -#endif /* logf */ - -#define isfinite(x) _finite((double)(x)) -#define isnan(x) _isnan((double)(x)) -#endif /* _MSC_VER < 1400 && !defined(__cplusplus) */ - -static INLINE double log2( double x ) -{ - const double invln2 = 1.442695041; - return log( x ) * invln2; -} - -static INLINE double -round(double x) -{ - return x >= 0.0 ? floor(x + 0.5) : ceil(x - 0.5); -} - -static INLINE float -roundf(float x) -{ - return x >= 0.0f ? floorf(x + 0.5f) : ceilf(x - 0.5f); -} - -#endif /* _MSC_VER */ - - -#ifdef PIPE_OS_ANDROID - -static INLINE -double log2(double d) -{ - return log(d) * (1.0 / M_LN2); -} - -/* workaround a conflict with main/imports.h */ -#ifdef log2f -#undef log2f -#endif - -static INLINE -float log2f(float f) -{ - return logf(f) * (float) (1.0 / M_LN2); -} - -#endif - - - - -#define POW2_TABLE_SIZE_LOG2 9 -#define POW2_TABLE_SIZE (1 << POW2_TABLE_SIZE_LOG2) -#define POW2_TABLE_OFFSET (POW2_TABLE_SIZE/2) -#define POW2_TABLE_SCALE ((float)(POW2_TABLE_SIZE/2)) -extern float pow2_table[POW2_TABLE_SIZE]; - - -/** - * Initialize math module. This should be called before using any - * other functions in this module. - */ -extern void -util_init_math(void); - - -union fi { - float f; - int32_t i; - uint32_t ui; -}; - - -/** - * Fast version of 2^x - * Identity: exp2(a + b) = exp2(a) * exp2(b) - * Let ipart = int(x) - * Let fpart = x - ipart; - * So, exp2(x) = exp2(ipart) * exp2(fpart) - * Compute exp2(ipart) with i << ipart - * Compute exp2(fpart) with lookup table. - */ -static INLINE float -util_fast_exp2(float x) -{ - int32_t ipart; - float fpart, mpart; - union fi epart; - - if(x > 129.00000f) - return 3.402823466e+38f; - - if (x < -126.99999f) - return 0.0f; - - ipart = (int32_t) x; - fpart = x - (float) ipart; - - /* same as - * epart.f = (float) (1 << ipart) - * but faster and without integer overflow for ipart > 31 - */ - epart.i = (ipart + 127 ) << 23; - - mpart = pow2_table[POW2_TABLE_OFFSET + (int)(fpart * POW2_TABLE_SCALE)]; - - return epart.f * mpart; -} - - -/** - * Fast approximation to exp(x). - */ -static INLINE float -util_fast_exp(float x) -{ - const float k = 1.44269f; /* = log2(e) */ - return util_fast_exp2(k * x); -} - - -#define LOG2_TABLE_SIZE_LOG2 16 -#define LOG2_TABLE_SCALE (1 << LOG2_TABLE_SIZE_LOG2) -#define LOG2_TABLE_SIZE (LOG2_TABLE_SCALE + 1) -extern float log2_table[LOG2_TABLE_SIZE]; - - -/** - * Fast approximation to log2(x). - */ -static INLINE float -util_fast_log2(float x) -{ - union fi num; - float epart, mpart; - num.f = x; - epart = (float)(((num.i & 0x7f800000) >> 23) - 127); - /* mpart = log2_table[mantissa*LOG2_TABLE_SCALE + 0.5] */ - mpart = log2_table[((num.i & 0x007fffff) + (1 << (22 - LOG2_TABLE_SIZE_LOG2))) >> (23 - LOG2_TABLE_SIZE_LOG2)]; - return epart + mpart; -} - - -/** - * Fast approximation to x^y. - */ -static INLINE float -util_fast_pow(float x, float y) -{ - return util_fast_exp2(util_fast_log2(x) * y); -} - -/* Note that this counts zero as a power of two. - */ -static INLINE boolean -util_is_power_of_two( unsigned v ) -{ - return (v & (v-1)) == 0; -} - - -/** - * Floor(x), returned as int. - */ -static INLINE int -util_ifloor(float f) -{ - int ai, bi; - double af, bf; - union fi u; - af = (3 << 22) + 0.5 + (double) f; - bf = (3 << 22) + 0.5 - (double) f; - u.f = (float) af; ai = u.i; - u.f = (float) bf; bi = u.i; - return (ai - bi) >> 1; -} - - -/** - * Round float to nearest int. - */ -static INLINE int -util_iround(float f) -{ -#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86) - int r; - __asm__ ("fistpl %0" : "=m" (r) : "t" (f) : "st"); - return r; -#elif defined(PIPE_CC_MSVC) && defined(PIPE_ARCH_X86) - int r; - _asm { - fld f - fistp r - } - return r; -#else - if (f >= 0.0f) - return (int) (f + 0.5f); - else - return (int) (f - 0.5f); -#endif -} - - -/** - * Approximate floating point comparison - */ -static INLINE boolean -util_is_approx(float a, float b, float tol) -{ - return fabs(b - a) <= tol; -} - - -/** - * Test if x is NaN or +/- infinity. - */ -static INLINE boolean -util_is_inf_or_nan(float x) -{ - union fi tmp; - tmp.f = x; - return !(int)((unsigned int)((tmp.i & 0x7fffffff)-0x7f800000) >> 31); -} - - -/** - * Find first bit set in word. Least significant bit is 1. - * Return 0 if no bits set. - */ -#if defined(_MSC_VER) && _MSC_VER >= 1300 && (_M_IX86 || _M_AMD64 || _M_IA64) -unsigned char _BitScanForward(unsigned long* Index, unsigned long Mask); -#pragma intrinsic(_BitScanForward) -static INLINE -unsigned long ffs( unsigned long u ) -{ - unsigned long i; - if (_BitScanForward(&i, u)) - return i + 1; - else - return 0; -} -#elif defined(PIPE_CC_MSVC) && defined(PIPE_ARCH_X86) -static INLINE -unsigned ffs( unsigned u ) -{ - unsigned i; - - if (u == 0) { - return 0; - } - - __asm bsf eax, [u] - __asm inc eax - __asm mov [i], eax - - return i; -} -#elif defined(__MINGW32__) || defined(PIPE_OS_ANDROID) -#define ffs __builtin_ffs -#endif - - -/* Destructively loop over all of the bits in a mask as in: - * - * while (mymask) { - * int i = u_bit_scan(&mymask); - * ... process element i - * } - * - */ -static INLINE int u_bit_scan(unsigned *mask) -{ - int i = ffs(*mask) - 1; - *mask &= ~(1 << i); - return i; -} - - -/** - * Return float bits. - */ -static INLINE unsigned -fui( float f ) -{ - union fi fi; - fi.f = f; - return fi.ui; -} - - -/** - * Convert ubyte to float in [0, 1]. - * XXX a 256-entry lookup table would be slightly faster. - */ -static INLINE float -ubyte_to_float(ubyte ub) -{ - return (float) ub * (1.0f / 255.0f); -} - - -/** - * Convert float in [0,1] to ubyte in [0,255] with clamping. - */ -static INLINE ubyte -float_to_ubyte(float f) -{ - const int ieee_0996 = 0x3f7f0000; /* 0.996 or so */ - union fi tmp; - - tmp.f = f; - if (tmp.i < 0) { - return (ubyte) 0; - } - else if (tmp.i >= ieee_0996) { - return (ubyte) 255; - } - else { - tmp.f = tmp.f * (255.0f/256.0f) + 32768.0f; - return (ubyte) tmp.i; - } -} - -static INLINE float -byte_to_float_tex(int8_t b) -{ - return (b == -128) ? -1.0F : b * 1.0F / 127.0F; -} - -static INLINE int8_t -float_to_byte_tex(float f) -{ - return (int8_t) (127.0F * f); -} - -/** - * Calc log base 2 - */ -static INLINE unsigned -util_logbase2(unsigned n) -{ -#if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 304) - return ((sizeof(unsigned) * 8 - 1) - __builtin_clz(n | 1)); -#else - unsigned pos = 0; - if (n >= 1<<16) { n >>= 16; pos += 16; } - if (n >= 1<< 8) { n >>= 8; pos += 8; } - if (n >= 1<< 4) { n >>= 4; pos += 4; } - if (n >= 1<< 2) { n >>= 2; pos += 2; } - if (n >= 1<< 1) { pos += 1; } - return pos; -#endif -} - - -/** - * Returns the smallest power of two >= x - */ -static INLINE unsigned -util_next_power_of_two(unsigned x) -{ -#if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 304) - if (x <= 1) - return 1; - - return (1 << ((sizeof(unsigned) * 8) - __builtin_clz(x - 1))); -#else - unsigned val = x; - - if (x <= 1) - return 1; - - if (util_is_power_of_two(x)) - return x; - - val--; - val = (val >> 1) | val; - val = (val >> 2) | val; - val = (val >> 4) | val; - val = (val >> 8) | val; - val = (val >> 16) | val; - val++; - return val; -#endif -} - - -/** - * Return number of bits set in n. - */ -static INLINE unsigned -util_bitcount(unsigned n) -{ -#if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 304) - return __builtin_popcount(n); -#else - /* K&R classic bitcount. - * - * For each iteration, clear the LSB from the bitfield. - * Requires only one iteration per set bit, instead of - * one iteration per bit less than highest set bit. - */ - unsigned bits = 0; - for (bits; n; bits++) { - n &= n - 1; - } - return bits; -#endif -} - - -/** - * Convert from little endian to CPU byte order. - */ - -#ifdef PIPE_ARCH_BIG_ENDIAN -#define util_le32_to_cpu(x) util_bswap32(x) -#define util_le16_to_cpu(x) util_bswap16(x) -#else -#define util_le32_to_cpu(x) (x) -#define util_le16_to_cpu(x) (x) -#endif - - -/** - * Reverse byte order of a 32 bit word. - */ -static INLINE uint32_t -util_bswap32(uint32_t n) -{ -#if defined(PIPE_CC_GCC) && (PIPE_CC_GCC_VERSION >= 403) - return __builtin_bswap32(n); -#else - return (n >> 24) | - ((n >> 8) & 0x0000ff00) | - ((n << 8) & 0x00ff0000) | - (n << 24); -#endif -} - - -/** - * Reverse byte order of a 16 bit word. - */ -static INLINE uint16_t -util_bswap16(uint16_t n) -{ - return (n >> 8) | - (n << 8); -} - - -/** - * Clamp X to [MIN, MAX]. - * This is a macro to allow float, int, uint, etc. types. - */ -#define CLAMP( X, MIN, MAX ) ( (X)<(MIN) ? (MIN) : ((X)>(MAX) ? (MAX) : (X)) ) - -#define MIN2( A, B ) ( (A)<(B) ? (A) : (B) ) -#define MAX2( A, B ) ( (A)>(B) ? (A) : (B) ) - -#define MIN3( A, B, C ) ((A) < (B) ? MIN2(A, C) : MIN2(B, C)) -#define MAX3( A, B, C ) ((A) > (B) ? MAX2(A, C) : MAX2(B, C)) - -#define MIN4( A, B, C, D ) ((A) < (B) ? MIN3(A, C, D) : MIN3(B, C, D)) -#define MAX4( A, B, C, D ) ((A) > (B) ? MAX3(A, C, D) : MAX3(B, C, D)) - - -/** - * Align a value, only works pot alignemnts. - */ -static INLINE int -align(int value, int alignment) -{ - return (value + alignment - 1) & ~(alignment - 1); -} - -/** - * Works like align but on npot alignments. - */ -static INLINE size_t -util_align_npot(size_t value, size_t alignment) -{ - if (value % alignment) - return value + (alignment - (value % alignment)); - return value; -} - -static INLINE unsigned -u_minify(unsigned value, unsigned levels) -{ - return MAX2(1, value >> levels); -} - -#ifndef COPY_4V -#define COPY_4V( DST, SRC ) \ -do { \ - (DST)[0] = (SRC)[0]; \ - (DST)[1] = (SRC)[1]; \ - (DST)[2] = (SRC)[2]; \ - (DST)[3] = (SRC)[3]; \ -} while (0) -#endif - - -#ifndef COPY_4FV -#define COPY_4FV( DST, SRC ) COPY_4V(DST, SRC) -#endif - - -#ifndef ASSIGN_4V -#define ASSIGN_4V( DST, V0, V1, V2, V3 ) \ -do { \ - (DST)[0] = (V0); \ - (DST)[1] = (V1); \ - (DST)[2] = (V2); \ - (DST)[3] = (V3); \ -} while (0) -#endif - - -static INLINE uint32_t util_unsigned_fixed(float value, unsigned frac_bits) -{ - return value < 0 ? 0 : (uint32_t)(value * (1<MEMBER)) - - - -#ifdef __cplusplus -} -#endif - - -#endif /* U_MEMORY_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_mm.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_mm.c deleted file mode 100644 index 82f83702d1e..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_mm.c +++ /dev/null @@ -1,296 +0,0 @@ -/************************************************************************** - * - * Copyright (C) 1999 Wittawat Yamwong - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * WITTAWAT YAMWONG, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#include "pipe/p_compiler.h" -#include "util/u_debug.h" - -#include "util/u_memory.h" -#include "util/u_mm.h" - - -void -u_mmDumpMemInfo(const struct mem_block *heap) -{ - debug_printf("Memory heap %p:\n", (void *) heap); - if (heap == 0) { - debug_printf(" heap == 0\n"); - } - else { - const struct mem_block *p; - int total_used = 0, total_free = 0; - - for (p = heap->next; p != heap; p = p->next) { - debug_printf(" Offset:%08x, Size:%08x, %c%c\n", p->ofs, p->size, - p->free ? 'F':'.', - p->reserved ? 'R':'.'); - if (p->free) - total_free += p->size; - else - total_used += p->size; - } - - debug_printf("'\nMemory stats: total = %d, used = %d, free = %d\n", - total_used + total_free, total_used, total_free); - debug_printf("\nFree list:\n"); - - for (p = heap->next_free; p != heap; p = p->next_free) { - debug_printf(" FREE Offset:%08x, Size:%08x, %c%c\n", p->ofs, p->size, - p->free ? 'F':'.', - p->reserved ? 'R':'.'); - } - - } - debug_printf("End of memory blocks\n"); -} - - -struct mem_block * -u_mmInit(int ofs, int size) -{ - struct mem_block *heap, *block; - - if (size <= 0) - return NULL; - - heap = CALLOC_STRUCT(mem_block); - if (!heap) - return NULL; - - block = CALLOC_STRUCT(mem_block); - if (!block) { - FREE(heap); - return NULL; - } - - heap->next = block; - heap->prev = block; - heap->next_free = block; - heap->prev_free = block; - - block->heap = heap; - block->next = heap; - block->prev = heap; - block->next_free = heap; - block->prev_free = heap; - - block->ofs = ofs; - block->size = size; - block->free = 1; - - return heap; -} - - -static struct mem_block * -SliceBlock(struct mem_block *p, - int startofs, int size, - int reserved, int alignment) -{ - struct mem_block *newblock; - - /* break left [p, newblock, p->next], then p = newblock */ - if (startofs > p->ofs) { - newblock = CALLOC_STRUCT(mem_block); - if (!newblock) - return NULL; - newblock->ofs = startofs; - newblock->size = p->size - (startofs - p->ofs); - newblock->free = 1; - newblock->heap = p->heap; - - newblock->next = p->next; - newblock->prev = p; - p->next->prev = newblock; - p->next = newblock; - - newblock->next_free = p->next_free; - newblock->prev_free = p; - p->next_free->prev_free = newblock; - p->next_free = newblock; - - p->size -= newblock->size; - p = newblock; - } - - /* break right, also [p, newblock, p->next] */ - if (size < p->size) { - newblock = CALLOC_STRUCT(mem_block); - if (!newblock) - return NULL; - newblock->ofs = startofs + size; - newblock->size = p->size - size; - newblock->free = 1; - newblock->heap = p->heap; - - newblock->next = p->next; - newblock->prev = p; - p->next->prev = newblock; - p->next = newblock; - - newblock->next_free = p->next_free; - newblock->prev_free = p; - p->next_free->prev_free = newblock; - p->next_free = newblock; - - p->size = size; - } - - /* p = middle block */ - p->free = 0; - - /* Remove p from the free list: - */ - p->next_free->prev_free = p->prev_free; - p->prev_free->next_free = p->next_free; - - p->next_free = 0; - p->prev_free = 0; - - p->reserved = reserved; - return p; -} - - -struct mem_block * -u_mmAllocMem(struct mem_block *heap, int size, int align2, int startSearch) -{ - struct mem_block *p; - const int mask = (1 << align2)-1; - int startofs = 0; - int endofs; - - assert(size >= 0); - assert(align2 >= 0); - assert(align2 <= 12); /* sanity check, 2^12 (4KB) enough? */ - - if (!heap || align2 < 0 || size <= 0) - return NULL; - - for (p = heap->next_free; p != heap; p = p->next_free) { - assert(p->free); - - startofs = (p->ofs + mask) & ~mask; - if ( startofs < startSearch ) { - startofs = startSearch; - } - endofs = startofs+size; - if (endofs <= (p->ofs+p->size)) - break; - } - - if (p == heap) - return NULL; - - assert(p->free); - p = SliceBlock(p,startofs,size,0,mask+1); - - return p; -} - - -struct mem_block * -u_mmFindBlock(struct mem_block *heap, int start) -{ - struct mem_block *p; - - for (p = heap->next; p != heap; p = p->next) { - if (p->ofs == start) - return p; - } - - return NULL; -} - - -static INLINE int -Join2Blocks(struct mem_block *p) -{ - /* XXX there should be some assertions here */ - - /* NOTE: heap->free == 0 */ - - if (p->free && p->next->free) { - struct mem_block *q = p->next; - - assert(p->ofs + p->size == q->ofs); - p->size += q->size; - - p->next = q->next; - q->next->prev = p; - - q->next_free->prev_free = q->prev_free; - q->prev_free->next_free = q->next_free; - - FREE(q); - return 1; - } - return 0; -} - -int -u_mmFreeMem(struct mem_block *b) -{ - if (!b) - return 0; - - if (b->free) { - debug_printf("block already free\n"); - return -1; - } - if (b->reserved) { - debug_printf("block is reserved\n"); - return -1; - } - - b->free = 1; - b->next_free = b->heap->next_free; - b->prev_free = b->heap; - b->next_free->prev_free = b; - b->prev_free->next_free = b; - - Join2Blocks(b); - if (b->prev != b->heap) - Join2Blocks(b->prev); - - return 0; -} - - -void -u_mmDestroy(struct mem_block *heap) -{ - struct mem_block *p; - - if (!heap) - return; - - for (p = heap->next; p != heap; ) { - struct mem_block *next = p->next; - FREE(p); - p = next; - } - - FREE(heap); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_mm.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_mm.h deleted file mode 100644 index 6b158aae6e4..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_mm.h +++ /dev/null @@ -1,91 +0,0 @@ -/************************************************************************** - * - * Copyright (C) 1999 Wittawat Yamwong - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * KEITH WHITWELL, OR ANY OTHER CONTRIBUTORS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE - * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -/** - * @file - * Memory manager code. Primarily used by device drivers to manage texture - * heaps, etc. - */ - - -#ifndef _U_MM_H_ -#define _U_MM_H_ - - -struct mem_block { - struct mem_block *next, *prev; - struct mem_block *next_free, *prev_free; - struct mem_block *heap; - int ofs,size; - unsigned int free:1; - unsigned int reserved:1; -}; - - - -/** - * input: total size in bytes - * return: a heap pointer if OK, NULL if error - */ -extern struct mem_block *u_mmInit(int ofs, int size); - -/** - * Allocate 'size' bytes with 2^align2 bytes alignment, - * restrict the search to free memory after 'startSearch' - * depth and back buffers should be in different 4mb banks - * to get better page hits if possible - * input: size = size of block - * align2 = 2^align2 bytes alignment - * startSearch = linear offset from start of heap to begin search - * return: pointer to the allocated block, 0 if error - */ -extern struct mem_block *u_mmAllocMem(struct mem_block *heap, int size, int align2, - int startSearch); - -/** - * Free block starts at offset - * input: pointer to a block - * return: 0 if OK, -1 if error - */ -extern int u_mmFreeMem(struct mem_block *b); - -/** - * Free block starts at offset - * input: pointer to a heap, start offset - * return: pointer to a block - */ -extern struct mem_block *u_mmFindBlock(struct mem_block *heap, int start); - -/** - * destroy MM - */ -extern void u_mmDestroy(struct mem_block *mmInit); - -/** - * For debugging purposes. - */ -extern void u_mmDumpMemInfo(const struct mem_block *mmInit); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_network.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_network.c deleted file mode 100644 index ddaa264ef29..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_network.c +++ /dev/null @@ -1,194 +0,0 @@ - -#include "pipe/p_compiler.h" -#include "util/u_network.h" -#include "util/u_debug.h" - -#if defined(PIPE_SUBSYSTEM_WINDOWS_USER) -# define WIN32_NO_STATUS -# define _INC_WINDOWS -# include -# include -//# include -#elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || \ - defined(PIPE_OS_APPLE) || defined(PIPE_OS_CYGWIN) || defined(PIPE_OS_SOLARIS) -# include -# include -# include -# include -# include -#else -# warning "No socket implementation" -#endif - -boolean -u_socket_init() -{ -#if defined(PIPE_SUBSYSTEM_WINDOWS_USER) - WORD wVersionRequested; - WSADATA wsaData; - int err; - - /* Use the MAKEWORD(lowbyte, highbyte) macro declared in Windef.h */ - wVersionRequested = MAKEWORD(1, 1); - - err = WSAStartup(wVersionRequested, &wsaData); - if (err != 0) { - debug_printf("WSAStartup failed with error: %d\n", err); - return FALSE; - } - return TRUE; -#elif defined(PIPE_HAVE_SOCKETS) - return TRUE; -#else - return FALSE; -#endif -} - -void -u_socket_stop() -{ -#if defined(PIPE_SUBSYSTEM_WINDOWS_USER) - WSACleanup(); -#endif -} - -void -u_socket_close(int s) -{ - if (s < 0) - return; - -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) \ - || defined(PIPE_OS_APPLE) || defined(PIPE_OS_SOLARIS) - shutdown(s, SHUT_RDWR); - close(s); -#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) - shutdown(s, SD_BOTH); - closesocket(s); -#else - assert(0); -#endif -} - -int u_socket_accept(int s) -{ -#if defined(PIPE_HAVE_SOCKETS) - return accept(s, NULL, NULL); -#else - return -1; -#endif -} - -int -u_socket_send(int s, void *data, size_t size) -{ -#if defined(PIPE_HAVE_SOCKETS) - return send(s, data, size, 0); -#else - return -1; -#endif -} - -int -u_socket_peek(int s, void *data, size_t size) -{ -#if defined(PIPE_HAVE_SOCKETS) - return recv(s, data, size, MSG_PEEK); -#else - return -1; -#endif -} - -int -u_socket_recv(int s, void *data, size_t size) -{ -#if defined(PIPE_HAVE_SOCKETS) - return recv(s, data, size, 0); -#else - return -1; -#endif -} - -int -u_socket_connect(const char *hostname, uint16_t port) -{ -#if defined(PIPE_HAVE_SOCKETS) - int s; - struct sockaddr_in sa; - struct hostent *host = NULL; - - memset(&sa, 0, sizeof(struct sockaddr_in)); - host = gethostbyname(hostname); - if (!host) - return -1; - - memcpy((char *)&sa.sin_addr,host->h_addr_list[0],host->h_length); - sa.sin_family= host->h_addrtype; - sa.sin_port = htons(port); - - s = socket(host->h_addrtype, SOCK_STREAM, IPPROTO_TCP); - if (s < 0) - return -1; - - if (connect(s, (struct sockaddr *)&sa, sizeof(sa))) { - u_socket_close(s); - return -1; - } - - return s; -#else - assert(0); - return -1; -#endif -} - -int -u_socket_listen_on_port(uint16_t portnum) -{ -#if defined(PIPE_HAVE_SOCKETS) - int s; - struct sockaddr_in sa; - memset(&sa, 0, sizeof(struct sockaddr_in)); - - sa.sin_family = AF_INET; - sa.sin_port = htons(portnum); - - s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - if (s < 0) - return -1; - - if (bind(s, (struct sockaddr *)&sa, sizeof(struct sockaddr_in)) == -1) { - u_socket_close(s); - return -1; - } - - listen(s, 0); - - return s; -#else - assert(0); - return -1; -#endif -} - -void -u_socket_block(int s, boolean block) -{ -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) \ - || defined(PIPE_OS_APPLE) || defined(PIPE_OS_SOLARIS) - int old = fcntl(s, F_GETFL, 0); - if (old == -1) - return; - - /* TODO obey block */ - if (block) - fcntl(s, F_SETFL, old & ~O_NONBLOCK); - else - fcntl(s, F_SETFL, old | O_NONBLOCK); -#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) - u_long iMode = block ? 0 : 1; - ioctlsocket(s, FIONBIO, &iMode); -#else - assert(0); -#endif -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_network.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_network.h deleted file mode 100644 index 61fe9a3c60f..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_network.h +++ /dev/null @@ -1,25 +0,0 @@ - -#ifndef _U_NETWORK_H_ -#define _U_NETWORK_H_ - -#include "pipe/p_compiler.h" - -#if defined(PIPE_SUBSYSTEM_WINDOWS_USER) -# define PIPE_HAVE_SOCKETS -#elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || \ - defined(PIPE_OS_APPLE) || defined(PIPE_OS_SOLARIS) -# define PIPE_HAVE_SOCKETS -#endif - -boolean u_socket_init(void); -void u_socket_stop(void); -void u_socket_close(int s); -int u_socket_listen_on_port(uint16_t portnum); -int u_socket_accept(int s); -int u_socket_connect(const char *host, uint16_t port); -int u_socket_send(int s, void *data, size_t size); -int u_socket_peek(int s, void *data, size_t size); -int u_socket_recv(int s, void *data, size_t size); -void u_socket_block(int s, boolean block); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_pack_color.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_pack_color.h deleted file mode 100644 index 50ec226d887..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_pack_color.h +++ /dev/null @@ -1,648 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Functions to produce packed colors/Z from floats. - */ - - -#ifndef U_PACK_COLOR_H -#define U_PACK_COLOR_H - - -#include "pipe/p_compiler.h" -#include "pipe/p_format.h" -#include "util/u_debug.h" -#include "util/u_format.h" -#include "util/u_math.h" - - -/** - * Helper union for packing pixel values. - * Will often contain values in formats which are too complex to be described - * in simple terms, hence might just effectively contain a number of bytes. - * Must be big enough to hold data for all formats (currently 256 bits). - */ -union util_color { - ubyte ub; - ushort us; - uint ui; - float f[4]; - double d[4]; -}; - -/** - * Pack ubyte R,G,B,A into dest pixel. - */ -static INLINE void -util_pack_color_ub(ubyte r, ubyte g, ubyte b, ubyte a, - enum pipe_format format, union util_color *uc) -{ - switch (format) { - case PIPE_FORMAT_A8B8G8R8_UNORM: - { - uc->ui = (r << 24) | (g << 16) | (b << 8) | a; - } - return; - case PIPE_FORMAT_X8B8G8R8_UNORM: - { - uc->ui = (r << 24) | (g << 16) | (b << 8) | 0xff; - } - return; - case PIPE_FORMAT_B8G8R8A8_UNORM: - { - uc->ui = (a << 24) | (r << 16) | (g << 8) | b; - } - return; - case PIPE_FORMAT_B8G8R8X8_UNORM: - { - uc->ui = (0xff << 24) | (r << 16) | (g << 8) | b; - } - return; - case PIPE_FORMAT_A8R8G8B8_UNORM: - { - uc->ui = (b << 24) | (g << 16) | (r << 8) | a; - } - return; - case PIPE_FORMAT_X8R8G8B8_UNORM: - { - uc->ui = (b << 24) | (g << 16) | (r << 8) | 0xff; - } - return; - case PIPE_FORMAT_B5G6R5_UNORM: - { - uc->us = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | (b >> 3); - } - return; - case PIPE_FORMAT_B5G5R5X1_UNORM: - { - uc->us = ((0x80) << 8) | ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | (b >> 3); - } - return; - case PIPE_FORMAT_B5G5R5A1_UNORM: - { - uc->us = ((a & 0x80) << 8) | ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | (b >> 3); - } - return; - case PIPE_FORMAT_B4G4R4A4_UNORM: - { - uc->us = ((a & 0xf0) << 8) | ((r & 0xf0) << 4) | ((g & 0xf0) << 0) | (b >> 4); - } - return; - case PIPE_FORMAT_A8_UNORM: - { - uc->ub = a; - } - return; - case PIPE_FORMAT_L8_UNORM: - case PIPE_FORMAT_I8_UNORM: - { - uc->ub = r; - } - return; - case PIPE_FORMAT_R32G32B32A32_FLOAT: - { - uc->f[0] = (float)r / 255.0f; - uc->f[1] = (float)g / 255.0f; - uc->f[2] = (float)b / 255.0f; - uc->f[3] = (float)a / 255.0f; - } - return; - case PIPE_FORMAT_R32G32B32_FLOAT: - { - uc->f[0] = (float)r / 255.0f; - uc->f[1] = (float)g / 255.0f; - uc->f[2] = (float)b / 255.0f; - } - return; - - /* Handle other cases with a generic function. - */ - default: - { - ubyte src[4]; - - src[0] = r; - src[1] = g; - src[2] = b; - src[3] = a; - util_format_write_4ub(format, src, 0, uc, 0, 0, 0, 1, 1); - } - } -} - - -/** - * Unpack RGBA from a packed pixel, returning values as ubytes in [0,255]. - */ -static INLINE void -util_unpack_color_ub(enum pipe_format format, union util_color *uc, - ubyte *r, ubyte *g, ubyte *b, ubyte *a) -{ - switch (format) { - case PIPE_FORMAT_A8B8G8R8_UNORM: - { - uint p = uc->ui; - *r = (ubyte) ((p >> 24) & 0xff); - *g = (ubyte) ((p >> 16) & 0xff); - *b = (ubyte) ((p >> 8) & 0xff); - *a = (ubyte) ((p >> 0) & 0xff); - } - return; - case PIPE_FORMAT_X8B8G8R8_UNORM: - { - uint p = uc->ui; - *r = (ubyte) ((p >> 24) & 0xff); - *g = (ubyte) ((p >> 16) & 0xff); - *b = (ubyte) ((p >> 8) & 0xff); - *a = (ubyte) 0xff; - } - return; - case PIPE_FORMAT_B8G8R8A8_UNORM: - { - uint p = uc->ui; - *r = (ubyte) ((p >> 16) & 0xff); - *g = (ubyte) ((p >> 8) & 0xff); - *b = (ubyte) ((p >> 0) & 0xff); - *a = (ubyte) ((p >> 24) & 0xff); - } - return; - case PIPE_FORMAT_B8G8R8X8_UNORM: - { - uint p = uc->ui; - *r = (ubyte) ((p >> 16) & 0xff); - *g = (ubyte) ((p >> 8) & 0xff); - *b = (ubyte) ((p >> 0) & 0xff); - *a = (ubyte) 0xff; - } - return; - case PIPE_FORMAT_A8R8G8B8_UNORM: - { - uint p = uc->ui; - *r = (ubyte) ((p >> 8) & 0xff); - *g = (ubyte) ((p >> 16) & 0xff); - *b = (ubyte) ((p >> 24) & 0xff); - *a = (ubyte) ((p >> 0) & 0xff); - } - return; - case PIPE_FORMAT_X8R8G8B8_UNORM: - { - uint p = uc->ui; - *r = (ubyte) ((p >> 8) & 0xff); - *g = (ubyte) ((p >> 16) & 0xff); - *b = (ubyte) ((p >> 24) & 0xff); - *a = (ubyte) 0xff; - } - return; - case PIPE_FORMAT_B5G6R5_UNORM: - { - ushort p = uc->us; - *r = (ubyte) (((p >> 8) & 0xf8) | ((p >> 13) & 0x7)); - *g = (ubyte) (((p >> 3) & 0xfc) | ((p >> 9) & 0x3)); - *b = (ubyte) (((p << 3) & 0xf8) | ((p >> 2) & 0x7)); - *a = (ubyte) 0xff; - } - return; - case PIPE_FORMAT_B5G5R5X1_UNORM: - { - ushort p = uc->us; - *r = (ubyte) (((p >> 7) & 0xf8) | ((p >> 12) & 0x7)); - *g = (ubyte) (((p >> 2) & 0xf8) | ((p >> 7) & 0x7)); - *b = (ubyte) (((p << 3) & 0xf8) | ((p >> 2) & 0x7)); - *a = (ubyte) 0xff; - } - return; - case PIPE_FORMAT_B5G5R5A1_UNORM: - { - ushort p = uc->us; - *r = (ubyte) (((p >> 7) & 0xf8) | ((p >> 12) & 0x7)); - *g = (ubyte) (((p >> 2) & 0xf8) | ((p >> 7) & 0x7)); - *b = (ubyte) (((p << 3) & 0xf8) | ((p >> 2) & 0x7)); - *a = (ubyte) (0xff * (p >> 15)); - } - return; - case PIPE_FORMAT_B4G4R4A4_UNORM: - { - ushort p = uc->us; - *r = (ubyte) (((p >> 4) & 0xf0) | ((p >> 8) & 0xf)); - *g = (ubyte) (((p >> 0) & 0xf0) | ((p >> 4) & 0xf)); - *b = (ubyte) (((p << 4) & 0xf0) | ((p >> 0) & 0xf)); - *a = (ubyte) (((p >> 8) & 0xf0) | ((p >> 12) & 0xf)); - } - return; - case PIPE_FORMAT_A8_UNORM: - { - ubyte p = uc->ub; - *r = *g = *b = (ubyte) 0xff; - *a = p; - } - return; - case PIPE_FORMAT_L8_UNORM: - { - ubyte p = uc->ub; - *r = *g = *b = p; - *a = (ubyte) 0xff; - } - return; - case PIPE_FORMAT_I8_UNORM: - { - ubyte p = uc->ub; - *r = *g = *b = *a = p; - } - return; - case PIPE_FORMAT_R32G32B32A32_FLOAT: - { - const float *p = &uc->f[0]; - *r = float_to_ubyte(p[0]); - *g = float_to_ubyte(p[1]); - *b = float_to_ubyte(p[2]); - *a = float_to_ubyte(p[3]); - } - return; - case PIPE_FORMAT_R32G32B32_FLOAT: - { - const float *p = &uc->f[0]; - *r = float_to_ubyte(p[0]); - *g = float_to_ubyte(p[1]); - *b = float_to_ubyte(p[2]); - *a = (ubyte) 0xff; - } - return; - - case PIPE_FORMAT_R32G32_FLOAT: - { - const float *p = &uc->f[0]; - *r = float_to_ubyte(p[0]); - *g = float_to_ubyte(p[1]); - *b = *a = (ubyte) 0xff; - } - return; - - case PIPE_FORMAT_R32_FLOAT: - { - const float *p = &uc->f[0]; - *r = float_to_ubyte(p[0]); - *g = *b = *a = (ubyte) 0xff; - } - return; - - /* Handle other cases with a generic function. - */ - default: - { - ubyte dst[4]; - - util_format_read_4ub(format, dst, 0, uc, 0, 0, 0, 1, 1); - *r = dst[0]; - *g = dst[1]; - *b = dst[2]; - *a = dst[3]; - } - } -} - - -/** - * Note rgba outside [0,1] will be clamped for int pixel formats. - */ -static INLINE void -util_pack_color(const float rgba[4], enum pipe_format format, union util_color *uc) -{ - ubyte r = 0; - ubyte g = 0; - ubyte b = 0; - ubyte a = 0; - - if (util_format_get_component_bits(format, UTIL_FORMAT_COLORSPACE_RGB, 0) <= 8) { - /* format uses 8-bit components or less */ - r = float_to_ubyte(rgba[0]); - g = float_to_ubyte(rgba[1]); - b = float_to_ubyte(rgba[2]); - a = float_to_ubyte(rgba[3]); - } - - switch (format) { - case PIPE_FORMAT_A8B8G8R8_UNORM: - { - uc->ui = (r << 24) | (g << 16) | (b << 8) | a; - } - return; - case PIPE_FORMAT_X8B8G8R8_UNORM: - { - uc->ui = (r << 24) | (g << 16) | (b << 8) | 0xff; - } - return; - case PIPE_FORMAT_B8G8R8A8_UNORM: - { - uc->ui = (a << 24) | (r << 16) | (g << 8) | b; - } - return; - case PIPE_FORMAT_B8G8R8X8_UNORM: - { - uc->ui = (0xff << 24) | (r << 16) | (g << 8) | b; - } - return; - case PIPE_FORMAT_A8R8G8B8_UNORM: - { - uc->ui = (b << 24) | (g << 16) | (r << 8) | a; - } - return; - case PIPE_FORMAT_X8R8G8B8_UNORM: - { - uc->ui = (b << 24) | (g << 16) | (r << 8) | 0xff; - } - return; - case PIPE_FORMAT_B5G6R5_UNORM: - { - uc->us = ((r & 0xf8) << 8) | ((g & 0xfc) << 3) | (b >> 3); - } - return; - case PIPE_FORMAT_B5G5R5X1_UNORM: - { - uc->us = ((0x80) << 8) | ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | (b >> 3); - } - return; - case PIPE_FORMAT_B5G5R5A1_UNORM: - { - uc->us = ((a & 0x80) << 8) | ((r & 0xf8) << 7) | ((g & 0xf8) << 2) | (b >> 3); - } - return; - case PIPE_FORMAT_B4G4R4A4_UNORM: - { - uc->us = ((a & 0xf0) << 8) | ((r & 0xf0) << 4) | ((g & 0xf0) << 0) | (b >> 4); - } - return; - case PIPE_FORMAT_A8_UNORM: - { - uc->ub = a; - } - return; - case PIPE_FORMAT_L8_UNORM: - case PIPE_FORMAT_I8_UNORM: - { - uc->ub = r; - } - return; - case PIPE_FORMAT_R32G32B32A32_FLOAT: - { - uc->f[0] = rgba[0]; - uc->f[1] = rgba[1]; - uc->f[2] = rgba[2]; - uc->f[3] = rgba[3]; - } - return; - case PIPE_FORMAT_R32G32B32_FLOAT: - { - uc->f[0] = rgba[0]; - uc->f[1] = rgba[1]; - uc->f[2] = rgba[2]; - } - return; - - /* Handle other cases with a generic function. - */ - default: - util_format_write_4f(format, rgba, 0, uc, 0, 0, 0, 1, 1); - } -} - -/* Integer versions of util_pack_z and util_pack_z_stencil - useful for - * constructing clear masks. - */ -static INLINE uint32_t -util_pack_mask_z(enum pipe_format format, uint32_t z) -{ - switch (format) { - case PIPE_FORMAT_Z16_UNORM: - return z & 0xffff; - case PIPE_FORMAT_Z32_UNORM: - case PIPE_FORMAT_Z32_FLOAT: - return z; - case PIPE_FORMAT_Z24_UNORM_S8_UINT: - case PIPE_FORMAT_Z24X8_UNORM: - return z & 0xffffff; - case PIPE_FORMAT_S8_UINT_Z24_UNORM: - case PIPE_FORMAT_X8Z24_UNORM: - return (z & 0xffffff) << 8; - case PIPE_FORMAT_S8_UINT: - return 0; - default: - debug_print_format("gallium: unhandled format in util_pack_mask_z()", format); - assert(0); - return 0; - } -} - - -static INLINE uint64_t -util_pack64_mask_z(enum pipe_format format, uint32_t z) -{ - switch (format) { - case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT: - return z; - default: - return util_pack_mask_z(format, z); - } -} - - -static INLINE uint32_t -util_pack_mask_z_stencil(enum pipe_format format, uint32_t z, uint8_t s) -{ - uint32_t packed = util_pack_mask_z(format, z); - - switch (format) { - case PIPE_FORMAT_Z24_UNORM_S8_UINT: - packed |= (uint32_t)s << 24; - break; - case PIPE_FORMAT_S8_UINT_Z24_UNORM: - packed |= s; - break; - case PIPE_FORMAT_S8_UINT: - packed |= s; - break; - default: - break; - } - - return packed; -} - - -static INLINE uint64_t -util_pack64_mask_z_stencil(enum pipe_format format, uint32_t z, uint8_t s) -{ - uint64_t packed; - - switch (format) { - case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT: - packed = util_pack64_mask_z(format, z); - packed |= (uint64_t)s << 32ull; - return packed; - default: - return util_pack_mask_z_stencil(format, z, s); - } -} - - -/** - * Note: it's assumed that z is in [0,1] - */ -static INLINE uint32_t -util_pack_z(enum pipe_format format, double z) -{ - union fi fui; - - if (z == 0.0) - return 0; - - switch (format) { - case PIPE_FORMAT_Z16_UNORM: - if (z == 1.0) - return 0xffff; - return (uint32_t) (z * 0xffff); - case PIPE_FORMAT_Z32_UNORM: - /* special-case to avoid overflow */ - if (z == 1.0) - return 0xffffffff; - return (uint32_t) (z * 0xffffffff); - case PIPE_FORMAT_Z32_FLOAT: - fui.f = (float)z; - return fui.ui; - case PIPE_FORMAT_Z24_UNORM_S8_UINT: - case PIPE_FORMAT_Z24X8_UNORM: - if (z == 1.0) - return 0xffffff; - return (uint32_t) (z * 0xffffff); - case PIPE_FORMAT_S8_UINT_Z24_UNORM: - case PIPE_FORMAT_X8Z24_UNORM: - if (z == 1.0) - return 0xffffff00; - return ((uint32_t) (z * 0xffffff)) << 8; - case PIPE_FORMAT_S8_UINT: - /* this case can get it via util_pack_z_stencil() */ - return 0; - default: - debug_print_format("gallium: unhandled format in util_pack_z()", format); - assert(0); - return 0; - } -} - - -static INLINE uint64_t -util_pack64_z(enum pipe_format format, double z) -{ - union fi fui; - - if (z == 0) - return 0; - - switch (format) { - case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT: - fui.f = (float)z; - return fui.ui; - default: - return util_pack_z(format, z); - } -} - - -/** - * Pack Z and/or stencil values into a 32-bit value described by format. - * Note: it's assumed that z is in [0,1] and s in [0,255] - */ -static INLINE uint32_t -util_pack_z_stencil(enum pipe_format format, double z, uint8_t s) -{ - uint32_t packed = util_pack_z(format, z); - - switch (format) { - case PIPE_FORMAT_Z24_UNORM_S8_UINT: - packed |= (uint32_t)s << 24; - break; - case PIPE_FORMAT_S8_UINT_Z24_UNORM: - packed |= s; - break; - case PIPE_FORMAT_S8_UINT: - packed |= s; - break; - default: - break; - } - - return packed; -} - - -static INLINE uint64_t -util_pack64_z_stencil(enum pipe_format format, double z, uint8_t s) -{ - uint64_t packed; - - switch (format) { - case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT: - packed = util_pack64_z(format, z); - packed |= (uint64_t)s << 32ull; - break; - default: - return util_pack_z_stencil(format, z, s); - } - - return packed; -} - - -/** - * Pack 4 ubytes into a 4-byte word - */ -static INLINE unsigned -pack_ub4(ubyte b0, ubyte b1, ubyte b2, ubyte b3) -{ - return ((((unsigned int)b0) << 0) | - (((unsigned int)b1) << 8) | - (((unsigned int)b2) << 16) | - (((unsigned int)b3) << 24)); -} - - -/** - * Pack/convert 4 floats into one 4-byte word. - */ -static INLINE unsigned -pack_ui32_float4(float a, float b, float c, float d) -{ - return pack_ub4( float_to_ubyte(a), - float_to_ubyte(b), - float_to_ubyte(c), - float_to_ubyte(d) ); -} - - - -#endif /* U_PACK_COLOR_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_pointer.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_pointer.h deleted file mode 100644 index cce0c7430e7..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_pointer.h +++ /dev/null @@ -1,130 +0,0 @@ -/************************************************************************** - * - * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_POINTER_H -#define U_POINTER_H - -#include "pipe/p_compiler.h" - -#ifdef __cplusplus -extern "C" { -#endif - -static INLINE intptr_t -pointer_to_intptr( const void *p ) -{ - union { - const void *p; - intptr_t i; - } pi; - pi.p = p; - return pi.i; -} - -static INLINE void * -intptr_to_pointer( intptr_t i ) -{ - union { - void *p; - intptr_t i; - } pi; - pi.i = i; - return pi.p; -} - -static INLINE uintptr_t -pointer_to_uintptr( const void *ptr ) -{ - union { - const void *p; - uintptr_t u; - } pu; - pu.p = ptr; - return pu.u; -} - -static INLINE void * -uintptr_to_pointer( uintptr_t u ) -{ - union { - void *p; - uintptr_t u; - } pu; - pu.u = u; - return pu.p; -} - -/** - * Return a pointer aligned to next multiple of N bytes. - */ -static INLINE void * -align_pointer( const void *unaligned, uintptr_t alignment ) -{ - uintptr_t aligned = (pointer_to_uintptr( unaligned ) + alignment - 1) & ~(alignment - 1); - return uintptr_to_pointer( aligned ); -} - - -/** - * Return a pointer aligned to next multiple of 16 bytes. - */ -static INLINE void * -align16( void *unaligned ) -{ - return align_pointer( unaligned, 16 ); -} - -typedef void (*func_pointer)(void); - -static INLINE func_pointer -pointer_to_func( void *p ) -{ - union { - void *p; - func_pointer f; - } pf; - pf.p = p; - return pf.f; -} - -static INLINE void * -func_to_pointer( func_pointer f ) -{ - union { - void *p; - func_pointer f; - } pf; - pf.f = f; - return pf.p; -} - - -#ifdef __cplusplus -} -#endif - -#endif /* U_POINTER_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_prim.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_prim.h deleted file mode 100644 index 070df643d2c..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_prim.h +++ /dev/null @@ -1,211 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#ifndef U_BLIT_H -#define U_BLIT_H - - -#include "pipe/p_defines.h" -#include "util/u_debug.h" - -#ifdef __cplusplus -extern "C" { -#endif - -static INLINE boolean u_validate_pipe_prim( unsigned pipe_prim, unsigned nr ) -{ - boolean ok = TRUE; - - switch (pipe_prim) { - case PIPE_PRIM_POINTS: - ok = (nr >= 1); - break; - case PIPE_PRIM_LINES: - ok = (nr >= 2); - break; - case PIPE_PRIM_LINE_STRIP: - case PIPE_PRIM_LINE_LOOP: - ok = (nr >= 2); - break; - case PIPE_PRIM_TRIANGLES: - ok = (nr >= 3); - break; - case PIPE_PRIM_TRIANGLE_STRIP: - case PIPE_PRIM_TRIANGLE_FAN: - case PIPE_PRIM_POLYGON: - ok = (nr >= 3); - break; - case PIPE_PRIM_QUADS: - ok = (nr >= 4); - break; - case PIPE_PRIM_QUAD_STRIP: - ok = (nr >= 4); - break; - default: - ok = 0; - break; - } - - return ok; -} - - -static INLINE boolean u_trim_pipe_prim( unsigned pipe_prim, unsigned *nr ) -{ - boolean ok = TRUE; - const static unsigned values[][2] = { - { 1, 0 }, /* PIPE_PRIM_POINTS */ - { 2, 2 }, /* PIPE_PRIM_LINES */ - { 2, 0 }, /* PIPE_PRIM_LINE_LOOP */ - { 2, 0 }, /* PIPE_PRIM_LINE_STRIP */ - { 3, 3 }, /* PIPE_PRIM_TRIANGLES */ - { 3, 0 }, /* PIPE_PRIM_TRIANGLE_STRIP */ - { 3, 0 }, /* PIPE_PRIM_TRIANGLE_FAN */ - { 4, 4 }, /* PIPE_PRIM_TRIANGLE_QUADS */ - { 4, 2 }, /* PIPE_PRIM_TRIANGLE_QUAD_STRIP */ - { 3, 0 }, /* PIPE_PRIM_TRIANGLE_POLYGON */ - { 4, 4 }, /* PIPE_PRIM_LINES_ADJACENCY */ - { 4, 0 }, /* PIPE_PRIM_LINE_STRIP_ADJACENCY */ - { 6, 5 }, /* PIPE_PRIM_TRIANGLES_ADJACENCY */ - { 4, 0 }, /* PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY */ - }; - - if (unlikely(pipe_prim >= PIPE_PRIM_MAX)) { - *nr = 0; - return FALSE; - } - - ok = (*nr >= values[pipe_prim][0]); - if (values[pipe_prim][1]) - *nr -= (*nr % values[pipe_prim][1]); - - if (!ok) - *nr = 0; - - return ok; -} - - -static INLINE unsigned u_reduced_prim( unsigned pipe_prim ) -{ - switch (pipe_prim) { - case PIPE_PRIM_POINTS: - return PIPE_PRIM_POINTS; - - case PIPE_PRIM_LINES: - case PIPE_PRIM_LINE_STRIP: - case PIPE_PRIM_LINE_LOOP: - return PIPE_PRIM_LINES; - - default: - return PIPE_PRIM_TRIANGLES; - } -} - -static INLINE unsigned -u_vertices_per_prim(int primitive) -{ - switch(primitive) { - case PIPE_PRIM_POINTS: - return 1; - case PIPE_PRIM_LINES: - case PIPE_PRIM_LINE_LOOP: - case PIPE_PRIM_LINE_STRIP: - return 2; - case PIPE_PRIM_TRIANGLES: - case PIPE_PRIM_TRIANGLE_STRIP: - case PIPE_PRIM_TRIANGLE_FAN: - return 3; - case PIPE_PRIM_LINES_ADJACENCY: - case PIPE_PRIM_LINE_STRIP_ADJACENCY: - return 4; - case PIPE_PRIM_TRIANGLES_ADJACENCY: - case PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY: - return 6; - - /* following primitives should never be used - * with geometry shaders abd their size is - * undefined */ - case PIPE_PRIM_POLYGON: - case PIPE_PRIM_QUADS: - case PIPE_PRIM_QUAD_STRIP: - default: - debug_printf("Unrecognized geometry shader primitive"); - return 3; - } -} - -/** - * Returns the number of decomposed primitives for the given - * vertex count. - * Geometry shader is invoked once for each triangle in - * triangle strip, triangle fans and triangles and once - * for each line in line strip, line loop, lines. - */ -static INLINE unsigned -u_gs_prims_for_vertices(int primitive, int vertices) -{ - switch(primitive) { - case PIPE_PRIM_POINTS: - return vertices; - case PIPE_PRIM_LINES: - return vertices / 2; - case PIPE_PRIM_LINE_LOOP: - return vertices; - case PIPE_PRIM_LINE_STRIP: - return vertices - 1; - case PIPE_PRIM_TRIANGLES: - return vertices / 3; - case PIPE_PRIM_TRIANGLE_STRIP: - return vertices - 2; - case PIPE_PRIM_TRIANGLE_FAN: - return vertices - 2; - case PIPE_PRIM_LINES_ADJACENCY: - return vertices / 2; - case PIPE_PRIM_LINE_STRIP_ADJACENCY: - return vertices - 1; - case PIPE_PRIM_TRIANGLES_ADJACENCY: - return vertices / 3; - case PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY: - return vertices - 2; - - /* following primitives should never be used - * with geometry shaders abd their size is - * undefined */ - case PIPE_PRIM_POLYGON: - case PIPE_PRIM_QUADS: - case PIPE_PRIM_QUAD_STRIP: - default: - debug_printf("Unrecognized geometry shader primitive"); - return 3; - } -} - -const char *u_prim_name( unsigned pipe_prim ); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_pstipple.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_pstipple.c deleted file mode 100644 index ac0df8c1a9c..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_pstipple.c +++ /dev/null @@ -1,457 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * Polygon stipple helper module. Drivers/GPUs which don't support polygon - * stipple natively can use this module to simulate it. - * - * Basically, modify fragment shader to sample the 32x32 stipple pattern - * texture and do a fragment kill for the 'off' bits. - * - * This was originally a 'draw' module stage, but since we don't need - * vertex window coords or anything, it can be a stand-alone utility module. - * - * Authors: Brian Paul - */ - - -#include "pipe/p_context.h" -#include "pipe/p_defines.h" -#include "pipe/p_shader_tokens.h" -#include "util/u_inlines.h" - -#include "util/u_format.h" -#include "util/u_memory.h" -#include "util/u_pstipple.h" -#include "util/u_sampler.h" - -#include "tgsi/tgsi_transform.h" -#include "tgsi/tgsi_dump.h" -#include "tgsi/tgsi_scan.h" - -/** Approx number of new tokens for instructions in pstip_transform_inst() */ -#define NUM_NEW_TOKENS 50 - - -static void -util_pstipple_update_stipple_texture(struct pipe_context *pipe, - struct pipe_resource *tex, - const uint32_t pattern[32]) -{ - static const uint bit31 = 1 << 31; - struct pipe_transfer *transfer; - ubyte *data; - int i, j; - - /* map texture memory */ - transfer = pipe_get_transfer(pipe, tex, 0, 0, - PIPE_TRANSFER_WRITE, 0, 0, 32, 32); - data = pipe->transfer_map(pipe, transfer); - - /* - * Load alpha texture. - * Note: 0 means keep the fragment, 255 means kill it. - * We'll negate the texel value and use KILP which kills if value - * is negative. - */ - for (i = 0; i < 32; i++) { - for (j = 0; j < 32; j++) { - if (pattern[i] & (bit31 >> j)) { - /* fragment "on" */ - data[i * transfer->stride + j] = 0; - } - else { - /* fragment "off" */ - data[i * transfer->stride + j] = 255; - } - } - } - - /* unmap */ - pipe->transfer_unmap(pipe, transfer); - pipe->transfer_destroy(pipe, transfer); -} - - -/** - * Create a 32x32 alpha8 texture that encodes the given stipple pattern. - */ -struct pipe_resource * -util_pstipple_create_stipple_texture(struct pipe_context *pipe, - const uint32_t pattern[32]) -{ - struct pipe_screen *screen = pipe->screen; - struct pipe_resource templat, *tex; - - memset(&templat, 0, sizeof(templat)); - templat.target = PIPE_TEXTURE_2D; - templat.format = PIPE_FORMAT_A8_UNORM; - templat.last_level = 0; - templat.width0 = 32; - templat.height0 = 32; - templat.depth0 = 1; - templat.array_size = 1; - templat.bind = PIPE_BIND_SAMPLER_VIEW; - - tex = screen->resource_create(screen, &templat); - - if (tex) - util_pstipple_update_stipple_texture(pipe, tex, pattern); - - return tex; -} - - -/** - * Create sampler view to sample the stipple texture. - */ -struct pipe_sampler_view * -util_pstipple_create_sampler_view(struct pipe_context *pipe, - struct pipe_resource *tex) -{ - struct pipe_sampler_view templat, *sv; - - u_sampler_view_default_template(&templat, tex, tex->format); - sv = pipe->create_sampler_view(pipe, tex, &templat); - - return sv; -} - - -/** - * Create the sampler CSO that'll be used for stippling. - */ -void * -util_pstipple_create_sampler(struct pipe_context *pipe) -{ - struct pipe_sampler_state templat; - void *s; - - memset(&templat, 0, sizeof(templat)); - templat.wrap_s = PIPE_TEX_WRAP_REPEAT; - templat.wrap_t = PIPE_TEX_WRAP_REPEAT; - templat.wrap_r = PIPE_TEX_WRAP_REPEAT; - templat.min_mip_filter = PIPE_TEX_MIPFILTER_NONE; - templat.min_img_filter = PIPE_TEX_FILTER_NEAREST; - templat.mag_img_filter = PIPE_TEX_FILTER_NEAREST; - templat.normalized_coords = 1; - templat.min_lod = 0.0f; - templat.max_lod = 0.0f; - - s = pipe->create_sampler_state(pipe, &templat); - return s; -} - - - -/** - * Subclass of tgsi_transform_context, used for transforming the - * user's fragment shader to add the extra texture sample and fragment kill - * instructions. - */ -struct pstip_transform_context { - struct tgsi_transform_context base; - struct tgsi_shader_info info; - uint tempsUsed; /**< bitmask */ - int wincoordInput; - int maxInput; - uint samplersUsed; /**< bitfield of samplers used */ - int freeSampler; /** an available sampler for the pstipple */ - int texTemp; /**< temp registers */ - int numImmed; - boolean firstInstruction; - uint coordOrigin; -}; - - -/** - * TGSI declaration transform callback. - * Track samplers used, temps used, inputs used. - */ -static void -pstip_transform_decl(struct tgsi_transform_context *ctx, - struct tgsi_full_declaration *decl) -{ - struct pstip_transform_context *pctx = - (struct pstip_transform_context *) ctx; - - /* XXX we can use tgsi_shader_info instead of some of this */ - - if (decl->Declaration.File == TGSI_FILE_SAMPLER) { - uint i; - for (i = decl->Range.First; i <= decl->Range.Last; i++) { - pctx->samplersUsed |= 1 << i; - } - } - else if (decl->Declaration.File == TGSI_FILE_INPUT) { - pctx->maxInput = MAX2(pctx->maxInput, (int) decl->Range.Last); - if (decl->Semantic.Name == TGSI_SEMANTIC_POSITION) - pctx->wincoordInput = (int) decl->Range.First; - } - else if (decl->Declaration.File == TGSI_FILE_TEMPORARY) { - uint i; - for (i = decl->Range.First; i <= decl->Range.Last; i++) { - pctx->tempsUsed |= (1 << i); - } - } - - ctx->emit_declaration(ctx, decl); -} - - -static void -pstip_transform_immed(struct tgsi_transform_context *ctx, - struct tgsi_full_immediate *immed) -{ - struct pstip_transform_context *pctx = - (struct pstip_transform_context *) ctx; - pctx->numImmed++; -} - - -/** - * Find the lowest zero bit in the given word, or -1 if bitfield is all ones. - */ -static int -free_bit(uint bitfield) -{ - return ffs(~bitfield) - 1; -} - - -/** - * TGSI instruction transform callback. - * Before the first instruction, insert our new code to sample the - * stipple texture (using the fragment coord register) then kill the - * fragment if the stipple texture bit is off. - * - * Insert: - * declare new registers - * MUL texTemp, INPUT[wincoord], 1/32; - * TEX texTemp, texTemp, sampler; - * KIL -texTemp; # if -texTemp < 0, KILL fragment - * [...original code...] - */ -static void -pstip_transform_inst(struct tgsi_transform_context *ctx, - struct tgsi_full_instruction *inst) -{ - struct pstip_transform_context *pctx = - (struct pstip_transform_context *) ctx; - - if (pctx->firstInstruction) { - /* emit our new declarations before the first instruction */ - - struct tgsi_full_declaration decl; - struct tgsi_full_instruction newInst; - uint i; - int wincoordInput; - - /* find free texture sampler */ - pctx->freeSampler = free_bit(pctx->samplersUsed); - if (pctx->freeSampler >= PIPE_MAX_SAMPLERS) - pctx->freeSampler = PIPE_MAX_SAMPLERS - 1; - - if (pctx->wincoordInput < 0) - wincoordInput = pctx->maxInput + 1; - else - wincoordInput = pctx->wincoordInput; - - /* find one free temp register */ - for (i = 0; i < 32; i++) { - if ((pctx->tempsUsed & (1 << i)) == 0) { - /* found a free temp */ - if (pctx->texTemp < 0) - pctx->texTemp = i; - else - break; - } - } - assert(pctx->texTemp >= 0); - - if (pctx->wincoordInput < 0) { - /* declare new position input reg */ - decl = tgsi_default_full_declaration(); - decl.Declaration.File = TGSI_FILE_INPUT; - decl.Declaration.Interpolate = TGSI_INTERPOLATE_LINEAR; - decl.Declaration.Semantic = 1; - decl.Semantic.Name = TGSI_SEMANTIC_POSITION; - decl.Semantic.Index = 0; - decl.Range.First = - decl.Range.Last = wincoordInput; - ctx->emit_declaration(ctx, &decl); - } - - /* declare new sampler */ - decl = tgsi_default_full_declaration(); - decl.Declaration.File = TGSI_FILE_SAMPLER; - decl.Range.First = - decl.Range.Last = pctx->freeSampler; - ctx->emit_declaration(ctx, &decl); - - /* declare new temp regs */ - decl = tgsi_default_full_declaration(); - decl.Declaration.File = TGSI_FILE_TEMPORARY; - decl.Range.First = - decl.Range.Last = pctx->texTemp; - ctx->emit_declaration(ctx, &decl); - - /* emit immediate = {1/32, 1/32, 1, 1} - * The index/position of this immediate will be pctx->numImmed - */ - { - static const float value[4] = { 1.0/32, 1.0/32, 1.0, 1.0 }; - struct tgsi_full_immediate immed; - uint size = 4; - immed = tgsi_default_full_immediate(); - immed.Immediate.NrTokens = 1 + size; /* one for the token itself */ - immed.u[0].Float = value[0]; - immed.u[1].Float = value[1]; - immed.u[2].Float = value[2]; - immed.u[3].Float = value[3]; - ctx->emit_immediate(ctx, &immed); - } - - pctx->firstInstruction = FALSE; - - - /* - * Insert new MUL/TEX/KILP instructions at start of program - * Take gl_FragCoord, divide by 32 (stipple size), sample the - * texture and kill fragment if needed. - * - * We'd like to use non-normalized texcoords to index into a RECT - * texture, but we can only use REPEAT wrap mode with normalized - * texcoords. Darn. - */ - - /* XXX invert wincoord if origin isn't lower-left... */ - - /* MUL texTemp, INPUT[wincoord], 1/32; */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_MUL; - newInst.Instruction.NumDstRegs = 1; - newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Dst[0].Register.Index = pctx->texTemp; - newInst.Instruction.NumSrcRegs = 2; - newInst.Src[0].Register.File = TGSI_FILE_INPUT; - newInst.Src[0].Register.Index = wincoordInput; - newInst.Src[1].Register.File = TGSI_FILE_IMMEDIATE; - newInst.Src[1].Register.Index = pctx->numImmed; - ctx->emit_instruction(ctx, &newInst); - - /* TEX texTemp, texTemp, sampler; */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_TEX; - newInst.Instruction.NumDstRegs = 1; - newInst.Dst[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Dst[0].Register.Index = pctx->texTemp; - newInst.Instruction.NumSrcRegs = 2; - newInst.Instruction.Texture = TRUE; - newInst.Texture.Texture = TGSI_TEXTURE_2D; - newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[0].Register.Index = pctx->texTemp; - newInst.Src[1].Register.File = TGSI_FILE_SAMPLER; - newInst.Src[1].Register.Index = pctx->freeSampler; - ctx->emit_instruction(ctx, &newInst); - - /* KIL -texTemp; # if -texTemp < 0, KILL fragment */ - newInst = tgsi_default_full_instruction(); - newInst.Instruction.Opcode = TGSI_OPCODE_KIL; - newInst.Instruction.NumDstRegs = 0; - newInst.Instruction.NumSrcRegs = 1; - newInst.Src[0].Register.File = TGSI_FILE_TEMPORARY; - newInst.Src[0].Register.Index = pctx->texTemp; - newInst.Src[0].Register.Negate = 1; - ctx->emit_instruction(ctx, &newInst); - } - - /* emit this instruction */ - ctx->emit_instruction(ctx, inst); -} - - -/** - * Given a fragment shader, return a new fragment shader which - * samples a stipple texture and executes KILL. - */ -struct pipe_shader_state * -util_pstipple_create_fragment_shader(struct pipe_context *pipe, - struct pipe_shader_state *fs, - unsigned *samplerUnitOut) -{ - struct pipe_shader_state *new_fs; - struct pstip_transform_context transform; - const uint newLen = tgsi_num_tokens(fs->tokens) + NUM_NEW_TOKENS; - unsigned i; - - new_fs = MALLOC(sizeof(*new_fs)); - if (!new_fs) - return NULL; - - new_fs->tokens = tgsi_alloc_tokens(newLen); - if (!new_fs->tokens) { - FREE(new_fs); - return NULL; - } - - /* Setup shader transformation info/context. - */ - memset(&transform, 0, sizeof(transform)); - transform.wincoordInput = -1; - transform.maxInput = -1; - transform.texTemp = -1; - transform.firstInstruction = TRUE; - transform.coordOrigin = TGSI_FS_COORD_ORIGIN_UPPER_LEFT; - transform.base.transform_instruction = pstip_transform_inst; - transform.base.transform_declaration = pstip_transform_decl; - transform.base.transform_immediate = pstip_transform_immed; - - tgsi_scan_shader(fs->tokens, &transform.info); - - /* find fragment coordinate origin property */ - for (i = 0; i < transform.info.num_properties; i++) { - if (transform.info.properties[i].name == TGSI_PROPERTY_FS_COORD_ORIGIN) - transform.coordOrigin = transform.info.properties[i].data[0]; - } - - tgsi_transform_shader(fs->tokens, - (struct tgsi_token *) new_fs->tokens, - newLen, &transform.base); - -#if 0 /* DEBUG */ - tgsi_dump(fs->tokens, 0); - tgsi_dump(new_fs->tokens, 0); -#endif - - assert(transform.freeSampler < PIPE_MAX_SAMPLERS); - *samplerUnitOut = transform.freeSampler; - - return new_fs; -} - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_pstipple.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_pstipple.h deleted file mode 100644 index 1c2f5f48af4..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_pstipple.h +++ /dev/null @@ -1,56 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_PSTIPPLE_H -#define U_PSTIPPLE_H - -#include "pipe/p_compiler.h" - -struct pipe_context; -struct pipe_resource; -struct pipe_shader_state; - - -extern struct pipe_resource * -util_pstipple_create_stipple_texture(struct pipe_context *pipe, - const uint32_t pattern[32]); - -extern struct pipe_sampler_view * -util_pstipple_create_sampler_view(struct pipe_context *pipe, - struct pipe_resource *tex); - -extern void * -util_pstipple_create_sampler(struct pipe_context *pipe); - -extern struct pipe_shader_state * -util_pstipple_create_fragment_shader(struct pipe_context *pipe, - struct pipe_shader_state *fs, - unsigned *samplerUnitOut); - - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_rect.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_rect.c deleted file mode 100644 index 59bebbcb7aa..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_rect.c +++ /dev/null @@ -1,165 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * Rectangle-related helper functions. - */ - - -#include "util/u_format.h" -#include "util/u_rect.h" -#include "util/u_pack_color.h" - - -/** - * Copy 2D rect from one place to another. - * Position and sizes are in pixels. - * src_stride may be negative to do vertical flip of pixels from source. - */ -void -util_copy_rect(ubyte * dst, - enum pipe_format format, - unsigned dst_stride, - unsigned dst_x, - unsigned dst_y, - unsigned width, - unsigned height, - const ubyte * src, - int src_stride, - unsigned src_x, - unsigned src_y) -{ - unsigned i; - int src_stride_pos = src_stride < 0 ? -src_stride : src_stride; - int blocksize = util_format_get_blocksize(format); - int blockwidth = util_format_get_blockwidth(format); - int blockheight = util_format_get_blockheight(format); - - assert(blocksize > 0); - assert(blockwidth > 0); - assert(blockheight > 0); - - dst_x /= blockwidth; - dst_y /= blockheight; - width = (width + blockwidth - 1)/blockwidth; - height = (height + blockheight - 1)/blockheight; - src_x /= blockwidth; - src_y /= blockheight; - - dst += dst_x * blocksize; - src += src_x * blocksize; - dst += dst_y * dst_stride; - src += src_y * src_stride_pos; - width *= blocksize; - - if (width == dst_stride && width == src_stride) - memcpy(dst, src, height * width); - else { - for (i = 0; i < height; i++) { - memcpy(dst, src, width); - dst += dst_stride; - src += src_stride; - } - } -} - -void -util_fill_rect(ubyte * dst, - enum pipe_format format, - unsigned dst_stride, - unsigned dst_x, - unsigned dst_y, - unsigned width, - unsigned height, - union util_color *uc) -{ - const struct util_format_description *desc = util_format_description(format); - unsigned i, j; - unsigned width_size; - int blocksize = desc->block.bits / 8; - int blockwidth = desc->block.width; - int blockheight = desc->block.height; - - assert(blocksize > 0); - assert(blockwidth > 0); - assert(blockheight > 0); - - dst_x /= blockwidth; - dst_y /= blockheight; - width = (width + blockwidth - 1)/blockwidth; - height = (height + blockheight - 1)/blockheight; - - dst += dst_x * blocksize; - dst += dst_y * dst_stride; - width_size = width * blocksize; - - switch (blocksize) { - case 1: - if(dst_stride == width_size) - memset(dst, uc->ub, height * width_size); - else { - for (i = 0; i < height; i++) { - memset(dst, uc->ub, width_size); - dst += dst_stride; - } - } - break; - case 2: - for (i = 0; i < height; i++) { - uint16_t *row = (uint16_t *)dst; - for (j = 0; j < width; j++) - *row++ = uc->us; - dst += dst_stride; - } - break; - case 4: - for (i = 0; i < height; i++) { - uint32_t *row = (uint32_t *)dst; - for (j = 0; j < width; j++) - *row++ = uc->ui; - dst += dst_stride; - } - break; - case 8: - case 12: - case 16: - case 24: - case 32: - for (i = 0; i < height; i++) { - ubyte *row = dst; - for (j = 0; j < width; j++) { - memcpy(row, uc, blocksize); - row += blocksize; - } - dst += dst_stride; - } - break; - default: - assert(0); - break; - } -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_rect.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_rect.h deleted file mode 100644 index 4cb90d3c316..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_rect.h +++ /dev/null @@ -1,103 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#ifndef U_RECT_H -#define U_RECT_H - -#include "pipe/p_compiler.h" - -struct u_rect { - int x0, x1; - int y0, y1; -}; - -/* Do two rectangles intersect? - */ -static INLINE boolean -u_rect_test_intersection(const struct u_rect *a, - const struct u_rect *b) -{ - return (!(a->x1 < b->x0 || - b->x1 < a->x0 || - a->y1 < b->y0 || - b->y1 < a->y0)); -} - -/* Find the intersection of two rectangles known to intersect. - */ -static INLINE void -u_rect_find_intersection(const struct u_rect *a, - struct u_rect *b) -{ - /* Caller should verify intersection exists before calling. - */ - if (b->x0 < a->x0) b->x0 = a->x0; - if (b->x1 > a->x1) b->x1 = a->x1; - if (b->y0 < a->y0) b->y0 = a->y0; - if (b->y1 > a->y1) b->y1 = a->y1; -} - - -static INLINE void -u_rect_possible_intersection(const struct u_rect *a, - struct u_rect *b) -{ - if (u_rect_test_intersection(a,b)) { - u_rect_find_intersection(a,b); - } - else { - b->x0 = b->x1 = b->y0 = b->y1 = 0; - } -} - -#include "pipe/p_format.h" -#include "util/u_pack_color.h" - - - -/********************************************************************** - * Pipe copy/fill rect helpers. - */ - -/* These really should move to a different file: - */ -#include "pipe/p_format.h" - -extern void -util_copy_rect(ubyte * dst, enum pipe_format format, - unsigned dst_stride, unsigned dst_x, unsigned dst_y, - unsigned width, unsigned height, const ubyte * src, - int src_stride, unsigned src_x, unsigned src_y); - -extern void -util_fill_rect(ubyte * dst, enum pipe_format format, - unsigned dst_stride, unsigned dst_x, unsigned dst_y, - unsigned width, unsigned height, union util_color *uc); - - -#endif /* U_RECT_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_resource.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_resource.c deleted file mode 100644 index 50a7cd4d55b..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_resource.c +++ /dev/null @@ -1,88 +0,0 @@ - - -#include "util/u_inlines.h" -#include "util/u_transfer.h" - -static INLINE struct u_resource * -u_resource( struct pipe_resource *res ) -{ - return (struct u_resource *)res; -} - -boolean u_resource_get_handle_vtbl(struct pipe_screen *screen, - struct pipe_resource *resource, - struct winsys_handle *handle) -{ - struct u_resource *ur = u_resource(resource); - return ur->vtbl->resource_get_handle(screen, resource, handle); -} - -void u_resource_destroy_vtbl(struct pipe_screen *screen, - struct pipe_resource *resource) -{ - struct u_resource *ur = u_resource(resource); - ur->vtbl->resource_destroy(screen, resource); -} - -struct pipe_transfer *u_get_transfer_vtbl(struct pipe_context *context, - struct pipe_resource *resource, - unsigned level, - unsigned usage, - const struct pipe_box *box) -{ - struct u_resource *ur = u_resource(resource); - return ur->vtbl->get_transfer(context, resource, level, usage, box); -} - -void u_transfer_destroy_vtbl(struct pipe_context *pipe, - struct pipe_transfer *transfer) -{ - struct u_resource *ur = u_resource(transfer->resource); - ur->vtbl->transfer_destroy(pipe, transfer); -} - -void *u_transfer_map_vtbl( struct pipe_context *pipe, - struct pipe_transfer *transfer ) -{ - struct u_resource *ur = u_resource(transfer->resource); - return ur->vtbl->transfer_map(pipe, transfer); -} - -void u_transfer_flush_region_vtbl( struct pipe_context *pipe, - struct pipe_transfer *transfer, - const struct pipe_box *box) -{ - struct u_resource *ur = u_resource(transfer->resource); - ur->vtbl->transfer_flush_region(pipe, transfer, box); -} - -void u_transfer_unmap_vtbl( struct pipe_context *pipe, - struct pipe_transfer *transfer ) -{ - struct u_resource *ur = u_resource(transfer->resource); - ur->vtbl->transfer_unmap(pipe, transfer); -} - -void u_transfer_inline_write_vtbl( struct pipe_context *pipe, - struct pipe_resource *resource, - unsigned level, - unsigned usage, - const struct pipe_box *box, - const void *data, - unsigned stride, - unsigned layer_stride) -{ - struct u_resource *ur = u_resource(resource); - ur->vtbl->transfer_inline_write(pipe, - resource, - level, - usage, - box, - data, - stride, - layer_stride); -} - - - - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_ringbuffer.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_ringbuffer.c deleted file mode 100644 index 648b105b137..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_ringbuffer.c +++ /dev/null @@ -1,160 +0,0 @@ - -#include "os/os_thread.h" -#include "pipe/p_defines.h" -#include "util/u_ringbuffer.h" -#include "util/u_math.h" -#include "util/u_memory.h" - -/* Generic ringbuffer: - */ -struct util_ringbuffer -{ - struct util_packet *buf; - unsigned mask; - - /* Can this be done with atomic variables?? - */ - unsigned head; - unsigned tail; - pipe_condvar change; - pipe_mutex mutex; -}; - - -struct util_ringbuffer *util_ringbuffer_create( unsigned dwords ) -{ - struct util_ringbuffer *ring = CALLOC_STRUCT(util_ringbuffer); - if (ring == NULL) - return NULL; - - assert(util_is_power_of_two(dwords)); - - ring->buf = MALLOC( dwords * sizeof(unsigned) ); - if (ring->buf == NULL) - goto fail; - - ring->mask = dwords - 1; - - pipe_condvar_init(ring->change); - pipe_mutex_init(ring->mutex); - return ring; - -fail: - FREE(ring->buf); - FREE(ring); - return NULL; -} - -void util_ringbuffer_destroy( struct util_ringbuffer *ring ) -{ - pipe_condvar_destroy(ring->change); - pipe_mutex_destroy(ring->mutex); - FREE(ring->buf); - FREE(ring); -} - -/** - * Return number of free entries in the ring - */ -static INLINE unsigned util_ringbuffer_space( const struct util_ringbuffer *ring ) -{ - return (ring->tail - (ring->head + 1)) & ring->mask; -} - -/** - * Is the ring buffer empty? - */ -static INLINE boolean util_ringbuffer_empty( const struct util_ringbuffer *ring ) -{ - return util_ringbuffer_space(ring) == ring->mask; -} - -void util_ringbuffer_enqueue( struct util_ringbuffer *ring, - const struct util_packet *packet ) -{ - unsigned i; - - /* XXX: over-reliance on mutexes, etc: - */ - pipe_mutex_lock(ring->mutex); - - /* make sure we don't request an impossible amount of space - */ - assert(packet->dwords <= ring->mask); - - /* Wait for free space: - */ - while (util_ringbuffer_space(ring) < packet->dwords) - pipe_condvar_wait(ring->change, ring->mutex); - - /* Copy data to ring: - */ - for (i = 0; i < packet->dwords; i++) { - - /* Copy all dwords of the packet. Note we're abusing the - * typesystem a little - we're being passed a pointer to - * something, but probably not an array of packet structs: - */ - ring->buf[ring->head] = packet[i]; - ring->head++; - ring->head &= ring->mask; - } - - /* Signal change: - */ - pipe_condvar_signal(ring->change); - pipe_mutex_unlock(ring->mutex); -} - -enum pipe_error util_ringbuffer_dequeue( struct util_ringbuffer *ring, - struct util_packet *packet, - unsigned max_dwords, - boolean wait ) -{ - const struct util_packet *ring_packet; - unsigned i; - int ret = PIPE_OK; - - /* XXX: over-reliance on mutexes, etc: - */ - pipe_mutex_lock(ring->mutex); - - /* Get next ring entry: - */ - if (wait) { - while (util_ringbuffer_empty(ring)) - pipe_condvar_wait(ring->change, ring->mutex); - } - else { - if (util_ringbuffer_empty(ring)) { - ret = PIPE_ERROR_OUT_OF_MEMORY; - goto out; - } - } - - ring_packet = &ring->buf[ring->tail]; - - /* Both of these are considered bugs. Raise an assert on debug builds. - */ - if (ring_packet->dwords > ring->mask + 1 - util_ringbuffer_space(ring) || - ring_packet->dwords > max_dwords) { - assert(0); - ret = PIPE_ERROR_BAD_INPUT; - goto out; - } - - /* Copy data from ring: - */ - for (i = 0; i < ring_packet->dwords; i++) { - packet[i] = ring->buf[ring->tail]; - ring->tail++; - ring->tail &= ring->mask; - } - -out: - /* Signal change: - */ - pipe_condvar_signal(ring->change); - pipe_mutex_unlock(ring->mutex); - return ret; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_ringbuffer.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_ringbuffer.h deleted file mode 100644 index 85f0ad6c1f6..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_ringbuffer.h +++ /dev/null @@ -1,29 +0,0 @@ - -#ifndef UTIL_RINGBUFFER_H -#define UTIL_RINGBUFFER_H - -#include "pipe/p_compiler.h" -#include "pipe/p_defines.h" /* only for pipe_error! */ - -/* Generic header - */ -struct util_packet { - unsigned dwords:8; - unsigned data24:24; -}; - -struct util_ringbuffer; - -struct util_ringbuffer *util_ringbuffer_create( unsigned dwords ); - -void util_ringbuffer_destroy( struct util_ringbuffer *ring ); - -void util_ringbuffer_enqueue( struct util_ringbuffer *ring, - const struct util_packet *packet ); - -enum pipe_error util_ringbuffer_dequeue( struct util_ringbuffer *ring, - struct util_packet *packet, - unsigned max_dwords, - boolean wait ); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_sampler.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_sampler.c deleted file mode 100644 index 227641bdafc..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_sampler.c +++ /dev/null @@ -1,109 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#include "u_format.h" -#include "u_sampler.h" - - -/** - * Initialize a pipe_sampler_view. 'view' is considered to have - * uninitialized contents. - */ -static void -default_template(struct pipe_sampler_view *view, - const struct pipe_resource *texture, - enum pipe_format format, - unsigned expand_green_blue) -{ - memset(view, 0, sizeof(*view)); - - /* XXX: Check if format is compatible with texture->format. - */ - - view->format = format; - view->u.tex.first_level = 0; - view->u.tex.last_level = texture->last_level; - view->u.tex.first_layer = 0; - view->u.tex.last_layer = texture->target == PIPE_TEXTURE_3D ? - texture->depth0 - 1 : texture->array_size - 1; - view->swizzle_r = PIPE_SWIZZLE_RED; - view->swizzle_g = PIPE_SWIZZLE_GREEN; - view->swizzle_b = PIPE_SWIZZLE_BLUE; - view->swizzle_a = PIPE_SWIZZLE_ALPHA; - - /* Override default green and blue component expansion to the requested - * one. - * - * Gallium expands nonexistent components to (0,0,0,1), DX9 expands - * to (1,1,1,1). Since alpha is always expanded to 1, and red is - * always present, we only really care about green and blue - * components. - * - * To make it look less hackish, one would have to add - * UTIL_FORMAT_SWIZZLE_EXPAND to indicate components for expansion - * and then override without exceptions or favoring one component - * over another. - */ - if (format != PIPE_FORMAT_A8_UNORM) { - const struct util_format_description *desc = util_format_description(format); - - assert(desc); - if (desc) { - if (desc->swizzle[1] == UTIL_FORMAT_SWIZZLE_0) { - view->swizzle_g = expand_green_blue; - } - if (desc->swizzle[2] == UTIL_FORMAT_SWIZZLE_0) { - view->swizzle_b = expand_green_blue; - } - } - } -} - -void -u_sampler_view_default_template(struct pipe_sampler_view *view, - const struct pipe_resource *texture, - enum pipe_format format) -{ - /* Expand to (0, 0, 0, 1) */ - default_template(view, - texture, - format, - PIPE_SWIZZLE_ZERO); -} - -void -u_sampler_view_default_dx9_template(struct pipe_sampler_view *view, - const struct pipe_resource *texture, - enum pipe_format format) -{ - /* Expand to (1, 1, 1, 1) */ - default_template(view, - texture, - format, - PIPE_SWIZZLE_ONE); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_sampler.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_sampler.h deleted file mode 100644 index f3dad7417e0..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_sampler.h +++ /dev/null @@ -1,57 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#ifndef U_SAMPLER_H -#define U_SAMPLER_H - - -#include "pipe/p_defines.h" -#include "pipe/p_format.h" -#include "pipe/p_state.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -void -u_sampler_view_default_template(struct pipe_sampler_view *view, - const struct pipe_resource *texture, - enum pipe_format format); - -void -u_sampler_view_default_dx9_template(struct pipe_sampler_view *view, - const struct pipe_resource *texture, - enum pipe_format format); - - -#ifdef __cplusplus -} /* extern "C" { */ -#endif - -#endif /* U_SAMPLER_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_simple_list.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_simple_list.h deleted file mode 100644 index fe59771371b..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_simple_list.h +++ /dev/null @@ -1,199 +0,0 @@ -/** - * \file simple_list.h - * Simple macros for type-safe, intrusive lists. - * - * Intended to work with a list sentinal which is created as an empty - * list. Insert & delete are O(1). - * - * \author - * (C) 1997, Keith Whitwell - */ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef _U_SIMPLE_LIST_H_ -#define _U_SIMPLE_LIST_H_ - -/** - * Remove an element from list. - * - * \param elem element to remove. - */ -#define remove_from_list(elem) \ -do { \ - (elem)->next->prev = (elem)->prev; \ - (elem)->prev->next = (elem)->next; \ - (elem)->next = elem; \ - (elem)->prev = elem; \ -} while (0) - -/** - * Insert an element to the list head. - * - * \param list list. - * \param elem element to insert. - */ -#define insert_at_head(list, elem) \ -do { \ - (elem)->prev = list; \ - (elem)->next = (list)->next; \ - (list)->next->prev = elem; \ - (list)->next = elem; \ -} while(0) - -/** - * Insert an element to the list tail. - * - * \param list list. - * \param elem element to insert. - */ -#define insert_at_tail(list, elem) \ -do { \ - (elem)->next = list; \ - (elem)->prev = (list)->prev; \ - (list)->prev->next = elem; \ - (list)->prev = elem; \ -} while(0) - -/** - * Move an element to the list head. - * - * \param list list. - * \param elem element to move. - */ -#define move_to_head(list, elem) \ -do { \ - remove_from_list(elem); \ - insert_at_head(list, elem); \ -} while (0) - -/** - * Move an element to the list tail. - * - * \param list list. - * \param elem element to move. - */ -#define move_to_tail(list, elem) \ -do { \ - remove_from_list(elem); \ - insert_at_tail(list, elem); \ -} while (0) - -/** - * Make a empty list empty. - * - * \param sentinal list (sentinal element). - */ -#define make_empty_list(sentinal) \ -do { \ - (sentinal)->next = sentinal; \ - (sentinal)->prev = sentinal; \ -} while (0) - -/** - * Get list first element. - * - * \param list list. - * - * \return pointer to first element. - */ -#define first_elem(list) ((list)->next) - -/** - * Get list last element. - * - * \param list list. - * - * \return pointer to last element. - */ -#define last_elem(list) ((list)->prev) - -/** - * Get next element. - * - * \param elem element. - * - * \return pointer to next element. - */ -#define next_elem(elem) ((elem)->next) - -/** - * Get previous element. - * - * \param elem element. - * - * \return pointer to previous element. - */ -#define prev_elem(elem) ((elem)->prev) - -/** - * Test whether element is at end of the list. - * - * \param list list. - * \param elem element. - * - * \return non-zero if element is at end of list, or zero otherwise. - */ -#define at_end(list, elem) ((elem) == (list)) - -/** - * Test if a list is empty. - * - * \param list list. - * - * \return non-zero if list empty, or zero otherwise. - */ -#define is_empty_list(list) ((list)->next == (list)) - -/** - * Walk through the elements of a list. - * - * \param ptr pointer to the current element. - * \param list list. - * - * \note It should be followed by a { } block or a single statement, as in a \c - * for loop. - */ -#define foreach(ptr, list) \ - for( ptr=(list)->next ; ptr!=list ; ptr=(ptr)->next ) - -/** - * Walk through the elements of a list. - * - * Same as #foreach but lets you unlink the current value during a list - * traversal. Useful for freeing a list, element by element. - * - * \param ptr pointer to the current element. - * \param t temporary pointer. - * \param list list. - * - * \note It should be followed by a { } block or a single statement, as in a \c - * for loop. - */ -#define foreach_s(ptr, t, list) \ - for(ptr=(list)->next,t=(ptr)->next; list != ptr; ptr=t, t=(t)->next) - -#endif /* _U_SIMPLE_LIST_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_simple_screen.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_simple_screen.h deleted file mode 100644 index 7caeb75cd27..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_simple_screen.h +++ /dev/null @@ -1,180 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_SIMPLE_SCREEN_H -#define U_SIMPLE_SCREEN_H - -#include "pipe/p_format.h" - -struct pipe_screen; -struct pipe_fence_handle; -struct pipe_surface; -struct pipe_resource; - -/** - * Gallium3D drivers are (meant to be!) independent of both GL and the - * window system. The window system provides a buffer manager and a - * set of additional hooks for things like command buffer submission, - * etc. - * - * There clearly has to be some agreement between the window system - * driver and the hardware driver about the format of command buffers, - * etc. - */ -struct pipe_winsys -{ - void (*destroy)( struct pipe_winsys *ws ); - - /** Returns name of this winsys interface */ - const char *(*get_name)( struct pipe_winsys *ws ); - - /** - * Do any special operations to ensure frontbuffer contents are - * displayed, eg copy fake frontbuffer. - */ - void (*flush_frontbuffer)( struct pipe_winsys *ws, - struct pipe_resource *resource, - unsigned level, unsigned layer, - void *context_private ); - - - /** - * Buffer management. Buffer attributes are mostly fixed over its lifetime. - * - * Remember that gallium gets to choose the interface it needs, and the - * window systems must then implement that interface (rather than the - * other way around...). - * - * usage is a bitmask of PIPE_BIND_*. - * All possible usages must be present. - * - * alignment indicates the client's alignment requirements, eg for - * SSE instructions. - */ - struct pipe_resource *(*buffer_create)( struct pipe_winsys *ws, - unsigned alignment, - unsigned usage, - unsigned size ); - - /** - * Create a buffer that wraps user-space data. - * - * Effectively this schedules a delayed call to buffer_create - * followed by an upload of the data at *some point in the future*, - * or perhaps never. Basically the allocate/upload is delayed - * until the buffer is actually passed to hardware. - * - * The intention is to provide a quick way to turn regular data - * into a buffer, and secondly to avoid a copy operation if that - * data subsequently turns out to be only accessed by the CPU. - * - * Common example is OpenGL vertex buffers that are subsequently - * processed either by software TNL in the driver or by passing to - * hardware. - * - * XXX: What happens if the delayed call to buffer_create() fails? - * - * Note that ptr may be accessed at any time upto the time when the - * buffer is destroyed, so the data must not be freed before then. - */ - struct pipe_resource *(*user_buffer_create)(struct pipe_winsys *ws, - void *ptr, - unsigned bytes); - - /** - * Allocate storage for a display target surface. - * - * Often surfaces which are meant to be blitted to the front screen (i.e., - * display targets) must be allocated with special characteristics, memory - * pools, or obtained directly from the windowing system. - * - * This callback is invoked by the pipe_screen when creating a texture marked - * with the PIPE_BIND_DISPLAY_TARGET flag to get the underlying - * buffer storage. - */ - struct pipe_resource *(*surface_buffer_create)(struct pipe_winsys *ws, - unsigned width, unsigned height, - enum pipe_format format, - unsigned usage, - unsigned tex_usage, - unsigned *stride); - - - /** - * Map the entire data store of a buffer object into the client's address. - * flags is bitmask of PIPE_BUFFER_USAGE_CPU_READ/WRITE flags. - */ - void *(*buffer_map)( struct pipe_winsys *ws, - struct pipe_resource *buf, - unsigned usage ); - - void (*buffer_unmap)( struct pipe_winsys *ws, - struct pipe_resource *buf ); - - void (*buffer_destroy)( struct pipe_resource *buf ); - - - /** Set ptr = fence, with reference counting */ - void (*fence_reference)( struct pipe_winsys *ws, - struct pipe_fence_handle **ptr, - struct pipe_fence_handle *fence ); - - /** - * Checks whether the fence has been signalled. - * \param flags driver-specific meaning - * \return zero on success. - */ - int (*fence_signalled)( struct pipe_winsys *ws, - struct pipe_fence_handle *fence, - unsigned flag ); - - /** - * Wait for the fence to finish. - * \param flags driver-specific meaning - * \return zero on success. - */ - int (*fence_finish)( struct pipe_winsys *ws, - struct pipe_fence_handle *fence, - unsigned flags, - uint64_t timeout ); - -}; - -/** - * The following function initializes a simple passthrough screen. - * - * All the relevant screen function pointers will forwarded to the - * winsys. - */ -void u_simple_screen_init(struct pipe_screen *screen); - -/** - * Returns the name of the winsys associated with this screen. - */ -const char* u_simple_screen_winsys_name(struct pipe_screen *screen); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_simple_shaders.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_simple_shaders.c deleted file mode 100644 index 320c0f7a830..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_simple_shaders.c +++ /dev/null @@ -1,255 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * Copyright 2009 Marek Olšák - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Simple vertex/fragment shader generators. - * - * @author Brian Paul - Marek Olšák - */ - - -#include "pipe/p_context.h" -#include "pipe/p_shader_tokens.h" -#include "pipe/p_state.h" -#include "util/u_simple_shaders.h" -#include "util/u_debug.h" -#include "tgsi/tgsi_ureg.h" - - - -/** - * Make simple vertex pass-through shader. - * \param num_attribs number of attributes to pass through - * \param semantic_names array of semantic names for each attribute - * \param semantic_indexes array of semantic indexes for each attribute - */ -void * -util_make_vertex_passthrough_shader(struct pipe_context *pipe, - uint num_attribs, - const uint *semantic_names, - const uint *semantic_indexes) -{ - return util_make_vertex_passthrough_shader_with_so(pipe, num_attribs, - semantic_names, - semantic_indexes, NULL); -} - -void * -util_make_vertex_passthrough_shader_with_so(struct pipe_context *pipe, - uint num_attribs, - const uint *semantic_names, - const uint *semantic_indexes, - const struct pipe_stream_output_info *so) -{ - struct ureg_program *ureg; - uint i; - - ureg = ureg_create( TGSI_PROCESSOR_VERTEX ); - if (ureg == NULL) - return NULL; - - for (i = 0; i < num_attribs; i++) { - struct ureg_src src; - struct ureg_dst dst; - - src = ureg_DECL_vs_input( ureg, i ); - - dst = ureg_DECL_output( ureg, - semantic_names[i], - semantic_indexes[i]); - - ureg_MOV( ureg, dst, src ); - } - - ureg_END( ureg ); - - return ureg_create_shader_with_so_and_destroy( ureg, pipe, so ); -} - - -/** - * Make simple fragment texture shader: - * IMM {0,0,0,1} // (if writemask != 0xf) - * MOV OUT[0], IMM[0] // (if writemask != 0xf) - * TEX OUT[0].writemask, IN[0], SAMP[0], 2D; - * END; - * - * \param tex_target one of PIPE_TEXTURE_x - * \parma interp_mode either TGSI_INTERPOLATE_LINEAR or PERSPECTIVE - * \param writemask mask of TGSI_WRITEMASK_x - */ -void * -util_make_fragment_tex_shader_writemask(struct pipe_context *pipe, - unsigned tex_target, - unsigned interp_mode, - unsigned writemask ) -{ - struct ureg_program *ureg; - struct ureg_src sampler; - struct ureg_src tex; - struct ureg_dst out; - - assert(interp_mode == TGSI_INTERPOLATE_LINEAR || - interp_mode == TGSI_INTERPOLATE_PERSPECTIVE); - - ureg = ureg_create( TGSI_PROCESSOR_FRAGMENT ); - if (ureg == NULL) - return NULL; - - sampler = ureg_DECL_sampler( ureg, 0 ); - - tex = ureg_DECL_fs_input( ureg, - TGSI_SEMANTIC_GENERIC, 0, - interp_mode ); - - out = ureg_DECL_output( ureg, - TGSI_SEMANTIC_COLOR, - 0 ); - - if (writemask != TGSI_WRITEMASK_XYZW) { - struct ureg_src imm = ureg_imm4f( ureg, 0, 0, 0, 1 ); - - ureg_MOV( ureg, out, imm ); - } - - ureg_TEX( ureg, - ureg_writemask(out, writemask), - tex_target, tex, sampler ); - ureg_END( ureg ); - - return ureg_create_shader_and_destroy( ureg, pipe ); -} - - -/** - * Make a simple fragment shader that sets the output color to a color - * taken from a texture. - * \param tex_target one of PIPE_TEXTURE_x - */ -void * -util_make_fragment_tex_shader(struct pipe_context *pipe, unsigned tex_target, - unsigned interp_mode) -{ - return util_make_fragment_tex_shader_writemask( pipe, - tex_target, - interp_mode, - TGSI_WRITEMASK_XYZW ); -} - - -/** - * Make a simple fragment texture shader which reads an X component from - * a texture and writes it as depth. - */ -void * -util_make_fragment_tex_shader_writedepth(struct pipe_context *pipe, - unsigned tex_target, - unsigned interp_mode) -{ - struct ureg_program *ureg; - struct ureg_src sampler; - struct ureg_src tex; - struct ureg_dst out, depth; - struct ureg_src imm; - - ureg = ureg_create( TGSI_PROCESSOR_FRAGMENT ); - if (ureg == NULL) - return NULL; - - sampler = ureg_DECL_sampler( ureg, 0 ); - - tex = ureg_DECL_fs_input( ureg, - TGSI_SEMANTIC_GENERIC, 0, - interp_mode ); - - out = ureg_DECL_output( ureg, - TGSI_SEMANTIC_COLOR, - 0 ); - - depth = ureg_DECL_output( ureg, - TGSI_SEMANTIC_POSITION, - 0 ); - - imm = ureg_imm4f( ureg, 0, 0, 0, 1 ); - - ureg_MOV( ureg, out, imm ); - - ureg_TEX( ureg, - ureg_writemask(depth, TGSI_WRITEMASK_Z), - tex_target, tex, sampler ); - ureg_END( ureg ); - - return ureg_create_shader_and_destroy( ureg, pipe ); -} - - -/** - * Make simple fragment color pass-through shader. - */ -void * -util_make_fragment_passthrough_shader(struct pipe_context *pipe) -{ - return util_make_fragment_cloneinput_shader(pipe, 1, TGSI_SEMANTIC_COLOR, - TGSI_INTERPOLATE_PERSPECTIVE); -} - - -/** - * Make a fragment shader that copies the input color to N output colors. - */ -void * -util_make_fragment_cloneinput_shader(struct pipe_context *pipe, int num_cbufs, - int input_semantic, - int input_interpolate) -{ - struct ureg_program *ureg; - struct ureg_src src; - struct ureg_dst dst[PIPE_MAX_COLOR_BUFS]; - int i; - - assert(num_cbufs <= PIPE_MAX_COLOR_BUFS); - - ureg = ureg_create( TGSI_PROCESSOR_FRAGMENT ); - if (ureg == NULL) - return NULL; - - src = ureg_DECL_fs_input( ureg, input_semantic, 0, - input_interpolate ); - - for (i = 0; i < num_cbufs; i++) - dst[i] = ureg_DECL_output( ureg, TGSI_SEMANTIC_COLOR, i ); - - for (i = 0; i < num_cbufs; i++) - ureg_MOV( ureg, dst[i], src ); - - ureg_END( ureg ); - - return ureg_create_shader_and_destroy( ureg, pipe ); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_simple_shaders.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_simple_shaders.h deleted file mode 100644 index 5f31b72c4d7..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_simple_shaders.h +++ /dev/null @@ -1,91 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#ifndef U_SIMPLE_SHADERS_H -#define U_SIMPLE_SHADERS_H - - -#include "pipe/p_compiler.h" - - -struct pipe_context; -struct pipe_shader_state; -struct pipe_stream_output_info; - - -#ifdef __cplusplus -extern "C" { -#endif - - -extern void * -util_make_vertex_passthrough_shader(struct pipe_context *pipe, - uint num_attribs, - const uint *semantic_names, - const uint *semantic_indexes); - -extern void * -util_make_vertex_passthrough_shader_with_so(struct pipe_context *pipe, - uint num_attribs, - const uint *semantic_names, - const uint *semantic_indexes, - const struct pipe_stream_output_info *so); - - -extern void * -util_make_fragment_tex_shader_writemask(struct pipe_context *pipe, - unsigned tex_target, - unsigned interp_mode, - unsigned writemask); - -extern void * -util_make_fragment_tex_shader(struct pipe_context *pipe, unsigned tex_target, - unsigned interp_mode); - - -extern void * -util_make_fragment_tex_shader_writedepth(struct pipe_context *pipe, - unsigned tex_target, - unsigned interp_mode); - - -extern void * -util_make_fragment_passthrough_shader(struct pipe_context *pipe); - - -extern void * -util_make_fragment_cloneinput_shader(struct pipe_context *pipe, int num_cbufs, - int input_semantic, - int input_interpolate); - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_slab.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_slab.c deleted file mode 100644 index 21bf2d735ac..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_slab.c +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright 2010 Marek Olšák - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#include "util/u_slab.h" - -#include "util/u_math.h" -#include "util/u_memory.h" -#include "util/u_simple_list.h" - -#include - -#define UTIL_SLAB_MAGIC 0xcafe4321 - -/* The block is either allocated memory or free space. */ -struct util_slab_block { - /* The header. */ - /* The first next free block. */ - struct util_slab_block *next_free; - - intptr_t magic; - - /* Memory after the last member is dedicated to the block itself. - * The allocated size is always larger than this structure. */ -}; - -static struct util_slab_block * -util_slab_get_block(struct util_slab_mempool *pool, - struct util_slab_page *page, unsigned index) -{ - return (struct util_slab_block*) - ((uint8_t*)page + sizeof(struct util_slab_page) + - (pool->block_size * index)); -} - -static void util_slab_add_new_page(struct util_slab_mempool *pool) -{ - struct util_slab_page *page; - struct util_slab_block *block; - int i; - - page = MALLOC(pool->page_size); - insert_at_tail(&pool->list, page); - - /* Mark all blocks as free. */ - for (i = 0; i < pool->num_blocks-1; i++) { - block = util_slab_get_block(pool, page, i); - block->next_free = util_slab_get_block(pool, page, i+1); - block->magic = UTIL_SLAB_MAGIC; - } - - block = util_slab_get_block(pool, page, pool->num_blocks-1); - block->next_free = pool->first_free; - block->magic = UTIL_SLAB_MAGIC; - pool->first_free = util_slab_get_block(pool, page, 0); - pool->num_pages++; - -#if 0 - fprintf(stderr, "New page! Num of pages: %i\n", pool->num_pages); -#endif -} - -static void *util_slab_alloc_st(struct util_slab_mempool *pool) -{ - struct util_slab_block *block; - - if (!pool->first_free) - util_slab_add_new_page(pool); - - block = pool->first_free; - assert(block->magic == UTIL_SLAB_MAGIC); - pool->first_free = block->next_free; - - return (uint8_t*)block + sizeof(struct util_slab_block); -} - -static void util_slab_free_st(struct util_slab_mempool *pool, void *ptr) -{ - struct util_slab_block *block = - (struct util_slab_block*) - ((uint8_t*)ptr - sizeof(struct util_slab_block)); - - assert(block->magic == UTIL_SLAB_MAGIC); - block->next_free = pool->first_free; - pool->first_free = block; -} - -static void *util_slab_alloc_mt(struct util_slab_mempool *pool) -{ - void *mem; - - pipe_mutex_lock(pool->mutex); - mem = util_slab_alloc_st(pool); - pipe_mutex_unlock(pool->mutex); - return mem; -} - -static void util_slab_free_mt(struct util_slab_mempool *pool, void *ptr) -{ - pipe_mutex_lock(pool->mutex); - util_slab_free_st(pool, ptr); - pipe_mutex_unlock(pool->mutex); -} - -void util_slab_set_thread_safety(struct util_slab_mempool *pool, - enum util_slab_threading threading) -{ - pool->threading = threading; - - if (threading) { - pool->alloc = util_slab_alloc_mt; - pool->free = util_slab_free_mt; - } else { - pool->alloc = util_slab_alloc_st; - pool->free = util_slab_free_st; - } -} - -void util_slab_create(struct util_slab_mempool *pool, - unsigned item_size, - unsigned num_blocks, - enum util_slab_threading threading) -{ - item_size = align(item_size, sizeof(intptr_t)); - - pool->num_pages = 0; - pool->num_blocks = num_blocks; - pool->block_size = sizeof(struct util_slab_block) + item_size; - pool->block_size = align(pool->block_size, sizeof(intptr_t)); - pool->page_size = sizeof(struct util_slab_page) + - num_blocks * pool->block_size; - pool->first_free = NULL; - - make_empty_list(&pool->list); - - pipe_mutex_init(pool->mutex); - - util_slab_set_thread_safety(pool, threading); -} - -void util_slab_destroy(struct util_slab_mempool *pool) -{ - struct util_slab_page *page, *temp; - - foreach_s(page, temp, &pool->list) { - remove_from_list(page); - FREE(page); - } - - pipe_mutex_destroy(pool->mutex); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_slab.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_slab.h deleted file mode 100644 index 6b9718d08a7..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_slab.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2010 Marek Olšák - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -/** - * @file - * Simple slab allocator for equally sized memory allocations. - * util_slab_alloc and util_slab_free have time complexity in O(1). - * - * Good for allocations which have very low lifetime and are allocated - * and freed very often. Use a profiler first to know if it's worth using it! - * - * Candidates: get_transfer, user_buffer_create - * - * @author Marek Olšák - */ - -#ifndef U_SLAB_H -#define U_SLAB_H - -#include "os/os_thread.h" - -enum util_slab_threading { - UTIL_SLAB_SINGLETHREADED = FALSE, - UTIL_SLAB_MULTITHREADED = TRUE -}; - -/* The page is an array of blocks (allocations). */ -struct util_slab_page { - /* The header (linked-list pointers). */ - struct util_slab_page *prev, *next; - - /* Memory after the last member is dedicated to the page itself. - * The allocated size is always larger than this structure. */ -}; - -struct util_slab_mempool { - /* Public members. */ - void *(*alloc)(struct util_slab_mempool *pool); - void (*free)(struct util_slab_mempool *pool, void *ptr); - - /* Private members. */ - struct util_slab_block *first_free; - - struct util_slab_page list; - - unsigned block_size; - unsigned page_size; - unsigned num_blocks; - unsigned num_pages; - enum util_slab_threading threading; - - pipe_mutex mutex; -}; - -void util_slab_create(struct util_slab_mempool *pool, - unsigned item_size, - unsigned num_blocks, - enum util_slab_threading threading); - -void util_slab_destroy(struct util_slab_mempool *pool); - -void util_slab_set_thread_safety(struct util_slab_mempool *pool, - enum util_slab_threading threading); - -#define util_slab_alloc(pool) (pool)->alloc(pool) -#define util_slab_free(pool, ptr) (pool)->free(pool, ptr) - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_snprintf.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_snprintf.c deleted file mode 100644 index f0d53b3cecd..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_snprintf.c +++ /dev/null @@ -1,1489 +0,0 @@ -/* - * Copyright (c) 1995 Patrick Powell. - * - * This code is based on code written by Patrick Powell . - * It may be used for any purpose as long as this notice remains intact on all - * source code distributions. - */ - -/* - * Copyright (c) 2008 Holger Weiss. - * - * This version of the code is maintained by Holger Weiss . - * My changes to the code may freely be used, modified and/or redistributed for - * any purpose. It would be nice if additions and fixes to this file (including - * trivial code cleanups) would be sent back in order to let me include them in - * the version available at . - * However, this is not a requirement for using or redistributing (possibly - * modified) versions of this file, nor is leaving this notice intact mandatory. - */ - -/* - * History - * - * 2008-01-20 Holger Weiss for C99-snprintf 1.1: - * - * Fixed the detection of infinite floating point values on IRIX (and - * possibly other systems) and applied another few minor cleanups. - * - * 2008-01-06 Holger Weiss for C99-snprintf 1.0: - * - * Added a lot of new features, fixed many bugs, and incorporated various - * improvements done by Andrew Tridgell , Russ Allbery - * , Hrvoje Niksic , Damien Miller - * , and others for the Samba, INN, Wget, and OpenSSH - * projects. The additions include: support the "e", "E", "g", "G", and - * "F" conversion specifiers (and use conversion style "f" or "F" for the - * still unsupported "a" and "A" specifiers); support the "hh", "ll", "j", - * "t", and "z" length modifiers; support the "#" flag and the (non-C99) - * "'" flag; use localeconv(3) (if available) to get both the current - * locale's decimal point character and the separator between groups of - * digits; fix the handling of various corner cases of field width and - * precision specifications; fix various floating point conversion bugs; - * handle infinite and NaN floating point values; don't attempt to write to - * the output buffer (which may be NULL) if a size of zero was specified; - * check for integer overflow of the field width, precision, and return - * values and during the floating point conversion; use the OUTCHAR() macro - * instead of a function for better performance; provide asprintf(3) and - * vasprintf(3) functions; add new test cases. The replacement functions - * have been renamed to use an "rpl_" prefix, the function calls in the - * main project (and in this file) must be redefined accordingly for each - * replacement function which is needed (by using Autoconf or other means). - * Various other minor improvements have been applied and the coding style - * was cleaned up for consistency. - * - * 2007-07-23 Holger Weiss for Mutt 1.5.13: - * - * C99 compliant snprintf(3) and vsnprintf(3) functions return the number - * of characters that would have been written to a sufficiently sized - * buffer (excluding the '\0'). The original code simply returned the - * length of the resulting output string, so that's been fixed. - * - * 1998-03-05 Michael Elkins for Mutt 0.90.8: - * - * The original code assumed that both snprintf(3) and vsnprintf(3) were - * missing. Some systems only have snprintf(3) but not vsnprintf(3), so - * the code is now broken down under HAVE_SNPRINTF and HAVE_VSNPRINTF. - * - * 1998-01-27 Thomas Roessler for Mutt 0.89i: - * - * The PGP code was using unsigned hexadecimal formats. Unfortunately, - * unsigned formats simply didn't work. - * - * 1997-10-22 Brandon Long for Mutt 0.87.1: - * - * Ok, added some minimal floating point support, which means this probably - * requires libm on most operating systems. Don't yet support the exponent - * (e,E) and sigfig (g,G). Also, fmtint() was pretty badly broken, it just - * wasn't being exercised in ways which showed it, so that's been fixed. - * Also, formatted the code to Mutt conventions, and removed dead code left - * over from the original. Also, there is now a builtin-test, run with: - * gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm && ./snprintf - * - * 2996-09-15 Brandon Long for Mutt 0.43: - * - * This was ugly. It is still ugly. I opted out of floating point - * numbers, but the formatter understands just about everything from the - * normal C string format, at least as far as I can tell from the Solaris - * 2.5 printf(3S) man page. - */ - -/* - * ToDo - * - * - Add wide character support. - * - Add support for "%a" and "%A" conversions. - * - Create test routines which predefine the expected results. Our test cases - * usually expose bugs in system implementations rather than in ours :-) - */ - -/* - * Usage - * - * 1) The following preprocessor macros should be defined to 1 if the feature or - * file in question is available on the target system (by using Autoconf or - * other means), though basic functionality should be available as long as - * HAVE_STDARG_H and HAVE_STDLIB_H are defined correctly: - * - * HAVE_VSNPRINTF - * HAVE_SNPRINTF - * HAVE_VASPRINTF - * HAVE_ASPRINTF - * HAVE_STDARG_H - * HAVE_STDDEF_H - * HAVE_STDINT_H - * HAVE_STDLIB_H - * HAVE_INTTYPES_H - * HAVE_LOCALE_H - * HAVE_LOCALECONV - * HAVE_LCONV_DECIMAL_POINT - * HAVE_LCONV_THOUSANDS_SEP - * HAVE_LONG_DOUBLE - * HAVE_LONG_LONG_INT - * HAVE_UNSIGNED_LONG_LONG_INT - * HAVE_INTMAX_T - * HAVE_UINTMAX_T - * HAVE_UINTPTR_T - * HAVE_PTRDIFF_T - * HAVE_VA_COPY - * HAVE___VA_COPY - * - * 2) The calls to the functions which should be replaced must be redefined - * throughout the project files (by using Autoconf or other means): - * - * #define vsnprintf rpl_vsnprintf - * #define snprintf rpl_snprintf - * #define vasprintf rpl_vasprintf - * #define asprintf rpl_asprintf - * - * 3) The required replacement functions should be declared in some header file - * included throughout the project files: - * - * #if HAVE_CONFIG_H - * #include - * #endif - * #if HAVE_STDARG_H - * #include - * #if !HAVE_VSNPRINTF - * int rpl_vsnprintf(char *, size_t, const char *, va_list); - * #endif - * #if !HAVE_SNPRINTF - * int rpl_snprintf(char *, size_t, const char *, ...); - * #endif - * #if !HAVE_VASPRINTF - * int rpl_vasprintf(char **, const char *, va_list); - * #endif - * #if !HAVE_ASPRINTF - * int rpl_asprintf(char **, const char *, ...); - * #endif - * #endif - * - * Autoconf macros for handling step 1 and step 2 are available at - * . - */ - -#include "pipe/p_config.h" - -#if HAVE_CONFIG_H -#include -#else -#ifdef WIN32 -#define vsnprintf util_vsnprintf -#define snprintf util_snprintf -#define HAVE_VSNPRINTF 0 -#define HAVE_SNPRINTF 0 -#define HAVE_VASPRINTF 1 /* not needed */ -#define HAVE_ASPRINTF 1 /* not needed */ -#define HAVE_STDARG_H 1 -#define HAVE_STDDEF_H 1 -#define HAVE_STDINT_H 0 -#define HAVE_STDLIB_H 1 -#define HAVE_INTTYPES_H 0 -#define HAVE_LOCALE_H 0 -#define HAVE_LOCALECONV 0 -#define HAVE_LCONV_DECIMAL_POINT 0 -#define HAVE_LCONV_THOUSANDS_SEP 0 -#define HAVE_LONG_DOUBLE 0 -#define HAVE_LONG_LONG_INT 1 -#define HAVE_UNSIGNED_LONG_LONG_INT 1 -#define HAVE_INTMAX_T 0 -#define HAVE_UINTMAX_T 0 -#define HAVE_UINTPTR_T 1 -#define HAVE_PTRDIFF_T 1 -#define HAVE_VA_COPY 0 -#define HAVE___VA_COPY 0 -#else -#define HAVE_VSNPRINTF 1 -#define HAVE_SNPRINTF 1 -#define HAVE_VASPRINTF 1 -#define HAVE_ASPRINTF 1 -#endif -#endif /* HAVE_CONFIG_H */ - -#if !HAVE_SNPRINTF || !HAVE_VSNPRINTF || !HAVE_ASPRINTF || !HAVE_VASPRINTF -#include /* For NULL, size_t, vsnprintf(3), and vasprintf(3). */ -#ifdef VA_START -#undef VA_START -#endif /* defined(VA_START) */ -#ifdef VA_SHIFT -#undef VA_SHIFT -#endif /* defined(VA_SHIFT) */ -#if HAVE_STDARG_H -#include -#define VA_START(ap, last) va_start(ap, last) -#define VA_SHIFT(ap, value, type) /* No-op for ANSI C. */ -#else /* Assume is available. */ -#include -#define VA_START(ap, last) va_start(ap) /* "last" is ignored. */ -#define VA_SHIFT(ap, value, type) value = va_arg(ap, type) -#endif /* HAVE_STDARG_H */ - -#if !HAVE_VASPRINTF -#if HAVE_STDLIB_H -#include /* For malloc(3). */ -#endif /* HAVE_STDLIB_H */ -#ifdef VA_COPY -#undef VA_COPY -#endif /* defined(VA_COPY) */ -#ifdef VA_END_COPY -#undef VA_END_COPY -#endif /* defined(VA_END_COPY) */ -#if HAVE_VA_COPY -#define VA_COPY(dest, src) va_copy(dest, src) -#define VA_END_COPY(ap) va_end(ap) -#elif HAVE___VA_COPY -#define VA_COPY(dest, src) __va_copy(dest, src) -#define VA_END_COPY(ap) va_end(ap) -#else -#define VA_COPY(dest, src) (void)mymemcpy(&dest, &src, sizeof(va_list)) -#define VA_END_COPY(ap) /* No-op. */ -#define NEED_MYMEMCPY 1 -static void *mymemcpy(void *, void *, size_t); -#endif /* HAVE_VA_COPY */ -#endif /* !HAVE_VASPRINTF */ - -#if !HAVE_VSNPRINTF -#include /* For *_MAX. */ -#if HAVE_INTTYPES_H -#include /* For intmax_t (if not defined in ). */ -#endif /* HAVE_INTTYPES_H */ -#if HAVE_LOCALE_H -#include /* For localeconv(3). */ -#endif /* HAVE_LOCALE_H */ -#if HAVE_STDDEF_H -#include /* For ptrdiff_t. */ -#endif /* HAVE_STDDEF_H */ -#if HAVE_STDINT_H -#include /* For intmax_t. */ -#endif /* HAVE_STDINT_H */ - -/* Support for unsigned long long int. We may also need ULLONG_MAX. */ -#ifndef ULONG_MAX /* We may need ULONG_MAX as a fallback. */ -#ifdef UINT_MAX -#define ULONG_MAX UINT_MAX -#else -#define ULONG_MAX INT_MAX -#endif /* defined(UINT_MAX) */ -#endif /* !defined(ULONG_MAX) */ -#ifdef ULLONG -#undef ULLONG -#endif /* defined(ULLONG) */ -#if HAVE_UNSIGNED_LONG_LONG_INT -#define ULLONG unsigned long long int -#ifndef ULLONG_MAX -#define ULLONG_MAX ULONG_MAX -#endif /* !defined(ULLONG_MAX) */ -#else -#define ULLONG unsigned long int -#ifdef ULLONG_MAX -#undef ULLONG_MAX -#endif /* defined(ULLONG_MAX) */ -#define ULLONG_MAX ULONG_MAX -#endif /* HAVE_LONG_LONG_INT */ - -/* Support for uintmax_t. We also need UINTMAX_MAX. */ -#ifdef UINTMAX_T -#undef UINTMAX_T -#endif /* defined(UINTMAX_T) */ -#if HAVE_UINTMAX_T || defined(uintmax_t) -#define UINTMAX_T uintmax_t -#ifndef UINTMAX_MAX -#define UINTMAX_MAX ULLONG_MAX -#endif /* !defined(UINTMAX_MAX) */ -#else -#define UINTMAX_T ULLONG -#ifdef UINTMAX_MAX -#undef UINTMAX_MAX -#endif /* defined(UINTMAX_MAX) */ -#define UINTMAX_MAX ULLONG_MAX -#endif /* HAVE_UINTMAX_T || defined(uintmax_t) */ - -/* Support for long double. */ -#ifndef LDOUBLE -#if HAVE_LONG_DOUBLE -#define LDOUBLE long double -#else -#define LDOUBLE double -#endif /* HAVE_LONG_DOUBLE */ -#endif /* !defined(LDOUBLE) */ - -/* Support for long long int. */ -#ifndef LLONG -#if HAVE_LONG_LONG_INT -#define LLONG long long int -#else -#define LLONG long int -#endif /* HAVE_LONG_LONG_INT */ -#endif /* !defined(LLONG) */ - -/* Support for intmax_t. */ -#ifndef INTMAX_T -#if HAVE_INTMAX_T || defined(intmax_t) -#define INTMAX_T intmax_t -#else -#define INTMAX_T LLONG -#endif /* HAVE_INTMAX_T || defined(intmax_t) */ -#endif /* !defined(INTMAX_T) */ - -/* Support for uintptr_t. */ -#ifndef UINTPTR_T -#if HAVE_UINTPTR_T || defined(uintptr_t) -#define UINTPTR_T uintptr_t -#else -#define UINTPTR_T unsigned long int -#endif /* HAVE_UINTPTR_T || defined(uintptr_t) */ -#endif /* !defined(UINTPTR_T) */ - -/* WinCE5.0 does not have uintptr_t defined */ -#if (_WIN32_WCE < 600) -#ifdef UINTPTR_T -#undef UINTPTR_T -#endif -#define UINTPTR_T unsigned long int -#endif - - -/* Support for ptrdiff_t. */ -#ifndef PTRDIFF_T -#if HAVE_PTRDIFF_T || defined(ptrdiff_t) -#define PTRDIFF_T ptrdiff_t -#else -#define PTRDIFF_T long int -#endif /* HAVE_PTRDIFF_T || defined(ptrdiff_t) */ -#endif /* !defined(PTRDIFF_T) */ - -/* - * We need an unsigned integer type corresponding to ptrdiff_t (cf. C99: - * 7.19.6.1, 7). However, we'll simply use PTRDIFF_T and convert it to an - * unsigned type if necessary. This should work just fine in practice. - */ -#ifndef UPTRDIFF_T -#define UPTRDIFF_T PTRDIFF_T -#endif /* !defined(UPTRDIFF_T) */ - -/* - * We need a signed integer type corresponding to size_t (cf. C99: 7.19.6.1, 7). - * However, we'll simply use size_t and convert it to a signed type if - * necessary. This should work just fine in practice. - */ -#ifndef SSIZE_T -#define SSIZE_T size_t -#endif /* !defined(SSIZE_T) */ - -/* Either ERANGE or E2BIG should be available everywhere. */ -#ifndef ERANGE -#define ERANGE E2BIG -#endif /* !defined(ERANGE) */ -#ifndef EOVERFLOW -#define EOVERFLOW ERANGE -#endif /* !defined(EOVERFLOW) */ - -/* - * Buffer size to hold the octal string representation of UINT128_MAX without - * nul-termination ("3777777777777777777777777777777777777777777"). - */ -#ifdef MAX_CONVERT_LENGTH -#undef MAX_CONVERT_LENGTH -#endif /* defined(MAX_CONVERT_LENGTH) */ -#define MAX_CONVERT_LENGTH 43 - -/* Format read states. */ -#define PRINT_S_DEFAULT 0 -#define PRINT_S_FLAGS 1 -#define PRINT_S_WIDTH 2 -#define PRINT_S_DOT 3 -#define PRINT_S_PRECISION 4 -#define PRINT_S_MOD 5 -#define PRINT_S_CONV 6 - -/* Format flags. */ -#define PRINT_F_MINUS (1 << 0) -#define PRINT_F_PLUS (1 << 1) -#define PRINT_F_SPACE (1 << 2) -#define PRINT_F_NUM (1 << 3) -#define PRINT_F_ZERO (1 << 4) -#define PRINT_F_QUOTE (1 << 5) -#define PRINT_F_UP (1 << 6) -#define PRINT_F_UNSIGNED (1 << 7) -#define PRINT_F_TYPE_G (1 << 8) -#define PRINT_F_TYPE_E (1 << 9) - -/* Conversion flags. */ -#define PRINT_C_CHAR 1 -#define PRINT_C_SHORT 2 -#define PRINT_C_LONG 3 -#define PRINT_C_LLONG 4 -#define PRINT_C_LDOUBLE 5 -#define PRINT_C_SIZE 6 -#define PRINT_C_PTRDIFF 7 -#define PRINT_C_INTMAX 8 - -#ifndef MAX -#define MAX(x, y) ((x >= y) ? x : y) -#endif /* !defined(MAX) */ -#ifndef CHARTOINT -#define CHARTOINT(ch) (ch - '0') -#endif /* !defined(CHARTOINT) */ -#ifndef ISDIGIT -#define ISDIGIT(ch) ('0' <= (unsigned char)ch && (unsigned char)ch <= '9') -#endif /* !defined(ISDIGIT) */ -#ifndef ISNAN -#define ISNAN(x) (x != x) -#endif /* !defined(ISNAN) */ -#ifndef ISINF -#define ISINF(x) (x != 0.0 && x + x == x) -#endif /* !defined(ISINF) */ - -#ifdef OUTCHAR -#undef OUTCHAR -#endif /* defined(OUTCHAR) */ -#define OUTCHAR(str, len, size, ch) \ -do { \ - if (len + 1 < size) \ - str[len] = ch; \ - (len)++; \ -} while (/* CONSTCOND */ 0) - -static void fmtstr(char *, size_t *, size_t, const char *, int, int, int); -static void fmtint(char *, size_t *, size_t, INTMAX_T, int, int, int, int); -static void fmtflt(char *, size_t *, size_t, LDOUBLE, int, int, int, int *); -static void printsep(char *, size_t *, size_t); -static int getnumsep(int); -static int getexponent(LDOUBLE); -static int convert(UINTMAX_T, char *, size_t, int, int); -static UINTMAX_T cast(LDOUBLE); -static UINTMAX_T myround(LDOUBLE); -static LDOUBLE mypow10(int); - -int -util_vsnprintf(char *str, size_t size, const char *format, va_list args) -{ - LDOUBLE fvalue; - INTMAX_T value; - unsigned char cvalue; - const char *strvalue; - INTMAX_T *intmaxptr; - PTRDIFF_T *ptrdiffptr; - SSIZE_T *sizeptr; - LLONG *llongptr; - long int *longptr; - int *intptr; - short int *shortptr; - signed char *charptr; - size_t len = 0; - int overflow = 0; - int base = 0; - int cflags = 0; - int flags = 0; - int width = 0; - int precision = -1; - int state = PRINT_S_DEFAULT; - char ch = *format++; - - /* - * C99 says: "If `n' is zero, nothing is written, and `s' may be a null - * pointer." (7.19.6.5, 2) We're forgiving and allow a NULL pointer - * even if a size larger than zero was specified. At least NetBSD's - * snprintf(3) does the same, as well as other versions of this file. - * (Though some of these versions will write to a non-NULL buffer even - * if a size of zero was specified, which violates the standard.) - */ - if (str == NULL && size != 0) - size = 0; - - while (ch != '\0') - switch (state) { - case PRINT_S_DEFAULT: - if (ch == '%') - state = PRINT_S_FLAGS; - else - OUTCHAR(str, len, size, ch); - ch = *format++; - break; - case PRINT_S_FLAGS: - switch (ch) { - case '-': - flags |= PRINT_F_MINUS; - ch = *format++; - break; - case '+': - flags |= PRINT_F_PLUS; - ch = *format++; - break; - case ' ': - flags |= PRINT_F_SPACE; - ch = *format++; - break; - case '#': - flags |= PRINT_F_NUM; - ch = *format++; - break; - case '0': - flags |= PRINT_F_ZERO; - ch = *format++; - break; - case '\'': /* SUSv2 flag (not in C99). */ - flags |= PRINT_F_QUOTE; - ch = *format++; - break; - default: - state = PRINT_S_WIDTH; - break; - } - break; - case PRINT_S_WIDTH: - if (ISDIGIT(ch)) { - ch = CHARTOINT(ch); - if (width > (INT_MAX - ch) / 10) { - overflow = 1; - goto out; - } - width = 10 * width + ch; - ch = *format++; - } else if (ch == '*') { - /* - * C99 says: "A negative field width argument is - * taken as a `-' flag followed by a positive - * field width." (7.19.6.1, 5) - */ - if ((width = va_arg(args, int)) < 0) { - flags |= PRINT_F_MINUS; - width = -width; - } - ch = *format++; - state = PRINT_S_DOT; - } else - state = PRINT_S_DOT; - break; - case PRINT_S_DOT: - if (ch == '.') { - state = PRINT_S_PRECISION; - ch = *format++; - } else - state = PRINT_S_MOD; - break; - case PRINT_S_PRECISION: - if (precision == -1) - precision = 0; - if (ISDIGIT(ch)) { - ch = CHARTOINT(ch); - if (precision > (INT_MAX - ch) / 10) { - overflow = 1; - goto out; - } - precision = 10 * precision + ch; - ch = *format++; - } else if (ch == '*') { - /* - * C99 says: "A negative precision argument is - * taken as if the precision were omitted." - * (7.19.6.1, 5) - */ - if ((precision = va_arg(args, int)) < 0) - precision = -1; - ch = *format++; - state = PRINT_S_MOD; - } else - state = PRINT_S_MOD; - break; - case PRINT_S_MOD: - switch (ch) { - case 'h': - ch = *format++; - if (ch == 'h') { /* It's a char. */ - ch = *format++; - cflags = PRINT_C_CHAR; - } else - cflags = PRINT_C_SHORT; - break; - case 'l': - ch = *format++; - if (ch == 'l') { /* It's a long long. */ - ch = *format++; - cflags = PRINT_C_LLONG; - } else - cflags = PRINT_C_LONG; - break; - case 'L': - cflags = PRINT_C_LDOUBLE; - ch = *format++; - break; - case 'j': - cflags = PRINT_C_INTMAX; - ch = *format++; - break; - case 't': - cflags = PRINT_C_PTRDIFF; - ch = *format++; - break; - case 'z': - cflags = PRINT_C_SIZE; - ch = *format++; - break; - } - state = PRINT_S_CONV; - break; - case PRINT_S_CONV: - switch (ch) { - case 'd': - /* FALLTHROUGH */ - case 'i': - switch (cflags) { - case PRINT_C_CHAR: - value = (signed char)va_arg(args, int); - break; - case PRINT_C_SHORT: - value = (short int)va_arg(args, int); - break; - case PRINT_C_LONG: - value = va_arg(args, long int); - break; - case PRINT_C_LLONG: - value = va_arg(args, LLONG); - break; - case PRINT_C_SIZE: - value = va_arg(args, SSIZE_T); - break; - case PRINT_C_INTMAX: - value = va_arg(args, INTMAX_T); - break; - case PRINT_C_PTRDIFF: - value = va_arg(args, PTRDIFF_T); - break; - default: - value = va_arg(args, int); - break; - } - fmtint(str, &len, size, value, 10, width, - precision, flags); - break; - case 'X': - flags |= PRINT_F_UP; - /* FALLTHROUGH */ - case 'x': - base = 16; - /* FALLTHROUGH */ - case 'o': - if (base == 0) - base = 8; - /* FALLTHROUGH */ - case 'u': - if (base == 0) - base = 10; - flags |= PRINT_F_UNSIGNED; - switch (cflags) { - case PRINT_C_CHAR: - value = (unsigned char)va_arg(args, - unsigned int); - break; - case PRINT_C_SHORT: - value = (unsigned short int)va_arg(args, - unsigned int); - break; - case PRINT_C_LONG: - value = va_arg(args, unsigned long int); - break; - case PRINT_C_LLONG: - value = va_arg(args, ULLONG); - break; - case PRINT_C_SIZE: - value = va_arg(args, size_t); - break; - case PRINT_C_INTMAX: - value = va_arg(args, UINTMAX_T); - break; - case PRINT_C_PTRDIFF: - value = va_arg(args, UPTRDIFF_T); - break; - default: - value = va_arg(args, unsigned int); - break; - } - fmtint(str, &len, size, value, base, width, - precision, flags); - break; - case 'A': - /* Not yet supported, we'll use "%F". */ - /* FALLTHROUGH */ - case 'F': - flags |= PRINT_F_UP; - case 'a': - /* Not yet supported, we'll use "%f". */ - /* FALLTHROUGH */ - case 'f': - if (cflags == PRINT_C_LDOUBLE) - fvalue = va_arg(args, LDOUBLE); - else - fvalue = va_arg(args, double); - fmtflt(str, &len, size, fvalue, width, - precision, flags, &overflow); - if (overflow) - goto out; - break; - case 'E': - flags |= PRINT_F_UP; - /* FALLTHROUGH */ - case 'e': - flags |= PRINT_F_TYPE_E; - if (cflags == PRINT_C_LDOUBLE) - fvalue = va_arg(args, LDOUBLE); - else - fvalue = va_arg(args, double); - fmtflt(str, &len, size, fvalue, width, - precision, flags, &overflow); - if (overflow) - goto out; - break; - case 'G': - flags |= PRINT_F_UP; - /* FALLTHROUGH */ - case 'g': - flags |= PRINT_F_TYPE_G; - if (cflags == PRINT_C_LDOUBLE) - fvalue = va_arg(args, LDOUBLE); - else - fvalue = va_arg(args, double); - /* - * If the precision is zero, it is treated as - * one (cf. C99: 7.19.6.1, 8). - */ - if (precision == 0) - precision = 1; - fmtflt(str, &len, size, fvalue, width, - precision, flags, &overflow); - if (overflow) - goto out; - break; - case 'c': - cvalue = (unsigned char)va_arg(args, int); - OUTCHAR(str, len, size, cvalue); - break; - case 's': - strvalue = va_arg(args, char *); - fmtstr(str, &len, size, strvalue, width, - precision, flags); - break; - case 'p': - /* - * C99 says: "The value of the pointer is - * converted to a sequence of printing - * characters, in an implementation-defined - * manner." (C99: 7.19.6.1, 8) - */ - if ((strvalue = va_arg(args, void *)) == NULL) - /* - * We use the glibc format. BSD prints - * "0x0", SysV "0". - */ - fmtstr(str, &len, size, "(nil)", width, - -1, flags); - else { - /* - * We use the BSD/glibc format. SysV - * omits the "0x" prefix (which we emit - * using the PRINT_F_NUM flag). - */ - flags |= PRINT_F_NUM; - flags |= PRINT_F_UNSIGNED; - fmtint(str, &len, size, - (UINTPTR_T)strvalue, 16, width, - precision, flags); - } - break; - case 'n': - switch (cflags) { - case PRINT_C_CHAR: - charptr = va_arg(args, signed char *); - *charptr = (signed char)len; - break; - case PRINT_C_SHORT: - shortptr = va_arg(args, short int *); - *shortptr = (short int)len; - break; - case PRINT_C_LONG: - longptr = va_arg(args, long int *); - *longptr = (long int)len; - break; - case PRINT_C_LLONG: - llongptr = va_arg(args, LLONG *); - *llongptr = (LLONG)len; - break; - case PRINT_C_SIZE: - /* - * C99 says that with the "z" length - * modifier, "a following `n' conversion - * specifier applies to a pointer to a - * signed integer type corresponding to - * size_t argument." (7.19.6.1, 7) - */ - sizeptr = va_arg(args, SSIZE_T *); - *sizeptr = len; - break; - case PRINT_C_INTMAX: - intmaxptr = va_arg(args, INTMAX_T *); - *intmaxptr = len; - break; - case PRINT_C_PTRDIFF: - ptrdiffptr = va_arg(args, PTRDIFF_T *); - *ptrdiffptr = len; - break; - default: - intptr = va_arg(args, int *); - *intptr = (int)len; - break; - } - break; - case '%': /* Print a "%" character verbatim. */ - OUTCHAR(str, len, size, ch); - break; - default: /* Skip other characters. */ - break; - } - ch = *format++; - state = PRINT_S_DEFAULT; - base = cflags = flags = width = 0; - precision = -1; - break; - } -out: - if (len < size) - str[len] = '\0'; - else if (size > 0) - str[size - 1] = '\0'; - - if (overflow || len >= INT_MAX) { - return -1; - } - return (int)len; -} - -static void -fmtstr(char *str, size_t *len, size_t size, const char *value, int width, - int precision, int flags) -{ - int padlen, strln; /* Amount to pad. */ - int noprecision = (precision == -1); - - if (value == NULL) /* We're forgiving. */ - value = "(null)"; - - /* If a precision was specified, don't read the string past it. */ - for (strln = 0; value[strln] != '\0' && - (noprecision || strln < precision); strln++) - continue; - - if ((padlen = width - strln) < 0) - padlen = 0; - if (flags & PRINT_F_MINUS) /* Left justify. */ - padlen = -padlen; - - while (padlen > 0) { /* Leading spaces. */ - OUTCHAR(str, *len, size, ' '); - padlen--; - } - while (*value != '\0' && (noprecision || precision-- > 0)) { - OUTCHAR(str, *len, size, *value); - value++; - } - while (padlen < 0) { /* Trailing spaces. */ - OUTCHAR(str, *len, size, ' '); - padlen++; - } -} - -static void -fmtint(char *str, size_t *len, size_t size, INTMAX_T value, int base, int width, - int precision, int flags) -{ - UINTMAX_T uvalue; - char iconvert[MAX_CONVERT_LENGTH]; - char sign = 0; - char hexprefix = 0; - int spadlen = 0; /* Amount to space pad. */ - int zpadlen = 0; /* Amount to zero pad. */ - int pos; - int separators = (flags & PRINT_F_QUOTE); - int noprecision = (precision == -1); - - if (flags & PRINT_F_UNSIGNED) - uvalue = value; - else { - uvalue = (value >= 0) ? value : -value; - if (value < 0) - sign = '-'; - else if (flags & PRINT_F_PLUS) /* Do a sign. */ - sign = '+'; - else if (flags & PRINT_F_SPACE) - sign = ' '; - } - - pos = convert(uvalue, iconvert, sizeof(iconvert), base, - flags & PRINT_F_UP); - - if (flags & PRINT_F_NUM && uvalue != 0) { - /* - * C99 says: "The result is converted to an `alternative form'. - * For `o' conversion, it increases the precision, if and only - * if necessary, to force the first digit of the result to be a - * zero (if the value and precision are both 0, a single 0 is - * printed). For `x' (or `X') conversion, a nonzero result has - * `0x' (or `0X') prefixed to it." (7.19.6.1, 6) - */ - switch (base) { - case 8: - if (precision <= pos) - precision = pos + 1; - break; - case 16: - hexprefix = (flags & PRINT_F_UP) ? 'X' : 'x'; - break; - } - } - - if (separators) /* Get the number of group separators we'll print. */ - separators = getnumsep(pos); - - zpadlen = precision - pos - separators; - spadlen = width /* Minimum field width. */ - - separators /* Number of separators. */ - - MAX(precision, pos) /* Number of integer digits. */ - - ((sign != 0) ? 1 : 0) /* Will we print a sign? */ - - ((hexprefix != 0) ? 2 : 0); /* Will we print a prefix? */ - - if (zpadlen < 0) - zpadlen = 0; - if (spadlen < 0) - spadlen = 0; - - /* - * C99 says: "If the `0' and `-' flags both appear, the `0' flag is - * ignored. For `d', `i', `o', `u', `x', and `X' conversions, if a - * precision is specified, the `0' flag is ignored." (7.19.6.1, 6) - */ - if (flags & PRINT_F_MINUS) /* Left justify. */ - spadlen = -spadlen; - else if (flags & PRINT_F_ZERO && noprecision) { - zpadlen += spadlen; - spadlen = 0; - } - while (spadlen > 0) { /* Leading spaces. */ - OUTCHAR(str, *len, size, ' '); - spadlen--; - } - if (sign != 0) /* Sign. */ - OUTCHAR(str, *len, size, sign); - if (hexprefix != 0) { /* A "0x" or "0X" prefix. */ - OUTCHAR(str, *len, size, '0'); - OUTCHAR(str, *len, size, hexprefix); - } - while (zpadlen > 0) { /* Leading zeros. */ - OUTCHAR(str, *len, size, '0'); - zpadlen--; - } - while (pos > 0) { /* The actual digits. */ - pos--; - OUTCHAR(str, *len, size, iconvert[pos]); - if (separators > 0 && pos > 0 && pos % 3 == 0) - printsep(str, len, size); - } - while (spadlen < 0) { /* Trailing spaces. */ - OUTCHAR(str, *len, size, ' '); - spadlen++; - } -} - -static void -fmtflt(char *str, size_t *len, size_t size, LDOUBLE fvalue, int width, - int precision, int flags, int *overflow) -{ - LDOUBLE ufvalue; - UINTMAX_T intpart; - UINTMAX_T fracpart; - UINTMAX_T mask; - const char *infnan = NULL; - char iconvert[MAX_CONVERT_LENGTH]; - char fconvert[MAX_CONVERT_LENGTH]; - char econvert[4]; /* "e-12" (without nul-termination). */ - char esign = 0; - char sign = 0; - int leadfraczeros = 0; - int exponent = 0; - int emitpoint = 0; - int omitzeros = 0; - int omitcount = 0; - int padlen = 0; - int epos = 0; - int fpos = 0; - int ipos = 0; - int separators = (flags & PRINT_F_QUOTE); - int estyle = (flags & PRINT_F_TYPE_E); -#if HAVE_LOCALECONV && HAVE_LCONV_DECIMAL_POINT - struct lconv *lc = localeconv(); -#endif /* HAVE_LOCALECONV && HAVE_LCONV_DECIMAL_POINT */ - - /* - * AIX' man page says the default is 0, but C99 and at least Solaris' - * and NetBSD's man pages say the default is 6, and sprintf(3) on AIX - * defaults to 6. - */ - if (precision == -1) - precision = 6; - - if (fvalue < 0.0) - sign = '-'; - else if (flags & PRINT_F_PLUS) /* Do a sign. */ - sign = '+'; - else if (flags & PRINT_F_SPACE) - sign = ' '; - - if (ISNAN(fvalue)) - infnan = (flags & PRINT_F_UP) ? "NAN" : "nan"; - else if (ISINF(fvalue)) - infnan = (flags & PRINT_F_UP) ? "INF" : "inf"; - - if (infnan != NULL) { - if (sign != 0) - iconvert[ipos++] = sign; - while (*infnan != '\0') - iconvert[ipos++] = *infnan++; - fmtstr(str, len, size, iconvert, width, ipos, flags); - return; - } - - /* "%e" (or "%E") or "%g" (or "%G") conversion. */ - if (flags & PRINT_F_TYPE_E || flags & PRINT_F_TYPE_G) { - if (flags & PRINT_F_TYPE_G) { - /* - * For "%g" (and "%G") conversions, the precision - * specifies the number of significant digits, which - * includes the digits in the integer part. The - * conversion will or will not be using "e-style" (like - * "%e" or "%E" conversions) depending on the precision - * and on the exponent. However, the exponent can be - * affected by rounding the converted value, so we'll - * leave this decision for later. Until then, we'll - * assume that we're going to do an "e-style" conversion - * (in order to get the exponent calculated). For - * "e-style", the precision must be decremented by one. - */ - precision--; - /* - * For "%g" (and "%G") conversions, trailing zeros are - * removed from the fractional portion of the result - * unless the "#" flag was specified. - */ - if (!(flags & PRINT_F_NUM)) - omitzeros = 1; - } - exponent = getexponent(fvalue); - estyle = 1; - } - -again: - /* - * Sorry, we only support 9, 19, or 38 digits (that is, the number of - * digits of the 32-bit, the 64-bit, or the 128-bit UINTMAX_MAX value - * minus one) past the decimal point due to our conversion method. - */ - switch (sizeof(UINTMAX_T)) { - case 16: - if (precision > 38) - precision = 38; - break; - case 8: - if (precision > 19) - precision = 19; - break; - default: - if (precision > 9) - precision = 9; - break; - } - - ufvalue = (fvalue >= 0.0) ? fvalue : -fvalue; - if (estyle) /* We want exactly one integer digit. */ - ufvalue /= mypow10(exponent); - - if ((intpart = cast(ufvalue)) == UINTMAX_MAX) { - *overflow = 1; - return; - } - - /* - * Factor of ten with the number of digits needed for the fractional - * part. For example, if the precision is 3, the mask will be 1000. - */ - mask = (UINTMAX_T)mypow10(precision); - /* - * We "cheat" by converting the fractional part to integer by - * multiplying by a factor of ten. - */ - if ((fracpart = myround(mask * (ufvalue - intpart))) >= mask) { - /* - * For example, ufvalue = 2.99962, intpart = 2, and mask = 1000 - * (because precision = 3). Now, myround(1000 * 0.99962) will - * return 1000. So, the integer part must be incremented by one - * and the fractional part must be set to zero. - */ - intpart++; - fracpart = 0; - if (estyle && intpart == 10) { - /* - * The value was rounded up to ten, but we only want one - * integer digit if using "e-style". So, the integer - * part must be set to one and the exponent must be - * incremented by one. - */ - intpart = 1; - exponent++; - } - } - - /* - * Now that we know the real exponent, we can check whether or not to - * use "e-style" for "%g" (and "%G") conversions. If we don't need - * "e-style", the precision must be adjusted and the integer and - * fractional parts must be recalculated from the original value. - * - * C99 says: "Let P equal the precision if nonzero, 6 if the precision - * is omitted, or 1 if the precision is zero. Then, if a conversion - * with style `E' would have an exponent of X: - * - * - if P > X >= -4, the conversion is with style `f' (or `F') and - * precision P - (X + 1). - * - * - otherwise, the conversion is with style `e' (or `E') and precision - * P - 1." (7.19.6.1, 8) - * - * Note that we had decremented the precision by one. - */ - if (flags & PRINT_F_TYPE_G && estyle && - precision + 1 > exponent && exponent >= -4) { - precision -= exponent; - estyle = 0; - goto again; - } - - if (estyle) { - if (exponent < 0) { - exponent = -exponent; - esign = '-'; - } else - esign = '+'; - - /* - * Convert the exponent. The sizeof(econvert) is 4. So, the - * econvert buffer can hold e.g. "e+99" and "e-99". We don't - * support an exponent which contains more than two digits. - * Therefore, the following stores are safe. - */ - epos = convert(exponent, econvert, 2, 10, 0); - /* - * C99 says: "The exponent always contains at least two digits, - * and only as many more digits as necessary to represent the - * exponent." (7.19.6.1, 8) - */ - if (epos == 1) - econvert[epos++] = '0'; - econvert[epos++] = esign; - econvert[epos++] = (flags & PRINT_F_UP) ? 'E' : 'e'; - } - - /* Convert the integer part and the fractional part. */ - ipos = convert(intpart, iconvert, sizeof(iconvert), 10, 0); - if (fracpart != 0) /* convert() would return 1 if fracpart == 0. */ - fpos = convert(fracpart, fconvert, sizeof(fconvert), 10, 0); - - leadfraczeros = precision - fpos; - - if (omitzeros) { - if (fpos > 0) /* Omit trailing fractional part zeros. */ - while (omitcount < fpos && fconvert[omitcount] == '0') - omitcount++; - else { /* The fractional part is zero, omit it completely. */ - omitcount = precision; - leadfraczeros = 0; - } - precision -= omitcount; - } - - /* - * Print a decimal point if either the fractional part is non-zero - * and/or the "#" flag was specified. - */ - if (precision > 0 || flags & PRINT_F_NUM) - emitpoint = 1; - if (separators) /* Get the number of group separators we'll print. */ - separators = getnumsep(ipos); - - padlen = width /* Minimum field width. */ - - ipos /* Number of integer digits. */ - - epos /* Number of exponent characters. */ - - precision /* Number of fractional digits. */ - - separators /* Number of group separators. */ - - (emitpoint ? 1 : 0) /* Will we print a decimal point? */ - - ((sign != 0) ? 1 : 0); /* Will we print a sign character? */ - - if (padlen < 0) - padlen = 0; - - /* - * C99 says: "If the `0' and `-' flags both appear, the `0' flag is - * ignored." (7.19.6.1, 6) - */ - if (flags & PRINT_F_MINUS) /* Left justifty. */ - padlen = -padlen; - else if (flags & PRINT_F_ZERO && padlen > 0) { - if (sign != 0) { /* Sign. */ - OUTCHAR(str, *len, size, sign); - sign = 0; - } - while (padlen > 0) { /* Leading zeros. */ - OUTCHAR(str, *len, size, '0'); - padlen--; - } - } - while (padlen > 0) { /* Leading spaces. */ - OUTCHAR(str, *len, size, ' '); - padlen--; - } - if (sign != 0) /* Sign. */ - OUTCHAR(str, *len, size, sign); - while (ipos > 0) { /* Integer part. */ - ipos--; - OUTCHAR(str, *len, size, iconvert[ipos]); - if (separators > 0 && ipos > 0 && ipos % 3 == 0) - printsep(str, len, size); - } - if (emitpoint) { /* Decimal point. */ -#if HAVE_LOCALECONV && HAVE_LCONV_DECIMAL_POINT - if (lc->decimal_point != NULL && *lc->decimal_point != '\0') - OUTCHAR(str, *len, size, *lc->decimal_point); - else /* We'll always print some decimal point character. */ -#endif /* HAVE_LOCALECONV && HAVE_LCONV_DECIMAL_POINT */ - OUTCHAR(str, *len, size, '.'); - } - while (leadfraczeros > 0) { /* Leading fractional part zeros. */ - OUTCHAR(str, *len, size, '0'); - leadfraczeros--; - } - while (fpos > omitcount) { /* The remaining fractional part. */ - fpos--; - OUTCHAR(str, *len, size, fconvert[fpos]); - } - while (epos > 0) { /* Exponent. */ - epos--; - OUTCHAR(str, *len, size, econvert[epos]); - } - while (padlen < 0) { /* Trailing spaces. */ - OUTCHAR(str, *len, size, ' '); - padlen++; - } -} - -static void -printsep(char *str, size_t *len, size_t size) -{ -#if HAVE_LOCALECONV && HAVE_LCONV_THOUSANDS_SEP - struct lconv *lc = localeconv(); - int i; - - if (lc->thousands_sep != NULL) - for (i = 0; lc->thousands_sep[i] != '\0'; i++) - OUTCHAR(str, *len, size, lc->thousands_sep[i]); - else -#endif /* HAVE_LOCALECONV && HAVE_LCONV_THOUSANDS_SEP */ - OUTCHAR(str, *len, size, ','); -} - -static int -getnumsep(int digits) -{ - int separators = (digits - ((digits % 3 == 0) ? 1 : 0)) / 3; -#if HAVE_LOCALECONV && HAVE_LCONV_THOUSANDS_SEP - int strln; - struct lconv *lc = localeconv(); - - /* We support an arbitrary separator length (including zero). */ - if (lc->thousands_sep != NULL) { - for (strln = 0; lc->thousands_sep[strln] != '\0'; strln++) - continue; - separators *= strln; - } -#endif /* HAVE_LOCALECONV && HAVE_LCONV_THOUSANDS_SEP */ - return separators; -} - -static int -getexponent(LDOUBLE value) -{ - LDOUBLE tmp = (value >= 0.0) ? value : -value; - int exponent = 0; - - /* - * We check for 99 > exponent > -99 in order to work around possible - * endless loops which could happen (at least) in the second loop (at - * least) if we're called with an infinite value. However, we checked - * for infinity before calling this function using our ISINF() macro, so - * this might be somewhat paranoid. - */ - while (tmp < 1.0 && tmp > 0.0 && --exponent > -99) - tmp *= 10; - while (tmp >= 10.0 && ++exponent < 99) - tmp /= 10; - - return exponent; -} - -static int -convert(UINTMAX_T value, char *buf, size_t size, int base, int caps) -{ - const char *digits = caps ? "0123456789ABCDEF" : "0123456789abcdef"; - size_t pos = 0; - - /* We return an unterminated buffer with the digits in reverse order. */ - do { - buf[pos++] = digits[value % base]; - value /= base; - } while (value != 0 && pos < size); - - return (int)pos; -} - -static UINTMAX_T -cast(LDOUBLE value) -{ - UINTMAX_T result; - - /* - * We check for ">=" and not for ">" because if UINTMAX_MAX cannot be - * represented exactly as an LDOUBLE value (but is less than LDBL_MAX), - * it may be increased to the nearest higher representable value for the - * comparison (cf. C99: 6.3.1.4, 2). It might then equal the LDOUBLE - * value although converting the latter to UINTMAX_T would overflow. - */ - if (value >= UINTMAX_MAX) - return UINTMAX_MAX; - - result = (UINTMAX_T)value; - /* - * At least on NetBSD/sparc64 3.0.2 and 4.99.30, casting long double to - * an integer type converts e.g. 1.9 to 2 instead of 1 (which violates - * the standard). Sigh. - */ - return (result <= value) ? result : result - 1; -} - -static UINTMAX_T -myround(LDOUBLE value) -{ - UINTMAX_T intpart = cast(value); - - return ((value -= intpart) < 0.5) ? intpart : intpart + 1; -} - -static LDOUBLE -mypow10(int exponent) -{ - LDOUBLE result = 1; - - while (exponent > 0) { - result *= 10; - exponent--; - } - while (exponent < 0) { - result /= 10; - exponent++; - } - return result; -} -#endif /* !HAVE_VSNPRINTF */ - -#if !HAVE_VASPRINTF -#if NEED_MYMEMCPY -void * -mymemcpy(void *dst, void *src, size_t len) -{ - const char *from = src; - char *to = dst; - - /* No need for optimization, we use this only to replace va_copy(3). */ - while (len-- > 0) - *to++ = *from++; - return dst; -} -#endif /* NEED_MYMEMCPY */ - -int -util_vasprintf(char **ret, const char *format, va_list ap) -{ - size_t size; - int len; - va_list aq; - - VA_COPY(aq, ap); - len = vsnprintf(NULL, 0, format, aq); - VA_END_COPY(aq); - if (len < 0 || (*ret = malloc(size = len + 1)) == NULL) - return -1; - return vsnprintf(*ret, size, format, ap); -} -#endif /* !HAVE_VASPRINTF */ - -#if !HAVE_SNPRINTF -#if HAVE_STDARG_H -int -util_snprintf(char *str, size_t size, const char *format, ...) -#else -int -util_snprintf(va_alist) va_dcl -#endif /* HAVE_STDARG_H */ -{ -#if !HAVE_STDARG_H - char *str; - size_t size; - char *format; -#endif /* HAVE_STDARG_H */ - va_list ap; - int len; - - VA_START(ap, format); - VA_SHIFT(ap, str, char *); - VA_SHIFT(ap, size, size_t); - VA_SHIFT(ap, format, const char *); - len = vsnprintf(str, size, format, ap); - va_end(ap); - return len; -} -#endif /* !HAVE_SNPRINTF */ - -#if !HAVE_ASPRINTF -#if HAVE_STDARG_H -int -util_asprintf(char **ret, const char *format, ...) -#else -int -util_asprintf(va_alist) va_dcl -#endif /* HAVE_STDARG_H */ -{ -#if !HAVE_STDARG_H - char **ret; - char *format; -#endif /* HAVE_STDARG_H */ - va_list ap; - int len; - - VA_START(ap, format); - VA_SHIFT(ap, ret, char **); - VA_SHIFT(ap, format, const char *); - len = vasprintf(ret, format, ap); - va_end(ap); - return len; -} -#endif /* !HAVE_ASPRINTF */ -#else /* Dummy declaration to avoid empty translation unit warnings. */ -int main(void); -#endif /* !HAVE_SNPRINTF || !HAVE_VSNPRINTF || !HAVE_ASPRINTF || [...] */ - - -/* vim: set joinspaces textwidth=80: */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_split_prim.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_split_prim.h deleted file mode 100644 index 7f80fc12700..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_split_prim.h +++ /dev/null @@ -1,114 +0,0 @@ -/* Originally written by Ben Skeggs for the nv50 driver*/ - -#ifndef U_SPLIT_PRIM_H -#define U_SPLIT_PRIM_H - -#include "pipe/p_defines.h" -#include "pipe/p_compiler.h" - -#include "util/u_debug.h" - -struct util_split_prim { - void *priv; - void (*emit)(void *priv, unsigned start, unsigned count); - void (*edge)(void *priv, boolean enabled); - - unsigned mode; - unsigned start; - unsigned p_start; - unsigned p_end; - - uint repeat_first:1; - uint close_first:1; - uint edgeflag_off:1; -}; - -static INLINE void -util_split_prim_init(struct util_split_prim *s, - unsigned mode, unsigned start, unsigned count) -{ - if (mode == PIPE_PRIM_LINE_LOOP) { - s->mode = PIPE_PRIM_LINE_STRIP; - s->close_first = 1; - } else { - s->mode = mode; - s->close_first = 0; - } - s->start = start; - s->p_start = start; - s->p_end = start + count; - s->edgeflag_off = 0; - s->repeat_first = 0; -} - -static INLINE boolean -util_split_prim_next(struct util_split_prim *s, unsigned max_verts) -{ - int repeat = 0; - - if (s->repeat_first) { - s->emit(s->priv, s->start, 1); - max_verts--; - if (s->edgeflag_off) { - s->edge(s->priv, TRUE); - s->edgeflag_off = FALSE; - } - } - - if ((s->p_end - s->p_start) + s->close_first <= max_verts) { - s->emit(s->priv, s->p_start, s->p_end - s->p_start); - if (s->close_first) - s->emit(s->priv, s->start, 1); - return TRUE; - } - - switch (s->mode) { - case PIPE_PRIM_LINES: - max_verts &= ~1; - break; - case PIPE_PRIM_LINE_STRIP: - repeat = 1; - break; - case PIPE_PRIM_POLYGON: - max_verts--; - s->emit(s->priv, s->p_start, max_verts); - s->edge(s->priv, FALSE); - s->emit(s->priv, s->p_start + max_verts, 1); - s->p_start += max_verts; - s->repeat_first = TRUE; - s->edgeflag_off = TRUE; - return FALSE; - case PIPE_PRIM_TRIANGLES: - max_verts = max_verts - (max_verts % 3); - break; - case PIPE_PRIM_TRIANGLE_STRIP: - /* to ensure winding stays correct, always split - * on an even number of generated triangles - */ - max_verts = max_verts & ~1; - repeat = 2; - break; - case PIPE_PRIM_TRIANGLE_FAN: - s->repeat_first = TRUE; - repeat = 1; - break; - case PIPE_PRIM_QUADS: - max_verts &= ~3; - break; - case PIPE_PRIM_QUAD_STRIP: - max_verts &= ~1; - repeat = 2; - break; - case PIPE_PRIM_POINTS: - break; - default: - /* TODO: implement adjacency primitives */ - assert(0); - } - - s->emit (s->priv, s->p_start, max_verts); - s->p_start += (max_verts - repeat); - return FALSE; -} - -#endif /* U_SPLIT_PRIM_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_sse.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_sse.h deleted file mode 100644 index 1df6c872677..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_sse.h +++ /dev/null @@ -1,255 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * SSE intrinsics portability header. - * - * Although the SSE intrinsics are support by all modern x86 and x86-64 - * compilers, there are some intrisincs missing in some implementations - * (especially older MSVC versions). This header abstracts that away. - */ - -#ifndef U_SSE_H_ -#define U_SSE_H_ - -#include "pipe/p_config.h" - -#if defined(PIPE_ARCH_SSE) - -#include - - -/* MSVC before VC8 does not support the _mm_castxxx_yyy */ -#if defined(_MSC_VER) && _MSC_VER < 1500 - -union __declspec(align(16)) m128_types { - __m128 m128; - __m128i m128i; - __m128d m128d; -}; - -static __inline __m128 -_mm_castsi128_ps(__m128i a) -{ - union m128_types u; - u.m128i = a; - return u.m128; -} - -static __inline __m128i -_mm_castps_si128(__m128 a) -{ - union m128_types u; - u.m128 = a; - return u.m128i; -} - -#endif /* defined(_MSC_VER) && _MSC_VER < 1500 */ - -union m128i { - __m128i m; - ubyte ub[16]; - ushort us[8]; - uint ui[4]; -}; - -static INLINE void u_print_epi8(const char *name, __m128i r) -{ - union { __m128i m; ubyte ub[16]; } u; - u.m = r; - - debug_printf("%s: " - "%02x/" - "%02x/" - "%02x/" - "%02x/" - "%02x/" - "%02x/" - "%02x/" - "%02x/" - "%02x/" - "%02x/" - "%02x/" - "%02x/" - "%02x/" - "%02x/" - "%02x/" - "%02x\n", - name, - u.ub[0], u.ub[1], u.ub[2], u.ub[3], - u.ub[4], u.ub[5], u.ub[6], u.ub[7], - u.ub[8], u.ub[9], u.ub[10], u.ub[11], - u.ub[12], u.ub[13], u.ub[14], u.ub[15]); -} - -static INLINE void u_print_epi16(const char *name, __m128i r) -{ - union { __m128i m; ushort us[8]; } u; - u.m = r; - - debug_printf("%s: " - "%04x/" - "%04x/" - "%04x/" - "%04x/" - "%04x/" - "%04x/" - "%04x/" - "%04x\n", - name, - u.us[0], u.us[1], u.us[2], u.us[3], - u.us[4], u.us[5], u.us[6], u.us[7]); -} - -static INLINE void u_print_epi32(const char *name, __m128i r) -{ - union { __m128i m; uint ui[4]; } u; - u.m = r; - - debug_printf("%s: " - "%08x/" - "%08x/" - "%08x/" - "%08x\n", - name, - u.ui[0], u.ui[1], u.ui[2], u.ui[3]); -} - -static INLINE void u_print_ps(const char *name, __m128 r) -{ - union { __m128 m; float f[4]; } u; - u.m = r; - - debug_printf("%s: " - "%f/" - "%f/" - "%f/" - "%f\n", - name, - u.f[0], u.f[1], u.f[2], u.f[3]); -} - - -#define U_DUMP_EPI32(a) u_print_epi32(#a, a) -#define U_DUMP_EPI16(a) u_print_epi16(#a, a) -#define U_DUMP_EPI8(a) u_print_epi8(#a, a) -#define U_DUMP_PS(a) u_print_ps(#a, a) - - - -#if defined(PIPE_ARCH_SSSE3) - -#include - -#else /* !PIPE_ARCH_SSSE3 */ - -/** - * Describe _mm_shuffle_epi8() with gcc extended inline assembly, for cases - * where -mssse3 is not supported/enabled. - * - * MSVC will never get in here as its intrinsics support do not rely on - * compiler command line options. - */ -static __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__)) -_mm_shuffle_epi8(__m128i a, __m128i mask) -{ - __m128i result; - __asm__("pshufb %1, %0" - : "=x" (result) - : "xm" (mask), "0" (a)); - return result; -} - -#endif /* !PIPE_ARCH_SSSE3 */ - - - - -/* Provide an SSE2 implementation of _mm_mullo_epi32() in terms of - * _mm_mul_epu32(). - * - * I suspect this works fine for us because one of our operands is - * always positive, but not sure that this can be used for general - * signed integer multiplication. - * - * This seems close enough to the speed of SSE4 and the real - * _mm_mullo_epi32() intrinsic as to not justify adding an sse4 - * dependency at this point. - */ -static INLINE __m128i mm_mullo_epi32(const __m128i a, const __m128i b) -{ - __m128i a4 = _mm_srli_epi64(a, 32); /* shift by one dword */ - __m128i b4 = _mm_srli_epi64(b, 32); /* shift by one dword */ - __m128i ba = _mm_mul_epu32(b, a); /* multply dwords 0, 2 */ - __m128i b4a4 = _mm_mul_epu32(b4, a4); /* multiply dwords 1, 3 */ - - /* Interleave the results, either with shuffles or (slightly - * faster) direct bit operations: - */ -#if 0 - __m128i ba8 = _mm_shuffle_epi32(ba, 8); - __m128i b4a48 = _mm_shuffle_epi32(b4a4, 8); - __m128i result = _mm_unpacklo_epi32(ba8, b4a48); -#else - __m128i mask = _mm_setr_epi32(~0,0,~0,0); - __m128i ba_mask = _mm_and_si128(ba, mask); - __m128i b4a4_mask_shift = _mm_slli_epi64(b4a4, 32); - __m128i result = _mm_or_si128(ba_mask, b4a4_mask_shift); -#endif - - return result; -} - - -static INLINE void -transpose4_epi32(const __m128i * restrict a, - const __m128i * restrict b, - const __m128i * restrict c, - const __m128i * restrict d, - __m128i * restrict o, - __m128i * restrict p, - __m128i * restrict q, - __m128i * restrict r) -{ - __m128i t0 = _mm_unpacklo_epi32(*a, *b); - __m128i t1 = _mm_unpacklo_epi32(*c, *d); - __m128i t2 = _mm_unpackhi_epi32(*a, *b); - __m128i t3 = _mm_unpackhi_epi32(*c, *d); - - *o = _mm_unpacklo_epi64(t0, t1); - *p = _mm_unpackhi_epi64(t0, t1); - *q = _mm_unpacklo_epi64(t2, t3); - *r = _mm_unpackhi_epi64(t2, t3); -} - -#define SCALAR_EPI32(m, i) _mm_shuffle_epi32((m), _MM_SHUFFLE(i,i,i,i)) - - -#endif /* PIPE_ARCH_SSE */ - -#endif /* U_SSE_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_staging.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_staging.c deleted file mode 100644 index b5e37932e83..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_staging.c +++ /dev/null @@ -1,132 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Luca Barbieri - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_staging.h" -#include "pipe/p_context.h" -#include "util/u_memory.h" -#include "util/u_inlines.h" - -static void -util_staging_resource_template(struct pipe_resource *pt, unsigned width, unsigned height, unsigned depth, struct pipe_resource *template) -{ - memset(template, 0, sizeof(struct pipe_resource)); - if(pt->target != PIPE_BUFFER && depth <= 1) - template->target = PIPE_TEXTURE_RECT; - else - template->target = pt->target; - template->format = pt->format; - template->width0 = width; - template->height0 = height; - template->depth0 = depth; - template->array_size = 1; - template->last_level = 0; - template->nr_samples = pt->nr_samples; - template->bind = 0; - template->usage = PIPE_USAGE_STAGING; - template->flags = 0; -} - -struct util_staging_transfer * -util_staging_transfer_init(struct pipe_context *pipe, - struct pipe_resource *pt, - unsigned level, - unsigned usage, - const struct pipe_box *box, - boolean direct, struct util_staging_transfer *tx) -{ - struct pipe_screen *pscreen = pipe->screen; - - struct pipe_resource staging_resource_template; - - pipe_resource_reference(&tx->base.resource, pt); - tx->base.level = level; - tx->base.usage = usage; - tx->base.box = *box; - - if (direct) - { - tx->staging_resource = pt; - return tx; - } - - util_staging_resource_template(pt, box->width, box->height, box->depth, &staging_resource_template); - tx->staging_resource = pscreen->resource_create(pscreen, &staging_resource_template); - if (!tx->staging_resource) - { - pipe_resource_reference(&tx->base.resource, NULL); - FREE(tx); - return NULL; - } - - if (usage & PIPE_TRANSFER_READ) - { - /* XXX this looks wrong dst is always the same but looping over src z? */ - unsigned zi; - struct pipe_box sbox; - sbox.x = box->x; - sbox.y = box->y; - sbox.z = box->z; - sbox.width = box->width; - sbox.height = box->height; - sbox.depth = 1; - for(zi = 0; zi < box->depth; ++zi) { - sbox.z = sbox.z + zi; - pipe->resource_copy_region(pipe, tx->staging_resource, 0, 0, 0, 0, - tx->base.resource, level, &sbox); - } - } - - return tx; -} - -void -util_staging_transfer_destroy(struct pipe_context *pipe, struct pipe_transfer *ptx) -{ - struct util_staging_transfer *tx = (struct util_staging_transfer *)ptx; - - if (tx->staging_resource != tx->base.resource) - { - if(tx->base.usage & PIPE_TRANSFER_WRITE) { - /* XXX this looks wrong src is always the same but looping over dst z? */ - unsigned zi; - struct pipe_box sbox; - sbox.x = 0; - sbox.y = 0; - sbox.z = 0; - sbox.width = tx->base.box.width; - sbox.height = tx->base.box.height; - sbox.depth = 1; - for(zi = 0; zi < tx->base.box.depth; ++zi) - pipe->resource_copy_region(pipe, tx->base.resource, tx->base.level, tx->base.box.x, tx->base.box.y, tx->base.box.z + zi, - tx->staging_resource, 0, &sbox); - } - - pipe_resource_reference(&tx->staging_resource, NULL); - } - - pipe_resource_reference(&ptx->resource, NULL); - FREE(ptx); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_staging.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_staging.h deleted file mode 100644 index ddbb33443e4..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_staging.h +++ /dev/null @@ -1,63 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Luca Barbieri - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Direct3D 10/11 has no concept of transfers. Applications instead - * create resources with a STAGING or DYNAMIC usage, copy between them - * and the real resource and use Map to map the STAGING/DYNAMIC resource. - * - * This util module allows to implement Gallium drivers as a Direct3D - * driver would be implemented: transfers allocate a resource with - * PIPE_USAGE_STAGING, and copy the data between it and the real resource - * with resource_copy_region. - */ - -#ifndef U_STAGING_H -#define U_STAGING_H - -#include "pipe/p_state.h" - -struct util_staging_transfer { - struct pipe_transfer base; - - /* if direct, same as base.resource, otherwise the temporary staging resource */ - struct pipe_resource *staging_resource; -}; - -/* user must be stride, slice_stride and offset */ -/* pt->usage == PIPE_USAGE_DYNAMIC || pt->usage == PIPE_USAGE_STAGING should be a good value to pass for direct */ -/* staging resource is currently created with PIPE_USAGE_STAGING */ -struct util_staging_transfer * -util_staging_transfer_init(struct pipe_context *pipe, - struct pipe_resource *pt, - unsigned level, - unsigned usage, - const struct pipe_box *box, - boolean direct, struct util_staging_transfer *tx); - -void -util_staging_transfer_destroy(struct pipe_context *pipe, struct pipe_transfer *ptx); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_string.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_string.h deleted file mode 100644 index cc7992d7391..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_string.h +++ /dev/null @@ -1,220 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Platform independent functions for string manipulation. - * - * @author Jose Fonseca - */ - -#ifndef U_STRING_H_ -#define U_STRING_H_ - -#if !defined(WIN32) && !defined(XF86_LIBC_H) -#include -#endif -#include -#include - -#include "pipe/p_compiler.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -#ifdef WIN32 - -int util_vsnprintf(char *, size_t, const char *, va_list); -int util_snprintf(char *str, size_t size, const char *format, ...); - -static INLINE void -util_vsprintf(char *str, const char *format, va_list ap) -{ - util_vsnprintf(str, (size_t)-1, format, ap); -} - -static INLINE void -util_sprintf(char *str, const char *format, ...) -{ - va_list ap; - va_start(ap, format); - util_vsnprintf(str, (size_t)-1, format, ap); - va_end(ap); -} - -static INLINE char * -util_strchr(const char *s, char c) -{ - while(*s) { - if(*s == c) - return (char *)s; - ++s; - } - return NULL; -} - -static INLINE char* -util_strncat(char *dst, const char *src, size_t n) -{ - char *p = dst + strlen(dst); - const char *q = src; - size_t i; - - for (i = 0; i < n && *q != '\0'; ++i) - *p++ = *q++; - *p = '\0'; - - return dst; -} - -static INLINE int -util_strcmp(const char *s1, const char *s2) -{ - unsigned char u1, u2; - - while (1) { - u1 = (unsigned char) *s1++; - u2 = (unsigned char) *s2++; - if (u1 != u2) - return u1 - u2; - if (u1 == '\0') - return 0; - } - return 0; -} - -static INLINE int -util_strncmp(const char *s1, const char *s2, size_t n) -{ - unsigned char u1, u2; - - while (n-- > 0) { - u1 = (unsigned char) *s1++; - u2 = (unsigned char) *s2++; - if (u1 != u2) - return u1 - u2; - if (u1 == '\0') - return 0; - } - return 0; -} - -static INLINE char * -util_strstr(const char *haystack, const char *needle) -{ - const char *p = haystack; - size_t len = strlen(needle); - - for (; (p = util_strchr(p, *needle)) != 0; p++) { - if (util_strncmp(p, needle, len) == 0) { - return (char *)p; - } - } - return NULL; -} - -static INLINE void * -util_memmove(void *dest, const void *src, size_t n) -{ - char *p = (char *)dest; - const char *q = (const char *)src; - if (dest < src) { - while (n--) - *p++ = *q++; - } - else - { - p += n; - q += n; - while (n--) - *--p = *--q; - } - return dest; -} - - -#else - -#define util_vsnprintf vsnprintf -#define util_snprintf snprintf -#define util_vsprintf vsprintf -#define util_sprintf sprintf -#define util_strchr strchr -#define util_strcmp strcmp -#define util_strncmp strncmp -#define util_strncat strncat -#define util_strstr strstr -#define util_memmove memmove - -#endif - - -/** - * Printable string buffer - */ -struct util_strbuf -{ - char *str; - char *ptr; - size_t left; -}; - - -static INLINE void -util_strbuf_init(struct util_strbuf *sbuf, char *str, size_t size) -{ - sbuf->str = str; - sbuf->str[0] = 0; - sbuf->ptr = sbuf->str; - sbuf->left = size; -} - - -static INLINE void -util_strbuf_printf(struct util_strbuf *sbuf, const char *format, ...) -{ - if(sbuf->left > 1) { - size_t written; - va_list ap; - va_start(ap, format); - written = util_vsnprintf(sbuf->ptr, sbuf->left, format, ap); - va_end(ap); - sbuf->ptr += written; - sbuf->left -= written; - } -} - - - -#ifdef __cplusplus -} -#endif - -#endif /* U_STRING_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_surface.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_surface.c deleted file mode 100644 index a541a38ffa1..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_surface.c +++ /dev/null @@ -1,407 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Surface utility functions. - * - * @author Brian Paul - */ - - -#include "pipe/p_defines.h" -#include "pipe/p_screen.h" -#include "pipe/p_state.h" - -#include "util/u_format.h" -#include "util/u_inlines.h" -#include "util/u_rect.h" -#include "util/u_surface.h" -#include "util/u_pack_color.h" - - -/** - * Initialize a pipe_surface object. 'view' is considered to have - * uninitialized contents. - */ -void -u_surface_default_template(struct pipe_surface *surf, - const struct pipe_resource *texture, - unsigned bind) -{ - memset(surf, 0, sizeof(*surf)); - - surf->format = texture->format; - /* XXX should filter out all non-rt/ds bind flags ? */ - surf->usage = bind; -} - -/** - * Helper to quickly create an RGBA rendering surface of a certain size. - * \param textureOut returns the new texture - * \param surfaceOut returns the new surface - * \return TRUE for success, FALSE if failure - */ -boolean -util_create_rgba_surface(struct pipe_context *pipe, - uint width, uint height, - uint bind, - struct pipe_resource **textureOut, - struct pipe_surface **surfaceOut) -{ - static const enum pipe_format rgbaFormats[] = { - PIPE_FORMAT_B8G8R8A8_UNORM, - PIPE_FORMAT_A8R8G8B8_UNORM, - PIPE_FORMAT_A8B8G8R8_UNORM, - PIPE_FORMAT_NONE - }; - const uint target = PIPE_TEXTURE_2D; - enum pipe_format format = PIPE_FORMAT_NONE; - struct pipe_resource templ; - struct pipe_surface surf_templ; - struct pipe_screen *screen = pipe->screen; - uint i; - - /* Choose surface format */ - for (i = 0; rgbaFormats[i]; i++) { - if (screen->is_format_supported(screen, rgbaFormats[i], - target, 0, bind)) { - format = rgbaFormats[i]; - break; - } - } - if (format == PIPE_FORMAT_NONE) - return FALSE; /* unable to get an rgba format!?! */ - - /* create texture */ - memset(&templ, 0, sizeof(templ)); - templ.target = target; - templ.format = format; - templ.last_level = 0; - templ.width0 = width; - templ.height0 = height; - templ.depth0 = 1; - templ.array_size = 1; - templ.bind = bind; - - *textureOut = screen->resource_create(screen, &templ); - if (!*textureOut) - return FALSE; - - /* create surface */ - u_surface_default_template(&surf_templ, *textureOut, bind); - /* create surface / view into texture */ - *surfaceOut = pipe->create_surface(pipe, - *textureOut, - &surf_templ); - if (!*surfaceOut) { - pipe_resource_reference(textureOut, NULL); - return FALSE; - } - - return TRUE; -} - - -/** - * Release the surface and texture from util_create_rgba_surface(). - */ -void -util_destroy_rgba_surface(struct pipe_resource *texture, - struct pipe_surface *surface) -{ - pipe_surface_reference(&surface, NULL); - pipe_resource_reference(&texture, NULL); -} - - - -/** - * Fallback function for pipe->resource_copy_region(). - * Note: (X,Y)=(0,0) is always the upper-left corner. - */ -void -util_resource_copy_region(struct pipe_context *pipe, - struct pipe_resource *dst, - unsigned dst_level, - unsigned dst_x, unsigned dst_y, unsigned dst_z, - struct pipe_resource *src, - unsigned src_level, - const struct pipe_box *src_box) -{ - struct pipe_transfer *src_trans, *dst_trans; - void *dst_map; - const void *src_map; - enum pipe_format src_format, dst_format; - unsigned w = src_box->width; - unsigned h = src_box->height; - - assert(src && dst); - assert((src->target == PIPE_BUFFER && dst->target == PIPE_BUFFER) || - (src->target != PIPE_BUFFER && dst->target != PIPE_BUFFER)); - - if (!src || !dst) - return; - - src_format = src->format; - dst_format = dst->format; - - src_trans = pipe_get_transfer(pipe, - src, - src_level, - src_box->z, - PIPE_TRANSFER_READ, - src_box->x, src_box->y, w, h); - - dst_trans = pipe_get_transfer(pipe, - dst, - dst_level, - dst_z, - PIPE_TRANSFER_WRITE, - dst_x, dst_y, w, h); - - assert(util_format_get_blocksize(dst_format) == util_format_get_blocksize(src_format)); - assert(util_format_get_blockwidth(dst_format) == util_format_get_blockwidth(src_format)); - assert(util_format_get_blockheight(dst_format) == util_format_get_blockheight(src_format)); - - src_map = pipe->transfer_map(pipe, src_trans); - dst_map = pipe->transfer_map(pipe, dst_trans); - - assert(src_map); - assert(dst_map); - - if (src_map && dst_map) { - if (dst->target == PIPE_BUFFER && src->target == PIPE_BUFFER) { - memcpy(dst_map, src_map, w); - } else { - util_copy_rect(dst_map, - dst_format, - dst_trans->stride, - 0, 0, - w, h, - src_map, - src_trans->stride, - 0, - 0); - } - } - - pipe->transfer_unmap(pipe, src_trans); - pipe->transfer_unmap(pipe, dst_trans); - - pipe->transfer_destroy(pipe, src_trans); - pipe->transfer_destroy(pipe, dst_trans); -} - - - -#define UBYTE_TO_USHORT(B) ((B) | ((B) << 8)) - - -/** - * Fallback for pipe->clear_render_target() function. - * XXX this looks too hackish to be really useful. - * cpp > 4 looks like a gross hack at best... - * Plus can't use these transfer fallbacks when clearing - * multisampled surfaces for instance. - */ -void -util_clear_render_target(struct pipe_context *pipe, - struct pipe_surface *dst, - const union pipe_color_union *color, - unsigned dstx, unsigned dsty, - unsigned width, unsigned height) -{ - struct pipe_transfer *dst_trans; - void *dst_map; - union util_color uc; - - assert(dst->texture); - if (!dst->texture) - return; - /* XXX: should handle multiple layers */ - dst_trans = pipe_get_transfer(pipe, - dst->texture, - dst->u.tex.level, - dst->u.tex.first_layer, - PIPE_TRANSFER_WRITE, - dstx, dsty, width, height); - - dst_map = pipe->transfer_map(pipe, dst_trans); - - assert(dst_map); - - if (dst_map) { - assert(dst_trans->stride > 0); - - util_pack_color(color->f, dst->texture->format, &uc); - util_fill_rect(dst_map, dst->texture->format, - dst_trans->stride, - 0, 0, width, height, &uc); - } - - pipe->transfer_unmap(pipe, dst_trans); - pipe->transfer_destroy(pipe, dst_trans); -} - -/** - * Fallback for pipe->clear_stencil() function. - * sw fallback doesn't look terribly useful here. - * Plus can't use these transfer fallbacks when clearing - * multisampled surfaces for instance. - */ -void -util_clear_depth_stencil(struct pipe_context *pipe, - struct pipe_surface *dst, - unsigned clear_flags, - double depth, - unsigned stencil, - unsigned dstx, unsigned dsty, - unsigned width, unsigned height) -{ - struct pipe_transfer *dst_trans; - ubyte *dst_map; - boolean need_rmw = FALSE; - - if ((clear_flags & PIPE_CLEAR_DEPTHSTENCIL) && - ((clear_flags & PIPE_CLEAR_DEPTHSTENCIL) != PIPE_CLEAR_DEPTHSTENCIL) && - util_format_is_depth_and_stencil(dst->format)) - need_rmw = TRUE; - - assert(dst->texture); - if (!dst->texture) - return; - dst_trans = pipe_get_transfer(pipe, - dst->texture, - dst->u.tex.level, - dst->u.tex.first_layer, - (need_rmw ? PIPE_TRANSFER_READ_WRITE : - PIPE_TRANSFER_WRITE), - dstx, dsty, width, height); - - dst_map = pipe->transfer_map(pipe, dst_trans); - - assert(dst_map); - - if (dst_map) { - unsigned dst_stride = dst_trans->stride; - unsigned zstencil = util_pack_z_stencil(dst->texture->format, depth, stencil); - unsigned i, j; - assert(dst_trans->stride > 0); - - switch (util_format_get_blocksize(dst->format)) { - case 1: - assert(dst->format == PIPE_FORMAT_S8_UINT); - if(dst_stride == width) - memset(dst_map, (ubyte) zstencil, height * width); - else { - for (i = 0; i < height; i++) { - memset(dst_map, (ubyte) zstencil, width); - dst_map += dst_stride; - } - } - break; - case 2: - assert(dst->format == PIPE_FORMAT_Z16_UNORM); - for (i = 0; i < height; i++) { - uint16_t *row = (uint16_t *)dst_map; - for (j = 0; j < width; j++) - *row++ = (uint16_t) zstencil; - dst_map += dst_stride; - } - break; - case 4: - if (!need_rmw) { - for (i = 0; i < height; i++) { - uint32_t *row = (uint32_t *)dst_map; - for (j = 0; j < width; j++) - *row++ = zstencil; - dst_map += dst_stride; - } - } - else { - uint32_t dst_mask; - if (dst->format == PIPE_FORMAT_Z24_UNORM_S8_UINT) - dst_mask = 0xffffff00; - else { - assert(dst->format == PIPE_FORMAT_S8_UINT_Z24_UNORM); - dst_mask = 0xffffff; - } - if (clear_flags & PIPE_CLEAR_DEPTH) - dst_mask = ~dst_mask; - for (i = 0; i < height; i++) { - uint32_t *row = (uint32_t *)dst_map; - for (j = 0; j < width; j++) { - uint32_t tmp = *row & dst_mask; - *row++ = tmp | (zstencil & ~dst_mask); - } - dst_map += dst_stride; - } - } - break; - case 8: - { - uint64_t zstencil = util_pack64_z_stencil(dst->texture->format, - depth, stencil); - - assert(dst->format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT); - - if (!need_rmw) { - for (i = 0; i < height; i++) { - uint64_t *row = (uint64_t *)dst_map; - for (j = 0; j < width; j++) - *row++ = zstencil; - dst_map += dst_stride; - } - } - else { - uint64_t src_mask; - - if (clear_flags & PIPE_CLEAR_DEPTH) - src_mask = 0x00000000ffffffffull; - else - src_mask = 0x000000ff00000000ull; - - for (i = 0; i < height; i++) { - uint64_t *row = (uint64_t *)dst_map; - for (j = 0; j < width; j++) { - uint64_t tmp = *row & ~src_mask; - *row++ = tmp | (zstencil & src_mask); - } - dst_map += dst_stride; - } - } - break; - } - default: - assert(0); - break; - } - } - - pipe->transfer_unmap(pipe, dst_trans); - pipe->transfer_destroy(pipe, dst_trans); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_surface.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_surface.h deleted file mode 100644 index 1117b78da7a..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_surface.h +++ /dev/null @@ -1,90 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#ifndef U_SURFACE_H -#define U_SURFACE_H - - -#include "pipe/p_compiler.h" -#include "pipe/p_state.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -extern void -u_surface_default_template(struct pipe_surface *view, - const struct pipe_resource *texture, - unsigned bind); - -extern boolean -util_create_rgba_surface(struct pipe_context *ctx, - uint width, uint height, uint bind, - struct pipe_resource **textureOut, - struct pipe_surface **surfaceOut); - - -extern void -util_destroy_rgba_surface(struct pipe_resource *texture, - struct pipe_surface *surface); - - - -extern void -util_resource_copy_region(struct pipe_context *pipe, - struct pipe_resource *dst, - unsigned dst_level, - unsigned dst_x, unsigned dst_y, unsigned dst_z, - struct pipe_resource *src, - unsigned src_level, - const struct pipe_box *src_box); - -extern void -util_clear_render_target(struct pipe_context *pipe, - struct pipe_surface *dst, - const union pipe_color_union *color, - unsigned dstx, unsigned dsty, - unsigned width, unsigned height); - -extern void -util_clear_depth_stencil(struct pipe_context *pipe, - struct pipe_surface *dst, - unsigned clear_flags, - double depth, - unsigned stencil, - unsigned dstx, unsigned dsty, - unsigned width, unsigned height); - - -#ifdef __cplusplus -} -#endif - - -#endif /* U_SURFACE_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_surfaces.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_surfaces.c deleted file mode 100644 index b0cfec2a826..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_surfaces.c +++ /dev/null @@ -1,124 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Luca Barbieri - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "u_surfaces.h" -#include "util/u_hash_table.h" -#include "util/u_inlines.h" -#include "util/u_memory.h" - -boolean -util_surfaces_do_get(struct util_surfaces *us, unsigned surface_struct_size, - struct pipe_context *ctx, struct pipe_resource *pt, - unsigned level, unsigned layer, unsigned flags, - struct pipe_surface **res) -{ - struct pipe_surface *ps; - - if(pt->target == PIPE_TEXTURE_3D || pt->target == PIPE_TEXTURE_CUBE) - { /* or 2D array */ - if(!us->u.hash) - us->u.hash = cso_hash_create(); - - ps = cso_hash_iter_data(cso_hash_find(us->u.hash, (layer << 8) | level)); - } - else - { - if(!us->u.array) - us->u.array = CALLOC(pt->last_level + 1, sizeof(struct pipe_surface *)); - ps = us->u.array[level]; - } - - if(ps && ps->context == ctx) - { - p_atomic_inc(&ps->reference.count); - *res = ps; - return FALSE; - } - - ps = (struct pipe_surface *)CALLOC(1, surface_struct_size); - if(!ps) - { - *res = NULL; - return FALSE; - } - - pipe_surface_init(ctx, ps, pt, level, layer, flags); - - if(pt->target == PIPE_TEXTURE_3D || pt->target == PIPE_TEXTURE_CUBE) - cso_hash_insert(us->u.hash, (layer << 8) | level, ps); - else - us->u.array[level] = ps; - - *res = ps; - return TRUE; -} - -void -util_surfaces_do_detach(struct util_surfaces *us, struct pipe_surface *ps) -{ - struct pipe_resource *pt = ps->texture; - if(pt->target == PIPE_TEXTURE_3D || pt->target == PIPE_TEXTURE_CUBE) - { /* or 2D array */ - cso_hash_erase(us->u.hash, cso_hash_find(us->u.hash, (ps->u.tex.first_layer << 8) | ps->u.tex.level)); - } - else - us->u.array[ps->u.tex.level] = 0; -} - -void -util_surfaces_destroy(struct util_surfaces *us, struct pipe_resource *pt, void (*destroy_surface) (struct pipe_surface *)) -{ - if(pt->target == PIPE_TEXTURE_3D || pt->target == PIPE_TEXTURE_CUBE) - { /* or 2D array */ - if(us->u.hash) - { - struct cso_hash_iter iter; - iter = cso_hash_first_node(us->u.hash); - while (!cso_hash_iter_is_null(iter)) { - destroy_surface(cso_hash_iter_data(iter)); - iter = cso_hash_iter_next(iter); - } - - cso_hash_delete(us->u.hash); - us->u.hash = NULL; - } - } - else - { - if(us->u.array) - { - unsigned i; - for(i = 0; i <= pt->last_level; ++i) - { - struct pipe_surface *ps = us->u.array[i]; - if(ps) - destroy_surface(ps); - } - FREE(us->u.array); - us->u.array = NULL; - } - } -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_surfaces.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_surfaces.h deleted file mode 100644 index 9581feda7c8..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_surfaces.h +++ /dev/null @@ -1,101 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Luca Barbieri - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial - * portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_SURFACES_H_ -#define U_SURFACES_H_ - -#include "pipe/p_compiler.h" -#include "pipe/p_state.h" -#include "util/u_atomic.h" -#include "cso_cache/cso_hash.h" - -struct util_surfaces -{ - union - { - struct cso_hash *hash; - struct pipe_surface **array; - void* pv; - } u; -}; - -/* Return value indicates if the pipe surface result is new */ -boolean -util_surfaces_do_get(struct util_surfaces *us, unsigned surface_struct_size, - struct pipe_context *ctx, struct pipe_resource *pt, - unsigned level, unsigned layer, unsigned flags, - struct pipe_surface **res); - -/* fast inline path for the very common case */ -static INLINE boolean -util_surfaces_get(struct util_surfaces *us, unsigned surface_struct_size, - struct pipe_context *ctx, struct pipe_resource *pt, - unsigned level, unsigned layer, unsigned flags, - struct pipe_surface **res) -{ - if(likely((pt->target == PIPE_TEXTURE_2D || pt->target == PIPE_TEXTURE_RECT) && us->u.array)) - { - struct pipe_surface *ps = us->u.array[level]; - if(ps && ps->context == ctx) - { - p_atomic_inc(&ps->reference.count); - *res = ps; - return FALSE; - } - } - - return util_surfaces_do_get(us, surface_struct_size, ctx, pt, level, layer, flags, res); -} - -static INLINE struct pipe_surface * -util_surfaces_peek(struct util_surfaces *us, struct pipe_resource *pt, unsigned level, unsigned layer) -{ - if(!us->u.pv) - return 0; - - if(unlikely(pt->target == PIPE_TEXTURE_3D || pt->target == PIPE_TEXTURE_CUBE)) - return cso_hash_iter_data(cso_hash_find(us->u.hash, (layer << 8) | level)); - else - return us->u.array[level]; -} - -void util_surfaces_do_detach(struct util_surfaces *us, struct pipe_surface *ps); - -static INLINE void -util_surfaces_detach(struct util_surfaces *us, struct pipe_surface *ps) -{ - if(likely(ps->texture->target == PIPE_TEXTURE_2D || ps->texture->target == PIPE_TEXTURE_RECT)) - { - us->u.array[ps->u.tex.level] = 0; - return; - } - - util_surfaces_do_detach(us, ps); -} - -void util_surfaces_destroy(struct util_surfaces *us, struct pipe_resource *pt, void (*destroy_surface) (struct pipe_surface *)); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_texture.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_texture.c deleted file mode 100644 index d97e57a7903..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_texture.c +++ /dev/null @@ -1,103 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * Copyright 2008 VMware, Inc. All rights reserved. - * Copyright 2009 Marek Olšák - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Texture mapping utility functions. - * - * @author Brian Paul - * Marek Olšák - */ - -#include "pipe/p_defines.h" - -#include "util/u_debug.h" -#include "util/u_texture.h" - -void util_map_texcoords2d_onto_cubemap(unsigned face, - const float *in_st, unsigned in_stride, - float *out_str, unsigned out_stride) -{ - int i; - float rx, ry, rz; - - /* loop over quad verts */ - for (i = 0; i < 4; i++) { - /* Compute sc = +/-scale and tc = +/-scale. - * Not +/-1 to avoid cube face selection ambiguity near the edges, - * though that can still sometimes happen with this scale factor... - */ - const float scale = 0.9999f; - const float sc = (2 * in_st[0] - 1) * scale; - const float tc = (2 * in_st[1] - 1) * scale; - - switch (face) { - case PIPE_TEX_FACE_POS_X: - rx = 1; - ry = -tc; - rz = -sc; - break; - case PIPE_TEX_FACE_NEG_X: - rx = -1; - ry = -tc; - rz = sc; - break; - case PIPE_TEX_FACE_POS_Y: - rx = sc; - ry = 1; - rz = tc; - break; - case PIPE_TEX_FACE_NEG_Y: - rx = sc; - ry = -1; - rz = -tc; - break; - case PIPE_TEX_FACE_POS_Z: - rx = sc; - ry = -tc; - rz = 1; - break; - case PIPE_TEX_FACE_NEG_Z: - rx = -sc; - ry = -tc; - rz = -1; - break; - default: - rx = ry = rz = 0; - assert(0); - } - - out_str[0] = rx; /*s*/ - out_str[1] = ry; /*t*/ - out_str[2] = rz; /*r*/ - - in_st += in_stride; - out_str += out_stride; - } -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_texture.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_texture.h deleted file mode 100644 index 93b2f1e4c97..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_texture.h +++ /dev/null @@ -1,54 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 Marek Olšák - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_TEXTURE_H -#define U_TEXTURE_H - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Convert 2D texture coordinates of 4 vertices into cubemap coordinates - * in the given face. - * Coordinates must be in the range [0,1]. - * - * \param face Cubemap face. - * \param in_st 4 pairs of 2D texture coordinates to convert. - * \param in_stride Stride of in_st in floats. - * \param out_str STR cubemap texture coordinates to compute. - * \param out_stride Stride of out_str in floats. - */ -void util_map_texcoords2d_onto_cubemap(unsigned face, - const float *in_st, unsigned in_stride, - float *out_str, unsigned out_stride); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_tile.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_tile.c deleted file mode 100644 index ea4b91f959a..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_tile.c +++ /dev/null @@ -1,856 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * RGBA/float tile get/put functions. - * Usable both by drivers and state trackers. - */ - - -#include "pipe/p_defines.h" -#include "util/u_inlines.h" - -#include "util/u_format.h" -#include "util/u_math.h" -#include "util/u_memory.h" -#include "util/u_rect.h" -#include "util/u_tile.h" - - -/** - * Move raw block of pixels from transfer object to user memory. - */ -void -pipe_get_tile_raw(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - void *dst, int dst_stride) -{ - const void *src; - - if (dst_stride == 0) - dst_stride = util_format_get_stride(pt->resource->format, w); - - if (u_clip_tile(x, y, &w, &h, &pt->box)) - return; - - src = pipe->transfer_map(pipe, pt); - assert(src); - if(!src) - return; - - util_copy_rect(dst, pt->resource->format, dst_stride, 0, 0, w, h, src, pt->stride, x, y); - - pipe->transfer_unmap(pipe, pt); -} - - -/** - * Move raw block of pixels from user memory to transfer object. - */ -void -pipe_put_tile_raw(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - const void *src, int src_stride) -{ - void *dst; - enum pipe_format format = pt->resource->format; - - if (src_stride == 0) - src_stride = util_format_get_stride(format, w); - - if (u_clip_tile(x, y, &w, &h, &pt->box)) - return; - - dst = pipe->transfer_map(pipe, pt); - assert(dst); - if(!dst) - return; - - util_copy_rect(dst, format, pt->stride, x, y, w, h, src, src_stride, 0, 0); - - pipe->transfer_unmap(pipe, pt); -} - - - - -/** Convert short in [-32768,32767] to GLfloat in [-1.0,1.0] */ -#define SHORT_TO_FLOAT(S) ((2.0F * (S) + 1.0F) * (1.0F/65535.0F)) - -#define UNCLAMPED_FLOAT_TO_SHORT(us, f) \ - us = ( (short) ( CLAMP((f), -1.0, 1.0) * 32767.0F) ) - - - -/*** PIPE_FORMAT_Z16_UNORM ***/ - -/** - * Return each Z value as four floats in [0,1]. - */ -static void -z16_get_tile_rgba(const ushort *src, - unsigned w, unsigned h, - float *p, - unsigned dst_stride) -{ - const float scale = 1.0f / 65535.0f; - unsigned i, j; - - for (i = 0; i < h; i++) { - float *pRow = p; - for (j = 0; j < w; j++, pRow += 4) { - pRow[0] = - pRow[1] = - pRow[2] = - pRow[3] = *src++ * scale; - } - p += dst_stride; - } -} - - - - -/*** PIPE_FORMAT_Z32_UNORM ***/ - -/** - * Return each Z value as four floats in [0,1]. - */ -static void -z32_get_tile_rgba(const unsigned *src, - unsigned w, unsigned h, - float *p, - unsigned dst_stride) -{ - const double scale = 1.0 / (double) 0xffffffff; - unsigned i, j; - - for (i = 0; i < h; i++) { - float *pRow = p; - for (j = 0; j < w; j++, pRow += 4) { - pRow[0] = - pRow[1] = - pRow[2] = - pRow[3] = (float) (*src++ * scale); - } - p += dst_stride; - } -} - - -/*** PIPE_FORMAT_Z24_UNORM_S8_UINT ***/ - -/** - * Return Z component as four float in [0,1]. Stencil part ignored. - */ -static void -s8z24_get_tile_rgba(const unsigned *src, - unsigned w, unsigned h, - float *p, - unsigned dst_stride) -{ - const double scale = 1.0 / ((1 << 24) - 1); - unsigned i, j; - - for (i = 0; i < h; i++) { - float *pRow = p; - for (j = 0; j < w; j++, pRow += 4) { - pRow[0] = - pRow[1] = - pRow[2] = - pRow[3] = (float) (scale * (*src++ & 0xffffff)); - } - p += dst_stride; - } -} - - -/*** PIPE_FORMAT_S8_UINT_Z24_UNORM ***/ - -/** - * Return Z component as four float in [0,1]. Stencil part ignored. - */ -static void -z24s8_get_tile_rgba(const unsigned *src, - unsigned w, unsigned h, - float *p, - unsigned dst_stride) -{ - const double scale = 1.0 / ((1 << 24) - 1); - unsigned i, j; - - for (i = 0; i < h; i++) { - float *pRow = p; - for (j = 0; j < w; j++, pRow += 4) { - pRow[0] = - pRow[1] = - pRow[2] = - pRow[3] = (float) (scale * (*src++ >> 8)); - } - p += dst_stride; - } -} - -/*** PIPE_FORMAT_S8X24_UINT ***/ - -/** - * Return S component as four uint32_t in [0..255]. Z part ignored. - */ -static void -s8x24_get_tile_rgba(const unsigned *src, - unsigned w, unsigned h, - float *p, - unsigned dst_stride) -{ - unsigned i, j; - - for (i = 0; i < h; i++) { - float *pRow = p; - - for (j = 0; j < w; j++, pRow += 4) { - pRow[0] = - pRow[1] = - pRow[2] = - pRow[3] = (float)((*src++ >> 24) & 0xff); - } - - p += dst_stride; - } -} - -/*** PIPE_FORMAT_X24S8_UINT ***/ - -/** - * Return S component as four uint32_t in [0..255]. Z part ignored. - */ -static void -x24s8_get_tile_rgba(const unsigned *src, - unsigned w, unsigned h, - float *p, - unsigned dst_stride) -{ - unsigned i, j; - - for (i = 0; i < h; i++) { - float *pRow = p; - for (j = 0; j < w; j++, pRow += 4) { - pRow[0] = - pRow[1] = - pRow[2] = - pRow[3] = (float)(*src++ & 0xff); - } - p += dst_stride; - } -} - - -/** - * Return S component as four uint32_t in [0..255]. Z part ignored. - */ -static void -s8_get_tile_rgba(const unsigned char *src, - unsigned w, unsigned h, - float *p, - unsigned dst_stride) -{ - unsigned i, j; - - for (i = 0; i < h; i++) { - float *pRow = p; - for (j = 0; j < w; j++, pRow += 4) { - pRow[0] = - pRow[1] = - pRow[2] = - pRow[3] = (float)(*src++ & 0xff); - } - p += dst_stride; - } -} - -/*** PIPE_FORMAT_Z32_FLOAT ***/ - -/** - * Return each Z value as four floats in [0,1]. - */ -static void -z32f_get_tile_rgba(const float *src, - unsigned w, unsigned h, - float *p, - unsigned dst_stride) -{ - unsigned i, j; - - for (i = 0; i < h; i++) { - float *pRow = p; - for (j = 0; j < w; j++, pRow += 4) { - pRow[0] = - pRow[1] = - pRow[2] = - pRow[3] = *src++; - } - p += dst_stride; - } -} - -/*** PIPE_FORMAT_Z32_FLOAT_S8X24_UINT ***/ - -/** - * Return each Z value as four floats in [0,1]. - */ -static void -z32f_x24s8_get_tile_rgba(const float *src, - unsigned w, unsigned h, - float *p, - unsigned dst_stride) -{ - unsigned i, j; - - for (i = 0; i < h; i++) { - float *pRow = p; - for (j = 0; j < w; j++, pRow += 4) { - pRow[0] = - pRow[1] = - pRow[2] = - pRow[3] = *src; - src += 2; - } - p += dst_stride; - } -} - -/*** PIPE_FORMAT_X32_S8X24_UINT ***/ - -/** - * Return S component as four uint32_t in [0..255]. Z part ignored. - */ -static void -x32_s8_get_tile_rgba(const unsigned *src, - unsigned w, unsigned h, - float *p, - unsigned dst_stride) -{ - unsigned i, j; - - for (i = 0; i < h; i++) { - float *pRow = p; - for (j = 0; j < w; j++, pRow += 4) { - src++; - pRow[0] = - pRow[1] = - pRow[2] = - pRow[3] = (float)(*src++ & 0xff); - } - p += dst_stride; - } -} - -void -pipe_tile_raw_to_rgba(enum pipe_format format, - void *src, - uint w, uint h, - float *dst, unsigned dst_stride) -{ - switch (format) { - case PIPE_FORMAT_Z16_UNORM: - z16_get_tile_rgba((ushort *) src, w, h, dst, dst_stride); - break; - case PIPE_FORMAT_Z32_UNORM: - z32_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride); - break; - case PIPE_FORMAT_Z24_UNORM_S8_UINT: - case PIPE_FORMAT_Z24X8_UNORM: - s8z24_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride); - break; - case PIPE_FORMAT_S8_UINT: - s8_get_tile_rgba((unsigned char *) src, w, h, dst, dst_stride); - break; - case PIPE_FORMAT_X24S8_UINT: - s8x24_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride); - break; - case PIPE_FORMAT_S8_UINT_Z24_UNORM: - case PIPE_FORMAT_X8Z24_UNORM: - z24s8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride); - break; - case PIPE_FORMAT_S8X24_UINT: - x24s8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride); - break; - case PIPE_FORMAT_Z32_FLOAT: - z32f_get_tile_rgba((float *) src, w, h, dst, dst_stride); - break; - case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT: - z32f_x24s8_get_tile_rgba((float *) src, w, h, dst, dst_stride); - break; - case PIPE_FORMAT_X32_S8X24_UINT: - x32_s8_get_tile_rgba((unsigned *) src, w, h, dst, dst_stride); - break; - default: - util_format_read_4f(format, - dst, dst_stride * sizeof(float), - src, util_format_get_stride(format, w), - 0, 0, w, h); - } -} - -void -pipe_tile_raw_to_unsigned(enum pipe_format format, - void *src, - uint w, uint h, - unsigned *dst, unsigned dst_stride) -{ - util_format_read_4ui(format, - dst, dst_stride * sizeof(float), - src, util_format_get_stride(format, w), - 0, 0, w, h); -} - -void -pipe_tile_raw_to_signed(enum pipe_format format, - void *src, - uint w, uint h, - int *dst, unsigned dst_stride) -{ - util_format_read_4i(format, - dst, dst_stride * sizeof(float), - src, util_format_get_stride(format, w), - 0, 0, w, h); -} - -void -pipe_get_tile_rgba(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - float *p) -{ - pipe_get_tile_rgba_format(pipe, pt, x, y, w, h, pt->resource->format, p); -} - - -void -pipe_get_tile_rgba_format(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - enum pipe_format format, - float *p) -{ - unsigned dst_stride = w * 4; - void *packed; - - if (u_clip_tile(x, y, &w, &h, &pt->box)) { - return; - } - - packed = MALLOC(util_format_get_nblocks(format, w, h) * util_format_get_blocksize(format)); - if (!packed) { - return; - } - - if (format == PIPE_FORMAT_UYVY || format == PIPE_FORMAT_YUYV) { - assert((x & 1) == 0); - } - - pipe_get_tile_raw(pipe, pt, x, y, w, h, packed, 0); - - pipe_tile_raw_to_rgba(format, packed, w, h, p, dst_stride); - - FREE(packed); -} - - -void -pipe_put_tile_rgba(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - const float *p) -{ - pipe_put_tile_rgba_format(pipe, pt, x, y, w, h, pt->resource->format, p); -} - - -void -pipe_put_tile_rgba_format(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - enum pipe_format format, - const float *p) -{ - unsigned src_stride = w * 4; - void *packed; - - if (u_clip_tile(x, y, &w, &h, &pt->box)) - return; - - packed = MALLOC(util_format_get_nblocks(format, w, h) * util_format_get_blocksize(format)); - - if (!packed) - return; - - switch (format) { - case PIPE_FORMAT_Z16_UNORM: - /*z16_put_tile_rgba((ushort *) packed, w, h, p, src_stride);*/ - break; - case PIPE_FORMAT_Z32_UNORM: - /*z32_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/ - break; - case PIPE_FORMAT_Z24_UNORM_S8_UINT: - case PIPE_FORMAT_Z24X8_UNORM: - /*s8z24_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/ - break; - case PIPE_FORMAT_S8_UINT_Z24_UNORM: - case PIPE_FORMAT_X8Z24_UNORM: - /*z24s8_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/ - break; - case PIPE_FORMAT_Z32_FLOAT: - /*z32f_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/ - break; - case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT: - /*z32f_s8x24_put_tile_rgba((unsigned *) packed, w, h, p, src_stride);*/ - break; - default: - util_format_write_4f(format, - p, src_stride * sizeof(float), - packed, util_format_get_stride(format, w), - 0, 0, w, h); - } - - pipe_put_tile_raw(pipe, pt, x, y, w, h, packed, 0); - - FREE(packed); -} - -void -pipe_put_tile_i_format(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - enum pipe_format format, - const int *p) -{ - unsigned src_stride = w * 4; - void *packed; - - if (u_clip_tile(x, y, &w, &h, &pt->box)) - return; - - packed = MALLOC(util_format_get_nblocks(format, w, h) * util_format_get_blocksize(format)); - - if (!packed) - return; - - util_format_write_4i(format, - p, src_stride * sizeof(float), - packed, util_format_get_stride(format, w), - 0, 0, w, h); - - pipe_put_tile_raw(pipe, pt, x, y, w, h, packed, 0); - - FREE(packed); -} - -void -pipe_put_tile_ui_format(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - enum pipe_format format, - const unsigned int *p) -{ - unsigned src_stride = w * 4; - void *packed; - - if (u_clip_tile(x, y, &w, &h, &pt->box)) - return; - - packed = MALLOC(util_format_get_nblocks(format, w, h) * util_format_get_blocksize(format)); - - if (!packed) - return; - - util_format_write_4ui(format, - p, src_stride * sizeof(float), - packed, util_format_get_stride(format, w), - 0, 0, w, h); - - pipe_put_tile_raw(pipe, pt, x, y, w, h, packed, 0); - - FREE(packed); -} - -/** - * Get a block of Z values, converted to 32-bit range. - */ -void -pipe_get_tile_z(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - uint *z) -{ - const uint dstStride = w; - ubyte *map; - uint *pDest = z; - uint i, j; - enum pipe_format format = pt->resource->format; - - if (u_clip_tile(x, y, &w, &h, &pt->box)) - return; - - map = (ubyte *)pipe->transfer_map(pipe, pt); - if (!map) { - assert(0); - return; - } - - switch (format) { - case PIPE_FORMAT_Z32_UNORM: - { - const uint *ptrc - = (const uint *)(map + y * pt->stride + x*4); - for (i = 0; i < h; i++) { - memcpy(pDest, ptrc, 4 * w); - pDest += dstStride; - ptrc += pt->stride/4; - } - } - break; - case PIPE_FORMAT_Z24_UNORM_S8_UINT: - case PIPE_FORMAT_Z24X8_UNORM: - { - const uint *ptrc - = (const uint *)(map + y * pt->stride + x*4); - for (i = 0; i < h; i++) { - for (j = 0; j < w; j++) { - /* convert 24-bit Z to 32-bit Z */ - pDest[j] = (ptrc[j] << 8) | ((ptrc[j] >> 16) & 0xff); - } - pDest += dstStride; - ptrc += pt->stride/4; - } - } - break; - case PIPE_FORMAT_S8_UINT_Z24_UNORM: - case PIPE_FORMAT_X8Z24_UNORM: - { - const uint *ptrc - = (const uint *)(map + y * pt->stride + x*4); - for (i = 0; i < h; i++) { - for (j = 0; j < w; j++) { - /* convert 24-bit Z to 32-bit Z */ - pDest[j] = (ptrc[j] & 0xffffff00) | ((ptrc[j] >> 24) & 0xff); - } - pDest += dstStride; - ptrc += pt->stride/4; - } - } - break; - case PIPE_FORMAT_Z16_UNORM: - { - const ushort *ptrc - = (const ushort *)(map + y * pt->stride + x*2); - for (i = 0; i < h; i++) { - for (j = 0; j < w; j++) { - /* convert 16-bit Z to 32-bit Z */ - pDest[j] = (ptrc[j] << 16) | ptrc[j]; - } - pDest += dstStride; - ptrc += pt->stride/2; - } - } - break; - default: - assert(0); - } - - pipe->transfer_unmap(pipe, pt); -} - - -void -pipe_put_tile_z(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - const uint *zSrc) -{ - const uint srcStride = w; - const uint *ptrc = zSrc; - ubyte *map; - uint i, j; - enum pipe_format format = pt->resource->format; - - if (u_clip_tile(x, y, &w, &h, &pt->box)) - return; - - map = (ubyte *)pipe->transfer_map(pipe, pt); - if (!map) { - assert(0); - return; - } - - switch (format) { - case PIPE_FORMAT_Z32_UNORM: - { - uint *pDest = (uint *) (map + y * pt->stride + x*4); - for (i = 0; i < h; i++) { - memcpy(pDest, ptrc, 4 * w); - pDest += pt->stride/4; - ptrc += srcStride; - } - } - break; - case PIPE_FORMAT_Z24_UNORM_S8_UINT: - { - uint *pDest = (uint *) (map + y * pt->stride + x*4); - /*assert((pt->usage & PIPE_TRANSFER_READ_WRITE) == PIPE_TRANSFER_READ_WRITE);*/ - for (i = 0; i < h; i++) { - for (j = 0; j < w; j++) { - /* convert 32-bit Z to 24-bit Z, preserve stencil */ - pDest[j] = (pDest[j] & 0xff000000) | ptrc[j] >> 8; - } - pDest += pt->stride/4; - ptrc += srcStride; - } - } - break; - case PIPE_FORMAT_Z24X8_UNORM: - { - uint *pDest = (uint *) (map + y * pt->stride + x*4); - for (i = 0; i < h; i++) { - for (j = 0; j < w; j++) { - /* convert 32-bit Z to 24-bit Z (0 stencil) */ - pDest[j] = ptrc[j] >> 8; - } - pDest += pt->stride/4; - ptrc += srcStride; - } - } - break; - case PIPE_FORMAT_S8_UINT_Z24_UNORM: - { - uint *pDest = (uint *) (map + y * pt->stride + x*4); - /*assert((pt->usage & PIPE_TRANSFER_READ_WRITE) == PIPE_TRANSFER_READ_WRITE);*/ - for (i = 0; i < h; i++) { - for (j = 0; j < w; j++) { - /* convert 32-bit Z to 24-bit Z, preserve stencil */ - pDest[j] = (pDest[j] & 0xff) | (ptrc[j] & 0xffffff00); - } - pDest += pt->stride/4; - ptrc += srcStride; - } - } - break; - case PIPE_FORMAT_X8Z24_UNORM: - { - uint *pDest = (uint *) (map + y * pt->stride + x*4); - for (i = 0; i < h; i++) { - for (j = 0; j < w; j++) { - /* convert 32-bit Z to 24-bit Z (0 stencil) */ - pDest[j] = ptrc[j] & 0xffffff00; - } - pDest += pt->stride/4; - ptrc += srcStride; - } - } - break; - case PIPE_FORMAT_Z16_UNORM: - { - ushort *pDest = (ushort *) (map + y * pt->stride + x*2); - for (i = 0; i < h; i++) { - for (j = 0; j < w; j++) { - /* convert 32-bit Z to 16-bit Z */ - pDest[j] = ptrc[j] >> 16; - } - pDest += pt->stride/2; - ptrc += srcStride; - } - } - break; - default: - assert(0); - } - - pipe->transfer_unmap(pipe, pt); -} - - -void -pipe_get_tile_ui_format(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - enum pipe_format format, - unsigned int *p) -{ - unsigned dst_stride = w * 4; - void *packed; - - if (u_clip_tile(x, y, &w, &h, &pt->box)) { - return; - } - - packed = MALLOC(util_format_get_nblocks(format, w, h) * util_format_get_blocksize(format)); - if (!packed) { - return; - } - - if (format == PIPE_FORMAT_UYVY || format == PIPE_FORMAT_YUYV) { - assert((x & 1) == 0); - } - - pipe_get_tile_raw(pipe, pt, x, y, w, h, packed, 0); - - pipe_tile_raw_to_unsigned(format, packed, w, h, p, dst_stride); - - FREE(packed); -} - - -void -pipe_get_tile_i_format(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - enum pipe_format format, - int *p) -{ - unsigned dst_stride = w * 4; - void *packed; - - if (u_clip_tile(x, y, &w, &h, &pt->box)) { - return; - } - - packed = MALLOC(util_format_get_nblocks(format, w, h) * util_format_get_blocksize(format)); - if (!packed) { - return; - } - - if (format == PIPE_FORMAT_UYVY || format == PIPE_FORMAT_YUYV) { - assert((x & 1) == 0); - } - - pipe_get_tile_raw(pipe, pt, x, y, w, h, packed, 0); - - pipe_tile_raw_to_signed(format, packed, w, h, p, dst_stride); - - FREE(packed); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_tile.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_tile.h deleted file mode 100644 index 926f1695feb..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_tile.h +++ /dev/null @@ -1,165 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef P_TILE_H -#define P_TILE_H - -#include "pipe/p_compiler.h" -#include "pipe/p_format.h" -#include "pipe/p_state.h" - -struct pipe_context; -struct pipe_transfer; - -/** - * Clip tile against transfer dims. - * - * XXX: this only clips width and height! - * - * \return TRUE if tile is totally clipped, FALSE otherwise - */ -static INLINE boolean -u_clip_tile(uint x, uint y, uint *w, uint *h, const struct pipe_box *box) -{ - if (x >= box->width) - return TRUE; - if (y >= box->height) - return TRUE; - if (x + *w > box->width) - *w = box->width - x; - if (y + *h > box->height) - *h = box->height - y; - return FALSE; -} - -#ifdef __cplusplus -extern "C" { -#endif - -void -pipe_get_tile_raw(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - void *p, int dst_stride); - -void -pipe_put_tile_raw(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - const void *p, int src_stride); - - -void -pipe_get_tile_rgba(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - float *p); - -void -pipe_get_tile_rgba_format(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - enum pipe_format format, - float *p); - -void -pipe_put_tile_rgba(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - const float *p); - -void -pipe_put_tile_rgba_format(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - enum pipe_format format, - const float *p); - - -void -pipe_get_tile_z(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - uint *z); - -void -pipe_put_tile_z(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - const uint *z); - -void -pipe_tile_raw_to_rgba(enum pipe_format format, - void *src, - uint w, uint h, - float *dst, unsigned dst_stride); - -void -pipe_tile_raw_to_unsigned(enum pipe_format format, - void *src, - uint w, uint h, - unsigned *dst, unsigned dst_stride); - -void -pipe_tile_raw_to_signed(enum pipe_format format, - void *src, - uint w, uint h, - int *dst, unsigned dst_stride); - -void -pipe_get_tile_ui_format(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - enum pipe_format format, - unsigned int *p); - -void -pipe_get_tile_i_format(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - enum pipe_format format, - int *p); - -void -pipe_put_tile_ui_format(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - enum pipe_format format, - const unsigned *p); - -void -pipe_put_tile_i_format(struct pipe_context *pipe, - struct pipe_transfer *pt, - uint x, uint y, uint w, uint h, - enum pipe_format format, - const int *p); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_time.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_time.h deleted file mode 100644 index 15899c2c884..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_time.h +++ /dev/null @@ -1,150 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * OS independent time-manipulation functions. - * - * @author Jose Fonseca - */ - -#ifndef U_TIME_H_ -#define U_TIME_H_ - - -#include "pipe/p_config.h" - -#include "os/os_time.h" - -#include "pipe/p_compiler.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -/** - * Time abstraction. - * - * Do not access this structure directly. Use the provided function instead. - */ -struct util_time -{ - int64_t counter; -}; - - -PIPE_DEPRECATED -static INLINE void -util_time_get(struct util_time *t) -{ - t->counter = os_time_get(); -} - - -/** - * Return t2 = t1 + usecs - */ -PIPE_DEPRECATED -static INLINE void -util_time_add(const struct util_time *t1, - int64_t usecs, - struct util_time *t2) -{ - t2->counter = t1->counter + usecs; -} - - -/** - * Return difference between times, in microseconds - */ -PIPE_DEPRECATED -static INLINE int64_t -util_time_diff(const struct util_time *t1, - const struct util_time *t2) -{ - return t2->counter - t1->counter; -} - - -/** - * Compare two time values. - * - * Not publicly available because it does not take in account wrap-arounds. - * Use util_time_timeout instead. - */ -static INLINE int -_util_time_compare(const struct util_time *t1, - const struct util_time *t2) -{ - if (t1->counter < t2->counter) - return -1; - else if(t1->counter > t2->counter) - return 1; - else - return 0; -} - - -/** - * Returns non-zero when the timeout expires. - */ -PIPE_DEPRECATED -static INLINE boolean -util_time_timeout(const struct util_time *start, - const struct util_time *end, - const struct util_time *curr) -{ - return os_time_timeout(start->counter, end->counter, curr->counter); -} - - -/** - * Return current time in microseconds - */ -PIPE_DEPRECATED -static INLINE int64_t -util_time_micros(void) -{ - return os_time_get(); -} - - -PIPE_DEPRECATED -static INLINE void -util_time_sleep(int64_t usecs) -{ - os_time_sleep(usecs); -} - - -#ifdef __cplusplus -} -#endif - -#endif /* U_TIME_H_ */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_transfer.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_transfer.c deleted file mode 100644 index 7e72a59ee00..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_transfer.c +++ /dev/null @@ -1,114 +0,0 @@ -#include "pipe/p_context.h" -#include "util/u_rect.h" -#include "util/u_inlines.h" -#include "util/u_transfer.h" -#include "util/u_memory.h" - -/* One-shot transfer operation with data supplied in a user - * pointer. XXX: strides?? - */ -void u_default_transfer_inline_write( struct pipe_context *pipe, - struct pipe_resource *resource, - unsigned level, - unsigned usage, - const struct pipe_box *box, - const void *data, - unsigned stride, - unsigned layer_stride) -{ - struct pipe_transfer *transfer = NULL; - uint8_t *map = NULL; - const uint8_t *src_data = data; - unsigned i; - - transfer = pipe->get_transfer(pipe, - resource, - level, - usage, - box ); - if (transfer == NULL) - goto out; - - map = pipe_transfer_map(pipe, transfer); - if (map == NULL) - goto out; - - for (i = 0; i < box->depth; i++) { - util_copy_rect(map, - resource->format, - transfer->stride, /* bytes */ - 0, 0, - box->width, - box->height, - src_data, - stride, /* bytes */ - 0, 0); - map += transfer->layer_stride; - src_data += layer_stride; - } - -out: - if (map) - pipe_transfer_unmap(pipe, transfer); - - if (transfer) - pipe_transfer_destroy(pipe, transfer); -} - - -boolean u_default_resource_get_handle(struct pipe_screen *screen, - struct pipe_resource *resource, - struct winsys_handle *handle) -{ - return FALSE; -} - - - -void u_default_transfer_flush_region( struct pipe_context *pipe, - struct pipe_transfer *transfer, - const struct pipe_box *box) -{ - /* This is a no-op implementation, nothing to do. - */ -} - -struct pipe_transfer * u_default_get_transfer(struct pipe_context *context, - struct pipe_resource *resource, - unsigned level, - unsigned usage, - const struct pipe_box *box) -{ - struct pipe_transfer *transfer = CALLOC_STRUCT(pipe_transfer); - if (transfer == NULL) - return NULL; - - transfer->resource = resource; - transfer->level = level; - transfer->usage = usage; - transfer->box = *box; - - /* Note strides are zero, this is ok for buffers, but not for - * textures 2d & higher at least. - */ - return transfer; -} - -void u_default_transfer_unmap( struct pipe_context *pipe, - struct pipe_transfer *transfer ) -{ -} - -void u_default_transfer_destroy(struct pipe_context *pipe, - struct pipe_transfer *transfer) -{ - FREE(transfer); -} - -void u_default_redefine_user_buffer(struct pipe_context *ctx, - struct pipe_resource *resource, - unsigned offset, - unsigned size) -{ - resource->width0 = MAX2(resource->width0, offset + size); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_transfer.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_transfer.h deleted file mode 100644 index 5b5ddeb4aba..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_transfer.h +++ /dev/null @@ -1,132 +0,0 @@ - -#ifndef U_TRANSFER_H -#define U_TRANSFER_H - -/* Fallback implementations for inline read/writes which just go back - * to the regular transfer behaviour. - */ -#include "pipe/p_state.h" - -struct pipe_context; -struct winsys_handle; - -boolean u_default_resource_get_handle(struct pipe_screen *screen, - struct pipe_resource *resource, - struct winsys_handle *handle); - -void u_default_transfer_inline_write( struct pipe_context *pipe, - struct pipe_resource *resource, - unsigned level, - unsigned usage, - const struct pipe_box *box, - const void *data, - unsigned stride, - unsigned layer_stride); - -void u_default_transfer_flush_region( struct pipe_context *pipe, - struct pipe_transfer *transfer, - const struct pipe_box *box); - -struct pipe_transfer * u_default_get_transfer(struct pipe_context *context, - struct pipe_resource *resource, - unsigned level, - unsigned usage, - const struct pipe_box *box); - -void u_default_transfer_unmap( struct pipe_context *pipe, - struct pipe_transfer *transfer ); - -void u_default_transfer_destroy(struct pipe_context *pipe, - struct pipe_transfer *transfer); - - - -/* Useful helper to allow >1 implementation of resource functionality - * to exist in a single driver. This is intended to be transitionary! - */ -struct u_resource_vtbl { - - boolean (*resource_get_handle)(struct pipe_screen *, - struct pipe_resource *tex, - struct winsys_handle *handle); - - void (*resource_destroy)(struct pipe_screen *, - struct pipe_resource *pt); - - struct pipe_transfer *(*get_transfer)(struct pipe_context *, - struct pipe_resource *resource, - unsigned level, - unsigned usage, - const struct pipe_box *); - - void (*transfer_destroy)(struct pipe_context *, - struct pipe_transfer *); - - void *(*transfer_map)( struct pipe_context *, - struct pipe_transfer *transfer ); - - void (*transfer_flush_region)( struct pipe_context *, - struct pipe_transfer *transfer, - const struct pipe_box *); - - void (*transfer_unmap)( struct pipe_context *, - struct pipe_transfer *transfer ); - - void (*transfer_inline_write)( struct pipe_context *pipe, - struct pipe_resource *resource, - unsigned level, - unsigned usage, - const struct pipe_box *box, - const void *data, - unsigned stride, - unsigned layer_stride); -}; - - -struct u_resource { - struct pipe_resource b; - const struct u_resource_vtbl *vtbl; -}; - - -boolean u_resource_get_handle_vtbl(struct pipe_screen *screen, - struct pipe_resource *resource, - struct winsys_handle *handle); - -void u_resource_destroy_vtbl(struct pipe_screen *screen, - struct pipe_resource *resource); - -struct pipe_transfer *u_get_transfer_vtbl(struct pipe_context *context, - struct pipe_resource *resource, - unsigned level, - unsigned usage, - const struct pipe_box *box); - -void u_transfer_destroy_vtbl(struct pipe_context *pipe, - struct pipe_transfer *transfer); - -void *u_transfer_map_vtbl( struct pipe_context *pipe, - struct pipe_transfer *transfer ); - -void u_transfer_flush_region_vtbl( struct pipe_context *pipe, - struct pipe_transfer *transfer, - const struct pipe_box *box); - -void u_transfer_unmap_vtbl( struct pipe_context *rm_ctx, - struct pipe_transfer *transfer ); - -void u_transfer_inline_write_vtbl( struct pipe_context *rm_ctx, - struct pipe_resource *resource, - unsigned level, - unsigned usage, - const struct pipe_box *box, - const void *data, - unsigned stride, - unsigned layer_stride); - -void u_default_redefine_user_buffer(struct pipe_context *ctx, - struct pipe_resource *resource, - unsigned offset, - unsigned size); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_upload_mgr.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_upload_mgr.c deleted file mode 100644 index b4b4c91f1ec..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_upload_mgr.c +++ /dev/null @@ -1,266 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Helper utility for uploading user buffers & other data, and - * coalescing small buffers into larger ones. - */ - -#include "pipe/p_defines.h" -#include "util/u_inlines.h" -#include "pipe/p_context.h" -#include "util/u_memory.h" -#include "util/u_math.h" - -#include "u_upload_mgr.h" - - -struct u_upload_mgr { - struct pipe_context *pipe; - - unsigned default_size; /* Minimum size of the upload buffer, in bytes. */ - unsigned alignment; /* Alignment of each sub-allocation. */ - unsigned bind; /* Bitmask of PIPE_BIND_* flags. */ - - struct pipe_resource *buffer; /* Upload buffer. */ - struct pipe_transfer *transfer; /* Transfer object for the upload buffer. */ - uint8_t *map; /* Pointer to the mapped upload buffer. */ - unsigned size; /* Actual size of the upload buffer. */ - unsigned offset; /* Aligned offset to the upload buffer, pointing - * at the first unused byte. */ -}; - - -struct u_upload_mgr *u_upload_create( struct pipe_context *pipe, - unsigned default_size, - unsigned alignment, - unsigned bind ) -{ - struct u_upload_mgr *upload = CALLOC_STRUCT( u_upload_mgr ); - if (!upload) - return NULL; - - upload->pipe = pipe; - upload->default_size = default_size; - upload->alignment = alignment; - upload->bind = bind; - upload->buffer = NULL; - - return upload; -} - -void u_upload_unmap( struct u_upload_mgr *upload ) -{ - if (upload->transfer) { - struct pipe_box *box = &upload->transfer->box; - if (upload->offset > box->x) { - - pipe_buffer_flush_mapped_range(upload->pipe, upload->transfer, - box->x, upload->offset - box->x); - } - pipe_transfer_unmap(upload->pipe, upload->transfer); - pipe_transfer_destroy(upload->pipe, upload->transfer); - upload->transfer = NULL; - upload->map = NULL; - } -} - -/* Release old buffer. - * - * This must usually be called prior to firing the command stream - * which references the upload buffer, as many memory managers will - * cause subsequent maps of a fired buffer to wait. - * - * Can improve this with a change to pipe_buffer_write to use the - * DONT_WAIT bit, but for now, it's easiest just to grab a new buffer. - */ -void u_upload_flush( struct u_upload_mgr *upload ) -{ - /* Unmap and unreference the upload buffer. */ - u_upload_unmap(upload); - pipe_resource_reference( &upload->buffer, NULL ); - upload->size = 0; -} - - -void u_upload_destroy( struct u_upload_mgr *upload ) -{ - u_upload_flush( upload ); - FREE( upload ); -} - - -static enum pipe_error -u_upload_alloc_buffer( struct u_upload_mgr *upload, - unsigned min_size ) -{ - unsigned size; - - /* Release the old buffer, if present: - */ - u_upload_flush( upload ); - - /* Allocate a new one: - */ - size = align(MAX2(upload->default_size, min_size), 4096); - - upload->buffer = pipe_buffer_create( upload->pipe->screen, - upload->bind, - PIPE_USAGE_STREAM, - size ); - if (upload->buffer == NULL) { - return PIPE_ERROR_OUT_OF_MEMORY; - } - - /* Map the new buffer. */ - upload->map = pipe_buffer_map_range(upload->pipe, upload->buffer, - 0, size, - PIPE_TRANSFER_WRITE | - PIPE_TRANSFER_FLUSH_EXPLICIT, - &upload->transfer); - if (upload->map == NULL) { - upload->size = 0; - pipe_resource_reference(&upload->buffer, NULL); - return PIPE_ERROR_OUT_OF_MEMORY; - } - - upload->size = size; - - upload->offset = 0; - return PIPE_OK; -} - -enum pipe_error u_upload_alloc( struct u_upload_mgr *upload, - unsigned min_out_offset, - unsigned size, - unsigned *out_offset, - struct pipe_resource **outbuf, - void **ptr ) -{ - unsigned alloc_size = align( size, upload->alignment ); - unsigned alloc_offset = align(min_out_offset, upload->alignment); - unsigned offset; - - /* Make sure we have enough space in the upload buffer - * for the sub-allocation. */ - if (MAX2(upload->offset, alloc_offset) + alloc_size > upload->size) { - enum pipe_error ret = u_upload_alloc_buffer(upload, - alloc_offset + alloc_size); - if (ret != PIPE_OK) - return ret; - } - - offset = MAX2(upload->offset, alloc_offset); - - if (!upload->map) { - upload->map = pipe_buffer_map_range(upload->pipe, upload->buffer, - offset, upload->size - offset, - PIPE_TRANSFER_WRITE | - PIPE_TRANSFER_FLUSH_EXPLICIT | - PIPE_TRANSFER_UNSYNCHRONIZED, - &upload->transfer); - if (!upload->map) { - pipe_resource_reference(outbuf, NULL); - *ptr = NULL; - return PIPE_ERROR_OUT_OF_MEMORY; - } - - upload->map -= offset; - } - - assert(offset < upload->buffer->width0); - assert(offset + size <= upload->buffer->width0); - assert(size); - - /* Emit the return values: */ - *ptr = upload->map + offset; - pipe_resource_reference( outbuf, upload->buffer ); - *out_offset = offset; - - upload->offset = offset + alloc_size; - return PIPE_OK; -} - -enum pipe_error u_upload_data( struct u_upload_mgr *upload, - unsigned min_out_offset, - unsigned size, - const void *data, - unsigned *out_offset, - struct pipe_resource **outbuf) -{ - uint8_t *ptr; - enum pipe_error ret = u_upload_alloc(upload, min_out_offset, size, - out_offset, outbuf, - (void**)&ptr); - if (ret != PIPE_OK) - return ret; - - memcpy(ptr, data, size); - return PIPE_OK; -} - - -/* As above, but upload the full contents of a buffer. Useful for - * uploading user buffers, avoids generating an explosion of GPU - * buffers if you have an app that does lots of small vertex buffer - * renders or DrawElements calls. - */ -enum pipe_error u_upload_buffer( struct u_upload_mgr *upload, - unsigned min_out_offset, - unsigned offset, - unsigned size, - struct pipe_resource *inbuf, - unsigned *out_offset, - struct pipe_resource **outbuf) -{ - enum pipe_error ret = PIPE_OK; - struct pipe_transfer *transfer = NULL; - const char *map = NULL; - - map = (const char *)pipe_buffer_map_range(upload->pipe, - inbuf, - offset, size, - PIPE_TRANSFER_READ, - &transfer); - - if (map == NULL) { - return PIPE_ERROR_OUT_OF_MEMORY; - } - - if (0) - debug_printf("upload ptr %p ofs %d sz %d\n", map, offset, size); - - ret = u_upload_data( upload, - min_out_offset, - size, - map, - out_offset, - outbuf); - - pipe_buffer_unmap( upload->pipe, transfer ); - - return ret; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_upload_mgr.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_upload_mgr.h deleted file mode 100644 index b50d3f32c93..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_upload_mgr.h +++ /dev/null @@ -1,131 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Helper utility for uploading user buffers & other data, and - * coalescing small buffers into larger ones. - */ - -#ifndef U_UPLOAD_MGR_H -#define U_UPLOAD_MGR_H - -#include "pipe/p_compiler.h" - -struct pipe_context; -struct pipe_resource; - - -/** - * Create the upload manager. - * - * \param pipe Pipe driver. - * \param default_size Minimum size of the upload buffer, in bytes. - * \param alignment Alignment of each suballocation in the upload buffer. - * \param bind Bitmask of PIPE_BIND_* flags. - */ -struct u_upload_mgr *u_upload_create( struct pipe_context *pipe, - unsigned default_size, - unsigned alignment, - unsigned bind ); - -/** - * Destroy the upload manager. - */ -void u_upload_destroy( struct u_upload_mgr *upload ); - -/* Unmap and release old upload buffer. - * - * This is like u_upload_unmap() except the upload buffer is released for - * recycling. This should be called on real hardware flushes on systems - * that don't support the PIPE_TRANSFER_UNSYNCHRONIZED flag, as otherwise - * the next u_upload_buffer will cause a sync on the buffer. - */ - -void u_upload_flush( struct u_upload_mgr *upload ); - -/** - * Unmap upload buffer - * - * \param upload Upload manager - * - * This must usually be called prior to firing the command stream - * which references the upload buffer, as many memory managers either - * don't like firing a mapped buffer or cause subsequent maps of a - * fired buffer to wait. - */ -void u_upload_unmap( struct u_upload_mgr *upload ); - -/** - * Sub-allocate new memory from the upload buffer. - * - * \param upload Upload manager - * \param min_out_offset Minimum offset that should be returned in out_offset. - * \param size Size of the allocation. - * \param out_offset Pointer to where the new buffer offset will be returned. - * \param outbuf Pointer to where the upload buffer will be returned. - * \param flushed Whether the upload buffer was flushed. - * \param ptr Pointer to the allocated memory that is returned. - */ -enum pipe_error u_upload_alloc( struct u_upload_mgr *upload, - unsigned min_out_offset, - unsigned size, - unsigned *out_offset, - struct pipe_resource **outbuf, - void **ptr ); - - -/** - * Allocate and write data to the upload buffer. - * - * Same as u_upload_alloc, but in addition to that, it copies "data" - * to the pointer returned from u_upload_alloc. - */ -enum pipe_error u_upload_data( struct u_upload_mgr *upload, - unsigned min_out_offset, - unsigned size, - const void *data, - unsigned *out_offset, - struct pipe_resource **outbuf); - - -/** - * Allocate and copy an input buffer to the upload buffer. - * - * Same as u_upload_data, except that the input data comes from a buffer - * instead of a user pointer. - */ -enum pipe_error u_upload_buffer( struct u_upload_mgr *upload, - unsigned min_out_offset, - unsigned offset, - unsigned size, - struct pipe_resource *inbuf, - unsigned *out_offset, - struct pipe_resource **outbuf); - - - -#endif - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_vbuf.c b/dll/opengl/mesa/src/gallium/auxiliary/util/u_vbuf.c deleted file mode 100644 index 50c35afd563..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_vbuf.c +++ /dev/null @@ -1,1163 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Marek Olšák - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_vbuf.h" - -#include "util/u_dump.h" -#include "util/u_format.h" -#include "util/u_inlines.h" -#include "util/u_memory.h" -#include "util/u_upload_mgr.h" -#include "translate/translate.h" -#include "translate/translate_cache.h" -#include "cso_cache/cso_cache.h" -#include "cso_cache/cso_hash.h" - -struct u_vbuf_elements { - unsigned count; - struct pipe_vertex_element ve[PIPE_MAX_ATTRIBS]; - - unsigned src_format_size[PIPE_MAX_ATTRIBS]; - - /* If (velem[i].src_format != native_format[i]), the vertex buffer - * referenced by the vertex element cannot be used for rendering and - * its vertex data must be translated to native_format[i]. */ - enum pipe_format native_format[PIPE_MAX_ATTRIBS]; - unsigned native_format_size[PIPE_MAX_ATTRIBS]; - - /* This might mean two things: - * - src_format != native_format, as discussed above. - * - src_offset % 4 != 0 (if the caps don't allow such an offset). */ - boolean incompatible_layout; - /* Per-element flags. */ - boolean incompatible_layout_elem[PIPE_MAX_ATTRIBS]; -}; - -enum { - VB_VERTEX = 0, - VB_INSTANCE = 1, - VB_CONST = 2, - VB_NUM = 3 -}; - -struct u_vbuf_priv { - struct u_vbuf b; - struct pipe_context *pipe; - struct translate_cache *translate_cache; - struct cso_cache *cso_cache; - - /* Vertex element state bound by the state tracker. */ - void *saved_ve; - /* and its associated helper structure for this module. */ - struct u_vbuf_elements *ve; - - /* Vertex elements used for the translate fallback. */ - struct pipe_vertex_element fallback_velems[PIPE_MAX_ATTRIBS]; - /* If non-NULL, this is a vertex element state used for the translate - * fallback and therefore used for rendering too. */ - void *fallback_ve; - /* The vertex buffer slot index where translated vertices have been - * stored in. */ - unsigned fallback_vbs[VB_NUM]; - /* When binding the fallback vertex element state, we don't want to - * change saved_ve and ve. This is set to TRUE in such cases. */ - boolean ve_binding_lock; - - /* Whether there is any user buffer. */ - boolean any_user_vbs; - /* Whether there is a buffer with a non-native layout. */ - boolean incompatible_vb_layout; - /* Per-buffer flags. */ - boolean incompatible_vb[PIPE_MAX_ATTRIBS]; -}; - -static void u_vbuf_init_format_caps(struct u_vbuf_priv *mgr) -{ - struct pipe_screen *screen = mgr->pipe->screen; - - mgr->b.caps.format_fixed32 = - screen->is_format_supported(screen, PIPE_FORMAT_R32_FIXED, PIPE_BUFFER, - 0, PIPE_BIND_VERTEX_BUFFER); - - mgr->b.caps.format_float16 = - screen->is_format_supported(screen, PIPE_FORMAT_R16_FLOAT, PIPE_BUFFER, - 0, PIPE_BIND_VERTEX_BUFFER); - - mgr->b.caps.format_float64 = - screen->is_format_supported(screen, PIPE_FORMAT_R64_FLOAT, PIPE_BUFFER, - 0, PIPE_BIND_VERTEX_BUFFER); - - mgr->b.caps.format_norm32 = - screen->is_format_supported(screen, PIPE_FORMAT_R32_UNORM, PIPE_BUFFER, - 0, PIPE_BIND_VERTEX_BUFFER) && - screen->is_format_supported(screen, PIPE_FORMAT_R32_SNORM, PIPE_BUFFER, - 0, PIPE_BIND_VERTEX_BUFFER); - - mgr->b.caps.format_scaled32 = - screen->is_format_supported(screen, PIPE_FORMAT_R32_USCALED, PIPE_BUFFER, - 0, PIPE_BIND_VERTEX_BUFFER) && - screen->is_format_supported(screen, PIPE_FORMAT_R32_SSCALED, PIPE_BUFFER, - 0, PIPE_BIND_VERTEX_BUFFER); -} - -struct u_vbuf * -u_vbuf_create(struct pipe_context *pipe, - unsigned upload_buffer_size, - unsigned upload_buffer_alignment, - unsigned upload_buffer_bind, - enum u_fetch_alignment fetch_alignment) -{ - struct u_vbuf_priv *mgr = CALLOC_STRUCT(u_vbuf_priv); - - mgr->pipe = pipe; - mgr->cso_cache = cso_cache_create(); - mgr->translate_cache = translate_cache_create(); - memset(mgr->fallback_vbs, ~0, sizeof(mgr->fallback_vbs)); - - mgr->b.uploader = u_upload_create(pipe, upload_buffer_size, - upload_buffer_alignment, - upload_buffer_bind); - - mgr->b.caps.fetch_dword_unaligned = - fetch_alignment == U_VERTEX_FETCH_BYTE_ALIGNED; - - u_vbuf_init_format_caps(mgr); - - return &mgr->b; -} - -/* XXX I had to fork this off of cso_context. */ -static void * -u_vbuf_pipe_set_vertex_elements(struct u_vbuf_priv *mgr, - unsigned count, - const struct pipe_vertex_element *states) -{ - unsigned key_size, hash_key; - struct cso_hash_iter iter; - void *handle; - struct cso_velems_state velems_state; - - /* need to include the count into the stored state data too. */ - key_size = sizeof(struct pipe_vertex_element) * count + sizeof(unsigned); - velems_state.count = count; - memcpy(velems_state.velems, states, - sizeof(struct pipe_vertex_element) * count); - hash_key = cso_construct_key((void*)&velems_state, key_size); - iter = cso_find_state_template(mgr->cso_cache, hash_key, CSO_VELEMENTS, - (void*)&velems_state, key_size); - - if (cso_hash_iter_is_null(iter)) { - struct cso_velements *cso = MALLOC_STRUCT(cso_velements); - memcpy(&cso->state, &velems_state, key_size); - cso->data = - mgr->pipe->create_vertex_elements_state(mgr->pipe, count, - &cso->state.velems[0]); - cso->delete_state = - (cso_state_callback)mgr->pipe->delete_vertex_elements_state; - cso->context = mgr->pipe; - - iter = cso_insert_state(mgr->cso_cache, hash_key, CSO_VELEMENTS, cso); - handle = cso->data; - } else { - handle = ((struct cso_velements *)cso_hash_iter_data(iter))->data; - } - - mgr->pipe->bind_vertex_elements_state(mgr->pipe, handle); - return handle; -} - -void u_vbuf_destroy(struct u_vbuf *mgrb) -{ - struct u_vbuf_priv *mgr = (struct u_vbuf_priv*)mgrb; - unsigned i; - - for (i = 0; i < mgr->b.nr_vertex_buffers; i++) { - pipe_resource_reference(&mgr->b.vertex_buffer[i].buffer, NULL); - } - for (i = 0; i < mgr->b.nr_real_vertex_buffers; i++) { - pipe_resource_reference(&mgr->b.real_vertex_buffer[i].buffer, NULL); - } - - translate_cache_destroy(mgr->translate_cache); - u_upload_destroy(mgr->b.uploader); - cso_cache_delete(mgr->cso_cache); - FREE(mgr); -} - -static void -u_vbuf_translate_buffers(struct u_vbuf_priv *mgr, struct translate_key *key, - unsigned vb_mask, unsigned out_vb, - int start_vertex, unsigned num_vertices, - int start_index, unsigned num_indices, int min_index, - bool unroll_indices) -{ - struct translate *tr; - struct pipe_transfer *vb_transfer[PIPE_MAX_ATTRIBS] = {0}; - struct pipe_resource *out_buffer = NULL; - uint8_t *out_map; - unsigned i, out_offset; - - /* Get a translate object. */ - tr = translate_cache_find(mgr->translate_cache, key); - - /* Map buffers we want to translate. */ - for (i = 0; i < mgr->b.nr_vertex_buffers; i++) { - if (vb_mask & (1 << i)) { - struct pipe_vertex_buffer *vb = &mgr->b.vertex_buffer[i]; - unsigned offset = vb->buffer_offset + vb->stride * start_vertex; - uint8_t *map; - - if (u_vbuf_resource(vb->buffer)->user_ptr) { - map = u_vbuf_resource(vb->buffer)->user_ptr + offset; - } else { - unsigned size = vb->stride ? num_vertices * vb->stride - : sizeof(double)*4; - - if (offset+size > vb->buffer->width0) { - size = vb->buffer->width0 - offset; - } - - map = pipe_buffer_map_range(mgr->pipe, vb->buffer, offset, size, - PIPE_TRANSFER_READ, &vb_transfer[i]); - } - - /* Subtract min_index so that indexing with the index buffer works. */ - if (unroll_indices) { - map -= vb->stride * min_index; - } - - tr->set_buffer(tr, i, map, vb->stride, ~0); - } - } - - /* Translate. */ - if (unroll_indices) { - struct pipe_index_buffer *ib = &mgr->b.index_buffer; - struct pipe_transfer *transfer = NULL; - unsigned offset = ib->offset + start_index * ib->index_size; - uint8_t *map; - - assert(ib->buffer && ib->index_size); - - if (u_vbuf_resource(ib->buffer)->user_ptr) { - map = u_vbuf_resource(ib->buffer)->user_ptr + offset; - } else { - map = pipe_buffer_map_range(mgr->pipe, ib->buffer, offset, - num_indices * ib->index_size, - PIPE_TRANSFER_READ, &transfer); - } - - /* Create and map the output buffer. */ - u_upload_alloc(mgr->b.uploader, 0, - key->output_stride * num_indices, - &out_offset, &out_buffer, - (void**)&out_map); - - switch (ib->index_size) { - case 4: - tr->run_elts(tr, (unsigned*)map, num_indices, 0, out_map); - break; - case 2: - tr->run_elts16(tr, (uint16_t*)map, num_indices, 0, out_map); - break; - case 1: - tr->run_elts8(tr, map, num_indices, 0, out_map); - break; - } - - if (transfer) { - pipe_buffer_unmap(mgr->pipe, transfer); - } - } else { - /* Create and map the output buffer. */ - u_upload_alloc(mgr->b.uploader, - key->output_stride * start_vertex, - key->output_stride * num_vertices, - &out_offset, &out_buffer, - (void**)&out_map); - - out_offset -= key->output_stride * start_vertex; - - tr->run(tr, 0, num_vertices, 0, out_map); - } - - /* Unmap all buffers. */ - for (i = 0; i < mgr->b.nr_vertex_buffers; i++) { - if (vb_transfer[i]) { - pipe_buffer_unmap(mgr->pipe, vb_transfer[i]); - } - } - - /* Setup the new vertex buffer. */ - mgr->b.real_vertex_buffer[out_vb].buffer_offset = out_offset; - mgr->b.real_vertex_buffer[out_vb].stride = key->output_stride; - - /* Move the buffer reference. */ - pipe_resource_reference( - &mgr->b.real_vertex_buffer[out_vb].buffer, NULL); - mgr->b.real_vertex_buffer[out_vb].buffer = out_buffer; -} - -static boolean -u_vbuf_translate_find_free_vb_slots(struct u_vbuf_priv *mgr, - unsigned mask[VB_NUM]) -{ - unsigned i, type; - unsigned nr = mgr->ve->count; - boolean used_vb[PIPE_MAX_ATTRIBS] = {0}; - unsigned fallback_vbs[VB_NUM]; - - memset(fallback_vbs, ~0, sizeof(fallback_vbs)); - - /* Mark used vertex buffers as... used. */ - for (i = 0; i < nr; i++) { - if (!mgr->ve->incompatible_layout_elem[i]) { - unsigned index = mgr->ve->ve[i].vertex_buffer_index; - - if (!mgr->incompatible_vb[index]) { - used_vb[index] = TRUE; - } - } - } - - /* Find free slots for each type if needed. */ - i = 0; - for (type = 0; type < VB_NUM; type++) { - if (mask[type]) { - for (; i < PIPE_MAX_ATTRIBS; i++) { - if (!used_vb[i]) { - /*printf("found slot=%i for type=%i\n", i, type);*/ - fallback_vbs[type] = i; - i++; - if (i > mgr->b.nr_real_vertex_buffers) { - mgr->b.nr_real_vertex_buffers = i; - } - break; - } - } - if (i == PIPE_MAX_ATTRIBS) { - /* fail, reset the number to its original value */ - mgr->b.nr_real_vertex_buffers = mgr->b.nr_vertex_buffers; - return FALSE; - } - } - } - - memcpy(mgr->fallback_vbs, fallback_vbs, sizeof(fallback_vbs)); - return TRUE; -} - -static boolean -u_vbuf_translate_begin(struct u_vbuf_priv *mgr, - int start_vertex, unsigned num_vertices, - int start_instance, unsigned num_instances, - int start_index, unsigned num_indices, int min_index, - bool unroll_indices) -{ - unsigned mask[VB_NUM] = {0}; - struct translate_key key[VB_NUM]; - unsigned elem_index[VB_NUM][PIPE_MAX_ATTRIBS]; /* ... into key.elements */ - unsigned i, type; - - int start[VB_NUM] = { - start_vertex, /* VERTEX */ - start_instance, /* INSTANCE */ - 0 /* CONST */ - }; - - unsigned num[VB_NUM] = { - num_vertices, /* VERTEX */ - num_instances, /* INSTANCE */ - 1 /* CONST */ - }; - - memset(key, 0, sizeof(key)); - memset(elem_index, ~0, sizeof(elem_index)); - - /* See if there are vertex attribs of each type to translate and - * which ones. */ - for (i = 0; i < mgr->ve->count; i++) { - unsigned vb_index = mgr->ve->ve[i].vertex_buffer_index; - - if (!mgr->b.vertex_buffer[vb_index].stride) { - if (!mgr->ve->incompatible_layout_elem[i] && - !mgr->incompatible_vb[vb_index]) { - continue; - } - mask[VB_CONST] |= 1 << vb_index; - } else if (mgr->ve->ve[i].instance_divisor) { - if (!mgr->ve->incompatible_layout_elem[i] && - !mgr->incompatible_vb[vb_index]) { - continue; - } - mask[VB_INSTANCE] |= 1 << vb_index; - } else { - if (!unroll_indices && - !mgr->ve->incompatible_layout_elem[i] && - !mgr->incompatible_vb[vb_index]) { - continue; - } - mask[VB_VERTEX] |= 1 << vb_index; - } - } - - assert(mask[VB_VERTEX] || mask[VB_INSTANCE] || mask[VB_CONST]); - - /* Find free vertex buffer slots. */ - if (!u_vbuf_translate_find_free_vb_slots(mgr, mask)) { - return FALSE; - } - - /* Initialize the translate keys. */ - for (i = 0; i < mgr->ve->count; i++) { - struct translate_key *k; - struct translate_element *te; - unsigned bit, vb_index = mgr->ve->ve[i].vertex_buffer_index; - bit = 1 << vb_index; - - if (!mgr->ve->incompatible_layout_elem[i] && - !mgr->incompatible_vb[vb_index] && - (!unroll_indices || !(mask[VB_VERTEX] & bit))) { - continue; - } - - /* Set type to what we will translate. - * Whether vertex, instance, or constant attribs. */ - for (type = 0; type < VB_NUM; type++) { - if (mask[type] & bit) { - break; - } - } - assert(type < VB_NUM); - assert(translate_is_output_format_supported(mgr->ve->native_format[i])); - /*printf("velem=%i type=%i\n", i, type);*/ - - /* Add the vertex element. */ - k = &key[type]; - elem_index[type][i] = k->nr_elements; - - te = &k->element[k->nr_elements]; - te->type = TRANSLATE_ELEMENT_NORMAL; - te->instance_divisor = 0; - te->input_buffer = vb_index; - te->input_format = mgr->ve->ve[i].src_format; - te->input_offset = mgr->ve->ve[i].src_offset; - te->output_format = mgr->ve->native_format[i]; - te->output_offset = k->output_stride; - - k->output_stride += mgr->ve->native_format_size[i]; - k->nr_elements++; - } - - /* Translate buffers. */ - for (type = 0; type < VB_NUM; type++) { - if (key[type].nr_elements) { - u_vbuf_translate_buffers(mgr, &key[type], mask[type], - mgr->fallback_vbs[type], - start[type], num[type], - start_index, num_indices, min_index, - unroll_indices && type == VB_VERTEX); - - /* Fixup the stride for constant attribs. */ - if (type == VB_CONST) { - mgr->b.real_vertex_buffer[mgr->fallback_vbs[VB_CONST]].stride = 0; - } - } - } - - /* Setup new vertex elements. */ - for (i = 0; i < mgr->ve->count; i++) { - for (type = 0; type < VB_NUM; type++) { - if (elem_index[type][i] < key[type].nr_elements) { - struct translate_element *te = &key[type].element[elem_index[type][i]]; - mgr->fallback_velems[i].instance_divisor = mgr->ve->ve[i].instance_divisor; - mgr->fallback_velems[i].src_format = te->output_format; - mgr->fallback_velems[i].src_offset = te->output_offset; - mgr->fallback_velems[i].vertex_buffer_index = mgr->fallback_vbs[type]; - - /* elem_index[type][i] can only be set for one type. */ - assert(type > VB_INSTANCE || elem_index[type+1][i] == ~0); - assert(type > VB_VERTEX || elem_index[type+2][i] == ~0); - break; - } - } - /* No translating, just copy the original vertex element over. */ - if (type == VB_NUM) { - memcpy(&mgr->fallback_velems[i], &mgr->ve->ve[i], - sizeof(struct pipe_vertex_element)); - } - } - - /* Preserve saved_ve. */ - mgr->ve_binding_lock = TRUE; - mgr->fallback_ve = u_vbuf_pipe_set_vertex_elements(mgr, mgr->ve->count, - mgr->fallback_velems); - mgr->ve_binding_lock = FALSE; - return TRUE; -} - -static void u_vbuf_translate_end(struct u_vbuf_priv *mgr) -{ - unsigned i; - - /* Restore vertex elements. */ - /* Note that saved_ve will be overwritten in bind_vertex_elements_state. */ - mgr->pipe->bind_vertex_elements_state(mgr->pipe, mgr->saved_ve); - mgr->fallback_ve = NULL; - - /* Unreference the now-unused VBOs. */ - for (i = 0; i < VB_NUM; i++) { - unsigned vb = mgr->fallback_vbs[i]; - if (vb != ~0) { - pipe_resource_reference(&mgr->b.real_vertex_buffer[vb].buffer, NULL); - mgr->fallback_vbs[i] = ~0; - } - } - mgr->b.nr_real_vertex_buffers = mgr->b.nr_vertex_buffers; -} - -#define FORMAT_REPLACE(what, withwhat) \ - case PIPE_FORMAT_##what: format = PIPE_FORMAT_##withwhat; break - -struct u_vbuf_elements * -u_vbuf_create_vertex_elements(struct u_vbuf *mgrb, - unsigned count, - const struct pipe_vertex_element *attribs, - struct pipe_vertex_element *native_attribs) -{ - struct u_vbuf_priv *mgr = (struct u_vbuf_priv*)mgrb; - unsigned i; - struct u_vbuf_elements *ve = CALLOC_STRUCT(u_vbuf_elements); - - ve->count = count; - - if (!count) { - return ve; - } - - memcpy(ve->ve, attribs, sizeof(struct pipe_vertex_element) * count); - memcpy(native_attribs, attribs, sizeof(struct pipe_vertex_element) * count); - - /* Set the best native format in case the original format is not - * supported. */ - for (i = 0; i < count; i++) { - enum pipe_format format = ve->ve[i].src_format; - - ve->src_format_size[i] = util_format_get_blocksize(format); - - /* Choose a native format. - * For now we don't care about the alignment, that's going to - * be sorted out later. */ - if (!mgr->b.caps.format_fixed32) { - switch (format) { - FORMAT_REPLACE(R32_FIXED, R32_FLOAT); - FORMAT_REPLACE(R32G32_FIXED, R32G32_FLOAT); - FORMAT_REPLACE(R32G32B32_FIXED, R32G32B32_FLOAT); - FORMAT_REPLACE(R32G32B32A32_FIXED, R32G32B32A32_FLOAT); - default:; - } - } - if (!mgr->b.caps.format_float16) { - switch (format) { - FORMAT_REPLACE(R16_FLOAT, R32_FLOAT); - FORMAT_REPLACE(R16G16_FLOAT, R32G32_FLOAT); - FORMAT_REPLACE(R16G16B16_FLOAT, R32G32B32_FLOAT); - FORMAT_REPLACE(R16G16B16A16_FLOAT, R32G32B32A32_FLOAT); - default:; - } - } - if (!mgr->b.caps.format_float64) { - switch (format) { - FORMAT_REPLACE(R64_FLOAT, R32_FLOAT); - FORMAT_REPLACE(R64G64_FLOAT, R32G32_FLOAT); - FORMAT_REPLACE(R64G64B64_FLOAT, R32G32B32_FLOAT); - FORMAT_REPLACE(R64G64B64A64_FLOAT, R32G32B32A32_FLOAT); - default:; - } - } - if (!mgr->b.caps.format_norm32) { - switch (format) { - FORMAT_REPLACE(R32_UNORM, R32_FLOAT); - FORMAT_REPLACE(R32G32_UNORM, R32G32_FLOAT); - FORMAT_REPLACE(R32G32B32_UNORM, R32G32B32_FLOAT); - FORMAT_REPLACE(R32G32B32A32_UNORM, R32G32B32A32_FLOAT); - FORMAT_REPLACE(R32_SNORM, R32_FLOAT); - FORMAT_REPLACE(R32G32_SNORM, R32G32_FLOAT); - FORMAT_REPLACE(R32G32B32_SNORM, R32G32B32_FLOAT); - FORMAT_REPLACE(R32G32B32A32_SNORM, R32G32B32A32_FLOAT); - default:; - } - } - if (!mgr->b.caps.format_scaled32) { - switch (format) { - FORMAT_REPLACE(R32_USCALED, R32_FLOAT); - FORMAT_REPLACE(R32G32_USCALED, R32G32_FLOAT); - FORMAT_REPLACE(R32G32B32_USCALED, R32G32B32_FLOAT); - FORMAT_REPLACE(R32G32B32A32_USCALED,R32G32B32A32_FLOAT); - FORMAT_REPLACE(R32_SSCALED, R32_FLOAT); - FORMAT_REPLACE(R32G32_SSCALED, R32G32_FLOAT); - FORMAT_REPLACE(R32G32B32_SSCALED, R32G32B32_FLOAT); - FORMAT_REPLACE(R32G32B32A32_SSCALED,R32G32B32A32_FLOAT); - default:; - } - } - - native_attribs[i].src_format = format; - ve->native_format[i] = format; - ve->native_format_size[i] = - util_format_get_blocksize(ve->native_format[i]); - - ve->incompatible_layout_elem[i] = - ve->ve[i].src_format != ve->native_format[i] || - (!mgr->b.caps.fetch_dword_unaligned && ve->ve[i].src_offset % 4 != 0); - ve->incompatible_layout = - ve->incompatible_layout || - ve->incompatible_layout_elem[i]; - } - - /* Align the formats to the size of DWORD if needed. */ - if (!mgr->b.caps.fetch_dword_unaligned) { - for (i = 0; i < count; i++) { - ve->native_format_size[i] = align(ve->native_format_size[i], 4); - } - } - - return ve; -} - -void u_vbuf_bind_vertex_elements(struct u_vbuf *mgrb, - void *cso, - struct u_vbuf_elements *ve) -{ - struct u_vbuf_priv *mgr = (struct u_vbuf_priv*)mgrb; - - if (!cso) { - return; - } - - if (!mgr->ve_binding_lock) { - mgr->saved_ve = cso; - mgr->ve = ve; - } -} - -void u_vbuf_destroy_vertex_elements(struct u_vbuf *mgr, - struct u_vbuf_elements *ve) -{ - FREE(ve); -} - -void u_vbuf_set_vertex_buffers(struct u_vbuf *mgrb, - unsigned count, - const struct pipe_vertex_buffer *bufs) -{ - struct u_vbuf_priv *mgr = (struct u_vbuf_priv*)mgrb; - unsigned i; - - mgr->any_user_vbs = FALSE; - mgr->incompatible_vb_layout = FALSE; - memset(mgr->incompatible_vb, 0, sizeof(mgr->incompatible_vb)); - - if (!mgr->b.caps.fetch_dword_unaligned) { - /* Check if the strides and offsets are aligned to the size of DWORD. */ - for (i = 0; i < count; i++) { - if (bufs[i].buffer) { - if (bufs[i].stride % 4 != 0 || - bufs[i].buffer_offset % 4 != 0) { - mgr->incompatible_vb_layout = TRUE; - mgr->incompatible_vb[i] = TRUE; - } - } - } - } - - for (i = 0; i < count; i++) { - const struct pipe_vertex_buffer *vb = &bufs[i]; - - pipe_resource_reference(&mgr->b.vertex_buffer[i].buffer, vb->buffer); - - mgr->b.real_vertex_buffer[i].buffer_offset = - mgr->b.vertex_buffer[i].buffer_offset = vb->buffer_offset; - - mgr->b.real_vertex_buffer[i].stride = - mgr->b.vertex_buffer[i].stride = vb->stride; - - if (!vb->buffer || - mgr->incompatible_vb[i]) { - pipe_resource_reference(&mgr->b.real_vertex_buffer[i].buffer, NULL); - continue; - } - - if (u_vbuf_resource(vb->buffer)->user_ptr) { - pipe_resource_reference(&mgr->b.real_vertex_buffer[i].buffer, NULL); - mgr->any_user_vbs = TRUE; - continue; - } - - pipe_resource_reference(&mgr->b.real_vertex_buffer[i].buffer, vb->buffer); - } - - for (i = count; i < mgr->b.nr_vertex_buffers; i++) { - pipe_resource_reference(&mgr->b.vertex_buffer[i].buffer, NULL); - } - for (i = count; i < mgr->b.nr_real_vertex_buffers; i++) { - pipe_resource_reference(&mgr->b.real_vertex_buffer[i].buffer, NULL); - } - - mgr->b.nr_vertex_buffers = count; - mgr->b.nr_real_vertex_buffers = count; -} - -void u_vbuf_set_index_buffer(struct u_vbuf *mgr, - const struct pipe_index_buffer *ib) -{ - if (ib && ib->buffer) { - assert(ib->offset % ib->index_size == 0); - pipe_resource_reference(&mgr->index_buffer.buffer, ib->buffer); - mgr->index_buffer.offset = ib->offset; - mgr->index_buffer.index_size = ib->index_size; - } else { - pipe_resource_reference(&mgr->index_buffer.buffer, NULL); - } -} - -static void -u_vbuf_upload_buffers(struct u_vbuf_priv *mgr, - int start_vertex, unsigned num_vertices, - int start_instance, unsigned num_instances) -{ - unsigned i; - unsigned nr_velems = mgr->ve->count; - unsigned nr_vbufs = mgr->b.nr_vertex_buffers; - struct pipe_vertex_element *velems = - mgr->fallback_ve ? mgr->fallback_velems : mgr->ve->ve; - unsigned start_offset[PIPE_MAX_ATTRIBS]; - unsigned end_offset[PIPE_MAX_ATTRIBS] = {0}; - - /* Determine how much data needs to be uploaded. */ - for (i = 0; i < nr_velems; i++) { - struct pipe_vertex_element *velem = &velems[i]; - unsigned index = velem->vertex_buffer_index; - struct pipe_vertex_buffer *vb = &mgr->b.vertex_buffer[index]; - unsigned instance_div, first, size; - - /* Skip the buffers generated by translate. */ - if (index == mgr->fallback_vbs[VB_VERTEX] || - index == mgr->fallback_vbs[VB_INSTANCE] || - index == mgr->fallback_vbs[VB_CONST]) { - continue; - } - - assert(vb->buffer); - - if (!u_vbuf_resource(vb->buffer)->user_ptr) { - continue; - } - - instance_div = velem->instance_divisor; - first = vb->buffer_offset + velem->src_offset; - - if (!vb->stride) { - /* Constant attrib. */ - size = mgr->ve->src_format_size[i]; - } else if (instance_div) { - /* Per-instance attrib. */ - unsigned count = (num_instances + instance_div - 1) / instance_div; - first += vb->stride * start_instance; - size = vb->stride * (count - 1) + mgr->ve->src_format_size[i]; - } else { - /* Per-vertex attrib. */ - first += vb->stride * start_vertex; - size = vb->stride * (num_vertices - 1) + mgr->ve->src_format_size[i]; - } - - /* Update offsets. */ - if (!end_offset[index]) { - start_offset[index] = first; - end_offset[index] = first + size; - } else { - if (first < start_offset[index]) - start_offset[index] = first; - if (first + size > end_offset[index]) - end_offset[index] = first + size; - } - } - - /* Upload buffers. */ - for (i = 0; i < nr_vbufs; i++) { - unsigned start, end = end_offset[i]; - struct pipe_vertex_buffer *real_vb; - uint8_t *ptr; - - if (!end) { - continue; - } - - start = start_offset[i]; - assert(start < end); - - real_vb = &mgr->b.real_vertex_buffer[i]; - ptr = u_vbuf_resource(mgr->b.vertex_buffer[i].buffer)->user_ptr; - - u_upload_data(mgr->b.uploader, start, end - start, ptr + start, - &real_vb->buffer_offset, &real_vb->buffer); - - real_vb->buffer_offset -= start; - } -} - -unsigned u_vbuf_draw_max_vertex_count(struct u_vbuf *mgrb) -{ - struct u_vbuf_priv *mgr = (struct u_vbuf_priv*)mgrb; - unsigned i, nr = mgr->ve->count; - struct pipe_vertex_element *velems = - mgr->fallback_ve ? mgr->fallback_velems : mgr->ve->ve; - unsigned result = ~0; - - for (i = 0; i < nr; i++) { - struct pipe_vertex_buffer *vb = - &mgr->b.real_vertex_buffer[velems[i].vertex_buffer_index]; - unsigned size, max_count, value; - - /* We're not interested in constant and per-instance attribs. */ - if (!vb->buffer || - !vb->stride || - velems[i].instance_divisor) { - continue; - } - - size = vb->buffer->width0; - - /* Subtract buffer_offset. */ - value = vb->buffer_offset; - if (value >= size) { - return 0; - } - size -= value; - - /* Subtract src_offset. */ - value = velems[i].src_offset; - if (value >= size) { - return 0; - } - size -= value; - - /* Subtract format_size. */ - value = mgr->ve->native_format_size[i]; - if (value >= size) { - return 0; - } - size -= value; - - /* Compute the max count. */ - max_count = 1 + size / vb->stride; - result = MIN2(result, max_count); - } - return result; -} - -static boolean u_vbuf_need_minmax_index(struct u_vbuf_priv *mgr) -{ - unsigned i, nr = mgr->ve->count; - - for (i = 0; i < nr; i++) { - struct pipe_vertex_buffer *vb; - unsigned index; - - /* Per-instance attribs don't need min/max_index. */ - if (mgr->ve->ve[i].instance_divisor) { - continue; - } - - index = mgr->ve->ve[i].vertex_buffer_index; - vb = &mgr->b.vertex_buffer[index]; - - /* Constant attribs don't need min/max_index. */ - if (!vb->stride) { - continue; - } - - /* Per-vertex attribs need min/max_index. */ - if (u_vbuf_resource(vb->buffer)->user_ptr || - mgr->ve->incompatible_layout_elem[i] || - mgr->incompatible_vb[index]) { - return TRUE; - } - } - - return FALSE; -} - -static boolean u_vbuf_mapping_vertex_buffer_blocks(struct u_vbuf_priv *mgr) -{ - unsigned i, nr = mgr->ve->count; - - for (i = 0; i < nr; i++) { - struct pipe_vertex_buffer *vb; - unsigned index; - - /* Per-instance attribs are not per-vertex data. */ - if (mgr->ve->ve[i].instance_divisor) { - continue; - } - - index = mgr->ve->ve[i].vertex_buffer_index; - vb = &mgr->b.vertex_buffer[index]; - - /* Constant attribs are not per-vertex data. */ - if (!vb->stride) { - continue; - } - - /* Return true for the hw buffers which don't need to be translated. */ - /* XXX we could use some kind of a is-busy query. */ - if (!u_vbuf_resource(vb->buffer)->user_ptr && - !mgr->ve->incompatible_layout_elem[i] && - !mgr->incompatible_vb[index]) { - return TRUE; - } - } - - return FALSE; -} - -static void u_vbuf_get_minmax_index(struct pipe_context *pipe, - struct pipe_index_buffer *ib, - const struct pipe_draw_info *info, - int *out_min_index, - int *out_max_index) -{ - struct pipe_transfer *transfer = NULL; - const void *indices; - unsigned i; - unsigned restart_index = info->restart_index; - - if (u_vbuf_resource(ib->buffer)->user_ptr) { - indices = u_vbuf_resource(ib->buffer)->user_ptr + - ib->offset + info->start * ib->index_size; - } else { - indices = pipe_buffer_map_range(pipe, ib->buffer, - ib->offset + info->start * ib->index_size, - info->count * ib->index_size, - PIPE_TRANSFER_READ, &transfer); - } - - switch (ib->index_size) { - case 4: { - const unsigned *ui_indices = (const unsigned*)indices; - unsigned max_ui = 0; - unsigned min_ui = ~0U; - if (info->primitive_restart) { - for (i = 0; i < info->count; i++) { - if (ui_indices[i] != restart_index) { - if (ui_indices[i] > max_ui) max_ui = ui_indices[i]; - if (ui_indices[i] < min_ui) min_ui = ui_indices[i]; - } - } - } - else { - for (i = 0; i < info->count; i++) { - if (ui_indices[i] > max_ui) max_ui = ui_indices[i]; - if (ui_indices[i] < min_ui) min_ui = ui_indices[i]; - } - } - *out_min_index = min_ui; - *out_max_index = max_ui; - break; - } - case 2: { - const unsigned short *us_indices = (const unsigned short*)indices; - unsigned max_us = 0; - unsigned min_us = ~0U; - if (info->primitive_restart) { - for (i = 0; i < info->count; i++) { - if (us_indices[i] != restart_index) { - if (us_indices[i] > max_us) max_us = us_indices[i]; - if (us_indices[i] < min_us) min_us = us_indices[i]; - } - } - } - else { - for (i = 0; i < info->count; i++) { - if (us_indices[i] > max_us) max_us = us_indices[i]; - if (us_indices[i] < min_us) min_us = us_indices[i]; - } - } - *out_min_index = min_us; - *out_max_index = max_us; - break; - } - case 1: { - const unsigned char *ub_indices = (const unsigned char*)indices; - unsigned max_ub = 0; - unsigned min_ub = ~0U; - if (info->primitive_restart) { - for (i = 0; i < info->count; i++) { - if (ub_indices[i] != restart_index) { - if (ub_indices[i] > max_ub) max_ub = ub_indices[i]; - if (ub_indices[i] < min_ub) min_ub = ub_indices[i]; - } - } - } - else { - for (i = 0; i < info->count; i++) { - if (ub_indices[i] > max_ub) max_ub = ub_indices[i]; - if (ub_indices[i] < min_ub) min_ub = ub_indices[i]; - } - } - *out_min_index = min_ub; - *out_max_index = max_ub; - break; - } - default: - assert(0); - *out_min_index = 0; - *out_max_index = 0; - } - - if (transfer) { - pipe_buffer_unmap(pipe, transfer); - } -} - -enum u_vbuf_return_flags -u_vbuf_draw_begin(struct u_vbuf *mgrb, - struct pipe_draw_info *info) -{ - struct u_vbuf_priv *mgr = (struct u_vbuf_priv*)mgrb; - int start_vertex, min_index; - unsigned num_vertices; - bool unroll_indices = false; - - if (!mgr->incompatible_vb_layout && - !mgr->ve->incompatible_layout && - !mgr->any_user_vbs) { - return 0; - } - - if (info->indexed) { - int max_index; - bool index_bounds_valid = false; - - if (info->max_index != ~0) { - min_index = info->min_index; - max_index = info->max_index; - index_bounds_valid = true; - } else if (u_vbuf_need_minmax_index(mgr)) { - u_vbuf_get_minmax_index(mgr->pipe, &mgr->b.index_buffer, info, - &min_index, &max_index); - index_bounds_valid = true; - } - - /* If the index bounds are valid, it means some upload or translation - * of per-vertex attribs will be performed. */ - if (index_bounds_valid) { - assert(min_index <= max_index); - - start_vertex = min_index + info->index_bias; - num_vertices = max_index + 1 - min_index; - - /* Primitive restart doesn't work when unrolling indices. - * We would have to break this drawing operation into several ones. */ - /* Use some heuristic to see if unrolling indices improves - * performance. */ - if (!info->primitive_restart && - num_vertices > info->count*2 && - num_vertices-info->count > 32 && - !u_vbuf_mapping_vertex_buffer_blocks(mgr)) { - /*printf("num_vertices=%i count=%i\n", num_vertices, info->count);*/ - unroll_indices = true; - } - } else { - /* Nothing to do for per-vertex attribs. */ - start_vertex = 0; - num_vertices = 0; - min_index = 0; - } - } else { - start_vertex = info->start; - num_vertices = info->count; - min_index = 0; - } - - /* Translate vertices with non-native layouts or formats. */ - if (unroll_indices || - mgr->incompatible_vb_layout || - mgr->ve->incompatible_layout) { - /* XXX check the return value */ - u_vbuf_translate_begin(mgr, start_vertex, num_vertices, - info->start_instance, info->instance_count, - info->start, info->count, min_index, - unroll_indices); - } - - /* Upload user buffers. */ - if (mgr->any_user_vbs) { - u_vbuf_upload_buffers(mgr, start_vertex, num_vertices, - info->start_instance, info->instance_count); - } - - /* - if (unroll_indices) { - printf("unrolling indices: start_vertex = %i, num_vertices = %i\n", - start_vertex, num_vertices); - util_dump_draw_info(stdout, info); - printf("\n"); - } - - unsigned i; - for (i = 0; i < mgr->b.nr_vertex_buffers; i++) { - printf("input %i: ", i); - util_dump_vertex_buffer(stdout, mgr->b.vertex_buffer+i); - printf("\n"); - } - for (i = 0; i < mgr->b.nr_real_vertex_buffers; i++) { - printf("real %i: ", i); - util_dump_vertex_buffer(stdout, mgr->b.real_vertex_buffer+i); - printf("\n"); - } - */ - - if (unroll_indices) { - info->indexed = FALSE; - info->index_bias = 0; - info->min_index = 0; - info->max_index = info->count - 1; - info->start = 0; - } - - return U_VBUF_BUFFERS_UPDATED; -} - -void u_vbuf_draw_end(struct u_vbuf *mgrb) -{ - struct u_vbuf_priv *mgr = (struct u_vbuf_priv*)mgrb; - - if (mgr->fallback_ve) { - u_vbuf_translate_end(mgr); - } -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_vbuf.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_vbuf.h deleted file mode 100644 index 3669c9b874a..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_vbuf.h +++ /dev/null @@ -1,145 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Marek Olšák - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_VBUF_MGR_H -#define U_VBUF_MGR_H - -/* This module builds upon u_upload_mgr and translate_cache and takes care of - * user buffer uploads and vertex format fallbacks. It's designed - * for the drivers which don't always use the Draw module. (e.g. for HWTCL) - */ - -#include "pipe/p_context.h" -#include "pipe/p_state.h" -#include "util/u_transfer.h" - -/* Hardware vertex fetcher limitations can be described by this structure. */ -struct u_vbuf_caps { - /* Vertex format CAPs. */ - /* TRUE if hardware supports it. */ - unsigned format_fixed32:1; /* PIPE_FORMAT_*32*_FIXED */ - unsigned format_float16:1; /* PIPE_FORMAT_*16*_FLOAT */ - unsigned format_float64:1; /* PIPE_FORMAT_*64*_FLOAT */ - unsigned format_norm32:1; /* PIPE_FORMAT_*32*NORM */ - unsigned format_scaled32:1; /* PIPE_FORMAT_*32*SCALED */ - - /* Whether vertex fetches don't have to be dword-aligned. */ - /* TRUE if hardware supports it. */ - unsigned fetch_dword_unaligned:1; -}; - -/* The manager. - * This structure should also be used to access vertex buffers - * from a driver. */ -struct u_vbuf { - /* This is what was set in set_vertex_buffers. - * May contain user buffers. */ - struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS]; - unsigned nr_vertex_buffers; - - /* Contains only real vertex buffers. - * Hardware drivers should use real_vertex_buffers[i] - * instead of vertex_buffers[i].buffer. */ - struct pipe_vertex_buffer real_vertex_buffer[PIPE_MAX_ATTRIBS]; - int nr_real_vertex_buffers; - - /* The index buffer. */ - struct pipe_index_buffer index_buffer; - - /* This uploader can optionally be used by the driver. - * - * Allowed functions: - * - u_upload_alloc - * - u_upload_data - * - u_upload_buffer - * - u_upload_flush */ - struct u_upload_mgr *uploader; - - struct u_vbuf_caps caps; -}; - -struct u_vbuf_resource { - struct u_resource b; - uint8_t *user_ptr; -}; - -/* Opaque type containing information about vertex elements for the manager. */ -struct u_vbuf_elements; - -enum u_fetch_alignment { - U_VERTEX_FETCH_BYTE_ALIGNED, - U_VERTEX_FETCH_DWORD_ALIGNED -}; - -enum u_vbuf_return_flags { - U_VBUF_BUFFERS_UPDATED = 1 -}; - - -struct u_vbuf * -u_vbuf_create(struct pipe_context *pipe, - unsigned upload_buffer_size, - unsigned upload_buffer_alignment, - unsigned upload_buffer_bind, - enum u_fetch_alignment fetch_alignment); - -void u_vbuf_destroy(struct u_vbuf *mgr); - -struct u_vbuf_elements * -u_vbuf_create_vertex_elements(struct u_vbuf *mgr, - unsigned count, - const struct pipe_vertex_element *attrs, - struct pipe_vertex_element *native_attrs); - -void u_vbuf_bind_vertex_elements(struct u_vbuf *mgr, - void *cso, - struct u_vbuf_elements *ve); - -void u_vbuf_destroy_vertex_elements(struct u_vbuf *mgr, - struct u_vbuf_elements *ve); - -void u_vbuf_set_vertex_buffers(struct u_vbuf *mgr, - unsigned count, - const struct pipe_vertex_buffer *bufs); - -void u_vbuf_set_index_buffer(struct u_vbuf *mgr, - const struct pipe_index_buffer *ib); - -enum u_vbuf_return_flags u_vbuf_draw_begin(struct u_vbuf *mgr, - struct pipe_draw_info *info); - -unsigned u_vbuf_draw_max_vertex_count(struct u_vbuf *mgr); - -void u_vbuf_draw_end(struct u_vbuf *mgr); - - -static INLINE struct u_vbuf_resource *u_vbuf_resource(struct pipe_resource *r) -{ - return (struct u_vbuf_resource*)r; -} - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/util/u_video.h b/dll/opengl/mesa/src/gallium/auxiliary/util/u_video.h deleted file mode 100644 index be3fac2d010..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/util/u_video.h +++ /dev/null @@ -1,76 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 Younes Manton. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef U_VIDEO_H -#define U_VIDEO_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "pipe/p_defines.h" -#include "pipe/p_video_enums.h" - -/* u_reduce_video_profile() needs these */ -#include "pipe/p_compiler.h" -#include "util/u_debug.h" - -static INLINE enum pipe_video_codec -u_reduce_video_profile(enum pipe_video_profile profile) -{ - switch (profile) - { - case PIPE_VIDEO_PROFILE_MPEG1: - case PIPE_VIDEO_PROFILE_MPEG2_SIMPLE: - case PIPE_VIDEO_PROFILE_MPEG2_MAIN: - return PIPE_VIDEO_CODEC_MPEG12; - - case PIPE_VIDEO_PROFILE_MPEG4_SIMPLE: - case PIPE_VIDEO_PROFILE_MPEG4_ADVANCED_SIMPLE: - return PIPE_VIDEO_CODEC_MPEG4; - - case PIPE_VIDEO_PROFILE_VC1_SIMPLE: - case PIPE_VIDEO_PROFILE_VC1_MAIN: - case PIPE_VIDEO_PROFILE_VC1_ADVANCED: - return PIPE_VIDEO_CODEC_VC1; - - case PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE: - case PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN: - case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH: - return PIPE_VIDEO_CODEC_MPEG4_AVC; - - default: - assert(0); - return PIPE_VIDEO_CODEC_UNKNOWN; - } -} - -#ifdef __cplusplus -} -#endif - -#endif /* U_VIDEO_H */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_compositor.c b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_compositor.c deleted file mode 100644 index 0f2210c2e15..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_compositor.c +++ /dev/null @@ -1,833 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 Younes Manton. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include - -#include "pipe/p_compiler.h" -#include "pipe/p_context.h" - -#include "util/u_memory.h" -#include "util/u_draw.h" -#include "util/u_surface.h" - -#include "tgsi/tgsi_ureg.h" - -#include "vl_csc.h" -#include "vl_types.h" -#include "vl_compositor.h" - -#define MIN_DIRTY (0) -#define MAX_DIRTY (1 << 15) - -typedef float csc_matrix[16]; - -static void * -create_vert_shader(struct vl_compositor *c) -{ - struct ureg_program *shader; - struct ureg_src vpos, vtex; - struct ureg_dst o_vpos, o_vtex; - - shader = ureg_create(TGSI_PROCESSOR_VERTEX); - if (!shader) - return false; - - vpos = ureg_DECL_vs_input(shader, 0); - vtex = ureg_DECL_vs_input(shader, 1); - o_vpos = ureg_DECL_output(shader, TGSI_SEMANTIC_POSITION, 0); - o_vtex = ureg_DECL_output(shader, TGSI_SEMANTIC_GENERIC, 1); - - /* - * o_vpos = vpos - * o_vtex = vtex - */ - ureg_MOV(shader, o_vpos, vpos); - ureg_MOV(shader, o_vtex, vtex); - - ureg_END(shader); - - return ureg_create_shader_and_destroy(shader, c->pipe); -} - -static void * -create_frag_shader_video_buffer(struct vl_compositor *c) -{ - struct ureg_program *shader; - struct ureg_src tc; - struct ureg_src csc[3]; - struct ureg_src sampler[3]; - struct ureg_dst texel; - struct ureg_dst fragment; - unsigned i; - - shader = ureg_create(TGSI_PROCESSOR_FRAGMENT); - if (!shader) - return false; - - tc = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, 1, TGSI_INTERPOLATE_LINEAR); - for (i = 0; i < 3; ++i) { - csc[i] = ureg_DECL_constant(shader, i); - sampler[i] = ureg_DECL_sampler(shader, i); - } - texel = ureg_DECL_temporary(shader); - fragment = ureg_DECL_output(shader, TGSI_SEMANTIC_COLOR, 0); - - /* - * texel.xyz = tex(tc, sampler[i]) - * fragment = csc * texel - */ - for (i = 0; i < 3; ++i) - ureg_TEX(shader, ureg_writemask(texel, TGSI_WRITEMASK_X << i), TGSI_TEXTURE_2D, tc, sampler[i]); - - ureg_MOV(shader, ureg_writemask(texel, TGSI_WRITEMASK_W), ureg_imm1f(shader, 1.0f)); - - for (i = 0; i < 3; ++i) - ureg_DP4(shader, ureg_writemask(fragment, TGSI_WRITEMASK_X << i), csc[i], ureg_src(texel)); - - ureg_MOV(shader, ureg_writemask(fragment, TGSI_WRITEMASK_W), ureg_imm1f(shader, 1.0f)); - - ureg_release_temporary(shader, texel); - ureg_END(shader); - - return ureg_create_shader_and_destroy(shader, c->pipe); -} - -static void * -create_frag_shader_palette(struct vl_compositor *c, bool include_cc) -{ - struct ureg_program *shader; - struct ureg_src csc[3]; - struct ureg_src tc; - struct ureg_src sampler; - struct ureg_src palette; - struct ureg_dst texel; - struct ureg_dst fragment; - unsigned i; - - shader = ureg_create(TGSI_PROCESSOR_FRAGMENT); - if (!shader) - return false; - - for (i = 0; include_cc && i < 3; ++i) - csc[i] = ureg_DECL_constant(shader, i); - - tc = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, 1, TGSI_INTERPOLATE_LINEAR); - sampler = ureg_DECL_sampler(shader, 0); - palette = ureg_DECL_sampler(shader, 1); - - texel = ureg_DECL_temporary(shader); - fragment = ureg_DECL_output(shader, TGSI_SEMANTIC_COLOR, 0); - - /* - * texel = tex(tc, sampler) - * fragment.xyz = tex(texel, palette) * csc - * fragment.a = texel.a - */ - ureg_TEX(shader, texel, TGSI_TEXTURE_2D, tc, sampler); - ureg_MOV(shader, ureg_writemask(fragment, TGSI_WRITEMASK_W), ureg_src(texel)); - - if (include_cc) { - ureg_TEX(shader, texel, TGSI_TEXTURE_1D, ureg_src(texel), palette); - for (i = 0; i < 3; ++i) - ureg_DP4(shader, ureg_writemask(fragment, TGSI_WRITEMASK_X << i), csc[i], ureg_src(texel)); - } else { - ureg_TEX(shader, ureg_writemask(fragment, TGSI_WRITEMASK_XYZ), - TGSI_TEXTURE_1D, ureg_src(texel), palette); - } - - ureg_release_temporary(shader, texel); - ureg_END(shader); - - return ureg_create_shader_and_destroy(shader, c->pipe); -} - -static void * -create_frag_shader_rgba(struct vl_compositor *c) -{ - struct ureg_program *shader; - struct ureg_src tc; - struct ureg_src sampler; - struct ureg_dst fragment; - - shader = ureg_create(TGSI_PROCESSOR_FRAGMENT); - if (!shader) - return false; - - tc = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, 1, TGSI_INTERPOLATE_LINEAR); - sampler = ureg_DECL_sampler(shader, 0); - fragment = ureg_DECL_output(shader, TGSI_SEMANTIC_COLOR, 0); - - /* - * fragment = tex(tc, sampler) - */ - ureg_TEX(shader, fragment, TGSI_TEXTURE_2D, tc, sampler); - ureg_END(shader); - - return ureg_create_shader_and_destroy(shader, c->pipe); -} - -static bool -init_shaders(struct vl_compositor *c) -{ - assert(c); - - c->vs = create_vert_shader(c); - if (!c->vs) { - debug_printf("Unable to create vertex shader.\n"); - return false; - } - - c->fs_video_buffer = create_frag_shader_video_buffer(c); - if (!c->fs_video_buffer) { - debug_printf("Unable to create YCbCr-to-RGB fragment shader.\n"); - return false; - } - - c->fs_palette.yuv = create_frag_shader_palette(c, true); - if (!c->fs_palette.yuv) { - debug_printf("Unable to create YUV-Palette-to-RGB fragment shader.\n"); - return false; - } - - c->fs_palette.rgb = create_frag_shader_palette(c, false); - if (!c->fs_palette.rgb) { - debug_printf("Unable to create RGB-Palette-to-RGB fragment shader.\n"); - return false; - } - - c->fs_rgba = create_frag_shader_rgba(c); - if (!c->fs_rgba) { - debug_printf("Unable to create RGB-to-RGB fragment shader.\n"); - return false; - } - - return true; -} - -static void cleanup_shaders(struct vl_compositor *c) -{ - assert(c); - - c->pipe->delete_vs_state(c->pipe, c->vs); - c->pipe->delete_fs_state(c->pipe, c->fs_video_buffer); - c->pipe->delete_fs_state(c->pipe, c->fs_palette.yuv); - c->pipe->delete_fs_state(c->pipe, c->fs_palette.rgb); - c->pipe->delete_fs_state(c->pipe, c->fs_rgba); -} - -static bool -init_pipe_state(struct vl_compositor *c) -{ - struct pipe_rasterizer_state rast; - struct pipe_sampler_state sampler; - struct pipe_blend_state blend; - struct pipe_depth_stencil_alpha_state dsa; - unsigned i; - - assert(c); - - c->fb_state.nr_cbufs = 1; - c->fb_state.zsbuf = NULL; - - c->viewport.scale[2] = 1; - c->viewport.scale[3] = 1; - c->viewport.translate[2] = 0; - c->viewport.translate[3] = 0; - - memset(&sampler, 0, sizeof(sampler)); - sampler.wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - sampler.wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - sampler.wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - sampler.min_img_filter = PIPE_TEX_FILTER_LINEAR; - sampler.min_mip_filter = PIPE_TEX_MIPFILTER_NONE; - sampler.mag_img_filter = PIPE_TEX_FILTER_LINEAR; - sampler.compare_mode = PIPE_TEX_COMPARE_NONE; - sampler.compare_func = PIPE_FUNC_ALWAYS; - sampler.normalized_coords = 1; - - c->sampler_linear = c->pipe->create_sampler_state(c->pipe, &sampler); - - sampler.min_img_filter = PIPE_TEX_FILTER_NEAREST; - sampler.mag_img_filter = PIPE_TEX_FILTER_NEAREST; - c->sampler_nearest = c->pipe->create_sampler_state(c->pipe, &sampler); - - memset(&blend, 0, sizeof blend); - blend.independent_blend_enable = 0; - blend.rt[0].blend_enable = 0; - blend.logicop_enable = 0; - blend.logicop_func = PIPE_LOGICOP_CLEAR; - blend.rt[0].colormask = PIPE_MASK_RGBA; - blend.dither = 0; - c->blend_clear = c->pipe->create_blend_state(c->pipe, &blend); - - blend.rt[0].blend_enable = 1; - blend.rt[0].rgb_func = PIPE_BLEND_ADD; - blend.rt[0].rgb_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA; - blend.rt[0].rgb_dst_factor = PIPE_BLENDFACTOR_INV_SRC_ALPHA; - blend.rt[0].alpha_func = PIPE_BLEND_ADD; - blend.rt[0].alpha_src_factor = PIPE_BLENDFACTOR_ONE; - blend.rt[0].alpha_dst_factor = PIPE_BLENDFACTOR_ONE; - c->blend_add = c->pipe->create_blend_state(c->pipe, &blend); - - memset(&rast, 0, sizeof rast); - rast.flatshade = 1; - rast.front_ccw = 1; - rast.cull_face = PIPE_FACE_NONE; - rast.fill_back = PIPE_POLYGON_MODE_FILL; - rast.fill_front = PIPE_POLYGON_MODE_FILL; - rast.scissor = 1; - rast.line_width = 1; - rast.point_size_per_vertex = 1; - rast.offset_units = 1; - rast.offset_scale = 1; - rast.gl_rasterization_rules = 1; - rast.depth_clip = 1; - - c->rast = c->pipe->create_rasterizer_state(c->pipe, &rast); - - memset(&dsa, 0, sizeof dsa); - dsa.depth.enabled = 0; - dsa.depth.writemask = 0; - dsa.depth.func = PIPE_FUNC_ALWAYS; - for (i = 0; i < 2; ++i) { - dsa.stencil[i].enabled = 0; - dsa.stencil[i].func = PIPE_FUNC_ALWAYS; - dsa.stencil[i].fail_op = PIPE_STENCIL_OP_KEEP; - dsa.stencil[i].zpass_op = PIPE_STENCIL_OP_KEEP; - dsa.stencil[i].zfail_op = PIPE_STENCIL_OP_KEEP; - dsa.stencil[i].valuemask = 0; - dsa.stencil[i].writemask = 0; - } - dsa.alpha.enabled = 0; - dsa.alpha.func = PIPE_FUNC_ALWAYS; - dsa.alpha.ref_value = 0; - c->dsa = c->pipe->create_depth_stencil_alpha_state(c->pipe, &dsa); - c->pipe->bind_depth_stencil_alpha_state(c->pipe, c->dsa); - - return true; -} - -static void cleanup_pipe_state(struct vl_compositor *c) -{ - assert(c); - - /* Asserted in softpipe_delete_fs_state() for some reason */ - c->pipe->bind_vs_state(c->pipe, NULL); - c->pipe->bind_fs_state(c->pipe, NULL); - - c->pipe->delete_depth_stencil_alpha_state(c->pipe, c->dsa); - c->pipe->delete_sampler_state(c->pipe, c->sampler_linear); - c->pipe->delete_sampler_state(c->pipe, c->sampler_nearest); - c->pipe->delete_blend_state(c->pipe, c->blend_clear); - c->pipe->delete_blend_state(c->pipe, c->blend_add); - c->pipe->delete_rasterizer_state(c->pipe, c->rast); -} - -static bool -create_vertex_buffer(struct vl_compositor *c) -{ - assert(c); - - pipe_resource_reference(&c->vertex_buf.buffer, NULL); - c->vertex_buf.buffer = pipe_buffer_create - ( - c->pipe->screen, - PIPE_BIND_VERTEX_BUFFER, - PIPE_USAGE_STREAM, - sizeof(struct vertex4f) * VL_COMPOSITOR_MAX_LAYERS * 4 - ); - - return c->vertex_buf.buffer != NULL; -} - -static bool -init_buffers(struct vl_compositor *c) -{ - struct pipe_vertex_element vertex_elems[2]; - - assert(c); - - /* - * Create our vertex buffer and vertex buffer elements - */ - c->vertex_buf.stride = sizeof(struct vertex4f); - c->vertex_buf.buffer_offset = 0; - create_vertex_buffer(c); - - vertex_elems[0].src_offset = 0; - vertex_elems[0].instance_divisor = 0; - vertex_elems[0].vertex_buffer_index = 0; - vertex_elems[0].src_format = PIPE_FORMAT_R32G32_FLOAT; - vertex_elems[1].src_offset = sizeof(struct vertex2f); - vertex_elems[1].instance_divisor = 0; - vertex_elems[1].vertex_buffer_index = 0; - vertex_elems[1].src_format = PIPE_FORMAT_R32G32_FLOAT; - c->vertex_elems_state = c->pipe->create_vertex_elements_state(c->pipe, 2, vertex_elems); - - /* - * Create our fragment shader's constant buffer - * Const buffer contains the color conversion matrix and bias vectors - */ - /* XXX: Create with IMMUTABLE/STATIC... although it does change every once in a long while... */ - c->csc_matrix = pipe_buffer_create - ( - c->pipe->screen, - PIPE_BIND_CONSTANT_BUFFER, - PIPE_USAGE_STATIC, - sizeof(csc_matrix) - ); - - return true; -} - -static void -cleanup_buffers(struct vl_compositor *c) -{ - assert(c); - - c->pipe->delete_vertex_elements_state(c->pipe, c->vertex_elems_state); - pipe_resource_reference(&c->vertex_buf.buffer, NULL); - pipe_resource_reference(&c->csc_matrix, NULL); -} - -static INLINE struct pipe_video_rect -default_rect(struct vl_compositor_layer *layer) -{ - struct pipe_resource *res = layer->sampler_views[0]->texture; - struct pipe_video_rect rect = { 0, 0, res->width0, res->height0 }; - return rect; -} - -static INLINE struct vertex2f -calc_topleft(struct vertex2f size, struct pipe_video_rect rect) -{ - struct vertex2f res = { rect.x / size.x, rect.y / size.y }; - return res; -} - -static INLINE struct vertex2f -calc_bottomright(struct vertex2f size, struct pipe_video_rect rect) -{ - struct vertex2f res = { (rect.x + rect.w) / size.x, (rect.y + rect.h) / size.y }; - return res; -} - -static INLINE void -calc_src_and_dst(struct vl_compositor_layer *layer, unsigned width, unsigned height, - struct pipe_video_rect src, struct pipe_video_rect dst) -{ - struct vertex2f size = { width, height }; - - layer->src.tl = calc_topleft(size, src); - layer->src.br = calc_bottomright(size, src); - layer->dst.tl = calc_topleft(size, dst); - layer->dst.br = calc_bottomright(size, dst); -} - -static void -gen_rect_verts(struct vertex4f *vb, struct vl_compositor_layer *layer) -{ - assert(vb && layer); - - vb[0].x = layer->dst.tl.x; - vb[0].y = layer->dst.tl.y; - vb[0].z = layer->src.tl.x; - vb[0].w = layer->src.tl.y; - - vb[1].x = layer->dst.br.x; - vb[1].y = layer->dst.tl.y; - vb[1].z = layer->src.br.x; - vb[1].w = layer->src.tl.y; - - vb[2].x = layer->dst.br.x; - vb[2].y = layer->dst.br.y; - vb[2].z = layer->src.br.x; - vb[2].w = layer->src.br.y; - - vb[3].x = layer->dst.tl.x; - vb[3].y = layer->dst.br.y; - vb[3].z = layer->src.tl.x; - vb[3].w = layer->src.br.y; -} - -static INLINE struct u_rect -calc_drawn_area(struct vl_compositor *c, struct vl_compositor_layer *layer) -{ - struct u_rect result; - - // scale - result.x0 = layer->dst.tl.x * c->viewport.scale[0] + c->viewport.translate[0]; - result.y0 = layer->dst.tl.y * c->viewport.scale[1] + c->viewport.translate[1]; - result.x1 = layer->dst.br.x * c->viewport.scale[0] + c->viewport.translate[0]; - result.y1 = layer->dst.br.y * c->viewport.scale[1] + c->viewport.translate[1]; - - // and clip - result.x0 = MAX2(result.x0, c->scissor.minx); - result.y0 = MAX2(result.y0, c->scissor.miny); - result.x1 = MIN2(result.x1, c->scissor.maxx); - result.y1 = MIN2(result.y1, c->scissor.maxy); - return result; -} - -static void -gen_vertex_data(struct vl_compositor *c, struct u_rect *dirty) -{ - struct vertex4f *vb; - struct pipe_transfer *buf_transfer; - unsigned i; - - assert(c); - - vb = pipe_buffer_map(c->pipe, c->vertex_buf.buffer, - PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE | PIPE_TRANSFER_DONTBLOCK, - &buf_transfer); - - if (!vb) { - // If buffer is still locked from last draw create a new one - create_vertex_buffer(c); - vb = pipe_buffer_map(c->pipe, c->vertex_buf.buffer, - PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE, - &buf_transfer); - } - - for (i = 0; i < VL_COMPOSITOR_MAX_LAYERS; i++) { - if (c->used_layers & (1 << i)) { - struct vl_compositor_layer *layer = &c->layers[i]; - gen_rect_verts(vb, layer); - vb += 4; - - if (dirty && layer->clearing) { - struct u_rect drawn = calc_drawn_area(c, layer); - if ( - dirty->x0 >= drawn.x0 && - dirty->y0 >= drawn.y0 && - dirty->x1 <= drawn.x1 && - dirty->y1 <= drawn.y1) { - - // We clear the dirty area anyway, no need for clear_render_target - dirty->x0 = dirty->y0 = MAX_DIRTY; - dirty->x1 = dirty->y1 = MIN_DIRTY; - } - } - } - } - - pipe_buffer_unmap(c->pipe, buf_transfer); -} - -static void -draw_layers(struct vl_compositor *c, struct u_rect *dirty) -{ - unsigned vb_index, i; - - assert(c); - - for (i = 0, vb_index = 0; i < VL_COMPOSITOR_MAX_LAYERS; ++i) { - if (c->used_layers & (1 << i)) { - struct vl_compositor_layer *layer = &c->layers[i]; - struct pipe_sampler_view **samplers = &layer->sampler_views[0]; - unsigned num_sampler_views = !samplers[1] ? 1 : !samplers[2] ? 2 : 3; - - c->pipe->bind_blend_state(c->pipe, layer->blend); - c->pipe->bind_fs_state(c->pipe, layer->fs); - c->pipe->bind_fragment_sampler_states(c->pipe, num_sampler_views, layer->samplers); - c->pipe->set_fragment_sampler_views(c->pipe, num_sampler_views, samplers); - util_draw_arrays(c->pipe, PIPE_PRIM_QUADS, vb_index * 4, 4); - vb_index++; - - if (dirty) { - // Remember the currently drawn area as dirty for the next draw command - struct u_rect drawn = calc_drawn_area(c, layer); - dirty->x0 = MIN2(drawn.x0, dirty->x0); - dirty->y0 = MIN2(drawn.y0, dirty->y0); - dirty->x1 = MAX2(drawn.x1, dirty->x1); - dirty->y1 = MAX2(drawn.y1, dirty->y1); - } - } - } -} - -void -vl_compositor_reset_dirty_area(struct u_rect *dirty) -{ - assert(dirty); - - dirty->x0 = dirty->y0 = MIN_DIRTY; - dirty->x1 = dirty->y1 = MAX_DIRTY; -} - -void -vl_compositor_set_clear_color(struct vl_compositor *c, union pipe_color_union *color) -{ - assert(c); - - c->clear_color = *color; -} - -void -vl_compositor_get_clear_color(struct vl_compositor *c, union pipe_color_union *color) -{ - assert(c); - assert(color); - - *color = c->clear_color; -} - -void -vl_compositor_clear_layers(struct vl_compositor *c) -{ - unsigned i, j; - - assert(c); - - c->used_layers = 0; - for ( i = 0; i < VL_COMPOSITOR_MAX_LAYERS; ++i) { - c->layers[i].clearing = i ? false : true; - c->layers[i].blend = i ? c->blend_add : c->blend_clear; - c->layers[i].fs = NULL; - for ( j = 0; j < 3; j++) - pipe_sampler_view_reference(&c->layers[i].sampler_views[j], NULL); - } -} - -void -vl_compositor_cleanup(struct vl_compositor *c) -{ - assert(c); - - vl_compositor_clear_layers(c); - - cleanup_buffers(c); - cleanup_shaders(c); - cleanup_pipe_state(c); -} - -void -vl_compositor_set_csc_matrix(struct vl_compositor *c, const float matrix[16]) -{ - struct pipe_transfer *buf_transfer; - - assert(c); - - memcpy - ( - pipe_buffer_map(c->pipe, c->csc_matrix, - PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE, - &buf_transfer), - matrix, - sizeof(csc_matrix) - ); - - pipe_buffer_unmap(c->pipe, buf_transfer); -} - -void -vl_compositor_set_layer_blend(struct vl_compositor *c, - unsigned layer, void *blend, - bool is_clearing) -{ - assert(c && blend); - - assert(layer < VL_COMPOSITOR_MAX_LAYERS); - - c->layers[layer].clearing = is_clearing; - c->layers[layer].blend = blend; -} - -void -vl_compositor_set_buffer_layer(struct vl_compositor *c, - unsigned layer, - struct pipe_video_buffer *buffer, - struct pipe_video_rect *src_rect, - struct pipe_video_rect *dst_rect) -{ - struct pipe_sampler_view **sampler_views; - unsigned i; - - assert(c && buffer); - - assert(layer < VL_COMPOSITOR_MAX_LAYERS); - - c->used_layers |= 1 << layer; - c->layers[layer].fs = c->fs_video_buffer; - - sampler_views = buffer->get_sampler_view_components(buffer); - for (i = 0; i < 3; ++i) { - c->layers[layer].samplers[i] = c->sampler_linear; - pipe_sampler_view_reference(&c->layers[layer].sampler_views[i], sampler_views[i]); - } - - calc_src_and_dst(&c->layers[layer], buffer->width, buffer->height, - src_rect ? *src_rect : default_rect(&c->layers[layer]), - dst_rect ? *dst_rect : default_rect(&c->layers[layer])); -} - -void -vl_compositor_set_palette_layer(struct vl_compositor *c, - unsigned layer, - struct pipe_sampler_view *indexes, - struct pipe_sampler_view *palette, - struct pipe_video_rect *src_rect, - struct pipe_video_rect *dst_rect, - bool include_color_conversion) -{ - assert(c && indexes && palette); - - assert(layer < VL_COMPOSITOR_MAX_LAYERS); - - c->used_layers |= 1 << layer; - - c->layers[layer].fs = include_color_conversion ? - c->fs_palette.yuv : c->fs_palette.rgb; - - c->layers[layer].samplers[0] = c->sampler_linear; - c->layers[layer].samplers[1] = c->sampler_nearest; - c->layers[layer].samplers[2] = NULL; - pipe_sampler_view_reference(&c->layers[layer].sampler_views[0], indexes); - pipe_sampler_view_reference(&c->layers[layer].sampler_views[1], palette); - pipe_sampler_view_reference(&c->layers[layer].sampler_views[2], NULL); - calc_src_and_dst(&c->layers[layer], indexes->texture->width0, indexes->texture->height0, - src_rect ? *src_rect : default_rect(&c->layers[layer]), - dst_rect ? *dst_rect : default_rect(&c->layers[layer])); -} - -void -vl_compositor_set_rgba_layer(struct vl_compositor *c, - unsigned layer, - struct pipe_sampler_view *rgba, - struct pipe_video_rect *src_rect, - struct pipe_video_rect *dst_rect) -{ - assert(c && rgba); - - assert(layer < VL_COMPOSITOR_MAX_LAYERS); - - c->used_layers |= 1 << layer; - c->layers[layer].fs = c->fs_rgba; - c->layers[layer].samplers[0] = c->sampler_linear; - c->layers[layer].samplers[1] = NULL; - c->layers[layer].samplers[2] = NULL; - pipe_sampler_view_reference(&c->layers[layer].sampler_views[0], rgba); - pipe_sampler_view_reference(&c->layers[layer].sampler_views[1], NULL); - pipe_sampler_view_reference(&c->layers[layer].sampler_views[2], NULL); - calc_src_and_dst(&c->layers[layer], rgba->texture->width0, rgba->texture->height0, - src_rect ? *src_rect : default_rect(&c->layers[layer]), - dst_rect ? *dst_rect : default_rect(&c->layers[layer])); -} - -void -vl_compositor_render(struct vl_compositor *c, - struct pipe_surface *dst_surface, - struct pipe_video_rect *dst_area, - struct pipe_video_rect *dst_clip, - struct u_rect *dirty_area) -{ - assert(c); - assert(dst_surface); - - c->fb_state.width = dst_surface->width; - c->fb_state.height = dst_surface->height; - c->fb_state.cbufs[0] = dst_surface; - - if (dst_area) { - c->viewport.scale[0] = dst_area->w; - c->viewport.scale[1] = dst_area->h; - c->viewport.translate[0] = dst_area->x; - c->viewport.translate[1] = dst_area->y; - } else { - c->viewport.scale[0] = dst_surface->width; - c->viewport.scale[1] = dst_surface->height; - c->viewport.translate[0] = 0; - c->viewport.translate[1] = 0; - } - - if (dst_clip) { - c->scissor.minx = dst_clip->x; - c->scissor.miny = dst_clip->y; - c->scissor.maxx = dst_clip->x + dst_clip->w; - c->scissor.maxy = dst_clip->y + dst_clip->h; - } else { - c->scissor.minx = 0; - c->scissor.miny = 0; - c->scissor.maxx = dst_surface->width; - c->scissor.maxy = dst_surface->height; - } - - gen_vertex_data(c, dirty_area); - - if (dirty_area && (dirty_area->x0 < dirty_area->x1 || - dirty_area->y0 < dirty_area->y1)) { - - c->pipe->clear_render_target(c->pipe, dst_surface, &c->clear_color, - 0, 0, dst_surface->width, dst_surface->height); - dirty_area->x0 = dirty_area->y0 = MAX_DIRTY; - dirty_area->x0 = dirty_area->y1 = MIN_DIRTY; - } - - c->pipe->set_scissor_state(c->pipe, &c->scissor); - c->pipe->set_framebuffer_state(c->pipe, &c->fb_state); - c->pipe->set_viewport_state(c->pipe, &c->viewport); - c->pipe->bind_vs_state(c->pipe, c->vs); - c->pipe->set_vertex_buffers(c->pipe, 1, &c->vertex_buf); - c->pipe->bind_vertex_elements_state(c->pipe, c->vertex_elems_state); - c->pipe->set_constant_buffer(c->pipe, PIPE_SHADER_FRAGMENT, 0, c->csc_matrix); - c->pipe->bind_rasterizer_state(c->pipe, c->rast); - - draw_layers(c, dirty_area); -} - -bool -vl_compositor_init(struct vl_compositor *c, struct pipe_context *pipe) -{ - csc_matrix csc_matrix; - - c->pipe = pipe; - - if (!init_pipe_state(c)) - return false; - - if (!init_shaders(c)) { - cleanup_pipe_state(c); - return false; - } - - if (!init_buffers(c)) { - cleanup_shaders(c); - cleanup_pipe_state(c); - return false; - } - - vl_compositor_clear_layers(c); - - vl_csc_get_matrix(VL_CSC_COLOR_STANDARD_IDENTITY, NULL, true, csc_matrix); - vl_compositor_set_csc_matrix(c, csc_matrix); - - c->clear_color.f[0] = c->clear_color.f[1] = 0.0f; - c->clear_color.f[2] = c->clear_color.f[3] = 0.0f; - - return true; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_compositor.h b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_compositor.h deleted file mode 100644 index 05482035b4d..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_compositor.h +++ /dev/null @@ -1,191 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 Younes Manton. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef vl_compositor_h -#define vl_compositor_h - -#include "pipe/p_state.h" -#include "pipe/p_video_decoder.h" -#include "pipe/p_video_state.h" - -#include "util/u_rect.h" - -#include "vl_types.h" - -struct pipe_context; - -/** - * composing and displaying of image data - */ - -#define VL_COMPOSITOR_MAX_LAYERS 16 - -struct vl_compositor_layer -{ - bool clearing; - - void *fs; - void *samplers[3]; - void *blend; - - struct pipe_sampler_view *sampler_views[3]; - struct { - struct vertex2f tl, br; - } src, dst; -}; - -struct vl_compositor -{ - struct pipe_context *pipe; - - struct pipe_framebuffer_state fb_state; - struct pipe_viewport_state viewport; - struct pipe_scissor_state scissor; - struct pipe_vertex_buffer vertex_buf; - struct pipe_resource *csc_matrix; - - void *sampler_linear; - void *sampler_nearest; - void *blend_clear, *blend_add; - void *rast; - void *dsa; - void *vertex_elems_state; - - void *vs; - void *fs_video_buffer; - void *fs_rgba; - - struct { - void *rgb; - void *yuv; - } fs_palette; - - union pipe_color_union clear_color; - - unsigned used_layers:VL_COMPOSITOR_MAX_LAYERS; - struct vl_compositor_layer layers[VL_COMPOSITOR_MAX_LAYERS]; -}; - -/** - * initialize this compositor - */ -bool -vl_compositor_init(struct vl_compositor *compositor, struct pipe_context *pipe); - -/** - * set yuv -> rgba conversion matrix - */ -void -vl_compositor_set_csc_matrix(struct vl_compositor *compositor, const float mat[16]); - -/** - * reset dirty area, so it's cleared with the clear colour - */ -void -vl_compositor_reset_dirty_area(struct u_rect *dirty); - -/** - * set the clear color - */ -void -vl_compositor_set_clear_color(struct vl_compositor *compositor, union pipe_color_union *color); - -/** - * get the clear color - */ -void -vl_compositor_get_clear_color(struct vl_compositor *compositor, union pipe_color_union *color); - -/** - * set overlay samplers - */ -/*@{*/ - -/** - * reset all currently set layers - */ -void -vl_compositor_clear_layers(struct vl_compositor *compositor); - -/** - * set the blender used to render a layer - */ -void -vl_compositor_set_layer_blend(struct vl_compositor *compositor, - unsigned layer, void *blend, bool is_clearing); - -/** - * set a video buffer as a layer to render - */ -void -vl_compositor_set_buffer_layer(struct vl_compositor *compositor, - unsigned layer, - struct pipe_video_buffer *buffer, - struct pipe_video_rect *src_rect, - struct pipe_video_rect *dst_rect); - -/** - * set a paletted sampler as a layer to render - */ -void -vl_compositor_set_palette_layer(struct vl_compositor *compositor, - unsigned layer, - struct pipe_sampler_view *indexes, - struct pipe_sampler_view *palette, - struct pipe_video_rect *src_rect, - struct pipe_video_rect *dst_rect, - bool include_color_conversion); - -/** - * set a rgba sampler as a layer to render - */ -void -vl_compositor_set_rgba_layer(struct vl_compositor *compositor, - unsigned layer, - struct pipe_sampler_view *rgba, - struct pipe_video_rect *src_rect, - struct pipe_video_rect *dst_rect); - -/*@}*/ - -/** - * render the layers to the frontbuffer - */ -void -vl_compositor_render(struct vl_compositor *compositor, - struct pipe_surface *dst_surface, - struct pipe_video_rect *dst_area, - struct pipe_video_rect *dst_clip, - struct u_rect *dirty_area); - -/** - * destroy this compositor - */ -void -vl_compositor_cleanup(struct vl_compositor *compositor); - -#endif /* vl_compositor_h */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_csc.c b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_csc.c deleted file mode 100644 index 56e662157ef..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_csc.c +++ /dev/null @@ -1,236 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 Younes Manton. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_math.h" -#include "util/u_debug.h" - -#include "vl_csc.h" - -/* - * Color space conversion formulas - * - * To convert YCbCr to RGB, - * vec4 ycbcr, rgb - * mat44 csc - * rgb = csc * ycbcr - * - * To calculate the color space conversion matrix csc with ProcAmp adjustments, - * mat44 csc, cstd, procamp, bias - * csc = cstd * (procamp * bias) - * - * Where cstd is a matrix corresponding to one of the color standards (BT.601, BT.709, etc) - * adjusted for the kind of YCbCr -> RGB mapping wanted (1:1, full), - * bias is a matrix corresponding to the kind of YCbCr -> RGB mapping wanted (1:1, full) - * - * To calculate procamp, - * mat44 procamp, hue, saturation, brightness, contrast - * procamp = brightness * (saturation * (contrast * hue)) - * Alternatively, - * procamp = saturation * (brightness * (contrast * hue)) - * - * contrast - * [ c, 0, 0, 0] - * [ 0, c, 0, 0] - * [ 0, 0, c, 0] - * [ 0, 0, 0, 1] - * - * brightness - * [ 1, 0, 0, b] - * [ 0, 1, 0, 0] - * [ 0, 0, 1, 0] - * [ 0, 0, 0, 1] - * - * saturation - * [ 1, 0, 0, 0] - * [ 0, s, 0, 0] - * [ 0, 0, s, 0] - * [ 0, 0, 0, 1] - * - * hue - * [ 1, 0, 0, 0] - * [ 0, cos(h), sin(h), 0] - * [ 0, -sin(h), cos(h), 0] - * [ 0, 0, 0, 1] - * - * procamp - * [ c, 0, 0, b] - * [ 0, c*s*cos(h), c*s*sin(h), 0] - * [ 0, -c*s*sin(h), c*s*cos(h), 0] - * [ 0, 0, 0, 1] - * - * bias - * [ 1, 0, 0, ybias] - * [ 0, 1, 0, cbbias] - * [ 0, 0, 1, crbias] - * [ 0, 0, 0, 1] - * - * csc - * [ c*cstd[ 0], c*cstd[ 1]*s*cos(h) - c*cstd[ 2]*s*sin(h), c*cstd[ 2]*s*cos(h) + c*cstd[ 1]*s*sin(h), cstd[ 3] + cstd[ 0]*(b + c*ybias) + cstd[ 1]*(c*cbbias*s*cos(h) + c*crbias*s*sin(h)) + cstd[ 2]*(c*crbias*s*cos(h) - c*cbbias*s*sin(h))] - * [ c*cstd[ 4], c*cstd[ 5]*s*cos(h) - c*cstd[ 6]*s*sin(h), c*cstd[ 6]*s*cos(h) + c*cstd[ 5]*s*sin(h), cstd[ 7] + cstd[ 4]*(b + c*ybias) + cstd[ 5]*(c*cbbias*s*cos(h) + c*crbias*s*sin(h)) + cstd[ 6]*(c*crbias*s*cos(h) - c*cbbias*s*sin(h))] - * [ c*cstd[ 8], c*cstd[ 9]*s*cos(h) - c*cstd[10]*s*sin(h), c*cstd[10]*s*cos(h) + c*cstd[ 9]*s*sin(h), cstd[11] + cstd[ 8]*(b + c*ybias) + cstd[ 9]*(c*cbbias*s*cos(h) + c*crbias*s*sin(h)) + cstd[10]*(c*crbias*s*cos(h) - c*cbbias*s*sin(h))] - * [ c*cstd[12], c*cstd[13]*s*cos(h) - c*cstd[14]*s*sin(h), c*cstd[14]*s*cos(h) + c*cstd[13]*s*sin(h), cstd[15] + cstd[12]*(b + c*ybias) + cstd[13]*(c*cbbias*s*cos(h) + c*crbias*s*sin(h)) + cstd[14]*(c*crbias*s*cos(h) - c*cbbias*s*sin(h))] - */ - -/* - * Converts ITU-R BT.601 YCbCr pixels to RGB pixels where: - * Y is in [16,235], Cb and Cr are in [16,240] - * R, G, and B are in [16,235] - */ -static const float bt_601[16] = -{ - 1.0f, 0.0f, 1.371f, 0.0f, - 1.0f, -0.336f, -0.698f, 0.0f, - 1.0f, 1.732f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 1.0f -}; - -/* - * Converts ITU-R BT.601 YCbCr pixels to RGB pixels where: - * Y is in [16,235], Cb and Cr are in [16,240] - * R, G, and B are in [0,255] - */ -static const float bt_601_full[16] = -{ - 1.164f, 0.0f, 1.596f, 0.0f, - 1.164f, -0.391f, -0.813f, 0.0f, - 1.164f, 2.018f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 1.0f -}; - -/* - * Converts ITU-R BT.709 YCbCr pixels to RGB pixels where: - * Y is in [16,235], Cb and Cr are in [16,240] - * R, G, and B are in [16,235] - */ -static const float bt_709[16] = -{ - 1.0f, 0.0f, 1.540f, 0.0f, - 1.0f, -0.183f, -0.459f, 0.0f, - 1.0f, 1.816f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 1.0f -}; - -/* - * Converts ITU-R BT.709 YCbCr pixels to RGB pixels where: - * Y is in [16,235], Cb and Cr are in [16,240] - * R, G, and B are in [0,255] - */ -static const float bt_709_full[16] = -{ - 1.164f, 0.0f, 1.793f, 0.0f, - 1.164f, -0.213f, -0.534f, 0.0f, - 1.164f, 2.115f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 1.0f -}; - -static const float smpte240m[16] = -{ - 1.0f, 0.0f, 1.582f, 0.0f, - 1.0f, -0.228f, -0.478f, 0.0f, - 1.0f, 1.833f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 1.0f -}; - -static const float smpte240m_full[16] = -{ - 1.164f, 0.0f, 1.794f, 0.0f, - 1.164f, -0.258f, -0.543f, 0.0f, - 1.164f, 2.079f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 1.0f -}; - -static const float identity[16] = -{ - 1.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 1.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 1.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 1.0f -}; - -const struct vl_procamp vl_default_procamp = { - 0.0f, /* brightness */ - 1.0f, /* contrast */ - 1.0f, /* saturation */ - 0.0f /* hue */ -}; - -void vl_csc_get_matrix(enum VL_CSC_COLOR_STANDARD cs, - struct vl_procamp *procamp, - bool full_range, - float *matrix) -{ - float ybias = full_range ? -16.0f/255.0f : 0.0f; - float cbbias = -128.0f/255.0f; - float crbias = -128.0f/255.0f; - - const struct vl_procamp *p = procamp ? procamp : &vl_default_procamp; - float c = p->contrast; - float s = p->saturation; - float b = p->brightness; - float h = p->hue; - - const float *cstd; - - assert(matrix); - - switch (cs) { - case VL_CSC_COLOR_STANDARD_BT_601: - cstd = full_range ? &bt_601_full[0] : &bt_601[0]; - break; - case VL_CSC_COLOR_STANDARD_BT_709: - cstd = full_range ? &bt_709_full[0] : &bt_709[0]; - break; - case VL_CSC_COLOR_STANDARD_SMPTE_240M: - cstd = full_range ? &smpte240m_full[0] : &smpte240m[0]; - break; - case VL_CSC_COLOR_STANDARD_IDENTITY: - default: - assert(cs == VL_CSC_COLOR_STANDARD_IDENTITY); - memcpy(matrix, &identity[0], sizeof(float) * 16); - return; - } - - matrix[ 0] = c*cstd[ 0]; - matrix[ 1] = c*cstd[ 1]*s*cosf(h) - c*cstd[ 2]*s*sinf(h); - matrix[ 2] = c*cstd[ 2]*s*cosf(h) + c*cstd[ 1]*s*sinf(h); - matrix[ 3] = cstd[ 3] + cstd[ 0]*(b + c*ybias) + cstd[ 1]*(c*cbbias*s*cosf(h) + c*crbias*s*sinf(h)) + cstd[ 2]*(c*crbias*s*cosf(h) - c*cbbias*s*sinf(h)); - - matrix[ 4] = c*cstd[ 4]; - matrix[ 5] = c*cstd[ 5]*s*cosf(h) - c*cstd[ 6]*s*sinf(h); - matrix[ 6] = c*cstd[ 6]*s*cosf(h) + c*cstd[ 5]*s*sinf(h); - matrix[ 7] = cstd[ 7] + cstd[ 4]*(b + c*ybias) + cstd[ 5]*(c*cbbias*s*cosf(h) + c*crbias*s*sinf(h)) + cstd[ 6]*(c*crbias*s*cosf(h) - c*cbbias*s*sinf(h)); - - matrix[ 8] = c*cstd[ 8]; - matrix[ 9] = c*cstd[ 9]*s*cosf(h) - c*cstd[10]*s*sinf(h); - matrix[10] = c*cstd[10]*s*cosf(h) + c*cstd[ 9]*s*sinf(h); - matrix[11] = cstd[11] + cstd[ 8]*(b + c*ybias) + cstd[ 9]*(c*cbbias*s*cosf(h) + c*crbias*s*sinf(h)) + cstd[10]*(c*crbias*s*cosf(h) - c*cbbias*s*sinf(h)); - - matrix[12] = c*cstd[12]; - matrix[13] = c*cstd[13]*s*cos(h) - c*cstd[14]*s*sin(h); - matrix[14] = c*cstd[14]*s*cos(h) + c*cstd[13]*s*sin(h); - matrix[15] = cstd[15] + cstd[12]*(b + c*ybias) + cstd[13]*(c*cbbias*s*cos(h) + c*crbias*s*sin(h)) + cstd[14]*(c*crbias*s*cos(h) - c*cbbias*s*sin(h)); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_csc.h b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_csc.h deleted file mode 100644 index 7a31dd4eb26..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_csc.h +++ /dev/null @@ -1,56 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 Younes Manton. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef vl_csc_h -#define vl_csc_h - -#include "pipe/p_compiler.h" - -struct vl_procamp -{ - float brightness; - float contrast; - float saturation; - float hue; -}; - -enum VL_CSC_COLOR_STANDARD -{ - VL_CSC_COLOR_STANDARD_IDENTITY, - VL_CSC_COLOR_STANDARD_BT_601, - VL_CSC_COLOR_STANDARD_BT_709, - VL_CSC_COLOR_STANDARD_SMPTE_240M -}; - -extern const struct vl_procamp vl_default_procamp; - -void vl_csc_get_matrix(enum VL_CSC_COLOR_STANDARD cs, - struct vl_procamp *procamp, - bool full_range, - float *matrix); - -#endif /* vl_csc_h */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_decoder.c b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_decoder.c deleted file mode 100644 index a88347fca62..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_decoder.c +++ /dev/null @@ -1,80 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 Younes Manton. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "pipe/p_video_decoder.h" - -#include "util/u_video.h" - -#include "vl_decoder.h" -#include "vl_mpeg12_decoder.h" - -bool -vl_profile_supported(struct pipe_screen *screen, enum pipe_video_profile profile) -{ - assert(screen); - switch (u_reduce_video_profile(profile)) { - case PIPE_VIDEO_CODEC_MPEG12: - return true; - default: - return false; - } -} - -struct pipe_video_decoder * -vl_create_decoder(struct pipe_context *pipe, - enum pipe_video_profile profile, - enum pipe_video_entrypoint entrypoint, - enum pipe_video_chroma_format chroma_format, - unsigned width, unsigned height, unsigned max_references, - bool expect_chunked_decode) -{ - unsigned buffer_width, buffer_height; - bool pot_buffers; - - assert(pipe); - assert(width > 0 && height > 0); - - pot_buffers = !pipe->screen->get_video_param - ( - pipe->screen, - profile, - PIPE_VIDEO_CAP_NPOT_TEXTURES - ); - - buffer_width = pot_buffers ? util_next_power_of_two(width) : align(width, MACROBLOCK_WIDTH); - buffer_height = pot_buffers ? util_next_power_of_two(height) : align(height, MACROBLOCK_HEIGHT); - - switch (u_reduce_video_profile(profile)) { - case PIPE_VIDEO_CODEC_MPEG12: - return vl_create_mpeg12_decoder(pipe, profile, entrypoint, chroma_format, - buffer_width, buffer_height, max_references, - expect_chunked_decode); - default: - return NULL; - } - return NULL; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_decoder.h b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_decoder.h deleted file mode 100644 index 8fa6527ce54..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_decoder.h +++ /dev/null @@ -1,51 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 Younes Manton. - * Copyright 2011 Christian König. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef vl_decoder_h -#define vl_decoder_h - -#include "pipe/p_video_decoder.h" - -/** - * check if a given profile is supported with shader based decoding - */ -bool -vl_profile_supported(struct pipe_screen *screen, enum pipe_video_profile profile); - -/** - * standard implementation of pipe->create_video_decoder - */ -struct pipe_video_decoder * -vl_create_decoder(struct pipe_context *pipe, - enum pipe_video_profile profile, - enum pipe_video_entrypoint entrypoint, - enum pipe_video_chroma_format chroma_format, - unsigned width, unsigned height, unsigned max_references, - bool expect_chunked_decode); - -#endif /* vl_decoder_h */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_defines.h b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_defines.h deleted file mode 100644 index 7568db027e6..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_defines.h +++ /dev/null @@ -1,41 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Christian König - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef vl_defines_h -#define vl_defines_h - -/* constants usually used with all known codecs */ -#define MACROBLOCK_WIDTH 16 -#define MACROBLOCK_HEIGHT 16 - -#define BLOCK_WIDTH 8 -#define BLOCK_HEIGHT 8 - -#define VL_MAX_PLANES 3 -#define VL_MAX_REF_FRAMES 2 - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_idct.c b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_idct.c deleted file mode 100644 index 1166de01759..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_idct.c +++ /dev/null @@ -1,867 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Christian König - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include - -#include "pipe/p_context.h" -#include "pipe/p_screen.h" - -#include "util/u_draw.h" -#include "util/u_sampler.h" -#include "util/u_memory.h" - -#include "tgsi/tgsi_ureg.h" - -#include "vl_defines.h" -#include "vl_types.h" -#include "vl_vertex_buffers.h" -#include "vl_idct.h" - -enum VS_OUTPUT -{ - VS_O_VPOS, - VS_O_L_ADDR0, - VS_O_L_ADDR1, - VS_O_R_ADDR0, - VS_O_R_ADDR1 -}; - -/** - * The DCT matrix stored as hex representation of floats. Equal to the following equation: - * for (i = 0; i < 8; ++i) - * for (j = 0; j < 8; ++j) - * if (i == 0) const_matrix[i][j] = 1.0f / sqrtf(8.0f); - * else const_matrix[i][j] = sqrtf(2.0f / 8.0f) * cosf((2 * j + 1) * i * M_PI / (2.0f * 8.0f)); - */ -static const uint32_t const_matrix[8][8] = { - { 0x3eb504f3, 0x3eb504f3, 0x3eb504f3, 0x3eb504f3, 0x3eb504f3, 0x3eb504f3, 0x3eb504f3, 0x3eb504f3 }, - { 0x3efb14be, 0x3ed4db31, 0x3e8e39da, 0x3dc7c5c4, 0xbdc7c5c2, 0xbe8e39d9, 0xbed4db32, 0xbefb14bf }, - { 0x3eec835f, 0x3e43ef15, 0xbe43ef14, 0xbeec835e, 0xbeec835f, 0xbe43ef1a, 0x3e43ef1b, 0x3eec835f }, - { 0x3ed4db31, 0xbdc7c5c2, 0xbefb14bf, 0xbe8e39dd, 0x3e8e39d7, 0x3efb14bf, 0x3dc7c5d0, 0xbed4db34 }, - { 0x3eb504f3, 0xbeb504f3, 0xbeb504f4, 0x3eb504f1, 0x3eb504f3, 0xbeb504f0, 0xbeb504ef, 0x3eb504f4 }, - { 0x3e8e39da, 0xbefb14bf, 0x3dc7c5c8, 0x3ed4db32, 0xbed4db34, 0xbdc7c5bb, 0x3efb14bf, 0xbe8e39d7 }, - { 0x3e43ef15, 0xbeec835f, 0x3eec835f, 0xbe43ef07, 0xbe43ef23, 0x3eec8361, 0xbeec835c, 0x3e43ef25 }, - { 0x3dc7c5c4, 0xbe8e39dd, 0x3ed4db32, 0xbefb14c0, 0x3efb14be, 0xbed4db31, 0x3e8e39ce, 0xbdc7c596 }, -}; - -static void -calc_addr(struct ureg_program *shader, struct ureg_dst addr[2], - struct ureg_src tc, struct ureg_src start, bool right_side, - bool transposed, float size) -{ - unsigned wm_start = (right_side == transposed) ? TGSI_WRITEMASK_X : TGSI_WRITEMASK_Y; - unsigned sw_start = right_side ? TGSI_SWIZZLE_Y : TGSI_SWIZZLE_X; - - unsigned wm_tc = (right_side == transposed) ? TGSI_WRITEMASK_Y : TGSI_WRITEMASK_X; - unsigned sw_tc = right_side ? TGSI_SWIZZLE_X : TGSI_SWIZZLE_Y; - - /* - * addr[0..1].(start) = right_side ? start.x : tc.x - * addr[0..1].(tc) = right_side ? tc.y : start.y - * addr[0..1].z = tc.z - * addr[1].(start) += 1.0f / scale - */ - ureg_MOV(shader, ureg_writemask(addr[0], wm_start), ureg_scalar(start, sw_start)); - ureg_MOV(shader, ureg_writemask(addr[0], wm_tc), ureg_scalar(tc, sw_tc)); - - ureg_ADD(shader, ureg_writemask(addr[1], wm_start), ureg_scalar(start, sw_start), ureg_imm1f(shader, 1.0f / size)); - ureg_MOV(shader, ureg_writemask(addr[1], wm_tc), ureg_scalar(tc, sw_tc)); -} - -static void -increment_addr(struct ureg_program *shader, struct ureg_dst daddr[2], - struct ureg_src saddr[2], bool right_side, bool transposed, - int pos, float size) -{ - unsigned wm_start = (right_side == transposed) ? TGSI_WRITEMASK_X : TGSI_WRITEMASK_Y; - unsigned wm_tc = (right_side == transposed) ? TGSI_WRITEMASK_Y : TGSI_WRITEMASK_X; - - /* - * daddr[0..1].(start) = saddr[0..1].(start) - * daddr[0..1].(tc) = saddr[0..1].(tc) - */ - - ureg_MOV(shader, ureg_writemask(daddr[0], wm_start), saddr[0]); - ureg_ADD(shader, ureg_writemask(daddr[0], wm_tc), saddr[0], ureg_imm1f(shader, pos / size)); - ureg_MOV(shader, ureg_writemask(daddr[1], wm_start), saddr[1]); - ureg_ADD(shader, ureg_writemask(daddr[1], wm_tc), saddr[1], ureg_imm1f(shader, pos / size)); -} - -static void -fetch_four(struct ureg_program *shader, struct ureg_dst m[2], struct ureg_src addr[2], - struct ureg_src sampler, bool resource3d) -{ - ureg_TEX(shader, m[0], resource3d ? TGSI_TEXTURE_3D : TGSI_TEXTURE_2D, addr[0], sampler); - ureg_TEX(shader, m[1], resource3d ? TGSI_TEXTURE_3D : TGSI_TEXTURE_2D, addr[1], sampler); -} - -static void -matrix_mul(struct ureg_program *shader, struct ureg_dst dst, struct ureg_dst l[2], struct ureg_dst r[2]) -{ - struct ureg_dst tmp; - - tmp = ureg_DECL_temporary(shader); - - /* - * tmp.xy = dot4(m[0][0..1], m[1][0..1]) - * dst = tmp.x + tmp.y - */ - ureg_DP4(shader, ureg_writemask(tmp, TGSI_WRITEMASK_X), ureg_src(l[0]), ureg_src(r[0])); - ureg_DP4(shader, ureg_writemask(tmp, TGSI_WRITEMASK_Y), ureg_src(l[1]), ureg_src(r[1])); - ureg_ADD(shader, dst, - ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_X), - ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_Y)); - - ureg_release_temporary(shader, tmp); -} - -static void * -create_mismatch_vert_shader(struct vl_idct *idct) -{ - struct ureg_program *shader; - struct ureg_src vpos; - struct ureg_src scale; - struct ureg_dst t_tex; - struct ureg_dst o_vpos, o_addr[2]; - - shader = ureg_create(TGSI_PROCESSOR_VERTEX); - if (!shader) - return NULL; - - vpos = ureg_DECL_vs_input(shader, VS_I_VPOS); - - t_tex = ureg_DECL_temporary(shader); - - o_vpos = ureg_DECL_output(shader, TGSI_SEMANTIC_POSITION, VS_O_VPOS); - - o_addr[0] = ureg_DECL_output(shader, TGSI_SEMANTIC_GENERIC, VS_O_L_ADDR0); - o_addr[1] = ureg_DECL_output(shader, TGSI_SEMANTIC_GENERIC, VS_O_L_ADDR1); - - /* - * scale = (BLOCK_WIDTH, BLOCK_HEIGHT) / (dst.width, dst.height) - * - * t_vpos = vpos + 7 / BLOCK_WIDTH - * o_vpos.xy = t_vpos * scale - * - * o_addr = calc_addr(...) - * - */ - - scale = ureg_imm2f(shader, - (float)BLOCK_WIDTH / idct->buffer_width, - (float)BLOCK_HEIGHT / idct->buffer_height); - - ureg_MAD(shader, ureg_writemask(o_vpos, TGSI_WRITEMASK_XY), vpos, scale, scale); - ureg_MOV(shader, ureg_writemask(o_vpos, TGSI_WRITEMASK_ZW), ureg_imm1f(shader, 1.0f)); - - ureg_MUL(shader, ureg_writemask(t_tex, TGSI_WRITEMASK_XY), vpos, scale); - calc_addr(shader, o_addr, ureg_src(t_tex), ureg_src(t_tex), false, false, idct->buffer_width / 4); - - ureg_release_temporary(shader, t_tex); - - ureg_END(shader); - - return ureg_create_shader_and_destroy(shader, idct->pipe); -} - -static void * -create_mismatch_frag_shader(struct vl_idct *idct) -{ - struct ureg_program *shader; - - struct ureg_src addr[2]; - - struct ureg_dst m[8][2]; - struct ureg_dst fragment; - - unsigned i; - - shader = ureg_create(TGSI_PROCESSOR_FRAGMENT); - if (!shader) - return NULL; - - addr[0] = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, VS_O_L_ADDR0, TGSI_INTERPOLATE_LINEAR); - addr[1] = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, VS_O_L_ADDR1, TGSI_INTERPOLATE_LINEAR); - - fragment = ureg_DECL_output(shader, TGSI_SEMANTIC_COLOR, 0); - - for (i = 0; i < 8; ++i) { - m[i][0] = ureg_DECL_temporary(shader); - m[i][1] = ureg_DECL_temporary(shader); - } - - for (i = 0; i < 8; ++i) { - increment_addr(shader, m[i], addr, false, false, i, idct->buffer_height); - } - - for (i = 0; i < 8; ++i) { - struct ureg_src s_addr[2]; - s_addr[0] = ureg_src(m[i][0]); - s_addr[1] = ureg_src(m[i][1]); - fetch_four(shader, m[i], s_addr, ureg_DECL_sampler(shader, 0), false); - } - - for (i = 1; i < 8; ++i) { - ureg_ADD(shader, m[0][0], ureg_src(m[0][0]), ureg_src(m[i][0])); - ureg_ADD(shader, m[0][1], ureg_src(m[0][1]), ureg_src(m[i][1])); - } - - ureg_ADD(shader, m[0][0], ureg_src(m[0][0]), ureg_src(m[0][1])); - ureg_DP4(shader, m[0][0], ureg_abs(ureg_src(m[0][0])), ureg_imm1f(shader, 1 << 14)); - - ureg_MUL(shader, ureg_writemask(m[0][0], TGSI_WRITEMASK_W), ureg_abs(ureg_src(m[7][1])), ureg_imm1f(shader, 1 << 14)); - ureg_FRC(shader, m[0][0], ureg_src(m[0][0])); - ureg_SGT(shader, m[0][0], ureg_imm1f(shader, 0.5f), ureg_abs(ureg_src(m[0][0]))); - - ureg_CMP(shader, ureg_writemask(m[0][0], TGSI_WRITEMASK_W), ureg_negate(ureg_src(m[0][0])), - ureg_imm1f(shader, 1.0f / (1 << 15)), ureg_imm1f(shader, -1.0f / (1 << 15))); - ureg_MUL(shader, ureg_writemask(m[0][0], TGSI_WRITEMASK_W), ureg_src(m[0][0]), - ureg_scalar(ureg_src(m[0][0]), TGSI_SWIZZLE_X)); - - ureg_MOV(shader, ureg_writemask(fragment, TGSI_WRITEMASK_XYZ), ureg_src(m[7][1])); - ureg_ADD(shader, ureg_writemask(fragment, TGSI_WRITEMASK_W), ureg_src(m[0][0]), ureg_src(m[7][1])); - - for (i = 0; i < 8; ++i) { - ureg_release_temporary(shader, m[i][0]); - ureg_release_temporary(shader, m[i][1]); - } - - ureg_END(shader); - - return ureg_create_shader_and_destroy(shader, idct->pipe); -} - -static void * -create_stage1_vert_shader(struct vl_idct *idct) -{ - struct ureg_program *shader; - struct ureg_src vrect, vpos; - struct ureg_src scale; - struct ureg_dst t_tex, t_start; - struct ureg_dst o_vpos, o_l_addr[2], o_r_addr[2]; - - shader = ureg_create(TGSI_PROCESSOR_VERTEX); - if (!shader) - return NULL; - - vrect = ureg_DECL_vs_input(shader, VS_I_RECT); - vpos = ureg_DECL_vs_input(shader, VS_I_VPOS); - - t_tex = ureg_DECL_temporary(shader); - t_start = ureg_DECL_temporary(shader); - - o_vpos = ureg_DECL_output(shader, TGSI_SEMANTIC_POSITION, VS_O_VPOS); - - o_l_addr[0] = ureg_DECL_output(shader, TGSI_SEMANTIC_GENERIC, VS_O_L_ADDR0); - o_l_addr[1] = ureg_DECL_output(shader, TGSI_SEMANTIC_GENERIC, VS_O_L_ADDR1); - - o_r_addr[0] = ureg_DECL_output(shader, TGSI_SEMANTIC_GENERIC, VS_O_R_ADDR0); - o_r_addr[1] = ureg_DECL_output(shader, TGSI_SEMANTIC_GENERIC, VS_O_R_ADDR1); - - /* - * scale = (BLOCK_WIDTH, BLOCK_HEIGHT) / (dst.width, dst.height) - * - * t_vpos = vpos + vrect - * o_vpos.xy = t_vpos * scale - * o_vpos.zw = vpos - * - * o_l_addr = calc_addr(...) - * o_r_addr = calc_addr(...) - * - */ - - scale = ureg_imm2f(shader, - (float)BLOCK_WIDTH / idct->buffer_width, - (float)BLOCK_HEIGHT / idct->buffer_height); - - ureg_ADD(shader, ureg_writemask(t_tex, TGSI_WRITEMASK_XY), vpos, vrect); - ureg_MUL(shader, ureg_writemask(t_tex, TGSI_WRITEMASK_XY), ureg_src(t_tex), scale); - - ureg_MOV(shader, ureg_writemask(o_vpos, TGSI_WRITEMASK_XY), ureg_src(t_tex)); - ureg_MOV(shader, ureg_writemask(o_vpos, TGSI_WRITEMASK_ZW), ureg_imm1f(shader, 1.0f)); - - ureg_MUL(shader, ureg_writemask(t_start, TGSI_WRITEMASK_XY), vpos, scale); - - calc_addr(shader, o_l_addr, ureg_src(t_tex), ureg_src(t_start), false, false, idct->buffer_width / 4); - calc_addr(shader, o_r_addr, vrect, ureg_imm1f(shader, 0.0f), true, true, BLOCK_WIDTH / 4); - - ureg_release_temporary(shader, t_tex); - ureg_release_temporary(shader, t_start); - - ureg_END(shader); - - return ureg_create_shader_and_destroy(shader, idct->pipe); -} - -static void * -create_stage1_frag_shader(struct vl_idct *idct) -{ - struct ureg_program *shader; - - struct ureg_src l_addr[2], r_addr[2]; - - struct ureg_dst l[4][2], r[2]; - struct ureg_dst *fragment; - - int i, j; - - shader = ureg_create(TGSI_PROCESSOR_FRAGMENT); - if (!shader) - return NULL; - - fragment = MALLOC(idct->nr_of_render_targets * sizeof(struct ureg_dst)); - - l_addr[0] = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, VS_O_L_ADDR0, TGSI_INTERPOLATE_LINEAR); - l_addr[1] = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, VS_O_L_ADDR1, TGSI_INTERPOLATE_LINEAR); - - r_addr[0] = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, VS_O_R_ADDR0, TGSI_INTERPOLATE_LINEAR); - r_addr[1] = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, VS_O_R_ADDR1, TGSI_INTERPOLATE_LINEAR); - - for (i = 0; i < idct->nr_of_render_targets; ++i) - fragment[i] = ureg_DECL_output(shader, TGSI_SEMANTIC_COLOR, i); - - for (i = 0; i < 4; ++i) { - l[i][0] = ureg_DECL_temporary(shader); - l[i][1] = ureg_DECL_temporary(shader); - } - - r[0] = ureg_DECL_temporary(shader); - r[1] = ureg_DECL_temporary(shader); - - for (i = 0; i < 4; ++i) { - increment_addr(shader, l[i], l_addr, false, false, i - 2, idct->buffer_height); - } - - for (i = 0; i < 4; ++i) { - struct ureg_src s_addr[2]; - s_addr[0] = ureg_src(l[i][0]); - s_addr[1] = ureg_src(l[i][1]); - fetch_four(shader, l[i], s_addr, ureg_DECL_sampler(shader, 0), false); - } - - for (i = 0; i < idct->nr_of_render_targets; ++i) { - struct ureg_src s_addr[2]; - - increment_addr(shader, r, r_addr, true, true, i - (signed)idct->nr_of_render_targets / 2, BLOCK_HEIGHT); - - s_addr[0] = ureg_src(r[0]); - s_addr[1] = ureg_src(r[1]); - fetch_four(shader, r, s_addr, ureg_DECL_sampler(shader, 1), false); - - for (j = 0; j < 4; ++j) { - matrix_mul(shader, ureg_writemask(fragment[i], TGSI_WRITEMASK_X << j), l[j], r); - } - } - - for (i = 0; i < 4; ++i) { - ureg_release_temporary(shader, l[i][0]); - ureg_release_temporary(shader, l[i][1]); - } - ureg_release_temporary(shader, r[0]); - ureg_release_temporary(shader, r[1]); - - ureg_END(shader); - - FREE(fragment); - - return ureg_create_shader_and_destroy(shader, idct->pipe); -} - -void -vl_idct_stage2_vert_shader(struct vl_idct *idct, struct ureg_program *shader, - unsigned first_output, struct ureg_dst tex) -{ - struct ureg_src vrect, vpos; - struct ureg_src scale; - struct ureg_dst t_start; - struct ureg_dst o_l_addr[2], o_r_addr[2]; - - vrect = ureg_DECL_vs_input(shader, VS_I_RECT); - vpos = ureg_DECL_vs_input(shader, VS_I_VPOS); - - t_start = ureg_DECL_temporary(shader); - - --first_output; - - o_l_addr[0] = ureg_DECL_output(shader, TGSI_SEMANTIC_GENERIC, first_output + VS_O_L_ADDR0); - o_l_addr[1] = ureg_DECL_output(shader, TGSI_SEMANTIC_GENERIC, first_output + VS_O_L_ADDR1); - - o_r_addr[0] = ureg_DECL_output(shader, TGSI_SEMANTIC_GENERIC, first_output + VS_O_R_ADDR0); - o_r_addr[1] = ureg_DECL_output(shader, TGSI_SEMANTIC_GENERIC, first_output + VS_O_R_ADDR1); - - scale = ureg_imm2f(shader, - (float)BLOCK_WIDTH / idct->buffer_width, - (float)BLOCK_HEIGHT / idct->buffer_height); - - ureg_MUL(shader, ureg_writemask(tex, TGSI_WRITEMASK_Z), - ureg_scalar(vrect, TGSI_SWIZZLE_X), - ureg_imm1f(shader, BLOCK_WIDTH / idct->nr_of_render_targets)); - ureg_MUL(shader, ureg_writemask(t_start, TGSI_WRITEMASK_XY), vpos, scale); - - calc_addr(shader, o_l_addr, vrect, ureg_imm1f(shader, 0.0f), false, false, BLOCK_WIDTH / 4); - calc_addr(shader, o_r_addr, ureg_src(tex), ureg_src(t_start), true, false, idct->buffer_height / 4); - - ureg_MOV(shader, ureg_writemask(o_r_addr[0], TGSI_WRITEMASK_Z), ureg_src(tex)); - ureg_MOV(shader, ureg_writemask(o_r_addr[1], TGSI_WRITEMASK_Z), ureg_src(tex)); -} - -void -vl_idct_stage2_frag_shader(struct vl_idct *idct, struct ureg_program *shader, - unsigned first_input, struct ureg_dst fragment) -{ - struct ureg_src l_addr[2], r_addr[2]; - - struct ureg_dst l[2], r[2]; - - --first_input; - - l_addr[0] = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, first_input + VS_O_L_ADDR0, TGSI_INTERPOLATE_LINEAR); - l_addr[1] = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, first_input + VS_O_L_ADDR1, TGSI_INTERPOLATE_LINEAR); - - r_addr[0] = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, first_input + VS_O_R_ADDR0, TGSI_INTERPOLATE_LINEAR); - r_addr[1] = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, first_input + VS_O_R_ADDR1, TGSI_INTERPOLATE_LINEAR); - - l[0] = ureg_DECL_temporary(shader); - l[1] = ureg_DECL_temporary(shader); - r[0] = ureg_DECL_temporary(shader); - r[1] = ureg_DECL_temporary(shader); - - fetch_four(shader, l, l_addr, ureg_DECL_sampler(shader, 1), false); - fetch_four(shader, r, r_addr, ureg_DECL_sampler(shader, 0), true); - - matrix_mul(shader, fragment, l, r); - - ureg_release_temporary(shader, l[0]); - ureg_release_temporary(shader, l[1]); - ureg_release_temporary(shader, r[0]); - ureg_release_temporary(shader, r[1]); -} - -static bool -init_shaders(struct vl_idct *idct) -{ - idct->vs_mismatch = create_mismatch_vert_shader(idct); - if (!idct->vs_mismatch) - goto error_vs_mismatch; - - idct->fs_mismatch = create_mismatch_frag_shader(idct); - if (!idct->fs_mismatch) - goto error_fs_mismatch; - - idct->vs = create_stage1_vert_shader(idct); - if (!idct->vs) - goto error_vs; - - idct->fs = create_stage1_frag_shader(idct); - if (!idct->fs) - goto error_fs; - - return true; - -error_fs: - idct->pipe->delete_vs_state(idct->pipe, idct->vs); - -error_vs: - idct->pipe->delete_vs_state(idct->pipe, idct->vs_mismatch); - -error_fs_mismatch: - idct->pipe->delete_vs_state(idct->pipe, idct->fs); - -error_vs_mismatch: - return false; -} - -static void -cleanup_shaders(struct vl_idct *idct) -{ - idct->pipe->delete_vs_state(idct->pipe, idct->vs_mismatch); - idct->pipe->delete_fs_state(idct->pipe, idct->fs_mismatch); - idct->pipe->delete_vs_state(idct->pipe, idct->vs); - idct->pipe->delete_fs_state(idct->pipe, idct->fs); -} - -static bool -init_state(struct vl_idct *idct) -{ - struct pipe_blend_state blend; - struct pipe_rasterizer_state rs_state; - struct pipe_sampler_state sampler; - unsigned i; - - assert(idct); - - memset(&rs_state, 0, sizeof(rs_state)); - rs_state.point_size = 1; - rs_state.gl_rasterization_rules = true; - rs_state.depth_clip = 1; - idct->rs_state = idct->pipe->create_rasterizer_state(idct->pipe, &rs_state); - if (!idct->rs_state) - goto error_rs_state; - - memset(&blend, 0, sizeof blend); - - blend.independent_blend_enable = 0; - blend.rt[0].blend_enable = 0; - blend.rt[0].rgb_func = PIPE_BLEND_ADD; - blend.rt[0].rgb_src_factor = PIPE_BLENDFACTOR_ONE; - blend.rt[0].rgb_dst_factor = PIPE_BLENDFACTOR_ONE; - blend.rt[0].alpha_func = PIPE_BLEND_ADD; - blend.rt[0].alpha_src_factor = PIPE_BLENDFACTOR_ONE; - blend.rt[0].alpha_dst_factor = PIPE_BLENDFACTOR_ONE; - blend.logicop_enable = 0; - blend.logicop_func = PIPE_LOGICOP_CLEAR; - /* Needed to allow color writes to FB, even if blending disabled */ - blend.rt[0].colormask = PIPE_MASK_RGBA; - blend.dither = 0; - idct->blend = idct->pipe->create_blend_state(idct->pipe, &blend); - if (!idct->blend) - goto error_blend; - - for (i = 0; i < 2; ++i) { - memset(&sampler, 0, sizeof(sampler)); - sampler.wrap_s = PIPE_TEX_WRAP_REPEAT; - sampler.wrap_t = PIPE_TEX_WRAP_REPEAT; - sampler.wrap_r = PIPE_TEX_WRAP_REPEAT; - sampler.min_img_filter = PIPE_TEX_FILTER_NEAREST; - sampler.min_mip_filter = PIPE_TEX_MIPFILTER_NONE; - sampler.mag_img_filter = PIPE_TEX_FILTER_NEAREST; - sampler.compare_mode = PIPE_TEX_COMPARE_NONE; - sampler.compare_func = PIPE_FUNC_ALWAYS; - sampler.normalized_coords = 1; - idct->samplers[i] = idct->pipe->create_sampler_state(idct->pipe, &sampler); - if (!idct->samplers[i]) - goto error_samplers; - } - - return true; - -error_samplers: - for (i = 0; i < 2; ++i) - if (idct->samplers[i]) - idct->pipe->delete_sampler_state(idct->pipe, idct->samplers[i]); - - idct->pipe->delete_rasterizer_state(idct->pipe, idct->rs_state); - -error_blend: - idct->pipe->delete_blend_state(idct->pipe, idct->blend); - -error_rs_state: - return false; -} - -static void -cleanup_state(struct vl_idct *idct) -{ - unsigned i; - - for (i = 0; i < 2; ++i) - idct->pipe->delete_sampler_state(idct->pipe, idct->samplers[i]); - - idct->pipe->delete_rasterizer_state(idct->pipe, idct->rs_state); - idct->pipe->delete_blend_state(idct->pipe, idct->blend); -} - -static bool -init_source(struct vl_idct *idct, struct vl_idct_buffer *buffer) -{ - struct pipe_resource *tex; - struct pipe_surface surf_templ; - - assert(idct && buffer); - - tex = buffer->sampler_views.individual.source->texture; - - buffer->fb_state_mismatch.width = tex->width0; - buffer->fb_state_mismatch.height = tex->height0; - buffer->fb_state_mismatch.nr_cbufs = 1; - - memset(&surf_templ, 0, sizeof(surf_templ)); - surf_templ.format = tex->format; - surf_templ.u.tex.first_layer = 0; - surf_templ.u.tex.last_layer = 0; - surf_templ.usage = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET; - buffer->fb_state_mismatch.cbufs[0] = idct->pipe->create_surface(idct->pipe, tex, &surf_templ); - - buffer->viewport_mismatch.scale[0] = tex->width0; - buffer->viewport_mismatch.scale[1] = tex->height0; - buffer->viewport_mismatch.scale[2] = 1; - buffer->viewport_mismatch.scale[3] = 1; - - return true; -} - -static void -cleanup_source(struct vl_idct_buffer *buffer) -{ - assert(buffer); - - pipe_surface_reference(&buffer->fb_state_mismatch.cbufs[0], NULL); - - pipe_sampler_view_reference(&buffer->sampler_views.individual.source, NULL); -} - -static bool -init_intermediate(struct vl_idct *idct, struct vl_idct_buffer *buffer) -{ - struct pipe_resource *tex; - struct pipe_surface surf_templ; - unsigned i; - - assert(idct && buffer); - - tex = buffer->sampler_views.individual.intermediate->texture; - - buffer->fb_state.width = tex->width0; - buffer->fb_state.height = tex->height0; - buffer->fb_state.nr_cbufs = idct->nr_of_render_targets; - for(i = 0; i < idct->nr_of_render_targets; ++i) { - memset(&surf_templ, 0, sizeof(surf_templ)); - surf_templ.format = tex->format; - surf_templ.u.tex.first_layer = i; - surf_templ.u.tex.last_layer = i; - surf_templ.usage = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET; - buffer->fb_state.cbufs[i] = idct->pipe->create_surface( - idct->pipe, tex, &surf_templ); - - if (!buffer->fb_state.cbufs[i]) - goto error_surfaces; - } - - buffer->viewport.scale[0] = tex->width0; - buffer->viewport.scale[1] = tex->height0; - buffer->viewport.scale[2] = 1; - buffer->viewport.scale[3] = 1; - - return true; - -error_surfaces: - for(i = 0; i < idct->nr_of_render_targets; ++i) - pipe_surface_reference(&buffer->fb_state.cbufs[i], NULL); - - return false; -} - -static void -cleanup_intermediate(struct vl_idct_buffer *buffer) -{ - unsigned i; - - assert(buffer); - - for(i = 0; i < PIPE_MAX_COLOR_BUFS; ++i) - pipe_surface_reference(&buffer->fb_state.cbufs[i], NULL); - - pipe_sampler_view_reference(&buffer->sampler_views.individual.intermediate, NULL); -} - -struct pipe_sampler_view * -vl_idct_upload_matrix(struct pipe_context *pipe, float scale) -{ - struct pipe_resource tex_templ, *matrix; - struct pipe_sampler_view sv_templ, *sv; - struct pipe_transfer *buf_transfer; - unsigned i, j, pitch; - float *f; - - struct pipe_box rect = - { - 0, 0, 0, - BLOCK_WIDTH / 4, - BLOCK_HEIGHT, - 1 - }; - - assert(pipe); - - memset(&tex_templ, 0, sizeof(tex_templ)); - tex_templ.target = PIPE_TEXTURE_2D; - tex_templ.format = PIPE_FORMAT_R32G32B32A32_FLOAT; - tex_templ.last_level = 0; - tex_templ.width0 = 2; - tex_templ.height0 = 8; - tex_templ.depth0 = 1; - tex_templ.array_size = 1; - tex_templ.usage = PIPE_USAGE_IMMUTABLE; - tex_templ.bind = PIPE_BIND_SAMPLER_VIEW; - tex_templ.flags = 0; - - matrix = pipe->screen->resource_create(pipe->screen, &tex_templ); - if (!matrix) - goto error_matrix; - - buf_transfer = pipe->get_transfer - ( - pipe, matrix, - 0, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE, - &rect - ); - if (!buf_transfer) - goto error_transfer; - - pitch = buf_transfer->stride / sizeof(float); - - f = pipe->transfer_map(pipe, buf_transfer); - if (!f) - goto error_map; - - for(i = 0; i < BLOCK_HEIGHT; ++i) - for(j = 0; j < BLOCK_WIDTH; ++j) - // transpose and scale - f[i * pitch + j] = ((const float (*)[8])const_matrix)[j][i] * scale; - - pipe->transfer_unmap(pipe, buf_transfer); - pipe->transfer_destroy(pipe, buf_transfer); - - memset(&sv_templ, 0, sizeof(sv_templ)); - u_sampler_view_default_template(&sv_templ, matrix, matrix->format); - sv = pipe->create_sampler_view(pipe, matrix, &sv_templ); - pipe_resource_reference(&matrix, NULL); - if (!sv) - goto error_map; - - return sv; - -error_map: - pipe->transfer_destroy(pipe, buf_transfer); - -error_transfer: - pipe_resource_reference(&matrix, NULL); - -error_matrix: - return NULL; -} - -bool vl_idct_init(struct vl_idct *idct, struct pipe_context *pipe, - unsigned buffer_width, unsigned buffer_height, - unsigned nr_of_render_targets, - struct pipe_sampler_view *matrix, - struct pipe_sampler_view *transpose) -{ - assert(idct && pipe); - assert(matrix && transpose); - - idct->pipe = pipe; - idct->buffer_width = buffer_width; - idct->buffer_height = buffer_height; - idct->nr_of_render_targets = nr_of_render_targets; - - pipe_sampler_view_reference(&idct->matrix, matrix); - pipe_sampler_view_reference(&idct->transpose, transpose); - - if(!init_shaders(idct)) - return false; - - if(!init_state(idct)) { - cleanup_shaders(idct); - return false; - } - - return true; -} - -void -vl_idct_cleanup(struct vl_idct *idct) -{ - cleanup_shaders(idct); - cleanup_state(idct); - - pipe_sampler_view_reference(&idct->matrix, NULL); - pipe_sampler_view_reference(&idct->transpose, NULL); -} - -bool -vl_idct_init_buffer(struct vl_idct *idct, struct vl_idct_buffer *buffer, - struct pipe_sampler_view *source, - struct pipe_sampler_view *intermediate) -{ - assert(buffer && idct); - assert(source && intermediate); - - memset(buffer, 0, sizeof(struct vl_idct_buffer)); - - pipe_sampler_view_reference(&buffer->sampler_views.individual.matrix, idct->matrix); - pipe_sampler_view_reference(&buffer->sampler_views.individual.source, source); - pipe_sampler_view_reference(&buffer->sampler_views.individual.transpose, idct->transpose); - pipe_sampler_view_reference(&buffer->sampler_views.individual.intermediate, intermediate); - - if (!init_source(idct, buffer)) - return false; - - if (!init_intermediate(idct, buffer)) - return false; - - return true; -} - -void -vl_idct_cleanup_buffer(struct vl_idct_buffer *buffer) -{ - assert(buffer); - - cleanup_source(buffer); - cleanup_intermediate(buffer); - - pipe_sampler_view_reference(&buffer->sampler_views.individual.matrix, NULL); - pipe_sampler_view_reference(&buffer->sampler_views.individual.transpose, NULL); -} - -void -vl_idct_flush(struct vl_idct *idct, struct vl_idct_buffer *buffer, unsigned num_instances) -{ - assert(buffer); - - idct->pipe->bind_rasterizer_state(idct->pipe, idct->rs_state); - idct->pipe->bind_blend_state(idct->pipe, idct->blend); - idct->pipe->bind_fragment_sampler_states(idct->pipe, 2, idct->samplers); - idct->pipe->set_fragment_sampler_views(idct->pipe, 2, buffer->sampler_views.stage[0]); - - /* mismatch control */ - idct->pipe->set_framebuffer_state(idct->pipe, &buffer->fb_state_mismatch); - idct->pipe->set_viewport_state(idct->pipe, &buffer->viewport_mismatch); - idct->pipe->bind_vs_state(idct->pipe, idct->vs_mismatch); - idct->pipe->bind_fs_state(idct->pipe, idct->fs_mismatch); - util_draw_arrays_instanced(idct->pipe, PIPE_PRIM_POINTS, 0, 1, 0, num_instances); - - /* first stage */ - idct->pipe->set_framebuffer_state(idct->pipe, &buffer->fb_state); - idct->pipe->set_viewport_state(idct->pipe, &buffer->viewport); - idct->pipe->bind_vs_state(idct->pipe, idct->vs); - idct->pipe->bind_fs_state(idct->pipe, idct->fs); - util_draw_arrays_instanced(idct->pipe, PIPE_PRIM_QUADS, 0, 4, 0, num_instances); -} - -void -vl_idct_prepare_stage2(struct vl_idct *idct, struct vl_idct_buffer *buffer) -{ - assert(buffer); - - /* second stage */ - idct->pipe->bind_rasterizer_state(idct->pipe, idct->rs_state); - idct->pipe->bind_fragment_sampler_states(idct->pipe, 2, idct->samplers); - idct->pipe->set_fragment_sampler_views(idct->pipe, 2, buffer->sampler_views.stage[1]); -} - diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_idct.h b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_idct.h deleted file mode 100644 index 575a6206742..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_idct.h +++ /dev/null @@ -1,119 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Christian König - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef vl_idct_h -#define vl_idct_h - -#include "pipe/p_state.h" - -#include "tgsi/tgsi_ureg.h" - -/* shader based inverse distinct cosinus transformation - * expect usage of vl_vertex_buffers as a todo list - */ -struct vl_idct -{ - struct pipe_context *pipe; - - unsigned buffer_width; - unsigned buffer_height; - unsigned nr_of_render_targets; - - void *rs_state; - void *blend; - - void *samplers[2]; - - void *vs_mismatch, *fs_mismatch; - void *vs, *fs; - - struct pipe_sampler_view *matrix; - struct pipe_sampler_view *transpose; -}; - -/* a set of buffers to work with */ -struct vl_idct_buffer -{ - struct pipe_viewport_state viewport_mismatch; - struct pipe_viewport_state viewport; - - struct pipe_framebuffer_state fb_state_mismatch; - struct pipe_framebuffer_state fb_state; - - union - { - struct pipe_sampler_view *all[4]; - struct pipe_sampler_view *stage[2][2]; - struct { - struct pipe_sampler_view *source, *matrix; - struct pipe_sampler_view *intermediate, *transpose; - } individual; - } sampler_views; -}; - -/* upload the idct matrix, which can be shared by all idct instances of a pipe */ -struct pipe_sampler_view * -vl_idct_upload_matrix(struct pipe_context *pipe, float scale); - -void -vl_idct_stage2_vert_shader(struct vl_idct *idct, struct ureg_program *shader, - unsigned first_output, struct ureg_dst tex); - -void -vl_idct_stage2_frag_shader(struct vl_idct *idct, struct ureg_program *shader, - unsigned first_input, struct ureg_dst fragment); - -/* init an idct instance */ -bool -vl_idct_init(struct vl_idct *idct, struct pipe_context *pipe, - unsigned buffer_width, unsigned buffer_height, - unsigned nr_of_render_targets, - struct pipe_sampler_view *matrix, - struct pipe_sampler_view *transpose); - -/* destroy an idct instance */ -void -vl_idct_cleanup(struct vl_idct *idct); - -/* init a buffer assosiated with agiven idct instance */ -bool -vl_idct_init_buffer(struct vl_idct *idct, struct vl_idct_buffer *buffer, - struct pipe_sampler_view *source, - struct pipe_sampler_view *intermediate); - -/* cleanup a buffer of an idct instance */ -void -vl_idct_cleanup_buffer(struct vl_idct_buffer *buffer); - -/* flush the buffer and start rendering, vertex buffers needs to be setup before calling this */ -void -vl_idct_flush(struct vl_idct *idct, struct vl_idct_buffer *buffer, unsigned num_verts); - -void -vl_idct_prepare_stage2(struct vl_idct *idct, struct vl_idct_buffer *buffer); - -#endif diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_mc.c b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_mc.c deleted file mode 100644 index 976b526d1a3..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_mc.c +++ /dev/null @@ -1,647 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 Younes Manton. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include - -#include "pipe/p_context.h" - -#include "util/u_sampler.h" -#include "util/u_draw.h" - -#include "tgsi/tgsi_ureg.h" - -#include "vl_defines.h" -#include "vl_vertex_buffers.h" -#include "vl_mc.h" -#include "vl_idct.h" - -enum VS_OUTPUT -{ - VS_O_VPOS, - VS_O_VTOP, - VS_O_VBOTTOM, - - VS_O_FLAGS = VS_O_VTOP, - VS_O_VTEX = VS_O_VBOTTOM -}; - -static struct ureg_dst -calc_position(struct vl_mc *r, struct ureg_program *shader, struct ureg_src block_scale) -{ - struct ureg_src vrect, vpos; - struct ureg_dst t_vpos; - struct ureg_dst o_vpos; - - vrect = ureg_DECL_vs_input(shader, VS_I_RECT); - vpos = ureg_DECL_vs_input(shader, VS_I_VPOS); - - t_vpos = ureg_DECL_temporary(shader); - - o_vpos = ureg_DECL_output(shader, TGSI_SEMANTIC_POSITION, VS_O_VPOS); - - /* - * block_scale = (MACROBLOCK_WIDTH, MACROBLOCK_HEIGHT) / (dst.width, dst.height) - * - * t_vpos = (vpos + vrect) * block_scale - * o_vpos.xy = t_vpos - * o_vpos.zw = vpos - */ - ureg_ADD(shader, ureg_writemask(t_vpos, TGSI_WRITEMASK_XY), vpos, vrect); - ureg_MUL(shader, ureg_writemask(t_vpos, TGSI_WRITEMASK_XY), ureg_src(t_vpos), block_scale); - ureg_MOV(shader, ureg_writemask(o_vpos, TGSI_WRITEMASK_XY), ureg_src(t_vpos)); - ureg_MOV(shader, ureg_writemask(o_vpos, TGSI_WRITEMASK_ZW), ureg_imm1f(shader, 1.0f)); - - return t_vpos; -} - -static struct ureg_dst -calc_line(struct ureg_program *shader) -{ - struct ureg_dst tmp; - struct ureg_src pos; - - tmp = ureg_DECL_temporary(shader); - - pos = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_POSITION, VS_O_VPOS, TGSI_INTERPOLATE_LINEAR); - - /* - * tmp.y = fraction(pos.y / 2) >= 0.5 ? 1 : 0 - */ - ureg_MUL(shader, ureg_writemask(tmp, TGSI_WRITEMASK_Y), pos, ureg_imm1f(shader, 0.5f)); - ureg_FRC(shader, ureg_writemask(tmp, TGSI_WRITEMASK_Y), ureg_src(tmp)); - ureg_SGE(shader, ureg_writemask(tmp, TGSI_WRITEMASK_Y), ureg_src(tmp), ureg_imm1f(shader, 0.5f)); - - return tmp; -} - -static void * -create_ref_vert_shader(struct vl_mc *r) -{ - struct ureg_program *shader; - struct ureg_src mv_scale; - struct ureg_src vmv[2]; - struct ureg_dst t_vpos; - struct ureg_dst o_vmv[2]; - unsigned i; - - shader = ureg_create(TGSI_PROCESSOR_VERTEX); - if (!shader) - return NULL; - - vmv[0] = ureg_DECL_vs_input(shader, VS_I_MV_TOP); - vmv[1] = ureg_DECL_vs_input(shader, VS_I_MV_BOTTOM); - - t_vpos = calc_position(r, shader, ureg_imm2f(shader, - (float)MACROBLOCK_WIDTH / r->buffer_width, - (float)MACROBLOCK_HEIGHT / r->buffer_height) - ); - - o_vmv[0] = ureg_DECL_output(shader, TGSI_SEMANTIC_GENERIC, VS_O_VTOP); - o_vmv[1] = ureg_DECL_output(shader, TGSI_SEMANTIC_GENERIC, VS_O_VBOTTOM); - - /* - * mv_scale.xy = 0.5 / (dst.width, dst.height); - * mv_scale.z = 1.0f / 4.0f - * mv_scale.w = 1.0f / 255.0f - * - * // Apply motion vectors - * o_vmv[0..1].xy = vmv[0..1] * mv_scale + t_vpos - * o_vmv[0..1].zw = vmv[0..1] * mv_scale - * - */ - - mv_scale = ureg_imm4f(shader, - 0.5f / r->buffer_width, - 0.5f / r->buffer_height, - 1.0f / 4.0f, - 1.0f / PIPE_VIDEO_MV_WEIGHT_MAX); - - for (i = 0; i < 2; ++i) { - ureg_MAD(shader, ureg_writemask(o_vmv[i], TGSI_WRITEMASK_XY), mv_scale, vmv[i], ureg_src(t_vpos)); - ureg_MUL(shader, ureg_writemask(o_vmv[i], TGSI_WRITEMASK_ZW), mv_scale, vmv[i]); - } - - ureg_release_temporary(shader, t_vpos); - - ureg_END(shader); - - return ureg_create_shader_and_destroy(shader, r->pipe); -} - -static void * -create_ref_frag_shader(struct vl_mc *r) -{ - const float y_scale = - r->buffer_height / 2 * - r->macroblock_size / MACROBLOCK_HEIGHT; - - struct ureg_program *shader; - struct ureg_src tc[2], sampler; - struct ureg_dst ref, field; - struct ureg_dst fragment; - unsigned label; - - shader = ureg_create(TGSI_PROCESSOR_FRAGMENT); - if (!shader) - return NULL; - - tc[0] = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, VS_O_VTOP, TGSI_INTERPOLATE_LINEAR); - tc[1] = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, VS_O_VBOTTOM, TGSI_INTERPOLATE_LINEAR); - - sampler = ureg_DECL_sampler(shader, 0); - ref = ureg_DECL_temporary(shader); - - fragment = ureg_DECL_output(shader, TGSI_SEMANTIC_COLOR, 0); - - field = calc_line(shader); - - /* - * ref = field.z ? tc[1] : tc[0] - * - * // Adjust tc acording to top/bottom field selection - * if (|ref.z|) { - * ref.y *= y_scale - * ref.y = floor(ref.y) - * ref.y += ref.z - * ref.y /= y_scale - * } - * fragment.xyz = tex(ref, sampler[0]) - */ - ureg_CMP(shader, ureg_writemask(ref, TGSI_WRITEMASK_XYZ), - ureg_negate(ureg_scalar(ureg_src(field), TGSI_SWIZZLE_Y)), - tc[1], tc[0]); - ureg_CMP(shader, ureg_writemask(fragment, TGSI_WRITEMASK_W), - ureg_negate(ureg_scalar(ureg_src(field), TGSI_SWIZZLE_Y)), - tc[1], tc[0]); - - ureg_IF(shader, ureg_scalar(ureg_src(ref), TGSI_SWIZZLE_Z), &label); - - ureg_MUL(shader, ureg_writemask(ref, TGSI_WRITEMASK_Y), - ureg_src(ref), ureg_imm1f(shader, y_scale)); - ureg_FLR(shader, ureg_writemask(ref, TGSI_WRITEMASK_Y), ureg_src(ref)); - ureg_ADD(shader, ureg_writemask(ref, TGSI_WRITEMASK_Y), - ureg_src(ref), ureg_scalar(ureg_src(ref), TGSI_SWIZZLE_Z)); - ureg_MUL(shader, ureg_writemask(ref, TGSI_WRITEMASK_Y), - ureg_src(ref), ureg_imm1f(shader, 1.0f / y_scale)); - - ureg_fixup_label(shader, label, ureg_get_instruction_number(shader)); - ureg_ENDIF(shader); - - ureg_TEX(shader, ureg_writemask(fragment, TGSI_WRITEMASK_XYZ), TGSI_TEXTURE_2D, ureg_src(ref), sampler); - - ureg_release_temporary(shader, ref); - - ureg_release_temporary(shader, field); - ureg_END(shader); - - return ureg_create_shader_and_destroy(shader, r->pipe); -} - -static void * -create_ycbcr_vert_shader(struct vl_mc *r, vl_mc_ycbcr_vert_shader vs_callback, void *callback_priv) -{ - struct ureg_program *shader; - - struct ureg_src vrect, vpos; - struct ureg_dst t_vpos, t_vtex; - struct ureg_dst o_vpos, o_flags; - - struct vertex2f scale = { - (float)BLOCK_WIDTH / r->buffer_width * MACROBLOCK_WIDTH / r->macroblock_size, - (float)BLOCK_HEIGHT / r->buffer_height * MACROBLOCK_HEIGHT / r->macroblock_size - }; - - unsigned label; - - shader = ureg_create(TGSI_PROCESSOR_VERTEX); - if (!shader) - return NULL; - - vrect = ureg_DECL_vs_input(shader, VS_I_RECT); - vpos = ureg_DECL_vs_input(shader, VS_I_VPOS); - - t_vpos = calc_position(r, shader, ureg_imm2f(shader, scale.x, scale.y)); - t_vtex = ureg_DECL_temporary(shader); - - o_vpos = ureg_DECL_output(shader, TGSI_SEMANTIC_POSITION, VS_O_VPOS); - o_flags = ureg_DECL_output(shader, TGSI_SEMANTIC_GENERIC, VS_O_FLAGS); - - /* - * o_vtex.xy = t_vpos - * o_flags.z = intra * 0.5 - * - * if(interlaced) { - * t_vtex.xy = vrect.y ? { 0, scale.y } : { -scale.y : 0 } - * t_vtex.z = vpos.y % 2 - * t_vtex.y = t_vtex.z ? t_vtex.x : t_vtex.y - * o_vpos.y = t_vtex.y + t_vpos.y - * - * o_flags.w = t_vtex.z ? 0 : 1 - * } - * - */ - - vs_callback(callback_priv, r, shader, VS_O_VTEX, t_vpos); - - ureg_MUL(shader, ureg_writemask(o_flags, TGSI_WRITEMASK_Z), - ureg_scalar(vpos, TGSI_SWIZZLE_Z), ureg_imm1f(shader, 0.5f)); - ureg_MOV(shader, ureg_writemask(o_flags, TGSI_WRITEMASK_W), ureg_imm1f(shader, -1.0f)); - - if (r->macroblock_size == MACROBLOCK_HEIGHT) { //TODO - ureg_IF(shader, ureg_scalar(vpos, TGSI_SWIZZLE_W), &label); - - ureg_CMP(shader, ureg_writemask(t_vtex, TGSI_WRITEMASK_XY), - ureg_negate(ureg_scalar(vrect, TGSI_SWIZZLE_Y)), - ureg_imm2f(shader, 0.0f, scale.y), - ureg_imm2f(shader, -scale.y, 0.0f)); - ureg_MUL(shader, ureg_writemask(t_vtex, TGSI_WRITEMASK_Z), - ureg_scalar(vpos, TGSI_SWIZZLE_Y), ureg_imm1f(shader, 0.5f)); - - ureg_FRC(shader, ureg_writemask(t_vtex, TGSI_WRITEMASK_Z), ureg_src(t_vtex)); - - ureg_CMP(shader, ureg_writemask(t_vtex, TGSI_WRITEMASK_Y), - ureg_negate(ureg_scalar(ureg_src(t_vtex), TGSI_SWIZZLE_Z)), - ureg_scalar(ureg_src(t_vtex), TGSI_SWIZZLE_X), - ureg_scalar(ureg_src(t_vtex), TGSI_SWIZZLE_Y)); - ureg_ADD(shader, ureg_writemask(o_vpos, TGSI_WRITEMASK_Y), - ureg_src(t_vpos), ureg_src(t_vtex)); - - ureg_CMP(shader, ureg_writemask(o_flags, TGSI_WRITEMASK_W), - ureg_negate(ureg_scalar(ureg_src(t_vtex), TGSI_SWIZZLE_Z)), - ureg_imm1f(shader, 0.0f), ureg_imm1f(shader, 1.0f)); - - ureg_fixup_label(shader, label, ureg_get_instruction_number(shader)); - ureg_ENDIF(shader); - } - - ureg_release_temporary(shader, t_vtex); - ureg_release_temporary(shader, t_vpos); - - ureg_END(shader); - - return ureg_create_shader_and_destroy(shader, r->pipe); -} - -static void * -create_ycbcr_frag_shader(struct vl_mc *r, float scale, bool invert, - vl_mc_ycbcr_frag_shader fs_callback, void *callback_priv) -{ - struct ureg_program *shader; - struct ureg_src flags; - struct ureg_dst tmp; - struct ureg_dst fragment; - unsigned label; - - shader = ureg_create(TGSI_PROCESSOR_FRAGMENT); - if (!shader) - return NULL; - - flags = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, VS_O_FLAGS, TGSI_INTERPOLATE_LINEAR); - - fragment = ureg_DECL_output(shader, TGSI_SEMANTIC_COLOR, 0); - - tmp = calc_line(shader); - - /* - * if (field == tc.w) - * kill(); - * else { - * fragment.xyz = tex(tc, sampler) * scale + tc.z - * fragment.w = 1.0f - * } - */ - - ureg_SEQ(shader, ureg_writemask(tmp, TGSI_WRITEMASK_Y), - ureg_scalar(flags, TGSI_SWIZZLE_W), ureg_src(tmp)); - - ureg_IF(shader, ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_Y), &label); - - ureg_KILP(shader); - - ureg_fixup_label(shader, label, ureg_get_instruction_number(shader)); - ureg_ELSE(shader, &label); - - fs_callback(callback_priv, r, shader, VS_O_VTEX, tmp); - - if (scale != 1.0f) - ureg_MAD(shader, ureg_writemask(tmp, TGSI_WRITEMASK_XYZ), - ureg_src(tmp), ureg_imm1f(shader, scale), - ureg_scalar(flags, TGSI_SWIZZLE_Z)); - else - ureg_ADD(shader, ureg_writemask(tmp, TGSI_WRITEMASK_XYZ), - ureg_src(tmp), ureg_scalar(flags, TGSI_SWIZZLE_Z)); - - ureg_MUL(shader, ureg_writemask(fragment, TGSI_WRITEMASK_XYZ), ureg_src(tmp), ureg_imm1f(shader, invert ? -1.0f : 1.0f)); - ureg_MOV(shader, ureg_writemask(fragment, TGSI_WRITEMASK_W), ureg_imm1f(shader, 1.0f)); - - ureg_fixup_label(shader, label, ureg_get_instruction_number(shader)); - ureg_ENDIF(shader); - - ureg_release_temporary(shader, tmp); - - ureg_END(shader); - - return ureg_create_shader_and_destroy(shader, r->pipe); -} - -static bool -init_pipe_state(struct vl_mc *r) -{ - struct pipe_sampler_state sampler; - struct pipe_blend_state blend; - struct pipe_rasterizer_state rs_state; - unsigned i; - - assert(r); - - memset(&sampler, 0, sizeof(sampler)); - sampler.wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - sampler.wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - sampler.wrap_r = PIPE_TEX_WRAP_CLAMP_TO_BORDER; - sampler.min_img_filter = PIPE_TEX_FILTER_LINEAR; - sampler.min_mip_filter = PIPE_TEX_MIPFILTER_NONE; - sampler.mag_img_filter = PIPE_TEX_FILTER_LINEAR; - sampler.compare_mode = PIPE_TEX_COMPARE_NONE; - sampler.compare_func = PIPE_FUNC_ALWAYS; - sampler.normalized_coords = 1; - r->sampler_ref = r->pipe->create_sampler_state(r->pipe, &sampler); - if (!r->sampler_ref) - goto error_sampler_ref; - - for (i = 0; i < VL_MC_NUM_BLENDERS; ++i) { - memset(&blend, 0, sizeof blend); - blend.independent_blend_enable = 0; - blend.rt[0].blend_enable = 1; - blend.rt[0].rgb_func = PIPE_BLEND_ADD; - blend.rt[0].rgb_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA; - blend.rt[0].rgb_dst_factor = PIPE_BLENDFACTOR_ZERO; - blend.rt[0].alpha_func = PIPE_BLEND_ADD; - blend.rt[0].alpha_src_factor = PIPE_BLENDFACTOR_SRC_ALPHA; - blend.rt[0].alpha_dst_factor = PIPE_BLENDFACTOR_ZERO; - blend.logicop_enable = 0; - blend.logicop_func = PIPE_LOGICOP_CLEAR; - blend.rt[0].colormask = i; - blend.dither = 0; - r->blend_clear[i] = r->pipe->create_blend_state(r->pipe, &blend); - if (!r->blend_clear[i]) - goto error_blend; - - blend.rt[0].rgb_dst_factor = PIPE_BLENDFACTOR_ONE; - blend.rt[0].alpha_dst_factor = PIPE_BLENDFACTOR_ONE; - r->blend_add[i] = r->pipe->create_blend_state(r->pipe, &blend); - if (!r->blend_add[i]) - goto error_blend; - - blend.rt[0].rgb_func = PIPE_BLEND_REVERSE_SUBTRACT; - blend.rt[0].alpha_dst_factor = PIPE_BLEND_REVERSE_SUBTRACT; - r->blend_sub[i] = r->pipe->create_blend_state(r->pipe, &blend); - if (!r->blend_sub[i]) - goto error_blend; - } - - memset(&rs_state, 0, sizeof(rs_state)); - /*rs_state.sprite_coord_enable */ - rs_state.sprite_coord_mode = PIPE_SPRITE_COORD_UPPER_LEFT; - rs_state.point_quad_rasterization = true; - rs_state.point_size = BLOCK_WIDTH; - rs_state.gl_rasterization_rules = true; - rs_state.depth_clip = 1; - r->rs_state = r->pipe->create_rasterizer_state(r->pipe, &rs_state); - if (!r->rs_state) - goto error_rs_state; - - return true; - -error_rs_state: -error_blend: - for (i = 0; i < VL_MC_NUM_BLENDERS; ++i) { - if (r->blend_sub[i]) - r->pipe->delete_blend_state(r->pipe, r->blend_sub[i]); - - if (r->blend_add[i]) - r->pipe->delete_blend_state(r->pipe, r->blend_add[i]); - - if (r->blend_clear[i]) - r->pipe->delete_blend_state(r->pipe, r->blend_clear[i]); - } - - r->pipe->delete_sampler_state(r->pipe, r->sampler_ref); - -error_sampler_ref: - return false; -} - -static void -cleanup_pipe_state(struct vl_mc *r) -{ - unsigned i; - - assert(r); - - r->pipe->delete_sampler_state(r->pipe, r->sampler_ref); - for (i = 0; i < VL_MC_NUM_BLENDERS; ++i) { - r->pipe->delete_blend_state(r->pipe, r->blend_clear[i]); - r->pipe->delete_blend_state(r->pipe, r->blend_add[i]); - r->pipe->delete_blend_state(r->pipe, r->blend_sub[i]); - } - r->pipe->delete_rasterizer_state(r->pipe, r->rs_state); -} - -bool -vl_mc_init(struct vl_mc *renderer, struct pipe_context *pipe, - unsigned buffer_width, unsigned buffer_height, - unsigned macroblock_size, float scale, - vl_mc_ycbcr_vert_shader vs_callback, - vl_mc_ycbcr_frag_shader fs_callback, - void *callback_priv) -{ - assert(renderer); - assert(pipe); - - memset(renderer, 0, sizeof(struct vl_mc)); - - renderer->pipe = pipe; - renderer->buffer_width = buffer_width; - renderer->buffer_height = buffer_height; - renderer->macroblock_size = macroblock_size; - - if (!init_pipe_state(renderer)) - goto error_pipe_state; - - renderer->vs_ref = create_ref_vert_shader(renderer); - if (!renderer->vs_ref) - goto error_vs_ref; - - renderer->vs_ycbcr = create_ycbcr_vert_shader(renderer, vs_callback, callback_priv); - if (!renderer->vs_ycbcr) - goto error_vs_ycbcr; - - renderer->fs_ref = create_ref_frag_shader(renderer); - if (!renderer->fs_ref) - goto error_fs_ref; - - renderer->fs_ycbcr = create_ycbcr_frag_shader(renderer, scale, false, fs_callback, callback_priv); - if (!renderer->fs_ycbcr) - goto error_fs_ycbcr; - - renderer->fs_ycbcr_sub = create_ycbcr_frag_shader(renderer, scale, true, fs_callback, callback_priv); - if (!renderer->fs_ycbcr_sub) - goto error_fs_ycbcr_sub; - - return true; - -error_fs_ycbcr_sub: - renderer->pipe->delete_fs_state(renderer->pipe, renderer->fs_ycbcr); - -error_fs_ycbcr: - renderer->pipe->delete_fs_state(renderer->pipe, renderer->fs_ref); - -error_fs_ref: - renderer->pipe->delete_vs_state(renderer->pipe, renderer->vs_ycbcr); - -error_vs_ycbcr: - renderer->pipe->delete_vs_state(renderer->pipe, renderer->vs_ref); - -error_vs_ref: - cleanup_pipe_state(renderer); - -error_pipe_state: - return false; -} - -void -vl_mc_cleanup(struct vl_mc *renderer) -{ - assert(renderer); - - cleanup_pipe_state(renderer); - - renderer->pipe->delete_vs_state(renderer->pipe, renderer->vs_ref); - renderer->pipe->delete_vs_state(renderer->pipe, renderer->vs_ycbcr); - renderer->pipe->delete_fs_state(renderer->pipe, renderer->fs_ref); - renderer->pipe->delete_fs_state(renderer->pipe, renderer->fs_ycbcr); - renderer->pipe->delete_fs_state(renderer->pipe, renderer->fs_ycbcr_sub); -} - -bool -vl_mc_init_buffer(struct vl_mc *renderer, struct vl_mc_buffer *buffer) -{ - assert(renderer && buffer); - - buffer->viewport.scale[2] = 1; - buffer->viewport.scale[3] = 1; - buffer->viewport.translate[0] = 0; - buffer->viewport.translate[1] = 0; - buffer->viewport.translate[2] = 0; - buffer->viewport.translate[3] = 0; - - buffer->fb_state.nr_cbufs = 1; - buffer->fb_state.zsbuf = NULL; - - return true; -} - -void -vl_mc_cleanup_buffer(struct vl_mc_buffer *buffer) -{ - assert(buffer); -} - -void -vl_mc_set_surface(struct vl_mc_buffer *buffer, struct pipe_surface *surface) -{ - assert(buffer && surface); - - buffer->surface_cleared = false; - - buffer->viewport.scale[0] = surface->width; - buffer->viewport.scale[1] = surface->height; - - buffer->fb_state.width = surface->width; - buffer->fb_state.height = surface->height; - buffer->fb_state.cbufs[0] = surface; -} - -static void -prepare_pipe_4_rendering(struct vl_mc *renderer, struct vl_mc_buffer *buffer, unsigned mask) -{ - assert(buffer); - - renderer->pipe->bind_rasterizer_state(renderer->pipe, renderer->rs_state); - - if (buffer->surface_cleared) - renderer->pipe->bind_blend_state(renderer->pipe, renderer->blend_add[mask]); - else - renderer->pipe->bind_blend_state(renderer->pipe, renderer->blend_clear[mask]); - - renderer->pipe->set_framebuffer_state(renderer->pipe, &buffer->fb_state); - renderer->pipe->set_viewport_state(renderer->pipe, &buffer->viewport); -} - -void -vl_mc_render_ref(struct vl_mc *renderer, struct vl_mc_buffer *buffer, struct pipe_sampler_view *ref) -{ - assert(buffer && ref); - - prepare_pipe_4_rendering(renderer, buffer, PIPE_MASK_R | PIPE_MASK_G | PIPE_MASK_B); - - renderer->pipe->bind_vs_state(renderer->pipe, renderer->vs_ref); - renderer->pipe->bind_fs_state(renderer->pipe, renderer->fs_ref); - - renderer->pipe->set_fragment_sampler_views(renderer->pipe, 1, &ref); - renderer->pipe->bind_fragment_sampler_states(renderer->pipe, 1, &renderer->sampler_ref); - - util_draw_arrays_instanced(renderer->pipe, PIPE_PRIM_QUADS, 0, 4, 0, - renderer->buffer_width / MACROBLOCK_WIDTH * - renderer->buffer_height / MACROBLOCK_HEIGHT); - - buffer->surface_cleared = true; -} - -void -vl_mc_render_ycbcr(struct vl_mc *renderer, struct vl_mc_buffer *buffer, unsigned component, unsigned num_instances) -{ - unsigned mask = 1 << component; - - assert(buffer); - - if (num_instances == 0) - return; - - prepare_pipe_4_rendering(renderer, buffer, mask); - - renderer->pipe->bind_vs_state(renderer->pipe, renderer->vs_ycbcr); - renderer->pipe->bind_fs_state(renderer->pipe, renderer->fs_ycbcr); - - util_draw_arrays_instanced(renderer->pipe, PIPE_PRIM_QUADS, 0, 4, 0, num_instances); - - if (buffer->surface_cleared) { - renderer->pipe->bind_blend_state(renderer->pipe, renderer->blend_sub[mask]); - renderer->pipe->bind_fs_state(renderer->pipe, renderer->fs_ycbcr_sub); - util_draw_arrays_instanced(renderer->pipe, PIPE_PRIM_QUADS, 0, 4, 0, num_instances); - } -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_mc.h b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_mc.h deleted file mode 100644 index 2c3b237eae2..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_mc.h +++ /dev/null @@ -1,97 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 Younes Manton. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef vl_mc_h -#define vl_mc_h - -#include "pipe/p_state.h" -#include "pipe/p_video_state.h" - -#include "tgsi/tgsi_ureg.h" - -#include "vl_defines.h" -#include "vl_types.h" - -#define VL_MC_NUM_BLENDERS (1 << VL_MAX_PLANES) - -struct pipe_context; - -struct vl_mc -{ - struct pipe_context *pipe; - unsigned buffer_width; - unsigned buffer_height; - unsigned macroblock_size; - - void *rs_state; - - void *blend_clear[VL_MC_NUM_BLENDERS]; - void *blend_add[VL_MC_NUM_BLENDERS]; - void *blend_sub[VL_MC_NUM_BLENDERS]; - void *vs_ref, *vs_ycbcr; - void *fs_ref, *fs_ycbcr, *fs_ycbcr_sub; - void *sampler_ref; -}; - -struct vl_mc_buffer -{ - bool surface_cleared; - - struct pipe_viewport_state viewport; - struct pipe_framebuffer_state fb_state; -}; - -typedef void (*vl_mc_ycbcr_vert_shader)(void *priv, struct vl_mc *mc, - struct ureg_program *shader, - unsigned first_output, - struct ureg_dst tex); - -typedef void (*vl_mc_ycbcr_frag_shader)(void *priv, struct vl_mc *mc, - struct ureg_program *shader, - unsigned first_input, - struct ureg_dst dst); - -bool vl_mc_init(struct vl_mc *renderer, struct pipe_context *pipe, - unsigned picture_width, unsigned picture_height, - unsigned macroblock_size, float scale, - vl_mc_ycbcr_vert_shader vs_callback, - vl_mc_ycbcr_frag_shader fs_callback, - void *callback_priv); - -void vl_mc_cleanup(struct vl_mc *renderer); - -bool vl_mc_init_buffer(struct vl_mc *renderer, struct vl_mc_buffer *buffer); - -void vl_mc_cleanup_buffer(struct vl_mc_buffer *buffer); - -void vl_mc_set_surface(struct vl_mc_buffer *buffer, struct pipe_surface *surface); - -void vl_mc_render_ref(struct vl_mc *renderer, struct vl_mc_buffer *buffer, struct pipe_sampler_view *ref); - -void vl_mc_render_ycbcr(struct vl_mc *renderer, struct vl_mc_buffer *buffer, unsigned component, unsigned num_instances); - -#endif /* vl_mc_h */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c deleted file mode 100644 index bd1f091cd05..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c +++ /dev/null @@ -1,983 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Maarten Lankhorst - * Copyright 2011 Christian König - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "pipe/p_video_decoder.h" -#include "util/u_memory.h" - -#include "vl_vlc.h" -#include "vl_mpeg12_bitstream.h" - -enum { - dct_End_of_Block = 0xFF, - dct_Escape = 0xFE, - dct_DC = 0xFD, - dct_AC = 0xFC -}; - -struct dct_coeff -{ - uint8_t length; - uint8_t run; - int16_t level; -}; - -struct dct_coeff_compressed -{ - uint32_t bitcode; - struct dct_coeff coeff; -}; - -/* coding table as found in the spec annex B.5 table B-1 */ -static const struct vl_vlc_compressed macroblock_address_increment[] = { - { 0x8000, { 1, 1 } }, - { 0x6000, { 3, 2 } }, - { 0x4000, { 3, 3 } }, - { 0x3000, { 4, 4 } }, - { 0x2000, { 4, 5 } }, - { 0x1800, { 5, 6 } }, - { 0x1000, { 5, 7 } }, - { 0x0e00, { 7, 8 } }, - { 0x0c00, { 7, 9 } }, - { 0x0b00, { 8, 10 } }, - { 0x0a00, { 8, 11 } }, - { 0x0900, { 8, 12 } }, - { 0x0800, { 8, 13 } }, - { 0x0700, { 8, 14 } }, - { 0x0600, { 8, 15 } }, - { 0x05c0, { 10, 16 } }, - { 0x0580, { 10, 17 } }, - { 0x0540, { 10, 18 } }, - { 0x0500, { 10, 19 } }, - { 0x04c0, { 10, 20 } }, - { 0x0480, { 10, 21 } }, - { 0x0460, { 11, 22 } }, - { 0x0440, { 11, 23 } }, - { 0x0420, { 11, 24 } }, - { 0x0400, { 11, 25 } }, - { 0x03e0, { 11, 26 } }, - { 0x03c0, { 11, 27 } }, - { 0x03a0, { 11, 28 } }, - { 0x0380, { 11, 29 } }, - { 0x0360, { 11, 30 } }, - { 0x0340, { 11, 31 } }, - { 0x0320, { 11, 32 } }, - { 0x0300, { 11, 33 } } -}; - -#define Q PIPE_MPEG12_MB_TYPE_QUANT -#define F PIPE_MPEG12_MB_TYPE_MOTION_FORWARD -#define B PIPE_MPEG12_MB_TYPE_MOTION_BACKWARD -#define P PIPE_MPEG12_MB_TYPE_PATTERN -#define I PIPE_MPEG12_MB_TYPE_INTRA - -/* coding table as found in the spec annex B.5 table B-2 */ -static const struct vl_vlc_compressed macroblock_type_i[] = { - { 0x8000, { 1, I } }, - { 0x4000, { 2, Q|I } } -}; - -/* coding table as found in the spec annex B.5 table B-3 */ -static const struct vl_vlc_compressed macroblock_type_p[] = { - { 0x8000, { 1, F|P } }, - { 0x4000, { 2, P } }, - { 0x2000, { 3, F } }, - { 0x1800, { 5, I } }, - { 0x1000, { 5, Q|F|P } }, - { 0x0800, { 5, Q|P } }, - { 0x0400, { 6, Q|I } } -}; - -/* coding table as found in the spec annex B.5 table B-4 */ -static const struct vl_vlc_compressed macroblock_type_b[] = { - { 0x8000, { 2, F|B } }, - { 0xC000, { 2, F|B|P } }, - { 0x4000, { 3, B } }, - { 0x6000, { 3, B|P } }, - { 0x2000, { 4, F } }, - { 0x3000, { 4, F|P } }, - { 0x1800, { 5, I } }, - { 0x1000, { 5, Q|F|B|P } }, - { 0x0C00, { 6, Q|F|P } }, - { 0x0800, { 6, Q|B|P } }, - { 0x0400, { 6, Q|I } } -}; - -#undef Q -#undef F -#undef B -#undef P -#undef I - -/* coding table as found in the spec annex B.5 table B-9 */ -static const struct vl_vlc_compressed coded_block_pattern[] = { - { 0xE000, { 3, 60 } }, - { 0xD000, { 4, 4 } }, - { 0xC000, { 4, 8 } }, - { 0xB000, { 4, 16 } }, - { 0xA000, { 4, 32 } }, - { 0x9800, { 5, 12 } }, - { 0x9000, { 5, 48 } }, - { 0x8800, { 5, 20 } }, - { 0x8000, { 5, 40 } }, - { 0x7800, { 5, 28 } }, - { 0x7000, { 5, 44 } }, - { 0x6800, { 5, 52 } }, - { 0x6000, { 5, 56 } }, - { 0x5800, { 5, 1 } }, - { 0x5000, { 5, 61 } }, - { 0x4800, { 5, 2 } }, - { 0x4000, { 5, 62 } }, - { 0x3C00, { 6, 24 } }, - { 0x3800, { 6, 36 } }, - { 0x3400, { 6, 3 } }, - { 0x3000, { 6, 63 } }, - { 0x2E00, { 7, 5 } }, - { 0x2C00, { 7, 9 } }, - { 0x2A00, { 7, 17 } }, - { 0x2800, { 7, 33 } }, - { 0x2600, { 7, 6 } }, - { 0x2400, { 7, 10 } }, - { 0x2200, { 7, 18 } }, - { 0x2000, { 7, 34 } }, - { 0x1F00, { 8, 7 } }, - { 0x1E00, { 8, 11 } }, - { 0x1D00, { 8, 19 } }, - { 0x1C00, { 8, 35 } }, - { 0x1B00, { 8, 13 } }, - { 0x1A00, { 8, 49 } }, - { 0x1900, { 8, 21 } }, - { 0x1800, { 8, 41 } }, - { 0x1700, { 8, 14 } }, - { 0x1600, { 8, 50 } }, - { 0x1500, { 8, 22 } }, - { 0x1400, { 8, 42 } }, - { 0x1300, { 8, 15 } }, - { 0x1200, { 8, 51 } }, - { 0x1100, { 8, 23 } }, - { 0x1000, { 8, 43 } }, - { 0x0F00, { 8, 25 } }, - { 0x0E00, { 8, 37 } }, - { 0x0D00, { 8, 26 } }, - { 0x0C00, { 8, 38 } }, - { 0x0B00, { 8, 29 } }, - { 0x0A00, { 8, 45 } }, - { 0x0900, { 8, 53 } }, - { 0x0800, { 8, 57 } }, - { 0x0700, { 8, 30 } }, - { 0x0600, { 8, 46 } }, - { 0x0500, { 8, 54 } }, - { 0x0400, { 8, 58 } }, - { 0x0380, { 9, 31 } }, - { 0x0300, { 9, 47 } }, - { 0x0280, { 9, 55 } }, - { 0x0200, { 9, 59 } }, - { 0x0180, { 9, 27 } }, - { 0x0100, { 9, 39 } }, - { 0x0080, { 9, 0 } } -}; - -/* coding table as found in the spec annex B.5 table B-10 */ -static const struct vl_vlc_compressed motion_code[] = { - { 0x0320, { 11, -16 } }, - { 0x0360, { 11, -15 } }, - { 0x03a0, { 11, -14 } }, - { 0x03e0, { 11, -13 } }, - { 0x0420, { 11, -12 } }, - { 0x0460, { 11, -11 } }, - { 0x04c0, { 10, -10 } }, - { 0x0540, { 10, -9 } }, - { 0x05c0, { 10, -8 } }, - { 0x0700, { 8, -7 } }, - { 0x0900, { 8, -6 } }, - { 0x0b00, { 8, -5 } }, - { 0x0e00, { 7, -4 } }, - { 0x1800, { 5, -3 } }, - { 0x3000, { 4, -2 } }, - { 0x6000, { 3, -1 } }, - { 0x8000, { 1, 0 } }, - { 0x4000, { 3, 1 } }, - { 0x2000, { 4, 2 } }, - { 0x1000, { 5, 3 } }, - { 0x0c00, { 7, 4 } }, - { 0x0a00, { 8, 5 } }, - { 0x0800, { 8, 6 } }, - { 0x0600, { 8, 7 } }, - { 0x0580, { 10, 8 } }, - { 0x0500, { 10, 9 } }, - { 0x0480, { 10, 10 } }, - { 0x0440, { 11, 11 } }, - { 0x0400, { 11, 12 } }, - { 0x03c0, { 11, 13 } }, - { 0x0380, { 11, 14 } }, - { 0x0340, { 11, 15 } }, - { 0x0300, { 11, 16 } } -}; - -/* coding table as found in the spec annex B.5 table B-11 */ -static const struct vl_vlc_compressed dmvector[] = { - { 0x0000, { 1, 0 } }, - { 0x8000, { 2, 1 } }, - { 0xc000, { 2, -1 } } -}; - -/* coding table as found in the spec annex B.5 table B-12 */ -static const struct vl_vlc_compressed dct_dc_size_luminance[] = { - { 0x8000, { 3, 0 } }, - { 0x0000, { 2, 1 } }, - { 0x4000, { 2, 2 } }, - { 0xA000, { 3, 3 } }, - { 0xC000, { 3, 4 } }, - { 0xE000, { 4, 5 } }, - { 0xF000, { 5, 6 } }, - { 0xF800, { 6, 7 } }, - { 0xFC00, { 7, 8 } }, - { 0xFE00, { 8, 9 } }, - { 0xFF00, { 9, 10 } }, - { 0xFF80, { 9, 11 } } -}; - -/* coding table as found in the spec annex B.5 table B-13 */ -static const struct vl_vlc_compressed dct_dc_size_chrominance[] = { - { 0x0000, { 2, 0 } }, - { 0x4000, { 2, 1 } }, - { 0x8000, { 2, 2 } }, - { 0xC000, { 3, 3 } }, - { 0xE000, { 4, 4 } }, - { 0xF000, { 5, 5 } }, - { 0xF800, { 6, 6 } }, - { 0xFC00, { 7, 7 } }, - { 0xFE00, { 8, 8 } }, - { 0xFF00, { 9, 9 } }, - { 0xFF80, { 10, 10 } }, - { 0xFFC0, { 10, 11 } } -}; - -/* coding table as found in the spec annex B.5 table B-14 */ -static const struct dct_coeff_compressed dct_coeff_tbl_zero[] = { - { 0x8000, { 2, dct_End_of_Block, 0 } }, - { 0x8000, { 1, dct_DC, 1 } }, - { 0xC000, { 2, dct_AC, 1 } }, - { 0x6000, { 3, 1, 1 } }, - { 0x4000, { 4, 0, 2 } }, - { 0x5000, { 4, 2, 1 } }, - { 0x2800, { 5, 0, 3 } }, - { 0x3800, { 5, 3, 1 } }, - { 0x3000, { 5, 4, 1 } }, - { 0x1800, { 6, 1, 2 } }, - { 0x1C00, { 6, 5, 1 } }, - { 0x1400, { 6, 6, 1 } }, - { 0x1000, { 6, 7, 1 } }, - { 0x0C00, { 7, 0, 4 } }, - { 0x0800, { 7, 2, 2 } }, - { 0x0E00, { 7, 8, 1 } }, - { 0x0A00, { 7, 9, 1 } }, - { 0x0400, { 6, dct_Escape, 0 } }, - { 0x2600, { 8, 0, 5 } }, - { 0x2100, { 8, 0, 6 } }, - { 0x2500, { 8, 1, 3 } }, - { 0x2400, { 8, 3, 2 } }, - { 0x2700, { 8, 10, 1 } }, - { 0x2300, { 8, 11, 1 } }, - { 0x2200, { 8, 12, 1 } }, - { 0x2000, { 8, 13, 1 } }, - { 0x0280, { 10, 0, 7 } }, - { 0x0300, { 10, 1, 4 } }, - { 0x02C0, { 10, 2, 3 } }, - { 0x03C0, { 10, 4, 2 } }, - { 0x0240, { 10, 5, 2 } }, - { 0x0380, { 10, 14, 1 } }, - { 0x0340, { 10, 15, 1 } }, - { 0x0200, { 10, 16, 1 } }, - { 0x01D0, { 12, 0, 8 } }, - { 0x0180, { 12, 0, 9 } }, - { 0x0130, { 12, 0, 10 } }, - { 0x0100, { 12, 0, 11 } }, - { 0x01B0, { 12, 1, 5 } }, - { 0x0140, { 12, 2, 4 } }, - { 0x01C0, { 12, 3, 3 } }, - { 0x0120, { 12, 4, 3 } }, - { 0x01E0, { 12, 6, 2 } }, - { 0x0150, { 12, 7, 2 } }, - { 0x0110, { 12, 8, 2 } }, - { 0x01F0, { 12, 17, 1 } }, - { 0x01A0, { 12, 18, 1 } }, - { 0x0190, { 12, 19, 1 } }, - { 0x0170, { 12, 20, 1 } }, - { 0x0160, { 12, 21, 1 } }, - { 0x00D0, { 13, 0, 12 } }, - { 0x00C8, { 13, 0, 13 } }, - { 0x00C0, { 13, 0, 14 } }, - { 0x00B8, { 13, 0, 15 } }, - { 0x00B0, { 13, 1, 6 } }, - { 0x00A8, { 13, 1, 7 } }, - { 0x00A0, { 13, 2, 5 } }, - { 0x0098, { 13, 3, 4 } }, - { 0x0090, { 13, 5, 3 } }, - { 0x0088, { 13, 9, 2 } }, - { 0x0080, { 13, 10, 2 } }, - { 0x00F8, { 13, 22, 1 } }, - { 0x00F0, { 13, 23, 1 } }, - { 0x00E8, { 13, 24, 1 } }, - { 0x00E0, { 13, 25, 1 } }, - { 0x00D8, { 13, 26, 1 } }, - { 0x007C, { 14, 0, 16 } }, - { 0x0078, { 14, 0, 17 } }, - { 0x0074, { 14, 0, 18 } }, - { 0x0070, { 14, 0, 19 } }, - { 0x006C, { 14, 0, 20 } }, - { 0x0068, { 14, 0, 21 } }, - { 0x0064, { 14, 0, 22 } }, - { 0x0060, { 14, 0, 23 } }, - { 0x005C, { 14, 0, 24 } }, - { 0x0058, { 14, 0, 25 } }, - { 0x0054, { 14, 0, 26 } }, - { 0x0050, { 14, 0, 27 } }, - { 0x004C, { 14, 0, 28 } }, - { 0x0048, { 14, 0, 29 } }, - { 0x0044, { 14, 0, 30 } }, - { 0x0040, { 14, 0, 31 } }, - { 0x0030, { 15, 0, 32 } }, - { 0x002E, { 15, 0, 33 } }, - { 0x002C, { 15, 0, 34 } }, - { 0x002A, { 15, 0, 35 } }, - { 0x0028, { 15, 0, 36 } }, - { 0x0026, { 15, 0, 37 } }, - { 0x0024, { 15, 0, 38 } }, - { 0x0022, { 15, 0, 39 } }, - { 0x0020, { 15, 0, 40 } }, - { 0x003E, { 15, 1, 8 } }, - { 0x003C, { 15, 1, 9 } }, - { 0x003A, { 15, 1, 10 } }, - { 0x0038, { 15, 1, 11 } }, - { 0x0036, { 15, 1, 12 } }, - { 0x0034, { 15, 1, 13 } }, - { 0x0032, { 15, 1, 14 } }, - { 0x0013, { 16, 1, 15 } }, - { 0x0012, { 16, 1, 16 } }, - { 0x0011, { 16, 1, 17 } }, - { 0x0010, { 16, 1, 18 } }, - { 0x0014, { 16, 6, 3 } }, - { 0x001A, { 16, 11, 2 } }, - { 0x0019, { 16, 12, 2 } }, - { 0x0018, { 16, 13, 2 } }, - { 0x0017, { 16, 14, 2 } }, - { 0x0016, { 16, 15, 2 } }, - { 0x0015, { 16, 16, 2 } }, - { 0x001F, { 16, 27, 1 } }, - { 0x001E, { 16, 28, 1 } }, - { 0x001D, { 16, 29, 1 } }, - { 0x001C, { 16, 30, 1 } }, - { 0x001B, { 16, 31, 1 } } -}; - -/* coding table as found in the spec annex B.5 table B-15 */ -static const struct dct_coeff_compressed dct_coeff_tbl_one[] = { - { 0x6000, { 4, dct_End_of_Block, 0 } }, - { 0x8000, { 2, 0, 1 } }, - { 0x4000, { 3, 1, 1 } }, - { 0xC000, { 3, 0, 2 } }, - { 0x2800, { 5, 2, 1 } }, - { 0x7000, { 4, 0, 3 } }, - { 0x3800, { 5, 3, 1 } }, - { 0x1800, { 6, 4, 1 } }, - { 0x3000, { 5, 1, 2 } }, - { 0x1C00, { 6, 5, 1 } }, - { 0x0C00, { 7, 6, 1 } }, - { 0x0800, { 7, 7, 1 } }, - { 0xE000, { 5, 0, 4 } }, - { 0x0E00, { 7, 2, 2 } }, - { 0x0A00, { 7, 8, 1 } }, - { 0xF000, { 7, 9, 1 } }, - { 0x0400, { 6, dct_Escape, 0 } }, - { 0xE800, { 5, 0, 5 } }, - { 0x1400, { 6, 0, 6 } }, - { 0xF200, { 7, 1, 3 } }, - { 0x2600, { 8, 3, 2 } }, - { 0xF400, { 7, 10, 1 } }, - { 0x2100, { 8, 11, 1 } }, - { 0x2500, { 8, 12, 1 } }, - { 0x2400, { 8, 13, 1 } }, - { 0x1000, { 6, 0, 7 } }, - { 0x2700, { 8, 1, 4 } }, - { 0xFC00, { 8, 2, 3 } }, - { 0xFD00, { 8, 4, 2 } }, - { 0x0200, { 9, 5, 2 } }, - { 0x0280, { 9, 14, 1 } }, - { 0x0380, { 9, 15, 1 } }, - { 0x0340, { 10, 16, 1 } }, - { 0xF600, { 7, 0, 8 } }, - { 0xF800, { 7, 0, 9 } }, - { 0x2300, { 8, 0, 10 } }, - { 0x2200, { 8, 0, 11 } }, - { 0x2000, { 8, 1, 5 } }, - { 0x0300, { 10, 2, 4 } }, - { 0x01C0, { 12, 3, 3 } }, - { 0x0120, { 12, 4, 3 } }, - { 0x01E0, { 12, 6, 2 } }, - { 0x0150, { 12, 7, 2 } }, - { 0x0110, { 12, 8, 2 } }, - { 0x01F0, { 12, 17, 1 } }, - { 0x01A0, { 12, 18, 1 } }, - { 0x0190, { 12, 19, 1 } }, - { 0x0170, { 12, 20, 1 } }, - { 0x0160, { 12, 21, 1 } }, - { 0xFA00, { 8, 0, 12 } }, - { 0xFB00, { 8, 0, 13 } }, - { 0xFE00, { 8, 0, 14 } }, - { 0xFF00, { 8, 0, 15 } }, - { 0x00B0, { 13, 1, 6 } }, - { 0x00A8, { 13, 1, 7 } }, - { 0x00A0, { 13, 2, 5 } }, - { 0x0098, { 13, 3, 4 } }, - { 0x0090, { 13, 5, 3 } }, - { 0x0088, { 13, 9, 2 } }, - { 0x0080, { 13, 10, 2 } }, - { 0x00F8, { 13, 22, 1 } }, - { 0x00F0, { 13, 23, 1 } }, - { 0x00E8, { 13, 24, 1 } }, - { 0x00E0, { 13, 25, 1 } }, - { 0x00D8, { 13, 26, 1 } }, - { 0x007C, { 14, 0, 16 } }, - { 0x0078, { 14, 0, 17 } }, - { 0x0074, { 14, 0, 18 } }, - { 0x0070, { 14, 0, 19 } }, - { 0x006C, { 14, 0, 20 } }, - { 0x0068, { 14, 0, 21 } }, - { 0x0064, { 14, 0, 22 } }, - { 0x0060, { 14, 0, 23 } }, - { 0x005C, { 14, 0, 24 } }, - { 0x0058, { 14, 0, 25 } }, - { 0x0054, { 14, 0, 26 } }, - { 0x0050, { 14, 0, 27 } }, - { 0x004C, { 14, 0, 28 } }, - { 0x0048, { 14, 0, 29 } }, - { 0x0044, { 14, 0, 30 } }, - { 0x0040, { 14, 0, 31 } }, - { 0x0030, { 15, 0, 32 } }, - { 0x002E, { 15, 0, 33 } }, - { 0x002C, { 15, 0, 34 } }, - { 0x002A, { 15, 0, 35 } }, - { 0x0028, { 15, 0, 36 } }, - { 0x0026, { 15, 0, 37 } }, - { 0x0024, { 15, 0, 38 } }, - { 0x0022, { 15, 0, 39 } }, - { 0x0020, { 15, 0, 40 } }, - { 0x003E, { 15, 1, 8 } }, - { 0x003C, { 15, 1, 9 } }, - { 0x003A, { 15, 1, 10 } }, - { 0x0038, { 15, 1, 11 } }, - { 0x0036, { 15, 1, 12 } }, - { 0x0034, { 15, 1, 13 } }, - { 0x0032, { 15, 1, 14 } }, - { 0x0013, { 16, 1, 15 } }, - { 0x0012, { 16, 1, 16 } }, - { 0x0011, { 16, 1, 17 } }, - { 0x0010, { 16, 1, 18 } }, - { 0x0014, { 16, 6, 3 } }, - { 0x001A, { 16, 11, 2 } }, - { 0x0019, { 16, 12, 2 } }, - { 0x0018, { 16, 13, 2 } }, - { 0x0017, { 16, 14, 2 } }, - { 0x0016, { 16, 15, 2 } }, - { 0x0015, { 16, 16, 2 } }, - { 0x001F, { 16, 27, 1 } }, - { 0x001E, { 16, 28, 1 } }, - { 0x001D, { 16, 29, 1 } }, - { 0x001C, { 16, 30, 1 } }, - { 0x001B, { 16, 31, 1 } } -}; - -/* q_scale_type */ -static const unsigned quant_scale[2][32] = { - { 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, - 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62 }, - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 18, 20, 22, 24, - 28, 32, 36, 40, 44, 48, 52, 56, 64, 72, 80, 88, 96, 104, 112 } -}; - -static struct vl_vlc_entry tbl_B1[1 << 11]; -static struct vl_vlc_entry tbl_B2[1 << 2]; -static struct vl_vlc_entry tbl_B3[1 << 6]; -static struct vl_vlc_entry tbl_B4[1 << 6]; -static struct vl_vlc_entry tbl_B9[1 << 9]; -static struct vl_vlc_entry tbl_B10[1 << 11]; -static struct vl_vlc_entry tbl_B11[1 << 2]; -static struct vl_vlc_entry tbl_B12[1 << 10]; -static struct vl_vlc_entry tbl_B13[1 << 10]; -static struct dct_coeff tbl_B14_DC[1 << 17]; -static struct dct_coeff tbl_B14_AC[1 << 17]; -static struct dct_coeff tbl_B15[1 << 17]; - -static INLINE void -init_dct_coeff_table(struct dct_coeff *dst, const struct dct_coeff_compressed *src, - unsigned size, bool is_DC) -{ - unsigned i; - - for (i=0;i<(1<<17);++i) { - dst[i].length = 0; - dst[i].level = 0; - dst[i].run = dct_End_of_Block; - } - - for(; size > 0; --size, ++src) { - struct dct_coeff coeff = src->coeff; - bool has_sign = true; - - switch (coeff.run) { - case dct_End_of_Block: - if (is_DC) - continue; - - has_sign = false; - break; - - case dct_Escape: - has_sign = false; - break; - - case dct_DC: - if (!is_DC) - continue; - - coeff.length += 1; - coeff.run = 1; - break; - - case dct_AC: - if (is_DC) - continue; - - coeff.length += 1; - coeff.run = 1; - break; - - default: - coeff.length += 1; - coeff.run += 1; - break; - } - - for(i=0; i<(1 << (17 - coeff.length)); ++i) - dst[src->bitcode << 1 | i] = coeff; - - if (has_sign) { - coeff.level = -coeff.level; - for(; i<(1 << (18 - coeff.length)); ++i) - dst[src->bitcode << 1 | i] = coeff; - } - } -} - -static INLINE void -init_tables() -{ - vl_vlc_init_table(tbl_B1, Elements(tbl_B1), macroblock_address_increment, Elements(macroblock_address_increment)); - vl_vlc_init_table(tbl_B2, Elements(tbl_B2), macroblock_type_i, Elements(macroblock_type_i)); - vl_vlc_init_table(tbl_B3, Elements(tbl_B3), macroblock_type_p, Elements(macroblock_type_p)); - vl_vlc_init_table(tbl_B4, Elements(tbl_B4), macroblock_type_b, Elements(macroblock_type_b)); - vl_vlc_init_table(tbl_B9, Elements(tbl_B9), coded_block_pattern, Elements(coded_block_pattern)); - vl_vlc_init_table(tbl_B10, Elements(tbl_B10), motion_code, Elements(motion_code)); - vl_vlc_init_table(tbl_B11, Elements(tbl_B11), dmvector, Elements(dmvector)); - vl_vlc_init_table(tbl_B12, Elements(tbl_B12), dct_dc_size_luminance, Elements(dct_dc_size_luminance)); - vl_vlc_init_table(tbl_B13, Elements(tbl_B13), dct_dc_size_chrominance, Elements(dct_dc_size_chrominance)); - init_dct_coeff_table(tbl_B14_DC, dct_coeff_tbl_zero, Elements(dct_coeff_tbl_zero), true); - init_dct_coeff_table(tbl_B14_AC, dct_coeff_tbl_zero, Elements(dct_coeff_tbl_zero), false); - init_dct_coeff_table(tbl_B15, dct_coeff_tbl_one, Elements(dct_coeff_tbl_one), false); -} - -static INLINE int -DIV2DOWN(int todiv) -{ - return (todiv&~1)/2; -} - -static INLINE int -DIV2UP(int todiv) -{ - return (todiv+1)/2; -} - -static INLINE void -motion_vector(struct vl_mpg12_bs *bs, int r, int s, int dmv, short delta[2], short dmvector[2]) -{ - int t; - for (t = 0; t < 2; ++t) { - int motion_code; - int r_size = bs->desc.f_code[s][t]; - - vl_vlc_fillbits(&bs->vlc); - motion_code = vl_vlc_get_vlclbf(&bs->vlc, tbl_B10, 11); - - assert(r_size >= 0); - if (r_size && motion_code) { - int residual = vl_vlc_get_uimsbf(&bs->vlc, r_size) + 1; - delta[t] = ((abs(motion_code) - 1) << r_size) + residual; - if (motion_code < 0) - delta[t] = -delta[t]; - } else - delta[t] = motion_code; - if (dmv) - dmvector[t] = vl_vlc_get_vlclbf(&bs->vlc, tbl_B11, 2); - } -} - -static INLINE int -wrap(short f, int shift) -{ - if (f < (-16 << shift)) - return f + (32 << shift); - else if (f >= 16 << shift) - return f - (32 << shift); - else - return f; -} - -static INLINE void -motion_vector_frame(struct vl_mpg12_bs *bs, int s, struct pipe_mpeg12_macroblock *mb) -{ - int dmv = mb->macroblock_modes.bits.frame_motion_type == PIPE_MPEG12_MO_TYPE_DUAL_PRIME; - short dmvector[2], delta[2]; - - if (mb->macroblock_modes.bits.frame_motion_type == PIPE_MPEG12_MO_TYPE_FIELD) { - mb->motion_vertical_field_select |= vl_vlc_get_uimsbf(&bs->vlc, 1) << s; - motion_vector(bs, 0, s, dmv, delta, dmvector); - mb->PMV[0][s][0] = wrap(mb->PMV[0][s][0] + delta[0], bs->desc.f_code[s][0]); - mb->PMV[0][s][1] = wrap(DIV2DOWN(mb->PMV[0][s][1]) + delta[1], bs->desc.f_code[s][1]) * 2; - - mb->motion_vertical_field_select |= vl_vlc_get_uimsbf(&bs->vlc, 1) << (s + 2); - motion_vector(bs, 1, s, dmv, delta, dmvector); - mb->PMV[1][s][0] = wrap(mb->PMV[1][s][0] + delta[0], bs->desc.f_code[s][0]); - mb->PMV[1][s][1] = wrap(DIV2DOWN(mb->PMV[1][s][1]) + delta[1], bs->desc.f_code[s][1]) * 2; - - } else { - motion_vector(bs, 0, s, dmv, delta, dmvector); - mb->PMV[0][s][0] = wrap(mb->PMV[0][s][0] + delta[0], bs->desc.f_code[s][0]); - mb->PMV[0][s][1] = wrap(mb->PMV[0][s][1] + delta[1], bs->desc.f_code[s][1]); - } -} - -static INLINE void -motion_vector_field(struct vl_mpg12_bs *bs, int s, struct pipe_mpeg12_macroblock *mb) -{ - int dmv = mb->macroblock_modes.bits.field_motion_type == PIPE_MPEG12_MO_TYPE_DUAL_PRIME; - short dmvector[2], delta[2]; - - if (mb->macroblock_modes.bits.field_motion_type == PIPE_MPEG12_MO_TYPE_16x8) { - mb->motion_vertical_field_select |= vl_vlc_get_uimsbf(&bs->vlc, 1) << s; - motion_vector(bs, 0, s, dmv, delta, dmvector); - - mb->motion_vertical_field_select |= vl_vlc_get_uimsbf(&bs->vlc, 1) << (s + 2); - motion_vector(bs, 1, s, dmv, delta, dmvector); - } else { - if (!dmv) - mb->motion_vertical_field_select |= vl_vlc_get_uimsbf(&bs->vlc, 1) << s; - motion_vector(bs, 0, s, dmv, delta, dmvector); - } -} - -static INLINE void -reset_predictor(struct vl_mpg12_bs *bs) { - bs->pred_dc[0] = bs->pred_dc[1] = bs->pred_dc[2] = 0; -} - -static INLINE void -decode_dct(struct vl_mpg12_bs *bs, struct pipe_mpeg12_macroblock *mb, int scale) -{ - static const unsigned blk2cc[] = { 0, 0, 0, 0, 1, 2 }; - static const struct vl_vlc_entry *blk2dcsize[] = { - tbl_B12, tbl_B12, tbl_B12, tbl_B12, tbl_B13, tbl_B13 - }; - - bool intra = mb->macroblock_type & PIPE_MPEG12_MB_TYPE_INTRA; - const struct dct_coeff *table = intra ? bs->intra_dct_tbl : tbl_B14_AC; - const struct dct_coeff *entry; - int i, cbp, blk = 0; - short *dst = mb->blocks; - - vl_vlc_fillbits(&bs->vlc); - mb->coded_block_pattern = cbp = intra ? 0x3F : vl_vlc_get_vlclbf(&bs->vlc, tbl_B9, 9); - - goto entry; - - while(1) { - vl_vlc_eatbits(&bs->vlc, entry->length); - if (entry->run == dct_End_of_Block) { - - dst += 64; - cbp <<= 1; - cbp &= 0x3F; - blk++; - -entry: - if (!cbp) - break; - - while(!(cbp & 0x20)) { - cbp <<= 1; - blk++; - } - - vl_vlc_fillbits(&bs->vlc); - - if (intra) { - unsigned cc = blk2cc[blk]; - unsigned size = vl_vlc_get_vlclbf(&bs->vlc, blk2dcsize[blk], 10); - - if (size) { - int dct_diff = vl_vlc_get_uimsbf(&bs->vlc, size); - int half_range = 1 << (size - 1); - if (dct_diff < half_range) - dct_diff = (dct_diff + 1) - (2 * half_range); - bs->pred_dc[cc] += dct_diff; - } - - dst[0] = bs->pred_dc[cc]; - i = 0; - - } else { - entry = tbl_B14_DC + vl_vlc_peekbits(&bs->vlc, 17); - i = -1; - continue; - } - - } else if (entry->run == dct_Escape) { - i += vl_vlc_get_uimsbf(&bs->vlc, 6) + 1; - if (i > 64) - break; - - dst[i] = vl_vlc_get_simsbf(&bs->vlc, 12) * scale; - - } else { - i += entry->run; - if (i > 64) - break; - - dst[i] = entry->level * scale; - } - - vl_vlc_fillbits(&bs->vlc); - entry = table + vl_vlc_peekbits(&bs->vlc, 17); - } -} - -static INLINE void -decode_slice(struct vl_mpg12_bs *bs) -{ - struct pipe_mpeg12_macroblock mb; - short dct_blocks[64*6]; - unsigned dct_scale; - signed x = -1; - - memset(&mb, 0, sizeof(mb)); - mb.base.codec = PIPE_VIDEO_CODEC_MPEG12; - mb.y = vl_vlc_get_uimsbf(&bs->vlc, 8) - 1; - mb.blocks = dct_blocks; - - reset_predictor(bs); - vl_vlc_fillbits(&bs->vlc); - dct_scale = quant_scale[bs->desc.q_scale_type][vl_vlc_get_uimsbf(&bs->vlc, 5)]; - - if (vl_vlc_get_uimsbf(&bs->vlc, 1)) - while (vl_vlc_get_uimsbf(&bs->vlc, 9) & 1) - vl_vlc_fillbits(&bs->vlc); - - vl_vlc_fillbits(&bs->vlc); - assert(vl_vlc_bits_left(&bs->vlc) > 23 && vl_vlc_peekbits(&bs->vlc, 23)); - do { - int inc = 0; - - if (bs->decoder->profile == PIPE_VIDEO_PROFILE_MPEG1) - while (vl_vlc_peekbits(&bs->vlc, 11) == 15) { - vl_vlc_eatbits(&bs->vlc, 11); - vl_vlc_fillbits(&bs->vlc); - } - - while (vl_vlc_peekbits(&bs->vlc, 11) == 8) { - vl_vlc_eatbits(&bs->vlc, 11); - vl_vlc_fillbits(&bs->vlc); - inc += 33; - } - inc += vl_vlc_get_vlclbf(&bs->vlc, tbl_B1, 11); - if (x != -1) { - mb.num_skipped_macroblocks = inc - 1; - bs->decoder->decode_macroblock(bs->decoder, &mb.base, 1); - } - mb.x = x += inc; - - switch (bs->desc.picture_coding_type) { - case PIPE_MPEG12_PICTURE_CODING_TYPE_I: - mb.macroblock_type = vl_vlc_get_vlclbf(&bs->vlc, tbl_B2, 2); - break; - - case PIPE_MPEG12_PICTURE_CODING_TYPE_P: - mb.macroblock_type = vl_vlc_get_vlclbf(&bs->vlc, tbl_B3, 6); - break; - - case PIPE_MPEG12_PICTURE_CODING_TYPE_B: - mb.macroblock_type = vl_vlc_get_vlclbf(&bs->vlc, tbl_B4, 6); - break; - - default: - mb.macroblock_type = 0; - /* dumb gcc */ - assert(0); - } - - mb.macroblock_modes.value = 0; - if (mb.macroblock_type & (PIPE_MPEG12_MB_TYPE_MOTION_FORWARD | PIPE_MPEG12_MB_TYPE_MOTION_BACKWARD)) { - if (bs->desc.picture_structure == PIPE_MPEG12_PICTURE_STRUCTURE_FRAME) { - if (bs->desc.frame_pred_frame_dct == 0) - mb.macroblock_modes.bits.frame_motion_type = vl_vlc_get_uimsbf(&bs->vlc, 2); - else - mb.macroblock_modes.bits.frame_motion_type = 2; - } else - mb.macroblock_modes.bits.field_motion_type = vl_vlc_get_uimsbf(&bs->vlc, 2); - - } else if ((mb.macroblock_type & PIPE_MPEG12_MB_TYPE_INTRA) && bs->desc.concealment_motion_vectors) { - if (bs->desc.picture_structure == PIPE_MPEG12_PICTURE_STRUCTURE_FRAME) - mb.macroblock_modes.bits.frame_motion_type = 2; - else - mb.macroblock_modes.bits.field_motion_type = 1; - } - - if (bs->desc.picture_structure == PIPE_MPEG12_PICTURE_STRUCTURE_FRAME && - bs->desc.frame_pred_frame_dct == 0 && - mb.macroblock_type & (PIPE_MPEG12_MB_TYPE_INTRA | PIPE_MPEG12_MB_TYPE_PATTERN)) - mb.macroblock_modes.bits.dct_type = vl_vlc_get_uimsbf(&bs->vlc, 1); - - if (mb.macroblock_type & PIPE_MPEG12_MB_TYPE_QUANT) - dct_scale = quant_scale[bs->desc.q_scale_type][vl_vlc_get_uimsbf(&bs->vlc, 5)]; - - if (inc > 1 && bs->desc.picture_coding_type == PIPE_MPEG12_PICTURE_CODING_TYPE_P) - memset(mb.PMV, 0, sizeof(mb.PMV)); - - mb.motion_vertical_field_select = 0; - if ((mb.macroblock_type & PIPE_MPEG12_MB_TYPE_MOTION_FORWARD) || - (mb.macroblock_type & PIPE_MPEG12_MB_TYPE_INTRA && bs->desc.concealment_motion_vectors)) { - if (bs->desc.picture_structure == PIPE_MPEG12_PICTURE_STRUCTURE_FRAME) - motion_vector_frame(bs, 0, &mb); - else - motion_vector_field(bs, 0, &mb); - } - - if (mb.macroblock_type & PIPE_MPEG12_MB_TYPE_MOTION_BACKWARD) { - if (bs->desc.picture_structure == PIPE_MPEG12_PICTURE_STRUCTURE_FRAME) - motion_vector_frame(bs, 1, &mb); - else - motion_vector_field(bs, 1, &mb); - } - - if (mb.macroblock_type & PIPE_MPEG12_MB_TYPE_INTRA && bs->desc.concealment_motion_vectors) { - unsigned extra = vl_vlc_get_uimsbf(&bs->vlc, 1); - mb.PMV[1][0][0] = mb.PMV[0][0][0]; - mb.PMV[1][0][1] = mb.PMV[0][0][1]; - assert(extra); - } else if (mb.macroblock_type & PIPE_MPEG12_MB_TYPE_INTRA || - !(mb.macroblock_type & (PIPE_MPEG12_MB_TYPE_MOTION_FORWARD | - PIPE_MPEG12_MB_TYPE_MOTION_BACKWARD))) { - memset(mb.PMV, 0, sizeof(mb.PMV)); - } - - if ((mb.macroblock_type & PIPE_MPEG12_MB_TYPE_MOTION_FORWARD && - mb.macroblock_modes.bits.frame_motion_type == 2) || - (mb.macroblock_modes.bits.frame_motion_type == 3)) { - mb.PMV[1][0][0] = mb.PMV[0][0][0]; - mb.PMV[1][0][1] = mb.PMV[0][0][1]; - } - - if (mb.macroblock_type & PIPE_MPEG12_MB_TYPE_MOTION_BACKWARD && - mb.macroblock_modes.bits.frame_motion_type == 2) { - mb.PMV[1][1][0] = mb.PMV[0][1][0]; - mb.PMV[1][1][1] = mb.PMV[0][1][1]; - } - - if (inc > 1 || !(mb.macroblock_type & PIPE_MPEG12_MB_TYPE_INTRA)) - reset_predictor(bs); - - if (mb.macroblock_type & (PIPE_MPEG12_MB_TYPE_INTRA | PIPE_MPEG12_MB_TYPE_PATTERN)) { - memset(dct_blocks, 0, sizeof(dct_blocks)); - decode_dct(bs, &mb, dct_scale); - } else - mb.coded_block_pattern = 0; - - vl_vlc_fillbits(&bs->vlc); - } while (vl_vlc_bits_left(&bs->vlc) && vl_vlc_peekbits(&bs->vlc, 23)); - - mb.num_skipped_macroblocks = 0; - bs->decoder->decode_macroblock(bs->decoder, &mb.base, 1); -} - -void -vl_mpg12_bs_init(struct vl_mpg12_bs *bs, struct pipe_video_decoder *decoder) -{ - static bool tables_initialized = false; - - assert(bs); - - memset(bs, 0, sizeof(struct vl_mpg12_bs)); - - bs->decoder = decoder; - - if (!tables_initialized) { - init_tables(); - tables_initialized = true; - } -} - -void -vl_mpg12_bs_set_picture_desc(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc *picture) -{ - bs->desc = *picture; - bs->intra_dct_tbl = picture->intra_vlc_format ? tbl_B15 : tbl_B14_AC; -} - -void -vl_mpg12_bs_decode(struct vl_mpg12_bs *bs, unsigned num_buffers, - const void * const *buffers, const unsigned *sizes) -{ - assert(bs); - - vl_vlc_init(&bs->vlc, num_buffers, buffers, sizes); - while (vl_vlc_bits_left(&bs->vlc) > 32) { - uint32_t code = vl_vlc_peekbits(&bs->vlc, 32); - - if (code >= 0x101 && code <= 0x1AF) { - vl_vlc_eatbits(&bs->vlc, 24); - decode_slice(bs); - - /* align to a byte again */ - vl_vlc_eatbits(&bs->vlc, vl_vlc_valid_bits(&bs->vlc) & 7); - - } else { - vl_vlc_eatbits(&bs->vlc, 8); - } - - vl_vlc_fillbits(&bs->vlc); - } -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.h b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.h deleted file mode 100644 index 0ba7f4303e5..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.h +++ /dev/null @@ -1,55 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Christian König. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef vl_mpeg12_bitstream_h -#define vl_mpeg12_bitstream_h - -#include "vl_defines.h" -#include "vl_vlc.h" - -struct vl_mpg12_bs -{ - struct pipe_video_decoder *decoder; - - struct pipe_mpeg12_picture_desc desc; - struct dct_coeff *intra_dct_tbl; - - struct vl_vlc vlc; - short pred_dc[3]; -}; - -void -vl_mpg12_bs_init(struct vl_mpg12_bs *bs, struct pipe_video_decoder *decoder); - -void -vl_mpg12_bs_set_picture_desc(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc *picture); - -void -vl_mpg12_bs_decode(struct vl_mpg12_bs *bs, unsigned num_buffers, - const void * const *buffers, const unsigned *sizes); - -#endif /* vl_mpeg12_bitstream_h */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c deleted file mode 100644 index cb55fa6f611..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c +++ /dev/null @@ -1,1187 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 Younes Manton. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include -#include - -#include "util/u_memory.h" -#include "util/u_rect.h" -#include "util/u_sampler.h" -#include "util/u_video.h" - -#include "vl_mpeg12_decoder.h" -#include "vl_defines.h" - -#define SCALE_FACTOR_SNORM (32768.0f / 256.0f) -#define SCALE_FACTOR_SSCALED (1.0f / 256.0f) - -struct format_config { - enum pipe_format zscan_source_format; - enum pipe_format idct_source_format; - enum pipe_format mc_source_format; - - float idct_scale; - float mc_scale; -}; - -static const struct format_config bitstream_format_config[] = { -// { PIPE_FORMAT_R16_SSCALED, PIPE_FORMAT_R16G16B16A16_SSCALED, PIPE_FORMAT_R16G16B16A16_FLOAT, 1.0f, SCALE_FACTOR_SSCALED }, -// { PIPE_FORMAT_R16_SSCALED, PIPE_FORMAT_R16G16B16A16_SSCALED, PIPE_FORMAT_R16G16B16A16_SSCALED, 1.0f, SCALE_FACTOR_SSCALED }, - { PIPE_FORMAT_R16_SNORM, PIPE_FORMAT_R16G16B16A16_SNORM, PIPE_FORMAT_R16G16B16A16_FLOAT, 1.0f, SCALE_FACTOR_SNORM }, - { PIPE_FORMAT_R16_SNORM, PIPE_FORMAT_R16G16B16A16_SNORM, PIPE_FORMAT_R16G16B16A16_SNORM, 1.0f, SCALE_FACTOR_SNORM } -}; - -static const unsigned num_bitstream_format_configs = - sizeof(bitstream_format_config) / sizeof(struct format_config); - -static const struct format_config idct_format_config[] = { -// { PIPE_FORMAT_R16_SSCALED, PIPE_FORMAT_R16G16B16A16_SSCALED, PIPE_FORMAT_R16G16B16A16_FLOAT, 1.0f, SCALE_FACTOR_SSCALED }, -// { PIPE_FORMAT_R16_SSCALED, PIPE_FORMAT_R16G16B16A16_SSCALED, PIPE_FORMAT_R16G16B16A16_SSCALED, 1.0f, SCALE_FACTOR_SSCALED }, - { PIPE_FORMAT_R16_SNORM, PIPE_FORMAT_R16G16B16A16_SNORM, PIPE_FORMAT_R16G16B16A16_FLOAT, 1.0f, SCALE_FACTOR_SNORM }, - { PIPE_FORMAT_R16_SNORM, PIPE_FORMAT_R16G16B16A16_SNORM, PIPE_FORMAT_R16G16B16A16_SNORM, 1.0f, SCALE_FACTOR_SNORM } -}; - -static const unsigned num_idct_format_configs = - sizeof(idct_format_config) / sizeof(struct format_config); - -static const struct format_config mc_format_config[] = { - //{ PIPE_FORMAT_R16_SSCALED, PIPE_FORMAT_NONE, PIPE_FORMAT_R16_SSCALED, 0.0f, SCALE_FACTOR_SSCALED }, - { PIPE_FORMAT_R16_SNORM, PIPE_FORMAT_NONE, PIPE_FORMAT_R16_SNORM, 0.0f, SCALE_FACTOR_SNORM } -}; - -static const unsigned num_mc_format_configs = - sizeof(mc_format_config) / sizeof(struct format_config); - -static const unsigned const_empty_block_mask_420[3][2][2] = { - { { 0x20, 0x10 }, { 0x08, 0x04 } }, - { { 0x02, 0x02 }, { 0x02, 0x02 } }, - { { 0x01, 0x01 }, { 0x01, 0x01 } } -}; - -static bool -init_zscan_buffer(struct vl_mpeg12_decoder *dec, struct vl_mpeg12_buffer *buffer) -{ - struct pipe_resource *res, res_tmpl; - struct pipe_sampler_view sv_tmpl; - struct pipe_surface **destination; - - unsigned i; - - assert(dec && buffer); - - memset(&res_tmpl, 0, sizeof(res_tmpl)); - res_tmpl.target = PIPE_TEXTURE_2D; - res_tmpl.format = dec->zscan_source_format; - res_tmpl.width0 = dec->blocks_per_line * BLOCK_WIDTH * BLOCK_HEIGHT; - res_tmpl.height0 = align(dec->num_blocks, dec->blocks_per_line) / dec->blocks_per_line; - res_tmpl.depth0 = 1; - res_tmpl.array_size = 1; - res_tmpl.usage = PIPE_USAGE_STREAM; - res_tmpl.bind = PIPE_BIND_SAMPLER_VIEW; - - res = dec->base.context->screen->resource_create(dec->base.context->screen, &res_tmpl); - if (!res) - goto error_source; - - - memset(&sv_tmpl, 0, sizeof(sv_tmpl)); - u_sampler_view_default_template(&sv_tmpl, res, res->format); - sv_tmpl.swizzle_r = sv_tmpl.swizzle_g = sv_tmpl.swizzle_b = sv_tmpl.swizzle_a = PIPE_SWIZZLE_RED; - buffer->zscan_source = dec->base.context->create_sampler_view(dec->base.context, res, &sv_tmpl); - pipe_resource_reference(&res, NULL); - if (!buffer->zscan_source) - goto error_sampler; - - if (dec->base.entrypoint <= PIPE_VIDEO_ENTRYPOINT_IDCT) - destination = dec->idct_source->get_surfaces(dec->idct_source); - else - destination = dec->mc_source->get_surfaces(dec->mc_source); - - if (!destination) - goto error_surface; - - for (i = 0; i < VL_MAX_PLANES; ++i) - if (!vl_zscan_init_buffer(i == 0 ? &dec->zscan_y : &dec->zscan_c, - &buffer->zscan[i], buffer->zscan_source, destination[i])) - goto error_plane; - - return true; - -error_plane: - for (; i > 0; --i) - vl_zscan_cleanup_buffer(&buffer->zscan[i - 1]); - -error_surface: -error_sampler: - pipe_sampler_view_reference(&buffer->zscan_source, NULL); - -error_source: - return false; -} - -static void -cleanup_zscan_buffer(struct vl_mpeg12_buffer *buffer) -{ - unsigned i; - - assert(buffer); - - for (i = 0; i < VL_MAX_PLANES; ++i) - vl_zscan_cleanup_buffer(&buffer->zscan[i]); - - pipe_sampler_view_reference(&buffer->zscan_source, NULL); -} - -static bool -init_idct_buffer(struct vl_mpeg12_decoder *dec, struct vl_mpeg12_buffer *buffer) -{ - struct pipe_sampler_view **idct_source_sv, **mc_source_sv; - - unsigned i; - - assert(dec && buffer); - - idct_source_sv = dec->idct_source->get_sampler_view_planes(dec->idct_source); - if (!idct_source_sv) - goto error_source_sv; - - mc_source_sv = dec->mc_source->get_sampler_view_planes(dec->mc_source); - if (!mc_source_sv) - goto error_mc_source_sv; - - for (i = 0; i < 3; ++i) - if (!vl_idct_init_buffer(i == 0 ? &dec->idct_y : &dec->idct_c, - &buffer->idct[i], idct_source_sv[i], - mc_source_sv[i])) - goto error_plane; - - return true; - -error_plane: - for (; i > 0; --i) - vl_idct_cleanup_buffer(&buffer->idct[i - 1]); - -error_mc_source_sv: -error_source_sv: - return false; -} - -static void -cleanup_idct_buffer(struct vl_mpeg12_buffer *buf) -{ - unsigned i; - - assert(buf); - - for (i = 0; i < 3; ++i) - vl_idct_cleanup_buffer(&buf->idct[0]); -} - -static bool -init_mc_buffer(struct vl_mpeg12_decoder *dec, struct vl_mpeg12_buffer *buf) -{ - assert(dec && buf); - - if(!vl_mc_init_buffer(&dec->mc_y, &buf->mc[0])) - goto error_mc_y; - - if(!vl_mc_init_buffer(&dec->mc_c, &buf->mc[1])) - goto error_mc_cb; - - if(!vl_mc_init_buffer(&dec->mc_c, &buf->mc[2])) - goto error_mc_cr; - - return true; - -error_mc_cr: - vl_mc_cleanup_buffer(&buf->mc[1]); - -error_mc_cb: - vl_mc_cleanup_buffer(&buf->mc[0]); - -error_mc_y: - return false; -} - -static void -cleanup_mc_buffer(struct vl_mpeg12_buffer *buf) -{ - unsigned i; - - assert(buf); - - for (i = 0; i < VL_MAX_PLANES; ++i) - vl_mc_cleanup_buffer(&buf->mc[i]); -} - -static INLINE void -MacroBlockTypeToPipeWeights(const struct pipe_mpeg12_macroblock *mb, unsigned weights[2]) -{ - assert(mb); - - switch (mb->macroblock_type & (PIPE_MPEG12_MB_TYPE_MOTION_FORWARD | PIPE_MPEG12_MB_TYPE_MOTION_BACKWARD)) { - case PIPE_MPEG12_MB_TYPE_MOTION_FORWARD: - weights[0] = PIPE_VIDEO_MV_WEIGHT_MAX; - weights[1] = PIPE_VIDEO_MV_WEIGHT_MIN; - break; - - case (PIPE_MPEG12_MB_TYPE_MOTION_FORWARD | PIPE_MPEG12_MB_TYPE_MOTION_BACKWARD): - weights[0] = PIPE_VIDEO_MV_WEIGHT_HALF; - weights[1] = PIPE_VIDEO_MV_WEIGHT_HALF; - break; - - case PIPE_MPEG12_MB_TYPE_MOTION_BACKWARD: - weights[0] = PIPE_VIDEO_MV_WEIGHT_MIN; - weights[1] = PIPE_VIDEO_MV_WEIGHT_MAX; - break; - - default: - if (mb->macroblock_type & PIPE_MPEG12_MB_TYPE_INTRA) { - weights[0] = PIPE_VIDEO_MV_WEIGHT_MIN; - weights[1] = PIPE_VIDEO_MV_WEIGHT_MIN; - } else { - /* no motion vector, but also not intra mb -> - just copy the old frame content */ - weights[0] = PIPE_VIDEO_MV_WEIGHT_MAX; - weights[1] = PIPE_VIDEO_MV_WEIGHT_MIN; - } - break; - } -} - -static INLINE struct vl_motionvector -MotionVectorToPipe(const struct pipe_mpeg12_macroblock *mb, unsigned vector, - unsigned field_select_mask, unsigned weight) -{ - struct vl_motionvector mv; - - assert(mb); - - if (mb->macroblock_type & (PIPE_MPEG12_MB_TYPE_MOTION_FORWARD | PIPE_MPEG12_MB_TYPE_MOTION_BACKWARD)) { - switch (mb->macroblock_modes.bits.frame_motion_type) { - case PIPE_MPEG12_MO_TYPE_FRAME: - mv.top.x = mb->PMV[0][vector][0]; - mv.top.y = mb->PMV[0][vector][1]; - mv.top.field_select = PIPE_VIDEO_FRAME; - mv.top.weight = weight; - - mv.bottom.x = mb->PMV[0][vector][0]; - mv.bottom.y = mb->PMV[0][vector][1]; - mv.bottom.weight = weight; - mv.bottom.field_select = PIPE_VIDEO_FRAME; - break; - - case PIPE_MPEG12_MO_TYPE_FIELD: - mv.top.x = mb->PMV[0][vector][0]; - mv.top.y = mb->PMV[0][vector][1]; - mv.top.field_select = (mb->motion_vertical_field_select & field_select_mask) ? - PIPE_VIDEO_BOTTOM_FIELD : PIPE_VIDEO_TOP_FIELD; - mv.top.weight = weight; - - mv.bottom.x = mb->PMV[1][vector][0]; - mv.bottom.y = mb->PMV[1][vector][1]; - mv.bottom.field_select = (mb->motion_vertical_field_select & (field_select_mask << 2)) ? - PIPE_VIDEO_BOTTOM_FIELD : PIPE_VIDEO_TOP_FIELD; - mv.bottom.weight = weight; - break; - - default: // TODO: Support DUALPRIME and 16x8 - break; - } - } else { - mv.top.x = mv.top.y = 0; - mv.top.field_select = PIPE_VIDEO_FRAME; - mv.top.weight = weight; - - mv.bottom.x = mv.bottom.y = 0; - mv.bottom.field_select = PIPE_VIDEO_FRAME; - mv.bottom.weight = weight; - } - return mv; -} - -static INLINE void -UploadYcbcrBlocks(struct vl_mpeg12_decoder *dec, - struct vl_mpeg12_buffer *buf, - const struct pipe_mpeg12_macroblock *mb) -{ - unsigned intra; - unsigned tb, x, y, num_blocks = 0; - - assert(dec && buf); - assert(mb); - - if (!mb->coded_block_pattern) - return; - - intra = mb->macroblock_type & PIPE_MPEG12_MB_TYPE_INTRA ? 1 : 0; - - for (y = 0; y < 2; ++y) { - for (x = 0; x < 2; ++x) { - if (mb->coded_block_pattern & const_empty_block_mask_420[0][y][x]) { - - struct vl_ycbcr_block *stream = buf->ycbcr_stream[0]; - stream->x = mb->x * 2 + x; - stream->y = mb->y * 2 + y; - stream->intra = intra; - stream->coding = mb->macroblock_modes.bits.dct_type; - stream->block_num = buf->block_num++; - - buf->num_ycbcr_blocks[0]++; - buf->ycbcr_stream[0]++; - - num_blocks++; - } - } - } - - /* TODO: Implement 422, 444 */ - //assert(ctx->base.chroma_format == PIPE_VIDEO_CHROMA_FORMAT_420); - - for (tb = 1; tb < 3; ++tb) { - if (mb->coded_block_pattern & const_empty_block_mask_420[tb][0][0]) { - - struct vl_ycbcr_block *stream = buf->ycbcr_stream[tb]; - stream->x = mb->x; - stream->y = mb->y; - stream->intra = intra; - stream->coding = 0; - stream->block_num = buf->block_num++; - - buf->num_ycbcr_blocks[tb]++; - buf->ycbcr_stream[tb]++; - - num_blocks++; - } - } - - memcpy(buf->texels, mb->blocks, 64 * sizeof(short) * num_blocks); - buf->texels += 64 * num_blocks; -} - -static void -vl_mpeg12_destroy_buffer(void *buffer) -{ - struct vl_mpeg12_buffer *buf = buffer; - - assert(buf); - - cleanup_zscan_buffer(buf); - cleanup_idct_buffer(buf); - cleanup_mc_buffer(buf); - vl_vb_cleanup(&buf->vertex_stream); - - FREE(buf); -} - -static void -vl_mpeg12_destroy(struct pipe_video_decoder *decoder) -{ - struct vl_mpeg12_decoder *dec = (struct vl_mpeg12_decoder*)decoder; - unsigned i; - - assert(decoder); - - /* Asserted in softpipe_delete_fs_state() for some reason */ - dec->base.context->bind_vs_state(dec->base.context, NULL); - dec->base.context->bind_fs_state(dec->base.context, NULL); - - dec->base.context->delete_depth_stencil_alpha_state(dec->base.context, dec->dsa); - dec->base.context->delete_sampler_state(dec->base.context, dec->sampler_ycbcr); - - vl_mc_cleanup(&dec->mc_y); - vl_mc_cleanup(&dec->mc_c); - dec->mc_source->destroy(dec->mc_source); - - if (dec->base.entrypoint <= PIPE_VIDEO_ENTRYPOINT_IDCT) { - vl_idct_cleanup(&dec->idct_y); - vl_idct_cleanup(&dec->idct_c); - dec->idct_source->destroy(dec->idct_source); - } - - vl_zscan_cleanup(&dec->zscan_y); - vl_zscan_cleanup(&dec->zscan_c); - - dec->base.context->delete_vertex_elements_state(dec->base.context, dec->ves_ycbcr); - dec->base.context->delete_vertex_elements_state(dec->base.context, dec->ves_mv); - - pipe_resource_reference(&dec->quads.buffer, NULL); - pipe_resource_reference(&dec->pos.buffer, NULL); - - pipe_sampler_view_reference(&dec->zscan_linear, NULL); - pipe_sampler_view_reference(&dec->zscan_normal, NULL); - pipe_sampler_view_reference(&dec->zscan_alternate, NULL); - - for (i = 0; i < 4; ++i) - if (dec->dec_buffers[i]) - vl_mpeg12_destroy_buffer(dec->dec_buffers[i]); - - FREE(dec); -} - -static struct vl_mpeg12_buffer * -vl_mpeg12_get_decode_buffer(struct vl_mpeg12_decoder *dec) -{ - struct vl_mpeg12_buffer *buffer; - - assert(dec); - - buffer = vl_video_buffer_get_associated_data(dec->target, &dec->base); - if (buffer) - return buffer; - - buffer = dec->dec_buffers[dec->current_buffer]; - if (buffer) - return buffer; - - buffer = CALLOC_STRUCT(vl_mpeg12_buffer); - if (buffer == NULL) - return NULL; - - if (!vl_vb_init(&buffer->vertex_stream, dec->base.context, - dec->base.width / MACROBLOCK_WIDTH, - dec->base.height / MACROBLOCK_HEIGHT)) - goto error_vertex_buffer; - - if (!init_mc_buffer(dec, buffer)) - goto error_mc; - - if (dec->base.entrypoint <= PIPE_VIDEO_ENTRYPOINT_IDCT) - if (!init_idct_buffer(dec, buffer)) - goto error_idct; - - if (!init_zscan_buffer(dec, buffer)) - goto error_zscan; - - if (dec->base.entrypoint == PIPE_VIDEO_ENTRYPOINT_BITSTREAM) - vl_mpg12_bs_init(&buffer->bs, &dec->base); - - if (dec->expect_chunked_decode) - vl_video_buffer_set_associated_data(dec->target, &dec->base, - buffer, vl_mpeg12_destroy_buffer); - else - dec->dec_buffers[dec->current_buffer] = buffer; - - return buffer; - -error_zscan: - cleanup_idct_buffer(buffer); - -error_idct: - cleanup_mc_buffer(buffer); - -error_mc: - vl_vb_cleanup(&buffer->vertex_stream); - -error_vertex_buffer: - FREE(buffer); - return NULL; -} - -static void -vl_mpeg12_set_picture_parameters(struct pipe_video_decoder *decoder, - struct pipe_picture_desc *picture) -{ - struct vl_mpeg12_decoder *dec = (struct vl_mpeg12_decoder *)decoder; - struct pipe_mpeg12_picture_desc *pic = (struct pipe_mpeg12_picture_desc *)picture; - - assert(dec && pic); - - dec->picture_desc = *pic; -} - -static void -vl_mpeg12_set_quant_matrix(struct pipe_video_decoder *decoder, - const struct pipe_quant_matrix *matrix) -{ - struct vl_mpeg12_decoder *dec = (struct vl_mpeg12_decoder *)decoder; - const struct pipe_mpeg12_quant_matrix *m = (const struct pipe_mpeg12_quant_matrix *)matrix; - - assert(dec); - assert(matrix->codec == PIPE_VIDEO_CODEC_MPEG12); - - memcpy(dec->intra_matrix, m->intra_matrix, 64); - memcpy(dec->non_intra_matrix, m->non_intra_matrix, 64); -} - -static void -vl_mpeg12_set_decode_target(struct pipe_video_decoder *decoder, - struct pipe_video_buffer *target) -{ - struct vl_mpeg12_decoder *dec = (struct vl_mpeg12_decoder *)decoder; - struct pipe_surface **surfaces; - unsigned i; - - assert(dec); - - dec->target = target; - surfaces = target->get_surfaces(target); - for (i = 0; i < VL_MAX_PLANES; ++i) - pipe_surface_reference(&dec->target_surfaces[i], surfaces[i]); -} - -static void -vl_mpeg12_set_reference_frames(struct pipe_video_decoder *decoder, - struct pipe_video_buffer **ref_frames, - unsigned num_ref_frames) -{ - struct vl_mpeg12_decoder *dec = (struct vl_mpeg12_decoder *)decoder; - struct pipe_sampler_view **sv; - unsigned i,j; - - assert(dec); - assert(num_ref_frames <= VL_MAX_REF_FRAMES); - - for (i = 0; i < num_ref_frames; ++i) { - sv = ref_frames[i]->get_sampler_view_planes(ref_frames[i]); - for (j = 0; j < VL_MAX_PLANES; ++j) - pipe_sampler_view_reference(&dec->ref_frames[i][j], sv[j]); - } - - for (; i < VL_MAX_REF_FRAMES; ++i) - for (j = 0; j < VL_MAX_PLANES; ++j) - pipe_sampler_view_reference(&dec->ref_frames[i][j], NULL); -} - -static void -vl_mpeg12_begin_frame(struct pipe_video_decoder *decoder) -{ - struct vl_mpeg12_decoder *dec = (struct vl_mpeg12_decoder *)decoder; - struct vl_mpeg12_buffer *buf; - - struct pipe_resource *tex; - struct pipe_box rect = { 0, 0, 0, 1, 1, 1 }; - - unsigned i; - - assert(dec && dec->target); - - buf = vl_mpeg12_get_decode_buffer(dec); - assert(buf); - - if (dec->base.entrypoint == PIPE_VIDEO_ENTRYPOINT_BITSTREAM) - dec->intra_matrix[0] = 1 << (7 - dec->picture_desc.intra_dc_precision); - - for (i = 0; i < VL_MAX_PLANES; ++i) { - struct vl_zscan *zscan = i == 0 ? &dec->zscan_y : &dec->zscan_c; - vl_zscan_upload_quant(zscan, &buf->zscan[i], dec->intra_matrix, true); - vl_zscan_upload_quant(zscan, &buf->zscan[i], dec->non_intra_matrix, false); - } - - vl_vb_map(&buf->vertex_stream, dec->base.context); - - tex = buf->zscan_source->texture; - rect.width = tex->width0; - rect.height = tex->height0; - - buf->tex_transfer = dec->base.context->get_transfer - ( - dec->base.context, tex, - 0, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE, - &rect - ); - - buf->block_num = 0; - buf->texels = dec->base.context->transfer_map(dec->base.context, buf->tex_transfer); - - for (i = 0; i < VL_MAX_PLANES; ++i) { - buf->ycbcr_stream[i] = vl_vb_get_ycbcr_stream(&buf->vertex_stream, i); - buf->num_ycbcr_blocks[i] = 0; - } - - for (i = 0; i < VL_MAX_REF_FRAMES; ++i) - buf->mv_stream[i] = vl_vb_get_mv_stream(&buf->vertex_stream, i); - - if (dec->base.entrypoint == PIPE_VIDEO_ENTRYPOINT_BITSTREAM) { - vl_mpg12_bs_set_picture_desc(&buf->bs, &dec->picture_desc); - - } else { - - for (i = 0; i < VL_MAX_PLANES; ++i) - vl_zscan_set_layout(&buf->zscan[i], dec->zscan_linear); - } -} - -static void -vl_mpeg12_decode_macroblock(struct pipe_video_decoder *decoder, - const struct pipe_macroblock *macroblocks, - unsigned num_macroblocks) -{ - struct vl_mpeg12_decoder *dec = (struct vl_mpeg12_decoder *)decoder; - const struct pipe_mpeg12_macroblock *mb = (const struct pipe_mpeg12_macroblock *)macroblocks; - struct vl_mpeg12_buffer *buf; - - unsigned i, j, mv_weights[2]; - - assert(dec && dec->target); - assert(macroblocks && macroblocks->codec == PIPE_VIDEO_CODEC_MPEG12); - - buf = vl_mpeg12_get_decode_buffer(dec); - assert(buf); - - for (; num_macroblocks > 0; --num_macroblocks) { - unsigned mb_addr = mb->y * dec->width_in_macroblocks + mb->x; - - if (mb->macroblock_type & (PIPE_MPEG12_MB_TYPE_PATTERN | PIPE_MPEG12_MB_TYPE_INTRA)) - UploadYcbcrBlocks(dec, buf, mb); - - MacroBlockTypeToPipeWeights(mb, mv_weights); - - for (i = 0; i < 2; ++i) { - if (!dec->ref_frames[i][0]) continue; - - buf->mv_stream[i][mb_addr] = MotionVectorToPipe - ( - mb, i, - i ? PIPE_MPEG12_FS_FIRST_BACKWARD : PIPE_MPEG12_FS_FIRST_FORWARD, - mv_weights[i] - ); - } - - /* see section 7.6.6 of the spec */ - if (mb->num_skipped_macroblocks > 0) { - struct vl_motionvector skipped_mv[2]; - - if (dec->ref_frames[0][0] && !dec->ref_frames[1][0]) { - skipped_mv[0].top.x = skipped_mv[0].top.y = 0; - skipped_mv[0].top.weight = PIPE_VIDEO_MV_WEIGHT_MAX; - } else { - skipped_mv[0] = buf->mv_stream[0][mb_addr]; - skipped_mv[1] = buf->mv_stream[1][mb_addr]; - } - skipped_mv[0].top.field_select = PIPE_VIDEO_FRAME; - skipped_mv[1].top.field_select = PIPE_VIDEO_FRAME; - - skipped_mv[0].bottom = skipped_mv[0].top; - skipped_mv[1].bottom = skipped_mv[1].top; - - ++mb_addr; - for (i = 0; i < mb->num_skipped_macroblocks; ++i, ++mb_addr) { - for (j = 0; j < 2; ++j) { - if (!dec->ref_frames[j][0]) continue; - buf->mv_stream[j][mb_addr] = skipped_mv[j]; - - } - } - } - - ++mb; - } -} - -static void -vl_mpeg12_decode_bitstream(struct pipe_video_decoder *decoder, - unsigned num_buffers, - const void * const *buffers, - const unsigned *sizes) -{ - struct vl_mpeg12_decoder *dec = (struct vl_mpeg12_decoder *)decoder; - struct vl_mpeg12_buffer *buf; - - unsigned i; - - assert(dec && dec->target); - - buf = vl_mpeg12_get_decode_buffer(dec); - assert(buf); - - for (i = 0; i < VL_MAX_PLANES; ++i) - vl_zscan_set_layout(&buf->zscan[i], dec->picture_desc.alternate_scan ? - dec->zscan_alternate : dec->zscan_normal); - - vl_mpg12_bs_decode(&buf->bs, num_buffers, buffers, sizes); -} - -static void -vl_mpeg12_end_frame(struct pipe_video_decoder *decoder) -{ - struct vl_mpeg12_decoder *dec = (struct vl_mpeg12_decoder *)decoder; - struct pipe_sampler_view **mc_source_sv; - struct pipe_vertex_buffer vb[3]; - struct vl_mpeg12_buffer *buf; - - unsigned i, j, component; - unsigned nr_components; - - assert(dec && dec->target); - - buf = vl_mpeg12_get_decode_buffer(dec); - - vl_vb_unmap(&buf->vertex_stream, dec->base.context); - - dec->base.context->transfer_unmap(dec->base.context, buf->tex_transfer); - dec->base.context->transfer_destroy(dec->base.context, buf->tex_transfer); - - vb[0] = dec->quads; - vb[1] = dec->pos; - - dec->base.context->bind_vertex_elements_state(dec->base.context, dec->ves_mv); - for (i = 0; i < VL_MAX_PLANES; ++i) { - if (!dec->target_surfaces[i]) continue; - - vl_mc_set_surface(&buf->mc[i], dec->target_surfaces[i]); - - for (j = 0; j < VL_MAX_REF_FRAMES; ++j) { - if (!dec->ref_frames[j][i]) continue; - - vb[2] = vl_vb_get_mv(&buf->vertex_stream, j);; - dec->base.context->set_vertex_buffers(dec->base.context, 3, vb); - - vl_mc_render_ref(i ? &dec->mc_c : &dec->mc_y, &buf->mc[i], dec->ref_frames[j][i]); - } - } - - dec->base.context->bind_vertex_elements_state(dec->base.context, dec->ves_ycbcr); - for (i = 0; i < VL_MAX_PLANES; ++i) { - if (!buf->num_ycbcr_blocks[i]) continue; - - vb[1] = vl_vb_get_ycbcr(&buf->vertex_stream, i); - dec->base.context->set_vertex_buffers(dec->base.context, 2, vb); - - vl_zscan_render(i ? &dec->zscan_c : & dec->zscan_y, &buf->zscan[i] , buf->num_ycbcr_blocks[i]); - - if (dec->base.entrypoint <= PIPE_VIDEO_ENTRYPOINT_IDCT) - vl_idct_flush(i ? &dec->idct_c : &dec->idct_y, &buf->idct[i], buf->num_ycbcr_blocks[i]); - } - - mc_source_sv = dec->mc_source->get_sampler_view_planes(dec->mc_source); - for (i = 0, component = 0; i < VL_MAX_PLANES; ++i) { - if (!dec->target_surfaces[i]) continue; - - nr_components = util_format_get_nr_components(dec->target_surfaces[i]->texture->format); - for (j = 0; j < nr_components; ++j, ++component) { - if (!buf->num_ycbcr_blocks[i]) continue; - - vb[1] = vl_vb_get_ycbcr(&buf->vertex_stream, component); - dec->base.context->set_vertex_buffers(dec->base.context, 2, vb); - - if (dec->base.entrypoint <= PIPE_VIDEO_ENTRYPOINT_IDCT) - vl_idct_prepare_stage2(i ? &dec->idct_c : &dec->idct_y, &buf->idct[component]); - else { - dec->base.context->set_fragment_sampler_views(dec->base.context, 1, &mc_source_sv[component]); - dec->base.context->bind_fragment_sampler_states(dec->base.context, 1, &dec->sampler_ycbcr); - } - vl_mc_render_ycbcr(i ? &dec->mc_c : &dec->mc_y, &buf->mc[i], j, buf->num_ycbcr_blocks[component]); - } - } - ++dec->current_buffer; - dec->current_buffer %= 4; -} - -static void -vl_mpeg12_flush(struct pipe_video_decoder *decoder) -{ - assert(decoder); - - //Noop, for shaders it is much faster to flush everything in end_frame -} - -static bool -init_pipe_state(struct vl_mpeg12_decoder *dec) -{ - struct pipe_depth_stencil_alpha_state dsa; - struct pipe_sampler_state sampler; - unsigned i; - - assert(dec); - - memset(&dsa, 0, sizeof dsa); - dsa.depth.enabled = 0; - dsa.depth.writemask = 0; - dsa.depth.func = PIPE_FUNC_ALWAYS; - for (i = 0; i < 2; ++i) { - dsa.stencil[i].enabled = 0; - dsa.stencil[i].func = PIPE_FUNC_ALWAYS; - dsa.stencil[i].fail_op = PIPE_STENCIL_OP_KEEP; - dsa.stencil[i].zpass_op = PIPE_STENCIL_OP_KEEP; - dsa.stencil[i].zfail_op = PIPE_STENCIL_OP_KEEP; - dsa.stencil[i].valuemask = 0; - dsa.stencil[i].writemask = 0; - } - dsa.alpha.enabled = 0; - dsa.alpha.func = PIPE_FUNC_ALWAYS; - dsa.alpha.ref_value = 0; - dec->dsa = dec->base.context->create_depth_stencil_alpha_state(dec->base.context, &dsa); - dec->base.context->bind_depth_stencil_alpha_state(dec->base.context, dec->dsa); - - memset(&sampler, 0, sizeof(sampler)); - sampler.wrap_s = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - sampler.wrap_t = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - sampler.wrap_r = PIPE_TEX_WRAP_CLAMP_TO_BORDER; - sampler.min_img_filter = PIPE_TEX_FILTER_NEAREST; - sampler.min_mip_filter = PIPE_TEX_MIPFILTER_NONE; - sampler.mag_img_filter = PIPE_TEX_FILTER_NEAREST; - sampler.compare_mode = PIPE_TEX_COMPARE_NONE; - sampler.compare_func = PIPE_FUNC_ALWAYS; - sampler.normalized_coords = 1; - dec->sampler_ycbcr = dec->base.context->create_sampler_state(dec->base.context, &sampler); - if (!dec->sampler_ycbcr) - return false; - - return true; -} - -static const struct format_config* -find_format_config(struct vl_mpeg12_decoder *dec, const struct format_config configs[], unsigned num_configs) -{ - struct pipe_screen *screen; - unsigned i; - - assert(dec); - - screen = dec->base.context->screen; - - for (i = 0; i < num_configs; ++i) { - if (!screen->is_format_supported(screen, configs[i].zscan_source_format, PIPE_TEXTURE_2D, - 1, PIPE_BIND_SAMPLER_VIEW)) - continue; - - if (configs[i].idct_source_format != PIPE_FORMAT_NONE) { - if (!screen->is_format_supported(screen, configs[i].idct_source_format, PIPE_TEXTURE_2D, - 1, PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET)) - continue; - - if (!screen->is_format_supported(screen, configs[i].mc_source_format, PIPE_TEXTURE_3D, - 1, PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET)) - continue; - } else { - if (!screen->is_format_supported(screen, configs[i].mc_source_format, PIPE_TEXTURE_2D, - 1, PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET)) - continue; - } - return &configs[i]; - } - - return NULL; -} - -static bool -init_zscan(struct vl_mpeg12_decoder *dec, const struct format_config* format_config) -{ - unsigned num_channels; - - assert(dec); - - dec->zscan_source_format = format_config->zscan_source_format; - dec->zscan_linear = vl_zscan_layout(dec->base.context, vl_zscan_linear, dec->blocks_per_line); - dec->zscan_normal = vl_zscan_layout(dec->base.context, vl_zscan_normal, dec->blocks_per_line); - dec->zscan_alternate = vl_zscan_layout(dec->base.context, vl_zscan_alternate, dec->blocks_per_line); - - num_channels = dec->base.entrypoint <= PIPE_VIDEO_ENTRYPOINT_IDCT ? 4 : 1; - - if (!vl_zscan_init(&dec->zscan_y, dec->base.context, dec->base.width, dec->base.height, - dec->blocks_per_line, dec->num_blocks, num_channels)) - return false; - - if (!vl_zscan_init(&dec->zscan_c, dec->base.context, dec->chroma_width, dec->chroma_height, - dec->blocks_per_line, dec->num_blocks, num_channels)) - return false; - - return true; -} - -static bool -init_idct(struct vl_mpeg12_decoder *dec, const struct format_config* format_config) -{ - unsigned nr_of_idct_render_targets, max_inst; - enum pipe_format formats[3]; - - struct pipe_sampler_view *matrix = NULL; - - nr_of_idct_render_targets = dec->base.context->screen->get_param - ( - dec->base.context->screen, PIPE_CAP_MAX_RENDER_TARGETS - ); - - max_inst = dec->base.context->screen->get_shader_param - ( - dec->base.context->screen, PIPE_SHADER_FRAGMENT, PIPE_SHADER_CAP_MAX_INSTRUCTIONS - ); - - // Just assume we need 32 inst per render target, not 100% true, but should work in most cases - if (nr_of_idct_render_targets >= 4 && max_inst >= 32*4) - // more than 4 render targets usually doesn't makes any seens - nr_of_idct_render_targets = 4; - else - nr_of_idct_render_targets = 1; - - formats[0] = formats[1] = formats[2] = format_config->idct_source_format; - dec->idct_source = vl_video_buffer_create_ex - ( - dec->base.context, dec->base.width / 4, dec->base.height, 1, - dec->base.chroma_format, formats, PIPE_USAGE_STATIC - ); - - if (!dec->idct_source) - goto error_idct_source; - - formats[0] = formats[1] = formats[2] = format_config->mc_source_format; - dec->mc_source = vl_video_buffer_create_ex - ( - dec->base.context, dec->base.width / nr_of_idct_render_targets, - dec->base.height / 4, nr_of_idct_render_targets, - dec->base.chroma_format, formats, PIPE_USAGE_STATIC - ); - - if (!dec->mc_source) - goto error_mc_source; - - if (!(matrix = vl_idct_upload_matrix(dec->base.context, format_config->idct_scale))) - goto error_matrix; - - if (!vl_idct_init(&dec->idct_y, dec->base.context, dec->base.width, dec->base.height, - nr_of_idct_render_targets, matrix, matrix)) - goto error_y; - - if(!vl_idct_init(&dec->idct_c, dec->base.context, dec->chroma_width, dec->chroma_height, - nr_of_idct_render_targets, matrix, matrix)) - goto error_c; - - pipe_sampler_view_reference(&matrix, NULL); - - return true; - -error_c: - vl_idct_cleanup(&dec->idct_y); - -error_y: - pipe_sampler_view_reference(&matrix, NULL); - -error_matrix: - dec->mc_source->destroy(dec->mc_source); - -error_mc_source: - dec->idct_source->destroy(dec->idct_source); - -error_idct_source: - return false; -} - -static bool -init_mc_source_widthout_idct(struct vl_mpeg12_decoder *dec, const struct format_config* format_config) -{ - enum pipe_format formats[3]; - - formats[0] = formats[1] = formats[2] = format_config->mc_source_format; - dec->mc_source = vl_video_buffer_create_ex - ( - dec->base.context, dec->base.width, dec->base.height, 1, - dec->base.chroma_format, formats, PIPE_USAGE_STATIC - ); - - return dec->mc_source != NULL; -} - -static void -mc_vert_shader_callback(void *priv, struct vl_mc *mc, - struct ureg_program *shader, - unsigned first_output, - struct ureg_dst tex) -{ - struct vl_mpeg12_decoder *dec = priv; - struct ureg_dst o_vtex; - - assert(priv && mc); - assert(shader); - - if (dec->base.entrypoint <= PIPE_VIDEO_ENTRYPOINT_IDCT) { - struct vl_idct *idct = mc == &dec->mc_y ? &dec->idct_y : &dec->idct_c; - vl_idct_stage2_vert_shader(idct, shader, first_output, tex); - } else { - o_vtex = ureg_DECL_output(shader, TGSI_SEMANTIC_GENERIC, first_output); - ureg_MOV(shader, ureg_writemask(o_vtex, TGSI_WRITEMASK_XY), ureg_src(tex)); - } -} - -static void -mc_frag_shader_callback(void *priv, struct vl_mc *mc, - struct ureg_program *shader, - unsigned first_input, - struct ureg_dst dst) -{ - struct vl_mpeg12_decoder *dec = priv; - struct ureg_src src, sampler; - - assert(priv && mc); - assert(shader); - - if (dec->base.entrypoint <= PIPE_VIDEO_ENTRYPOINT_IDCT) { - struct vl_idct *idct = mc == &dec->mc_y ? &dec->idct_y : &dec->idct_c; - vl_idct_stage2_frag_shader(idct, shader, first_input, dst); - } else { - src = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, first_input, TGSI_INTERPOLATE_LINEAR); - sampler = ureg_DECL_sampler(shader, 0); - ureg_TEX(shader, dst, TGSI_TEXTURE_2D, src, sampler); - } -} - -struct pipe_video_decoder * -vl_create_mpeg12_decoder(struct pipe_context *context, - enum pipe_video_profile profile, - enum pipe_video_entrypoint entrypoint, - enum pipe_video_chroma_format chroma_format, - unsigned width, unsigned height, unsigned max_references, - bool expect_chunked_decode) -{ - const unsigned block_size_pixels = BLOCK_WIDTH * BLOCK_HEIGHT; - const struct format_config *format_config; - struct vl_mpeg12_decoder *dec; - - assert(u_reduce_video_profile(profile) == PIPE_VIDEO_CODEC_MPEG12); - - dec = CALLOC_STRUCT(vl_mpeg12_decoder); - - if (!dec) - return NULL; - - dec->base.context = context; - dec->base.profile = profile; - dec->base.entrypoint = entrypoint; - dec->base.chroma_format = chroma_format; - dec->base.width = width; - dec->base.height = height; - dec->base.max_references = max_references; - - dec->base.destroy = vl_mpeg12_destroy; - dec->base.set_picture_parameters = vl_mpeg12_set_picture_parameters; - dec->base.set_quant_matrix = vl_mpeg12_set_quant_matrix; - dec->base.set_decode_target = vl_mpeg12_set_decode_target; - dec->base.set_reference_frames = vl_mpeg12_set_reference_frames; - dec->base.begin_frame = vl_mpeg12_begin_frame; - dec->base.decode_macroblock = vl_mpeg12_decode_macroblock; - dec->base.decode_bitstream = vl_mpeg12_decode_bitstream; - dec->base.end_frame = vl_mpeg12_end_frame; - dec->base.flush = vl_mpeg12_flush; - - dec->blocks_per_line = MAX2(util_next_power_of_two(dec->base.width) / block_size_pixels, 4); - dec->num_blocks = (dec->base.width * dec->base.height) / block_size_pixels; - dec->width_in_macroblocks = align(dec->base.width, MACROBLOCK_WIDTH) / MACROBLOCK_WIDTH; - dec->expect_chunked_decode = expect_chunked_decode; - - /* TODO: Implement 422, 444 */ - assert(dec->base.chroma_format == PIPE_VIDEO_CHROMA_FORMAT_420); - - if (dec->base.chroma_format == PIPE_VIDEO_CHROMA_FORMAT_420) { - dec->chroma_width = dec->base.width / 2; - dec->chroma_height = dec->base.height / 2; - dec->num_blocks = dec->num_blocks * 2; - } else if (dec->base.chroma_format == PIPE_VIDEO_CHROMA_FORMAT_422) { - dec->chroma_width = dec->base.width; - dec->chroma_height = dec->base.height / 2; - dec->num_blocks = dec->num_blocks * 2 + dec->num_blocks; - } else { - dec->chroma_width = dec->base.width; - dec->chroma_height = dec->base.height; - dec->num_blocks = dec->num_blocks * 3; - } - - dec->quads = vl_vb_upload_quads(dec->base.context); - dec->pos = vl_vb_upload_pos( - dec->base.context, - dec->base.width / MACROBLOCK_WIDTH, - dec->base.height / MACROBLOCK_HEIGHT - ); - - dec->ves_ycbcr = vl_vb_get_ves_ycbcr(dec->base.context); - dec->ves_mv = vl_vb_get_ves_mv(dec->base.context); - - switch (entrypoint) { - case PIPE_VIDEO_ENTRYPOINT_BITSTREAM: - format_config = find_format_config(dec, bitstream_format_config, num_bitstream_format_configs); - break; - - case PIPE_VIDEO_ENTRYPOINT_IDCT: - format_config = find_format_config(dec, idct_format_config, num_idct_format_configs); - break; - - case PIPE_VIDEO_ENTRYPOINT_MC: - format_config = find_format_config(dec, mc_format_config, num_mc_format_configs); - break; - - default: - assert(0); - FREE(dec); - return NULL; - } - - if (!format_config) { - FREE(dec); - return NULL; - } - - if (!init_zscan(dec, format_config)) - goto error_zscan; - - if (entrypoint <= PIPE_VIDEO_ENTRYPOINT_IDCT) { - if (!init_idct(dec, format_config)) - goto error_sources; - } else { - if (!init_mc_source_widthout_idct(dec, format_config)) - goto error_sources; - } - - if (!vl_mc_init(&dec->mc_y, dec->base.context, dec->base.width, dec->base.height, - MACROBLOCK_HEIGHT, format_config->mc_scale, - mc_vert_shader_callback, mc_frag_shader_callback, dec)) - goto error_mc_y; - - // TODO - if (!vl_mc_init(&dec->mc_c, dec->base.context, dec->base.width, dec->base.height, - BLOCK_HEIGHT, format_config->mc_scale, - mc_vert_shader_callback, mc_frag_shader_callback, dec)) - goto error_mc_c; - - if (!init_pipe_state(dec)) - goto error_pipe_state; - - memset(dec->intra_matrix, 0x10, 64); - memset(dec->non_intra_matrix, 0x10, 64); - - return &dec->base; - -error_pipe_state: - vl_mc_cleanup(&dec->mc_c); - -error_mc_c: - vl_mc_cleanup(&dec->mc_y); - -error_mc_y: - if (entrypoint <= PIPE_VIDEO_ENTRYPOINT_IDCT) { - vl_idct_cleanup(&dec->idct_y); - vl_idct_cleanup(&dec->idct_c); - dec->idct_source->destroy(dec->idct_source); - } - dec->mc_source->destroy(dec->mc_source); - -error_sources: - vl_zscan_cleanup(&dec->zscan_y); - vl_zscan_cleanup(&dec->zscan_c); - -error_zscan: - FREE(dec); - return NULL; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_mpeg12_decoder.h b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_mpeg12_decoder.h deleted file mode 100644 index c5dff49cd6d..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_mpeg12_decoder.h +++ /dev/null @@ -1,122 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 Younes Manton. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef vl_mpeg12_decoder_h -#define vl_mpeg12_decoder_h - -#include "pipe/p_video_decoder.h" - -#include "vl_mpeg12_bitstream.h" -#include "vl_zscan.h" -#include "vl_idct.h" -#include "vl_mc.h" - -#include "vl_vertex_buffers.h" -#include "vl_video_buffer.h" - -struct pipe_screen; -struct pipe_context; - -struct vl_mpeg12_decoder -{ - struct pipe_video_decoder base; - - unsigned chroma_width, chroma_height; - - unsigned blocks_per_line; - unsigned num_blocks; - unsigned width_in_macroblocks; - bool expect_chunked_decode; - - enum pipe_format zscan_source_format; - - struct pipe_vertex_buffer quads; - struct pipe_vertex_buffer pos; - - void *ves_ycbcr; - void *ves_mv; - - void *sampler_ycbcr; - - struct pipe_sampler_view *zscan_linear; - struct pipe_sampler_view *zscan_normal; - struct pipe_sampler_view *zscan_alternate; - - struct pipe_video_buffer *idct_source; - struct pipe_video_buffer *mc_source; - - struct vl_zscan zscan_y, zscan_c; - struct vl_idct idct_y, idct_c; - struct vl_mc mc_y, mc_c; - - void *dsa; - - unsigned current_buffer; - struct vl_mpeg12_buffer *dec_buffers[4]; - - struct pipe_mpeg12_picture_desc picture_desc; - uint8_t intra_matrix[64]; - uint8_t non_intra_matrix[64]; - struct pipe_sampler_view *ref_frames[VL_MAX_REF_FRAMES][VL_MAX_PLANES]; - - struct pipe_video_buffer *target; - struct pipe_surface *target_surfaces[VL_MAX_PLANES]; -}; - -struct vl_mpeg12_buffer -{ - struct vl_vertex_buffer vertex_stream; - - unsigned block_num; - unsigned num_ycbcr_blocks[3]; - - struct pipe_sampler_view *zscan_source; - - struct vl_mpg12_bs bs; - struct vl_zscan_buffer zscan[VL_MAX_PLANES]; - struct vl_idct_buffer idct[VL_MAX_PLANES]; - struct vl_mc_buffer mc[VL_MAX_PLANES]; - - struct pipe_transfer *tex_transfer; - short *texels; - - struct vl_ycbcr_block *ycbcr_stream[VL_MAX_PLANES]; - struct vl_motionvector *mv_stream[VL_MAX_REF_FRAMES]; -}; - -/** - * creates a shader based mpeg12 decoder - */ -struct pipe_video_decoder * -vl_create_mpeg12_decoder(struct pipe_context *pipe, - enum pipe_video_profile profile, - enum pipe_video_entrypoint entrypoint, - enum pipe_video_chroma_format chroma_format, - unsigned width, unsigned height, unsigned max_references, - bool expect_chunked_decode); - -#endif /* vl_mpeg12_decoder_h */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_types.h b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_types.h deleted file mode 100644 index 27bb69d67bc..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_types.h +++ /dev/null @@ -1,51 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 Younes Manton. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef vl_types_h -#define vl_types_h - -struct vertex2f -{ - float x, y; -}; - -struct vertex2s -{ - short x, y; -}; - -struct vertex4f -{ - float x, y, z, w; -}; - -struct vertex4s -{ - short x, y, z, w; -}; - -#endif /* vl_types_h */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_vertex_buffers.c b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_vertex_buffers.c deleted file mode 100644 index 96765fc3433..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_vertex_buffers.c +++ /dev/null @@ -1,374 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Christian König - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include -#include "util/u_format.h" -#include "vl_vertex_buffers.h" -#include "vl_types.h" - -/* vertices for a quad covering a block */ -static const struct vertex2f block_quad[4] = { - {0.0f, 0.0f}, {1.0f, 0.0f}, {1.0f, 1.0f}, {0.0f, 1.0f} -}; - -struct pipe_vertex_buffer -vl_vb_upload_quads(struct pipe_context *pipe) -{ - struct pipe_vertex_buffer quad; - struct pipe_transfer *buf_transfer; - struct vertex2f *v; - - unsigned i; - - assert(pipe); - - /* create buffer */ - quad.stride = sizeof(struct vertex2f); - quad.buffer_offset = 0; - quad.buffer = pipe_buffer_create - ( - pipe->screen, - PIPE_BIND_VERTEX_BUFFER, - PIPE_USAGE_STATIC, - sizeof(struct vertex2f) * 4 - ); - - if(!quad.buffer) - return quad; - - /* and fill it */ - v = pipe_buffer_map - ( - pipe, - quad.buffer, - PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE, - &buf_transfer - ); - - for (i = 0; i < 4; ++i, ++v) { - v->x = block_quad[i].x; - v->y = block_quad[i].y; - } - - pipe_buffer_unmap(pipe, buf_transfer); - - return quad; -} - -struct pipe_vertex_buffer -vl_vb_upload_pos(struct pipe_context *pipe, unsigned width, unsigned height) -{ - struct pipe_vertex_buffer pos; - struct pipe_transfer *buf_transfer; - struct vertex2s *v; - - unsigned x, y; - - assert(pipe); - - /* create buffer */ - pos.stride = sizeof(struct vertex2s); - pos.buffer_offset = 0; - pos.buffer = pipe_buffer_create - ( - pipe->screen, - PIPE_BIND_VERTEX_BUFFER, - PIPE_USAGE_STATIC, - sizeof(struct vertex2s) * width * height - ); - - if(!pos.buffer) - return pos; - - /* and fill it */ - v = pipe_buffer_map - ( - pipe, - pos.buffer, - PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE, - &buf_transfer - ); - - for ( y = 0; y < height; ++y) { - for ( x = 0; x < width; ++x, ++v) { - v->x = x; - v->y = y; - } - } - - pipe_buffer_unmap(pipe, buf_transfer); - - return pos; -} - -static struct pipe_vertex_element -vl_vb_get_quad_vertex_element(void) -{ - struct pipe_vertex_element element; - - /* setup rectangle element */ - element.src_offset = 0; - element.instance_divisor = 0; - element.vertex_buffer_index = 0; - element.src_format = PIPE_FORMAT_R32G32_FLOAT; - - return element; -} - -static void -vl_vb_element_helper(struct pipe_vertex_element* elements, unsigned num_elements, - unsigned vertex_buffer_index) -{ - unsigned i, offset = 0; - - assert(elements && num_elements); - - for ( i = 0; i < num_elements; ++i ) { - elements[i].src_offset = offset; - elements[i].instance_divisor = 1; - elements[i].vertex_buffer_index = vertex_buffer_index; - offset += util_format_get_blocksize(elements[i].src_format); - } -} - -void * -vl_vb_get_ves_ycbcr(struct pipe_context *pipe) -{ - struct pipe_vertex_element vertex_elems[NUM_VS_INPUTS]; - - assert(pipe); - - memset(&vertex_elems, 0, sizeof(vertex_elems)); - vertex_elems[VS_I_RECT] = vl_vb_get_quad_vertex_element(); - - /* Position element */ - vertex_elems[VS_I_VPOS].src_format = PIPE_FORMAT_R8G8B8A8_USCALED; - - /* block num element */ - vertex_elems[VS_I_BLOCK_NUM].src_format = PIPE_FORMAT_R32_FLOAT; - - vl_vb_element_helper(&vertex_elems[VS_I_VPOS], 2, 1); - - return pipe->create_vertex_elements_state(pipe, 3, vertex_elems); -} - -void * -vl_vb_get_ves_mv(struct pipe_context *pipe) -{ - struct pipe_vertex_element vertex_elems[NUM_VS_INPUTS]; - - assert(pipe); - - memset(&vertex_elems, 0, sizeof(vertex_elems)); - vertex_elems[VS_I_RECT] = vl_vb_get_quad_vertex_element(); - - /* Position element */ - vertex_elems[VS_I_VPOS].src_format = PIPE_FORMAT_R16G16_SSCALED; - - vl_vb_element_helper(&vertex_elems[VS_I_VPOS], 1, 1); - - /* motion vector TOP element */ - vertex_elems[VS_I_MV_TOP].src_format = PIPE_FORMAT_R16G16B16A16_SSCALED; - - /* motion vector BOTTOM element */ - vertex_elems[VS_I_MV_BOTTOM].src_format = PIPE_FORMAT_R16G16B16A16_SSCALED; - - vl_vb_element_helper(&vertex_elems[VS_I_MV_TOP], 2, 2); - - return pipe->create_vertex_elements_state(pipe, NUM_VS_INPUTS, vertex_elems); -} - -bool -vl_vb_init(struct vl_vertex_buffer *buffer, struct pipe_context *pipe, - unsigned width, unsigned height) -{ - unsigned i, size; - - assert(buffer); - - buffer->width = width; - buffer->height = height; - - size = width * height; - - for (i = 0; i < VL_MAX_PLANES; ++i) { - buffer->ycbcr[i].resource = pipe_buffer_create - ( - pipe->screen, - PIPE_BIND_VERTEX_BUFFER, - PIPE_USAGE_STREAM, - sizeof(struct vl_ycbcr_block) * size * 4 - ); - if (!buffer->ycbcr[i].resource) - goto error_ycbcr; - } - - for (i = 0; i < VL_MAX_REF_FRAMES; ++i) { - buffer->mv[i].resource = pipe_buffer_create - ( - pipe->screen, - PIPE_BIND_VERTEX_BUFFER, - PIPE_USAGE_STREAM, - sizeof(struct vl_motionvector) * size - ); - if (!buffer->mv[i].resource) - goto error_mv; - } - - vl_vb_map(buffer, pipe); - return true; - -error_mv: - for (i = 0; i < VL_MAX_PLANES; ++i) - pipe_resource_reference(&buffer->mv[i].resource, NULL); - -error_ycbcr: - for (i = 0; i < VL_MAX_PLANES; ++i) - pipe_resource_reference(&buffer->ycbcr[i].resource, NULL); - return false; -} - -unsigned -vl_vb_attributes_per_plock(struct vl_vertex_buffer *buffer) -{ - return 1; -} - -struct pipe_vertex_buffer -vl_vb_get_ycbcr(struct vl_vertex_buffer *buffer, int component) -{ - struct pipe_vertex_buffer buf; - - assert(buffer); - - buf.stride = sizeof(struct vl_ycbcr_block); - buf.buffer_offset = 0; - buf.buffer = buffer->ycbcr[component].resource; - - return buf; -} - -struct pipe_vertex_buffer -vl_vb_get_mv(struct vl_vertex_buffer *buffer, int motionvector) -{ - struct pipe_vertex_buffer buf; - - assert(buffer); - - buf.stride = sizeof(struct vl_motionvector); - buf.buffer_offset = 0; - buf.buffer = buffer->mv[motionvector].resource; - - return buf; -} - -void -vl_vb_map(struct vl_vertex_buffer *buffer, struct pipe_context *pipe) -{ - unsigned i; - - assert(buffer && pipe); - - for (i = 0; i < VL_MAX_PLANES; ++i) { - buffer->ycbcr[i].vertex_stream = pipe_buffer_map - ( - pipe, - buffer->ycbcr[i].resource, - PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE, - &buffer->ycbcr[i].transfer - ); - } - - for (i = 0; i < VL_MAX_REF_FRAMES; ++i) { - buffer->mv[i].vertex_stream = pipe_buffer_map - ( - pipe, - buffer->mv[i].resource, - PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE, - &buffer->mv[i].transfer - ); - } - -} - -struct vl_ycbcr_block * -vl_vb_get_ycbcr_stream(struct vl_vertex_buffer *buffer, int component) -{ - assert(buffer); - assert(component < VL_MAX_PLANES); - - return buffer->ycbcr[component].vertex_stream; -} - -unsigned -vl_vb_get_mv_stream_stride(struct vl_vertex_buffer *buffer) -{ - assert(buffer); - - return buffer->width; -} - -struct vl_motionvector * -vl_vb_get_mv_stream(struct vl_vertex_buffer *buffer, int ref_frame) -{ - assert(buffer); - assert(ref_frame < VL_MAX_REF_FRAMES); - - return buffer->mv[ref_frame].vertex_stream; -} - -void -vl_vb_unmap(struct vl_vertex_buffer *buffer, struct pipe_context *pipe) -{ - unsigned i; - - assert(buffer && pipe); - - for (i = 0; i < VL_MAX_PLANES; ++i) { - pipe_buffer_unmap(pipe, buffer->ycbcr[i].transfer); - } - - for (i = 0; i < VL_MAX_REF_FRAMES; ++i) { - pipe_buffer_unmap(pipe, buffer->mv[i].transfer); - } -} - -void -vl_vb_cleanup(struct vl_vertex_buffer *buffer) -{ - unsigned i; - - assert(buffer); - - for (i = 0; i < VL_MAX_PLANES; ++i) { - pipe_resource_reference(&buffer->ycbcr[i].resource, NULL); - } - - for (i = 0; i < VL_MAX_REF_FRAMES; ++i) { - pipe_resource_reference(&buffer->mv[i].resource, NULL); - } -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_vertex_buffers.h b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_vertex_buffers.h deleted file mode 100644 index 0a865996005..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_vertex_buffers.h +++ /dev/null @@ -1,138 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 Christian König - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ -#ifndef vl_vertex_buffers_h -#define vl_vertex_buffers_h - -#include "pipe/p_state.h" -#include "pipe/p_video_state.h" - -#include "vl_defines.h" -#include "vl_types.h" - -/* vertex buffers act as a todo list - * uploading all the usefull informations to video ram - * so a vertex shader can work with them - */ - -/* inputs to the vertex shaders */ -enum VS_INPUT -{ - VS_I_RECT = 0, - VS_I_VPOS = 1, - - VS_I_BLOCK_NUM = 2, - - VS_I_MV_TOP = 2, - VS_I_MV_BOTTOM = 3, - - NUM_VS_INPUTS = 4 -}; - -enum vl_mv_weight -{ - PIPE_VIDEO_MV_WEIGHT_MIN = 0, - PIPE_VIDEO_MV_WEIGHT_HALF = 128, - PIPE_VIDEO_MV_WEIGHT_MAX = 256 -}; - -enum vl_field_select -{ - PIPE_VIDEO_FRAME = 0, - PIPE_VIDEO_TOP_FIELD = 1, - PIPE_VIDEO_BOTTOM_FIELD = 3, - - /* TODO - PIPE_VIDEO_DUALPRIME - PIPE_VIDEO_16x8 - */ -}; - -struct vl_motionvector -{ - struct { - int16_t x, y; - int16_t field_select; /**< enum pipe_video_field_select */ - int16_t weight; /**< enum pipe_video_mv_weight */ - } top, bottom; -}; - -struct vl_ycbcr_block -{ - uint8_t x, y; - uint8_t intra; - uint8_t coding; - float block_num; -}; - -struct vl_vertex_buffer -{ - unsigned width, height; - - struct { - struct pipe_resource *resource; - struct pipe_transfer *transfer; - struct vl_ycbcr_block *vertex_stream; - } ycbcr[VL_MAX_PLANES]; - - struct { - struct pipe_resource *resource; - struct pipe_transfer *transfer; - struct vl_motionvector *vertex_stream; - } mv[VL_MAX_REF_FRAMES]; -}; - -struct pipe_vertex_buffer vl_vb_upload_quads(struct pipe_context *pipe); - -struct pipe_vertex_buffer vl_vb_upload_pos(struct pipe_context *pipe, unsigned width, unsigned height); - -void *vl_vb_get_ves_ycbcr(struct pipe_context *pipe); - -void *vl_vb_get_ves_mv(struct pipe_context *pipe); - -bool vl_vb_init(struct vl_vertex_buffer *buffer, - struct pipe_context *pipe, - unsigned width, unsigned height); - -unsigned vl_vb_attributes_per_plock(struct vl_vertex_buffer *buffer); - -void vl_vb_map(struct vl_vertex_buffer *buffer, struct pipe_context *pipe); - -struct pipe_vertex_buffer vl_vb_get_ycbcr(struct vl_vertex_buffer *buffer, int component); - -struct vl_ycbcr_block *vl_vb_get_ycbcr_stream(struct vl_vertex_buffer *buffer, int component); - -struct pipe_vertex_buffer vl_vb_get_mv(struct vl_vertex_buffer *buffer, int ref_frame); - -unsigned vl_vb_get_mv_stream_stride(struct vl_vertex_buffer *buffer); - -struct vl_motionvector *vl_vb_get_mv_stream(struct vl_vertex_buffer *buffer, int ref_frame); - -void vl_vb_unmap(struct vl_vertex_buffer *buffer, struct pipe_context *pipe); - -void vl_vb_cleanup(struct vl_vertex_buffer *buffer); - -#endif /* vl_vertex_buffers_h */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_video_buffer.c b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_video_buffer.c deleted file mode 100644 index 8ceb7138479..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_video_buffer.c +++ /dev/null @@ -1,369 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Christian König. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include - -#include "pipe/p_screen.h" -#include "pipe/p_context.h" -#include "pipe/p_state.h" - -#include "util/u_format.h" -#include "util/u_inlines.h" -#include "util/u_sampler.h" -#include "util/u_memory.h" - -#include "vl_video_buffer.h" - -const enum pipe_format const_resource_formats_YV12[3] = { - PIPE_FORMAT_R8_UNORM, - PIPE_FORMAT_R8_UNORM, - PIPE_FORMAT_R8_UNORM -}; - -const enum pipe_format const_resource_formats_NV12[3] = { - PIPE_FORMAT_R8_UNORM, - PIPE_FORMAT_R8G8_UNORM, - PIPE_FORMAT_NONE -}; - -const enum pipe_format * -vl_video_buffer_formats(struct pipe_screen *screen, enum pipe_format format) -{ - switch(format) { - case PIPE_FORMAT_YV12: - return const_resource_formats_YV12; - - case PIPE_FORMAT_NV12: - return const_resource_formats_NV12; - - default: - return NULL; - } -} - -boolean -vl_video_buffer_is_format_supported(struct pipe_screen *screen, - enum pipe_format format, - enum pipe_video_profile profile) -{ - const enum pipe_format *resource_formats; - unsigned i; - - resource_formats = vl_video_buffer_formats(screen, format); - if (!resource_formats) - return false; - - for (i = 0; i < VL_MAX_PLANES; ++i) { - if (!resource_formats[i]) - continue; - - if (!screen->is_format_supported(screen, resource_formats[i], PIPE_TEXTURE_2D, 0, PIPE_USAGE_STATIC)) - return false; - } - - return true; -} - -unsigned -vl_video_buffer_max_size(struct pipe_screen *screen) -{ - uint32_t max_2d_texture_level; - - max_2d_texture_level = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS); - - return 1 << (max_2d_texture_level-1); -} - -void -vl_video_buffer_set_associated_data(struct pipe_video_buffer *vbuf, - struct pipe_video_decoder *vdec, - void *associated_data, - void (*destroy_associated_data)(void *)) -{ - vbuf->decoder = vdec; - - if (vbuf->associated_data == associated_data) - return; - - if (vbuf->associated_data) - vbuf->destroy_associated_data(vbuf->associated_data); - - vbuf->associated_data = associated_data; - vbuf->destroy_associated_data = destroy_associated_data; -} - -void * -vl_video_buffer_get_associated_data(struct pipe_video_buffer *vbuf, - struct pipe_video_decoder *vdec) -{ - if (vbuf->decoder == vdec) - return vbuf->associated_data; - else - return NULL; -} - -static void -vl_video_buffer_destroy(struct pipe_video_buffer *buffer) -{ - struct vl_video_buffer *buf = (struct vl_video_buffer *)buffer; - unsigned i; - - assert(buf); - - for (i = 0; i < VL_MAX_PLANES; ++i) { - pipe_surface_reference(&buf->surfaces[i], NULL); - pipe_sampler_view_reference(&buf->sampler_view_planes[i], NULL); - pipe_sampler_view_reference(&buf->sampler_view_components[i], NULL); - pipe_resource_reference(&buf->resources[i], NULL); - } - vl_video_buffer_set_associated_data(buffer, NULL, NULL, NULL); - - FREE(buffer); -} - -static struct pipe_sampler_view ** -vl_video_buffer_sampler_view_planes(struct pipe_video_buffer *buffer) -{ - struct vl_video_buffer *buf = (struct vl_video_buffer *)buffer; - struct pipe_sampler_view sv_templ; - struct pipe_context *pipe; - unsigned i; - - assert(buf); - - pipe = buf->base.context; - - for (i = 0; i < buf->num_planes; ++i ) { - if (!buf->sampler_view_planes[i]) { - memset(&sv_templ, 0, sizeof(sv_templ)); - u_sampler_view_default_template(&sv_templ, buf->resources[i], buf->resources[i]->format); - - if (util_format_get_nr_components(buf->resources[i]->format) == 1) - sv_templ.swizzle_r = sv_templ.swizzle_g = sv_templ.swizzle_b = sv_templ.swizzle_a = PIPE_SWIZZLE_RED; - - buf->sampler_view_planes[i] = pipe->create_sampler_view(pipe, buf->resources[i], &sv_templ); - if (!buf->sampler_view_planes[i]) - goto error; - } - } - - return buf->sampler_view_planes; - -error: - for (i = 0; i < buf->num_planes; ++i ) - pipe_sampler_view_reference(&buf->sampler_view_planes[i], NULL); - - return NULL; -} - -static struct pipe_sampler_view ** -vl_video_buffer_sampler_view_components(struct pipe_video_buffer *buffer) -{ - struct vl_video_buffer *buf = (struct vl_video_buffer *)buffer; - struct pipe_sampler_view sv_templ; - struct pipe_context *pipe; - unsigned i, j, component; - - assert(buf); - - pipe = buf->base.context; - - for (component = 0, i = 0; i < buf->num_planes; ++i ) { - unsigned nr_components = util_format_get_nr_components(buf->resources[i]->format); - - for (j = 0; j < nr_components; ++j, ++component) { - assert(component < VL_MAX_PLANES); - - if (!buf->sampler_view_components[component]) { - memset(&sv_templ, 0, sizeof(sv_templ)); - u_sampler_view_default_template(&sv_templ, buf->resources[i], buf->resources[i]->format); - sv_templ.swizzle_r = sv_templ.swizzle_g = sv_templ.swizzle_b = PIPE_SWIZZLE_RED + j; - sv_templ.swizzle_a = PIPE_SWIZZLE_ONE; - buf->sampler_view_components[component] = pipe->create_sampler_view(pipe, buf->resources[i], &sv_templ); - if (!buf->sampler_view_components[component]) - goto error; - } - } - } - - return buf->sampler_view_components; - -error: - for (i = 0; i < VL_MAX_PLANES; ++i ) - pipe_sampler_view_reference(&buf->sampler_view_components[i], NULL); - - return NULL; -} - -static struct pipe_surface ** -vl_video_buffer_surfaces(struct pipe_video_buffer *buffer) -{ - struct vl_video_buffer *buf = (struct vl_video_buffer *)buffer; - struct pipe_surface surf_templ; - struct pipe_context *pipe; - unsigned i; - - assert(buf); - - pipe = buf->base.context; - - for (i = 0; i < buf->num_planes; ++i ) { - if (!buf->surfaces[i]) { - memset(&surf_templ, 0, sizeof(surf_templ)); - surf_templ.format = buf->resources[i]->format; - surf_templ.usage = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET; - buf->surfaces[i] = pipe->create_surface(pipe, buf->resources[i], &surf_templ); - if (!buf->surfaces[i]) - goto error; - } - } - - return buf->surfaces; - -error: - for (i = 0; i < buf->num_planes; ++i ) - pipe_surface_reference(&buf->surfaces[i], NULL); - - return NULL; -} - -struct pipe_video_buffer * -vl_video_buffer_create(struct pipe_context *pipe, - enum pipe_format buffer_format, - enum pipe_video_chroma_format chroma_format, - unsigned width, unsigned height) -{ - const enum pipe_format *resource_formats; - struct pipe_video_buffer *result; - unsigned buffer_width, buffer_height; - bool pot_buffers; - - assert(pipe); - assert(width > 0 && height > 0); - - pot_buffers = !pipe->screen->get_video_param - ( - pipe->screen, - PIPE_VIDEO_PROFILE_UNKNOWN, - PIPE_VIDEO_CAP_NPOT_TEXTURES - ); - - resource_formats = vl_video_buffer_formats(pipe->screen, buffer_format); - if (!resource_formats) - return NULL; - - buffer_width = pot_buffers ? util_next_power_of_two(width) : align(width, MACROBLOCK_WIDTH); - buffer_height = pot_buffers ? util_next_power_of_two(height) : align(height, MACROBLOCK_HEIGHT); - - result = vl_video_buffer_create_ex - ( - pipe, buffer_width, buffer_height, 1, - chroma_format, resource_formats, PIPE_USAGE_STATIC - ); - if (result) - result->buffer_format = buffer_format; - - return result; -} - -struct pipe_video_buffer * -vl_video_buffer_create_ex(struct pipe_context *pipe, - unsigned width, unsigned height, unsigned depth, - enum pipe_video_chroma_format chroma_format, - const enum pipe_format resource_formats[VL_MAX_PLANES], - unsigned usage) -{ - struct vl_video_buffer *buffer; - struct pipe_resource templ; - unsigned i; - - assert(pipe); - - buffer = CALLOC_STRUCT(vl_video_buffer); - - buffer->base.context = pipe; - buffer->base.destroy = vl_video_buffer_destroy; - buffer->base.get_sampler_view_planes = vl_video_buffer_sampler_view_planes; - buffer->base.get_sampler_view_components = vl_video_buffer_sampler_view_components; - buffer->base.get_surfaces = vl_video_buffer_surfaces; - buffer->base.chroma_format = chroma_format; - buffer->base.width = width; - buffer->base.height = height; - buffer->num_planes = 1; - - memset(&templ, 0, sizeof(templ)); - templ.target = depth > 1 ? PIPE_TEXTURE_3D : PIPE_TEXTURE_2D; - templ.format = resource_formats[0]; - templ.width0 = width; - templ.height0 = height; - templ.depth0 = depth; - templ.array_size = 1; - templ.bind = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET; - templ.usage = usage; - - buffer->resources[0] = pipe->screen->resource_create(pipe->screen, &templ); - if (!buffer->resources[0]) - goto error; - - if (resource_formats[1] == PIPE_FORMAT_NONE) { - assert(chroma_format == PIPE_VIDEO_CHROMA_FORMAT_444); - assert(resource_formats[2] == PIPE_FORMAT_NONE); - return &buffer->base; - } else - buffer->num_planes = 2; - - templ.format = resource_formats[1]; - if (chroma_format == PIPE_VIDEO_CHROMA_FORMAT_420) { - templ.width0 /= 2; - templ.height0 /= 2; - } else if (chroma_format == PIPE_VIDEO_CHROMA_FORMAT_422) { - templ.height0 /= 2; - } - - buffer->resources[1] = pipe->screen->resource_create(pipe->screen, &templ); - if (!buffer->resources[1]) - goto error; - - if (resource_formats[2] == PIPE_FORMAT_NONE) - return &buffer->base; - else - buffer->num_planes = 3; - - templ.format = resource_formats[2]; - buffer->resources[2] = pipe->screen->resource_create(pipe->screen, &templ); - if (!buffer->resources[2]) - goto error; - - return &buffer->base; - -error: - for (i = 0; i < VL_MAX_PLANES; ++i) - pipe_resource_reference(&buffer->resources[i], NULL); - FREE(buffer); - - return NULL; -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_video_buffer.h b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_video_buffer.h deleted file mode 100644 index e096ccdaac2..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_video_buffer.h +++ /dev/null @@ -1,107 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Christian König. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef vl_video_buffer_h -#define vl_video_buffer_h - -#include "pipe/p_context.h" -#include "pipe/p_video_decoder.h" - -#include "vl_defines.h" - -/** - * implementation of a planar ycbcr buffer - */ - -/* planar buffer for vl data upload and manipulation */ -struct vl_video_buffer -{ - struct pipe_video_buffer base; - unsigned num_planes; - struct pipe_resource *resources[VL_MAX_PLANES]; - struct pipe_sampler_view *sampler_view_planes[VL_MAX_PLANES]; - struct pipe_sampler_view *sampler_view_components[VL_MAX_PLANES]; - struct pipe_surface *surfaces[VL_MAX_PLANES]; -}; - -/** - * get subformats for each plane - */ -const enum pipe_format * -vl_video_buffer_formats(struct pipe_screen *screen, enum pipe_format format); - -/** - * get maximum size of video buffers - */ -unsigned -vl_video_buffer_max_size(struct pipe_screen *screen); - -/** - * check if video buffer format is supported for a codec/profile - * can be used as default implementation of screen->is_video_format_supported - */ -boolean -vl_video_buffer_is_format_supported(struct pipe_screen *screen, - enum pipe_format format, - enum pipe_video_profile profile); - -/* - * set the associated data for the given video buffer - */ -void -vl_video_buffer_set_associated_data(struct pipe_video_buffer *vbuf, - struct pipe_video_decoder *vdec, - void *associated_data, - void (*destroy_associated_data)(void *)); - -/* - * get the associated data for the given video buffer - */ -void * -vl_video_buffer_get_associated_data(struct pipe_video_buffer *vbuf, - struct pipe_video_decoder *vdec); - -/** - * creates a video buffer, can be used as a standard implementation for pipe->create_video_buffer - */ -struct pipe_video_buffer * -vl_video_buffer_create(struct pipe_context *pipe, - enum pipe_format buffer_format, - enum pipe_video_chroma_format chroma_format, - unsigned width, unsigned height); - -/** - * extended create function, gets depth, usage and formats for each plane seperately - */ -struct pipe_video_buffer * -vl_video_buffer_create_ex(struct pipe_context *pipe, - unsigned width, unsigned height, unsigned depth, - enum pipe_video_chroma_format chroma_format, - const enum pipe_format resource_formats[VL_MAX_PLANES], - unsigned usage); - -#endif /* vl_video_buffer_h */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_vlc.h b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_vlc.h deleted file mode 100644 index baaa48a0fef..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_vlc.h +++ /dev/null @@ -1,278 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Christian König. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* - * Functions for fast bitwise access to multiple probably unaligned input buffers - */ - -#ifndef vl_vlc_h -#define vl_vlc_h - -#include "pipe/p_compiler.h" - -#include "util/u_math.h" -#include "util/u_pointer.h" -#include "util/u_debug.h" - -struct vl_vlc -{ - uint64_t buffer; - signed invalid_bits; - const uint8_t *data; - const uint8_t *end; - - unsigned num_inputs; - const void *const *inputs; - const unsigned *sizes; - unsigned bytes_left; -}; - -struct vl_vlc_entry -{ - int8_t length; - int8_t value; -}; - -struct vl_vlc_compressed -{ - uint16_t bitcode; - struct vl_vlc_entry entry; -}; - -/** - * initalize and decompress a lookup table - */ -static INLINE void -vl_vlc_init_table(struct vl_vlc_entry *dst, unsigned dst_size, const struct vl_vlc_compressed *src, unsigned src_size) -{ - unsigned i, bits = util_logbase2(dst_size); - - assert(dst && dst_size); - assert(src && src_size); - - for (i=0;i 0; --src_size, ++src) { - for(i=0; i<(1 << (bits - src->entry.length)); ++i) - dst[src->bitcode >> (16 - bits) | i] = src->entry; - } -} - -/** - * switch over to next input buffer - */ -static INLINE void -vl_vlc_next_input(struct vl_vlc *vlc) -{ - const uint8_t* data = vlc->inputs[0]; - unsigned len = vlc->sizes[0]; - - assert(vlc); - assert(vlc->num_inputs); - - vlc->bytes_left -= len; - - /* align the data pointer */ - while (len && pointer_to_uintptr(data) & 3) { - vlc->buffer |= (uint64_t)*data << (24 + vlc->invalid_bits); - ++data; - --len; - vlc->invalid_bits -= 8; - } - vlc->data = data; - vlc->end = data + len; - - --vlc->num_inputs; - ++vlc->inputs; - ++vlc->sizes; -} - -/** - * fill the bit buffer, so that at least 32 bits are valid - */ -static INLINE void -vl_vlc_fillbits(struct vl_vlc *vlc) -{ - assert(vlc); - - /* as long as the buffer needs to be filled */ - while (vlc->invalid_bits > 0) { - unsigned bytes_left = vlc->end - vlc->data; - - /* if this input is depleted */ - if (bytes_left == 0) { - - if (vlc->num_inputs) - /* go on to next input */ - vl_vlc_next_input(vlc); - else - /* or give up since we don't have anymore inputs */ - return; - - } else if (bytes_left >= 4) { - - /* enough bytes in buffer, read in a whole dword */ - uint64_t value = *(const uint32_t*)vlc->data; - -#ifndef PIPE_ARCH_BIG_ENDIAN - value = util_bswap32(value); -#endif - - vlc->buffer |= value << vlc->invalid_bits; - vlc->data += 4; - vlc->invalid_bits -= 32; - - /* buffer is now definitely filled up avoid the loop test */ - break; - - } else while (vlc->data < vlc->end) { - - /* not enough bytes left in buffer, read single bytes */ - vlc->buffer |= (uint64_t)*vlc->data << (24 + vlc->invalid_bits); - ++vlc->data; - vlc->invalid_bits -= 8; - } - } -} - -/** - * initialize vlc structure and start reading from first input buffer - */ -static INLINE void -vl_vlc_init(struct vl_vlc *vlc, unsigned num_inputs, - const void *const *inputs, const unsigned *sizes) -{ - unsigned i; - - assert(vlc); - assert(num_inputs); - - vlc->buffer = 0; - vlc->invalid_bits = 32; - vlc->num_inputs = num_inputs; - vlc->inputs = inputs; - vlc->sizes = sizes; - vlc->bytes_left = 0; - - for (i = 0; i < num_inputs; ++i) - vlc->bytes_left += sizes[i]; - - vl_vlc_next_input(vlc); - vl_vlc_fillbits(vlc); - vl_vlc_fillbits(vlc); -} - -/** - * number of bits still valid in bit buffer - */ -static INLINE unsigned -vl_vlc_valid_bits(struct vl_vlc *vlc) -{ - return 32 - vlc->invalid_bits; -} - -/** - * number of bits left over all inbut buffers - */ -static INLINE unsigned -vl_vlc_bits_left(struct vl_vlc *vlc) -{ - signed bytes_left = vlc->end - vlc->data; - bytes_left += vlc->bytes_left; - return bytes_left * 8 + vl_vlc_valid_bits(vlc); -} - -/** - * get num_bits from bit buffer without removing them - */ -static INLINE unsigned -vl_vlc_peekbits(struct vl_vlc *vlc, unsigned num_bits) -{ - assert(vl_vlc_valid_bits(vlc) >= num_bits || vlc->data >= vlc->end); - return vlc->buffer >> (64 - num_bits); -} - -/** - * remove num_bits from bit buffer - */ -static INLINE void -vl_vlc_eatbits(struct vl_vlc *vlc, unsigned num_bits) -{ - assert(vl_vlc_valid_bits(vlc) >= num_bits); - - vlc->buffer <<= num_bits; - vlc->invalid_bits += num_bits; -} - -/** - * get num_bits from bit buffer with removing them - */ -static INLINE unsigned -vl_vlc_get_uimsbf(struct vl_vlc *vlc, unsigned num_bits) -{ - unsigned value; - - assert(vl_vlc_valid_bits(vlc) >= num_bits); - - value = vlc->buffer >> (64 - num_bits); - vl_vlc_eatbits(vlc, num_bits); - - return value; -} - -/** - * treat num_bits as signed value and remove them from bit buffer - */ -static INLINE signed -vl_vlc_get_simsbf(struct vl_vlc *vlc, unsigned num_bits) -{ - signed value; - - assert(vl_vlc_valid_bits(vlc) >= num_bits); - - value = ((int64_t)vlc->buffer) >> (64 - num_bits); - vl_vlc_eatbits(vlc, num_bits); - - return value; -} - -/** - * lookup a value and length in a decompressed table - */ -static INLINE int8_t -vl_vlc_get_vlclbf(struct vl_vlc *vlc, const struct vl_vlc_entry *tbl, unsigned num_bits) -{ - tbl += vl_vlc_peekbits(vlc, num_bits); - vl_vlc_eatbits(vlc, tbl->length); - assert(tbl->length); - return tbl->value; -} - -#endif /* vl_vlc_h */ diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_zscan.c b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_zscan.c deleted file mode 100644 index 6ff4056a241..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_zscan.c +++ /dev/null @@ -1,605 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Christian König - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include - -#include "pipe/p_screen.h" -#include "pipe/p_context.h" - -#include "util/u_draw.h" -#include "util/u_sampler.h" -#include "util/u_inlines.h" -#include "util/u_memory.h" - -#include "tgsi/tgsi_ureg.h" - -#include "vl_defines.h" -#include "vl_types.h" - -#include "vl_zscan.h" -#include "vl_vertex_buffers.h" - -enum VS_OUTPUT -{ - VS_O_VPOS, - VS_O_VTEX -}; - -const int vl_zscan_linear[] = -{ - /* Linear scan pattern */ - 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9,10,11,12,13,14,15, - 16,17,18,19,20,21,22,23, - 24,25,26,27,28,29,30,31, - 32,33,34,35,36,37,38,39, - 40,41,42,43,44,45,46,47, - 48,49,50,51,52,53,54,55, - 56,57,58,59,60,61,62,63 -}; - -const int vl_zscan_normal[] = -{ - /* Zig-Zag scan pattern */ - 0, 1, 8,16, 9, 2, 3,10, - 17,24,32,25,18,11, 4, 5, - 12,19,26,33,40,48,41,34, - 27,20,13, 6, 7,14,21,28, - 35,42,49,56,57,50,43,36, - 29,22,15,23,30,37,44,51, - 58,59,52,45,38,31,39,46, - 53,60,61,54,47,55,62,63 -}; - -const int vl_zscan_alternate[] = -{ - /* Alternate scan pattern */ - 0, 8,16,24, 1, 9, 2,10, - 17,25,32,40,48,56,57,49, - 41,33,26,18, 3,11, 4,12, - 19,27,34,42,50,58,35,43, - 51,59,20,28, 5,13, 6,14, - 21,29,36,44,52,60,37,45, - 53,61,22,30, 7,15,23,31, - 38,46,54,62,39,47,55,63 -}; - -static void * -create_vert_shader(struct vl_zscan *zscan) -{ - struct ureg_program *shader; - - struct ureg_src scale; - struct ureg_src vrect, vpos, block_num; - - struct ureg_dst tmp; - struct ureg_dst o_vpos; - struct ureg_dst *o_vtex; - - signed i; - - shader = ureg_create(TGSI_PROCESSOR_VERTEX); - if (!shader) - return NULL; - - o_vtex = MALLOC(zscan->num_channels * sizeof(struct ureg_dst)); - - scale = ureg_imm2f(shader, - (float)BLOCK_WIDTH / zscan->buffer_width, - (float)BLOCK_HEIGHT / zscan->buffer_height); - - vrect = ureg_DECL_vs_input(shader, VS_I_RECT); - vpos = ureg_DECL_vs_input(shader, VS_I_VPOS); - block_num = ureg_DECL_vs_input(shader, VS_I_BLOCK_NUM); - - tmp = ureg_DECL_temporary(shader); - - o_vpos = ureg_DECL_output(shader, TGSI_SEMANTIC_POSITION, VS_O_VPOS); - - for (i = 0; i < zscan->num_channels; ++i) - o_vtex[i] = ureg_DECL_output(shader, TGSI_SEMANTIC_GENERIC, VS_O_VTEX + i); - - /* - * o_vpos.xy = (vpos + vrect) * scale - * o_vpos.zw = 1.0f - * - * tmp.xy = InstanceID / blocks_per_line - * tmp.x = frac(tmp.x) - * tmp.y = floor(tmp.y) - * - * o_vtex.x = vrect.x / blocks_per_line + tmp.x - * o_vtex.y = vrect.y - * o_vtex.z = tmp.z * blocks_per_line / blocks_total - */ - ureg_ADD(shader, ureg_writemask(tmp, TGSI_WRITEMASK_XY), vpos, vrect); - ureg_MUL(shader, ureg_writemask(o_vpos, TGSI_WRITEMASK_XY), ureg_src(tmp), scale); - ureg_MOV(shader, ureg_writemask(o_vpos, TGSI_WRITEMASK_ZW), ureg_imm1f(shader, 1.0f)); - - ureg_MUL(shader, ureg_writemask(tmp, TGSI_WRITEMASK_XW), ureg_scalar(block_num, TGSI_SWIZZLE_X), - ureg_imm1f(shader, 1.0f / zscan->blocks_per_line)); - - ureg_FRC(shader, ureg_writemask(tmp, TGSI_WRITEMASK_Y), ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_X)); - ureg_FLR(shader, ureg_writemask(tmp, TGSI_WRITEMASK_W), ureg_src(tmp)); - - for (i = 0; i < zscan->num_channels; ++i) { - ureg_ADD(shader, ureg_writemask(tmp, TGSI_WRITEMASK_X), ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_Y), - ureg_imm1f(shader, 1.0f / (zscan->blocks_per_line * BLOCK_WIDTH) * (i - (signed)zscan->num_channels / 2))); - - ureg_MAD(shader, ureg_writemask(o_vtex[i], TGSI_WRITEMASK_X), vrect, - ureg_imm1f(shader, 1.0f / zscan->blocks_per_line), ureg_src(tmp)); - ureg_MOV(shader, ureg_writemask(o_vtex[i], TGSI_WRITEMASK_Y), vrect); - ureg_MOV(shader, ureg_writemask(o_vtex[i], TGSI_WRITEMASK_Z), vpos); - ureg_MUL(shader, ureg_writemask(o_vtex[i], TGSI_WRITEMASK_W), ureg_src(tmp), - ureg_imm1f(shader, (float)zscan->blocks_per_line / zscan->blocks_total)); - } - - ureg_release_temporary(shader, tmp); - ureg_END(shader); - - FREE(o_vtex); - - return ureg_create_shader_and_destroy(shader, zscan->pipe); -} - -static void * -create_frag_shader(struct vl_zscan *zscan) -{ - struct ureg_program *shader; - struct ureg_src *vtex; - - struct ureg_src samp_src, samp_scan, samp_quant; - - struct ureg_dst *tmp; - struct ureg_dst quant, fragment; - - unsigned i; - - shader = ureg_create(TGSI_PROCESSOR_FRAGMENT); - if (!shader) - return NULL; - - vtex = MALLOC(zscan->num_channels * sizeof(struct ureg_src)); - tmp = MALLOC(zscan->num_channels * sizeof(struct ureg_dst)); - - for (i = 0; i < zscan->num_channels; ++i) - vtex[i] = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, VS_O_VTEX + i, TGSI_INTERPOLATE_LINEAR); - - samp_src = ureg_DECL_sampler(shader, 0); - samp_scan = ureg_DECL_sampler(shader, 1); - samp_quant = ureg_DECL_sampler(shader, 2); - - for (i = 0; i < zscan->num_channels; ++i) - tmp[i] = ureg_DECL_temporary(shader); - quant = ureg_DECL_temporary(shader); - - fragment = ureg_DECL_output(shader, TGSI_SEMANTIC_COLOR, 0); - - /* - * tmp.x = tex(vtex, 1) - * tmp.y = vtex.z - * fragment = tex(tmp, 0) * quant - */ - for (i = 0; i < zscan->num_channels; ++i) - ureg_TEX(shader, ureg_writemask(tmp[i], TGSI_WRITEMASK_X), TGSI_TEXTURE_2D, vtex[i], samp_scan); - - for (i = 0; i < zscan->num_channels; ++i) - ureg_MOV(shader, ureg_writemask(tmp[i], TGSI_WRITEMASK_Y), ureg_scalar(vtex[i], TGSI_SWIZZLE_W)); - - for (i = 0; i < zscan->num_channels; ++i) { - ureg_TEX(shader, ureg_writemask(tmp[0], TGSI_WRITEMASK_X << i), TGSI_TEXTURE_2D, ureg_src(tmp[i]), samp_src); - ureg_TEX(shader, ureg_writemask(quant, TGSI_WRITEMASK_X << i), TGSI_TEXTURE_3D, vtex[i], samp_quant); - } - - ureg_MUL(shader, quant, ureg_src(quant), ureg_imm1f(shader, 16.0f)); - ureg_MUL(shader, fragment, ureg_src(tmp[0]), ureg_src(quant)); - - for (i = 0; i < zscan->num_channels; ++i) - ureg_release_temporary(shader, tmp[i]); - ureg_END(shader); - - FREE(vtex); - FREE(tmp); - - return ureg_create_shader_and_destroy(shader, zscan->pipe); -} - -static bool -init_shaders(struct vl_zscan *zscan) -{ - assert(zscan); - - zscan->vs = create_vert_shader(zscan); - if (!zscan->vs) - goto error_vs; - - zscan->fs = create_frag_shader(zscan); - if (!zscan->fs) - goto error_fs; - - return true; - -error_fs: - zscan->pipe->delete_vs_state(zscan->pipe, zscan->vs); - -error_vs: - return false; -} - -static void -cleanup_shaders(struct vl_zscan *zscan) -{ - assert(zscan); - - zscan->pipe->delete_vs_state(zscan->pipe, zscan->vs); - zscan->pipe->delete_fs_state(zscan->pipe, zscan->fs); -} - -static bool -init_state(struct vl_zscan *zscan) -{ - struct pipe_blend_state blend; - struct pipe_rasterizer_state rs_state; - struct pipe_sampler_state sampler; - unsigned i; - - assert(zscan); - - memset(&rs_state, 0, sizeof(rs_state)); - rs_state.gl_rasterization_rules = true; - rs_state.depth_clip = 1; - zscan->rs_state = zscan->pipe->create_rasterizer_state(zscan->pipe, &rs_state); - if (!zscan->rs_state) - goto error_rs_state; - - memset(&blend, 0, sizeof blend); - - blend.independent_blend_enable = 0; - blend.rt[0].blend_enable = 0; - blend.rt[0].rgb_func = PIPE_BLEND_ADD; - blend.rt[0].rgb_src_factor = PIPE_BLENDFACTOR_ONE; - blend.rt[0].rgb_dst_factor = PIPE_BLENDFACTOR_ONE; - blend.rt[0].alpha_func = PIPE_BLEND_ADD; - blend.rt[0].alpha_src_factor = PIPE_BLENDFACTOR_ONE; - blend.rt[0].alpha_dst_factor = PIPE_BLENDFACTOR_ONE; - blend.logicop_enable = 0; - blend.logicop_func = PIPE_LOGICOP_CLEAR; - /* Needed to allow color writes to FB, even if blending disabled */ - blend.rt[0].colormask = PIPE_MASK_RGBA; - blend.dither = 0; - zscan->blend = zscan->pipe->create_blend_state(zscan->pipe, &blend); - if (!zscan->blend) - goto error_blend; - - for (i = 0; i < 3; ++i) { - memset(&sampler, 0, sizeof(sampler)); - sampler.wrap_s = PIPE_TEX_WRAP_REPEAT; - sampler.wrap_t = PIPE_TEX_WRAP_REPEAT; - sampler.wrap_r = PIPE_TEX_WRAP_CLAMP_TO_EDGE; - sampler.min_img_filter = PIPE_TEX_FILTER_NEAREST; - sampler.min_mip_filter = PIPE_TEX_MIPFILTER_NONE; - sampler.mag_img_filter = PIPE_TEX_FILTER_NEAREST; - sampler.compare_mode = PIPE_TEX_COMPARE_NONE; - sampler.compare_func = PIPE_FUNC_ALWAYS; - sampler.normalized_coords = 1; - zscan->samplers[i] = zscan->pipe->create_sampler_state(zscan->pipe, &sampler); - if (!zscan->samplers[i]) - goto error_samplers; - } - - return true; - -error_samplers: - for (i = 0; i < 2; ++i) - if (zscan->samplers[i]) - zscan->pipe->delete_sampler_state(zscan->pipe, zscan->samplers[i]); - - zscan->pipe->delete_rasterizer_state(zscan->pipe, zscan->rs_state); - -error_blend: - zscan->pipe->delete_blend_state(zscan->pipe, zscan->blend); - -error_rs_state: - return false; -} - -static void -cleanup_state(struct vl_zscan *zscan) -{ - unsigned i; - - assert(zscan); - - for (i = 0; i < 3; ++i) - zscan->pipe->delete_sampler_state(zscan->pipe, zscan->samplers[i]); - - zscan->pipe->delete_rasterizer_state(zscan->pipe, zscan->rs_state); - zscan->pipe->delete_blend_state(zscan->pipe, zscan->blend); -} - -struct pipe_sampler_view * -vl_zscan_layout(struct pipe_context *pipe, const int layout[64], unsigned blocks_per_line) -{ - const unsigned total_size = blocks_per_line * BLOCK_WIDTH * BLOCK_HEIGHT; - - int patched_layout[64]; - - struct pipe_resource res_tmpl, *res; - struct pipe_sampler_view sv_tmpl, *sv; - struct pipe_transfer *buf_transfer; - unsigned x, y, i, pitch; - float *f; - - struct pipe_box rect = - { - 0, 0, 0, - BLOCK_WIDTH * blocks_per_line, - BLOCK_HEIGHT, - 1 - }; - - assert(pipe && layout && blocks_per_line); - - for (i = 0; i < 64; ++i) - patched_layout[layout[i]] = i; - - memset(&res_tmpl, 0, sizeof(res_tmpl)); - res_tmpl.target = PIPE_TEXTURE_2D; - res_tmpl.format = PIPE_FORMAT_R32_FLOAT; - res_tmpl.width0 = BLOCK_WIDTH * blocks_per_line; - res_tmpl.height0 = BLOCK_HEIGHT; - res_tmpl.depth0 = 1; - res_tmpl.array_size = 1; - res_tmpl.usage = PIPE_USAGE_IMMUTABLE; - res_tmpl.bind = PIPE_BIND_SAMPLER_VIEW; - - res = pipe->screen->resource_create(pipe->screen, &res_tmpl); - if (!res) - goto error_resource; - - buf_transfer = pipe->get_transfer - ( - pipe, res, - 0, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE, - &rect - ); - if (!buf_transfer) - goto error_transfer; - - pitch = buf_transfer->stride / sizeof(float); - - f = pipe->transfer_map(pipe, buf_transfer); - if (!f) - goto error_map; - - for (i = 0; i < blocks_per_line; ++i) - for (y = 0; y < BLOCK_HEIGHT; ++y) - for (x = 0; x < BLOCK_WIDTH; ++x) { - float addr = patched_layout[x + y * BLOCK_WIDTH] + - i * BLOCK_WIDTH * BLOCK_HEIGHT; - - addr /= total_size; - - f[i * BLOCK_WIDTH + y * pitch + x] = addr; - } - - pipe->transfer_unmap(pipe, buf_transfer); - pipe->transfer_destroy(pipe, buf_transfer); - - memset(&sv_tmpl, 0, sizeof(sv_tmpl)); - u_sampler_view_default_template(&sv_tmpl, res, res->format); - sv = pipe->create_sampler_view(pipe, res, &sv_tmpl); - pipe_resource_reference(&res, NULL); - if (!sv) - goto error_map; - - return sv; - -error_map: - pipe->transfer_destroy(pipe, buf_transfer); - -error_transfer: - pipe_resource_reference(&res, NULL); - -error_resource: - return NULL; -} - -bool -vl_zscan_init(struct vl_zscan *zscan, struct pipe_context *pipe, - unsigned buffer_width, unsigned buffer_height, - unsigned blocks_per_line, unsigned blocks_total, - unsigned num_channels) -{ - assert(zscan && pipe); - - zscan->pipe = pipe; - zscan->buffer_width = buffer_width; - zscan->buffer_height = buffer_height; - zscan->num_channels = num_channels; - zscan->blocks_per_line = blocks_per_line; - zscan->blocks_total = blocks_total; - - if(!init_shaders(zscan)) - return false; - - if(!init_state(zscan)) { - cleanup_shaders(zscan); - return false; - } - - return true; -} - -void -vl_zscan_cleanup(struct vl_zscan *zscan) -{ - assert(zscan); - - cleanup_shaders(zscan); - cleanup_state(zscan); -} - -bool -vl_zscan_init_buffer(struct vl_zscan *zscan, struct vl_zscan_buffer *buffer, - struct pipe_sampler_view *src, struct pipe_surface *dst) -{ - struct pipe_resource res_tmpl, *res; - struct pipe_sampler_view sv_tmpl; - - assert(zscan && buffer); - - memset(buffer, 0, sizeof(struct vl_zscan_buffer)); - - pipe_sampler_view_reference(&buffer->src, src); - - buffer->viewport.scale[0] = dst->width; - buffer->viewport.scale[1] = dst->height; - buffer->viewport.scale[2] = 1; - buffer->viewport.scale[3] = 1; - buffer->viewport.translate[0] = 0; - buffer->viewport.translate[1] = 0; - buffer->viewport.translate[2] = 0; - buffer->viewport.translate[3] = 0; - - buffer->fb_state.width = dst->width; - buffer->fb_state.height = dst->height; - buffer->fb_state.nr_cbufs = 1; - pipe_surface_reference(&buffer->fb_state.cbufs[0], dst); - - memset(&res_tmpl, 0, sizeof(res_tmpl)); - res_tmpl.target = PIPE_TEXTURE_3D; - res_tmpl.format = PIPE_FORMAT_R8_UNORM; - res_tmpl.width0 = BLOCK_WIDTH * zscan->blocks_per_line; - res_tmpl.height0 = BLOCK_HEIGHT; - res_tmpl.depth0 = 2; - res_tmpl.array_size = 1; - res_tmpl.usage = PIPE_USAGE_IMMUTABLE; - res_tmpl.bind = PIPE_BIND_SAMPLER_VIEW; - - res = zscan->pipe->screen->resource_create(zscan->pipe->screen, &res_tmpl); - if (!res) - return false; - - memset(&sv_tmpl, 0, sizeof(sv_tmpl)); - u_sampler_view_default_template(&sv_tmpl, res, res->format); - sv_tmpl.swizzle_r = sv_tmpl.swizzle_g = sv_tmpl.swizzle_b = sv_tmpl.swizzle_a = TGSI_SWIZZLE_X; - buffer->quant = zscan->pipe->create_sampler_view(zscan->pipe, res, &sv_tmpl); - pipe_resource_reference(&res, NULL); - if (!buffer->quant) - return false; - - return true; -} - -void -vl_zscan_cleanup_buffer(struct vl_zscan_buffer *buffer) -{ - assert(buffer); - - pipe_sampler_view_reference(&buffer->src, NULL); - pipe_sampler_view_reference(&buffer->layout, NULL); - pipe_sampler_view_reference(&buffer->quant, NULL); - pipe_surface_reference(&buffer->fb_state.cbufs[0], NULL); -} - -void -vl_zscan_set_layout(struct vl_zscan_buffer *buffer, struct pipe_sampler_view *layout) -{ - assert(buffer); - assert(layout); - - pipe_sampler_view_reference(&buffer->layout, layout); -} - -void -vl_zscan_upload_quant(struct vl_zscan *zscan, struct vl_zscan_buffer *buffer, - const uint8_t matrix[64], bool intra) -{ - struct pipe_context *pipe; - struct pipe_transfer *buf_transfer; - unsigned x, y, i, pitch; - uint8_t *data; - - struct pipe_box rect = - { - 0, 0, intra ? 1 : 0, - BLOCK_WIDTH, - BLOCK_HEIGHT, - 1 - }; - - assert(buffer); - assert(matrix); - - pipe = zscan->pipe; - - rect.width *= zscan->blocks_per_line; - - buf_transfer = pipe->get_transfer - ( - pipe, buffer->quant->texture, - 0, PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD_RANGE, - &rect - ); - if (!buf_transfer) - goto error_transfer; - - pitch = buf_transfer->stride; - - data = pipe->transfer_map(pipe, buf_transfer); - if (!data) - goto error_map; - - for (i = 0; i < zscan->blocks_per_line; ++i) - for (y = 0; y < BLOCK_HEIGHT; ++y) - for (x = 0; x < BLOCK_WIDTH; ++x) - data[i * BLOCK_WIDTH + y * pitch + x] = matrix[x + y * BLOCK_WIDTH]; - - pipe->transfer_unmap(pipe, buf_transfer); - -error_map: - pipe->transfer_destroy(pipe, buf_transfer); - -error_transfer: - return; -} - -void -vl_zscan_render(struct vl_zscan *zscan, struct vl_zscan_buffer *buffer, unsigned num_instances) -{ - assert(buffer); - - zscan->pipe->bind_rasterizer_state(zscan->pipe, zscan->rs_state); - zscan->pipe->bind_blend_state(zscan->pipe, zscan->blend); - zscan->pipe->bind_fragment_sampler_states(zscan->pipe, 3, zscan->samplers); - zscan->pipe->set_framebuffer_state(zscan->pipe, &buffer->fb_state); - zscan->pipe->set_viewport_state(zscan->pipe, &buffer->viewport); - zscan->pipe->set_fragment_sampler_views(zscan->pipe, 3, &buffer->src); - zscan->pipe->bind_vs_state(zscan->pipe, zscan->vs); - zscan->pipe->bind_fs_state(zscan->pipe, zscan->fs); - util_draw_arrays_instanced(zscan->pipe, PIPE_PRIM_QUADS, 0, 4, 0, num_instances); -} diff --git a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_zscan.h b/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_zscan.h deleted file mode 100644 index 27411f21d52..00000000000 --- a/dll/opengl/mesa/src/gallium/auxiliary/vl/vl_zscan.h +++ /dev/null @@ -1,100 +0,0 @@ -/************************************************************************** - * - * Copyright 2011 Christian König - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef vl_zscan_h -#define vl_zscan_h - -#include "pipe/p_compiler.h" -#include "pipe/p_state.h" - -/* - * shader based zscan and quantification - * expect usage of vl_vertex_buffers as a todo list - */ -struct vl_zscan -{ - struct pipe_context *pipe; - - unsigned buffer_width; - unsigned buffer_height; - - unsigned num_channels; - - unsigned blocks_per_line; - unsigned blocks_total; - - void *rs_state; - void *blend; - - void *samplers[3]; - - void *vs, *fs; -}; - -struct vl_zscan_buffer -{ - struct pipe_viewport_state viewport; - struct pipe_framebuffer_state fb_state; - - struct pipe_sampler_view *src, *layout, *quant; - struct pipe_surface *dst; -}; - -extern const int vl_zscan_linear[]; -extern const int vl_zscan_normal[]; -extern const int vl_zscan_alternate[]; - -struct pipe_sampler_view * -vl_zscan_layout(struct pipe_context *pipe, const int layout[64], unsigned blocks_per_line); - -bool -vl_zscan_init(struct vl_zscan *zscan, struct pipe_context *pipe, - unsigned buffer_width, unsigned buffer_height, - unsigned blocks_per_line, unsigned blocks_total, - unsigned num_channels); - -void -vl_zscan_cleanup(struct vl_zscan *zscan); - -bool -vl_zscan_init_buffer(struct vl_zscan *zscan, struct vl_zscan_buffer *buffer, - struct pipe_sampler_view *src, struct pipe_surface *dst); - -void -vl_zscan_cleanup_buffer(struct vl_zscan_buffer *buffer); - -void -vl_zscan_set_layout(struct vl_zscan_buffer *buffer, struct pipe_sampler_view *layout); - -void -vl_zscan_upload_quant(struct vl_zscan *zscan, struct vl_zscan_buffer *buffer, - const uint8_t matrix[64], bool intra); - -void -vl_zscan_render(struct vl_zscan *zscan, struct vl_zscan_buffer *buffer, unsigned num_instances); - -#endif diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/Android.mk b/dll/opengl/mesa/src/gallium/drivers/softpipe/Android.mk deleted file mode 100644 index 6a125a5d412..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/Android.mk +++ /dev/null @@ -1,66 +0,0 @@ -# Mesa 3-D graphics library -# -# Copyright (C) 2010-2011 Chia-I Wu -# Copyright (C) 2010-2011 LunarG Inc. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. - -LOCAL_PATH := $(call my-dir) - -# from Makefile -C_SOURCES = \ - sp_fs_exec.c \ - sp_clear.c \ - sp_fence.c \ - sp_flush.c \ - sp_query.c \ - sp_context.c \ - sp_draw_arrays.c \ - sp_prim_vbuf.c \ - sp_quad_pipe.c \ - sp_quad_stipple.c \ - sp_quad_depth_test.c \ - sp_quad_fs.c \ - sp_quad_blend.c \ - sp_screen.c \ - sp_setup.c \ - sp_state_blend.c \ - sp_state_clip.c \ - sp_state_derived.c \ - sp_state_sampler.c \ - sp_state_shader.c \ - sp_state_so.c \ - sp_state_rasterizer.c \ - sp_state_surface.c \ - sp_state_vertex.c \ - sp_texture.c \ - sp_tex_sample.c \ - sp_tex_tile_cache.c \ - sp_tile_cache.c \ - sp_surface.c - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - $(C_SOURCES) - -LOCAL_MODULE := libmesa_pipe_softpipe - -include $(GALLIUM_COMMON_MK) -include $(BUILD_STATIC_LIBRARY) diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/CMakeLists.txt b/dll/opengl/mesa/src/gallium/drivers/softpipe/CMakeLists.txt deleted file mode 100644 index 48b16d39c5f..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ - -add_library(gallium_softpipe STATIC EXCLUDE_FROM_ALL - sp_fs_exec.c - sp_clear.c - sp_context.c - sp_draw_arrays.c - sp_fence.c - sp_flush.c - sp_prim_vbuf.c - sp_setup.c - sp_quad_blend.c - sp_quad_pipe.c - sp_quad_depth_test.c - sp_quad_fs.c - sp_quad_stipple.c - sp_query.c - sp_screen.c - sp_state_blend.c - sp_state_clip.c - sp_state_derived.c - sp_state_rasterizer.c - sp_state_sampler.c - sp_state_shader.c - sp_state_so.c - sp_state_surface.c - sp_state_vertex.c - sp_surface.c - sp_tex_sample.c - sp_tex_tile_cache.c - sp_texture.c - sp_tile_cache.c) diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/Makefile b/dll/opengl/mesa/src/gallium/drivers/softpipe/Makefile deleted file mode 100644 index 27b5d991a75..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -TOP = ../../../.. -include $(TOP)/configs/current - -LIBNAME = softpipe - -C_SOURCES = \ - sp_fs_exec.c \ - sp_clear.c \ - sp_fence.c \ - sp_flush.c \ - sp_query.c \ - sp_context.c \ - sp_draw_arrays.c \ - sp_prim_vbuf.c \ - sp_quad_pipe.c \ - sp_quad_stipple.c \ - sp_quad_depth_test.c \ - sp_quad_fs.c \ - sp_quad_blend.c \ - sp_screen.c \ - sp_setup.c \ - sp_state_blend.c \ - sp_state_clip.c \ - sp_state_derived.c \ - sp_state_sampler.c \ - sp_state_shader.c \ - sp_state_so.c \ - sp_state_rasterizer.c \ - sp_state_surface.c \ - sp_state_vertex.c \ - sp_texture.c \ - sp_tex_sample.c \ - sp_tex_tile_cache.c \ - sp_tile_cache.c \ - sp_surface.c - -include ../../Makefile.template diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/SConscript b/dll/opengl/mesa/src/gallium/drivers/softpipe/SConscript deleted file mode 100644 index da2c93ee5fa..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/SConscript +++ /dev/null @@ -1,41 +0,0 @@ -Import('*') - -env = env.Clone() - -softpipe = env.ConvenienceLibrary( - target = 'softpipe', - source = [ - 'sp_fs_exec.c', - 'sp_clear.c', - 'sp_context.c', - 'sp_draw_arrays.c', - 'sp_fence.c', - 'sp_flush.c', - 'sp_prim_vbuf.c', - 'sp_setup.c', - 'sp_quad_blend.c', - 'sp_quad_pipe.c', - 'sp_quad_depth_test.c', - 'sp_quad_fs.c', - 'sp_quad_stipple.c', - 'sp_query.c', - 'sp_screen.c', - 'sp_state_blend.c', - 'sp_state_clip.c', - 'sp_state_derived.c', - 'sp_state_rasterizer.c', - 'sp_state_sampler.c', - 'sp_state_shader.c', - 'sp_state_so.c', - 'sp_state_surface.c', - 'sp_state_vertex.c', - 'sp_surface.c', - 'sp_tex_sample.c', - 'sp_tex_tile_cache.c', - 'sp_texture.c', - 'sp_tile_cache.c', - ]) - -env.Alias('softpipe', softpipe) - -Export('softpipe') diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_clear.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_clear.c deleted file mode 100644 index dd6bd833e61..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_clear.c +++ /dev/null @@ -1,81 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * Copyright 2009 VMware, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Author: - * Brian Paul - * Michel Dänzer - */ - - -#include "pipe/p_defines.h" -#include "util/u_pack_color.h" -#include "sp_clear.h" -#include "sp_context.h" -#include "sp_query.h" -#include "sp_tile_cache.h" - - -/** - * Clear the given buffers to the specified values. - * No masking, no scissor (clear entire buffer). - */ -void -softpipe_clear(struct pipe_context *pipe, unsigned buffers, - const union pipe_color_union *color, - double depth, unsigned stencil) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - uint64_t cv; - uint i; - - if (softpipe->no_rast) - return; - - if (!softpipe_check_render_cond(softpipe)) - return; - -#if 0 - softpipe_update_derived(softpipe, PIPE_PRIM_TRIANGLES); /* not needed?? */ -#endif - - if (buffers & PIPE_CLEAR_COLOR) { - for (i = 0; i < softpipe->framebuffer.nr_cbufs; i++) { - sp_tile_cache_clear(softpipe->cbuf_cache[i], color, 0); - } - } - - if (buffers & PIPE_CLEAR_DEPTHSTENCIL) { - static const union pipe_color_union zero; - struct pipe_surface *ps = softpipe->framebuffer.zsbuf; - - cv = util_pack64_z_stencil(ps->format, depth, stencil); - sp_tile_cache_clear(softpipe->zsbuf_cache, &zero, cv); - } - - softpipe->dirty_render_cache = TRUE; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_clear.h b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_clear.h deleted file mode 100644 index 6dd7d132fe8..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_clear.h +++ /dev/null @@ -1,43 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Author: - * Brian Paul - */ - -#ifndef SP_CLEAR_H -#define SP_CLEAR_H - -struct pipe_context; - -extern void -softpipe_clear(struct pipe_context *pipe, unsigned buffers, - const union pipe_color_union *color, - double depth, unsigned stencil); - - -#endif /* SP_CLEAR_H */ diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_context.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_context.c deleted file mode 100644 index 1fb0a79f207..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_context.c +++ /dev/null @@ -1,365 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * Copyright 2008 VMware, Inc. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Author: - * Keith Whitwell - */ - -#include "draw/draw_context.h" -#include "draw/draw_vbuf.h" -#include "pipe/p_defines.h" -#include "util/u_math.h" -#include "util/u_memory.h" -#include "util/u_pstipple.h" -#include "util/u_inlines.h" -#include "tgsi/tgsi_exec.h" -#include "vl/vl_decoder.h" -#include "vl/vl_video_buffer.h" -#include "sp_clear.h" -#include "sp_context.h" -#include "sp_flush.h" -#include "sp_prim_vbuf.h" -#include "sp_state.h" -#include "sp_surface.h" -#include "sp_tile_cache.h" -#include "sp_tex_tile_cache.h" -#include "sp_texture.h" -#include "sp_query.h" -#include "sp_screen.h" - - -/** - * Map any drawing surfaces which aren't already mapped - */ -void -softpipe_map_transfers(struct softpipe_context *sp) -{ - unsigned i; - - for (i = 0; i < sp->framebuffer.nr_cbufs; i++) { - sp_tile_cache_map_transfers(sp->cbuf_cache[i]); - } - - sp_tile_cache_map_transfers(sp->zsbuf_cache); -} - - -/** - * Unmap any mapped drawing surfaces - */ -void -softpipe_unmap_transfers(struct softpipe_context *sp) -{ - uint i; - - for (i = 0; i < sp->framebuffer.nr_cbufs; i++) { - sp_tile_cache_unmap_transfers(sp->cbuf_cache[i]); - } - - sp_tile_cache_unmap_transfers(sp->zsbuf_cache); -} - - -static void -softpipe_destroy( struct pipe_context *pipe ) -{ - struct softpipe_context *softpipe = softpipe_context( pipe ); - uint i; - -#if DO_PSTIPPLE_IN_HELPER_MODULE - if (softpipe->pstipple.sampler) - pipe->delete_sampler_state(pipe, softpipe->pstipple.sampler); - - pipe_resource_reference(&softpipe->pstipple.texture, NULL); - pipe_sampler_view_reference(&softpipe->pstipple.sampler_view, NULL); -#endif - - if (softpipe->draw) - draw_destroy( softpipe->draw ); - - if (softpipe->quad.shade) - softpipe->quad.shade->destroy( softpipe->quad.shade ); - - if (softpipe->quad.depth_test) - softpipe->quad.depth_test->destroy( softpipe->quad.depth_test ); - - if (softpipe->quad.blend) - softpipe->quad.blend->destroy( softpipe->quad.blend ); - - if (softpipe->quad.pstipple) - softpipe->quad.pstipple->destroy( softpipe->quad.pstipple ); - - for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) { - sp_destroy_tile_cache(softpipe->cbuf_cache[i]); - pipe_surface_reference(&softpipe->framebuffer.cbufs[i], NULL); - } - - sp_destroy_tile_cache(softpipe->zsbuf_cache); - pipe_surface_reference(&softpipe->framebuffer.zsbuf, NULL); - - for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { - sp_destroy_tex_tile_cache(softpipe->fragment_tex_cache[i]); - pipe_sampler_view_reference(&softpipe->fragment_sampler_views[i], NULL); - } - - for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++) { - sp_destroy_tex_tile_cache(softpipe->vertex_tex_cache[i]); - pipe_sampler_view_reference(&softpipe->vertex_sampler_views[i], NULL); - } - - for (i = 0; i < PIPE_MAX_GEOMETRY_SAMPLERS; i++) { - sp_destroy_tex_tile_cache(softpipe->geometry_tex_cache[i]); - pipe_sampler_view_reference(&softpipe->geometry_sampler_views[i], NULL); - } - - for (i = 0; i < PIPE_SHADER_TYPES; i++) { - uint j; - - for (j = 0; j < PIPE_MAX_CONSTANT_BUFFERS; j++) { - if (softpipe->constants[i][j]) { - pipe_resource_reference(&softpipe->constants[i][j], NULL); - } - } - } - - for (i = 0; i < softpipe->num_vertex_buffers; i++) { - pipe_resource_reference(&softpipe->vertex_buffer[i].buffer, NULL); - } - - tgsi_exec_machine_destroy(softpipe->fs_machine); - - FREE( softpipe ); -} - - -/** - * if (the texture is being used as a framebuffer surface) - * return SP_REFERENCED_FOR_WRITE - * else if (the texture is a bound texture source) - * return SP_REFERENCED_FOR_READ - * else - * return SP_UNREFERENCED - */ -unsigned int -softpipe_is_resource_referenced( struct pipe_context *pipe, - struct pipe_resource *texture, - unsigned level, int layer) -{ - struct softpipe_context *softpipe = softpipe_context( pipe ); - unsigned i; - - if (texture->target == PIPE_BUFFER) - return SP_UNREFERENCED; - - /* check if any of the bound drawing surfaces are this texture */ - if (softpipe->dirty_render_cache) { - for (i = 0; i < softpipe->framebuffer.nr_cbufs; i++) { - if (softpipe->framebuffer.cbufs[i] && - softpipe->framebuffer.cbufs[i]->texture == texture) { - return SP_REFERENCED_FOR_WRITE; - } - } - if (softpipe->framebuffer.zsbuf && - softpipe->framebuffer.zsbuf->texture == texture) { - return SP_REFERENCED_FOR_WRITE; - } - } - - /* check if any of the tex_cache textures are this texture */ - for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { - if (softpipe->fragment_tex_cache[i] && - softpipe->fragment_tex_cache[i]->texture == texture) - return SP_REFERENCED_FOR_READ; - } - for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++) { - if (softpipe->vertex_tex_cache[i] && - softpipe->vertex_tex_cache[i]->texture == texture) - return SP_REFERENCED_FOR_READ; - } - for (i = 0; i < PIPE_MAX_GEOMETRY_SAMPLERS; i++) { - if (softpipe->geometry_tex_cache[i] && - softpipe->geometry_tex_cache[i]->texture == texture) - return SP_REFERENCED_FOR_READ; - } - - return SP_UNREFERENCED; -} - - - - -static void -softpipe_render_condition( struct pipe_context *pipe, - struct pipe_query *query, - uint mode ) -{ - struct softpipe_context *softpipe = softpipe_context( pipe ); - - softpipe->render_cond_query = query; - softpipe->render_cond_mode = mode; -} - - - -struct pipe_context * -softpipe_create_context( struct pipe_screen *screen, - void *priv ) -{ - struct softpipe_screen *sp_screen = softpipe_screen(screen); - struct softpipe_context *softpipe = CALLOC_STRUCT(softpipe_context); - uint i; - - util_init_math(); - - softpipe->dump_fs = debug_get_bool_option( "SOFTPIPE_DUMP_FS", FALSE ); - softpipe->dump_gs = debug_get_bool_option( "SOFTPIPE_DUMP_GS", FALSE ); - - softpipe->pipe.winsys = NULL; - softpipe->pipe.screen = screen; - softpipe->pipe.destroy = softpipe_destroy; - softpipe->pipe.priv = priv; - - /* state setters */ - softpipe_init_blend_funcs(&softpipe->pipe); - softpipe_init_clip_funcs(&softpipe->pipe); - softpipe_init_query_funcs( softpipe ); - softpipe_init_rasterizer_funcs(&softpipe->pipe); - softpipe_init_sampler_funcs(&softpipe->pipe); - softpipe_init_shader_funcs(&softpipe->pipe); - softpipe_init_streamout_funcs(&softpipe->pipe); - softpipe_init_texture_funcs( &softpipe->pipe ); - softpipe_init_vertex_funcs(&softpipe->pipe); - - softpipe->pipe.set_framebuffer_state = softpipe_set_framebuffer_state; - - softpipe->pipe.draw_vbo = softpipe_draw_vbo; - - softpipe->pipe.clear = softpipe_clear; - softpipe->pipe.flush = softpipe_flush_wrapped; - - softpipe->pipe.render_condition = softpipe_render_condition; - - softpipe->pipe.create_video_decoder = vl_create_decoder; - softpipe->pipe.create_video_buffer = vl_video_buffer_create; - - /* - * Alloc caches for accessing drawing surfaces and textures. - * Must be before quad stage setup! - */ - for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) - softpipe->cbuf_cache[i] = sp_create_tile_cache( &softpipe->pipe ); - softpipe->zsbuf_cache = sp_create_tile_cache( &softpipe->pipe ); - - for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { - softpipe->fragment_tex_cache[i] = sp_create_tex_tile_cache( &softpipe->pipe ); - if (!softpipe->fragment_tex_cache[i]) - goto fail; - } - - for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++) { - softpipe->vertex_tex_cache[i] = sp_create_tex_tile_cache( &softpipe->pipe ); - if (!softpipe->vertex_tex_cache[i]) - goto fail; - } - - for (i = 0; i < PIPE_MAX_GEOMETRY_SAMPLERS; i++) { - softpipe->geometry_tex_cache[i] = sp_create_tex_tile_cache( &softpipe->pipe ); - if (!softpipe->geometry_tex_cache[i]) - goto fail; - } - - softpipe->fs_machine = tgsi_exec_machine_create(); - - /* setup quad rendering stages */ - softpipe->quad.shade = sp_quad_shade_stage(softpipe); - softpipe->quad.depth_test = sp_quad_depth_test_stage(softpipe); - softpipe->quad.blend = sp_quad_blend_stage(softpipe); - softpipe->quad.pstipple = sp_quad_polygon_stipple_stage(softpipe); - - - /* - * Create drawing context and plug our rendering stage into it. - */ - if (sp_screen->use_llvm) - softpipe->draw = draw_create(&softpipe->pipe); - else - softpipe->draw = draw_create_no_llvm(&softpipe->pipe); - if (!softpipe->draw) - goto fail; - - draw_texture_samplers(softpipe->draw, - PIPE_SHADER_VERTEX, - PIPE_MAX_VERTEX_SAMPLERS, - (struct tgsi_sampler **) - softpipe->tgsi.vert_samplers_list); - - draw_texture_samplers(softpipe->draw, - PIPE_SHADER_GEOMETRY, - PIPE_MAX_GEOMETRY_SAMPLERS, - (struct tgsi_sampler **) - softpipe->tgsi.geom_samplers_list); - - if (debug_get_bool_option( "SOFTPIPE_NO_RAST", FALSE )) - softpipe->no_rast = TRUE; - - softpipe->vbuf_backend = sp_create_vbuf_backend(softpipe); - if (!softpipe->vbuf_backend) - goto fail; - - softpipe->vbuf = draw_vbuf_stage(softpipe->draw, softpipe->vbuf_backend); - if (!softpipe->vbuf) - goto fail; - - draw_set_rasterize_stage(softpipe->draw, softpipe->vbuf); - draw_set_render(softpipe->draw, softpipe->vbuf_backend); - - - /* plug in AA line/point stages */ - draw_install_aaline_stage(softpipe->draw, &softpipe->pipe); - draw_install_aapoint_stage(softpipe->draw, &softpipe->pipe); - - /* Do polygon stipple w/ texture map + frag prog? */ -#if DO_PSTIPPLE_IN_DRAW_MODULE - draw_install_pstipple_stage(softpipe->draw, &softpipe->pipe); -#endif - - draw_wide_point_sprites(softpipe->draw, TRUE); - - sp_init_surface_functions(softpipe); - -#if DO_PSTIPPLE_IN_HELPER_MODULE - /* create the polgon stipple sampler */ - softpipe->pstipple.sampler = util_pstipple_create_sampler(&softpipe->pipe); -#endif - - return &softpipe->pipe; - - fail: - softpipe_destroy(&softpipe->pipe); - return NULL; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_context.h b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_context.h deleted file mode 100644 index c657bd61fcf..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_context.h +++ /dev/null @@ -1,219 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: Keith Whitwell - */ - -#ifndef SP_CONTEXT_H -#define SP_CONTEXT_H - -#include "pipe/p_context.h" - -#include "draw/draw_vertex.h" - -#include "sp_quad_pipe.h" - - -/** Do polygon stipple in the draw module? */ -#define DO_PSTIPPLE_IN_DRAW_MODULE 0 - -/** Do polygon stipple with the util module? */ -#define DO_PSTIPPLE_IN_HELPER_MODULE 1 - - -struct softpipe_vbuf_render; -struct draw_context; -struct draw_stage; -struct softpipe_tile_cache; -struct softpipe_tex_tile_cache; -struct sp_fragment_shader; -struct sp_vertex_shader; -struct sp_velems_state; -struct sp_so_state; - -struct softpipe_context { - struct pipe_context pipe; /**< base class */ - - /** Constant state objects */ - struct pipe_blend_state *blend; - struct pipe_sampler_state *fragment_samplers[PIPE_MAX_SAMPLERS]; - struct pipe_sampler_state *vertex_samplers[PIPE_MAX_VERTEX_SAMPLERS]; - struct pipe_sampler_state *geometry_samplers[PIPE_MAX_GEOMETRY_SAMPLERS]; - struct pipe_depth_stencil_alpha_state *depth_stencil; - struct pipe_rasterizer_state *rasterizer; - struct sp_fragment_shader *fs; - struct sp_fragment_shader_variant *fs_variant; - struct sp_vertex_shader *vs; - struct sp_geometry_shader *gs; - struct sp_velems_state *velems; - struct sp_so_state *so; - - /** Other rendering state */ - struct pipe_blend_color blend_color; - struct pipe_blend_color blend_color_clamped; - struct pipe_stencil_ref stencil_ref; - struct pipe_clip_state clip; - struct pipe_resource *constants[PIPE_SHADER_TYPES][PIPE_MAX_CONSTANT_BUFFERS]; - struct pipe_framebuffer_state framebuffer; - struct pipe_poly_stipple poly_stipple; - struct pipe_scissor_state scissor; - struct pipe_sampler_view *fragment_sampler_views[PIPE_MAX_SAMPLERS]; - struct pipe_sampler_view *vertex_sampler_views[PIPE_MAX_VERTEX_SAMPLERS]; - struct pipe_sampler_view *geometry_sampler_views[PIPE_MAX_GEOMETRY_SAMPLERS]; - struct pipe_viewport_state viewport; - struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS]; - struct pipe_index_buffer index_buffer; - - struct draw_so_target *so_targets[PIPE_MAX_SO_BUFFERS]; - int num_so_targets; - - struct pipe_query_data_so_statistics so_stats; - unsigned num_primitives_generated; - - unsigned num_fragment_samplers; - unsigned num_fragment_sampler_views; - unsigned num_vertex_samplers; - unsigned num_vertex_sampler_views; - unsigned num_geometry_samplers; - unsigned num_geometry_sampler_views; - unsigned num_vertex_buffers; - - unsigned dirty; /**< Mask of SP_NEW_x flags */ - - /* Counter for occlusion queries. Note this supports overlapping - * queries. - */ - uint64_t occlusion_count; - unsigned active_query_count; - - /** Mapped vertex buffers */ - ubyte *mapped_vbuffer[PIPE_MAX_ATTRIBS]; - - /** Mapped constant buffers */ - const void *mapped_constants[PIPE_SHADER_TYPES][PIPE_MAX_CONSTANT_BUFFERS]; - unsigned const_buffer_size[PIPE_SHADER_TYPES][PIPE_MAX_CONSTANT_BUFFERS]; - - /** Vertex format */ - struct vertex_info vertex_info; - struct vertex_info vertex_info_vbuf; - - /** Which vertex shader output slot contains point size */ - int psize_slot; - - /** The reduced version of the primitive supplied by the state tracker */ - unsigned reduced_api_prim; - - /** Derived information about which winding orders to cull */ - unsigned cull_mode; - - /** - * The reduced primitive after unfilled triangles, wide-line decomposition, - * etc, are taken into account. This is the primitive type that's actually - * rasterized. - */ - unsigned reduced_prim; - - /** Derived from scissor and surface bounds: */ - struct pipe_scissor_state cliprect; - - unsigned line_stipple_counter; - - /** Conditional query object and mode */ - struct pipe_query *render_cond_query; - uint render_cond_mode; - - /** Polygon stipple items */ - struct { - struct pipe_resource *texture; - struct pipe_sampler_state *sampler; - struct pipe_sampler_view *sampler_view; - } pstipple; - - /** Software quad rendering pipeline */ - struct { - struct quad_stage *shade; - struct quad_stage *depth_test; - struct quad_stage *blend; - struct quad_stage *pstipple; - struct quad_stage *first; /**< points to one of the above stages */ - } quad; - - /** TGSI exec things */ - struct { - struct sp_sampler_variant *geom_samplers_list[PIPE_MAX_GEOMETRY_SAMPLERS]; - struct sp_sampler_variant *vert_samplers_list[PIPE_MAX_VERTEX_SAMPLERS]; - struct sp_sampler_variant *frag_samplers_list[PIPE_MAX_SAMPLERS]; - } tgsi; - - struct tgsi_exec_machine *fs_machine; - - /** The primitive drawing context */ - struct draw_context *draw; - - /** Draw module backend */ - struct vbuf_render *vbuf_backend; - struct draw_stage *vbuf; - - boolean dirty_render_cache; - - struct softpipe_tile_cache *cbuf_cache[PIPE_MAX_COLOR_BUFS]; - struct softpipe_tile_cache *zsbuf_cache; - - unsigned tex_timestamp; - struct softpipe_tex_tile_cache *fragment_tex_cache[PIPE_MAX_SAMPLERS]; - struct softpipe_tex_tile_cache *vertex_tex_cache[PIPE_MAX_VERTEX_SAMPLERS]; - struct softpipe_tex_tile_cache *geometry_tex_cache[PIPE_MAX_GEOMETRY_SAMPLERS]; - - unsigned dump_fs : 1; - unsigned dump_gs : 1; - unsigned no_rast : 1; -}; - - -static INLINE struct softpipe_context * -softpipe_context( struct pipe_context *pipe ) -{ - return (struct softpipe_context *)pipe; -} - -void -softpipe_reset_sampler_variants(struct softpipe_context *softpipe); - -struct pipe_context * -softpipe_create_context( struct pipe_screen *, void *priv ); - - -#define SP_UNREFERENCED 0 -#define SP_REFERENCED_FOR_READ (1 << 0) -#define SP_REFERENCED_FOR_WRITE (1 << 1) - -unsigned int -softpipe_is_resource_referenced( struct pipe_context *pipe, - struct pipe_resource *texture, - unsigned level, int layer); - -#endif /* SP_CONTEXT_H */ diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_draw_arrays.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_draw_arrays.c deleted file mode 100644 index 27004071f02..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_draw_arrays.c +++ /dev/null @@ -1,120 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Author: - * Brian Paul - * Keith Whitwell - */ - - -#include "pipe/p_defines.h" -#include "pipe/p_context.h" -#include "util/u_inlines.h" -#include "util/u_prim.h" - -#include "sp_context.h" -#include "sp_query.h" -#include "sp_state.h" -#include "sp_texture.h" - -#include "draw/draw_context.h" - -/** - * This function handles drawing indexed and non-indexed prims, - * instanced and non-instanced drawing, with or without min/max element - * indexes. - * All the other drawing functions are expressed in terms of this - * function. - * - * For non-indexed prims, indexBuffer should be NULL. - * For non-instanced drawing, instanceCount should be 1. - * When the min/max element indexes aren't known, minIndex should be 0 - * and maxIndex should be ~0. - */ -void -softpipe_draw_vbo(struct pipe_context *pipe, - const struct pipe_draw_info *info) -{ - struct softpipe_context *sp = softpipe_context(pipe); - struct draw_context *draw = sp->draw; - void *mapped_indices = NULL; - unsigned i; - - if (!softpipe_check_render_cond(sp)) - return; - - sp->reduced_api_prim = u_reduced_prim(info->mode); - - if (sp->dirty) { - softpipe_update_derived(sp, sp->reduced_api_prim); - } - - softpipe_map_transfers(sp); - - /* Map vertex buffers */ - for (i = 0; i < sp->num_vertex_buffers; i++) { - void *buf = softpipe_resource(sp->vertex_buffer[i].buffer)->data; - draw_set_mapped_vertex_buffer(draw, i, buf); - } - - /* Map index buffer, if present */ - if (info->indexed && sp->index_buffer.buffer) - mapped_indices = softpipe_resource(sp->index_buffer.buffer)->data; - - draw_set_mapped_index_buffer(draw, mapped_indices); - - for (i = 0; i < sp->num_so_targets; i++) { - void *buf = softpipe_resource(sp->so_targets[i]->target.buffer)->data; - sp->so_targets[i]->mapping = buf; - } - - draw_set_mapped_so_targets(draw, sp->num_so_targets, - sp->so_targets); - - /* draw! */ - draw_vbo(draw, info); - - /* unmap vertex/index buffers - will cause draw module to flush */ - for (i = 0; i < sp->num_vertex_buffers; i++) { - draw_set_mapped_vertex_buffer(draw, i, NULL); - } - if (mapped_indices) { - draw_set_mapped_index_buffer(draw, NULL); - } - - draw_set_mapped_so_targets(draw, 0, NULL); - - /* - * TODO: Flush only when a user vertex/index buffer is present - * (or even better, modify draw module to do this - * internally when this condition is seen?) - */ - draw_flush(draw); - - /* Note: leave drawing surfaces mapped */ - sp->dirty_render_cache = TRUE; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_fence.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_fence.c deleted file mode 100644 index c2897ed1ef8..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_fence.c +++ /dev/null @@ -1,68 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - **************************************************************************/ - - -#include "pipe/p_screen.h" -#include "util/u_debug.h" -#include "sp_fence.h" - - -static void -softpipe_fence_reference(struct pipe_screen *screen, - struct pipe_fence_handle **ptr, - struct pipe_fence_handle *fence) -{ - *ptr = fence; -} - - -static boolean -softpipe_fence_signalled(struct pipe_screen *screen, - struct pipe_fence_handle *fence) -{ - assert(fence); - return TRUE; -} - - -static boolean -softpipe_fence_finish(struct pipe_screen *screen, - struct pipe_fence_handle *fence, - uint64_t timeout) -{ - assert(fence); - return TRUE; -} - - -void -softpipe_init_screen_fence_funcs(struct pipe_screen *screen) -{ - screen->fence_reference = softpipe_fence_reference; - screen->fence_finish = softpipe_fence_finish; - screen->fence_signalled = softpipe_fence_signalled; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_fence.h b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_fence.h deleted file mode 100644 index 39c33243bd5..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_fence.h +++ /dev/null @@ -1,40 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - **************************************************************************/ - - -#ifndef SP_FENCE_H_ -#define SP_FENCE_H_ - - -struct pipe_screen; - - -void -softpipe_init_screen_fence_funcs(struct pipe_screen *screen); - - -#endif /* SP_FENCE_H_ */ diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_flush.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_flush.c deleted file mode 100644 index a2733e95878..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_flush.c +++ /dev/null @@ -1,176 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Author: - * Keith Whitwell - */ - - -#include "pipe/p_defines.h" -#include "pipe/p_screen.h" -#include "draw/draw_context.h" -#include "sp_flush.h" -#include "sp_context.h" -#include "sp_state.h" -#include "sp_tile_cache.h" -#include "sp_tex_tile_cache.h" - - -void -softpipe_flush( struct pipe_context *pipe, - unsigned flags, - struct pipe_fence_handle **fence ) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - uint i; - - draw_flush(softpipe->draw); - - if (flags & SP_FLUSH_TEXTURE_CACHE) { - for (i = 0; i < softpipe->num_fragment_sampler_views; i++) { - sp_flush_tex_tile_cache(softpipe->fragment_tex_cache[i]); - } - for (i = 0; i < softpipe->num_vertex_sampler_views; i++) { - sp_flush_tex_tile_cache(softpipe->vertex_tex_cache[i]); - } - for (i = 0; i < softpipe->num_geometry_sampler_views; i++) { - sp_flush_tex_tile_cache(softpipe->geometry_tex_cache[i]); - } - } - - /* If this is a swapbuffers, just flush color buffers. - * - * The zbuffer changes are not discarded, but held in the cache - * in the hope that a later clear will wipe them out. - */ - for (i = 0; i < softpipe->framebuffer.nr_cbufs; i++) - if (softpipe->cbuf_cache[i]) - sp_flush_tile_cache(softpipe->cbuf_cache[i]); - - if (softpipe->zsbuf_cache) - sp_flush_tile_cache(softpipe->zsbuf_cache); - - softpipe->dirty_render_cache = FALSE; - - /* Need this call for hardware buffers before swapbuffers. - * - * there should probably be another/different flush-type function - * that's called before swapbuffers because we don't always want - * to unmap surfaces when flushing. - */ - softpipe_unmap_transfers(softpipe); - - /* Enable to dump BMPs of the color/depth buffers each frame */ -#if 0 - if(flags & PIPE_FLUSH_FRAME) { - static unsigned frame_no = 1; - static char filename[256]; - util_snprintf(filename, sizeof(filename), "cbuf_%u.bmp", frame_no); - debug_dump_surface_bmp(softpipe, filename, softpipe->framebuffer.cbufs[0]); - util_snprintf(filename, sizeof(filename), "zsbuf_%u.bmp", frame_no); - debug_dump_surface_bmp(softpipe, filename, softpipe->framebuffer.zsbuf); - ++frame_no; - } -#endif - - if (fence) - *fence = (void*)(intptr_t)1; -} - -void -softpipe_flush_wrapped( struct pipe_context *pipe, - struct pipe_fence_handle **fence ) -{ - softpipe_flush(pipe, SP_FLUSH_TEXTURE_CACHE, fence); -} - - -/** - * Flush context if necessary. - * - * Returns FALSE if it would have block, but do_not_block was set, TRUE - * otherwise. - * - * TODO: move this logic to an auxiliary library? - */ -boolean -softpipe_flush_resource(struct pipe_context *pipe, - struct pipe_resource *texture, - unsigned level, - int layer, - unsigned flush_flags, - boolean read_only, - boolean cpu_access, - boolean do_not_block) -{ - unsigned referenced; - - referenced = softpipe_is_resource_referenced(pipe, texture, level, layer); - - if ((referenced & SP_REFERENCED_FOR_WRITE) || - ((referenced & SP_REFERENCED_FOR_READ) && !read_only)) { - - /* - * TODO: The semantics of these flush flags are too obtuse. They should - * disappear and the pipe driver should just ensure that all visible - * side-effects happen when they need to happen. - */ - if (referenced & SP_REFERENCED_FOR_READ) - flush_flags |= SP_FLUSH_TEXTURE_CACHE; - - if (cpu_access) { - /* - * Flush and wait. - */ - - struct pipe_fence_handle *fence = NULL; - - if (do_not_block) - return FALSE; - - softpipe_flush(pipe, flush_flags, &fence); - - if (fence) { - /* - * This is for illustrative purposes only, as softpipe does not - * have fences. - */ - pipe->screen->fence_finish(pipe->screen, fence, - PIPE_TIMEOUT_INFINITE); - pipe->screen->fence_reference(pipe->screen, &fence, NULL); - } - } else { - /* - * Just flush. - */ - - softpipe_flush(pipe, flush_flags, NULL); - } - } - - return TRUE; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_flush.h b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_flush.h deleted file mode 100644 index ab01c249abe..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_flush.h +++ /dev/null @@ -1,57 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef SP_FLUSH_H -#define SP_FLUSH_H - -#include "pipe/p_compiler.h" - -struct pipe_context; -struct pipe_fence_handle; - -#define SP_FLUSH_TEXTURE_CACHE 0x2 - -void -softpipe_flush(struct pipe_context *pipe, - unsigned flags, - struct pipe_fence_handle **fence); - -void -softpipe_flush_wrapped( struct pipe_context *pipe, - struct pipe_fence_handle **fence ); - -boolean -softpipe_flush_resource(struct pipe_context *pipe, - struct pipe_resource *texture, - unsigned level, - int layer, - unsigned flush_flags, - boolean read_only, - boolean cpu_access, - boolean do_not_block); - -#endif diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_fs.h b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_fs.h deleted file mode 100644 index db689b82bd5..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_fs.h +++ /dev/null @@ -1,48 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: Keith Whitwell - */ - -#ifndef SP_FS_H -#define SP_FS_H - - -struct sp_fragment_shader_variant * -softpipe_create_fs_variant_exec(struct softpipe_context *softpipe, - const struct pipe_shader_state *templ); - - -struct tgsi_interp_coef; -struct tgsi_exec_vector; - -void sp_setup_pos_vector(const struct tgsi_interp_coef *coef, - float x, float y, - struct tgsi_exec_vector *quadpos); - - -#endif diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_fs_exec.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_fs_exec.c deleted file mode 100644 index 779b8c4995c..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_fs_exec.c +++ /dev/null @@ -1,205 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * Execute fragment shader using the TGSI interpreter. - */ - -#include "sp_context.h" -#include "sp_state.h" -#include "sp_fs.h" -#include "sp_quad.h" - -#include "pipe/p_state.h" -#include "pipe/p_defines.h" -#include "util/u_memory.h" -#include "tgsi/tgsi_exec.h" -#include "tgsi/tgsi_parse.h" - - -/** - * Subclass of sp_fragment_shader_variant - */ -struct sp_exec_fragment_shader -{ - struct sp_fragment_shader_variant base; - /* No other members for now */ -}; - - -/** cast wrapper */ -static INLINE struct sp_exec_fragment_shader * -sp_exec_fragment_shader(const struct sp_fragment_shader_variant *var) -{ - return (struct sp_exec_fragment_shader *) var; -} - - -static void -exec_prepare( const struct sp_fragment_shader_variant *var, - struct tgsi_exec_machine *machine, - struct tgsi_sampler **samplers ) -{ - /* - * Bind tokens/shader to the interpreter's machine state. - * Avoid redundant binding. - */ - if (machine->Tokens != var->tokens) { - tgsi_exec_machine_bind_shader( machine, - var->tokens, - PIPE_MAX_SAMPLERS, - samplers ); - } -} - - - -/** - * Compute quad X,Y,Z,W for the four fragments in a quad. - * - * This should really be part of the compiled shader. - */ -static void -setup_pos_vector(const struct tgsi_interp_coef *coef, - float x, float y, - struct tgsi_exec_vector *quadpos) -{ - uint chan; - /* do X */ - quadpos->xyzw[0].f[0] = x; - quadpos->xyzw[0].f[1] = x + 1; - quadpos->xyzw[0].f[2] = x; - quadpos->xyzw[0].f[3] = x + 1; - - /* do Y */ - quadpos->xyzw[1].f[0] = y; - quadpos->xyzw[1].f[1] = y; - quadpos->xyzw[1].f[2] = y + 1; - quadpos->xyzw[1].f[3] = y + 1; - - /* do Z and W for all fragments in the quad */ - for (chan = 2; chan < 4; chan++) { - const float dadx = coef->dadx[chan]; - const float dady = coef->dady[chan]; - const float a0 = coef->a0[chan] + dadx * x + dady * y; - quadpos->xyzw[chan].f[0] = a0; - quadpos->xyzw[chan].f[1] = a0 + dadx; - quadpos->xyzw[chan].f[2] = a0 + dady; - quadpos->xyzw[chan].f[3] = a0 + dadx + dady; - } -} - - -/* TODO: hide the machine struct in here somewhere, remove from this - * interface: - */ -static unsigned -exec_run( const struct sp_fragment_shader_variant *var, - struct tgsi_exec_machine *machine, - struct quad_header *quad ) -{ - /* Compute X, Y, Z, W vals for this quad */ - setup_pos_vector(quad->posCoef, - (float)quad->input.x0, (float)quad->input.y0, - &machine->QuadPos); - - /* convert 0 to 1.0 and 1 to -1.0 */ - machine->Face = (float) (quad->input.facing * -2 + 1); - - quad->inout.mask &= tgsi_exec_machine_run( machine ); - if (quad->inout.mask == 0) - return FALSE; - - /* store outputs */ - { - const ubyte *sem_name = var->info.output_semantic_name; - const ubyte *sem_index = var->info.output_semantic_index; - const uint n = var->info.num_outputs; - uint i; - for (i = 0; i < n; i++) { - switch (sem_name[i]) { - case TGSI_SEMANTIC_COLOR: - { - uint cbuf = sem_index[i]; - - assert(sizeof(quad->output.color[cbuf]) == - sizeof(machine->Outputs[i])); - - /* copy float[4][4] result */ - memcpy(quad->output.color[cbuf], - &machine->Outputs[i], - sizeof(quad->output.color[0]) ); - } - break; - case TGSI_SEMANTIC_POSITION: - { - uint j; - - for (j = 0; j < 4; j++) - quad->output.depth[j] = machine->Outputs[i].xyzw[2].f[j]; - } - break; - case TGSI_SEMANTIC_STENCIL: - { - uint j; - - for (j = 0; j < 4; j++) - quad->output.stencil[j] = (unsigned)machine->Outputs[i].xyzw[1].f[j]; - } - break; - } - } - } - - return TRUE; -} - - -static void -exec_delete( struct sp_fragment_shader_variant *var ) -{ - FREE( (void *) var->tokens ); - FREE(var); -} - - -struct sp_fragment_shader_variant * -softpipe_create_fs_variant_exec(struct softpipe_context *softpipe, - const struct pipe_shader_state *templ) -{ - struct sp_exec_fragment_shader *shader; - - shader = CALLOC_STRUCT(sp_exec_fragment_shader); - if (!shader) - return NULL; - - shader->base.prepare = exec_prepare; - shader->base.run = exec_run; - shader->base.delete = exec_delete; - - return &shader->base; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_limits.h b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_limits.h deleted file mode 100644 index a7a24c98d57..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_limits.h +++ /dev/null @@ -1,42 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef SP_LIMITS_H -#define SP_LIMITS_H - - - -#define SP_MAX_TEXTURE_2D_LEVELS 15 /* 16K x 16K */ -#define SP_MAX_TEXTURE_3D_LEVELS 9 /* 512 x 512 x 512 */ - - -/** Max surface size */ -#define MAX_WIDTH (1 << (SP_MAX_TEXTURE_2D_LEVELS - 1)) -#define MAX_HEIGHT (1 << (SP_MAX_TEXTURE_2D_LEVELS - 1)) - - -#endif /* SP_LIMITS_H */ diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_prim_vbuf.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_prim_vbuf.c deleted file mode 100644 index a142118f31e..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_prim_vbuf.c +++ /dev/null @@ -1,598 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * Interface between 'draw' module's output and the softpipe rasterizer/setup - * code. When the 'draw' module has finished filling a vertex buffer, the - * draw_arrays() functions below will be called. Loop over the vertices and - * call the point/line/tri setup functions. - * - * Authors - * Brian Paul - */ - - -#include "sp_context.h" -#include "sp_setup.h" -#include "sp_state.h" -#include "sp_prim_vbuf.h" -#include "draw/draw_context.h" -#include "draw/draw_vbuf.h" -#include "util/u_memory.h" -#include "util/u_prim.h" - - -#define SP_MAX_VBUF_INDEXES 1024 -#define SP_MAX_VBUF_SIZE 4096 - -typedef const float (*cptrf4)[4]; - -/** - * Subclass of vbuf_render. - */ -struct softpipe_vbuf_render -{ - struct vbuf_render base; - struct softpipe_context *softpipe; - struct setup_context *setup; - - uint prim; - uint vertex_size; - uint nr_vertices; - uint vertex_buffer_size; - void *vertex_buffer; -}; - - -/** cast wrapper */ -static struct softpipe_vbuf_render * -softpipe_vbuf_render(struct vbuf_render *vbr) -{ - return (struct softpipe_vbuf_render *) vbr; -} - - -/** This tells the draw module about our desired vertex layout */ -static const struct vertex_info * -sp_vbuf_get_vertex_info(struct vbuf_render *vbr) -{ - struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr); - return softpipe_get_vbuf_vertex_info(cvbr->softpipe); -} - - -static boolean -sp_vbuf_allocate_vertices(struct vbuf_render *vbr, - ushort vertex_size, ushort nr_vertices) -{ - struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr); - unsigned size = vertex_size * nr_vertices; - - if (cvbr->vertex_buffer_size < size) { - align_free(cvbr->vertex_buffer); - cvbr->vertex_buffer = align_malloc(size, 16); - cvbr->vertex_buffer_size = size; - } - - cvbr->vertex_size = vertex_size; - cvbr->nr_vertices = nr_vertices; - - return cvbr->vertex_buffer != NULL; -} - - -static void -sp_vbuf_release_vertices(struct vbuf_render *vbr) -{ - /* keep the old allocation for next time */ -} - - -static void * -sp_vbuf_map_vertices(struct vbuf_render *vbr) -{ - struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr); - return cvbr->vertex_buffer; -} - - -static void -sp_vbuf_unmap_vertices(struct vbuf_render *vbr, - ushort min_index, - ushort max_index ) -{ - struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr); - assert( cvbr->vertex_buffer_size >= (max_index+1) * cvbr->vertex_size ); - (void) cvbr; - /* do nothing */ -} - - -static void -sp_vbuf_set_primitive(struct vbuf_render *vbr, unsigned prim) -{ - struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr); - struct setup_context *setup_ctx = cvbr->setup; - - sp_setup_prepare( setup_ctx ); - - cvbr->softpipe->reduced_prim = u_reduced_prim(prim); - cvbr->prim = prim; -} - - -static INLINE cptrf4 get_vert( const void *vertex_buffer, - int index, - int stride ) -{ - return (cptrf4)((char *)vertex_buffer + index * stride); -} - - -/** - * draw elements / indexed primitives - */ -static void -sp_vbuf_draw_elements(struct vbuf_render *vbr, const ushort *indices, uint nr) -{ - struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr); - struct softpipe_context *softpipe = cvbr->softpipe; - const unsigned stride = softpipe->vertex_info_vbuf.size * sizeof(float); - const void *vertex_buffer = cvbr->vertex_buffer; - struct setup_context *setup = cvbr->setup; - const boolean flatshade_first = softpipe->rasterizer->flatshade_first; - unsigned i; - - switch (cvbr->prim) { - case PIPE_PRIM_POINTS: - for (i = 0; i < nr; i++) { - sp_setup_point( setup, - get_vert(vertex_buffer, indices[i-0], stride) ); - } - break; - - case PIPE_PRIM_LINES: - for (i = 1; i < nr; i += 2) { - sp_setup_line( setup, - get_vert(vertex_buffer, indices[i-1], stride), - get_vert(vertex_buffer, indices[i-0], stride) ); - } - break; - - case PIPE_PRIM_LINE_STRIP: - for (i = 1; i < nr; i ++) { - sp_setup_line( setup, - get_vert(vertex_buffer, indices[i-1], stride), - get_vert(vertex_buffer, indices[i-0], stride) ); - } - break; - - case PIPE_PRIM_LINE_LOOP: - for (i = 1; i < nr; i ++) { - sp_setup_line( setup, - get_vert(vertex_buffer, indices[i-1], stride), - get_vert(vertex_buffer, indices[i-0], stride) ); - } - if (nr) { - sp_setup_line( setup, - get_vert(vertex_buffer, indices[nr-1], stride), - get_vert(vertex_buffer, indices[0], stride) ); - } - break; - - case PIPE_PRIM_TRIANGLES: - for (i = 2; i < nr; i += 3) { - sp_setup_tri( setup, - get_vert(vertex_buffer, indices[i-2], stride), - get_vert(vertex_buffer, indices[i-1], stride), - get_vert(vertex_buffer, indices[i-0], stride) ); - } - break; - - case PIPE_PRIM_TRIANGLE_STRIP: - if (flatshade_first) { - for (i = 2; i < nr; i += 1) { - /* emit first triangle vertex as first triangle vertex */ - sp_setup_tri( setup, - get_vert(vertex_buffer, indices[i-2], stride), - get_vert(vertex_buffer, indices[i+(i&1)-1], stride), - get_vert(vertex_buffer, indices[i-(i&1)], stride) ); - - } - } - else { - for (i = 2; i < nr; i += 1) { - /* emit last triangle vertex as last triangle vertex */ - sp_setup_tri( setup, - get_vert(vertex_buffer, indices[i+(i&1)-2], stride), - get_vert(vertex_buffer, indices[i-(i&1)-1], stride), - get_vert(vertex_buffer, indices[i-0], stride) ); - } - } - break; - - case PIPE_PRIM_TRIANGLE_FAN: - if (flatshade_first) { - for (i = 2; i < nr; i += 1) { - /* emit first non-spoke vertex as first vertex */ - sp_setup_tri( setup, - get_vert(vertex_buffer, indices[i-1], stride), - get_vert(vertex_buffer, indices[i-0], stride), - get_vert(vertex_buffer, indices[0], stride) ); - } - } - else { - for (i = 2; i < nr; i += 1) { - /* emit last non-spoke vertex as last vertex */ - sp_setup_tri( setup, - get_vert(vertex_buffer, indices[0], stride), - get_vert(vertex_buffer, indices[i-1], stride), - get_vert(vertex_buffer, indices[i-0], stride) ); - } - } - break; - - case PIPE_PRIM_QUADS: - /* GL quads don't follow provoking vertex convention */ - if (flatshade_first) { - /* emit last quad vertex as first triangle vertex */ - for (i = 3; i < nr; i += 4) { - sp_setup_tri( setup, - get_vert(vertex_buffer, indices[i-0], stride), - get_vert(vertex_buffer, indices[i-3], stride), - get_vert(vertex_buffer, indices[i-2], stride) ); - - sp_setup_tri( setup, - get_vert(vertex_buffer, indices[i-0], stride), - get_vert(vertex_buffer, indices[i-2], stride), - get_vert(vertex_buffer, indices[i-1], stride) ); - } - } - else { - /* emit last quad vertex as last triangle vertex */ - for (i = 3; i < nr; i += 4) { - sp_setup_tri( setup, - get_vert(vertex_buffer, indices[i-3], stride), - get_vert(vertex_buffer, indices[i-2], stride), - get_vert(vertex_buffer, indices[i-0], stride) ); - - sp_setup_tri( setup, - get_vert(vertex_buffer, indices[i-2], stride), - get_vert(vertex_buffer, indices[i-1], stride), - get_vert(vertex_buffer, indices[i-0], stride) ); - } - } - break; - - case PIPE_PRIM_QUAD_STRIP: - /* GL quad strips don't follow provoking vertex convention */ - if (flatshade_first) { - /* emit last quad vertex as first triangle vertex */ - for (i = 3; i < nr; i += 2) { - sp_setup_tri( setup, - get_vert(vertex_buffer, indices[i-0], stride), - get_vert(vertex_buffer, indices[i-3], stride), - get_vert(vertex_buffer, indices[i-2], stride) ); - sp_setup_tri( setup, - get_vert(vertex_buffer, indices[i-0], stride), - get_vert(vertex_buffer, indices[i-1], stride), - get_vert(vertex_buffer, indices[i-3], stride) ); - } - } - else { - /* emit last quad vertex as last triangle vertex */ - for (i = 3; i < nr; i += 2) { - sp_setup_tri( setup, - get_vert(vertex_buffer, indices[i-3], stride), - get_vert(vertex_buffer, indices[i-2], stride), - get_vert(vertex_buffer, indices[i-0], stride) ); - sp_setup_tri( setup, - get_vert(vertex_buffer, indices[i-1], stride), - get_vert(vertex_buffer, indices[i-3], stride), - get_vert(vertex_buffer, indices[i-0], stride) ); - } - } - break; - - case PIPE_PRIM_POLYGON: - /* Almost same as tri fan but the _first_ vertex specifies the flat - * shading color. - */ - if (flatshade_first) { - /* emit first polygon vertex as first triangle vertex */ - for (i = 2; i < nr; i += 1) { - sp_setup_tri( setup, - get_vert(vertex_buffer, indices[0], stride), - get_vert(vertex_buffer, indices[i-1], stride), - get_vert(vertex_buffer, indices[i-0], stride) ); - } - } - else { - /* emit first polygon vertex as last triangle vertex */ - for (i = 2; i < nr; i += 1) { - sp_setup_tri( setup, - get_vert(vertex_buffer, indices[i-1], stride), - get_vert(vertex_buffer, indices[i-0], stride), - get_vert(vertex_buffer, indices[0], stride) ); - } - } - break; - - default: - assert(0); - } -} - - -/** - * This function is hit when the draw module is working in pass-through mode. - * It's up to us to convert the vertex array into point/line/tri prims. - */ -static void -sp_vbuf_draw_arrays(struct vbuf_render *vbr, uint start, uint nr) -{ - struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr); - struct softpipe_context *softpipe = cvbr->softpipe; - struct setup_context *setup = cvbr->setup; - const unsigned stride = softpipe->vertex_info_vbuf.size * sizeof(float); - const void *vertex_buffer = - (void *) get_vert(cvbr->vertex_buffer, start, stride); - const boolean flatshade_first = softpipe->rasterizer->flatshade_first; - unsigned i; - - switch (cvbr->prim) { - case PIPE_PRIM_POINTS: - for (i = 0; i < nr; i++) { - sp_setup_point( setup, - get_vert(vertex_buffer, i-0, stride) ); - } - break; - - case PIPE_PRIM_LINES: - for (i = 1; i < nr; i += 2) { - sp_setup_line( setup, - get_vert(vertex_buffer, i-1, stride), - get_vert(vertex_buffer, i-0, stride) ); - } - break; - - case PIPE_PRIM_LINE_STRIP: - for (i = 1; i < nr; i ++) { - sp_setup_line( setup, - get_vert(vertex_buffer, i-1, stride), - get_vert(vertex_buffer, i-0, stride) ); - } - break; - - case PIPE_PRIM_LINE_LOOP: - for (i = 1; i < nr; i ++) { - sp_setup_line( setup, - get_vert(vertex_buffer, i-1, stride), - get_vert(vertex_buffer, i-0, stride) ); - } - if (nr) { - sp_setup_line( setup, - get_vert(vertex_buffer, nr-1, stride), - get_vert(vertex_buffer, 0, stride) ); - } - break; - - case PIPE_PRIM_TRIANGLES: - for (i = 2; i < nr; i += 3) { - sp_setup_tri( setup, - get_vert(vertex_buffer, i-2, stride), - get_vert(vertex_buffer, i-1, stride), - get_vert(vertex_buffer, i-0, stride) ); - } - break; - - case PIPE_PRIM_TRIANGLE_STRIP: - if (flatshade_first) { - for (i = 2; i < nr; i++) { - /* emit first triangle vertex as first triangle vertex */ - sp_setup_tri( setup, - get_vert(vertex_buffer, i-2, stride), - get_vert(vertex_buffer, i+(i&1)-1, stride), - get_vert(vertex_buffer, i-(i&1), stride) ); - } - } - else { - for (i = 2; i < nr; i++) { - /* emit last triangle vertex as last triangle vertex */ - sp_setup_tri( setup, - get_vert(vertex_buffer, i+(i&1)-2, stride), - get_vert(vertex_buffer, i-(i&1)-1, stride), - get_vert(vertex_buffer, i-0, stride) ); - } - } - break; - - case PIPE_PRIM_TRIANGLE_FAN: - if (flatshade_first) { - for (i = 2; i < nr; i += 1) { - /* emit first non-spoke vertex as first vertex */ - sp_setup_tri( setup, - get_vert(vertex_buffer, i-1, stride), - get_vert(vertex_buffer, i-0, stride), - get_vert(vertex_buffer, 0, stride) ); - } - } - else { - for (i = 2; i < nr; i += 1) { - /* emit last non-spoke vertex as last vertex */ - sp_setup_tri( setup, - get_vert(vertex_buffer, 0, stride), - get_vert(vertex_buffer, i-1, stride), - get_vert(vertex_buffer, i-0, stride) ); - } - } - break; - - case PIPE_PRIM_QUADS: - /* GL quads don't follow provoking vertex convention */ - if (flatshade_first) { - /* emit last quad vertex as first triangle vertex */ - for (i = 3; i < nr; i += 4) { - sp_setup_tri( setup, - get_vert(vertex_buffer, i-0, stride), - get_vert(vertex_buffer, i-3, stride), - get_vert(vertex_buffer, i-2, stride) ); - sp_setup_tri( setup, - get_vert(vertex_buffer, i-0, stride), - get_vert(vertex_buffer, i-2, stride), - get_vert(vertex_buffer, i-1, stride) ); - } - } - else { - /* emit last quad vertex as last triangle vertex */ - for (i = 3; i < nr; i += 4) { - sp_setup_tri( setup, - get_vert(vertex_buffer, i-3, stride), - get_vert(vertex_buffer, i-2, stride), - get_vert(vertex_buffer, i-0, stride) ); - sp_setup_tri( setup, - get_vert(vertex_buffer, i-2, stride), - get_vert(vertex_buffer, i-1, stride), - get_vert(vertex_buffer, i-0, stride) ); - } - } - break; - - case PIPE_PRIM_QUAD_STRIP: - /* GL quad strips don't follow provoking vertex convention */ - if (flatshade_first) { - /* emit last quad vertex as first triangle vertex */ - for (i = 3; i < nr; i += 2) { - sp_setup_tri( setup, - get_vert(vertex_buffer, i-0, stride), - get_vert(vertex_buffer, i-3, stride), - get_vert(vertex_buffer, i-2, stride) ); - sp_setup_tri( setup, - get_vert(vertex_buffer, i-0, stride), - get_vert(vertex_buffer, i-1, stride), - get_vert(vertex_buffer, i-3, stride) ); - } - } - else { - /* emit last quad vertex as last triangle vertex */ - for (i = 3; i < nr; i += 2) { - sp_setup_tri( setup, - get_vert(vertex_buffer, i-3, stride), - get_vert(vertex_buffer, i-2, stride), - get_vert(vertex_buffer, i-0, stride) ); - sp_setup_tri( setup, - get_vert(vertex_buffer, i-1, stride), - get_vert(vertex_buffer, i-3, stride), - get_vert(vertex_buffer, i-0, stride) ); - } - } - break; - - case PIPE_PRIM_POLYGON: - /* Almost same as tri fan but the _first_ vertex specifies the flat - * shading color. - */ - if (flatshade_first) { - /* emit first polygon vertex as first triangle vertex */ - for (i = 2; i < nr; i += 1) { - sp_setup_tri( setup, - get_vert(vertex_buffer, 0, stride), - get_vert(vertex_buffer, i-1, stride), - get_vert(vertex_buffer, i-0, stride) ); - } - } - else { - /* emit first polygon vertex as last triangle vertex */ - for (i = 2; i < nr; i += 1) { - sp_setup_tri( setup, - get_vert(vertex_buffer, i-1, stride), - get_vert(vertex_buffer, i-0, stride), - get_vert(vertex_buffer, 0, stride) ); - } - } - break; - - default: - assert(0); - } -} - -static void -sp_vbuf_so_info(struct vbuf_render *vbr, uint primitives, uint vertices, - uint prim_generated) -{ - struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr); - struct softpipe_context *softpipe = cvbr->softpipe; - - softpipe->so_stats.num_primitives_written += primitives; - softpipe->so_stats.primitives_storage_needed = - vertices * 4 /*sizeof(float|int32)*/ * 4 /*x,y,z,w*/; - softpipe->num_primitives_generated += prim_generated; -} - - -static void -sp_vbuf_destroy(struct vbuf_render *vbr) -{ - struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr); - if (cvbr->vertex_buffer) - align_free(cvbr->vertex_buffer); - sp_setup_destroy_context(cvbr->setup); - FREE(cvbr); -} - - -/** - * Create the post-transform vertex handler for the given context. - */ -struct vbuf_render * -sp_create_vbuf_backend(struct softpipe_context *sp) -{ - struct softpipe_vbuf_render *cvbr = CALLOC_STRUCT(softpipe_vbuf_render); - - assert(sp->draw); - - cvbr->base.max_indices = SP_MAX_VBUF_INDEXES; - cvbr->base.max_vertex_buffer_bytes = SP_MAX_VBUF_SIZE; - - cvbr->base.get_vertex_info = sp_vbuf_get_vertex_info; - cvbr->base.allocate_vertices = sp_vbuf_allocate_vertices; - cvbr->base.map_vertices = sp_vbuf_map_vertices; - cvbr->base.unmap_vertices = sp_vbuf_unmap_vertices; - cvbr->base.set_primitive = sp_vbuf_set_primitive; - cvbr->base.draw_elements = sp_vbuf_draw_elements; - cvbr->base.draw_arrays = sp_vbuf_draw_arrays; - cvbr->base.release_vertices = sp_vbuf_release_vertices; - cvbr->base.set_stream_output_info = sp_vbuf_so_info; - cvbr->base.destroy = sp_vbuf_destroy; - - cvbr->softpipe = sp; - - cvbr->setup = sp_setup_create_context(cvbr->softpipe); - - return &cvbr->base; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_prim_vbuf.h b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_prim_vbuf.h deleted file mode 100644 index ad01cc2f289..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_prim_vbuf.h +++ /dev/null @@ -1,38 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef SP_VBUF_H -#define SP_VBUF_H - - -struct softpipe_context; - -extern struct vbuf_render * -sp_create_vbuf_backend(struct softpipe_context *softpipe); - - -#endif /* SP_VBUF_H */ diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_public.h b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_public.h deleted file mode 100644 index 62d0903d87a..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_public.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef SP_PUBLIC_H -#define SP_PUBLIC_H - -struct pipe_screen; -struct sw_winsys; - -struct pipe_screen * -softpipe_create_screen(struct sw_winsys *winsys); - -#endif diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad.h b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad.h deleted file mode 100644 index e745aa80619..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad.h +++ /dev/null @@ -1,107 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: Keith Whitwell - */ - -#ifndef SP_QUAD_H -#define SP_QUAD_H - -#include "pipe/p_state.h" -#include "tgsi/tgsi_exec.h" - - -#define QUAD_PRIM_POINT 1 -#define QUAD_PRIM_LINE 2 -#define QUAD_PRIM_TRI 3 - - -/* The rasterizer generates 2x2 quads of fragment and feeds them to - * the current fp_machine (see below). - * Remember that Y=0=top with Y increasing down the window. - */ -#define QUAD_TOP_LEFT 0 -#define QUAD_TOP_RIGHT 1 -#define QUAD_BOTTOM_LEFT 2 -#define QUAD_BOTTOM_RIGHT 3 - -#define MASK_TOP_LEFT (1 << QUAD_TOP_LEFT) -#define MASK_TOP_RIGHT (1 << QUAD_TOP_RIGHT) -#define MASK_BOTTOM_LEFT (1 << QUAD_BOTTOM_LEFT) -#define MASK_BOTTOM_RIGHT (1 << QUAD_BOTTOM_RIGHT) -#define MASK_ALL 0xf - - -/** - * Quad stage inputs (pos, coverage, front/back face, etc) - */ -struct quad_header_input -{ - int x0, y0; /**< quad window pos, always even */ - float coverage[QUAD_SIZE]; /**< fragment coverage for antialiasing */ - unsigned facing:1; /**< Front (0) or back (1) facing? */ - unsigned prim:2; /**< QUAD_PRIM_POINT, LINE, TRI */ -}; - - -/** - * Quad stage inputs/outputs. - */ -struct quad_header_inout -{ - unsigned mask:4; -}; - - -/** - * Quad stage outputs (color & depth). - */ -struct quad_header_output -{ - /** colors in SOA format (rrrr, gggg, bbbb, aaaa) */ - float color[PIPE_MAX_COLOR_BUFS][NUM_CHANNELS][QUAD_SIZE]; - float depth[QUAD_SIZE]; - uint8_t stencil[QUAD_SIZE]; -}; - - -/** - * Encodes everything we need to know about a 2x2 pixel block. Uses - * "Channel-Serial" or "SoA" layout. - */ -struct quad_header { - struct quad_header_input input; - struct quad_header_inout inout; - struct quad_header_output output; - - /* Redundant/duplicated: - */ - const struct tgsi_interp_coef *posCoef; - const struct tgsi_interp_coef *coef; -}; - -#endif /* SP_QUAD_H */ diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_blend.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_blend.c deleted file mode 100644 index d546b149573..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_blend.c +++ /dev/null @@ -1,1230 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * quad blending - * \author Brian Paul - */ - -#include "pipe/p_defines.h" -#include "util/u_math.h" -#include "util/u_memory.h" -#include "util/u_format.h" -#include "sp_context.h" -#include "sp_state.h" -#include "sp_quad.h" -#include "sp_tile_cache.h" -#include "sp_quad_pipe.h" - - -enum format -{ - RGBA, - RGB, - LUMINANCE, - LUMINANCE_ALPHA, - INTENSITY -}; - - -/** Subclass of quad_stage */ -struct blend_quad_stage -{ - struct quad_stage base; - boolean clamp[PIPE_MAX_COLOR_BUFS]; /**< clamp colors to [0,1]? */ - enum format base_format[PIPE_MAX_COLOR_BUFS]; - enum util_format_type format_type[PIPE_MAX_COLOR_BUFS]; -}; - - -/** cast wrapper */ -static INLINE struct blend_quad_stage * -blend_quad_stage(struct quad_stage *stage) -{ - return (struct blend_quad_stage *) stage; -} - - -#define VEC4_COPY(DST, SRC) \ -do { \ - DST[0] = SRC[0]; \ - DST[1] = SRC[1]; \ - DST[2] = SRC[2]; \ - DST[3] = SRC[3]; \ -} while(0) - -#define VEC4_SCALAR(DST, SRC) \ -do { \ - DST[0] = SRC; \ - DST[1] = SRC; \ - DST[2] = SRC; \ - DST[3] = SRC; \ -} while(0) - -#define VEC4_ADD(R, A, B) \ -do { \ - R[0] = A[0] + B[0]; \ - R[1] = A[1] + B[1]; \ - R[2] = A[2] + B[2]; \ - R[3] = A[3] + B[3]; \ -} while (0) - -#define VEC4_SUB(R, A, B) \ -do { \ - R[0] = A[0] - B[0]; \ - R[1] = A[1] - B[1]; \ - R[2] = A[2] - B[2]; \ - R[3] = A[3] - B[3]; \ -} while (0) - -/** Add and limit result to ceiling of 1.0 */ -#define VEC4_ADD_SAT(R, A, B) \ -do { \ - R[0] = A[0] + B[0]; if (R[0] > 1.0f) R[0] = 1.0f; \ - R[1] = A[1] + B[1]; if (R[1] > 1.0f) R[1] = 1.0f; \ - R[2] = A[2] + B[2]; if (R[2] > 1.0f) R[2] = 1.0f; \ - R[3] = A[3] + B[3]; if (R[3] > 1.0f) R[3] = 1.0f; \ -} while (0) - -/** Subtract and limit result to floor of 0.0 */ -#define VEC4_SUB_SAT(R, A, B) \ -do { \ - R[0] = A[0] - B[0]; if (R[0] < 0.0f) R[0] = 0.0f; \ - R[1] = A[1] - B[1]; if (R[1] < 0.0f) R[1] = 0.0f; \ - R[2] = A[2] - B[2]; if (R[2] < 0.0f) R[2] = 0.0f; \ - R[3] = A[3] - B[3]; if (R[3] < 0.0f) R[3] = 0.0f; \ -} while (0) - -#define VEC4_MUL(R, A, B) \ -do { \ - R[0] = A[0] * B[0]; \ - R[1] = A[1] * B[1]; \ - R[2] = A[2] * B[2]; \ - R[3] = A[3] * B[3]; \ -} while (0) - -#define VEC4_MIN(R, A, B) \ -do { \ - R[0] = (A[0] < B[0]) ? A[0] : B[0]; \ - R[1] = (A[1] < B[1]) ? A[1] : B[1]; \ - R[2] = (A[2] < B[2]) ? A[2] : B[2]; \ - R[3] = (A[3] < B[3]) ? A[3] : B[3]; \ -} while (0) - -#define VEC4_MAX(R, A, B) \ -do { \ - R[0] = (A[0] > B[0]) ? A[0] : B[0]; \ - R[1] = (A[1] > B[1]) ? A[1] : B[1]; \ - R[2] = (A[2] > B[2]) ? A[2] : B[2]; \ - R[3] = (A[3] > B[3]) ? A[3] : B[3]; \ -} while (0) - - - -static void -logicop_quad(struct quad_stage *qs, - float (*quadColor)[4], - float (*dest)[4]) -{ - struct softpipe_context *softpipe = qs->softpipe; - ubyte src[4][4], dst[4][4], res[4][4]; - uint *src4 = (uint *) src; - uint *dst4 = (uint *) dst; - uint *res4 = (uint *) res; - uint j; - - - /* convert to ubyte */ - for (j = 0; j < 4; j++) { /* loop over R,G,B,A channels */ - dst[j][0] = float_to_ubyte(dest[j][0]); /* P0 */ - dst[j][1] = float_to_ubyte(dest[j][1]); /* P1 */ - dst[j][2] = float_to_ubyte(dest[j][2]); /* P2 */ - dst[j][3] = float_to_ubyte(dest[j][3]); /* P3 */ - - src[j][0] = float_to_ubyte(quadColor[j][0]); /* P0 */ - src[j][1] = float_to_ubyte(quadColor[j][1]); /* P1 */ - src[j][2] = float_to_ubyte(quadColor[j][2]); /* P2 */ - src[j][3] = float_to_ubyte(quadColor[j][3]); /* P3 */ - } - - switch (softpipe->blend->logicop_func) { - case PIPE_LOGICOP_CLEAR: - for (j = 0; j < 4; j++) - res4[j] = 0; - break; - case PIPE_LOGICOP_NOR: - for (j = 0; j < 4; j++) - res4[j] = ~(src4[j] | dst4[j]); - break; - case PIPE_LOGICOP_AND_INVERTED: - for (j = 0; j < 4; j++) - res4[j] = ~src4[j] & dst4[j]; - break; - case PIPE_LOGICOP_COPY_INVERTED: - for (j = 0; j < 4; j++) - res4[j] = ~src4[j]; - break; - case PIPE_LOGICOP_AND_REVERSE: - for (j = 0; j < 4; j++) - res4[j] = src4[j] & ~dst4[j]; - break; - case PIPE_LOGICOP_INVERT: - for (j = 0; j < 4; j++) - res4[j] = ~dst4[j]; - break; - case PIPE_LOGICOP_XOR: - for (j = 0; j < 4; j++) - res4[j] = dst4[j] ^ src4[j]; - break; - case PIPE_LOGICOP_NAND: - for (j = 0; j < 4; j++) - res4[j] = ~(src4[j] & dst4[j]); - break; - case PIPE_LOGICOP_AND: - for (j = 0; j < 4; j++) - res4[j] = src4[j] & dst4[j]; - break; - case PIPE_LOGICOP_EQUIV: - for (j = 0; j < 4; j++) - res4[j] = ~(src4[j] ^ dst4[j]); - break; - case PIPE_LOGICOP_NOOP: - for (j = 0; j < 4; j++) - res4[j] = dst4[j]; - break; - case PIPE_LOGICOP_OR_INVERTED: - for (j = 0; j < 4; j++) - res4[j] = ~src4[j] | dst4[j]; - break; - case PIPE_LOGICOP_COPY: - for (j = 0; j < 4; j++) - res4[j] = src4[j]; - break; - case PIPE_LOGICOP_OR_REVERSE: - for (j = 0; j < 4; j++) - res4[j] = src4[j] | ~dst4[j]; - break; - case PIPE_LOGICOP_OR: - for (j = 0; j < 4; j++) - res4[j] = src4[j] | dst4[j]; - break; - case PIPE_LOGICOP_SET: - for (j = 0; j < 4; j++) - res4[j] = ~0; - break; - default: - assert(0 && "invalid logicop mode"); - } - - for (j = 0; j < 4; j++) { - quadColor[j][0] = ubyte_to_float(res[j][0]); - quadColor[j][1] = ubyte_to_float(res[j][1]); - quadColor[j][2] = ubyte_to_float(res[j][2]); - quadColor[j][3] = ubyte_to_float(res[j][3]); - } -} - - - -/** - * Do blending for a 2x2 quad for one color buffer. - * \param quadColor the incoming quad colors - * \param dest the destination/framebuffer quad colors - * \param const_blend_color the constant blend color - * \param blend_index which set of blending terms to use - */ -static void -blend_quad(struct quad_stage *qs, - float (*quadColor)[4], - float (*dest)[4], - const float const_blend_color[4], - unsigned blend_index) -{ - static const float zero[4] = { 0, 0, 0, 0 }; - static const float one[4] = { 1, 1, 1, 1 }; - struct softpipe_context *softpipe = qs->softpipe; - float source[4][QUAD_SIZE] = { { 0 } }; - float blend_dest[4][QUAD_SIZE]; - - /* - * Compute src/first term RGB - */ - switch (softpipe->blend->rt[blend_index].rgb_src_factor) { - case PIPE_BLENDFACTOR_ONE: - VEC4_COPY(source[0], quadColor[0]); /* R */ - VEC4_COPY(source[1], quadColor[1]); /* G */ - VEC4_COPY(source[2], quadColor[2]); /* B */ - break; - case PIPE_BLENDFACTOR_SRC_COLOR: - VEC4_MUL(source[0], quadColor[0], quadColor[0]); /* R */ - VEC4_MUL(source[1], quadColor[1], quadColor[1]); /* G */ - VEC4_MUL(source[2], quadColor[2], quadColor[2]); /* B */ - break; - case PIPE_BLENDFACTOR_SRC_ALPHA: - { - const float *alpha = quadColor[3]; - VEC4_MUL(source[0], quadColor[0], alpha); /* R */ - VEC4_MUL(source[1], quadColor[1], alpha); /* G */ - VEC4_MUL(source[2], quadColor[2], alpha); /* B */ - } - break; - case PIPE_BLENDFACTOR_DST_COLOR: - VEC4_MUL(source[0], quadColor[0], dest[0]); /* R */ - VEC4_MUL(source[1], quadColor[1], dest[1]); /* G */ - VEC4_MUL(source[2], quadColor[2], dest[2]); /* B */ - break; - case PIPE_BLENDFACTOR_DST_ALPHA: - { - const float *alpha = dest[3]; - VEC4_MUL(source[0], quadColor[0], alpha); /* R */ - VEC4_MUL(source[1], quadColor[1], alpha); /* G */ - VEC4_MUL(source[2], quadColor[2], alpha); /* B */ - } - break; - case PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE: - { - const float *alpha = quadColor[3]; - float diff[4], temp[4]; - VEC4_SUB(diff, one, dest[3]); - VEC4_MIN(temp, alpha, diff); - VEC4_MUL(source[0], quadColor[0], temp); /* R */ - VEC4_MUL(source[1], quadColor[1], temp); /* G */ - VEC4_MUL(source[2], quadColor[2], temp); /* B */ - } - break; - case PIPE_BLENDFACTOR_CONST_COLOR: - { - float comp[4]; - VEC4_SCALAR(comp, const_blend_color[0]); /* R */ - VEC4_MUL(source[0], quadColor[0], comp); /* R */ - VEC4_SCALAR(comp, const_blend_color[1]); /* G */ - VEC4_MUL(source[1], quadColor[1], comp); /* G */ - VEC4_SCALAR(comp, const_blend_color[2]); /* B */ - VEC4_MUL(source[2], quadColor[2], comp); /* B */ - } - break; - case PIPE_BLENDFACTOR_CONST_ALPHA: - { - float alpha[4]; - VEC4_SCALAR(alpha, const_blend_color[3]); - VEC4_MUL(source[0], quadColor[0], alpha); /* R */ - VEC4_MUL(source[1], quadColor[1], alpha); /* G */ - VEC4_MUL(source[2], quadColor[2], alpha); /* B */ - } - break; - case PIPE_BLENDFACTOR_SRC1_COLOR: - assert(0); /* to do */ - break; - case PIPE_BLENDFACTOR_SRC1_ALPHA: - assert(0); /* to do */ - break; - case PIPE_BLENDFACTOR_ZERO: - VEC4_COPY(source[0], zero); /* R */ - VEC4_COPY(source[1], zero); /* G */ - VEC4_COPY(source[2], zero); /* B */ - break; - case PIPE_BLENDFACTOR_INV_SRC_COLOR: - { - float inv_comp[4]; - VEC4_SUB(inv_comp, one, quadColor[0]); /* R */ - VEC4_MUL(source[0], quadColor[0], inv_comp); /* R */ - VEC4_SUB(inv_comp, one, quadColor[1]); /* G */ - VEC4_MUL(source[1], quadColor[1], inv_comp); /* G */ - VEC4_SUB(inv_comp, one, quadColor[2]); /* B */ - VEC4_MUL(source[2], quadColor[2], inv_comp); /* B */ - } - break; - case PIPE_BLENDFACTOR_INV_SRC_ALPHA: - { - float inv_alpha[4]; - VEC4_SUB(inv_alpha, one, quadColor[3]); - VEC4_MUL(source[0], quadColor[0], inv_alpha); /* R */ - VEC4_MUL(source[1], quadColor[1], inv_alpha); /* G */ - VEC4_MUL(source[2], quadColor[2], inv_alpha); /* B */ - } - break; - case PIPE_BLENDFACTOR_INV_DST_ALPHA: - { - float inv_alpha[4]; - VEC4_SUB(inv_alpha, one, dest[3]); - VEC4_MUL(source[0], quadColor[0], inv_alpha); /* R */ - VEC4_MUL(source[1], quadColor[1], inv_alpha); /* G */ - VEC4_MUL(source[2], quadColor[2], inv_alpha); /* B */ - } - break; - case PIPE_BLENDFACTOR_INV_DST_COLOR: - { - float inv_comp[4]; - VEC4_SUB(inv_comp, one, dest[0]); /* R */ - VEC4_MUL(source[0], quadColor[0], inv_comp); /* R */ - VEC4_SUB(inv_comp, one, dest[1]); /* G */ - VEC4_MUL(source[1], quadColor[1], inv_comp); /* G */ - VEC4_SUB(inv_comp, one, dest[2]); /* B */ - VEC4_MUL(source[2], quadColor[2], inv_comp); /* B */ - } - break; - case PIPE_BLENDFACTOR_INV_CONST_COLOR: - { - float inv_comp[4]; - /* R */ - VEC4_SCALAR(inv_comp, 1.0f - const_blend_color[0]); - VEC4_MUL(source[0], quadColor[0], inv_comp); - /* G */ - VEC4_SCALAR(inv_comp, 1.0f - const_blend_color[1]); - VEC4_MUL(source[1], quadColor[1], inv_comp); - /* B */ - VEC4_SCALAR(inv_comp, 1.0f - const_blend_color[2]); - VEC4_MUL(source[2], quadColor[2], inv_comp); - } - break; - case PIPE_BLENDFACTOR_INV_CONST_ALPHA: - { - float inv_alpha[4]; - VEC4_SCALAR(inv_alpha, 1.0f - const_blend_color[3]); - VEC4_MUL(source[0], quadColor[0], inv_alpha); /* R */ - VEC4_MUL(source[1], quadColor[1], inv_alpha); /* G */ - VEC4_MUL(source[2], quadColor[2], inv_alpha); /* B */ - } - break; - case PIPE_BLENDFACTOR_INV_SRC1_COLOR: - assert(0); /* to do */ - break; - case PIPE_BLENDFACTOR_INV_SRC1_ALPHA: - assert(0); /* to do */ - break; - default: - assert(0 && "invalid rgb src factor"); - } - - /* - * Compute src/first term A - */ - switch (softpipe->blend->rt[blend_index].alpha_src_factor) { - case PIPE_BLENDFACTOR_ONE: - VEC4_COPY(source[3], quadColor[3]); /* A */ - break; - case PIPE_BLENDFACTOR_SRC_COLOR: - /* fall-through */ - case PIPE_BLENDFACTOR_SRC_ALPHA: - { - const float *alpha = quadColor[3]; - VEC4_MUL(source[3], quadColor[3], alpha); /* A */ - } - break; - case PIPE_BLENDFACTOR_DST_COLOR: - /* fall-through */ - case PIPE_BLENDFACTOR_DST_ALPHA: - VEC4_MUL(source[3], quadColor[3], dest[3]); /* A */ - break; - case PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE: - /* multiply alpha by 1.0 */ - VEC4_COPY(source[3], quadColor[3]); /* A */ - break; - case PIPE_BLENDFACTOR_CONST_COLOR: - /* fall-through */ - case PIPE_BLENDFACTOR_CONST_ALPHA: - { - float comp[4]; - VEC4_SCALAR(comp, const_blend_color[3]); /* A */ - VEC4_MUL(source[3], quadColor[3], comp); /* A */ - } - break; - case PIPE_BLENDFACTOR_ZERO: - VEC4_COPY(source[3], zero); /* A */ - break; - case PIPE_BLENDFACTOR_INV_SRC_COLOR: - /* fall-through */ - case PIPE_BLENDFACTOR_INV_SRC_ALPHA: - { - float inv_alpha[4]; - VEC4_SUB(inv_alpha, one, quadColor[3]); - VEC4_MUL(source[3], quadColor[3], inv_alpha); /* A */ - } - break; - case PIPE_BLENDFACTOR_INV_DST_COLOR: - /* fall-through */ - case PIPE_BLENDFACTOR_INV_DST_ALPHA: - { - float inv_alpha[4]; - VEC4_SUB(inv_alpha, one, dest[3]); - VEC4_MUL(source[3], quadColor[3], inv_alpha); /* A */ - } - break; - case PIPE_BLENDFACTOR_INV_CONST_COLOR: - /* fall-through */ - case PIPE_BLENDFACTOR_INV_CONST_ALPHA: - { - float inv_comp[4]; - /* A */ - VEC4_SCALAR(inv_comp, 1.0f - const_blend_color[3]); - VEC4_MUL(source[3], quadColor[3], inv_comp); - } - break; - default: - assert(0 && "invalid alpha src factor"); - } - - /* Save the original dest for use in masking */ - VEC4_COPY(blend_dest[0], dest[0]); - VEC4_COPY(blend_dest[1], dest[1]); - VEC4_COPY(blend_dest[2], dest[2]); - VEC4_COPY(blend_dest[3], dest[3]); - - - /* - * Compute blend_dest/second term RGB - */ - switch (softpipe->blend->rt[blend_index].rgb_dst_factor) { - case PIPE_BLENDFACTOR_ONE: - /* blend_dest = blend_dest * 1 NO-OP, leave blend_dest as-is */ - break; - case PIPE_BLENDFACTOR_SRC_COLOR: - VEC4_MUL(blend_dest[0], blend_dest[0], quadColor[0]); /* R */ - VEC4_MUL(blend_dest[1], blend_dest[1], quadColor[1]); /* G */ - VEC4_MUL(blend_dest[2], blend_dest[2], quadColor[2]); /* B */ - break; - case PIPE_BLENDFACTOR_SRC_ALPHA: - VEC4_MUL(blend_dest[0], blend_dest[0], quadColor[3]); /* R * A */ - VEC4_MUL(blend_dest[1], blend_dest[1], quadColor[3]); /* G * A */ - VEC4_MUL(blend_dest[2], blend_dest[2], quadColor[3]); /* B * A */ - break; - case PIPE_BLENDFACTOR_DST_ALPHA: - VEC4_MUL(blend_dest[0], blend_dest[0], blend_dest[3]); /* R * A */ - VEC4_MUL(blend_dest[1], blend_dest[1], blend_dest[3]); /* G * A */ - VEC4_MUL(blend_dest[2], blend_dest[2], blend_dest[3]); /* B * A */ - break; - case PIPE_BLENDFACTOR_DST_COLOR: - VEC4_MUL(blend_dest[0], blend_dest[0], blend_dest[0]); /* R */ - VEC4_MUL(blend_dest[1], blend_dest[1], blend_dest[1]); /* G */ - VEC4_MUL(blend_dest[2], blend_dest[2], blend_dest[2]); /* B */ - break; - case PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE: - { - const float *alpha = quadColor[3]; - float diff[4], temp[4]; - VEC4_SUB(diff, one, blend_dest[3]); - VEC4_MIN(temp, alpha, diff); - VEC4_MUL(blend_dest[0], quadColor[0], temp); /* R */ - VEC4_MUL(blend_dest[1], quadColor[1], temp); /* G */ - VEC4_MUL(blend_dest[2], quadColor[2], temp); /* B */ - } - break; - case PIPE_BLENDFACTOR_CONST_COLOR: - { - float comp[4]; - VEC4_SCALAR(comp, const_blend_color[0]); /* R */ - VEC4_MUL(blend_dest[0], blend_dest[0], comp); /* R */ - VEC4_SCALAR(comp, const_blend_color[1]); /* G */ - VEC4_MUL(blend_dest[1], blend_dest[1], comp); /* G */ - VEC4_SCALAR(comp, const_blend_color[2]); /* B */ - VEC4_MUL(blend_dest[2], blend_dest[2], comp); /* B */ - } - break; - case PIPE_BLENDFACTOR_CONST_ALPHA: - { - float comp[4]; - VEC4_SCALAR(comp, const_blend_color[3]); /* A */ - VEC4_MUL(blend_dest[0], blend_dest[0], comp); /* R */ - VEC4_MUL(blend_dest[1], blend_dest[1], comp); /* G */ - VEC4_MUL(blend_dest[2], blend_dest[2], comp); /* B */ - } - break; - case PIPE_BLENDFACTOR_ZERO: - VEC4_COPY(blend_dest[0], zero); /* R */ - VEC4_COPY(blend_dest[1], zero); /* G */ - VEC4_COPY(blend_dest[2], zero); /* B */ - break; - case PIPE_BLENDFACTOR_SRC1_COLOR: - case PIPE_BLENDFACTOR_SRC1_ALPHA: - /* XXX what are these? */ - assert(0); - break; - case PIPE_BLENDFACTOR_INV_SRC_COLOR: - { - float inv_comp[4]; - VEC4_SUB(inv_comp, one, quadColor[0]); /* R */ - VEC4_MUL(blend_dest[0], inv_comp, blend_dest[0]); /* R */ - VEC4_SUB(inv_comp, one, quadColor[1]); /* G */ - VEC4_MUL(blend_dest[1], inv_comp, blend_dest[1]); /* G */ - VEC4_SUB(inv_comp, one, quadColor[2]); /* B */ - VEC4_MUL(blend_dest[2], inv_comp, blend_dest[2]); /* B */ - } - break; - case PIPE_BLENDFACTOR_INV_SRC_ALPHA: - { - float one_minus_alpha[QUAD_SIZE]; - VEC4_SUB(one_minus_alpha, one, quadColor[3]); - VEC4_MUL(blend_dest[0], blend_dest[0], one_minus_alpha); /* R */ - VEC4_MUL(blend_dest[1], blend_dest[1], one_minus_alpha); /* G */ - VEC4_MUL(blend_dest[2], blend_dest[2], one_minus_alpha); /* B */ - } - break; - case PIPE_BLENDFACTOR_INV_DST_ALPHA: - { - float inv_comp[4]; - VEC4_SUB(inv_comp, one, blend_dest[3]); /* A */ - VEC4_MUL(blend_dest[0], inv_comp, blend_dest[0]); /* R */ - VEC4_MUL(blend_dest[1], inv_comp, blend_dest[1]); /* G */ - VEC4_MUL(blend_dest[2], inv_comp, blend_dest[2]); /* B */ - } - break; - case PIPE_BLENDFACTOR_INV_DST_COLOR: - { - float inv_comp[4]; - VEC4_SUB(inv_comp, one, blend_dest[0]); /* R */ - VEC4_MUL(blend_dest[0], blend_dest[0], inv_comp); /* R */ - VEC4_SUB(inv_comp, one, blend_dest[1]); /* G */ - VEC4_MUL(blend_dest[1], blend_dest[1], inv_comp); /* G */ - VEC4_SUB(inv_comp, one, blend_dest[2]); /* B */ - VEC4_MUL(blend_dest[2], blend_dest[2], inv_comp); /* B */ - } - break; - case PIPE_BLENDFACTOR_INV_CONST_COLOR: - { - float inv_comp[4]; - /* R */ - VEC4_SCALAR(inv_comp, 1.0f - const_blend_color[0]); - VEC4_MUL(blend_dest[0], blend_dest[0], inv_comp); - /* G */ - VEC4_SCALAR(inv_comp, 1.0f - const_blend_color[1]); - VEC4_MUL(blend_dest[1], blend_dest[1], inv_comp); - /* B */ - VEC4_SCALAR(inv_comp, 1.0f - const_blend_color[2]); - VEC4_MUL(blend_dest[2], blend_dest[2], inv_comp); - } - break; - case PIPE_BLENDFACTOR_INV_CONST_ALPHA: - { - float inv_comp[4]; - VEC4_SCALAR(inv_comp, 1.0f - const_blend_color[3]); - VEC4_MUL(blend_dest[0], blend_dest[0], inv_comp); - VEC4_MUL(blend_dest[1], blend_dest[1], inv_comp); - VEC4_MUL(blend_dest[2], blend_dest[2], inv_comp); - } - break; - case PIPE_BLENDFACTOR_INV_SRC1_COLOR: - case PIPE_BLENDFACTOR_INV_SRC1_ALPHA: - /* XXX what are these? */ - assert(0); - break; - default: - assert(0 && "invalid rgb dst factor"); - } - - /* - * Compute blend_dest/second term A - */ - switch (softpipe->blend->rt[blend_index].alpha_dst_factor) { - case PIPE_BLENDFACTOR_ONE: - /* blend_dest = blend_dest * 1 NO-OP, leave blend_dest as-is */ - break; - case PIPE_BLENDFACTOR_SRC_COLOR: - /* fall-through */ - case PIPE_BLENDFACTOR_SRC_ALPHA: - VEC4_MUL(blend_dest[3], blend_dest[3], quadColor[3]); /* A * A */ - break; - case PIPE_BLENDFACTOR_DST_COLOR: - /* fall-through */ - case PIPE_BLENDFACTOR_DST_ALPHA: - VEC4_MUL(blend_dest[3], blend_dest[3], blend_dest[3]); /* A */ - break; - case PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE: - /* blend_dest = blend_dest * 1 NO-OP, leave blend_dest as-is */ - break; - case PIPE_BLENDFACTOR_CONST_COLOR: - /* fall-through */ - case PIPE_BLENDFACTOR_CONST_ALPHA: - { - float comp[4]; - VEC4_SCALAR(comp, const_blend_color[3]); /* A */ - VEC4_MUL(blend_dest[3], blend_dest[3], comp); /* A */ - } - break; - case PIPE_BLENDFACTOR_ZERO: - VEC4_COPY(blend_dest[3], zero); /* A */ - break; - case PIPE_BLENDFACTOR_INV_SRC_COLOR: - /* fall-through */ - case PIPE_BLENDFACTOR_INV_SRC_ALPHA: - { - float one_minus_alpha[QUAD_SIZE]; - VEC4_SUB(one_minus_alpha, one, quadColor[3]); - VEC4_MUL(blend_dest[3], blend_dest[3], one_minus_alpha); /* A */ - } - break; - case PIPE_BLENDFACTOR_INV_DST_COLOR: - /* fall-through */ - case PIPE_BLENDFACTOR_INV_DST_ALPHA: - { - float inv_comp[4]; - VEC4_SUB(inv_comp, one, blend_dest[3]); /* A */ - VEC4_MUL(blend_dest[3], inv_comp, blend_dest[3]); /* A */ - } - break; - case PIPE_BLENDFACTOR_INV_CONST_COLOR: - /* fall-through */ - case PIPE_BLENDFACTOR_INV_CONST_ALPHA: - { - float inv_comp[4]; - VEC4_SCALAR(inv_comp, 1.0f - const_blend_color[3]); - VEC4_MUL(blend_dest[3], blend_dest[3], inv_comp); - } - break; - default: - assert(0 && "invalid alpha dst factor"); - } - - /* - * Combine RGB terms - */ - switch (softpipe->blend->rt[blend_index].rgb_func) { - case PIPE_BLEND_ADD: - VEC4_ADD(quadColor[0], source[0], blend_dest[0]); /* R */ - VEC4_ADD(quadColor[1], source[1], blend_dest[1]); /* G */ - VEC4_ADD(quadColor[2], source[2], blend_dest[2]); /* B */ - break; - case PIPE_BLEND_SUBTRACT: - VEC4_SUB(quadColor[0], source[0], blend_dest[0]); /* R */ - VEC4_SUB(quadColor[1], source[1], blend_dest[1]); /* G */ - VEC4_SUB(quadColor[2], source[2], blend_dest[2]); /* B */ - break; - case PIPE_BLEND_REVERSE_SUBTRACT: - VEC4_SUB(quadColor[0], blend_dest[0], source[0]); /* R */ - VEC4_SUB(quadColor[1], blend_dest[1], source[1]); /* G */ - VEC4_SUB(quadColor[2], blend_dest[2], source[2]); /* B */ - break; - case PIPE_BLEND_MIN: - VEC4_MIN(quadColor[0], source[0], blend_dest[0]); /* R */ - VEC4_MIN(quadColor[1], source[1], blend_dest[1]); /* G */ - VEC4_MIN(quadColor[2], source[2], blend_dest[2]); /* B */ - break; - case PIPE_BLEND_MAX: - VEC4_MAX(quadColor[0], source[0], blend_dest[0]); /* R */ - VEC4_MAX(quadColor[1], source[1], blend_dest[1]); /* G */ - VEC4_MAX(quadColor[2], source[2], blend_dest[2]); /* B */ - break; - default: - assert(0 && "invalid rgb blend func"); - } - - /* - * Combine A terms - */ - switch (softpipe->blend->rt[blend_index].alpha_func) { - case PIPE_BLEND_ADD: - VEC4_ADD(quadColor[3], source[3], blend_dest[3]); /* A */ - break; - case PIPE_BLEND_SUBTRACT: - VEC4_SUB(quadColor[3], source[3], blend_dest[3]); /* A */ - break; - case PIPE_BLEND_REVERSE_SUBTRACT: - VEC4_SUB(quadColor[3], blend_dest[3], source[3]); /* A */ - break; - case PIPE_BLEND_MIN: - VEC4_MIN(quadColor[3], source[3], blend_dest[3]); /* A */ - break; - case PIPE_BLEND_MAX: - VEC4_MAX(quadColor[3], source[3], blend_dest[3]); /* A */ - break; - default: - assert(0 && "invalid alpha blend func"); - } -} - -static void -colormask_quad(unsigned colormask, - float (*quadColor)[4], - float (*dest)[4]) -{ - /* R */ - if (!(colormask & PIPE_MASK_R)) - COPY_4V(quadColor[0], dest[0]); - - /* G */ - if (!(colormask & PIPE_MASK_G)) - COPY_4V(quadColor[1], dest[1]); - - /* B */ - if (!(colormask & PIPE_MASK_B)) - COPY_4V(quadColor[2], dest[2]); - - /* A */ - if (!(colormask & PIPE_MASK_A)) - COPY_4V(quadColor[3], dest[3]); -} - - -/** - * Clamp all colors in a quad to [0, 1] - */ -static void -clamp_colors(float (*quadColor)[4]) -{ - unsigned i, j; - - for (j = 0; j < QUAD_SIZE; j++) { - for (i = 0; i < 4; i++) { - quadColor[i][j] = CLAMP(quadColor[i][j], 0.0F, 1.0F); - } - } -} - - -/** - * If we're drawing to a luminance, luminance/alpha or intensity surface - * we have to adjust (rebase) the fragment/quad colors before writing them - * to the tile cache. The tile cache always stores RGBA colors but if - * we're caching a L/A surface (for example) we need to be sure that R=G=B - * so that subsequent reads from the surface cache appear to return L/A - * values. - * The piglit fbo-blending-formats test will exercise this. - */ -static void -rebase_colors(enum format base_format, float (*quadColor)[4]) -{ - unsigned i; - - switch (base_format) { - case RGB: - for (i = 0; i < 4; i++) { - /* A = 1 */ - quadColor[3][i] = 1.0F; - } - break; - case LUMINANCE: - for (i = 0; i < 4; i++) { - /* B = G = R */ - quadColor[2][i] = quadColor[1][i] = quadColor[0][i]; - /* A = 1 */ - quadColor[3][i] = 1.0F; - } - break; - case LUMINANCE_ALPHA: - for (i = 0; i < 4; i++) { - /* B = G = R */ - quadColor[2][i] = quadColor[1][i] = quadColor[0][i]; - } - break; - case INTENSITY: - for (i = 0; i < 4; i++) { - /* A = B = G = R */ - quadColor[3][i] = quadColor[2][i] = quadColor[1][i] = quadColor[0][i]; - } - break; - default: - ; /* nothing */ - } -} - - - -static void -blend_fallback(struct quad_stage *qs, - struct quad_header *quads[], - unsigned nr) -{ - const struct blend_quad_stage *bqs = blend_quad_stage(qs); - struct softpipe_context *softpipe = qs->softpipe; - const struct pipe_blend_state *blend = softpipe->blend; - unsigned cbuf; - boolean write_all; - - write_all = softpipe->fs_variant->info.color0_writes_all_cbufs; - - for (cbuf = 0; cbuf < softpipe->framebuffer.nr_cbufs; cbuf++) - { - /* which blend/mask state index to use: */ - const uint blend_buf = blend->independent_blend_enable ? cbuf : 0; - float dest[4][QUAD_SIZE]; - struct softpipe_cached_tile *tile - = sp_get_cached_tile(softpipe->cbuf_cache[cbuf], - quads[0]->input.x0, - quads[0]->input.y0); - const boolean clamp = bqs->clamp[cbuf]; - const float *blend_color; - uint q, i, j; - - if (clamp) - blend_color = softpipe->blend_color_clamped.color; - else - blend_color = softpipe->blend_color.color; - - for (q = 0; q < nr; q++) { - struct quad_header *quad = quads[q]; - float (*quadColor)[4]; - float temp_quad_color[QUAD_SIZE][4]; - const int itx = (quad->input.x0 & (TILE_SIZE-1)); - const int ity = (quad->input.y0 & (TILE_SIZE-1)); - - if (write_all) { - for (j = 0; j < QUAD_SIZE; j++) { - for (i = 0; i < 4; i++) { - temp_quad_color[i][j] = quad->output.color[0][i][j]; - } - } - quadColor = temp_quad_color; - } else { - quadColor = quad->output.color[cbuf]; - } - - /* If fixed-point dest color buffer, need to clamp the incoming - * fragment colors now. - */ - if (clamp || softpipe->rasterizer->clamp_fragment_color) { - clamp_colors(quadColor); - } - - /* get/swizzle dest colors - */ - for (j = 0; j < QUAD_SIZE; j++) { - int x = itx + (j & 1); - int y = ity + (j >> 1); - for (i = 0; i < 4; i++) { - dest[i][j] = tile->data.color[y][x][i]; - } - } - - - if (blend->logicop_enable) { - if (bqs->format_type[cbuf] != UTIL_FORMAT_TYPE_FLOAT) { - logicop_quad( qs, quadColor, dest ); - } - } - else if (blend->rt[blend_buf].blend_enable) { - blend_quad(qs, quadColor, dest, blend_color, blend_buf); - - /* If fixed-point dest color buffer, need to clamp the outgoing - * fragment colors now. - */ - if (clamp) { - clamp_colors(quadColor); - } - } - - rebase_colors(bqs->base_format[cbuf], quadColor); - - if (blend->rt[blend_buf].colormask != 0xf) - colormask_quad( blend->rt[cbuf].colormask, quadColor, dest); - - /* Output color values - */ - for (j = 0; j < QUAD_SIZE; j++) { - if (quad->inout.mask & (1 << j)) { - int x = itx + (j & 1); - int y = ity + (j >> 1); - for (i = 0; i < 4; i++) { /* loop over color chans */ - tile->data.color[y][x][i] = quadColor[i][j]; - } - } - } - } - } -} - - -static void -blend_single_add_src_alpha_inv_src_alpha(struct quad_stage *qs, - struct quad_header *quads[], - unsigned nr) -{ - const struct blend_quad_stage *bqs = blend_quad_stage(qs); - static const float one[4] = { 1, 1, 1, 1 }; - float one_minus_alpha[QUAD_SIZE]; - float dest[4][QUAD_SIZE]; - float source[4][QUAD_SIZE]; - uint i, j, q; - - struct softpipe_cached_tile *tile - = sp_get_cached_tile(qs->softpipe->cbuf_cache[0], - quads[0]->input.x0, - quads[0]->input.y0); - - for (q = 0; q < nr; q++) { - struct quad_header *quad = quads[q]; - float (*quadColor)[4] = quad->output.color[0]; - const float *alpha = quadColor[3]; - const int itx = (quad->input.x0 & (TILE_SIZE-1)); - const int ity = (quad->input.y0 & (TILE_SIZE-1)); - - /* get/swizzle dest colors */ - for (j = 0; j < QUAD_SIZE; j++) { - int x = itx + (j & 1); - int y = ity + (j >> 1); - for (i = 0; i < 4; i++) { - dest[i][j] = tile->data.color[y][x][i]; - } - } - - /* If fixed-point dest color buffer, need to clamp the incoming - * fragment colors now. - */ - if (bqs->clamp[0] || qs->softpipe->rasterizer->clamp_fragment_color) { - clamp_colors(quadColor); - } - - VEC4_MUL(source[0], quadColor[0], alpha); /* R */ - VEC4_MUL(source[1], quadColor[1], alpha); /* G */ - VEC4_MUL(source[2], quadColor[2], alpha); /* B */ - VEC4_MUL(source[3], quadColor[3], alpha); /* A */ - - VEC4_SUB(one_minus_alpha, one, alpha); - VEC4_MUL(dest[0], dest[0], one_minus_alpha); /* R */ - VEC4_MUL(dest[1], dest[1], one_minus_alpha); /* G */ - VEC4_MUL(dest[2], dest[2], one_minus_alpha); /* B */ - VEC4_MUL(dest[3], dest[3], one_minus_alpha); /* A */ - - VEC4_ADD(quadColor[0], source[0], dest[0]); /* R */ - VEC4_ADD(quadColor[1], source[1], dest[1]); /* G */ - VEC4_ADD(quadColor[2], source[2], dest[2]); /* B */ - VEC4_ADD(quadColor[3], source[3], dest[3]); /* A */ - - /* If fixed-point dest color buffer, need to clamp the outgoing - * fragment colors now. - */ - if (bqs->clamp[0]) { - clamp_colors(quadColor); - } - - rebase_colors(bqs->base_format[0], quadColor); - - for (j = 0; j < QUAD_SIZE; j++) { - if (quad->inout.mask & (1 << j)) { - int x = itx + (j & 1); - int y = ity + (j >> 1); - for (i = 0; i < 4; i++) { /* loop over color chans */ - tile->data.color[y][x][i] = quadColor[i][j]; - } - } - } - } -} - -static void -blend_single_add_one_one(struct quad_stage *qs, - struct quad_header *quads[], - unsigned nr) -{ - const struct blend_quad_stage *bqs = blend_quad_stage(qs); - float dest[4][QUAD_SIZE]; - uint i, j, q; - - struct softpipe_cached_tile *tile - = sp_get_cached_tile(qs->softpipe->cbuf_cache[0], - quads[0]->input.x0, - quads[0]->input.y0); - - for (q = 0; q < nr; q++) { - struct quad_header *quad = quads[q]; - float (*quadColor)[4] = quad->output.color[0]; - const int itx = (quad->input.x0 & (TILE_SIZE-1)); - const int ity = (quad->input.y0 & (TILE_SIZE-1)); - - /* get/swizzle dest colors */ - for (j = 0; j < QUAD_SIZE; j++) { - int x = itx + (j & 1); - int y = ity + (j >> 1); - for (i = 0; i < 4; i++) { - dest[i][j] = tile->data.color[y][x][i]; - } - } - - /* If fixed-point dest color buffer, need to clamp the incoming - * fragment colors now. - */ - if (bqs->clamp[0] || qs->softpipe->rasterizer->clamp_fragment_color) { - clamp_colors(quadColor); - } - - VEC4_ADD(quadColor[0], quadColor[0], dest[0]); /* R */ - VEC4_ADD(quadColor[1], quadColor[1], dest[1]); /* G */ - VEC4_ADD(quadColor[2], quadColor[2], dest[2]); /* B */ - VEC4_ADD(quadColor[3], quadColor[3], dest[3]); /* A */ - - /* If fixed-point dest color buffer, need to clamp the outgoing - * fragment colors now. - */ - if (bqs->clamp[0]) { - clamp_colors(quadColor); - } - - rebase_colors(bqs->base_format[0], quadColor); - - for (j = 0; j < QUAD_SIZE; j++) { - if (quad->inout.mask & (1 << j)) { - int x = itx + (j & 1); - int y = ity + (j >> 1); - for (i = 0; i < 4; i++) { /* loop over color chans */ - tile->data.color[y][x][i] = quadColor[i][j]; - } - } - } - } -} - - -/** - * Just copy the quad color to the framebuffer tile (respecting the writemask), - * for one color buffer. - * Clamping will be done, if needed (depending on the color buffer's - * datatype) when we write/pack the colors later. - */ -static void -single_output_color(struct quad_stage *qs, - struct quad_header *quads[], - unsigned nr) -{ - const struct blend_quad_stage *bqs = blend_quad_stage(qs); - uint i, j, q; - - struct softpipe_cached_tile *tile - = sp_get_cached_tile(qs->softpipe->cbuf_cache[0], - quads[0]->input.x0, - quads[0]->input.y0); - - for (q = 0; q < nr; q++) { - struct quad_header *quad = quads[q]; - float (*quadColor)[4] = quad->output.color[0]; - const int itx = (quad->input.x0 & (TILE_SIZE-1)); - const int ity = (quad->input.y0 & (TILE_SIZE-1)); - - if (qs->softpipe->rasterizer->clamp_fragment_color) - clamp_colors(quadColor); - - rebase_colors(bqs->base_format[0], quadColor); - - for (j = 0; j < QUAD_SIZE; j++) { - if (quad->inout.mask & (1 << j)) { - int x = itx + (j & 1); - int y = ity + (j >> 1); - for (i = 0; i < 4; i++) { /* loop over color chans */ - tile->data.color[y][x][i] = quadColor[i][j]; - } - } - } - } -} - -static void -blend_noop(struct quad_stage *qs, - struct quad_header *quads[], - unsigned nr) -{ -} - - -static void -choose_blend_quad(struct quad_stage *qs, - struct quad_header *quads[], - unsigned nr) -{ - struct blend_quad_stage *bqs = blend_quad_stage(qs); - struct softpipe_context *softpipe = qs->softpipe; - const struct pipe_blend_state *blend = softpipe->blend; - unsigned i; - - qs->run = blend_fallback; - - if (softpipe->framebuffer.nr_cbufs == 0) { - qs->run = blend_noop; - } - else if (!softpipe->blend->logicop_enable && - softpipe->blend->rt[0].colormask == 0xf && - softpipe->framebuffer.nr_cbufs == 1) - { - if (!blend->rt[0].blend_enable) { - qs->run = single_output_color; - } - else if (blend->rt[0].rgb_src_factor == blend->rt[0].alpha_src_factor && - blend->rt[0].rgb_dst_factor == blend->rt[0].alpha_dst_factor && - blend->rt[0].rgb_func == blend->rt[0].alpha_func) - { - if (blend->rt[0].alpha_func == PIPE_BLEND_ADD) { - if (blend->rt[0].rgb_src_factor == PIPE_BLENDFACTOR_ONE && - blend->rt[0].rgb_dst_factor == PIPE_BLENDFACTOR_ONE) { - qs->run = blend_single_add_one_one; - } - else if (blend->rt[0].rgb_src_factor == PIPE_BLENDFACTOR_SRC_ALPHA && - blend->rt[0].rgb_dst_factor == PIPE_BLENDFACTOR_INV_SRC_ALPHA) - qs->run = blend_single_add_src_alpha_inv_src_alpha; - - } - } - } - - /* For each color buffer, determine if the buffer has destination alpha and - * whether color clamping is needed. - */ - for (i = 0; i < softpipe->framebuffer.nr_cbufs; i++) { - const enum pipe_format format = softpipe->framebuffer.cbufs[i]->format; - const struct util_format_description *desc = - util_format_description(format); - /* assuming all or no color channels are normalized: */ - bqs->clamp[i] = desc->channel[0].normalized; - bqs->format_type[i] = desc->channel[0].type; - - if (util_format_is_intensity(format)) - bqs->base_format[i] = INTENSITY; - else if (util_format_is_luminance(format)) - bqs->base_format[i] = LUMINANCE; - else if (util_format_is_luminance_alpha(format)) - bqs->base_format[i] = LUMINANCE_ALPHA; - else if (util_format_is_rgb_no_alpha(format)) - bqs->base_format[i] = RGB; - else - bqs->base_format[i] = RGBA; - } - - qs->run(qs, quads, nr); -} - - -static void blend_begin(struct quad_stage *qs) -{ - qs->run = choose_blend_quad; -} - - -static void blend_destroy(struct quad_stage *qs) -{ - FREE( qs ); -} - - -struct quad_stage *sp_quad_blend_stage( struct softpipe_context *softpipe ) -{ - struct blend_quad_stage *stage = CALLOC_STRUCT(blend_quad_stage); - - if (!stage) - return NULL; - - stage->base.softpipe = softpipe; - stage->base.begin = blend_begin; - stage->base.run = choose_blend_quad; - stage->base.destroy = blend_destroy; - - return &stage->base; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_depth_test.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_depth_test.c deleted file mode 100644 index 529a5ad5a4e..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_depth_test.c +++ /dev/null @@ -1,983 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \brief Quad depth / stencil testing - */ - -#include "pipe/p_defines.h" -#include "util/u_format.h" -#include "util/u_math.h" -#include "util/u_memory.h" -#include "tgsi/tgsi_scan.h" -#include "sp_context.h" -#include "sp_quad.h" -#include "sp_quad_pipe.h" -#include "sp_tile_cache.h" -#include "sp_state.h" /* for sp_fragment_shader */ - - -struct depth_data { - struct pipe_surface *ps; - enum pipe_format format; - unsigned bzzzz[QUAD_SIZE]; /**< Z values fetched from depth buffer */ - unsigned qzzzz[QUAD_SIZE]; /**< Z values from the quad */ - ubyte stencilVals[QUAD_SIZE]; - boolean use_shader_stencil_refs; - ubyte shader_stencil_refs[QUAD_SIZE]; - struct softpipe_cached_tile *tile; -}; - - - -static void -get_depth_stencil_values( struct depth_data *data, - const struct quad_header *quad ) -{ - unsigned j; - const struct softpipe_cached_tile *tile = data->tile; - - switch (data->format) { - case PIPE_FORMAT_Z16_UNORM: - for (j = 0; j < QUAD_SIZE; j++) { - int x = quad->input.x0 % TILE_SIZE + (j & 1); - int y = quad->input.y0 % TILE_SIZE + (j >> 1); - data->bzzzz[j] = tile->data.depth16[y][x]; - } - break; - case PIPE_FORMAT_Z32_UNORM: - for (j = 0; j < QUAD_SIZE; j++) { - int x = quad->input.x0 % TILE_SIZE + (j & 1); - int y = quad->input.y0 % TILE_SIZE + (j >> 1); - data->bzzzz[j] = tile->data.depth32[y][x]; - } - break; - case PIPE_FORMAT_Z24X8_UNORM: - case PIPE_FORMAT_Z24_UNORM_S8_UINT: - for (j = 0; j < QUAD_SIZE; j++) { - int x = quad->input.x0 % TILE_SIZE + (j & 1); - int y = quad->input.y0 % TILE_SIZE + (j >> 1); - data->bzzzz[j] = tile->data.depth32[y][x] & 0xffffff; - data->stencilVals[j] = tile->data.depth32[y][x] >> 24; - } - break; - case PIPE_FORMAT_X8Z24_UNORM: - case PIPE_FORMAT_S8_UINT_Z24_UNORM: - for (j = 0; j < QUAD_SIZE; j++) { - int x = quad->input.x0 % TILE_SIZE + (j & 1); - int y = quad->input.y0 % TILE_SIZE + (j >> 1); - data->bzzzz[j] = tile->data.depth32[y][x] >> 8; - data->stencilVals[j] = tile->data.depth32[y][x] & 0xff; - } - break; - case PIPE_FORMAT_S8_UINT: - for (j = 0; j < QUAD_SIZE; j++) { - int x = quad->input.x0 % TILE_SIZE + (j & 1); - int y = quad->input.y0 % TILE_SIZE + (j >> 1); - data->bzzzz[j] = 0; - data->stencilVals[j] = tile->data.stencil8[y][x]; - } - break; - case PIPE_FORMAT_Z32_FLOAT: - for (j = 0; j < QUAD_SIZE; j++) { - int x = quad->input.x0 % TILE_SIZE + (j & 1); - int y = quad->input.y0 % TILE_SIZE + (j >> 1); - data->bzzzz[j] = tile->data.depth32[y][x]; - } - break; - case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT: - for (j = 0; j < QUAD_SIZE; j++) { - int x = quad->input.x0 % TILE_SIZE + (j & 1); - int y = quad->input.y0 % TILE_SIZE + (j >> 1); - data->bzzzz[j] = tile->data.depth64[y][x] & 0xffffffff; - data->stencilVals[j] = (tile->data.depth64[y][x] >> 32) & 0xff; - } - break; - default: - assert(0); - } -} - - -/** - * If the shader has not been run, interpolate the depth values - * ourselves. - */ -static void -interpolate_quad_depth( struct quad_header *quad ) -{ - const float fx = (float) quad->input.x0; - const float fy = (float) quad->input.y0; - const float dzdx = quad->posCoef->dadx[2]; - const float dzdy = quad->posCoef->dady[2]; - const float z0 = quad->posCoef->a0[2] + dzdx * fx + dzdy * fy; - - quad->output.depth[0] = z0; - quad->output.depth[1] = z0 + dzdx; - quad->output.depth[2] = z0 + dzdy; - quad->output.depth[3] = z0 + dzdx + dzdy; -} - - -/** - * Compute the depth_data::qzzzz[] values from the float fragment Z values. - */ -static void -convert_quad_depth( struct depth_data *data, - const struct quad_header *quad ) -{ - unsigned j; - - /* Convert quad's float depth values to int depth values (qzzzz). - * If the Z buffer stores integer values, we _have_ to do the depth - * compares with integers (not floats). Otherwise, the float->int->float - * conversion of Z values (which isn't an identity function) will cause - * Z-fighting errors. - */ - switch (data->format) { - case PIPE_FORMAT_Z16_UNORM: - { - float scale = 65535.0; - - for (j = 0; j < QUAD_SIZE; j++) { - data->qzzzz[j] = (unsigned) (quad->output.depth[j] * scale); - } - } - break; - case PIPE_FORMAT_Z32_UNORM: - { - double scale = (double) (uint) ~0UL; - - for (j = 0; j < QUAD_SIZE; j++) { - data->qzzzz[j] = (unsigned) (quad->output.depth[j] * scale); - } - } - break; - case PIPE_FORMAT_Z24X8_UNORM: - case PIPE_FORMAT_Z24_UNORM_S8_UINT: - { - float scale = (float) ((1 << 24) - 1); - - for (j = 0; j < QUAD_SIZE; j++) { - data->qzzzz[j] = (unsigned) (quad->output.depth[j] * scale); - } - } - break; - case PIPE_FORMAT_X8Z24_UNORM: - case PIPE_FORMAT_S8_UINT_Z24_UNORM: - { - float scale = (float) ((1 << 24) - 1); - - for (j = 0; j < QUAD_SIZE; j++) { - data->qzzzz[j] = (unsigned) (quad->output.depth[j] * scale); - } - } - break; - case PIPE_FORMAT_Z32_FLOAT: - case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT: - { - union fi fui; - - for (j = 0; j < QUAD_SIZE; j++) { - fui.f = quad->output.depth[j]; - data->qzzzz[j] = fui.ui; - } - } - break; - default: - assert(0); - } -} - - -/** - * Compute the depth_data::shader_stencil_refs[] values from the float - * fragment stencil values. - */ -static void -convert_quad_stencil( struct depth_data *data, - const struct quad_header *quad ) -{ - unsigned j; - - data->use_shader_stencil_refs = TRUE; - /* Copy quads stencil values - */ - switch (data->format) { - case PIPE_FORMAT_Z24X8_UNORM: - case PIPE_FORMAT_Z24_UNORM_S8_UINT: - case PIPE_FORMAT_X8Z24_UNORM: - case PIPE_FORMAT_S8_UINT_Z24_UNORM: - case PIPE_FORMAT_S8_UINT: - case PIPE_FORMAT_Z32_FLOAT: - case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT: - for (j = 0; j < QUAD_SIZE; j++) { - data->shader_stencil_refs[j] = ((unsigned)(quad->output.stencil[j])); - } - break; - default: - assert(0); - } -} - - -/** - * Write data->bzzzz[] values and data->stencilVals into the Z/stencil buffer. - */ -static void -write_depth_stencil_values( struct depth_data *data, - struct quad_header *quad ) -{ - struct softpipe_cached_tile *tile = data->tile; - unsigned j; - - /* put updated Z values back into cached tile */ - switch (data->format) { - case PIPE_FORMAT_Z16_UNORM: - for (j = 0; j < QUAD_SIZE; j++) { - int x = quad->input.x0 % TILE_SIZE + (j & 1); - int y = quad->input.y0 % TILE_SIZE + (j >> 1); - tile->data.depth16[y][x] = (ushort) data->bzzzz[j]; - } - break; - case PIPE_FORMAT_Z24X8_UNORM: - case PIPE_FORMAT_Z32_UNORM: - for (j = 0; j < QUAD_SIZE; j++) { - int x = quad->input.x0 % TILE_SIZE + (j & 1); - int y = quad->input.y0 % TILE_SIZE + (j >> 1); - tile->data.depth32[y][x] = data->bzzzz[j]; - } - break; - case PIPE_FORMAT_Z24_UNORM_S8_UINT: - for (j = 0; j < QUAD_SIZE; j++) { - int x = quad->input.x0 % TILE_SIZE + (j & 1); - int y = quad->input.y0 % TILE_SIZE + (j >> 1); - tile->data.depth32[y][x] = (data->stencilVals[j] << 24) | data->bzzzz[j]; - } - break; - case PIPE_FORMAT_S8_UINT_Z24_UNORM: - for (j = 0; j < QUAD_SIZE; j++) { - int x = quad->input.x0 % TILE_SIZE + (j & 1); - int y = quad->input.y0 % TILE_SIZE + (j >> 1); - tile->data.depth32[y][x] = (data->bzzzz[j] << 8) | data->stencilVals[j]; - } - break; - case PIPE_FORMAT_X8Z24_UNORM: - for (j = 0; j < QUAD_SIZE; j++) { - int x = quad->input.x0 % TILE_SIZE + (j & 1); - int y = quad->input.y0 % TILE_SIZE + (j >> 1); - tile->data.depth32[y][x] = data->bzzzz[j] << 8; - } - break; - case PIPE_FORMAT_S8_UINT: - for (j = 0; j < QUAD_SIZE; j++) { - int x = quad->input.x0 % TILE_SIZE + (j & 1); - int y = quad->input.y0 % TILE_SIZE + (j >> 1); - tile->data.stencil8[y][x] = data->stencilVals[j]; - } - break; - case PIPE_FORMAT_Z32_FLOAT: - for (j = 0; j < QUAD_SIZE; j++) { - int x = quad->input.x0 % TILE_SIZE + (j & 1); - int y = quad->input.y0 % TILE_SIZE + (j >> 1); - tile->data.depth32[y][x] = data->bzzzz[j]; - } - break; - case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT: - for (j = 0; j < QUAD_SIZE; j++) { - int x = quad->input.x0 % TILE_SIZE + (j & 1); - int y = quad->input.y0 % TILE_SIZE + (j >> 1); - tile->data.depth64[y][x] = (uint64_t)data->bzzzz[j] | ((uint64_t)data->stencilVals[j] << 32); - } - break; - default: - assert(0); - } -} - - - -/** Only 8-bit stencil supported */ -#define STENCIL_MAX 0xff - - -/** - * Do the basic stencil test (compare stencil buffer values against the - * reference value. - * - * \param data->stencilVals the stencil values from the stencil buffer - * \param func the stencil func (PIPE_FUNC_x) - * \param ref the stencil reference value - * \param valMask the stencil value mask indicating which bits of the stencil - * values and ref value are to be used. - * \return mask indicating which pixels passed the stencil test - */ -static unsigned -do_stencil_test(struct depth_data *data, - unsigned func, - unsigned ref, unsigned valMask) -{ - unsigned passMask = 0x0; - unsigned j; - ubyte refs[QUAD_SIZE]; - - for (j = 0; j < QUAD_SIZE; j++) { - if (data->use_shader_stencil_refs) - refs[j] = data->shader_stencil_refs[j] & valMask; - else - refs[j] = ref & valMask; - } - - switch (func) { - case PIPE_FUNC_NEVER: - /* passMask = 0x0 */ - break; - case PIPE_FUNC_LESS: - for (j = 0; j < QUAD_SIZE; j++) { - if (refs[j] < (data->stencilVals[j] & valMask)) { - passMask |= (1 << j); - } - } - break; - case PIPE_FUNC_EQUAL: - for (j = 0; j < QUAD_SIZE; j++) { - if (refs[j] == (data->stencilVals[j] & valMask)) { - passMask |= (1 << j); - } - } - break; - case PIPE_FUNC_LEQUAL: - for (j = 0; j < QUAD_SIZE; j++) { - if (refs[j] <= (data->stencilVals[j] & valMask)) { - passMask |= (1 << j); - } - } - break; - case PIPE_FUNC_GREATER: - for (j = 0; j < QUAD_SIZE; j++) { - if (refs[j] > (data->stencilVals[j] & valMask)) { - passMask |= (1 << j); - } - } - break; - case PIPE_FUNC_NOTEQUAL: - for (j = 0; j < QUAD_SIZE; j++) { - if (refs[j] != (data->stencilVals[j] & valMask)) { - passMask |= (1 << j); - } - } - break; - case PIPE_FUNC_GEQUAL: - for (j = 0; j < QUAD_SIZE; j++) { - if (refs[j] >= (data->stencilVals[j] & valMask)) { - passMask |= (1 << j); - } - } - break; - case PIPE_FUNC_ALWAYS: - passMask = MASK_ALL; - break; - default: - assert(0); - } - - return passMask; -} - - -/** - * Apply the stencil operator to stencil values. - * - * \param data->stencilVals the stencil buffer values (read and written) - * \param mask indicates which pixels to update - * \param op the stencil operator (PIPE_STENCIL_OP_x) - * \param ref the stencil reference value - * \param wrtMask writemask controlling which bits are changed in the - * stencil values - */ -static void -apply_stencil_op(struct depth_data *data, - unsigned mask, unsigned op, ubyte ref, ubyte wrtMask) -{ - unsigned j; - ubyte newstencil[QUAD_SIZE]; - ubyte refs[QUAD_SIZE]; - - for (j = 0; j < QUAD_SIZE; j++) { - newstencil[j] = data->stencilVals[j]; - if (data->use_shader_stencil_refs) - refs[j] = data->shader_stencil_refs[j]; - else - refs[j] = ref; - } - - switch (op) { - case PIPE_STENCIL_OP_KEEP: - /* no-op */ - break; - case PIPE_STENCIL_OP_ZERO: - for (j = 0; j < QUAD_SIZE; j++) { - if (mask & (1 << j)) { - newstencil[j] = 0; - } - } - break; - case PIPE_STENCIL_OP_REPLACE: - for (j = 0; j < QUAD_SIZE; j++) { - if (mask & (1 << j)) { - newstencil[j] = refs[j]; - } - } - break; - case PIPE_STENCIL_OP_INCR: - for (j = 0; j < QUAD_SIZE; j++) { - if (mask & (1 << j)) { - if (data->stencilVals[j] < STENCIL_MAX) { - newstencil[j] = data->stencilVals[j] + 1; - } - } - } - break; - case PIPE_STENCIL_OP_DECR: - for (j = 0; j < QUAD_SIZE; j++) { - if (mask & (1 << j)) { - if (data->stencilVals[j] > 0) { - newstencil[j] = data->stencilVals[j] - 1; - } - } - } - break; - case PIPE_STENCIL_OP_INCR_WRAP: - for (j = 0; j < QUAD_SIZE; j++) { - if (mask & (1 << j)) { - newstencil[j] = data->stencilVals[j] + 1; - } - } - break; - case PIPE_STENCIL_OP_DECR_WRAP: - for (j = 0; j < QUAD_SIZE; j++) { - if (mask & (1 << j)) { - newstencil[j] = data->stencilVals[j] - 1; - } - } - break; - case PIPE_STENCIL_OP_INVERT: - for (j = 0; j < QUAD_SIZE; j++) { - if (mask & (1 << j)) { - newstencil[j] = ~data->stencilVals[j]; - } - } - break; - default: - assert(0); - } - - /* - * update the stencil values - */ - if (wrtMask != STENCIL_MAX) { - /* apply bit-wise stencil buffer writemask */ - for (j = 0; j < QUAD_SIZE; j++) { - data->stencilVals[j] = (wrtMask & newstencil[j]) | (~wrtMask & data->stencilVals[j]); - } - } - else { - for (j = 0; j < QUAD_SIZE; j++) { - data->stencilVals[j] = newstencil[j]; - } - } -} - - - -/** - * To increase efficiency, we should probably have multiple versions - * of this function that are specifically for Z16, Z32 and FP Z buffers. - * Try to effectively do that with codegen... - */ -static boolean -depth_test_quad(struct quad_stage *qs, - struct depth_data *data, - struct quad_header *quad) -{ - struct softpipe_context *softpipe = qs->softpipe; - unsigned zmask = 0; - unsigned j; - - switch (softpipe->depth_stencil->depth.func) { - case PIPE_FUNC_NEVER: - /* zmask = 0 */ - break; - case PIPE_FUNC_LESS: - /* Note this is pretty much a single sse or cell instruction. - * Like this: quad->mask &= (quad->outputs.depth < zzzz); - */ - for (j = 0; j < QUAD_SIZE; j++) { - if (data->qzzzz[j] < data->bzzzz[j]) - zmask |= 1 << j; - } - break; - case PIPE_FUNC_EQUAL: - for (j = 0; j < QUAD_SIZE; j++) { - if (data->qzzzz[j] == data->bzzzz[j]) - zmask |= 1 << j; - } - break; - case PIPE_FUNC_LEQUAL: - for (j = 0; j < QUAD_SIZE; j++) { - if (data->qzzzz[j] <= data->bzzzz[j]) - zmask |= (1 << j); - } - break; - case PIPE_FUNC_GREATER: - for (j = 0; j < QUAD_SIZE; j++) { - if (data->qzzzz[j] > data->bzzzz[j]) - zmask |= (1 << j); - } - break; - case PIPE_FUNC_NOTEQUAL: - for (j = 0; j < QUAD_SIZE; j++) { - if (data->qzzzz[j] != data->bzzzz[j]) - zmask |= (1 << j); - } - break; - case PIPE_FUNC_GEQUAL: - for (j = 0; j < QUAD_SIZE; j++) { - if (data->qzzzz[j] >= data->bzzzz[j]) - zmask |= (1 << j); - } - break; - case PIPE_FUNC_ALWAYS: - zmask = MASK_ALL; - break; - default: - assert(0); - } - - quad->inout.mask &= zmask; - if (quad->inout.mask == 0) - return FALSE; - - /* Update our internal copy only if writemask set. Even if - * depth.writemask is FALSE, may still need to write out buffer - * data due to stencil changes. - */ - if (softpipe->depth_stencil->depth.writemask) { - for (j = 0; j < QUAD_SIZE; j++) { - if (quad->inout.mask & (1 << j)) { - data->bzzzz[j] = data->qzzzz[j]; - } - } - } - - return TRUE; -} - - - -/** - * Do stencil (and depth) testing. Stenciling depends on the outcome of - * depth testing. - */ -static void -depth_stencil_test_quad(struct quad_stage *qs, - struct depth_data *data, - struct quad_header *quad) -{ - struct softpipe_context *softpipe = qs->softpipe; - unsigned func, zFailOp, zPassOp, failOp; - ubyte ref, wrtMask, valMask; - uint face = quad->input.facing; - - if (!softpipe->depth_stencil->stencil[1].enabled) { - /* single-sided stencil test, use front (face=0) state */ - face = 0; - } - - /* 0 = front-face, 1 = back-face */ - assert(face == 0 || face == 1); - - /* choose front or back face function, operator, etc */ - /* XXX we could do these initializations once per primitive */ - func = softpipe->depth_stencil->stencil[face].func; - failOp = softpipe->depth_stencil->stencil[face].fail_op; - zFailOp = softpipe->depth_stencil->stencil[face].zfail_op; - zPassOp = softpipe->depth_stencil->stencil[face].zpass_op; - ref = softpipe->stencil_ref.ref_value[face]; - wrtMask = softpipe->depth_stencil->stencil[face].writemask; - valMask = softpipe->depth_stencil->stencil[face].valuemask; - - /* do the stencil test first */ - { - unsigned passMask, failMask; - passMask = do_stencil_test(data, func, ref, valMask); - failMask = quad->inout.mask & ~passMask; - quad->inout.mask &= passMask; - - if (failOp != PIPE_STENCIL_OP_KEEP) { - apply_stencil_op(data, failMask, failOp, ref, wrtMask); - } - } - - if (quad->inout.mask) { - /* now the pixels that passed the stencil test are depth tested */ - if (softpipe->depth_stencil->depth.enabled) { - const unsigned origMask = quad->inout.mask; - - depth_test_quad(qs, data, quad); /* quad->mask is updated */ - - /* update stencil buffer values according to z pass/fail result */ - if (zFailOp != PIPE_STENCIL_OP_KEEP) { - const unsigned zFailMask = origMask & ~quad->inout.mask; - apply_stencil_op(data, zFailMask, zFailOp, ref, wrtMask); - } - - if (zPassOp != PIPE_STENCIL_OP_KEEP) { - const unsigned zPassMask = origMask & quad->inout.mask; - apply_stencil_op(data, zPassMask, zPassOp, ref, wrtMask); - } - } - else { - /* no depth test, apply Zpass operator to stencil buffer values */ - apply_stencil_op(data, quad->inout.mask, zPassOp, ref, wrtMask); - } - } -} - - -#define ALPHATEST( FUNC, COMP ) \ - static unsigned \ - alpha_test_quads_##FUNC( struct quad_stage *qs, \ - struct quad_header *quads[], \ - unsigned nr ) \ - { \ - const float ref = qs->softpipe->depth_stencil->alpha.ref_value; \ - const uint cbuf = 0; /* only output[0].alpha is tested */ \ - unsigned pass_nr = 0; \ - unsigned i; \ - \ - for (i = 0; i < nr; i++) { \ - const float *aaaa = quads[i]->output.color[cbuf][3]; \ - unsigned passMask = 0; \ - \ - if (aaaa[0] COMP ref) passMask |= (1 << 0); \ - if (aaaa[1] COMP ref) passMask |= (1 << 1); \ - if (aaaa[2] COMP ref) passMask |= (1 << 2); \ - if (aaaa[3] COMP ref) passMask |= (1 << 3); \ - \ - quads[i]->inout.mask &= passMask; \ - \ - if (quads[i]->inout.mask) \ - quads[pass_nr++] = quads[i]; \ - } \ - \ - return pass_nr; \ - } - - -ALPHATEST( LESS, < ) -ALPHATEST( EQUAL, == ) -ALPHATEST( LEQUAL, <= ) -ALPHATEST( GREATER, > ) -ALPHATEST( NOTEQUAL, != ) -ALPHATEST( GEQUAL, >= ) - - -/* XXX: Incorporate into shader using KILP. - */ -static unsigned -alpha_test_quads(struct quad_stage *qs, - struct quad_header *quads[], - unsigned nr) -{ - switch (qs->softpipe->depth_stencil->alpha.func) { - case PIPE_FUNC_LESS: - return alpha_test_quads_LESS( qs, quads, nr ); - case PIPE_FUNC_EQUAL: - return alpha_test_quads_EQUAL( qs, quads, nr ); - case PIPE_FUNC_LEQUAL: - return alpha_test_quads_LEQUAL( qs, quads, nr ); - case PIPE_FUNC_GREATER: - return alpha_test_quads_GREATER( qs, quads, nr ); - case PIPE_FUNC_NOTEQUAL: - return alpha_test_quads_NOTEQUAL( qs, quads, nr ); - case PIPE_FUNC_GEQUAL: - return alpha_test_quads_GEQUAL( qs, quads, nr ); - case PIPE_FUNC_ALWAYS: - return nr; - case PIPE_FUNC_NEVER: - default: - return 0; - } -} - - -static unsigned mask_count[16] = -{ - 0, /* 0x0 */ - 1, /* 0x1 */ - 1, /* 0x2 */ - 2, /* 0x3 */ - 1, /* 0x4 */ - 2, /* 0x5 */ - 2, /* 0x6 */ - 3, /* 0x7 */ - 1, /* 0x8 */ - 2, /* 0x9 */ - 2, /* 0xa */ - 3, /* 0xb */ - 2, /* 0xc */ - 3, /* 0xd */ - 3, /* 0xe */ - 4, /* 0xf */ -}; - - - -/** - * General depth/stencil test function. Used when there's no fast-path. - */ -static void -depth_test_quads_fallback(struct quad_stage *qs, - struct quad_header *quads[], - unsigned nr) -{ - unsigned i, pass = 0; - const struct tgsi_shader_info *fsInfo = &qs->softpipe->fs_variant->info; - boolean interp_depth = !fsInfo->writes_z; - boolean shader_stencil_ref = fsInfo->writes_stencil; - struct depth_data data; - - data.use_shader_stencil_refs = FALSE; - - if (qs->softpipe->depth_stencil->alpha.enabled) { - nr = alpha_test_quads(qs, quads, nr); - } - - if (qs->softpipe->framebuffer.zsbuf && - (qs->softpipe->depth_stencil->depth.enabled || - qs->softpipe->depth_stencil->stencil[0].enabled)) { - - data.ps = qs->softpipe->framebuffer.zsbuf; - data.format = data.ps->format; - data.tile = sp_get_cached_tile(qs->softpipe->zsbuf_cache, - quads[0]->input.x0, - quads[0]->input.y0); - - for (i = 0; i < nr; i++) { - get_depth_stencil_values(&data, quads[i]); - - if (qs->softpipe->depth_stencil->depth.enabled) { - if (interp_depth) - interpolate_quad_depth(quads[i]); - - convert_quad_depth(&data, quads[i]); - } - - if (qs->softpipe->depth_stencil->stencil[0].enabled) { - if (shader_stencil_ref) - convert_quad_stencil(&data, quads[i]); - - depth_stencil_test_quad(qs, &data, quads[i]); - write_depth_stencil_values(&data, quads[i]); - } - else { - if (!depth_test_quad(qs, &data, quads[i])) - continue; - - if (qs->softpipe->depth_stencil->depth.writemask) - write_depth_stencil_values(&data, quads[i]); - } - - quads[pass++] = quads[i]; - } - - nr = pass; - } - - if (qs->softpipe->active_query_count) { - for (i = 0; i < nr; i++) - qs->softpipe->occlusion_count += mask_count[quads[i]->inout.mask]; - } - - if (nr) - qs->next->run(qs->next, quads, nr); -} - - -/** - * Special-case Z testing for 16-bit Zbuffer and Z buffer writes enabled. - */ - -#define NAME depth_interp_z16_less_write -#define OPERATOR < -#include "sp_quad_depth_test_tmp.h" - -#define NAME depth_interp_z16_equal_write -#define OPERATOR == -#include "sp_quad_depth_test_tmp.h" - -#define NAME depth_interp_z16_lequal_write -#define OPERATOR <= -#include "sp_quad_depth_test_tmp.h" - -#define NAME depth_interp_z16_greater_write -#define OPERATOR > -#include "sp_quad_depth_test_tmp.h" - -#define NAME depth_interp_z16_notequal_write -#define OPERATOR != -#include "sp_quad_depth_test_tmp.h" - -#define NAME depth_interp_z16_gequal_write -#define OPERATOR >= -#include "sp_quad_depth_test_tmp.h" - -#define NAME depth_interp_z16_always_write -#define ALWAYS 1 -#include "sp_quad_depth_test_tmp.h" - - - -static void -depth_noop(struct quad_stage *qs, - struct quad_header *quads[], - unsigned nr) -{ - qs->next->run(qs->next, quads, nr); -} - - - -static void -choose_depth_test(struct quad_stage *qs, - struct quad_header *quads[], - unsigned nr) -{ - const struct tgsi_shader_info *fsInfo = &qs->softpipe->fs_variant->info; - - boolean interp_depth = !fsInfo->writes_z; - - boolean alpha = qs->softpipe->depth_stencil->alpha.enabled; - - boolean depth = qs->softpipe->depth_stencil->depth.enabled; - - unsigned depthfunc = qs->softpipe->depth_stencil->depth.func; - - boolean stencil = qs->softpipe->depth_stencil->stencil[0].enabled; - - boolean depthwrite = qs->softpipe->depth_stencil->depth.writemask; - - boolean occlusion = qs->softpipe->active_query_count; - - if(!qs->softpipe->framebuffer.zsbuf) - depth = depthwrite = stencil = FALSE; - - /* default */ - qs->run = depth_test_quads_fallback; - - /* look for special cases */ - if (!alpha && - !depth && - !occlusion && - !stencil) { - qs->run = depth_noop; - } - else if (!alpha && - interp_depth && - depth && - depthwrite && - !occlusion && - !stencil) - { - if (qs->softpipe->framebuffer.zsbuf->format == PIPE_FORMAT_Z16_UNORM) { - switch (depthfunc) { - case PIPE_FUNC_NEVER: - qs->run = depth_test_quads_fallback; - break; - case PIPE_FUNC_LESS: - qs->run = depth_interp_z16_less_write; - break; - case PIPE_FUNC_EQUAL: - qs->run = depth_interp_z16_equal_write; - break; - case PIPE_FUNC_LEQUAL: - qs->run = depth_interp_z16_lequal_write; - break; - case PIPE_FUNC_GREATER: - qs->run = depth_interp_z16_greater_write; - break; - case PIPE_FUNC_NOTEQUAL: - qs->run = depth_interp_z16_notequal_write; - break; - case PIPE_FUNC_GEQUAL: - qs->run = depth_interp_z16_gequal_write; - break; - case PIPE_FUNC_ALWAYS: - qs->run = depth_interp_z16_always_write; - break; - default: - qs->run = depth_test_quads_fallback; - break; - } - } - } - - /* next quad/fragment stage */ - qs->run( qs, quads, nr ); -} - - - -static void -depth_test_begin(struct quad_stage *qs) -{ - qs->run = choose_depth_test; - qs->next->begin(qs->next); -} - - -static void -depth_test_destroy(struct quad_stage *qs) -{ - FREE( qs ); -} - - -struct quad_stage * -sp_quad_depth_test_stage(struct softpipe_context *softpipe) -{ - struct quad_stage *stage = CALLOC_STRUCT(quad_stage); - - stage->softpipe = softpipe; - stage->begin = depth_test_begin; - stage->run = choose_depth_test; - stage->destroy = depth_test_destroy; - - return stage; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_depth_test_tmp.h b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_depth_test_tmp.h deleted file mode 100644 index 25af415c256..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_depth_test_tmp.h +++ /dev/null @@ -1,147 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -/* - * Template for generating Z test functions - * Only PIPE_FORMAT_Z16_UNORM supported at this time. - */ - - -#ifndef NAME -#error "NAME is not defined!" -#endif - -#if !defined(OPERATOR) && !defined(ALWAYS) -#error "neither OPERATOR nor ALWAYS is defined!" -#endif - - -/* - * NOTE: there's no guarantee that the quads are sequentially side by - * side. The fragment shader may have culled some quads, etc. Sliver - * triangles may generate non-sequential quads. - */ -static void -NAME(struct quad_stage *qs, - struct quad_header *quads[], - unsigned nr) -{ - unsigned i, pass = 0; - const unsigned ix = quads[0]->input.x0; - const unsigned iy = quads[0]->input.y0; - const float fx = (float) ix; - const float fy = (float) iy; - const float dzdx = quads[0]->posCoef->dadx[2]; - const float dzdy = quads[0]->posCoef->dady[2]; - const float z0 = quads[0]->posCoef->a0[2] + dzdx * fx + dzdy * fy; - struct softpipe_cached_tile *tile; - ushort (*depth16)[TILE_SIZE]; - ushort init_idepth[4], idepth[4], depth_step; - const float scale = 65535.0; - - /* compute scaled depth of the four pixels in first quad */ - init_idepth[0] = (ushort)((z0) * scale); - init_idepth[1] = (ushort)((z0 + dzdx) * scale); - init_idepth[2] = (ushort)((z0 + dzdy) * scale); - init_idepth[3] = (ushort)((z0 + dzdx + dzdy) * scale); - - depth_step = (ushort)(dzdx * scale); - - tile = sp_get_cached_tile(qs->softpipe->zsbuf_cache, ix, iy); - - for (i = 0; i < nr; i++) { - const unsigned outmask = quads[i]->inout.mask; - const int dx = quads[i]->input.x0 - ix; - unsigned mask = 0; - - /* compute depth for this quad */ - idepth[0] = init_idepth[0] + dx * depth_step; - idepth[1] = init_idepth[1] + dx * depth_step; - idepth[2] = init_idepth[2] + dx * depth_step; - idepth[3] = init_idepth[3] + dx * depth_step; - - depth16 = (ushort (*)[TILE_SIZE]) - &tile->data.depth16[iy % TILE_SIZE][(ix + dx)% TILE_SIZE]; - -#ifdef ALWAYS - if (outmask & 1) { - depth16[0][0] = idepth[0]; - mask |= (1 << 0); - } - - if (outmask & 2) { - depth16[0][1] = idepth[1]; - mask |= (1 << 1); - } - - if (outmask & 4) { - depth16[1][0] = idepth[2]; - mask |= (1 << 2); - } - - if (outmask & 8) { - depth16[1][1] = idepth[3]; - mask |= (1 << 3); - } -#else - /* Note: OPERATOR appears here: */ - if ((outmask & 1) && (idepth[0] OPERATOR depth16[0][0])) { - depth16[0][0] = idepth[0]; - mask |= (1 << 0); - } - - if ((outmask & 2) && (idepth[1] OPERATOR depth16[0][1])) { - depth16[0][1] = idepth[1]; - mask |= (1 << 1); - } - - if ((outmask & 4) && (idepth[2] OPERATOR depth16[1][0])) { - depth16[1][0] = idepth[2]; - mask |= (1 << 2); - } - - if ((outmask & 8) && (idepth[3] OPERATOR depth16[1][1])) { - depth16[1][1] = idepth[3]; - mask |= (1 << 3); - } -#endif - - depth16 = (ushort (*)[TILE_SIZE]) &depth16[0][2]; - - quads[i]->inout.mask = mask; - if (quads[i]->inout.mask) - quads[pass++] = quads[i]; - } - - if (pass) - qs->next->run(qs->next, quads, pass); -} - - -#undef NAME -#undef OPERATOR -#undef ALWAYS diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_fs.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_fs.c deleted file mode 100644 index 7800ba8442f..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_fs.c +++ /dev/null @@ -1,186 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * Copyright 2008 VMware, Inc. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Vertices are just an array of floats, with all the attributes - * packed. We currently assume a layout like: - * - * attr[0][0..3] - window position - * attr[1..n][0..3] - remaining attributes. - * - * Attributes are assumed to be 4 floats wide but are packed so that - * all the enabled attributes run contiguously. - */ - -#include "util/u_math.h" -#include "util/u_memory.h" -#include "pipe/p_defines.h" -#include "pipe/p_shader_tokens.h" - -#include "sp_context.h" -#include "sp_state.h" -#include "sp_quad.h" -#include "sp_quad_pipe.h" - - -struct quad_shade_stage -{ - struct quad_stage stage; /**< base class */ - - /* no other fields at this time */ -}; - - -/** cast wrapper */ -static INLINE struct quad_shade_stage * -quad_shade_stage(struct quad_stage *qs) -{ - return (struct quad_shade_stage *) qs; -} - - -/** - * Execute fragment shader for the four fragments in the quad. - * \return TRUE if quad is alive, FALSE if all four pixels are killed - */ -static INLINE boolean -shade_quad(struct quad_stage *qs, struct quad_header *quad) -{ - struct softpipe_context *softpipe = qs->softpipe; - struct tgsi_exec_machine *machine = softpipe->fs_machine; - - /* run shader */ - machine->flatshade_color = softpipe->rasterizer->flatshade ? TRUE : FALSE; - return softpipe->fs_variant->run( softpipe->fs_variant, machine, quad ); -} - - - -static void -coverage_quad(struct quad_stage *qs, struct quad_header *quad) -{ - struct softpipe_context *softpipe = qs->softpipe; - uint cbuf; - - /* loop over colorbuffer outputs */ - for (cbuf = 0; cbuf < softpipe->framebuffer.nr_cbufs; cbuf++) { - float (*quadColor)[4] = quad->output.color[cbuf]; - unsigned j; - for (j = 0; j < QUAD_SIZE; j++) { - assert(quad->input.coverage[j] >= 0.0); - assert(quad->input.coverage[j] <= 1.0); - quadColor[3][j] *= quad->input.coverage[j]; - } - } -} - - -/** - * Shade/write an array of quads - * Called via quad_stage::run() - */ -static void -shade_quads(struct quad_stage *qs, - struct quad_header *quads[], - unsigned nr) -{ - struct softpipe_context *softpipe = qs->softpipe; - struct tgsi_exec_machine *machine = softpipe->fs_machine; - unsigned i, nr_quads = 0; - - tgsi_exec_set_constant_buffers(machine, PIPE_MAX_CONSTANT_BUFFERS, - softpipe->mapped_constants[PIPE_SHADER_FRAGMENT], - softpipe->const_buffer_size[PIPE_SHADER_FRAGMENT]); - - machine->InterpCoefs = quads[0]->coef; - - for (i = 0; i < nr; i++) { - /* Only omit this quad from the output list if all the fragments - * are killed _AND_ it's not the first quad in the list. - * The first quad is special in the (optimized) depth-testing code: - * the quads' Z coordinates are step-wise interpolated with respect - * to the first quad in the list. - * For multi-pass algorithms we need to produce exactly the same - * Z values in each pass. If interpolation starts with different quads - * we can get different Z values for the same (x,y). - */ - if (!shade_quad(qs, quads[i]) && i > 0) - continue; /* quad totally culled/killed */ - - if (/*do_coverage*/ 0) - coverage_quad( qs, quads[i] ); - - quads[nr_quads++] = quads[i]; - } - - if (nr_quads) - qs->next->run(qs->next, quads, nr_quads); -} - - -/** - * Per-primitive (or per-begin?) setup - */ -static void -shade_begin(struct quad_stage *qs) -{ - struct softpipe_context *softpipe = qs->softpipe; - - softpipe->fs_variant->prepare( softpipe->fs_variant, - softpipe->fs_machine, - (struct tgsi_sampler **) - softpipe->tgsi.frag_samplers_list ); - - qs->next->begin(qs->next); -} - - -static void -shade_destroy(struct quad_stage *qs) -{ - FREE( qs ); -} - - -struct quad_stage * -sp_quad_shade_stage( struct softpipe_context *softpipe ) -{ - struct quad_shade_stage *qss = CALLOC_STRUCT(quad_shade_stage); - if (!qss) - goto fail; - - qss->stage.softpipe = softpipe; - qss->stage.begin = shade_begin; - qss->stage.run = shade_quads; - qss->stage.destroy = shade_destroy; - - return &qss->stage; - -fail: - FREE(qss); - return NULL; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_pipe.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_pipe.c deleted file mode 100644 index 0c4506ae8f4..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_pipe.c +++ /dev/null @@ -1,69 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#include "sp_context.h" -#include "sp_state.h" -#include "pipe/p_shader_tokens.h" - - -static void -insert_stage_at_head(struct softpipe_context *sp, struct quad_stage *quad) -{ - quad->next = sp->quad.first; - sp->quad.first = quad; -} - - -void -sp_build_quad_pipeline(struct softpipe_context *sp) -{ - boolean early_depth_test = - sp->depth_stencil->depth.enabled && - sp->framebuffer.zsbuf && - !sp->depth_stencil->alpha.enabled && - !sp->fs_variant->info.uses_kill && - !sp->fs_variant->info.writes_z && - !sp->fs_variant->info.writes_stencil; - - sp->quad.first = sp->quad.blend; - - if (early_depth_test) { - insert_stage_at_head( sp, sp->quad.shade ); - insert_stage_at_head( sp, sp->quad.depth_test ); - } - else { - insert_stage_at_head( sp, sp->quad.depth_test ); - insert_stage_at_head( sp, sp->quad.shade ); - } - -#if !DO_PSTIPPLE_IN_DRAW_MODULE && !DO_PSTIPPLE_IN_HELPER_MODULE - if (sp->rasterizer->poly_stipple_enable) - insert_stage_at_head( sp, sp->quad.pstipple ); -#endif -} - diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_pipe.h b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_pipe.h deleted file mode 100644 index c0aa1348319..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_pipe.h +++ /dev/null @@ -1,72 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: Keith Whitwell - */ - -#ifndef SP_QUAD_PIPE_H -#define SP_QUAD_PIPE_H - - -struct softpipe_context; -struct quad_header; - - -/** - * Fragment processing is performed on 2x2 blocks of pixels called "quads". - * Quad processing is performed with a pipeline of stages represented by - * this type. - */ -struct quad_stage { - struct softpipe_context *softpipe; - - struct quad_stage *next; - - void (*begin)(struct quad_stage *qs); - - /** the stage action */ - void (*run)(struct quad_stage *qs, struct quad_header *quad[], unsigned nr); - - void (*destroy)(struct quad_stage *qs); -}; - - -struct quad_stage *sp_quad_polygon_stipple_stage( struct softpipe_context *softpipe ); -struct quad_stage *sp_quad_earlyz_stage( struct softpipe_context *softpipe ); -struct quad_stage *sp_quad_shade_stage( struct softpipe_context *softpipe ); -struct quad_stage *sp_quad_alpha_test_stage( struct softpipe_context *softpipe ); -struct quad_stage *sp_quad_stencil_test_stage( struct softpipe_context *softpipe ); -struct quad_stage *sp_quad_depth_test_stage( struct softpipe_context *softpipe ); -struct quad_stage *sp_quad_occlusion_stage( struct softpipe_context *softpipe ); -struct quad_stage *sp_quad_coverage_stage( struct softpipe_context *softpipe ); -struct quad_stage *sp_quad_blend_stage( struct softpipe_context *softpipe ); -struct quad_stage *sp_quad_colormask_stage( struct softpipe_context *softpipe ); -struct quad_stage *sp_quad_output_stage( struct softpipe_context *softpipe ); - -void sp_build_quad_pipeline(struct softpipe_context *sp); - -#endif /* SP_QUAD_PIPE_H */ diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_stipple.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_stipple.c deleted file mode 100644 index a0527a596a6..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_quad_stipple.c +++ /dev/null @@ -1,81 +0,0 @@ - -/** - * quad polygon stipple stage - */ - -#include "sp_context.h" -#include "sp_quad.h" -#include "sp_quad_pipe.h" -#include "pipe/p_defines.h" -#include "util/u_memory.h" - - -/** - * Apply polygon stipple to quads produced by triangle rasterization - */ -static void -stipple_quad(struct quad_stage *qs, struct quad_header *quads[], unsigned nr) -{ - static const uint bit31 = 1 << 31; - static const uint bit30 = 1 << 30; - unsigned pass = nr; - - struct softpipe_context *softpipe = qs->softpipe; - unsigned q; - - pass = 0; - - for (q = 0; q < nr; q++) { - struct quad_header *quad = quads[q]; - - const int col0 = quad->input.x0 % 32; - const int y0 = quad->input.y0; - const int y1 = y0 + 1; - const uint stipple0 = softpipe->poly_stipple.stipple[y0 % 32]; - const uint stipple1 = softpipe->poly_stipple.stipple[y1 % 32]; - - /* turn off quad mask bits that fail the stipple test */ - if ((stipple0 & (bit31 >> col0)) == 0) - quad->inout.mask &= ~MASK_TOP_LEFT; - - if ((stipple0 & (bit30 >> col0)) == 0) - quad->inout.mask &= ~MASK_TOP_RIGHT; - - if ((stipple1 & (bit31 >> col0)) == 0) - quad->inout.mask &= ~MASK_BOTTOM_LEFT; - - if ((stipple1 & (bit30 >> col0)) == 0) - quad->inout.mask &= ~MASK_BOTTOM_RIGHT; - - if (quad->inout.mask) - quads[pass++] = quad; - } - - qs->next->run(qs->next, quads, pass); -} - - -static void stipple_begin(struct quad_stage *qs) -{ - qs->next->begin(qs->next); -} - - -static void stipple_destroy(struct quad_stage *qs) -{ - FREE( qs ); -} - - -struct quad_stage * -sp_quad_polygon_stipple_stage( struct softpipe_context *softpipe ) -{ - struct quad_stage *stage = CALLOC_STRUCT(quad_stage); - - stage->softpipe = softpipe; - stage->begin = stipple_begin; - stage->run = stipple_quad; - stage->destroy = stipple_destroy; - - return stage; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_query.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_query.c deleted file mode 100644 index 2e54e023091..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_query.c +++ /dev/null @@ -1,231 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Author: - * Keith Whitwell - */ - -#include "draw/draw_context.h" -#include "os/os_time.h" -#include "pipe/p_defines.h" -#include "util/u_memory.h" -#include "sp_context.h" -#include "sp_query.h" -#include "sp_state.h" - -struct softpipe_query { - unsigned type; - uint64_t start; - uint64_t end; - struct pipe_query_data_so_statistics so; - unsigned num_primitives_generated; -}; - - -static struct softpipe_query *softpipe_query( struct pipe_query *p ) -{ - return (struct softpipe_query *)p; -} - -static struct pipe_query * -softpipe_create_query(struct pipe_context *pipe, - unsigned type) -{ - struct softpipe_query* sq; - - assert(type == PIPE_QUERY_OCCLUSION_COUNTER || - type == PIPE_QUERY_TIME_ELAPSED || - type == PIPE_QUERY_SO_STATISTICS || - type == PIPE_QUERY_PRIMITIVES_EMITTED || - type == PIPE_QUERY_PRIMITIVES_GENERATED || - type == PIPE_QUERY_GPU_FINISHED || - type == PIPE_QUERY_TIMESTAMP || - type == PIPE_QUERY_TIMESTAMP_DISJOINT); - sq = CALLOC_STRUCT( softpipe_query ); - sq->type = type; - - return (struct pipe_query *)sq; -} - - -static void -softpipe_destroy_query(struct pipe_context *pipe, struct pipe_query *q) -{ - FREE(q); -} - - -static void -softpipe_begin_query(struct pipe_context *pipe, struct pipe_query *q) -{ - struct softpipe_context *softpipe = softpipe_context( pipe ); - struct softpipe_query *sq = softpipe_query(q); - - switch (sq->type) { - case PIPE_QUERY_OCCLUSION_COUNTER: - sq->start = softpipe->occlusion_count; - break; - case PIPE_QUERY_TIMESTAMP_DISJOINT: - case PIPE_QUERY_TIME_ELAPSED: - sq->start = 1000*os_time_get(); - break; - case PIPE_QUERY_SO_STATISTICS: - sq->so.primitives_storage_needed = 0; - case PIPE_QUERY_PRIMITIVES_EMITTED: - sq->so.num_primitives_written = 0; - softpipe->so_stats.num_primitives_written = 0; - break; - case PIPE_QUERY_PRIMITIVES_GENERATED: - sq->num_primitives_generated = 0; - softpipe->num_primitives_generated = 0; - break; - case PIPE_QUERY_TIMESTAMP: - case PIPE_QUERY_GPU_FINISHED: - break; - default: - assert(0); - break; - } - softpipe->active_query_count++; - softpipe->dirty |= SP_NEW_QUERY; -} - - -static void -softpipe_end_query(struct pipe_context *pipe, struct pipe_query *q) -{ - struct softpipe_context *softpipe = softpipe_context( pipe ); - struct softpipe_query *sq = softpipe_query(q); - - softpipe->active_query_count--; - switch (sq->type) { - case PIPE_QUERY_OCCLUSION_COUNTER: - sq->end = softpipe->occlusion_count; - break; - case PIPE_QUERY_TIMESTAMP: - sq->start = 0; - /* fall through */ - case PIPE_QUERY_TIMESTAMP_DISJOINT: - case PIPE_QUERY_TIME_ELAPSED: - sq->end = 1000*os_time_get(); - break; - case PIPE_QUERY_SO_STATISTICS: - sq->so.primitives_storage_needed = - softpipe->so_stats.primitives_storage_needed; - case PIPE_QUERY_PRIMITIVES_EMITTED: - sq->so.num_primitives_written = - softpipe->so_stats.num_primitives_written; - break; - case PIPE_QUERY_PRIMITIVES_GENERATED: - sq->num_primitives_generated = softpipe->num_primitives_generated; - break; - case PIPE_QUERY_GPU_FINISHED: - break; - default: - assert(0); - break; - } - softpipe->dirty |= SP_NEW_QUERY; -} - - -static boolean -softpipe_get_query_result(struct pipe_context *pipe, - struct pipe_query *q, - boolean wait, - void *vresult) -{ - struct softpipe_query *sq = softpipe_query(q); - uint64_t *result = (uint64_t*)vresult; - - switch (sq->type) { - case PIPE_QUERY_SO_STATISTICS: - memcpy(vresult, &sq->so, - sizeof(struct pipe_query_data_so_statistics)); - break; - case PIPE_QUERY_GPU_FINISHED: - *result = TRUE; - break; - case PIPE_QUERY_TIMESTAMP_DISJOINT: { - struct pipe_query_data_timestamp_disjoint td; - /*os_get_time is in microseconds*/ - td.frequency = 1000000; - td.disjoint = sq->end != sq->start; - memcpy(vresult, &td, - sizeof(struct pipe_query_data_timestamp_disjoint)); - } - break; - case PIPE_QUERY_PRIMITIVES_EMITTED: - *result = sq->so.num_primitives_written; - break; - case PIPE_QUERY_PRIMITIVES_GENERATED: - *result = sq->num_primitives_generated; - break; - default: - *result = sq->end - sq->start; - break; - } - return TRUE; -} - - -/** - * Called by rendering function to check rendering is conditional. - * \return TRUE if we should render, FALSE if we should skip rendering - */ -boolean -softpipe_check_render_cond(struct softpipe_context *sp) -{ - struct pipe_context *pipe = &sp->pipe; - boolean b, wait; - uint64_t result; - - if (!sp->render_cond_query) { - return TRUE; /* no query predicate, draw normally */ - } - - wait = (sp->render_cond_mode == PIPE_RENDER_COND_WAIT || - sp->render_cond_mode == PIPE_RENDER_COND_BY_REGION_WAIT); - - b = pipe->get_query_result(pipe, sp->render_cond_query, wait, &result); - if (b) - return result > 0; - else - return TRUE; -} - - -void softpipe_init_query_funcs(struct softpipe_context *softpipe ) -{ - softpipe->pipe.create_query = softpipe_create_query; - softpipe->pipe.destroy_query = softpipe_destroy_query; - softpipe->pipe.begin_query = softpipe_begin_query; - softpipe->pipe.end_query = softpipe_end_query; - softpipe->pipe.get_query_result = softpipe_get_query_result; -} - - diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_query.h b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_query.h deleted file mode 100644 index 736c033897e..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_query.h +++ /dev/null @@ -1,43 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Author: - * Keith Whitwell - */ - -#ifndef SP_QUERY_H -#define SP_QUERY_H - -extern boolean -softpipe_check_render_cond(struct softpipe_context *sp); - - -struct softpipe_context; -extern void softpipe_init_query_funcs(struct softpipe_context * ); - - -#endif /* SP_QUERY_H */ diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_screen.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_screen.c deleted file mode 100644 index a044c2f25da..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_screen.c +++ /dev/null @@ -1,349 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#include "util/u_memory.h" -#include "util/u_format.h" -#include "util/u_format_s3tc.h" -#include "util/u_video.h" -#include "pipe/p_defines.h" -#include "pipe/p_screen.h" -#include "draw/draw_context.h" -#include "vl/vl_decoder.h" -#include "vl/vl_video_buffer.h" - -#include "state_tracker/sw_winsys.h" -#include "tgsi/tgsi_exec.h" - -#include "sp_texture.h" -#include "sp_screen.h" -#include "sp_context.h" -#include "sp_fence.h" -#include "sp_public.h" - -DEBUG_GET_ONCE_BOOL_OPTION(use_llvm, "SOFTPIPE_USE_LLVM", FALSE) - -static const char * -softpipe_get_vendor(struct pipe_screen *screen) -{ - return "VMware, Inc."; -} - - -static const char * -softpipe_get_name(struct pipe_screen *screen) -{ - return "softpipe"; -} - - -static int -softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param) -{ - switch (param) { - case PIPE_CAP_MAX_COMBINED_SAMPLERS: - return PIPE_MAX_SAMPLERS + PIPE_MAX_VERTEX_SAMPLERS; - case PIPE_CAP_NPOT_TEXTURES: - return 1; - case PIPE_CAP_TWO_SIDED_STENCIL: - return 1; - case PIPE_CAP_SM3: - return 1; - case PIPE_CAP_ANISOTROPIC_FILTER: - return 1; - case PIPE_CAP_POINT_SPRITE: - return 1; - case PIPE_CAP_MAX_RENDER_TARGETS: - return PIPE_MAX_COLOR_BUFS; - case PIPE_CAP_OCCLUSION_QUERY: - return 1; - case PIPE_CAP_TIMER_QUERY: - return 1; - case PIPE_CAP_TEXTURE_MIRROR_CLAMP: - return 1; - case PIPE_CAP_TEXTURE_SHADOW_MAP: - return 1; - case PIPE_CAP_TEXTURE_SWIZZLE: - return 1; - case PIPE_CAP_MAX_TEXTURE_2D_LEVELS: - return SP_MAX_TEXTURE_2D_LEVELS; - case PIPE_CAP_MAX_TEXTURE_3D_LEVELS: - return SP_MAX_TEXTURE_3D_LEVELS; - case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS: - return SP_MAX_TEXTURE_2D_LEVELS; - case PIPE_CAP_BLEND_EQUATION_SEPARATE: - return 1; - case PIPE_CAP_INDEP_BLEND_ENABLE: - return 1; - case PIPE_CAP_INDEP_BLEND_FUNC: - return 1; - case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT: - case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT: - case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER: - case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER: - return 1; - case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS: - return PIPE_MAX_SO_BUFFERS; - case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS: - case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS: - return 16*4; - case PIPE_CAP_PRIMITIVE_RESTART: - return 1; - case PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE: - return 0; - case PIPE_CAP_SHADER_STENCIL_EXPORT: - return 1; - case PIPE_CAP_TGSI_INSTANCEID: - case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR: - return 1; - case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS: - return 256; /* for GL3 */ - case PIPE_CAP_MIN_TEXEL_OFFSET: - return -8; - case PIPE_CAP_MAX_TEXEL_OFFSET: - return 7; - case PIPE_CAP_CONDITIONAL_RENDER: - return 1; - case PIPE_CAP_FRAGMENT_COLOR_CLAMP_CONTROL: - return 1; - default: - return 0; - } -} - -static int -softpipe_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_shader_cap param) -{ -#ifdef HAVE_LLVM - struct softpipe_screen *sp_screen = softpipe_screen(screen); -#endif - switch(shader) - { - case PIPE_SHADER_FRAGMENT: - return tgsi_exec_get_shader_param(param); - case PIPE_SHADER_VERTEX: - case PIPE_SHADER_GEOMETRY: - switch (param) { - case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: -#ifdef HAVE_LLVM - if (sp_screen->use_llvm) - /* Softpipe doesn't yet know how to tell draw/llvm about textures */ - return 0; -#endif - return PIPE_MAX_VERTEX_SAMPLERS; - case PIPE_SHADER_CAP_INTEGERS: -#ifdef HAVE_LLVM /* gallivm doesn't support integers yet */ - if (sp_screen->use_llvm) - return 0; -#endif - /* fallthrough */ - default: - return draw_get_shader_param(shader, param); - } - default: - return 0; - } -} - -static float -softpipe_get_paramf(struct pipe_screen *screen, enum pipe_capf param) -{ - switch (param) { - case PIPE_CAPF_MAX_LINE_WIDTH: - /* fall-through */ - case PIPE_CAPF_MAX_LINE_WIDTH_AA: - return 255.0; /* arbitrary */ - case PIPE_CAPF_MAX_POINT_WIDTH: - /* fall-through */ - case PIPE_CAPF_MAX_POINT_WIDTH_AA: - return 255.0; /* arbitrary */ - case PIPE_CAPF_MAX_TEXTURE_ANISOTROPY: - return 16.0; - case PIPE_CAPF_MAX_TEXTURE_LOD_BIAS: - return 16.0; /* arbitrary */ - default: - return 0; - } -} - -static int -softpipe_get_video_param(struct pipe_screen *screen, - enum pipe_video_profile profile, - enum pipe_video_cap param) -{ - switch (param) { - case PIPE_VIDEO_CAP_SUPPORTED: - return vl_profile_supported(screen, profile); - case PIPE_VIDEO_CAP_NPOT_TEXTURES: - return 0; - case PIPE_VIDEO_CAP_MAX_WIDTH: - case PIPE_VIDEO_CAP_MAX_HEIGHT: - return vl_video_buffer_max_size(screen); - default: - return 0; - } -} - -/** - * Query format support for creating a texture, drawing surface, etc. - * \param format the format to test - * \param type one of PIPE_TEXTURE, PIPE_SURFACE - */ -static boolean -softpipe_is_format_supported( struct pipe_screen *screen, - enum pipe_format format, - enum pipe_texture_target target, - unsigned sample_count, - unsigned bind) -{ - struct sw_winsys *winsys = softpipe_screen(screen)->winsys; - const struct util_format_description *format_desc; - - assert(target == PIPE_BUFFER || - target == PIPE_TEXTURE_1D || - target == PIPE_TEXTURE_1D_ARRAY || - target == PIPE_TEXTURE_2D || - target == PIPE_TEXTURE_2D_ARRAY || - target == PIPE_TEXTURE_RECT || - target == PIPE_TEXTURE_3D || - target == PIPE_TEXTURE_CUBE); - - format_desc = util_format_description(format); - if (!format_desc) - return FALSE; - - if (sample_count > 1) - return FALSE; - - if (bind & (PIPE_BIND_DISPLAY_TARGET | - PIPE_BIND_SCANOUT | - PIPE_BIND_SHARED)) { - if(!winsys->is_displaytarget_format_supported(winsys, bind, format)) - return FALSE; - } - - if (bind & PIPE_BIND_RENDER_TARGET) { - if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) - return FALSE; - - /* - * Although possible, it is unnatural to render into compressed or YUV - * surfaces. So disable these here to avoid going into weird paths - * inside the state trackers. - */ - if (format_desc->block.width != 1 || - format_desc->block.height != 1) - return FALSE; - } - - if (bind & PIPE_BIND_DEPTH_STENCIL) { - if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS) - return FALSE; - } - - /* - * All other operations (sampling, transfer, etc). - */ - - if (format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC) { - return util_format_s3tc_enabled; - } - - /* - * Everything else should be supported by u_format. - */ - return TRUE; -} - - -static void -softpipe_destroy_screen( struct pipe_screen *screen ) -{ - struct softpipe_screen *sp_screen = softpipe_screen(screen); - struct sw_winsys *winsys = sp_screen->winsys; - - if(winsys->destroy) - winsys->destroy(winsys); - - FREE(screen); -} - - -/* This is often overriden by the co-state tracker. - */ -static void -softpipe_flush_frontbuffer(struct pipe_screen *_screen, - struct pipe_resource *resource, - unsigned level, unsigned layer, - void *context_private) -{ - struct softpipe_screen *screen = softpipe_screen(_screen); - struct sw_winsys *winsys = screen->winsys; - struct softpipe_resource *texture = softpipe_resource(resource); - - assert(texture->dt); - if (texture->dt) - winsys->displaytarget_display(winsys, texture->dt, context_private); -} - -/** - * Create a new pipe_screen object - * Note: we're not presently subclassing pipe_screen (no softpipe_screen). - */ -struct pipe_screen * -softpipe_create_screen(struct sw_winsys *winsys) -{ - struct softpipe_screen *screen = CALLOC_STRUCT(softpipe_screen); - - if (!screen) - return NULL; - - screen->winsys = winsys; - - screen->base.winsys = NULL; - screen->base.destroy = softpipe_destroy_screen; - - screen->base.get_name = softpipe_get_name; - screen->base.get_vendor = softpipe_get_vendor; - screen->base.get_param = softpipe_get_param; - screen->base.get_shader_param = softpipe_get_shader_param; - screen->base.get_paramf = softpipe_get_paramf; - screen->base.get_video_param = softpipe_get_video_param; - screen->base.is_format_supported = softpipe_is_format_supported; - screen->base.is_video_format_supported = vl_video_buffer_is_format_supported; - screen->base.context_create = softpipe_create_context; - screen->base.flush_frontbuffer = softpipe_flush_frontbuffer; - - screen->use_llvm = debug_get_option_use_llvm(); - - util_format_s3tc_init(); - - softpipe_init_screen_texture_funcs(&screen->base); - softpipe_init_screen_fence_funcs(&screen->base); - - return &screen->base; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_screen.h b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_screen.h deleted file mode 100644 index 007feecb5de..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_screen.h +++ /dev/null @@ -1,60 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: Keith Whitwell - */ - -#ifndef SP_SCREEN_H -#define SP_SCREEN_H - -#include "pipe/p_screen.h" -#include "pipe/p_defines.h" - - -struct sw_winsys; - -struct softpipe_screen { - struct pipe_screen base; - - struct sw_winsys *winsys; - - /* Increments whenever textures are modified. Contexts can track - * this. - */ - unsigned timestamp; - boolean use_llvm; -}; - -static INLINE struct softpipe_screen * -softpipe_screen( struct pipe_screen *pipe ) -{ - return (struct softpipe_screen *)pipe; -} - - - -#endif /* SP_SCREEN_H */ diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_setup.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_setup.c deleted file mode 100644 index 0d67af3eb74..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_setup.c +++ /dev/null @@ -1,1448 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * \brief Primitive rasterization/rendering (points, lines, triangles) - * - * \author Keith Whitwell - * \author Brian Paul - */ - -#include "sp_context.h" -#include "sp_quad.h" -#include "sp_quad_pipe.h" -#include "sp_setup.h" -#include "sp_state.h" -#include "draw/draw_context.h" -#include "draw/draw_vertex.h" -#include "pipe/p_shader_tokens.h" -#include "util/u_math.h" -#include "util/u_memory.h" - - -#define DEBUG_VERTS 0 -#define DEBUG_FRAGS 0 - - -/** - * Triangle edge info - */ -struct edge { - float dx; /**< X(v1) - X(v0), used only during setup */ - float dy; /**< Y(v1) - Y(v0), used only during setup */ - float dxdy; /**< dx/dy */ - float sx, sy; /**< first sample point coord */ - int lines; /**< number of lines on this edge */ -}; - - -/** - * Max number of quads (2x2 pixel blocks) to process per batch. - * This can't be arbitrarily increased since we depend on some 32-bit - * bitmasks (two bits per quad). - */ -#define MAX_QUADS 16 - - -/** - * Triangle setup info. - * Also used for line drawing (taking some liberties). - */ -struct setup_context { - struct softpipe_context *softpipe; - - /* Vertices are just an array of floats making up each attribute in - * turn. Currently fixed at 4 floats, but should change in time. - * Codegen will help cope with this. - */ - const float (*vmax)[4]; - const float (*vmid)[4]; - const float (*vmin)[4]; - const float (*vprovoke)[4]; - - struct edge ebot; - struct edge etop; - struct edge emaj; - - float oneoverarea; - int facing; - - float pixel_offset; - - struct quad_header quad[MAX_QUADS]; - struct quad_header *quad_ptrs[MAX_QUADS]; - unsigned count; - - struct tgsi_interp_coef coef[PIPE_MAX_SHADER_INPUTS]; - struct tgsi_interp_coef posCoef; /* For Z, W */ - - struct { - int left[2]; /**< [0] = row0, [1] = row1 */ - int right[2]; - int y; - } span; - -#if DEBUG_FRAGS - uint numFragsEmitted; /**< per primitive */ - uint numFragsWritten; /**< per primitive */ -#endif - - unsigned cull_face; /* which faces cull */ - unsigned nr_vertex_attrs; -}; - - - - - - - -/** - * Clip setup->quad against the scissor/surface bounds. - */ -static INLINE void -quad_clip(struct setup_context *setup, struct quad_header *quad) -{ - const struct pipe_scissor_state *cliprect = &setup->softpipe->cliprect; - const int minx = (int) cliprect->minx; - const int maxx = (int) cliprect->maxx; - const int miny = (int) cliprect->miny; - const int maxy = (int) cliprect->maxy; - - if (quad->input.x0 >= maxx || - quad->input.y0 >= maxy || - quad->input.x0 + 1 < minx || - quad->input.y0 + 1 < miny) { - /* totally clipped */ - quad->inout.mask = 0x0; - return; - } - if (quad->input.x0 < minx) - quad->inout.mask &= (MASK_BOTTOM_RIGHT | MASK_TOP_RIGHT); - if (quad->input.y0 < miny) - quad->inout.mask &= (MASK_BOTTOM_LEFT | MASK_BOTTOM_RIGHT); - if (quad->input.x0 == maxx - 1) - quad->inout.mask &= (MASK_BOTTOM_LEFT | MASK_TOP_LEFT); - if (quad->input.y0 == maxy - 1) - quad->inout.mask &= (MASK_TOP_LEFT | MASK_TOP_RIGHT); -} - - -/** - * Emit a quad (pass to next stage) with clipping. - */ -static INLINE void -clip_emit_quad(struct setup_context *setup, struct quad_header *quad) -{ - quad_clip( setup, quad ); - - if (quad->inout.mask) { - struct softpipe_context *sp = setup->softpipe; - - sp->quad.first->run( sp->quad.first, &quad, 1 ); - } -} - - - -/** - * Given an X or Y coordinate, return the block/quad coordinate that it - * belongs to. - */ -static INLINE int -block(int x) -{ - return x & ~(2-1); -} - - -static INLINE int -block_x(int x) -{ - return x & ~(16-1); -} - - -/** - * Render a horizontal span of quads - */ -static void -flush_spans(struct setup_context *setup) -{ - const int step = MAX_QUADS; - const int xleft0 = setup->span.left[0]; - const int xleft1 = setup->span.left[1]; - const int xright0 = setup->span.right[0]; - const int xright1 = setup->span.right[1]; - struct quad_stage *pipe = setup->softpipe->quad.first; - - const int minleft = block_x(MIN2(xleft0, xleft1)); - const int maxright = MAX2(xright0, xright1); - int x; - - /* process quads in horizontal chunks of 16 */ - for (x = minleft; x < maxright; x += step) { - unsigned skip_left0 = CLAMP(xleft0 - x, 0, step); - unsigned skip_left1 = CLAMP(xleft1 - x, 0, step); - unsigned skip_right0 = CLAMP(x + step - xright0, 0, step); - unsigned skip_right1 = CLAMP(x + step - xright1, 0, step); - unsigned lx = x; - unsigned q = 0; - - unsigned skipmask_left0 = (1U << skip_left0) - 1U; - unsigned skipmask_left1 = (1U << skip_left1) - 1U; - - /* These calculations fail when step == 32 and skip_right == 0. - */ - unsigned skipmask_right0 = ~0U << (unsigned)(step - skip_right0); - unsigned skipmask_right1 = ~0U << (unsigned)(step - skip_right1); - - unsigned mask0 = ~skipmask_left0 & ~skipmask_right0; - unsigned mask1 = ~skipmask_left1 & ~skipmask_right1; - - if (mask0 | mask1) { - do { - unsigned quadmask = (mask0 & 3) | ((mask1 & 3) << 2); - if (quadmask) { - setup->quad[q].input.x0 = lx; - setup->quad[q].input.y0 = setup->span.y; - setup->quad[q].input.facing = setup->facing; - setup->quad[q].inout.mask = quadmask; - setup->quad_ptrs[q] = &setup->quad[q]; - q++; - } - mask0 >>= 2; - mask1 >>= 2; - lx += 2; - } while (mask0 | mask1); - - pipe->run( pipe, setup->quad_ptrs, q ); - } - } - - - setup->span.y = 0; - setup->span.right[0] = 0; - setup->span.right[1] = 0; - setup->span.left[0] = 1000000; /* greater than right[0] */ - setup->span.left[1] = 1000000; /* greater than right[1] */ -} - - -#if DEBUG_VERTS -static void -print_vertex(const struct setup_context *setup, - const float (*v)[4]) -{ - int i; - debug_printf(" Vertex: (%p)\n", (void *) v); - for (i = 0; i < setup->nr_vertex_attrs; i++) { - debug_printf(" %d: %f %f %f %f\n", i, - v[i][0], v[i][1], v[i][2], v[i][3]); - if (util_is_inf_or_nan(v[i][0])) { - debug_printf(" NaN!\n"); - } - } -} -#endif - - -/** - * Sort the vertices from top to bottom order, setting up the triangle - * edge fields (ebot, emaj, etop). - * \return FALSE if coords are inf/nan (cull the tri), TRUE otherwise - */ -static boolean -setup_sort_vertices(struct setup_context *setup, - float det, - const float (*v0)[4], - const float (*v1)[4], - const float (*v2)[4]) -{ - if (setup->softpipe->rasterizer->flatshade_first) - setup->vprovoke = v0; - else - setup->vprovoke = v2; - - /* determine bottom to top order of vertices */ - { - float y0 = v0[0][1]; - float y1 = v1[0][1]; - float y2 = v2[0][1]; - if (y0 <= y1) { - if (y1 <= y2) { - /* y0<=y1<=y2 */ - setup->vmin = v0; - setup->vmid = v1; - setup->vmax = v2; - } - else if (y2 <= y0) { - /* y2<=y0<=y1 */ - setup->vmin = v2; - setup->vmid = v0; - setup->vmax = v1; - } - else { - /* y0<=y2<=y1 */ - setup->vmin = v0; - setup->vmid = v2; - setup->vmax = v1; - } - } - else { - if (y0 <= y2) { - /* y1<=y0<=y2 */ - setup->vmin = v1; - setup->vmid = v0; - setup->vmax = v2; - } - else if (y2 <= y1) { - /* y2<=y1<=y0 */ - setup->vmin = v2; - setup->vmid = v1; - setup->vmax = v0; - } - else { - /* y1<=y2<=y0 */ - setup->vmin = v1; - setup->vmid = v2; - setup->vmax = v0; - } - } - } - - setup->ebot.dx = setup->vmid[0][0] - setup->vmin[0][0]; - setup->ebot.dy = setup->vmid[0][1] - setup->vmin[0][1]; - setup->emaj.dx = setup->vmax[0][0] - setup->vmin[0][0]; - setup->emaj.dy = setup->vmax[0][1] - setup->vmin[0][1]; - setup->etop.dx = setup->vmax[0][0] - setup->vmid[0][0]; - setup->etop.dy = setup->vmax[0][1] - setup->vmid[0][1]; - - /* - * Compute triangle's area. Use 1/area to compute partial - * derivatives of attributes later. - * - * The area will be the same as prim->det, but the sign may be - * different depending on how the vertices get sorted above. - * - * To determine whether the primitive is front or back facing we - * use the prim->det value because its sign is correct. - */ - { - const float area = (setup->emaj.dx * setup->ebot.dy - - setup->ebot.dx * setup->emaj.dy); - - setup->oneoverarea = 1.0f / area; - - /* - debug_printf("%s one-over-area %f area %f det %f\n", - __FUNCTION__, setup->oneoverarea, area, det ); - */ - if (util_is_inf_or_nan(setup->oneoverarea)) - return FALSE; - } - - /* We need to know if this is a front or back-facing triangle for: - * - the GLSL gl_FrontFacing fragment attribute (bool) - * - two-sided stencil test - * 0 = front-facing, 1 = back-facing - */ - setup->facing = - ((det < 0.0) ^ - (setup->softpipe->rasterizer->front_ccw)); - - { - unsigned face = setup->facing == 0 ? PIPE_FACE_FRONT : PIPE_FACE_BACK; - - if (face & setup->cull_face) - return FALSE; - } - - - /* Prepare pixel offset for rasterisation: - * - pixel center (0.5, 0.5) for GL, or - * - assume (0.0, 0.0) for other APIs. - */ - if (setup->softpipe->rasterizer->gl_rasterization_rules) { - setup->pixel_offset = 0.5f; - } else { - setup->pixel_offset = 0.0f; - } - - return TRUE; -} - - -/* Apply cylindrical wrapping to v0, v1, v2 coordinates, if enabled. - * Input coordinates must be in [0, 1] range, otherwise results are undefined. - * Some combinations of coordinates produce invalid results, - * but this behaviour is acceptable. - */ -static void -tri_apply_cylindrical_wrap(float v0, - float v1, - float v2, - uint cylindrical_wrap, - float output[3]) -{ - if (cylindrical_wrap) { - float delta; - - delta = v1 - v0; - if (delta > 0.5f) { - v0 += 1.0f; - } - else if (delta < -0.5f) { - v1 += 1.0f; - } - - delta = v2 - v1; - if (delta > 0.5f) { - v1 += 1.0f; - } - else if (delta < -0.5f) { - v2 += 1.0f; - } - - delta = v0 - v2; - if (delta > 0.5f) { - v2 += 1.0f; - } - else if (delta < -0.5f) { - v0 += 1.0f; - } - } - - output[0] = v0; - output[1] = v1; - output[2] = v2; -} - - -/** - * Compute a0 for a constant-valued coefficient (GL_FLAT shading). - * The value value comes from vertex[slot][i]. - * The result will be put into setup->coef[slot].a0[i]. - * \param slot which attribute slot - * \param i which component of the slot (0..3) - */ -static void -const_coeff(struct setup_context *setup, - struct tgsi_interp_coef *coef, - uint vertSlot, uint i) -{ - assert(i <= 3); - - coef->dadx[i] = 0; - coef->dady[i] = 0; - - /* need provoking vertex info! - */ - coef->a0[i] = setup->vprovoke[vertSlot][i]; -} - - -/** - * Compute a0, dadx and dady for a linearly interpolated coefficient, - * for a triangle. - * v[0], v[1] and v[2] are vmin, vmid and vmax, respectively. - */ -static void -tri_linear_coeff(struct setup_context *setup, - struct tgsi_interp_coef *coef, - uint i, - const float v[3]) -{ - float botda = v[1] - v[0]; - float majda = v[2] - v[0]; - float a = setup->ebot.dy * majda - botda * setup->emaj.dy; - float b = setup->emaj.dx * botda - majda * setup->ebot.dx; - float dadx = a * setup->oneoverarea; - float dady = b * setup->oneoverarea; - - assert(i <= 3); - - coef->dadx[i] = dadx; - coef->dady[i] = dady; - - /* calculate a0 as the value which would be sampled for the - * fragment at (0,0), taking into account that we want to sample at - * pixel centers, in other words (pixel_offset, pixel_offset). - * - * this is neat but unfortunately not a good way to do things for - * triangles with very large values of dadx or dady as it will - * result in the subtraction and re-addition from a0 of a very - * large number, which means we'll end up loosing a lot of the - * fractional bits and precision from a0. the way to fix this is - * to define a0 as the sample at a pixel center somewhere near vmin - * instead - i'll switch to this later. - */ - coef->a0[i] = (v[0] - - (dadx * (setup->vmin[0][0] - setup->pixel_offset) + - dady * (setup->vmin[0][1] - setup->pixel_offset))); - - /* - debug_printf("attr[%d].%c: %f dx:%f dy:%f\n", - slot, "xyzw"[i], - setup->coef[slot].a0[i], - setup->coef[slot].dadx[i], - setup->coef[slot].dady[i]); - */ -} - - -/** - * Compute a0, dadx and dady for a perspective-corrected interpolant, - * for a triangle. - * We basically multiply the vertex value by 1/w before computing - * the plane coefficients (a0, dadx, dady). - * Later, when we compute the value at a particular fragment position we'll - * divide the interpolated value by the interpolated W at that fragment. - * v[0], v[1] and v[2] are vmin, vmid and vmax, respectively. - */ -static void -tri_persp_coeff(struct setup_context *setup, - struct tgsi_interp_coef *coef, - uint i, - const float v[3]) -{ - /* premultiply by 1/w (v[0][3] is always W): - */ - float mina = v[0] * setup->vmin[0][3]; - float mida = v[1] * setup->vmid[0][3]; - float maxa = v[2] * setup->vmax[0][3]; - float botda = mida - mina; - float majda = maxa - mina; - float a = setup->ebot.dy * majda - botda * setup->emaj.dy; - float b = setup->emaj.dx * botda - majda * setup->ebot.dx; - float dadx = a * setup->oneoverarea; - float dady = b * setup->oneoverarea; - - /* - debug_printf("tri persp %d,%d: %f %f %f\n", vertSlot, i, - setup->vmin[vertSlot][i], - setup->vmid[vertSlot][i], - setup->vmax[vertSlot][i] - ); - */ - assert(i <= 3); - - coef->dadx[i] = dadx; - coef->dady[i] = dady; - coef->a0[i] = (mina - - (dadx * (setup->vmin[0][0] - setup->pixel_offset) + - dady * (setup->vmin[0][1] - setup->pixel_offset))); -} - - -/** - * Special coefficient setup for gl_FragCoord. - * X and Y are trivial, though Y may have to be inverted for OpenGL. - * Z and W are copied from posCoef which should have already been computed. - * We could do a bit less work if we'd examine gl_FragCoord's swizzle mask. - */ -static void -setup_fragcoord_coeff(struct setup_context *setup, uint slot) -{ - const struct tgsi_shader_info *fsInfo = &setup->softpipe->fs_variant->info; - - /*X*/ - setup->coef[slot].a0[0] = fsInfo->pixel_center_integer ? 0.0 : 0.5; - setup->coef[slot].dadx[0] = 1.0; - setup->coef[slot].dady[0] = 0.0; - /*Y*/ - setup->coef[slot].a0[1] = - (fsInfo->origin_lower_left ? setup->softpipe->framebuffer.height-1 : 0) - + (fsInfo->pixel_center_integer ? 0.0 : 0.5); - setup->coef[slot].dadx[1] = 0.0; - setup->coef[slot].dady[1] = fsInfo->origin_lower_left ? -1.0 : 1.0; - /*Z*/ - setup->coef[slot].a0[2] = setup->posCoef.a0[2]; - setup->coef[slot].dadx[2] = setup->posCoef.dadx[2]; - setup->coef[slot].dady[2] = setup->posCoef.dady[2]; - /*W*/ - setup->coef[slot].a0[3] = setup->posCoef.a0[3]; - setup->coef[slot].dadx[3] = setup->posCoef.dadx[3]; - setup->coef[slot].dady[3] = setup->posCoef.dady[3]; -} - - - -/** - * Compute the setup->coef[] array dadx, dady, a0 values. - * Must be called after setup->vmin,vmid,vmax,vprovoke are initialized. - */ -static void -setup_tri_coefficients(struct setup_context *setup) -{ - struct softpipe_context *softpipe = setup->softpipe; - const struct tgsi_shader_info *fsInfo = &setup->softpipe->fs_variant->info; - const struct vertex_info *vinfo = softpipe_get_vertex_info(softpipe); - uint fragSlot; - float v[3]; - - /* z and w are done by linear interpolation: - */ - v[0] = setup->vmin[0][2]; - v[1] = setup->vmid[0][2]; - v[2] = setup->vmax[0][2]; - tri_linear_coeff(setup, &setup->posCoef, 2, v); - - v[0] = setup->vmin[0][3]; - v[1] = setup->vmid[0][3]; - v[2] = setup->vmax[0][3]; - tri_linear_coeff(setup, &setup->posCoef, 3, v); - - /* setup interpolation for all the remaining attributes: - */ - for (fragSlot = 0; fragSlot < fsInfo->num_inputs; fragSlot++) { - const uint vertSlot = vinfo->attrib[fragSlot].src_index; - uint j; - - switch (vinfo->attrib[fragSlot].interp_mode) { - case INTERP_CONSTANT: - for (j = 0; j < NUM_CHANNELS; j++) - const_coeff(setup, &setup->coef[fragSlot], vertSlot, j); - break; - case INTERP_LINEAR: - for (j = 0; j < NUM_CHANNELS; j++) { - tri_apply_cylindrical_wrap(setup->vmin[vertSlot][j], - setup->vmid[vertSlot][j], - setup->vmax[vertSlot][j], - fsInfo->input_cylindrical_wrap[fragSlot] & (1 << j), - v); - tri_linear_coeff(setup, &setup->coef[fragSlot], j, v); - } - break; - case INTERP_PERSPECTIVE: - for (j = 0; j < NUM_CHANNELS; j++) { - tri_apply_cylindrical_wrap(setup->vmin[vertSlot][j], - setup->vmid[vertSlot][j], - setup->vmax[vertSlot][j], - fsInfo->input_cylindrical_wrap[fragSlot] & (1 << j), - v); - tri_persp_coeff(setup, &setup->coef[fragSlot], j, v); - } - break; - case INTERP_POS: - setup_fragcoord_coeff(setup, fragSlot); - break; - default: - assert(0); - } - - if (fsInfo->input_semantic_name[fragSlot] == TGSI_SEMANTIC_FACE) { - /* convert 0 to 1.0 and 1 to -1.0 */ - setup->coef[fragSlot].a0[0] = setup->facing * -2.0f + 1.0f; - setup->coef[fragSlot].dadx[0] = 0.0; - setup->coef[fragSlot].dady[0] = 0.0; - } - } -} - - -static void -setup_tri_edges(struct setup_context *setup) -{ - float vmin_x = setup->vmin[0][0] + setup->pixel_offset; - float vmid_x = setup->vmid[0][0] + setup->pixel_offset; - - float vmin_y = setup->vmin[0][1] - setup->pixel_offset; - float vmid_y = setup->vmid[0][1] - setup->pixel_offset; - float vmax_y = setup->vmax[0][1] - setup->pixel_offset; - - setup->emaj.sy = ceilf(vmin_y); - setup->emaj.lines = (int) ceilf(vmax_y - setup->emaj.sy); - setup->emaj.dxdy = setup->emaj.dy ? setup->emaj.dx / setup->emaj.dy : .0f; - setup->emaj.sx = vmin_x + (setup->emaj.sy - vmin_y) * setup->emaj.dxdy; - - setup->etop.sy = ceilf(vmid_y); - setup->etop.lines = (int) ceilf(vmax_y - setup->etop.sy); - setup->etop.dxdy = setup->etop.dy ? setup->etop.dx / setup->etop.dy : .0f; - setup->etop.sx = vmid_x + (setup->etop.sy - vmid_y) * setup->etop.dxdy; - - setup->ebot.sy = ceilf(vmin_y); - setup->ebot.lines = (int) ceilf(vmid_y - setup->ebot.sy); - setup->ebot.dxdy = setup->ebot.dy ? setup->ebot.dx / setup->ebot.dy : .0f; - setup->ebot.sx = vmin_x + (setup->ebot.sy - vmin_y) * setup->ebot.dxdy; -} - - -/** - * Render the upper or lower half of a triangle. - * Scissoring/cliprect is applied here too. - */ -static void -subtriangle(struct setup_context *setup, - struct edge *eleft, - struct edge *eright, - int lines) -{ - const struct pipe_scissor_state *cliprect = &setup->softpipe->cliprect; - const int minx = (int) cliprect->minx; - const int maxx = (int) cliprect->maxx; - const int miny = (int) cliprect->miny; - const int maxy = (int) cliprect->maxy; - int y, start_y, finish_y; - int sy = (int)eleft->sy; - - assert((int)eleft->sy == (int) eright->sy); - assert(lines >= 0); - - /* clip top/bottom */ - start_y = sy; - if (start_y < miny) - start_y = miny; - - finish_y = sy + lines; - if (finish_y > maxy) - finish_y = maxy; - - start_y -= sy; - finish_y -= sy; - - /* - debug_printf("%s %d %d\n", __FUNCTION__, start_y, finish_y); - */ - - for (y = start_y; y < finish_y; y++) { - - /* avoid accumulating adds as floats don't have the precision to - * accurately iterate large triangle edges that way. luckily we - * can just multiply these days. - * - * this is all drowned out by the attribute interpolation anyway. - */ - int left = (int)(eleft->sx + y * eleft->dxdy); - int right = (int)(eright->sx + y * eright->dxdy); - - /* clip left/right */ - if (left < minx) - left = minx; - if (right > maxx) - right = maxx; - - if (left < right) { - int _y = sy + y; - if (block(_y) != setup->span.y) { - flush_spans(setup); - setup->span.y = block(_y); - } - - setup->span.left[_y&1] = left; - setup->span.right[_y&1] = right; - } - } - - - /* save the values so that emaj can be restarted: - */ - eleft->sx += lines * eleft->dxdy; - eright->sx += lines * eright->dxdy; - eleft->sy += lines; - eright->sy += lines; -} - - -/** - * Recalculate prim's determinant. This is needed as we don't have - * get this information through the vbuf_render interface & we must - * calculate it here. - */ -static float -calc_det(const float (*v0)[4], - const float (*v1)[4], - const float (*v2)[4]) -{ - /* edge vectors e = v0 - v2, f = v1 - v2 */ - const float ex = v0[0][0] - v2[0][0]; - const float ey = v0[0][1] - v2[0][1]; - const float fx = v1[0][0] - v2[0][0]; - const float fy = v1[0][1] - v2[0][1]; - - /* det = cross(e,f).z */ - return ex * fy - ey * fx; -} - - -/** - * Do setup for triangle rasterization, then render the triangle. - */ -void -sp_setup_tri(struct setup_context *setup, - const float (*v0)[4], - const float (*v1)[4], - const float (*v2)[4]) -{ - float det; - -#if DEBUG_VERTS - debug_printf("Setup triangle:\n"); - print_vertex(setup, v0); - print_vertex(setup, v1); - print_vertex(setup, v2); -#endif - - if (setup->softpipe->no_rast || setup->softpipe->rasterizer->rasterizer_discard) - return; - - det = calc_det(v0, v1, v2); - /* - debug_printf("%s\n", __FUNCTION__ ); - */ - -#if DEBUG_FRAGS - setup->numFragsEmitted = 0; - setup->numFragsWritten = 0; -#endif - - if (!setup_sort_vertices( setup, det, v0, v1, v2 )) - return; - - setup_tri_coefficients( setup ); - setup_tri_edges( setup ); - - assert(setup->softpipe->reduced_prim == PIPE_PRIM_TRIANGLES); - - setup->span.y = 0; - setup->span.right[0] = 0; - setup->span.right[1] = 0; - /* setup->span.z_mode = tri_z_mode( setup->ctx ); */ - - /* init_constant_attribs( setup ); */ - - if (setup->oneoverarea < 0.0) { - /* emaj on left: - */ - subtriangle( setup, &setup->emaj, &setup->ebot, setup->ebot.lines ); - subtriangle( setup, &setup->emaj, &setup->etop, setup->etop.lines ); - } - else { - /* emaj on right: - */ - subtriangle( setup, &setup->ebot, &setup->emaj, setup->ebot.lines ); - subtriangle( setup, &setup->etop, &setup->emaj, setup->etop.lines ); - } - - flush_spans( setup ); - -#if DEBUG_FRAGS - printf("Tri: %u frags emitted, %u written\n", - setup->numFragsEmitted, - setup->numFragsWritten); -#endif -} - - -/* Apply cylindrical wrapping to v0, v1 coordinates, if enabled. - * Input coordinates must be in [0, 1] range, otherwise results are undefined. - */ -static void -line_apply_cylindrical_wrap(float v0, - float v1, - uint cylindrical_wrap, - float output[2]) -{ - if (cylindrical_wrap) { - float delta; - - delta = v1 - v0; - if (delta > 0.5f) { - v0 += 1.0f; - } - else if (delta < -0.5f) { - v1 += 1.0f; - } - } - - output[0] = v0; - output[1] = v1; -} - - -/** - * Compute a0, dadx and dady for a linearly interpolated coefficient, - * for a line. - * v[0] and v[1] are vmin and vmax, respectively. - */ -static void -line_linear_coeff(const struct setup_context *setup, - struct tgsi_interp_coef *coef, - uint i, - const float v[2]) -{ - const float da = v[1] - v[0]; - const float dadx = da * setup->emaj.dx * setup->oneoverarea; - const float dady = da * setup->emaj.dy * setup->oneoverarea; - coef->dadx[i] = dadx; - coef->dady[i] = dady; - coef->a0[i] = (v[0] - - (dadx * (setup->vmin[0][0] - setup->pixel_offset) + - dady * (setup->vmin[0][1] - setup->pixel_offset))); -} - - -/** - * Compute a0, dadx and dady for a perspective-corrected interpolant, - * for a line. - * v[0] and v[1] are vmin and vmax, respectively. - */ -static void -line_persp_coeff(const struct setup_context *setup, - struct tgsi_interp_coef *coef, - uint i, - const float v[2]) -{ - const float a0 = v[0] * setup->vmin[0][3]; - const float a1 = v[1] * setup->vmax[0][3]; - const float da = a1 - a0; - const float dadx = da * setup->emaj.dx * setup->oneoverarea; - const float dady = da * setup->emaj.dy * setup->oneoverarea; - coef->dadx[i] = dadx; - coef->dady[i] = dady; - coef->a0[i] = (a0 - - (dadx * (setup->vmin[0][0] - setup->pixel_offset) + - dady * (setup->vmin[0][1] - setup->pixel_offset))); -} - - -/** - * Compute the setup->coef[] array dadx, dady, a0 values. - * Must be called after setup->vmin,vmax are initialized. - */ -static boolean -setup_line_coefficients(struct setup_context *setup, - const float (*v0)[4], - const float (*v1)[4]) -{ - struct softpipe_context *softpipe = setup->softpipe; - const struct tgsi_shader_info *fsInfo = &setup->softpipe->fs_variant->info; - const struct vertex_info *vinfo = softpipe_get_vertex_info(softpipe); - uint fragSlot; - float area; - float v[2]; - - /* use setup->vmin, vmax to point to vertices */ - if (softpipe->rasterizer->flatshade_first) - setup->vprovoke = v0; - else - setup->vprovoke = v1; - setup->vmin = v0; - setup->vmax = v1; - - setup->emaj.dx = setup->vmax[0][0] - setup->vmin[0][0]; - setup->emaj.dy = setup->vmax[0][1] - setup->vmin[0][1]; - - /* NOTE: this is not really area but something proportional to it */ - area = setup->emaj.dx * setup->emaj.dx + setup->emaj.dy * setup->emaj.dy; - if (area == 0.0f || util_is_inf_or_nan(area)) - return FALSE; - setup->oneoverarea = 1.0f / area; - - /* z and w are done by linear interpolation: - */ - v[0] = setup->vmin[0][2]; - v[1] = setup->vmax[0][2]; - line_linear_coeff(setup, &setup->posCoef, 2, v); - - v[0] = setup->vmin[0][3]; - v[1] = setup->vmax[0][3]; - line_linear_coeff(setup, &setup->posCoef, 3, v); - - /* setup interpolation for all the remaining attributes: - */ - for (fragSlot = 0; fragSlot < fsInfo->num_inputs; fragSlot++) { - const uint vertSlot = vinfo->attrib[fragSlot].src_index; - uint j; - - switch (vinfo->attrib[fragSlot].interp_mode) { - case INTERP_CONSTANT: - for (j = 0; j < NUM_CHANNELS; j++) - const_coeff(setup, &setup->coef[fragSlot], vertSlot, j); - break; - case INTERP_LINEAR: - for (j = 0; j < NUM_CHANNELS; j++) { - line_apply_cylindrical_wrap(setup->vmin[vertSlot][j], - setup->vmax[vertSlot][j], - fsInfo->input_cylindrical_wrap[fragSlot] & (1 << j), - v); - line_linear_coeff(setup, &setup->coef[fragSlot], j, v); - } - break; - case INTERP_PERSPECTIVE: - for (j = 0; j < NUM_CHANNELS; j++) { - line_apply_cylindrical_wrap(setup->vmin[vertSlot][j], - setup->vmax[vertSlot][j], - fsInfo->input_cylindrical_wrap[fragSlot] & (1 << j), - v); - line_persp_coeff(setup, &setup->coef[fragSlot], j, v); - } - break; - case INTERP_POS: - setup_fragcoord_coeff(setup, fragSlot); - break; - default: - assert(0); - } - - if (fsInfo->input_semantic_name[fragSlot] == TGSI_SEMANTIC_FACE) { - /* convert 0 to 1.0 and 1 to -1.0 */ - setup->coef[fragSlot].a0[0] = setup->facing * -2.0f + 1.0f; - setup->coef[fragSlot].dadx[0] = 0.0; - setup->coef[fragSlot].dady[0] = 0.0; - } - } - return TRUE; -} - - -/** - * Plot a pixel in a line segment. - */ -static INLINE void -plot(struct setup_context *setup, int x, int y) -{ - const int iy = y & 1; - const int ix = x & 1; - const int quadX = x - ix; - const int quadY = y - iy; - const int mask = (1 << ix) << (2 * iy); - - if (quadX != setup->quad[0].input.x0 || - quadY != setup->quad[0].input.y0) - { - /* flush prev quad, start new quad */ - - if (setup->quad[0].input.x0 != -1) - clip_emit_quad( setup, &setup->quad[0] ); - - setup->quad[0].input.x0 = quadX; - setup->quad[0].input.y0 = quadY; - setup->quad[0].inout.mask = 0x0; - } - - setup->quad[0].inout.mask |= mask; -} - - -/** - * Do setup for line rasterization, then render the line. - * Single-pixel width, no stipple, etc. We rely on the 'draw' module - * to handle stippling and wide lines. - */ -void -sp_setup_line(struct setup_context *setup, - const float (*v0)[4], - const float (*v1)[4]) -{ - int x0 = (int) v0[0][0]; - int x1 = (int) v1[0][0]; - int y0 = (int) v0[0][1]; - int y1 = (int) v1[0][1]; - int dx = x1 - x0; - int dy = y1 - y0; - int xstep, ystep; - -#if DEBUG_VERTS - debug_printf("Setup line:\n"); - print_vertex(setup, v0); - print_vertex(setup, v1); -#endif - - if (setup->softpipe->no_rast || setup->softpipe->rasterizer->rasterizer_discard) - return; - - if (dx == 0 && dy == 0) - return; - - if (!setup_line_coefficients(setup, v0, v1)) - return; - - assert(v0[0][0] < 1.0e9); - assert(v0[0][1] < 1.0e9); - assert(v1[0][0] < 1.0e9); - assert(v1[0][1] < 1.0e9); - - if (dx < 0) { - dx = -dx; /* make positive */ - xstep = -1; - } - else { - xstep = 1; - } - - if (dy < 0) { - dy = -dy; /* make positive */ - ystep = -1; - } - else { - ystep = 1; - } - - assert(dx >= 0); - assert(dy >= 0); - assert(setup->softpipe->reduced_prim == PIPE_PRIM_LINES); - - setup->quad[0].input.x0 = setup->quad[0].input.y0 = -1; - setup->quad[0].inout.mask = 0x0; - - /* XXX temporary: set coverage to 1.0 so the line appears - * if AA mode happens to be enabled. - */ - setup->quad[0].input.coverage[0] = - setup->quad[0].input.coverage[1] = - setup->quad[0].input.coverage[2] = - setup->quad[0].input.coverage[3] = 1.0; - - if (dx > dy) { - /*** X-major line ***/ - int i; - const int errorInc = dy + dy; - int error = errorInc - dx; - const int errorDec = error - dx; - - for (i = 0; i < dx; i++) { - plot(setup, x0, y0); - - x0 += xstep; - if (error < 0) { - error += errorInc; - } - else { - error += errorDec; - y0 += ystep; - } - } - } - else { - /*** Y-major line ***/ - int i; - const int errorInc = dx + dx; - int error = errorInc - dy; - const int errorDec = error - dy; - - for (i = 0; i < dy; i++) { - plot(setup, x0, y0); - - y0 += ystep; - if (error < 0) { - error += errorInc; - } - else { - error += errorDec; - x0 += xstep; - } - } - } - - /* draw final quad */ - if (setup->quad[0].inout.mask) { - clip_emit_quad( setup, &setup->quad[0] ); - } -} - - -static void -point_persp_coeff(const struct setup_context *setup, - const float (*vert)[4], - struct tgsi_interp_coef *coef, - uint vertSlot, uint i) -{ - assert(i <= 3); - coef->dadx[i] = 0.0F; - coef->dady[i] = 0.0F; - coef->a0[i] = vert[vertSlot][i] * vert[0][3]; -} - - -/** - * Do setup for point rasterization, then render the point. - * Round or square points... - * XXX could optimize a lot for 1-pixel points. - */ -void -sp_setup_point(struct setup_context *setup, - const float (*v0)[4]) -{ - struct softpipe_context *softpipe = setup->softpipe; - const struct tgsi_shader_info *fsInfo = &setup->softpipe->fs_variant->info; - const int sizeAttr = setup->softpipe->psize_slot; - const float size - = sizeAttr > 0 ? v0[sizeAttr][0] - : setup->softpipe->rasterizer->point_size; - const float halfSize = 0.5F * size; - const boolean round = (boolean) setup->softpipe->rasterizer->point_smooth; - const float x = v0[0][0]; /* Note: data[0] is always position */ - const float y = v0[0][1]; - const struct vertex_info *vinfo = softpipe_get_vertex_info(softpipe); - uint fragSlot; - -#if DEBUG_VERTS - debug_printf("Setup point:\n"); - print_vertex(setup, v0); -#endif - - if (setup->softpipe->no_rast || setup->softpipe->rasterizer->rasterizer_discard) - return; - - assert(setup->softpipe->reduced_prim == PIPE_PRIM_POINTS); - - /* For points, all interpolants are constant-valued. - * However, for point sprites, we'll need to setup texcoords appropriately. - * XXX: which coefficients are the texcoords??? - * We may do point sprites as textured quads... - * - * KW: We don't know which coefficients are texcoords - ultimately - * the choice of what interpolation mode to use for each attribute - * should be determined by the fragment program, using - * per-attribute declaration statements that include interpolation - * mode as a parameter. So either the fragment program will have - * to be adjusted for pointsprite vs normal point behaviour, or - * otherwise a special interpolation mode will have to be defined - * which matches the required behaviour for point sprites. But - - * the latter is not a feature of normal hardware, and as such - * probably should be ruled out on that basis. - */ - setup->vprovoke = v0; - - /* setup Z, W */ - const_coeff(setup, &setup->posCoef, 0, 2); - const_coeff(setup, &setup->posCoef, 0, 3); - - for (fragSlot = 0; fragSlot < fsInfo->num_inputs; fragSlot++) { - const uint vertSlot = vinfo->attrib[fragSlot].src_index; - uint j; - - switch (vinfo->attrib[fragSlot].interp_mode) { - case INTERP_CONSTANT: - /* fall-through */ - case INTERP_LINEAR: - for (j = 0; j < NUM_CHANNELS; j++) - const_coeff(setup, &setup->coef[fragSlot], vertSlot, j); - break; - case INTERP_PERSPECTIVE: - for (j = 0; j < NUM_CHANNELS; j++) - point_persp_coeff(setup, setup->vprovoke, - &setup->coef[fragSlot], vertSlot, j); - break; - case INTERP_POS: - setup_fragcoord_coeff(setup, fragSlot); - break; - default: - assert(0); - } - - if (fsInfo->input_semantic_name[fragSlot] == TGSI_SEMANTIC_FACE) { - /* convert 0 to 1.0 and 1 to -1.0 */ - setup->coef[fragSlot].a0[0] = setup->facing * -2.0f + 1.0f; - setup->coef[fragSlot].dadx[0] = 0.0; - setup->coef[fragSlot].dady[0] = 0.0; - } - } - - - if (halfSize <= 0.5 && !round) { - /* special case for 1-pixel points */ - const int ix = ((int) x) & 1; - const int iy = ((int) y) & 1; - setup->quad[0].input.x0 = (int) x - ix; - setup->quad[0].input.y0 = (int) y - iy; - setup->quad[0].inout.mask = (1 << ix) << (2 * iy); - clip_emit_quad( setup, &setup->quad[0] ); - } - else { - if (round) { - /* rounded points */ - const int ixmin = block((int) (x - halfSize)); - const int ixmax = block((int) (x + halfSize)); - const int iymin = block((int) (y - halfSize)); - const int iymax = block((int) (y + halfSize)); - const float rmin = halfSize - 0.7071F; /* 0.7071 = sqrt(2)/2 */ - const float rmax = halfSize + 0.7071F; - const float rmin2 = MAX2(0.0F, rmin * rmin); - const float rmax2 = rmax * rmax; - const float cscale = 1.0F / (rmax2 - rmin2); - int ix, iy; - - for (iy = iymin; iy <= iymax; iy += 2) { - for (ix = ixmin; ix <= ixmax; ix += 2) { - float dx, dy, dist2, cover; - - setup->quad[0].inout.mask = 0x0; - - dx = (ix + 0.5f) - x; - dy = (iy + 0.5f) - y; - dist2 = dx * dx + dy * dy; - if (dist2 <= rmax2) { - cover = 1.0F - (dist2 - rmin2) * cscale; - setup->quad[0].input.coverage[QUAD_TOP_LEFT] = MIN2(cover, 1.0f); - setup->quad[0].inout.mask |= MASK_TOP_LEFT; - } - - dx = (ix + 1.5f) - x; - dy = (iy + 0.5f) - y; - dist2 = dx * dx + dy * dy; - if (dist2 <= rmax2) { - cover = 1.0F - (dist2 - rmin2) * cscale; - setup->quad[0].input.coverage[QUAD_TOP_RIGHT] = MIN2(cover, 1.0f); - setup->quad[0].inout.mask |= MASK_TOP_RIGHT; - } - - dx = (ix + 0.5f) - x; - dy = (iy + 1.5f) - y; - dist2 = dx * dx + dy * dy; - if (dist2 <= rmax2) { - cover = 1.0F - (dist2 - rmin2) * cscale; - setup->quad[0].input.coverage[QUAD_BOTTOM_LEFT] = MIN2(cover, 1.0f); - setup->quad[0].inout.mask |= MASK_BOTTOM_LEFT; - } - - dx = (ix + 1.5f) - x; - dy = (iy + 1.5f) - y; - dist2 = dx * dx + dy * dy; - if (dist2 <= rmax2) { - cover = 1.0F - (dist2 - rmin2) * cscale; - setup->quad[0].input.coverage[QUAD_BOTTOM_RIGHT] = MIN2(cover, 1.0f); - setup->quad[0].inout.mask |= MASK_BOTTOM_RIGHT; - } - - if (setup->quad[0].inout.mask) { - setup->quad[0].input.x0 = ix; - setup->quad[0].input.y0 = iy; - clip_emit_quad( setup, &setup->quad[0] ); - } - } - } - } - else { - /* square points */ - const int xmin = (int) (x + 0.75 - halfSize); - const int ymin = (int) (y + 0.25 - halfSize); - const int xmax = xmin + (int) size; - const int ymax = ymin + (int) size; - /* XXX could apply scissor to xmin,ymin,xmax,ymax now */ - const int ixmin = block(xmin); - const int ixmax = block(xmax - 1); - const int iymin = block(ymin); - const int iymax = block(ymax - 1); - int ix, iy; - - /* - debug_printf("(%f, %f) -> X:%d..%d Y:%d..%d\n", x, y, xmin, xmax,ymin,ymax); - */ - for (iy = iymin; iy <= iymax; iy += 2) { - uint rowMask = 0xf; - if (iy < ymin) { - /* above the top edge */ - rowMask &= (MASK_BOTTOM_LEFT | MASK_BOTTOM_RIGHT); - } - if (iy + 1 >= ymax) { - /* below the bottom edge */ - rowMask &= (MASK_TOP_LEFT | MASK_TOP_RIGHT); - } - - for (ix = ixmin; ix <= ixmax; ix += 2) { - uint mask = rowMask; - - if (ix < xmin) { - /* fragment is past left edge of point, turn off left bits */ - mask &= (MASK_BOTTOM_RIGHT | MASK_TOP_RIGHT); - } - if (ix + 1 >= xmax) { - /* past the right edge */ - mask &= (MASK_BOTTOM_LEFT | MASK_TOP_LEFT); - } - - setup->quad[0].inout.mask = mask; - setup->quad[0].input.x0 = ix; - setup->quad[0].input.y0 = iy; - clip_emit_quad( setup, &setup->quad[0] ); - } - } - } - } -} - - -/** - * Called by vbuf code just before we start buffering primitives. - */ -void -sp_setup_prepare(struct setup_context *setup) -{ - struct softpipe_context *sp = setup->softpipe; - - if (sp->dirty) { - softpipe_update_derived(sp, sp->reduced_api_prim); - } - - /* Note: nr_attrs is only used for debugging (vertex printing) */ - setup->nr_vertex_attrs = draw_num_shader_outputs(sp->draw); - - sp->quad.first->begin( sp->quad.first ); - - if (sp->reduced_api_prim == PIPE_PRIM_TRIANGLES && - sp->rasterizer->fill_front == PIPE_POLYGON_MODE_FILL && - sp->rasterizer->fill_back == PIPE_POLYGON_MODE_FILL) { - /* we'll do culling */ - setup->cull_face = sp->rasterizer->cull_face; - } - else { - /* 'draw' will do culling */ - setup->cull_face = PIPE_FACE_NONE; - } -} - - -void -sp_setup_destroy_context(struct setup_context *setup) -{ - FREE( setup ); -} - - -/** - * Create a new primitive setup/render stage. - */ -struct setup_context * -sp_setup_create_context(struct softpipe_context *softpipe) -{ - struct setup_context *setup = CALLOC_STRUCT(setup_context); - unsigned i; - - setup->softpipe = softpipe; - - for (i = 0; i < MAX_QUADS; i++) { - setup->quad[i].coef = setup->coef; - setup->quad[i].posCoef = &setup->posCoef; - } - - setup->span.left[0] = 1000000; /* greater than right[0] */ - setup->span.left[1] = 1000000; /* greater than right[1] */ - - return setup; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_setup.h b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_setup.h deleted file mode 100644 index 9c8844d2e8e..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_setup.h +++ /dev/null @@ -1,53 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ -#ifndef SP_SETUP_H -#define SP_SETUP_H - -struct setup_context; -struct softpipe_context; - -void -sp_setup_tri( struct setup_context *setup, - const float (*v0)[4], - const float (*v1)[4], - const float (*v2)[4] ); - -void -sp_setup_line(struct setup_context *setup, - const float (*v0)[4], - const float (*v1)[4]); - -void -sp_setup_point( struct setup_context *setup, - const float (*v0)[4] ); - - -struct setup_context *sp_setup_create_context( struct softpipe_context *softpipe ); -void sp_setup_prepare( struct setup_context *setup ); -void sp_setup_destroy_context( struct setup_context *setup ); - -#endif diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state.h b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state.h deleted file mode 100644 index 6df40c66394..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state.h +++ /dev/null @@ -1,193 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: Keith Whitwell - */ - -#ifndef SP_STATE_H -#define SP_STATE_H - -#include "pipe/p_state.h" -#include "tgsi/tgsi_scan.h" - - -#define SP_NEW_VIEWPORT 0x1 -#define SP_NEW_RASTERIZER 0x2 -#define SP_NEW_FS 0x4 -#define SP_NEW_BLEND 0x8 -#define SP_NEW_CLIP 0x10 -#define SP_NEW_SCISSOR 0x20 -#define SP_NEW_STIPPLE 0x40 -#define SP_NEW_FRAMEBUFFER 0x80 -#define SP_NEW_DEPTH_STENCIL_ALPHA 0x100 -#define SP_NEW_CONSTANTS 0x200 -#define SP_NEW_SAMPLER 0x400 -#define SP_NEW_TEXTURE 0x800 -#define SP_NEW_VERTEX 0x1000 -#define SP_NEW_VS 0x2000 -#define SP_NEW_QUERY 0x4000 -#define SP_NEW_GS 0x8000 -#define SP_NEW_SO 0x10000 -#define SP_NEW_SO_BUFFERS 0x20000 - - -struct tgsi_sampler; -struct tgsi_exec_machine; -struct vertex_info; - - -struct sp_fragment_shader_variant_key -{ - boolean polygon_stipple; -}; - - -struct sp_fragment_shader_variant -{ - const struct tgsi_token *tokens; - struct sp_fragment_shader_variant_key key; - struct tgsi_shader_info info; - - unsigned stipple_sampler_unit; - - /* See comments about this elsewhere */ -#if 0 - struct draw_fragment_shader *draw_shader; -#endif - - void (*prepare)(const struct sp_fragment_shader_variant *shader, - struct tgsi_exec_machine *machine, - struct tgsi_sampler **samplers); - - unsigned (*run)(const struct sp_fragment_shader_variant *shader, - struct tgsi_exec_machine *machine, - struct quad_header *quad); - - /* Deletes this instance of the object */ - void (*delete)(struct sp_fragment_shader_variant *shader); - - struct sp_fragment_shader_variant *next; -}; - - -/** Subclass of pipe_shader_state */ -struct sp_fragment_shader { - struct pipe_shader_state shader; - struct sp_fragment_shader_variant *variants; - struct draw_fragment_shader *draw_shader; -}; - - -/** Subclass of pipe_shader_state */ -struct sp_vertex_shader { - struct pipe_shader_state shader; - struct draw_vertex_shader *draw_data; - int max_sampler; /* -1 if no samplers */ -}; - -/** Subclass of pipe_shader_state */ -struct sp_geometry_shader { - struct pipe_shader_state shader; - struct draw_geometry_shader *draw_data; - int max_sampler; -}; - -struct sp_velems_state { - unsigned count; - struct pipe_vertex_element velem[PIPE_MAX_ATTRIBS]; -}; - -struct sp_so_state { - struct pipe_stream_output_info base; -}; - - -void -softpipe_init_blend_funcs(struct pipe_context *pipe); - -void -softpipe_init_clip_funcs(struct pipe_context *pipe); - -void -softpipe_init_sampler_funcs(struct pipe_context *pipe); - -void -softpipe_init_rasterizer_funcs(struct pipe_context *pipe); - -void -softpipe_init_shader_funcs(struct pipe_context *pipe); - -void -softpipe_init_streamout_funcs(struct pipe_context *pipe); - -void -softpipe_init_vertex_funcs(struct pipe_context *pipe); - -void -softpipe_set_framebuffer_state(struct pipe_context *, - const struct pipe_framebuffer_state *); - -void -softpipe_update_derived(struct softpipe_context *softpipe, unsigned prim); - -void -softpipe_draw_vbo(struct pipe_context *pipe, - const struct pipe_draw_info *info); - -void -softpipe_map_transfers(struct softpipe_context *sp); - -void -softpipe_unmap_transfers(struct softpipe_context *sp); - -void -softpipe_map_texture_surfaces(struct softpipe_context *sp); - -void -softpipe_unmap_texture_surfaces(struct softpipe_context *sp); - - -struct vertex_info * -softpipe_get_vertex_info(struct softpipe_context *softpipe); - -struct vertex_info * -softpipe_get_vbuf_vertex_info(struct softpipe_context *softpipe); - - -struct sp_fragment_shader_variant * -softpipe_find_fs_variant(struct softpipe_context *softpipe, - struct sp_fragment_shader *fs, - const struct sp_fragment_shader_variant_key *key); - - -struct sp_fragment_shader_variant * -softpipe_find_fs_variant(struct softpipe_context *softpipe, - struct sp_fragment_shader *fs, - const struct sp_fragment_shader_variant_key *key); - - -#endif diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_blend.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_blend.c deleted file mode 100644 index 1fbc5f34560..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_blend.c +++ /dev/null @@ -1,150 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: Keith Whitwell - */ - -#include "util/u_math.h" -#include "util/u_memory.h" -#include "draw/draw_context.h" -#include "sp_context.h" -#include "sp_state.h" - - -static void * -softpipe_create_blend_state(struct pipe_context *pipe, - const struct pipe_blend_state *blend) -{ - return mem_dup(blend, sizeof(*blend)); -} - - -static void -softpipe_bind_blend_state(struct pipe_context *pipe, - void *blend) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - - draw_flush(softpipe->draw); - - softpipe->blend = (struct pipe_blend_state *)blend; - - softpipe->dirty |= SP_NEW_BLEND; -} - - -static void -softpipe_delete_blend_state(struct pipe_context *pipe, - void *blend) -{ - FREE( blend ); -} - - -static void -softpipe_set_blend_color(struct pipe_context *pipe, - const struct pipe_blend_color *blend_color) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - unsigned i; - - draw_flush(softpipe->draw); - - softpipe->blend_color = *blend_color; - - /* save clamped color too */ - for (i = 0; i < 4; i++) - softpipe->blend_color_clamped.color[i] = - CLAMP(blend_color->color[i], 0.0f, 1.0f); - - softpipe->dirty |= SP_NEW_BLEND; -} - - -static void * -softpipe_create_depth_stencil_state(struct pipe_context *pipe, - const struct pipe_depth_stencil_alpha_state *depth_stencil) -{ - return mem_dup(depth_stencil, sizeof(*depth_stencil)); -} - - -static void -softpipe_bind_depth_stencil_state(struct pipe_context *pipe, - void *depth_stencil) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - - softpipe->depth_stencil = (struct pipe_depth_stencil_alpha_state *)depth_stencil; - - softpipe->dirty |= SP_NEW_DEPTH_STENCIL_ALPHA; -} - - -static void -softpipe_delete_depth_stencil_state(struct pipe_context *pipe, void *depth) -{ - FREE( depth ); -} - - -static void -softpipe_set_stencil_ref(struct pipe_context *pipe, - const struct pipe_stencil_ref *stencil_ref) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - - softpipe->stencil_ref = *stencil_ref; - - softpipe->dirty |= SP_NEW_DEPTH_STENCIL_ALPHA; -} - - -static void -softpipe_set_sample_mask(struct pipe_context *pipe, - unsigned sample_mask) -{ -} - - -void -softpipe_init_blend_funcs(struct pipe_context *pipe) -{ - pipe->create_blend_state = softpipe_create_blend_state; - pipe->bind_blend_state = softpipe_bind_blend_state; - pipe->delete_blend_state = softpipe_delete_blend_state; - - pipe->set_blend_color = softpipe_set_blend_color; - - pipe->create_depth_stencil_alpha_state = softpipe_create_depth_stencil_state; - pipe->bind_depth_stencil_alpha_state = softpipe_bind_depth_stencil_state; - pipe->delete_depth_stencil_alpha_state = softpipe_delete_depth_stencil_state; - - pipe->set_stencil_ref = softpipe_set_stencil_ref; - - pipe->set_sample_mask = softpipe_set_sample_mask; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_clip.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_clip.c deleted file mode 100644 index f3a4c234e27..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_clip.c +++ /dev/null @@ -1,93 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: Keith Whitwell - */ -#include "sp_context.h" -#include "sp_state.h" -#include "draw/draw_context.h" - - -static void -softpipe_set_clip_state(struct pipe_context *pipe, - const struct pipe_clip_state *clip) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - - /* pass the clip state to the draw module */ - draw_set_clip_state(softpipe->draw, clip); -} - - -static void -softpipe_set_viewport_state(struct pipe_context *pipe, - const struct pipe_viewport_state *viewport) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - - /* pass the viewport info to the draw module */ - draw_set_viewport_state(softpipe->draw, viewport); - - softpipe->viewport = *viewport; /* struct copy */ - softpipe->dirty |= SP_NEW_VIEWPORT; -} - - -static void -softpipe_set_scissor_state(struct pipe_context *pipe, - const struct pipe_scissor_state *scissor) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - - draw_flush(softpipe->draw); - - softpipe->scissor = *scissor; /* struct copy */ - softpipe->dirty |= SP_NEW_SCISSOR; -} - - -static void -softpipe_set_polygon_stipple(struct pipe_context *pipe, - const struct pipe_poly_stipple *stipple) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - - draw_flush(softpipe->draw); - - softpipe->poly_stipple = *stipple; /* struct copy */ - softpipe->dirty |= SP_NEW_STIPPLE; -} - - -void -softpipe_init_clip_funcs(struct pipe_context *pipe) -{ - pipe->set_clip_state = softpipe_set_clip_state; - pipe->set_viewport_state = softpipe_set_viewport_state; - pipe->set_scissor_state = softpipe_set_scissor_state; - pipe->set_polygon_stipple = softpipe_set_polygon_stipple; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_derived.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_derived.c deleted file mode 100644 index b9b0f94289f..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_derived.c +++ /dev/null @@ -1,404 +0,0 @@ -/************************************************************************** - * - * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_inlines.h" -#include "util/u_math.h" -#include "util/u_memory.h" -#include "util/u_pstipple.h" -#include "pipe/p_shader_tokens.h" -#include "draw/draw_context.h" -#include "draw/draw_vertex.h" -#include "sp_context.h" -#include "sp_screen.h" -#include "sp_state.h" -#include "sp_texture.h" -#include "sp_tex_tile_cache.h" - - -/** - * Mark the current vertex layout as "invalid". - * We'll validate the vertex layout later, when we start to actually - * render a point or line or tri. - */ -static void -invalidate_vertex_layout(struct softpipe_context *softpipe) -{ - softpipe->vertex_info.num_attribs = 0; -} - - -/** - * The vertex info describes how to convert the post-transformed vertices - * (simple float[][4]) used by the 'draw' module into vertices for - * rasterization. - * - * This function validates the vertex layout and returns a pointer to a - * vertex_info object. - */ -struct vertex_info * -softpipe_get_vertex_info(struct softpipe_context *softpipe) -{ - struct vertex_info *vinfo = &softpipe->vertex_info; - - if (vinfo->num_attribs == 0) { - /* compute vertex layout now */ - const struct tgsi_shader_info *fsInfo = &softpipe->fs_variant->info; - struct vertex_info *vinfo_vbuf = &softpipe->vertex_info_vbuf; - const uint num = draw_num_shader_outputs(softpipe->draw); - uint i; - - /* Tell draw_vbuf to simply emit the whole post-xform vertex - * as-is. No longer any need to try and emit draw vertex_header - * info. - */ - vinfo_vbuf->num_attribs = 0; - for (i = 0; i < num; i++) { - draw_emit_vertex_attr(vinfo_vbuf, EMIT_4F, INTERP_PERSPECTIVE, i); - } - draw_compute_vertex_size(vinfo_vbuf); - - /* - * Loop over fragment shader inputs, searching for the matching output - * from the vertex shader. - */ - vinfo->num_attribs = 0; - for (i = 0; i < fsInfo->num_inputs; i++) { - int src; - enum interp_mode interp = INTERP_LINEAR; - - switch (fsInfo->input_interpolate[i]) { - case TGSI_INTERPOLATE_CONSTANT: - interp = INTERP_CONSTANT; - break; - case TGSI_INTERPOLATE_LINEAR: - interp = INTERP_LINEAR; - break; - case TGSI_INTERPOLATE_PERSPECTIVE: - interp = INTERP_PERSPECTIVE; - break; - case TGSI_INTERPOLATE_COLOR: - assert(fsInfo->input_semantic_name[i] == TGSI_SEMANTIC_COLOR); - break; - default: - assert(0); - } - - switch (fsInfo->input_semantic_name[i]) { - case TGSI_SEMANTIC_POSITION: - interp = INTERP_POS; - break; - - case TGSI_SEMANTIC_COLOR: - if (fsInfo->input_interpolate[i] == TGSI_INTERPOLATE_COLOR) { - if (softpipe->rasterizer->flatshade) - interp = INTERP_CONSTANT; - else - interp = INTERP_PERSPECTIVE; - } - break; - } - - /* this includes texcoords and varying vars */ - src = draw_find_shader_output(softpipe->draw, - fsInfo->input_semantic_name[i], - fsInfo->input_semantic_index[i]); - if (fsInfo->input_semantic_name[i] == TGSI_SEMANTIC_COLOR && src == 0) - /* try and find a bcolor */ - src = draw_find_shader_output(softpipe->draw, - TGSI_SEMANTIC_BCOLOR, fsInfo->input_semantic_index[i]); - - draw_emit_vertex_attr(vinfo, EMIT_4F, interp, src); - } - - softpipe->psize_slot = draw_find_shader_output(softpipe->draw, - TGSI_SEMANTIC_PSIZE, 0); - if (softpipe->psize_slot > 0) { - draw_emit_vertex_attr(vinfo, EMIT_4F, INTERP_CONSTANT, - softpipe->psize_slot); - } - - draw_compute_vertex_size(vinfo); - } - - return vinfo; -} - - -/** - * Called from vbuf module. - * - * Note that there's actually two different vertex layouts in softpipe. - * - * The normal one is computed in softpipe_get_vertex_info() above and is - * used by the point/line/tri "setup" code. - * - * The other one (this one) is only used by the vbuf module (which is - * not normally used by default but used in testing). For the vbuf module, - * we basically want to pass-through the draw module's vertex layout as-is. - * When the softpipe vbuf code begins drawing, the normal vertex layout - * will come into play again. - */ -struct vertex_info * -softpipe_get_vbuf_vertex_info(struct softpipe_context *softpipe) -{ - (void) softpipe_get_vertex_info(softpipe); - return &softpipe->vertex_info_vbuf; -} - - -/** - * Recompute cliprect from scissor bounds, scissor enable and surface size. - */ -static void -compute_cliprect(struct softpipe_context *sp) -{ - /* SP_NEW_FRAMEBUFFER - */ - uint surfWidth = sp->framebuffer.width; - uint surfHeight = sp->framebuffer.height; - - /* SP_NEW_RASTERIZER - */ - if (sp->rasterizer->scissor) { - - /* SP_NEW_SCISSOR - * - * clip to scissor rect: - */ - sp->cliprect.minx = MAX2(sp->scissor.minx, 0); - sp->cliprect.miny = MAX2(sp->scissor.miny, 0); - sp->cliprect.maxx = MIN2(sp->scissor.maxx, surfWidth); - sp->cliprect.maxy = MIN2(sp->scissor.maxy, surfHeight); - } - else { - /* clip to surface bounds */ - sp->cliprect.minx = 0; - sp->cliprect.miny = 0; - sp->cliprect.maxx = surfWidth; - sp->cliprect.maxy = surfHeight; - } -} - - -static void -update_tgsi_samplers( struct softpipe_context *softpipe ) -{ - unsigned i; - - softpipe_reset_sampler_variants( softpipe ); - - for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { - struct softpipe_tex_tile_cache *tc = softpipe->fragment_tex_cache[i]; - if (tc && tc->texture) { - struct softpipe_resource *spt = softpipe_resource(tc->texture); - if (spt->timestamp != tc->timestamp) { - sp_tex_tile_cache_validate_texture( tc ); - /* - _debug_printf("INV %d %d\n", tc->timestamp, spt->timestamp); - */ - tc->timestamp = spt->timestamp; - } - } - } - - for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++) { - struct softpipe_tex_tile_cache *tc = softpipe->vertex_tex_cache[i]; - - if (tc && tc->texture) { - struct softpipe_resource *spt = softpipe_resource(tc->texture); - - if (spt->timestamp != tc->timestamp) { - sp_tex_tile_cache_validate_texture(tc); - tc->timestamp = spt->timestamp; - } - } - } - - for (i = 0; i < PIPE_MAX_GEOMETRY_SAMPLERS; i++) { - struct softpipe_tex_tile_cache *tc = softpipe->geometry_tex_cache[i]; - - if (tc && tc->texture) { - struct softpipe_resource *spt = softpipe_resource(tc->texture); - - if (spt->timestamp != tc->timestamp) { - sp_tex_tile_cache_validate_texture(tc); - tc->timestamp = spt->timestamp; - } - } - } -} - - -static void -update_fragment_shader(struct softpipe_context *softpipe, unsigned prim) -{ - struct sp_fragment_shader_variant_key key; - - memset(&key, 0, sizeof(key)); - - if (prim == PIPE_PRIM_TRIANGLES) - key.polygon_stipple = softpipe->rasterizer->poly_stipple_enable; - - if (softpipe->fs) { - softpipe->fs_variant = softpipe_find_fs_variant(softpipe, - softpipe->fs, &key); - } - else { - softpipe->fs_variant = NULL; - } - - /* This would be the logical place to pass the fragment shader - * to the draw module. However, doing this here, during state - * validation, causes problems with the 'draw' module helpers for - * wide/AA/stippled lines. - * In principle, the draw's fragment shader should be per-variant - * but that doesn't work. So we use a single draw fragment shader - * per fragment shader, not per variant. - */ -#if 0 - if (softpipe->fs_variant) { - draw_bind_fragment_shader(softpipe->draw, - softpipe->fs_variant->draw_shader); - } - else { - draw_bind_fragment_shader(softpipe->draw, NULL); - } -#endif -} - - -/** - * This should be called when the polygon stipple pattern changes. - * We create a new texture from the stipple pattern and create a new - * sampler view. - */ -static void -update_polygon_stipple_pattern(struct softpipe_context *softpipe) -{ - struct pipe_resource *tex; - struct pipe_sampler_view *view; - - tex = util_pstipple_create_stipple_texture(&softpipe->pipe, - softpipe->poly_stipple.stipple); - pipe_resource_reference(&softpipe->pstipple.texture, tex); - pipe_resource_reference(&tex, NULL); - - view = util_pstipple_create_sampler_view(&softpipe->pipe, - softpipe->pstipple.texture); - pipe_sampler_view_reference(&softpipe->pstipple.sampler_view, view); - pipe_sampler_view_reference(&view, NULL); -} - - -/** - * Should be called when polygon stipple is enabled/disabled or when - * the fragment shader changes. - * We add/update the fragment sampler and sampler views to sample from - * the polygon stipple texture. The texture unit that we use depends on - * the fragment shader (we need to use a unit not otherwise used by the - * shader). - */ -static void -update_polygon_stipple_enable(struct softpipe_context *softpipe, unsigned prim) -{ - if (prim == PIPE_PRIM_TRIANGLES && - softpipe->fs_variant->key.polygon_stipple) { - const unsigned unit = softpipe->fs_variant->stipple_sampler_unit; - - assert(unit >= softpipe->num_fragment_samplers); - - /* sampler state */ - softpipe->fragment_samplers[unit] = softpipe->pstipple.sampler; - - /* sampler view */ - pipe_sampler_view_reference(&softpipe->fragment_sampler_views[unit], - softpipe->pstipple.sampler_view); - - sp_tex_tile_cache_set_sampler_view(softpipe->fragment_tex_cache[unit], - softpipe->pstipple.sampler_view); - - softpipe->dirty |= SP_NEW_SAMPLER; - } -} - - -/* Hopefully this will remain quite simple, otherwise need to pull in - * something like the state tracker mechanism. - */ -void -softpipe_update_derived(struct softpipe_context *softpipe, unsigned prim) -{ - struct softpipe_screen *sp_screen = softpipe_screen(softpipe->pipe.screen); - - /* Check for updated textures. - */ - if (softpipe->tex_timestamp != sp_screen->timestamp) { - softpipe->tex_timestamp = sp_screen->timestamp; - softpipe->dirty |= SP_NEW_TEXTURE; - } - -#if DO_PSTIPPLE_IN_HELPER_MODULE - if (softpipe->dirty & SP_NEW_STIPPLE) - /* before updating samplers! */ - update_polygon_stipple_pattern(softpipe); -#endif - - if (softpipe->dirty & (SP_NEW_RASTERIZER | - SP_NEW_FS)) - update_fragment_shader(softpipe, prim); - -#if DO_PSTIPPLE_IN_HELPER_MODULE - if (softpipe->dirty & (SP_NEW_RASTERIZER | - SP_NEW_STIPPLE | - SP_NEW_FS)) - update_polygon_stipple_enable(softpipe, prim); -#endif - - if (softpipe->dirty & (SP_NEW_SAMPLER | - SP_NEW_TEXTURE | - SP_NEW_FS | - SP_NEW_VS)) - update_tgsi_samplers( softpipe ); - - if (softpipe->dirty & (SP_NEW_RASTERIZER | - SP_NEW_FS | - SP_NEW_VS)) - invalidate_vertex_layout( softpipe ); - - if (softpipe->dirty & (SP_NEW_SCISSOR | - SP_NEW_RASTERIZER | - SP_NEW_FRAMEBUFFER)) - compute_cliprect(softpipe); - - if (softpipe->dirty & (SP_NEW_BLEND | - SP_NEW_DEPTH_STENCIL_ALPHA | - SP_NEW_FRAMEBUFFER | - SP_NEW_FS)) - sp_build_quad_pipeline(softpipe); - - softpipe->dirty = 0; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_rasterizer.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_rasterizer.c deleted file mode 100644 index 3cd4acd7432..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_rasterizer.c +++ /dev/null @@ -1,76 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "pipe/p_defines.h" -#include "util/u_memory.h" -#include "sp_context.h" -#include "sp_state.h" -#include "draw/draw_context.h" - - - -static void * -softpipe_create_rasterizer_state(struct pipe_context *pipe, - const struct pipe_rasterizer_state *rast) -{ - return mem_dup(rast, sizeof(*rast)); -} - - -static void -softpipe_bind_rasterizer_state(struct pipe_context *pipe, - void *rasterizer) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - - if (softpipe->rasterizer == rasterizer) - return; - - /* pass-through to draw module */ - draw_set_rasterizer_state(softpipe->draw, rasterizer, rasterizer); - - softpipe->rasterizer = rasterizer; - - softpipe->dirty |= SP_NEW_RASTERIZER; -} - - -static void -softpipe_delete_rasterizer_state(struct pipe_context *pipe, - void *rasterizer) -{ - FREE( rasterizer ); -} - - -void -softpipe_init_rasterizer_funcs(struct pipe_context *pipe) -{ - pipe->create_rasterizer_state = softpipe_create_rasterizer_state; - pipe->bind_rasterizer_state = softpipe_bind_rasterizer_state; - pipe->delete_rasterizer_state = softpipe_delete_rasterizer_state; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_sampler.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_sampler.c deleted file mode 100644 index 16023c990a7..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_sampler.c +++ /dev/null @@ -1,424 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: - * Brian Paul - */ - -#include "util/u_memory.h" -#include "util/u_inlines.h" - -#include "draw/draw_context.h" - -#include "sp_context.h" -#include "sp_state.h" -#include "sp_texture.h" -#include "sp_tex_sample.h" -#include "sp_tex_tile_cache.h" - - -struct sp_sampler { - struct pipe_sampler_state base; - struct sp_sampler_variant *variants; - struct sp_sampler_variant *current; -}; - -static struct sp_sampler *sp_sampler( struct pipe_sampler_state *sampler ) -{ - return (struct sp_sampler *)sampler; -} - - -static void * -softpipe_create_sampler_state(struct pipe_context *pipe, - const struct pipe_sampler_state *sampler) -{ - struct sp_sampler *sp_sampler = CALLOC_STRUCT(sp_sampler); - - sp_sampler->base = *sampler; - sp_sampler->variants = NULL; - - return (void *)sp_sampler; -} - - -static void -softpipe_bind_fragment_sampler_states(struct pipe_context *pipe, - unsigned num, void **sampler) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - unsigned i; - - assert(num <= PIPE_MAX_SAMPLERS); - - /* Check for no-op */ - if (num == softpipe->num_fragment_samplers && - !memcmp(softpipe->fragment_samplers, sampler, num * sizeof(void *))) - return; - - draw_flush(softpipe->draw); - - for (i = 0; i < num; ++i) - softpipe->fragment_samplers[i] = sampler[i]; - for (i = num; i < PIPE_MAX_SAMPLERS; ++i) - softpipe->fragment_samplers[i] = NULL; - - softpipe->num_fragment_samplers = num; - - softpipe->dirty |= SP_NEW_SAMPLER; -} - - -static void -softpipe_bind_vertex_sampler_states(struct pipe_context *pipe, - unsigned num_samplers, - void **samplers) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - unsigned i; - - assert(num_samplers <= PIPE_MAX_VERTEX_SAMPLERS); - - /* Check for no-op */ - if (num_samplers == softpipe->num_vertex_samplers && - !memcmp(softpipe->vertex_samplers, samplers, num_samplers * sizeof(void *))) - return; - - draw_flush(softpipe->draw); - - for (i = 0; i < num_samplers; ++i) - softpipe->vertex_samplers[i] = samplers[i]; - for (i = num_samplers; i < PIPE_MAX_VERTEX_SAMPLERS; ++i) - softpipe->vertex_samplers[i] = NULL; - - softpipe->num_vertex_samplers = num_samplers; - - draw_set_samplers(softpipe->draw, - softpipe->vertex_samplers, - softpipe->num_vertex_samplers); - - softpipe->dirty |= SP_NEW_SAMPLER; -} - -static void -softpipe_bind_geometry_sampler_states(struct pipe_context *pipe, - unsigned num_samplers, - void **samplers) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - unsigned i; - - assert(num_samplers <= PIPE_MAX_GEOMETRY_SAMPLERS); - - /* Check for no-op */ - if (num_samplers == softpipe->num_geometry_samplers && - !memcmp(softpipe->geometry_samplers, samplers, num_samplers * sizeof(void *))) - return; - - draw_flush(softpipe->draw); - - for (i = 0; i < num_samplers; ++i) - softpipe->geometry_samplers[i] = samplers[i]; - for (i = num_samplers; i < PIPE_MAX_GEOMETRY_SAMPLERS; ++i) - softpipe->geometry_samplers[i] = NULL; - - softpipe->num_geometry_samplers = num_samplers; - - softpipe->dirty |= SP_NEW_SAMPLER; -} - - -static struct pipe_sampler_view * -softpipe_create_sampler_view(struct pipe_context *pipe, - struct pipe_resource *resource, - const struct pipe_sampler_view *templ) -{ - struct pipe_sampler_view *view = CALLOC_STRUCT(pipe_sampler_view); - - if (view) { - *view = *templ; - view->reference.count = 1; - view->texture = NULL; - pipe_resource_reference(&view->texture, resource); - view->context = pipe; - } - - return view; -} - - -static void -softpipe_sampler_view_destroy(struct pipe_context *pipe, - struct pipe_sampler_view *view) -{ - pipe_resource_reference(&view->texture, NULL); - FREE(view); -} - - -static void -softpipe_set_fragment_sampler_views(struct pipe_context *pipe, - unsigned num, - struct pipe_sampler_view **views) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - uint i; - - assert(num <= PIPE_MAX_SAMPLERS); - - /* Check for no-op */ - if (num == softpipe->num_fragment_sampler_views && - !memcmp(softpipe->fragment_sampler_views, views, - num * sizeof(struct pipe_sampler_view *))) - return; - - draw_flush(softpipe->draw); - - for (i = 0; i < PIPE_MAX_SAMPLERS; i++) { - struct pipe_sampler_view *view = i < num ? views[i] : NULL; - - pipe_sampler_view_reference(&softpipe->fragment_sampler_views[i], view); - sp_tex_tile_cache_set_sampler_view(softpipe->fragment_tex_cache[i], view); - } - - softpipe->num_fragment_sampler_views = num; - - softpipe->dirty |= SP_NEW_TEXTURE; -} - - -static void -softpipe_set_vertex_sampler_views(struct pipe_context *pipe, - unsigned num, - struct pipe_sampler_view **views) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - uint i; - - assert(num <= PIPE_MAX_VERTEX_SAMPLERS); - - /* Check for no-op */ - if (num == softpipe->num_vertex_sampler_views && - !memcmp(softpipe->vertex_sampler_views, views, num * sizeof(struct pipe_sampler_view *))) { - return; - } - - draw_flush(softpipe->draw); - - for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++) { - struct pipe_sampler_view *view = i < num ? views[i] : NULL; - - pipe_sampler_view_reference(&softpipe->vertex_sampler_views[i], view); - sp_tex_tile_cache_set_sampler_view(softpipe->vertex_tex_cache[i], view); - } - - softpipe->num_vertex_sampler_views = num; - - draw_set_sampler_views(softpipe->draw, - softpipe->vertex_sampler_views, - softpipe->num_vertex_sampler_views); - - softpipe->dirty |= SP_NEW_TEXTURE; -} - - -static void -softpipe_set_geometry_sampler_views(struct pipe_context *pipe, - unsigned num, - struct pipe_sampler_view **views) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - uint i; - - assert(num <= PIPE_MAX_GEOMETRY_SAMPLERS); - - /* Check for no-op */ - if (num == softpipe->num_geometry_sampler_views && - !memcmp(softpipe->geometry_sampler_views, views, num * sizeof(struct pipe_sampler_view *))) { - return; - } - - draw_flush(softpipe->draw); - - for (i = 0; i < PIPE_MAX_GEOMETRY_SAMPLERS; i++) { - struct pipe_sampler_view *view = i < num ? views[i] : NULL; - - pipe_sampler_view_reference(&softpipe->geometry_sampler_views[i], view); - sp_tex_tile_cache_set_sampler_view(softpipe->geometry_tex_cache[i], view); - } - - softpipe->num_geometry_sampler_views = num; - - softpipe->dirty |= SP_NEW_TEXTURE; -} - - -/** - * Find/create an sp_sampler_variant object for sampling the given texture, - * sampler and tex unit. - * - * Note that the tex unit is significant. We can't re-use a sampler - * variant for multiple texture units because the sampler variant contains - * the texture object pointer. If the texture object pointer were stored - * somewhere outside the sampler variant, we could re-use samplers for - * multiple texture units. - */ -static struct sp_sampler_variant * -get_sampler_variant( unsigned unit, - struct sp_sampler *sampler, - struct pipe_sampler_view *view, - unsigned processor ) -{ - struct softpipe_resource *sp_texture = softpipe_resource(view->texture); - struct sp_sampler_variant *v = NULL; - union sp_sampler_key key; - - /* if this fails, widen the key.unit field and update this assertion */ - assert(PIPE_MAX_SAMPLERS <= 16); - - key.bits.target = sp_texture->base.target; - key.bits.is_pot = sp_texture->pot; - key.bits.processor = processor; - key.bits.unit = unit; - key.bits.swizzle_r = view->swizzle_r; - key.bits.swizzle_g = view->swizzle_g; - key.bits.swizzle_b = view->swizzle_b; - key.bits.swizzle_a = view->swizzle_a; - key.bits.pad = 0; - - if (sampler->current && - key.value == sampler->current->key.value) { - v = sampler->current; - } - - if (v == NULL) { - for (v = sampler->variants; v; v = v->next) - if (v->key.value == key.value) - break; - - if (v == NULL) { - v = sp_create_sampler_variant( &sampler->base, key ); - v->next = sampler->variants; - sampler->variants = v; - } - } - - sampler->current = v; - return v; -} - - -void -softpipe_reset_sampler_variants(struct softpipe_context *softpipe) -{ - int i; - - /* It's a bit hard to build these samplers ahead of time -- don't - * really know which samplers are going to be used for vertex and - * fragment programs. - */ - for (i = 0; i <= softpipe->vs->max_sampler; i++) { - if (softpipe->vertex_samplers[i]) { - softpipe->tgsi.vert_samplers_list[i] = - get_sampler_variant( i, - sp_sampler(softpipe->vertex_samplers[i]), - softpipe->vertex_sampler_views[i], - TGSI_PROCESSOR_VERTEX ); - - sp_sampler_variant_bind_view( softpipe->tgsi.vert_samplers_list[i], - softpipe->vertex_tex_cache[i], - softpipe->vertex_sampler_views[i] ); - } - } - - if (softpipe->gs) { - for (i = 0; i <= softpipe->gs->max_sampler; i++) { - if (softpipe->geometry_samplers[i]) { - softpipe->tgsi.geom_samplers_list[i] = - get_sampler_variant( - i, - sp_sampler(softpipe->geometry_samplers[i]), - softpipe->geometry_sampler_views[i], - TGSI_PROCESSOR_GEOMETRY ); - - sp_sampler_variant_bind_view( - softpipe->tgsi.geom_samplers_list[i], - softpipe->geometry_tex_cache[i], - softpipe->geometry_sampler_views[i] ); - } - } - } - - for (i = 0; i <= softpipe->fs_variant->info.file_max[TGSI_FILE_SAMPLER]; i++) { - if (softpipe->fragment_samplers[i]) { - assert(softpipe->fragment_sampler_views[i]->texture); - softpipe->tgsi.frag_samplers_list[i] = - get_sampler_variant( i, - sp_sampler(softpipe->fragment_samplers[i]), - softpipe->fragment_sampler_views[i], - TGSI_PROCESSOR_FRAGMENT ); - - sp_sampler_variant_bind_view( softpipe->tgsi.frag_samplers_list[i], - softpipe->fragment_tex_cache[i], - softpipe->fragment_sampler_views[i] ); - } - } -} - -static void -softpipe_delete_sampler_state(struct pipe_context *pipe, - void *sampler) -{ - struct sp_sampler *sp_sampler = (struct sp_sampler *)sampler; - struct sp_sampler_variant *v, *tmp; - - for (v = sp_sampler->variants; v; v = tmp) { - tmp = v->next; - sp_sampler_variant_destroy(v); - } - - FREE( sampler ); -} - - -void -softpipe_init_sampler_funcs(struct pipe_context *pipe) -{ - pipe->create_sampler_state = softpipe_create_sampler_state; - pipe->bind_fragment_sampler_states = softpipe_bind_fragment_sampler_states; - pipe->bind_vertex_sampler_states = softpipe_bind_vertex_sampler_states; - pipe->bind_geometry_sampler_states = softpipe_bind_geometry_sampler_states; - pipe->delete_sampler_state = softpipe_delete_sampler_state; - - pipe->set_fragment_sampler_views = softpipe_set_fragment_sampler_views; - pipe->set_vertex_sampler_views = softpipe_set_vertex_sampler_views; - pipe->set_geometry_sampler_views = softpipe_set_geometry_sampler_views; - - pipe->create_sampler_view = softpipe_create_sampler_view; - pipe->sampler_view_destroy = softpipe_sampler_view_destroy; -} - diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_shader.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_shader.c deleted file mode 100644 index 6acb57b3fe6..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_shader.c +++ /dev/null @@ -1,385 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "sp_context.h" -#include "sp_state.h" -#include "sp_fs.h" -#include "sp_texture.h" - -#include "pipe/p_defines.h" -#include "util/u_memory.h" -#include "util/u_inlines.h" -#include "util/u_pstipple.h" -#include "draw/draw_context.h" -#include "draw/draw_vs.h" -#include "draw/draw_gs.h" -#include "tgsi/tgsi_dump.h" -#include "tgsi/tgsi_exec.h" -#include "tgsi/tgsi_scan.h" -#include "tgsi/tgsi_parse.h" - - -/** - * Create a new fragment shader variant. - */ -static struct sp_fragment_shader_variant * -create_fs_variant(struct softpipe_context *softpipe, - struct sp_fragment_shader *fs, - const struct sp_fragment_shader_variant_key *key) -{ - struct sp_fragment_shader_variant *var; - struct pipe_shader_state *stipple_fs = NULL, *curfs = &fs->shader; - unsigned unit = 0; - -#if DO_PSTIPPLE_IN_HELPER_MODULE - if (key->polygon_stipple) { - /* get new shader that implements polygon stippling */ - stipple_fs = util_pstipple_create_fragment_shader(&softpipe->pipe, - curfs, &unit); - curfs = stipple_fs; - } -#endif - - /* codegen, create variant object */ - var = softpipe_create_fs_variant_exec(softpipe, curfs); - - if (var) { - var->key = *key; - var->tokens = tgsi_dup_tokens(curfs->tokens); - var->stipple_sampler_unit = unit; - - tgsi_scan_shader(var->tokens, &var->info); - - /* See comments elsewhere about draw fragment shaders */ -#if 0 - /* draw's fs state */ - var->draw_shader = draw_create_fragment_shader(softpipe->draw, - &fs->shader); - if (!var->draw_shader) { - var->delete(var); - FREE((void *) var->tokens); - return NULL; - } -#endif - - /* insert variant into linked list */ - var->next = fs->variants; - fs->variants = var; - } - - if (stipple_fs) { - FREE((void *) stipple_fs->tokens); - FREE(stipple_fs); - } - - return var; -} - - -struct sp_fragment_shader_variant * -softpipe_find_fs_variant(struct softpipe_context *sp, - struct sp_fragment_shader *fs, - const struct sp_fragment_shader_variant_key *key) -{ - struct sp_fragment_shader_variant *var; - - for (var = fs->variants; var; var = var->next) { - if (memcmp(&var->key, key, sizeof(*key)) == 0) { - /* found it */ - return var; - } - } - - return create_fs_variant(sp, fs, key); -} - - -static void * -softpipe_create_fs_state(struct pipe_context *pipe, - const struct pipe_shader_state *templ) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - struct sp_fragment_shader *state = CALLOC_STRUCT(sp_fragment_shader); - - /* debug */ - if (softpipe->dump_fs) - tgsi_dump(templ->tokens, 0); - - /* we need to keep a local copy of the tokens */ - state->shader.tokens = tgsi_dup_tokens(templ->tokens); - - /* draw's fs state */ - state->draw_shader = draw_create_fragment_shader(softpipe->draw, - &state->shader); - if (!state->draw_shader) { - FREE((void *) state->shader.tokens); - FREE(state); - return NULL; - } - - return state; -} - - -static void -softpipe_bind_fs_state(struct pipe_context *pipe, void *fs) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - struct sp_fragment_shader *state = (struct sp_fragment_shader *) fs; - - if (softpipe->fs == fs) - return; - - draw_flush(softpipe->draw); - - softpipe->fs = fs; - - if (fs == NULL) - softpipe->fs_variant = NULL; - - if (state) - draw_bind_fragment_shader(softpipe->draw, - state->draw_shader); - else - draw_bind_fragment_shader(softpipe->draw, NULL); - - softpipe->dirty |= SP_NEW_FS; -} - - -static void -softpipe_delete_fs_state(struct pipe_context *pipe, void *fs) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - struct sp_fragment_shader *state = fs; - struct sp_fragment_shader_variant *var, *next_var; - - assert(fs != softpipe->fs); - - if (softpipe->fs_machine->Tokens == state->shader.tokens) { - /* unbind the shader from the tgsi executor if we're - * deleting it. - */ - tgsi_exec_machine_bind_shader(softpipe->fs_machine, NULL, 0, NULL); - } - - /* delete variants */ - for (var = state->variants; var; var = next_var) { - next_var = var->next; - - assert(var != softpipe->fs_variant); - - /* See comments elsewhere about draw fragment shaders */ -#if 0 - draw_delete_fragment_shader(softpipe->draw, var->draw_shader); -#endif - - var->delete(var); - } - - draw_delete_fragment_shader(softpipe->draw, state->draw_shader); - - FREE((void *) state->shader.tokens); - FREE(state); -} - - -static void * -softpipe_create_vs_state(struct pipe_context *pipe, - const struct pipe_shader_state *templ) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - struct sp_vertex_shader *state; - - state = CALLOC_STRUCT(sp_vertex_shader); - if (state == NULL ) - goto fail; - - /* copy shader tokens, the ones passed in will go away. - */ - state->shader.tokens = tgsi_dup_tokens(templ->tokens); - if (state->shader.tokens == NULL) - goto fail; - - state->draw_data = draw_create_vertex_shader(softpipe->draw, templ); - if (state->draw_data == NULL) - goto fail; - - state->max_sampler = state->draw_data->info.file_max[TGSI_FILE_SAMPLER]; - - return state; - -fail: - if (state) { - FREE( (void *)state->shader.tokens ); - FREE( state->draw_data ); - FREE( state ); - } - return NULL; -} - - -static void -softpipe_bind_vs_state(struct pipe_context *pipe, void *vs) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - - softpipe->vs = (struct sp_vertex_shader *) vs; - - draw_bind_vertex_shader(softpipe->draw, - (softpipe->vs ? softpipe->vs->draw_data : NULL)); - - softpipe->dirty |= SP_NEW_VS; -} - - -static void -softpipe_delete_vs_state(struct pipe_context *pipe, void *vs) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - - struct sp_vertex_shader *state = (struct sp_vertex_shader *) vs; - - draw_delete_vertex_shader(softpipe->draw, state->draw_data); - FREE( (void *)state->shader.tokens ); - FREE( state ); -} - - -static void * -softpipe_create_gs_state(struct pipe_context *pipe, - const struct pipe_shader_state *templ) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - struct sp_geometry_shader *state; - - state = CALLOC_STRUCT(sp_geometry_shader); - if (state == NULL ) - goto fail; - - /* debug */ - if (softpipe->dump_gs) - tgsi_dump(templ->tokens, 0); - - /* copy shader tokens, the ones passed in will go away. - */ - state->shader.tokens = tgsi_dup_tokens(templ->tokens); - if (state->shader.tokens == NULL) - goto fail; - - state->draw_data = draw_create_geometry_shader(softpipe->draw, templ); - if (state->draw_data == NULL) - goto fail; - - state->max_sampler = state->draw_data->info.file_max[TGSI_FILE_SAMPLER]; - - return state; - -fail: - if (state) { - FREE( (void *)state->shader.tokens ); - FREE( state->draw_data ); - FREE( state ); - } - return NULL; -} - - -static void -softpipe_bind_gs_state(struct pipe_context *pipe, void *gs) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - - softpipe->gs = (struct sp_geometry_shader *)gs; - - draw_bind_geometry_shader(softpipe->draw, - (softpipe->gs ? softpipe->gs->draw_data : NULL)); - - softpipe->dirty |= SP_NEW_GS; -} - - -static void -softpipe_delete_gs_state(struct pipe_context *pipe, void *gs) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - - struct sp_geometry_shader *state = - (struct sp_geometry_shader *)gs; - - draw_delete_geometry_shader(softpipe->draw, - (state) ? state->draw_data : 0); - - FREE((void *) state->shader.tokens); - FREE(state); -} - - -static void -softpipe_set_constant_buffer(struct pipe_context *pipe, - uint shader, uint index, - struct pipe_resource *constants) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - unsigned size = constants ? constants->width0 : 0; - const void *data = constants ? softpipe_resource(constants)->data : NULL; - - assert(shader < PIPE_SHADER_TYPES); - - draw_flush(softpipe->draw); - - /* note: reference counting */ - pipe_resource_reference(&softpipe->constants[shader][index], constants); - - if (shader == PIPE_SHADER_VERTEX || shader == PIPE_SHADER_GEOMETRY) { - draw_set_mapped_constant_buffer(softpipe->draw, shader, index, data, size); - } - - softpipe->mapped_constants[shader][index] = data; - softpipe->const_buffer_size[shader][index] = size; - - softpipe->dirty |= SP_NEW_CONSTANTS; -} - - -void -softpipe_init_shader_funcs(struct pipe_context *pipe) -{ - pipe->create_fs_state = softpipe_create_fs_state; - pipe->bind_fs_state = softpipe_bind_fs_state; - pipe->delete_fs_state = softpipe_delete_fs_state; - - pipe->create_vs_state = softpipe_create_vs_state; - pipe->bind_vs_state = softpipe_bind_vs_state; - pipe->delete_vs_state = softpipe_delete_vs_state; - - pipe->create_gs_state = softpipe_create_gs_state; - pipe->bind_gs_state = softpipe_bind_gs_state; - pipe->delete_gs_state = softpipe_delete_gs_state; - - pipe->set_constant_buffer = softpipe_set_constant_buffer; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_so.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_so.c deleted file mode 100644 index 2b5893906c8..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_so.c +++ /dev/null @@ -1,89 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "sp_context.h" -#include "sp_state.h" -#include "sp_texture.h" - -#include "util/u_format.h" -#include "util/u_memory.h" -#include "draw/draw_context.h" -#include "pipebuffer/pb_buffer.h" - -static struct pipe_stream_output_target * -softpipe_create_so_target(struct pipe_context *pipe, - struct pipe_resource *buffer, - unsigned buffer_offset, - unsigned buffer_size) -{ - struct draw_so_target *t; - - t = CALLOC_STRUCT(draw_so_target); - t->target.context = pipe; - t->target.reference.count = 1; - pipe_resource_reference(&t->target.buffer, buffer); - t->target.buffer_offset = buffer_offset; - t->target.buffer_size = buffer_size; - return &t->target; -} - -static void -softpipe_so_target_destroy(struct pipe_context *pipe, - struct pipe_stream_output_target *target) -{ - pipe_resource_reference(&target->buffer, NULL); - FREE(target); -} - -static void -softpipe_set_so_targets(struct pipe_context *pipe, - unsigned num_targets, - struct pipe_stream_output_target **targets, - unsigned append_bitmask) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - int i; - - for (i = 0; i < num_targets; i++) { - pipe_so_target_reference((struct pipe_stream_output_target **)&softpipe->so_targets[i], targets[i]); - } - - for (; i < softpipe->num_so_targets; i++) { - pipe_so_target_reference((struct pipe_stream_output_target **)&softpipe->so_targets[i], NULL); - } - - softpipe->num_so_targets = num_targets; -} - -void -softpipe_init_streamout_funcs(struct pipe_context *pipe) -{ - pipe->create_stream_output_target = softpipe_create_so_target; - pipe->stream_output_target_destroy = softpipe_so_target_destroy; - pipe->set_stream_output_targets = softpipe_set_so_targets; -} - diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_surface.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_surface.c deleted file mode 100644 index 2db6faeca46..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_surface.c +++ /dev/null @@ -1,104 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: Keith Whitwell - */ - -#include "sp_context.h" -#include "sp_state.h" -#include "sp_tile_cache.h" - -#include "draw/draw_context.h" - -#include "util/u_format.h" -#include "util/u_inlines.h" - - -/** - * XXX this might get moved someday - * Set the framebuffer surface info: color buffers, zbuffer, stencil buffer. - * Here, we flush the old surfaces and update the tile cache to point to the new - * surfaces. - */ -void -softpipe_set_framebuffer_state(struct pipe_context *pipe, - const struct pipe_framebuffer_state *fb) -{ - struct softpipe_context *sp = softpipe_context(pipe); - uint i; - - draw_flush(sp->draw); - - for (i = 0; i < PIPE_MAX_COLOR_BUFS; i++) { - /* check if changing cbuf */ - if (sp->framebuffer.cbufs[i] != fb->cbufs[i]) { - /* flush old */ - sp_flush_tile_cache(sp->cbuf_cache[i]); - - /* assign new */ - pipe_surface_reference(&sp->framebuffer.cbufs[i], fb->cbufs[i]); - - /* update cache */ - sp_tile_cache_set_surface(sp->cbuf_cache[i], fb->cbufs[i]); - } - } - - sp->framebuffer.nr_cbufs = fb->nr_cbufs; - - /* zbuf changing? */ - if (sp->framebuffer.zsbuf != fb->zsbuf) { - /* flush old */ - sp_flush_tile_cache(sp->zsbuf_cache); - - /* assign new */ - pipe_surface_reference(&sp->framebuffer.zsbuf, fb->zsbuf); - - /* update cache */ - sp_tile_cache_set_surface(sp->zsbuf_cache, fb->zsbuf); - - /* Tell draw module how deep the Z/depth buffer is */ - if (sp->framebuffer.zsbuf) { - int depth_bits; - double mrd; - depth_bits = util_format_get_component_bits(sp->framebuffer.zsbuf->format, - UTIL_FORMAT_COLORSPACE_ZS, - 0); - if (depth_bits > 16) { - mrd = 0.0000001; - } - else { - mrd = 0.00002; - } - draw_set_mrd(sp->draw, mrd); - } - } - - sp->framebuffer.width = fb->width; - sp->framebuffer.height = fb->height; - - sp->dirty |= SP_NEW_FRAMEBUFFER; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_vertex.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_vertex.c deleted file mode 100644 index aa0b333c7a9..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_state_vertex.c +++ /dev/null @@ -1,124 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: Keith Whitwell - */ - - -#include "sp_context.h" -#include "sp_state.h" - -#include "util/u_memory.h" -#include "util/u_inlines.h" -#include "util/u_transfer.h" -#include "draw/draw_context.h" - - -static void * -softpipe_create_vertex_elements_state(struct pipe_context *pipe, - unsigned count, - const struct pipe_vertex_element *attribs) -{ - struct sp_velems_state *velems; - assert(count <= PIPE_MAX_ATTRIBS); - velems = (struct sp_velems_state *) MALLOC(sizeof(struct sp_velems_state)); - if (velems) { - velems->count = count; - memcpy(velems->velem, attribs, sizeof(*attribs) * count); - } - return velems; -} - - -static void -softpipe_bind_vertex_elements_state(struct pipe_context *pipe, - void *velems) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - struct sp_velems_state *sp_velems = (struct sp_velems_state *) velems; - - softpipe->velems = sp_velems; - - softpipe->dirty |= SP_NEW_VERTEX; - - if (sp_velems) - draw_set_vertex_elements(softpipe->draw, sp_velems->count, sp_velems->velem); -} - - -static void -softpipe_delete_vertex_elements_state(struct pipe_context *pipe, void *velems) -{ - FREE( velems ); -} - - -static void -softpipe_set_vertex_buffers(struct pipe_context *pipe, - unsigned count, - const struct pipe_vertex_buffer *buffers) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - - assert(count <= PIPE_MAX_ATTRIBS); - - util_copy_vertex_buffers(softpipe->vertex_buffer, - &softpipe->num_vertex_buffers, - buffers, count); - - softpipe->dirty |= SP_NEW_VERTEX; - - draw_set_vertex_buffers(softpipe->draw, count, buffers); -} - - -static void -softpipe_set_index_buffer(struct pipe_context *pipe, - const struct pipe_index_buffer *ib) -{ - struct softpipe_context *softpipe = softpipe_context(pipe); - - if (ib) - memcpy(&softpipe->index_buffer, ib, sizeof(softpipe->index_buffer)); - else - memset(&softpipe->index_buffer, 0, sizeof(softpipe->index_buffer)); - - draw_set_index_buffer(softpipe->draw, ib); -} - - -void -softpipe_init_vertex_funcs(struct pipe_context *pipe) -{ - pipe->create_vertex_elements_state = softpipe_create_vertex_elements_state; - pipe->bind_vertex_elements_state = softpipe_bind_vertex_elements_state; - pipe->delete_vertex_elements_state = softpipe_delete_vertex_elements_state; - - pipe->set_vertex_buffers = softpipe_set_vertex_buffers; - pipe->set_index_buffer = softpipe_set_index_buffer; - pipe->redefine_user_buffer = u_default_redefine_user_buffer; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_surface.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_surface.c deleted file mode 100644 index 55b27e60100..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_surface.c +++ /dev/null @@ -1,38 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "util/u_surface.h" -#include "sp_context.h" -#include "sp_surface.h" - -void -sp_init_surface_functions(struct softpipe_context *sp) -{ - sp->pipe.resource_copy_region = util_resource_copy_region; - sp->pipe.clear_render_target = util_clear_render_target; - sp->pipe.clear_depth_stencil = util_clear_depth_stencil; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_surface.h b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_surface.h deleted file mode 100644 index 22de3ba43f6..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_surface.h +++ /dev/null @@ -1,42 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/* Authors: Keith Whitwell - */ - -#ifndef SP_SURFACE_H -#define SP_SURFACE_H - - -struct softpipe_context; - - -extern void -sp_init_surface_functions(struct softpipe_context *sp); - - -#endif /* SP_SURFACE_H */ diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_tex_sample.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_tex_sample.c deleted file mode 100644 index bd0546e0215..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_tex_sample.c +++ /dev/null @@ -1,2846 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * Copyright 2008-2010 VMware, Inc. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * Texture sampling - * - * Authors: - * Brian Paul - * Keith Whitwell - */ - -#include "pipe/p_context.h" -#include "pipe/p_defines.h" -#include "pipe/p_shader_tokens.h" -#include "util/u_math.h" -#include "util/u_memory.h" -#include "sp_quad.h" /* only for #define QUAD_* tokens */ -#include "sp_tex_sample.h" -#include "sp_tex_tile_cache.h" - - -/** Set to one to help debug texture sampling */ -#define DEBUG_TEX 0 - - -/* - * Return fractional part of 'f'. Used for computing interpolation weights. - * Need to be careful with negative values. - * Note, if this function isn't perfect you'll sometimes see 1-pixel bands - * of improperly weighted linear-filtered textures. - * The tests/texwrap.c demo is a good test. - */ -static INLINE float -frac(float f) -{ - return f - floorf(f); -} - - - -/** - * Linear interpolation macro - */ -static INLINE float -lerp(float a, float v0, float v1) -{ - return v0 + a * (v1 - v0); -} - - -/** - * Do 2D/bilinear interpolation of float values. - * v00, v10, v01 and v11 are typically four texture samples in a square/box. - * a and b are the horizontal and vertical interpolants. - * It's important that this function is inlined when compiled with - * optimization! If we find that's not true on some systems, convert - * to a macro. - */ -static INLINE float -lerp_2d(float a, float b, - float v00, float v10, float v01, float v11) -{ - const float temp0 = lerp(a, v00, v10); - const float temp1 = lerp(a, v01, v11); - return lerp(b, temp0, temp1); -} - - -/** - * As above, but 3D interpolation of 8 values. - */ -static INLINE float -lerp_3d(float a, float b, float c, - float v000, float v100, float v010, float v110, - float v001, float v101, float v011, float v111) -{ - const float temp0 = lerp_2d(a, b, v000, v100, v010, v110); - const float temp1 = lerp_2d(a, b, v001, v101, v011, v111); - return lerp(c, temp0, temp1); -} - - - -/** - * Compute coord % size for repeat wrap modes. - * Note that if coord is negative, coord % size doesn't give the right - * value. To avoid that problem we add a large multiple of the size - * (rather than using a conditional). - */ -static INLINE int -repeat(int coord, unsigned size) -{ - return (coord + size * 1024) % size; -} - - -/** - * Apply texture coord wrapping mode and return integer texture indexes - * for a vector of four texcoords (S or T or P). - * \param wrapMode PIPE_TEX_WRAP_x - * \param s the incoming texcoords - * \param size the texture image size - * \param icoord returns the integer texcoords - * \return integer texture index - */ -static void -wrap_nearest_repeat(const float s[4], unsigned size, int icoord[4]) -{ - uint ch; - /* s limited to [0,1) */ - /* i limited to [0,size-1] */ - for (ch = 0; ch < 4; ch++) { - int i = util_ifloor(s[ch] * size); - icoord[ch] = repeat(i, size); - } -} - - -static void -wrap_nearest_clamp(const float s[4], unsigned size, int icoord[4]) -{ - uint ch; - /* s limited to [0,1] */ - /* i limited to [0,size-1] */ - for (ch = 0; ch < 4; ch++) { - if (s[ch] <= 0.0F) - icoord[ch] = 0; - else if (s[ch] >= 1.0F) - icoord[ch] = size - 1; - else - icoord[ch] = util_ifloor(s[ch] * size); - } -} - - -static void -wrap_nearest_clamp_to_edge(const float s[4], unsigned size, int icoord[4]) -{ - uint ch; - /* s limited to [min,max] */ - /* i limited to [0, size-1] */ - const float min = 1.0F / (2.0F * size); - const float max = 1.0F - min; - for (ch = 0; ch < 4; ch++) { - if (s[ch] < min) - icoord[ch] = 0; - else if (s[ch] > max) - icoord[ch] = size - 1; - else - icoord[ch] = util_ifloor(s[ch] * size); - } -} - - -static void -wrap_nearest_clamp_to_border(const float s[4], unsigned size, int icoord[4]) -{ - uint ch; - /* s limited to [min,max] */ - /* i limited to [-1, size] */ - const float min = -1.0F / (2.0F * size); - const float max = 1.0F - min; - for (ch = 0; ch < 4; ch++) { - if (s[ch] <= min) - icoord[ch] = -1; - else if (s[ch] >= max) - icoord[ch] = size; - else - icoord[ch] = util_ifloor(s[ch] * size); - } -} - - -static void -wrap_nearest_mirror_repeat(const float s[4], unsigned size, int icoord[4]) -{ - uint ch; - const float min = 1.0F / (2.0F * size); - const float max = 1.0F - min; - for (ch = 0; ch < 4; ch++) { - const int flr = util_ifloor(s[ch]); - float u = frac(s[ch]); - if (flr & 1) - u = 1.0F - u; - if (u < min) - icoord[ch] = 0; - else if (u > max) - icoord[ch] = size - 1; - else - icoord[ch] = util_ifloor(u * size); - } -} - - -static void -wrap_nearest_mirror_clamp(const float s[4], unsigned size, int icoord[4]) -{ - uint ch; - for (ch = 0; ch < 4; ch++) { - /* s limited to [0,1] */ - /* i limited to [0,size-1] */ - const float u = fabsf(s[ch]); - if (u <= 0.0F) - icoord[ch] = 0; - else if (u >= 1.0F) - icoord[ch] = size - 1; - else - icoord[ch] = util_ifloor(u * size); - } -} - - -static void -wrap_nearest_mirror_clamp_to_edge(const float s[4], unsigned size, - int icoord[4]) -{ - uint ch; - /* s limited to [min,max] */ - /* i limited to [0, size-1] */ - const float min = 1.0F / (2.0F * size); - const float max = 1.0F - min; - for (ch = 0; ch < 4; ch++) { - const float u = fabsf(s[ch]); - if (u < min) - icoord[ch] = 0; - else if (u > max) - icoord[ch] = size - 1; - else - icoord[ch] = util_ifloor(u * size); - } -} - - -static void -wrap_nearest_mirror_clamp_to_border(const float s[4], unsigned size, - int icoord[4]) -{ - uint ch; - /* s limited to [min,max] */ - /* i limited to [0, size-1] */ - const float min = -1.0F / (2.0F * size); - const float max = 1.0F - min; - for (ch = 0; ch < 4; ch++) { - const float u = fabsf(s[ch]); - if (u < min) - icoord[ch] = -1; - else if (u > max) - icoord[ch] = size; - else - icoord[ch] = util_ifloor(u * size); - } -} - - -/** - * Used to compute texel locations for linear sampling for four texcoords. - * \param wrapMode PIPE_TEX_WRAP_x - * \param s the texcoords - * \param size the texture image size - * \param icoord0 returns first texture indexes - * \param icoord1 returns second texture indexes (usually icoord0 + 1) - * \param w returns blend factor/weight between texture indexes - * \param icoord returns the computed integer texture coords - */ -static void -wrap_linear_repeat(const float s[4], unsigned size, - int icoord0[4], int icoord1[4], float w[4]) -{ - uint ch; - for (ch = 0; ch < 4; ch++) { - float u = s[ch] * size - 0.5F; - icoord0[ch] = repeat(util_ifloor(u), size); - icoord1[ch] = repeat(icoord0[ch] + 1, size); - w[ch] = frac(u); - } -} - - -static void -wrap_linear_clamp(const float s[4], unsigned size, - int icoord0[4], int icoord1[4], float w[4]) -{ - uint ch; - for (ch = 0; ch < 4; ch++) { - float u = CLAMP(s[ch], 0.0F, 1.0F); - u = u * size - 0.5f; - icoord0[ch] = util_ifloor(u); - icoord1[ch] = icoord0[ch] + 1; - w[ch] = frac(u); - } -} - - -static void -wrap_linear_clamp_to_edge(const float s[4], unsigned size, - int icoord0[4], int icoord1[4], float w[4]) -{ - uint ch; - for (ch = 0; ch < 4; ch++) { - float u = CLAMP(s[ch], 0.0F, 1.0F); - u = u * size - 0.5f; - icoord0[ch] = util_ifloor(u); - icoord1[ch] = icoord0[ch] + 1; - if (icoord0[ch] < 0) - icoord0[ch] = 0; - if (icoord1[ch] >= (int) size) - icoord1[ch] = size - 1; - w[ch] = frac(u); - } -} - - -static void -wrap_linear_clamp_to_border(const float s[4], unsigned size, - int icoord0[4], int icoord1[4], float w[4]) -{ - const float min = -1.0F / (2.0F * size); - const float max = 1.0F - min; - uint ch; - for (ch = 0; ch < 4; ch++) { - float u = CLAMP(s[ch], min, max); - u = u * size - 0.5f; - icoord0[ch] = util_ifloor(u); - icoord1[ch] = icoord0[ch] + 1; - w[ch] = frac(u); - } -} - - -static void -wrap_linear_mirror_repeat(const float s[4], unsigned size, - int icoord0[4], int icoord1[4], float w[4]) -{ - uint ch; - for (ch = 0; ch < 4; ch++) { - const int flr = util_ifloor(s[ch]); - float u = frac(s[ch]); - if (flr & 1) - u = 1.0F - u; - u = u * size - 0.5F; - icoord0[ch] = util_ifloor(u); - icoord1[ch] = icoord0[ch] + 1; - if (icoord0[ch] < 0) - icoord0[ch] = 0; - if (icoord1[ch] >= (int) size) - icoord1[ch] = size - 1; - w[ch] = frac(u); - } -} - - -static void -wrap_linear_mirror_clamp(const float s[4], unsigned size, - int icoord0[4], int icoord1[4], float w[4]) -{ - uint ch; - for (ch = 0; ch < 4; ch++) { - float u = fabsf(s[ch]); - if (u >= 1.0F) - u = (float) size; - else - u *= size; - u -= 0.5F; - icoord0[ch] = util_ifloor(u); - icoord1[ch] = icoord0[ch] + 1; - w[ch] = frac(u); - } -} - - -static void -wrap_linear_mirror_clamp_to_edge(const float s[4], unsigned size, - int icoord0[4], int icoord1[4], float w[4]) -{ - uint ch; - for (ch = 0; ch < 4; ch++) { - float u = fabsf(s[ch]); - if (u >= 1.0F) - u = (float) size; - else - u *= size; - u -= 0.5F; - icoord0[ch] = util_ifloor(u); - icoord1[ch] = icoord0[ch] + 1; - if (icoord0[ch] < 0) - icoord0[ch] = 0; - if (icoord1[ch] >= (int) size) - icoord1[ch] = size - 1; - w[ch] = frac(u); - } -} - - -static void -wrap_linear_mirror_clamp_to_border(const float s[4], unsigned size, - int icoord0[4], int icoord1[4], float w[4]) -{ - const float min = -1.0F / (2.0F * size); - const float max = 1.0F - min; - uint ch; - for (ch = 0; ch < 4; ch++) { - float u = fabsf(s[ch]); - if (u <= min) - u = min * size; - else if (u >= max) - u = max * size; - else - u *= size; - u -= 0.5F; - icoord0[ch] = util_ifloor(u); - icoord1[ch] = icoord0[ch] + 1; - w[ch] = frac(u); - } -} - - -/** - * PIPE_TEX_WRAP_CLAMP for nearest sampling, unnormalized coords. - */ -static void -wrap_nearest_unorm_clamp(const float s[4], unsigned size, int icoord[4]) -{ - uint ch; - for (ch = 0; ch < 4; ch++) { - int i = util_ifloor(s[ch]); - icoord[ch]= CLAMP(i, 0, (int) size-1); - } -} - - -/** - * PIPE_TEX_WRAP_CLAMP_TO_BORDER for nearest sampling, unnormalized coords. - */ -static void -wrap_nearest_unorm_clamp_to_border(const float s[4], unsigned size, - int icoord[4]) -{ - uint ch; - for (ch = 0; ch < 4; ch++) { - icoord[ch]= util_ifloor( CLAMP(s[ch], -0.5F, (float) size + 0.5F) ); - } -} - - -/** - * PIPE_TEX_WRAP_CLAMP_TO_EDGE for nearest sampling, unnormalized coords. - */ -static void -wrap_nearest_unorm_clamp_to_edge(const float s[4], unsigned size, - int icoord[4]) -{ - uint ch; - for (ch = 0; ch < 4; ch++) { - icoord[ch]= util_ifloor( CLAMP(s[ch], 0.5F, (float) size - 0.5F) ); - } -} - - -/** - * PIPE_TEX_WRAP_CLAMP for linear sampling, unnormalized coords. - */ -static void -wrap_linear_unorm_clamp(const float s[4], unsigned size, - int icoord0[4], int icoord1[4], float w[4]) -{ - uint ch; - for (ch = 0; ch < 4; ch++) { - /* Not exactly what the spec says, but it matches NVIDIA output */ - float u = CLAMP(s[ch] - 0.5F, 0.0f, (float) size - 1.0f); - icoord0[ch] = util_ifloor(u); - icoord1[ch] = icoord0[ch] + 1; - w[ch] = frac(u); - } -} - - -/** - * PIPE_TEX_WRAP_CLAMP_TO_BORDER for linear sampling, unnormalized coords. - */ -static void -wrap_linear_unorm_clamp_to_border(const float s[4], unsigned size, - int icoord0[4], int icoord1[4], float w[4]) -{ - uint ch; - for (ch = 0; ch < 4; ch++) { - float u = CLAMP(s[ch], -0.5F, (float) size + 0.5F); - u -= 0.5F; - icoord0[ch] = util_ifloor(u); - icoord1[ch] = icoord0[ch] + 1; - if (icoord1[ch] > (int) size - 1) - icoord1[ch] = size - 1; - w[ch] = frac(u); - } -} - - -/** - * PIPE_TEX_WRAP_CLAMP_TO_EDGE for linear sampling, unnormalized coords. - */ -static void -wrap_linear_unorm_clamp_to_edge(const float s[4], unsigned size, - int icoord0[4], int icoord1[4], float w[4]) -{ - uint ch; - for (ch = 0; ch < 4; ch++) { - float u = CLAMP(s[ch], +0.5F, (float) size - 0.5F); - u -= 0.5F; - icoord0[ch] = util_ifloor(u); - icoord1[ch] = icoord0[ch] + 1; - if (icoord1[ch] > (int) size - 1) - icoord1[ch] = size - 1; - w[ch] = frac(u); - } -} - - -/** - * Do coordinate to array index conversion. For array textures. - */ -static INLINE void -wrap_array_layer(const float coord[4], unsigned size, int layer[4]) -{ - uint ch; - for (ch = 0; ch < 4; ch++) { - int c = util_ifloor(coord[ch] + 0.5F); - layer[ch] = CLAMP(c, 0, size - 1); - } -} - - -/** - * Examine the quad's texture coordinates to compute the partial - * derivatives w.r.t X and Y, then compute lambda (level of detail). - */ -static float -compute_lambda_1d(const struct sp_sampler_variant *samp, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE]) -{ - const struct pipe_resource *texture = samp->view->texture; - float dsdx = fabsf(s[QUAD_BOTTOM_RIGHT] - s[QUAD_BOTTOM_LEFT]); - float dsdy = fabsf(s[QUAD_TOP_LEFT] - s[QUAD_BOTTOM_LEFT]); - float rho = MAX2(dsdx, dsdy) * u_minify(texture->width0, samp->view->u.tex.first_level); - - return util_fast_log2(rho); -} - - -static float -compute_lambda_2d(const struct sp_sampler_variant *samp, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE]) -{ - const struct pipe_resource *texture = samp->view->texture; - float dsdx = fabsf(s[QUAD_BOTTOM_RIGHT] - s[QUAD_BOTTOM_LEFT]); - float dsdy = fabsf(s[QUAD_TOP_LEFT] - s[QUAD_BOTTOM_LEFT]); - float dtdx = fabsf(t[QUAD_BOTTOM_RIGHT] - t[QUAD_BOTTOM_LEFT]); - float dtdy = fabsf(t[QUAD_TOP_LEFT] - t[QUAD_BOTTOM_LEFT]); - float maxx = MAX2(dsdx, dsdy) * u_minify(texture->width0, samp->view->u.tex.first_level); - float maxy = MAX2(dtdx, dtdy) * u_minify(texture->height0, samp->view->u.tex.first_level); - float rho = MAX2(maxx, maxy); - - return util_fast_log2(rho); -} - - -static float -compute_lambda_3d(const struct sp_sampler_variant *samp, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE]) -{ - const struct pipe_resource *texture = samp->view->texture; - float dsdx = fabsf(s[QUAD_BOTTOM_RIGHT] - s[QUAD_BOTTOM_LEFT]); - float dsdy = fabsf(s[QUAD_TOP_LEFT] - s[QUAD_BOTTOM_LEFT]); - float dtdx = fabsf(t[QUAD_BOTTOM_RIGHT] - t[QUAD_BOTTOM_LEFT]); - float dtdy = fabsf(t[QUAD_TOP_LEFT] - t[QUAD_BOTTOM_LEFT]); - float dpdx = fabsf(p[QUAD_BOTTOM_RIGHT] - p[QUAD_BOTTOM_LEFT]); - float dpdy = fabsf(p[QUAD_TOP_LEFT] - p[QUAD_BOTTOM_LEFT]); - float maxx = MAX2(dsdx, dsdy) * u_minify(texture->width0, samp->view->u.tex.first_level); - float maxy = MAX2(dtdx, dtdy) * u_minify(texture->height0, samp->view->u.tex.first_level); - float maxz = MAX2(dpdx, dpdy) * u_minify(texture->depth0, samp->view->u.tex.first_level); - float rho; - - rho = MAX2(maxx, maxy); - rho = MAX2(rho, maxz); - - return util_fast_log2(rho); -} - - -/** - * Compute lambda for a vertex texture sampler. - * Since there aren't derivatives to use, just return 0. - */ -static float -compute_lambda_vert(const struct sp_sampler_variant *samp, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE]) -{ - return 0.0f; -} - - - -/** - * Get a texel from a texture, using the texture tile cache. - * - * \param addr the template tex address containing cube, z, face info. - * \param x the x coord of texel within 2D image - * \param y the y coord of texel within 2D image - * \param rgba the quad to put the texel/color into - * - * XXX maybe move this into sp_tex_tile_cache.c and merge with the - * sp_get_cached_tile_tex() function. Also, get 4 texels instead of 1... - */ - - - - -static INLINE const float * -get_texel_2d_no_border(const struct sp_sampler_variant *samp, - union tex_tile_address addr, int x, int y) -{ - const struct softpipe_tex_cached_tile *tile; - - addr.bits.x = x / TILE_SIZE; - addr.bits.y = y / TILE_SIZE; - y %= TILE_SIZE; - x %= TILE_SIZE; - - tile = sp_get_cached_tile_tex(samp->cache, addr); - - return &tile->data.color[y][x][0]; -} - - -static INLINE const float * -get_texel_2d(const struct sp_sampler_variant *samp, - union tex_tile_address addr, int x, int y) -{ - const struct pipe_resource *texture = samp->view->texture; - unsigned level = addr.bits.level; - - if (x < 0 || x >= (int) u_minify(texture->width0, level) || - y < 0 || y >= (int) u_minify(texture->height0, level)) { - return samp->sampler->border_color.f; - } - else { - return get_texel_2d_no_border( samp, addr, x, y ); - } -} - - -/* Gather a quad of adjacent texels within a tile: - */ -static INLINE void -get_texel_quad_2d_no_border_single_tile(const struct sp_sampler_variant *samp, - union tex_tile_address addr, - unsigned x, unsigned y, - const float *out[4]) -{ - const struct softpipe_tex_cached_tile *tile; - - addr.bits.x = x / TILE_SIZE; - addr.bits.y = y / TILE_SIZE; - y %= TILE_SIZE; - x %= TILE_SIZE; - - tile = sp_get_cached_tile_tex(samp->cache, addr); - - out[0] = &tile->data.color[y ][x ][0]; - out[1] = &tile->data.color[y ][x+1][0]; - out[2] = &tile->data.color[y+1][x ][0]; - out[3] = &tile->data.color[y+1][x+1][0]; -} - - -/* Gather a quad of potentially non-adjacent texels: - */ -static INLINE void -get_texel_quad_2d_no_border(const struct sp_sampler_variant *samp, - union tex_tile_address addr, - int x0, int y0, - int x1, int y1, - const float *out[4]) -{ - out[0] = get_texel_2d_no_border( samp, addr, x0, y0 ); - out[1] = get_texel_2d_no_border( samp, addr, x1, y0 ); - out[2] = get_texel_2d_no_border( samp, addr, x0, y1 ); - out[3] = get_texel_2d_no_border( samp, addr, x1, y1 ); -} - -/* Can involve a lot of unnecessary checks for border color: - */ -static INLINE void -get_texel_quad_2d(const struct sp_sampler_variant *samp, - union tex_tile_address addr, - int x0, int y0, - int x1, int y1, - const float *out[4]) -{ - out[0] = get_texel_2d( samp, addr, x0, y0 ); - out[1] = get_texel_2d( samp, addr, x1, y0 ); - out[3] = get_texel_2d( samp, addr, x1, y1 ); - out[2] = get_texel_2d( samp, addr, x0, y1 ); -} - - - -/* 3d variants: - */ -static INLINE const float * -get_texel_3d_no_border(const struct sp_sampler_variant *samp, - union tex_tile_address addr, int x, int y, int z) -{ - const struct softpipe_tex_cached_tile *tile; - - addr.bits.x = x / TILE_SIZE; - addr.bits.y = y / TILE_SIZE; - addr.bits.z = z; - y %= TILE_SIZE; - x %= TILE_SIZE; - - tile = sp_get_cached_tile_tex(samp->cache, addr); - - return &tile->data.color[y][x][0]; -} - - -static INLINE const float * -get_texel_3d(const struct sp_sampler_variant *samp, - union tex_tile_address addr, int x, int y, int z) -{ - const struct pipe_resource *texture = samp->view->texture; - unsigned level = addr.bits.level; - - if (x < 0 || x >= (int) u_minify(texture->width0, level) || - y < 0 || y >= (int) u_minify(texture->height0, level) || - z < 0 || z >= (int) u_minify(texture->depth0, level)) { - return samp->sampler->border_color.f; - } - else { - return get_texel_3d_no_border( samp, addr, x, y, z ); - } -} - - -/* Get texel pointer for 1D array texture */ -static INLINE const float * -get_texel_1d_array(const struct sp_sampler_variant *samp, - union tex_tile_address addr, int x, int y) -{ - const struct pipe_resource *texture = samp->view->texture; - unsigned level = addr.bits.level; - - if (x < 0 || x >= (int) u_minify(texture->width0, level)) { - return samp->sampler->border_color.f; - } - else { - return get_texel_2d_no_border(samp, addr, x, y); - } -} - - -/* Get texel pointer for 2D array texture */ -static INLINE const float * -get_texel_2d_array(const struct sp_sampler_variant *samp, - union tex_tile_address addr, int x, int y, int layer) -{ - const struct pipe_resource *texture = samp->view->texture; - unsigned level = addr.bits.level; - - assert(layer < texture->array_size); - - if (x < 0 || x >= (int) u_minify(texture->width0, level) || - y < 0 || y >= (int) u_minify(texture->height0, level)) { - return samp->sampler->border_color.f; - } - else { - return get_texel_3d_no_border(samp, addr, x, y, layer); - } -} - - -/** - * Given the logbase2 of a mipmap's base level size and a mipmap level, - * return the size (in texels) of that mipmap level. - * For example, if level[0].width = 256 then base_pot will be 8. - * If level = 2, then we'll return 64 (the width at level=2). - * Return 1 if level > base_pot. - */ -static INLINE unsigned -pot_level_size(unsigned base_pot, unsigned level) -{ - return (base_pot >= level) ? (1 << (base_pot - level)) : 1; -} - - -static void -print_sample(const char *function, float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - debug_printf("%s %g %g %g %g, %g %g %g %g, %g %g %g %g, %g %g %g %g\n", - function, - rgba[0][0], rgba[1][0], rgba[2][0], rgba[3][0], - rgba[0][1], rgba[1][1], rgba[2][1], rgba[3][1], - rgba[0][2], rgba[1][2], rgba[2][2], rgba[3][2], - rgba[0][3], rgba[1][3], rgba[2][3], rgba[3][3]); -} - - -/* Some image-filter fastpaths: - */ -static INLINE void -img_filter_2d_linear_repeat_POT(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - unsigned j; - unsigned level = samp->level; - unsigned xpot = pot_level_size(samp->xpot, level); - unsigned ypot = pot_level_size(samp->ypot, level); - unsigned xmax = (xpot - 1) & (TILE_SIZE - 1); /* MIN2(TILE_SIZE, xpot) - 1; */ - unsigned ymax = (ypot - 1) & (TILE_SIZE - 1); /* MIN2(TILE_SIZE, ypot) - 1; */ - union tex_tile_address addr; - - addr.value = 0; - addr.bits.level = samp->level; - - for (j = 0; j < QUAD_SIZE; j++) { - int c; - - float u = s[j] * xpot - 0.5F; - float v = t[j] * ypot - 0.5F; - - int uflr = util_ifloor(u); - int vflr = util_ifloor(v); - - float xw = u - (float)uflr; - float yw = v - (float)vflr; - - int x0 = uflr & (xpot - 1); - int y0 = vflr & (ypot - 1); - - const float *tx[4]; - - /* Can we fetch all four at once: - */ - if (x0 < xmax && y0 < ymax) { - get_texel_quad_2d_no_border_single_tile(samp, addr, x0, y0, tx); - } - else { - unsigned x1 = (x0 + 1) & (xpot - 1); - unsigned y1 = (y0 + 1) & (ypot - 1); - get_texel_quad_2d_no_border(samp, addr, x0, y0, x1, y1, tx); - } - - /* interpolate R, G, B, A */ - for (c = 0; c < 4; c++) { - rgba[c][j] = lerp_2d(xw, yw, - tx[0][c], tx[1][c], - tx[2][c], tx[3][c]); - } - } - - if (DEBUG_TEX) { - print_sample(__FUNCTION__, rgba); - } -} - - -static INLINE void -img_filter_2d_nearest_repeat_POT(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - unsigned j; - unsigned level = samp->level; - unsigned xpot = pot_level_size(samp->xpot, level); - unsigned ypot = pot_level_size(samp->ypot, level); - union tex_tile_address addr; - - addr.value = 0; - addr.bits.level = samp->level; - - for (j = 0; j < QUAD_SIZE; j++) { - int c; - - float u = s[j] * xpot; - float v = t[j] * ypot; - - int uflr = util_ifloor(u); - int vflr = util_ifloor(v); - - int x0 = uflr & (xpot - 1); - int y0 = vflr & (ypot - 1); - - const float *out = get_texel_2d_no_border(samp, addr, x0, y0); - - for (c = 0; c < 4; c++) { - rgba[c][j] = out[c]; - } - } - - if (DEBUG_TEX) { - print_sample(__FUNCTION__, rgba); - } -} - - -static INLINE void -img_filter_2d_nearest_clamp_POT(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - unsigned j; - unsigned level = samp->level; - unsigned xpot = pot_level_size(samp->xpot, level); - unsigned ypot = pot_level_size(samp->ypot, level); - union tex_tile_address addr; - - addr.value = 0; - addr.bits.level = samp->level; - - for (j = 0; j < QUAD_SIZE; j++) { - int c; - - float u = s[j] * xpot; - float v = t[j] * ypot; - - int x0, y0; - const float *out; - - x0 = util_ifloor(u); - if (x0 < 0) - x0 = 0; - else if (x0 > xpot - 1) - x0 = xpot - 1; - - y0 = util_ifloor(v); - if (y0 < 0) - y0 = 0; - else if (y0 > ypot - 1) - y0 = ypot - 1; - - out = get_texel_2d_no_border(samp, addr, x0, y0); - - for (c = 0; c < 4; c++) { - rgba[c][j] = out[c]; - } - } - - if (DEBUG_TEX) { - print_sample(__FUNCTION__, rgba); - } -} - - -static void -img_filter_1d_nearest(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - const struct pipe_resource *texture = samp->view->texture; - unsigned level0, j; - int width; - int x[4]; - union tex_tile_address addr; - - level0 = samp->level; - width = u_minify(texture->width0, level0); - - assert(width > 0); - - addr.value = 0; - addr.bits.level = samp->level; - - samp->nearest_texcoord_s(s, width, x); - - for (j = 0; j < QUAD_SIZE; j++) { - const float *out = get_texel_2d(samp, addr, x[j], 0); - int c; - for (c = 0; c < 4; c++) { - rgba[c][j] = out[c]; - } - } - - if (DEBUG_TEX) { - print_sample(__FUNCTION__, rgba); - } -} - - -static void -img_filter_1d_array_nearest(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - const struct pipe_resource *texture = samp->view->texture; - unsigned level0, j; - int width; - int x[4], layer[4]; - union tex_tile_address addr; - - level0 = samp->level; - width = u_minify(texture->width0, level0); - - assert(width > 0); - - addr.value = 0; - addr.bits.level = samp->level; - - samp->nearest_texcoord_s(s, width, x); - wrap_array_layer(t, texture->array_size, layer); - - for (j = 0; j < QUAD_SIZE; j++) { - const float *out = get_texel_1d_array(samp, addr, x[j], layer[j]); - int c; - for (c = 0; c < 4; c++) { - rgba[c][j] = out[c]; - } - } - - if (DEBUG_TEX) { - print_sample(__FUNCTION__, rgba); - } -} - - -static void -img_filter_2d_nearest(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - const struct pipe_resource *texture = samp->view->texture; - unsigned level0, j; - int width, height; - int x[4], y[4]; - union tex_tile_address addr; - - - level0 = samp->level; - width = u_minify(texture->width0, level0); - height = u_minify(texture->height0, level0); - - assert(width > 0); - assert(height > 0); - - addr.value = 0; - addr.bits.level = samp->level; - - samp->nearest_texcoord_s(s, width, x); - samp->nearest_texcoord_t(t, height, y); - - for (j = 0; j < QUAD_SIZE; j++) { - const float *out = get_texel_2d(samp, addr, x[j], y[j]); - int c; - for (c = 0; c < 4; c++) { - rgba[c][j] = out[c]; - } - } - - if (DEBUG_TEX) { - print_sample(__FUNCTION__, rgba); - } -} - - -static void -img_filter_2d_array_nearest(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - const struct pipe_resource *texture = samp->view->texture; - unsigned level0, j; - int width, height; - int x[4], y[4], layer[4]; - union tex_tile_address addr; - - level0 = samp->level; - width = u_minify(texture->width0, level0); - height = u_minify(texture->height0, level0); - - assert(width > 0); - assert(height > 0); - - addr.value = 0; - addr.bits.level = samp->level; - - samp->nearest_texcoord_s(s, width, x); - samp->nearest_texcoord_t(t, height, y); - wrap_array_layer(p, texture->array_size, layer); - - for (j = 0; j < QUAD_SIZE; j++) { - const float *out = get_texel_2d_array(samp, addr, x[j], y[j], layer[j]); - int c; - for (c = 0; c < 4; c++) { - rgba[c][j] = out[c]; - } - } - - if (DEBUG_TEX) { - print_sample(__FUNCTION__, rgba); - } -} - - -static INLINE union tex_tile_address -face(union tex_tile_address addr, unsigned face ) -{ - addr.bits.face = face; - return addr; -} - - -static void -img_filter_cube_nearest(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - const struct pipe_resource *texture = samp->view->texture; - const unsigned *faces = samp->faces; /* zero when not cube-mapping */ - unsigned level0, j; - int width, height; - int x[4], y[4]; - union tex_tile_address addr; - - level0 = samp->level; - width = u_minify(texture->width0, level0); - height = u_minify(texture->height0, level0); - - assert(width > 0); - assert(height > 0); - - addr.value = 0; - addr.bits.level = samp->level; - - samp->nearest_texcoord_s(s, width, x); - samp->nearest_texcoord_t(t, height, y); - - for (j = 0; j < QUAD_SIZE; j++) { - const float *out = get_texel_2d(samp, face(addr, faces[j]), x[j], y[j]); - int c; - for (c = 0; c < 4; c++) { - rgba[c][j] = out[c]; - } - } - - if (DEBUG_TEX) { - print_sample(__FUNCTION__, rgba); - } -} - - -static void -img_filter_3d_nearest(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - const struct pipe_resource *texture = samp->view->texture; - unsigned level0, j; - int width, height, depth; - int x[4], y[4], z[4]; - union tex_tile_address addr; - - level0 = samp->level; - width = u_minify(texture->width0, level0); - height = u_minify(texture->height0, level0); - depth = u_minify(texture->depth0, level0); - - assert(width > 0); - assert(height > 0); - assert(depth > 0); - - samp->nearest_texcoord_s(s, width, x); - samp->nearest_texcoord_t(t, height, y); - samp->nearest_texcoord_p(p, depth, z); - - addr.value = 0; - addr.bits.level = samp->level; - - for (j = 0; j < QUAD_SIZE; j++) { - const float *out = get_texel_3d(samp, addr, x[j], y[j], z[j]); - int c; - for (c = 0; c < 4; c++) { - rgba[c][j] = out[c]; - } - } -} - - -static void -img_filter_1d_linear(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - const struct pipe_resource *texture = samp->view->texture; - unsigned level0, j; - int width; - int x0[4], x1[4]; - float xw[4]; /* weights */ - union tex_tile_address addr; - - level0 = samp->level; - width = u_minify(texture->width0, level0); - - assert(width > 0); - - addr.value = 0; - addr.bits.level = samp->level; - - samp->linear_texcoord_s(s, width, x0, x1, xw); - - for (j = 0; j < QUAD_SIZE; j++) { - const float *tx0 = get_texel_2d(samp, addr, x0[j], 0); - const float *tx1 = get_texel_2d(samp, addr, x1[j], 0); - int c; - - /* interpolate R, G, B, A */ - for (c = 0; c < 4; c++) { - rgba[c][j] = lerp(xw[j], tx0[c], tx1[c]); - } - } -} - - -static void -img_filter_1d_array_linear(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - const struct pipe_resource *texture = samp->view->texture; - unsigned level0, j; - int width; - int x0[4], x1[4], layer[4]; - float xw[4]; /* weights */ - union tex_tile_address addr; - - level0 = samp->level; - width = u_minify(texture->width0, level0); - - assert(width > 0); - - addr.value = 0; - addr.bits.level = samp->level; - - samp->linear_texcoord_s(s, width, x0, x1, xw); - wrap_array_layer(t, texture->array_size, layer); - - for (j = 0; j < QUAD_SIZE; j++) { - const float *tx0 = get_texel_1d_array(samp, addr, x0[j], layer[j]); - const float *tx1 = get_texel_1d_array(samp, addr, x1[j], layer[j]); - int c; - - /* interpolate R, G, B, A */ - for (c = 0; c < 4; c++) { - rgba[c][j] = lerp(xw[j], tx0[c], tx1[c]); - } - } -} - - -static void -img_filter_2d_linear(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - const struct pipe_resource *texture = samp->view->texture; - unsigned level0, j; - int width, height; - int x0[4], y0[4], x1[4], y1[4]; - float xw[4], yw[4]; /* weights */ - union tex_tile_address addr; - - level0 = samp->level; - width = u_minify(texture->width0, level0); - height = u_minify(texture->height0, level0); - - assert(width > 0); - assert(height > 0); - - addr.value = 0; - addr.bits.level = samp->level; - - samp->linear_texcoord_s(s, width, x0, x1, xw); - samp->linear_texcoord_t(t, height, y0, y1, yw); - - for (j = 0; j < QUAD_SIZE; j++) { - const float *tx0 = get_texel_2d(samp, addr, x0[j], y0[j]); - const float *tx1 = get_texel_2d(samp, addr, x1[j], y0[j]); - const float *tx2 = get_texel_2d(samp, addr, x0[j], y1[j]); - const float *tx3 = get_texel_2d(samp, addr, x1[j], y1[j]); - int c; - - /* interpolate R, G, B, A */ - for (c = 0; c < 4; c++) { - rgba[c][j] = lerp_2d(xw[j], yw[j], - tx0[c], tx1[c], - tx2[c], tx3[c]); - } - } -} - - -static void -img_filter_2d_array_linear(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - const struct pipe_resource *texture = samp->view->texture; - unsigned level0, j; - int width, height; - int x0[4], y0[4], x1[4], y1[4], layer[4]; - float xw[4], yw[4]; /* weights */ - union tex_tile_address addr; - - level0 = samp->level; - width = u_minify(texture->width0, level0); - height = u_minify(texture->height0, level0); - - assert(width > 0); - assert(height > 0); - - addr.value = 0; - addr.bits.level = samp->level; - - samp->linear_texcoord_s(s, width, x0, x1, xw); - samp->linear_texcoord_t(t, height, y0, y1, yw); - wrap_array_layer(p, texture->array_size, layer); - - for (j = 0; j < QUAD_SIZE; j++) { - const float *tx0 = get_texel_2d_array(samp, addr, x0[j], y0[j], layer[j]); - const float *tx1 = get_texel_2d_array(samp, addr, x1[j], y0[j], layer[j]); - const float *tx2 = get_texel_2d_array(samp, addr, x0[j], y1[j], layer[j]); - const float *tx3 = get_texel_2d_array(samp, addr, x1[j], y1[j], layer[j]); - int c; - - /* interpolate R, G, B, A */ - for (c = 0; c < 4; c++) { - rgba[c][j] = lerp_2d(xw[j], yw[j], - tx0[c], tx1[c], - tx2[c], tx3[c]); - } - } -} - - -static void -img_filter_cube_linear(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - const struct pipe_resource *texture = samp->view->texture; - const unsigned *faces = samp->faces; /* zero when not cube-mapping */ - unsigned level0, j; - int width, height; - int x0[4], y0[4], x1[4], y1[4]; - float xw[4], yw[4]; /* weights */ - union tex_tile_address addr; - - level0 = samp->level; - width = u_minify(texture->width0, level0); - height = u_minify(texture->height0, level0); - - assert(width > 0); - assert(height > 0); - - addr.value = 0; - addr.bits.level = samp->level; - - samp->linear_texcoord_s(s, width, x0, x1, xw); - samp->linear_texcoord_t(t, height, y0, y1, yw); - - for (j = 0; j < QUAD_SIZE; j++) { - union tex_tile_address addrj = face(addr, faces[j]); - const float *tx0 = get_texel_2d(samp, addrj, x0[j], y0[j]); - const float *tx1 = get_texel_2d(samp, addrj, x1[j], y0[j]); - const float *tx2 = get_texel_2d(samp, addrj, x0[j], y1[j]); - const float *tx3 = get_texel_2d(samp, addrj, x1[j], y1[j]); - int c; - - /* interpolate R, G, B, A */ - for (c = 0; c < 4; c++) { - rgba[c][j] = lerp_2d(xw[j], yw[j], - tx0[c], tx1[c], - tx2[c], tx3[c]); - } - } -} - - -static void -img_filter_3d_linear(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - const struct pipe_resource *texture = samp->view->texture; - unsigned level0, j; - int width, height, depth; - int x0[4], x1[4], y0[4], y1[4], z0[4], z1[4]; - float xw[4], yw[4], zw[4]; /* interpolation weights */ - union tex_tile_address addr; - - level0 = samp->level; - width = u_minify(texture->width0, level0); - height = u_minify(texture->height0, level0); - depth = u_minify(texture->depth0, level0); - - addr.value = 0; - addr.bits.level = level0; - - assert(width > 0); - assert(height > 0); - assert(depth > 0); - - samp->linear_texcoord_s(s, width, x0, x1, xw); - samp->linear_texcoord_t(t, height, y0, y1, yw); - samp->linear_texcoord_p(p, depth, z0, z1, zw); - - for (j = 0; j < QUAD_SIZE; j++) { - int c; - - const float *tx00 = get_texel_3d(samp, addr, x0[j], y0[j], z0[j]); - const float *tx01 = get_texel_3d(samp, addr, x1[j], y0[j], z0[j]); - const float *tx02 = get_texel_3d(samp, addr, x0[j], y1[j], z0[j]); - const float *tx03 = get_texel_3d(samp, addr, x1[j], y1[j], z0[j]); - - const float *tx10 = get_texel_3d(samp, addr, x0[j], y0[j], z1[j]); - const float *tx11 = get_texel_3d(samp, addr, x1[j], y0[j], z1[j]); - const float *tx12 = get_texel_3d(samp, addr, x0[j], y1[j], z1[j]); - const float *tx13 = get_texel_3d(samp, addr, x1[j], y1[j], z1[j]); - - /* interpolate R, G, B, A */ - for (c = 0; c < 4; c++) { - rgba[c][j] = lerp_3d(xw[j], yw[j], zw[j], - tx00[c], tx01[c], - tx02[c], tx03[c], - tx10[c], tx11[c], - tx12[c], tx13[c]); - } - } -} - - -/* Calculate level of detail for every fragment. - * Note that lambda has already been biased by global LOD bias. - */ -static INLINE void -compute_lod(const struct pipe_sampler_state *sampler, - const float biased_lambda, - const float lodbias[QUAD_SIZE], - float lod[QUAD_SIZE]) -{ - uint i; - - for (i = 0; i < QUAD_SIZE; i++) { - lod[i] = biased_lambda + lodbias[i]; - lod[i] = CLAMP(lod[i], sampler->min_lod, sampler->max_lod); - } -} - - -static void -mip_filter_linear(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - const struct pipe_resource *texture = samp->view->texture; - int level0; - float lambda; - float lod[QUAD_SIZE]; - - if (control == tgsi_sampler_lod_bias) { - lambda = samp->compute_lambda(samp, s, t, p) + samp->sampler->lod_bias; - compute_lod(samp->sampler, lambda, c0, lod); - } else { - assert(control == tgsi_sampler_lod_explicit); - - memcpy(lod, c0, sizeof(lod)); - } - - /* XXX: Take into account all lod values. - */ - lambda = lod[0]; - level0 = samp->view->u.tex.first_level + (int)lambda; - - if (lambda < 0.0) { - samp->level = samp->view->u.tex.first_level; - samp->mag_img_filter(tgsi_sampler, s, t, p, NULL, tgsi_sampler_lod_bias, rgba); - } - else if (level0 >= texture->last_level) { - samp->level = texture->last_level; - samp->min_img_filter(tgsi_sampler, s, t, p, NULL, tgsi_sampler_lod_bias, rgba); - } - else { - float levelBlend = frac(lambda); - float rgba0[4][4]; - float rgba1[4][4]; - int c,j; - - samp->level = level0; - samp->min_img_filter(tgsi_sampler, s, t, p, NULL, tgsi_sampler_lod_bias, rgba0); - - samp->level = level0+1; - samp->min_img_filter(tgsi_sampler, s, t, p, NULL, tgsi_sampler_lod_bias, rgba1); - - for (j = 0; j < QUAD_SIZE; j++) { - for (c = 0; c < 4; c++) { - rgba[c][j] = lerp(levelBlend, rgba0[c][j], rgba1[c][j]); - } - } - } - - if (DEBUG_TEX) { - print_sample(__FUNCTION__, rgba); - } -} - - -/** - * Compute nearest mipmap level from texcoords. - * Then sample the texture level for four elements of a quad. - * \param c0 the LOD bias factors, or absolute LODs (depending on control) - */ -static void -mip_filter_nearest(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - const struct pipe_resource *texture = samp->view->texture; - float lambda; - float lod[QUAD_SIZE]; - - if (control == tgsi_sampler_lod_bias) { - lambda = samp->compute_lambda(samp, s, t, p) + samp->sampler->lod_bias; - compute_lod(samp->sampler, lambda, c0, lod); - } else { - assert(control == tgsi_sampler_lod_explicit); - - memcpy(lod, c0, sizeof(lod)); - } - - /* XXX: Take into account all lod values. - */ - lambda = lod[0]; - - if (lambda < 0.0) { - samp->level = samp->view->u.tex.first_level; - samp->mag_img_filter(tgsi_sampler, s, t, p, NULL, tgsi_sampler_lod_bias, rgba); - } - else { - samp->level = samp->view->u.tex.first_level + (int)(lambda + 0.5F) ; - samp->level = MIN2(samp->level, (int)texture->last_level); - samp->min_img_filter(tgsi_sampler, s, t, p, NULL, tgsi_sampler_lod_bias, rgba); - } - - if (DEBUG_TEX) { - print_sample(__FUNCTION__, rgba); - } -} - - -static void -mip_filter_none(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - float lambda; - float lod[QUAD_SIZE]; - - if (control == tgsi_sampler_lod_bias) { - lambda = samp->compute_lambda(samp, s, t, p) + samp->sampler->lod_bias; - compute_lod(samp->sampler, lambda, c0, lod); - } else { - assert(control == tgsi_sampler_lod_explicit); - - memcpy(lod, c0, sizeof(lod)); - } - - /* XXX: Take into account all lod values. - */ - lambda = lod[0]; - - samp->level = samp->view->u.tex.first_level; - if (lambda < 0.0) { - samp->mag_img_filter(tgsi_sampler, s, t, p, NULL, tgsi_sampler_lod_bias, rgba); - } - else { - samp->min_img_filter(tgsi_sampler, s, t, p, NULL, tgsi_sampler_lod_bias, rgba); - } -} - - -/* For anisotropic filtering */ -#define WEIGHT_LUT_SIZE 1024 - -static float *weightLut = NULL; - -/** - * Creates the look-up table used to speed-up EWA sampling - */ -static void -create_filter_table(void) -{ - unsigned i; - if (!weightLut) { - weightLut = (float *) MALLOC(WEIGHT_LUT_SIZE * sizeof(float)); - - for (i = 0; i < WEIGHT_LUT_SIZE; ++i) { - float alpha = 2; - float r2 = (float) i / (float) (WEIGHT_LUT_SIZE - 1); - float weight = (float) exp(-alpha * r2); - weightLut[i] = weight; - } - } -} - - -/** - * Elliptical weighted average (EWA) filter for producing high quality - * anisotropic filtered results. - * Based on the Higher Quality Elliptical Weighted Avarage Filter - * published by Paul S. Heckbert in his Master's Thesis - * "Fundamentals of Texture Mapping and Image Warping" (1989) - */ -static void -img_filter_2d_ewa(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - const float dudx, const float dvdx, - const float dudy, const float dvdy, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - const struct pipe_resource *texture = samp->view->texture; - - unsigned level0 = samp->level > 0 ? samp->level : 0; - float scaling = 1.0 / (1 << level0); - int width = u_minify(texture->width0, level0); - int height = u_minify(texture->height0, level0); - - float ux = dudx * scaling; - float vx = dvdx * scaling; - float uy = dudy * scaling; - float vy = dvdy * scaling; - - /* compute ellipse coefficients to bound the region: - * A*x*x + B*x*y + C*y*y = F. - */ - float A = vx*vx+vy*vy+1; - float B = -2*(ux*vx+uy*vy); - float C = ux*ux+uy*uy+1; - float F = A*C-B*B/4.0; - - /* check if it is an ellipse */ - /* ASSERT(F > 0.0); */ - - /* Compute the ellipse's (u,v) bounding box in texture space */ - float d = -B*B+4.0*C*A; - float box_u = 2.0 / d * sqrt(d*C*F); /* box_u -> half of bbox with */ - float box_v = 2.0 / d * sqrt(A*d*F); /* box_v -> half of bbox height */ - - float rgba_temp[NUM_CHANNELS][QUAD_SIZE]; - float s_buffer[QUAD_SIZE]; - float t_buffer[QUAD_SIZE]; - float weight_buffer[QUAD_SIZE]; - unsigned buffer_next; - int j; - float den;// = 0.0F; - float ddq; - float U;// = u0 - tex_u; - int v; - - /* Scale ellipse formula to directly index the Filter Lookup Table. - * i.e. scale so that F = WEIGHT_LUT_SIZE-1 - */ - double formScale = (double) (WEIGHT_LUT_SIZE - 1) / F; - A *= formScale; - B *= formScale; - C *= formScale; - /* F *= formScale; */ /* no need to scale F as we don't use it below here */ - - /* For each quad, the du and dx values are the same and so the ellipse is - * also the same. Note that texel/image access can only be performed using - * a quad, i.e. it is not possible to get the pixel value for a single - * tex coord. In order to have a better performance, the access is buffered - * using the s_buffer/t_buffer and weight_buffer. Only when the buffer is full, - * then the pixel values are read from the image. - */ - ddq = 2 * A; - - for (j = 0; j < QUAD_SIZE; j++) { - /* Heckbert MS thesis, p. 59; scan over the bounding box of the ellipse - * and incrementally update the value of Ax^2+Bxy*Cy^2; when this - * value, q, is less than F, we're inside the ellipse - */ - float tex_u = -0.5F + s[j] * texture->width0 * scaling; - float tex_v = -0.5F + t[j] * texture->height0 * scaling; - - int u0 = (int) floorf(tex_u - box_u); - int u1 = (int) ceilf(tex_u + box_u); - int v0 = (int) floorf(tex_v - box_v); - int v1 = (int) ceilf(tex_v + box_v); - - float num[4] = {0.0F, 0.0F, 0.0F, 0.0F}; - buffer_next = 0; - den = 0; - U = u0 - tex_u; - for (v = v0; v <= v1; ++v) { - float V = v - tex_v; - float dq = A * (2 * U + 1) + B * V; - float q = (C * V + B * U) * V + A * U * U; - - int u; - for (u = u0; u <= u1; ++u) { - /* Note that the ellipse has been pre-scaled so F = WEIGHT_LUT_SIZE - 1 */ - if (q < WEIGHT_LUT_SIZE) { - /* as a LUT is used, q must never be negative; - * should not happen, though - */ - const int qClamped = q >= 0.0F ? q : 0; - float weight = weightLut[qClamped]; - - weight_buffer[buffer_next] = weight; - s_buffer[buffer_next] = u / ((float) width); - t_buffer[buffer_next] = v / ((float) height); - - buffer_next++; - if (buffer_next == QUAD_SIZE) { - /* 4 texel coords are in the buffer -> read it now */ - unsigned jj; - /* it is assumed that samp->min_img_filter is set to - * img_filter_2d_nearest or one of the - * accelerated img_filter_2d_nearest_XXX functions. - */ - samp->min_img_filter(tgsi_sampler, s_buffer, t_buffer, p, NULL, - tgsi_sampler_lod_bias, rgba_temp); - for (jj = 0; jj < buffer_next; jj++) { - num[0] += weight_buffer[jj] * rgba_temp[0][jj]; - num[1] += weight_buffer[jj] * rgba_temp[1][jj]; - num[2] += weight_buffer[jj] * rgba_temp[2][jj]; - num[3] += weight_buffer[jj] * rgba_temp[3][jj]; - } - - buffer_next = 0; - } - - den += weight; - } - q += dq; - dq += ddq; - } - } - - /* if the tex coord buffer contains unread values, we will read them now. - * Note that in most cases we have to read more pixel values than required, - * however, as the img_filter_2d_nearest function(s) does not have a count - * parameter, we need to read the whole quad and ignore the unused values - */ - if (buffer_next > 0) { - unsigned jj; - /* it is assumed that samp->min_img_filter is set to - * img_filter_2d_nearest or one of the - * accelerated img_filter_2d_nearest_XXX functions. - */ - samp->min_img_filter(tgsi_sampler, s_buffer, t_buffer, p, NULL, - tgsi_sampler_lod_bias, rgba_temp); - for (jj = 0; jj < buffer_next; jj++) { - num[0] += weight_buffer[jj] * rgba_temp[0][jj]; - num[1] += weight_buffer[jj] * rgba_temp[1][jj]; - num[2] += weight_buffer[jj] * rgba_temp[2][jj]; - num[3] += weight_buffer[jj] * rgba_temp[3][jj]; - } - } - - if (den <= 0.0F) { - /* Reaching this place would mean - * that no pixels intersected the ellipse. - * This should never happen because - * the filter we use always - * intersects at least one pixel. - */ - - /*rgba[0]=0; - rgba[1]=0; - rgba[2]=0; - rgba[3]=0;*/ - /* not enough pixels in resampling, resort to direct interpolation */ - samp->min_img_filter(tgsi_sampler, s, t, p, NULL, tgsi_sampler_lod_bias, rgba_temp); - den = 1; - num[0] = rgba_temp[0][j]; - num[1] = rgba_temp[1][j]; - num[2] = rgba_temp[2][j]; - num[3] = rgba_temp[3][j]; - } - - rgba[0][j] = num[0] / den; - rgba[1][j] = num[1] / den; - rgba[2][j] = num[2] / den; - rgba[3][j] = num[3] / den; - } -} - - -/** - * Sample 2D texture using an anisotropic filter. - */ -static void -mip_filter_linear_aniso(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - const struct pipe_resource *texture = samp->view->texture; - int level0; - float lambda; - float lod[QUAD_SIZE]; - - float s_to_u = u_minify(texture->width0, samp->view->u.tex.first_level); - float t_to_v = u_minify(texture->height0, samp->view->u.tex.first_level); - float dudx = (s[QUAD_BOTTOM_RIGHT] - s[QUAD_BOTTOM_LEFT]) * s_to_u; - float dudy = (s[QUAD_TOP_LEFT] - s[QUAD_BOTTOM_LEFT]) * s_to_u; - float dvdx = (t[QUAD_BOTTOM_RIGHT] - t[QUAD_BOTTOM_LEFT]) * t_to_v; - float dvdy = (t[QUAD_TOP_LEFT] - t[QUAD_BOTTOM_LEFT]) * t_to_v; - - if (control == tgsi_sampler_lod_bias) { - /* note: instead of working with Px and Py, we will use the - * squared length instead, to avoid sqrt. - */ - float Px2 = dudx * dudx + dvdx * dvdx; - float Py2 = dudy * dudy + dvdy * dvdy; - - float Pmax2; - float Pmin2; - float e; - const float maxEccentricity = samp->sampler->max_anisotropy * samp->sampler->max_anisotropy; - - if (Px2 < Py2) { - Pmax2 = Py2; - Pmin2 = Px2; - } - else { - Pmax2 = Px2; - Pmin2 = Py2; - } - - /* if the eccentricity of the ellipse is too big, scale up the shorter - * of the two vectors to limit the maximum amount of work per pixel - */ - e = Pmax2 / Pmin2; - if (e > maxEccentricity) { - /* float s=e / maxEccentricity; - minor[0] *= s; - minor[1] *= s; - Pmin2 *= s; */ - Pmin2 = Pmax2 / maxEccentricity; - } - - /* note: we need to have Pmin=sqrt(Pmin2) here, but we can avoid - * this since 0.5*log(x) = log(sqrt(x)) - */ - lambda = 0.5F * util_fast_log2(Pmin2) + samp->sampler->lod_bias; - compute_lod(samp->sampler, lambda, c0, lod); - } - else { - assert(control == tgsi_sampler_lod_explicit); - - memcpy(lod, c0, sizeof(lod)); - } - - /* XXX: Take into account all lod values. - */ - lambda = lod[0]; - level0 = samp->view->u.tex.first_level + (int)lambda; - - /* If the ellipse covers the whole image, we can - * simply return the average of the whole image. - */ - if (level0 >= (int) texture->last_level) { - samp->level = texture->last_level; - samp->min_img_filter(tgsi_sampler, s, t, p, NULL, tgsi_sampler_lod_bias, rgba); - } - else { - /* don't bother interpolating between multiple LODs; it doesn't - * seem to be worth the extra running time. - */ - samp->level = level0; - img_filter_2d_ewa(tgsi_sampler, s, t, p, NULL, tgsi_sampler_lod_bias, - dudx, dvdx, dudy, dvdy, rgba); - } - - if (DEBUG_TEX) { - print_sample(__FUNCTION__, rgba); - } -} - - - -/** - * Specialized version of mip_filter_linear with hard-wired calls to - * 2d lambda calculation and 2d_linear_repeat_POT img filters. - */ -static void -mip_filter_linear_2d_linear_repeat_POT( - struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - const struct pipe_resource *texture = samp->view->texture; - int level0; - float lambda; - float lod[QUAD_SIZE]; - - if (control == tgsi_sampler_lod_bias) { - lambda = samp->compute_lambda(samp, s, t, p) + samp->sampler->lod_bias; - compute_lod(samp->sampler, lambda, c0, lod); - } else { - assert(control == tgsi_sampler_lod_explicit); - - memcpy(lod, c0, sizeof(lod)); - } - - /* XXX: Take into account all lod values. - */ - lambda = lod[0]; - level0 = samp->view->u.tex.first_level + (int)lambda; - - /* Catches both negative and large values of level0: - */ - if ((unsigned)level0 >= texture->last_level) { - if (level0 < 0) - samp->level = samp->view->u.tex.first_level; - else - samp->level = texture->last_level; - - img_filter_2d_linear_repeat_POT(tgsi_sampler, s, t, p, NULL, tgsi_sampler_lod_bias, rgba); - } - else { - float levelBlend = frac(lambda); - float rgba0[4][4]; - float rgba1[4][4]; - int c,j; - - samp->level = level0; - img_filter_2d_linear_repeat_POT(tgsi_sampler, s, t, p, NULL, tgsi_sampler_lod_bias, rgba0); - - samp->level = level0+1; - img_filter_2d_linear_repeat_POT(tgsi_sampler, s, t, p, NULL, tgsi_sampler_lod_bias, rgba1); - - for (j = 0; j < QUAD_SIZE; j++) { - for (c = 0; c < 4; c++) { - rgba[c][j] = lerp(levelBlend, rgba0[c][j], rgba1[c][j]); - } - } - } - - if (DEBUG_TEX) { - print_sample(__FUNCTION__, rgba); - } -} - - - -/** - * Do shadow/depth comparisons. - */ -static void -sample_compare(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - const struct pipe_sampler_state *sampler = samp->sampler; - int j, k0, k1, k2, k3; - float val; - float pc0, pc1, pc2, pc3; - - samp->mip_filter(tgsi_sampler, s, t, p, c0, control, rgba); - - /** - * Compare texcoord 'p' (aka R) against texture value 'rgba[0]' - * for 2D Array texture we need to use the 'c0' (aka Q). - * When we sampled the depth texture, the depth value was put into all - * RGBA channels. We look at the red channel here. - */ - - if (samp->view->texture->target == PIPE_TEXTURE_2D_ARRAY || - samp->view->texture->target == PIPE_TEXTURE_CUBE) { - pc0 = CLAMP(c0[0], 0.0F, 1.0F); - pc1 = CLAMP(c0[1], 0.0F, 1.0F); - pc2 = CLAMP(c0[2], 0.0F, 1.0F); - pc3 = CLAMP(c0[3], 0.0F, 1.0F); - } else { - pc0 = CLAMP(p[0], 0.0F, 1.0F); - pc1 = CLAMP(p[1], 0.0F, 1.0F); - pc2 = CLAMP(p[2], 0.0F, 1.0F); - pc3 = CLAMP(p[3], 0.0F, 1.0F); - } - /* compare four texcoords vs. four texture samples */ - switch (sampler->compare_func) { - case PIPE_FUNC_LESS: - k0 = pc0 < rgba[0][0]; - k1 = pc1 < rgba[0][1]; - k2 = pc2 < rgba[0][2]; - k3 = pc3 < rgba[0][3]; - break; - case PIPE_FUNC_LEQUAL: - k0 = pc0 <= rgba[0][0]; - k1 = pc1 <= rgba[0][1]; - k2 = pc2 <= rgba[0][2]; - k3 = pc3 <= rgba[0][3]; - break; - case PIPE_FUNC_GREATER: - k0 = pc0 > rgba[0][0]; - k1 = pc1 > rgba[0][1]; - k2 = pc2 > rgba[0][2]; - k3 = pc3 > rgba[0][3]; - break; - case PIPE_FUNC_GEQUAL: - k0 = pc0 >= rgba[0][0]; - k1 = pc1 >= rgba[0][1]; - k2 = pc2 >= rgba[0][2]; - k3 = pc3 >= rgba[0][3]; - break; - case PIPE_FUNC_EQUAL: - k0 = pc0 == rgba[0][0]; - k1 = pc1 == rgba[0][1]; - k2 = pc2 == rgba[0][2]; - k3 = pc3 == rgba[0][3]; - break; - case PIPE_FUNC_NOTEQUAL: - k0 = pc0 != rgba[0][0]; - k1 = pc1 != rgba[0][1]; - k2 = pc2 != rgba[0][2]; - k3 = pc3 != rgba[0][3]; - break; - case PIPE_FUNC_ALWAYS: - k0 = k1 = k2 = k3 = 1; - break; - case PIPE_FUNC_NEVER: - k0 = k1 = k2 = k3 = 0; - break; - default: - k0 = k1 = k2 = k3 = 0; - assert(0); - break; - } - - if (sampler->mag_img_filter == PIPE_TEX_FILTER_LINEAR) { - /* convert four pass/fail values to an intensity in [0,1] */ - val = 0.25F * (k0 + k1 + k2 + k3); - - /* XXX returning result for default GL_DEPTH_TEXTURE_MODE = GL_LUMINANCE */ - for (j = 0; j < 4; j++) { - rgba[0][j] = rgba[1][j] = rgba[2][j] = val; - rgba[3][j] = 1.0F; - } - } else { - for (j = 0; j < 4; j++) { - rgba[0][j] = k0; - rgba[1][j] = k1; - rgba[2][j] = k2; - rgba[3][j] = 1.0F; - } - } -} - - -/** - * Use 3D texcoords to choose a cube face, then sample the 2D cube faces. - * Put face info into the sampler faces[] array. - */ -static void -sample_cube(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - unsigned j; - float ssss[4], tttt[4]; - - /* - major axis - direction target sc tc ma - ---------- ------------------------------- --- --- --- - +rx TEXTURE_CUBE_MAP_POSITIVE_X_EXT -rz -ry rx - -rx TEXTURE_CUBE_MAP_NEGATIVE_X_EXT +rz -ry rx - +ry TEXTURE_CUBE_MAP_POSITIVE_Y_EXT +rx +rz ry - -ry TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT +rx -rz ry - +rz TEXTURE_CUBE_MAP_POSITIVE_Z_EXT +rx -ry rz - -rz TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT -rx -ry rz - */ - - /* Choose the cube face and compute new s/t coords for the 2D face. - * - * Use the same cube face for all four pixels in the quad. - * - * This isn't ideal, but if we want to use a different cube face - * per pixel in the quad, we'd have to also compute the per-face - * LOD here too. That's because the four post-face-selection - * texcoords are no longer related to each other (they're - * per-face!) so we can't use subtraction to compute the partial - * deriviates to compute the LOD. Doing so (near cube edges - * anyway) gives us pretty much random values. - */ - { - /* use the average of the four pixel's texcoords to choose the face */ - const float rx = 0.25F * (s[0] + s[1] + s[2] + s[3]); - const float ry = 0.25F * (t[0] + t[1] + t[2] + t[3]); - const float rz = 0.25F * (p[0] + p[1] + p[2] + p[3]); - const float arx = fabsf(rx), ary = fabsf(ry), arz = fabsf(rz); - - if (arx >= ary && arx >= arz) { - float sign = (rx >= 0.0F) ? 1.0F : -1.0F; - uint face = (rx >= 0.0F) ? PIPE_TEX_FACE_POS_X : PIPE_TEX_FACE_NEG_X; - for (j = 0; j < QUAD_SIZE; j++) { - const float ima = -0.5F / fabsf(s[j]); - ssss[j] = sign * p[j] * ima + 0.5F; - tttt[j] = t[j] * ima + 0.5F; - samp->faces[j] = face; - } - } - else if (ary >= arx && ary >= arz) { - float sign = (ry >= 0.0F) ? 1.0F : -1.0F; - uint face = (ry >= 0.0F) ? PIPE_TEX_FACE_POS_Y : PIPE_TEX_FACE_NEG_Y; - for (j = 0; j < QUAD_SIZE; j++) { - const float ima = -0.5F / fabsf(t[j]); - ssss[j] = -s[j] * ima + 0.5F; - tttt[j] = sign * -p[j] * ima + 0.5F; - samp->faces[j] = face; - } - } - else { - float sign = (rz >= 0.0F) ? 1.0F : -1.0F; - uint face = (rz >= 0.0F) ? PIPE_TEX_FACE_POS_Z : PIPE_TEX_FACE_NEG_Z; - for (j = 0; j < QUAD_SIZE; j++) { - const float ima = -0.5F / fabsf(p[j]); - ssss[j] = sign * -s[j] * ima + 0.5F; - tttt[j] = t[j] * ima + 0.5F; - samp->faces[j] = face; - } - } - } - - /* In our little pipeline, the compare stage is next. If compare - * is not active, this will point somewhere deeper into the - * pipeline, eg. to mip_filter or even img_filter. - */ - samp->compare(tgsi_sampler, ssss, tttt, NULL, c0, control, rgba); -} - -static void do_swizzling(const struct sp_sampler_variant *samp, - float in[NUM_CHANNELS][QUAD_SIZE], - float out[NUM_CHANNELS][QUAD_SIZE]) -{ - int j; - const unsigned swizzle_r = samp->key.bits.swizzle_r; - const unsigned swizzle_g = samp->key.bits.swizzle_g; - const unsigned swizzle_b = samp->key.bits.swizzle_b; - const unsigned swizzle_a = samp->key.bits.swizzle_a; - - switch (swizzle_r) { - case PIPE_SWIZZLE_ZERO: - for (j = 0; j < 4; j++) - out[0][j] = 0.0f; - break; - case PIPE_SWIZZLE_ONE: - for (j = 0; j < 4; j++) - out[0][j] = 1.0f; - break; - default: - assert(swizzle_r < 4); - for (j = 0; j < 4; j++) - out[0][j] = in[swizzle_r][j]; - } - - switch (swizzle_g) { - case PIPE_SWIZZLE_ZERO: - for (j = 0; j < 4; j++) - out[1][j] = 0.0f; - break; - case PIPE_SWIZZLE_ONE: - for (j = 0; j < 4; j++) - out[1][j] = 1.0f; - break; - default: - assert(swizzle_g < 4); - for (j = 0; j < 4; j++) - out[1][j] = in[swizzle_g][j]; - } - - switch (swizzle_b) { - case PIPE_SWIZZLE_ZERO: - for (j = 0; j < 4; j++) - out[2][j] = 0.0f; - break; - case PIPE_SWIZZLE_ONE: - for (j = 0; j < 4; j++) - out[2][j] = 1.0f; - break; - default: - assert(swizzle_b < 4); - for (j = 0; j < 4; j++) - out[2][j] = in[swizzle_b][j]; - } - - switch (swizzle_a) { - case PIPE_SWIZZLE_ZERO: - for (j = 0; j < 4; j++) - out[3][j] = 0.0f; - break; - case PIPE_SWIZZLE_ONE: - for (j = 0; j < 4; j++) - out[3][j] = 1.0f; - break; - default: - assert(swizzle_a < 4); - for (j = 0; j < 4; j++) - out[3][j] = in[swizzle_a][j]; - } -} - -static void -sample_swizzle(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - float rgba_temp[NUM_CHANNELS][QUAD_SIZE]; - - samp->sample_target(tgsi_sampler, s, t, p, c0, control, rgba_temp); - - do_swizzling(samp, rgba_temp, rgba); -} - - -static wrap_nearest_func -get_nearest_unorm_wrap(unsigned mode) -{ - switch (mode) { - case PIPE_TEX_WRAP_CLAMP: - return wrap_nearest_unorm_clamp; - case PIPE_TEX_WRAP_CLAMP_TO_EDGE: - return wrap_nearest_unorm_clamp_to_edge; - case PIPE_TEX_WRAP_CLAMP_TO_BORDER: - return wrap_nearest_unorm_clamp_to_border; - default: - assert(0); - return wrap_nearest_unorm_clamp; - } -} - - -static wrap_nearest_func -get_nearest_wrap(unsigned mode) -{ - switch (mode) { - case PIPE_TEX_WRAP_REPEAT: - return wrap_nearest_repeat; - case PIPE_TEX_WRAP_CLAMP: - return wrap_nearest_clamp; - case PIPE_TEX_WRAP_CLAMP_TO_EDGE: - return wrap_nearest_clamp_to_edge; - case PIPE_TEX_WRAP_CLAMP_TO_BORDER: - return wrap_nearest_clamp_to_border; - case PIPE_TEX_WRAP_MIRROR_REPEAT: - return wrap_nearest_mirror_repeat; - case PIPE_TEX_WRAP_MIRROR_CLAMP: - return wrap_nearest_mirror_clamp; - case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE: - return wrap_nearest_mirror_clamp_to_edge; - case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER: - return wrap_nearest_mirror_clamp_to_border; - default: - assert(0); - return wrap_nearest_repeat; - } -} - - -static wrap_linear_func -get_linear_unorm_wrap(unsigned mode) -{ - switch (mode) { - case PIPE_TEX_WRAP_CLAMP: - return wrap_linear_unorm_clamp; - case PIPE_TEX_WRAP_CLAMP_TO_EDGE: - return wrap_linear_unorm_clamp_to_edge; - case PIPE_TEX_WRAP_CLAMP_TO_BORDER: - return wrap_linear_unorm_clamp_to_border; - default: - assert(0); - return wrap_linear_unorm_clamp; - } -} - - -static wrap_linear_func -get_linear_wrap(unsigned mode) -{ - switch (mode) { - case PIPE_TEX_WRAP_REPEAT: - return wrap_linear_repeat; - case PIPE_TEX_WRAP_CLAMP: - return wrap_linear_clamp; - case PIPE_TEX_WRAP_CLAMP_TO_EDGE: - return wrap_linear_clamp_to_edge; - case PIPE_TEX_WRAP_CLAMP_TO_BORDER: - return wrap_linear_clamp_to_border; - case PIPE_TEX_WRAP_MIRROR_REPEAT: - return wrap_linear_mirror_repeat; - case PIPE_TEX_WRAP_MIRROR_CLAMP: - return wrap_linear_mirror_clamp; - case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE: - return wrap_linear_mirror_clamp_to_edge; - case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER: - return wrap_linear_mirror_clamp_to_border; - default: - assert(0); - return wrap_linear_repeat; - } -} - - -static compute_lambda_func -get_lambda_func(const union sp_sampler_key key) -{ - if (key.bits.processor == TGSI_PROCESSOR_VERTEX) - return compute_lambda_vert; - - switch (key.bits.target) { - case PIPE_TEXTURE_1D: - case PIPE_TEXTURE_1D_ARRAY: - return compute_lambda_1d; - case PIPE_TEXTURE_2D: - case PIPE_TEXTURE_2D_ARRAY: - case PIPE_TEXTURE_RECT: - case PIPE_TEXTURE_CUBE: - return compute_lambda_2d; - case PIPE_TEXTURE_3D: - return compute_lambda_3d; - default: - assert(0); - return compute_lambda_1d; - } -} - - -static filter_func -get_img_filter(const union sp_sampler_key key, - unsigned filter, - const struct pipe_sampler_state *sampler) -{ - switch (key.bits.target) { - case PIPE_TEXTURE_1D: - if (filter == PIPE_TEX_FILTER_NEAREST) - return img_filter_1d_nearest; - else - return img_filter_1d_linear; - break; - case PIPE_TEXTURE_1D_ARRAY: - if (filter == PIPE_TEX_FILTER_NEAREST) - return img_filter_1d_array_nearest; - else - return img_filter_1d_array_linear; - break; - case PIPE_TEXTURE_2D: - case PIPE_TEXTURE_RECT: - /* Try for fast path: - */ - if (key.bits.is_pot && - sampler->wrap_s == sampler->wrap_t && - sampler->normalized_coords) - { - switch (sampler->wrap_s) { - case PIPE_TEX_WRAP_REPEAT: - switch (filter) { - case PIPE_TEX_FILTER_NEAREST: - return img_filter_2d_nearest_repeat_POT; - case PIPE_TEX_FILTER_LINEAR: - return img_filter_2d_linear_repeat_POT; - default: - break; - } - break; - case PIPE_TEX_WRAP_CLAMP: - switch (filter) { - case PIPE_TEX_FILTER_NEAREST: - return img_filter_2d_nearest_clamp_POT; - default: - break; - } - } - } - /* Otherwise use default versions: - */ - if (filter == PIPE_TEX_FILTER_NEAREST) - return img_filter_2d_nearest; - else - return img_filter_2d_linear; - break; - case PIPE_TEXTURE_2D_ARRAY: - if (filter == PIPE_TEX_FILTER_NEAREST) - return img_filter_2d_array_nearest; - else - return img_filter_2d_array_linear; - break; - case PIPE_TEXTURE_CUBE: - if (filter == PIPE_TEX_FILTER_NEAREST) - return img_filter_cube_nearest; - else - return img_filter_cube_linear; - break; - case PIPE_TEXTURE_3D: - if (filter == PIPE_TEX_FILTER_NEAREST) - return img_filter_3d_nearest; - else - return img_filter_3d_linear; - break; - default: - assert(0); - return img_filter_1d_nearest; - } -} - - -/** - * Bind the given texture object and texture cache to the sampler variant. - */ -void -sp_sampler_variant_bind_view( struct sp_sampler_variant *samp, - struct softpipe_tex_tile_cache *tex_cache, - const struct pipe_sampler_view *view ) -{ - const struct pipe_resource *texture = view->texture; - - samp->view = view; - samp->cache = tex_cache; - samp->xpot = util_logbase2( texture->width0 ); - samp->ypot = util_logbase2( texture->height0 ); - samp->level = view->u.tex.first_level; -} - - -void -sp_sampler_variant_destroy( struct sp_sampler_variant *samp ) -{ - FREE(samp); -} - -static void -sample_get_dims(struct tgsi_sampler *tgsi_sampler, int level, - int dims[4]) -{ - struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - const struct pipe_sampler_view *view = samp->view; - const struct pipe_resource *texture = view->texture; - - /* undefined according to EXT_gpu_program */ - level += view->u.tex.first_level; - if (level > view->u.tex.last_level) - return; - - dims[0] = u_minify(texture->width0, level); - - switch(texture->target) { - case PIPE_TEXTURE_1D_ARRAY: - dims[1] = texture->array_size; - /* fallthrough */ - case PIPE_TEXTURE_1D: - case PIPE_BUFFER: - return; - case PIPE_TEXTURE_2D_ARRAY: - dims[2] = texture->array_size; - /* fallthrough */ - case PIPE_TEXTURE_2D: - case PIPE_TEXTURE_CUBE: - case PIPE_TEXTURE_RECT: - dims[1] = u_minify(texture->height0, level); - return; - case PIPE_TEXTURE_3D: - dims[1] = u_minify(texture->height0, level); - dims[2] = u_minify(texture->depth0, level); - return; - default: - assert(!"unexpected texture target in sample_get_dims()"); - return; - } -} - -/* this function is only used for unfiltered texel gets - via the TGSI TXF opcode. */ -static void -sample_get_texels(struct tgsi_sampler *tgsi_sampler, - const int v_i[QUAD_SIZE], - const int v_j[QUAD_SIZE], - const int v_k[QUAD_SIZE], - const int lod[QUAD_SIZE], - const int8_t offset[3], - float rgba[NUM_CHANNELS][QUAD_SIZE]) -{ - const struct sp_sampler_variant *samp = sp_sampler_variant(tgsi_sampler); - union tex_tile_address addr; - const struct pipe_resource *texture = samp->view->texture; - int j, c; - const float *tx; - bool need_swizzle = (samp->key.bits.swizzle_r != PIPE_SWIZZLE_RED || - samp->key.bits.swizzle_g != PIPE_SWIZZLE_GREEN || - samp->key.bits.swizzle_b != PIPE_SWIZZLE_BLUE || - samp->key.bits.swizzle_a != PIPE_SWIZZLE_ALPHA); - - addr.value = 0; - /* TODO write a better test for LOD */ - addr.bits.level = lod[0]; - - switch(texture->target) { - case PIPE_TEXTURE_1D: - for (j = 0; j < QUAD_SIZE; j++) { - tx = get_texel_2d(samp, addr, v_i[j] + offset[0], 0); - for (c = 0; c < 4; c++) { - rgba[c][j] = tx[c]; - } - } - break; - case PIPE_TEXTURE_1D_ARRAY: - for (j = 0; j < QUAD_SIZE; j++) { - tx = get_texel_1d_array(samp, addr, v_i[j] + offset[0], - v_j[j] + offset[1]); - for (c = 0; c < 4; c++) { - rgba[c][j] = tx[c]; - } - } - break; - case PIPE_TEXTURE_2D: - case PIPE_TEXTURE_RECT: - for (j = 0; j < QUAD_SIZE; j++) { - tx = get_texel_2d(samp, addr, v_i[j] + offset[0], - v_j[j] + offset[1]); - for (c = 0; c < 4; c++) { - rgba[c][j] = tx[c]; - } - } - break; - case PIPE_TEXTURE_2D_ARRAY: - for (j = 0; j < QUAD_SIZE; j++) { - tx = get_texel_2d_array(samp, addr, v_i[j] + offset[0], - v_j[j] + offset[1], - v_k[j] + offset[2]); - for (c = 0; c < 4; c++) { - rgba[c][j] = tx[c]; - } - } - break; - case PIPE_TEXTURE_3D: - for (j = 0; j < QUAD_SIZE; j++) { - tx = get_texel_3d(samp, addr, v_i[j] + offset[0], - v_j[j] + offset[1], - v_k[j] + offset[2]); - for (c = 0; c < 4; c++) { - rgba[c][j] = tx[c]; - } - } - break; - case PIPE_TEXTURE_CUBE: /* TXF can't work on CUBE according to spec */ - default: - assert(!"Unknown or CUBE texture type in TXF processing\n"); - break; - } - - if (need_swizzle) { - float rgba_temp[NUM_CHANNELS][QUAD_SIZE]; - memcpy(rgba_temp, rgba, sizeof(rgba_temp)); - do_swizzling(samp, rgba_temp, rgba); - } -} -/** - * Create a sampler variant for a given set of non-orthogonal state. - */ -struct sp_sampler_variant * -sp_create_sampler_variant( const struct pipe_sampler_state *sampler, - const union sp_sampler_key key ) -{ - struct sp_sampler_variant *samp = CALLOC_STRUCT(sp_sampler_variant); - if (!samp) - return NULL; - - samp->sampler = sampler; - samp->key = key; - - /* Note that (for instance) linear_texcoord_s and - * nearest_texcoord_s may be active at the same time, if the - * sampler min_img_filter differs from its mag_img_filter. - */ - if (sampler->normalized_coords) { - samp->linear_texcoord_s = get_linear_wrap( sampler->wrap_s ); - samp->linear_texcoord_t = get_linear_wrap( sampler->wrap_t ); - samp->linear_texcoord_p = get_linear_wrap( sampler->wrap_r ); - - samp->nearest_texcoord_s = get_nearest_wrap( sampler->wrap_s ); - samp->nearest_texcoord_t = get_nearest_wrap( sampler->wrap_t ); - samp->nearest_texcoord_p = get_nearest_wrap( sampler->wrap_r ); - } - else { - samp->linear_texcoord_s = get_linear_unorm_wrap( sampler->wrap_s ); - samp->linear_texcoord_t = get_linear_unorm_wrap( sampler->wrap_t ); - samp->linear_texcoord_p = get_linear_unorm_wrap( sampler->wrap_r ); - - samp->nearest_texcoord_s = get_nearest_unorm_wrap( sampler->wrap_s ); - samp->nearest_texcoord_t = get_nearest_unorm_wrap( sampler->wrap_t ); - samp->nearest_texcoord_p = get_nearest_unorm_wrap( sampler->wrap_r ); - } - - samp->compute_lambda = get_lambda_func( key ); - - samp->min_img_filter = get_img_filter(key, sampler->min_img_filter, sampler); - samp->mag_img_filter = get_img_filter(key, sampler->mag_img_filter, sampler); - - switch (sampler->min_mip_filter) { - case PIPE_TEX_MIPFILTER_NONE: - if (sampler->min_img_filter == sampler->mag_img_filter) - samp->mip_filter = samp->min_img_filter; - else - samp->mip_filter = mip_filter_none; - break; - - case PIPE_TEX_MIPFILTER_NEAREST: - samp->mip_filter = mip_filter_nearest; - break; - - case PIPE_TEX_MIPFILTER_LINEAR: - if (key.bits.is_pot && - sampler->min_img_filter == sampler->mag_img_filter && - sampler->normalized_coords && - sampler->wrap_s == PIPE_TEX_WRAP_REPEAT && - sampler->wrap_t == PIPE_TEX_WRAP_REPEAT && - sampler->min_img_filter == PIPE_TEX_FILTER_LINEAR) { - samp->mip_filter = mip_filter_linear_2d_linear_repeat_POT; - } - else { - samp->mip_filter = mip_filter_linear; - } - - /* Anisotropic filtering extension. */ - if (sampler->max_anisotropy > 1) { - samp->mip_filter = mip_filter_linear_aniso; - - /* Override min_img_filter: - * min_img_filter needs to be set to NEAREST since we need to access - * each texture pixel as it is and weight it later; using linear - * filters will have incorrect results. - * By setting the filter to NEAREST here, we can avoid calling the - * generic img_filter_2d_nearest in the anisotropic filter function, - * making it possible to use one of the accelerated implementations - */ - samp->min_img_filter = get_img_filter(key, PIPE_TEX_FILTER_NEAREST, sampler); - - /* on first access create the lookup table containing the filter weights. */ - if (!weightLut) { - create_filter_table(); - } - } - - break; - } - - if (sampler->compare_mode != PIPE_TEX_COMPARE_NONE) { - samp->compare = sample_compare; - } - else { - /* Skip compare operation by promoting the mip_filter function - * pointer: - */ - samp->compare = samp->mip_filter; - } - - if (key.bits.target == PIPE_TEXTURE_CUBE) { - samp->sample_target = sample_cube; - } - else { - samp->faces[0] = 0; - samp->faces[1] = 0; - samp->faces[2] = 0; - samp->faces[3] = 0; - - /* Skip cube face determination by promoting the compare - * function pointer: - */ - samp->sample_target = samp->compare; - } - - if (key.bits.swizzle_r != PIPE_SWIZZLE_RED || - key.bits.swizzle_g != PIPE_SWIZZLE_GREEN || - key.bits.swizzle_b != PIPE_SWIZZLE_BLUE || - key.bits.swizzle_a != PIPE_SWIZZLE_ALPHA) { - samp->base.get_samples = sample_swizzle; - } - else { - samp->base.get_samples = samp->sample_target; - } - - samp->base.get_dims = sample_get_dims; - samp->base.get_texel = sample_get_texels; - return samp; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_tex_sample.h b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_tex_sample.h deleted file mode 100644 index f0b867edc6e..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_tex_sample.h +++ /dev/null @@ -1,158 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * Copyright 2010 VMware, Inc. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef SP_TEX_SAMPLE_H -#define SP_TEX_SAMPLE_H - - -#include "tgsi/tgsi_exec.h" - -struct sp_sampler_variant; - -typedef void (*wrap_nearest_func)(const float s[4], - unsigned size, - int icoord[4]); - -typedef void (*wrap_linear_func)(const float s[4], - unsigned size, - int icoord0[4], - int icoord1[4], - float w[4]); - -typedef float (*compute_lambda_func)(const struct sp_sampler_variant *sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE]); - -typedef void (*filter_func)(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - const float c0[QUAD_SIZE], - enum tgsi_sampler_control control, - float rgba[NUM_CHANNELS][QUAD_SIZE]); - - -union sp_sampler_key { - struct { - unsigned target:3; - unsigned is_pot:1; - unsigned processor:2; - unsigned unit:4; - unsigned swizzle_r:3; - unsigned swizzle_g:3; - unsigned swizzle_b:3; - unsigned swizzle_a:3; - unsigned pad:10; - } bits; - unsigned value; -}; - -/** - * Subclass of tgsi_sampler - */ -struct sp_sampler_variant -{ - struct tgsi_sampler base; /**< base class */ - - union sp_sampler_key key; - - /* The owner of this struct: - */ - const struct pipe_sampler_state *sampler; - - - /* Currently bound texture: - */ - const struct pipe_sampler_view *view; - struct softpipe_tex_tile_cache *cache; - - unsigned processor; - - /* For sp_get_samples_2d_linear_POT: - */ - unsigned xpot; - unsigned ypot; - unsigned level; - - unsigned faces[4]; - - wrap_nearest_func nearest_texcoord_s; - wrap_nearest_func nearest_texcoord_t; - wrap_nearest_func nearest_texcoord_p; - - wrap_linear_func linear_texcoord_s; - wrap_linear_func linear_texcoord_t; - wrap_linear_func linear_texcoord_p; - - filter_func min_img_filter; - filter_func mag_img_filter; - - compute_lambda_func compute_lambda; - - filter_func mip_filter; - filter_func compare; - filter_func sample_target; - - /* Linked list: - */ - struct sp_sampler_variant *next; -}; - -struct sp_sampler; - -/* Create a sampler variant for a given set of non-orthogonal state. Currently the - */ -struct sp_sampler_variant * -sp_create_sampler_variant( const struct pipe_sampler_state *sampler, - const union sp_sampler_key key ); - -void sp_sampler_variant_bind_view( struct sp_sampler_variant *variant, - struct softpipe_tex_tile_cache *tex_cache, - const struct pipe_sampler_view *view ); - -void sp_sampler_variant_destroy( struct sp_sampler_variant * ); - - - -static INLINE struct sp_sampler_variant * -sp_sampler_variant(const struct tgsi_sampler *sampler) -{ - return (struct sp_sampler_variant *) sampler; -} - -extern void -sp_get_samples(struct tgsi_sampler *tgsi_sampler, - const float s[QUAD_SIZE], - const float t[QUAD_SIZE], - const float p[QUAD_SIZE], - float lodbias, - float rgba[NUM_CHANNELS][QUAD_SIZE]); - - -#endif /* SP_TEX_SAMPLE_H */ diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_tex_tile_cache.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_tex_tile_cache.c deleted file mode 100644 index b2e92385bf1..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_tex_tile_cache.c +++ /dev/null @@ -1,328 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * Texture tile caching. - * - * Author: - * Brian Paul - */ - -#include "util/u_inlines.h" -#include "util/u_memory.h" -#include "util/u_tile.h" -#include "util/u_format.h" -#include "util/u_math.h" -#include "sp_context.h" -#include "sp_texture.h" -#include "sp_tex_tile_cache.h" - - - -struct softpipe_tex_tile_cache * -sp_create_tex_tile_cache( struct pipe_context *pipe ) -{ - struct softpipe_tex_tile_cache *tc; - uint pos; - - /* make sure max texture size works */ - assert((TILE_SIZE << TEX_ADDR_BITS) >= (1 << (SP_MAX_TEXTURE_2D_LEVELS-1))); - - tc = CALLOC_STRUCT( softpipe_tex_tile_cache ); - if (tc) { - tc->pipe = pipe; - for (pos = 0; pos < NUM_ENTRIES; pos++) { - tc->entries[pos].addr.bits.invalid = 1; - } - tc->last_tile = &tc->entries[0]; /* any tile */ - } - return tc; -} - - -void -sp_destroy_tex_tile_cache(struct softpipe_tex_tile_cache *tc) -{ - if (tc) { - uint pos; - - for (pos = 0; pos < NUM_ENTRIES; pos++) { - /*assert(tc->entries[pos].x < 0);*/ - } - if (tc->transfer) { - tc->pipe->transfer_destroy(tc->pipe, tc->transfer); - } - if (tc->tex_trans) { - tc->pipe->transfer_destroy(tc->pipe, tc->tex_trans); - } - - FREE( tc ); - } -} - - - - -void -sp_tex_tile_cache_map_transfers(struct softpipe_tex_tile_cache *tc) -{ - if (tc->tex_trans && !tc->tex_trans_map) - tc->tex_trans_map = tc->pipe->transfer_map(tc->pipe, tc->tex_trans); -} - - -void -sp_tex_tile_cache_unmap_transfers(struct softpipe_tex_tile_cache *tc) -{ - if (tc->tex_trans_map) { - tc->pipe->transfer_unmap(tc->pipe, tc->tex_trans); - tc->tex_trans_map = NULL; - } -} - -/** - * Invalidate all cached tiles for the cached texture. - * Should be called when the texture is modified. - */ -void -sp_tex_tile_cache_validate_texture(struct softpipe_tex_tile_cache *tc) -{ - unsigned i; - - assert(tc); - assert(tc->texture); - - for (i = 0; i < NUM_ENTRIES; i++) { - tc->entries[i].addr.bits.invalid = 1; - } -} - -static boolean -sp_tex_tile_is_compat_view(struct softpipe_tex_tile_cache *tc, - struct pipe_sampler_view *view) -{ - if (!view) - return FALSE; - return (tc->texture == view->texture && - tc->format == view->format && - tc->swizzle_r == view->swizzle_r && - tc->swizzle_g == view->swizzle_g && - tc->swizzle_b == view->swizzle_b && - tc->swizzle_a == view->swizzle_a); -} - -/** - * Specify the sampler view to cache. - */ -void -sp_tex_tile_cache_set_sampler_view(struct softpipe_tex_tile_cache *tc, - struct pipe_sampler_view *view) -{ - struct pipe_resource *texture = view ? view->texture : NULL; - uint i; - - assert(!tc->transfer); - - if (!sp_tex_tile_is_compat_view(tc, view)) { - pipe_resource_reference(&tc->texture, texture); - - if (tc->tex_trans) { - if (tc->tex_trans_map) { - tc->pipe->transfer_unmap(tc->pipe, tc->tex_trans); - tc->tex_trans_map = NULL; - } - - tc->pipe->transfer_destroy(tc->pipe, tc->tex_trans); - tc->tex_trans = NULL; - } - - if (view) { - tc->swizzle_r = view->swizzle_r; - tc->swizzle_g = view->swizzle_g; - tc->swizzle_b = view->swizzle_b; - tc->swizzle_a = view->swizzle_a; - tc->format = view->format; - } - - /* mark as entries as invalid/empty */ - /* XXX we should try to avoid this when the teximage hasn't changed */ - for (i = 0; i < NUM_ENTRIES; i++) { - tc->entries[i].addr.bits.invalid = 1; - } - - tc->tex_face = -1; /* any invalid value here */ - } -} - - - - -/** - * Flush the tile cache: write all dirty tiles back to the transfer. - * any tiles "flagged" as cleared will be "really" cleared. - */ -void -sp_flush_tex_tile_cache(struct softpipe_tex_tile_cache *tc) -{ - int pos; - - if (tc->texture) { - /* caching a texture, mark all entries as empty */ - for (pos = 0; pos < NUM_ENTRIES; pos++) { - tc->entries[pos].addr.bits.invalid = 1; - } - tc->tex_face = -1; - } - -} - - -/** - * Given the texture face, level, zslice, x and y values, compute - * the cache entry position/index where we'd hope to find the - * cached texture tile. - * This is basically a direct-map cache. - * XXX There's probably lots of ways in which we can improve this. - */ -static INLINE uint -tex_cache_pos( union tex_tile_address addr ) -{ - uint entry = (addr.bits.x + - addr.bits.y * 9 + - addr.bits.z * 3 + - addr.bits.face + - addr.bits.level * 7); - - return entry % NUM_ENTRIES; -} - -/** - * Similar to sp_get_cached_tile() but for textures. - * Tiles are read-only and indexed with more params. - */ -const struct softpipe_tex_cached_tile * -sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc, - union tex_tile_address addr ) -{ - struct softpipe_tex_cached_tile *tile; - boolean zs = util_format_is_depth_or_stencil(tc->format); - - tile = tc->entries + tex_cache_pos( addr ); - - if (addr.value != tile->addr.value) { - - /* cache miss. Most misses are because we've invaldiated the - * texture cache previously -- most commonly on binding a new - * texture. Currently we effectively flush the cache on texture - * bind. - */ -#if 0 - _debug_printf("miss at %u: x=%d y=%d z=%d face=%d level=%d\n" - " tile %u: x=%d y=%d z=%d face=%d level=%d\n", - pos, x/TILE_SIZE, y/TILE_SIZE, z, face, level, - pos, tile->addr.bits.x, tile->addr.bits.y, tile->z, tile->face, tile->level); -#endif - - /* check if we need to get a new transfer */ - if (!tc->tex_trans || - tc->tex_face != addr.bits.face || - tc->tex_level != addr.bits.level || - tc->tex_z != addr.bits.z) { - /* get new transfer (view into texture) */ - unsigned width, height, layer; - - if (tc->tex_trans) { - if (tc->tex_trans_map) { - tc->pipe->transfer_unmap(tc->pipe, tc->tex_trans); - tc->tex_trans_map = NULL; - } - - tc->pipe->transfer_destroy(tc->pipe, tc->tex_trans); - tc->tex_trans = NULL; - } - - width = u_minify(tc->texture->width0, addr.bits.level); - if (tc->texture->target == PIPE_TEXTURE_1D_ARRAY) { - height = tc->texture->array_size; - layer = 0; - } - else { - height = u_minify(tc->texture->height0, addr.bits.level); - layer = addr.bits.face + addr.bits.z; - } - - tc->tex_trans = - pipe_get_transfer(tc->pipe, tc->texture, - addr.bits.level, - layer, - PIPE_TRANSFER_READ | PIPE_TRANSFER_UNSYNCHRONIZED, - 0, 0, width, height); - - tc->tex_trans_map = tc->pipe->transfer_map(tc->pipe, tc->tex_trans); - - tc->tex_face = addr.bits.face; - tc->tex_level = addr.bits.level; - tc->tex_z = addr.bits.z; - } - - /* Get tile from the transfer (view into texture), explicitly passing - * the image format. - */ - if (!zs && util_format_is_pure_uint(tc->format)) { - pipe_get_tile_ui_format(tc->pipe, - tc->tex_trans, - addr.bits.x * TILE_SIZE, - addr.bits.y * TILE_SIZE, - TILE_SIZE, - TILE_SIZE, - tc->format, - (unsigned *) tile->data.colorui); - } else if (!zs && util_format_is_pure_sint(tc->format)) { - pipe_get_tile_i_format(tc->pipe, - tc->tex_trans, - addr.bits.x * TILE_SIZE, - addr.bits.y * TILE_SIZE, - TILE_SIZE, - TILE_SIZE, - tc->format, - (int *) tile->data.colori); - } else { - pipe_get_tile_rgba_format(tc->pipe, - tc->tex_trans, - addr.bits.x * TILE_SIZE, - addr.bits.y * TILE_SIZE, - TILE_SIZE, - TILE_SIZE, - tc->format, - (float *) tile->data.color); - } - tile->addr = addr; - } - - tc->last_tile = tile; - return tile; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_tex_tile_cache.h b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_tex_tile_cache.h deleted file mode 100644 index 4098aa1d3c6..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_tex_tile_cache.h +++ /dev/null @@ -1,165 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef SP_TEX_TILE_CACHE_H -#define SP_TEX_TILE_CACHE_H - - -#include "pipe/p_compiler.h" -#include "sp_limits.h" - - -struct softpipe_context; -struct softpipe_tex_tile_cache; - - -/** - * Cache tile size (width and height). This needs to be a power of two. - */ -#define TILE_SIZE_LOG2 6 -#define TILE_SIZE (1 << TILE_SIZE_LOG2) - - -#define TEX_ADDR_BITS (SP_MAX_TEXTURE_2D_LEVELS - 1 - TILE_SIZE_LOG2) -#define TEX_Z_BITS (SP_MAX_TEXTURE_2D_LEVELS - 1) - -/** - * Texture tile address as a union for fast compares. - */ -union tex_tile_address { - struct { - unsigned x:TEX_ADDR_BITS; /* 16K / TILE_SIZE */ - unsigned y:TEX_ADDR_BITS; /* 16K / TILE_SIZE */ - unsigned z:TEX_Z_BITS; /* 16K -- z not tiled */ - unsigned face:3; - unsigned level:4; - unsigned invalid:1; - } bits; - uint64_t value; -}; - - -struct softpipe_tex_cached_tile -{ - union tex_tile_address addr; - union { - float color[TILE_SIZE][TILE_SIZE][4]; - unsigned int colorui[TILE_SIZE][TILE_SIZE][4]; - int colori[TILE_SIZE][TILE_SIZE][4]; - } data; -}; - -#define NUM_ENTRIES 50 - -struct softpipe_tex_tile_cache -{ - struct pipe_context *pipe; - struct pipe_transfer *transfer; - void *transfer_map; - - struct pipe_resource *texture; /**< if caching a texture */ - unsigned timestamp; - - struct softpipe_tex_cached_tile entries[NUM_ENTRIES]; - - struct pipe_transfer *tex_trans; - void *tex_trans_map; - int tex_face, tex_level, tex_z; - - unsigned swizzle_r; - unsigned swizzle_g; - unsigned swizzle_b; - unsigned swizzle_a; - enum pipe_format format; - - struct softpipe_tex_cached_tile *last_tile; /**< most recently retrieved tile */ -}; - - -extern struct softpipe_tex_tile_cache * -sp_create_tex_tile_cache( struct pipe_context *pipe ); - -extern void -sp_destroy_tex_tile_cache(struct softpipe_tex_tile_cache *tc); - - -extern void -sp_tex_tile_cache_map_transfers(struct softpipe_tex_tile_cache *tc); - -extern void -sp_tex_tile_cache_unmap_transfers(struct softpipe_tex_tile_cache *tc); - -extern void -sp_tex_tile_cache_set_sampler_view(struct softpipe_tex_tile_cache *tc, - struct pipe_sampler_view *view); - -void -sp_tex_tile_cache_validate_texture(struct softpipe_tex_tile_cache *tc); - -extern void -sp_flush_tex_tile_cache(struct softpipe_tex_tile_cache *tc); - - - -extern const struct softpipe_tex_cached_tile * -sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc, - union tex_tile_address addr ); - -static INLINE union tex_tile_address -tex_tile_address( unsigned x, - unsigned y, - unsigned z, - unsigned face, - unsigned level ) -{ - union tex_tile_address addr; - - addr.value = 0; - addr.bits.x = x / TILE_SIZE; - addr.bits.y = y / TILE_SIZE; - addr.bits.z = z; - addr.bits.face = face; - addr.bits.level = level; - - return addr; -} - -/* Quickly retrieve tile if it matches last lookup. - */ -static INLINE const struct softpipe_tex_cached_tile * -sp_get_cached_tile_tex(struct softpipe_tex_tile_cache *tc, - union tex_tile_address addr ) -{ - if (tc->last_tile->addr.value == addr.value) - return tc->last_tile; - - return sp_find_cached_tile_tex( tc, addr ); -} - - -#endif /* SP_TEX_TILE_CACHE_H */ - diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_texture.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_texture.c deleted file mode 100644 index 95374c34ec3..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_texture.c +++ /dev/null @@ -1,511 +0,0 @@ -/************************************************************************** - * - * Copyright 2006 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - /* - * Authors: - * Keith Whitwell - * Michel Dänzer - */ - -#include "pipe/p_defines.h" -#include "util/u_inlines.h" - -#include "util/u_format.h" -#include "util/u_math.h" -#include "util/u_memory.h" -#include "util/u_transfer.h" - -#include "sp_context.h" -#include "sp_flush.h" -#include "sp_texture.h" -#include "sp_screen.h" - -#include "state_tracker/sw_winsys.h" - - -/** - * Conventional allocation path for non-display textures: - * Use a simple, maximally packed layout. - */ -static boolean -softpipe_resource_layout(struct pipe_screen *screen, - struct softpipe_resource *spr) -{ - struct pipe_resource *pt = &spr->base; - unsigned level; - unsigned width = pt->width0; - unsigned height = pt->height0; - unsigned depth = pt->depth0; - unsigned buffer_size = 0; - - for (level = 0; level <= pt->last_level; level++) { - unsigned slices; - - if (pt->target == PIPE_TEXTURE_CUBE) - slices = 6; - else if (pt->target == PIPE_TEXTURE_3D) - slices = depth; - else - slices = pt->array_size; - - spr->stride[level] = util_format_get_stride(pt->format, width); - - spr->level_offset[level] = buffer_size; - - buffer_size += (util_format_get_nblocksy(pt->format, height) * - slices * spr->stride[level]); - - width = u_minify(width, 1); - height = u_minify(height, 1); - depth = u_minify(depth, 1); - } - - spr->data = align_malloc(buffer_size, 16); - - return spr->data != NULL; -} - - -/** - * Texture layout for simple color buffers. - */ -static boolean -softpipe_displaytarget_layout(struct pipe_screen *screen, - struct softpipe_resource *spr) -{ - struct sw_winsys *winsys = softpipe_screen(screen)->winsys; - - /* Round up the surface size to a multiple of the tile size? - */ - spr->dt = winsys->displaytarget_create(winsys, - spr->base.bind, - spr->base.format, - spr->base.width0, - spr->base.height0, - 16, - &spr->stride[0] ); - - return spr->dt != NULL; -} - - -/** - * Create new pipe_resource given the template information. - */ -static struct pipe_resource * -softpipe_resource_create(struct pipe_screen *screen, - const struct pipe_resource *templat) -{ - struct softpipe_resource *spr = CALLOC_STRUCT(softpipe_resource); - if (!spr) - return NULL; - - assert(templat->format != PIPE_FORMAT_NONE); - - spr->base = *templat; - pipe_reference_init(&spr->base.reference, 1); - spr->base.screen = screen; - - spr->pot = (util_is_power_of_two(templat->width0) && - util_is_power_of_two(templat->height0) && - util_is_power_of_two(templat->depth0)); - - if (spr->base.bind & (PIPE_BIND_DISPLAY_TARGET | - PIPE_BIND_SCANOUT | - PIPE_BIND_SHARED)) { - if (!softpipe_displaytarget_layout(screen, spr)) - goto fail; - } - else { - if (!softpipe_resource_layout(screen, spr)) - goto fail; - } - - return &spr->base; - - fail: - FREE(spr); - return NULL; -} - - -static void -softpipe_resource_destroy(struct pipe_screen *pscreen, - struct pipe_resource *pt) -{ - struct softpipe_screen *screen = softpipe_screen(pscreen); - struct softpipe_resource *spr = softpipe_resource(pt); - - if (spr->dt) { - /* display target */ - struct sw_winsys *winsys = screen->winsys; - winsys->displaytarget_destroy(winsys, spr->dt); - } - else if (!spr->userBuffer) { - /* regular texture */ - align_free(spr->data); - } - - FREE(spr); -} - - -static struct pipe_resource * -softpipe_resource_from_handle(struct pipe_screen *screen, - const struct pipe_resource *templat, - struct winsys_handle *whandle) -{ - struct sw_winsys *winsys = softpipe_screen(screen)->winsys; - struct softpipe_resource *spr = CALLOC_STRUCT(softpipe_resource); - if (!spr) - return NULL; - - spr->base = *templat; - pipe_reference_init(&spr->base.reference, 1); - spr->base.screen = screen; - - spr->pot = (util_is_power_of_two(templat->width0) && - util_is_power_of_two(templat->height0) && - util_is_power_of_two(templat->depth0)); - - spr->dt = winsys->displaytarget_from_handle(winsys, - templat, - whandle, - &spr->stride[0]); - if (!spr->dt) - goto fail; - - return &spr->base; - - fail: - FREE(spr); - return NULL; -} - - -static boolean -softpipe_resource_get_handle(struct pipe_screen *screen, - struct pipe_resource *pt, - struct winsys_handle *whandle) -{ - struct sw_winsys *winsys = softpipe_screen(screen)->winsys; - struct softpipe_resource *spr = softpipe_resource(pt); - - assert(spr->dt); - if (!spr->dt) - return FALSE; - - return winsys->displaytarget_get_handle(winsys, spr->dt, whandle); -} - - -/** - * Helper function to compute offset (in bytes) for a particular - * texture level/face/slice from the start of the buffer. - */ -static unsigned -sp_get_tex_image_offset(const struct softpipe_resource *spr, - unsigned level, unsigned layer) -{ - const unsigned hgt = u_minify(spr->base.height0, level); - const unsigned nblocksy = util_format_get_nblocksy(spr->base.format, hgt); - unsigned offset = spr->level_offset[level]; - - if (spr->base.target == PIPE_TEXTURE_CUBE || - spr->base.target == PIPE_TEXTURE_3D || - spr->base.target == PIPE_TEXTURE_2D_ARRAY) { - offset += layer * nblocksy * spr->stride[level]; - } - else if (spr->base.target == PIPE_TEXTURE_1D_ARRAY) { - offset += layer * spr->stride[level]; - } - else { - assert(layer == 0); - } - - return offset; -} - - -/** - * Get a pipe_surface "view" into a texture resource. - */ -static struct pipe_surface * -softpipe_create_surface(struct pipe_context *pipe, - struct pipe_resource *pt, - const struct pipe_surface *surf_tmpl) -{ - struct pipe_surface *ps; - unsigned level = surf_tmpl->u.tex.level; - - assert(level <= pt->last_level); - assert(surf_tmpl->u.tex.first_layer == surf_tmpl->u.tex.last_layer); - - ps = CALLOC_STRUCT(pipe_surface); - if (ps) { - pipe_reference_init(&ps->reference, 1); - pipe_resource_reference(&ps->texture, pt); - ps->context = pipe; - ps->format = surf_tmpl->format; - ps->width = u_minify(pt->width0, level); - ps->height = u_minify(pt->height0, level); - ps->usage = surf_tmpl->usage; - - ps->u.tex.level = level; - ps->u.tex.first_layer = surf_tmpl->u.tex.first_layer; - ps->u.tex.last_layer = surf_tmpl->u.tex.last_layer; - } - return ps; -} - - -/** - * Free a pipe_surface which was created with softpipe_create_surface(). - */ -static void -softpipe_surface_destroy(struct pipe_context *pipe, - struct pipe_surface *surf) -{ - /* Effectively do the texture_update work here - if texture images - * needed post-processing to put them into hardware layout, this is - * where it would happen. For softpipe, nothing to do. - */ - assert(surf->texture); - pipe_resource_reference(&surf->texture, NULL); - FREE(surf); -} - - -/** - * Geta pipe_transfer object which is used for moving data in/out of - * a resource object. - * \param pipe rendering context - * \param resource the resource to transfer in/out of - * \param level which mipmap level - * \param usage bitmask of PIPE_TRANSFER_x flags - * \param box the 1D/2D/3D region of interest - */ -static struct pipe_transfer * -softpipe_get_transfer(struct pipe_context *pipe, - struct pipe_resource *resource, - unsigned level, - unsigned usage, - const struct pipe_box *box) -{ - struct softpipe_resource *spr = softpipe_resource(resource); - struct softpipe_transfer *spt; - - assert(resource); - assert(level <= resource->last_level); - - /* make sure the requested region is in the image bounds */ - assert(box->x + box->width <= u_minify(resource->width0, level)); - if (resource->target == PIPE_TEXTURE_1D_ARRAY) { - assert(box->y + box->height <= resource->array_size); - } - else { - assert(box->y + box->height <= u_minify(resource->height0, level)); - if (resource->target == PIPE_TEXTURE_2D_ARRAY) { - assert(box->z + box->depth <= resource->array_size); - } - else if (resource->target == PIPE_TEXTURE_CUBE) { - assert(box->z < 6); - } - else { - assert(box->z + box->depth <= (u_minify(resource->depth0, level))); - } - } - - /* - * Transfers, like other pipe operations, must happen in order, so flush the - * context if necessary. - */ - if (!(usage & PIPE_TRANSFER_UNSYNCHRONIZED)) { - boolean read_only = !(usage & PIPE_TRANSFER_WRITE); - boolean do_not_block = !!(usage & PIPE_TRANSFER_DONTBLOCK); - if (!softpipe_flush_resource(pipe, resource, - level, box->depth > 1 ? -1 : box->z, - 0, /* flush_flags */ - read_only, - TRUE, /* cpu_access */ - do_not_block)) { - /* - * It would have blocked, but state tracker requested no to. - */ - assert(do_not_block); - return NULL; - } - } - - spt = CALLOC_STRUCT(softpipe_transfer); - if (spt) { - struct pipe_transfer *pt = &spt->base; - enum pipe_format format = resource->format; - const unsigned hgt = u_minify(spr->base.height0, level); - const unsigned nblocksy = util_format_get_nblocksy(format, hgt); - - pipe_resource_reference(&pt->resource, resource); - pt->level = level; - pt->usage = usage; - pt->box = *box; - pt->stride = spr->stride[level]; - pt->layer_stride = pt->stride * nblocksy; - - spt->offset = sp_get_tex_image_offset(spr, level, box->z); - - spt->offset += - box->y / util_format_get_blockheight(format) * spt->base.stride + - box->x / util_format_get_blockwidth(format) * util_format_get_blocksize(format); - - return pt; - } - return NULL; -} - - -/** - * Free a pipe_transfer object which was created with - * softpipe_get_transfer(). - */ -static void -softpipe_transfer_destroy(struct pipe_context *pipe, - struct pipe_transfer *transfer) -{ - pipe_resource_reference(&transfer->resource, NULL); - FREE(transfer); -} - - -/** - * Create memory mapping for given pipe_transfer object. - */ -static void * -softpipe_transfer_map(struct pipe_context *pipe, - struct pipe_transfer *transfer) -{ - struct softpipe_transfer *spt = softpipe_transfer(transfer); - struct softpipe_resource *spr = softpipe_resource(transfer->resource); - struct sw_winsys *winsys = softpipe_screen(pipe->screen)->winsys; - uint8_t *map; - - /* resources backed by display target treated specially: - */ - if (spr->dt) { - map = winsys->displaytarget_map(winsys, spr->dt, transfer->usage); - } - else { - map = spr->data; - } - - if (map == NULL) - return NULL; - else - return map + spt->offset; -} - - -/** - * Unmap memory mapping for given pipe_transfer object. - */ -static void -softpipe_transfer_unmap(struct pipe_context *pipe, - struct pipe_transfer *transfer) -{ - struct softpipe_resource *spr; - - assert(transfer->resource); - spr = softpipe_resource(transfer->resource); - - if (spr->dt) { - /* display target */ - struct sw_winsys *winsys = softpipe_screen(pipe->screen)->winsys; - winsys->displaytarget_unmap(winsys, spr->dt); - } - - if (transfer->usage & PIPE_TRANSFER_WRITE) { - /* Mark the texture as dirty to expire the tile caches. */ - spr->timestamp++; - } -} - -/** - * Create buffer which wraps user-space data. - */ -static struct pipe_resource * -softpipe_user_buffer_create(struct pipe_screen *screen, - void *ptr, - unsigned bytes, - unsigned bind_flags) -{ - struct softpipe_resource *spr; - - spr = CALLOC_STRUCT(softpipe_resource); - if (!spr) - return NULL; - - pipe_reference_init(&spr->base.reference, 1); - spr->base.screen = screen; - spr->base.format = PIPE_FORMAT_R8_UNORM; /* ?? */ - spr->base.bind = bind_flags; - spr->base.usage = PIPE_USAGE_IMMUTABLE; - spr->base.flags = 0; - spr->base.width0 = bytes; - spr->base.height0 = 1; - spr->base.depth0 = 1; - spr->base.array_size = 1; - spr->userBuffer = TRUE; - spr->data = ptr; - - return &spr->base; -} - - -void -softpipe_init_texture_funcs(struct pipe_context *pipe) -{ - pipe->get_transfer = softpipe_get_transfer; - pipe->transfer_destroy = softpipe_transfer_destroy; - pipe->transfer_map = softpipe_transfer_map; - pipe->transfer_unmap = softpipe_transfer_unmap; - - pipe->transfer_flush_region = u_default_transfer_flush_region; - pipe->transfer_inline_write = u_default_transfer_inline_write; - - pipe->create_surface = softpipe_create_surface; - pipe->surface_destroy = softpipe_surface_destroy; -} - - -void -softpipe_init_screen_texture_funcs(struct pipe_screen *screen) -{ - screen->resource_create = softpipe_resource_create; - screen->resource_destroy = softpipe_resource_destroy; - screen->resource_from_handle = softpipe_resource_from_handle; - screen->resource_get_handle = softpipe_resource_get_handle; - screen->user_buffer_create = softpipe_user_buffer_create; - -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_texture.h b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_texture.h deleted file mode 100644 index 533d6252e25..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_texture.h +++ /dev/null @@ -1,103 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef SP_TEXTURE_H -#define SP_TEXTURE_H - - -#include "pipe/p_state.h" -#include "sp_limits.h" - - -struct pipe_context; -struct pipe_screen; -struct softpipe_context; - - -/** - * Subclass of pipe_resource. - */ -struct softpipe_resource -{ - struct pipe_resource base; - - unsigned long level_offset[SP_MAX_TEXTURE_2D_LEVELS]; - unsigned stride[SP_MAX_TEXTURE_2D_LEVELS]; - - /** - * Display target, only valid for PIPE_TEXTURE_2D with the - * PIPE_BIND_DISPLAY_TARGET usage. - */ - struct sw_displaytarget *dt; - - /** - * Malloc'ed data for regular buffers and textures, or a mapping to dt above. - */ - void *data; - - /* True if texture images are power-of-two in all dimensions: - */ - boolean pot; - boolean userBuffer; - - unsigned timestamp; -}; - - -/** - * Subclass of pipe_transfer. - */ -struct softpipe_transfer -{ - struct pipe_transfer base; - - unsigned long offset; -}; - - -/** cast wrappers */ -static INLINE struct softpipe_resource * -softpipe_resource(struct pipe_resource *pt) -{ - return (struct softpipe_resource *) pt; -} - -static INLINE struct softpipe_transfer * -softpipe_transfer(struct pipe_transfer *pt) -{ - return (struct softpipe_transfer *) pt; -} - - -extern void -softpipe_init_screen_texture_funcs(struct pipe_screen *screen); - -extern void -softpipe_init_texture_funcs(struct pipe_context *pipe); - - -#endif /* SP_TEXTURE */ diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_tile_cache.c b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_tile_cache.c deleted file mode 100644 index 659ac58e5b0..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_tile_cache.c +++ /dev/null @@ -1,631 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * Render target tile caching. - * - * Author: - * Brian Paul - */ - -#include "util/u_inlines.h" -#include "util/u_format.h" -#include "util/u_memory.h" -#include "util/u_tile.h" -#include "sp_tile_cache.h" - -static struct softpipe_cached_tile * -sp_alloc_tile(struct softpipe_tile_cache *tc); - - -/** - * Return the position in the cache for the tile that contains win pos (x,y). - * We currently use a direct mapped cache so this is like a hack key. - * At some point we should investige something more sophisticated, like - * a LRU replacement policy. - */ -#define CACHE_POS(x, y) \ - (((x) + (y) * 5) % NUM_ENTRIES) - - - -/** - * Is the tile at (x,y) in cleared state? - */ -static INLINE uint -is_clear_flag_set(const uint *bitvec, union tile_address addr) -{ - int pos, bit; - pos = addr.bits.y * (MAX_WIDTH / TILE_SIZE) + addr.bits.x; - assert(pos / 32 < (MAX_WIDTH / TILE_SIZE) * (MAX_HEIGHT / TILE_SIZE) / 32); - bit = bitvec[pos / 32] & (1 << (pos & 31)); - return bit; -} - - -/** - * Mark the tile at (x,y) as not cleared. - */ -static INLINE void -clear_clear_flag(uint *bitvec, union tile_address addr) -{ - int pos; - pos = addr.bits.y * (MAX_WIDTH / TILE_SIZE) + addr.bits.x; - assert(pos / 32 < (MAX_WIDTH / TILE_SIZE) * (MAX_HEIGHT / TILE_SIZE) / 32); - bitvec[pos / 32] &= ~(1 << (pos & 31)); -} - - -struct softpipe_tile_cache * -sp_create_tile_cache( struct pipe_context *pipe ) -{ - struct softpipe_tile_cache *tc; - uint pos; - int maxLevels, maxTexSize; - - /* sanity checking: max sure MAX_WIDTH/HEIGHT >= largest texture image */ - maxLevels = pipe->screen->get_param(pipe->screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS); - maxTexSize = 1 << (maxLevels - 1); - assert(MAX_WIDTH >= maxTexSize); - - assert(sizeof(union tile_address) == 4); - - assert((TILE_SIZE << TILE_ADDR_BITS) >= MAX_WIDTH); - - tc = CALLOC_STRUCT( softpipe_tile_cache ); - if (tc) { - tc->pipe = pipe; - for (pos = 0; pos < NUM_ENTRIES; pos++) { - tc->tile_addrs[pos].bits.invalid = 1; - } - tc->last_tile_addr.bits.invalid = 1; - - /* this allocation allows us to guarantee that allocation - * failures are never fatal later - */ - tc->tile = MALLOC_STRUCT( softpipe_cached_tile ); - if (!tc->tile) - { - FREE(tc); - return NULL; - } - - /* XXX this code prevents valgrind warnings about use of uninitialized - * memory in programs that don't clear the surface before rendering. - * However, it breaks clearing in other situations (such as in - * progs/tests/drawbuffers, see bug 24402). - */ -#if 0 - /* set flags to indicate all the tiles are cleared */ - memset(tc->clear_flags, 255, sizeof(tc->clear_flags)); -#endif - } - return tc; -} - - -void -sp_destroy_tile_cache(struct softpipe_tile_cache *tc) -{ - if (tc) { - uint pos; - - for (pos = 0; pos < NUM_ENTRIES; pos++) { - /*assert(tc->entries[pos].x < 0);*/ - FREE( tc->entries[pos] ); - } - FREE( tc->tile ); - - if (tc->transfer) { - tc->pipe->transfer_destroy(tc->pipe, tc->transfer); - } - - FREE( tc ); - } -} - - -/** - * Specify the surface to cache. - */ -void -sp_tile_cache_set_surface(struct softpipe_tile_cache *tc, - struct pipe_surface *ps) -{ - struct pipe_context *pipe = tc->pipe; - - if (tc->transfer) { - if (ps == tc->surface) - return; - - if (tc->transfer_map) { - pipe->transfer_unmap(pipe, tc->transfer); - tc->transfer_map = NULL; - } - - pipe->transfer_destroy(pipe, tc->transfer); - tc->transfer = NULL; - } - - tc->surface = ps; - - if (ps) { - tc->transfer = pipe_get_transfer(pipe, ps->texture, - ps->u.tex.level, ps->u.tex.first_layer, - PIPE_TRANSFER_READ_WRITE | - PIPE_TRANSFER_UNSYNCHRONIZED, - 0, 0, ps->width, ps->height); - - tc->depth_stencil = util_format_is_depth_or_stencil(ps->format); - } -} - - -/** - * Return the transfer being cached. - */ -struct pipe_surface * -sp_tile_cache_get_surface(struct softpipe_tile_cache *tc) -{ - return tc->surface; -} - - -void -sp_tile_cache_map_transfers(struct softpipe_tile_cache *tc) -{ - if (tc->transfer && !tc->transfer_map) - tc->transfer_map = tc->pipe->transfer_map(tc->pipe, tc->transfer); -} - - -void -sp_tile_cache_unmap_transfers(struct softpipe_tile_cache *tc) -{ - if (tc->transfer_map) { - tc->pipe->transfer_unmap(tc->pipe, tc->transfer); - tc->transfer_map = NULL; - } -} - - -/** - * Set pixels in a tile to the given clear color/value, float. - */ -static void -clear_tile_rgba(struct softpipe_cached_tile *tile, - enum pipe_format format, - const union pipe_color_union *clear_value) -{ - if (clear_value->f[0] == 0.0 && - clear_value->f[1] == 0.0 && - clear_value->f[2] == 0.0 && - clear_value->f[3] == 0.0) { - memset(tile->data.color, 0, sizeof(tile->data.color)); - } - else { - uint i, j; - - if (util_format_is_pure_uint(format)) { - for (i = 0; i < TILE_SIZE; i++) { - for (j = 0; j < TILE_SIZE; j++) { - tile->data.colorui128[i][j][0] = clear_value->ui[0]; - tile->data.colorui128[i][j][1] = clear_value->ui[1]; - tile->data.colorui128[i][j][2] = clear_value->ui[2]; - tile->data.colorui128[i][j][3] = clear_value->ui[3]; - } - } - } else if (util_format_is_pure_sint(format)) { - for (i = 0; i < TILE_SIZE; i++) { - for (j = 0; j < TILE_SIZE; j++) { - tile->data.colori128[i][j][0] = clear_value->i[0]; - tile->data.colori128[i][j][1] = clear_value->i[1]; - tile->data.colori128[i][j][2] = clear_value->i[2]; - tile->data.colori128[i][j][3] = clear_value->i[3]; - } - } - } else { - for (i = 0; i < TILE_SIZE; i++) { - for (j = 0; j < TILE_SIZE; j++) { - tile->data.color[i][j][0] = clear_value->f[0]; - tile->data.color[i][j][1] = clear_value->f[1]; - tile->data.color[i][j][2] = clear_value->f[2]; - tile->data.color[i][j][3] = clear_value->f[3]; - } - } - } - } -} - - -/** - * Set a tile to a solid value/color. - */ -static void -clear_tile(struct softpipe_cached_tile *tile, - enum pipe_format format, - uint64_t clear_value) -{ - uint i, j; - - switch (util_format_get_blocksize(format)) { - case 1: - memset(tile->data.any, clear_value, TILE_SIZE * TILE_SIZE); - break; - case 2: - if (clear_value == 0) { - memset(tile->data.any, 0, 2 * TILE_SIZE * TILE_SIZE); - } - else { - for (i = 0; i < TILE_SIZE; i++) { - for (j = 0; j < TILE_SIZE; j++) { - tile->data.depth16[i][j] = (ushort) clear_value; - } - } - } - break; - case 4: - if (clear_value == 0) { - memset(tile->data.any, 0, 4 * TILE_SIZE * TILE_SIZE); - } - else { - for (i = 0; i < TILE_SIZE; i++) { - for (j = 0; j < TILE_SIZE; j++) { - tile->data.depth32[i][j] = clear_value; - } - } - } - break; - case 8: - if (clear_value == 0) { - memset(tile->data.any, 0, 8 * TILE_SIZE * TILE_SIZE); - } - else { - for (i = 0; i < TILE_SIZE; i++) { - for (j = 0; j < TILE_SIZE; j++) { - tile->data.depth64[i][j] = clear_value; - } - } - } - break; - default: - assert(0); - } -} - - -/** - * Actually clear the tiles which were flagged as being in a clear state. - */ -static void -sp_tile_cache_flush_clear(struct softpipe_tile_cache *tc) -{ - struct pipe_transfer *pt = tc->transfer; - const uint w = tc->transfer->box.width; - const uint h = tc->transfer->box.height; - uint x, y; - uint numCleared = 0; - - assert(pt->resource); - if (!tc->tile) - tc->tile = sp_alloc_tile(tc); - - /* clear the scratch tile to the clear value */ - if (tc->depth_stencil) { - clear_tile(tc->tile, pt->resource->format, tc->clear_val); - } else { - clear_tile_rgba(tc->tile, pt->resource->format, &tc->clear_color); - } - - /* push the tile to all positions marked as clear */ - for (y = 0; y < h; y += TILE_SIZE) { - for (x = 0; x < w; x += TILE_SIZE) { - union tile_address addr = tile_address(x, y); - - if (is_clear_flag_set(tc->clear_flags, addr)) { - /* write the scratch tile to the surface */ - if (tc->depth_stencil) { - pipe_put_tile_raw(tc->pipe, - pt, - x, y, TILE_SIZE, TILE_SIZE, - tc->tile->data.any, 0/*STRIDE*/); - } - else { - if (util_format_is_pure_uint(tc->surface->format)) { - pipe_put_tile_ui_format(tc->pipe, pt, - x, y, TILE_SIZE, TILE_SIZE, - pt->resource->format, - (unsigned *) tc->tile->data.colorui128); - } else if (util_format_is_pure_sint(tc->surface->format)) { - pipe_put_tile_i_format(tc->pipe, pt, - x, y, TILE_SIZE, TILE_SIZE, - pt->resource->format, - (int *) tc->tile->data.colori128); - } else { - pipe_put_tile_rgba(tc->pipe, pt, - x, y, TILE_SIZE, TILE_SIZE, - (float *) tc->tile->data.color); - } - } - numCleared++; - } - } - } - - /* reset all clear flags to zero */ - memset(tc->clear_flags, 0, sizeof(tc->clear_flags)); - -#if 0 - debug_printf("num cleared: %u\n", numCleared); -#endif -} - -static void -sp_flush_tile(struct softpipe_tile_cache* tc, unsigned pos) -{ - if (!tc->tile_addrs[pos].bits.invalid) { - if (tc->depth_stencil) { - pipe_put_tile_raw(tc->pipe, tc->transfer, - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tc->entries[pos]->data.depth32, 0/*STRIDE*/); - } - else { - if (util_format_is_pure_uint(tc->surface->format)) { - pipe_put_tile_ui_format(tc->pipe, tc->transfer, - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tc->surface->format, - (unsigned *) tc->entries[pos]->data.colorui128); - } else if (util_format_is_pure_sint(tc->surface->format)) { - pipe_put_tile_i_format(tc->pipe, tc->transfer, - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tc->surface->format, - (int *) tc->entries[pos]->data.colori128); - } else { - pipe_put_tile_rgba_format(tc->pipe, tc->transfer, - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tc->surface->format, - (float *) tc->entries[pos]->data.color); - } - } - tc->tile_addrs[pos].bits.invalid = 1; /* mark as empty */ - } -} - -/** - * Flush the tile cache: write all dirty tiles back to the transfer. - * any tiles "flagged" as cleared will be "really" cleared. - */ -void -sp_flush_tile_cache(struct softpipe_tile_cache *tc) -{ - struct pipe_transfer *pt = tc->transfer; - int inuse = 0, pos; - - if (pt) { - /* caching a drawing transfer */ - for (pos = 0; pos < NUM_ENTRIES; pos++) { - struct softpipe_cached_tile *tile = tc->entries[pos]; - if (!tile) - { - assert(tc->tile_addrs[pos].bits.invalid); - continue; - } - - sp_flush_tile(tc, pos); - ++inuse; - } - - sp_tile_cache_flush_clear(tc); - - - tc->last_tile_addr.bits.invalid = 1; - } - -#if 0 - debug_printf("flushed tiles in use: %d\n", inuse); -#endif -} - -static struct softpipe_cached_tile * -sp_alloc_tile(struct softpipe_tile_cache *tc) -{ - struct softpipe_cached_tile * tile = MALLOC_STRUCT(softpipe_cached_tile); - if (!tile) - { - /* in this case, steal an existing tile */ - if (!tc->tile) - { - unsigned pos; - for (pos = 0; pos < NUM_ENTRIES; ++pos) { - if (!tc->entries[pos]) - continue; - - sp_flush_tile(tc, pos); - tc->tile = tc->entries[pos]; - tc->entries[pos] = NULL; - break; - } - - /* this should never happen */ - if (!tc->tile) - abort(); - } - - tile = tc->tile; - tc->tile = NULL; - - tc->last_tile_addr.bits.invalid = 1; - } - return tile; -} - -/** - * Get a tile from the cache. - * \param x, y position of tile, in pixels - */ -struct softpipe_cached_tile * -sp_find_cached_tile(struct softpipe_tile_cache *tc, - union tile_address addr ) -{ - struct pipe_transfer *pt = tc->transfer; - /* cache pos/entry: */ - const int pos = CACHE_POS(addr.bits.x, - addr.bits.y); - struct softpipe_cached_tile *tile = tc->entries[pos]; - - if (!tile) { - tile = sp_alloc_tile(tc); - tc->entries[pos] = tile; - } - - if (addr.value != tc->tile_addrs[pos].value) { - - assert(pt->resource); - if (tc->tile_addrs[pos].bits.invalid == 0) { - /* put dirty tile back in framebuffer */ - if (tc->depth_stencil) { - pipe_put_tile_raw(tc->pipe, pt, - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tile->data.depth32, 0/*STRIDE*/); - } - else { - if (util_format_is_pure_uint(tc->surface->format)) { - pipe_put_tile_ui_format(tc->pipe, pt, - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tc->surface->format, - (unsigned *) tile->data.colorui128); - } else if (util_format_is_pure_sint(tc->surface->format)) { - pipe_put_tile_i_format(tc->pipe, pt, - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tc->surface->format, - (int *) tile->data.colori128); - } else { - pipe_put_tile_rgba_format(tc->pipe, pt, - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tc->surface->format, - (float *) tile->data.color); - } - } - } - - tc->tile_addrs[pos] = addr; - - if (is_clear_flag_set(tc->clear_flags, addr)) { - /* don't get tile from framebuffer, just clear it */ - if (tc->depth_stencil) { - clear_tile(tile, pt->resource->format, tc->clear_val); - } - else { - clear_tile_rgba(tile, pt->resource->format, &tc->clear_color); - } - clear_clear_flag(tc->clear_flags, addr); - } - else { - /* get new tile data from transfer */ - if (tc->depth_stencil) { - pipe_get_tile_raw(tc->pipe, pt, - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tile->data.depth32, 0/*STRIDE*/); - } - else { - if (util_format_is_pure_uint(tc->surface->format)) { - pipe_get_tile_ui_format(tc->pipe, pt, - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tc->surface->format, - (unsigned *) tile->data.colorui128); - } else if (util_format_is_pure_sint(tc->surface->format)) { - pipe_get_tile_i_format(tc->pipe, pt, - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tc->surface->format, - (int *) tile->data.colori128); - } else { - pipe_get_tile_rgba_format(tc->pipe, pt, - tc->tile_addrs[pos].bits.x * TILE_SIZE, - tc->tile_addrs[pos].bits.y * TILE_SIZE, - TILE_SIZE, TILE_SIZE, - tc->surface->format, - (float *) tile->data.color); - } - } - } - } - - tc->last_tile = tile; - tc->last_tile_addr = addr; - return tile; -} - - - - - -/** - * When a whole surface is being cleared to a value we can avoid - * fetching tiles above. - * Save the color and set a 'clearflag' for each tile of the screen. - */ -void -sp_tile_cache_clear(struct softpipe_tile_cache *tc, - const union pipe_color_union *color, - uint64_t clearValue) -{ - uint pos; - - tc->clear_color = *color; - - tc->clear_val = clearValue; - - /* set flags to indicate all the tiles are cleared */ - memset(tc->clear_flags, 255, sizeof(tc->clear_flags)); - - for (pos = 0; pos < NUM_ENTRIES; pos++) { - tc->tile_addrs[pos].bits.invalid = 1; - } - tc->last_tile_addr.bits.invalid = 1; -} diff --git a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_tile_cache.h b/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_tile_cache.h deleted file mode 100644 index 775676b4bf5..00000000000 --- a/dll/opengl/mesa/src/gallium/drivers/softpipe/sp_tile_cache.h +++ /dev/null @@ -1,165 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef SP_TILE_CACHE_H -#define SP_TILE_CACHE_H - - -#include "pipe/p_compiler.h" -#include "sp_texture.h" - - -struct softpipe_tile_cache; - - -/** - * Cache tile size (width and height). This needs to be a power of two. - */ -#define TILE_SIZE_LOG2 6 -#define TILE_SIZE (1 << TILE_SIZE_LOG2) - - -#define TILE_ADDR_BITS (SP_MAX_TEXTURE_2D_LEVELS - 1 - TILE_SIZE_LOG2) - - -/** - * Surface tile address as a union for fast compares. - */ -union tile_address { - struct { - unsigned x:TILE_ADDR_BITS; /* 16K / TILE_SIZE */ - unsigned y:TILE_ADDR_BITS; /* 16K / TILE_SIZE */ - unsigned invalid:1; - unsigned pad:15; - } bits; - unsigned value; -}; - - -struct softpipe_cached_tile -{ - union { - float color[TILE_SIZE][TILE_SIZE][4]; - uint color32[TILE_SIZE][TILE_SIZE]; - uint depth32[TILE_SIZE][TILE_SIZE]; - ushort depth16[TILE_SIZE][TILE_SIZE]; - ubyte stencil8[TILE_SIZE][TILE_SIZE]; - uint colorui128[TILE_SIZE][TILE_SIZE][4]; - int colori128[TILE_SIZE][TILE_SIZE][4]; - uint64_t depth64[TILE_SIZE][TILE_SIZE]; - ubyte any[1]; - } data; -}; - -#define NUM_ENTRIES 50 - - -struct softpipe_tile_cache -{ - struct pipe_context *pipe; - struct pipe_surface *surface; /**< the surface we're caching */ - struct pipe_transfer *transfer; - void *transfer_map; - - union tile_address tile_addrs[NUM_ENTRIES]; - struct softpipe_cached_tile *entries[NUM_ENTRIES]; - uint clear_flags[(MAX_WIDTH / TILE_SIZE) * (MAX_HEIGHT / TILE_SIZE) / 32]; - union pipe_color_union clear_color; /**< for color bufs */ - uint64_t clear_val; /**< for z+stencil */ - boolean depth_stencil; /**< Is the surface a depth/stencil format? */ - - struct softpipe_cached_tile *tile; /**< scratch tile for clears */ - - union tile_address last_tile_addr; - struct softpipe_cached_tile *last_tile; /**< most recently retrieved tile */ -}; - - -extern struct softpipe_tile_cache * -sp_create_tile_cache( struct pipe_context *pipe ); - -extern void -sp_destroy_tile_cache(struct softpipe_tile_cache *tc); - -extern void -sp_tile_cache_set_surface(struct softpipe_tile_cache *tc, - struct pipe_surface *sps); - -extern struct pipe_surface * -sp_tile_cache_get_surface(struct softpipe_tile_cache *tc); - -extern void -sp_tile_cache_map_transfers(struct softpipe_tile_cache *tc); - -extern void -sp_tile_cache_unmap_transfers(struct softpipe_tile_cache *tc); - -extern void -sp_flush_tile_cache(struct softpipe_tile_cache *tc); - -extern void -sp_tile_cache_clear(struct softpipe_tile_cache *tc, - const union pipe_color_union *color, - uint64_t clearValue); - -extern struct softpipe_cached_tile * -sp_find_cached_tile(struct softpipe_tile_cache *tc, - union tile_address addr ); - - -static INLINE union tile_address -tile_address( unsigned x, - unsigned y ) -{ - union tile_address addr; - - addr.value = 0; - addr.bits.x = x / TILE_SIZE; - addr.bits.y = y / TILE_SIZE; - - return addr; -} - -/* Quickly retrieve tile if it matches last lookup. - */ -static INLINE struct softpipe_cached_tile * -sp_get_cached_tile(struct softpipe_tile_cache *tc, - int x, int y ) -{ - union tile_address addr = tile_address( x, y ); - - if (tc->last_tile_addr.value == addr.value) - return tc->last_tile; - - return sp_find_cached_tile( tc, addr ); -} - - - - -#endif /* SP_TILE_CACHE_H */ - diff --git a/dll/opengl/mesa/src/gallium/include/pipe/p_compiler.h b/dll/opengl/mesa/src/gallium/include/pipe/p_compiler.h deleted file mode 100644 index 1daa5abdb85..00000000000 --- a/dll/opengl/mesa/src/gallium/include/pipe/p_compiler.h +++ /dev/null @@ -1,327 +0,0 @@ -/************************************************************************** - * - * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef P_COMPILER_H -#define P_COMPILER_H - - -#include "p_config.h" - -#include -#include -#include -#include -#include - - -#if defined(_WIN32) && !defined(__WIN32__) -#define __WIN32__ -#endif - -#if defined(_MSC_VER) - -/* Avoid 'expression is always true' warning */ -#pragma warning(disable: 4296) - -#endif /* _MSC_VER */ - - -/* - * Alternative stdint.h and stdbool.h headers are supplied in include/c99 for - * systems that lack it. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif -#include -#include - - -#ifdef __cplusplus -extern "C" { -#endif - - -#if !defined(__HAIKU__) && !defined(__USE_MISC) -#if !defined(PIPE_OS_ANDROID) -typedef unsigned int uint; -#endif -typedef unsigned short ushort; -#endif -typedef unsigned char ubyte; - -typedef unsigned char boolean; -#ifndef TRUE -#define TRUE true -#endif -#ifndef FALSE -#define FALSE false -#endif - -#ifndef va_copy -#ifdef __va_copy -#define va_copy(dest, src) __va_copy((dest), (src)) -#else -#define va_copy(dest, src) (dest) = (src) -#endif -#endif - -/* Function inlining */ -#ifndef inline -# ifdef __cplusplus - /* C++ supports inline keyword */ -# elif defined(__GNUC__) -# define inline __inline__ -# elif defined(_MSC_VER) -# define inline __inline -# elif defined(__ICL) -# define inline __inline -# elif defined(__INTEL_COMPILER) - /* Intel compiler supports inline keyword */ -# elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100) -# define inline __inline -# elif defined(__SUNPRO_C) && defined(__C99FEATURES__) - /* C99 supports inline keyword */ -# elif (__STDC_VERSION__ >= 199901L) - /* C99 supports inline keyword */ -# else -# define inline -# endif -#endif -#ifndef INLINE -# define INLINE inline -#endif - -/* Forced function inlining */ -#ifndef ALWAYS_INLINE -# ifdef __GNUC__ -# define ALWAYS_INLINE inline __attribute__((always_inline)) -# elif defined(_MSC_VER) -# define ALWAYS_INLINE __forceinline -# else -# define ALWAYS_INLINE INLINE -# endif -#endif - -/* - * Define the C99 restrict keyword. - * - * See also: - * - http://cellperformance.beyond3d.com/articles/2006/05/demystifying-the-restrict-keyword.html - */ -#ifndef restrict -# if (__STDC_VERSION__ >= 199901L) - /* C99 */ -# elif defined(__SUNPRO_C) && defined(__C99FEATURES__) - /* C99 */ -# elif defined(__GNUC__) -# define restrict __restrict__ -# elif defined(_MSC_VER) -# define restrict __restrict -# else -# define restrict /* */ -# endif -#endif - - -/* Function visibility */ -#ifndef PUBLIC -# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) -# define PUBLIC __attribute__((visibility("default"))) -# elif defined(_MSC_VER) -# define PUBLIC __declspec(dllexport) -# else -# define PUBLIC -# endif -#endif - - -/* The __FUNCTION__ gcc variable is generally only used for debugging. - * If we're not using gcc, define __FUNCTION__ as a cpp symbol here. - */ -#ifndef __FUNCTION__ -# if !defined(__GNUC__) -# if (__STDC_VERSION__ >= 199901L) /* C99 */ || \ - (defined(__SUNPRO_C) && defined(__C99FEATURES__)) -# define __FUNCTION__ __func__ -# else -# define __FUNCTION__ "" -# endif -# endif -# if defined(_MSC_VER) && _MSC_VER < 1300 -# define __FUNCTION__ "" -# endif -#endif -#ifndef __func__ -# if (__STDC_VERSION__ >= 199901L) || \ - (defined(__SUNPRO_C) && defined(__C99FEATURES__)) - /* __func__ is part of C99 */ -# elif defined(_MSC_VER) -# if _MSC_VER >= 1300 -# define __func__ __FUNCTION__ -# else -# define __func__ "" -# endif -# endif -#endif - - - -/* This should match linux gcc cdecl semantics everywhere, so that we - * just codegen one calling convention on all platforms. - */ -#ifdef _MSC_VER -#define PIPE_CDECL __cdecl -#else -#define PIPE_CDECL -#endif - - - -#if defined(__GNUC__) -#define PIPE_DEPRECATED __attribute__((__deprecated__)) -#else -#define PIPE_DEPRECATED -#endif - - - -/* Macros for data alignment. */ -#if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) - -/* See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Type-Attributes.html */ -#define PIPE_ALIGN_TYPE(_alignment, _type) _type __attribute__((aligned(_alignment))) - -/* See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Variable-Attributes.html */ -#define PIPE_ALIGN_VAR(_alignment) __attribute__((aligned(_alignment))) - -#if (__GNUC__ > 4 || (__GNUC__ == 4 &&__GNUC_MINOR__>1)) && !defined(PIPE_ARCH_X86_64) -#define PIPE_ALIGN_STACK __attribute__((force_align_arg_pointer)) -#else -#define PIPE_ALIGN_STACK -#endif - -#elif defined(_MSC_VER) - -/* See http://msdn.microsoft.com/en-us/library/83ythb65.aspx */ -#define PIPE_ALIGN_TYPE(_alignment, _type) __declspec(align(_alignment)) _type -#define PIPE_ALIGN_VAR(_alignment) __declspec(align(_alignment)) - -#define PIPE_ALIGN_STACK - -#elif defined(SWIG) - -#define PIPE_ALIGN_TYPE(_alignment, _type) _type -#define PIPE_ALIGN_VAR(_alignment) - -#define PIPE_ALIGN_STACK - -#else - -#error "Unsupported compiler" - -#endif - - -#if defined(__GNUC__) - -#define PIPE_READ_WRITE_BARRIER() __asm__("":::"memory") - -#elif defined(_MSC_VER) - -void _ReadWriteBarrier(void); -#pragma intrinsic(_ReadWriteBarrier) -#define PIPE_READ_WRITE_BARRIER() _ReadWriteBarrier() - -#else - -#warning "Unsupported compiler" -#define PIPE_READ_WRITE_BARRIER() /* */ - -#endif - - -/* You should use these macros to mark if blocks where the if condition - * is either likely to be true, or unlikely to be true. - * - * This will inform human readers of this fact, and will also inform - * the compiler, who will in turn inform the CPU. - * - * CPUs often start executing code inside the if or the else blocks - * without knowing whether the condition is true or not, and will have - * to throw the work away if they find out later they executed the - * wrong part of the if. - * - * If these macros are used, the CPU is more likely to correctly predict - * the right path, and will avoid speculatively executing the wrong branch, - * thus not throwing away work, resulting in better performance. - * - * In light of this, it is also a good idea to mark as "likely" a path - * which is not necessarily always more likely, but that will benefit much - * more from performance improvements since it is already much faster than - * the other path, or viceversa with "unlikely". - * - * Example usage: - * if(unlikely(do_we_need_a_software_fallback())) - * do_software_fallback(); - * else - * render_with_gpu(); - * - * The macros follow the Linux kernel convention, and more examples can - * be found there. - * - * Note that profile guided optimization can offer better results, but - * needs an appropriate coverage suite and does not inform human readers. - */ -#ifndef likely -# if defined(__GNUC__) -# define likely(x) __builtin_expect(!!(x), 1) -# define unlikely(x) __builtin_expect(!!(x), 0) -# else -# define likely(x) (x) -# define unlikely(x) (x) -# endif -#endif - - -/** - * Static (compile-time) assertion. - * Basically, use COND to dimension an array. If COND is false/zero the - * array size will be -1 and we'll get a compilation error. - */ -#define STATIC_ASSERT(COND) \ - do { \ - typedef int static_assertion_failed[(!!(COND))*2-1]; \ - } while (0) - - -#if defined(__cplusplus) -} -#endif - - -#endif /* P_COMPILER_H */ diff --git a/dll/opengl/mesa/src/gallium/include/pipe/p_config.h b/dll/opengl/mesa/src/gallium/include/pipe/p_config.h deleted file mode 100644 index d63eccdc447..00000000000 --- a/dll/opengl/mesa/src/gallium/include/pipe/p_config.h +++ /dev/null @@ -1,240 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Gallium configuration defines. - * - * This header file sets several defines based on the compiler, processor - * architecture, and operating system being used. These defines should be used - * throughout the code to facilitate porting to new platforms. It is likely that - * this file is auto-generated by an autoconf-like tool at some point, as some - * things cannot be determined by pre-defined environment alone. - * - * See also: - * - http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html - * - echo | gcc -dM -E - | sort - * - http://msdn.microsoft.com/en-us/library/b0084kay.aspx - * - * @author José Fonseca - */ - -#ifndef P_CONFIG_H_ -#define P_CONFIG_H_ - -#include -/* - * Compiler - */ - -#if defined(__GNUC__) -#define PIPE_CC_GCC -#define PIPE_CC_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__) -#endif - -/* - * Meaning of _MSC_VER value: - * - 1400: Visual C++ 2005 - * - 1310: Visual C++ .NET 2003 - * - 1300: Visual C++ .NET 2002 - * - * __MSC__ seems to be an old macro -- it is not pre-defined on recent MSVC - * versions. - */ -#if defined(_MSC_VER) || defined(__MSC__) -#define PIPE_CC_MSVC -#endif - -#if defined(__ICL) -#define PIPE_CC_ICL -#endif - - -/* - * Processor architecture - */ - -#if defined(__i386__) /* gcc */ || defined(_M_IX86) /* msvc */ || defined(_X86_) || defined(__386__) || defined(i386) || defined(__i386) /* Sun cc */ -#define PIPE_ARCH_X86 -#endif - -#if defined(__x86_64__) /* gcc */ || defined(_M_X64) /* msvc */ || defined(_M_AMD64) /* msvc */ || defined(__x86_64) /* Sun cc */ -#define PIPE_ARCH_X86_64 -#endif - -#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) -#if defined(PIPE_CC_GCC) && !defined(__SSE2__) -/* #warning SSE2 support requires -msse -msse2 compiler options */ -#else -#define PIPE_ARCH_SSE -#endif -#if defined(PIPE_CC_GCC) && !defined(__SSSE3__) -/* #warning SSE3 support requires -msse3 compiler options */ -#else -#define PIPE_ARCH_SSSE3 -#endif -#endif - -#if defined(__ppc__) || defined(__ppc64__) || defined(__PPC__) -#define PIPE_ARCH_PPC -#if defined(__ppc64__) || defined(__PPC64__) -#define PIPE_ARCH_PPC_64 -#endif -#endif - - -/* - * Endian detection. - */ - -#ifdef __GLIBC__ -#include - -#if __BYTE_ORDER == __LITTLE_ENDIAN -# define PIPE_ARCH_LITTLE_ENDIAN -#elif __BYTE_ORDER == __BIG_ENDIAN -# define PIPE_ARCH_BIG_ENDIAN -#endif - -#elif defined(__APPLE__) -#include - -#if __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN -# define PIPE_ARCH_LITTLE_ENDIAN -#elif __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN -# define PIPE_ARCH_BIG_ENDIAN -#endif - -#elif defined(__sun) -#include - -#if defined(_LITTLE_ENDIAN) -# define PIPE_ARCH_LITTLE_ENDIAN -#elif defined(_BIG_ENDIAN) -# define PIPE_ARCH_BIG_ENDIAN -#endif - -#else - -#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) -#define PIPE_ARCH_LITTLE_ENDIAN -#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) -#define PIPE_ARCH_BIG_ENDIAN -#endif - -#endif - -#if !defined(PIPE_ARCH_LITTLE_ENDIAN) && !defined(PIPE_ARCH_BIG_ENDIAN) -#error Unknown Endianness -#endif - -/* - * Auto-detect the operating system family. - * - * See subsystem below for a more fine-grained distinction. - */ - -#if defined(__linux__) -#define PIPE_OS_LINUX -#define PIPE_OS_UNIX -#endif - -/* - * Android defines __linux__ so PIPE_OS_LINUX and PIPE_OS_UNIX will also be - * defined. - */ -#if defined(ANDROID) -#define PIPE_OS_ANDROID -#endif - -#if defined(__FreeBSD__) -#define PIPE_OS_FREEBSD -#define PIPE_OS_BSD -#define PIPE_OS_UNIX -#endif - -#if defined(__OpenBSD__) -#define PIPE_OS_OPENBSD -#define PIPE_OS_BSD -#define PIPE_OS_UNIX -#endif - -#if defined(__NetBSD__) -#define PIPE_OS_NETBSD -#define PIPE_OS_BSD -#define PIPE_OS_UNIX -#endif - -#if defined(__GNU__) -#define PIPE_OS_HURD -#define PIPE_OS_UNIX -#endif - -#if defined(__sun) -#define PIPE_OS_SOLARIS -#define PIPE_OS_UNIX -#endif - -#if defined(__APPLE__) -#define PIPE_OS_APPLE -#define PIPE_OS_UNIX -#endif - -#if defined(_WIN32) || defined(WIN32) -#define PIPE_OS_WINDOWS -#endif - -#if defined(__HAIKU__) -#define PIPE_OS_HAIKU -#define PIPE_OS_UNIX -#endif - -#if defined(__CYGWIN__) -#define PIPE_OS_CYGWIN -#define PIPE_OS_UNIX -#endif - -/* - * Try to auto-detect the subsystem. - * - * NOTE: There is no way to auto-detect most of these. - */ - -#if defined(PIPE_OS_LINUX) || defined(PIPE_OS_BSD) || defined(PIPE_OS_SOLARIS) -#define PIPE_SUBSYSTEM_DRI -#endif /* PIPE_OS_LINUX || PIPE_OS_BSD || PIPE_OS_SOLARIS */ - -#if defined(PIPE_OS_WINDOWS) -#if defined(PIPE_SUBSYSTEM_WINDOWS_USER) -/* Windows User-space Library */ -#else -#define PIPE_SUBSYSTEM_WINDOWS_USER -#endif -#endif /* PIPE_OS_WINDOWS */ - - -#endif /* P_CONFIG_H_ */ diff --git a/dll/opengl/mesa/src/gallium/include/pipe/p_context.h b/dll/opengl/mesa/src/gallium/include/pipe/p_context.h deleted file mode 100644 index f7ee52298a8..00000000000 --- a/dll/opengl/mesa/src/gallium/include/pipe/p_context.h +++ /dev/null @@ -1,430 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef PIPE_CONTEXT_H -#define PIPE_CONTEXT_H - -#include "p_compiler.h" -#include "p_format.h" -#include "p_video_enums.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -struct pipe_blend_color; -struct pipe_blend_state; -struct pipe_box; -struct pipe_clip_state; -struct pipe_depth_stencil_alpha_state; -struct pipe_draw_info; -struct pipe_fence_handle; -struct pipe_framebuffer_state; -struct pipe_index_buffer; -struct pipe_query; -struct pipe_poly_stipple; -struct pipe_rasterizer_state; -struct pipe_resolve_info; -struct pipe_resource; -struct pipe_sampler_state; -struct pipe_sampler_view; -struct pipe_scissor_state; -struct pipe_shader_state; -struct pipe_stencil_ref; -struct pipe_stream_output_target; -struct pipe_surface; -struct pipe_vertex_buffer; -struct pipe_vertex_element; -struct pipe_video_buffer; -struct pipe_video_decoder; -struct pipe_viewport_state; -union pipe_color_union; - -/** - * Gallium rendering context. Basically: - * - state setting functions - * - VBO drawing functions - * - surface functions - */ -struct pipe_context { - struct pipe_winsys *winsys; - struct pipe_screen *screen; - - void *priv; /**< context private data (for DRI for example) */ - void *draw; /**< private, for draw module (temporary?) */ - - void (*destroy)( struct pipe_context * ); - - /** - * VBO drawing - */ - /*@{*/ - void (*draw_vbo)( struct pipe_context *pipe, - const struct pipe_draw_info *info ); - /*@}*/ - - /** - * Predicate subsequent rendering on occlusion query result - * \param query the query predicate, or NULL if no predicate - * \param mode one of PIPE_RENDER_COND_x - */ - void (*render_condition)( struct pipe_context *pipe, - struct pipe_query *query, - uint mode ); - - /** - * Query objects - */ - /*@{*/ - struct pipe_query *(*create_query)( struct pipe_context *pipe, - unsigned query_type ); - - void (*destroy_query)(struct pipe_context *pipe, - struct pipe_query *q); - - void (*begin_query)(struct pipe_context *pipe, struct pipe_query *q); - void (*end_query)(struct pipe_context *pipe, struct pipe_query *q); - - /** - * Get results of a query. - * \param wait if true, this query will block until the result is ready - * \return TRUE if results are ready, FALSE otherwise - */ - boolean (*get_query_result)(struct pipe_context *pipe, - struct pipe_query *q, - boolean wait, - void *result); - /*@}*/ - - /** - * State functions (create/bind/destroy state objects) - */ - /*@{*/ - void * (*create_blend_state)(struct pipe_context *, - const struct pipe_blend_state *); - void (*bind_blend_state)(struct pipe_context *, void *); - void (*delete_blend_state)(struct pipe_context *, void *); - - void * (*create_sampler_state)(struct pipe_context *, - const struct pipe_sampler_state *); - void (*bind_fragment_sampler_states)(struct pipe_context *, - unsigned num_samplers, - void **samplers); - void (*bind_vertex_sampler_states)(struct pipe_context *, - unsigned num_samplers, - void **samplers); - void (*bind_geometry_sampler_states)(struct pipe_context *, - unsigned num_samplers, - void **samplers); - void (*delete_sampler_state)(struct pipe_context *, void *); - - void * (*create_rasterizer_state)(struct pipe_context *, - const struct pipe_rasterizer_state *); - void (*bind_rasterizer_state)(struct pipe_context *, void *); - void (*delete_rasterizer_state)(struct pipe_context *, void *); - - void * (*create_depth_stencil_alpha_state)(struct pipe_context *, - const struct pipe_depth_stencil_alpha_state *); - void (*bind_depth_stencil_alpha_state)(struct pipe_context *, void *); - void (*delete_depth_stencil_alpha_state)(struct pipe_context *, void *); - - void * (*create_fs_state)(struct pipe_context *, - const struct pipe_shader_state *); - void (*bind_fs_state)(struct pipe_context *, void *); - void (*delete_fs_state)(struct pipe_context *, void *); - - void * (*create_vs_state)(struct pipe_context *, - const struct pipe_shader_state *); - void (*bind_vs_state)(struct pipe_context *, void *); - void (*delete_vs_state)(struct pipe_context *, void *); - - void * (*create_gs_state)(struct pipe_context *, - const struct pipe_shader_state *); - void (*bind_gs_state)(struct pipe_context *, void *); - void (*delete_gs_state)(struct pipe_context *, void *); - - void * (*create_vertex_elements_state)(struct pipe_context *, - unsigned num_elements, - const struct pipe_vertex_element *); - void (*bind_vertex_elements_state)(struct pipe_context *, void *); - void (*delete_vertex_elements_state)(struct pipe_context *, void *); - - /*@}*/ - - /** - * Parameter-like state (or properties) - */ - /*@{*/ - void (*set_blend_color)( struct pipe_context *, - const struct pipe_blend_color * ); - - void (*set_stencil_ref)( struct pipe_context *, - const struct pipe_stencil_ref * ); - - void (*set_sample_mask)( struct pipe_context *, - unsigned sample_mask ); - - void (*set_clip_state)( struct pipe_context *, - const struct pipe_clip_state * ); - - void (*set_constant_buffer)( struct pipe_context *, - uint shader, uint index, - struct pipe_resource *buf ); - - void (*set_framebuffer_state)( struct pipe_context *, - const struct pipe_framebuffer_state * ); - - void (*set_polygon_stipple)( struct pipe_context *, - const struct pipe_poly_stipple * ); - - void (*set_scissor_state)( struct pipe_context *, - const struct pipe_scissor_state * ); - - void (*set_viewport_state)( struct pipe_context *, - const struct pipe_viewport_state * ); - - void (*set_fragment_sampler_views)(struct pipe_context *, - unsigned num_views, - struct pipe_sampler_view **); - - void (*set_vertex_sampler_views)(struct pipe_context *, - unsigned num_views, - struct pipe_sampler_view **); - - void (*set_geometry_sampler_views)(struct pipe_context *, - unsigned num_views, - struct pipe_sampler_view **); - - void (*set_vertex_buffers)( struct pipe_context *, - unsigned num_buffers, - const struct pipe_vertex_buffer * ); - - void (*set_index_buffer)( struct pipe_context *pipe, - const struct pipe_index_buffer * ); - - /*@}*/ - - /** - * Stream output functions. - */ - /*@{*/ - - struct pipe_stream_output_target *(*create_stream_output_target)( - struct pipe_context *, - struct pipe_resource *, - unsigned buffer_offset, - unsigned buffer_size); - - void (*stream_output_target_destroy)(struct pipe_context *, - struct pipe_stream_output_target *); - - void (*set_stream_output_targets)(struct pipe_context *, - unsigned num_targets, - struct pipe_stream_output_target **targets, - unsigned append_bitmask); - - /*@}*/ - - - /** - * Resource functions for blit-like functionality - * - * If a driver supports multisampling, resource_resolve must be available. - */ - /*@{*/ - - /** - * Copy a block of pixels from one resource to another. - * The resource must be of the same format. - * Resources with nr_samples > 1 are not allowed. - */ - void (*resource_copy_region)(struct pipe_context *pipe, - struct pipe_resource *dst, - unsigned dst_level, - unsigned dstx, unsigned dsty, unsigned dstz, - struct pipe_resource *src, - unsigned src_level, - const struct pipe_box *src_box); - - /** - * Resolve a multisampled resource into a non-multisampled one. - * Source and destination must be of the same format. - */ - void (*resource_resolve)(struct pipe_context *pipe, - const struct pipe_resolve_info *info); - - /*@}*/ - - /** - * Clear the specified set of currently bound buffers to specified values. - * The entire buffers are cleared (no scissor, no colormask, etc). - * - * \param buffers bitfield of PIPE_CLEAR_* values. - * \param color pointer to a union of fiu array for each of r, g, b, a. - * \param depth depth clear value in [0,1]. - * \param stencil stencil clear value - */ - void (*clear)(struct pipe_context *pipe, - unsigned buffers, - const union pipe_color_union *color, - double depth, - unsigned stencil); - - /** - * Clear a color rendertarget surface. - * \param color pointer to an union of fiu array for each of r, g, b, a. - */ - void (*clear_render_target)(struct pipe_context *pipe, - struct pipe_surface *dst, - const union pipe_color_union *color, - unsigned dstx, unsigned dsty, - unsigned width, unsigned height); - - /** - * Clear a depth-stencil surface. - * \param clear_flags bitfield of PIPE_CLEAR_DEPTH/STENCIL values. - * \param depth depth clear value in [0,1]. - * \param stencil stencil clear value - */ - void (*clear_depth_stencil)(struct pipe_context *pipe, - struct pipe_surface *dst, - unsigned clear_flags, - double depth, - unsigned stencil, - unsigned dstx, unsigned dsty, - unsigned width, unsigned height); - - /** Flush draw commands - */ - void (*flush)( struct pipe_context *pipe, - struct pipe_fence_handle **fence ); - - /** - * Create a view on a texture to be used by a shader stage. - */ - struct pipe_sampler_view * (*create_sampler_view)(struct pipe_context *ctx, - struct pipe_resource *texture, - const struct pipe_sampler_view *templat); - - void (*sampler_view_destroy)(struct pipe_context *ctx, - struct pipe_sampler_view *view); - - - /** - * Get a surface which is a "view" into a resource, used by - * render target / depth stencil stages. - * \param usage bitmaks of PIPE_BIND_* flags - */ - struct pipe_surface *(*create_surface)(struct pipe_context *ctx, - struct pipe_resource *resource, - const struct pipe_surface *templat); - - void (*surface_destroy)(struct pipe_context *ctx, - struct pipe_surface *); - - /** - * Get a transfer object for transferring data to/from a texture. - * - * Transfers are (by default) context-private and allow uploads to be - * interleaved with - */ - struct pipe_transfer *(*get_transfer)(struct pipe_context *, - struct pipe_resource *resource, - unsigned level, - unsigned usage, /* a combination of PIPE_TRANSFER_x */ - const struct pipe_box *); - - void (*transfer_destroy)(struct pipe_context *, - struct pipe_transfer *); - - void *(*transfer_map)( struct pipe_context *, - struct pipe_transfer *transfer ); - - /* If transfer was created with WRITE|FLUSH_EXPLICIT, only the - * regions specified with this call are guaranteed to be written to - * the resource. - */ - void (*transfer_flush_region)( struct pipe_context *, - struct pipe_transfer *transfer, - const struct pipe_box *); - - void (*transfer_unmap)( struct pipe_context *, - struct pipe_transfer *transfer ); - - - /* One-shot transfer operation with data supplied in a user - * pointer. XXX: strides?? - */ - void (*transfer_inline_write)( struct pipe_context *, - struct pipe_resource *, - unsigned level, - unsigned usage, /* a combination of PIPE_TRANSFER_x */ - const struct pipe_box *, - const void *data, - unsigned stride, - unsigned layer_stride); - - - /* Notify a driver that a content of a user buffer has been changed. - * The changed range is [offset, offset+size-1]. - * The new width0 of the buffer is offset+size. */ - void (*redefine_user_buffer)(struct pipe_context *, - struct pipe_resource *, - unsigned offset, - unsigned size); - - /** - * Flush any pending framebuffer writes and invalidate texture caches. - */ - void (*texture_barrier)(struct pipe_context *); - - /** - * Creates a video decoder for a specific video codec/profile - */ - struct pipe_video_decoder *(*create_video_decoder)( struct pipe_context *context, - enum pipe_video_profile profile, - enum pipe_video_entrypoint entrypoint, - enum pipe_video_chroma_format chroma_format, - unsigned width, unsigned height, unsigned max_references, - bool expect_chunked_decode); - - /** - * Creates a video buffer as decoding target - */ - struct pipe_video_buffer *(*create_video_buffer)( struct pipe_context *context, - enum pipe_format buffer_format, - enum pipe_video_chroma_format chroma_format, - unsigned width, unsigned height ); -}; - - -#ifdef __cplusplus -} -#endif - -#endif /* PIPE_CONTEXT_H */ diff --git a/dll/opengl/mesa/src/gallium/include/pipe/p_defines.h b/dll/opengl/mesa/src/gallium/include/pipe/p_defines.h deleted file mode 100644 index 4425fc9f946..00000000000 --- a/dll/opengl/mesa/src/gallium/include/pipe/p_defines.h +++ /dev/null @@ -1,561 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef PIPE_DEFINES_H -#define PIPE_DEFINES_H - -#include "p_compiler.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Gallium error codes. - * - * - A zero value always means success. - * - A negative value always means failure. - * - The meaning of a positive value is function dependent. - */ -enum pipe_error { - PIPE_OK = 0, - PIPE_ERROR = -1, /**< Generic error */ - PIPE_ERROR_BAD_INPUT = -2, - PIPE_ERROR_OUT_OF_MEMORY = -3, - PIPE_ERROR_RETRY = -4 - /* TODO */ -}; - - -#define PIPE_BLENDFACTOR_ONE 0x1 -#define PIPE_BLENDFACTOR_SRC_COLOR 0x2 -#define PIPE_BLENDFACTOR_SRC_ALPHA 0x3 -#define PIPE_BLENDFACTOR_DST_ALPHA 0x4 -#define PIPE_BLENDFACTOR_DST_COLOR 0x5 -#define PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE 0x6 -#define PIPE_BLENDFACTOR_CONST_COLOR 0x7 -#define PIPE_BLENDFACTOR_CONST_ALPHA 0x8 -#define PIPE_BLENDFACTOR_SRC1_COLOR 0x9 -#define PIPE_BLENDFACTOR_SRC1_ALPHA 0x0A -#define PIPE_BLENDFACTOR_ZERO 0x11 -#define PIPE_BLENDFACTOR_INV_SRC_COLOR 0x12 -#define PIPE_BLENDFACTOR_INV_SRC_ALPHA 0x13 -#define PIPE_BLENDFACTOR_INV_DST_ALPHA 0x14 -#define PIPE_BLENDFACTOR_INV_DST_COLOR 0x15 -#define PIPE_BLENDFACTOR_INV_CONST_COLOR 0x17 -#define PIPE_BLENDFACTOR_INV_CONST_ALPHA 0x18 -#define PIPE_BLENDFACTOR_INV_SRC1_COLOR 0x19 -#define PIPE_BLENDFACTOR_INV_SRC1_ALPHA 0x1A - -#define PIPE_BLEND_ADD 0 -#define PIPE_BLEND_SUBTRACT 1 -#define PIPE_BLEND_REVERSE_SUBTRACT 2 -#define PIPE_BLEND_MIN 3 -#define PIPE_BLEND_MAX 4 - -#define PIPE_LOGICOP_CLEAR 0 -#define PIPE_LOGICOP_NOR 1 -#define PIPE_LOGICOP_AND_INVERTED 2 -#define PIPE_LOGICOP_COPY_INVERTED 3 -#define PIPE_LOGICOP_AND_REVERSE 4 -#define PIPE_LOGICOP_INVERT 5 -#define PIPE_LOGICOP_XOR 6 -#define PIPE_LOGICOP_NAND 7 -#define PIPE_LOGICOP_AND 8 -#define PIPE_LOGICOP_EQUIV 9 -#define PIPE_LOGICOP_NOOP 10 -#define PIPE_LOGICOP_OR_INVERTED 11 -#define PIPE_LOGICOP_COPY 12 -#define PIPE_LOGICOP_OR_REVERSE 13 -#define PIPE_LOGICOP_OR 14 -#define PIPE_LOGICOP_SET 15 - -#define PIPE_MASK_R 0x1 -#define PIPE_MASK_G 0x2 -#define PIPE_MASK_B 0x4 -#define PIPE_MASK_A 0x8 -#define PIPE_MASK_RGBA 0xf -#define PIPE_MASK_Z 0x10 -#define PIPE_MASK_S 0x20 -#define PIPE_MASK_ZS 0x30 - - -/** - * Inequality functions. Used for depth test, stencil compare, alpha - * test, shadow compare, etc. - */ -#define PIPE_FUNC_NEVER 0 -#define PIPE_FUNC_LESS 1 -#define PIPE_FUNC_EQUAL 2 -#define PIPE_FUNC_LEQUAL 3 -#define PIPE_FUNC_GREATER 4 -#define PIPE_FUNC_NOTEQUAL 5 -#define PIPE_FUNC_GEQUAL 6 -#define PIPE_FUNC_ALWAYS 7 - -/** Polygon fill mode */ -#define PIPE_POLYGON_MODE_FILL 0 -#define PIPE_POLYGON_MODE_LINE 1 -#define PIPE_POLYGON_MODE_POINT 2 - -/** Polygon face specification, eg for culling */ -#define PIPE_FACE_NONE 0 -#define PIPE_FACE_FRONT 1 -#define PIPE_FACE_BACK 2 -#define PIPE_FACE_FRONT_AND_BACK (PIPE_FACE_FRONT | PIPE_FACE_BACK) - -/** Stencil ops */ -#define PIPE_STENCIL_OP_KEEP 0 -#define PIPE_STENCIL_OP_ZERO 1 -#define PIPE_STENCIL_OP_REPLACE 2 -#define PIPE_STENCIL_OP_INCR 3 -#define PIPE_STENCIL_OP_DECR 4 -#define PIPE_STENCIL_OP_INCR_WRAP 5 -#define PIPE_STENCIL_OP_DECR_WRAP 6 -#define PIPE_STENCIL_OP_INVERT 7 - -/** Texture types. - * See the documentation for info on PIPE_TEXTURE_RECT vs PIPE_TEXTURE_2D */ -enum pipe_texture_target { - PIPE_BUFFER = 0, - PIPE_TEXTURE_1D = 1, - PIPE_TEXTURE_2D = 2, - PIPE_TEXTURE_3D = 3, - PIPE_TEXTURE_CUBE = 4, - PIPE_TEXTURE_RECT = 5, - PIPE_TEXTURE_1D_ARRAY = 6, - PIPE_TEXTURE_2D_ARRAY = 7, - PIPE_MAX_TEXTURE_TYPES -}; - -#define PIPE_TEX_FACE_POS_X 0 -#define PIPE_TEX_FACE_NEG_X 1 -#define PIPE_TEX_FACE_POS_Y 2 -#define PIPE_TEX_FACE_NEG_Y 3 -#define PIPE_TEX_FACE_POS_Z 4 -#define PIPE_TEX_FACE_NEG_Z 5 -#define PIPE_TEX_FACE_MAX 6 - -#define PIPE_TEX_WRAP_REPEAT 0 -#define PIPE_TEX_WRAP_CLAMP 1 -#define PIPE_TEX_WRAP_CLAMP_TO_EDGE 2 -#define PIPE_TEX_WRAP_CLAMP_TO_BORDER 3 -#define PIPE_TEX_WRAP_MIRROR_REPEAT 4 -#define PIPE_TEX_WRAP_MIRROR_CLAMP 5 -#define PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE 6 -#define PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER 7 - -/* Between mipmaps, ie mipfilter - */ -#define PIPE_TEX_MIPFILTER_NEAREST 0 -#define PIPE_TEX_MIPFILTER_LINEAR 1 -#define PIPE_TEX_MIPFILTER_NONE 2 - -/* Within a mipmap, ie min/mag filter - */ -#define PIPE_TEX_FILTER_NEAREST 0 -#define PIPE_TEX_FILTER_LINEAR 1 - -#define PIPE_TEX_COMPARE_NONE 0 -#define PIPE_TEX_COMPARE_R_TO_TEXTURE 1 - -/** - * Clear buffer bits - */ -/** All color buffers currently bound */ -#define PIPE_CLEAR_COLOR (1 << 0) -#define PIPE_CLEAR_DEPTH (1 << 1) -#define PIPE_CLEAR_STENCIL (1 << 2) -/** Depth/stencil combined */ -#define PIPE_CLEAR_DEPTHSTENCIL (PIPE_CLEAR_DEPTH | PIPE_CLEAR_STENCIL) - -/** - * Transfer object usage flags - */ -enum pipe_transfer_usage { - /** - * Resource contents read back (or accessed directly) at transfer - * create time. - */ - PIPE_TRANSFER_READ = (1 << 0), - - /** - * Resource contents will be written back at transfer_destroy - * time (or modified as a result of being accessed directly). - */ - PIPE_TRANSFER_WRITE = (1 << 1), - - /** - * Read/modify/write - */ - PIPE_TRANSFER_READ_WRITE = PIPE_TRANSFER_READ | PIPE_TRANSFER_WRITE, - - /** - * The transfer should map the texture storage directly. The driver may - * return NULL if that isn't possible, and the state tracker needs to cope - * with that and use an alternative path without this flag. - * - * E.g. the state tracker could have a simpler path which maps textures and - * does read/modify/write cycles on them directly, and a more complicated - * path which uses minimal read and write transfers. - */ - PIPE_TRANSFER_MAP_DIRECTLY = (1 << 2), - - /** - * The transfer should map the resource storage directly and the GPU should - * be able to see what the CPU has written. Such a storage may stay mapped - * while issuing draw commands which use it. The only allowed usage is - * non-overlapping writes which are suballocated out of a big buffer. - * The minimum allowed alignment of suballocations is 256 bytes (this is - * a subject to change). - * The flag is intended to be used to avoid mapping and unmapping - * resources repeatedly when doing uploads and draws intermixed. - * - * The driver may return NULL if that isn't possible, and the state - * tracker needs to cope with that and use an alternative path - * without this flag. - */ - PIPE_TRANSFER_MAP_PERMANENTLY = (1 << 3), - - /** - * Discards the memory within the mapped region. - * - * It should not be used with PIPE_TRANSFER_READ. - * - * See also: - * - OpenGL's ARB_map_buffer_range extension, MAP_INVALIDATE_RANGE_BIT flag. - */ - PIPE_TRANSFER_DISCARD_RANGE = (1 << 8), - - /** - * Fail if the resource cannot be mapped immediately. - * - * See also: - * - Direct3D's D3DLOCK_DONOTWAIT flag. - * - Mesa3D's MESA_MAP_NOWAIT_BIT flag. - * - WDDM's D3DDDICB_LOCKFLAGS.DonotWait flag. - */ - PIPE_TRANSFER_DONTBLOCK = (1 << 9), - - /** - * Do not attempt to synchronize pending operations on the resource when mapping. - * - * It should not be used with PIPE_TRANSFER_READ. - * - * See also: - * - OpenGL's ARB_map_buffer_range extension, MAP_UNSYNCHRONIZED_BIT flag. - * - Direct3D's D3DLOCK_NOOVERWRITE flag. - * - WDDM's D3DDDICB_LOCKFLAGS.IgnoreSync flag. - */ - PIPE_TRANSFER_UNSYNCHRONIZED = (1 << 10), - PIPE_TRANSFER_NOOVERWRITE = (1 << 10), /* are these really the same?? */ - - /** - * Written ranges will be notified later with - * pipe_context::transfer_flush_region. - * - * It should not be used with PIPE_TRANSFER_READ. - * - * See also: - * - pipe_context::transfer_flush_region - * - OpenGL's ARB_map_buffer_range extension, MAP_FLUSH_EXPLICIT_BIT flag. - */ - PIPE_TRANSFER_FLUSH_EXPLICIT = (1 << 11), - - /** - * Discards all memory backing the resource. - * - * It should not be used with PIPE_TRANSFER_READ. - * - * This is equivalent to: - * - OpenGL's ARB_map_buffer_range extension, MAP_INVALIDATE_BUFFER_BIT - * - BufferData(NULL) on a GL buffer - * - Direct3D's D3DLOCK_DISCARD flag. - * - WDDM's D3DDDICB_LOCKFLAGS.Discard flag. - * - D3D10 DDI's D3D10_DDI_MAP_WRITE_DISCARD flag - * - D3D10's D3D10_MAP_WRITE_DISCARD flag. - */ - PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE = (1 << 12) - -}; - - -/* - * Resource binding flags -- state tracker must specify in advance all - * the ways a resource might be used. - */ -#define PIPE_BIND_DEPTH_STENCIL (1 << 0) /* create_surface */ -#define PIPE_BIND_RENDER_TARGET (1 << 1) /* create_surface */ -#define PIPE_BIND_BLENDABLE (1 << 2) /* create_surface */ -#define PIPE_BIND_SAMPLER_VIEW (1 << 3) /* create_sampler_view */ -#define PIPE_BIND_VERTEX_BUFFER (1 << 4) /* set_vertex_buffers */ -#define PIPE_BIND_INDEX_BUFFER (1 << 5) /* draw_elements */ -#define PIPE_BIND_CONSTANT_BUFFER (1 << 6) /* set_constant_buffer */ -#define PIPE_BIND_DISPLAY_TARGET (1 << 8) /* flush_front_buffer */ -#define PIPE_BIND_TRANSFER_WRITE (1 << 9) /* get_transfer */ -#define PIPE_BIND_TRANSFER_READ (1 << 10) /* get_transfer */ -#define PIPE_BIND_STREAM_OUTPUT (1 << 11) /* set_stream_output_buffers */ -#define PIPE_BIND_CURSOR (1 << 16) /* mouse cursor */ -#define PIPE_BIND_CUSTOM (1 << 17) /* state-tracker/winsys usages */ - -/* The first two flags above were previously part of the amorphous - * TEXTURE_USAGE, most of which are now descriptions of the ways a - * particular texture can be bound to the gallium pipeline. The two flags - * below do not fit within that and probably need to be migrated to some - * other place. - * - * It seems like scanout is used by the Xorg state tracker to ask for - * a texture suitable for actual scanout (hence the name), which - * implies extra layout constraints on some hardware. It may also - * have some special meaning regarding mouse cursor images. - * - * The shared flag is quite underspecified, but certainly isn't a - * binding flag - it seems more like a message to the winsys to create - * a shareable allocation. - */ -#define PIPE_BIND_SCANOUT (1 << 14) /* */ -#define PIPE_BIND_SHARED (1 << 15) /* get_texture_handle ??? */ - - -/* Flags for the driver about resource behaviour: - */ -#define PIPE_RESOURCE_FLAG_GEN_MIPS (1 << 0) /* Driver performs autogen mips */ -#define PIPE_RESOURCE_FLAG_DRV_PRIV (1 << 16) /* driver/winsys private */ -#define PIPE_RESOURCE_FLAG_ST_PRIV (1 << 24) /* state-tracker/winsys private */ - -/* Hint about the expected lifecycle of a resource. - */ -#define PIPE_USAGE_DEFAULT 0 /* many uploads, draws intermixed */ -#define PIPE_USAGE_DYNAMIC 1 /* many uploads, draws intermixed */ -#define PIPE_USAGE_STATIC 2 /* same as immutable?? */ -#define PIPE_USAGE_IMMUTABLE 3 /* no change after first upload */ -#define PIPE_USAGE_STREAM 4 /* upload, draw, upload, draw */ -#define PIPE_USAGE_STAGING 5 /* supports data transfers from the GPU to the CPU */ - - -/** - * Shaders - */ -#define PIPE_SHADER_VERTEX 0 -#define PIPE_SHADER_FRAGMENT 1 -#define PIPE_SHADER_GEOMETRY 2 -#define PIPE_SHADER_TYPES 3 - - -/** - * Primitive types: - */ -#define PIPE_PRIM_POINTS 0 -#define PIPE_PRIM_LINES 1 -#define PIPE_PRIM_LINE_LOOP 2 -#define PIPE_PRIM_LINE_STRIP 3 -#define PIPE_PRIM_TRIANGLES 4 -#define PIPE_PRIM_TRIANGLE_STRIP 5 -#define PIPE_PRIM_TRIANGLE_FAN 6 -#define PIPE_PRIM_QUADS 7 -#define PIPE_PRIM_QUAD_STRIP 8 -#define PIPE_PRIM_POLYGON 9 -#define PIPE_PRIM_LINES_ADJACENCY 10 -#define PIPE_PRIM_LINE_STRIP_ADJACENCY 11 -#define PIPE_PRIM_TRIANGLES_ADJACENCY 12 -#define PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY 13 -#define PIPE_PRIM_MAX 14 - - -/** - * Query object types - */ -#define PIPE_QUERY_OCCLUSION_COUNTER 0 -#define PIPE_QUERY_OCCLUSION_PREDICATE 1 -#define PIPE_QUERY_TIMESTAMP 2 -#define PIPE_QUERY_TIMESTAMP_DISJOINT 3 -#define PIPE_QUERY_TIME_ELAPSED 4 -#define PIPE_QUERY_PRIMITIVES_GENERATED 5 -#define PIPE_QUERY_PRIMITIVES_EMITTED 6 -#define PIPE_QUERY_SO_STATISTICS 7 -#define PIPE_QUERY_SO_OVERFLOW_PREDICATE 8 -#define PIPE_QUERY_GPU_FINISHED 9 -#define PIPE_QUERY_PIPELINE_STATISTICS 10 -#define PIPE_QUERY_TYPES 11 - - -/** - * Conditional rendering modes - */ -#define PIPE_RENDER_COND_WAIT 0 -#define PIPE_RENDER_COND_NO_WAIT 1 -#define PIPE_RENDER_COND_BY_REGION_WAIT 2 -#define PIPE_RENDER_COND_BY_REGION_NO_WAIT 3 - - -/** - * Point sprite coord modes - */ -#define PIPE_SPRITE_COORD_UPPER_LEFT 0 -#define PIPE_SPRITE_COORD_LOWER_LEFT 1 - - -/** - * Texture swizzles - */ -#define PIPE_SWIZZLE_RED 0 -#define PIPE_SWIZZLE_GREEN 1 -#define PIPE_SWIZZLE_BLUE 2 -#define PIPE_SWIZZLE_ALPHA 3 -#define PIPE_SWIZZLE_ZERO 4 -#define PIPE_SWIZZLE_ONE 5 - - -#define PIPE_TIMEOUT_INFINITE 0xffffffffffffffffull - -/** - * Implementation capabilities/limits which are queried through - * pipe_screen::get_param() - */ -enum pipe_cap { - PIPE_CAP_NPOT_TEXTURES = 1, - PIPE_CAP_TWO_SIDED_STENCIL = 2, - PIPE_CAP_DUAL_SOURCE_BLEND = 4, - PIPE_CAP_ANISOTROPIC_FILTER = 5, - PIPE_CAP_POINT_SPRITE = 6, - PIPE_CAP_MAX_RENDER_TARGETS = 7, - PIPE_CAP_OCCLUSION_QUERY = 8, - PIPE_CAP_TIMER_QUERY = 9, - PIPE_CAP_TEXTURE_SHADOW_MAP = 10, - PIPE_CAP_TEXTURE_SWIZZLE = 11, - PIPE_CAP_MAX_TEXTURE_2D_LEVELS = 12, - PIPE_CAP_MAX_TEXTURE_3D_LEVELS = 13, - PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS = 14, - PIPE_CAP_TEXTURE_MIRROR_CLAMP = 25, - PIPE_CAP_BLEND_EQUATION_SEPARATE = 28, - PIPE_CAP_SM3 = 29, /*< Shader Model, supported */ - PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS = 30, - PIPE_CAP_PRIMITIVE_RESTART = 31, - /** Maximum texture image units accessible from vertex and fragment shaders - * combined */ - PIPE_CAP_MAX_COMBINED_SAMPLERS = 32, - /** blend enables and write masks per rendertarget */ - PIPE_CAP_INDEP_BLEND_ENABLE = 33, - /** different blend funcs per rendertarget */ - PIPE_CAP_INDEP_BLEND_FUNC = 34, - PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE = 35, - PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS = 36, - PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT = 37, - PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT = 38, - PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER = 39, - PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER = 40, - PIPE_CAP_DEPTH_CLIP_DISABLE = 41, - PIPE_CAP_SHADER_STENCIL_EXPORT = 42, - PIPE_CAP_TGSI_INSTANCEID = 43, - PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR = 44, - PIPE_CAP_FRAGMENT_COLOR_CLAMP_CONTROL = 45, - PIPE_CAP_MIXED_COLORBUFFER_FORMATS = 46, - PIPE_CAP_SEAMLESS_CUBE_MAP = 47, - PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE = 48, - PIPE_CAP_SCALED_RESOLVE = 49, - PIPE_CAP_MIN_TEXEL_OFFSET = 50, - PIPE_CAP_MAX_TEXEL_OFFSET = 51, - PIPE_CAP_CONDITIONAL_RENDER = 52, - PIPE_CAP_TEXTURE_BARRIER = 53, - PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS = 55, - PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS = 56, - PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME = 57, - PIPE_CAP_TGSI_CAN_COMPACT_VARYINGS = 58, /* temporary */ - PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS = 59 /* temporary */ -}; - -/** - * Implementation limits which are queried through - * pipe_screen::get_paramf() - */ -enum pipe_capf -{ - PIPE_CAPF_MAX_LINE_WIDTH = 15, - PIPE_CAPF_MAX_LINE_WIDTH_AA = 16, - PIPE_CAPF_MAX_POINT_WIDTH = 17, - PIPE_CAPF_MAX_POINT_WIDTH_AA = 18, - PIPE_CAPF_MAX_TEXTURE_ANISOTROPY = 19, - PIPE_CAPF_MAX_TEXTURE_LOD_BIAS = 20, - PIPE_CAPF_GUARD_BAND_LEFT = 21, - PIPE_CAPF_GUARD_BAND_TOP = 22, - PIPE_CAPF_GUARD_BAND_RIGHT = 23, - PIPE_CAPF_GUARD_BAND_BOTTOM = 24 -}; - -/* Shader caps not specific to any single stage */ -enum pipe_shader_cap -{ - PIPE_SHADER_CAP_MAX_INSTRUCTIONS = 0, /* if 0, it means the stage is unsupported */ - PIPE_SHADER_CAP_MAX_ALU_INSTRUCTIONS = 1, - PIPE_SHADER_CAP_MAX_TEX_INSTRUCTIONS = 2, - PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS = 3, - PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH = 4, - PIPE_SHADER_CAP_MAX_INPUTS = 5, - PIPE_SHADER_CAP_MAX_CONSTS = 6, - PIPE_SHADER_CAP_MAX_CONST_BUFFERS = 7, - PIPE_SHADER_CAP_MAX_TEMPS = 8, - PIPE_SHADER_CAP_MAX_ADDRS = 9, - PIPE_SHADER_CAP_MAX_PREDS = 10, - /* boolean caps */ - PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED = 11, - PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR = 12, - PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR = 13, - PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR = 14, - PIPE_SHADER_CAP_INDIRECT_CONST_ADDR = 15, - PIPE_SHADER_CAP_SUBROUTINES = 16, /* BGNSUB, ENDSUB, CAL, RET */ - PIPE_SHADER_CAP_INTEGERS = 17, - PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS = 18, - PIPE_SHADER_CAP_OUTPUT_READ = 19 -}; - - -/** - * Composite query types - */ -struct pipe_query_data_so_statistics -{ - uint64_t num_primitives_written; - uint64_t primitives_storage_needed; -}; -struct pipe_query_data_timestamp_disjoint -{ - uint64_t frequency; - boolean disjoint; -}; - -union pipe_color_union -{ - float f[4]; - int i[4]; - unsigned int ui[4]; -}; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/dll/opengl/mesa/src/gallium/include/pipe/p_format.h b/dll/opengl/mesa/src/gallium/include/pipe/p_format.h deleted file mode 100644 index c05629b616e..00000000000 --- a/dll/opengl/mesa/src/gallium/include/pipe/p_format.h +++ /dev/null @@ -1,332 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * Copyright (c) 2008 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef PIPE_FORMAT_H -#define PIPE_FORMAT_H - -#ifdef __cplusplus -extern "C" { -#endif - - -enum pipe_type { - PIPE_TYPE_UNORM = 0, - PIPE_TYPE_SNORM, - PIPE_TYPE_SINT, - PIPE_TYPE_UINT, - PIPE_TYPE_FLOAT, - PIPE_TYPE_COUNT -}; - -/** - * Texture/surface image formats (preliminary) - */ - -/* KW: Added lots of surface formats to support vertex element layout - * definitions, and eventually render-to-vertex-buffer. - */ - -enum pipe_format { - PIPE_FORMAT_NONE = 0, - PIPE_FORMAT_B8G8R8A8_UNORM = 1, - PIPE_FORMAT_B8G8R8X8_UNORM = 2, - PIPE_FORMAT_A8R8G8B8_UNORM = 3, - PIPE_FORMAT_X8R8G8B8_UNORM = 4, - PIPE_FORMAT_B5G5R5A1_UNORM = 5, - PIPE_FORMAT_B4G4R4A4_UNORM = 6, - PIPE_FORMAT_B5G6R5_UNORM = 7, - PIPE_FORMAT_R10G10B10A2_UNORM = 8, - PIPE_FORMAT_L8_UNORM = 9, /**< ubyte luminance */ - PIPE_FORMAT_A8_UNORM = 10, /**< ubyte alpha */ - PIPE_FORMAT_I8_UNORM = 11, /**< ubyte intensity */ - PIPE_FORMAT_L8A8_UNORM = 12, /**< ubyte alpha, luminance */ - PIPE_FORMAT_L16_UNORM = 13, /**< ushort luminance */ - PIPE_FORMAT_UYVY = 14, - PIPE_FORMAT_YUYV = 15, - PIPE_FORMAT_Z16_UNORM = 16, - PIPE_FORMAT_Z32_UNORM = 17, - PIPE_FORMAT_Z32_FLOAT = 18, - PIPE_FORMAT_Z24_UNORM_S8_UINT = 19, - PIPE_FORMAT_S8_UINT_Z24_UNORM = 20, - PIPE_FORMAT_Z24X8_UNORM = 21, - PIPE_FORMAT_X8Z24_UNORM = 22, - PIPE_FORMAT_S8_UINT = 23, /**< ubyte stencil */ - PIPE_FORMAT_R64_FLOAT = 24, - PIPE_FORMAT_R64G64_FLOAT = 25, - PIPE_FORMAT_R64G64B64_FLOAT = 26, - PIPE_FORMAT_R64G64B64A64_FLOAT = 27, - PIPE_FORMAT_R32_FLOAT = 28, - PIPE_FORMAT_R32G32_FLOAT = 29, - PIPE_FORMAT_R32G32B32_FLOAT = 30, - PIPE_FORMAT_R32G32B32A32_FLOAT = 31, - PIPE_FORMAT_R32_UNORM = 32, - PIPE_FORMAT_R32G32_UNORM = 33, - PIPE_FORMAT_R32G32B32_UNORM = 34, - PIPE_FORMAT_R32G32B32A32_UNORM = 35, - PIPE_FORMAT_R32_USCALED = 36, - PIPE_FORMAT_R32G32_USCALED = 37, - PIPE_FORMAT_R32G32B32_USCALED = 38, - PIPE_FORMAT_R32G32B32A32_USCALED = 39, - PIPE_FORMAT_R32_SNORM = 40, - PIPE_FORMAT_R32G32_SNORM = 41, - PIPE_FORMAT_R32G32B32_SNORM = 42, - PIPE_FORMAT_R32G32B32A32_SNORM = 43, - PIPE_FORMAT_R32_SSCALED = 44, - PIPE_FORMAT_R32G32_SSCALED = 45, - PIPE_FORMAT_R32G32B32_SSCALED = 46, - PIPE_FORMAT_R32G32B32A32_SSCALED = 47, - PIPE_FORMAT_R16_UNORM = 48, - PIPE_FORMAT_R16G16_UNORM = 49, - PIPE_FORMAT_R16G16B16_UNORM = 50, - PIPE_FORMAT_R16G16B16A16_UNORM = 51, - PIPE_FORMAT_R16_USCALED = 52, - PIPE_FORMAT_R16G16_USCALED = 53, - PIPE_FORMAT_R16G16B16_USCALED = 54, - PIPE_FORMAT_R16G16B16A16_USCALED = 55, - PIPE_FORMAT_R16_SNORM = 56, - PIPE_FORMAT_R16G16_SNORM = 57, - PIPE_FORMAT_R16G16B16_SNORM = 58, - PIPE_FORMAT_R16G16B16A16_SNORM = 59, - PIPE_FORMAT_R16_SSCALED = 60, - PIPE_FORMAT_R16G16_SSCALED = 61, - PIPE_FORMAT_R16G16B16_SSCALED = 62, - PIPE_FORMAT_R16G16B16A16_SSCALED = 63, - PIPE_FORMAT_R8_UNORM = 64, - PIPE_FORMAT_R8G8_UNORM = 65, - PIPE_FORMAT_R8G8B8_UNORM = 66, - PIPE_FORMAT_R8G8B8A8_UNORM = 67, - PIPE_FORMAT_X8B8G8R8_UNORM = 68, - PIPE_FORMAT_R8_USCALED = 69, - PIPE_FORMAT_R8G8_USCALED = 70, - PIPE_FORMAT_R8G8B8_USCALED = 71, - PIPE_FORMAT_R8G8B8A8_USCALED = 72, - PIPE_FORMAT_R8_SNORM = 74, - PIPE_FORMAT_R8G8_SNORM = 75, - PIPE_FORMAT_R8G8B8_SNORM = 76, - PIPE_FORMAT_R8G8B8A8_SNORM = 77, - PIPE_FORMAT_R8_SSCALED = 82, - PIPE_FORMAT_R8G8_SSCALED = 83, - PIPE_FORMAT_R8G8B8_SSCALED = 84, - PIPE_FORMAT_R8G8B8A8_SSCALED = 85, - PIPE_FORMAT_R32_FIXED = 87, - PIPE_FORMAT_R32G32_FIXED = 88, - PIPE_FORMAT_R32G32B32_FIXED = 89, - PIPE_FORMAT_R32G32B32A32_FIXED = 90, - PIPE_FORMAT_R16_FLOAT = 91, - PIPE_FORMAT_R16G16_FLOAT = 92, - PIPE_FORMAT_R16G16B16_FLOAT = 93, - PIPE_FORMAT_R16G16B16A16_FLOAT = 94, - - /* sRGB formats */ - PIPE_FORMAT_L8_SRGB = 95, - PIPE_FORMAT_L8A8_SRGB = 96, - PIPE_FORMAT_R8G8B8_SRGB = 97, - PIPE_FORMAT_A8B8G8R8_SRGB = 98, - PIPE_FORMAT_X8B8G8R8_SRGB = 99, - PIPE_FORMAT_B8G8R8A8_SRGB = 100, - PIPE_FORMAT_B8G8R8X8_SRGB = 101, - PIPE_FORMAT_A8R8G8B8_SRGB = 102, - PIPE_FORMAT_X8R8G8B8_SRGB = 103, - PIPE_FORMAT_R8G8B8A8_SRGB = 104, - - /* compressed formats */ - PIPE_FORMAT_DXT1_RGB = 105, - PIPE_FORMAT_DXT1_RGBA = 106, - PIPE_FORMAT_DXT3_RGBA = 107, - PIPE_FORMAT_DXT5_RGBA = 108, - - /* sRGB, compressed */ - PIPE_FORMAT_DXT1_SRGB = 109, - PIPE_FORMAT_DXT1_SRGBA = 110, - PIPE_FORMAT_DXT3_SRGBA = 111, - PIPE_FORMAT_DXT5_SRGBA = 112, - - /* rgtc compressed */ - PIPE_FORMAT_RGTC1_UNORM = 113, - PIPE_FORMAT_RGTC1_SNORM = 114, - PIPE_FORMAT_RGTC2_UNORM = 115, - PIPE_FORMAT_RGTC2_SNORM = 116, - - PIPE_FORMAT_R8G8_B8G8_UNORM = 117, - PIPE_FORMAT_G8R8_G8B8_UNORM = 118, - - /* mixed formats */ - PIPE_FORMAT_R8SG8SB8UX8U_NORM = 119, - PIPE_FORMAT_R5SG5SB6U_NORM = 120, - - /* TODO: re-order these */ - PIPE_FORMAT_A8B8G8R8_UNORM = 121, - PIPE_FORMAT_B5G5R5X1_UNORM = 122, - PIPE_FORMAT_R10G10B10A2_USCALED = 123, - PIPE_FORMAT_R11G11B10_FLOAT = 124, - PIPE_FORMAT_R9G9B9E5_FLOAT = 125, - PIPE_FORMAT_Z32_FLOAT_S8X24_UINT = 126, - PIPE_FORMAT_R1_UNORM = 127, - PIPE_FORMAT_R10G10B10X2_USCALED = 128, - PIPE_FORMAT_R10G10B10X2_SNORM = 129, - PIPE_FORMAT_L4A4_UNORM = 130, - PIPE_FORMAT_B10G10R10A2_UNORM = 131, - PIPE_FORMAT_R10SG10SB10SA2U_NORM = 132, - PIPE_FORMAT_R8G8Bx_SNORM = 133, - PIPE_FORMAT_R8G8B8X8_UNORM = 134, - PIPE_FORMAT_B4G4R4X4_UNORM = 135, - - /* some stencil samplers formats */ - PIPE_FORMAT_X24S8_UINT = 136, - PIPE_FORMAT_S8X24_UINT = 137, - PIPE_FORMAT_X32_S8X24_UINT = 138, - - PIPE_FORMAT_B2G3R3_UNORM = 139, - PIPE_FORMAT_L16A16_UNORM = 140, - PIPE_FORMAT_A16_UNORM = 141, - PIPE_FORMAT_I16_UNORM = 142, - - PIPE_FORMAT_LATC1_UNORM = 143, - PIPE_FORMAT_LATC1_SNORM = 144, - PIPE_FORMAT_LATC2_UNORM = 145, - PIPE_FORMAT_LATC2_SNORM = 146, - - PIPE_FORMAT_A8_SNORM = 147, - PIPE_FORMAT_L8_SNORM = 148, - PIPE_FORMAT_L8A8_SNORM = 149, - PIPE_FORMAT_I8_SNORM = 150, - PIPE_FORMAT_A16_SNORM = 151, - PIPE_FORMAT_L16_SNORM = 152, - PIPE_FORMAT_L16A16_SNORM = 153, - PIPE_FORMAT_I16_SNORM = 154, - - PIPE_FORMAT_A16_FLOAT = 155, - PIPE_FORMAT_L16_FLOAT = 156, - PIPE_FORMAT_L16A16_FLOAT = 157, - PIPE_FORMAT_I16_FLOAT = 158, - PIPE_FORMAT_A32_FLOAT = 159, - PIPE_FORMAT_L32_FLOAT = 160, - PIPE_FORMAT_L32A32_FLOAT = 161, - PIPE_FORMAT_I32_FLOAT = 162, - - PIPE_FORMAT_YV12 = 163, - PIPE_FORMAT_YV16 = 164, - PIPE_FORMAT_IYUV = 165, /**< aka I420 */ - PIPE_FORMAT_NV12 = 166, - PIPE_FORMAT_NV21 = 167, - PIPE_FORMAT_AYUV = PIPE_FORMAT_A8R8G8B8_UNORM, - PIPE_FORMAT_VUYA = PIPE_FORMAT_B8G8R8A8_UNORM, - PIPE_FORMAT_XYUV = PIPE_FORMAT_X8R8G8B8_UNORM, - PIPE_FORMAT_VUYX = PIPE_FORMAT_B8G8R8X8_UNORM, - - PIPE_FORMAT_R4A4_UNORM = 168, - PIPE_FORMAT_A4R4_UNORM = 169, - PIPE_FORMAT_R8A8_UNORM = 170, - PIPE_FORMAT_A8R8_UNORM = 171, - - PIPE_FORMAT_R10G10B10A2_SSCALED = 172, - PIPE_FORMAT_R10G10B10A2_SNORM = 173, - - PIPE_FORMAT_B10G10R10A2_USCALED = 174, - PIPE_FORMAT_B10G10R10A2_SSCALED = 175, - PIPE_FORMAT_B10G10R10A2_SNORM = 176, - - PIPE_FORMAT_R8_UINT = 177, - PIPE_FORMAT_R8G8_UINT = 178, - PIPE_FORMAT_R8G8B8_UINT = 179, - PIPE_FORMAT_R8G8B8A8_UINT = 180, - - PIPE_FORMAT_R8_SINT = 181, - PIPE_FORMAT_R8G8_SINT = 182, - PIPE_FORMAT_R8G8B8_SINT = 183, - PIPE_FORMAT_R8G8B8A8_SINT = 184, - - PIPE_FORMAT_R16_UINT = 185, - PIPE_FORMAT_R16G16_UINT = 186, - PIPE_FORMAT_R16G16B16_UINT = 187, - PIPE_FORMAT_R16G16B16A16_UINT = 188, - - PIPE_FORMAT_R16_SINT = 189, - PIPE_FORMAT_R16G16_SINT = 190, - PIPE_FORMAT_R16G16B16_SINT = 191, - PIPE_FORMAT_R16G16B16A16_SINT = 192, - - PIPE_FORMAT_R32_UINT = 193, - PIPE_FORMAT_R32G32_UINT = 194, - PIPE_FORMAT_R32G32B32_UINT = 195, - PIPE_FORMAT_R32G32B32A32_UINT = 196, - - PIPE_FORMAT_R32_SINT = 197, - PIPE_FORMAT_R32G32_SINT = 198, - PIPE_FORMAT_R32G32B32_SINT = 199, - PIPE_FORMAT_R32G32B32A32_SINT = 200, - - PIPE_FORMAT_A8_UINT = 201, - PIPE_FORMAT_I8_UINT = 202, - PIPE_FORMAT_L8_UINT = 203, - PIPE_FORMAT_L8A8_UINT = 204, - - PIPE_FORMAT_A8_SINT = 205, - PIPE_FORMAT_I8_SINT = 206, - PIPE_FORMAT_L8_SINT = 207, - PIPE_FORMAT_L8A8_SINT = 208, - - PIPE_FORMAT_A16_UINT = 209, - PIPE_FORMAT_I16_UINT = 210, - PIPE_FORMAT_L16_UINT = 211, - PIPE_FORMAT_L16A16_UINT = 212, - - PIPE_FORMAT_A16_SINT = 213, - PIPE_FORMAT_I16_SINT = 214, - PIPE_FORMAT_L16_SINT = 215, - PIPE_FORMAT_L16A16_SINT = 216, - - PIPE_FORMAT_A32_UINT = 217, - PIPE_FORMAT_I32_UINT = 218, - PIPE_FORMAT_L32_UINT = 219, - PIPE_FORMAT_L32A32_UINT = 220, - - PIPE_FORMAT_A32_SINT = 221, - PIPE_FORMAT_I32_SINT = 222, - PIPE_FORMAT_L32_SINT = 223, - PIPE_FORMAT_L32A32_SINT = 224, - - PIPE_FORMAT_B10G10R10A2_UINT = 225, - - PIPE_FORMAT_ETC1_RGB8 = 226, - - PIPE_FORMAT_COUNT -}; - -enum pipe_video_chroma_format -{ - PIPE_VIDEO_CHROMA_FORMAT_420, - PIPE_VIDEO_CHROMA_FORMAT_422, - PIPE_VIDEO_CHROMA_FORMAT_444 -}; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/dll/opengl/mesa/src/gallium/include/pipe/p_screen.h b/dll/opengl/mesa/src/gallium/include/pipe/p_screen.h deleted file mode 100644 index 70d41357898..00000000000 --- a/dll/opengl/mesa/src/gallium/include/pipe/p_screen.h +++ /dev/null @@ -1,220 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * - * Screen, Adapter or GPU - * - * These are driver functions/facilities that are context independent. - */ - - -#ifndef P_SCREEN_H -#define P_SCREEN_H - - -#include "pipe/p_compiler.h" -#include "pipe/p_format.h" -#include "pipe/p_defines.h" -#include "pipe/p_video_enums.h" - - - -#ifdef __cplusplus -extern "C" { -#endif - - -/** Opaque type */ -struct winsys_handle; -/** Opaque type */ -struct pipe_fence_handle; -struct pipe_winsys; -struct pipe_resource; -struct pipe_surface; -struct pipe_transfer; - - -/** - * Gallium screen/adapter context. Basically everything - * hardware-specific that doesn't actually require a rendering - * context. - */ -struct pipe_screen { - struct pipe_winsys *winsys; - - void (*destroy)( struct pipe_screen * ); - - - const char *(*get_name)( struct pipe_screen * ); - - const char *(*get_vendor)( struct pipe_screen * ); - - /** - * Query an integer-valued capability/parameter/limit - * \param param one of PIPE_CAP_x - */ - int (*get_param)( struct pipe_screen *, enum pipe_cap param ); - - /** - * Query a float-valued capability/parameter/limit - * \param param one of PIPE_CAP_x - */ - float (*get_paramf)( struct pipe_screen *, enum pipe_capf param ); - - /** - * Query a per-shader-stage integer-valued capability/parameter/limit - * \param param one of PIPE_CAP_x - */ - int (*get_shader_param)( struct pipe_screen *, unsigned shader, enum pipe_shader_cap param ); - - /** - * Query an integer-valued capability/parameter/limit for a codec/profile - * \param param one of PIPE_VIDEO_CAP_x - */ - int (*get_video_param)( struct pipe_screen *, - enum pipe_video_profile profile, - enum pipe_video_cap param ); - - struct pipe_context * (*context_create)( struct pipe_screen *, - void *priv ); - - /** - * Check if the given pipe_format is supported as a texture or - * drawing surface. - * \param bindings bitmask of PIPE_BIND_* - */ - boolean (*is_format_supported)( struct pipe_screen *, - enum pipe_format format, - enum pipe_texture_target target, - unsigned sample_count, - unsigned bindings ); - - /** - * Check if the given pipe_format is supported as output for this codec/profile. - * \param profile profile to check, may also be PIPE_VIDEO_PROFILE_UNKNOWN - */ - boolean (*is_video_format_supported)( struct pipe_screen *, - enum pipe_format format, - enum pipe_video_profile profile ); - - /** - * Create a new texture object, using the given template info. - */ - struct pipe_resource * (*resource_create)(struct pipe_screen *, - const struct pipe_resource *templat); - - /** - * Create a texture from a winsys_handle. The handle is often created in - * another process by first creating a pipe texture and then calling - * resource_get_handle. - */ - struct pipe_resource * (*resource_from_handle)(struct pipe_screen *, - const struct pipe_resource *templat, - struct winsys_handle *handle); - - /** - * Get a winsys_handle from a texture. Some platforms/winsys requires - * that the texture is created with a special usage flag like - * DISPLAYTARGET or PRIMARY. - */ - boolean (*resource_get_handle)(struct pipe_screen *, - struct pipe_resource *tex, - struct winsys_handle *handle); - - - void (*resource_destroy)(struct pipe_screen *, - struct pipe_resource *pt); - - - /** - * Create a buffer that wraps user-space data. - * - * Effectively this schedules a delayed call to buffer_create - * followed by an upload of the data at *some point in the future*, - * or perhaps never. Basically the allocate/upload is delayed - * until the buffer is actually passed to hardware. - * - * The intention is to provide a quick way to turn regular data - * into a buffer, and secondly to avoid a copy operation if that - * data subsequently turns out to be only accessed by the CPU. - * - * Common example is OpenGL vertex buffers that are subsequently - * processed either by software TNL in the driver or by passing to - * hardware. - * - * XXX: What happens if the delayed call to buffer_create() fails? - * - * Note that ptr may be accessed at any time upto the time when the - * buffer is destroyed, so the data must not be freed before then. - */ - struct pipe_resource *(*user_buffer_create)(struct pipe_screen *screen, - void *ptr, - unsigned bytes, - unsigned bind_flags); - - /** - * Do any special operations to ensure frontbuffer contents are - * displayed, eg copy fake frontbuffer. - * \param winsys_drawable_handle an opaque handle that the calling context - * gets out-of-band - */ - void (*flush_frontbuffer)( struct pipe_screen *screen, - struct pipe_resource *resource, - unsigned level, unsigned layer, - void *winsys_drawable_handle ); - - - - /** Set ptr = fence, with reference counting */ - void (*fence_reference)( struct pipe_screen *screen, - struct pipe_fence_handle **ptr, - struct pipe_fence_handle *fence ); - - /** - * Checks whether the fence has been signalled. - */ - boolean (*fence_signalled)( struct pipe_screen *screen, - struct pipe_fence_handle *fence ); - - /** - * Wait for the fence to finish. - * \param timeout in nanoseconds - */ - boolean (*fence_finish)( struct pipe_screen *screen, - struct pipe_fence_handle *fence, - uint64_t timeout ); - -}; - - -#ifdef __cplusplus -} -#endif - -#endif /* P_SCREEN_H */ diff --git a/dll/opengl/mesa/src/gallium/include/pipe/p_shader_tokens.h b/dll/opengl/mesa/src/gallium/include/pipe/p_shader_tokens.h deleted file mode 100644 index df2dd5e618e..00000000000 --- a/dll/opengl/mesa/src/gallium/include/pipe/p_shader_tokens.h +++ /dev/null @@ -1,560 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * Copyright 2009-2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef P_SHADER_TOKENS_H -#define P_SHADER_TOKENS_H - -#ifdef __cplusplus -extern "C" { -#endif - - -struct tgsi_header -{ - unsigned HeaderSize : 8; - unsigned BodySize : 24; -}; - -#define TGSI_PROCESSOR_FRAGMENT 0 -#define TGSI_PROCESSOR_VERTEX 1 -#define TGSI_PROCESSOR_GEOMETRY 2 - -struct tgsi_processor -{ - unsigned Processor : 4; /* TGSI_PROCESSOR_ */ - unsigned Padding : 28; -}; - -#define TGSI_TOKEN_TYPE_DECLARATION 0 -#define TGSI_TOKEN_TYPE_IMMEDIATE 1 -#define TGSI_TOKEN_TYPE_INSTRUCTION 2 -#define TGSI_TOKEN_TYPE_PROPERTY 3 - -struct tgsi_token -{ - unsigned Type : 4; /**< TGSI_TOKEN_TYPE_x */ - unsigned NrTokens : 8; /**< UINT */ - unsigned Padding : 20; -}; - -enum tgsi_file_type { - TGSI_FILE_NULL =0, - TGSI_FILE_CONSTANT =1, - TGSI_FILE_INPUT =2, - TGSI_FILE_OUTPUT =3, - TGSI_FILE_TEMPORARY =4, - TGSI_FILE_SAMPLER =5, - TGSI_FILE_ADDRESS =6, - TGSI_FILE_IMMEDIATE =7, - TGSI_FILE_PREDICATE =8, - TGSI_FILE_SYSTEM_VALUE =9, - TGSI_FILE_IMMEDIATE_ARRAY =10, - TGSI_FILE_TEMPORARY_ARRAY =11, - TGSI_FILE_RESOURCE =12, - TGSI_FILE_COUNT /**< how many TGSI_FILE_ types */ -}; - - -#define TGSI_WRITEMASK_NONE 0x00 -#define TGSI_WRITEMASK_X 0x01 -#define TGSI_WRITEMASK_Y 0x02 -#define TGSI_WRITEMASK_XY 0x03 -#define TGSI_WRITEMASK_Z 0x04 -#define TGSI_WRITEMASK_XZ 0x05 -#define TGSI_WRITEMASK_YZ 0x06 -#define TGSI_WRITEMASK_XYZ 0x07 -#define TGSI_WRITEMASK_W 0x08 -#define TGSI_WRITEMASK_XW 0x09 -#define TGSI_WRITEMASK_YW 0x0A -#define TGSI_WRITEMASK_XYW 0x0B -#define TGSI_WRITEMASK_ZW 0x0C -#define TGSI_WRITEMASK_XZW 0x0D -#define TGSI_WRITEMASK_YZW 0x0E -#define TGSI_WRITEMASK_XYZW 0x0F - -#define TGSI_INTERPOLATE_CONSTANT 0 -#define TGSI_INTERPOLATE_LINEAR 1 -#define TGSI_INTERPOLATE_PERSPECTIVE 2 -#define TGSI_INTERPOLATE_COLOR 3 /* special color case for smooth/flat */ -#define TGSI_INTERPOLATE_COUNT 4 - -#define TGSI_CYLINDRICAL_WRAP_X (1 << 0) -#define TGSI_CYLINDRICAL_WRAP_Y (1 << 1) -#define TGSI_CYLINDRICAL_WRAP_Z (1 << 2) -#define TGSI_CYLINDRICAL_WRAP_W (1 << 3) - -struct tgsi_declaration -{ - unsigned Type : 4; /**< TGSI_TOKEN_TYPE_DECLARATION */ - unsigned NrTokens : 8; /**< UINT */ - unsigned File : 4; /**< one of TGSI_FILE_x */ - unsigned UsageMask : 4; /**< bitmask of TGSI_WRITEMASK_x flags */ - unsigned Interpolate : 4; /**< one of TGSI_INTERPOLATE_x */ - unsigned Dimension : 1; /**< any extra dimension info? */ - unsigned Semantic : 1; /**< BOOL, any semantic info? */ - unsigned Centroid : 1; /**< centroid sampling? */ - unsigned Invariant : 1; /**< invariant optimization? */ - unsigned CylindricalWrap:4; /**< TGSI_CYLINDRICAL_WRAP_x flags */ -}; - -struct tgsi_declaration_range -{ - unsigned First : 16; /**< UINT */ - unsigned Last : 16; /**< UINT */ -}; - -struct tgsi_declaration_dimension -{ - unsigned Index2D:16; /**< UINT */ - unsigned Padding:16; -}; - -#define TGSI_SEMANTIC_POSITION 0 -#define TGSI_SEMANTIC_COLOR 1 -#define TGSI_SEMANTIC_BCOLOR 2 /**< back-face color */ -#define TGSI_SEMANTIC_FOG 3 -#define TGSI_SEMANTIC_PSIZE 4 -#define TGSI_SEMANTIC_GENERIC 5 -#define TGSI_SEMANTIC_NORMAL 6 -#define TGSI_SEMANTIC_FACE 7 -#define TGSI_SEMANTIC_EDGEFLAG 8 -#define TGSI_SEMANTIC_PRIMID 9 -#define TGSI_SEMANTIC_INSTANCEID 10 -#define TGSI_SEMANTIC_VERTEXID 11 -#define TGSI_SEMANTIC_STENCIL 12 -#define TGSI_SEMANTIC_CLIPDIST 13 -#define TGSI_SEMANTIC_CLIPVERTEX 14 -#define TGSI_SEMANTIC_COUNT 15 /**< number of semantic values */ - -struct tgsi_declaration_semantic -{ - unsigned Name : 8; /**< one of TGSI_SEMANTIC_x */ - unsigned Index : 16; /**< UINT */ - unsigned Padding : 8; -}; - -struct tgsi_declaration_resource { - unsigned Resource : 8; /**< one of TGSI_TEXTURE_ */ - unsigned ReturnTypeX : 6; /**< one of enum pipe_type */ - unsigned ReturnTypeY : 6; /**< one of enum pipe_type */ - unsigned ReturnTypeZ : 6; /**< one of enum pipe_type */ - unsigned ReturnTypeW : 6; /**< one of enum pipe_type */ -}; - -#define TGSI_IMM_FLOAT32 0 -#define TGSI_IMM_UINT32 1 -#define TGSI_IMM_INT32 2 - -struct tgsi_immediate -{ - unsigned Type : 4; /**< TGSI_TOKEN_TYPE_IMMEDIATE */ - unsigned NrTokens : 14; /**< UINT */ - unsigned DataType : 4; /**< one of TGSI_IMM_x */ - unsigned Padding : 10; -}; - -union tgsi_immediate_data -{ - float Float; - unsigned Uint; - int Int; -}; - -#define TGSI_PROPERTY_GS_INPUT_PRIM 0 -#define TGSI_PROPERTY_GS_OUTPUT_PRIM 1 -#define TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES 2 -#define TGSI_PROPERTY_FS_COORD_ORIGIN 3 -#define TGSI_PROPERTY_FS_COORD_PIXEL_CENTER 4 -#define TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS 5 -#define TGSI_PROPERTY_FS_DEPTH_LAYOUT 6 -#define TGSI_PROPERTY_VS_PROHIBIT_UCPS 7 -#define TGSI_PROPERTY_COUNT 8 - -struct tgsi_property { - unsigned Type : 4; /**< TGSI_TOKEN_TYPE_PROPERTY */ - unsigned NrTokens : 8; /**< UINT */ - unsigned PropertyName : 8; /**< one of TGSI_PROPERTY */ - unsigned Padding : 12; -}; - -#define TGSI_FS_COORD_ORIGIN_UPPER_LEFT 0 -#define TGSI_FS_COORD_ORIGIN_LOWER_LEFT 1 - -#define TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER 0 -#define TGSI_FS_COORD_PIXEL_CENTER_INTEGER 1 - -#define TGSI_FS_DEPTH_LAYOUT_NONE 0 -#define TGSI_FS_DEPTH_LAYOUT_ANY 1 -#define TGSI_FS_DEPTH_LAYOUT_GREATER 2 -#define TGSI_FS_DEPTH_LAYOUT_LESS 3 -#define TGSI_FS_DEPTH_LAYOUT_UNCHANGED 4 - - -struct tgsi_property_data { - unsigned Data; -}; - -/* TGSI opcodes. - * - * For more information on semantics of opcodes and - * which APIs are known to use which opcodes, see - * gallium/docs/source/tgsi.rst - */ -#define TGSI_OPCODE_ARL 0 -#define TGSI_OPCODE_MOV 1 -#define TGSI_OPCODE_LIT 2 -#define TGSI_OPCODE_RCP 3 -#define TGSI_OPCODE_RSQ 4 -#define TGSI_OPCODE_EXP 5 -#define TGSI_OPCODE_LOG 6 -#define TGSI_OPCODE_MUL 7 -#define TGSI_OPCODE_ADD 8 -#define TGSI_OPCODE_DP3 9 -#define TGSI_OPCODE_DP4 10 -#define TGSI_OPCODE_DST 11 -#define TGSI_OPCODE_MIN 12 -#define TGSI_OPCODE_MAX 13 -#define TGSI_OPCODE_SLT 14 -#define TGSI_OPCODE_SGE 15 -#define TGSI_OPCODE_MAD 16 -#define TGSI_OPCODE_SUB 17 -#define TGSI_OPCODE_LRP 18 -#define TGSI_OPCODE_CND 19 - /* gap */ -#define TGSI_OPCODE_DP2A 21 - /* gap */ -#define TGSI_OPCODE_FRC 24 -#define TGSI_OPCODE_CLAMP 25 -#define TGSI_OPCODE_FLR 26 -#define TGSI_OPCODE_ROUND 27 -#define TGSI_OPCODE_EX2 28 -#define TGSI_OPCODE_LG2 29 -#define TGSI_OPCODE_POW 30 -#define TGSI_OPCODE_XPD 31 - /* gap */ -#define TGSI_OPCODE_ABS 33 -#define TGSI_OPCODE_RCC 34 -#define TGSI_OPCODE_DPH 35 -#define TGSI_OPCODE_COS 36 -#define TGSI_OPCODE_DDX 37 -#define TGSI_OPCODE_DDY 38 -#define TGSI_OPCODE_KILP 39 /* predicated kill */ -#define TGSI_OPCODE_PK2H 40 -#define TGSI_OPCODE_PK2US 41 -#define TGSI_OPCODE_PK4B 42 -#define TGSI_OPCODE_PK4UB 43 -#define TGSI_OPCODE_RFL 44 -#define TGSI_OPCODE_SEQ 45 -#define TGSI_OPCODE_SFL 46 -#define TGSI_OPCODE_SGT 47 -#define TGSI_OPCODE_SIN 48 -#define TGSI_OPCODE_SLE 49 -#define TGSI_OPCODE_SNE 50 -#define TGSI_OPCODE_STR 51 -#define TGSI_OPCODE_TEX 52 -#define TGSI_OPCODE_TXD 53 -#define TGSI_OPCODE_TXP 54 -#define TGSI_OPCODE_UP2H 55 -#define TGSI_OPCODE_UP2US 56 -#define TGSI_OPCODE_UP4B 57 -#define TGSI_OPCODE_UP4UB 58 -#define TGSI_OPCODE_X2D 59 -#define TGSI_OPCODE_ARA 60 -#define TGSI_OPCODE_ARR 61 -#define TGSI_OPCODE_BRA 62 -#define TGSI_OPCODE_CAL 63 -#define TGSI_OPCODE_RET 64 -#define TGSI_OPCODE_SSG 65 /* SGN */ -#define TGSI_OPCODE_CMP 66 -#define TGSI_OPCODE_SCS 67 -#define TGSI_OPCODE_TXB 68 -#define TGSI_OPCODE_NRM 69 -#define TGSI_OPCODE_DIV 70 -#define TGSI_OPCODE_DP2 71 -#define TGSI_OPCODE_TXL 72 -#define TGSI_OPCODE_BRK 73 -#define TGSI_OPCODE_IF 74 - /* gap */ -#define TGSI_OPCODE_ELSE 77 -#define TGSI_OPCODE_ENDIF 78 - /* gap */ -#define TGSI_OPCODE_PUSHA 81 -#define TGSI_OPCODE_POPA 82 -#define TGSI_OPCODE_CEIL 83 -#define TGSI_OPCODE_I2F 84 -#define TGSI_OPCODE_NOT 85 -#define TGSI_OPCODE_TRUNC 86 -#define TGSI_OPCODE_SHL 87 - /* gap */ -#define TGSI_OPCODE_AND 89 -#define TGSI_OPCODE_OR 90 -#define TGSI_OPCODE_MOD 91 -#define TGSI_OPCODE_XOR 92 -#define TGSI_OPCODE_SAD 93 -#define TGSI_OPCODE_TXF 94 -#define TGSI_OPCODE_TXQ 95 -#define TGSI_OPCODE_CONT 96 -#define TGSI_OPCODE_EMIT 97 -#define TGSI_OPCODE_ENDPRIM 98 -#define TGSI_OPCODE_BGNLOOP 99 -#define TGSI_OPCODE_BGNSUB 100 -#define TGSI_OPCODE_ENDLOOP 101 -#define TGSI_OPCODE_ENDSUB 102 - /* gap */ -#define TGSI_OPCODE_NOP 107 - /* gap */ -#define TGSI_OPCODE_NRM4 112 -#define TGSI_OPCODE_CALLNZ 113 -#define TGSI_OPCODE_IFC 114 -#define TGSI_OPCODE_BREAKC 115 -#define TGSI_OPCODE_KIL 116 /* conditional kill */ -#define TGSI_OPCODE_END 117 /* aka HALT */ - /* gap */ -#define TGSI_OPCODE_F2I 119 -#define TGSI_OPCODE_IDIV 120 -#define TGSI_OPCODE_IMAX 121 -#define TGSI_OPCODE_IMIN 122 -#define TGSI_OPCODE_INEG 123 -#define TGSI_OPCODE_ISGE 124 -#define TGSI_OPCODE_ISHR 125 -#define TGSI_OPCODE_ISLT 126 -#define TGSI_OPCODE_F2U 127 -#define TGSI_OPCODE_U2F 128 -#define TGSI_OPCODE_UADD 129 -#define TGSI_OPCODE_UDIV 130 -#define TGSI_OPCODE_UMAD 131 -#define TGSI_OPCODE_UMAX 132 -#define TGSI_OPCODE_UMIN 133 -#define TGSI_OPCODE_UMOD 134 -#define TGSI_OPCODE_UMUL 135 -#define TGSI_OPCODE_USEQ 136 -#define TGSI_OPCODE_USGE 137 -#define TGSI_OPCODE_USHR 138 -#define TGSI_OPCODE_USLT 139 -#define TGSI_OPCODE_USNE 140 -#define TGSI_OPCODE_SWITCH 141 -#define TGSI_OPCODE_CASE 142 -#define TGSI_OPCODE_DEFAULT 143 -#define TGSI_OPCODE_ENDSWITCH 144 - -/* resource related opcodes */ -#define TGSI_OPCODE_LOAD 145 -#define TGSI_OPCODE_LOAD_MS 146 -#define TGSI_OPCODE_SAMPLE 147 -#define TGSI_OPCODE_SAMPLE_B 148 -#define TGSI_OPCODE_SAMPLE_C 149 -#define TGSI_OPCODE_SAMPLE_C_LZ 150 -#define TGSI_OPCODE_SAMPLE_D 151 -#define TGSI_OPCODE_SAMPLE_L 152 -#define TGSI_OPCODE_GATHER4 153 -#define TGSI_OPCODE_RESINFO 154 -#define TGSI_OPCODE_SAMPLE_POS 155 -#define TGSI_OPCODE_SAMPLE_INFO 156 - -#define TGSI_OPCODE_UARL 157 -#define TGSI_OPCODE_UCMP 158 -#define TGSI_OPCODE_IABS 159 -#define TGSI_OPCODE_ISSG 160 - -#define TGSI_OPCODE_LAST 161 - -#define TGSI_SAT_NONE 0 /* do not saturate */ -#define TGSI_SAT_ZERO_ONE 1 /* clamp to [0,1] */ -#define TGSI_SAT_MINUS_PLUS_ONE 2 /* clamp to [-1,1] */ - -/** - * Opcode is the operation code to execute. A given operation defines the - * semantics how the source registers (if any) are interpreted and what is - * written to the destination registers (if any) as a result of execution. - * - * NumDstRegs and NumSrcRegs is the number of destination and source registers, - * respectively. For a given operation code, those numbers are fixed and are - * present here only for convenience. - * - * If Predicate is TRUE, tgsi_instruction_predicate token immediately follows. - * - * Saturate controls how are final results in destination registers modified. - */ - -struct tgsi_instruction -{ - unsigned Type : 4; /* TGSI_TOKEN_TYPE_INSTRUCTION */ - unsigned NrTokens : 8; /* UINT */ - unsigned Opcode : 8; /* TGSI_OPCODE_ */ - unsigned Saturate : 2; /* TGSI_SAT_ */ - unsigned NumDstRegs : 2; /* UINT */ - unsigned NumSrcRegs : 4; /* UINT */ - unsigned Predicate : 1; /* BOOL */ - unsigned Label : 1; - unsigned Texture : 1; - unsigned Padding : 1; -}; - -/* - * If tgsi_instruction::Label is TRUE, tgsi_instruction_label follows. - * - * If tgsi_instruction::Texture is TRUE, tgsi_instruction_texture follows. - * if texture instruction has a number of offsets, - * then tgsi_instruction::Texture::NumOffset of tgsi_texture_offset follow. - * - * Then, tgsi_instruction::NumDstRegs of tgsi_dst_register follow. - * - * Then, tgsi_instruction::NumSrcRegs of tgsi_src_register follow. - * - * tgsi_instruction::NrTokens contains the total number of words that make the - * instruction, including the instruction word. - */ - -#define TGSI_SWIZZLE_X 0 -#define TGSI_SWIZZLE_Y 1 -#define TGSI_SWIZZLE_Z 2 -#define TGSI_SWIZZLE_W 3 - -struct tgsi_instruction_label -{ - unsigned Label : 24; /* UINT */ - unsigned Padding : 8; -}; - -#define TGSI_TEXTURE_UNKNOWN 0 -#define TGSI_TEXTURE_1D 1 -#define TGSI_TEXTURE_2D 2 -#define TGSI_TEXTURE_3D 3 -#define TGSI_TEXTURE_CUBE 4 -#define TGSI_TEXTURE_RECT 5 -#define TGSI_TEXTURE_SHADOW1D 6 -#define TGSI_TEXTURE_SHADOW2D 7 -#define TGSI_TEXTURE_SHADOWRECT 8 -#define TGSI_TEXTURE_1D_ARRAY 9 -#define TGSI_TEXTURE_2D_ARRAY 10 -#define TGSI_TEXTURE_SHADOW1D_ARRAY 11 -#define TGSI_TEXTURE_SHADOW2D_ARRAY 12 -#define TGSI_TEXTURE_SHADOWCUBE 13 -#define TGSI_TEXTURE_COUNT 14 - -struct tgsi_instruction_texture -{ - unsigned Texture : 8; /* TGSI_TEXTURE_ */ - unsigned NumOffsets : 4; - unsigned Padding : 20; -}; - -/* for texture offsets in GLSL and DirectX. - * Generally these always come from TGSI_FILE_IMMEDIATE, - * however DX11 appears to have the capability to do - * non-constant texture offsets. - */ -struct tgsi_texture_offset -{ - int Index : 16; - unsigned File : 4; /**< one of TGSI_FILE_x */ - unsigned SwizzleX : 2; /* TGSI_SWIZZLE_x */ - unsigned SwizzleY : 2; /* TGSI_SWIZZLE_x */ - unsigned SwizzleZ : 2; /* TGSI_SWIZZLE_x */ - unsigned Padding : 6; -}; - -/* - * For SM3, the following constraint applies. - * - Swizzle is either set to identity or replicate. - */ -struct tgsi_instruction_predicate -{ - int Index : 16; /* SINT */ - unsigned SwizzleX : 2; /* TGSI_SWIZZLE_x */ - unsigned SwizzleY : 2; /* TGSI_SWIZZLE_x */ - unsigned SwizzleZ : 2; /* TGSI_SWIZZLE_x */ - unsigned SwizzleW : 2; /* TGSI_SWIZZLE_x */ - unsigned Negate : 1; /* BOOL */ - unsigned Padding : 7; -}; - -/** - * File specifies the register array to access. - * - * Index specifies the element number of a register in the register file. - * - * If Indirect is TRUE, Index should be offset by the X component of a source - * register that follows. The register can be now fetched into local storage - * for further processing. - * - * If Negate is TRUE, all components of the fetched register are negated. - * - * The fetched register components are swizzled according to SwizzleX, SwizzleY, - * SwizzleZ and SwizzleW. - * - */ - -struct tgsi_src_register -{ - unsigned File : 4; /* TGSI_FILE_ */ - unsigned Indirect : 1; /* BOOL */ - unsigned Dimension : 1; /* BOOL */ - int Index : 16; /* SINT */ - unsigned SwizzleX : 2; /* TGSI_SWIZZLE_ */ - unsigned SwizzleY : 2; /* TGSI_SWIZZLE_ */ - unsigned SwizzleZ : 2; /* TGSI_SWIZZLE_ */ - unsigned SwizzleW : 2; /* TGSI_SWIZZLE_ */ - unsigned Absolute : 1; /* BOOL */ - unsigned Negate : 1; /* BOOL */ -}; - -/** - * If tgsi_src_register::Modifier is TRUE, tgsi_src_register_modifier follows. - * - * Then, if tgsi_src_register::Indirect is TRUE, another tgsi_src_register - * follows. - * - * Then, if tgsi_src_register::Dimension is TRUE, tgsi_dimension follows. - */ - - -struct tgsi_dimension -{ - unsigned Indirect : 1; /* BOOL */ - unsigned Dimension : 1; /* BOOL */ - unsigned Padding : 14; - int Index : 16; /* SINT */ -}; - -struct tgsi_dst_register -{ - unsigned File : 4; /* TGSI_FILE_ */ - unsigned WriteMask : 4; /* TGSI_WRITEMASK_ */ - unsigned Indirect : 1; /* BOOL */ - unsigned Dimension : 1; /* BOOL */ - int Index : 16; /* SINT */ - unsigned Padding : 6; -}; - - -#ifdef __cplusplus -} -#endif - -#endif /* P_SHADER_TOKENS_H */ diff --git a/dll/opengl/mesa/src/gallium/include/pipe/p_state.h b/dll/opengl/mesa/src/gallium/include/pipe/p_state.h deleted file mode 100644 index 024d544e3ef..00000000000 --- a/dll/opengl/mesa/src/gallium/include/pipe/p_state.h +++ /dev/null @@ -1,582 +0,0 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -/** - * @file - * - * Abstract graphics pipe state objects. - * - * Basic notes: - * 1. Want compact representations, so we use bitfields. - * 2. Put bitfields before other (GLfloat) fields. - */ - - -#ifndef PIPE_STATE_H -#define PIPE_STATE_H - -#include "p_compiler.h" -#include "p_defines.h" -#include "p_format.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -/** - * Implementation limits - */ -#define PIPE_MAX_ATTRIBS 32 -#define PIPE_MAX_CLIP_PLANES 8 -#define PIPE_MAX_COLOR_BUFS 8 -#define PIPE_MAX_CONSTANT_BUFFERS 32 -#define PIPE_MAX_SAMPLERS 16 -#define PIPE_MAX_VERTEX_SAMPLERS 16 -#define PIPE_MAX_GEOMETRY_SAMPLERS 16 -#define PIPE_MAX_SHADER_INPUTS 32 -#define PIPE_MAX_SHADER_OUTPUTS 32 -#define PIPE_MAX_SHADER_RESOURCES 32 -#define PIPE_MAX_TEXTURE_LEVELS 16 -#define PIPE_MAX_SO_BUFFERS 4 - - -struct pipe_reference -{ - int32_t count; /* atomic */ -}; - - - -/** - * Primitive (point/line/tri) rasterization info - */ -struct pipe_rasterizer_state -{ - unsigned flatshade:1; - unsigned light_twoside:1; - unsigned clamp_vertex_color:1; - unsigned clamp_fragment_color:1; - unsigned front_ccw:1; - unsigned cull_face:2; /**< PIPE_FACE_x */ - unsigned fill_front:2; /**< PIPE_POLYGON_MODE_x */ - unsigned fill_back:2; /**< PIPE_POLYGON_MODE_x */ - unsigned offset_point:1; - unsigned offset_line:1; - unsigned offset_tri:1; - unsigned scissor:1; - unsigned poly_smooth:1; - unsigned poly_stipple_enable:1; - unsigned point_smooth:1; - unsigned sprite_coord_mode:1; /**< PIPE_SPRITE_COORD_ */ - unsigned point_quad_rasterization:1; /** points rasterized as quads or points */ - unsigned point_size_per_vertex:1; /**< size computed in vertex shader */ - unsigned multisample:1; /* XXX maybe more ms state in future */ - unsigned line_smooth:1; - unsigned line_stipple_enable:1; - unsigned line_last_pixel:1; - - /** - * Use the first vertex of a primitive as the provoking vertex for - * flat shading. - */ - unsigned flatshade_first:1; - - /** - * When true, triangle rasterization uses (0.5, 0.5) pixel centers - * for determining pixel ownership. - * - * When false, triangle rasterization uses (0,0) pixel centers for - * determining pixel ownership. - * - * Triangle rasterization always uses a 'top,left' rule for pixel - * ownership, this just alters which point we consider the pixel - * center for that test. - */ - unsigned gl_rasterization_rules:1; - - /** - * When true, rasterization is disabled and no pixels are written. - * This only makes sense with the Stream Out functionality. - */ - unsigned rasterizer_discard:1; - - /** - * When false, depth clipping is disabled and the depth value will be - * clamped later at the per-pixel level before depth testing. - * This depends on PIPE_CAP_DEPTH_CLIP_DISABLE. - */ - unsigned depth_clip:1; - - /** - * Enable bits for clipping half-spaces. - * This applies to both user clip planes and shader clip distances. - * Note that if the bound shader exports any clip distances, these - * replace all user clip planes, and clip half-spaces enabled here - * but not written by the shader count as disabled. - */ - unsigned clip_plane_enable:PIPE_MAX_CLIP_PLANES; - - unsigned line_stipple_factor:8; /**< [1..256] actually */ - unsigned line_stipple_pattern:16; - - unsigned sprite_coord_enable:PIPE_MAX_SHADER_OUTPUTS; - - float line_width; - float point_size; /**< used when no per-vertex size */ - float offset_units; - float offset_scale; - float offset_clamp; -}; - - -struct pipe_poly_stipple -{ - unsigned stipple[32]; -}; - - -struct pipe_viewport_state -{ - float scale[4]; - float translate[4]; -}; - - -struct pipe_scissor_state -{ - unsigned minx:16; - unsigned miny:16; - unsigned maxx:16; - unsigned maxy:16; -}; - - -struct pipe_clip_state -{ - float ucp[PIPE_MAX_CLIP_PLANES][4]; -}; - - -/** - * Stream output for vertex transform feedback. - */ -struct pipe_stream_output_info -{ - unsigned num_outputs; - /** stride for an entire vertex, only used if all output_buffers are 0 */ - unsigned stride; - /** - * Array of stream outputs, in the order they are to be written in. - * Selected components are tightly packed into the output buffer. - */ - struct { - unsigned register_index:8; /**< 0 to PIPE_MAX_SHADER_OUTPUTS */ - unsigned register_mask:4; /**< TGSI_WRITEMASK_x */ - unsigned output_buffer:4; /**< 0 to PIPE_MAX_SO_BUFFERS */ - } output[PIPE_MAX_SHADER_OUTPUTS]; -}; - - -struct pipe_shader_state -{ - const struct tgsi_token *tokens; - struct pipe_stream_output_info stream_output; -}; - - -struct pipe_depth_state -{ - unsigned enabled:1; /**< depth test enabled? */ - unsigned writemask:1; /**< allow depth buffer writes? */ - unsigned func:3; /**< depth test func (PIPE_FUNC_x) */ -}; - - -struct pipe_stencil_state -{ - unsigned enabled:1; /**< stencil[0]: stencil enabled, stencil[1]: two-side enabled */ - unsigned func:3; /**< PIPE_FUNC_x */ - unsigned fail_op:3; /**< PIPE_STENCIL_OP_x */ - unsigned zpass_op:3; /**< PIPE_STENCIL_OP_x */ - unsigned zfail_op:3; /**< PIPE_STENCIL_OP_x */ - unsigned valuemask:8; - unsigned writemask:8; -}; - - -struct pipe_alpha_state -{ - unsigned enabled:1; - unsigned func:3; /**< PIPE_FUNC_x */ - float ref_value; /**< reference value */ -}; - - -struct pipe_depth_stencil_alpha_state -{ - struct pipe_depth_state depth; - struct pipe_stencil_state stencil[2]; /**< [0] = front, [1] = back */ - struct pipe_alpha_state alpha; -}; - - -struct pipe_rt_blend_state -{ - unsigned blend_enable:1; - - unsigned rgb_func:3; /**< PIPE_BLEND_x */ - unsigned rgb_src_factor:5; /**< PIPE_BLENDFACTOR_x */ - unsigned rgb_dst_factor:5; /**< PIPE_BLENDFACTOR_x */ - - unsigned alpha_func:3; /**< PIPE_BLEND_x */ - unsigned alpha_src_factor:5; /**< PIPE_BLENDFACTOR_x */ - unsigned alpha_dst_factor:5; /**< PIPE_BLENDFACTOR_x */ - - unsigned colormask:4; /**< bitmask of PIPE_MASK_R/G/B/A */ -}; - -struct pipe_blend_state -{ - unsigned independent_blend_enable:1; - unsigned logicop_enable:1; - unsigned logicop_func:4; /**< PIPE_LOGICOP_x */ - unsigned dither:1; - unsigned alpha_to_coverage:1; - unsigned alpha_to_one:1; - struct pipe_rt_blend_state rt[PIPE_MAX_COLOR_BUFS]; -}; - - -struct pipe_blend_color -{ - float color[4]; -}; - -struct pipe_stencil_ref -{ - ubyte ref_value[2]; -}; - -struct pipe_framebuffer_state -{ - unsigned width, height; - - /** multiple color buffers for multiple render targets */ - unsigned nr_cbufs; - struct pipe_surface *cbufs[PIPE_MAX_COLOR_BUFS]; - - struct pipe_surface *zsbuf; /**< Z/stencil buffer */ -}; - - -/** - * Texture sampler state. - */ -struct pipe_sampler_state -{ - unsigned wrap_s:3; /**< PIPE_TEX_WRAP_x */ - unsigned wrap_t:3; /**< PIPE_TEX_WRAP_x */ - unsigned wrap_r:3; /**< PIPE_TEX_WRAP_x */ - unsigned min_img_filter:2; /**< PIPE_TEX_FILTER_x */ - unsigned min_mip_filter:2; /**< PIPE_TEX_MIPFILTER_x */ - unsigned mag_img_filter:2; /**< PIPE_TEX_FILTER_x */ - unsigned compare_mode:1; /**< PIPE_TEX_COMPARE_x */ - unsigned compare_func:3; /**< PIPE_FUNC_x */ - unsigned normalized_coords:1; /**< Are coords normalized to [0,1]? */ - unsigned max_anisotropy:6; - unsigned seamless_cube_map:1; - float lod_bias; /**< LOD/lambda bias */ - float min_lod, max_lod; /**< LOD clamp range, after bias */ - union pipe_color_union border_color; -}; - - -/** - * A view into a texture that can be bound to a color render target / - * depth stencil attachment point. - */ -struct pipe_surface -{ - struct pipe_reference reference; - struct pipe_resource *texture; /**< resource into which this is a view */ - struct pipe_context *context; /**< context this view belongs to */ - enum pipe_format format; - - /* XXX width/height should be removed */ - unsigned width; /**< logical width in pixels */ - unsigned height; /**< logical height in pixels */ - - unsigned usage; /**< bitmask of PIPE_BIND_x */ - - union { - struct { - unsigned level; - unsigned first_layer:16; - unsigned last_layer:16; - } tex; - struct { - unsigned first_element; - unsigned last_element; - } buf; - } u; -}; - - -/** - * A view into a texture that can be bound to a shader stage. - */ -struct pipe_sampler_view -{ - struct pipe_reference reference; - enum pipe_format format; /**< typed PIPE_FORMAT_x */ - struct pipe_resource *texture; /**< texture into which this is a view */ - struct pipe_context *context; /**< context this view belongs to */ - union { - struct { - unsigned first_layer:16; /**< first layer to use for array textures */ - unsigned last_layer:16; /**< last layer to use for array textures */ - unsigned first_level:8; /**< first mipmap level to use */ - unsigned last_level:8; /**< last mipmap level to use */ - } tex; - struct { - unsigned first_element; - unsigned last_element; - } buf; - } u; - unsigned swizzle_r:3; /**< PIPE_SWIZZLE_x for red component */ - unsigned swizzle_g:3; /**< PIPE_SWIZZLE_x for green component */ - unsigned swizzle_b:3; /**< PIPE_SWIZZLE_x for blue component */ - unsigned swizzle_a:3; /**< PIPE_SWIZZLE_x for alpha component */ -}; - - -/** - * Subregion of 1D/2D/3D image resource. - */ -struct pipe_box -{ - unsigned x; - unsigned y; - unsigned z; - unsigned width; - unsigned height; - unsigned depth; -}; - - -/** - * A memory object/resource such as a vertex buffer or texture. - */ -struct pipe_resource -{ - struct pipe_reference reference; - struct pipe_screen *screen; /**< screen that this texture belongs to */ - enum pipe_texture_target target; /**< PIPE_TEXTURE_x */ - enum pipe_format format; /**< PIPE_FORMAT_x */ - - unsigned width0; - unsigned height0; - unsigned depth0; - unsigned array_size; - - unsigned last_level:8; /**< Index of last mipmap level present/defined */ - unsigned nr_samples:8; /**< for multisampled surfaces, nr of samples */ - unsigned usage:8; /**< PIPE_USAGE_x (not a bitmask) */ - - unsigned bind; /**< bitmask of PIPE_BIND_x */ - unsigned flags; /**< bitmask of PIPE_RESOURCE_FLAG_x */ -}; - - -/** - * Transfer object. For data transfer to/from a resource. - */ -struct pipe_transfer -{ - struct pipe_resource *resource; /**< resource to transfer to/from */ - unsigned level; /**< texture mipmap level */ - enum pipe_transfer_usage usage; - struct pipe_box box; /**< region of the resource to access */ - unsigned stride; /**< row stride in bytes */ - unsigned layer_stride; /**< image/layer stride in bytes */ - void *data; -}; - - - -/** - * A vertex buffer. Typically, all the vertex data/attributes for - * drawing something will be in one buffer. But it's also possible, for - * example, to put colors in one buffer and texcoords in another. - */ -struct pipe_vertex_buffer -{ - unsigned stride; /**< stride to same attrib in next vertex, in bytes */ - unsigned buffer_offset; /**< offset to start of data in buffer, in bytes */ - struct pipe_resource *buffer; /**< the actual buffer */ -}; - - -/** - * A stream output target. The structure specifies the range vertices can - * be written to. - * - * In addition to that, the structure should internally maintain the offset - * into the buffer, which should be incremented everytime something is written - * (appended) to it. The internal offset is buffer_offset + how many bytes - * have been written. The internal offset can be stored on the device - * and the CPU actually doesn't have to query it. - * - * Use PIPE_QUERY_SO_STATISTICS to know how many primitives have - * actually been written. - */ -struct pipe_stream_output_target -{ - struct pipe_reference reference; - struct pipe_resource *buffer; /**< buffer into which this is a target view */ - struct pipe_context *context; /**< context this view belongs to */ - - unsigned buffer_offset; /**< offset where data should be written, in bytes */ - unsigned buffer_size; /**< how much data is allowed to be written */ -}; - - -/** - * Information to describe a vertex attribute (position, color, etc) - */ -struct pipe_vertex_element -{ - /** Offset of this attribute, in bytes, from the start of the vertex */ - unsigned src_offset; - - /** Instance data rate divisor. 0 means this is per-vertex data, - * n means per-instance data used for n consecutive instances (n > 0). - */ - unsigned instance_divisor; - - /** Which vertex_buffer (as given to pipe->set_vertex_buffer()) does - * this attribute live in? - */ - unsigned vertex_buffer_index; - - enum pipe_format src_format; -}; - - -/** - * An index buffer. When an index buffer is bound, all indices to vertices - * will be looked up in the buffer. - */ -struct pipe_index_buffer -{ - unsigned index_size; /**< size of an index, in bytes */ - unsigned offset; /**< offset to start of data in buffer, in bytes */ - struct pipe_resource *buffer; /**< the actual buffer */ -}; - - -/** - * Information to describe a draw_vbo call. - */ -struct pipe_draw_info -{ - boolean indexed; /**< use index buffer */ - - unsigned mode; /**< the mode of the primitive */ - unsigned start; /**< the index of the first vertex */ - unsigned count; /**< number of vertices */ - - unsigned start_instance; /**< first instance id */ - unsigned instance_count; /**< number of instances */ - - /** - * For indexed drawing, these fields apply after index lookup. - */ - int index_bias; /**< a bias to be added to each index */ - unsigned min_index; /**< the min index */ - unsigned max_index; /**< the max index */ - - /** - * Primitive restart enable/index (only applies to indexed drawing) - */ - boolean primitive_restart; - unsigned restart_index; - - /** - * Stream output target. If not NULL, it's used to provide the 'count' - * parameter based on the number vertices captured by the stream output - * stage. (or generally, based on the number of bytes captured) - * - * Only 'mode', 'start_instance', and 'instance_count' are taken into - * account, all the other variables from pipe_draw_info are ignored. - * - * 'start' is implicitly 0 and 'count' is set as discussed above. - * The draw command is non-indexed. - * - * Note that this only provides the count. The vertex buffers must - * be set via set_vertex_buffers manually. - */ - struct pipe_stream_output_target *count_from_stream_output; -}; - - -/** - * Information to describe a resource_resolve call. - */ -struct pipe_resolve_info -{ - struct { - struct pipe_resource *res; - unsigned level; - unsigned layer; - int x0; /**< always left */ - int y0; /**< always top */ - int x1; /**< determines scale if PIPE_CAP_SCALED_RESOLVE is supported */ - int y1; /**< determines scale if PIPE_CAP_SCALED_RESOLVE is supported */ - } dst; - - struct { - struct pipe_resource *res; - unsigned layer; - int x0; - int y0; - int x1; /**< may be < x0 only if PIPE_CAP_SCALED_RESOLVE is supported */ - int y1; /**< may be < y1 even if PIPE_CAP_SCALED_RESOLVE not supported */ - } src; - - unsigned mask; /**< PIPE_MASK_RGBA, Z, S or ZS */ -}; - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/dll/opengl/mesa/src/gallium/include/pipe/p_video_decoder.h b/dll/opengl/mesa/src/gallium/include/pipe/p_video_decoder.h deleted file mode 100644 index 69e59a6fa4b..00000000000 --- a/dll/opengl/mesa/src/gallium/include/pipe/p_video_decoder.h +++ /dev/null @@ -1,172 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 Younes Manton. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef PIPE_VIDEO_CONTEXT_H -#define PIPE_VIDEO_CONTEXT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "pipe/p_video_state.h" - -struct pipe_screen; -struct pipe_surface; -struct pipe_macroblock; -struct pipe_picture_desc; -struct pipe_fence_handle; - -/** - * Gallium video decoder for a specific codec/profile - */ -struct pipe_video_decoder -{ - struct pipe_context *context; - - enum pipe_video_profile profile; - enum pipe_video_entrypoint entrypoint; - enum pipe_video_chroma_format chroma_format; - unsigned width; - unsigned height; - unsigned max_references; - - /** - * destroy this video decoder - */ - void (*destroy)(struct pipe_video_decoder *decoder); - - /** - * set the picture parameters for the next frame - * only used for bitstream decoding - */ - void (*set_picture_parameters)(struct pipe_video_decoder *decoder, - struct pipe_picture_desc *picture); - - /** - * set the quantification matrixes - */ - void (*set_quant_matrix)(struct pipe_video_decoder *decoder, - const struct pipe_quant_matrix *matrix); - - /** - * set target where video data is decoded to - */ - void (*set_decode_target)(struct pipe_video_decoder *decoder, - struct pipe_video_buffer *target); - - /** - * set reference frames for motion compensation - */ - void (*set_reference_frames)(struct pipe_video_decoder *decoder, - struct pipe_video_buffer **ref_frames, - unsigned num_ref_frames); - - /** - * start decoding of a new frame - */ - void (*begin_frame)(struct pipe_video_decoder *decoder); - - /** - * decode a macroblock - */ - void (*decode_macroblock)(struct pipe_video_decoder *decoder, - const struct pipe_macroblock *macroblocks, - unsigned num_macroblocks); - - /** - * decode a bitstream - */ - void (*decode_bitstream)(struct pipe_video_decoder *decoder, - unsigned num_buffers, - const void * const *buffers, - const unsigned *sizes); - - /** - * end decoding of the current frame - */ - void (*end_frame)(struct pipe_video_decoder *decoder); - - /** - * flush any outstanding command buffers to the hardware - * should be called before a video_buffer is acessed by the state tracker again - */ - void (*flush)(struct pipe_video_decoder *decoder); -}; - -/** - * output for decoding / input for displaying - */ -struct pipe_video_buffer -{ - struct pipe_context *context; - - enum pipe_format buffer_format; - enum pipe_video_chroma_format chroma_format; - unsigned width; - unsigned height; - - /** - * destroy this video buffer - */ - void (*destroy)(struct pipe_video_buffer *buffer); - - /** - * get a individual sampler view for each plane - */ - struct pipe_sampler_view **(*get_sampler_view_planes)(struct pipe_video_buffer *buffer); - - /** - * get a individual sampler view for each component - */ - struct pipe_sampler_view **(*get_sampler_view_components)(struct pipe_video_buffer *buffer); - - /** - * get a individual surfaces for each plane - */ - struct pipe_surface **(*get_surfaces)(struct pipe_video_buffer *buffer); - - /* - * auxiliary associated data - */ - void *associated_data; - - /* - * decoder where the associated data came from - */ - struct pipe_video_decoder *decoder; - - /* - * destroy the associated data - */ - void (*destroy_associated_data)(void *associated_data); -}; - -#ifdef __cplusplus -} -#endif - -#endif /* PIPE_VIDEO_CONTEXT_H */ diff --git a/dll/opengl/mesa/src/gallium/include/pipe/p_video_enums.h b/dll/opengl/mesa/src/gallium/include/pipe/p_video_enums.h deleted file mode 100644 index 13786067d53..00000000000 --- a/dll/opengl/mesa/src/gallium/include/pipe/p_video_enums.h +++ /dev/null @@ -1,74 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 Younes Manton. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef PIPE_VIDEO_ENUMS_H -#define PIPE_VIDEO_ENUMS_H - -enum pipe_video_profile -{ - PIPE_VIDEO_PROFILE_UNKNOWN, - PIPE_VIDEO_PROFILE_MPEG1, - PIPE_VIDEO_PROFILE_MPEG2_SIMPLE, - PIPE_VIDEO_PROFILE_MPEG2_MAIN, - PIPE_VIDEO_PROFILE_MPEG4_SIMPLE, - PIPE_VIDEO_PROFILE_MPEG4_ADVANCED_SIMPLE, - PIPE_VIDEO_PROFILE_VC1_SIMPLE, - PIPE_VIDEO_PROFILE_VC1_MAIN, - PIPE_VIDEO_PROFILE_VC1_ADVANCED, - PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE, - PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN, - PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH -}; - -/* Video caps, can be different for each codec/profile */ -enum pipe_video_cap -{ - PIPE_VIDEO_CAP_SUPPORTED = 0, - PIPE_VIDEO_CAP_NPOT_TEXTURES = 1, - PIPE_VIDEO_CAP_MAX_WIDTH = 2, - PIPE_VIDEO_CAP_MAX_HEIGHT = 3 -}; - -enum pipe_video_codec -{ - PIPE_VIDEO_CODEC_UNKNOWN = 0, - PIPE_VIDEO_CODEC_MPEG12, /**< MPEG1, MPEG2 */ - PIPE_VIDEO_CODEC_MPEG4, /**< DIVX, XVID */ - PIPE_VIDEO_CODEC_VC1, /**< WMV */ - PIPE_VIDEO_CODEC_MPEG4_AVC /**< H.264 */ -}; - -enum pipe_video_entrypoint -{ - PIPE_VIDEO_ENTRYPOINT_UNKNOWN, - PIPE_VIDEO_ENTRYPOINT_BITSTREAM, - PIPE_VIDEO_ENTRYPOINT_IDCT, - PIPE_VIDEO_ENTRYPOINT_MC -}; - - -#endif /* PIPE_VIDEO_ENUMS_H */ diff --git a/dll/opengl/mesa/src/gallium/include/pipe/p_video_state.h b/dll/opengl/mesa/src/gallium/include/pipe/p_video_state.h deleted file mode 100644 index 9a70eb7c468..00000000000 --- a/dll/opengl/mesa/src/gallium/include/pipe/p_video_state.h +++ /dev/null @@ -1,256 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 Younes Manton. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef PIPE_VIDEO_STATE_H -#define PIPE_VIDEO_STATE_H - -#include "pipe/p_defines.h" -#include "pipe/p_format.h" -#include "pipe/p_state.h" -#include "pipe/p_screen.h" -#include "util/u_inlines.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct pipe_video_rect -{ - unsigned x, y, w, h; -}; - -/* - * see table 6-12 in the spec - */ -enum pipe_mpeg12_picture_coding_type -{ - PIPE_MPEG12_PICTURE_CODING_TYPE_I = 0x01, - PIPE_MPEG12_PICTURE_CODING_TYPE_P = 0x02, - PIPE_MPEG12_PICTURE_CODING_TYPE_B = 0x03, - PIPE_MPEG12_PICTURE_CODING_TYPE_D = 0x04 -}; - -/* - * see table 6-14 in the spec - */ -enum pipe_mpeg12_picture_structure -{ - PIPE_MPEG12_PICTURE_STRUCTURE_RESERVED = 0x00, - PIPE_MPEG12_PICTURE_STRUCTURE_FIELD_TOP = 0x01, - PIPE_MPEG12_PICTURE_STRUCTURE_FIELD_BOTTOM = 0x02, - PIPE_MPEG12_PICTURE_STRUCTURE_FRAME = 0x03 -}; - -/* - * flags for macroblock_type, see section 6.3.17.1 in the spec - */ -enum pipe_mpeg12_macroblock_type -{ - PIPE_MPEG12_MB_TYPE_QUANT = 0x01, - PIPE_MPEG12_MB_TYPE_MOTION_FORWARD = 0x02, - PIPE_MPEG12_MB_TYPE_MOTION_BACKWARD = 0x04, - PIPE_MPEG12_MB_TYPE_PATTERN = 0x08, - PIPE_MPEG12_MB_TYPE_INTRA = 0x10 -}; - -/* - * flags for motion_type, see table 6-17 and 6-18 in the spec - */ -enum pipe_mpeg12_motion_type -{ - PIPE_MPEG12_MO_TYPE_RESERVED = 0x00, - PIPE_MPEG12_MO_TYPE_FIELD = 0x01, - PIPE_MPEG12_MO_TYPE_FRAME = 0x02, - PIPE_MPEG12_MO_TYPE_16x8 = 0x02, - PIPE_MPEG12_MO_TYPE_DUAL_PRIME = 0x03 -}; - -/* - * see section 6.3.17.1 and table 6-19 in the spec - */ -enum pipe_mpeg12_dct_type -{ - PIPE_MPEG12_DCT_TYPE_FRAME = 0, - PIPE_MPEG12_DCT_TYPE_FIELD = 1 -}; - -enum pipe_mpeg12_field_select -{ - PIPE_MPEG12_FS_FIRST_FORWARD = 0x01, - PIPE_MPEG12_FS_FIRST_BACKWARD = 0x02, - PIPE_MPEG12_FS_SECOND_FORWARD = 0x04, - PIPE_MPEG12_FS_SECOND_BACKWARD = 0x08 -}; - -struct pipe_picture_desc -{ - enum pipe_video_profile profile; -}; - -struct pipe_quant_matrix -{ - enum pipe_video_codec codec; -}; - -struct pipe_macroblock -{ - enum pipe_video_codec codec; -}; - -struct pipe_mpeg12_picture_desc -{ - struct pipe_picture_desc base; - - unsigned picture_coding_type; - unsigned picture_structure; - unsigned frame_pred_frame_dct; - unsigned q_scale_type; - unsigned alternate_scan; - unsigned intra_vlc_format; - unsigned concealment_motion_vectors; - unsigned intra_dc_precision; - unsigned f_code[2][2]; - unsigned top_field_first; - unsigned full_pel_forward_vector; - unsigned full_pel_backward_vector; - unsigned num_slices; -}; - -struct pipe_mpeg12_quant_matrix -{ - struct pipe_quant_matrix base; - - const uint8_t *intra_matrix; - const uint8_t *non_intra_matrix; -}; - -struct pipe_mpeg12_macroblock -{ - struct pipe_macroblock base; - - /* see section 6.3.17 in the spec */ - unsigned short x, y; - - /* see section 6.3.17.1 in the spec */ - unsigned char macroblock_type; - - union { - struct { - /* see table 6-17 in the spec */ - unsigned int frame_motion_type:2; - - /* see table 6-18 in the spec */ - unsigned int field_motion_type:2; - - /* see table 6-19 in the spec */ - unsigned int dct_type:1; - } bits; - unsigned int value; - } macroblock_modes; - - /* see section 6.3.17.2 in the spec */ - unsigned char motion_vertical_field_select; - - /* see Table 7-7 in the spec */ - short PMV[2][2][2]; - - /* see figure 6.10-12 in the spec */ - unsigned short coded_block_pattern; - - /* see figure 6.10-12 in the spec */ - short *blocks; - - /* Number of skipped macroblocks after this macroblock */ - unsigned short num_skipped_macroblocks; -}; - -struct pipe_mpeg4_picture_desc -{ - struct pipe_picture_desc base; - int32_t trd[2]; - int32_t trb[2]; - uint16_t vop_time_increment_resolution; - uint8_t vop_coding_type; - uint8_t vop_fcode_forward; - uint8_t vop_fcode_backward; - uint8_t resync_marker_disable; - uint8_t interlaced; - uint8_t quant_type; - uint8_t quarter_sample; - uint8_t short_video_header; - uint8_t rounding_control; - uint8_t alternate_vertical_scan_flag; - uint8_t top_field_first; -}; - -struct pipe_mpeg4_quant_matrix -{ - struct pipe_quant_matrix base; - - const uint8_t *intra_matrix; - const uint8_t *non_intra_matrix; -}; - -struct pipe_vc1_picture_desc -{ - struct pipe_picture_desc base; - uint32_t slice_count; - uint8_t picture_type; - uint8_t frame_coding_mode; - uint8_t postprocflag; - uint8_t pulldown; - uint8_t interlace; - uint8_t tfcntrflag; - uint8_t finterpflag; - uint8_t psf; - uint8_t dquant; - uint8_t panscan_flag; - uint8_t refdist_flag; - uint8_t quantizer; - uint8_t extended_mv; - uint8_t extended_dmv; - uint8_t overlap; - uint8_t vstransform; - uint8_t loopfilter; - uint8_t fastuvmc; - uint8_t range_mapy_flag; - uint8_t range_mapy; - uint8_t range_mapuv_flag; - uint8_t range_mapuv; - uint8_t multires; - uint8_t syncmarker; - uint8_t rangered; - uint8_t maxbframes; - uint8_t deblockEnable; - uint8_t pquant; -}; - -#ifdef __cplusplus -} -#endif - -#endif /* PIPE_VIDEO_STATE_H */ diff --git a/dll/opengl/mesa/src/gallium/include/state_tracker/drisw_api.h b/dll/opengl/mesa/src/gallium/include/state_tracker/drisw_api.h deleted file mode 100644 index 944a649257e..00000000000 --- a/dll/opengl/mesa/src/gallium/include/state_tracker/drisw_api.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef _DRISW_API_H_ -#define _DRISW_API_H_ - -#include "pipe/p_compiler.h" - -struct pipe_screen; -struct dri_drawable; - -/** - * This callback struct is intended for the winsys to call the loader. - */ -struct drisw_loader_funcs -{ - void (*put_image) (struct dri_drawable *dri_drawable, - void *data, unsigned width, unsigned height); -}; - -/** - * Implemented by the drisw target. - */ -struct pipe_screen * drisw_create_screen(struct drisw_loader_funcs *lf); - -#endif diff --git a/dll/opengl/mesa/src/gallium/include/state_tracker/drm_driver.h b/dll/opengl/mesa/src/gallium/include/state_tracker/drm_driver.h deleted file mode 100644 index 2df28599fe8..00000000000 --- a/dll/opengl/mesa/src/gallium/include/state_tracker/drm_driver.h +++ /dev/null @@ -1,116 +0,0 @@ - -#ifndef _DRM_DRIVER_H_ -#define _DRM_DRIVER_H_ - -#include "pipe/p_compiler.h" - -struct pipe_screen; -struct pipe_winsys; -struct pipe_context; -struct pipe_resource; - -#define DRM_API_HANDLE_TYPE_SHARED 0 -#define DRM_API_HANDLE_TYPE_KMS 1 - -/** - * For use with pipe_screen::{texture_from_handle|texture_get_handle}. - */ -struct winsys_handle -{ - /** - * Unused for texture_from_handle, always - * DRM_API_HANDLE_TYPE_SHARED. Input to texture_get_handle, - * use TEXTURE_USAGE to select handle for kms or ipc. - */ - unsigned type; - /** - * Input to texture_from_handle. - * Output for texture_get_handle. - */ - unsigned handle; - /** - * Input to texture_from_handle. - * Output for texture_get_handle. - */ - unsigned stride; -}; - - - -/** - * Configuration queries. - */ -enum drm_conf { - /* How many frames to allow before throttling. Or -1 to indicate any number */ - DRM_CONF_THROTTLE, /* DRM_CONF_INT. */ - DRM_CONF_MAX -}; - -/** - * Type of configuration answer - */ -enum drm_conf_type { - DRM_CONF_INT, - DRM_CONF_BOOL, - DRM_CONF_FLOAT, - DRM_CONF_POINTER -}; - -/** - * Return value from the configuration function. - */ -struct drm_conf_ret { - enum drm_conf_type type; - union { - int val_int; - bool val_bool; - float val_float; - void *val_pointer; - } val; -}; - -struct drm_driver_descriptor -{ - /** - * Identifying sufix/prefix of the binary, used by egl. - */ - const char *name; - - /** - * Kernel driver name, as accepted by drmOpenByName. - */ - const char *driver_name; - - /** - * Create a pipe srcreen. - * - * This function does any wrapping of the screen. - * For example wrapping trace or rbug debugging drivers around it. - */ - struct pipe_screen* (*create_screen)(int drm_fd); - - - /** - * Return a configuration value. - * - * If this function is NULL, or if it returns NULL - * the state tracker- or state - * tracker manager should provide a reasonable default value. - */ - const struct drm_conf_ret *(*configuration) (enum drm_conf conf); -}; - -extern struct drm_driver_descriptor driver_descriptor; - -/** - * Instantiate a drm_driver_descriptor struct. - */ -#define DRM_DRIVER_DESCRIPTOR(name_str, driver_name_str, func, conf) \ -struct drm_driver_descriptor driver_descriptor = { \ - .name = name_str, \ - .driver_name = driver_name_str, \ - .create_screen = func, \ - .configuration = (conf), \ -}; - -#endif diff --git a/dll/opengl/mesa/src/gallium/include/state_tracker/graw.h b/dll/opengl/mesa/src/gallium/include/state_tracker/graw.h deleted file mode 100644 index 217fa31ba19..00000000000 --- a/dll/opengl/mesa/src/gallium/include/state_tracker/graw.h +++ /dev/null @@ -1,96 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef GALLIUM_RAW_H -#define GALLIUM_RAW_H - -/* This is an API for exercising gallium functionality in a - * platform-neutral fashion. Whatever platform integration is - * necessary to implement this interface is orchestrated by the - * individual target building this entity. - * - * For instance, the graw-xlib target includes code to implent these - * interfaces on top of the X window system. - * - * Programs using this interface may additionally benefit from some of - * the utilities currently in the libgallium.a library, especially - * those for parsing text representations of TGSI shaders. - */ - -#include "pipe/p_compiler.h" -#include "pipe/p_format.h" - -struct pipe_context; -struct pipe_screen; -struct pipe_surface; - -/* Returns a handle to be used with flush_frontbuffer()/present(). - * - * Query format support with screen::is_format_supported and usage - * XXX. - */ -PUBLIC struct pipe_screen *graw_create_window_and_screen( int x, - int y, - unsigned width, - unsigned height, - enum pipe_format format, - void **handle); - -PUBLIC void graw_set_display_func( void (*func)( void ) ); -PUBLIC void graw_main_loop( void ); - -PUBLIC void *graw_parse_geometry_shader( struct pipe_context *pipe, - const char *text ); - -PUBLIC void *graw_parse_vertex_shader( struct pipe_context *pipe, - const char *text ); - -PUBLIC void *graw_parse_fragment_shader( struct pipe_context *pipe, - const char *text ); - -/* Parse a single command-line option, if any. Options include: - * - * -o - * - * If an option has been successfully parsed, argi is updated - * to point just after the option and return TRUE. - */ -PUBLIC boolean graw_parse_args(int *argi, int argc, char *argv[]); - -/* Saves surface contents to a file. - * - * If filename is NULL, the filename provided with the `-o' option - * is used. If the option has not been specified, the surface - * will not be saved. - * - * Returns TRUE if the surface has been saved. - */ -PUBLIC boolean graw_save_surface_to_file(struct pipe_context *pipe, - struct pipe_surface *surface, - const char *filename); - -#endif diff --git a/dll/opengl/mesa/src/gallium/include/state_tracker/st_api.h b/dll/opengl/mesa/src/gallium/include/state_tracker/st_api.h deleted file mode 100644 index da49dc80fca..00000000000 --- a/dll/opengl/mesa/src/gallium/include/state_tracker/st_api.h +++ /dev/null @@ -1,479 +0,0 @@ -/********************************************************** - * Copyright 2010 VMware, Inc. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - **********************************************************/ - - -#ifndef _ST_API_H_ -#define _ST_API_H_ - -#include "pipe/p_compiler.h" -#include "pipe/p_format.h" - -/** - * \file API for communication between state trackers and state tracker - * managers. - * - * While both are state tackers, we use the term state tracker for rendering - * APIs such as OpenGL or OpenVG, and state tracker manager for window system - * APIs such as EGL or GLX in this file. - * - * This file defines an API to be implemented by both state trackers and state - * tracker managers. - */ - -/** - * The supported rendering API of a state tracker. - */ -enum st_api_type { - ST_API_OPENGL, - ST_API_OPENVG, - - ST_API_COUNT -}; - -/** - * The profile of a context. - */ -enum st_profile_type -{ - ST_PROFILE_DEFAULT, /**< OpenGL compatibility profile */ - ST_PROFILE_OPENGL_CORE, /**< OpenGL 3.2+ core profile */ - ST_PROFILE_OPENGL_ES1, /**< OpenGL ES 1.x */ - ST_PROFILE_OPENGL_ES2 /**< OpenGL ES 2.0 */ -}; - -/* for profile_mask in st_api */ -#define ST_PROFILE_DEFAULT_MASK (1 << ST_PROFILE_DEFAULT) -#define ST_PROFILE_OPENGL_CORE_MASK (1 << ST_PROFILE_OPENGL_CORE) -#define ST_PROFILE_OPENGL_ES1_MASK (1 << ST_PROFILE_OPENGL_ES1) -#define ST_PROFILE_OPENGL_ES2_MASK (1 << ST_PROFILE_OPENGL_ES2) - -/** - * New context flags for GL 3.0 and beyond. - * - * Profile information (core vs. compatibilty for OpenGL 3.2+) is communicated - * through the \c st_profile_type, not through flags. - */ -#define ST_CONTEXT_FLAG_DEBUG (1 << 0) -#define ST_CONTEXT_FLAG_FORWARD_COMPATIBLE (1 << 1) -#define ST_CONTEXT_FLAG_ROBUST_ACCESS (1 << 2) - -/** - * Reasons that context creation might fail. - */ -enum st_context_error { - ST_CONTEXT_SUCCESS = 0, - ST_CONTEXT_ERROR_NO_MEMORY, - ST_CONTEXT_ERROR_BAD_API, - ST_CONTEXT_ERROR_BAD_VERSION, - ST_CONTEXT_ERROR_BAD_FLAG, - ST_CONTEXT_ERROR_UNKNOWN_ATTRIBUTE, - ST_CONTEXT_ERROR_UNKNOWN_FLAG -}; - -/** - * Used in st_context_iface->teximage. - */ -enum st_texture_type { - ST_TEXTURE_1D, - ST_TEXTURE_2D, - ST_TEXTURE_3D, - ST_TEXTURE_RECT -}; - -/** - * Available attachments of framebuffer. - */ -enum st_attachment_type { - ST_ATTACHMENT_FRONT_LEFT, - ST_ATTACHMENT_BACK_LEFT, - ST_ATTACHMENT_FRONT_RIGHT, - ST_ATTACHMENT_BACK_RIGHT, - ST_ATTACHMENT_DEPTH_STENCIL, - ST_ATTACHMENT_ACCUM, - ST_ATTACHMENT_SAMPLE, - - ST_ATTACHMENT_COUNT, - ST_ATTACHMENT_INVALID = -1 -}; - -/* for buffer_mask in st_visual */ -#define ST_ATTACHMENT_FRONT_LEFT_MASK (1 << ST_ATTACHMENT_FRONT_LEFT) -#define ST_ATTACHMENT_BACK_LEFT_MASK (1 << ST_ATTACHMENT_BACK_LEFT) -#define ST_ATTACHMENT_FRONT_RIGHT_MASK (1 << ST_ATTACHMENT_FRONT_RIGHT) -#define ST_ATTACHMENT_BACK_RIGHT_MASK (1 << ST_ATTACHMENT_BACK_RIGHT) -#define ST_ATTACHMENT_DEPTH_STENCIL_MASK (1 << ST_ATTACHMENT_DEPTH_STENCIL) -#define ST_ATTACHMENT_ACCUM_MASK (1 << ST_ATTACHMENT_ACCUM) -#define ST_ATTACHMENT_SAMPLE_MASK (1 << ST_ATTACHMENT_SAMPLE) - -/** - * Enumerations of state tracker context resources. - */ -enum st_context_resource_type { - ST_CONTEXT_RESOURCE_OPENGL_TEXTURE_2D, - ST_CONTEXT_RESOURCE_OPENGL_TEXTURE_3D, - ST_CONTEXT_RESOURCE_OPENGL_TEXTURE_CUBE_MAP_POSITIVE_X, - ST_CONTEXT_RESOURCE_OPENGL_TEXTURE_CUBE_MAP_NEGATIVE_X, - ST_CONTEXT_RESOURCE_OPENGL_TEXTURE_CUBE_MAP_POSITIVE_Y, - ST_CONTEXT_RESOURCE_OPENGL_TEXTURE_CUBE_MAP_NEGATIVE_Y, - ST_CONTEXT_RESOURCE_OPENGL_TEXTURE_CUBE_MAP_POSITIVE_Z, - ST_CONTEXT_RESOURCE_OPENGL_TEXTURE_CUBE_MAP_NEGATIVE_Z, - ST_CONTEXT_RESOURCE_OPENGL_RENDERBUFFER, - ST_CONTEXT_RESOURCE_OPENVG_PARENT_IMAGE -}; - -/** - * Flush flags. - */ -#define ST_FLUSH_FRONT (1 << 0) - -/** - * Value to st_manager->get_param function. - */ -enum st_manager_param { - /** - * The dri state tracker on old libGL's doesn't do the right thing - * with regards to invalidating the framebuffers. - * - * For the mesa state tracker that means that it needs to invalidate - * the framebuffer in glViewport itself. - */ - ST_MANAGER_BROKEN_INVALIDATE -}; - -/** - * The return type of st_api->get_proc_address. - */ -typedef void (*st_proc_t)(void); - -struct pipe_context; -struct pipe_resource; -struct pipe_fence_handle; - -/** - * Used in st_context_iface->get_resource_for_egl_image. - */ -struct st_context_resource -{ - /* these fields are filled by the caller */ - enum st_context_resource_type type; - void *resource; - - /* this is owned by the caller */ - struct pipe_resource *texture; -}; - -/** - * Used in st_manager_iface->get_egl_image. - */ -struct st_egl_image -{ - /* this is owned by the caller */ - struct pipe_resource *texture; - - unsigned level; - unsigned layer; -}; - -/** - * Represent the visual of a framebuffer. - */ -struct st_visual -{ - /** - * Available buffers. Tested with ST_FRAMEBUFFER_*_MASK. - */ - unsigned buffer_mask; - - /** - * Buffer formats. The formats are always set even when the buffer is - * not available. - */ - enum pipe_format color_format; - enum pipe_format depth_stencil_format; - enum pipe_format accum_format; - int samples; - - /** - * Desired render buffer. - */ - enum st_attachment_type render_buffer; -}; - -/** - * Represent the attributes of a context. - */ -struct st_context_attribs -{ - /** - * The profile and minimal version to support. - * - * The valid profiles and versions are rendering API dependent. The latest - * version satisfying the request should be returned, unless the - * ST_CONTEXT_FLAG_FORWARD_COMPATIBLE bit is set. - */ - enum st_profile_type profile; - int major, minor; - - /** Mask of ST_CONTEXT_FLAG_x bits */ - unsigned flags; - - /** - * The visual of the framebuffers the context will be bound to. - */ - struct st_visual visual; -}; - -/** - * Represent a windowing system drawable. - * - * The framebuffer is implemented by the state tracker manager and - * used by the state trackers. - * - * Instead of the winsys pokeing into the API context to figure - * out what buffers that might be needed in the future by the API - * context, it calls into the framebuffer to get the textures. - * - * This structure along with the notify_invalid_framebuffer - * allows framebuffers to be shared between different threads - * but at the same make the API context free from thread - * syncronisation primitves, with the exception of a small - * atomic flag used for notification of framebuffer dirty status. - * - * The thread syncronisation is put inside the framebuffer - * and only called once the framebuffer has become dirty. - */ -struct st_framebuffer_iface -{ - /** - * Atomic stamp which changes when framebuffers need to be updated. - */ - - int32_t stamp; - - /** - * Available for the state tracker manager to use. - */ - void *st_manager_private; - - /** - * The visual of a framebuffer. - */ - const struct st_visual *visual; - - /** - * Flush the front buffer. - * - * On some window systems, changes to the front buffers are not immediately - * visible. They need to be flushed. - * - * @att is one of the front buffer attachments. - */ - boolean (*flush_front)(struct st_framebuffer_iface *stfbi, - enum st_attachment_type statt); - - /** - * The state tracker asks for the textures it needs. - * - * It should try to only ask for attachments that it currently renders - * to, thus allowing the winsys to delay the allocation of textures not - * needed. For example front buffer attachments are not needed if you - * only do back buffer rendering. - * - * The implementor of this function needs to also ensure - * thread safty as this call might be done from multiple threads. - * - * The returned textures are owned by the caller. They should be - * unreferenced when no longer used. If this function is called multiple - * times with different sets of attachments, those buffers not included in - * the last call might be destroyed. This behavior might change in the - * future. - */ - boolean (*validate)(struct st_framebuffer_iface *stfbi, - const enum st_attachment_type *statts, - unsigned count, - struct pipe_resource **out); -}; - -/** - * Represent a rendering context. - * - * This entity is created from st_api and used by the state tracker manager. - */ -struct st_context_iface -{ - /** - * Available for the state tracker and the manager to use. - */ - void *st_context_private; - void *st_manager_private; - - /** - * Destroy the context. - */ - void (*destroy)(struct st_context_iface *stctxi); - - /** - * Flush all drawing from context to the pipe also flushes the pipe. - */ - void (*flush)(struct st_context_iface *stctxi, unsigned flags, - struct pipe_fence_handle **fence); - - /** - * Replace the texture image of a texture object at the specified level. - * - * This function is optional. - */ - boolean (*teximage)(struct st_context_iface *stctxi, enum st_texture_type target, - int level, enum pipe_format internal_format, - struct pipe_resource *tex, boolean mipmap); - - /** - * Used to implement glXCopyContext. - */ - void (*copy)(struct st_context_iface *stctxi, - struct st_context_iface *stsrci, unsigned mask); - - /** - * Used to implement wglShareLists. - */ - boolean (*share)(struct st_context_iface *stctxi, - struct st_context_iface *stsrci); - - /** - * Look up and return the info of a resource for EGLImage. - * - * This function is optional. - */ - boolean (*get_resource_for_egl_image)(struct st_context_iface *stctxi, - struct st_context_resource *stres); -}; - - -/** - * Represent a state tracker manager. - * - * This interface is implemented by the state tracker manager. It corresponds - * to a "display" in the window system. - */ -struct st_manager -{ - struct pipe_screen *screen; - - /** - * Look up and return the info of an EGLImage. - * - * This is used to implement for example EGLImageTargetTexture2DOES. - * The GLeglImageOES agrument of that call is passed directly to this - * function call and the information needed to access this is returned - * in the given struct out. - * - * @smapi: manager owning the caller context - * @stctx: caller context - * @egl_image: EGLImage that caller recived - * @out: return struct filled out with access information. - * - * This function is optional. - */ - boolean (*get_egl_image)(struct st_manager *smapi, - void *egl_image, - struct st_egl_image *out); - - /** - * Query an manager param. - */ - int (*get_param)(struct st_manager *smapi, - enum st_manager_param param); -}; - -/** - * Represent a rendering API such as OpenGL or OpenVG. - * - * Implemented by the state tracker and used by the state tracker manager. - */ -struct st_api -{ - /** - * The name of the rendering API. This is informative. - */ - const char *name; - - /** - * The supported rendering API. - */ - enum st_api_type api; - - /** - * The supported profiles. Tested with ST_PROFILE_*_MASK. - */ - unsigned profile_mask; - - /** - * Destroy the API. - */ - void (*destroy)(struct st_api *stapi); - - /** - * Return an API entry point. - * - * For GL this is the same as _glapi_get_proc_address. - */ - st_proc_t (*get_proc_address)(struct st_api *stapi, const char *procname); - - /** - * Create a rendering context. - */ - struct st_context_iface *(*create_context)(struct st_api *stapi, - struct st_manager *smapi, - const struct st_context_attribs *attribs, - enum st_context_error *error, - struct st_context_iface *stsharei); - - /** - * Bind the context to the calling thread with draw and read as drawables. - * - * The framebuffers might be NULL, or might have different visuals than the - * context does. - */ - boolean (*make_current)(struct st_api *stapi, - struct st_context_iface *stctxi, - struct st_framebuffer_iface *stdrawi, - struct st_framebuffer_iface *streadi); - - /** - * Get the currently bound context in the calling thread. - */ - struct st_context_iface *(*get_current)(struct st_api *stapi); -}; - -/** - * Return true if the visual has the specified buffers. - */ -static INLINE boolean -st_visual_have_buffers(const struct st_visual *visual, unsigned mask) -{ - return ((visual->buffer_mask & mask) == mask); -} - -#endif /* _ST_API_H_ */ diff --git a/dll/opengl/mesa/src/gallium/include/state_tracker/sw_winsys.h b/dll/opengl/mesa/src/gallium/include/state_tracker/sw_winsys.h deleted file mode 100644 index 0b11fe3beb9..00000000000 --- a/dll/opengl/mesa/src/gallium/include/state_tracker/sw_winsys.h +++ /dev/null @@ -1,145 +0,0 @@ -/************************************************************************** - * - * Copyright 2007-2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * Software rasterizer winsys. - */ - - -#ifndef SW_WINSYS_H -#define SW_WINSYS_H - - -#include "pipe/p_compiler.h" /* for boolean */ -#include "pipe/p_format.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -struct winsys_handle; -struct pipe_screen; -struct pipe_context; -struct pipe_resource; - - -/** - * Opaque pointer. - */ -struct sw_displaytarget; - - -/** - * This is the interface that sw expects any window system - * hosting it to implement. - * - * sw is for the most part a self sufficient driver. The only thing it - * does not know is how to display a surface. - */ -struct sw_winsys -{ - void - (*destroy)( struct sw_winsys *ws ); - - boolean - (*is_displaytarget_format_supported)( struct sw_winsys *ws, - unsigned tex_usage, - enum pipe_format format ); - - /** - * Allocate storage for a render target. - * - * Often surfaces which are meant to be blitted to the front screen (i.e., - * display targets) must be allocated with special characteristics, memory - * pools, or obtained directly from the windowing system. - * - * This callback is invoked by the pipe_screen when creating a texture marked - * with the PIPE_BIND_DISPLAY_TARGET flag to get the underlying - * storage. - */ - struct sw_displaytarget * - (*displaytarget_create)( struct sw_winsys *ws, - unsigned tex_usage, - enum pipe_format format, - unsigned width, unsigned height, - unsigned alignment, - unsigned *stride ); - - /** - * Used to implement texture_from_handle. - */ - struct sw_displaytarget * - (*displaytarget_from_handle)( struct sw_winsys *ws, - const struct pipe_resource *templat, - struct winsys_handle *whandle, - unsigned *stride ); - - /** - * Used to implement texture_get_handle. - */ - boolean - (*displaytarget_get_handle)( struct sw_winsys *ws, - struct sw_displaytarget *dt, - struct winsys_handle *whandle ); - - /** - * \param flags bitmask of PIPE_TRANSFER_x flags - */ - void * - (*displaytarget_map)( struct sw_winsys *ws, - struct sw_displaytarget *dt, - unsigned flags ); - - void - (*displaytarget_unmap)( struct sw_winsys *ws, - struct sw_displaytarget *dt ); - - /** - * @sa pipe_screen:flush_frontbuffer. - * - * This call will likely become asynchronous eventually. - */ - void - (*displaytarget_display)( struct sw_winsys *ws, - struct sw_displaytarget *dt, - void *context_private ); - - void - (*displaytarget_destroy)( struct sw_winsys *ws, - struct sw_displaytarget *dt ); -}; - - - -#ifdef __cplusplus -} -#endif - -#endif /* SW_WINSYS_H */ diff --git a/dll/opengl/mesa/src/gallium/include/state_tracker/xlib_sw_winsys.h b/dll/opengl/mesa/src/gallium/include/state_tracker/xlib_sw_winsys.h deleted file mode 100644 index 4e7ccc13ac8..00000000000 --- a/dll/opengl/mesa/src/gallium/include/state_tracker/xlib_sw_winsys.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef XLIB_SW_WINSYS_H -#define XLIB_SW_WINSYS_H - -#include "state_tracker/sw_winsys.h" -#include - - -struct pipe_screen; -struct pipe_resource; - -/* This is what the xlib software winsys expects to find in the - * "private" field of flush_frontbuffers(). - * - * Xlib-based state trackers somehow need to know this. - */ -struct xlib_drawable { - Visual *visual; - int depth; - Drawable drawable; -}; - - -/* This is the public interface to the ws/xlib module. Why isn't it - * being defined in that directory? - */ -struct sw_winsys *xlib_create_sw_winsys( Display *display ); - - -#endif diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/CMakeLists.txt b/dll/opengl/mesa/src/gallium/state_trackers/wgl/CMakeLists.txt deleted file mode 100644 index cf85011cb0a..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ - -add_definitions( - -D_GDI32_ # prevent gl* being declared __declspec(dllimport) in MS headers - -DBUILD_GL32 # declare gl* as __declspec(dllexport) in Mesa headers - -D_GLAPI_NO_EXPORTS # prevent _glapi_* from being declared __declspec(dllimport) - -DWIN32_LEAN_AND_MEAN -) -if(NOT MSVC) - add_compile_flags("-Wno-implicit-function-declaration") -endif() - -include_directories( - ../../../mapi - ../../../mesa - .) - -list( APPEND SOURCE - stw_context.c - stw_device.c - stw_ext_context.c - stw_ext_extensionsstring.c - stw_ext_gallium.c - stw_ext_pbuffer.c - stw_ext_pixelformat.c - stw_ext_swapinterval.c - stw_framebuffer.c - stw_getprocaddress.c - stw_pixelformat.c - stw_st.c - stw_tls.c - stw_wgl.c -) - -add_library(gallium_wgl STATIC EXCLUDE_FROM_ALL ${SOURCE}) \ No newline at end of file diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/SConscript b/dll/opengl/mesa/src/gallium/state_trackers/wgl/SConscript deleted file mode 100644 index 1014b45c367..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/SConscript +++ /dev/null @@ -1,43 +0,0 @@ -import os - -Import('*') - -env = env.Clone() - -env.Append(CPPPATH = [ - '#src/mapi', - '#src/mesa', - '.', -]) - -env.AppendUnique(CPPDEFINES = [ - '_GDI32_', # prevent wgl* being declared __declspec(dllimport) - 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers - 'WIN32_LEAN_AND_MEAN', # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx -]) -if not env['gles']: - # prevent _glapi_* from being declared __declspec(dllimport) - env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS']) - -sources = [ - 'stw_context.c', - 'stw_device.c', - 'stw_ext_context.c', - 'stw_ext_extensionsstring.c', - 'stw_ext_gallium.c', - 'stw_ext_pbuffer.c', - 'stw_ext_pixelformat.c', - 'stw_ext_swapinterval.c', - 'stw_framebuffer.c', - 'stw_getprocaddress.c', - 'stw_pixelformat.c', - 'stw_st.c', - 'stw_tls.c', - 'stw_wgl.c', -] - -wgl = env.ConvenienceLibrary( - target ='wgl', - source = sources, -) -Export('wgl') diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/opengl32.def b/dll/opengl/mesa/src/gallium/state_trackers/wgl/opengl32.def deleted file mode 100644 index 01a29d0391d..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/opengl32.def +++ /dev/null @@ -1,389 +0,0 @@ -EXPORTS -; GlmfBeginGlsBlock -; GlmfCloseMetaFile -; GlmfEndGlsBlock -; GlmfEndPlayback -; GlmfInitPlayback -; GlmfPlayGlsRecord - glAccum - glAlphaFunc - glAreTexturesResident - glArrayElement - glBegin - glBindTexture - glBitmap - glBlendFunc - glCallList - glCallLists - glClear - glClearAccum - glClearColor - glClearDepth - glClearIndex - glClearStencil - glClipPlane - glColor3b - glColor3bv - glColor3d - glColor3dv - glColor3f - glColor3fv - glColor3i - glColor3iv - glColor3s - glColor3sv - glColor3ub - glColor3ubv - glColor3ui - glColor3uiv - glColor3us - glColor3usv - glColor4b - glColor4bv - glColor4d - glColor4dv - glColor4f - glColor4fv - glColor4i - glColor4iv - glColor4s - glColor4sv - glColor4ub - glColor4ubv - glColor4ui - glColor4uiv - glColor4us - glColor4usv - glColorMask - glColorMaterial - glColorPointer - glCopyPixels - glCopyTexImage1D - glCopyTexImage2D - glCopyTexSubImage1D - glCopyTexSubImage2D - glCullFace -; glDebugEntry - glDeleteLists - glDeleteTextures - glDepthFunc - glDepthMask - glDepthRange - glDisable - glDisableClientState - glDrawArrays - glDrawBuffer - glDrawElements - glDrawPixels - glEdgeFlag - glEdgeFlagPointer - glEdgeFlagv - glEnable - glEnableClientState - glEnd - glEndList - glEvalCoord1d - glEvalCoord1dv - glEvalCoord1f - glEvalCoord1fv - glEvalCoord2d - glEvalCoord2dv - glEvalCoord2f - glEvalCoord2fv - glEvalMesh1 - glEvalMesh2 - glEvalPoint1 - glEvalPoint2 - glFeedbackBuffer - glFinish - glFlush - glFogf - glFogfv - glFogi - glFogiv - glFrontFace - glFrustum - glGenLists - glGenTextures - glGetBooleanv - glGetClipPlane - glGetDoublev - glGetError - glGetFloatv - glGetIntegerv - glGetLightfv - glGetLightiv - glGetMapdv - glGetMapfv - glGetMapiv - glGetMaterialfv - glGetMaterialiv - glGetPixelMapfv - glGetPixelMapuiv - glGetPixelMapusv - glGetPointerv - glGetPolygonStipple - glGetString - glGetTexEnvfv - glGetTexEnviv - glGetTexGendv - glGetTexGenfv - glGetTexGeniv - glGetTexImage - glGetTexLevelParameterfv - glGetTexLevelParameteriv - glGetTexParameterfv - glGetTexParameteriv - glHint - glIndexMask - glIndexPointer - glIndexd - glIndexdv - glIndexf - glIndexfv - glIndexi - glIndexiv - glIndexs - glIndexsv - glIndexub - glIndexubv - glInitNames - glInterleavedArrays - glIsEnabled - glIsList - glIsTexture - glLightModelf - glLightModelfv - glLightModeli - glLightModeliv - glLightf - glLightfv - glLighti - glLightiv - glLineStipple - glLineWidth - glListBase - glLoadIdentity - glLoadMatrixd - glLoadMatrixf - glLoadName - glLogicOp - glMap1d - glMap1f - glMap2d - glMap2f - glMapGrid1d - glMapGrid1f - glMapGrid2d - glMapGrid2f - glMaterialf - glMaterialfv - glMateriali - glMaterialiv - glMatrixMode - glMultMatrixd - glMultMatrixf - glNewList - glNormal3b - glNormal3bv - glNormal3d - glNormal3dv - glNormal3f - glNormal3fv - glNormal3i - glNormal3iv - glNormal3s - glNormal3sv - glNormalPointer - glOrtho - glPassThrough - glPixelMapfv - glPixelMapuiv - glPixelMapusv - glPixelStoref - glPixelStorei - glPixelTransferf - glPixelTransferi - glPixelZoom - glPointSize - glPolygonMode - glPolygonOffset - glPolygonStipple - glPopAttrib - glPopClientAttrib - glPopMatrix - glPopName - glPrioritizeTextures - glPushAttrib - glPushClientAttrib - glPushMatrix - glPushName - glRasterPos2d - glRasterPos2dv - glRasterPos2f - glRasterPos2fv - glRasterPos2i - glRasterPos2iv - glRasterPos2s - glRasterPos2sv - glRasterPos3d - glRasterPos3dv - glRasterPos3f - glRasterPos3fv - glRasterPos3i - glRasterPos3iv - glRasterPos3s - glRasterPos3sv - glRasterPos4d - glRasterPos4dv - glRasterPos4f - glRasterPos4fv - glRasterPos4i - glRasterPos4iv - glRasterPos4s - glRasterPos4sv - glReadBuffer - glReadPixels - glRectd - glRectdv - glRectf - glRectfv - glRecti - glRectiv - glRects - glRectsv - glRenderMode - glRotated - glRotatef - glScaled - glScalef - glScissor - glSelectBuffer - glShadeModel - glStencilFunc - glStencilMask - glStencilOp - glTexCoord1d - glTexCoord1dv - glTexCoord1f - glTexCoord1fv - glTexCoord1i - glTexCoord1iv - glTexCoord1s - glTexCoord1sv - glTexCoord2d - glTexCoord2dv - glTexCoord2f - glTexCoord2fv - glTexCoord2i - glTexCoord2iv - glTexCoord2s - glTexCoord2sv - glTexCoord3d - glTexCoord3dv - glTexCoord3f - glTexCoord3fv - glTexCoord3i - glTexCoord3iv - glTexCoord3s - glTexCoord3sv - glTexCoord4d - glTexCoord4dv - glTexCoord4f - glTexCoord4fv - glTexCoord4i - glTexCoord4iv - glTexCoord4s - glTexCoord4sv - glTexCoordPointer - glTexEnvf - glTexEnvfv - glTexEnvi - glTexEnviv - glTexGend - glTexGendv - glTexGenf - glTexGenfv - glTexGeni - glTexGeniv - glTexImage1D - glTexImage2D - glTexParameterf - glTexParameterfv - glTexParameteri - glTexParameteriv - glTexSubImage1D - glTexSubImage2D - glTranslated - glTranslatef - glVertex2d - glVertex2dv - glVertex2f - glVertex2fv - glVertex2i - glVertex2iv - glVertex2s - glVertex2sv - glVertex3d - glVertex3dv - glVertex3f - glVertex3fv - glVertex3i - glVertex3iv - glVertex3s - glVertex3sv - glVertex4d - glVertex4dv - glVertex4f - glVertex4fv - glVertex4i - glVertex4iv - glVertex4s - glVertex4sv - glVertexPointer - glViewport - wglChoosePixelFormat - wglCopyContext - wglCreateContext - wglCreateLayerContext - wglDeleteContext - wglDescribeLayerPlane - wglDescribePixelFormat - wglGetCurrentContext - wglGetCurrentDC -; wglGetDefaultProcAddress - wglGetLayerPaletteEntries - wglGetPixelFormat - wglGetProcAddress - wglMakeCurrent - wglRealizeLayerPalette - wglSetLayerPaletteEntries - wglSetPixelFormat - wglShareLists - wglSwapBuffers - wglSwapLayerBuffers - wglSwapMultipleBuffers - wglUseFontBitmapsA - wglUseFontBitmapsW - wglUseFontOutlinesA - wglUseFontOutlinesW - wglGetExtensionsStringARB - DrvCopyContext - DrvCreateContext - DrvCreateLayerContext - DrvDeleteContext - DrvDescribeLayerPlane - DrvDescribePixelFormat - DrvGetLayerPaletteEntries - DrvGetProcAddress - DrvPresentBuffers - DrvRealizeLayerPalette - DrvReleaseContext - DrvSetCallbackProcs - DrvSetContext - DrvSetLayerPaletteEntries - DrvSetPixelFormat - DrvShareLists - DrvSwapBuffers - DrvSwapLayerBuffers - DrvValidateVersion diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/opengl32.mingw.def b/dll/opengl/mesa/src/gallium/state_trackers/wgl/opengl32.mingw.def deleted file mode 100644 index 0bceee06979..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/opengl32.mingw.def +++ /dev/null @@ -1,388 +0,0 @@ -EXPORTS -; GlmfBeginGlsBlock = GlmfBeginGlsBlock@4 -; GlmfCloseMetaFile = GlmfCloseMetaFile@4 -; GlmfEndGlsBlock = GlmfEndGlsBlock@4 -; GlmfEndPlayback = GlmfEndPlayback@4 -; GlmfInitPlayback = GlmfInitPlayback@12 -; GlmfPlayGlsRecord = GlmfPlayGlsRecord@16 - glAccum = glAccum@8 - glAlphaFunc = glAlphaFunc@8 - glAreTexturesResident = glAreTexturesResident@12 - glArrayElement = glArrayElement@4 - glBegin = glBegin@4 - glBindTexture = glBindTexture@8 - glBitmap = glBitmap@28 - glBlendFunc = glBlendFunc@8 - glCallList = glCallList@4 - glCallLists = glCallLists@12 - glClear = glClear@4 - glClearAccum = glClearAccum@16 - glClearColor = glClearColor@16 - glClearDepth = glClearDepth@8 - glClearIndex = glClearIndex@4 - glClearStencil = glClearStencil@4 - glClipPlane = glClipPlane@8 - glColor3b = glColor3b@12 - glColor3bv = glColor3bv@4 - glColor3d = glColor3d@24 - glColor3dv = glColor3dv@4 - glColor3f = glColor3f@12 - glColor3fv = glColor3fv@4 - glColor3i = glColor3i@12 - glColor3iv = glColor3iv@4 - glColor3s = glColor3s@12 - glColor3sv = glColor3sv@4 - glColor3ub = glColor3ub@12 - glColor3ubv = glColor3ubv@4 - glColor3ui = glColor3ui@12 - glColor3uiv = glColor3uiv@4 - glColor3us = glColor3us@12 - glColor3usv = glColor3usv@4 - glColor4b = glColor4b@16 - glColor4bv = glColor4bv@4 - glColor4d = glColor4d@32 - glColor4dv = glColor4dv@4 - glColor4f = glColor4f@16 - glColor4fv = glColor4fv@4 - glColor4i = glColor4i@16 - glColor4iv = glColor4iv@4 - glColor4s = glColor4s@16 - glColor4sv = glColor4sv@4 - glColor4ub = glColor4ub@16 - glColor4ubv = glColor4ubv@4 - glColor4ui = glColor4ui@16 - glColor4uiv = glColor4uiv@4 - glColor4us = glColor4us@16 - glColor4usv = glColor4usv@4 - glColorMask = glColorMask@16 - glColorMaterial = glColorMaterial@8 - glColorPointer = glColorPointer@16 - glCopyPixels = glCopyPixels@20 - glCopyTexImage1D = glCopyTexImage1D@28 - glCopyTexImage2D = glCopyTexImage2D@32 - glCopyTexSubImage1D = glCopyTexSubImage1D@24 - glCopyTexSubImage2D = glCopyTexSubImage2D@32 - glCullFace = glCullFace@4 -; glDebugEntry = glDebugEntry@8 - glDeleteLists = glDeleteLists@8 - glDeleteTextures = glDeleteTextures@8 - glDepthFunc = glDepthFunc@4 - glDepthMask = glDepthMask@4 - glDepthRange = glDepthRange@16 - glDisable = glDisable@4 - glDisableClientState = glDisableClientState@4 - glDrawArrays = glDrawArrays@12 - glDrawBuffer = glDrawBuffer@4 - glDrawElements = glDrawElements@16 - glDrawPixels = glDrawPixels@20 - glEdgeFlag = glEdgeFlag@4 - glEdgeFlagPointer = glEdgeFlagPointer@8 - glEdgeFlagv = glEdgeFlagv@4 - glEnable = glEnable@4 - glEnableClientState = glEnableClientState@4 - glEnd = glEnd@0 - glEndList = glEndList@0 - glEvalCoord1d = glEvalCoord1d@8 - glEvalCoord1dv = glEvalCoord1dv@4 - glEvalCoord1f = glEvalCoord1f@4 - glEvalCoord1fv = glEvalCoord1fv@4 - glEvalCoord2d = glEvalCoord2d@16 - glEvalCoord2dv = glEvalCoord2dv@4 - glEvalCoord2f = glEvalCoord2f@8 - glEvalCoord2fv = glEvalCoord2fv@4 - glEvalMesh1 = glEvalMesh1@12 - glEvalMesh2 = glEvalMesh2@20 - glEvalPoint1 = glEvalPoint1@4 - glEvalPoint2 = glEvalPoint2@8 - glFeedbackBuffer = glFeedbackBuffer@12 - glFinish = glFinish@0 - glFlush = glFlush@0 - glFogf = glFogf@8 - glFogfv = glFogfv@8 - glFogi = glFogi@8 - glFogiv = glFogiv@8 - glFrontFace = glFrontFace@4 - glFrustum = glFrustum@48 - glGenLists = glGenLists@4 - glGenTextures = glGenTextures@8 - glGetBooleanv = glGetBooleanv@8 - glGetClipPlane = glGetClipPlane@8 - glGetDoublev = glGetDoublev@8 - glGetError = glGetError@0 - glGetFloatv = glGetFloatv@8 - glGetIntegerv = glGetIntegerv@8 - glGetLightfv = glGetLightfv@12 - glGetLightiv = glGetLightiv@12 - glGetMapdv = glGetMapdv@12 - glGetMapfv = glGetMapfv@12 - glGetMapiv = glGetMapiv@12 - glGetMaterialfv = glGetMaterialfv@12 - glGetMaterialiv = glGetMaterialiv@12 - glGetPixelMapfv = glGetPixelMapfv@8 - glGetPixelMapuiv = glGetPixelMapuiv@8 - glGetPixelMapusv = glGetPixelMapusv@8 - glGetPointerv = glGetPointerv@8 - glGetPolygonStipple = glGetPolygonStipple@4 - glGetString = glGetString@4 - glGetTexEnvfv = glGetTexEnvfv@12 - glGetTexEnviv = glGetTexEnviv@12 - glGetTexGendv = glGetTexGendv@12 - glGetTexGenfv = glGetTexGenfv@12 - glGetTexGeniv = glGetTexGeniv@12 - glGetTexImage = glGetTexImage@20 - glGetTexLevelParameterfv = glGetTexLevelParameterfv@16 - glGetTexLevelParameteriv = glGetTexLevelParameteriv@16 - glGetTexParameterfv = glGetTexParameterfv@12 - glGetTexParameteriv = glGetTexParameteriv@12 - glHint = glHint@8 - glIndexMask = glIndexMask@4 - glIndexPointer = glIndexPointer@12 - glIndexd = glIndexd@8 - glIndexdv = glIndexdv@4 - glIndexf = glIndexf@4 - glIndexfv = glIndexfv@4 - glIndexi = glIndexi@4 - glIndexiv = glIndexiv@4 - glIndexs = glIndexs@4 - glIndexsv = glIndexsv@4 - glIndexub = glIndexub@4 - glIndexubv = glIndexubv@4 - glInitNames = glInitNames@0 - glInterleavedArrays = glInterleavedArrays@12 - glIsEnabled = glIsEnabled@4 - glIsList = glIsList@4 - glIsTexture = glIsTexture@4 - glLightModelf = glLightModelf@8 - glLightModelfv = glLightModelfv@8 - glLightModeli = glLightModeli@8 - glLightModeliv = glLightModeliv@8 - glLightf = glLightf@12 - glLightfv = glLightfv@12 - glLighti = glLighti@12 - glLightiv = glLightiv@12 - glLineStipple = glLineStipple@8 - glLineWidth = glLineWidth@4 - glListBase = glListBase@4 - glLoadIdentity = glLoadIdentity@0 - glLoadMatrixd = glLoadMatrixd@4 - glLoadMatrixf = glLoadMatrixf@4 - glLoadName = glLoadName@4 - glLogicOp = glLogicOp@4 - glMap1d = glMap1d@32 - glMap1f = glMap1f@24 - glMap2d = glMap2d@56 - glMap2f = glMap2f@40 - glMapGrid1d = glMapGrid1d@20 - glMapGrid1f = glMapGrid1f@12 - glMapGrid2d = glMapGrid2d@40 - glMapGrid2f = glMapGrid2f@24 - glMaterialf = glMaterialf@12 - glMaterialfv = glMaterialfv@12 - glMateriali = glMateriali@12 - glMaterialiv = glMaterialiv@12 - glMatrixMode = glMatrixMode@4 - glMultMatrixd = glMultMatrixd@4 - glMultMatrixf = glMultMatrixf@4 - glNewList = glNewList@8 - glNormal3b = glNormal3b@12 - glNormal3bv = glNormal3bv@4 - glNormal3d = glNormal3d@24 - glNormal3dv = glNormal3dv@4 - glNormal3f = glNormal3f@12 - glNormal3fv = glNormal3fv@4 - glNormal3i = glNormal3i@12 - glNormal3iv = glNormal3iv@4 - glNormal3s = glNormal3s@12 - glNormal3sv = glNormal3sv@4 - glNormalPointer = glNormalPointer@12 - glOrtho = glOrtho@48 - glPassThrough = glPassThrough@4 - glPixelMapfv = glPixelMapfv@12 - glPixelMapuiv = glPixelMapuiv@12 - glPixelMapusv = glPixelMapusv@12 - glPixelStoref = glPixelStoref@8 - glPixelStorei = glPixelStorei@8 - glPixelTransferf = glPixelTransferf@8 - glPixelTransferi = glPixelTransferi@8 - glPixelZoom = glPixelZoom@8 - glPointSize = glPointSize@4 - glPolygonMode = glPolygonMode@8 - glPolygonOffset = glPolygonOffset@8 - glPolygonStipple = glPolygonStipple@4 - glPopAttrib = glPopAttrib@0 - glPopClientAttrib = glPopClientAttrib@0 - glPopMatrix = glPopMatrix@0 - glPopName = glPopName@0 - glPrioritizeTextures = glPrioritizeTextures@12 - glPushAttrib = glPushAttrib@4 - glPushClientAttrib = glPushClientAttrib@4 - glPushMatrix = glPushMatrix@0 - glPushName = glPushName@4 - glRasterPos2d = glRasterPos2d@16 - glRasterPos2dv = glRasterPos2dv@4 - glRasterPos2f = glRasterPos2f@8 - glRasterPos2fv = glRasterPos2fv@4 - glRasterPos2i = glRasterPos2i@8 - glRasterPos2iv = glRasterPos2iv@4 - glRasterPos2s = glRasterPos2s@8 - glRasterPos2sv = glRasterPos2sv@4 - glRasterPos3d = glRasterPos3d@24 - glRasterPos3dv = glRasterPos3dv@4 - glRasterPos3f = glRasterPos3f@12 - glRasterPos3fv = glRasterPos3fv@4 - glRasterPos3i = glRasterPos3i@12 - glRasterPos3iv = glRasterPos3iv@4 - glRasterPos3s = glRasterPos3s@12 - glRasterPos3sv = glRasterPos3sv@4 - glRasterPos4d = glRasterPos4d@32 - glRasterPos4dv = glRasterPos4dv@4 - glRasterPos4f = glRasterPos4f@16 - glRasterPos4fv = glRasterPos4fv@4 - glRasterPos4i = glRasterPos4i@16 - glRasterPos4iv = glRasterPos4iv@4 - glRasterPos4s = glRasterPos4s@16 - glRasterPos4sv = glRasterPos4sv@4 - glReadBuffer = glReadBuffer@4 - glReadPixels = glReadPixels@28 - glRectd = glRectd@32 - glRectdv = glRectdv@8 - glRectf = glRectf@16 - glRectfv = glRectfv@8 - glRecti = glRecti@16 - glRectiv = glRectiv@8 - glRects = glRects@16 - glRectsv = glRectsv@8 - glRenderMode = glRenderMode@4 - glRotated = glRotated@32 - glRotatef = glRotatef@16 - glScaled = glScaled@24 - glScalef = glScalef@12 - glScissor = glScissor@16 - glSelectBuffer = glSelectBuffer@8 - glShadeModel = glShadeModel@4 - glStencilFunc = glStencilFunc@12 - glStencilMask = glStencilMask@4 - glStencilOp = glStencilOp@12 - glTexCoord1d = glTexCoord1d@8 - glTexCoord1dv = glTexCoord1dv@4 - glTexCoord1f = glTexCoord1f@4 - glTexCoord1fv = glTexCoord1fv@4 - glTexCoord1i = glTexCoord1i@4 - glTexCoord1iv = glTexCoord1iv@4 - glTexCoord1s = glTexCoord1s@4 - glTexCoord1sv = glTexCoord1sv@4 - glTexCoord2d = glTexCoord2d@16 - glTexCoord2dv = glTexCoord2dv@4 - glTexCoord2f = glTexCoord2f@8 - glTexCoord2fv = glTexCoord2fv@4 - glTexCoord2i = glTexCoord2i@8 - glTexCoord2iv = glTexCoord2iv@4 - glTexCoord2s = glTexCoord2s@8 - glTexCoord2sv = glTexCoord2sv@4 - glTexCoord3d = glTexCoord3d@24 - glTexCoord3dv = glTexCoord3dv@4 - glTexCoord3f = glTexCoord3f@12 - glTexCoord3fv = glTexCoord3fv@4 - glTexCoord3i = glTexCoord3i@12 - glTexCoord3iv = glTexCoord3iv@4 - glTexCoord3s = glTexCoord3s@12 - glTexCoord3sv = glTexCoord3sv@4 - glTexCoord4d = glTexCoord4d@32 - glTexCoord4dv = glTexCoord4dv@4 - glTexCoord4f = glTexCoord4f@16 - glTexCoord4fv = glTexCoord4fv@4 - glTexCoord4i = glTexCoord4i@16 - glTexCoord4iv = glTexCoord4iv@4 - glTexCoord4s = glTexCoord4s@16 - glTexCoord4sv = glTexCoord4sv@4 - glTexCoordPointer = glTexCoordPointer@16 - glTexEnvf = glTexEnvf@12 - glTexEnvfv = glTexEnvfv@12 - glTexEnvi = glTexEnvi@12 - glTexEnviv = glTexEnviv@12 - glTexGend = glTexGend@16 - glTexGendv = glTexGendv@12 - glTexGenf = glTexGenf@12 - glTexGenfv = glTexGenfv@12 - glTexGeni = glTexGeni@12 - glTexGeniv = glTexGeniv@12 - glTexImage1D = glTexImage1D@32 - glTexImage2D = glTexImage2D@36 - glTexParameterf = glTexParameterf@12 - glTexParameterfv = glTexParameterfv@12 - glTexParameteri = glTexParameteri@12 - glTexParameteriv = glTexParameteriv@12 - glTexSubImage1D = glTexSubImage1D@28 - glTexSubImage2D = glTexSubImage2D@36 - glTranslated = glTranslated@24 - glTranslatef = glTranslatef@12 - glVertex2d = glVertex2d@16 - glVertex2dv = glVertex2dv@4 - glVertex2f = glVertex2f@8 - glVertex2fv = glVertex2fv@4 - glVertex2i = glVertex2i@8 - glVertex2iv = glVertex2iv@4 - glVertex2s = glVertex2s@8 - glVertex2sv = glVertex2sv@4 - glVertex3d = glVertex3d@24 - glVertex3dv = glVertex3dv@4 - glVertex3f = glVertex3f@12 - glVertex3fv = glVertex3fv@4 - glVertex3i = glVertex3i@12 - glVertex3iv = glVertex3iv@4 - glVertex3s = glVertex3s@12 - glVertex3sv = glVertex3sv@4 - glVertex4d = glVertex4d@32 - glVertex4dv = glVertex4dv@4 - glVertex4f = glVertex4f@16 - glVertex4fv = glVertex4fv@4 - glVertex4i = glVertex4i@16 - glVertex4iv = glVertex4iv@4 - glVertex4s = glVertex4s@16 - glVertex4sv = glVertex4sv@4 - glVertexPointer = glVertexPointer@16 - glViewport = glViewport@16 - wglChoosePixelFormat = wglChoosePixelFormat@8 - wglCopyContext = wglCopyContext@12 - wglCreateContext = wglCreateContext@4 - wglCreateLayerContext = wglCreateLayerContext@8 - wglDeleteContext = wglDeleteContext@4 - wglDescribeLayerPlane = wglDescribeLayerPlane@20 - wglDescribePixelFormat = wglDescribePixelFormat@16 - wglGetCurrentContext = wglGetCurrentContext@0 - wglGetCurrentDC = wglGetCurrentDC@0 -; wglGetDefaultProcAddress = wglGetDefaultProcAddress@4 - wglGetLayerPaletteEntries = wglGetLayerPaletteEntries@20 - wglGetPixelFormat = wglGetPixelFormat@4 - wglGetProcAddress = wglGetProcAddress@4 - wglMakeCurrent = wglMakeCurrent@8 - wglRealizeLayerPalette = wglRealizeLayerPalette@12 - wglSetLayerPaletteEntries = wglSetLayerPaletteEntries@20 - wglSetPixelFormat = wglSetPixelFormat@12 - wglShareLists = wglShareLists@8 - wglSwapBuffers = wglSwapBuffers@4 - wglSwapLayerBuffers = wglSwapLayerBuffers@8 - wglSwapMultipleBuffers = wglSwapMultipleBuffers@8 - wglUseFontBitmapsA = wglUseFontBitmapsA@16 - wglUseFontBitmapsW = wglUseFontBitmapsW@16 - wglUseFontOutlinesA = wglUseFontOutlinesA@32 - wglUseFontOutlinesW = wglUseFontOutlinesW@32 - DrvCopyContext = DrvCopyContext@12 - DrvCreateContext = DrvCreateContext@4 - DrvCreateLayerContext = DrvCreateLayerContext@8 - DrvDeleteContext = DrvDeleteContext@4 - DrvDescribeLayerPlane = DrvDescribeLayerPlane@20 - DrvDescribePixelFormat = DrvDescribePixelFormat@16 - DrvGetLayerPaletteEntries = DrvGetLayerPaletteEntries@20 - DrvGetProcAddress = DrvGetProcAddress@4 - DrvPresentBuffers = DrvPresentBuffers@8 - DrvRealizeLayerPalette = DrvRealizeLayerPalette@12 - DrvReleaseContext = DrvReleaseContext@4 - DrvSetCallbackProcs = DrvSetCallbackProcs@8 - DrvSetContext = DrvSetContext@12 - DrvSetLayerPaletteEntries = DrvSetLayerPaletteEntries@20 - DrvSetPixelFormat = DrvSetPixelFormat@8 - DrvShareLists = DrvShareLists@8 - DrvSwapBuffers = DrvSwapBuffers@4 - DrvSwapLayerBuffers = DrvSwapLayerBuffers@8 - DrvValidateVersion = DrvValidateVersion@4 diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_context.c b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_context.c deleted file mode 100644 index aca92004546..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_context.c +++ /dev/null @@ -1,772 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -//#include - -#define WGL_WGLEXT_PROTOTYPES - -#include -#include - -#include "pipe/p_compiler.h" -#include "pipe/p_context.h" -#include "pipe/p_state.h" -#include "util/u_memory.h" -#include "util/u_atomic.h" -#include "state_tracker/st_api.h" - -#include "stw_icd.h" -#include "stw_device.h" -#include "stw_winsys.h" -#include "stw_framebuffer.h" -#include "stw_pixelformat.h" -#include "stw_context.h" -#include "stw_tls.h" - - -static INLINE struct stw_context * -stw_current_context(void) -{ - struct st_context_iface *st; - - st = (stw_dev) ? stw_dev->stapi->get_current(stw_dev->stapi) : NULL; - - return (struct stw_context *) ((st) ? st->st_manager_private : NULL); -} - -BOOL APIENTRY -DrvCopyContext( - DHGLRC dhrcSource, - DHGLRC dhrcDest, - UINT fuMask ) -{ - struct stw_context *src; - struct stw_context *dst; - BOOL ret = FALSE; - - if (!stw_dev) - return FALSE; - - pipe_mutex_lock( stw_dev->ctx_mutex ); - - src = stw_lookup_context_locked( dhrcSource ); - dst = stw_lookup_context_locked( dhrcDest ); - - if (src && dst) { - /* FIXME */ - assert(0); - (void) src; - (void) dst; - (void) fuMask; - } - - pipe_mutex_unlock( stw_dev->ctx_mutex ); - - return ret; -} - -BOOL APIENTRY -DrvShareLists( - DHGLRC dhglrc1, - DHGLRC dhglrc2 ) -{ - struct stw_context *ctx1; - struct stw_context *ctx2; - BOOL ret = FALSE; - - if (!stw_dev) - return FALSE; - - pipe_mutex_lock( stw_dev->ctx_mutex ); - - ctx1 = stw_lookup_context_locked( dhglrc1 ); - ctx2 = stw_lookup_context_locked( dhglrc2 ); - - if (ctx1 && ctx2 && ctx2->st->share) - ret = ctx2->st->share(ctx2->st, ctx1->st); - - pipe_mutex_unlock( stw_dev->ctx_mutex ); - - return ret; -} - -DHGLRC APIENTRY -DrvCreateContext( - HDC hdc ) -{ - return DrvCreateLayerContext( hdc, 0 ); -} - -DHGLRC APIENTRY -DrvCreateLayerContext( - HDC hdc, - INT iLayerPlane ) -{ - return stw_create_context_attribs(hdc, iLayerPlane, 0, 1, 0, 0, WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB); -} - -DHGLRC -stw_create_context_attribs( - HDC hdc, - INT iLayerPlane, - DHGLRC hShareContext, - int majorVersion, int minorVersion, - int contextFlags, int profileMask) -{ - int iPixelFormat; - const struct stw_pixelformat_info *pfi; - struct st_context_attribs attribs; - struct stw_context *ctx = NULL; - struct stw_context *shareCtx = NULL; - enum st_context_error ctx_err = 0; - - if (!stw_dev) - return 0; - - if (iLayerPlane != 0) - return 0; - - iPixelFormat = GetPixelFormat(hdc); - if(!iPixelFormat) - return 0; - - pfi = stw_pixelformat_get_info( iPixelFormat - 1 ); - - if (hShareContext != 0) { - pipe_mutex_lock( stw_dev->ctx_mutex ); - shareCtx = stw_lookup_context_locked( hShareContext ); - pipe_mutex_unlock( stw_dev->ctx_mutex ); - } - - ctx = CALLOC_STRUCT( stw_context ); - if (ctx == NULL) - goto no_ctx; - - ctx->hdc = hdc; - ctx->iPixelFormat = iPixelFormat; - - memset(&attribs, 0, sizeof(attribs)); - attribs.visual = pfi->stvis; - attribs.major = majorVersion; - attribs.minor = minorVersion; - if (contextFlags & WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB) - attribs.flags |= ST_CONTEXT_FLAG_FORWARD_COMPATIBLE; - if (contextFlags & WGL_CONTEXT_DEBUG_BIT_ARB) - attribs.flags |= ST_CONTEXT_FLAG_DEBUG; - - /* There are no profiles before OpenGL 3.2. The - * WGL_ARB_create_context_profile spec says: - * - * "If the requested OpenGL version is less than 3.2, - * WGL_CONTEXT_PROFILE_MASK_ARB is ignored and the functionality of the - * context is determined solely by the requested version." - * - * The spec also says: - * - * "The default value for WGL_CONTEXT_PROFILE_MASK_ARB is - * WGL_CONTEXT_CORE_PROFILE_BIT_ARB." - */ - attribs.profile = ST_PROFILE_DEFAULT; - if ((majorVersion > 3 || (majorVersion == 3 && minorVersion >= 2)) - && ((profileMask & WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB) == 0)) - attribs.profile = ST_PROFILE_OPENGL_CORE; - - ctx->st = stw_dev->stapi->create_context(stw_dev->stapi, - stw_dev->smapi, &attribs, &ctx_err, shareCtx ? shareCtx->st : NULL); - if (ctx->st == NULL) - goto no_st_ctx; - - ctx->st->st_manager_private = (void *) ctx; - - pipe_mutex_lock( stw_dev->ctx_mutex ); - ctx->dhglrc = handle_table_add(stw_dev->ctx_table, ctx); - pipe_mutex_unlock( stw_dev->ctx_mutex ); - if (!ctx->dhglrc) - goto no_hglrc; - - return ctx->dhglrc; - -no_hglrc: - ctx->st->destroy(ctx->st); -no_st_ctx: - FREE(ctx); -no_ctx: - return 0; -} - -BOOL APIENTRY -DrvDeleteContext( - DHGLRC dhglrc ) -{ - struct stw_context *ctx ; - BOOL ret = FALSE; - - if (!stw_dev) - return FALSE; - - pipe_mutex_lock( stw_dev->ctx_mutex ); - ctx = stw_lookup_context_locked(dhglrc); - handle_table_remove(stw_dev->ctx_table, dhglrc); - pipe_mutex_unlock( stw_dev->ctx_mutex ); - - if (ctx) { - struct stw_context *curctx = stw_current_context(); - - /* Unbind current if deleting current context. */ - if (curctx == ctx) - stw_dev->stapi->make_current(stw_dev->stapi, NULL, NULL, NULL); - - ctx->st->destroy(ctx->st); - FREE(ctx); - - ret = TRUE; - } - - return ret; -} - -BOOL APIENTRY -DrvReleaseContext( - DHGLRC dhglrc ) -{ - struct stw_context *ctx; - - if (!stw_dev) - return FALSE; - - pipe_mutex_lock( stw_dev->ctx_mutex ); - ctx = stw_lookup_context_locked( dhglrc ); - pipe_mutex_unlock( stw_dev->ctx_mutex ); - - if (!ctx) - return FALSE; - - /* The expectation is that ctx is the same context which is - * current for this thread. We should check that and return False - * if not the case. - */ - if (ctx != stw_current_context()) - return FALSE; - - if (stw_make_current( NULL, 0 ) == FALSE) - return FALSE; - - return TRUE; -} - - -DHGLRC -stw_get_current_context( void ) -{ - struct stw_context *ctx; - - ctx = stw_current_context(); - if(!ctx) - return 0; - - return ctx->dhglrc; -} - -HDC -stw_get_current_dc( void ) -{ - struct stw_context *ctx; - - ctx = stw_current_context(); - if(!ctx) - return NULL; - - return ctx->hdc; -} - -BOOL -stw_make_current( - HDC hdc, - DHGLRC dhglrc ) -{ - struct stw_context *curctx = NULL; - struct stw_context *ctx = NULL; - struct stw_framebuffer *fb = NULL; - BOOL ret = FALSE; - - if (!stw_dev) - return FALSE; - - curctx = stw_current_context(); - if (curctx != NULL) { - if (curctx->dhglrc == dhglrc) { - if (curctx->hdc == hdc) { - /* Return if already current. */ - return TRUE; - } - } else { - curctx->st->flush(curctx->st, ST_FLUSH_FRONT, NULL); - } - } - - if (dhglrc) { - pipe_mutex_lock( stw_dev->ctx_mutex ); - ctx = stw_lookup_context_locked( dhglrc ); - pipe_mutex_unlock( stw_dev->ctx_mutex ); - if (!ctx) { - goto fail; - } - - fb = stw_framebuffer_from_hdc( hdc ); - if (fb) { - stw_framebuffer_update(fb); - } - else { - /* Applications should call SetPixelFormat before creating a context, - * but not all do, and the opengl32 runtime seems to use a default pixel - * format in some cases, so we must create a framebuffer for those here - */ - int iPixelFormat = GetPixelFormat(hdc); - if (iPixelFormat) - fb = stw_framebuffer_create( hdc, iPixelFormat ); - if (!fb) - goto fail; - } - - if (fb->iPixelFormat != ctx->iPixelFormat) { - SetLastError(ERROR_INVALID_PIXEL_FORMAT); - goto fail; - } - - /* Bind the new framebuffer */ - ctx->hdc = hdc; - - ret = stw_dev->stapi->make_current(stw_dev->stapi, ctx->st, fb->stfb, fb->stfb); - stw_framebuffer_reference(&ctx->current_framebuffer, fb); - } else { - ret = stw_dev->stapi->make_current(stw_dev->stapi, NULL, NULL, NULL); - } - -fail: - - if (fb) { - stw_framebuffer_release(fb); - } - - /* On failure, make the thread's current rendering context not current - * before returning */ - if (!ret) { - stw_dev->stapi->make_current(stw_dev->stapi, NULL, NULL, NULL); - ctx = NULL; - } - - /* Unreference the previous framebuffer if any. It must be done after - * make_current, as it can be referenced inside. - */ - if (curctx && curctx != ctx) { - stw_framebuffer_reference(&curctx->current_framebuffer, NULL); - } - - return ret; -} - -/** - * Flush the current context if it is bound to the framebuffer. - */ -void -stw_flush_current_locked( struct stw_framebuffer *fb ) -{ - struct stw_context *ctx = stw_current_context(); - - if (ctx && ctx->current_framebuffer == fb) { - ctx->st->flush(ctx->st, ST_FLUSH_FRONT, NULL); - } -} - -/** - * Notify the current context that the framebuffer has become invalid. - */ -void -stw_notify_current_locked( struct stw_framebuffer *fb ) -{ - p_atomic_inc(&fb->stfb->stamp); -} - -/** - * Although WGL allows different dispatch entrypoints per context - */ -static const GLCLTPROCTABLE cpt = -{ - OPENGL_VERSION_110_ENTRIES, - { - &glNewList, - &glEndList, - &glCallList, - &glCallLists, - &glDeleteLists, - &glGenLists, - &glListBase, - &glBegin, - &glBitmap, - &glColor3b, - &glColor3bv, - &glColor3d, - &glColor3dv, - &glColor3f, - &glColor3fv, - &glColor3i, - &glColor3iv, - &glColor3s, - &glColor3sv, - &glColor3ub, - &glColor3ubv, - &glColor3ui, - &glColor3uiv, - &glColor3us, - &glColor3usv, - &glColor4b, - &glColor4bv, - &glColor4d, - &glColor4dv, - &glColor4f, - &glColor4fv, - &glColor4i, - &glColor4iv, - &glColor4s, - &glColor4sv, - &glColor4ub, - &glColor4ubv, - &glColor4ui, - &glColor4uiv, - &glColor4us, - &glColor4usv, - &glEdgeFlag, - &glEdgeFlagv, - &glEnd, - &glIndexd, - &glIndexdv, - &glIndexf, - &glIndexfv, - &glIndexi, - &glIndexiv, - &glIndexs, - &glIndexsv, - &glNormal3b, - &glNormal3bv, - &glNormal3d, - &glNormal3dv, - &glNormal3f, - &glNormal3fv, - &glNormal3i, - &glNormal3iv, - &glNormal3s, - &glNormal3sv, - &glRasterPos2d, - &glRasterPos2dv, - &glRasterPos2f, - &glRasterPos2fv, - &glRasterPos2i, - &glRasterPos2iv, - &glRasterPos2s, - &glRasterPos2sv, - &glRasterPos3d, - &glRasterPos3dv, - &glRasterPos3f, - &glRasterPos3fv, - &glRasterPos3i, - &glRasterPos3iv, - &glRasterPos3s, - &glRasterPos3sv, - &glRasterPos4d, - &glRasterPos4dv, - &glRasterPos4f, - &glRasterPos4fv, - &glRasterPos4i, - &glRasterPos4iv, - &glRasterPos4s, - &glRasterPos4sv, - &glRectd, - &glRectdv, - &glRectf, - &glRectfv, - &glRecti, - &glRectiv, - &glRects, - &glRectsv, - &glTexCoord1d, - &glTexCoord1dv, - &glTexCoord1f, - &glTexCoord1fv, - &glTexCoord1i, - &glTexCoord1iv, - &glTexCoord1s, - &glTexCoord1sv, - &glTexCoord2d, - &glTexCoord2dv, - &glTexCoord2f, - &glTexCoord2fv, - &glTexCoord2i, - &glTexCoord2iv, - &glTexCoord2s, - &glTexCoord2sv, - &glTexCoord3d, - &glTexCoord3dv, - &glTexCoord3f, - &glTexCoord3fv, - &glTexCoord3i, - &glTexCoord3iv, - &glTexCoord3s, - &glTexCoord3sv, - &glTexCoord4d, - &glTexCoord4dv, - &glTexCoord4f, - &glTexCoord4fv, - &glTexCoord4i, - &glTexCoord4iv, - &glTexCoord4s, - &glTexCoord4sv, - &glVertex2d, - &glVertex2dv, - &glVertex2f, - &glVertex2fv, - &glVertex2i, - &glVertex2iv, - &glVertex2s, - &glVertex2sv, - &glVertex3d, - &glVertex3dv, - &glVertex3f, - &glVertex3fv, - &glVertex3i, - &glVertex3iv, - &glVertex3s, - &glVertex3sv, - &glVertex4d, - &glVertex4dv, - &glVertex4f, - &glVertex4fv, - &glVertex4i, - &glVertex4iv, - &glVertex4s, - &glVertex4sv, - &glClipPlane, - &glColorMaterial, - &glCullFace, - &glFogf, - &glFogfv, - &glFogi, - &glFogiv, - &glFrontFace, - &glHint, - &glLightf, - &glLightfv, - &glLighti, - &glLightiv, - &glLightModelf, - &glLightModelfv, - &glLightModeli, - &glLightModeliv, - &glLineStipple, - &glLineWidth, - &glMaterialf, - &glMaterialfv, - &glMateriali, - &glMaterialiv, - &glPointSize, - &glPolygonMode, - &glPolygonStipple, - &glScissor, - &glShadeModel, - &glTexParameterf, - &glTexParameterfv, - &glTexParameteri, - &glTexParameteriv, - &glTexImage1D, - &glTexImage2D, - &glTexEnvf, - &glTexEnvfv, - &glTexEnvi, - &glTexEnviv, - &glTexGend, - &glTexGendv, - &glTexGenf, - &glTexGenfv, - &glTexGeni, - &glTexGeniv, - &glFeedbackBuffer, - &glSelectBuffer, - &glRenderMode, - &glInitNames, - &glLoadName, - &glPassThrough, - &glPopName, - &glPushName, - &glDrawBuffer, - &glClear, - &glClearAccum, - &glClearIndex, - &glClearColor, - &glClearStencil, - &glClearDepth, - &glStencilMask, - &glColorMask, - &glDepthMask, - &glIndexMask, - &glAccum, - &glDisable, - &glEnable, - &glFinish, - &glFlush, - &glPopAttrib, - &glPushAttrib, - &glMap1d, - &glMap1f, - &glMap2d, - &glMap2f, - &glMapGrid1d, - &glMapGrid1f, - &glMapGrid2d, - &glMapGrid2f, - &glEvalCoord1d, - &glEvalCoord1dv, - &glEvalCoord1f, - &glEvalCoord1fv, - &glEvalCoord2d, - &glEvalCoord2dv, - &glEvalCoord2f, - &glEvalCoord2fv, - &glEvalMesh1, - &glEvalPoint1, - &glEvalMesh2, - &glEvalPoint2, - &glAlphaFunc, - &glBlendFunc, - &glLogicOp, - &glStencilFunc, - &glStencilOp, - &glDepthFunc, - &glPixelZoom, - &glPixelTransferf, - &glPixelTransferi, - &glPixelStoref, - &glPixelStorei, - &glPixelMapfv, - &glPixelMapuiv, - &glPixelMapusv, - &glReadBuffer, - &glCopyPixels, - &glReadPixels, - &glDrawPixels, - &glGetBooleanv, - &glGetClipPlane, - &glGetDoublev, - &glGetError, - &glGetFloatv, - &glGetIntegerv, - &glGetLightfv, - &glGetLightiv, - &glGetMapdv, - &glGetMapfv, - &glGetMapiv, - &glGetMaterialfv, - &glGetMaterialiv, - &glGetPixelMapfv, - &glGetPixelMapuiv, - &glGetPixelMapusv, - &glGetPolygonStipple, - &glGetString, - &glGetTexEnvfv, - &glGetTexEnviv, - &glGetTexGendv, - &glGetTexGenfv, - &glGetTexGeniv, - &glGetTexImage, - &glGetTexParameterfv, - &glGetTexParameteriv, - &glGetTexLevelParameterfv, - &glGetTexLevelParameteriv, - &glIsEnabled, - &glIsList, - &glDepthRange, - &glFrustum, - &glLoadIdentity, - &glLoadMatrixf, - &glLoadMatrixd, - &glMatrixMode, - &glMultMatrixf, - &glMultMatrixd, - &glOrtho, - &glPopMatrix, - &glPushMatrix, - &glRotated, - &glRotatef, - &glScaled, - &glScalef, - &glTranslated, - &glTranslatef, - &glViewport, - &glArrayElement, - &glBindTexture, - &glColorPointer, - &glDisableClientState, - &glDrawArrays, - &glDrawElements, - &glEdgeFlagPointer, - &glEnableClientState, - &glIndexPointer, - &glIndexub, - &glIndexubv, - &glInterleavedArrays, - &glNormalPointer, - &glPolygonOffset, - &glTexCoordPointer, - &glVertexPointer, - &glAreTexturesResident, - &glCopyTexImage1D, - &glCopyTexImage2D, - &glCopyTexSubImage1D, - &glCopyTexSubImage2D, - &glDeleteTextures, - &glGenTextures, - &glGetPointerv, - &glIsTexture, - &glPrioritizeTextures, - &glTexSubImage1D, - &glTexSubImage2D, - &glPopClientAttrib, - &glPushClientAttrib - } -}; - -PGLCLTPROCTABLE APIENTRY -DrvSetContext( - HDC hdc, - DHGLRC dhglrc, - PFN_SETPROCTABLE pfnSetProcTable ) -{ - PGLCLTPROCTABLE r = (PGLCLTPROCTABLE)&cpt; - - if (!stw_make_current( hdc, dhglrc )) - r = NULL; - - return r; -} diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_context.h b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_context.h deleted file mode 100644 index 435252e8ab6..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_context.h +++ /dev/null @@ -1,58 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef STW_CONTEXT_H -#define STW_CONTEXT_H - -//#include - -struct stw_framebuffer; -struct st_context_iface; - -struct stw_context -{ - struct st_context_iface *st; - DHGLRC dhglrc; - int iPixelFormat; - HDC hdc; - - struct stw_framebuffer *current_framebuffer; -}; - -DHGLRC stw_create_context_attribs( HDC hdc, INT iLayerPlane, DHGLRC hShareContext, - int majorVersion, int minorVersion, int contextFlags, int profileMask ); - -DHGLRC stw_get_current_context( void ); - -HDC stw_get_current_dc( void ); - -BOOL stw_make_current( HDC hdc, DHGLRC dhglrc ); - -void stw_flush_current_locked( struct stw_framebuffer *fb ); -void stw_notify_current_locked( struct stw_framebuffer *fb ); - -#endif /* STW_CONTEXT_H */ diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_device.c b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_device.c deleted file mode 100644 index 0dd11b20769..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_device.c +++ /dev/null @@ -1,230 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -//#include - -#include "glapi/glapi.h" -#include "util/u_debug.h" -#include "util/u_math.h" -#include "util/u_memory.h" -#include "pipe/p_screen.h" - -#include "stw_device.h" -#include "stw_winsys.h" -#include "stw_pixelformat.h" -#include "stw_icd.h" -#include "stw_tls.h" -#include "stw_framebuffer.h" -#include "stw_st.h" - - -struct stw_device *stw_dev = NULL; - -static int -stw_get_param(struct st_manager *smapi, - enum st_manager_param param) -{ - switch (param) { - case ST_MANAGER_BROKEN_INVALIDATE: - /* - * Force framebuffer validation on glViewport. - * - * Certain applications, like Rhinoceros 4, uses glReadPixels - * exclusively (never uses SwapBuffers), so framebuffers never get - * resized unless we check on glViewport. - */ - return 1; - default: - return 0; - } -} - -boolean -stw_init(const struct stw_winsys *stw_winsys) -{ - static struct stw_device stw_dev_storage; - struct pipe_screen *screen; - - debug_printf("%s\n", __FUNCTION__); - - assert(!stw_dev); - - stw_tls_init(); - - stw_dev = &stw_dev_storage; - memset(stw_dev, 0, sizeof(*stw_dev)); - -#ifdef DEBUG - stw_dev->memdbg_no = debug_memory_begin(); -#endif - - stw_dev->stw_winsys = stw_winsys; - - stw_dev->stapi = stw_st_create_api(); - stw_dev->smapi = CALLOC_STRUCT(st_manager); - if (!stw_dev->stapi || !stw_dev->smapi) - goto error1; - - screen = stw_winsys->create_screen(); - if(!screen) - goto error1; - - if(stw_winsys->get_adapter_luid) - stw_winsys->get_adapter_luid(screen, &stw_dev->AdapterLuid); - - stw_dev->smapi->screen = screen; - stw_dev->smapi->get_param = stw_get_param; - stw_dev->screen = screen; - - stw_dev->max_2d_levels = - screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS); - stw_dev->max_2d_length = 1 << (stw_dev->max_2d_levels - 1); - - pipe_mutex_init( stw_dev->ctx_mutex ); - pipe_mutex_init( stw_dev->fb_mutex ); - - stw_dev->ctx_table = handle_table_create(); - if (!stw_dev->ctx_table) { - goto error1; - } - - stw_pixelformat_init(); - - return TRUE; - -error1: - if (stw_dev->smapi) - FREE(stw_dev->smapi); - if (stw_dev->stapi) - stw_dev->stapi->destroy(stw_dev->stapi); - - stw_dev = NULL; - return FALSE; -} - - -boolean -stw_init_thread(void) -{ - return stw_tls_init_thread(); -} - - -void -stw_cleanup_thread(void) -{ - stw_tls_cleanup_thread(); -} - - -void -stw_cleanup(void) -{ - DHGLRC dhglrc; - - debug_printf("%s\n", __FUNCTION__); - - if (!stw_dev) - return; - - /* - * Abort cleanup if there are still active contexts. In some situations - * this DLL may be unloaded before the DLL that is using GL contexts is. - */ - pipe_mutex_lock( stw_dev->ctx_mutex ); - dhglrc = handle_table_get_first_handle(stw_dev->ctx_table); - pipe_mutex_unlock( stw_dev->ctx_mutex ); - if (dhglrc) { - debug_printf("%s: contexts still active -- cleanup aborted\n", __FUNCTION__); - stw_dev = NULL; - return; - } - - handle_table_destroy(stw_dev->ctx_table); - - stw_framebuffer_cleanup(); - - pipe_mutex_destroy( stw_dev->fb_mutex ); - pipe_mutex_destroy( stw_dev->ctx_mutex ); - - FREE(stw_dev->smapi); - stw_dev->stapi->destroy(stw_dev->stapi); - - stw_dev->screen->destroy(stw_dev->screen); - - /* glapi is statically linked: we can call the local destroy function. */ -#ifdef _GLAPI_NO_EXPORTS - _glapi_destroy_multithread(); -#endif - -#ifdef DEBUG - debug_memory_end(stw_dev->memdbg_no); -#endif - - stw_tls_cleanup(); - - stw_dev = NULL; -} - - -struct stw_context * -stw_lookup_context_locked( DHGLRC dhglrc ) -{ - if (dhglrc == 0) - return NULL; - - if (stw_dev == NULL) - return NULL; - - return (struct stw_context *) handle_table_get(stw_dev->ctx_table, dhglrc); -} - - -void APIENTRY -DrvSetCallbackProcs( - INT nProcs, - PROC *pProcs ) -{ - size_t size; - - if (stw_dev == NULL) - return; - - size = MIN2(nProcs * sizeof *pProcs, sizeof stw_dev->callbacks); - memcpy(&stw_dev->callbacks, pProcs, size); - - return; -} - - -BOOL APIENTRY -DrvValidateVersion( - ULONG ulVersion ) -{ - /* TODO: get the expected version from the winsys */ - return ulVersion == 1; -} diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_device.h b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_device.h deleted file mode 100644 index 3c2b6d9c076..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_device.h +++ /dev/null @@ -1,85 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef STW_DEVICE_H_ -#define STW_DEVICE_H_ - - -#include "pipe/p_compiler.h" -#include "os/os_thread.h" -#include "util/u_handle_table.h" -#include "stw_icd.h" -#include "stw_pixelformat.h" - - -#define STW_MAX_PIXELFORMATS 256 - - -struct pipe_screen; -struct st_api; -struct st_manager; -struct stw_framebuffer; - -struct stw_device -{ - const struct stw_winsys *stw_winsys; - - struct pipe_screen *screen; - - /* Cache some PIPE_CAP_* */ - unsigned max_2d_levels; - unsigned max_2d_length; - - struct st_api *stapi; - struct st_manager *smapi; - - LUID AdapterLuid; - - struct stw_pixelformat_info pixelformats[STW_MAX_PIXELFORMATS]; - unsigned pixelformat_count; - unsigned pixelformat_extended_count; - - GLCALLBACKTABLE callbacks; - - pipe_mutex ctx_mutex; - struct handle_table *ctx_table; - - pipe_mutex fb_mutex; - struct stw_framebuffer *fb_head; - -#ifdef DEBUG - unsigned long memdbg_no; -#endif -}; - -struct stw_context * -stw_lookup_context_locked( DHGLRC hglrc ); - -extern struct stw_device *stw_dev; - - -#endif /* STW_DEVICE_H_ */ diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_context.c b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_context.c deleted file mode 100644 index 3dafd3ce9d0..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_context.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.11 - * - * Copyright (C) 2011 Morgan Armand - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -//#include - -#define WGL_WGLEXT_PROTOTYPES - -#include -#include - -#include "stw_icd.h" -#include "stw_context.h" - -HGLRC WINAPI -wglCreateContextAttribsARB(HDC hDC, HGLRC hShareContext, const int *attribList) -{ - int majorVersion = 1, minorVersion = 0, layerPlane = 0; - int contextFlags = 0x0; - int profileMask = WGL_CONTEXT_CORE_PROFILE_BIT_ARB; - int i; - BOOL done = FALSE; - - /* parse attrib_list */ - if (attribList) { - for (i = 0; !done && attribList[i]; i++) { - switch (attribList[i]) { - case WGL_CONTEXT_MAJOR_VERSION_ARB: - majorVersion = attribList[++i]; - break; - case WGL_CONTEXT_MINOR_VERSION_ARB: - minorVersion = attribList[++i]; - break; - case WGL_CONTEXT_LAYER_PLANE_ARB: - layerPlane = attribList[++i]; - break; - case WGL_CONTEXT_FLAGS_ARB: - contextFlags = attribList[++i]; - break; - case WGL_CONTEXT_PROFILE_MASK_ARB: - profileMask = attribList[++i]; - break; - case 0: - /* end of list */ - done = TRUE; - break; - default: - /* bad attribute */ - SetLastError(ERROR_INVALID_PARAMETER); - return NULL; - } - } - } - - /* check version (generate ERROR_INVALID_VERSION_ARB if bad) */ - switch (majorVersion) { - case 1: - if (minorVersion < 0 || minorVersion > 5) { - SetLastError(ERROR_INVALID_VERSION_ARB); - return NULL; - } - break; - case 2: - if (minorVersion < 0 || minorVersion > 1) { - SetLastError(ERROR_INVALID_VERSION_ARB); - return NULL; - } - break; - case 3: - if (minorVersion < 0 || minorVersion > 3) { - SetLastError(ERROR_INVALID_VERSION_ARB); - return NULL; - } - break; - case 4: - if (minorVersion < 0 || minorVersion > 2) { - SetLastError(ERROR_INVALID_VERSION_ARB); - return NULL; - } - break; - default: - return NULL; - } - - if ((contextFlags & WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB) && majorVersion < 3) { - SetLastError(ERROR_INVALID_VERSION_ARB); - return NULL; - } - - /* check profileMask */ - if (profileMask != WGL_CONTEXT_CORE_PROFILE_BIT_ARB && - profileMask != WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB) { - SetLastError(ERROR_INVALID_PROFILE_ARB); - return NULL; - } - - return (HGLRC) stw_create_context_attribs( hDC, layerPlane, (DHGLRC)(UINT_PTR)hShareContext, - majorVersion, minorVersion, contextFlags, profileMask ); -} diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c deleted file mode 100644 index 1b3a0765016..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_extensionsstring.c +++ /dev/null @@ -1,65 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -//#include -#include -#include -#include - -#define WGL_WGLEXT_PROTOTYPES - -#include -#include - - -static const char *stw_extension_string = - "WGL_ARB_extensions_string " - "WGL_ARB_multisample " - "WGL_ARB_pbuffer " - "WGL_ARB_pixel_format " -/* "WGL_EXT_swap_interval " */ - "WGL_EXT_extensions_string"; - - -WINGDIAPI const char * APIENTRY -wglGetExtensionsStringARB( - HDC hdc ) -{ - if (!hdc) { - return NULL; - } - - return stw_extension_string; -} - - -WINGDIAPI const char * APIENTRY -wglGetExtensionsStringEXT( void ) -{ - return stw_extension_string; -} diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_gallium.c b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_gallium.c deleted file mode 100644 index 5ecbd8048de..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_gallium.c +++ /dev/null @@ -1,50 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - -#include "pipe/p_screen.h" -#include "stw_device.h" -#include "stw_winsys.h" -#include "stw_ext_gallium.h" - - -struct pipe_screen * APIENTRY -wglGetGalliumScreenMESA(void) -{ - return stw_dev ? stw_dev->screen : NULL; -} - - -/* XXX: Unify with stw_create_layer_context */ -struct pipe_context * APIENTRY -wglCreateGalliumContextMESA(void) -{ - if(!stw_dev) - return NULL; - - return stw_dev->screen->context_create( stw_dev->screen, NULL ); -} diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_gallium.h b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_gallium.h deleted file mode 100644 index 901abc0942c..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_gallium.h +++ /dev/null @@ -1,47 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef STW_EXTGALLIUM_H_ -#define STW_EXTGALLIUM_H_ - - -//#include - - -struct pipe_screen; -struct pipe_context; - - -struct pipe_screen * APIENTRY -wglGetGalliumScreenMESA(void); - - -struct pipe_context * APIENTRY -wglCreateGalliumContextMESA(void); - - -#endif /* STW_EXTGALLIUM_H_ */ diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_pbuffer.c b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_pbuffer.c deleted file mode 100644 index 247b31fbd16..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_pbuffer.c +++ /dev/null @@ -1,283 +0,0 @@ -/************************************************************************** - * - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -//#include - -#define WGL_WGLEXT_PROTOTYPES - -#include -#include - -#include "pipe/p_defines.h" -#include "pipe/p_screen.h" - -#include "stw_device.h" -#include "stw_pixelformat.h" -#include "stw_framebuffer.h" - - -#define LARGE_WINDOW_SIZE 60000 - - -static LRESULT CALLBACK -WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - MINMAXINFO *pMMI; - switch (uMsg) { - case WM_GETMINMAXINFO: - // Allow to create a window bigger than the desktop - pMMI = (MINMAXINFO *)lParam; - pMMI->ptMaxSize.x = LARGE_WINDOW_SIZE; - pMMI->ptMaxSize.y = LARGE_WINDOW_SIZE; - pMMI->ptMaxTrackSize.x = LARGE_WINDOW_SIZE; - pMMI->ptMaxTrackSize.y = LARGE_WINDOW_SIZE; - break; - default: - break; - } - - return DefWindowProc(hWnd, uMsg, wParam, lParam); -} - - -HPBUFFERARB WINAPI -wglCreatePbufferARB(HDC _hDC, - int iPixelFormat, - int iWidth, - int iHeight, - const int *piAttribList) -{ - static boolean first = TRUE; - const int *piAttrib; - int useLargest = 0; - const struct stw_pixelformat_info *info; - struct stw_framebuffer *fb; - DWORD dwExStyle; - DWORD dwStyle; - RECT rect; - HWND hWnd; - HDC hDC; - - info = stw_pixelformat_get_info(iPixelFormat); - if (!info) { - SetLastError(ERROR_INVALID_PIXEL_FORMAT); - return 0; - } - - if (iWidth <= 0 || iHeight <= 0) { - SetLastError(ERROR_INVALID_DATA); - return 0; - } - - for (piAttrib = piAttribList; *piAttrib; piAttrib++) { - switch (*piAttrib) { - case WGL_PBUFFER_LARGEST_ARB: - piAttrib++; - useLargest = *piAttrib; - break; - default: - SetLastError(ERROR_INVALID_DATA); - return 0; - } - } - - if (iWidth > stw_dev->max_2d_length) { - if (useLargest) { - iWidth = stw_dev->max_2d_length; - } else { - SetLastError(ERROR_NO_SYSTEM_RESOURCES); - return 0; - } - } - - if (iHeight > stw_dev->max_2d_length) { - if (useLargest) { - iHeight = stw_dev->max_2d_length; - } else { - SetLastError(ERROR_NO_SYSTEM_RESOURCES); - return 0; - } - } - - /* - * Implement pbuffers through invisible windows - */ - - if (first) { - WNDCLASS wc; - memset(&wc, 0, sizeof wc); - wc.hbrBackground = (HBRUSH) (COLOR_BTNFACE + 1); - wc.hCursor = LoadCursor(NULL, IDC_ARROW); - wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); - wc.lpfnWndProc = WndProc; - wc.lpszClassName = "wglpbuffer"; - wc.style = CS_OWNDC | CS_HREDRAW | CS_VREDRAW; - RegisterClass(&wc); - first = FALSE; - } - - dwExStyle = 0; - dwStyle = WS_CLIPSIBLINGS | WS_CLIPCHILDREN; - - if (0) { - /* - * Don't hide the window -- useful for debugging what the application is - * drawing - */ - - dwStyle |= WS_VISIBLE | WS_OVERLAPPEDWINDOW; - } else { - dwStyle |= WS_POPUPWINDOW; - } - - rect.left = 0; - rect.top = 0; - rect.right = rect.left + iWidth; - rect.bottom = rect.top + iHeight; - - /* - * The CreateWindowEx parameters are the total (outside) dimensions of the - * window, which can vary with Windows version and user settings. Use - * AdjustWindowRect to get the required total area for the given client area. - * - * AdjustWindowRectEx does not accept WS_OVERLAPPED style (which is defined - * as 0), which means we need to use some other style instead, e.g., - * WS_OVERLAPPEDWINDOW or WS_POPUPWINDOW as above. - */ - - AdjustWindowRectEx(&rect, dwStyle, FALSE, dwExStyle); - - hWnd = CreateWindowEx(dwExStyle, - "wglpbuffer", /* wc.lpszClassName */ - NULL, - dwStyle, - CW_USEDEFAULT, /* x */ - CW_USEDEFAULT, /* y */ - rect.right - rect.left, /* width */ - rect.bottom - rect.top, /* height */ - NULL, - NULL, - NULL, - NULL); - if (!hWnd) { - return 0; - } - -#ifdef DEBUG - /* - * Verify the client area size matches the specified size. - */ - - GetClientRect(hWnd, &rect); - assert(rect.left == 0); - assert(rect.top == 0); - assert(rect.right - rect.left == iWidth); - assert(rect.bottom - rect.top == iHeight); -#endif - - hDC = GetDC(hWnd); - if (!hDC) { - return 0; - } - - SetPixelFormat(hDC, iPixelFormat, &info->pfd); - - fb = stw_framebuffer_create(hDC, iPixelFormat); - if (!fb) { - SetLastError(ERROR_NO_SYSTEM_RESOURCES); - } else { - stw_framebuffer_release(fb); - } - - return (HPBUFFERARB)fb; -} - - -HDC WINAPI -wglGetPbufferDCARB(HPBUFFERARB hPbuffer) -{ - struct stw_framebuffer *fb; - HDC hDC; - - fb = (struct stw_framebuffer *)hPbuffer; - - hDC = GetDC(fb->hWnd); - SetPixelFormat(hDC, fb->iPixelFormat, &fb->pfi->pfd); - - return hDC; -} - - -int WINAPI -wglReleasePbufferDCARB(HPBUFFERARB hPbuffer, - HDC hDC) -{ - struct stw_framebuffer *fb; - - fb = (struct stw_framebuffer *)hPbuffer; - - return ReleaseDC(fb->hWnd, hDC); -} - - -BOOL WINAPI -wglDestroyPbufferARB(HPBUFFERARB hPbuffer) -{ - struct stw_framebuffer *fb; - - fb = (struct stw_framebuffer *)hPbuffer; - - /* This will destroy all our data */ - return DestroyWindow(fb->hWnd); -} - - -BOOL WINAPI -wglQueryPbufferARB(HPBUFFERARB hPbuffer, - int iAttribute, - int *piValue) -{ - struct stw_framebuffer *fb; - - fb = (struct stw_framebuffer *)hPbuffer; - - switch (iAttribute) { - case WGL_PBUFFER_WIDTH_ARB: - *piValue = fb->width; - return TRUE; - case WGL_PBUFFER_HEIGHT_ARB: - *piValue = fb->height; - return TRUE; - case WGL_PBUFFER_LOST_ARB: - /* We assume that no content is ever lost due to display mode change */ - *piValue = FALSE; - return TRUE; - default: - SetLastError(ERROR_INVALID_DATA); - return FALSE; - } -} diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_pixelformat.c b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_pixelformat.c deleted file mode 100644 index b353be9e03a..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_pixelformat.c +++ /dev/null @@ -1,500 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -/** - * @file - * - * WGL_ARB_pixel_format extension implementation. - * - * @sa http://www.opengl.org/registry/specs/ARB/wgl_pixel_format.txt - */ - - -//#include - -#define WGL_WGLEXT_PROTOTYPES - -#include -#include - -#include "pipe/p_compiler.h" -#include "util/u_memory.h" -#include "stw_device.h" -#include "stw_pixelformat.h" - - -static boolean -stw_query_attrib( - int iPixelFormat, - int iLayerPlane, - int attrib, - int *pvalue ) -{ - uint count; - uint index; - const struct stw_pixelformat_info *pfi; - - count = stw_pixelformat_get_extended_count(); - - if (attrib == WGL_NUMBER_PIXEL_FORMATS_ARB) { - *pvalue = (int) count; - return TRUE; - } - - index = (uint) iPixelFormat - 1; - if (index >= count) - return FALSE; - - pfi = stw_pixelformat_get_info( index ); - - switch (attrib) { - case WGL_DRAW_TO_WINDOW_ARB: - *pvalue = pfi->pfd.dwFlags & PFD_DRAW_TO_WINDOW ? TRUE : FALSE; - return TRUE; - - case WGL_DRAW_TO_BITMAP_ARB: - *pvalue = pfi->pfd.dwFlags & PFD_DRAW_TO_BITMAP ? TRUE : FALSE; - return TRUE; - - case WGL_NEED_PALETTE_ARB: - *pvalue = pfi->pfd.dwFlags & PFD_NEED_PALETTE ? TRUE : FALSE; - return TRUE; - - case WGL_NEED_SYSTEM_PALETTE_ARB: - *pvalue = pfi->pfd.dwFlags & PFD_NEED_SYSTEM_PALETTE ? TRUE : FALSE; - return TRUE; - - case WGL_SWAP_METHOD_ARB: - *pvalue = pfi->pfd.dwFlags & PFD_SWAP_COPY ? WGL_SWAP_COPY_ARB : WGL_SWAP_UNDEFINED_ARB; - return TRUE; - - case WGL_SWAP_LAYER_BUFFERS_ARB: - *pvalue = FALSE; - return TRUE; - - case WGL_NUMBER_OVERLAYS_ARB: - *pvalue = 0; - return TRUE; - - case WGL_NUMBER_UNDERLAYS_ARB: - *pvalue = 0; - return TRUE; - } - - if (iLayerPlane != 0) - return FALSE; - - switch (attrib) { - case WGL_ACCELERATION_ARB: - *pvalue = WGL_FULL_ACCELERATION_ARB; - break; - - case WGL_TRANSPARENT_ARB: - *pvalue = FALSE; - break; - - case WGL_TRANSPARENT_RED_VALUE_ARB: - case WGL_TRANSPARENT_GREEN_VALUE_ARB: - case WGL_TRANSPARENT_BLUE_VALUE_ARB: - case WGL_TRANSPARENT_ALPHA_VALUE_ARB: - case WGL_TRANSPARENT_INDEX_VALUE_ARB: - break; - - case WGL_SHARE_DEPTH_ARB: - case WGL_SHARE_STENCIL_ARB: - case WGL_SHARE_ACCUM_ARB: - *pvalue = TRUE; - break; - - case WGL_SUPPORT_GDI_ARB: - *pvalue = pfi->pfd.dwFlags & PFD_SUPPORT_GDI ? TRUE : FALSE; - break; - - case WGL_SUPPORT_OPENGL_ARB: - *pvalue = pfi->pfd.dwFlags & PFD_SUPPORT_OPENGL ? TRUE : FALSE; - break; - - case WGL_DOUBLE_BUFFER_ARB: - *pvalue = pfi->pfd.dwFlags & PFD_DOUBLEBUFFER ? TRUE : FALSE; - break; - - case WGL_STEREO_ARB: - *pvalue = pfi->pfd.dwFlags & PFD_STEREO ? TRUE : FALSE; - break; - - case WGL_PIXEL_TYPE_ARB: - switch (pfi->pfd.iPixelType) { - case PFD_TYPE_RGBA: - *pvalue = WGL_TYPE_RGBA_ARB; - break; - case PFD_TYPE_COLORINDEX: - *pvalue = WGL_TYPE_COLORINDEX_ARB; - break; - default: - return FALSE; - } - break; - - case WGL_COLOR_BITS_ARB: - *pvalue = pfi->pfd.cColorBits; - break; - - case WGL_RED_BITS_ARB: - *pvalue = pfi->pfd.cRedBits; - break; - - case WGL_RED_SHIFT_ARB: - *pvalue = pfi->pfd.cRedShift; - break; - - case WGL_GREEN_BITS_ARB: - *pvalue = pfi->pfd.cGreenBits; - break; - - case WGL_GREEN_SHIFT_ARB: - *pvalue = pfi->pfd.cGreenShift; - break; - - case WGL_BLUE_BITS_ARB: - *pvalue = pfi->pfd.cBlueBits; - break; - - case WGL_BLUE_SHIFT_ARB: - *pvalue = pfi->pfd.cBlueShift; - break; - - case WGL_ALPHA_BITS_ARB: - *pvalue = pfi->pfd.cAlphaBits; - break; - - case WGL_ALPHA_SHIFT_ARB: - *pvalue = pfi->pfd.cAlphaShift; - break; - - case WGL_ACCUM_BITS_ARB: - *pvalue = pfi->pfd.cAccumBits; - break; - - case WGL_ACCUM_RED_BITS_ARB: - *pvalue = pfi->pfd.cAccumRedBits; - break; - - case WGL_ACCUM_GREEN_BITS_ARB: - *pvalue = pfi->pfd.cAccumGreenBits; - break; - - case WGL_ACCUM_BLUE_BITS_ARB: - *pvalue = pfi->pfd.cAccumBlueBits; - break; - - case WGL_ACCUM_ALPHA_BITS_ARB: - *pvalue = pfi->pfd.cAccumAlphaBits; - break; - - case WGL_DEPTH_BITS_ARB: - *pvalue = pfi->pfd.cDepthBits; - break; - - case WGL_STENCIL_BITS_ARB: - *pvalue = pfi->pfd.cStencilBits; - break; - - case WGL_AUX_BUFFERS_ARB: - *pvalue = pfi->pfd.cAuxBuffers; - break; - - case WGL_SAMPLE_BUFFERS_ARB: - *pvalue = 1; - break; - - case WGL_SAMPLES_ARB: - *pvalue = pfi->stvis.samples; - break; - - - /* WGL_ARB_pbuffer */ - - case WGL_MAX_PBUFFER_WIDTH_ARB: - case WGL_MAX_PBUFFER_HEIGHT_ARB: - *pvalue = stw_dev->max_2d_length; - break; - - case WGL_MAX_PBUFFER_PIXELS_ARB: - *pvalue = stw_dev->max_2d_length * stw_dev->max_2d_length; - break; - - case WGL_DRAW_TO_PBUFFER_ARB: - *pvalue = 1; - break; - - - default: - return FALSE; - } - - return TRUE; -} - -struct attrib_match_info -{ - int attribute; - int weight; - BOOL exact; -}; - -static const struct attrib_match_info attrib_match[] = { - - /* WGL_ARB_pixel_format */ - { WGL_DRAW_TO_WINDOW_ARB, 0, TRUE }, - { WGL_DRAW_TO_BITMAP_ARB, 0, TRUE }, - { WGL_ACCELERATION_ARB, 0, TRUE }, - { WGL_NEED_PALETTE_ARB, 0, TRUE }, - { WGL_NEED_SYSTEM_PALETTE_ARB, 0, TRUE }, - { WGL_SWAP_LAYER_BUFFERS_ARB, 0, TRUE }, - { WGL_SWAP_METHOD_ARB, 0, TRUE }, - { WGL_NUMBER_OVERLAYS_ARB, 4, FALSE }, - { WGL_NUMBER_UNDERLAYS_ARB, 4, FALSE }, - /*{ WGL_SHARE_DEPTH_ARB, 0, TRUE },*/ /* no overlays -- ignore */ - /*{ WGL_SHARE_STENCIL_ARB, 0, TRUE },*/ /* no overlays -- ignore */ - /*{ WGL_SHARE_ACCUM_ARB, 0, TRUE },*/ /* no overlays -- ignore */ - { WGL_SUPPORT_GDI_ARB, 0, TRUE }, - { WGL_SUPPORT_OPENGL_ARB, 0, TRUE }, - { WGL_DOUBLE_BUFFER_ARB, 0, TRUE }, - { WGL_STEREO_ARB, 0, TRUE }, - { WGL_PIXEL_TYPE_ARB, 0, TRUE }, - { WGL_COLOR_BITS_ARB, 1, FALSE }, - { WGL_RED_BITS_ARB, 1, FALSE }, - { WGL_GREEN_BITS_ARB, 1, FALSE }, - { WGL_BLUE_BITS_ARB, 1, FALSE }, - { WGL_ALPHA_BITS_ARB, 1, FALSE }, - { WGL_ACCUM_BITS_ARB, 1, FALSE }, - { WGL_ACCUM_RED_BITS_ARB, 1, FALSE }, - { WGL_ACCUM_GREEN_BITS_ARB, 1, FALSE }, - { WGL_ACCUM_BLUE_BITS_ARB, 1, FALSE }, - { WGL_ACCUM_ALPHA_BITS_ARB, 1, FALSE }, - { WGL_DEPTH_BITS_ARB, 1, FALSE }, - { WGL_STENCIL_BITS_ARB, 1, FALSE }, - { WGL_AUX_BUFFERS_ARB, 2, FALSE }, - - /* WGL_ARB_multisample */ - { WGL_SAMPLE_BUFFERS_ARB, 2, FALSE }, - { WGL_SAMPLES_ARB, 2, FALSE } -}; - -struct stw_pixelformat_score -{ - int points; - uint index; -}; - -static BOOL -score_pixelformats( - struct stw_pixelformat_score *scores, - uint count, - int attribute, - int expected_value ) -{ - uint i; - const struct attrib_match_info *ami = NULL; - uint index; - - /* Find out if a given attribute should be considered for score calculation. - */ - for (i = 0; i < sizeof( attrib_match ) / sizeof( attrib_match[0] ); i++) { - if (attrib_match[i].attribute == attribute) { - ami = &attrib_match[i]; - break; - } - } - if (ami == NULL) - return TRUE; - - /* Iterate all pixelformats, query the requested attribute and calculate - * score points. - */ - for (index = 0; index < count; index++) { - int actual_value; - - if (!stw_query_attrib( index + 1, 0, attribute, &actual_value )) - return FALSE; - - if (ami->exact) { - /* For an exact match criteria, if the actual and expected values differ, - * the score is set to 0 points, effectively removing the pixelformat - * from a list of matching pixelformats. - */ - if (actual_value != expected_value) - scores[index].points = 0; - } - else { - /* For a minimum match criteria, if the actual value is smaller than the expected - * value, the pixelformat is rejected (score set to 0). However, if the actual - * value is bigger, the pixelformat is given a penalty to favour pixelformats that - * more closely match the expected values. - */ - if (actual_value < expected_value) - scores[index].points = 0; - else if (actual_value > expected_value) - scores[index].points -= (actual_value - expected_value) * ami->weight; - } - } - - return TRUE; -} - -WINGDIAPI BOOL APIENTRY -wglChoosePixelFormatARB( - HDC hdc, - const int *piAttribIList, - const FLOAT *pfAttribFList, - UINT nMaxFormats, - int *piFormats, - UINT *nNumFormats ) -{ - uint count; - struct stw_pixelformat_score *scores; - uint i; - - *nNumFormats = 0; - - /* Allocate and initialize pixelformat score table -- better matches - * have higher scores. Start with a high score and take out penalty - * points for a mismatch when the match does not have to be exact. - * Set a score to 0 if there is a mismatch for an exact match criteria. - */ - count = stw_pixelformat_get_extended_count(); - scores = (struct stw_pixelformat_score *) MALLOC( count * sizeof( struct stw_pixelformat_score ) ); - if (scores == NULL) - return FALSE; - for (i = 0; i < count; i++) { - scores[i].points = 0x7fffffff; - scores[i].index = i; - } - - /* Given the attribute list calculate a score for each pixelformat. - */ - if (piAttribIList != NULL) { - while (*piAttribIList != 0) { - if (!score_pixelformats( scores, count, piAttribIList[0], piAttribIList[1] )) { - FREE( scores ); - return FALSE; - } - piAttribIList += 2; - } - } - if (pfAttribFList != NULL) { - while (*pfAttribFList != 0) { - if (!score_pixelformats( scores, count, (int) pfAttribFList[0], (int) pfAttribFList[1] )) { - FREE( scores ); - return FALSE; - } - pfAttribFList += 2; - } - } - - /* Bubble-sort the resulting scores. Pixelformats with higher scores go first. - * TODO: Find out if there are any patent issues with it. - */ - if (count > 1) { - uint n = count; - boolean swapped; - - do { - swapped = FALSE; - for (i = 1; i < n; i++) { - if (scores[i - 1].points < scores[i].points) { - struct stw_pixelformat_score score = scores[i - 1]; - - scores[i - 1] = scores[i]; - scores[i] = score; - swapped = TRUE; - } - } - n--; - } - while (swapped); - } - - /* Return a list of pixelformats that are the best match. - * Reject pixelformats with non-positive scores. - */ - for (i = 0; i < count; i++) { - if (scores[i].points > 0) { - if (*nNumFormats < nMaxFormats) - piFormats[*nNumFormats] = scores[i].index + 1; - (*nNumFormats)++; - } - } - - FREE( scores ); - return TRUE; -} - -WINGDIAPI BOOL APIENTRY -wglGetPixelFormatAttribfvARB( - HDC hdc, - int iPixelFormat, - int iLayerPlane, - UINT nAttributes, - const int *piAttributes, - FLOAT *pfValues ) -{ - UINT i; - - (void) hdc; - - for (i = 0; i < nAttributes; i++) { - int value; - - if (!stw_query_attrib( iPixelFormat, iLayerPlane, piAttributes[i], &value )) - return FALSE; - pfValues[i] = (FLOAT) value; - } - - return TRUE; -} - -WINGDIAPI BOOL APIENTRY -wglGetPixelFormatAttribivARB( - HDC hdc, - int iPixelFormat, - int iLayerPlane, - UINT nAttributes, - const int *piAttributes, - int *piValues ) -{ - UINT i; - - (void) hdc; - - for (i = 0; i < nAttributes; i++) { - if (!stw_query_attrib( iPixelFormat, iLayerPlane, piAttributes[i], &piValues[i] )) - return FALSE; - } - - return TRUE; -} diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_swapinterval.c b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_swapinterval.c deleted file mode 100644 index c2f875558f0..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_ext_swapinterval.c +++ /dev/null @@ -1,60 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -//#include -#include -#include -#include - -#define WGL_WGLEXT_PROTOTYPES - -#include -#include -#include "util/u_debug.h" - -/* A dummy implementation of this extension. - * - * Required as some applications retrieve and call these functions - * regardless of the fact that we don't advertise the extension and - * further more the results of wglGetProcAddress are NULL. - */ -WINGDIAPI BOOL APIENTRY -wglSwapIntervalEXT(int interval) -{ - (void) interval; - debug_printf("%s: %d\n", __FUNCTION__, interval); - return TRUE; -} - -WINGDIAPI int APIENTRY -wglGetSwapIntervalEXT(void) -{ - return 0; -} - - diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_framebuffer.c b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_framebuffer.c deleted file mode 100644 index 8a5057a8fae..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_framebuffer.c +++ /dev/null @@ -1,620 +0,0 @@ -/************************************************************************** - * - * Copyright 2008-2009 Vmware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -//#include - -#include "pipe/p_format.h" -#include "pipe/p_screen.h" -#include "util/u_format.h" -#include "util/u_memory.h" -#include "state_tracker/st_api.h" - -#include "stw_icd.h" -#include "stw_framebuffer.h" -#include "stw_device.h" -#include "stw_winsys.h" -#include "stw_tls.h" -#include "stw_context.h" -#include "stw_st.h" - - -/** - * Search the framebuffer with the matching HWND while holding the - * stw_dev::fb_mutex global lock. - */ -static INLINE struct stw_framebuffer * -stw_framebuffer_from_hwnd_locked( - HWND hwnd ) -{ - struct stw_framebuffer *fb; - - for (fb = stw_dev->fb_head; fb != NULL; fb = fb->next) - if (fb->hWnd == hwnd) { - pipe_mutex_lock(fb->mutex); - break; - } - - return fb; -} - - -/** - * Destroy this framebuffer. Both stw_dev::fb_mutex and stw_framebuffer::mutex - * must be held, by this order. If there are still references to the - * framebuffer, nothing will happen. - */ -static INLINE void -stw_framebuffer_destroy_locked( - struct stw_framebuffer *fb ) -{ - struct stw_framebuffer **link; - - /* check the reference count */ - fb->refcnt--; - if (fb->refcnt) { - pipe_mutex_unlock( fb->mutex ); - return; - } - - link = &stw_dev->fb_head; - while (*link != fb) - link = &(*link)->next; - assert(*link); - *link = fb->next; - fb->next = NULL; - - if(fb->shared_surface) - stw_dev->stw_winsys->shared_surface_close(stw_dev->screen, fb->shared_surface); - - stw_st_destroy_framebuffer_locked(fb->stfb); - - ReleaseDC(fb->hWnd, fb->hDC); - - pipe_mutex_unlock( fb->mutex ); - - pipe_mutex_destroy( fb->mutex ); - - FREE( fb ); -} - - -void -stw_framebuffer_release( - struct stw_framebuffer *fb) -{ - assert(fb); - pipe_mutex_unlock( fb->mutex ); -} - - -static INLINE void -stw_framebuffer_get_size( struct stw_framebuffer *fb ) -{ - LONG width, height; - RECT client_rect; - RECT window_rect; - POINT client_pos; - - /* - * Sanity checking. - */ - - assert(fb->hWnd); - assert(fb->width && fb->height); - assert(fb->client_rect.right == fb->client_rect.left + fb->width); - assert(fb->client_rect.bottom == fb->client_rect.top + fb->height); - - /* - * Get the client area size. - */ - - if (!GetClientRect(fb->hWnd, &client_rect)) { - return; - } - - assert(client_rect.left == 0); - assert(client_rect.top == 0); - width = client_rect.right - client_rect.left; - height = client_rect.bottom - client_rect.top; - - if (width <= 0 || height <= 0) { - /* - * When the window is minimized GetClientRect will return zeros. Simply - * preserve the current window size, until the window is restored or - * maximized again. - */ - - return; - } - - if (width != fb->width || height != fb->height) { - fb->must_resize = TRUE; - fb->width = width; - fb->height = height; - } - - client_pos.x = 0; - client_pos.y = 0; - if (ClientToScreen(fb->hWnd, &client_pos) && - GetWindowRect(fb->hWnd, &window_rect)) { - fb->client_rect.left = client_pos.x - window_rect.left; - fb->client_rect.top = client_pos.y - window_rect.top; - } - - fb->client_rect.right = fb->client_rect.left + fb->width; - fb->client_rect.bottom = fb->client_rect.top + fb->height; - -#if 0 - debug_printf("\n"); - debug_printf("%s: hwnd = %p\n", __FUNCTION__, fb->hWnd); - debug_printf("%s: client_position = (%li, %li)\n", - __FUNCTION__, client_pos.x, client_pos.y); - debug_printf("%s: window_rect = (%li, %li) - (%li, %li)\n", - __FUNCTION__, - window_rect.left, window_rect.top, - window_rect.right, window_rect.bottom); - debug_printf("%s: client_rect = (%li, %li) - (%li, %li)\n", - __FUNCTION__, - fb->client_rect.left, fb->client_rect.top, - fb->client_rect.right, fb->client_rect.bottom); -#endif -} - - -/** - * @sa http://msdn.microsoft.com/en-us/library/ms644975(VS.85).aspx - * @sa http://msdn.microsoft.com/en-us/library/ms644960(VS.85).aspx - */ -LRESULT CALLBACK -stw_call_window_proc( - int nCode, - WPARAM wParam, - LPARAM lParam ) -{ - struct stw_tls_data *tls_data; - PCWPSTRUCT pParams = (PCWPSTRUCT)lParam; - struct stw_framebuffer *fb; - - tls_data = stw_tls_get_data(); - if(!tls_data) - return 0; - - if (nCode < 0 || !stw_dev) - return CallNextHookEx(tls_data->hCallWndProcHook, nCode, wParam, lParam); - - if (pParams->message == WM_WINDOWPOSCHANGED) - { - /* We handle WM_WINDOWPOSCHANGED instead of WM_SIZE because according to - * http://blogs.msdn.com/oldnewthing/archive/2008/01/15/7113860.aspx - * WM_SIZE is generated from WM_WINDOWPOSCHANGED by DefWindowProc so it - * can be masked out by the application. */ - LPWINDOWPOS lpWindowPos = (LPWINDOWPOS)pParams->lParam; - if((lpWindowPos->flags & SWP_SHOWWINDOW) || - !(lpWindowPos->flags & SWP_NOMOVE) || - !(lpWindowPos->flags & SWP_NOSIZE)) { - fb = stw_framebuffer_from_hwnd( pParams->hwnd ); - if(fb) { - /* Size in WINDOWPOS includes the window frame, so get the size - * of the client area via GetClientRect. */ - stw_framebuffer_get_size(fb); - stw_framebuffer_release(fb); - } - } - } - else if (pParams->message == WM_DESTROY) { - pipe_mutex_lock( stw_dev->fb_mutex ); - fb = stw_framebuffer_from_hwnd_locked( pParams->hwnd ); - if(fb) - stw_framebuffer_destroy_locked(fb); - pipe_mutex_unlock( stw_dev->fb_mutex ); - } - - return CallNextHookEx(tls_data->hCallWndProcHook, nCode, wParam, lParam); -} - - -struct stw_framebuffer * -stw_framebuffer_create( - HDC hdc, - int iPixelFormat ) -{ - HWND hWnd; - struct stw_framebuffer *fb; - const struct stw_pixelformat_info *pfi; - - /* We only support drawing to a window. */ - hWnd = WindowFromDC( hdc ); - if(!hWnd) - return NULL; - - fb = CALLOC_STRUCT( stw_framebuffer ); - if (fb == NULL) - return NULL; - - /* Applications use, create, destroy device contexts, so the hdc passed is. We create our own DC - * because we need one for single buffered visuals. - */ - fb->hDC = GetDC(hWnd); - - fb->hWnd = hWnd; - fb->iPixelFormat = iPixelFormat; - - fb->pfi = pfi = stw_pixelformat_get_info( iPixelFormat - 1 ); - fb->stfb = stw_st_create_framebuffer( fb ); - if (!fb->stfb) { - FREE( fb ); - return NULL; - } - - fb->refcnt = 1; - - /* - * Windows can be sometimes have zero width and or height, but we ensure - * a non-zero framebuffer size at all times. - */ - - fb->must_resize = TRUE; - fb->width = 1; - fb->height = 1; - fb->client_rect.left = 0; - fb->client_rect.top = 0; - fb->client_rect.right = fb->client_rect.left + fb->width; - fb->client_rect.bottom = fb->client_rect.top + fb->height; - - stw_framebuffer_get_size(fb); - - pipe_mutex_init( fb->mutex ); - - /* This is the only case where we lock the stw_framebuffer::mutex before - * stw_dev::fb_mutex, since no other thread can know about this framebuffer - * and we must prevent any other thread from destroying it before we return. - */ - pipe_mutex_lock( fb->mutex ); - - pipe_mutex_lock( stw_dev->fb_mutex ); - fb->next = stw_dev->fb_head; - stw_dev->fb_head = fb; - pipe_mutex_unlock( stw_dev->fb_mutex ); - - return fb; -} - -/** - * Have ptr reference fb. The referenced framebuffer should be locked. - */ -void -stw_framebuffer_reference( - struct stw_framebuffer **ptr, - struct stw_framebuffer *fb) -{ - struct stw_framebuffer *old_fb = *ptr; - - if (old_fb == fb) - return; - - if (fb) - fb->refcnt++; - if (old_fb) { - pipe_mutex_lock(stw_dev->fb_mutex); - - pipe_mutex_lock(old_fb->mutex); - stw_framebuffer_destroy_locked(old_fb); - - pipe_mutex_unlock(stw_dev->fb_mutex); - } - - *ptr = fb; -} - - -/** - * Update the framebuffer's size if necessary. - */ -void -stw_framebuffer_update( - struct stw_framebuffer *fb) -{ - assert(fb->stfb); - assert(fb->height); - assert(fb->width); - - /* XXX: It would be nice to avoid checking the size again -- in theory - * stw_call_window_proc would have cought the resize and stored the right - * size already, but unfortunately threads created before the DllMain is - * called don't get a DLL_THREAD_ATTACH notification, and there is no way - * to know of their existing without using the not very portable PSAPI. - */ - stw_framebuffer_get_size(fb); -} - - -void -stw_framebuffer_cleanup( void ) -{ - struct stw_framebuffer *fb; - struct stw_framebuffer *next; - - if (!stw_dev) - return; - - pipe_mutex_lock( stw_dev->fb_mutex ); - - fb = stw_dev->fb_head; - while (fb) { - next = fb->next; - - pipe_mutex_lock(fb->mutex); - stw_framebuffer_destroy_locked(fb); - - fb = next; - } - stw_dev->fb_head = NULL; - - pipe_mutex_unlock( stw_dev->fb_mutex ); -} - - -/** - * Given an hdc, return the corresponding stw_framebuffer. - */ -static INLINE struct stw_framebuffer * -stw_framebuffer_from_hdc_locked( - HDC hdc ) -{ - HWND hwnd; - - hwnd = WindowFromDC(hdc); - if (!hwnd) { - return NULL; - } - - return stw_framebuffer_from_hwnd_locked(hwnd); -} - - -/** - * Given an hdc, return the corresponding stw_framebuffer. - */ -struct stw_framebuffer * -stw_framebuffer_from_hdc( - HDC hdc ) -{ - struct stw_framebuffer *fb; - - if (!stw_dev) - return NULL; - - pipe_mutex_lock( stw_dev->fb_mutex ); - fb = stw_framebuffer_from_hdc_locked(hdc); - pipe_mutex_unlock( stw_dev->fb_mutex ); - - return fb; -} - - -/** - * Given an hdc, return the corresponding stw_framebuffer. - */ -struct stw_framebuffer * -stw_framebuffer_from_hwnd( - HWND hwnd ) -{ - struct stw_framebuffer *fb; - - pipe_mutex_lock( stw_dev->fb_mutex ); - fb = stw_framebuffer_from_hwnd_locked(hwnd); - pipe_mutex_unlock( stw_dev->fb_mutex ); - - return fb; -} - - -BOOL APIENTRY -DrvSetPixelFormat( - HDC hdc, - LONG iPixelFormat ) -{ - uint count; - uint index; - struct stw_framebuffer *fb; - - if (!stw_dev) - return FALSE; - - index = (uint) iPixelFormat - 1; - count = stw_pixelformat_get_extended_count(); - if (index >= count) - return FALSE; - - fb = stw_framebuffer_from_hdc_locked(hdc); - if(fb) { - /* SetPixelFormat must be called only once */ - stw_framebuffer_release( fb ); - return FALSE; - } - - fb = stw_framebuffer_create(hdc, iPixelFormat); - if(!fb) { - return FALSE; - } - - stw_framebuffer_release( fb ); - - /* Some applications mistakenly use the undocumented wglSetPixelFormat - * function instead of SetPixelFormat, so we call SetPixelFormat here to - * avoid opengl32.dll's wglCreateContext to fail */ - if (GetPixelFormat(hdc) == 0) { - SetPixelFormat(hdc, iPixelFormat, NULL); - } - - return TRUE; -} - - -int -stw_pixelformat_get( - HDC hdc ) -{ - int iPixelFormat = 0; - struct stw_framebuffer *fb; - - fb = stw_framebuffer_from_hdc(hdc); - if(fb) { - iPixelFormat = fb->iPixelFormat; - stw_framebuffer_release(fb); - } - - return iPixelFormat; -} - - -BOOL APIENTRY -DrvPresentBuffers(HDC hdc, PGLPRESENTBUFFERSDATA data) -{ - struct stw_framebuffer *fb; - struct pipe_screen *screen; - struct pipe_resource *res; - - if (!stw_dev) - return FALSE; - - fb = stw_framebuffer_from_hdc( hdc ); - if (fb == NULL) - return FALSE; - - screen = stw_dev->screen; - - res = (struct pipe_resource *)data->pPrivateData; - - if(data->hSharedSurface != fb->hSharedSurface) { - if(fb->shared_surface) { - stw_dev->stw_winsys->shared_surface_close(screen, fb->shared_surface); - fb->shared_surface = NULL; - } - - fb->hSharedSurface = data->hSharedSurface; - - if(data->hSharedSurface && - stw_dev->stw_winsys->shared_surface_open) { - fb->shared_surface = stw_dev->stw_winsys->shared_surface_open(screen, fb->hSharedSurface); - } - } - - if(fb->shared_surface) { - stw_dev->stw_winsys->compose(screen, - res, - fb->shared_surface, - &fb->client_rect, - data->PresentHistoryToken); - } - else { - stw_dev->stw_winsys->present( screen, res, hdc ); - } - - stw_framebuffer_update(fb); - stw_notify_current_locked(fb); - - stw_framebuffer_release(fb); - - return TRUE; -} - - -/** - * Queue a composition. - * - * It will drop the lock on success. - */ -BOOL -stw_framebuffer_present_locked(HDC hdc, - struct stw_framebuffer *fb, - struct pipe_resource *res) -{ - if(stw_dev->callbacks.wglCbPresentBuffers && - stw_dev->stw_winsys->compose) { - GLCBPRESENTBUFFERSDATA data; - - memset(&data, 0, sizeof data); - data.magic1 = 2; - data.magic2 = 0; - data.AdapterLuid = stw_dev->AdapterLuid; - data.rect = fb->client_rect; - data.pPrivateData = (void *)res; - - stw_notify_current_locked(fb); - stw_framebuffer_release(fb); - - return stw_dev->callbacks.wglCbPresentBuffers(hdc, &data); - } - else { - struct pipe_screen *screen = stw_dev->screen; - - stw_dev->stw_winsys->present( screen, res, hdc ); - - stw_framebuffer_update(fb); - stw_notify_current_locked(fb); - stw_framebuffer_release(fb); - - return TRUE; - } -} - - -BOOL APIENTRY -DrvSwapBuffers( - HDC hdc ) -{ - struct stw_framebuffer *fb; - - if (!stw_dev) - return FALSE; - - fb = stw_framebuffer_from_hdc( hdc ); - if (fb == NULL) - return FALSE; - - if (!(fb->pfi->pfd.dwFlags & PFD_DOUBLEBUFFER)) { - stw_framebuffer_release(fb); - return TRUE; - } - - stw_flush_current_locked(fb); - - return stw_st_swap_framebuffer_locked(hdc, fb->stfb); -} - - -BOOL APIENTRY -DrvSwapLayerBuffers( - HDC hdc, - UINT fuPlanes ) -{ - if(fuPlanes & WGL_SWAP_MAIN_PLANE) - return DrvSwapBuffers(hdc); - - return FALSE; -} diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_framebuffer.h b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_framebuffer.h deleted file mode 100644 index 135f8879e4a..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_framebuffer.h +++ /dev/null @@ -1,167 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef STW_FRAMEBUFFER_H -#define STW_FRAMEBUFFER_H - -//#include - -#include "os/os_thread.h" - -struct pipe_resource; -struct st_framebuffer_iface; -struct stw_pixelformat_info; - -/** - * Windows framebuffer, derived from gl_framebuffer. - */ -struct stw_framebuffer -{ - /** - * This mutex has two purposes: - * - protect the access to the mutable data members below - * - prevent the framebuffer from being deleted while being accessed. - * - * It is OK to lock this mutex while holding the stw_device::fb_mutex lock, - * but the opposite must never happen. - */ - pipe_mutex mutex; - - /* - * Immutable members. - * - * Note that even access to immutable members implies acquiring the mutex - * above, to prevent the framebuffer from being destroyed. - */ - - HDC hDC; - HWND hWnd; - - int iPixelFormat; - const struct stw_pixelformat_info *pfi; - - struct st_framebuffer_iface *stfb; - - /* - * Mutable members. - */ - - unsigned refcnt; - - - /* FIXME: Make this work for multiple contexts bound to the same framebuffer */ - boolean must_resize; - - unsigned width; - unsigned height; - - /** - * Client area rectangle, relative to the window upper-left corner. - * - * @sa GLCBPRESENTBUFFERSDATA::rect. - */ - RECT client_rect; - - HANDLE hSharedSurface; - struct stw_shared_surface *shared_surface; - - /** - * This is protected by stw_device::fb_mutex, not the mutex above. - * - * Deletions must be done by first acquiring stw_device::fb_mutex, and then - * acquiring the stw_framebuffer::mutex of the framebuffer to be deleted. - * This ensures that nobody else is reading/writing to the. - * - * It is not necessary to aquire the mutex above to navigate the linked list - * given that deletions are done with stw_device::fb_mutex held, so no other - * thread can delete. - */ - struct stw_framebuffer *next; -}; - - -/** - * Create a new framebuffer object which will correspond to the given HDC. - * - * This function will acquire stw_framebuffer::mutex. stw_framebuffer_release - * must be called when done - */ -struct stw_framebuffer * -stw_framebuffer_create( - HDC hdc, - int iPixelFormat ); - -void -stw_framebuffer_reference( - struct stw_framebuffer **ptr, - struct stw_framebuffer *fb); - -/** - * Search a framebuffer with a matching HWND. - * - * This function will acquire stw_framebuffer::mutex. stw_framebuffer_release - * must be called when done - */ -struct stw_framebuffer * -stw_framebuffer_from_hwnd( - HWND hwnd ); - -/** - * Search a framebuffer with a matching HDC. - * - * This function will acquire stw_framebuffer::mutex. stw_framebuffer_release - * must be called when done - */ -struct stw_framebuffer * -stw_framebuffer_from_hdc( - HDC hdc ); - -BOOL -stw_framebuffer_present_locked(HDC hdc, - struct stw_framebuffer *fb, - struct pipe_resource *res); - -void -stw_framebuffer_update( - struct stw_framebuffer *fb); - -/** - * Release stw_framebuffer::mutex lock. This framebuffer must not be accessed - * after calling this function, as it may have been deleted by another thread - * in the meanwhile. - */ -void -stw_framebuffer_release( - struct stw_framebuffer *fb); - -/** - * Cleanup any existing framebuffers when exiting application. - */ -void -stw_framebuffer_cleanup(void); - -#endif /* STW_FRAMEBUFFER_H */ diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_getprocaddress.c b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_getprocaddress.c deleted file mode 100644 index e67a3e47d79..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_getprocaddress.c +++ /dev/null @@ -1,100 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -//#include - -#define WGL_WGLEXT_PROTOTYPES - -#include -#include - -#include "glapi/glapi.h" -#include "stw_ext_gallium.h" -#include "stw_device.h" -#include "stw_icd.h" - -struct stw_extension_entry -{ - const char *name; - PROC proc; -}; - -#define STW_EXTENSION_ENTRY(P) { #P, (PROC) P } - -static const struct stw_extension_entry stw_extension_entries[] = { - - /* WGL_ARB_extensions_string */ - STW_EXTENSION_ENTRY( wglGetExtensionsStringARB ), - - /* WGL_ARB_pbuffer */ - STW_EXTENSION_ENTRY( wglCreatePbufferARB ), - STW_EXTENSION_ENTRY( wglGetPbufferDCARB ), - STW_EXTENSION_ENTRY( wglReleasePbufferDCARB ), - STW_EXTENSION_ENTRY( wglDestroyPbufferARB ), - STW_EXTENSION_ENTRY( wglQueryPbufferARB ), - - /* WGL_ARB_pixel_format */ - STW_EXTENSION_ENTRY( wglChoosePixelFormatARB ), - STW_EXTENSION_ENTRY( wglGetPixelFormatAttribfvARB ), - STW_EXTENSION_ENTRY( wglGetPixelFormatAttribivARB ), - - /* WGL_EXT_extensions_string */ - STW_EXTENSION_ENTRY( wglGetExtensionsStringEXT ), - - /* WGL_EXT_swap_interval */ - STW_EXTENSION_ENTRY( wglGetSwapIntervalEXT ), - STW_EXTENSION_ENTRY( wglSwapIntervalEXT ), - - /* WGL_EXT_gallium ? */ - STW_EXTENSION_ENTRY( wglGetGalliumScreenMESA ), - STW_EXTENSION_ENTRY( wglCreateGalliumContextMESA ), - - /* WGL_ARB_create_context */ - STW_EXTENSION_ENTRY( wglCreateContextAttribsARB ), - - { NULL, NULL } -}; - -PROC APIENTRY -DrvGetProcAddress( - LPCSTR lpszProc ) -{ - const struct stw_extension_entry *entry; - - if (!stw_dev) - return NULL; - - if (lpszProc[0] == 'w' && lpszProc[1] == 'g' && lpszProc[2] == 'l') - for (entry = stw_extension_entries; entry->name; entry++) - if (strcmp( lpszProc, entry->name ) == 0) - return entry->proc; - - if (lpszProc[0] == 'g' && lpszProc[1] == 'l') - return (PROC) _glapi_get_proc_address( lpszProc ); - - return NULL; -} diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_pixelformat.c b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_pixelformat.c deleted file mode 100644 index ec044319e2c..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_pixelformat.c +++ /dev/null @@ -1,401 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#include "pipe/p_format.h" -#include "pipe/p_defines.h" -#include "pipe/p_screen.h" - -#include "util/u_format.h" -#include "util/u_debug.h" -#include "util/u_memory.h" - -#include "stw_icd.h" -#include "stw_device.h" -#include "stw_pixelformat.h" -#include "stw_tls.h" - - -struct stw_pf_color_info -{ - enum pipe_format format; - struct { - unsigned char red; - unsigned char green; - unsigned char blue; - unsigned char alpha; - } bits; - struct { - unsigned char red; - unsigned char green; - unsigned char blue; - unsigned char alpha; - } shift; -}; - -struct stw_pf_depth_info -{ - enum pipe_format format; - struct { - unsigned char depth; - unsigned char stencil; - } bits; -}; - - -/* NOTE: order matters, since in otherwise equal circumstances the first - * format listed will get chosen */ - -static const struct stw_pf_color_info -stw_pf_color[] = { - /* no-alpha */ - { PIPE_FORMAT_B8G8R8X8_UNORM, { 8, 8, 8, 0}, {16, 8, 0, 0} }, - { PIPE_FORMAT_X8R8G8B8_UNORM, { 8, 8, 8, 0}, { 8, 16, 24, 0} }, - { PIPE_FORMAT_B5G6R5_UNORM, { 5, 6, 5, 0}, {11, 5, 0, 0} }, - /* alpha */ - { PIPE_FORMAT_B8G8R8A8_UNORM, { 8, 8, 8, 8}, {16, 8, 0, 24} }, - { PIPE_FORMAT_A8R8G8B8_UNORM, { 8, 8, 8, 8}, { 8, 16, 24, 0} }, -#if 0 - { PIPE_FORMAT_R10G10B10A2_UNORM, {10, 10, 10, 2}, { 0, 10, 20, 30} }, -#endif - { PIPE_FORMAT_B5G5R5A1_UNORM, { 5, 5, 5, 1}, {10, 5, 0, 15} }, - { PIPE_FORMAT_B4G4R4A4_UNORM, { 4, 4, 4, 4}, {16, 4, 0, 12} } -}; - - -static const struct stw_pf_depth_info -stw_pf_depth_stencil[] = { - /* pure depth */ - { PIPE_FORMAT_Z32_UNORM, {32, 0} }, - { PIPE_FORMAT_X8Z24_UNORM, {24, 0} }, - { PIPE_FORMAT_Z24X8_UNORM, {24, 0} }, - { PIPE_FORMAT_Z16_UNORM, {16, 0} }, - /* combined depth-stencil */ - { PIPE_FORMAT_Z24_UNORM_S8_UINT, {24, 8} }, - { PIPE_FORMAT_S8_UINT_Z24_UNORM, {24, 8} } -}; - - -static const boolean -stw_pf_doublebuffer[] = { - FALSE, - TRUE, -}; - - -const unsigned -stw_pf_multisample[] = { - 0, - 4 -}; - - -static void -stw_pixelformat_add( - struct stw_device *stw_dev, - const struct stw_pf_color_info *color, - const struct stw_pf_depth_info *depth, - unsigned accum, - boolean doublebuffer, - unsigned samples ) -{ - boolean extended = FALSE; - struct stw_pixelformat_info *pfi; - - assert(stw_dev->pixelformat_extended_count < STW_MAX_PIXELFORMATS); - if(stw_dev->pixelformat_extended_count >= STW_MAX_PIXELFORMATS) - return; - - assert(util_format_get_component_bits(color->format, UTIL_FORMAT_COLORSPACE_RGB, 0) == color->bits.red); - assert(util_format_get_component_bits(color->format, UTIL_FORMAT_COLORSPACE_RGB, 1) == color->bits.green); - assert(util_format_get_component_bits(color->format, UTIL_FORMAT_COLORSPACE_RGB, 2) == color->bits.blue); - assert(util_format_get_component_bits(color->format, UTIL_FORMAT_COLORSPACE_RGB, 3) == color->bits.alpha); - assert(util_format_get_component_bits(depth->format, UTIL_FORMAT_COLORSPACE_ZS, 0) == depth->bits.depth); - assert(util_format_get_component_bits(depth->format, UTIL_FORMAT_COLORSPACE_ZS, 1) == depth->bits.stencil); - - pfi = &stw_dev->pixelformats[stw_dev->pixelformat_extended_count]; - - memset(pfi, 0, sizeof *pfi); - - pfi->pfd.nSize = sizeof pfi->pfd; - pfi->pfd.nVersion = 1; - - pfi->pfd.dwFlags = PFD_SUPPORT_OPENGL; - - /* TODO: also support non-native pixel formats */ - pfi->pfd.dwFlags |= PFD_DRAW_TO_WINDOW; - - /* See http://www.opengl.org/pipeline/article/vol003_7/ */ - pfi->pfd.dwFlags |= PFD_SUPPORT_COMPOSITION; - - if (doublebuffer) - pfi->pfd.dwFlags |= PFD_DOUBLEBUFFER | PFD_SWAP_COPY; - - pfi->pfd.iPixelType = PFD_TYPE_RGBA; - - pfi->pfd.cColorBits = color->bits.red + color->bits.green + color->bits.blue + color->bits.alpha; - pfi->pfd.cRedBits = color->bits.red; - pfi->pfd.cRedShift = color->shift.red; - pfi->pfd.cGreenBits = color->bits.green; - pfi->pfd.cGreenShift = color->shift.green; - pfi->pfd.cBlueBits = color->bits.blue; - pfi->pfd.cBlueShift = color->shift.blue; - pfi->pfd.cAlphaBits = color->bits.alpha; - pfi->pfd.cAlphaShift = color->shift.alpha; - pfi->pfd.cAccumBits = 4*accum; - pfi->pfd.cAccumRedBits = accum; - pfi->pfd.cAccumGreenBits = accum; - pfi->pfd.cAccumBlueBits = accum; - pfi->pfd.cAccumAlphaBits = accum; - pfi->pfd.cDepthBits = depth->bits.depth; - pfi->pfd.cStencilBits = depth->bits.stencil; - pfi->pfd.cAuxBuffers = 0; - pfi->pfd.iLayerType = 0; - pfi->pfd.bReserved = 0; - pfi->pfd.dwLayerMask = 0; - pfi->pfd.dwVisibleMask = 0; - pfi->pfd.dwDamageMask = 0; - - /* - * since state trackers can allocate depth/stencil/accum buffers, we provide - * only color buffers here - */ - pfi->stvis.buffer_mask = ST_ATTACHMENT_FRONT_LEFT_MASK; - if (doublebuffer) - pfi->stvis.buffer_mask |= ST_ATTACHMENT_BACK_LEFT_MASK; - - pfi->stvis.color_format = color->format; - pfi->stvis.depth_stencil_format = depth->format; - - pfi->stvis.accum_format = (accum) ? - PIPE_FORMAT_R16G16B16A16_SNORM : PIPE_FORMAT_NONE; - - pfi->stvis.samples = samples; - pfi->stvis.render_buffer = ST_ATTACHMENT_INVALID; - - ++stw_dev->pixelformat_extended_count; - - if(!extended) { - ++stw_dev->pixelformat_count; - assert(stw_dev->pixelformat_count == stw_dev->pixelformat_extended_count); - } -} - -void -stw_pixelformat_init( void ) -{ - struct pipe_screen *screen = stw_dev->screen; - unsigned i, j, k, l; - - assert( !stw_dev->pixelformat_count ); - assert( !stw_dev->pixelformat_extended_count ); - - for(i = 0; i < Elements(stw_pf_multisample); ++i) { - unsigned samples = stw_pf_multisample[i]; - - /* FIXME: re-enabled MSAA when we can query it */ - if(samples) - continue; - - for(j = 0; j < Elements(stw_pf_color); ++j) { - const struct stw_pf_color_info *color = &stw_pf_color[j]; - - if(!screen->is_format_supported(screen, color->format, PIPE_TEXTURE_2D, - 0, PIPE_BIND_RENDER_TARGET | - PIPE_BIND_DISPLAY_TARGET)) - continue; - - for(k = 0; k < Elements(stw_pf_doublebuffer); ++k) { - unsigned doublebuffer = stw_pf_doublebuffer[k]; - - for(l = 0; l < Elements(stw_pf_depth_stencil); ++l) { - const struct stw_pf_depth_info *depth = &stw_pf_depth_stencil[l]; - - if(!screen->is_format_supported(screen, depth->format, PIPE_TEXTURE_2D, - 0, PIPE_BIND_DEPTH_STENCIL)) - continue; - - stw_pixelformat_add( stw_dev, color, depth, 0, doublebuffer, samples ); - stw_pixelformat_add( stw_dev, color, depth, 16, doublebuffer, samples ); - } - } - } - } - - assert( stw_dev->pixelformat_count <= stw_dev->pixelformat_extended_count ); - assert( stw_dev->pixelformat_extended_count <= STW_MAX_PIXELFORMATS ); -} - -uint -stw_pixelformat_get_count( void ) -{ - return stw_dev->pixelformat_count; -} - -uint -stw_pixelformat_get_extended_count( void ) -{ - return stw_dev->pixelformat_extended_count; -} - -const struct stw_pixelformat_info * -stw_pixelformat_get_info( uint index ) -{ - assert( index < stw_dev->pixelformat_extended_count ); - - return &stw_dev->pixelformats[index]; -} - - -LONG APIENTRY -DrvDescribePixelFormat( - HDC hdc, - INT iPixelFormat, - ULONG cjpfd, - PIXELFORMATDESCRIPTOR *ppfd ) -{ - uint count; - uint index; - const struct stw_pixelformat_info *pfi; - - (void) hdc; - - if (!stw_dev) - return 0; - - count = stw_pixelformat_get_extended_count(); - index = (uint) iPixelFormat - 1; - - if (ppfd == NULL) - return count; - if (index >= count || cjpfd != sizeof( PIXELFORMATDESCRIPTOR )) - return 0; - - pfi = stw_pixelformat_get_info( index ); - - memcpy(ppfd, &pfi->pfd, sizeof( PIXELFORMATDESCRIPTOR )); - - return count; -} - -BOOL APIENTRY -DrvDescribeLayerPlane( - HDC hdc, - INT iPixelFormat, - INT iLayerPlane, - UINT nBytes, - LPLAYERPLANEDESCRIPTOR plpd ) -{ - assert(0); - return FALSE; -} - -int APIENTRY -DrvGetLayerPaletteEntries( - HDC hdc, - INT iLayerPlane, - INT iStart, - INT cEntries, - COLORREF *pcr ) -{ - assert(0); - return 0; -} - -int APIENTRY -DrvSetLayerPaletteEntries( - HDC hdc, - INT iLayerPlane, - INT iStart, - INT cEntries, - CONST COLORREF *pcr ) -{ - assert(0); - return 0; -} - -BOOL APIENTRY -DrvRealizeLayerPalette( - HDC hdc, - INT iLayerPlane, - BOOL bRealize ) -{ - assert(0); - return FALSE; -} - -/* Only used by the wgl code, but have it here to avoid exporting the - * pixelformat.h functionality. - */ -int stw_pixelformat_choose( HDC hdc, - CONST PIXELFORMATDESCRIPTOR *ppfd ) -{ - uint count; - uint index; - uint bestindex; - uint bestdelta; - - (void) hdc; - - count = stw_pixelformat_get_count(); - bestindex = count; - bestdelta = ~0U; - - for (index = 0; index < count; index++) { - uint delta = 0; - const struct stw_pixelformat_info *pfi = stw_pixelformat_get_info( index ); - - if (!(ppfd->dwFlags & PFD_DOUBLEBUFFER_DONTCARE) && - !!(ppfd->dwFlags & PFD_DOUBLEBUFFER) != - !!(pfi->pfd.dwFlags & PFD_DOUBLEBUFFER)) - continue; - - /* FIXME: Take in account individual channel bits */ - if (ppfd->cColorBits != pfi->pfd.cColorBits) - delta += 8; - - if (ppfd->cDepthBits != pfi->pfd.cDepthBits) - delta += 4; - - if (ppfd->cStencilBits != pfi->pfd.cStencilBits) - delta += 2; - - if (ppfd->cAlphaBits != pfi->pfd.cAlphaBits) - delta++; - - if (delta < bestdelta) { - bestindex = index; - bestdelta = delta; - if (bestdelta == 0) - break; - } - } - - if (bestindex == count) - return 0; - - return bestindex + 1; -} diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_pixelformat.h b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_pixelformat.h deleted file mode 100644 index 2c1e1198593..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_pixelformat.h +++ /dev/null @@ -1,67 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef STW_PIXELFORMAT_H -#define STW_PIXELFORMAT_H - -//#include - -#ifndef PFD_SUPPORT_COMPOSITION -#define PFD_SUPPORT_COMPOSITION 0x00008000 -#endif - -#include "pipe/p_compiler.h" -#include "pipe/p_format.h" -#include "state_tracker/st_api.h" - -struct stw_pixelformat_info -{ - PIXELFORMATDESCRIPTOR pfd; - - struct st_visual stvis; -}; - -void -stw_pixelformat_init( void ); - -uint -stw_pixelformat_get_count( void ); - -uint -stw_pixelformat_get_extended_count( void ); - -const struct stw_pixelformat_info * -stw_pixelformat_get_info( uint index ); - -int -stw_pixelformat_choose( HDC hdc, - CONST PIXELFORMATDESCRIPTOR *ppfd ); - -int -stw_pixelformat_get(HDC hdc); - -#endif /* STW_PIXELFORMAT_H */ diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_st.c b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_st.c deleted file mode 100644 index 28c93f4fb57..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_st.c +++ /dev/null @@ -1,261 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Chia-I Wu - */ - -#include "util/u_memory.h" -#include "util/u_inlines.h" -#include "util/u_atomic.h" -#include "state_tracker/st_gl_api.h" /* for st_gl_api_create */ - -#include "stw_st.h" -#include "stw_device.h" -#include "stw_framebuffer.h" -#include "stw_pixelformat.h" - -struct stw_st_framebuffer { - struct st_framebuffer_iface base; - - struct stw_framebuffer *fb; - struct st_visual stvis; - - struct pipe_resource *textures[ST_ATTACHMENT_COUNT]; - unsigned texture_width, texture_height; - unsigned texture_mask; -}; - -static INLINE struct stw_st_framebuffer * -stw_st_framebuffer(struct st_framebuffer_iface *stfb) -{ - return (struct stw_st_framebuffer *) stfb; -} - -/** - * Remove outdated textures and create the requested ones. - */ -static void -stw_st_framebuffer_validate_locked(struct st_framebuffer_iface *stfb, - unsigned width, unsigned height, - unsigned mask) -{ - struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb); - struct pipe_resource templ; - unsigned i; - - /* remove outdated textures */ - if (stwfb->texture_width != width || stwfb->texture_height != height) { - for (i = 0; i < ST_ATTACHMENT_COUNT; i++) - pipe_resource_reference(&stwfb->textures[i], NULL); - } - - memset(&templ, 0, sizeof(templ)); - templ.target = PIPE_TEXTURE_2D; - templ.width0 = width; - templ.height0 = height; - templ.depth0 = 1; - templ.array_size = 1; - templ.last_level = 0; - - for (i = 0; i < ST_ATTACHMENT_COUNT; i++) { - enum pipe_format format; - unsigned bind; - - /* the texture already exists or not requested */ - if (stwfb->textures[i] || !(mask & (1 << i))) { - /* remember the texture */ - if (stwfb->textures[i]) - mask |= (1 << i); - continue; - } - - switch (i) { - case ST_ATTACHMENT_FRONT_LEFT: - case ST_ATTACHMENT_BACK_LEFT: - format = stwfb->stvis.color_format; - bind = PIPE_BIND_DISPLAY_TARGET | - PIPE_BIND_RENDER_TARGET; - break; - case ST_ATTACHMENT_DEPTH_STENCIL: - format = stwfb->stvis.depth_stencil_format; - bind = PIPE_BIND_DEPTH_STENCIL; - break; - default: - format = PIPE_FORMAT_NONE; - break; - } - - if (format != PIPE_FORMAT_NONE) { - templ.format = format; - templ.bind = bind; - - stwfb->textures[i] = - stw_dev->screen->resource_create(stw_dev->screen, &templ); - } - } - - stwfb->texture_width = width; - stwfb->texture_height = height; - stwfb->texture_mask = mask; -} - -static boolean -stw_st_framebuffer_validate(struct st_framebuffer_iface *stfb, - const enum st_attachment_type *statts, - unsigned count, - struct pipe_resource **out) -{ - struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb); - unsigned statt_mask, i; - - statt_mask = 0x0; - for (i = 0; i < count; i++) - statt_mask |= 1 << statts[i]; - - pipe_mutex_lock(stwfb->fb->mutex); - - if (stwfb->fb->must_resize || (statt_mask & ~stwfb->texture_mask)) { - stw_st_framebuffer_validate_locked(&stwfb->base, - stwfb->fb->width, stwfb->fb->height, statt_mask); - stwfb->fb->must_resize = FALSE; - } - - for (i = 0; i < count; i++) { - out[i] = NULL; - pipe_resource_reference(&out[i], stwfb->textures[statts[i]]); - } - - stw_framebuffer_release(stwfb->fb); - - return TRUE; -} - -/** - * Present an attachment of the framebuffer. - */ -static boolean -stw_st_framebuffer_present_locked(HDC hdc, - struct st_framebuffer_iface *stfb, - enum st_attachment_type statt) -{ - struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb); - struct pipe_resource *resource; - - resource = stwfb->textures[statt]; - if (resource) { - stw_framebuffer_present_locked(hdc, stwfb->fb, resource); - } - - return TRUE; -} - -static boolean -stw_st_framebuffer_flush_front(struct st_framebuffer_iface *stfb, - enum st_attachment_type statt) -{ - struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb); - - pipe_mutex_lock(stwfb->fb->mutex); - - return stw_st_framebuffer_present_locked(stwfb->fb->hDC, &stwfb->base, statt); -} - -/** - * Create a framebuffer interface. - */ -struct st_framebuffer_iface * -stw_st_create_framebuffer(struct stw_framebuffer *fb) -{ - struct stw_st_framebuffer *stwfb; - - stwfb = CALLOC_STRUCT(stw_st_framebuffer); - if (!stwfb) - return NULL; - - stwfb->fb = fb; - stwfb->stvis = fb->pfi->stvis; - - stwfb->base.visual = &stwfb->stvis; - p_atomic_set(&stwfb->base.stamp, 1); - stwfb->base.flush_front = stw_st_framebuffer_flush_front; - stwfb->base.validate = stw_st_framebuffer_validate; - - return &stwfb->base; -} - -/** - * Destroy a framebuffer interface. - */ -void -stw_st_destroy_framebuffer_locked(struct st_framebuffer_iface *stfb) -{ - struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb); - int i; - - for (i = 0; i < ST_ATTACHMENT_COUNT; i++) - pipe_resource_reference(&stwfb->textures[i], NULL); - - FREE(stwfb); -} - -/** - * Swap the buffers of the given framebuffer. - */ -boolean -stw_st_swap_framebuffer_locked(HDC hdc, struct st_framebuffer_iface *stfb) -{ - struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb); - unsigned front = ST_ATTACHMENT_FRONT_LEFT, back = ST_ATTACHMENT_BACK_LEFT; - struct pipe_resource *ptex; - unsigned mask; - - /* swap the textures */ - ptex = stwfb->textures[front]; - stwfb->textures[front] = stwfb->textures[back]; - stwfb->textures[back] = ptex; - - /* convert to mask */ - front = 1 << front; - back = 1 << back; - - /* swap the bits in mask */ - mask = stwfb->texture_mask & ~(front | back); - if (stwfb->texture_mask & front) - mask |= back; - if (stwfb->texture_mask & back) - mask |= front; - stwfb->texture_mask = mask; - - front = ST_ATTACHMENT_FRONT_LEFT; - return stw_st_framebuffer_present_locked(hdc, &stwfb->base, front); -} - -/** - * Create an st_api of the state tracker. - */ -struct st_api * -stw_st_create_api(void) -{ - return st_gl_api_create(); -} diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_st.h b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_st.h deleted file mode 100644 index 857f56faec6..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_st.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Chia-I Wu - */ - -#ifndef STW_ST_H -#define STW_ST_H - -//#include -#include - -#include "state_tracker/st_api.h" - -struct stw_framebuffer; - -struct st_api * -stw_st_create_api(void); - -struct st_framebuffer_iface * -stw_st_create_framebuffer(struct stw_framebuffer *fb); - -void -stw_st_destroy_framebuffer_locked(struct st_framebuffer_iface *stfb); - -boolean -stw_st_swap_framebuffer_locked(HDC hdc, struct st_framebuffer_iface *stfb); - -#endif /* STW_ST_H */ diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_tls.c b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_tls.c deleted file mode 100644 index e0da1f4d626..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_tls.c +++ /dev/null @@ -1,139 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -//#include - -#include "pipe/p_compiler.h" -#include "util/u_memory.h" -#include "stw_tls.h" - -static DWORD tlsIndex = TLS_OUT_OF_INDEXES; - -boolean -stw_tls_init(void) -{ - tlsIndex = TlsAlloc(); - if (tlsIndex == TLS_OUT_OF_INDEXES) { - return FALSE; - } - - return TRUE; -} - -static INLINE struct stw_tls_data * -stw_tls_data_create() -{ - struct stw_tls_data *data; - - data = CALLOC_STRUCT(stw_tls_data); - if (!data) - goto no_data; - - data->hCallWndProcHook = SetWindowsHookEx(WH_CALLWNDPROC, - stw_call_window_proc, - NULL, - GetCurrentThreadId()); - if(data->hCallWndProcHook == NULL) - goto no_hook; - - TlsSetValue(tlsIndex, data); - - return data; - -no_hook: - FREE(data); -no_data: - return NULL; -} - -boolean -stw_tls_init_thread(void) -{ - struct stw_tls_data *data; - - if (tlsIndex == TLS_OUT_OF_INDEXES) { - return FALSE; - } - - data = stw_tls_data_create(); - if(!data) - return FALSE; - - return TRUE; -} - -void -stw_tls_cleanup_thread(void) -{ - struct stw_tls_data *data; - - if (tlsIndex == TLS_OUT_OF_INDEXES) { - return; - } - - data = (struct stw_tls_data *) TlsGetValue(tlsIndex); - if(data) { - TlsSetValue(tlsIndex, NULL); - - if(data->hCallWndProcHook) { - UnhookWindowsHookEx(data->hCallWndProcHook); - data->hCallWndProcHook = NULL; - } - - FREE(data); - } -} - -void -stw_tls_cleanup(void) -{ - if (tlsIndex != TLS_OUT_OF_INDEXES) { - TlsFree(tlsIndex); - tlsIndex = TLS_OUT_OF_INDEXES; - } -} - -struct stw_tls_data * -stw_tls_get_data(void) -{ - struct stw_tls_data *data; - - if (tlsIndex == TLS_OUT_OF_INDEXES) { - return NULL; - } - - data = (struct stw_tls_data *) TlsGetValue(tlsIndex); - if(!data) { - /* DllMain is called with DLL_THREAD_ATTACH only by threads created after - * the DLL is loaded by the process */ - data = stw_tls_data_create(); - if(!data) - return NULL; - } - - return data; -} diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_tls.h b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_tls.h deleted file mode 100644 index 786d044012a..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_tls.h +++ /dev/null @@ -1,62 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef STW_TLS_H -#define STW_TLS_H - -//#include -#include -#include -#include - -struct stw_tls_data -{ - HHOOK hCallWndProcHook; -}; - -boolean -stw_tls_init(void); - -boolean -stw_tls_init_thread(void); - -void -stw_tls_cleanup_thread(void); - -void -stw_tls_cleanup(void); - -struct stw_tls_data * -stw_tls_get_data(void); - -LRESULT CALLBACK -stw_call_window_proc( - int nCode, - WPARAM wParam, - LPARAM lParam ); - -#endif /* STW_TLS_H */ diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_wgl.c b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_wgl.c deleted file mode 100644 index 5c6d995114e..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_wgl.c +++ /dev/null @@ -1,323 +0,0 @@ -/************************************************************************** - * - * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -//#include - -#include "util/u_debug.h" -#include "stw_icd.h" -#include "stw_context.h" -#include "stw_pixelformat.h" -#include "stw_wgl.h" - - -WINGDIAPI BOOL APIENTRY -wglCopyContext( - HGLRC hglrcSrc, - HGLRC hglrcDst, - UINT mask ) -{ - return DrvCopyContext( (DHGLRC)(UINT_PTR)hglrcSrc, - (DHGLRC)(UINT_PTR)hglrcDst, - mask ); -} - -WINGDIAPI HGLRC APIENTRY -wglCreateContext( - HDC hdc ) -{ - return (HGLRC) DrvCreateContext(hdc); -} - -WINGDIAPI HGLRC APIENTRY -wglCreateLayerContext( - HDC hdc, - int iLayerPlane ) -{ - return (HGLRC) DrvCreateLayerContext( hdc, iLayerPlane ); -} - -WINGDIAPI BOOL APIENTRY -wglDeleteContext( - HGLRC hglrc ) -{ - return DrvDeleteContext((DHGLRC)(UINT_PTR)hglrc ); -} - - -WINGDIAPI HGLRC APIENTRY -wglGetCurrentContext( VOID ) -{ - return (HGLRC)(UINT_PTR)stw_get_current_context(); -} - -WINGDIAPI HDC APIENTRY -wglGetCurrentDC( VOID ) -{ - return stw_get_current_dc(); -} - -WINGDIAPI BOOL APIENTRY -wglMakeCurrent( - HDC hdc, - HGLRC hglrc ) -{ - return DrvSetContext( hdc, (DHGLRC)(UINT_PTR)hglrc, NULL ) ? TRUE : FALSE; -} - - -WINGDIAPI BOOL APIENTRY -wglSwapBuffers( - HDC hdc ) -{ - return DrvSwapBuffers( hdc ); -} - - -WINGDIAPI DWORD WINAPI -wglSwapMultipleBuffers(UINT n, - CONST WGLSWAP *ps) -{ - UINT i; - - for (i =0; i < n; ++i) - wglSwapBuffers(ps->hdc); - - return 0; -} - - -WINGDIAPI BOOL APIENTRY -wglSwapLayerBuffers( - HDC hdc, - UINT fuPlanes ) -{ - return DrvSwapLayerBuffers( hdc, fuPlanes ); -} - -WINGDIAPI PROC APIENTRY -wglGetProcAddress( - LPCSTR lpszProc ) -{ - return DrvGetProcAddress( lpszProc ); -} - - -WINGDIAPI int APIENTRY -wglChoosePixelFormat( - HDC hdc, - CONST PIXELFORMATDESCRIPTOR *ppfd ) -{ - if (ppfd->nSize != sizeof( PIXELFORMATDESCRIPTOR ) || ppfd->nVersion != 1) - return 0; - if (ppfd->iPixelType != PFD_TYPE_RGBA) - return 0; - if (!(ppfd->dwFlags & PFD_DRAW_TO_WINDOW)) - return 0; - if (!(ppfd->dwFlags & PFD_SUPPORT_OPENGL)) - return 0; - if (ppfd->dwFlags & PFD_DRAW_TO_BITMAP) - return 0; - if (ppfd->dwFlags & PFD_SUPPORT_GDI) - return 0; - if (!(ppfd->dwFlags & PFD_STEREO_DONTCARE) && (ppfd->dwFlags & PFD_STEREO)) - return 0; - - return stw_pixelformat_choose( hdc, ppfd ); -} - -WINGDIAPI int APIENTRY -wglDescribePixelFormat( - HDC hdc, - int iPixelFormat, - UINT nBytes, - LPPIXELFORMATDESCRIPTOR ppfd ) -{ - return DrvDescribePixelFormat( hdc, iPixelFormat, nBytes, ppfd ); -} - -WINGDIAPI int APIENTRY -wglGetPixelFormat( - HDC hdc ) -{ - return stw_pixelformat_get( hdc ); -} - -WINGDIAPI BOOL APIENTRY -wglSetPixelFormat( - HDC hdc, - int iPixelFormat, - const PIXELFORMATDESCRIPTOR *ppfd ) -{ - /* SetPixelFormat (hence wglSetPixelFormat) must not touch ppfd, per - * http://msdn.microsoft.com/en-us/library/dd369049(v=vs.85).aspx - */ - (void) ppfd; - - return DrvSetPixelFormat( hdc, iPixelFormat ); -} - - -WINGDIAPI BOOL APIENTRY -wglUseFontBitmapsA( - HDC hdc, - DWORD first, - DWORD count, - DWORD listBase ) -{ - (void) hdc; - (void) first; - (void) count; - (void) listBase; - - assert( 0 ); - - return FALSE; -} - -WINGDIAPI BOOL APIENTRY -wglShareLists( - HGLRC hglrc1, - HGLRC hglrc2 ) -{ - return DrvShareLists((DHGLRC)(UINT_PTR)hglrc1, - (DHGLRC)(UINT_PTR)hglrc2); -} - -WINGDIAPI BOOL APIENTRY -wglUseFontBitmapsW( - HDC hdc, - DWORD first, - DWORD count, - DWORD listBase ) -{ - (void) hdc; - (void) first; - (void) count; - (void) listBase; - - assert( 0 ); - - return FALSE; -} - -WINGDIAPI BOOL APIENTRY -wglUseFontOutlinesA( - HDC hdc, - DWORD first, - DWORD count, - DWORD listBase, - FLOAT deviation, - FLOAT extrusion, - int format, - LPGLYPHMETRICSFLOAT lpgmf ) -{ - (void) hdc; - (void) first; - (void) count; - (void) listBase; - (void) deviation; - (void) extrusion; - (void) format; - (void) lpgmf; - - assert( 0 ); - - return FALSE; -} - -WINGDIAPI BOOL APIENTRY -wglUseFontOutlinesW( - HDC hdc, - DWORD first, - DWORD count, - DWORD listBase, - FLOAT deviation, - FLOAT extrusion, - int format, - LPGLYPHMETRICSFLOAT lpgmf ) -{ - (void) hdc; - (void) first; - (void) count; - (void) listBase; - (void) deviation; - (void) extrusion; - (void) format; - (void) lpgmf; - - assert( 0 ); - - return FALSE; -} - -WINGDIAPI BOOL APIENTRY -wglDescribeLayerPlane( - HDC hdc, - int iPixelFormat, - int iLayerPlane, - UINT nBytes, - LPLAYERPLANEDESCRIPTOR plpd ) -{ - return DrvDescribeLayerPlane(hdc, iPixelFormat, iLayerPlane, nBytes, plpd); -} - -WINGDIAPI int APIENTRY -wglSetLayerPaletteEntries( - HDC hdc, - int iLayerPlane, - int iStart, - int cEntries, - CONST COLORREF *pcr ) -{ - return DrvSetLayerPaletteEntries(hdc, iLayerPlane, iStart, cEntries, pcr); -} - -WINGDIAPI int APIENTRY -wglGetLayerPaletteEntries( - HDC hdc, - int iLayerPlane, - int iStart, - int cEntries, - COLORREF *pcr ) -{ - return DrvGetLayerPaletteEntries(hdc, iLayerPlane, iStart, cEntries, pcr); -} - -WINGDIAPI BOOL APIENTRY -wglRealizeLayerPalette( - HDC hdc, - int iLayerPlane, - BOOL bRealize ) -{ - (void) hdc; - (void) iLayerPlane; - (void) bRealize; - - assert( 0 ); - - return FALSE; -} diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_wgl.h b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_wgl.h deleted file mode 100644 index 5b7e021f512..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_wgl.h +++ /dev/null @@ -1,79 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef STW_WGL_H_ -#define STW_WGL_H_ - - -//#include - -#include - - -/* - * Undeclared APIs exported by opengl32.dll - */ - -WINGDIAPI BOOL WINAPI -wglSwapBuffers(HDC hdc); - -WINGDIAPI int WINAPI -wglChoosePixelFormat(HDC hdc, - CONST PIXELFORMATDESCRIPTOR *ppfd); - -WINGDIAPI int WINAPI -wglDescribePixelFormat(HDC hdc, - int iPixelFormat, - UINT nBytes, - LPPIXELFORMATDESCRIPTOR ppfd); - -WINGDIAPI int WINAPI -wglGetPixelFormat(HDC hdc); - -WINGDIAPI BOOL WINAPI -wglSetPixelFormat(HDC hdc, - int iPixelFormat, - CONST PIXELFORMATDESCRIPTOR *ppfd); - -#ifndef WGL_SWAPMULTIPLE_MAX - -typedef struct _WGLSWAP -{ - HDC hdc; - UINT uiFlags; -} WGLSWAP; - -#define WGL_SWAPMULTIPLE_MAX 16 - -WINGDIAPI DWORD WINAPI -wglSwapMultipleBuffers(UINT n, - CONST WGLSWAP *ps); - -#endif /* !WGL_SWAPMULTIPLE_MAX */ - - -#endif /* STW_WGL_H_ */ diff --git a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_winsys.h b/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_winsys.h deleted file mode 100644 index ebcf01c3d6f..00000000000 --- a/dll/opengl/mesa/src/gallium/state_trackers/wgl/stw_winsys.h +++ /dev/null @@ -1,107 +0,0 @@ -/************************************************************************** - * - * Copyright 2008-2009 Vmware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - -#ifndef STW_WINSYS_H -#define STW_WINSYS_H - -//#include /* for HDC */ - -#include "pipe/p_compiler.h" - -struct pipe_screen; -struct pipe_context; -struct pipe_resource; - -struct stw_shared_surface; - -struct stw_winsys -{ - struct pipe_screen * - (*create_screen)( void ); - - /* XXX is it actually possible to have non-zero level/layer ??? */ - /** - * Present the color buffer to the window associated with the device context. - */ - void - (*present)( struct pipe_screen *screen, - struct pipe_resource *res, - HDC hDC ); - - /** - * Locally unique identifier (LUID) of the graphics adapter. - * - * @sa GLCBPRESENTBUFFERSDATA::AdapterLuid; - */ - boolean - (*get_adapter_luid)( struct pipe_screen *screen, - LUID *pAdapterLuid ); - - /** - * Open a shared surface (optional). - * - * @sa GLCBPRESENTBUFFERSDATA::hSharedSurface; - */ - struct stw_shared_surface * - (*shared_surface_open)(struct pipe_screen *screen, - HANDLE hSharedSurface); - - /** - * Close a shared surface (optional). - */ - void - (*shared_surface_close)(struct pipe_screen *screen, - struct stw_shared_surface *surface); - - /** - * Compose into a shared (optional). - * - * Blit the color buffer into a shared surface. - * - * @sa GLPRESENTBUFFERSDATA::PresentHistoryToken. - */ - void - (*compose)( struct pipe_screen *screen, - struct pipe_resource *res, - struct stw_shared_surface *dest, - LPCRECT pRect, - ULONGLONG PresentHistoryToken ); -}; - -boolean -stw_init(const struct stw_winsys *stw_winsys); - -boolean -stw_init_thread(void); - -void -stw_cleanup_thread(void); - -void -stw_cleanup(void); - -#endif /* STW_WINSYS_H */ diff --git a/dll/opengl/mesa/src/gallium/targets/libgl-gdi/CMakeLists.txt b/dll/opengl/mesa/src/gallium/targets/libgl-gdi/CMakeLists.txt deleted file mode 100644 index e4cabe040e5..00000000000 --- a/dll/opengl/mesa/src/gallium/targets/libgl-gdi/CMakeLists.txt +++ /dev/null @@ -1,41 +0,0 @@ - -set_cpp(WITH_STL) - -include_directories( - ../../state_trackers/wgl - ../../winsys/sw) - -add_definitions(-DWIN32_LEAN_AND_MEAN) - -list(APPEND SOURCE - libgl_gdi.c) - -# We don't need a specfile here, as opengl application link against opengl32 -# and gallium is kind enough to provide good def files for both MSVC/mingw-w64 and mingw32 -if(MSVC OR (ARCH STREQUAL "amd64")) - list(APPEND SOURCE ../../state_trackers/wgl/opengl32.def) -else() - list(APPEND SOURCE ../../state_trackers/wgl/opengl32.mingw.def) -endif() - -add_library(mesa32 SHARED ${SOURCE}) - -target_link_libraries(mesa32 - gallium_wgl - gallium_ws_gdi - mesa_glapi - mesa_core - gallium_softpipe - gallium_core - mesa_glsl) - -set_module_type(mesa32 win32dll) - -add_importlibs(mesa32 gdi32 user32 msvcrt ws2_32 kernel32 ntdll) - -if(MSVC) - target_link_libraries(mesa32 oldnames) -endif() - -add_dependencies(mesa32 psdk) -add_cd_file(TARGET mesa32 DESTINATION reactos/system32 FOR all) diff --git a/dll/opengl/mesa/src/gallium/targets/libgl-gdi/SConscript b/dll/opengl/mesa/src/gallium/targets/libgl-gdi/SConscript deleted file mode 100644 index f8393dac299..00000000000 --- a/dll/opengl/mesa/src/gallium/targets/libgl-gdi/SConscript +++ /dev/null @@ -1,54 +0,0 @@ -####################################################################### -# SConscript for gdi winsys - -Import('*') - -env = env.Clone() - -env.Append(CPPPATH = [ - '#src/gallium/state_trackers/wgl', - '#src/gallium/winsys/sw', -]) - -env.Append(LIBS = [ - 'gdi32', - 'user32', - 'kernel32', - 'ws2_32', -]) - -sources = ['libgl_gdi.c'] -drivers = [] - -if True: - drivers += [softpipe] - -if env['llvm']: - env.Append(CPPDEFINES = 'HAVE_LLVMPIPE') - drivers += [llvmpipe] - -if env['gcc'] and env['machine'] != 'x86_64': - # DEF parser in certain versions of MinGW is busted, as does not behave as - # MSVC. mingw-w64 works fine. - sources += ['#src/gallium/state_trackers/wgl/opengl32.mingw.def'] -else: - sources += ['#src/gallium/state_trackers/wgl/opengl32.def'] - -drivers += [trace, rbug] - -env['no_import_lib'] = 1 - -# when GLES is enabled, gl* and _glapi_* belong to bridge_glapi and -# shared_glapi respectively -if env['gles']: - env.Prepend(LIBPATH = [shared_glapi.dir]) - glapi = [bridge_glapi, 'libglapi'] - -opengl32 = env.SharedLibrary( - target ='opengl32', - source = sources, - LIBS = wgl + ws_gdi + glapi + mesa + drivers + gallium + glsl + env['LIBS'], -) - -env.Alias('opengl32', opengl32) -env.Alias('libgl-gdi', opengl32) diff --git a/dll/opengl/mesa/src/gallium/targets/libgl-gdi/libgl_gdi.c b/dll/opengl/mesa/src/gallium/targets/libgl-gdi/libgl_gdi.c deleted file mode 100644 index 112904ab5fe..00000000000 --- a/dll/opengl/mesa/src/gallium/targets/libgl-gdi/libgl_gdi.c +++ /dev/null @@ -1,167 +0,0 @@ -/************************************************************************** - * - * Copyright 2009-2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * - **************************************************************************/ - -/** - * @file - * Softpipe/LLVMpipe support. - * - * @author Jose Fonseca - */ - - -#include - -#include "util/u_debug.h" -#include "stw_winsys.h" -#include "gdi/gdi_sw_winsys.h" - -#include "softpipe/sp_texture.h" -#include "softpipe/sp_screen.h" -#include "softpipe/sp_public.h" - -#ifdef HAVE_LLVMPIPE -#include "llvmpipe/lp_texture.h" -#include "llvmpipe/lp_screen.h" -#include "llvmpipe/lp_public.h" -#endif - - -static boolean use_llvmpipe = FALSE; - - -static struct pipe_screen * -gdi_screen_create(void) -{ - const char *default_driver; - const char *driver; - struct pipe_screen *screen = NULL; - struct sw_winsys *winsys; - - winsys = gdi_create_sw_winsys(); - if(!winsys) - goto no_winsys; - -#ifdef HAVE_LLVMPIPE - default_driver = "llvmpipe"; -#else - default_driver = "softpipe"; -#endif - - driver = debug_get_option("GALLIUM_DRIVER", default_driver); - -#ifdef HAVE_LLVMPIPE - if (strcmp(driver, "llvmpipe") == 0) { - screen = llvmpipe_create_screen( winsys ); - } -#endif - - if (screen == NULL) { - screen = softpipe_create_screen( winsys ); - } else { - use_llvmpipe = TRUE; - } - - if(!screen) - goto no_screen; - - return screen; - -no_screen: - winsys->destroy(winsys); -no_winsys: - return NULL; -} - - -static void -gdi_present(struct pipe_screen *screen, - struct pipe_resource *res, - HDC hDC) -{ - /* This will fail if any interposing layer (trace, debug, etc) has - * been introduced between the state-trackers and the pipe driver. - * - * Ideally this would get replaced with a call to - * pipe_screen::flush_frontbuffer(). - * - * Failing that, it may be necessary for intervening layers to wrap - * other structs such as this stw_winsys as well... - */ - - struct sw_winsys *winsys = NULL; - struct sw_displaytarget *dt = NULL; - -#ifdef HAVE_LLVMPIPE - if (use_llvmpipe) { - winsys = llvmpipe_screen(screen)->winsys; - dt = llvmpipe_resource(res)->dt; - gdi_sw_display(winsys, dt, hDC); - return; - } -#endif - - winsys = softpipe_screen(screen)->winsys, - dt = softpipe_resource(res)->dt, - gdi_sw_display(winsys, dt, hDC); -} - - -static const struct stw_winsys stw_winsys = { - &gdi_screen_create, - &gdi_present, - NULL, /* get_adapter_luid */ - NULL, /* shared_surface_open */ - NULL, /* shared_surface_close */ - NULL /* compose */ -}; - - -BOOL WINAPI -DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) -{ - switch (fdwReason) { - case DLL_PROCESS_ATTACH: - stw_init(&stw_winsys); - stw_init_thread(); - break; - - case DLL_THREAD_ATTACH: - stw_init_thread(); - break; - - case DLL_THREAD_DETACH: - stw_cleanup_thread(); - break; - - case DLL_PROCESS_DETACH: - stw_cleanup_thread(); - stw_cleanup(); - break; - } - return TRUE; -} diff --git a/dll/opengl/mesa/src/gallium/winsys/SConscript b/dll/opengl/mesa/src/gallium/winsys/SConscript deleted file mode 100644 index f3a2453e834..00000000000 --- a/dll/opengl/mesa/src/gallium/winsys/SConscript +++ /dev/null @@ -1,35 +0,0 @@ -Import('*') - - -SConscript([ - 'sw/wrapper/SConscript', -]) - -SConscript([ - 'sw/xlib/SConscript', -]) - -SConscript([ - 'sw/gdi/SConscript', -]) - -SConscript([ - 'i915/sw/SConscript', -]) - -if env['dri']: - SConscript([ - 'sw/dri/SConscript', - ]) - - SConscript([ - 'svga/drm/SConscript', - ]) - - SConscript([ - 'i915/drm/SConscript', - ]) - - SConscript([ - 'radeon/drm/SConscript', - ]) diff --git a/dll/opengl/mesa/src/gallium/winsys/sw/gdi/CMakeLists.txt b/dll/opengl/mesa/src/gallium/winsys/sw/gdi/CMakeLists.txt deleted file mode 100644 index da7eb5f7dca..00000000000 --- a/dll/opengl/mesa/src/gallium/winsys/sw/gdi/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ - -add_definitions(-DWIN32_LEAN_AND_MEAN) - -add_library(gallium_ws_gdi STATIC EXCLUDE_FROM_ALL gdi_sw_winsys.c) diff --git a/dll/opengl/mesa/src/gallium/winsys/sw/gdi/SConscript b/dll/opengl/mesa/src/gallium/winsys/sw/gdi/SConscript deleted file mode 100644 index 1267fc6eea4..00000000000 --- a/dll/opengl/mesa/src/gallium/winsys/sw/gdi/SConscript +++ /dev/null @@ -1,23 +0,0 @@ -####################################################################### -# SConscript for xlib winsys - - -Import('*') - -if env['platform'] == 'windows': - - env = env.Clone() - - env.Append(CPPPATH = [ - '#/src/gallium/include', - '#/src/gallium/auxiliary', - '#/src/gallium/drivers', - ]) - - ws_gdi = env.ConvenienceLibrary( - target = 'ws_gdi', - source = [ - 'gdi_sw_winsys.c', - ] - ) - Export('ws_gdi') diff --git a/dll/opengl/mesa/src/gallium/winsys/sw/gdi/gdi_sw_winsys.c b/dll/opengl/mesa/src/gallium/winsys/sw/gdi/gdi_sw_winsys.c deleted file mode 100644 index 2e12f6e6cc8..00000000000 --- a/dll/opengl/mesa/src/gallium/winsys/sw/gdi/gdi_sw_winsys.c +++ /dev/null @@ -1,247 +0,0 @@ -/************************************************************************** - * - * Copyright 2009 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * - **************************************************************************/ - -/** - * @file - * GDI software rasterizer support. - * - * @author Jose Fonseca - */ - - -#include - -#include "pipe/p_format.h" -#include "pipe/p_context.h" -#include "util/u_inlines.h" -#include "util/u_format.h" -#include "util/u_math.h" -#include "util/u_memory.h" -#include "state_tracker/sw_winsys.h" -#include "gdi_sw_winsys.h" - - -struct gdi_sw_displaytarget -{ - enum pipe_format format; - unsigned width; - unsigned height; - unsigned stride; - - unsigned size; - - void *data; - - BITMAPINFO bmi; -}; - - -/** Cast wrapper */ -static INLINE struct gdi_sw_displaytarget * -gdi_sw_displaytarget( struct sw_displaytarget *buf ) -{ - return (struct gdi_sw_displaytarget *)buf; -} - - -static boolean -gdi_sw_is_displaytarget_format_supported( struct sw_winsys *ws, - unsigned tex_usage, - enum pipe_format format ) -{ - switch(format) { - case PIPE_FORMAT_B8G8R8X8_UNORM: - case PIPE_FORMAT_B8G8R8A8_UNORM: - return TRUE; - - /* TODO: Support other formats possible with BMPs, as described in - * http://msdn.microsoft.com/en-us/library/dd183376(VS.85).aspx */ - - default: - return FALSE; - } -} - - -static void * -gdi_sw_displaytarget_map(struct sw_winsys *ws, - struct sw_displaytarget *dt, - unsigned flags ) -{ - struct gdi_sw_displaytarget *gdt = gdi_sw_displaytarget(dt); - - return gdt->data; -} - - -static void -gdi_sw_displaytarget_unmap(struct sw_winsys *ws, - struct sw_displaytarget *dt ) -{ - -} - - -static void -gdi_sw_displaytarget_destroy(struct sw_winsys *winsys, - struct sw_displaytarget *dt) -{ - struct gdi_sw_displaytarget *gdt = gdi_sw_displaytarget(dt); - - align_free(gdt->data); - FREE(gdt); -} - - -static struct sw_displaytarget * -gdi_sw_displaytarget_create(struct sw_winsys *winsys, - unsigned tex_usage, - enum pipe_format format, - unsigned width, unsigned height, - unsigned alignment, - unsigned *stride) -{ - struct gdi_sw_displaytarget *gdt; - unsigned cpp; - unsigned bpp; - - gdt = CALLOC_STRUCT(gdi_sw_displaytarget); - if(!gdt) - goto no_gdt; - - gdt->format = format; - gdt->width = width; - gdt->height = height; - - bpp = util_format_get_blocksizebits(format); - cpp = util_format_get_blocksize(format); - - gdt->stride = align(width * cpp, alignment); - gdt->size = gdt->stride * height; - - gdt->data = align_malloc(gdt->size, alignment); - if(!gdt->data) - goto no_data; - - gdt->bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - gdt->bmi.bmiHeader.biWidth = gdt->stride / cpp; - gdt->bmi.bmiHeader.biHeight= -(long)height; - gdt->bmi.bmiHeader.biPlanes = 1; - gdt->bmi.bmiHeader.biBitCount = bpp; - gdt->bmi.bmiHeader.biCompression = BI_RGB; - gdt->bmi.bmiHeader.biSizeImage = 0; - gdt->bmi.bmiHeader.biXPelsPerMeter = 0; - gdt->bmi.bmiHeader.biYPelsPerMeter = 0; - gdt->bmi.bmiHeader.biClrUsed = 0; - gdt->bmi.bmiHeader.biClrImportant = 0; - - *stride = gdt->stride; - return (struct sw_displaytarget *)gdt; - -no_data: - FREE(gdt); -no_gdt: - return NULL; -} - - -static struct sw_displaytarget * -gdi_sw_displaytarget_from_handle(struct sw_winsys *winsys, - const struct pipe_resource *templet, - struct winsys_handle *whandle, - unsigned *stride) -{ - assert(0); - return NULL; -} - - -static boolean -gdi_sw_displaytarget_get_handle(struct sw_winsys *winsys, - struct sw_displaytarget *dt, - struct winsys_handle *whandle) -{ - assert(0); - return FALSE; -} - - -void -gdi_sw_display( struct sw_winsys *winsys, - struct sw_displaytarget *dt, - HDC hDC ) -{ - struct gdi_sw_displaytarget *gdt = gdi_sw_displaytarget(dt); - - StretchDIBits(hDC, - 0, 0, gdt->width, gdt->height, - 0, 0, gdt->width, gdt->height, - gdt->data, &gdt->bmi, 0, SRCCOPY); -} - -static void -gdi_sw_displaytarget_display(struct sw_winsys *winsys, - struct sw_displaytarget *dt, - void *context_private) -{ - /* nasty: - */ - HDC hDC = (HDC)context_private; - - gdi_sw_display(winsys, dt, hDC); -} - - -static void -gdi_sw_destroy(struct sw_winsys *winsys) -{ - FREE(winsys); -} - -struct sw_winsys * -gdi_create_sw_winsys(void) -{ - static struct sw_winsys *winsys; - - winsys = CALLOC_STRUCT(sw_winsys); - if(!winsys) - return NULL; - - winsys->destroy = gdi_sw_destroy; - winsys->is_displaytarget_format_supported = gdi_sw_is_displaytarget_format_supported; - winsys->displaytarget_create = gdi_sw_displaytarget_create; - winsys->displaytarget_from_handle = gdi_sw_displaytarget_from_handle; - winsys->displaytarget_get_handle = gdi_sw_displaytarget_get_handle; - winsys->displaytarget_map = gdi_sw_displaytarget_map; - winsys->displaytarget_unmap = gdi_sw_displaytarget_unmap; - winsys->displaytarget_display = gdi_sw_displaytarget_display; - winsys->displaytarget_destroy = gdi_sw_displaytarget_destroy; - - return winsys; -} - diff --git a/dll/opengl/mesa/src/gallium/winsys/sw/gdi/gdi_sw_winsys.h b/dll/opengl/mesa/src/gallium/winsys/sw/gdi/gdi_sw_winsys.h deleted file mode 100644 index 4bbcb47848b..00000000000 --- a/dll/opengl/mesa/src/gallium/winsys/sw/gdi/gdi_sw_winsys.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef GDI_SW_WINSYS_H -#define GDI_SW_WINSYS_H - -#include - -#include "pipe/p_compiler.h" -#include "state_tracker/sw_winsys.h" - -void gdi_sw_display( struct sw_winsys *winsys, - struct sw_displaytarget *dt, - HDC hDC ); - -struct sw_winsys * -gdi_create_sw_winsys(void); - -#endif diff --git a/dll/opengl/mesa/src/glsl/CMakeLists.txt b/dll/opengl/mesa/src/glsl/CMakeLists.txt deleted file mode 100644 index fde70ecf591..00000000000 --- a/dll/opengl/mesa/src/glsl/CMakeLists.txt +++ /dev/null @@ -1,88 +0,0 @@ - -set_cpp(WITH_STL) - -# From Sconscript -include_directories( - ../mapi - ../mesa - . - glcpp - ../../generated/glsl) - -list(APPEND SOURCE -# generated files - ../../generated/glsl/glcpp/glcpp-lex.c - ../../generated/glsl/glcpp/glcpp-parse.c - ../../generated/glsl/glsl_lexer.cpp - ../../generated/glsl/glsl_parser.cpp - ../../generated/glsl/builtin_function.cpp -# Regular files - strtod.c - ralloc.c - glcpp/pp.c - ast_expr.cpp - ast_function.cpp - ast_to_hir.cpp - ast_type.cpp - builtin_variables.cpp - glsl_parser_extras.cpp - glsl_types.cpp - glsl_symbol_table.cpp - hir_field_selection.cpp - ir_basic_block.cpp - ir_clone.cpp - ir_constant_expression.cpp - ir.cpp - ir_expression_flattening.cpp - ir_function_can_inline.cpp - ir_function_detect_recursion.cpp - ir_function.cpp - ir_hierarchical_visitor.cpp - ir_hv_accept.cpp - ir_import_prototypes.cpp - ir_print_visitor.cpp - ir_reader.cpp - ir_rvalue_visitor.cpp - ir_set_program_inouts.cpp - ir_validate.cpp - ir_variable_refcount.cpp - linker.cpp - link_functions.cpp - link_uniforms.cpp - loop_analysis.cpp - loop_controls.cpp - loop_unroll.cpp - lower_clip_distance.cpp - lower_discard.cpp - lower_if_to_cond_assign.cpp - lower_instructions.cpp - lower_jumps.cpp - lower_mat_op_to_vec.cpp - lower_noise.cpp - lower_texture_projection.cpp - lower_variable_index_to_cond_assign.cpp - lower_vec_index_to_cond_assign.cpp - lower_vec_index_to_swizzle.cpp - lower_vector.cpp - lower_output_reads.cpp - opt_algebraic.cpp - opt_constant_folding.cpp - opt_constant_propagation.cpp - opt_constant_variable.cpp - opt_copy_propagation.cpp - opt_copy_propagation_elements.cpp - opt_dead_code.cpp - opt_dead_code_local.cpp - opt_dead_functions.cpp - opt_discard_simplification.cpp - opt_function_inlining.cpp - opt_if_simplification.cpp - opt_noop_swizzle.cpp - opt_redundant_jumps.cpp - opt_structure_splitting.cpp - opt_swizzle_swizzle.cpp - opt_tree_grafting.cpp - s_expression.cpp) - -# this is just a helper library, don't include it in the all target -add_library(mesa_glsl STATIC EXCLUDE_FROM_ALL ${SOURCE}) diff --git a/dll/opengl/mesa/src/glsl/Makefile.sources b/dll/opengl/mesa/src/glsl/Makefile.sources deleted file mode 100644 index 5e80af297c0..00000000000 --- a/dll/opengl/mesa/src/glsl/Makefile.sources +++ /dev/null @@ -1,105 +0,0 @@ -# shared source lists for Makefile, SConscript, and Android.mk - -# libglcpp - -LIBGLCPP_SOURCES := \ - glcpp/pp.c - -LIBGLCPP_GENERATED_SOURCES := \ - glcpp/glcpp-lex.c \ - glcpp/glcpp-parse.c - -# libglsl - -LIBGLSL_SOURCES := \ - strtod.c \ - ralloc.c - -LIBGLSL_CXX_SOURCES := \ - ast_expr.cpp \ - ast_function.cpp \ - ast_to_hir.cpp \ - ast_type.cpp \ - builtin_variables.cpp \ - glsl_parser_extras.cpp \ - glsl_types.cpp \ - glsl_symbol_table.cpp \ - hir_field_selection.cpp \ - ir_basic_block.cpp \ - ir_clone.cpp \ - ir_constant_expression.cpp \ - ir.cpp \ - ir_expression_flattening.cpp \ - ir_function_can_inline.cpp \ - ir_function_detect_recursion.cpp \ - ir_function.cpp \ - ir_hierarchical_visitor.cpp \ - ir_hv_accept.cpp \ - ir_import_prototypes.cpp \ - ir_print_visitor.cpp \ - ir_reader.cpp \ - ir_rvalue_visitor.cpp \ - ir_set_program_inouts.cpp \ - ir_validate.cpp \ - ir_variable_refcount.cpp \ - linker.cpp \ - link_functions.cpp \ - link_uniforms.cpp \ - loop_analysis.cpp \ - loop_controls.cpp \ - loop_unroll.cpp \ - lower_clip_distance.cpp \ - lower_discard.cpp \ - lower_if_to_cond_assign.cpp \ - lower_instructions.cpp \ - lower_jumps.cpp \ - lower_mat_op_to_vec.cpp \ - lower_noise.cpp \ - lower_texture_projection.cpp \ - lower_variable_index_to_cond_assign.cpp \ - lower_vec_index_to_cond_assign.cpp \ - lower_vec_index_to_swizzle.cpp \ - lower_vector.cpp \ - lower_output_reads.cpp \ - opt_algebraic.cpp \ - opt_constant_folding.cpp \ - opt_constant_propagation.cpp \ - opt_constant_variable.cpp \ - opt_copy_propagation.cpp \ - opt_copy_propagation_elements.cpp \ - opt_dead_code.cpp \ - opt_dead_code_local.cpp \ - opt_dead_functions.cpp \ - opt_discard_simplification.cpp \ - opt_function_inlining.cpp \ - opt_if_simplification.cpp \ - opt_noop_swizzle.cpp \ - opt_redundant_jumps.cpp \ - opt_structure_splitting.cpp \ - opt_swizzle_swizzle.cpp \ - opt_tree_grafting.cpp \ - s_expression.cpp - -# glsl_compiler - -GLSL_COMPILER_CXX_SOURCES := \ - standalone_scaffolding.cpp \ - main.cpp - -# builtin_compiler -# -# This is built before libglsl to generate builtin_funciton.cpp for libglsl. -# For this to work, a dummy version of builtin_function.cpp, -# builtin_stubs.cpp, is used. - -BUILTIN_COMPILER_CXX_SOURCES := \ - builtin_stubs.cpp - -BUILTIN_COMPILER_GENERATED_CXX_SOURCES := \ - glsl_lexer.cpp \ - glsl_parser.cpp - -# libglsl generated sources -LIBGLSL_GENERATED_CXX_SOURCES := \ - $(BUILTIN_COMPILER_GENERATED_CXX_SOURCES) \ - builtin_function.cpp diff --git a/dll/opengl/mesa/src/glsl/README b/dll/opengl/mesa/src/glsl/README deleted file mode 100644 index dd80a53d476..00000000000 --- a/dll/opengl/mesa/src/glsl/README +++ /dev/null @@ -1,229 +0,0 @@ -Welcome to Mesa's GLSL compiler. A brief overview of how things flow: - -1) lex and yacc-based preprocessor takes the incoming shader string -and produces a new string containing the preprocessed shader. This -takes care of things like #if, #ifdef, #define, and preprocessor macro -invocations. Note that #version, #extension, and some others are -passed straight through. See glcpp/* - -2) lex and yacc-based parser takes the preprocessed string and -generates the AST (abstract syntax tree). Almost no checking is -performed in this stage. See glsl_lexer.lpp and glsl_parser.ypp. - -3) The AST is converted to "HIR". This is the intermediate -representation of the compiler. Constructors are generated, function -calls are resolved to particular function signatures, and all the -semantic checking is performed. See ast_*.cpp for the conversion, and -ir.h for the IR structures. - -4) The driver (Mesa, or main.cpp for the standalone binary) performs -optimizations. These include copy propagation, dead code elimination, -constant folding, and others. Generally the driver will call -optimizations in a loop, as each may open up opportunities for other -optimizations to do additional work. See most files called ir_*.cpp - -5) linking is performed. This does checking to ensure that the -outputs of the vertex shader match the inputs of the fragment shader, -and assigns locations to uniforms, attributes, and varyings. See -linker.cpp. - -6) The driver may perform additional optimization at this point, as -for example dead code elimination previously couldn't remove functions -or global variable usage when we didn't know what other code would be -linked in. - -7) The driver performs code generation out of the IR, taking a linked -shader program and producing a compiled program for each stage. See -ir_to_mesa.cpp for Mesa IR code generation. - -FAQ: - -Q: What is HIR versus IR versus LIR? - -A: The idea behind the naming was that ast_to_hir would produce a -high-level IR ("HIR"), with things like matrix operations, structure -assignments, etc., present. A series of lowering passes would occur -that do things like break matrix multiplication into a series of dot -products/MADs, make structure assignment be a series of assignment of -components, flatten if statements into conditional moves, and such, -producing a low level IR ("LIR"). - -However, it now appears that each driver will have different -requirements from a LIR. A 915-generation chipset wants all functions -inlined, all loops unrolled, all ifs flattened, no variable array -accesses, and matrix multiplication broken down. The Mesa IR backend -for swrast would like matrices and structure assignment broken down, -but it can support function calls and dynamic branching. A 965 vertex -shader IR backend could potentially even handle some matrix operations -without breaking them down, but the 965 fragment shader IR backend -would want to break to have (almost) all operations down channel-wise -and perform optimization on that. As a result, there's no single -low-level IR that will make everyone happy. So that usage has fallen -out of favor, and each driver will perform a series of lowering passes -to take the HIR down to whatever restrictions it wants to impose -before doing codegen. - -Q: How is the IR structured? - -A: The best way to get started seeing it would be to run the -standalone compiler against a shader: - -./glsl_compiler --dump-lir \ - ~/src/piglit/tests/shaders/glsl-orangebook-ch06-bump.frag - -So for example one of the ir_instructions in main() contains: - -(assign (constant bool (1)) (var_ref litColor) (expression vec3 * (var_ref Surf -aceColor) (var_ref __retval) ) ) - -Or more visually: - (assign) - / | \ - (var_ref) (expression *) (constant bool 1) - / / \ -(litColor) (var_ref) (var_ref) - / \ - (SurfaceColor) (__retval) - -which came from: - -litColor = SurfaceColor * max(dot(normDelta, LightDir), 0.0); - -(the max call is not represented in this expression tree, as it was a -function call that got inlined but not brought into this expression -tree) - -Each of those nodes is a subclass of ir_instruction. A particular -ir_instruction instance may only appear once in the whole IR tree with -the exception of ir_variables, which appear once as variable -declarations: - -(declare () vec3 normDelta) - -and multiple times as the targets of variable dereferences: -... -(assign (constant bool (1)) (var_ref __retval) (expression float dot - (var_ref normDelta) (var_ref LightDir) ) ) -... -(assign (constant bool (1)) (var_ref __retval) (expression vec3 - - (var_ref LightDir) (expression vec3 * (constant float (2.000000)) - (expression vec3 * (expression float dot (var_ref normDelta) (var_ref - LightDir) ) (var_ref normDelta) ) ) ) ) -... - -Each node has a type. Expressions may involve several different types: -(declare (uniform ) mat4 gl_ModelViewMatrix) -((assign (constant bool (1)) (var_ref constructor_tmp) (expression - vec4 * (var_ref gl_ModelViewMatrix) (var_ref gl_Vertex) ) ) - -An expression tree can be arbitrarily deep, and the compiler tries to -keep them structured like that so that things like algebraic -optimizations ((color * 1.0 == color) and ((mat1 * mat2) * vec == mat1 -* (mat2 * vec))) or recognizing operation patterns for code generation -(vec1 * vec2 + vec3 == mad(vec1, vec2, vec3)) are easier. This comes -at the expense of additional trickery in implementing some -optimizations like CSE where one must navigate an expression tree. - -Q: Why no SSA representation? - -A: Converting an IR tree to SSA form makes dead code elmimination, -common subexpression elimination, and many other optimizations much -easier. However, in our primarily vector-based language, there's some -major questions as to how it would work. Do we do SSA on the scalar -or vector level? If we do it at the vector level, we're going to end -up with many different versions of the variable when encountering code -like: - -(assign (constant bool (1)) (swiz x (var_ref __retval) ) (var_ref a) ) -(assign (constant bool (1)) (swiz y (var_ref __retval) ) (var_ref b) ) -(assign (constant bool (1)) (swiz z (var_ref __retval) ) (var_ref c) ) - -If every masked update of a component relies on the previous value of -the variable, then we're probably going to be quite limited in our -dead code elimination wins, and recognizing common expressions may -just not happen. On the other hand, if we operate channel-wise, then -we'll be prone to optimizing the operation on one of the channels at -the expense of making its instruction flow different from the other -channels, and a vector-based GPU would end up with worse code than if -we didn't optimize operations on that channel! - -Once again, it appears that our optimization requirements are driven -significantly by the target architecture. For now, targeting the Mesa -IR backend, SSA does not appear to be that important to producing -excellent code, but we do expect to do some SSA-based optimizations -for the 965 fragment shader backend when that is developed. - -Q: How should I expand instructions that take multiple backend instructions? - -Sometimes you'll have to do the expansion in your code generation -- -see, for example, ir_to_mesa.cpp's handling of ir_unop_sqrt. However, -in many cases you'll want to do a pass over the IR to convert -non-native instructions to a series of native instructions. For -example, for the Mesa backend we have ir_div_to_mul_rcp.cpp because -Mesa IR (and many hardware backends) only have a reciprocal -instruction, not a divide. Implementing non-native instructions this -way gives the chance for constant folding to occur, so (a / 2.0) -becomes (a * 0.5) after codegen instead of (a * (1.0 / 2.0)) - -Q: How shoud I handle my special hardware instructions with respect to IR? - -Our current theory is that if multiple targets have an instruction for -some operation, then we should probably be able to represent that in -the IR. Generally this is in the form of an ir_{bin,un}op expression -type. For example, we initially implemented fract() using (a - -floor(a)), but both 945 and 965 have instructions to give that result, -and it would also simplify the implementation of mod(), so -ir_unop_fract was added. The following areas need updating to add a -new expression type: - -ir.h (new enum) -ir.cpp:get_num_operands() (used for ir_reader) -ir.cpp:operator_strs (used for ir_reader) -ir_constant_expression.cpp (you probably want to be able to constant fold) -ir_validate.cpp (check users have the right types) - -You may also need to update the backends if they will see the new expr type: - -../mesa/shaders/ir_to_mesa.cpp - -You can then use the new expression from builtins (if all backends -would rather see it), or scan the IR and convert to use your new -expression type (see ir_mod_to_fract, for example). - -Q: How is memory management handled in the compiler? - -The hierarchical memory allocator "talloc" developed for the Samba -project is used, so that things like optimization passes don't have to -worry about their garbage collection so much. It has a few nice -features, including low performance overhead and good debugging -support that's trivially available. - -Generally, each stage of the compile creates a talloc context and -allocates its memory out of that or children of it. At the end of the -stage, the pieces still live are stolen to a new context and the old -one freed, or the whole context is kept for use by the next stage. - -For IR transformations, a temporary context is used, then at the end -of all transformations, reparent_ir reparents all live nodes under the -shader's IR list, and the old context full of dead nodes is freed. -When developing a single IR transformation pass, this means that you -want to allocate instruction nodes out of the temporary context, so if -it becomes dead it doesn't live on as the child of a live node. At -the moment, optimization passes aren't passed that temporary context, -so they find it by calling talloc_parent() on a nearby IR node. The -talloc_parent() call is expensive, so many passes will cache the -result of the first talloc_parent(). Cleaning up all the optimization -passes to take a context argument and not call talloc_parent() is left -as an exercise. - -Q: What is the file naming convention in this directory? - -Initially, there really wasn't one. We have since adopted one: - - - Files that implement code lowering passes should be named lower_* - (e.g., lower_noise.cpp). - - Files that implement optimization passes should be named opt_*. - - Files that implement a class that is used throught the code should - take the name of that class (e.g., ir_hierarchical_visitor.cpp). - - Files that contain code not fitting in one of the previous - categories should have a sensible name (e.g., glsl_parser.ypp). diff --git a/dll/opengl/mesa/src/glsl/SConscript b/dll/opengl/mesa/src/glsl/SConscript deleted file mode 100644 index b8154d6083c..00000000000 --- a/dll/opengl/mesa/src/glsl/SConscript +++ /dev/null @@ -1,131 +0,0 @@ -import common - -Import('*') - -from sys import executable as python_cmd - -env = env.Clone() - -env.Prepend(CPPPATH = [ - '#include', - '#src/mapi', - '#src/mesa', - '#src/glsl', - '#src/glsl/glcpp', -]) - -# Make glcpp/glcpp-parse.h and glsl_parser.h reacheable from the include path -env.Append(CPPPATH = [Dir('.').abspath]) - -env.Append(YACCFLAGS = '-d') - -parser_env = env.Clone() -parser_env.Append(YACCFLAGS = [ - '--defines=%s' % File('glsl_parser.h').abspath, - '-p', '_mesa_glsl_', -]) - -glcpp_lexer = env.CFile('glcpp/glcpp-lex.c', 'glcpp/glcpp-lex.l') -glcpp_parser = env.CFile('glcpp/glcpp-parse.c', 'glcpp/glcpp-parse.y') -glsl_lexer = parser_env.CXXFile('glsl_lexer.cpp', 'glsl_lexer.ll') -glsl_parser = parser_env.CXXFile('glsl_parser.cpp', 'glsl_parser.yy') - -# common generated sources -glsl_sources = [ - glcpp_lexer, - glcpp_parser[0], - glsl_lexer, - glsl_parser[0], -] - -# parse Makefile.sources -source_lists = env.ParseSourceList('Makefile.sources') - -# add non-generated sources -for l in ('LIBGLCPP_SOURCES', 'LIBGLSL_SOURCES', 'LIBGLSL_CXX_SOURCES'): - glsl_sources += source_lists[l] - -if env['msvc']: - env.Prepend(CPPPATH = ['#/src/getopt']) - env.PrependUnique(LIBS = [getopt]) - -if env['crosscompile'] and not env['embedded']: - Import('builtin_glsl_function') -else: - # Copy these files to avoid generation object files into src/mesa/program - env.Prepend(CPPPATH = ['#src/mesa/program']) - env.Command('hash_table.c', '#src/mesa/program/hash_table.c', Copy('$TARGET', '$SOURCE')) - env.Command('symbol_table.c', '#src/mesa/program/symbol_table.c', Copy('$TARGET', '$SOURCE')) - - compiler_objs = env.StaticObject(source_lists['GLSL_COMPILER_CXX_SOURCES']) - - mesa_objs = env.StaticObject([ - 'hash_table.c', - 'symbol_table.c', - ]) - - compiler_objs += mesa_objs - - builtin_compiler = env.Program( - target = 'builtin_compiler', - source = compiler_objs + glsl_sources + \ - source_lists['BUILTIN_COMPILER_CXX_SOURCES'], - ) - - # SCons builtin dependency scanner doesn't detect that glsl_lexer.ll - # depends on glsl_parser.h - env.Depends(builtin_compiler, glsl_parser) - - builtin_glsl_function = env.CodeGenerate( - target = 'builtin_function.cpp', - script = 'builtins/tools/generate_builtins.py', - source = builtin_compiler, - command = python_cmd + ' $SCRIPT $SOURCE > $TARGET' - ) - - env.Depends(builtin_glsl_function, ['builtins/tools/generate_builtins.py', 'builtins/tools/texture_builtins.py'] + Glob('builtins/ir/*')) - - Export('builtin_glsl_function') - - if env['hostonly']: - Return() - - -glsl_sources += builtin_glsl_function - -glsl = env.ConvenienceLibrary( - target = 'glsl', - source = glsl_sources, -) - -# SCons builtin dependency scanner doesn't detect that glsl_lexer.ll depends on -# glsl_parser.h -env.Depends(glsl, glsl_parser) - -Export('glsl') - -# Skip building these programs as they will cause SCons error "Two environments -# with different actions were specified for the same target" -if env['crosscompile'] or env['embedded']: - Return() - -env = env.Clone() - -if env['platform'] == 'windows': - env.PrependUnique(LIBS = [ - 'user32', - ]) - -env.Prepend(LIBS = [glsl]) - -glsl2 = env.Program( - target = 'glsl2', - source = compiler_objs, -) -env.Alias('glsl2', glsl2) - -glcpp = env.Program( - target = 'glcpp/glcpp', - source = ['glcpp/glcpp.c'] + mesa_objs, -) -env.Alias('glcpp', glcpp) diff --git a/dll/opengl/mesa/src/glsl/TODO b/dll/opengl/mesa/src/glsl/TODO deleted file mode 100644 index c99d7e152d6..00000000000 --- a/dll/opengl/mesa/src/glsl/TODO +++ /dev/null @@ -1,27 +0,0 @@ -- Detect code paths in non-void functions that don't reach a return statement - -- Improve handling of constants and their initializers. Constant initializers - should never generate any code. This is trival for scalar constants. It is - also trivial for arrays, matrices, and vectors that are accessed with - constant index values. For others it is more complicated. Perhaps these - cases should be silently converted to uniforms? - -- Implement support for ir_binop_dot in ir_algebraic.cpp. Perform - transformations such as "dot(v, vec3(0.0, 1.0, 0.0))" -> v.y. - -- Track source locations throughout the IR. There are currently several - places where we cannot emit line numbers for errors (and currently emit 0:0) - because we've "lost" the line number information. This is particularly - noticeable at link time. - -1.30 features: - -- Implement AST-to-HIR conversion of switch-statements - - switch - - case - - Update break to correcly handle mixed nexting of switch-statements - and loops. - -- Implement support for gl_ClipDistance. This is non-trivial because - gl_ClipDistance is exposed as a float[8], but all hardware actually - implements it as vec4[2]. \ No newline at end of file diff --git a/dll/opengl/mesa/src/glsl/ast.h b/dll/opengl/mesa/src/glsl/ast.h deleted file mode 100644 index 1f78af87e5a..00000000000 --- a/dll/opengl/mesa/src/glsl/ast.h +++ /dev/null @@ -1,824 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright © 2009 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#pragma once -#ifndef AST_H -#define AST_H - -#include "list.h" -#include "glsl_parser_extras.h" - -struct _mesa_glsl_parse_state; - -struct YYLTYPE; - -/** - * \defgroup AST Abstract syntax tree node definitions - * - * An abstract syntax tree is generated by the parser. This is a fairly - * direct representation of the gramma derivation for the source program. - * No symantic checking is done during the generation of the AST. Only - * syntactic checking is done. Symantic checking is performed by a later - * stage that converts the AST to a more generic intermediate representation. - * - *@{ - */ -/** - * Base class of all abstract syntax tree nodes - */ -class ast_node { -public: - /* Callers of this ralloc-based new need not call delete. It's - * easier to just ralloc_free 'ctx' (or any of its ancestors). */ - static void* operator new(size_t size, void *ctx) - { - void *node; - - node = rzalloc_size(ctx, size); - assert(node != NULL); - - return node; - } - - /* If the user *does* call delete, that's OK, we will just - * ralloc_free in that case. */ - static void operator delete(void *table) - { - ralloc_free(table); - } - - /** - * Print an AST node in something approximating the original GLSL code - */ - virtual void print(void) const; - - /** - * Convert the AST node to the high-level intermediate representation - */ - virtual ir_rvalue *hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state); - - /** - * Retrieve the source location of an AST node - * - * This function is primarily used to get the source position of an AST node - * into a form that can be passed to \c _mesa_glsl_error. - * - * \sa _mesa_glsl_error, ast_node::set_location - */ - struct YYLTYPE get_location(void) const - { - struct YYLTYPE locp; - - locp.source = this->location.source; - locp.first_line = this->location.line; - locp.first_column = this->location.column; - locp.last_line = locp.first_line; - locp.last_column = locp.first_column; - - return locp; - } - - /** - * Set the source location of an AST node from a parser location - * - * \sa ast_node::get_location - */ - void set_location(const struct YYLTYPE &locp) - { - this->location.source = locp.source; - this->location.line = locp.first_line; - this->location.column = locp.first_column; - } - - /** - * Source location of the AST node. - */ - struct { - unsigned source; /**< GLSL source number. */ - unsigned line; /**< Line number within the source string. */ - unsigned column; /**< Column in the line. */ - } location; - - exec_node link; - -protected: - /** - * The only constructor is protected so that only derived class objects can - * be created. - */ - ast_node(void); -}; - - -/** - * Operators for AST expression nodes. - */ -enum ast_operators { - ast_assign, - ast_plus, /**< Unary + operator. */ - ast_neg, - ast_add, - ast_sub, - ast_mul, - ast_div, - ast_mod, - ast_lshift, - ast_rshift, - ast_less, - ast_greater, - ast_lequal, - ast_gequal, - ast_equal, - ast_nequal, - ast_bit_and, - ast_bit_xor, - ast_bit_or, - ast_bit_not, - ast_logic_and, - ast_logic_xor, - ast_logic_or, - ast_logic_not, - - ast_mul_assign, - ast_div_assign, - ast_mod_assign, - ast_add_assign, - ast_sub_assign, - ast_ls_assign, - ast_rs_assign, - ast_and_assign, - ast_xor_assign, - ast_or_assign, - - ast_conditional, - - ast_pre_inc, - ast_pre_dec, - ast_post_inc, - ast_post_dec, - ast_field_selection, - ast_array_index, - - ast_function_call, - - ast_identifier, - ast_int_constant, - ast_uint_constant, - ast_float_constant, - ast_bool_constant, - - ast_sequence -}; - -/** - * Representation of any sort of expression. - */ -class ast_expression : public ast_node { -public: - ast_expression(int oper, ast_expression *, - ast_expression *, ast_expression *); - - ast_expression(const char *identifier) : - oper(ast_identifier) - { - subexpressions[0] = NULL; - subexpressions[1] = NULL; - subexpressions[2] = NULL; - primary_expression.identifier = (char *) identifier; - this->non_lvalue_description = NULL; - } - - static const char *operator_string(enum ast_operators op); - - virtual ir_rvalue *hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state); - - virtual void print(void) const; - - enum ast_operators oper; - - ast_expression *subexpressions[3]; - - union { - char *identifier; - int int_constant; - float float_constant; - unsigned uint_constant; - int bool_constant; - } primary_expression; - - - /** - * List of expressions for an \c ast_sequence or parameters for an - * \c ast_function_call - */ - exec_list expressions; - - /** - * For things that can't be l-values, this describes what it is. - * - * This text is used by the code that generates IR for assignments to - * detect and emit useful messages for assignments to some things that - * can't be l-values. For example, pre- or post-incerement expressions. - * - * \note - * This pointer may be \c NULL. - */ - const char *non_lvalue_description; -}; - -class ast_expression_bin : public ast_expression { -public: - ast_expression_bin(int oper, ast_expression *, ast_expression *); - - virtual void print(void) const; -}; - -/** - * Subclass of expressions for function calls - */ -class ast_function_expression : public ast_expression { -public: - ast_function_expression(ast_expression *callee) - : ast_expression(ast_function_call, callee, - NULL, NULL), - cons(false) - { - /* empty */ - } - - ast_function_expression(class ast_type_specifier *type) - : ast_expression(ast_function_call, (ast_expression *) type, - NULL, NULL), - cons(true) - { - /* empty */ - } - - bool is_constructor() const - { - return cons; - } - - virtual ir_rvalue *hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state); - -private: - /** - * Is this function call actually a constructor? - */ - bool cons; -}; - - -/** - * Number of possible operators for an ast_expression - * - * This is done as a define instead of as an additional value in the enum so - * that the compiler won't generate spurious messages like "warning: - * enumeration value ‘ast_num_operators’ not handled in switch" - */ -#define AST_NUM_OPERATORS (ast_sequence + 1) - - -class ast_compound_statement : public ast_node { -public: - ast_compound_statement(int new_scope, ast_node *statements); - virtual void print(void) const; - - virtual ir_rvalue *hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state); - - int new_scope; - exec_list statements; -}; - -class ast_declaration : public ast_node { -public: - ast_declaration(char *identifier, int is_array, ast_expression *array_size, - ast_expression *initializer); - virtual void print(void) const; - - char *identifier; - - int is_array; - ast_expression *array_size; - - ast_expression *initializer; -}; - - -enum { - ast_precision_none = 0, /**< Absence of precision qualifier. */ - ast_precision_high, - ast_precision_medium, - ast_precision_low -}; - -struct ast_type_qualifier { - union { - struct { - unsigned invariant:1; - unsigned constant:1; - unsigned attribute:1; - unsigned varying:1; - unsigned in:1; - unsigned out:1; - unsigned centroid:1; - unsigned uniform:1; - unsigned smooth:1; - unsigned flat:1; - unsigned noperspective:1; - - /** \name Layout qualifiers for GL_ARB_fragment_coord_conventions */ - /*@{*/ - unsigned origin_upper_left:1; - unsigned pixel_center_integer:1; - /*@}*/ - - /** - * Flag set if GL_ARB_explicit_attrib_location "location" layout - * qualifier is used. - */ - unsigned explicit_location:1; - - /** \name Layout qualifiers for GL_AMD_conservative_depth */ - /** \{ */ - unsigned depth_any:1; - unsigned depth_greater:1; - unsigned depth_less:1; - unsigned depth_unchanged:1; - /** \} */ - } - /** \brief Set of flags, accessed by name. */ - q; - - /** \brief Set of flags, accessed as a bitmask. */ - unsigned i; - } flags; - - /** - * Location specified via GL_ARB_explicit_attrib_location layout - * - * \note - * This field is only valid if \c explicit_location is set. - */ - int location; - - /** - * Return true if and only if an interpolation qualifier is present. - */ - bool has_interpolation() const; - - /** - * \brief Return string representation of interpolation qualifier. - * - * If an interpolation qualifier is present, then return that qualifier's - * string representation. Otherwise, return null. For example, if the - * noperspective bit is set, then this returns "noperspective". - * - * If multiple interpolation qualifiers are somehow present, then the - * returned string is undefined but not null. - */ - const char *interpolation_string() const; -}; - -class ast_struct_specifier : public ast_node { -public: - ast_struct_specifier(char *identifier, ast_node *declarator_list); - virtual void print(void) const; - - virtual ir_rvalue *hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state); - - char *name; - exec_list declarations; -}; - - -enum ast_types { - ast_void, - ast_float, - ast_int, - ast_uint, - ast_bool, - ast_vec2, - ast_vec3, - ast_vec4, - ast_bvec2, - ast_bvec3, - ast_bvec4, - ast_ivec2, - ast_ivec3, - ast_ivec4, - ast_uvec2, - ast_uvec3, - ast_uvec4, - ast_mat2, - ast_mat2x3, - ast_mat2x4, - ast_mat3x2, - ast_mat3, - ast_mat3x4, - ast_mat4x2, - ast_mat4x3, - ast_mat4, - ast_sampler1d, - ast_sampler2d, - ast_sampler2drect, - ast_sampler3d, - ast_samplercube, - ast_samplerexternaloes, - ast_sampler1dshadow, - ast_sampler2dshadow, - ast_sampler2drectshadow, - ast_samplercubeshadow, - ast_sampler1darray, - ast_sampler2darray, - ast_sampler1darrayshadow, - ast_sampler2darrayshadow, - ast_isampler1d, - ast_isampler2d, - ast_isampler3d, - ast_isamplercube, - ast_isampler1darray, - ast_isampler2darray, - ast_usampler1d, - ast_usampler2d, - ast_usampler3d, - ast_usamplercube, - ast_usampler1darray, - ast_usampler2darray, - - ast_struct, - ast_type_name -}; - - -class ast_type_specifier : public ast_node { -public: - ast_type_specifier(int specifier); - - /** Construct a type specifier from a type name */ - ast_type_specifier(const char *name) - : type_specifier(ast_type_name), type_name(name), structure(NULL), - is_array(false), array_size(NULL), precision(ast_precision_none), - is_precision_statement(false) - { - /* empty */ - } - - /** Construct a type specifier from a structure definition */ - ast_type_specifier(ast_struct_specifier *s) - : type_specifier(ast_struct), type_name(s->name), structure(s), - is_array(false), array_size(NULL), precision(ast_precision_none), - is_precision_statement(false) - { - /* empty */ - } - - const struct glsl_type *glsl_type(const char **name, - struct _mesa_glsl_parse_state *state) - const; - - virtual void print(void) const; - - ir_rvalue *hir(exec_list *, struct _mesa_glsl_parse_state *); - - enum ast_types type_specifier; - - const char *type_name; - ast_struct_specifier *structure; - - int is_array; - ast_expression *array_size; - - unsigned precision:2; - - bool is_precision_statement; -}; - - -class ast_fully_specified_type : public ast_node { -public: - virtual void print(void) const; - bool has_qualifiers() const; - - ast_type_qualifier qualifier; - ast_type_specifier *specifier; -}; - - -class ast_declarator_list : public ast_node { -public: - ast_declarator_list(ast_fully_specified_type *); - virtual void print(void) const; - - virtual ir_rvalue *hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state); - - ast_fully_specified_type *type; - exec_list declarations; - - /** - * Special flag for vertex shader "invariant" declarations. - * - * Vertex shaders can contain "invariant" variable redeclarations that do - * not include a type. For example, "invariant gl_Position;". This flag - * is used to note these cases when no type is specified. - */ - int invariant; -}; - - -class ast_parameter_declarator : public ast_node { -public: - ast_parameter_declarator() - { - this->identifier = NULL; - this->is_array = false; - this->array_size = 0; - } - - virtual void print(void) const; - - virtual ir_rvalue *hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state); - - ast_fully_specified_type *type; - char *identifier; - int is_array; - ast_expression *array_size; - - static void parameters_to_hir(exec_list *ast_parameters, - bool formal, exec_list *ir_parameters, - struct _mesa_glsl_parse_state *state); - -private: - /** Is this parameter declaration part of a formal parameter list? */ - bool formal_parameter; - - /** - * Is this parameter 'void' type? - * - * This field is set by \c ::hir. - */ - bool is_void; -}; - - -class ast_function : public ast_node { -public: - ast_function(void); - - virtual void print(void) const; - - virtual ir_rvalue *hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state); - - ast_fully_specified_type *return_type; - char *identifier; - - exec_list parameters; - -private: - /** - * Is this prototype part of the function definition? - * - * Used by ast_function_definition::hir to process the parameters, etc. - * of the function. - * - * \sa ::hir - */ - bool is_definition; - - /** - * Function signature corresponding to this function prototype instance - * - * Used by ast_function_definition::hir to process the parameters, etc. - * of the function. - * - * \sa ::hir - */ - class ir_function_signature *signature; - - friend class ast_function_definition; -}; - - -class ast_expression_statement : public ast_node { -public: - ast_expression_statement(ast_expression *); - virtual void print(void) const; - - virtual ir_rvalue *hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state); - - ast_expression *expression; -}; - - -class ast_case_label : public ast_node { -public: - ast_case_label(ast_expression *test_value); - virtual void print(void) const; - - virtual ir_rvalue *hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state); - - /** - * An test value of NULL means 'default'. - */ - ast_expression *test_value; -}; - - -class ast_case_label_list : public ast_node { -public: - ast_case_label_list(void); - virtual void print(void) const; - - virtual ir_rvalue *hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state); - - /** - * A list of case labels. - */ - exec_list labels; -}; - - -class ast_case_statement : public ast_node { -public: - ast_case_statement(ast_case_label_list *labels); - virtual void print(void) const; - - virtual ir_rvalue *hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state); - - ast_case_label_list *labels; - - /** - * A list of statements. - */ - exec_list stmts; -}; - - -class ast_case_statement_list : public ast_node { -public: - ast_case_statement_list(void); - virtual void print(void) const; - - virtual ir_rvalue *hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state); - - /** - * A list of cases. - */ - exec_list cases; -}; - - -class ast_switch_body : public ast_node { -public: - ast_switch_body(ast_case_statement_list *stmts); - virtual void print(void) const; - - virtual ir_rvalue *hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state); - - ast_case_statement_list *stmts; -}; - - -class ast_selection_statement : public ast_node { -public: - ast_selection_statement(ast_expression *condition, - ast_node *then_statement, - ast_node *else_statement); - virtual void print(void) const; - - virtual ir_rvalue *hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state); - - ast_expression *condition; - ast_node *then_statement; - ast_node *else_statement; -}; - - -class ast_switch_statement : public ast_node { -public: - ast_switch_statement(ast_expression *test_expression, - ast_node *body); - virtual void print(void) const; - - virtual ir_rvalue *hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state); - - ast_expression *test_expression; - ast_node *body; - -protected: - void test_to_hir(exec_list *, struct _mesa_glsl_parse_state *); -}; - -class ast_iteration_statement : public ast_node { -public: - ast_iteration_statement(int mode, ast_node *init, ast_node *condition, - ast_expression *rest_expression, ast_node *body); - - virtual void print(void) const; - - virtual ir_rvalue *hir(exec_list *, struct _mesa_glsl_parse_state *); - - enum ast_iteration_modes { - ast_for, - ast_while, - ast_do_while - } mode; - - - ast_node *init_statement; - ast_node *condition; - ast_expression *rest_expression; - - ast_node *body; - -private: - /** - * Generate IR from the condition of a loop - * - * This is factored out of ::hir because some loops have the condition - * test at the top (for and while), and others have it at the end (do-while). - */ - void condition_to_hir(class ir_loop *, struct _mesa_glsl_parse_state *); -}; - - -class ast_jump_statement : public ast_node { -public: - ast_jump_statement(int mode, ast_expression *return_value); - virtual void print(void) const; - - virtual ir_rvalue *hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state); - - enum ast_jump_modes { - ast_continue, - ast_break, - ast_return, - ast_discard - } mode; - - ast_expression *opt_return_value; -}; - - -class ast_function_definition : public ast_node { -public: - virtual void print(void) const; - - virtual ir_rvalue *hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state); - - ast_function *prototype; - ast_compound_statement *body; -}; -/*@}*/ - -extern void -_mesa_ast_to_hir(exec_list *instructions, struct _mesa_glsl_parse_state *state); - -extern ir_rvalue * -_mesa_ast_field_selection_to_hir(const ast_expression *expr, - exec_list *instructions, - struct _mesa_glsl_parse_state *state); - -void -emit_function(_mesa_glsl_parse_state *state, ir_function *f); - -#endif /* AST_H */ diff --git a/dll/opengl/mesa/src/glsl/ast_expr.cpp b/dll/opengl/mesa/src/glsl/ast_expr.cpp deleted file mode 100644 index e624d11cf3b..00000000000 --- a/dll/opengl/mesa/src/glsl/ast_expr.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ -#include -#include "ast.h" - -const char * -ast_expression::operator_string(enum ast_operators op) -{ - static const char *const operators[] = { - "=", - "+", - "-", - "+", - "-", - "*", - "/", - "%", - "<<", - ">>", - "<", - ">", - "<=", - ">=", - "==", - "!=", - "&", - "^", - "|", - "~", - "&&", - "^^", - "||", - "!", - - "*=", - "/=", - "%=", - "+=", - "-=", - "<<=", - ">>=", - "&=", - "^=", - "|=", - - "?:", - - "++", - "--", - "++", - "--", - ".", - }; - - assert((unsigned int)op < sizeof(operators) / sizeof(operators[0])); - - return operators[op]; -} - - -ast_expression_bin::ast_expression_bin(int oper, ast_expression *ex0, - ast_expression *ex1) : - ast_expression(oper, ex0, ex1, NULL) -{ - assert((oper >= ast_plus) && (oper <= ast_logic_not)); -} - - -void -ast_expression_bin::print(void) const -{ - subexpressions[0]->print(); - printf("%s ", operator_string(oper)); - subexpressions[1]->print(); -} diff --git a/dll/opengl/mesa/src/glsl/ast_function.cpp b/dll/opengl/mesa/src/glsl/ast_function.cpp deleted file mode 100644 index 1c2e8613cb2..00000000000 --- a/dll/opengl/mesa/src/glsl/ast_function.cpp +++ /dev/null @@ -1,1506 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "glsl_symbol_table.h" -#include "ast.h" -#include "glsl_types.h" -#include "ir.h" -#include "main/core.h" /* for MIN2 */ - -static ir_rvalue * -convert_component(ir_rvalue *src, const glsl_type *desired_type); - -bool -apply_implicit_conversion(const glsl_type *to, ir_rvalue * &from, - struct _mesa_glsl_parse_state *state); - -static unsigned -process_parameters(exec_list *instructions, exec_list *actual_parameters, - exec_list *parameters, - struct _mesa_glsl_parse_state *state) -{ - unsigned count = 0; - - foreach_list (n, parameters) { - ast_node *const ast = exec_node_data(ast_node, n, link); - ir_rvalue *result = ast->hir(instructions, state); - - ir_constant *const constant = result->constant_expression_value(); - if (constant != NULL) - result = constant; - - actual_parameters->push_tail(result); - count++; - } - - return count; -} - - -/** - * Generate a source prototype for a function signature - * - * \param return_type Return type of the function. May be \c NULL. - * \param name Name of the function. - * \param parameters List of \c ir_instruction nodes representing the - * parameter list for the function. This may be either a - * formal (\c ir_variable) or actual (\c ir_rvalue) - * parameter list. Only the type is used. - * - * \return - * A ralloced string representing the prototype of the function. - */ -char * -prototype_string(const glsl_type *return_type, const char *name, - exec_list *parameters) -{ - char *str = NULL; - - if (return_type != NULL) - str = ralloc_asprintf(NULL, "%s ", return_type->name); - - ralloc_asprintf_append(&str, "%s(", name); - - const char *comma = ""; - foreach_list(node, parameters) { - const ir_instruction *const param = (ir_instruction *) node; - - ralloc_asprintf_append(&str, "%s%s", comma, param->type->name); - comma = ", "; - } - - ralloc_strcat(&str, ")"); - return str; -} - -/** - * If a function call is generated, \c call_ir will point to it on exit. - * Otherwise \c call_ir will be set to \c NULL. - */ -static ir_rvalue * -generate_call(exec_list *instructions, ir_function_signature *sig, - YYLTYPE *loc, exec_list *actual_parameters, - ir_call **call_ir, - struct _mesa_glsl_parse_state *state) -{ - void *ctx = state; - exec_list post_call_conversions; - - *call_ir = NULL; - - /* Verify that 'out' and 'inout' actual parameters are lvalues. This - * isn't done in ir_function::matching_signature because that function - * cannot generate the necessary diagnostics. - * - * Also, validate that 'const_in' formal parameters (an extension of our - * IR) correspond to ir_constant actual parameters. - * - * Also, perform implicit conversion of arguments. Note: to implicitly - * convert out parameters, we need to place them in a temporary - * variable, and do the conversion after the call takes place. Since we - * haven't emitted the call yet, we'll place the post-call conversions - * in a temporary exec_list, and emit them later. - */ - exec_list_iterator actual_iter = actual_parameters->iterator(); - exec_list_iterator formal_iter = sig->parameters.iterator(); - - while (actual_iter.has_next()) { - ir_rvalue *actual = (ir_rvalue *) actual_iter.get(); - ir_variable *formal = (ir_variable *) formal_iter.get(); - - assert(actual != NULL); - assert(formal != NULL); - - if (formal->mode == ir_var_const_in && !actual->as_constant()) { - _mesa_glsl_error(loc, state, - "parameter `%s' must be a constant expression", - formal->name); - return ir_call::get_error_instruction(ctx); - } - - if ((formal->mode == ir_var_out) - || (formal->mode == ir_var_inout)) { - const char *mode = NULL; - switch (formal->mode) { - case ir_var_out: mode = "out"; break; - case ir_var_inout: mode = "inout"; break; - default: assert(false); break; - } - /* FIXME: 'loc' is incorrect (as of 2011-01-21). It is always - * FIXME: 0:0(0). - */ - if (actual->variable_referenced() - && actual->variable_referenced()->read_only) { - _mesa_glsl_error(loc, state, - "function parameter '%s %s' references the " - "read-only variable '%s'", - mode, formal->name, - actual->variable_referenced()->name); - - } else if (!actual->is_lvalue()) { - _mesa_glsl_error(loc, state, - "function parameter '%s %s' is not an lvalue", - mode, formal->name); - } - } - - if (formal->type->is_numeric() || formal->type->is_boolean()) { - switch (formal->mode) { - case ir_var_const_in: - case ir_var_in: { - ir_rvalue *converted - = convert_component(actual, formal->type); - actual->replace_with(converted); - break; - } - case ir_var_out: - if (actual->type != formal->type) { - /* To convert an out parameter, we need to create a - * temporary variable to hold the value before conversion, - * and then perform the conversion after the function call - * returns. - * - * This has the effect of transforming code like this: - * - * void f(out int x); - * float value; - * f(value); - * - * Into IR that's equivalent to this: - * - * void f(out int x); - * float value; - * int out_parameter_conversion; - * f(out_parameter_conversion); - * value = float(out_parameter_conversion); - */ - ir_variable *tmp = - new(ctx) ir_variable(formal->type, - "out_parameter_conversion", - ir_var_temporary); - instructions->push_tail(tmp); - ir_dereference_variable *deref_tmp_1 - = new(ctx) ir_dereference_variable(tmp); - ir_dereference_variable *deref_tmp_2 - = new(ctx) ir_dereference_variable(tmp); - ir_rvalue *converted_tmp - = convert_component(deref_tmp_1, actual->type); - ir_assignment *assignment - = new(ctx) ir_assignment(actual, converted_tmp); - post_call_conversions.push_tail(assignment); - actual->replace_with(deref_tmp_2); - } - break; - case ir_var_inout: - /* Inout parameters should never require conversion, since that - * would require an implicit conversion to exist both to and - * from the formal parameter type, and there are no - * bidirectional implicit conversions. - */ - assert (actual->type == formal->type); - break; - default: - assert (!"Illegal formal parameter mode"); - break; - } - } - - actual_iter.next(); - formal_iter.next(); - } - - /* Always insert the call in the instruction stream, and return a deref - * of its return val if it returns a value, since we don't know if - * the rvalue is going to be assigned to anything or not. - * - * Also insert any out parameter conversions after the call. - */ - ir_call *call = new(ctx) ir_call(sig, actual_parameters); - ir_dereference_variable *deref; - if (!sig->return_type->is_void()) { - /* If the function call is a constant expression, don't - * generate the instructions to call it; just generate an - * ir_constant representing the constant value. - * - * Function calls can only be constant expressions starting - * in GLSL 1.20. - */ - if (state->language_version >= 120) { - ir_constant *const_val = call->constant_expression_value(); - if (const_val) { - return const_val; - } - } - - ir_variable *var; - - var = new(ctx) ir_variable(sig->return_type, - ralloc_asprintf(ctx, "%s_retval", - sig->function_name()), - ir_var_temporary); - instructions->push_tail(var); - - deref = new(ctx) ir_dereference_variable(var); - ir_assignment *assign = new(ctx) ir_assignment(deref, call, NULL); - instructions->push_tail(assign); - *call_ir = call; - - deref = new(ctx) ir_dereference_variable(var); - } else { - instructions->push_tail(call); - *call_ir = call; - deref = NULL; - } - instructions->append_list(&post_call_conversions); - return deref; -} - -static ir_rvalue * -match_function_by_name(exec_list *instructions, const char *name, - YYLTYPE *loc, exec_list *actual_parameters, - ir_call **call_ir, - struct _mesa_glsl_parse_state *state) -{ - void *ctx = state; - ir_function *f = state->symbols->get_function(name); - ir_function_signature *local_sig = NULL; - ir_function_signature *sig = NULL; - - /* Is the function hidden by a record type constructor? */ - if (state->symbols->get_type(name)) - goto done; /* no match */ - - /* Is the function hidden by a variable (impossible in 1.10)? */ - if (state->language_version != 110 && state->symbols->get_variable(name)) - goto done; /* no match */ - - if (f != NULL) { - /* Look for a match in the local shader. If exact, we're done. */ - bool is_exact = false; - sig = local_sig = f->matching_signature(actual_parameters, &is_exact); - if (is_exact) - goto done; - - if (!state->es_shader && f->has_user_signature()) { - /* In desktop GL, the presence of a user-defined signature hides any - * built-in signatures, so we must ignore them. In contrast, in ES2 - * user-defined signatures add new overloads, so we must proceed. - */ - goto done; - } - } - - /* Local shader has no exact candidates; check the built-ins. */ - _mesa_glsl_initialize_functions(state); - for (unsigned i = 0; i < state->num_builtins_to_link; i++) { - ir_function *builtin = - state->builtins_to_link[i]->symbols->get_function(name); - if (builtin == NULL) - continue; - - bool is_exact = false; - ir_function_signature *builtin_sig = - builtin->matching_signature(actual_parameters, &is_exact); - - if (builtin_sig == NULL) - continue; - - /* If the built-in signature is exact, we can stop. */ - if (is_exact) { - sig = builtin_sig; - goto done; - } - - if (sig == NULL) { - /* We found an inexact match, which is better than nothing. However, - * we should keep searching for an exact match. - */ - sig = builtin_sig; - } - } - -done: - if (sig != NULL) { - /* If the match is from a linked built-in shader, import the prototype. */ - if (sig != local_sig) { - if (f == NULL) { - f = new(ctx) ir_function(name); - state->symbols->add_global_function(f); - emit_function(state, f); - } - f->add_signature(sig->clone_prototype(f, NULL)); - } - - /* Finally, generate a call instruction. */ - return generate_call(instructions, sig, loc, actual_parameters, - call_ir, state); - } else { - char *str = prototype_string(NULL, name, actual_parameters); - - _mesa_glsl_error(loc, state, "no matching function for call to `%s'", - str); - ralloc_free(str); - - const char *prefix = "candidates are: "; - - for (int i = -1; i < (int) state->num_builtins_to_link; i++) { - glsl_symbol_table *syms = i >= 0 ? state->builtins_to_link[i]->symbols - : state->symbols; - f = syms->get_function(name); - if (f == NULL) - continue; - - foreach_list (node, &f->signatures) { - ir_function_signature *sig = (ir_function_signature *) node; - - str = prototype_string(sig->return_type, f->name, &sig->parameters); - _mesa_glsl_error(loc, state, "%s%s", prefix, str); - ralloc_free(str); - - prefix = " "; - } - - } - - return ir_call::get_error_instruction(ctx); - } -} - - -/** - * Perform automatic type conversion of constructor parameters - * - * This implements the rules in the "Conversion and Scalar Constructors" - * section (GLSL 1.10 section 5.4.1), not the "Implicit Conversions" rules. - */ -static ir_rvalue * -convert_component(ir_rvalue *src, const glsl_type *desired_type) -{ - void *ctx = ralloc_parent(src); - const unsigned a = desired_type->base_type; - const unsigned b = src->type->base_type; - ir_expression *result = NULL; - - if (src->type->is_error()) - return src; - - assert(a <= GLSL_TYPE_BOOL); - assert(b <= GLSL_TYPE_BOOL); - - if (a == b) - return src; - - switch (a) { - case GLSL_TYPE_UINT: - switch (b) { - case GLSL_TYPE_INT: - result = new(ctx) ir_expression(ir_unop_i2u, src); - break; - case GLSL_TYPE_FLOAT: - result = new(ctx) ir_expression(ir_unop_i2u, - new(ctx) ir_expression(ir_unop_f2i, src)); - break; - case GLSL_TYPE_BOOL: - result = new(ctx) ir_expression(ir_unop_i2u, - new(ctx) ir_expression(ir_unop_b2i, src)); - break; - } - break; - case GLSL_TYPE_INT: - switch (b) { - case GLSL_TYPE_UINT: - result = new(ctx) ir_expression(ir_unop_u2i, src); - break; - case GLSL_TYPE_FLOAT: - result = new(ctx) ir_expression(ir_unop_f2i, src); - break; - case GLSL_TYPE_BOOL: - result = new(ctx) ir_expression(ir_unop_b2i, src); - break; - } - break; - case GLSL_TYPE_FLOAT: - switch (b) { - case GLSL_TYPE_UINT: - result = new(ctx) ir_expression(ir_unop_u2f, desired_type, src, NULL); - break; - case GLSL_TYPE_INT: - result = new(ctx) ir_expression(ir_unop_i2f, desired_type, src, NULL); - break; - case GLSL_TYPE_BOOL: - result = new(ctx) ir_expression(ir_unop_b2f, desired_type, src, NULL); - break; - } - break; - case GLSL_TYPE_BOOL: - switch (b) { - case GLSL_TYPE_UINT: - result = new(ctx) ir_expression(ir_unop_i2b, - new(ctx) ir_expression(ir_unop_u2i, src)); - break; - case GLSL_TYPE_INT: - result = new(ctx) ir_expression(ir_unop_i2b, desired_type, src, NULL); - break; - case GLSL_TYPE_FLOAT: - result = new(ctx) ir_expression(ir_unop_f2b, desired_type, src, NULL); - break; - } - break; - } - - assert(result != NULL); - assert(result->type == desired_type); - - /* Try constant folding; it may fold in the conversion we just added. */ - ir_constant *const constant = result->constant_expression_value(); - return (constant != NULL) ? (ir_rvalue *) constant : (ir_rvalue *) result; -} - -/** - * Dereference a specific component from a scalar, vector, or matrix - */ -static ir_rvalue * -dereference_component(ir_rvalue *src, unsigned component) -{ - void *ctx = ralloc_parent(src); - assert(component < src->type->components()); - - /* If the source is a constant, just create a new constant instead of a - * dereference of the existing constant. - */ - ir_constant *constant = src->as_constant(); - if (constant) - return new(ctx) ir_constant(constant, component); - - if (src->type->is_scalar()) { - return src; - } else if (src->type->is_vector()) { - return new(ctx) ir_swizzle(src, component, 0, 0, 0, 1); - } else { - assert(src->type->is_matrix()); - - /* Dereference a row of the matrix, then call this function again to get - * a specific element from that row. - */ - const int c = component / src->type->column_type()->vector_elements; - const int r = component % src->type->column_type()->vector_elements; - ir_constant *const col_index = new(ctx) ir_constant(c); - ir_dereference *const col = new(ctx) ir_dereference_array(src, col_index); - - col->type = src->type->column_type(); - - return dereference_component(col, r); - } - - assert(!"Should not get here."); - return NULL; -} - - -static ir_rvalue * -process_array_constructor(exec_list *instructions, - const glsl_type *constructor_type, - YYLTYPE *loc, exec_list *parameters, - struct _mesa_glsl_parse_state *state) -{ - void *ctx = state; - /* Array constructors come in two forms: sized and unsized. Sized array - * constructors look like 'vec4[2](a, b)', where 'a' and 'b' are vec4 - * variables. In this case the number of parameters must exactly match the - * specified size of the array. - * - * Unsized array constructors look like 'vec4[](a, b)', where 'a' and 'b' - * are vec4 variables. In this case the size of the array being constructed - * is determined by the number of parameters. - * - * From page 52 (page 58 of the PDF) of the GLSL 1.50 spec: - * - * "There must be exactly the same number of arguments as the size of - * the array being constructed. If no size is present in the - * constructor, then the array is explicitly sized to the number of - * arguments provided. The arguments are assigned in order, starting at - * element 0, to the elements of the constructed array. Each argument - * must be the same type as the element type of the array, or be a type - * that can be converted to the element type of the array according to - * Section 4.1.10 "Implicit Conversions."" - */ - exec_list actual_parameters; - const unsigned parameter_count = - process_parameters(instructions, &actual_parameters, parameters, state); - - if ((parameter_count == 0) - || ((constructor_type->length != 0) - && (constructor_type->length != parameter_count))) { - const unsigned min_param = (constructor_type->length == 0) - ? 1 : constructor_type->length; - - _mesa_glsl_error(loc, state, "array constructor must have %s %u " - "parameter%s", - (constructor_type->length != 0) ? "at least" : "exactly", - min_param, (min_param <= 1) ? "" : "s"); - return ir_call::get_error_instruction(ctx); - } - - if (constructor_type->length == 0) { - constructor_type = - glsl_type::get_array_instance(constructor_type->element_type(), - parameter_count); - assert(constructor_type != NULL); - assert(constructor_type->length == parameter_count); - } - - bool all_parameters_are_constant = true; - - /* Type cast each parameter and, if possible, fold constants. */ - foreach_list_safe(n, &actual_parameters) { - ir_rvalue *ir = (ir_rvalue *) n; - ir_rvalue *result = ir; - - /* Apply implicit conversions (not the scalar constructor rules!). See - * the spec quote above. */ - if (constructor_type->element_type()->is_float()) { - const glsl_type *desired_type = - glsl_type::get_instance(GLSL_TYPE_FLOAT, - ir->type->vector_elements, - ir->type->matrix_columns); - if (result->type->can_implicitly_convert_to(desired_type)) { - /* Even though convert_component() implements the constructor - * conversion rules (not the implicit conversion rules), its safe - * to use it here because we already checked that the implicit - * conversion is legal. - */ - result = convert_component(ir, desired_type); - } - } - - if (result->type != constructor_type->element_type()) { - _mesa_glsl_error(loc, state, "type error in array constructor: " - "expected: %s, found %s", - constructor_type->element_type()->name, - result->type->name); - } - - /* Attempt to convert the parameter to a constant valued expression. - * After doing so, track whether or not all the parameters to the - * constructor are trivially constant valued expressions. - */ - ir_rvalue *const constant = result->constant_expression_value(); - - if (constant != NULL) - result = constant; - else - all_parameters_are_constant = false; - - ir->replace_with(result); - } - - if (all_parameters_are_constant) - return new(ctx) ir_constant(constructor_type, &actual_parameters); - - ir_variable *var = new(ctx) ir_variable(constructor_type, "array_ctor", - ir_var_temporary); - instructions->push_tail(var); - - int i = 0; - foreach_list(node, &actual_parameters) { - ir_rvalue *rhs = (ir_rvalue *) node; - ir_rvalue *lhs = new(ctx) ir_dereference_array(var, - new(ctx) ir_constant(i)); - - ir_instruction *assignment = new(ctx) ir_assignment(lhs, rhs, NULL); - instructions->push_tail(assignment); - - i++; - } - - return new(ctx) ir_dereference_variable(var); -} - - -/** - * Try to convert a record constructor to a constant expression - */ -static ir_constant * -constant_record_constructor(const glsl_type *constructor_type, - exec_list *parameters, void *mem_ctx) -{ - foreach_list(node, parameters) { - ir_constant *constant = ((ir_instruction *) node)->as_constant(); - if (constant == NULL) - return NULL; - node->replace_with(constant); - } - - return new(mem_ctx) ir_constant(constructor_type, parameters); -} - - -/** - * Determine if a list consists of a single scalar r-value - */ -bool -single_scalar_parameter(exec_list *parameters) -{ - const ir_rvalue *const p = (ir_rvalue *) parameters->head; - assert(((ir_rvalue *)p)->as_rvalue() != NULL); - - return (p->type->is_scalar() && p->next->is_tail_sentinel()); -} - - -/** - * Generate inline code for a vector constructor - * - * The generated constructor code will consist of a temporary variable - * declaration of the same type as the constructor. A sequence of assignments - * from constructor parameters to the temporary will follow. - * - * \return - * An \c ir_dereference_variable of the temprorary generated in the constructor - * body. - */ -ir_rvalue * -emit_inline_vector_constructor(const glsl_type *type, - exec_list *instructions, - exec_list *parameters, - void *ctx) -{ - assert(!parameters->is_empty()); - - ir_variable *var = new(ctx) ir_variable(type, "vec_ctor", ir_var_temporary); - instructions->push_tail(var); - - /* There are two kinds of vector constructors. - * - * - Construct a vector from a single scalar by replicating that scalar to - * all components of the vector. - * - * - Construct a vector from an arbirary combination of vectors and - * scalars. The components of the constructor parameters are assigned - * to the vector in order until the vector is full. - */ - const unsigned lhs_components = type->components(); - if (single_scalar_parameter(parameters)) { - ir_rvalue *first_param = (ir_rvalue *)parameters->head; - ir_rvalue *rhs = new(ctx) ir_swizzle(first_param, 0, 0, 0, 0, - lhs_components); - ir_dereference_variable *lhs = new(ctx) ir_dereference_variable(var); - const unsigned mask = (1U << lhs_components) - 1; - - assert(rhs->type == lhs->type); - - ir_instruction *inst = new(ctx) ir_assignment(lhs, rhs, NULL, mask); - instructions->push_tail(inst); - } else { - unsigned base_component = 0; - unsigned base_lhs_component = 0; - ir_constant_data data; - unsigned constant_mask = 0, constant_components = 0; - - memset(&data, 0, sizeof(data)); - - foreach_list(node, parameters) { - ir_rvalue *param = (ir_rvalue *) node; - unsigned rhs_components = param->type->components(); - - /* Do not try to assign more components to the vector than it has! - */ - if ((rhs_components + base_lhs_component) > lhs_components) { - rhs_components = lhs_components - base_lhs_component; - } - - const ir_constant *const c = param->as_constant(); - if (c != NULL) { - for (unsigned i = 0; i < rhs_components; i++) { - switch (c->type->base_type) { - case GLSL_TYPE_UINT: - data.u[i + base_component] = c->get_uint_component(i); - break; - case GLSL_TYPE_INT: - data.i[i + base_component] = c->get_int_component(i); - break; - case GLSL_TYPE_FLOAT: - data.f[i + base_component] = c->get_float_component(i); - break; - case GLSL_TYPE_BOOL: - data.b[i + base_component] = c->get_bool_component(i); - break; - default: - assert(!"Should not get here."); - break; - } - } - - /* Mask of fields to be written in the assignment. - */ - constant_mask |= ((1U << rhs_components) - 1) << base_lhs_component; - constant_components += rhs_components; - - base_component += rhs_components; - } - /* Advance the component index by the number of components - * that were just assigned. - */ - base_lhs_component += rhs_components; - } - - if (constant_mask != 0) { - ir_dereference *lhs = new(ctx) ir_dereference_variable(var); - const glsl_type *rhs_type = glsl_type::get_instance(var->type->base_type, - constant_components, - 1); - ir_rvalue *rhs = new(ctx) ir_constant(rhs_type, &data); - - ir_instruction *inst = - new(ctx) ir_assignment(lhs, rhs, NULL, constant_mask); - instructions->push_tail(inst); - } - - base_component = 0; - foreach_list(node, parameters) { - ir_rvalue *param = (ir_rvalue *) node; - unsigned rhs_components = param->type->components(); - - /* Do not try to assign more components to the vector than it has! - */ - if ((rhs_components + base_component) > lhs_components) { - rhs_components = lhs_components - base_component; - } - - const ir_constant *const c = param->as_constant(); - if (c == NULL) { - /* Mask of fields to be written in the assignment. - */ - const unsigned write_mask = ((1U << rhs_components) - 1) - << base_component; - - ir_dereference *lhs = new(ctx) ir_dereference_variable(var); - - /* Generate a swizzle so that LHS and RHS sizes match. - */ - ir_rvalue *rhs = - new(ctx) ir_swizzle(param, 0, 1, 2, 3, rhs_components); - - ir_instruction *inst = - new(ctx) ir_assignment(lhs, rhs, NULL, write_mask); - instructions->push_tail(inst); - } - - /* Advance the component index by the number of components that were - * just assigned. - */ - base_component += rhs_components; - } - } - return new(ctx) ir_dereference_variable(var); -} - - -/** - * Generate assignment of a portion of a vector to a portion of a matrix column - * - * \param src_base First component of the source to be used in assignment - * \param column Column of destination to be assiged - * \param row_base First component of the destination column to be assigned - * \param count Number of components to be assigned - * - * \note - * \c src_base + \c count must be less than or equal to the number of components - * in the source vector. - */ -ir_instruction * -assign_to_matrix_column(ir_variable *var, unsigned column, unsigned row_base, - ir_rvalue *src, unsigned src_base, unsigned count, - void *mem_ctx) -{ - ir_constant *col_idx = new(mem_ctx) ir_constant(column); - ir_dereference *column_ref = new(mem_ctx) ir_dereference_array(var, col_idx); - - assert(column_ref->type->components() >= (row_base + count)); - assert(src->type->components() >= (src_base + count)); - - /* Generate a swizzle that extracts the number of components from the source - * that are to be assigned to the column of the matrix. - */ - if (count < src->type->vector_elements) { - src = new(mem_ctx) ir_swizzle(src, - src_base + 0, src_base + 1, - src_base + 2, src_base + 3, - count); - } - - /* Mask of fields to be written in the assignment. - */ - const unsigned write_mask = ((1U << count) - 1) << row_base; - - return new(mem_ctx) ir_assignment(column_ref, src, NULL, write_mask); -} - - -/** - * Generate inline code for a matrix constructor - * - * The generated constructor code will consist of a temporary variable - * declaration of the same type as the constructor. A sequence of assignments - * from constructor parameters to the temporary will follow. - * - * \return - * An \c ir_dereference_variable of the temprorary generated in the constructor - * body. - */ -ir_rvalue * -emit_inline_matrix_constructor(const glsl_type *type, - exec_list *instructions, - exec_list *parameters, - void *ctx) -{ - assert(!parameters->is_empty()); - - ir_variable *var = new(ctx) ir_variable(type, "mat_ctor", ir_var_temporary); - instructions->push_tail(var); - - /* There are three kinds of matrix constructors. - * - * - Construct a matrix from a single scalar by replicating that scalar to - * along the diagonal of the matrix and setting all other components to - * zero. - * - * - Construct a matrix from an arbirary combination of vectors and - * scalars. The components of the constructor parameters are assigned - * to the matrix in colum-major order until the matrix is full. - * - * - Construct a matrix from a single matrix. The source matrix is copied - * to the upper left portion of the constructed matrix, and the remaining - * elements take values from the identity matrix. - */ - ir_rvalue *const first_param = (ir_rvalue *) parameters->head; - if (single_scalar_parameter(parameters)) { - /* Assign the scalar to the X component of a vec4, and fill the remaining - * components with zero. - */ - ir_variable *rhs_var = - new(ctx) ir_variable(glsl_type::vec4_type, "mat_ctor_vec", - ir_var_temporary); - instructions->push_tail(rhs_var); - - ir_constant_data zero; - zero.f[0] = 0.0; - zero.f[1] = 0.0; - zero.f[2] = 0.0; - zero.f[3] = 0.0; - - ir_instruction *inst = - new(ctx) ir_assignment(new(ctx) ir_dereference_variable(rhs_var), - new(ctx) ir_constant(rhs_var->type, &zero), - NULL); - instructions->push_tail(inst); - - ir_dereference *const rhs_ref = new(ctx) ir_dereference_variable(rhs_var); - - inst = new(ctx) ir_assignment(rhs_ref, first_param, NULL, 0x01); - instructions->push_tail(inst); - - /* Assign the temporary vector to each column of the destination matrix - * with a swizzle that puts the X component on the diagonal of the - * matrix. In some cases this may mean that the X component does not - * get assigned into the column at all (i.e., when the matrix has more - * columns than rows). - */ - static const unsigned rhs_swiz[4][4] = { - { 0, 1, 1, 1 }, - { 1, 0, 1, 1 }, - { 1, 1, 0, 1 }, - { 1, 1, 1, 0 } - }; - - const unsigned cols_to_init = MIN2(type->matrix_columns, - type->vector_elements); - for (unsigned i = 0; i < cols_to_init; i++) { - ir_constant *const col_idx = new(ctx) ir_constant(i); - ir_rvalue *const col_ref = new(ctx) ir_dereference_array(var, col_idx); - - ir_rvalue *const rhs_ref = new(ctx) ir_dereference_variable(rhs_var); - ir_rvalue *const rhs = new(ctx) ir_swizzle(rhs_ref, rhs_swiz[i], - type->vector_elements); - - inst = new(ctx) ir_assignment(col_ref, rhs, NULL); - instructions->push_tail(inst); - } - - for (unsigned i = cols_to_init; i < type->matrix_columns; i++) { - ir_constant *const col_idx = new(ctx) ir_constant(i); - ir_rvalue *const col_ref = new(ctx) ir_dereference_array(var, col_idx); - - ir_rvalue *const rhs_ref = new(ctx) ir_dereference_variable(rhs_var); - ir_rvalue *const rhs = new(ctx) ir_swizzle(rhs_ref, 1, 1, 1, 1, - type->vector_elements); - - inst = new(ctx) ir_assignment(col_ref, rhs, NULL); - instructions->push_tail(inst); - } - } else if (first_param->type->is_matrix()) { - /* From page 50 (56 of the PDF) of the GLSL 1.50 spec: - * - * "If a matrix is constructed from a matrix, then each component - * (column i, row j) in the result that has a corresponding - * component (column i, row j) in the argument will be initialized - * from there. All other components will be initialized to the - * identity matrix. If a matrix argument is given to a matrix - * constructor, it is an error to have any other arguments." - */ - assert(first_param->next->is_tail_sentinel()); - ir_rvalue *const src_matrix = first_param; - - /* If the source matrix is smaller, pre-initialize the relavent parts of - * the destination matrix to the identity matrix. - */ - if ((src_matrix->type->matrix_columns < var->type->matrix_columns) - || (src_matrix->type->vector_elements < var->type->vector_elements)) { - - /* If the source matrix has fewer rows, every column of the destination - * must be initialized. Otherwise only the columns in the destination - * that do not exist in the source must be initialized. - */ - unsigned col = - (src_matrix->type->vector_elements < var->type->vector_elements) - ? 0 : src_matrix->type->matrix_columns; - - const glsl_type *const col_type = var->type->column_type(); - for (/* empty */; col < var->type->matrix_columns; col++) { - ir_constant_data ident; - - ident.f[0] = 0.0; - ident.f[1] = 0.0; - ident.f[2] = 0.0; - ident.f[3] = 0.0; - - ident.f[col] = 1.0; - - ir_rvalue *const rhs = new(ctx) ir_constant(col_type, &ident); - - ir_rvalue *const lhs = - new(ctx) ir_dereference_array(var, new(ctx) ir_constant(col)); - - ir_instruction *inst = new(ctx) ir_assignment(lhs, rhs, NULL); - instructions->push_tail(inst); - } - } - - /* Assign columns from the source matrix to the destination matrix. - * - * Since the parameter will be used in the RHS of multiple assignments, - * generate a temporary and copy the paramter there. - */ - ir_variable *const rhs_var = - new(ctx) ir_variable(first_param->type, "mat_ctor_mat", - ir_var_temporary); - instructions->push_tail(rhs_var); - - ir_dereference *const rhs_var_ref = - new(ctx) ir_dereference_variable(rhs_var); - ir_instruction *const inst = - new(ctx) ir_assignment(rhs_var_ref, first_param, NULL); - instructions->push_tail(inst); - - const unsigned last_row = MIN2(src_matrix->type->vector_elements, - var->type->vector_elements); - const unsigned last_col = MIN2(src_matrix->type->matrix_columns, - var->type->matrix_columns); - - unsigned swiz[4] = { 0, 0, 0, 0 }; - for (unsigned i = 1; i < last_row; i++) - swiz[i] = i; - - const unsigned write_mask = (1U << last_row) - 1; - - for (unsigned i = 0; i < last_col; i++) { - ir_dereference *const lhs = - new(ctx) ir_dereference_array(var, new(ctx) ir_constant(i)); - ir_rvalue *const rhs_col = - new(ctx) ir_dereference_array(rhs_var, new(ctx) ir_constant(i)); - - /* If one matrix has columns that are smaller than the columns of the - * other matrix, wrap the column access of the larger with a swizzle - * so that the LHS and RHS of the assignment have the same size (and - * therefore have the same type). - * - * It would be perfectly valid to unconditionally generate the - * swizzles, this this will typically result in a more compact IR tree. - */ - ir_rvalue *rhs; - if (lhs->type->vector_elements != rhs_col->type->vector_elements) { - rhs = new(ctx) ir_swizzle(rhs_col, swiz, last_row); - } else { - rhs = rhs_col; - } - - ir_instruction *inst = - new(ctx) ir_assignment(lhs, rhs, NULL, write_mask); - instructions->push_tail(inst); - } - } else { - const unsigned cols = type->matrix_columns; - const unsigned rows = type->vector_elements; - unsigned col_idx = 0; - unsigned row_idx = 0; - - foreach_list (node, parameters) { - ir_rvalue *const rhs = (ir_rvalue *) node; - const unsigned components_remaining_this_column = rows - row_idx; - unsigned rhs_components = rhs->type->components(); - unsigned rhs_base = 0; - - /* Since the parameter might be used in the RHS of two assignments, - * generate a temporary and copy the paramter there. - */ - ir_variable *rhs_var = - new(ctx) ir_variable(rhs->type, "mat_ctor_vec", ir_var_temporary); - instructions->push_tail(rhs_var); - - ir_dereference *rhs_var_ref = - new(ctx) ir_dereference_variable(rhs_var); - ir_instruction *inst = new(ctx) ir_assignment(rhs_var_ref, rhs, NULL); - instructions->push_tail(inst); - - /* Assign the current parameter to as many components of the matrix - * as it will fill. - * - * NOTE: A single vector parameter can span two matrix columns. A - * single vec4, for example, can completely fill a mat2. - */ - if (rhs_components >= components_remaining_this_column) { - const unsigned count = MIN2(rhs_components, - components_remaining_this_column); - - rhs_var_ref = new(ctx) ir_dereference_variable(rhs_var); - - ir_instruction *inst = assign_to_matrix_column(var, col_idx, - row_idx, - rhs_var_ref, 0, - count, ctx); - instructions->push_tail(inst); - - rhs_base = count; - - col_idx++; - row_idx = 0; - } - - /* If there is data left in the parameter and components left to be - * set in the destination, emit another assignment. It is possible - * that the assignment could be of a vec4 to the last element of the - * matrix. In this case col_idx==cols, but there is still data - * left in the source parameter. Obviously, don't emit an assignment - * to data outside the destination matrix. - */ - if ((col_idx < cols) && (rhs_base < rhs_components)) { - const unsigned count = rhs_components - rhs_base; - - rhs_var_ref = new(ctx) ir_dereference_variable(rhs_var); - - ir_instruction *inst = assign_to_matrix_column(var, col_idx, - row_idx, - rhs_var_ref, - rhs_base, - count, ctx); - instructions->push_tail(inst); - - row_idx += count; - } - } - } - - return new(ctx) ir_dereference_variable(var); -} - - -ir_rvalue * -emit_inline_record_constructor(const glsl_type *type, - exec_list *instructions, - exec_list *parameters, - void *mem_ctx) -{ - ir_variable *const var = - new(mem_ctx) ir_variable(type, "record_ctor", ir_var_temporary); - ir_dereference_variable *const d = new(mem_ctx) ir_dereference_variable(var); - - instructions->push_tail(var); - - exec_node *node = parameters->head; - for (unsigned i = 0; i < type->length; i++) { - assert(!node->is_tail_sentinel()); - - ir_dereference *const lhs = - new(mem_ctx) ir_dereference_record(d->clone(mem_ctx, NULL), - type->fields.structure[i].name); - - ir_rvalue *const rhs = ((ir_instruction *) node)->as_rvalue(); - assert(rhs != NULL); - - ir_instruction *const assign = new(mem_ctx) ir_assignment(lhs, rhs, NULL); - - instructions->push_tail(assign); - node = node->next; - } - - return d; -} - - -ir_rvalue * -ast_function_expression::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - void *ctx = state; - /* There are three sorts of function calls. - * - * 1. constructors - The first subexpression is an ast_type_specifier. - * 2. methods - Only the .length() method of array types. - * 3. functions - Calls to regular old functions. - * - * Method calls are actually detected when the ast_field_selection - * expression is handled. - */ - if (is_constructor()) { - const ast_type_specifier *type = (ast_type_specifier *) subexpressions[0]; - YYLTYPE loc = type->get_location(); - const char *name; - - const glsl_type *const constructor_type = type->glsl_type(& name, state); - - /* constructor_type can be NULL if a variable with the same name as the - * structure has come into scope. - */ - if (constructor_type == NULL) { - _mesa_glsl_error(& loc, state, "unknown type `%s' (structure name " - "may be shadowed by a variable with the same name)", - type->type_name); - return ir_call::get_error_instruction(ctx); - } - - - /* Constructors for samplers are illegal. - */ - if (constructor_type->is_sampler()) { - _mesa_glsl_error(& loc, state, "cannot construct sampler type `%s'", - constructor_type->name); - return ir_call::get_error_instruction(ctx); - } - - if (constructor_type->is_array()) { - if (state->language_version <= 110) { - _mesa_glsl_error(& loc, state, - "array constructors forbidden in GLSL 1.10"); - return ir_call::get_error_instruction(ctx); - } - - return process_array_constructor(instructions, constructor_type, - & loc, &this->expressions, state); - } - - - /* There are two kinds of constructor call. Constructors for built-in - * language types, such as mat4 and vec2, are free form. The only - * requirement is that the parameters must provide enough values of the - * correct scalar type. Constructors for arrays and structures must - * have the exact number of parameters with matching types in the - * correct order. These constructors follow essentially the same type - * matching rules as functions. - */ - if (constructor_type->is_record()) { - exec_list actual_parameters; - - process_parameters(instructions, &actual_parameters, - &this->expressions, state); - - exec_node *node = actual_parameters.head; - for (unsigned i = 0; i < constructor_type->length; i++) { - ir_rvalue *ir = (ir_rvalue *) node; - - if (node->is_tail_sentinel()) { - _mesa_glsl_error(&loc, state, - "insufficient parameters to constructor " - "for `%s'", - constructor_type->name); - return ir_call::get_error_instruction(ctx); - } - - if (apply_implicit_conversion(constructor_type->fields.structure[i].type, - ir, state)) { - node->replace_with(ir); - } else { - _mesa_glsl_error(&loc, state, - "parameter type mismatch in constructor " - "for `%s.%s' (%s vs %s)", - constructor_type->name, - constructor_type->fields.structure[i].name, - ir->type->name, - constructor_type->fields.structure[i].type->name); - return ir_call::get_error_instruction(ctx);; - } - - node = node->next; - } - - if (!node->is_tail_sentinel()) { - _mesa_glsl_error(&loc, state, "too many parameters in constructor " - "for `%s'", constructor_type->name); - return ir_call::get_error_instruction(ctx); - } - - ir_rvalue *const constant = - constant_record_constructor(constructor_type, &actual_parameters, - state); - - return (constant != NULL) - ? constant - : emit_inline_record_constructor(constructor_type, instructions, - &actual_parameters, state); - } - - if (!constructor_type->is_numeric() && !constructor_type->is_boolean()) - return ir_call::get_error_instruction(ctx); - - /* Total number of components of the type being constructed. */ - const unsigned type_components = constructor_type->components(); - - /* Number of components from parameters that have actually been - * consumed. This is used to perform several kinds of error checking. - */ - unsigned components_used = 0; - - unsigned matrix_parameters = 0; - unsigned nonmatrix_parameters = 0; - exec_list actual_parameters; - - foreach_list (n, &this->expressions) { - ast_node *ast = exec_node_data(ast_node, n, link); - ir_rvalue *result = ast->hir(instructions, state)->as_rvalue(); - - /* From page 50 (page 56 of the PDF) of the GLSL 1.50 spec: - * - * "It is an error to provide extra arguments beyond this - * last used argument." - */ - if (components_used >= type_components) { - _mesa_glsl_error(& loc, state, "too many parameters to `%s' " - "constructor", - constructor_type->name); - return ir_call::get_error_instruction(ctx); - } - - if (!result->type->is_numeric() && !result->type->is_boolean()) { - _mesa_glsl_error(& loc, state, "cannot construct `%s' from a " - "non-numeric data type", - constructor_type->name); - return ir_call::get_error_instruction(ctx); - } - - /* Count the number of matrix and nonmatrix parameters. This - * is used below to enforce some of the constructor rules. - */ - if (result->type->is_matrix()) - matrix_parameters++; - else - nonmatrix_parameters++; - - actual_parameters.push_tail(result); - components_used += result->type->components(); - } - - /* From page 28 (page 34 of the PDF) of the GLSL 1.10 spec: - * - * "It is an error to construct matrices from other matrices. This - * is reserved for future use." - */ - if (state->language_version == 110 && matrix_parameters > 0 - && constructor_type->is_matrix()) { - _mesa_glsl_error(& loc, state, "cannot construct `%s' from a " - "matrix in GLSL 1.10", - constructor_type->name); - return ir_call::get_error_instruction(ctx); - } - - /* From page 50 (page 56 of the PDF) of the GLSL 1.50 spec: - * - * "If a matrix argument is given to a matrix constructor, it is - * an error to have any other arguments." - */ - if ((matrix_parameters > 0) - && ((matrix_parameters + nonmatrix_parameters) > 1) - && constructor_type->is_matrix()) { - _mesa_glsl_error(& loc, state, "for matrix `%s' constructor, " - "matrix must be only parameter", - constructor_type->name); - return ir_call::get_error_instruction(ctx); - } - - /* From page 28 (page 34 of the PDF) of the GLSL 1.10 spec: - * - * "In these cases, there must be enough components provided in the - * arguments to provide an initializer for every component in the - * constructed value." - */ - if (components_used < type_components && components_used != 1 - && matrix_parameters == 0) { - _mesa_glsl_error(& loc, state, "too few components to construct " - "`%s'", - constructor_type->name); - return ir_call::get_error_instruction(ctx); - } - - /* Later, we cast each parameter to the same base type as the - * constructor. Since there are no non-floating point matrices, we - * need to break them up into a series of column vectors. - */ - if (constructor_type->base_type != GLSL_TYPE_FLOAT) { - foreach_list_safe(n, &actual_parameters) { - ir_rvalue *matrix = (ir_rvalue *) n; - - if (!matrix->type->is_matrix()) - continue; - - /* Create a temporary containing the matrix. */ - ir_variable *var = new(ctx) ir_variable(matrix->type, "matrix_tmp", - ir_var_temporary); - instructions->push_tail(var); - instructions->push_tail(new(ctx) ir_assignment(new(ctx) - ir_dereference_variable(var), matrix, NULL)); - var->constant_value = matrix->constant_expression_value(); - - /* Replace the matrix with dereferences of its columns. */ - for (int i = 0; i < matrix->type->matrix_columns; i++) { - matrix->insert_before(new (ctx) ir_dereference_array(var, - new(ctx) ir_constant(i))); - } - matrix->remove(); - } - } - - bool all_parameters_are_constant = true; - - /* Type cast each parameter and, if possible, fold constants.*/ - foreach_list_safe(n, &actual_parameters) { - ir_rvalue *ir = (ir_rvalue *) n; - - const glsl_type *desired_type = - glsl_type::get_instance(constructor_type->base_type, - ir->type->vector_elements, - ir->type->matrix_columns); - ir_rvalue *result = convert_component(ir, desired_type); - - /* Attempt to convert the parameter to a constant valued expression. - * After doing so, track whether or not all the parameters to the - * constructor are trivially constant valued expressions. - */ - ir_rvalue *const constant = result->constant_expression_value(); - - if (constant != NULL) - result = constant; - else - all_parameters_are_constant = false; - - if (result != ir) { - ir->replace_with(result); - } - } - - /* If all of the parameters are trivially constant, create a - * constant representing the complete collection of parameters. - */ - if (all_parameters_are_constant) { - return new(ctx) ir_constant(constructor_type, &actual_parameters); - } else if (constructor_type->is_scalar()) { - return dereference_component((ir_rvalue *) actual_parameters.head, - 0); - } else if (constructor_type->is_vector()) { - return emit_inline_vector_constructor(constructor_type, - instructions, - &actual_parameters, - ctx); - } else { - assert(constructor_type->is_matrix()); - return emit_inline_matrix_constructor(constructor_type, - instructions, - &actual_parameters, - ctx); - } - } else { - const ast_expression *id = subexpressions[0]; - YYLTYPE loc = id->get_location(); - exec_list actual_parameters; - - process_parameters(instructions, &actual_parameters, &this->expressions, - state); - - ir_call *call = NULL; - ir_rvalue *const value = - match_function_by_name(instructions, - id->primary_expression.identifier, - &loc, &actual_parameters, &call, state); - - if (call != NULL) { - /* If a function was found, make sure that none of the 'out' or 'inout' - * parameters violate the extra l-value rules. - */ - ir_function_signature *f = call->get_callee(); - assert(f != NULL); - - exec_node *formal_node = f->parameters.head; - - foreach_list (actual_node, &this->expressions) { - /* Both parameter lists had better be the same length! - */ - assert(!actual_node->is_tail_sentinel()); - - const ir_variable *const formal_parameter = - (ir_variable *) formal_node; - const ast_expression *const actual_parameter = - exec_node_data(ast_expression, actual_node, link); - - if ((formal_parameter->mode == ir_var_out - || formal_parameter->mode == ir_var_inout) - && actual_parameter->non_lvalue_description != NULL) { - YYLTYPE loc = actual_parameter->get_location(); - - _mesa_glsl_error(&loc, state, - "function parameter '%s %s' references a %s", - (formal_parameter->mode == ir_var_out) - ? "out" : "inout", - formal_parameter->name, - actual_parameter->non_lvalue_description); - return ir_call::get_error_instruction(ctx); - } - - /* Only advance the formal_node pointer here because the - * foreach_list business already advances actual_node. - */ - formal_node = formal_node->next; - } - } - - return value; - } - - return ir_call::get_error_instruction(ctx); -} diff --git a/dll/opengl/mesa/src/glsl/ast_to_hir.cpp b/dll/opengl/mesa/src/glsl/ast_to_hir.cpp deleted file mode 100644 index c77511e20fe..00000000000 --- a/dll/opengl/mesa/src/glsl/ast_to_hir.cpp +++ /dev/null @@ -1,3992 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file ast_to_hir.c - * Convert abstract syntax to to high-level intermediate reprensentation (HIR). - * - * During the conversion to HIR, the majority of the symantic checking is - * preformed on the program. This includes: - * - * * Symbol table management - * * Type checking - * * Function binding - * - * The majority of this work could be done during parsing, and the parser could - * probably generate HIR directly. However, this results in frequent changes - * to the parser code. Since we do not assume that every system this complier - * is built on will have Flex and Bison installed, we have to store the code - * generated by these tools in our version control system. In other parts of - * the system we've seen problems where a parser was changed but the generated - * code was not committed, merge conflicts where created because two developers - * had slightly different versions of Bison installed, etc. - * - * I have also noticed that running Bison generated parsers in GDB is very - * irritating. When you get a segfault on '$$ = $1->foo', you can't very - * well 'print $1' in GDB. - * - * As a result, my preference is to put as little C code as possible in the - * parser (and lexer) sources. - */ - -#include "main/core.h" /* for struct gl_extensions */ -#include "glsl_symbol_table.h" -#include "glsl_parser_extras.h" -#include "ast.h" -#include "glsl_types.h" -#include "program/hash_table.h" -#include "ir.h" - -void -_mesa_ast_to_hir(exec_list *instructions, struct _mesa_glsl_parse_state *state) -{ - _mesa_glsl_initialize_variables(instructions, state); - - state->symbols->language_version = state->language_version; - - state->current_function = NULL; - - state->toplevel_ir = instructions; - - /* Section 4.2 of the GLSL 1.20 specification states: - * "The built-in functions are scoped in a scope outside the global scope - * users declare global variables in. That is, a shader's global scope, - * available for user-defined functions and global variables, is nested - * inside the scope containing the built-in functions." - * - * Since built-in functions like ftransform() access built-in variables, - * it follows that those must be in the outer scope as well. - * - * We push scope here to create this nesting effect...but don't pop. - * This way, a shader's globals are still in the symbol table for use - * by the linker. - */ - state->symbols->push_scope(); - - foreach_list_typed (ast_node, ast, link, & state->translation_unit) - ast->hir(instructions, state); - - detect_recursion_unlinked(state, instructions); - - state->toplevel_ir = NULL; -} - - -/** - * If a conversion is available, convert one operand to a different type - * - * The \c from \c ir_rvalue is converted "in place". - * - * \param to Type that the operand it to be converted to - * \param from Operand that is being converted - * \param state GLSL compiler state - * - * \return - * If a conversion is possible (or unnecessary), \c true is returned. - * Otherwise \c false is returned. - */ -bool -apply_implicit_conversion(const glsl_type *to, ir_rvalue * &from, - struct _mesa_glsl_parse_state *state) -{ - void *ctx = state; - if (to->base_type == from->type->base_type) - return true; - - /* This conversion was added in GLSL 1.20. If the compilation mode is - * GLSL 1.10, the conversion is skipped. - */ - if (state->language_version < 120) - return false; - - /* From page 27 (page 33 of the PDF) of the GLSL 1.50 spec: - * - * "There are no implicit array or structure conversions. For - * example, an array of int cannot be implicitly converted to an - * array of float. There are no implicit conversions between - * signed and unsigned integers." - */ - /* FINISHME: The above comment is partially a lie. There is int/uint - * FINISHME: conversion for immediate constants. - */ - if (!to->is_float() || !from->type->is_numeric()) - return false; - - /* Convert to a floating point type with the same number of components - * as the original type - i.e. int to float, not int to vec4. - */ - to = glsl_type::get_instance(GLSL_TYPE_FLOAT, from->type->vector_elements, - from->type->matrix_columns); - - switch (from->type->base_type) { - case GLSL_TYPE_INT: - from = new(ctx) ir_expression(ir_unop_i2f, to, from, NULL); - break; - case GLSL_TYPE_UINT: - from = new(ctx) ir_expression(ir_unop_u2f, to, from, NULL); - break; - case GLSL_TYPE_BOOL: - from = new(ctx) ir_expression(ir_unop_b2f, to, from, NULL); - break; - default: - assert(0); - } - - return true; -} - - -static const struct glsl_type * -arithmetic_result_type(ir_rvalue * &value_a, ir_rvalue * &value_b, - bool multiply, - struct _mesa_glsl_parse_state *state, YYLTYPE *loc) -{ - const glsl_type *type_a = value_a->type; - const glsl_type *type_b = value_b->type; - - /* From GLSL 1.50 spec, page 56: - * - * "The arithmetic binary operators add (+), subtract (-), - * multiply (*), and divide (/) operate on integer and - * floating-point scalars, vectors, and matrices." - */ - if (!type_a->is_numeric() || !type_b->is_numeric()) { - _mesa_glsl_error(loc, state, - "Operands to arithmetic operators must be numeric"); - return glsl_type::error_type; - } - - - /* "If one operand is floating-point based and the other is - * not, then the conversions from Section 4.1.10 "Implicit - * Conversions" are applied to the non-floating-point-based operand." - */ - if (!apply_implicit_conversion(type_a, value_b, state) - && !apply_implicit_conversion(type_b, value_a, state)) { - _mesa_glsl_error(loc, state, - "Could not implicitly convert operands to " - "arithmetic operator"); - return glsl_type::error_type; - } - type_a = value_a->type; - type_b = value_b->type; - - /* "If the operands are integer types, they must both be signed or - * both be unsigned." - * - * From this rule and the preceeding conversion it can be inferred that - * both types must be GLSL_TYPE_FLOAT, or GLSL_TYPE_UINT, or GLSL_TYPE_INT. - * The is_numeric check above already filtered out the case where either - * type is not one of these, so now the base types need only be tested for - * equality. - */ - if (type_a->base_type != type_b->base_type) { - _mesa_glsl_error(loc, state, - "base type mismatch for arithmetic operator"); - return glsl_type::error_type; - } - - /* "All arithmetic binary operators result in the same fundamental type - * (signed integer, unsigned integer, or floating-point) as the - * operands they operate on, after operand type conversion. After - * conversion, the following cases are valid - * - * * The two operands are scalars. In this case the operation is - * applied, resulting in a scalar." - */ - if (type_a->is_scalar() && type_b->is_scalar()) - return type_a; - - /* "* One operand is a scalar, and the other is a vector or matrix. - * In this case, the scalar operation is applied independently to each - * component of the vector or matrix, resulting in the same size - * vector or matrix." - */ - if (type_a->is_scalar()) { - if (!type_b->is_scalar()) - return type_b; - } else if (type_b->is_scalar()) { - return type_a; - } - - /* All of the combinations of , , - * , , and have been - * handled. - */ - assert(!type_a->is_scalar()); - assert(!type_b->is_scalar()); - - /* "* The two operands are vectors of the same size. In this case, the - * operation is done component-wise resulting in the same size - * vector." - */ - if (type_a->is_vector() && type_b->is_vector()) { - if (type_a == type_b) { - return type_a; - } else { - _mesa_glsl_error(loc, state, - "vector size mismatch for arithmetic operator"); - return glsl_type::error_type; - } - } - - /* All of the combinations of , , - * , , , and - * have been handled. At least one of the operands must - * be matrix. Further, since there are no integer matrix types, the base - * type of both operands must be float. - */ - assert(type_a->is_matrix() || type_b->is_matrix()); - assert(type_a->base_type == GLSL_TYPE_FLOAT); - assert(type_b->base_type == GLSL_TYPE_FLOAT); - - /* "* The operator is add (+), subtract (-), or divide (/), and the - * operands are matrices with the same number of rows and the same - * number of columns. In this case, the operation is done component- - * wise resulting in the same size matrix." - * * The operator is multiply (*), where both operands are matrices or - * one operand is a vector and the other a matrix. A right vector - * operand is treated as a column vector and a left vector operand as a - * row vector. In all these cases, it is required that the number of - * columns of the left operand is equal to the number of rows of the - * right operand. Then, the multiply (*) operation does a linear - * algebraic multiply, yielding an object that has the same number of - * rows as the left operand and the same number of columns as the right - * operand. Section 5.10 "Vector and Matrix Operations" explains in - * more detail how vectors and matrices are operated on." - */ - if (! multiply) { - if (type_a == type_b) - return type_a; - } else { - if (type_a->is_matrix() && type_b->is_matrix()) { - /* Matrix multiply. The columns of A must match the rows of B. Given - * the other previously tested constraints, this means the vector type - * of a row from A must be the same as the vector type of a column from - * B. - */ - if (type_a->row_type() == type_b->column_type()) { - /* The resulting matrix has the number of columns of matrix B and - * the number of rows of matrix A. We get the row count of A by - * looking at the size of a vector that makes up a column. The - * transpose (size of a row) is done for B. - */ - const glsl_type *const type = - glsl_type::get_instance(type_a->base_type, - type_a->column_type()->vector_elements, - type_b->row_type()->vector_elements); - assert(type != glsl_type::error_type); - - return type; - } - } else if (type_a->is_matrix()) { - /* A is a matrix and B is a column vector. Columns of A must match - * rows of B. Given the other previously tested constraints, this - * means the vector type of a row from A must be the same as the - * vector the type of B. - */ - if (type_a->row_type() == type_b) { - /* The resulting vector has a number of elements equal to - * the number of rows of matrix A. */ - const glsl_type *const type = - glsl_type::get_instance(type_a->base_type, - type_a->column_type()->vector_elements, - 1); - assert(type != glsl_type::error_type); - - return type; - } - } else { - assert(type_b->is_matrix()); - - /* A is a row vector and B is a matrix. Columns of A must match rows - * of B. Given the other previously tested constraints, this means - * the type of A must be the same as the vector type of a column from - * B. - */ - if (type_a == type_b->column_type()) { - /* The resulting vector has a number of elements equal to - * the number of columns of matrix B. */ - const glsl_type *const type = - glsl_type::get_instance(type_a->base_type, - type_b->row_type()->vector_elements, - 1); - assert(type != glsl_type::error_type); - - return type; - } - } - - _mesa_glsl_error(loc, state, "size mismatch for matrix multiplication"); - return glsl_type::error_type; - } - - - /* "All other cases are illegal." - */ - _mesa_glsl_error(loc, state, "type mismatch"); - return glsl_type::error_type; -} - - -static const struct glsl_type * -unary_arithmetic_result_type(const struct glsl_type *type, - struct _mesa_glsl_parse_state *state, YYLTYPE *loc) -{ - /* From GLSL 1.50 spec, page 57: - * - * "The arithmetic unary operators negate (-), post- and pre-increment - * and decrement (-- and ++) operate on integer or floating-point - * values (including vectors and matrices). All unary operators work - * component-wise on their operands. These result with the same type - * they operated on." - */ - if (!type->is_numeric()) { - _mesa_glsl_error(loc, state, - "Operands to arithmetic operators must be numeric"); - return glsl_type::error_type; - } - - return type; -} - -/** - * \brief Return the result type of a bit-logic operation. - * - * If the given types to the bit-logic operator are invalid, return - * glsl_type::error_type. - * - * \param type_a Type of LHS of bit-logic op - * \param type_b Type of RHS of bit-logic op - */ -static const struct glsl_type * -bit_logic_result_type(const struct glsl_type *type_a, - const struct glsl_type *type_b, - ast_operators op, - struct _mesa_glsl_parse_state *state, YYLTYPE *loc) -{ - if (state->language_version < 130) { - _mesa_glsl_error(loc, state, "bit operations require GLSL 1.30"); - return glsl_type::error_type; - } - - /* From page 50 (page 56 of PDF) of GLSL 1.30 spec: - * - * "The bitwise operators and (&), exclusive-or (^), and inclusive-or - * (|). The operands must be of type signed or unsigned integers or - * integer vectors." - */ - if (!type_a->is_integer()) { - _mesa_glsl_error(loc, state, "LHS of `%s' must be an integer", - ast_expression::operator_string(op)); - return glsl_type::error_type; - } - if (!type_b->is_integer()) { - _mesa_glsl_error(loc, state, "RHS of `%s' must be an integer", - ast_expression::operator_string(op)); - return glsl_type::error_type; - } - - /* "The fundamental types of the operands (signed or unsigned) must - * match," - */ - if (type_a->base_type != type_b->base_type) { - _mesa_glsl_error(loc, state, "operands of `%s' must have the same " - "base type", ast_expression::operator_string(op)); - return glsl_type::error_type; - } - - /* "The operands cannot be vectors of differing size." */ - if (type_a->is_vector() && - type_b->is_vector() && - type_a->vector_elements != type_b->vector_elements) { - _mesa_glsl_error(loc, state, "operands of `%s' cannot be vectors of " - "different sizes", ast_expression::operator_string(op)); - return glsl_type::error_type; - } - - /* "If one operand is a scalar and the other a vector, the scalar is - * applied component-wise to the vector, resulting in the same type as - * the vector. The fundamental types of the operands [...] will be the - * resulting fundamental type." - */ - if (type_a->is_scalar()) - return type_b; - else - return type_a; -} - -static const struct glsl_type * -modulus_result_type(const struct glsl_type *type_a, - const struct glsl_type *type_b, - struct _mesa_glsl_parse_state *state, YYLTYPE *loc) -{ - if (state->language_version < 130) { - _mesa_glsl_error(loc, state, - "operator '%%' is reserved in %s", - state->version_string); - return glsl_type::error_type; - } - - /* From GLSL 1.50 spec, page 56: - * "The operator modulus (%) operates on signed or unsigned integers or - * integer vectors. The operand types must both be signed or both be - * unsigned." - */ - if (!type_a->is_integer()) { - _mesa_glsl_error(loc, state, "LHS of operator %% must be an integer."); - return glsl_type::error_type; - } - if (!type_b->is_integer()) { - _mesa_glsl_error(loc, state, "RHS of operator %% must be an integer."); - return glsl_type::error_type; - } - if (type_a->base_type != type_b->base_type) { - _mesa_glsl_error(loc, state, - "operands of %% must have the same base type"); - return glsl_type::error_type; - } - - /* "The operands cannot be vectors of differing size. If one operand is - * a scalar and the other vector, then the scalar is applied component- - * wise to the vector, resulting in the same type as the vector. If both - * are vectors of the same size, the result is computed component-wise." - */ - if (type_a->is_vector()) { - if (!type_b->is_vector() - || (type_a->vector_elements == type_b->vector_elements)) - return type_a; - } else - return type_b; - - /* "The operator modulus (%) is not defined for any other data types - * (non-integer types)." - */ - _mesa_glsl_error(loc, state, "type mismatch"); - return glsl_type::error_type; -} - - -static const struct glsl_type * -relational_result_type(ir_rvalue * &value_a, ir_rvalue * &value_b, - struct _mesa_glsl_parse_state *state, YYLTYPE *loc) -{ - const glsl_type *type_a = value_a->type; - const glsl_type *type_b = value_b->type; - - /* From GLSL 1.50 spec, page 56: - * "The relational operators greater than (>), less than (<), greater - * than or equal (>=), and less than or equal (<=) operate only on - * scalar integer and scalar floating-point expressions." - */ - if (!type_a->is_numeric() - || !type_b->is_numeric() - || !type_a->is_scalar() - || !type_b->is_scalar()) { - _mesa_glsl_error(loc, state, - "Operands to relational operators must be scalar and " - "numeric"); - return glsl_type::error_type; - } - - /* "Either the operands' types must match, or the conversions from - * Section 4.1.10 "Implicit Conversions" will be applied to the integer - * operand, after which the types must match." - */ - if (!apply_implicit_conversion(type_a, value_b, state) - && !apply_implicit_conversion(type_b, value_a, state)) { - _mesa_glsl_error(loc, state, - "Could not implicitly convert operands to " - "relational operator"); - return glsl_type::error_type; - } - type_a = value_a->type; - type_b = value_b->type; - - if (type_a->base_type != type_b->base_type) { - _mesa_glsl_error(loc, state, "base type mismatch"); - return glsl_type::error_type; - } - - /* "The result is scalar Boolean." - */ - return glsl_type::bool_type; -} - -/** - * \brief Return the result type of a bit-shift operation. - * - * If the given types to the bit-shift operator are invalid, return - * glsl_type::error_type. - * - * \param type_a Type of LHS of bit-shift op - * \param type_b Type of RHS of bit-shift op - */ -static const struct glsl_type * -shift_result_type(const struct glsl_type *type_a, - const struct glsl_type *type_b, - ast_operators op, - struct _mesa_glsl_parse_state *state, YYLTYPE *loc) -{ - if (state->language_version < 130) { - _mesa_glsl_error(loc, state, "bit operations require GLSL 1.30"); - return glsl_type::error_type; - } - - /* From page 50 (page 56 of the PDF) of the GLSL 1.30 spec: - * - * "The shift operators (<<) and (>>). For both operators, the operands - * must be signed or unsigned integers or integer vectors. One operand - * can be signed while the other is unsigned." - */ - if (!type_a->is_integer()) { - _mesa_glsl_error(loc, state, "LHS of operator %s must be an integer or " - "integer vector", ast_expression::operator_string(op)); - return glsl_type::error_type; - - } - if (!type_b->is_integer()) { - _mesa_glsl_error(loc, state, "RHS of operator %s must be an integer or " - "integer vector", ast_expression::operator_string(op)); - return glsl_type::error_type; - } - - /* "If the first operand is a scalar, the second operand has to be - * a scalar as well." - */ - if (type_a->is_scalar() && !type_b->is_scalar()) { - _mesa_glsl_error(loc, state, "If the first operand of %s is scalar, the " - "second must be scalar as well", - ast_expression::operator_string(op)); - return glsl_type::error_type; - } - - /* If both operands are vectors, check that they have same number of - * elements. - */ - if (type_a->is_vector() && - type_b->is_vector() && - type_a->vector_elements != type_b->vector_elements) { - _mesa_glsl_error(loc, state, "Vector operands to operator %s must " - "have same number of elements", - ast_expression::operator_string(op)); - return glsl_type::error_type; - } - - /* "In all cases, the resulting type will be the same type as the left - * operand." - */ - return type_a; -} - -/** - * Validates that a value can be assigned to a location with a specified type - * - * Validates that \c rhs can be assigned to some location. If the types are - * not an exact match but an automatic conversion is possible, \c rhs will be - * converted. - * - * \return - * \c NULL if \c rhs cannot be assigned to a location with type \c lhs_type. - * Otherwise the actual RHS to be assigned will be returned. This may be - * \c rhs, or it may be \c rhs after some type conversion. - * - * \note - * In addition to being used for assignments, this function is used to - * type-check return values. - */ -ir_rvalue * -validate_assignment(struct _mesa_glsl_parse_state *state, - const glsl_type *lhs_type, ir_rvalue *rhs, - bool is_initializer) -{ - /* If there is already some error in the RHS, just return it. Anything - * else will lead to an avalanche of error message back to the user. - */ - if (rhs->type->is_error()) - return rhs; - - /* If the types are identical, the assignment can trivially proceed. - */ - if (rhs->type == lhs_type) - return rhs; - - /* If the array element types are the same and the size of the LHS is zero, - * the assignment is okay for initializers embedded in variable - * declarations. - * - * Note: Whole-array assignments are not permitted in GLSL 1.10, but this - * is handled by ir_dereference::is_lvalue. - */ - if (is_initializer && lhs_type->is_array() && rhs->type->is_array() - && (lhs_type->element_type() == rhs->type->element_type()) - && (lhs_type->array_size() == 0)) { - return rhs; - } - - /* Check for implicit conversion in GLSL 1.20 */ - if (apply_implicit_conversion(lhs_type, rhs, state)) { - if (rhs->type == lhs_type) - return rhs; - } - - return NULL; -} - -static void -mark_whole_array_access(ir_rvalue *access) -{ - ir_dereference_variable *deref = access->as_dereference_variable(); - - if (deref && deref->var) { - deref->var->max_array_access = deref->type->length - 1; - } -} - -ir_rvalue * -do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state, - const char *non_lvalue_description, - ir_rvalue *lhs, ir_rvalue *rhs, bool is_initializer, - YYLTYPE lhs_loc) -{ - void *ctx = state; - bool error_emitted = (lhs->type->is_error() || rhs->type->is_error()); - - if (!error_emitted) { - if (non_lvalue_description != NULL) { - _mesa_glsl_error(&lhs_loc, state, - "assignment to %s", - non_lvalue_description); - error_emitted = true; - } else if (lhs->variable_referenced() != NULL - && lhs->variable_referenced()->read_only) { - _mesa_glsl_error(&lhs_loc, state, - "assignment to read-only variable '%s'", - lhs->variable_referenced()->name); - error_emitted = true; - - } else if (state->language_version <= 110 && lhs->type->is_array()) { - /* From page 32 (page 38 of the PDF) of the GLSL 1.10 spec: - * - * "Other binary or unary expressions, non-dereferenced - * arrays, function names, swizzles with repeated fields, - * and constants cannot be l-values." - */ - _mesa_glsl_error(&lhs_loc, state, "whole array assignment is not " - "allowed in GLSL 1.10 or GLSL ES 1.00."); - error_emitted = true; - } else if (!lhs->is_lvalue()) { - _mesa_glsl_error(& lhs_loc, state, "non-lvalue in assignment"); - error_emitted = true; - } - } - - ir_rvalue *new_rhs = - validate_assignment(state, lhs->type, rhs, is_initializer); - if (new_rhs == NULL) { - _mesa_glsl_error(& lhs_loc, state, "type mismatch"); - } else { - rhs = new_rhs; - - /* If the LHS array was not declared with a size, it takes it size from - * the RHS. If the LHS is an l-value and a whole array, it must be a - * dereference of a variable. Any other case would require that the LHS - * is either not an l-value or not a whole array. - */ - if (lhs->type->array_size() == 0) { - ir_dereference *const d = lhs->as_dereference(); - - assert(d != NULL); - - ir_variable *const var = d->variable_referenced(); - - assert(var != NULL); - - if (var->max_array_access >= unsigned(rhs->type->array_size())) { - /* FINISHME: This should actually log the location of the RHS. */ - _mesa_glsl_error(& lhs_loc, state, "array size must be > %u due to " - "previous access", - var->max_array_access); - } - - var->type = glsl_type::get_array_instance(lhs->type->element_type(), - rhs->type->array_size()); - d->type = var->type; - } - mark_whole_array_access(rhs); - mark_whole_array_access(lhs); - } - - /* Most callers of do_assignment (assign, add_assign, pre_inc/dec, - * but not post_inc) need the converted assigned value as an rvalue - * to handle things like: - * - * i = j += 1; - * - * So we always just store the computed value being assigned to a - * temporary and return a deref of that temporary. If the rvalue - * ends up not being used, the temp will get copy-propagated out. - */ - ir_variable *var = new(ctx) ir_variable(rhs->type, "assignment_tmp", - ir_var_temporary); - ir_dereference_variable *deref_var = new(ctx) ir_dereference_variable(var); - instructions->push_tail(var); - instructions->push_tail(new(ctx) ir_assignment(deref_var, - rhs, - NULL)); - deref_var = new(ctx) ir_dereference_variable(var); - - if (!error_emitted) - instructions->push_tail(new(ctx) ir_assignment(lhs, deref_var, NULL)); - - return new(ctx) ir_dereference_variable(var); -} - -static ir_rvalue * -get_lvalue_copy(exec_list *instructions, ir_rvalue *lvalue) -{ - void *ctx = ralloc_parent(lvalue); - ir_variable *var; - - var = new(ctx) ir_variable(lvalue->type, "_post_incdec_tmp", - ir_var_temporary); - instructions->push_tail(var); - var->mode = ir_var_auto; - - instructions->push_tail(new(ctx) ir_assignment(new(ctx) ir_dereference_variable(var), - lvalue, NULL)); - - return new(ctx) ir_dereference_variable(var); -} - - -ir_rvalue * -ast_node::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - (void) instructions; - (void) state; - - return NULL; -} - -static ir_rvalue * -do_comparison(void *mem_ctx, int operation, ir_rvalue *op0, ir_rvalue *op1) -{ - int join_op; - ir_rvalue *cmp = NULL; - - if (operation == ir_binop_all_equal) - join_op = ir_binop_logic_and; - else - join_op = ir_binop_logic_or; - - switch (op0->type->base_type) { - case GLSL_TYPE_FLOAT: - case GLSL_TYPE_UINT: - case GLSL_TYPE_INT: - case GLSL_TYPE_BOOL: - return new(mem_ctx) ir_expression(operation, op0, op1); - - case GLSL_TYPE_ARRAY: { - for (unsigned int i = 0; i < op0->type->length; i++) { - ir_rvalue *e0, *e1, *result; - - e0 = new(mem_ctx) ir_dereference_array(op0->clone(mem_ctx, NULL), - new(mem_ctx) ir_constant(i)); - e1 = new(mem_ctx) ir_dereference_array(op1->clone(mem_ctx, NULL), - new(mem_ctx) ir_constant(i)); - result = do_comparison(mem_ctx, operation, e0, e1); - - if (cmp) { - cmp = new(mem_ctx) ir_expression(join_op, cmp, result); - } else { - cmp = result; - } - } - - mark_whole_array_access(op0); - mark_whole_array_access(op1); - break; - } - - case GLSL_TYPE_STRUCT: { - for (unsigned int i = 0; i < op0->type->length; i++) { - ir_rvalue *e0, *e1, *result; - const char *field_name = op0->type->fields.structure[i].name; - - e0 = new(mem_ctx) ir_dereference_record(op0->clone(mem_ctx, NULL), - field_name); - e1 = new(mem_ctx) ir_dereference_record(op1->clone(mem_ctx, NULL), - field_name); - result = do_comparison(mem_ctx, operation, e0, e1); - - if (cmp) { - cmp = new(mem_ctx) ir_expression(join_op, cmp, result); - } else { - cmp = result; - } - } - break; - } - - case GLSL_TYPE_ERROR: - case GLSL_TYPE_VOID: - case GLSL_TYPE_SAMPLER: - /* I assume a comparison of a struct containing a sampler just - * ignores the sampler present in the type. - */ - break; - - default: - assert(!"Should not get here."); - break; - } - - if (cmp == NULL) - cmp = new(mem_ctx) ir_constant(true); - - return cmp; -} - -/* For logical operations, we want to ensure that the operands are - * scalar booleans. If it isn't, emit an error and return a constant - * boolean to avoid triggering cascading error messages. - */ -ir_rvalue * -get_scalar_boolean_operand(exec_list *instructions, - struct _mesa_glsl_parse_state *state, - ast_expression *parent_expr, - int operand, - const char *operand_name, - bool *error_emitted) -{ - ast_expression *expr = parent_expr->subexpressions[operand]; - void *ctx = state; - ir_rvalue *val = expr->hir(instructions, state); - - if (val->type->is_boolean() && val->type->is_scalar()) - return val; - - if (!*error_emitted) { - YYLTYPE loc = expr->get_location(); - _mesa_glsl_error(&loc, state, "%s of `%s' must be scalar boolean", - operand_name, - parent_expr->operator_string(parent_expr->oper)); - *error_emitted = true; - } - - return new(ctx) ir_constant(true); -} - -/** - * If name refers to a builtin array whose maximum allowed size is less than - * size, report an error and return true. Otherwise return false. - */ -static bool -check_builtin_array_max_size(const char *name, unsigned size, - YYLTYPE loc, struct _mesa_glsl_parse_state *state) -{ - if ((strcmp("gl_TexCoord", name) == 0) - && (size > state->Const.MaxTextureCoords)) { - /* From page 54 (page 60 of the PDF) of the GLSL 1.20 spec: - * - * "The size [of gl_TexCoord] can be at most - * gl_MaxTextureCoords." - */ - _mesa_glsl_error(&loc, state, "`gl_TexCoord' array size cannot " - "be larger than gl_MaxTextureCoords (%u)\n", - state->Const.MaxTextureCoords); - return true; - } else if (strcmp("gl_ClipDistance", name) == 0 - && size > state->Const.MaxClipPlanes) { - /* From section 7.1 (Vertex Shader Special Variables) of the - * GLSL 1.30 spec: - * - * "The gl_ClipDistance array is predeclared as unsized and - * must be sized by the shader either redeclaring it with a - * size or indexing it only with integral constant - * expressions. ... The size can be at most - * gl_MaxClipDistances." - */ - _mesa_glsl_error(&loc, state, "`gl_ClipDistance' array size cannot " - "be larger than gl_MaxClipDistances (%u)\n", - state->Const.MaxClipPlanes); - return true; - } - return false; -} - -/** - * Create the constant 1, of a which is appropriate for incrementing and - * decrementing values of the given GLSL type. For example, if type is vec4, - * this creates a constant value of 1.0 having type float. - * - * If the given type is invalid for increment and decrement operators, return - * a floating point 1--the error will be detected later. - */ -static ir_rvalue * -constant_one_for_inc_dec(void *ctx, const glsl_type *type) -{ - switch (type->base_type) { - case GLSL_TYPE_UINT: - return new(ctx) ir_constant((unsigned) 1); - case GLSL_TYPE_INT: - return new(ctx) ir_constant(1); - default: - case GLSL_TYPE_FLOAT: - return new(ctx) ir_constant(1.0f); - } -} - -ir_rvalue * -ast_expression::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - void *ctx = state; - static const int operations[AST_NUM_OPERATORS] = { - -1, /* ast_assign doesn't convert to ir_expression. */ - -1, /* ast_plus doesn't convert to ir_expression. */ - ir_unop_neg, - ir_binop_add, - ir_binop_sub, - ir_binop_mul, - ir_binop_div, - ir_binop_mod, - ir_binop_lshift, - ir_binop_rshift, - ir_binop_less, - ir_binop_greater, - ir_binop_lequal, - ir_binop_gequal, - ir_binop_all_equal, - ir_binop_any_nequal, - ir_binop_bit_and, - ir_binop_bit_xor, - ir_binop_bit_or, - ir_unop_bit_not, - ir_binop_logic_and, - ir_binop_logic_xor, - ir_binop_logic_or, - ir_unop_logic_not, - - /* Note: The following block of expression types actually convert - * to multiple IR instructions. - */ - ir_binop_mul, /* ast_mul_assign */ - ir_binop_div, /* ast_div_assign */ - ir_binop_mod, /* ast_mod_assign */ - ir_binop_add, /* ast_add_assign */ - ir_binop_sub, /* ast_sub_assign */ - ir_binop_lshift, /* ast_ls_assign */ - ir_binop_rshift, /* ast_rs_assign */ - ir_binop_bit_and, /* ast_and_assign */ - ir_binop_bit_xor, /* ast_xor_assign */ - ir_binop_bit_or, /* ast_or_assign */ - - -1, /* ast_conditional doesn't convert to ir_expression. */ - ir_binop_add, /* ast_pre_inc. */ - ir_binop_sub, /* ast_pre_dec. */ - ir_binop_add, /* ast_post_inc. */ - ir_binop_sub, /* ast_post_dec. */ - -1, /* ast_field_selection doesn't conv to ir_expression. */ - -1, /* ast_array_index doesn't convert to ir_expression. */ - -1, /* ast_function_call doesn't conv to ir_expression. */ - -1, /* ast_identifier doesn't convert to ir_expression. */ - -1, /* ast_int_constant doesn't convert to ir_expression. */ - -1, /* ast_uint_constant doesn't conv to ir_expression. */ - -1, /* ast_float_constant doesn't conv to ir_expression. */ - -1, /* ast_bool_constant doesn't conv to ir_expression. */ - -1, /* ast_sequence doesn't convert to ir_expression. */ - }; - ir_rvalue *result = NULL; - ir_rvalue *op[3]; - const struct glsl_type *type; /* a temporary variable for switch cases */ - bool error_emitted = false; - YYLTYPE loc; - - loc = this->get_location(); - - switch (this->oper) { - case ast_assign: { - op[0] = this->subexpressions[0]->hir(instructions, state); - op[1] = this->subexpressions[1]->hir(instructions, state); - - result = do_assignment(instructions, state, - this->subexpressions[0]->non_lvalue_description, - op[0], op[1], false, - this->subexpressions[0]->get_location()); - error_emitted = result->type->is_error(); - break; - } - - case ast_plus: - op[0] = this->subexpressions[0]->hir(instructions, state); - - type = unary_arithmetic_result_type(op[0]->type, state, & loc); - - error_emitted = type->is_error(); - - result = op[0]; - break; - - case ast_neg: - op[0] = this->subexpressions[0]->hir(instructions, state); - - type = unary_arithmetic_result_type(op[0]->type, state, & loc); - - error_emitted = type->is_error(); - - result = new(ctx) ir_expression(operations[this->oper], type, - op[0], NULL); - break; - - case ast_add: - case ast_sub: - case ast_mul: - case ast_div: - op[0] = this->subexpressions[0]->hir(instructions, state); - op[1] = this->subexpressions[1]->hir(instructions, state); - - type = arithmetic_result_type(op[0], op[1], - (this->oper == ast_mul), - state, & loc); - error_emitted = type->is_error(); - - result = new(ctx) ir_expression(operations[this->oper], type, - op[0], op[1]); - break; - - case ast_mod: - op[0] = this->subexpressions[0]->hir(instructions, state); - op[1] = this->subexpressions[1]->hir(instructions, state); - - type = modulus_result_type(op[0]->type, op[1]->type, state, & loc); - - assert(operations[this->oper] == ir_binop_mod); - - result = new(ctx) ir_expression(operations[this->oper], type, - op[0], op[1]); - error_emitted = type->is_error(); - break; - - case ast_lshift: - case ast_rshift: - if (state->language_version < 130) { - _mesa_glsl_error(&loc, state, "operator %s requires GLSL 1.30", - operator_string(this->oper)); - error_emitted = true; - } - - op[0] = this->subexpressions[0]->hir(instructions, state); - op[1] = this->subexpressions[1]->hir(instructions, state); - type = shift_result_type(op[0]->type, op[1]->type, this->oper, state, - &loc); - result = new(ctx) ir_expression(operations[this->oper], type, - op[0], op[1]); - error_emitted = op[0]->type->is_error() || op[1]->type->is_error(); - break; - - case ast_less: - case ast_greater: - case ast_lequal: - case ast_gequal: - op[0] = this->subexpressions[0]->hir(instructions, state); - op[1] = this->subexpressions[1]->hir(instructions, state); - - type = relational_result_type(op[0], op[1], state, & loc); - - /* The relational operators must either generate an error or result - * in a scalar boolean. See page 57 of the GLSL 1.50 spec. - */ - assert(type->is_error() - || ((type->base_type == GLSL_TYPE_BOOL) - && type->is_scalar())); - - result = new(ctx) ir_expression(operations[this->oper], type, - op[0], op[1]); - error_emitted = type->is_error(); - break; - - case ast_nequal: - case ast_equal: - op[0] = this->subexpressions[0]->hir(instructions, state); - op[1] = this->subexpressions[1]->hir(instructions, state); - - /* From page 58 (page 64 of the PDF) of the GLSL 1.50 spec: - * - * "The equality operators equal (==), and not equal (!=) - * operate on all types. They result in a scalar Boolean. If - * the operand types do not match, then there must be a - * conversion from Section 4.1.10 "Implicit Conversions" - * applied to one operand that can make them match, in which - * case this conversion is done." - */ - if ((!apply_implicit_conversion(op[0]->type, op[1], state) - && !apply_implicit_conversion(op[1]->type, op[0], state)) - || (op[0]->type != op[1]->type)) { - _mesa_glsl_error(& loc, state, "operands of `%s' must have the same " - "type", (this->oper == ast_equal) ? "==" : "!="); - error_emitted = true; - } else if ((state->language_version <= 110) - && (op[0]->type->is_array() || op[1]->type->is_array())) { - _mesa_glsl_error(& loc, state, "array comparisons forbidden in " - "GLSL 1.10"); - error_emitted = true; - } - - if (error_emitted) { - result = new(ctx) ir_constant(false); - } else { - result = do_comparison(ctx, operations[this->oper], op[0], op[1]); - assert(result->type == glsl_type::bool_type); - } - break; - - case ast_bit_and: - case ast_bit_xor: - case ast_bit_or: - op[0] = this->subexpressions[0]->hir(instructions, state); - op[1] = this->subexpressions[1]->hir(instructions, state); - type = bit_logic_result_type(op[0]->type, op[1]->type, this->oper, - state, &loc); - result = new(ctx) ir_expression(operations[this->oper], type, - op[0], op[1]); - error_emitted = op[0]->type->is_error() || op[1]->type->is_error(); - break; - - case ast_bit_not: - op[0] = this->subexpressions[0]->hir(instructions, state); - - if (state->language_version < 130) { - _mesa_glsl_error(&loc, state, "bit-wise operations require GLSL 1.30"); - error_emitted = true; - } - - if (!op[0]->type->is_integer()) { - _mesa_glsl_error(&loc, state, "operand of `~' must be an integer"); - error_emitted = true; - } - - type = error_emitted ? glsl_type::error_type : op[0]->type; - result = new(ctx) ir_expression(ir_unop_bit_not, type, op[0], NULL); - break; - - case ast_logic_and: { - exec_list rhs_instructions; - op[0] = get_scalar_boolean_operand(instructions, state, this, 0, - "LHS", &error_emitted); - op[1] = get_scalar_boolean_operand(&rhs_instructions, state, this, 1, - "RHS", &error_emitted); - - ir_constant *op0_const = op[0]->constant_expression_value(); - if (op0_const) { - if (op0_const->value.b[0]) { - instructions->append_list(&rhs_instructions); - result = op[1]; - } else { - result = op0_const; - } - type = glsl_type::bool_type; - } else { - ir_variable *const tmp = new(ctx) ir_variable(glsl_type::bool_type, - "and_tmp", - ir_var_temporary); - instructions->push_tail(tmp); - - ir_if *const stmt = new(ctx) ir_if(op[0]); - instructions->push_tail(stmt); - - stmt->then_instructions.append_list(&rhs_instructions); - ir_dereference *const then_deref = new(ctx) ir_dereference_variable(tmp); - ir_assignment *const then_assign = - new(ctx) ir_assignment(then_deref, op[1], NULL); - stmt->then_instructions.push_tail(then_assign); - - ir_dereference *const else_deref = new(ctx) ir_dereference_variable(tmp); - ir_assignment *const else_assign = - new(ctx) ir_assignment(else_deref, new(ctx) ir_constant(false), NULL); - stmt->else_instructions.push_tail(else_assign); - - result = new(ctx) ir_dereference_variable(tmp); - type = tmp->type; - } - break; - } - - case ast_logic_or: { - exec_list rhs_instructions; - op[0] = get_scalar_boolean_operand(instructions, state, this, 0, - "LHS", &error_emitted); - op[1] = get_scalar_boolean_operand(&rhs_instructions, state, this, 1, - "RHS", &error_emitted); - - ir_constant *op0_const = op[0]->constant_expression_value(); - if (op0_const) { - if (op0_const->value.b[0]) { - result = op0_const; - } else { - result = op[1]; - } - type = glsl_type::bool_type; - } else { - ir_variable *const tmp = new(ctx) ir_variable(glsl_type::bool_type, - "or_tmp", - ir_var_temporary); - instructions->push_tail(tmp); - - ir_if *const stmt = new(ctx) ir_if(op[0]); - instructions->push_tail(stmt); - - ir_dereference *const then_deref = new(ctx) ir_dereference_variable(tmp); - ir_assignment *const then_assign = - new(ctx) ir_assignment(then_deref, new(ctx) ir_constant(true), NULL); - stmt->then_instructions.push_tail(then_assign); - - stmt->else_instructions.append_list(&rhs_instructions); - ir_dereference *const else_deref = new(ctx) ir_dereference_variable(tmp); - ir_assignment *const else_assign = - new(ctx) ir_assignment(else_deref, op[1], NULL); - stmt->else_instructions.push_tail(else_assign); - - result = new(ctx) ir_dereference_variable(tmp); - type = tmp->type; - } - break; - } - - case ast_logic_xor: - /* From page 33 (page 39 of the PDF) of the GLSL 1.10 spec: - * - * "The logical binary operators and (&&), or ( | | ), and - * exclusive or (^^). They operate only on two Boolean - * expressions and result in a Boolean expression." - */ - op[0] = get_scalar_boolean_operand(instructions, state, this, 0, "LHS", - &error_emitted); - op[1] = get_scalar_boolean_operand(instructions, state, this, 1, "RHS", - &error_emitted); - - result = new(ctx) ir_expression(operations[this->oper], glsl_type::bool_type, - op[0], op[1]); - break; - - case ast_logic_not: - op[0] = get_scalar_boolean_operand(instructions, state, this, 0, - "operand", &error_emitted); - - result = new(ctx) ir_expression(operations[this->oper], glsl_type::bool_type, - op[0], NULL); - break; - - case ast_mul_assign: - case ast_div_assign: - case ast_add_assign: - case ast_sub_assign: { - op[0] = this->subexpressions[0]->hir(instructions, state); - op[1] = this->subexpressions[1]->hir(instructions, state); - - type = arithmetic_result_type(op[0], op[1], - (this->oper == ast_mul_assign), - state, & loc); - - ir_rvalue *temp_rhs = new(ctx) ir_expression(operations[this->oper], type, - op[0], op[1]); - - result = do_assignment(instructions, state, - this->subexpressions[0]->non_lvalue_description, - op[0]->clone(ctx, NULL), temp_rhs, false, - this->subexpressions[0]->get_location()); - error_emitted = (op[0]->type->is_error()); - - /* GLSL 1.10 does not allow array assignment. However, we don't have to - * explicitly test for this because none of the binary expression - * operators allow array operands either. - */ - - break; - } - - case ast_mod_assign: { - op[0] = this->subexpressions[0]->hir(instructions, state); - op[1] = this->subexpressions[1]->hir(instructions, state); - - type = modulus_result_type(op[0]->type, op[1]->type, state, & loc); - - assert(operations[this->oper] == ir_binop_mod); - - ir_rvalue *temp_rhs; - temp_rhs = new(ctx) ir_expression(operations[this->oper], type, - op[0], op[1]); - - result = do_assignment(instructions, state, - this->subexpressions[0]->non_lvalue_description, - op[0]->clone(ctx, NULL), temp_rhs, false, - this->subexpressions[0]->get_location()); - error_emitted = type->is_error(); - break; - } - - case ast_ls_assign: - case ast_rs_assign: { - op[0] = this->subexpressions[0]->hir(instructions, state); - op[1] = this->subexpressions[1]->hir(instructions, state); - type = shift_result_type(op[0]->type, op[1]->type, this->oper, state, - &loc); - ir_rvalue *temp_rhs = new(ctx) ir_expression(operations[this->oper], - type, op[0], op[1]); - result = do_assignment(instructions, state, - this->subexpressions[0]->non_lvalue_description, - op[0]->clone(ctx, NULL), temp_rhs, false, - this->subexpressions[0]->get_location()); - error_emitted = op[0]->type->is_error() || op[1]->type->is_error(); - break; - } - - case ast_and_assign: - case ast_xor_assign: - case ast_or_assign: { - op[0] = this->subexpressions[0]->hir(instructions, state); - op[1] = this->subexpressions[1]->hir(instructions, state); - type = bit_logic_result_type(op[0]->type, op[1]->type, this->oper, - state, &loc); - ir_rvalue *temp_rhs = new(ctx) ir_expression(operations[this->oper], - type, op[0], op[1]); - result = do_assignment(instructions, state, - this->subexpressions[0]->non_lvalue_description, - op[0]->clone(ctx, NULL), temp_rhs, false, - this->subexpressions[0]->get_location()); - error_emitted = op[0]->type->is_error() || op[1]->type->is_error(); - break; - } - - case ast_conditional: { - /* From page 59 (page 65 of the PDF) of the GLSL 1.50 spec: - * - * "The ternary selection operator (?:). It operates on three - * expressions (exp1 ? exp2 : exp3). This operator evaluates the - * first expression, which must result in a scalar Boolean." - */ - op[0] = get_scalar_boolean_operand(instructions, state, this, 0, - "condition", &error_emitted); - - /* The :? operator is implemented by generating an anonymous temporary - * followed by an if-statement. The last instruction in each branch of - * the if-statement assigns a value to the anonymous temporary. This - * temporary is the r-value of the expression. - */ - exec_list then_instructions; - exec_list else_instructions; - - op[1] = this->subexpressions[1]->hir(&then_instructions, state); - op[2] = this->subexpressions[2]->hir(&else_instructions, state); - - /* From page 59 (page 65 of the PDF) of the GLSL 1.50 spec: - * - * "The second and third expressions can be any type, as - * long their types match, or there is a conversion in - * Section 4.1.10 "Implicit Conversions" that can be applied - * to one of the expressions to make their types match. This - * resulting matching type is the type of the entire - * expression." - */ - if ((!apply_implicit_conversion(op[1]->type, op[2], state) - && !apply_implicit_conversion(op[2]->type, op[1], state)) - || (op[1]->type != op[2]->type)) { - YYLTYPE loc = this->subexpressions[1]->get_location(); - - _mesa_glsl_error(& loc, state, "Second and third operands of ?: " - "operator must have matching types."); - error_emitted = true; - type = glsl_type::error_type; - } else { - type = op[1]->type; - } - - /* From page 33 (page 39 of the PDF) of the GLSL 1.10 spec: - * - * "The second and third expressions must be the same type, but can - * be of any type other than an array." - */ - if ((state->language_version <= 110) && type->is_array()) { - _mesa_glsl_error(& loc, state, "Second and third operands of ?: " - "operator must not be arrays."); - error_emitted = true; - } - - ir_constant *cond_val = op[0]->constant_expression_value(); - ir_constant *then_val = op[1]->constant_expression_value(); - ir_constant *else_val = op[2]->constant_expression_value(); - - if (then_instructions.is_empty() - && else_instructions.is_empty() - && (cond_val != NULL) && (then_val != NULL) && (else_val != NULL)) { - result = (cond_val->value.b[0]) ? then_val : else_val; - } else { - ir_variable *const tmp = - new(ctx) ir_variable(type, "conditional_tmp", ir_var_temporary); - instructions->push_tail(tmp); - - ir_if *const stmt = new(ctx) ir_if(op[0]); - instructions->push_tail(stmt); - - then_instructions.move_nodes_to(& stmt->then_instructions); - ir_dereference *const then_deref = - new(ctx) ir_dereference_variable(tmp); - ir_assignment *const then_assign = - new(ctx) ir_assignment(then_deref, op[1], NULL); - stmt->then_instructions.push_tail(then_assign); - - else_instructions.move_nodes_to(& stmt->else_instructions); - ir_dereference *const else_deref = - new(ctx) ir_dereference_variable(tmp); - ir_assignment *const else_assign = - new(ctx) ir_assignment(else_deref, op[2], NULL); - stmt->else_instructions.push_tail(else_assign); - - result = new(ctx) ir_dereference_variable(tmp); - } - break; - } - - case ast_pre_inc: - case ast_pre_dec: { - this->non_lvalue_description = (this->oper == ast_pre_inc) - ? "pre-increment operation" : "pre-decrement operation"; - - op[0] = this->subexpressions[0]->hir(instructions, state); - op[1] = constant_one_for_inc_dec(ctx, op[0]->type); - - type = arithmetic_result_type(op[0], op[1], false, state, & loc); - - ir_rvalue *temp_rhs; - temp_rhs = new(ctx) ir_expression(operations[this->oper], type, - op[0], op[1]); - - result = do_assignment(instructions, state, - this->subexpressions[0]->non_lvalue_description, - op[0]->clone(ctx, NULL), temp_rhs, false, - this->subexpressions[0]->get_location()); - error_emitted = op[0]->type->is_error(); - break; - } - - case ast_post_inc: - case ast_post_dec: { - this->non_lvalue_description = (this->oper == ast_post_inc) - ? "post-increment operation" : "post-decrement operation"; - op[0] = this->subexpressions[0]->hir(instructions, state); - op[1] = constant_one_for_inc_dec(ctx, op[0]->type); - - error_emitted = op[0]->type->is_error() || op[1]->type->is_error(); - - type = arithmetic_result_type(op[0], op[1], false, state, & loc); - - ir_rvalue *temp_rhs; - temp_rhs = new(ctx) ir_expression(operations[this->oper], type, - op[0], op[1]); - - /* Get a temporary of a copy of the lvalue before it's modified. - * This may get thrown away later. - */ - result = get_lvalue_copy(instructions, op[0]->clone(ctx, NULL)); - - (void)do_assignment(instructions, state, - this->subexpressions[0]->non_lvalue_description, - op[0]->clone(ctx, NULL), temp_rhs, false, - this->subexpressions[0]->get_location()); - - error_emitted = op[0]->type->is_error(); - break; - } - - case ast_field_selection: - result = _mesa_ast_field_selection_to_hir(this, instructions, state); - break; - - case ast_array_index: { - YYLTYPE index_loc = subexpressions[1]->get_location(); - - op[0] = subexpressions[0]->hir(instructions, state); - op[1] = subexpressions[1]->hir(instructions, state); - - error_emitted = op[0]->type->is_error() || op[1]->type->is_error(); - - ir_rvalue *const array = op[0]; - - result = new(ctx) ir_dereference_array(op[0], op[1]); - - /* Do not use op[0] after this point. Use array. - */ - op[0] = NULL; - - - if (error_emitted) - break; - - if (!array->type->is_array() - && !array->type->is_matrix() - && !array->type->is_vector()) { - _mesa_glsl_error(& index_loc, state, - "cannot dereference non-array / non-matrix / " - "non-vector"); - error_emitted = true; - } - - if (!op[1]->type->is_integer()) { - _mesa_glsl_error(& index_loc, state, - "array index must be integer type"); - error_emitted = true; - } else if (!op[1]->type->is_scalar()) { - _mesa_glsl_error(& index_loc, state, - "array index must be scalar"); - error_emitted = true; - } - - /* If the array index is a constant expression and the array has a - * declared size, ensure that the access is in-bounds. If the array - * index is not a constant expression, ensure that the array has a - * declared size. - */ - ir_constant *const const_index = op[1]->constant_expression_value(); - if (const_index != NULL) { - const int idx = const_index->value.i[0]; - const char *type_name; - unsigned bound = 0; - - if (array->type->is_matrix()) { - type_name = "matrix"; - } else if (array->type->is_vector()) { - type_name = "vector"; - } else { - type_name = "array"; - } - - /* From page 24 (page 30 of the PDF) of the GLSL 1.50 spec: - * - * "It is illegal to declare an array with a size, and then - * later (in the same shader) index the same array with an - * integral constant expression greater than or equal to the - * declared size. It is also illegal to index an array with a - * negative constant expression." - */ - if (array->type->is_matrix()) { - if (array->type->row_type()->vector_elements <= idx) { - bound = array->type->row_type()->vector_elements; - } - } else if (array->type->is_vector()) { - if (array->type->vector_elements <= idx) { - bound = array->type->vector_elements; - } - } else { - if ((array->type->array_size() > 0) - && (array->type->array_size() <= idx)) { - bound = array->type->array_size(); - } - } - - if (bound > 0) { - _mesa_glsl_error(& loc, state, "%s index must be < %u", - type_name, bound); - error_emitted = true; - } else if (idx < 0) { - _mesa_glsl_error(& loc, state, "%s index must be >= 0", - type_name); - error_emitted = true; - } - - if (array->type->is_array()) { - /* If the array is a variable dereference, it dereferences the - * whole array, by definition. Use this to get the variable. - * - * FINISHME: Should some methods for getting / setting / testing - * FINISHME: array access limits be added to ir_dereference? - */ - ir_variable *const v = array->whole_variable_referenced(); - if ((v != NULL) && (unsigned(idx) > v->max_array_access)) { - v->max_array_access = idx; - - /* Check whether this access will, as a side effect, implicitly - * cause the size of a built-in array to be too large. - */ - if (check_builtin_array_max_size(v->name, idx+1, loc, state)) - error_emitted = true; - } - } - } else if (array->type->array_size() == 0) { - _mesa_glsl_error(&loc, state, "unsized array index must be constant"); - } else { - if (array->type->is_array()) { - /* whole_variable_referenced can return NULL if the array is a - * member of a structure. In this case it is safe to not update - * the max_array_access field because it is never used for fields - * of structures. - */ - ir_variable *v = array->whole_variable_referenced(); - if (v != NULL) - v->max_array_access = array->type->array_size() - 1; - } - } - - /* From page 23 (29 of the PDF) of the GLSL 1.30 spec: - * - * "Samplers aggregated into arrays within a shader (using square - * brackets [ ]) can only be indexed with integral constant - * expressions [...]." - * - * This restriction was added in GLSL 1.30. Shaders using earlier version - * of the language should not be rejected by the compiler front-end for - * using this construct. This allows useful things such as using a loop - * counter as the index to an array of samplers. If the loop in unrolled, - * the code should compile correctly. Instead, emit a warning. - */ - if (array->type->is_array() && - array->type->element_type()->is_sampler() && - const_index == NULL) { - - if (state->language_version == 100) { - _mesa_glsl_warning(&loc, state, - "sampler arrays indexed with non-constant " - "expressions is optional in GLSL ES 1.00"); - } else if (state->language_version < 130) { - _mesa_glsl_warning(&loc, state, - "sampler arrays indexed with non-constant " - "expressions is forbidden in GLSL 1.30 and " - "later"); - } else { - _mesa_glsl_error(&loc, state, - "sampler arrays indexed with non-constant " - "expressions is forbidden in GLSL 1.30 and " - "later"); - error_emitted = true; - } - } - - if (error_emitted) - result->type = glsl_type::error_type; - - break; - } - - case ast_function_call: - /* Should *NEVER* get here. ast_function_call should always be handled - * by ast_function_expression::hir. - */ - assert(0); - break; - - case ast_identifier: { - /* ast_identifier can appear several places in a full abstract syntax - * tree. This particular use must be at location specified in the grammar - * as 'variable_identifier'. - */ - ir_variable *var = - state->symbols->get_variable(this->primary_expression.identifier); - - result = new(ctx) ir_dereference_variable(var); - - if (var != NULL) { - var->used = true; - } else { - _mesa_glsl_error(& loc, state, "`%s' undeclared", - this->primary_expression.identifier); - - error_emitted = true; - } - break; - } - - case ast_int_constant: - result = new(ctx) ir_constant(this->primary_expression.int_constant); - break; - - case ast_uint_constant: - result = new(ctx) ir_constant(this->primary_expression.uint_constant); - break; - - case ast_float_constant: - result = new(ctx) ir_constant(this->primary_expression.float_constant); - break; - - case ast_bool_constant: - result = new(ctx) ir_constant(bool(this->primary_expression.bool_constant)); - break; - - case ast_sequence: { - /* It should not be possible to generate a sequence in the AST without - * any expressions in it. - */ - assert(!this->expressions.is_empty()); - - /* The r-value of a sequence is the last expression in the sequence. If - * the other expressions in the sequence do not have side-effects (and - * therefore add instructions to the instruction list), they get dropped - * on the floor. - */ - exec_node *previous_tail_pred = NULL; - YYLTYPE previous_operand_loc = loc; - - foreach_list_typed (ast_node, ast, link, &this->expressions) { - /* If one of the operands of comma operator does not generate any - * code, we want to emit a warning. At each pass through the loop - * previous_tail_pred will point to the last instruction in the - * stream *before* processing the previous operand. Naturally, - * instructions->tail_pred will point to the last instruction in the - * stream *after* processing the previous operand. If the two - * pointers match, then the previous operand had no effect. - * - * The warning behavior here differs slightly from GCC. GCC will - * only emit a warning if none of the left-hand operands have an - * effect. However, it will emit a warning for each. I believe that - * there are some cases in C (especially with GCC extensions) where - * it is useful to have an intermediate step in a sequence have no - * effect, but I don't think these cases exist in GLSL. Either way, - * it would be a giant hassle to replicate that behavior. - */ - if (previous_tail_pred == instructions->tail_pred) { - _mesa_glsl_warning(&previous_operand_loc, state, - "left-hand operand of comma expression has " - "no effect"); - } - - /* tail_pred is directly accessed instead of using the get_tail() - * method for performance reasons. get_tail() has extra code to - * return NULL when the list is empty. We don't care about that - * here, so using tail_pred directly is fine. - */ - previous_tail_pred = instructions->tail_pred; - previous_operand_loc = ast->get_location(); - - result = ast->hir(instructions, state); - } - - /* Any errors should have already been emitted in the loop above. - */ - error_emitted = true; - break; - } - } - type = NULL; /* use result->type, not type. */ - assert(result != NULL); - - if (result->type->is_error() && !error_emitted) - _mesa_glsl_error(& loc, state, "type mismatch"); - - return result; -} - - -ir_rvalue * -ast_expression_statement::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - /* It is possible to have expression statements that don't have an - * expression. This is the solitary semicolon: - * - * for (i = 0; i < 5; i++) - * ; - * - * In this case the expression will be NULL. Test for NULL and don't do - * anything in that case. - */ - if (expression != NULL) - expression->hir(instructions, state); - - /* Statements do not have r-values. - */ - return NULL; -} - - -ir_rvalue * -ast_compound_statement::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - if (new_scope) - state->symbols->push_scope(); - - foreach_list_typed (ast_node, ast, link, &this->statements) - ast->hir(instructions, state); - - if (new_scope) - state->symbols->pop_scope(); - - /* Compound statements do not have r-values. - */ - return NULL; -} - - -static const glsl_type * -process_array_type(YYLTYPE *loc, const glsl_type *base, ast_node *array_size, - struct _mesa_glsl_parse_state *state) -{ - unsigned length = 0; - - /* From page 19 (page 25) of the GLSL 1.20 spec: - * - * "Only one-dimensional arrays may be declared." - */ - if (base->is_array()) { - _mesa_glsl_error(loc, state, - "invalid array of `%s' (only one-dimensional arrays " - "may be declared)", - base->name); - return glsl_type::error_type; - } - - if (array_size != NULL) { - exec_list dummy_instructions; - ir_rvalue *const ir = array_size->hir(& dummy_instructions, state); - YYLTYPE loc = array_size->get_location(); - - if (ir != NULL) { - if (!ir->type->is_integer()) { - _mesa_glsl_error(& loc, state, "array size must be integer type"); - } else if (!ir->type->is_scalar()) { - _mesa_glsl_error(& loc, state, "array size must be scalar type"); - } else { - ir_constant *const size = ir->constant_expression_value(); - - if (size == NULL) { - _mesa_glsl_error(& loc, state, "array size must be a " - "constant valued expression"); - } else if (size->value.i[0] <= 0) { - _mesa_glsl_error(& loc, state, "array size must be > 0"); - } else { - assert(size->type == ir->type); - length = size->value.u[0]; - - /* If the array size is const (and we've verified that - * it is) then no instructions should have been emitted - * when we converted it to HIR. If they were emitted, - * then either the array size isn't const after all, or - * we are emitting unnecessary instructions. - */ - assert(dummy_instructions.is_empty()); - } - } - } - } else if (state->es_shader) { - /* Section 10.17 of the GLSL ES 1.00 specification states that unsized - * array declarations have been removed from the language. - */ - _mesa_glsl_error(loc, state, "unsized array declarations are not " - "allowed in GLSL ES 1.00."); - } - - return glsl_type::get_array_instance(base, length); -} - - -const glsl_type * -ast_type_specifier::glsl_type(const char **name, - struct _mesa_glsl_parse_state *state) const -{ - const struct glsl_type *type; - - type = state->symbols->get_type(this->type_name); - *name = this->type_name; - - if (this->is_array) { - YYLTYPE loc = this->get_location(); - type = process_array_type(&loc, type, this->array_size, state); - } - - return type; -} - - -static void -apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual, - ir_variable *var, - struct _mesa_glsl_parse_state *state, - YYLTYPE *loc) -{ - if (qual->flags.q.invariant) { - if (var->used) { - _mesa_glsl_error(loc, state, - "variable `%s' may not be redeclared " - "`invariant' after being used", - var->name); - } else { - var->invariant = 1; - } - } - - if (qual->flags.q.constant || qual->flags.q.attribute - || qual->flags.q.uniform - || (qual->flags.q.varying && (state->target == fragment_shader))) - var->read_only = 1; - - if (qual->flags.q.centroid) - var->centroid = 1; - - if (qual->flags.q.attribute && state->target != vertex_shader) { - var->type = glsl_type::error_type; - _mesa_glsl_error(loc, state, - "`attribute' variables may not be declared in the " - "%s shader", - _mesa_glsl_shader_target_name(state->target)); - } - - /* From page 25 (page 31 of the PDF) of the GLSL 1.10 spec: - * - * "The varying qualifier can be used only with the data types - * float, vec2, vec3, vec4, mat2, mat3, and mat4, or arrays of - * these." - */ - if (qual->flags.q.varying) { - const glsl_type *non_array_type; - - if (var->type && var->type->is_array()) - non_array_type = var->type->fields.array; - else - non_array_type = var->type; - - if (non_array_type && non_array_type->base_type != GLSL_TYPE_FLOAT) { - var->type = glsl_type::error_type; - _mesa_glsl_error(loc, state, - "varying variables must be of base type float"); - } - } - - /* If there is no qualifier that changes the mode of the variable, leave - * the setting alone. - */ - if (qual->flags.q.in && qual->flags.q.out) - var->mode = ir_var_inout; - else if (qual->flags.q.attribute || qual->flags.q.in - || (qual->flags.q.varying && (state->target == fragment_shader))) - var->mode = ir_var_in; - else if (qual->flags.q.out - || (qual->flags.q.varying && (state->target == vertex_shader))) - var->mode = ir_var_out; - else if (qual->flags.q.uniform) - var->mode = ir_var_uniform; - - if (state->all_invariant && (state->current_function == NULL)) { - switch (state->target) { - case vertex_shader: - if (var->mode == ir_var_out) - var->invariant = true; - break; - case geometry_shader: - if ((var->mode == ir_var_in) || (var->mode == ir_var_out)) - var->invariant = true; - break; - case fragment_shader: - if (var->mode == ir_var_in) - var->invariant = true; - break; - } - } - - if (qual->flags.q.flat) - var->interpolation = INTERP_QUALIFIER_FLAT; - else if (qual->flags.q.noperspective) - var->interpolation = INTERP_QUALIFIER_NOPERSPECTIVE; - else if (qual->flags.q.smooth) - var->interpolation = INTERP_QUALIFIER_SMOOTH; - else - var->interpolation = INTERP_QUALIFIER_NONE; - - if (var->interpolation != INTERP_QUALIFIER_NONE && - !(state->target == vertex_shader && var->mode == ir_var_out) && - !(state->target == fragment_shader && var->mode == ir_var_in)) { - const char *qual_string = NULL; - switch (var->interpolation) { - case INTERP_QUALIFIER_FLAT: - qual_string = "flat"; - break; - case INTERP_QUALIFIER_NOPERSPECTIVE: - qual_string = "noperspective"; - break; - case INTERP_QUALIFIER_SMOOTH: - qual_string = "smooth"; - break; - } - - _mesa_glsl_error(loc, state, - "interpolation qualifier `%s' can only be applied to " - "vertex shader outputs and fragment shader inputs.", - qual_string); - - } - - var->pixel_center_integer = qual->flags.q.pixel_center_integer; - var->origin_upper_left = qual->flags.q.origin_upper_left; - if ((qual->flags.q.origin_upper_left || qual->flags.q.pixel_center_integer) - && (strcmp(var->name, "gl_FragCoord") != 0)) { - const char *const qual_string = (qual->flags.q.origin_upper_left) - ? "origin_upper_left" : "pixel_center_integer"; - - _mesa_glsl_error(loc, state, - "layout qualifier `%s' can only be applied to " - "fragment shader input `gl_FragCoord'", - qual_string); - } - - if (qual->flags.q.explicit_location) { - const bool global_scope = (state->current_function == NULL); - bool fail = false; - const char *string = ""; - - /* In the vertex shader only shader inputs can be given explicit - * locations. - * - * In the fragment shader only shader outputs can be given explicit - * locations. - */ - switch (state->target) { - case vertex_shader: - if (!global_scope || (var->mode != ir_var_in)) { - fail = true; - string = "input"; - } - break; - - case geometry_shader: - _mesa_glsl_error(loc, state, - "geometry shader variables cannot be given " - "explicit locations\n"); - break; - - case fragment_shader: - if (!global_scope || (var->mode != ir_var_out)) { - fail = true; - string = "output"; - } - break; - }; - - if (fail) { - _mesa_glsl_error(loc, state, - "only %s shader %s variables can be given an " - "explicit location\n", - _mesa_glsl_shader_target_name(state->target), - string); - } else { - var->explicit_location = true; - - /* This bit of silliness is needed because invalid explicit locations - * are supposed to be flagged during linking. Small negative values - * biased by VERT_ATTRIB_GENERIC0 or FRAG_RESULT_DATA0 could alias - * built-in values (e.g., -16+VERT_ATTRIB_GENERIC0 = VERT_ATTRIB_POS). - * The linker needs to be able to differentiate these cases. This - * ensures that negative values stay negative. - */ - if (qual->location >= 0) { - var->location = (state->target == vertex_shader) - ? (qual->location + VERT_ATTRIB_GENERIC0) - : (qual->location + FRAG_RESULT_DATA0); - } else { - var->location = qual->location; - } - } - } - - /* Does the declaration use the 'layout' keyword? - */ - const bool uses_layout = qual->flags.q.pixel_center_integer - || qual->flags.q.origin_upper_left - || qual->flags.q.explicit_location; - - /* Does the declaration use the deprecated 'attribute' or 'varying' - * keywords? - */ - const bool uses_deprecated_qualifier = qual->flags.q.attribute - || qual->flags.q.varying; - - /* Is the 'layout' keyword used with parameters that allow relaxed checking. - * Many implementations of GL_ARB_fragment_coord_conventions_enable and some - * implementations (only Mesa?) GL_ARB_explicit_attrib_location_enable - * allowed the layout qualifier to be used with 'varying' and 'attribute'. - * These extensions and all following extensions that add the 'layout' - * keyword have been modified to require the use of 'in' or 'out'. - * - * The following extension do not allow the deprecated keywords: - * - * GL_AMD_conservative_depth - * GL_ARB_conservative_depth - * GL_ARB_gpu_shader5 - * GL_ARB_separate_shader_objects - * GL_ARB_tesselation_shader - * GL_ARB_transform_feedback3 - * GL_ARB_uniform_buffer_object - * - * It is unknown whether GL_EXT_shader_image_load_store or GL_NV_gpu_shader5 - * allow layout with the deprecated keywords. - */ - const bool relaxed_layout_qualifier_checking = - state->ARB_fragment_coord_conventions_enable; - - if (uses_layout && uses_deprecated_qualifier) { - if (relaxed_layout_qualifier_checking) { - _mesa_glsl_warning(loc, state, - "`layout' qualifier may not be used with " - "`attribute' or `varying'"); - } else { - _mesa_glsl_error(loc, state, - "`layout' qualifier may not be used with " - "`attribute' or `varying'"); - } - } - - /* Layout qualifiers for gl_FragDepth, which are enabled by extension - * AMD_conservative_depth. - */ - int depth_layout_count = qual->flags.q.depth_any - + qual->flags.q.depth_greater - + qual->flags.q.depth_less - + qual->flags.q.depth_unchanged; - if (depth_layout_count > 0 - && !state->AMD_conservative_depth_enable - && !state->ARB_conservative_depth_enable) { - _mesa_glsl_error(loc, state, - "extension GL_AMD_conservative_depth or " - "GL_ARB_conservative_depth must be enabled " - "to use depth layout qualifiers"); - } else if (depth_layout_count > 0 - && strcmp(var->name, "gl_FragDepth") != 0) { - _mesa_glsl_error(loc, state, - "depth layout qualifiers can be applied only to " - "gl_FragDepth"); - } else if (depth_layout_count > 1 - && strcmp(var->name, "gl_FragDepth") == 0) { - _mesa_glsl_error(loc, state, - "at most one depth layout qualifier can be applied to " - "gl_FragDepth"); - } - if (qual->flags.q.depth_any) - var->depth_layout = ir_depth_layout_any; - else if (qual->flags.q.depth_greater) - var->depth_layout = ir_depth_layout_greater; - else if (qual->flags.q.depth_less) - var->depth_layout = ir_depth_layout_less; - else if (qual->flags.q.depth_unchanged) - var->depth_layout = ir_depth_layout_unchanged; - else - var->depth_layout = ir_depth_layout_none; -} - -/** - * Get the variable that is being redeclared by this declaration - * - * Semantic checks to verify the validity of the redeclaration are also - * performed. If semantic checks fail, compilation error will be emitted via - * \c _mesa_glsl_error, but a non-\c NULL pointer will still be returned. - * - * \returns - * A pointer to an existing variable in the current scope if the declaration - * is a redeclaration, \c NULL otherwise. - */ -ir_variable * -get_variable_being_redeclared(ir_variable *var, ast_declaration *decl, - struct _mesa_glsl_parse_state *state) -{ - /* Check if this declaration is actually a re-declaration, either to - * resize an array or add qualifiers to an existing variable. - * - * This is allowed for variables in the current scope, or when at - * global scope (for built-ins in the implicit outer scope). - */ - ir_variable *earlier = state->symbols->get_variable(decl->identifier); - if (earlier == NULL || - (state->current_function != NULL && - !state->symbols->name_declared_this_scope(decl->identifier))) { - return NULL; - } - - - YYLTYPE loc = decl->get_location(); - - /* From page 24 (page 30 of the PDF) of the GLSL 1.50 spec, - * - * "It is legal to declare an array without a size and then - * later re-declare the same name as an array of the same - * type and specify a size." - */ - if ((earlier->type->array_size() == 0) - && var->type->is_array() - && (var->type->element_type() == earlier->type->element_type())) { - /* FINISHME: This doesn't match the qualifiers on the two - * FINISHME: declarations. It's not 100% clear whether this is - * FINISHME: required or not. - */ - - const unsigned size = unsigned(var->type->array_size()); - check_builtin_array_max_size(var->name, size, loc, state); - if ((size > 0) && (size <= earlier->max_array_access)) { - _mesa_glsl_error(& loc, state, "array size must be > %u due to " - "previous access", - earlier->max_array_access); - } - - earlier->type = var->type; - delete var; - var = NULL; - } else if (state->ARB_fragment_coord_conventions_enable - && strcmp(var->name, "gl_FragCoord") == 0 - && earlier->type == var->type - && earlier->mode == var->mode) { - /* Allow redeclaration of gl_FragCoord for ARB_fcc layout - * qualifiers. - */ - earlier->origin_upper_left = var->origin_upper_left; - earlier->pixel_center_integer = var->pixel_center_integer; - - /* According to section 4.3.7 of the GLSL 1.30 spec, - * the following built-in varaibles can be redeclared with an - * interpolation qualifier: - * * gl_FrontColor - * * gl_BackColor - * * gl_FrontSecondaryColor - * * gl_BackSecondaryColor - * * gl_Color - * * gl_SecondaryColor - */ - } else if (state->language_version >= 130 - && (strcmp(var->name, "gl_FrontColor") == 0 - || strcmp(var->name, "gl_BackColor") == 0 - || strcmp(var->name, "gl_FrontSecondaryColor") == 0 - || strcmp(var->name, "gl_BackSecondaryColor") == 0 - || strcmp(var->name, "gl_Color") == 0 - || strcmp(var->name, "gl_SecondaryColor") == 0) - && earlier->type == var->type - && earlier->mode == var->mode) { - earlier->interpolation = var->interpolation; - - /* Layout qualifiers for gl_FragDepth. */ - } else if ((state->AMD_conservative_depth_enable || - state->ARB_conservative_depth_enable) - && strcmp(var->name, "gl_FragDepth") == 0 - && earlier->type == var->type - && earlier->mode == var->mode) { - - /** From the AMD_conservative_depth spec: - * Within any shader, the first redeclarations of gl_FragDepth - * must appear before any use of gl_FragDepth. - */ - if (earlier->used) { - _mesa_glsl_error(&loc, state, - "the first redeclaration of gl_FragDepth " - "must appear before any use of gl_FragDepth"); - } - - /* Prevent inconsistent redeclaration of depth layout qualifier. */ - if (earlier->depth_layout != ir_depth_layout_none - && earlier->depth_layout != var->depth_layout) { - _mesa_glsl_error(&loc, state, - "gl_FragDepth: depth layout is declared here " - "as '%s, but it was previously declared as " - "'%s'", - depth_layout_string(var->depth_layout), - depth_layout_string(earlier->depth_layout)); - } - - earlier->depth_layout = var->depth_layout; - - } else { - _mesa_glsl_error(&loc, state, "`%s' redeclared", decl->identifier); - } - - return earlier; -} - -/** - * Generate the IR for an initializer in a variable declaration - */ -ir_rvalue * -process_initializer(ir_variable *var, ast_declaration *decl, - ast_fully_specified_type *type, - exec_list *initializer_instructions, - struct _mesa_glsl_parse_state *state) -{ - ir_rvalue *result = NULL; - - YYLTYPE initializer_loc = decl->initializer->get_location(); - - /* From page 24 (page 30 of the PDF) of the GLSL 1.10 spec: - * - * "All uniform variables are read-only and are initialized either - * directly by an application via API commands, or indirectly by - * OpenGL." - */ - if ((state->language_version <= 110) - && (var->mode == ir_var_uniform)) { - _mesa_glsl_error(& initializer_loc, state, - "cannot initialize uniforms in GLSL 1.10"); - } - - if (var->type->is_sampler()) { - _mesa_glsl_error(& initializer_loc, state, - "cannot initialize samplers"); - } - - if ((var->mode == ir_var_in) && (state->current_function == NULL)) { - _mesa_glsl_error(& initializer_loc, state, - "cannot initialize %s shader input / %s", - _mesa_glsl_shader_target_name(state->target), - (state->target == vertex_shader) - ? "attribute" : "varying"); - } - - ir_dereference *const lhs = new(state) ir_dereference_variable(var); - ir_rvalue *rhs = decl->initializer->hir(initializer_instructions, - state); - - /* Calculate the constant value if this is a const or uniform - * declaration. - */ - if (type->qualifier.flags.q.constant - || type->qualifier.flags.q.uniform) { - ir_rvalue *new_rhs = validate_assignment(state, var->type, rhs, true); - if (new_rhs != NULL) { - rhs = new_rhs; - - ir_constant *constant_value = rhs->constant_expression_value(); - if (!constant_value) { - _mesa_glsl_error(& initializer_loc, state, - "initializer of %s variable `%s' must be a " - "constant expression", - (type->qualifier.flags.q.constant) - ? "const" : "uniform", - decl->identifier); - if (var->type->is_numeric()) { - /* Reduce cascading errors. */ - var->constant_value = ir_constant::zero(state, var->type); - } - } else { - rhs = constant_value; - var->constant_value = constant_value; - } - } else { - _mesa_glsl_error(&initializer_loc, state, - "initializer of type %s cannot be assigned to " - "variable of type %s", - rhs->type->name, var->type->name); - if (var->type->is_numeric()) { - /* Reduce cascading errors. */ - var->constant_value = ir_constant::zero(state, var->type); - } - } - } - - if (rhs && !rhs->type->is_error()) { - bool temp = var->read_only; - if (type->qualifier.flags.q.constant) - var->read_only = false; - - /* Never emit code to initialize a uniform. - */ - const glsl_type *initializer_type; - if (!type->qualifier.flags.q.uniform) { - result = do_assignment(initializer_instructions, state, - NULL, - lhs, rhs, true, - type->get_location()); - initializer_type = result->type; - } else - initializer_type = rhs->type; - - var->constant_initializer = rhs->constant_expression_value(); - var->has_initializer = true; - - /* If the declared variable is an unsized array, it must inherrit - * its full type from the initializer. A declaration such as - * - * uniform float a[] = float[](1.0, 2.0, 3.0, 3.0); - * - * becomes - * - * uniform float a[4] = float[](1.0, 2.0, 3.0, 3.0); - * - * The assignment generated in the if-statement (below) will also - * automatically handle this case for non-uniforms. - * - * If the declared variable is not an array, the types must - * already match exactly. As a result, the type assignment - * here can be done unconditionally. For non-uniforms the call - * to do_assignment can change the type of the initializer (via - * the implicit conversion rules). For uniforms the initializer - * must be a constant expression, and the type of that expression - * was validated above. - */ - var->type = initializer_type; - - var->read_only = temp; - } - - return result; -} - -ir_rvalue * -ast_declarator_list::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - void *ctx = state; - const struct glsl_type *decl_type; - const char *type_name = NULL; - ir_rvalue *result = NULL; - YYLTYPE loc = this->get_location(); - - /* From page 46 (page 52 of the PDF) of the GLSL 1.50 spec: - * - * "To ensure that a particular output variable is invariant, it is - * necessary to use the invariant qualifier. It can either be used to - * qualify a previously declared variable as being invariant - * - * invariant gl_Position; // make existing gl_Position be invariant" - * - * In these cases the parser will set the 'invariant' flag in the declarator - * list, and the type will be NULL. - */ - if (this->invariant) { - assert(this->type == NULL); - - if (state->current_function != NULL) { - _mesa_glsl_error(& loc, state, - "All uses of `invariant' keyword must be at global " - "scope\n"); - } - - foreach_list_typed (ast_declaration, decl, link, &this->declarations) { - assert(!decl->is_array); - assert(decl->array_size == NULL); - assert(decl->initializer == NULL); - - ir_variable *const earlier = - state->symbols->get_variable(decl->identifier); - if (earlier == NULL) { - _mesa_glsl_error(& loc, state, - "Undeclared variable `%s' cannot be marked " - "invariant\n", decl->identifier); - } else if ((state->target == vertex_shader) - && (earlier->mode != ir_var_out)) { - _mesa_glsl_error(& loc, state, - "`%s' cannot be marked invariant, vertex shader " - "outputs only\n", decl->identifier); - } else if ((state->target == fragment_shader) - && (earlier->mode != ir_var_in)) { - _mesa_glsl_error(& loc, state, - "`%s' cannot be marked invariant, fragment shader " - "inputs only\n", decl->identifier); - } else if (earlier->used) { - _mesa_glsl_error(& loc, state, - "variable `%s' may not be redeclared " - "`invariant' after being used", - earlier->name); - } else { - earlier->invariant = true; - } - } - - /* Invariant redeclarations do not have r-values. - */ - return NULL; - } - - assert(this->type != NULL); - assert(!this->invariant); - - /* The type specifier may contain a structure definition. Process that - * before any of the variable declarations. - */ - (void) this->type->specifier->hir(instructions, state); - - decl_type = this->type->specifier->glsl_type(& type_name, state); - if (this->declarations.is_empty()) { - /* If there is no structure involved in the program text, there are two - * possible scenarios: - * - * - The program text contained something like 'vec4;'. This is an - * empty declaration. It is valid but weird. Emit a warning. - * - * - The program text contained something like 'S;' and 'S' is not the - * name of a known structure type. This is both invalid and weird. - * Emit an error. - * - * Note that if decl_type is NULL and there is a structure involved, - * there must have been some sort of error with the structure. In this - * case we assume that an error was already generated on this line of - * code for the structure. There is no need to generate an additional, - * confusing error. - */ - assert(this->type->specifier->structure == NULL || decl_type != NULL - || state->error); - if (this->type->specifier->structure == NULL) { - if (decl_type != NULL) { - _mesa_glsl_warning(&loc, state, "empty declaration"); - } else { - _mesa_glsl_error(&loc, state, - "invalid type `%s' in empty declaration", - type_name); - } - } - } - - foreach_list_typed (ast_declaration, decl, link, &this->declarations) { - const struct glsl_type *var_type; - ir_variable *var; - - /* FINISHME: Emit a warning if a variable declaration shadows a - * FINISHME: declaration at a higher scope. - */ - - if ((decl_type == NULL) || decl_type->is_void()) { - if (type_name != NULL) { - _mesa_glsl_error(& loc, state, - "invalid type `%s' in declaration of `%s'", - type_name, decl->identifier); - } else { - _mesa_glsl_error(& loc, state, - "invalid type in declaration of `%s'", - decl->identifier); - } - continue; - } - - if (decl->is_array) { - var_type = process_array_type(&loc, decl_type, decl->array_size, - state); - if (var_type->is_error()) - continue; - } else { - var_type = decl_type; - } - - var = new(ctx) ir_variable(var_type, decl->identifier, ir_var_auto); - - /* From page 22 (page 28 of the PDF) of the GLSL 1.10 specification; - * - * "Global variables can only use the qualifiers const, - * attribute, uni form, or varying. Only one may be - * specified. - * - * Local variables can only use the qualifier const." - * - * This is relaxed in GLSL 1.30. It is also relaxed by any extension - * that adds the 'layout' keyword. - */ - if ((state->language_version < 130) - && !state->ARB_explicit_attrib_location_enable - && !state->ARB_fragment_coord_conventions_enable) { - if (this->type->qualifier.flags.q.out) { - _mesa_glsl_error(& loc, state, - "`out' qualifier in declaration of `%s' " - "only valid for function parameters in %s.", - decl->identifier, state->version_string); - } - if (this->type->qualifier.flags.q.in) { - _mesa_glsl_error(& loc, state, - "`in' qualifier in declaration of `%s' " - "only valid for function parameters in %s.", - decl->identifier, state->version_string); - } - /* FINISHME: Test for other invalid qualifiers. */ - } - - apply_type_qualifier_to_variable(& this->type->qualifier, var, state, - & loc); - - if (this->type->qualifier.flags.q.invariant) { - if ((state->target == vertex_shader) && !(var->mode == ir_var_out || - var->mode == ir_var_inout)) { - /* FINISHME: Note that this doesn't work for invariant on - * a function signature outval - */ - _mesa_glsl_error(& loc, state, - "`%s' cannot be marked invariant, vertex shader " - "outputs only\n", var->name); - } else if ((state->target == fragment_shader) && - !(var->mode == ir_var_in || var->mode == ir_var_inout)) { - /* FINISHME: Note that this doesn't work for invariant on - * a function signature inval - */ - _mesa_glsl_error(& loc, state, - "`%s' cannot be marked invariant, fragment shader " - "inputs only\n", var->name); - } - } - - if (state->current_function != NULL) { - const char *mode = NULL; - const char *extra = ""; - - /* There is no need to check for 'inout' here because the parser will - * only allow that in function parameter lists. - */ - if (this->type->qualifier.flags.q.attribute) { - mode = "attribute"; - } else if (this->type->qualifier.flags.q.uniform) { - mode = "uniform"; - } else if (this->type->qualifier.flags.q.varying) { - mode = "varying"; - } else if (this->type->qualifier.flags.q.in) { - mode = "in"; - extra = " or in function parameter list"; - } else if (this->type->qualifier.flags.q.out) { - mode = "out"; - extra = " or in function parameter list"; - } - - if (mode) { - _mesa_glsl_error(& loc, state, - "%s variable `%s' must be declared at " - "global scope%s", - mode, var->name, extra); - } - } else if (var->mode == ir_var_in) { - var->read_only = true; - - if (state->target == vertex_shader) { - bool error_emitted = false; - - /* From page 31 (page 37 of the PDF) of the GLSL 1.50 spec: - * - * "Vertex shader inputs can only be float, floating-point - * vectors, matrices, signed and unsigned integers and integer - * vectors. Vertex shader inputs can also form arrays of these - * types, but not structures." - * - * From page 31 (page 27 of the PDF) of the GLSL 1.30 spec: - * - * "Vertex shader inputs can only be float, floating-point - * vectors, matrices, signed and unsigned integers and integer - * vectors. They cannot be arrays or structures." - * - * From page 23 (page 29 of the PDF) of the GLSL 1.20 spec: - * - * "The attribute qualifier can be used only with float, - * floating-point vectors, and matrices. Attribute variables - * cannot be declared as arrays or structures." - */ - const glsl_type *check_type = var->type->is_array() - ? var->type->fields.array : var->type; - - switch (check_type->base_type) { - case GLSL_TYPE_FLOAT: - break; - case GLSL_TYPE_UINT: - case GLSL_TYPE_INT: - if (state->language_version > 120) - break; - /* FALLTHROUGH */ - default: - _mesa_glsl_error(& loc, state, - "vertex shader input / attribute cannot have " - "type %s`%s'", - var->type->is_array() ? "array of " : "", - check_type->name); - error_emitted = true; - } - - if (!error_emitted && (state->language_version <= 130) - && var->type->is_array()) { - _mesa_glsl_error(& loc, state, - "vertex shader input / attribute cannot have " - "array type"); - error_emitted = true; - } - } - } - - /* Integer vertex outputs must be qualified with 'flat'. - * - * From section 4.3.6 of the GLSL 1.30 spec: - * "If a vertex output is a signed or unsigned integer or integer - * vector, then it must be qualified with the interpolation qualifier - * flat." - */ - if (state->language_version >= 130 - && state->target == vertex_shader - && state->current_function == NULL - && var->type->is_integer() - && var->mode == ir_var_out - && var->interpolation != INTERP_QUALIFIER_FLAT) { - - _mesa_glsl_error(&loc, state, "If a vertex output is an integer, " - "then it must be qualified with 'flat'"); - } - - - /* Interpolation qualifiers cannot be applied to 'centroid' and - * 'centroid varying'. - * - * From page 29 (page 35 of the PDF) of the GLSL 1.30 spec: - * "interpolation qualifiers may only precede the qualifiers in, - * centroid in, out, or centroid out in a declaration. They do not apply - * to the deprecated storage qualifiers varying or centroid varying." - */ - if (state->language_version >= 130 - && this->type->qualifier.has_interpolation() - && this->type->qualifier.flags.q.varying) { - - const char *i = this->type->qualifier.interpolation_string(); - assert(i != NULL); - const char *s; - if (this->type->qualifier.flags.q.centroid) - s = "centroid varying"; - else - s = "varying"; - - _mesa_glsl_error(&loc, state, - "qualifier '%s' cannot be applied to the " - "deprecated storage qualifier '%s'", i, s); - } - - - /* Interpolation qualifiers can only apply to vertex shader outputs and - * fragment shader inputs. - * - * From page 29 (page 35 of the PDF) of the GLSL 1.30 spec: - * "Outputs from a vertex shader (out) and inputs to a fragment - * shader (in) can be further qualified with one or more of these - * interpolation qualifiers" - */ - if (state->language_version >= 130 - && this->type->qualifier.has_interpolation()) { - - const char *i = this->type->qualifier.interpolation_string(); - assert(i != NULL); - - switch (state->target) { - case vertex_shader: - if (this->type->qualifier.flags.q.in) { - _mesa_glsl_error(&loc, state, - "qualifier '%s' cannot be applied to vertex " - "shader inputs", i); - } - break; - case fragment_shader: - if (this->type->qualifier.flags.q.out) { - _mesa_glsl_error(&loc, state, - "qualifier '%s' cannot be applied to fragment " - "shader outputs", i); - } - break; - default: - assert(0); - } - } - - - /* From section 4.3.4 of the GLSL 1.30 spec: - * "It is an error to use centroid in in a vertex shader." - */ - if (state->language_version >= 130 - && this->type->qualifier.flags.q.centroid - && this->type->qualifier.flags.q.in - && state->target == vertex_shader) { - - _mesa_glsl_error(&loc, state, - "'centroid in' cannot be used in a vertex shader"); - } - - - /* Precision qualifiers exists only in GLSL versions 1.00 and >= 1.30. - */ - if (this->type->specifier->precision != ast_precision_none - && state->language_version != 100 - && state->language_version < 130) { - - _mesa_glsl_error(&loc, state, - "precision qualifiers are supported only in GLSL ES " - "1.00, and GLSL 1.30 and later"); - } - - - /* Precision qualifiers only apply to floating point and integer types. - * - * From section 4.5.2 of the GLSL 1.30 spec: - * "Any floating point or any integer declaration can have the type - * preceded by one of these precision qualifiers [...] Literal - * constants do not have precision qualifiers. Neither do Boolean - * variables. - * - * In GLSL ES, sampler types are also allowed. - * - * From page 87 of the GLSL ES spec: - * "RESOLUTION: Allow sampler types to take a precision qualifier." - */ - if (this->type->specifier->precision != ast_precision_none - && !var->type->is_float() - && !var->type->is_integer() - && !(var->type->is_sampler() && state->es_shader) - && !(var->type->is_array() - && (var->type->fields.array->is_float() - || var->type->fields.array->is_integer()))) { - - _mesa_glsl_error(&loc, state, - "precision qualifiers apply only to floating point" - "%s types", state->es_shader ? ", integer, and sampler" - : "and integer"); - } - - /* From page 17 (page 23 of the PDF) of the GLSL 1.20 spec: - * - * "[Sampler types] can only be declared as function - * parameters or uniform variables (see Section 4.3.5 - * "Uniform")". - */ - if (var_type->contains_sampler() && - !this->type->qualifier.flags.q.uniform) { - _mesa_glsl_error(&loc, state, "samplers must be declared uniform"); - } - - /* Process the initializer and add its instructions to a temporary - * list. This list will be added to the instruction stream (below) after - * the declaration is added. This is done because in some cases (such as - * redeclarations) the declaration may not actually be added to the - * instruction stream. - */ - exec_list initializer_instructions; - ir_variable *earlier = get_variable_being_redeclared(var, decl, state); - - if (decl->initializer != NULL) { - result = process_initializer((earlier == NULL) ? var : earlier, - decl, this->type, - &initializer_instructions, state); - } - - /* From page 23 (page 29 of the PDF) of the GLSL 1.10 spec: - * - * "It is an error to write to a const variable outside of - * its declaration, so they must be initialized when - * declared." - */ - if (this->type->qualifier.flags.q.constant && decl->initializer == NULL) { - _mesa_glsl_error(& loc, state, - "const declaration of `%s' must be initialized", - decl->identifier); - } - - /* If the declaration is not a redeclaration, there are a few additional - * semantic checks that must be applied. In addition, variable that was - * created for the declaration should be added to the IR stream. - */ - if (earlier == NULL) { - /* From page 15 (page 21 of the PDF) of the GLSL 1.10 spec, - * - * "Identifiers starting with "gl_" are reserved for use by - * OpenGL, and may not be declared in a shader as either a - * variable or a function." - */ - if (strncmp(decl->identifier, "gl_", 3) == 0) - _mesa_glsl_error(& loc, state, - "identifier `%s' uses reserved `gl_' prefix", - decl->identifier); - else if (strstr(decl->identifier, "__")) { - /* From page 14 (page 20 of the PDF) of the GLSL 1.10 - * spec: - * - * "In addition, all identifiers containing two - * consecutive underscores (__) are reserved as - * possible future keywords." - */ - _mesa_glsl_error(& loc, state, - "identifier `%s' uses reserved `__' string", - decl->identifier); - } - - /* Add the variable to the symbol table. Note that the initializer's - * IR was already processed earlier (though it hasn't been emitted - * yet), without the variable in scope. - * - * This differs from most C-like languages, but it follows the GLSL - * specification. From page 28 (page 34 of the PDF) of the GLSL 1.50 - * spec: - * - * "Within a declaration, the scope of a name starts immediately - * after the initializer if present or immediately after the name - * being declared if not." - */ - if (!state->symbols->add_variable(var)) { - YYLTYPE loc = this->get_location(); - _mesa_glsl_error(&loc, state, "name `%s' already taken in the " - "current scope", decl->identifier); - continue; - } - - /* Push the variable declaration to the top. It means that all the - * variable declarations will appear in a funny last-to-first order, - * but otherwise we run into trouble if a function is prototyped, a - * global var is decled, then the function is defined with usage of - * the global var. See glslparsertest's CorrectModule.frag. - */ - instructions->push_head(var); - } - - instructions->append_list(&initializer_instructions); - } - - - /* Generally, variable declarations do not have r-values. However, - * one is used for the declaration in - * - * while (bool b = some_condition()) { - * ... - * } - * - * so we return the rvalue from the last seen declaration here. - */ - return result; -} - - -ir_rvalue * -ast_parameter_declarator::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - void *ctx = state; - const struct glsl_type *type; - const char *name = NULL; - YYLTYPE loc = this->get_location(); - - type = this->type->specifier->glsl_type(& name, state); - - if (type == NULL) { - if (name != NULL) { - _mesa_glsl_error(& loc, state, - "invalid type `%s' in declaration of `%s'", - name, this->identifier); - } else { - _mesa_glsl_error(& loc, state, - "invalid type in declaration of `%s'", - this->identifier); - } - - type = glsl_type::error_type; - } - - /* From page 62 (page 68 of the PDF) of the GLSL 1.50 spec: - * - * "Functions that accept no input arguments need not use void in the - * argument list because prototypes (or definitions) are required and - * therefore there is no ambiguity when an empty argument list "( )" is - * declared. The idiom "(void)" as a parameter list is provided for - * convenience." - * - * Placing this check here prevents a void parameter being set up - * for a function, which avoids tripping up checks for main taking - * parameters and lookups of an unnamed symbol. - */ - if (type->is_void()) { - if (this->identifier != NULL) - _mesa_glsl_error(& loc, state, - "named parameter cannot have type `void'"); - - is_void = true; - return NULL; - } - - if (formal_parameter && (this->identifier == NULL)) { - _mesa_glsl_error(& loc, state, "formal parameter lacks a name"); - return NULL; - } - - /* This only handles "vec4 foo[..]". The earlier specifier->glsl_type(...) - * call already handled the "vec4[..] foo" case. - */ - if (this->is_array) { - type = process_array_type(&loc, type, this->array_size, state); - } - - if (!type->is_error() && type->array_size() == 0) { - _mesa_glsl_error(&loc, state, "arrays passed as parameters must have " - "a declared size."); - type = glsl_type::error_type; - } - - is_void = false; - ir_variable *var = new(ctx) ir_variable(type, this->identifier, ir_var_in); - - /* Apply any specified qualifiers to the parameter declaration. Note that - * for function parameters the default mode is 'in'. - */ - apply_type_qualifier_to_variable(& this->type->qualifier, var, state, & loc); - - /* From page 17 (page 23 of the PDF) of the GLSL 1.20 spec: - * - * "Samplers cannot be treated as l-values; hence cannot be used - * as out or inout function parameters, nor can they be assigned - * into." - */ - if ((var->mode == ir_var_inout || var->mode == ir_var_out) - && type->contains_sampler()) { - _mesa_glsl_error(&loc, state, "out and inout parameters cannot contain samplers"); - type = glsl_type::error_type; - } - - /* From page 39 (page 45 of the PDF) of the GLSL 1.10 spec: - * - * "When calling a function, expressions that do not evaluate to - * l-values cannot be passed to parameters declared as out or inout." - * - * From page 32 (page 38 of the PDF) of the GLSL 1.10 spec: - * - * "Other binary or unary expressions, non-dereferenced arrays, - * function names, swizzles with repeated fields, and constants - * cannot be l-values." - * - * So for GLSL 1.10, passing an array as an out or inout parameter is not - * allowed. This restriction is removed in GLSL 1.20, and in GLSL ES. - */ - if ((var->mode == ir_var_inout || var->mode == ir_var_out) - && type->is_array() && state->language_version == 110) { - _mesa_glsl_error(&loc, state, "Arrays cannot be out or inout parameters in GLSL 1.10"); - type = glsl_type::error_type; - } - - instructions->push_tail(var); - - /* Parameter declarations do not have r-values. - */ - return NULL; -} - - -void -ast_parameter_declarator::parameters_to_hir(exec_list *ast_parameters, - bool formal, - exec_list *ir_parameters, - _mesa_glsl_parse_state *state) -{ - ast_parameter_declarator *void_param = NULL; - unsigned count = 0; - - foreach_list_typed (ast_parameter_declarator, param, link, ast_parameters) { - param->formal_parameter = formal; - param->hir(ir_parameters, state); - - if (param->is_void) - void_param = param; - - count++; - } - - if ((void_param != NULL) && (count > 1)) { - YYLTYPE loc = void_param->get_location(); - - _mesa_glsl_error(& loc, state, - "`void' parameter must be only parameter"); - } -} - - -void -emit_function(_mesa_glsl_parse_state *state, ir_function *f) -{ - /* IR invariants disallow function declarations or definitions - * nested within other function definitions. But there is no - * requirement about the relative order of function declarations - * and definitions with respect to one another. So simply insert - * the new ir_function block at the end of the toplevel instruction - * list. - */ - state->toplevel_ir->push_tail(f); -} - - -ir_rvalue * -ast_function::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - void *ctx = state; - ir_function *f = NULL; - ir_function_signature *sig = NULL; - exec_list hir_parameters; - - const char *const name = identifier; - - /* New functions are always added to the top-level IR instruction stream, - * so this instruction list pointer is ignored. See also emit_function - * (called below). - */ - (void) instructions; - - /* From page 21 (page 27 of the PDF) of the GLSL 1.20 spec, - * - * "Function declarations (prototypes) cannot occur inside of functions; - * they must be at global scope, or for the built-in functions, outside - * the global scope." - * - * From page 27 (page 33 of the PDF) of the GLSL ES 1.00.16 spec, - * - * "User defined functions may only be defined within the global scope." - * - * Note that this language does not appear in GLSL 1.10. - */ - if ((state->current_function != NULL) && (state->language_version != 110)) { - YYLTYPE loc = this->get_location(); - _mesa_glsl_error(&loc, state, - "declaration of function `%s' not allowed within " - "function body", name); - } - - /* From page 15 (page 21 of the PDF) of the GLSL 1.10 spec, - * - * "Identifiers starting with "gl_" are reserved for use by - * OpenGL, and may not be declared in a shader as either a - * variable or a function." - */ - if (strncmp(name, "gl_", 3) == 0) { - YYLTYPE loc = this->get_location(); - _mesa_glsl_error(&loc, state, - "identifier `%s' uses reserved `gl_' prefix", name); - } - - /* Convert the list of function parameters to HIR now so that they can be - * used below to compare this function's signature with previously seen - * signatures for functions with the same name. - */ - ast_parameter_declarator::parameters_to_hir(& this->parameters, - is_definition, - & hir_parameters, state); - - const char *return_type_name; - const glsl_type *return_type = - this->return_type->specifier->glsl_type(& return_type_name, state); - - if (!return_type) { - YYLTYPE loc = this->get_location(); - _mesa_glsl_error(&loc, state, - "function `%s' has undeclared return type `%s'", - name, return_type_name); - return_type = glsl_type::error_type; - } - - /* From page 56 (page 62 of the PDF) of the GLSL 1.30 spec: - * "No qualifier is allowed on the return type of a function." - */ - if (this->return_type->has_qualifiers()) { - YYLTYPE loc = this->get_location(); - _mesa_glsl_error(& loc, state, - "function `%s' return type has qualifiers", name); - } - - /* From page 17 (page 23 of the PDF) of the GLSL 1.20 spec: - * - * "[Sampler types] can only be declared as function parameters - * or uniform variables (see Section 4.3.5 "Uniform")". - */ - if (return_type->contains_sampler()) { - YYLTYPE loc = this->get_location(); - _mesa_glsl_error(&loc, state, - "function `%s' return type can't contain a sampler", - name); - } - - /* Verify that this function's signature either doesn't match a previously - * seen signature for a function with the same name, or, if a match is found, - * that the previously seen signature does not have an associated definition. - */ - f = state->symbols->get_function(name); - if (f != NULL && (state->es_shader || f->has_user_signature())) { - sig = f->exact_matching_signature(&hir_parameters); - if (sig != NULL) { - const char *badvar = sig->qualifiers_match(&hir_parameters); - if (badvar != NULL) { - YYLTYPE loc = this->get_location(); - - _mesa_glsl_error(&loc, state, "function `%s' parameter `%s' " - "qualifiers don't match prototype", name, badvar); - } - - if (sig->return_type != return_type) { - YYLTYPE loc = this->get_location(); - - _mesa_glsl_error(&loc, state, "function `%s' return type doesn't " - "match prototype", name); - } - - if (is_definition && sig->is_defined) { - YYLTYPE loc = this->get_location(); - - _mesa_glsl_error(& loc, state, "function `%s' redefined", name); - } - } - } else { - f = new(ctx) ir_function(name); - if (!state->symbols->add_function(f)) { - /* This function name shadows a non-function use of the same name. */ - YYLTYPE loc = this->get_location(); - - _mesa_glsl_error(&loc, state, "function name `%s' conflicts with " - "non-function", name); - return NULL; - } - - emit_function(state, f); - } - - /* Verify the return type of main() */ - if (strcmp(name, "main") == 0) { - if (! return_type->is_void()) { - YYLTYPE loc = this->get_location(); - - _mesa_glsl_error(& loc, state, "main() must return void"); - } - - if (!hir_parameters.is_empty()) { - YYLTYPE loc = this->get_location(); - - _mesa_glsl_error(& loc, state, "main() must not take any parameters"); - } - } - - /* Finish storing the information about this new function in its signature. - */ - if (sig == NULL) { - sig = new(ctx) ir_function_signature(return_type); - f->add_signature(sig); - } - - sig->replace_parameters(&hir_parameters); - signature = sig; - - /* Function declarations (prototypes) do not have r-values. - */ - return NULL; -} - - -ir_rvalue * -ast_function_definition::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - prototype->is_definition = true; - prototype->hir(instructions, state); - - ir_function_signature *signature = prototype->signature; - if (signature == NULL) - return NULL; - - assert(state->current_function == NULL); - state->current_function = signature; - state->found_return = false; - - /* Duplicate parameters declared in the prototype as concrete variables. - * Add these to the symbol table. - */ - state->symbols->push_scope(); - foreach_iter(exec_list_iterator, iter, signature->parameters) { - ir_variable *const var = ((ir_instruction *) iter.get())->as_variable(); - - assert(var != NULL); - - /* The only way a parameter would "exist" is if two parameters have - * the same name. - */ - if (state->symbols->name_declared_this_scope(var->name)) { - YYLTYPE loc = this->get_location(); - - _mesa_glsl_error(& loc, state, "parameter `%s' redeclared", var->name); - } else { - state->symbols->add_variable(var); - } - } - - /* Convert the body of the function to HIR. */ - this->body->hir(&signature->body, state); - signature->is_defined = true; - - state->symbols->pop_scope(); - - assert(state->current_function == signature); - state->current_function = NULL; - - if (!signature->return_type->is_void() && !state->found_return) { - YYLTYPE loc = this->get_location(); - _mesa_glsl_error(& loc, state, "function `%s' has non-void return type " - "%s, but no return statement", - signature->function_name(), - signature->return_type->name); - } - - /* Function definitions do not have r-values. - */ - return NULL; -} - - -ir_rvalue * -ast_jump_statement::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - void *ctx = state; - - switch (mode) { - case ast_return: { - ir_return *inst; - assert(state->current_function); - - if (opt_return_value) { - ir_rvalue *const ret = opt_return_value->hir(instructions, state); - - /* The value of the return type can be NULL if the shader says - * 'return foo();' and foo() is a function that returns void. - * - * NOTE: The GLSL spec doesn't say that this is an error. The type - * of the return value is void. If the return type of the function is - * also void, then this should compile without error. Seriously. - */ - const glsl_type *const ret_type = - (ret == NULL) ? glsl_type::void_type : ret->type; - - /* Implicit conversions are not allowed for return values. */ - if (state->current_function->return_type != ret_type) { - YYLTYPE loc = this->get_location(); - - _mesa_glsl_error(& loc, state, - "`return' with wrong type %s, in function `%s' " - "returning %s", - ret_type->name, - state->current_function->function_name(), - state->current_function->return_type->name); - } - - inst = new(ctx) ir_return(ret); - } else { - if (state->current_function->return_type->base_type != - GLSL_TYPE_VOID) { - YYLTYPE loc = this->get_location(); - - _mesa_glsl_error(& loc, state, - "`return' with no value, in function %s returning " - "non-void", - state->current_function->function_name()); - } - inst = new(ctx) ir_return; - } - - state->found_return = true; - instructions->push_tail(inst); - break; - } - - case ast_discard: - if (state->target != fragment_shader) { - YYLTYPE loc = this->get_location(); - - _mesa_glsl_error(& loc, state, - "`discard' may only appear in a fragment shader"); - } - instructions->push_tail(new(ctx) ir_discard); - break; - - case ast_break: - case ast_continue: - if (mode == ast_continue && - state->loop_nesting_ast == NULL) { - YYLTYPE loc = this->get_location(); - - _mesa_glsl_error(& loc, state, - "continue may only appear in a loop"); - } else if (mode == ast_break && - state->loop_nesting_ast == NULL && - state->switch_state.switch_nesting_ast == NULL) { - YYLTYPE loc = this->get_location(); - - _mesa_glsl_error(& loc, state, - "break may only appear in a loop or a switch"); - } else { - /* For a loop, inline the for loop expression again, - * since we don't know where near the end of - * the loop body the normal copy of it - * is going to be placed. - */ - if (state->loop_nesting_ast != NULL && - mode == ast_continue && - state->loop_nesting_ast->rest_expression) { - state->loop_nesting_ast->rest_expression->hir(instructions, - state); - } - - if (state->switch_state.is_switch_innermost && - mode == ast_break) { - /* Force break out of switch by setting is_break switch state. - */ - ir_variable *const is_break_var = state->switch_state.is_break_var; - ir_dereference_variable *const deref_is_break_var = - new(ctx) ir_dereference_variable(is_break_var); - ir_constant *const true_val = new(ctx) ir_constant(true); - ir_assignment *const set_break_var = - new(ctx) ir_assignment(deref_is_break_var, - true_val, - NULL); - - instructions->push_tail(set_break_var); - } - else { - ir_loop_jump *const jump = - new(ctx) ir_loop_jump((mode == ast_break) - ? ir_loop_jump::jump_break - : ir_loop_jump::jump_continue); - instructions->push_tail(jump); - } - } - - break; - } - - /* Jump instructions do not have r-values. - */ - return NULL; -} - - -ir_rvalue * -ast_selection_statement::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - void *ctx = state; - - ir_rvalue *const condition = this->condition->hir(instructions, state); - - /* From page 66 (page 72 of the PDF) of the GLSL 1.50 spec: - * - * "Any expression whose type evaluates to a Boolean can be used as the - * conditional expression bool-expression. Vector types are not accepted - * as the expression to if." - * - * The checks are separated so that higher quality diagnostics can be - * generated for cases where both rules are violated. - */ - if (!condition->type->is_boolean() || !condition->type->is_scalar()) { - YYLTYPE loc = this->condition->get_location(); - - _mesa_glsl_error(& loc, state, "if-statement condition must be scalar " - "boolean"); - } - - ir_if *const stmt = new(ctx) ir_if(condition); - - if (then_statement != NULL) { - state->symbols->push_scope(); - then_statement->hir(& stmt->then_instructions, state); - state->symbols->pop_scope(); - } - - if (else_statement != NULL) { - state->symbols->push_scope(); - else_statement->hir(& stmt->else_instructions, state); - state->symbols->pop_scope(); - } - - instructions->push_tail(stmt); - - /* if-statements do not have r-values. - */ - return NULL; -} - - -ir_rvalue * -ast_switch_statement::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - void *ctx = state; - - ir_rvalue *const test_expression = - this->test_expression->hir(instructions, state); - - /* From page 66 (page 55 of the PDF) of the GLSL 1.50 spec: - * - * "The type of init-expression in a switch statement must be a - * scalar integer." - */ - if (!test_expression->type->is_scalar() || - !test_expression->type->is_integer()) { - YYLTYPE loc = this->test_expression->get_location(); - - _mesa_glsl_error(& loc, - state, - "switch-statement expression must be scalar " - "integer"); - } - - /* Track the switch-statement nesting in a stack-like manner. - */ - struct glsl_switch_state saved = state->switch_state; - - state->switch_state.is_switch_innermost = true; - state->switch_state.switch_nesting_ast = this; - state->switch_state.labels_ht = hash_table_ctor(0, hash_table_pointer_hash, - hash_table_pointer_compare); - state->switch_state.previous_default = NULL; - - /* Initalize is_fallthru state to false. - */ - ir_rvalue *const is_fallthru_val = new (ctx) ir_constant(false); - state->switch_state.is_fallthru_var = - new(ctx) ir_variable(glsl_type::bool_type, - "switch_is_fallthru_tmp", - ir_var_temporary); - instructions->push_tail(state->switch_state.is_fallthru_var); - - ir_dereference_variable *deref_is_fallthru_var = - new(ctx) ir_dereference_variable(state->switch_state.is_fallthru_var); - instructions->push_tail(new(ctx) ir_assignment(deref_is_fallthru_var, - is_fallthru_val, - NULL)); - - /* Initalize is_break state to false. - */ - ir_rvalue *const is_break_val = new (ctx) ir_constant(false); - state->switch_state.is_break_var = new(ctx) ir_variable(glsl_type::bool_type, - "switch_is_break_tmp", - ir_var_temporary); - instructions->push_tail(state->switch_state.is_break_var); - - ir_dereference_variable *deref_is_break_var = - new(ctx) ir_dereference_variable(state->switch_state.is_break_var); - instructions->push_tail(new(ctx) ir_assignment(deref_is_break_var, - is_break_val, - NULL)); - - /* Cache test expression. - */ - test_to_hir(instructions, state); - - /* Emit code for body of switch stmt. - */ - body->hir(instructions, state); - - hash_table_dtor(state->switch_state.labels_ht); - - state->switch_state = saved; - - /* Switch statements do not have r-values. */ - return NULL; -} - - -void -ast_switch_statement::test_to_hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - void *ctx = state; - - /* Cache value of test expression. */ - ir_rvalue *const test_val = - test_expression->hir(instructions, - state); - - state->switch_state.test_var = new(ctx) ir_variable(test_val->type, - "switch_test_tmp", - ir_var_temporary); - ir_dereference_variable *deref_test_var = - new(ctx) ir_dereference_variable(state->switch_state.test_var); - - instructions->push_tail(state->switch_state.test_var); - instructions->push_tail(new(ctx) ir_assignment(deref_test_var, test_val, - NULL)); -} - - -ir_rvalue * -ast_switch_body::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - if (stmts != NULL) - stmts->hir(instructions, state); - - /* Switch bodies do not have r-values. */ - return NULL; -} - -ir_rvalue * -ast_case_statement_list::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - foreach_list_typed (ast_case_statement, case_stmt, link, & this->cases) - case_stmt->hir(instructions, state); - - /* Case statements do not have r-values. */ - return NULL; -} - -ir_rvalue * -ast_case_statement::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - labels->hir(instructions, state); - - /* Conditionally set fallthru state based on break state. */ - ir_constant *const false_val = new(state) ir_constant(false); - ir_dereference_variable *const deref_is_fallthru_var = - new(state) ir_dereference_variable(state->switch_state.is_fallthru_var); - ir_dereference_variable *const deref_is_break_var = - new(state) ir_dereference_variable(state->switch_state.is_break_var); - ir_assignment *const reset_fallthru_on_break = - new(state) ir_assignment(deref_is_fallthru_var, - false_val, - deref_is_break_var); - instructions->push_tail(reset_fallthru_on_break); - - /* Guard case statements depending on fallthru state. */ - ir_dereference_variable *const deref_fallthru_guard = - new(state) ir_dereference_variable(state->switch_state.is_fallthru_var); - ir_if *const test_fallthru = new(state) ir_if(deref_fallthru_guard); - - foreach_list_typed (ast_node, stmt, link, & this->stmts) - stmt->hir(& test_fallthru->then_instructions, state); - - instructions->push_tail(test_fallthru); - - /* Case statements do not have r-values. */ - return NULL; -} - - -ir_rvalue * -ast_case_label_list::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - foreach_list_typed (ast_case_label, label, link, & this->labels) - label->hir(instructions, state); - - /* Case labels do not have r-values. */ - return NULL; -} - -ir_rvalue * -ast_case_label::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - void *ctx = state; - - ir_dereference_variable *deref_fallthru_var = - new(ctx) ir_dereference_variable(state->switch_state.is_fallthru_var); - - ir_rvalue *const true_val = new(ctx) ir_constant(true); - - /* If not default case, ... */ - if (this->test_value != NULL) { - /* Conditionally set fallthru state based on - * comparison of cached test expression value to case label. - */ - ir_rvalue *const label_rval = this->test_value->hir(instructions, state); - ir_constant *label_const = label_rval->constant_expression_value(); - - if (!label_const) { - YYLTYPE loc = this->test_value->get_location(); - - _mesa_glsl_error(& loc, state, - "switch statement case label must be a " - "constant expression"); - - /* Stuff a dummy value in to allow processing to continue. */ - label_const = new(ctx) ir_constant(0); - } else { - ast_expression *previous_label = (ast_expression *) - hash_table_find(state->switch_state.labels_ht, - (void *)(uintptr_t)label_const->value.u[0]); - - if (previous_label) { - YYLTYPE loc = this->test_value->get_location(); - _mesa_glsl_error(& loc, state, - "duplicate case value"); - - loc = previous_label->get_location(); - _mesa_glsl_error(& loc, state, - "this is the previous case label"); - } else { - hash_table_insert(state->switch_state.labels_ht, - this->test_value, - (void *)(uintptr_t)label_const->value.u[0]); - } - } - - ir_dereference_variable *deref_test_var = - new(ctx) ir_dereference_variable(state->switch_state.test_var); - - ir_rvalue *const test_cond = new(ctx) ir_expression(ir_binop_all_equal, - label_const, - deref_test_var); - - ir_assignment *set_fallthru_on_test = - new(ctx) ir_assignment(deref_fallthru_var, - true_val, - test_cond); - - instructions->push_tail(set_fallthru_on_test); - } else { /* default case */ - if (state->switch_state.previous_default) { - YYLTYPE loc = this->get_location(); - _mesa_glsl_error(& loc, state, - "multiple default labels in one switch"); - - loc = state->switch_state.previous_default->get_location(); - _mesa_glsl_error(& loc, state, - "this is the first default label"); - } - state->switch_state.previous_default = this; - - /* Set falltrhu state. */ - ir_assignment *set_fallthru = - new(ctx) ir_assignment(deref_fallthru_var, true_val, NULL); - - instructions->push_tail(set_fallthru); - } - - /* Case statements do not have r-values. */ - return NULL; -} - -void -ast_iteration_statement::condition_to_hir(ir_loop *stmt, - struct _mesa_glsl_parse_state *state) -{ - void *ctx = state; - - if (condition != NULL) { - ir_rvalue *const cond = - condition->hir(& stmt->body_instructions, state); - - if ((cond == NULL) - || !cond->type->is_boolean() || !cond->type->is_scalar()) { - YYLTYPE loc = condition->get_location(); - - _mesa_glsl_error(& loc, state, - "loop condition must be scalar boolean"); - } else { - /* As the first code in the loop body, generate a block that looks - * like 'if (!condition) break;' as the loop termination condition. - */ - ir_rvalue *const not_cond = - new(ctx) ir_expression(ir_unop_logic_not, cond); - - ir_if *const if_stmt = new(ctx) ir_if(not_cond); - - ir_jump *const break_stmt = - new(ctx) ir_loop_jump(ir_loop_jump::jump_break); - - if_stmt->then_instructions.push_tail(break_stmt); - stmt->body_instructions.push_tail(if_stmt); - } - } -} - - -ir_rvalue * -ast_iteration_statement::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - void *ctx = state; - - /* For-loops and while-loops start a new scope, but do-while loops do not. - */ - if (mode != ast_do_while) - state->symbols->push_scope(); - - if (init_statement != NULL) - init_statement->hir(instructions, state); - - ir_loop *const stmt = new(ctx) ir_loop(); - instructions->push_tail(stmt); - - /* Track the current loop nesting. */ - ast_iteration_statement *nesting_ast = state->loop_nesting_ast; - - state->loop_nesting_ast = this; - - /* Likewise, indicate that following code is closest to a loop, - * NOT closest to a switch. - */ - bool saved_is_switch_innermost = state->switch_state.is_switch_innermost; - state->switch_state.is_switch_innermost = false; - - if (mode != ast_do_while) - condition_to_hir(stmt, state); - - if (body != NULL) - body->hir(& stmt->body_instructions, state); - - if (rest_expression != NULL) - rest_expression->hir(& stmt->body_instructions, state); - - if (mode == ast_do_while) - condition_to_hir(stmt, state); - - if (mode != ast_do_while) - state->symbols->pop_scope(); - - /* Restore previous nesting before returning. */ - state->loop_nesting_ast = nesting_ast; - state->switch_state.is_switch_innermost = saved_is_switch_innermost; - - /* Loops do not have r-values. - */ - return NULL; -} - - -ir_rvalue * -ast_type_specifier::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - if (!this->is_precision_statement && this->structure == NULL) - return NULL; - - YYLTYPE loc = this->get_location(); - - if (this->precision != ast_precision_none - && state->language_version != 100 - && state->language_version < 130) { - _mesa_glsl_error(&loc, state, - "precision qualifiers exist only in " - "GLSL ES 1.00, and GLSL 1.30 and later"); - return NULL; - } - if (this->precision != ast_precision_none - && this->structure != NULL) { - _mesa_glsl_error(&loc, state, - "precision qualifiers do not apply to structures"); - return NULL; - } - - /* If this is a precision statement, check that the type to which it is - * applied is either float or int. - * - * From section 4.5.3 of the GLSL 1.30 spec: - * "The precision statement - * precision precision-qualifier type; - * can be used to establish a default precision qualifier. The type - * field can be either int or float [...]. Any other types or - * qualifiers will result in an error. - */ - if (this->is_precision_statement) { - assert(this->precision != ast_precision_none); - assert(this->structure == NULL); /* The check for structures was - * performed above. */ - if (this->is_array) { - _mesa_glsl_error(&loc, state, - "default precision statements do not apply to " - "arrays"); - return NULL; - } - if (this->type_specifier != ast_float - && this->type_specifier != ast_int) { - _mesa_glsl_error(&loc, state, - "default precision statements apply only to types " - "float and int"); - return NULL; - } - - /* FINISHME: Translate precision statements into IR. */ - return NULL; - } - - if (this->structure != NULL) - return this->structure->hir(instructions, state); - - return NULL; -} - - -ir_rvalue * -ast_struct_specifier::hir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - unsigned decl_count = 0; - - /* Make an initial pass over the list of structure fields to determine how - * many there are. Each element in this list is an ast_declarator_list. - * This means that we actually need to count the number of elements in the - * 'declarations' list in each of the elements. - */ - foreach_list_typed (ast_declarator_list, decl_list, link, - &this->declarations) { - foreach_list_const (decl_ptr, & decl_list->declarations) { - decl_count++; - } - } - - /* Allocate storage for the structure fields and process the field - * declarations. As the declarations are processed, try to also convert - * the types to HIR. This ensures that structure definitions embedded in - * other structure definitions are processed. - */ - glsl_struct_field *const fields = ralloc_array(state, glsl_struct_field, - decl_count); - - unsigned i = 0; - foreach_list_typed (ast_declarator_list, decl_list, link, - &this->declarations) { - const char *type_name; - - decl_list->type->specifier->hir(instructions, state); - - /* Section 10.9 of the GLSL ES 1.00 specification states that - * embedded structure definitions have been removed from the language. - */ - if (state->es_shader && decl_list->type->specifier->structure != NULL) { - YYLTYPE loc = this->get_location(); - _mesa_glsl_error(&loc, state, "Embedded structure definitions are " - "not allowed in GLSL ES 1.00."); - } - - const glsl_type *decl_type = - decl_list->type->specifier->glsl_type(& type_name, state); - - foreach_list_typed (ast_declaration, decl, link, - &decl_list->declarations) { - const struct glsl_type *field_type = decl_type; - if (decl->is_array) { - YYLTYPE loc = decl->get_location(); - field_type = process_array_type(&loc, decl_type, decl->array_size, - state); - } - fields[i].type = (field_type != NULL) - ? field_type : glsl_type::error_type; - fields[i].name = decl->identifier; - i++; - } - } - - assert(i == decl_count); - - const glsl_type *t = - glsl_type::get_record_instance(fields, decl_count, this->name); - - YYLTYPE loc = this->get_location(); - if (!state->symbols->add_type(name, t)) { - _mesa_glsl_error(& loc, state, "struct `%s' previously defined", name); - } else { - const glsl_type **s = reralloc(state, state->user_structures, - const glsl_type *, - state->num_user_structures + 1); - if (s != NULL) { - s[state->num_user_structures] = t; - state->user_structures = s; - state->num_user_structures++; - } - } - - /* Structure type definitions do not have r-values. - */ - return NULL; -} diff --git a/dll/opengl/mesa/src/glsl/ast_type.cpp b/dll/opengl/mesa/src/glsl/ast_type.cpp deleted file mode 100644 index 79c43eefbc5..00000000000 --- a/dll/opengl/mesa/src/glsl/ast_type.cpp +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "ast.h" -extern "C" { -#include "program/symbol_table.h" -} - -void -ast_type_specifier::print(void) const -{ - if (type_specifier == ast_struct) { - structure->print(); - } else { - printf("%s ", type_name); - } - - if (is_array) { - printf("[ "); - - if (array_size) { - array_size->print(); - } - - printf("] "); - } -} - -ast_type_specifier::ast_type_specifier(int specifier) - : type_specifier(ast_types(specifier)), type_name(NULL), structure(NULL), - is_array(false), array_size(NULL), precision(ast_precision_none), - is_precision_statement(false) -{ - static const char *const names[] = { - "void", - "float", - "int", - "uint", - "bool", - "vec2", - "vec3", - "vec4", - "bvec2", - "bvec3", - "bvec4", - "ivec2", - "ivec3", - "ivec4", - "uvec2", - "uvec3", - "uvec4", - "mat2", - "mat2x3", - "mat2x4", - "mat3x2", - "mat3", - "mat3x4", - "mat4x2", - "mat4x3", - "mat4", - "sampler1D", - "sampler2D", - "sampler2DRect", - "sampler3D", - "samplerCube", - "samplerExternalOES", - "sampler1DShadow", - "sampler2DShadow", - "sampler2DRectShadow", - "samplerCubeShadow", - "sampler1DArray", - "sampler2DArray", - "sampler1DArrayShadow", - "sampler2DArrayShadow", - "isampler1D", - "isampler2D", - "isampler3D", - "isamplerCube", - "isampler1DArray", - "isampler2DArray", - "usampler1D", - "usampler2D", - "usampler3D", - "usamplerCube", - "usampler1DArray", - "usampler2DArray", - - NULL, /* ast_struct */ - NULL /* ast_type_name */ - }; - - type_name = names[specifier]; -} - -bool -ast_fully_specified_type::has_qualifiers() const -{ - return this->qualifier.flags.i != 0; -} - -bool ast_type_qualifier::has_interpolation() const -{ - return this->flags.q.smooth - || this->flags.q.flat - || this->flags.q.noperspective; -} - -const char* -ast_type_qualifier::interpolation_string() const -{ - if (this->flags.q.smooth) - return "smooth"; - else if (this->flags.q.flat) - return "flat"; - else if (this->flags.q.noperspective) - return "noperspective"; - else - return NULL; -} diff --git a/dll/opengl/mesa/src/glsl/builtin_stubs.cpp b/dll/opengl/mesa/src/glsl/builtin_stubs.cpp deleted file mode 100644 index dfa5d324e7f..00000000000 --- a/dll/opengl/mesa/src/glsl/builtin_stubs.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include -#include "glsl_parser_extras.h" - -/* A dummy file. When compiling prototypes, we don't care about builtins. - * We really don't want to half-compile builtin_functions.cpp and fail, though. - */ -void -_mesa_glsl_release_functions(void) -{ -} - -void -_mesa_glsl_initialize_functions(_mesa_glsl_parse_state *state) -{ - (void) state; -} diff --git a/dll/opengl/mesa/src/glsl/builtin_types.h b/dll/opengl/mesa/src/glsl/builtin_types.h deleted file mode 100644 index cc99b1bdeda..00000000000 --- a/dll/opengl/mesa/src/glsl/builtin_types.h +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Copyright © 2009 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -const glsl_type glsl_type::_error_type = - glsl_type(GL_INVALID_ENUM, GLSL_TYPE_ERROR, 0, 0, ""); - -const glsl_type glsl_type::_void_type = - glsl_type(GL_INVALID_ENUM, GLSL_TYPE_VOID, 0, 0, "void"); - -const glsl_type glsl_type::_sampler3D_type = - glsl_type(GL_SAMPLER_3D, GLSL_SAMPLER_DIM_3D, 0, 0, GLSL_TYPE_FLOAT, - "sampler3D"); - -const glsl_type *const glsl_type::error_type = & glsl_type::_error_type; -const glsl_type *const glsl_type::void_type = & glsl_type::_void_type; - -/** \name Core built-in types - * - * These types exist in all versions of GLSL. - */ -/*@{*/ - -const glsl_type glsl_type::builtin_core_types[] = { - glsl_type(GL_BOOL, GLSL_TYPE_BOOL, 1, 1, "bool"), - glsl_type(GL_BOOL_VEC2, GLSL_TYPE_BOOL, 2, 1, "bvec2"), - glsl_type(GL_BOOL_VEC3, GLSL_TYPE_BOOL, 3, 1, "bvec3"), - glsl_type(GL_BOOL_VEC4, GLSL_TYPE_BOOL, 4, 1, "bvec4"), - glsl_type(GL_INT, GLSL_TYPE_INT, 1, 1, "int"), - glsl_type(GL_INT_VEC2, GLSL_TYPE_INT, 2, 1, "ivec2"), - glsl_type(GL_INT_VEC3, GLSL_TYPE_INT, 3, 1, "ivec3"), - glsl_type(GL_INT_VEC4, GLSL_TYPE_INT, 4, 1, "ivec4"), - glsl_type(GL_FLOAT, GLSL_TYPE_FLOAT, 1, 1, "float"), - glsl_type(GL_FLOAT_VEC2, GLSL_TYPE_FLOAT, 2, 1, "vec2"), - glsl_type(GL_FLOAT_VEC3, GLSL_TYPE_FLOAT, 3, 1, "vec3"), - glsl_type(GL_FLOAT_VEC4, GLSL_TYPE_FLOAT, 4, 1, "vec4"), - glsl_type(GL_FLOAT_MAT2, GLSL_TYPE_FLOAT, 2, 2, "mat2"), - glsl_type(GL_FLOAT_MAT3, GLSL_TYPE_FLOAT, 3, 3, "mat3"), - glsl_type(GL_FLOAT_MAT4, GLSL_TYPE_FLOAT, 4, 4, "mat4"), - glsl_type(GL_SAMPLER_2D, GLSL_SAMPLER_DIM_2D, 0, 0, GLSL_TYPE_FLOAT, - "sampler2D"), - glsl_type(GL_SAMPLER_CUBE, GLSL_SAMPLER_DIM_CUBE, 0, 0, GLSL_TYPE_FLOAT, - "samplerCube"), -}; - -const glsl_type *const glsl_type::bool_type = & builtin_core_types[0]; -const glsl_type *const glsl_type::int_type = & builtin_core_types[4]; -const glsl_type *const glsl_type::ivec4_type = & builtin_core_types[7]; -const glsl_type *const glsl_type::float_type = & builtin_core_types[8]; -const glsl_type *const glsl_type::vec2_type = & builtin_core_types[9]; -const glsl_type *const glsl_type::vec3_type = & builtin_core_types[10]; -const glsl_type *const glsl_type::vec4_type = & builtin_core_types[11]; -const glsl_type *const glsl_type::mat2_type = & builtin_core_types[12]; -const glsl_type *const glsl_type::mat3_type = & builtin_core_types[13]; -const glsl_type *const glsl_type::mat4_type = & builtin_core_types[14]; -/*@}*/ - -/** \name GLSL structures that have not been deprecated. - */ -/*@{*/ - -static const struct glsl_struct_field gl_DepthRangeParameters_fields[] = { - { glsl_type::float_type, "near" }, - { glsl_type::float_type, "far" }, - { glsl_type::float_type, "diff" }, -}; - -const glsl_type glsl_type::builtin_structure_types[] = { - glsl_type(gl_DepthRangeParameters_fields, - Elements(gl_DepthRangeParameters_fields), - "gl_DepthRangeParameters"), -}; -/*@}*/ - -/** \name GLSL 1.00 / 1.10 structures that are deprecated in GLSL 1.30 - */ -/*@{*/ - -static const struct glsl_struct_field gl_PointParameters_fields[] = { - { glsl_type::float_type, "size" }, - { glsl_type::float_type, "sizeMin" }, - { glsl_type::float_type, "sizeMax" }, - { glsl_type::float_type, "fadeThresholdSize" }, - { glsl_type::float_type, "distanceConstantAttenuation" }, - { glsl_type::float_type, "distanceLinearAttenuation" }, - { glsl_type::float_type, "distanceQuadraticAttenuation" }, -}; - -static const struct glsl_struct_field gl_MaterialParameters_fields[] = { - { glsl_type::vec4_type, "emission" }, - { glsl_type::vec4_type, "ambient" }, - { glsl_type::vec4_type, "diffuse" }, - { glsl_type::vec4_type, "specular" }, - { glsl_type::float_type, "shininess" }, -}; - -static const struct glsl_struct_field gl_LightSourceParameters_fields[] = { - { glsl_type::vec4_type, "ambient" }, - { glsl_type::vec4_type, "diffuse" }, - { glsl_type::vec4_type, "specular" }, - { glsl_type::vec4_type, "position" }, - { glsl_type::vec4_type, "halfVector" }, - { glsl_type::vec3_type, "spotDirection" }, - { glsl_type::float_type, "spotExponent" }, - { glsl_type::float_type, "spotCutoff" }, - { glsl_type::float_type, "spotCosCutoff" }, - { glsl_type::float_type, "constantAttenuation" }, - { glsl_type::float_type, "linearAttenuation" }, - { glsl_type::float_type, "quadraticAttenuation" }, -}; - -static const struct glsl_struct_field gl_LightModelParameters_fields[] = { - { glsl_type::vec4_type, "ambient" }, -}; - -static const struct glsl_struct_field gl_LightModelProducts_fields[] = { - { glsl_type::vec4_type, "sceneColor" }, -}; - -static const struct glsl_struct_field gl_LightProducts_fields[] = { - { glsl_type::vec4_type, "ambient" }, - { glsl_type::vec4_type, "diffuse" }, - { glsl_type::vec4_type, "specular" }, -}; - -static const struct glsl_struct_field gl_FogParameters_fields[] = { - { glsl_type::vec4_type, "color" }, - { glsl_type::float_type, "density" }, - { glsl_type::float_type, "start" }, - { glsl_type::float_type, "end" }, - { glsl_type::float_type, "scale" }, -}; - -const glsl_type glsl_type::builtin_110_deprecated_structure_types[] = { - glsl_type(gl_PointParameters_fields, - Elements(gl_PointParameters_fields), - "gl_PointParameters"), - glsl_type(gl_MaterialParameters_fields, - Elements(gl_MaterialParameters_fields), - "gl_MaterialParameters"), - glsl_type(gl_LightSourceParameters_fields, - Elements(gl_LightSourceParameters_fields), - "gl_LightSourceParameters"), - glsl_type(gl_LightModelParameters_fields, - Elements(gl_LightModelParameters_fields), - "gl_LightModelParameters"), - glsl_type(gl_LightModelProducts_fields, - Elements(gl_LightModelProducts_fields), - "gl_LightModelProducts"), - glsl_type(gl_LightProducts_fields, - Elements(gl_LightProducts_fields), - "gl_LightProducts"), - glsl_type(gl_FogParameters_fields, - Elements(gl_FogParameters_fields), - "gl_FogParameters"), -}; -/*@}*/ - -/** \name Types in GLSL 1.10 (but not GLSL ES 1.00) - */ -/*@{*/ -const glsl_type glsl_type::builtin_110_types[] = { - glsl_type(GL_SAMPLER_1D, GLSL_SAMPLER_DIM_1D, 0, 0, GLSL_TYPE_FLOAT, - "sampler1D"), - glsl_type(GL_SAMPLER_1D_SHADOW, GLSL_SAMPLER_DIM_1D, 1, 0, GLSL_TYPE_FLOAT, - "sampler1DShadow"), - glsl_type(GL_SAMPLER_2D_SHADOW, GLSL_SAMPLER_DIM_2D, 1, 0, GLSL_TYPE_FLOAT, - "sampler2DShadow"), -}; -/*@}*/ - -/** \name Types added in GLSL 1.20 - */ -/*@{*/ - -const glsl_type glsl_type::builtin_120_types[] = { - glsl_type(GL_FLOAT_MAT2x3, GLSL_TYPE_FLOAT, 3, 2, "mat2x3"), - glsl_type(GL_FLOAT_MAT2x4, GLSL_TYPE_FLOAT, 4, 2, "mat2x4"), - glsl_type(GL_FLOAT_MAT3x2, GLSL_TYPE_FLOAT, 2, 3, "mat3x2"), - glsl_type(GL_FLOAT_MAT3x4, GLSL_TYPE_FLOAT, 4, 3, "mat3x4"), - glsl_type(GL_FLOAT_MAT4x2, GLSL_TYPE_FLOAT, 2, 4, "mat4x2"), - glsl_type(GL_FLOAT_MAT4x3, GLSL_TYPE_FLOAT, 3, 4, "mat4x3"), -}; -const glsl_type *const glsl_type::mat2x3_type = & builtin_120_types[0]; -const glsl_type *const glsl_type::mat2x4_type = & builtin_120_types[1]; -const glsl_type *const glsl_type::mat3x2_type = & builtin_120_types[2]; -const glsl_type *const glsl_type::mat3x4_type = & builtin_120_types[3]; -const glsl_type *const glsl_type::mat4x2_type = & builtin_120_types[4]; -const glsl_type *const glsl_type::mat4x3_type = & builtin_120_types[5]; -/*@}*/ - -/** \name Types added in GLSL 1.30 - */ -/*@{*/ - -const glsl_type glsl_type::builtin_130_types[] = { - glsl_type(GL_UNSIGNED_INT, GLSL_TYPE_UINT, 1, 1, "uint"), - glsl_type(GL_UNSIGNED_INT_VEC2, GLSL_TYPE_UINT, 2, 1, "uvec2"), - glsl_type(GL_UNSIGNED_INT_VEC3, GLSL_TYPE_UINT, 3, 1, "uvec3"), - glsl_type(GL_UNSIGNED_INT_VEC4, GLSL_TYPE_UINT, 4, 1, "uvec4"), - - /* 1D and 2D texture arrays - several of these are included only in - * builtin_EXT_texture_array_types. - */ - glsl_type(GL_INT_SAMPLER_1D_ARRAY, - GLSL_SAMPLER_DIM_1D, 0, 1, GLSL_TYPE_INT, "isampler1DArray"), - glsl_type(GL_UNSIGNED_INT_SAMPLER_1D_ARRAY, - GLSL_SAMPLER_DIM_1D, 0, 1, GLSL_TYPE_UINT, "usampler1DArray"), - glsl_type(GL_INT_SAMPLER_2D_ARRAY, - GLSL_SAMPLER_DIM_2D, 0, 1, GLSL_TYPE_INT, "isampler2DArray"), - glsl_type(GL_UNSIGNED_INT_SAMPLER_2D_ARRAY, - GLSL_SAMPLER_DIM_2D, 0, 1, GLSL_TYPE_UINT, "usampler2DArray"), - - /* cube shadow samplers */ - glsl_type(GL_SAMPLER_CUBE_SHADOW, - GLSL_SAMPLER_DIM_CUBE, 1, 0, GLSL_TYPE_FLOAT, "samplerCubeShadow"), - - /* signed and unsigned integer samplers */ - glsl_type(GL_INT_SAMPLER_1D, - GLSL_SAMPLER_DIM_1D, 0, 0, GLSL_TYPE_INT, "isampler1D"), - glsl_type(GL_UNSIGNED_INT_SAMPLER_1D, - GLSL_SAMPLER_DIM_1D, 0, 0, GLSL_TYPE_UINT, "usampler1D"), - glsl_type(GL_INT_SAMPLER_2D, - GLSL_SAMPLER_DIM_2D, 0, 0, GLSL_TYPE_INT, "isampler2D"), - glsl_type(GL_UNSIGNED_INT_SAMPLER_2D, - GLSL_SAMPLER_DIM_2D, 0, 0, GLSL_TYPE_UINT, "usampler2D"), - glsl_type(GL_INT_SAMPLER_3D, - GLSL_SAMPLER_DIM_3D, 0, 0, GLSL_TYPE_INT, "isampler3D"), - glsl_type(GL_UNSIGNED_INT_SAMPLER_3D, - GLSL_SAMPLER_DIM_3D, 0, 0, GLSL_TYPE_UINT, "usampler3D"), - glsl_type(GL_INT_SAMPLER_CUBE, - GLSL_SAMPLER_DIM_CUBE, 0, 0, GLSL_TYPE_INT, "isamplerCube"), - glsl_type(GL_INT_SAMPLER_CUBE, - GLSL_SAMPLER_DIM_CUBE, 0, 0, GLSL_TYPE_UINT, "usamplerCube"), -}; - -const glsl_type *const glsl_type::uint_type = & builtin_130_types[0]; -const glsl_type *const glsl_type::uvec2_type = & builtin_130_types[1]; -const glsl_type *const glsl_type::uvec3_type = & builtin_130_types[2]; -const glsl_type *const glsl_type::uvec4_type = & builtin_130_types[3]; -/*@}*/ - -/** \name Sampler types added by GL_ARB_texture_rectangle - */ -/*@{*/ - -const glsl_type glsl_type::builtin_ARB_texture_rectangle_types[] = { - glsl_type(GL_SAMPLER_2D_RECT, - GLSL_SAMPLER_DIM_RECT, 0, 0, GLSL_TYPE_FLOAT, "sampler2DRect"), - glsl_type(GL_SAMPLER_2D_RECT_SHADOW, - GLSL_SAMPLER_DIM_RECT, 1, 0, GLSL_TYPE_FLOAT, "sampler2DRectShadow"), -}; -/*@}*/ - -/** \name Sampler types added by GL_EXT_texture_array - */ -/*@{*/ - -const glsl_type glsl_type::builtin_EXT_texture_array_types[] = { - glsl_type(GL_SAMPLER_1D_ARRAY, - GLSL_SAMPLER_DIM_1D, 0, 1, GLSL_TYPE_FLOAT, "sampler1DArray"), - glsl_type(GL_SAMPLER_2D_ARRAY, - GLSL_SAMPLER_DIM_2D, 0, 1, GLSL_TYPE_FLOAT, "sampler2DArray"), - glsl_type(GL_SAMPLER_1D_ARRAY_SHADOW, - GLSL_SAMPLER_DIM_1D, 1, 1, GLSL_TYPE_FLOAT, "sampler1DArrayShadow"), - glsl_type(GL_SAMPLER_2D_ARRAY_SHADOW, - GLSL_SAMPLER_DIM_2D, 1, 1, GLSL_TYPE_FLOAT, "sampler2DArrayShadow"), -}; -/*@}*/ - -/** \name Sampler types added by GL_EXT_texture_buffer_object - */ -/*@{*/ - -const glsl_type glsl_type::builtin_EXT_texture_buffer_object_types[] = { - glsl_type(GL_SAMPLER_BUFFER, - GLSL_SAMPLER_DIM_BUF, 0, 0, GLSL_TYPE_FLOAT, "samplerBuffer"), - glsl_type(GL_INT_SAMPLER_BUFFER, - GLSL_SAMPLER_DIM_BUF, 0, 0, GLSL_TYPE_INT, "isamplerBuffer"), - glsl_type(GL_UNSIGNED_INT_SAMPLER_BUFFER, - GLSL_SAMPLER_DIM_BUF, 0, 0, GLSL_TYPE_UINT, "usamplerBuffer"), -}; -/*@}*/ - -/** \name Sampler types added by GL_OES_EGL_image_external - */ -/*@{*/ - -const glsl_type glsl_type::builtin_OES_EGL_image_external_types[] = { - glsl_type(GL_SAMPLER_EXTERNAL_OES, - GLSL_SAMPLER_DIM_EXTERNAL, 0, 0, GLSL_TYPE_FLOAT, "samplerExternalOES"), -}; -/*@}*/ diff --git a/dll/opengl/mesa/src/glsl/builtin_variables.cpp b/dll/opengl/mesa/src/glsl/builtin_variables.cpp deleted file mode 100644 index ed6b922ca62..00000000000 --- a/dll/opengl/mesa/src/glsl/builtin_variables.cpp +++ /dev/null @@ -1,1001 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "ir.h" -#include "glsl_parser_extras.h" -#include "glsl_symbol_table.h" -#include "main/core.h" -#include "main/uniforms.h" -#include "program/prog_parameter.h" -#include "program/prog_statevars.h" -#include "program/prog_instruction.h" - -static void generate_ARB_draw_buffers_variables(exec_list *, - struct _mesa_glsl_parse_state *, - bool, _mesa_glsl_parser_targets); - -static void -generate_ARB_draw_instanced_variables(exec_list *, - struct _mesa_glsl_parse_state *, - bool, _mesa_glsl_parser_targets); - -struct builtin_variable { - enum ir_variable_mode mode; - int slot; - const char *type; - const char *name; -}; - -static const builtin_variable builtin_core_vs_variables[] = { - { ir_var_out, VERT_RESULT_HPOS, "vec4", "gl_Position" }, - { ir_var_out, VERT_RESULT_PSIZ, "float", "gl_PointSize" }, -}; - -static const builtin_variable builtin_core_fs_variables[] = { - { ir_var_in, FRAG_ATTRIB_WPOS, "vec4", "gl_FragCoord" }, - { ir_var_in, FRAG_ATTRIB_FACE, "bool", "gl_FrontFacing" }, - { ir_var_out, FRAG_RESULT_COLOR, "vec4", "gl_FragColor" }, -}; - -static const builtin_variable builtin_100ES_fs_variables[] = { - { ir_var_in, FRAG_ATTRIB_PNTC, "vec2", "gl_PointCoord" }, -}; - -static const builtin_variable builtin_110_fs_variables[] = { - { ir_var_out, FRAG_RESULT_DEPTH, "float", "gl_FragDepth" }, -}; - -static const builtin_variable builtin_110_deprecated_fs_variables[] = { - { ir_var_in, FRAG_ATTRIB_COL0, "vec4", "gl_Color" }, - { ir_var_in, FRAG_ATTRIB_COL1, "vec4", "gl_SecondaryColor" }, - { ir_var_in, FRAG_ATTRIB_FOGC, "float", "gl_FogFragCoord" }, -}; - -static const builtin_variable builtin_110_deprecated_vs_variables[] = { - { ir_var_in, VERT_ATTRIB_POS, "vec4", "gl_Vertex" }, - { ir_var_in, VERT_ATTRIB_NORMAL, "vec3", "gl_Normal" }, - { ir_var_in, VERT_ATTRIB_COLOR0, "vec4", "gl_Color" }, - { ir_var_in, VERT_ATTRIB_COLOR1, "vec4", "gl_SecondaryColor" }, - { ir_var_in, VERT_ATTRIB_TEX0, "vec4", "gl_MultiTexCoord0" }, - { ir_var_in, VERT_ATTRIB_TEX1, "vec4", "gl_MultiTexCoord1" }, - { ir_var_in, VERT_ATTRIB_TEX2, "vec4", "gl_MultiTexCoord2" }, - { ir_var_in, VERT_ATTRIB_TEX3, "vec4", "gl_MultiTexCoord3" }, - { ir_var_in, VERT_ATTRIB_TEX4, "vec4", "gl_MultiTexCoord4" }, - { ir_var_in, VERT_ATTRIB_TEX5, "vec4", "gl_MultiTexCoord5" }, - { ir_var_in, VERT_ATTRIB_TEX6, "vec4", "gl_MultiTexCoord6" }, - { ir_var_in, VERT_ATTRIB_TEX7, "vec4", "gl_MultiTexCoord7" }, - { ir_var_in, VERT_ATTRIB_FOG, "float", "gl_FogCoord" }, - { ir_var_out, VERT_RESULT_CLIP_VERTEX, "vec4", "gl_ClipVertex" }, - { ir_var_out, VERT_RESULT_COL0, "vec4", "gl_FrontColor" }, - { ir_var_out, VERT_RESULT_BFC0, "vec4", "gl_BackColor" }, - { ir_var_out, VERT_RESULT_COL1, "vec4", "gl_FrontSecondaryColor" }, - { ir_var_out, VERT_RESULT_BFC1, "vec4", "gl_BackSecondaryColor" }, - { ir_var_out, VERT_RESULT_FOGC, "float", "gl_FogFragCoord" }, -}; - -static const builtin_variable builtin_120_fs_variables[] = { - { ir_var_in, FRAG_ATTRIB_PNTC, "vec2", "gl_PointCoord" }, -}; - -static const builtin_variable builtin_130_vs_variables[] = { - { ir_var_system_value, SYSTEM_VALUE_VERTEX_ID, "int", "gl_VertexID" }, -}; - -static const builtin_variable builtin_110_deprecated_uniforms[] = { - { ir_var_uniform, -1, "mat4", "gl_ModelViewMatrix" }, - { ir_var_uniform, -1, "mat4", "gl_ProjectionMatrix" }, - { ir_var_uniform, -1, "mat4", "gl_ModelViewProjectionMatrix" }, - { ir_var_uniform, -1, "mat3", "gl_NormalMatrix" }, - { ir_var_uniform, -1, "mat4", "gl_ModelViewMatrixInverse" }, - { ir_var_uniform, -1, "mat4", "gl_ProjectionMatrixInverse" }, - { ir_var_uniform, -1, "mat4", "gl_ModelViewProjectionMatrixInverse" }, - { ir_var_uniform, -1, "mat4", "gl_ModelViewMatrixTranspose" }, - { ir_var_uniform, -1, "mat4", "gl_ProjectionMatrixTranspose" }, - { ir_var_uniform, -1, "mat4", "gl_ModelViewProjectionMatrixTranspose" }, - { ir_var_uniform, -1, "mat4", "gl_ModelViewMatrixInverseTranspose" }, - { ir_var_uniform, -1, "mat4", "gl_ProjectionMatrixInverseTranspose" }, - { ir_var_uniform, -1, "mat4", "gl_ModelViewProjectionMatrixInverseTranspose" }, - { ir_var_uniform, -1, "float", "gl_NormalScale" }, - { ir_var_uniform, -1, "gl_LightModelParameters", "gl_LightModel"}, - - /* Mesa-internal ATI_envmap_bumpmap state. */ - { ir_var_uniform, -1, "vec2", "gl_BumpRotMatrix0MESA"}, - { ir_var_uniform, -1, "vec2", "gl_BumpRotMatrix1MESA"}, - { ir_var_uniform, -1, "vec4", "gl_FogParamsOptimizedMESA"}, -}; - -static struct gl_builtin_uniform_element gl_DepthRange_elements[] = { - {"near", {STATE_DEPTH_RANGE, 0, 0}, SWIZZLE_XXXX}, - {"far", {STATE_DEPTH_RANGE, 0, 0}, SWIZZLE_YYYY}, - {"diff", {STATE_DEPTH_RANGE, 0, 0}, SWIZZLE_ZZZZ}, -}; - -static struct gl_builtin_uniform_element gl_ClipPlane_elements[] = { - {NULL, {STATE_CLIPPLANE, 0, 0}, SWIZZLE_XYZW} -}; - -static struct gl_builtin_uniform_element gl_Point_elements[] = { - {"size", {STATE_POINT_SIZE}, SWIZZLE_XXXX}, - {"sizeMin", {STATE_POINT_SIZE}, SWIZZLE_YYYY}, - {"sizeMax", {STATE_POINT_SIZE}, SWIZZLE_ZZZZ}, - {"fadeThresholdSize", {STATE_POINT_SIZE}, SWIZZLE_WWWW}, - {"distanceConstantAttenuation", {STATE_POINT_ATTENUATION}, SWIZZLE_XXXX}, - {"distanceLinearAttenuation", {STATE_POINT_ATTENUATION}, SWIZZLE_YYYY}, - {"distanceQuadraticAttenuation", {STATE_POINT_ATTENUATION}, SWIZZLE_ZZZZ}, -}; - -static struct gl_builtin_uniform_element gl_FrontMaterial_elements[] = { - {"emission", {STATE_MATERIAL, 0, STATE_EMISSION}, SWIZZLE_XYZW}, - {"ambient", {STATE_MATERIAL, 0, STATE_AMBIENT}, SWIZZLE_XYZW}, - {"diffuse", {STATE_MATERIAL, 0, STATE_DIFFUSE}, SWIZZLE_XYZW}, - {"specular", {STATE_MATERIAL, 0, STATE_SPECULAR}, SWIZZLE_XYZW}, - {"shininess", {STATE_MATERIAL, 0, STATE_SHININESS}, SWIZZLE_XXXX}, -}; - -static struct gl_builtin_uniform_element gl_BackMaterial_elements[] = { - {"emission", {STATE_MATERIAL, 1, STATE_EMISSION}, SWIZZLE_XYZW}, - {"ambient", {STATE_MATERIAL, 1, STATE_AMBIENT}, SWIZZLE_XYZW}, - {"diffuse", {STATE_MATERIAL, 1, STATE_DIFFUSE}, SWIZZLE_XYZW}, - {"specular", {STATE_MATERIAL, 1, STATE_SPECULAR}, SWIZZLE_XYZW}, - {"shininess", {STATE_MATERIAL, 1, STATE_SHININESS}, SWIZZLE_XXXX}, -}; - -static struct gl_builtin_uniform_element gl_LightSource_elements[] = { - {"ambient", {STATE_LIGHT, 0, STATE_AMBIENT}, SWIZZLE_XYZW}, - {"diffuse", {STATE_LIGHT, 0, STATE_DIFFUSE}, SWIZZLE_XYZW}, - {"specular", {STATE_LIGHT, 0, STATE_SPECULAR}, SWIZZLE_XYZW}, - {"position", {STATE_LIGHT, 0, STATE_POSITION}, SWIZZLE_XYZW}, - {"halfVector", {STATE_LIGHT, 0, STATE_HALF_VECTOR}, SWIZZLE_XYZW}, - {"spotDirection", {STATE_LIGHT, 0, STATE_SPOT_DIRECTION}, - MAKE_SWIZZLE4(SWIZZLE_X, - SWIZZLE_Y, - SWIZZLE_Z, - SWIZZLE_Z)}, - {"spotCosCutoff", {STATE_LIGHT, 0, STATE_SPOT_DIRECTION}, SWIZZLE_WWWW}, - {"spotCutoff", {STATE_LIGHT, 0, STATE_SPOT_CUTOFF}, SWIZZLE_XXXX}, - {"spotExponent", {STATE_LIGHT, 0, STATE_ATTENUATION}, SWIZZLE_WWWW}, - {"constantAttenuation", {STATE_LIGHT, 0, STATE_ATTENUATION}, SWIZZLE_XXXX}, - {"linearAttenuation", {STATE_LIGHT, 0, STATE_ATTENUATION}, SWIZZLE_YYYY}, - {"quadraticAttenuation", {STATE_LIGHT, 0, STATE_ATTENUATION}, SWIZZLE_ZZZZ}, -}; - -static struct gl_builtin_uniform_element gl_LightModel_elements[] = { - {"ambient", {STATE_LIGHTMODEL_AMBIENT, 0}, SWIZZLE_XYZW}, -}; - -static struct gl_builtin_uniform_element gl_FrontLightModelProduct_elements[] = { - {"sceneColor", {STATE_LIGHTMODEL_SCENECOLOR, 0}, SWIZZLE_XYZW}, -}; - -static struct gl_builtin_uniform_element gl_BackLightModelProduct_elements[] = { - {"sceneColor", {STATE_LIGHTMODEL_SCENECOLOR, 1}, SWIZZLE_XYZW}, -}; - -static struct gl_builtin_uniform_element gl_FrontLightProduct_elements[] = { - {"ambient", {STATE_LIGHTPROD, 0, 0, STATE_AMBIENT}, SWIZZLE_XYZW}, - {"diffuse", {STATE_LIGHTPROD, 0, 0, STATE_DIFFUSE}, SWIZZLE_XYZW}, - {"specular", {STATE_LIGHTPROD, 0, 0, STATE_SPECULAR}, SWIZZLE_XYZW}, -}; - -static struct gl_builtin_uniform_element gl_BackLightProduct_elements[] = { - {"ambient", {STATE_LIGHTPROD, 0, 1, STATE_AMBIENT}, SWIZZLE_XYZW}, - {"diffuse", {STATE_LIGHTPROD, 0, 1, STATE_DIFFUSE}, SWIZZLE_XYZW}, - {"specular", {STATE_LIGHTPROD, 0, 1, STATE_SPECULAR}, SWIZZLE_XYZW}, -}; - -static struct gl_builtin_uniform_element gl_TextureEnvColor_elements[] = { - {NULL, {STATE_TEXENV_COLOR, 0}, SWIZZLE_XYZW}, -}; - -static struct gl_builtin_uniform_element gl_EyePlaneS_elements[] = { - {NULL, {STATE_TEXGEN, 0, STATE_TEXGEN_EYE_S}, SWIZZLE_XYZW}, -}; - -static struct gl_builtin_uniform_element gl_EyePlaneT_elements[] = { - {NULL, {STATE_TEXGEN, 0, STATE_TEXGEN_EYE_T}, SWIZZLE_XYZW}, -}; - -static struct gl_builtin_uniform_element gl_EyePlaneR_elements[] = { - {NULL, {STATE_TEXGEN, 0, STATE_TEXGEN_EYE_R}, SWIZZLE_XYZW}, -}; - -static struct gl_builtin_uniform_element gl_EyePlaneQ_elements[] = { - {NULL, {STATE_TEXGEN, 0, STATE_TEXGEN_EYE_Q}, SWIZZLE_XYZW}, -}; - -static struct gl_builtin_uniform_element gl_ObjectPlaneS_elements[] = { - {NULL, {STATE_TEXGEN, 0, STATE_TEXGEN_OBJECT_S}, SWIZZLE_XYZW}, -}; - -static struct gl_builtin_uniform_element gl_ObjectPlaneT_elements[] = { - {NULL, {STATE_TEXGEN, 0, STATE_TEXGEN_OBJECT_T}, SWIZZLE_XYZW}, -}; - -static struct gl_builtin_uniform_element gl_ObjectPlaneR_elements[] = { - {NULL, {STATE_TEXGEN, 0, STATE_TEXGEN_OBJECT_R}, SWIZZLE_XYZW}, -}; - -static struct gl_builtin_uniform_element gl_ObjectPlaneQ_elements[] = { - {NULL, {STATE_TEXGEN, 0, STATE_TEXGEN_OBJECT_Q}, SWIZZLE_XYZW}, -}; - -static struct gl_builtin_uniform_element gl_Fog_elements[] = { - {"color", {STATE_FOG_COLOR}, SWIZZLE_XYZW}, - {"density", {STATE_FOG_PARAMS}, SWIZZLE_XXXX}, - {"start", {STATE_FOG_PARAMS}, SWIZZLE_YYYY}, - {"end", {STATE_FOG_PARAMS}, SWIZZLE_ZZZZ}, - {"scale", {STATE_FOG_PARAMS}, SWIZZLE_WWWW}, -}; - -static struct gl_builtin_uniform_element gl_NormalScale_elements[] = { - {NULL, {STATE_NORMAL_SCALE}, SWIZZLE_XXXX}, -}; - -static struct gl_builtin_uniform_element gl_BumpRotMatrix0MESA_elements[] = { - {NULL, {STATE_INTERNAL, STATE_ROT_MATRIX_0}, SWIZZLE_XYZW}, -}; - -static struct gl_builtin_uniform_element gl_BumpRotMatrix1MESA_elements[] = { - {NULL, {STATE_INTERNAL, STATE_ROT_MATRIX_1}, SWIZZLE_XYZW}, -}; - -static struct gl_builtin_uniform_element gl_FogParamsOptimizedMESA_elements[] = { - {NULL, {STATE_INTERNAL, STATE_FOG_PARAMS_OPTIMIZED}, SWIZZLE_XYZW}, -}; - -static struct gl_builtin_uniform_element gl_CurrentAttribVertMESA_elements[] = { - {NULL, {STATE_INTERNAL, STATE_CURRENT_ATTRIB, 0}, SWIZZLE_XYZW}, -}; - -static struct gl_builtin_uniform_element gl_CurrentAttribFragMESA_elements[] = { - {NULL, {STATE_INTERNAL, STATE_CURRENT_ATTRIB_MAYBE_VP_CLAMPED, 0}, SWIZZLE_XYZW}, -}; - -#define MATRIX(name, statevar, modifier) \ - static struct gl_builtin_uniform_element name ## _elements[] = { \ - { NULL, { statevar, 0, 0, 0, modifier}, SWIZZLE_XYZW }, \ - { NULL, { statevar, 0, 1, 1, modifier}, SWIZZLE_XYZW }, \ - { NULL, { statevar, 0, 2, 2, modifier}, SWIZZLE_XYZW }, \ - { NULL, { statevar, 0, 3, 3, modifier}, SWIZZLE_XYZW }, \ - } - -MATRIX(gl_ModelViewMatrix, - STATE_MODELVIEW_MATRIX, STATE_MATRIX_TRANSPOSE); -MATRIX(gl_ModelViewMatrixInverse, - STATE_MODELVIEW_MATRIX, STATE_MATRIX_INVTRANS); -MATRIX(gl_ModelViewMatrixTranspose, - STATE_MODELVIEW_MATRIX, 0); -MATRIX(gl_ModelViewMatrixInverseTranspose, - STATE_MODELVIEW_MATRIX, STATE_MATRIX_INVERSE); - -MATRIX(gl_ProjectionMatrix, - STATE_PROJECTION_MATRIX, STATE_MATRIX_TRANSPOSE); -MATRIX(gl_ProjectionMatrixInverse, - STATE_PROJECTION_MATRIX, STATE_MATRIX_INVTRANS); -MATRIX(gl_ProjectionMatrixTranspose, - STATE_PROJECTION_MATRIX, 0); -MATRIX(gl_ProjectionMatrixInverseTranspose, - STATE_PROJECTION_MATRIX, STATE_MATRIX_INVERSE); - -MATRIX(gl_ModelViewProjectionMatrix, - STATE_MVP_MATRIX, STATE_MATRIX_TRANSPOSE); -MATRIX(gl_ModelViewProjectionMatrixInverse, - STATE_MVP_MATRIX, STATE_MATRIX_INVTRANS); -MATRIX(gl_ModelViewProjectionMatrixTranspose, - STATE_MVP_MATRIX, 0); -MATRIX(gl_ModelViewProjectionMatrixInverseTranspose, - STATE_MVP_MATRIX, STATE_MATRIX_INVERSE); - -MATRIX(gl_TextureMatrix, - STATE_TEXTURE_MATRIX, STATE_MATRIX_TRANSPOSE); -MATRIX(gl_TextureMatrixInverse, - STATE_TEXTURE_MATRIX, STATE_MATRIX_INVTRANS); -MATRIX(gl_TextureMatrixTranspose, - STATE_TEXTURE_MATRIX, 0); -MATRIX(gl_TextureMatrixInverseTranspose, - STATE_TEXTURE_MATRIX, STATE_MATRIX_INVERSE); - -static struct gl_builtin_uniform_element gl_NormalMatrix_elements[] = { - { NULL, { STATE_MODELVIEW_MATRIX, 0, 0, 0, STATE_MATRIX_INVERSE}, - MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_Z) }, - { NULL, { STATE_MODELVIEW_MATRIX, 0, 1, 1, STATE_MATRIX_INVERSE}, - MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_Z) }, - { NULL, { STATE_MODELVIEW_MATRIX, 0, 2, 2, STATE_MATRIX_INVERSE}, - MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_Z) }, -}; - -#undef MATRIX - -#define STATEVAR(name) {#name, name ## _elements, Elements(name ## _elements)} - -const struct gl_builtin_uniform_desc _mesa_builtin_uniform_desc[] = { - STATEVAR(gl_DepthRange), - STATEVAR(gl_ClipPlane), - STATEVAR(gl_Point), - STATEVAR(gl_FrontMaterial), - STATEVAR(gl_BackMaterial), - STATEVAR(gl_LightSource), - STATEVAR(gl_LightModel), - STATEVAR(gl_FrontLightModelProduct), - STATEVAR(gl_BackLightModelProduct), - STATEVAR(gl_FrontLightProduct), - STATEVAR(gl_BackLightProduct), - STATEVAR(gl_TextureEnvColor), - STATEVAR(gl_EyePlaneS), - STATEVAR(gl_EyePlaneT), - STATEVAR(gl_EyePlaneR), - STATEVAR(gl_EyePlaneQ), - STATEVAR(gl_ObjectPlaneS), - STATEVAR(gl_ObjectPlaneT), - STATEVAR(gl_ObjectPlaneR), - STATEVAR(gl_ObjectPlaneQ), - STATEVAR(gl_Fog), - - STATEVAR(gl_ModelViewMatrix), - STATEVAR(gl_ModelViewMatrixInverse), - STATEVAR(gl_ModelViewMatrixTranspose), - STATEVAR(gl_ModelViewMatrixInverseTranspose), - - STATEVAR(gl_ProjectionMatrix), - STATEVAR(gl_ProjectionMatrixInverse), - STATEVAR(gl_ProjectionMatrixTranspose), - STATEVAR(gl_ProjectionMatrixInverseTranspose), - - STATEVAR(gl_ModelViewProjectionMatrix), - STATEVAR(gl_ModelViewProjectionMatrixInverse), - STATEVAR(gl_ModelViewProjectionMatrixTranspose), - STATEVAR(gl_ModelViewProjectionMatrixInverseTranspose), - - STATEVAR(gl_TextureMatrix), - STATEVAR(gl_TextureMatrixInverse), - STATEVAR(gl_TextureMatrixTranspose), - STATEVAR(gl_TextureMatrixInverseTranspose), - - STATEVAR(gl_NormalMatrix), - STATEVAR(gl_NormalScale), - - STATEVAR(gl_BumpRotMatrix0MESA), - STATEVAR(gl_BumpRotMatrix1MESA), - STATEVAR(gl_FogParamsOptimizedMESA), - STATEVAR(gl_CurrentAttribVertMESA), - STATEVAR(gl_CurrentAttribFragMESA), - - {NULL, NULL, 0} -}; - -static ir_variable * -add_variable(exec_list *instructions, glsl_symbol_table *symtab, - const char *name, const glsl_type *type, - enum ir_variable_mode mode, int slot) -{ - ir_variable *var = new(symtab) ir_variable(type, name, mode); - - switch (var->mode) { - case ir_var_auto: - case ir_var_in: - case ir_var_const_in: - case ir_var_uniform: - case ir_var_system_value: - var->read_only = true; - break; - case ir_var_inout: - case ir_var_out: - break; - default: - assert(0); - break; - } - - var->location = slot; - var->explicit_location = (slot >= 0); - - /* Once the variable is created an initialized, add it to the symbol table - * and add the declaration to the IR stream. - */ - instructions->push_tail(var); - - symtab->add_variable(var); - return var; -} - -static ir_variable * -add_uniform(exec_list *instructions, glsl_symbol_table *symtab, - const char *name, const glsl_type *type) -{ - ir_variable *const uni = - add_variable(instructions, symtab, name, type, ir_var_uniform, -1); - - unsigned i; - for (i = 0; _mesa_builtin_uniform_desc[i].name != NULL; i++) { - if (strcmp(_mesa_builtin_uniform_desc[i].name, name) == 0) { - break; - } - } - - assert(_mesa_builtin_uniform_desc[i].name != NULL); - const struct gl_builtin_uniform_desc* const statevar = - &_mesa_builtin_uniform_desc[i]; - - const unsigned array_count = type->is_array() ? type->length : 1; - uni->num_state_slots = array_count * statevar->num_elements; - - ir_state_slot *slots = - ralloc_array(uni, ir_state_slot, uni->num_state_slots); - - uni->state_slots = slots; - - for (unsigned a = 0; a < array_count; a++) { - for (unsigned j = 0; j < statevar->num_elements; j++) { - struct gl_builtin_uniform_element *element = &statevar->elements[j]; - - memcpy(slots->tokens, element->tokens, sizeof(element->tokens)); - if (type->is_array()) { - if (strcmp(name, "gl_CurrentAttribVertMESA") == 0 || - strcmp(name, "gl_CurrentAttribFragMESA") == 0) { - slots->tokens[2] = a; - } else { - slots->tokens[1] = a; - } - } - - slots->swizzle = element->swizzle; - slots++; - } - } - - return uni; -} - -static void -add_builtin_variable(exec_list *instructions, glsl_symbol_table *symtab, - const builtin_variable *proto) -{ - /* Create a new variable declaration from the description supplied by - * the caller. - */ - const glsl_type *const type = symtab->get_type(proto->type); - - assert(type != NULL); - - if (proto->mode == ir_var_uniform) { - add_uniform(instructions, symtab, proto->name, type); - } else { - add_variable(instructions, symtab, proto->name, type, proto->mode, - proto->slot); - } -} - -static ir_variable * -add_builtin_constant(exec_list *instructions, glsl_symbol_table *symtab, - const char *name, int value) -{ - ir_variable *const var = add_variable(instructions, symtab, - name, glsl_type::int_type, - ir_var_auto, -1); - var->constant_value = new(var) ir_constant(value); - var->constant_initializer = new(var) ir_constant(value); - var->has_initializer = true; - return var; -} - -/* Several constants in GLSL ES have different names than normal desktop GLSL. - * Therefore, this function should only be called on the ES path. - */ -static void -generate_100ES_uniforms(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - glsl_symbol_table *const symtab = state->symbols; - - add_builtin_constant(instructions, symtab, "gl_MaxVertexAttribs", - state->Const.MaxVertexAttribs); - add_builtin_constant(instructions, symtab, "gl_MaxVertexUniformVectors", - state->Const.MaxVertexUniformComponents); - add_builtin_constant(instructions, symtab, "gl_MaxVaryingVectors", - state->Const.MaxVaryingFloats / 4); - add_builtin_constant(instructions, symtab, "gl_MaxVertexTextureImageUnits", - state->Const.MaxVertexTextureImageUnits); - add_builtin_constant(instructions, symtab, "gl_MaxCombinedTextureImageUnits", - state->Const.MaxCombinedTextureImageUnits); - add_builtin_constant(instructions, symtab, "gl_MaxTextureImageUnits", - state->Const.MaxTextureImageUnits); - add_builtin_constant(instructions, symtab, "gl_MaxFragmentUniformVectors", - state->Const.MaxFragmentUniformComponents); - - add_uniform(instructions, symtab, "gl_DepthRange", - state->symbols->get_type("gl_DepthRangeParameters")); -} - -static void -generate_110_uniforms(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - glsl_symbol_table *const symtab = state->symbols; - - for (unsigned i = 0 - ; i < Elements(builtin_110_deprecated_uniforms) - ; i++) { - add_builtin_variable(instructions, symtab, - & builtin_110_deprecated_uniforms[i]); - } - - add_builtin_constant(instructions, symtab, "gl_MaxLights", - state->Const.MaxLights); - add_builtin_constant(instructions, symtab, "gl_MaxClipPlanes", - state->Const.MaxClipPlanes); - add_builtin_constant(instructions, symtab, "gl_MaxTextureUnits", - state->Const.MaxTextureUnits); - add_builtin_constant(instructions, symtab, "gl_MaxTextureCoords", - state->Const.MaxTextureCoords); - add_builtin_constant(instructions, symtab, "gl_MaxVertexAttribs", - state->Const.MaxVertexAttribs); - add_builtin_constant(instructions, symtab, "gl_MaxVertexUniformComponents", - state->Const.MaxVertexUniformComponents); - add_builtin_constant(instructions, symtab, "gl_MaxVaryingFloats", - state->Const.MaxVaryingFloats); - add_builtin_constant(instructions, symtab, "gl_MaxVertexTextureImageUnits", - state->Const.MaxVertexTextureImageUnits); - add_builtin_constant(instructions, symtab, "gl_MaxCombinedTextureImageUnits", - state->Const.MaxCombinedTextureImageUnits); - add_builtin_constant(instructions, symtab, "gl_MaxTextureImageUnits", - state->Const.MaxTextureImageUnits); - add_builtin_constant(instructions, symtab, "gl_MaxFragmentUniformComponents", - state->Const.MaxFragmentUniformComponents); - - const glsl_type *const mat4_array_type = - glsl_type::get_array_instance(glsl_type::mat4_type, - state->Const.MaxTextureCoords); - - add_uniform(instructions, symtab, "gl_TextureMatrix", mat4_array_type); - add_uniform(instructions, symtab, "gl_TextureMatrixInverse", mat4_array_type); - add_uniform(instructions, symtab, "gl_TextureMatrixTranspose", mat4_array_type); - add_uniform(instructions, symtab, "gl_TextureMatrixInverseTranspose", mat4_array_type); - - add_uniform(instructions, symtab, "gl_DepthRange", - symtab->get_type("gl_DepthRangeParameters")); - - add_uniform(instructions, symtab, "gl_ClipPlane", - glsl_type::get_array_instance(glsl_type::vec4_type, - state->Const.MaxClipPlanes)); - add_uniform(instructions, symtab, "gl_Point", - symtab->get_type("gl_PointParameters")); - - const glsl_type *const material_parameters_type = - symtab->get_type("gl_MaterialParameters"); - add_uniform(instructions, symtab, "gl_FrontMaterial", material_parameters_type); - add_uniform(instructions, symtab, "gl_BackMaterial", material_parameters_type); - - const glsl_type *const light_source_array_type = - glsl_type::get_array_instance(symtab->get_type("gl_LightSourceParameters"), state->Const.MaxLights); - - add_uniform(instructions, symtab, "gl_LightSource", light_source_array_type); - - const glsl_type *const light_model_products_type = - symtab->get_type("gl_LightModelProducts"); - add_uniform(instructions, symtab, "gl_FrontLightModelProduct", - light_model_products_type); - add_uniform(instructions, symtab, "gl_BackLightModelProduct", - light_model_products_type); - - const glsl_type *const light_products_type = - glsl_type::get_array_instance(symtab->get_type("gl_LightProducts"), - state->Const.MaxLights); - add_uniform(instructions, symtab, "gl_FrontLightProduct", light_products_type); - add_uniform(instructions, symtab, "gl_BackLightProduct", light_products_type); - - add_uniform(instructions, symtab, "gl_TextureEnvColor", - glsl_type::get_array_instance(glsl_type::vec4_type, - state->Const.MaxTextureUnits)); - - const glsl_type *const texcoords_vec4 = - glsl_type::get_array_instance(glsl_type::vec4_type, - state->Const.MaxTextureCoords); - add_uniform(instructions, symtab, "gl_EyePlaneS", texcoords_vec4); - add_uniform(instructions, symtab, "gl_EyePlaneT", texcoords_vec4); - add_uniform(instructions, symtab, "gl_EyePlaneR", texcoords_vec4); - add_uniform(instructions, symtab, "gl_EyePlaneQ", texcoords_vec4); - add_uniform(instructions, symtab, "gl_ObjectPlaneS", texcoords_vec4); - add_uniform(instructions, symtab, "gl_ObjectPlaneT", texcoords_vec4); - add_uniform(instructions, symtab, "gl_ObjectPlaneR", texcoords_vec4); - add_uniform(instructions, symtab, "gl_ObjectPlaneQ", texcoords_vec4); - - add_uniform(instructions, symtab, "gl_Fog", - symtab->get_type("gl_FogParameters")); - - /* Mesa-internal current attrib state */ - const glsl_type *const vert_attribs = - glsl_type::get_array_instance(glsl_type::vec4_type, VERT_ATTRIB_MAX); - add_uniform(instructions, symtab, "gl_CurrentAttribVertMESA", vert_attribs); - const glsl_type *const frag_attribs = - glsl_type::get_array_instance(glsl_type::vec4_type, FRAG_ATTRIB_MAX); - add_uniform(instructions, symtab, "gl_CurrentAttribFragMESA", frag_attribs); -} - -/* This function should only be called for ES, not desktop GL. */ -static void -generate_100ES_vs_variables(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - for (unsigned i = 0; i < Elements(builtin_core_vs_variables); i++) { - add_builtin_variable(instructions, state->symbols, - & builtin_core_vs_variables[i]); - } - - generate_100ES_uniforms(instructions, state); - - generate_ARB_draw_buffers_variables(instructions, state, false, - vertex_shader); -} - - -static void -generate_110_vs_variables(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - for (unsigned i = 0; i < Elements(builtin_core_vs_variables); i++) { - add_builtin_variable(instructions, state->symbols, - & builtin_core_vs_variables[i]); - } - - for (unsigned i = 0 - ; i < Elements(builtin_110_deprecated_vs_variables) - ; i++) { - add_builtin_variable(instructions, state->symbols, - & builtin_110_deprecated_vs_variables[i]); - } - generate_110_uniforms(instructions, state); - - /* From page 54 (page 60 of the PDF) of the GLSL 1.20 spec: - * - * "As with all arrays, indices used to subscript gl_TexCoord must - * either be an integral constant expressions, or this array must be - * re-declared by the shader with a size. The size can be at most - * gl_MaxTextureCoords. Using indexes close to 0 may aid the - * implementation in preserving varying resources." - */ - const glsl_type *const vec4_array_type = - glsl_type::get_array_instance(glsl_type::vec4_type, 0); - - add_variable(instructions, state->symbols, - "gl_TexCoord", vec4_array_type, ir_var_out, VERT_RESULT_TEX0); - - generate_ARB_draw_buffers_variables(instructions, state, false, - vertex_shader); -} - - -static void -generate_120_vs_variables(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - /* GLSL version 1.20 did not add any built-in variables in the vertex - * shader. - */ - generate_110_vs_variables(instructions, state); -} - - -static void -generate_130_uniforms(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - glsl_symbol_table *const symtab = state->symbols; - - add_builtin_constant(instructions, symtab, "gl_MaxClipDistances", - state->Const.MaxClipPlanes); - add_builtin_constant(instructions, symtab, "gl_MaxVaryingComponents", - state->Const.MaxVaryingFloats); -} - - -static void -generate_130_vs_variables(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - generate_120_vs_variables(instructions, state); - - for (unsigned i = 0; i < Elements(builtin_130_vs_variables); i++) { - add_builtin_variable(instructions, state->symbols, - & builtin_130_vs_variables[i]); - } - - generate_130_uniforms(instructions, state); - - /* From the GLSL 1.30 spec, section 7.1 (Vertex Shader Special - * Variables): - * - * The gl_ClipDistance array is predeclared as unsized and must - * be sized by the shader either redeclaring it with a size or - * indexing it only with integral constant expressions. - * - * We represent this in Mesa by initially declaring the array as - * size 0. - */ - const glsl_type *const clip_distance_array_type = - glsl_type::get_array_instance(glsl_type::float_type, 0); - - add_variable(instructions, state->symbols, - "gl_ClipDistance", clip_distance_array_type, ir_var_out, - VERT_RESULT_CLIP_DIST0); - -} - - -static void -initialize_vs_variables(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - - switch (state->language_version) { - case 100: - generate_100ES_vs_variables(instructions, state); - break; - case 110: - generate_110_vs_variables(instructions, state); - break; - case 120: - generate_120_vs_variables(instructions, state); - break; - case 130: - generate_130_vs_variables(instructions, state); - break; - } - - if (state->ARB_draw_instanced_enable) - generate_ARB_draw_instanced_variables(instructions, state, false, - vertex_shader); -} - - -/* This function should only be called for ES, not desktop GL. */ -static void -generate_100ES_fs_variables(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - for (unsigned i = 0; i < Elements(builtin_core_fs_variables); i++) { - add_builtin_variable(instructions, state->symbols, - & builtin_core_fs_variables[i]); - } - - for (unsigned i = 0; i < Elements(builtin_100ES_fs_variables); i++) { - add_builtin_variable(instructions, state->symbols, - & builtin_100ES_fs_variables[i]); - } - - generate_100ES_uniforms(instructions, state); - - generate_ARB_draw_buffers_variables(instructions, state, false, - fragment_shader); -} - -static void -generate_110_fs_variables(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - for (unsigned i = 0; i < Elements(builtin_core_fs_variables); i++) { - add_builtin_variable(instructions, state->symbols, - & builtin_core_fs_variables[i]); - } - - for (unsigned i = 0; i < Elements(builtin_110_fs_variables); i++) { - add_builtin_variable(instructions, state->symbols, - & builtin_110_fs_variables[i]); - } - - for (unsigned i = 0 - ; i < Elements(builtin_110_deprecated_fs_variables) - ; i++) { - add_builtin_variable(instructions, state->symbols, - & builtin_110_deprecated_fs_variables[i]); - } - generate_110_uniforms(instructions, state); - - /* From page 54 (page 60 of the PDF) of the GLSL 1.20 spec: - * - * "As with all arrays, indices used to subscript gl_TexCoord must - * either be an integral constant expressions, or this array must be - * re-declared by the shader with a size. The size can be at most - * gl_MaxTextureCoords. Using indexes close to 0 may aid the - * implementation in preserving varying resources." - */ - const glsl_type *const vec4_array_type = - glsl_type::get_array_instance(glsl_type::vec4_type, 0); - - add_variable(instructions, state->symbols, - "gl_TexCoord", vec4_array_type, ir_var_in, FRAG_ATTRIB_TEX0); - - generate_ARB_draw_buffers_variables(instructions, state, false, - fragment_shader); -} - - -static void -generate_ARB_draw_buffers_variables(exec_list *instructions, - struct _mesa_glsl_parse_state *state, - bool warn, _mesa_glsl_parser_targets target) -{ - /* gl_MaxDrawBuffers is available in all shader stages. - */ - ir_variable *const mdb = - add_builtin_constant(instructions, state->symbols, "gl_MaxDrawBuffers", - state->Const.MaxDrawBuffers); - - if (warn) - mdb->warn_extension = "GL_ARB_draw_buffers"; - - /* gl_FragData is only available in the fragment shader. - */ - if (target == fragment_shader) { - const glsl_type *const vec4_array_type = - glsl_type::get_array_instance(glsl_type::vec4_type, - state->Const.MaxDrawBuffers); - - ir_variable *const fd = - add_variable(instructions, state->symbols, - "gl_FragData", vec4_array_type, - ir_var_out, FRAG_RESULT_DATA0); - - if (warn) - fd->warn_extension = "GL_ARB_draw_buffers"; - } -} - - -static void -generate_ARB_draw_instanced_variables(exec_list *instructions, - struct _mesa_glsl_parse_state *state, - bool warn, - _mesa_glsl_parser_targets target) -{ - /* gl_InstanceIDARB is only available in the vertex shader. - */ - if (target == vertex_shader) { - ir_variable *const inst = - add_variable(instructions, state->symbols, - "gl_InstanceIDARB", glsl_type::int_type, - ir_var_system_value, SYSTEM_VALUE_INSTANCE_ID); - - if (warn) - inst->warn_extension = "GL_ARB_draw_instanced"; - } -} - - -static void -generate_ARB_shader_stencil_export_variables(exec_list *instructions, - struct _mesa_glsl_parse_state *state, - bool warn) -{ - /* gl_FragStencilRefARB is only available in the fragment shader. - */ - ir_variable *const fd = - add_variable(instructions, state->symbols, - "gl_FragStencilRefARB", glsl_type::int_type, - ir_var_out, FRAG_RESULT_STENCIL); - - if (warn) - fd->warn_extension = "GL_ARB_shader_stencil_export"; -} - -static void -generate_AMD_shader_stencil_export_variables(exec_list *instructions, - struct _mesa_glsl_parse_state *state, - bool warn) -{ - /* gl_FragStencilRefAMD is only available in the fragment shader. - */ - ir_variable *const fd = - add_variable(instructions, state->symbols, - "gl_FragStencilRefAMD", glsl_type::int_type, - ir_var_out, FRAG_RESULT_STENCIL); - - if (warn) - fd->warn_extension = "GL_AMD_shader_stencil_export"; -} - -static void -generate_120_fs_variables(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - generate_110_fs_variables(instructions, state); - - for (unsigned i = 0 - ; i < Elements(builtin_120_fs_variables) - ; i++) { - add_builtin_variable(instructions, state->symbols, - & builtin_120_fs_variables[i]); - } -} - -static void -generate_130_fs_variables(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - generate_120_fs_variables(instructions, state); - - generate_130_uniforms(instructions, state); - - /* From the GLSL 1.30 spec, section 7.2 (Fragment Shader Special - * Variables): - * - * The built-in input variable gl_ClipDistance array contains linearly - * interpolated values for the vertex values written by the vertex shader - * to the gl_ClipDistance vertex output variable. This array must be - * sized in the fragment shader either implicitly or explicitly to be the - * same size as it was sized in the vertex shader. - * - * In other words, the array must be pre-declared as implicitly sized. We - * represent this in Mesa by initially declaring the array as size 0. - */ - const glsl_type *const clip_distance_array_type = - glsl_type::get_array_instance(glsl_type::float_type, 0); - - add_variable(instructions, state->symbols, - "gl_ClipDistance", clip_distance_array_type, ir_var_in, - FRAG_ATTRIB_CLIP_DIST0); -} - -static void -initialize_fs_variables(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - - switch (state->language_version) { - case 100: - generate_100ES_fs_variables(instructions, state); - break; - case 110: - generate_110_fs_variables(instructions, state); - break; - case 120: - generate_120_fs_variables(instructions, state); - break; - case 130: - generate_130_fs_variables(instructions, state); - break; - } - - if (state->ARB_shader_stencil_export_enable) - generate_ARB_shader_stencil_export_variables(instructions, state, - state->ARB_shader_stencil_export_warn); - - if (state->AMD_shader_stencil_export_enable) - generate_AMD_shader_stencil_export_variables(instructions, state, - state->AMD_shader_stencil_export_warn); -} - -void -_mesa_glsl_initialize_variables(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - switch (state->target) { - case vertex_shader: - initialize_vs_variables(instructions, state); - break; - case geometry_shader: - break; - case fragment_shader: - initialize_fs_variables(instructions, state); - break; - } -} diff --git a/dll/opengl/mesa/src/glsl/glcpp/README b/dll/opengl/mesa/src/glsl/glcpp/README deleted file mode 100644 index 0b5ef508ce9..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/README +++ /dev/null @@ -1,32 +0,0 @@ -glcpp -- GLSL "C" preprocessor - -This is a simple preprocessor designed to provide the preprocessing -needs of the GLSL language. The requirements for this preprocessor are -specified in the GLSL 1.30 specification availble from: - -http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.30.10.pdf - -This specification is not precise on some semantics, (for example, -#define and #if), defining these merely "as is standard for C++ -preprocessors". To fill in these details, I've been using a draft of -the C99 standard as available from: - -http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf - -Any downstream compiler accepting output from glcpp should be prepared -to encounter and deal with the following preprocessor macros: - - #line - #pragma - #extension - -All other macros will be handles according to the GLSL specification -and will not appear in the output. - -Known limitations ------------------ -The __LINE__ and __FILE__ macros are not yet supported. - -A file that ends with a function-like macro name as the last -non-whitespace token will result in a parse error, (where it should be -passed through as is). \ No newline at end of file diff --git a/dll/opengl/mesa/src/glsl/glcpp/glcpp-lex.c b/dll/opengl/mesa/src/glsl/glcpp/glcpp-lex.c deleted file mode 100644 index 49ca7ed7a89..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/glcpp-lex.c +++ /dev/null @@ -1,2621 +0,0 @@ -#line 2 "glcpp/glcpp-lex.c" - -#line 4 "glcpp/glcpp-lex.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yyg->yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yyg->yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE glcpp_restart(yyin ,yyscanner ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#define YY_BUF_SIZE 16384 -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via glcpp_restart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] - -void glcpp_restart (FILE *input_file ,yyscan_t yyscanner ); -void glcpp__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE glcpp__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void glcpp__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void glcpp__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void glcpp_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void glcpp_pop_buffer_state (yyscan_t yyscanner ); - -static void glcpp_ensure_buffer_stack (yyscan_t yyscanner ); -static void glcpp__load_buffer_state (yyscan_t yyscanner ); -static void glcpp__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); - -#define YY_FLUSH_BUFFER glcpp__flush_buffer(YY_CURRENT_BUFFER ,yyscanner) - -YY_BUFFER_STATE glcpp__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE glcpp__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE glcpp__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); - -void *glcpp_alloc (yy_size_t ,yyscan_t yyscanner ); -void *glcpp_realloc (void *,yy_size_t ,yyscan_t yyscanner ); -void glcpp_free (void * ,yyscan_t yyscanner ); - -#define yy_new_buffer glcpp__create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - glcpp_ensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - glcpp__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - glcpp_ensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - glcpp__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define glcpp_wrap(n) 1 -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -typedef int yy_state_type; - -#define yytext_ptr yytext_r - -static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); -static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 43 -#define YY_END_OF_BUFFER 44 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_acclist[107] = - { 0, - 3, 3, 44, 39, 43, 40, 43, 41, 43, 43, - 38, 43, 43, 38, 43, 38, 43, 38, 43, 25, - 43, 24, 43, 38, 43, 38, 43, 38, 43, 37, - 43, 37, 43, 38, 43, 40, 43, 23, 43, 3, - 43, 4, 43, 5, 43, 42, 43, 18, 43, 18, - 43, 18, 43, 39, 40, 32, 35, 33, 2, 1, - 25, 25, 24, 24, 27, 29, 31, 30, 28, 37, - 37, 34, 40, 23, 23, 3, 4, 5, 6, 5, - 7, 1, 26, 37, 26, 37, 14, 37, 15, 16, - 37, 17, 19, 12, 22, 36, 37, 21, 19, 13, - - 16404, 11, 9, 8, 8212, 10 - } ; - -static yyconst flex_int16_t yy_accept[155] = - { 0, - 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, - 3, 4, 6, 8, 10, 11, 13, 14, 16, 18, - 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, - 40, 42, 44, 46, 48, 50, 52, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 76, 76, 76, 76, 76, 76, 76, 77, 78, - 79, 80, 81, 82, 82, 82, 82, 82, 83, 84, - 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, - 85, 86, 87, 87, 87, 87, 87, 87, 87, 88, - - 88, 88, 88, 88, 88, 88, 89, 89, 90, 91, - 91, 91, 91, 91, 91, 91, 91, 91, 91, 92, - 92, 93, 94, 94, 95, 95, 95, 95, 96, 96, - 98, 99, 100, 100, 101, 101, 101, 101, 102, 102, - 102, 103, 103, 104, 105, 105, 105, 105, 106, 106, - 106, 107, 107, 107 - } ; - -static yyconst flex_int32_t yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 5, 1, 6, 1, 7, 8, 1, 9, - 7, 10, 7, 7, 7, 7, 11, 12, 13, 13, - 13, 13, 13, 13, 13, 14, 14, 1, 7, 15, - 16, 17, 1, 1, 18, 18, 18, 18, 18, 18, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 20, 19, 19, 21, 19, 19, - 7, 1, 7, 7, 19, 1, 22, 18, 18, 23, - - 24, 25, 26, 19, 27, 19, 19, 28, 29, 30, - 31, 32, 19, 33, 34, 35, 36, 37, 19, 38, - 19, 19, 7, 39, 7, 7, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst flex_int32_t yy_meta[40] = - { 0, - 1, 2, 3, 1, 1, 1, 1, 1, 4, 5, - 1, 6, 6, 6, 1, 1, 1, 7, 8, 8, - 8, 7, 9, 7, 7, 8, 8, 8, 8, 10, - 8, 8, 8, 8, 8, 8, 8, 8, 1 - } ; - -static yyconst flex_int16_t yy_base[168] = - { 0, - 0, 38, 0, 0, 38, 39, 333, 332, 331, 44, - 333, 331, 329, 337, 337, 314, 323, 337, 320, 41, - 41, 44, 44, 311, 49, 0, 302, 286, 61, 79, - 321, 337, 65, 337, 337, 67, 68, 322, 320, 337, - 337, 337, 337, 0, 74, 337, 0, 76, 337, 337, - 337, 337, 337, 337, 0, 296, 337, 72, 314, 313, - 294, 71, 292, 289, 282, 284, 289, 309, 337, 110, - 337, 114, 337, 91, 81, 112, 15, 0, 35, 284, - 285, 57, 286, 275, 272, 96, 276, 283, 281, 270, - 337, 272, 274, 275, 275, 271, 266, 272, 337, 271, - - 271, 264, 256, 257, 246, 255, 240, 337, 337, 235, - 222, 224, 228, 222, 234, 189, 140, 137, 140, 138, - 337, 0, 127, 337, 135, 116, 137, 337, 127, 0, - 140, 0, 108, 337, 120, 0, 101, 125, 69, 135, - 337, 138, 0, 337, 89, 52, 141, 337, 63, 143, - 337, 154, 337, 168, 178, 188, 198, 203, 213, 223, - 233, 238, 247, 257, 267, 276, 283 - } ; - -static yyconst flex_int16_t yy_def[168] = - { 0, - 153, 1, 154, 154, 155, 155, 156, 156, 157, 157, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 158, 158, 153, 153, 153, - 159, 153, 160, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 161, 153, 153, 162, 153, 153, 153, - 153, 153, 153, 153, 158, 158, 153, 153, 30, 30, - 153, 153, 153, 153, 153, 153, 153, 159, 153, 160, - 153, 160, 153, 153, 153, 153, 153, 161, 162, 158, - 153, 153, 153, 153, 153, 163, 153, 153, 153, 153, - 153, 158, 153, 153, 153, 153, 153, 153, 153, 153, - - 153, 153, 153, 153, 153, 158, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 158, 153, - 153, 164, 153, 153, 153, 153, 153, 153, 153, 158, - 153, 164, 153, 153, 153, 165, 153, 166, 153, 153, - 153, 153, 165, 153, 167, 153, 153, 153, 167, 153, - 153, 153, 0, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153 - } ; - -static yyconst flex_int16_t yy_nxt[377] = - { 0, - 12, 13, 14, 15, 16, 17, 18, 19, 18, 18, - 20, 21, 22, 22, 23, 24, 25, 26, 26, 26, - 26, 26, 27, 26, 26, 26, 26, 26, 26, 26, - 26, 26, 26, 26, 26, 26, 26, 26, 28, 29, - 32, 32, 82, 30, 83, 36, 14, 33, 33, 37, - 43, 44, 45, 45, 91, 48, 48, 48, 50, 51, - 46, 47, 58, 49, 53, 54, 59, 71, 74, 76, - 91, 148, 75, 58, 72, 73, 46, 59, 47, 49, - 60, 136, 76, 94, 41, 45, 45, 48, 48, 48, - 95, 77, 74, 46, 63, 49, 75, 148, 82, 146, - - 83, 61, 62, 84, 77, 63, 64, 63, 85, 46, - 65, 49, 71, 76, 66, 67, 71, 126, 100, 153, - 153, 140, 141, 72, 73, 101, 138, 135, 135, 135, - 144, 142, 142, 142, 139, 77, 140, 141, 63, 140, - 141, 138, 150, 151, 150, 151, 147, 147, 147, 142, - 142, 142, 152, 152, 152, 150, 151, 137, 136, 134, - 133, 131, 130, 129, 128, 152, 152, 152, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 35, 35, - - 35, 35, 35, 35, 35, 35, 35, 35, 55, 55, - 55, 55, 55, 68, 68, 68, 68, 127, 68, 68, - 68, 68, 68, 70, 70, 70, 70, 70, 70, 70, - 70, 70, 70, 78, 78, 126, 78, 78, 78, 78, - 78, 78, 78, 79, 79, 125, 79, 99, 99, 99, - 99, 99, 124, 123, 122, 99, 99, 132, 132, 121, - 132, 132, 132, 132, 132, 132, 132, 143, 143, 120, - 143, 143, 143, 143, 143, 143, 143, 145, 119, 118, - 117, 116, 145, 145, 145, 145, 149, 115, 149, 149, - 149, 149, 149, 114, 113, 112, 111, 110, 109, 108, - - 107, 106, 105, 104, 103, 102, 98, 97, 96, 93, - 92, 69, 90, 89, 88, 87, 86, 81, 153, 153, - 80, 39, 38, 69, 57, 56, 52, 42, 41, 40, - 39, 38, 153, 14, 15, 15, 11, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153 - } ; - -static yyconst flex_int16_t yy_chk[377] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 5, 6, 77, 2, 77, 10, 10, 5, 6, 10, - 20, 20, 21, 21, 79, 22, 22, 22, 23, 23, - 21, 21, 29, 22, 25, 25, 29, 33, 36, 37, - 79, 149, 36, 58, 33, 33, 21, 58, 21, 22, - 30, 146, 75, 82, 30, 45, 45, 48, 48, 48, - 82, 37, 74, 45, 37, 48, 74, 145, 62, 139, - - 62, 30, 30, 62, 75, 30, 30, 75, 62, 45, - 30, 48, 70, 76, 30, 30, 72, 126, 86, 70, - 70, 135, 135, 72, 72, 86, 138, 126, 126, 126, - 137, 135, 135, 135, 133, 76, 140, 140, 76, 142, - 142, 131, 147, 147, 150, 150, 140, 140, 140, 142, - 142, 142, 147, 147, 147, 152, 152, 129, 127, 125, - 123, 120, 119, 118, 117, 152, 152, 152, 154, 154, - 154, 154, 154, 154, 154, 154, 154, 154, 155, 155, - 155, 155, 155, 155, 155, 155, 155, 155, 156, 156, - 156, 156, 156, 156, 156, 156, 156, 156, 157, 157, - - 157, 157, 157, 157, 157, 157, 157, 157, 158, 158, - 158, 158, 158, 159, 159, 159, 159, 116, 159, 159, - 159, 159, 159, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 161, 161, 115, 161, 161, 161, 161, - 161, 161, 161, 162, 162, 114, 162, 163, 163, 163, - 163, 163, 113, 112, 111, 163, 163, 164, 164, 110, - 164, 164, 164, 164, 164, 164, 164, 165, 165, 107, - 165, 165, 165, 165, 165, 165, 165, 166, 106, 105, - 104, 103, 166, 166, 166, 166, 167, 102, 167, 167, - 167, 167, 167, 101, 100, 98, 97, 96, 95, 94, - - 93, 92, 90, 89, 88, 87, 85, 84, 83, 81, - 80, 68, 67, 66, 65, 64, 63, 61, 60, 59, - 56, 39, 38, 31, 28, 27, 24, 19, 17, 16, - 13, 12, 11, 9, 8, 7, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, - 153, 153, 153, 153, 153, 153 - } ; - -#define YY_TRAILING_MASK 0x2000 -#define YY_TRAILING_HEAD_MASK 0x4000 -#define REJECT \ -{ \ -*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ \ -yy_cp = yyg->yy_full_match; /* restore poss. backed-over text */ \ -yyg->yy_lp = yyg->yy_full_lp; /* restore orig. accepting pos. */ \ -yyg->yy_state_ptr = yyg->yy_full_state; /* restore orig. state */ \ -yy_current_state = *yyg->yy_state_ptr; /* restore curr. state */ \ -++yyg->yy_lp; \ -goto find_rule; \ -} - -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -#line 1 "glcpp/glcpp-lex.l" -#line 2 "glcpp/glcpp-lex.l" -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include -#include -#include - -#include "glcpp.h" -#include "glcpp-parse.h" - -/* Flex annoyingly generates some functions without making them - * static. Let's declare them here. */ -int glcpp_get_column (yyscan_t yyscanner); -void glcpp_set_column (int column_no , yyscan_t yyscanner); - -#ifdef _MSC_VER -#define YY_NO_UNISTD_H -#endif - -#define YY_NO_INPUT - -#define YY_USER_ACTION \ - do { \ - yylloc->first_column = yycolumn + 1; \ - yylloc->first_line = yylineno; \ - yycolumn += yyleng; \ - } while(0); - -#define YY_USER_INIT \ - do { \ - yylineno = 1; \ - yycolumn = 1; \ - yylloc->source = 0; \ - } while(0) - -/* The OTHER class is simply a catch-all for things that the CPP -parser just doesn't care about. Since flex regular expressions that -match longer strings take priority over those matching shorter -strings, we have to be careful to avoid OTHER matching and hiding -something that CPP does care about. So we simply exclude all -characters that appear in any other expressions. */ -#line 652 "glcpp/glcpp-lex.c" - -#define INITIAL 0 -#define DONE 1 -#define COMMENT 2 -#define UNREACHABLE 3 -#define SKIP 4 - -#define YY_EXTRA_TYPE glcpp_parser_t * - -/* Holds the entire state of the reentrant scanner. */ -struct yyguts_t - { - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - int yy_n_chars; - int yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; - - int yylineno_r; - int yy_flex_debug_r; - - yy_state_type *yy_state_buf; - yy_state_type *yy_state_ptr; - char *yy_full_match; - int yy_lp; - - /* These are only needed for trailing context rules, - * but there's no conditional variable for that yet. */ - int yy_looking_for_trail_begin; - int yy_full_lp; - int *yy_full_state; - - char *yytext_r; - int yy_more_flag; - int yy_more_len; - - YYSTYPE * yylval_r; - - YYLTYPE * yylloc_r; - - }; /* end struct yyguts_t */ - -static int yy_init_globals (yyscan_t yyscanner ); - - /* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ - # define yylval yyg->yylval_r - - # define yylloc yyg->yylloc_r - -int glcpp_lex_init (yyscan_t* scanner); - -int glcpp_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int glcpp_lex_destroy (yyscan_t yyscanner ); - -int glcpp_get_debug (yyscan_t yyscanner ); - -void glcpp_set_debug (int debug_flag ,yyscan_t yyscanner ); - -YY_EXTRA_TYPE glcpp_get_extra (yyscan_t yyscanner ); - -void glcpp_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); - -FILE *glcpp_get_in (yyscan_t yyscanner ); - -void glcpp_set_in (FILE * in_str ,yyscan_t yyscanner ); - -FILE *glcpp_get_out (yyscan_t yyscanner ); - -void glcpp_set_out (FILE * out_str ,yyscan_t yyscanner ); - -int glcpp_get_leng (yyscan_t yyscanner ); - -char *glcpp_get_text (yyscan_t yyscanner ); - -int glcpp_get_lineno (yyscan_t yyscanner ); - -void glcpp_set_lineno (int line_number ,yyscan_t yyscanner ); - -int glcpp_get_column (yyscan_t yyscanner ); - -void glcpp_set_column (int column_no ,yyscan_t yyscanner ); - -YYSTYPE * glcpp_get_lval (yyscan_t yyscanner ); - -void glcpp_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); - - YYLTYPE *glcpp_get_lloc (yyscan_t yyscanner ); - - void glcpp_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int glcpp_wrap (yyscan_t yyscanner ); -#else -extern int glcpp_wrap (yyscan_t yyscanner ); -#endif -#endif - - static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (yyscan_t yyscanner ); -#else -static int input (yyscan_t yyscanner ); -#endif - -#endif - - static void yy_push_state (int new_state ,yyscan_t yyscanner); - - static void yy_pop_state (yyscan_t yyscanner ); - - static int yy_top_state (yyscan_t yyscanner ); - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - unsigned n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int glcpp_lex \ - (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); - -#define YY_DECL int glcpp_lex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - if ( yyleng > 0 ) \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ - (yytext[yyleng - 1] == '\n'); \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - -#line 88 "glcpp/glcpp-lex.l" - - /* Implicitly switch between SKIP and INITIAL (non-skipping); - * don't switch if some other state was explicitly set. - */ - glcpp_parser_t *parser = yyextra; - if (YY_START == 0 || YY_START == SKIP) { - if (parser->lexing_if || parser->skip_stack == NULL || parser->skip_stack->type == SKIP_NO_SKIP) { - BEGIN 0; - } else { - BEGIN SKIP; - } - } - - /* Single-line comments */ -#line 926 "glcpp/glcpp-lex.c" - - yylval = yylval_param; - - yylloc = yylloc_param; - - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - /* Create the reject buffer large enough to save one state per allowed character. */ - if ( ! yyg->yy_state_buf ) - yyg->yy_state_buf = (yy_state_type *)glcpp_alloc(YY_STATE_BUF_SIZE ,yyscanner); - if ( ! yyg->yy_state_buf ) - YY_FATAL_ERROR( "out of dynamic memory in glcpp_lex()" ); - - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - glcpp_ensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - glcpp__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - glcpp__load_buffer_state(yyscanner ); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; - yy_current_state += YY_AT_BOL(); - - yyg->yy_state_ptr = yyg->yy_state_buf; - *yyg->yy_state_ptr++ = yy_current_state; - -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 154 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - *yyg->yy_state_ptr++ = yy_current_state; - ++yy_cp; - } - while ( yy_current_state != 153 ); - -yy_find_action: - yy_current_state = *--yyg->yy_state_ptr; - yyg->yy_lp = yy_accept[yy_current_state]; -find_rule: /* we branch to this label when backing up */ - for ( ; ; ) /* until we find what rule we matched */ - { - if ( yyg->yy_lp && yyg->yy_lp < yy_accept[yy_current_state + 1] ) - { - yy_act = yy_acclist[yyg->yy_lp]; - if ( yy_act & YY_TRAILING_HEAD_MASK || - yyg->yy_looking_for_trail_begin ) - { - if ( yy_act == yyg->yy_looking_for_trail_begin ) - { - yyg->yy_looking_for_trail_begin = 0; - yy_act &= ~YY_TRAILING_HEAD_MASK; - break; - } - } - else if ( yy_act & YY_TRAILING_MASK ) - { - yyg->yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK; - yyg->yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK; - } - else - { - yyg->yy_full_match = yy_cp; - yyg->yy_full_state = yyg->yy_state_ptr; - yyg->yy_full_lp = yyg->yy_lp; - break; - } - ++yyg->yy_lp; - goto find_rule; - } - --yy_cp; - yy_current_state = *--yyg->yy_state_ptr; - yyg->yy_lp = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ -case 1: -YY_RULE_SETUP -#line 102 "glcpp/glcpp-lex.l" -{ -} - YY_BREAK -/* Multi-line comments */ -case 2: -YY_RULE_SETUP -#line 106 "glcpp/glcpp-lex.l" -{ yy_push_state(COMMENT, yyscanner); } - YY_BREAK -case 3: -YY_RULE_SETUP -#line 107 "glcpp/glcpp-lex.l" - - YY_BREAK -case 4: -/* rule 4 can match eol */ -YY_RULE_SETUP -#line 108 "glcpp/glcpp-lex.l" -{ yylineno++; yycolumn = 0; return NEWLINE; } - YY_BREAK -case 5: -YY_RULE_SETUP -#line 109 "glcpp/glcpp-lex.l" - - YY_BREAK -case 6: -/* rule 6 can match eol */ -YY_RULE_SETUP -#line 110 "glcpp/glcpp-lex.l" -{ yylineno++; yycolumn = 0; return NEWLINE; } - YY_BREAK -case 7: -YY_RULE_SETUP -#line 111 "glcpp/glcpp-lex.l" -{ - yy_pop_state(yyscanner); - if (yyextra->space_tokens) - return SPACE; -} - YY_BREAK -case 8: -YY_RULE_SETUP -#line 117 "glcpp/glcpp-lex.l" -{ - yylval->str = ralloc_strdup (yyextra, yytext); - yyextra->space_tokens = 0; - return HASH_VERSION; -} - YY_BREAK -/* glcpp doesn't handle #extension, #version, or #pragma directives. - * Simply pass them through to the main compiler's lexer/parser. */ -case 9: -YY_RULE_SETUP -#line 125 "glcpp/glcpp-lex.l" -{ - yylval->str = ralloc_strdup (yyextra, yytext); - yylineno++; - yycolumn = 0; - return OTHER; -} - YY_BREAK -case 10: -*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ -yyg->yy_c_buf_p = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 132 "glcpp/glcpp-lex.l" -{ - /* Eat characters until the first digit is - * encountered - */ - char *ptr = yytext; - while (!isdigit(*ptr)) - ptr++; - - /* Subtract one from the line number because - * yylineno is zero-based instead of - * one-based. - */ - yylineno = strtol(ptr, &ptr, 0) - 1; - yylloc->source = strtol(ptr, NULL, 0); -} - YY_BREAK -case 11: -*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ -yyg->yy_c_buf_p = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 148 "glcpp/glcpp-lex.l" -{ - /* Eat characters until the first digit is - * encountered - */ - char *ptr = yytext; - while (!isdigit(*ptr)) - ptr++; - - /* Subtract one from the line number because - * yylineno is zero-based instead of - * one-based. - */ - yylineno = strtol(ptr, &ptr, 0) - 1; -} - YY_BREAK - -case 12: -YY_RULE_SETUP -#line 164 "glcpp/glcpp-lex.l" -{ - yyextra->lexing_if = 1; - yyextra->space_tokens = 0; - return HASH_IFDEF; -} - YY_BREAK -case 13: -YY_RULE_SETUP -#line 170 "glcpp/glcpp-lex.l" -{ - yyextra->lexing_if = 1; - yyextra->space_tokens = 0; - return HASH_IFNDEF; -} - YY_BREAK -case 14: -/* rule 14 can match eol */ -*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ -yyg->yy_c_buf_p = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 176 "glcpp/glcpp-lex.l" -{ - yyextra->lexing_if = 1; - yyextra->space_tokens = 0; - return HASH_IF; -} - YY_BREAK -case 15: -YY_RULE_SETUP -#line 182 "glcpp/glcpp-lex.l" -{ - yyextra->lexing_if = 1; - yyextra->space_tokens = 0; - return HASH_ELIF; -} - YY_BREAK -case 16: -YY_RULE_SETUP -#line 188 "glcpp/glcpp-lex.l" -{ - yyextra->space_tokens = 0; - return HASH_ELSE; -} - YY_BREAK -case 17: -YY_RULE_SETUP -#line 193 "glcpp/glcpp-lex.l" -{ - yyextra->space_tokens = 0; - return HASH_ENDIF; -} - YY_BREAK - -case 18: -YY_RULE_SETUP -#line 199 "glcpp/glcpp-lex.l" -; - YY_BREAK -case 19: -YY_RULE_SETUP -#line 201 "glcpp/glcpp-lex.l" -{ - char *p; - for (p = yytext; !isalpha(p[0]); p++); /* skip " # " */ - p += 5; /* skip "error" */ - glcpp_error(yylloc, yyextra, "#error%s", p); -} - YY_BREAK -case 20: -YY_RULE_SETUP -#line 208 "glcpp/glcpp-lex.l" -{ - yyextra->space_tokens = 0; - return HASH_DEFINE_FUNC; -} - YY_BREAK -case 21: -YY_RULE_SETUP -#line 213 "glcpp/glcpp-lex.l" -{ - yyextra->space_tokens = 0; - return HASH_DEFINE_OBJ; -} - YY_BREAK -case 22: -YY_RULE_SETUP -#line 218 "glcpp/glcpp-lex.l" -{ - yyextra->space_tokens = 0; - return HASH_UNDEF; -} - YY_BREAK -case 23: -YY_RULE_SETUP -#line 223 "glcpp/glcpp-lex.l" -{ - yyextra->space_tokens = 0; - return HASH; -} - YY_BREAK -case 24: -YY_RULE_SETUP -#line 228 "glcpp/glcpp-lex.l" -{ - yylval->str = ralloc_strdup (yyextra, yytext); - return INTEGER_STRING; -} - YY_BREAK -case 25: -YY_RULE_SETUP -#line 233 "glcpp/glcpp-lex.l" -{ - yylval->str = ralloc_strdup (yyextra, yytext); - return INTEGER_STRING; -} - YY_BREAK -case 26: -YY_RULE_SETUP -#line 238 "glcpp/glcpp-lex.l" -{ - yylval->str = ralloc_strdup (yyextra, yytext); - return INTEGER_STRING; -} - YY_BREAK -case 27: -YY_RULE_SETUP -#line 243 "glcpp/glcpp-lex.l" -{ - return LEFT_SHIFT; -} - YY_BREAK -case 28: -YY_RULE_SETUP -#line 247 "glcpp/glcpp-lex.l" -{ - return RIGHT_SHIFT; -} - YY_BREAK -case 29: -YY_RULE_SETUP -#line 251 "glcpp/glcpp-lex.l" -{ - return LESS_OR_EQUAL; -} - YY_BREAK -case 30: -YY_RULE_SETUP -#line 255 "glcpp/glcpp-lex.l" -{ - return GREATER_OR_EQUAL; -} - YY_BREAK -case 31: -YY_RULE_SETUP -#line 259 "glcpp/glcpp-lex.l" -{ - return EQUAL; -} - YY_BREAK -case 32: -YY_RULE_SETUP -#line 263 "glcpp/glcpp-lex.l" -{ - return NOT_EQUAL; -} - YY_BREAK -case 33: -YY_RULE_SETUP -#line 267 "glcpp/glcpp-lex.l" -{ - return AND; -} - YY_BREAK -case 34: -YY_RULE_SETUP -#line 271 "glcpp/glcpp-lex.l" -{ - return OR; -} - YY_BREAK -case 35: -YY_RULE_SETUP -#line 275 "glcpp/glcpp-lex.l" -{ - return PASTE; -} - YY_BREAK -case 36: -YY_RULE_SETUP -#line 279 "glcpp/glcpp-lex.l" -{ - return DEFINED; -} - YY_BREAK -case 37: -YY_RULE_SETUP -#line 283 "glcpp/glcpp-lex.l" -{ - yylval->str = ralloc_strdup (yyextra, yytext); - return IDENTIFIER; -} - YY_BREAK -case 38: -YY_RULE_SETUP -#line 288 "glcpp/glcpp-lex.l" -{ - return yytext[0]; -} - YY_BREAK -case 39: -YY_RULE_SETUP -#line 292 "glcpp/glcpp-lex.l" -{ - yylval->str = ralloc_strdup (yyextra, yytext); - return OTHER; -} - YY_BREAK -case 40: -YY_RULE_SETUP -#line 297 "glcpp/glcpp-lex.l" -{ - if (yyextra->space_tokens) { - return SPACE; - } -} - YY_BREAK -case 41: -/* rule 41 can match eol */ -YY_RULE_SETUP -#line 303 "glcpp/glcpp-lex.l" -{ - yyextra->lexing_if = 0; - yylineno++; - yycolumn = 0; - return NEWLINE; -} - YY_BREAK -/* Handle missing newline at EOF. */ -case YY_STATE_EOF(INITIAL): -#line 311 "glcpp/glcpp-lex.l" -{ - BEGIN DONE; /* Don't keep matching this rule forever. */ - yyextra->lexing_if = 0; - return NEWLINE; -} - YY_BREAK -/* We don't actually use the UNREACHABLE start condition. We - only have this action here so that we can pretend to call some - generated functions, (to avoid "defined but not used" - warnings. */ -case 42: -YY_RULE_SETUP -#line 321 "glcpp/glcpp-lex.l" -{ - unput('.'); - yy_top_state(yyextra); -} - YY_BREAK -case 43: -YY_RULE_SETUP -#line 326 "glcpp/glcpp-lex.l" -ECHO; - YY_BREAK -#line 1418 "glcpp/glcpp-lex.c" - case YY_STATE_EOF(DONE): - case YY_STATE_EOF(COMMENT): - case YY_STATE_EOF(UNREACHABLE): - case YY_STATE_EOF(SKIP): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * glcpp_lex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( glcpp_wrap(yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of glcpp_lex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = yyg->yytext_ptr; - register int number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - YY_FATAL_ERROR( -"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, (size_t) num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - glcpp_restart(yyin ,yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) glcpp_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) -{ - register yy_state_type yy_current_state; - register char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - yy_current_state += YY_AT_BOL(); - - yyg->yy_state_ptr = yyg->yy_state_buf; - *yyg->yy_state_ptr++ = yy_current_state; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 154 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - *yyg->yy_state_ptr++ = yy_current_state; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) -{ - register int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - - register YY_CHAR yy_c = 1; - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 154 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 153); - if ( ! yy_is_jam ) - *yyg->yy_state_ptr++ = yy_current_state; - - return yy_is_jam ? 0 : yy_current_state; -} - - static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner) -{ - register char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_cp = yyg->yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yyg->yy_hold_char; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = yyg->yy_n_chars + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - yyg->yytext_ptr = yy_bp; - yyg->yy_hold_char = *yy_cp; - yyg->yy_c_buf_p = yy_cp; -} - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) -#else - static int input (yyscan_t yyscanner) -#endif - -{ - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - glcpp_restart(yyin ,yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( glcpp_wrap(yyscanner ) ) - return EOF; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(yyscanner); -#else - return input(yyscanner); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; - - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * @param yyscanner The scanner object. - * @note This function does not reset the start condition to @c INITIAL . - */ - void glcpp_restart (FILE * input_file , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! YY_CURRENT_BUFFER ){ - glcpp_ensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - glcpp__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - glcpp__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); - glcpp__load_buffer_state(yyscanner ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * @param yyscanner The scanner object. - */ - void glcpp__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * glcpp_pop_buffer_state(); - * glcpp_push_buffer_state(new_buffer); - */ - glcpp_ensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - glcpp__load_buffer_state(yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (glcpp_wrap()) processing, but the only time this flag - * is looked at is after glcpp_wrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; -} - -static void glcpp__load_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * @param yyscanner The scanner object. - * @return the allocated buffer state. - */ - YY_BUFFER_STATE glcpp__create_buffer (FILE * file, int size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) glcpp_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in glcpp__create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) glcpp_alloc(b->yy_buf_size + 2 ,yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in glcpp__create_buffer()" ); - - b->yy_is_our_buffer = 1; - - glcpp__init_buffer(b,file ,yyscanner); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with glcpp__create_buffer() - * @param yyscanner The scanner object. - */ - void glcpp__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - glcpp_free((void *) b->yy_ch_buf ,yyscanner ); - - glcpp_free((void *) b ,yyscanner ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a glcpp_restart() or at EOF. - */ - static void glcpp__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) - -{ - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - glcpp__flush_buffer(b ,yyscanner); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then glcpp__init_buffer was _probably_ - * called from glcpp_restart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * @param yyscanner The scanner object. - */ - void glcpp__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - glcpp__load_buffer_state(yyscanner ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * @param yyscanner The scanner object. - */ -void glcpp_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - glcpp_ensure_buffer_stack(yyscanner); - - /* This block is copied from glcpp__switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from glcpp__switch_to_buffer. */ - glcpp__load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * @param yyscanner The scanner object. - */ -void glcpp_pop_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - glcpp__delete_buffer(YY_CURRENT_BUFFER ,yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - glcpp__load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void glcpp_ensure_buffer_stack (yyscan_t yyscanner) -{ - int num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - yyg->yy_buffer_stack = (struct yy_buffer_state**)glcpp_alloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in glcpp_ensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)glcpp_realloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in glcpp_ensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE glcpp__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) glcpp_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in glcpp__scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - glcpp__switch_to_buffer(b ,yyscanner ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to glcpp_lex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * glcpp__scan_bytes() instead. - */ -YY_BUFFER_STATE glcpp__scan_string (yyconst char * yystr , yyscan_t yyscanner) -{ - - return glcpp__scan_bytes(yystr,strlen(yystr) ,yyscanner); -} - -/** Setup the input buffer state to scan the given bytes. The next call to glcpp_lex() will - * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE glcpp__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) glcpp_alloc(n ,yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in glcpp__scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = glcpp__scan_buffer(buf,n ,yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in glcpp__scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - - static void yy_push_state (int new_state , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( yyg->yy_start_stack_ptr >= yyg->yy_start_stack_depth ) - { - yy_size_t new_size; - - yyg->yy_start_stack_depth += YY_START_STACK_INCR; - new_size = yyg->yy_start_stack_depth * sizeof( int ); - - if ( ! yyg->yy_start_stack ) - yyg->yy_start_stack = (int *) glcpp_alloc(new_size ,yyscanner ); - - else - yyg->yy_start_stack = (int *) glcpp_realloc((void *) yyg->yy_start_stack,new_size ,yyscanner ); - - if ( ! yyg->yy_start_stack ) - YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); - } - - yyg->yy_start_stack[yyg->yy_start_stack_ptr++] = YY_START; - - BEGIN(new_state); -} - - static void yy_pop_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( --yyg->yy_start_stack_ptr < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); - - BEGIN(yyg->yy_start_stack[yyg->yy_start_stack_ptr]); -} - - static int yy_top_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyg->yy_start_stack[yyg->yy_start_stack_ptr - 1]; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the user-defined data for this scanner. - * @param yyscanner The scanner object. - */ -YY_EXTRA_TYPE glcpp_get_extra (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; -} - -/** Get the current line number. - * @param yyscanner The scanner object. - */ -int glcpp_get_lineno (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; -} - -/** Get the current column number. - * @param yyscanner The scanner object. - */ -int glcpp_get_column (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; -} - -/** Get the input stream. - * @param yyscanner The scanner object. - */ -FILE *glcpp_get_in (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; -} - -/** Get the output stream. - * @param yyscanner The scanner object. - */ -FILE *glcpp_get_out (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; -} - -/** Get the length of the current token. - * @param yyscanner The scanner object. - */ -int glcpp_get_leng (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; -} - -/** Get the current token. - * @param yyscanner The scanner object. - */ - -char *glcpp_get_text (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; -} - -/** Set the user-defined data. This data is never touched by the scanner. - * @param user_defined The data to be associated with this scanner. - * @param yyscanner The scanner object. - */ -void glcpp_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; -} - -/** Set the current line number. - * @param line_number - * @param yyscanner The scanner object. - */ -void glcpp_set_lineno (int line_number , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "glcpp_set_lineno called with no buffer" , yyscanner); - - yylineno = line_number; -} - -/** Set the current column. - * @param line_number - * @param yyscanner The scanner object. - */ -void glcpp_set_column (int column_no , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "glcpp_set_column called with no buffer" , yyscanner); - - yycolumn = column_no; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * @param yyscanner The scanner object. - * @see glcpp__switch_to_buffer - */ -void glcpp_set_in (FILE * in_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = in_str ; -} - -void glcpp_set_out (FILE * out_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = out_str ; -} - -int glcpp_get_debug (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; -} - -void glcpp_set_debug (int bdebug , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = bdebug ; -} - -/* Accessor methods for yylval and yylloc */ - -YYSTYPE * glcpp_get_lval (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylval; -} - -void glcpp_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; -} - -YYLTYPE *glcpp_get_lloc (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylloc; -} - -void glcpp_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylloc = yylloc_param; -} - -/* User-visible API */ - -/* glcpp_lex_init is special because it creates the scanner itself, so it is - * the ONLY reentrant function that doesn't take the scanner as the last argument. - * That's why we explicitly handle the declaration, instead of using our macros. - */ - -int glcpp_lex_init(yyscan_t* ptr_yy_globals) - -{ - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) glcpp_alloc ( sizeof( struct yyguts_t ), NULL ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - return yy_init_globals ( *ptr_yy_globals ); -} - -/* glcpp_lex_init_extra has the same functionality as glcpp_lex_init, but follows the - * convention of taking the scanner as the last argument. Note however, that - * this is a *pointer* to a scanner, as it will be allocated by this call (and - * is the reason, too, why this function also must handle its own declaration). - * The user defined value in the first argument will be available to glcpp_alloc in - * the yyextra field. - */ - -int glcpp_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) - -{ - struct yyguts_t dummy_yyguts; - - glcpp_set_extra (yy_user_defined, &dummy_yyguts); - - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) glcpp_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - glcpp_set_extra (yy_user_defined, *ptr_yy_globals); - - return yy_init_globals ( *ptr_yy_globals ); -} - -static int yy_init_globals (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from glcpp_lex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = 0; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = (char *) 0; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; - - yyg->yy_state_buf = 0; - yyg->yy_state_ptr = 0; - yyg->yy_full_match = 0; - yyg->yy_lp = 0; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = (FILE *) 0; - yyout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * glcpp_lex_init() - */ - return 0; -} - -/* glcpp_lex_destroy is for both reentrant and non-reentrant scanners. */ -int glcpp_lex_destroy (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - glcpp__delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - glcpp_pop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - glcpp_free(yyg->yy_buffer_stack ,yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - glcpp_free(yyg->yy_start_stack ,yyscanner ); - yyg->yy_start_stack = NULL; - - glcpp_free ( yyg->yy_state_buf , yyscanner); - yyg->yy_state_buf = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * glcpp_lex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - glcpp_free ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) -{ - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) -{ - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *glcpp_alloc (yy_size_t size , yyscan_t yyscanner) -{ - return (void *) malloc( size ); -} - -void *glcpp_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) -{ - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void glcpp_free (void * ptr , yyscan_t yyscanner) -{ - free( (char *) ptr ); /* see glcpp_realloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 326 "glcpp/glcpp-lex.l" - - - -void -glcpp_lex_set_source_string(glcpp_parser_t *parser, const char *shader) -{ - glcpp__scan_string(shader,parser->scanner); -} - diff --git a/dll/opengl/mesa/src/glsl/glcpp/glcpp-lex.l b/dll/opengl/mesa/src/glsl/glcpp/glcpp-lex.l deleted file mode 100644 index b34f2c0e9ad..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/glcpp-lex.l +++ /dev/null @@ -1,332 +0,0 @@ -%{ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include -#include -#include - -#include "glcpp.h" -#include "glcpp-parse.h" - -/* Flex annoyingly generates some functions without making them - * static. Let's declare them here. */ -int glcpp_get_column (yyscan_t yyscanner); -void glcpp_set_column (int column_no , yyscan_t yyscanner); - -#ifdef _MSC_VER -#define YY_NO_UNISTD_H -#endif - -#define YY_NO_INPUT - -#define YY_USER_ACTION \ - do { \ - yylloc->first_column = yycolumn + 1; \ - yylloc->first_line = yylineno; \ - yycolumn += yyleng; \ - } while(0); - -#define YY_USER_INIT \ - do { \ - yylineno = 1; \ - yycolumn = 1; \ - yylloc->source = 0; \ - } while(0) -%} - -%option bison-bridge bison-locations reentrant noyywrap -%option extra-type="glcpp_parser_t *" -%option prefix="glcpp_" -%option stack -%option never-interactive - -%x DONE COMMENT UNREACHABLE SKIP - -SPACE [[:space:]] -NONSPACE [^[:space:]] -NEWLINE [\n] -HSPACE [ \t] -HASH ^{HSPACE}*#{HSPACE}* -IDENTIFIER [_a-zA-Z][_a-zA-Z0-9]* -PUNCTUATION [][(){}.&*~!/%<>^|;,=+-] - -/* The OTHER class is simply a catch-all for things that the CPP -parser just doesn't care about. Since flex regular expressions that -match longer strings take priority over those matching shorter -strings, we have to be careful to avoid OTHER matching and hiding -something that CPP does care about. So we simply exclude all -characters that appear in any other expressions. */ - -OTHER [^][_#[:space:]#a-zA-Z0-9(){}.&*~!/%<>^|;,=+-] - -DIGITS [0-9][0-9]* -DECIMAL_INTEGER [1-9][0-9]*[uU]? -OCTAL_INTEGER 0[0-7]*[uU]? -HEXADECIMAL_INTEGER 0[xX][0-9a-fA-F]+[uU]? - -%% - /* Implicitly switch between SKIP and INITIAL (non-skipping); - * don't switch if some other state was explicitly set. - */ - glcpp_parser_t *parser = yyextra; - if (YY_START == 0 || YY_START == SKIP) { - if (parser->lexing_if || parser->skip_stack == NULL || parser->skip_stack->type == SKIP_NO_SKIP) { - BEGIN 0; - } else { - BEGIN SKIP; - } - } - - /* Single-line comments */ -"//"[^\n]* { -} - - /* Multi-line comments */ -"/*" { yy_push_state(COMMENT, yyscanner); } -[^*\n]* -[^*\n]*\n { yylineno++; yycolumn = 0; return NEWLINE; } -"*"+[^*/\n]* -"*"+[^*/\n]*\n { yylineno++; yycolumn = 0; return NEWLINE; } -"*"+"/" { - yy_pop_state(yyscanner); - if (yyextra->space_tokens) - return SPACE; -} - -{HASH}version { - yylval->str = ralloc_strdup (yyextra, yytext); - yyextra->space_tokens = 0; - return HASH_VERSION; -} - - /* glcpp doesn't handle #extension, #version, or #pragma directives. - * Simply pass them through to the main compiler's lexer/parser. */ -{HASH}(extension|pragma)[^\n]+ { - yylval->str = ralloc_strdup (yyextra, yytext); - yylineno++; - yycolumn = 0; - return OTHER; -} - -{HASH}line{HSPACE}+{DIGITS}{HSPACE}+{DIGITS}{HSPACE}*$ { - /* Eat characters until the first digit is - * encountered - */ - char *ptr = yytext; - while (!isdigit(*ptr)) - ptr++; - - /* Subtract one from the line number because - * yylineno is zero-based instead of - * one-based. - */ - yylineno = strtol(ptr, &ptr, 0) - 1; - yylloc->source = strtol(ptr, NULL, 0); -} - -{HASH}line{HSPACE}+{DIGITS}{HSPACE}*$ { - /* Eat characters until the first digit is - * encountered - */ - char *ptr = yytext; - while (!isdigit(*ptr)) - ptr++; - - /* Subtract one from the line number because - * yylineno is zero-based instead of - * one-based. - */ - yylineno = strtol(ptr, &ptr, 0) - 1; -} - -{ -{HASH}ifdef { - yyextra->lexing_if = 1; - yyextra->space_tokens = 0; - return HASH_IFDEF; -} - -{HASH}ifndef { - yyextra->lexing_if = 1; - yyextra->space_tokens = 0; - return HASH_IFNDEF; -} - -{HASH}if/[^_a-zA-Z0-9] { - yyextra->lexing_if = 1; - yyextra->space_tokens = 0; - return HASH_IF; -} - -{HASH}elif { - yyextra->lexing_if = 1; - yyextra->space_tokens = 0; - return HASH_ELIF; -} - -{HASH}else { - yyextra->space_tokens = 0; - return HASH_ELSE; -} - -{HASH}endif { - yyextra->space_tokens = 0; - return HASH_ENDIF; -} -} - -[^\n] ; - -{HASH}error.* { - char *p; - for (p = yytext; !isalpha(p[0]); p++); /* skip " # " */ - p += 5; /* skip "error" */ - glcpp_error(yylloc, yyextra, "#error%s", p); -} - -{HASH}define{HSPACE}+/{IDENTIFIER}"(" { - yyextra->space_tokens = 0; - return HASH_DEFINE_FUNC; -} - -{HASH}define { - yyextra->space_tokens = 0; - return HASH_DEFINE_OBJ; -} - -{HASH}undef { - yyextra->space_tokens = 0; - return HASH_UNDEF; -} - -{HASH} { - yyextra->space_tokens = 0; - return HASH; -} - -{DECIMAL_INTEGER} { - yylval->str = ralloc_strdup (yyextra, yytext); - return INTEGER_STRING; -} - -{OCTAL_INTEGER} { - yylval->str = ralloc_strdup (yyextra, yytext); - return INTEGER_STRING; -} - -{HEXADECIMAL_INTEGER} { - yylval->str = ralloc_strdup (yyextra, yytext); - return INTEGER_STRING; -} - -"<<" { - return LEFT_SHIFT; -} - -">>" { - return RIGHT_SHIFT; -} - -"<=" { - return LESS_OR_EQUAL; -} - -">=" { - return GREATER_OR_EQUAL; -} - -"==" { - return EQUAL; -} - -"!=" { - return NOT_EQUAL; -} - -"&&" { - return AND; -} - -"||" { - return OR; -} - -"##" { - return PASTE; -} - -"defined" { - return DEFINED; -} - -{IDENTIFIER} { - yylval->str = ralloc_strdup (yyextra, yytext); - return IDENTIFIER; -} - -{PUNCTUATION} { - return yytext[0]; -} - -{OTHER}+ { - yylval->str = ralloc_strdup (yyextra, yytext); - return OTHER; -} - -{HSPACE}+ { - if (yyextra->space_tokens) { - return SPACE; - } -} - -\n { - yyextra->lexing_if = 0; - yylineno++; - yycolumn = 0; - return NEWLINE; -} - - /* Handle missing newline at EOF. */ -<> { - BEGIN DONE; /* Don't keep matching this rule forever. */ - yyextra->lexing_if = 0; - return NEWLINE; -} - - /* We don't actually use the UNREACHABLE start condition. We - only have this action here so that we can pretend to call some - generated functions, (to avoid "defined but not used" - warnings. */ -. { - unput('.'); - yy_top_state(yyextra); -} - -%% - -void -glcpp_lex_set_source_string(glcpp_parser_t *parser, const char *shader) -{ - yy_scan_string(shader, parser->scanner); -} diff --git a/dll/opengl/mesa/src/glsl/glcpp/glcpp-parse.c b/dll/opengl/mesa/src/glsl/glcpp/glcpp-parse.c deleted file mode 100644 index 3f80ffb3398..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/glcpp-parse.c +++ /dev/null @@ -1,4244 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.4.3. */ - -/* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2009, 2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.4.3" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 1 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - -/* Using locations. */ -#define YYLSP_NEEDED 1 - - - -/* Copy the first part of user declarations. */ - -/* Line 189 of yacc.c */ -#line 1 "glcpp/glcpp-parse.y" - -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include -#include -#include -#include -#include - -#include "glcpp.h" -#include "main/core.h" /* for struct gl_extensions */ -#include "main/mtypes.h" /* for gl_api enum */ - -static void -yyerror (YYLTYPE *locp, glcpp_parser_t *parser, const char *error); - -static void -_define_object_macro (glcpp_parser_t *parser, - YYLTYPE *loc, - const char *macro, - token_list_t *replacements); - -static void -_define_function_macro (glcpp_parser_t *parser, - YYLTYPE *loc, - const char *macro, - string_list_t *parameters, - token_list_t *replacements); - -static string_list_t * -_string_list_create (void *ctx); - -static void -_string_list_append_item (string_list_t *list, const char *str); - -static int -_string_list_contains (string_list_t *list, const char *member, int *index); - -static int -_string_list_length (string_list_t *list); - -static int -_string_list_equal (string_list_t *a, string_list_t *b); - -static argument_list_t * -_argument_list_create (void *ctx); - -static void -_argument_list_append (argument_list_t *list, token_list_t *argument); - -static int -_argument_list_length (argument_list_t *list); - -static token_list_t * -_argument_list_member_at (argument_list_t *list, int index); - -/* Note: This function ralloc_steal()s the str pointer. */ -static token_t * -_token_create_str (void *ctx, int type, char *str); - -static token_t * -_token_create_ival (void *ctx, int type, int ival); - -static token_list_t * -_token_list_create (void *ctx); - -static void -_token_list_append (token_list_t *list, token_t *token); - -static void -_token_list_append_list (token_list_t *list, token_list_t *tail); - -static int -_token_list_equal_ignoring_space (token_list_t *a, token_list_t *b); - -static void -_parser_active_list_push (glcpp_parser_t *parser, - const char *identifier, - token_node_t *marker); - -static void -_parser_active_list_pop (glcpp_parser_t *parser); - -static int -_parser_active_list_contains (glcpp_parser_t *parser, const char *identifier); - -static void -_glcpp_parser_expand_if (glcpp_parser_t *parser, int type, token_list_t *list); - -static void -_glcpp_parser_expand_token_list (glcpp_parser_t *parser, - token_list_t *list); - -static void -_glcpp_parser_print_expanded_token_list (glcpp_parser_t *parser, - token_list_t *list); - -static void -_glcpp_parser_skip_stack_push_if (glcpp_parser_t *parser, YYLTYPE *loc, - int condition); - -static void -_glcpp_parser_skip_stack_change_if (glcpp_parser_t *parser, YYLTYPE *loc, - const char *type, int condition); - -static void -_glcpp_parser_skip_stack_pop (glcpp_parser_t *parser, YYLTYPE *loc); - -#define yylex glcpp_parser_lex - -static int -glcpp_parser_lex (YYSTYPE *yylval, YYLTYPE *yylloc, glcpp_parser_t *parser); - -static void -glcpp_parser_lex_from (glcpp_parser_t *parser, token_list_t *list); - -static void -add_builtin_define(glcpp_parser_t *parser, const char *name, int value); - - - -/* Line 189 of yacc.c */ -#line 215 "glcpp/glcpp-parse.c" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 1 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - COMMA_FINAL = 258, - DEFINED = 259, - ELIF_EXPANDED = 260, - HASH = 261, - HASH_DEFINE_FUNC = 262, - HASH_DEFINE_OBJ = 263, - HASH_ELIF = 264, - HASH_ELSE = 265, - HASH_ENDIF = 266, - HASH_IF = 267, - HASH_IFDEF = 268, - HASH_IFNDEF = 269, - HASH_UNDEF = 270, - HASH_VERSION = 271, - IDENTIFIER = 272, - IF_EXPANDED = 273, - INTEGER = 274, - INTEGER_STRING = 275, - NEWLINE = 276, - OTHER = 277, - PLACEHOLDER = 278, - SPACE = 279, - PASTE = 280, - OR = 281, - AND = 282, - NOT_EQUAL = 283, - EQUAL = 284, - GREATER_OR_EQUAL = 285, - LESS_OR_EQUAL = 286, - RIGHT_SHIFT = 287, - LEFT_SHIFT = 288, - UNARY = 289 - }; -#endif - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 -#endif - - -/* Copy the second part of user declarations. */ - - -/* Line 264 of yacc.c */ -#line 303 "glcpp/glcpp-parse.c" - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) -#else -# define YYUSE(e) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; -#endif -{ - return yyi; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined _STDLIB_H \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM) - -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 2 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 606 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 57 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 17 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 101 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 162 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 289 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 47, 2, 2, 2, 43, 30, 2, - 45, 46, 41, 39, 49, 40, 54, 42, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 55, - 33, 56, 34, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 50, 2, 51, 29, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 52, 28, 53, 48, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 31, 32, 35, 36, 37, 38, 44 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 4, 7, 9, 11, 13, 16, 20, - 24, 29, 36, 44, 48, 52, 55, 60, 65, 69, - 72, 75, 78, 82, 85, 87, 89, 91, 95, 99, - 103, 107, 111, 115, 119, 123, 127, 131, 135, 139, - 143, 147, 151, 155, 159, 163, 166, 169, 172, 175, - 179, 181, 185, 187, 190, 193, 194, 196, 197, 199, - 202, 207, 209, 211, 214, 216, 219, 221, 223, 225, - 227, 229, 231, 233, 235, 237, 239, 241, 243, 245, - 247, 249, 251, 253, 255, 257, 259, 261, 263, 265, - 267, 269, 271, 273, 275, 277, 279, 281, 283, 285, - 287, 289 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 58, 0, -1, -1, 58, 59, -1, 61, -1, 65, - -1, 60, -1, 6, 66, -1, 18, 63, 21, -1, - 5, 63, 21, -1, 8, 17, 67, 21, -1, 7, - 17, 45, 46, 67, 21, -1, 7, 17, 45, 64, - 46, 67, 21, -1, 15, 17, 21, -1, 12, 70, - 21, -1, 12, 21, -1, 13, 17, 68, 21, -1, - 14, 17, 68, 21, -1, 9, 70, 21, -1, 9, - 21, -1, 10, 21, -1, 11, 21, -1, 16, 62, - 21, -1, 6, 21, -1, 20, -1, 19, -1, 62, - -1, 63, 26, 63, -1, 63, 27, 63, -1, 63, - 28, 63, -1, 63, 29, 63, -1, 63, 30, 63, - -1, 63, 31, 63, -1, 63, 32, 63, -1, 63, - 35, 63, -1, 63, 36, 63, -1, 63, 34, 63, - -1, 63, 33, 63, -1, 63, 37, 63, -1, 63, - 38, 63, -1, 63, 40, 63, -1, 63, 39, 63, - -1, 63, 43, 63, -1, 63, 42, 63, -1, 63, - 41, 63, -1, 47, 63, -1, 48, 63, -1, 40, - 63, -1, 39, 63, -1, 45, 63, 46, -1, 17, - -1, 64, 49, 17, -1, 21, -1, 71, 21, -1, - 71, 21, -1, -1, 71, -1, -1, 71, -1, 4, - 17, -1, 4, 45, 17, 46, -1, 72, -1, 69, - -1, 70, 69, -1, 72, -1, 71, 72, -1, 17, - -1, 20, -1, 73, -1, 22, -1, 24, -1, 50, - -1, 51, -1, 45, -1, 46, -1, 52, -1, 53, - -1, 54, -1, 30, -1, 41, -1, 39, -1, 40, - -1, 48, -1, 47, -1, 42, -1, 43, -1, 38, - -1, 37, -1, 33, -1, 34, -1, 36, -1, 35, - -1, 32, -1, 31, -1, 29, -1, 28, -1, 27, - -1, 26, -1, 55, -1, 49, -1, 56, -1, 25, - -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 180, 180, 182, 186, 189, 194, 195, 199, 202, - 208, 211, 214, 217, 225, 244, 254, 259, 264, 283, - 298, 301, 304, 325, 329, 338, 343, 344, 347, 350, - 353, 356, 359, 362, 365, 368, 371, 374, 377, 380, - 383, 386, 389, 397, 405, 408, 411, 414, 417, 420, - 426, 431, 439, 440, 444, 450, 451, 454, 456, 463, - 467, 471, 476, 480, 487, 492, 499, 503, 507, 511, - 515, 522, 523, 524, 525, 526, 527, 528, 529, 530, - 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, - 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, - 551, 552 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "COMMA_FINAL", "DEFINED", - "ELIF_EXPANDED", "HASH", "HASH_DEFINE_FUNC", "HASH_DEFINE_OBJ", - "HASH_ELIF", "HASH_ELSE", "HASH_ENDIF", "HASH_IF", "HASH_IFDEF", - "HASH_IFNDEF", "HASH_UNDEF", "HASH_VERSION", "IDENTIFIER", "IF_EXPANDED", - "INTEGER", "INTEGER_STRING", "NEWLINE", "OTHER", "PLACEHOLDER", "SPACE", - "PASTE", "OR", "AND", "'|'", "'^'", "'&'", "NOT_EQUAL", "EQUAL", "'<'", - "'>'", "GREATER_OR_EQUAL", "LESS_OR_EQUAL", "RIGHT_SHIFT", "LEFT_SHIFT", - "'+'", "'-'", "'*'", "'/'", "'%'", "UNARY", "'('", "')'", "'!'", "'~'", - "','", "'['", "']'", "'{'", "'}'", "'.'", "';'", "'='", "$accept", - "input", "line", "expanded_line", "control_line", "integer_constant", - "expression", "identifier_list", "text_line", "non_directive", - "replacement_list", "junk", "conditional_token", "conditional_tokens", - "pp_tokens", "preprocessing_token", "operator", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 124, 94, - 38, 283, 284, 60, 62, 285, 286, 287, 288, 43, - 45, 42, 47, 37, 289, 40, 41, 33, 126, 44, - 91, 93, 123, 125, 46, 59, 61 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 57, 58, 58, 59, 59, 59, 59, 60, 60, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, - 61, 61, 61, 61, 62, 62, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - 64, 64, 65, 65, 66, 67, 67, 68, 68, 69, - 69, 69, 70, 70, 71, 71, 72, 72, 72, 72, - 72, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 0, 2, 1, 1, 1, 2, 3, 3, - 4, 6, 7, 3, 3, 2, 4, 4, 3, 2, - 2, 2, 3, 2, 1, 1, 1, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, - 1, 3, 1, 2, 2, 0, 1, 0, 1, 2, - 4, 1, 1, 2, 1, 2, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1 -}; - -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 66, 0, 67, 52, 69, - 70, 101, 97, 96, 95, 94, 78, 93, 92, 88, - 89, 91, 90, 87, 86, 80, 81, 79, 84, 85, - 73, 74, 83, 82, 99, 71, 72, 75, 76, 77, - 98, 100, 3, 6, 4, 5, 0, 64, 68, 25, - 24, 0, 0, 0, 0, 0, 26, 0, 23, 7, - 0, 0, 55, 0, 19, 62, 0, 61, 20, 21, - 15, 0, 57, 57, 0, 0, 0, 53, 65, 48, - 47, 0, 45, 46, 9, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 54, 0, 0, 56, 59, 0, 18, - 63, 14, 0, 58, 0, 13, 22, 8, 49, 27, - 28, 29, 30, 31, 32, 33, 37, 36, 34, 35, - 38, 39, 41, 40, 44, 43, 42, 50, 55, 0, - 10, 0, 16, 17, 0, 55, 0, 60, 11, 0, - 51, 12 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 1, 52, 53, 54, 66, 67, 149, 55, 69, - 115, 122, 75, 76, 116, 57, 58 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -147 -static const yytype_int16 yypact[] = -{ - -147, 112, -147, 28, -10, 55, 62, 152, -15, 59, - 192, 85, 86, 87, 51, -147, 28, -147, -147, -147, - -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, - -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, - -147, -147, -147, -147, -147, -147, -147, -147, -147, -147, - -147, -147, -147, -147, -147, -147, 312, -147, -147, -147, - -147, 28, 28, 28, 28, 28, -147, 428, -147, -147, - 352, 63, 392, 17, -147, -147, 232, -147, -147, -147, - -147, 272, 392, 392, 84, 89, 451, -147, -147, -147, - -147, 469, -147, -147, -147, 28, 28, 28, 28, 28, - 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, - 28, 28, 28, -147, 60, 90, 392, -147, 96, -147, - -147, -147, 93, 392, 94, -147, -147, -147, -147, 489, - 505, 520, 534, 547, 558, 558, 18, 18, 18, 18, - 563, 563, 23, 23, -147, -147, -147, -147, 392, 32, - -147, 61, -147, -147, 110, 392, 118, -147, -147, 149, - -147, -147 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -147, -147, -147, -147, -147, 157, -11, -147, -147, -147, - -146, 92, -68, 200, 0, -7, -147 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 -static const yytype_uint8 yytable[] = -{ - 77, 56, 154, 77, 70, 86, 78, 15, 120, 159, - 17, 68, 19, 120, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 117, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 59, 60, 88, - 89, 90, 91, 92, 93, 106, 107, 108, 109, 110, - 111, 112, 118, 88, 110, 111, 112, 61, 62, 77, - 59, 60, 71, 63, 77, 64, 65, 147, 155, 72, - 79, 156, 123, 123, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 82, 83, 84, 125, 148, 157, 114, 88, - 126, 150, 2, 151, 152, 153, 88, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 158, 17, 18, 19, 160, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 73, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 15, - 161, 85, 17, 74, 19, 124, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 73, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 15, - 81, 0, 17, 80, 19, 0, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 73, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 15, - 0, 0, 17, 119, 19, 0, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 73, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 15, - 0, 0, 17, 121, 19, 0, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 0, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 15, - 0, 0, 17, 87, 19, 0, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 0, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 15, - 0, 0, 17, 113, 19, 0, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 0, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 15, - 0, 0, 17, 0, 19, 0, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 0, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 94, - 0, 0, 0, 0, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 127, 0, 0, 0, 0, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 95, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 0, 0, 128, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 108, 109, 110, 111, 112 -}; - -static const yytype_int16 yycheck[] = -{ - 7, 1, 148, 10, 4, 16, 21, 17, 76, 155, - 20, 21, 22, 81, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 17, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 19, 20, 56, - 61, 62, 63, 64, 65, 37, 38, 39, 40, 41, - 42, 43, 45, 70, 41, 42, 43, 39, 40, 76, - 19, 20, 17, 45, 81, 47, 48, 17, 46, 17, - 21, 49, 82, 83, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 17, 17, 17, 21, 46, 46, 45, 116, - 21, 21, 0, 17, 21, 21, 123, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 21, 20, 21, 22, 17, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 4, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 17, - 21, 14, 20, 21, 22, 83, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 4, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 17, - 10, -1, 20, 21, 22, -1, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 4, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 17, - -1, -1, 20, 21, 22, -1, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 4, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 17, - -1, -1, 20, 21, 22, -1, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, -1, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 17, - -1, -1, 20, 21, 22, -1, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, -1, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 17, - -1, -1, 20, 21, 22, -1, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, -1, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 17, - -1, -1, 20, -1, 22, -1, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, -1, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 21, - -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 21, -1, -1, -1, -1, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, -1, -1, 46, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 39, 40, 41, 42, 43 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 58, 0, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 59, 60, 61, 65, 71, 72, 73, 19, - 20, 39, 40, 45, 47, 48, 62, 63, 21, 66, - 71, 17, 17, 4, 21, 69, 70, 72, 21, 21, - 21, 70, 17, 17, 17, 62, 63, 21, 72, 63, - 63, 63, 63, 63, 21, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 21, 45, 67, 71, 17, 45, 21, - 69, 21, 68, 71, 68, 21, 21, 21, 46, 63, - 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 63, 63, 63, 63, 17, 46, 64, - 21, 17, 21, 21, 67, 46, 49, 46, 21, 67, - 17, 21 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, parser, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval, &yylloc, parser) -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, Location, parser); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, glcpp_parser_t *parser) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, parser) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; - glcpp_parser_t *parser; -#endif -{ - if (!yyvaluep) - return; - YYUSE (yylocationp); - YYUSE (parser); -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, glcpp_parser_t *parser) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, parser) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; - glcpp_parser_t *parser; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - YY_LOCATION_PRINT (yyoutput, *yylocationp); - YYFPRINTF (yyoutput, ": "); - yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, parser); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, glcpp_parser_t *parser) -#else -static void -yy_reduce_print (yyvsp, yylsp, yyrule, parser) - YYSTYPE *yyvsp; - YYLTYPE *yylsp; - int yyrule; - glcpp_parser_t *parser; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , &(yylsp[(yyi + 1) - (yynrhs)]) , parser); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, yylsp, Rule, parser); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) -{ - int yyn = yypact[yystate]; - - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - - if (yysize_overflow) - return YYSIZE_MAXIMUM; - - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; - } -} -#endif /* YYERROR_VERBOSE */ - - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, glcpp_parser_t *parser) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, yylocationp, parser) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - YYLTYPE *yylocationp; - glcpp_parser_t *parser; -#endif -{ - YYUSE (yyvaluep); - YYUSE (yylocationp); - YYUSE (parser); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - - default: - break; - } -} - -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (glcpp_parser_t *parser); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - - - - -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (glcpp_parser_t *parser) -#else -int -yyparse (parser) - glcpp_parser_t *parser; -#endif -#endif -{ -/* The lookahead symbol. */ -int yychar; - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; - -/* Location data for the lookahead symbol. */ -YYLTYPE yylloc; - - /* Number of syntax errors so far. */ - int yynerrs; - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - /* The location stack. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls; - YYLTYPE *yylsp; - - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[3]; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - YYLTYPE yyloc; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; - yyls = yylsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - yylsp = yyls; - -#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - /* Initialize the default location before parsing starts. */ - yylloc.first_line = yylloc.last_line = 1; - yylloc.first_column = yylloc.last_column = 1; -#endif - -/* User initialization code. */ - -/* Line 1251 of yacc.c */ -#line 147 "glcpp/glcpp-parse.y" -{ - yylloc.first_line = 1; - yylloc.first_column = 1; - yylloc.last_line = 1; - yylloc.last_column = 1; - yylloc.source = 0; -} - -/* Line 1251 of yacc.c */ -#line 1617 "glcpp/glcpp-parse.c" - yylsp[0] = yylloc; - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yyls1, yysize * sizeof (*yylsp), - &yystacksize); - - yyls = yyls1; - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - *++yyvsp = yylval; - *++yylsp = yylloc; - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 4: - -/* Line 1464 of yacc.c */ -#line 186 "glcpp/glcpp-parse.y" - { - ralloc_strcat (&parser->output, "\n"); - ;} - break; - - case 5: - -/* Line 1464 of yacc.c */ -#line 189 "glcpp/glcpp-parse.y" - { - _glcpp_parser_print_expanded_token_list (parser, (yyvsp[(1) - (1)].token_list)); - ralloc_strcat (&parser->output, "\n"); - ralloc_free ((yyvsp[(1) - (1)].token_list)); - ;} - break; - - case 8: - -/* Line 1464 of yacc.c */ -#line 199 "glcpp/glcpp-parse.y" - { - _glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (3)]), (yyvsp[(2) - (3)].ival)); - ;} - break; - - case 9: - -/* Line 1464 of yacc.c */ -#line 202 "glcpp/glcpp-parse.y" - { - _glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (3)]), "elif", (yyvsp[(2) - (3)].ival)); - ;} - break; - - case 10: - -/* Line 1464 of yacc.c */ -#line 208 "glcpp/glcpp-parse.y" - { - _define_object_macro (parser, & (yylsp[(2) - (4)]), (yyvsp[(2) - (4)].str), (yyvsp[(3) - (4)].token_list)); - ;} - break; - - case 11: - -/* Line 1464 of yacc.c */ -#line 211 "glcpp/glcpp-parse.y" - { - _define_function_macro (parser, & (yylsp[(2) - (6)]), (yyvsp[(2) - (6)].str), NULL, (yyvsp[(5) - (6)].token_list)); - ;} - break; - - case 12: - -/* Line 1464 of yacc.c */ -#line 214 "glcpp/glcpp-parse.y" - { - _define_function_macro (parser, & (yylsp[(2) - (7)]), (yyvsp[(2) - (7)].str), (yyvsp[(4) - (7)].string_list), (yyvsp[(6) - (7)].token_list)); - ;} - break; - - case 13: - -/* Line 1464 of yacc.c */ -#line 217 "glcpp/glcpp-parse.y" - { - macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (3)].str)); - if (macro) { - hash_table_remove (parser->defines, (yyvsp[(2) - (3)].str)); - ralloc_free (macro); - } - ralloc_free ((yyvsp[(2) - (3)].str)); - ;} - break; - - case 14: - -/* Line 1464 of yacc.c */ -#line 225 "glcpp/glcpp-parse.y" - { - /* Be careful to only evaluate the 'if' expression if - * we are not skipping. When we are skipping, we - * simply push a new 0-valued 'if' onto the skip - * stack. - * - * This avoids generating diagnostics for invalid - * expressions that are being skipped. */ - if (parser->skip_stack == NULL || - parser->skip_stack->type == SKIP_NO_SKIP) - { - _glcpp_parser_expand_if (parser, IF_EXPANDED, (yyvsp[(2) - (3)].token_list)); - } - else - { - _glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (3)]), 0); - parser->skip_stack->type = SKIP_TO_ENDIF; - } - ;} - break; - - case 15: - -/* Line 1464 of yacc.c */ -#line 244 "glcpp/glcpp-parse.y" - { - /* #if without an expression is only an error if we - * are not skipping */ - if (parser->skip_stack == NULL || - parser->skip_stack->type == SKIP_NO_SKIP) - { - glcpp_error(& (yylsp[(1) - (2)]), parser, "#if with no expression"); - } - _glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (2)]), 0); - ;} - break; - - case 16: - -/* Line 1464 of yacc.c */ -#line 254 "glcpp/glcpp-parse.y" - { - macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (4)].str)); - ralloc_free ((yyvsp[(2) - (4)].str)); - _glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (4)]), macro != NULL); - ;} - break; - - case 17: - -/* Line 1464 of yacc.c */ -#line 259 "glcpp/glcpp-parse.y" - { - macro_t *macro = hash_table_find (parser->defines, (yyvsp[(2) - (4)].str)); - ralloc_free ((yyvsp[(2) - (4)].str)); - _glcpp_parser_skip_stack_push_if (parser, & (yylsp[(1) - (4)]), macro == NULL); - ;} - break; - - case 18: - -/* Line 1464 of yacc.c */ -#line 264 "glcpp/glcpp-parse.y" - { - /* Be careful to only evaluate the 'elif' expression - * if we are not skipping. When we are skipping, we - * simply change to a 0-valued 'elif' on the skip - * stack. - * - * This avoids generating diagnostics for invalid - * expressions that are being skipped. */ - if (parser->skip_stack && - parser->skip_stack->type == SKIP_TO_ELSE) - { - _glcpp_parser_expand_if (parser, ELIF_EXPANDED, (yyvsp[(2) - (3)].token_list)); - } - else - { - _glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (3)]), - "elif", 0); - } - ;} - break; - - case 19: - -/* Line 1464 of yacc.c */ -#line 283 "glcpp/glcpp-parse.y" - { - /* #elif without an expression is an error unless we - * are skipping. */ - if (parser->skip_stack && - parser->skip_stack->type == SKIP_TO_ELSE) - { - glcpp_error(& (yylsp[(1) - (2)]), parser, "#elif with no expression"); - } - else - { - _glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (2)]), - "elif", 0); - glcpp_warning(& (yylsp[(1) - (2)]), parser, "ignoring illegal #elif without expression"); - } - ;} - break; - - case 20: - -/* Line 1464 of yacc.c */ -#line 298 "glcpp/glcpp-parse.y" - { - _glcpp_parser_skip_stack_change_if (parser, & (yylsp[(1) - (2)]), "else", 1); - ;} - break; - - case 21: - -/* Line 1464 of yacc.c */ -#line 301 "glcpp/glcpp-parse.y" - { - _glcpp_parser_skip_stack_pop (parser, & (yylsp[(1) - (2)])); - ;} - break; - - case 22: - -/* Line 1464 of yacc.c */ -#line 304 "glcpp/glcpp-parse.y" - { - macro_t *macro = hash_table_find (parser->defines, "__VERSION__"); - if (macro) { - hash_table_remove (parser->defines, "__VERSION__"); - ralloc_free (macro); - } - add_builtin_define (parser, "__VERSION__", (yyvsp[(2) - (3)].ival)); - - if ((yyvsp[(2) - (3)].ival) == 100) - add_builtin_define (parser, "GL_ES", 1); - - /* Currently, all ES2 implementations support highp in the - * fragment shader, so we always define this macro in ES2. - * If we ever get a driver that doesn't support highp, we'll - * need to add a flag to the gl_context and check that here. - */ - if ((yyvsp[(2) - (3)].ival) >= 130 || (yyvsp[(2) - (3)].ival) == 100) - add_builtin_define (parser, "GL_FRAGMENT_PRECISION_HIGH", 1); - - ralloc_asprintf_append (&parser->output, "#version %" PRIiMAX, (yyvsp[(2) - (3)].ival)); - ;} - break; - - case 24: - -/* Line 1464 of yacc.c */ -#line 329 "glcpp/glcpp-parse.y" - { - if (strlen ((yyvsp[(1) - (1)].str)) >= 3 && strncmp ((yyvsp[(1) - (1)].str), "0x", 2) == 0) { - (yyval.ival) = strtoll ((yyvsp[(1) - (1)].str) + 2, NULL, 16); - } else if ((yyvsp[(1) - (1)].str)[0] == '0') { - (yyval.ival) = strtoll ((yyvsp[(1) - (1)].str), NULL, 8); - } else { - (yyval.ival) = strtoll ((yyvsp[(1) - (1)].str), NULL, 10); - } - ;} - break; - - case 25: - -/* Line 1464 of yacc.c */ -#line 338 "glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (1)].ival); - ;} - break; - - case 27: - -/* Line 1464 of yacc.c */ -#line 344 "glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) || (yyvsp[(3) - (3)].ival); - ;} - break; - - case 28: - -/* Line 1464 of yacc.c */ -#line 347 "glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) && (yyvsp[(3) - (3)].ival); - ;} - break; - - case 29: - -/* Line 1464 of yacc.c */ -#line 350 "glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) | (yyvsp[(3) - (3)].ival); - ;} - break; - - case 30: - -/* Line 1464 of yacc.c */ -#line 353 "glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) ^ (yyvsp[(3) - (3)].ival); - ;} - break; - - case 31: - -/* Line 1464 of yacc.c */ -#line 356 "glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) & (yyvsp[(3) - (3)].ival); - ;} - break; - - case 32: - -/* Line 1464 of yacc.c */ -#line 359 "glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) != (yyvsp[(3) - (3)].ival); - ;} - break; - - case 33: - -/* Line 1464 of yacc.c */ -#line 362 "glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) == (yyvsp[(3) - (3)].ival); - ;} - break; - - case 34: - -/* Line 1464 of yacc.c */ -#line 365 "glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) >= (yyvsp[(3) - (3)].ival); - ;} - break; - - case 35: - -/* Line 1464 of yacc.c */ -#line 368 "glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) <= (yyvsp[(3) - (3)].ival); - ;} - break; - - case 36: - -/* Line 1464 of yacc.c */ -#line 371 "glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) > (yyvsp[(3) - (3)].ival); - ;} - break; - - case 37: - -/* Line 1464 of yacc.c */ -#line 374 "glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) < (yyvsp[(3) - (3)].ival); - ;} - break; - - case 38: - -/* Line 1464 of yacc.c */ -#line 377 "glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) >> (yyvsp[(3) - (3)].ival); - ;} - break; - - case 39: - -/* Line 1464 of yacc.c */ -#line 380 "glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) << (yyvsp[(3) - (3)].ival); - ;} - break; - - case 40: - -/* Line 1464 of yacc.c */ -#line 383 "glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) - (yyvsp[(3) - (3)].ival); - ;} - break; - - case 41: - -/* Line 1464 of yacc.c */ -#line 386 "glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) + (yyvsp[(3) - (3)].ival); - ;} - break; - - case 42: - -/* Line 1464 of yacc.c */ -#line 389 "glcpp/glcpp-parse.y" - { - if ((yyvsp[(3) - (3)].ival) == 0) { - yyerror (& (yylsp[(1) - (3)]), parser, - "zero modulus in preprocessor directive"); - } else { - (yyval.ival) = (yyvsp[(1) - (3)].ival) % (yyvsp[(3) - (3)].ival); - } - ;} - break; - - case 43: - -/* Line 1464 of yacc.c */ -#line 397 "glcpp/glcpp-parse.y" - { - if ((yyvsp[(3) - (3)].ival) == 0) { - yyerror (& (yylsp[(1) - (3)]), parser, - "division by 0 in preprocessor directive"); - } else { - (yyval.ival) = (yyvsp[(1) - (3)].ival) / (yyvsp[(3) - (3)].ival); - } - ;} - break; - - case 44: - -/* Line 1464 of yacc.c */ -#line 405 "glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(1) - (3)].ival) * (yyvsp[(3) - (3)].ival); - ;} - break; - - case 45: - -/* Line 1464 of yacc.c */ -#line 408 "glcpp/glcpp-parse.y" - { - (yyval.ival) = ! (yyvsp[(2) - (2)].ival); - ;} - break; - - case 46: - -/* Line 1464 of yacc.c */ -#line 411 "glcpp/glcpp-parse.y" - { - (yyval.ival) = ~ (yyvsp[(2) - (2)].ival); - ;} - break; - - case 47: - -/* Line 1464 of yacc.c */ -#line 414 "glcpp/glcpp-parse.y" - { - (yyval.ival) = - (yyvsp[(2) - (2)].ival); - ;} - break; - - case 48: - -/* Line 1464 of yacc.c */ -#line 417 "glcpp/glcpp-parse.y" - { - (yyval.ival) = + (yyvsp[(2) - (2)].ival); - ;} - break; - - case 49: - -/* Line 1464 of yacc.c */ -#line 420 "glcpp/glcpp-parse.y" - { - (yyval.ival) = (yyvsp[(2) - (3)].ival); - ;} - break; - - case 50: - -/* Line 1464 of yacc.c */ -#line 426 "glcpp/glcpp-parse.y" - { - (yyval.string_list) = _string_list_create (parser); - _string_list_append_item ((yyval.string_list), (yyvsp[(1) - (1)].str)); - ralloc_steal ((yyval.string_list), (yyvsp[(1) - (1)].str)); - ;} - break; - - case 51: - -/* Line 1464 of yacc.c */ -#line 431 "glcpp/glcpp-parse.y" - { - (yyval.string_list) = (yyvsp[(1) - (3)].string_list); - _string_list_append_item ((yyval.string_list), (yyvsp[(3) - (3)].str)); - ralloc_steal ((yyval.string_list), (yyvsp[(3) - (3)].str)); - ;} - break; - - case 52: - -/* Line 1464 of yacc.c */ -#line 439 "glcpp/glcpp-parse.y" - { (yyval.token_list) = NULL; ;} - break; - - case 54: - -/* Line 1464 of yacc.c */ -#line 444 "glcpp/glcpp-parse.y" - { - yyerror (& (yylsp[(1) - (2)]), parser, "Invalid tokens after #"); - ;} - break; - - case 55: - -/* Line 1464 of yacc.c */ -#line 450 "glcpp/glcpp-parse.y" - { (yyval.token_list) = NULL; ;} - break; - - case 58: - -/* Line 1464 of yacc.c */ -#line 456 "glcpp/glcpp-parse.y" - { - glcpp_warning(&(yylsp[(1) - (1)]), parser, "extra tokens at end of directive"); - ;} - break; - - case 59: - -/* Line 1464 of yacc.c */ -#line 463 "glcpp/glcpp-parse.y" - { - int v = hash_table_find (parser->defines, (yyvsp[(2) - (2)].str)) ? 1 : 0; - (yyval.token) = _token_create_ival (parser, INTEGER, v); - ;} - break; - - case 60: - -/* Line 1464 of yacc.c */ -#line 467 "glcpp/glcpp-parse.y" - { - int v = hash_table_find (parser->defines, (yyvsp[(3) - (4)].str)) ? 1 : 0; - (yyval.token) = _token_create_ival (parser, INTEGER, v); - ;} - break; - - case 62: - -/* Line 1464 of yacc.c */ -#line 476 "glcpp/glcpp-parse.y" - { - (yyval.token_list) = _token_list_create (parser); - _token_list_append ((yyval.token_list), (yyvsp[(1) - (1)].token)); - ;} - break; - - case 63: - -/* Line 1464 of yacc.c */ -#line 480 "glcpp/glcpp-parse.y" - { - (yyval.token_list) = (yyvsp[(1) - (2)].token_list); - _token_list_append ((yyval.token_list), (yyvsp[(2) - (2)].token)); - ;} - break; - - case 64: - -/* Line 1464 of yacc.c */ -#line 487 "glcpp/glcpp-parse.y" - { - parser->space_tokens = 1; - (yyval.token_list) = _token_list_create (parser); - _token_list_append ((yyval.token_list), (yyvsp[(1) - (1)].token)); - ;} - break; - - case 65: - -/* Line 1464 of yacc.c */ -#line 492 "glcpp/glcpp-parse.y" - { - (yyval.token_list) = (yyvsp[(1) - (2)].token_list); - _token_list_append ((yyval.token_list), (yyvsp[(2) - (2)].token)); - ;} - break; - - case 66: - -/* Line 1464 of yacc.c */ -#line 499 "glcpp/glcpp-parse.y" - { - (yyval.token) = _token_create_str (parser, IDENTIFIER, (yyvsp[(1) - (1)].str)); - (yyval.token)->location = yylloc; - ;} - break; - - case 67: - -/* Line 1464 of yacc.c */ -#line 503 "glcpp/glcpp-parse.y" - { - (yyval.token) = _token_create_str (parser, INTEGER_STRING, (yyvsp[(1) - (1)].str)); - (yyval.token)->location = yylloc; - ;} - break; - - case 68: - -/* Line 1464 of yacc.c */ -#line 507 "glcpp/glcpp-parse.y" - { - (yyval.token) = _token_create_ival (parser, (yyvsp[(1) - (1)].ival), (yyvsp[(1) - (1)].ival)); - (yyval.token)->location = yylloc; - ;} - break; - - case 69: - -/* Line 1464 of yacc.c */ -#line 511 "glcpp/glcpp-parse.y" - { - (yyval.token) = _token_create_str (parser, OTHER, (yyvsp[(1) - (1)].str)); - (yyval.token)->location = yylloc; - ;} - break; - - case 70: - -/* Line 1464 of yacc.c */ -#line 515 "glcpp/glcpp-parse.y" - { - (yyval.token) = _token_create_ival (parser, SPACE, SPACE); - (yyval.token)->location = yylloc; - ;} - break; - - case 71: - -/* Line 1464 of yacc.c */ -#line 522 "glcpp/glcpp-parse.y" - { (yyval.ival) = '['; ;} - break; - - case 72: - -/* Line 1464 of yacc.c */ -#line 523 "glcpp/glcpp-parse.y" - { (yyval.ival) = ']'; ;} - break; - - case 73: - -/* Line 1464 of yacc.c */ -#line 524 "glcpp/glcpp-parse.y" - { (yyval.ival) = '('; ;} - break; - - case 74: - -/* Line 1464 of yacc.c */ -#line 525 "glcpp/glcpp-parse.y" - { (yyval.ival) = ')'; ;} - break; - - case 75: - -/* Line 1464 of yacc.c */ -#line 526 "glcpp/glcpp-parse.y" - { (yyval.ival) = '{'; ;} - break; - - case 76: - -/* Line 1464 of yacc.c */ -#line 527 "glcpp/glcpp-parse.y" - { (yyval.ival) = '}'; ;} - break; - - case 77: - -/* Line 1464 of yacc.c */ -#line 528 "glcpp/glcpp-parse.y" - { (yyval.ival) = '.'; ;} - break; - - case 78: - -/* Line 1464 of yacc.c */ -#line 529 "glcpp/glcpp-parse.y" - { (yyval.ival) = '&'; ;} - break; - - case 79: - -/* Line 1464 of yacc.c */ -#line 530 "glcpp/glcpp-parse.y" - { (yyval.ival) = '*'; ;} - break; - - case 80: - -/* Line 1464 of yacc.c */ -#line 531 "glcpp/glcpp-parse.y" - { (yyval.ival) = '+'; ;} - break; - - case 81: - -/* Line 1464 of yacc.c */ -#line 532 "glcpp/glcpp-parse.y" - { (yyval.ival) = '-'; ;} - break; - - case 82: - -/* Line 1464 of yacc.c */ -#line 533 "glcpp/glcpp-parse.y" - { (yyval.ival) = '~'; ;} - break; - - case 83: - -/* Line 1464 of yacc.c */ -#line 534 "glcpp/glcpp-parse.y" - { (yyval.ival) = '!'; ;} - break; - - case 84: - -/* Line 1464 of yacc.c */ -#line 535 "glcpp/glcpp-parse.y" - { (yyval.ival) = '/'; ;} - break; - - case 85: - -/* Line 1464 of yacc.c */ -#line 536 "glcpp/glcpp-parse.y" - { (yyval.ival) = '%'; ;} - break; - - case 86: - -/* Line 1464 of yacc.c */ -#line 537 "glcpp/glcpp-parse.y" - { (yyval.ival) = LEFT_SHIFT; ;} - break; - - case 87: - -/* Line 1464 of yacc.c */ -#line 538 "glcpp/glcpp-parse.y" - { (yyval.ival) = RIGHT_SHIFT; ;} - break; - - case 88: - -/* Line 1464 of yacc.c */ -#line 539 "glcpp/glcpp-parse.y" - { (yyval.ival) = '<'; ;} - break; - - case 89: - -/* Line 1464 of yacc.c */ -#line 540 "glcpp/glcpp-parse.y" - { (yyval.ival) = '>'; ;} - break; - - case 90: - -/* Line 1464 of yacc.c */ -#line 541 "glcpp/glcpp-parse.y" - { (yyval.ival) = LESS_OR_EQUAL; ;} - break; - - case 91: - -/* Line 1464 of yacc.c */ -#line 542 "glcpp/glcpp-parse.y" - { (yyval.ival) = GREATER_OR_EQUAL; ;} - break; - - case 92: - -/* Line 1464 of yacc.c */ -#line 543 "glcpp/glcpp-parse.y" - { (yyval.ival) = EQUAL; ;} - break; - - case 93: - -/* Line 1464 of yacc.c */ -#line 544 "glcpp/glcpp-parse.y" - { (yyval.ival) = NOT_EQUAL; ;} - break; - - case 94: - -/* Line 1464 of yacc.c */ -#line 545 "glcpp/glcpp-parse.y" - { (yyval.ival) = '^'; ;} - break; - - case 95: - -/* Line 1464 of yacc.c */ -#line 546 "glcpp/glcpp-parse.y" - { (yyval.ival) = '|'; ;} - break; - - case 96: - -/* Line 1464 of yacc.c */ -#line 547 "glcpp/glcpp-parse.y" - { (yyval.ival) = AND; ;} - break; - - case 97: - -/* Line 1464 of yacc.c */ -#line 548 "glcpp/glcpp-parse.y" - { (yyval.ival) = OR; ;} - break; - - case 98: - -/* Line 1464 of yacc.c */ -#line 549 "glcpp/glcpp-parse.y" - { (yyval.ival) = ';'; ;} - break; - - case 99: - -/* Line 1464 of yacc.c */ -#line 550 "glcpp/glcpp-parse.y" - { (yyval.ival) = ','; ;} - break; - - case 100: - -/* Line 1464 of yacc.c */ -#line 551 "glcpp/glcpp-parse.y" - { (yyval.ival) = '='; ;} - break; - - case 101: - -/* Line 1464 of yacc.c */ -#line 552 "glcpp/glcpp-parse.y" - { (yyval.ival) = PASTE; ;} - break; - - - -/* Line 1464 of yacc.c */ -#line 2661 "glcpp/glcpp-parse.c" - default: break; - } - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - *++yylsp = yyloc; - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (&yylloc, parser, YY_("syntax error")); -#else - { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (&yylloc, parser, yymsg); - } - else - { - yyerror (&yylloc, parser, YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } - } -#endif - } - - yyerror_range[1] = yylloc; - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, parser); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - yyerror_range[1] = yylsp[1-yylen]; - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - yyerror_range[1] = *yylsp; - yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp, parser); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - *++yyvsp = yylval; - - yyerror_range[2] = yylloc; - /* Using YYLLOC is tempting, but would change the location of - the lookahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, yyerror_range, 2); - *++yylsp = yyloc; - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined(yyoverflow) || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (&yylloc, parser, YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, parser); - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yylsp, parser); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - - -/* Line 1684 of yacc.c */ -#line 555 "glcpp/glcpp-parse.y" - - -string_list_t * -_string_list_create (void *ctx) -{ - string_list_t *list; - - list = ralloc (ctx, string_list_t); - list->head = NULL; - list->tail = NULL; - - return list; -} - -void -_string_list_append_item (string_list_t *list, const char *str) -{ - string_node_t *node; - - node = ralloc (list, string_node_t); - node->str = ralloc_strdup (node, str); - - node->next = NULL; - - if (list->head == NULL) { - list->head = node; - } else { - list->tail->next = node; - } - - list->tail = node; -} - -int -_string_list_contains (string_list_t *list, const char *member, int *index) -{ - string_node_t *node; - int i; - - if (list == NULL) - return 0; - - for (i = 0, node = list->head; node; i++, node = node->next) { - if (strcmp (node->str, member) == 0) { - if (index) - *index = i; - return 1; - } - } - - return 0; -} - -int -_string_list_length (string_list_t *list) -{ - int length = 0; - string_node_t *node; - - if (list == NULL) - return 0; - - for (node = list->head; node; node = node->next) - length++; - - return length; -} - -int -_string_list_equal (string_list_t *a, string_list_t *b) -{ - string_node_t *node_a, *node_b; - - if (a == NULL && b == NULL) - return 1; - - if (a == NULL || b == NULL) - return 0; - - for (node_a = a->head, node_b = b->head; - node_a && node_b; - node_a = node_a->next, node_b = node_b->next) - { - if (strcmp (node_a->str, node_b->str)) - return 0; - } - - /* Catch the case of lists being different lengths, (which - * would cause the loop above to terminate after the shorter - * list). */ - return node_a == node_b; -} - -argument_list_t * -_argument_list_create (void *ctx) -{ - argument_list_t *list; - - list = ralloc (ctx, argument_list_t); - list->head = NULL; - list->tail = NULL; - - return list; -} - -void -_argument_list_append (argument_list_t *list, token_list_t *argument) -{ - argument_node_t *node; - - node = ralloc (list, argument_node_t); - node->argument = argument; - - node->next = NULL; - - if (list->head == NULL) { - list->head = node; - } else { - list->tail->next = node; - } - - list->tail = node; -} - -int -_argument_list_length (argument_list_t *list) -{ - int length = 0; - argument_node_t *node; - - if (list == NULL) - return 0; - - for (node = list->head; node; node = node->next) - length++; - - return length; -} - -token_list_t * -_argument_list_member_at (argument_list_t *list, int index) -{ - argument_node_t *node; - int i; - - if (list == NULL) - return NULL; - - node = list->head; - for (i = 0; i < index; i++) { - node = node->next; - if (node == NULL) - break; - } - - if (node) - return node->argument; - - return NULL; -} - -/* Note: This function ralloc_steal()s the str pointer. */ -token_t * -_token_create_str (void *ctx, int type, char *str) -{ - token_t *token; - - token = ralloc (ctx, token_t); - token->type = type; - token->value.str = str; - - ralloc_steal (token, str); - - return token; -} - -token_t * -_token_create_ival (void *ctx, int type, int ival) -{ - token_t *token; - - token = ralloc (ctx, token_t); - token->type = type; - token->value.ival = ival; - - return token; -} - -token_list_t * -_token_list_create (void *ctx) -{ - token_list_t *list; - - list = ralloc (ctx, token_list_t); - list->head = NULL; - list->tail = NULL; - list->non_space_tail = NULL; - - return list; -} - -void -_token_list_append (token_list_t *list, token_t *token) -{ - token_node_t *node; - - node = ralloc (list, token_node_t); - node->token = token; - node->next = NULL; - - if (list->head == NULL) { - list->head = node; - } else { - list->tail->next = node; - } - - list->tail = node; - if (token->type != SPACE) - list->non_space_tail = node; -} - -void -_token_list_append_list (token_list_t *list, token_list_t *tail) -{ - if (tail == NULL || tail->head == NULL) - return; - - if (list->head == NULL) { - list->head = tail->head; - } else { - list->tail->next = tail->head; - } - - list->tail = tail->tail; - list->non_space_tail = tail->non_space_tail; -} - -static token_list_t * -_token_list_copy (void *ctx, token_list_t *other) -{ - token_list_t *copy; - token_node_t *node; - - if (other == NULL) - return NULL; - - copy = _token_list_create (ctx); - for (node = other->head; node; node = node->next) { - token_t *new_token = ralloc (copy, token_t); - *new_token = *node->token; - _token_list_append (copy, new_token); - } - - return copy; -} - -static void -_token_list_trim_trailing_space (token_list_t *list) -{ - token_node_t *tail, *next; - - if (list->non_space_tail) { - tail = list->non_space_tail->next; - list->non_space_tail->next = NULL; - list->tail = list->non_space_tail; - - while (tail) { - next = tail->next; - ralloc_free (tail); - tail = next; - } - } -} - -static int -_token_list_is_empty_ignoring_space (token_list_t *l) -{ - token_node_t *n; - - if (l == NULL) - return 1; - - n = l->head; - while (n != NULL && n->token->type == SPACE) - n = n->next; - - return n == NULL; -} - -int -_token_list_equal_ignoring_space (token_list_t *a, token_list_t *b) -{ - token_node_t *node_a, *node_b; - - if (a == NULL || b == NULL) { - int a_empty = _token_list_is_empty_ignoring_space(a); - int b_empty = _token_list_is_empty_ignoring_space(b); - return a_empty == b_empty; - } - - node_a = a->head; - node_b = b->head; - - while (1) - { - if (node_a == NULL && node_b == NULL) - break; - - if (node_a == NULL || node_b == NULL) - return 0; - - if (node_a->token->type == SPACE) { - node_a = node_a->next; - continue; - } - - if (node_b->token->type == SPACE) { - node_b = node_b->next; - continue; - } - - if (node_a->token->type != node_b->token->type) - return 0; - - switch (node_a->token->type) { - case INTEGER: - if (node_a->token->value.ival != - node_b->token->value.ival) - { - return 0; - } - break; - case IDENTIFIER: - case INTEGER_STRING: - case OTHER: - if (strcmp (node_a->token->value.str, - node_b->token->value.str)) - { - return 0; - } - break; - } - - node_a = node_a->next; - node_b = node_b->next; - } - - return 1; -} - -static void -_token_print (char **out, token_t *token) -{ - if (token->type < 256) { - ralloc_asprintf_append (out, "%c", token->type); - return; - } - - switch (token->type) { - case INTEGER: - ralloc_asprintf_append (out, "%" PRIiMAX, token->value.ival); - break; - case IDENTIFIER: - case INTEGER_STRING: - case OTHER: - ralloc_strcat (out, token->value.str); - break; - case SPACE: - ralloc_strcat (out, " "); - break; - case LEFT_SHIFT: - ralloc_strcat (out, "<<"); - break; - case RIGHT_SHIFT: - ralloc_strcat (out, ">>"); - break; - case LESS_OR_EQUAL: - ralloc_strcat (out, "<="); - break; - case GREATER_OR_EQUAL: - ralloc_strcat (out, ">="); - break; - case EQUAL: - ralloc_strcat (out, "=="); - break; - case NOT_EQUAL: - ralloc_strcat (out, "!="); - break; - case AND: - ralloc_strcat (out, "&&"); - break; - case OR: - ralloc_strcat (out, "||"); - break; - case PASTE: - ralloc_strcat (out, "##"); - break; - case COMMA_FINAL: - ralloc_strcat (out, ","); - break; - case PLACEHOLDER: - /* Nothing to print. */ - break; - default: - assert(!"Error: Don't know how to print token."); - break; - } -} - -/* Return a new token (ralloc()ed off of 'token') formed by pasting - * 'token' and 'other'. Note that this function may return 'token' or - * 'other' directly rather than allocating anything new. - * - * Caution: Only very cursory error-checking is performed to see if - * the final result is a valid single token. */ -static token_t * -_token_paste (glcpp_parser_t *parser, token_t *token, token_t *other) -{ - token_t *combined = NULL; - - /* Pasting a placeholder onto anything makes no change. */ - if (other->type == PLACEHOLDER) - return token; - - /* When 'token' is a placeholder, just return 'other'. */ - if (token->type == PLACEHOLDER) - return other; - - /* A very few single-character punctuators can be combined - * with another to form a multi-character punctuator. */ - switch (token->type) { - case '<': - if (other->type == '<') - combined = _token_create_ival (token, LEFT_SHIFT, LEFT_SHIFT); - else if (other->type == '=') - combined = _token_create_ival (token, LESS_OR_EQUAL, LESS_OR_EQUAL); - break; - case '>': - if (other->type == '>') - combined = _token_create_ival (token, RIGHT_SHIFT, RIGHT_SHIFT); - else if (other->type == '=') - combined = _token_create_ival (token, GREATER_OR_EQUAL, GREATER_OR_EQUAL); - break; - case '=': - if (other->type == '=') - combined = _token_create_ival (token, EQUAL, EQUAL); - break; - case '!': - if (other->type == '=') - combined = _token_create_ival (token, NOT_EQUAL, NOT_EQUAL); - break; - case '&': - if (other->type == '&') - combined = _token_create_ival (token, AND, AND); - break; - case '|': - if (other->type == '|') - combined = _token_create_ival (token, OR, OR); - break; - } - - if (combined != NULL) { - /* Inherit the location from the first token */ - combined->location = token->location; - return combined; - } - - /* Two string-valued tokens can usually just be mashed - * together. - * - * XXX: This isn't actually legitimate. Several things here - * should result in a diagnostic since the result cannot be a - * valid, single pre-processing token. For example, pasting - * "123" and "abc" is not legal, but we don't catch that - * here. */ - if ((token->type == IDENTIFIER || token->type == OTHER || token->type == INTEGER_STRING) && - (other->type == IDENTIFIER || other->type == OTHER || other->type == INTEGER_STRING)) - { - char *str; - - str = ralloc_asprintf (token, "%s%s", token->value.str, - other->value.str); - combined = _token_create_str (token, token->type, str); - combined->location = token->location; - return combined; - } - - glcpp_error (&token->location, parser, ""); - ralloc_strcat (&parser->info_log, "Pasting \""); - _token_print (&parser->info_log, token); - ralloc_strcat (&parser->info_log, "\" and \""); - _token_print (&parser->info_log, other); - ralloc_strcat (&parser->info_log, "\" does not give a valid preprocessing token.\n"); - - return token; -} - -static void -_token_list_print (glcpp_parser_t *parser, token_list_t *list) -{ - token_node_t *node; - - if (list == NULL) - return; - - for (node = list->head; node; node = node->next) - _token_print (&parser->output, node->token); -} - -void -yyerror (YYLTYPE *locp, glcpp_parser_t *parser, const char *error) -{ - glcpp_error(locp, parser, "%s", error); -} - -static void add_builtin_define(glcpp_parser_t *parser, - const char *name, int value) -{ - token_t *tok; - token_list_t *list; - - tok = _token_create_ival (parser, INTEGER, value); - - list = _token_list_create(parser); - _token_list_append(list, tok); - _define_object_macro(parser, NULL, name, list); -} - -glcpp_parser_t * -glcpp_parser_create (const struct gl_extensions *extensions, int api) -{ - glcpp_parser_t *parser; - int language_version; - - parser = ralloc (NULL, glcpp_parser_t); - - glcpp_lex_init_extra (parser, &parser->scanner); - parser->defines = hash_table_ctor (32, hash_table_string_hash, - hash_table_string_compare); - parser->active = NULL; - parser->lexing_if = 0; - parser->space_tokens = 1; - parser->newline_as_space = 0; - parser->in_control_line = 0; - parser->paren_count = 0; - - parser->skip_stack = NULL; - - parser->lex_from_list = NULL; - parser->lex_from_node = NULL; - - parser->output = ralloc_strdup(parser, ""); - parser->info_log = ralloc_strdup(parser, ""); - parser->error = 0; - - /* Add pre-defined macros. */ - add_builtin_define(parser, "GL_ARB_draw_buffers", 1); - add_builtin_define(parser, "GL_ARB_texture_rectangle", 1); - - if (api == API_OPENGLES2) - add_builtin_define(parser, "GL_ES", 1); - - if (extensions != NULL) { - if (extensions->EXT_texture_array) { - add_builtin_define(parser, "GL_EXT_texture_array", 1); - } - - if (extensions->ARB_fragment_coord_conventions) - add_builtin_define(parser, "GL_ARB_fragment_coord_conventions", - 1); - - if (extensions->ARB_explicit_attrib_location) - add_builtin_define(parser, "GL_ARB_explicit_attrib_location", 1); - - if (extensions->ARB_shader_texture_lod) - add_builtin_define(parser, "GL_ARB_shader_texture_lod", 1); - - if (extensions->ARB_draw_instanced) - add_builtin_define(parser, "GL_ARB_draw_instanced", 1); - - if (extensions->ARB_conservative_depth) { - add_builtin_define(parser, "GL_AMD_conservative_depth", 1); - add_builtin_define(parser, "GL_ARB_conservative_depth", 1); - } - - if (extensions->OES_EGL_image_external) - add_builtin_define(parser, "GL_OES_EGL_image_external", 1); - } - - language_version = 110; - add_builtin_define(parser, "__VERSION__", language_version); - - return parser; -} - -int -glcpp_parser_parse (glcpp_parser_t *parser) -{ - return yyparse (parser); -} - -void -glcpp_parser_destroy (glcpp_parser_t *parser) -{ - glcpp_lex_destroy (parser->scanner); - hash_table_dtor (parser->defines); - ralloc_free (parser); -} - -typedef enum function_status -{ - FUNCTION_STATUS_SUCCESS, - FUNCTION_NOT_A_FUNCTION, - FUNCTION_UNBALANCED_PARENTHESES -} function_status_t; - -/* Find a set of function-like macro arguments by looking for a - * balanced set of parentheses. - * - * When called, 'node' should be the opening-parenthesis token, (or - * perhaps preceeding SPACE tokens). Upon successful return *last will - * be the last consumed node, (corresponding to the closing right - * parenthesis). - * - * Return values: - * - * FUNCTION_STATUS_SUCCESS: - * - * Successfully parsed a set of function arguments. - * - * FUNCTION_NOT_A_FUNCTION: - * - * Macro name not followed by a '('. This is not an error, but - * simply that the macro name should be treated as a non-macro. - * - * FUNCTION_UNBALANCED_PARENTHESES - * - * Macro name is not followed by a balanced set of parentheses. - */ -static function_status_t -_arguments_parse (argument_list_t *arguments, - token_node_t *node, - token_node_t **last) -{ - token_list_t *argument; - int paren_count; - - node = node->next; - - /* Ignore whitespace before first parenthesis. */ - while (node && node->token->type == SPACE) - node = node->next; - - if (node == NULL || node->token->type != '(') - return FUNCTION_NOT_A_FUNCTION; - - node = node->next; - - argument = _token_list_create (arguments); - _argument_list_append (arguments, argument); - - for (paren_count = 1; node; node = node->next) { - if (node->token->type == '(') - { - paren_count++; - } - else if (node->token->type == ')') - { - paren_count--; - if (paren_count == 0) - break; - } - - if (node->token->type == ',' && - paren_count == 1) - { - _token_list_trim_trailing_space (argument); - argument = _token_list_create (arguments); - _argument_list_append (arguments, argument); - } - else { - if (argument->head == NULL) { - /* Don't treat initial whitespace as - * part of the arguement. */ - if (node->token->type == SPACE) - continue; - } - _token_list_append (argument, node->token); - } - } - - if (paren_count) - return FUNCTION_UNBALANCED_PARENTHESES; - - *last = node; - - return FUNCTION_STATUS_SUCCESS; -} - -static token_list_t * -_token_list_create_with_one_space (void *ctx) -{ - token_list_t *list; - token_t *space; - - list = _token_list_create (ctx); - space = _token_create_ival (list, SPACE, SPACE); - _token_list_append (list, space); - - return list; -} - -static void -_glcpp_parser_expand_if (glcpp_parser_t *parser, int type, token_list_t *list) -{ - token_list_t *expanded; - token_t *token; - - expanded = _token_list_create (parser); - token = _token_create_ival (parser, type, type); - _token_list_append (expanded, token); - _glcpp_parser_expand_token_list (parser, list); - _token_list_append_list (expanded, list); - glcpp_parser_lex_from (parser, expanded); -} - -static void -_glcpp_parser_apply_pastes (glcpp_parser_t *parser, token_list_t *list) -{ - token_node_t *node; - - node = list->head; - while (node) - { - token_node_t *next_non_space; - - /* Look ahead for a PASTE token, skipping space. */ - next_non_space = node->next; - while (next_non_space && next_non_space->token->type == SPACE) - next_non_space = next_non_space->next; - - if (next_non_space == NULL) - break; - - if (next_non_space->token->type != PASTE) { - node = next_non_space; - continue; - } - - /* Now find the next non-space token after the PASTE. */ - next_non_space = next_non_space->next; - while (next_non_space && next_non_space->token->type == SPACE) - next_non_space = next_non_space->next; - - if (next_non_space == NULL) { - yyerror (&node->token->location, parser, "'##' cannot appear at either end of a macro expansion\n"); - return; - } - - node->token = _token_paste (parser, node->token, next_non_space->token); - node->next = next_non_space->next; - if (next_non_space == list->tail) - list->tail = node; - } - - list->non_space_tail = list->tail; -} - -/* This is a helper function that's essentially part of the - * implementation of _glcpp_parser_expand_node. It shouldn't be called - * except for by that function. - * - * Returns NULL if node is a simple token with no expansion, (that is, - * although 'node' corresponds to an identifier defined as a - * function-like macro, it is not followed with a parenthesized - * argument list). - * - * Compute the complete expansion of node (which is a function-like - * macro) and subsequent nodes which are arguments. - * - * Returns the token list that results from the expansion and sets - * *last to the last node in the list that was consumed by the - * expansion. Specifically, *last will be set as follows: as the - * token of the closing right parenthesis. - */ -static token_list_t * -_glcpp_parser_expand_function (glcpp_parser_t *parser, - token_node_t *node, - token_node_t **last) - -{ - macro_t *macro; - const char *identifier; - argument_list_t *arguments; - function_status_t status; - token_list_t *substituted; - int parameter_index; - - identifier = node->token->value.str; - - macro = hash_table_find (parser->defines, identifier); - - assert (macro->is_function); - - arguments = _argument_list_create (parser); - status = _arguments_parse (arguments, node, last); - - switch (status) { - case FUNCTION_STATUS_SUCCESS: - break; - case FUNCTION_NOT_A_FUNCTION: - return NULL; - case FUNCTION_UNBALANCED_PARENTHESES: - glcpp_error (&node->token->location, parser, "Macro %s call has unbalanced parentheses\n", identifier); - return NULL; - } - - /* Replace a macro defined as empty with a SPACE token. */ - if (macro->replacements == NULL) { - ralloc_free (arguments); - return _token_list_create_with_one_space (parser); - } - - if (! ((_argument_list_length (arguments) == - _string_list_length (macro->parameters)) || - (_string_list_length (macro->parameters) == 0 && - _argument_list_length (arguments) == 1 && - arguments->head->argument->head == NULL))) - { - glcpp_error (&node->token->location, parser, - "Error: macro %s invoked with %d arguments (expected %d)\n", - identifier, - _argument_list_length (arguments), - _string_list_length (macro->parameters)); - return NULL; - } - - /* Perform argument substitution on the replacement list. */ - substituted = _token_list_create (arguments); - - for (node = macro->replacements->head; node; node = node->next) - { - if (node->token->type == IDENTIFIER && - _string_list_contains (macro->parameters, - node->token->value.str, - ¶meter_index)) - { - token_list_t *argument; - argument = _argument_list_member_at (arguments, - parameter_index); - /* Before substituting, we expand the argument - * tokens, or append a placeholder token for - * an empty argument. */ - if (argument->head) { - token_list_t *expanded_argument; - expanded_argument = _token_list_copy (parser, - argument); - _glcpp_parser_expand_token_list (parser, - expanded_argument); - _token_list_append_list (substituted, - expanded_argument); - } else { - token_t *new_token; - - new_token = _token_create_ival (substituted, - PLACEHOLDER, - PLACEHOLDER); - _token_list_append (substituted, new_token); - } - } else { - _token_list_append (substituted, node->token); - } - } - - /* After argument substitution, and before further expansion - * below, implement token pasting. */ - - _token_list_trim_trailing_space (substituted); - - _glcpp_parser_apply_pastes (parser, substituted); - - return substituted; -} - -/* Compute the complete expansion of node, (and subsequent nodes after - * 'node' in the case that 'node' is a function-like macro and - * subsequent nodes are arguments). - * - * Returns NULL if node is a simple token with no expansion. - * - * Otherwise, returns the token list that results from the expansion - * and sets *last to the last node in the list that was consumed by - * the expansion. Specifically, *last will be set as follows: - * - * As 'node' in the case of object-like macro expansion. - * - * As the token of the closing right parenthesis in the case of - * function-like macro expansion. - */ -static token_list_t * -_glcpp_parser_expand_node (glcpp_parser_t *parser, - token_node_t *node, - token_node_t **last) -{ - token_t *token = node->token; - const char *identifier; - macro_t *macro; - - /* We only expand identifiers */ - if (token->type != IDENTIFIER) { - /* We change any COMMA into a COMMA_FINAL to prevent - * it being mistaken for an argument separator - * later. */ - if (token->type == ',') { - token->type = COMMA_FINAL; - token->value.ival = COMMA_FINAL; - } - - return NULL; - } - - /* Look up this identifier in the hash table. */ - identifier = token->value.str; - macro = hash_table_find (parser->defines, identifier); - - /* Not a macro, so no expansion needed. */ - if (macro == NULL) - return NULL; - - /* Finally, don't expand this macro if we're already actively - * expanding it, (to avoid infinite recursion). */ - if (_parser_active_list_contains (parser, identifier)) { - /* We change the token type here from IDENTIFIER to - * OTHER to prevent any future expansion of this - * unexpanded token. */ - char *str; - token_list_t *expansion; - token_t *final; - - str = ralloc_strdup (parser, token->value.str); - final = _token_create_str (parser, OTHER, str); - expansion = _token_list_create (parser); - _token_list_append (expansion, final); - *last = node; - return expansion; - } - - if (! macro->is_function) - { - token_list_t *replacement; - *last = node; - - /* Replace a macro defined as empty with a SPACE token. */ - if (macro->replacements == NULL) - return _token_list_create_with_one_space (parser); - - replacement = _token_list_copy (parser, macro->replacements); - _glcpp_parser_apply_pastes (parser, replacement); - return replacement; - } - - return _glcpp_parser_expand_function (parser, node, last); -} - -/* Push a new identifier onto the parser's active list. - * - * Here, 'marker' is the token node that appears in the list after the - * expansion of 'identifier'. That is, when the list iterator begins - * examining 'marker', then it is time to pop this node from the - * active stack. - */ -static void -_parser_active_list_push (glcpp_parser_t *parser, - const char *identifier, - token_node_t *marker) -{ - active_list_t *node; - - node = ralloc (parser->active, active_list_t); - node->identifier = ralloc_strdup (node, identifier); - node->marker = marker; - node->next = parser->active; - - parser->active = node; -} - -static void -_parser_active_list_pop (glcpp_parser_t *parser) -{ - active_list_t *node = parser->active; - - if (node == NULL) { - parser->active = NULL; - return; - } - - node = parser->active->next; - ralloc_free (parser->active); - - parser->active = node; -} - -static int -_parser_active_list_contains (glcpp_parser_t *parser, const char *identifier) -{ - active_list_t *node; - - if (parser->active == NULL) - return 0; - - for (node = parser->active; node; node = node->next) - if (strcmp (node->identifier, identifier) == 0) - return 1; - - return 0; -} - -/* Walk over the token list replacing nodes with their expansion. - * Whenever nodes are expanded the walking will walk over the new - * nodes, continuing to expand as necessary. The results are placed in - * 'list' itself; - */ -static void -_glcpp_parser_expand_token_list (glcpp_parser_t *parser, - token_list_t *list) -{ - token_node_t *node_prev; - token_node_t *node, *last = NULL; - token_list_t *expansion; - active_list_t *active_initial = parser->active; - - if (list == NULL) - return; - - _token_list_trim_trailing_space (list); - - node_prev = NULL; - node = list->head; - - while (node) { - - while (parser->active && parser->active->marker == node) - _parser_active_list_pop (parser); - - expansion = _glcpp_parser_expand_node (parser, node, &last); - if (expansion) { - token_node_t *n; - - for (n = node; n != last->next; n = n->next) - while (parser->active && - parser->active->marker == n) - { - _parser_active_list_pop (parser); - } - - _parser_active_list_push (parser, - node->token->value.str, - last->next); - - /* Splice expansion into list, supporting a - * simple deletion if the expansion is - * empty. */ - if (expansion->head) { - if (node_prev) - node_prev->next = expansion->head; - else - list->head = expansion->head; - expansion->tail->next = last->next; - if (last == list->tail) - list->tail = expansion->tail; - } else { - if (node_prev) - node_prev->next = last->next; - else - list->head = last->next; - if (last == list->tail) - list->tail = NULL; - } - } else { - node_prev = node; - } - node = node_prev ? node_prev->next : list->head; - } - - /* Remove any lingering effects of this invocation on the - * active list. That is, pop until the list looks like it did - * at the beginning of this function. */ - while (parser->active && parser->active != active_initial) - _parser_active_list_pop (parser); - - list->non_space_tail = list->tail; -} - -void -_glcpp_parser_print_expanded_token_list (glcpp_parser_t *parser, - token_list_t *list) -{ - if (list == NULL) - return; - - _glcpp_parser_expand_token_list (parser, list); - - _token_list_trim_trailing_space (list); - - _token_list_print (parser, list); -} - -static void -_check_for_reserved_macro_name (glcpp_parser_t *parser, YYLTYPE *loc, - const char *identifier) -{ - /* According to the GLSL specification, macro names starting with "__" - * or "GL_" are reserved for future use. So, don't allow them. - */ - if (strstr(identifier, "__")) { - glcpp_error (loc, parser, "Macro names containing \"__\" are reserved.\n"); - } - if (strncmp(identifier, "GL_", 3) == 0) { - glcpp_error (loc, parser, "Macro names starting with \"GL_\" are reserved.\n"); - } -} - -static int -_macro_equal (macro_t *a, macro_t *b) -{ - if (a->is_function != b->is_function) - return 0; - - if (a->is_function) { - if (! _string_list_equal (a->parameters, b->parameters)) - return 0; - } - - return _token_list_equal_ignoring_space (a->replacements, - b->replacements); -} - -void -_define_object_macro (glcpp_parser_t *parser, - YYLTYPE *loc, - const char *identifier, - token_list_t *replacements) -{ - macro_t *macro, *previous; - - if (loc != NULL) - _check_for_reserved_macro_name(parser, loc, identifier); - - macro = ralloc (parser, macro_t); - - macro->is_function = 0; - macro->parameters = NULL; - macro->identifier = ralloc_strdup (macro, identifier); - macro->replacements = replacements; - ralloc_steal (macro, replacements); - - previous = hash_table_find (parser->defines, identifier); - if (previous) { - if (_macro_equal (macro, previous)) { - ralloc_free (macro); - return; - } - glcpp_error (loc, parser, "Redefinition of macro %s\n", - identifier); - } - - hash_table_insert (parser->defines, macro, identifier); -} - -void -_define_function_macro (glcpp_parser_t *parser, - YYLTYPE *loc, - const char *identifier, - string_list_t *parameters, - token_list_t *replacements) -{ - macro_t *macro, *previous; - - _check_for_reserved_macro_name(parser, loc, identifier); - - macro = ralloc (parser, macro_t); - ralloc_steal (macro, parameters); - ralloc_steal (macro, replacements); - - macro->is_function = 1; - macro->parameters = parameters; - macro->identifier = ralloc_strdup (macro, identifier); - macro->replacements = replacements; - previous = hash_table_find (parser->defines, identifier); - if (previous) { - if (_macro_equal (macro, previous)) { - ralloc_free (macro); - return; - } - glcpp_error (loc, parser, "Redefinition of macro %s\n", - identifier); - } - - hash_table_insert (parser->defines, macro, identifier); -} - -static int -glcpp_parser_lex (YYSTYPE *yylval, YYLTYPE *yylloc, glcpp_parser_t *parser) -{ - token_node_t *node; - int ret; - - if (parser->lex_from_list == NULL) { - ret = glcpp_lex (yylval, yylloc, parser->scanner); - - /* XXX: This ugly block of code exists for the sole - * purpose of converting a NEWLINE token into a SPACE - * token, but only in the case where we have seen a - * function-like macro name, but have not yet seen its - * closing parenthesis. - * - * There's perhaps a more compact way to do this with - * mid-rule actions in the grammar. - * - * I'm definitely not pleased with the complexity of - * this code here. - */ - if (parser->newline_as_space) - { - if (ret == '(') { - parser->paren_count++; - } else if (ret == ')') { - parser->paren_count--; - if (parser->paren_count == 0) - parser->newline_as_space = 0; - } else if (ret == NEWLINE) { - ret = SPACE; - } else if (ret != SPACE) { - if (parser->paren_count == 0) - parser->newline_as_space = 0; - } - } - else if (parser->in_control_line) - { - if (ret == NEWLINE) - parser->in_control_line = 0; - } - else if (ret == HASH_DEFINE_OBJ || ret == HASH_DEFINE_FUNC || - ret == HASH_UNDEF || ret == HASH_IF || - ret == HASH_IFDEF || ret == HASH_IFNDEF || - ret == HASH_ELIF || ret == HASH_ELSE || - ret == HASH_ENDIF || ret == HASH) - { - parser->in_control_line = 1; - } - else if (ret == IDENTIFIER) - { - macro_t *macro; - macro = hash_table_find (parser->defines, - yylval->str); - if (macro && macro->is_function) { - parser->newline_as_space = 1; - parser->paren_count = 0; - } - } - - return ret; - } - - node = parser->lex_from_node; - - if (node == NULL) { - ralloc_free (parser->lex_from_list); - parser->lex_from_list = NULL; - return NEWLINE; - } - - *yylval = node->token->value; - ret = node->token->type; - - parser->lex_from_node = node->next; - - return ret; -} - -static void -glcpp_parser_lex_from (glcpp_parser_t *parser, token_list_t *list) -{ - token_node_t *node; - - assert (parser->lex_from_list == NULL); - - /* Copy list, eliminating any space tokens. */ - parser->lex_from_list = _token_list_create (parser); - - for (node = list->head; node; node = node->next) { - if (node->token->type == SPACE) - continue; - _token_list_append (parser->lex_from_list, node->token); - } - - ralloc_free (list); - - parser->lex_from_node = parser->lex_from_list->head; - - /* It's possible the list consisted of nothing but whitespace. */ - if (parser->lex_from_node == NULL) { - ralloc_free (parser->lex_from_list); - parser->lex_from_list = NULL; - } -} - -static void -_glcpp_parser_skip_stack_push_if (glcpp_parser_t *parser, YYLTYPE *loc, - int condition) -{ - skip_type_t current = SKIP_NO_SKIP; - skip_node_t *node; - - if (parser->skip_stack) - current = parser->skip_stack->type; - - node = ralloc (parser, skip_node_t); - node->loc = *loc; - - if (current == SKIP_NO_SKIP) { - if (condition) - node->type = SKIP_NO_SKIP; - else - node->type = SKIP_TO_ELSE; - } else { - node->type = SKIP_TO_ENDIF; - } - - node->next = parser->skip_stack; - parser->skip_stack = node; -} - -static void -_glcpp_parser_skip_stack_change_if (glcpp_parser_t *parser, YYLTYPE *loc, - const char *type, int condition) -{ - if (parser->skip_stack == NULL) { - glcpp_error (loc, parser, "%s without #if\n", type); - return; - } - - if (parser->skip_stack->type == SKIP_TO_ELSE) { - if (condition) - parser->skip_stack->type = SKIP_NO_SKIP; - } else { - parser->skip_stack->type = SKIP_TO_ENDIF; - } -} - -static void -_glcpp_parser_skip_stack_pop (glcpp_parser_t *parser, YYLTYPE *loc) -{ - skip_node_t *node; - - if (parser->skip_stack == NULL) { - glcpp_error (loc, parser, "#endif without #if\n"); - return; - } - - node = parser->skip_stack; - parser->skip_stack = node->next; - ralloc_free (node); -} - diff --git a/dll/opengl/mesa/src/glsl/glcpp/glcpp-parse.h b/dll/opengl/mesa/src/glsl/glcpp/glcpp-parse.h deleted file mode 100644 index 40556854f38..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/glcpp-parse.h +++ /dev/null @@ -1,100 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.4.3. */ - -/* Skeleton interface for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2009, 2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - COMMA_FINAL = 258, - DEFINED = 259, - ELIF_EXPANDED = 260, - HASH = 261, - HASH_DEFINE_FUNC = 262, - HASH_DEFINE_OBJ = 263, - HASH_ELIF = 264, - HASH_ELSE = 265, - HASH_ENDIF = 266, - HASH_IF = 267, - HASH_IFDEF = 268, - HASH_IFNDEF = 269, - HASH_UNDEF = 270, - HASH_VERSION = 271, - IDENTIFIER = 272, - IF_EXPANDED = 273, - INTEGER = 274, - INTEGER_STRING = 275, - NEWLINE = 276, - OTHER = 277, - PLACEHOLDER = 278, - SPACE = 279, - PASTE = 280, - OR = 281, - AND = 282, - NOT_EQUAL = 283, - EQUAL = 284, - GREATER_OR_EQUAL = 285, - LESS_OR_EQUAL = 286, - RIGHT_SHIFT = 287, - LEFT_SHIFT = 288, - UNARY = 289 - }; -#endif - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - - - -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 -#endif - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/glcpp-parse.y b/dll/opengl/mesa/src/glsl/glcpp/glcpp-parse.y deleted file mode 100644 index efcc205c2d3..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/glcpp-parse.y +++ /dev/null @@ -1,1918 +0,0 @@ -%{ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include -#include -#include -#include -#include - -#include "glcpp.h" -#include "main/core.h" /* for struct gl_extensions */ -#include "main/mtypes.h" /* for gl_api enum */ - -static void -yyerror (YYLTYPE *locp, glcpp_parser_t *parser, const char *error); - -static void -_define_object_macro (glcpp_parser_t *parser, - YYLTYPE *loc, - const char *macro, - token_list_t *replacements); - -static void -_define_function_macro (glcpp_parser_t *parser, - YYLTYPE *loc, - const char *macro, - string_list_t *parameters, - token_list_t *replacements); - -static string_list_t * -_string_list_create (void *ctx); - -static void -_string_list_append_item (string_list_t *list, const char *str); - -static int -_string_list_contains (string_list_t *list, const char *member, int *index); - -static int -_string_list_length (string_list_t *list); - -static int -_string_list_equal (string_list_t *a, string_list_t *b); - -static argument_list_t * -_argument_list_create (void *ctx); - -static void -_argument_list_append (argument_list_t *list, token_list_t *argument); - -static int -_argument_list_length (argument_list_t *list); - -static token_list_t * -_argument_list_member_at (argument_list_t *list, int index); - -/* Note: This function ralloc_steal()s the str pointer. */ -static token_t * -_token_create_str (void *ctx, int type, char *str); - -static token_t * -_token_create_ival (void *ctx, int type, int ival); - -static token_list_t * -_token_list_create (void *ctx); - -static void -_token_list_append (token_list_t *list, token_t *token); - -static void -_token_list_append_list (token_list_t *list, token_list_t *tail); - -static int -_token_list_equal_ignoring_space (token_list_t *a, token_list_t *b); - -static void -_parser_active_list_push (glcpp_parser_t *parser, - const char *identifier, - token_node_t *marker); - -static void -_parser_active_list_pop (glcpp_parser_t *parser); - -static int -_parser_active_list_contains (glcpp_parser_t *parser, const char *identifier); - -static void -_glcpp_parser_expand_if (glcpp_parser_t *parser, int type, token_list_t *list); - -static void -_glcpp_parser_expand_token_list (glcpp_parser_t *parser, - token_list_t *list); - -static void -_glcpp_parser_print_expanded_token_list (glcpp_parser_t *parser, - token_list_t *list); - -static void -_glcpp_parser_skip_stack_push_if (glcpp_parser_t *parser, YYLTYPE *loc, - int condition); - -static void -_glcpp_parser_skip_stack_change_if (glcpp_parser_t *parser, YYLTYPE *loc, - const char *type, int condition); - -static void -_glcpp_parser_skip_stack_pop (glcpp_parser_t *parser, YYLTYPE *loc); - -#define yylex glcpp_parser_lex - -static int -glcpp_parser_lex (YYSTYPE *yylval, YYLTYPE *yylloc, glcpp_parser_t *parser); - -static void -glcpp_parser_lex_from (glcpp_parser_t *parser, token_list_t *list); - -static void -add_builtin_define(glcpp_parser_t *parser, const char *name, int value); - -%} - -%pure-parser -%error-verbose - -%locations -%initial-action { - @$.first_line = 1; - @$.first_column = 1; - @$.last_line = 1; - @$.last_column = 1; - @$.source = 0; -} - -%parse-param {glcpp_parser_t *parser} -%lex-param {glcpp_parser_t *parser} - -%expect 0 -%token COMMA_FINAL DEFINED ELIF_EXPANDED HASH HASH_DEFINE_FUNC HASH_DEFINE_OBJ HASH_ELIF HASH_ELSE HASH_ENDIF HASH_IF HASH_IFDEF HASH_IFNDEF HASH_UNDEF HASH_VERSION IDENTIFIER IF_EXPANDED INTEGER INTEGER_STRING NEWLINE OTHER PLACEHOLDER SPACE -%token PASTE -%type expression INTEGER operator SPACE integer_constant -%type IDENTIFIER INTEGER_STRING OTHER -%type identifier_list -%type preprocessing_token conditional_token -%type pp_tokens replacement_list text_line conditional_tokens -%left OR -%left AND -%left '|' -%left '^' -%left '&' -%left EQUAL NOT_EQUAL -%left '<' '>' LESS_OR_EQUAL GREATER_OR_EQUAL -%left LEFT_SHIFT RIGHT_SHIFT -%left '+' '-' -%left '*' '/' '%' -%right UNARY - -%% - -input: - /* empty */ -| input line -; - -line: - control_line { - ralloc_strcat (&parser->output, "\n"); - } -| text_line { - _glcpp_parser_print_expanded_token_list (parser, $1); - ralloc_strcat (&parser->output, "\n"); - ralloc_free ($1); - } -| expanded_line -| HASH non_directive -; - -expanded_line: - IF_EXPANDED expression NEWLINE { - _glcpp_parser_skip_stack_push_if (parser, & @1, $2); - } -| ELIF_EXPANDED expression NEWLINE { - _glcpp_parser_skip_stack_change_if (parser, & @1, "elif", $2); - } -; - -control_line: - HASH_DEFINE_OBJ IDENTIFIER replacement_list NEWLINE { - _define_object_macro (parser, & @2, $2, $3); - } -| HASH_DEFINE_FUNC IDENTIFIER '(' ')' replacement_list NEWLINE { - _define_function_macro (parser, & @2, $2, NULL, $5); - } -| HASH_DEFINE_FUNC IDENTIFIER '(' identifier_list ')' replacement_list NEWLINE { - _define_function_macro (parser, & @2, $2, $4, $6); - } -| HASH_UNDEF IDENTIFIER NEWLINE { - macro_t *macro = hash_table_find (parser->defines, $2); - if (macro) { - hash_table_remove (parser->defines, $2); - ralloc_free (macro); - } - ralloc_free ($2); - } -| HASH_IF conditional_tokens NEWLINE { - /* Be careful to only evaluate the 'if' expression if - * we are not skipping. When we are skipping, we - * simply push a new 0-valued 'if' onto the skip - * stack. - * - * This avoids generating diagnostics for invalid - * expressions that are being skipped. */ - if (parser->skip_stack == NULL || - parser->skip_stack->type == SKIP_NO_SKIP) - { - _glcpp_parser_expand_if (parser, IF_EXPANDED, $2); - } - else - { - _glcpp_parser_skip_stack_push_if (parser, & @1, 0); - parser->skip_stack->type = SKIP_TO_ENDIF; - } - } -| HASH_IF NEWLINE { - /* #if without an expression is only an error if we - * are not skipping */ - if (parser->skip_stack == NULL || - parser->skip_stack->type == SKIP_NO_SKIP) - { - glcpp_error(& @1, parser, "#if with no expression"); - } - _glcpp_parser_skip_stack_push_if (parser, & @1, 0); - } -| HASH_IFDEF IDENTIFIER junk NEWLINE { - macro_t *macro = hash_table_find (parser->defines, $2); - ralloc_free ($2); - _glcpp_parser_skip_stack_push_if (parser, & @1, macro != NULL); - } -| HASH_IFNDEF IDENTIFIER junk NEWLINE { - macro_t *macro = hash_table_find (parser->defines, $2); - ralloc_free ($2); - _glcpp_parser_skip_stack_push_if (parser, & @1, macro == NULL); - } -| HASH_ELIF conditional_tokens NEWLINE { - /* Be careful to only evaluate the 'elif' expression - * if we are not skipping. When we are skipping, we - * simply change to a 0-valued 'elif' on the skip - * stack. - * - * This avoids generating diagnostics for invalid - * expressions that are being skipped. */ - if (parser->skip_stack && - parser->skip_stack->type == SKIP_TO_ELSE) - { - _glcpp_parser_expand_if (parser, ELIF_EXPANDED, $2); - } - else - { - _glcpp_parser_skip_stack_change_if (parser, & @1, - "elif", 0); - } - } -| HASH_ELIF NEWLINE { - /* #elif without an expression is an error unless we - * are skipping. */ - if (parser->skip_stack && - parser->skip_stack->type == SKIP_TO_ELSE) - { - glcpp_error(& @1, parser, "#elif with no expression"); - } - else - { - _glcpp_parser_skip_stack_change_if (parser, & @1, - "elif", 0); - glcpp_warning(& @1, parser, "ignoring illegal #elif without expression"); - } - } -| HASH_ELSE NEWLINE { - _glcpp_parser_skip_stack_change_if (parser, & @1, "else", 1); - } -| HASH_ENDIF NEWLINE { - _glcpp_parser_skip_stack_pop (parser, & @1); - } -| HASH_VERSION integer_constant NEWLINE { - macro_t *macro = hash_table_find (parser->defines, "__VERSION__"); - if (macro) { - hash_table_remove (parser->defines, "__VERSION__"); - ralloc_free (macro); - } - add_builtin_define (parser, "__VERSION__", $2); - - if ($2 == 100) - add_builtin_define (parser, "GL_ES", 1); - - /* Currently, all ES2 implementations support highp in the - * fragment shader, so we always define this macro in ES2. - * If we ever get a driver that doesn't support highp, we'll - * need to add a flag to the gl_context and check that here. - */ - if ($2 >= 130 || $2 == 100) - add_builtin_define (parser, "GL_FRAGMENT_PRECISION_HIGH", 1); - - ralloc_asprintf_append (&parser->output, "#version %" PRIiMAX, $2); - } -| HASH NEWLINE -; - -integer_constant: - INTEGER_STRING { - if (strlen ($1) >= 3 && strncmp ($1, "0x", 2) == 0) { - $$ = strtoll ($1 + 2, NULL, 16); - } else if ($1[0] == '0') { - $$ = strtoll ($1, NULL, 8); - } else { - $$ = strtoll ($1, NULL, 10); - } - } -| INTEGER { - $$ = $1; - } - -expression: - integer_constant -| expression OR expression { - $$ = $1 || $3; - } -| expression AND expression { - $$ = $1 && $3; - } -| expression '|' expression { - $$ = $1 | $3; - } -| expression '^' expression { - $$ = $1 ^ $3; - } -| expression '&' expression { - $$ = $1 & $3; - } -| expression NOT_EQUAL expression { - $$ = $1 != $3; - } -| expression EQUAL expression { - $$ = $1 == $3; - } -| expression GREATER_OR_EQUAL expression { - $$ = $1 >= $3; - } -| expression LESS_OR_EQUAL expression { - $$ = $1 <= $3; - } -| expression '>' expression { - $$ = $1 > $3; - } -| expression '<' expression { - $$ = $1 < $3; - } -| expression RIGHT_SHIFT expression { - $$ = $1 >> $3; - } -| expression LEFT_SHIFT expression { - $$ = $1 << $3; - } -| expression '-' expression { - $$ = $1 - $3; - } -| expression '+' expression { - $$ = $1 + $3; - } -| expression '%' expression { - if ($3 == 0) { - yyerror (& @1, parser, - "zero modulus in preprocessor directive"); - } else { - $$ = $1 % $3; - } - } -| expression '/' expression { - if ($3 == 0) { - yyerror (& @1, parser, - "division by 0 in preprocessor directive"); - } else { - $$ = $1 / $3; - } - } -| expression '*' expression { - $$ = $1 * $3; - } -| '!' expression %prec UNARY { - $$ = ! $2; - } -| '~' expression %prec UNARY { - $$ = ~ $2; - } -| '-' expression %prec UNARY { - $$ = - $2; - } -| '+' expression %prec UNARY { - $$ = + $2; - } -| '(' expression ')' { - $$ = $2; - } -; - -identifier_list: - IDENTIFIER { - $$ = _string_list_create (parser); - _string_list_append_item ($$, $1); - ralloc_steal ($$, $1); - } -| identifier_list ',' IDENTIFIER { - $$ = $1; - _string_list_append_item ($$, $3); - ralloc_steal ($$, $3); - } -; - -text_line: - NEWLINE { $$ = NULL; } -| pp_tokens NEWLINE -; - -non_directive: - pp_tokens NEWLINE { - yyerror (& @1, parser, "Invalid tokens after #"); - } -; - -replacement_list: - /* empty */ { $$ = NULL; } -| pp_tokens -; - -junk: - /* empty */ -| pp_tokens { - glcpp_warning(&@1, parser, "extra tokens at end of directive"); - } -; - -conditional_token: - /* Handle "defined" operator */ - DEFINED IDENTIFIER { - int v = hash_table_find (parser->defines, $2) ? 1 : 0; - $$ = _token_create_ival (parser, INTEGER, v); - } -| DEFINED '(' IDENTIFIER ')' { - int v = hash_table_find (parser->defines, $3) ? 1 : 0; - $$ = _token_create_ival (parser, INTEGER, v); - } -| preprocessing_token -; - -conditional_tokens: - /* Exactly the same as pp_tokens, but using conditional_token */ - conditional_token { - $$ = _token_list_create (parser); - _token_list_append ($$, $1); - } -| conditional_tokens conditional_token { - $$ = $1; - _token_list_append ($$, $2); - } -; - -pp_tokens: - preprocessing_token { - parser->space_tokens = 1; - $$ = _token_list_create (parser); - _token_list_append ($$, $1); - } -| pp_tokens preprocessing_token { - $$ = $1; - _token_list_append ($$, $2); - } -; - -preprocessing_token: - IDENTIFIER { - $$ = _token_create_str (parser, IDENTIFIER, $1); - $$->location = yylloc; - } -| INTEGER_STRING { - $$ = _token_create_str (parser, INTEGER_STRING, $1); - $$->location = yylloc; - } -| operator { - $$ = _token_create_ival (parser, $1, $1); - $$->location = yylloc; - } -| OTHER { - $$ = _token_create_str (parser, OTHER, $1); - $$->location = yylloc; - } -| SPACE { - $$ = _token_create_ival (parser, SPACE, SPACE); - $$->location = yylloc; - } -; - -operator: - '[' { $$ = '['; } -| ']' { $$ = ']'; } -| '(' { $$ = '('; } -| ')' { $$ = ')'; } -| '{' { $$ = '{'; } -| '}' { $$ = '}'; } -| '.' { $$ = '.'; } -| '&' { $$ = '&'; } -| '*' { $$ = '*'; } -| '+' { $$ = '+'; } -| '-' { $$ = '-'; } -| '~' { $$ = '~'; } -| '!' { $$ = '!'; } -| '/' { $$ = '/'; } -| '%' { $$ = '%'; } -| LEFT_SHIFT { $$ = LEFT_SHIFT; } -| RIGHT_SHIFT { $$ = RIGHT_SHIFT; } -| '<' { $$ = '<'; } -| '>' { $$ = '>'; } -| LESS_OR_EQUAL { $$ = LESS_OR_EQUAL; } -| GREATER_OR_EQUAL { $$ = GREATER_OR_EQUAL; } -| EQUAL { $$ = EQUAL; } -| NOT_EQUAL { $$ = NOT_EQUAL; } -| '^' { $$ = '^'; } -| '|' { $$ = '|'; } -| AND { $$ = AND; } -| OR { $$ = OR; } -| ';' { $$ = ';'; } -| ',' { $$ = ','; } -| '=' { $$ = '='; } -| PASTE { $$ = PASTE; } -; - -%% - -string_list_t * -_string_list_create (void *ctx) -{ - string_list_t *list; - - list = ralloc (ctx, string_list_t); - list->head = NULL; - list->tail = NULL; - - return list; -} - -void -_string_list_append_item (string_list_t *list, const char *str) -{ - string_node_t *node; - - node = ralloc (list, string_node_t); - node->str = ralloc_strdup (node, str); - - node->next = NULL; - - if (list->head == NULL) { - list->head = node; - } else { - list->tail->next = node; - } - - list->tail = node; -} - -int -_string_list_contains (string_list_t *list, const char *member, int *index) -{ - string_node_t *node; - int i; - - if (list == NULL) - return 0; - - for (i = 0, node = list->head; node; i++, node = node->next) { - if (strcmp (node->str, member) == 0) { - if (index) - *index = i; - return 1; - } - } - - return 0; -} - -int -_string_list_length (string_list_t *list) -{ - int length = 0; - string_node_t *node; - - if (list == NULL) - return 0; - - for (node = list->head; node; node = node->next) - length++; - - return length; -} - -int -_string_list_equal (string_list_t *a, string_list_t *b) -{ - string_node_t *node_a, *node_b; - - if (a == NULL && b == NULL) - return 1; - - if (a == NULL || b == NULL) - return 0; - - for (node_a = a->head, node_b = b->head; - node_a && node_b; - node_a = node_a->next, node_b = node_b->next) - { - if (strcmp (node_a->str, node_b->str)) - return 0; - } - - /* Catch the case of lists being different lengths, (which - * would cause the loop above to terminate after the shorter - * list). */ - return node_a == node_b; -} - -argument_list_t * -_argument_list_create (void *ctx) -{ - argument_list_t *list; - - list = ralloc (ctx, argument_list_t); - list->head = NULL; - list->tail = NULL; - - return list; -} - -void -_argument_list_append (argument_list_t *list, token_list_t *argument) -{ - argument_node_t *node; - - node = ralloc (list, argument_node_t); - node->argument = argument; - - node->next = NULL; - - if (list->head == NULL) { - list->head = node; - } else { - list->tail->next = node; - } - - list->tail = node; -} - -int -_argument_list_length (argument_list_t *list) -{ - int length = 0; - argument_node_t *node; - - if (list == NULL) - return 0; - - for (node = list->head; node; node = node->next) - length++; - - return length; -} - -token_list_t * -_argument_list_member_at (argument_list_t *list, int index) -{ - argument_node_t *node; - int i; - - if (list == NULL) - return NULL; - - node = list->head; - for (i = 0; i < index; i++) { - node = node->next; - if (node == NULL) - break; - } - - if (node) - return node->argument; - - return NULL; -} - -/* Note: This function ralloc_steal()s the str pointer. */ -token_t * -_token_create_str (void *ctx, int type, char *str) -{ - token_t *token; - - token = ralloc (ctx, token_t); - token->type = type; - token->value.str = str; - - ralloc_steal (token, str); - - return token; -} - -token_t * -_token_create_ival (void *ctx, int type, int ival) -{ - token_t *token; - - token = ralloc (ctx, token_t); - token->type = type; - token->value.ival = ival; - - return token; -} - -token_list_t * -_token_list_create (void *ctx) -{ - token_list_t *list; - - list = ralloc (ctx, token_list_t); - list->head = NULL; - list->tail = NULL; - list->non_space_tail = NULL; - - return list; -} - -void -_token_list_append (token_list_t *list, token_t *token) -{ - token_node_t *node; - - node = ralloc (list, token_node_t); - node->token = token; - node->next = NULL; - - if (list->head == NULL) { - list->head = node; - } else { - list->tail->next = node; - } - - list->tail = node; - if (token->type != SPACE) - list->non_space_tail = node; -} - -void -_token_list_append_list (token_list_t *list, token_list_t *tail) -{ - if (tail == NULL || tail->head == NULL) - return; - - if (list->head == NULL) { - list->head = tail->head; - } else { - list->tail->next = tail->head; - } - - list->tail = tail->tail; - list->non_space_tail = tail->non_space_tail; -} - -static token_list_t * -_token_list_copy (void *ctx, token_list_t *other) -{ - token_list_t *copy; - token_node_t *node; - - if (other == NULL) - return NULL; - - copy = _token_list_create (ctx); - for (node = other->head; node; node = node->next) { - token_t *new_token = ralloc (copy, token_t); - *new_token = *node->token; - _token_list_append (copy, new_token); - } - - return copy; -} - -static void -_token_list_trim_trailing_space (token_list_t *list) -{ - token_node_t *tail, *next; - - if (list->non_space_tail) { - tail = list->non_space_tail->next; - list->non_space_tail->next = NULL; - list->tail = list->non_space_tail; - - while (tail) { - next = tail->next; - ralloc_free (tail); - tail = next; - } - } -} - -static int -_token_list_is_empty_ignoring_space (token_list_t *l) -{ - token_node_t *n; - - if (l == NULL) - return 1; - - n = l->head; - while (n != NULL && n->token->type == SPACE) - n = n->next; - - return n == NULL; -} - -int -_token_list_equal_ignoring_space (token_list_t *a, token_list_t *b) -{ - token_node_t *node_a, *node_b; - - if (a == NULL || b == NULL) { - int a_empty = _token_list_is_empty_ignoring_space(a); - int b_empty = _token_list_is_empty_ignoring_space(b); - return a_empty == b_empty; - } - - node_a = a->head; - node_b = b->head; - - while (1) - { - if (node_a == NULL && node_b == NULL) - break; - - if (node_a == NULL || node_b == NULL) - return 0; - - if (node_a->token->type == SPACE) { - node_a = node_a->next; - continue; - } - - if (node_b->token->type == SPACE) { - node_b = node_b->next; - continue; - } - - if (node_a->token->type != node_b->token->type) - return 0; - - switch (node_a->token->type) { - case INTEGER: - if (node_a->token->value.ival != - node_b->token->value.ival) - { - return 0; - } - break; - case IDENTIFIER: - case INTEGER_STRING: - case OTHER: - if (strcmp (node_a->token->value.str, - node_b->token->value.str)) - { - return 0; - } - break; - } - - node_a = node_a->next; - node_b = node_b->next; - } - - return 1; -} - -static void -_token_print (char **out, token_t *token) -{ - if (token->type < 256) { - ralloc_asprintf_append (out, "%c", token->type); - return; - } - - switch (token->type) { - case INTEGER: - ralloc_asprintf_append (out, "%" PRIiMAX, token->value.ival); - break; - case IDENTIFIER: - case INTEGER_STRING: - case OTHER: - ralloc_strcat (out, token->value.str); - break; - case SPACE: - ralloc_strcat (out, " "); - break; - case LEFT_SHIFT: - ralloc_strcat (out, "<<"); - break; - case RIGHT_SHIFT: - ralloc_strcat (out, ">>"); - break; - case LESS_OR_EQUAL: - ralloc_strcat (out, "<="); - break; - case GREATER_OR_EQUAL: - ralloc_strcat (out, ">="); - break; - case EQUAL: - ralloc_strcat (out, "=="); - break; - case NOT_EQUAL: - ralloc_strcat (out, "!="); - break; - case AND: - ralloc_strcat (out, "&&"); - break; - case OR: - ralloc_strcat (out, "||"); - break; - case PASTE: - ralloc_strcat (out, "##"); - break; - case COMMA_FINAL: - ralloc_strcat (out, ","); - break; - case PLACEHOLDER: - /* Nothing to print. */ - break; - default: - assert(!"Error: Don't know how to print token."); - break; - } -} - -/* Return a new token (ralloc()ed off of 'token') formed by pasting - * 'token' and 'other'. Note that this function may return 'token' or - * 'other' directly rather than allocating anything new. - * - * Caution: Only very cursory error-checking is performed to see if - * the final result is a valid single token. */ -static token_t * -_token_paste (glcpp_parser_t *parser, token_t *token, token_t *other) -{ - token_t *combined = NULL; - - /* Pasting a placeholder onto anything makes no change. */ - if (other->type == PLACEHOLDER) - return token; - - /* When 'token' is a placeholder, just return 'other'. */ - if (token->type == PLACEHOLDER) - return other; - - /* A very few single-character punctuators can be combined - * with another to form a multi-character punctuator. */ - switch (token->type) { - case '<': - if (other->type == '<') - combined = _token_create_ival (token, LEFT_SHIFT, LEFT_SHIFT); - else if (other->type == '=') - combined = _token_create_ival (token, LESS_OR_EQUAL, LESS_OR_EQUAL); - break; - case '>': - if (other->type == '>') - combined = _token_create_ival (token, RIGHT_SHIFT, RIGHT_SHIFT); - else if (other->type == '=') - combined = _token_create_ival (token, GREATER_OR_EQUAL, GREATER_OR_EQUAL); - break; - case '=': - if (other->type == '=') - combined = _token_create_ival (token, EQUAL, EQUAL); - break; - case '!': - if (other->type == '=') - combined = _token_create_ival (token, NOT_EQUAL, NOT_EQUAL); - break; - case '&': - if (other->type == '&') - combined = _token_create_ival (token, AND, AND); - break; - case '|': - if (other->type == '|') - combined = _token_create_ival (token, OR, OR); - break; - } - - if (combined != NULL) { - /* Inherit the location from the first token */ - combined->location = token->location; - return combined; - } - - /* Two string-valued tokens can usually just be mashed - * together. - * - * XXX: This isn't actually legitimate. Several things here - * should result in a diagnostic since the result cannot be a - * valid, single pre-processing token. For example, pasting - * "123" and "abc" is not legal, but we don't catch that - * here. */ - if ((token->type == IDENTIFIER || token->type == OTHER || token->type == INTEGER_STRING) && - (other->type == IDENTIFIER || other->type == OTHER || other->type == INTEGER_STRING)) - { - char *str; - - str = ralloc_asprintf (token, "%s%s", token->value.str, - other->value.str); - combined = _token_create_str (token, token->type, str); - combined->location = token->location; - return combined; - } - - glcpp_error (&token->location, parser, ""); - ralloc_strcat (&parser->info_log, "Pasting \""); - _token_print (&parser->info_log, token); - ralloc_strcat (&parser->info_log, "\" and \""); - _token_print (&parser->info_log, other); - ralloc_strcat (&parser->info_log, "\" does not give a valid preprocessing token.\n"); - - return token; -} - -static void -_token_list_print (glcpp_parser_t *parser, token_list_t *list) -{ - token_node_t *node; - - if (list == NULL) - return; - - for (node = list->head; node; node = node->next) - _token_print (&parser->output, node->token); -} - -void -yyerror (YYLTYPE *locp, glcpp_parser_t *parser, const char *error) -{ - glcpp_error(locp, parser, "%s", error); -} - -static void add_builtin_define(glcpp_parser_t *parser, - const char *name, int value) -{ - token_t *tok; - token_list_t *list; - - tok = _token_create_ival (parser, INTEGER, value); - - list = _token_list_create(parser); - _token_list_append(list, tok); - _define_object_macro(parser, NULL, name, list); -} - -glcpp_parser_t * -glcpp_parser_create (const struct gl_extensions *extensions, int api) -{ - glcpp_parser_t *parser; - int language_version; - - parser = ralloc (NULL, glcpp_parser_t); - - glcpp_lex_init_extra (parser, &parser->scanner); - parser->defines = hash_table_ctor (32, hash_table_string_hash, - hash_table_string_compare); - parser->active = NULL; - parser->lexing_if = 0; - parser->space_tokens = 1; - parser->newline_as_space = 0; - parser->in_control_line = 0; - parser->paren_count = 0; - - parser->skip_stack = NULL; - - parser->lex_from_list = NULL; - parser->lex_from_node = NULL; - - parser->output = ralloc_strdup(parser, ""); - parser->info_log = ralloc_strdup(parser, ""); - parser->error = 0; - - /* Add pre-defined macros. */ - add_builtin_define(parser, "GL_ARB_draw_buffers", 1); - add_builtin_define(parser, "GL_ARB_texture_rectangle", 1); - - if (api == API_OPENGLES2) - add_builtin_define(parser, "GL_ES", 1); - - if (extensions != NULL) { - if (extensions->EXT_texture_array) { - add_builtin_define(parser, "GL_EXT_texture_array", 1); - } - - if (extensions->ARB_fragment_coord_conventions) - add_builtin_define(parser, "GL_ARB_fragment_coord_conventions", - 1); - - if (extensions->ARB_explicit_attrib_location) - add_builtin_define(parser, "GL_ARB_explicit_attrib_location", 1); - - if (extensions->ARB_shader_texture_lod) - add_builtin_define(parser, "GL_ARB_shader_texture_lod", 1); - - if (extensions->ARB_draw_instanced) - add_builtin_define(parser, "GL_ARB_draw_instanced", 1); - - if (extensions->ARB_conservative_depth) { - add_builtin_define(parser, "GL_AMD_conservative_depth", 1); - add_builtin_define(parser, "GL_ARB_conservative_depth", 1); - } - - if (extensions->OES_EGL_image_external) - add_builtin_define(parser, "GL_OES_EGL_image_external", 1); - } - - language_version = 110; - add_builtin_define(parser, "__VERSION__", language_version); - - return parser; -} - -int -glcpp_parser_parse (glcpp_parser_t *parser) -{ - return yyparse (parser); -} - -void -glcpp_parser_destroy (glcpp_parser_t *parser) -{ - glcpp_lex_destroy (parser->scanner); - hash_table_dtor (parser->defines); - ralloc_free (parser); -} - -typedef enum function_status -{ - FUNCTION_STATUS_SUCCESS, - FUNCTION_NOT_A_FUNCTION, - FUNCTION_UNBALANCED_PARENTHESES -} function_status_t; - -/* Find a set of function-like macro arguments by looking for a - * balanced set of parentheses. - * - * When called, 'node' should be the opening-parenthesis token, (or - * perhaps preceeding SPACE tokens). Upon successful return *last will - * be the last consumed node, (corresponding to the closing right - * parenthesis). - * - * Return values: - * - * FUNCTION_STATUS_SUCCESS: - * - * Successfully parsed a set of function arguments. - * - * FUNCTION_NOT_A_FUNCTION: - * - * Macro name not followed by a '('. This is not an error, but - * simply that the macro name should be treated as a non-macro. - * - * FUNCTION_UNBALANCED_PARENTHESES - * - * Macro name is not followed by a balanced set of parentheses. - */ -static function_status_t -_arguments_parse (argument_list_t *arguments, - token_node_t *node, - token_node_t **last) -{ - token_list_t *argument; - int paren_count; - - node = node->next; - - /* Ignore whitespace before first parenthesis. */ - while (node && node->token->type == SPACE) - node = node->next; - - if (node == NULL || node->token->type != '(') - return FUNCTION_NOT_A_FUNCTION; - - node = node->next; - - argument = _token_list_create (arguments); - _argument_list_append (arguments, argument); - - for (paren_count = 1; node; node = node->next) { - if (node->token->type == '(') - { - paren_count++; - } - else if (node->token->type == ')') - { - paren_count--; - if (paren_count == 0) - break; - } - - if (node->token->type == ',' && - paren_count == 1) - { - _token_list_trim_trailing_space (argument); - argument = _token_list_create (arguments); - _argument_list_append (arguments, argument); - } - else { - if (argument->head == NULL) { - /* Don't treat initial whitespace as - * part of the arguement. */ - if (node->token->type == SPACE) - continue; - } - _token_list_append (argument, node->token); - } - } - - if (paren_count) - return FUNCTION_UNBALANCED_PARENTHESES; - - *last = node; - - return FUNCTION_STATUS_SUCCESS; -} - -static token_list_t * -_token_list_create_with_one_space (void *ctx) -{ - token_list_t *list; - token_t *space; - - list = _token_list_create (ctx); - space = _token_create_ival (list, SPACE, SPACE); - _token_list_append (list, space); - - return list; -} - -static void -_glcpp_parser_expand_if (glcpp_parser_t *parser, int type, token_list_t *list) -{ - token_list_t *expanded; - token_t *token; - - expanded = _token_list_create (parser); - token = _token_create_ival (parser, type, type); - _token_list_append (expanded, token); - _glcpp_parser_expand_token_list (parser, list); - _token_list_append_list (expanded, list); - glcpp_parser_lex_from (parser, expanded); -} - -static void -_glcpp_parser_apply_pastes (glcpp_parser_t *parser, token_list_t *list) -{ - token_node_t *node; - - node = list->head; - while (node) - { - token_node_t *next_non_space; - - /* Look ahead for a PASTE token, skipping space. */ - next_non_space = node->next; - while (next_non_space && next_non_space->token->type == SPACE) - next_non_space = next_non_space->next; - - if (next_non_space == NULL) - break; - - if (next_non_space->token->type != PASTE) { - node = next_non_space; - continue; - } - - /* Now find the next non-space token after the PASTE. */ - next_non_space = next_non_space->next; - while (next_non_space && next_non_space->token->type == SPACE) - next_non_space = next_non_space->next; - - if (next_non_space == NULL) { - yyerror (&node->token->location, parser, "'##' cannot appear at either end of a macro expansion\n"); - return; - } - - node->token = _token_paste (parser, node->token, next_non_space->token); - node->next = next_non_space->next; - if (next_non_space == list->tail) - list->tail = node; - } - - list->non_space_tail = list->tail; -} - -/* This is a helper function that's essentially part of the - * implementation of _glcpp_parser_expand_node. It shouldn't be called - * except for by that function. - * - * Returns NULL if node is a simple token with no expansion, (that is, - * although 'node' corresponds to an identifier defined as a - * function-like macro, it is not followed with a parenthesized - * argument list). - * - * Compute the complete expansion of node (which is a function-like - * macro) and subsequent nodes which are arguments. - * - * Returns the token list that results from the expansion and sets - * *last to the last node in the list that was consumed by the - * expansion. Specifically, *last will be set as follows: as the - * token of the closing right parenthesis. - */ -static token_list_t * -_glcpp_parser_expand_function (glcpp_parser_t *parser, - token_node_t *node, - token_node_t **last) - -{ - macro_t *macro; - const char *identifier; - argument_list_t *arguments; - function_status_t status; - token_list_t *substituted; - int parameter_index; - - identifier = node->token->value.str; - - macro = hash_table_find (parser->defines, identifier); - - assert (macro->is_function); - - arguments = _argument_list_create (parser); - status = _arguments_parse (arguments, node, last); - - switch (status) { - case FUNCTION_STATUS_SUCCESS: - break; - case FUNCTION_NOT_A_FUNCTION: - return NULL; - case FUNCTION_UNBALANCED_PARENTHESES: - glcpp_error (&node->token->location, parser, "Macro %s call has unbalanced parentheses\n", identifier); - return NULL; - } - - /* Replace a macro defined as empty with a SPACE token. */ - if (macro->replacements == NULL) { - ralloc_free (arguments); - return _token_list_create_with_one_space (parser); - } - - if (! ((_argument_list_length (arguments) == - _string_list_length (macro->parameters)) || - (_string_list_length (macro->parameters) == 0 && - _argument_list_length (arguments) == 1 && - arguments->head->argument->head == NULL))) - { - glcpp_error (&node->token->location, parser, - "Error: macro %s invoked with %d arguments (expected %d)\n", - identifier, - _argument_list_length (arguments), - _string_list_length (macro->parameters)); - return NULL; - } - - /* Perform argument substitution on the replacement list. */ - substituted = _token_list_create (arguments); - - for (node = macro->replacements->head; node; node = node->next) - { - if (node->token->type == IDENTIFIER && - _string_list_contains (macro->parameters, - node->token->value.str, - ¶meter_index)) - { - token_list_t *argument; - argument = _argument_list_member_at (arguments, - parameter_index); - /* Before substituting, we expand the argument - * tokens, or append a placeholder token for - * an empty argument. */ - if (argument->head) { - token_list_t *expanded_argument; - expanded_argument = _token_list_copy (parser, - argument); - _glcpp_parser_expand_token_list (parser, - expanded_argument); - _token_list_append_list (substituted, - expanded_argument); - } else { - token_t *new_token; - - new_token = _token_create_ival (substituted, - PLACEHOLDER, - PLACEHOLDER); - _token_list_append (substituted, new_token); - } - } else { - _token_list_append (substituted, node->token); - } - } - - /* After argument substitution, and before further expansion - * below, implement token pasting. */ - - _token_list_trim_trailing_space (substituted); - - _glcpp_parser_apply_pastes (parser, substituted); - - return substituted; -} - -/* Compute the complete expansion of node, (and subsequent nodes after - * 'node' in the case that 'node' is a function-like macro and - * subsequent nodes are arguments). - * - * Returns NULL if node is a simple token with no expansion. - * - * Otherwise, returns the token list that results from the expansion - * and sets *last to the last node in the list that was consumed by - * the expansion. Specifically, *last will be set as follows: - * - * As 'node' in the case of object-like macro expansion. - * - * As the token of the closing right parenthesis in the case of - * function-like macro expansion. - */ -static token_list_t * -_glcpp_parser_expand_node (glcpp_parser_t *parser, - token_node_t *node, - token_node_t **last) -{ - token_t *token = node->token; - const char *identifier; - macro_t *macro; - - /* We only expand identifiers */ - if (token->type != IDENTIFIER) { - /* We change any COMMA into a COMMA_FINAL to prevent - * it being mistaken for an argument separator - * later. */ - if (token->type == ',') { - token->type = COMMA_FINAL; - token->value.ival = COMMA_FINAL; - } - - return NULL; - } - - /* Look up this identifier in the hash table. */ - identifier = token->value.str; - macro = hash_table_find (parser->defines, identifier); - - /* Not a macro, so no expansion needed. */ - if (macro == NULL) - return NULL; - - /* Finally, don't expand this macro if we're already actively - * expanding it, (to avoid infinite recursion). */ - if (_parser_active_list_contains (parser, identifier)) { - /* We change the token type here from IDENTIFIER to - * OTHER to prevent any future expansion of this - * unexpanded token. */ - char *str; - token_list_t *expansion; - token_t *final; - - str = ralloc_strdup (parser, token->value.str); - final = _token_create_str (parser, OTHER, str); - expansion = _token_list_create (parser); - _token_list_append (expansion, final); - *last = node; - return expansion; - } - - if (! macro->is_function) - { - token_list_t *replacement; - *last = node; - - /* Replace a macro defined as empty with a SPACE token. */ - if (macro->replacements == NULL) - return _token_list_create_with_one_space (parser); - - replacement = _token_list_copy (parser, macro->replacements); - _glcpp_parser_apply_pastes (parser, replacement); - return replacement; - } - - return _glcpp_parser_expand_function (parser, node, last); -} - -/* Push a new identifier onto the parser's active list. - * - * Here, 'marker' is the token node that appears in the list after the - * expansion of 'identifier'. That is, when the list iterator begins - * examining 'marker', then it is time to pop this node from the - * active stack. - */ -static void -_parser_active_list_push (glcpp_parser_t *parser, - const char *identifier, - token_node_t *marker) -{ - active_list_t *node; - - node = ralloc (parser->active, active_list_t); - node->identifier = ralloc_strdup (node, identifier); - node->marker = marker; - node->next = parser->active; - - parser->active = node; -} - -static void -_parser_active_list_pop (glcpp_parser_t *parser) -{ - active_list_t *node = parser->active; - - if (node == NULL) { - parser->active = NULL; - return; - } - - node = parser->active->next; - ralloc_free (parser->active); - - parser->active = node; -} - -static int -_parser_active_list_contains (glcpp_parser_t *parser, const char *identifier) -{ - active_list_t *node; - - if (parser->active == NULL) - return 0; - - for (node = parser->active; node; node = node->next) - if (strcmp (node->identifier, identifier) == 0) - return 1; - - return 0; -} - -/* Walk over the token list replacing nodes with their expansion. - * Whenever nodes are expanded the walking will walk over the new - * nodes, continuing to expand as necessary. The results are placed in - * 'list' itself; - */ -static void -_glcpp_parser_expand_token_list (glcpp_parser_t *parser, - token_list_t *list) -{ - token_node_t *node_prev; - token_node_t *node, *last = NULL; - token_list_t *expansion; - active_list_t *active_initial = parser->active; - - if (list == NULL) - return; - - _token_list_trim_trailing_space (list); - - node_prev = NULL; - node = list->head; - - while (node) { - - while (parser->active && parser->active->marker == node) - _parser_active_list_pop (parser); - - expansion = _glcpp_parser_expand_node (parser, node, &last); - if (expansion) { - token_node_t *n; - - for (n = node; n != last->next; n = n->next) - while (parser->active && - parser->active->marker == n) - { - _parser_active_list_pop (parser); - } - - _parser_active_list_push (parser, - node->token->value.str, - last->next); - - /* Splice expansion into list, supporting a - * simple deletion if the expansion is - * empty. */ - if (expansion->head) { - if (node_prev) - node_prev->next = expansion->head; - else - list->head = expansion->head; - expansion->tail->next = last->next; - if (last == list->tail) - list->tail = expansion->tail; - } else { - if (node_prev) - node_prev->next = last->next; - else - list->head = last->next; - if (last == list->tail) - list->tail = NULL; - } - } else { - node_prev = node; - } - node = node_prev ? node_prev->next : list->head; - } - - /* Remove any lingering effects of this invocation on the - * active list. That is, pop until the list looks like it did - * at the beginning of this function. */ - while (parser->active && parser->active != active_initial) - _parser_active_list_pop (parser); - - list->non_space_tail = list->tail; -} - -void -_glcpp_parser_print_expanded_token_list (glcpp_parser_t *parser, - token_list_t *list) -{ - if (list == NULL) - return; - - _glcpp_parser_expand_token_list (parser, list); - - _token_list_trim_trailing_space (list); - - _token_list_print (parser, list); -} - -static void -_check_for_reserved_macro_name (glcpp_parser_t *parser, YYLTYPE *loc, - const char *identifier) -{ - /* According to the GLSL specification, macro names starting with "__" - * or "GL_" are reserved for future use. So, don't allow them. - */ - if (strstr(identifier, "__")) { - glcpp_error (loc, parser, "Macro names containing \"__\" are reserved.\n"); - } - if (strncmp(identifier, "GL_", 3) == 0) { - glcpp_error (loc, parser, "Macro names starting with \"GL_\" are reserved.\n"); - } -} - -static int -_macro_equal (macro_t *a, macro_t *b) -{ - if (a->is_function != b->is_function) - return 0; - - if (a->is_function) { - if (! _string_list_equal (a->parameters, b->parameters)) - return 0; - } - - return _token_list_equal_ignoring_space (a->replacements, - b->replacements); -} - -void -_define_object_macro (glcpp_parser_t *parser, - YYLTYPE *loc, - const char *identifier, - token_list_t *replacements) -{ - macro_t *macro, *previous; - - if (loc != NULL) - _check_for_reserved_macro_name(parser, loc, identifier); - - macro = ralloc (parser, macro_t); - - macro->is_function = 0; - macro->parameters = NULL; - macro->identifier = ralloc_strdup (macro, identifier); - macro->replacements = replacements; - ralloc_steal (macro, replacements); - - previous = hash_table_find (parser->defines, identifier); - if (previous) { - if (_macro_equal (macro, previous)) { - ralloc_free (macro); - return; - } - glcpp_error (loc, parser, "Redefinition of macro %s\n", - identifier); - } - - hash_table_insert (parser->defines, macro, identifier); -} - -void -_define_function_macro (glcpp_parser_t *parser, - YYLTYPE *loc, - const char *identifier, - string_list_t *parameters, - token_list_t *replacements) -{ - macro_t *macro, *previous; - - _check_for_reserved_macro_name(parser, loc, identifier); - - macro = ralloc (parser, macro_t); - ralloc_steal (macro, parameters); - ralloc_steal (macro, replacements); - - macro->is_function = 1; - macro->parameters = parameters; - macro->identifier = ralloc_strdup (macro, identifier); - macro->replacements = replacements; - previous = hash_table_find (parser->defines, identifier); - if (previous) { - if (_macro_equal (macro, previous)) { - ralloc_free (macro); - return; - } - glcpp_error (loc, parser, "Redefinition of macro %s\n", - identifier); - } - - hash_table_insert (parser->defines, macro, identifier); -} - -static int -glcpp_parser_lex (YYSTYPE *yylval, YYLTYPE *yylloc, glcpp_parser_t *parser) -{ - token_node_t *node; - int ret; - - if (parser->lex_from_list == NULL) { - ret = glcpp_lex (yylval, yylloc, parser->scanner); - - /* XXX: This ugly block of code exists for the sole - * purpose of converting a NEWLINE token into a SPACE - * token, but only in the case where we have seen a - * function-like macro name, but have not yet seen its - * closing parenthesis. - * - * There's perhaps a more compact way to do this with - * mid-rule actions in the grammar. - * - * I'm definitely not pleased with the complexity of - * this code here. - */ - if (parser->newline_as_space) - { - if (ret == '(') { - parser->paren_count++; - } else if (ret == ')') { - parser->paren_count--; - if (parser->paren_count == 0) - parser->newline_as_space = 0; - } else if (ret == NEWLINE) { - ret = SPACE; - } else if (ret != SPACE) { - if (parser->paren_count == 0) - parser->newline_as_space = 0; - } - } - else if (parser->in_control_line) - { - if (ret == NEWLINE) - parser->in_control_line = 0; - } - else if (ret == HASH_DEFINE_OBJ || ret == HASH_DEFINE_FUNC || - ret == HASH_UNDEF || ret == HASH_IF || - ret == HASH_IFDEF || ret == HASH_IFNDEF || - ret == HASH_ELIF || ret == HASH_ELSE || - ret == HASH_ENDIF || ret == HASH) - { - parser->in_control_line = 1; - } - else if (ret == IDENTIFIER) - { - macro_t *macro; - macro = hash_table_find (parser->defines, - yylval->str); - if (macro && macro->is_function) { - parser->newline_as_space = 1; - parser->paren_count = 0; - } - } - - return ret; - } - - node = parser->lex_from_node; - - if (node == NULL) { - ralloc_free (parser->lex_from_list); - parser->lex_from_list = NULL; - return NEWLINE; - } - - *yylval = node->token->value; - ret = node->token->type; - - parser->lex_from_node = node->next; - - return ret; -} - -static void -glcpp_parser_lex_from (glcpp_parser_t *parser, token_list_t *list) -{ - token_node_t *node; - - assert (parser->lex_from_list == NULL); - - /* Copy list, eliminating any space tokens. */ - parser->lex_from_list = _token_list_create (parser); - - for (node = list->head; node; node = node->next) { - if (node->token->type == SPACE) - continue; - _token_list_append (parser->lex_from_list, node->token); - } - - ralloc_free (list); - - parser->lex_from_node = parser->lex_from_list->head; - - /* It's possible the list consisted of nothing but whitespace. */ - if (parser->lex_from_node == NULL) { - ralloc_free (parser->lex_from_list); - parser->lex_from_list = NULL; - } -} - -static void -_glcpp_parser_skip_stack_push_if (glcpp_parser_t *parser, YYLTYPE *loc, - int condition) -{ - skip_type_t current = SKIP_NO_SKIP; - skip_node_t *node; - - if (parser->skip_stack) - current = parser->skip_stack->type; - - node = ralloc (parser, skip_node_t); - node->loc = *loc; - - if (current == SKIP_NO_SKIP) { - if (condition) - node->type = SKIP_NO_SKIP; - else - node->type = SKIP_TO_ELSE; - } else { - node->type = SKIP_TO_ENDIF; - } - - node->next = parser->skip_stack; - parser->skip_stack = node; -} - -static void -_glcpp_parser_skip_stack_change_if (glcpp_parser_t *parser, YYLTYPE *loc, - const char *type, int condition) -{ - if (parser->skip_stack == NULL) { - glcpp_error (loc, parser, "%s without #if\n", type); - return; - } - - if (parser->skip_stack->type == SKIP_TO_ELSE) { - if (condition) - parser->skip_stack->type = SKIP_NO_SKIP; - } else { - parser->skip_stack->type = SKIP_TO_ENDIF; - } -} - -static void -_glcpp_parser_skip_stack_pop (glcpp_parser_t *parser, YYLTYPE *loc) -{ - skip_node_t *node; - - if (parser->skip_stack == NULL) { - glcpp_error (loc, parser, "#endif without #if\n"); - return; - } - - node = parser->skip_stack; - parser->skip_stack = node->next; - ralloc_free (node); -} diff --git a/dll/opengl/mesa/src/glsl/glcpp/glcpp.c b/dll/opengl/mesa/src/glsl/glcpp/glcpp.c deleted file mode 100644 index e461a650265..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/glcpp.c +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include -#include -#include -#include "glcpp.h" -#include "main/mtypes.h" -#include "main/shaderobj.h" - -extern int yydebug; - -void -_mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr, - struct gl_shader *sh) -{ - (void) ctx; - *ptr = sh; -} - -/* Read from fp until EOF and return a string of everything read. - */ -static char * -load_text_fp (void *ctx, FILE *fp) -{ -#define CHUNK 4096 - char *text = NULL; - size_t text_size = 0; - size_t total_read = 0; - size_t bytes; - - while (1) { - if (total_read + CHUNK + 1 > text_size) { - text_size = text_size ? text_size * 2 : CHUNK + 1; - text = reralloc_size (ctx, text, text_size); - if (text == NULL) { - fprintf (stderr, "Out of memory\n"); - return NULL; - } - } - bytes = fread (text + total_read, 1, CHUNK, fp); - total_read += bytes; - - if (bytes < CHUNK) { - break; - } - } - - text[total_read] = '\0'; - - return text; -} - -static char * -load_text_file(void *ctx, const char *filename) -{ - char *text; - FILE *fp; - - if (filename == NULL || strcmp (filename, "-") == 0) - return load_text_fp (ctx, stdin); - - fp = fopen (filename, "r"); - if (fp == NULL) { - fprintf (stderr, "Failed to open file %s: %s\n", - filename, strerror (errno)); - return NULL; - } - - text = load_text_fp (ctx, fp); - - fclose(fp); - - return text; -} - -int -main (int argc, char *argv[]) -{ - char *filename = NULL; - void *ctx = ralloc(NULL, void*); - char *info_log = ralloc_strdup(ctx, ""); - const char *shader; - int ret; - - if (argc) { - filename = argv[1]; - } - - shader = load_text_file (ctx, filename); - if (shader == NULL) - return 1; - - ret = preprocess(ctx, &shader, &info_log, NULL, API_OPENGL); - - printf("%s", shader); - fprintf(stderr, "%s", info_log); - - ralloc_free(ctx); - - return ret; -} diff --git a/dll/opengl/mesa/src/glsl/glcpp/glcpp.h b/dll/opengl/mesa/src/glsl/glcpp/glcpp.h deleted file mode 100644 index dc816e90ee7..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/glcpp.h +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#ifndef GLCPP_H -#define GLCPP_H - -#include - -#include "../ralloc.h" - -#include "program/hash_table.h" - -#define yyscan_t void* - -/* Some data types used for parser values. */ - -typedef struct string_node { - const char *str; - struct string_node *next; -} string_node_t; - -typedef struct string_list { - string_node_t *head; - string_node_t *tail; -} string_list_t; - -typedef struct token token_t; -typedef struct token_list token_list_t; - -typedef union YYSTYPE -{ - intmax_t ival; - char *str; - string_list_t *string_list; - token_t *token; - token_list_t *token_list; -} YYSTYPE; - -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 - -typedef struct YYLTYPE { - int first_line; - int first_column; - int last_line; - int last_column; - unsigned source; -} YYLTYPE; -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 - -# define YYLLOC_DEFAULT(Current, Rhs, N) \ -do { \ - if (N) \ - { \ - (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC(Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC(Rhs, 0).last_column; \ - } \ - (Current).source = 0; \ -} while (0) - -struct token { - int type; - YYSTYPE value; - YYLTYPE location; -}; - -typedef struct token_node { - token_t *token; - struct token_node *next; -} token_node_t; - -struct token_list { - token_node_t *head; - token_node_t *tail; - token_node_t *non_space_tail; -}; - -typedef struct argument_node { - token_list_t *argument; - struct argument_node *next; -} argument_node_t; - -typedef struct argument_list { - argument_node_t *head; - argument_node_t *tail; -} argument_list_t; - -typedef struct glcpp_parser glcpp_parser_t; - -typedef enum { - TOKEN_CLASS_IDENTIFIER, - TOKEN_CLASS_IDENTIFIER_FINALIZED, - TOKEN_CLASS_FUNC_MACRO, - TOKEN_CLASS_OBJ_MACRO -} token_class_t; - -token_class_t -glcpp_parser_classify_token (glcpp_parser_t *parser, - const char *identifier, - int *parameter_index); - -typedef struct { - int is_function; - string_list_t *parameters; - const char *identifier; - token_list_t *replacements; -} macro_t; - -typedef struct expansion_node { - macro_t *macro; - token_node_t *replacements; - struct expansion_node *next; -} expansion_node_t; - -typedef enum skip_type { - SKIP_NO_SKIP, - SKIP_TO_ELSE, - SKIP_TO_ENDIF -} skip_type_t; - -typedef struct skip_node { - skip_type_t type; - YYLTYPE loc; /* location of the initial #if/#elif/... */ - struct skip_node *next; -} skip_node_t; - -typedef struct active_list { - const char *identifier; - token_node_t *marker; - struct active_list *next; -} active_list_t; - -struct glcpp_parser { - yyscan_t scanner; - struct hash_table *defines; - active_list_t *active; - int lexing_if; - int space_tokens; - int newline_as_space; - int in_control_line; - int paren_count; - skip_node_t *skip_stack; - token_list_t *lex_from_list; - token_node_t *lex_from_node; - char *output; - char *info_log; - int error; -}; - -struct gl_extensions; - -glcpp_parser_t * -glcpp_parser_create (const struct gl_extensions *extensions, int api); - -int -glcpp_parser_parse (glcpp_parser_t *parser); - -void -glcpp_parser_destroy (glcpp_parser_t *parser); - -int -preprocess(void *ralloc_ctx, const char **shader, char **info_log, - const struct gl_extensions *extensions, int api); - -/* Functions for writing to the info log */ - -void -glcpp_error (YYLTYPE *locp, glcpp_parser_t *parser, const char *fmt, ...); - -void -glcpp_warning (YYLTYPE *locp, glcpp_parser_t *parser, const char *fmt, ...); - -/* Generated by glcpp-lex.l to glcpp-lex.c */ - -int -glcpp_lex_init_extra (glcpp_parser_t *parser, yyscan_t* scanner); - -void -glcpp_lex_set_source_string(glcpp_parser_t *parser, const char *shader); - -int -glcpp_lex (YYSTYPE *lvalp, YYLTYPE *llocp, yyscan_t scanner); - -int -glcpp_lex_destroy (yyscan_t scanner); - -/* Generated by glcpp-parse.y to glcpp-parse.c */ - -int -yyparse (glcpp_parser_t *parser); - -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/pp.c b/dll/opengl/mesa/src/glsl/glcpp/pp.c deleted file mode 100644 index 3640896a2c2..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/pp.c +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include -#include -#include -#include "glcpp.h" -#include "main/core.h" /* for isblank() on MSVC */ - -void -glcpp_error (YYLTYPE *locp, glcpp_parser_t *parser, const char *fmt, ...) -{ - va_list ap; - - parser->error = 1; - ralloc_asprintf_append(&parser->info_log, "%u:%u(%u): " - "preprocessor error: ", - locp->source, - locp->first_line, - locp->first_column); - va_start(ap, fmt); - ralloc_vasprintf_append(&parser->info_log, fmt, ap); - va_end(ap); - ralloc_strcat(&parser->info_log, "\n"); -} - -void -glcpp_warning (YYLTYPE *locp, glcpp_parser_t *parser, const char *fmt, ...) -{ - va_list ap; - - ralloc_asprintf_append(&parser->info_log, "%u:%u(%u): " - "preprocessor warning: ", - locp->source, - locp->first_line, - locp->first_column); - va_start(ap, fmt); - ralloc_vasprintf_append(&parser->info_log, fmt, ap); - va_end(ap); - ralloc_strcat(&parser->info_log, "\n"); -} - -/* Searches backwards for '^ *#' from a given starting point. */ -static int -in_directive(const char *shader, const char *ptr) -{ - assert(ptr >= shader); - - /* Search backwards for '#'. If we find a \n first, it doesn't count */ - for (; ptr >= shader && *ptr != '#'; ptr--) { - if (*ptr == '\n') - return 0; - } - if (ptr >= shader) { - /* Found '#'...look for spaces preceded by a newline */ - for (ptr--; ptr >= shader && isblank(*ptr); ptr--); - // FIXME: I don't think the '\n' case can happen - if (ptr < shader || *ptr == '\n') - return 1; - } - return 0; -} - -/* Remove any line continuation characters in preprocessing directives. - * However, ignore any in GLSL code, as "There is no line continuation - * character" (1.30 page 9) in GLSL. - */ -static char * -remove_line_continuations(glcpp_parser_t *ctx, const char *shader) -{ - int in_continued_line = 0; - int extra_newlines = 0; - char *clean = ralloc_strdup(ctx, ""); - const char *search_start = shader; - const char *newline; - while ((newline = strchr(search_start, '\n')) != NULL) { - const char *backslash = NULL; - - /* # of characters preceding the newline. */ - int n = newline - shader; - - /* Find the preceding '\', if it exists */ - if (n >= 1 && newline[-1] == '\\') - backslash = newline - 1; - else if (n >= 2 && newline[-1] == '\r' && newline[-2] == '\\') - backslash = newline - 2; - - /* Double backslashes don't count (the backslash is escaped) */ - if (backslash != NULL && backslash[-1] == '\\') { - backslash = NULL; - } - - if (backslash != NULL) { - /* We found a line continuation, but do we care? */ - if (!in_continued_line) { - if (in_directive(shader, backslash)) { - in_continued_line = 1; - extra_newlines = 0; - } - } - if (in_continued_line) { - /* Copy everything before the \ */ - ralloc_strncat(&clean, shader, backslash - shader); - shader = newline + 1; - extra_newlines++; - } - } else if (in_continued_line) { - /* Copy everything up to and including the \n */ - ralloc_strncat(&clean, shader, newline - shader + 1); - shader = newline + 1; - /* Output extra newlines to make line numbers match */ - for (; extra_newlines > 0; extra_newlines--) - ralloc_strcat(&clean, "\n"); - in_continued_line = 0; - } - search_start = newline + 1; - } - ralloc_strcat(&clean, shader); - return clean; -} - -int -preprocess(void *ralloc_ctx, const char **shader, char **info_log, - const struct gl_extensions *extensions, int api) -{ - int errors; - glcpp_parser_t *parser = glcpp_parser_create (extensions, api); - *shader = remove_line_continuations(parser, *shader); - - glcpp_lex_set_source_string (parser, *shader); - - glcpp_parser_parse (parser); - - if (parser->skip_stack) - glcpp_error (&parser->skip_stack->loc, parser, "Unterminated #if\n"); - - ralloc_strcat(info_log, parser->info_log); - - ralloc_steal(ralloc_ctx, parser->output); - *shader = parser->output; - - errors = parser->error; - glcpp_parser_destroy (parser); - return errors; -} diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/000-content-with-spaces.c b/dll/opengl/mesa/src/glsl/glcpp/tests/000-content-with-spaces.c deleted file mode 100644 index 696cb3a74fc..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/000-content-with-spaces.c +++ /dev/null @@ -1 +0,0 @@ -this is four tokens diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/000-content-with-spaces.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/000-content-with-spaces.c.expected deleted file mode 100644 index 83f7834d547..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/000-content-with-spaces.c.expected +++ /dev/null @@ -1,2 +0,0 @@ -this is four tokens - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/001-define.c b/dll/opengl/mesa/src/glsl/glcpp/tests/001-define.c deleted file mode 100644 index cbf2fee0e75..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/001-define.c +++ /dev/null @@ -1,2 +0,0 @@ -#define foo 1 -foo diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/001-define.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/001-define.c.expected deleted file mode 100644 index 878fd15d6f8..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/001-define.c.expected +++ /dev/null @@ -1,3 +0,0 @@ - -1 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/002-define-chain.c b/dll/opengl/mesa/src/glsl/glcpp/tests/002-define-chain.c deleted file mode 100644 index 87d75c68751..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/002-define-chain.c +++ /dev/null @@ -1,3 +0,0 @@ -#define foo 1 -#define bar foo -bar diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/002-define-chain.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/002-define-chain.c.expected deleted file mode 100644 index 43d484d7131..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/002-define-chain.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - - -1 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/003-define-chain-reverse.c b/dll/opengl/mesa/src/glsl/glcpp/tests/003-define-chain-reverse.c deleted file mode 100644 index a18b724eca0..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/003-define-chain-reverse.c +++ /dev/null @@ -1,3 +0,0 @@ -#define bar foo -#define foo 1 -bar diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/003-define-chain-reverse.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/003-define-chain-reverse.c.expected deleted file mode 100644 index 43d484d7131..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/003-define-chain-reverse.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - - -1 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/004-define-recursive.c b/dll/opengl/mesa/src/glsl/glcpp/tests/004-define-recursive.c deleted file mode 100644 index 2ac56ea3dcf..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/004-define-recursive.c +++ /dev/null @@ -1,6 +0,0 @@ -#define foo bar -#define bar baz -#define baz foo -foo -bar -baz diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/004-define-recursive.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/004-define-recursive.c.expected deleted file mode 100644 index 4d2698b7a7f..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/004-define-recursive.c.expected +++ /dev/null @@ -1,7 +0,0 @@ - - - -foo -bar -baz - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/005-define-composite-chain.c b/dll/opengl/mesa/src/glsl/glcpp/tests/005-define-composite-chain.c deleted file mode 100644 index f5521df968d..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/005-define-composite-chain.c +++ /dev/null @@ -1,3 +0,0 @@ -#define foo 1 -#define bar a foo -bar diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/005-define-composite-chain.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/005-define-composite-chain.c.expected deleted file mode 100644 index c67358f4f69..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/005-define-composite-chain.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - - -a 1 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/006-define-composite-chain-reverse.c b/dll/opengl/mesa/src/glsl/glcpp/tests/006-define-composite-chain-reverse.c deleted file mode 100644 index 4bb91a1221a..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/006-define-composite-chain-reverse.c +++ /dev/null @@ -1,3 +0,0 @@ -#define bar a foo -#define foo 1 -bar diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/006-define-composite-chain-reverse.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/006-define-composite-chain-reverse.c.expected deleted file mode 100644 index c67358f4f69..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/006-define-composite-chain-reverse.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - - -a 1 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/007-define-composite-recursive.c b/dll/opengl/mesa/src/glsl/glcpp/tests/007-define-composite-recursive.c deleted file mode 100644 index 5784565bdf3..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/007-define-composite-recursive.c +++ /dev/null @@ -1,6 +0,0 @@ -#define foo a bar -#define bar b baz -#define baz c foo -foo -bar -baz diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/007-define-composite-recursive.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/007-define-composite-recursive.c.expected deleted file mode 100644 index 30fe4dc1f62..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/007-define-composite-recursive.c.expected +++ /dev/null @@ -1,7 +0,0 @@ - - - -a b c foo -b c a bar -c a b baz - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/008-define-empty.c b/dll/opengl/mesa/src/glsl/glcpp/tests/008-define-empty.c deleted file mode 100644 index b1bd17ec215..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/008-define-empty.c +++ /dev/null @@ -1,2 +0,0 @@ -#define foo -foo diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/008-define-empty.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/008-define-empty.c.expected deleted file mode 100644 index c0f53d75c71..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/008-define-empty.c.expected +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/009-undef.c b/dll/opengl/mesa/src/glsl/glcpp/tests/009-undef.c deleted file mode 100644 index 3fc1fb44243..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/009-undef.c +++ /dev/null @@ -1,4 +0,0 @@ -#define foo 1 -foo -#undef foo -foo diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/009-undef.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/009-undef.c.expected deleted file mode 100644 index 03a7061af03..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/009-undef.c.expected +++ /dev/null @@ -1,5 +0,0 @@ - -1 - -foo - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/010-undef-re-define.c b/dll/opengl/mesa/src/glsl/glcpp/tests/010-undef-re-define.c deleted file mode 100644 index 32ff73798b1..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/010-undef-re-define.c +++ /dev/null @@ -1,6 +0,0 @@ -#define foo 1 -foo -#undef foo -foo -#define foo 2 -foo diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/010-undef-re-define.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/010-undef-re-define.c.expected deleted file mode 100644 index f4f7efdc2bf..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/010-undef-re-define.c.expected +++ /dev/null @@ -1,7 +0,0 @@ - -1 - -foo - -2 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/011-define-func-empty.c b/dll/opengl/mesa/src/glsl/glcpp/tests/011-define-func-empty.c deleted file mode 100644 index d9ce13c2284..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/011-define-func-empty.c +++ /dev/null @@ -1,2 +0,0 @@ -#define foo() -foo() diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/011-define-func-empty.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/011-define-func-empty.c.expected deleted file mode 100644 index c0f53d75c71..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/011-define-func-empty.c.expected +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/012-define-func-no-args.c b/dll/opengl/mesa/src/glsl/glcpp/tests/012-define-func-no-args.c deleted file mode 100644 index c2bb730b115..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/012-define-func-no-args.c +++ /dev/null @@ -1,2 +0,0 @@ -#define foo() bar -foo() diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/012-define-func-no-args.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/012-define-func-no-args.c.expected deleted file mode 100644 index 03537672974..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/012-define-func-no-args.c.expected +++ /dev/null @@ -1,3 +0,0 @@ - -bar - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/013-define-func-1-arg-unused.c b/dll/opengl/mesa/src/glsl/glcpp/tests/013-define-func-1-arg-unused.c deleted file mode 100644 index f78fb8b118a..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/013-define-func-1-arg-unused.c +++ /dev/null @@ -1,2 +0,0 @@ -#define foo(x) 1 -foo(bar) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/013-define-func-1-arg-unused.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/013-define-func-1-arg-unused.c.expected deleted file mode 100644 index 878fd15d6f8..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/013-define-func-1-arg-unused.c.expected +++ /dev/null @@ -1,3 +0,0 @@ - -1 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/014-define-func-2-arg-unused.c b/dll/opengl/mesa/src/glsl/glcpp/tests/014-define-func-2-arg-unused.c deleted file mode 100644 index 11feb2624b7..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/014-define-func-2-arg-unused.c +++ /dev/null @@ -1,2 +0,0 @@ -#define foo(x,y) 1 -foo(bar,baz) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/014-define-func-2-arg-unused.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/014-define-func-2-arg-unused.c.expected deleted file mode 100644 index 878fd15d6f8..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/014-define-func-2-arg-unused.c.expected +++ /dev/null @@ -1,3 +0,0 @@ - -1 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/015-define-object-with-parens.c b/dll/opengl/mesa/src/glsl/glcpp/tests/015-define-object-with-parens.c deleted file mode 100644 index 558da9c617b..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/015-define-object-with-parens.c +++ /dev/null @@ -1,4 +0,0 @@ -#define foo ()1 -foo() -#define bar ()2 -bar() diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/015-define-object-with-parens.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/015-define-object-with-parens.c.expected deleted file mode 100644 index d6f8cb9dc61..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/015-define-object-with-parens.c.expected +++ /dev/null @@ -1,5 +0,0 @@ - -()1() - -()2() - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/016-define-func-1-arg.c b/dll/opengl/mesa/src/glsl/glcpp/tests/016-define-func-1-arg.c deleted file mode 100644 index a2e2404c7c1..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/016-define-func-1-arg.c +++ /dev/null @@ -1,2 +0,0 @@ -#define foo(x) ((x)+1) -foo(bar) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/016-define-func-1-arg.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/016-define-func-1-arg.c.expected deleted file mode 100644 index 7f1828a3c61..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/016-define-func-1-arg.c.expected +++ /dev/null @@ -1,3 +0,0 @@ - -((bar)+1) - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/017-define-func-2-args.c b/dll/opengl/mesa/src/glsl/glcpp/tests/017-define-func-2-args.c deleted file mode 100644 index c7253835278..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/017-define-func-2-args.c +++ /dev/null @@ -1,2 +0,0 @@ -#define foo(x,y) ((x)*(y)) -foo(bar,baz) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/017-define-func-2-args.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/017-define-func-2-args.c.expected deleted file mode 100644 index 9f341dac00a..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/017-define-func-2-args.c.expected +++ /dev/null @@ -1,3 +0,0 @@ - -((bar)*(baz)) - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/018-define-func-macro-as-parameter.c b/dll/opengl/mesa/src/glsl/glcpp/tests/018-define-func-macro-as-parameter.c deleted file mode 100644 index 668130b8f9b..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/018-define-func-macro-as-parameter.c +++ /dev/null @@ -1,3 +0,0 @@ -#define x 0 -#define foo(x) x -foo(1) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/018-define-func-macro-as-parameter.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/018-define-func-macro-as-parameter.c.expected deleted file mode 100644 index 43d484d7131..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/018-define-func-macro-as-parameter.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - - -1 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/019-define-func-1-arg-multi.c b/dll/opengl/mesa/src/glsl/glcpp/tests/019-define-func-1-arg-multi.c deleted file mode 100644 index c4e62b25508..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/019-define-func-1-arg-multi.c +++ /dev/null @@ -1,2 +0,0 @@ -#define foo(x) (x) -foo(this is more than one word) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/019-define-func-1-arg-multi.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/019-define-func-1-arg-multi.c.expected deleted file mode 100644 index 4314fc88d83..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/019-define-func-1-arg-multi.c.expected +++ /dev/null @@ -1,3 +0,0 @@ - -(this is more than one word) - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/020-define-func-2-arg-multi.c b/dll/opengl/mesa/src/glsl/glcpp/tests/020-define-func-2-arg-multi.c deleted file mode 100644 index 3049ad15465..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/020-define-func-2-arg-multi.c +++ /dev/null @@ -1,2 +0,0 @@ -#define foo(x,y) x,two fish,red fish,y -foo(one fish, blue fish) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/020-define-func-2-arg-multi.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/020-define-func-2-arg-multi.c.expected deleted file mode 100644 index 5648e4fb9d4..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/020-define-func-2-arg-multi.c.expected +++ /dev/null @@ -1,3 +0,0 @@ - -one fish,two fish,red fish,blue fish - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/021-define-func-compose.c b/dll/opengl/mesa/src/glsl/glcpp/tests/021-define-func-compose.c deleted file mode 100644 index 21ddd0e65f9..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/021-define-func-compose.c +++ /dev/null @@ -1,3 +0,0 @@ -#define bar(x) (1+(x)) -#define foo(y) (2*(y)) -foo(bar(3)) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/021-define-func-compose.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/021-define-func-compose.c.expected deleted file mode 100644 index 1d62105de4c..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/021-define-func-compose.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - - -(2*((1+(3)))) - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/022-define-func-arg-with-parens.c b/dll/opengl/mesa/src/glsl/glcpp/tests/022-define-func-arg-with-parens.c deleted file mode 100644 index c20d73a4a28..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/022-define-func-arg-with-parens.c +++ /dev/null @@ -1,2 +0,0 @@ -#define foo(x) (x) -foo(argument(including parens)for the win) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/022-define-func-arg-with-parens.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/022-define-func-arg-with-parens.c.expected deleted file mode 100644 index 66c16581758..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/022-define-func-arg-with-parens.c.expected +++ /dev/null @@ -1,3 +0,0 @@ - -(argument(including parens)for the win) - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/023-define-extra-whitespace.c b/dll/opengl/mesa/src/glsl/glcpp/tests/023-define-extra-whitespace.c deleted file mode 100644 index 7ebfed6516c..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/023-define-extra-whitespace.c +++ /dev/null @@ -1,8 +0,0 @@ -#define noargs() 1 -# define onearg(foo) foo - # define twoargs( x , y ) x y - # define threeargs( a , b , c ) a b c -noargs ( ) -onearg ( 2 ) -twoargs ( 3 , 4 ) -threeargs ( 5 , 6 , 7 ) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/023-define-extra-whitespace.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/023-define-extra-whitespace.c.expected deleted file mode 100644 index 573829c2d69..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/023-define-extra-whitespace.c.expected +++ /dev/null @@ -1,9 +0,0 @@ - - - - -1 -2 -3 4 -5 6 7 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/024-define-chain-to-self-recursion.c b/dll/opengl/mesa/src/glsl/glcpp/tests/024-define-chain-to-self-recursion.c deleted file mode 100644 index e788adce30c..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/024-define-chain-to-self-recursion.c +++ /dev/null @@ -1,3 +0,0 @@ -#define foo foo -#define bar foo -bar diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/024-define-chain-to-self-recursion.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/024-define-chain-to-self-recursion.c.expected deleted file mode 100644 index ad955fce6ec..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/024-define-chain-to-self-recursion.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - - -foo - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/025-func-macro-as-non-macro.c b/dll/opengl/mesa/src/glsl/glcpp/tests/025-func-macro-as-non-macro.c deleted file mode 100644 index b433671d1bf..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/025-func-macro-as-non-macro.c +++ /dev/null @@ -1,2 +0,0 @@ -#define foo(bar) bar -foo bar diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/025-func-macro-as-non-macro.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/025-func-macro-as-non-macro.c.expected deleted file mode 100644 index 960f44511a9..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/025-func-macro-as-non-macro.c.expected +++ /dev/null @@ -1,3 +0,0 @@ - -foo bar - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/026-define-func-extra-newlines.c b/dll/opengl/mesa/src/glsl/glcpp/tests/026-define-func-extra-newlines.c deleted file mode 100644 index 0d837405309..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/026-define-func-extra-newlines.c +++ /dev/null @@ -1,6 +0,0 @@ -#define foo(a) bar - -foo -( -1 -) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/026-define-func-extra-newlines.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/026-define-func-extra-newlines.c.expected deleted file mode 100644 index f0888f21b94..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/026-define-func-extra-newlines.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - - -bar - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/027-define-chain-obj-to-func.c b/dll/opengl/mesa/src/glsl/glcpp/tests/027-define-chain-obj-to-func.c deleted file mode 100644 index 5ccb52caba5..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/027-define-chain-obj-to-func.c +++ /dev/null @@ -1,3 +0,0 @@ -#define failure() success -#define foo failure() -foo diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/027-define-chain-obj-to-func.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/027-define-chain-obj-to-func.c.expected deleted file mode 100644 index aef762e1e69..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/027-define-chain-obj-to-func.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - - -success - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/028-define-chain-obj-to-non-func.c b/dll/opengl/mesa/src/glsl/glcpp/tests/028-define-chain-obj-to-non-func.c deleted file mode 100644 index 44962a71876..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/028-define-chain-obj-to-non-func.c +++ /dev/null @@ -1,3 +0,0 @@ -#define success() failure -#define foo success -foo diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/028-define-chain-obj-to-non-func.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/028-define-chain-obj-to-non-func.c.expected deleted file mode 100644 index aef762e1e69..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/028-define-chain-obj-to-non-func.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - - -success - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/029-define-chain-obj-to-func-with-args.c b/dll/opengl/mesa/src/glsl/glcpp/tests/029-define-chain-obj-to-func-with-args.c deleted file mode 100644 index 261f7d28fc2..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/029-define-chain-obj-to-func-with-args.c +++ /dev/null @@ -1,3 +0,0 @@ -#define bar(failure) failure -#define foo bar(success) -foo diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/029-define-chain-obj-to-func-with-args.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/029-define-chain-obj-to-func-with-args.c.expected deleted file mode 100644 index aef762e1e69..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/029-define-chain-obj-to-func-with-args.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - - -success - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/030-define-chain-obj-to-func-compose.c b/dll/opengl/mesa/src/glsl/glcpp/tests/030-define-chain-obj-to-func-compose.c deleted file mode 100644 index e56fbefd62d..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/030-define-chain-obj-to-func-compose.c +++ /dev/null @@ -1,4 +0,0 @@ -#define baz(failure) failure -#define bar(failure) failure -#define foo bar(baz(success)) -foo diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/030-define-chain-obj-to-func-compose.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/030-define-chain-obj-to-func-compose.c.expected deleted file mode 100644 index 729bdd15f80..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/030-define-chain-obj-to-func-compose.c.expected +++ /dev/null @@ -1,5 +0,0 @@ - - - -success - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/031-define-chain-func-to-func-compose.c b/dll/opengl/mesa/src/glsl/glcpp/tests/031-define-chain-func-to-func-compose.c deleted file mode 100644 index 3f4c8744dff..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/031-define-chain-func-to-func-compose.c +++ /dev/null @@ -1,4 +0,0 @@ -#define baz(failure) failure -#define bar(failure) failure -#define foo() bar(baz(success)) -foo() diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/031-define-chain-func-to-func-compose.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/031-define-chain-func-to-func-compose.c.expected deleted file mode 100644 index 729bdd15f80..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/031-define-chain-func-to-func-compose.c.expected +++ /dev/null @@ -1,5 +0,0 @@ - - - -success - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/032-define-func-self-recurse.c b/dll/opengl/mesa/src/glsl/glcpp/tests/032-define-func-self-recurse.c deleted file mode 100644 index b3ac70f499c..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/032-define-func-self-recurse.c +++ /dev/null @@ -1,2 +0,0 @@ -#define foo(a) foo(2*(a)) -foo(3) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/032-define-func-self-recurse.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/032-define-func-self-recurse.c.expected deleted file mode 100644 index 541d44db7ab..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/032-define-func-self-recurse.c.expected +++ /dev/null @@ -1,3 +0,0 @@ - -foo(2*(3)) - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/033-define-func-self-compose.c b/dll/opengl/mesa/src/glsl/glcpp/tests/033-define-func-self-compose.c deleted file mode 100644 index f65e48286cf..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/033-define-func-self-compose.c +++ /dev/null @@ -1,2 +0,0 @@ -#define foo(a) foo(2*(a)) -foo(foo(3)) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/033-define-func-self-compose.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/033-define-func-self-compose.c.expected deleted file mode 100644 index 6ea6905d80b..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/033-define-func-self-compose.c.expected +++ /dev/null @@ -1,3 +0,0 @@ - -foo(2*(foo(2*(3)))) - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/034-define-func-self-compose-non-func.c b/dll/opengl/mesa/src/glsl/glcpp/tests/034-define-func-self-compose-non-func.c deleted file mode 100644 index 209a5f7e07c..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/034-define-func-self-compose-non-func.c +++ /dev/null @@ -1,2 +0,0 @@ -#define foo(bar) bar -foo(foo) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/034-define-func-self-compose-non-func.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/034-define-func-self-compose-non-func.c.expected deleted file mode 100644 index 24823b1b673..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/034-define-func-self-compose-non-func.c.expected +++ /dev/null @@ -1,3 +0,0 @@ - -foo - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/035-define-func-self-compose-non-func-multi-token-argument.c b/dll/opengl/mesa/src/glsl/glcpp/tests/035-define-func-self-compose-non-func-multi-token-argument.c deleted file mode 100644 index c307fbe830f..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/035-define-func-self-compose-non-func-multi-token-argument.c +++ /dev/null @@ -1,2 +0,0 @@ -#define foo(bar) bar -foo(1+foo) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/035-define-func-self-compose-non-func-multi-token-argument.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/035-define-func-self-compose-non-func-multi-token-argument.c.expected deleted file mode 100644 index 137a9ea2db8..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/035-define-func-self-compose-non-func-multi-token-argument.c.expected +++ /dev/null @@ -1,3 +0,0 @@ - -1+foo - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/036-define-func-non-macro-multi-token-argument.c b/dll/opengl/mesa/src/glsl/glcpp/tests/036-define-func-non-macro-multi-token-argument.c deleted file mode 100644 index b21ff336738..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/036-define-func-non-macro-multi-token-argument.c +++ /dev/null @@ -1,3 +0,0 @@ -#define bar success -#define foo(x) x -foo(more bar) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/036-define-func-non-macro-multi-token-argument.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/036-define-func-non-macro-multi-token-argument.c.expected deleted file mode 100644 index ff6360bfe4e..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/036-define-func-non-macro-multi-token-argument.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - - -more success - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/037-finalize-unexpanded-macro.c b/dll/opengl/mesa/src/glsl/glcpp/tests/037-finalize-unexpanded-macro.c deleted file mode 100644 index b3a2f37f1b9..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/037-finalize-unexpanded-macro.c +++ /dev/null @@ -1,3 +0,0 @@ -#define expand(x) expand(x once) -#define foo(x) x -foo(expand(just)) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/037-finalize-unexpanded-macro.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/037-finalize-unexpanded-macro.c.expected deleted file mode 100644 index cbadee848a5..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/037-finalize-unexpanded-macro.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - - -expand(just once) - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/038-func-arg-with-commas.c b/dll/opengl/mesa/src/glsl/glcpp/tests/038-func-arg-with-commas.c deleted file mode 100644 index 1407c7d6e3c..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/038-func-arg-with-commas.c +++ /dev/null @@ -1,2 +0,0 @@ -#define foo(x) success -foo(argument (with,embedded , commas) -- tricky) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/038-func-arg-with-commas.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/038-func-arg-with-commas.c.expected deleted file mode 100644 index 5a28fb3b66c..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/038-func-arg-with-commas.c.expected +++ /dev/null @@ -1,3 +0,0 @@ - -success - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/039-func-arg-obj-macro-with-comma.c b/dll/opengl/mesa/src/glsl/glcpp/tests/039-func-arg-obj-macro-with-comma.c deleted file mode 100644 index 0f7fe632b56..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/039-func-arg-obj-macro-with-comma.c +++ /dev/null @@ -1,3 +0,0 @@ -#define foo(a) (a) -#define bar two,words -foo(bar) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/039-func-arg-obj-macro-with-comma.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/039-func-arg-obj-macro-with-comma.c.expected deleted file mode 100644 index b73869d0238..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/039-func-arg-obj-macro-with-comma.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - - -(two,words) - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/040-token-pasting.c b/dll/opengl/mesa/src/glsl/glcpp/tests/040-token-pasting.c deleted file mode 100644 index caab3ba7368..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/040-token-pasting.c +++ /dev/null @@ -1,2 +0,0 @@ -#define paste(a,b) a ## b -paste(one , token) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/040-token-pasting.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/040-token-pasting.c.expected deleted file mode 100644 index 36f66992539..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/040-token-pasting.c.expected +++ /dev/null @@ -1,3 +0,0 @@ - -onetoken - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/041-if-0.c b/dll/opengl/mesa/src/glsl/glcpp/tests/041-if-0.c deleted file mode 100644 index 2cab677d3e8..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/041-if-0.c +++ /dev/null @@ -1,5 +0,0 @@ -success_1 -#if 0 -failure -#endif -success_2 diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/041-if-0.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/041-if-0.c.expected deleted file mode 100644 index 3800024c6ff..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/041-if-0.c.expected +++ /dev/null @@ -1,6 +0,0 @@ -success_1 - - - -success_2 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/042-if-1.c b/dll/opengl/mesa/src/glsl/glcpp/tests/042-if-1.c deleted file mode 100644 index 874a25cf41b..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/042-if-1.c +++ /dev/null @@ -1,5 +0,0 @@ -success_1 -#if 1 -success_2 -#endif -success_3 diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/042-if-1.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/042-if-1.c.expected deleted file mode 100644 index e591044adbb..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/042-if-1.c.expected +++ /dev/null @@ -1,6 +0,0 @@ -success_1 - -success_2 - -success_3 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/043-if-0-else.c b/dll/opengl/mesa/src/glsl/glcpp/tests/043-if-0-else.c deleted file mode 100644 index 323351f9dbf..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/043-if-0-else.c +++ /dev/null @@ -1,7 +0,0 @@ -success_1 -#if 0 -failure -#else -success_2 -#endif -success_3 diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/043-if-0-else.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/043-if-0-else.c.expected deleted file mode 100644 index ee9e677096e..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/043-if-0-else.c.expected +++ /dev/null @@ -1,8 +0,0 @@ -success_1 - - - -success_2 - -success_3 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/044-if-1-else.c b/dll/opengl/mesa/src/glsl/glcpp/tests/044-if-1-else.c deleted file mode 100644 index 28dfc25c6f0..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/044-if-1-else.c +++ /dev/null @@ -1,7 +0,0 @@ -success_1 -#if 1 -success_2 -#else -failure -#endif -success_3 diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/044-if-1-else.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/044-if-1-else.c.expected deleted file mode 100644 index 129f5c8542e..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/044-if-1-else.c.expected +++ /dev/null @@ -1,8 +0,0 @@ -success_1 - -success_2 - - - -success_3 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/045-if-0-elif.c b/dll/opengl/mesa/src/glsl/glcpp/tests/045-if-0-elif.c deleted file mode 100644 index e50f686d461..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/045-if-0-elif.c +++ /dev/null @@ -1,11 +0,0 @@ -success_1 -#if 0 -failure_1 -#elif 0 -failure_2 -#elif 1 -success_3 -#elif 1 -failure_3 -#endif -success_4 diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/045-if-0-elif.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/045-if-0-elif.c.expected deleted file mode 100644 index 97a11b4472e..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/045-if-0-elif.c.expected +++ /dev/null @@ -1,12 +0,0 @@ -success_1 - - - - - -success_3 - - - -success_4 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/046-if-1-elsif.c b/dll/opengl/mesa/src/glsl/glcpp/tests/046-if-1-elsif.c deleted file mode 100644 index 130515a01ea..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/046-if-1-elsif.c +++ /dev/null @@ -1,11 +0,0 @@ -success_1 -#if 1 -success_2 -#elif 0 -failure_1 -#elif 1 -failure_2 -#elif 0 -failure_3 -#endif -success_3 diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/046-if-1-elsif.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/046-if-1-elsif.c.expected deleted file mode 100644 index b928b917e3d..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/046-if-1-elsif.c.expected +++ /dev/null @@ -1,12 +0,0 @@ -success_1 - -success_2 - - - - - - - -success_3 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/047-if-elif-else.c b/dll/opengl/mesa/src/glsl/glcpp/tests/047-if-elif-else.c deleted file mode 100644 index e8f0838a9ed..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/047-if-elif-else.c +++ /dev/null @@ -1,11 +0,0 @@ -success_1 -#if 0 -failure_1 -#elif 0 -failure_2 -#elif 0 -failure_3 -#else -success_2 -#endif -success_3 diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/047-if-elif-else.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/047-if-elif-else.c.expected deleted file mode 100644 index e5b53a3fa59..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/047-if-elif-else.c.expected +++ /dev/null @@ -1,12 +0,0 @@ -success_1 - - - - - - - -success_2 - -success_3 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/048-if-nested.c b/dll/opengl/mesa/src/glsl/glcpp/tests/048-if-nested.c deleted file mode 100644 index fc4679c3be4..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/048-if-nested.c +++ /dev/null @@ -1,11 +0,0 @@ -success_1 -#if 0 -failure_1 -#if 1 -failure_2 -#else -failure_3 -#endif -failure_4 -#endif -success_2 diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/048-if-nested.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/048-if-nested.c.expected deleted file mode 100644 index c61fd0b3159..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/048-if-nested.c.expected +++ /dev/null @@ -1,12 +0,0 @@ -success_1 - - - - - - - - - -success_2 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/049-if-expression-precedence.c b/dll/opengl/mesa/src/glsl/glcpp/tests/049-if-expression-precedence.c deleted file mode 100644 index 833ea03882a..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/049-if-expression-precedence.c +++ /dev/null @@ -1,5 +0,0 @@ -#if 1 + 2 * 3 + - (25 % 17 - + 1) -failure with operator precedence -#else -success -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/049-if-expression-precedence.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/049-if-expression-precedence.c.expected deleted file mode 100644 index 569debb0bb6..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/049-if-expression-precedence.c.expected +++ /dev/null @@ -1,6 +0,0 @@ - - - -success - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/050-if-defined.c b/dll/opengl/mesa/src/glsl/glcpp/tests/050-if-defined.c deleted file mode 100644 index 34f0f95140e..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/050-if-defined.c +++ /dev/null @@ -1,17 +0,0 @@ -#if defined foo -failure_1 -#else -success_1 -#endif -#define foo -#if defined foo -success_2 -#else -failure_2 -#endif -#undef foo -#if defined foo -failure_3 -#else -success_3 -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/050-if-defined.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/050-if-defined.c.expected deleted file mode 100644 index 3f01955ee40..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/050-if-defined.c.expected +++ /dev/null @@ -1,18 +0,0 @@ - - - -success_1 - - - -success_2 - - - - - - - -success_3 - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/051-if-relational.c b/dll/opengl/mesa/src/glsl/glcpp/tests/051-if-relational.c deleted file mode 100644 index c3db488e0de..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/051-if-relational.c +++ /dev/null @@ -1,35 +0,0 @@ -#if 3 < 2 -failure_1 -#else -success_1 -#endif - -#if 3 >= 2 -success_2 -#else -failure_2 -#endif - -#if 2 + 3 <= 5 -success_3 -#else -failure_3 -#endif - -#if 3 - 2 == 1 -success_3 -#else -failure_3 -#endif - -#if 1 > 3 -failure_4 -#else -success_4 -#endif - -#if 1 != 5 -success_5 -#else -failure_5 -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/051-if-relational.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/051-if-relational.c.expected deleted file mode 100644 index d2b76f14576..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/051-if-relational.c.expected +++ /dev/null @@ -1,36 +0,0 @@ - - - -success_1 - - - -success_2 - - - - - -success_3 - - - - - -success_3 - - - - - - - -success_4 - - - -success_5 - - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/052-if-bitwise.c b/dll/opengl/mesa/src/glsl/glcpp/tests/052-if-bitwise.c deleted file mode 100644 index 2d8e45eb61e..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/052-if-bitwise.c +++ /dev/null @@ -1,20 +0,0 @@ -#if (0xaaaaaaaa | 0x55555555) != 4294967295 -failure_1 -#else -success_1 -#endif -#if (0x12345678 ^ 0xfdecba98) == 4023971040 -success_2 -#else -failure_2 -#endif -#if (~ 0xdeadbeef) != -3735928560 -failure_3 -#else -success_3 -#endif -#if (0667 & 0733) == 403 -success_4 -#else -failure_4 -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/052-if-bitwise.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/052-if-bitwise.c.expected deleted file mode 100644 index bb5d92e8d92..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/052-if-bitwise.c.expected +++ /dev/null @@ -1,21 +0,0 @@ - - - -success_1 - - -success_2 - - - - - - -success_3 - - -success_4 - - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/053-if-divide-and-shift.c b/dll/opengl/mesa/src/glsl/glcpp/tests/053-if-divide-and-shift.c deleted file mode 100644 index d24c54a88d1..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/053-if-divide-and-shift.c +++ /dev/null @@ -1,15 +0,0 @@ -#if (15 / 2) != 7 -failure_1 -#else -success_1 -#endif -#if (1 << 12) == 4096 -success_2 -#else -failure_2 -#endif -#if (31762 >> 8) != 124 -failure_3 -#else -success_3 -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/053-if-divide-and-shift.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/053-if-divide-and-shift.c.expected deleted file mode 100644 index f97e93673cc..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/053-if-divide-and-shift.c.expected +++ /dev/null @@ -1,16 +0,0 @@ - - - -success_1 - - -success_2 - - - - - - -success_3 - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/054-if-with-macros.c b/dll/opengl/mesa/src/glsl/glcpp/tests/054-if-with-macros.c deleted file mode 100644 index 3da79a0d96e..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/054-if-with-macros.c +++ /dev/null @@ -1,34 +0,0 @@ -#define one 1 -#define two 2 -#define three 3 -#define five 5 -#if five < two -failure_1 -#else -success_1 -#endif -#if three >= two -success_2 -#else -failure_2 -#endif -#if two + three <= five -success_3 -#else -failure_3 -#endif -#if five - two == three -success_4 -#else -failure_4 -#endif -#if one > three -failure_5 -#else -success_5 -#endif -#if one != five -success_6 -#else -failure_6 -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/054-if-with-macros.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/054-if-with-macros.c.expected deleted file mode 100644 index 27ea4969628..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/054-if-with-macros.c.expected +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - -success_1 - - -success_2 - - - - -success_3 - - - - -success_4 - - - - - - -success_5 - - -success_6 - - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/055-define-chain-obj-to-func-parens-in-text.c b/dll/opengl/mesa/src/glsl/glcpp/tests/055-define-chain-obj-to-func-parens-in-text.c deleted file mode 100644 index 00f2c2346d6..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/055-define-chain-obj-to-func-parens-in-text.c +++ /dev/null @@ -1,3 +0,0 @@ -#define failure() success -#define foo failure -foo() diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/055-define-chain-obj-to-func-parens-in-text.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/055-define-chain-obj-to-func-parens-in-text.c.expected deleted file mode 100644 index aef762e1e69..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/055-define-chain-obj-to-func-parens-in-text.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - - -success - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/056-macro-argument-with-comma.c b/dll/opengl/mesa/src/glsl/glcpp/tests/056-macro-argument-with-comma.c deleted file mode 100644 index 58701d1f25b..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/056-macro-argument-with-comma.c +++ /dev/null @@ -1,4 +0,0 @@ -#define bar with,embedded,commas -#define function(x) success -#define foo function -foo(bar) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/056-macro-argument-with-comma.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/056-macro-argument-with-comma.c.expected deleted file mode 100644 index 729bdd15f80..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/056-macro-argument-with-comma.c.expected +++ /dev/null @@ -1,5 +0,0 @@ - - - -success - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/057-empty-arguments.c b/dll/opengl/mesa/src/glsl/glcpp/tests/057-empty-arguments.c deleted file mode 100644 index 6140232865d..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/057-empty-arguments.c +++ /dev/null @@ -1,6 +0,0 @@ -#define zero() success -zero() -#define one(x) success -one() -#define two(x,y) success -two(,) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/057-empty-arguments.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/057-empty-arguments.c.expected deleted file mode 100644 index 4e3aad52173..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/057-empty-arguments.c.expected +++ /dev/null @@ -1,7 +0,0 @@ - -success - -success - -success - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/058-token-pasting-empty-arguments.c b/dll/opengl/mesa/src/glsl/glcpp/tests/058-token-pasting-empty-arguments.c deleted file mode 100644 index 8ac260c76b6..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/058-token-pasting-empty-arguments.c +++ /dev/null @@ -1,5 +0,0 @@ -#define paste(x,y) x ## y -paste(a,b) -paste(a,) -paste(,b) -paste(,) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/058-token-pasting-empty-arguments.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/058-token-pasting-empty-arguments.c.expected deleted file mode 100644 index a1c34e5c1f8..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/058-token-pasting-empty-arguments.c.expected +++ /dev/null @@ -1,6 +0,0 @@ - -ab -a -b - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/059-token-pasting-integer.c b/dll/opengl/mesa/src/glsl/glcpp/tests/059-token-pasting-integer.c deleted file mode 100644 index 37b895a4237..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/059-token-pasting-integer.c +++ /dev/null @@ -1,4 +0,0 @@ -#define paste(x,y) x ## y -paste(1,2) -paste(1,000) -paste(identifier,2) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/059-token-pasting-integer.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/059-token-pasting-integer.c.expected deleted file mode 100644 index f1a2cd21c13..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/059-token-pasting-integer.c.expected +++ /dev/null @@ -1,5 +0,0 @@ - -12 -1000 -identifier2 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/060-left-paren-in-macro-right-paren-in-text.c b/dll/opengl/mesa/src/glsl/glcpp/tests/060-left-paren-in-macro-right-paren-in-text.c deleted file mode 100644 index ed80ea879ce..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/060-left-paren-in-macro-right-paren-in-text.c +++ /dev/null @@ -1,3 +0,0 @@ -#define double(a) a*2 -#define foo double( -foo 5) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/060-left-paren-in-macro-right-paren-in-text.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/060-left-paren-in-macro-right-paren-in-text.c.expected deleted file mode 100644 index c1f0d24a144..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/060-left-paren-in-macro-right-paren-in-text.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - - -5*2 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/061-define-chain-obj-to-func-multi.c b/dll/opengl/mesa/src/glsl/glcpp/tests/061-define-chain-obj-to-func-multi.c deleted file mode 100644 index 6dbfd1f62d1..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/061-define-chain-obj-to-func-multi.c +++ /dev/null @@ -1,5 +0,0 @@ -#define foo(x) success -#define bar foo -#define baz bar -#define joe baz -joe (failure) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/061-define-chain-obj-to-func-multi.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/061-define-chain-obj-to-func-multi.c.expected deleted file mode 100644 index 111f7d10634..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/061-define-chain-obj-to-func-multi.c.expected +++ /dev/null @@ -1,6 +0,0 @@ - - - - -success - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/062-if-0-skips-garbage.c b/dll/opengl/mesa/src/glsl/glcpp/tests/062-if-0-skips-garbage.c deleted file mode 100644 index d9e439bb890..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/062-if-0-skips-garbage.c +++ /dev/null @@ -1,5 +0,0 @@ -#define foo(a,b) -#if 0 -foo(bar) -foo( -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/062-if-0-skips-garbage.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/062-if-0-skips-garbage.c.expected deleted file mode 100644 index 6fb66a5e2f0..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/062-if-0-skips-garbage.c.expected +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/063-comments.c b/dll/opengl/mesa/src/glsl/glcpp/tests/063-comments.c deleted file mode 100644 index e641d2f0f9e..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/063-comments.c +++ /dev/null @@ -1,20 +0,0 @@ -/* this is a comment */ -// so is this -// */ -f = g/**//h; -/*//*/l(); -m = n//**/o -+ p; -/* this -comment spans -multiple lines and -contains *** stars -and slashes / *** / -and other stuff. -****/ -more code here -/* Test that /* nested - comments */ -are not treated like comments. -/*/ this is a comment */ -/*/*/ diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/063-comments.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/063-comments.c.expected deleted file mode 100644 index 73ca7071faa..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/063-comments.c.expected +++ /dev/null @@ -1,21 +0,0 @@ - - - -f = g /h; - l(); -m = n -+ p; - - - - - - - -more code here - - -are not treated like comments. - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/064-version.c b/dll/opengl/mesa/src/glsl/glcpp/tests/064-version.c deleted file mode 100644 index 21326481b87..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/064-version.c +++ /dev/null @@ -1,2 +0,0 @@ -#version 130 -#define FOO diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/064-version.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/064-version.c.expected deleted file mode 100644 index 3af71113c8c..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/064-version.c.expected +++ /dev/null @@ -1,3 +0,0 @@ -#version 130 - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/065-if-defined-parens.c b/dll/opengl/mesa/src/glsl/glcpp/tests/065-if-defined-parens.c deleted file mode 100644 index 48aa0f8c3ef..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/065-if-defined-parens.c +++ /dev/null @@ -1,17 +0,0 @@ -#if defined(foo) -failure_1 -#else -success_1 -#endif -#define foo -#if defined ( foo ) -success_2 -#else -failure_2 -#endif -#undef foo -#if defined (foo) -failure_3 -#else -success_3 -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/065-if-defined-parens.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/065-if-defined-parens.c.expected deleted file mode 100644 index 3f01955ee40..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/065-if-defined-parens.c.expected +++ /dev/null @@ -1,18 +0,0 @@ - - - -success_1 - - - -success_2 - - - - - - - -success_3 - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/066-if-nospace-expression.c b/dll/opengl/mesa/src/glsl/glcpp/tests/066-if-nospace-expression.c deleted file mode 100644 index 3b0b47349d0..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/066-if-nospace-expression.c +++ /dev/null @@ -1,3 +0,0 @@ -#if(1) -success -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/066-if-nospace-expression.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/066-if-nospace-expression.c.expected deleted file mode 100644 index 0e84a7cda39..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/066-if-nospace-expression.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - -success - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/067-nested-ifdef-ifndef.c b/dll/opengl/mesa/src/glsl/glcpp/tests/067-nested-ifdef-ifndef.c deleted file mode 100644 index f46cce4e60a..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/067-nested-ifdef-ifndef.c +++ /dev/null @@ -1,40 +0,0 @@ -#define D1 -#define D2 - -#define result success - -#ifdef U1 -#ifdef U2 -#undef result -#define result failure -#endif -#endif -result - -#ifndef D1 -#ifndef D2 -#undef result -#define result failure -#endif -#endif -result - -#undef result -#define result failure -#ifdef D1 -#ifdef D2 -#undef result -#define result success -#endif -#endif -result - -#undef result -#define result failure -#ifndef U1 -#ifndef U2 -#undef result -#define result success -#endif -#endif -result diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/067-nested-ifdef-ifndef.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/067-nested-ifdef-ifndef.c.expected deleted file mode 100644 index 3340daaa1f9..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/067-nested-ifdef-ifndef.c.expected +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - -success - - - - - - - -success - - - - - - - - - -success - - - - - - - - - -success - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/068-accidental-pasting.c b/dll/opengl/mesa/src/glsl/glcpp/tests/068-accidental-pasting.c deleted file mode 100644 index 699ac5144e5..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/068-accidental-pasting.c +++ /dev/null @@ -1,11 +0,0 @@ -#define empty -empty> ->empty= -=empty= -!empty= -&empty& -|empty| -+empty+ --empty- diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/068-accidental-pasting.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/068-accidental-pasting.c.expected deleted file mode 100644 index ce41cd6e524..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/068-accidental-pasting.c.expected +++ /dev/null @@ -1,12 +0,0 @@ - -< < -< = -> > -> = -= = -! = -& & -| | -+ + -- - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/069-repeated-argument.c b/dll/opengl/mesa/src/glsl/glcpp/tests/069-repeated-argument.c deleted file mode 100644 index 2b46ead294c..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/069-repeated-argument.c +++ /dev/null @@ -1,2 +0,0 @@ -#define double(x) x x -double(1) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/069-repeated-argument.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/069-repeated-argument.c.expected deleted file mode 100644 index 755c4d4b56c..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/069-repeated-argument.c.expected +++ /dev/null @@ -1,3 +0,0 @@ - -1 1 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/070-undefined-macro-in-expression.c b/dll/opengl/mesa/src/glsl/glcpp/tests/070-undefined-macro-in-expression.c deleted file mode 100644 index b6dc2ba075f..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/070-undefined-macro-in-expression.c +++ /dev/null @@ -1,2 +0,0 @@ -#if UNDEFINED_MACRO -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/070-undefined-macro-in-expression.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/070-undefined-macro-in-expression.c.expected deleted file mode 100644 index 2bb38a1411e..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/070-undefined-macro-in-expression.c.expected +++ /dev/null @@ -1,2 +0,0 @@ -0:1(21): preprocessor error: syntax error, unexpected IDENTIFIER - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/071-punctuator.c b/dll/opengl/mesa/src/glsl/glcpp/tests/071-punctuator.c deleted file mode 100644 index 959d6825988..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/071-punctuator.c +++ /dev/null @@ -1 +0,0 @@ -a = b diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/071-punctuator.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/071-punctuator.c.expected deleted file mode 100644 index fee253b7452..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/071-punctuator.c.expected +++ /dev/null @@ -1,2 +0,0 @@ -a = b - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/072-token-pasting-same-line.c b/dll/opengl/mesa/src/glsl/glcpp/tests/072-token-pasting-same-line.c deleted file mode 100644 index e421e9d5e29..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/072-token-pasting-same-line.c +++ /dev/null @@ -1,2 +0,0 @@ -#define paste(x) success_ ## x -paste(1) paste(2) paste(3) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/072-token-pasting-same-line.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/072-token-pasting-same-line.c.expected deleted file mode 100644 index c780b43d70f..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/072-token-pasting-same-line.c.expected +++ /dev/null @@ -1,3 +0,0 @@ - -success_1 success_2 success_3 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/073-if-in-ifdef.c b/dll/opengl/mesa/src/glsl/glcpp/tests/073-if-in-ifdef.c deleted file mode 100644 index 61a48097ca3..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/073-if-in-ifdef.c +++ /dev/null @@ -1,4 +0,0 @@ -#ifdef UNDEF -#if UNDEF > 1 -#endif -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/073-if-in-ifdef.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/073-if-in-ifdef.c.expected deleted file mode 100644 index 3f2ff2d6cc8..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/073-if-in-ifdef.c.expected +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/074-elif-undef.c b/dll/opengl/mesa/src/glsl/glcpp/tests/074-elif-undef.c deleted file mode 100644 index 67aac8977e0..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/074-elif-undef.c +++ /dev/null @@ -1,3 +0,0 @@ -#ifndef UNDEF -#elif UNDEF < 0 -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/074-elif-undef.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/074-elif-undef.c.expected deleted file mode 100644 index fd40910d9e7..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/074-elif-undef.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/075-elif-elif-undef.c b/dll/opengl/mesa/src/glsl/glcpp/tests/075-elif-elif-undef.c deleted file mode 100644 index 264bc4f10ee..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/075-elif-elif-undef.c +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef UNDEF -#elif UNDEF < 0 -#elif UNDEF == 3 -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/075-elif-elif-undef.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/075-elif-elif-undef.c.expected deleted file mode 100644 index 3f2ff2d6cc8..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/075-elif-elif-undef.c.expected +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/076-elif-undef-nested.c b/dll/opengl/mesa/src/glsl/glcpp/tests/076-elif-undef-nested.c deleted file mode 100644 index ebd550ed005..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/076-elif-undef-nested.c +++ /dev/null @@ -1,5 +0,0 @@ -#ifdef UNDEF -#if UNDEF == 4 -#elif UNDEF == 5 -#endif -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/076-elif-undef-nested.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/076-elif-undef-nested.c.expected deleted file mode 100644 index 6fb66a5e2f0..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/076-elif-undef-nested.c.expected +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/077-else-without-if.c b/dll/opengl/mesa/src/glsl/glcpp/tests/077-else-without-if.c deleted file mode 100644 index 81f00bfe278..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/077-else-without-if.c +++ /dev/null @@ -1 +0,0 @@ -#else diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/077-else-without-if.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/077-else-without-if.c.expected deleted file mode 100644 index d289b363562..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/077-else-without-if.c.expected +++ /dev/null @@ -1,4 +0,0 @@ -0:1(2): preprocessor error: else without #if - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/078-elif-without-if.c b/dll/opengl/mesa/src/glsl/glcpp/tests/078-elif-without-if.c deleted file mode 100644 index 60466b3890a..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/078-elif-without-if.c +++ /dev/null @@ -1 +0,0 @@ -#elif defined FOO diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/078-elif-without-if.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/078-elif-without-if.c.expected deleted file mode 100644 index 7d41f0ac794..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/078-elif-without-if.c.expected +++ /dev/null @@ -1,4 +0,0 @@ -0:1(2): preprocessor error: elif without #if - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/079-endif-without-if.c b/dll/opengl/mesa/src/glsl/glcpp/tests/079-endif-without-if.c deleted file mode 100644 index 69331c3ca9d..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/079-endif-without-if.c +++ /dev/null @@ -1 +0,0 @@ -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/079-endif-without-if.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/079-endif-without-if.c.expected deleted file mode 100644 index 08dd33546f2..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/079-endif-without-if.c.expected +++ /dev/null @@ -1,4 +0,0 @@ -0:1(2): preprocessor error: #endif without #if - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/080-if-without-expression.c b/dll/opengl/mesa/src/glsl/glcpp/tests/080-if-without-expression.c deleted file mode 100644 index a27ba36a366..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/080-if-without-expression.c +++ /dev/null @@ -1,4 +0,0 @@ -/* Error message for unskipped #if with no expression. */ -#if -#endif - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/080-if-without-expression.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/080-if-without-expression.c.expected deleted file mode 100644 index 768ba0f473f..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/080-if-without-expression.c.expected +++ /dev/null @@ -1,6 +0,0 @@ -0:2(1): preprocessor error: #if with no expression - - - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/081-elif-without-expression.c b/dll/opengl/mesa/src/glsl/glcpp/tests/081-elif-without-expression.c deleted file mode 100644 index 79c78663dd3..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/081-elif-without-expression.c +++ /dev/null @@ -1,3 +0,0 @@ -#if 0 -#elif -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/081-elif-without-expression.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/081-elif-without-expression.c.expected deleted file mode 100644 index 974f0f550eb..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/081-elif-without-expression.c.expected +++ /dev/null @@ -1,5 +0,0 @@ -0:2(1): preprocessor error: #elif with no expression - - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/082-invalid-paste.c b/dll/opengl/mesa/src/glsl/glcpp/tests/082-invalid-paste.c deleted file mode 100644 index 40bf64411c5..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/082-invalid-paste.c +++ /dev/null @@ -1,2 +0,0 @@ -#define PASTE(x,y) x ## y -PASTE(<,>) diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/082-invalid-paste.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/082-invalid-paste.c.expected deleted file mode 100644 index 2c924406b59..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/082-invalid-paste.c.expected +++ /dev/null @@ -1,5 +0,0 @@ -0:2(7): preprocessor error: -Pasting "<" and ">" does not give a valid preprocessing token. - -< - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/083-unterminated-if.c b/dll/opengl/mesa/src/glsl/glcpp/tests/083-unterminated-if.c deleted file mode 100644 index 91806350927..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/083-unterminated-if.c +++ /dev/null @@ -1,2 +0,0 @@ -#if 1 - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/083-unterminated-if.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/083-unterminated-if.c.expected deleted file mode 100644 index a69f8bab582..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/083-unterminated-if.c.expected +++ /dev/null @@ -1,5 +0,0 @@ -0:1(7): preprocessor error: Unterminated #if - - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/084-unbalanced-parentheses.c b/dll/opengl/mesa/src/glsl/glcpp/tests/084-unbalanced-parentheses.c deleted file mode 100644 index 0789ba5e525..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/084-unbalanced-parentheses.c +++ /dev/null @@ -1,2 +0,0 @@ -#define FUNC(x) (2*(x)) -FUNC(23 diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/084-unbalanced-parentheses.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/084-unbalanced-parentheses.c.expected deleted file mode 100644 index af49a37369d..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/084-unbalanced-parentheses.c.expected +++ /dev/null @@ -1,2 +0,0 @@ -0:2(8): preprocessor error: syntax error, unexpected $end - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/085-incorrect-argument-count.c b/dll/opengl/mesa/src/glsl/glcpp/tests/085-incorrect-argument-count.c deleted file mode 100644 index 91bea600612..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/085-incorrect-argument-count.c +++ /dev/null @@ -1,5 +0,0 @@ -#define MULT(x,y) ((x)*(y)) -MULT() -MULT(1) -MULT(1,2,3) - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/085-incorrect-argument-count.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/085-incorrect-argument-count.c.expected deleted file mode 100644 index 1df30cbb56f..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/085-incorrect-argument-count.c.expected +++ /dev/null @@ -1,12 +0,0 @@ -0:2(1): preprocessor error: Error: macro MULT invoked with 1 arguments (expected 2) - -0:3(1): preprocessor error: Error: macro MULT invoked with 1 arguments (expected 2) - -0:4(1): preprocessor error: Error: macro MULT invoked with 3 arguments (expected 2) - - -MULT() -MULT(1) -MULT(1,2,3) - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/086-reserved-macro-names.c b/dll/opengl/mesa/src/glsl/glcpp/tests/086-reserved-macro-names.c deleted file mode 100644 index a6b7201f95d..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/086-reserved-macro-names.c +++ /dev/null @@ -1,3 +0,0 @@ -#define __BAD reserved -#define GL_ALSO_BAD() also reserved -#define THIS__TOO__IS__BAD reserved diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/086-reserved-macro-names.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/086-reserved-macro-names.c.expected deleted file mode 100644 index d8aa9f0a648..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/086-reserved-macro-names.c.expected +++ /dev/null @@ -1,10 +0,0 @@ -0:1(10): preprocessor error: Macro names containing "__" are reserved. - -0:2(9): preprocessor error: Macro names starting with "GL_" are reserved. - -0:3(9): preprocessor error: Macro names containing "__" are reserved. - - - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/087-if-comments.c b/dll/opengl/mesa/src/glsl/glcpp/tests/087-if-comments.c deleted file mode 100644 index ce8dc43057f..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/087-if-comments.c +++ /dev/null @@ -1,5 +0,0 @@ -#if (1 == 0) // dangerous comment -fail -#else -win -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/087-if-comments.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/087-if-comments.c.expected deleted file mode 100644 index 827e548fe55..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/087-if-comments.c.expected +++ /dev/null @@ -1,6 +0,0 @@ - - - -win - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/088-redefine-macro-legitimate.c b/dll/opengl/mesa/src/glsl/glcpp/tests/088-redefine-macro-legitimate.c deleted file mode 100644 index 0e0666b8b35..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/088-redefine-macro-legitimate.c +++ /dev/null @@ -1,5 +0,0 @@ -#define abc 123 -#define abc 123 - -#define foo(x) (x)+23 -#define foo(x) ( x ) + 23 diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/088-redefine-macro-legitimate.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/088-redefine-macro-legitimate.c.expected deleted file mode 100644 index 6fb66a5e2f0..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/088-redefine-macro-legitimate.c.expected +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/089-redefine-macro-error.c b/dll/opengl/mesa/src/glsl/glcpp/tests/089-redefine-macro-error.c deleted file mode 100644 index b3d1391e160..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/089-redefine-macro-error.c +++ /dev/null @@ -1,17 +0,0 @@ -#define x y -#define x z - -#define abc 123 -#define abc() 123 - -#define foo() bar -#define foo(x) bar - -#define bar() baz -#define bar baz - -#define biff(a,b) a+b -#define biff(a,b,c) a+b - -#define oper(a,b) a+b -#define oper(a,b) a*b diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/089-redefine-macro-error.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/089-redefine-macro-error.c.expected deleted file mode 100644 index 6209ead559e..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/089-redefine-macro-error.c.expected +++ /dev/null @@ -1,30 +0,0 @@ -0:2(9): preprocessor error: Redefinition of macro x - -0:5(9): preprocessor error: Redefinition of macro abc - -0:8(9): preprocessor error: Redefinition of macro foo - -0:11(9): preprocessor error: Redefinition of macro bar - -0:14(9): preprocessor error: Redefinition of macro biff - -0:17(9): preprocessor error: Redefinition of macro oper - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/090-hash-error.c b/dll/opengl/mesa/src/glsl/glcpp/tests/090-hash-error.c deleted file mode 100644 index d19bb7faed8..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/090-hash-error.c +++ /dev/null @@ -1 +0,0 @@ -#error human error diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/090-hash-error.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/090-hash-error.c.expected deleted file mode 100644 index f2f1fbeaf8a..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/090-hash-error.c.expected +++ /dev/null @@ -1,3 +0,0 @@ -0:1(2): preprocessor error: #error human error - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/091-hash-line.c b/dll/opengl/mesa/src/glsl/glcpp/tests/091-hash-line.c deleted file mode 100644 index fea35d37b05..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/091-hash-line.c +++ /dev/null @@ -1,8 +0,0 @@ -#line 0 -#error line 0 error -#line 25 -#error line 25 error -#line 0 1 -#error source 1, line 0 error -#line 30 2 -#error source 2, line 30 error diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/091-hash-line.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/091-hash-line.c.expected deleted file mode 100644 index e663398c160..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/091-hash-line.c.expected +++ /dev/null @@ -1,13 +0,0 @@ -0:0(1): preprocessor error: #error line 0 error -0:25(1): preprocessor error: #error line 25 error -1:0(1): preprocessor error: #error source 1, line 0 error -2:30(1): preprocessor error: #error source 2, line 30 error - - - - - - - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/092-redefine-macro-error-2.c b/dll/opengl/mesa/src/glsl/glcpp/tests/092-redefine-macro-error-2.c deleted file mode 100644 index 3c161a5c501..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/092-redefine-macro-error-2.c +++ /dev/null @@ -1,5 +0,0 @@ -#define A -#define A 1 - -#define B 1 -#define B diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/092-redefine-macro-error-2.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/092-redefine-macro-error-2.c.expected deleted file mode 100644 index 0026f91f32b..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/092-redefine-macro-error-2.c.expected +++ /dev/null @@ -1,10 +0,0 @@ -0:2(9): preprocessor error: Redefinition of macro A - -0:5(9): preprocessor error: Redefinition of macro B - - - - - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/093-divide-by-zero.c b/dll/opengl/mesa/src/glsl/glcpp/tests/093-divide-by-zero.c deleted file mode 100644 index bf65d4f5271..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/093-divide-by-zero.c +++ /dev/null @@ -1,2 +0,0 @@ -#if (1 / 0) -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/093-divide-by-zero.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/093-divide-by-zero.c.expected deleted file mode 100644 index 08f183f24f5..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/093-divide-by-zero.c.expected +++ /dev/null @@ -1,4 +0,0 @@ -0:1(13): preprocessor error: division by 0 in preprocessor directive - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/094-divide-by-zero-short-circuit.c b/dll/opengl/mesa/src/glsl/glcpp/tests/094-divide-by-zero-short-circuit.c deleted file mode 100644 index 04497b17913..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/094-divide-by-zero-short-circuit.c +++ /dev/null @@ -1,13 +0,0 @@ -/* glcpp is generating a division-by-zero error for this case. It's - * easy to argue that it should be short-circuiting the evaluation and - * not generating the diagnostic (which happens to be what gcc does). - * But it doesn't seem like we should force this behavior on our - * pre-processor, (and, as always, the GLSL specification of the - * pre-processor is too vague on this point). - * - * If a short-circuit evaluation optimization does get added to the - * pre-processor then it would legitimate to update the expected file - * for this test. -*/ -#if 1 || (1 / 0) -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/094-divide-by-zero-short-circuit.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/094-divide-by-zero-short-circuit.c.expected deleted file mode 100644 index 84fdc50c920..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/094-divide-by-zero-short-circuit.c.expected +++ /dev/null @@ -1,15 +0,0 @@ -0:12(17): preprocessor error: division by 0 in preprocessor directive - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/095-recursive-define.c b/dll/opengl/mesa/src/glsl/glcpp/tests/095-recursive-define.c deleted file mode 100644 index 801d90ce2e3..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/095-recursive-define.c +++ /dev/null @@ -1,3 +0,0 @@ -#define A(a, b) B(a, b) -#define C A(0, C) -C diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/095-recursive-define.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/095-recursive-define.c.expected deleted file mode 100644 index c7aa18ff6cb..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/095-recursive-define.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - - -B(0, C) - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/096-paste-twice.c b/dll/opengl/mesa/src/glsl/glcpp/tests/096-paste-twice.c deleted file mode 100644 index 8da756fcba4..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/096-paste-twice.c +++ /dev/null @@ -1,3 +0,0 @@ -#define paste_twice(a,b,c) a ## b ## c -paste_twice(just, one, token) - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/096-paste-twice.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/096-paste-twice.c.expected deleted file mode 100644 index e40194112aa..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/096-paste-twice.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - -justonetoken - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/097-paste-with-non-function-macro.c b/dll/opengl/mesa/src/glsl/glcpp/tests/097-paste-with-non-function-macro.c deleted file mode 100644 index 0f46835c29e..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/097-paste-with-non-function-macro.c +++ /dev/null @@ -1,3 +0,0 @@ -#define PASTE_MACRO one ## token -PASTE_MACRO - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/097-paste-with-non-function-macro.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/097-paste-with-non-function-macro.c.expected deleted file mode 100644 index af92187ee90..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/097-paste-with-non-function-macro.c.expected +++ /dev/null @@ -1,4 +0,0 @@ - -onetoken - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/098-elif-undefined.c b/dll/opengl/mesa/src/glsl/glcpp/tests/098-elif-undefined.c deleted file mode 100644 index 52a331cc414..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/098-elif-undefined.c +++ /dev/null @@ -1,3 +0,0 @@ -#if 0 -#elif UNDEFINED_MACRO -#endif diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/098-elif-undefined.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/098-elif-undefined.c.expected deleted file mode 100644 index de967eac438..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/098-elif-undefined.c.expected +++ /dev/null @@ -1,5 +0,0 @@ -0:2(22): preprocessor error: syntax error, unexpected IDENTIFIER -0:1(7): preprocessor error: Unterminated #if - - - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/099-c99-example.c b/dll/opengl/mesa/src/glsl/glcpp/tests/099-c99-example.c deleted file mode 100644 index d1976b1f265..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/099-c99-example.c +++ /dev/null @@ -1,17 +0,0 @@ -#define x 3 -#define f(a) f(x * (a)) -#undef x -#define x 2 -#define g f -#define z z[0] -#define h g(~ -#define m(a) a(w) -#define w 0,1 -#define t(a) a -#define p() int -#define q(x) x -#define r(x,y) x ## y -f(y+1) + f(f(z)) % t(t(g)(0) + t)(1); -g(x +(3,4)-w) | h 5) & m - (f)^m(m); -p() i[q()] = { q(1), r(2,3), r(4,), r(,5), r(,)}; diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/099-c99-example.c.expected b/dll/opengl/mesa/src/glsl/glcpp/tests/099-c99-example.c.expected deleted file mode 100644 index 19be7505552..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/099-c99-example.c.expected +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - -f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1); -f(2 * (2 +(3,4)-0,1)) | f(2 * (~ 5)) & f(2 * (0,1))^m(0,1); -int i[] = { 1, 23, 4, 5, }; - diff --git a/dll/opengl/mesa/src/glsl/glcpp/tests/glcpp-test b/dll/opengl/mesa/src/glsl/glcpp/tests/glcpp-test deleted file mode 100644 index e8f3b546387..00000000000 --- a/dll/opengl/mesa/src/glsl/glcpp/tests/glcpp-test +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh - -trap 'rm $test.valgrind-errors; exit 1' INT QUIT - -usage () -{ - cat <&2 - echo >&2 - usage - exit 1 - fi -done - -total=0 -pass=0 -clean=0 - -echo "====== Testing for correctness ======" -for test in *.c; do - echo -n "Testing $test..." - ../glcpp < $test > $test.out 2>&1 - total=$((total+1)) - if cmp $test.expected $test.out >/dev/null 2>&1; then - echo "PASS" - pass=$((pass+1)) - else - echo "FAIL" - diff -u $test.expected $test.out - fi -done - -echo "" -echo "$pass/$total tests returned correct results" -echo "" - -if [ "$do_valgrind" = "yes" ]; then - echo "====== Testing for valgrind cleanliness ======" - for test in *.c; do - echo -n "Testing $test with valgrind..." - valgrind --error-exitcode=31 --log-file=$test.valgrind-errors ../glcpp < $test >/dev/null 2>&1 - if [ "$?" = "31" ]; then - echo "ERRORS" - cat $test.valgrind-errors - else - echo "CLEAN" - clean=$((clean+1)) - rm $test.valgrind-errors - fi - done - - echo "" - echo "$pass/$total tests returned correct results" - echo "$clean/$total tests are valgrind-clean" -fi - -if [ "$pass" = "$total" ] && [ "$clean" = "$total" ]; then - exit 0 -else - exit 1 -fi - diff --git a/dll/opengl/mesa/src/glsl/glsl_lexer.cpp b/dll/opengl/mesa/src/glsl/glsl_lexer.cpp deleted file mode 100644 index 838c5a73439..00000000000 --- a/dll/opengl/mesa/src/glsl/glsl_lexer.cpp +++ /dev/null @@ -1,3789 +0,0 @@ -#line 2 "glsl_lexer.cpp" - -#line 4 "glsl_lexer.cpp" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yyg->yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yyg->yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE _mesa_glsl_restart(yyin ,yyscanner ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#define YY_BUF_SIZE 16384 -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - #define YY_LESS_LINENO(n) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via _mesa_glsl_restart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] - -void _mesa_glsl_restart (FILE *input_file ,yyscan_t yyscanner ); -void _mesa_glsl__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE _mesa_glsl__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void _mesa_glsl__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void _mesa_glsl__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void _mesa_glsl_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void _mesa_glsl_pop_buffer_state (yyscan_t yyscanner ); - -static void _mesa_glsl_ensure_buffer_stack (yyscan_t yyscanner ); -static void _mesa_glsl__load_buffer_state (yyscan_t yyscanner ); -static void _mesa_glsl__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); - -#define YY_FLUSH_BUFFER _mesa_glsl__flush_buffer(YY_CURRENT_BUFFER ,yyscanner) - -YY_BUFFER_STATE _mesa_glsl__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE _mesa_glsl__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE _mesa_glsl__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); - -void *_mesa_glsl_alloc (yy_size_t ,yyscan_t yyscanner ); -void *_mesa_glsl_realloc (void *,yy_size_t ,yyscan_t yyscanner ); -void _mesa_glsl_free (void * ,yyscan_t yyscanner ); - -#define yy_new_buffer _mesa_glsl__create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - _mesa_glsl_ensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - _mesa_glsl_ensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define _mesa_glsl_wrap(n) 1 -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -typedef int yy_state_type; - -#define yytext_ptr yytext_r - -static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); -static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 211 -#define YY_END_OF_BUFFER 212 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[847] = - { 0, - 0, 0, 16, 16, 0, 0, 212, 210, 1, 21, - 210, 210, 210, 210, 210, 210, 210, 210, 121, 119, - 210, 210, 210, 209, 210, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 210, 1, 210, 211, 16, - 20, 211, 19, 17, 18, 14, 13, 1, 103, 112, - 104, 115, 109, 98, 111, 99, 118, 123, 110, 124, - 121, 0, 0, 126, 121, 0, 119, 119, 107, 100, - 102, 101, 108, 209, 116, 106, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 30, 209, - - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 34, 209, 209, 61, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 117, - 105, 1, 0, 0, 2, 0, 0, 0, 0, 16, - 15, 19, 18, 0, 123, 122, 0, 124, 0, 125, - 120, 113, 114, 209, 129, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 33, 209, 209, 209, - - 209, 209, 209, 209, 209, 209, 209, 26, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 62, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 0, 0, 0, 0, 15, 0, 123, 0, 122, 0, - 124, 125, 120, 209, 209, 24, 209, 209, 176, 169, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 32, - 132, 209, 209, 209, 209, 68, 209, 209, 137, 151, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - - 209, 209, 148, 172, 49, 50, 51, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 135, 127, 209, - 209, 27, 209, 209, 209, 209, 209, 209, 209, 46, - 47, 48, 96, 209, 209, 0, 0, 0, 0, 0, - 122, 209, 209, 28, 37, 38, 39, 209, 130, 209, - 23, 209, 209, 209, 209, 159, 160, 161, 209, 128, - 209, 152, 25, 162, 163, 164, 174, 156, 157, 158, - 209, 209, 209, 63, 154, 209, 209, 209, 40, 41, - 42, 209, 209, 209, 209, 209, 209, 209, 209, 209, - - 209, 209, 209, 209, 209, 209, 209, 149, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 131, 209, - 209, 171, 43, 44, 45, 209, 209, 31, 0, 0, - 0, 0, 179, 209, 209, 177, 209, 209, 209, 150, - 145, 182, 209, 209, 209, 209, 209, 209, 140, 209, - 209, 209, 97, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 209, 209, 209, 209, 155, 136, 209, 209, - 143, 36, 209, 209, 168, 69, 144, 95, 180, 138, - 209, 209, 209, 209, 209, 209, 209, 209, 0, 0, - 0, 0, 209, 209, 209, 139, 35, 209, 209, 209, - - 209, 209, 209, 183, 184, 185, 209, 209, 209, 209, - 209, 173, 209, 209, 209, 209, 209, 209, 209, 209, - 133, 209, 209, 209, 209, 209, 64, 209, 209, 65, - 209, 0, 0, 0, 0, 0, 209, 66, 29, 146, - 187, 188, 189, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 141, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 134, 191, 192, 193, - 209, 209, 153, 209, 142, 0, 0, 6, 0, 0, - 0, 12, 3, 22, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 186, 147, 67, 209, 209, 209, 209, - - 170, 209, 178, 175, 208, 71, 72, 73, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 0, - 0, 0, 0, 0, 0, 0, 209, 209, 209, 190, - 209, 209, 209, 209, 209, 82, 83, 84, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 194, 88, 89, 90, 209, 4, 0, 5, - 0, 0, 0, 0, 0, 0, 209, 209, 209, 209, - 209, 209, 209, 205, 209, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 74, 209, 209, 209, 209, - 209, 209, 209, 0, 0, 0, 0, 209, 209, 206, - - 195, 209, 196, 209, 209, 209, 85, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 207, - 209, 209, 91, 0, 0, 0, 197, 198, 209, 201, - 209, 202, 209, 209, 70, 209, 209, 209, 165, 209, - 166, 181, 209, 209, 199, 200, 209, 209, 0, 0, - 0, 209, 209, 209, 209, 75, 209, 76, 209, 209, - 209, 209, 209, 209, 0, 0, 0, 0, 209, 209, - 86, 87, 209, 77, 209, 209, 78, 209, 209, 92, - 93, 0, 0, 0, 0, 209, 209, 209, 209, 209, - 209, 209, 0, 0, 0, 0, 209, 209, 209, 209, - - 209, 79, 209, 0, 0, 0, 7, 0, 0, 203, - 204, 209, 209, 209, 94, 0, 0, 8, 0, 0, - 209, 209, 167, 0, 0, 0, 80, 81, 0, 0, - 0, 9, 0, 0, 10, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 11, 0 - } ; - -static yyconst flex_int32_t yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 5, 1, 6, 1, 7, 8, 1, 9, - 10, 11, 12, 1, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 21, 21, 22, 22, 23, 1, 24, - 25, 26, 1, 1, 27, 28, 29, 30, 31, 32, - 33, 34, 34, 34, 34, 35, 34, 34, 36, 34, - 34, 37, 38, 39, 40, 34, 34, 41, 34, 34, - 1, 1, 1, 42, 43, 1, 44, 45, 46, 47, - - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 34, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 1, 69, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst flex_int32_t yy_meta[70] = - { 0, - 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, - 3, 3, 1, 1, 1, 1, 4, 4, 4, 4, - 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 1, 5, 4, 4, 4, 4, 3, 3, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 1 - } ; - -static yyconst flex_int16_t yy_base[856] = - { 0, - 0, 68, 74, 0, 1223, 1222, 1224, 1227, 69, 1227, - 1198, 1197, 136, 1196, 133, 134, 132, 1195, 148, 201, - 131, 1194, 146, 0, 121, 114, 123, 146, 134, 136, - 172, 1160, 161, 182, 141, 129, 151, 1154, 140, 187, - 196, 203, 205, 223, 1165, 187, 204, 270, 1227, 224, - 1227, 1200, 258, 1227, 0, 1227, 1227, 240, 1227, 1227, - 1227, 1227, 1227, 1227, 1227, 1227, 1227, 251, 1227, 253, - 224, 321, 275, 1227, 1227, 0, 0, 1227, 1189, 1227, - 1227, 1227, 1188, 0, 1227, 1227, 1150, 1155, 1148, 1151, - 1160, 1159, 1145, 1148, 1160, 247, 1154, 1141, 1138, 1152, - - 1138, 1135, 1135, 1141, 243, 261, 1135, 1146, 1131, 1137, - 1141, 1142, 0, 1133, 1144, 252, 1143, 1138, 1118, 172, - 1122, 1136, 1126, 201, 1119, 260, 1132, 1134, 1116, 1112, - 1120, 1117, 1106, 1115, 264, 1113, 1119, 1114, 1117, 1105, - 1108, 256, 265, 271, 1118, 1105, 1118, 234, 1111, 1227, - 1227, 326, 319, 342, 1227, 1096, 1109, 1100, 1111, 329, - 0, 338, 0, 391, 1227, 315, 402, 1227, 409, 416, - 287, 1227, 1227, 1106, 0, 1097, 1101, 1111, 1108, 300, - 1091, 1091, 1095, 304, 1106, 1103, 1103, 1101, 1098, 1089, - 1096, 1082, 1080, 1093, 1078, 1095, 0, 1092, 1079, 1087, - - 1084, 1088, 1089, 1082, 1079, 1067, 1066, 1080, 1083, 1070, - 1079, 1066, 1073, 1063, 353, 1069, 1072, 1062, 1070, 1058, - 1062, 1053, 1068, 1058, 1049, 1068, 1051, 1049, 1060, 1049, - 1044, 1042, 1056, 1041, 1043, 1040, 1052, 1051, 1054, 1035, - 319, 1044, 1039, 1037, 1047, 1025, 361, 1044, 1046, 1034, - 1026, 1030, 1042, 1025, 0, 423, 434, 451, 1227, 458, - 468, 1227, 1227, 1020, 1031, 0, 1028, 366, 0, 0, - 1021, 1019, 1021, 1016, 1025, 1013, 1031, 1019, 369, 0, - 0, 1013, 1024, 1023, 1023, 0, 1007, 373, 0, 0, - 1009, 376, 1017, 1018, 1008, 1002, 1001, 1002, 1001, 1001, - - 380, 996, 0, 0, 992, 991, 990, 992, 993, 998, - 992, 988, 1002, 997, 996, 995, 986, 989, 989, 981, - 984, 979, 988, 993, 978, 991, 981, 0, 0, 988, - 984, 0, 975, 975, 981, 971, 979, 439, 976, 0, - 0, 0, 0, 965, 978, 977, 976, 973, 961, 475, - 486, 973, 975, 0, 0, 0, 0, 961, 0, 961, - 0, 960, 961, 955, 966, 0, 0, 0, 956, 0, - 952, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 963, 492, 962, 0, 0, 960, 956, 952, 0, 0, - 0, 944, 442, 494, 504, 949, 945, 951, 941, 939, - - 953, 937, 937, 951, 939, 951, 946, 0, 944, 941, - 945, 928, 930, 937, 943, 938, 937, 924, 0, 926, - 927, 0, 0, 0, 0, 924, 928, 0, 922, 976, - 921, 924, 0, 912, 922, 0, 910, 910, 924, 0, - 926, 0, 508, 939, 938, 937, 903, 902, 0, 920, - 919, 914, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 902, 916, 902, 899, 0, 0, 905, 904, - 0, 0, 902, 894, 0, 0, 0, 0, 0, 0, - 891, 903, 511, 895, 902, 901, 898, 892, 885, 529, - 901, 886, 881, 895, 893, 0, 0, 885, 909, 908, - - 907, 873, 872, 378, 505, 0, 885, 888, 886, 874, - 870, 0, 883, 880, 879, 868, 867, 866, 535, 875, - 0, 892, 891, 890, 856, 855, 0, 870, 856, 0, - 867, 862, 539, 565, 911, 855, 863, 0, 0, 0, - 883, 882, 0, 859, 862, 846, 854, 844, 852, 853, - 853, 852, 837, 559, 850, 0, 851, 839, 838, 834, - 863, 862, 861, 827, 826, 822, 0, 860, 859, 0, - 836, 839, 0, 572, 0, 825, 590, 1227, 597, 0, - 617, 593, 1227, 0, 822, 821, 831, 831, 818, 833, - 816, 831, 826, 0, 0, 0, 843, 842, 841, 807, - - 0, 807, 0, 0, 0, 506, 534, 831, 818, 821, - 803, 804, 803, 813, 813, 830, 829, 828, 794, 799, - 625, 651, 373, 816, 806, 794, 792, 791, 802, 0, - 805, 801, 803, 799, 785, 817, 816, 0, 797, 789, - 780, 788, 778, 789, 785, 787, 785, 785, 784, 771, - 770, 781, 0, 801, 800, 0, 781, 1227, 444, 1227, - 658, 0, 678, 795, 779, 761, 778, 777, 760, 752, - 760, 750, 758, 0, 755, 754, 765, 748, 751, 766, - 749, 762, 763, 760, 757, 766, 743, 758, 757, 740, - 739, 738, 749, 479, 763, 732, 742, 726, 725, 0, - - 753, 725, 751, 723, 727, 726, 0, 737, 740, 736, - 738, 719, 733, 717, 718, 726, 719, 708, 707, 0, - 713, 712, 0, 736, 720, 713, 0, 0, 717, 0, - 716, 0, 722, 721, 0, 697, 705, 695, 723, 702, - 0, 0, 715, 714, 0, 0, 713, 712, 753, 560, - 702, 709, 708, 684, 683, 711, 683, 709, 695, 680, - 697, 688, 675, 674, 155, 594, 359, 672, 692, 691, - 0, 0, 686, 0, 685, 691, 0, 676, 690, 0, - 0, 652, 517, 516, 658, 631, 630, 643, 28, 127, - 113, 224, 204, 287, 592, 595, 284, 286, 335, 355, - - 391, 0, 460, 455, 619, 620, 1227, 623, 568, 0, - 0, 443, 457, 451, 0, 474, 645, 1227, 646, 600, - 473, 509, 0, 527, 549, 648, 0, 0, 579, 654, - 680, 1227, 567, 682, 1227, 590, 684, 699, 661, 663, - 604, 607, 700, 701, 1227, 1227, 711, 714, 717, 680, - 682, 720, 724, 727, 729 - } ; - -static yyconst flex_int16_t yy_def[856] = - { 0, - 846, 1, 846, 3, 847, 847, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 848, 846, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 849, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 850, 846, 851, - 19, 846, 846, 846, 846, 852, 20, 846, 846, 846, - 846, 846, 846, 848, 846, 846, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 853, 846, 849, 846, 846, 851, 846, 846, 846, 846, - 852, 846, 846, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 846, 846, 846, 846, 853, 846, 846, 846, 846, 846, - 846, 846, 846, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 846, 846, 846, 846, 846, - 846, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 846, 846, - 846, 846, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 846, 846, - 846, 846, 848, 848, 848, 848, 848, 848, 848, 848, - - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 846, 846, 846, 846, 846, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 846, 846, 846, 846, 854, - 846, 846, 846, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 846, - 846, 846, 854, 846, 846, 846, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 846, 846, 846, - 846, 855, 846, 846, 846, 846, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 855, 846, 846, 846, 848, 848, 848, - - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 846, 846, 846, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 846, 846, - 846, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 848, 848, 848, 846, 846, 846, 846, 848, 848, - 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, - 848, 846, 846, 846, 846, 848, 848, 848, 848, 848, - 848, 848, 846, 846, 846, 846, 848, 848, 848, 848, - - 848, 848, 848, 846, 846, 846, 846, 846, 846, 848, - 848, 848, 848, 848, 848, 846, 846, 846, 846, 846, - 848, 848, 848, 846, 846, 846, 848, 848, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 0, 846, 846, 846, 846, - 846, 846, 846, 846, 846 - } ; - -static yyconst flex_int16_t yy_nxt[1297] = - { 0, - 8, 9, 10, 9, 11, 8, 12, 13, 8, 8, - 14, 15, 16, 17, 18, 19, 20, 20, 20, 20, - 20, 20, 8, 21, 22, 23, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, - 24, 25, 24, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 24, 24, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 24, 24, 24, 46, 47, - 58, 800, 58, 48, 49, 50, 51, 50, 49, 49, - 49, 49, 49, 49, 49, 49, 49, 49, 52, 49, - 53, 53, 53, 53, 53, 53, 54, 49, 49, 49, - - 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 49, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 49, 61, 64, 85, 66, 68, 68, 68, - 68, 68, 68, 68, 79, 80, 765, 65, 67, 87, - 62, 70, 86, 71, 71, 71, 71, 71, 71, 72, - 82, 83, 121, 801, 88, 89, 122, 802, 73, 74, - 90, 97, 91, 126, 119, 98, 92, 75, 76, 93, - 101, 99, 102, 94, 123, 73, 74, 100, 120, 127, - - 95, 103, 128, 96, 110, 152, 782, 58, 124, 153, - 75, 150, 111, 76, 70, 104, 77, 77, 77, 77, - 77, 77, 77, 105, 112, 160, 106, 160, 213, 107, - 113, 73, 74, 114, 129, 108, 214, 115, 116, 131, - 78, 58, 117, 58, 130, 118, 132, 133, 73, 74, - 138, 134, 218, 139, 803, 151, 142, 135, 136, 219, - 137, 143, 140, 78, 846, 144, 146, 804, 145, 141, - 147, 154, 155, 162, 162, 162, 162, 162, 162, 162, - 148, 164, 165, 167, 168, 248, 169, 169, 249, 846, - 170, 170, 170, 170, 170, 170, 170, 193, 164, 165, - - 167, 168, 183, 184, 195, 221, 205, 231, 194, 206, - 207, 239, 240, 208, 243, 209, 241, 156, 196, 222, - 154, 155, 244, 232, 157, 242, 263, 152, 158, 58, - 160, 153, 160, 159, 70, 805, 72, 72, 72, 72, - 72, 72, 72, 154, 155, 258, 259, 269, 810, 263, - 811, 73, 74, 162, 162, 162, 162, 162, 162, 162, - 783, 270, 258, 259, 274, 275, 156, 333, 73, 74, - 305, 306, 307, 157, 577, 578, 334, 158, 340, 341, - 342, 812, 159, 355, 356, 357, 366, 367, 368, 156, - 374, 375, 376, 378, 379, 380, 157, 389, 390, 391, - - 158, 813, 256, 256, 546, 159, 257, 257, 257, 257, - 257, 257, 257, 260, 260, 547, 784, 261, 261, 261, - 261, 261, 261, 261, 170, 170, 170, 170, 170, 170, - 170, 170, 170, 170, 170, 170, 170, 170, 257, 257, - 257, 257, 257, 257, 257, 659, 660, 262, 814, 257, - 257, 257, 257, 257, 257, 257, 423, 424, 425, 454, - 455, 456, 350, 350, 262, 165, 351, 351, 351, 351, - 351, 351, 351, 261, 261, 261, 261, 261, 261, 261, - 659, 660, 165, 261, 261, 261, 261, 261, 261, 261, - 351, 351, 351, 351, 351, 351, 351, 815, 816, 168, - - 821, 351, 351, 351, 351, 351, 351, 351, 444, 445, - 446, 457, 458, 459, 822, 823, 168, 259, 783, 447, - 448, 460, 461, 462, 499, 500, 501, 522, 523, 524, - 490, 548, 641, 824, 259, 502, 503, 827, 525, 526, - 577, 578, 549, 642, 533, 534, 534, 534, 534, 534, - 534, 561, 562, 563, 579, 579, 579, 579, 579, 579, - 643, 766, 564, 565, 794, 566, 577, 578, 767, 819, - 644, 645, 795, 828, 784, 597, 598, 599, 829, 580, - 581, 581, 581, 581, 581, 581, 581, 600, 616, 617, - 618, 577, 578, 806, 582, 766, 808, 830, 577, 578, - - 619, 807, 767, 809, 580, 621, 622, 622, 622, 622, - 622, 622, 579, 579, 579, 579, 579, 579, 577, 578, - 817, 806, 833, 836, 808, 820, 659, 660, 818, 807, - 624, 809, 581, 581, 581, 581, 581, 581, 581, 625, - 661, 661, 661, 661, 661, 661, 817, 819, 825, 831, - 626, 837, 659, 660, 818, 834, 826, 832, 842, 659, - 660, 843, 840, 835, 840, 662, 663, 663, 663, 663, - 663, 663, 663, 661, 661, 661, 661, 661, 661, 659, - 660, 831, 68, 834, 166, 838, 799, 798, 797, 832, - 662, 835, 839, 663, 663, 663, 663, 663, 663, 663, - - 838, 844, 844, 820, 841, 796, 841, 839, 793, 845, - 845, 56, 56, 56, 56, 56, 84, 84, 84, 163, - 163, 163, 171, 171, 255, 792, 255, 255, 255, 623, - 623, 694, 694, 791, 790, 789, 788, 787, 786, 785, - 781, 780, 779, 778, 777, 776, 775, 774, 773, 772, - 771, 770, 769, 768, 765, 764, 763, 762, 761, 760, - 759, 758, 757, 756, 755, 754, 753, 752, 751, 750, - 749, 748, 747, 746, 745, 744, 743, 742, 741, 740, - 739, 738, 737, 736, 735, 734, 733, 732, 731, 730, - 729, 728, 727, 726, 725, 724, 723, 722, 721, 720, - - 719, 718, 717, 716, 715, 714, 713, 712, 711, 710, - 709, 708, 707, 706, 705, 704, 703, 702, 701, 700, - 699, 698, 697, 696, 695, 693, 692, 691, 690, 689, - 688, 687, 686, 685, 684, 683, 682, 681, 680, 679, - 678, 677, 676, 675, 674, 673, 672, 671, 670, 669, - 668, 667, 666, 665, 664, 658, 657, 656, 655, 654, - 653, 652, 651, 650, 649, 648, 647, 646, 640, 639, - 638, 637, 636, 635, 634, 633, 632, 631, 630, 629, - 628, 627, 620, 615, 614, 613, 612, 611, 610, 609, - 608, 607, 606, 605, 604, 603, 602, 601, 596, 595, - - 594, 593, 592, 591, 590, 589, 588, 587, 586, 585, - 584, 583, 582, 576, 575, 574, 573, 572, 571, 570, - 569, 568, 567, 560, 559, 558, 557, 556, 555, 554, - 553, 552, 551, 550, 545, 544, 543, 542, 541, 540, - 539, 538, 537, 536, 535, 532, 531, 530, 529, 528, - 527, 521, 520, 519, 518, 517, 516, 515, 514, 513, - 512, 511, 510, 509, 508, 507, 506, 505, 504, 498, - 497, 496, 495, 494, 493, 492, 491, 490, 489, 488, - 487, 486, 485, 484, 483, 482, 481, 480, 479, 478, - 477, 476, 475, 474, 473, 472, 471, 470, 469, 468, - - 467, 466, 465, 464, 463, 453, 452, 451, 450, 449, - 443, 442, 441, 440, 439, 438, 437, 436, 435, 434, - 433, 432, 431, 430, 429, 428, 427, 426, 422, 421, - 420, 419, 418, 417, 416, 415, 414, 413, 412, 411, - 410, 409, 408, 407, 406, 405, 404, 403, 402, 401, - 400, 399, 398, 397, 396, 395, 394, 393, 392, 388, - 387, 386, 385, 384, 383, 382, 381, 377, 373, 372, - 371, 370, 369, 365, 364, 363, 362, 361, 360, 359, - 358, 354, 353, 352, 349, 348, 347, 346, 345, 344, - 343, 339, 338, 337, 336, 335, 332, 331, 330, 329, - - 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, - 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, - 308, 304, 303, 302, 301, 300, 299, 298, 297, 296, - 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, - 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, - 273, 272, 271, 268, 267, 266, 265, 264, 254, 253, - 252, 251, 250, 247, 246, 245, 238, 237, 236, 235, - 234, 233, 230, 229, 228, 227, 226, 225, 224, 223, - 220, 217, 216, 215, 212, 211, 210, 204, 203, 202, - 201, 200, 199, 198, 197, 192, 191, 190, 189, 188, - - 187, 186, 185, 182, 181, 180, 179, 178, 177, 176, - 175, 174, 173, 172, 161, 149, 125, 109, 81, 69, - 63, 60, 59, 846, 57, 57, 7, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846 - - } ; - -static yyconst flex_int16_t yy_chk[1297] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 9, 789, 9, 2, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 13, 15, 25, 16, 17, 17, 17, - 17, 17, 17, 17, 21, 21, 765, 15, 16, 26, - 13, 19, 25, 19, 19, 19, 19, 19, 19, 19, - 23, 23, 36, 790, 26, 26, 36, 791, 19, 19, - 27, 29, 27, 39, 35, 29, 27, 19, 19, 28, - 30, 29, 30, 28, 37, 19, 19, 29, 35, 39, - - 28, 30, 39, 28, 33, 47, 765, 47, 37, 47, - 19, 46, 33, 19, 20, 31, 20, 20, 20, 20, - 20, 20, 20, 31, 33, 50, 31, 50, 120, 31, - 34, 20, 20, 34, 40, 31, 120, 34, 34, 41, - 20, 58, 34, 58, 40, 34, 41, 41, 20, 20, - 42, 41, 124, 42, 792, 46, 43, 41, 41, 124, - 41, 43, 42, 20, 71, 43, 44, 793, 43, 42, - 44, 48, 48, 53, 53, 53, 53, 53, 53, 53, - 44, 68, 68, 70, 70, 148, 73, 73, 148, 71, - 73, 73, 73, 73, 73, 73, 73, 105, 68, 68, - - 70, 70, 96, 96, 106, 126, 116, 135, 105, 116, - 116, 142, 142, 116, 144, 116, 143, 48, 106, 126, - 153, 153, 144, 135, 48, 143, 171, 152, 48, 152, - 160, 152, 160, 48, 72, 794, 72, 72, 72, 72, - 72, 72, 72, 154, 154, 166, 166, 180, 797, 171, - 798, 72, 72, 162, 162, 162, 162, 162, 162, 162, - 767, 180, 166, 166, 184, 184, 153, 241, 72, 72, - 215, 215, 215, 153, 623, 623, 241, 153, 247, 247, - 247, 799, 153, 268, 268, 268, 279, 279, 279, 154, - 288, 288, 288, 292, 292, 292, 154, 301, 301, 301, - - 154, 800, 164, 164, 504, 154, 164, 164, 164, 164, - 164, 164, 164, 167, 167, 504, 767, 167, 167, 167, - 167, 167, 167, 167, 169, 169, 169, 169, 169, 169, - 169, 170, 170, 170, 170, 170, 170, 170, 256, 256, - 256, 256, 256, 256, 256, 659, 659, 170, 801, 257, - 257, 257, 257, 257, 257, 257, 338, 338, 338, 393, - 393, 393, 258, 258, 170, 257, 258, 258, 258, 258, - 258, 258, 258, 260, 260, 260, 260, 260, 260, 260, - 694, 694, 257, 261, 261, 261, 261, 261, 261, 261, - 350, 350, 350, 350, 350, 350, 350, 803, 804, 261, - - 812, 351, 351, 351, 351, 351, 351, 351, 382, 382, - 382, 394, 394, 394, 813, 814, 261, 351, 783, 382, - 382, 395, 395, 395, 443, 443, 443, 483, 483, 483, - 490, 505, 606, 816, 351, 443, 443, 821, 483, 483, - 533, 533, 505, 606, 490, 490, 490, 490, 490, 490, - 490, 519, 519, 519, 533, 533, 533, 533, 533, 533, - 607, 750, 519, 519, 784, 519, 534, 534, 750, 809, - 607, 607, 784, 822, 783, 554, 554, 554, 824, 533, - 534, 534, 534, 534, 534, 534, 534, 554, 574, 574, - 574, 577, 577, 795, 582, 766, 796, 825, 579, 579, - - 574, 795, 766, 796, 533, 577, 577, 577, 577, 577, - 577, 577, 579, 579, 579, 579, 579, 579, 581, 581, - 805, 806, 829, 833, 808, 809, 621, 621, 805, 806, - 582, 808, 581, 581, 581, 581, 581, 581, 581, 582, - 621, 621, 621, 621, 621, 621, 817, 819, 820, 826, - 582, 836, 622, 622, 817, 830, 820, 826, 841, 661, - 661, 842, 839, 830, 840, 621, 622, 622, 622, 622, - 622, 622, 622, 661, 661, 661, 661, 661, 661, 663, - 663, 831, 850, 834, 851, 837, 788, 787, 786, 831, - 621, 834, 837, 663, 663, 663, 663, 663, 663, 663, - - 838, 843, 844, 819, 839, 785, 840, 838, 782, 843, - 844, 847, 847, 847, 847, 847, 848, 848, 848, 849, - 849, 849, 852, 852, 853, 779, 853, 853, 853, 854, - 854, 855, 855, 778, 776, 775, 773, 770, 769, 768, - 764, 763, 762, 761, 760, 759, 758, 757, 756, 755, - 754, 753, 752, 751, 749, 748, 747, 744, 743, 740, - 739, 738, 737, 736, 734, 733, 731, 729, 726, 725, - 724, 722, 721, 719, 718, 717, 716, 715, 714, 713, - 712, 711, 710, 709, 708, 706, 705, 704, 703, 702, - 701, 699, 698, 697, 696, 695, 693, 692, 691, 690, - - 689, 688, 687, 686, 685, 684, 683, 682, 681, 680, - 679, 678, 677, 676, 675, 673, 672, 671, 670, 669, - 668, 667, 666, 665, 664, 657, 655, 654, 652, 651, - 650, 649, 648, 647, 646, 645, 644, 643, 642, 641, - 640, 639, 637, 636, 635, 634, 633, 632, 631, 629, - 628, 627, 626, 625, 624, 620, 619, 618, 617, 616, - 615, 614, 613, 612, 611, 610, 609, 608, 602, 600, - 599, 598, 597, 593, 592, 591, 590, 589, 588, 587, - 586, 585, 576, 572, 571, 569, 568, 566, 565, 564, - 563, 562, 561, 560, 559, 558, 557, 555, 553, 552, - - 551, 550, 549, 548, 547, 546, 545, 544, 542, 541, - 537, 536, 535, 532, 531, 529, 528, 526, 525, 524, - 523, 522, 520, 518, 517, 516, 515, 514, 513, 511, - 510, 509, 508, 507, 503, 502, 501, 500, 499, 498, - 495, 494, 493, 492, 491, 489, 488, 487, 486, 485, - 484, 482, 481, 474, 473, 470, 469, 466, 465, 464, - 463, 452, 451, 450, 448, 447, 446, 445, 444, 441, - 439, 438, 437, 435, 434, 432, 431, 430, 429, 427, - 426, 421, 420, 418, 417, 416, 415, 414, 413, 412, - 411, 410, 409, 407, 406, 405, 404, 403, 402, 401, - - 400, 399, 398, 397, 396, 392, 388, 387, 386, 383, - 381, 371, 369, 365, 364, 363, 362, 360, 358, 353, - 352, 349, 348, 347, 346, 345, 344, 339, 337, 336, - 335, 334, 333, 331, 330, 327, 326, 325, 324, 323, - 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, - 312, 311, 310, 309, 308, 307, 306, 305, 302, 300, - 299, 298, 297, 296, 295, 294, 293, 291, 287, 285, - 284, 283, 282, 278, 277, 276, 275, 274, 273, 272, - 271, 267, 265, 264, 254, 253, 252, 251, 250, 249, - 248, 246, 245, 244, 243, 242, 240, 239, 238, 237, - - 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, - 226, 225, 224, 223, 222, 221, 220, 219, 218, 217, - 216, 214, 213, 212, 211, 210, 209, 208, 207, 206, - 205, 204, 203, 202, 201, 200, 199, 198, 196, 195, - 194, 193, 192, 191, 190, 189, 188, 187, 186, 185, - 183, 182, 181, 179, 178, 177, 176, 174, 159, 158, - 157, 156, 149, 147, 146, 145, 141, 140, 139, 138, - 137, 136, 134, 133, 132, 131, 130, 129, 128, 127, - 125, 123, 122, 121, 119, 118, 117, 115, 114, 112, - 111, 110, 109, 108, 107, 104, 103, 102, 101, 100, - - 99, 98, 97, 95, 94, 93, 92, 91, 90, 89, - 88, 87, 83, 79, 52, 45, 38, 32, 22, 18, - 14, 12, 11, 7, 6, 5, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846, 846, 846, 846, 846, - 846, 846, 846, 846, 846, 846 - - } ; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -#line 1 "glsl_lexer.ll" -#line 2 "glsl_lexer.ll" -/* - * Copyright © 2008, 2009 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ -#include -#include -#include "strtod.h" -#include "ast.h" -#include "glsl_parser_extras.h" -#include "glsl_parser.h" - -static int classify_identifier(struct _mesa_glsl_parse_state *, const char *); - -#ifdef _MSC_VER -#define YY_NO_UNISTD_H -#endif - -#define YY_USER_ACTION \ - do { \ - yylloc->source = 0; \ - yylloc->first_column = yycolumn + 1; \ - yylloc->first_line = yylineno + 1; \ - yycolumn += yyleng; \ - } while(0); - -#define YY_USER_INIT yylineno = 0; yycolumn = 0; - -/* A macro for handling reserved words and keywords across language versions. - * - * Certain words start out as identifiers, become reserved words in - * later language revisions, and finally become language keywords. - * - * For example, consider the following lexer rule: - * samplerBuffer KEYWORD(130, 140, SAMPLERBUFFER) - * - * This means that "samplerBuffer" will be treated as: - * - a keyword (SAMPLERBUFFER token) ...in GLSL >= 1.40 - * - a reserved word - error ...in GLSL >= 1.30 - * - an identifier ...in GLSL < 1.30 - */ -#define KEYWORD(reserved_version, allowed_version, token) \ - do { \ - if (yyextra->language_version >= allowed_version) { \ - return token; \ - } else if (yyextra->language_version >= reserved_version) { \ - _mesa_glsl_error(yylloc, yyextra, \ - "Illegal use of reserved word `%s'", yytext); \ - return ERROR_TOK; \ - } else { \ - yylval->identifier = strdup(yytext); \ - return classify_identifier(yyextra, yytext); \ - } \ - } while (0) - -/* The ES macro can be used in KEYWORD checks: - * - * word KEYWORD(110 || ES, 400, TOKEN) - * ...means the word is reserved in GLSL ES 1.00, while - * - * word KEYWORD(110, 130 || ES, TOKEN) - * ...means the word is a legal keyword in GLSL ES 1.00. - */ -#define ES yyextra->es_shader - -static int -literal_integer(char *text, int len, struct _mesa_glsl_parse_state *state, - YYSTYPE *lval, YYLTYPE *lloc, int base) -{ - bool is_uint = (text[len - 1] == 'u' || - text[len - 1] == 'U'); - const char *digits = text; - - /* Skip "0x" */ - if (base == 16) - digits += 2; - -#ifdef _MSC_VER - unsigned __int64 value = _strtoui64(digits, NULL, base); -#else - unsigned long long value = strtoull(digits, NULL, base); -#endif - - lval->n = (int)value; - - if (value > UINT_MAX) { - /* Note that signed 0xffffffff is valid, not out of range! */ - if (state->language_version >= 130) { - _mesa_glsl_error(lloc, state, - "Literal value `%s' out of range", text); - } else { - _mesa_glsl_warning(lloc, state, - "Literal value `%s' out of range", text); - } - } else if (base == 10 && !is_uint && (unsigned)value > (unsigned)INT_MAX + 1) { - /* Tries to catch unintentionally providing a negative value. - * Note that -2147483648 is parsed as -(2147483648), so we don't - * want to warn for INT_MAX. - */ - _mesa_glsl_warning(lloc, state, - "Signed literal value `%s' is interpreted as %d", - text, lval->n); - } - return is_uint ? UINTCONSTANT : INTCONSTANT; -} - -#define LITERAL_INTEGER(base) \ - literal_integer(yytext, yyleng, yyextra, yylval, yylloc, base) - - -#line 1128 "glsl_lexer.cpp" - -#define INITIAL 0 -#define PP 1 -#define PRAGMA 2 - -#define YY_EXTRA_TYPE struct _mesa_glsl_parse_state * - -/* Holds the entire state of the reentrant scanner. */ -struct yyguts_t - { - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - int yy_n_chars; - int yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; - - int yylineno_r; - int yy_flex_debug_r; - - char *yytext_r; - int yy_more_flag; - int yy_more_len; - - YYSTYPE * yylval_r; - - YYLTYPE * yylloc_r; - - }; /* end struct yyguts_t */ - -static int yy_init_globals (yyscan_t yyscanner ); - - /* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ - # define yylval yyg->yylval_r - - # define yylloc yyg->yylloc_r - -int _mesa_glsl_lex_init (yyscan_t* scanner); - -int _mesa_glsl_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int _mesa_glsl_lex_destroy (yyscan_t yyscanner ); - -int _mesa_glsl_get_debug (yyscan_t yyscanner ); - -void _mesa_glsl_set_debug (int debug_flag ,yyscan_t yyscanner ); - -YY_EXTRA_TYPE _mesa_glsl_get_extra (yyscan_t yyscanner ); - -void _mesa_glsl_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); - -FILE *_mesa_glsl_get_in (yyscan_t yyscanner ); - -void _mesa_glsl_set_in (FILE * in_str ,yyscan_t yyscanner ); - -FILE *_mesa_glsl_get_out (yyscan_t yyscanner ); - -void _mesa_glsl_set_out (FILE * out_str ,yyscan_t yyscanner ); - -int _mesa_glsl_get_leng (yyscan_t yyscanner ); - -char *_mesa_glsl_get_text (yyscan_t yyscanner ); - -int _mesa_glsl_get_lineno (yyscan_t yyscanner ); - -void _mesa_glsl_set_lineno (int line_number ,yyscan_t yyscanner ); - -int _mesa_glsl_get_column (yyscan_t yyscanner ); - -void _mesa_glsl_set_column (int column_no ,yyscan_t yyscanner ); - -YYSTYPE * _mesa_glsl_get_lval (yyscan_t yyscanner ); - -void _mesa_glsl_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); - - YYLTYPE *_mesa_glsl_get_lloc (yyscan_t yyscanner ); - - void _mesa_glsl_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int _mesa_glsl_wrap (yyscan_t yyscanner ); -#else -extern int _mesa_glsl_wrap (yyscan_t yyscanner ); -#endif -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (yyscan_t yyscanner ); -#else -static int input (yyscan_t yyscanner ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - unsigned n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int _mesa_glsl_lex \ - (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); - -#define YY_DECL int _mesa_glsl_lex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - if ( yyleng > 0 ) \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ - (yytext[yyleng - 1] == '\n'); \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - -#line 145 "glsl_lexer.ll" - - -#line 1369 "glsl_lexer.cpp" - - yylval = yylval_param; - - yylloc = yylloc_param; - - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - _mesa_glsl_ensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - _mesa_glsl__load_buffer_state(yyscanner ); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; - yy_current_state += YY_AT_BOL(); -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 847 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_current_state != 846 ); - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 147 "glsl_lexer.ll" -; - YY_BREAK -/* Preprocessor tokens. */ -case 2: -*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ -yyg->yy_c_buf_p = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 150 "glsl_lexer.ll" -; - YY_BREAK -case 3: -YY_RULE_SETUP -#line 151 "glsl_lexer.ll" -{ BEGIN PP; return VERSION_TOK; } - YY_BREAK -case 4: -YY_RULE_SETUP -#line 152 "glsl_lexer.ll" -{ BEGIN PP; return EXTENSION; } - YY_BREAK -case 5: -*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ -yyg->yy_c_buf_p = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 153 "glsl_lexer.ll" -{ - /* Eat characters until the first digit is - * encountered - */ - char *ptr = yytext; - while (!isdigit(*ptr)) - ptr++; - - /* Subtract one from the line number because - * yylineno is zero-based instead of - * one-based. - */ - yylineno = strtol(ptr, &ptr, 0) - 1; - yylloc->source = strtol(ptr, NULL, 0); - } - YY_BREAK -case 6: -*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ -yyg->yy_c_buf_p = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 168 "glsl_lexer.ll" -{ - /* Eat characters until the first digit is - * encountered - */ - char *ptr = yytext; - while (!isdigit(*ptr)) - ptr++; - - /* Subtract one from the line number because - * yylineno is zero-based instead of - * one-based. - */ - yylineno = strtol(ptr, &ptr, 0) - 1; - } - YY_BREAK -case 7: -YY_RULE_SETUP -#line 182 "glsl_lexer.ll" -{ - BEGIN PP; - return PRAGMA_DEBUG_ON; - } - YY_BREAK -case 8: -YY_RULE_SETUP -#line 186 "glsl_lexer.ll" -{ - BEGIN PP; - return PRAGMA_DEBUG_OFF; - } - YY_BREAK -case 9: -YY_RULE_SETUP -#line 190 "glsl_lexer.ll" -{ - BEGIN PP; - return PRAGMA_OPTIMIZE_ON; - } - YY_BREAK -case 10: -YY_RULE_SETUP -#line 194 "glsl_lexer.ll" -{ - BEGIN PP; - return PRAGMA_OPTIMIZE_OFF; - } - YY_BREAK -case 11: -YY_RULE_SETUP -#line 198 "glsl_lexer.ll" -{ - BEGIN PP; - return PRAGMA_INVARIANT_ALL; - } - YY_BREAK -case 12: -YY_RULE_SETUP -#line 202 "glsl_lexer.ll" -{ BEGIN PRAGMA; } - YY_BREAK -case 13: -/* rule 13 can match eol */ -YY_RULE_SETUP -#line 204 "glsl_lexer.ll" -{ BEGIN 0; yylineno++; yycolumn = 0; } - YY_BREAK -case 14: -YY_RULE_SETUP -#line 205 "glsl_lexer.ll" -{ } - YY_BREAK -case 15: -YY_RULE_SETUP -#line 207 "glsl_lexer.ll" -{ } - YY_BREAK -case 16: -YY_RULE_SETUP -#line 208 "glsl_lexer.ll" -{ } - YY_BREAK -case 17: -YY_RULE_SETUP -#line 209 "glsl_lexer.ll" -return COLON; - YY_BREAK -case 18: -YY_RULE_SETUP -#line 210 "glsl_lexer.ll" -{ - yylval->identifier = strdup(yytext); - return IDENTIFIER; - } - YY_BREAK -case 19: -YY_RULE_SETUP -#line 214 "glsl_lexer.ll" -{ - yylval->n = strtol(yytext, NULL, 10); - return INTCONSTANT; - } - YY_BREAK -case 20: -/* rule 20 can match eol */ -YY_RULE_SETUP -#line 218 "glsl_lexer.ll" -{ BEGIN 0; yylineno++; yycolumn = 0; return EOL; } - YY_BREAK -case 21: -/* rule 21 can match eol */ -YY_RULE_SETUP -#line 220 "glsl_lexer.ll" -{ yylineno++; yycolumn = 0; } - YY_BREAK -case 22: -YY_RULE_SETUP -#line 222 "glsl_lexer.ll" -return ATTRIBUTE; - YY_BREAK -case 23: -YY_RULE_SETUP -#line 223 "glsl_lexer.ll" -return CONST_TOK; - YY_BREAK -case 24: -YY_RULE_SETUP -#line 224 "glsl_lexer.ll" -return BOOL_TOK; - YY_BREAK -case 25: -YY_RULE_SETUP -#line 225 "glsl_lexer.ll" -return FLOAT_TOK; - YY_BREAK -case 26: -YY_RULE_SETUP -#line 226 "glsl_lexer.ll" -return INT_TOK; - YY_BREAK -case 27: -YY_RULE_SETUP -#line 227 "glsl_lexer.ll" -KEYWORD(130, 130, UINT_TOK); - YY_BREAK -case 28: -YY_RULE_SETUP -#line 229 "glsl_lexer.ll" -return BREAK; - YY_BREAK -case 29: -YY_RULE_SETUP -#line 230 "glsl_lexer.ll" -return CONTINUE; - YY_BREAK -case 30: -YY_RULE_SETUP -#line 231 "glsl_lexer.ll" -return DO; - YY_BREAK -case 31: -YY_RULE_SETUP -#line 232 "glsl_lexer.ll" -return WHILE; - YY_BREAK -case 32: -YY_RULE_SETUP -#line 233 "glsl_lexer.ll" -return ELSE; - YY_BREAK -case 33: -YY_RULE_SETUP -#line 234 "glsl_lexer.ll" -return FOR; - YY_BREAK -case 34: -YY_RULE_SETUP -#line 235 "glsl_lexer.ll" -return IF; - YY_BREAK -case 35: -YY_RULE_SETUP -#line 236 "glsl_lexer.ll" -return DISCARD; - YY_BREAK -case 36: -YY_RULE_SETUP -#line 237 "glsl_lexer.ll" -return RETURN; - YY_BREAK -case 37: -YY_RULE_SETUP -#line 239 "glsl_lexer.ll" -return BVEC2; - YY_BREAK -case 38: -YY_RULE_SETUP -#line 240 "glsl_lexer.ll" -return BVEC3; - YY_BREAK -case 39: -YY_RULE_SETUP -#line 241 "glsl_lexer.ll" -return BVEC4; - YY_BREAK -case 40: -YY_RULE_SETUP -#line 242 "glsl_lexer.ll" -return IVEC2; - YY_BREAK -case 41: -YY_RULE_SETUP -#line 243 "glsl_lexer.ll" -return IVEC3; - YY_BREAK -case 42: -YY_RULE_SETUP -#line 244 "glsl_lexer.ll" -return IVEC4; - YY_BREAK -case 43: -YY_RULE_SETUP -#line 245 "glsl_lexer.ll" -KEYWORD(130, 130, UVEC2); - YY_BREAK -case 44: -YY_RULE_SETUP -#line 246 "glsl_lexer.ll" -KEYWORD(130, 130, UVEC3); - YY_BREAK -case 45: -YY_RULE_SETUP -#line 247 "glsl_lexer.ll" -KEYWORD(130, 130, UVEC4); - YY_BREAK -case 46: -YY_RULE_SETUP -#line 248 "glsl_lexer.ll" -return VEC2; - YY_BREAK -case 47: -YY_RULE_SETUP -#line 249 "glsl_lexer.ll" -return VEC3; - YY_BREAK -case 48: -YY_RULE_SETUP -#line 250 "glsl_lexer.ll" -return VEC4; - YY_BREAK -case 49: -YY_RULE_SETUP -#line 251 "glsl_lexer.ll" -return MAT2X2; - YY_BREAK -case 50: -YY_RULE_SETUP -#line 252 "glsl_lexer.ll" -return MAT3X3; - YY_BREAK -case 51: -YY_RULE_SETUP -#line 253 "glsl_lexer.ll" -return MAT4X4; - YY_BREAK -case 52: -YY_RULE_SETUP -#line 254 "glsl_lexer.ll" -KEYWORD(120, 120, MAT2X2); - YY_BREAK -case 53: -YY_RULE_SETUP -#line 255 "glsl_lexer.ll" -KEYWORD(120, 120, MAT2X3); - YY_BREAK -case 54: -YY_RULE_SETUP -#line 256 "glsl_lexer.ll" -KEYWORD(120, 120, MAT2X4); - YY_BREAK -case 55: -YY_RULE_SETUP -#line 257 "glsl_lexer.ll" -KEYWORD(120, 120, MAT3X2); - YY_BREAK -case 56: -YY_RULE_SETUP -#line 258 "glsl_lexer.ll" -KEYWORD(120, 120, MAT3X3); - YY_BREAK -case 57: -YY_RULE_SETUP -#line 259 "glsl_lexer.ll" -KEYWORD(120, 120, MAT3X4); - YY_BREAK -case 58: -YY_RULE_SETUP -#line 260 "glsl_lexer.ll" -KEYWORD(120, 120, MAT4X2); - YY_BREAK -case 59: -YY_RULE_SETUP -#line 261 "glsl_lexer.ll" -KEYWORD(120, 120, MAT4X3); - YY_BREAK -case 60: -YY_RULE_SETUP -#line 262 "glsl_lexer.ll" -KEYWORD(120, 120, MAT4X4); - YY_BREAK -case 61: -YY_RULE_SETUP -#line 264 "glsl_lexer.ll" -return IN_TOK; - YY_BREAK -case 62: -YY_RULE_SETUP -#line 265 "glsl_lexer.ll" -return OUT_TOK; - YY_BREAK -case 63: -YY_RULE_SETUP -#line 266 "glsl_lexer.ll" -return INOUT_TOK; - YY_BREAK -case 64: -YY_RULE_SETUP -#line 267 "glsl_lexer.ll" -return UNIFORM; - YY_BREAK -case 65: -YY_RULE_SETUP -#line 268 "glsl_lexer.ll" -return VARYING; - YY_BREAK -case 66: -YY_RULE_SETUP -#line 269 "glsl_lexer.ll" -KEYWORD(120, 120, CENTROID); - YY_BREAK -case 67: -YY_RULE_SETUP -#line 270 "glsl_lexer.ll" -KEYWORD(120 || ES, 120 || ES, INVARIANT); - YY_BREAK -case 68: -YY_RULE_SETUP -#line 271 "glsl_lexer.ll" -KEYWORD(130 || ES, 130, FLAT); - YY_BREAK -case 69: -YY_RULE_SETUP -#line 272 "glsl_lexer.ll" -KEYWORD(130, 130, SMOOTH); - YY_BREAK -case 70: -YY_RULE_SETUP -#line 273 "glsl_lexer.ll" -KEYWORD(130, 130, NOPERSPECTIVE); - YY_BREAK -case 71: -YY_RULE_SETUP -#line 275 "glsl_lexer.ll" -return SAMPLER1D; - YY_BREAK -case 72: -YY_RULE_SETUP -#line 276 "glsl_lexer.ll" -return SAMPLER2D; - YY_BREAK -case 73: -YY_RULE_SETUP -#line 277 "glsl_lexer.ll" -return SAMPLER3D; - YY_BREAK -case 74: -YY_RULE_SETUP -#line 278 "glsl_lexer.ll" -return SAMPLERCUBE; - YY_BREAK -case 75: -YY_RULE_SETUP -#line 279 "glsl_lexer.ll" -KEYWORD(130, 130, SAMPLER1DARRAY); - YY_BREAK -case 76: -YY_RULE_SETUP -#line 280 "glsl_lexer.ll" -KEYWORD(130, 130, SAMPLER2DARRAY); - YY_BREAK -case 77: -YY_RULE_SETUP -#line 281 "glsl_lexer.ll" -return SAMPLER1DSHADOW; - YY_BREAK -case 78: -YY_RULE_SETUP -#line 282 "glsl_lexer.ll" -return SAMPLER2DSHADOW; - YY_BREAK -case 79: -YY_RULE_SETUP -#line 283 "glsl_lexer.ll" -KEYWORD(130, 130, SAMPLERCUBESHADOW); - YY_BREAK -case 80: -YY_RULE_SETUP -#line 284 "glsl_lexer.ll" -KEYWORD(130, 130, SAMPLER1DARRAYSHADOW); - YY_BREAK -case 81: -YY_RULE_SETUP -#line 285 "glsl_lexer.ll" -KEYWORD(130, 130, SAMPLER2DARRAYSHADOW); - YY_BREAK -case 82: -YY_RULE_SETUP -#line 286 "glsl_lexer.ll" -KEYWORD(130, 130, ISAMPLER1D); - YY_BREAK -case 83: -YY_RULE_SETUP -#line 287 "glsl_lexer.ll" -KEYWORD(130, 130, ISAMPLER2D); - YY_BREAK -case 84: -YY_RULE_SETUP -#line 288 "glsl_lexer.ll" -KEYWORD(130, 130, ISAMPLER3D); - YY_BREAK -case 85: -YY_RULE_SETUP -#line 289 "glsl_lexer.ll" -KEYWORD(130, 130, ISAMPLERCUBE); - YY_BREAK -case 86: -YY_RULE_SETUP -#line 290 "glsl_lexer.ll" -KEYWORD(130, 130, ISAMPLER1DARRAY); - YY_BREAK -case 87: -YY_RULE_SETUP -#line 291 "glsl_lexer.ll" -KEYWORD(130, 130, ISAMPLER2DARRAY); - YY_BREAK -case 88: -YY_RULE_SETUP -#line 292 "glsl_lexer.ll" -KEYWORD(130, 130, USAMPLER1D); - YY_BREAK -case 89: -YY_RULE_SETUP -#line 293 "glsl_lexer.ll" -KEYWORD(130, 130, USAMPLER2D); - YY_BREAK -case 90: -YY_RULE_SETUP -#line 294 "glsl_lexer.ll" -KEYWORD(130, 130, USAMPLER3D); - YY_BREAK -case 91: -YY_RULE_SETUP -#line 295 "glsl_lexer.ll" -KEYWORD(130, 130, USAMPLERCUBE); - YY_BREAK -case 92: -YY_RULE_SETUP -#line 296 "glsl_lexer.ll" -KEYWORD(130, 130, USAMPLER1DARRAY); - YY_BREAK -case 93: -YY_RULE_SETUP -#line 297 "glsl_lexer.ll" -KEYWORD(130, 130, USAMPLER2DARRAY); - YY_BREAK -case 94: -YY_RULE_SETUP -#line 299 "glsl_lexer.ll" -{ - if (yyextra->OES_EGL_image_external_enable) - return SAMPLEREXTERNALOES; - else - return IDENTIFIER; - } - YY_BREAK -case 95: -YY_RULE_SETUP -#line 307 "glsl_lexer.ll" -return STRUCT; - YY_BREAK -case 96: -YY_RULE_SETUP -#line 308 "glsl_lexer.ll" -return VOID_TOK; - YY_BREAK -case 97: -YY_RULE_SETUP -#line 310 "glsl_lexer.ll" -{ - if ((yyextra->language_version >= 140) - || yyextra->AMD_conservative_depth_enable - || yyextra->ARB_conservative_depth_enable - || yyextra->ARB_explicit_attrib_location_enable - || yyextra->ARB_fragment_coord_conventions_enable) { - return LAYOUT_TOK; - } else { - yylval->identifier = strdup(yytext); - return IDENTIFIER; - } - } - YY_BREAK -case 98: -YY_RULE_SETUP -#line 323 "glsl_lexer.ll" -return INC_OP; - YY_BREAK -case 99: -YY_RULE_SETUP -#line 324 "glsl_lexer.ll" -return DEC_OP; - YY_BREAK -case 100: -YY_RULE_SETUP -#line 325 "glsl_lexer.ll" -return LE_OP; - YY_BREAK -case 101: -YY_RULE_SETUP -#line 326 "glsl_lexer.ll" -return GE_OP; - YY_BREAK -case 102: -YY_RULE_SETUP -#line 327 "glsl_lexer.ll" -return EQ_OP; - YY_BREAK -case 103: -YY_RULE_SETUP -#line 328 "glsl_lexer.ll" -return NE_OP; - YY_BREAK -case 104: -YY_RULE_SETUP -#line 329 "glsl_lexer.ll" -return AND_OP; - YY_BREAK -case 105: -YY_RULE_SETUP -#line 330 "glsl_lexer.ll" -return OR_OP; - YY_BREAK -case 106: -YY_RULE_SETUP -#line 331 "glsl_lexer.ll" -return XOR_OP; - YY_BREAK -case 107: -YY_RULE_SETUP -#line 332 "glsl_lexer.ll" -return LEFT_OP; - YY_BREAK -case 108: -YY_RULE_SETUP -#line 333 "glsl_lexer.ll" -return RIGHT_OP; - YY_BREAK -case 109: -YY_RULE_SETUP -#line 335 "glsl_lexer.ll" -return MUL_ASSIGN; - YY_BREAK -case 110: -YY_RULE_SETUP -#line 336 "glsl_lexer.ll" -return DIV_ASSIGN; - YY_BREAK -case 111: -YY_RULE_SETUP -#line 337 "glsl_lexer.ll" -return ADD_ASSIGN; - YY_BREAK -case 112: -YY_RULE_SETUP -#line 338 "glsl_lexer.ll" -return MOD_ASSIGN; - YY_BREAK -case 113: -YY_RULE_SETUP -#line 339 "glsl_lexer.ll" -return LEFT_ASSIGN; - YY_BREAK -case 114: -YY_RULE_SETUP -#line 340 "glsl_lexer.ll" -return RIGHT_ASSIGN; - YY_BREAK -case 115: -YY_RULE_SETUP -#line 341 "glsl_lexer.ll" -return AND_ASSIGN; - YY_BREAK -case 116: -YY_RULE_SETUP -#line 342 "glsl_lexer.ll" -return XOR_ASSIGN; - YY_BREAK -case 117: -YY_RULE_SETUP -#line 343 "glsl_lexer.ll" -return OR_ASSIGN; - YY_BREAK -case 118: -YY_RULE_SETUP -#line 344 "glsl_lexer.ll" -return SUB_ASSIGN; - YY_BREAK -case 119: -YY_RULE_SETUP -#line 346 "glsl_lexer.ll" -{ - return LITERAL_INTEGER(10); - } - YY_BREAK -case 120: -YY_RULE_SETUP -#line 349 "glsl_lexer.ll" -{ - return LITERAL_INTEGER(16); - } - YY_BREAK -case 121: -YY_RULE_SETUP -#line 352 "glsl_lexer.ll" -{ - return LITERAL_INTEGER(8); - } - YY_BREAK -case 122: -YY_RULE_SETUP -#line 356 "glsl_lexer.ll" -{ - yylval->real = glsl_strtod(yytext, NULL); - return FLOATCONSTANT; - } - YY_BREAK -case 123: -YY_RULE_SETUP -#line 360 "glsl_lexer.ll" -{ - yylval->real = glsl_strtod(yytext, NULL); - return FLOATCONSTANT; - } - YY_BREAK -case 124: -YY_RULE_SETUP -#line 364 "glsl_lexer.ll" -{ - yylval->real = glsl_strtod(yytext, NULL); - return FLOATCONSTANT; - } - YY_BREAK -case 125: -YY_RULE_SETUP -#line 368 "glsl_lexer.ll" -{ - yylval->real = glsl_strtod(yytext, NULL); - return FLOATCONSTANT; - } - YY_BREAK -case 126: -YY_RULE_SETUP -#line 372 "glsl_lexer.ll" -{ - yylval->real = glsl_strtod(yytext, NULL); - return FLOATCONSTANT; - } - YY_BREAK -case 127: -YY_RULE_SETUP -#line 377 "glsl_lexer.ll" -{ - yylval->n = 1; - return BOOLCONSTANT; - } - YY_BREAK -case 128: -YY_RULE_SETUP -#line 381 "glsl_lexer.ll" -{ - yylval->n = 0; - return BOOLCONSTANT; - } - YY_BREAK -/* Reserved words in GLSL 1.10. */ -case 129: -YY_RULE_SETUP -#line 388 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, ASM); - YY_BREAK -case 130: -YY_RULE_SETUP -#line 389 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, CLASS); - YY_BREAK -case 131: -YY_RULE_SETUP -#line 390 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, UNION); - YY_BREAK -case 132: -YY_RULE_SETUP -#line 391 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, ENUM); - YY_BREAK -case 133: -YY_RULE_SETUP -#line 392 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, TYPEDEF); - YY_BREAK -case 134: -YY_RULE_SETUP -#line 393 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, TEMPLATE); - YY_BREAK -case 135: -YY_RULE_SETUP -#line 394 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, THIS); - YY_BREAK -case 136: -YY_RULE_SETUP -#line 395 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, PACKED_TOK); - YY_BREAK -case 137: -YY_RULE_SETUP -#line 396 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, GOTO); - YY_BREAK -case 138: -YY_RULE_SETUP -#line 397 "glsl_lexer.ll" -KEYWORD(110 || ES, 130, SWITCH); - YY_BREAK -case 139: -YY_RULE_SETUP -#line 398 "glsl_lexer.ll" -KEYWORD(110 || ES, 130, DEFAULT); - YY_BREAK -case 140: -YY_RULE_SETUP -#line 399 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, INLINE_TOK); - YY_BREAK -case 141: -YY_RULE_SETUP -#line 400 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, NOINLINE); - YY_BREAK -case 142: -YY_RULE_SETUP -#line 401 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, VOLATILE); - YY_BREAK -case 143: -YY_RULE_SETUP -#line 402 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, PUBLIC_TOK); - YY_BREAK -case 144: -YY_RULE_SETUP -#line 403 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, STATIC); - YY_BREAK -case 145: -YY_RULE_SETUP -#line 404 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, EXTERN); - YY_BREAK -case 146: -YY_RULE_SETUP -#line 405 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, EXTERNAL); - YY_BREAK -case 147: -YY_RULE_SETUP -#line 406 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, INTERFACE); - YY_BREAK -case 148: -YY_RULE_SETUP -#line 407 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, LONG_TOK); - YY_BREAK -case 149: -YY_RULE_SETUP -#line 408 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, SHORT_TOK); - YY_BREAK -case 150: -YY_RULE_SETUP -#line 409 "glsl_lexer.ll" -KEYWORD(110 || ES, 400, DOUBLE_TOK); - YY_BREAK -case 151: -YY_RULE_SETUP -#line 410 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, HALF); - YY_BREAK -case 152: -YY_RULE_SETUP -#line 411 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, FIXED_TOK); - YY_BREAK -case 153: -YY_RULE_SETUP -#line 412 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, UNSIGNED); - YY_BREAK -case 154: -YY_RULE_SETUP -#line 413 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, INPUT_TOK); - YY_BREAK -case 155: -YY_RULE_SETUP -#line 414 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, OUTPUT); - YY_BREAK -case 156: -YY_RULE_SETUP -#line 415 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, HVEC2); - YY_BREAK -case 157: -YY_RULE_SETUP -#line 416 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, HVEC3); - YY_BREAK -case 158: -YY_RULE_SETUP -#line 417 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, HVEC4); - YY_BREAK -case 159: -YY_RULE_SETUP -#line 418 "glsl_lexer.ll" -KEYWORD(110 || ES, 400, DVEC2); - YY_BREAK -case 160: -YY_RULE_SETUP -#line 419 "glsl_lexer.ll" -KEYWORD(110 || ES, 400, DVEC3); - YY_BREAK -case 161: -YY_RULE_SETUP -#line 420 "glsl_lexer.ll" -KEYWORD(110 || ES, 400, DVEC4); - YY_BREAK -case 162: -YY_RULE_SETUP -#line 421 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, FVEC2); - YY_BREAK -case 163: -YY_RULE_SETUP -#line 422 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, FVEC3); - YY_BREAK -case 164: -YY_RULE_SETUP -#line 423 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, FVEC4); - YY_BREAK -case 165: -YY_RULE_SETUP -#line 424 "glsl_lexer.ll" -return SAMPLER2DRECT; - YY_BREAK -case 166: -YY_RULE_SETUP -#line 425 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, SAMPLER3DRECT); - YY_BREAK -case 167: -YY_RULE_SETUP -#line 426 "glsl_lexer.ll" -return SAMPLER2DRECTSHADOW; - YY_BREAK -case 168: -YY_RULE_SETUP -#line 427 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, SIZEOF); - YY_BREAK -case 169: -YY_RULE_SETUP -#line 428 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, CAST); - YY_BREAK -case 170: -YY_RULE_SETUP -#line 429 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, NAMESPACE); - YY_BREAK -case 171: -YY_RULE_SETUP -#line 430 "glsl_lexer.ll" -KEYWORD(110 || ES, 999, USING); - YY_BREAK -/* Additional reserved words in GLSL 1.20. */ -case 172: -YY_RULE_SETUP -#line 433 "glsl_lexer.ll" -KEYWORD(120, 130 || ES, LOWP); - YY_BREAK -case 173: -YY_RULE_SETUP -#line 434 "glsl_lexer.ll" -KEYWORD(120, 130 || ES, MEDIUMP); - YY_BREAK -case 174: -YY_RULE_SETUP -#line 435 "glsl_lexer.ll" -KEYWORD(120, 130 || ES, HIGHP); - YY_BREAK -case 175: -YY_RULE_SETUP -#line 436 "glsl_lexer.ll" -KEYWORD(120, 130 || ES, PRECISION); - YY_BREAK -/* Additional reserved words in GLSL 1.30. */ -case 176: -YY_RULE_SETUP -#line 439 "glsl_lexer.ll" -KEYWORD(130, 130, CASE); - YY_BREAK -case 177: -YY_RULE_SETUP -#line 440 "glsl_lexer.ll" -KEYWORD(130, 999, COMMON); - YY_BREAK -case 178: -YY_RULE_SETUP -#line 441 "glsl_lexer.ll" -KEYWORD(130, 999, PARTITION); - YY_BREAK -case 179: -YY_RULE_SETUP -#line 442 "glsl_lexer.ll" -KEYWORD(130, 999, ACTIVE); - YY_BREAK -case 180: -YY_RULE_SETUP -#line 443 "glsl_lexer.ll" -KEYWORD(130 || ES, 999, SUPERP); - YY_BREAK -case 181: -YY_RULE_SETUP -#line 444 "glsl_lexer.ll" -KEYWORD(130, 140, SAMPLERBUFFER); - YY_BREAK -case 182: -YY_RULE_SETUP -#line 445 "glsl_lexer.ll" -KEYWORD(130, 999, FILTER); - YY_BREAK -case 183: -YY_RULE_SETUP -#line 446 "glsl_lexer.ll" -KEYWORD(130, 999, IMAGE1D); - YY_BREAK -case 184: -YY_RULE_SETUP -#line 447 "glsl_lexer.ll" -KEYWORD(130, 999, IMAGE2D); - YY_BREAK -case 185: -YY_RULE_SETUP -#line 448 "glsl_lexer.ll" -KEYWORD(130, 999, IMAGE3D); - YY_BREAK -case 186: -YY_RULE_SETUP -#line 449 "glsl_lexer.ll" -KEYWORD(130, 999, IMAGECUBE); - YY_BREAK -case 187: -YY_RULE_SETUP -#line 450 "glsl_lexer.ll" -KEYWORD(130, 999, IIMAGE1D); - YY_BREAK -case 188: -YY_RULE_SETUP -#line 451 "glsl_lexer.ll" -KEYWORD(130, 999, IIMAGE2D); - YY_BREAK -case 189: -YY_RULE_SETUP -#line 452 "glsl_lexer.ll" -KEYWORD(130, 999, IIMAGE3D); - YY_BREAK -case 190: -YY_RULE_SETUP -#line 453 "glsl_lexer.ll" -KEYWORD(130, 999, IIMAGECUBE); - YY_BREAK -case 191: -YY_RULE_SETUP -#line 454 "glsl_lexer.ll" -KEYWORD(130, 999, UIMAGE1D); - YY_BREAK -case 192: -YY_RULE_SETUP -#line 455 "glsl_lexer.ll" -KEYWORD(130, 999, UIMAGE2D); - YY_BREAK -case 193: -YY_RULE_SETUP -#line 456 "glsl_lexer.ll" -KEYWORD(130, 999, UIMAGE3D); - YY_BREAK -case 194: -YY_RULE_SETUP -#line 457 "glsl_lexer.ll" -KEYWORD(130, 999, UIMAGECUBE); - YY_BREAK -case 195: -YY_RULE_SETUP -#line 458 "glsl_lexer.ll" -KEYWORD(130, 999, IMAGE1DARRAY); - YY_BREAK -case 196: -YY_RULE_SETUP -#line 459 "glsl_lexer.ll" -KEYWORD(130, 999, IMAGE2DARRAY); - YY_BREAK -case 197: -YY_RULE_SETUP -#line 460 "glsl_lexer.ll" -KEYWORD(130, 999, IIMAGE1DARRAY); - YY_BREAK -case 198: -YY_RULE_SETUP -#line 461 "glsl_lexer.ll" -KEYWORD(130, 999, IIMAGE2DARRAY); - YY_BREAK -case 199: -YY_RULE_SETUP -#line 462 "glsl_lexer.ll" -KEYWORD(130, 999, UIMAGE1DARRAY); - YY_BREAK -case 200: -YY_RULE_SETUP -#line 463 "glsl_lexer.ll" -KEYWORD(130, 999, UIMAGE2DARRAY); - YY_BREAK -case 201: -YY_RULE_SETUP -#line 464 "glsl_lexer.ll" -KEYWORD(130, 999, IMAGE1DSHADOW); - YY_BREAK -case 202: -YY_RULE_SETUP -#line 465 "glsl_lexer.ll" -KEYWORD(130, 999, IMAGE2DSHADOW); - YY_BREAK -case 203: -YY_RULE_SETUP -#line 466 "glsl_lexer.ll" -KEYWORD(130, 999, IMAGE1DARRAYSHADOW); - YY_BREAK -case 204: -YY_RULE_SETUP -#line 467 "glsl_lexer.ll" -KEYWORD(130, 999, IMAGE2DARRAYSHADOW); - YY_BREAK -case 205: -YY_RULE_SETUP -#line 468 "glsl_lexer.ll" -KEYWORD(130, 999, IMAGEBUFFER); - YY_BREAK -case 206: -YY_RULE_SETUP -#line 469 "glsl_lexer.ll" -KEYWORD(130, 999, IIMAGEBUFFER); - YY_BREAK -case 207: -YY_RULE_SETUP -#line 470 "glsl_lexer.ll" -KEYWORD(130, 999, UIMAGEBUFFER); - YY_BREAK -case 208: -YY_RULE_SETUP -#line 471 "glsl_lexer.ll" -KEYWORD(130, 999, ROW_MAJOR); - YY_BREAK -case 209: -YY_RULE_SETUP -#line 473 "glsl_lexer.ll" -{ - struct _mesa_glsl_parse_state *state = yyextra; - void *ctx = state; - yylval->identifier = ralloc_strdup(ctx, yytext); - return classify_identifier(state, yytext); - } - YY_BREAK -case 210: -YY_RULE_SETUP -#line 480 "glsl_lexer.ll" -{ return yytext[0]; } - YY_BREAK -case 211: -YY_RULE_SETUP -#line 482 "glsl_lexer.ll" -ECHO; - YY_BREAK -#line 2620 "glsl_lexer.cpp" -case YY_STATE_EOF(INITIAL): -case YY_STATE_EOF(PP): -case YY_STATE_EOF(PRAGMA): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * _mesa_glsl_lex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( _mesa_glsl_wrap(yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of _mesa_glsl_lex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = yyg->yytext_ptr; - register int number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - _mesa_glsl_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, (size_t) num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - _mesa_glsl_restart(yyin ,yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) _mesa_glsl_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) -{ - register yy_state_type yy_current_state; - register char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - yy_current_state += YY_AT_BOL(); - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 847 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) -{ - register int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - register char *yy_cp = yyg->yy_c_buf_p; - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 847 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 846); - - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) -#else - static int input (yyscan_t yyscanner) -#endif - -{ - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - _mesa_glsl_restart(yyin ,yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( _mesa_glsl_wrap(yyscanner ) ) - return EOF; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(yyscanner); -#else - return input(yyscanner); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; - - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * @param yyscanner The scanner object. - * @note This function does not reset the start condition to @c INITIAL . - */ - void _mesa_glsl_restart (FILE * input_file , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! YY_CURRENT_BUFFER ){ - _mesa_glsl_ensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - _mesa_glsl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - _mesa_glsl__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); - _mesa_glsl__load_buffer_state(yyscanner ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * @param yyscanner The scanner object. - */ - void _mesa_glsl__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * _mesa_glsl_pop_buffer_state(); - * _mesa_glsl_push_buffer_state(new_buffer); - */ - _mesa_glsl_ensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - _mesa_glsl__load_buffer_state(yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (_mesa_glsl_wrap()) processing, but the only time this flag - * is looked at is after _mesa_glsl_wrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; -} - -static void _mesa_glsl__load_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * @param yyscanner The scanner object. - * @return the allocated buffer state. - */ - YY_BUFFER_STATE _mesa_glsl__create_buffer (FILE * file, int size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) _mesa_glsl_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) _mesa_glsl_alloc(b->yy_buf_size + 2 ,yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__create_buffer()" ); - - b->yy_is_our_buffer = 1; - - _mesa_glsl__init_buffer(b,file ,yyscanner); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with _mesa_glsl__create_buffer() - * @param yyscanner The scanner object. - */ - void _mesa_glsl__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - _mesa_glsl_free((void *) b->yy_ch_buf ,yyscanner ); - - _mesa_glsl_free((void *) b ,yyscanner ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a _mesa_glsl_restart() or at EOF. - */ - static void _mesa_glsl__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) - -{ - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - _mesa_glsl__flush_buffer(b ,yyscanner); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then _mesa_glsl__init_buffer was _probably_ - * called from _mesa_glsl_restart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * @param yyscanner The scanner object. - */ - void _mesa_glsl__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - _mesa_glsl__load_buffer_state(yyscanner ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * @param yyscanner The scanner object. - */ -void _mesa_glsl_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - _mesa_glsl_ensure_buffer_stack(yyscanner); - - /* This block is copied from _mesa_glsl__switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from _mesa_glsl__switch_to_buffer. */ - _mesa_glsl__load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * @param yyscanner The scanner object. - */ -void _mesa_glsl_pop_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - _mesa_glsl__delete_buffer(YY_CURRENT_BUFFER ,yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - _mesa_glsl__load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void _mesa_glsl_ensure_buffer_stack (yyscan_t yyscanner) -{ - int num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - yyg->yy_buffer_stack = (struct yy_buffer_state**)_mesa_glsl_alloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_ensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)_mesa_glsl_realloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl_ensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE _mesa_glsl__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) _mesa_glsl_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - _mesa_glsl__switch_to_buffer(b ,yyscanner ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to _mesa_glsl_lex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * _mesa_glsl__scan_bytes() instead. - */ -YY_BUFFER_STATE _mesa_glsl__scan_string (yyconst char * yystr , yyscan_t yyscanner) -{ - - return _mesa_glsl__scan_bytes(yystr,strlen(yystr) ,yyscanner); -} - -/** Setup the input buffer state to scan the given bytes. The next call to _mesa_glsl_lex() will - * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE _mesa_glsl__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) _mesa_glsl_alloc(n ,yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in _mesa_glsl__scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = _mesa_glsl__scan_buffer(buf,n ,yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in _mesa_glsl__scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the user-defined data for this scanner. - * @param yyscanner The scanner object. - */ -YY_EXTRA_TYPE _mesa_glsl_get_extra (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; -} - -/** Get the current line number. - * @param yyscanner The scanner object. - */ -int _mesa_glsl_get_lineno (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; -} - -/** Get the current column number. - * @param yyscanner The scanner object. - */ -int _mesa_glsl_get_column (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; -} - -/** Get the input stream. - * @param yyscanner The scanner object. - */ -FILE *_mesa_glsl_get_in (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; -} - -/** Get the output stream. - * @param yyscanner The scanner object. - */ -FILE *_mesa_glsl_get_out (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; -} - -/** Get the length of the current token. - * @param yyscanner The scanner object. - */ -int _mesa_glsl_get_leng (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; -} - -/** Get the current token. - * @param yyscanner The scanner object. - */ - -char *_mesa_glsl_get_text (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; -} - -/** Set the user-defined data. This data is never touched by the scanner. - * @param user_defined The data to be associated with this scanner. - * @param yyscanner The scanner object. - */ -void _mesa_glsl_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; -} - -/** Set the current line number. - * @param line_number - * @param yyscanner The scanner object. - */ -void _mesa_glsl_set_lineno (int line_number , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "_mesa_glsl_set_lineno called with no buffer" , yyscanner); - - yylineno = line_number; -} - -/** Set the current column. - * @param line_number - * @param yyscanner The scanner object. - */ -void _mesa_glsl_set_column (int column_no , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "_mesa_glsl_set_column called with no buffer" , yyscanner); - - yycolumn = column_no; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * @param yyscanner The scanner object. - * @see _mesa_glsl__switch_to_buffer - */ -void _mesa_glsl_set_in (FILE * in_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = in_str ; -} - -void _mesa_glsl_set_out (FILE * out_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = out_str ; -} - -int _mesa_glsl_get_debug (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; -} - -void _mesa_glsl_set_debug (int bdebug , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = bdebug ; -} - -/* Accessor methods for yylval and yylloc */ - -YYSTYPE * _mesa_glsl_get_lval (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylval; -} - -void _mesa_glsl_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; -} - -YYLTYPE *_mesa_glsl_get_lloc (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylloc; -} - -void _mesa_glsl_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylloc = yylloc_param; -} - -/* User-visible API */ - -/* _mesa_glsl_lex_init is special because it creates the scanner itself, so it is - * the ONLY reentrant function that doesn't take the scanner as the last argument. - * That's why we explicitly handle the declaration, instead of using our macros. - */ - -int _mesa_glsl_lex_init(yyscan_t* ptr_yy_globals) - -{ - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) _mesa_glsl_alloc ( sizeof( struct yyguts_t ), NULL ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - return yy_init_globals ( *ptr_yy_globals ); -} - -/* _mesa_glsl_lex_init_extra has the same functionality as _mesa_glsl_lex_init, but follows the - * convention of taking the scanner as the last argument. Note however, that - * this is a *pointer* to a scanner, as it will be allocated by this call (and - * is the reason, too, why this function also must handle its own declaration). - * The user defined value in the first argument will be available to _mesa_glsl_alloc in - * the yyextra field. - */ - -int _mesa_glsl_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) - -{ - struct yyguts_t dummy_yyguts; - - _mesa_glsl_set_extra (yy_user_defined, &dummy_yyguts); - - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) _mesa_glsl_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - _mesa_glsl_set_extra (yy_user_defined, *ptr_yy_globals); - - return yy_init_globals ( *ptr_yy_globals ); -} - -static int yy_init_globals (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from _mesa_glsl_lex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = 0; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = (char *) 0; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = (FILE *) 0; - yyout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * _mesa_glsl_lex_init() - */ - return 0; -} - -/* _mesa_glsl_lex_destroy is for both reentrant and non-reentrant scanners. */ -int _mesa_glsl_lex_destroy (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - _mesa_glsl__delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - _mesa_glsl_pop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - _mesa_glsl_free(yyg->yy_buffer_stack ,yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - _mesa_glsl_free(yyg->yy_start_stack ,yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * _mesa_glsl_lex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - _mesa_glsl_free ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) -{ - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) -{ - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *_mesa_glsl_alloc (yy_size_t size , yyscan_t yyscanner) -{ - return (void *) malloc( size ); -} - -void *_mesa_glsl_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) -{ - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void _mesa_glsl_free (void * ptr , yyscan_t yyscanner) -{ - free( (char *) ptr ); /* see _mesa_glsl_realloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 482 "glsl_lexer.ll" - - - -int -classify_identifier(struct _mesa_glsl_parse_state *state, const char *name) -{ - if (state->symbols->get_variable(name) || state->symbols->get_function(name)) - return IDENTIFIER; - else if (state->symbols->get_type(name)) - return TYPE_IDENTIFIER; - else - return NEW_IDENTIFIER; -} - -void -_mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state, const char *string) -{ - _mesa_glsl_lex_init_extra(state,& state->scanner); - _mesa_glsl__scan_string(string,state->scanner); -} - -void -_mesa_glsl_lexer_dtor(struct _mesa_glsl_parse_state *state) -{ - _mesa_glsl_lex_destroy(state->scanner); -} - diff --git a/dll/opengl/mesa/src/glsl/glsl_lexer.ll b/dll/opengl/mesa/src/glsl/glsl_lexer.ll deleted file mode 100644 index 936a90726f0..00000000000 --- a/dll/opengl/mesa/src/glsl/glsl_lexer.ll +++ /dev/null @@ -1,506 +0,0 @@ -%{ -/* - * Copyright © 2008, 2009 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ -#include -#include -#include "strtod.h" -#include "ast.h" -#include "glsl_parser_extras.h" -#include "glsl_parser.h" - -static int classify_identifier(struct _mesa_glsl_parse_state *, const char *); - -#ifdef _MSC_VER -#define YY_NO_UNISTD_H -#endif - -#define YY_USER_ACTION \ - do { \ - yylloc->source = 0; \ - yylloc->first_column = yycolumn + 1; \ - yylloc->first_line = yylineno + 1; \ - yycolumn += yyleng; \ - } while(0); - -#define YY_USER_INIT yylineno = 0; yycolumn = 0; - -/* A macro for handling reserved words and keywords across language versions. - * - * Certain words start out as identifiers, become reserved words in - * later language revisions, and finally become language keywords. - * - * For example, consider the following lexer rule: - * samplerBuffer KEYWORD(130, 140, SAMPLERBUFFER) - * - * This means that "samplerBuffer" will be treated as: - * - a keyword (SAMPLERBUFFER token) ...in GLSL >= 1.40 - * - a reserved word - error ...in GLSL >= 1.30 - * - an identifier ...in GLSL < 1.30 - */ -#define KEYWORD(reserved_version, allowed_version, token) \ - do { \ - if (yyextra->language_version >= allowed_version) { \ - return token; \ - } else if (yyextra->language_version >= reserved_version) { \ - _mesa_glsl_error(yylloc, yyextra, \ - "Illegal use of reserved word `%s'", yytext); \ - return ERROR_TOK; \ - } else { \ - yylval->identifier = strdup(yytext); \ - return classify_identifier(yyextra, yytext); \ - } \ - } while (0) - -/* The ES macro can be used in KEYWORD checks: - * - * word KEYWORD(110 || ES, 400, TOKEN) - * ...means the word is reserved in GLSL ES 1.00, while - * - * word KEYWORD(110, 130 || ES, TOKEN) - * ...means the word is a legal keyword in GLSL ES 1.00. - */ -#define ES yyextra->es_shader - -static int -literal_integer(char *text, int len, struct _mesa_glsl_parse_state *state, - YYSTYPE *lval, YYLTYPE *lloc, int base) -{ - bool is_uint = (text[len - 1] == 'u' || - text[len - 1] == 'U'); - const char *digits = text; - - /* Skip "0x" */ - if (base == 16) - digits += 2; - -#ifdef _MSC_VER - unsigned __int64 value = _strtoui64(digits, NULL, base); -#else - unsigned long long value = strtoull(digits, NULL, base); -#endif - - lval->n = (int)value; - - if (value > UINT_MAX) { - /* Note that signed 0xffffffff is valid, not out of range! */ - if (state->language_version >= 130) { - _mesa_glsl_error(lloc, state, - "Literal value `%s' out of range", text); - } else { - _mesa_glsl_warning(lloc, state, - "Literal value `%s' out of range", text); - } - } else if (base == 10 && !is_uint && (unsigned)value > (unsigned)INT_MAX + 1) { - /* Tries to catch unintentionally providing a negative value. - * Note that -2147483648 is parsed as -(2147483648), so we don't - * want to warn for INT_MAX. - */ - _mesa_glsl_warning(lloc, state, - "Signed literal value `%s' is interpreted as %d", - text, lval->n); - } - return is_uint ? UINTCONSTANT : INTCONSTANT; -} - -#define LITERAL_INTEGER(base) \ - literal_integer(yytext, yyleng, yyextra, yylval, yylloc, base) - -%} - -%option bison-bridge bison-locations reentrant noyywrap -%option nounput noyy_top_state -%option never-interactive -%option prefix="_mesa_glsl_" -%option extra-type="struct _mesa_glsl_parse_state *" - -%x PP PRAGMA - -DEC_INT [1-9][0-9]* -HEX_INT 0[xX][0-9a-fA-F]+ -OCT_INT 0[0-7]* -INT ({DEC_INT}|{HEX_INT}|{OCT_INT}) -SPC [ \t]* -SPCP [ \t]+ -HASH ^{SPC}#{SPC} -%% - -[ \r\t]+ ; - - /* Preprocessor tokens. */ -^[ \t]*#[ \t]*$ ; -^[ \t]*#[ \t]*version { BEGIN PP; return VERSION_TOK; } -^[ \t]*#[ \t]*extension { BEGIN PP; return EXTENSION; } -{HASH}line{SPCP}{INT}{SPCP}{INT}{SPC}$ { - /* Eat characters until the first digit is - * encountered - */ - char *ptr = yytext; - while (!isdigit(*ptr)) - ptr++; - - /* Subtract one from the line number because - * yylineno is zero-based instead of - * one-based. - */ - yylineno = strtol(ptr, &ptr, 0) - 1; - yylloc->source = strtol(ptr, NULL, 0); - } -{HASH}line{SPCP}{INT}{SPC}$ { - /* Eat characters until the first digit is - * encountered - */ - char *ptr = yytext; - while (!isdigit(*ptr)) - ptr++; - - /* Subtract one from the line number because - * yylineno is zero-based instead of - * one-based. - */ - yylineno = strtol(ptr, &ptr, 0) - 1; - } -^{SPC}#{SPC}pragma{SPCP}debug{SPC}\({SPC}on{SPC}\) { - BEGIN PP; - return PRAGMA_DEBUG_ON; - } -^{SPC}#{SPC}pragma{SPCP}debug{SPC}\({SPC}off{SPC}\) { - BEGIN PP; - return PRAGMA_DEBUG_OFF; - } -^{SPC}#{SPC}pragma{SPCP}optimize{SPC}\({SPC}on{SPC}\) { - BEGIN PP; - return PRAGMA_OPTIMIZE_ON; - } -^{SPC}#{SPC}pragma{SPCP}optimize{SPC}\({SPC}off{SPC}\) { - BEGIN PP; - return PRAGMA_OPTIMIZE_OFF; - } -^{SPC}#{SPC}pragma{SPCP}STDGL{SPCP}invariant{SPC}\({SPC}all{SPC}\) { - BEGIN PP; - return PRAGMA_INVARIANT_ALL; - } -^{SPC}#{SPC}pragma{SPCP} { BEGIN PRAGMA; } - -\n { BEGIN 0; yylineno++; yycolumn = 0; } -. { } - -\/\/[^\n]* { } -[ \t\r]* { } -: return COLON; -[_a-zA-Z][_a-zA-Z0-9]* { - yylval->identifier = strdup(yytext); - return IDENTIFIER; - } -[1-9][0-9]* { - yylval->n = strtol(yytext, NULL, 10); - return INTCONSTANT; - } -\n { BEGIN 0; yylineno++; yycolumn = 0; return EOL; } - -\n { yylineno++; yycolumn = 0; } - -attribute return ATTRIBUTE; -const return CONST_TOK; -bool return BOOL_TOK; -float return FLOAT_TOK; -int return INT_TOK; -uint KEYWORD(130, 130, UINT_TOK); - -break return BREAK; -continue return CONTINUE; -do return DO; -while return WHILE; -else return ELSE; -for return FOR; -if return IF; -discard return DISCARD; -return return RETURN; - -bvec2 return BVEC2; -bvec3 return BVEC3; -bvec4 return BVEC4; -ivec2 return IVEC2; -ivec3 return IVEC3; -ivec4 return IVEC4; -uvec2 KEYWORD(130, 130, UVEC2); -uvec3 KEYWORD(130, 130, UVEC3); -uvec4 KEYWORD(130, 130, UVEC4); -vec2 return VEC2; -vec3 return VEC3; -vec4 return VEC4; -mat2 return MAT2X2; -mat3 return MAT3X3; -mat4 return MAT4X4; -mat2x2 KEYWORD(120, 120, MAT2X2); -mat2x3 KEYWORD(120, 120, MAT2X3); -mat2x4 KEYWORD(120, 120, MAT2X4); -mat3x2 KEYWORD(120, 120, MAT3X2); -mat3x3 KEYWORD(120, 120, MAT3X3); -mat3x4 KEYWORD(120, 120, MAT3X4); -mat4x2 KEYWORD(120, 120, MAT4X2); -mat4x3 KEYWORD(120, 120, MAT4X3); -mat4x4 KEYWORD(120, 120, MAT4X4); - -in return IN_TOK; -out return OUT_TOK; -inout return INOUT_TOK; -uniform return UNIFORM; -varying return VARYING; -centroid KEYWORD(120, 120, CENTROID); -invariant KEYWORD(120 || ES, 120 || ES, INVARIANT); -flat KEYWORD(130 || ES, 130, FLAT); -smooth KEYWORD(130, 130, SMOOTH); -noperspective KEYWORD(130, 130, NOPERSPECTIVE); - -sampler1D return SAMPLER1D; -sampler2D return SAMPLER2D; -sampler3D return SAMPLER3D; -samplerCube return SAMPLERCUBE; -sampler1DArray KEYWORD(130, 130, SAMPLER1DARRAY); -sampler2DArray KEYWORD(130, 130, SAMPLER2DARRAY); -sampler1DShadow return SAMPLER1DSHADOW; -sampler2DShadow return SAMPLER2DSHADOW; -samplerCubeShadow KEYWORD(130, 130, SAMPLERCUBESHADOW); -sampler1DArrayShadow KEYWORD(130, 130, SAMPLER1DARRAYSHADOW); -sampler2DArrayShadow KEYWORD(130, 130, SAMPLER2DARRAYSHADOW); -isampler1D KEYWORD(130, 130, ISAMPLER1D); -isampler2D KEYWORD(130, 130, ISAMPLER2D); -isampler3D KEYWORD(130, 130, ISAMPLER3D); -isamplerCube KEYWORD(130, 130, ISAMPLERCUBE); -isampler1DArray KEYWORD(130, 130, ISAMPLER1DARRAY); -isampler2DArray KEYWORD(130, 130, ISAMPLER2DARRAY); -usampler1D KEYWORD(130, 130, USAMPLER1D); -usampler2D KEYWORD(130, 130, USAMPLER2D); -usampler3D KEYWORD(130, 130, USAMPLER3D); -usamplerCube KEYWORD(130, 130, USAMPLERCUBE); -usampler1DArray KEYWORD(130, 130, USAMPLER1DARRAY); -usampler2DArray KEYWORD(130, 130, USAMPLER2DARRAY); - -samplerExternalOES { - if (yyextra->OES_EGL_image_external_enable) - return SAMPLEREXTERNALOES; - else - return IDENTIFIER; - } - - -struct return STRUCT; -void return VOID_TOK; - -layout { - if ((yyextra->language_version >= 140) - || yyextra->AMD_conservative_depth_enable - || yyextra->ARB_conservative_depth_enable - || yyextra->ARB_explicit_attrib_location_enable - || yyextra->ARB_fragment_coord_conventions_enable) { - return LAYOUT_TOK; - } else { - yylval->identifier = strdup(yytext); - return IDENTIFIER; - } - } - -\+\+ return INC_OP; --- return DEC_OP; -\<= return LE_OP; ->= return GE_OP; -== return EQ_OP; -!= return NE_OP; -&& return AND_OP; -\|\| return OR_OP; -"^^" return XOR_OP; -"<<" return LEFT_OP; -">>" return RIGHT_OP; - -\*= return MUL_ASSIGN; -\/= return DIV_ASSIGN; -\+= return ADD_ASSIGN; -\%= return MOD_ASSIGN; -\<\<= return LEFT_ASSIGN; ->>= return RIGHT_ASSIGN; -&= return AND_ASSIGN; -"^=" return XOR_ASSIGN; -\|= return OR_ASSIGN; --= return SUB_ASSIGN; - -[1-9][0-9]*[uU]? { - return LITERAL_INTEGER(10); - } -0[xX][0-9a-fA-F]+[uU]? { - return LITERAL_INTEGER(16); - } -0[0-7]*[uU]? { - return LITERAL_INTEGER(8); - } - -[0-9]+\.[0-9]+([eE][+-]?[0-9]+)?[fF]? { - yylval->real = glsl_strtod(yytext, NULL); - return FLOATCONSTANT; - } -\.[0-9]+([eE][+-]?[0-9]+)?[fF]? { - yylval->real = glsl_strtod(yytext, NULL); - return FLOATCONSTANT; - } -[0-9]+\.([eE][+-]?[0-9]+)?[fF]? { - yylval->real = glsl_strtod(yytext, NULL); - return FLOATCONSTANT; - } -[0-9]+[eE][+-]?[0-9]+[fF]? { - yylval->real = glsl_strtod(yytext, NULL); - return FLOATCONSTANT; - } -[0-9]+[fF] { - yylval->real = glsl_strtod(yytext, NULL); - return FLOATCONSTANT; - } - -true { - yylval->n = 1; - return BOOLCONSTANT; - } -false { - yylval->n = 0; - return BOOLCONSTANT; - } - - - /* Reserved words in GLSL 1.10. */ -asm KEYWORD(110 || ES, 999, ASM); -class KEYWORD(110 || ES, 999, CLASS); -union KEYWORD(110 || ES, 999, UNION); -enum KEYWORD(110 || ES, 999, ENUM); -typedef KEYWORD(110 || ES, 999, TYPEDEF); -template KEYWORD(110 || ES, 999, TEMPLATE); -this KEYWORD(110 || ES, 999, THIS); -packed KEYWORD(110 || ES, 999, PACKED_TOK); -goto KEYWORD(110 || ES, 999, GOTO); -switch KEYWORD(110 || ES, 130, SWITCH); -default KEYWORD(110 || ES, 130, DEFAULT); -inline KEYWORD(110 || ES, 999, INLINE_TOK); -noinline KEYWORD(110 || ES, 999, NOINLINE); -volatile KEYWORD(110 || ES, 999, VOLATILE); -public KEYWORD(110 || ES, 999, PUBLIC_TOK); -static KEYWORD(110 || ES, 999, STATIC); -extern KEYWORD(110 || ES, 999, EXTERN); -external KEYWORD(110 || ES, 999, EXTERNAL); -interface KEYWORD(110 || ES, 999, INTERFACE); -long KEYWORD(110 || ES, 999, LONG_TOK); -short KEYWORD(110 || ES, 999, SHORT_TOK); -double KEYWORD(110 || ES, 400, DOUBLE_TOK); -half KEYWORD(110 || ES, 999, HALF); -fixed KEYWORD(110 || ES, 999, FIXED_TOK); -unsigned KEYWORD(110 || ES, 999, UNSIGNED); -input KEYWORD(110 || ES, 999, INPUT_TOK); -output KEYWORD(110 || ES, 999, OUTPUT); -hvec2 KEYWORD(110 || ES, 999, HVEC2); -hvec3 KEYWORD(110 || ES, 999, HVEC3); -hvec4 KEYWORD(110 || ES, 999, HVEC4); -dvec2 KEYWORD(110 || ES, 400, DVEC2); -dvec3 KEYWORD(110 || ES, 400, DVEC3); -dvec4 KEYWORD(110 || ES, 400, DVEC4); -fvec2 KEYWORD(110 || ES, 999, FVEC2); -fvec3 KEYWORD(110 || ES, 999, FVEC3); -fvec4 KEYWORD(110 || ES, 999, FVEC4); -sampler2DRect return SAMPLER2DRECT; -sampler3DRect KEYWORD(110 || ES, 999, SAMPLER3DRECT); -sampler2DRectShadow return SAMPLER2DRECTSHADOW; -sizeof KEYWORD(110 || ES, 999, SIZEOF); -cast KEYWORD(110 || ES, 999, CAST); -namespace KEYWORD(110 || ES, 999, NAMESPACE); -using KEYWORD(110 || ES, 999, USING); - - /* Additional reserved words in GLSL 1.20. */ -lowp KEYWORD(120, 130 || ES, LOWP); -mediump KEYWORD(120, 130 || ES, MEDIUMP); -highp KEYWORD(120, 130 || ES, HIGHP); -precision KEYWORD(120, 130 || ES, PRECISION); - - /* Additional reserved words in GLSL 1.30. */ -case KEYWORD(130, 130, CASE); -common KEYWORD(130, 999, COMMON); -partition KEYWORD(130, 999, PARTITION); -active KEYWORD(130, 999, ACTIVE); -superp KEYWORD(130 || ES, 999, SUPERP); -samplerBuffer KEYWORD(130, 140, SAMPLERBUFFER); -filter KEYWORD(130, 999, FILTER); -image1D KEYWORD(130, 999, IMAGE1D); -image2D KEYWORD(130, 999, IMAGE2D); -image3D KEYWORD(130, 999, IMAGE3D); -imageCube KEYWORD(130, 999, IMAGECUBE); -iimage1D KEYWORD(130, 999, IIMAGE1D); -iimage2D KEYWORD(130, 999, IIMAGE2D); -iimage3D KEYWORD(130, 999, IIMAGE3D); -iimageCube KEYWORD(130, 999, IIMAGECUBE); -uimage1D KEYWORD(130, 999, UIMAGE1D); -uimage2D KEYWORD(130, 999, UIMAGE2D); -uimage3D KEYWORD(130, 999, UIMAGE3D); -uimageCube KEYWORD(130, 999, UIMAGECUBE); -image1DArray KEYWORD(130, 999, IMAGE1DARRAY); -image2DArray KEYWORD(130, 999, IMAGE2DARRAY); -iimage1DArray KEYWORD(130, 999, IIMAGE1DARRAY); -iimage2DArray KEYWORD(130, 999, IIMAGE2DARRAY); -uimage1DArray KEYWORD(130, 999, UIMAGE1DARRAY); -uimage2DArray KEYWORD(130, 999, UIMAGE2DARRAY); -image1DShadow KEYWORD(130, 999, IMAGE1DSHADOW); -image2DShadow KEYWORD(130, 999, IMAGE2DSHADOW); -image1DArrayShadow KEYWORD(130, 999, IMAGE1DARRAYSHADOW); -image2DArrayShadow KEYWORD(130, 999, IMAGE2DARRAYSHADOW); -imageBuffer KEYWORD(130, 999, IMAGEBUFFER); -iimageBuffer KEYWORD(130, 999, IIMAGEBUFFER); -uimageBuffer KEYWORD(130, 999, UIMAGEBUFFER); -row_major KEYWORD(130, 999, ROW_MAJOR); - -[_a-zA-Z][_a-zA-Z0-9]* { - struct _mesa_glsl_parse_state *state = yyextra; - void *ctx = state; - yylval->identifier = ralloc_strdup(ctx, yytext); - return classify_identifier(state, yytext); - } - -. { return yytext[0]; } - -%% - -int -classify_identifier(struct _mesa_glsl_parse_state *state, const char *name) -{ - if (state->symbols->get_variable(name) || state->symbols->get_function(name)) - return IDENTIFIER; - else if (state->symbols->get_type(name)) - return TYPE_IDENTIFIER; - else - return NEW_IDENTIFIER; -} - -void -_mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state, const char *string) -{ - yylex_init_extra(state, & state->scanner); - yy_scan_string(string, state->scanner); -} - -void -_mesa_glsl_lexer_dtor(struct _mesa_glsl_parse_state *state) -{ - yylex_destroy(state->scanner); -} diff --git a/dll/opengl/mesa/src/glsl/glsl_parser.cpp b/dll/opengl/mesa/src/glsl/glsl_parser.cpp deleted file mode 100644 index 56cee32d1f9..00000000000 --- a/dll/opengl/mesa/src/glsl/glsl_parser.cpp +++ /dev/null @@ -1,5640 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.4.3. */ - -/* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2009, 2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.4.3" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 1 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - -/* Using locations. */ -#define YYLSP_NEEDED 1 - -/* Substitute the variable and function names. */ -#define yyparse _mesa_glsl_parse -#define yylex _mesa_glsl_lex -#define yyerror _mesa_glsl_error -#define yylval _mesa_glsl_lval -#define yychar _mesa_glsl_char -#define yydebug _mesa_glsl_debug -#define yynerrs _mesa_glsl_nerrs -#define yylloc _mesa_glsl_lloc - -/* Copy the first part of user declarations. */ - -/* Line 189 of yacc.c */ -#line 1 "glsl_parser.yy" - -/* - * Copyright © 2008, 2009 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ -#include -#include -#include -#include - -#include "ast.h" -#include "glsl_parser_extras.h" -#include "glsl_types.h" - -#define YYLEX_PARAM state->scanner - -#undef yyerror - -static void yyerror(YYLTYPE *loc, _mesa_glsl_parse_state *st, const char *msg) -{ - _mesa_glsl_error(loc, st, "%s", msg); -} - - -/* Line 189 of yacc.c */ -#line 123 "glsl_parser.cpp" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 1 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - ATTRIBUTE = 258, - CONST_TOK = 259, - BOOL_TOK = 260, - FLOAT_TOK = 261, - INT_TOK = 262, - UINT_TOK = 263, - BREAK = 264, - CONTINUE = 265, - DO = 266, - ELSE = 267, - FOR = 268, - IF = 269, - DISCARD = 270, - RETURN = 271, - SWITCH = 272, - CASE = 273, - DEFAULT = 274, - BVEC2 = 275, - BVEC3 = 276, - BVEC4 = 277, - IVEC2 = 278, - IVEC3 = 279, - IVEC4 = 280, - UVEC2 = 281, - UVEC3 = 282, - UVEC4 = 283, - VEC2 = 284, - VEC3 = 285, - VEC4 = 286, - CENTROID = 287, - IN_TOK = 288, - OUT_TOK = 289, - INOUT_TOK = 290, - UNIFORM = 291, - VARYING = 292, - NOPERSPECTIVE = 293, - FLAT = 294, - SMOOTH = 295, - MAT2X2 = 296, - MAT2X3 = 297, - MAT2X4 = 298, - MAT3X2 = 299, - MAT3X3 = 300, - MAT3X4 = 301, - MAT4X2 = 302, - MAT4X3 = 303, - MAT4X4 = 304, - SAMPLER1D = 305, - SAMPLER2D = 306, - SAMPLER3D = 307, - SAMPLERCUBE = 308, - SAMPLER1DSHADOW = 309, - SAMPLER2DSHADOW = 310, - SAMPLERCUBESHADOW = 311, - SAMPLER1DARRAY = 312, - SAMPLER2DARRAY = 313, - SAMPLER1DARRAYSHADOW = 314, - SAMPLER2DARRAYSHADOW = 315, - ISAMPLER1D = 316, - ISAMPLER2D = 317, - ISAMPLER3D = 318, - ISAMPLERCUBE = 319, - ISAMPLER1DARRAY = 320, - ISAMPLER2DARRAY = 321, - USAMPLER1D = 322, - USAMPLER2D = 323, - USAMPLER3D = 324, - USAMPLERCUBE = 325, - USAMPLER1DARRAY = 326, - USAMPLER2DARRAY = 327, - SAMPLEREXTERNALOES = 328, - STRUCT = 329, - VOID_TOK = 330, - WHILE = 331, - IDENTIFIER = 332, - TYPE_IDENTIFIER = 333, - NEW_IDENTIFIER = 334, - FLOATCONSTANT = 335, - INTCONSTANT = 336, - UINTCONSTANT = 337, - BOOLCONSTANT = 338, - FIELD_SELECTION = 339, - LEFT_OP = 340, - RIGHT_OP = 341, - INC_OP = 342, - DEC_OP = 343, - LE_OP = 344, - GE_OP = 345, - EQ_OP = 346, - NE_OP = 347, - AND_OP = 348, - OR_OP = 349, - XOR_OP = 350, - MUL_ASSIGN = 351, - DIV_ASSIGN = 352, - ADD_ASSIGN = 353, - MOD_ASSIGN = 354, - LEFT_ASSIGN = 355, - RIGHT_ASSIGN = 356, - AND_ASSIGN = 357, - XOR_ASSIGN = 358, - OR_ASSIGN = 359, - SUB_ASSIGN = 360, - INVARIANT = 361, - LOWP = 362, - MEDIUMP = 363, - HIGHP = 364, - SUPERP = 365, - PRECISION = 366, - VERSION_TOK = 367, - EXTENSION = 368, - LINE = 369, - COLON = 370, - EOL = 371, - INTERFACE = 372, - OUTPUT = 373, - PRAGMA_DEBUG_ON = 374, - PRAGMA_DEBUG_OFF = 375, - PRAGMA_OPTIMIZE_ON = 376, - PRAGMA_OPTIMIZE_OFF = 377, - PRAGMA_INVARIANT_ALL = 378, - LAYOUT_TOK = 379, - ASM = 380, - CLASS = 381, - UNION = 382, - ENUM = 383, - TYPEDEF = 384, - TEMPLATE = 385, - THIS = 386, - PACKED_TOK = 387, - GOTO = 388, - INLINE_TOK = 389, - NOINLINE = 390, - VOLATILE = 391, - PUBLIC_TOK = 392, - STATIC = 393, - EXTERN = 394, - EXTERNAL = 395, - LONG_TOK = 396, - SHORT_TOK = 397, - DOUBLE_TOK = 398, - HALF = 399, - FIXED_TOK = 400, - UNSIGNED = 401, - INPUT_TOK = 402, - OUPTUT = 403, - HVEC2 = 404, - HVEC3 = 405, - HVEC4 = 406, - DVEC2 = 407, - DVEC3 = 408, - DVEC4 = 409, - FVEC2 = 410, - FVEC3 = 411, - FVEC4 = 412, - SAMPLER2DRECT = 413, - SAMPLER3DRECT = 414, - SAMPLER2DRECTSHADOW = 415, - SIZEOF = 416, - CAST = 417, - NAMESPACE = 418, - USING = 419, - ERROR_TOK = 420, - COMMON = 421, - PARTITION = 422, - ACTIVE = 423, - SAMPLERBUFFER = 424, - FILTER = 425, - IMAGE1D = 426, - IMAGE2D = 427, - IMAGE3D = 428, - IMAGECUBE = 429, - IMAGE1DARRAY = 430, - IMAGE2DARRAY = 431, - IIMAGE1D = 432, - IIMAGE2D = 433, - IIMAGE3D = 434, - IIMAGECUBE = 435, - IIMAGE1DARRAY = 436, - IIMAGE2DARRAY = 437, - UIMAGE1D = 438, - UIMAGE2D = 439, - UIMAGE3D = 440, - UIMAGECUBE = 441, - UIMAGE1DARRAY = 442, - UIMAGE2DARRAY = 443, - IMAGE1DSHADOW = 444, - IMAGE2DSHADOW = 445, - IMAGEBUFFER = 446, - IIMAGEBUFFER = 447, - UIMAGEBUFFER = 448, - IMAGE1DARRAYSHADOW = 449, - IMAGE2DARRAYSHADOW = 450, - ROW_MAJOR = 451 - }; -#endif - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ - -/* Line 214 of yacc.c */ -#line 58 "glsl_parser.yy" - - int n; - float real; - char *identifier; - - struct ast_type_qualifier type_qualifier; - - ast_node *node; - ast_type_specifier *type_specifier; - ast_fully_specified_type *fully_specified_type; - ast_function *function; - ast_parameter_declarator *parameter_declarator; - ast_function_definition *function_definition; - ast_compound_statement *compound_statement; - ast_expression *expression; - ast_declarator_list *declarator_list; - ast_struct_specifier *struct_specifier; - ast_declaration *declaration; - ast_switch_body *switch_body; - ast_case_label *case_label; - ast_case_label_list *case_label_list; - ast_case_statement *case_statement; - ast_case_statement_list *case_statement_list; - - struct { - ast_node *cond; - ast_expression *rest; - } for_rest_statement; - - struct { - ast_node *then_statement; - ast_node *else_statement; - } selection_rest_statement; - - - -/* Line 214 of yacc.c */ -#line 392 "glsl_parser.cpp" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 -#endif - - -/* Copy the second part of user declarations. */ - - -/* Line 264 of yacc.c */ -#line 417 "glsl_parser.cpp" - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) -#else -# define YYUSE(e) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; -#endif -{ - return yyi; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined _STDLIB_H \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM) - -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 5 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 3941 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 221 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 97 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 299 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 445 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 451 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 205, 2, 2, 2, 209, 212, 2, - 197, 198, 207, 203, 202, 204, 201, 208, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 216, 218, - 210, 217, 211, 215, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 199, 2, 200, 213, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 219, 214, 220, 206, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 196 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 4, 9, 10, 14, 17, 20, 23, - 26, 29, 30, 33, 35, 37, 39, 45, 47, 50, - 52, 54, 56, 58, 60, 62, 64, 68, 70, 75, - 77, 81, 84, 87, 89, 91, 93, 97, 100, 103, - 106, 108, 111, 115, 118, 120, 122, 124, 127, 130, - 133, 135, 138, 142, 145, 147, 150, 153, 156, 158, - 160, 162, 164, 166, 170, 174, 178, 180, 184, 188, - 190, 194, 198, 200, 204, 208, 212, 216, 218, 222, - 226, 228, 232, 234, 238, 240, 244, 246, 250, 252, - 256, 258, 262, 264, 270, 272, 276, 278, 280, 282, - 284, 286, 288, 290, 292, 294, 296, 298, 300, 304, - 306, 309, 312, 317, 320, 322, 324, 327, 331, 335, - 338, 344, 348, 351, 355, 358, 359, 361, 363, 365, - 367, 369, 373, 379, 386, 394, 403, 409, 411, 414, - 419, 425, 432, 440, 445, 448, 450, 453, 458, 460, - 464, 466, 470, 472, 474, 476, 478, 480, 482, 485, - 487, 490, 493, 497, 499, 501, 503, 505, 508, 510, - 512, 515, 518, 520, 522, 525, 527, 531, 536, 538, - 540, 542, 544, 546, 548, 550, 552, 554, 556, 558, - 560, 562, 564, 566, 568, 570, 572, 574, 576, 578, - 580, 582, 584, 586, 588, 590, 592, 594, 596, 598, - 600, 602, 604, 606, 608, 610, 612, 614, 616, 618, - 620, 622, 624, 626, 628, 630, 632, 634, 636, 638, - 640, 642, 644, 646, 648, 650, 652, 658, 663, 665, - 668, 672, 674, 678, 680, 685, 687, 689, 691, 693, - 695, 697, 699, 701, 703, 705, 708, 709, 714, 716, - 718, 721, 725, 727, 730, 732, 735, 741, 745, 747, - 749, 754, 760, 763, 767, 771, 774, 776, 779, 782, - 785, 787, 790, 796, 804, 811, 813, 815, 817, 818, - 821, 825, 828, 831, 834, 838, 841, 843, 845, 847 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int16 yyrhs[] = -{ - 222, 0, -1, -1, 224, 226, 223, 229, -1, -1, - 112, 81, 116, -1, 119, 116, -1, 120, 116, -1, - 121, 116, -1, 122, 116, -1, 123, 116, -1, -1, - 226, 228, -1, 77, -1, 78, -1, 79, -1, 113, - 227, 115, 227, 116, -1, 316, -1, 229, 316, -1, - 77, -1, 79, -1, 230, -1, 81, -1, 82, -1, - 80, -1, 83, -1, 197, 261, 198, -1, 231, -1, - 232, 199, 233, 200, -1, 234, -1, 232, 201, 227, - -1, 232, 87, -1, 232, 88, -1, 261, -1, 235, - -1, 236, -1, 232, 201, 241, -1, 238, 198, -1, - 237, 198, -1, 239, 75, -1, 239, -1, 239, 259, - -1, 238, 202, 259, -1, 240, 197, -1, 282, -1, - 230, -1, 84, -1, 243, 198, -1, 242, 198, -1, - 244, 75, -1, 244, -1, 244, 259, -1, 243, 202, - 259, -1, 230, 197, -1, 232, -1, 87, 245, -1, - 88, 245, -1, 246, 245, -1, 203, -1, 204, -1, - 205, -1, 206, -1, 245, -1, 247, 207, 245, -1, - 247, 208, 245, -1, 247, 209, 245, -1, 247, -1, - 248, 203, 247, -1, 248, 204, 247, -1, 248, -1, - 249, 85, 248, -1, 249, 86, 248, -1, 249, -1, - 250, 210, 249, -1, 250, 211, 249, -1, 250, 89, - 249, -1, 250, 90, 249, -1, 250, -1, 251, 91, - 250, -1, 251, 92, 250, -1, 251, -1, 252, 212, - 251, -1, 252, -1, 253, 213, 252, -1, 253, -1, - 254, 214, 253, -1, 254, -1, 255, 93, 254, -1, - 255, -1, 256, 95, 255, -1, 256, -1, 257, 94, - 256, -1, 257, -1, 257, 215, 261, 216, 259, -1, - 258, -1, 245, 260, 259, -1, 217, -1, 96, -1, - 97, -1, 99, -1, 98, -1, 105, -1, 100, -1, - 101, -1, 102, -1, 103, -1, 104, -1, 259, -1, - 261, 202, 259, -1, 258, -1, 264, 218, -1, 272, - 218, -1, 111, 286, 283, 218, -1, 265, 198, -1, - 267, -1, 266, -1, 267, 269, -1, 266, 202, 269, - -1, 274, 230, 197, -1, 282, 227, -1, 282, 227, - 199, 262, 200, -1, 279, 270, 268, -1, 270, 268, - -1, 279, 270, 271, -1, 270, 271, -1, -1, 33, - -1, 34, -1, 35, -1, 282, -1, 273, -1, 272, - 202, 227, -1, 272, 202, 227, 199, 200, -1, 272, - 202, 227, 199, 262, 200, -1, 272, 202, 227, 199, - 200, 217, 292, -1, 272, 202, 227, 199, 262, 200, - 217, 292, -1, 272, 202, 227, 217, 292, -1, 274, - -1, 274, 227, -1, 274, 227, 199, 200, -1, 274, - 227, 199, 262, 200, -1, 274, 227, 199, 200, 217, - 292, -1, 274, 227, 199, 262, 200, 217, 292, -1, - 274, 227, 217, 292, -1, 106, 230, -1, 282, -1, - 280, 282, -1, 124, 197, 276, 198, -1, 277, -1, - 276, 202, 277, -1, 227, -1, 227, 217, 81, -1, - 40, -1, 39, -1, 38, -1, 4, -1, 281, -1, - 275, -1, 275, 281, -1, 278, -1, 278, 281, -1, - 106, 281, -1, 106, 278, 281, -1, 106, -1, 4, - -1, 3, -1, 37, -1, 32, 37, -1, 33, -1, - 34, -1, 32, 33, -1, 32, 34, -1, 36, -1, - 283, -1, 286, 283, -1, 284, -1, 284, 199, 200, - -1, 284, 199, 262, 200, -1, 285, -1, 287, -1, - 78, -1, 75, -1, 6, -1, 7, -1, 8, -1, - 5, -1, 29, -1, 30, -1, 31, -1, 20, -1, - 21, -1, 22, -1, 23, -1, 24, -1, 25, -1, - 26, -1, 27, -1, 28, -1, 41, -1, 42, -1, - 43, -1, 44, -1, 45, -1, 46, -1, 47, -1, - 48, -1, 49, -1, 50, -1, 51, -1, 158, -1, - 52, -1, 53, -1, 73, -1, 54, -1, 55, -1, - 160, -1, 56, -1, 57, -1, 58, -1, 59, -1, - 60, -1, 61, -1, 62, -1, 63, -1, 64, -1, - 65, -1, 66, -1, 67, -1, 68, -1, 69, -1, - 70, -1, 71, -1, 72, -1, 109, -1, 108, -1, - 107, -1, 74, 227, 219, 288, 220, -1, 74, 219, - 288, 220, -1, 289, -1, 288, 289, -1, 282, 290, - 218, -1, 291, -1, 290, 202, 291, -1, 227, -1, - 227, 199, 262, 200, -1, 259, -1, 263, -1, 296, - -1, 295, -1, 293, -1, 301, -1, 302, -1, 305, - -1, 311, -1, 315, -1, 219, 220, -1, -1, 219, - 297, 300, 220, -1, 299, -1, 295, -1, 219, 220, - -1, 219, 300, 220, -1, 294, -1, 300, 294, -1, - 218, -1, 261, 218, -1, 14, 197, 261, 198, 303, - -1, 294, 12, 294, -1, 294, -1, 261, -1, 274, - 227, 217, 292, -1, 17, 197, 261, 198, 306, -1, - 219, 220, -1, 219, 310, 220, -1, 18, 261, 216, - -1, 19, 216, -1, 307, -1, 308, 307, -1, 308, - 294, -1, 309, 294, -1, 309, -1, 310, 309, -1, - 76, 197, 304, 198, 298, -1, 11, 294, 76, 197, - 261, 198, 218, -1, 13, 197, 312, 314, 198, 298, - -1, 301, -1, 293, -1, 304, -1, -1, 313, 218, - -1, 313, 218, 261, -1, 10, 218, -1, 9, 218, - -1, 16, 218, -1, 16, 261, 218, -1, 15, 218, - -1, 317, -1, 263, -1, 225, -1, 264, 299, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 236, 236, 235, 247, 249, 289, 290, 291, 292, - 293, 305, 307, 311, 312, 313, 317, 326, 334, 345, - 346, 350, 357, 364, 371, 378, 385, 392, 393, 399, - 403, 410, 416, 425, 429, 433, 434, 443, 444, 448, - 449, 453, 459, 471, 475, 481, 488, 498, 499, 503, - 504, 508, 514, 526, 537, 538, 544, 550, 560, 561, - 562, 563, 567, 568, 574, 580, 589, 590, 596, 605, - 606, 612, 621, 622, 628, 634, 640, 649, 650, 656, - 665, 666, 675, 676, 685, 686, 695, 696, 705, 706, - 715, 716, 725, 726, 735, 736, 745, 746, 747, 748, - 749, 750, 751, 752, 753, 754, 755, 759, 763, 779, - 783, 788, 792, 801, 805, 806, 810, 815, 823, 837, - 847, 862, 869, 874, 885, 898, 901, 906, 911, 920, - 924, 925, 935, 945, 955, 965, 975, 989, 996, 1005, - 1014, 1023, 1032, 1041, 1050, 1064, 1071, 1082, 1089, 1090, - 1109, 1168, 1209, 1214, 1219, 1227, 1235, 1236, 1237, 1242, - 1243, 1248, 1253, 1259, 1267, 1272, 1277, 1282, 1288, 1293, - 1298, 1303, 1308, 1316, 1320, 1328, 1329, 1335, 1344, 1350, - 1356, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, - 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383, - 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 1393, - 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, - 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, 1412, 1413, - 1414, 1415, 1416, 1420, 1430, 1440, 1453, 1460, 1469, 1474, - 1482, 1497, 1502, 1510, 1517, 1526, 1530, 1536, 1537, 1541, - 1542, 1543, 1544, 1545, 1546, 1550, 1557, 1556, 1570, 1571, - 1575, 1581, 1590, 1600, 1612, 1618, 1627, 1636, 1641, 1649, - 1653, 1671, 1679, 1684, 1692, 1697, 1705, 1713, 1721, 1729, - 1737, 1745, 1753, 1760, 1767, 1777, 1778, 1782, 1784, 1790, - 1795, 1804, 1810, 1816, 1822, 1828, 1837, 1838, 1839, 1843 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "ATTRIBUTE", "CONST_TOK", "BOOL_TOK", - "FLOAT_TOK", "INT_TOK", "UINT_TOK", "BREAK", "CONTINUE", "DO", "ELSE", - "FOR", "IF", "DISCARD", "RETURN", "SWITCH", "CASE", "DEFAULT", "BVEC2", - "BVEC3", "BVEC4", "IVEC2", "IVEC3", "IVEC4", "UVEC2", "UVEC3", "UVEC4", - "VEC2", "VEC3", "VEC4", "CENTROID", "IN_TOK", "OUT_TOK", "INOUT_TOK", - "UNIFORM", "VARYING", "NOPERSPECTIVE", "FLAT", "SMOOTH", "MAT2X2", - "MAT2X3", "MAT2X4", "MAT3X2", "MAT3X3", "MAT3X4", "MAT4X2", "MAT4X3", - "MAT4X4", "SAMPLER1D", "SAMPLER2D", "SAMPLER3D", "SAMPLERCUBE", - "SAMPLER1DSHADOW", "SAMPLER2DSHADOW", "SAMPLERCUBESHADOW", - "SAMPLER1DARRAY", "SAMPLER2DARRAY", "SAMPLER1DARRAYSHADOW", - "SAMPLER2DARRAYSHADOW", "ISAMPLER1D", "ISAMPLER2D", "ISAMPLER3D", - "ISAMPLERCUBE", "ISAMPLER1DARRAY", "ISAMPLER2DARRAY", "USAMPLER1D", - "USAMPLER2D", "USAMPLER3D", "USAMPLERCUBE", "USAMPLER1DARRAY", - "USAMPLER2DARRAY", "SAMPLEREXTERNALOES", "STRUCT", "VOID_TOK", "WHILE", - "IDENTIFIER", "TYPE_IDENTIFIER", "NEW_IDENTIFIER", "FLOATCONSTANT", - "INTCONSTANT", "UINTCONSTANT", "BOOLCONSTANT", "FIELD_SELECTION", - "LEFT_OP", "RIGHT_OP", "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", - "NE_OP", "AND_OP", "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", - "ADD_ASSIGN", "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", - "XOR_ASSIGN", "OR_ASSIGN", "SUB_ASSIGN", "INVARIANT", "LOWP", "MEDIUMP", - "HIGHP", "SUPERP", "PRECISION", "VERSION_TOK", "EXTENSION", "LINE", - "COLON", "EOL", "INTERFACE", "OUTPUT", "PRAGMA_DEBUG_ON", - "PRAGMA_DEBUG_OFF", "PRAGMA_OPTIMIZE_ON", "PRAGMA_OPTIMIZE_OFF", - "PRAGMA_INVARIANT_ALL", "LAYOUT_TOK", "ASM", "CLASS", "UNION", "ENUM", - "TYPEDEF", "TEMPLATE", "THIS", "PACKED_TOK", "GOTO", "INLINE_TOK", - "NOINLINE", "VOLATILE", "PUBLIC_TOK", "STATIC", "EXTERN", "EXTERNAL", - "LONG_TOK", "SHORT_TOK", "DOUBLE_TOK", "HALF", "FIXED_TOK", "UNSIGNED", - "INPUT_TOK", "OUPTUT", "HVEC2", "HVEC3", "HVEC4", "DVEC2", "DVEC3", - "DVEC4", "FVEC2", "FVEC3", "FVEC4", "SAMPLER2DRECT", "SAMPLER3DRECT", - "SAMPLER2DRECTSHADOW", "SIZEOF", "CAST", "NAMESPACE", "USING", - "ERROR_TOK", "COMMON", "PARTITION", "ACTIVE", "SAMPLERBUFFER", "FILTER", - "IMAGE1D", "IMAGE2D", "IMAGE3D", "IMAGECUBE", "IMAGE1DARRAY", - "IMAGE2DARRAY", "IIMAGE1D", "IIMAGE2D", "IIMAGE3D", "IIMAGECUBE", - "IIMAGE1DARRAY", "IIMAGE2DARRAY", "UIMAGE1D", "UIMAGE2D", "UIMAGE3D", - "UIMAGECUBE", "UIMAGE1DARRAY", "UIMAGE2DARRAY", "IMAGE1DSHADOW", - "IMAGE2DSHADOW", "IMAGEBUFFER", "IIMAGEBUFFER", "UIMAGEBUFFER", - "IMAGE1DARRAYSHADOW", "IMAGE2DARRAYSHADOW", "ROW_MAJOR", "'('", "')'", - "'['", "']'", "'.'", "','", "'+'", "'-'", "'!'", "'~'", "'*'", "'/'", - "'%'", "'<'", "'>'", "'&'", "'^'", "'|'", "'?'", "':'", "'='", "';'", - "'{'", "'}'", "$accept", "translation_unit", "$@1", "version_statement", - "pragma_statement", "extension_statement_list", "any_identifier", - "extension_statement", "external_declaration_list", - "variable_identifier", "primary_expression", "postfix_expression", - "integer_expression", "function_call", "function_call_or_method", - "function_call_generic", "function_call_header_no_parameters", - "function_call_header_with_parameters", "function_call_header", - "function_identifier", "method_call_generic", - "method_call_header_no_parameters", "method_call_header_with_parameters", - "method_call_header", "unary_expression", "unary_operator", - "multiplicative_expression", "additive_expression", "shift_expression", - "relational_expression", "equality_expression", "and_expression", - "exclusive_or_expression", "inclusive_or_expression", - "logical_and_expression", "logical_xor_expression", - "logical_or_expression", "conditional_expression", - "assignment_expression", "assignment_operator", "expression", - "constant_expression", "declaration", "function_prototype", - "function_declarator", "function_header_with_parameters", - "function_header", "parameter_declarator", "parameter_declaration", - "parameter_qualifier", "parameter_type_specifier", - "init_declarator_list", "single_declaration", "fully_specified_type", - "layout_qualifier", "layout_qualifier_id_list", "layout_qualifier_id", - "interpolation_qualifier", "parameter_type_qualifier", "type_qualifier", - "storage_qualifier", "type_specifier", "type_specifier_no_prec", - "type_specifier_nonarray", "basic_type_specifier_nonarray", - "precision_qualifier", "struct_specifier", "struct_declaration_list", - "struct_declaration", "struct_declarator_list", "struct_declarator", - "initializer", "declaration_statement", "statement", "simple_statement", - "compound_statement", "$@2", "statement_no_new_scope", - "compound_statement_no_new_scope", "statement_list", - "expression_statement", "selection_statement", - "selection_rest_statement", "condition", "switch_statement", - "switch_body", "case_label", "case_label_list", "case_statement", - "case_statement_list", "iteration_statement", "for_init_statement", - "conditionopt", "for_rest_statement", "jump_statement", - "external_declaration", "function_definition", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, - 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, - 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, - 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, - 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, - 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, - 445, 446, 447, 448, 449, 450, 451, 40, 41, 91, - 93, 46, 44, 43, 45, 33, 126, 42, 47, 37, - 60, 62, 38, 94, 124, 63, 58, 61, 59, 123, - 125 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint16 yyr1[] = -{ - 0, 221, 223, 222, 224, 224, 225, 225, 225, 225, - 225, 226, 226, 227, 227, 227, 228, 229, 229, 230, - 230, 231, 231, 231, 231, 231, 231, 232, 232, 232, - 232, 232, 232, 233, 234, 235, 235, 236, 236, 237, - 237, 238, 238, 239, 240, 240, 240, 241, 241, 242, - 242, 243, 243, 244, 245, 245, 245, 245, 246, 246, - 246, 246, 247, 247, 247, 247, 248, 248, 248, 249, - 249, 249, 250, 250, 250, 250, 250, 251, 251, 251, - 252, 252, 253, 253, 254, 254, 255, 255, 256, 256, - 257, 257, 258, 258, 259, 259, 260, 260, 260, 260, - 260, 260, 260, 260, 260, 260, 260, 261, 261, 262, - 263, 263, 263, 264, 265, 265, 266, 266, 267, 268, - 268, 269, 269, 269, 269, 270, 270, 270, 270, 271, - 272, 272, 272, 272, 272, 272, 272, 273, 273, 273, - 273, 273, 273, 273, 273, 274, 274, 275, 276, 276, - 277, 277, 278, 278, 278, 279, 280, 280, 280, 280, - 280, 280, 280, 280, 281, 281, 281, 281, 281, 281, - 281, 281, 281, 282, 282, 283, 283, 283, 284, 284, - 284, 285, 285, 285, 285, 285, 285, 285, 285, 285, - 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, - 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, - 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, - 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, - 285, 285, 285, 286, 286, 286, 287, 287, 288, 288, - 289, 290, 290, 291, 291, 292, 293, 294, 294, 295, - 295, 295, 295, 295, 295, 296, 297, 296, 298, 298, - 299, 299, 300, 300, 301, 301, 302, 303, 303, 304, - 304, 305, 306, 306, 307, 307, 308, 308, 309, 309, - 310, 310, 311, 311, 311, 312, 312, 313, 313, 314, - 314, 315, 315, 315, 315, 315, 316, 316, 316, 317 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 0, 4, 0, 3, 2, 2, 2, 2, - 2, 0, 2, 1, 1, 1, 5, 1, 2, 1, - 1, 1, 1, 1, 1, 1, 3, 1, 4, 1, - 3, 2, 2, 1, 1, 1, 3, 2, 2, 2, - 1, 2, 3, 2, 1, 1, 1, 2, 2, 2, - 1, 2, 3, 2, 1, 2, 2, 2, 1, 1, - 1, 1, 1, 3, 3, 3, 1, 3, 3, 1, - 3, 3, 1, 3, 3, 3, 3, 1, 3, 3, - 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, - 1, 3, 1, 5, 1, 3, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, - 2, 2, 4, 2, 1, 1, 2, 3, 3, 2, - 5, 3, 2, 3, 2, 0, 1, 1, 1, 1, - 1, 3, 5, 6, 7, 8, 5, 1, 2, 4, - 5, 6, 7, 4, 2, 1, 2, 4, 1, 3, - 1, 3, 1, 1, 1, 1, 1, 1, 2, 1, - 2, 2, 3, 1, 1, 1, 1, 2, 1, 1, - 2, 2, 1, 1, 2, 1, 3, 4, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 5, 4, 1, 2, - 3, 1, 3, 1, 4, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 2, 0, 4, 1, 1, - 2, 3, 1, 2, 1, 2, 5, 3, 1, 1, - 4, 5, 2, 3, 3, 2, 1, 2, 2, 2, - 1, 2, 5, 7, 6, 1, 1, 1, 0, 2, - 3, 2, 2, 2, 3, 2, 1, 1, 1, 2 -}; - -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint16 yydefact[] = -{ - 4, 0, 0, 11, 0, 1, 2, 5, 0, 0, - 12, 13, 14, 15, 0, 165, 164, 185, 182, 183, - 184, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 186, 187, 188, 0, 168, 169, 172, 166, 154, 153, - 152, 198, 199, 200, 201, 202, 203, 204, 205, 206, - 207, 208, 210, 211, 213, 214, 216, 217, 218, 219, - 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, - 230, 231, 232, 212, 0, 181, 180, 163, 235, 234, - 233, 0, 0, 0, 0, 0, 0, 0, 209, 215, - 298, 3, 297, 0, 0, 115, 125, 0, 130, 137, - 157, 159, 0, 156, 145, 173, 175, 178, 0, 179, - 17, 296, 0, 170, 171, 167, 0, 0, 19, 20, - 144, 0, 161, 0, 6, 7, 8, 9, 10, 0, - 18, 110, 0, 299, 113, 125, 155, 126, 127, 128, - 116, 0, 125, 0, 111, 13, 15, 138, 0, 158, - 160, 146, 0, 174, 0, 0, 0, 238, 0, 162, - 0, 150, 0, 148, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 24, 22, 23, 25, 46, 0, 0, - 0, 58, 59, 60, 61, 264, 256, 260, 21, 27, - 54, 29, 34, 35, 0, 0, 40, 0, 62, 0, - 66, 69, 72, 77, 80, 82, 84, 86, 88, 90, - 92, 94, 107, 0, 246, 0, 145, 249, 262, 248, - 247, 0, 250, 251, 252, 253, 254, 117, 122, 124, - 129, 0, 131, 0, 0, 118, 176, 62, 109, 0, - 44, 16, 243, 0, 241, 237, 239, 0, 112, 0, - 147, 0, 292, 291, 0, 0, 0, 295, 293, 0, - 0, 0, 55, 56, 0, 255, 0, 31, 32, 0, - 0, 38, 37, 0, 181, 41, 43, 97, 98, 100, - 99, 102, 103, 104, 105, 106, 101, 96, 0, 57, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 265, 261, 263, 119, 121, 123, 0, 0, 139, - 0, 245, 143, 177, 0, 0, 240, 236, 151, 149, - 0, 286, 285, 288, 0, 294, 0, 163, 269, 0, - 0, 26, 0, 0, 33, 30, 0, 36, 0, 0, - 50, 42, 95, 63, 64, 65, 67, 68, 70, 71, - 75, 76, 73, 74, 78, 79, 81, 83, 85, 87, - 89, 91, 0, 108, 0, 132, 0, 136, 0, 140, - 0, 242, 0, 287, 0, 0, 0, 0, 0, 0, - 257, 28, 53, 48, 47, 0, 181, 51, 0, 0, - 0, 133, 141, 0, 244, 0, 289, 0, 268, 266, - 0, 271, 0, 259, 282, 258, 52, 93, 120, 134, - 0, 142, 0, 290, 284, 0, 0, 0, 272, 276, - 0, 280, 0, 270, 135, 283, 267, 0, 275, 278, - 277, 279, 273, 281, 274 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 2, 9, 3, 90, 6, 161, 10, 91, 188, - 189, 190, 343, 191, 192, 193, 194, 195, 196, 197, - 347, 348, 349, 350, 198, 199, 200, 201, 202, 203, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 288, - 213, 239, 214, 215, 94, 95, 96, 228, 140, 141, - 229, 97, 98, 99, 100, 162, 163, 101, 142, 102, - 103, 240, 105, 106, 107, 108, 109, 156, 157, 243, - 244, 322, 217, 218, 219, 220, 266, 414, 415, 221, - 222, 223, 409, 340, 224, 411, 429, 430, 431, 432, - 225, 333, 384, 385, 226, 110, 111 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -355 -static const yytype_int16 yypact[] = -{ - -38, -40, 81, -355, -32, -355, -27, -355, 52, 3587, - -355, -355, -355, -355, -26, -355, -355, -355, -355, -355, - -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, - -355, -355, -355, 38, -355, -355, -355, -355, -355, -355, - -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, - -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, - -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, - -355, -355, -355, -355, -67, -355, -355, 251, -355, -355, - -355, 51, -14, -8, 11, 19, 24, -87, -355, -355, - -355, 3587, -355, -162, -107, -46, 15, -180, -355, 96, - 264, 264, 3707, -355, -355, -355, -57, -355, 3781, -355, - -355, -355, 52, -355, -355, -355, 3707, -48, -355, -355, - -355, 264, -355, 3781, -355, -355, -355, -355, -355, 52, - -355, -355, 422, -355, -355, 29, -355, -355, -355, -355, - -355, 3707, 143, 52, -355, -17, -12, -178, 18, -355, - -355, -355, 2465, -355, 73, 52, 1834, -355, 3707, -355, - 3, 9, -168, -355, 10, 14, 1293, 30, 33, 17, - 2074, 40, 44, -355, -355, -355, -355, -355, 3026, 3026, - 3026, -355, -355, -355, -355, -355, -11, -355, 47, -355, - -60, -355, -355, -355, 49, -125, 3213, 48, 16, 3026, - -25, -138, 12, -66, 46, 37, 45, 36, 158, 164, - -81, -355, -355, -171, -355, 35, 64, -355, -355, -355, - -355, 640, -355, -355, -355, -355, -355, -355, -355, -355, - 52, 3707, -163, 2652, 3026, -355, -355, -355, -355, 65, - -355, -355, 82, -160, -355, -355, -355, 1954, -355, 199, - -355, 52, -355, -355, 210, 1714, 3026, -355, -355, -157, - 3026, 2278, -355, -355, -122, -355, 1293, -355, -355, 3026, - 96, -355, -355, 3026, 94, -355, -355, -355, -355, -355, - -355, -355, -355, -355, -355, -355, -355, -355, 3026, -355, - 3026, 3026, 3026, 3026, 3026, 3026, 3026, 3026, 3026, 3026, - 3026, 3026, 3026, 3026, 3026, 3026, 3026, 3026, 3026, 3026, - 3026, -355, -355, -355, 95, -355, -355, 2839, 3026, 76, - 99, -355, -355, -355, 3026, 52, -355, -355, -355, -355, - 98, -355, -355, 2278, -115, -355, -102, 239, 100, 52, - 105, -355, 858, 104, 100, -355, 108, -355, 109, -76, - 3400, -355, -355, -355, -355, -355, -25, -25, -138, -138, - 12, 12, 12, 12, -66, -66, 46, 37, 45, 36, - 158, 164, -165, -355, 3026, 89, 110, -355, 3026, 91, - 111, -355, 3026, -355, 97, 114, 1293, 90, 102, 1510, - -355, -355, -355, -355, -355, 3026, 115, -355, 3026, 116, - 3026, 103, -355, 3026, -355, -47, 3026, 1510, 302, -355, - -10, -355, 3026, -355, -355, -355, -355, -355, -355, -355, - 3026, -355, 107, 100, -355, 1293, 3026, 101, -355, -355, - 1076, 1293, -2, -355, -355, -355, -355, -147, -355, -355, - -355, -355, -355, 1293, -355 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -355, -355, -355, -355, -355, -355, -7, -355, -355, -59, - -355, -355, -355, -355, -355, -355, -355, -355, -355, -355, - -355, -355, -355, -355, -100, -355, -106, -127, -134, -82, - 20, 22, 26, 21, 27, 13, -355, -145, -164, -355, - -166, -213, -6, 34, -355, -355, -355, 106, 187, 193, - 112, -355, -355, -232, -355, -355, 78, -71, -355, -355, - -75, -9, -64, -355, -355, 255, -355, 180, -141, -355, - 23, -250, 84, -161, -354, -355, -355, -65, 247, 75, - 92, -355, -355, 25, -355, -355, -86, -355, -83, -355, - -355, -355, -355, -355, -355, 254, -355 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -115 -static const yytype_int16 yytable[] = -{ - 104, 14, 122, 92, 259, 254, 121, 238, 426, 427, - 11, 12, 13, 308, 264, 246, 426, 427, 120, 136, - 320, 233, 143, 297, 298, 149, 150, 267, 268, 339, - 250, 310, 275, 136, 251, 413, 317, 310, 144, 234, - 148, 4, 325, 93, 153, 310, 159, 311, 137, 138, - 139, 398, 237, 413, 318, 310, 131, 132, 326, 160, - 313, 335, 137, 138, 139, 293, 294, 117, 377, 444, - 321, 113, 114, 272, 1, 115, 341, 273, 262, 263, - 310, 5, 104, 386, 7, 92, 8, 310, 238, 112, - 334, 134, 147, 151, 336, 338, 387, 295, 296, 289, - 310, 339, 124, 344, 376, 154, 246, 155, 125, 351, - 129, 380, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 394, 216, 352, 93, 395, 126, 402, 11, - 12, 13, 230, 237, 309, 127, 232, 301, 302, 269, - 128, 270, 152, 372, 299, 300, 373, 155, 242, 155, - 419, 422, 116, 421, 321, 310, 135, 216, 78, 79, - 80, 399, 433, 360, 361, 362, 363, 338, 358, 359, - 434, 158, 238, 145, 12, 146, 137, 138, 139, 238, - -19, 313, 290, 291, 292, -20, 397, 356, 357, 241, - 353, 354, 355, 237, 237, 237, 237, 237, 237, 237, - 237, 237, 237, 237, 237, 237, 237, 237, 237, 265, - 428, 346, 216, -114, 321, 235, 405, 237, 442, 364, - 365, 248, 230, 314, 237, 408, 249, 255, 252, 238, - 256, 416, 253, 287, 417, 257, 321, 260, 155, 321, - 423, 261, 15, 16, -45, 276, 216, 271, 321, 303, - 305, 306, 216, 131, 15, 16, 321, 216, 304, 307, - 437, -44, 122, 345, 436, 323, 121, 15, 16, 439, - 441, 33, 34, 35, 237, 36, 37, 38, 39, 40, - 328, 324, 441, 33, 34, 35, 330, 36, 37, 38, - 39, 40, -39, 378, 374, 382, 33, 34, 35, 379, - 36, 37, 310, 389, 391, 392, 400, 393, 403, 410, - 401, 404, 407, -49, 425, 406, 418, 438, 242, 412, - 420, 371, 227, 366, 216, 435, 367, 369, 118, 329, - 119, 368, 388, 216, 370, 231, 123, 315, 247, 331, - 133, 342, 424, 316, 440, 130, 0, 332, 381, 443, - 0, 0, 0, 0, 0, 0, 0, 0, 383, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 216, 0, 0, - 216, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 216, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 216, 0, 0, 0, - 0, 216, 216, 0, 0, 15, 16, 17, 18, 19, - 20, 164, 165, 166, 216, 167, 168, 169, 170, 171, - 0, 0, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 0, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 172, 118, - 76, 119, 173, 174, 175, 176, 177, 0, 0, 178, - 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 77, 78, - 79, 80, 0, 81, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 88, 0, 89, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, - 0, 0, 0, 0, 0, 181, 182, 183, 184, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 185, 186, 187, 15, 16, 17, 18, 19, 20, 164, - 165, 166, 0, 167, 168, 169, 170, 171, 0, 0, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 0, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 172, 118, 76, 119, - 173, 174, 175, 176, 177, 0, 0, 178, 179, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 77, 78, 79, 80, - 0, 81, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 87, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, - 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 180, 0, 0, - 0, 0, 0, 181, 182, 183, 184, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 185, 186, - 312, 15, 16, 17, 18, 19, 20, 164, 165, 166, - 0, 167, 168, 169, 170, 171, 0, 0, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 0, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 172, 118, 76, 119, 173, 174, - 175, 176, 177, 0, 0, 178, 179, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 77, 78, 79, 80, 0, 81, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 88, 0, 89, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 180, 0, 0, 0, 0, - 0, 181, 182, 183, 184, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 185, 186, 390, 15, - 16, 17, 18, 19, 20, 164, 165, 166, 0, 167, - 168, 169, 170, 171, 426, 427, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 0, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 172, 118, 76, 119, 173, 174, 175, 176, - 177, 0, 0, 178, 179, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 77, 78, 79, 80, 0, 81, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 88, 0, 89, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 180, 0, 0, 0, 0, 0, 181, - 182, 183, 184, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 185, 186, 15, 16, 17, 18, - 19, 20, 164, 165, 166, 0, 167, 168, 169, 170, - 171, 0, 0, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 0, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 172, - 118, 76, 119, 173, 174, 175, 176, 177, 0, 0, - 178, 179, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, - 78, 79, 80, 0, 81, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 87, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 88, 0, 89, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 180, 0, 0, 0, 0, 0, 181, 182, 183, 184, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 185, 186, 15, 16, 17, 18, 19, 20, 164, - 165, 166, 0, 167, 168, 169, 170, 171, 0, 0, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 0, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 172, 118, 76, 119, - 173, 174, 175, 176, 177, 0, 0, 178, 179, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 77, 78, 79, 80, - 0, 81, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 87, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, - 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 180, 0, 0, - 0, 0, 0, 181, 182, 183, 184, 15, 16, 17, - 18, 19, 20, 0, 0, 0, 0, 0, 185, 132, - 0, 0, 0, 0, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 0, 118, 76, 119, 173, 174, 175, 176, 177, 0, - 0, 178, 179, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 77, 78, 79, 80, 0, 81, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 87, 17, - 18, 19, 20, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 0, 0, 0, 0, - 0, 0, 88, 0, 89, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 0, 180, 76, 0, 0, 0, 0, 181, 182, 183, - 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 185, 0, 0, 0, 0, 0, 0, 0, - 0, 78, 79, 80, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, - 18, 19, 20, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 0, 0, 0, 0, - 0, 0, 88, 0, 89, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 0, 0, 76, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 245, 0, 0, 0, 0, 0, - 0, 78, 79, 80, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, - 18, 19, 20, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 0, 0, 0, 0, - 0, 0, 88, 0, 89, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 0, 118, 76, 119, 173, 174, 175, 176, 177, 0, - 0, 178, 179, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 327, 0, 0, 0, 0, 0, - 0, 78, 79, 80, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 88, 0, 89, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 180, 0, 0, 0, 0, 0, 181, 182, 183, - 184, 15, 16, 17, 18, 19, 20, 0, 0, 0, - 0, 0, 258, 0, 0, 0, 0, 0, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 0, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 0, 118, 76, 119, 173, 174, - 175, 176, 177, 0, 0, 178, 179, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 337, 78, 79, 80, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 88, 0, 89, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 17, 18, 19, 20, 0, 180, 0, 0, 0, 0, - 0, 181, 182, 183, 184, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 0, 118, 76, 119, 173, 174, 175, 176, 177, - 0, 0, 178, 179, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 78, 79, 80, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 88, 0, 89, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 17, 18, 19, - 20, 0, 180, 0, 0, 236, 0, 0, 181, 182, - 183, 184, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 0, 118, - 76, 119, 173, 174, 175, 176, 177, 0, 0, 178, - 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, - 79, 80, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 88, 0, 89, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 17, 18, 19, 20, 0, 180, - 0, 0, 319, 0, 0, 181, 182, 183, 184, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 0, 118, 76, 119, 173, - 174, 175, 176, 177, 0, 0, 178, 179, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 78, 79, 80, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 88, 0, 89, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 17, 18, 19, 20, 0, 180, 0, 0, 375, - 0, 0, 181, 182, 183, 184, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 0, 118, 76, 119, 173, 174, 175, 176, - 177, 0, 0, 178, 179, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 78, 79, 80, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 88, 0, 89, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 17, 18, - 19, 20, 0, 180, 0, 0, 0, 0, 0, 181, - 182, 183, 184, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 274, 0, - 118, 76, 119, 173, 174, 175, 176, 177, 0, 0, - 178, 179, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 78, 79, 80, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 88, 0, 89, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 17, 18, 19, 20, 0, - 180, 0, 0, 0, 0, 0, 181, 182, 183, 184, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 396, 0, 118, 76, 119, - 173, 174, 175, 176, 177, 0, 0, 178, 179, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 78, 79, 80, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, - 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 15, 16, 17, 18, 19, 20, 0, 180, 0, 0, - 0, 0, 0, 181, 182, 183, 184, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 0, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 0, 0, 76, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 77, 78, 79, 80, 0, 81, 0, - 0, 0, 0, 0, 0, 0, 82, 83, 84, 85, - 86, 87, 17, 18, 19, 20, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 0, - 0, 0, 0, 0, 0, 88, 0, 89, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 0, 0, 76, 17, 18, 19, 20, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 0, 78, 79, 80, 0, 0, 0, - 0, 0, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 0, 0, 76, - 0, 0, 0, 0, 0, 88, 0, 89, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, - 0, 89 -}; - -static const yytype_int16 yycheck[] = -{ - 9, 8, 77, 9, 170, 166, 77, 152, 18, 19, - 77, 78, 79, 94, 180, 156, 18, 19, 77, 4, - 233, 199, 202, 89, 90, 100, 101, 87, 88, 261, - 198, 202, 196, 4, 202, 389, 199, 202, 218, 217, - 99, 81, 202, 9, 108, 202, 121, 218, 33, 34, - 35, 216, 152, 407, 217, 202, 218, 219, 218, 123, - 221, 218, 33, 34, 35, 203, 204, 74, 318, 216, - 234, 33, 34, 198, 112, 37, 198, 202, 178, 179, - 202, 0, 91, 198, 116, 91, 113, 202, 233, 115, - 256, 198, 99, 102, 260, 261, 198, 85, 86, 199, - 202, 333, 116, 269, 317, 112, 247, 116, 116, 273, - 197, 324, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 198, 132, 288, 91, 202, 116, 378, 77, - 78, 79, 141, 233, 215, 116, 143, 91, 92, 199, - 116, 201, 199, 309, 210, 211, 310, 156, 155, 158, - 400, 198, 219, 403, 318, 202, 202, 166, 107, 108, - 109, 374, 412, 297, 298, 299, 300, 333, 295, 296, - 420, 219, 317, 77, 78, 79, 33, 34, 35, 324, - 197, 342, 207, 208, 209, 197, 350, 293, 294, 116, - 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, - 300, 301, 302, 303, 304, 305, 306, 307, 308, 220, - 220, 270, 221, 198, 378, 197, 382, 317, 220, 301, - 302, 218, 231, 230, 324, 386, 217, 197, 218, 374, - 197, 395, 218, 217, 398, 218, 400, 197, 247, 403, - 406, 197, 3, 4, 197, 197, 255, 198, 412, 212, - 214, 93, 261, 218, 3, 4, 420, 266, 213, 95, - 426, 197, 337, 270, 425, 200, 337, 3, 4, 430, - 431, 32, 33, 34, 374, 36, 37, 38, 39, 40, - 81, 199, 443, 32, 33, 34, 76, 36, 37, 38, - 39, 40, 198, 217, 199, 197, 32, 33, 34, 200, - 36, 37, 202, 198, 200, 197, 217, 198, 217, 219, - 200, 200, 198, 198, 12, 218, 200, 216, 325, 217, - 217, 308, 135, 303, 333, 218, 304, 306, 77, 251, - 79, 305, 339, 342, 307, 142, 81, 231, 158, 255, - 93, 266, 407, 231, 430, 91, -1, 255, 325, 432, - -1, -1, -1, -1, -1, -1, -1, -1, 333, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 386, -1, -1, - 389, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 407, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 425, -1, -1, -1, - -1, 430, 431, -1, -1, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 443, 13, 14, 15, 16, 17, - -1, -1, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, -1, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, -1, -1, 87, - 88, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 106, 107, - 108, 109, -1, 111, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 124, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 158, -1, 160, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 197, - -1, -1, -1, -1, -1, 203, 204, 205, 206, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 218, 219, 220, 3, 4, 5, 6, 7, 8, 9, - 10, 11, -1, 13, 14, 15, 16, 17, -1, -1, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, -1, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, -1, -1, 87, 88, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 106, 107, 108, 109, - -1, 111, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 124, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 158, -1, - 160, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 197, -1, -1, - -1, -1, -1, 203, 204, 205, 206, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 218, 219, - 220, 3, 4, 5, 6, 7, 8, 9, 10, 11, - -1, 13, 14, 15, 16, 17, -1, -1, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, -1, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, -1, -1, 87, 88, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 106, 107, 108, 109, -1, 111, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 124, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 158, -1, 160, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 197, -1, -1, -1, -1, - -1, 203, 204, 205, 206, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 218, 219, 220, 3, - 4, 5, 6, 7, 8, 9, 10, 11, -1, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, -1, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, -1, -1, 87, 88, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 106, 107, 108, 109, -1, 111, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 124, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 158, -1, 160, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 197, -1, -1, -1, -1, -1, 203, - 204, 205, 206, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 218, 219, 3, 4, 5, 6, - 7, 8, 9, 10, 11, -1, 13, 14, 15, 16, - 17, -1, -1, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, -1, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 84, -1, -1, - 87, 88, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 106, - 107, 108, 109, -1, 111, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 124, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 158, -1, 160, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 197, -1, -1, -1, -1, -1, 203, 204, 205, 206, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 218, 219, 3, 4, 5, 6, 7, 8, 9, - 10, 11, -1, 13, 14, 15, 16, 17, -1, -1, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, -1, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, -1, -1, 87, 88, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 106, 107, 108, 109, - -1, 111, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 124, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 158, -1, - 160, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 197, -1, -1, - -1, -1, -1, 203, 204, 205, 206, 3, 4, 5, - 6, 7, 8, -1, -1, -1, -1, -1, 218, 219, - -1, -1, -1, -1, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, -1, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - -1, 77, 78, 79, 80, 81, 82, 83, 84, -1, - -1, 87, 88, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 106, 107, 108, 109, -1, 111, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 124, 5, - 6, 7, 8, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, - -1, -1, 158, -1, 160, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - -1, 197, 78, -1, -1, -1, -1, 203, 204, 205, - 206, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 218, -1, -1, -1, -1, -1, -1, -1, - -1, 107, 108, 109, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, - 6, 7, 8, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, - -1, -1, 158, -1, 160, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - -1, -1, 78, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 220, -1, -1, -1, -1, -1, - -1, 107, 108, 109, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, - 6, 7, 8, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, - -1, -1, 158, -1, 160, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - -1, 77, 78, 79, 80, 81, 82, 83, 84, -1, - -1, 87, 88, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 220, -1, -1, -1, -1, -1, - -1, 107, 108, 109, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 158, -1, 160, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 197, -1, -1, -1, -1, -1, 203, 204, 205, - 206, 3, 4, 5, 6, 7, 8, -1, -1, -1, - -1, -1, 218, -1, -1, -1, -1, -1, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, -1, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, -1, 77, 78, 79, 80, 81, - 82, 83, 84, -1, -1, 87, 88, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 106, 107, 108, 109, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 124, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 158, -1, 160, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 5, 6, 7, 8, -1, 197, -1, -1, -1, -1, - -1, 203, 204, 205, 206, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, -1, 77, 78, 79, 80, 81, 82, 83, 84, - -1, -1, 87, 88, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 107, 108, 109, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 158, -1, 160, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 5, 6, 7, - 8, -1, 197, -1, -1, 200, -1, -1, 203, 204, - 205, 206, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, -1, 77, - 78, 79, 80, 81, 82, 83, 84, -1, -1, 87, - 88, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 107, - 108, 109, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 158, -1, 160, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 5, 6, 7, 8, -1, 197, - -1, -1, 200, -1, -1, 203, 204, 205, 206, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, -1, 77, 78, 79, 80, - 81, 82, 83, 84, -1, -1, 87, 88, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 107, 108, 109, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 158, -1, 160, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 5, 6, 7, 8, -1, 197, -1, -1, 200, - -1, -1, 203, 204, 205, 206, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, -1, 77, 78, 79, 80, 81, 82, 83, - 84, -1, -1, 87, 88, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 107, 108, 109, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 158, -1, 160, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 5, 6, - 7, 8, -1, 197, -1, -1, -1, -1, -1, 203, - 204, 205, 206, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, -1, - 77, 78, 79, 80, 81, 82, 83, 84, -1, -1, - 87, 88, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 107, 108, 109, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 158, -1, 160, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 5, 6, 7, 8, -1, - 197, -1, -1, -1, -1, -1, 203, 204, 205, 206, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, -1, 77, 78, 79, - 80, 81, 82, 83, 84, -1, -1, 87, 88, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 107, 108, 109, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 158, -1, - 160, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 3, 4, 5, 6, 7, 8, -1, 197, -1, -1, - -1, -1, -1, 203, 204, 205, 206, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, -1, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, -1, -1, 78, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 106, 107, 108, 109, -1, 111, -1, - -1, -1, -1, -1, -1, -1, 119, 120, 121, 122, - 123, 124, 5, 6, 7, 8, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, -1, - -1, -1, -1, -1, -1, 158, -1, 160, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, -1, -1, 78, 5, 6, 7, 8, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, -1, 107, 108, 109, -1, -1, -1, - -1, -1, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, -1, -1, 78, - -1, -1, -1, -1, -1, 158, -1, 160, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 158, - -1, 160 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint16 yystos[] = -{ - 0, 112, 222, 224, 81, 0, 226, 116, 113, 223, - 228, 77, 78, 79, 227, 3, 4, 5, 6, 7, - 8, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 78, 106, 107, 108, - 109, 111, 119, 120, 121, 122, 123, 124, 158, 160, - 225, 229, 263, 264, 265, 266, 267, 272, 273, 274, - 275, 278, 280, 281, 282, 283, 284, 285, 286, 287, - 316, 317, 115, 33, 34, 37, 219, 227, 77, 79, - 230, 278, 281, 286, 116, 116, 116, 116, 116, 197, - 316, 218, 219, 299, 198, 202, 4, 33, 34, 35, - 269, 270, 279, 202, 218, 77, 79, 227, 230, 281, - 281, 282, 199, 283, 227, 282, 288, 289, 219, 281, - 283, 227, 276, 277, 9, 10, 11, 13, 14, 15, - 16, 17, 76, 80, 81, 82, 83, 84, 87, 88, - 197, 203, 204, 205, 206, 218, 219, 220, 230, 231, - 232, 234, 235, 236, 237, 238, 239, 240, 245, 246, - 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, - 257, 258, 259, 261, 263, 264, 282, 293, 294, 295, - 296, 300, 301, 302, 305, 311, 315, 269, 268, 271, - 282, 270, 227, 199, 217, 197, 200, 245, 258, 262, - 282, 116, 227, 290, 291, 220, 289, 288, 218, 217, - 198, 202, 218, 218, 294, 197, 197, 218, 218, 261, - 197, 197, 245, 245, 261, 220, 297, 87, 88, 199, - 201, 198, 198, 202, 75, 259, 197, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 217, 260, 245, - 207, 208, 209, 203, 204, 85, 86, 89, 90, 210, - 211, 91, 92, 212, 213, 214, 93, 95, 94, 215, - 202, 218, 220, 294, 227, 268, 271, 199, 217, 200, - 262, 259, 292, 200, 199, 202, 218, 220, 81, 277, - 76, 293, 301, 312, 261, 218, 261, 106, 261, 274, - 304, 198, 300, 233, 261, 227, 230, 241, 242, 243, - 244, 259, 259, 245, 245, 245, 247, 247, 248, 248, - 249, 249, 249, 249, 250, 250, 251, 252, 253, 254, - 255, 256, 261, 259, 199, 200, 262, 292, 217, 200, - 262, 291, 197, 304, 313, 314, 198, 198, 227, 198, - 220, 200, 197, 198, 198, 202, 75, 259, 216, 262, - 217, 200, 292, 217, 200, 261, 218, 198, 294, 303, - 219, 306, 217, 295, 298, 299, 259, 259, 200, 292, - 217, 292, 198, 261, 298, 12, 18, 19, 220, 307, - 308, 309, 310, 292, 292, 218, 294, 261, 216, 294, - 307, 294, 220, 309, 216 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, state, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval, &yylloc, scanner) -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, Location, state); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct _mesa_glsl_parse_state *state) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, state) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; - struct _mesa_glsl_parse_state *state; -#endif -{ - if (!yyvaluep) - return; - YYUSE (yylocationp); - YYUSE (state); -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct _mesa_glsl_parse_state *state) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, state) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; - struct _mesa_glsl_parse_state *state; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - YY_LOCATION_PRINT (yyoutput, *yylocationp); - YYFPRINTF (yyoutput, ": "); - yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, state); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, struct _mesa_glsl_parse_state *state) -#else -static void -yy_reduce_print (yyvsp, yylsp, yyrule, state) - YYSTYPE *yyvsp; - YYLTYPE *yylsp; - int yyrule; - struct _mesa_glsl_parse_state *state; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , &(yylsp[(yyi + 1) - (yynrhs)]) , state); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, yylsp, Rule, state); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) -{ - int yyn = yypact[yystate]; - - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - - if (yysize_overflow) - return YYSIZE_MAXIMUM; - - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; - } -} -#endif /* YYERROR_VERBOSE */ - - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct _mesa_glsl_parse_state *state) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, yylocationp, state) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - YYLTYPE *yylocationp; - struct _mesa_glsl_parse_state *state; -#endif -{ - YYUSE (yyvaluep); - YYUSE (yylocationp); - YYUSE (state); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - - default: - break; - } -} - -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (struct _mesa_glsl_parse_state *state); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - - - - -/*-------------------------. -| yyparse or yypush_parse. | -`-------------------------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (struct _mesa_glsl_parse_state *state) -#else -int -yyparse (state) - struct _mesa_glsl_parse_state *state; -#endif -#endif -{ -/* The lookahead symbol. */ -int yychar; - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; - -/* Location data for the lookahead symbol. */ -YYLTYPE yylloc; - - /* Number of syntax errors so far. */ - int yynerrs; - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - /* The location stack. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls; - YYLTYPE *yylsp; - - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[3]; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - YYLTYPE yyloc; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; - yyls = yylsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - yylsp = yyls; - -#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - /* Initialize the default location before parsing starts. */ - yylloc.first_line = yylloc.last_line = 1; - yylloc.first_column = yylloc.last_column = 1; -#endif - -/* User initialization code. */ - -/* Line 1251 of yacc.c */ -#line 47 "glsl_parser.yy" -{ - yylloc.first_line = 1; - yylloc.first_column = 1; - yylloc.last_line = 1; - yylloc.last_column = 1; - yylloc.source = 0; -} - -/* Line 1251 of yacc.c */ -#line 2726 "glsl_parser.cpp" - yylsp[0] = yylloc; - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yyls1, yysize * sizeof (*yylsp), - &yystacksize); - - yyls = yyls1; - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - *++yyvsp = yylval; - *++yylsp = yylloc; - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: - -/* Line 1464 of yacc.c */ -#line 236 "glsl_parser.yy" - { - _mesa_glsl_initialize_types(state); - ;} - break; - - case 3: - -/* Line 1464 of yacc.c */ -#line 240 "glsl_parser.yy" - { - delete state->symbols; - state->symbols = new(ralloc_parent(state)) glsl_symbol_table; - _mesa_glsl_initialize_types(state); - ;} - break; - - case 5: - -/* Line 1464 of yacc.c */ -#line 250 "glsl_parser.yy" - { - bool supported = false; - - switch ((yyvsp[(2) - (3)].n)) { - case 100: - state->es_shader = true; - supported = state->Const.GLSL_100ES; - break; - case 110: - supported = state->Const.GLSL_110; - break; - case 120: - supported = state->Const.GLSL_120; - break; - case 130: - supported = state->Const.GLSL_130; - break; - default: - supported = false; - break; - } - - state->language_version = (yyvsp[(2) - (3)].n); - state->version_string = - ralloc_asprintf(state, "GLSL%s %d.%02d", - state->es_shader ? " ES" : "", - state->language_version / 100, - state->language_version % 100); - - if (!supported) { - _mesa_glsl_error(& (yylsp[(2) - (3)]), state, "%s is not supported. " - "Supported versions are: %s\n", - state->version_string, - state->supported_version_string); - } - ;} - break; - - case 10: - -/* Line 1464 of yacc.c */ -#line 294 "glsl_parser.yy" - { - if (state->language_version < 120) { - _mesa_glsl_warning(& (yylsp[(1) - (2)]), state, - "pragma `invariant(all)' not supported in %s", - state->version_string); - } else { - state->all_invariant = true; - } - ;} - break; - - case 16: - -/* Line 1464 of yacc.c */ -#line 318 "glsl_parser.yy" - { - if (!_mesa_glsl_process_extension((yyvsp[(2) - (5)].identifier), & (yylsp[(2) - (5)]), (yyvsp[(4) - (5)].identifier), & (yylsp[(4) - (5)]), state)) { - YYERROR; - } - ;} - break; - - case 17: - -/* Line 1464 of yacc.c */ -#line 327 "glsl_parser.yy" - { - /* FINISHME: The NULL test is required because pragmas are set to - * FINISHME: NULL. (See production rule for external_declaration.) - */ - if ((yyvsp[(1) - (1)].node) != NULL) - state->translation_unit.push_tail(& (yyvsp[(1) - (1)].node)->link); - ;} - break; - - case 18: - -/* Line 1464 of yacc.c */ -#line 335 "glsl_parser.yy" - { - /* FINISHME: The NULL test is required because pragmas are set to - * FINISHME: NULL. (See production rule for external_declaration.) - */ - if ((yyvsp[(2) - (2)].node) != NULL) - state->translation_unit.push_tail(& (yyvsp[(2) - (2)].node)->link); - ;} - break; - - case 21: - -/* Line 1464 of yacc.c */ -#line 351 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_identifier, NULL, NULL, NULL); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->primary_expression.identifier = (yyvsp[(1) - (1)].identifier); - ;} - break; - - case 22: - -/* Line 1464 of yacc.c */ -#line 358 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_int_constant, NULL, NULL, NULL); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->primary_expression.int_constant = (yyvsp[(1) - (1)].n); - ;} - break; - - case 23: - -/* Line 1464 of yacc.c */ -#line 365 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_uint_constant, NULL, NULL, NULL); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->primary_expression.uint_constant = (yyvsp[(1) - (1)].n); - ;} - break; - - case 24: - -/* Line 1464 of yacc.c */ -#line 372 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_float_constant, NULL, NULL, NULL); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->primary_expression.float_constant = (yyvsp[(1) - (1)].real); - ;} - break; - - case 25: - -/* Line 1464 of yacc.c */ -#line 379 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_bool_constant, NULL, NULL, NULL); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->primary_expression.bool_constant = (yyvsp[(1) - (1)].n); - ;} - break; - - case 26: - -/* Line 1464 of yacc.c */ -#line 386 "glsl_parser.yy" - { - (yyval.expression) = (yyvsp[(2) - (3)].expression); - ;} - break; - - case 28: - -/* Line 1464 of yacc.c */ -#line 394 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_array_index, (yyvsp[(1) - (4)].expression), (yyvsp[(3) - (4)].expression), NULL); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 29: - -/* Line 1464 of yacc.c */ -#line 400 "glsl_parser.yy" - { - (yyval.expression) = (yyvsp[(1) - (1)].expression); - ;} - break; - - case 30: - -/* Line 1464 of yacc.c */ -#line 404 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_field_selection, (yyvsp[(1) - (3)].expression), NULL, NULL); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->primary_expression.identifier = (yyvsp[(3) - (3)].identifier); - ;} - break; - - case 31: - -/* Line 1464 of yacc.c */ -#line 411 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_post_inc, (yyvsp[(1) - (2)].expression), NULL, NULL); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 32: - -/* Line 1464 of yacc.c */ -#line 417 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_post_dec, (yyvsp[(1) - (2)].expression), NULL, NULL); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 36: - -/* Line 1464 of yacc.c */ -#line 435 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_field_selection, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression), NULL); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 41: - -/* Line 1464 of yacc.c */ -#line 454 "glsl_parser.yy" - { - (yyval.expression) = (yyvsp[(1) - (2)].expression); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->expressions.push_tail(& (yyvsp[(2) - (2)].expression)->link); - ;} - break; - - case 42: - -/* Line 1464 of yacc.c */ -#line 460 "glsl_parser.yy" - { - (yyval.expression) = (yyvsp[(1) - (3)].expression); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->expressions.push_tail(& (yyvsp[(3) - (3)].expression)->link); - ;} - break; - - case 44: - -/* Line 1464 of yacc.c */ -#line 476 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_function_expression((yyvsp[(1) - (1)].type_specifier)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 45: - -/* Line 1464 of yacc.c */ -#line 482 "glsl_parser.yy" - { - void *ctx = state; - ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (1)].identifier)); - (yyval.expression) = new(ctx) ast_function_expression(callee); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 46: - -/* Line 1464 of yacc.c */ -#line 489 "glsl_parser.yy" - { - void *ctx = state; - ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (1)].identifier)); - (yyval.expression) = new(ctx) ast_function_expression(callee); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 51: - -/* Line 1464 of yacc.c */ -#line 509 "glsl_parser.yy" - { - (yyval.expression) = (yyvsp[(1) - (2)].expression); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->expressions.push_tail(& (yyvsp[(2) - (2)].expression)->link); - ;} - break; - - case 52: - -/* Line 1464 of yacc.c */ -#line 515 "glsl_parser.yy" - { - (yyval.expression) = (yyvsp[(1) - (3)].expression); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->expressions.push_tail(& (yyvsp[(3) - (3)].expression)->link); - ;} - break; - - case 53: - -/* Line 1464 of yacc.c */ -#line 527 "glsl_parser.yy" - { - void *ctx = state; - ast_expression *callee = new(ctx) ast_expression((yyvsp[(1) - (2)].identifier)); - (yyval.expression) = new(ctx) ast_function_expression(callee); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 55: - -/* Line 1464 of yacc.c */ -#line 539 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_pre_inc, (yyvsp[(2) - (2)].expression), NULL, NULL); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 56: - -/* Line 1464 of yacc.c */ -#line 545 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_pre_dec, (yyvsp[(2) - (2)].expression), NULL, NULL); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 57: - -/* Line 1464 of yacc.c */ -#line 551 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression((yyvsp[(1) - (2)].n), (yyvsp[(2) - (2)].expression), NULL, NULL); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 58: - -/* Line 1464 of yacc.c */ -#line 560 "glsl_parser.yy" - { (yyval.n) = ast_plus; ;} - break; - - case 59: - -/* Line 1464 of yacc.c */ -#line 561 "glsl_parser.yy" - { (yyval.n) = ast_neg; ;} - break; - - case 60: - -/* Line 1464 of yacc.c */ -#line 562 "glsl_parser.yy" - { (yyval.n) = ast_logic_not; ;} - break; - - case 61: - -/* Line 1464 of yacc.c */ -#line 563 "glsl_parser.yy" - { (yyval.n) = ast_bit_not; ;} - break; - - case 63: - -/* Line 1464 of yacc.c */ -#line 569 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_mul, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 64: - -/* Line 1464 of yacc.c */ -#line 575 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_div, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 65: - -/* Line 1464 of yacc.c */ -#line 581 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_mod, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 67: - -/* Line 1464 of yacc.c */ -#line 591 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_add, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 68: - -/* Line 1464 of yacc.c */ -#line 597 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_sub, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 70: - -/* Line 1464 of yacc.c */ -#line 607 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_lshift, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 71: - -/* Line 1464 of yacc.c */ -#line 613 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_rshift, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 73: - -/* Line 1464 of yacc.c */ -#line 623 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_less, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 74: - -/* Line 1464 of yacc.c */ -#line 629 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_greater, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 75: - -/* Line 1464 of yacc.c */ -#line 635 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_lequal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 76: - -/* Line 1464 of yacc.c */ -#line 641 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_gequal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 78: - -/* Line 1464 of yacc.c */ -#line 651 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_equal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 79: - -/* Line 1464 of yacc.c */ -#line 657 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_nequal, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 81: - -/* Line 1464 of yacc.c */ -#line 667 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_bit_and, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 83: - -/* Line 1464 of yacc.c */ -#line 677 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_bit_xor, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 85: - -/* Line 1464 of yacc.c */ -#line 687 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_bit_or, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 87: - -/* Line 1464 of yacc.c */ -#line 697 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_logic_and, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 89: - -/* Line 1464 of yacc.c */ -#line 707 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_logic_xor, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 91: - -/* Line 1464 of yacc.c */ -#line 717 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression_bin(ast_logic_or, (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 93: - -/* Line 1464 of yacc.c */ -#line 727 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression(ast_conditional, (yyvsp[(1) - (5)].expression), (yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].expression)); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 95: - -/* Line 1464 of yacc.c */ -#line 737 "glsl_parser.yy" - { - void *ctx = state; - (yyval.expression) = new(ctx) ast_expression((yyvsp[(2) - (3)].n), (yyvsp[(1) - (3)].expression), (yyvsp[(3) - (3)].expression), NULL); - (yyval.expression)->set_location(yylloc); - ;} - break; - - case 96: - -/* Line 1464 of yacc.c */ -#line 745 "glsl_parser.yy" - { (yyval.n) = ast_assign; ;} - break; - - case 97: - -/* Line 1464 of yacc.c */ -#line 746 "glsl_parser.yy" - { (yyval.n) = ast_mul_assign; ;} - break; - - case 98: - -/* Line 1464 of yacc.c */ -#line 747 "glsl_parser.yy" - { (yyval.n) = ast_div_assign; ;} - break; - - case 99: - -/* Line 1464 of yacc.c */ -#line 748 "glsl_parser.yy" - { (yyval.n) = ast_mod_assign; ;} - break; - - case 100: - -/* Line 1464 of yacc.c */ -#line 749 "glsl_parser.yy" - { (yyval.n) = ast_add_assign; ;} - break; - - case 101: - -/* Line 1464 of yacc.c */ -#line 750 "glsl_parser.yy" - { (yyval.n) = ast_sub_assign; ;} - break; - - case 102: - -/* Line 1464 of yacc.c */ -#line 751 "glsl_parser.yy" - { (yyval.n) = ast_ls_assign; ;} - break; - - case 103: - -/* Line 1464 of yacc.c */ -#line 752 "glsl_parser.yy" - { (yyval.n) = ast_rs_assign; ;} - break; - - case 104: - -/* Line 1464 of yacc.c */ -#line 753 "glsl_parser.yy" - { (yyval.n) = ast_and_assign; ;} - break; - - case 105: - -/* Line 1464 of yacc.c */ -#line 754 "glsl_parser.yy" - { (yyval.n) = ast_xor_assign; ;} - break; - - case 106: - -/* Line 1464 of yacc.c */ -#line 755 "glsl_parser.yy" - { (yyval.n) = ast_or_assign; ;} - break; - - case 107: - -/* Line 1464 of yacc.c */ -#line 760 "glsl_parser.yy" - { - (yyval.expression) = (yyvsp[(1) - (1)].expression); - ;} - break; - - case 108: - -/* Line 1464 of yacc.c */ -#line 764 "glsl_parser.yy" - { - void *ctx = state; - if ((yyvsp[(1) - (3)].expression)->oper != ast_sequence) { - (yyval.expression) = new(ctx) ast_expression(ast_sequence, NULL, NULL, NULL); - (yyval.expression)->set_location(yylloc); - (yyval.expression)->expressions.push_tail(& (yyvsp[(1) - (3)].expression)->link); - } else { - (yyval.expression) = (yyvsp[(1) - (3)].expression); - } - - (yyval.expression)->expressions.push_tail(& (yyvsp[(3) - (3)].expression)->link); - ;} - break; - - case 110: - -/* Line 1464 of yacc.c */ -#line 784 "glsl_parser.yy" - { - state->symbols->pop_scope(); - (yyval.node) = (yyvsp[(1) - (2)].function); - ;} - break; - - case 111: - -/* Line 1464 of yacc.c */ -#line 789 "glsl_parser.yy" - { - (yyval.node) = (yyvsp[(1) - (2)].declarator_list); - ;} - break; - - case 112: - -/* Line 1464 of yacc.c */ -#line 793 "glsl_parser.yy" - { - (yyvsp[(3) - (4)].type_specifier)->precision = (yyvsp[(2) - (4)].n); - (yyvsp[(3) - (4)].type_specifier)->is_precision_statement = true; - (yyval.node) = (yyvsp[(3) - (4)].type_specifier); - ;} - break; - - case 116: - -/* Line 1464 of yacc.c */ -#line 811 "glsl_parser.yy" - { - (yyval.function) = (yyvsp[(1) - (2)].function); - (yyval.function)->parameters.push_tail(& (yyvsp[(2) - (2)].parameter_declarator)->link); - ;} - break; - - case 117: - -/* Line 1464 of yacc.c */ -#line 816 "glsl_parser.yy" - { - (yyval.function) = (yyvsp[(1) - (3)].function); - (yyval.function)->parameters.push_tail(& (yyvsp[(3) - (3)].parameter_declarator)->link); - ;} - break; - - case 118: - -/* Line 1464 of yacc.c */ -#line 824 "glsl_parser.yy" - { - void *ctx = state; - (yyval.function) = new(ctx) ast_function(); - (yyval.function)->set_location(yylloc); - (yyval.function)->return_type = (yyvsp[(1) - (3)].fully_specified_type); - (yyval.function)->identifier = (yyvsp[(2) - (3)].identifier); - - state->symbols->add_function(new(state) ir_function((yyvsp[(2) - (3)].identifier))); - state->symbols->push_scope(); - ;} - break; - - case 119: - -/* Line 1464 of yacc.c */ -#line 838 "glsl_parser.yy" - { - void *ctx = state; - (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator(); - (yyval.parameter_declarator)->set_location(yylloc); - (yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_type(); - (yyval.parameter_declarator)->type->set_location(yylloc); - (yyval.parameter_declarator)->type->specifier = (yyvsp[(1) - (2)].type_specifier); - (yyval.parameter_declarator)->identifier = (yyvsp[(2) - (2)].identifier); - ;} - break; - - case 120: - -/* Line 1464 of yacc.c */ -#line 848 "glsl_parser.yy" - { - void *ctx = state; - (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator(); - (yyval.parameter_declarator)->set_location(yylloc); - (yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_type(); - (yyval.parameter_declarator)->type->set_location(yylloc); - (yyval.parameter_declarator)->type->specifier = (yyvsp[(1) - (5)].type_specifier); - (yyval.parameter_declarator)->identifier = (yyvsp[(2) - (5)].identifier); - (yyval.parameter_declarator)->is_array = true; - (yyval.parameter_declarator)->array_size = (yyvsp[(4) - (5)].expression); - ;} - break; - - case 121: - -/* Line 1464 of yacc.c */ -#line 863 "glsl_parser.yy" - { - (yyvsp[(1) - (3)].type_qualifier).flags.i |= (yyvsp[(2) - (3)].type_qualifier).flags.i; - - (yyval.parameter_declarator) = (yyvsp[(3) - (3)].parameter_declarator); - (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (3)].type_qualifier); - ;} - break; - - case 122: - -/* Line 1464 of yacc.c */ -#line 870 "glsl_parser.yy" - { - (yyval.parameter_declarator) = (yyvsp[(2) - (2)].parameter_declarator); - (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (2)].type_qualifier); - ;} - break; - - case 123: - -/* Line 1464 of yacc.c */ -#line 875 "glsl_parser.yy" - { - void *ctx = state; - (yyvsp[(1) - (3)].type_qualifier).flags.i |= (yyvsp[(2) - (3)].type_qualifier).flags.i; - - (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator(); - (yyval.parameter_declarator)->set_location(yylloc); - (yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_type(); - (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (3)].type_qualifier); - (yyval.parameter_declarator)->type->specifier = (yyvsp[(3) - (3)].type_specifier); - ;} - break; - - case 124: - -/* Line 1464 of yacc.c */ -#line 886 "glsl_parser.yy" - { - void *ctx = state; - (yyval.parameter_declarator) = new(ctx) ast_parameter_declarator(); - (yyval.parameter_declarator)->set_location(yylloc); - (yyval.parameter_declarator)->type = new(ctx) ast_fully_specified_type(); - (yyval.parameter_declarator)->type->qualifier = (yyvsp[(1) - (2)].type_qualifier); - (yyval.parameter_declarator)->type->specifier = (yyvsp[(2) - (2)].type_specifier); - ;} - break; - - case 125: - -/* Line 1464 of yacc.c */ -#line 898 "glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - ;} - break; - - case 126: - -/* Line 1464 of yacc.c */ -#line 902 "glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.in = 1; - ;} - break; - - case 127: - -/* Line 1464 of yacc.c */ -#line 907 "glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.out = 1; - ;} - break; - - case 128: - -/* Line 1464 of yacc.c */ -#line 912 "glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.in = 1; - (yyval.type_qualifier).flags.q.out = 1; - ;} - break; - - case 131: - -/* Line 1464 of yacc.c */ -#line 926 "glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (3)].identifier), false, NULL, NULL); - decl->set_location(yylloc); - - (yyval.declarator_list) = (yyvsp[(1) - (3)].declarator_list); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (3)].identifier), ir_var_auto)); - ;} - break; - - case 132: - -/* Line 1464 of yacc.c */ -#line 936 "glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (5)].identifier), true, NULL, NULL); - decl->set_location(yylloc); - - (yyval.declarator_list) = (yyvsp[(1) - (5)].declarator_list); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (5)].identifier), ir_var_auto)); - ;} - break; - - case 133: - -/* Line 1464 of yacc.c */ -#line 946 "glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (6)].identifier), true, (yyvsp[(5) - (6)].expression), NULL); - decl->set_location(yylloc); - - (yyval.declarator_list) = (yyvsp[(1) - (6)].declarator_list); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (6)].identifier), ir_var_auto)); - ;} - break; - - case 134: - -/* Line 1464 of yacc.c */ -#line 956 "glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (7)].identifier), true, NULL, (yyvsp[(7) - (7)].expression)); - decl->set_location(yylloc); - - (yyval.declarator_list) = (yyvsp[(1) - (7)].declarator_list); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (7)].identifier), ir_var_auto)); - ;} - break; - - case 135: - -/* Line 1464 of yacc.c */ -#line 966 "glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (8)].identifier), true, (yyvsp[(5) - (8)].expression), (yyvsp[(8) - (8)].expression)); - decl->set_location(yylloc); - - (yyval.declarator_list) = (yyvsp[(1) - (8)].declarator_list); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (8)].identifier), ir_var_auto)); - ;} - break; - - case 136: - -/* Line 1464 of yacc.c */ -#line 976 "glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(3) - (5)].identifier), false, NULL, (yyvsp[(5) - (5)].expression)); - decl->set_location(yylloc); - - (yyval.declarator_list) = (yyvsp[(1) - (5)].declarator_list); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(3) - (5)].identifier), ir_var_auto)); - ;} - break; - - case 137: - -/* Line 1464 of yacc.c */ -#line 990 "glsl_parser.yy" - { - void *ctx = state; - /* Empty declaration list is valid. */ - (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (1)].fully_specified_type)); - (yyval.declarator_list)->set_location(yylloc); - ;} - break; - - case 138: - -/* Line 1464 of yacc.c */ -#line 997 "glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (2)].identifier), false, NULL, NULL); - - (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (2)].fully_specified_type)); - (yyval.declarator_list)->set_location(yylloc); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - ;} - break; - - case 139: - -/* Line 1464 of yacc.c */ -#line 1006 "glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].identifier), true, NULL, NULL); - - (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (4)].fully_specified_type)); - (yyval.declarator_list)->set_location(yylloc); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - ;} - break; - - case 140: - -/* Line 1464 of yacc.c */ -#line 1015 "glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (5)].identifier), true, (yyvsp[(4) - (5)].expression), NULL); - - (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (5)].fully_specified_type)); - (yyval.declarator_list)->set_location(yylloc); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - ;} - break; - - case 141: - -/* Line 1464 of yacc.c */ -#line 1024 "glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (6)].identifier), true, NULL, (yyvsp[(6) - (6)].expression)); - - (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (6)].fully_specified_type)); - (yyval.declarator_list)->set_location(yylloc); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - ;} - break; - - case 142: - -/* Line 1464 of yacc.c */ -#line 1033 "glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (7)].identifier), true, (yyvsp[(4) - (7)].expression), (yyvsp[(7) - (7)].expression)); - - (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (7)].fully_specified_type)); - (yyval.declarator_list)->set_location(yylloc); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - ;} - break; - - case 143: - -/* Line 1464 of yacc.c */ -#line 1042 "glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].identifier), false, NULL, (yyvsp[(4) - (4)].expression)); - - (yyval.declarator_list) = new(ctx) ast_declarator_list((yyvsp[(1) - (4)].fully_specified_type)); - (yyval.declarator_list)->set_location(yylloc); - (yyval.declarator_list)->declarations.push_tail(&decl->link); - ;} - break; - - case 144: - -/* Line 1464 of yacc.c */ -#line 1051 "glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (2)].identifier), false, NULL, NULL); - - (yyval.declarator_list) = new(ctx) ast_declarator_list(NULL); - (yyval.declarator_list)->set_location(yylloc); - (yyval.declarator_list)->invariant = true; - - (yyval.declarator_list)->declarations.push_tail(&decl->link); - ;} - break; - - case 145: - -/* Line 1464 of yacc.c */ -#line 1065 "glsl_parser.yy" - { - void *ctx = state; - (yyval.fully_specified_type) = new(ctx) ast_fully_specified_type(); - (yyval.fully_specified_type)->set_location(yylloc); - (yyval.fully_specified_type)->specifier = (yyvsp[(1) - (1)].type_specifier); - ;} - break; - - case 146: - -/* Line 1464 of yacc.c */ -#line 1072 "glsl_parser.yy" - { - void *ctx = state; - (yyval.fully_specified_type) = new(ctx) ast_fully_specified_type(); - (yyval.fully_specified_type)->set_location(yylloc); - (yyval.fully_specified_type)->qualifier = (yyvsp[(1) - (2)].type_qualifier); - (yyval.fully_specified_type)->specifier = (yyvsp[(2) - (2)].type_specifier); - ;} - break; - - case 147: - -/* Line 1464 of yacc.c */ -#line 1083 "glsl_parser.yy" - { - (yyval.type_qualifier) = (yyvsp[(3) - (4)].type_qualifier); - ;} - break; - - case 149: - -/* Line 1464 of yacc.c */ -#line 1091 "glsl_parser.yy" - { - if (((yyvsp[(1) - (3)].type_qualifier).flags.i & (yyvsp[(3) - (3)].type_qualifier).flags.i) != 0) { - _mesa_glsl_error(& (yylsp[(3) - (3)]), state, - "duplicate layout qualifiers used\n"); - YYERROR; - } - - (yyval.type_qualifier).flags.i = (yyvsp[(1) - (3)].type_qualifier).flags.i | (yyvsp[(3) - (3)].type_qualifier).flags.i; - - if ((yyvsp[(1) - (3)].type_qualifier).flags.q.explicit_location) - (yyval.type_qualifier).location = (yyvsp[(1) - (3)].type_qualifier).location; - - if ((yyvsp[(3) - (3)].type_qualifier).flags.q.explicit_location) - (yyval.type_qualifier).location = (yyvsp[(3) - (3)].type_qualifier).location; - ;} - break; - - case 150: - -/* Line 1464 of yacc.c */ -#line 1110 "glsl_parser.yy" - { - bool got_one = false; - - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - - /* Layout qualifiers for ARB_fragment_coord_conventions. */ - if (!got_one && state->ARB_fragment_coord_conventions_enable) { - if (strcmp((yyvsp[(1) - (1)].identifier), "origin_upper_left") == 0) { - got_one = true; - (yyval.type_qualifier).flags.q.origin_upper_left = 1; - } else if (strcmp((yyvsp[(1) - (1)].identifier), "pixel_center_integer") == 0) { - got_one = true; - (yyval.type_qualifier).flags.q.pixel_center_integer = 1; - } - - if (got_one && state->ARB_fragment_coord_conventions_warn) { - _mesa_glsl_warning(& (yylsp[(1) - (1)]), state, - "GL_ARB_fragment_coord_conventions layout " - "identifier `%s' used\n", (yyvsp[(1) - (1)].identifier)); - } - } - - /* Layout qualifiers for AMD/ARB_conservative_depth. */ - if (!got_one && - (state->AMD_conservative_depth_enable || - state->ARB_conservative_depth_enable)) { - if (strcmp((yyvsp[(1) - (1)].identifier), "depth_any") == 0) { - got_one = true; - (yyval.type_qualifier).flags.q.depth_any = 1; - } else if (strcmp((yyvsp[(1) - (1)].identifier), "depth_greater") == 0) { - got_one = true; - (yyval.type_qualifier).flags.q.depth_greater = 1; - } else if (strcmp((yyvsp[(1) - (1)].identifier), "depth_less") == 0) { - got_one = true; - (yyval.type_qualifier).flags.q.depth_less = 1; - } else if (strcmp((yyvsp[(1) - (1)].identifier), "depth_unchanged") == 0) { - got_one = true; - (yyval.type_qualifier).flags.q.depth_unchanged = 1; - } - - if (got_one && state->AMD_conservative_depth_warn) { - _mesa_glsl_warning(& (yylsp[(1) - (1)]), state, - "GL_AMD_conservative_depth " - "layout qualifier `%s' is used\n", (yyvsp[(1) - (1)].identifier)); - } - if (got_one && state->ARB_conservative_depth_warn) { - _mesa_glsl_warning(& (yylsp[(1) - (1)]), state, - "GL_ARB_conservative_depth " - "layout qualifier `%s' is used\n", (yyvsp[(1) - (1)].identifier)); - } - } - - if (!got_one) { - _mesa_glsl_error(& (yylsp[(1) - (1)]), state, "unrecognized layout identifier " - "`%s'\n", (yyvsp[(1) - (1)].identifier)); - YYERROR; - } - ;} - break; - - case 151: - -/* Line 1464 of yacc.c */ -#line 1169 "glsl_parser.yy" - { - bool got_one = false; - - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - - if (state->ARB_explicit_attrib_location_enable) { - /* FINISHME: Handle 'index' once GL_ARB_blend_func_exteneded and - * FINISHME: GLSL 1.30 (or later) are supported. - */ - if (strcmp("location", (yyvsp[(1) - (3)].identifier)) == 0) { - got_one = true; - - (yyval.type_qualifier).flags.q.explicit_location = 1; - - if ((yyvsp[(3) - (3)].n) >= 0) { - (yyval.type_qualifier).location = (yyvsp[(3) - (3)].n); - } else { - _mesa_glsl_error(& (yylsp[(3) - (3)]), state, - "invalid location %d specified\n", (yyvsp[(3) - (3)].n)); - YYERROR; - } - } - } - - /* If the identifier didn't match any known layout identifiers, - * emit an error. - */ - if (!got_one) { - _mesa_glsl_error(& (yylsp[(1) - (3)]), state, "unrecognized layout identifier " - "`%s'\n", (yyvsp[(1) - (3)].identifier)); - YYERROR; - } else if (state->ARB_explicit_attrib_location_warn) { - _mesa_glsl_warning(& (yylsp[(1) - (3)]), state, - "GL_ARB_explicit_attrib_location layout " - "identifier `%s' used\n", (yyvsp[(1) - (3)].identifier)); - } - ;} - break; - - case 152: - -/* Line 1464 of yacc.c */ -#line 1210 "glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.smooth = 1; - ;} - break; - - case 153: - -/* Line 1464 of yacc.c */ -#line 1215 "glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.flat = 1; - ;} - break; - - case 154: - -/* Line 1464 of yacc.c */ -#line 1220 "glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.noperspective = 1; - ;} - break; - - case 155: - -/* Line 1464 of yacc.c */ -#line 1228 "glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.constant = 1; - ;} - break; - - case 158: - -/* Line 1464 of yacc.c */ -#line 1238 "glsl_parser.yy" - { - (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier); - (yyval.type_qualifier).flags.i |= (yyvsp[(2) - (2)].type_qualifier).flags.i; - ;} - break; - - case 160: - -/* Line 1464 of yacc.c */ -#line 1244 "glsl_parser.yy" - { - (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier); - (yyval.type_qualifier).flags.i |= (yyvsp[(2) - (2)].type_qualifier).flags.i; - ;} - break; - - case 161: - -/* Line 1464 of yacc.c */ -#line 1249 "glsl_parser.yy" - { - (yyval.type_qualifier) = (yyvsp[(2) - (2)].type_qualifier); - (yyval.type_qualifier).flags.q.invariant = 1; - ;} - break; - - case 162: - -/* Line 1464 of yacc.c */ -#line 1254 "glsl_parser.yy" - { - (yyval.type_qualifier) = (yyvsp[(2) - (3)].type_qualifier); - (yyval.type_qualifier).flags.i |= (yyvsp[(3) - (3)].type_qualifier).flags.i; - (yyval.type_qualifier).flags.q.invariant = 1; - ;} - break; - - case 163: - -/* Line 1464 of yacc.c */ -#line 1260 "glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.invariant = 1; - ;} - break; - - case 164: - -/* Line 1464 of yacc.c */ -#line 1268 "glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.constant = 1; - ;} - break; - - case 165: - -/* Line 1464 of yacc.c */ -#line 1273 "glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.attribute = 1; - ;} - break; - - case 166: - -/* Line 1464 of yacc.c */ -#line 1278 "glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.varying = 1; - ;} - break; - - case 167: - -/* Line 1464 of yacc.c */ -#line 1283 "glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.centroid = 1; - (yyval.type_qualifier).flags.q.varying = 1; - ;} - break; - - case 168: - -/* Line 1464 of yacc.c */ -#line 1289 "glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.in = 1; - ;} - break; - - case 169: - -/* Line 1464 of yacc.c */ -#line 1294 "glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.out = 1; - ;} - break; - - case 170: - -/* Line 1464 of yacc.c */ -#line 1299 "glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.centroid = 1; (yyval.type_qualifier).flags.q.in = 1; - ;} - break; - - case 171: - -/* Line 1464 of yacc.c */ -#line 1304 "glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.centroid = 1; (yyval.type_qualifier).flags.q.out = 1; - ;} - break; - - case 172: - -/* Line 1464 of yacc.c */ -#line 1309 "glsl_parser.yy" - { - memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - (yyval.type_qualifier).flags.q.uniform = 1; - ;} - break; - - case 173: - -/* Line 1464 of yacc.c */ -#line 1317 "glsl_parser.yy" - { - (yyval.type_specifier) = (yyvsp[(1) - (1)].type_specifier); - ;} - break; - - case 174: - -/* Line 1464 of yacc.c */ -#line 1321 "glsl_parser.yy" - { - (yyval.type_specifier) = (yyvsp[(2) - (2)].type_specifier); - (yyval.type_specifier)->precision = (yyvsp[(1) - (2)].n); - ;} - break; - - case 176: - -/* Line 1464 of yacc.c */ -#line 1330 "glsl_parser.yy" - { - (yyval.type_specifier) = (yyvsp[(1) - (3)].type_specifier); - (yyval.type_specifier)->is_array = true; - (yyval.type_specifier)->array_size = NULL; - ;} - break; - - case 177: - -/* Line 1464 of yacc.c */ -#line 1336 "glsl_parser.yy" - { - (yyval.type_specifier) = (yyvsp[(1) - (4)].type_specifier); - (yyval.type_specifier)->is_array = true; - (yyval.type_specifier)->array_size = (yyvsp[(3) - (4)].expression); - ;} - break; - - case 178: - -/* Line 1464 of yacc.c */ -#line 1345 "glsl_parser.yy" - { - void *ctx = state; - (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].n)); - (yyval.type_specifier)->set_location(yylloc); - ;} - break; - - case 179: - -/* Line 1464 of yacc.c */ -#line 1351 "glsl_parser.yy" - { - void *ctx = state; - (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].struct_specifier)); - (yyval.type_specifier)->set_location(yylloc); - ;} - break; - - case 180: - -/* Line 1464 of yacc.c */ -#line 1357 "glsl_parser.yy" - { - void *ctx = state; - (yyval.type_specifier) = new(ctx) ast_type_specifier((yyvsp[(1) - (1)].identifier)); - (yyval.type_specifier)->set_location(yylloc); - ;} - break; - - case 181: - -/* Line 1464 of yacc.c */ -#line 1365 "glsl_parser.yy" - { (yyval.n) = ast_void; ;} - break; - - case 182: - -/* Line 1464 of yacc.c */ -#line 1366 "glsl_parser.yy" - { (yyval.n) = ast_float; ;} - break; - - case 183: - -/* Line 1464 of yacc.c */ -#line 1367 "glsl_parser.yy" - { (yyval.n) = ast_int; ;} - break; - - case 184: - -/* Line 1464 of yacc.c */ -#line 1368 "glsl_parser.yy" - { (yyval.n) = ast_uint; ;} - break; - - case 185: - -/* Line 1464 of yacc.c */ -#line 1369 "glsl_parser.yy" - { (yyval.n) = ast_bool; ;} - break; - - case 186: - -/* Line 1464 of yacc.c */ -#line 1370 "glsl_parser.yy" - { (yyval.n) = ast_vec2; ;} - break; - - case 187: - -/* Line 1464 of yacc.c */ -#line 1371 "glsl_parser.yy" - { (yyval.n) = ast_vec3; ;} - break; - - case 188: - -/* Line 1464 of yacc.c */ -#line 1372 "glsl_parser.yy" - { (yyval.n) = ast_vec4; ;} - break; - - case 189: - -/* Line 1464 of yacc.c */ -#line 1373 "glsl_parser.yy" - { (yyval.n) = ast_bvec2; ;} - break; - - case 190: - -/* Line 1464 of yacc.c */ -#line 1374 "glsl_parser.yy" - { (yyval.n) = ast_bvec3; ;} - break; - - case 191: - -/* Line 1464 of yacc.c */ -#line 1375 "glsl_parser.yy" - { (yyval.n) = ast_bvec4; ;} - break; - - case 192: - -/* Line 1464 of yacc.c */ -#line 1376 "glsl_parser.yy" - { (yyval.n) = ast_ivec2; ;} - break; - - case 193: - -/* Line 1464 of yacc.c */ -#line 1377 "glsl_parser.yy" - { (yyval.n) = ast_ivec3; ;} - break; - - case 194: - -/* Line 1464 of yacc.c */ -#line 1378 "glsl_parser.yy" - { (yyval.n) = ast_ivec4; ;} - break; - - case 195: - -/* Line 1464 of yacc.c */ -#line 1379 "glsl_parser.yy" - { (yyval.n) = ast_uvec2; ;} - break; - - case 196: - -/* Line 1464 of yacc.c */ -#line 1380 "glsl_parser.yy" - { (yyval.n) = ast_uvec3; ;} - break; - - case 197: - -/* Line 1464 of yacc.c */ -#line 1381 "glsl_parser.yy" - { (yyval.n) = ast_uvec4; ;} - break; - - case 198: - -/* Line 1464 of yacc.c */ -#line 1382 "glsl_parser.yy" - { (yyval.n) = ast_mat2; ;} - break; - - case 199: - -/* Line 1464 of yacc.c */ -#line 1383 "glsl_parser.yy" - { (yyval.n) = ast_mat2x3; ;} - break; - - case 200: - -/* Line 1464 of yacc.c */ -#line 1384 "glsl_parser.yy" - { (yyval.n) = ast_mat2x4; ;} - break; - - case 201: - -/* Line 1464 of yacc.c */ -#line 1385 "glsl_parser.yy" - { (yyval.n) = ast_mat3x2; ;} - break; - - case 202: - -/* Line 1464 of yacc.c */ -#line 1386 "glsl_parser.yy" - { (yyval.n) = ast_mat3; ;} - break; - - case 203: - -/* Line 1464 of yacc.c */ -#line 1387 "glsl_parser.yy" - { (yyval.n) = ast_mat3x4; ;} - break; - - case 204: - -/* Line 1464 of yacc.c */ -#line 1388 "glsl_parser.yy" - { (yyval.n) = ast_mat4x2; ;} - break; - - case 205: - -/* Line 1464 of yacc.c */ -#line 1389 "glsl_parser.yy" - { (yyval.n) = ast_mat4x3; ;} - break; - - case 206: - -/* Line 1464 of yacc.c */ -#line 1390 "glsl_parser.yy" - { (yyval.n) = ast_mat4; ;} - break; - - case 207: - -/* Line 1464 of yacc.c */ -#line 1391 "glsl_parser.yy" - { (yyval.n) = ast_sampler1d; ;} - break; - - case 208: - -/* Line 1464 of yacc.c */ -#line 1392 "glsl_parser.yy" - { (yyval.n) = ast_sampler2d; ;} - break; - - case 209: - -/* Line 1464 of yacc.c */ -#line 1393 "glsl_parser.yy" - { (yyval.n) = ast_sampler2drect; ;} - break; - - case 210: - -/* Line 1464 of yacc.c */ -#line 1394 "glsl_parser.yy" - { (yyval.n) = ast_sampler3d; ;} - break; - - case 211: - -/* Line 1464 of yacc.c */ -#line 1395 "glsl_parser.yy" - { (yyval.n) = ast_samplercube; ;} - break; - - case 212: - -/* Line 1464 of yacc.c */ -#line 1396 "glsl_parser.yy" - { (yyval.n) = ast_samplerexternaloes; ;} - break; - - case 213: - -/* Line 1464 of yacc.c */ -#line 1397 "glsl_parser.yy" - { (yyval.n) = ast_sampler1dshadow; ;} - break; - - case 214: - -/* Line 1464 of yacc.c */ -#line 1398 "glsl_parser.yy" - { (yyval.n) = ast_sampler2dshadow; ;} - break; - - case 215: - -/* Line 1464 of yacc.c */ -#line 1399 "glsl_parser.yy" - { (yyval.n) = ast_sampler2drectshadow; ;} - break; - - case 216: - -/* Line 1464 of yacc.c */ -#line 1400 "glsl_parser.yy" - { (yyval.n) = ast_samplercubeshadow; ;} - break; - - case 217: - -/* Line 1464 of yacc.c */ -#line 1401 "glsl_parser.yy" - { (yyval.n) = ast_sampler1darray; ;} - break; - - case 218: - -/* Line 1464 of yacc.c */ -#line 1402 "glsl_parser.yy" - { (yyval.n) = ast_sampler2darray; ;} - break; - - case 219: - -/* Line 1464 of yacc.c */ -#line 1403 "glsl_parser.yy" - { (yyval.n) = ast_sampler1darrayshadow; ;} - break; - - case 220: - -/* Line 1464 of yacc.c */ -#line 1404 "glsl_parser.yy" - { (yyval.n) = ast_sampler2darrayshadow; ;} - break; - - case 221: - -/* Line 1464 of yacc.c */ -#line 1405 "glsl_parser.yy" - { (yyval.n) = ast_isampler1d; ;} - break; - - case 222: - -/* Line 1464 of yacc.c */ -#line 1406 "glsl_parser.yy" - { (yyval.n) = ast_isampler2d; ;} - break; - - case 223: - -/* Line 1464 of yacc.c */ -#line 1407 "glsl_parser.yy" - { (yyval.n) = ast_isampler3d; ;} - break; - - case 224: - -/* Line 1464 of yacc.c */ -#line 1408 "glsl_parser.yy" - { (yyval.n) = ast_isamplercube; ;} - break; - - case 225: - -/* Line 1464 of yacc.c */ -#line 1409 "glsl_parser.yy" - { (yyval.n) = ast_isampler1darray; ;} - break; - - case 226: - -/* Line 1464 of yacc.c */ -#line 1410 "glsl_parser.yy" - { (yyval.n) = ast_isampler2darray; ;} - break; - - case 227: - -/* Line 1464 of yacc.c */ -#line 1411 "glsl_parser.yy" - { (yyval.n) = ast_usampler1d; ;} - break; - - case 228: - -/* Line 1464 of yacc.c */ -#line 1412 "glsl_parser.yy" - { (yyval.n) = ast_usampler2d; ;} - break; - - case 229: - -/* Line 1464 of yacc.c */ -#line 1413 "glsl_parser.yy" - { (yyval.n) = ast_usampler3d; ;} - break; - - case 230: - -/* Line 1464 of yacc.c */ -#line 1414 "glsl_parser.yy" - { (yyval.n) = ast_usamplercube; ;} - break; - - case 231: - -/* Line 1464 of yacc.c */ -#line 1415 "glsl_parser.yy" - { (yyval.n) = ast_usampler1darray; ;} - break; - - case 232: - -/* Line 1464 of yacc.c */ -#line 1416 "glsl_parser.yy" - { (yyval.n) = ast_usampler2darray; ;} - break; - - case 233: - -/* Line 1464 of yacc.c */ -#line 1420 "glsl_parser.yy" - { - if (!state->es_shader && state->language_version < 130) - _mesa_glsl_error(& (yylsp[(1) - (1)]), state, - "precision qualifier forbidden " - "in %s (1.30 or later " - "required)\n", - state->version_string); - - (yyval.n) = ast_precision_high; - ;} - break; - - case 234: - -/* Line 1464 of yacc.c */ -#line 1430 "glsl_parser.yy" - { - if (!state->es_shader && state->language_version < 130) - _mesa_glsl_error(& (yylsp[(1) - (1)]), state, - "precision qualifier forbidden " - "in %s (1.30 or later " - "required)\n", - state->version_string); - - (yyval.n) = ast_precision_medium; - ;} - break; - - case 235: - -/* Line 1464 of yacc.c */ -#line 1440 "glsl_parser.yy" - { - if (!state->es_shader && state->language_version < 130) - _mesa_glsl_error(& (yylsp[(1) - (1)]), state, - "precision qualifier forbidden " - "in %s (1.30 or later " - "required)\n", - state->version_string); - - (yyval.n) = ast_precision_low; - ;} - break; - - case 236: - -/* Line 1464 of yacc.c */ -#line 1454 "glsl_parser.yy" - { - void *ctx = state; - (yyval.struct_specifier) = new(ctx) ast_struct_specifier((yyvsp[(2) - (5)].identifier), (yyvsp[(4) - (5)].node)); - (yyval.struct_specifier)->set_location(yylloc); - state->symbols->add_type((yyvsp[(2) - (5)].identifier), glsl_type::void_type); - ;} - break; - - case 237: - -/* Line 1464 of yacc.c */ -#line 1461 "glsl_parser.yy" - { - void *ctx = state; - (yyval.struct_specifier) = new(ctx) ast_struct_specifier(NULL, (yyvsp[(3) - (4)].node)); - (yyval.struct_specifier)->set_location(yylloc); - ;} - break; - - case 238: - -/* Line 1464 of yacc.c */ -#line 1470 "glsl_parser.yy" - { - (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].declarator_list); - (yyvsp[(1) - (1)].declarator_list)->link.self_link(); - ;} - break; - - case 239: - -/* Line 1464 of yacc.c */ -#line 1475 "glsl_parser.yy" - { - (yyval.node) = (ast_node *) (yyvsp[(1) - (2)].node); - (yyval.node)->link.insert_before(& (yyvsp[(2) - (2)].declarator_list)->link); - ;} - break; - - case 240: - -/* Line 1464 of yacc.c */ -#line 1483 "glsl_parser.yy" - { - void *ctx = state; - ast_fully_specified_type *type = new(ctx) ast_fully_specified_type(); - type->set_location(yylloc); - - type->specifier = (yyvsp[(1) - (3)].type_specifier); - (yyval.declarator_list) = new(ctx) ast_declarator_list(type); - (yyval.declarator_list)->set_location(yylloc); - - (yyval.declarator_list)->declarations.push_degenerate_list_at_head(& (yyvsp[(2) - (3)].declaration)->link); - ;} - break; - - case 241: - -/* Line 1464 of yacc.c */ -#line 1498 "glsl_parser.yy" - { - (yyval.declaration) = (yyvsp[(1) - (1)].declaration); - (yyvsp[(1) - (1)].declaration)->link.self_link(); - ;} - break; - - case 242: - -/* Line 1464 of yacc.c */ -#line 1503 "glsl_parser.yy" - { - (yyval.declaration) = (yyvsp[(1) - (3)].declaration); - (yyval.declaration)->link.insert_before(& (yyvsp[(3) - (3)].declaration)->link); - ;} - break; - - case 243: - -/* Line 1464 of yacc.c */ -#line 1511 "glsl_parser.yy" - { - void *ctx = state; - (yyval.declaration) = new(ctx) ast_declaration((yyvsp[(1) - (1)].identifier), false, NULL, NULL); - (yyval.declaration)->set_location(yylloc); - state->symbols->add_variable(new(state) ir_variable(NULL, (yyvsp[(1) - (1)].identifier), ir_var_auto)); - ;} - break; - - case 244: - -/* Line 1464 of yacc.c */ -#line 1518 "glsl_parser.yy" - { - void *ctx = state; - (yyval.declaration) = new(ctx) ast_declaration((yyvsp[(1) - (4)].identifier), true, (yyvsp[(3) - (4)].expression), NULL); - (yyval.declaration)->set_location(yylloc); - ;} - break; - - case 247: - -/* Line 1464 of yacc.c */ -#line 1536 "glsl_parser.yy" - { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); ;} - break; - - case 255: - -/* Line 1464 of yacc.c */ -#line 1551 "glsl_parser.yy" - { - void *ctx = state; - (yyval.compound_statement) = new(ctx) ast_compound_statement(true, NULL); - (yyval.compound_statement)->set_location(yylloc); - ;} - break; - - case 256: - -/* Line 1464 of yacc.c */ -#line 1557 "glsl_parser.yy" - { - state->symbols->push_scope(); - ;} - break; - - case 257: - -/* Line 1464 of yacc.c */ -#line 1561 "glsl_parser.yy" - { - void *ctx = state; - (yyval.compound_statement) = new(ctx) ast_compound_statement(true, (yyvsp[(3) - (4)].node)); - (yyval.compound_statement)->set_location(yylloc); - state->symbols->pop_scope(); - ;} - break; - - case 258: - -/* Line 1464 of yacc.c */ -#line 1570 "glsl_parser.yy" - { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); ;} - break; - - case 260: - -/* Line 1464 of yacc.c */ -#line 1576 "glsl_parser.yy" - { - void *ctx = state; - (yyval.compound_statement) = new(ctx) ast_compound_statement(false, NULL); - (yyval.compound_statement)->set_location(yylloc); - ;} - break; - - case 261: - -/* Line 1464 of yacc.c */ -#line 1582 "glsl_parser.yy" - { - void *ctx = state; - (yyval.compound_statement) = new(ctx) ast_compound_statement(false, (yyvsp[(2) - (3)].node)); - (yyval.compound_statement)->set_location(yylloc); - ;} - break; - - case 262: - -/* Line 1464 of yacc.c */ -#line 1591 "glsl_parser.yy" - { - if ((yyvsp[(1) - (1)].node) == NULL) { - _mesa_glsl_error(& (yylsp[(1) - (1)]), state, " statement\n"); - assert((yyvsp[(1) - (1)].node) != NULL); - } - - (yyval.node) = (yyvsp[(1) - (1)].node); - (yyval.node)->link.self_link(); - ;} - break; - - case 263: - -/* Line 1464 of yacc.c */ -#line 1601 "glsl_parser.yy" - { - if ((yyvsp[(2) - (2)].node) == NULL) { - _mesa_glsl_error(& (yylsp[(2) - (2)]), state, " statement\n"); - assert((yyvsp[(2) - (2)].node) != NULL); - } - (yyval.node) = (yyvsp[(1) - (2)].node); - (yyval.node)->link.insert_before(& (yyvsp[(2) - (2)].node)->link); - ;} - break; - - case 264: - -/* Line 1464 of yacc.c */ -#line 1613 "glsl_parser.yy" - { - void *ctx = state; - (yyval.node) = new(ctx) ast_expression_statement(NULL); - (yyval.node)->set_location(yylloc); - ;} - break; - - case 265: - -/* Line 1464 of yacc.c */ -#line 1619 "glsl_parser.yy" - { - void *ctx = state; - (yyval.node) = new(ctx) ast_expression_statement((yyvsp[(1) - (2)].expression)); - (yyval.node)->set_location(yylloc); - ;} - break; - - case 266: - -/* Line 1464 of yacc.c */ -#line 1628 "glsl_parser.yy" - { - (yyval.node) = new(state) ast_selection_statement((yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].selection_rest_statement).then_statement, - (yyvsp[(5) - (5)].selection_rest_statement).else_statement); - (yyval.node)->set_location(yylloc); - ;} - break; - - case 267: - -/* Line 1464 of yacc.c */ -#line 1637 "glsl_parser.yy" - { - (yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (3)].node); - (yyval.selection_rest_statement).else_statement = (yyvsp[(3) - (3)].node); - ;} - break; - - case 268: - -/* Line 1464 of yacc.c */ -#line 1642 "glsl_parser.yy" - { - (yyval.selection_rest_statement).then_statement = (yyvsp[(1) - (1)].node); - (yyval.selection_rest_statement).else_statement = NULL; - ;} - break; - - case 269: - -/* Line 1464 of yacc.c */ -#line 1650 "glsl_parser.yy" - { - (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].expression); - ;} - break; - - case 270: - -/* Line 1464 of yacc.c */ -#line 1654 "glsl_parser.yy" - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration((yyvsp[(2) - (4)].identifier), false, NULL, (yyvsp[(4) - (4)].expression)); - ast_declarator_list *declarator = new(ctx) ast_declarator_list((yyvsp[(1) - (4)].fully_specified_type)); - decl->set_location(yylloc); - declarator->set_location(yylloc); - - declarator->declarations.push_tail(&decl->link); - (yyval.node) = declarator; - ;} - break; - - case 271: - -/* Line 1464 of yacc.c */ -#line 1672 "glsl_parser.yy" - { - (yyval.node) = new(state) ast_switch_statement((yyvsp[(3) - (5)].expression), (yyvsp[(5) - (5)].switch_body)); - (yyval.node)->set_location(yylloc); - ;} - break; - - case 272: - -/* Line 1464 of yacc.c */ -#line 1680 "glsl_parser.yy" - { - (yyval.switch_body) = new(state) ast_switch_body(NULL); - (yyval.switch_body)->set_location(yylloc); - ;} - break; - - case 273: - -/* Line 1464 of yacc.c */ -#line 1685 "glsl_parser.yy" - { - (yyval.switch_body) = new(state) ast_switch_body((yyvsp[(2) - (3)].case_statement_list)); - (yyval.switch_body)->set_location(yylloc); - ;} - break; - - case 274: - -/* Line 1464 of yacc.c */ -#line 1693 "glsl_parser.yy" - { - (yyval.case_label) = new(state) ast_case_label((yyvsp[(2) - (3)].expression)); - (yyval.case_label)->set_location(yylloc); - ;} - break; - - case 275: - -/* Line 1464 of yacc.c */ -#line 1698 "glsl_parser.yy" - { - (yyval.case_label) = new(state) ast_case_label(NULL); - (yyval.case_label)->set_location(yylloc); - ;} - break; - - case 276: - -/* Line 1464 of yacc.c */ -#line 1706 "glsl_parser.yy" - { - ast_case_label_list *labels = new(state) ast_case_label_list(); - - labels->labels.push_tail(& (yyvsp[(1) - (1)].case_label)->link); - (yyval.case_label_list) = labels; - (yyval.case_label_list)->set_location(yylloc); - ;} - break; - - case 277: - -/* Line 1464 of yacc.c */ -#line 1714 "glsl_parser.yy" - { - (yyval.case_label_list) = (yyvsp[(1) - (2)].case_label_list); - (yyval.case_label_list)->labels.push_tail(& (yyvsp[(2) - (2)].case_label)->link); - ;} - break; - - case 278: - -/* Line 1464 of yacc.c */ -#line 1722 "glsl_parser.yy" - { - ast_case_statement *stmts = new(state) ast_case_statement((yyvsp[(1) - (2)].case_label_list)); - stmts->set_location(yylloc); - - stmts->stmts.push_tail(& (yyvsp[(2) - (2)].node)->link); - (yyval.case_statement) = stmts; - ;} - break; - - case 279: - -/* Line 1464 of yacc.c */ -#line 1730 "glsl_parser.yy" - { - (yyval.case_statement) = (yyvsp[(1) - (2)].case_statement); - (yyval.case_statement)->stmts.push_tail(& (yyvsp[(2) - (2)].node)->link); - ;} - break; - - case 280: - -/* Line 1464 of yacc.c */ -#line 1738 "glsl_parser.yy" - { - ast_case_statement_list *cases= new(state) ast_case_statement_list(); - cases->set_location(yylloc); - - cases->cases.push_tail(& (yyvsp[(1) - (1)].case_statement)->link); - (yyval.case_statement_list) = cases; - ;} - break; - - case 281: - -/* Line 1464 of yacc.c */ -#line 1746 "glsl_parser.yy" - { - (yyval.case_statement_list) = (yyvsp[(1) - (2)].case_statement_list); - (yyval.case_statement_list)->cases.push_tail(& (yyvsp[(2) - (2)].case_statement)->link); - ;} - break; - - case 282: - -/* Line 1464 of yacc.c */ -#line 1754 "glsl_parser.yy" - { - void *ctx = state; - (yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_while, - NULL, (yyvsp[(3) - (5)].node), NULL, (yyvsp[(5) - (5)].node)); - (yyval.node)->set_location(yylloc); - ;} - break; - - case 283: - -/* Line 1464 of yacc.c */ -#line 1761 "glsl_parser.yy" - { - void *ctx = state; - (yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_do_while, - NULL, (yyvsp[(5) - (7)].expression), NULL, (yyvsp[(2) - (7)].node)); - (yyval.node)->set_location(yylloc); - ;} - break; - - case 284: - -/* Line 1464 of yacc.c */ -#line 1768 "glsl_parser.yy" - { - void *ctx = state; - (yyval.node) = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_for, - (yyvsp[(3) - (6)].node), (yyvsp[(4) - (6)].for_rest_statement).cond, (yyvsp[(4) - (6)].for_rest_statement).rest, (yyvsp[(6) - (6)].node)); - (yyval.node)->set_location(yylloc); - ;} - break; - - case 288: - -/* Line 1464 of yacc.c */ -#line 1784 "glsl_parser.yy" - { - (yyval.node) = NULL; - ;} - break; - - case 289: - -/* Line 1464 of yacc.c */ -#line 1791 "glsl_parser.yy" - { - (yyval.for_rest_statement).cond = (yyvsp[(1) - (2)].node); - (yyval.for_rest_statement).rest = NULL; - ;} - break; - - case 290: - -/* Line 1464 of yacc.c */ -#line 1796 "glsl_parser.yy" - { - (yyval.for_rest_statement).cond = (yyvsp[(1) - (3)].node); - (yyval.for_rest_statement).rest = (yyvsp[(3) - (3)].expression); - ;} - break; - - case 291: - -/* Line 1464 of yacc.c */ -#line 1805 "glsl_parser.yy" - { - void *ctx = state; - (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_continue, NULL); - (yyval.node)->set_location(yylloc); - ;} - break; - - case 292: - -/* Line 1464 of yacc.c */ -#line 1811 "glsl_parser.yy" - { - void *ctx = state; - (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_break, NULL); - (yyval.node)->set_location(yylloc); - ;} - break; - - case 293: - -/* Line 1464 of yacc.c */ -#line 1817 "glsl_parser.yy" - { - void *ctx = state; - (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, NULL); - (yyval.node)->set_location(yylloc); - ;} - break; - - case 294: - -/* Line 1464 of yacc.c */ -#line 1823 "glsl_parser.yy" - { - void *ctx = state; - (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, (yyvsp[(2) - (3)].expression)); - (yyval.node)->set_location(yylloc); - ;} - break; - - case 295: - -/* Line 1464 of yacc.c */ -#line 1829 "glsl_parser.yy" - { - void *ctx = state; - (yyval.node) = new(ctx) ast_jump_statement(ast_jump_statement::ast_discard, NULL); - (yyval.node)->set_location(yylloc); - ;} - break; - - case 296: - -/* Line 1464 of yacc.c */ -#line 1837 "glsl_parser.yy" - { (yyval.node) = (yyvsp[(1) - (1)].function_definition); ;} - break; - - case 297: - -/* Line 1464 of yacc.c */ -#line 1838 "glsl_parser.yy" - { (yyval.node) = (yyvsp[(1) - (1)].node); ;} - break; - - case 298: - -/* Line 1464 of yacc.c */ -#line 1839 "glsl_parser.yy" - { (yyval.node) = NULL; ;} - break; - - case 299: - -/* Line 1464 of yacc.c */ -#line 1844 "glsl_parser.yy" - { - void *ctx = state; - (yyval.function_definition) = new(ctx) ast_function_definition(); - (yyval.function_definition)->set_location(yylloc); - (yyval.function_definition)->prototype = (yyvsp[(1) - (2)].function); - (yyval.function_definition)->body = (yyvsp[(2) - (2)].compound_statement); - - state->symbols->pop_scope(); - ;} - break; - - - -/* Line 1464 of yacc.c */ -#line 5424 "glsl_parser.cpp" - default: break; - } - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - *++yylsp = yyloc; - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (&yylloc, state, YY_("syntax error")); -#else - { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (&yylloc, state, yymsg); - } - else - { - yyerror (&yylloc, state, YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } - } -#endif - } - - yyerror_range[1] = yylloc; - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, state); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - yyerror_range[1] = yylsp[1-yylen]; - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - yyerror_range[1] = *yylsp; - yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp, state); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - *++yyvsp = yylval; - - yyerror_range[2] = yylloc; - /* Using YYLLOC is tempting, but would change the location of - the lookahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, yyerror_range, 2); - *++yylsp = yyloc; - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined(yyoverflow) || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (&yylloc, state, YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, state); - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yylsp, state); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - - diff --git a/dll/opengl/mesa/src/glsl/glsl_parser.h b/dll/opengl/mesa/src/glsl/glsl_parser.h deleted file mode 100644 index 485f3ba7fdc..00000000000 --- a/dll/opengl/mesa/src/glsl/glsl_parser.h +++ /dev/null @@ -1,306 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.4.3. */ - -/* Skeleton interface for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2009, 2010 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - ATTRIBUTE = 258, - CONST_TOK = 259, - BOOL_TOK = 260, - FLOAT_TOK = 261, - INT_TOK = 262, - UINT_TOK = 263, - BREAK = 264, - CONTINUE = 265, - DO = 266, - ELSE = 267, - FOR = 268, - IF = 269, - DISCARD = 270, - RETURN = 271, - SWITCH = 272, - CASE = 273, - DEFAULT = 274, - BVEC2 = 275, - BVEC3 = 276, - BVEC4 = 277, - IVEC2 = 278, - IVEC3 = 279, - IVEC4 = 280, - UVEC2 = 281, - UVEC3 = 282, - UVEC4 = 283, - VEC2 = 284, - VEC3 = 285, - VEC4 = 286, - CENTROID = 287, - IN_TOK = 288, - OUT_TOK = 289, - INOUT_TOK = 290, - UNIFORM = 291, - VARYING = 292, - NOPERSPECTIVE = 293, - FLAT = 294, - SMOOTH = 295, - MAT2X2 = 296, - MAT2X3 = 297, - MAT2X4 = 298, - MAT3X2 = 299, - MAT3X3 = 300, - MAT3X4 = 301, - MAT4X2 = 302, - MAT4X3 = 303, - MAT4X4 = 304, - SAMPLER1D = 305, - SAMPLER2D = 306, - SAMPLER3D = 307, - SAMPLERCUBE = 308, - SAMPLER1DSHADOW = 309, - SAMPLER2DSHADOW = 310, - SAMPLERCUBESHADOW = 311, - SAMPLER1DARRAY = 312, - SAMPLER2DARRAY = 313, - SAMPLER1DARRAYSHADOW = 314, - SAMPLER2DARRAYSHADOW = 315, - ISAMPLER1D = 316, - ISAMPLER2D = 317, - ISAMPLER3D = 318, - ISAMPLERCUBE = 319, - ISAMPLER1DARRAY = 320, - ISAMPLER2DARRAY = 321, - USAMPLER1D = 322, - USAMPLER2D = 323, - USAMPLER3D = 324, - USAMPLERCUBE = 325, - USAMPLER1DARRAY = 326, - USAMPLER2DARRAY = 327, - SAMPLEREXTERNALOES = 328, - STRUCT = 329, - VOID_TOK = 330, - WHILE = 331, - IDENTIFIER = 332, - TYPE_IDENTIFIER = 333, - NEW_IDENTIFIER = 334, - FLOATCONSTANT = 335, - INTCONSTANT = 336, - UINTCONSTANT = 337, - BOOLCONSTANT = 338, - FIELD_SELECTION = 339, - LEFT_OP = 340, - RIGHT_OP = 341, - INC_OP = 342, - DEC_OP = 343, - LE_OP = 344, - GE_OP = 345, - EQ_OP = 346, - NE_OP = 347, - AND_OP = 348, - OR_OP = 349, - XOR_OP = 350, - MUL_ASSIGN = 351, - DIV_ASSIGN = 352, - ADD_ASSIGN = 353, - MOD_ASSIGN = 354, - LEFT_ASSIGN = 355, - RIGHT_ASSIGN = 356, - AND_ASSIGN = 357, - XOR_ASSIGN = 358, - OR_ASSIGN = 359, - SUB_ASSIGN = 360, - INVARIANT = 361, - LOWP = 362, - MEDIUMP = 363, - HIGHP = 364, - SUPERP = 365, - PRECISION = 366, - VERSION_TOK = 367, - EXTENSION = 368, - LINE = 369, - COLON = 370, - EOL = 371, - INTERFACE = 372, - OUTPUT = 373, - PRAGMA_DEBUG_ON = 374, - PRAGMA_DEBUG_OFF = 375, - PRAGMA_OPTIMIZE_ON = 376, - PRAGMA_OPTIMIZE_OFF = 377, - PRAGMA_INVARIANT_ALL = 378, - LAYOUT_TOK = 379, - ASM = 380, - CLASS = 381, - UNION = 382, - ENUM = 383, - TYPEDEF = 384, - TEMPLATE = 385, - THIS = 386, - PACKED_TOK = 387, - GOTO = 388, - INLINE_TOK = 389, - NOINLINE = 390, - VOLATILE = 391, - PUBLIC_TOK = 392, - STATIC = 393, - EXTERN = 394, - EXTERNAL = 395, - LONG_TOK = 396, - SHORT_TOK = 397, - DOUBLE_TOK = 398, - HALF = 399, - FIXED_TOK = 400, - UNSIGNED = 401, - INPUT_TOK = 402, - OUPTUT = 403, - HVEC2 = 404, - HVEC3 = 405, - HVEC4 = 406, - DVEC2 = 407, - DVEC3 = 408, - DVEC4 = 409, - FVEC2 = 410, - FVEC3 = 411, - FVEC4 = 412, - SAMPLER2DRECT = 413, - SAMPLER3DRECT = 414, - SAMPLER2DRECTSHADOW = 415, - SIZEOF = 416, - CAST = 417, - NAMESPACE = 418, - USING = 419, - ERROR_TOK = 420, - COMMON = 421, - PARTITION = 422, - ACTIVE = 423, - SAMPLERBUFFER = 424, - FILTER = 425, - IMAGE1D = 426, - IMAGE2D = 427, - IMAGE3D = 428, - IMAGECUBE = 429, - IMAGE1DARRAY = 430, - IMAGE2DARRAY = 431, - IIMAGE1D = 432, - IIMAGE2D = 433, - IIMAGE3D = 434, - IIMAGECUBE = 435, - IIMAGE1DARRAY = 436, - IIMAGE2DARRAY = 437, - UIMAGE1D = 438, - UIMAGE2D = 439, - UIMAGE3D = 440, - UIMAGECUBE = 441, - UIMAGE1DARRAY = 442, - UIMAGE2DARRAY = 443, - IMAGE1DSHADOW = 444, - IMAGE2DSHADOW = 445, - IMAGEBUFFER = 446, - IIMAGEBUFFER = 447, - UIMAGEBUFFER = 448, - IMAGE1DARRAYSHADOW = 449, - IMAGE2DARRAYSHADOW = 450, - ROW_MAJOR = 451 - }; -#endif - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ - -/* Line 1685 of yacc.c */ -#line 58 "glsl_parser.yy" - - int n; - float real; - char *identifier; - - struct ast_type_qualifier type_qualifier; - - ast_node *node; - ast_type_specifier *type_specifier; - ast_fully_specified_type *fully_specified_type; - ast_function *function; - ast_parameter_declarator *parameter_declarator; - ast_function_definition *function_definition; - ast_compound_statement *compound_statement; - ast_expression *expression; - ast_declarator_list *declarator_list; - ast_struct_specifier *struct_specifier; - ast_declaration *declaration; - ast_switch_body *switch_body; - ast_case_label *case_label; - ast_case_label_list *case_label_list; - ast_case_statement *case_statement; - ast_case_statement_list *case_statement_list; - - struct { - ast_node *cond; - ast_expression *rest; - } for_rest_statement; - - struct { - ast_node *then_statement; - ast_node *else_statement; - } selection_rest_statement; - - - -/* Line 1685 of yacc.c */ -#line 284 "glsl_parser.h" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - - - -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 -#endif - - - diff --git a/dll/opengl/mesa/src/glsl/glsl_parser.yy b/dll/opengl/mesa/src/glsl/glsl_parser.yy deleted file mode 100644 index d5e85abc021..00000000000 --- a/dll/opengl/mesa/src/glsl/glsl_parser.yy +++ /dev/null @@ -1,1853 +0,0 @@ -%{ -/* - * Copyright © 2008, 2009 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ -#include -#include -#include -#include - -#include "ast.h" -#include "glsl_parser_extras.h" -#include "glsl_types.h" - -#define YYLEX_PARAM state->scanner - -#undef yyerror - -static void yyerror(YYLTYPE *loc, _mesa_glsl_parse_state *st, const char *msg) -{ - _mesa_glsl_error(loc, st, "%s", msg); -} -%} - -%pure-parser -%error-verbose - -%locations -%initial-action { - @$.first_line = 1; - @$.first_column = 1; - @$.last_line = 1; - @$.last_column = 1; - @$.source = 0; -} - -%lex-param {void *scanner} -%parse-param {struct _mesa_glsl_parse_state *state} - -%union { - int n; - float real; - char *identifier; - - struct ast_type_qualifier type_qualifier; - - ast_node *node; - ast_type_specifier *type_specifier; - ast_fully_specified_type *fully_specified_type; - ast_function *function; - ast_parameter_declarator *parameter_declarator; - ast_function_definition *function_definition; - ast_compound_statement *compound_statement; - ast_expression *expression; - ast_declarator_list *declarator_list; - ast_struct_specifier *struct_specifier; - ast_declaration *declaration; - ast_switch_body *switch_body; - ast_case_label *case_label; - ast_case_label_list *case_label_list; - ast_case_statement *case_statement; - ast_case_statement_list *case_statement_list; - - struct { - ast_node *cond; - ast_expression *rest; - } for_rest_statement; - - struct { - ast_node *then_statement; - ast_node *else_statement; - } selection_rest_statement; -} - -%token ATTRIBUTE CONST_TOK BOOL_TOK FLOAT_TOK INT_TOK UINT_TOK -%token BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT -%token BVEC2 BVEC3 BVEC4 IVEC2 IVEC3 IVEC4 UVEC2 UVEC3 UVEC4 VEC2 VEC3 VEC4 -%token CENTROID IN_TOK OUT_TOK INOUT_TOK UNIFORM VARYING -%token NOPERSPECTIVE FLAT SMOOTH -%token MAT2X2 MAT2X3 MAT2X4 -%token MAT3X2 MAT3X3 MAT3X4 -%token MAT4X2 MAT4X3 MAT4X4 -%token SAMPLER1D SAMPLER2D SAMPLER3D SAMPLERCUBE SAMPLER1DSHADOW SAMPLER2DSHADOW -%token SAMPLERCUBESHADOW SAMPLER1DARRAY SAMPLER2DARRAY SAMPLER1DARRAYSHADOW -%token SAMPLER2DARRAYSHADOW ISAMPLER1D ISAMPLER2D ISAMPLER3D ISAMPLERCUBE -%token ISAMPLER1DARRAY ISAMPLER2DARRAY USAMPLER1D USAMPLER2D USAMPLER3D -%token USAMPLERCUBE USAMPLER1DARRAY USAMPLER2DARRAY -%token SAMPLEREXTERNALOES -%token STRUCT VOID_TOK WHILE -%token IDENTIFIER TYPE_IDENTIFIER NEW_IDENTIFIER -%type any_identifier -%token FLOATCONSTANT -%token INTCONSTANT UINTCONSTANT BOOLCONSTANT -%token FIELD_SELECTION -%token LEFT_OP RIGHT_OP -%token INC_OP DEC_OP LE_OP GE_OP EQ_OP NE_OP -%token AND_OP OR_OP XOR_OP MUL_ASSIGN DIV_ASSIGN ADD_ASSIGN -%token MOD_ASSIGN LEFT_ASSIGN RIGHT_ASSIGN AND_ASSIGN XOR_ASSIGN OR_ASSIGN -%token SUB_ASSIGN -%token INVARIANT -%token LOWP MEDIUMP HIGHP SUPERP PRECISION - -%token VERSION_TOK EXTENSION LINE COLON EOL INTERFACE OUTPUT -%token PRAGMA_DEBUG_ON PRAGMA_DEBUG_OFF -%token PRAGMA_OPTIMIZE_ON PRAGMA_OPTIMIZE_OFF -%token PRAGMA_INVARIANT_ALL -%token LAYOUT_TOK - - /* Reserved words that are not actually used in the grammar. - */ -%token ASM CLASS UNION ENUM TYPEDEF TEMPLATE THIS PACKED_TOK GOTO -%token INLINE_TOK NOINLINE VOLATILE PUBLIC_TOK STATIC EXTERN EXTERNAL -%token LONG_TOK SHORT_TOK DOUBLE_TOK HALF FIXED_TOK UNSIGNED INPUT_TOK OUPTUT -%token HVEC2 HVEC3 HVEC4 DVEC2 DVEC3 DVEC4 FVEC2 FVEC3 FVEC4 -%token SAMPLER2DRECT SAMPLER3DRECT SAMPLER2DRECTSHADOW -%token SIZEOF CAST NAMESPACE USING - -%token ERROR_TOK - -%token COMMON PARTITION ACTIVE SAMPLERBUFFER FILTER -%token IMAGE1D IMAGE2D IMAGE3D IMAGECUBE IMAGE1DARRAY IMAGE2DARRAY -%token IIMAGE1D IIMAGE2D IIMAGE3D IIMAGECUBE IIMAGE1DARRAY IIMAGE2DARRAY -%token UIMAGE1D UIMAGE2D UIMAGE3D UIMAGECUBE UIMAGE1DARRAY UIMAGE2DARRAY -%token IMAGE1DSHADOW IMAGE2DSHADOW IMAGEBUFFER IIMAGEBUFFER UIMAGEBUFFER -%token IMAGE1DARRAYSHADOW IMAGE2DARRAYSHADOW -%token ROW_MAJOR - -%type variable_identifier -%type statement -%type statement_list -%type simple_statement -%type precision_qualifier -%type type_qualifier -%type storage_qualifier -%type interpolation_qualifier -%type layout_qualifier -%type layout_qualifier_id_list layout_qualifier_id -%type type_specifier -%type type_specifier_no_prec -%type type_specifier_nonarray -%type basic_type_specifier_nonarray -%type fully_specified_type -%type function_prototype -%type function_header -%type function_header_with_parameters -%type function_declarator -%type parameter_declarator -%type parameter_declaration -%type parameter_qualifier -%type parameter_type_qualifier -%type parameter_type_specifier -%type function_definition -%type compound_statement_no_new_scope -%type compound_statement -%type statement_no_new_scope -%type expression_statement -%type expression -%type primary_expression -%type assignment_expression -%type conditional_expression -%type logical_or_expression -%type logical_xor_expression -%type logical_and_expression -%type inclusive_or_expression -%type exclusive_or_expression -%type and_expression -%type equality_expression -%type relational_expression -%type shift_expression -%type additive_expression -%type multiplicative_expression -%type unary_expression -%type constant_expression -%type integer_expression -%type postfix_expression -%type function_call_header_with_parameters -%type function_call_header_no_parameters -%type function_call_header -%type function_call_generic -%type function_call_or_method -%type function_call -%type method_call_generic -%type method_call_header_with_parameters -%type method_call_header_no_parameters -%type method_call_header -%type assignment_operator -%type unary_operator -%type function_identifier -%type external_declaration -%type init_declarator_list -%type single_declaration -%type initializer -%type declaration -%type declaration_statement -%type jump_statement -%type struct_specifier -%type struct_declaration_list -%type struct_declaration -%type struct_declarator -%type struct_declarator_list -%type selection_statement -%type selection_rest_statement -%type switch_statement -%type switch_body -%type case_label_list -%type case_label -%type case_statement -%type case_statement_list -%type iteration_statement -%type condition -%type conditionopt -%type for_init_statement -%type for_rest_statement -%% - -translation_unit: - version_statement extension_statement_list - { - _mesa_glsl_initialize_types(state); - } - external_declaration_list - { - delete state->symbols; - state->symbols = new(ralloc_parent(state)) glsl_symbol_table; - _mesa_glsl_initialize_types(state); - } - ; - -version_statement: - /* blank - no #version specified: defaults are already set */ - | VERSION_TOK INTCONSTANT EOL - { - bool supported = false; - - switch ($2) { - case 100: - state->es_shader = true; - supported = state->Const.GLSL_100ES; - break; - case 110: - supported = state->Const.GLSL_110; - break; - case 120: - supported = state->Const.GLSL_120; - break; - case 130: - supported = state->Const.GLSL_130; - break; - default: - supported = false; - break; - } - - state->language_version = $2; - state->version_string = - ralloc_asprintf(state, "GLSL%s %d.%02d", - state->es_shader ? " ES" : "", - state->language_version / 100, - state->language_version % 100); - - if (!supported) { - _mesa_glsl_error(& @2, state, "%s is not supported. " - "Supported versions are: %s\n", - state->version_string, - state->supported_version_string); - } - } - ; - -pragma_statement: - PRAGMA_DEBUG_ON EOL - | PRAGMA_DEBUG_OFF EOL - | PRAGMA_OPTIMIZE_ON EOL - | PRAGMA_OPTIMIZE_OFF EOL - | PRAGMA_INVARIANT_ALL EOL - { - if (state->language_version < 120) { - _mesa_glsl_warning(& @1, state, - "pragma `invariant(all)' not supported in %s", - state->version_string); - } else { - state->all_invariant = true; - } - } - ; - -extension_statement_list: - - | extension_statement_list extension_statement - ; - -any_identifier: - IDENTIFIER - | TYPE_IDENTIFIER - | NEW_IDENTIFIER - ; - -extension_statement: - EXTENSION any_identifier COLON any_identifier EOL - { - if (!_mesa_glsl_process_extension($2, & @2, $4, & @4, state)) { - YYERROR; - } - } - ; - -external_declaration_list: - external_declaration - { - /* FINISHME: The NULL test is required because pragmas are set to - * FINISHME: NULL. (See production rule for external_declaration.) - */ - if ($1 != NULL) - state->translation_unit.push_tail(& $1->link); - } - | external_declaration_list external_declaration - { - /* FINISHME: The NULL test is required because pragmas are set to - * FINISHME: NULL. (See production rule for external_declaration.) - */ - if ($2 != NULL) - state->translation_unit.push_tail(& $2->link); - } - ; - -variable_identifier: - IDENTIFIER - | NEW_IDENTIFIER - ; - -primary_expression: - variable_identifier - { - void *ctx = state; - $$ = new(ctx) ast_expression(ast_identifier, NULL, NULL, NULL); - $$->set_location(yylloc); - $$->primary_expression.identifier = $1; - } - | INTCONSTANT - { - void *ctx = state; - $$ = new(ctx) ast_expression(ast_int_constant, NULL, NULL, NULL); - $$->set_location(yylloc); - $$->primary_expression.int_constant = $1; - } - | UINTCONSTANT - { - void *ctx = state; - $$ = new(ctx) ast_expression(ast_uint_constant, NULL, NULL, NULL); - $$->set_location(yylloc); - $$->primary_expression.uint_constant = $1; - } - | FLOATCONSTANT - { - void *ctx = state; - $$ = new(ctx) ast_expression(ast_float_constant, NULL, NULL, NULL); - $$->set_location(yylloc); - $$->primary_expression.float_constant = $1; - } - | BOOLCONSTANT - { - void *ctx = state; - $$ = new(ctx) ast_expression(ast_bool_constant, NULL, NULL, NULL); - $$->set_location(yylloc); - $$->primary_expression.bool_constant = $1; - } - | '(' expression ')' - { - $$ = $2; - } - ; - -postfix_expression: - primary_expression - | postfix_expression '[' integer_expression ']' - { - void *ctx = state; - $$ = new(ctx) ast_expression(ast_array_index, $1, $3, NULL); - $$->set_location(yylloc); - } - | function_call - { - $$ = $1; - } - | postfix_expression '.' any_identifier - { - void *ctx = state; - $$ = new(ctx) ast_expression(ast_field_selection, $1, NULL, NULL); - $$->set_location(yylloc); - $$->primary_expression.identifier = $3; - } - | postfix_expression INC_OP - { - void *ctx = state; - $$ = new(ctx) ast_expression(ast_post_inc, $1, NULL, NULL); - $$->set_location(yylloc); - } - | postfix_expression DEC_OP - { - void *ctx = state; - $$ = new(ctx) ast_expression(ast_post_dec, $1, NULL, NULL); - $$->set_location(yylloc); - } - ; - -integer_expression: - expression - ; - -function_call: - function_call_or_method - ; - -function_call_or_method: - function_call_generic - | postfix_expression '.' method_call_generic - { - void *ctx = state; - $$ = new(ctx) ast_expression(ast_field_selection, $1, $3, NULL); - $$->set_location(yylloc); - } - ; - -function_call_generic: - function_call_header_with_parameters ')' - | function_call_header_no_parameters ')' - ; - -function_call_header_no_parameters: - function_call_header VOID_TOK - | function_call_header - ; - -function_call_header_with_parameters: - function_call_header assignment_expression - { - $$ = $1; - $$->set_location(yylloc); - $$->expressions.push_tail(& $2->link); - } - | function_call_header_with_parameters ',' assignment_expression - { - $$ = $1; - $$->set_location(yylloc); - $$->expressions.push_tail(& $3->link); - } - ; - - // Grammar Note: Constructors look like functions, but lexical - // analysis recognized most of them as keywords. They are now - // recognized through "type_specifier". -function_call_header: - function_identifier '(' - ; - -function_identifier: - type_specifier - { - void *ctx = state; - $$ = new(ctx) ast_function_expression($1); - $$->set_location(yylloc); - } - | variable_identifier - { - void *ctx = state; - ast_expression *callee = new(ctx) ast_expression($1); - $$ = new(ctx) ast_function_expression(callee); - $$->set_location(yylloc); - } - | FIELD_SELECTION - { - void *ctx = state; - ast_expression *callee = new(ctx) ast_expression($1); - $$ = new(ctx) ast_function_expression(callee); - $$->set_location(yylloc); - } - ; - -method_call_generic: - method_call_header_with_parameters ')' - | method_call_header_no_parameters ')' - ; - -method_call_header_no_parameters: - method_call_header VOID_TOK - | method_call_header - ; - -method_call_header_with_parameters: - method_call_header assignment_expression - { - $$ = $1; - $$->set_location(yylloc); - $$->expressions.push_tail(& $2->link); - } - | method_call_header_with_parameters ',' assignment_expression - { - $$ = $1; - $$->set_location(yylloc); - $$->expressions.push_tail(& $3->link); - } - ; - - // Grammar Note: Constructors look like methods, but lexical - // analysis recognized most of them as keywords. They are now - // recognized through "type_specifier". -method_call_header: - variable_identifier '(' - { - void *ctx = state; - ast_expression *callee = new(ctx) ast_expression($1); - $$ = new(ctx) ast_function_expression(callee); - $$->set_location(yylloc); - } - ; - - // Grammar Note: No traditional style type casts. -unary_expression: - postfix_expression - | INC_OP unary_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression(ast_pre_inc, $2, NULL, NULL); - $$->set_location(yylloc); - } - | DEC_OP unary_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression(ast_pre_dec, $2, NULL, NULL); - $$->set_location(yylloc); - } - | unary_operator unary_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression($1, $2, NULL, NULL); - $$->set_location(yylloc); - } - ; - - // Grammar Note: No '*' or '&' unary ops. Pointers are not supported. -unary_operator: - '+' { $$ = ast_plus; } - | '-' { $$ = ast_neg; } - | '!' { $$ = ast_logic_not; } - | '~' { $$ = ast_bit_not; } - ; - -multiplicative_expression: - unary_expression - | multiplicative_expression '*' unary_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression_bin(ast_mul, $1, $3); - $$->set_location(yylloc); - } - | multiplicative_expression '/' unary_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression_bin(ast_div, $1, $3); - $$->set_location(yylloc); - } - | multiplicative_expression '%' unary_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression_bin(ast_mod, $1, $3); - $$->set_location(yylloc); - } - ; - -additive_expression: - multiplicative_expression - | additive_expression '+' multiplicative_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression_bin(ast_add, $1, $3); - $$->set_location(yylloc); - } - | additive_expression '-' multiplicative_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression_bin(ast_sub, $1, $3); - $$->set_location(yylloc); - } - ; - -shift_expression: - additive_expression - | shift_expression LEFT_OP additive_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression_bin(ast_lshift, $1, $3); - $$->set_location(yylloc); - } - | shift_expression RIGHT_OP additive_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression_bin(ast_rshift, $1, $3); - $$->set_location(yylloc); - } - ; - -relational_expression: - shift_expression - | relational_expression '<' shift_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression_bin(ast_less, $1, $3); - $$->set_location(yylloc); - } - | relational_expression '>' shift_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression_bin(ast_greater, $1, $3); - $$->set_location(yylloc); - } - | relational_expression LE_OP shift_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression_bin(ast_lequal, $1, $3); - $$->set_location(yylloc); - } - | relational_expression GE_OP shift_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression_bin(ast_gequal, $1, $3); - $$->set_location(yylloc); - } - ; - -equality_expression: - relational_expression - | equality_expression EQ_OP relational_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression_bin(ast_equal, $1, $3); - $$->set_location(yylloc); - } - | equality_expression NE_OP relational_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression_bin(ast_nequal, $1, $3); - $$->set_location(yylloc); - } - ; - -and_expression: - equality_expression - | and_expression '&' equality_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression_bin(ast_bit_and, $1, $3); - $$->set_location(yylloc); - } - ; - -exclusive_or_expression: - and_expression - | exclusive_or_expression '^' and_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression_bin(ast_bit_xor, $1, $3); - $$->set_location(yylloc); - } - ; - -inclusive_or_expression: - exclusive_or_expression - | inclusive_or_expression '|' exclusive_or_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression_bin(ast_bit_or, $1, $3); - $$->set_location(yylloc); - } - ; - -logical_and_expression: - inclusive_or_expression - | logical_and_expression AND_OP inclusive_or_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression_bin(ast_logic_and, $1, $3); - $$->set_location(yylloc); - } - ; - -logical_xor_expression: - logical_and_expression - | logical_xor_expression XOR_OP logical_and_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression_bin(ast_logic_xor, $1, $3); - $$->set_location(yylloc); - } - ; - -logical_or_expression: - logical_xor_expression - | logical_or_expression OR_OP logical_xor_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression_bin(ast_logic_or, $1, $3); - $$->set_location(yylloc); - } - ; - -conditional_expression: - logical_or_expression - | logical_or_expression '?' expression ':' assignment_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression(ast_conditional, $1, $3, $5); - $$->set_location(yylloc); - } - ; - -assignment_expression: - conditional_expression - | unary_expression assignment_operator assignment_expression - { - void *ctx = state; - $$ = new(ctx) ast_expression($2, $1, $3, NULL); - $$->set_location(yylloc); - } - ; - -assignment_operator: - '=' { $$ = ast_assign; } - | MUL_ASSIGN { $$ = ast_mul_assign; } - | DIV_ASSIGN { $$ = ast_div_assign; } - | MOD_ASSIGN { $$ = ast_mod_assign; } - | ADD_ASSIGN { $$ = ast_add_assign; } - | SUB_ASSIGN { $$ = ast_sub_assign; } - | LEFT_ASSIGN { $$ = ast_ls_assign; } - | RIGHT_ASSIGN { $$ = ast_rs_assign; } - | AND_ASSIGN { $$ = ast_and_assign; } - | XOR_ASSIGN { $$ = ast_xor_assign; } - | OR_ASSIGN { $$ = ast_or_assign; } - ; - -expression: - assignment_expression - { - $$ = $1; - } - | expression ',' assignment_expression - { - void *ctx = state; - if ($1->oper != ast_sequence) { - $$ = new(ctx) ast_expression(ast_sequence, NULL, NULL, NULL); - $$->set_location(yylloc); - $$->expressions.push_tail(& $1->link); - } else { - $$ = $1; - } - - $$->expressions.push_tail(& $3->link); - } - ; - -constant_expression: - conditional_expression - ; - -declaration: - function_prototype ';' - { - state->symbols->pop_scope(); - $$ = $1; - } - | init_declarator_list ';' - { - $$ = $1; - } - | PRECISION precision_qualifier type_specifier_no_prec ';' - { - $3->precision = $2; - $3->is_precision_statement = true; - $$ = $3; - } - ; - -function_prototype: - function_declarator ')' - ; - -function_declarator: - function_header - | function_header_with_parameters - ; - -function_header_with_parameters: - function_header parameter_declaration - { - $$ = $1; - $$->parameters.push_tail(& $2->link); - } - | function_header_with_parameters ',' parameter_declaration - { - $$ = $1; - $$->parameters.push_tail(& $3->link); - } - ; - -function_header: - fully_specified_type variable_identifier '(' - { - void *ctx = state; - $$ = new(ctx) ast_function(); - $$->set_location(yylloc); - $$->return_type = $1; - $$->identifier = $2; - - state->symbols->add_function(new(state) ir_function($2)); - state->symbols->push_scope(); - } - ; - -parameter_declarator: - type_specifier any_identifier - { - void *ctx = state; - $$ = new(ctx) ast_parameter_declarator(); - $$->set_location(yylloc); - $$->type = new(ctx) ast_fully_specified_type(); - $$->type->set_location(yylloc); - $$->type->specifier = $1; - $$->identifier = $2; - } - | type_specifier any_identifier '[' constant_expression ']' - { - void *ctx = state; - $$ = new(ctx) ast_parameter_declarator(); - $$->set_location(yylloc); - $$->type = new(ctx) ast_fully_specified_type(); - $$->type->set_location(yylloc); - $$->type->specifier = $1; - $$->identifier = $2; - $$->is_array = true; - $$->array_size = $4; - } - ; - -parameter_declaration: - parameter_type_qualifier parameter_qualifier parameter_declarator - { - $1.flags.i |= $2.flags.i; - - $$ = $3; - $$->type->qualifier = $1; - } - | parameter_qualifier parameter_declarator - { - $$ = $2; - $$->type->qualifier = $1; - } - | parameter_type_qualifier parameter_qualifier parameter_type_specifier - { - void *ctx = state; - $1.flags.i |= $2.flags.i; - - $$ = new(ctx) ast_parameter_declarator(); - $$->set_location(yylloc); - $$->type = new(ctx) ast_fully_specified_type(); - $$->type->qualifier = $1; - $$->type->specifier = $3; - } - | parameter_qualifier parameter_type_specifier - { - void *ctx = state; - $$ = new(ctx) ast_parameter_declarator(); - $$->set_location(yylloc); - $$->type = new(ctx) ast_fully_specified_type(); - $$->type->qualifier = $1; - $$->type->specifier = $2; - } - ; - -parameter_qualifier: - /* empty */ - { - memset(& $$, 0, sizeof($$)); - } - | IN_TOK - { - memset(& $$, 0, sizeof($$)); - $$.flags.q.in = 1; - } - | OUT_TOK - { - memset(& $$, 0, sizeof($$)); - $$.flags.q.out = 1; - } - | INOUT_TOK - { - memset(& $$, 0, sizeof($$)); - $$.flags.q.in = 1; - $$.flags.q.out = 1; - } - ; - -parameter_type_specifier: - type_specifier - ; - -init_declarator_list: - single_declaration - | init_declarator_list ',' any_identifier - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration($3, false, NULL, NULL); - decl->set_location(yylloc); - - $$ = $1; - $$->declarations.push_tail(&decl->link); - state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto)); - } - | init_declarator_list ',' any_identifier '[' ']' - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration($3, true, NULL, NULL); - decl->set_location(yylloc); - - $$ = $1; - $$->declarations.push_tail(&decl->link); - state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto)); - } - | init_declarator_list ',' any_identifier '[' constant_expression ']' - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration($3, true, $5, NULL); - decl->set_location(yylloc); - - $$ = $1; - $$->declarations.push_tail(&decl->link); - state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto)); - } - | init_declarator_list ',' any_identifier '[' ']' '=' initializer - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration($3, true, NULL, $7); - decl->set_location(yylloc); - - $$ = $1; - $$->declarations.push_tail(&decl->link); - state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto)); - } - | init_declarator_list ',' any_identifier '[' constant_expression ']' '=' initializer - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration($3, true, $5, $8); - decl->set_location(yylloc); - - $$ = $1; - $$->declarations.push_tail(&decl->link); - state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto)); - } - | init_declarator_list ',' any_identifier '=' initializer - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration($3, false, NULL, $5); - decl->set_location(yylloc); - - $$ = $1; - $$->declarations.push_tail(&decl->link); - state->symbols->add_variable(new(state) ir_variable(NULL, $3, ir_var_auto)); - } - ; - - // Grammar Note: No 'enum', or 'typedef'. -single_declaration: - fully_specified_type - { - void *ctx = state; - /* Empty declaration list is valid. */ - $$ = new(ctx) ast_declarator_list($1); - $$->set_location(yylloc); - } - | fully_specified_type any_identifier - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration($2, false, NULL, NULL); - - $$ = new(ctx) ast_declarator_list($1); - $$->set_location(yylloc); - $$->declarations.push_tail(&decl->link); - } - | fully_specified_type any_identifier '[' ']' - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration($2, true, NULL, NULL); - - $$ = new(ctx) ast_declarator_list($1); - $$->set_location(yylloc); - $$->declarations.push_tail(&decl->link); - } - | fully_specified_type any_identifier '[' constant_expression ']' - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration($2, true, $4, NULL); - - $$ = new(ctx) ast_declarator_list($1); - $$->set_location(yylloc); - $$->declarations.push_tail(&decl->link); - } - | fully_specified_type any_identifier '[' ']' '=' initializer - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration($2, true, NULL, $6); - - $$ = new(ctx) ast_declarator_list($1); - $$->set_location(yylloc); - $$->declarations.push_tail(&decl->link); - } - | fully_specified_type any_identifier '[' constant_expression ']' '=' initializer - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration($2, true, $4, $7); - - $$ = new(ctx) ast_declarator_list($1); - $$->set_location(yylloc); - $$->declarations.push_tail(&decl->link); - } - | fully_specified_type any_identifier '=' initializer - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration($2, false, NULL, $4); - - $$ = new(ctx) ast_declarator_list($1); - $$->set_location(yylloc); - $$->declarations.push_tail(&decl->link); - } - | INVARIANT variable_identifier // Vertex only. - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration($2, false, NULL, NULL); - - $$ = new(ctx) ast_declarator_list(NULL); - $$->set_location(yylloc); - $$->invariant = true; - - $$->declarations.push_tail(&decl->link); - } - ; - -fully_specified_type: - type_specifier - { - void *ctx = state; - $$ = new(ctx) ast_fully_specified_type(); - $$->set_location(yylloc); - $$->specifier = $1; - } - | type_qualifier type_specifier - { - void *ctx = state; - $$ = new(ctx) ast_fully_specified_type(); - $$->set_location(yylloc); - $$->qualifier = $1; - $$->specifier = $2; - } - ; - -layout_qualifier: - LAYOUT_TOK '(' layout_qualifier_id_list ')' - { - $$ = $3; - } - ; - -layout_qualifier_id_list: - layout_qualifier_id - | layout_qualifier_id_list ',' layout_qualifier_id - { - if (($1.flags.i & $3.flags.i) != 0) { - _mesa_glsl_error(& @3, state, - "duplicate layout qualifiers used\n"); - YYERROR; - } - - $$.flags.i = $1.flags.i | $3.flags.i; - - if ($1.flags.q.explicit_location) - $$.location = $1.location; - - if ($3.flags.q.explicit_location) - $$.location = $3.location; - } - ; - -layout_qualifier_id: - any_identifier - { - bool got_one = false; - - memset(& $$, 0, sizeof($$)); - - /* Layout qualifiers for ARB_fragment_coord_conventions. */ - if (!got_one && state->ARB_fragment_coord_conventions_enable) { - if (strcmp($1, "origin_upper_left") == 0) { - got_one = true; - $$.flags.q.origin_upper_left = 1; - } else if (strcmp($1, "pixel_center_integer") == 0) { - got_one = true; - $$.flags.q.pixel_center_integer = 1; - } - - if (got_one && state->ARB_fragment_coord_conventions_warn) { - _mesa_glsl_warning(& @1, state, - "GL_ARB_fragment_coord_conventions layout " - "identifier `%s' used\n", $1); - } - } - - /* Layout qualifiers for AMD/ARB_conservative_depth. */ - if (!got_one && - (state->AMD_conservative_depth_enable || - state->ARB_conservative_depth_enable)) { - if (strcmp($1, "depth_any") == 0) { - got_one = true; - $$.flags.q.depth_any = 1; - } else if (strcmp($1, "depth_greater") == 0) { - got_one = true; - $$.flags.q.depth_greater = 1; - } else if (strcmp($1, "depth_less") == 0) { - got_one = true; - $$.flags.q.depth_less = 1; - } else if (strcmp($1, "depth_unchanged") == 0) { - got_one = true; - $$.flags.q.depth_unchanged = 1; - } - - if (got_one && state->AMD_conservative_depth_warn) { - _mesa_glsl_warning(& @1, state, - "GL_AMD_conservative_depth " - "layout qualifier `%s' is used\n", $1); - } - if (got_one && state->ARB_conservative_depth_warn) { - _mesa_glsl_warning(& @1, state, - "GL_ARB_conservative_depth " - "layout qualifier `%s' is used\n", $1); - } - } - - if (!got_one) { - _mesa_glsl_error(& @1, state, "unrecognized layout identifier " - "`%s'\n", $1); - YYERROR; - } - } - | any_identifier '=' INTCONSTANT - { - bool got_one = false; - - memset(& $$, 0, sizeof($$)); - - if (state->ARB_explicit_attrib_location_enable) { - /* FINISHME: Handle 'index' once GL_ARB_blend_func_exteneded and - * FINISHME: GLSL 1.30 (or later) are supported. - */ - if (strcmp("location", $1) == 0) { - got_one = true; - - $$.flags.q.explicit_location = 1; - - if ($3 >= 0) { - $$.location = $3; - } else { - _mesa_glsl_error(& @3, state, - "invalid location %d specified\n", $3); - YYERROR; - } - } - } - - /* If the identifier didn't match any known layout identifiers, - * emit an error. - */ - if (!got_one) { - _mesa_glsl_error(& @1, state, "unrecognized layout identifier " - "`%s'\n", $1); - YYERROR; - } else if (state->ARB_explicit_attrib_location_warn) { - _mesa_glsl_warning(& @1, state, - "GL_ARB_explicit_attrib_location layout " - "identifier `%s' used\n", $1); - } - } - ; - -interpolation_qualifier: - SMOOTH - { - memset(& $$, 0, sizeof($$)); - $$.flags.q.smooth = 1; - } - | FLAT - { - memset(& $$, 0, sizeof($$)); - $$.flags.q.flat = 1; - } - | NOPERSPECTIVE - { - memset(& $$, 0, sizeof($$)); - $$.flags.q.noperspective = 1; - } - ; - -parameter_type_qualifier: - CONST_TOK - { - memset(& $$, 0, sizeof($$)); - $$.flags.q.constant = 1; - } - ; - -type_qualifier: - storage_qualifier - | layout_qualifier - | layout_qualifier storage_qualifier - { - $$ = $1; - $$.flags.i |= $2.flags.i; - } - | interpolation_qualifier - | interpolation_qualifier storage_qualifier - { - $$ = $1; - $$.flags.i |= $2.flags.i; - } - | INVARIANT storage_qualifier - { - $$ = $2; - $$.flags.q.invariant = 1; - } - | INVARIANT interpolation_qualifier storage_qualifier - { - $$ = $2; - $$.flags.i |= $3.flags.i; - $$.flags.q.invariant = 1; - } - | INVARIANT - { - memset(& $$, 0, sizeof($$)); - $$.flags.q.invariant = 1; - } - ; - -storage_qualifier: - CONST_TOK - { - memset(& $$, 0, sizeof($$)); - $$.flags.q.constant = 1; - } - | ATTRIBUTE - { - memset(& $$, 0, sizeof($$)); - $$.flags.q.attribute = 1; - } - | VARYING - { - memset(& $$, 0, sizeof($$)); - $$.flags.q.varying = 1; - } - | CENTROID VARYING - { - memset(& $$, 0, sizeof($$)); - $$.flags.q.centroid = 1; - $$.flags.q.varying = 1; - } - | IN_TOK - { - memset(& $$, 0, sizeof($$)); - $$.flags.q.in = 1; - } - | OUT_TOK - { - memset(& $$, 0, sizeof($$)); - $$.flags.q.out = 1; - } - | CENTROID IN_TOK - { - memset(& $$, 0, sizeof($$)); - $$.flags.q.centroid = 1; $$.flags.q.in = 1; - } - | CENTROID OUT_TOK - { - memset(& $$, 0, sizeof($$)); - $$.flags.q.centroid = 1; $$.flags.q.out = 1; - } - | UNIFORM - { - memset(& $$, 0, sizeof($$)); - $$.flags.q.uniform = 1; - } - ; - -type_specifier: - type_specifier_no_prec - { - $$ = $1; - } - | precision_qualifier type_specifier_no_prec - { - $$ = $2; - $$->precision = $1; - } - ; - -type_specifier_no_prec: - type_specifier_nonarray - | type_specifier_nonarray '[' ']' - { - $$ = $1; - $$->is_array = true; - $$->array_size = NULL; - } - | type_specifier_nonarray '[' constant_expression ']' - { - $$ = $1; - $$->is_array = true; - $$->array_size = $3; - } - ; - -type_specifier_nonarray: - basic_type_specifier_nonarray - { - void *ctx = state; - $$ = new(ctx) ast_type_specifier($1); - $$->set_location(yylloc); - } - | struct_specifier - { - void *ctx = state; - $$ = new(ctx) ast_type_specifier($1); - $$->set_location(yylloc); - } - | TYPE_IDENTIFIER - { - void *ctx = state; - $$ = new(ctx) ast_type_specifier($1); - $$->set_location(yylloc); - } - ; - -basic_type_specifier_nonarray: - VOID_TOK { $$ = ast_void; } - | FLOAT_TOK { $$ = ast_float; } - | INT_TOK { $$ = ast_int; } - | UINT_TOK { $$ = ast_uint; } - | BOOL_TOK { $$ = ast_bool; } - | VEC2 { $$ = ast_vec2; } - | VEC3 { $$ = ast_vec3; } - | VEC4 { $$ = ast_vec4; } - | BVEC2 { $$ = ast_bvec2; } - | BVEC3 { $$ = ast_bvec3; } - | BVEC4 { $$ = ast_bvec4; } - | IVEC2 { $$ = ast_ivec2; } - | IVEC3 { $$ = ast_ivec3; } - | IVEC4 { $$ = ast_ivec4; } - | UVEC2 { $$ = ast_uvec2; } - | UVEC3 { $$ = ast_uvec3; } - | UVEC4 { $$ = ast_uvec4; } - | MAT2X2 { $$ = ast_mat2; } - | MAT2X3 { $$ = ast_mat2x3; } - | MAT2X4 { $$ = ast_mat2x4; } - | MAT3X2 { $$ = ast_mat3x2; } - | MAT3X3 { $$ = ast_mat3; } - | MAT3X4 { $$ = ast_mat3x4; } - | MAT4X2 { $$ = ast_mat4x2; } - | MAT4X3 { $$ = ast_mat4x3; } - | MAT4X4 { $$ = ast_mat4; } - | SAMPLER1D { $$ = ast_sampler1d; } - | SAMPLER2D { $$ = ast_sampler2d; } - | SAMPLER2DRECT { $$ = ast_sampler2drect; } - | SAMPLER3D { $$ = ast_sampler3d; } - | SAMPLERCUBE { $$ = ast_samplercube; } - | SAMPLEREXTERNALOES { $$ = ast_samplerexternaloes; } - | SAMPLER1DSHADOW { $$ = ast_sampler1dshadow; } - | SAMPLER2DSHADOW { $$ = ast_sampler2dshadow; } - | SAMPLER2DRECTSHADOW { $$ = ast_sampler2drectshadow; } - | SAMPLERCUBESHADOW { $$ = ast_samplercubeshadow; } - | SAMPLER1DARRAY { $$ = ast_sampler1darray; } - | SAMPLER2DARRAY { $$ = ast_sampler2darray; } - | SAMPLER1DARRAYSHADOW { $$ = ast_sampler1darrayshadow; } - | SAMPLER2DARRAYSHADOW { $$ = ast_sampler2darrayshadow; } - | ISAMPLER1D { $$ = ast_isampler1d; } - | ISAMPLER2D { $$ = ast_isampler2d; } - | ISAMPLER3D { $$ = ast_isampler3d; } - | ISAMPLERCUBE { $$ = ast_isamplercube; } - | ISAMPLER1DARRAY { $$ = ast_isampler1darray; } - | ISAMPLER2DARRAY { $$ = ast_isampler2darray; } - | USAMPLER1D { $$ = ast_usampler1d; } - | USAMPLER2D { $$ = ast_usampler2d; } - | USAMPLER3D { $$ = ast_usampler3d; } - | USAMPLERCUBE { $$ = ast_usamplercube; } - | USAMPLER1DARRAY { $$ = ast_usampler1darray; } - | USAMPLER2DARRAY { $$ = ast_usampler2darray; } - ; - -precision_qualifier: - HIGHP { - if (!state->es_shader && state->language_version < 130) - _mesa_glsl_error(& @1, state, - "precision qualifier forbidden " - "in %s (1.30 or later " - "required)\n", - state->version_string); - - $$ = ast_precision_high; - } - | MEDIUMP { - if (!state->es_shader && state->language_version < 130) - _mesa_glsl_error(& @1, state, - "precision qualifier forbidden " - "in %s (1.30 or later " - "required)\n", - state->version_string); - - $$ = ast_precision_medium; - } - | LOWP { - if (!state->es_shader && state->language_version < 130) - _mesa_glsl_error(& @1, state, - "precision qualifier forbidden " - "in %s (1.30 or later " - "required)\n", - state->version_string); - - $$ = ast_precision_low; - } - ; - -struct_specifier: - STRUCT any_identifier '{' struct_declaration_list '}' - { - void *ctx = state; - $$ = new(ctx) ast_struct_specifier($2, $4); - $$->set_location(yylloc); - state->symbols->add_type($2, glsl_type::void_type); - } - | STRUCT '{' struct_declaration_list '}' - { - void *ctx = state; - $$ = new(ctx) ast_struct_specifier(NULL, $3); - $$->set_location(yylloc); - } - ; - -struct_declaration_list: - struct_declaration - { - $$ = (ast_node *) $1; - $1->link.self_link(); - } - | struct_declaration_list struct_declaration - { - $$ = (ast_node *) $1; - $$->link.insert_before(& $2->link); - } - ; - -struct_declaration: - type_specifier struct_declarator_list ';' - { - void *ctx = state; - ast_fully_specified_type *type = new(ctx) ast_fully_specified_type(); - type->set_location(yylloc); - - type->specifier = $1; - $$ = new(ctx) ast_declarator_list(type); - $$->set_location(yylloc); - - $$->declarations.push_degenerate_list_at_head(& $2->link); - } - ; - -struct_declarator_list: - struct_declarator - { - $$ = $1; - $1->link.self_link(); - } - | struct_declarator_list ',' struct_declarator - { - $$ = $1; - $$->link.insert_before(& $3->link); - } - ; - -struct_declarator: - any_identifier - { - void *ctx = state; - $$ = new(ctx) ast_declaration($1, false, NULL, NULL); - $$->set_location(yylloc); - state->symbols->add_variable(new(state) ir_variable(NULL, $1, ir_var_auto)); - } - | any_identifier '[' constant_expression ']' - { - void *ctx = state; - $$ = new(ctx) ast_declaration($1, true, $3, NULL); - $$->set_location(yylloc); - } - ; - -initializer: - assignment_expression - ; - -declaration_statement: - declaration - ; - - // Grammar Note: labeled statements for SWITCH only; 'goto' is not - // supported. -statement: - compound_statement { $$ = (ast_node *) $1; } - | simple_statement - ; - -simple_statement: - declaration_statement - | expression_statement - | selection_statement - | switch_statement - | iteration_statement - | jump_statement - ; - -compound_statement: - '{' '}' - { - void *ctx = state; - $$ = new(ctx) ast_compound_statement(true, NULL); - $$->set_location(yylloc); - } - | '{' - { - state->symbols->push_scope(); - } - statement_list '}' - { - void *ctx = state; - $$ = new(ctx) ast_compound_statement(true, $3); - $$->set_location(yylloc); - state->symbols->pop_scope(); - } - ; - -statement_no_new_scope: - compound_statement_no_new_scope { $$ = (ast_node *) $1; } - | simple_statement - ; - -compound_statement_no_new_scope: - '{' '}' - { - void *ctx = state; - $$ = new(ctx) ast_compound_statement(false, NULL); - $$->set_location(yylloc); - } - | '{' statement_list '}' - { - void *ctx = state; - $$ = new(ctx) ast_compound_statement(false, $2); - $$->set_location(yylloc); - } - ; - -statement_list: - statement - { - if ($1 == NULL) { - _mesa_glsl_error(& @1, state, " statement\n"); - assert($1 != NULL); - } - - $$ = $1; - $$->link.self_link(); - } - | statement_list statement - { - if ($2 == NULL) { - _mesa_glsl_error(& @2, state, " statement\n"); - assert($2 != NULL); - } - $$ = $1; - $$->link.insert_before(& $2->link); - } - ; - -expression_statement: - ';' - { - void *ctx = state; - $$ = new(ctx) ast_expression_statement(NULL); - $$->set_location(yylloc); - } - | expression ';' - { - void *ctx = state; - $$ = new(ctx) ast_expression_statement($1); - $$->set_location(yylloc); - } - ; - -selection_statement: - IF '(' expression ')' selection_rest_statement - { - $$ = new(state) ast_selection_statement($3, $5.then_statement, - $5.else_statement); - $$->set_location(yylloc); - } - ; - -selection_rest_statement: - statement ELSE statement - { - $$.then_statement = $1; - $$.else_statement = $3; - } - | statement - { - $$.then_statement = $1; - $$.else_statement = NULL; - } - ; - -condition: - expression - { - $$ = (ast_node *) $1; - } - | fully_specified_type any_identifier '=' initializer - { - void *ctx = state; - ast_declaration *decl = new(ctx) ast_declaration($2, false, NULL, $4); - ast_declarator_list *declarator = new(ctx) ast_declarator_list($1); - decl->set_location(yylloc); - declarator->set_location(yylloc); - - declarator->declarations.push_tail(&decl->link); - $$ = declarator; - } - ; - -/* - * siwtch_statement grammar is based on the syntax described in the body - * of the GLSL spec, not in it's appendix!!! - */ -switch_statement: - SWITCH '(' expression ')' switch_body - { - $$ = new(state) ast_switch_statement($3, $5); - $$->set_location(yylloc); - } - ; - -switch_body: - '{' '}' - { - $$ = new(state) ast_switch_body(NULL); - $$->set_location(yylloc); - } - | '{' case_statement_list '}' - { - $$ = new(state) ast_switch_body($2); - $$->set_location(yylloc); - } - ; - -case_label: - CASE expression ':' - { - $$ = new(state) ast_case_label($2); - $$->set_location(yylloc); - } - | DEFAULT ':' - { - $$ = new(state) ast_case_label(NULL); - $$->set_location(yylloc); - } - ; - -case_label_list: - case_label - { - ast_case_label_list *labels = new(state) ast_case_label_list(); - - labels->labels.push_tail(& $1->link); - $$ = labels; - $$->set_location(yylloc); - } - | case_label_list case_label - { - $$ = $1; - $$->labels.push_tail(& $2->link); - } - ; - -case_statement: - case_label_list statement - { - ast_case_statement *stmts = new(state) ast_case_statement($1); - stmts->set_location(yylloc); - - stmts->stmts.push_tail(& $2->link); - $$ = stmts; - } - | case_statement statement - { - $$ = $1; - $$->stmts.push_tail(& $2->link); - } - ; - -case_statement_list: - case_statement - { - ast_case_statement_list *cases= new(state) ast_case_statement_list(); - cases->set_location(yylloc); - - cases->cases.push_tail(& $1->link); - $$ = cases; - } - | case_statement_list case_statement - { - $$ = $1; - $$->cases.push_tail(& $2->link); - } - ; - -iteration_statement: - WHILE '(' condition ')' statement_no_new_scope - { - void *ctx = state; - $$ = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_while, - NULL, $3, NULL, $5); - $$->set_location(yylloc); - } - | DO statement WHILE '(' expression ')' ';' - { - void *ctx = state; - $$ = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_do_while, - NULL, $5, NULL, $2); - $$->set_location(yylloc); - } - | FOR '(' for_init_statement for_rest_statement ')' statement_no_new_scope - { - void *ctx = state; - $$ = new(ctx) ast_iteration_statement(ast_iteration_statement::ast_for, - $3, $4.cond, $4.rest, $6); - $$->set_location(yylloc); - } - ; - -for_init_statement: - expression_statement - | declaration_statement - ; - -conditionopt: - condition - | /* empty */ - { - $$ = NULL; - } - ; - -for_rest_statement: - conditionopt ';' - { - $$.cond = $1; - $$.rest = NULL; - } - | conditionopt ';' expression - { - $$.cond = $1; - $$.rest = $3; - } - ; - - // Grammar Note: No 'goto'. Gotos are not supported. -jump_statement: - CONTINUE ';' - { - void *ctx = state; - $$ = new(ctx) ast_jump_statement(ast_jump_statement::ast_continue, NULL); - $$->set_location(yylloc); - } - | BREAK ';' - { - void *ctx = state; - $$ = new(ctx) ast_jump_statement(ast_jump_statement::ast_break, NULL); - $$->set_location(yylloc); - } - | RETURN ';' - { - void *ctx = state; - $$ = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, NULL); - $$->set_location(yylloc); - } - | RETURN expression ';' - { - void *ctx = state; - $$ = new(ctx) ast_jump_statement(ast_jump_statement::ast_return, $2); - $$->set_location(yylloc); - } - | DISCARD ';' // Fragment shader only. - { - void *ctx = state; - $$ = new(ctx) ast_jump_statement(ast_jump_statement::ast_discard, NULL); - $$->set_location(yylloc); - } - ; - -external_declaration: - function_definition { $$ = $1; } - | declaration { $$ = $1; } - | pragma_statement { $$ = NULL; } - ; - -function_definition: - function_prototype compound_statement_no_new_scope - { - void *ctx = state; - $$ = new(ctx) ast_function_definition(); - $$->set_location(yylloc); - $$->prototype = $1; - $$->body = $2; - - state->symbols->pop_scope(); - } - ; diff --git a/dll/opengl/mesa/src/glsl/glsl_parser_extras.cpp b/dll/opengl/mesa/src/glsl/glsl_parser_extras.cpp deleted file mode 100644 index 2a72ba1f6f9..00000000000 --- a/dll/opengl/mesa/src/glsl/glsl_parser_extras.cpp +++ /dev/null @@ -1,1085 +0,0 @@ -/* - * Copyright © 2008, 2009 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ -#include -#include -#include -#include - -extern "C" { -#include "main/core.h" /* for struct gl_context */ -} - -#include "ralloc.h" -#include "ast.h" -#include "glsl_parser_extras.h" -#include "glsl_parser.h" -#include "ir_optimization.h" -#include "loop_analysis.h" - -_mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *ctx, - GLenum target, void *mem_ctx) -{ - switch (target) { - case GL_VERTEX_SHADER: this->target = vertex_shader; break; - case GL_FRAGMENT_SHADER: this->target = fragment_shader; break; - case GL_GEOMETRY_SHADER: this->target = geometry_shader; break; - } - - this->scanner = NULL; - this->translation_unit.make_empty(); - this->symbols = new(mem_ctx) glsl_symbol_table; - this->info_log = ralloc_strdup(mem_ctx, ""); - this->error = false; - this->loop_nesting_ast = NULL; - this->switch_state.switch_nesting_ast = NULL; - - this->num_builtins_to_link = 0; - - /* Set default language version and extensions */ - this->language_version = 110; - this->es_shader = false; - this->ARB_texture_rectangle_enable = true; - - /* OpenGL ES 2.0 has different defaults from desktop GL. */ - if (ctx->API == API_OPENGLES2) { - this->language_version = 100; - this->es_shader = true; - this->ARB_texture_rectangle_enable = false; - } - - this->extensions = &ctx->Extensions; - - this->Const.MaxLights = ctx->Const.MaxLights; - this->Const.MaxClipPlanes = ctx->Const.MaxClipPlanes; - this->Const.MaxTextureUnits = ctx->Const.MaxTextureUnits; - this->Const.MaxTextureCoords = ctx->Const.MaxTextureCoordUnits; - this->Const.MaxVertexAttribs = ctx->Const.VertexProgram.MaxAttribs; - this->Const.MaxVertexUniformComponents = ctx->Const.VertexProgram.MaxUniformComponents; - this->Const.MaxVaryingFloats = ctx->Const.MaxVarying * 4; - this->Const.MaxVertexTextureImageUnits = ctx->Const.MaxVertexTextureImageUnits; - this->Const.MaxCombinedTextureImageUnits = ctx->Const.MaxCombinedTextureImageUnits; - this->Const.MaxTextureImageUnits = ctx->Const.MaxTextureImageUnits; - this->Const.MaxFragmentUniformComponents = ctx->Const.FragmentProgram.MaxUniformComponents; - - this->Const.MaxDrawBuffers = ctx->Const.MaxDrawBuffers; - - /* Note: Once the OpenGL 3.0 'forward compatible' context or the OpenGL 3.2 - * Core context is supported, this logic will need change. Older versions of - * GLSL are no longer supported outside the compatibility contexts of 3.x. - */ - this->Const.GLSL_100ES = (ctx->API == API_OPENGLES2) - || ctx->Extensions.ARB_ES2_compatibility; - this->Const.GLSL_110 = (ctx->API == API_OPENGL); - this->Const.GLSL_120 = (ctx->API == API_OPENGL) - && (ctx->Const.GLSLVersion >= 120); - this->Const.GLSL_130 = (ctx->API == API_OPENGL) - && (ctx->Const.GLSLVersion >= 130); - - const unsigned lowest_version = - (ctx->API == API_OPENGLES2) || ctx->Extensions.ARB_ES2_compatibility - ? 100 : 110; - const unsigned highest_version = - (ctx->API == API_OPENGL) ? ctx->Const.GLSLVersion : 100; - char *supported = ralloc_strdup(this, ""); - - for (unsigned ver = lowest_version; ver <= highest_version; ver += 10) { - const char *const prefix = (ver == lowest_version) - ? "" - : ((ver == highest_version) ? ", and " : ", "); - - ralloc_asprintf_append(& supported, "%s%d.%02d%s", - prefix, - ver / 100, ver % 100, - (ver == 100) ? " ES" : ""); - } - - this->supported_version_string = supported; - - if (ctx->Const.ForceGLSLExtensionsWarn) - _mesa_glsl_process_extension("all", NULL, "warn", NULL, this); -} - -const char * -_mesa_glsl_shader_target_name(enum _mesa_glsl_parser_targets target) -{ - switch (target) { - case vertex_shader: return "vertex"; - case fragment_shader: return "fragment"; - case geometry_shader: return "geometry"; - } - - assert(!"Should not get here."); - return "unknown"; -} - - -void -_mesa_glsl_error(YYLTYPE *locp, _mesa_glsl_parse_state *state, - const char *fmt, ...) -{ - va_list ap; - - state->error = true; - - assert(state->info_log != NULL); - ralloc_asprintf_append(&state->info_log, "%u:%u(%u): error: ", - locp->source, - locp->first_line, - locp->first_column); - va_start(ap, fmt); - ralloc_vasprintf_append(&state->info_log, fmt, ap); - va_end(ap); - ralloc_strcat(&state->info_log, "\n"); -} - - -void -_mesa_glsl_warning(const YYLTYPE *locp, _mesa_glsl_parse_state *state, - const char *fmt, ...) -{ - va_list ap; - - assert(state->info_log != NULL); - ralloc_asprintf_append(&state->info_log, "%u:%u(%u): warning: ", - locp->source, - locp->first_line, - locp->first_column); - va_start(ap, fmt); - ralloc_vasprintf_append(&state->info_log, fmt, ap); - va_end(ap); - ralloc_strcat(&state->info_log, "\n"); -} - - -/** - * Enum representing the possible behaviors that can be specified in - * an #extension directive. - */ -enum ext_behavior { - extension_disable, - extension_enable, - extension_require, - extension_warn -}; - -/** - * Element type for _mesa_glsl_supported_extensions - */ -struct _mesa_glsl_extension { - /** - * Name of the extension when referred to in a GLSL extension - * statement - */ - const char *name; - - /** True if this extension is available to vertex shaders */ - bool avail_in_VS; - - /** True if this extension is available to geometry shaders */ - bool avail_in_GS; - - /** True if this extension is available to fragment shaders */ - bool avail_in_FS; - - /** True if this extension is available to desktop GL shaders */ - bool avail_in_GL; - - /** True if this extension is available to GLES shaders */ - bool avail_in_ES; - - /** - * Flag in the gl_extensions struct indicating whether this - * extension is supported by the driver, or - * &gl_extensions::dummy_true if supported by all drivers. - * - * Note: the type (GLboolean gl_extensions::*) is a "pointer to - * member" type, the type-safe alternative to the "offsetof" macro. - * In a nutshell: - * - * - foo bar::* p declares p to be an "offset" to a field of type - * foo that exists within struct bar - * - &bar::baz computes the "offset" of field baz within struct bar - * - x.*p accesses the field of x that exists at "offset" p - * - x->*p is equivalent to (*x).*p - */ - const GLboolean gl_extensions::* supported_flag; - - /** - * Flag in the _mesa_glsl_parse_state struct that should be set - * when this extension is enabled. - * - * See note in _mesa_glsl_extension::supported_flag about "pointer - * to member" types. - */ - bool _mesa_glsl_parse_state::* enable_flag; - - /** - * Flag in the _mesa_glsl_parse_state struct that should be set - * when the shader requests "warn" behavior for this extension. - * - * See note in _mesa_glsl_extension::supported_flag about "pointer - * to member" types. - */ - bool _mesa_glsl_parse_state::* warn_flag; - - - bool compatible_with_state(const _mesa_glsl_parse_state *state) const; - void set_flags(_mesa_glsl_parse_state *state, ext_behavior behavior) const; -}; - -#define EXT(NAME, VS, GS, FS, GL, ES, SUPPORTED_FLAG) \ - { "GL_" #NAME, VS, GS, FS, GL, ES, &gl_extensions::SUPPORTED_FLAG, \ - &_mesa_glsl_parse_state::NAME##_enable, \ - &_mesa_glsl_parse_state::NAME##_warn } - -/** - * Table of extensions that can be enabled/disabled within a shader, - * and the conditions under which they are supported. - */ -static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = { - /* target availability API availability */ - /* name VS GS FS GL ES supported flag */ - EXT(ARB_conservative_depth, false, false, true, true, false, ARB_conservative_depth), - EXT(ARB_draw_buffers, false, false, true, true, false, dummy_true), - EXT(ARB_draw_instanced, true, false, false, true, false, ARB_draw_instanced), - EXT(ARB_explicit_attrib_location, true, false, true, true, false, ARB_explicit_attrib_location), - EXT(ARB_fragment_coord_conventions, true, false, true, true, false, ARB_fragment_coord_conventions), - EXT(ARB_texture_rectangle, true, false, true, true, false, dummy_true), - EXT(EXT_texture_array, true, false, true, true, false, EXT_texture_array), - EXT(ARB_shader_texture_lod, true, false, true, true, false, ARB_shader_texture_lod), - EXT(ARB_shader_stencil_export, false, false, true, true, false, ARB_shader_stencil_export), - EXT(AMD_conservative_depth, false, false, true, true, false, ARB_conservative_depth), - EXT(AMD_shader_stencil_export, false, false, true, true, false, ARB_shader_stencil_export), - EXT(OES_texture_3D, true, false, true, false, true, EXT_texture3D), - EXT(OES_EGL_image_external, true, false, true, false, true, OES_EGL_image_external), -}; - -#undef EXT - - -/** - * Determine whether a given extension is compatible with the target, - * API, and extension information in the current parser state. - */ -bool _mesa_glsl_extension::compatible_with_state(const _mesa_glsl_parse_state * - state) const -{ - /* Check that this extension matches the type of shader we are - * compiling to. - */ - switch (state->target) { - case vertex_shader: - if (!this->avail_in_VS) { - return false; - } - break; - case geometry_shader: - if (!this->avail_in_GS) { - return false; - } - break; - case fragment_shader: - if (!this->avail_in_FS) { - return false; - } - break; - default: - assert (!"Unrecognized shader target"); - return false; - } - - /* Check that this extension matches whether we are compiling - * for desktop GL or GLES. - */ - if (state->es_shader) { - if (!this->avail_in_ES) return false; - } else { - if (!this->avail_in_GL) return false; - } - - /* Check that this extension is supported by the OpenGL - * implementation. - * - * Note: the ->* operator indexes into state->extensions by the - * offset this->supported_flag. See - * _mesa_glsl_extension::supported_flag for more info. - */ - return state->extensions->*(this->supported_flag); -} - -/** - * Set the appropriate flags in the parser state to establish the - * given behavior for this extension. - */ -void _mesa_glsl_extension::set_flags(_mesa_glsl_parse_state *state, - ext_behavior behavior) const -{ - /* Note: the ->* operator indexes into state by the - * offsets this->enable_flag and this->warn_flag. See - * _mesa_glsl_extension::supported_flag for more info. - */ - state->*(this->enable_flag) = (behavior != extension_disable); - state->*(this->warn_flag) = (behavior == extension_warn); -} - -/** - * Find an extension by name in _mesa_glsl_supported_extensions. If - * the name is not found, return NULL. - */ -static const _mesa_glsl_extension *find_extension(const char *name) -{ - for (unsigned i = 0; i < Elements(_mesa_glsl_supported_extensions); ++i) { - if (strcmp(name, _mesa_glsl_supported_extensions[i].name) == 0) { - return &_mesa_glsl_supported_extensions[i]; - } - } - return NULL; -} - - -bool -_mesa_glsl_process_extension(const char *name, YYLTYPE *name_locp, - const char *behavior_string, YYLTYPE *behavior_locp, - _mesa_glsl_parse_state *state) -{ - ext_behavior behavior; - if (strcmp(behavior_string, "warn") == 0) { - behavior = extension_warn; - } else if (strcmp(behavior_string, "require") == 0) { - behavior = extension_require; - } else if (strcmp(behavior_string, "enable") == 0) { - behavior = extension_enable; - } else if (strcmp(behavior_string, "disable") == 0) { - behavior = extension_disable; - } else { - _mesa_glsl_error(behavior_locp, state, - "Unknown extension behavior `%s'", - behavior_string); - return false; - } - - if (strcmp(name, "all") == 0) { - if ((behavior == extension_enable) || (behavior == extension_require)) { - _mesa_glsl_error(name_locp, state, "Cannot %s all extensions", - (behavior == extension_enable) - ? "enable" : "require"); - return false; - } else { - for (unsigned i = 0; - i < Elements(_mesa_glsl_supported_extensions); ++i) { - const _mesa_glsl_extension *extension - = &_mesa_glsl_supported_extensions[i]; - if (extension->compatible_with_state(state)) { - _mesa_glsl_supported_extensions[i].set_flags(state, behavior); - } - } - } - } else { - const _mesa_glsl_extension *extension = find_extension(name); - if (extension && extension->compatible_with_state(state)) { - extension->set_flags(state, behavior); - } else { - static const char *const fmt = "extension `%s' unsupported in %s shader"; - - if (behavior == extension_require) { - _mesa_glsl_error(name_locp, state, fmt, - name, _mesa_glsl_shader_target_name(state->target)); - return false; - } else { - _mesa_glsl_warning(name_locp, state, fmt, - name, _mesa_glsl_shader_target_name(state->target)); - } - } - } - - return true; -} - -void -_mesa_ast_type_qualifier_print(const struct ast_type_qualifier *q) -{ - if (q->flags.q.constant) - printf("const "); - - if (q->flags.q.invariant) - printf("invariant "); - - if (q->flags.q.attribute) - printf("attribute "); - - if (q->flags.q.varying) - printf("varying "); - - if (q->flags.q.in && q->flags.q.out) - printf("inout "); - else { - if (q->flags.q.in) - printf("in "); - - if (q->flags.q.out) - printf("out "); - } - - if (q->flags.q.centroid) - printf("centroid "); - if (q->flags.q.uniform) - printf("uniform "); - if (q->flags.q.smooth) - printf("smooth "); - if (q->flags.q.flat) - printf("flat "); - if (q->flags.q.noperspective) - printf("noperspective "); -} - - -void -ast_node::print(void) const -{ - printf("unhandled node "); -} - - -ast_node::ast_node(void) -{ - this->location.source = 0; - this->location.line = 0; - this->location.column = 0; -} - - -static void -ast_opt_array_size_print(bool is_array, const ast_expression *array_size) -{ - if (is_array) { - printf("[ "); - - if (array_size) - array_size->print(); - - printf("] "); - } -} - - -void -ast_compound_statement::print(void) const -{ - printf("{\n"); - - foreach_list_const(n, &this->statements) { - ast_node *ast = exec_node_data(ast_node, n, link); - ast->print(); - } - - printf("}\n"); -} - - -ast_compound_statement::ast_compound_statement(int new_scope, - ast_node *statements) -{ - this->new_scope = new_scope; - - if (statements != NULL) { - this->statements.push_degenerate_list_at_head(&statements->link); - } -} - - -void -ast_expression::print(void) const -{ - switch (oper) { - case ast_assign: - case ast_mul_assign: - case ast_div_assign: - case ast_mod_assign: - case ast_add_assign: - case ast_sub_assign: - case ast_ls_assign: - case ast_rs_assign: - case ast_and_assign: - case ast_xor_assign: - case ast_or_assign: - subexpressions[0]->print(); - printf("%s ", operator_string(oper)); - subexpressions[1]->print(); - break; - - case ast_field_selection: - subexpressions[0]->print(); - printf(". %s ", primary_expression.identifier); - break; - - case ast_plus: - case ast_neg: - case ast_bit_not: - case ast_logic_not: - case ast_pre_inc: - case ast_pre_dec: - printf("%s ", operator_string(oper)); - subexpressions[0]->print(); - break; - - case ast_post_inc: - case ast_post_dec: - subexpressions[0]->print(); - printf("%s ", operator_string(oper)); - break; - - case ast_conditional: - subexpressions[0]->print(); - printf("? "); - subexpressions[1]->print(); - printf(": "); - subexpressions[2]->print(); - break; - - case ast_array_index: - subexpressions[0]->print(); - printf("[ "); - subexpressions[1]->print(); - printf("] "); - break; - - case ast_function_call: { - subexpressions[0]->print(); - printf("( "); - - foreach_list_const (n, &this->expressions) { - if (n != this->expressions.get_head()) - printf(", "); - - ast_node *ast = exec_node_data(ast_node, n, link); - ast->print(); - } - - printf(") "); - break; - } - - case ast_identifier: - printf("%s ", primary_expression.identifier); - break; - - case ast_int_constant: - printf("%d ", primary_expression.int_constant); - break; - - case ast_uint_constant: - printf("%u ", primary_expression.uint_constant); - break; - - case ast_float_constant: - printf("%f ", primary_expression.float_constant); - break; - - case ast_bool_constant: - printf("%s ", - primary_expression.bool_constant - ? "true" : "false"); - break; - - case ast_sequence: { - printf("( "); - foreach_list_const(n, & this->expressions) { - if (n != this->expressions.get_head()) - printf(", "); - - ast_node *ast = exec_node_data(ast_node, n, link); - ast->print(); - } - printf(") "); - break; - } - - default: - assert(0); - break; - } -} - -ast_expression::ast_expression(int oper, - ast_expression *ex0, - ast_expression *ex1, - ast_expression *ex2) -{ - this->oper = ast_operators(oper); - this->subexpressions[0] = ex0; - this->subexpressions[1] = ex1; - this->subexpressions[2] = ex2; - this->non_lvalue_description = NULL; -} - - -void -ast_expression_statement::print(void) const -{ - if (expression) - expression->print(); - - printf("; "); -} - - -ast_expression_statement::ast_expression_statement(ast_expression *ex) : - expression(ex) -{ - /* empty */ -} - - -void -ast_function::print(void) const -{ - return_type->print(); - printf(" %s (", identifier); - - foreach_list_const(n, & this->parameters) { - ast_node *ast = exec_node_data(ast_node, n, link); - ast->print(); - } - - printf(")"); -} - - -ast_function::ast_function(void) - : is_definition(false), signature(NULL) -{ - /* empty */ -} - - -void -ast_fully_specified_type::print(void) const -{ - _mesa_ast_type_qualifier_print(& qualifier); - specifier->print(); -} - - -void -ast_parameter_declarator::print(void) const -{ - type->print(); - if (identifier) - printf("%s ", identifier); - ast_opt_array_size_print(is_array, array_size); -} - - -void -ast_function_definition::print(void) const -{ - prototype->print(); - body->print(); -} - - -void -ast_declaration::print(void) const -{ - printf("%s ", identifier); - ast_opt_array_size_print(is_array, array_size); - - if (initializer) { - printf("= "); - initializer->print(); - } -} - - -ast_declaration::ast_declaration(char *identifier, int is_array, - ast_expression *array_size, - ast_expression *initializer) -{ - this->identifier = identifier; - this->is_array = is_array; - this->array_size = array_size; - this->initializer = initializer; -} - - -void -ast_declarator_list::print(void) const -{ - assert(type || invariant); - - if (type) - type->print(); - else - printf("invariant "); - - foreach_list_const (ptr, & this->declarations) { - if (ptr != this->declarations.get_head()) - printf(", "); - - ast_node *ast = exec_node_data(ast_node, ptr, link); - ast->print(); - } - - printf("; "); -} - - -ast_declarator_list::ast_declarator_list(ast_fully_specified_type *type) -{ - this->type = type; - this->invariant = false; -} - -void -ast_jump_statement::print(void) const -{ - switch (mode) { - case ast_continue: - printf("continue; "); - break; - case ast_break: - printf("break; "); - break; - case ast_return: - printf("return "); - if (opt_return_value) - opt_return_value->print(); - - printf("; "); - break; - case ast_discard: - printf("discard; "); - break; - } -} - - -ast_jump_statement::ast_jump_statement(int mode, ast_expression *return_value) -{ - this->mode = ast_jump_modes(mode); - - if (mode == ast_return) - opt_return_value = return_value; -} - - -void -ast_selection_statement::print(void) const -{ - printf("if ( "); - condition->print(); - printf(") "); - - then_statement->print(); - - if (else_statement) { - printf("else "); - else_statement->print(); - } - -} - - -ast_selection_statement::ast_selection_statement(ast_expression *condition, - ast_node *then_statement, - ast_node *else_statement) -{ - this->condition = condition; - this->then_statement = then_statement; - this->else_statement = else_statement; -} - - -void -ast_switch_statement::print(void) const -{ - printf("switch ( "); - test_expression->print(); - printf(") "); - - body->print(); -} - - -ast_switch_statement::ast_switch_statement(ast_expression *test_expression, - ast_node *body) -{ - this->test_expression = test_expression; - this->body = body; -} - - -void -ast_switch_body::print(void) const -{ - printf("{\n"); - if (stmts != NULL) { - stmts->print(); - } - printf("}\n"); -} - - -ast_switch_body::ast_switch_body(ast_case_statement_list *stmts) -{ - this->stmts = stmts; -} - - -void ast_case_label::print(void) const -{ - if (test_value != NULL) { - printf("case "); - test_value->print(); - printf(": "); - } else { - printf("default: "); - } -} - - -ast_case_label::ast_case_label(ast_expression *test_value) -{ - this->test_value = test_value; -} - - -void ast_case_label_list::print(void) const -{ - foreach_list_const(n, & this->labels) { - ast_node *ast = exec_node_data(ast_node, n, link); - ast->print(); - } - printf("\n"); -} - - -ast_case_label_list::ast_case_label_list(void) -{ -} - - -void ast_case_statement::print(void) const -{ - labels->print(); - foreach_list_const(n, & this->stmts) { - ast_node *ast = exec_node_data(ast_node, n, link); - ast->print(); - printf("\n"); - } -} - - -ast_case_statement::ast_case_statement(ast_case_label_list *labels) -{ - this->labels = labels; -} - - -void ast_case_statement_list::print(void) const -{ - foreach_list_const(n, & this->cases) { - ast_node *ast = exec_node_data(ast_node, n, link); - ast->print(); - } -} - - -ast_case_statement_list::ast_case_statement_list(void) -{ -} - - -void -ast_iteration_statement::print(void) const -{ - switch (mode) { - case ast_for: - printf("for( "); - if (init_statement) - init_statement->print(); - printf("; "); - - if (condition) - condition->print(); - printf("; "); - - if (rest_expression) - rest_expression->print(); - printf(") "); - - body->print(); - break; - - case ast_while: - printf("while ( "); - if (condition) - condition->print(); - printf(") "); - body->print(); - break; - - case ast_do_while: - printf("do "); - body->print(); - printf("while ( "); - if (condition) - condition->print(); - printf("); "); - break; - } -} - - -ast_iteration_statement::ast_iteration_statement(int mode, - ast_node *init, - ast_node *condition, - ast_expression *rest_expression, - ast_node *body) -{ - this->mode = ast_iteration_modes(mode); - this->init_statement = init; - this->condition = condition; - this->rest_expression = rest_expression; - this->body = body; -} - - -void -ast_struct_specifier::print(void) const -{ - printf("struct %s { ", name); - foreach_list_const(n, &this->declarations) { - ast_node *ast = exec_node_data(ast_node, n, link); - ast->print(); - } - printf("} "); -} - - -ast_struct_specifier::ast_struct_specifier(char *identifier, - ast_node *declarator_list) -{ - if (identifier == NULL) { - static unsigned anon_count = 1; - identifier = ralloc_asprintf(this, "#anon_struct_%04x", anon_count); - anon_count++; - } - name = identifier; - this->declarations.push_degenerate_list_at_head(&declarator_list->link); -} - -/** - * Do the set of common optimizations passes - * - * \param ir List of instructions to be optimized - * \param linked Is the shader linked? This enables - * optimizations passes that remove code at - * global scope and could cause linking to - * fail. - * \param uniform_locations_assigned Have locations already been assigned for - * uniforms? This prevents the declarations - * of unused uniforms from being removed. - * The setting of this flag only matters if - * \c linked is \c true. - * \param max_unroll_iterations Maximum number of loop iterations to be - * unrolled. Setting to 0 forces all loops - * to be unrolled. - */ -bool -do_common_optimization(exec_list *ir, bool linked, - bool uniform_locations_assigned, - unsigned max_unroll_iterations) -{ - GLboolean progress = GL_FALSE; - - progress = lower_instructions(ir, SUB_TO_ADD_NEG) || progress; - - if (linked) { - progress = do_function_inlining(ir) || progress; - progress = do_dead_functions(ir) || progress; - progress = do_structure_splitting(ir) || progress; - } - progress = do_if_simplification(ir) || progress; - progress = do_discard_simplification(ir) || progress; - progress = do_copy_propagation(ir) || progress; - progress = do_copy_propagation_elements(ir) || progress; - if (linked) - progress = do_dead_code(ir, uniform_locations_assigned) || progress; - else - progress = do_dead_code_unlinked(ir) || progress; - progress = do_dead_code_local(ir) || progress; - progress = do_tree_grafting(ir) || progress; - progress = do_constant_propagation(ir) || progress; - if (linked) - progress = do_constant_variable(ir) || progress; - else - progress = do_constant_variable_unlinked(ir) || progress; - progress = do_constant_folding(ir) || progress; - progress = do_algebraic(ir) || progress; - progress = do_lower_jumps(ir) || progress; - progress = do_vec_index_to_swizzle(ir) || progress; - progress = do_swizzle_swizzle(ir) || progress; - progress = do_noop_swizzle(ir) || progress; - - progress = optimize_redundant_jumps(ir) || progress; - - loop_state *ls = analyze_loop_variables(ir); - if (ls->loop_found) { - progress = set_loop_controls(ir, ls) || progress; - progress = unroll_loops(ir, ls, max_unroll_iterations) || progress; - } - delete ls; - - return progress; -} - -extern "C" { - -/** - * To be called at GL teardown time, this frees compiler datastructures. - * - * After calling this, any previously compiled shaders and shader - * programs would be invalid. So this should happen at approximately - * program exit. - */ -void -_mesa_destroy_shader_compiler(void) -{ - _mesa_destroy_shader_compiler_caches(); - - _mesa_glsl_release_types(); -} - -/** - * Releases compiler caches to trade off performance for memory. - * - * Intended to be used with glReleaseShaderCompiler(). - */ -void -_mesa_destroy_shader_compiler_caches(void) -{ - _mesa_glsl_release_functions(); -} - -} diff --git a/dll/opengl/mesa/src/glsl/glsl_parser_extras.h b/dll/opengl/mesa/src/glsl/glsl_parser_extras.h deleted file mode 100644 index ee8f71b8280..00000000000 --- a/dll/opengl/mesa/src/glsl/glsl_parser_extras.h +++ /dev/null @@ -1,308 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#pragma once -#ifndef GLSL_PARSER_EXTRAS_H -#define GLSL_PARSER_EXTRAS_H - -/* - * Most of the definitions here only apply to C++ - */ -#ifdef __cplusplus - - -#include -#include "glsl_symbol_table.h" - -enum _mesa_glsl_parser_targets { - vertex_shader, - geometry_shader, - fragment_shader -}; - -struct gl_context; - -struct glsl_switch_state { - /** Temporary variables needed for switch statement. */ - ir_variable *test_var; - ir_variable *is_fallthru_var; - ir_variable *is_break_var; - class ast_switch_statement *switch_nesting_ast; - - /** Table of constant values already used in case labels */ - struct hash_table *labels_ht; - class ast_case_label *previous_default; - - bool is_switch_innermost; // if switch stmt is closest to break, ... -}; - -struct _mesa_glsl_parse_state { - _mesa_glsl_parse_state(struct gl_context *ctx, GLenum target, - void *mem_ctx); - - /* Callers of this ralloc-based new need not call delete. It's - * easier to just ralloc_free 'ctx' (or any of its ancestors). */ - static void* operator new(size_t size, void *ctx) - { - void *mem = rzalloc_size(ctx, size); - assert(mem != NULL); - - return mem; - } - - /* If the user *does* call delete, that's OK, we will just - * ralloc_free in that case. */ - static void operator delete(void *mem) - { - ralloc_free(mem); - } - - void *scanner; - exec_list translation_unit; - glsl_symbol_table *symbols; - - bool es_shader; - unsigned language_version; - const char *version_string; - enum _mesa_glsl_parser_targets target; - - /** - * Printable list of GLSL versions supported by the current context - * - * \note - * This string should probably be generated per-context instead of per - * invokation of the compiler. This should be changed when the method of - * tracking supported GLSL versions changes. - */ - const char *supported_version_string; - - /** - * Implementation defined limits that affect built-in variables, etc. - * - * \sa struct gl_constants (in mtypes.h) - */ - struct { - /* 1.10 */ - unsigned MaxLights; - unsigned MaxClipPlanes; - unsigned MaxTextureUnits; - unsigned MaxTextureCoords; - unsigned MaxVertexAttribs; - unsigned MaxVertexUniformComponents; - unsigned MaxVaryingFloats; - unsigned MaxVertexTextureImageUnits; - unsigned MaxCombinedTextureImageUnits; - unsigned MaxTextureImageUnits; - unsigned MaxFragmentUniformComponents; - - /* ARB_draw_buffers */ - unsigned MaxDrawBuffers; - - /** - * Set of GLSL versions supported by the current context - * - * Knowing that version X is supported doesn't mean that versions before - * X are also supported. Version 1.00 is only supported in an ES2 - * context or when GL_ARB_ES2_compatibility is supported. In an OpenGL - * 3.0 "forward compatible" context, GLSL 1.10 and 1.20 are \b not - * supported. - */ - /*@{*/ - unsigned GLSL_100ES:1; - unsigned GLSL_110:1; - unsigned GLSL_120:1; - unsigned GLSL_130:1; - /*@}*/ - } Const; - - /** - * During AST to IR conversion, pointer to current IR function - * - * Will be \c NULL whenever the AST to IR conversion is not inside a - * function definition. - */ - class ir_function_signature *current_function; - - /** - * During AST to IR conversion, pointer to the toplevel IR - * instruction list being generated. - */ - exec_list *toplevel_ir; - - /** Have we found a return statement in this function? */ - bool found_return; - - /** Was there an error during compilation? */ - bool error; - - /** - * Are all shader inputs / outputs invariant? - * - * This is set when the 'STDGL invariant(all)' pragma is used. - */ - bool all_invariant; - - /** Loop or switch statement containing the current instructions. */ - class ast_iteration_statement *loop_nesting_ast; - - struct glsl_switch_state switch_state; - - /** List of structures defined in user code. */ - const glsl_type **user_structures; - unsigned num_user_structures; - - char *info_log; - - /** - * \name Enable bits for GLSL extensions - */ - /*@{*/ - bool ARB_draw_buffers_enable; - bool ARB_draw_buffers_warn; - bool ARB_draw_instanced_enable; - bool ARB_draw_instanced_warn; - bool ARB_explicit_attrib_location_enable; - bool ARB_explicit_attrib_location_warn; - bool ARB_fragment_coord_conventions_enable; - bool ARB_fragment_coord_conventions_warn; - bool ARB_texture_rectangle_enable; - bool ARB_texture_rectangle_warn; - bool EXT_texture_array_enable; - bool EXT_texture_array_warn; - bool ARB_shader_texture_lod_enable; - bool ARB_shader_texture_lod_warn; - bool ARB_shader_stencil_export_enable; - bool ARB_shader_stencil_export_warn; - bool AMD_conservative_depth_enable; - bool AMD_conservative_depth_warn; - bool ARB_conservative_depth_enable; - bool ARB_conservative_depth_warn; - bool AMD_shader_stencil_export_enable; - bool AMD_shader_stencil_export_warn; - bool OES_texture_3D_enable; - bool OES_texture_3D_warn; - bool OES_EGL_image_external_enable; - bool OES_EGL_image_external_warn; - /*@}*/ - - /** Extensions supported by the OpenGL implementation. */ - const struct gl_extensions *extensions; - - /** Shaders containing built-in functions that are used for linking. */ - struct gl_shader *builtins_to_link[16]; - unsigned num_builtins_to_link; -}; - -typedef struct YYLTYPE { - int first_line; - int first_column; - int last_line; - int last_column; - unsigned source; -} YYLTYPE; -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 - -# define YYLLOC_DEFAULT(Current, Rhs, N) \ -do { \ - if (N) \ - { \ - (Current).first_line = YYRHSLOC(Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC(Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC(Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC(Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC(Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC(Rhs, 0).last_column; \ - } \ - (Current).source = 0; \ -} while (0) - -extern void _mesa_glsl_error(YYLTYPE *locp, _mesa_glsl_parse_state *state, - const char *fmt, ...); - -/** - * Emit a warning to the shader log - * - * \sa _mesa_glsl_error - */ -extern void _mesa_glsl_warning(const YYLTYPE *locp, - _mesa_glsl_parse_state *state, - const char *fmt, ...); - -extern void _mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state, - const char *string); - -extern void _mesa_glsl_lexer_dtor(struct _mesa_glsl_parse_state *state); - -union YYSTYPE; -extern int _mesa_glsl_lex(union YYSTYPE *yylval, YYLTYPE *yylloc, - void *scanner); - -extern int _mesa_glsl_parse(struct _mesa_glsl_parse_state *); - -/** - * Process elements of the #extension directive - * - * \return - * If \c name and \c behavior are valid, \c true is returned. Otherwise - * \c false is returned. - */ -extern bool _mesa_glsl_process_extension(const char *name, YYLTYPE *name_locp, - const char *behavior, - YYLTYPE *behavior_locp, - _mesa_glsl_parse_state *state); - -/** - * Get the textual name of the specified shader target - */ -extern const char * -_mesa_glsl_shader_target_name(enum _mesa_glsl_parser_targets target); - - -#endif /* __cplusplus */ - - -/* - * These definitions apply to C and C++ - */ -#ifdef __cplusplus -extern "C" { -#endif - -extern int preprocess(void *ctx, const char **shader, char **info_log, - const struct gl_extensions *extensions, int api); - -extern void _mesa_destroy_shader_compiler(void); -extern void _mesa_destroy_shader_compiler_caches(void); - -#ifdef __cplusplus -} -#endif - - -#endif /* GLSL_PARSER_EXTRAS_H */ diff --git a/dll/opengl/mesa/src/glsl/glsl_symbol_table.cpp b/dll/opengl/mesa/src/glsl/glsl_symbol_table.cpp deleted file mode 100644 index bcb65d30182..00000000000 --- a/dll/opengl/mesa/src/glsl/glsl_symbol_table.cpp +++ /dev/null @@ -1,165 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "glsl_symbol_table.h" - -class symbol_table_entry { -public: - /* Callers of this ralloc-based new need not call delete. It's - * easier to just ralloc_free 'ctx' (or any of its ancestors). */ - static void* operator new(size_t size, void *ctx) - { - void *entry = ralloc_size(ctx, size); - assert(entry != NULL); - return entry; - } - - /* If the user *does* call delete, that's OK, we will just ralloc_free. */ - static void operator delete(void *entry) - { - ralloc_free(entry); - } - - symbol_table_entry(ir_variable *v) : v(v), f(0), t(0) {} - symbol_table_entry(ir_function *f) : v(0), f(f), t(0) {} - symbol_table_entry(const glsl_type *t) : v(0), f(0), t(t) {} - - ir_variable *v; - ir_function *f; - const glsl_type *t; -}; - -glsl_symbol_table::glsl_symbol_table() -{ - this->language_version = 120; - this->table = _mesa_symbol_table_ctor(); - this->mem_ctx = ralloc_context(NULL); -} - -glsl_symbol_table::~glsl_symbol_table() -{ - _mesa_symbol_table_dtor(table); - ralloc_free(mem_ctx); -} - -void glsl_symbol_table::push_scope() -{ - _mesa_symbol_table_push_scope(table); -} - -void glsl_symbol_table::pop_scope() -{ - _mesa_symbol_table_pop_scope(table); -} - -bool glsl_symbol_table::name_declared_this_scope(const char *name) -{ - return _mesa_symbol_table_symbol_scope(table, -1, name) == 0; -} - -bool glsl_symbol_table::add_variable(ir_variable *v) -{ - if (this->language_version == 110) { - /* In 1.10, functions and variables have separate namespaces. */ - symbol_table_entry *existing = get_entry(v->name); - if (name_declared_this_scope(v->name)) { - /* If there's already an existing function (not a constructor!) in - * the current scope, just update the existing entry to include 'v'. - */ - if (existing->v == NULL && existing->t == NULL) { - existing->v = v; - return true; - } - } else { - /* If not declared at this scope, add a new entry. But if an existing - * entry includes a function, propagate that to this block - otherwise - * the new variable declaration would shadow the function. - */ - symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(v); - if (existing != NULL) - entry->f = existing->f; - int added = _mesa_symbol_table_add_symbol(table, -1, v->name, entry); - assert(added == 0); - (void)added; - return true; - } - return false; - } - - /* 1.20+ rules: */ - symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(v); - return _mesa_symbol_table_add_symbol(table, -1, v->name, entry) == 0; -} - -bool glsl_symbol_table::add_type(const char *name, const glsl_type *t) -{ - symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(t); - return _mesa_symbol_table_add_symbol(table, -1, name, entry) == 0; -} - -bool glsl_symbol_table::add_function(ir_function *f) -{ - if (this->language_version == 110 && name_declared_this_scope(f->name)) { - /* In 1.10, functions and variables have separate namespaces. */ - symbol_table_entry *existing = get_entry(f->name); - if ((existing->f == NULL) && (existing->t == NULL)) { - existing->f = f; - return true; - } - } - symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(f); - return _mesa_symbol_table_add_symbol(table, -1, f->name, entry) == 0; -} - -void glsl_symbol_table::add_global_function(ir_function *f) -{ - symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(f); - int added = _mesa_symbol_table_add_global_symbol(table, -1, f->name, entry); - assert(added == 0); - (void)added; -} - -ir_variable *glsl_symbol_table::get_variable(const char *name) -{ - symbol_table_entry *entry = get_entry(name); - return entry != NULL ? entry->v : NULL; -} - -const glsl_type *glsl_symbol_table::get_type(const char *name) -{ - symbol_table_entry *entry = get_entry(name); - return entry != NULL ? entry->t : NULL; -} - -ir_function *glsl_symbol_table::get_function(const char *name) -{ - symbol_table_entry *entry = get_entry(name); - return entry != NULL ? entry->f : NULL; -} - -symbol_table_entry *glsl_symbol_table::get_entry(const char *name) -{ - return (symbol_table_entry *) - _mesa_symbol_table_find_symbol(table, -1, name); -} diff --git a/dll/opengl/mesa/src/glsl/glsl_symbol_table.h b/dll/opengl/mesa/src/glsl/glsl_symbol_table.h deleted file mode 100644 index 637bc033b93..00000000000 --- a/dll/opengl/mesa/src/glsl/glsl_symbol_table.h +++ /dev/null @@ -1,124 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#pragma once -#ifndef GLSL_SYMBOL_TABLE -#define GLSL_SYMBOL_TABLE - -#include - -extern "C" { -#include "program/symbol_table.h" -} -#include "ir.h" -#include "glsl_types.h" - -class symbol_table_entry; - -/** - * Facade class for _mesa_symbol_table - * - * Wraps the existing \c _mesa_symbol_table data structure to enforce some - * type safe and some symbol table invariants. - */ -struct glsl_symbol_table { -private: - static void - _glsl_symbol_table_destructor (glsl_symbol_table *table) - { - table->~glsl_symbol_table(); - } - -public: - /* Callers of this ralloc-based new need not call delete. It's - * easier to just ralloc_free 'ctx' (or any of its ancestors). */ - static void* operator new(size_t size, void *ctx) - { - void *table; - - table = ralloc_size(ctx, size); - assert(table != NULL); - - ralloc_set_destructor(table, (void (*)(void*)) _glsl_symbol_table_destructor); - - return table; - } - - /* If the user *does* call delete, that's OK, we will just - * ralloc_free in that case. Here, C++ will have already called the - * destructor so tell ralloc not to do that again. */ - static void operator delete(void *table) - { - ralloc_set_destructor(table, NULL); - ralloc_free(table); - } - - glsl_symbol_table(); - ~glsl_symbol_table(); - - unsigned int language_version; - - void push_scope(); - void pop_scope(); - - /** - * Determine whether a name was declared at the current scope - */ - bool name_declared_this_scope(const char *name); - - /** - * \name Methods to add symbols to the table - * - * There is some temptation to rename all these functions to \c add_symbol - * or similar. However, this breaks symmetry with the getter functions and - * reduces the clarity of the intention of code that uses these methods. - */ - /*@{*/ - bool add_variable(ir_variable *v); - bool add_type(const char *name, const glsl_type *t); - bool add_function(ir_function *f); - /*@}*/ - - /** - * Add an function at global scope without checking for scoping conflicts. - */ - void add_global_function(ir_function *f); - - /** - * \name Methods to get symbols from the table - */ - /*@{*/ - ir_variable *get_variable(const char *name); - const glsl_type *get_type(const char *name); - ir_function *get_function(const char *name); - /*@}*/ - -private: - symbol_table_entry *get_entry(const char *name); - - struct _mesa_symbol_table *table; - void *mem_ctx; -}; - -#endif /* GLSL_SYMBOL_TABLE */ diff --git a/dll/opengl/mesa/src/glsl/glsl_types.cpp b/dll/opengl/mesa/src/glsl/glsl_types.cpp deleted file mode 100644 index 1489aae6d89..00000000000 --- a/dll/opengl/mesa/src/glsl/glsl_types.cpp +++ /dev/null @@ -1,611 +0,0 @@ -/* - * Copyright © 2009 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include -#include -#include "main/core.h" /* for Elements */ -#include "glsl_symbol_table.h" -#include "glsl_parser_extras.h" -#include "glsl_types.h" -#include "builtin_types.h" -extern "C" { -#include "program/hash_table.h" -} - -hash_table *glsl_type::array_types = NULL; -hash_table *glsl_type::record_types = NULL; -void *glsl_type::mem_ctx = NULL; - -void -glsl_type::init_ralloc_type_ctx(void) -{ - if (glsl_type::mem_ctx == NULL) { - glsl_type::mem_ctx = ralloc_autofree_context(); - assert(glsl_type::mem_ctx != NULL); - } -} - -glsl_type::glsl_type(GLenum gl_type, - glsl_base_type base_type, unsigned vector_elements, - unsigned matrix_columns, const char *name) : - gl_type(gl_type), - base_type(base_type), - sampler_dimensionality(0), sampler_shadow(0), sampler_array(0), - sampler_type(0), - vector_elements(vector_elements), matrix_columns(matrix_columns), - length(0) -{ - init_ralloc_type_ctx(); - this->name = ralloc_strdup(this->mem_ctx, name); - /* Neither dimension is zero or both dimensions are zero. - */ - assert((vector_elements == 0) == (matrix_columns == 0)); - memset(& fields, 0, sizeof(fields)); -} - -glsl_type::glsl_type(GLenum gl_type, - enum glsl_sampler_dim dim, bool shadow, bool array, - unsigned type, const char *name) : - gl_type(gl_type), - base_type(GLSL_TYPE_SAMPLER), - sampler_dimensionality(dim), sampler_shadow(shadow), - sampler_array(array), sampler_type(type), - vector_elements(0), matrix_columns(0), - length(0) -{ - init_ralloc_type_ctx(); - this->name = ralloc_strdup(this->mem_ctx, name); - memset(& fields, 0, sizeof(fields)); -} - -glsl_type::glsl_type(const glsl_struct_field *fields, unsigned num_fields, - const char *name) : - base_type(GLSL_TYPE_STRUCT), - sampler_dimensionality(0), sampler_shadow(0), sampler_array(0), - sampler_type(0), - vector_elements(0), matrix_columns(0), - length(num_fields) -{ - unsigned int i; - - init_ralloc_type_ctx(); - this->name = ralloc_strdup(this->mem_ctx, name); - this->fields.structure = ralloc_array(this->mem_ctx, - glsl_struct_field, length); - for (i = 0; i < length; i++) { - this->fields.structure[i].type = fields[i].type; - this->fields.structure[i].name = ralloc_strdup(this->fields.structure, - fields[i].name); - } -} - -static void -add_types_to_symbol_table(glsl_symbol_table *symtab, - const struct glsl_type *types, - unsigned num_types, bool warn) -{ - (void) warn; - - for (unsigned i = 0; i < num_types; i++) { - symtab->add_type(types[i].name, & types[i]); - } -} - -bool -glsl_type::contains_sampler() const -{ - if (this->is_array()) { - return this->fields.array->contains_sampler(); - } else if (this->is_record()) { - for (unsigned int i = 0; i < this->length; i++) { - if (this->fields.structure[i].type->contains_sampler()) - return true; - } - return false; - } else { - return this->is_sampler(); - } -} - -gl_texture_index -glsl_type::sampler_index() const -{ - const glsl_type *const t = (this->is_array()) ? this->fields.array : this; - - assert(t->is_sampler()); - - switch (t->sampler_dimensionality) { - case GLSL_SAMPLER_DIM_1D: - return (t->sampler_array) ? TEXTURE_1D_ARRAY_INDEX : TEXTURE_1D_INDEX; - case GLSL_SAMPLER_DIM_2D: - return (t->sampler_array) ? TEXTURE_2D_ARRAY_INDEX : TEXTURE_2D_INDEX; - case GLSL_SAMPLER_DIM_3D: - return TEXTURE_3D_INDEX; - case GLSL_SAMPLER_DIM_CUBE: - return TEXTURE_CUBE_INDEX; - case GLSL_SAMPLER_DIM_RECT: - return TEXTURE_RECT_INDEX; - case GLSL_SAMPLER_DIM_BUF: - assert(!"FINISHME: Implement ARB_texture_buffer_object"); - return TEXTURE_BUFFER_INDEX; - case GLSL_SAMPLER_DIM_EXTERNAL: - return TEXTURE_EXTERNAL_INDEX; - default: - assert(!"Should not get here."); - return TEXTURE_BUFFER_INDEX; - } -} - -void -glsl_type::generate_100ES_types(glsl_symbol_table *symtab) -{ - add_types_to_symbol_table(symtab, builtin_core_types, - Elements(builtin_core_types), - false); - add_types_to_symbol_table(symtab, builtin_structure_types, - Elements(builtin_structure_types), - false); - add_types_to_symbol_table(symtab, void_type, 1, false); -} - -void -glsl_type::generate_110_types(glsl_symbol_table *symtab) -{ - generate_100ES_types(symtab); - - add_types_to_symbol_table(symtab, builtin_110_types, - Elements(builtin_110_types), - false); - add_types_to_symbol_table(symtab, &_sampler3D_type, 1, false); - add_types_to_symbol_table(symtab, builtin_110_deprecated_structure_types, - Elements(builtin_110_deprecated_structure_types), - false); -} - - -void -glsl_type::generate_120_types(glsl_symbol_table *symtab) -{ - generate_110_types(symtab); - - add_types_to_symbol_table(symtab, builtin_120_types, - Elements(builtin_120_types), false); -} - - -void -glsl_type::generate_130_types(glsl_symbol_table *symtab) -{ - generate_120_types(symtab); - - add_types_to_symbol_table(symtab, builtin_130_types, - Elements(builtin_130_types), false); - generate_EXT_texture_array_types(symtab, false); -} - - -void -glsl_type::generate_ARB_texture_rectangle_types(glsl_symbol_table *symtab, - bool warn) -{ - add_types_to_symbol_table(symtab, builtin_ARB_texture_rectangle_types, - Elements(builtin_ARB_texture_rectangle_types), - warn); -} - - -void -glsl_type::generate_EXT_texture_array_types(glsl_symbol_table *symtab, - bool warn) -{ - add_types_to_symbol_table(symtab, builtin_EXT_texture_array_types, - Elements(builtin_EXT_texture_array_types), - warn); -} - - -void -glsl_type::generate_OES_texture_3D_types(glsl_symbol_table *symtab, bool warn) -{ - add_types_to_symbol_table(symtab, &_sampler3D_type, 1, warn); -} - - -void -glsl_type::generate_OES_EGL_image_external_types(glsl_symbol_table *symtab, - bool warn) -{ - add_types_to_symbol_table(symtab, builtin_OES_EGL_image_external_types, - Elements(builtin_OES_EGL_image_external_types), - warn); -} - -void -_mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state) -{ - switch (state->language_version) { - case 100: - assert(state->es_shader); - glsl_type::generate_100ES_types(state->symbols); - break; - case 110: - glsl_type::generate_110_types(state->symbols); - break; - case 120: - glsl_type::generate_120_types(state->symbols); - break; - case 130: - glsl_type::generate_130_types(state->symbols); - break; - default: - /* error */ - break; - } - - if (state->ARB_texture_rectangle_enable) { - glsl_type::generate_ARB_texture_rectangle_types(state->symbols, - state->ARB_texture_rectangle_warn); - } - if (state->OES_texture_3D_enable && state->language_version == 100) { - glsl_type::generate_OES_texture_3D_types(state->symbols, - state->OES_texture_3D_warn); - } - - if (state->EXT_texture_array_enable && state->language_version < 130) { - // These are already included in 130; don't create twice. - glsl_type::generate_EXT_texture_array_types(state->symbols, - state->EXT_texture_array_warn); - } - - /* We cannot check for language_version == 100 here because we need the - * types to support fixed-function program generation. But this is fine - * since the extension is never enabled for OpenGL contexts. - */ - if (state->OES_EGL_image_external_enable) { - glsl_type::generate_OES_EGL_image_external_types(state->symbols, - state->OES_EGL_image_external_warn); - } -} - - -const glsl_type *glsl_type::get_base_type() const -{ - switch (base_type) { - case GLSL_TYPE_UINT: - return uint_type; - case GLSL_TYPE_INT: - return int_type; - case GLSL_TYPE_FLOAT: - return float_type; - case GLSL_TYPE_BOOL: - return bool_type; - default: - return error_type; - } -} - - -const glsl_type *glsl_type::get_scalar_type() const -{ - const glsl_type *type = this; - - /* Handle arrays */ - while (type->base_type == GLSL_TYPE_ARRAY) - type = type->fields.array; - - /* Handle vectors and matrices */ - switch (type->base_type) { - case GLSL_TYPE_UINT: - return uint_type; - case GLSL_TYPE_INT: - return int_type; - case GLSL_TYPE_FLOAT: - return float_type; - default: - /* Handle everything else */ - return type; - } -} - - -void -_mesa_glsl_release_types(void) -{ - if (glsl_type::array_types != NULL) { - hash_table_dtor(glsl_type::array_types); - glsl_type::array_types = NULL; - } - - if (glsl_type::record_types != NULL) { - hash_table_dtor(glsl_type::record_types); - glsl_type::record_types = NULL; - } -} - - -glsl_type::glsl_type(const glsl_type *array, unsigned length) : - base_type(GLSL_TYPE_ARRAY), - sampler_dimensionality(0), sampler_shadow(0), sampler_array(0), - sampler_type(0), - vector_elements(0), matrix_columns(0), - name(NULL), length(length) -{ - this->fields.array = array; - /* Inherit the gl type of the base. The GL type is used for - * uniform/statevar handling in Mesa and the arrayness of the type - * is represented by the size rather than the type. - */ - this->gl_type = array->gl_type; - - /* Allow a maximum of 10 characters for the array size. This is enough - * for 32-bits of ~0. The extra 3 are for the '[', ']', and terminating - * NUL. - */ - const unsigned name_length = strlen(array->name) + 10 + 3; - char *const n = (char *) ralloc_size(this->mem_ctx, name_length); - - if (length == 0) - snprintf(n, name_length, "%s[]", array->name); - else - snprintf(n, name_length, "%s[%u]", array->name, length); - - this->name = n; -} - - -const glsl_type * -glsl_type::get_instance(unsigned base_type, unsigned rows, unsigned columns) -{ - if (base_type == GLSL_TYPE_VOID) - return void_type; - - if ((rows < 1) || (rows > 4) || (columns < 1) || (columns > 4)) - return error_type; - - /* Treat GLSL vectors as Nx1 matrices. - */ - if (columns == 1) { - switch (base_type) { - case GLSL_TYPE_UINT: - return uint_type + (rows - 1); - case GLSL_TYPE_INT: - return int_type + (rows - 1); - case GLSL_TYPE_FLOAT: - return float_type + (rows - 1); - case GLSL_TYPE_BOOL: - return bool_type + (rows - 1); - default: - return error_type; - } - } else { - if ((base_type != GLSL_TYPE_FLOAT) || (rows == 1)) - return error_type; - - /* GLSL matrix types are named mat{COLUMNS}x{ROWS}. Only the following - * combinations are valid: - * - * 1 2 3 4 - * 1 - * 2 x x x - * 3 x x x - * 4 x x x - */ -#define IDX(c,r) (((c-1)*3) + (r-1)) - - switch (IDX(columns, rows)) { - case IDX(2,2): return mat2_type; - case IDX(2,3): return mat2x3_type; - case IDX(2,4): return mat2x4_type; - case IDX(3,2): return mat3x2_type; - case IDX(3,3): return mat3_type; - case IDX(3,4): return mat3x4_type; - case IDX(4,2): return mat4x2_type; - case IDX(4,3): return mat4x3_type; - case IDX(4,4): return mat4_type; - default: return error_type; - } - } - - assert(!"Should not get here."); - return error_type; -} - - -const glsl_type * -glsl_type::get_array_instance(const glsl_type *base, unsigned array_size) -{ - - if (array_types == NULL) { - array_types = hash_table_ctor(64, hash_table_string_hash, - hash_table_string_compare); - } - - /* Generate a name using the base type pointer in the key. This is - * done because the name of the base type may not be unique across - * shaders. For example, two shaders may have different record types - * named 'foo'. - */ - char key[128]; - snprintf(key, sizeof(key), "%p[%u]", (void *) base, array_size); - - const glsl_type *t = (glsl_type *) hash_table_find(array_types, key); - if (t == NULL) { - t = new glsl_type(base, array_size); - - hash_table_insert(array_types, (void *) t, ralloc_strdup(mem_ctx, key)); - } - - assert(t->base_type == GLSL_TYPE_ARRAY); - assert(t->length == array_size); - assert(t->fields.array == base); - - return t; -} - - -int -glsl_type::record_key_compare(const void *a, const void *b) -{ - const glsl_type *const key1 = (glsl_type *) a; - const glsl_type *const key2 = (glsl_type *) b; - - /* Return zero is the types match (there is zero difference) or non-zero - * otherwise. - */ - if (strcmp(key1->name, key2->name) != 0) - return 1; - - if (key1->length != key2->length) - return 1; - - for (unsigned i = 0; i < key1->length; i++) { - if (key1->fields.structure[i].type != key2->fields.structure[i].type) - return 1; - if (strcmp(key1->fields.structure[i].name, - key2->fields.structure[i].name) != 0) - return 1; - } - - return 0; -} - - -unsigned -glsl_type::record_key_hash(const void *a) -{ - const glsl_type *const key = (glsl_type *) a; - char hash_key[128]; - unsigned size = 0; - - size = snprintf(hash_key, sizeof(hash_key), "%08x", key->length); - - for (unsigned i = 0; i < key->length; i++) { - if (size >= sizeof(hash_key)) - break; - - size += snprintf(& hash_key[size], sizeof(hash_key) - size, - "%p", (void *) key->fields.structure[i].type); - } - - return hash_table_string_hash(& hash_key); -} - - -const glsl_type * -glsl_type::get_record_instance(const glsl_struct_field *fields, - unsigned num_fields, - const char *name) -{ - const glsl_type key(fields, num_fields, name); - - if (record_types == NULL) { - record_types = hash_table_ctor(64, record_key_hash, record_key_compare); - } - - const glsl_type *t = (glsl_type *) hash_table_find(record_types, & key); - if (t == NULL) { - t = new glsl_type(fields, num_fields, name); - - hash_table_insert(record_types, (void *) t, t); - } - - assert(t->base_type == GLSL_TYPE_STRUCT); - assert(t->length == num_fields); - assert(strcmp(t->name, name) == 0); - - return t; -} - - -const glsl_type * -glsl_type::field_type(const char *name) const -{ - if (this->base_type != GLSL_TYPE_STRUCT) - return error_type; - - for (unsigned i = 0; i < this->length; i++) { - if (strcmp(name, this->fields.structure[i].name) == 0) - return this->fields.structure[i].type; - } - - return error_type; -} - - -int -glsl_type::field_index(const char *name) const -{ - if (this->base_type != GLSL_TYPE_STRUCT) - return -1; - - for (unsigned i = 0; i < this->length; i++) { - if (strcmp(name, this->fields.structure[i].name) == 0) - return i; - } - - return -1; -} - - -unsigned -glsl_type::component_slots() const -{ - switch (this->base_type) { - case GLSL_TYPE_UINT: - case GLSL_TYPE_INT: - case GLSL_TYPE_FLOAT: - case GLSL_TYPE_BOOL: - return this->components(); - - case GLSL_TYPE_STRUCT: { - unsigned size = 0; - - for (unsigned i = 0; i < this->length; i++) - size += this->fields.structure[i].type->component_slots(); - - return size; - } - - case GLSL_TYPE_ARRAY: - return this->length * this->fields.array->component_slots(); - - default: - return 0; - } -} - -bool -glsl_type::can_implicitly_convert_to(const glsl_type *desired) const -{ - if (this == desired) - return true; - - /* There is no conversion among matrix types. */ - if (this->matrix_columns > 1 || desired->matrix_columns > 1) - return false; - - /* int and uint can be converted to float. */ - return desired->is_float() - && this->is_integer() - && this->vector_elements == desired->vector_elements; -} diff --git a/dll/opengl/mesa/src/glsl/glsl_types.h b/dll/opengl/mesa/src/glsl/glsl_types.h deleted file mode 100644 index 2997c931149..00000000000 --- a/dll/opengl/mesa/src/glsl/glsl_types.h +++ /dev/null @@ -1,546 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright © 2009 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#pragma once -#ifndef GLSL_TYPES_H -#define GLSL_TYPES_H - -#include -#include -#include "main/mtypes.h" /* for gl_texture_index, C++'s enum rules are broken */ - -#ifdef __cplusplus -extern "C" { -#endif - -struct _mesa_glsl_parse_state; -struct glsl_symbol_table; - -extern void -_mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state); - -extern void -_mesa_glsl_release_types(void); - -#ifdef __cplusplus -} -#endif - -enum glsl_base_type { - GLSL_TYPE_UINT = 0, - GLSL_TYPE_INT, - GLSL_TYPE_FLOAT, - GLSL_TYPE_BOOL, - GLSL_TYPE_SAMPLER, - GLSL_TYPE_STRUCT, - GLSL_TYPE_ARRAY, - GLSL_TYPE_VOID, - GLSL_TYPE_ERROR -}; - -enum glsl_sampler_dim { - GLSL_SAMPLER_DIM_1D = 0, - GLSL_SAMPLER_DIM_2D, - GLSL_SAMPLER_DIM_3D, - GLSL_SAMPLER_DIM_CUBE, - GLSL_SAMPLER_DIM_RECT, - GLSL_SAMPLER_DIM_BUF, - GLSL_SAMPLER_DIM_EXTERNAL -}; - -#ifdef __cplusplus -#include "GL/gl.h" -#include "ralloc.h" - -struct glsl_type { - GLenum gl_type; - glsl_base_type base_type; - - unsigned sampler_dimensionality:3; /**< \see glsl_sampler_dim */ - unsigned sampler_shadow:1; - unsigned sampler_array:1; - unsigned sampler_type:2; /**< Type of data returned using this sampler. - * only \c GLSL_TYPE_FLOAT, \c GLSL_TYPE_INT, - * and \c GLSL_TYPE_UINT are valid. - */ - - /* Callers of this ralloc-based new need not call delete. It's - * easier to just ralloc_free 'mem_ctx' (or any of its ancestors). */ - static void* operator new(size_t size) - { - if (glsl_type::mem_ctx == NULL) { - glsl_type::mem_ctx = ralloc_context(NULL); - assert(glsl_type::mem_ctx != NULL); - } - - void *type; - - type = ralloc_size(glsl_type::mem_ctx, size); - assert(type != NULL); - - return type; - } - - /* If the user *does* call delete, that's OK, we will just - * ralloc_free in that case. */ - static void operator delete(void *type) - { - ralloc_free(type); - } - - /** - * \name Vector and matrix element counts - * - * For scalars, each of these values will be 1. For non-numeric types - * these will be 0. - */ - /*@{*/ - unsigned vector_elements:3; /**< 1, 2, 3, or 4 vector elements. */ - unsigned matrix_columns:3; /**< 1, 2, 3, or 4 matrix columns. */ - /*@}*/ - - /** - * Name of the data type - * - * This may be \c NULL for anonymous structures, for arrays, or for - * function types. - */ - const char *name; - - /** - * For \c GLSL_TYPE_ARRAY, this is the length of the array. For - * \c GLSL_TYPE_STRUCT, it is the number of elements in the structure and - * the number of values pointed to by \c fields.structure (below). - */ - unsigned length; - - /** - * Subtype of composite data types. - */ - union { - const struct glsl_type *array; /**< Type of array elements. */ - const struct glsl_type *parameters; /**< Parameters to function. */ - struct glsl_struct_field *structure; /**< List of struct fields. */ - } fields; - - - /** - * \name Pointers to various public type singletons - */ - /*@{*/ - static const glsl_type *const error_type; - static const glsl_type *const void_type; - static const glsl_type *const int_type; - static const glsl_type *const ivec4_type; - static const glsl_type *const uint_type; - static const glsl_type *const uvec2_type; - static const glsl_type *const uvec3_type; - static const glsl_type *const uvec4_type; - static const glsl_type *const float_type; - static const glsl_type *const vec2_type; - static const glsl_type *const vec3_type; - static const glsl_type *const vec4_type; - static const glsl_type *const bool_type; - static const glsl_type *const mat2_type; - static const glsl_type *const mat2x3_type; - static const glsl_type *const mat2x4_type; - static const glsl_type *const mat3x2_type; - static const glsl_type *const mat3_type; - static const glsl_type *const mat3x4_type; - static const glsl_type *const mat4x2_type; - static const glsl_type *const mat4x3_type; - static const glsl_type *const mat4_type; - /*@}*/ - - - /** - * For numeric and boolean derrived types returns the basic scalar type - * - * If the type is a numeric or boolean scalar, vector, or matrix type, - * this function gets the scalar type of the individual components. For - * all other types, including arrays of numeric or boolean types, the - * error type is returned. - */ - const glsl_type *get_base_type() const; - - /** - * Get the basic scalar type which this type aggregates. - * - * If the type is a numeric or boolean scalar, vector, or matrix, or an - * array of any of those, this function gets the scalar type of the - * individual components. For structs and arrays of structs, this function - * returns the struct type. For samplers and arrays of samplers, this - * function returns the sampler type. - */ - const glsl_type *get_scalar_type() const; - - /** - * Query the type of elements in an array - * - * \return - * Pointer to the type of elements in the array for array types, or \c NULL - * for non-array types. - */ - const glsl_type *element_type() const - { - return is_array() ? fields.array : NULL; - } - - /** - * Get the instance of a built-in scalar, vector, or matrix type - */ - static const glsl_type *get_instance(unsigned base_type, unsigned rows, - unsigned columns); - - /** - * Get the instance of an array type - */ - static const glsl_type *get_array_instance(const glsl_type *base, - unsigned elements); - - /** - * Get the instance of a record type - */ - static const glsl_type *get_record_instance(const glsl_struct_field *fields, - unsigned num_fields, - const char *name); - - /** - * Query the total number of scalars that make up a scalar, vector or matrix - */ - unsigned components() const - { - return vector_elements * matrix_columns; - } - - /** - * Calculate the number of components slots required to hold this type - * - * This is used to determine how many uniform or varying locations a type - * might occupy. - */ - unsigned component_slots() const; - - /** - * \brief Can this type be implicitly converted to another? - * - * \return True if the types are identical or if this type can be converted - * to \c desired according to Section 4.1.10 of the GLSL spec. - * - * \verbatim - * From page 25 (31 of the pdf) of the GLSL 1.50 spec, Section 4.1.10 - * Implicit Conversions: - * - * In some situations, an expression and its type will be implicitly - * converted to a different type. The following table shows all allowed - * implicit conversions: - * - * Type of expression | Can be implicitly converted to - * -------------------------------------------------- - * int float - * uint - * - * ivec2 vec2 - * uvec2 - * - * ivec3 vec3 - * uvec3 - * - * ivec4 vec4 - * uvec4 - * - * There are no implicit array or structure conversions. For example, - * an array of int cannot be implicitly converted to an array of float. - * There are no implicit conversions between signed and unsigned - * integers. - * \endverbatim - */ - bool can_implicitly_convert_to(const glsl_type *desired) const; - - /** - * Query whether or not a type is a scalar (non-vector and non-matrix). - */ - bool is_scalar() const - { - return (vector_elements == 1) - && (base_type >= GLSL_TYPE_UINT) - && (base_type <= GLSL_TYPE_BOOL); - } - - /** - * Query whether or not a type is a vector - */ - bool is_vector() const - { - return (vector_elements > 1) - && (matrix_columns == 1) - && (base_type >= GLSL_TYPE_UINT) - && (base_type <= GLSL_TYPE_BOOL); - } - - /** - * Query whether or not a type is a matrix - */ - bool is_matrix() const - { - /* GLSL only has float matrices. */ - return (matrix_columns > 1) && (base_type == GLSL_TYPE_FLOAT); - } - - /** - * Query whether or not a type is a non-array numeric type - */ - bool is_numeric() const - { - return (base_type >= GLSL_TYPE_UINT) && (base_type <= GLSL_TYPE_FLOAT); - } - - /** - * Query whether or not a type is an integral type - */ - bool is_integer() const - { - return (base_type == GLSL_TYPE_UINT) || (base_type == GLSL_TYPE_INT); - } - - /** - * Query whether or not a type is a float type - */ - bool is_float() const - { - return base_type == GLSL_TYPE_FLOAT; - } - - /** - * Query whether or not a type is a non-array boolean type - */ - bool is_boolean() const - { - return base_type == GLSL_TYPE_BOOL; - } - - /** - * Query whether or not a type is a sampler - */ - bool is_sampler() const - { - return base_type == GLSL_TYPE_SAMPLER; - } - - /** - * Query whether or not type is a sampler, or for struct and array - * types, contains a sampler. - */ - bool contains_sampler() const; - - /** - * Get the Mesa texture target index for a sampler type. - */ - gl_texture_index sampler_index() const; - - /** - * Query whether or not a type is an array - */ - bool is_array() const - { - return base_type == GLSL_TYPE_ARRAY; - } - - /** - * Query whether or not a type is a record - */ - bool is_record() const - { - return base_type == GLSL_TYPE_STRUCT; - } - - /** - * Query whether or not a type is the void type singleton. - */ - bool is_void() const - { - return base_type == GLSL_TYPE_VOID; - } - - /** - * Query whether or not a type is the error type singleton. - */ - bool is_error() const - { - return base_type == GLSL_TYPE_ERROR; - } - - /** - * Query the full type of a matrix row - * - * \return - * If the type is not a matrix, \c glsl_type::error_type is returned. - * Otherwise a type matching the rows of the matrix is returned. - */ - const glsl_type *row_type() const - { - return is_matrix() - ? get_instance(base_type, matrix_columns, 1) - : error_type; - } - - /** - * Query the full type of a matrix column - * - * \return - * If the type is not a matrix, \c glsl_type::error_type is returned. - * Otherwise a type matching the columns of the matrix is returned. - */ - const glsl_type *column_type() const - { - return is_matrix() - ? get_instance(base_type, vector_elements, 1) - : error_type; - } - - - /** - * Get the type of a structure field - * - * \return - * Pointer to the type of the named field. If the type is not a structure - * or the named field does not exist, \c glsl_type::error_type is returned. - */ - const glsl_type *field_type(const char *name) const; - - - /** - * Get the location of a filed within a record type - */ - int field_index(const char *name) const; - - - /** - * Query the number of elements in an array type - * - * \return - * The number of elements in the array for array types or -1 for non-array - * types. If the number of elements in the array has not yet been declared, - * zero is returned. - */ - int array_size() const - { - return is_array() ? length : -1; - } - -private: - /** - * ralloc context for all glsl_type allocations - * - * Set on the first call to \c glsl_type::new. - */ - static void *mem_ctx; - - void init_ralloc_type_ctx(void); - - /** Constructor for vector and matrix types */ - glsl_type(GLenum gl_type, - glsl_base_type base_type, unsigned vector_elements, - unsigned matrix_columns, const char *name); - - /** Constructor for sampler types */ - glsl_type(GLenum gl_type, - enum glsl_sampler_dim dim, bool shadow, bool array, - unsigned type, const char *name); - - /** Constructor for record types */ - glsl_type(const glsl_struct_field *fields, unsigned num_fields, - const char *name); - - /** Constructor for array types */ - glsl_type(const glsl_type *array, unsigned length); - - /** Hash table containing the known array types. */ - static struct hash_table *array_types; - - /** Hash table containing the known record types. */ - static struct hash_table *record_types; - - static int record_key_compare(const void *a, const void *b); - static unsigned record_key_hash(const void *key); - - /** - * \name Pointers to various type singletons - */ - /*@{*/ - static const glsl_type _error_type; - static const glsl_type _void_type; - static const glsl_type _sampler3D_type; - static const glsl_type builtin_core_types[]; - static const glsl_type builtin_structure_types[]; - static const glsl_type builtin_110_deprecated_structure_types[]; - static const glsl_type builtin_110_types[]; - static const glsl_type builtin_120_types[]; - static const glsl_type builtin_130_types[]; - static const glsl_type builtin_ARB_texture_rectangle_types[]; - static const glsl_type builtin_EXT_texture_array_types[]; - static const glsl_type builtin_EXT_texture_buffer_object_types[]; - static const glsl_type builtin_OES_EGL_image_external_types[]; - /*@}*/ - - /** - * \name Methods to populate a symbol table with built-in types. - * - * \internal - * This is one of the truely annoying things about C++. Methods that are - * completely internal and private to a type still have to be advertised to - * the world in a public header file. - */ - /*@{*/ - static void generate_100ES_types(glsl_symbol_table *); - static void generate_110_types(glsl_symbol_table *); - static void generate_120_types(glsl_symbol_table *); - static void generate_130_types(glsl_symbol_table *); - static void generate_ARB_texture_rectangle_types(glsl_symbol_table *, bool); - static void generate_EXT_texture_array_types(glsl_symbol_table *, bool); - static void generate_OES_texture_3D_types(glsl_symbol_table *, bool); - static void generate_OES_EGL_image_external_types(glsl_symbol_table *, bool); - /*@}*/ - - /** - * \name Friend functions. - * - * These functions are friends because they must have C linkage and the - * need to call various private methods or access various private static - * data. - */ - /*@{*/ - friend void _mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *); - friend void _mesa_glsl_release_types(void); - /*@}*/ -}; - -struct glsl_struct_field { - const struct glsl_type *type; - const char *name; -}; - -#endif /* __cplusplus */ - -#endif /* GLSL_TYPES_H */ diff --git a/dll/opengl/mesa/src/glsl/hir_field_selection.cpp b/dll/opengl/mesa/src/glsl/hir_field_selection.cpp deleted file mode 100644 index 3c33127b5f8..00000000000 --- a/dll/opengl/mesa/src/glsl/hir_field_selection.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "ir.h" -#include "program/symbol_table.h" -#include "glsl_parser_extras.h" -#include "ast.h" -#include "glsl_types.h" - -ir_rvalue * -_mesa_ast_field_selection_to_hir(const ast_expression *expr, - exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - void *ctx = state; - ir_rvalue *result = NULL; - ir_rvalue *op; - - op = expr->subexpressions[0]->hir(instructions, state); - - /* There are two kinds of field selection. There is the selection of a - * specific field from a structure, and there is the selection of a - * swizzle / mask from a vector. Which is which is determined entirely - * by the base type of the thing to which the field selection operator is - * being applied. - */ - YYLTYPE loc = expr->get_location(); - if (op->type->is_error()) { - /* silently propagate the error */ - } else if (op->type->is_vector()) { - ir_swizzle *swiz = ir_swizzle::create(op, - expr->primary_expression.identifier, - op->type->vector_elements); - if (swiz != NULL) { - result = swiz; - } else { - /* FINISHME: Logging of error messages should be moved into - * FINISHME: ir_swizzle::create. This allows the generation of more - * FINISHME: specific error messages. - */ - _mesa_glsl_error(& loc, state, "Invalid swizzle / mask `%s'", - expr->primary_expression.identifier); - } - } else if (op->type->base_type == GLSL_TYPE_STRUCT) { - result = new(ctx) ir_dereference_record(op, - expr->primary_expression.identifier); - - if (result->type->is_error()) { - _mesa_glsl_error(& loc, state, "Cannot access field `%s' of " - "structure", - expr->primary_expression.identifier); - } - } else if (expr->subexpressions[1] != NULL) { - /* Handle "method calls" in GLSL 1.20 - namely, array.length() */ - if (state->language_version < 120) - _mesa_glsl_error(&loc, state, "Methods not supported in GLSL 1.10."); - - ast_expression *call = expr->subexpressions[1]; - assert(call->oper == ast_function_call); - - const char *method; - method = call->subexpressions[0]->primary_expression.identifier; - - if (op->type->is_array() && strcmp(method, "length") == 0) { - if (!call->expressions.is_empty()) - _mesa_glsl_error(&loc, state, "length method takes no arguments."); - - if (op->type->array_size() == 0) - _mesa_glsl_error(&loc, state, "length called on unsized array."); - - result = new(ctx) ir_constant(op->type->array_size()); - } else { - _mesa_glsl_error(&loc, state, "Unknown method: `%s'.", method); - } - } else { - _mesa_glsl_error(& loc, state, "Cannot access field `%s' of " - "non-structure / non-vector.", - expr->primary_expression.identifier); - } - - return result ? result : ir_call::get_error_instruction(ctx); -} diff --git a/dll/opengl/mesa/src/glsl/ir.cpp b/dll/opengl/mesa/src/glsl/ir.cpp deleted file mode 100644 index a5eca5a51a0..00000000000 --- a/dll/opengl/mesa/src/glsl/ir.cpp +++ /dev/null @@ -1,1579 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ -#include -#include "main/core.h" /* for MAX2 */ -#include "ir.h" -#include "ir_visitor.h" -#include "glsl_types.h" - -ir_rvalue::ir_rvalue() -{ - this->type = glsl_type::error_type; -} - -bool ir_rvalue::is_zero() const -{ - return false; -} - -bool ir_rvalue::is_one() const -{ - return false; -} - -bool ir_rvalue::is_negative_one() const -{ - return false; -} - -/** - * Modify the swizzle make to move one component to another - * - * \param m IR swizzle to be modified - * \param from Component in the RHS that is to be swizzled - * \param to Desired swizzle location of \c from - */ -static void -update_rhs_swizzle(ir_swizzle_mask &m, unsigned from, unsigned to) -{ - switch (to) { - case 0: m.x = from; break; - case 1: m.y = from; break; - case 2: m.z = from; break; - case 3: m.w = from; break; - default: assert(!"Should not get here."); - } - - m.num_components = MAX2(m.num_components, (to + 1)); -} - -void -ir_assignment::set_lhs(ir_rvalue *lhs) -{ - void *mem_ctx = this; - bool swizzled = false; - - while (lhs != NULL) { - ir_swizzle *swiz = lhs->as_swizzle(); - - if (swiz == NULL) - break; - - unsigned write_mask = 0; - ir_swizzle_mask rhs_swiz = { 0, 0, 0, 0, 0, 0 }; - - for (unsigned i = 0; i < swiz->mask.num_components; i++) { - unsigned c = 0; - - switch (i) { - case 0: c = swiz->mask.x; break; - case 1: c = swiz->mask.y; break; - case 2: c = swiz->mask.z; break; - case 3: c = swiz->mask.w; break; - default: assert(!"Should not get here."); - } - - write_mask |= (((this->write_mask >> i) & 1) << c); - update_rhs_swizzle(rhs_swiz, i, c); - } - - this->write_mask = write_mask; - lhs = swiz->val; - - this->rhs = new(mem_ctx) ir_swizzle(this->rhs, rhs_swiz); - swizzled = true; - } - - if (swizzled) { - /* Now, RHS channels line up with the LHS writemask. Collapse it - * to just the channels that will be written. - */ - ir_swizzle_mask rhs_swiz = { 0, 0, 0, 0, 0, 0 }; - int rhs_chan = 0; - for (int i = 0; i < 4; i++) { - if (write_mask & (1 << i)) - update_rhs_swizzle(rhs_swiz, i, rhs_chan++); - } - this->rhs = new(mem_ctx) ir_swizzle(this->rhs, rhs_swiz); - } - - assert((lhs == NULL) || lhs->as_dereference()); - - this->lhs = (ir_dereference *) lhs; -} - -ir_variable * -ir_assignment::whole_variable_written() -{ - ir_variable *v = this->lhs->whole_variable_referenced(); - - if (v == NULL) - return NULL; - - if (v->type->is_scalar()) - return v; - - if (v->type->is_vector()) { - const unsigned mask = (1U << v->type->vector_elements) - 1; - - if (mask != this->write_mask) - return NULL; - } - - /* Either all the vector components are assigned or the variable is some - * composite type (and the whole thing is assigned. - */ - return v; -} - -ir_assignment::ir_assignment(ir_dereference *lhs, ir_rvalue *rhs, - ir_rvalue *condition, unsigned write_mask) -{ - this->ir_type = ir_type_assignment; - this->condition = condition; - this->rhs = rhs; - this->lhs = lhs; - this->write_mask = write_mask; - - if (lhs->type->is_scalar() || lhs->type->is_vector()) { - int lhs_components = 0; - for (int i = 0; i < 4; i++) { - if (write_mask & (1 << i)) - lhs_components++; - } - - assert(lhs_components == this->rhs->type->vector_elements); - } -} - -ir_assignment::ir_assignment(ir_rvalue *lhs, ir_rvalue *rhs, - ir_rvalue *condition) -{ - this->ir_type = ir_type_assignment; - this->condition = condition; - this->rhs = rhs; - - /* If the RHS is a vector type, assume that all components of the vector - * type are being written to the LHS. The write mask comes from the RHS - * because we can have a case where the LHS is a vec4 and the RHS is a - * vec3. In that case, the assignment is: - * - * (assign (...) (xyz) (var_ref lhs) (var_ref rhs)) - */ - if (rhs->type->is_vector()) - this->write_mask = (1U << rhs->type->vector_elements) - 1; - else if (rhs->type->is_scalar()) - this->write_mask = 1; - else - this->write_mask = 0; - - this->set_lhs(lhs); -} - - -ir_expression::ir_expression(int op, const struct glsl_type *type, - ir_rvalue *op0) -{ - assert(get_num_operands(ir_expression_operation(op)) == 1); - this->ir_type = ir_type_expression; - this->type = type; - this->operation = ir_expression_operation(op); - this->operands[0] = op0; - this->operands[1] = NULL; - this->operands[2] = NULL; - this->operands[3] = NULL; -} - -ir_expression::ir_expression(int op, const struct glsl_type *type, - ir_rvalue *op0, ir_rvalue *op1) -{ - assert(((op1 == NULL) && (get_num_operands(ir_expression_operation(op)) == 1)) - || (get_num_operands(ir_expression_operation(op)) == 2)); - this->ir_type = ir_type_expression; - this->type = type; - this->operation = ir_expression_operation(op); - this->operands[0] = op0; - this->operands[1] = op1; - this->operands[2] = NULL; - this->operands[3] = NULL; -} - -ir_expression::ir_expression(int op, const struct glsl_type *type, - ir_rvalue *op0, ir_rvalue *op1, - ir_rvalue *op2, ir_rvalue *op3) -{ - this->ir_type = ir_type_expression; - this->type = type; - this->operation = ir_expression_operation(op); - this->operands[0] = op0; - this->operands[1] = op1; - this->operands[2] = op2; - this->operands[3] = op3; -} - -ir_expression::ir_expression(int op, ir_rvalue *op0) -{ - this->ir_type = ir_type_expression; - - this->operation = ir_expression_operation(op); - this->operands[0] = op0; - this->operands[1] = NULL; - this->operands[2] = NULL; - this->operands[3] = NULL; - - assert(op <= ir_last_unop); - - switch (this->operation) { - case ir_unop_bit_not: - case ir_unop_logic_not: - case ir_unop_neg: - case ir_unop_abs: - case ir_unop_sign: - case ir_unop_rcp: - case ir_unop_rsq: - case ir_unop_sqrt: - case ir_unop_exp: - case ir_unop_log: - case ir_unop_exp2: - case ir_unop_log2: - case ir_unop_trunc: - case ir_unop_ceil: - case ir_unop_floor: - case ir_unop_fract: - case ir_unop_round_even: - case ir_unop_sin: - case ir_unop_cos: - case ir_unop_sin_reduced: - case ir_unop_cos_reduced: - case ir_unop_dFdx: - case ir_unop_dFdy: - this->type = op0->type; - break; - - case ir_unop_f2i: - case ir_unop_b2i: - case ir_unop_u2i: - this->type = glsl_type::get_instance(GLSL_TYPE_INT, - op0->type->vector_elements, 1); - break; - - case ir_unop_b2f: - case ir_unop_i2f: - case ir_unop_u2f: - this->type = glsl_type::get_instance(GLSL_TYPE_FLOAT, - op0->type->vector_elements, 1); - break; - - case ir_unop_f2b: - case ir_unop_i2b: - this->type = glsl_type::get_instance(GLSL_TYPE_BOOL, - op0->type->vector_elements, 1); - break; - - case ir_unop_i2u: - this->type = glsl_type::get_instance(GLSL_TYPE_UINT, - op0->type->vector_elements, 1); - break; - - case ir_unop_noise: - this->type = glsl_type::float_type; - break; - - case ir_unop_any: - this->type = glsl_type::bool_type; - break; - - default: - assert(!"not reached: missing automatic type setup for ir_expression"); - this->type = op0->type; - break; - } -} - -ir_expression::ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1) -{ - this->ir_type = ir_type_expression; - - this->operation = ir_expression_operation(op); - this->operands[0] = op0; - this->operands[1] = op1; - this->operands[2] = NULL; - this->operands[3] = NULL; - - assert(op > ir_last_unop); - - switch (this->operation) { - case ir_binop_all_equal: - case ir_binop_any_nequal: - this->type = glsl_type::bool_type; - break; - - case ir_binop_add: - case ir_binop_sub: - case ir_binop_min: - case ir_binop_max: - case ir_binop_pow: - case ir_binop_mul: - case ir_binop_div: - case ir_binop_mod: - if (op0->type->is_scalar()) { - this->type = op1->type; - } else if (op1->type->is_scalar()) { - this->type = op0->type; - } else { - /* FINISHME: matrix types */ - assert(!op0->type->is_matrix() && !op1->type->is_matrix()); - assert(op0->type == op1->type); - this->type = op0->type; - } - break; - - case ir_binop_logic_and: - case ir_binop_logic_xor: - case ir_binop_logic_or: - case ir_binop_bit_and: - case ir_binop_bit_xor: - case ir_binop_bit_or: - if (op0->type->is_scalar()) { - this->type = op1->type; - } else if (op1->type->is_scalar()) { - this->type = op0->type; - } - break; - - case ir_binop_equal: - case ir_binop_nequal: - case ir_binop_lequal: - case ir_binop_gequal: - case ir_binop_less: - case ir_binop_greater: - assert(op0->type == op1->type); - this->type = glsl_type::get_instance(GLSL_TYPE_BOOL, - op0->type->vector_elements, 1); - break; - - case ir_binop_dot: - this->type = glsl_type::float_type; - break; - - case ir_binop_lshift: - case ir_binop_rshift: - this->type = op0->type; - break; - - default: - assert(!"not reached: missing automatic type setup for ir_expression"); - this->type = glsl_type::float_type; - } -} - -unsigned int -ir_expression::get_num_operands(ir_expression_operation op) -{ - assert(op <= ir_last_opcode); - - if (op <= ir_last_unop) - return 1; - - if (op <= ir_last_binop) - return 2; - - if (op == ir_quadop_vector) - return 4; - - assert(false); - return 0; -} - -static const char *const operator_strs[] = { - "~", - "!", - "neg", - "abs", - "sign", - "rcp", - "rsq", - "sqrt", - "exp", - "log", - "exp2", - "log2", - "f2i", - "i2f", - "f2b", - "b2f", - "i2b", - "b2i", - "u2f", - "i2u", - "u2i", - "any", - "trunc", - "ceil", - "floor", - "fract", - "round_even", - "sin", - "cos", - "sin_reduced", - "cos_reduced", - "dFdx", - "dFdy", - "noise", - "+", - "-", - "*", - "/", - "%", - "<", - ">", - "<=", - ">=", - "==", - "!=", - "all_equal", - "any_nequal", - "<<", - ">>", - "&", - "^", - "|", - "&&", - "^^", - "||", - "dot", - "min", - "max", - "pow", - "vector", -}; - -const char *ir_expression::operator_string(ir_expression_operation op) -{ - assert((unsigned int) op < Elements(operator_strs)); - assert(Elements(operator_strs) == (ir_quadop_vector + 1)); - return operator_strs[op]; -} - -const char *ir_expression::operator_string() -{ - return operator_string(this->operation); -} - -const char* -depth_layout_string(ir_depth_layout layout) -{ - switch(layout) { - case ir_depth_layout_none: return ""; - case ir_depth_layout_any: return "depth_any"; - case ir_depth_layout_greater: return "depth_greater"; - case ir_depth_layout_less: return "depth_less"; - case ir_depth_layout_unchanged: return "depth_unchanged"; - - default: - assert(0); - return ""; - } -} - -ir_expression_operation -ir_expression::get_operator(const char *str) -{ - const int operator_count = sizeof(operator_strs) / sizeof(operator_strs[0]); - for (int op = 0; op < operator_count; op++) { - if (strcmp(str, operator_strs[op]) == 0) - return (ir_expression_operation) op; - } - return (ir_expression_operation) -1; -} - -ir_constant::ir_constant() -{ - this->ir_type = ir_type_constant; -} - -ir_constant::ir_constant(const struct glsl_type *type, - const ir_constant_data *data) -{ - assert((type->base_type >= GLSL_TYPE_UINT) - && (type->base_type <= GLSL_TYPE_BOOL)); - - this->ir_type = ir_type_constant; - this->type = type; - memcpy(& this->value, data, sizeof(this->value)); -} - -ir_constant::ir_constant(float f) -{ - this->ir_type = ir_type_constant; - this->type = glsl_type::float_type; - this->value.f[0] = f; - for (int i = 1; i < 16; i++) { - this->value.f[i] = 0; - } -} - -ir_constant::ir_constant(unsigned int u) -{ - this->ir_type = ir_type_constant; - this->type = glsl_type::uint_type; - this->value.u[0] = u; - for (int i = 1; i < 16; i++) { - this->value.u[i] = 0; - } -} - -ir_constant::ir_constant(int i) -{ - this->ir_type = ir_type_constant; - this->type = glsl_type::int_type; - this->value.i[0] = i; - for (int i = 1; i < 16; i++) { - this->value.i[i] = 0; - } -} - -ir_constant::ir_constant(bool b) -{ - this->ir_type = ir_type_constant; - this->type = glsl_type::bool_type; - this->value.b[0] = b; - for (int i = 1; i < 16; i++) { - this->value.b[i] = false; - } -} - -ir_constant::ir_constant(const ir_constant *c, unsigned i) -{ - this->ir_type = ir_type_constant; - this->type = c->type->get_base_type(); - - switch (this->type->base_type) { - case GLSL_TYPE_UINT: this->value.u[0] = c->value.u[i]; break; - case GLSL_TYPE_INT: this->value.i[0] = c->value.i[i]; break; - case GLSL_TYPE_FLOAT: this->value.f[0] = c->value.f[i]; break; - case GLSL_TYPE_BOOL: this->value.b[0] = c->value.b[i]; break; - default: assert(!"Should not get here."); break; - } -} - -ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list) -{ - this->ir_type = ir_type_constant; - this->type = type; - - assert(type->is_scalar() || type->is_vector() || type->is_matrix() - || type->is_record() || type->is_array()); - - if (type->is_array()) { - this->array_elements = ralloc_array(this, ir_constant *, type->length); - unsigned i = 0; - foreach_list(node, value_list) { - ir_constant *value = (ir_constant *) node; - assert(value->as_constant() != NULL); - - this->array_elements[i++] = value; - } - return; - } - - /* If the constant is a record, the types of each of the entries in - * value_list must be a 1-for-1 match with the structure components. Each - * entry must also be a constant. Just move the nodes from the value_list - * to the list in the ir_constant. - */ - /* FINISHME: Should there be some type checking and / or assertions here? */ - /* FINISHME: Should the new constant take ownership of the nodes from - * FINISHME: value_list, or should it make copies? - */ - if (type->is_record()) { - value_list->move_nodes_to(& this->components); - return; - } - - for (unsigned i = 0; i < 16; i++) { - this->value.u[i] = 0; - } - - ir_constant *value = (ir_constant *) (value_list->head); - - /* Constructors with exactly one scalar argument are special for vectors - * and matrices. For vectors, the scalar value is replicated to fill all - * the components. For matrices, the scalar fills the components of the - * diagonal while the rest is filled with 0. - */ - if (value->type->is_scalar() && value->next->is_tail_sentinel()) { - if (type->is_matrix()) { - /* Matrix - fill diagonal (rest is already set to 0) */ - assert(type->base_type == GLSL_TYPE_FLOAT); - for (unsigned i = 0; i < type->matrix_columns; i++) - this->value.f[i * type->vector_elements + i] = value->value.f[0]; - } else { - /* Vector or scalar - fill all components */ - switch (type->base_type) { - case GLSL_TYPE_UINT: - case GLSL_TYPE_INT: - for (unsigned i = 0; i < type->components(); i++) - this->value.u[i] = value->value.u[0]; - break; - case GLSL_TYPE_FLOAT: - for (unsigned i = 0; i < type->components(); i++) - this->value.f[i] = value->value.f[0]; - break; - case GLSL_TYPE_BOOL: - for (unsigned i = 0; i < type->components(); i++) - this->value.b[i] = value->value.b[0]; - break; - default: - assert(!"Should not get here."); - break; - } - } - return; - } - - if (type->is_matrix() && value->type->is_matrix()) { - assert(value->next->is_tail_sentinel()); - - /* From section 5.4.2 of the GLSL 1.20 spec: - * "If a matrix is constructed from a matrix, then each component - * (column i, row j) in the result that has a corresponding component - * (column i, row j) in the argument will be initialized from there." - */ - unsigned cols = MIN2(type->matrix_columns, value->type->matrix_columns); - unsigned rows = MIN2(type->vector_elements, value->type->vector_elements); - for (unsigned i = 0; i < cols; i++) { - for (unsigned j = 0; j < rows; j++) { - const unsigned src = i * value->type->vector_elements + j; - const unsigned dst = i * type->vector_elements + j; - this->value.f[dst] = value->value.f[src]; - } - } - - /* "All other components will be initialized to the identity matrix." */ - for (unsigned i = cols; i < type->matrix_columns; i++) - this->value.f[i * type->vector_elements + i] = 1.0; - - return; - } - - /* Use each component from each entry in the value_list to initialize one - * component of the constant being constructed. - */ - for (unsigned i = 0; i < type->components(); /* empty */) { - assert(value->as_constant() != NULL); - assert(!value->is_tail_sentinel()); - - for (unsigned j = 0; j < value->type->components(); j++) { - switch (type->base_type) { - case GLSL_TYPE_UINT: - this->value.u[i] = value->get_uint_component(j); - break; - case GLSL_TYPE_INT: - this->value.i[i] = value->get_int_component(j); - break; - case GLSL_TYPE_FLOAT: - this->value.f[i] = value->get_float_component(j); - break; - case GLSL_TYPE_BOOL: - this->value.b[i] = value->get_bool_component(j); - break; - default: - /* FINISHME: What to do? Exceptions are not the answer. - */ - break; - } - - i++; - if (i >= type->components()) - break; - } - - value = (ir_constant *) value->next; - } -} - -ir_constant * -ir_constant::zero(void *mem_ctx, const glsl_type *type) -{ - assert(type->is_numeric() || type->is_boolean()); - - ir_constant *c = new(mem_ctx) ir_constant; - c->type = type; - memset(&c->value, 0, sizeof(c->value)); - - return c; -} - -bool -ir_constant::get_bool_component(unsigned i) const -{ - switch (this->type->base_type) { - case GLSL_TYPE_UINT: return this->value.u[i] != 0; - case GLSL_TYPE_INT: return this->value.i[i] != 0; - case GLSL_TYPE_FLOAT: return ((int)this->value.f[i]) != 0; - case GLSL_TYPE_BOOL: return this->value.b[i]; - default: assert(!"Should not get here."); break; - } - - /* Must return something to make the compiler happy. This is clearly an - * error case. - */ - return false; -} - -float -ir_constant::get_float_component(unsigned i) const -{ - switch (this->type->base_type) { - case GLSL_TYPE_UINT: return (float) this->value.u[i]; - case GLSL_TYPE_INT: return (float) this->value.i[i]; - case GLSL_TYPE_FLOAT: return this->value.f[i]; - case GLSL_TYPE_BOOL: return this->value.b[i] ? 1.0 : 0.0; - default: assert(!"Should not get here."); break; - } - - /* Must return something to make the compiler happy. This is clearly an - * error case. - */ - return 0.0; -} - -int -ir_constant::get_int_component(unsigned i) const -{ - switch (this->type->base_type) { - case GLSL_TYPE_UINT: return this->value.u[i]; - case GLSL_TYPE_INT: return this->value.i[i]; - case GLSL_TYPE_FLOAT: return (int) this->value.f[i]; - case GLSL_TYPE_BOOL: return this->value.b[i] ? 1 : 0; - default: assert(!"Should not get here."); break; - } - - /* Must return something to make the compiler happy. This is clearly an - * error case. - */ - return 0; -} - -unsigned -ir_constant::get_uint_component(unsigned i) const -{ - switch (this->type->base_type) { - case GLSL_TYPE_UINT: return this->value.u[i]; - case GLSL_TYPE_INT: return this->value.i[i]; - case GLSL_TYPE_FLOAT: return (unsigned) this->value.f[i]; - case GLSL_TYPE_BOOL: return this->value.b[i] ? 1 : 0; - default: assert(!"Should not get here."); break; - } - - /* Must return something to make the compiler happy. This is clearly an - * error case. - */ - return 0; -} - -ir_constant * -ir_constant::get_array_element(unsigned i) const -{ - assert(this->type->is_array()); - - /* From page 35 (page 41 of the PDF) of the GLSL 1.20 spec: - * - * "Behavior is undefined if a shader subscripts an array with an index - * less than 0 or greater than or equal to the size the array was - * declared with." - * - * Most out-of-bounds accesses are removed before things could get this far. - * There are cases where non-constant array index values can get constant - * folded. - */ - if (int(i) < 0) - i = 0; - else if (i >= this->type->length) - i = this->type->length - 1; - - return array_elements[i]; -} - -ir_constant * -ir_constant::get_record_field(const char *name) -{ - int idx = this->type->field_index(name); - - if (idx < 0) - return NULL; - - if (this->components.is_empty()) - return NULL; - - exec_node *node = this->components.head; - for (int i = 0; i < idx; i++) { - node = node->next; - - /* If the end of the list is encountered before the element matching the - * requested field is found, return NULL. - */ - if (node->is_tail_sentinel()) - return NULL; - } - - return (ir_constant *) node; -} - - -bool -ir_constant::has_value(const ir_constant *c) const -{ - if (this->type != c->type) - return false; - - if (this->type->is_array()) { - for (unsigned i = 0; i < this->type->length; i++) { - if (!this->array_elements[i]->has_value(c->array_elements[i])) - return false; - } - return true; - } - - if (this->type->base_type == GLSL_TYPE_STRUCT) { - const exec_node *a_node = this->components.head; - const exec_node *b_node = c->components.head; - - while (!a_node->is_tail_sentinel()) { - assert(!b_node->is_tail_sentinel()); - - const ir_constant *const a_field = (ir_constant *) a_node; - const ir_constant *const b_field = (ir_constant *) b_node; - - if (!a_field->has_value(b_field)) - return false; - - a_node = a_node->next; - b_node = b_node->next; - } - - return true; - } - - for (unsigned i = 0; i < this->type->components(); i++) { - switch (this->type->base_type) { - case GLSL_TYPE_UINT: - if (this->value.u[i] != c->value.u[i]) - return false; - break; - case GLSL_TYPE_INT: - if (this->value.i[i] != c->value.i[i]) - return false; - break; - case GLSL_TYPE_FLOAT: - if (this->value.f[i] != c->value.f[i]) - return false; - break; - case GLSL_TYPE_BOOL: - if (this->value.b[i] != c->value.b[i]) - return false; - break; - default: - assert(!"Should not get here."); - return false; - } - } - - return true; -} - -bool -ir_constant::is_zero() const -{ - if (!this->type->is_scalar() && !this->type->is_vector()) - return false; - - for (unsigned c = 0; c < this->type->vector_elements; c++) { - switch (this->type->base_type) { - case GLSL_TYPE_FLOAT: - if (this->value.f[c] != 0.0) - return false; - break; - case GLSL_TYPE_INT: - if (this->value.i[c] != 0) - return false; - break; - case GLSL_TYPE_UINT: - if (this->value.u[c] != 0) - return false; - break; - case GLSL_TYPE_BOOL: - if (this->value.b[c] != false) - return false; - break; - default: - /* The only other base types are structures, arrays, and samplers. - * Samplers cannot be constants, and the others should have been - * filtered out above. - */ - assert(!"Should not get here."); - return false; - } - } - - return true; -} - -bool -ir_constant::is_one() const -{ - if (!this->type->is_scalar() && !this->type->is_vector()) - return false; - - for (unsigned c = 0; c < this->type->vector_elements; c++) { - switch (this->type->base_type) { - case GLSL_TYPE_FLOAT: - if (this->value.f[c] != 1.0) - return false; - break; - case GLSL_TYPE_INT: - if (this->value.i[c] != 1) - return false; - break; - case GLSL_TYPE_UINT: - if (this->value.u[c] != 1) - return false; - break; - case GLSL_TYPE_BOOL: - if (this->value.b[c] != true) - return false; - break; - default: - /* The only other base types are structures, arrays, and samplers. - * Samplers cannot be constants, and the others should have been - * filtered out above. - */ - assert(!"Should not get here."); - return false; - } - } - - return true; -} - -bool -ir_constant::is_negative_one() const -{ - if (!this->type->is_scalar() && !this->type->is_vector()) - return false; - - if (this->type->is_boolean()) - return false; - - for (unsigned c = 0; c < this->type->vector_elements; c++) { - switch (this->type->base_type) { - case GLSL_TYPE_FLOAT: - if (this->value.f[c] != -1.0) - return false; - break; - case GLSL_TYPE_INT: - if (this->value.i[c] != -1) - return false; - break; - case GLSL_TYPE_UINT: - if (int(this->value.u[c]) != -1) - return false; - break; - default: - /* The only other base types are structures, arrays, samplers, and - * booleans. Samplers cannot be constants, and the others should - * have been filtered out above. - */ - assert(!"Should not get here."); - return false; - } - } - - return true; -} - -ir_loop::ir_loop() -{ - this->ir_type = ir_type_loop; - this->cmp = ir_unop_neg; - this->from = NULL; - this->to = NULL; - this->increment = NULL; - this->counter = NULL; -} - - -ir_dereference_variable::ir_dereference_variable(ir_variable *var) -{ - this->ir_type = ir_type_dereference_variable; - this->var = var; - this->type = (var != NULL) ? var->type : glsl_type::error_type; -} - - -ir_dereference_array::ir_dereference_array(ir_rvalue *value, - ir_rvalue *array_index) -{ - this->ir_type = ir_type_dereference_array; - this->array_index = array_index; - this->set_array(value); -} - - -ir_dereference_array::ir_dereference_array(ir_variable *var, - ir_rvalue *array_index) -{ - void *ctx = ralloc_parent(var); - - this->ir_type = ir_type_dereference_array; - this->array_index = array_index; - this->set_array(new(ctx) ir_dereference_variable(var)); -} - - -void -ir_dereference_array::set_array(ir_rvalue *value) -{ - this->array = value; - this->type = glsl_type::error_type; - - if (this->array != NULL) { - const glsl_type *const vt = this->array->type; - - if (vt->is_array()) { - type = vt->element_type(); - } else if (vt->is_matrix()) { - type = vt->column_type(); - } else if (vt->is_vector()) { - type = vt->get_base_type(); - } - } -} - - -ir_dereference_record::ir_dereference_record(ir_rvalue *value, - const char *field) -{ - this->ir_type = ir_type_dereference_record; - this->record = value; - this->field = ralloc_strdup(this, field); - this->type = (this->record != NULL) - ? this->record->type->field_type(field) : glsl_type::error_type; -} - - -ir_dereference_record::ir_dereference_record(ir_variable *var, - const char *field) -{ - void *ctx = ralloc_parent(var); - - this->ir_type = ir_type_dereference_record; - this->record = new(ctx) ir_dereference_variable(var); - this->field = ralloc_strdup(this, field); - this->type = (this->record != NULL) - ? this->record->type->field_type(field) : glsl_type::error_type; -} - -bool -ir_dereference::is_lvalue() const -{ - ir_variable *var = this->variable_referenced(); - - /* Every l-value derference chain eventually ends in a variable. - */ - if ((var == NULL) || var->read_only) - return false; - - /* From page 17 (page 23 of the PDF) of the GLSL 1.20 spec: - * - * "Samplers cannot be treated as l-values; hence cannot be used - * as out or inout function parameters, nor can they be - * assigned into." - */ - if (this->type->contains_sampler()) - return false; - - return true; -} - - -const char *tex_opcode_strs[] = { "tex", "txb", "txl", "txd", "txf", "txs" }; - -const char *ir_texture::opcode_string() -{ - assert((unsigned int) op <= - sizeof(tex_opcode_strs) / sizeof(tex_opcode_strs[0])); - return tex_opcode_strs[op]; -} - -ir_texture_opcode -ir_texture::get_opcode(const char *str) -{ - const int count = sizeof(tex_opcode_strs) / sizeof(tex_opcode_strs[0]); - for (int op = 0; op < count; op++) { - if (strcmp(str, tex_opcode_strs[op]) == 0) - return (ir_texture_opcode) op; - } - return (ir_texture_opcode) -1; -} - - -void -ir_texture::set_sampler(ir_dereference *sampler, const glsl_type *type) -{ - assert(sampler != NULL); - assert(type != NULL); - this->sampler = sampler; - this->type = type; - - if (this->op == ir_txs) { - assert(type->base_type == GLSL_TYPE_INT); - } else { - assert(sampler->type->sampler_type == (int) type->base_type); - if (sampler->type->sampler_shadow) - assert(type->vector_elements == 4 || type->vector_elements == 1); - else - assert(type->vector_elements == 4); - } -} - - -void -ir_swizzle::init_mask(const unsigned *comp, unsigned count) -{ - assert((count >= 1) && (count <= 4)); - - memset(&this->mask, 0, sizeof(this->mask)); - this->mask.num_components = count; - - unsigned dup_mask = 0; - switch (count) { - case 4: - assert(comp[3] <= 3); - dup_mask |= (1U << comp[3]) - & ((1U << comp[0]) | (1U << comp[1]) | (1U << comp[2])); - this->mask.w = comp[3]; - - case 3: - assert(comp[2] <= 3); - dup_mask |= (1U << comp[2]) - & ((1U << comp[0]) | (1U << comp[1])); - this->mask.z = comp[2]; - - case 2: - assert(comp[1] <= 3); - dup_mask |= (1U << comp[1]) - & ((1U << comp[0])); - this->mask.y = comp[1]; - - case 1: - assert(comp[0] <= 3); - this->mask.x = comp[0]; - } - - this->mask.has_duplicates = dup_mask != 0; - - /* Based on the number of elements in the swizzle and the base type - * (i.e., float, int, unsigned, or bool) of the vector being swizzled, - * generate the type of the resulting value. - */ - type = glsl_type::get_instance(val->type->base_type, mask.num_components, 1); -} - -ir_swizzle::ir_swizzle(ir_rvalue *val, unsigned x, unsigned y, unsigned z, - unsigned w, unsigned count) - : val(val) -{ - const unsigned components[4] = { x, y, z, w }; - this->ir_type = ir_type_swizzle; - this->init_mask(components, count); -} - -ir_swizzle::ir_swizzle(ir_rvalue *val, const unsigned *comp, - unsigned count) - : val(val) -{ - this->ir_type = ir_type_swizzle; - this->init_mask(comp, count); -} - -ir_swizzle::ir_swizzle(ir_rvalue *val, ir_swizzle_mask mask) -{ - this->ir_type = ir_type_swizzle; - this->val = val; - this->mask = mask; - this->type = glsl_type::get_instance(val->type->base_type, - mask.num_components, 1); -} - -#define X 1 -#define R 5 -#define S 9 -#define I 13 - -ir_swizzle * -ir_swizzle::create(ir_rvalue *val, const char *str, unsigned vector_length) -{ - void *ctx = ralloc_parent(val); - - /* For each possible swizzle character, this table encodes the value in - * \c idx_map that represents the 0th element of the vector. For invalid - * swizzle characters (e.g., 'k'), a special value is used that will allow - * detection of errors. - */ - static const unsigned char base_idx[26] = { - /* a b c d e f g h i j k l m */ - R, R, I, I, I, I, R, I, I, I, I, I, I, - /* n o p q r s t u v w x y z */ - I, I, S, S, R, S, S, I, I, X, X, X, X - }; - - /* Each valid swizzle character has an entry in the previous table. This - * table encodes the base index encoded in the previous table plus the actual - * index of the swizzle character. When processing swizzles, the first - * character in the string is indexed in the previous table. Each character - * in the string is indexed in this table, and the value found there has the - * value form the first table subtracted. The result must be on the range - * [0,3]. - * - * For example, the string "wzyx" will get X from the first table. Each of - * the charcaters will get X+3, X+2, X+1, and X+0 from this table. After - * subtraction, the swizzle values are { 3, 2, 1, 0 }. - * - * The string "wzrg" will get X from the first table. Each of the characters - * will get X+3, X+2, R+0, and R+1 from this table. After subtraction, the - * swizzle values are { 3, 2, 4, 5 }. Since 4 and 5 are outside the range - * [0,3], the error is detected. - */ - static const unsigned char idx_map[26] = { - /* a b c d e f g h i j k l m */ - R+3, R+2, 0, 0, 0, 0, R+1, 0, 0, 0, 0, 0, 0, - /* n o p q r s t u v w x y z */ - 0, 0, S+2, S+3, R+0, S+0, S+1, 0, 0, X+3, X+0, X+1, X+2 - }; - - int swiz_idx[4] = { 0, 0, 0, 0 }; - unsigned i; - - - /* Validate the first character in the swizzle string and look up the base - * index value as described above. - */ - if ((str[0] < 'a') || (str[0] > 'z')) - return NULL; - - const unsigned base = base_idx[str[0] - 'a']; - - - for (i = 0; (i < 4) && (str[i] != '\0'); i++) { - /* Validate the next character, and, as described above, convert it to a - * swizzle index. - */ - if ((str[i] < 'a') || (str[i] > 'z')) - return NULL; - - swiz_idx[i] = idx_map[str[i] - 'a'] - base; - if ((swiz_idx[i] < 0) || (swiz_idx[i] >= (int) vector_length)) - return NULL; - } - - if (str[i] != '\0') - return NULL; - - return new(ctx) ir_swizzle(val, swiz_idx[0], swiz_idx[1], swiz_idx[2], - swiz_idx[3], i); -} - -#undef X -#undef R -#undef S -#undef I - -ir_variable * -ir_swizzle::variable_referenced() const -{ - return this->val->variable_referenced(); -} - - -ir_variable::ir_variable(const struct glsl_type *type, const char *name, - ir_variable_mode mode) - : max_array_access(0), read_only(false), centroid(false), invariant(false), - mode(mode), interpolation(INTERP_QUALIFIER_NONE) -{ - this->ir_type = ir_type_variable; - this->type = type; - this->name = ralloc_strdup(this, name); - this->explicit_location = false; - this->has_initializer = false; - this->location = -1; - this->warn_extension = NULL; - this->constant_value = NULL; - this->constant_initializer = NULL; - this->origin_upper_left = false; - this->pixel_center_integer = false; - this->depth_layout = ir_depth_layout_none; - this->used = false; - - if (type && type->base_type == GLSL_TYPE_SAMPLER) - this->read_only = true; -} - - -const char * -ir_variable::interpolation_string() const -{ - switch (this->interpolation) { - case INTERP_QUALIFIER_NONE: return "no"; - case INTERP_QUALIFIER_SMOOTH: return "smooth"; - case INTERP_QUALIFIER_FLAT: return "flat"; - case INTERP_QUALIFIER_NOPERSPECTIVE: return "noperspective"; - } - - assert(!"Should not get here."); - return ""; -} - - -glsl_interp_qualifier -ir_variable::determine_interpolation_mode(bool flat_shade) -{ - if (this->interpolation != INTERP_QUALIFIER_NONE) - return (glsl_interp_qualifier) this->interpolation; - int location = this->location; - bool is_gl_Color = - location == FRAG_ATTRIB_COL0 || location == FRAG_ATTRIB_COL1; - if (flat_shade && is_gl_Color) - return INTERP_QUALIFIER_FLAT; - else - return INTERP_QUALIFIER_SMOOTH; -} - - -ir_function_signature::ir_function_signature(const glsl_type *return_type) - : return_type(return_type), is_defined(false), _function(NULL) -{ - this->ir_type = ir_type_function_signature; - this->is_builtin = false; -} - - -static bool -modes_match(unsigned a, unsigned b) -{ - if (a == b) - return true; - - /* Accept "in" vs. "const in" */ - if ((a == ir_var_const_in && b == ir_var_in) || - (b == ir_var_const_in && a == ir_var_in)) - return true; - - return false; -} - - -const char * -ir_function_signature::qualifiers_match(exec_list *params) -{ - exec_list_iterator iter_a = parameters.iterator(); - exec_list_iterator iter_b = params->iterator(); - - /* check that the qualifiers match. */ - while (iter_a.has_next()) { - ir_variable *a = (ir_variable *)iter_a.get(); - ir_variable *b = (ir_variable *)iter_b.get(); - - if (a->read_only != b->read_only || - !modes_match(a->mode, b->mode) || - a->interpolation != b->interpolation || - a->centroid != b->centroid) { - - /* parameter a's qualifiers don't match */ - return a->name; - } - - iter_a.next(); - iter_b.next(); - } - return NULL; -} - - -void -ir_function_signature::replace_parameters(exec_list *new_params) -{ - /* Destroy all of the previous parameter information. If the previous - * parameter information comes from the function prototype, it may either - * specify incorrect parameter names or not have names at all. - */ - foreach_iter(exec_list_iterator, iter, parameters) { - assert(((ir_instruction *) iter.get())->as_variable() != NULL); - - iter.remove(); - } - - new_params->move_nodes_to(¶meters); -} - - -ir_function::ir_function(const char *name) -{ - this->ir_type = ir_type_function; - this->name = ralloc_strdup(this, name); -} - - -bool -ir_function::has_user_signature() -{ - foreach_list(n, &this->signatures) { - ir_function_signature *const sig = (ir_function_signature *) n; - if (!sig->is_builtin) - return true; - } - return false; -} - - -ir_call * -ir_call::get_error_instruction(void *ctx) -{ - ir_call *call = new(ctx) ir_call; - - call->type = glsl_type::error_type; - return call; -} - -void -ir_call::set_callee(ir_function_signature *sig) -{ - assert((this->type == NULL) || (this->type == sig->return_type)); - - this->callee = sig; -} - -void -visit_exec_list(exec_list *list, ir_visitor *visitor) -{ - foreach_iter(exec_list_iterator, iter, *list) { - ((ir_instruction *)iter.get())->accept(visitor); - } -} - - -static void -steal_memory(ir_instruction *ir, void *new_ctx) -{ - ir_variable *var = ir->as_variable(); - ir_constant *constant = ir->as_constant(); - if (var != NULL && var->constant_value != NULL) - steal_memory(var->constant_value, ir); - - if (var != NULL && var->constant_initializer != NULL) - steal_memory(var->constant_initializer, ir); - - /* The components of aggregate constants are not visited by the normal - * visitor, so steal their values by hand. - */ - if (constant != NULL) { - if (constant->type->is_record()) { - foreach_iter(exec_list_iterator, iter, constant->components) { - ir_constant *field = (ir_constant *)iter.get(); - steal_memory(field, ir); - } - } else if (constant->type->is_array()) { - for (unsigned int i = 0; i < constant->type->length; i++) { - steal_memory(constant->array_elements[i], ir); - } - } - } - - ralloc_steal(new_ctx, ir); -} - - -void -reparent_ir(exec_list *list, void *mem_ctx) -{ - foreach_list(node, list) { - visit_tree((ir_instruction *) node, steal_memory, mem_ctx); - } -} - - -static ir_rvalue * -try_min_one(ir_rvalue *ir) -{ - ir_expression *expr = ir->as_expression(); - - if (!expr || expr->operation != ir_binop_min) - return NULL; - - if (expr->operands[0]->is_one()) - return expr->operands[1]; - - if (expr->operands[1]->is_one()) - return expr->operands[0]; - - return NULL; -} - -static ir_rvalue * -try_max_zero(ir_rvalue *ir) -{ - ir_expression *expr = ir->as_expression(); - - if (!expr || expr->operation != ir_binop_max) - return NULL; - - if (expr->operands[0]->is_zero()) - return expr->operands[1]; - - if (expr->operands[1]->is_zero()) - return expr->operands[0]; - - return NULL; -} - -ir_rvalue * -ir_rvalue::as_rvalue_to_saturate() -{ - ir_expression *expr = this->as_expression(); - - if (!expr) - return NULL; - - ir_rvalue *max_zero = try_max_zero(expr); - if (max_zero) { - return try_min_one(max_zero); - } else { - ir_rvalue *min_one = try_min_one(expr); - if (min_one) { - return try_max_zero(min_one); - } - } - - return NULL; -} diff --git a/dll/opengl/mesa/src/glsl/ir.h b/dll/opengl/mesa/src/glsl/ir.h deleted file mode 100644 index 1fae5864fc9..00000000000 --- a/dll/opengl/mesa/src/glsl/ir.h +++ /dev/null @@ -1,1720 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#pragma once -#ifndef IR_H -#define IR_H - -#include -#include - -#include "ralloc.h" -#include "glsl_types.h" -#include "list.h" -#include "ir_visitor.h" -#include "ir_hierarchical_visitor.h" -#include "main/mtypes.h" - -/** - * \defgroup IR Intermediate representation nodes - * - * @{ - */ - -/** - * Class tags - * - * Each concrete class derived from \c ir_instruction has a value in this - * enumerant. The value for the type is stored in \c ir_instruction::ir_type - * by the constructor. While using type tags is not very C++, it is extremely - * convenient. For example, during debugging you can simply inspect - * \c ir_instruction::ir_type to find out the actual type of the object. - * - * In addition, it is possible to use a switch-statement based on \c - * \c ir_instruction::ir_type to select different behavior for different object - * types. For functions that have only slight differences for several object - * types, this allows writing very straightforward, readable code. - */ -enum ir_node_type { - /** - * Zero is unused so that the IR validator can detect cases where - * \c ir_instruction::ir_type has not been initialized. - */ - ir_type_unset, - ir_type_variable, - ir_type_assignment, - ir_type_call, - ir_type_constant, - ir_type_dereference_array, - ir_type_dereference_record, - ir_type_dereference_variable, - ir_type_discard, - ir_type_expression, - ir_type_function, - ir_type_function_signature, - ir_type_if, - ir_type_loop, - ir_type_loop_jump, - ir_type_return, - ir_type_swizzle, - ir_type_texture, - ir_type_max /**< maximum ir_type enum number, for validation */ -}; - -/** - * Base class of all IR instructions - */ -class ir_instruction : public exec_node { -public: - enum ir_node_type ir_type; - const struct glsl_type *type; - - /** ir_print_visitor helper for debugging. */ - void print(void) const; - - virtual void accept(ir_visitor *) = 0; - virtual ir_visitor_status accept(ir_hierarchical_visitor *) = 0; - virtual ir_instruction *clone(void *mem_ctx, - struct hash_table *ht) const = 0; - - /** - * \name IR instruction downcast functions - * - * These functions either cast the object to a derived class or return - * \c NULL if the object's type does not match the specified derived class. - * Additional downcast functions will be added as needed. - */ - /*@{*/ - virtual class ir_variable * as_variable() { return NULL; } - virtual class ir_function * as_function() { return NULL; } - virtual class ir_dereference * as_dereference() { return NULL; } - virtual class ir_dereference_array * as_dereference_array() { return NULL; } - virtual class ir_dereference_variable *as_dereference_variable() { return NULL; } - virtual class ir_expression * as_expression() { return NULL; } - virtual class ir_rvalue * as_rvalue() { return NULL; } - virtual class ir_loop * as_loop() { return NULL; } - virtual class ir_assignment * as_assignment() { return NULL; } - virtual class ir_call * as_call() { return NULL; } - virtual class ir_return * as_return() { return NULL; } - virtual class ir_if * as_if() { return NULL; } - virtual class ir_swizzle * as_swizzle() { return NULL; } - virtual class ir_constant * as_constant() { return NULL; } - virtual class ir_discard * as_discard() { return NULL; } - /*@}*/ - -protected: - ir_instruction() - { - ir_type = ir_type_unset; - type = NULL; - } -}; - - -class ir_rvalue : public ir_instruction { -public: - virtual ir_rvalue *clone(void *mem_ctx, struct hash_table *) const = 0; - - virtual ir_constant *constant_expression_value() = 0; - - virtual ir_rvalue * as_rvalue() - { - return this; - } - - ir_rvalue *as_rvalue_to_saturate(); - - virtual bool is_lvalue() const - { - return false; - } - - /** - * Get the variable that is ultimately referenced by an r-value - */ - virtual ir_variable *variable_referenced() const - { - return NULL; - } - - - /** - * If an r-value is a reference to a whole variable, get that variable - * - * \return - * Pointer to a variable that is completely dereferenced by the r-value. If - * the r-value is not a dereference or the dereference does not access the - * entire variable (i.e., it's just one array element, struct field), \c NULL - * is returned. - */ - virtual ir_variable *whole_variable_referenced() - { - return NULL; - } - - /** - * Determine if an r-value has the value zero - * - * The base implementation of this function always returns \c false. The - * \c ir_constant class over-rides this function to return \c true \b only - * for vector and scalar types that have all elements set to the value - * zero (or \c false for booleans). - * - * \sa ir_constant::has_value, ir_rvalue::is_one, ir_rvalue::is_negative_one - */ - virtual bool is_zero() const; - - /** - * Determine if an r-value has the value one - * - * The base implementation of this function always returns \c false. The - * \c ir_constant class over-rides this function to return \c true \b only - * for vector and scalar types that have all elements set to the value - * one (or \c true for booleans). - * - * \sa ir_constant::has_value, ir_rvalue::is_zero, ir_rvalue::is_negative_one - */ - virtual bool is_one() const; - - /** - * Determine if an r-value has the value negative one - * - * The base implementation of this function always returns \c false. The - * \c ir_constant class over-rides this function to return \c true \b only - * for vector and scalar types that have all elements set to the value - * negative one. For boolean times, the result is always \c false. - * - * \sa ir_constant::has_value, ir_rvalue::is_zero, ir_rvalue::is_one - */ - virtual bool is_negative_one() const; - -protected: - ir_rvalue(); -}; - - -/** - * Variable storage classes - */ -enum ir_variable_mode { - ir_var_auto = 0, /**< Function local variables and globals. */ - ir_var_uniform, /**< Variable declared as a uniform. */ - ir_var_in, - ir_var_out, - ir_var_inout, - ir_var_const_in, /**< "in" param that must be a constant expression */ - ir_var_system_value, /**< Ex: front-face, instance-id, etc. */ - ir_var_temporary /**< Temporary variable generated during compilation. */ -}; - -/** - * \brief Layout qualifiers for gl_FragDepth. - * - * The AMD/ARB_conservative_depth extensions allow gl_FragDepth to be redeclared - * with a layout qualifier. - */ -enum ir_depth_layout { - ir_depth_layout_none, /**< No depth layout is specified. */ - ir_depth_layout_any, - ir_depth_layout_greater, - ir_depth_layout_less, - ir_depth_layout_unchanged -}; - -/** - * \brief Convert depth layout qualifier to string. - */ -const char* -depth_layout_string(ir_depth_layout layout); - -/** - * Description of built-in state associated with a uniform - * - * \sa ir_variable::state_slots - */ -struct ir_state_slot { - int tokens[5]; - int swizzle; -}; - -class ir_variable : public ir_instruction { -public: - ir_variable(const struct glsl_type *, const char *, ir_variable_mode); - - virtual ir_variable *clone(void *mem_ctx, struct hash_table *ht) const; - - virtual ir_variable *as_variable() - { - return this; - } - - virtual void accept(ir_visitor *v) - { - v->visit(this); - } - - virtual ir_visitor_status accept(ir_hierarchical_visitor *); - - - /** - * Get the string value for the interpolation qualifier - * - * \return The string that would be used in a shader to specify \c - * mode will be returned. - * - * This function is used to generate error messages of the form "shader - * uses %s interpolation qualifier", so in the case where there is no - * interpolation qualifier, it returns "no". - * - * This function should only be used on a shader input or output variable. - */ - const char *interpolation_string() const; - - /** - * Determine how this variable should be interpolated based on its - * interpolation qualifier (if present), whether it is gl_Color or - * gl_SecondaryColor, and whether flatshading is enabled in the current GL - * state. - * - * The return value will always be either INTERP_QUALIFIER_SMOOTH, - * INTERP_QUALIFIER_NOPERSPECTIVE, or INTERP_QUALIFIER_FLAT. - */ - glsl_interp_qualifier determine_interpolation_mode(bool flat_shade); - - /** - * Delcared name of the variable - */ - const char *name; - - /** - * Highest element accessed with a constant expression array index - * - * Not used for non-array variables. - */ - unsigned max_array_access; - - /** - * Is the variable read-only? - * - * This is set for variables declared as \c const, shader inputs, - * and uniforms. - */ - unsigned read_only:1; - unsigned centroid:1; - unsigned invariant:1; - - /** - * Has this variable been used for reading or writing? - * - * Several GLSL semantic checks require knowledge of whether or not a - * variable has been used. For example, it is an error to redeclare a - * variable as invariant after it has been used. - */ - unsigned used:1; - - /** - * Storage class of the variable. - * - * \sa ir_variable_mode - */ - unsigned mode:3; - - /** - * Interpolation mode for shader inputs / outputs - * - * \sa ir_variable_interpolation - */ - unsigned interpolation:2; - - /** - * \name ARB_fragment_coord_conventions - * @{ - */ - unsigned origin_upper_left:1; - unsigned pixel_center_integer:1; - /*@}*/ - - /** - * Was the location explicitly set in the shader? - * - * If the location is explicitly set in the shader, it \b cannot be changed - * by the linker or by the API (e.g., calls to \c glBindAttribLocation have - * no effect). - */ - unsigned explicit_location:1; - - /** - * Does this variable have an initializer? - * - * This is used by the linker to cross-validiate initializers of global - * variables. - */ - unsigned has_initializer:1; - - /** - * \brief Layout qualifier for gl_FragDepth. - * - * This is not equal to \c ir_depth_layout_none if and only if this - * variable is \c gl_FragDepth and a layout qualifier is specified. - */ - ir_depth_layout depth_layout; - - /** - * Storage location of the base of this variable - * - * The precise meaning of this field depends on the nature of the variable. - * - * - Vertex shader input: one of the values from \c gl_vert_attrib. - * - Vertex shader output: one of the values from \c gl_vert_result. - * - Fragment shader input: one of the values from \c gl_frag_attrib. - * - Fragment shader output: one of the values from \c gl_frag_result. - * - Uniforms: Per-stage uniform slot number. - * - Other: This field is not currently used. - * - * If the variable is a uniform, shader input, or shader output, and the - * slot has not been assigned, the value will be -1. - */ - int location; - - /** - * Built-in state that backs this uniform - * - * Once set at variable creation, \c state_slots must remain invariant. - * This is because, ideally, this array would be shared by all clones of - * this variable in the IR tree. In other words, we'd really like for it - * to be a fly-weight. - * - * If the variable is not a uniform, \c num_state_slots will be zero and - * \c state_slots will be \c NULL. - */ - /*@{*/ - unsigned num_state_slots; /**< Number of state slots used */ - ir_state_slot *state_slots; /**< State descriptors. */ - /*@}*/ - - /** - * Emit a warning if this variable is accessed. - */ - const char *warn_extension; - - /** - * Value assigned in the initializer of a variable declared "const" - */ - ir_constant *constant_value; - - /** - * Constant expression assigned in the initializer of the variable - * - * \warning - * This field and \c ::constant_value are distinct. Even if the two fields - * refer to constants with the same value, they must point to separate - * objects. - */ - ir_constant *constant_initializer; -}; - - -/*@{*/ -/** - * The representation of a function instance; may be the full definition or - * simply a prototype. - */ -class ir_function_signature : public ir_instruction { - /* An ir_function_signature will be part of the list of signatures in - * an ir_function. - */ -public: - ir_function_signature(const glsl_type *return_type); - - virtual ir_function_signature *clone(void *mem_ctx, - struct hash_table *ht) const; - ir_function_signature *clone_prototype(void *mem_ctx, - struct hash_table *ht) const; - - virtual void accept(ir_visitor *v) - { - v->visit(this); - } - - virtual ir_visitor_status accept(ir_hierarchical_visitor *); - - /** - * Get the name of the function for which this is a signature - */ - const char *function_name() const; - - /** - * Get a handle to the function for which this is a signature - * - * There is no setter function, this function returns a \c const pointer, - * and \c ir_function_signature::_function is private for a reason. The - * only way to make a connection between a function and function signature - * is via \c ir_function::add_signature. This helps ensure that certain - * invariants (i.e., a function signature is in the list of signatures for - * its \c _function) are met. - * - * \sa ir_function::add_signature - */ - inline const class ir_function *function() const - { - return this->_function; - } - - /** - * Check whether the qualifiers match between this signature's parameters - * and the supplied parameter list. If not, returns the name of the first - * parameter with mismatched qualifiers (for use in error messages). - */ - const char *qualifiers_match(exec_list *params); - - /** - * Replace the current parameter list with the given one. This is useful - * if the current information came from a prototype, and either has invalid - * or missing parameter names. - */ - void replace_parameters(exec_list *new_params); - - /** - * Function return type. - * - * \note This discards the optional precision qualifier. - */ - const struct glsl_type *return_type; - - /** - * List of ir_variable of function parameters. - * - * This represents the storage. The paramaters passed in a particular - * call will be in ir_call::actual_paramaters. - */ - struct exec_list parameters; - - /** Whether or not this function has a body (which may be empty). */ - unsigned is_defined:1; - - /** Whether or not this function signature is a built-in. */ - unsigned is_builtin:1; - - /** Body of instructions in the function. */ - struct exec_list body; - -private: - /** Function of which this signature is one overload. */ - class ir_function *_function; - - friend class ir_function; -}; - - -/** - * Header for tracking multiple overloaded functions with the same name. - * Contains a list of ir_function_signatures representing each of the - * actual functions. - */ -class ir_function : public ir_instruction { -public: - ir_function(const char *name); - - virtual ir_function *clone(void *mem_ctx, struct hash_table *ht) const; - - virtual ir_function *as_function() - { - return this; - } - - virtual void accept(ir_visitor *v) - { - v->visit(this); - } - - virtual ir_visitor_status accept(ir_hierarchical_visitor *); - - void add_signature(ir_function_signature *sig) - { - sig->_function = this; - this->signatures.push_tail(sig); - } - - /** - * Get an iterator for the set of function signatures - */ - exec_list_iterator iterator() - { - return signatures.iterator(); - } - - /** - * Find a signature that matches a set of actual parameters, taking implicit - * conversions into account. Also flags whether the match was exact. - */ - ir_function_signature *matching_signature(const exec_list *actual_param, - bool *match_is_exact); - - /** - * Find a signature that matches a set of actual parameters, taking implicit - * conversions into account. - */ - ir_function_signature *matching_signature(const exec_list *actual_param); - - /** - * Find a signature that exactly matches a set of actual parameters without - * any implicit type conversions. - */ - ir_function_signature *exact_matching_signature(const exec_list *actual_ps); - - /** - * Name of the function. - */ - const char *name; - - /** Whether or not this function has a signature that isn't a built-in. */ - bool has_user_signature(); - - /** - * List of ir_function_signature for each overloaded function with this name. - */ - struct exec_list signatures; -}; - -inline const char *ir_function_signature::function_name() const -{ - return this->_function->name; -} -/*@}*/ - - -/** - * IR instruction representing high-level if-statements - */ -class ir_if : public ir_instruction { -public: - ir_if(ir_rvalue *condition) - : condition(condition) - { - ir_type = ir_type_if; - } - - virtual ir_if *clone(void *mem_ctx, struct hash_table *ht) const; - - virtual ir_if *as_if() - { - return this; - } - - virtual void accept(ir_visitor *v) - { - v->visit(this); - } - - virtual ir_visitor_status accept(ir_hierarchical_visitor *); - - ir_rvalue *condition; - /** List of ir_instruction for the body of the then branch */ - exec_list then_instructions; - /** List of ir_instruction for the body of the else branch */ - exec_list else_instructions; -}; - - -/** - * IR instruction representing a high-level loop structure. - */ -class ir_loop : public ir_instruction { -public: - ir_loop(); - - virtual ir_loop *clone(void *mem_ctx, struct hash_table *ht) const; - - virtual void accept(ir_visitor *v) - { - v->visit(this); - } - - virtual ir_visitor_status accept(ir_hierarchical_visitor *); - - virtual ir_loop *as_loop() - { - return this; - } - - /** - * Get an iterator for the instructions of the loop body - */ - exec_list_iterator iterator() - { - return body_instructions.iterator(); - } - - /** List of ir_instruction that make up the body of the loop. */ - exec_list body_instructions; - - /** - * \name Loop counter and controls - * - * Represents a loop like a FORTRAN \c do-loop. - * - * \note - * If \c from and \c to are the same value, the loop will execute once. - */ - /*@{*/ - ir_rvalue *from; /** Value of the loop counter on the first - * iteration of the loop. - */ - ir_rvalue *to; /** Value of the loop counter on the last - * iteration of the loop. - */ - ir_rvalue *increment; - ir_variable *counter; - - /** - * Comparison operation in the loop terminator. - * - * If any of the loop control fields are non-\c NULL, this field must be - * one of \c ir_binop_less, \c ir_binop_greater, \c ir_binop_lequal, - * \c ir_binop_gequal, \c ir_binop_equal, or \c ir_binop_nequal. - */ - int cmp; - /*@}*/ -}; - - -class ir_assignment : public ir_instruction { -public: - ir_assignment(ir_rvalue *lhs, ir_rvalue *rhs, ir_rvalue *condition = NULL); - - /** - * Construct an assignment with an explicit write mask - * - * \note - * Since a write mask is supplied, the LHS must already be a bare - * \c ir_dereference. The cannot be any swizzles in the LHS. - */ - ir_assignment(ir_dereference *lhs, ir_rvalue *rhs, ir_rvalue *condition, - unsigned write_mask); - - virtual ir_assignment *clone(void *mem_ctx, struct hash_table *ht) const; - - virtual ir_constant *constant_expression_value(); - - virtual void accept(ir_visitor *v) - { - v->visit(this); - } - - virtual ir_visitor_status accept(ir_hierarchical_visitor *); - - virtual ir_assignment * as_assignment() - { - return this; - } - - /** - * Get a whole variable written by an assignment - * - * If the LHS of the assignment writes a whole variable, the variable is - * returned. Otherwise \c NULL is returned. Examples of whole-variable - * assignment are: - * - * - Assigning to a scalar - * - Assigning to all components of a vector - * - Whole array (or matrix) assignment - * - Whole structure assignment - */ - ir_variable *whole_variable_written(); - - /** - * Set the LHS of an assignment - */ - void set_lhs(ir_rvalue *lhs); - - /** - * Left-hand side of the assignment. - * - * This should be treated as read only. If you need to set the LHS of an - * assignment, use \c ir_assignment::set_lhs. - */ - ir_dereference *lhs; - - /** - * Value being assigned - */ - ir_rvalue *rhs; - - /** - * Optional condition for the assignment. - */ - ir_rvalue *condition; - - - /** - * Component mask written - * - * For non-vector types in the LHS, this field will be zero. For vector - * types, a bit will be set for each component that is written. Note that - * for \c vec2 and \c vec3 types only the lower bits will ever be set. - * - * A partially-set write mask means that each enabled channel gets - * the value from a consecutive channel of the rhs. For example, - * to write just .xyw of gl_FrontColor with color: - * - * (assign (constant bool (1)) (xyw) - * (var_ref gl_FragColor) - * (swiz xyw (var_ref color))) - */ - unsigned write_mask:4; -}; - -/* Update ir_expression::num_operands() and operator_strs when - * updating this list. - */ -enum ir_expression_operation { - ir_unop_bit_not, - ir_unop_logic_not, - ir_unop_neg, - ir_unop_abs, - ir_unop_sign, - ir_unop_rcp, - ir_unop_rsq, - ir_unop_sqrt, - ir_unop_exp, /**< Log base e on gentype */ - ir_unop_log, /**< Natural log on gentype */ - ir_unop_exp2, - ir_unop_log2, - ir_unop_f2i, /**< Float-to-integer conversion. */ - ir_unop_i2f, /**< Integer-to-float conversion. */ - ir_unop_f2b, /**< Float-to-boolean conversion */ - ir_unop_b2f, /**< Boolean-to-float conversion */ - ir_unop_i2b, /**< int-to-boolean conversion */ - ir_unop_b2i, /**< Boolean-to-int conversion */ - ir_unop_u2f, /**< Unsigned-to-float conversion. */ - ir_unop_i2u, /**< Integer-to-unsigned conversion. */ - ir_unop_u2i, /**< Unsigned-to-integer conversion. */ - ir_unop_any, - - /** - * \name Unary floating-point rounding operations. - */ - /*@{*/ - ir_unop_trunc, - ir_unop_ceil, - ir_unop_floor, - ir_unop_fract, - ir_unop_round_even, - /*@}*/ - - /** - * \name Trigonometric operations. - */ - /*@{*/ - ir_unop_sin, - ir_unop_cos, - ir_unop_sin_reduced, /**< Reduced range sin. [-pi, pi] */ - ir_unop_cos_reduced, /**< Reduced range cos. [-pi, pi] */ - /*@}*/ - - /** - * \name Partial derivatives. - */ - /*@{*/ - ir_unop_dFdx, - ir_unop_dFdy, - /*@}*/ - - ir_unop_noise, - - /** - * A sentinel marking the last of the unary operations. - */ - ir_last_unop = ir_unop_noise, - - ir_binop_add, - ir_binop_sub, - ir_binop_mul, - ir_binop_div, - - /** - * Takes one of two combinations of arguments: - * - * - mod(vecN, vecN) - * - mod(vecN, float) - * - * Does not take integer types. - */ - ir_binop_mod, - - /** - * \name Binary comparison operators which return a boolean vector. - * The type of both operands must be equal. - */ - /*@{*/ - ir_binop_less, - ir_binop_greater, - ir_binop_lequal, - ir_binop_gequal, - ir_binop_equal, - ir_binop_nequal, - /** - * Returns single boolean for whether all components of operands[0] - * equal the components of operands[1]. - */ - ir_binop_all_equal, - /** - * Returns single boolean for whether any component of operands[0] - * is not equal to the corresponding component of operands[1]. - */ - ir_binop_any_nequal, - /*@}*/ - - /** - * \name Bit-wise binary operations. - */ - /*@{*/ - ir_binop_lshift, - ir_binop_rshift, - ir_binop_bit_and, - ir_binop_bit_xor, - ir_binop_bit_or, - /*@}*/ - - ir_binop_logic_and, - ir_binop_logic_xor, - ir_binop_logic_or, - - ir_binop_dot, - ir_binop_min, - ir_binop_max, - - ir_binop_pow, - - /** - * A sentinel marking the last of the binary operations. - */ - ir_last_binop = ir_binop_pow, - - ir_quadop_vector, - - /** - * A sentinel marking the last of all operations. - */ - ir_last_opcode = ir_last_binop -}; - -class ir_expression : public ir_rvalue { -public: - /** - * Constructor for unary operation expressions - */ - ir_expression(int op, const struct glsl_type *type, ir_rvalue *); - ir_expression(int op, ir_rvalue *); - - /** - * Constructor for binary operation expressions - */ - ir_expression(int op, const struct glsl_type *type, - ir_rvalue *, ir_rvalue *); - ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1); - - /** - * Constructor for quad operator expressions - */ - ir_expression(int op, const struct glsl_type *type, - ir_rvalue *, ir_rvalue *, ir_rvalue *, ir_rvalue *); - - virtual ir_expression *as_expression() - { - return this; - } - - virtual ir_expression *clone(void *mem_ctx, struct hash_table *ht) const; - - /** - * Attempt to constant-fold the expression - * - * If the expression cannot be constant folded, this method will return - * \c NULL. - */ - virtual ir_constant *constant_expression_value(); - - /** - * Determine the number of operands used by an expression - */ - static unsigned int get_num_operands(ir_expression_operation); - - /** - * Determine the number of operands used by an expression - */ - unsigned int get_num_operands() const - { - return (this->operation == ir_quadop_vector) - ? this->type->vector_elements : get_num_operands(operation); - } - - /** - * Return a string representing this expression's operator. - */ - const char *operator_string(); - - /** - * Return a string representing this expression's operator. - */ - static const char *operator_string(ir_expression_operation); - - - /** - * Do a reverse-lookup to translate the given string into an operator. - */ - static ir_expression_operation get_operator(const char *); - - virtual void accept(ir_visitor *v) - { - v->visit(this); - } - - virtual ir_visitor_status accept(ir_hierarchical_visitor *); - - ir_expression_operation operation; - ir_rvalue *operands[4]; -}; - - -/** - * IR instruction representing a function call - */ -class ir_call : public ir_rvalue { -public: - ir_call(ir_function_signature *callee, exec_list *actual_parameters) - : callee(callee) - { - ir_type = ir_type_call; - assert(callee->return_type != NULL); - type = callee->return_type; - actual_parameters->move_nodes_to(& this->actual_parameters); - this->use_builtin = callee->is_builtin; - } - - virtual ir_call *clone(void *mem_ctx, struct hash_table *ht) const; - - virtual ir_constant *constant_expression_value(); - - virtual ir_call *as_call() - { - return this; - } - - virtual void accept(ir_visitor *v) - { - v->visit(this); - } - - virtual ir_visitor_status accept(ir_hierarchical_visitor *); - - /** - * Get a generic ir_call object when an error occurs - * - * Any allocation will be performed with 'ctx' as ralloc owner. - */ - static ir_call *get_error_instruction(void *ctx); - - /** - * Get an iterator for the set of acutal parameters - */ - exec_list_iterator iterator() - { - return actual_parameters.iterator(); - } - - /** - * Get the name of the function being called. - */ - const char *callee_name() const - { - return callee->function_name(); - } - - /** - * Get the function signature bound to this function call - */ - ir_function_signature *get_callee() - { - return callee; - } - - /** - * Set the function call target - */ - void set_callee(ir_function_signature *sig); - - /** - * Generates an inline version of the function before @ir, - * returning the return value of the function. - */ - ir_rvalue *generate_inline(ir_instruction *ir); - - /* List of ir_rvalue of paramaters passed in this call. */ - exec_list actual_parameters; - - /** Should this call only bind to a built-in function? */ - bool use_builtin; - -private: - ir_call() - : callee(NULL) - { - this->ir_type = ir_type_call; - } - - ir_function_signature *callee; -}; - - -/** - * \name Jump-like IR instructions. - * - * These include \c break, \c continue, \c return, and \c discard. - */ -/*@{*/ -class ir_jump : public ir_instruction { -protected: - ir_jump() - { - ir_type = ir_type_unset; - } -}; - -class ir_return : public ir_jump { -public: - ir_return() - : value(NULL) - { - this->ir_type = ir_type_return; - } - - ir_return(ir_rvalue *value) - : value(value) - { - this->ir_type = ir_type_return; - } - - virtual ir_return *clone(void *mem_ctx, struct hash_table *) const; - - virtual ir_return *as_return() - { - return this; - } - - ir_rvalue *get_value() const - { - return value; - } - - virtual void accept(ir_visitor *v) - { - v->visit(this); - } - - virtual ir_visitor_status accept(ir_hierarchical_visitor *); - - ir_rvalue *value; -}; - - -/** - * Jump instructions used inside loops - * - * These include \c break and \c continue. The \c break within a loop is - * different from the \c break within a switch-statement. - * - * \sa ir_switch_jump - */ -class ir_loop_jump : public ir_jump { -public: - enum jump_mode { - jump_break, - jump_continue - }; - - ir_loop_jump(jump_mode mode) - { - this->ir_type = ir_type_loop_jump; - this->mode = mode; - } - - virtual ir_loop_jump *clone(void *mem_ctx, struct hash_table *) const; - - virtual void accept(ir_visitor *v) - { - v->visit(this); - } - - virtual ir_visitor_status accept(ir_hierarchical_visitor *); - - bool is_break() const - { - return mode == jump_break; - } - - bool is_continue() const - { - return mode == jump_continue; - } - - /** Mode selector for the jump instruction. */ - enum jump_mode mode; -}; - -/** - * IR instruction representing discard statements. - */ -class ir_discard : public ir_jump { -public: - ir_discard() - { - this->ir_type = ir_type_discard; - this->condition = NULL; - } - - ir_discard(ir_rvalue *cond) - { - this->ir_type = ir_type_discard; - this->condition = cond; - } - - virtual ir_discard *clone(void *mem_ctx, struct hash_table *ht) const; - - virtual void accept(ir_visitor *v) - { - v->visit(this); - } - - virtual ir_visitor_status accept(ir_hierarchical_visitor *); - - virtual ir_discard *as_discard() - { - return this; - } - - ir_rvalue *condition; -}; -/*@}*/ - - -/** - * Texture sampling opcodes used in ir_texture - */ -enum ir_texture_opcode { - ir_tex, /**< Regular texture look-up */ - ir_txb, /**< Texture look-up with LOD bias */ - ir_txl, /**< Texture look-up with explicit LOD */ - ir_txd, /**< Texture look-up with partial derivatvies */ - ir_txf, /**< Texel fetch with explicit LOD */ - ir_txs /**< Texture size */ -}; - - -/** - * IR instruction to sample a texture - * - * The specific form of the IR instruction depends on the \c mode value - * selected from \c ir_texture_opcodes. In the printed IR, these will - * appear as: - * - * Texel offset (0 or an expression) - * | Projection divisor - * | | Shadow comparitor - * | | | - * v v v - * (tex 0 1 ( )) - * (txb 0 1 ( ) ) - * (txl 0 1 ( ) ) - * (txd 0 1 ( ) (dPdx dPdy)) - * (txf 0 ) - * (txs ) - */ -class ir_texture : public ir_rvalue { -public: - ir_texture(enum ir_texture_opcode op) - : op(op), projector(NULL), shadow_comparitor(NULL), offset(NULL) - { - this->ir_type = ir_type_texture; - } - - virtual ir_texture *clone(void *mem_ctx, struct hash_table *) const; - - virtual ir_constant *constant_expression_value(); - - virtual void accept(ir_visitor *v) - { - v->visit(this); - } - - virtual ir_visitor_status accept(ir_hierarchical_visitor *); - - /** - * Return a string representing the ir_texture_opcode. - */ - const char *opcode_string(); - - /** Set the sampler and type. */ - void set_sampler(ir_dereference *sampler, const glsl_type *type); - - /** - * Do a reverse-lookup to translate a string into an ir_texture_opcode. - */ - static ir_texture_opcode get_opcode(const char *); - - enum ir_texture_opcode op; - - /** Sampler to use for the texture access. */ - ir_dereference *sampler; - - /** Texture coordinate to sample */ - ir_rvalue *coordinate; - - /** - * Value used for projective divide. - * - * If there is no projective divide (the common case), this will be - * \c NULL. Optimization passes should check for this to point to a constant - * of 1.0 and replace that with \c NULL. - */ - ir_rvalue *projector; - - /** - * Coordinate used for comparison on shadow look-ups. - * - * If there is no shadow comparison, this will be \c NULL. For the - * \c ir_txf opcode, this *must* be \c NULL. - */ - ir_rvalue *shadow_comparitor; - - /** Texel offset. */ - ir_rvalue *offset; - - union { - ir_rvalue *lod; /**< Floating point LOD */ - ir_rvalue *bias; /**< Floating point LOD bias */ - struct { - ir_rvalue *dPdx; /**< Partial derivative of coordinate wrt X */ - ir_rvalue *dPdy; /**< Partial derivative of coordinate wrt Y */ - } grad; - } lod_info; -}; - - -struct ir_swizzle_mask { - unsigned x:2; - unsigned y:2; - unsigned z:2; - unsigned w:2; - - /** - * Number of components in the swizzle. - */ - unsigned num_components:3; - - /** - * Does the swizzle contain duplicate components? - * - * L-value swizzles cannot contain duplicate components. - */ - unsigned has_duplicates:1; -}; - - -class ir_swizzle : public ir_rvalue { -public: - ir_swizzle(ir_rvalue *, unsigned x, unsigned y, unsigned z, unsigned w, - unsigned count); - - ir_swizzle(ir_rvalue *val, const unsigned *components, unsigned count); - - ir_swizzle(ir_rvalue *val, ir_swizzle_mask mask); - - virtual ir_swizzle *clone(void *mem_ctx, struct hash_table *) const; - - virtual ir_constant *constant_expression_value(); - - virtual ir_swizzle *as_swizzle() - { - return this; - } - - /** - * Construct an ir_swizzle from the textual representation. Can fail. - */ - static ir_swizzle *create(ir_rvalue *, const char *, unsigned vector_length); - - virtual void accept(ir_visitor *v) - { - v->visit(this); - } - - virtual ir_visitor_status accept(ir_hierarchical_visitor *); - - bool is_lvalue() const - { - return val->is_lvalue() && !mask.has_duplicates; - } - - /** - * Get the variable that is ultimately referenced by an r-value - */ - virtual ir_variable *variable_referenced() const; - - ir_rvalue *val; - ir_swizzle_mask mask; - -private: - /** - * Initialize the mask component of a swizzle - * - * This is used by the \c ir_swizzle constructors. - */ - void init_mask(const unsigned *components, unsigned count); -}; - - -class ir_dereference : public ir_rvalue { -public: - virtual ir_dereference *clone(void *mem_ctx, struct hash_table *) const = 0; - - virtual ir_dereference *as_dereference() - { - return this; - } - - bool is_lvalue() const; - - /** - * Get the variable that is ultimately referenced by an r-value - */ - virtual ir_variable *variable_referenced() const = 0; -}; - - -class ir_dereference_variable : public ir_dereference { -public: - ir_dereference_variable(ir_variable *var); - - virtual ir_dereference_variable *clone(void *mem_ctx, - struct hash_table *) const; - - virtual ir_constant *constant_expression_value(); - - virtual ir_dereference_variable *as_dereference_variable() - { - return this; - } - - /** - * Get the variable that is ultimately referenced by an r-value - */ - virtual ir_variable *variable_referenced() const - { - return this->var; - } - - virtual ir_variable *whole_variable_referenced() - { - /* ir_dereference_variable objects always dereference the entire - * variable. However, if this dereference is dereferenced by anything - * else, the complete deferefernce chain is not a whole-variable - * dereference. This method should only be called on the top most - * ir_rvalue in a dereference chain. - */ - return this->var; - } - - virtual void accept(ir_visitor *v) - { - v->visit(this); - } - - virtual ir_visitor_status accept(ir_hierarchical_visitor *); - - /** - * Object being dereferenced. - */ - ir_variable *var; -}; - - -class ir_dereference_array : public ir_dereference { -public: - ir_dereference_array(ir_rvalue *value, ir_rvalue *array_index); - - ir_dereference_array(ir_variable *var, ir_rvalue *array_index); - - virtual ir_dereference_array *clone(void *mem_ctx, - struct hash_table *) const; - - virtual ir_constant *constant_expression_value(); - - virtual ir_dereference_array *as_dereference_array() - { - return this; - } - - /** - * Get the variable that is ultimately referenced by an r-value - */ - virtual ir_variable *variable_referenced() const - { - return this->array->variable_referenced(); - } - - virtual void accept(ir_visitor *v) - { - v->visit(this); - } - - virtual ir_visitor_status accept(ir_hierarchical_visitor *); - - ir_rvalue *array; - ir_rvalue *array_index; - -private: - void set_array(ir_rvalue *value); -}; - - -class ir_dereference_record : public ir_dereference { -public: - ir_dereference_record(ir_rvalue *value, const char *field); - - ir_dereference_record(ir_variable *var, const char *field); - - virtual ir_dereference_record *clone(void *mem_ctx, - struct hash_table *) const; - - virtual ir_constant *constant_expression_value(); - - /** - * Get the variable that is ultimately referenced by an r-value - */ - virtual ir_variable *variable_referenced() const - { - return this->record->variable_referenced(); - } - - virtual void accept(ir_visitor *v) - { - v->visit(this); - } - - virtual ir_visitor_status accept(ir_hierarchical_visitor *); - - ir_rvalue *record; - const char *field; -}; - - -/** - * Data stored in an ir_constant - */ -union ir_constant_data { - unsigned u[16]; - int i[16]; - float f[16]; - bool b[16]; -}; - - -class ir_constant : public ir_rvalue { -public: - ir_constant(const struct glsl_type *type, const ir_constant_data *data); - ir_constant(bool b); - ir_constant(unsigned int u); - ir_constant(int i); - ir_constant(float f); - - /** - * Construct an ir_constant from a list of ir_constant values - */ - ir_constant(const struct glsl_type *type, exec_list *values); - - /** - * Construct an ir_constant from a scalar component of another ir_constant - * - * The new \c ir_constant inherits the type of the component from the - * source constant. - * - * \note - * In the case of a matrix constant, the new constant is a scalar, \b not - * a vector. - */ - ir_constant(const ir_constant *c, unsigned i); - - /** - * Return a new ir_constant of the specified type containing all zeros. - */ - static ir_constant *zero(void *mem_ctx, const glsl_type *type); - - virtual ir_constant *clone(void *mem_ctx, struct hash_table *) const; - - virtual ir_constant *constant_expression_value(); - - virtual ir_constant *as_constant() - { - return this; - } - - virtual void accept(ir_visitor *v) - { - v->visit(this); - } - - virtual ir_visitor_status accept(ir_hierarchical_visitor *); - - /** - * Get a particular component of a constant as a specific type - * - * This is useful, for example, to get a value from an integer constant - * as a float or bool. This appears frequently when constructors are - * called with all constant parameters. - */ - /*@{*/ - bool get_bool_component(unsigned i) const; - float get_float_component(unsigned i) const; - int get_int_component(unsigned i) const; - unsigned get_uint_component(unsigned i) const; - /*@}*/ - - ir_constant *get_array_element(unsigned i) const; - - ir_constant *get_record_field(const char *name); - - /** - * Determine whether a constant has the same value as another constant - * - * \sa ir_constant::is_zero, ir_constant::is_one, - * ir_constant::is_negative_one - */ - bool has_value(const ir_constant *) const; - - virtual bool is_zero() const; - virtual bool is_one() const; - virtual bool is_negative_one() const; - - /** - * Value of the constant. - * - * The field used to back the values supplied by the constant is determined - * by the type associated with the \c ir_instruction. Constants may be - * scalars, vectors, or matrices. - */ - union ir_constant_data value; - - /* Array elements */ - ir_constant **array_elements; - - /* Structure fields */ - exec_list components; - -private: - /** - * Parameterless constructor only used by the clone method - */ - ir_constant(void); -}; - -/*@}*/ - -/** - * Apply a visitor to each IR node in a list - */ -void -visit_exec_list(exec_list *list, ir_visitor *visitor); - -/** - * Validate invariants on each IR node in a list - */ -void validate_ir_tree(exec_list *instructions); - -struct _mesa_glsl_parse_state; -struct gl_shader_program; - -/** - * Detect whether an unlinked shader contains static recursion - * - * If the list of instructions is determined to contain static recursion, - * \c _mesa_glsl_error will be called to emit error messages for each function - * that is in the recursion cycle. - */ -void -detect_recursion_unlinked(struct _mesa_glsl_parse_state *state, - exec_list *instructions); - -/** - * Detect whether a linked shader contains static recursion - * - * If the list of instructions is determined to contain static recursion, - * \c link_error_printf will be called to emit error messages for each function - * that is in the recursion cycle. In addition, - * \c gl_shader_program::LinkStatus will be set to false. - */ -void -detect_recursion_linked(struct gl_shader_program *prog, - exec_list *instructions); - -/** - * Make a clone of each IR instruction in a list - * - * \param in List of IR instructions that are to be cloned - * \param out List to hold the cloned instructions - */ -void -clone_ir_list(void *mem_ctx, exec_list *out, const exec_list *in); - -extern void -_mesa_glsl_initialize_variables(exec_list *instructions, - struct _mesa_glsl_parse_state *state); - -extern void -_mesa_glsl_initialize_functions(_mesa_glsl_parse_state *state); - -extern void -_mesa_glsl_release_functions(void); - -extern void -reparent_ir(exec_list *list, void *mem_ctx); - -struct glsl_symbol_table; - -extern void -import_prototypes(const exec_list *source, exec_list *dest, - struct glsl_symbol_table *symbols, void *mem_ctx); - -extern bool -ir_has_call(ir_instruction *ir); - -extern void -do_set_program_inouts(exec_list *instructions, struct gl_program *prog, - bool is_fragment_shader); - -extern char * -prototype_string(const glsl_type *return_type, const char *name, - exec_list *parameters); - -#endif /* IR_H */ diff --git a/dll/opengl/mesa/src/glsl/ir_basic_block.cpp b/dll/opengl/mesa/src/glsl/ir_basic_block.cpp deleted file mode 100644 index a8338259620..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_basic_block.cpp +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file ir_basic_block.cpp - * - * Basic block analysis of instruction streams. - */ - -#include "ir.h" -#include "ir_visitor.h" -#include "ir_basic_block.h" -#include "glsl_types.h" - -class ir_has_call_visitor : public ir_hierarchical_visitor { -public: - ir_has_call_visitor() - { - has_call = false; - } - - virtual ir_visitor_status visit_enter(ir_call *ir) - { - (void) ir; - has_call = true; - return visit_stop; - } - - bool has_call; -}; - -bool -ir_has_call(ir_instruction *ir) -{ - ir_has_call_visitor v; - ir->accept(&v); - return v.has_call; -} - -/** - * Calls a user function for every basic block in the instruction stream. - * - * Basic block analysis is pretty easy in our IR thanks to the lack of - * unstructured control flow. We've got: - * - * ir_loop (for () {}, while () {}, do {} while ()) - * ir_loop_jump ( - * ir_if () {} - * ir_return - * ir_call() - * - * Note that the basic blocks returned by this don't encompass all - * operations performed by the program -- for example, if conditions - * don't get returned, nor do the assignments that will be generated - * for ir_call parameters. - */ -void call_for_basic_blocks(exec_list *instructions, - void (*callback)(ir_instruction *first, - ir_instruction *last, - void *data), - void *data) -{ - ir_instruction *leader = NULL; - ir_instruction *last = NULL; - - foreach_iter(exec_list_iterator, iter, *instructions) { - ir_instruction *ir = (ir_instruction *)iter.get(); - ir_if *ir_if; - ir_loop *ir_loop; - ir_function *ir_function; - - if (!leader) - leader = ir; - - if ((ir_if = ir->as_if())) { - callback(leader, ir, data); - leader = NULL; - - call_for_basic_blocks(&ir_if->then_instructions, callback, data); - call_for_basic_blocks(&ir_if->else_instructions, callback, data); - } else if ((ir_loop = ir->as_loop())) { - callback(leader, ir, data); - leader = NULL; - call_for_basic_blocks(&ir_loop->body_instructions, callback, data); - } else if (ir->as_return() || ir->as_call()) { - callback(leader, ir, data); - leader = NULL; - } else if ((ir_function = ir->as_function())) { - /* A function definition doesn't interrupt our basic block - * since execution doesn't go into it. We should process the - * bodies of its signatures for BBs, though. - * - * Note that we miss an opportunity for producing more - * maximal BBs between the instructions that precede main() - * and the body of main(). Perhaps those instructions ought - * to live inside of main(). - */ - foreach_iter(exec_list_iterator, fun_iter, *ir_function) { - ir_function_signature *ir_sig; - - ir_sig = (ir_function_signature *)fun_iter.get(); - - call_for_basic_blocks(&ir_sig->body, callback, data); - } - } else if (ir->as_assignment()) { - /* If there's a call in the expression tree being assigned, - * then that ends the BB too. - * - * The assumption is that any consumer of the basic block - * walker is fine with the fact that the call is somewhere in - * the tree even if portions of the tree may be evaluated - * after the call. - * - * A consumer that has an issue with this could not process - * the last instruction of the basic block. If doing so, - * expression flattener may be useful before using the basic - * block finder to get more maximal basic blocks out. - */ - if (ir_has_call(ir)) { - callback(leader, ir, data); - leader = NULL; - } - } - last = ir; - } - if (leader) { - callback(leader, last, data); - } -} diff --git a/dll/opengl/mesa/src/glsl/ir_basic_block.h b/dll/opengl/mesa/src/glsl/ir_basic_block.h deleted file mode 100644 index dbd678b5c4f..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_basic_block.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -void call_for_basic_blocks(exec_list *instructions, - void (*callback)(ir_instruction *first, - ir_instruction *last, - void *data), - void *data); diff --git a/dll/opengl/mesa/src/glsl/ir_clone.cpp b/dll/opengl/mesa/src/glsl/ir_clone.cpp deleted file mode 100644 index c63615c7eb3..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_clone.cpp +++ /dev/null @@ -1,437 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include -#include "main/compiler.h" -#include "ir.h" -#include "glsl_types.h" -#include "program/hash_table.h" - -/** - * Duplicate an IR variable - * - * \note - * This will probably be made \c virtual and moved to the base class - * eventually. - */ -ir_variable * -ir_variable::clone(void *mem_ctx, struct hash_table *ht) const -{ - ir_variable *var = new(mem_ctx) ir_variable(this->type, this->name, - (ir_variable_mode) this->mode); - - var->max_array_access = this->max_array_access; - var->read_only = this->read_only; - var->centroid = this->centroid; - var->invariant = this->invariant; - var->interpolation = this->interpolation; - var->location = this->location; - var->warn_extension = this->warn_extension; - var->origin_upper_left = this->origin_upper_left; - var->pixel_center_integer = this->pixel_center_integer; - var->explicit_location = this->explicit_location; - var->has_initializer = this->has_initializer; - var->depth_layout = this->depth_layout; - - var->num_state_slots = this->num_state_slots; - if (this->state_slots) { - /* FINISHME: This really wants to use something like talloc_reference, but - * FINISHME: ralloc doesn't have any similar function. - */ - var->state_slots = ralloc_array(var, ir_state_slot, - this->num_state_slots); - memcpy(var->state_slots, this->state_slots, - sizeof(this->state_slots[0]) * var->num_state_slots); - } - - if (this->explicit_location) - var->location = this->location; - - if (this->constant_value) - var->constant_value = this->constant_value->clone(mem_ctx, ht); - - if (this->constant_initializer) - var->constant_initializer = - this->constant_initializer->clone(mem_ctx, ht); - - if (ht) { - hash_table_insert(ht, var, (void *)const_cast(this)); - } - - return var; -} - -ir_swizzle * -ir_swizzle::clone(void *mem_ctx, struct hash_table *ht) const -{ - return new(mem_ctx) ir_swizzle(this->val->clone(mem_ctx, ht), this->mask); -} - -ir_return * -ir_return::clone(void *mem_ctx, struct hash_table *ht) const -{ - ir_rvalue *new_value = NULL; - - if (this->value) - new_value = this->value->clone(mem_ctx, ht); - - return new(mem_ctx) ir_return(new_value); -} - -ir_discard * -ir_discard::clone(void *mem_ctx, struct hash_table *ht) const -{ - ir_rvalue *new_condition = NULL; - - if (this->condition != NULL) - new_condition = this->condition->clone(mem_ctx, ht); - - return new(mem_ctx) ir_discard(new_condition); -} - -ir_loop_jump * -ir_loop_jump::clone(void *mem_ctx, struct hash_table *ht) const -{ - (void)ht; - - return new(mem_ctx) ir_loop_jump(this->mode); -} - -ir_if * -ir_if::clone(void *mem_ctx, struct hash_table *ht) const -{ - ir_if *new_if = new(mem_ctx) ir_if(this->condition->clone(mem_ctx, ht)); - - foreach_iter(exec_list_iterator, iter, this->then_instructions) { - ir_instruction *ir = (ir_instruction *)iter.get(); - new_if->then_instructions.push_tail(ir->clone(mem_ctx, ht)); - } - - foreach_iter(exec_list_iterator, iter, this->else_instructions) { - ir_instruction *ir = (ir_instruction *)iter.get(); - new_if->else_instructions.push_tail(ir->clone(mem_ctx, ht)); - } - - return new_if; -} - -ir_loop * -ir_loop::clone(void *mem_ctx, struct hash_table *ht) const -{ - ir_loop *new_loop = new(mem_ctx) ir_loop(); - - if (this->from) - new_loop->from = this->from->clone(mem_ctx, ht); - if (this->to) - new_loop->to = this->to->clone(mem_ctx, ht); - if (this->increment) - new_loop->increment = this->increment->clone(mem_ctx, ht); - new_loop->counter = counter; - - foreach_iter(exec_list_iterator, iter, this->body_instructions) { - ir_instruction *ir = (ir_instruction *)iter.get(); - new_loop->body_instructions.push_tail(ir->clone(mem_ctx, ht)); - } - - new_loop->cmp = this->cmp; - return new_loop; -} - -ir_call * -ir_call::clone(void *mem_ctx, struct hash_table *ht) const -{ - if (this->type == glsl_type::error_type) - return ir_call::get_error_instruction(mem_ctx); - - exec_list new_parameters; - - foreach_iter(exec_list_iterator, iter, this->actual_parameters) { - ir_instruction *ir = (ir_instruction *)iter.get(); - new_parameters.push_tail(ir->clone(mem_ctx, ht)); - } - - return new(mem_ctx) ir_call(this->callee, &new_parameters); -} - -ir_expression * -ir_expression::clone(void *mem_ctx, struct hash_table *ht) const -{ - ir_rvalue *op[Elements(this->operands)] = { NULL, }; - unsigned int i; - - for (i = 0; i < get_num_operands(); i++) { - op[i] = this->operands[i]->clone(mem_ctx, ht); - } - - return new(mem_ctx) ir_expression(this->operation, this->type, - op[0], op[1], op[2], op[3]); -} - -ir_dereference_variable * -ir_dereference_variable::clone(void *mem_ctx, struct hash_table *ht) const -{ - ir_variable *new_var; - - if (ht) { - new_var = (ir_variable *)hash_table_find(ht, this->var); - if (!new_var) - new_var = this->var; - } else { - new_var = this->var; - } - - return new(mem_ctx) ir_dereference_variable(new_var); -} - -ir_dereference_array * -ir_dereference_array::clone(void *mem_ctx, struct hash_table *ht) const -{ - return new(mem_ctx) ir_dereference_array(this->array->clone(mem_ctx, ht), - this->array_index->clone(mem_ctx, - ht)); -} - -ir_dereference_record * -ir_dereference_record::clone(void *mem_ctx, struct hash_table *ht) const -{ - return new(mem_ctx) ir_dereference_record(this->record->clone(mem_ctx, ht), - this->field); -} - -ir_texture * -ir_texture::clone(void *mem_ctx, struct hash_table *ht) const -{ - ir_texture *new_tex = new(mem_ctx) ir_texture(this->op); - new_tex->type = this->type; - - new_tex->sampler = this->sampler->clone(mem_ctx, ht); - if (this->coordinate) - new_tex->coordinate = this->coordinate->clone(mem_ctx, ht); - if (this->projector) - new_tex->projector = this->projector->clone(mem_ctx, ht); - if (this->shadow_comparitor) { - new_tex->shadow_comparitor = this->shadow_comparitor->clone(mem_ctx, ht); - } - - if (this->offset != NULL) - new_tex->offset = this->offset->clone(mem_ctx, ht); - - switch (this->op) { - case ir_tex: - break; - case ir_txb: - new_tex->lod_info.bias = this->lod_info.bias->clone(mem_ctx, ht); - break; - case ir_txl: - case ir_txf: - case ir_txs: - new_tex->lod_info.lod = this->lod_info.lod->clone(mem_ctx, ht); - break; - case ir_txd: - new_tex->lod_info.grad.dPdx = this->lod_info.grad.dPdx->clone(mem_ctx, ht); - new_tex->lod_info.grad.dPdy = this->lod_info.grad.dPdy->clone(mem_ctx, ht); - break; - } - - return new_tex; -} - -ir_assignment * -ir_assignment::clone(void *mem_ctx, struct hash_table *ht) const -{ - ir_rvalue *new_condition = NULL; - - if (this->condition) - new_condition = this->condition->clone(mem_ctx, ht); - - return new(mem_ctx) ir_assignment(this->lhs->clone(mem_ctx, ht), - this->rhs->clone(mem_ctx, ht), - new_condition, - this->write_mask); -} - -ir_function * -ir_function::clone(void *mem_ctx, struct hash_table *ht) const -{ - ir_function *copy = new(mem_ctx) ir_function(this->name); - - foreach_list_const(node, &this->signatures) { - const ir_function_signature *const sig = - (const ir_function_signature *const) node; - - ir_function_signature *sig_copy = sig->clone(mem_ctx, ht); - copy->add_signature(sig_copy); - - if (ht != NULL) - hash_table_insert(ht, sig_copy, - (void *)const_cast(sig)); - } - - return copy; -} - -ir_function_signature * -ir_function_signature::clone(void *mem_ctx, struct hash_table *ht) const -{ - ir_function_signature *copy = this->clone_prototype(mem_ctx, ht); - - copy->is_defined = this->is_defined; - - /* Clone the instruction list. - */ - foreach_list_const(node, &this->body) { - const ir_instruction *const inst = (const ir_instruction *) node; - - ir_instruction *const inst_copy = inst->clone(mem_ctx, ht); - copy->body.push_tail(inst_copy); - } - - return copy; -} - -ir_function_signature * -ir_function_signature::clone_prototype(void *mem_ctx, struct hash_table *ht) const -{ - ir_function_signature *copy = - new(mem_ctx) ir_function_signature(this->return_type); - - copy->is_defined = false; - copy->is_builtin = this->is_builtin; - - /* Clone the parameter list, but NOT the body. - */ - foreach_list_const(node, &this->parameters) { - const ir_variable *const param = (const ir_variable *) node; - - assert(const_cast(param)->as_variable() != NULL); - - ir_variable *const param_copy = param->clone(mem_ctx, ht); - copy->parameters.push_tail(param_copy); - } - - return copy; -} - -ir_constant * -ir_constant::clone(void *mem_ctx, struct hash_table *ht) const -{ - (void)ht; - - switch (this->type->base_type) { - case GLSL_TYPE_UINT: - case GLSL_TYPE_INT: - case GLSL_TYPE_FLOAT: - case GLSL_TYPE_BOOL: - return new(mem_ctx) ir_constant(this->type, &this->value); - - case GLSL_TYPE_STRUCT: { - ir_constant *c = new(mem_ctx) ir_constant; - - c->type = this->type; - for (exec_node *node = this->components.head - ; !node->is_tail_sentinel() - ; node = node->next) { - ir_constant *const orig = (ir_constant *) node; - - c->components.push_tail(orig->clone(mem_ctx, NULL)); - } - - return c; - } - - case GLSL_TYPE_ARRAY: { - ir_constant *c = new(mem_ctx) ir_constant; - - c->type = this->type; - c->array_elements = ralloc_array(c, ir_constant *, this->type->length); - for (unsigned i = 0; i < this->type->length; i++) { - c->array_elements[i] = this->array_elements[i]->clone(mem_ctx, NULL); - } - return c; - } - - default: - assert(!"Should not get here."); - return NULL; - } -} - - -class fixup_ir_call_visitor : public ir_hierarchical_visitor { -public: - fixup_ir_call_visitor(struct hash_table *ht) - { - this->ht = ht; - } - - virtual ir_visitor_status visit_enter(ir_call *ir) - { - /* Try to find the function signature referenced by the ir_call in the - * table. If it is found, replace it with the value from the table. - */ - ir_function_signature *sig = - (ir_function_signature *) hash_table_find(this->ht, ir->get_callee()); - if (sig != NULL) - ir->set_callee(sig); - - /* Since this may be used before function call parameters are flattened, - * the children also need to be processed. - */ - return visit_continue; - } - -private: - struct hash_table *ht; -}; - - -static void -fixup_function_calls(struct hash_table *ht, exec_list *instructions) -{ - fixup_ir_call_visitor v(ht); - v.run(instructions); -} - - -void -clone_ir_list(void *mem_ctx, exec_list *out, const exec_list *in) -{ - struct hash_table *ht = - hash_table_ctor(0, hash_table_pointer_hash, hash_table_pointer_compare); - - foreach_list_const(node, in) { - const ir_instruction *const original = (ir_instruction *) node; - ir_instruction *copy = original->clone(mem_ctx, ht); - - out->push_tail(copy); - } - - /* Make a pass over the cloned tree to fix up ir_call nodes to point to the - * cloned ir_function_signature nodes. This cannot be done automatically - * during cloning because the ir_call might be a forward reference (i.e., - * the function signature that it references may not have been cloned yet). - */ - fixup_function_calls(ht, out); - - hash_table_dtor(ht); -} diff --git a/dll/opengl/mesa/src/glsl/ir_constant_expression.cpp b/dll/opengl/mesa/src/glsl/ir_constant_expression.cpp deleted file mode 100644 index fa027232b6a..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_constant_expression.cpp +++ /dev/null @@ -1,1422 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file ir_constant_expression.cpp - * Evaluate and process constant valued expressions - * - * In GLSL, constant valued expressions are used in several places. These - * must be processed and evaluated very early in the compilation process. - * - * * Sizes of arrays - * * Initializers for uniforms - * * Initializers for \c const variables - */ - -#include -#include "main/core.h" /* for MAX2, MIN2, CLAMP */ -#include "ir.h" -#include "ir_visitor.h" -#include "glsl_types.h" - -/* Using C99 rounding functions for roundToEven() implementation is - * difficult, because round(), rint, and nearbyint() are affected by - * fesetenv(), which the application may have done for its own - * purposes. Mesa's IROUND macro is close to what we want, but it - * rounds away from 0 on n + 0.5. - */ -static int -round_to_even(float val) -{ - int rounded = IROUND(val); - - if (val - floor(val) == 0.5) { - if (rounded % 2 != 0) - rounded += val > 0 ? -1 : 1; - } - - return rounded; -} - -static float -dot(ir_constant *op0, ir_constant *op1) -{ - assert(op0->type->is_float() && op1->type->is_float()); - - float result = 0; - for (unsigned c = 0; c < op0->type->components(); c++) - result += op0->value.f[c] * op1->value.f[c]; - - return result; -} - -ir_constant * -ir_expression::constant_expression_value() -{ - if (this->type->is_error()) - return NULL; - - ir_constant *op[Elements(this->operands)] = { NULL, }; - ir_constant_data data; - - memset(&data, 0, sizeof(data)); - - for (unsigned operand = 0; operand < this->get_num_operands(); operand++) { - op[operand] = this->operands[operand]->constant_expression_value(); - if (!op[operand]) - return NULL; - } - - if (op[1] != NULL) - assert(op[0]->type->base_type == op[1]->type->base_type || - this->operation == ir_binop_lshift || - this->operation == ir_binop_rshift); - - bool op0_scalar = op[0]->type->is_scalar(); - bool op1_scalar = op[1] != NULL && op[1]->type->is_scalar(); - - /* When iterating over a vector or matrix's components, we want to increase - * the loop counter. However, for scalars, we want to stay at 0. - */ - unsigned c0_inc = op0_scalar ? 0 : 1; - unsigned c1_inc = op1_scalar ? 0 : 1; - unsigned components; - if (op1_scalar || !op[1]) { - components = op[0]->type->components(); - } else { - components = op[1]->type->components(); - } - - void *ctx = ralloc_parent(this); - - /* Handle array operations here, rather than below. */ - if (op[0]->type->is_array()) { - assert(op[1] != NULL && op[1]->type->is_array()); - switch (this->operation) { - case ir_binop_all_equal: - return new(ctx) ir_constant(op[0]->has_value(op[1])); - case ir_binop_any_nequal: - return new(ctx) ir_constant(!op[0]->has_value(op[1])); - default: - break; - } - return NULL; - } - - switch (this->operation) { - case ir_unop_bit_not: - switch (op[0]->type->base_type) { - case GLSL_TYPE_INT: - for (unsigned c = 0; c < components; c++) - data.i[c] = ~ op[0]->value.i[c]; - break; - case GLSL_TYPE_UINT: - for (unsigned c = 0; c < components; c++) - data.u[c] = ~ op[0]->value.u[c]; - break; - default: - assert(0); - } - break; - - case ir_unop_logic_not: - assert(op[0]->type->base_type == GLSL_TYPE_BOOL); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.b[c] = !op[0]->value.b[c]; - break; - - case ir_unop_f2i: - assert(op[0]->type->base_type == GLSL_TYPE_FLOAT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.i[c] = (int) op[0]->value.f[c]; - } - break; - case ir_unop_i2f: - assert(op[0]->type->base_type == GLSL_TYPE_INT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.f[c] = (float) op[0]->value.i[c]; - } - break; - case ir_unop_u2f: - assert(op[0]->type->base_type == GLSL_TYPE_UINT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.f[c] = (float) op[0]->value.u[c]; - } - break; - case ir_unop_b2f: - assert(op[0]->type->base_type == GLSL_TYPE_BOOL); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.f[c] = op[0]->value.b[c] ? 1.0F : 0.0F; - } - break; - case ir_unop_f2b: - assert(op[0]->type->base_type == GLSL_TYPE_FLOAT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.b[c] = op[0]->value.f[c] != 0.0F ? true : false; - } - break; - case ir_unop_b2i: - assert(op[0]->type->base_type == GLSL_TYPE_BOOL); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.u[c] = op[0]->value.b[c] ? 1 : 0; - } - break; - case ir_unop_i2b: - assert(op[0]->type->is_integer()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.b[c] = op[0]->value.u[c] ? true : false; - } - break; - case ir_unop_u2i: - assert(op[0]->type->base_type == GLSL_TYPE_UINT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.i[c] = op[0]->value.u[c]; - } - break; - case ir_unop_i2u: - assert(op[0]->type->base_type == GLSL_TYPE_INT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.u[c] = op[0]->value.i[c]; - } - break; - case ir_unop_any: - assert(op[0]->type->is_boolean()); - data.b[0] = false; - for (unsigned c = 0; c < op[0]->type->components(); c++) { - if (op[0]->value.b[c]) - data.b[0] = true; - } - break; - - case ir_unop_trunc: - assert(op[0]->type->base_type == GLSL_TYPE_FLOAT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.f[c] = truncf(op[0]->value.f[c]); - } - break; - - case ir_unop_round_even: - assert(op[0]->type->base_type == GLSL_TYPE_FLOAT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.f[c] = round_to_even(op[0]->value.f[c]); - } - break; - - case ir_unop_ceil: - assert(op[0]->type->base_type == GLSL_TYPE_FLOAT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.f[c] = ceilf(op[0]->value.f[c]); - } - break; - - case ir_unop_floor: - assert(op[0]->type->base_type == GLSL_TYPE_FLOAT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.f[c] = floorf(op[0]->value.f[c]); - } - break; - - case ir_unop_fract: - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (this->type->base_type) { - case GLSL_TYPE_UINT: - data.u[c] = 0; - break; - case GLSL_TYPE_INT: - data.i[c] = 0; - break; - case GLSL_TYPE_FLOAT: - data.f[c] = op[0]->value.f[c] - floor(op[0]->value.f[c]); - break; - default: - assert(0); - } - } - break; - - case ir_unop_sin: - case ir_unop_sin_reduced: - assert(op[0]->type->base_type == GLSL_TYPE_FLOAT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.f[c] = sinf(op[0]->value.f[c]); - } - break; - - case ir_unop_cos: - case ir_unop_cos_reduced: - assert(op[0]->type->base_type == GLSL_TYPE_FLOAT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.f[c] = cosf(op[0]->value.f[c]); - } - break; - - case ir_unop_neg: - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (this->type->base_type) { - case GLSL_TYPE_UINT: - data.u[c] = -((int) op[0]->value.u[c]); - break; - case GLSL_TYPE_INT: - data.i[c] = -op[0]->value.i[c]; - break; - case GLSL_TYPE_FLOAT: - data.f[c] = -op[0]->value.f[c]; - break; - default: - assert(0); - } - } - break; - - case ir_unop_abs: - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (this->type->base_type) { - case GLSL_TYPE_UINT: - data.u[c] = op[0]->value.u[c]; - break; - case GLSL_TYPE_INT: - data.i[c] = op[0]->value.i[c]; - if (data.i[c] < 0) - data.i[c] = -data.i[c]; - break; - case GLSL_TYPE_FLOAT: - data.f[c] = fabs(op[0]->value.f[c]); - break; - default: - assert(0); - } - } - break; - - case ir_unop_sign: - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (this->type->base_type) { - case GLSL_TYPE_UINT: - data.u[c] = op[0]->value.i[c] > 0; - break; - case GLSL_TYPE_INT: - data.i[c] = (op[0]->value.i[c] > 0) - (op[0]->value.i[c] < 0); - break; - case GLSL_TYPE_FLOAT: - data.f[c] = float((op[0]->value.f[c] > 0)-(op[0]->value.f[c] < 0)); - break; - default: - assert(0); - } - } - break; - - case ir_unop_rcp: - assert(op[0]->type->base_type == GLSL_TYPE_FLOAT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (this->type->base_type) { - case GLSL_TYPE_UINT: - if (op[0]->value.u[c] != 0.0) - data.u[c] = 1 / op[0]->value.u[c]; - break; - case GLSL_TYPE_INT: - if (op[0]->value.i[c] != 0.0) - data.i[c] = 1 / op[0]->value.i[c]; - break; - case GLSL_TYPE_FLOAT: - if (op[0]->value.f[c] != 0.0) - data.f[c] = 1.0F / op[0]->value.f[c]; - break; - default: - assert(0); - } - } - break; - - case ir_unop_rsq: - assert(op[0]->type->base_type == GLSL_TYPE_FLOAT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.f[c] = 1.0F / sqrtf(op[0]->value.f[c]); - } - break; - - case ir_unop_sqrt: - assert(op[0]->type->base_type == GLSL_TYPE_FLOAT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.f[c] = sqrtf(op[0]->value.f[c]); - } - break; - - case ir_unop_exp: - assert(op[0]->type->base_type == GLSL_TYPE_FLOAT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.f[c] = expf(op[0]->value.f[c]); - } - break; - - case ir_unop_exp2: - assert(op[0]->type->base_type == GLSL_TYPE_FLOAT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.f[c] = exp2f(op[0]->value.f[c]); - } - break; - - case ir_unop_log: - assert(op[0]->type->base_type == GLSL_TYPE_FLOAT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.f[c] = logf(op[0]->value.f[c]); - } - break; - - case ir_unop_log2: - assert(op[0]->type->base_type == GLSL_TYPE_FLOAT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.f[c] = log2f(op[0]->value.f[c]); - } - break; - - case ir_unop_dFdx: - case ir_unop_dFdy: - assert(op[0]->type->base_type == GLSL_TYPE_FLOAT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.f[c] = 0.0; - } - break; - - case ir_binop_pow: - assert(op[0]->type->base_type == GLSL_TYPE_FLOAT); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - data.f[c] = powf(op[0]->value.f[c], op[1]->value.f[c]); - } - break; - - case ir_binop_dot: - data.f[0] = dot(op[0], op[1]); - break; - - case ir_binop_min: - assert(op[0]->type == op[1]->type || op0_scalar || op1_scalar); - for (unsigned c = 0, c0 = 0, c1 = 0; - c < components; - c0 += c0_inc, c1 += c1_inc, c++) { - - switch (op[0]->type->base_type) { - case GLSL_TYPE_UINT: - data.u[c] = MIN2(op[0]->value.u[c0], op[1]->value.u[c1]); - break; - case GLSL_TYPE_INT: - data.i[c] = MIN2(op[0]->value.i[c0], op[1]->value.i[c1]); - break; - case GLSL_TYPE_FLOAT: - data.f[c] = MIN2(op[0]->value.f[c0], op[1]->value.f[c1]); - break; - default: - assert(0); - } - } - - break; - case ir_binop_max: - assert(op[0]->type == op[1]->type || op0_scalar || op1_scalar); - for (unsigned c = 0, c0 = 0, c1 = 0; - c < components; - c0 += c0_inc, c1 += c1_inc, c++) { - - switch (op[0]->type->base_type) { - case GLSL_TYPE_UINT: - data.u[c] = MAX2(op[0]->value.u[c0], op[1]->value.u[c1]); - break; - case GLSL_TYPE_INT: - data.i[c] = MAX2(op[0]->value.i[c0], op[1]->value.i[c1]); - break; - case GLSL_TYPE_FLOAT: - data.f[c] = MAX2(op[0]->value.f[c0], op[1]->value.f[c1]); - break; - default: - assert(0); - } - } - break; - - case ir_binop_add: - assert(op[0]->type == op[1]->type || op0_scalar || op1_scalar); - for (unsigned c = 0, c0 = 0, c1 = 0; - c < components; - c0 += c0_inc, c1 += c1_inc, c++) { - - switch (op[0]->type->base_type) { - case GLSL_TYPE_UINT: - data.u[c] = op[0]->value.u[c0] + op[1]->value.u[c1]; - break; - case GLSL_TYPE_INT: - data.i[c] = op[0]->value.i[c0] + op[1]->value.i[c1]; - break; - case GLSL_TYPE_FLOAT: - data.f[c] = op[0]->value.f[c0] + op[1]->value.f[c1]; - break; - default: - assert(0); - } - } - - break; - case ir_binop_sub: - assert(op[0]->type == op[1]->type || op0_scalar || op1_scalar); - for (unsigned c = 0, c0 = 0, c1 = 0; - c < components; - c0 += c0_inc, c1 += c1_inc, c++) { - - switch (op[0]->type->base_type) { - case GLSL_TYPE_UINT: - data.u[c] = op[0]->value.u[c0] - op[1]->value.u[c1]; - break; - case GLSL_TYPE_INT: - data.i[c] = op[0]->value.i[c0] - op[1]->value.i[c1]; - break; - case GLSL_TYPE_FLOAT: - data.f[c] = op[0]->value.f[c0] - op[1]->value.f[c1]; - break; - default: - assert(0); - } - } - - break; - case ir_binop_mul: - /* Check for equal types, or unequal types involving scalars */ - if ((op[0]->type == op[1]->type && !op[0]->type->is_matrix()) - || op0_scalar || op1_scalar) { - for (unsigned c = 0, c0 = 0, c1 = 0; - c < components; - c0 += c0_inc, c1 += c1_inc, c++) { - - switch (op[0]->type->base_type) { - case GLSL_TYPE_UINT: - data.u[c] = op[0]->value.u[c0] * op[1]->value.u[c1]; - break; - case GLSL_TYPE_INT: - data.i[c] = op[0]->value.i[c0] * op[1]->value.i[c1]; - break; - case GLSL_TYPE_FLOAT: - data.f[c] = op[0]->value.f[c0] * op[1]->value.f[c1]; - break; - default: - assert(0); - } - } - } else { - assert(op[0]->type->is_matrix() || op[1]->type->is_matrix()); - - /* Multiply an N-by-M matrix with an M-by-P matrix. Since either - * matrix can be a GLSL vector, either N or P can be 1. - * - * For vec*mat, the vector is treated as a row vector. This - * means the vector is a 1-row x M-column matrix. - * - * For mat*vec, the vector is treated as a column vector. Since - * matrix_columns is 1 for vectors, this just works. - */ - const unsigned n = op[0]->type->is_vector() - ? 1 : op[0]->type->vector_elements; - const unsigned m = op[1]->type->vector_elements; - const unsigned p = op[1]->type->matrix_columns; - for (unsigned j = 0; j < p; j++) { - for (unsigned i = 0; i < n; i++) { - for (unsigned k = 0; k < m; k++) { - data.f[i+n*j] += op[0]->value.f[i+n*k]*op[1]->value.f[k+m*j]; - } - } - } - } - - break; - case ir_binop_div: - /* FINISHME: Emit warning when division-by-zero is detected. */ - assert(op[0]->type == op[1]->type || op0_scalar || op1_scalar); - for (unsigned c = 0, c0 = 0, c1 = 0; - c < components; - c0 += c0_inc, c1 += c1_inc, c++) { - - switch (op[0]->type->base_type) { - case GLSL_TYPE_UINT: - if (op[1]->value.u[c1] == 0) { - data.u[c] = 0; - } else { - data.u[c] = op[0]->value.u[c0] / op[1]->value.u[c1]; - } - break; - case GLSL_TYPE_INT: - if (op[1]->value.i[c1] == 0) { - data.i[c] = 0; - } else { - data.i[c] = op[0]->value.i[c0] / op[1]->value.i[c1]; - } - break; - case GLSL_TYPE_FLOAT: - data.f[c] = op[0]->value.f[c0] / op[1]->value.f[c1]; - break; - default: - assert(0); - } - } - - break; - case ir_binop_mod: - /* FINISHME: Emit warning when division-by-zero is detected. */ - assert(op[0]->type == op[1]->type || op0_scalar || op1_scalar); - for (unsigned c = 0, c0 = 0, c1 = 0; - c < components; - c0 += c0_inc, c1 += c1_inc, c++) { - - switch (op[0]->type->base_type) { - case GLSL_TYPE_UINT: - if (op[1]->value.u[c1] == 0) { - data.u[c] = 0; - } else { - data.u[c] = op[0]->value.u[c0] % op[1]->value.u[c1]; - } - break; - case GLSL_TYPE_INT: - if (op[1]->value.i[c1] == 0) { - data.i[c] = 0; - } else { - data.i[c] = op[0]->value.i[c0] % op[1]->value.i[c1]; - } - break; - case GLSL_TYPE_FLOAT: - /* We don't use fmod because it rounds toward zero; GLSL specifies - * the use of floor. - */ - data.f[c] = op[0]->value.f[c0] - op[1]->value.f[c1] - * floorf(op[0]->value.f[c0] / op[1]->value.f[c1]); - break; - default: - assert(0); - } - } - - break; - - case ir_binop_logic_and: - assert(op[0]->type->base_type == GLSL_TYPE_BOOL); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.b[c] = op[0]->value.b[c] && op[1]->value.b[c]; - break; - case ir_binop_logic_xor: - assert(op[0]->type->base_type == GLSL_TYPE_BOOL); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.b[c] = op[0]->value.b[c] ^ op[1]->value.b[c]; - break; - case ir_binop_logic_or: - assert(op[0]->type->base_type == GLSL_TYPE_BOOL); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.b[c] = op[0]->value.b[c] || op[1]->value.b[c]; - break; - - case ir_binop_less: - assert(op[0]->type == op[1]->type); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { - case GLSL_TYPE_UINT: - data.b[c] = op[0]->value.u[c] < op[1]->value.u[c]; - break; - case GLSL_TYPE_INT: - data.b[c] = op[0]->value.i[c] < op[1]->value.i[c]; - break; - case GLSL_TYPE_FLOAT: - data.b[c] = op[0]->value.f[c] < op[1]->value.f[c]; - break; - default: - assert(0); - } - } - break; - case ir_binop_greater: - assert(op[0]->type == op[1]->type); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { - case GLSL_TYPE_UINT: - data.b[c] = op[0]->value.u[c] > op[1]->value.u[c]; - break; - case GLSL_TYPE_INT: - data.b[c] = op[0]->value.i[c] > op[1]->value.i[c]; - break; - case GLSL_TYPE_FLOAT: - data.b[c] = op[0]->value.f[c] > op[1]->value.f[c]; - break; - default: - assert(0); - } - } - break; - case ir_binop_lequal: - assert(op[0]->type == op[1]->type); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { - case GLSL_TYPE_UINT: - data.b[c] = op[0]->value.u[c] <= op[1]->value.u[c]; - break; - case GLSL_TYPE_INT: - data.b[c] = op[0]->value.i[c] <= op[1]->value.i[c]; - break; - case GLSL_TYPE_FLOAT: - data.b[c] = op[0]->value.f[c] <= op[1]->value.f[c]; - break; - default: - assert(0); - } - } - break; - case ir_binop_gequal: - assert(op[0]->type == op[1]->type); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { - case GLSL_TYPE_UINT: - data.b[c] = op[0]->value.u[c] >= op[1]->value.u[c]; - break; - case GLSL_TYPE_INT: - data.b[c] = op[0]->value.i[c] >= op[1]->value.i[c]; - break; - case GLSL_TYPE_FLOAT: - data.b[c] = op[0]->value.f[c] >= op[1]->value.f[c]; - break; - default: - assert(0); - } - } - break; - case ir_binop_equal: - assert(op[0]->type == op[1]->type); - for (unsigned c = 0; c < components; c++) { - switch (op[0]->type->base_type) { - case GLSL_TYPE_UINT: - data.b[c] = op[0]->value.u[c] == op[1]->value.u[c]; - break; - case GLSL_TYPE_INT: - data.b[c] = op[0]->value.i[c] == op[1]->value.i[c]; - break; - case GLSL_TYPE_FLOAT: - data.b[c] = op[0]->value.f[c] == op[1]->value.f[c]; - break; - case GLSL_TYPE_BOOL: - data.b[c] = op[0]->value.b[c] == op[1]->value.b[c]; - break; - default: - assert(0); - } - } - break; - case ir_binop_nequal: - assert(op[0]->type == op[1]->type); - for (unsigned c = 0; c < components; c++) { - switch (op[0]->type->base_type) { - case GLSL_TYPE_UINT: - data.b[c] = op[0]->value.u[c] != op[1]->value.u[c]; - break; - case GLSL_TYPE_INT: - data.b[c] = op[0]->value.i[c] != op[1]->value.i[c]; - break; - case GLSL_TYPE_FLOAT: - data.b[c] = op[0]->value.f[c] != op[1]->value.f[c]; - break; - case GLSL_TYPE_BOOL: - data.b[c] = op[0]->value.b[c] != op[1]->value.b[c]; - break; - default: - assert(0); - } - } - break; - case ir_binop_all_equal: - data.b[0] = op[0]->has_value(op[1]); - break; - case ir_binop_any_nequal: - data.b[0] = !op[0]->has_value(op[1]); - break; - - case ir_binop_lshift: - for (unsigned c = 0, c0 = 0, c1 = 0; - c < components; - c0 += c0_inc, c1 += c1_inc, c++) { - - if (op[0]->type->base_type == GLSL_TYPE_INT && - op[1]->type->base_type == GLSL_TYPE_INT) { - data.i[c] = op[0]->value.i[c0] << op[1]->value.i[c1]; - - } else if (op[0]->type->base_type == GLSL_TYPE_INT && - op[1]->type->base_type == GLSL_TYPE_UINT) { - data.i[c] = op[0]->value.i[c0] << op[1]->value.u[c1]; - - } else if (op[0]->type->base_type == GLSL_TYPE_UINT && - op[1]->type->base_type == GLSL_TYPE_INT) { - data.u[c] = op[0]->value.u[c0] << op[1]->value.i[c1]; - - } else if (op[0]->type->base_type == GLSL_TYPE_UINT && - op[1]->type->base_type == GLSL_TYPE_UINT) { - data.u[c] = op[0]->value.u[c0] << op[1]->value.u[c1]; - } - } - break; - - case ir_binop_rshift: - for (unsigned c = 0, c0 = 0, c1 = 0; - c < components; - c0 += c0_inc, c1 += c1_inc, c++) { - - if (op[0]->type->base_type == GLSL_TYPE_INT && - op[1]->type->base_type == GLSL_TYPE_INT) { - data.i[c] = op[0]->value.i[c0] >> op[1]->value.i[c1]; - - } else if (op[0]->type->base_type == GLSL_TYPE_INT && - op[1]->type->base_type == GLSL_TYPE_UINT) { - data.i[c] = op[0]->value.i[c0] >> op[1]->value.u[c1]; - - } else if (op[0]->type->base_type == GLSL_TYPE_UINT && - op[1]->type->base_type == GLSL_TYPE_INT) { - data.u[c] = op[0]->value.u[c0] >> op[1]->value.i[c1]; - - } else if (op[0]->type->base_type == GLSL_TYPE_UINT && - op[1]->type->base_type == GLSL_TYPE_UINT) { - data.u[c] = op[0]->value.u[c0] >> op[1]->value.u[c1]; - } - } - break; - - case ir_binop_bit_and: - for (unsigned c = 0, c0 = 0, c1 = 0; - c < components; - c0 += c0_inc, c1 += c1_inc, c++) { - - switch (op[0]->type->base_type) { - case GLSL_TYPE_INT: - data.i[c] = op[0]->value.i[c0] & op[1]->value.i[c1]; - break; - case GLSL_TYPE_UINT: - data.u[c] = op[0]->value.u[c0] & op[1]->value.u[c1]; - break; - default: - assert(0); - } - } - break; - - case ir_binop_bit_or: - for (unsigned c = 0, c0 = 0, c1 = 0; - c < components; - c0 += c0_inc, c1 += c1_inc, c++) { - - switch (op[0]->type->base_type) { - case GLSL_TYPE_INT: - data.i[c] = op[0]->value.i[c0] | op[1]->value.i[c1]; - break; - case GLSL_TYPE_UINT: - data.u[c] = op[0]->value.u[c0] | op[1]->value.u[c1]; - break; - default: - assert(0); - } - } - break; - - case ir_binop_bit_xor: - for (unsigned c = 0, c0 = 0, c1 = 0; - c < components; - c0 += c0_inc, c1 += c1_inc, c++) { - - switch (op[0]->type->base_type) { - case GLSL_TYPE_INT: - data.i[c] = op[0]->value.i[c0] ^ op[1]->value.i[c1]; - break; - case GLSL_TYPE_UINT: - data.u[c] = op[0]->value.u[c0] ^ op[1]->value.u[c1]; - break; - default: - assert(0); - } - } - break; - - case ir_quadop_vector: - for (unsigned c = 0; c < this->type->vector_elements; c++) { - switch (this->type->base_type) { - case GLSL_TYPE_INT: - data.i[c] = op[c]->value.i[0]; - break; - case GLSL_TYPE_UINT: - data.u[c] = op[c]->value.u[0]; - break; - case GLSL_TYPE_FLOAT: - data.f[c] = op[c]->value.f[0]; - break; - default: - assert(0); - } - } - break; - - default: - /* FINISHME: Should handle all expression types. */ - return NULL; - } - - return new(ctx) ir_constant(this->type, &data); -} - - -ir_constant * -ir_texture::constant_expression_value() -{ - /* texture lookups aren't constant expressions */ - return NULL; -} - - -ir_constant * -ir_swizzle::constant_expression_value() -{ - ir_constant *v = this->val->constant_expression_value(); - - if (v != NULL) { - ir_constant_data data = { { 0 } }; - - const unsigned swiz_idx[4] = { - this->mask.x, this->mask.y, this->mask.z, this->mask.w - }; - - for (unsigned i = 0; i < this->mask.num_components; i++) { - switch (v->type->base_type) { - case GLSL_TYPE_UINT: - case GLSL_TYPE_INT: data.u[i] = v->value.u[swiz_idx[i]]; break; - case GLSL_TYPE_FLOAT: data.f[i] = v->value.f[swiz_idx[i]]; break; - case GLSL_TYPE_BOOL: data.b[i] = v->value.b[swiz_idx[i]]; break; - default: assert(!"Should not get here."); break; - } - } - - void *ctx = ralloc_parent(this); - return new(ctx) ir_constant(this->type, &data); - } - return NULL; -} - - -ir_constant * -ir_dereference_variable::constant_expression_value() -{ - /* This may occur during compile and var->type is glsl_type::error_type */ - if (!var) - return NULL; - - /* The constant_value of a uniform variable is its initializer, - * not the lifetime constant value of the uniform. - */ - if (var->mode == ir_var_uniform) - return NULL; - - if (!var->constant_value) - return NULL; - - return var->constant_value->clone(ralloc_parent(var), NULL); -} - - -ir_constant * -ir_dereference_array::constant_expression_value() -{ - ir_constant *array = this->array->constant_expression_value(); - ir_constant *idx = this->array_index->constant_expression_value(); - - if ((array != NULL) && (idx != NULL)) { - void *ctx = ralloc_parent(this); - if (array->type->is_matrix()) { - /* Array access of a matrix results in a vector. - */ - const unsigned column = idx->value.u[0]; - - const glsl_type *const column_type = array->type->column_type(); - - /* Offset in the constant matrix to the first element of the column - * to be extracted. - */ - const unsigned mat_idx = column * column_type->vector_elements; - - ir_constant_data data = { { 0 } }; - - switch (column_type->base_type) { - case GLSL_TYPE_UINT: - case GLSL_TYPE_INT: - for (unsigned i = 0; i < column_type->vector_elements; i++) - data.u[i] = array->value.u[mat_idx + i]; - - break; - - case GLSL_TYPE_FLOAT: - for (unsigned i = 0; i < column_type->vector_elements; i++) - data.f[i] = array->value.f[mat_idx + i]; - - break; - - default: - assert(!"Should not get here."); - break; - } - - return new(ctx) ir_constant(column_type, &data); - } else if (array->type->is_vector()) { - const unsigned component = idx->value.u[0]; - - return new(ctx) ir_constant(array, component); - } else { - const unsigned index = idx->value.u[0]; - return array->get_array_element(index)->clone(ctx, NULL); - } - } - return NULL; -} - - -ir_constant * -ir_dereference_record::constant_expression_value() -{ - ir_constant *v = this->record->constant_expression_value(); - - return (v != NULL) ? v->get_record_field(this->field) : NULL; -} - - -ir_constant * -ir_assignment::constant_expression_value() -{ - /* FINISHME: Handle CEs involving assignment (return RHS) */ - return NULL; -} - - -ir_constant * -ir_constant::constant_expression_value() -{ - return this; -} - - -ir_constant * -ir_call::constant_expression_value() -{ - if (this->type == glsl_type::error_type) - return NULL; - - /* From the GLSL 1.20 spec, page 23: - * "Function calls to user-defined functions (non-built-in functions) - * cannot be used to form constant expressions." - */ - if (!this->callee->is_builtin) - return NULL; - - unsigned num_parameters = 0; - - /* Check if all parameters are constant */ - ir_constant *op[3]; - foreach_list(n, &this->actual_parameters) { - ir_constant *constant = ((ir_rvalue *) n)->constant_expression_value(); - if (constant == NULL) - return NULL; - - op[num_parameters] = constant; - - assert(num_parameters < 3); - num_parameters++; - } - - /* Individual cases below can either: - * - Assign "expr" a new ir_expression to evaluate (for basic opcodes) - * - Fill "data" with appopriate constant data - * - Return an ir_constant directly. - */ - void *mem_ctx = ralloc_parent(this); - ir_expression *expr = NULL; - - ir_constant_data data; - memset(&data, 0, sizeof(data)); - - const char *callee = this->callee_name(); - if (strcmp(callee, "abs") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_abs, type, op[0], NULL); - } else if (strcmp(callee, "all") == 0) { - assert(op[0]->type->is_boolean()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - if (!op[0]->value.b[c]) - return new(mem_ctx) ir_constant(false); - } - return new(mem_ctx) ir_constant(true); - } else if (strcmp(callee, "any") == 0) { - assert(op[0]->type->is_boolean()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - if (op[0]->value.b[c]) - return new(mem_ctx) ir_constant(true); - } - return new(mem_ctx) ir_constant(false); - } else if (strcmp(callee, "acos") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = acosf(op[0]->value.f[c]); - } else if (strcmp(callee, "acosh") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = acoshf(op[0]->value.f[c]); - } else if (strcmp(callee, "asin") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = asinf(op[0]->value.f[c]); - } else if (strcmp(callee, "asinh") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = asinhf(op[0]->value.f[c]); - } else if (strcmp(callee, "atan") == 0) { - assert(op[0]->type->is_float()); - if (num_parameters == 2) { - assert(op[1]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = atan2f(op[0]->value.f[c], op[1]->value.f[c]); - } else { - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = atanf(op[0]->value.f[c]); - } - } else if (strcmp(callee, "atanh") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = atanhf(op[0]->value.f[c]); - } else if (strcmp(callee, "dFdx") == 0 || strcmp(callee, "dFdy") == 0) { - return ir_constant::zero(mem_ctx, this->type); - } else if (strcmp(callee, "ceil") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_ceil, type, op[0], NULL); - } else if (strcmp(callee, "clamp") == 0) { - assert(num_parameters == 3); - unsigned c1_inc = op[1]->type->is_scalar() ? 0 : 1; - unsigned c2_inc = op[2]->type->is_scalar() ? 0 : 1; - for (unsigned c = 0, c1 = 0, c2 = 0; - c < op[0]->type->components(); - c1 += c1_inc, c2 += c2_inc, c++) { - - switch (op[0]->type->base_type) { - case GLSL_TYPE_UINT: - data.u[c] = CLAMP(op[0]->value.u[c], op[1]->value.u[c1], - op[2]->value.u[c2]); - break; - case GLSL_TYPE_INT: - data.i[c] = CLAMP(op[0]->value.i[c], op[1]->value.i[c1], - op[2]->value.i[c2]); - break; - case GLSL_TYPE_FLOAT: - data.f[c] = CLAMP(op[0]->value.f[c], op[1]->value.f[c1], - op[2]->value.f[c2]); - break; - default: - assert(!"Should not get here."); - } - } - } else if (strcmp(callee, "cos") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_cos, type, op[0], NULL); - } else if (strcmp(callee, "cosh") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = coshf(op[0]->value.f[c]); - } else if (strcmp(callee, "cross") == 0) { - assert(op[0]->type == glsl_type::vec3_type); - assert(op[1]->type == glsl_type::vec3_type); - data.f[0] = (op[0]->value.f[1] * op[1]->value.f[2] - - op[1]->value.f[1] * op[0]->value.f[2]); - data.f[1] = (op[0]->value.f[2] * op[1]->value.f[0] - - op[1]->value.f[2] * op[0]->value.f[0]); - data.f[2] = (op[0]->value.f[0] * op[1]->value.f[1] - - op[1]->value.f[0] * op[0]->value.f[1]); - } else if (strcmp(callee, "degrees") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = 180.0F / M_PI * op[0]->value.f[c]; - } else if (strcmp(callee, "distance") == 0) { - assert(op[0]->type->is_float() && op[1]->type->is_float()); - float length_squared = 0.0; - for (unsigned c = 0; c < op[0]->type->components(); c++) { - float t = op[0]->value.f[c] - op[1]->value.f[c]; - length_squared += t * t; - } - return new(mem_ctx) ir_constant(sqrtf(length_squared)); - } else if (strcmp(callee, "dot") == 0) { - return new(mem_ctx) ir_constant(dot(op[0], op[1])); - } else if (strcmp(callee, "equal") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { - case GLSL_TYPE_UINT: - data.b[c] = op[0]->value.u[c] == op[1]->value.u[c]; - break; - case GLSL_TYPE_INT: - data.b[c] = op[0]->value.i[c] == op[1]->value.i[c]; - break; - case GLSL_TYPE_FLOAT: - data.b[c] = op[0]->value.f[c] == op[1]->value.f[c]; - break; - case GLSL_TYPE_BOOL: - data.b[c] = op[0]->value.b[c] == op[1]->value.b[c]; - break; - default: - assert(!"Should not get here."); - } - } - } else if (strcmp(callee, "exp") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_exp, type, op[0], NULL); - } else if (strcmp(callee, "exp2") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_exp2, type, op[0], NULL); - } else if (strcmp(callee, "faceforward") == 0) { - if (dot(op[2], op[1]) < 0) - return op[0]; - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = -op[0]->value.f[c]; - } else if (strcmp(callee, "floor") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_floor, type, op[0], NULL); - } else if (strcmp(callee, "fract") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_fract, type, op[0], NULL); - } else if (strcmp(callee, "fwidth") == 0) { - return ir_constant::zero(mem_ctx, this->type); - } else if (strcmp(callee, "greaterThan") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { - case GLSL_TYPE_UINT: - data.b[c] = op[0]->value.u[c] > op[1]->value.u[c]; - break; - case GLSL_TYPE_INT: - data.b[c] = op[0]->value.i[c] > op[1]->value.i[c]; - break; - case GLSL_TYPE_FLOAT: - data.b[c] = op[0]->value.f[c] > op[1]->value.f[c]; - break; - default: - assert(!"Should not get here."); - } - } - } else if (strcmp(callee, "greaterThanEqual") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { - case GLSL_TYPE_UINT: - data.b[c] = op[0]->value.u[c] >= op[1]->value.u[c]; - break; - case GLSL_TYPE_INT: - data.b[c] = op[0]->value.i[c] >= op[1]->value.i[c]; - break; - case GLSL_TYPE_FLOAT: - data.b[c] = op[0]->value.f[c] >= op[1]->value.f[c]; - break; - default: - assert(!"Should not get here."); - } - } - } else if (strcmp(callee, "inversesqrt") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_rsq, type, op[0], NULL); - } else if (strcmp(callee, "length") == 0) { - return new(mem_ctx) ir_constant(sqrtf(dot(op[0], op[0]))); - } else if (strcmp(callee, "lessThan") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { - case GLSL_TYPE_UINT: - data.b[c] = op[0]->value.u[c] < op[1]->value.u[c]; - break; - case GLSL_TYPE_INT: - data.b[c] = op[0]->value.i[c] < op[1]->value.i[c]; - break; - case GLSL_TYPE_FLOAT: - data.b[c] = op[0]->value.f[c] < op[1]->value.f[c]; - break; - default: - assert(!"Should not get here."); - } - } - } else if (strcmp(callee, "lessThanEqual") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { - case GLSL_TYPE_UINT: - data.b[c] = op[0]->value.u[c] <= op[1]->value.u[c]; - break; - case GLSL_TYPE_INT: - data.b[c] = op[0]->value.i[c] <= op[1]->value.i[c]; - break; - case GLSL_TYPE_FLOAT: - data.b[c] = op[0]->value.f[c] <= op[1]->value.f[c]; - break; - default: - assert(!"Should not get here."); - } - } - } else if (strcmp(callee, "log") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_log, type, op[0], NULL); - } else if (strcmp(callee, "log2") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_log2, type, op[0], NULL); - } else if (strcmp(callee, "matrixCompMult") == 0) { - assert(op[0]->type->is_float() && op[1]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = op[0]->value.f[c] * op[1]->value.f[c]; - } else if (strcmp(callee, "max") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_max, type, op[0], op[1]); - } else if (strcmp(callee, "min") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_min, type, op[0], op[1]); - } else if (strcmp(callee, "mix") == 0) { - assert(op[0]->type->is_float() && op[1]->type->is_float()); - if (op[2]->type->is_float()) { - unsigned c2_inc = op[2]->type->is_scalar() ? 0 : 1; - unsigned components = op[0]->type->components(); - for (unsigned c = 0, c2 = 0; c < components; c2 += c2_inc, c++) { - data.f[c] = op[0]->value.f[c] * (1 - op[2]->value.f[c2]) + - op[1]->value.f[c] * op[2]->value.f[c2]; - } - } else { - assert(op[2]->type->is_boolean()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = op[op[2]->value.b[c] ? 1 : 0]->value.f[c]; - } - } else if (strcmp(callee, "mod") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_mod, type, op[0], op[1]); - } else if (strcmp(callee, "normalize") == 0) { - assert(op[0]->type->is_float()); - float length = sqrtf(dot(op[0], op[0])); - - if (length == 0) - return ir_constant::zero(mem_ctx, this->type); - - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = op[0]->value.f[c] / length; - } else if (strcmp(callee, "not") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_logic_not, type, op[0], NULL); - } else if (strcmp(callee, "notEqual") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { - case GLSL_TYPE_UINT: - data.b[c] = op[0]->value.u[c] != op[1]->value.u[c]; - break; - case GLSL_TYPE_INT: - data.b[c] = op[0]->value.i[c] != op[1]->value.i[c]; - break; - case GLSL_TYPE_FLOAT: - data.b[c] = op[0]->value.f[c] != op[1]->value.f[c]; - break; - case GLSL_TYPE_BOOL: - data.b[c] = op[0]->value.b[c] != op[1]->value.b[c]; - break; - default: - assert(!"Should not get here."); - } - } - } else if (strcmp(callee, "outerProduct") == 0) { - assert(op[0]->type->is_vector() && op[1]->type->is_vector()); - const unsigned m = op[0]->type->vector_elements; - const unsigned n = op[1]->type->vector_elements; - for (unsigned j = 0; j < n; j++) { - for (unsigned i = 0; i < m; i++) { - data.f[i+m*j] = op[0]->value.f[i] * op[1]->value.f[j]; - } - } - } else if (strcmp(callee, "pow") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_pow, type, op[0], op[1]); - } else if (strcmp(callee, "radians") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = M_PI / 180.0F * op[0]->value.f[c]; - } else if (strcmp(callee, "reflect") == 0) { - assert(op[0]->type->is_float()); - float dot_NI = dot(op[1], op[0]); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = op[0]->value.f[c] - 2 * dot_NI * op[1]->value.f[c]; - } else if (strcmp(callee, "refract") == 0) { - const float eta = op[2]->value.f[0]; - const float dot_NI = dot(op[1], op[0]); - const float k = 1.0F - eta * eta * (1.0F - dot_NI * dot_NI); - if (k < 0.0) { - return ir_constant::zero(mem_ctx, this->type); - } else { - for (unsigned c = 0; c < type->components(); c++) { - data.f[c] = eta * op[0]->value.f[c] - (eta * dot_NI + sqrtf(k)) - * op[1]->value.f[c]; - } - } - } else if (strcmp(callee, "round") == 0 || - strcmp(callee, "roundEven") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_round_even, op[0]); - } else if (strcmp(callee, "sign") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_sign, type, op[0], NULL); - } else if (strcmp(callee, "sin") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_sin, type, op[0], NULL); - } else if (strcmp(callee, "sinh") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = sinhf(op[0]->value.f[c]); - } else if (strcmp(callee, "smoothstep") == 0) { - assert(num_parameters == 3); - assert(op[1]->type == op[0]->type); - unsigned edge_inc = op[0]->type->is_scalar() ? 0 : 1; - for (unsigned c = 0, e = 0; c < type->components(); e += edge_inc, c++) { - const float edge0 = op[0]->value.f[e]; - const float edge1 = op[1]->value.f[e]; - if (edge0 == edge1) { - data.f[c] = 0.0; /* Avoid a crash - results are undefined anyway */ - } else { - const float numerator = op[2]->value.f[c] - edge0; - const float denominator = edge1 - edge0; - const float t = CLAMP(numerator/denominator, 0, 1); - data.f[c] = t * t * (3 - 2 * t); - } - } - } else if (strcmp(callee, "sqrt") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_sqrt, type, op[0], NULL); - } else if (strcmp(callee, "step") == 0) { - assert(op[0]->type->is_float() && op[1]->type->is_float()); - /* op[0] (edge) may be either a scalar or a vector */ - const unsigned c0_inc = op[0]->type->is_scalar() ? 0 : 1; - for (unsigned c = 0, c0 = 0; c < type->components(); c0 += c0_inc, c++) - data.f[c] = (op[1]->value.f[c] < op[0]->value.f[c0]) ? 0.0F : 1.0F; - } else if (strcmp(callee, "tan") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = tanf(op[0]->value.f[c]); - } else if (strcmp(callee, "tanh") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = tanhf(op[0]->value.f[c]); - } else if (strcmp(callee, "transpose") == 0) { - assert(op[0]->type->is_matrix()); - const unsigned n = op[0]->type->vector_elements; - const unsigned m = op[0]->type->matrix_columns; - for (unsigned j = 0; j < m; j++) { - for (unsigned i = 0; i < n; i++) { - data.f[m*i+j] += op[0]->value.f[i+n*j]; - } - } - } else if (strcmp(callee, "trunc") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_trunc, op[0]); - } else { - /* Unsupported builtin - some are not allowed in constant expressions. */ - return NULL; - } - - if (expr != NULL) - return expr->constant_expression_value(); - - return new(mem_ctx) ir_constant(this->type, &data); -} diff --git a/dll/opengl/mesa/src/glsl/ir_expression_flattening.cpp b/dll/opengl/mesa/src/glsl/ir_expression_flattening.cpp deleted file mode 100644 index 0b7c537bd8a..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_expression_flattening.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file ir_expression_flattening.cpp - * - * Takes the leaves of expression trees and makes them dereferences of - * assignments of the leaves to temporaries, according to a predicate. - * - * This is used for automatic function inlining, where we want to take - * an expression containing a call and move the call out to its own - * assignment so that we can inline it at the appropriate place in the - * instruction stream. - */ - -#include "ir.h" -#include "ir_visitor.h" -#include "ir_rvalue_visitor.h" -#include "ir_expression_flattening.h" -#include "glsl_types.h" - -class ir_expression_flattening_visitor : public ir_rvalue_visitor { -public: - ir_expression_flattening_visitor(bool (*predicate)(ir_instruction *ir)) - { - this->predicate = predicate; - } - - virtual ~ir_expression_flattening_visitor() - { - /* empty */ - } - - void handle_rvalue(ir_rvalue **rvalue); - bool (*predicate)(ir_instruction *ir); -}; - -void -do_expression_flattening(exec_list *instructions, - bool (*predicate)(ir_instruction *ir)) -{ - ir_expression_flattening_visitor v(predicate); - - foreach_iter(exec_list_iterator, iter, *instructions) { - ir_instruction *ir = (ir_instruction *)iter.get(); - - ir->accept(&v); - } -} - -void -ir_expression_flattening_visitor::handle_rvalue(ir_rvalue **rvalue) -{ - ir_variable *var; - ir_assignment *assign; - ir_rvalue *ir = *rvalue; - - if (!ir || !this->predicate(ir)) - return; - - void *ctx = ralloc_parent(ir); - - var = new(ctx) ir_variable(ir->type, "flattening_tmp", ir_var_temporary); - base_ir->insert_before(var); - - assign = new(ctx) ir_assignment(new(ctx) ir_dereference_variable(var), - ir, - NULL); - base_ir->insert_before(assign); - - *rvalue = new(ctx) ir_dereference_variable(var); -} diff --git a/dll/opengl/mesa/src/glsl/ir_expression_flattening.h b/dll/opengl/mesa/src/glsl/ir_expression_flattening.h deleted file mode 100644 index 2eda1590001..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_expression_flattening.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - - -/** - * \file ir_expression_flattening.h - * - * Takes the leaves of expression trees and makes them dereferences of - * assignments of the leaves to temporaries, according to a predicate. - * - * This is used for automatic function inlining, where we want to take - * an expression containing a call and move the call out to its own - * assignment so that we can inline it at the appropriate place in the - * instruction stream. - */ - -void do_expression_flattening(exec_list *instructions, - bool (*predicate)(ir_instruction *ir)); diff --git a/dll/opengl/mesa/src/glsl/ir_function.cpp b/dll/opengl/mesa/src/glsl/ir_function.cpp deleted file mode 100644 index b34a5008168..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_function.cpp +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "glsl_types.h" -#include "ir.h" - -typedef enum { - PARAMETER_LIST_NO_MATCH, - PARAMETER_LIST_EXACT_MATCH, - PARAMETER_LIST_INEXACT_MATCH /*< Match requires implicit conversion. */ -} parameter_list_match_t; - -/** - * \brief Check if two parameter lists match. - * - * \param list_a Parameters of the function definition. - * \param list_b Actual parameters passed to the function. - * \see matching_signature() - */ -static parameter_list_match_t -parameter_lists_match(const exec_list *list_a, const exec_list *list_b) -{ - const exec_node *node_a = list_a->head; - const exec_node *node_b = list_b->head; - - /* This is set to true if there is an inexact match requiring an implicit - * conversion. */ - bool inexact_match = false; - - for (/* empty */ - ; !node_a->is_tail_sentinel() - ; node_a = node_a->next, node_b = node_b->next) { - /* If all of the parameters from the other parameter list have been - * exhausted, the lists have different length and, by definition, - * do not match. - */ - if (node_b->is_tail_sentinel()) - return PARAMETER_LIST_NO_MATCH; - - - const ir_variable *const param = (ir_variable *) node_a; - const ir_instruction *const actual = (ir_instruction *) node_b; - - if (param->type == actual->type) - continue; - - /* Try to find an implicit conversion from actual to param. */ - inexact_match = true; - switch ((enum ir_variable_mode)(param->mode)) { - case ir_var_auto: - case ir_var_uniform: - case ir_var_temporary: - /* These are all error conditions. It is invalid for a parameter to - * a function to be declared as auto (not in, out, or inout) or - * as uniform. - */ - assert(0); - return PARAMETER_LIST_NO_MATCH; - - case ir_var_const_in: - case ir_var_in: - if (!actual->type->can_implicitly_convert_to(param->type)) - return PARAMETER_LIST_NO_MATCH; - break; - - case ir_var_out: - if (!param->type->can_implicitly_convert_to(actual->type)) - return PARAMETER_LIST_NO_MATCH; - break; - - case ir_var_inout: - /* Since there are no bi-directional automatic conversions (e.g., - * there is int -> float but no float -> int), inout parameters must - * be exact matches. - */ - return PARAMETER_LIST_NO_MATCH; - - default: - assert(false); - return PARAMETER_LIST_NO_MATCH; - } - } - - /* If all of the parameters from the other parameter list have been - * exhausted, the lists have different length and, by definition, do not - * match. - */ - if (!node_b->is_tail_sentinel()) - return PARAMETER_LIST_NO_MATCH; - - if (inexact_match) - return PARAMETER_LIST_INEXACT_MATCH; - else - return PARAMETER_LIST_EXACT_MATCH; -} - - -ir_function_signature * -ir_function::matching_signature(const exec_list *actual_parameters) -{ - bool is_exact; - return matching_signature(actual_parameters, &is_exact); -} - -ir_function_signature * -ir_function::matching_signature(const exec_list *actual_parameters, - bool *is_exact) -{ - ir_function_signature *match = NULL; - bool multiple_inexact_matches = false; - - /* From page 42 (page 49 of the PDF) of the GLSL 1.20 spec: - * - * "If an exact match is found, the other signatures are ignored, and - * the exact match is used. Otherwise, if no exact match is found, then - * the implicit conversions in Section 4.1.10 "Implicit Conversions" will - * be applied to the calling arguments if this can make their types match - * a signature. In this case, it is a semantic error if there are - * multiple ways to apply these conversions to the actual arguments of a - * call such that the call can be made to match multiple signatures." - */ - foreach_iter(exec_list_iterator, iter, signatures) { - ir_function_signature *const sig = - (ir_function_signature *) iter.get(); - - switch (parameter_lists_match(& sig->parameters, actual_parameters)) { - case PARAMETER_LIST_EXACT_MATCH: - *is_exact = true; - return sig; - case PARAMETER_LIST_INEXACT_MATCH: - if (match == NULL) - match = sig; - else - multiple_inexact_matches = true; - continue; - case PARAMETER_LIST_NO_MATCH: - continue; - default: - assert(false); - return NULL; - } - } - - /* There is no exact match (we would have returned it by now). If there - * are multiple inexact matches, the call is ambiguous, which is an error. - * - * FINISHME: Report a decent error. Returning NULL will likely result in - * FINISHME: a "no matching signature" error; it should report that the - * FINISHME: call is ambiguous. But reporting errors from here is hard. - */ - *is_exact = false; - - if (multiple_inexact_matches) - return NULL; - - return match; -} - - -static bool -parameter_lists_match_exact(const exec_list *list_a, const exec_list *list_b) -{ - const exec_node *node_a = list_a->head; - const exec_node *node_b = list_b->head; - - for (/* empty */ - ; !node_a->is_tail_sentinel() && !node_b->is_tail_sentinel() - ; node_a = node_a->next, node_b = node_b->next) { - ir_variable *a = (ir_variable *) node_a; - ir_variable *b = (ir_variable *) node_b; - - /* If the types of the parameters do not match, the parameters lists - * are different. - */ - if (a->type != b->type) - return false; - } - - /* Unless both lists are exhausted, they differ in length and, by - * definition, do not match. - */ - return (node_a->is_tail_sentinel() == node_b->is_tail_sentinel()); -} - -ir_function_signature * -ir_function::exact_matching_signature(const exec_list *actual_parameters) -{ - foreach_iter(exec_list_iterator, iter, signatures) { - ir_function_signature *const sig = - (ir_function_signature *) iter.get(); - - if (parameter_lists_match_exact(&sig->parameters, actual_parameters)) - return sig; - } - return NULL; -} diff --git a/dll/opengl/mesa/src/glsl/ir_function_can_inline.cpp b/dll/opengl/mesa/src/glsl/ir_function_can_inline.cpp deleted file mode 100644 index c367c30e44f..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_function_can_inline.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file ir_function_can_inline.cpp - * - * Determines if we can inline a function call using ir_function_inlining.cpp. - * - * The primary restriction is that we can't return from the function - * other than as the last instruction. We could potentially work - * around this for some constructs by flattening control flow and - * moving the return to the end, or by using breaks from a do {} while - * (0) loop surrounding the function body. - */ - -#include "ir.h" - -class ir_function_can_inline_visitor : public ir_hierarchical_visitor { -public: - ir_function_can_inline_visitor() - { - this->num_returns = 0; - } - - virtual ir_visitor_status visit_enter(ir_return *); - - int num_returns; -}; - -ir_visitor_status -ir_function_can_inline_visitor::visit_enter(ir_return *ir) -{ - (void) ir; - this->num_returns++; - return visit_continue; -} - -bool -can_inline(ir_call *call) -{ - ir_function_can_inline_visitor v; - const ir_function_signature *callee = call->get_callee(); - if (!callee->is_defined) - return false; - - v.run((exec_list *) &callee->body); - - /* If the function is empty (no last instruction) or does not end with a - * return statement, we need to count the implicit return. - */ - ir_instruction *last = (ir_instruction *)callee->body.get_tail(); - if (last == NULL || !last->as_return()) - v.num_returns++; - - return v.num_returns == 1; -} diff --git a/dll/opengl/mesa/src/glsl/ir_function_detect_recursion.cpp b/dll/opengl/mesa/src/glsl/ir_function_detect_recursion.cpp deleted file mode 100644 index 890bc455f44..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_function_detect_recursion.cpp +++ /dev/null @@ -1,374 +0,0 @@ -/* - * Copyright © 2011 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file ir_function_detect_recursion.cpp - * Determine whether a shader contains static recursion. - * - * Consider the (possibly disjoint) graph of function calls in a shader. If a - * program contains recursion, this graph will contain a cycle. If a function - * is part of a cycle, it will have a caller and it will have a callee (it - * calls another function). - * - * To detect recursion, the function call graph is constructed. The graph is - * repeatedly reduced by removing any function that either has no callees - * (leaf functions) or has no caller. Eventually the only functions that - * remain will be the functions in the cycles. - * - * The GLSL spec is a bit wishy-washy about recursion. - * - * From page 39 (page 45 of the PDF) of the GLSL 1.10 spec: - * - * "Behavior is undefined if recursion is used. Recursion means having any - * function appearing more than once at any one time in the run-time stack - * of function calls. That is, a function may not call itself either - * directly or indirectly. Compilers may give diagnostic messages when - * this is detectable at compile time, but not all such cases can be - * detected at compile time." - * - * From page 79 (page 85 of the PDF): - * - * "22) Should recursion be supported? - * - * DISCUSSION: Probably not necessary, but another example of limiting - * the language based on how it would directly map to hardware. One - * thought is that recursion would benefit ray tracing shaders. On the - * other hand, many recursion operations can also be implemented with the - * user managing the recursion through arrays. RenderMan doesn't support - * recursion. This could be added at a later date, if it proved to be - * necessary. - * - * RESOLVED on September 10, 2002: Implementations are not required to - * support recursion. - * - * CLOSED on September 10, 2002." - * - * From page 79 (page 85 of the PDF): - * - * "56) Is it an error for an implementation to support recursion if the - * specification says recursion is not supported? - * - * ADDED on September 10, 2002. - * - * DISCUSSION: This issues is related to Issue (22). If we say that - * recursion (or some other piece of functionality) is not supported, is - * it an error for an implementation to support it? Perhaps the - * specification should remain silent on these kind of things so that they - * could be gracefully added later as an extension or as part of the - * standard. - * - * RESOLUTION: Languages, in general, have programs that are not - * well-formed in ways a compiler cannot detect. Portability is only - * ensured for well-formed programs. Detecting recursion is an example of - * this. The language will say a well-formed program may not recurse, but - * compilers are not forced to detect that recursion may happen. - * - * CLOSED: November 29, 2002." - * - * In GLSL 1.10 the behavior of recursion is undefined. Compilers don't have - * to reject shaders (at compile-time or link-time) that contain recursion. - * Instead they could work, or crash, or kill a kitten. - * - * From page 44 (page 50 of the PDF) of the GLSL 1.20 spec: - * - * "Recursion is not allowed, not even statically. Static recursion is - * present if the static function call graph of the program contains - * cycles." - * - * This langauge clears things up a bit, but it still leaves a lot of - * questions unanswered. - * - * - Is the error generated at compile-time or link-time? - * - * - Is it an error to have a recursive function that is never statically - * called by main or any function called directly or indirectly by main? - * Technically speaking, such a function is not in the "static function - * call graph of the program" at all. - * - * \bug - * If a shader has multiple cycles, this algorithm may erroneously complain - * about functions that aren't in any cycle, but are in the part of the call - * tree that connects them. For example, if the call graph consists of a - * cycle between A and B, and a cycle between D and E, and B also calls C - * which calls D, then this algorithm will report C as a function which "has - * static recursion" even though it is not part of any cycle. - * - * A better algorithm for cycle detection that doesn't have this drawback can - * be found here: - * - * http://en.wikipedia.org/wiki/Tarjan%E2%80%99s_strongly_connected_components_algorithm - * - * \author Ian Romanick - */ -#include "main/core.h" -#include "ir.h" -#include "glsl_parser_extras.h" -#include "linker.h" -#include "program/hash_table.h" -#include "program.h" - -struct call_node : public exec_node { - class function *func; -}; - -class function { -public: - function(ir_function_signature *sig) - : sig(sig) - { - /* empty */ - } - - - /* Callers of this ralloc-based new need not call delete. It's - * easier to just ralloc_free 'ctx' (or any of its ancestors). */ - static void* operator new(size_t size, void *ctx) - { - void *node; - - node = ralloc_size(ctx, size); - assert(node != NULL); - - return node; - } - - /* If the user *does* call delete, that's OK, we will just - * ralloc_free in that case. */ - static void operator delete(void *node) - { - ralloc_free(node); - } - - ir_function_signature *sig; - - /** List of functions called by this function. */ - exec_list callees; - - /** List of functions that call this function. */ - exec_list callers; -}; - -class has_recursion_visitor : public ir_hierarchical_visitor { -public: - has_recursion_visitor() - : current(NULL) - { - this->mem_ctx = ralloc_context(NULL); - this->function_hash = hash_table_ctor(0, hash_table_pointer_hash, - hash_table_pointer_compare); - } - - ~has_recursion_visitor() - { - hash_table_dtor(this->function_hash); - ralloc_free(this->mem_ctx); - } - - function *get_function(ir_function_signature *sig) - { - function *f = (function *) hash_table_find(this->function_hash, sig); - if (f == NULL) { - f = new(mem_ctx) function(sig); - hash_table_insert(this->function_hash, f, sig); - } - - return f; - } - - virtual ir_visitor_status visit_enter(ir_function_signature *sig) - { - this->current = this->get_function(sig); - return visit_continue; - } - - virtual ir_visitor_status visit_leave(ir_function_signature *sig) - { - (void) sig; - this->current = NULL; - return visit_continue; - } - - virtual ir_visitor_status visit_enter(ir_call *call) - { - /* At global scope this->current will be NULL. Since there is no way to - * call global scope, it can never be part of a cycle. Don't bother - * adding calls from global scope to the graph. - */ - if (this->current == NULL) - return visit_continue; - - function *const target = this->get_function(call->get_callee()); - - /* Create a link from the caller to the callee. - */ - call_node *node = new(mem_ctx) call_node; - node->func = target; - this->current->callees.push_tail(node); - - /* Create a link from the callee to the caller. - */ - node = new(mem_ctx) call_node; - node->func = this->current; - target->callers.push_tail(node); - return visit_continue; - } - - function *current; - struct hash_table *function_hash; - void *mem_ctx; - bool progress; -}; - -static void -destroy_links(exec_list *list, function *f) -{ - foreach_list_safe(node, list) { - struct call_node *n = (struct call_node *) node; - - /* If this is the right function, remove it. Note that the loop cannot - * terminate now. There can be multiple links to a function if it is - * either called multiple times or calls multiple times. - */ - if (n->func == f) - n->remove(); - } -} - - -/** - * Remove a function if it has either no in or no out links - */ -static void -remove_unlinked_functions(const void *key, void *data, void *closure) -{ - has_recursion_visitor *visitor = (has_recursion_visitor *) closure; - function *f = (function *) data; - - if (f->callers.is_empty() || f->callees.is_empty()) { - while (!f->callers.is_empty()) { - struct call_node *n = (struct call_node *) f->callers.pop_head(); - destroy_links(& n->func->callees, f); - } - - while (!f->callees.is_empty()) { - struct call_node *n = (struct call_node *) f->callees.pop_head(); - destroy_links(& n->func->callers, f); - } - - hash_table_remove(visitor->function_hash, key); - visitor->progress = true; - } -} - - -static void -emit_errors_unlinked(const void *key, void *data, void *closure) -{ - struct _mesa_glsl_parse_state *state = - (struct _mesa_glsl_parse_state *) closure; - function *f = (function *) data; - YYLTYPE loc; - - (void) key; - - char *proto = prototype_string(f->sig->return_type, - f->sig->function_name(), - &f->sig->parameters); - - memset(&loc, 0, sizeof(loc)); - _mesa_glsl_error(&loc, state, - "function `%s' has static recursion.", - proto); - ralloc_free(proto); -} - - -static void -emit_errors_linked(const void *key, void *data, void *closure) -{ - struct gl_shader_program *prog = - (struct gl_shader_program *) closure; - function *f = (function *) data; - - (void) key; - - char *proto = prototype_string(f->sig->return_type, - f->sig->function_name(), - &f->sig->parameters); - - linker_error(prog, "function `%s' has static recursion.\n", proto); - ralloc_free(proto); - prog->LinkStatus = false; -} - - -void -detect_recursion_unlinked(struct _mesa_glsl_parse_state *state, - exec_list *instructions) -{ - has_recursion_visitor v; - - /* Collect all of the information about which functions call which other - * functions. - */ - v.run(instructions); - - /* Remove from the set all of the functions that either have no caller or - * call no other functions. Repeat until no functions are removed. - */ - do { - v.progress = false; - hash_table_call_foreach(v.function_hash, remove_unlinked_functions, & v); - } while (v.progress); - - - /* At this point any functions still in the hash must be part of a cycle. - */ - hash_table_call_foreach(v.function_hash, emit_errors_unlinked, state); -} - - -void -detect_recursion_linked(struct gl_shader_program *prog, - exec_list *instructions) -{ - has_recursion_visitor v; - - /* Collect all of the information about which functions call which other - * functions. - */ - v.run(instructions); - - /* Remove from the set all of the functions that either have no caller or - * call no other functions. Repeat until no functions are removed. - */ - do { - v.progress = false; - hash_table_call_foreach(v.function_hash, remove_unlinked_functions, & v); - } while (v.progress); - - - /* At this point any functions still in the hash must be part of a cycle. - */ - hash_table_call_foreach(v.function_hash, emit_errors_linked, prog); -} diff --git a/dll/opengl/mesa/src/glsl/ir_function_inlining.h b/dll/opengl/mesa/src/glsl/ir_function_inlining.h deleted file mode 100644 index 6db011bbcae..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_function_inlining.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file ir_function_inlining.h - * - * Replaces calls to functions with the body of the function. - */ - -bool can_inline(ir_call *call); diff --git a/dll/opengl/mesa/src/glsl/ir_hierarchical_visitor.cpp b/dll/opengl/mesa/src/glsl/ir_hierarchical_visitor.cpp deleted file mode 100644 index b5eacd6d2d4..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_hierarchical_visitor.cpp +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "ir.h" -#include "ir_hierarchical_visitor.h" - -ir_hierarchical_visitor::ir_hierarchical_visitor() -{ - this->base_ir = NULL; - this->callback = NULL; - this->data = NULL; - this->in_assignee = false; -} - -ir_visitor_status -ir_hierarchical_visitor::visit(ir_variable *ir) -{ - if (this->callback != NULL) - this->callback(ir, this->data); - - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit(ir_constant *ir) -{ - if (this->callback != NULL) - this->callback(ir, this->data); - - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit(ir_loop_jump *ir) -{ - if (this->callback != NULL) - this->callback(ir, this->data); - - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit(ir_dereference_variable *ir) -{ - if (this->callback != NULL) - this->callback(ir, this->data); - - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_enter(ir_loop *ir) -{ - if (this->callback != NULL) - this->callback(ir, this->data); - - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_leave(ir_loop *ir) -{ - (void) ir; - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_enter(ir_function_signature *ir) -{ - if (this->callback != NULL) - this->callback(ir, this->data); - - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_leave(ir_function_signature *ir) -{ - (void) ir; - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_enter(ir_function *ir) -{ - if (this->callback != NULL) - this->callback(ir, this->data); - - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_leave(ir_function *ir) -{ - (void) ir; - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_enter(ir_expression *ir) -{ - if (this->callback != NULL) - this->callback(ir, this->data); - - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_leave(ir_expression *ir) -{ - (void) ir; - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_enter(ir_texture *ir) -{ - if (this->callback != NULL) - this->callback(ir, this->data); - - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_leave(ir_texture *ir) -{ - (void) ir; - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_enter(ir_swizzle *ir) -{ - if (this->callback != NULL) - this->callback(ir, this->data); - - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_leave(ir_swizzle *ir) -{ - (void) ir; - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_enter(ir_dereference_array *ir) -{ - if (this->callback != NULL) - this->callback(ir, this->data); - - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_leave(ir_dereference_array *ir) -{ - (void) ir; - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_enter(ir_dereference_record *ir) -{ - if (this->callback != NULL) - this->callback(ir, this->data); - - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_leave(ir_dereference_record *ir) -{ - (void) ir; - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_enter(ir_assignment *ir) -{ - if (this->callback != NULL) - this->callback(ir, this->data); - - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_leave(ir_assignment *ir) -{ - (void) ir; - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_enter(ir_call *ir) -{ - if (this->callback != NULL) - this->callback(ir, this->data); - - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_leave(ir_call *ir) -{ - (void) ir; - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_enter(ir_return *ir) -{ - if (this->callback != NULL) - this->callback(ir, this->data); - - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_leave(ir_return *ir) -{ - (void) ir; - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_enter(ir_discard *ir) -{ - if (this->callback != NULL) - this->callback(ir, this->data); - - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_leave(ir_discard *ir) -{ - (void) ir; - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_enter(ir_if *ir) -{ - if (this->callback != NULL) - this->callback(ir, this->data); - - return visit_continue; -} - -ir_visitor_status -ir_hierarchical_visitor::visit_leave(ir_if *ir) -{ - (void) ir; - return visit_continue; -} - -void -ir_hierarchical_visitor::run(exec_list *instructions) -{ - visit_list_elements(this, instructions); -} - - -void -visit_tree(ir_instruction *ir, - void (*callback)(class ir_instruction *ir, void *data), - void *data) -{ - ir_hierarchical_visitor v; - - v.callback = callback; - v.data = data; - - ir->accept(&v); -} diff --git a/dll/opengl/mesa/src/glsl/ir_hierarchical_visitor.h b/dll/opengl/mesa/src/glsl/ir_hierarchical_visitor.h deleted file mode 100644 index bba046db424..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_hierarchical_visitor.h +++ /dev/null @@ -1,184 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#pragma once -#ifndef IR_HIERARCHICAL_VISITOR_H -#define IR_HIERARCHICAL_VISITOR_H - -/** - * Enumeration values returned by visit methods to guide processing - */ -enum ir_visitor_status { - visit_continue, /**< Continue visiting as normal. */ - visit_continue_with_parent, /**< Don't visit siblings, continue w/parent. */ - visit_stop /**< Stop visiting immediately. */ -}; - - -/** - * Base class of hierarchical visitors of IR instruction trees - * - * Hierarchical visitors differ from traditional visitors in a couple of - * important ways. Rather than having a single \c visit method for each - * subclass in the composite, there are three kinds of visit methods. - * Leaf-node classes have a traditional \c visit method. Internal-node - * classes have a \c visit_enter method, which is invoked just before - * processing child nodes, and a \c visit_leave method which is invoked just - * after processing child nodes. - * - * In addition, each visit method and the \c accept methods in the composite - * have a return value which guides the navigation. Any of the visit methods - * can choose to continue visiting the tree as normal (by returning \c - * visit_continue), terminate visiting any further nodes immediately (by - * returning \c visit_stop), or stop visiting sibling nodes (by returning \c - * visit_continue_with_parent). - * - * These two changes combine to allow nagivation of children to be implemented - * in the composite's \c accept method. The \c accept method for a leaf-node - * class will simply call the \c visit method, as usual, and pass its return - * value on. The \c accept method for internal-node classes will call the \c - * visit_enter method, call the \c accpet method of each child node, and, - * finally, call the \c visit_leave method. If any of these return a value - * other that \c visit_continue, the correct action must be taken. - * - * The final benefit is that the hierarchical visitor base class need not be - * abstract. Default implementations of every \c visit, \c visit_enter, and - * \c visit_leave method can be provided. By default each of these methods - * simply returns \c visit_continue. This allows a significant reduction in - * derived class code. - * - * For more information about hierarchical visitors, see: - * - * http://c2.com/cgi/wiki?HierarchicalVisitorPattern - * http://c2.com/cgi/wiki?HierarchicalVisitorDiscussion - */ - -class ir_hierarchical_visitor { -public: - ir_hierarchical_visitor(); - - /** - * \name Visit methods for leaf-node classes - */ - /*@{*/ - virtual ir_visitor_status visit(class ir_variable *); - virtual ir_visitor_status visit(class ir_constant *); - virtual ir_visitor_status visit(class ir_loop_jump *); - - /** - * ir_dereference_variable isn't technically a leaf, but it is treated as a - * leaf here for a couple reasons. By not automatically visiting the one - * child ir_variable node from the ir_dereference_variable, ir_variable - * nodes can always be handled as variable declarations. Code that used - * non-hierarchical visitors had to set an "in a dereference" flag to - * determine how to handle an ir_variable. By forcing the visitor to - * handle the ir_variable within the ir_dereference_variable visitor, this - * kludge can be avoided. - * - * In addition, I can envision no use for having separate enter and leave - * methods. Anything that could be done in the enter and leave methods - * that couldn't just be done in the visit method. - */ - virtual ir_visitor_status visit(class ir_dereference_variable *); - /*@}*/ - - /** - * \name Visit methods for internal-node classes - */ - /*@{*/ - virtual ir_visitor_status visit_enter(class ir_loop *); - virtual ir_visitor_status visit_leave(class ir_loop *); - virtual ir_visitor_status visit_enter(class ir_function_signature *); - virtual ir_visitor_status visit_leave(class ir_function_signature *); - virtual ir_visitor_status visit_enter(class ir_function *); - virtual ir_visitor_status visit_leave(class ir_function *); - virtual ir_visitor_status visit_enter(class ir_expression *); - virtual ir_visitor_status visit_leave(class ir_expression *); - virtual ir_visitor_status visit_enter(class ir_texture *); - virtual ir_visitor_status visit_leave(class ir_texture *); - virtual ir_visitor_status visit_enter(class ir_swizzle *); - virtual ir_visitor_status visit_leave(class ir_swizzle *); - virtual ir_visitor_status visit_enter(class ir_dereference_array *); - virtual ir_visitor_status visit_leave(class ir_dereference_array *); - virtual ir_visitor_status visit_enter(class ir_dereference_record *); - virtual ir_visitor_status visit_leave(class ir_dereference_record *); - virtual ir_visitor_status visit_enter(class ir_assignment *); - virtual ir_visitor_status visit_leave(class ir_assignment *); - virtual ir_visitor_status visit_enter(class ir_call *); - virtual ir_visitor_status visit_leave(class ir_call *); - virtual ir_visitor_status visit_enter(class ir_return *); - virtual ir_visitor_status visit_leave(class ir_return *); - virtual ir_visitor_status visit_enter(class ir_discard *); - virtual ir_visitor_status visit_leave(class ir_discard *); - virtual ir_visitor_status visit_enter(class ir_if *); - virtual ir_visitor_status visit_leave(class ir_if *); - /*@}*/ - - - /** - * Utility function to process a linked list of instructions with a visitor - */ - void run(struct exec_list *instructions); - - /* Some visitors may need to insert new variable declarations and - * assignments for portions of a subtree, which means they need a - * pointer to the current instruction in the stream, not just their - * node in the tree rooted at that instruction. - * - * This is implemented by visit_list_elements -- if the visitor is - * not called by it, nothing good will happen. - */ - class ir_instruction *base_ir; - - /** - * Callback function that is invoked on entry to each node visited. - * - * \warning - * Visitor classes derived from \c ir_hierarchical_visitor \b may \b not - * invoke this function. This can be used, for example, to cause the - * callback to be invoked on every node type execpt one. - */ - void (*callback)(class ir_instruction *ir, void *data); - - /** - * Extra data parameter passed to the per-node callback function - */ - void *data; - - /** - * Currently in the LHS of an assignment? - * - * This is set and cleared by the \c ir_assignment::accept method. - */ - bool in_assignee; -}; - -void visit_tree(ir_instruction *ir, - void (*callback)(class ir_instruction *ir, void *data), - void *data); - -ir_visitor_status visit_list_elements(ir_hierarchical_visitor *v, exec_list *l, - bool statement_list = true); - -#endif /* IR_HIERARCHICAL_VISITOR_H */ diff --git a/dll/opengl/mesa/src/glsl/ir_hv_accept.cpp b/dll/opengl/mesa/src/glsl/ir_hv_accept.cpp deleted file mode 100644 index 0e78fda81fd..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_hv_accept.cpp +++ /dev/null @@ -1,396 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "ir.h" - -/** - * \file ir_hv_accept.cpp - * Implementations of all hierarchical visitor accept methods for IR - * instructions. - */ - -/** - * Process a list of nodes using a hierarchical vistor. - * - * If statement_list is true (the default), this is a list of statements, so - * v->base_ir will be set to point to each statement just before iterating - * over it, and restored after iteration is complete. If statement_list is - * false, this is a list that appears inside a statement (e.g. a parameter - * list), so v->base_ir will be left alone. - * - * \warning - * This function will operate correctly if a node being processed is removed - * from the list. However, if nodes are added to the list after the node being - * processed, some of the added nodes may not be processed. - */ -ir_visitor_status -visit_list_elements(ir_hierarchical_visitor *v, exec_list *l, - bool statement_list) -{ - ir_instruction *prev_base_ir = v->base_ir; - - foreach_list_safe(n, l) { - ir_instruction *const ir = (ir_instruction *) n; - if (statement_list) - v->base_ir = ir; - ir_visitor_status s = ir->accept(v); - - if (s != visit_continue) - return s; - } - if (statement_list) - v->base_ir = prev_base_ir; - - return visit_continue; -} - - -ir_visitor_status -ir_variable::accept(ir_hierarchical_visitor *v) -{ - return v->visit(this); -} - - -ir_visitor_status -ir_loop::accept(ir_hierarchical_visitor *v) -{ - ir_visitor_status s = v->visit_enter(this); - - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - - s = visit_list_elements(v, &this->body_instructions); - if (s == visit_stop) - return s; - - if (s != visit_continue_with_parent) { - if (this->from) { - s = this->from->accept(v); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - } - - if (this->to) { - s = this->to->accept(v); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - } - - if (this->increment) { - s = this->increment->accept(v); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - } - } - - return v->visit_leave(this); -} - - -ir_visitor_status -ir_loop_jump::accept(ir_hierarchical_visitor *v) -{ - return v->visit(this); -} - - -ir_visitor_status -ir_function_signature::accept(ir_hierarchical_visitor *v) -{ - ir_visitor_status s = v->visit_enter(this); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - - s = visit_list_elements(v, &this->parameters); - if (s == visit_stop) - return s; - - s = visit_list_elements(v, &this->body); - return (s == visit_stop) ? s : v->visit_leave(this); -} - - -ir_visitor_status -ir_function::accept(ir_hierarchical_visitor *v) -{ - ir_visitor_status s = v->visit_enter(this); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - - s = visit_list_elements(v, &this->signatures, false); - return (s == visit_stop) ? s : v->visit_leave(this); -} - - -ir_visitor_status -ir_expression::accept(ir_hierarchical_visitor *v) -{ - ir_visitor_status s = v->visit_enter(this); - - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - - for (unsigned i = 0; i < this->get_num_operands(); i++) { - switch (this->operands[i]->accept(v)) { - case visit_continue: - break; - - case visit_continue_with_parent: - // I wish for Java's labeled break-statement here. - goto done; - - case visit_stop: - return s; - } - } - -done: - return v->visit_leave(this); -} - -ir_visitor_status -ir_texture::accept(ir_hierarchical_visitor *v) -{ - ir_visitor_status s = v->visit_enter(this); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - - s = this->sampler->accept(v); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - - if (this->coordinate) { - s = this->coordinate->accept(v); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - } - - if (this->projector) { - s = this->projector->accept(v); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - } - - if (this->shadow_comparitor) { - s = this->shadow_comparitor->accept(v); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - } - - if (this->offset) { - s = this->offset->accept(v); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - } - - switch (this->op) { - case ir_tex: - break; - case ir_txb: - s = this->lod_info.bias->accept(v); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - break; - case ir_txl: - case ir_txf: - case ir_txs: - s = this->lod_info.lod->accept(v); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - break; - case ir_txd: - s = this->lod_info.grad.dPdx->accept(v); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - - s = this->lod_info.grad.dPdy->accept(v); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - break; - } - - return (s == visit_stop) ? s : v->visit_leave(this); -} - - -ir_visitor_status -ir_swizzle::accept(ir_hierarchical_visitor *v) -{ - ir_visitor_status s = v->visit_enter(this); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - - s = this->val->accept(v); - return (s == visit_stop) ? s : v->visit_leave(this); -} - - -ir_visitor_status -ir_dereference_variable::accept(ir_hierarchical_visitor *v) -{ - return v->visit(this); -} - - -ir_visitor_status -ir_dereference_array::accept(ir_hierarchical_visitor *v) -{ - ir_visitor_status s = v->visit_enter(this); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - - /* The array index is not the target of the assignment, so clear the - * 'in_assignee' flag. Restore it after returning from the array index. - */ - const bool was_in_assignee = v->in_assignee; - v->in_assignee = false; - s = this->array_index->accept(v); - v->in_assignee = was_in_assignee; - - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - - s = this->array->accept(v); - return (s == visit_stop) ? s : v->visit_leave(this); -} - - -ir_visitor_status -ir_dereference_record::accept(ir_hierarchical_visitor *v) -{ - ir_visitor_status s = v->visit_enter(this); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - - s = this->record->accept(v); - return (s == visit_stop) ? s : v->visit_leave(this); -} - - -ir_visitor_status -ir_assignment::accept(ir_hierarchical_visitor *v) -{ - ir_visitor_status s = v->visit_enter(this); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - - v->in_assignee = true; - s = this->lhs->accept(v); - v->in_assignee = false; - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - - s = this->rhs->accept(v); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - - if (this->condition) - s = this->condition->accept(v); - - return (s == visit_stop) ? s : v->visit_leave(this); -} - - -ir_visitor_status -ir_constant::accept(ir_hierarchical_visitor *v) -{ - return v->visit(this); -} - - -ir_visitor_status -ir_call::accept(ir_hierarchical_visitor *v) -{ - ir_visitor_status s = v->visit_enter(this); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - - s = visit_list_elements(v, &this->actual_parameters, false); - if (s == visit_stop) - return s; - - return v->visit_leave(this); -} - - -ir_visitor_status -ir_return::accept(ir_hierarchical_visitor *v) -{ - ir_visitor_status s = v->visit_enter(this); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - - ir_rvalue *val = this->get_value(); - if (val) { - s = val->accept(v); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - } - - return v->visit_leave(this); -} - - -ir_visitor_status -ir_discard::accept(ir_hierarchical_visitor *v) -{ - ir_visitor_status s = v->visit_enter(this); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - - if (this->condition != NULL) { - s = this->condition->accept(v); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - } - - return v->visit_leave(this); -} - - -ir_visitor_status -ir_if::accept(ir_hierarchical_visitor *v) -{ - ir_visitor_status s = v->visit_enter(this); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - - s = this->condition->accept(v); - if (s != visit_continue) - return (s == visit_continue_with_parent) ? visit_continue : s; - - if (s != visit_continue_with_parent) { - s = visit_list_elements(v, &this->then_instructions); - if (s == visit_stop) - return s; - } - - if (s != visit_continue_with_parent) { - s = visit_list_elements(v, &this->else_instructions); - if (s == visit_stop) - return s; - } - - return v->visit_leave(this); -} diff --git a/dll/opengl/mesa/src/glsl/ir_import_prototypes.cpp b/dll/opengl/mesa/src/glsl/ir_import_prototypes.cpp deleted file mode 100644 index 3585bf6b24b..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_import_prototypes.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file ir_import_prototypes.cpp - * Import function prototypes from one IR tree into another. - * - * \author Ian Romanick - */ -#include "ir.h" -#include "glsl_symbol_table.h" - -/** - * Visitor used to import function prototypes - * - * Normally the \c clone method of either \c ir_function or - * \c ir_function_signature could be used. However, we don't want a complete - * clone of the \c ir_function_signature. We want everything \b except the - * body of the function. - */ -class import_prototype_visitor : public ir_hierarchical_visitor { -public: - /** - */ - import_prototype_visitor(exec_list *list, glsl_symbol_table *symbols, - void *mem_ctx) - { - this->mem_ctx = mem_ctx; - this->list = list; - this->symbols = symbols; - this->function = NULL; - } - - virtual ir_visitor_status visit_enter(ir_function *ir) - { - assert(this->function == NULL); - - this->function = this->symbols->get_function(ir->name); - if (!this->function) { - this->function = new(this->mem_ctx) ir_function(ir->name); - - list->push_tail(this->function); - - /* Add the new function to the symbol table. - */ - this->symbols->add_function(this->function); - } - return visit_continue; - } - - virtual ir_visitor_status visit_leave(ir_function *ir) - { - (void) ir; - assert(this->function != NULL); - - this->function = NULL; - return visit_continue; - } - - ir_visitor_status visit_enter(ir_function_signature *ir) - { - assert(this->function != NULL); - - ir_function_signature *copy = ir->clone_prototype(mem_ctx, NULL); - - this->function->add_signature(copy); - - /* Do not process child nodes of the ir_function_signature. There can - * never be any nodes inside the ir_function_signature that we care - * about. Instead continue with the next sibling. - */ - return visit_continue_with_parent; - } - -private: - exec_list *list; - ir_function *function; - glsl_symbol_table *symbols; - void *mem_ctx; -}; - - -/** - * Import function prototypes from one IR tree into another - * - * \param source Source instruction stream containing functions whose - * prototypes are to be imported - * \param dest Destination instruction stream where new \c ir_function and - * \c ir_function_signature nodes will be stored - * \param symbols Symbol table where new functions will be stored - * \param mem_ctx ralloc memory context used for new allocations - */ -void -import_prototypes(const exec_list *source, exec_list *dest, - glsl_symbol_table *symbols, void *mem_ctx) -{ - import_prototype_visitor v(dest, symbols, mem_ctx); - - /* Making source be const is just extra documentation. - */ - v.run(const_cast(source)); -} diff --git a/dll/opengl/mesa/src/glsl/ir_optimization.h b/dll/opengl/mesa/src/glsl/ir_optimization.h deleted file mode 100644 index 085b96903cb..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_optimization.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - - -/** - * \file ir_optimization.h - * - * Prototypes for optimization passes to be called by the compiler and drivers. - */ - -/* Operations for lower_instructions() */ -#define SUB_TO_ADD_NEG 0x01 -#define DIV_TO_MUL_RCP 0x02 -#define EXP_TO_EXP2 0x04 -#define POW_TO_EXP2 0x08 -#define LOG_TO_LOG2 0x10 -#define MOD_TO_FRACT 0x20 -#define INT_DIV_TO_MUL_RCP 0x40 - -bool do_common_optimization(exec_list *ir, bool linked, - bool uniform_locations_assigned, - unsigned max_unroll_iterations); - -bool do_algebraic(exec_list *instructions); -bool do_constant_folding(exec_list *instructions); -bool do_constant_variable(exec_list *instructions); -bool do_constant_variable_unlinked(exec_list *instructions); -bool do_copy_propagation(exec_list *instructions); -bool do_copy_propagation_elements(exec_list *instructions); -bool do_constant_propagation(exec_list *instructions); -bool do_dead_code(exec_list *instructions, bool uniform_locations_assigned); -bool do_dead_code_local(exec_list *instructions); -bool do_dead_code_unlinked(exec_list *instructions); -bool do_dead_functions(exec_list *instructions); -bool do_function_inlining(exec_list *instructions); -bool do_lower_jumps(exec_list *instructions, bool pull_out_jumps = true, bool lower_sub_return = true, bool lower_main_return = false, bool lower_continue = false, bool lower_break = false); -bool do_lower_texture_projection(exec_list *instructions); -bool do_if_simplification(exec_list *instructions); -bool do_discard_simplification(exec_list *instructions); -bool lower_if_to_cond_assign(exec_list *instructions, unsigned max_depth = 0); -bool do_mat_op_to_vec(exec_list *instructions); -bool do_noop_swizzle(exec_list *instructions); -bool do_structure_splitting(exec_list *instructions); -bool do_swizzle_swizzle(exec_list *instructions); -bool do_tree_grafting(exec_list *instructions); -bool do_vec_index_to_cond_assign(exec_list *instructions); -bool do_vec_index_to_swizzle(exec_list *instructions); -bool lower_discard(exec_list *instructions); -bool lower_instructions(exec_list *instructions, unsigned what_to_lower); -bool lower_noise(exec_list *instructions); -bool lower_variable_index_to_cond_assign(exec_list *instructions, - bool lower_input, bool lower_output, bool lower_temp, bool lower_uniform); -bool lower_quadop_vector(exec_list *instructions, bool dont_lower_swz); -bool lower_clip_distance(exec_list *instructions); -void lower_output_reads(exec_list *instructions); -bool optimize_redundant_jumps(exec_list *instructions); - -ir_rvalue * -compare_index_block(exec_list *instructions, ir_variable *index, - unsigned base, unsigned components, void *mem_ctx); diff --git a/dll/opengl/mesa/src/glsl/ir_print_visitor.cpp b/dll/opengl/mesa/src/glsl/ir_print_visitor.cpp deleted file mode 100644 index 1471355f381..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_print_visitor.cpp +++ /dev/null @@ -1,523 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "ir_print_visitor.h" -#include "glsl_types.h" -#include "glsl_parser_extras.h" -#include "program/hash_table.h" - -static void print_type(const glsl_type *t); - -void -ir_instruction::print(void) const -{ - ir_instruction *deconsted = const_cast(this); - - ir_print_visitor v; - deconsted->accept(&v); -} - -void -_mesa_print_ir(exec_list *instructions, - struct _mesa_glsl_parse_state *state) -{ - if (state) { - for (unsigned i = 0; i < state->num_user_structures; i++) { - const glsl_type *const s = state->user_structures[i]; - - printf("(structure (%s) (%s@%p) (%u) (\n", - s->name, s->name, (void *) s, s->length); - - for (unsigned j = 0; j < s->length; j++) { - printf("\t(("); - print_type(s->fields.structure[j].type); - printf(")(%s))\n", s->fields.structure[j].name); - } - - printf(")\n"); - } - } - - printf("(\n"); - foreach_iter(exec_list_iterator, iter, *instructions) { - ir_instruction *ir = (ir_instruction *)iter.get(); - ir->print(); - if (ir->ir_type != ir_type_function) - printf("\n"); - } - printf("\n)"); -} - -ir_print_visitor::ir_print_visitor() -{ - indentation = 0; - printable_names = - hash_table_ctor(32, hash_table_pointer_hash, hash_table_pointer_compare); - symbols = _mesa_symbol_table_ctor(); - mem_ctx = ralloc_context(NULL); -} - -ir_print_visitor::~ir_print_visitor() -{ - hash_table_dtor(printable_names); - _mesa_symbol_table_dtor(symbols); - ralloc_free(mem_ctx); -} - -void ir_print_visitor::indent(void) -{ - for (int i = 0; i < indentation; i++) - printf(" "); -} - -const char * -ir_print_visitor::unique_name(ir_variable *var) -{ - /* var->name can be NULL in function prototypes when a type is given for a - * parameter but no name is given. In that case, just return an empty - * string. Don't worry about tracking the generated name in the printable - * names hash because this is the only scope where it can ever appear. - */ - if (var->name == NULL) { - static unsigned arg = 1; - return ralloc_asprintf(this->mem_ctx, "parameter@%u", arg++); - } - - /* Do we already have a name for this variable? */ - const char *name = (const char *) hash_table_find(this->printable_names, var); - if (name != NULL) - return name; - - /* If there's no conflict, just use the original name */ - if (_mesa_symbol_table_find_symbol(this->symbols, -1, var->name) == NULL) { - name = var->name; - } else { - static unsigned i = 1; - name = ralloc_asprintf(this->mem_ctx, "%s@%u", var->name, ++i); - } - hash_table_insert(this->printable_names, (void *) name, var); - _mesa_symbol_table_add_symbol(this->symbols, -1, name, var); - return name; -} - -static void -print_type(const glsl_type *t) -{ - if (t->base_type == GLSL_TYPE_ARRAY) { - printf("(array "); - print_type(t->fields.array); - printf(" %u)", t->length); - } else if ((t->base_type == GLSL_TYPE_STRUCT) - && (strncmp("gl_", t->name, 3) != 0)) { - printf("%s@%p", t->name, (void *) t); - } else { - printf("%s", t->name); - } -} - - -void ir_print_visitor::visit(ir_variable *ir) -{ - printf("(declare "); - - const char *const cent = (ir->centroid) ? "centroid " : ""; - const char *const inv = (ir->invariant) ? "invariant " : ""; - const char *const mode[] = { "", "uniform ", "in ", "out ", "inout ", - "const_in ", "sys ", "temporary " }; - const char *const interp[] = { "", "flat", "noperspective" }; - - printf("(%s%s%s%s) ", - cent, inv, mode[ir->mode], interp[ir->interpolation]); - - print_type(ir->type); - printf(" %s)", unique_name(ir)); -} - - -void ir_print_visitor::visit(ir_function_signature *ir) -{ - _mesa_symbol_table_push_scope(symbols); - printf("(signature "); - indentation++; - - print_type(ir->return_type); - printf("\n"); - indent(); - - printf("(parameters\n"); - indentation++; - - foreach_iter(exec_list_iterator, iter, ir->parameters) { - ir_variable *const inst = (ir_variable *) iter.get(); - - indent(); - inst->accept(this); - printf("\n"); - } - indentation--; - - indent(); - printf(")\n"); - - indent(); - - printf("(\n"); - indentation++; - - foreach_iter(exec_list_iterator, iter, ir->body) { - ir_instruction *const inst = (ir_instruction *) iter.get(); - - indent(); - inst->accept(this); - printf("\n"); - } - indentation--; - indent(); - printf("))\n"); - indentation--; - _mesa_symbol_table_pop_scope(symbols); -} - - -void ir_print_visitor::visit(ir_function *ir) -{ - printf("(function %s\n", ir->name); - indentation++; - foreach_iter(exec_list_iterator, iter, *ir) { - ir_function_signature *const sig = (ir_function_signature *) iter.get(); - indent(); - sig->accept(this); - printf("\n"); - } - indentation--; - indent(); - printf(")\n\n"); -} - - -void ir_print_visitor::visit(ir_expression *ir) -{ - printf("(expression "); - - print_type(ir->type); - - printf(" %s ", ir->operator_string()); - - for (unsigned i = 0; i < ir->get_num_operands(); i++) { - ir->operands[i]->accept(this); - } - - printf(") "); -} - - -void ir_print_visitor::visit(ir_texture *ir) -{ - printf("(%s ", ir->opcode_string()); - - print_type(ir->type); - printf(" "); - - ir->sampler->accept(this); - printf(" "); - - if (ir->op != ir_txs) { - ir->coordinate->accept(this); - - printf(" "); - - if (ir->offset != NULL) { - ir->offset->accept(this); - } else { - printf("0"); - } - - printf(" "); - } - - if (ir->op != ir_txf && ir->op != ir_txs) { - if (ir->projector) - ir->projector->accept(this); - else - printf("1"); - - if (ir->shadow_comparitor) { - printf(" "); - ir->shadow_comparitor->accept(this); - } else { - printf(" ()"); - } - } - - printf(" "); - switch (ir->op) - { - case ir_tex: - break; - case ir_txb: - ir->lod_info.bias->accept(this); - break; - case ir_txl: - case ir_txf: - case ir_txs: - ir->lod_info.lod->accept(this); - break; - case ir_txd: - printf("("); - ir->lod_info.grad.dPdx->accept(this); - printf(" "); - ir->lod_info.grad.dPdy->accept(this); - printf(")"); - break; - }; - printf(")"); -} - - -void ir_print_visitor::visit(ir_swizzle *ir) -{ - const unsigned swiz[4] = { - ir->mask.x, - ir->mask.y, - ir->mask.z, - ir->mask.w, - }; - - printf("(swiz "); - for (unsigned i = 0; i < ir->mask.num_components; i++) { - printf("%c", "xyzw"[swiz[i]]); - } - printf(" "); - ir->val->accept(this); - printf(")"); -} - - -void ir_print_visitor::visit(ir_dereference_variable *ir) -{ - ir_variable *var = ir->variable_referenced(); - printf("(var_ref %s) ", unique_name(var)); -} - - -void ir_print_visitor::visit(ir_dereference_array *ir) -{ - printf("(array_ref "); - ir->array->accept(this); - ir->array_index->accept(this); - printf(") "); -} - - -void ir_print_visitor::visit(ir_dereference_record *ir) -{ - printf("(record_ref "); - ir->record->accept(this); - printf(" %s) ", ir->field); -} - - -void ir_print_visitor::visit(ir_assignment *ir) -{ - printf("(assign "); - - if (ir->condition) - ir->condition->accept(this); - - char mask[5]; - unsigned j = 0; - - for (unsigned i = 0; i < 4; i++) { - if ((ir->write_mask & (1 << i)) != 0) { - mask[j] = "xyzw"[i]; - j++; - } - } - mask[j] = '\0'; - - printf(" (%s) ", mask); - - ir->lhs->accept(this); - - printf(" "); - - ir->rhs->accept(this); - printf(") "); -} - - -void ir_print_visitor::visit(ir_constant *ir) -{ - printf("(constant "); - print_type(ir->type); - printf(" ("); - - if (ir->type->is_array()) { - for (unsigned i = 0; i < ir->type->length; i++) - ir->get_array_element(i)->accept(this); - } else if (ir->type->is_record()) { - ir_constant *value = (ir_constant *) ir->components.get_head(); - for (unsigned i = 0; i < ir->type->length; i++) { - printf("(%s ", ir->type->fields.structure[i].name); - value->accept(this); - printf(")"); - - value = (ir_constant *) value->next; - } - } else { - for (unsigned i = 0; i < ir->type->components(); i++) { - if (i != 0) - printf(" "); - switch (ir->type->base_type) { - case GLSL_TYPE_UINT: printf("%u", ir->value.u[i]); break; - case GLSL_TYPE_INT: printf("%d", ir->value.i[i]); break; - case GLSL_TYPE_FLOAT: printf("%f", ir->value.f[i]); break; - case GLSL_TYPE_BOOL: printf("%d", ir->value.b[i]); break; - default: assert(0); - } - } - } - printf(")) "); -} - - -void -ir_print_visitor::visit(ir_call *ir) -{ - printf("(call %s (", ir->callee_name()); - foreach_iter(exec_list_iterator, iter, *ir) { - ir_instruction *const inst = (ir_instruction *) iter.get(); - - inst->accept(this); - } - printf("))\n"); -} - - -void -ir_print_visitor::visit(ir_return *ir) -{ - printf("(return"); - - ir_rvalue *const value = ir->get_value(); - if (value) { - printf(" "); - value->accept(this); - } - - printf(")"); -} - - -void -ir_print_visitor::visit(ir_discard *ir) -{ - printf("(discard "); - - if (ir->condition != NULL) { - printf(" "); - ir->condition->accept(this); - } - - printf(")"); -} - - -void -ir_print_visitor::visit(ir_if *ir) -{ - printf("(if "); - ir->condition->accept(this); - - printf("(\n"); - indentation++; - - foreach_iter(exec_list_iterator, iter, ir->then_instructions) { - ir_instruction *const inst = (ir_instruction *) iter.get(); - - indent(); - inst->accept(this); - printf("\n"); - } - - indentation--; - indent(); - printf(")\n"); - - indent(); - if (!ir->else_instructions.is_empty()) { - printf("(\n"); - indentation++; - - foreach_iter(exec_list_iterator, iter, ir->else_instructions) { - ir_instruction *const inst = (ir_instruction *) iter.get(); - - indent(); - inst->accept(this); - printf("\n"); - } - indentation--; - indent(); - printf("))\n"); - } else { - printf("())\n"); - } -} - - -void -ir_print_visitor::visit(ir_loop *ir) -{ - printf("(loop ("); - if (ir->counter != NULL) - ir->counter->accept(this); - printf(") ("); - if (ir->from != NULL) - ir->from->accept(this); - printf(") ("); - if (ir->to != NULL) - ir->to->accept(this); - printf(") ("); - if (ir->increment != NULL) - ir->increment->accept(this); - printf(") (\n"); - indentation++; - - foreach_iter(exec_list_iterator, iter, ir->body_instructions) { - ir_instruction *const inst = (ir_instruction *) iter.get(); - - indent(); - inst->accept(this); - printf("\n"); - } - indentation--; - indent(); - printf("))\n"); -} - - -void -ir_print_visitor::visit(ir_loop_jump *ir) -{ - printf("%s", ir->is_break() ? "break" : "continue"); -} diff --git a/dll/opengl/mesa/src/glsl/ir_print_visitor.h b/dll/opengl/mesa/src/glsl/ir_print_visitor.h deleted file mode 100644 index c7136f11a3b..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_print_visitor.h +++ /dev/null @@ -1,94 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#pragma once -#ifndef IR_PRINT_VISITOR_H -#define IR_PRINT_VISITOR_H - -#include "ir.h" -#include "ir_visitor.h" - -extern "C" { -#include "program/symbol_table.h" -} - -extern void _mesa_print_ir(exec_list *instructions, - struct _mesa_glsl_parse_state *state); - -/** - * Abstract base class of visitors of IR instruction trees - */ -class ir_print_visitor : public ir_visitor { -public: - ir_print_visitor(); - virtual ~ir_print_visitor(); - - void indent(void); - - /** - * \name Visit methods - * - * As typical for the visitor pattern, there must be one \c visit method for - * each concrete subclass of \c ir_instruction. Virtual base classes within - * the hierarchy should not have \c visit methods. - */ - /*@{*/ - virtual void visit(ir_variable *); - virtual void visit(ir_function_signature *); - virtual void visit(ir_function *); - virtual void visit(ir_expression *); - virtual void visit(ir_texture *); - virtual void visit(ir_swizzle *); - virtual void visit(ir_dereference_variable *); - virtual void visit(ir_dereference_array *); - virtual void visit(ir_dereference_record *); - virtual void visit(ir_assignment *); - virtual void visit(ir_constant *); - virtual void visit(ir_call *); - virtual void visit(ir_return *); - virtual void visit(ir_discard *); - virtual void visit(ir_if *); - virtual void visit(ir_loop *); - virtual void visit(ir_loop_jump *); - /*@}*/ - -private: - /** - * Fetch/generate a unique name for ir_variable. - * - * GLSL IR permits multiple ir_variables to share the same name. This works - * fine until we try to print it, when we really need a unique one. - */ - const char *unique_name(ir_variable *var); - - /** A mapping from ir_variable * -> unique printable names. */ - hash_table *printable_names; - _mesa_symbol_table *symbols; - - void *mem_ctx; - - int indentation; -}; - -#endif /* IR_PRINT_VISITOR_H */ diff --git a/dll/opengl/mesa/src/glsl/ir_reader.cpp b/dll/opengl/mesa/src/glsl/ir_reader.cpp deleted file mode 100644 index 6f50cc439b8..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_reader.cpp +++ /dev/null @@ -1,1018 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "ir_reader.h" -#include "glsl_parser_extras.h" -#include "glsl_types.h" -#include "s_expression.h" - -const static bool debug = false; - -class ir_reader { -public: - ir_reader(_mesa_glsl_parse_state *); - - void read(exec_list *instructions, const char *src, bool scan_for_protos); - -private: - void *mem_ctx; - _mesa_glsl_parse_state *state; - - void ir_read_error(s_expression *, const char *fmt, ...); - - const glsl_type *read_type(s_expression *); - - void scan_for_prototypes(exec_list *, s_expression *); - ir_function *read_function(s_expression *, bool skip_body); - void read_function_sig(ir_function *, s_expression *, bool skip_body); - - void read_instructions(exec_list *, s_expression *, ir_loop *); - ir_instruction *read_instruction(s_expression *, ir_loop *); - ir_variable *read_declaration(s_expression *); - ir_if *read_if(s_expression *, ir_loop *); - ir_loop *read_loop(s_expression *); - ir_return *read_return(s_expression *); - ir_rvalue *read_rvalue(s_expression *); - ir_assignment *read_assignment(s_expression *); - ir_expression *read_expression(s_expression *); - ir_call *read_call(s_expression *); - ir_swizzle *read_swizzle(s_expression *); - ir_constant *read_constant(s_expression *); - ir_texture *read_texture(s_expression *); - - ir_dereference *read_dereference(s_expression *); -}; - -ir_reader::ir_reader(_mesa_glsl_parse_state *state) : state(state) -{ - this->mem_ctx = state; -} - -void -_mesa_glsl_read_ir(_mesa_glsl_parse_state *state, exec_list *instructions, - const char *src, bool scan_for_protos) -{ - ir_reader r(state); - r.read(instructions, src, scan_for_protos); -} - -void -ir_reader::read(exec_list *instructions, const char *src, bool scan_for_protos) -{ - void *sx_mem_ctx = ralloc_context(NULL); - s_expression *expr = s_expression::read_expression(sx_mem_ctx, src); - if (expr == NULL) { - ir_read_error(NULL, "couldn't parse S-Expression."); - return; - } - - if (scan_for_protos) { - scan_for_prototypes(instructions, expr); - if (state->error) - return; - } - - read_instructions(instructions, expr, NULL); - ralloc_free(sx_mem_ctx); - - if (debug) - validate_ir_tree(instructions); -} - -void -ir_reader::ir_read_error(s_expression *expr, const char *fmt, ...) -{ - va_list ap; - - state->error = true; - - if (state->current_function != NULL) - ralloc_asprintf_append(&state->info_log, "In function %s:\n", - state->current_function->function_name()); - ralloc_strcat(&state->info_log, "error: "); - - va_start(ap, fmt); - ralloc_vasprintf_append(&state->info_log, fmt, ap); - va_end(ap); - ralloc_strcat(&state->info_log, "\n"); - - if (expr != NULL) { - ralloc_strcat(&state->info_log, "...in this context:\n "); - expr->print(); - ralloc_strcat(&state->info_log, "\n\n"); - } -} - -const glsl_type * -ir_reader::read_type(s_expression *expr) -{ - s_expression *s_base_type; - s_int *s_size; - - s_pattern pat[] = { "array", s_base_type, s_size }; - if (MATCH(expr, pat)) { - const glsl_type *base_type = read_type(s_base_type); - if (base_type == NULL) { - ir_read_error(NULL, "when reading base type of array type"); - return NULL; - } - - return glsl_type::get_array_instance(base_type, s_size->value()); - } - - s_symbol *type_sym = SX_AS_SYMBOL(expr); - if (type_sym == NULL) { - ir_read_error(expr, "expected "); - return NULL; - } - - const glsl_type *type = state->symbols->get_type(type_sym->value()); - if (type == NULL) - ir_read_error(expr, "invalid type: %s", type_sym->value()); - - return type; -} - - -void -ir_reader::scan_for_prototypes(exec_list *instructions, s_expression *expr) -{ - s_list *list = SX_AS_LIST(expr); - if (list == NULL) { - ir_read_error(expr, "Expected ( ...); found an atom."); - return; - } - - foreach_iter(exec_list_iterator, it, list->subexpressions) { - s_list *sub = SX_AS_LIST(it.get()); - if (sub == NULL) - continue; // not a (function ...); ignore it. - - s_symbol *tag = SX_AS_SYMBOL(sub->subexpressions.get_head()); - if (tag == NULL || strcmp(tag->value(), "function") != 0) - continue; // not a (function ...); ignore it. - - ir_function *f = read_function(sub, true); - if (f == NULL) - return; - instructions->push_tail(f); - } -} - -ir_function * -ir_reader::read_function(s_expression *expr, bool skip_body) -{ - bool added = false; - s_symbol *name; - - s_pattern pat[] = { "function", name }; - if (!PARTIAL_MATCH(expr, pat)) { - ir_read_error(expr, "Expected (function (signature ...) ...)"); - return NULL; - } - - ir_function *f = state->symbols->get_function(name->value()); - if (f == NULL) { - f = new(mem_ctx) ir_function(name->value()); - added = state->symbols->add_function(f); - assert(added); - } - - exec_list_iterator it = ((s_list *) expr)->subexpressions.iterator(); - it.next(); // skip "function" tag - it.next(); // skip function name - for (/* nothing */; it.has_next(); it.next()) { - s_expression *s_sig = (s_expression *) it.get(); - read_function_sig(f, s_sig, skip_body); - } - return added ? f : NULL; -} - -void -ir_reader::read_function_sig(ir_function *f, s_expression *expr, bool skip_body) -{ - s_expression *type_expr; - s_list *paramlist; - s_list *body_list; - - s_pattern pat[] = { "signature", type_expr, paramlist, body_list }; - if (!MATCH(expr, pat)) { - ir_read_error(expr, "Expected (signature (parameters ...) " - "( ...))"); - return; - } - - const glsl_type *return_type = read_type(type_expr); - if (return_type == NULL) - return; - - s_symbol *paramtag = SX_AS_SYMBOL(paramlist->subexpressions.get_head()); - if (paramtag == NULL || strcmp(paramtag->value(), "parameters") != 0) { - ir_read_error(paramlist, "Expected (parameters ...)"); - return; - } - - // Read the parameters list into a temporary place. - exec_list hir_parameters; - state->symbols->push_scope(); - - exec_list_iterator it = paramlist->subexpressions.iterator(); - for (it.next() /* skip "parameters" */; it.has_next(); it.next()) { - ir_variable *var = read_declaration((s_expression *) it.get()); - if (var == NULL) - return; - - hir_parameters.push_tail(var); - } - - ir_function_signature *sig = f->exact_matching_signature(&hir_parameters); - if (sig == NULL && skip_body) { - /* If scanning for prototypes, generate a new signature. */ - sig = new(mem_ctx) ir_function_signature(return_type); - sig->is_builtin = true; - f->add_signature(sig); - } else if (sig != NULL) { - const char *badvar = sig->qualifiers_match(&hir_parameters); - if (badvar != NULL) { - ir_read_error(expr, "function `%s' parameter `%s' qualifiers " - "don't match prototype", f->name, badvar); - return; - } - - if (sig->return_type != return_type) { - ir_read_error(expr, "function `%s' return type doesn't " - "match prototype", f->name); - return; - } - } else { - /* No prototype for this body exists - skip it. */ - state->symbols->pop_scope(); - return; - } - assert(sig != NULL); - - sig->replace_parameters(&hir_parameters); - - if (!skip_body && !body_list->subexpressions.is_empty()) { - if (sig->is_defined) { - ir_read_error(expr, "function %s redefined", f->name); - return; - } - state->current_function = sig; - read_instructions(&sig->body, body_list, NULL); - state->current_function = NULL; - sig->is_defined = true; - } - - state->symbols->pop_scope(); -} - -void -ir_reader::read_instructions(exec_list *instructions, s_expression *expr, - ir_loop *loop_ctx) -{ - // Read in a list of instructions - s_list *list = SX_AS_LIST(expr); - if (list == NULL) { - ir_read_error(expr, "Expected ( ...); found an atom."); - return; - } - - foreach_iter(exec_list_iterator, it, list->subexpressions) { - s_expression *sub = (s_expression*) it.get(); - ir_instruction *ir = read_instruction(sub, loop_ctx); - if (ir != NULL) { - /* Global variable declarations should be moved to the top, before - * any functions that might use them. Functions are added to the - * instruction stream when scanning for prototypes, so without this - * hack, they always appear before variable declarations. - */ - if (state->current_function == NULL && ir->as_variable() != NULL) - instructions->push_head(ir); - else - instructions->push_tail(ir); - } - } -} - - -ir_instruction * -ir_reader::read_instruction(s_expression *expr, ir_loop *loop_ctx) -{ - s_symbol *symbol = SX_AS_SYMBOL(expr); - if (symbol != NULL) { - if (strcmp(symbol->value(), "break") == 0 && loop_ctx != NULL) - return new(mem_ctx) ir_loop_jump(ir_loop_jump::jump_break); - if (strcmp(symbol->value(), "continue") == 0 && loop_ctx != NULL) - return new(mem_ctx) ir_loop_jump(ir_loop_jump::jump_continue); - } - - s_list *list = SX_AS_LIST(expr); - if (list == NULL || list->subexpressions.is_empty()) { - ir_read_error(expr, "Invalid instruction.\n"); - return NULL; - } - - s_symbol *tag = SX_AS_SYMBOL(list->subexpressions.get_head()); - if (tag == NULL) { - ir_read_error(expr, "expected instruction tag"); - return NULL; - } - - ir_instruction *inst = NULL; - if (strcmp(tag->value(), "declare") == 0) { - inst = read_declaration(list); - } else if (strcmp(tag->value(), "assign") == 0) { - inst = read_assignment(list); - } else if (strcmp(tag->value(), "if") == 0) { - inst = read_if(list, loop_ctx); - } else if (strcmp(tag->value(), "loop") == 0) { - inst = read_loop(list); - } else if (strcmp(tag->value(), "return") == 0) { - inst = read_return(list); - } else if (strcmp(tag->value(), "function") == 0) { - inst = read_function(list, false); - } else { - inst = read_rvalue(list); - if (inst == NULL) - ir_read_error(NULL, "when reading instruction"); - } - return inst; -} - -ir_variable * -ir_reader::read_declaration(s_expression *expr) -{ - s_list *s_quals; - s_expression *s_type; - s_symbol *s_name; - - s_pattern pat[] = { "declare", s_quals, s_type, s_name }; - if (!MATCH(expr, pat)) { - ir_read_error(expr, "expected (declare () )"); - return NULL; - } - - const glsl_type *type = read_type(s_type); - if (type == NULL) - return NULL; - - ir_variable *var = new(mem_ctx) ir_variable(type, s_name->value(), - ir_var_auto); - - foreach_iter(exec_list_iterator, it, s_quals->subexpressions) { - s_symbol *qualifier = SX_AS_SYMBOL(it.get()); - if (qualifier == NULL) { - ir_read_error(expr, "qualifier list must contain only symbols"); - return NULL; - } - - // FINISHME: Check for duplicate/conflicting qualifiers. - if (strcmp(qualifier->value(), "centroid") == 0) { - var->centroid = 1; - } else if (strcmp(qualifier->value(), "invariant") == 0) { - var->invariant = 1; - } else if (strcmp(qualifier->value(), "uniform") == 0) { - var->mode = ir_var_uniform; - } else if (strcmp(qualifier->value(), "auto") == 0) { - var->mode = ir_var_auto; - } else if (strcmp(qualifier->value(), "in") == 0) { - var->mode = ir_var_in; - } else if (strcmp(qualifier->value(), "const_in") == 0) { - var->mode = ir_var_const_in; - } else if (strcmp(qualifier->value(), "out") == 0) { - var->mode = ir_var_out; - } else if (strcmp(qualifier->value(), "inout") == 0) { - var->mode = ir_var_inout; - } else if (strcmp(qualifier->value(), "smooth") == 0) { - var->interpolation = INTERP_QUALIFIER_SMOOTH; - } else if (strcmp(qualifier->value(), "flat") == 0) { - var->interpolation = INTERP_QUALIFIER_FLAT; - } else if (strcmp(qualifier->value(), "noperspective") == 0) { - var->interpolation = INTERP_QUALIFIER_NOPERSPECTIVE; - } else { - ir_read_error(expr, "unknown qualifier: %s", qualifier->value()); - return NULL; - } - } - - // Add the variable to the symbol table - state->symbols->add_variable(var); - - return var; -} - - -ir_if * -ir_reader::read_if(s_expression *expr, ir_loop *loop_ctx) -{ - s_expression *s_cond; - s_expression *s_then; - s_expression *s_else; - - s_pattern pat[] = { "if", s_cond, s_then, s_else }; - if (!MATCH(expr, pat)) { - ir_read_error(expr, "expected (if (...) (...))"); - return NULL; - } - - ir_rvalue *condition = read_rvalue(s_cond); - if (condition == NULL) { - ir_read_error(NULL, "when reading condition of (if ...)"); - return NULL; - } - - ir_if *iff = new(mem_ctx) ir_if(condition); - - read_instructions(&iff->then_instructions, s_then, loop_ctx); - read_instructions(&iff->else_instructions, s_else, loop_ctx); - if (state->error) { - delete iff; - iff = NULL; - } - return iff; -} - - -ir_loop * -ir_reader::read_loop(s_expression *expr) -{ - s_expression *s_counter, *s_from, *s_to, *s_inc, *s_body; - - s_pattern pat[] = { "loop", s_counter, s_from, s_to, s_inc, s_body }; - if (!MATCH(expr, pat)) { - ir_read_error(expr, "expected (loop " - " )"); - return NULL; - } - - // FINISHME: actually read the count/from/to fields. - - ir_loop *loop = new(mem_ctx) ir_loop; - read_instructions(&loop->body_instructions, s_body, loop); - if (state->error) { - delete loop; - loop = NULL; - } - return loop; -} - - -ir_return * -ir_reader::read_return(s_expression *expr) -{ - s_expression *s_retval; - - s_pattern return_value_pat[] = { "return", s_retval}; - s_pattern return_void_pat[] = { "return" }; - if (MATCH(expr, return_value_pat)) { - ir_rvalue *retval = read_rvalue(s_retval); - if (retval == NULL) { - ir_read_error(NULL, "when reading return value"); - return NULL; - } - return new(mem_ctx) ir_return(retval); - } else if (MATCH(expr, return_void_pat)) { - return new(mem_ctx) ir_return; - } else { - ir_read_error(expr, "expected (return ) or (return)"); - return NULL; - } -} - - -ir_rvalue * -ir_reader::read_rvalue(s_expression *expr) -{ - s_list *list = SX_AS_LIST(expr); - if (list == NULL || list->subexpressions.is_empty()) - return NULL; - - s_symbol *tag = SX_AS_SYMBOL(list->subexpressions.get_head()); - if (tag == NULL) { - ir_read_error(expr, "expected rvalue tag"); - return NULL; - } - - ir_rvalue *rvalue = read_dereference(list); - if (rvalue != NULL || state->error) - return rvalue; - else if (strcmp(tag->value(), "swiz") == 0) { - rvalue = read_swizzle(list); - } else if (strcmp(tag->value(), "expression") == 0) { - rvalue = read_expression(list); - } else if (strcmp(tag->value(), "call") == 0) { - rvalue = read_call(list); - } else if (strcmp(tag->value(), "constant") == 0) { - rvalue = read_constant(list); - } else { - rvalue = read_texture(list); - if (rvalue == NULL && !state->error) - ir_read_error(expr, "unrecognized rvalue tag: %s", tag->value()); - } - - return rvalue; -} - -ir_assignment * -ir_reader::read_assignment(s_expression *expr) -{ - s_expression *cond_expr = NULL; - s_expression *lhs_expr, *rhs_expr; - s_list *mask_list; - - s_pattern pat4[] = { "assign", mask_list, lhs_expr, rhs_expr }; - s_pattern pat5[] = { "assign", cond_expr, mask_list, lhs_expr, rhs_expr }; - if (!MATCH(expr, pat4) && !MATCH(expr, pat5)) { - ir_read_error(expr, "expected (assign [] () " - " )"); - return NULL; - } - - ir_rvalue *condition = NULL; - if (cond_expr != NULL) { - condition = read_rvalue(cond_expr); - if (condition == NULL) { - ir_read_error(NULL, "when reading condition of assignment"); - return NULL; - } - } - - unsigned mask = 0; - - s_symbol *mask_symbol; - s_pattern mask_pat[] = { mask_symbol }; - if (MATCH(mask_list, mask_pat)) { - const char *mask_str = mask_symbol->value(); - unsigned mask_length = strlen(mask_str); - if (mask_length > 4) { - ir_read_error(expr, "invalid write mask: %s", mask_str); - return NULL; - } - - const unsigned idx_map[] = { 3, 0, 1, 2 }; /* w=bit 3, x=0, y=1, z=2 */ - - for (unsigned i = 0; i < mask_length; i++) { - if (mask_str[i] < 'w' || mask_str[i] > 'z') { - ir_read_error(expr, "write mask contains invalid character: %c", - mask_str[i]); - return NULL; - } - mask |= 1 << idx_map[mask_str[i] - 'w']; - } - } else if (!mask_list->subexpressions.is_empty()) { - ir_read_error(mask_list, "expected () or ()"); - return NULL; - } - - ir_dereference *lhs = read_dereference(lhs_expr); - if (lhs == NULL) { - ir_read_error(NULL, "when reading left-hand side of assignment"); - return NULL; - } - - ir_rvalue *rhs = read_rvalue(rhs_expr); - if (rhs == NULL) { - ir_read_error(NULL, "when reading right-hand side of assignment"); - return NULL; - } - - if (mask == 0 && (lhs->type->is_vector() || lhs->type->is_scalar())) { - ir_read_error(expr, "non-zero write mask required."); - return NULL; - } - - return new(mem_ctx) ir_assignment(lhs, rhs, condition, mask); -} - -ir_call * -ir_reader::read_call(s_expression *expr) -{ - s_symbol *name; - s_list *params; - - s_pattern pat[] = { "call", name, params }; - if (!MATCH(expr, pat)) { - ir_read_error(expr, "expected (call ( ...))"); - return NULL; - } - - exec_list parameters; - - foreach_iter(exec_list_iterator, it, params->subexpressions) { - s_expression *expr = (s_expression*) it.get(); - ir_rvalue *param = read_rvalue(expr); - if (param == NULL) { - ir_read_error(expr, "when reading parameter to function call"); - return NULL; - } - parameters.push_tail(param); - } - - ir_function *f = state->symbols->get_function(name->value()); - if (f == NULL) { - ir_read_error(expr, "found call to undefined function %s", - name->value()); - return NULL; - } - - ir_function_signature *callee = f->matching_signature(¶meters); - if (callee == NULL) { - ir_read_error(expr, "couldn't find matching signature for function " - "%s", name->value()); - return NULL; - } - - return new(mem_ctx) ir_call(callee, ¶meters); -} - -ir_expression * -ir_reader::read_expression(s_expression *expr) -{ - s_expression *s_type; - s_symbol *s_op; - s_expression *s_arg1; - - s_pattern pat[] = { "expression", s_type, s_op, s_arg1 }; - if (!PARTIAL_MATCH(expr, pat)) { - ir_read_error(expr, "expected (expression " - " [])"); - return NULL; - } - s_expression *s_arg2 = (s_expression *) s_arg1->next; // may be tail sentinel - - const glsl_type *type = read_type(s_type); - if (type == NULL) - return NULL; - - /* Read the operator */ - ir_expression_operation op = ir_expression::get_operator(s_op->value()); - if (op == (ir_expression_operation) -1) { - ir_read_error(expr, "invalid operator: %s", s_op->value()); - return NULL; - } - - unsigned num_operands = ir_expression::get_num_operands(op); - if (num_operands == 1 && !s_arg1->next->is_tail_sentinel()) { - ir_read_error(expr, "expected (expression %s )", - s_op->value()); - return NULL; - } - - ir_rvalue *arg1 = read_rvalue(s_arg1); - ir_rvalue *arg2 = NULL; - if (arg1 == NULL) { - ir_read_error(NULL, "when reading first operand of %s", s_op->value()); - return NULL; - } - - if (num_operands == 2) { - if (s_arg2->is_tail_sentinel() || !s_arg2->next->is_tail_sentinel()) { - ir_read_error(expr, "expected (expression %s " - ")", s_op->value()); - return NULL; - } - arg2 = read_rvalue(s_arg2); - if (arg2 == NULL) { - ir_read_error(NULL, "when reading second operand of %s", - s_op->value()); - return NULL; - } - } - - return new(mem_ctx) ir_expression(op, type, arg1, arg2); -} - -ir_swizzle * -ir_reader::read_swizzle(s_expression *expr) -{ - s_symbol *swiz; - s_expression *sub; - - s_pattern pat[] = { "swiz", swiz, sub }; - if (!MATCH(expr, pat)) { - ir_read_error(expr, "expected (swiz )"); - return NULL; - } - - if (strlen(swiz->value()) > 4) { - ir_read_error(expr, "expected a valid swizzle; found %s", swiz->value()); - return NULL; - } - - ir_rvalue *rvalue = read_rvalue(sub); - if (rvalue == NULL) - return NULL; - - ir_swizzle *ir = ir_swizzle::create(rvalue, swiz->value(), - rvalue->type->vector_elements); - if (ir == NULL) - ir_read_error(expr, "invalid swizzle"); - - return ir; -} - -ir_constant * -ir_reader::read_constant(s_expression *expr) -{ - s_expression *type_expr; - s_list *values; - - s_pattern pat[] = { "constant", type_expr, values }; - if (!MATCH(expr, pat)) { - ir_read_error(expr, "expected (constant (...))"); - return NULL; - } - - const glsl_type *type = read_type(type_expr); - if (type == NULL) - return NULL; - - if (values == NULL) { - ir_read_error(expr, "expected (constant (...))"); - return NULL; - } - - if (type->is_array()) { - unsigned elements_supplied = 0; - exec_list elements; - foreach_iter(exec_list_iterator, it, values->subexpressions) { - s_expression *elt = (s_expression *) it.get(); - ir_constant *ir_elt = read_constant(elt); - if (ir_elt == NULL) - return NULL; - elements.push_tail(ir_elt); - elements_supplied++; - } - - if (elements_supplied != type->length) { - ir_read_error(values, "expected exactly %u array elements, " - "given %u", type->length, elements_supplied); - return NULL; - } - return new(mem_ctx) ir_constant(type, &elements); - } - - ir_constant_data data = { { 0 } }; - - // Read in list of values (at most 16). - unsigned k = 0; - foreach_iter(exec_list_iterator, it, values->subexpressions) { - if (k >= 16) { - ir_read_error(values, "expected at most 16 numbers"); - return NULL; - } - - s_expression *expr = (s_expression*) it.get(); - - if (type->base_type == GLSL_TYPE_FLOAT) { - s_number *value = SX_AS_NUMBER(expr); - if (value == NULL) { - ir_read_error(values, "expected numbers"); - return NULL; - } - data.f[k] = value->fvalue(); - } else { - s_int *value = SX_AS_INT(expr); - if (value == NULL) { - ir_read_error(values, "expected integers"); - return NULL; - } - - switch (type->base_type) { - case GLSL_TYPE_UINT: { - data.u[k] = value->value(); - break; - } - case GLSL_TYPE_INT: { - data.i[k] = value->value(); - break; - } - case GLSL_TYPE_BOOL: { - data.b[k] = value->value(); - break; - } - default: - ir_read_error(values, "unsupported constant type"); - return NULL; - } - } - ++k; - } - if (k != type->components()) { - ir_read_error(values, "expected %u constant values, found %u", - type->components(), k); - return NULL; - } - - return new(mem_ctx) ir_constant(type, &data); -} - -ir_dereference * -ir_reader::read_dereference(s_expression *expr) -{ - s_symbol *s_var; - s_expression *s_subject; - s_expression *s_index; - s_symbol *s_field; - - s_pattern var_pat[] = { "var_ref", s_var }; - s_pattern array_pat[] = { "array_ref", s_subject, s_index }; - s_pattern record_pat[] = { "record_ref", s_subject, s_field }; - - if (MATCH(expr, var_pat)) { - ir_variable *var = state->symbols->get_variable(s_var->value()); - if (var == NULL) { - ir_read_error(expr, "undeclared variable: %s", s_var->value()); - return NULL; - } - return new(mem_ctx) ir_dereference_variable(var); - } else if (MATCH(expr, array_pat)) { - ir_rvalue *subject = read_rvalue(s_subject); - if (subject == NULL) { - ir_read_error(NULL, "when reading the subject of an array_ref"); - return NULL; - } - - ir_rvalue *idx = read_rvalue(s_index); - if (subject == NULL) { - ir_read_error(NULL, "when reading the index of an array_ref"); - return NULL; - } - return new(mem_ctx) ir_dereference_array(subject, idx); - } else if (MATCH(expr, record_pat)) { - ir_rvalue *subject = read_rvalue(s_subject); - if (subject == NULL) { - ir_read_error(NULL, "when reading the subject of a record_ref"); - return NULL; - } - return new(mem_ctx) ir_dereference_record(subject, s_field->value()); - } - return NULL; -} - -ir_texture * -ir_reader::read_texture(s_expression *expr) -{ - s_symbol *tag = NULL; - s_expression *s_type = NULL; - s_expression *s_sampler = NULL; - s_expression *s_coord = NULL; - s_expression *s_offset = NULL; - s_expression *s_proj = NULL; - s_list *s_shadow = NULL; - s_expression *s_lod = NULL; - - ir_texture_opcode op = ir_tex; /* silence warning */ - - s_pattern tex_pattern[] = - { "tex", s_type, s_sampler, s_coord, s_offset, s_proj, s_shadow }; - s_pattern txf_pattern[] = - { "txf", s_type, s_sampler, s_coord, s_offset, s_lod }; - s_pattern txs_pattern[] = - { "txs", s_type, s_sampler, s_lod }; - s_pattern other_pattern[] = - { tag, s_type, s_sampler, s_coord, s_offset, s_proj, s_shadow, s_lod }; - - if (MATCH(expr, tex_pattern)) { - op = ir_tex; - } else if (MATCH(expr, txf_pattern)) { - op = ir_txf; - } else if (MATCH(expr, txs_pattern)) { - op = ir_txs; - } else if (MATCH(expr, other_pattern)) { - op = ir_texture::get_opcode(tag->value()); - if (op == -1) - return NULL; - } else { - ir_read_error(NULL, "unexpected texture pattern"); - return NULL; - } - - ir_texture *tex = new(mem_ctx) ir_texture(op); - - // Read return type - const glsl_type *type = read_type(s_type); - if (type == NULL) { - ir_read_error(NULL, "when reading type in (%s ...)", - tex->opcode_string()); - return NULL; - } - - // Read sampler (must be a deref) - ir_dereference *sampler = read_dereference(s_sampler); - if (sampler == NULL) { - ir_read_error(NULL, "when reading sampler in (%s ...)", - tex->opcode_string()); - return NULL; - } - tex->set_sampler(sampler, type); - - if (op != ir_txs) { - // Read coordinate (any rvalue) - tex->coordinate = read_rvalue(s_coord); - if (tex->coordinate == NULL) { - ir_read_error(NULL, "when reading coordinate in (%s ...)", - tex->opcode_string()); - return NULL; - } - - // Read texel offset - either 0 or an rvalue. - s_int *si_offset = SX_AS_INT(s_offset); - if (si_offset == NULL || si_offset->value() != 0) { - tex->offset = read_rvalue(s_offset); - if (tex->offset == NULL) { - ir_read_error(s_offset, "expected 0 or an expression"); - return NULL; - } - } - } - - if (op != ir_txf && op != ir_txs) { - s_int *proj_as_int = SX_AS_INT(s_proj); - if (proj_as_int && proj_as_int->value() == 1) { - tex->projector = NULL; - } else { - tex->projector = read_rvalue(s_proj); - if (tex->projector == NULL) { - ir_read_error(NULL, "when reading projective divide in (%s ..)", - tex->opcode_string()); - return NULL; - } - } - - if (s_shadow->subexpressions.is_empty()) { - tex->shadow_comparitor = NULL; - } else { - tex->shadow_comparitor = read_rvalue(s_shadow); - if (tex->shadow_comparitor == NULL) { - ir_read_error(NULL, "when reading shadow comparitor in (%s ..)", - tex->opcode_string()); - return NULL; - } - } - } - - switch (op) { - case ir_txb: - tex->lod_info.bias = read_rvalue(s_lod); - if (tex->lod_info.bias == NULL) { - ir_read_error(NULL, "when reading LOD bias in (txb ...)"); - return NULL; - } - break; - case ir_txl: - case ir_txf: - case ir_txs: - tex->lod_info.lod = read_rvalue(s_lod); - if (tex->lod_info.lod == NULL) { - ir_read_error(NULL, "when reading LOD in (%s ...)", - tex->opcode_string()); - return NULL; - } - break; - case ir_txd: { - s_expression *s_dx, *s_dy; - s_pattern dxdy_pat[] = { s_dx, s_dy }; - if (!MATCH(s_lod, dxdy_pat)) { - ir_read_error(s_lod, "expected (dPdx dPdy) in (txd ...)"); - return NULL; - } - tex->lod_info.grad.dPdx = read_rvalue(s_dx); - if (tex->lod_info.grad.dPdx == NULL) { - ir_read_error(NULL, "when reading dPdx in (txd ...)"); - return NULL; - } - tex->lod_info.grad.dPdy = read_rvalue(s_dy); - if (tex->lod_info.grad.dPdy == NULL) { - ir_read_error(NULL, "when reading dPdy in (txd ...)"); - return NULL; - } - break; - } - default: - // tex doesn't have any extra parameters. - break; - }; - return tex; -} diff --git a/dll/opengl/mesa/src/glsl/ir_reader.h b/dll/opengl/mesa/src/glsl/ir_reader.h deleted file mode 100644 index aef2ca23bd2..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_reader.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#pragma once -#ifndef IR_READER_H -#define IR_READER_H - -#include "ir.h" - -void _mesa_glsl_read_ir(_mesa_glsl_parse_state *state, exec_list *instructions, - const char *src, bool scan_for_prototypes); - -#endif /* IR_READER_H */ diff --git a/dll/opengl/mesa/src/glsl/ir_rvalue_visitor.cpp b/dll/opengl/mesa/src/glsl/ir_rvalue_visitor.cpp deleted file mode 100644 index 193bcd2d7bd..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_rvalue_visitor.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file ir_rvalue_visitor.cpp - * - * Generic class to implement the common pattern we have of wanting to - * visit each ir_rvalue * and possibly change that node to a different - * class. - */ - -#include "ir.h" -#include "ir_visitor.h" -#include "ir_rvalue_visitor.h" -#include "ir_print_visitor.h" -#include "glsl_types.h" - -ir_visitor_status -ir_rvalue_visitor::visit_leave(ir_expression *ir) -{ - unsigned int operand; - - for (operand = 0; operand < ir->get_num_operands(); operand++) { - handle_rvalue(&ir->operands[operand]); - } - - return visit_continue; -} - -ir_visitor_status -ir_rvalue_visitor::visit_leave(ir_texture *ir) -{ - handle_rvalue(&ir->coordinate); - handle_rvalue(&ir->projector); - handle_rvalue(&ir->shadow_comparitor); - handle_rvalue(&ir->offset); - - switch (ir->op) { - case ir_tex: - break; - case ir_txb: - handle_rvalue(&ir->lod_info.bias); - break; - case ir_txf: - case ir_txl: - case ir_txs: - handle_rvalue(&ir->lod_info.lod); - break; - case ir_txd: - handle_rvalue(&ir->lod_info.grad.dPdx); - handle_rvalue(&ir->lod_info.grad.dPdy); - break; - } - - return visit_continue; -} - -ir_visitor_status -ir_rvalue_visitor::visit_leave(ir_swizzle *ir) -{ - handle_rvalue(&ir->val); - return visit_continue; -} - -ir_visitor_status -ir_rvalue_visitor::visit_leave(ir_dereference_array *ir) -{ - /* The array index is not the target of the assignment, so clear the - * 'in_assignee' flag. Restore it after returning from the array index. - */ - const bool was_in_assignee = this->in_assignee; - this->in_assignee = false; - handle_rvalue(&ir->array_index); - this->in_assignee = was_in_assignee; - - handle_rvalue(&ir->array); - return visit_continue; -} - -ir_visitor_status -ir_rvalue_visitor::visit_leave(ir_dereference_record *ir) -{ - handle_rvalue(&ir->record); - return visit_continue; -} - -ir_visitor_status -ir_rvalue_visitor::visit_leave(ir_assignment *ir) -{ - handle_rvalue(&ir->rhs); - handle_rvalue(&ir->condition); - - return visit_continue; -} - -ir_visitor_status -ir_rvalue_visitor::visit_leave(ir_call *ir) -{ - foreach_iter(exec_list_iterator, iter, *ir) { - ir_rvalue *param = (ir_rvalue *)iter.get(); - ir_rvalue *new_param = param; - handle_rvalue(&new_param); - - if (new_param != param) { - param->replace_with(new_param); - } - } - return visit_continue; -} - -ir_visitor_status -ir_rvalue_visitor::visit_leave(ir_return *ir) -{ - handle_rvalue(&ir->value);; - return visit_continue; -} - -ir_visitor_status -ir_rvalue_visitor::visit_leave(ir_if *ir) -{ - handle_rvalue(&ir->condition); - return visit_continue; -} diff --git a/dll/opengl/mesa/src/glsl/ir_rvalue_visitor.h b/dll/opengl/mesa/src/glsl/ir_rvalue_visitor.h deleted file mode 100644 index 31a56beb9b8..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_rvalue_visitor.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file ir_rvalue_visitor.h - * - * Generic class to implement the common pattern we have of wanting to - * visit each ir_rvalue * and possibly change that node to a different - * class. Just implement handle_rvalue() and you will be called with - * a pointer to each rvalue in the tree. - */ - -class ir_rvalue_visitor : public ir_hierarchical_visitor { -public: - - virtual ir_visitor_status visit_leave(ir_assignment *); - virtual ir_visitor_status visit_leave(ir_call *); - virtual ir_visitor_status visit_leave(ir_dereference_array *); - virtual ir_visitor_status visit_leave(ir_dereference_record *); - virtual ir_visitor_status visit_leave(ir_expression *); - virtual ir_visitor_status visit_leave(ir_if *); - virtual ir_visitor_status visit_leave(ir_return *); - virtual ir_visitor_status visit_leave(ir_swizzle *); - virtual ir_visitor_status visit_leave(ir_texture *); - - virtual void handle_rvalue(ir_rvalue **rvalue) = 0; -}; diff --git a/dll/opengl/mesa/src/glsl/ir_set_program_inouts.cpp b/dll/opengl/mesa/src/glsl/ir_set_program_inouts.cpp deleted file mode 100644 index 8c2bc30d614..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_set_program_inouts.cpp +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file ir_set_program_inouts.cpp - * - * Sets the InputsRead and OutputsWritten of Mesa programs. - * - * Additionally, for fragment shaders, sets the InterpQualifier array. - * - * Mesa programs (gl_program, not gl_shader_program) have a set of - * flags indicating which varyings are read and written. Computing - * which are actually read from some sort of backend code can be - * tricky when variable array indexing involved. So this pass - * provides support for setting InputsRead and OutputsWritten right - * from the GLSL IR. - */ - -#include "main/core.h" /* for struct gl_program */ -#include "program/hash_table.h" -#include "ir.h" -#include "ir_visitor.h" -#include "glsl_types.h" - -class ir_set_program_inouts_visitor : public ir_hierarchical_visitor { -public: - ir_set_program_inouts_visitor(struct gl_program *prog, - bool is_fragment_shader) - { - this->prog = prog; - this->is_fragment_shader = is_fragment_shader; - this->ht = hash_table_ctor(0, - hash_table_pointer_hash, - hash_table_pointer_compare); - } - ~ir_set_program_inouts_visitor() - { - hash_table_dtor(this->ht); - } - - virtual ir_visitor_status visit_enter(ir_dereference_array *); - virtual ir_visitor_status visit_enter(ir_function_signature *); - virtual ir_visitor_status visit(ir_dereference_variable *); - virtual ir_visitor_status visit(ir_variable *); - - struct gl_program *prog; - struct hash_table *ht; - bool is_fragment_shader; -}; - -static void -mark(struct gl_program *prog, ir_variable *var, int offset, int len, - bool is_fragment_shader) -{ - /* As of GLSL 1.20, varyings can only be floats, floating-point - * vectors or matrices, or arrays of them. For Mesa programs using - * InputsRead/OutputsWritten, everything but matrices uses one - * slot, while matrices use a slot per column. Presumably - * something doing a more clever packing would use something other - * than InputsRead/OutputsWritten. - */ - - for (int i = 0; i < len; i++) { - GLbitfield64 bitfield = BITFIELD64_BIT(var->location + offset + i); - if (var->mode == ir_var_in) { - prog->InputsRead |= bitfield; - if (is_fragment_shader) { - gl_fragment_program *fprog = (gl_fragment_program *) prog; - fprog->InterpQualifier[var->location + offset + i] = - (glsl_interp_qualifier) var->interpolation; - } - } else if (var->mode == ir_var_system_value) { - prog->SystemValuesRead |= bitfield; - } else { - prog->OutputsWritten |= bitfield; - } - } -} - -/* Default handler: Mark all the locations in the variable as used. */ -ir_visitor_status -ir_set_program_inouts_visitor::visit(ir_dereference_variable *ir) -{ - if (hash_table_find(this->ht, ir->var) == NULL) - return visit_continue; - - if (ir->type->is_array()) { - mark(this->prog, ir->var, 0, - ir->type->length * ir->type->fields.array->matrix_columns, - this->is_fragment_shader); - } else { - mark(this->prog, ir->var, 0, ir->type->matrix_columns, - this->is_fragment_shader); - } - - return visit_continue; -} - -ir_visitor_status -ir_set_program_inouts_visitor::visit_enter(ir_dereference_array *ir) -{ - ir_dereference_variable *deref_var; - ir_constant *index = ir->array_index->as_constant(); - deref_var = ir->array->as_dereference_variable(); - ir_variable *var = NULL; - - /* Check that we're dereferencing a shader in or out */ - if (deref_var) - var = (ir_variable *)hash_table_find(this->ht, deref_var->var); - - if (index && var) { - int width = 1; - - if (deref_var->type->is_array() && - deref_var->type->fields.array->is_matrix()) { - width = deref_var->type->fields.array->matrix_columns; - } - - mark(this->prog, var, index->value.i[0] * width, width, - this->is_fragment_shader); - return visit_continue_with_parent; - } - - return visit_continue; -} - -ir_visitor_status -ir_set_program_inouts_visitor::visit(ir_variable *ir) -{ - if (ir->mode == ir_var_in || - ir->mode == ir_var_out || - ir->mode == ir_var_system_value) { - hash_table_insert(this->ht, ir, ir); - } - - return visit_continue; -} - -ir_visitor_status -ir_set_program_inouts_visitor::visit_enter(ir_function_signature *ir) -{ - /* We don't want to descend into the function parameters and - * consider them as shader inputs or outputs. - */ - visit_list_elements(this, &ir->body); - return visit_continue_with_parent; -} - -void -do_set_program_inouts(exec_list *instructions, struct gl_program *prog, - bool is_fragment_shader) -{ - ir_set_program_inouts_visitor v(prog, is_fragment_shader); - - prog->InputsRead = 0; - prog->OutputsWritten = 0; - prog->SystemValuesRead = 0; - if (is_fragment_shader) { - memset(((gl_fragment_program *) prog)->InterpQualifier, 0, - sizeof(((gl_fragment_program *) prog)->InterpQualifier)); - } - visit_list_elements(&v, instructions); -} diff --git a/dll/opengl/mesa/src/glsl/ir_uniform.h b/dll/opengl/mesa/src/glsl/ir_uniform.h deleted file mode 100644 index 225da3fc5ef..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_uniform.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright © 2011 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#pragma once -#ifndef IR_UNIFORM_H -#define IR_UNIFORM_H - - -/* stdbool.h is necessary because this file is included in both C and C++ code. - */ -#include - -#include "program/prog_parameter.h" /* For union gl_constant_value. */ - - -#ifdef __cplusplus -extern "C" { -#endif - -enum gl_uniform_driver_format { - uniform_native = 0, /**< Store data in the native format. */ - uniform_int_float, /**< Store integer data as floats. */ - uniform_bool_float, /**< Store boolean data as floats. */ - - /** - * Store boolean data as integer using 1 for \c true. - */ - uniform_bool_int_0_1, - - /** - * Store boolean data as integer using ~0 for \c true. - */ - uniform_bool_int_0_not0 -}; - -struct gl_uniform_driver_storage { - /** - * Number of bytes from one array element to the next. - */ - uint8_t element_stride; - - /** - * Number of bytes from one vector in a matrix to the next. - */ - uint8_t vector_stride; - - /** - * Base format of the stored data. - * - * This field must have a value from \c GLSL_TYPE_UINT through \c - * GLSL_TYPE_SAMPLER. - */ - uint8_t format; - - /** - * Pointer to the base of the data. - */ - void *data; -}; - -struct gl_uniform_storage { - char *name; - const struct glsl_type *type; - - /** - * The number of elements in this uniform. - * - * For non-arrays, this is always 0. For arrays, the value is the size of - * the array. - */ - unsigned array_elements; - - /** - * Has this uniform ever been set? - */ - bool initialized; - - /** - * Base sampler index - * - * If \c ::base_type is \c GLSL_TYPE_SAMPLER, this represents the index of - * this sampler. If \c ::array_elements is not zero, the array will use - * sampler indexes \c ::sampler through \c ::sampler + \c ::array_elements - * - 1, inclusive. - */ - uint8_t sampler; - - /** - * Storage used by the driver for the uniform - */ - unsigned num_driver_storage; - struct gl_uniform_driver_storage *driver_storage; - - /** - * Storage used by Mesa for the uniform - * - * This form of the uniform is used by Mesa's implementation of \c - * glGetUniform. It can also be used by drivers to obtain the value of the - * uniform if the \c ::driver_storage interface is not used. - */ - union gl_constant_value *storage; -}; - -#ifdef __cplusplus -} -#endif - -#endif /* IR_UNIFORM_H */ diff --git a/dll/opengl/mesa/src/glsl/ir_validate.cpp b/dll/opengl/mesa/src/glsl/ir_validate.cpp deleted file mode 100644 index 20a0377d456..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_validate.cpp +++ /dev/null @@ -1,629 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file ir_validate.cpp - * - * Attempts to verify that various invariants of the IR tree are true. - * - * In particular, at the moment it makes sure that no single - * ir_instruction node except for ir_variable appears multiple times - * in the ir tree. ir_variable does appear multiple times: Once as a - * declaration in an exec_list, and multiple times as the endpoint of - * a dereference chain. - */ - -#include "ir.h" -#include "ir_hierarchical_visitor.h" -#include "program/hash_table.h" -#include "glsl_types.h" - -class ir_validate : public ir_hierarchical_visitor { -public: - ir_validate() - { - this->ht = hash_table_ctor(0, hash_table_pointer_hash, - hash_table_pointer_compare); - - this->current_function = NULL; - - this->callback = ir_validate::validate_ir; - this->data = ht; - } - - ~ir_validate() - { - hash_table_dtor(this->ht); - } - - virtual ir_visitor_status visit(ir_variable *v); - virtual ir_visitor_status visit(ir_dereference_variable *ir); - - virtual ir_visitor_status visit_enter(ir_if *ir); - - virtual ir_visitor_status visit_leave(ir_loop *ir); - virtual ir_visitor_status visit_enter(ir_function *ir); - virtual ir_visitor_status visit_leave(ir_function *ir); - virtual ir_visitor_status visit_enter(ir_function_signature *ir); - - virtual ir_visitor_status visit_leave(ir_expression *ir); - virtual ir_visitor_status visit_leave(ir_swizzle *ir); - - virtual ir_visitor_status visit_enter(ir_assignment *ir); - virtual ir_visitor_status visit_enter(ir_call *ir); - - static void validate_ir(ir_instruction *ir, void *data); - - ir_function *current_function; - - struct hash_table *ht; -}; - - -ir_visitor_status -ir_validate::visit(ir_dereference_variable *ir) -{ - if ((ir->var == NULL) || (ir->var->as_variable() == NULL)) { - printf("ir_dereference_variable @ %p does not specify a variable %p\n", - (void *) ir, (void *) ir->var); - abort(); - } - - if (hash_table_find(ht, ir->var) == NULL) { - printf("ir_dereference_variable @ %p specifies undeclared variable " - "`%s' @ %p\n", - (void *) ir, ir->var->name, (void *) ir->var); - abort(); - } - - this->validate_ir(ir, this->data); - - return visit_continue; -} - -ir_visitor_status -ir_validate::visit_enter(ir_if *ir) -{ - if (ir->condition->type != glsl_type::bool_type) { - printf("ir_if condition %s type instead of bool.\n", - ir->condition->type->name); - ir->print(); - printf("\n"); - abort(); - } - - return visit_continue; -} - - -ir_visitor_status -ir_validate::visit_leave(ir_loop *ir) -{ - if (ir->counter != NULL) { - if ((ir->from == NULL) || (ir->from == NULL) || (ir->increment == NULL)) { - printf("ir_loop has invalid loop controls:\n" - " counter: %p\n" - " from: %p\n" - " to: %p\n" - " increment: %p\n", - (void *) ir->counter, (void *) ir->from, (void *) ir->to, - (void *) ir->increment); - abort(); - } - - if ((ir->cmp < ir_binop_less) || (ir->cmp > ir_binop_nequal)) { - printf("ir_loop has invalid comparitor %d\n", ir->cmp); - abort(); - } - } else { - if ((ir->from != NULL) || (ir->from != NULL) || (ir->increment != NULL)) { - printf("ir_loop has invalid loop controls:\n" - " counter: %p\n" - " from: %p\n" - " to: %p\n" - " increment: %p\n", - (void *) ir->counter, (void *) ir->from, (void *) ir->to, - (void *) ir->increment); - abort(); - } - } - - return visit_continue; -} - - -ir_visitor_status -ir_validate::visit_enter(ir_function *ir) -{ - /* Function definitions cannot be nested. - */ - if (this->current_function != NULL) { - printf("Function definition nested inside another function " - "definition:\n"); - printf("%s %p inside %s %p\n", - ir->name, (void *) ir, - this->current_function->name, (void *) this->current_function); - abort(); - } - - /* Store the current function hierarchy being traversed. This is used - * by the function signature visitor to ensure that the signatures are - * linked with the correct functions. - */ - this->current_function = ir; - - this->validate_ir(ir, this->data); - - /* Verify that all of the things stored in the list of signatures are, - * in fact, function signatures. - */ - foreach_list(node, &ir->signatures) { - ir_instruction *sig = (ir_instruction *) node; - - if (sig->ir_type != ir_type_function_signature) { - printf("Non-signature in signature list of function `%s'\n", - ir->name); - abort(); - } - } - - return visit_continue; -} - -ir_visitor_status -ir_validate::visit_leave(ir_function *ir) -{ - assert(ralloc_parent(ir->name) == ir); - - this->current_function = NULL; - return visit_continue; -} - -ir_visitor_status -ir_validate::visit_enter(ir_function_signature *ir) -{ - if (this->current_function != ir->function()) { - printf("Function signature nested inside wrong function " - "definition:\n"); - printf("%p inside %s %p instead of %s %p\n", - (void *) ir, - this->current_function->name, (void *) this->current_function, - ir->function_name(), (void *) ir->function()); - abort(); - } - - if (ir->return_type == NULL) { - printf("Function signature %p for function %s has NULL return type.\n", - (void *) ir, ir->function_name()); - abort(); - } - - this->validate_ir(ir, this->data); - - return visit_continue; -} - -ir_visitor_status -ir_validate::visit_leave(ir_expression *ir) -{ - switch (ir->operation) { - case ir_unop_bit_not: - assert(ir->operands[0]->type == ir->type); - break; - case ir_unop_logic_not: - assert(ir->type->base_type == GLSL_TYPE_BOOL); - assert(ir->operands[0]->type->base_type == GLSL_TYPE_BOOL); - break; - - case ir_unop_neg: - case ir_unop_abs: - case ir_unop_sign: - case ir_unop_rcp: - case ir_unop_rsq: - case ir_unop_sqrt: - assert(ir->type == ir->operands[0]->type); - break; - - case ir_unop_exp: - case ir_unop_log: - case ir_unop_exp2: - case ir_unop_log2: - assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT); - assert(ir->type == ir->operands[0]->type); - break; - - case ir_unop_f2i: - assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT); - assert(ir->type->base_type == GLSL_TYPE_INT); - break; - case ir_unop_i2f: - assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT); - assert(ir->type->base_type == GLSL_TYPE_FLOAT); - break; - case ir_unop_f2b: - assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT); - assert(ir->type->base_type == GLSL_TYPE_BOOL); - break; - case ir_unop_b2f: - assert(ir->operands[0]->type->base_type == GLSL_TYPE_BOOL); - assert(ir->type->base_type == GLSL_TYPE_FLOAT); - break; - case ir_unop_i2b: - assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT); - assert(ir->type->base_type == GLSL_TYPE_BOOL); - break; - case ir_unop_b2i: - assert(ir->operands[0]->type->base_type == GLSL_TYPE_BOOL); - assert(ir->type->base_type == GLSL_TYPE_INT); - break; - case ir_unop_u2f: - assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT); - assert(ir->type->base_type == GLSL_TYPE_FLOAT); - break; - case ir_unop_i2u: - assert(ir->operands[0]->type->base_type == GLSL_TYPE_INT); - assert(ir->type->base_type == GLSL_TYPE_UINT); - break; - case ir_unop_u2i: - assert(ir->operands[0]->type->base_type == GLSL_TYPE_UINT); - assert(ir->type->base_type == GLSL_TYPE_INT); - break; - - case ir_unop_any: - assert(ir->operands[0]->type->base_type == GLSL_TYPE_BOOL); - assert(ir->type == glsl_type::bool_type); - break; - - case ir_unop_trunc: - case ir_unop_round_even: - case ir_unop_ceil: - case ir_unop_floor: - case ir_unop_fract: - case ir_unop_sin: - case ir_unop_cos: - case ir_unop_sin_reduced: - case ir_unop_cos_reduced: - case ir_unop_dFdx: - case ir_unop_dFdy: - assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT); - assert(ir->operands[0]->type == ir->type); - break; - - case ir_unop_noise: - /* XXX what can we assert here? */ - break; - - case ir_binop_add: - case ir_binop_sub: - case ir_binop_mul: - case ir_binop_div: - case ir_binop_mod: - case ir_binop_min: - case ir_binop_max: - case ir_binop_pow: - if (ir->operands[0]->type->is_scalar()) - assert(ir->operands[1]->type == ir->type); - else if (ir->operands[1]->type->is_scalar()) - assert(ir->operands[0]->type == ir->type); - else if (ir->operands[0]->type->is_vector() && - ir->operands[1]->type->is_vector()) { - assert(ir->operands[0]->type == ir->operands[1]->type); - assert(ir->operands[0]->type == ir->type); - } - break; - - case ir_binop_less: - case ir_binop_greater: - case ir_binop_lequal: - case ir_binop_gequal: - case ir_binop_equal: - case ir_binop_nequal: - /* The semantics of the IR operators differ from the GLSL <, >, <=, >=, - * ==, and != operators. The IR operators perform a component-wise - * comparison on scalar or vector types and return a boolean scalar or - * vector type of the same size. - */ - assert(ir->type->base_type == GLSL_TYPE_BOOL); - assert(ir->operands[0]->type == ir->operands[1]->type); - assert(ir->operands[0]->type->is_vector() - || ir->operands[0]->type->is_scalar()); - assert(ir->operands[0]->type->vector_elements - == ir->type->vector_elements); - break; - - case ir_binop_all_equal: - case ir_binop_any_nequal: - /* GLSL == and != operate on scalars, vectors, matrices and arrays, and - * return a scalar boolean. The IR matches that. - */ - assert(ir->type == glsl_type::bool_type); - assert(ir->operands[0]->type == ir->operands[1]->type); - break; - - case ir_binop_lshift: - case ir_binop_rshift: - assert(ir->operands[0]->type->is_integer() && - ir->operands[1]->type->is_integer()); - if (ir->operands[0]->type->is_scalar()) { - assert(ir->operands[1]->type->is_scalar()); - } - if (ir->operands[0]->type->is_vector() && - ir->operands[1]->type->is_vector()) { - assert(ir->operands[0]->type->components() == - ir->operands[1]->type->components()); - } - assert(ir->type == ir->operands[0]->type); - break; - - case ir_binop_bit_and: - case ir_binop_bit_xor: - case ir_binop_bit_or: - assert(ir->operands[0]->type->base_type == - ir->operands[1]->type->base_type); - assert(ir->type->is_integer()); - if (ir->operands[0]->type->is_vector() && - ir->operands[1]->type->is_vector()) { - assert(ir->operands[0]->type->vector_elements == - ir->operands[1]->type->vector_elements); - } - break; - - case ir_binop_logic_and: - case ir_binop_logic_xor: - case ir_binop_logic_or: - assert(ir->type == glsl_type::bool_type); - assert(ir->operands[0]->type == glsl_type::bool_type); - assert(ir->operands[1]->type == glsl_type::bool_type); - break; - - case ir_binop_dot: - assert(ir->type == glsl_type::float_type); - assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT); - assert(ir->operands[0]->type->is_vector()); - assert(ir->operands[0]->type == ir->operands[1]->type); - break; - - case ir_quadop_vector: - /* The vector operator collects some number of scalars and generates a - * vector from them. - * - * - All of the operands must be scalar. - * - Number of operands must matche the size of the resulting vector. - * - Base type of the operands must match the base type of the result. - */ - assert(ir->type->is_vector()); - switch (ir->type->vector_elements) { - case 2: - assert(ir->operands[0]->type->is_scalar()); - assert(ir->operands[0]->type->base_type == ir->type->base_type); - assert(ir->operands[1]->type->is_scalar()); - assert(ir->operands[1]->type->base_type == ir->type->base_type); - assert(ir->operands[2] == NULL); - assert(ir->operands[3] == NULL); - break; - case 3: - assert(ir->operands[0]->type->is_scalar()); - assert(ir->operands[0]->type->base_type == ir->type->base_type); - assert(ir->operands[1]->type->is_scalar()); - assert(ir->operands[1]->type->base_type == ir->type->base_type); - assert(ir->operands[2]->type->is_scalar()); - assert(ir->operands[2]->type->base_type == ir->type->base_type); - assert(ir->operands[3] == NULL); - break; - case 4: - assert(ir->operands[0]->type->is_scalar()); - assert(ir->operands[0]->type->base_type == ir->type->base_type); - assert(ir->operands[1]->type->is_scalar()); - assert(ir->operands[1]->type->base_type == ir->type->base_type); - assert(ir->operands[2]->type->is_scalar()); - assert(ir->operands[2]->type->base_type == ir->type->base_type); - assert(ir->operands[3]->type->is_scalar()); - assert(ir->operands[3]->type->base_type == ir->type->base_type); - break; - default: - /* The is_vector assertion above should prevent execution from ever - * getting here. - */ - assert(!"Should not get here."); - break; - } - } - - return visit_continue; -} - -ir_visitor_status -ir_validate::visit_leave(ir_swizzle *ir) -{ - int chans[4] = {ir->mask.x, ir->mask.y, ir->mask.z, ir->mask.w}; - - for (unsigned int i = 0; i < ir->type->vector_elements; i++) { - if (chans[i] >= ir->val->type->vector_elements) { - printf("ir_swizzle @ %p specifies a channel not present " - "in the value.\n", (void *) ir); - ir->print(); - abort(); - } - } - - return visit_continue; -} - -ir_visitor_status -ir_validate::visit(ir_variable *ir) -{ - /* An ir_variable is the one thing that can (and will) appear multiple times - * in an IR tree. It is added to the hashtable so that it can be used - * in the ir_dereference_variable handler to ensure that a variable is - * declared before it is dereferenced. - */ - if (ir->name) - assert(ralloc_parent(ir->name) == ir); - - hash_table_insert(ht, ir, ir); - - - /* If a variable is an array, verify that the maximum array index is in - * bounds. There was once an error in AST-to-HIR conversion that set this - * to be out of bounds. - */ - if (ir->type->array_size() > 0) { - if (ir->max_array_access >= ir->type->length) { - printf("ir_variable has maximum access out of bounds (%d vs %d)\n", - ir->max_array_access, ir->type->length - 1); - ir->print(); - abort(); - } - } - - if (ir->constant_initializer != NULL && !ir->has_initializer) { - printf("ir_variable didn't have an initializer, but has a constant " - "initializer value.\n"); - ir->print(); - abort(); - } - - return visit_continue; -} - -ir_visitor_status -ir_validate::visit_enter(ir_assignment *ir) -{ - const ir_dereference *const lhs = ir->lhs; - if (lhs->type->is_scalar() || lhs->type->is_vector()) { - if (ir->write_mask == 0) { - printf("Assignment LHS is %s, but write mask is 0:\n", - lhs->type->is_scalar() ? "scalar" : "vector"); - ir->print(); - abort(); - } - - int lhs_components = 0; - for (int i = 0; i < 4; i++) { - if (ir->write_mask & (1 << i)) - lhs_components++; - } - - if (lhs_components != ir->rhs->type->vector_elements) { - printf("Assignment count of LHS write mask channels enabled not\n" - "matching RHS vector size (%d LHS, %d RHS).\n", - lhs_components, ir->rhs->type->vector_elements); - ir->print(); - abort(); - } - } - - this->validate_ir(ir, this->data); - - return visit_continue; -} - -ir_visitor_status -ir_validate::visit_enter(ir_call *ir) -{ - ir_function_signature *const callee = ir->get_callee(); - - if (callee->ir_type != ir_type_function_signature) { - printf("IR called by ir_call is not ir_function_signature!\n"); - abort(); - } - - const exec_node *formal_param_node = callee->parameters.head; - const exec_node *actual_param_node = ir->actual_parameters.head; - while (true) { - if (formal_param_node->is_tail_sentinel() - != actual_param_node->is_tail_sentinel()) { - printf("ir_call has the wrong number of parameters:\n"); - goto dump_ir; - } - if (formal_param_node->is_tail_sentinel()) { - break; - } - const ir_variable *formal_param - = (const ir_variable *) formal_param_node; - const ir_rvalue *actual_param - = (const ir_rvalue *) actual_param_node; - if (formal_param->type != actual_param->type) { - printf("ir_call parameter type mismatch:\n"); - goto dump_ir; - } - if (formal_param->mode == ir_var_out - || formal_param->mode == ir_var_inout) { - if (!actual_param->is_lvalue()) { - printf("ir_call out/inout parameters must be lvalues:\n"); - goto dump_ir; - } - } - formal_param_node = formal_param_node->next; - actual_param_node = actual_param_node->next; - } - - return visit_continue; - -dump_ir: - ir->print(); - printf("callee:\n"); - callee->print(); - abort(); - return visit_stop; -} - -void -ir_validate::validate_ir(ir_instruction *ir, void *data) -{ - struct hash_table *ht = (struct hash_table *) data; - - if (hash_table_find(ht, ir)) { - printf("Instruction node present twice in ir tree:\n"); - ir->print(); - printf("\n"); - abort(); - } - hash_table_insert(ht, ir, ir); -} - -void -check_node_type(ir_instruction *ir, void *data) -{ - (void) data; - - if (ir->ir_type <= ir_type_unset || ir->ir_type >= ir_type_max) { - printf("Instruction node with unset type\n"); - ir->print(); printf("\n"); - } - assert(ir->type != glsl_type::error_type); -} - -void -validate_ir_tree(exec_list *instructions) -{ - ir_validate v; - - v.run(instructions); - - foreach_iter(exec_list_iterator, iter, *instructions) { - ir_instruction *ir = (ir_instruction *)iter.get(); - - visit_tree(ir, check_node_type, NULL); - } -} diff --git a/dll/opengl/mesa/src/glsl/ir_variable_refcount.cpp b/dll/opengl/mesa/src/glsl/ir_variable_refcount.cpp deleted file mode 100644 index 7d39abb3682..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_variable_refcount.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file ir_variable_refcount.cpp - * - * Provides a visitor which produces a list of variables referenced, - * how many times they were referenced and assigned, and whether they - * were defined in the scope. - */ - -#include "ir.h" -#include "ir_visitor.h" -#include "ir_variable_refcount.h" -#include "glsl_types.h" - - -// constructor -variable_entry::variable_entry(ir_variable *var) -{ - this->var = var; - assign = NULL; - assigned_count = 0; - declaration = false; - referenced_count = 0; -} - - -variable_entry * -ir_variable_refcount_visitor::get_variable_entry(ir_variable *var) -{ - assert(var); - foreach_iter(exec_list_iterator, iter, this->variable_list) { - variable_entry *entry = (variable_entry *)iter.get(); - if (entry->var == var) - return entry; - } - - variable_entry *entry = new(mem_ctx) variable_entry(var); - assert(entry->referenced_count == 0); - this->variable_list.push_tail(entry); - return entry; -} - - -ir_visitor_status -ir_variable_refcount_visitor::visit(ir_variable *ir) -{ - variable_entry *entry = this->get_variable_entry(ir); - if (entry) - entry->declaration = true; - - return visit_continue; -} - - -ir_visitor_status -ir_variable_refcount_visitor::visit(ir_dereference_variable *ir) -{ - ir_variable *const var = ir->variable_referenced(); - variable_entry *entry = this->get_variable_entry(var); - - if (entry) - entry->referenced_count++; - - return visit_continue; -} - - -ir_visitor_status -ir_variable_refcount_visitor::visit_enter(ir_function_signature *ir) -{ - /* We don't want to descend into the function parameters and - * dead-code eliminate them, so just accept the body here. - */ - visit_list_elements(this, &ir->body); - return visit_continue_with_parent; -} - - -ir_visitor_status -ir_variable_refcount_visitor::visit_leave(ir_assignment *ir) -{ - variable_entry *entry; - entry = this->get_variable_entry(ir->lhs->variable_referenced()); - if (entry) { - entry->assigned_count++; - if (entry->assign == NULL) - entry->assign = ir; - } - - return visit_continue; -} diff --git a/dll/opengl/mesa/src/glsl/ir_variable_refcount.h b/dll/opengl/mesa/src/glsl/ir_variable_refcount.h deleted file mode 100644 index 906135a9e1e..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_variable_refcount.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file ir_variable_refcount.h - * - * Provides a visitor which produces a list of variables referenced, - * how many times they were referenced and assigned, and whether they - * were defined in the scope. - */ - -#include "ir.h" -#include "ir_visitor.h" -#include "glsl_types.h" - -class variable_entry : public exec_node -{ -public: - variable_entry(ir_variable *var); - - ir_variable *var; /* The key: the variable's pointer. */ - ir_assignment *assign; /* An assignment to the variable, if any */ - - /** Number of times the variable is referenced, including assignments. */ - unsigned referenced_count; - - /** Number of times the variable is assigned. */ - unsigned assigned_count; - - bool declaration; /* If the variable had a decl in the instruction stream */ -}; - -class ir_variable_refcount_visitor : public ir_hierarchical_visitor { -public: - ir_variable_refcount_visitor(void) - { - this->mem_ctx = ralloc_context(NULL); - this->variable_list.make_empty(); - } - - ~ir_variable_refcount_visitor(void) - { - ralloc_free(this->mem_ctx); - } - - virtual ir_visitor_status visit(ir_variable *); - virtual ir_visitor_status visit(ir_dereference_variable *); - - virtual ir_visitor_status visit_enter(ir_function_signature *); - virtual ir_visitor_status visit_leave(ir_assignment *); - - variable_entry *get_variable_entry(ir_variable *var); - - /* List of variable_entry */ - exec_list variable_list; - - void *mem_ctx; -}; diff --git a/dll/opengl/mesa/src/glsl/ir_visitor.h b/dll/opengl/mesa/src/glsl/ir_visitor.h deleted file mode 100644 index 7dd35fe1dc3..00000000000 --- a/dll/opengl/mesa/src/glsl/ir_visitor.h +++ /dev/null @@ -1,84 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#pragma once -#ifndef IR_VISITOR_H -#define IR_VISITOR_H - -/** - * Abstract base class of visitors of IR instruction trees - */ -class ir_visitor { -public: - virtual ~ir_visitor() - { - /* empty */ - } - - /** - * \name Visit methods - * - * As typical for the visitor pattern, there must be one \c visit method for - * each concrete subclass of \c ir_instruction. Virtual base classes within - * the hierarchy should not have \c visit methods. - */ - /*@{*/ - virtual void visit(class ir_variable *) = 0; - virtual void visit(class ir_function_signature *) = 0; - virtual void visit(class ir_function *) = 0; - virtual void visit(class ir_expression *) = 0; - virtual void visit(class ir_texture *) = 0; - virtual void visit(class ir_swizzle *) = 0; - virtual void visit(class ir_dereference_variable *) = 0; - virtual void visit(class ir_dereference_array *) = 0; - virtual void visit(class ir_dereference_record *) = 0; - virtual void visit(class ir_assignment *) = 0; - virtual void visit(class ir_constant *) = 0; - virtual void visit(class ir_call *) = 0; - virtual void visit(class ir_return *) = 0; - virtual void visit(class ir_discard *) = 0; - virtual void visit(class ir_if *) = 0; - virtual void visit(class ir_loop *) = 0; - virtual void visit(class ir_loop_jump *) = 0; - /*@}*/ -}; - -/* NOTE: function calls may never return due to discards inside them - * This is usually not an issue, but if it is, keep it in mind - */ -class ir_control_flow_visitor : public ir_visitor { -public: - virtual void visit(class ir_variable *) {} - virtual void visit(class ir_expression *) {} - virtual void visit(class ir_texture *) {} - virtual void visit(class ir_swizzle *) {} - virtual void visit(class ir_dereference_variable *) {} - virtual void visit(class ir_dereference_array *) {} - virtual void visit(class ir_dereference_record *) {} - virtual void visit(class ir_assignment *) {} - virtual void visit(class ir_constant *) {} - virtual void visit(class ir_call *) {} -}; - -#endif /* IR_VISITOR_H */ diff --git a/dll/opengl/mesa/src/glsl/link_functions.cpp b/dll/opengl/mesa/src/glsl/link_functions.cpp deleted file mode 100644 index acee3271249..00000000000 --- a/dll/opengl/mesa/src/glsl/link_functions.cpp +++ /dev/null @@ -1,286 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "main/core.h" -#include "glsl_symbol_table.h" -#include "glsl_parser_extras.h" -#include "ir.h" -#include "program.h" -#include "program/hash_table.h" -#include "linker.h" - -static ir_function_signature * -find_matching_signature(const char *name, const exec_list *actual_parameters, - gl_shader **shader_list, unsigned num_shaders, - bool use_builtin); - -class call_link_visitor : public ir_hierarchical_visitor { -public: - call_link_visitor(gl_shader_program *prog, gl_shader *linked, - gl_shader **shader_list, unsigned num_shaders) - { - this->prog = prog; - this->shader_list = shader_list; - this->num_shaders = num_shaders; - this->success = true; - this->linked = linked; - - this->locals = hash_table_ctor(0, hash_table_pointer_hash, - hash_table_pointer_compare); - } - - ~call_link_visitor() - { - hash_table_dtor(this->locals); - } - - virtual ir_visitor_status visit(ir_variable *ir) - { - hash_table_insert(locals, ir, ir); - return visit_continue; - } - - virtual ir_visitor_status visit_enter(ir_call *ir) - { - /* If ir is an ir_call from a function that was imported from another - * shader callee will point to an ir_function_signature in the original - * shader. In this case the function signature MUST NOT BE MODIFIED. - * Doing so will modify the original shader. This may prevent that - * shader from being linkable in other programs. - */ - const ir_function_signature *const callee = ir->get_callee(); - assert(callee != NULL); - const char *const name = callee->function_name(); - - /* Determine if the requested function signature already exists in the - * final linked shader. If it does, use it as the target of the call. - */ - ir_function_signature *sig = - find_matching_signature(name, &callee->parameters, &linked, 1, - ir->use_builtin); - if (sig != NULL) { - ir->set_callee(sig); - return visit_continue; - } - - /* Try to find the signature in one of the other shaders that is being - * linked. If it's not found there, return an error. - */ - sig = find_matching_signature(name, &ir->actual_parameters, shader_list, - num_shaders, ir->use_builtin); - if (sig == NULL) { - /* FINISHME: Log the full signature of unresolved function. - */ - linker_error(this->prog, "unresolved reference to function `%s'\n", - name); - this->success = false; - return visit_stop; - } - - /* Find the prototype information in the linked shader. Generate any - * details that may be missing. - */ - ir_function *f = linked->symbols->get_function(name); - if (f == NULL) { - f = new(linked) ir_function(name); - - /* Add the new function to the linked IR. Put it at the end - * so that it comes after any global variable declarations - * that it refers to. - */ - linked->symbols->add_function(f); - linked->ir->push_tail(f); - } - - ir_function_signature *linked_sig = - f->exact_matching_signature(&callee->parameters); - if ((linked_sig == NULL) - || ((linked_sig != NULL) - && (linked_sig->is_builtin != ir->use_builtin))) { - linked_sig = new(linked) ir_function_signature(callee->return_type); - f->add_signature(linked_sig); - } - - /* At this point linked_sig and called may be the same. If ir is an - * ir_call from linked then linked_sig and callee will be - * ir_function_signatures that have no definitions (is_defined is false). - */ - assert(!linked_sig->is_defined); - assert(linked_sig->body.is_empty()); - - /* Create an in-place clone of the function definition. This multistep - * process introduces some complexity here, but it has some advantages. - * The parameter list and the and function body are cloned separately. - * The clone of the parameter list is used to prime the hashtable used - * to replace variable references in the cloned body. - * - * The big advantage is that the ir_function_signature does not change. - * This means that we don't have to process the rest of the IR tree to - * patch ir_call nodes. In addition, there is no way to remove or - * replace signature stored in a function. One could easily be added, - * but this avoids the need. - */ - struct hash_table *ht = hash_table_ctor(0, hash_table_pointer_hash, - hash_table_pointer_compare); - exec_list formal_parameters; - foreach_list_const(node, &sig->parameters) { - const ir_instruction *const original = (ir_instruction *) node; - assert(const_cast(original)->as_variable()); - - ir_instruction *copy = original->clone(linked, ht); - formal_parameters.push_tail(copy); - } - - linked_sig->replace_parameters(&formal_parameters); - - foreach_list_const(node, &sig->body) { - const ir_instruction *const original = (ir_instruction *) node; - - ir_instruction *copy = original->clone(linked, ht); - linked_sig->body.push_tail(copy); - } - - linked_sig->is_defined = true; - hash_table_dtor(ht); - - /* Patch references inside the function to things outside the function - * (i.e., function calls and global variables). - */ - linked_sig->accept(this); - - ir->set_callee(linked_sig); - - return visit_continue; - } - - virtual ir_visitor_status visit(ir_dereference_variable *ir) - { - if (hash_table_find(locals, ir->var) == NULL) { - /* The non-function variable must be a global, so try to find the - * variable in the shader's symbol table. If the variable is not - * found, then it's a global that *MUST* be defined in the original - * shader. - */ - ir_variable *var = linked->symbols->get_variable(ir->var->name); - if (var == NULL) { - /* Clone the ir_variable that the dereference already has and add - * it to the linked shader. - */ - var = ir->var->clone(linked, NULL); - linked->symbols->add_variable(var); - linked->ir->push_head(var); - } else if (var->type->is_array()) { - /* It is possible to have a global array declared in multiple - * shaders without a size. The array is implicitly sized by the - * maximal access to it in *any* shader. Because of this, we - * need to track the maximal access to the array as linking pulls - * more functions in that access the array. - */ - var->max_array_access = - MAX2(var->max_array_access, ir->var->max_array_access); - - if (var->type->length == 0 && ir->var->type->length != 0) - var->type = ir->var->type; - } - - ir->var = var; - } - - return visit_continue; - } - - /** Was function linking successful? */ - bool success; - -private: - /** - * Shader program being linked - * - * This is only used for logging error messages. - */ - gl_shader_program *prog; - - /** List of shaders available for linking. */ - gl_shader **shader_list; - - /** Number of shaders available for linking. */ - unsigned num_shaders; - - /** - * Final linked shader - * - * This is used two ways. It is used to find global variables in the - * linked shader that are accessed by the function. It is also used to add - * global variables from the shader where the function originated. - */ - gl_shader *linked; - - /** - * Table of variables local to the function. - */ - hash_table *locals; -}; - - -/** - * Searches a list of shaders for a particular function definition - */ -ir_function_signature * -find_matching_signature(const char *name, const exec_list *actual_parameters, - gl_shader **shader_list, unsigned num_shaders, - bool use_builtin) -{ - for (unsigned i = 0; i < num_shaders; i++) { - ir_function *const f = shader_list[i]->symbols->get_function(name); - - if (f == NULL) - continue; - - ir_function_signature *sig = f->matching_signature(actual_parameters); - - if ((sig == NULL) || !sig->is_defined) - continue; - - /* If this function expects to bind to a built-in function and the - * signature that we found isn't a built-in, keep looking. Also keep - * looking if we expect a non-built-in but found a built-in. - */ - if (use_builtin != sig->is_builtin) - continue; - - return sig; - } - - return NULL; -} - - -bool -link_function_calls(gl_shader_program *prog, gl_shader *main, - gl_shader **shader_list, unsigned num_shaders) -{ - call_link_visitor v(prog, main, shader_list, num_shaders); - - v.run(main->ir); - return v.success; -} diff --git a/dll/opengl/mesa/src/glsl/link_uniforms.cpp b/dll/opengl/mesa/src/glsl/link_uniforms.cpp deleted file mode 100644 index 588008a8b48..00000000000 --- a/dll/opengl/mesa/src/glsl/link_uniforms.cpp +++ /dev/null @@ -1,431 +0,0 @@ -/* - * Copyright © 2011 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "main/core.h" -#include "ir.h" -#include "linker.h" -#include "ir_uniform.h" -#include "glsl_symbol_table.h" -#include "program/hash_table.h" - -/** - * \file link_uniforms.cpp - * Assign locations for GLSL uniforms. - * - * \author Ian Romanick - */ - -/** - * Count the backing storage requirements for a type - */ -static unsigned -values_for_type(const glsl_type *type) -{ - if (type->is_sampler()) { - return 1; - } else if (type->is_array() && type->fields.array->is_sampler()) { - return type->array_size(); - } else { - return type->component_slots(); - } -} - -void -uniform_field_visitor::process(ir_variable *var) -{ - const glsl_type *t = var->type; - - /* Only strdup the name if we actually will need to modify it. */ - if (t->is_record() || (t->is_array() && t->fields.array->is_record())) { - char *name = ralloc_strdup(NULL, var->name); - recursion(var->type, &name, strlen(name)); - ralloc_free(name); - } else { - this->visit_field(t, var->name); - } -} - -void -uniform_field_visitor::recursion(const glsl_type *t, char **name, - unsigned name_length) -{ - /* Records need to have each field processed individually. - * - * Arrays of records need to have each array element processed - * individually, then each field of the resulting array elements processed - * individually. - */ - if (t->is_record()) { - for (unsigned i = 0; i < t->length; i++) { - const char *field = t->fields.structure[i].name; - - /* Append '.field' to the current uniform name. */ - ralloc_asprintf_rewrite_tail(name, name_length, ".%s", field); - - recursion(t->fields.structure[i].type, name, - name_length + 1 + strlen(field)); - } - } else if (t->is_array() && t->fields.array->is_record()) { - for (unsigned i = 0; i < t->length; i++) { - char subscript[13]; - - /* Append the subscript to the current uniform name */ - const unsigned subscript_length = snprintf(subscript, 13, "[%u]", i); - ralloc_asprintf_rewrite_tail(name, name_length, "%s", subscript); - - recursion(t->fields.array, name, name_length + subscript_length); - } - } else { - this->visit_field(t, *name); - } -} - -/** - * Class to help calculate the storage requirements for a set of uniforms - * - * As uniforms are added to the active set the number of active uniforms and - * the storage requirements for those uniforms are accumulated. The active - * uniforms are added the the hash table supplied to the constructor. - * - * If the same uniform is added multiple times (i.e., once for each shader - * target), it will only be accounted once. - */ -class count_uniform_size : public uniform_field_visitor { -public: - count_uniform_size(struct string_to_uint_map *map) - : num_active_uniforms(0), num_values(0), num_shader_samplers(0), - num_shader_uniform_components(0), map(map) - { - /* empty */ - } - - void start_shader() - { - this->num_shader_samplers = 0; - this->num_shader_uniform_components = 0; - } - - /** - * Total number of active uniforms counted - */ - unsigned num_active_uniforms; - - /** - * Number of data values required to back the storage for the active uniforms - */ - unsigned num_values; - - /** - * Number of samplers used - */ - unsigned num_shader_samplers; - - /** - * Number of uniforms used in the current shader - */ - unsigned num_shader_uniform_components; - -private: - virtual void visit_field(const glsl_type *type, const char *name) - { - assert(!type->is_record()); - assert(!(type->is_array() && type->fields.array->is_record())); - - /* Count the number of samplers regardless of whether the uniform is - * already in the hash table. The hash table prevents adding the same - * uniform for multiple shader targets, but in this case we want to - * count it for each shader target. - */ - const unsigned values = values_for_type(type); - if (type->contains_sampler()) { - this->num_shader_samplers += - type->is_array() ? type->array_size() : 1; - } else { - /* Accumulate the total number of uniform slots used by this shader. - * Note that samplers do not count against this limit because they - * don't use any storage on current hardware. - */ - this->num_shader_uniform_components += values; - } - - /* If the uniform is already in the map, there's nothing more to do. - */ - unsigned id; - if (this->map->get(id, name)) - return; - - this->map->put(this->num_active_uniforms, name); - - /* Each leaf uniform occupies one entry in the list of active - * uniforms. - */ - this->num_active_uniforms++; - this->num_values += values; - } - - struct string_to_uint_map *map; -}; - -/** - * Class to help parcel out pieces of backing storage to uniforms - * - * Each uniform processed has some range of the \c gl_constant_value - * structures associated with it. The association is done by finding - * the uniform in the \c string_to_uint_map and using the value from - * the map to connect that slot in the \c gl_uniform_storage table - * with the next available slot in the \c gl_constant_value array. - * - * \warning - * This class assumes that every uniform that will be processed is - * already in the \c string_to_uint_map. In addition, it assumes that - * the \c gl_uniform_storage and \c gl_constant_value arrays are "big - * enough." - */ -class parcel_out_uniform_storage : public uniform_field_visitor { -public: - parcel_out_uniform_storage(struct string_to_uint_map *map, - struct gl_uniform_storage *uniforms, - union gl_constant_value *values) - : map(map), uniforms(uniforms), next_sampler(0), values(values) - { - memset(this->targets, 0, sizeof(this->targets)); - } - - void start_shader() - { - this->shader_samplers_used = 0; - this->shader_shadow_samplers = 0; - } - -private: - virtual void visit_field(const glsl_type *type, const char *name) - { - assert(!type->is_record()); - assert(!(type->is_array() && type->fields.array->is_record())); - - unsigned id; - bool found = this->map->get(id, name); - assert(found); - - if (!found) - return; - - /* If there is already storage associated with this uniform, it means - * that it was set while processing an earlier shader stage. For - * example, we may be processing the uniform in the fragment shader, but - * the uniform was already processed in the vertex shader. - */ - if (this->uniforms[id].storage != NULL) { - /* If the uniform already has storage set from another shader stage, - * mark the samplers used for this shader stage. - */ - if (type->contains_sampler()) { - const unsigned count = MAX2(1, this->uniforms[id].array_elements); - const unsigned shadow = (type->is_array()) - ? type->fields.array->sampler_shadow : type->sampler_shadow; - - for (unsigned i = 0; i < count; i++) { - const unsigned s = this->uniforms[id].sampler + i; - - this->shader_samplers_used |= 1U << s; - this->shader_shadow_samplers |= shadow << s; - } - } - - return; - } - - const glsl_type *base_type; - if (type->is_array()) { - this->uniforms[id].array_elements = type->length; - base_type = type->fields.array; - } else { - this->uniforms[id].array_elements = 0; - base_type = type; - } - - if (base_type->is_sampler()) { - this->uniforms[id].sampler = this->next_sampler; - - /* Increment the sampler by 1 for non-arrays and by the number of - * array elements for arrays. - */ - this->next_sampler += MAX2(1, this->uniforms[id].array_elements); - - const gl_texture_index target = base_type->sampler_index(); - const unsigned shadow = base_type->sampler_shadow; - for (unsigned i = this->uniforms[id].sampler - ; i < this->next_sampler - ; i++) { - this->targets[i] = target; - this->shader_samplers_used |= 1U << i; - this->shader_shadow_samplers |= shadow << i; - } - - } else { - this->uniforms[id].sampler = ~0; - } - - this->uniforms[id].name = ralloc_strdup(this->uniforms, name); - this->uniforms[id].type = base_type; - this->uniforms[id].initialized = 0; - this->uniforms[id].num_driver_storage = 0; - this->uniforms[id].driver_storage = NULL; - this->uniforms[id].storage = this->values; - - this->values += values_for_type(type); - } - - struct string_to_uint_map *map; - - struct gl_uniform_storage *uniforms; - unsigned next_sampler; - -public: - union gl_constant_value *values; - - gl_texture_index targets[MAX_SAMPLERS]; - - /** - * Mask of samplers used by the current shader stage. - */ - unsigned shader_samplers_used; - - /** - * Mask of samplers used by the current shader stage for shadows. - */ - unsigned shader_shadow_samplers; -}; - -void -link_assign_uniform_locations(struct gl_shader_program *prog) -{ - ralloc_free(prog->UniformStorage); - prog->UniformStorage = NULL; - prog->NumUserUniformStorage = 0; - - if (prog->UniformHash != NULL) { - prog->UniformHash->clear(); - } else { - prog->UniformHash = new string_to_uint_map; - } - - for (unsigned i = 0; i < Elements(prog->SamplerUnits); i++) { - prog->SamplerUnits[i] = i; - } - - /* First pass: Count the uniform resources used by the user-defined - * uniforms. While this happens, each active uniform will have an index - * assigned to it. - * - * Note: this is *NOT* the index that is returned to the application by - * glGetUniformLocation. - */ - count_uniform_size uniform_size(prog->UniformHash); - for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) { - if (prog->_LinkedShaders[i] == NULL) - continue; - - /* Reset various per-shader target counts. - */ - uniform_size.start_shader(); - - foreach_list(node, prog->_LinkedShaders[i]->ir) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); - - if ((var == NULL) || (var->mode != ir_var_uniform)) - continue; - - /* FINISHME: Update code to process built-in uniforms! - */ - if (strncmp("gl_", var->name, 3) == 0) - continue; - - uniform_size.process(var); - } - - prog->_LinkedShaders[i]->num_samplers = uniform_size.num_shader_samplers; - prog->_LinkedShaders[i]->num_uniform_components = - uniform_size.num_shader_uniform_components; - } - - const unsigned num_user_uniforms = uniform_size.num_active_uniforms; - const unsigned num_data_slots = uniform_size.num_values; - - /* On the outside chance that there were no uniforms, bail out. - */ - if (num_user_uniforms == 0) - return; - - struct gl_uniform_storage *uniforms = - rzalloc_array(prog, struct gl_uniform_storage, num_user_uniforms); - union gl_constant_value *data = - rzalloc_array(uniforms, union gl_constant_value, num_data_slots); -#ifndef NDEBUG - union gl_constant_value *data_end = &data[num_data_slots]; -#endif - - parcel_out_uniform_storage parcel(prog->UniformHash, uniforms, data); - - for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) { - if (prog->_LinkedShaders[i] == NULL) - continue; - - /* Reset various per-shader target counts. - */ - parcel.start_shader(); - - foreach_list(node, prog->_LinkedShaders[i]->ir) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); - - if ((var == NULL) || (var->mode != ir_var_uniform)) - continue; - - /* FINISHME: Update code to process built-in uniforms! - */ - if (strncmp("gl_", var->name, 3) == 0) - continue; - - parcel.process(var); - } - - prog->_LinkedShaders[i]->active_samplers = parcel.shader_samplers_used; - prog->_LinkedShaders[i]->shadow_samplers = parcel.shader_shadow_samplers; - } - - assert(sizeof(prog->SamplerTargets) == sizeof(parcel.targets)); - memcpy(prog->SamplerTargets, parcel.targets, sizeof(prog->SamplerTargets)); - -#ifndef NDEBUG - for (unsigned i = 0; i < num_user_uniforms; i++) { - assert(uniforms[i].storage != NULL); - } - - assert(parcel.values == data_end); -#endif - - prog->NumUserUniformStorage = num_user_uniforms; - prog->UniformStorage = uniforms; - - return; -} diff --git a/dll/opengl/mesa/src/glsl/linker.cpp b/dll/opengl/mesa/src/glsl/linker.cpp deleted file mode 100644 index f028ab37d82..00000000000 --- a/dll/opengl/mesa/src/glsl/linker.cpp +++ /dev/null @@ -1,2419 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file linker.cpp - * GLSL linker implementation - * - * Given a set of shaders that are to be linked to generate a final program, - * there are three distinct stages. - * - * In the first stage shaders are partitioned into groups based on the shader - * type. All shaders of a particular type (e.g., vertex shaders) are linked - * together. - * - * - Undefined references in each shader are resolve to definitions in - * another shader. - * - Types and qualifiers of uniforms, outputs, and global variables defined - * in multiple shaders with the same name are verified to be the same. - * - Initializers for uniforms and global variables defined - * in multiple shaders with the same name are verified to be the same. - * - * The result, in the terminology of the GLSL spec, is a set of shader - * executables for each processing unit. - * - * After the first stage is complete, a series of semantic checks are performed - * on each of the shader executables. - * - * - Each shader executable must define a \c main function. - * - Each vertex shader executable must write to \c gl_Position. - * - Each fragment shader executable must write to either \c gl_FragData or - * \c gl_FragColor. - * - * In the final stage individual shader executables are linked to create a - * complete exectuable. - * - * - Types of uniforms defined in multiple shader stages with the same name - * are verified to be the same. - * - Initializers for uniforms defined in multiple shader stages with the - * same name are verified to be the same. - * - Types and qualifiers of outputs defined in one stage are verified to - * be the same as the types and qualifiers of inputs defined with the same - * name in a later stage. - * - * \author Ian Romanick - */ - -#include "main/core.h" -#include "glsl_symbol_table.h" -#include "ir.h" -#include "program.h" -#include "program/hash_table.h" -#include "linker.h" -#include "ir_optimization.h" - -extern "C" { -#include "main/shaderobj.h" -} - -/** - * Visitor that determines whether or not a variable is ever written. - */ -class find_assignment_visitor : public ir_hierarchical_visitor { -public: - find_assignment_visitor(const char *name) - : name(name), found(false) - { - /* empty */ - } - - virtual ir_visitor_status visit_enter(ir_assignment *ir) - { - ir_variable *const var = ir->lhs->variable_referenced(); - - if (strcmp(name, var->name) == 0) { - found = true; - return visit_stop; - } - - return visit_continue_with_parent; - } - - virtual ir_visitor_status visit_enter(ir_call *ir) - { - exec_list_iterator sig_iter = ir->get_callee()->parameters.iterator(); - foreach_iter(exec_list_iterator, iter, *ir) { - ir_rvalue *param_rval = (ir_rvalue *)iter.get(); - ir_variable *sig_param = (ir_variable *)sig_iter.get(); - - if (sig_param->mode == ir_var_out || - sig_param->mode == ir_var_inout) { - ir_variable *var = param_rval->variable_referenced(); - if (var && strcmp(name, var->name) == 0) { - found = true; - return visit_stop; - } - } - sig_iter.next(); - } - - return visit_continue_with_parent; - } - - bool variable_found() - { - return found; - } - -private: - const char *name; /**< Find writes to a variable with this name. */ - bool found; /**< Was a write to the variable found? */ -}; - - -/** - * Visitor that determines whether or not a variable is ever read. - */ -class find_deref_visitor : public ir_hierarchical_visitor { -public: - find_deref_visitor(const char *name) - : name(name), found(false) - { - /* empty */ - } - - virtual ir_visitor_status visit(ir_dereference_variable *ir) - { - if (strcmp(this->name, ir->var->name) == 0) { - this->found = true; - return visit_stop; - } - - return visit_continue; - } - - bool variable_found() const - { - return this->found; - } - -private: - const char *name; /**< Find writes to a variable with this name. */ - bool found; /**< Was a write to the variable found? */ -}; - - -void -linker_error(gl_shader_program *prog, const char *fmt, ...) -{ - va_list ap; - - ralloc_strcat(&prog->InfoLog, "error: "); - va_start(ap, fmt); - ralloc_vasprintf_append(&prog->InfoLog, fmt, ap); - va_end(ap); - - prog->LinkStatus = false; -} - - -void -linker_warning(gl_shader_program *prog, const char *fmt, ...) -{ - va_list ap; - - ralloc_strcat(&prog->InfoLog, "error: "); - va_start(ap, fmt); - ralloc_vasprintf_append(&prog->InfoLog, fmt, ap); - va_end(ap); - -} - - -void -link_invalidate_variable_locations(gl_shader *sh, enum ir_variable_mode mode, - int generic_base) -{ - foreach_list(node, sh->ir) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); - - if ((var == NULL) || (var->mode != (unsigned) mode)) - continue; - - /* Only assign locations for generic attributes / varyings / etc. - */ - if ((var->location >= generic_base) && !var->explicit_location) - var->location = -1; - } -} - - -/** - * Determine the number of attribute slots required for a particular type - * - * This code is here because it implements the language rules of a specific - * GLSL version. Since it's a property of the language and not a property of - * types in general, it doesn't really belong in glsl_type. - */ -unsigned -count_attribute_slots(const glsl_type *t) -{ - /* From page 31 (page 37 of the PDF) of the GLSL 1.50 spec: - * - * "A scalar input counts the same amount against this limit as a vec4, - * so applications may want to consider packing groups of four - * unrelated float inputs together into a vector to better utilize the - * capabilities of the underlying hardware. A matrix input will use up - * multiple locations. The number of locations used will equal the - * number of columns in the matrix." - * - * The spec does not explicitly say how arrays are counted. However, it - * should be safe to assume the total number of slots consumed by an array - * is the number of entries in the array multiplied by the number of slots - * consumed by a single element of the array. - */ - - if (t->is_array()) - return t->array_size() * count_attribute_slots(t->element_type()); - - if (t->is_matrix()) - return t->matrix_columns; - - return 1; -} - - -/** - * Verify that a vertex shader executable meets all semantic requirements. - * - * Also sets prog->Vert.UsesClipDistance and prog->Vert.ClipDistanceArraySize - * as a side effect. - * - * \param shader Vertex shader executable to be verified - */ -bool -validate_vertex_shader_executable(struct gl_shader_program *prog, - struct gl_shader *shader) -{ - if (shader == NULL) - return true; - - find_assignment_visitor find("gl_Position"); - find.run(shader->ir); - if (!find.variable_found()) { - linker_error(prog, "vertex shader does not write to `gl_Position'\n"); - return false; - } - - prog->Vert.ClipDistanceArraySize = 0; - - if (prog->Version >= 130) { - /* From section 7.1 (Vertex Shader Special Variables) of the - * GLSL 1.30 spec: - * - * "It is an error for a shader to statically write both - * gl_ClipVertex and gl_ClipDistance." - */ - find_assignment_visitor clip_vertex("gl_ClipVertex"); - find_assignment_visitor clip_distance("gl_ClipDistance"); - - clip_vertex.run(shader->ir); - clip_distance.run(shader->ir); - if (clip_vertex.variable_found() && clip_distance.variable_found()) { - linker_error(prog, "vertex shader writes to both `gl_ClipVertex' " - "and `gl_ClipDistance'\n"); - return false; - } - prog->Vert.UsesClipDistance = clip_distance.variable_found(); - ir_variable *clip_distance_var = - shader->symbols->get_variable("gl_ClipDistance"); - if (clip_distance_var) - prog->Vert.ClipDistanceArraySize = clip_distance_var->type->length; - } - - return true; -} - - -/** - * Verify that a fragment shader executable meets all semantic requirements - * - * \param shader Fragment shader executable to be verified - */ -bool -validate_fragment_shader_executable(struct gl_shader_program *prog, - struct gl_shader *shader) -{ - if (shader == NULL) - return true; - - find_assignment_visitor frag_color("gl_FragColor"); - find_assignment_visitor frag_data("gl_FragData"); - - frag_color.run(shader->ir); - frag_data.run(shader->ir); - - if (frag_color.variable_found() && frag_data.variable_found()) { - linker_error(prog, "fragment shader writes to both " - "`gl_FragColor' and `gl_FragData'\n"); - return false; - } - - return true; -} - - -/** - * Generate a string describing the mode of a variable - */ -static const char * -mode_string(const ir_variable *var) -{ - switch (var->mode) { - case ir_var_auto: - return (var->read_only) ? "global constant" : "global variable"; - - case ir_var_uniform: return "uniform"; - case ir_var_in: return "shader input"; - case ir_var_out: return "shader output"; - case ir_var_inout: return "shader inout"; - - case ir_var_const_in: - case ir_var_temporary: - default: - assert(!"Should not get here."); - return "invalid variable"; - } -} - - -/** - * Perform validation of global variables used across multiple shaders - */ -bool -cross_validate_globals(struct gl_shader_program *prog, - struct gl_shader **shader_list, - unsigned num_shaders, - bool uniforms_only) -{ - /* Examine all of the uniforms in all of the shaders and cross validate - * them. - */ - glsl_symbol_table variables; - for (unsigned i = 0; i < num_shaders; i++) { - if (shader_list[i] == NULL) - continue; - - foreach_list(node, shader_list[i]->ir) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); - - if (var == NULL) - continue; - - if (uniforms_only && (var->mode != ir_var_uniform)) - continue; - - /* Don't cross validate temporaries that are at global scope. These - * will eventually get pulled into the shaders 'main'. - */ - if (var->mode == ir_var_temporary) - continue; - - /* If a global with this name has already been seen, verify that the - * new instance has the same type. In addition, if the globals have - * initializers, the values of the initializers must be the same. - */ - ir_variable *const existing = variables.get_variable(var->name); - if (existing != NULL) { - if (var->type != existing->type) { - /* Consider the types to be "the same" if both types are arrays - * of the same type and one of the arrays is implicitly sized. - * In addition, set the type of the linked variable to the - * explicitly sized array. - */ - if (var->type->is_array() - && existing->type->is_array() - && (var->type->fields.array == existing->type->fields.array) - && ((var->type->length == 0) - || (existing->type->length == 0))) { - if (var->type->length != 0) { - existing->type = var->type; - } - } else { - linker_error(prog, "%s `%s' declared as type " - "`%s' and type `%s'\n", - mode_string(var), - var->name, var->type->name, - existing->type->name); - return false; - } - } - - if (var->explicit_location) { - if (existing->explicit_location - && (var->location != existing->location)) { - linker_error(prog, "explicit locations for %s " - "`%s' have differing values\n", - mode_string(var), var->name); - return false; - } - - existing->location = var->location; - existing->explicit_location = true; - } - - /* Validate layout qualifiers for gl_FragDepth. - * - * From the AMD/ARB_conservative_depth specs: - * - * "If gl_FragDepth is redeclared in any fragment shader in a - * program, it must be redeclared in all fragment shaders in - * that program that have static assignments to - * gl_FragDepth. All redeclarations of gl_FragDepth in all - * fragment shaders in a single program must have the same set - * of qualifiers." - */ - if (strcmp(var->name, "gl_FragDepth") == 0) { - bool layout_declared = var->depth_layout != ir_depth_layout_none; - bool layout_differs = - var->depth_layout != existing->depth_layout; - - if (layout_declared && layout_differs) { - linker_error(prog, - "All redeclarations of gl_FragDepth in all " - "fragment shaders in a single program must have " - "the same set of qualifiers."); - } - - if (var->used && layout_differs) { - linker_error(prog, - "If gl_FragDepth is redeclared with a layout " - "qualifier in any fragment shader, it must be " - "redeclared with the same layout qualifier in " - "all fragment shaders that have assignments to " - "gl_FragDepth"); - } - } - - /* Page 35 (page 41 of the PDF) of the GLSL 4.20 spec says: - * - * "If a shared global has multiple initializers, the - * initializers must all be constant expressions, and they - * must all have the same value. Otherwise, a link error will - * result. (A shared global having only one initializer does - * not require that initializer to be a constant expression.)" - * - * Previous to 4.20 the GLSL spec simply said that initializers - * must have the same value. In this case of non-constant - * initializers, this was impossible to determine. As a result, - * no vendor actually implemented that behavior. The 4.20 - * behavior matches the implemented behavior of at least one other - * vendor, so we'll implement that for all GLSL versions. - */ - if (var->constant_initializer != NULL) { - if (existing->constant_initializer != NULL) { - if (!var->constant_initializer->has_value(existing->constant_initializer)) { - linker_error(prog, "initializers for %s " - "`%s' have differing values\n", - mode_string(var), var->name); - return false; - } - } else { - /* If the first-seen instance of a particular uniform did not - * have an initializer but a later instance does, copy the - * initializer to the version stored in the symbol table. - */ - /* FINISHME: This is wrong. The constant_value field should - * FINISHME: not be modified! Imagine a case where a shader - * FINISHME: without an initializer is linked in two different - * FINISHME: programs with shaders that have differing - * FINISHME: initializers. Linking with the first will - * FINISHME: modify the shader, and linking with the second - * FINISHME: will fail. - */ - existing->constant_initializer = - var->constant_initializer->clone(ralloc_parent(existing), - NULL); - } - } - - if (var->has_initializer) { - if (existing->has_initializer - && (var->constant_initializer == NULL - || existing->constant_initializer == NULL)) { - linker_error(prog, - "shared global variable `%s' has multiple " - "non-constant initializers.\n", - var->name); - return false; - } - - /* Some instance had an initializer, so keep track of that. In - * this location, all sorts of initializers (constant or - * otherwise) will propagate the existence to the variable - * stored in the symbol table. - */ - existing->has_initializer = true; - } - - if (existing->invariant != var->invariant) { - linker_error(prog, "declarations for %s `%s' have " - "mismatching invariant qualifiers\n", - mode_string(var), var->name); - return false; - } - if (existing->centroid != var->centroid) { - linker_error(prog, "declarations for %s `%s' have " - "mismatching centroid qualifiers\n", - mode_string(var), var->name); - return false; - } - } else - variables.add_variable(var); - } - } - - return true; -} - - -/** - * Perform validation of uniforms used across multiple shader stages - */ -bool -cross_validate_uniforms(struct gl_shader_program *prog) -{ - return cross_validate_globals(prog, prog->_LinkedShaders, - MESA_SHADER_TYPES, true); -} - - -/** - * Validate that outputs from one stage match inputs of another - */ -bool -cross_validate_outputs_to_inputs(struct gl_shader_program *prog, - gl_shader *producer, gl_shader *consumer) -{ - glsl_symbol_table parameters; - /* FINISHME: Figure these out dynamically. */ - const char *const producer_stage = "vertex"; - const char *const consumer_stage = "fragment"; - - /* Find all shader outputs in the "producer" stage. - */ - foreach_list(node, producer->ir) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); - - /* FINISHME: For geometry shaders, this should also look for inout - * FINISHME: variables. - */ - if ((var == NULL) || (var->mode != ir_var_out)) - continue; - - parameters.add_variable(var); - } - - - /* Find all shader inputs in the "consumer" stage. Any variables that have - * matching outputs already in the symbol table must have the same type and - * qualifiers. - */ - foreach_list(node, consumer->ir) { - ir_variable *const input = ((ir_instruction *) node)->as_variable(); - - /* FINISHME: For geometry shaders, this should also look for inout - * FINISHME: variables. - */ - if ((input == NULL) || (input->mode != ir_var_in)) - continue; - - ir_variable *const output = parameters.get_variable(input->name); - if (output != NULL) { - /* Check that the types match between stages. - */ - if (input->type != output->type) { - /* There is a bit of a special case for gl_TexCoord. This - * built-in is unsized by default. Applications that variable - * access it must redeclare it with a size. There is some - * language in the GLSL spec that implies the fragment shader - * and vertex shader do not have to agree on this size. Other - * driver behave this way, and one or two applications seem to - * rely on it. - * - * Neither declaration needs to be modified here because the array - * sizes are fixed later when update_array_sizes is called. - * - * From page 48 (page 54 of the PDF) of the GLSL 1.10 spec: - * - * "Unlike user-defined varying variables, the built-in - * varying variables don't have a strict one-to-one - * correspondence between the vertex language and the - * fragment language." - */ - if (!output->type->is_array() - || (strncmp("gl_", output->name, 3) != 0)) { - linker_error(prog, - "%s shader output `%s' declared as type `%s', " - "but %s shader input declared as type `%s'\n", - producer_stage, output->name, - output->type->name, - consumer_stage, input->type->name); - return false; - } - } - - /* Check that all of the qualifiers match between stages. - */ - if (input->centroid != output->centroid) { - linker_error(prog, - "%s shader output `%s' %s centroid qualifier, " - "but %s shader input %s centroid qualifier\n", - producer_stage, - output->name, - (output->centroid) ? "has" : "lacks", - consumer_stage, - (input->centroid) ? "has" : "lacks"); - return false; - } - - if (input->invariant != output->invariant) { - linker_error(prog, - "%s shader output `%s' %s invariant qualifier, " - "but %s shader input %s invariant qualifier\n", - producer_stage, - output->name, - (output->invariant) ? "has" : "lacks", - consumer_stage, - (input->invariant) ? "has" : "lacks"); - return false; - } - - if (input->interpolation != output->interpolation) { - linker_error(prog, - "%s shader output `%s' specifies %s " - "interpolation qualifier, " - "but %s shader input specifies %s " - "interpolation qualifier\n", - producer_stage, - output->name, - output->interpolation_string(), - consumer_stage, - input->interpolation_string()); - return false; - } - } - } - - return true; -} - - -/** - * Populates a shaders symbol table with all global declarations - */ -static void -populate_symbol_table(gl_shader *sh) -{ - sh->symbols = new(sh) glsl_symbol_table; - - foreach_list(node, sh->ir) { - ir_instruction *const inst = (ir_instruction *) node; - ir_variable *var; - ir_function *func; - - if ((func = inst->as_function()) != NULL) { - sh->symbols->add_function(func); - } else if ((var = inst->as_variable()) != NULL) { - sh->symbols->add_variable(var); - } - } -} - - -/** - * Remap variables referenced in an instruction tree - * - * This is used when instruction trees are cloned from one shader and placed in - * another. These trees will contain references to \c ir_variable nodes that - * do not exist in the target shader. This function finds these \c ir_variable - * references and replaces the references with matching variables in the target - * shader. - * - * If there is no matching variable in the target shader, a clone of the - * \c ir_variable is made and added to the target shader. The new variable is - * added to \b both the instruction stream and the symbol table. - * - * \param inst IR tree that is to be processed. - * \param symbols Symbol table containing global scope symbols in the - * linked shader. - * \param instructions Instruction stream where new variable declarations - * should be added. - */ -void -remap_variables(ir_instruction *inst, struct gl_shader *target, - hash_table *temps) -{ - class remap_visitor : public ir_hierarchical_visitor { - public: - remap_visitor(struct gl_shader *target, - hash_table *temps) - { - this->target = target; - this->symbols = target->symbols; - this->instructions = target->ir; - this->temps = temps; - } - - virtual ir_visitor_status visit(ir_dereference_variable *ir) - { - if (ir->var->mode == ir_var_temporary) { - ir_variable *var = (ir_variable *) hash_table_find(temps, ir->var); - - assert(var != NULL); - ir->var = var; - return visit_continue; - } - - ir_variable *const existing = - this->symbols->get_variable(ir->var->name); - if (existing != NULL) - ir->var = existing; - else { - ir_variable *copy = ir->var->clone(this->target, NULL); - - this->symbols->add_variable(copy); - this->instructions->push_head(copy); - ir->var = copy; - } - - return visit_continue; - } - - private: - struct gl_shader *target; - glsl_symbol_table *symbols; - exec_list *instructions; - hash_table *temps; - }; - - remap_visitor v(target, temps); - - inst->accept(&v); -} - - -/** - * Move non-declarations from one instruction stream to another - * - * The intended usage pattern of this function is to pass the pointer to the - * head sentinel of a list (i.e., a pointer to the list cast to an \c exec_node - * pointer) for \c last and \c false for \c make_copies on the first - * call. Successive calls pass the return value of the previous call for - * \c last and \c true for \c make_copies. - * - * \param instructions Source instruction stream - * \param last Instruction after which new instructions should be - * inserted in the target instruction stream - * \param make_copies Flag selecting whether instructions in \c instructions - * should be copied (via \c ir_instruction::clone) into the - * target list or moved. - * - * \return - * The new "last" instruction in the target instruction stream. This pointer - * is suitable for use as the \c last parameter of a later call to this - * function. - */ -exec_node * -move_non_declarations(exec_list *instructions, exec_node *last, - bool make_copies, gl_shader *target) -{ - hash_table *temps = NULL; - - if (make_copies) - temps = hash_table_ctor(0, hash_table_pointer_hash, - hash_table_pointer_compare); - - foreach_list_safe(node, instructions) { - ir_instruction *inst = (ir_instruction *) node; - - if (inst->as_function()) - continue; - - ir_variable *var = inst->as_variable(); - if ((var != NULL) && (var->mode != ir_var_temporary)) - continue; - - assert(inst->as_assignment() - || ((var != NULL) && (var->mode == ir_var_temporary))); - - if (make_copies) { - inst = inst->clone(target, NULL); - - if (var != NULL) - hash_table_insert(temps, inst, var); - else - remap_variables(inst, target, temps); - } else { - inst->remove(); - } - - last->insert_after(inst); - last = inst; - } - - if (make_copies) - hash_table_dtor(temps); - - return last; -} - -/** - * Get the function signature for main from a shader - */ -static ir_function_signature * -get_main_function_signature(gl_shader *sh) -{ - ir_function *const f = sh->symbols->get_function("main"); - if (f != NULL) { - exec_list void_parameters; - - /* Look for the 'void main()' signature and ensure that it's defined. - * This keeps the linker from accidentally pick a shader that just - * contains a prototype for main. - * - * We don't have to check for multiple definitions of main (in multiple - * shaders) because that would have already been caught above. - */ - ir_function_signature *sig = f->matching_signature(&void_parameters); - if ((sig != NULL) && sig->is_defined) { - return sig; - } - } - - return NULL; -} - - -/** - * Combine a group of shaders for a single stage to generate a linked shader - * - * \note - * If this function is supplied a single shader, it is cloned, and the new - * shader is returned. - */ -static struct gl_shader * -link_intrastage_shaders(void *mem_ctx, - struct gl_context *ctx, - struct gl_shader_program *prog, - struct gl_shader **shader_list, - unsigned num_shaders) -{ - /* Check that global variables defined in multiple shaders are consistent. - */ - if (!cross_validate_globals(prog, shader_list, num_shaders, false)) - return NULL; - - /* Check that there is only a single definition of each function signature - * across all shaders. - */ - for (unsigned i = 0; i < (num_shaders - 1); i++) { - foreach_list(node, shader_list[i]->ir) { - ir_function *const f = ((ir_instruction *) node)->as_function(); - - if (f == NULL) - continue; - - for (unsigned j = i + 1; j < num_shaders; j++) { - ir_function *const other = - shader_list[j]->symbols->get_function(f->name); - - /* If the other shader has no function (and therefore no function - * signatures) with the same name, skip to the next shader. - */ - if (other == NULL) - continue; - - foreach_iter (exec_list_iterator, iter, *f) { - ir_function_signature *sig = - (ir_function_signature *) iter.get(); - - if (!sig->is_defined || sig->is_builtin) - continue; - - ir_function_signature *other_sig = - other->exact_matching_signature(& sig->parameters); - - if ((other_sig != NULL) && other_sig->is_defined - && !other_sig->is_builtin) { - linker_error(prog, "function `%s' is multiply defined", - f->name); - return NULL; - } - } - } - } - } - - /* Find the shader that defines main, and make a clone of it. - * - * Starting with the clone, search for undefined references. If one is - * found, find the shader that defines it. Clone the reference and add - * it to the shader. Repeat until there are no undefined references or - * until a reference cannot be resolved. - */ - gl_shader *main = NULL; - for (unsigned i = 0; i < num_shaders; i++) { - if (get_main_function_signature(shader_list[i]) != NULL) { - main = shader_list[i]; - break; - } - } - - if (main == NULL) { - linker_error(prog, "%s shader lacks `main'\n", - (shader_list[0]->Type == GL_VERTEX_SHADER) - ? "vertex" : "fragment"); - return NULL; - } - - gl_shader *linked = ctx->Driver.NewShader(NULL, 0, main->Type); - linked->ir = new(linked) exec_list; - clone_ir_list(mem_ctx, linked->ir, main->ir); - - populate_symbol_table(linked); - - /* The a pointer to the main function in the final linked shader (i.e., the - * copy of the original shader that contained the main function). - */ - ir_function_signature *const main_sig = get_main_function_signature(linked); - - /* Move any instructions other than variable declarations or function - * declarations into main. - */ - exec_node *insertion_point = - move_non_declarations(linked->ir, (exec_node *) &main_sig->body, false, - linked); - - for (unsigned i = 0; i < num_shaders; i++) { - if (shader_list[i] == main) - continue; - - insertion_point = move_non_declarations(shader_list[i]->ir, - insertion_point, true, linked); - } - - /* Resolve initializers for global variables in the linked shader. - */ - unsigned num_linking_shaders = num_shaders; - for (unsigned i = 0; i < num_shaders; i++) - num_linking_shaders += shader_list[i]->num_builtins_to_link; - - gl_shader **linking_shaders = - (gl_shader **) calloc(num_linking_shaders, sizeof(gl_shader *)); - - memcpy(linking_shaders, shader_list, - sizeof(linking_shaders[0]) * num_shaders); - - unsigned idx = num_shaders; - for (unsigned i = 0; i < num_shaders; i++) { - memcpy(&linking_shaders[idx], shader_list[i]->builtins_to_link, - sizeof(linking_shaders[0]) * shader_list[i]->num_builtins_to_link); - idx += shader_list[i]->num_builtins_to_link; - } - - assert(idx == num_linking_shaders); - - if (!link_function_calls(prog, linked, linking_shaders, - num_linking_shaders)) { - ctx->Driver.DeleteShader(ctx, linked); - linked = NULL; - } - - free(linking_shaders); - -#ifdef DEBUG - /* At this point linked should contain all of the linked IR, so - * validate it to make sure nothing went wrong. - */ - if (linked) - validate_ir_tree(linked->ir); -#endif - - /* Make a pass over all variable declarations to ensure that arrays with - * unspecified sizes have a size specified. The size is inferred from the - * max_array_access field. - */ - if (linked != NULL) { - class array_sizing_visitor : public ir_hierarchical_visitor { - public: - virtual ir_visitor_status visit(ir_variable *var) - { - if (var->type->is_array() && (var->type->length == 0)) { - const glsl_type *type = - glsl_type::get_array_instance(var->type->fields.array, - var->max_array_access + 1); - - assert(type != NULL); - var->type = type; - } - - return visit_continue; - } - } v; - - v.run(linked->ir); - } - - return linked; -} - -/** - * Update the sizes of linked shader uniform arrays to the maximum - * array index used. - * - * From page 81 (page 95 of the PDF) of the OpenGL 2.1 spec: - * - * If one or more elements of an array are active, - * GetActiveUniform will return the name of the array in name, - * subject to the restrictions listed above. The type of the array - * is returned in type. The size parameter contains the highest - * array element index used, plus one. The compiler or linker - * determines the highest index used. There will be only one - * active uniform reported by the GL per uniform array. - - */ -static void -update_array_sizes(struct gl_shader_program *prog) -{ - for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) { - if (prog->_LinkedShaders[i] == NULL) - continue; - - foreach_list(node, prog->_LinkedShaders[i]->ir) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); - - if ((var == NULL) || (var->mode != ir_var_uniform && - var->mode != ir_var_in && - var->mode != ir_var_out) || - !var->type->is_array()) - continue; - - unsigned int size = var->max_array_access; - for (unsigned j = 0; j < MESA_SHADER_TYPES; j++) { - if (prog->_LinkedShaders[j] == NULL) - continue; - - foreach_list(node2, prog->_LinkedShaders[j]->ir) { - ir_variable *other_var = ((ir_instruction *) node2)->as_variable(); - if (!other_var) - continue; - - if (strcmp(var->name, other_var->name) == 0 && - other_var->max_array_access > size) { - size = other_var->max_array_access; - } - } - } - - if (size + 1 != var->type->fields.array->length) { - /* If this is a built-in uniform (i.e., it's backed by some - * fixed-function state), adjust the number of state slots to - * match the new array size. The number of slots per array entry - * is not known. It seems safe to assume that the total number of - * slots is an integer multiple of the number of array elements. - * Determine the number of slots per array element by dividing by - * the old (total) size. - */ - if (var->num_state_slots > 0) { - var->num_state_slots = (size + 1) - * (var->num_state_slots / var->type->length); - } - - var->type = glsl_type::get_array_instance(var->type->fields.array, - size + 1); - /* FINISHME: We should update the types of array - * dereferences of this variable now. - */ - } - } - } -} - -/** - * Find a contiguous set of available bits in a bitmask. - * - * \param used_mask Bits representing used (1) and unused (0) locations - * \param needed_count Number of contiguous bits needed. - * - * \return - * Base location of the available bits on success or -1 on failure. - */ -int -find_available_slots(unsigned used_mask, unsigned needed_count) -{ - unsigned needed_mask = (1 << needed_count) - 1; - const int max_bit_to_test = (8 * sizeof(used_mask)) - needed_count; - - /* The comparison to 32 is redundant, but without it GCC emits "warning: - * cannot optimize possibly infinite loops" for the loop below. - */ - if ((needed_count == 0) || (max_bit_to_test < 0) || (max_bit_to_test > 32)) - return -1; - - for (int i = 0; i <= max_bit_to_test; i++) { - if ((needed_mask & ~used_mask) == needed_mask) - return i; - - needed_mask <<= 1; - } - - return -1; -} - - -/** - * Assign locations for either VS inputs for FS outputs - * - * \param prog Shader program whose variables need locations assigned - * \param target_index Selector for the program target to receive location - * assignmnets. Must be either \c MESA_SHADER_VERTEX or - * \c MESA_SHADER_FRAGMENT. - * \param max_index Maximum number of generic locations. This corresponds - * to either the maximum number of draw buffers or the - * maximum number of generic attributes. - * - * \return - * If locations are successfully assigned, true is returned. Otherwise an - * error is emitted to the shader link log and false is returned. - */ -bool -assign_attribute_or_color_locations(gl_shader_program *prog, - unsigned target_index, - unsigned max_index) -{ - /* Mark invalid locations as being used. - */ - unsigned used_locations = (max_index >= 32) - ? ~0 : ~((1 << max_index) - 1); - - assert((target_index == MESA_SHADER_VERTEX) - || (target_index == MESA_SHADER_FRAGMENT)); - - gl_shader *const sh = prog->_LinkedShaders[target_index]; - if (sh == NULL) - return true; - - /* Operate in a total of four passes. - * - * 1. Invalidate the location assignments for all vertex shader inputs. - * - * 2. Assign locations for inputs that have user-defined (via - * glBindVertexAttribLocation) locations and outputs that have - * user-defined locations (via glBindFragDataLocation). - * - * 3. Sort the attributes without assigned locations by number of slots - * required in decreasing order. Fragmentation caused by attribute - * locations assigned by the application may prevent large attributes - * from having enough contiguous space. - * - * 4. Assign locations to any inputs without assigned locations. - */ - - const int generic_base = (target_index == MESA_SHADER_VERTEX) - ? (int) VERT_ATTRIB_GENERIC0 : (int) FRAG_RESULT_DATA0; - - const enum ir_variable_mode direction = - (target_index == MESA_SHADER_VERTEX) ? ir_var_in : ir_var_out; - - - link_invalidate_variable_locations(sh, direction, generic_base); - - /* Temporary storage for the set of attributes that need locations assigned. - */ - struct temp_attr { - unsigned slots; - ir_variable *var; - - /* Used below in the call to qsort. */ - static int compare(const void *a, const void *b) - { - const temp_attr *const l = (const temp_attr *) a; - const temp_attr *const r = (const temp_attr *) b; - - /* Reversed because we want a descending order sort below. */ - return r->slots - l->slots; - } - } to_assign[16]; - - unsigned num_attr = 0; - - foreach_list(node, sh->ir) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); - - if ((var == NULL) || (var->mode != (unsigned) direction)) - continue; - - if (var->explicit_location) { - if ((var->location >= (int)(max_index + generic_base)) - || (var->location < 0)) { - linker_error(prog, - "invalid explicit location %d specified for `%s'\n", - (var->location < 0) - ? var->location : var->location - generic_base, - var->name); - return false; - } - } else if (target_index == MESA_SHADER_VERTEX) { - unsigned binding; - - if (prog->AttributeBindings->get(binding, var->name)) { - assert(binding >= VERT_ATTRIB_GENERIC0); - var->location = binding; - } - } else if (target_index == MESA_SHADER_FRAGMENT) { - unsigned binding; - - if (prog->FragDataBindings->get(binding, var->name)) { - assert(binding >= FRAG_RESULT_DATA0); - var->location = binding; - } - } - - /* If the variable is not a built-in and has a location statically - * assigned in the shader (presumably via a layout qualifier), make sure - * that it doesn't collide with other assigned locations. Otherwise, - * add it to the list of variables that need linker-assigned locations. - */ - const unsigned slots = count_attribute_slots(var->type); - if (var->location != -1) { - if (var->location >= generic_base) { - /* From page 61 of the OpenGL 4.0 spec: - * - * "LinkProgram will fail if the attribute bindings assigned - * by BindAttribLocation do not leave not enough space to - * assign a location for an active matrix attribute or an - * active attribute array, both of which require multiple - * contiguous generic attributes." - * - * Previous versions of the spec contain similar language but omit - * the bit about attribute arrays. - * - * Page 61 of the OpenGL 4.0 spec also says: - * - * "It is possible for an application to bind more than one - * attribute name to the same location. This is referred to as - * aliasing. This will only work if only one of the aliased - * attributes is active in the executable program, or if no - * path through the shader consumes more than one attribute of - * a set of attributes aliased to the same location. A link - * error can occur if the linker determines that every path - * through the shader consumes multiple aliased attributes, - * but implementations are not required to generate an error - * in this case." - * - * These two paragraphs are either somewhat contradictory, or I - * don't fully understand one or both of them. - */ - /* FINISHME: The code as currently written does not support - * FINISHME: attribute location aliasing (see comment above). - */ - /* Mask representing the contiguous slots that will be used by - * this attribute. - */ - const unsigned attr = var->location - generic_base; - const unsigned use_mask = (1 << slots) - 1; - - /* Generate a link error if the set of bits requested for this - * attribute overlaps any previously allocated bits. - */ - if ((~(use_mask << attr) & used_locations) != used_locations) { - linker_error(prog, - "insufficient contiguous attribute locations " - "available for vertex shader input `%s'", - var->name); - return false; - } - - used_locations |= (use_mask << attr); - } - - continue; - } - - to_assign[num_attr].slots = slots; - to_assign[num_attr].var = var; - num_attr++; - } - - /* If all of the attributes were assigned locations by the application (or - * are built-in attributes with fixed locations), return early. This should - * be the common case. - */ - if (num_attr == 0) - return true; - - qsort(to_assign, num_attr, sizeof(to_assign[0]), temp_attr::compare); - - if (target_index == MESA_SHADER_VERTEX) { - /* VERT_ATTRIB_GENERIC0 is a pseudo-alias for VERT_ATTRIB_POS. It can - * only be explicitly assigned by via glBindAttribLocation. Mark it as - * reserved to prevent it from being automatically allocated below. - */ - find_deref_visitor find("gl_Vertex"); - find.run(sh->ir); - if (find.variable_found()) - used_locations |= (1 << 0); - } - - for (unsigned i = 0; i < num_attr; i++) { - /* Mask representing the contiguous slots that will be used by this - * attribute. - */ - const unsigned use_mask = (1 << to_assign[i].slots) - 1; - - int location = find_available_slots(used_locations, to_assign[i].slots); - - if (location < 0) { - const char *const string = (target_index == MESA_SHADER_VERTEX) - ? "vertex shader input" : "fragment shader output"; - - linker_error(prog, - "insufficient contiguous attribute locations " - "available for %s `%s'", - string, to_assign[i].var->name); - return false; - } - - to_assign[i].var->location = generic_base + location; - used_locations |= (use_mask << location); - } - - return true; -} - - -/** - * Demote shader inputs and outputs that are not used in other stages - */ -void -demote_shader_inputs_and_outputs(gl_shader *sh, enum ir_variable_mode mode) -{ - foreach_list(node, sh->ir) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); - - if ((var == NULL) || (var->mode != int(mode))) - continue; - - /* A shader 'in' or 'out' variable is only really an input or output if - * its value is used by other shader stages. This will cause the variable - * to have a location assigned. - */ - if (var->location == -1) { - var->mode = ir_var_auto; - } - } -} - - -/** - * Data structure tracking information about a transform feedback declaration - * during linking. - */ -class tfeedback_decl -{ -public: - bool init(struct gl_context *ctx, struct gl_shader_program *prog, - const void *mem_ctx, const char *input); - static bool is_same(const tfeedback_decl &x, const tfeedback_decl &y); - bool assign_location(struct gl_context *ctx, struct gl_shader_program *prog, - ir_variable *output_var); - bool accumulate_num_outputs(struct gl_shader_program *prog, unsigned *count); - bool store(struct gl_context *ctx, struct gl_shader_program *prog, - struct gl_transform_feedback_info *info, unsigned buffer, - unsigned varying, const unsigned max_outputs) const; - - - /** - * True if assign_location() has been called for this object. - */ - bool is_assigned() const - { - return this->location != -1; - } - - /** - * Determine whether this object refers to the variable var. - */ - bool matches_var(ir_variable *var) const - { - if (this->is_clip_distance_mesa) - return strcmp(var->name, "gl_ClipDistanceMESA") == 0; - else - return strcmp(var->name, this->var_name) == 0; - } - - /** - * The total number of varying components taken up by this variable. Only - * valid if is_assigned() is true. - */ - unsigned num_components() const - { - if (this->is_clip_distance_mesa) - return this->size; - else - return this->vector_elements * this->matrix_columns * this->size; - } - -private: - /** - * The name that was supplied to glTransformFeedbackVaryings. Used for - * error reporting and glGetTransformFeedbackVarying(). - */ - const char *orig_name; - - /** - * The name of the variable, parsed from orig_name. - */ - const char *var_name; - - /** - * True if the declaration in orig_name represents an array. - */ - bool is_subscripted; - - /** - * If is_subscripted is true, the subscript that was specified in orig_name. - */ - unsigned array_subscript; - - /** - * True if the variable is gl_ClipDistance and the driver lowers - * gl_ClipDistance to gl_ClipDistanceMESA. - */ - bool is_clip_distance_mesa; - - /** - * The vertex shader output location that the linker assigned for this - * variable. -1 if a location hasn't been assigned yet. - */ - int location; - - /** - * If location != -1, the number of vector elements in this variable, or 1 - * if this variable is a scalar. - */ - unsigned vector_elements; - - /** - * If location != -1, the number of matrix columns in this variable, or 1 - * if this variable is not a matrix. - */ - unsigned matrix_columns; - - /** Type of the varying returned by glGetTransformFeedbackVarying() */ - GLenum type; - - /** - * If location != -1, the size that should be returned by - * glGetTransformFeedbackVarying(). - */ - unsigned size; -}; - - -/** - * Initialize this object based on a string that was passed to - * glTransformFeedbackVaryings. If there is a parse error, the error is - * reported using linker_error(), and false is returned. - */ -bool -tfeedback_decl::init(struct gl_context *ctx, struct gl_shader_program *prog, - const void *mem_ctx, const char *input) -{ - /* We don't have to be pedantic about what is a valid GLSL variable name, - * because any variable with an invalid name can't exist in the IR anyway. - */ - - this->location = -1; - this->orig_name = input; - this->is_clip_distance_mesa = false; - - const char *bracket = strrchr(input, '['); - - if (bracket) { - this->var_name = ralloc_strndup(mem_ctx, input, bracket - input); - if (sscanf(bracket, "[%u]", &this->array_subscript) != 1) { - linker_error(prog, "Cannot parse transform feedback varying %s", input); - return false; - } - this->is_subscripted = true; - } else { - this->var_name = ralloc_strdup(mem_ctx, input); - this->is_subscripted = false; - } - - /* For drivers that lower gl_ClipDistance to gl_ClipDistanceMESA, this - * class must behave specially to account for the fact that gl_ClipDistance - * is converted from a float[8] to a vec4[2]. - */ - if (ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].LowerClipDistance && - strcmp(this->var_name, "gl_ClipDistance") == 0) { - this->is_clip_distance_mesa = true; - } - - return true; -} - - -/** - * Determine whether two tfeedback_decl objects refer to the same variable and - * array index (if applicable). - */ -bool -tfeedback_decl::is_same(const tfeedback_decl &x, const tfeedback_decl &y) -{ - if (strcmp(x.var_name, y.var_name) != 0) - return false; - if (x.is_subscripted != y.is_subscripted) - return false; - if (x.is_subscripted && x.array_subscript != y.array_subscript) - return false; - return true; -} - - -/** - * Assign a location for this tfeedback_decl object based on the location - * assignment in output_var. - * - * If an error occurs, the error is reported through linker_error() and false - * is returned. - */ -bool -tfeedback_decl::assign_location(struct gl_context *ctx, - struct gl_shader_program *prog, - ir_variable *output_var) -{ - if (output_var->type->is_array()) { - /* Array variable */ - const unsigned matrix_cols = - output_var->type->fields.array->matrix_columns; - unsigned actual_array_size = this->is_clip_distance_mesa ? - prog->Vert.ClipDistanceArraySize : output_var->type->array_size(); - - if (this->is_subscripted) { - /* Check array bounds. */ - if (this->array_subscript >= actual_array_size) { - linker_error(prog, "Transform feedback varying %s has index " - "%i, but the array size is %u.", - this->orig_name, this->array_subscript, - actual_array_size); - return false; - } - if (this->is_clip_distance_mesa) { - this->location = - output_var->location + this->array_subscript / 4; - } else { - this->location = - output_var->location + this->array_subscript * matrix_cols; - } - this->size = 1; - } else { - this->location = output_var->location; - this->size = actual_array_size; - } - this->vector_elements = output_var->type->fields.array->vector_elements; - this->matrix_columns = matrix_cols; - if (this->is_clip_distance_mesa) - this->type = GL_FLOAT; - else - this->type = output_var->type->fields.array->gl_type; - } else { - /* Regular variable (scalar, vector, or matrix) */ - if (this->is_subscripted) { - linker_error(prog, "Transform feedback varying %s requested, " - "but %s is not an array.", - this->orig_name, this->var_name); - return false; - } - this->location = output_var->location; - this->size = 1; - this->vector_elements = output_var->type->vector_elements; - this->matrix_columns = output_var->type->matrix_columns; - this->type = output_var->type->gl_type; - } - - /* From GL_EXT_transform_feedback: - * A program will fail to link if: - * - * * the total number of components to capture in any varying - * variable in is greater than the constant - * MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT and the - * buffer mode is SEPARATE_ATTRIBS_EXT; - */ - if (prog->TransformFeedback.BufferMode == GL_SEPARATE_ATTRIBS && - this->num_components() > - ctx->Const.MaxTransformFeedbackSeparateComponents) { - linker_error(prog, "Transform feedback varying %s exceeds " - "MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS.", - this->orig_name); - return false; - } - - return true; -} - - -bool -tfeedback_decl::accumulate_num_outputs(struct gl_shader_program *prog, - unsigned *count) -{ - if (!this->is_assigned()) { - /* From GL_EXT_transform_feedback: - * A program will fail to link if: - * - * * any variable name specified in the array is not - * declared as an output in the geometry shader (if present) or - * the vertex shader (if no geometry shader is present); - */ - linker_error(prog, "Transform feedback varying %s undeclared.", - this->orig_name); - return false; - } - - unsigned translated_size = this->size; - if (this->is_clip_distance_mesa) - translated_size = (translated_size + 3) / 4; - - *count += translated_size * this->matrix_columns; - - return true; -} - - -/** - * Update gl_transform_feedback_info to reflect this tfeedback_decl. - * - * If an error occurs, the error is reported through linker_error() and false - * is returned. - */ -bool -tfeedback_decl::store(struct gl_context *ctx, struct gl_shader_program *prog, - struct gl_transform_feedback_info *info, - unsigned buffer, - unsigned varying, const unsigned max_outputs) const -{ - /* From GL_EXT_transform_feedback: - * A program will fail to link if: - * - * * the total number of components to capture is greater than - * the constant MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT - * and the buffer mode is INTERLEAVED_ATTRIBS_EXT. - */ - if (prog->TransformFeedback.BufferMode == GL_INTERLEAVED_ATTRIBS && - info->BufferStride[buffer] + this->num_components() > - ctx->Const.MaxTransformFeedbackInterleavedComponents) { - linker_error(prog, "The MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS " - "limit has been exceeded."); - return false; - } - - unsigned translated_size = this->size; - if (this->is_clip_distance_mesa) - translated_size = (translated_size + 3) / 4; - unsigned components_so_far = 0; - for (unsigned index = 0; index < translated_size; ++index) { - for (unsigned v = 0; v < this->matrix_columns; ++v) { - unsigned num_components = this->vector_elements; - assert(info->NumOutputs < max_outputs); - info->Outputs[info->NumOutputs].ComponentOffset = 0; - if (this->is_clip_distance_mesa) { - if (this->is_subscripted) { - num_components = 1; - info->Outputs[info->NumOutputs].ComponentOffset = - this->array_subscript % 4; - } else { - num_components = MIN2(4, this->size - components_so_far); - } - } - info->Outputs[info->NumOutputs].OutputRegister = - this->location + v + index * this->matrix_columns; - info->Outputs[info->NumOutputs].NumComponents = num_components; - info->Outputs[info->NumOutputs].OutputBuffer = buffer; - info->Outputs[info->NumOutputs].DstOffset = info->BufferStride[buffer]; - ++info->NumOutputs; - info->BufferStride[buffer] += num_components; - components_so_far += num_components; - } - } - assert(components_so_far == this->num_components()); - - info->Varyings[varying].Name = ralloc_strdup(prog, this->orig_name); - info->Varyings[varying].Type = this->type; - info->Varyings[varying].Size = this->size; - info->NumVarying++; - - return true; -} - - -/** - * Parse all the transform feedback declarations that were passed to - * glTransformFeedbackVaryings() and store them in tfeedback_decl objects. - * - * If an error occurs, the error is reported through linker_error() and false - * is returned. - */ -static bool -parse_tfeedback_decls(struct gl_context *ctx, struct gl_shader_program *prog, - const void *mem_ctx, unsigned num_names, - char **varying_names, tfeedback_decl *decls) -{ - for (unsigned i = 0; i < num_names; ++i) { - if (!decls[i].init(ctx, prog, mem_ctx, varying_names[i])) - return false; - /* From GL_EXT_transform_feedback: - * A program will fail to link if: - * - * * any two entries in the array specify the same varying - * variable; - * - * We interpret this to mean "any two entries in the array - * specify the same varying variable and array index", since transform - * feedback of arrays would be useless otherwise. - */ - for (unsigned j = 0; j < i; ++j) { - if (tfeedback_decl::is_same(decls[i], decls[j])) { - linker_error(prog, "Transform feedback varying %s specified " - "more than once.", varying_names[i]); - return false; - } - } - } - return true; -} - - -/** - * Assign a location for a variable that is produced in one pipeline stage - * (the "producer") and consumed in the next stage (the "consumer"). - * - * \param input_var is the input variable declaration in the consumer. - * - * \param output_var is the output variable declaration in the producer. - * - * \param input_index is the counter that keeps track of assigned input - * locations in the consumer. - * - * \param output_index is the counter that keeps track of assigned output - * locations in the producer. - * - * It is permissible for \c input_var to be NULL (this happens if a variable - * is output by the producer and consumed by transform feedback, but not - * consumed by the consumer). - * - * If the variable has already been assigned a location, this function has no - * effect. - */ -void -assign_varying_location(ir_variable *input_var, ir_variable *output_var, - unsigned *input_index, unsigned *output_index) -{ - if (output_var->location != -1) { - /* Location already assigned. */ - return; - } - - if (input_var) { - assert(input_var->location == -1); - input_var->location = *input_index; - } - - output_var->location = *output_index; - - /* FINISHME: Support for "varying" records in GLSL 1.50. */ - assert(!output_var->type->is_record()); - - if (output_var->type->is_array()) { - const unsigned slots = output_var->type->length - * output_var->type->fields.array->matrix_columns; - - *output_index += slots; - *input_index += slots; - } else { - const unsigned slots = output_var->type->matrix_columns; - - *output_index += slots; - *input_index += slots; - } -} - - -/** - * Assign locations for all variables that are produced in one pipeline stage - * (the "producer") and consumed in the next stage (the "consumer"). - * - * Variables produced by the producer may also be consumed by transform - * feedback. - * - * \param num_tfeedback_decls is the number of declarations indicating - * variables that may be consumed by transform feedback. - * - * \param tfeedback_decls is a pointer to an array of tfeedback_decl objects - * representing the result of parsing the strings passed to - * glTransformFeedbackVaryings(). assign_location() will be called for - * each of these objects that matches one of the outputs of the - * producer. - * - * When num_tfeedback_decls is nonzero, it is permissible for the consumer to - * be NULL. In this case, varying locations are assigned solely based on the - * requirements of transform feedback. - */ -bool -assign_varying_locations(struct gl_context *ctx, - struct gl_shader_program *prog, - gl_shader *producer, gl_shader *consumer, - unsigned num_tfeedback_decls, - tfeedback_decl *tfeedback_decls) -{ - /* FINISHME: Set dynamically when geometry shader support is added. */ - unsigned output_index = VERT_RESULT_VAR0; - unsigned input_index = FRAG_ATTRIB_VAR0; - - /* Operate in a total of three passes. - * - * 1. Assign locations for any matching inputs and outputs. - * - * 2. Mark output variables in the producer that do not have locations as - * not being outputs. This lets the optimizer eliminate them. - * - * 3. Mark input variables in the consumer that do not have locations as - * not being inputs. This lets the optimizer eliminate them. - */ - - link_invalidate_variable_locations(producer, ir_var_out, VERT_RESULT_VAR0); - if (consumer) - link_invalidate_variable_locations(consumer, ir_var_in, FRAG_ATTRIB_VAR0); - - foreach_list(node, producer->ir) { - ir_variable *const output_var = ((ir_instruction *) node)->as_variable(); - - if ((output_var == NULL) || (output_var->mode != ir_var_out)) - continue; - - ir_variable *input_var = - consumer ? consumer->symbols->get_variable(output_var->name) : NULL; - - if (input_var && input_var->mode != ir_var_in) - input_var = NULL; - - if (input_var) { - assign_varying_location(input_var, output_var, &input_index, - &output_index); - } - - for (unsigned i = 0; i < num_tfeedback_decls; ++i) { - if (!tfeedback_decls[i].is_assigned() && - tfeedback_decls[i].matches_var(output_var)) { - if (output_var->location == -1) { - assign_varying_location(input_var, output_var, &input_index, - &output_index); - } - if (!tfeedback_decls[i].assign_location(ctx, prog, output_var)) - return false; - } - } - } - - unsigned varying_vectors = 0; - - if (consumer) { - foreach_list(node, consumer->ir) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); - - if ((var == NULL) || (var->mode != ir_var_in)) - continue; - - if (var->location == -1) { - if (prog->Version <= 120) { - /* On page 25 (page 31 of the PDF) of the GLSL 1.20 spec: - * - * Only those varying variables used (i.e. read) in - * the fragment shader executable must be written to - * by the vertex shader executable; declaring - * superfluous varying variables in a vertex shader is - * permissible. - * - * We interpret this text as meaning that the VS must - * write the variable for the FS to read it. See - * "glsl1-varying read but not written" in piglit. - */ - - linker_error(prog, "fragment shader varying %s not written " - "by vertex shader\n.", var->name); - } - - /* An 'in' variable is only really a shader input if its - * value is written by the previous stage. - */ - var->mode = ir_var_auto; - } else { - /* The packing rules are used for vertex shader inputs are also - * used for fragment shader inputs. - */ - varying_vectors += count_attribute_slots(var->type); - } - } - } - - if (ctx->API == API_OPENGLES2 || prog->Version == 100) { - if (varying_vectors > ctx->Const.MaxVarying) { - if (ctx->Const.GLSLSkipStrictMaxVaryingLimitCheck) { - linker_warning(prog, "shader uses too many varying vectors " - "(%u > %u), but the driver will try to optimize " - "them out; this is non-portable out-of-spec " - "behavior\n", - varying_vectors, ctx->Const.MaxVarying); - } else { - linker_error(prog, "shader uses too many varying vectors " - "(%u > %u)\n", - varying_vectors, ctx->Const.MaxVarying); - return false; - } - } - } else { - const unsigned float_components = varying_vectors * 4; - if (float_components > ctx->Const.MaxVarying * 4) { - if (ctx->Const.GLSLSkipStrictMaxVaryingLimitCheck) { - linker_warning(prog, "shader uses too many varying components " - "(%u > %u), but the driver will try to optimize " - "them out; this is non-portable out-of-spec " - "behavior\n", - float_components, ctx->Const.MaxVarying * 4); - } else { - linker_error(prog, "shader uses too many varying components " - "(%u > %u)\n", - float_components, ctx->Const.MaxVarying * 4); - return false; - } - } - } - - return true; -} - - -/** - * Store transform feedback location assignments into - * prog->LinkedTransformFeedback based on the data stored in tfeedback_decls. - * - * If an error occurs, the error is reported through linker_error() and false - * is returned. - */ -static bool -store_tfeedback_info(struct gl_context *ctx, struct gl_shader_program *prog, - unsigned num_tfeedback_decls, - tfeedback_decl *tfeedback_decls) -{ - bool separate_attribs_mode = - prog->TransformFeedback.BufferMode == GL_SEPARATE_ATTRIBS; - - ralloc_free(prog->LinkedTransformFeedback.Varyings); - ralloc_free(prog->LinkedTransformFeedback.Outputs); - - memset(&prog->LinkedTransformFeedback, 0, - sizeof(prog->LinkedTransformFeedback)); - - prog->LinkedTransformFeedback.NumBuffers = - separate_attribs_mode ? num_tfeedback_decls : 1; - - prog->LinkedTransformFeedback.Varyings = - rzalloc_array(prog, - struct gl_transform_feedback_varying_info, - num_tfeedback_decls); - - unsigned num_outputs = 0; - for (unsigned i = 0; i < num_tfeedback_decls; ++i) - if (!tfeedback_decls[i].accumulate_num_outputs(prog, &num_outputs)) - return false; - - prog->LinkedTransformFeedback.Outputs = - rzalloc_array(prog, - struct gl_transform_feedback_output, - num_outputs); - - for (unsigned i = 0; i < num_tfeedback_decls; ++i) { - unsigned buffer = separate_attribs_mode ? i : 0; - if (!tfeedback_decls[i].store(ctx, prog, &prog->LinkedTransformFeedback, - buffer, i, num_outputs)) - return false; - } - assert(prog->LinkedTransformFeedback.NumOutputs == num_outputs); - - return true; -} - -/** - * Store the gl_FragDepth layout in the gl_shader_program struct. - */ -static void -store_fragdepth_layout(struct gl_shader_program *prog) -{ - if (prog->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL) { - return; - } - - struct exec_list *ir = prog->_LinkedShaders[MESA_SHADER_FRAGMENT]->ir; - - /* We don't look up the gl_FragDepth symbol directly because if - * gl_FragDepth is not used in the shader, it's removed from the IR. - * However, the symbol won't be removed from the symbol table. - * - * We're only interested in the cases where the variable is NOT removed - * from the IR. - */ - foreach_list(node, ir) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); - - if (var == NULL || var->mode != ir_var_out) { - continue; - } - - if (strcmp(var->name, "gl_FragDepth") == 0) { - switch (var->depth_layout) { - case ir_depth_layout_none: - prog->FragDepthLayout = FRAG_DEPTH_LAYOUT_NONE; - return; - case ir_depth_layout_any: - prog->FragDepthLayout = FRAG_DEPTH_LAYOUT_ANY; - return; - case ir_depth_layout_greater: - prog->FragDepthLayout = FRAG_DEPTH_LAYOUT_GREATER; - return; - case ir_depth_layout_less: - prog->FragDepthLayout = FRAG_DEPTH_LAYOUT_LESS; - return; - case ir_depth_layout_unchanged: - prog->FragDepthLayout = FRAG_DEPTH_LAYOUT_UNCHANGED; - return; - default: - assert(0); - return; - } - } - } -} - -/** - * Validate the resources used by a program versus the implementation limits - */ -static bool -check_resources(struct gl_context *ctx, struct gl_shader_program *prog) -{ - static const char *const shader_names[MESA_SHADER_TYPES] = { - "vertex", "fragment", "geometry" - }; - - const unsigned max_samplers[MESA_SHADER_TYPES] = { - ctx->Const.MaxVertexTextureImageUnits, - ctx->Const.MaxTextureImageUnits, - ctx->Const.MaxGeometryTextureImageUnits - }; - - const unsigned max_uniform_components[MESA_SHADER_TYPES] = { - ctx->Const.VertexProgram.MaxUniformComponents, - ctx->Const.FragmentProgram.MaxUniformComponents, - 0 /* FINISHME: Geometry shaders. */ - }; - - for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) { - struct gl_shader *sh = prog->_LinkedShaders[i]; - - if (sh == NULL) - continue; - - if (sh->num_samplers > max_samplers[i]) { - linker_error(prog, "Too many %s shader texture samplers", - shader_names[i]); - } - - if (sh->num_uniform_components > max_uniform_components[i]) { - if (ctx->Const.GLSLSkipStrictMaxUniformLimitCheck) { - linker_warning(prog, "Too many %s shader uniform components, " - "but the driver will try to optimize them out; " - "this is non-portable out-of-spec behavior\n", - shader_names[i]); - } else { - linker_error(prog, "Too many %s shader uniform components", - shader_names[i]); - } - } - } - - return prog->LinkStatus; -} - -void -link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) -{ - tfeedback_decl *tfeedback_decls = NULL; - unsigned num_tfeedback_decls = prog->TransformFeedback.NumVarying; - - void *mem_ctx = ralloc_context(NULL); // temporary linker context - - prog->LinkStatus = false; - prog->Validated = false; - prog->_Used = false; - - if (prog->InfoLog != NULL) - ralloc_free(prog->InfoLog); - - prog->InfoLog = ralloc_strdup(NULL, ""); - - /* Separate the shaders into groups based on their type. - */ - struct gl_shader **vert_shader_list; - unsigned num_vert_shaders = 0; - struct gl_shader **frag_shader_list; - unsigned num_frag_shaders = 0; - - vert_shader_list = (struct gl_shader **) - calloc(2 * prog->NumShaders, sizeof(struct gl_shader *)); - frag_shader_list = &vert_shader_list[prog->NumShaders]; - - unsigned min_version = UINT_MAX; - unsigned max_version = 0; - for (unsigned i = 0; i < prog->NumShaders; i++) { - min_version = MIN2(min_version, prog->Shaders[i]->Version); - max_version = MAX2(max_version, prog->Shaders[i]->Version); - - switch (prog->Shaders[i]->Type) { - case GL_VERTEX_SHADER: - vert_shader_list[num_vert_shaders] = prog->Shaders[i]; - num_vert_shaders++; - break; - case GL_FRAGMENT_SHADER: - frag_shader_list[num_frag_shaders] = prog->Shaders[i]; - num_frag_shaders++; - break; - case GL_GEOMETRY_SHADER: - /* FINISHME: Support geometry shaders. */ - assert(prog->Shaders[i]->Type != GL_GEOMETRY_SHADER); - break; - } - } - - /* Previous to GLSL version 1.30, different compilation units could mix and - * match shading language versions. With GLSL 1.30 and later, the versions - * of all shaders must match. - */ - assert(min_version >= 100); - assert(max_version <= 130); - if ((max_version >= 130 || min_version == 100) - && min_version != max_version) { - linker_error(prog, "all shaders must use same shading " - "language version\n"); - goto done; - } - - prog->Version = max_version; - - for (unsigned int i = 0; i < MESA_SHADER_TYPES; i++) { - if (prog->_LinkedShaders[i] != NULL) - ctx->Driver.DeleteShader(ctx, prog->_LinkedShaders[i]); - - prog->_LinkedShaders[i] = NULL; - } - - /* Link all shaders for a particular stage and validate the result. - */ - if (num_vert_shaders > 0) { - gl_shader *const sh = - link_intrastage_shaders(mem_ctx, ctx, prog, vert_shader_list, - num_vert_shaders); - - if (sh == NULL) - goto done; - - if (!validate_vertex_shader_executable(prog, sh)) - goto done; - - _mesa_reference_shader(ctx, &prog->_LinkedShaders[MESA_SHADER_VERTEX], - sh); - } - - if (num_frag_shaders > 0) { - gl_shader *const sh = - link_intrastage_shaders(mem_ctx, ctx, prog, frag_shader_list, - num_frag_shaders); - - if (sh == NULL) - goto done; - - if (!validate_fragment_shader_executable(prog, sh)) - goto done; - - _mesa_reference_shader(ctx, &prog->_LinkedShaders[MESA_SHADER_FRAGMENT], - sh); - } - - /* Here begins the inter-stage linking phase. Some initial validation is - * performed, then locations are assigned for uniforms, attributes, and - * varyings. - */ - if (cross_validate_uniforms(prog)) { - unsigned prev; - - for (prev = 0; prev < MESA_SHADER_TYPES; prev++) { - if (prog->_LinkedShaders[prev] != NULL) - break; - } - - /* Validate the inputs of each stage with the output of the preceding - * stage. - */ - for (unsigned i = prev + 1; i < MESA_SHADER_TYPES; i++) { - if (prog->_LinkedShaders[i] == NULL) - continue; - - if (!cross_validate_outputs_to_inputs(prog, - prog->_LinkedShaders[prev], - prog->_LinkedShaders[i])) - goto done; - - prev = i; - } - - prog->LinkStatus = true; - } - - /* Do common optimization before assigning storage for attributes, - * uniforms, and varyings. Later optimization could possibly make - * some of that unused. - */ - for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) { - if (prog->_LinkedShaders[i] == NULL) - continue; - - detect_recursion_linked(prog, prog->_LinkedShaders[i]->ir); - if (!prog->LinkStatus) - goto done; - - if (ctx->ShaderCompilerOptions[i].LowerClipDistance) - lower_clip_distance(prog->_LinkedShaders[i]->ir); - - unsigned max_unroll = ctx->ShaderCompilerOptions[i].MaxUnrollIterations; - - while (do_common_optimization(prog->_LinkedShaders[i]->ir, true, false, max_unroll)) - ; - } - - /* FINISHME: The value of the max_attribute_index parameter is - * FINISHME: implementation dependent based on the value of - * FINISHME: GL_MAX_VERTEX_ATTRIBS. GL_MAX_VERTEX_ATTRIBS must be - * FINISHME: at least 16, so hardcode 16 for now. - */ - if (!assign_attribute_or_color_locations(prog, MESA_SHADER_VERTEX, 16)) { - goto done; - } - - if (!assign_attribute_or_color_locations(prog, MESA_SHADER_FRAGMENT, ctx->Const.MaxDrawBuffers)) { - goto done; - } - - unsigned prev; - for (prev = 0; prev < MESA_SHADER_TYPES; prev++) { - if (prog->_LinkedShaders[prev] != NULL) - break; - } - - if (num_tfeedback_decls != 0) { - /* From GL_EXT_transform_feedback: - * A program will fail to link if: - * - * * the specified by TransformFeedbackVaryingsEXT is - * non-zero, but the program object has no vertex or geometry - * shader; - */ - if (prev >= MESA_SHADER_FRAGMENT) { - linker_error(prog, "Transform feedback varyings specified, but " - "no vertex or geometry shader is present."); - goto done; - } - - tfeedback_decls = ralloc_array(mem_ctx, tfeedback_decl, - prog->TransformFeedback.NumVarying); - if (!parse_tfeedback_decls(ctx, prog, mem_ctx, num_tfeedback_decls, - prog->TransformFeedback.VaryingNames, - tfeedback_decls)) - goto done; - } - - for (unsigned i = prev + 1; i < MESA_SHADER_TYPES; i++) { - if (prog->_LinkedShaders[i] == NULL) - continue; - - if (!assign_varying_locations( - ctx, prog, prog->_LinkedShaders[prev], prog->_LinkedShaders[i], - i == MESA_SHADER_FRAGMENT ? num_tfeedback_decls : 0, - tfeedback_decls)) - goto done; - - prev = i; - } - - if (prev != MESA_SHADER_FRAGMENT && num_tfeedback_decls != 0) { - /* There was no fragment shader, but we still have to assign varying - * locations for use by transform feedback. - */ - if (!assign_varying_locations( - ctx, prog, prog->_LinkedShaders[prev], NULL, num_tfeedback_decls, - tfeedback_decls)) - goto done; - } - - if (!store_tfeedback_info(ctx, prog, num_tfeedback_decls, tfeedback_decls)) - goto done; - - if (prog->_LinkedShaders[MESA_SHADER_VERTEX] != NULL) { - demote_shader_inputs_and_outputs(prog->_LinkedShaders[MESA_SHADER_VERTEX], - ir_var_out); - - /* Eliminate code that is now dead due to unused vertex outputs being - * demoted. - */ - while (do_dead_code(prog->_LinkedShaders[MESA_SHADER_VERTEX]->ir, false)) - ; - } - - if (prog->_LinkedShaders[MESA_SHADER_GEOMETRY] != NULL) { - gl_shader *const sh = prog->_LinkedShaders[MESA_SHADER_GEOMETRY]; - - demote_shader_inputs_and_outputs(sh, ir_var_in); - demote_shader_inputs_and_outputs(sh, ir_var_inout); - demote_shader_inputs_and_outputs(sh, ir_var_out); - - /* Eliminate code that is now dead due to unused geometry outputs being - * demoted. - */ - while (do_dead_code(prog->_LinkedShaders[MESA_SHADER_GEOMETRY]->ir, false)) - ; - } - - if (prog->_LinkedShaders[MESA_SHADER_FRAGMENT] != NULL) { - gl_shader *const sh = prog->_LinkedShaders[MESA_SHADER_FRAGMENT]; - - demote_shader_inputs_and_outputs(sh, ir_var_in); - - /* Eliminate code that is now dead due to unused fragment inputs being - * demoted. This shouldn't actually do anything other than remove - * declarations of the (now unused) global variables. - */ - while (do_dead_code(prog->_LinkedShaders[MESA_SHADER_FRAGMENT]->ir, false)) - ; - } - - update_array_sizes(prog); - link_assign_uniform_locations(prog); - store_fragdepth_layout(prog); - - if (!check_resources(ctx, prog)) - goto done; - - /* OpenGL ES requires that a vertex shader and a fragment shader both be - * present in a linked program. By checking for use of shading language - * version 1.00, we also catch the GL_ARB_ES2_compatibility case. - */ - if (!prog->InternalSeparateShader && - (ctx->API == API_OPENGLES2 || prog->Version == 100)) { - if (prog->_LinkedShaders[MESA_SHADER_VERTEX] == NULL) { - linker_error(prog, "program lacks a vertex shader\n"); - } else if (prog->_LinkedShaders[MESA_SHADER_FRAGMENT] == NULL) { - linker_error(prog, "program lacks a fragment shader\n"); - } - } - - /* FINISHME: Assign fragment shader output locations. */ - -done: - free(vert_shader_list); - - for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) { - if (prog->_LinkedShaders[i] == NULL) - continue; - - /* Retain any live IR, but trash the rest. */ - reparent_ir(prog->_LinkedShaders[i]->ir, prog->_LinkedShaders[i]->ir); - - /* The symbol table in the linked shaders may contain references to - * variables that were removed (e.g., unused uniforms). Since it may - * contain junk, there is no possible valid use. Delete it and set the - * pointer to NULL. - */ - delete prog->_LinkedShaders[i]->symbols; - prog->_LinkedShaders[i]->symbols = NULL; - } - - ralloc_free(mem_ctx); -} diff --git a/dll/opengl/mesa/src/glsl/linker.h b/dll/opengl/mesa/src/glsl/linker.h deleted file mode 100644 index 433c63be246..00000000000 --- a/dll/opengl/mesa/src/glsl/linker.h +++ /dev/null @@ -1,82 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#pragma once -#ifndef GLSL_LINKER_H -#define GLSL_LINKER_H - -extern bool -link_function_calls(gl_shader_program *prog, gl_shader *main, - gl_shader **shader_list, unsigned num_shaders); - -extern void -link_invalidate_variable_locations(gl_shader *sh, enum ir_variable_mode mode, - int generic_base); - -extern void -link_assign_uniform_locations(struct gl_shader_program *prog); - -/** - * Class for processing all of the leaf fields of an uniform - * - * Leaves are, roughly speaking, the parts of the uniform that the application - * could query with \c glGetUniformLocation (or that could be returned by - * \c glGetActiveUniforms). - * - * Classes my derive from this class to implement specific functionality. - * This class only provides the mechanism to iterate over the leaves. Derived - * classes must implement \c ::visit_field and may override \c ::process. - */ -class uniform_field_visitor { -public: - /** - * Begin processing a uniform - * - * Classes that overload this function should call \c ::process from the - * base class to start the recursive processing of the uniform. - * - * \param var The uniform variable that is to be processed - * - * Calls \c ::visit_field for each leaf of the uniform. - */ - void process(ir_variable *var); - -protected: - /** - * Method invoked for each leaf of the uniform - * - * \param type Type of the field. - * \param name Fully qualified name of the field. - */ - virtual void visit_field(const glsl_type *type, const char *name) = 0; - -private: - /** - * \param name_length Length of the current name \b not including the - * terminating \c NUL character. - */ - void recursion(const glsl_type *t, char **name, unsigned name_length); -}; - -#endif /* GLSL_LINKER_H */ diff --git a/dll/opengl/mesa/src/glsl/list.h b/dll/opengl/mesa/src/glsl/list.h deleted file mode 100644 index 1d46365faec..00000000000 --- a/dll/opengl/mesa/src/glsl/list.h +++ /dev/null @@ -1,501 +0,0 @@ -/* - * Copyright © 2008, 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file list.h - * \brief Doubly-linked list abstract container type. - * - * Each doubly-linked list has a sentinel head and tail node. These nodes - * contain no data. The head sentinel can be identified by its \c prev - * pointer being \c NULL. The tail sentinel can be identified by its - * \c next pointer being \c NULL. - * - * A list is empty if either the head sentinel's \c next pointer points to the - * tail sentinel or the tail sentinel's \c prev poiner points to the head - * sentinel. - * - * Instead of tracking two separate \c node structures and a \c list structure - * that points to them, the sentinel nodes are in a single structure. Noting - * that each sentinel node always has one \c NULL pointer, the \c NULL - * pointers occupy the same memory location. In the \c list structure - * contains a the following: - * - * - A \c head pointer that represents the \c next pointer of the - * head sentinel node. - * - A \c tail pointer that represents the \c prev pointer of the head - * sentinel node and the \c next pointer of the tail sentinel node. This - * pointer is \b always \c NULL. - * - A \c tail_prev pointer that represents the \c prev pointer of the - * tail sentinel node. - * - * Therefore, if \c head->next is \c NULL or \c tail_prev->prev is \c NULL, - * the list is empty. - * - * To anyone familiar with "exec lists" on the Amiga, this structure should - * be immediately recognizable. See the following link for the original Amiga - * operating system documentation on the subject. - * - * http://www.natami.net/dev/Libraries_Manual_guide/node02D7.html - * - * \author Ian Romanick - */ - -#pragma once -#ifndef LIST_CONTAINER_H -#define LIST_CONTAINER_H - -#ifndef __cplusplus -#include -#endif -#include - -#include "ralloc.h" - -struct exec_node { - struct exec_node *next; - struct exec_node *prev; - -#ifdef __cplusplus - /* Callers of this ralloc-based new need not call delete. It's - * easier to just ralloc_free 'ctx' (or any of its ancestors). */ - static void* operator new(size_t size, void *ctx) - { - void *node; - - node = ralloc_size(ctx, size); - assert(node != NULL); - - return node; - } - - /* If the user *does* call delete, that's OK, we will just - * ralloc_free in that case. */ - static void operator delete(void *node) - { - ralloc_free(node); - } - - exec_node() : next(NULL), prev(NULL) - { - /* empty */ - } - - const exec_node *get_next() const - { - return next; - } - - exec_node *get_next() - { - return next; - } - - const exec_node *get_prev() const - { - return prev; - } - - exec_node *get_prev() - { - return prev; - } - - void remove() - { - next->prev = prev; - prev->next = next; - next = NULL; - prev = NULL; - } - - /** - * Link a node with itself - * - * This creates a sort of degenerate list that is occasionally useful. - */ - void self_link() - { - next = this; - prev = this; - } - - /** - * Insert a node in the list after the current node - */ - void insert_after(exec_node *after) - { - after->next = this->next; - after->prev = this; - - this->next->prev = after; - this->next = after; - } - /** - * Insert a node in the list before the current node - */ - void insert_before(exec_node *before) - { - before->next = this; - before->prev = this->prev; - - this->prev->next = before; - this->prev = before; - } - - /** - * Insert another list in the list before the current node - */ - void insert_before(struct exec_list *before); - - /** - * Replace the current node with the given node. - */ - void replace_with(exec_node *replacement) - { - replacement->prev = this->prev; - replacement->next = this->next; - - this->prev->next = replacement; - this->next->prev = replacement; - } - - /** - * Is this the sentinel at the tail of the list? - */ - bool is_tail_sentinel() const - { - return this->next == NULL; - } - - /** - * Is this the sentinel at the head of the list? - */ - bool is_head_sentinel() const - { - return this->prev == NULL; - } -#endif -}; - - -#ifdef __cplusplus -/* This macro will not work correctly if `t' uses virtual inheritance. If you - * are using virtual inheritance, you deserve a slow and painful death. Enjoy! - */ -#define exec_list_offsetof(t, f, p) \ - (((char *) &((t *) p)->f) - ((char *) p)) -#else -#define exec_list_offsetof(t, f, p) offsetof(t, f) -#endif - -/** - * Get a pointer to the structure containing an exec_node - * - * Given a pointer to an \c exec_node embedded in a structure, get a pointer to - * the containing structure. - * - * \param type Base type of the structure containing the node - * \param node Pointer to the \c exec_node - * \param field Name of the field in \c type that is the embedded \c exec_node - */ -#define exec_node_data(type, node, field) \ - ((type *) (((char *) node) - exec_list_offsetof(type, field, node))) - -#ifdef __cplusplus -struct exec_node; - -class iterator { -public: - void next() - { - } - - void *get() - { - return NULL; - } - - bool has_next() const - { - return false; - } -}; - -class exec_list_iterator : public iterator { -public: - exec_list_iterator(exec_node *n) : node(n), _next(n->next) - { - /* empty */ - } - - void next() - { - node = _next; - _next = node->next; - } - - void remove() - { - node->remove(); - } - - exec_node *get() - { - return node; - } - - bool has_next() const - { - return _next != NULL; - } - -private: - exec_node *node; - exec_node *_next; -}; - -#define foreach_iter(iter_type, iter, container) \ - for (iter_type iter = (container) . iterator(); iter.has_next(); iter.next()) -#endif - - -struct exec_list { - struct exec_node *head; - struct exec_node *tail; - struct exec_node *tail_pred; - -#ifdef __cplusplus - /* Callers of this ralloc-based new need not call delete. It's - * easier to just ralloc_free 'ctx' (or any of its ancestors). */ - static void* operator new(size_t size, void *ctx) - { - void *node; - - node = ralloc_size(ctx, size); - assert(node != NULL); - - return node; - } - - /* If the user *does* call delete, that's OK, we will just - * ralloc_free in that case. */ - static void operator delete(void *node) - { - ralloc_free(node); - } - - exec_list() - { - make_empty(); - } - - void make_empty() - { - head = (exec_node *) & tail; - tail = NULL; - tail_pred = (exec_node *) & head; - } - - bool is_empty() const - { - /* There are three ways to test whether a list is empty or not. - * - * - Check to see if the \c head points to the \c tail. - * - Check to see if the \c tail_pred points to the \c head. - * - Check to see if the \c head is the sentinel node by test whether its - * \c next pointer is \c NULL. - * - * The first two methods tend to generate better code on modern systems - * because they save a pointer dereference. - */ - return head == (exec_node *) &tail; - } - - const exec_node *get_head() const - { - return !is_empty() ? head : NULL; - } - - exec_node *get_head() - { - return !is_empty() ? head : NULL; - } - - const exec_node *get_tail() const - { - return !is_empty() ? tail_pred : NULL; - } - - exec_node *get_tail() - { - return !is_empty() ? tail_pred : NULL; - } - - void push_head(exec_node *n) - { - n->next = head; - n->prev = (exec_node *) &head; - - n->next->prev = n; - head = n; - } - - void push_tail(exec_node *n) - { - n->next = (exec_node *) &tail; - n->prev = tail_pred; - - n->prev->next = n; - tail_pred = n; - } - - void push_degenerate_list_at_head(exec_node *n) - { - assert(n->prev->next == n); - - n->prev->next = head; - head->prev = n->prev; - n->prev = (exec_node *) &head; - head = n; - } - - /** - * Remove the first node from a list and return it - * - * \return - * The first node in the list or \c NULL if the list is empty. - * - * \sa exec_list::get_head - */ - exec_node *pop_head() - { - exec_node *const n = this->get_head(); - if (n != NULL) - n->remove(); - - return n; - } - - /** - * Move all of the nodes from this list to the target list - */ - void move_nodes_to(exec_list *target) - { - if (is_empty()) { - target->make_empty(); - } else { - target->head = head; - target->tail = NULL; - target->tail_pred = tail_pred; - - target->head->prev = (exec_node *) &target->head; - target->tail_pred->next = (exec_node *) &target->tail; - - make_empty(); - } - } - - /** - * Append all nodes from the source list to the target list - */ - void - append_list(exec_list *source) - { - if (source->is_empty()) - return; - - /* Link the first node of the source with the last node of the target list. - */ - this->tail_pred->next = source->head; - source->head->prev = this->tail_pred; - - /* Make the tail of the source list be the tail of the target list. - */ - this->tail_pred = source->tail_pred; - this->tail_pred->next = (exec_node *) &this->tail; - - /* Make the source list empty for good measure. - */ - source->make_empty(); - } - - exec_list_iterator iterator() - { - return exec_list_iterator(head); - } - - exec_list_iterator iterator() const - { - return exec_list_iterator((exec_node *) head); - } -#endif -}; - - -#ifdef __cplusplus -inline void exec_node::insert_before(exec_list *before) -{ - if (before->is_empty()) - return; - - before->tail_pred->next = this; - before->head->prev = this->prev; - - this->prev->next = before->head; - this->prev = before->tail_pred; - - before->make_empty(); -} -#endif - -/** - * This version is safe even if the current node is removed. - */ -#define foreach_list_safe(__node, __list) \ - for (exec_node * __node = (__list)->head, * __next = __node->next \ - ; __next != NULL \ - ; __node = __next, __next = __next->next) - -#define foreach_list(__node, __list) \ - for (exec_node * __node = (__list)->head \ - ; (__node)->next != NULL \ - ; (__node) = (__node)->next) - -#define foreach_list_const(__node, __list) \ - for (const exec_node * __node = (__list)->head \ - ; (__node)->next != NULL \ - ; (__node) = (__node)->next) - -#define foreach_list_typed(__type, __node, __field, __list) \ - for (__type * __node = \ - exec_node_data(__type, (__list)->head, __field); \ - (__node)->__field.next != NULL; \ - (__node) = exec_node_data(__type, (__node)->__field.next, __field)) - -#define foreach_list_typed_const(__type, __node, __field, __list) \ - for (const __type * __node = \ - exec_node_data(__type, (__list)->head, __field); \ - (__node)->__field.next != NULL; \ - (__node) = exec_node_data(__type, (__node)->__field.next, __field)) - -#endif /* LIST_CONTAINER_H */ diff --git a/dll/opengl/mesa/src/glsl/loop_analysis.cpp b/dll/opengl/mesa/src/glsl/loop_analysis.cpp deleted file mode 100644 index 6a0e4da5100..00000000000 --- a/dll/opengl/mesa/src/glsl/loop_analysis.cpp +++ /dev/null @@ -1,528 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "glsl_types.h" -#include "loop_analysis.h" -#include "ir_hierarchical_visitor.h" - -static bool is_loop_terminator(ir_if *ir); - -static bool all_expression_operands_are_loop_constant(ir_rvalue *, - hash_table *); - -static ir_rvalue *get_basic_induction_increment(ir_assignment *, hash_table *); - - -loop_state::loop_state() -{ - this->ht = hash_table_ctor(0, hash_table_pointer_hash, - hash_table_pointer_compare); - this->mem_ctx = ralloc_context(NULL); - this->loop_found = false; -} - - -loop_state::~loop_state() -{ - hash_table_dtor(this->ht); - ralloc_free(this->mem_ctx); -} - - -loop_variable_state * -loop_state::insert(ir_loop *ir) -{ - loop_variable_state *ls = new(this->mem_ctx) loop_variable_state; - - hash_table_insert(this->ht, ls, ir); - this->loop_found = true; - - return ls; -} - - -loop_variable_state * -loop_state::get(const ir_loop *ir) -{ - return (loop_variable_state *) hash_table_find(this->ht, ir); -} - - -loop_variable * -loop_variable_state::get(const ir_variable *ir) -{ - return (loop_variable *) hash_table_find(this->var_hash, ir); -} - - -loop_variable * -loop_variable_state::insert(ir_variable *var) -{ - void *mem_ctx = ralloc_parent(this); - loop_variable *lv = rzalloc(mem_ctx, loop_variable); - - lv->var = var; - - hash_table_insert(this->var_hash, lv, lv->var); - this->variables.push_tail(lv); - - return lv; -} - - -loop_terminator * -loop_variable_state::insert(ir_if *if_stmt) -{ - void *mem_ctx = ralloc_parent(this); - loop_terminator *t = rzalloc(mem_ctx, loop_terminator); - - t->ir = if_stmt; - this->terminators.push_tail(t); - - return t; -} - - -class loop_analysis : public ir_hierarchical_visitor { -public: - loop_analysis(); - - virtual ir_visitor_status visit(ir_loop_jump *); - virtual ir_visitor_status visit(ir_dereference_variable *); - - virtual ir_visitor_status visit_enter(ir_call *); - - virtual ir_visitor_status visit_enter(ir_loop *); - virtual ir_visitor_status visit_leave(ir_loop *); - virtual ir_visitor_status visit_enter(ir_assignment *); - virtual ir_visitor_status visit_leave(ir_assignment *); - virtual ir_visitor_status visit_enter(ir_if *); - virtual ir_visitor_status visit_leave(ir_if *); - - loop_state *loops; - - int if_statement_depth; - - ir_assignment *current_assignment; - - exec_list state; -}; - - -loop_analysis::loop_analysis() -{ - this->loops = new loop_state; - - this->if_statement_depth = 0; - this->current_assignment = NULL; -} - - -ir_visitor_status -loop_analysis::visit(ir_loop_jump *ir) -{ - (void) ir; - - assert(!this->state.is_empty()); - - loop_variable_state *const ls = - (loop_variable_state *) this->state.get_head(); - - ls->num_loop_jumps++; - - return visit_continue; -} - - -ir_visitor_status -loop_analysis::visit_enter(ir_call *ir) -{ - /* If we're not somewhere inside a loop, there's nothing to do. */ - if (this->state.is_empty()) - return visit_continue; - - loop_variable_state *const ls = - (loop_variable_state *) this->state.get_head(); - - ls->contains_calls = true; - return visit_continue_with_parent; -} - - -ir_visitor_status -loop_analysis::visit(ir_dereference_variable *ir) -{ - /* If we're not somewhere inside a loop, there's nothing to do. - */ - if (this->state.is_empty()) - return visit_continue; - - loop_variable_state *const ls = - (loop_variable_state *) this->state.get_head(); - - ir_variable *var = ir->variable_referenced(); - loop_variable *lv = ls->get(var); - - if (lv == NULL) { - lv = ls->insert(var); - lv->read_before_write = !this->in_assignee; - } - - if (this->in_assignee) { - assert(this->current_assignment != NULL); - - lv->conditional_assignment = (this->if_statement_depth > 0) - || (this->current_assignment->condition != NULL); - - if (lv->first_assignment == NULL) { - assert(lv->num_assignments == 0); - - lv->first_assignment = this->current_assignment; - } - - lv->num_assignments++; - } else if (lv->first_assignment == this->current_assignment) { - /* This catches the case where the variable is used in the RHS of an - * assignment where it is also in the LHS. - */ - lv->read_before_write = true; - } - - return visit_continue; -} - -ir_visitor_status -loop_analysis::visit_enter(ir_loop *ir) -{ - loop_variable_state *ls = this->loops->insert(ir); - this->state.push_head(ls); - - return visit_continue; -} - -ir_visitor_status -loop_analysis::visit_leave(ir_loop *ir) -{ - loop_variable_state *const ls = - (loop_variable_state *) this->state.pop_head(); - - /* Function calls may contain side effects. These could alter any of our - * variables in ways that cannot be known, and may even terminate shader - * execution (say, calling discard in the fragment shader). So we can't - * rely on any of our analysis about assignments to variables. - * - * We could perform some conservative analysis (prove there's no statically - * possible assignment, etc.) but it isn't worth it for now; function - * inlining will allow us to unroll loops anyway. - */ - if (ls->contains_calls) - return visit_continue; - - foreach_list(node, &ir->body_instructions) { - /* Skip over declarations at the start of a loop. - */ - if (((ir_instruction *) node)->as_variable()) - continue; - - ir_if *if_stmt = ((ir_instruction *) node)->as_if(); - - if ((if_stmt != NULL) && is_loop_terminator(if_stmt)) - ls->insert(if_stmt); - else - break; - } - - - foreach_list_safe(node, &ls->variables) { - loop_variable *lv = (loop_variable *) node; - - /* Move variables that are already marked as being loop constant to - * a separate list. These trivially don't need to be tested. - */ - if (lv->is_loop_constant()) { - lv->remove(); - ls->constants.push_tail(lv); - } - } - - /* Each variable assigned in the loop that isn't already marked as being loop - * constant might still be loop constant. The requirements at this point - * are: - * - * - Variable is written before it is read. - * - * - Only one assignment to the variable. - * - * - All operands on the RHS of the assignment are also loop constants. - * - * The last requirement is the reason for the progress loop. A variable - * marked as a loop constant on one pass may allow other variables to be - * marked as loop constant on following passes. - */ - bool progress; - do { - progress = false; - - foreach_list_safe(node, &ls->variables) { - loop_variable *lv = (loop_variable *) node; - - if (lv->conditional_assignment || (lv->num_assignments > 1)) - continue; - - /* Process the RHS of the assignment. If all of the variables - * accessed there are loop constants, then add this - */ - ir_rvalue *const rhs = lv->first_assignment->rhs; - if (all_expression_operands_are_loop_constant(rhs, ls->var_hash)) { - lv->rhs_clean = true; - - if (lv->is_loop_constant()) { - progress = true; - - lv->remove(); - ls->constants.push_tail(lv); - } - } - } - } while (progress); - - /* The remaining variables that are not loop invariant might be loop - * induction variables. - */ - foreach_list_safe(node, &ls->variables) { - loop_variable *lv = (loop_variable *) node; - - /* If there is more than one assignment to a variable, it cannot be a - * loop induction variable. This isn't strictly true, but this is a - * very simple induction variable detector, and it can't handle more - * complex cases. - */ - if (lv->num_assignments > 1) - continue; - - /* All of the variables with zero assignments in the loop are loop - * invariant, and they should have already been filtered out. - */ - assert(lv->num_assignments == 1); - assert(lv->first_assignment != NULL); - - /* The assignmnet to the variable in the loop must be unconditional. - */ - if (lv->conditional_assignment) - continue; - - /* Basic loop induction variables have a single assignment in the loop - * that has the form 'VAR = VAR + i' or 'VAR = VAR - i' where i is a - * loop invariant. - */ - ir_rvalue *const inc = - get_basic_induction_increment(lv->first_assignment, ls->var_hash); - if (inc != NULL) { - lv->iv_scale = NULL; - lv->biv = lv->var; - lv->increment = inc; - - lv->remove(); - ls->induction_variables.push_tail(lv); - } - } - - return visit_continue; -} - -ir_visitor_status -loop_analysis::visit_enter(ir_if *ir) -{ - (void) ir; - - if (!this->state.is_empty()) - this->if_statement_depth++; - - return visit_continue; -} - -ir_visitor_status -loop_analysis::visit_leave(ir_if *ir) -{ - (void) ir; - - if (!this->state.is_empty()) - this->if_statement_depth--; - - return visit_continue; -} - -ir_visitor_status -loop_analysis::visit_enter(ir_assignment *ir) -{ - /* If we're not somewhere inside a loop, there's nothing to do. - */ - if (this->state.is_empty()) - return visit_continue_with_parent; - - this->current_assignment = ir; - - return visit_continue; -} - -ir_visitor_status -loop_analysis::visit_leave(ir_assignment *ir) -{ - /* Since the visit_enter exits with visit_continue_with_parent for this - * case, the loop state stack should never be empty here. - */ - assert(!this->state.is_empty()); - - assert(this->current_assignment == ir); - this->current_assignment = NULL; - - return visit_continue; -} - - -class examine_rhs : public ir_hierarchical_visitor { -public: - examine_rhs(hash_table *loop_variables) - { - this->only_uses_loop_constants = true; - this->loop_variables = loop_variables; - } - - virtual ir_visitor_status visit(ir_dereference_variable *ir) - { - loop_variable *lv = - (loop_variable *) hash_table_find(this->loop_variables, ir->var); - - assert(lv != NULL); - - if (lv->is_loop_constant()) { - return visit_continue; - } else { - this->only_uses_loop_constants = false; - return visit_stop; - } - } - - hash_table *loop_variables; - bool only_uses_loop_constants; -}; - - -bool -all_expression_operands_are_loop_constant(ir_rvalue *ir, hash_table *variables) -{ - examine_rhs v(variables); - - ir->accept(&v); - - return v.only_uses_loop_constants; -} - - -ir_rvalue * -get_basic_induction_increment(ir_assignment *ir, hash_table *var_hash) -{ - /* The RHS must be a binary expression. - */ - ir_expression *const rhs = ir->rhs->as_expression(); - if ((rhs == NULL) - || ((rhs->operation != ir_binop_add) - && (rhs->operation != ir_binop_sub))) - return NULL; - - /* One of the of operands of the expression must be the variable assigned. - * If the operation is subtraction, the variable in question must be the - * "left" operand. - */ - ir_variable *const var = ir->lhs->variable_referenced(); - - ir_variable *const op0 = rhs->operands[0]->variable_referenced(); - ir_variable *const op1 = rhs->operands[1]->variable_referenced(); - - if (((op0 != var) && (op1 != var)) - || ((op1 == var) && (rhs->operation == ir_binop_sub))) - return NULL; - - ir_rvalue *inc = (op0 == var) ? rhs->operands[1] : rhs->operands[0]; - - if (inc->as_constant() == NULL) { - ir_variable *const inc_var = inc->variable_referenced(); - if (inc_var != NULL) { - loop_variable *lv = - (loop_variable *) hash_table_find(var_hash, inc_var); - - if (!lv->is_loop_constant()) - inc = NULL; - } else - inc = NULL; - } - - if ((inc != NULL) && (rhs->operation == ir_binop_sub)) { - void *mem_ctx = ralloc_parent(ir); - - inc = new(mem_ctx) ir_expression(ir_unop_neg, - inc->type, - inc->clone(mem_ctx, NULL), - NULL); - } - - return inc; -} - - -/** - * Detect whether an if-statement is a loop terminating condition - * - * Detects if-statements of the form - * - * (if (expression bool ...) (break)) - */ -bool -is_loop_terminator(ir_if *ir) -{ - if (!ir->else_instructions.is_empty()) - return false; - - ir_instruction *const inst = - (ir_instruction *) ir->then_instructions.get_head(); - assert(inst != NULL); - - if (inst->ir_type != ir_type_loop_jump) - return false; - - ir_loop_jump *const jump = (ir_loop_jump *) inst; - if (jump->mode != ir_loop_jump::jump_break) - return false; - - return true; -} - - -loop_state * -analyze_loop_variables(exec_list *instructions) -{ - loop_analysis v; - - v.run(instructions); - return v.loops; -} diff --git a/dll/opengl/mesa/src/glsl/loop_analysis.h b/dll/opengl/mesa/src/glsl/loop_analysis.h deleted file mode 100644 index 05c982fc164..00000000000 --- a/dll/opengl/mesa/src/glsl/loop_analysis.h +++ /dev/null @@ -1,255 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#pragma once -#ifndef LOOP_ANALYSIS_H -#define LOOP_ANALYSIS_H - -#include "ir.h" -#include "program/hash_table.h" - -/** - * Analyze and classify all variables used in all loops in the instruction list - */ -extern class loop_state * -analyze_loop_variables(exec_list *instructions); - - -/** - * Fill in loop control fields - * - * Based on analysis of loop variables, this function tries to remove sequences - * in the loop of the form - * - * (if (expression bool ...) (break)) - * - * and fill in the \c ir_loop::from, \c ir_loop::to, and \c ir_loop::counter - * fields of the \c ir_loop. - * - * In this process, some conditional break-statements may be eliminated - * altogether. For example, if it is provable that one loop exit condition will - * always be satisfied before another, the unnecessary exit condition will be - * removed. - */ -extern bool -set_loop_controls(exec_list *instructions, loop_state *ls); - - -extern bool -unroll_loops(exec_list *instructions, loop_state *ls, unsigned max_iterations); - - -/** - * Tracking for all variables used in a loop - */ -class loop_variable_state : public exec_node { -public: - class loop_variable *get(const ir_variable *); - class loop_variable *insert(ir_variable *); - class loop_terminator *insert(ir_if *); - - - /** - * Loop whose variable state is being tracked by this structure - */ - ir_loop *loop; - - /** - * Variables that have not yet been classified - */ - exec_list variables; - - /** - * Variables whose values are constant within the body of the loop - * - * This list contains \c loop_variable objects. - */ - exec_list constants; - - /** - * Induction variables for this loop - * - * This list contains \c loop_variable objects. - */ - exec_list induction_variables; - - /** - * Simple if-statements that lead to the termination of the loop - * - * This list contains \c loop_terminator objects. - * - * \sa is_loop_terminator - */ - exec_list terminators; - - /** - * Hash table containing all variables accessed in this loop - */ - hash_table *var_hash; - - /** - * Maximum number of loop iterations. - * - * If this value is negative, then the loop may be infinite. This actually - * means that analysis was unable to determine an upper bound on the number - * of loop iterations. - */ - int max_iterations; - - /** - * Number of ir_loop_jump instructions that operate on this loop - */ - unsigned num_loop_jumps; - - /** - * Whether this loop contains any function calls. - */ - bool contains_calls; - - loop_variable_state() - { - this->max_iterations = -1; - this->num_loop_jumps = 0; - this->contains_calls = false; - this->var_hash = hash_table_ctor(0, hash_table_pointer_hash, - hash_table_pointer_compare); - } - - ~loop_variable_state() - { - hash_table_dtor(this->var_hash); - } - - static void* operator new(size_t size, void *ctx) - { - void *lvs = ralloc_size(ctx, size); - assert(lvs != NULL); - - ralloc_set_destructor(lvs, (void (*)(void*)) destructor); - - return lvs; - } - -private: - static void - destructor(loop_variable_state *lvs) - { - lvs->~loop_variable_state(); - } -}; - - -class loop_variable : public exec_node { -public: - /** The variable in question. */ - ir_variable *var; - - /** Is the variable read in the loop before it is written? */ - bool read_before_write; - - /** Are all variables in the RHS of the assignment loop constants? */ - bool rhs_clean; - - /** Is there an assignment to the variable that is conditional? */ - bool conditional_assignment; - - /** Reference to the first assignment to the variable in the loop body. */ - ir_assignment *first_assignment; - - /** Number of assignments to the variable in the loop body. */ - unsigned num_assignments; - - /** - * Increment values for loop induction variables - * - * Loop induction variables have a single increment of the form - * \c b * \c biv + \c c, where \c b and \c c are loop constants and \c i - * is a basic loop induction variable. - * - * If \c iv_scale is \c NULL, 1 is used. If \c biv is the same as \c var, - * then \c var is a basic loop induction variable. - */ - /*@{*/ - ir_rvalue *iv_scale; - ir_variable *biv; - ir_rvalue *increment; - /*@}*/ - - - inline bool is_loop_constant() const - { - const bool is_const = (this->num_assignments == 0) - || ((this->num_assignments == 1) - && !this->conditional_assignment - && !this->read_before_write - && this->rhs_clean); - - /* If the RHS of *the* assignment is clean, then there must be exactly - * one assignment of the variable. - */ - assert((this->rhs_clean && (this->num_assignments == 1)) - || !this->rhs_clean); - - /* Variables that are marked read-only *MUST* be loop constant. - */ - assert(!this->var->read_only || (this->var->read_only && is_const)); - - return is_const; - } -}; - - -class loop_terminator : public exec_node { -public: - ir_if *ir; -}; - - -class loop_state { -public: - ~loop_state(); - - /** - * Get the loop variable state data for a particular loop - */ - loop_variable_state *get(const ir_loop *); - - loop_variable_state *insert(ir_loop *ir); - - bool loop_found; - -private: - loop_state(); - - /** - * Hash table containing all loops that have been analyzed. - */ - hash_table *ht; - - void *mem_ctx; - - friend class loop_analysis; -}; - -#endif /* LOOP_ANALYSIS_H */ diff --git a/dll/opengl/mesa/src/glsl/loop_controls.cpp b/dll/opengl/mesa/src/glsl/loop_controls.cpp deleted file mode 100644 index 9acbadc50ea..00000000000 --- a/dll/opengl/mesa/src/glsl/loop_controls.cpp +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include -#include "main/compiler.h" -#include "glsl_types.h" -#include "loop_analysis.h" -#include "ir_hierarchical_visitor.h" - -/** - * Find an initializer of a variable outside a loop - * - * Works backwards from the loop to find the pre-loop value of the variable. - * This is used, for example, to find the initial value of loop induction - * variables. - * - * \param loop Loop where \c var is an induction variable - * \param var Variable whose initializer is to be found - * - * \return - * The \c ir_rvalue assigned to the variable outside the loop. May return - * \c NULL if no initializer can be found. - */ -ir_rvalue * -find_initial_value(ir_loop *loop, ir_variable *var) -{ - for (exec_node *node = loop->prev; - !node->is_head_sentinel(); - node = node->prev) { - ir_instruction *ir = (ir_instruction *) node; - - switch (ir->ir_type) { - case ir_type_call: - case ir_type_loop: - case ir_type_loop_jump: - case ir_type_return: - case ir_type_if: - return NULL; - - case ir_type_function: - case ir_type_function_signature: - assert(!"Should not get here."); - return NULL; - - case ir_type_assignment: { - ir_assignment *assign = ir->as_assignment(); - ir_variable *assignee = assign->lhs->whole_variable_referenced(); - - if (assignee == var) - return (assign->condition != NULL) ? NULL : assign->rhs; - - break; - } - - default: - break; - } - } - - return NULL; -} - - -int -calculate_iterations(ir_rvalue *from, ir_rvalue *to, ir_rvalue *increment, - enum ir_expression_operation op) -{ - if (from == NULL || to == NULL || increment == NULL) - return -1; - - void *mem_ctx = ralloc_context(NULL); - - ir_expression *const sub = - new(mem_ctx) ir_expression(ir_binop_sub, from->type, to, from); - - ir_expression *const div = - new(mem_ctx) ir_expression(ir_binop_div, sub->type, sub, increment); - - ir_constant *iter = div->constant_expression_value(); - - if (iter == NULL) - return -1; - - if (!iter->type->is_integer()) { - ir_rvalue *cast = - new(mem_ctx) ir_expression(ir_unop_f2i, glsl_type::int_type, iter, - NULL); - - iter = cast->constant_expression_value(); - } - - int iter_value = iter->get_int_component(0); - - /* Make sure that the calculated number of iterations satisfies the exit - * condition. This is needed to catch off-by-one errors and some types of - * ill-formed loops. For example, we need to detect that the following - * loop does not have a maximum iteration count. - * - * for (float x = 0.0; x != 0.9; x += 0.2) - * ; - */ - const int bias[] = { -1, 0, 1 }; - bool valid_loop = false; - - for (unsigned i = 0; i < Elements(bias); i++) { - iter = (increment->type->is_integer()) - ? new(mem_ctx) ir_constant(iter_value + bias[i]) - : new(mem_ctx) ir_constant(float(iter_value + bias[i])); - - ir_expression *const mul = - new(mem_ctx) ir_expression(ir_binop_mul, increment->type, iter, - increment); - - ir_expression *const add = - new(mem_ctx) ir_expression(ir_binop_add, mul->type, mul, from); - - ir_expression *const cmp = - new(mem_ctx) ir_expression(op, glsl_type::bool_type, add, to); - - ir_constant *const cmp_result = cmp->constant_expression_value(); - - assert(cmp_result != NULL); - if (cmp_result->get_bool_component(0)) { - iter_value += bias[i]; - valid_loop = true; - break; - } - } - - ralloc_free(mem_ctx); - return (valid_loop) ? iter_value : -1; -} - - -class loop_control_visitor : public ir_hierarchical_visitor { -public: - loop_control_visitor(loop_state *state) - { - this->state = state; - this->progress = false; - } - - virtual ir_visitor_status visit_leave(ir_loop *ir); - - loop_state *state; - - bool progress; -}; - - -ir_visitor_status -loop_control_visitor::visit_leave(ir_loop *ir) -{ - loop_variable_state *const ls = this->state->get(ir); - - /* If we've entered a loop that hasn't been analyzed, something really, - * really bad has happened. - */ - if (ls == NULL) { - assert(ls != NULL); - return visit_continue; - } - - /* Search the loop terminating conditions for one of the form 'i < c' where - * i is a loop induction variable, c is a constant, and < is any relative - * operator. - */ - int max_iterations = ls->max_iterations; - - if(ir->from && ir->to && ir->increment) - max_iterations = calculate_iterations(ir->from, ir->to, ir->increment, (ir_expression_operation)ir->cmp); - - if(max_iterations < 0) - max_iterations = INT_MAX; - - foreach_list(node, &ls->terminators) { - loop_terminator *t = (loop_terminator *) node; - ir_if *if_stmt = t->ir; - - /* If-statements can be either 'if (expr)' or 'if (deref)'. We only care - * about the former here. - */ - ir_expression *cond = if_stmt->condition->as_expression(); - if (cond == NULL) - continue; - - switch (cond->operation) { - case ir_binop_less: - case ir_binop_greater: - case ir_binop_lequal: - case ir_binop_gequal: { - /* The expressions that we care about will either be of the form - * 'counter < limit' or 'limit < counter'. Figure out which is - * which. - */ - ir_rvalue *counter = cond->operands[0]->as_dereference_variable(); - ir_constant *limit = cond->operands[1]->as_constant(); - enum ir_expression_operation cmp = cond->operation; - - if (limit == NULL) { - counter = cond->operands[1]->as_dereference_variable(); - limit = cond->operands[0]->as_constant(); - - switch (cmp) { - case ir_binop_less: cmp = ir_binop_gequal; break; - case ir_binop_greater: cmp = ir_binop_lequal; break; - case ir_binop_lequal: cmp = ir_binop_greater; break; - case ir_binop_gequal: cmp = ir_binop_less; break; - default: assert(!"Should not get here."); - } - } - - if ((counter == NULL) || (limit == NULL)) - break; - - ir_variable *var = counter->variable_referenced(); - - ir_rvalue *init = find_initial_value(ir, var); - - foreach_list(iv_node, &ls->induction_variables) { - loop_variable *lv = (loop_variable *) iv_node; - - if (lv->var == var) { - const int iterations = calculate_iterations(init, limit, - lv->increment, - cmp); - if (iterations >= 0) { - /* If the new iteration count is lower than the previously - * believed iteration count, update the loop control values. - */ - if (iterations < max_iterations) { - ir->from = init->clone(ir, NULL); - ir->to = limit->clone(ir, NULL); - ir->increment = lv->increment->clone(ir, NULL); - ir->counter = lv->var; - ir->cmp = cmp; - - max_iterations = iterations; - } - - /* Remove the conditional break statement. The loop - * controls are now set such that the exit condition will be - * satisfied. - */ - if_stmt->remove(); - - assert(ls->num_loop_jumps > 0); - ls->num_loop_jumps--; - - this->progress = true; - } - - break; - } - } - break; - } - - default: - break; - } - } - - /* If we have proven the one of the loop exit conditions is satisifed before - * running the loop once, remove the loop. - */ - if (max_iterations == 0) - ir->remove(); - else - ls->max_iterations = max_iterations; - - return visit_continue; -} - - -bool -set_loop_controls(exec_list *instructions, loop_state *ls) -{ - loop_control_visitor v(ls); - - v.run(instructions); - - return v.progress; -} diff --git a/dll/opengl/mesa/src/glsl/loop_unroll.cpp b/dll/opengl/mesa/src/glsl/loop_unroll.cpp deleted file mode 100644 index d0bcaa6703d..00000000000 --- a/dll/opengl/mesa/src/glsl/loop_unroll.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "glsl_types.h" -#include "loop_analysis.h" -#include "ir_hierarchical_visitor.h" - -class loop_unroll_visitor : public ir_hierarchical_visitor { -public: - loop_unroll_visitor(loop_state *state, unsigned max_iterations) - { - this->state = state; - this->progress = false; - this->max_iterations = max_iterations; - } - - virtual ir_visitor_status visit_leave(ir_loop *ir); - - loop_state *state; - - bool progress; - unsigned max_iterations; -}; - - -static bool -is_break(ir_instruction *ir) -{ - return ir != NULL && ir->ir_type == ir_type_loop_jump - && ((ir_loop_jump *) ir)->is_break(); -} - - -ir_visitor_status -loop_unroll_visitor::visit_leave(ir_loop *ir) -{ - loop_variable_state *const ls = this->state->get(ir); - int iterations; - unsigned ir_count; - - /* If we've entered a loop that hasn't been analyzed, something really, - * really bad has happened. - */ - if (ls == NULL) { - assert(ls != NULL); - return visit_continue; - } - - iterations = ls->max_iterations; - - /* Don't try to unroll loops where the number of iterations is not known - * at compile-time. - */ - if (iterations < 0) - return visit_continue; - - /* Don't try to unroll loops that have zillions of iterations either. - */ - if (iterations > (int) max_iterations) - return visit_continue; - - /* Don't try to unroll nested loops and loops with a huge body. - */ - ir_count = 0; - foreach_list(node, &ir->body_instructions) { - ++ir_count; - - /* If the loop body gets to huge, do not unroll. */ - if (5*max_iterations < ir_count*iterations) - return visit_continue; - /* Do not unroll loops with child loop nodes. */ - if (((ir_instruction *) node)->as_loop()) - return visit_continue; - } - - if (ls->num_loop_jumps > 1) - return visit_continue; - else if (ls->num_loop_jumps) { - ir_instruction *last_ir = (ir_instruction *) ir->body_instructions.get_tail(); - assert(last_ir != NULL); - - if (is_break(last_ir)) { - /* If the only loop-jump is a break at the end of the loop, the loop - * will execute exactly once. Remove the break, set the iteration - * count, and fall through to the normal unroller. - */ - last_ir->remove(); - iterations = 1; - - this->progress = true; - } else { - ir_if *ir_if = NULL; - ir_instruction *break_ir = NULL; - bool continue_from_then_branch = false; - - foreach_list(node, &ir->body_instructions) { - /* recognize loops in the form produced by ir_lower_jumps */ - ir_instruction *cur_ir = (ir_instruction *) node; - - ir_if = cur_ir->as_if(); - if (ir_if != NULL) { - /* Determine which if-statement branch, if any, ends with a - * break. The branch that did *not* have the break will get a - * temporary continue inserted in each iteration of the loop - * unroll. - * - * Note that since ls->num_loop_jumps is <= 1, it is impossible - * for both branches to end with a break. - */ - ir_instruction *ir_if_last = - (ir_instruction *) ir_if->then_instructions.get_tail(); - - if (is_break(ir_if_last)) { - continue_from_then_branch = false; - break_ir = ir_if_last; - break; - } else { - ir_if_last = - (ir_instruction *) ir_if->else_instructions.get_tail(); - - if (is_break(ir_if_last)) { - break_ir = ir_if_last; - continue_from_then_branch = true; - break; - } - } - } - } - - if (break_ir == NULL) - return visit_continue; - - /* move instructions after then if in the continue branch */ - while (!ir_if->get_next()->is_tail_sentinel()) { - ir_instruction *move_ir = (ir_instruction *) ir_if->get_next(); - - move_ir->remove(); - if (continue_from_then_branch) - ir_if->then_instructions.push_tail(move_ir); - else - ir_if->else_instructions.push_tail(move_ir); - } - - /* Remove the break from the if-statement. - */ - break_ir->remove(); - - void *const mem_ctx = ralloc_parent(ir); - ir_instruction *ir_to_replace = ir; - - for (int i = 0; i < iterations; i++) { - exec_list copy_list; - - copy_list.make_empty(); - clone_ir_list(mem_ctx, ©_list, &ir->body_instructions); - - ir_if = ((ir_instruction *) copy_list.get_tail())->as_if(); - assert(ir_if != NULL); - - ir_to_replace->insert_before(©_list); - ir_to_replace->remove(); - - /* placeholder that will be removed in the next iteration */ - ir_to_replace = - new(mem_ctx) ir_loop_jump(ir_loop_jump::jump_continue); - - exec_list *const list = (continue_from_then_branch) - ? &ir_if->then_instructions : &ir_if->else_instructions; - - list->push_tail(ir_to_replace); - } - - ir_to_replace->remove(); - - this->progress = true; - return visit_continue; - } - } - - void *const mem_ctx = ralloc_parent(ir); - - for (int i = 0; i < iterations; i++) { - exec_list copy_list; - - copy_list.make_empty(); - clone_ir_list(mem_ctx, ©_list, &ir->body_instructions); - - ir->insert_before(©_list); - } - - /* The loop has been replaced by the unrolled copies. Remove the original - * loop from the IR sequence. - */ - ir->remove(); - - this->progress = true; - return visit_continue; -} - - -bool -unroll_loops(exec_list *instructions, loop_state *ls, unsigned max_iterations) -{ - loop_unroll_visitor v(ls, max_iterations); - - v.run(instructions); - - return v.progress; -} diff --git a/dll/opengl/mesa/src/glsl/lower_clip_distance.cpp b/dll/opengl/mesa/src/glsl/lower_clip_distance.cpp deleted file mode 100644 index 143e378f97b..00000000000 --- a/dll/opengl/mesa/src/glsl/lower_clip_distance.cpp +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Copyright © 2011 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file lower_clip_distance.cpp - * - * This pass accounts for the difference between the way - * gl_ClipDistance is declared in standard GLSL (as an array of - * floats), and the way it is frequently implemented in hardware (as - * a pair of vec4s, with four clip distances packed into each). - * - * The declaration of gl_ClipDistance is replaced with a declaration - * of gl_ClipDistanceMESA, and any references to gl_ClipDistance are - * translated to refer to gl_ClipDistanceMESA with the appropriate - * swizzling of array indices. For instance: - * - * gl_ClipDistance[i] - * - * is translated into: - * - * gl_ClipDistanceMESA[i>>2][i&3] - * - * Since some hardware may not internally represent gl_ClipDistance as a pair - * of vec4's, this lowering pass is optional. To enable it, set the - * LowerClipDistance flag in gl_shader_compiler_options to true. - */ - -#include "ir_hierarchical_visitor.h" -#include "ir.h" - -class lower_clip_distance_visitor : public ir_hierarchical_visitor { -public: - lower_clip_distance_visitor() - : progress(false), old_clip_distance_var(NULL), - new_clip_distance_var(NULL) - { - } - - virtual ir_visitor_status visit(ir_variable *); - void create_indices(ir_rvalue*, ir_rvalue *&, ir_rvalue *&); - virtual ir_visitor_status visit_leave(ir_dereference_array *); - virtual ir_visitor_status visit_leave(ir_assignment *); - void visit_new_assignment(ir_assignment *ir); - virtual ir_visitor_status visit_leave(ir_call *); - - bool progress; - - /** - * Pointer to the declaration of gl_ClipDistance, if found. - */ - ir_variable *old_clip_distance_var; - - /** - * Pointer to the newly-created gl_ClipDistanceMESA variable. - */ - ir_variable *new_clip_distance_var; -}; - - -/** - * Replace any declaration of gl_ClipDistance as an array of floats with a - * declaration of gl_ClipDistanceMESA as an array of vec4's. - */ -ir_visitor_status -lower_clip_distance_visitor::visit(ir_variable *ir) -{ - /* No point in looking for the declaration of gl_ClipDistance if - * we've already found it. - */ - if (this->old_clip_distance_var) - return visit_continue; - - if (ir->name && strcmp(ir->name, "gl_ClipDistance") == 0) { - this->progress = true; - this->old_clip_distance_var = ir; - assert (ir->type->is_array()); - assert (ir->type->element_type() == glsl_type::float_type); - unsigned new_size = (ir->type->array_size() + 3) / 4; - - /* Clone the old var so that we inherit all of its properties */ - this->new_clip_distance_var = ir->clone(ralloc_parent(ir), NULL); - - /* And change the properties that we need to change */ - this->new_clip_distance_var->name - = ralloc_strdup(this->new_clip_distance_var, "gl_ClipDistanceMESA"); - this->new_clip_distance_var->type - = glsl_type::get_array_instance(glsl_type::vec4_type, new_size); - this->new_clip_distance_var->max_array_access = ir->max_array_access / 4; - - ir->replace_with(this->new_clip_distance_var); - } - return visit_continue; -} - - -/** - * Create the necessary GLSL rvalues to index into gl_ClipDistanceMESA based - * on the rvalue previously used to index into gl_ClipDistance. - * - * \param array_index Selects one of the vec4's in gl_ClipDistanceMESA - * \param swizzle_index Selects a component within the vec4 selected by - * array_index. - */ -void -lower_clip_distance_visitor::create_indices(ir_rvalue *old_index, - ir_rvalue *&array_index, - ir_rvalue *&swizzle_index) -{ - void *ctx = ralloc_parent(old_index); - - /* Make sure old_index is a signed int so that the bitwise "shift" and - * "and" operations below type check properly. - */ - if (old_index->type != glsl_type::int_type) { - assert (old_index->type == glsl_type::uint_type); - old_index = new(ctx) ir_expression(ir_unop_u2i, old_index); - } - - ir_constant *old_index_constant = old_index->constant_expression_value(); - if (old_index_constant) { - /* gl_ClipDistance is being accessed via a constant index. Don't bother - * creating expressions to calculate the lowered indices. Just create - * constants. - */ - int const_val = old_index_constant->get_int_component(0); - array_index = new(ctx) ir_constant(const_val / 4); - swizzle_index = new(ctx) ir_constant(const_val % 4); - } else { - /* Create a variable to hold the value of old_index (so that we - * don't compute it twice). - */ - ir_variable *old_index_var = new(ctx) ir_variable( - glsl_type::int_type, "clip_distance_index", ir_var_temporary); - this->base_ir->insert_before(old_index_var); - this->base_ir->insert_before(new(ctx) ir_assignment( - new(ctx) ir_dereference_variable(old_index_var), old_index)); - - /* Create the expression clip_distance_index / 4. Do this as a bit - * shift because that's likely to be more efficient. - */ - array_index = new(ctx) ir_expression( - ir_binop_rshift, new(ctx) ir_dereference_variable(old_index_var), - new(ctx) ir_constant(2)); - - /* Create the expression clip_distance_index % 4. Do this as a bitwise - * AND because that's likely to be more efficient. - */ - swizzle_index = new(ctx) ir_expression( - ir_binop_bit_and, new(ctx) ir_dereference_variable(old_index_var), - new(ctx) ir_constant(3)); - } -} - - -/** - * Replace any expression that indexes into the gl_ClipDistance array with an - * expression that indexes into one of the vec4's in gl_ClipDistanceMESA and - * accesses the appropriate component. - */ -ir_visitor_status -lower_clip_distance_visitor::visit_leave(ir_dereference_array *ir) -{ - /* If the gl_ClipDistance var hasn't been declared yet, then - * there's no way this deref can refer to it. - */ - if (!this->old_clip_distance_var) - return visit_continue; - - ir_dereference_variable *old_var_ref = ir->array->as_dereference_variable(); - if (old_var_ref && old_var_ref->var == this->old_clip_distance_var) { - this->progress = true; - ir_rvalue *array_index; - ir_rvalue *swizzle_index; - this->create_indices(ir->array_index, array_index, swizzle_index); - void *mem_ctx = ralloc_parent(ir); - ir->array = new(mem_ctx) ir_dereference_array( - this->new_clip_distance_var, array_index); - ir->array_index = swizzle_index; - } - - return visit_continue; -} - - -/** - * Replace any assignment having gl_ClipDistance (undereferenced) as its LHS - * or RHS with a sequence of assignments, one for each component of the array. - * Each of these assignments is lowered to refer to gl_ClipDistanceMESA as - * appropriate. - */ -ir_visitor_status -lower_clip_distance_visitor::visit_leave(ir_assignment *ir) -{ - ir_dereference_variable *lhs_var = ir->lhs->as_dereference_variable(); - ir_dereference_variable *rhs_var = ir->rhs->as_dereference_variable(); - if ((lhs_var && lhs_var->var == this->old_clip_distance_var) - || (rhs_var && rhs_var->var == this->old_clip_distance_var)) { - /* LHS or RHS of the assignment is the entire gl_ClipDistance array. - * Since we are reshaping gl_ClipDistance from an array of floats to an - * array of vec4's, this isn't going to work as a bulk assignment - * anymore, so unroll it to element-by-element assignments and lower - * each of them. - * - * Note: to unroll into element-by-element assignments, we need to make - * clones of the LHS and RHS. This is only safe if the LHS and RHS are - * side-effect free. Fortunately, we know that they are, because the - * only kind of rvalue that can have side effects is an ir_call, and - * ir_calls only appear (a) as a statement on their own, or (b) as the - * RHS of an assignment that stores the result of the call in a - * temporary variable. - */ - void *ctx = ralloc_parent(ir); - int array_size = this->old_clip_distance_var->type->array_size(); - for (int i = 0; i < array_size; ++i) { - ir_dereference_array *new_lhs = new(ctx) ir_dereference_array( - ir->lhs->clone(ctx, NULL), new(ctx) ir_constant(i)); - new_lhs->accept(this); - ir_dereference_array *new_rhs = new(ctx) ir_dereference_array( - ir->rhs->clone(ctx, NULL), new(ctx) ir_constant(i)); - new_rhs->accept(this); - this->base_ir->insert_before( - new(ctx) ir_assignment(new_lhs, new_rhs)); - } - ir->remove(); - } - - return visit_continue; -} - - -/** - * Set up base_ir properly and call visit_leave() on a newly created - * ir_assignment node. This is used in cases where we have to insert an - * ir_assignment in a place where we know the hierarchical visitor won't see - * it. - */ -void -lower_clip_distance_visitor::visit_new_assignment(ir_assignment *ir) -{ - ir_instruction *old_base_ir = this->base_ir; - this->base_ir = ir; - ir->accept(this); - this->base_ir = old_base_ir; -} - - -/** - * If gl_ClipDistance appears as an argument in an ir_call expression, replace - * it with a temporary variable, and make sure the ir_call is preceded and/or - * followed by assignments that copy the contents of the temporary variable to - * and/or from gl_ClipDistance. Each of these assignments is then lowered to - * refer to gl_ClipDistanceMESA. - */ -ir_visitor_status -lower_clip_distance_visitor::visit_leave(ir_call *ir) -{ - void *ctx = ralloc_parent(ir); - - const exec_node *formal_param_node = ir->get_callee()->parameters.head; - const exec_node *actual_param_node = ir->actual_parameters.head; - while (!actual_param_node->is_tail_sentinel()) { - ir_variable *formal_param = (ir_variable *) formal_param_node; - ir_rvalue *actual_param = (ir_rvalue *) actual_param_node; - - /* Advance formal_param_node and actual_param_node now so that we can - * safely replace actual_param with another node, if necessary, below. - */ - formal_param_node = formal_param_node->next; - actual_param_node = actual_param_node->next; - - ir_dereference_variable *deref = actual_param->as_dereference_variable(); - if (deref && deref->var == this->old_clip_distance_var) { - /* User is trying to pass the whole gl_ClipDistance array to a - * function call. Since we are reshaping gl_ClipDistance from an - * array of floats to an array of vec4's, this isn't going to work - * anymore, so use a temporary array instead. - */ - ir_variable *temp_clip_distance = new(ctx) ir_variable( - actual_param->type, "temp_clip_distance", ir_var_temporary); - this->base_ir->insert_before(temp_clip_distance); - actual_param->replace_with( - new(ctx) ir_dereference_variable(temp_clip_distance)); - if (formal_param->mode == ir_var_in - || formal_param->mode == ir_var_inout) { - /* Copy from gl_ClipDistance to the temporary before the call. - * Since we are going to insert this copy before the current - * instruction, we need to visit it afterwards to make sure it - * gets lowered. - */ - ir_assignment *new_assignment = new(ctx) ir_assignment( - new(ctx) ir_dereference_variable(temp_clip_distance), - new(ctx) ir_dereference_variable(old_clip_distance_var)); - this->base_ir->insert_before(new_assignment); - this->visit_new_assignment(new_assignment); - } - if (formal_param->mode == ir_var_out - || formal_param->mode == ir_var_inout) { - /* Copy from the temporary to gl_ClipDistance after the call. - * Since visit_list_elements() has already decided which - * instruction it's going to visit next, we need to visit - * afterwards to make sure it gets lowered. - */ - ir_assignment *new_assignment = new(ctx) ir_assignment( - new(ctx) ir_dereference_variable(old_clip_distance_var), - new(ctx) ir_dereference_variable(temp_clip_distance)); - this->base_ir->insert_after(new_assignment); - this->visit_new_assignment(new_assignment); - } - } - } - - return visit_continue; -} - - -bool -lower_clip_distance(exec_list *instructions) -{ - lower_clip_distance_visitor v; - - visit_list_elements(&v, instructions); - - return v.progress; -} diff --git a/dll/opengl/mesa/src/glsl/lower_discard.cpp b/dll/opengl/mesa/src/glsl/lower_discard.cpp deleted file mode 100644 index cafd2dd3b44..00000000000 --- a/dll/opengl/mesa/src/glsl/lower_discard.cpp +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file lower_discard.cpp - * - * This pass moves discards out of if-statements. - * - * Case 1: The "then" branch contains a conditional discard: - * --------------------------------------------------------- - * - * if (cond1) { - * s1; - * discard cond2; - * s2; - * } else { - * s3; - * } - * - * becomes: - * - * temp = false; - * if (cond1) { - * s1; - * temp = cond2; - * s2; - * } else { - * s3; - * } - * discard temp; - * - * Case 2: The "else" branch contains a conditional discard: - * --------------------------------------------------------- - * - * if (cond1) { - * s1; - * } else { - * s2; - * discard cond2; - * s3; - * } - * - * becomes: - * - * temp = false; - * if (cond1) { - * s1; - * } else { - * s2; - * temp = cond2; - * s3; - * } - * discard temp; - * - * Case 3: Both branches contain a conditional discard: - * ---------------------------------------------------- - * - * if (cond1) { - * s1; - * discard cond2; - * s2; - * } else { - * s3; - * discard cond3; - * s4; - * } - * - * becomes: - * - * temp = false; - * if (cond1) { - * s1; - * temp = cond2; - * s2; - * } else { - * s3; - * temp = cond3; - * s4; - * } - * discard temp; - * - * If there are multiple conditional discards, we need only deal with one of - * them. Repeatedly applying this pass will take care of the others. - * - * Unconditional discards are treated as having a condition of "true". - */ - -#include "glsl_types.h" -#include "ir.h" - -class lower_discard_visitor : public ir_hierarchical_visitor { -public: - lower_discard_visitor() - { - this->progress = false; - } - - ir_visitor_status visit_leave(ir_if *); - - bool progress; -}; - - -bool -lower_discard(exec_list *instructions) -{ - lower_discard_visitor v; - - visit_list_elements(&v, instructions); - - return v.progress; -} - - -static ir_discard * -find_discard(exec_list &instructions) -{ - foreach_list(n, &instructions) { - ir_discard *ir = ((ir_instruction *) n)->as_discard(); - if (ir != NULL) - return ir; - } - return NULL; -} - - -static void -replace_discard(void *mem_ctx, ir_variable *var, ir_discard *ir) -{ - ir_rvalue *condition = ir->condition; - - /* For unconditional discards, use "true" as the condition. */ - if (condition == NULL) - condition = new(mem_ctx) ir_constant(true); - - ir_assignment *assignment = - new(mem_ctx) ir_assignment(new(mem_ctx) ir_dereference_variable(var), - condition, NULL); - - ir->replace_with(assignment); -} - - -ir_visitor_status -lower_discard_visitor::visit_leave(ir_if *ir) -{ - ir_discard *then_discard = find_discard(ir->then_instructions); - ir_discard *else_discard = find_discard(ir->else_instructions); - - if (then_discard == NULL && else_discard == NULL) - return visit_continue; - - void *mem_ctx = ralloc_parent(ir); - - ir_variable *temp = new(mem_ctx) ir_variable(glsl_type::bool_type, - "discard_cond_temp", - ir_var_temporary); - ir_assignment *temp_initializer = - new(mem_ctx) ir_assignment(new(mem_ctx) ir_dereference_variable(temp), - new(mem_ctx) ir_constant(false), NULL); - - ir->insert_before(temp); - ir->insert_before(temp_initializer); - - if (then_discard != NULL) - replace_discard(mem_ctx, temp, then_discard); - - if (else_discard != NULL) - replace_discard(mem_ctx, temp, else_discard); - - ir_discard *discard = then_discard != NULL ? then_discard : else_discard; - discard->condition = new(mem_ctx) ir_dereference_variable(temp); - ir->insert_after(discard); - - this->progress = true; - - return visit_continue; -} diff --git a/dll/opengl/mesa/src/glsl/lower_if_to_cond_assign.cpp b/dll/opengl/mesa/src/glsl/lower_if_to_cond_assign.cpp deleted file mode 100644 index 2c5d5612d0d..00000000000 --- a/dll/opengl/mesa/src/glsl/lower_if_to_cond_assign.cpp +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file lower_if_to_cond_assign.cpp - * - * This attempts to flatten if-statements to conditional assignments for - * GPUs with limited or no flow control support. - * - * It can't handle other control flow being inside of its block, such - * as calls or loops. Hopefully loop unrolling and inlining will take - * care of those. - * - * Drivers for GPUs with no control flow support should simply call - * - * lower_if_to_cond_assign(instructions) - * - * to attempt to flatten all if-statements. - * - * Some GPUs (such as i965 prior to gen6) do support control flow, but have a - * maximum nesting depth N. Drivers for such hardware can call - * - * lower_if_to_cond_assign(instructions, N) - * - * to attempt to flatten any if-statements appearing at depth > N. - */ - -#include "glsl_types.h" -#include "ir.h" -#include "program/hash_table.h" - -class ir_if_to_cond_assign_visitor : public ir_hierarchical_visitor { -public: - ir_if_to_cond_assign_visitor(unsigned max_depth) - { - this->progress = false; - this->max_depth = max_depth; - this->depth = 0; - - this->condition_variables = hash_table_ctor(0, hash_table_pointer_hash, - hash_table_pointer_compare); - } - - ~ir_if_to_cond_assign_visitor() - { - hash_table_dtor(this->condition_variables); - } - - ir_visitor_status visit_enter(ir_if *); - ir_visitor_status visit_leave(ir_if *); - - bool progress; - unsigned max_depth; - unsigned depth; - - struct hash_table *condition_variables; -}; - -bool -lower_if_to_cond_assign(exec_list *instructions, unsigned max_depth) -{ - if (max_depth == UINT_MAX) - return false; - - ir_if_to_cond_assign_visitor v(max_depth); - - visit_list_elements(&v, instructions); - - return v.progress; -} - -void -check_control_flow(ir_instruction *ir, void *data) -{ - bool *found_control_flow = (bool *)data; - switch (ir->ir_type) { - case ir_type_call: - case ir_type_discard: - case ir_type_loop: - case ir_type_loop_jump: - case ir_type_return: - *found_control_flow = true; - break; - default: - break; - } -} - -void -move_block_to_cond_assign(void *mem_ctx, - ir_if *if_ir, ir_rvalue *cond_expr, - exec_list *instructions, - struct hash_table *ht) -{ - foreach_list_safe(node, instructions) { - ir_instruction *ir = (ir_instruction *) node; - - if (ir->ir_type == ir_type_assignment) { - ir_assignment *assign = (ir_assignment *)ir; - - if (hash_table_find(ht, assign) == NULL) { - hash_table_insert(ht, assign, assign); - - /* If the LHS of the assignment is a condition variable that was - * previously added, insert an additional assignment of false to - * the variable. - */ - const bool assign_to_cv = - hash_table_find(ht, assign->lhs->variable_referenced()) != NULL; - - if (!assign->condition) { - if (assign_to_cv) { - assign->rhs = - new(mem_ctx) ir_expression(ir_binop_logic_and, - glsl_type::bool_type, - cond_expr->clone(mem_ctx, NULL), - assign->rhs); - } else { - assign->condition = cond_expr->clone(mem_ctx, NULL); - } - } else { - assign->condition = - new(mem_ctx) ir_expression(ir_binop_logic_and, - glsl_type::bool_type, - cond_expr->clone(mem_ctx, NULL), - assign->condition); - } - } - } - - /* Now, move from the if block to the block surrounding it. */ - ir->remove(); - if_ir->insert_before(ir); - } -} - -ir_visitor_status -ir_if_to_cond_assign_visitor::visit_enter(ir_if *ir) -{ - (void) ir; - this->depth++; - - return visit_continue; -} - -ir_visitor_status -ir_if_to_cond_assign_visitor::visit_leave(ir_if *ir) -{ - /* Only flatten when beyond the GPU's maximum supported nesting depth. */ - if (this->depth-- <= this->max_depth) - return visit_continue; - - bool found_control_flow = false; - ir_assignment *assign; - - /* Check that both blocks don't contain anything we can't support. */ - foreach_iter(exec_list_iterator, then_iter, ir->then_instructions) { - ir_instruction *then_ir = (ir_instruction *)then_iter.get(); - visit_tree(then_ir, check_control_flow, &found_control_flow); - } - foreach_iter(exec_list_iterator, else_iter, ir->else_instructions) { - ir_instruction *else_ir = (ir_instruction *)else_iter.get(); - visit_tree(else_ir, check_control_flow, &found_control_flow); - } - if (found_control_flow) - return visit_continue; - - void *mem_ctx = ralloc_parent(ir); - - /* Store the condition to a variable. Move all of the instructions from - * the then-clause of the if-statement. Use the condition variable as a - * condition for all assignments. - */ - ir_variable *const then_var = - new(mem_ctx) ir_variable(glsl_type::bool_type, - "if_to_cond_assign_then", - ir_var_temporary); - ir->insert_before(then_var); - - ir_dereference_variable *then_cond = - new(mem_ctx) ir_dereference_variable(then_var); - - assign = new(mem_ctx) ir_assignment(then_cond, ir->condition); - ir->insert_before(assign); - - move_block_to_cond_assign(mem_ctx, ir, then_cond, - &ir->then_instructions, - this->condition_variables); - - /* Add the new condition variable to the hash table. This allows us to - * find this variable when lowering other (enclosing) if-statements. - */ - hash_table_insert(this->condition_variables, then_var, then_var); - - /* If there are instructions in the else-clause, store the inverse of the - * condition to a variable. Move all of the instructions from the - * else-clause if the if-statement. Use the (inverse) condition variable - * as a condition for all assignments. - */ - if (!ir->else_instructions.is_empty()) { - ir_variable *const else_var = - new(mem_ctx) ir_variable(glsl_type::bool_type, - "if_to_cond_assign_else", - ir_var_temporary); - ir->insert_before(else_var); - - ir_dereference_variable *else_cond = - new(mem_ctx) ir_dereference_variable(else_var); - - ir_rvalue *inverse = - new(mem_ctx) ir_expression(ir_unop_logic_not, - then_cond->clone(mem_ctx, NULL)); - - assign = new(mem_ctx) ir_assignment(else_cond, inverse); - ir->insert_before(assign); - - move_block_to_cond_assign(mem_ctx, ir, else_cond, - &ir->else_instructions, - this->condition_variables); - - /* Add the new condition variable to the hash table. This allows us to - * find this variable when lowering other (enclosing) if-statements. - */ - hash_table_insert(this->condition_variables, else_var, else_var); - } - - ir->remove(); - - this->progress = true; - - return visit_continue; -} diff --git a/dll/opengl/mesa/src/glsl/lower_instructions.cpp b/dll/opengl/mesa/src/glsl/lower_instructions.cpp deleted file mode 100644 index d79eb0a7ffb..00000000000 --- a/dll/opengl/mesa/src/glsl/lower_instructions.cpp +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file lower_instructions.cpp - * - * Many GPUs lack native instructions for certain expression operations, and - * must replace them with some other expression tree. This pass lowers some - * of the most common cases, allowing the lowering code to be implemented once - * rather than in each driver backend. - * - * Currently supported transformations: - * - SUB_TO_ADD_NEG - * - DIV_TO_MUL_RCP - * - INT_DIV_TO_MUL_RCP - * - EXP_TO_EXP2 - * - POW_TO_EXP2 - * - LOG_TO_LOG2 - * - MOD_TO_FRACT - * - * SUB_TO_ADD_NEG: - * --------------- - * Breaks an ir_binop_sub expression down to add(op0, neg(op1)) - * - * This simplifies expression reassociation, and for many backends - * there is no subtract operation separate from adding the negation. - * For backends with native subtract operations, they will probably - * want to recognize add(op0, neg(op1)) or the other way around to - * produce a subtract anyway. - * - * DIV_TO_MUL_RCP and INT_DIV_TO_MUL_RCP: - * -------------------------------------- - * Breaks an ir_unop_div expression down to op0 * (rcp(op1)). - * - * Many GPUs don't have a divide instruction (945 and 965 included), - * but they do have an RCP instruction to compute an approximate - * reciprocal. By breaking the operation down, constant reciprocals - * can get constant folded. - * - * DIV_TO_MUL_RCP only lowers floating point division; INT_DIV_TO_MUL_RCP - * handles the integer case, converting to and from floating point so that - * RCP is possible. - * - * EXP_TO_EXP2 and LOG_TO_LOG2: - * ---------------------------- - * Many GPUs don't have a base e log or exponent instruction, but they - * do have base 2 versions, so this pass converts exp and log to exp2 - * and log2 operations. - * - * POW_TO_EXP2: - * ----------- - * Many older GPUs don't have an x**y instruction. For these GPUs, convert - * x**y to 2**(y * log2(x)). - * - * MOD_TO_FRACT: - * ------------- - * Breaks an ir_unop_mod expression down to (op1 * fract(op0 / op1)) - * - * Many GPUs don't have a MOD instruction (945 and 965 included), and - * if we have to break it down like this anyway, it gives an - * opportunity to do things like constant fold the (1.0 / op1) easily. - */ - -#include "main/core.h" /* for M_LOG2E */ -#include "glsl_types.h" -#include "ir.h" -#include "ir_optimization.h" - -class lower_instructions_visitor : public ir_hierarchical_visitor { -public: - lower_instructions_visitor(unsigned lower) - : progress(false), lower(lower) { } - - ir_visitor_status visit_leave(ir_expression *); - - bool progress; - -private: - unsigned lower; /** Bitfield of which operations to lower */ - - void sub_to_add_neg(ir_expression *); - void div_to_mul_rcp(ir_expression *); - void int_div_to_mul_rcp(ir_expression *); - void mod_to_fract(ir_expression *); - void exp_to_exp2(ir_expression *); - void pow_to_exp2(ir_expression *); - void log_to_log2(ir_expression *); -}; - -/** - * Determine if a particular type of lowering should occur - */ -#define lowering(x) (this->lower & x) - -bool -lower_instructions(exec_list *instructions, unsigned what_to_lower) -{ - lower_instructions_visitor v(what_to_lower); - - visit_list_elements(&v, instructions); - return v.progress; -} - -void -lower_instructions_visitor::sub_to_add_neg(ir_expression *ir) -{ - ir->operation = ir_binop_add; - ir->operands[1] = new(ir) ir_expression(ir_unop_neg, ir->operands[1]->type, - ir->operands[1], NULL); - this->progress = true; -} - -void -lower_instructions_visitor::div_to_mul_rcp(ir_expression *ir) -{ - assert(ir->operands[1]->type->is_float()); - - /* New expression for the 1.0 / op1 */ - ir_rvalue *expr; - expr = new(ir) ir_expression(ir_unop_rcp, - ir->operands[1]->type, - ir->operands[1]); - - /* op0 / op1 -> op0 * (1.0 / op1) */ - ir->operation = ir_binop_mul; - ir->operands[1] = expr; - - this->progress = true; -} - -void -lower_instructions_visitor::int_div_to_mul_rcp(ir_expression *ir) -{ - assert(ir->operands[1]->type->is_integer()); - - /* Be careful with integer division -- we need to do it as a - * float and re-truncate, since rcp(n > 1) of an integer would - * just be 0. - */ - ir_rvalue *op0, *op1; - const struct glsl_type *vec_type; - - vec_type = glsl_type::get_instance(GLSL_TYPE_FLOAT, - ir->operands[1]->type->vector_elements, - ir->operands[1]->type->matrix_columns); - - if (ir->operands[1]->type->base_type == GLSL_TYPE_INT) - op1 = new(ir) ir_expression(ir_unop_i2f, vec_type, ir->operands[1], NULL); - else - op1 = new(ir) ir_expression(ir_unop_u2f, vec_type, ir->operands[1], NULL); - - op1 = new(ir) ir_expression(ir_unop_rcp, op1->type, op1, NULL); - - vec_type = glsl_type::get_instance(GLSL_TYPE_FLOAT, - ir->operands[0]->type->vector_elements, - ir->operands[0]->type->matrix_columns); - - if (ir->operands[0]->type->base_type == GLSL_TYPE_INT) - op0 = new(ir) ir_expression(ir_unop_i2f, vec_type, ir->operands[0], NULL); - else - op0 = new(ir) ir_expression(ir_unop_u2f, vec_type, ir->operands[0], NULL); - - vec_type = glsl_type::get_instance(GLSL_TYPE_FLOAT, - ir->type->vector_elements, - ir->type->matrix_columns); - - op0 = new(ir) ir_expression(ir_binop_mul, vec_type, op0, op1); - - if (ir->operands[1]->type->base_type == GLSL_TYPE_INT) { - ir->operation = ir_unop_f2i; - ir->operands[0] = op0; - } else { - ir->operation = ir_unop_i2u; - ir->operands[0] = new(ir) ir_expression(ir_unop_f2i, op0); - } - ir->operands[1] = NULL; - - this->progress = true; -} - -void -lower_instructions_visitor::exp_to_exp2(ir_expression *ir) -{ - ir_constant *log2_e = new(ir) ir_constant(float(M_LOG2E)); - - ir->operation = ir_unop_exp2; - ir->operands[0] = new(ir) ir_expression(ir_binop_mul, ir->operands[0]->type, - ir->operands[0], log2_e); - this->progress = true; -} - -void -lower_instructions_visitor::pow_to_exp2(ir_expression *ir) -{ - ir_expression *const log2_x = - new(ir) ir_expression(ir_unop_log2, ir->operands[0]->type, - ir->operands[0]); - - ir->operation = ir_unop_exp2; - ir->operands[0] = new(ir) ir_expression(ir_binop_mul, ir->operands[1]->type, - ir->operands[1], log2_x); - ir->operands[1] = NULL; - this->progress = true; -} - -void -lower_instructions_visitor::log_to_log2(ir_expression *ir) -{ - ir->operation = ir_binop_mul; - ir->operands[0] = new(ir) ir_expression(ir_unop_log2, ir->operands[0]->type, - ir->operands[0], NULL); - ir->operands[1] = new(ir) ir_constant(float(1.0 / M_LOG2E)); - this->progress = true; -} - -void -lower_instructions_visitor::mod_to_fract(ir_expression *ir) -{ - ir_variable *temp = new(ir) ir_variable(ir->operands[1]->type, "mod_b", - ir_var_temporary); - this->base_ir->insert_before(temp); - - ir_assignment *const assign = - new(ir) ir_assignment(new(ir) ir_dereference_variable(temp), - ir->operands[1], NULL); - - this->base_ir->insert_before(assign); - - ir_expression *const div_expr = - new(ir) ir_expression(ir_binop_div, ir->operands[0]->type, - ir->operands[0], - new(ir) ir_dereference_variable(temp)); - - /* Don't generate new IR that would need to be lowered in an additional - * pass. - */ - if (lowering(DIV_TO_MUL_RCP)) - div_to_mul_rcp(div_expr); - - ir_rvalue *expr = new(ir) ir_expression(ir_unop_fract, - ir->operands[0]->type, - div_expr, - NULL); - - ir->operation = ir_binop_mul; - ir->operands[0] = new(ir) ir_dereference_variable(temp); - ir->operands[1] = expr; - this->progress = true; -} - -ir_visitor_status -lower_instructions_visitor::visit_leave(ir_expression *ir) -{ - switch (ir->operation) { - case ir_binop_sub: - if (lowering(SUB_TO_ADD_NEG)) - sub_to_add_neg(ir); - break; - - case ir_binop_div: - if (ir->operands[1]->type->is_integer() && lowering(INT_DIV_TO_MUL_RCP)) - int_div_to_mul_rcp(ir); - else if (ir->operands[1]->type->is_float() && lowering(DIV_TO_MUL_RCP)) - div_to_mul_rcp(ir); - break; - - case ir_unop_exp: - if (lowering(EXP_TO_EXP2)) - exp_to_exp2(ir); - break; - - case ir_unop_log: - if (lowering(LOG_TO_LOG2)) - log_to_log2(ir); - break; - - case ir_binop_mod: - if (lowering(MOD_TO_FRACT) && ir->type->is_float()) - mod_to_fract(ir); - break; - - case ir_binop_pow: - if (lowering(POW_TO_EXP2)) - pow_to_exp2(ir); - break; - - default: - return visit_continue; - } - - return visit_continue; -} diff --git a/dll/opengl/mesa/src/glsl/lower_jumps.cpp b/dll/opengl/mesa/src/glsl/lower_jumps.cpp deleted file mode 100644 index 92813f567f1..00000000000 --- a/dll/opengl/mesa/src/glsl/lower_jumps.cpp +++ /dev/null @@ -1,1011 +0,0 @@ -/* - * Copyright © 2010 Luca Barbieri - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file lower_jumps.cpp - * - * This pass lowers jumps (break, continue, and return) to if/else structures. - * - * It can be asked to: - * 1. Pull jumps out of ifs where possible - * 2. Remove all "continue"s, replacing them with an "execute flag" - * 3. Replace all "break" with a single conditional one at the end of the loop - * 4. Replace all "return"s with a single return at the end of the function, - * for the main function and/or other functions - * - * Applying this pass gives several benefits: - * 1. All functions can be inlined. - * 2. nv40 and other pre-DX10 chips without "continue" can be supported - * 3. nv30 and other pre-DX10 chips with no control flow at all are better - * supported - * - * Continues are lowered by adding a per-loop "execute flag", initialized to - * true, that when cleared inhibits all execution until the end of the loop. - * - * Breaks are lowered to continues, plus setting a "break flag" that is checked - * at the end of the loop, and trigger the unique "break". - * - * Returns are lowered to breaks/continues, plus adding a "return flag" that - * causes loops to break again out of their enclosing loops until all the - * loops are exited: then the "execute flag" logic will ignore everything - * until the end of the function. - * - * Note that "continue" and "return" can also be implemented by adding - * a dummy loop and using break. - * However, this is bad for hardware with limited nesting depth, and - * prevents further optimization, and thus is not currently performed. - */ - -#include "glsl_types.h" -#include -#include "ir.h" - -/** - * Enum recording the result of analyzing how control flow might exit - * an IR node. - * - * Each possible value of jump_strength indicates a strictly stronger - * guarantee on control flow than the previous value. - * - * The ordering of strengths roughly reflects the way jumps are - * lowered: jumps with higher strength tend to be lowered to jumps of - * lower strength. Accordingly, strength is used as a heuristic to - * determine which lowering to perform first. - * - * This enum is also used by get_jump_strength() to categorize - * instructions as either break, continue, return, or other. When - * used in this fashion, strength_always_clears_execute_flag is not - * used. - * - * The control flow analysis made by this optimization pass makes two - * simplifying assumptions: - * - * - It ignores discard instructions, since they are lowered by a - * separate pass (lower_discard.cpp). - * - * - It assumes it is always possible for control to flow from a loop - * to the instruction immediately following it. Technically, this - * is not true (since all execution paths through the loop might - * jump back to the top, or return from the function). - * - * Both of these simplifying assumtions are safe, since they can never - * cause reachable code to be incorrectly classified as unreachable; - * they can only do the opposite. - */ -enum jump_strength -{ - /** - * Analysis has produced no guarantee on how control flow might - * exit this IR node. It might fall out the bottom (with or - * without clearing the execute flag, if present), or it might - * continue to the top of the innermost enclosing loop, break out - * of it, or return from the function. - */ - strength_none, - - /** - * The only way control can fall out the bottom of this node is - * through a code path that clears the execute flag. It might also - * continue to the top of the innermost enclosing loop, break out - * of it, or return from the function. - */ - strength_always_clears_execute_flag, - - /** - * Control cannot fall out the bottom of this node. It might - * continue to the top of the innermost enclosing loop, break out - * of it, or return from the function. - */ - strength_continue, - - /** - * Control cannot fall out the bottom of this node, or continue the - * top of the innermost enclosing loop. It can only break out of - * it or return from the function. - */ - strength_break, - - /** - * Control cannot fall out the bottom of this node, continue to the - * top of the innermost enclosing loop, or break out of it. It can - * only return from the function. - */ - strength_return -}; - -struct block_record -{ - /* minimum jump strength (of lowered IR, not pre-lowering IR) - * - * If the block ends with a jump, must be the strength of the jump. - * Otherwise, the jump would be dead and have been deleted before) - * - * If the block doesn't end with a jump, it can be different than strength_none if all paths before it lead to some jump - * (e.g. an if with a return in one branch, and a break in the other, while not lowering them) - * Note that identical jumps are usually unified though. - */ - jump_strength min_strength; - - /* can anything clear the execute flag? */ - bool may_clear_execute_flag; - - block_record() - { - this->min_strength = strength_none; - this->may_clear_execute_flag = false; - } -}; - -struct loop_record -{ - ir_function_signature* signature; - ir_loop* loop; - - /* used to avoid lowering the break used to represent lowered breaks */ - unsigned nesting_depth; - bool in_if_at_the_end_of_the_loop; - - bool may_set_return_flag; - - ir_variable* break_flag; - ir_variable* execute_flag; /* cleared to emulate continue */ - - loop_record(ir_function_signature* p_signature = 0, ir_loop* p_loop = 0) - { - this->signature = p_signature; - this->loop = p_loop; - this->nesting_depth = 0; - this->in_if_at_the_end_of_the_loop = false; - this->may_set_return_flag = false; - this->break_flag = 0; - this->execute_flag = 0; - } - - ir_variable* get_execute_flag() - { - /* also supported for the "function loop" */ - if(!this->execute_flag) { - exec_list& list = this->loop ? this->loop->body_instructions : signature->body; - this->execute_flag = new(this->signature) ir_variable(glsl_type::bool_type, "execute_flag", ir_var_temporary); - list.push_head(new(this->signature) ir_assignment(new(this->signature) ir_dereference_variable(execute_flag), new(this->signature) ir_constant(true), 0)); - list.push_head(this->execute_flag); - } - return this->execute_flag; - } - - ir_variable* get_break_flag() - { - assert(this->loop); - if(!this->break_flag) { - this->break_flag = new(this->signature) ir_variable(glsl_type::bool_type, "break_flag", ir_var_temporary); - this->loop->insert_before(this->break_flag); - this->loop->insert_before(new(this->signature) ir_assignment(new(this->signature) ir_dereference_variable(break_flag), new(this->signature) ir_constant(false), 0)); - } - return this->break_flag; - } -}; - -struct function_record -{ - ir_function_signature* signature; - ir_variable* return_flag; /* used to break out of all loops and then jump to the return instruction */ - ir_variable* return_value; - bool lower_return; - unsigned nesting_depth; - - function_record(ir_function_signature* p_signature = 0, - bool lower_return = false) - { - this->signature = p_signature; - this->return_flag = 0; - this->return_value = 0; - this->nesting_depth = 0; - this->lower_return = lower_return; - } - - ir_variable* get_return_flag() - { - if(!this->return_flag) { - this->return_flag = new(this->signature) ir_variable(glsl_type::bool_type, "return_flag", ir_var_temporary); - this->signature->body.push_head(new(this->signature) ir_assignment(new(this->signature) ir_dereference_variable(return_flag), new(this->signature) ir_constant(false), 0)); - this->signature->body.push_head(this->return_flag); - } - return this->return_flag; - } - - ir_variable* get_return_value() - { - if(!this->return_value) { - assert(!this->signature->return_type->is_void()); - return_value = new(this->signature) ir_variable(this->signature->return_type, "return_value", ir_var_temporary); - this->signature->body.push_head(this->return_value); - } - return this->return_value; - } -}; - -struct ir_lower_jumps_visitor : public ir_control_flow_visitor { - /* Postconditions: on exit of any visit() function: - * - * ANALYSIS: this->block.min_strength, - * this->block.may_clear_execute_flag, and - * this->loop.may_set_return_flag are updated to reflect the - * characteristics of the visited statement. - * - * DEAD_CODE_ELIMINATION: If this->block.min_strength is not - * strength_none, the visited node is at the end of its exec_list. - * In other words, any unreachable statements that follow the - * visited statement in its exec_list have been removed. - * - * CONTAINED_JUMPS_LOWERED: If the visited statement contains other - * statements, then should_lower_jump() is false for all of the - * return, break, or continue statements it contains. - * - * Note that visiting a jump does not lower it. That is the - * responsibility of the statement (or function signature) that - * contains the jump. - */ - - bool progress; - - struct function_record function; - struct loop_record loop; - struct block_record block; - - bool pull_out_jumps; - bool lower_continue; - bool lower_break; - bool lower_sub_return; - bool lower_main_return; - - ir_lower_jumps_visitor() - { - this->progress = false; - } - - void truncate_after_instruction(exec_node *ir) - { - if (!ir) - return; - - while (!ir->get_next()->is_tail_sentinel()) { - ((ir_instruction *)ir->get_next())->remove(); - this->progress = true; - } - } - - void move_outer_block_inside(ir_instruction *ir, exec_list *inner_block) - { - while (!ir->get_next()->is_tail_sentinel()) { - ir_instruction *move_ir = (ir_instruction *)ir->get_next(); - - move_ir->remove(); - inner_block->push_tail(move_ir); - } - } - - /** - * Insert the instructions necessary to lower a return statement, - * before the given return instruction. - */ - void insert_lowered_return(ir_return *ir) - { - ir_variable* return_flag = this->function.get_return_flag(); - if(!this->function.signature->return_type->is_void()) { - ir_variable* return_value = this->function.get_return_value(); - ir->insert_before( - new(ir) ir_assignment( - new (ir) ir_dereference_variable(return_value), - ir->value)); - } - ir->insert_before( - new(ir) ir_assignment( - new (ir) ir_dereference_variable(return_flag), - new (ir) ir_constant(true))); - this->loop.may_set_return_flag = true; - } - - /** - * If the given instruction is a return, lower it to instructions - * that store the return value (if there is one), set the return - * flag, and then break. - * - * It is safe to pass NULL to this function. - */ - void lower_return_unconditionally(ir_instruction *ir) - { - if (get_jump_strength(ir) != strength_return) { - return; - } - insert_lowered_return((ir_return*)ir); - ir->replace_with(new(ir) ir_loop_jump(ir_loop_jump::jump_break)); - } - - /** - * Create the necessary instruction to replace a break instruction. - */ - ir_instruction *create_lowered_break() - { - void *ctx = this->function.signature; - return new(ctx) ir_assignment( - new(ctx) ir_dereference_variable(this->loop.get_break_flag()), - new(ctx) ir_constant(true), - 0); - } - - /** - * If the given instruction is a break, lower it to an instruction - * that sets the break flag, without consulting - * should_lower_jump(). - * - * It is safe to pass NULL to this function. - */ - void lower_break_unconditionally(ir_instruction *ir) - { - if (get_jump_strength(ir) != strength_break) { - return; - } - ir->replace_with(create_lowered_break()); - } - - /** - * If the block ends in a conditional or unconditional break, lower - * it, even though should_lower_jump() says it needn't be lowered. - */ - void lower_final_breaks(exec_list *block) - { - ir_instruction *ir = (ir_instruction *) block->get_tail(); - lower_break_unconditionally(ir); - ir_if *ir_if = ir->as_if(); - if (ir_if) { - lower_break_unconditionally( - (ir_instruction *) ir_if->then_instructions.get_tail()); - lower_break_unconditionally( - (ir_instruction *) ir_if->else_instructions.get_tail()); - } - } - - virtual void visit(class ir_loop_jump * ir) - { - /* Eliminate all instructions after each one, since they are - * unreachable. This satisfies the DEAD_CODE_ELIMINATION - * postcondition. - */ - truncate_after_instruction(ir); - - /* Set this->block.min_strength based on this instruction. This - * satisfies the ANALYSIS postcondition. It is not necessary to - * update this->block.may_clear_execute_flag or - * this->loop.may_set_return_flag, because an unlowered jump - * instruction can't change any flags. - */ - this->block.min_strength = ir->is_break() ? strength_break : strength_continue; - - /* The CONTAINED_JUMPS_LOWERED postcondition is already - * satisfied, because jump statements can't contain other - * statements. - */ - } - - virtual void visit(class ir_return * ir) - { - /* Eliminate all instructions after each one, since they are - * unreachable. This satisfies the DEAD_CODE_ELIMINATION - * postcondition. - */ - truncate_after_instruction(ir); - - /* Set this->block.min_strength based on this instruction. This - * satisfies the ANALYSIS postcondition. It is not necessary to - * update this->block.may_clear_execute_flag or - * this->loop.may_set_return_flag, because an unlowered return - * instruction can't change any flags. - */ - this->block.min_strength = strength_return; - - /* The CONTAINED_JUMPS_LOWERED postcondition is already - * satisfied, because jump statements can't contain other - * statements. - */ - } - - virtual void visit(class ir_discard * ir) - { - /* Nothing needs to be done. The ANALYSIS and - * DEAD_CODE_ELIMINATION postconditions are already satisfied, - * because discard statements are ignored by this optimization - * pass. The CONTAINED_JUMPS_LOWERED postcondition is already - * satisfied, because discard statements can't contain other - * statements. - */ - (void) ir; - } - - enum jump_strength get_jump_strength(ir_instruction* ir) - { - if(!ir) - return strength_none; - else if(ir->ir_type == ir_type_loop_jump) { - if(((ir_loop_jump*)ir)->is_break()) - return strength_break; - else - return strength_continue; - } else if(ir->ir_type == ir_type_return) - return strength_return; - else - return strength_none; - } - - bool should_lower_jump(ir_jump* ir) - { - unsigned strength = get_jump_strength(ir); - bool lower; - switch(strength) - { - case strength_none: - lower = false; /* don't change this, code relies on it */ - break; - case strength_continue: - lower = lower_continue; - break; - case strength_break: - assert(this->loop.loop); - /* never lower "canonical break" */ - if(ir->get_next()->is_tail_sentinel() && (this->loop.nesting_depth == 0 - || (this->loop.nesting_depth == 1 && this->loop.in_if_at_the_end_of_the_loop))) - lower = false; - else - lower = lower_break; - break; - case strength_return: - /* never lower return at the end of a this->function */ - if(this->function.nesting_depth == 0 && ir->get_next()->is_tail_sentinel()) - lower = false; - else - lower = this->function.lower_return; - break; - } - return lower; - } - - block_record visit_block(exec_list* list) - { - /* Note: since visiting a node may change that node's next - * pointer, we can't use visit_exec_list(), because - * visit_exec_list() caches the node's next pointer before - * visiting it. So we use foreach_list() instead. - * - * foreach_list() isn't safe if the node being visited gets - * removed, but fortunately this visitor doesn't do that. - */ - - block_record saved_block = this->block; - this->block = block_record(); - foreach_list(node, list) { - ((ir_instruction *) node)->accept(this); - } - block_record ret = this->block; - this->block = saved_block; - return ret; - } - - virtual void visit(ir_if *ir) - { - if(this->loop.nesting_depth == 0 && ir->get_next()->is_tail_sentinel()) - this->loop.in_if_at_the_end_of_the_loop = true; - - ++this->function.nesting_depth; - ++this->loop.nesting_depth; - - block_record block_records[2]; - ir_jump* jumps[2]; - - /* Recursively lower nested jumps. This satisfies the - * CONTAINED_JUMPS_LOWERED postcondition, except in the case of - * unconditional jumps at the end of ir->then_instructions and - * ir->else_instructions, which are handled below. - */ - block_records[0] = visit_block(&ir->then_instructions); - block_records[1] = visit_block(&ir->else_instructions); - -retry: /* we get here if we put code after the if inside a branch */ - - /* Determine which of ir->then_instructions and - * ir->else_instructions end with an unconditional jump. - */ - for(unsigned i = 0; i < 2; ++i) { - exec_list& list = i ? ir->else_instructions : ir->then_instructions; - jumps[i] = 0; - if(!list.is_empty() && get_jump_strength((ir_instruction*)list.get_tail())) - jumps[i] = (ir_jump*)list.get_tail(); - } - - /* Loop until we have satisfied the CONTAINED_JUMPS_LOWERED - * postcondition by lowering jumps in both then_instructions and - * else_instructions. - */ - for(;;) { - /* Determine the types of the jumps that terminate - * ir->then_instructions and ir->else_instructions. - */ - jump_strength jump_strengths[2]; - - for(unsigned i = 0; i < 2; ++i) { - if(jumps[i]) { - jump_strengths[i] = block_records[i].min_strength; - assert(jump_strengths[i] == get_jump_strength(jumps[i])); - } else - jump_strengths[i] = strength_none; - } - - /* If both code paths end in a jump, and the jumps are the - * same, and we are pulling out jumps, replace them with a - * single jump that comes after the if instruction. The new - * jump will be visited next, and it will be lowered if - * necessary by the loop or conditional that encloses it. - */ - if(pull_out_jumps && jump_strengths[0] == jump_strengths[1]) { - bool unify = true; - if(jump_strengths[0] == strength_continue) - ir->insert_after(new(ir) ir_loop_jump(ir_loop_jump::jump_continue)); - else if(jump_strengths[0] == strength_break) - ir->insert_after(new(ir) ir_loop_jump(ir_loop_jump::jump_break)); - /* FINISHME: unify returns with identical expressions */ - else if(jump_strengths[0] == strength_return && this->function.signature->return_type->is_void()) - ir->insert_after(new(ir) ir_return(NULL)); - else - unify = false; - - if(unify) { - jumps[0]->remove(); - jumps[1]->remove(); - this->progress = true; - - /* Update jumps[] to reflect the fact that the jumps - * are gone, and update block_records[] to reflect the - * fact that control can now flow to the next - * instruction. - */ - jumps[0] = 0; - jumps[1] = 0; - block_records[0].min_strength = strength_none; - block_records[1].min_strength = strength_none; - - /* The CONTAINED_JUMPS_LOWERED postcondition is now - * satisfied, so we can break out of the loop. - */ - break; - } - } - - /* lower a jump: if both need to lowered, start with the strongest one, so that - * we might later unify the lowered version with the other one - */ - bool should_lower[2]; - for(unsigned i = 0; i < 2; ++i) - should_lower[i] = should_lower_jump(jumps[i]); - - int lower; - if(should_lower[1] && should_lower[0]) - lower = jump_strengths[1] > jump_strengths[0]; - else if(should_lower[0]) - lower = 0; - else if(should_lower[1]) - lower = 1; - else - /* Neither code path ends in a jump that needs to be - * lowered, so the CONTAINED_JUMPS_LOWERED postcondition - * is satisfied and we can break out of the loop. - */ - break; - - if(jump_strengths[lower] == strength_return) { - /* To lower a return, we create a return flag (if the - * function doesn't have one already) and add instructions - * that: 1. store the return value (if this function has a - * non-void return) and 2. set the return flag - */ - insert_lowered_return((ir_return*)jumps[lower]); - if(this->loop.loop) { - /* If we are in a loop, replace the return instruction - * with a break instruction, and then loop so that the - * break instruction can be lowered if necessary. - */ - ir_loop_jump* lowered = 0; - lowered = new(ir) ir_loop_jump(ir_loop_jump::jump_break); - /* Note: we must update block_records and jumps to - * reflect the fact that the control path has been - * altered from a return to a break. - */ - block_records[lower].min_strength = strength_break; - jumps[lower]->replace_with(lowered); - jumps[lower] = lowered; - } else { - /* If we are not in a loop, we then proceed as we would - * for a continue statement (set the execute flag to - * false to prevent the rest of the function from - * executing). - */ - goto lower_continue; - } - this->progress = true; - } else if(jump_strengths[lower] == strength_break) { - /* To lower a break, we create a break flag (if the loop - * doesn't have one already) and add an instruction that - * sets it. - * - * Then we proceed as we would for a continue statement - * (set the execute flag to false to prevent the rest of - * the loop body from executing). - * - * The visit() function for the loop will ensure that the - * break flag is checked after executing the loop body. - */ - jumps[lower]->insert_before(create_lowered_break()); - goto lower_continue; - } else if(jump_strengths[lower] == strength_continue) { -lower_continue: - /* To lower a continue, we create an execute flag (if the - * loop doesn't have one already) and replace the continue - * with an instruction that clears it. - * - * Note that this code path gets exercised when lowering - * return statements that are not inside a loop, so - * this->loop must be initialized even outside of loops. - */ - ir_variable* execute_flag = this->loop.get_execute_flag(); - jumps[lower]->replace_with(new(ir) ir_assignment(new (ir) ir_dereference_variable(execute_flag), new (ir) ir_constant(false), 0)); - /* Note: we must update block_records and jumps to reflect - * the fact that the control path has been altered to an - * instruction that clears the execute flag. - */ - jumps[lower] = 0; - block_records[lower].min_strength = strength_always_clears_execute_flag; - block_records[lower].may_clear_execute_flag = true; - this->progress = true; - - /* Let the loop run again, in case the other branch of the - * if needs to be lowered too. - */ - } - } - - /* move out a jump out if possible */ - if(pull_out_jumps) { - /* If one of the branches ends in a jump, and control cannot - * fall out the bottom of the other branch, then we can move - * the jump after the if. - * - * Set move_out to the branch we are moving a jump out of. - */ - int move_out = -1; - if(jumps[0] && block_records[1].min_strength >= strength_continue) - move_out = 0; - else if(jumps[1] && block_records[0].min_strength >= strength_continue) - move_out = 1; - - if(move_out >= 0) - { - jumps[move_out]->remove(); - ir->insert_after(jumps[move_out]); - /* Note: we must update block_records and jumps to reflect - * the fact that the jump has been moved out of the if. - */ - jumps[move_out] = 0; - block_records[move_out].min_strength = strength_none; - this->progress = true; - } - } - - /* Now satisfy the ANALYSIS postcondition by setting - * this->block.min_strength and - * this->block.may_clear_execute_flag based on the - * characteristics of the two branches. - */ - if(block_records[0].min_strength < block_records[1].min_strength) - this->block.min_strength = block_records[0].min_strength; - else - this->block.min_strength = block_records[1].min_strength; - this->block.may_clear_execute_flag = this->block.may_clear_execute_flag || block_records[0].may_clear_execute_flag || block_records[1].may_clear_execute_flag; - - /* Now we need to clean up the instructions that follow the - * if. - * - * If those instructions are unreachable, then satisfy the - * DEAD_CODE_ELIMINATION postcondition by eliminating them. - * Otherwise that postcondition is already satisfied. - */ - if(this->block.min_strength) - truncate_after_instruction(ir); - else if(this->block.may_clear_execute_flag) - { - /* If the "if" instruction might clear the execute flag, then - * we need to guard any instructions that follow so that they - * are only executed if the execute flag is set. - * - * If one of the branches of the "if" always clears the - * execute flag, and the other branch never clears it, then - * this is easy: just move all the instructions following the - * "if" into the branch that never clears it. - */ - int move_into = -1; - if(block_records[0].min_strength && !block_records[1].may_clear_execute_flag) - move_into = 1; - else if(block_records[1].min_strength && !block_records[0].may_clear_execute_flag) - move_into = 0; - - if(move_into >= 0) { - assert(!block_records[move_into].min_strength && !block_records[move_into].may_clear_execute_flag); /* otherwise, we just truncated */ - - exec_list* list = move_into ? &ir->else_instructions : &ir->then_instructions; - exec_node* next = ir->get_next(); - if(!next->is_tail_sentinel()) { - move_outer_block_inside(ir, list); - - /* If any instructions moved, then we need to visit - * them (since they are now inside the "if"). Since - * block_records[move_into] is in its default state - * (see assertion above), we can safely replace - * block_records[move_into] with the result of this - * analysis. - */ - exec_list list; - list.head = next; - block_records[move_into] = visit_block(&list); - - /* - * Then we need to re-start our jump lowering, since one - * of the instructions we moved might be a jump that - * needs to be lowered. - */ - this->progress = true; - goto retry; - } - } else { - /* If we get here, then the simple case didn't apply; we - * need to actually guard the instructions that follow. - * - * To avoid creating unnecessarily-deep nesting, first - * look through the instructions that follow and unwrap - * any instructions that that are already wrapped in the - * appropriate guard. - */ - ir_instruction* ir_after; - for(ir_after = (ir_instruction*)ir->get_next(); !ir_after->is_tail_sentinel();) - { - ir_if* ir_if = ir_after->as_if(); - if(ir_if && ir_if->else_instructions.is_empty()) { - ir_dereference_variable* ir_if_cond_deref = ir_if->condition->as_dereference_variable(); - if(ir_if_cond_deref && ir_if_cond_deref->var == this->loop.execute_flag) { - ir_instruction* ir_next = (ir_instruction*)ir_after->get_next(); - ir_after->insert_before(&ir_if->then_instructions); - ir_after->remove(); - ir_after = ir_next; - continue; - } - } - ir_after = (ir_instruction*)ir_after->get_next(); - - /* only set this if we find any unprotected instruction */ - this->progress = true; - } - - /* Then, wrap all the instructions that follow in a single - * guard. - */ - if(!ir->get_next()->is_tail_sentinel()) { - assert(this->loop.execute_flag); - ir_if* if_execute = new(ir) ir_if(new(ir) ir_dereference_variable(this->loop.execute_flag)); - move_outer_block_inside(ir, &if_execute->then_instructions); - ir->insert_after(if_execute); - } - } - } - --this->loop.nesting_depth; - --this->function.nesting_depth; - } - - virtual void visit(ir_loop *ir) - { - /* Visit the body of the loop, with a fresh data structure in - * this->loop so that the analysis we do here won't bleed into - * enclosing loops. - * - * We assume that all code after a loop is reachable from the - * loop (see comments on enum jump_strength), so the - * DEAD_CODE_ELIMINATION postcondition is automatically - * satisfied, as is the block.min_strength portion of the - * ANALYSIS postcondition. - * - * The block.may_clear_execute_flag portion of the ANALYSIS - * postcondition is automatically satisfied because execute - * flags do not propagate outside of loops. - * - * The loop.may_set_return_flag portion of the ANALYSIS - * postcondition is handled below. - */ - ++this->function.nesting_depth; - loop_record saved_loop = this->loop; - this->loop = loop_record(this->function.signature, ir); - - /* Recursively lower nested jumps. This satisfies the - * CONTAINED_JUMPS_LOWERED postcondition, except in the case of - * an unconditional continue or return at the bottom of the - * loop, which are handled below. - */ - block_record body = visit_block(&ir->body_instructions); - - /* If the loop ends in an unconditional continue, eliminate it - * because it is redundant. - */ - ir_instruction *ir_last - = (ir_instruction *) ir->body_instructions.get_tail(); - if (get_jump_strength(ir_last) == strength_continue) { - ir_last->remove(); - } - - /* If the loop ends in an unconditional return, and we are - * lowering returns, lower it. - */ - if (this->function.lower_return) - lower_return_unconditionally(ir_last); - - if(body.min_strength >= strength_break) { - /* FINISHME: If the min_strength of the loop body is - * strength_break or strength_return, that means that it - * isn't a loop at all, since control flow always leaves the - * body of the loop via break or return. In principle the - * loop could be eliminated in this case. This optimization - * is not implemented yet. - */ - } - - if(this->loop.break_flag) { - /* We only get here if we are lowering breaks */ - assert (lower_break); - - /* If a break flag was generated while visiting the body of - * the loop, then at least one break was lowered, so we need - * to generate an if statement at the end of the loop that - * does a "break" if the break flag is set. The break we - * generate won't violate the CONTAINED_JUMPS_LOWERED - * postcondition, because should_lower_jump() always returns - * false for a break that happens at the end of a loop. - * - * However, if the loop already ends in a conditional or - * unconditional break, then we need to lower that break, - * because it won't be at the end of the loop anymore. - */ - lower_final_breaks(&ir->body_instructions); - - ir_if* break_if = new(ir) ir_if(new(ir) ir_dereference_variable(this->loop.break_flag)); - break_if->then_instructions.push_tail(new(ir) ir_loop_jump(ir_loop_jump::jump_break)); - ir->body_instructions.push_tail(break_if); - } - - /* If the body of the loop may set the return flag, then at - * least one return was lowered to a break, so we need to ensure - * that the return flag is checked after the body of the loop is - * executed. - */ - if(this->loop.may_set_return_flag) { - assert(this->function.return_flag); - /* Generate the if statement to check the return flag */ - ir_if* return_if = new(ir) ir_if(new(ir) ir_dereference_variable(this->function.return_flag)); - /* Note: we also need to propagate the knowledge that the - * return flag may get set to the outer context. This - * satisfies the loop.may_set_return_flag part of the - * ANALYSIS postcondition. - */ - saved_loop.may_set_return_flag = true; - if(saved_loop.loop) - /* If this loop is nested inside another one, then the if - * statement that we generated should break out of that - * loop if the return flag is set. Caller will lower that - * break statement if necessary. - */ - return_if->then_instructions.push_tail(new(ir) ir_loop_jump(ir_loop_jump::jump_break)); - else - /* Otherwise, all we need to do is ensure that the - * instructions that follow are only executed if the - * return flag is clear. We can do that by moving those - * instructions into the else clause of the generated if - * statement. - */ - move_outer_block_inside(ir, &return_if->else_instructions); - ir->insert_after(return_if); - } - - this->loop = saved_loop; - --this->function.nesting_depth; - } - - virtual void visit(ir_function_signature *ir) - { - /* these are not strictly necessary */ - assert(!this->function.signature); - assert(!this->loop.loop); - - bool lower_return; - if (strcmp(ir->function_name(), "main") == 0) - lower_return = lower_main_return; - else - lower_return = lower_sub_return; - - function_record saved_function = this->function; - loop_record saved_loop = this->loop; - this->function = function_record(ir, lower_return); - this->loop = loop_record(ir); - - assert(!this->loop.loop); - - /* Visit the body of the function to lower any jumps that occur - * in it, except possibly an unconditional return statement at - * the end of it. - */ - visit_block(&ir->body); - - /* If the body ended in an unconditional return of non-void, - * then we don't need to lower it because it's the one canonical - * return. - * - * If the body ended in a return of void, eliminate it because - * it is redundant. - */ - if (ir->return_type->is_void() && - get_jump_strength((ir_instruction *) ir->body.get_tail())) { - ir_jump *jump = (ir_jump *) ir->body.get_tail(); - assert (jump->ir_type == ir_type_return); - jump->remove(); - } - - if(this->function.return_value) - ir->body.push_tail(new(ir) ir_return(new (ir) ir_dereference_variable(this->function.return_value))); - - this->loop = saved_loop; - this->function = saved_function; - } - - virtual void visit(class ir_function * ir) - { - visit_block(&ir->signatures); - } -}; - -bool -do_lower_jumps(exec_list *instructions, bool pull_out_jumps, bool lower_sub_return, bool lower_main_return, bool lower_continue, bool lower_break) -{ - ir_lower_jumps_visitor v; - v.pull_out_jumps = pull_out_jumps; - v.lower_continue = lower_continue; - v.lower_break = lower_break; - v.lower_sub_return = lower_sub_return; - v.lower_main_return = lower_main_return; - - do { - v.progress = false; - visit_exec_list(instructions, &v); - } while (v.progress); - - return v.progress; -} diff --git a/dll/opengl/mesa/src/glsl/lower_mat_op_to_vec.cpp b/dll/opengl/mesa/src/glsl/lower_mat_op_to_vec.cpp deleted file mode 100644 index a371afc14c2..00000000000 --- a/dll/opengl/mesa/src/glsl/lower_mat_op_to_vec.cpp +++ /dev/null @@ -1,428 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file lower_mat_op_to_vec.cpp - * - * Breaks matrix operation expressions down to a series of vector operations. - * - * Generally this is how we have to codegen matrix operations for a - * GPU, so this gives us the chance to constant fold operations on a - * column or row. - */ - -#include "ir.h" -#include "ir_expression_flattening.h" -#include "glsl_types.h" - -class ir_mat_op_to_vec_visitor : public ir_hierarchical_visitor { -public: - ir_mat_op_to_vec_visitor() - { - this->made_progress = false; - this->mem_ctx = NULL; - } - - ir_visitor_status visit_leave(ir_assignment *); - - ir_dereference *get_column(ir_dereference *val, int col); - ir_rvalue *get_element(ir_dereference *val, int col, int row); - - void do_mul_mat_mat(ir_dereference *result, - ir_dereference *a, ir_dereference *b); - void do_mul_mat_vec(ir_dereference *result, - ir_dereference *a, ir_dereference *b); - void do_mul_vec_mat(ir_dereference *result, - ir_dereference *a, ir_dereference *b); - void do_mul_mat_scalar(ir_dereference *result, - ir_dereference *a, ir_dereference *b); - void do_equal_mat_mat(ir_dereference *result, ir_dereference *a, - ir_dereference *b, bool test_equal); - - void *mem_ctx; - bool made_progress; -}; - -static bool -mat_op_to_vec_predicate(ir_instruction *ir) -{ - ir_expression *expr = ir->as_expression(); - unsigned int i; - - if (!expr) - return false; - - for (i = 0; i < expr->get_num_operands(); i++) { - if (expr->operands[i]->type->is_matrix()) - return true; - } - - return false; -} - -bool -do_mat_op_to_vec(exec_list *instructions) -{ - ir_mat_op_to_vec_visitor v; - - /* Pull out any matrix expression to a separate assignment to a - * temp. This will make our handling of the breakdown to - * operations on the matrix's vector components much easier. - */ - do_expression_flattening(instructions, mat_op_to_vec_predicate); - - visit_list_elements(&v, instructions); - - return v.made_progress; -} - -ir_rvalue * -ir_mat_op_to_vec_visitor::get_element(ir_dereference *val, int col, int row) -{ - val = get_column(val, col); - - return new(mem_ctx) ir_swizzle(val, row, 0, 0, 0, 1); -} - -ir_dereference * -ir_mat_op_to_vec_visitor::get_column(ir_dereference *val, int row) -{ - val = val->clone(mem_ctx, NULL); - - if (val->type->is_matrix()) { - val = new(mem_ctx) ir_dereference_array(val, - new(mem_ctx) ir_constant(row)); - } - - return val; -} - -void -ir_mat_op_to_vec_visitor::do_mul_mat_mat(ir_dereference *result, - ir_dereference *a, - ir_dereference *b) -{ - int b_col, i; - ir_assignment *assign; - ir_expression *expr; - - for (b_col = 0; b_col < b->type->matrix_columns; b_col++) { - /* first column */ - expr = new(mem_ctx) ir_expression(ir_binop_mul, - get_column(a, 0), - get_element(b, b_col, 0)); - - /* following columns */ - for (i = 1; i < a->type->matrix_columns; i++) { - ir_expression *mul_expr; - - mul_expr = new(mem_ctx) ir_expression(ir_binop_mul, - get_column(a, i), - get_element(b, b_col, i)); - expr = new(mem_ctx) ir_expression(ir_binop_add, - expr, - mul_expr); - } - - assign = new(mem_ctx) ir_assignment(get_column(result, b_col), expr); - base_ir->insert_before(assign); - } -} - -void -ir_mat_op_to_vec_visitor::do_mul_mat_vec(ir_dereference *result, - ir_dereference *a, - ir_dereference *b) -{ - int i; - ir_assignment *assign; - ir_expression *expr; - - /* first column */ - expr = new(mem_ctx) ir_expression(ir_binop_mul, - get_column(a, 0), - get_element(b, 0, 0)); - - /* following columns */ - for (i = 1; i < a->type->matrix_columns; i++) { - ir_expression *mul_expr; - - mul_expr = new(mem_ctx) ir_expression(ir_binop_mul, - get_column(a, i), - get_element(b, 0, i)); - expr = new(mem_ctx) ir_expression(ir_binop_add, expr, mul_expr); - } - - result = result->clone(mem_ctx, NULL); - assign = new(mem_ctx) ir_assignment(result, expr); - base_ir->insert_before(assign); -} - -void -ir_mat_op_to_vec_visitor::do_mul_vec_mat(ir_dereference *result, - ir_dereference *a, - ir_dereference *b) -{ - int i; - - for (i = 0; i < b->type->matrix_columns; i++) { - ir_rvalue *column_result; - ir_expression *column_expr; - ir_assignment *column_assign; - - column_result = result->clone(mem_ctx, NULL); - column_result = new(mem_ctx) ir_swizzle(column_result, i, 0, 0, 0, 1); - - column_expr = new(mem_ctx) ir_expression(ir_binop_dot, - a->clone(mem_ctx, NULL), - get_column(b, i)); - - column_assign = new(mem_ctx) ir_assignment(column_result, - column_expr); - base_ir->insert_before(column_assign); - } -} - -void -ir_mat_op_to_vec_visitor::do_mul_mat_scalar(ir_dereference *result, - ir_dereference *a, - ir_dereference *b) -{ - int i; - - for (i = 0; i < a->type->matrix_columns; i++) { - ir_expression *column_expr; - ir_assignment *column_assign; - - column_expr = new(mem_ctx) ir_expression(ir_binop_mul, - get_column(a, i), - b->clone(mem_ctx, NULL)); - - column_assign = new(mem_ctx) ir_assignment(get_column(result, i), - column_expr); - base_ir->insert_before(column_assign); - } -} - -void -ir_mat_op_to_vec_visitor::do_equal_mat_mat(ir_dereference *result, - ir_dereference *a, - ir_dereference *b, - bool test_equal) -{ - /* This essentially implements the following GLSL: - * - * bool equal(mat4 a, mat4 b) - * { - * return !any(bvec4(a[0] != b[0], - * a[1] != b[1], - * a[2] != b[2], - * a[3] != b[3]); - * } - * - * bool nequal(mat4 a, mat4 b) - * { - * return any(bvec4(a[0] != b[0], - * a[1] != b[1], - * a[2] != b[2], - * a[3] != b[3]); - * } - */ - const unsigned columns = a->type->matrix_columns; - const glsl_type *const bvec_type = - glsl_type::get_instance(GLSL_TYPE_BOOL, columns, 1); - - ir_variable *const tmp_bvec = - new(this->mem_ctx) ir_variable(bvec_type, "mat_cmp_bvec", - ir_var_temporary); - this->base_ir->insert_before(tmp_bvec); - - for (unsigned i = 0; i < columns; i++) { - ir_expression *const cmp = - new(this->mem_ctx) ir_expression(ir_binop_any_nequal, - get_column(a, i), - get_column(b, i)); - - ir_dereference *const lhs = - new(this->mem_ctx) ir_dereference_variable(tmp_bvec); - - ir_assignment *const assign = - new(this->mem_ctx) ir_assignment(lhs, cmp, NULL, (1U << i)); - - this->base_ir->insert_before(assign); - } - - ir_rvalue *const val = new(this->mem_ctx) ir_dereference_variable(tmp_bvec); - ir_expression *any = new(this->mem_ctx) ir_expression(ir_unop_any, val); - - if (test_equal) - any = new(this->mem_ctx) ir_expression(ir_unop_logic_not, any); - - ir_assignment *const assign = - new(mem_ctx) ir_assignment(result->clone(mem_ctx, NULL), any); - base_ir->insert_before(assign); -} - -static bool -has_matrix_operand(const ir_expression *expr, unsigned &columns) -{ - for (unsigned i = 0; i < expr->get_num_operands(); i++) { - if (expr->operands[i]->type->is_matrix()) { - columns = expr->operands[i]->type->matrix_columns; - return true; - } - } - - return false; -} - - -ir_visitor_status -ir_mat_op_to_vec_visitor::visit_leave(ir_assignment *orig_assign) -{ - ir_expression *orig_expr = orig_assign->rhs->as_expression(); - unsigned int i, matrix_columns = 1; - ir_dereference *op[2]; - - if (!orig_expr) - return visit_continue; - - if (!has_matrix_operand(orig_expr, matrix_columns)) - return visit_continue; - - assert(orig_expr->get_num_operands() <= 2); - - mem_ctx = ralloc_parent(orig_assign); - - ir_dereference_variable *result = - orig_assign->lhs->as_dereference_variable(); - assert(result); - - /* Store the expression operands in temps so we can use them - * multiple times. - */ - for (i = 0; i < orig_expr->get_num_operands(); i++) { - ir_assignment *assign; - ir_dereference *deref = orig_expr->operands[i]->as_dereference(); - - /* Avoid making a temporary if we don't need to to avoid aliasing. */ - if (deref && - deref->variable_referenced() != result->variable_referenced()) { - op[i] = deref; - continue; - } - - /* Otherwise, store the operand in a temporary generally if it's - * not a dereference. - */ - ir_variable *var = new(mem_ctx) ir_variable(orig_expr->operands[i]->type, - "mat_op_to_vec", - ir_var_temporary); - base_ir->insert_before(var); - - /* Note that we use this dereference for the assignment. That means - * that others that want to use op[i] have to clone the deref. - */ - op[i] = new(mem_ctx) ir_dereference_variable(var); - assign = new(mem_ctx) ir_assignment(op[i], orig_expr->operands[i]); - base_ir->insert_before(assign); - } - - /* OK, time to break down this matrix operation. */ - switch (orig_expr->operation) { - case ir_unop_neg: { - /* Apply the operation to each column.*/ - for (i = 0; i < matrix_columns; i++) { - ir_expression *column_expr; - ir_assignment *column_assign; - - column_expr = new(mem_ctx) ir_expression(orig_expr->operation, - get_column(op[0], i)); - - column_assign = new(mem_ctx) ir_assignment(get_column(result, i), - column_expr); - assert(column_assign->write_mask != 0); - base_ir->insert_before(column_assign); - } - break; - } - case ir_binop_add: - case ir_binop_sub: - case ir_binop_div: - case ir_binop_mod: { - /* For most operations, the matrix version is just going - * column-wise through and applying the operation to each column - * if available. - */ - for (i = 0; i < matrix_columns; i++) { - ir_expression *column_expr; - ir_assignment *column_assign; - - column_expr = new(mem_ctx) ir_expression(orig_expr->operation, - get_column(op[0], i), - get_column(op[1], i)); - - column_assign = new(mem_ctx) ir_assignment(get_column(result, i), - column_expr); - assert(column_assign->write_mask != 0); - base_ir->insert_before(column_assign); - } - break; - } - case ir_binop_mul: - if (op[0]->type->is_matrix()) { - if (op[1]->type->is_matrix()) { - do_mul_mat_mat(result, op[0], op[1]); - } else if (op[1]->type->is_vector()) { - do_mul_mat_vec(result, op[0], op[1]); - } else { - assert(op[1]->type->is_scalar()); - do_mul_mat_scalar(result, op[0], op[1]); - } - } else { - assert(op[1]->type->is_matrix()); - if (op[0]->type->is_vector()) { - do_mul_vec_mat(result, op[0], op[1]); - } else { - assert(op[0]->type->is_scalar()); - do_mul_mat_scalar(result, op[1], op[0]); - } - } - break; - - case ir_binop_all_equal: - case ir_binop_any_nequal: - do_equal_mat_mat(result, op[1], op[0], - (orig_expr->operation == ir_binop_all_equal)); - break; - - default: - printf("FINISHME: Handle matrix operation for %s\n", - orig_expr->operator_string()); - abort(); - } - orig_assign->remove(); - this->made_progress = true; - - return visit_continue; -} diff --git a/dll/opengl/mesa/src/glsl/lower_noise.cpp b/dll/opengl/mesa/src/glsl/lower_noise.cpp deleted file mode 100644 index 85f59b675e0..00000000000 --- a/dll/opengl/mesa/src/glsl/lower_noise.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file lower_noise.cpp - * IR lower pass to remove noise opcodes. - * - * \author Ian Romanick - */ - -#include "ir.h" -#include "ir_rvalue_visitor.h" - -class lower_noise_visitor : public ir_rvalue_visitor { -public: - lower_noise_visitor() : progress(false) - { - /* empty */ - } - - void handle_rvalue(ir_rvalue **rvalue) - { - if (!*rvalue) - return; - - ir_expression *expr = (*rvalue)->as_expression(); - if (!expr) - return; - - /* In the future, ir_unop_noise may be replaced by a call to a function - * that implements noise. No hardware has a noise instruction. - */ - if (expr->operation == ir_unop_noise) { - *rvalue = ir_constant::zero(ralloc_parent(expr), expr->type); - this->progress = true; - } - } - - bool progress; -}; - - -bool -lower_noise(exec_list *instructions) -{ - lower_noise_visitor v; - - visit_list_elements(&v, instructions); - - return v.progress; -} diff --git a/dll/opengl/mesa/src/glsl/lower_output_reads.cpp b/dll/opengl/mesa/src/glsl/lower_output_reads.cpp deleted file mode 100644 index 415b541c3ef..00000000000 --- a/dll/opengl/mesa/src/glsl/lower_output_reads.cpp +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright © 2012 Vincent Lejeune - * Copyright © 2012 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include "ir.h" -#include "program/hash_table.h" - -/** - * \file lower_output_reads.cpp - * - * In GLSL, shader output variables (such as varyings) can be both read and - * written. However, on some hardware, reading an output register causes - * trouble. - * - * This pass creates temporary shadow copies of every (used) shader output, - * and replaces all accesses to use those instead. It also adds code to the - * main() function to copy the final values to the actual shader outputs. - */ - -class output_read_remover : public ir_hierarchical_visitor { -protected: - /** - * A hash table mapping from the original ir_variable shader outputs - * (ir_var_out mode) to the new temporaries to be used instead. - */ - hash_table *replacements; - - void *mem_ctx; -public: - output_read_remover(); - ~output_read_remover(); - virtual ir_visitor_status visit(class ir_dereference_variable *); - virtual ir_visitor_status visit_leave(class ir_return *); - virtual ir_visitor_status visit_leave(class ir_function_signature *); -}; - -output_read_remover::output_read_remover() -{ - mem_ctx = ralloc_context(NULL); - replacements = - hash_table_ctor(0, hash_table_pointer_hash, hash_table_pointer_compare); -} - -output_read_remover::~output_read_remover() -{ - hash_table_dtor(replacements); - ralloc_free(mem_ctx); -} - -ir_visitor_status -output_read_remover::visit(ir_dereference_variable *ir) -{ - if (ir->var->mode != ir_var_out) - return visit_continue; - - ir_variable *temp = (ir_variable *) hash_table_find(replacements, ir->var); - - /* If we don't have an existing temporary, create one. */ - if (temp == NULL) { - void *var_ctx = ralloc_parent(ir->var); - temp = new(var_ctx) ir_variable(ir->var->type, ir->var->name, - ir_var_temporary); - hash_table_insert(replacements, temp, ir->var); - } - - /* Update the dereference to use the temporary */ - ir->var = temp; - - return visit_continue; -} - -/** - * Create an assignment to copy a temporary value back to the actual output. - */ -static ir_assignment * -copy(void *ctx, ir_variable *output, ir_variable *temp) -{ - ir_dereference_variable *lhs = new(ctx) ir_dereference_variable(output); - ir_dereference_variable *rhs = new(ctx) ir_dereference_variable(temp); - return new(ctx) ir_assignment(lhs, rhs); -} - -/** Insert a copy-back assignment before a "return" statement */ -static void -emit_return_copy(const void *key, void *data, void *closure) -{ - ir_return *ir = (ir_return *) closure; - ir->insert_before(copy(ir, (ir_variable *) key, (ir_variable *) data)); -} - -/** Insert a copy-back assignment at the end of the main() function */ -static void -emit_main_copy(const void *key, void *data, void *closure) -{ - ir_function_signature *sig = (ir_function_signature *) closure; - sig->body.push_tail(copy(sig, (ir_variable *) key, (ir_variable *) data)); -} - -ir_visitor_status -output_read_remover::visit_leave(ir_return *ir) -{ - hash_table_call_foreach(replacements, emit_return_copy, ir); - return visit_continue; -} - -ir_visitor_status -output_read_remover::visit_leave(ir_function_signature *sig) -{ - if (strcmp(sig->function_name(), "main") != 0) - return visit_continue; - - hash_table_call_foreach(replacements, emit_main_copy, sig); - return visit_continue; -} - -void -lower_output_reads(exec_list *instructions) -{ - output_read_remover v; - visit_list_elements(&v, instructions); -} diff --git a/dll/opengl/mesa/src/glsl/lower_texture_projection.cpp b/dll/opengl/mesa/src/glsl/lower_texture_projection.cpp deleted file mode 100644 index 6e3aaecceee..00000000000 --- a/dll/opengl/mesa/src/glsl/lower_texture_projection.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file lower_texture_projection.cpp - * - * IR lower pass to perform the division of texture coordinates by the texture - * projector if present. - * - * Many GPUs have a texture sampling opcode that takes the projector - * and does the divide internally, thus the presence of the projector - * in the IR. For GPUs that don't, this saves the driver needing the - * logic for handling the divide. - * - * \author Eric Anholt - */ - -#include "ir.h" - -class lower_texture_projection_visitor : public ir_hierarchical_visitor { -public: - lower_texture_projection_visitor() - { - progress = false; - } - - ir_visitor_status visit_leave(ir_texture *ir); - - bool progress; -}; - -ir_visitor_status -lower_texture_projection_visitor::visit_leave(ir_texture *ir) -{ - if (!ir->projector) - return visit_continue; - - void *mem_ctx = ralloc_parent(ir); - - ir_variable *var = new(mem_ctx) ir_variable(ir->projector->type, - "projector", ir_var_auto); - base_ir->insert_before(var); - ir_dereference *deref = new(mem_ctx) ir_dereference_variable(var); - ir_expression *expr = new(mem_ctx) ir_expression(ir_unop_rcp, - ir->projector->type, - ir->projector, - NULL); - ir_assignment *assign = new(mem_ctx) ir_assignment(deref, expr, NULL); - base_ir->insert_before(assign); - - deref = new(mem_ctx) ir_dereference_variable(var); - ir->coordinate = new(mem_ctx) ir_expression(ir_binop_mul, - ir->coordinate->type, - ir->coordinate, - deref); - - if (ir->shadow_comparitor) { - deref = new(mem_ctx) ir_dereference_variable(var); - ir->shadow_comparitor = new(mem_ctx) ir_expression(ir_binop_mul, - ir->shadow_comparitor->type, - ir->shadow_comparitor, - deref); - } - - ir->projector = NULL; - - progress = true; - return visit_continue; -} - -bool -do_lower_texture_projection(exec_list *instructions) -{ - lower_texture_projection_visitor v; - - visit_list_elements(&v, instructions); - - return v.progress; -} diff --git a/dll/opengl/mesa/src/glsl/lower_variable_index_to_cond_assign.cpp b/dll/opengl/mesa/src/glsl/lower_variable_index_to_cond_assign.cpp deleted file mode 100644 index f8e4a1de428..00000000000 --- a/dll/opengl/mesa/src/glsl/lower_variable_index_to_cond_assign.cpp +++ /dev/null @@ -1,536 +0,0 @@ -/* - * Copyright © 2010 Luca Barbieri - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file lower_variable_index_to_cond_assign.cpp - * - * Turns non-constant indexing into array types to a series of - * conditional moves of each element into a temporary. - * - * Pre-DX10 GPUs often don't have a native way to do this operation, - * and this works around that. - * - * The lowering process proceeds as follows. Each non-constant index - * found in an r-value is converted to a canonical form \c array[i]. Each - * element of the array is conditionally assigned to a temporary by comparing - * \c i to a constant index. This is done by cloning the canonical form and - * replacing all occurances of \c i with a constant. Each remaining occurance - * of the canonical form in the IR is replaced with a dereference of the - * temporary variable. - * - * L-values with non-constant indices are handled similarly. In this case, - * the RHS of the assignment is assigned to a temporary. The non-constant - * index is replace with the canonical form (just like for r-values). The - * temporary is conditionally assigned to each element of the canonical form - * by comparing \c i with each index. The same clone-and-replace scheme is - * used. - */ - -#include "ir.h" -#include "ir_rvalue_visitor.h" -#include "ir_optimization.h" -#include "glsl_types.h" -#include "main/macros.h" - -/** - * Generate a comparison value for a block of indices - * - * Lowering passes for non-constant indexing of arrays, matrices, or vectors - * can use this to generate blocks of index comparison values. - * - * \param instructions List where new instructions will be appended - * \param index \c ir_variable containing the desired index - * \param base Base value for this block of comparisons - * \param components Number of unique index values to compare. This must - * be on the range [1, 4]. - * \param mem_ctx ralloc memory context to be used for all allocations. - * - * \returns - * An \c ir_rvalue that \b must be cloned for each use in conditional - * assignments, etc. - */ -ir_rvalue * -compare_index_block(exec_list *instructions, ir_variable *index, - unsigned base, unsigned components, void *mem_ctx) -{ - ir_rvalue *broadcast_index = new(mem_ctx) ir_dereference_variable(index); - - assert(index->type->is_scalar()); - assert(index->type->base_type == GLSL_TYPE_INT); - assert(components >= 1 && components <= 4); - - if (components > 1) { - const ir_swizzle_mask m = { 0, 0, 0, 0, components, false }; - broadcast_index = new(mem_ctx) ir_swizzle(broadcast_index, m); - } - - /* Compare the desired index value with the next block of four indices. - */ - ir_constant_data test_indices_data; - memset(&test_indices_data, 0, sizeof(test_indices_data)); - test_indices_data.i[0] = base; - test_indices_data.i[1] = base + 1; - test_indices_data.i[2] = base + 2; - test_indices_data.i[3] = base + 3; - - ir_constant *const test_indices = - new(mem_ctx) ir_constant(broadcast_index->type, - &test_indices_data); - - ir_rvalue *const condition_val = - new(mem_ctx) ir_expression(ir_binop_equal, - &glsl_type::bool_type[components - 1], - broadcast_index, - test_indices); - - ir_variable *const condition = - new(mem_ctx) ir_variable(condition_val->type, - "dereference_condition", - ir_var_temporary); - instructions->push_tail(condition); - - ir_rvalue *const cond_deref = - new(mem_ctx) ir_dereference_variable(condition); - instructions->push_tail(new(mem_ctx) ir_assignment(cond_deref, condition_val, 0)); - - return cond_deref; -} - -static inline bool -is_array_or_matrix(const ir_instruction *ir) -{ - return (ir->type->is_array() || ir->type->is_matrix()); -} - -/** - * Replace a dereference of a variable with a specified r-value - * - * Each time a dereference of the specified value is replaced, the r-value - * tree is cloned. - */ -class deref_replacer : public ir_rvalue_visitor { -public: - deref_replacer(const ir_variable *variable_to_replace, ir_rvalue *value) - : variable_to_replace(variable_to_replace), value(value), - progress(false) - { - assert(this->variable_to_replace != NULL); - assert(this->value != NULL); - } - - virtual void handle_rvalue(ir_rvalue **rvalue) - { - ir_dereference_variable *const dv = (*rvalue)->as_dereference_variable(); - - if ((dv != NULL) && (dv->var == this->variable_to_replace)) { - this->progress = true; - *rvalue = this->value->clone(ralloc_parent(*rvalue), NULL); - } - } - - const ir_variable *variable_to_replace; - ir_rvalue *value; - bool progress; -}; - -/** - * Find a variable index dereference of an array in an rvalue tree - */ -class find_variable_index : public ir_hierarchical_visitor { -public: - find_variable_index() - : deref(NULL) - { - /* empty */ - } - - virtual ir_visitor_status visit_enter(ir_dereference_array *ir) - { - if (is_array_or_matrix(ir->array) - && (ir->array_index->as_constant() == NULL)) { - this->deref = ir; - return visit_stop; - } - - return visit_continue; - } - - /** - * First array dereference found in the tree that has a non-constant index. - */ - ir_dereference_array *deref; -}; - -struct assignment_generator -{ - ir_instruction* base_ir; - ir_dereference *rvalue; - ir_variable *old_index; - bool is_write; - unsigned int write_mask; - ir_variable* var; - - assignment_generator() - { - } - - void generate(unsigned i, ir_rvalue* condition, exec_list *list) const - { - /* Just clone the rest of the deref chain when trying to get at the - * underlying variable. - */ - void *mem_ctx = ralloc_parent(base_ir); - - /* Clone the old r-value in its entirety. Then replace any occurances of - * the old variable index with the new constant index. - */ - ir_dereference *element = this->rvalue->clone(mem_ctx, NULL); - ir_constant *const index = new(mem_ctx) ir_constant(i); - deref_replacer r(this->old_index, index); - element->accept(&r); - assert(r.progress); - - /* Generate a conditional assignment to (or from) the constant indexed - * array dereference. - */ - ir_rvalue *variable = new(mem_ctx) ir_dereference_variable(this->var); - ir_assignment *const assignment = (is_write) - ? new(mem_ctx) ir_assignment(element, variable, condition, write_mask) - : new(mem_ctx) ir_assignment(variable, element, condition); - - list->push_tail(assignment); - } -}; - -struct switch_generator -{ - /* make TFunction a template parameter if you need to use other generators */ - typedef assignment_generator TFunction; - const TFunction& generator; - - ir_variable* index; - unsigned linear_sequence_max_length; - unsigned condition_components; - - void *mem_ctx; - - switch_generator(const TFunction& generator, ir_variable *index, - unsigned linear_sequence_max_length, - unsigned condition_components) - : generator(generator), index(index), - linear_sequence_max_length(linear_sequence_max_length), - condition_components(condition_components) - { - this->mem_ctx = ralloc_parent(index); - } - - void linear_sequence(unsigned begin, unsigned end, exec_list *list) - { - if (begin == end) - return; - - /* If the array access is a read, read the first element of this subregion - * unconditionally. The remaining tests will possibly overwrite this - * value with one of the other array elements. - * - * This optimization cannot be done for writes because it will cause the - * first element of the subregion to be written possibly *in addition* to - * one of the other elements. - */ - unsigned first; - if (!this->generator.is_write) { - this->generator.generate(begin, 0, list); - first = begin + 1; - } else { - first = begin; - } - - for (unsigned i = first; i < end; i += 4) { - const unsigned comps = MIN2(condition_components, end - i); - - ir_rvalue *const cond_deref = - compare_index_block(list, index, i, comps, this->mem_ctx); - - if (comps == 1) { - this->generator.generate(i, cond_deref->clone(this->mem_ctx, NULL), - list); - } else { - for (unsigned j = 0; j < comps; j++) { - ir_rvalue *const cond_swiz = - new(this->mem_ctx) ir_swizzle(cond_deref->clone(this->mem_ctx, NULL), - j, 0, 0, 0, 1); - - this->generator.generate(i + j, cond_swiz, list); - } - } - } - } - - void bisect(unsigned begin, unsigned end, exec_list *list) - { - unsigned middle = (begin + end) >> 1; - - assert(index->type->is_integer()); - - ir_constant *const middle_c = (index->type->base_type == GLSL_TYPE_UINT) - ? new(this->mem_ctx) ir_constant((unsigned)middle) - : new(this->mem_ctx) ir_constant((int)middle); - - - ir_dereference_variable *deref = - new(this->mem_ctx) ir_dereference_variable(this->index); - - ir_expression *less = - new(this->mem_ctx) ir_expression(ir_binop_less, glsl_type::bool_type, - deref, middle_c); - - ir_if *if_less = new(this->mem_ctx) ir_if(less); - - generate(begin, middle, &if_less->then_instructions); - generate(middle, end, &if_less->else_instructions); - - list->push_tail(if_less); - } - - void generate(unsigned begin, unsigned end, exec_list *list) - { - unsigned length = end - begin; - if (length <= this->linear_sequence_max_length) - return linear_sequence(begin, end, list); - else - return bisect(begin, end, list); - } -}; - -/** - * Visitor class for replacing expressions with ir_constant values. - */ - -class variable_index_to_cond_assign_visitor : public ir_rvalue_visitor { -public: - variable_index_to_cond_assign_visitor(bool lower_input, - bool lower_output, - bool lower_temp, - bool lower_uniform) - { - this->progress = false; - this->lower_inputs = lower_input; - this->lower_outputs = lower_output; - this->lower_temps = lower_temp; - this->lower_uniforms = lower_uniform; - } - - bool progress; - bool lower_inputs; - bool lower_outputs; - bool lower_temps; - bool lower_uniforms; - - bool storage_type_needs_lowering(ir_dereference_array *deref) const - { - /* If a variable isn't eventually the target of this dereference, then - * it must be a constant or some sort of anonymous temporary storage. - * - * FINISHME: Is this correct? Most drivers treat arrays of constants as - * FINISHME: uniforms. It seems like this should do the same. - */ - const ir_variable *const var = deref->array->variable_referenced(); - if (var == NULL) - return this->lower_temps; - - switch (var->mode) { - case ir_var_auto: - case ir_var_temporary: - return this->lower_temps; - case ir_var_uniform: - return this->lower_uniforms; - case ir_var_in: - case ir_var_const_in: - return (var->location == -1) ? this->lower_temps : this->lower_inputs; - case ir_var_out: - return (var->location == -1) ? this->lower_temps : this->lower_outputs; - case ir_var_inout: - return this->lower_temps; - } - - assert(!"Should not get here."); - return false; - } - - bool needs_lowering(ir_dereference_array *deref) const - { - if (deref == NULL || deref->array_index->as_constant() - || !is_array_or_matrix(deref->array)) - return false; - - return this->storage_type_needs_lowering(deref); - } - - ir_variable *convert_dereference_array(ir_dereference_array *orig_deref, - ir_assignment* orig_assign, - ir_dereference *orig_base) - { - assert(is_array_or_matrix(orig_deref->array)); - - const unsigned length = (orig_deref->array->type->is_array()) - ? orig_deref->array->type->length - : orig_deref->array->type->matrix_columns; - - void *const mem_ctx = ralloc_parent(base_ir); - - /* Temporary storage for either the result of the dereference of - * the array, or the RHS that's being assigned into the - * dereference of the array. - */ - ir_variable *var; - - if (orig_assign) { - var = new(mem_ctx) ir_variable(orig_assign->rhs->type, - "dereference_array_value", - ir_var_temporary); - base_ir->insert_before(var); - - ir_dereference *lhs = new(mem_ctx) ir_dereference_variable(var); - ir_assignment *assign = new(mem_ctx) ir_assignment(lhs, - orig_assign->rhs, - NULL); - - base_ir->insert_before(assign); - } else { - var = new(mem_ctx) ir_variable(orig_deref->type, - "dereference_array_value", - ir_var_temporary); - base_ir->insert_before(var); - } - - /* Store the index to a temporary to avoid reusing its tree. */ - ir_variable *index = - new(mem_ctx) ir_variable(orig_deref->array_index->type, - "dereference_array_index", ir_var_temporary); - base_ir->insert_before(index); - - ir_dereference *lhs = new(mem_ctx) ir_dereference_variable(index); - ir_assignment *assign = - new(mem_ctx) ir_assignment(lhs, orig_deref->array_index, NULL); - base_ir->insert_before(assign); - - orig_deref->array_index = lhs->clone(mem_ctx, NULL); - - assignment_generator ag; - ag.rvalue = orig_base; - ag.base_ir = base_ir; - ag.old_index = index; - ag.var = var; - if (orig_assign) { - ag.is_write = true; - ag.write_mask = orig_assign->write_mask; - } else { - ag.is_write = false; - } - - switch_generator sg(ag, index, 4, 4); - - /* If the original assignment has a condition, respect that original - * condition! This is acomplished by wrapping the new conditional - * assignments in an if-statement that uses the original condition. - */ - if ((orig_assign != NULL) && (orig_assign->condition != NULL)) { - /* No need to clone the condition because the IR that it hangs on is - * going to be removed from the instruction sequence. - */ - ir_if *if_stmt = new(mem_ctx) ir_if(orig_assign->condition); - - sg.generate(0, length, &if_stmt->then_instructions); - base_ir->insert_before(if_stmt); - } else { - exec_list list; - - sg.generate(0, length, &list); - base_ir->insert_before(&list); - } - - return var; - } - - virtual void handle_rvalue(ir_rvalue **pir) - { - if (this->in_assignee) - return; - - if (!*pir) - return; - - ir_dereference_array* orig_deref = (*pir)->as_dereference_array(); - if (needs_lowering(orig_deref)) { - ir_variable *var = - convert_dereference_array(orig_deref, NULL, orig_deref); - assert(var); - *pir = new(ralloc_parent(base_ir)) ir_dereference_variable(var); - this->progress = true; - } - } - - ir_visitor_status - visit_leave(ir_assignment *ir) - { - ir_rvalue_visitor::visit_leave(ir); - - find_variable_index f; - ir->lhs->accept(&f); - - if ((f.deref != NULL) && storage_type_needs_lowering(f.deref)) { - convert_dereference_array(f.deref, ir, ir->lhs); - ir->remove(); - this->progress = true; - } - - return visit_continue; - } -}; - -bool -lower_variable_index_to_cond_assign(exec_list *instructions, - bool lower_input, - bool lower_output, - bool lower_temp, - bool lower_uniform) -{ - variable_index_to_cond_assign_visitor v(lower_input, - lower_output, - lower_temp, - lower_uniform); - - /* Continue lowering until no progress is made. If there are multiple - * levels of indirection (e.g., non-constant indexing of array elements and - * matrix columns of an array of matrix), each pass will only lower one - * level of indirection. - */ - bool progress_ever = false; - do { - v.progress = false; - visit_list_elements(&v, instructions); - progress_ever = v.progress || progress_ever; - } while (v.progress); - - return progress_ever; -} diff --git a/dll/opengl/mesa/src/glsl/lower_vec_index_to_cond_assign.cpp b/dll/opengl/mesa/src/glsl/lower_vec_index_to_cond_assign.cpp deleted file mode 100644 index fce9c3424a1..00000000000 --- a/dll/opengl/mesa/src/glsl/lower_vec_index_to_cond_assign.cpp +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file lower_vec_index_to_cond_assign.cpp - * - * Turns indexing into vector types to a series of conditional moves - * of each channel's swizzle into a temporary. - * - * Most GPUs don't have a native way to do this operation, and this - * works around that. For drivers using both this pass and - * ir_vec_index_to_swizzle, there's a risk that this pass will happen - * before sufficient constant folding to find that the array index is - * constant. However, we hope that other optimization passes, - * particularly constant folding of assignment conditions and copy - * propagation, will result in the same code in the end. - */ - -#include "ir.h" -#include "ir_visitor.h" -#include "ir_optimization.h" -#include "glsl_types.h" - -/** - * Visitor class for replacing expressions with ir_constant values. - */ - -class ir_vec_index_to_cond_assign_visitor : public ir_hierarchical_visitor { -public: - ir_vec_index_to_cond_assign_visitor() - { - progress = false; - } - - ir_rvalue *convert_vec_index_to_cond_assign(ir_rvalue *val); - - virtual ir_visitor_status visit_enter(ir_expression *); - virtual ir_visitor_status visit_enter(ir_swizzle *); - virtual ir_visitor_status visit_leave(ir_assignment *); - virtual ir_visitor_status visit_enter(ir_return *); - virtual ir_visitor_status visit_enter(ir_call *); - virtual ir_visitor_status visit_enter(ir_if *); - - bool progress; -}; - -ir_rvalue * -ir_vec_index_to_cond_assign_visitor::convert_vec_index_to_cond_assign(ir_rvalue *ir) -{ - ir_dereference_array *orig_deref = ir->as_dereference_array(); - ir_assignment *assign; - ir_variable *index, *var; - ir_dereference *deref; - int i; - - if (!orig_deref) - return ir; - - if (orig_deref->array->type->is_matrix() || - orig_deref->array->type->is_array()) - return ir; - - void *mem_ctx = ralloc_parent(ir); - - assert(orig_deref->array_index->type->base_type == GLSL_TYPE_INT); - - exec_list list; - - /* Store the index to a temporary to avoid reusing its tree. */ - index = new(base_ir) ir_variable(glsl_type::int_type, - "vec_index_tmp_i", - ir_var_temporary); - list.push_tail(index); - deref = new(base_ir) ir_dereference_variable(index); - assign = new(base_ir) ir_assignment(deref, orig_deref->array_index, NULL); - list.push_tail(assign); - - /* Temporary where we store whichever value we swizzle out. */ - var = new(base_ir) ir_variable(ir->type, "vec_index_tmp_v", - ir_var_temporary); - list.push_tail(var); - - /* Generate a single comparison condition "mask" for all of the components - * in the vector. - */ - ir_rvalue *const cond_deref = - compare_index_block(&list, index, 0, - orig_deref->array->type->vector_elements, - mem_ctx); - - /* Generate a conditional move of each vector element to the temp. */ - for (i = 0; i < orig_deref->array->type->vector_elements; i++) { - ir_rvalue *condition_swizzle = - new(base_ir) ir_swizzle(cond_deref->clone(ir, NULL), i, 0, 0, 0, 1); - - /* Just clone the rest of the deref chain when trying to get at the - * underlying variable. - */ - ir_rvalue *swizzle = - new(base_ir) ir_swizzle(orig_deref->array->clone(mem_ctx, NULL), - i, 0, 0, 0, 1); - - deref = new(base_ir) ir_dereference_variable(var); - assign = new(base_ir) ir_assignment(deref, swizzle, condition_swizzle); - list.push_tail(assign); - } - - /* Put all of the new instructions in the IR stream before the old - * instruction. - */ - base_ir->insert_before(&list); - - this->progress = true; - return new(base_ir) ir_dereference_variable(var); -} - -ir_visitor_status -ir_vec_index_to_cond_assign_visitor::visit_enter(ir_expression *ir) -{ - unsigned int i; - - for (i = 0; i < ir->get_num_operands(); i++) { - ir->operands[i] = convert_vec_index_to_cond_assign(ir->operands[i]); - } - - return visit_continue; -} - -ir_visitor_status -ir_vec_index_to_cond_assign_visitor::visit_enter(ir_swizzle *ir) -{ - /* Can't be hit from normal GLSL, since you can't swizzle a scalar (which - * the result of indexing a vector is. But maybe at some point we'll end up - * using swizzling of scalars for vector construction. - */ - ir->val = convert_vec_index_to_cond_assign(ir->val); - - return visit_continue; -} - -ir_visitor_status -ir_vec_index_to_cond_assign_visitor::visit_leave(ir_assignment *ir) -{ - ir_variable *index, *var; - ir_dereference_variable *deref; - ir_assignment *assign; - int i; - - ir->rhs = convert_vec_index_to_cond_assign(ir->rhs); - if (ir->condition) - ir->condition = convert_vec_index_to_cond_assign(ir->condition); - - /* Last, handle the LHS */ - ir_dereference_array *orig_deref = ir->lhs->as_dereference_array(); - - if (!orig_deref || - orig_deref->array->type->is_matrix() || - orig_deref->array->type->is_array()) - return visit_continue; - - void *mem_ctx = ralloc_parent(ir); - - assert(orig_deref->array_index->type->base_type == GLSL_TYPE_INT); - - exec_list list; - - /* Store the index to a temporary to avoid reusing its tree. */ - index = new(ir) ir_variable(glsl_type::int_type, "vec_index_tmp_i", - ir_var_temporary); - list.push_tail(index); - deref = new(ir) ir_dereference_variable(index); - assign = new(ir) ir_assignment(deref, orig_deref->array_index, NULL); - list.push_tail(assign); - - /* Store the RHS to a temporary to avoid reusing its tree. */ - var = new(ir) ir_variable(ir->rhs->type, "vec_index_tmp_v", - ir_var_temporary); - list.push_tail(var); - deref = new(ir) ir_dereference_variable(var); - assign = new(ir) ir_assignment(deref, ir->rhs, NULL); - list.push_tail(assign); - - /* Generate a single comparison condition "mask" for all of the components - * in the vector. - */ - ir_rvalue *const cond_deref = - compare_index_block(&list, index, 0, - orig_deref->array->type->vector_elements, - mem_ctx); - - /* Generate a conditional move of each vector element to the temp. */ - for (i = 0; i < orig_deref->array->type->vector_elements; i++) { - ir_rvalue *condition_swizzle = - new(ir) ir_swizzle(cond_deref->clone(ir, NULL), i, 0, 0, 0, 1); - - - /* Just clone the rest of the deref chain when trying to get at the - * underlying variable. - */ - ir_rvalue *swizzle = - new(ir) ir_swizzle(orig_deref->array->clone(mem_ctx, NULL), - i, 0, 0, 0, 1); - - deref = new(ir) ir_dereference_variable(var); - assign = new(ir) ir_assignment(swizzle, deref, condition_swizzle); - list.push_tail(assign); - } - - /* If the original assignment has a condition, respect that original - * condition! This is acomplished by wrapping the new conditional - * assignments in an if-statement that uses the original condition. - */ - if (ir->condition != NULL) { - /* No need to clone the condition because the IR that it hangs on is - * going to be removed from the instruction sequence. - */ - ir_if *if_stmt = new(mem_ctx) ir_if(ir->condition); - - list.move_nodes_to(&if_stmt->then_instructions); - ir->insert_before(if_stmt); - } else { - ir->insert_before(&list); - } - - ir->remove(); - - this->progress = true; - - return visit_continue; -} - -ir_visitor_status -ir_vec_index_to_cond_assign_visitor::visit_enter(ir_call *ir) -{ - foreach_iter(exec_list_iterator, iter, *ir) { - ir_rvalue *param = (ir_rvalue *)iter.get(); - ir_rvalue *new_param = convert_vec_index_to_cond_assign(param); - - if (new_param != param) { - param->replace_with(new_param); - } - } - - return visit_continue; -} - -ir_visitor_status -ir_vec_index_to_cond_assign_visitor::visit_enter(ir_return *ir) -{ - if (ir->value) { - ir->value = convert_vec_index_to_cond_assign(ir->value); - } - - return visit_continue; -} - -ir_visitor_status -ir_vec_index_to_cond_assign_visitor::visit_enter(ir_if *ir) -{ - ir->condition = convert_vec_index_to_cond_assign(ir->condition); - - return visit_continue; -} - -bool -do_vec_index_to_cond_assign(exec_list *instructions) -{ - ir_vec_index_to_cond_assign_visitor v; - - visit_list_elements(&v, instructions); - - return v.progress; -} diff --git a/dll/opengl/mesa/src/glsl/lower_vec_index_to_swizzle.cpp b/dll/opengl/mesa/src/glsl/lower_vec_index_to_swizzle.cpp deleted file mode 100644 index 46fd6ace1b6..00000000000 --- a/dll/opengl/mesa/src/glsl/lower_vec_index_to_swizzle.cpp +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file lower_vec_index_to_swizzle.cpp - * - * Turns constant indexing into vector types to swizzles. This will - * let other swizzle-aware optimization passes catch these constructs, - * and codegen backends not have to worry about this case. - */ - -#include "ir.h" -#include "ir_visitor.h" -#include "ir_optimization.h" -#include "glsl_types.h" -#include "main/macros.h" - -/** - * Visitor class for replacing expressions with ir_constant values. - */ - -class ir_vec_index_to_swizzle_visitor : public ir_hierarchical_visitor { -public: - ir_vec_index_to_swizzle_visitor() - { - progress = false; - } - - ir_rvalue *convert_vec_index_to_swizzle(ir_rvalue *val); - - virtual ir_visitor_status visit_enter(ir_expression *); - virtual ir_visitor_status visit_enter(ir_swizzle *); - virtual ir_visitor_status visit_enter(ir_assignment *); - virtual ir_visitor_status visit_enter(ir_return *); - virtual ir_visitor_status visit_enter(ir_call *); - virtual ir_visitor_status visit_enter(ir_if *); - - bool progress; -}; - -ir_rvalue * -ir_vec_index_to_swizzle_visitor::convert_vec_index_to_swizzle(ir_rvalue *ir) -{ - ir_dereference_array *deref = ir->as_dereference_array(); - ir_constant *ir_constant; - - if (!deref) - return ir; - - if (deref->array->type->is_matrix() || deref->array->type->is_array()) - return ir; - - assert(deref->array_index->type->base_type == GLSL_TYPE_INT); - ir_constant = deref->array_index->constant_expression_value(); - if (!ir_constant) - return ir; - - void *ctx = ralloc_parent(ir); - this->progress = true; - - /* Page 40 of the GLSL 1.20 spec says: - * - * "When indexing with non-constant expressions, behavior is undefined - * if the index is negative, or greater than or equal to the size of - * the vector." - * - * The quoted spec text mentions non-constant expressions, but this code - * operates on constants. These constants are the result of non-constant - * expressions that have been optimized to constants. The common case here - * is a loop counter from an unrolled loop that is used to index a vector. - * - * The ir_swizzle constructor gets angry if the index is negative or too - * large. For simplicity sake, just clamp the index to [0, size-1]. - */ - const int i = MIN2(MAX2(ir_constant->value.i[0], 0), - (deref->array->type->vector_elements - 1)); - - return new(ctx) ir_swizzle(deref->array, i, 0, 0, 0, 1); -} - -ir_visitor_status -ir_vec_index_to_swizzle_visitor::visit_enter(ir_expression *ir) -{ - unsigned int i; - - for (i = 0; i < ir->get_num_operands(); i++) { - ir->operands[i] = convert_vec_index_to_swizzle(ir->operands[i]); - } - - return visit_continue; -} - -ir_visitor_status -ir_vec_index_to_swizzle_visitor::visit_enter(ir_swizzle *ir) -{ - /* Can't be hit from normal GLSL, since you can't swizzle a scalar (which - * the result of indexing a vector is. But maybe at some point we'll end up - * using swizzling of scalars for vector construction. - */ - ir->val = convert_vec_index_to_swizzle(ir->val); - - return visit_continue; -} - -ir_visitor_status -ir_vec_index_to_swizzle_visitor::visit_enter(ir_assignment *ir) -{ - ir->set_lhs(convert_vec_index_to_swizzle(ir->lhs)); - ir->rhs = convert_vec_index_to_swizzle(ir->rhs); - - return visit_continue; -} - -ir_visitor_status -ir_vec_index_to_swizzle_visitor::visit_enter(ir_call *ir) -{ - foreach_iter(exec_list_iterator, iter, *ir) { - ir_rvalue *param = (ir_rvalue *)iter.get(); - ir_rvalue *new_param = convert_vec_index_to_swizzle(param); - - if (new_param != param) { - param->replace_with(new_param); - } - } - - return visit_continue; -} - -ir_visitor_status -ir_vec_index_to_swizzle_visitor::visit_enter(ir_return *ir) -{ - if (ir->value) { - ir->value = convert_vec_index_to_swizzle(ir->value); - } - - return visit_continue; -} - -ir_visitor_status -ir_vec_index_to_swizzle_visitor::visit_enter(ir_if *ir) -{ - ir->condition = convert_vec_index_to_swizzle(ir->condition); - - return visit_continue; -} - -bool -do_vec_index_to_swizzle(exec_list *instructions) -{ - ir_vec_index_to_swizzle_visitor v; - - v.run(instructions); - - return v.progress; -} diff --git a/dll/opengl/mesa/src/glsl/lower_vector.cpp b/dll/opengl/mesa/src/glsl/lower_vector.cpp deleted file mode 100644 index 57963a121ad..00000000000 --- a/dll/opengl/mesa/src/glsl/lower_vector.cpp +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file lower_vector.cpp - * IR lowering pass to remove some types of ir_quadop_vector - * - * \author Ian Romanick - */ - -#include "ir.h" -#include "ir_rvalue_visitor.h" - -class lower_vector_visitor : public ir_rvalue_visitor { -public: - lower_vector_visitor() : progress(false) - { - /* empty */ - } - - void handle_rvalue(ir_rvalue **rvalue); - - /** - * Should SWZ-like expressions be lowered? - */ - bool dont_lower_swz; - - bool progress; -}; - -/** - * Determine if an IR expression tree looks like an extended swizzle - * - * Extended swizzles consist of access of a single vector source (with possible - * per component negation) and the constants -1, 0, or 1. - */ -bool -is_extended_swizzle(ir_expression *ir) -{ - /* Track any variables that are accessed by this expression. - */ - ir_variable *var = NULL; - - assert(ir->operation == ir_quadop_vector); - - for (unsigned i = 0; i < ir->type->vector_elements; i++) { - ir_rvalue *op = ir->operands[i]; - - while (op != NULL) { - switch (op->ir_type) { - case ir_type_constant: { - const ir_constant *const c = op->as_constant(); - - if (!c->is_one() && !c->is_zero() && !c->is_negative_one()) - return false; - - op = NULL; - break; - } - - case ir_type_dereference_variable: { - ir_dereference_variable *const d = (ir_dereference_variable *) op; - - if ((var != NULL) && (var != d->var)) - return false; - - var = d->var; - op = NULL; - break; - } - - case ir_type_expression: { - ir_expression *const ex = (ir_expression *) op; - - if (ex->operation != ir_unop_neg) - return false; - - op = ex->operands[0]; - break; - } - - case ir_type_swizzle: - op = ((ir_swizzle *) op)->val; - break; - - default: - return false; - } - } - } - - return true; -} - -void -lower_vector_visitor::handle_rvalue(ir_rvalue **rvalue) -{ - if (!*rvalue) - return; - - ir_expression *expr = (*rvalue)->as_expression(); - if ((expr == NULL) || (expr->operation != ir_quadop_vector)) - return; - - if (this->dont_lower_swz && is_extended_swizzle(expr)) - return; - - /* FINISHME: Is this the right thing to use for the ralloc context? - */ - void *const mem_ctx = expr; - - assert(expr->type->vector_elements == expr->get_num_operands()); - - /* Generate a temporary with the same type as the ir_quadop_operation. - */ - ir_variable *const temp = - new(mem_ctx) ir_variable(expr->type, "vecop_tmp", ir_var_temporary); - - this->base_ir->insert_before(temp); - - /* Counter of the number of components collected so far. - */ - unsigned assigned; - - /* Write-mask in the destination that receives counted by 'assigned'. - */ - unsigned write_mask; - - - /* Generate upto four assignments to that variable. Try to group component - * assignments together: - * - * - All constant components can be assigned at once. - * - All assigments of components from a single variable with the same - * unary operator can be assigned at once. - */ - ir_constant_data d = { { 0 } }; - - assigned = 0; - write_mask = 0; - for (unsigned i = 0; i < expr->type->vector_elements; i++) { - const ir_constant *const c = expr->operands[i]->as_constant(); - - if (c == NULL) - continue; - - switch (expr->type->base_type) { - case GLSL_TYPE_UINT: d.u[assigned] = c->value.u[0]; break; - case GLSL_TYPE_INT: d.i[assigned] = c->value.i[0]; break; - case GLSL_TYPE_FLOAT: d.f[assigned] = c->value.f[0]; break; - case GLSL_TYPE_BOOL: d.b[assigned] = c->value.b[0]; break; - default: assert(!"Should not get here."); break; - } - - write_mask |= (1U << i); - assigned++; - } - - assert((write_mask == 0) == (assigned == 0)); - - /* If there were constant values, generate an assignment. - */ - if (assigned > 0) { - ir_constant *const c = - new(mem_ctx) ir_constant(glsl_type::get_instance(expr->type->base_type, - assigned, 0), - &d); - ir_dereference *const lhs = new(mem_ctx) ir_dereference_variable(temp); - ir_assignment *const assign = - new(mem_ctx) ir_assignment(lhs, c, NULL, write_mask); - - this->base_ir->insert_before(assign); - } - - /* FINISHME: This should try to coalesce assignments. - */ - for (unsigned i = 0; i < expr->type->vector_elements; i++) { - if (expr->operands[i]->ir_type == ir_type_constant) - continue; - - ir_dereference *const lhs = new(mem_ctx) ir_dereference_variable(temp); - ir_assignment *const assign = - new(mem_ctx) ir_assignment(lhs, expr->operands[i], NULL, (1U << i)); - - this->base_ir->insert_before(assign); - assigned++; - } - - assert(assigned == expr->type->vector_elements); - - *rvalue = new(mem_ctx) ir_dereference_variable(temp); - this->progress = true; -} - -bool -lower_quadop_vector(exec_list *instructions, bool dont_lower_swz) -{ - lower_vector_visitor v; - - v.dont_lower_swz = dont_lower_swz; - visit_list_elements(&v, instructions); - - return v.progress; -} diff --git a/dll/opengl/mesa/src/glsl/main.cpp b/dll/opengl/mesa/src/glsl/main.cpp deleted file mode 100644 index e174224712b..00000000000 --- a/dll/opengl/mesa/src/glsl/main.cpp +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Copyright © 2008, 2009 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ -#include - -#include "ast.h" -#include "glsl_parser_extras.h" -#include "ir_optimization.h" -#include "ir_print_visitor.h" -#include "program.h" -#include "loop_analysis.h" -#include "standalone_scaffolding.h" - -static void -initialize_context(struct gl_context *ctx, gl_api api) -{ - initialize_context_to_defaults(ctx, api); - - /* GLSL 1.30 isn't fully supported, but we need to advertise 1.30 so that - * the built-in functions for 1.30 can be built. - */ - ctx->Const.GLSLVersion = 130; - - ctx->Const.MaxClipPlanes = 8; - ctx->Const.MaxDrawBuffers = 2; - - /* More than the 1.10 minimum to appease parser tests taken from - * apps that (hopefully) already checked the number of coords. - */ - ctx->Const.MaxTextureCoordUnits = 4; - - ctx->Driver.NewShader = _mesa_new_shader; -} - -/* Returned string will have 'ctx' as its ralloc owner. */ -static char * -load_text_file(void *ctx, const char *file_name) -{ - char *text = NULL; - size_t size; - size_t total_read = 0; - FILE *fp = fopen(file_name, "rb"); - - if (!fp) { - return NULL; - } - - fseek(fp, 0L, SEEK_END); - size = ftell(fp); - fseek(fp, 0L, SEEK_SET); - - text = (char *) ralloc_size(ctx, size + 1); - if (text != NULL) { - do { - size_t bytes = fread(text + total_read, - 1, size - total_read, fp); - if (bytes < size - total_read) { - free(text); - text = NULL; - break; - } - - if (bytes == 0) { - break; - } - - total_read += bytes; - } while (total_read < size); - - text[total_read] = '\0'; - } - - fclose(fp); - - return text; -} - -int glsl_es = 0; -int dump_ast = 0; -int dump_hir = 0; -int dump_lir = 0; -int do_link = 0; - -const struct option compiler_opts[] = { - { "glsl-es", 0, &glsl_es, 1 }, - { "dump-ast", 0, &dump_ast, 1 }, - { "dump-hir", 0, &dump_hir, 1 }, - { "dump-lir", 0, &dump_lir, 1 }, - { "link", 0, &do_link, 1 }, - { NULL, 0, NULL, 0 } -}; - -/** - * \brief Print proper usage and exit with failure. - */ -void -usage_fail(const char *name) -{ - - const char *header = - "usage: %s [options] \n" - "\n" - "Possible options are:\n"; - printf(header, name, name); - for (const struct option *o = compiler_opts; o->name != 0; ++o) { - printf(" --%s\n", o->name); - } - exit(EXIT_FAILURE); -} - - -void -compile_shader(struct gl_context *ctx, struct gl_shader *shader) -{ - struct _mesa_glsl_parse_state *state = - new(shader) _mesa_glsl_parse_state(ctx, shader->Type, shader); - - const char *source = shader->Source; - state->error = preprocess(state, &source, &state->info_log, - state->extensions, ctx->API) != 0; - - if (!state->error) { - _mesa_glsl_lexer_ctor(state, source); - _mesa_glsl_parse(state); - _mesa_glsl_lexer_dtor(state); - } - - if (dump_ast) { - foreach_list_const(n, &state->translation_unit) { - ast_node *ast = exec_node_data(ast_node, n, link); - ast->print(); - } - printf("\n\n"); - } - - shader->ir = new(shader) exec_list; - if (!state->error && !state->translation_unit.is_empty()) - _mesa_ast_to_hir(shader->ir, state); - - /* Print out the unoptimized IR. */ - if (!state->error && dump_hir) { - validate_ir_tree(shader->ir); - _mesa_print_ir(shader->ir, state); - } - - /* Optimization passes */ - if (!state->error && !shader->ir->is_empty()) { - bool progress; - do { - progress = do_common_optimization(shader->ir, false, false, 32); - } while (progress); - - validate_ir_tree(shader->ir); - } - - - /* Print out the resulting IR */ - if (!state->error && dump_lir) { - _mesa_print_ir(shader->ir, state); - } - - shader->symbols = state->symbols; - shader->CompileStatus = !state->error; - shader->Version = state->language_version; - memcpy(shader->builtins_to_link, state->builtins_to_link, - sizeof(shader->builtins_to_link[0]) * state->num_builtins_to_link); - shader->num_builtins_to_link = state->num_builtins_to_link; - - if (shader->InfoLog) - ralloc_free(shader->InfoLog); - - shader->InfoLog = state->info_log; - - /* Retain any live IR, but trash the rest. */ - reparent_ir(shader->ir, shader); - - ralloc_free(state); - - return; -} - -int -main(int argc, char **argv) -{ - int status = EXIT_SUCCESS; - struct gl_context local_ctx; - struct gl_context *ctx = &local_ctx; - - int c; - int idx = 0; - while ((c = getopt_long(argc, argv, "", compiler_opts, &idx)) != -1) - /* empty */ ; - - - if (argc <= optind) - usage_fail(argv[0]); - - initialize_context(ctx, (glsl_es) ? API_OPENGLES2 : API_OPENGL); - - struct gl_shader_program *whole_program; - - whole_program = rzalloc (NULL, struct gl_shader_program); - assert(whole_program != NULL); - whole_program->InfoLog = ralloc_strdup(whole_program, ""); - - for (/* empty */; argc > optind; optind++) { - whole_program->Shaders = - reralloc(whole_program, whole_program->Shaders, - struct gl_shader *, whole_program->NumShaders + 1); - assert(whole_program->Shaders != NULL); - - struct gl_shader *shader = rzalloc(whole_program, gl_shader); - - whole_program->Shaders[whole_program->NumShaders] = shader; - whole_program->NumShaders++; - - const unsigned len = strlen(argv[optind]); - if (len < 6) - usage_fail(argv[0]); - - const char *const ext = & argv[optind][len - 5]; - if (strncmp(".vert", ext, 5) == 0) - shader->Type = GL_VERTEX_SHADER; - else if (strncmp(".geom", ext, 5) == 0) - shader->Type = GL_GEOMETRY_SHADER; - else if (strncmp(".frag", ext, 5) == 0) - shader->Type = GL_FRAGMENT_SHADER; - else - usage_fail(argv[0]); - - shader->Source = load_text_file(whole_program, argv[optind]); - if (shader->Source == NULL) { - printf("File \"%s\" does not exist.\n", argv[optind]); - exit(EXIT_FAILURE); - } - - compile_shader(ctx, shader); - - if (!shader->CompileStatus) { - printf("Info log for %s:\n%s\n", argv[optind], shader->InfoLog); - status = EXIT_FAILURE; - break; - } - } - - if ((status == EXIT_SUCCESS) && do_link) { - link_shaders(ctx, whole_program); - status = (whole_program->LinkStatus) ? EXIT_SUCCESS : EXIT_FAILURE; - - if (strlen(whole_program->InfoLog) > 0) - printf("Info log for linking:\n%s\n", whole_program->InfoLog); - } - - for (unsigned i = 0; i < MESA_SHADER_TYPES; i++) - ralloc_free(whole_program->_LinkedShaders[i]); - - ralloc_free(whole_program); - _mesa_glsl_release_types(); - _mesa_glsl_release_functions(); - - return status; -} diff --git a/dll/opengl/mesa/src/glsl/opt_algebraic.cpp b/dll/opengl/mesa/src/glsl/opt_algebraic.cpp deleted file mode 100644 index cade9611dbb..00000000000 --- a/dll/opengl/mesa/src/glsl/opt_algebraic.cpp +++ /dev/null @@ -1,411 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file opt_algebraic.cpp - * - * Takes advantage of association, commutivity, and other algebraic - * properties to simplify expressions. - */ - -#include "ir.h" -#include "ir_visitor.h" -#include "ir_rvalue_visitor.h" -#include "ir_optimization.h" -#include "glsl_types.h" - -/** - * Visitor class for replacing expressions with ir_constant values. - */ - -class ir_algebraic_visitor : public ir_rvalue_visitor { -public: - ir_algebraic_visitor() - { - this->progress = false; - this->mem_ctx = NULL; - } - - virtual ~ir_algebraic_visitor() - { - } - - ir_rvalue *handle_expression(ir_expression *ir); - void handle_rvalue(ir_rvalue **rvalue); - bool reassociate_constant(ir_expression *ir1, - int const_index, - ir_constant *constant, - ir_expression *ir2); - void reassociate_operands(ir_expression *ir1, - int op1, - ir_expression *ir2, - int op2); - ir_rvalue *swizzle_if_required(ir_expression *expr, - ir_rvalue *operand); - - void *mem_ctx; - - bool progress; -}; - -static inline bool -is_vec_zero(ir_constant *ir) -{ - return (ir == NULL) ? false : ir->is_zero(); -} - -static inline bool -is_vec_one(ir_constant *ir) -{ - return (ir == NULL) ? false : ir->is_one(); -} - -static void -update_type(ir_expression *ir) -{ - if (ir->operands[0]->type->is_vector()) - ir->type = ir->operands[0]->type; - else - ir->type = ir->operands[1]->type; -} - -void -ir_algebraic_visitor::reassociate_operands(ir_expression *ir1, - int op1, - ir_expression *ir2, - int op2) -{ - ir_rvalue *temp = ir2->operands[op2]; - ir2->operands[op2] = ir1->operands[op1]; - ir1->operands[op1] = temp; - - /* Update the type of ir2. The type of ir1 won't have changed -- - * base types matched, and at least one of the operands of the 2 - * binops is still a vector if any of them were. - */ - update_type(ir2); - - this->progress = true; -} - -/** - * Reassociates a constant down a tree of adds or multiplies. - * - * Consider (2 * (a * (b * 0.5))). We want to send up with a * b. - */ -bool -ir_algebraic_visitor::reassociate_constant(ir_expression *ir1, int const_index, - ir_constant *constant, - ir_expression *ir2) -{ - if (!ir2 || ir1->operation != ir2->operation) - return false; - - /* Don't want to even think about matrices. */ - if (ir1->operands[0]->type->is_matrix() || - ir1->operands[1]->type->is_matrix() || - ir2->operands[0]->type->is_matrix() || - ir2->operands[1]->type->is_matrix()) - return false; - - ir_constant *ir2_const[2]; - ir2_const[0] = ir2->operands[0]->constant_expression_value(); - ir2_const[1] = ir2->operands[1]->constant_expression_value(); - - if (ir2_const[0] && ir2_const[1]) - return false; - - if (ir2_const[0]) { - reassociate_operands(ir1, const_index, ir2, 1); - return true; - } else if (ir2_const[1]) { - reassociate_operands(ir1, const_index, ir2, 0); - return true; - } - - if (reassociate_constant(ir1, const_index, constant, - ir2->operands[0]->as_expression())) { - update_type(ir2); - return true; - } - - if (reassociate_constant(ir1, const_index, constant, - ir2->operands[1]->as_expression())) { - update_type(ir2); - return true; - } - - return false; -} - -/* When eliminating an expression and just returning one of its operands, - * we may need to swizzle that operand out to a vector if the expression was - * vector type. - */ -ir_rvalue * -ir_algebraic_visitor::swizzle_if_required(ir_expression *expr, - ir_rvalue *operand) -{ - if (expr->type->is_vector() && operand->type->is_scalar()) { - return new(mem_ctx) ir_swizzle(operand, 0, 0, 0, 0, - expr->type->vector_elements); - } else - return operand; -} - -ir_rvalue * -ir_algebraic_visitor::handle_expression(ir_expression *ir) -{ - ir_constant *op_const[2] = {NULL, NULL}; - ir_expression *op_expr[2] = {NULL, NULL}; - ir_expression *temp; - unsigned int i; - - assert(ir->get_num_operands() <= 2); - for (i = 0; i < ir->get_num_operands(); i++) { - if (ir->operands[i]->type->is_matrix()) - return ir; - - op_const[i] = ir->operands[i]->constant_expression_value(); - op_expr[i] = ir->operands[i]->as_expression(); - } - - if (this->mem_ctx == NULL) - this->mem_ctx = ralloc_parent(ir); - - switch (ir->operation) { - case ir_unop_logic_not: { - enum ir_expression_operation new_op = ir_unop_logic_not; - - if (op_expr[0] == NULL) - break; - - switch (op_expr[0]->operation) { - case ir_binop_less: new_op = ir_binop_gequal; break; - case ir_binop_greater: new_op = ir_binop_lequal; break; - case ir_binop_lequal: new_op = ir_binop_greater; break; - case ir_binop_gequal: new_op = ir_binop_less; break; - case ir_binop_equal: new_op = ir_binop_nequal; break; - case ir_binop_nequal: new_op = ir_binop_equal; break; - case ir_binop_all_equal: new_op = ir_binop_any_nequal; break; - case ir_binop_any_nequal: new_op = ir_binop_all_equal; break; - - default: - /* The default case handler is here to silence a warning from GCC. - */ - break; - } - - if (new_op != ir_unop_logic_not) { - this->progress = true; - return new(mem_ctx) ir_expression(new_op, - ir->type, - op_expr[0]->operands[0], - op_expr[0]->operands[1]); - } - - break; - } - - case ir_binop_add: - if (is_vec_zero(op_const[0])) { - this->progress = true; - return swizzle_if_required(ir, ir->operands[1]); - } - if (is_vec_zero(op_const[1])) { - this->progress = true; - return swizzle_if_required(ir, ir->operands[0]); - } - - /* Reassociate addition of constants so that we can do constant - * folding. - */ - if (op_const[0] && !op_const[1]) - reassociate_constant(ir, 0, op_const[0], - ir->operands[1]->as_expression()); - if (op_const[1] && !op_const[0]) - reassociate_constant(ir, 1, op_const[1], - ir->operands[0]->as_expression()); - break; - - case ir_binop_sub: - if (is_vec_zero(op_const[0])) { - this->progress = true; - temp = new(mem_ctx) ir_expression(ir_unop_neg, - ir->operands[1]->type, - ir->operands[1], - NULL); - return swizzle_if_required(ir, temp); - } - if (is_vec_zero(op_const[1])) { - this->progress = true; - return swizzle_if_required(ir, ir->operands[0]); - } - break; - - case ir_binop_mul: - if (is_vec_one(op_const[0])) { - this->progress = true; - return swizzle_if_required(ir, ir->operands[1]); - } - if (is_vec_one(op_const[1])) { - this->progress = true; - return swizzle_if_required(ir, ir->operands[0]); - } - - if (is_vec_zero(op_const[0]) || is_vec_zero(op_const[1])) { - this->progress = true; - return ir_constant::zero(ir, ir->type); - } - - /* Reassociate multiplication of constants so that we can do - * constant folding. - */ - if (op_const[0] && !op_const[1]) - reassociate_constant(ir, 0, op_const[0], - ir->operands[1]->as_expression()); - if (op_const[1] && !op_const[0]) - reassociate_constant(ir, 1, op_const[1], - ir->operands[0]->as_expression()); - - break; - - case ir_binop_div: - if (is_vec_one(op_const[0]) && ir->type->base_type == GLSL_TYPE_FLOAT) { - this->progress = true; - temp = new(mem_ctx) ir_expression(ir_unop_rcp, - ir->operands[1]->type, - ir->operands[1], - NULL); - return swizzle_if_required(ir, temp); - } - if (is_vec_one(op_const[1])) { - this->progress = true; - return swizzle_if_required(ir, ir->operands[0]); - } - break; - - case ir_binop_logic_and: - /* FINISHME: Also simplify (a && a) to (a). */ - if (is_vec_one(op_const[0])) { - this->progress = true; - return ir->operands[1]; - } else if (is_vec_one(op_const[1])) { - this->progress = true; - return ir->operands[0]; - } else if (is_vec_zero(op_const[0]) || is_vec_zero(op_const[1])) { - this->progress = true; - return ir_constant::zero(mem_ctx, ir->type); - } - break; - - case ir_binop_logic_xor: - /* FINISHME: Also simplify (a ^^ a) to (false). */ - if (is_vec_zero(op_const[0])) { - this->progress = true; - return ir->operands[1]; - } else if (is_vec_zero(op_const[1])) { - this->progress = true; - return ir->operands[0]; - } else if (is_vec_one(op_const[0])) { - this->progress = true; - return new(mem_ctx) ir_expression(ir_unop_logic_not, ir->type, - ir->operands[1], NULL); - } else if (is_vec_one(op_const[1])) { - this->progress = true; - return new(mem_ctx) ir_expression(ir_unop_logic_not, ir->type, - ir->operands[0], NULL); - } - break; - - case ir_binop_logic_or: - /* FINISHME: Also simplify (a || a) to (a). */ - if (is_vec_zero(op_const[0])) { - this->progress = true; - return ir->operands[1]; - } else if (is_vec_zero(op_const[1])) { - this->progress = true; - return ir->operands[0]; - } else if (is_vec_one(op_const[0]) || is_vec_one(op_const[1])) { - ir_constant_data data; - - for (unsigned i = 0; i < 16; i++) - data.b[i] = true; - - this->progress = true; - return new(mem_ctx) ir_constant(ir->type, &data); - } - break; - - case ir_unop_rcp: - if (op_expr[0] && op_expr[0]->operation == ir_unop_rcp) { - this->progress = true; - return op_expr[0]->operands[0]; - } - - /* FINISHME: We should do rcp(rsq(x)) -> sqrt(x) for some - * backends, except that some backends will have done sqrt -> - * rcp(rsq(x)) and we don't want to undo it for them. - */ - - /* As far as we know, all backends are OK with rsq. */ - if (op_expr[0] && op_expr[0]->operation == ir_unop_sqrt) { - this->progress = true; - temp = new(mem_ctx) ir_expression(ir_unop_rsq, - op_expr[0]->operands[0]->type, - op_expr[0]->operands[0], - NULL); - return swizzle_if_required(ir, temp); - } - - break; - - default: - break; - } - - return ir; -} - -void -ir_algebraic_visitor::handle_rvalue(ir_rvalue **rvalue) -{ - if (!*rvalue) - return; - - ir_expression *expr = (*rvalue)->as_expression(); - if (!expr || expr->operation == ir_quadop_vector) - return; - - *rvalue = handle_expression(expr); -} - -bool -do_algebraic(exec_list *instructions) -{ - ir_algebraic_visitor v; - - visit_list_elements(&v, instructions); - - return v.progress; -} diff --git a/dll/opengl/mesa/src/glsl/opt_constant_folding.cpp b/dll/opengl/mesa/src/glsl/opt_constant_folding.cpp deleted file mode 100644 index 599b21525de..00000000000 --- a/dll/opengl/mesa/src/glsl/opt_constant_folding.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file opt_constant_folding.cpp - * Replace constant-valued expressions with references to constant values. - */ - -#include "ir.h" -#include "ir_visitor.h" -#include "ir_rvalue_visitor.h" -#include "ir_optimization.h" -#include "glsl_types.h" - -/** - * Visitor class for replacing expressions with ir_constant values. - */ - -class ir_constant_folding_visitor : public ir_rvalue_visitor { -public: - ir_constant_folding_visitor() - { - this->progress = false; - } - - virtual ~ir_constant_folding_visitor() - { - /* empty */ - } - - virtual ir_visitor_status visit_enter(ir_assignment *ir); - virtual ir_visitor_status visit_enter(ir_call *ir); - - virtual void handle_rvalue(ir_rvalue **rvalue); - - bool progress; -}; - -void -ir_constant_folding_visitor::handle_rvalue(ir_rvalue **rvalue) -{ - if (*rvalue == NULL || (*rvalue)->ir_type == ir_type_constant) - return; - - /* Note that we do rvalue visitoring on leaving. So if an - * expression has a non-constant operand, no need to go looking - * down it to find if it's constant. This cuts the time of this - * pass down drastically. - */ - ir_expression *expr = (*rvalue)->as_expression(); - if (expr) { - for (unsigned int i = 0; i < expr->get_num_operands(); i++) { - if (!expr->operands[i]->as_constant()) - return; - } - } - - ir_constant *constant = (*rvalue)->constant_expression_value(); - if (constant) { - *rvalue = constant; - this->progress = true; - } else { - (*rvalue)->accept(this); - } -} - -ir_visitor_status -ir_constant_folding_visitor::visit_enter(ir_assignment *ir) -{ - ir->rhs->accept(this); - handle_rvalue(&ir->rhs); - - if (ir->condition) { - ir->condition->accept(this); - handle_rvalue(&ir->condition); - - ir_constant *const_val = ir->condition->as_constant(); - /* If the condition is constant, either remove the condition or - * remove the never-executed assignment. - */ - if (const_val) { - if (const_val->value.b[0]) - ir->condition = NULL; - else - ir->remove(); - this->progress = true; - } - } - - /* Don't descend into the LHS because we want it to stay as a - * variable dereference. FINISHME: We probably should to get array - * indices though. - */ - return visit_continue_with_parent; -} - -ir_visitor_status -ir_constant_folding_visitor::visit_enter(ir_call *ir) -{ - exec_list_iterator sig_iter = ir->get_callee()->parameters.iterator(); - foreach_iter(exec_list_iterator, iter, *ir) { - ir_rvalue *param_rval = (ir_rvalue *)iter.get(); - ir_variable *sig_param = (ir_variable *)sig_iter.get(); - - if (sig_param->mode == ir_var_in || sig_param->mode == ir_var_const_in) { - ir_rvalue *new_param = param_rval; - - handle_rvalue(&new_param); - if (new_param != param_rval) { - param_rval->replace_with(new_param); - } - } - sig_iter.next(); - } - - return visit_continue_with_parent; -} - -bool -do_constant_folding(exec_list *instructions) -{ - ir_constant_folding_visitor constant_folding; - - visit_list_elements(&constant_folding, instructions); - - return constant_folding.progress; -} diff --git a/dll/opengl/mesa/src/glsl/opt_constant_propagation.cpp b/dll/opengl/mesa/src/glsl/opt_constant_propagation.cpp deleted file mode 100644 index af77e490689..00000000000 --- a/dll/opengl/mesa/src/glsl/opt_constant_propagation.cpp +++ /dev/null @@ -1,445 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * constant of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, constant, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above constantright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR CONSTANTRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file opt_constant_propagation.cpp - * - * Tracks assignments of constants to channels of variables, and - * usage of those constant channels with direct usage of the constants. - * - * This can lead to constant folding and algebraic optimizations in - * those later expressions, while causing no increase in instruction - * count (due to constants being generally free to load from a - * constant push buffer or as instruction immediate values) and - * possibly reducing register pressure. - */ - -#include "ir.h" -#include "ir_visitor.h" -#include "ir_rvalue_visitor.h" -#include "ir_basic_block.h" -#include "ir_optimization.h" -#include "glsl_types.h" - -class acp_entry : public exec_node -{ -public: - acp_entry(ir_variable *var, unsigned write_mask, ir_constant *constant) - { - assert(var); - assert(constant); - this->var = var; - this->write_mask = write_mask; - this->constant = constant; - this->initial_values = write_mask; - } - - acp_entry(const acp_entry *src) - { - this->var = src->var; - this->write_mask = src->write_mask; - this->constant = src->constant; - this->initial_values = src->initial_values; - } - - ir_variable *var; - ir_constant *constant; - unsigned write_mask; - - /** Mask of values initially available in the constant. */ - unsigned initial_values; -}; - - -class kill_entry : public exec_node -{ -public: - kill_entry(ir_variable *var, unsigned write_mask) - { - assert(var); - this->var = var; - this->write_mask = write_mask; - } - - ir_variable *var; - unsigned write_mask; -}; - -class ir_constant_propagation_visitor : public ir_rvalue_visitor { -public: - ir_constant_propagation_visitor() - { - progress = false; - mem_ctx = ralloc_context(0); - this->acp = new(mem_ctx) exec_list; - this->kills = new(mem_ctx) exec_list; - } - ~ir_constant_propagation_visitor() - { - ralloc_free(mem_ctx); - } - - virtual ir_visitor_status visit_enter(class ir_loop *); - virtual ir_visitor_status visit_enter(class ir_function_signature *); - virtual ir_visitor_status visit_enter(class ir_function *); - virtual ir_visitor_status visit_leave(class ir_assignment *); - virtual ir_visitor_status visit_enter(class ir_call *); - virtual ir_visitor_status visit_enter(class ir_if *); - - void add_constant(ir_assignment *ir); - void kill(ir_variable *ir, unsigned write_mask); - void handle_if_block(exec_list *instructions); - void handle_rvalue(ir_rvalue **rvalue); - - /** List of acp_entry: The available constants to propagate */ - exec_list *acp; - - /** - * List of kill_entry: The masks of variables whose values were - * killed in this block. - */ - exec_list *kills; - - bool progress; - - bool killed_all; - - void *mem_ctx; -}; - - -void -ir_constant_propagation_visitor::handle_rvalue(ir_rvalue **rvalue) -{ - if (this->in_assignee || !*rvalue) - return; - - const glsl_type *type = (*rvalue)->type; - if (!type->is_scalar() && !type->is_vector()) - return; - - ir_swizzle *swiz = NULL; - ir_dereference_variable *deref = (*rvalue)->as_dereference_variable(); - if (!deref) { - swiz = (*rvalue)->as_swizzle(); - if (!swiz) - return; - - deref = swiz->val->as_dereference_variable(); - if (!deref) - return; - } - - ir_constant_data data; - memset(&data, 0, sizeof(data)); - - for (unsigned int i = 0; i < type->components(); i++) { - int channel; - acp_entry *found = NULL; - - if (swiz) { - switch (i) { - case 0: channel = swiz->mask.x; break; - case 1: channel = swiz->mask.y; break; - case 2: channel = swiz->mask.z; break; - case 3: channel = swiz->mask.w; break; - default: assert(!"shouldn't be reached"); channel = 0; break; - } - } else { - channel = i; - } - - foreach_iter(exec_list_iterator, iter, *this->acp) { - acp_entry *entry = (acp_entry *)iter.get(); - if (entry->var == deref->var && entry->write_mask & (1 << channel)) { - found = entry; - break; - } - } - - if (!found) - return; - - int rhs_channel = 0; - for (int j = 0; j < 4; j++) { - if (j == channel) - break; - if (found->initial_values & (1 << j)) - rhs_channel++; - } - - switch (type->base_type) { - case GLSL_TYPE_FLOAT: - data.f[i] = found->constant->value.f[rhs_channel]; - break; - case GLSL_TYPE_INT: - data.i[i] = found->constant->value.i[rhs_channel]; - break; - case GLSL_TYPE_UINT: - data.u[i] = found->constant->value.u[rhs_channel]; - break; - case GLSL_TYPE_BOOL: - data.b[i] = found->constant->value.b[rhs_channel]; - break; - default: - assert(!"not reached"); - break; - } - } - - *rvalue = new(ralloc_parent(deref)) ir_constant(type, &data); - this->progress = true; -} - -ir_visitor_status -ir_constant_propagation_visitor::visit_enter(ir_function_signature *ir) -{ - /* Treat entry into a function signature as a completely separate - * block. Any instructions at global scope will be shuffled into - * main() at link time, so they're irrelevant to us. - */ - exec_list *orig_acp = this->acp; - exec_list *orig_kills = this->kills; - bool orig_killed_all = this->killed_all; - - this->acp = new(mem_ctx) exec_list; - this->kills = new(mem_ctx) exec_list; - this->killed_all = false; - - visit_list_elements(this, &ir->body); - - this->kills = orig_kills; - this->acp = orig_acp; - this->killed_all = orig_killed_all; - - return visit_continue_with_parent; -} - -ir_visitor_status -ir_constant_propagation_visitor::visit_leave(ir_assignment *ir) -{ - if (this->in_assignee) - return visit_continue; - - kill(ir->lhs->variable_referenced(), ir->write_mask); - - add_constant(ir); - - return visit_continue; -} - -ir_visitor_status -ir_constant_propagation_visitor::visit_enter(ir_function *ir) -{ - (void) ir; - return visit_continue; -} - -ir_visitor_status -ir_constant_propagation_visitor::visit_enter(ir_call *ir) -{ - /* Do constant propagation on call parameters, but skip any out params */ - exec_list_iterator sig_param_iter = ir->get_callee()->parameters.iterator(); - foreach_iter(exec_list_iterator, iter, ir->actual_parameters) { - ir_variable *sig_param = (ir_variable *)sig_param_iter.get(); - ir_rvalue *param = (ir_rvalue *)iter.get(); - if (sig_param->mode != ir_var_out && sig_param->mode != ir_var_inout) { - ir_rvalue *new_param = param; - handle_rvalue(&new_param); - if (new_param != param) - param->replace_with(new_param); - else - param->accept(this); - } - sig_param_iter.next(); - } - - /* Since we're unlinked, we don't (necssarily) know the side effects of - * this call. So kill all copies. - */ - acp->make_empty(); - this->killed_all = true; - - return visit_continue_with_parent; -} - -void -ir_constant_propagation_visitor::handle_if_block(exec_list *instructions) -{ - exec_list *orig_acp = this->acp; - exec_list *orig_kills = this->kills; - bool orig_killed_all = this->killed_all; - - this->acp = new(mem_ctx) exec_list; - this->kills = new(mem_ctx) exec_list; - this->killed_all = false; - - /* Populate the initial acp with a constant of the original */ - foreach_iter(exec_list_iterator, iter, *orig_acp) { - acp_entry *a = (acp_entry *)iter.get(); - this->acp->push_tail(new(this->mem_ctx) acp_entry(a)); - } - - visit_list_elements(this, instructions); - - if (this->killed_all) { - orig_acp->make_empty(); - } - - exec_list *new_kills = this->kills; - this->kills = orig_kills; - this->acp = orig_acp; - this->killed_all = this->killed_all || orig_killed_all; - - foreach_iter(exec_list_iterator, iter, *new_kills) { - kill_entry *k = (kill_entry *)iter.get(); - kill(k->var, k->write_mask); - } -} - -ir_visitor_status -ir_constant_propagation_visitor::visit_enter(ir_if *ir) -{ - ir->condition->accept(this); - handle_rvalue(&ir->condition); - - handle_if_block(&ir->then_instructions); - handle_if_block(&ir->else_instructions); - - /* handle_if_block() already descended into the children. */ - return visit_continue_with_parent; -} - -ir_visitor_status -ir_constant_propagation_visitor::visit_enter(ir_loop *ir) -{ - exec_list *orig_acp = this->acp; - exec_list *orig_kills = this->kills; - bool orig_killed_all = this->killed_all; - - /* FINISHME: For now, the initial acp for loops is totally empty. - * We could go through once, then go through again with the acp - * cloned minus the killed entries after the first run through. - */ - this->acp = new(mem_ctx) exec_list; - this->kills = new(mem_ctx) exec_list; - this->killed_all = false; - - visit_list_elements(this, &ir->body_instructions); - - if (this->killed_all) { - orig_acp->make_empty(); - } - - exec_list *new_kills = this->kills; - this->kills = orig_kills; - this->acp = orig_acp; - this->killed_all = this->killed_all || orig_killed_all; - - foreach_iter(exec_list_iterator, iter, *new_kills) { - kill_entry *k = (kill_entry *)iter.get(); - kill(k->var, k->write_mask); - } - - /* already descended into the children. */ - return visit_continue_with_parent; -} - -void -ir_constant_propagation_visitor::kill(ir_variable *var, unsigned write_mask) -{ - assert(var != NULL); - - /* We don't track non-vectors. */ - if (!var->type->is_vector() && !var->type->is_scalar()) - return; - - /* Remove any entries currently in the ACP for this kill. */ - foreach_iter(exec_list_iterator, iter, *this->acp) { - acp_entry *entry = (acp_entry *)iter.get(); - - if (entry->var == var) { - entry->write_mask &= ~write_mask; - if (entry->write_mask == 0) - entry->remove(); - } - } - - /* Add this writemask of the variable to the list of killed - * variables in this block. - */ - foreach_iter(exec_list_iterator, iter, *this->kills) { - kill_entry *entry = (kill_entry *)iter.get(); - - if (entry->var == var) { - entry->write_mask |= write_mask; - return; - } - } - /* Not already in the list. Make new entry. */ - this->kills->push_tail(new(this->mem_ctx) kill_entry(var, write_mask)); -} - -/** - * Adds an entry to the available constant list if it's a plain assignment - * of a variable to a variable. - */ -void -ir_constant_propagation_visitor::add_constant(ir_assignment *ir) -{ - acp_entry *entry; - - if (ir->condition) - return; - - if (!ir->write_mask) - return; - - ir_dereference_variable *deref = ir->lhs->as_dereference_variable(); - ir_constant *constant = ir->rhs->as_constant(); - - if (!deref || !constant) - return; - - /* Only do constant propagation on vectors. Constant matrices, - * arrays, or structures would require more work elsewhere. - */ - if (!deref->var->type->is_vector() && !deref->var->type->is_scalar()) - return; - - entry = new(this->mem_ctx) acp_entry(deref->var, ir->write_mask, constant); - this->acp->push_tail(entry); -} - -/** - * Does a constant propagation pass on the code present in the instruction stream. - */ -bool -do_constant_propagation(exec_list *instructions) -{ - ir_constant_propagation_visitor v; - - visit_list_elements(&v, instructions); - - return v.progress; -} diff --git a/dll/opengl/mesa/src/glsl/opt_constant_variable.cpp b/dll/opengl/mesa/src/glsl/opt_constant_variable.cpp deleted file mode 100644 index 3fa7c3badc8..00000000000 --- a/dll/opengl/mesa/src/glsl/opt_constant_variable.cpp +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file opt_constant_variable.cpp - * - * Marks variables assigned a single constant value over the course - * of the program as constant. - * - * The goal here is to trigger further constant folding and then dead - * code elimination. This is common with vector/matrix constructors - * and calls to builtin functions. - */ - -#include "ir.h" -#include "ir_visitor.h" -#include "ir_optimization.h" -#include "glsl_types.h" - -struct assignment_entry { - exec_node link; - int assignment_count; - ir_variable *var; - ir_constant *constval; - bool our_scope; -}; - -class ir_constant_variable_visitor : public ir_hierarchical_visitor { -public: - virtual ir_visitor_status visit_enter(ir_dereference_variable *); - virtual ir_visitor_status visit(ir_variable *); - virtual ir_visitor_status visit_enter(ir_assignment *); - virtual ir_visitor_status visit_enter(ir_call *); - - exec_list list; -}; - -static struct assignment_entry * -get_assignment_entry(ir_variable *var, exec_list *list) -{ - struct assignment_entry *entry; - - foreach_list_typed(struct assignment_entry, entry, link, list) { - if (entry->var == var) - return entry; - } - - entry = (struct assignment_entry *)calloc(1, sizeof(*entry)); - entry->var = var; - list->push_head(&entry->link); - return entry; -} - -ir_visitor_status -ir_constant_variable_visitor::visit(ir_variable *ir) -{ - struct assignment_entry *entry = get_assignment_entry(ir, &this->list); - entry->our_scope = true; - return visit_continue; -} - -/* Skip derefs of variables so that we can detect declarations. */ -ir_visitor_status -ir_constant_variable_visitor::visit_enter(ir_dereference_variable *ir) -{ - (void)ir; - return visit_continue_with_parent; -} - -ir_visitor_status -ir_constant_variable_visitor::visit_enter(ir_assignment *ir) -{ - ir_constant *constval; - struct assignment_entry *entry; - - entry = get_assignment_entry(ir->lhs->variable_referenced(), &this->list); - assert(entry); - entry->assignment_count++; - - /* If it's already constant, don't do the work. */ - if (entry->var->constant_value) - return visit_continue; - - /* OK, now find if we actually have all the right conditions for - * this to be a constant value assigned to the var. - */ - if (ir->condition) - return visit_continue; - - ir_variable *var = ir->whole_variable_written(); - if (!var) - return visit_continue; - - constval = ir->rhs->constant_expression_value(); - if (!constval) - return visit_continue; - - /* Mark this entry as having a constant assignment (if the - * assignment count doesn't go >1). do_constant_variable will fix - * up the variable with the constant value later. - */ - entry->constval = constval; - - return visit_continue; -} - -ir_visitor_status -ir_constant_variable_visitor::visit_enter(ir_call *ir) -{ - exec_list_iterator sig_iter = ir->get_callee()->parameters.iterator(); - foreach_iter(exec_list_iterator, iter, *ir) { - ir_rvalue *param_rval = (ir_rvalue *)iter.get(); - ir_variable *param = (ir_variable *)sig_iter.get(); - - if (param->mode == ir_var_out || - param->mode == ir_var_inout) { - ir_variable *var = param_rval->variable_referenced(); - struct assignment_entry *entry; - - assert(var); - entry = get_assignment_entry(var, &this->list); - entry->assignment_count++; - } - sig_iter.next(); - } - return visit_continue; -} - -/** - * Does a copy propagation pass on the code present in the instruction stream. - */ -bool -do_constant_variable(exec_list *instructions) -{ - bool progress = false; - ir_constant_variable_visitor v; - - v.run(instructions); - - while (!v.list.is_empty()) { - - struct assignment_entry *entry; - entry = exec_node_data(struct assignment_entry, v.list.head, link); - - if (entry->assignment_count == 1 && entry->constval && entry->our_scope) { - entry->var->constant_value = entry->constval; - progress = true; - } - entry->link.remove(); - free(entry); - } - - return progress; -} - -bool -do_constant_variable_unlinked(exec_list *instructions) -{ - bool progress = false; - - foreach_iter(exec_list_iterator, iter, *instructions) { - ir_instruction *ir = (ir_instruction *)iter.get(); - ir_function *f = ir->as_function(); - if (f) { - foreach_iter(exec_list_iterator, sigiter, *f) { - ir_function_signature *sig = - (ir_function_signature *) sigiter.get(); - if (do_constant_variable(&sig->body)) - progress = true; - } - } - } - - return progress; -} diff --git a/dll/opengl/mesa/src/glsl/opt_copy_propagation.cpp b/dll/opengl/mesa/src/glsl/opt_copy_propagation.cpp deleted file mode 100644 index efa3afda35a..00000000000 --- a/dll/opengl/mesa/src/glsl/opt_copy_propagation.cpp +++ /dev/null @@ -1,345 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file opt_copy_propagation.cpp - * - * Moves usage of recently-copied variables to the previous copy of - * the variable. - * - * This should reduce the number of MOV instructions in the generated - * programs unless copy propagation is also done on the LIR, and may - * help anyway by triggering other optimizations that live in the HIR. - */ - -#include "ir.h" -#include "ir_visitor.h" -#include "ir_basic_block.h" -#include "ir_optimization.h" -#include "glsl_types.h" - -class acp_entry : public exec_node -{ -public: - acp_entry(ir_variable *lhs, ir_variable *rhs) - { - assert(lhs); - assert(rhs); - this->lhs = lhs; - this->rhs = rhs; - } - - ir_variable *lhs; - ir_variable *rhs; -}; - - -class kill_entry : public exec_node -{ -public: - kill_entry(ir_variable *var) - { - assert(var); - this->var = var; - } - - ir_variable *var; -}; - -class ir_copy_propagation_visitor : public ir_hierarchical_visitor { -public: - ir_copy_propagation_visitor() - { - progress = false; - mem_ctx = ralloc_context(0); - this->acp = new(mem_ctx) exec_list; - this->kills = new(mem_ctx) exec_list; - } - ~ir_copy_propagation_visitor() - { - ralloc_free(mem_ctx); - } - - virtual ir_visitor_status visit(class ir_dereference_variable *); - virtual ir_visitor_status visit_enter(class ir_loop *); - virtual ir_visitor_status visit_enter(class ir_function_signature *); - virtual ir_visitor_status visit_enter(class ir_function *); - virtual ir_visitor_status visit_leave(class ir_assignment *); - virtual ir_visitor_status visit_enter(class ir_call *); - virtual ir_visitor_status visit_enter(class ir_if *); - - void add_copy(ir_assignment *ir); - void kill(ir_variable *ir); - void handle_if_block(exec_list *instructions); - - /** List of acp_entry: The available copies to propagate */ - exec_list *acp; - /** - * List of kill_entry: The variables whose values were killed in this - * block. - */ - exec_list *kills; - - bool progress; - - bool killed_all; - - void *mem_ctx; -}; - -ir_visitor_status -ir_copy_propagation_visitor::visit_enter(ir_function_signature *ir) -{ - /* Treat entry into a function signature as a completely separate - * block. Any instructions at global scope will be shuffled into - * main() at link time, so they're irrelevant to us. - */ - exec_list *orig_acp = this->acp; - exec_list *orig_kills = this->kills; - bool orig_killed_all = this->killed_all; - - this->acp = new(mem_ctx) exec_list; - this->kills = new(mem_ctx) exec_list; - this->killed_all = false; - - visit_list_elements(this, &ir->body); - - this->kills = orig_kills; - this->acp = orig_acp; - this->killed_all = orig_killed_all; - - return visit_continue_with_parent; -} - -ir_visitor_status -ir_copy_propagation_visitor::visit_leave(ir_assignment *ir) -{ - kill(ir->lhs->variable_referenced()); - - add_copy(ir); - - return visit_continue; -} - -ir_visitor_status -ir_copy_propagation_visitor::visit_enter(ir_function *ir) -{ - (void) ir; - return visit_continue; -} - -/** - * Replaces dereferences of ACP RHS variables with ACP LHS variables. - * - * This is where the actual copy propagation occurs. Note that the - * rewriting of ir_dereference means that the ir_dereference instance - * must not be shared by multiple IR operations! - */ -ir_visitor_status -ir_copy_propagation_visitor::visit(ir_dereference_variable *ir) -{ - if (this->in_assignee) - return visit_continue; - - ir_variable *var = ir->var; - - foreach_iter(exec_list_iterator, iter, *this->acp) { - acp_entry *entry = (acp_entry *)iter.get(); - - if (var == entry->lhs) { - ir->var = entry->rhs; - this->progress = true; - break; - } - } - - return visit_continue; -} - - -ir_visitor_status -ir_copy_propagation_visitor::visit_enter(ir_call *ir) -{ - /* Do copy propagation on call parameters, but skip any out params */ - exec_list_iterator sig_param_iter = ir->get_callee()->parameters.iterator(); - foreach_iter(exec_list_iterator, iter, ir->actual_parameters) { - ir_variable *sig_param = (ir_variable *)sig_param_iter.get(); - ir_instruction *ir = (ir_instruction *)iter.get(); - if (sig_param->mode != ir_var_out && sig_param->mode != ir_var_inout) { - ir->accept(this); - } - sig_param_iter.next(); - } - - /* Since we're unlinked, we don't (necessarily) know the side effects of - * this call. So kill all copies. - */ - acp->make_empty(); - this->killed_all = true; - - return visit_continue_with_parent; -} - -void -ir_copy_propagation_visitor::handle_if_block(exec_list *instructions) -{ - exec_list *orig_acp = this->acp; - exec_list *orig_kills = this->kills; - bool orig_killed_all = this->killed_all; - - this->acp = new(mem_ctx) exec_list; - this->kills = new(mem_ctx) exec_list; - this->killed_all = false; - - /* Populate the initial acp with a copy of the original */ - foreach_iter(exec_list_iterator, iter, *orig_acp) { - acp_entry *a = (acp_entry *)iter.get(); - this->acp->push_tail(new(this->mem_ctx) acp_entry(a->lhs, a->rhs)); - } - - visit_list_elements(this, instructions); - - if (this->killed_all) { - orig_acp->make_empty(); - } - - exec_list *new_kills = this->kills; - this->kills = orig_kills; - this->acp = orig_acp; - this->killed_all = this->killed_all || orig_killed_all; - - foreach_iter(exec_list_iterator, iter, *new_kills) { - kill_entry *k = (kill_entry *)iter.get(); - kill(k->var); - } -} - -ir_visitor_status -ir_copy_propagation_visitor::visit_enter(ir_if *ir) -{ - ir->condition->accept(this); - - handle_if_block(&ir->then_instructions); - handle_if_block(&ir->else_instructions); - - /* handle_if_block() already descended into the children. */ - return visit_continue_with_parent; -} - -ir_visitor_status -ir_copy_propagation_visitor::visit_enter(ir_loop *ir) -{ - exec_list *orig_acp = this->acp; - exec_list *orig_kills = this->kills; - bool orig_killed_all = this->killed_all; - - /* FINISHME: For now, the initial acp for loops is totally empty. - * We could go through once, then go through again with the acp - * cloned minus the killed entries after the first run through. - */ - this->acp = new(mem_ctx) exec_list; - this->kills = new(mem_ctx) exec_list; - this->killed_all = false; - - visit_list_elements(this, &ir->body_instructions); - - if (this->killed_all) { - orig_acp->make_empty(); - } - - exec_list *new_kills = this->kills; - this->kills = orig_kills; - this->acp = orig_acp; - this->killed_all = this->killed_all || orig_killed_all; - - foreach_iter(exec_list_iterator, iter, *new_kills) { - kill_entry *k = (kill_entry *)iter.get(); - kill(k->var); - } - - /* already descended into the children. */ - return visit_continue_with_parent; -} - -void -ir_copy_propagation_visitor::kill(ir_variable *var) -{ - assert(var != NULL); - - /* Remove any entries currently in the ACP for this kill. */ - foreach_iter(exec_list_iterator, iter, *acp) { - acp_entry *entry = (acp_entry *)iter.get(); - - if (entry->lhs == var || entry->rhs == var) { - entry->remove(); - } - } - - /* Add the LHS variable to the list of killed variables in this block. - */ - this->kills->push_tail(new(this->mem_ctx) kill_entry(var)); -} - -/** - * Adds an entry to the available copy list if it's a plain assignment - * of a variable to a variable. - */ -void -ir_copy_propagation_visitor::add_copy(ir_assignment *ir) -{ - acp_entry *entry; - - if (ir->condition) - return; - - ir_variable *lhs_var = ir->whole_variable_written(); - ir_variable *rhs_var = ir->rhs->whole_variable_referenced(); - - if ((lhs_var != NULL) && (rhs_var != NULL)) { - if (lhs_var == rhs_var) { - /* This is a dumb assignment, but we've conveniently noticed - * it here. Removing it now would mess up the loop iteration - * calling us. Just flag it to not execute, and someone else - * will clean up the mess. - */ - ir->condition = new(ralloc_parent(ir)) ir_constant(false); - this->progress = true; - } else { - entry = new(this->mem_ctx) acp_entry(lhs_var, rhs_var); - this->acp->push_tail(entry); - } - } -} - -/** - * Does a copy propagation pass on the code present in the instruction stream. - */ -bool -do_copy_propagation(exec_list *instructions) -{ - ir_copy_propagation_visitor v; - - visit_list_elements(&v, instructions); - - return v.progress; -} diff --git a/dll/opengl/mesa/src/glsl/opt_copy_propagation_elements.cpp b/dll/opengl/mesa/src/glsl/opt_copy_propagation_elements.cpp deleted file mode 100644 index ebfd4fd3fe1..00000000000 --- a/dll/opengl/mesa/src/glsl/opt_copy_propagation_elements.cpp +++ /dev/null @@ -1,490 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file opt_copy_propagation_elements.cpp - * - * Replaces usage of recently-copied components of variables with the - * previous copy of the variable. - * - * This pass can be compared with opt_copy_propagation, which operands - * on arbitrary whole-variable copies. However, in order to handle - * the copy propagation of swizzled variables or writemasked writes, - * we want to track things on a channel-wise basis. I found that - * trying to mix the swizzled/writemasked support here with the - * whole-variable stuff in opt_copy_propagation.cpp just made a mess, - * so this is separate despite the ACP handling being somewhat - * similar. - * - * This should reduce the number of MOV instructions in the generated - * programs unless copy propagation is also done on the LIR, and may - * help anyway by triggering other optimizations that live in the HIR. - */ - -#include "ir.h" -#include "ir_rvalue_visitor.h" -#include "ir_basic_block.h" -#include "ir_optimization.h" -#include "glsl_types.h" - -static bool debug = false; - -class acp_entry : public exec_node -{ -public: - acp_entry(ir_variable *lhs, ir_variable *rhs, int write_mask, int swizzle[4]) - { - this->lhs = lhs; - this->rhs = rhs; - this->write_mask = write_mask; - memcpy(this->swizzle, swizzle, sizeof(this->swizzle)); - } - - acp_entry(acp_entry *a) - { - this->lhs = a->lhs; - this->rhs = a->rhs; - this->write_mask = a->write_mask; - memcpy(this->swizzle, a->swizzle, sizeof(this->swizzle)); - } - - ir_variable *lhs; - ir_variable *rhs; - unsigned int write_mask; - int swizzle[4]; -}; - - -class kill_entry : public exec_node -{ -public: - kill_entry(ir_variable *var, int write_mask) - { - this->var = var; - this->write_mask = write_mask; - } - - ir_variable *var; - unsigned int write_mask; -}; - -class ir_copy_propagation_elements_visitor : public ir_rvalue_visitor { -public: - ir_copy_propagation_elements_visitor() - { - this->progress = false; - this->mem_ctx = ralloc_context(NULL); - this->shader_mem_ctx = NULL; - this->acp = new(mem_ctx) exec_list; - this->kills = new(mem_ctx) exec_list; - } - ~ir_copy_propagation_elements_visitor() - { - ralloc_free(mem_ctx); - } - - virtual ir_visitor_status visit_enter(class ir_loop *); - virtual ir_visitor_status visit_enter(class ir_function_signature *); - virtual ir_visitor_status visit_leave(class ir_assignment *); - virtual ir_visitor_status visit_enter(class ir_call *); - virtual ir_visitor_status visit_enter(class ir_if *); - virtual ir_visitor_status visit_leave(class ir_swizzle *); - - void handle_rvalue(ir_rvalue **rvalue); - - void add_copy(ir_assignment *ir); - void kill(kill_entry *k); - void handle_if_block(exec_list *instructions); - - /** List of acp_entry: The available copies to propagate */ - exec_list *acp; - /** - * List of kill_entry: The variables whose values were killed in this - * block. - */ - exec_list *kills; - - bool progress; - - bool killed_all; - - /* Context for our local data structures. */ - void *mem_ctx; - /* Context for allocating new shader nodes. */ - void *shader_mem_ctx; -}; - -ir_visitor_status -ir_copy_propagation_elements_visitor::visit_enter(ir_function_signature *ir) -{ - /* Treat entry into a function signature as a completely separate - * block. Any instructions at global scope will be shuffled into - * main() at link time, so they're irrelevant to us. - */ - exec_list *orig_acp = this->acp; - exec_list *orig_kills = this->kills; - bool orig_killed_all = this->killed_all; - - this->acp = new(mem_ctx) exec_list; - this->kills = new(mem_ctx) exec_list; - this->killed_all = false; - - visit_list_elements(this, &ir->body); - - this->kills = orig_kills; - this->acp = orig_acp; - this->killed_all = orig_killed_all; - - return visit_continue_with_parent; -} - -ir_visitor_status -ir_copy_propagation_elements_visitor::visit_leave(ir_assignment *ir) -{ - ir_dereference_variable *lhs = ir->lhs->as_dereference_variable(); - ir_variable *var = ir->lhs->variable_referenced(); - - if (var->type->is_scalar() || var->type->is_vector()) { - kill_entry *k; - - if (lhs) - k = new(mem_ctx) kill_entry(var, ir->write_mask); - else - k = new(mem_ctx) kill_entry(var, ~0); - - kill(k); - } - - add_copy(ir); - - return visit_continue; -} - -ir_visitor_status -ir_copy_propagation_elements_visitor::visit_leave(ir_swizzle *ir) -{ - /* Don't visit the values of swizzles since they are handled while - * visiting the swizzle itself. - */ - return visit_continue; -} - -/** - * Replaces dereferences of ACP RHS variables with ACP LHS variables. - * - * This is where the actual copy propagation occurs. Note that the - * rewriting of ir_dereference means that the ir_dereference instance - * must not be shared by multiple IR operations! - */ -void -ir_copy_propagation_elements_visitor::handle_rvalue(ir_rvalue **ir) -{ - int swizzle_chan[4]; - ir_dereference_variable *deref_var; - ir_variable *source[4] = {NULL, NULL, NULL, NULL}; - int source_chan[4]; - int chans; - - if (!*ir) - return; - - ir_swizzle *swizzle = (*ir)->as_swizzle(); - if (swizzle) { - deref_var = swizzle->val->as_dereference_variable(); - if (!deref_var) - return; - - swizzle_chan[0] = swizzle->mask.x; - swizzle_chan[1] = swizzle->mask.y; - swizzle_chan[2] = swizzle->mask.z; - swizzle_chan[3] = swizzle->mask.w; - chans = swizzle->type->vector_elements; - } else { - deref_var = (*ir)->as_dereference_variable(); - if (!deref_var) - return; - - swizzle_chan[0] = 0; - swizzle_chan[1] = 1; - swizzle_chan[2] = 2; - swizzle_chan[3] = 3; - chans = deref_var->type->vector_elements; - } - - if (this->in_assignee) - return; - - ir_variable *var = deref_var->var; - - /* Try to find ACP entries covering swizzle_chan[], hoping they're - * the same source variable. - */ - foreach_iter(exec_list_iterator, iter, *this->acp) { - acp_entry *entry = (acp_entry *)iter.get(); - - if (var == entry->lhs) { - for (int c = 0; c < chans; c++) { - if (entry->write_mask & (1 << swizzle_chan[c])) { - source[c] = entry->rhs; - source_chan[c] = entry->swizzle[swizzle_chan[c]]; - } - } - } - } - - /* Make sure all channels are copying from the same source variable. */ - if (!source[0]) - return; - for (int c = 1; c < chans; c++) { - if (source[c] != source[0]) - return; - } - - if (!shader_mem_ctx) - shader_mem_ctx = ralloc_parent(deref_var); - - if (debug) { - printf("Copy propagation from:\n"); - (*ir)->print(); - } - - deref_var = new(shader_mem_ctx) ir_dereference_variable(source[0]); - *ir = new(shader_mem_ctx) ir_swizzle(deref_var, - source_chan[0], - source_chan[1], - source_chan[2], - source_chan[3], - chans); - - if (debug) { - printf("to:\n"); - (*ir)->print(); - printf("\n"); - } -} - - -ir_visitor_status -ir_copy_propagation_elements_visitor::visit_enter(ir_call *ir) -{ - /* Do copy propagation on call parameters, but skip any out params */ - exec_list_iterator sig_param_iter = ir->get_callee()->parameters.iterator(); - foreach_iter(exec_list_iterator, iter, ir->actual_parameters) { - ir_variable *sig_param = (ir_variable *)sig_param_iter.get(); - ir_instruction *ir = (ir_instruction *)iter.get(); - if (sig_param->mode != ir_var_out && sig_param->mode != ir_var_inout) { - ir->accept(this); - } - sig_param_iter.next(); - } - - /* Since we're unlinked, we don't (necessarily) know the side effects of - * this call. So kill all copies. - */ - acp->make_empty(); - this->killed_all = true; - - return visit_continue_with_parent; -} - -void -ir_copy_propagation_elements_visitor::handle_if_block(exec_list *instructions) -{ - exec_list *orig_acp = this->acp; - exec_list *orig_kills = this->kills; - bool orig_killed_all = this->killed_all; - - this->acp = new(mem_ctx) exec_list; - this->kills = new(mem_ctx) exec_list; - this->killed_all = false; - - /* Populate the initial acp with a copy of the original */ - foreach_iter(exec_list_iterator, iter, *orig_acp) { - acp_entry *a = (acp_entry *)iter.get(); - this->acp->push_tail(new(this->mem_ctx) acp_entry(a)); - } - - visit_list_elements(this, instructions); - - if (this->killed_all) { - orig_acp->make_empty(); - } - - exec_list *new_kills = this->kills; - this->kills = orig_kills; - this->acp = orig_acp; - this->killed_all = this->killed_all || orig_killed_all; - - /* Move the new kills into the parent block's list, removing them - * from the parent's ACP list in the process. - */ - foreach_list_safe(node, new_kills) { - kill_entry *k = (kill_entry *)node; - kill(k); - } -} - -ir_visitor_status -ir_copy_propagation_elements_visitor::visit_enter(ir_if *ir) -{ - ir->condition->accept(this); - - handle_if_block(&ir->then_instructions); - handle_if_block(&ir->else_instructions); - - /* handle_if_block() already descended into the children. */ - return visit_continue_with_parent; -} - -ir_visitor_status -ir_copy_propagation_elements_visitor::visit_enter(ir_loop *ir) -{ - exec_list *orig_acp = this->acp; - exec_list *orig_kills = this->kills; - bool orig_killed_all = this->killed_all; - - /* FINISHME: For now, the initial acp for loops is totally empty. - * We could go through once, then go through again with the acp - * cloned minus the killed entries after the first run through. - */ - this->acp = new(mem_ctx) exec_list; - this->kills = new(mem_ctx) exec_list; - this->killed_all = false; - - visit_list_elements(this, &ir->body_instructions); - - if (this->killed_all) { - orig_acp->make_empty(); - } - - exec_list *new_kills = this->kills; - this->kills = orig_kills; - this->acp = orig_acp; - this->killed_all = this->killed_all || orig_killed_all; - - foreach_list_safe(node, new_kills) { - kill_entry *k = (kill_entry *)node; - kill(k); - } - - /* already descended into the children. */ - return visit_continue_with_parent; -} - -/* Remove any entries currently in the ACP for this kill. */ -void -ir_copy_propagation_elements_visitor::kill(kill_entry *k) -{ - foreach_list_safe(node, acp) { - acp_entry *entry = (acp_entry *)node; - - if (entry->lhs == k->var) { - entry->write_mask = entry->write_mask & ~k->write_mask; - if (entry->write_mask == 0) { - entry->remove(); - continue; - } - } - if (entry->rhs == k->var) { - entry->remove(); - } - } - - /* If we were on a list, remove ourselves before inserting */ - if (k->next) - k->remove(); - - this->kills->push_tail(k); -} - -/** - * Adds directly-copied channels between vector variables to the available - * copy propagation list. - */ -void -ir_copy_propagation_elements_visitor::add_copy(ir_assignment *ir) -{ - acp_entry *entry; - int orig_swizzle[4] = {0, 1, 2, 3}; - int swizzle[4]; - - if (ir->condition) - return; - - ir_dereference_variable *lhs = ir->lhs->as_dereference_variable(); - if (!lhs || !(lhs->type->is_scalar() || lhs->type->is_vector())) - return; - - ir_dereference_variable *rhs = ir->rhs->as_dereference_variable(); - if (!rhs) { - ir_swizzle *swiz = ir->rhs->as_swizzle(); - if (!swiz) - return; - - rhs = swiz->val->as_dereference_variable(); - if (!rhs) - return; - - orig_swizzle[0] = swiz->mask.x; - orig_swizzle[1] = swiz->mask.y; - orig_swizzle[2] = swiz->mask.z; - orig_swizzle[3] = swiz->mask.w; - } - - /* Move the swizzle channels out to the positions they match in the - * destination. We don't want to have to rewrite the swizzle[] - * array every time we clear a bit of the write_mask. - */ - int j = 0; - for (int i = 0; i < 4; i++) { - if (ir->write_mask & (1 << i)) - swizzle[i] = orig_swizzle[j++]; - } - - int write_mask = ir->write_mask; - if (lhs->var == rhs->var) { - /* If this is a copy from the variable to itself, then we need - * to be sure not to include the updated channels from this - * instruction in the set of new source channels to be - * copy-propagated from. - */ - for (int i = 0; i < 4; i++) { - if (ir->write_mask & (1 << orig_swizzle[i])) - write_mask &= ~(1 << i); - } - } - - entry = new(this->mem_ctx) acp_entry(lhs->var, rhs->var, write_mask, - swizzle); - this->acp->push_tail(entry); -} - -bool -do_copy_propagation_elements(exec_list *instructions) -{ - ir_copy_propagation_elements_visitor v; - - visit_list_elements(&v, instructions); - - return v.progress; -} diff --git a/dll/opengl/mesa/src/glsl/opt_dead_code.cpp b/dll/opengl/mesa/src/glsl/opt_dead_code.cpp deleted file mode 100644 index 5b9546ad409..00000000000 --- a/dll/opengl/mesa/src/glsl/opt_dead_code.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file opt_dead_code.cpp - * - * Eliminates dead assignments and variable declarations from the code. - */ - -#include "ir.h" -#include "ir_visitor.h" -#include "ir_variable_refcount.h" -#include "glsl_types.h" - -static bool debug = false; - -/** - * Do a dead code pass over instructions and everything that instructions - * references. - * - * Note that this will remove assignments to globals, so it is not suitable - * for usage on an unlinked instruction stream. - */ -bool -do_dead_code(exec_list *instructions, bool uniform_locations_assigned) -{ - ir_variable_refcount_visitor v; - bool progress = false; - - v.run(instructions); - - foreach_iter(exec_list_iterator, iter, v.variable_list) { - variable_entry *entry = (variable_entry *)iter.get(); - - /* Since each assignment is a reference, the refereneced count must be - * greater than or equal to the assignment count. If they are equal, - * then all of the references are assignments, and the variable is - * dead. - * - * Note that if the variable is neither assigned nor referenced, both - * counts will be zero and will be caught by the equality test. - */ - assert(entry->referenced_count >= entry->assigned_count); - - if (debug) { - printf("%s@%p: %d refs, %d assigns, %sdeclared in our scope\n", - entry->var->name, (void *) entry->var, - entry->referenced_count, entry->assigned_count, - entry->declaration ? "" : "not "); - } - - if ((entry->referenced_count > entry->assigned_count) - || !entry->declaration) - continue; - - if (entry->assign) { - /* Remove a single dead assignment to the variable we found. - * Don't do so if it's a shader output, though. - */ - if (entry->var->mode != ir_var_out && - entry->var->mode != ir_var_inout && - !ir_has_call(entry->assign)) { - entry->assign->remove(); - progress = true; - - if (debug) { - printf("Removed assignment to %s@%p\n", - entry->var->name, (void *) entry->var); - } - } - } else { - /* If there are no assignments or references to the variable left, - * then we can remove its declaration. - */ - - /* uniform initializers are precious, and could get used by another - * stage. Also, once uniform locations have been assigned, the - * declaration cannot be deleted. - */ - if (entry->var->mode == ir_var_uniform && - (uniform_locations_assigned || entry->var->constant_value)) - continue; - - entry->var->remove(); - progress = true; - - if (debug) { - printf("Removed declaration of %s@%p\n", - entry->var->name, (void *) entry->var); - } - } - } - - return progress; -} - -/** - * Does a dead code pass on the functions present in the instruction stream. - * - * This is suitable for use while the program is not linked, as it will - * ignore variable declarations (and the assignments to them) for variables - * with global scope. - */ -bool -do_dead_code_unlinked(exec_list *instructions) -{ - bool progress = false; - - foreach_iter(exec_list_iterator, iter, *instructions) { - ir_instruction *ir = (ir_instruction *)iter.get(); - ir_function *f = ir->as_function(); - if (f) { - foreach_iter(exec_list_iterator, sigiter, *f) { - ir_function_signature *sig = - (ir_function_signature *) sigiter.get(); - /* The setting of the uniform_locations_assigned flag here is - * irrelevent. If there is a uniform declaration encountered - * inside the body of the function, something has already gone - * terribly, terribly wrong. - */ - if (do_dead_code(&sig->body, false)) - progress = true; - } - } - } - - return progress; -} diff --git a/dll/opengl/mesa/src/glsl/opt_dead_code_local.cpp b/dll/opengl/mesa/src/glsl/opt_dead_code_local.cpp deleted file mode 100644 index 39962bd602e..00000000000 --- a/dll/opengl/mesa/src/glsl/opt_dead_code_local.cpp +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file opt_dead_code_local.cpp - * - * Eliminates local dead assignments from the code. - * - * This operates on basic blocks, tracking assignments and finding if - * they're used before the variable is completely reassigned. - * - * Compare this to ir_dead_code.cpp, which operates globally looking - * for assignments to variables that are never read. - */ - -#include "ir.h" -#include "ir_basic_block.h" -#include "ir_optimization.h" -#include "glsl_types.h" - -static bool debug = false; - -class assignment_entry : public exec_node -{ -public: - assignment_entry(ir_variable *lhs, ir_instruction *ir) - { - assert(lhs); - assert(ir); - this->lhs = lhs; - this->ir = ir; - } - - ir_variable *lhs; - ir_instruction *ir; -}; - -class kill_for_derefs_visitor : public ir_hierarchical_visitor { -public: - kill_for_derefs_visitor(exec_list *assignments) - { - this->assignments = assignments; - } - - virtual ir_visitor_status visit(ir_dereference_variable *ir) - { - ir_variable *const var = ir->variable_referenced(); - - foreach_iter(exec_list_iterator, iter, *this->assignments) { - assignment_entry *entry = (assignment_entry *)iter.get(); - - if (entry->lhs == var) { - if (debug) - printf("kill %s\n", entry->lhs->name); - entry->remove(); - } - } - - return visit_continue; - } - -private: - exec_list *assignments; -}; - -class array_index_visit : public ir_hierarchical_visitor { -public: - array_index_visit(ir_hierarchical_visitor *v) - { - this->visitor = v; - } - - virtual ir_visitor_status visit_enter(class ir_dereference_array *ir) - { - ir->array_index->accept(visitor); - return visit_continue; - } - - static void run(ir_instruction *ir, ir_hierarchical_visitor *v) - { - array_index_visit top_visit(v); - ir->accept(& top_visit); - } - - ir_hierarchical_visitor *visitor; -}; - - -/** - * Adds an entry to the available copy list if it's a plain assignment - * of a variable to a variable. - */ -static bool -process_assignment(void *ctx, ir_assignment *ir, exec_list *assignments) -{ - ir_variable *var = NULL; - bool progress = false; - kill_for_derefs_visitor v(assignments); - - /* Kill assignment entries for things used to produce this assignment. */ - ir->rhs->accept(&v); - if (ir->condition) { - ir->condition->accept(&v); - } - - /* Kill assignment enties used as array indices. - */ - array_index_visit::run(ir->lhs, &v); - var = ir->lhs->variable_referenced(); - assert(var); - - /* Now, check if we did a whole-variable assignment. */ - if (!ir->condition && (ir->whole_variable_written() != NULL)) { - /* We did a whole-variable assignment. So, any instruction in - * the assignment list with the same LHS is dead. - */ - if (debug) - printf("looking for %s to remove\n", var->name); - foreach_iter(exec_list_iterator, iter, *assignments) { - assignment_entry *entry = (assignment_entry *)iter.get(); - - if (entry->lhs == var) { - if (debug) - printf("removing %s\n", var->name); - entry->ir->remove(); - entry->remove(); - progress = true; - } - } - } - - /* Add this instruction to the assignment list available to be removed. - * But not if the assignment has other side effects. - */ - if (ir_has_call(ir)) - return progress; - - assignment_entry *entry = new(ctx) assignment_entry(var, ir); - assignments->push_tail(entry); - - if (debug) { - printf("add %s\n", var->name); - - printf("current entries\n"); - foreach_iter(exec_list_iterator, iter, *assignments) { - assignment_entry *entry = (assignment_entry *)iter.get(); - - printf(" %s\n", entry->lhs->name); - } - } - - return progress; -} - -static void -dead_code_local_basic_block(ir_instruction *first, - ir_instruction *last, - void *data) -{ - ir_instruction *ir, *ir_next; - /* List of avaialble_copy */ - exec_list assignments; - bool *out_progress = (bool *)data; - bool progress = false; - - void *ctx = ralloc_context(NULL); - /* Safe looping, since process_assignment */ - for (ir = first, ir_next = (ir_instruction *)first->next;; - ir = ir_next, ir_next = (ir_instruction *)ir->next) { - ir_assignment *ir_assign = ir->as_assignment(); - - if (debug) { - ir->print(); - printf("\n"); - } - - if (ir_assign) { - progress = process_assignment(ctx, ir_assign, &assignments) || progress; - } else { - kill_for_derefs_visitor kill(&assignments); - ir->accept(&kill); - } - - if (ir == last) - break; - } - *out_progress = progress; - ralloc_free(ctx); -} - -/** - * Does a copy propagation pass on the code present in the instruction stream. - */ -bool -do_dead_code_local(exec_list *instructions) -{ - bool progress = false; - - call_for_basic_blocks(instructions, dead_code_local_basic_block, &progress); - - return progress; -} diff --git a/dll/opengl/mesa/src/glsl/opt_dead_functions.cpp b/dll/opengl/mesa/src/glsl/opt_dead_functions.cpp deleted file mode 100644 index 51c77e3b947..00000000000 --- a/dll/opengl/mesa/src/glsl/opt_dead_functions.cpp +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file opt_dead_functions.cpp - * - * Eliminates unused functions from the linked program. - */ - -#include "ir.h" -#include "ir_visitor.h" -#include "ir_expression_flattening.h" -#include "glsl_types.h" - -class signature_entry : public exec_node -{ -public: - signature_entry(ir_function_signature *sig) - { - this->signature = sig; - this->used = false; - } - - ir_function_signature *signature; - bool used; -}; - -class ir_dead_functions_visitor : public ir_hierarchical_visitor { -public: - ir_dead_functions_visitor() - { - this->mem_ctx = ralloc_context(NULL); - } - - ~ir_dead_functions_visitor() - { - ralloc_free(this->mem_ctx); - } - - virtual ir_visitor_status visit_enter(ir_function_signature *); - virtual ir_visitor_status visit_enter(ir_call *); - - signature_entry *get_signature_entry(ir_function_signature *var); - - bool (*predicate)(ir_instruction *ir); - - /* List of signature_entry */ - exec_list signature_list; - void *mem_ctx; -}; - - -signature_entry * -ir_dead_functions_visitor::get_signature_entry(ir_function_signature *sig) -{ - foreach_iter(exec_list_iterator, iter, this->signature_list) { - signature_entry *entry = (signature_entry *)iter.get(); - if (entry->signature == sig) - return entry; - } - - signature_entry *entry = new(mem_ctx) signature_entry(sig); - this->signature_list.push_tail(entry); - return entry; -} - - -ir_visitor_status -ir_dead_functions_visitor::visit_enter(ir_function_signature *ir) -{ - signature_entry *entry = this->get_signature_entry(ir); - - if (strcmp(ir->function_name(), "main") == 0) { - entry->used = true; - } - - - - return visit_continue; -} - - -ir_visitor_status -ir_dead_functions_visitor::visit_enter(ir_call *ir) -{ - signature_entry *entry = this->get_signature_entry(ir->get_callee()); - - entry->used = true; - - return visit_continue; -} - -bool -do_dead_functions(exec_list *instructions) -{ - ir_dead_functions_visitor v; - bool progress = false; - - visit_list_elements(&v, instructions); - - /* Now that we've figured out which function signatures are used, remove - * the unused ones, and remove function definitions that have no more - * signatures. - */ - foreach_iter(exec_list_iterator, iter, v.signature_list) { - signature_entry *entry = (signature_entry *)iter.get(); - - if (!entry->used) { - entry->signature->remove(); - delete entry->signature; - progress = true; - } - delete(entry); - } - - /* We don't just do this above when we nuked a signature because of - * const pointers. - */ - foreach_iter(exec_list_iterator, iter, *instructions) { - ir_instruction *ir = (ir_instruction *)iter.get(); - ir_function *func = ir->as_function(); - - if (func && func->signatures.is_empty()) { - /* At this point (post-linking), the symbol table is no - * longer in use, so not removing the function from the - * symbol table should be OK. - */ - func->remove(); - delete func; - progress = true; - } - } - - return progress; -} diff --git a/dll/opengl/mesa/src/glsl/opt_discard_simplification.cpp b/dll/opengl/mesa/src/glsl/opt_discard_simplification.cpp deleted file mode 100644 index ba4981bae53..00000000000 --- a/dll/opengl/mesa/src/glsl/opt_discard_simplification.cpp +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file opt_discard_simplification.cpp - * - * This pass simplifies if-statements and loops containing unconditional - * discards. - * - * Case 1: Both branches contain unconditional discards: - * ----------------------------------------------------- - * - * if (cond) { - * s1; - * discard; - * s2; - * } else { - * s3; - * discard; - * s4; - * } - * - * becomes: - * - * discard - * - * Case 2: The "then" clause contains an unconditional discard: - * ------------------------------------------------------------ - * - * if (cond) { - * s1; - * discard; - * s2; - * } else { - * s3; - * } - * - * becomes: - * - * if (cond) { - * discard; - * } else { - * s3; - * } - * - * Case 3: The "else" clause contains an unconditional discard: - * ------------------------------------------------------------ - * - * if (cond) { - * s1; - * } else { - * s2; - * discard; - * s3; - * } - * - * becomes: - * - * if (cond) { - * s1; - * } else { - * discard; - * } - */ - -#include "glsl_types.h" -#include "ir.h" - -class discard_simplifier : public ir_hierarchical_visitor { -public: - discard_simplifier() - { - this->progress = false; - } - - ir_visitor_status visit_enter(ir_if *); - ir_visitor_status visit_enter(ir_loop *); - ir_visitor_status visit_enter(ir_assignment *); - - bool progress; -}; - -static ir_discard * -find_unconditional_discard(exec_list &instructions) -{ - foreach_list(n, &instructions) { - ir_instruction *ir = (ir_instruction *)n; - - if (ir->ir_type == ir_type_return || - ir->ir_type == ir_type_loop_jump) - return NULL; - - /* So far, this code doesn't know how to look inside of flow - * control to see if a discard later on at this level is - * unconditional. - */ - if (ir->ir_type == ir_type_if || - ir->ir_type == ir_type_loop) - return NULL; - - ir_discard *discard = ir->as_discard(); - if (discard != NULL && discard->condition == NULL) - return discard; - } - return NULL; -} - -static bool -is_only_instruction(ir_discard *discard) -{ - return (discard->prev->is_head_sentinel() && - discard->next->is_tail_sentinel()); -} - -/* We only care about the top level instructions, so don't descend - * into expressions. - */ -ir_visitor_status -discard_simplifier::visit_enter(ir_assignment *ir) -{ - (void) ir; - return visit_continue_with_parent; -} - -ir_visitor_status -discard_simplifier::visit_enter(ir_if *ir) -{ - ir_discard *then_discard = find_unconditional_discard(ir->then_instructions); - ir_discard *else_discard = find_unconditional_discard(ir->else_instructions); - - if (then_discard == NULL && else_discard == NULL) - return visit_continue; - - /* If both branches result in discard, replace whole if with discard. */ - if (then_discard != NULL && else_discard != NULL) { - this->progress = true; - ir->replace_with(then_discard); - return visit_continue_with_parent; - } - - /* Otherwise, one branch has a discard. */ - if (then_discard != NULL && !is_only_instruction(then_discard)) { - this->progress = true; - ir->then_instructions.make_empty(); - ir->then_instructions.push_tail(then_discard); - } else if (else_discard != NULL && !is_only_instruction(else_discard)) { - this->progress = true; - ir->else_instructions.make_empty(); - ir->else_instructions.push_tail(else_discard); - } - - visit_list_elements(this, &ir->then_instructions); - return visit_continue_with_parent; -} - -ir_visitor_status -discard_simplifier::visit_enter(ir_loop *ir) -{ - ir_discard *discard = find_unconditional_discard(ir->body_instructions); - - if (discard) { - ir->replace_with(discard); - return visit_continue_with_parent; - } - - return visit_continue; -} - -bool -do_discard_simplification(exec_list *instructions) -{ - /* Look for a top-level unconditional discard */ - ir_discard *discard = find_unconditional_discard(*instructions); - if (discard != NULL) { - instructions->make_empty(); - instructions->push_tail(discard); - return true; - } - - discard_simplifier v; - - visit_list_elements(&v, instructions); - - return v.progress; -} diff --git a/dll/opengl/mesa/src/glsl/opt_function_inlining.cpp b/dll/opengl/mesa/src/glsl/opt_function_inlining.cpp deleted file mode 100644 index ec8b72c632f..00000000000 --- a/dll/opengl/mesa/src/glsl/opt_function_inlining.cpp +++ /dev/null @@ -1,421 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file opt_function_inlining.cpp - * - * Replaces calls to functions with the body of the function. - */ - -#include "ir.h" -#include "ir_visitor.h" -#include "ir_function_inlining.h" -#include "ir_expression_flattening.h" -#include "glsl_types.h" -#include "program/hash_table.h" - -static void -do_sampler_replacement(exec_list *instructions, - ir_variable *sampler, - ir_dereference *deref); - -class ir_function_inlining_visitor : public ir_hierarchical_visitor { -public: - ir_function_inlining_visitor() - { - progress = false; - } - - virtual ~ir_function_inlining_visitor() - { - /* empty */ - } - - virtual ir_visitor_status visit_enter(ir_expression *); - virtual ir_visitor_status visit_enter(ir_call *); - virtual ir_visitor_status visit_enter(ir_assignment *); - virtual ir_visitor_status visit_enter(ir_return *); - virtual ir_visitor_status visit_enter(ir_texture *); - virtual ir_visitor_status visit_enter(ir_swizzle *); - - bool progress; -}; - - -bool -automatic_inlining_predicate(ir_instruction *ir) -{ - ir_call *call = ir->as_call(); - - if (call && can_inline(call)) - return true; - - return false; -} - -bool -do_function_inlining(exec_list *instructions) -{ - ir_function_inlining_visitor v; - - do_expression_flattening(instructions, automatic_inlining_predicate); - - v.run(instructions); - - return v.progress; -} - -static void -replace_return_with_assignment(ir_instruction *ir, void *data) -{ - void *ctx = ralloc_parent(ir); - ir_variable *retval = (ir_variable *)data; - ir_return *ret = ir->as_return(); - - if (ret) { - if (ret->value) { - ir_rvalue *lhs = new(ctx) ir_dereference_variable(retval); - ret->replace_with(new(ctx) ir_assignment(lhs, ret->value, NULL)); - } else { - /* un-valued return has to be the last return, or we shouldn't - * have reached here. (see can_inline()). - */ - assert(ret->next->is_tail_sentinel()); - ret->remove(); - } - } -} - -ir_rvalue * -ir_call::generate_inline(ir_instruction *next_ir) -{ - void *ctx = ralloc_parent(this); - ir_variable **parameters; - int num_parameters; - int i; - ir_variable *retval = NULL; - struct hash_table *ht; - - ht = hash_table_ctor(0, hash_table_pointer_hash, hash_table_pointer_compare); - - num_parameters = 0; - foreach_iter(exec_list_iterator, iter_sig, this->callee->parameters) - num_parameters++; - - parameters = new ir_variable *[num_parameters]; - - /* Generate storage for the return value. */ - if (!this->callee->return_type->is_void()) { - retval = new(ctx) ir_variable(this->callee->return_type, "_ret_val", - ir_var_auto); - next_ir->insert_before(retval); - } - - /* Generate the declarations for the parameters to our inlined code, - * and set up the mapping of real function body variables to ours. - */ - i = 0; - exec_list_iterator sig_param_iter = this->callee->parameters.iterator(); - exec_list_iterator param_iter = this->actual_parameters.iterator(); - for (i = 0; i < num_parameters; i++) { - ir_variable *sig_param = (ir_variable *) sig_param_iter.get(); - ir_rvalue *param = (ir_rvalue *) param_iter.get(); - - /* Generate a new variable for the parameter. */ - if (sig_param->type->base_type == GLSL_TYPE_SAMPLER) { - /* For samplers, we want the inlined sampler references - * referencing the passed in sampler variable, since that - * will have the location information, which an assignment of - * a sampler wouldn't. Fix it up below. - */ - parameters[i] = NULL; - } else { - parameters[i] = sig_param->clone(ctx, ht); - parameters[i]->mode = ir_var_auto; - - /* Remove the read-only decoration becuase we're going to write - * directly to this variable. If the cloned variable is left - * read-only and the inlined function is inside a loop, the loop - * analysis code will get confused. - */ - parameters[i]->read_only = false; - next_ir->insert_before(parameters[i]); - } - - /* Move the actual param into our param variable if it's an 'in' type. */ - if (parameters[i] && (sig_param->mode == ir_var_in || - sig_param->mode == ir_var_const_in || - sig_param->mode == ir_var_inout)) { - ir_assignment *assign; - - assign = new(ctx) ir_assignment(new(ctx) ir_dereference_variable(parameters[i]), - param, NULL); - next_ir->insert_before(assign); - } - - sig_param_iter.next(); - param_iter.next(); - } - - exec_list new_instructions; - - /* Generate the inlined body of the function to a new list */ - foreach_iter(exec_list_iterator, iter, callee->body) { - ir_instruction *ir = (ir_instruction *)iter.get(); - ir_instruction *new_ir = ir->clone(ctx, ht); - - new_instructions.push_tail(new_ir); - visit_tree(new_ir, replace_return_with_assignment, retval); - } - - /* If any samplers were passed in, replace any deref of the sampler - * with a deref of the sampler argument. - */ - param_iter = this->actual_parameters.iterator(); - sig_param_iter = this->callee->parameters.iterator(); - for (i = 0; i < num_parameters; i++) { - ir_instruction *const param = (ir_instruction *) param_iter.get(); - ir_variable *sig_param = (ir_variable *) sig_param_iter.get(); - - if (sig_param->type->base_type == GLSL_TYPE_SAMPLER) { - ir_dereference *deref = param->as_dereference(); - - assert(deref); - do_sampler_replacement(&new_instructions, sig_param, deref); - } - param_iter.next(); - sig_param_iter.next(); - } - - /* Now push those new instructions in. */ - next_ir->insert_before(&new_instructions); - - /* Copy back the value of any 'out' parameters from the function body - * variables to our own. - */ - i = 0; - param_iter = this->actual_parameters.iterator(); - sig_param_iter = this->callee->parameters.iterator(); - for (i = 0; i < num_parameters; i++) { - ir_instruction *const param = (ir_instruction *) param_iter.get(); - const ir_variable *const sig_param = (ir_variable *) sig_param_iter.get(); - - /* Move our param variable into the actual param if it's an 'out' type. */ - if (parameters[i] && (sig_param->mode == ir_var_out || - sig_param->mode == ir_var_inout)) { - ir_assignment *assign; - - assign = new(ctx) ir_assignment(param->clone(ctx, NULL)->as_rvalue(), - new(ctx) ir_dereference_variable(parameters[i]), - NULL); - next_ir->insert_before(assign); - } - - param_iter.next(); - sig_param_iter.next(); - } - - delete [] parameters; - - hash_table_dtor(ht); - - if (retval) - return new(ctx) ir_dereference_variable(retval); - else - return NULL; -} - - -ir_visitor_status -ir_function_inlining_visitor::visit_enter(ir_expression *ir) -{ - (void) ir; - return visit_continue_with_parent; -} - - -ir_visitor_status -ir_function_inlining_visitor::visit_enter(ir_return *ir) -{ - (void) ir; - return visit_continue_with_parent; -} - - -ir_visitor_status -ir_function_inlining_visitor::visit_enter(ir_texture *ir) -{ - (void) ir; - return visit_continue_with_parent; -} - - -ir_visitor_status -ir_function_inlining_visitor::visit_enter(ir_swizzle *ir) -{ - (void) ir; - return visit_continue_with_parent; -} - - -ir_visitor_status -ir_function_inlining_visitor::visit_enter(ir_call *ir) -{ - if (can_inline(ir)) { - /* If the call was part of some tree, then it should have been - * flattened out or we shouldn't have seen it because of a - * visit_continue_with_parent in this visitor. - */ - assert(ir == base_ir); - - (void) ir->generate_inline(ir); - ir->remove(); - this->progress = true; - } - - return visit_continue; -} - - -ir_visitor_status -ir_function_inlining_visitor::visit_enter(ir_assignment *ir) -{ - ir_call *call = ir->rhs->as_call(); - if (!call || !can_inline(call)) - return visit_continue; - - /* generates the parameter setup, function body, and returns the return - * value of the function - */ - ir_rvalue *rhs = call->generate_inline(ir); - assert(rhs); - - ir->rhs = rhs; - this->progress = true; - - return visit_continue; -} - -/** - * Replaces references to the "sampler" variable with a clone of "deref." - * - * From the spec, samplers can appear in the tree as function - * (non-out) parameters and as the result of array indexing and - * structure field selection. In our builtin implementation, they - * also appear in the sampler field of an ir_tex instruction. - */ - -class ir_sampler_replacement_visitor : public ir_hierarchical_visitor { -public: - ir_sampler_replacement_visitor(ir_variable *sampler, ir_dereference *deref) - { - this->sampler = sampler; - this->deref = deref; - } - - virtual ~ir_sampler_replacement_visitor() - { - } - - virtual ir_visitor_status visit_leave(ir_call *); - virtual ir_visitor_status visit_leave(ir_dereference_array *); - virtual ir_visitor_status visit_leave(ir_dereference_record *); - virtual ir_visitor_status visit_leave(ir_texture *); - - void replace_deref(ir_dereference **deref); - void replace_rvalue(ir_rvalue **rvalue); - - ir_variable *sampler; - ir_dereference *deref; -}; - -void -ir_sampler_replacement_visitor::replace_deref(ir_dereference **deref) -{ - ir_dereference_variable *deref_var = (*deref)->as_dereference_variable(); - if (deref_var && deref_var->var == this->sampler) { - *deref = this->deref->clone(ralloc_parent(*deref), NULL); - } -} - -void -ir_sampler_replacement_visitor::replace_rvalue(ir_rvalue **rvalue) -{ - if (!*rvalue) - return; - - ir_dereference *deref = (*rvalue)->as_dereference(); - - if (!deref) - return; - - replace_deref(&deref); - *rvalue = deref; -} - -ir_visitor_status -ir_sampler_replacement_visitor::visit_leave(ir_texture *ir) -{ - replace_deref(&ir->sampler); - - return visit_continue; -} - -ir_visitor_status -ir_sampler_replacement_visitor::visit_leave(ir_dereference_array *ir) -{ - replace_rvalue(&ir->array); - return visit_continue; -} - -ir_visitor_status -ir_sampler_replacement_visitor::visit_leave(ir_dereference_record *ir) -{ - replace_rvalue(&ir->record); - return visit_continue; -} - -ir_visitor_status -ir_sampler_replacement_visitor::visit_leave(ir_call *ir) -{ - foreach_iter(exec_list_iterator, iter, *ir) { - ir_rvalue *param = (ir_rvalue *)iter.get(); - ir_rvalue *new_param = param; - replace_rvalue(&new_param); - - if (new_param != param) { - param->replace_with(new_param); - } - } - return visit_continue; -} - -static void -do_sampler_replacement(exec_list *instructions, - ir_variable *sampler, - ir_dereference *deref) -{ - ir_sampler_replacement_visitor v(sampler, deref); - - visit_list_elements(&v, instructions); -} diff --git a/dll/opengl/mesa/src/glsl/opt_if_simplification.cpp b/dll/opengl/mesa/src/glsl/opt_if_simplification.cpp deleted file mode 100644 index 940dd08d576..00000000000 --- a/dll/opengl/mesa/src/glsl/opt_if_simplification.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file opt_if_simplification.cpp - * - * Moves constant branches of if statements out to the surrounding - * instruction stream. - */ - -#include "ir.h" - -class ir_if_simplification_visitor : public ir_hierarchical_visitor { -public: - ir_if_simplification_visitor() - { - this->made_progress = false; - } - - ir_visitor_status visit_leave(ir_if *); - ir_visitor_status visit_enter(ir_assignment *); - - bool made_progress; -}; - -/* We only care about the top level "if" instructions, so don't - * descend into expressions. - */ -ir_visitor_status -ir_if_simplification_visitor::visit_enter(ir_assignment *ir) -{ - (void) ir; - return visit_continue_with_parent; -} - -bool -do_if_simplification(exec_list *instructions) -{ - ir_if_simplification_visitor v; - - v.run(instructions); - return v.made_progress; -} - - -ir_visitor_status -ir_if_simplification_visitor::visit_leave(ir_if *ir) -{ - /* FINISHME: Ideally there would be a way to note that the condition results - * FINISHME: in a constant before processing both of the other subtrees. - * FINISHME: This can probably be done with some flags, but it would take - * FINISHME: some work to get right. - */ - ir_constant *condition_constant = ir->condition->constant_expression_value(); - if (condition_constant) { - /* Move the contents of the one branch of the conditional - * that matters out. - */ - if (condition_constant->value.b[0]) { - foreach_iter(exec_list_iterator, then_iter, ir->then_instructions) { - ir_instruction *then_ir = (ir_instruction *)then_iter.get(); - ir->insert_before(then_ir); - } - } else { - foreach_iter(exec_list_iterator, else_iter, ir->else_instructions) { - ir_instruction *else_ir = (ir_instruction *)else_iter.get(); - ir->insert_before(else_ir); - } - } - ir->remove(); - this->made_progress = true; - } - - return visit_continue; -} diff --git a/dll/opengl/mesa/src/glsl/opt_noop_swizzle.cpp b/dll/opengl/mesa/src/glsl/opt_noop_swizzle.cpp deleted file mode 100644 index 0a906aaf1da..00000000000 --- a/dll/opengl/mesa/src/glsl/opt_noop_swizzle.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file opt_noop_swizzle.cpp - * - * If a swizzle doesn't change the order or count of components, then - * remove the swizzle so that other optimization passes see the value - * behind it. - */ - -#include "ir.h" -#include "ir_visitor.h" -#include "ir_rvalue_visitor.h" -#include "ir_print_visitor.h" -#include "glsl_types.h" - -class ir_noop_swizzle_visitor : public ir_rvalue_visitor { -public: - ir_noop_swizzle_visitor() - { - this->progress = false; - } - - void handle_rvalue(ir_rvalue **rvalue); - bool progress; -}; - -void -ir_noop_swizzle_visitor::handle_rvalue(ir_rvalue **rvalue) -{ - if (!*rvalue) - return; - - ir_swizzle *swiz = (*rvalue)->as_swizzle(); - if (!swiz || swiz->type != swiz->val->type) - return; - - int elems = swiz->val->type->vector_elements; - if (swiz->mask.x != 0) - return; - if (elems >= 2 && swiz->mask.y != 1) - return; - if (elems >= 3 && swiz->mask.z != 2) - return; - if (elems >= 4 && swiz->mask.w != 3) - return; - - this->progress = true; - *rvalue = swiz->val; -} - -bool -do_noop_swizzle(exec_list *instructions) -{ - ir_noop_swizzle_visitor v; - visit_list_elements(&v, instructions); - - return v.progress; -} diff --git a/dll/opengl/mesa/src/glsl/opt_redundant_jumps.cpp b/dll/opengl/mesa/src/glsl/opt_redundant_jumps.cpp deleted file mode 100644 index f350fa947c9..00000000000 --- a/dll/opengl/mesa/src/glsl/opt_redundant_jumps.cpp +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file opt_redundant_jumps.cpp - * Remove certain types of redundant jumps - */ - -#include "ir.h" - -class redundant_jumps_visitor : public ir_hierarchical_visitor { -public: - redundant_jumps_visitor() - { - this->progress = false; - } - - virtual ir_visitor_status visit_leave(ir_if *); - virtual ir_visitor_status visit_leave(ir_loop *); - virtual ir_visitor_status visit_enter(ir_assignment *); - - bool progress; -}; - -/* We only care about the top level instructions, so don't descend - * into expressions. - */ -ir_visitor_status -redundant_jumps_visitor::visit_enter(ir_assignment *ir) -{ - return visit_continue_with_parent; -} - -ir_visitor_status -redundant_jumps_visitor::visit_leave(ir_if *ir) -{ - /* If the last instruction in both branches is a 'break' or a 'continue', - * pull it out of the branches and insert it after the if-statment. Note - * that both must be the same type (either 'break' or 'continue'). - */ - ir_instruction *const last_then = - (ir_instruction *) ir->then_instructions.get_tail(); - ir_instruction *const last_else = - (ir_instruction *) ir->else_instructions.get_tail(); - - if ((last_then == NULL) || (last_else == NULL)) - return visit_continue; - - if ((last_then->ir_type != ir_type_loop_jump) - || (last_else->ir_type != ir_type_loop_jump)) - return visit_continue; - - ir_loop_jump *const then_jump = (ir_loop_jump *) last_then; - ir_loop_jump *const else_jump = (ir_loop_jump *) last_else; - - if (then_jump->mode != else_jump->mode) - return visit_continue; - - then_jump->remove(); - else_jump->remove(); - this->progress = true; - - ir->insert_after(then_jump); - - /* If both branchs of the if-statement are now empty, remove the - * if-statement. - */ - if (ir->then_instructions.is_empty() && ir->else_instructions.is_empty()) - ir->remove(); - - return visit_continue; -} - - -ir_visitor_status -redundant_jumps_visitor::visit_leave(ir_loop *ir) -{ - /* If the last instruction of a loop body is a 'continue', remove it. - */ - ir_instruction *const last = - (ir_instruction *) ir->body_instructions.get_tail(); - - if (last && (last->ir_type == ir_type_loop_jump) - && (((ir_loop_jump *) last)->mode == ir_loop_jump::jump_continue)) { - last->remove(); - this->progress = true; - } - - return visit_continue; -} - - -bool -optimize_redundant_jumps(exec_list *instructions) -{ - redundant_jumps_visitor v; - - v.run(instructions); - return v.progress; -} diff --git a/dll/opengl/mesa/src/glsl/opt_structure_splitting.cpp b/dll/opengl/mesa/src/glsl/opt_structure_splitting.cpp deleted file mode 100644 index 2c1f6bb227a..00000000000 --- a/dll/opengl/mesa/src/glsl/opt_structure_splitting.cpp +++ /dev/null @@ -1,367 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file opt_structure_splitting.cpp - * - * If a structure is only ever referenced by its components, then - * split those components out to individual variables so they can be - * handled normally by other optimization passes. - * - * This skips structures like uniforms, which need to be accessible as - * structures for their access by the GL. - */ - -#include "ir.h" -#include "ir_visitor.h" -#include "ir_print_visitor.h" -#include "ir_rvalue_visitor.h" -#include "glsl_types.h" - -static bool debug = false; - -// XXX using variable_entry2 here to avoid collision (MSVC multiply-defined -// function) with the variable_entry class seen in ir_variable_refcount.h -// Perhaps we can use the one in ir_variable_refcount.h and make this class -// here go away? -class variable_entry2 : public exec_node -{ -public: - variable_entry2(ir_variable *var) - { - this->var = var; - this->whole_structure_access = 0; - this->declaration = false; - this->components = NULL; - this->mem_ctx = NULL; - } - - ir_variable *var; /* The key: the variable's pointer. */ - - /** Number of times the variable is referenced, including assignments. */ - unsigned whole_structure_access; - - bool declaration; /* If the variable had a decl in the instruction stream */ - - ir_variable **components; - - /** ralloc_parent(this->var) -- the shader's ralloc context. */ - void *mem_ctx; -}; - - -class ir_structure_reference_visitor : public ir_hierarchical_visitor { -public: - ir_structure_reference_visitor(void) - { - this->mem_ctx = ralloc_context(NULL); - this->variable_list.make_empty(); - } - - ~ir_structure_reference_visitor(void) - { - ralloc_free(mem_ctx); - } - - virtual ir_visitor_status visit(ir_variable *); - virtual ir_visitor_status visit(ir_dereference_variable *); - virtual ir_visitor_status visit_enter(ir_dereference_record *); - virtual ir_visitor_status visit_enter(ir_assignment *); - virtual ir_visitor_status visit_enter(ir_function_signature *); - - variable_entry2 *get_variable_entry2(ir_variable *var); - - /* List of variable_entry */ - exec_list variable_list; - - void *mem_ctx; -}; - -variable_entry2 * -ir_structure_reference_visitor::get_variable_entry2(ir_variable *var) -{ - assert(var); - - if (!var->type->is_record() || var->mode == ir_var_uniform) - return NULL; - - foreach_iter(exec_list_iterator, iter, this->variable_list) { - variable_entry2 *entry = (variable_entry2 *)iter.get(); - if (entry->var == var) - return entry; - } - - variable_entry2 *entry = new(mem_ctx) variable_entry2(var); - this->variable_list.push_tail(entry); - return entry; -} - - -ir_visitor_status -ir_structure_reference_visitor::visit(ir_variable *ir) -{ - variable_entry2 *entry = this->get_variable_entry2(ir); - - if (entry) - entry->declaration = true; - - return visit_continue; -} - -ir_visitor_status -ir_structure_reference_visitor::visit(ir_dereference_variable *ir) -{ - ir_variable *const var = ir->variable_referenced(); - variable_entry2 *entry = this->get_variable_entry2(var); - - if (entry) - entry->whole_structure_access++; - - return visit_continue; -} - -ir_visitor_status -ir_structure_reference_visitor::visit_enter(ir_dereference_record *ir) -{ - (void) ir; - /* Don't descend into the ir_dereference_variable below. */ - return visit_continue_with_parent; -} - -ir_visitor_status -ir_structure_reference_visitor::visit_enter(ir_assignment *ir) -{ - /* If there are no structure references yet, no need to bother with - * processing the expression tree. - */ - if (this->variable_list.is_empty()) - return visit_continue_with_parent; - - if (ir->lhs->as_dereference_variable() && - ir->rhs->as_dereference_variable() && - !ir->condition) { - /* We'll split copies of a structure to copies of components, so don't - * descend to the ir_dereference_variables. - */ - return visit_continue_with_parent; - } - return visit_continue; -} - -ir_visitor_status -ir_structure_reference_visitor::visit_enter(ir_function_signature *ir) -{ - /* We don't want to descend into the function parameters and - * dead-code eliminate them, so just accept the body here. - */ - visit_list_elements(this, &ir->body); - return visit_continue_with_parent; -} - -class ir_structure_splitting_visitor : public ir_rvalue_visitor { -public: - ir_structure_splitting_visitor(exec_list *vars) - { - this->variable_list = vars; - } - - virtual ~ir_structure_splitting_visitor() - { - } - - virtual ir_visitor_status visit_leave(ir_assignment *); - - void split_deref(ir_dereference **deref); - void handle_rvalue(ir_rvalue **rvalue); - variable_entry2 *get_splitting_entry(ir_variable *var); - - exec_list *variable_list; - void *mem_ctx; -}; - -variable_entry2 * -ir_structure_splitting_visitor::get_splitting_entry(ir_variable *var) -{ - assert(var); - - if (!var->type->is_record()) - return NULL; - - foreach_iter(exec_list_iterator, iter, *this->variable_list) { - variable_entry2 *entry = (variable_entry2 *)iter.get(); - if (entry->var == var) { - return entry; - } - } - - return NULL; -} - -void -ir_structure_splitting_visitor::split_deref(ir_dereference **deref) -{ - if ((*deref)->ir_type != ir_type_dereference_record) - return; - - ir_dereference_record *deref_record = (ir_dereference_record *)*deref; - ir_dereference_variable *deref_var = deref_record->record->as_dereference_variable(); - if (!deref_var) - return; - - variable_entry2 *entry = get_splitting_entry(deref_var->var); - if (!entry) - return; - - unsigned int i; - for (i = 0; i < entry->var->type->length; i++) { - if (strcmp(deref_record->field, - entry->var->type->fields.structure[i].name) == 0) - break; - } - assert(i != entry->var->type->length); - - *deref = new(entry->mem_ctx) ir_dereference_variable(entry->components[i]); -} - -void -ir_structure_splitting_visitor::handle_rvalue(ir_rvalue **rvalue) -{ - if (!*rvalue) - return; - - ir_dereference *deref = (*rvalue)->as_dereference(); - - if (!deref) - return; - - split_deref(&deref); - *rvalue = deref; -} - -ir_visitor_status -ir_structure_splitting_visitor::visit_leave(ir_assignment *ir) -{ - ir_dereference_variable *lhs_deref = ir->lhs->as_dereference_variable(); - ir_dereference_variable *rhs_deref = ir->rhs->as_dereference_variable(); - variable_entry2 *lhs_entry = lhs_deref ? get_splitting_entry(lhs_deref->var) : NULL; - variable_entry2 *rhs_entry = rhs_deref ? get_splitting_entry(rhs_deref->var) : NULL; - const glsl_type *type = ir->rhs->type; - - if ((lhs_entry || rhs_entry) && !ir->condition) { - for (unsigned int i = 0; i < type->length; i++) { - ir_dereference *new_lhs, *new_rhs; - void *mem_ctx = lhs_entry ? lhs_entry->mem_ctx : rhs_entry->mem_ctx; - - if (lhs_entry) { - new_lhs = new(mem_ctx) ir_dereference_variable(lhs_entry->components[i]); - } else { - new_lhs = new(mem_ctx) - ir_dereference_record(ir->lhs->clone(mem_ctx, NULL), - type->fields.structure[i].name); - } - - if (rhs_entry) { - new_rhs = new(mem_ctx) ir_dereference_variable(rhs_entry->components[i]); - } else { - new_rhs = new(mem_ctx) - ir_dereference_record(ir->rhs->clone(mem_ctx, NULL), - type->fields.structure[i].name); - } - - ir->insert_before(new(mem_ctx) ir_assignment(new_lhs, - new_rhs, - NULL)); - } - ir->remove(); - } else { - handle_rvalue(&ir->rhs); - split_deref(&ir->lhs); - } - - handle_rvalue(&ir->condition); - - return visit_continue; -} - -bool -do_structure_splitting(exec_list *instructions) -{ - ir_structure_reference_visitor refs; - - visit_list_elements(&refs, instructions); - - /* Trim out variables we can't split. */ - foreach_iter(exec_list_iterator, iter, refs.variable_list) { - variable_entry2 *entry = (variable_entry2 *)iter.get(); - - if (debug) { - printf("structure %s@%p: decl %d, whole_access %d\n", - entry->var->name, (void *) entry->var, entry->declaration, - entry->whole_structure_access); - } - - if (!entry->declaration || entry->whole_structure_access) { - entry->remove(); - } - } - - if (refs.variable_list.is_empty()) - return false; - - void *mem_ctx = ralloc_context(NULL); - - /* Replace the decls of the structures to be split with their split - * components. - */ - foreach_iter(exec_list_iterator, iter, refs.variable_list) { - variable_entry2 *entry = (variable_entry2 *)iter.get(); - const struct glsl_type *type = entry->var->type; - - entry->mem_ctx = ralloc_parent(entry->var); - - entry->components = ralloc_array(mem_ctx, - ir_variable *, - type->length); - - for (unsigned int i = 0; i < entry->var->type->length; i++) { - const char *name = ralloc_asprintf(mem_ctx, "%s_%s", - entry->var->name, - type->fields.structure[i].name); - - entry->components[i] = - new(entry->mem_ctx) ir_variable(type->fields.structure[i].type, - name, - ir_var_temporary); - entry->var->insert_before(entry->components[i]); - } - - entry->var->remove(); - } - - ir_structure_splitting_visitor split(&refs.variable_list); - visit_list_elements(&split, instructions); - - ralloc_free(mem_ctx); - - return true; -} diff --git a/dll/opengl/mesa/src/glsl/opt_swizzle_swizzle.cpp b/dll/opengl/mesa/src/glsl/opt_swizzle_swizzle.cpp deleted file mode 100644 index bc442fa8693..00000000000 --- a/dll/opengl/mesa/src/glsl/opt_swizzle_swizzle.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file opt_swizzle_swizzle.cpp - * - * Eliminates the second swizzle in a swizzle chain. - */ - -#include "ir.h" -#include "ir_visitor.h" -#include "ir_optimization.h" -#include "glsl_types.h" - -class ir_swizzle_swizzle_visitor : public ir_hierarchical_visitor { -public: - ir_swizzle_swizzle_visitor() - { - progress = false; - } - - virtual ir_visitor_status visit_enter(ir_swizzle *); - - bool progress; -}; - -ir_visitor_status -ir_swizzle_swizzle_visitor::visit_enter(ir_swizzle *ir) -{ - int mask2[4]; - - ir_swizzle *swiz2 = ir->val->as_swizzle(); - if (!swiz2) - return visit_continue; - - memset(&mask2, 0, sizeof(mask2)); - if (swiz2->mask.num_components >= 1) - mask2[0] = swiz2->mask.x; - if (swiz2->mask.num_components >= 2) - mask2[1] = swiz2->mask.y; - if (swiz2->mask.num_components >= 3) - mask2[2] = swiz2->mask.z; - if (swiz2->mask.num_components >= 4) - mask2[3] = swiz2->mask.w; - - if (ir->mask.num_components >= 1) - ir->mask.x = mask2[ir->mask.x]; - if (ir->mask.num_components >= 2) - ir->mask.y = mask2[ir->mask.y]; - if (ir->mask.num_components >= 3) - ir->mask.z = mask2[ir->mask.z]; - if (ir->mask.num_components >= 4) - ir->mask.w = mask2[ir->mask.w]; - - ir->val = swiz2->val; - - this->progress = true; - - return visit_continue; -} - -/** - * Does a copy propagation pass on the code present in the instruction stream. - */ -bool -do_swizzle_swizzle(exec_list *instructions) -{ - ir_swizzle_swizzle_visitor v; - - v.run(instructions); - - return v.progress; -} diff --git a/dll/opengl/mesa/src/glsl/opt_tree_grafting.cpp b/dll/opengl/mesa/src/glsl/opt_tree_grafting.cpp deleted file mode 100644 index d32d14e88a9..00000000000 --- a/dll/opengl/mesa/src/glsl/opt_tree_grafting.cpp +++ /dev/null @@ -1,386 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file opt_tree_grafting.cpp - * - * Takes assignments to variables that are dereferenced only once and - * pastes the RHS expression into where the variable is dereferenced. - * - * In the process of various operations like function inlining and - * tertiary op handling, we'll end up with our expression trees having - * been chopped up into a series of assignments of short expressions - * to temps. Other passes like ir_algebraic.cpp would prefer to see - * the deepest expression trees they can to try to optimize them. - * - * This is a lot like copy propagaton. In comparison, copy - * propagation only acts on plain copies, not arbitrary expressions on - * the RHS. Generally, we wouldn't want to go pasting some - * complicated expression everywhere it got used, though, so we don't - * handle expressions in that pass. - * - * The hard part is making sure we don't move an expression across - * some other assignments that would change the value of the - * expression. So we split this into two passes: First, find the - * variables in our scope which are written to once and read once, and - * then go through basic blocks seeing if we find an opportunity to - * move those expressions safely. - */ - -#include "ir.h" -#include "ir_visitor.h" -#include "ir_variable_refcount.h" -#include "ir_basic_block.h" -#include "ir_optimization.h" -#include "glsl_types.h" - -static bool debug = false; - -class ir_tree_grafting_visitor : public ir_hierarchical_visitor { -public: - ir_tree_grafting_visitor(ir_assignment *graft_assign, - ir_variable *graft_var) - { - this->progress = false; - this->graft_assign = graft_assign; - this->graft_var = graft_var; - } - - virtual ir_visitor_status visit_leave(class ir_assignment *); - virtual ir_visitor_status visit_enter(class ir_call *); - virtual ir_visitor_status visit_enter(class ir_expression *); - virtual ir_visitor_status visit_enter(class ir_function *); - virtual ir_visitor_status visit_enter(class ir_function_signature *); - virtual ir_visitor_status visit_enter(class ir_if *); - virtual ir_visitor_status visit_enter(class ir_loop *); - virtual ir_visitor_status visit_enter(class ir_swizzle *); - virtual ir_visitor_status visit_enter(class ir_texture *); - - ir_visitor_status check_graft(ir_instruction *ir, ir_variable *var); - - bool do_graft(ir_rvalue **rvalue); - - bool progress; - ir_variable *graft_var; - ir_assignment *graft_assign; -}; - -struct find_deref_info { - ir_variable *var; - bool found; -}; - -void -dereferences_variable_callback(ir_instruction *ir, void *data) -{ - struct find_deref_info *info = (struct find_deref_info *)data; - ir_dereference_variable *deref = ir->as_dereference_variable(); - - if (deref && deref->var == info->var) - info->found = true; -} - -static bool -dereferences_variable(ir_instruction *ir, ir_variable *var) -{ - struct find_deref_info info; - - info.var = var; - info.found = false; - - visit_tree(ir, dereferences_variable_callback, &info); - - return info.found; -} - -bool -ir_tree_grafting_visitor::do_graft(ir_rvalue **rvalue) -{ - if (!*rvalue) - return false; - - ir_dereference_variable *deref = (*rvalue)->as_dereference_variable(); - - if (!deref || deref->var != this->graft_var) - return false; - - if (debug) { - printf("GRAFTING:\n"); - this->graft_assign->print(); - printf("\n"); - printf("TO:\n"); - (*rvalue)->print(); - printf("\n"); - } - - this->graft_assign->remove(); - *rvalue = this->graft_assign->rhs; - - this->progress = true; - return true; -} - -ir_visitor_status -ir_tree_grafting_visitor::visit_enter(ir_loop *ir) -{ - (void)ir; - /* Do not traverse into the body of the loop since that is a - * different basic block. - */ - return visit_stop; -} - -/** - * Check if we can continue grafting after writing to a variable. If the - * expression we're trying to graft references the variable, we must stop. - * - * \param ir An instruction that writes to a variable. - * \param var The variable being updated. - */ -ir_visitor_status -ir_tree_grafting_visitor::check_graft(ir_instruction *ir, ir_variable *var) -{ - if (dereferences_variable(this->graft_assign->rhs, var)) { - if (debug) { - printf("graft killed by: "); - ir->print(); - printf("\n"); - } - return visit_stop; - } - - return visit_continue; -} - -ir_visitor_status -ir_tree_grafting_visitor::visit_leave(ir_assignment *ir) -{ - if (do_graft(&ir->rhs) || - do_graft(&ir->condition)) - return visit_stop; - - /* If this assignment updates a variable used in the assignment - * we're trying to graft, then we're done. - */ - return check_graft(ir, ir->lhs->variable_referenced()); -} - -ir_visitor_status -ir_tree_grafting_visitor::visit_enter(ir_function *ir) -{ - (void) ir; - return visit_continue_with_parent; -} - -ir_visitor_status -ir_tree_grafting_visitor::visit_enter(ir_function_signature *ir) -{ - (void)ir; - return visit_continue_with_parent; -} - -ir_visitor_status -ir_tree_grafting_visitor::visit_enter(ir_call *ir) -{ - exec_list_iterator sig_iter = ir->get_callee()->parameters.iterator(); - /* Reminder: iterating ir_call iterates its parameters. */ - foreach_iter(exec_list_iterator, iter, *ir) { - ir_variable *sig_param = (ir_variable *)sig_iter.get(); - ir_rvalue *ir = (ir_rvalue *)iter.get(); - ir_rvalue *new_ir = ir; - - if (sig_param->mode != ir_var_in && sig_param->mode != ir_var_const_in) { - if (check_graft(ir, sig_param) == visit_stop) - return visit_stop; - continue; - } - - if (do_graft(&new_ir)) { - ir->replace_with(new_ir); - return visit_stop; - } - sig_iter.next(); - } - - return visit_continue; -} - -ir_visitor_status -ir_tree_grafting_visitor::visit_enter(ir_expression *ir) -{ - for (unsigned int i = 0; i < ir->get_num_operands(); i++) { - if (do_graft(&ir->operands[i])) - return visit_stop; - } - - return visit_continue; -} - -ir_visitor_status -ir_tree_grafting_visitor::visit_enter(ir_if *ir) -{ - if (do_graft(&ir->condition)) - return visit_stop; - - /* Do not traverse into the body of the if-statement since that is a - * different basic block. - */ - return visit_continue_with_parent; -} - -ir_visitor_status -ir_tree_grafting_visitor::visit_enter(ir_swizzle *ir) -{ - if (do_graft(&ir->val)) - return visit_stop; - - return visit_continue; -} - -ir_visitor_status -ir_tree_grafting_visitor::visit_enter(ir_texture *ir) -{ - if (do_graft(&ir->coordinate) || - do_graft(&ir->projector) || - do_graft(&ir->offset) || - do_graft(&ir->shadow_comparitor)) - return visit_stop; - - switch (ir->op) { - case ir_tex: - break; - case ir_txb: - if (do_graft(&ir->lod_info.bias)) - return visit_stop; - break; - case ir_txf: - case ir_txl: - case ir_txs: - if (do_graft(&ir->lod_info.lod)) - return visit_stop; - break; - case ir_txd: - if (do_graft(&ir->lod_info.grad.dPdx) || - do_graft(&ir->lod_info.grad.dPdy)) - return visit_stop; - break; - } - - return visit_continue; -} - -struct tree_grafting_info { - ir_variable_refcount_visitor *refs; - bool progress; -}; - -static bool -try_tree_grafting(ir_assignment *start, - ir_variable *lhs_var, - ir_instruction *bb_last) -{ - ir_tree_grafting_visitor v(start, lhs_var); - - if (debug) { - printf("trying to graft: "); - lhs_var->print(); - printf("\n"); - } - - for (ir_instruction *ir = (ir_instruction *)start->next; - ir != bb_last->next; - ir = (ir_instruction *)ir->next) { - - if (debug) { - printf("- "); - ir->print(); - printf("\n"); - } - - ir_visitor_status s = ir->accept(&v); - if (s == visit_stop) - return v.progress; - } - - return false; -} - -static void -tree_grafting_basic_block(ir_instruction *bb_first, - ir_instruction *bb_last, - void *data) -{ - struct tree_grafting_info *info = (struct tree_grafting_info *)data; - ir_instruction *ir, *next; - - for (ir = bb_first, next = (ir_instruction *)ir->next; - ir != bb_last->next; - ir = next, next = (ir_instruction *)ir->next) { - ir_assignment *assign = ir->as_assignment(); - - if (!assign) - continue; - - ir_variable *lhs_var = assign->whole_variable_written(); - if (!lhs_var) - continue; - - if (lhs_var->mode == ir_var_out || - lhs_var->mode == ir_var_inout) - continue; - - variable_entry *entry = info->refs->get_variable_entry(lhs_var); - - if (!entry->declaration || - entry->assigned_count != 1 || - entry->referenced_count != 2) - continue; - - assert(assign == entry->assign); - - /* Found a possibly graftable assignment. Now, walk through the - * rest of the BB seeing if the deref is here, and if nothing interfered with - * pasting its expression's values in between. - */ - info->progress |= try_tree_grafting(assign, lhs_var, bb_last); - } -} - -/** - * Does a copy propagation pass on the code present in the instruction stream. - */ -bool -do_tree_grafting(exec_list *instructions) -{ - ir_variable_refcount_visitor refs; - struct tree_grafting_info info; - - info.progress = false; - info.refs = &refs; - - visit_list_elements(info.refs, instructions); - - call_for_basic_blocks(instructions, tree_grafting_basic_block, &info); - - return info.progress; -} diff --git a/dll/opengl/mesa/src/glsl/program.h b/dll/opengl/mesa/src/glsl/program.h deleted file mode 100644 index 437ca1462fa..00000000000 --- a/dll/opengl/mesa/src/glsl/program.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. - * Copyright (C) 2009 VMware, Inc. All Rights Reserved. - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#include "main/core.h" - -extern void -link_shaders(struct gl_context *ctx, struct gl_shader_program *prog); - -extern void -linker_error(gl_shader_program *prog, const char *fmt, ...) - PRINTFLIKE(2, 3); - -extern void -linker_warning(gl_shader_program *prog, const char *fmt, ...) - PRINTFLIKE(2, 3); diff --git a/dll/opengl/mesa/src/glsl/ralloc.c b/dll/opengl/mesa/src/glsl/ralloc.c deleted file mode 100644 index 51a92fc1f69..00000000000 --- a/dll/opengl/mesa/src/glsl/ralloc.c +++ /dev/null @@ -1,489 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include -#include -#include -#include -#include -#include - -/* Android defines SIZE_MAX in limits.h, instead of the standard stdint.h */ -#ifdef ANDROID -#include -#endif - -/* Some versions of MinGW are missing _vscprintf's declaration, although they - * still provide the symbol in the import library. */ -#ifdef __MINGW32__ -_CRTIMP int _vscprintf(const char *format, va_list argptr); -#endif - -#include "ralloc.h" - -#ifdef __GNUC__ -#define likely(x) __builtin_expect(!!(x),1) -#define unlikely(x) __builtin_expect(!!(x),0) -#else -#define likely(x) !!(x) -#define unlikely(x) !!(x) -#endif - -#ifndef va_copy -#ifdef __va_copy -#define va_copy(dest, src) __va_copy((dest), (src)) -#else -#define va_copy(dest, src) (dest) = (src) -#endif -#endif - -#define CANARY 0x5A1106 - -struct ralloc_header -{ - /* A canary value used to determine whether a pointer is ralloc'd. */ - unsigned canary; - - struct ralloc_header *parent; - - /* The first child (head of a linked list) */ - struct ralloc_header *child; - - /* Linked list of siblings */ - struct ralloc_header *prev; - struct ralloc_header *next; - - void (*destructor)(void *); -}; - -typedef struct ralloc_header ralloc_header; - -static void unlink_block(ralloc_header *info); -static void unsafe_free(ralloc_header *info); - -static ralloc_header * -get_header(const void *ptr) -{ - ralloc_header *info = (ralloc_header *) (((char *) ptr) - - sizeof(ralloc_header)); - assert(info->canary == CANARY); - return info; -} - -#define PTR_FROM_HEADER(info) (((char *) info) + sizeof(ralloc_header)) - -static void -add_child(ralloc_header *parent, ralloc_header *info) -{ - if (parent != NULL) { - info->parent = parent; - info->next = parent->child; - parent->child = info; - - if (info->next != NULL) - info->next->prev = info; - } -} - -void * -ralloc_context(const void *ctx) -{ - return ralloc_size(ctx, 0); -} - -void * -ralloc_size(const void *ctx, size_t size) -{ - void *block = calloc(1, size + sizeof(ralloc_header)); - - ralloc_header *info = (ralloc_header *) block; - ralloc_header *parent = ctx != NULL ? get_header(ctx) : NULL; - - add_child(parent, info); - - info->canary = CANARY; - - return PTR_FROM_HEADER(info); -} - -void * -rzalloc_size(const void *ctx, size_t size) -{ - void *ptr = ralloc_size(ctx, size); - if (likely(ptr != NULL)) - memset(ptr, 0, size); - return ptr; -} - -/* helper function - assumes ptr != NULL */ -static void * -resize(void *ptr, size_t size) -{ - ralloc_header *child, *old, *info; - - old = get_header(ptr); - info = realloc(old, size + sizeof(ralloc_header)); - - if (info == NULL) - return NULL; - - /* Update parent and sibling's links to the reallocated node. */ - if (info != old && info->parent != NULL) { - if (info->parent->child == old) - info->parent->child = info; - - if (info->prev != NULL) - info->prev->next = info; - - if (info->next != NULL) - info->next->prev = info; - } - - /* Update child->parent links for all children */ - for (child = info->child; child != NULL; child = child->next) - child->parent = info; - - return PTR_FROM_HEADER(info); -} - -void * -reralloc_size(const void *ctx, void *ptr, size_t size) -{ - if (unlikely(ptr == NULL)) - return ralloc_size(ctx, size); - - assert(ralloc_parent(ptr) == ctx); - return resize(ptr, size); -} - -void * -ralloc_array_size(const void *ctx, size_t size, unsigned count) -{ - if (count > SIZE_MAX/size) - return NULL; - - return ralloc_size(ctx, size * count); -} - -void * -rzalloc_array_size(const void *ctx, size_t size, unsigned count) -{ - if (count > SIZE_MAX/size) - return NULL; - - return rzalloc_size(ctx, size * count); -} - -void * -reralloc_array_size(const void *ctx, void *ptr, size_t size, unsigned count) -{ - if (count > SIZE_MAX/size) - return NULL; - - return reralloc_size(ctx, ptr, size * count); -} - -void -ralloc_free(void *ptr) -{ - ralloc_header *info; - - if (ptr == NULL) - return; - - info = get_header(ptr); - unlink_block(info); - unsafe_free(info); -} - -static void -unlink_block(ralloc_header *info) -{ - /* Unlink from parent & siblings */ - if (info->parent != NULL) { - if (info->parent->child == info) - info->parent->child = info->next; - - if (info->prev != NULL) - info->prev->next = info->next; - - if (info->next != NULL) - info->next->prev = info->prev; - } - info->parent = NULL; - info->prev = NULL; - info->next = NULL; -} - -static void -unsafe_free(ralloc_header *info) -{ - /* Recursively free any children...don't waste time unlinking them. */ - ralloc_header *temp; - while (info->child != NULL) { - temp = info->child; - info->child = temp->next; - unsafe_free(temp); - } - - /* Free the block itself. Call the destructor first, if any. */ - if (info->destructor != NULL) - info->destructor(PTR_FROM_HEADER(info)); - - free(info); -} - -void -ralloc_steal(const void *new_ctx, void *ptr) -{ - ralloc_header *info, *parent; - - if (unlikely(ptr == NULL)) - return; - - info = get_header(ptr); - parent = get_header(new_ctx); - - unlink_block(info); - - add_child(parent, info); -} - -void * -ralloc_parent(const void *ptr) -{ - ralloc_header *info; - - if (unlikely(ptr == NULL)) - return NULL; - - info = get_header(ptr); - return info->parent ? PTR_FROM_HEADER(info->parent) : NULL; -} - -static void *autofree_context = NULL; - -static void -autofree(void) -{ - ralloc_free(autofree_context); -} - -void * -ralloc_autofree_context(void) -{ - if (unlikely(autofree_context == NULL)) { - autofree_context = ralloc_context(NULL); - atexit(autofree); - } - return autofree_context; -} - -void -ralloc_set_destructor(const void *ptr, void(*destructor)(void *)) -{ - ralloc_header *info = get_header(ptr); - info->destructor = destructor; -} - -char * -ralloc_strdup(const void *ctx, const char *str) -{ - size_t n; - char *ptr; - - if (unlikely(str == NULL)) - return NULL; - - n = strlen(str); - ptr = ralloc_array(ctx, char, n + 1); - memcpy(ptr, str, n); - ptr[n] = '\0'; - return ptr; -} - -char * -ralloc_strndup(const void *ctx, const char *str, size_t max) -{ - size_t n; - char *ptr; - - if (unlikely(str == NULL)) - return NULL; - - n = strlen(str); - if (n > max) - n = max; - - ptr = ralloc_array(ctx, char, n + 1); - memcpy(ptr, str, n); - ptr[n] = '\0'; - return ptr; -} - -/* helper routine for strcat/strncat - n is the exact amount to copy */ -static bool -cat(char **dest, const char *str, size_t n) -{ - char *both; - size_t existing_length; - assert(dest != NULL && *dest != NULL); - - existing_length = strlen(*dest); - both = resize(*dest, existing_length + n + 1); - if (unlikely(both == NULL)) - return false; - - memcpy(both + existing_length, str, n); - both[existing_length + n] = '\0'; - - *dest = both; - return true; -} - - -bool -ralloc_strcat(char **dest, const char *str) -{ - return cat(dest, str, strlen(str)); -} - -bool -ralloc_strncat(char **dest, const char *str, size_t n) -{ - /* Clamp n to the string length */ - size_t str_length = strlen(str); - if (str_length < n) - n = str_length; - - return cat(dest, str, n); -} - -char * -ralloc_asprintf(const void *ctx, const char *fmt, ...) -{ - char *ptr; - va_list args; - va_start(args, fmt); - ptr = ralloc_vasprintf(ctx, fmt, args); - va_end(args); - return ptr; -} - -/* Return the length of the string that would be generated by a printf-style - * format and argument list, not including the \0 byte. - */ -static size_t -printf_length(const char *fmt, va_list untouched_args) -{ - int size; - char junk; - - /* Make a copy of the va_list so the original caller can still use it */ - va_list args; - va_copy(args, untouched_args); - -#ifdef _WIN32 - /* We need to use _vcsprintf to calculate the size as vsnprintf returns -1 - * if the number of characters to write is greater than count. - */ - size = _vscprintf(fmt, args); - (void)junk; -#else - size = vsnprintf(&junk, 1, fmt, args); -#endif - assert(size >= 0); - - va_end(args); - - return size; -} - -char * -ralloc_vasprintf(const void *ctx, const char *fmt, va_list args) -{ - size_t size = printf_length(fmt, args) + 1; - - char *ptr = ralloc_size(ctx, size); - if (ptr != NULL) - vsnprintf(ptr, size, fmt, args); - - return ptr; -} - -bool -ralloc_asprintf_append(char **str, const char *fmt, ...) -{ - bool success; - va_list args; - va_start(args, fmt); - success = ralloc_vasprintf_append(str, fmt, args); - va_end(args); - return success; -} - -bool -ralloc_vasprintf_append(char **str, const char *fmt, va_list args) -{ - size_t existing_length; - assert(str != NULL); - existing_length = *str ? strlen(*str) : 0; - return ralloc_vasprintf_rewrite_tail(str, existing_length, fmt, args); -} - -bool -ralloc_asprintf_rewrite_tail(char **str, size_t start, const char *fmt, ...) -{ - bool success; - va_list args; - va_start(args, fmt); - success = ralloc_vasprintf_rewrite_tail(str, start, fmt, args); - va_end(args); - return success; -} - -bool -ralloc_vasprintf_rewrite_tail(char **str, size_t start, const char *fmt, - va_list args) -{ - size_t new_length; - char *ptr; - - assert(str != NULL); - - if (unlikely(*str == NULL)) { - // Assuming a NULL context is probably bad, but it's expected behavior. - *str = ralloc_vasprintf(NULL, fmt, args); - return true; - } - - new_length = printf_length(fmt, args); - - ptr = resize(*str, start + new_length + 1); - if (unlikely(ptr == NULL)) - return false; - - vsnprintf(ptr + start, new_length + 1, fmt, args); - *str = ptr; - return true; -} diff --git a/dll/opengl/mesa/src/glsl/ralloc.h b/dll/opengl/mesa/src/glsl/ralloc.h deleted file mode 100644 index 1324f3466bb..00000000000 --- a/dll/opengl/mesa/src/glsl/ralloc.h +++ /dev/null @@ -1,402 +0,0 @@ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file ralloc.h - * - * ralloc: a recursive memory allocator - * - * The ralloc memory allocator creates a hierarchy of allocated - * objects. Every allocation is in reference to some parent, and - * every allocated object can in turn be used as the parent of a - * subsequent allocation. This allows for extremely convenient - * discarding of an entire tree/sub-tree of allocations by calling - * ralloc_free on any particular object to free it and all of its - * children. - * - * The conceptual working of ralloc was directly inspired by Andrew - * Tridgell's talloc, but ralloc is an independent implementation - * released under the MIT license and tuned for Mesa. - * - * The talloc implementation is available under the GNU Lesser - * General Public License (GNU LGPL), version 3 or later. It is - * more sophisticated than ralloc in that it includes reference - * counting and debugging features. See: http://talloc.samba.org/ - */ - -#ifndef RALLOC_H -#define RALLOC_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -/** - * \def ralloc(ctx, type) - * Allocate a new object chained off of the given context. - * - * This is equivalent to: - * \code - * ((type *) ralloc_size(ctx, sizeof(type)) - * \endcode - */ -#define ralloc(ctx, type) ((type *) ralloc_size(ctx, sizeof(type))) - -/** - * \def rzalloc(ctx, type) - * Allocate a new object out of the given context and initialize it to zero. - * - * This is equivalent to: - * \code - * ((type *) rzalloc_size(ctx, sizeof(type)) - * \endcode - */ -#define rzalloc(ctx, type) ((type *) rzalloc_size(ctx, sizeof(type))) - -/** - * Allocate a new ralloc context. - * - * While any ralloc'd pointer can be used as a context, sometimes it is useful - * to simply allocate a context with no associated memory. - * - * It is equivalent to: - * \code - * ((type *) ralloc_size(ctx, 0) - * \endcode - */ -void *ralloc_context(const void *ctx); - -/** - * Allocate memory chained off of the given context. - * - * This is the core allocation routine which is used by all others. It - * simply allocates storage for \p size bytes and returns the pointer, - * similar to \c malloc. - */ -void *ralloc_size(const void *ctx, size_t size); - -/** - * Allocate zero-initialized memory chained off of the given context. - * - * This is similar to \c calloc with a size of 1. - */ -void *rzalloc_size(const void *ctx, size_t size); - -/** - * Resize a piece of ralloc-managed memory, preserving data. - * - * Similar to \c realloc. Unlike C89, passing 0 for \p size does not free the - * memory. Instead, it resizes it to a 0-byte ralloc context, just like - * calling ralloc_size(ctx, 0). This is different from talloc. - * - * \param ctx The context to use for new allocation. If \p ptr != NULL, - * it must be the same as ralloc_parent(\p ptr). - * \param ptr Pointer to the memory to be resized. May be NULL. - * \param size The amount of memory to allocate, in bytes. - */ -void *reralloc_size(const void *ctx, void *ptr, size_t size); - -/// \defgroup array Array Allocators @{ - -/** - * \def ralloc_array(ctx, type, count) - * Allocate an array of objects chained off the given context. - * - * Similar to \c calloc, but does not initialize the memory to zero. - * - * More than a convenience function, this also checks for integer overflow when - * multiplying \c sizeof(type) and \p count. This is necessary for security. - * - * This is equivalent to: - * \code - * ((type *) ralloc_array_size(ctx, sizeof(type), count) - * \endcode - */ -#define ralloc_array(ctx, type, count) \ - ((type *) ralloc_array_size(ctx, sizeof(type), count)) - -/** - * \def rzalloc_array(ctx, type, count) - * Allocate a zero-initialized array chained off the given context. - * - * Similar to \c calloc. - * - * More than a convenience function, this also checks for integer overflow when - * multiplying \c sizeof(type) and \p count. This is necessary for security. - * - * This is equivalent to: - * \code - * ((type *) rzalloc_array_size(ctx, sizeof(type), count) - * \endcode - */ -#define rzalloc_array(ctx, type, count) \ - ((type *) rzalloc_array_size(ctx, sizeof(type), count)) - -/** - * \def reralloc(ctx, ptr, type, count) - * Resize a ralloc-managed array, preserving data. - * - * Similar to \c realloc. Unlike C89, passing 0 for \p size does not free the - * memory. Instead, it resizes it to a 0-byte ralloc context, just like - * calling ralloc_size(ctx, 0). This is different from talloc. - * - * More than a convenience function, this also checks for integer overflow when - * multiplying \c sizeof(type) and \p count. This is necessary for security. - * - * \param ctx The context to use for new allocation. If \p ptr != NULL, - * it must be the same as ralloc_parent(\p ptr). - * \param ptr Pointer to the array to be resized. May be NULL. - * \param type The element type. - * \param count The number of elements to allocate. - */ -#define reralloc(ctx, ptr, type, count) \ - ((type *) reralloc_array_size(ctx, ptr, sizeof(type), count)) - -/** - * Allocate memory for an array chained off the given context. - * - * Similar to \c calloc, but does not initialize the memory to zero. - * - * More than a convenience function, this also checks for integer overflow when - * multiplying \p size and \p count. This is necessary for security. - */ -void *ralloc_array_size(const void *ctx, size_t size, unsigned count); - -/** - * Allocate a zero-initialized array chained off the given context. - * - * Similar to \c calloc. - * - * More than a convenience function, this also checks for integer overflow when - * multiplying \p size and \p count. This is necessary for security. - */ -void *rzalloc_array_size(const void *ctx, size_t size, unsigned count); - -/** - * Resize a ralloc-managed array, preserving data. - * - * Similar to \c realloc. Unlike C89, passing 0 for \p size does not free the - * memory. Instead, it resizes it to a 0-byte ralloc context, just like - * calling ralloc_size(ctx, 0). This is different from talloc. - * - * More than a convenience function, this also checks for integer overflow when - * multiplying \c sizeof(type) and \p count. This is necessary for security. - * - * \param ctx The context to use for new allocation. If \p ptr != NULL, - * it must be the same as ralloc_parent(\p ptr). - * \param ptr Pointer to the array to be resized. May be NULL. - * \param size The size of an individual element. - * \param count The number of elements to allocate. - * - * \return True unless allocation failed. - */ -void *reralloc_array_size(const void *ctx, void *ptr, size_t size, - unsigned count); -/// @} - -/** - * Free a piece of ralloc-managed memory. - * - * This will also free the memory of any children allocated this context. - */ -void ralloc_free(void *ptr); - -/** - * "Steal" memory from one context, changing it to another. - * - * This changes \p ptr's context to \p new_ctx. This is quite useful if - * memory is allocated out of a temporary context. - */ -void ralloc_steal(const void *new_ctx, void *ptr); - -/** - * Return the given pointer's ralloc context. - */ -void *ralloc_parent(const void *ptr); - -/** - * Return a context whose memory will be automatically freed at program exit. - * - * The first call to this function creates a context and registers a handler - * to free it using \c atexit. This may cause trouble if used in a library - * loaded with \c dlopen. - */ -void *ralloc_autofree_context(void); - -/** - * Set a callback to occur just before an object is freed. - */ -void ralloc_set_destructor(const void *ptr, void(*destructor)(void *)); - -/// \defgroup array String Functions @{ -/** - * Duplicate a string, allocating the memory from the given context. - */ -char *ralloc_strdup(const void *ctx, const char *str); - -/** - * Duplicate a string, allocating the memory from the given context. - * - * Like \c strndup, at most \p n characters are copied. If \p str is longer - * than \p n characters, \p n are copied, and a termining \c '\0' byte is added. - */ -char *ralloc_strndup(const void *ctx, const char *str, size_t n); - -/** - * Concatenate two strings, allocating the necessary space. - * - * This appends \p str to \p *dest, similar to \c strcat, using ralloc_resize - * to expand \p *dest to the appropriate size. \p dest will be updated to the - * new pointer unless allocation fails. - * - * The result will always be null-terminated. - * - * \return True unless allocation failed. - */ -bool ralloc_strcat(char **dest, const char *str); - -/** - * Concatenate two strings, allocating the necessary space. - * - * This appends at most \p n bytes of \p str to \p *dest, using ralloc_resize - * to expand \p *dest to the appropriate size. \p dest will be updated to the - * new pointer unless allocation fails. - * - * The result will always be null-terminated; \p str does not need to be null - * terminated if it is longer than \p n. - * - * \return True unless allocation failed. - */ -bool ralloc_strncat(char **dest, const char *str, size_t n); - -/** - * Print to a string. - * - * This is analogous to \c sprintf, but allocates enough space (using \p ctx - * as the context) for the resulting string. - * - * \return The newly allocated string. - */ -char *ralloc_asprintf (const void *ctx, const char *fmt, ...); - -/** - * Print to a string, given a va_list. - * - * This is analogous to \c vsprintf, but allocates enough space (using \p ctx - * as the context) for the resulting string. - * - * \return The newly allocated string. - */ -char *ralloc_vasprintf(const void *ctx, const char *fmt, va_list args); - -/** - * Rewrite the tail of an existing string, starting at a given index. - * - * Overwrites the contents of *str starting at \p start with newly formatted - * text, including a new null-terminator. Allocates more memory as necessary. - * - * This can be used to append formatted text when the length of the existing - * string is already known, saving a strlen() call. - * - * \sa ralloc_asprintf_append - * - * \param str The string to be updated. - * \param start The index to start appending new data at. - * \param fmt A printf-style formatting string - * - * \p str will be updated to the new pointer unless allocation fails. - * - * \return True unless allocation failed. - */ -bool ralloc_asprintf_rewrite_tail(char **str, size_t start, - const char *fmt, ...); - -/** - * Rewrite the tail of an existing string, starting at a given index. - * - * Overwrites the contents of *str starting at \p start with newly formatted - * text, including a new null-terminator. Allocates more memory as necessary. - * - * This can be used to append formatted text when the length of the existing - * string is already known, saving a strlen() call. - * - * \sa ralloc_vasprintf_append - * - * \param str The string to be updated. - * \param start The index to start appending new data at. - * \param fmt A printf-style formatting string - * \param args A va_list containing the data to be formatted - * - * \p str will be updated to the new pointer unless allocation fails. - * - * \return True unless allocation failed. - */ -bool ralloc_vasprintf_rewrite_tail(char **str, size_t start, const char *fmt, - va_list args); - -/** - * Append formatted text to the supplied string. - * - * This is equivalent to - * \code - * ralloc_asprintf_rewrite_tail(str, strlen(*str), fmt, ...) - * \endcode - * - * \sa ralloc_asprintf - * \sa ralloc_asprintf_rewrite_tail - * \sa ralloc_strcat - * - * \p str will be updated to the new pointer unless allocation fails. - * - * \return True unless allocation failed. - */ -bool ralloc_asprintf_append (char **str, const char *fmt, ...); - -/** - * Append formatted text to the supplied string, given a va_list. - * - * This is equivalent to - * \code - * ralloc_vasprintf_rewrite_tail(str, strlen(*str), fmt, args) - * \endcode - * - * \sa ralloc_vasprintf - * \sa ralloc_vasprintf_rewrite_tail - * \sa ralloc_strcat - * - * \p str will be updated to the new pointer unless allocation fails. - * - * \return True unless allocation failed. - */ -bool ralloc_vasprintf_append(char **str, const char *fmt, va_list args); -/// @} - -#ifdef __cplusplus -} /* end of extern "C" */ -#endif - -#endif diff --git a/dll/opengl/mesa/src/glsl/s_expression.cpp b/dll/opengl/mesa/src/glsl/s_expression.cpp deleted file mode 100644 index 57de9d334a2..00000000000 --- a/dll/opengl/mesa/src/glsl/s_expression.cpp +++ /dev/null @@ -1,219 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#include -#include -#include "s_expression.h" - -s_symbol::s_symbol(const char *str, size_t n) -{ - /* Assume the given string is already nul-terminated and in memory that - * will live as long as this node. - */ - assert(str[n] == '\0'); - this->str = str; -} - -s_list::s_list() -{ -} - -static void -skip_whitespace(const char *&src, char *&symbol_buffer) -{ - size_t n = strspn(src, " \v\t\r\n"); - src += n; - symbol_buffer += n; - /* Also skip Scheme-style comments: semi-colon 'til end of line */ - if (src[0] == ';') { - n = strcspn(src, "\n"); - src += n; - symbol_buffer += n; - skip_whitespace(src, symbol_buffer); - } -} - -static s_expression * -read_atom(void *ctx, const char *&src, char *&symbol_buffer) -{ - s_expression *expr = NULL; - - skip_whitespace(src, symbol_buffer); - - size_t n = strcspn(src, "( \v\t\r\n);"); - if (n == 0) - return NULL; // no atom - - // Check for the special symbol '+INF', which means +Infinity. Note: C99 - // requires strtod to parse '+INF' as +Infinity, but we still support some - // non-C99-compliant compilers (e.g. MSVC). - if (n == 4 && strncmp(src, "+INF", 4) == 0) { - expr = new(ctx) s_float(std::numeric_limits::infinity()); - } else { - // Check if the atom is a number. - char *float_end = NULL; - double f = glsl_strtod(src, &float_end); - if (float_end != src) { - char *int_end = NULL; - int i = strtol(src, &int_end, 10); - // If strtod matched more characters, it must have a decimal part - if (float_end > int_end) - expr = new(ctx) s_float(f); - else - expr = new(ctx) s_int(i); - } else { - // Not a number; return a symbol. - symbol_buffer[n] = '\0'; - expr = new(ctx) s_symbol(symbol_buffer, n); - } - } - - src += n; - symbol_buffer += n; - - return expr; -} - -static s_expression * -__read_expression(void *ctx, const char *&src, char *&symbol_buffer) -{ - s_expression *atom = read_atom(ctx, src, symbol_buffer); - if (atom != NULL) - return atom; - - skip_whitespace(src, symbol_buffer); - if (src[0] == '(') { - ++src; - ++symbol_buffer; - - s_list *list = new(ctx) s_list; - s_expression *expr; - - while ((expr = __read_expression(ctx, src, symbol_buffer)) != NULL) { - list->subexpressions.push_tail(expr); - } - skip_whitespace(src, symbol_buffer); - if (src[0] != ')') { - printf("Unclosed expression (check your parenthesis).\n"); - return NULL; - } - ++src; - ++symbol_buffer; - return list; - } - return NULL; -} - -s_expression * -s_expression::read_expression(void *ctx, const char *&src) -{ - assert(src != NULL); - - /* When we encounter a Symbol, we need to save a nul-terminated copy of - * the string. However, ralloc_strndup'ing every individual Symbol is - * extremely expensive. We could avoid this by simply overwriting the - * next character (guaranteed to be whitespace, parens, or semicolon) with - * a nul-byte. But overwriting non-whitespace would mess up parsing. - * - * So, just copy the whole buffer ahead of time. Walk both, leaving the - * original source string unmodified, and altering the copy to contain the - * necessary nul-bytes whenever we encounter a symbol. - */ - char *symbol_buffer = ralloc_strdup(ctx, src); - return __read_expression(ctx, src, symbol_buffer); -} - -void s_int::print() -{ - printf("%d", this->val); -} - -void s_float::print() -{ - printf("%f", this->val); -} - -void s_symbol::print() -{ - printf("%s", this->str); -} - -void s_list::print() -{ - printf("("); - foreach_iter(exec_list_iterator, it, this->subexpressions) { - s_expression *expr = (s_expression*) it.get(); - expr->print(); - if (!expr->next->is_tail_sentinel()) - printf(" "); - } - printf(")"); -} - -// -------------------------------------------------- - -bool -s_pattern::match(s_expression *expr) -{ - switch (type) - { - case EXPR: *p_expr = expr; break; - case LIST: if (expr->is_list()) *p_list = (s_list *) expr; break; - case SYMBOL: if (expr->is_symbol()) *p_symbol = (s_symbol *) expr; break; - case NUMBER: if (expr->is_number()) *p_number = (s_number *) expr; break; - case INT: if (expr->is_int()) *p_int = (s_int *) expr; break; - case STRING: - s_symbol *sym = SX_AS_SYMBOL(expr); - if (sym != NULL && strcmp(sym->value(), literal) == 0) - return true; - return false; - }; - - return *p_expr == expr; -} - -bool -s_match(s_expression *top, unsigned n, s_pattern *pattern, bool partial) -{ - s_list *list = SX_AS_LIST(top); - if (list == NULL) - return false; - - unsigned i = 0; - foreach_iter(exec_list_iterator, it, list->subexpressions) { - if (i >= n) - return partial; /* More actual items than the pattern expected */ - - s_expression *expr = (s_expression *) it.get(); - if (expr == NULL || !pattern[i].match(expr)) - return false; - - i++; - } - - if (i < n) - return false; /* Less actual items than the pattern expected */ - - return true; -} diff --git a/dll/opengl/mesa/src/glsl/s_expression.h b/dll/opengl/mesa/src/glsl/s_expression.h deleted file mode 100644 index 642af19b439..00000000000 --- a/dll/opengl/mesa/src/glsl/s_expression.h +++ /dev/null @@ -1,180 +0,0 @@ -/* -*- c++ -*- */ -/* - * Copyright © 2010 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#pragma once -#ifndef S_EXPRESSION_H -#define S_EXPRESSION_H - -#include "main/core.h" /* for Elements */ -#include "strtod.h" -#include "list.h" - -/* Type-safe downcasting macros (also safe to pass NULL) */ -#define SX_AS_(t,x) ((x) && ((s_expression*) x)->is_##t()) ? ((s_##t*) (x)) \ - : NULL -#define SX_AS_LIST(x) SX_AS_(list, x) -#define SX_AS_SYMBOL(x) SX_AS_(symbol, x) -#define SX_AS_NUMBER(x) SX_AS_(number, x) -#define SX_AS_INT(x) SX_AS_(int, x) - -/* Pattern matching macros */ -#define MATCH(list, pat) s_match(list, Elements(pat), pat, false) -#define PARTIAL_MATCH(list, pat) s_match(list, Elements(pat), pat, true) - -/* For our purposes, S-Expressions are: - * - - * - - * - symbol - * - (expr1 expr2 ... exprN) where exprN is an S-Expression - * - * Unlike LISP/Scheme, we do not support (foo . bar) pairs. - */ -class s_expression : public exec_node -{ -public: - /** - * Read an S-Expression from the given string. - * Advances the supplied pointer to just after the expression read. - * - * Any allocation will be performed with 'ctx' as the ralloc owner. - */ - static s_expression *read_expression(void *ctx, const char *&src); - - /** - * Print out an S-Expression. Useful for debugging. - */ - virtual void print() = 0; - - virtual bool is_list() const { return false; } - virtual bool is_symbol() const { return false; } - virtual bool is_number() const { return false; } - virtual bool is_int() const { return false; } - -protected: - s_expression() { } -}; - -/* Atoms */ - -class s_number : public s_expression -{ -public: - bool is_number() const { return true; } - - virtual float fvalue() = 0; - -protected: - s_number() { } -}; - -class s_int : public s_number -{ -public: - s_int(int x) : val(x) { } - - bool is_int() const { return true; } - - float fvalue() { return float(this->val); } - int value() { return this->val; } - - void print(); - -private: - int val; -}; - -class s_float : public s_number -{ -public: - s_float(float x) : val(x) { } - - float fvalue() { return this->val; } - - void print(); - -private: - float val; -}; - -class s_symbol : public s_expression -{ -public: - s_symbol(const char *, size_t); - - bool is_symbol() const { return true; } - - const char *value() { return this->str; } - - void print(); - -private: - const char *str; -}; - -/* Lists of expressions: (expr1 ... exprN) */ -class s_list : public s_expression -{ -public: - s_list(); - - virtual bool is_list() const { return true; } - - void print(); - - exec_list subexpressions; -}; - -// ------------------------------------------------------------ - -/** - * Part of a pattern to match - essentially a record holding a pointer to the - * storage for the component to match, along with the appropriate type. - */ -class s_pattern { -public: - s_pattern(s_expression *&s) : p_expr(&s), type(EXPR) { } - s_pattern(s_list *&s) : p_list(&s), type(LIST) { } - s_pattern(s_symbol *&s) : p_symbol(&s), type(SYMBOL) { } - s_pattern(s_number *&s) : p_number(&s), type(NUMBER) { } - s_pattern(s_int *&s) : p_int(&s), type(INT) { } - s_pattern(const char *str) : literal(str), type(STRING) { } - - bool match(s_expression *expr); - -private: - union { - s_expression **p_expr; - s_list **p_list; - s_symbol **p_symbol; - s_number **p_number; - s_int **p_int; - const char *literal; - }; - enum { EXPR, LIST, SYMBOL, NUMBER, INT, STRING } type; -}; - -bool -s_match(s_expression *top, unsigned n, s_pattern *pattern, bool partial); - -#endif /* S_EXPRESSION_H */ diff --git a/dll/opengl/mesa/src/glsl/standalone_scaffolding.cpp b/dll/opengl/mesa/src/glsl/standalone_scaffolding.cpp deleted file mode 100644 index 24cc64ad97b..00000000000 --- a/dll/opengl/mesa/src/glsl/standalone_scaffolding.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright © 2011 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/* This file declares stripped-down versions of functions that - * normally exist outside of the glsl folder, so that they can be used - * when running the GLSL compiler standalone (for unit testing or - * compiling builtins). - */ - -#include "standalone_scaffolding.h" - -#include -#include -#include "ralloc.h" - -void -_mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr, - struct gl_shader *sh) -{ - (void) ctx; - *ptr = sh; -} - -struct gl_shader * -_mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type) -{ - struct gl_shader *shader; - - (void) ctx; - - assert(type == GL_FRAGMENT_SHADER || type == GL_VERTEX_SHADER); - shader = rzalloc(NULL, struct gl_shader); - if (shader) { - shader->Type = type; - shader->Name = name; - shader->RefCount = 1; - } - return shader; -} - -void initialize_context_to_defaults(struct gl_context *ctx, gl_api api) -{ - memset(ctx, 0, sizeof(*ctx)); - - ctx->API = api; - - ctx->Extensions.dummy_false = false; - ctx->Extensions.dummy_true = true; - ctx->Extensions.ARB_ES2_compatibility = true; - ctx->Extensions.ARB_draw_instanced = true; - ctx->Extensions.ARB_fragment_coord_conventions = true; - ctx->Extensions.EXT_texture_array = true; - ctx->Extensions.NV_texture_rectangle = true; - ctx->Extensions.EXT_texture3D = true; - ctx->Extensions.OES_EGL_image_external = true; - - ctx->Const.GLSLVersion = 120; - - /* 1.20 minimums. */ - ctx->Const.MaxLights = 8; - ctx->Const.MaxClipPlanes = 6; - ctx->Const.MaxTextureUnits = 2; - ctx->Const.MaxTextureCoordUnits = 2; - ctx->Const.VertexProgram.MaxAttribs = 16; - - ctx->Const.VertexProgram.MaxUniformComponents = 512; - ctx->Const.MaxVarying = 8; /* == gl_MaxVaryingFloats / 4 */ - ctx->Const.MaxVertexTextureImageUnits = 0; - ctx->Const.MaxCombinedTextureImageUnits = 2; - ctx->Const.MaxTextureImageUnits = 2; - ctx->Const.FragmentProgram.MaxUniformComponents = 64; - - ctx->Const.MaxDrawBuffers = 1; -} diff --git a/dll/opengl/mesa/src/glsl/standalone_scaffolding.h b/dll/opengl/mesa/src/glsl/standalone_scaffolding.h deleted file mode 100644 index 87733200670..00000000000 --- a/dll/opengl/mesa/src/glsl/standalone_scaffolding.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright © 2011 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/* This file declares stripped-down versions of functions that - * normally exist outside of the glsl folder, so that they can be used - * when running the GLSL compiler standalone (for unit testing or - * compiling builtins). - */ - -#pragma once -#ifndef STANDALONE_SCAFFOLDING_H -#define STANDALONE_SCAFFOLDING_H - -#include "main/mtypes.h" - -extern "C" void -_mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr, - struct gl_shader *sh); - -extern "C" struct gl_shader * -_mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type); - -/** - * Initialize the given gl_context structure to a reasonable set of - * defaults representing the minimum capabilities required by the - * OpenGL spec. - * - * This is used when compiling builtin functions and in testing, when - * we don't have a connection to an actual driver. - */ -void initialize_context_to_defaults(struct gl_context *ctx, gl_api api); - - -#endif /* STANDALONE_SCAFFOLDING_H */ diff --git a/dll/opengl/mesa/src/glsl/strtod.c b/dll/opengl/mesa/src/glsl/strtod.c deleted file mode 100644 index a876e138b70..00000000000 --- a/dll/opengl/mesa/src/glsl/strtod.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include - -#ifdef _GNU_SOURCE -#include -#ifdef __APPLE__ -#include -#endif -#endif - -#include "strtod.h" - - - -/** - * Wrapper around strtod which uses the "C" locale so the decimal - * point is always '.' - */ -double -glsl_strtod(const char *s, char **end) -{ -#if defined(_GNU_SOURCE) && !defined(__CYGWIN__) && !defined(__FreeBSD__) && \ - !defined(__HAIKU__) - static locale_t loc = NULL; - if (!loc) { - loc = newlocale(LC_CTYPE_MASK, "C", NULL); - } - return strtod_l(s, end, loc); -#else - return strtod(s, end); -#endif -} diff --git a/dll/opengl/mesa/src/glsl/strtod.h b/dll/opengl/mesa/src/glsl/strtod.h deleted file mode 100644 index 0cf6409d425..00000000000 --- a/dll/opengl/mesa/src/glsl/strtod.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2010 VMware, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef STRTOD_H -#define STRTOD_H - -#ifdef __cplusplus -extern "C" { -#endif - -extern double -glsl_strtod(const char *s, char **end); - - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/dll/opengl/mesa/src/glsl/test.cpp b/dll/opengl/mesa/src/glsl/test.cpp deleted file mode 100644 index b1ff92ed1d4..00000000000 --- a/dll/opengl/mesa/src/glsl/test.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright © 2011 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file test.cpp - * - * Standalone tests for the GLSL compiler. - * - * This file provides a standalone executable which can be used to - * test components of the GLSL. - * - * Each test is a function with the same signature as main(). The - * main function interprets its first argument as the name of the test - * to run, strips out that argument, and then calls the test function. - */ - -#include -#include -#include - -#include "test_optpass.h" - -/** - * Print proper usage and exit with failure. - */ -static void -usage_fail(const char *name) -{ - printf("*** usage: %s \n", name); - printf("\n"); - printf("Possible commands are:\n"); - printf(" optpass: test an optimization pass in isolation\n"); - exit(EXIT_FAILURE); -} - -static const char *extract_command_from_argv(int *argc, char **argv) -{ - if (*argc < 2) { - usage_fail(argv[0]); - } - const char *command = argv[1]; - --*argc; - memmove(&argv[1], &argv[2], (*argc) * sizeof(argv[1])); - return command; -} - -int main(int argc, char **argv) -{ - const char *command = extract_command_from_argv(&argc, argv); - if (strcmp(command, "optpass") == 0) { - return test_optpass(argc, argv); - } else { - usage_fail(argv[0]); - } - - /* Execution should never reach here. */ - return EXIT_FAILURE; -} diff --git a/dll/opengl/mesa/src/glsl/test_optpass.cpp b/dll/opengl/mesa/src/glsl/test_optpass.cpp deleted file mode 100644 index 6abafb5d311..00000000000 --- a/dll/opengl/mesa/src/glsl/test_optpass.cpp +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Copyright © 2011 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/** - * \file test_optpass.cpp - * - * Standalone test for optimization passes. - * - * This file provides the "optpass" command for the standalone - * glsl_test app. It accepts either GLSL or high-level IR as input, - * and performs the optimiation passes specified on the command line. - * It outputs the IR, both before and after optimiations. - */ - -#include -#include -#include -#include - -#include "ast.h" -#include "ir_optimization.h" -#include "ir_print_visitor.h" -#include "program.h" -#include "ir_reader.h" -#include "standalone_scaffolding.h" - -using namespace std; - -static string read_stdin_to_eof() -{ - stringbuf sb; - cin.get(sb, '\0'); - return sb.str(); -} - -static GLboolean -do_optimization(struct exec_list *ir, const char *optimization) -{ - int int_0; - int int_1; - int int_2; - int int_3; - int int_4; - - if (sscanf(optimization, "do_common_optimization ( %d , %d ) ", - &int_0, &int_1) == 2) { - return do_common_optimization(ir, int_0 != 0, false, int_1); - } else if (strcmp(optimization, "do_algebraic") == 0) { - return do_algebraic(ir); - } else if (strcmp(optimization, "do_constant_folding") == 0) { - return do_constant_folding(ir); - } else if (strcmp(optimization, "do_constant_variable") == 0) { - return do_constant_variable(ir); - } else if (strcmp(optimization, "do_constant_variable_unlinked") == 0) { - return do_constant_variable_unlinked(ir); - } else if (strcmp(optimization, "do_copy_propagation") == 0) { - return do_copy_propagation(ir); - } else if (strcmp(optimization, "do_copy_propagation_elements") == 0) { - return do_copy_propagation_elements(ir); - } else if (strcmp(optimization, "do_constant_propagation") == 0) { - return do_constant_propagation(ir); - } else if (strcmp(optimization, "do_dead_code") == 0) { - return do_dead_code(ir, false); - } else if (strcmp(optimization, "do_dead_code_local") == 0) { - return do_dead_code_local(ir); - } else if (strcmp(optimization, "do_dead_code_unlinked") == 0) { - return do_dead_code_unlinked(ir); - } else if (strcmp(optimization, "do_dead_functions") == 0) { - return do_dead_functions(ir); - } else if (strcmp(optimization, "do_function_inlining") == 0) { - return do_function_inlining(ir); - } else if (sscanf(optimization, - "do_lower_jumps ( %d , %d , %d , %d , %d ) ", - &int_0, &int_1, &int_2, &int_3, &int_4) == 5) { - return do_lower_jumps(ir, int_0 != 0, int_1 != 0, int_2 != 0, - int_3 != 0, int_4 != 0); - } else if (strcmp(optimization, "do_lower_texture_projection") == 0) { - return do_lower_texture_projection(ir); - } else if (strcmp(optimization, "do_if_simplification") == 0) { - return do_if_simplification(ir); - } else if (strcmp(optimization, "do_discard_simplification") == 0) { - return do_discard_simplification(ir); - } else if (sscanf(optimization, "lower_if_to_cond_assign ( %d ) ", - &int_0) == 1) { - return lower_if_to_cond_assign(ir, int_0); - } else if (strcmp(optimization, "do_mat_op_to_vec") == 0) { - return do_mat_op_to_vec(ir); - } else if (strcmp(optimization, "do_noop_swizzle") == 0) { - return do_noop_swizzle(ir); - } else if (strcmp(optimization, "do_structure_splitting") == 0) { - return do_structure_splitting(ir); - } else if (strcmp(optimization, "do_swizzle_swizzle") == 0) { - return do_swizzle_swizzle(ir); - } else if (strcmp(optimization, "do_tree_grafting") == 0) { - return do_tree_grafting(ir); - } else if (strcmp(optimization, "do_vec_index_to_cond_assign") == 0) { - return do_vec_index_to_cond_assign(ir); - } else if (strcmp(optimization, "do_vec_index_to_swizzle") == 0) { - return do_vec_index_to_swizzle(ir); - } else if (strcmp(optimization, "lower_discard") == 0) { - return lower_discard(ir); - } else if (sscanf(optimization, "lower_instructions ( %d ) ", - &int_0) == 1) { - return lower_instructions(ir, int_0); - } else if (strcmp(optimization, "lower_noise") == 0) { - return lower_noise(ir); - } else if (sscanf(optimization, "lower_variable_index_to_cond_assign " - "( %d , %d , %d , %d ) ", &int_0, &int_1, &int_2, - &int_3) == 4) { - return lower_variable_index_to_cond_assign(ir, int_0 != 0, int_1 != 0, - int_2 != 0, int_3 != 0); - } else if (sscanf(optimization, "lower_quadop_vector ( %d ) ", - &int_0) == 1) { - return lower_quadop_vector(ir, int_0 != 0); - } else if (strcmp(optimization, "optimize_redundant_jumps") == 0) { - return optimize_redundant_jumps(ir); - } else { - printf("Unrecognized optimization %s\n", optimization); - exit(EXIT_FAILURE); - return false; - } -} - -static GLboolean -do_optimization_passes(struct exec_list *ir, char **optimizations, - int num_optimizations, bool quiet) -{ - GLboolean overall_progress = false; - - for (int i = 0; i < num_optimizations; ++i) { - const char *optimization = optimizations[i]; - if (!quiet) { - printf("*** Running optimization %s...", optimization); - } - GLboolean progress = do_optimization(ir, optimization); - if (!quiet) { - printf("%s\n", progress ? "progress" : "no progress"); - } - validate_ir_tree(ir); - - overall_progress = overall_progress || progress; - } - - return overall_progress; -} - -int test_optpass(int argc, char **argv) -{ - int input_format_ir = 0; /* 0=glsl, 1=ir */ - int loop = 0; - int shader_type = GL_VERTEX_SHADER; - int quiet = 0; - - const struct option optpass_opts[] = { - { "input-ir", no_argument, &input_format_ir, 1 }, - { "input-glsl", no_argument, &input_format_ir, 0 }, - { "loop", no_argument, &loop, 1 }, - { "vertex-shader", no_argument, &shader_type, GL_VERTEX_SHADER }, - { "fragment-shader", no_argument, &shader_type, GL_FRAGMENT_SHADER }, - { "quiet", no_argument, &quiet, 1 }, - { NULL, 0, NULL, 0 } - }; - - int idx = 0; - int c; - while ((c = getopt_long(argc, argv, "", optpass_opts, &idx)) != -1) { - if (c != 0) { - printf("*** usage: %s optpass \n", argv[0]); - printf("\n"); - printf("Possible options are:\n"); - printf(" --input-ir: input format is IR\n"); - printf(" --input-glsl: input format is GLSL (the default)\n"); - printf(" --loop: run optimizations repeatedly until no progress\n"); - printf(" --vertex-shader: test with a vertex shader (the default)\n"); - printf(" --fragment-shader: test with a fragment shader\n"); - exit(EXIT_FAILURE); - } - } - - struct gl_context local_ctx; - struct gl_context *ctx = &local_ctx; - initialize_context_to_defaults(ctx, API_OPENGL); - - ctx->Driver.NewShader = _mesa_new_shader; - - struct gl_shader *shader = rzalloc(NULL, struct gl_shader); - shader->Type = shader_type; - - string input = read_stdin_to_eof(); - - struct _mesa_glsl_parse_state *state - = new(shader) _mesa_glsl_parse_state(ctx, shader->Type, shader); - - if (input_format_ir) { - shader->ir = new(shader) exec_list; - _mesa_glsl_initialize_types(state); - _mesa_glsl_read_ir(state, shader->ir, input.c_str(), true); - } else { - shader->Source = input.c_str(); - const char *source = shader->Source; - state->error = preprocess(state, &source, &state->info_log, - state->extensions, ctx->API) != 0; - - if (!state->error) { - _mesa_glsl_lexer_ctor(state, source); - _mesa_glsl_parse(state); - _mesa_glsl_lexer_dtor(state); - } - - shader->ir = new(shader) exec_list; - if (!state->error && !state->translation_unit.is_empty()) - _mesa_ast_to_hir(shader->ir, state); - } - - /* Print out the initial IR */ - if (!state->error && !quiet) { - printf("*** pre-optimization IR:\n"); - _mesa_print_ir(shader->ir, state); - printf("\n--\n"); - } - - /* Optimization passes */ - if (!state->error) { - GLboolean progress; - do { - progress = do_optimization_passes(shader->ir, &argv[optind], - argc - optind, quiet != 0); - } while (loop && progress); - } - - /* Print out the resulting IR */ - if (!state->error) { - if (!quiet) { - printf("*** resulting IR:\n"); - } - _mesa_print_ir(shader->ir, state); - if (!quiet) { - printf("\n--\n"); - } - } - - if (state->error) { - printf("*** error(s) occurred:\n"); - printf("%s\n", state->info_log); - printf("--\n"); - } - - ralloc_free(state); - ralloc_free(shader); - - return state->error; -} - diff --git a/dll/opengl/mesa/src/glsl/test_optpass.h b/dll/opengl/mesa/src/glsl/test_optpass.h deleted file mode 100644 index 923ccf3dece..00000000000 --- a/dll/opengl/mesa/src/glsl/test_optpass.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright © 2011 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#pragma once -#ifndef TEST_OPTPASS_H -#define TEST_OPTPASS_H - -int test_optpass(int argc, char **argv); - -#endif /* TEST_OPTPASS_H */ diff --git a/dll/opengl/mesa/src/mapi/glapi/CMakeLists.txt b/dll/opengl/mesa/src/mapi/glapi/CMakeLists.txt deleted file mode 100644 index 7e68ce97ec1..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ - -add_definitions( - -DMAPI_MODE_UTIL - -D_GDI32_ # prevent gl* being declared __declspec(dllimport) in MS headers - -DBUILD_GL32 # declare gl* as __declspec(dllexport) in Mesa headers - -D_GLAPI_NO_EXPORTS # prevent _glapi_* from being declared __declspec(dllimport) - -DKHRONOS_DLL_EXPORTS) - -if((ARCH STREQUAL "i386") AND (NOT MSVC)) - list(APPEND SOURCE glapi_x86.S) - add_definitions( - -DUSE_X86_ASM - -DSTDCALL_API) -endif() - -include_directories( - ../../mesa - ..) - -list(APPEND SOURCE - glapi_dispatch.c - glapi_entrypoint.c - glapi_getproc.c - glapi_nop.c - glthread.c - glapi.c - ../mapi/u_current.c - ../mapi/u_execmem.c - ../mapi/u_thread.c) - -if(NOT MSVC) - add_compile_flags("-Wno-unused-function") -endif() - -add_library(mesa_glapi STATIC EXCLUDE_FROM_ALL ${SOURCE}) diff --git a/dll/opengl/mesa/src/mapi/glapi/Makefile b/dll/opengl/mesa/src/mapi/glapi/Makefile deleted file mode 100644 index bb4ed6585d9..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/Makefile +++ /dev/null @@ -1,77 +0,0 @@ -# src/mapi/glapi/Makefile - -TOP = ../../.. -include $(TOP)/configs/current - -TARGET = glapi - -MAPI = $(TOP)/src/mapi/mapi - -include sources.mak -include $(MAPI)/sources.mak - -glapi_CPPFLAGS := \ - -I$(TOP)/include \ - -I$(TOP)/src/mapi \ - -I$(TOP)/src/mesa - -ifeq ($(SHARED_GLAPI),1) -glapi_CPPFLAGS += \ - -DMAPI_MODE_BRIDGE \ - -DMAPI_ABI_HEADER=\"glapi/glapi_mapi_tmp.h\" -glapi_SOURCES := $(addprefix $(MAPI)/, $(MAPI_BRIDGE_SOURCES)) - -glapi_GLAPI_OBJECTS := -glapi_ASM_OBJECTS := -glapi_MAPI_OBJECTS := $(MAPI_BRIDGE_SOURCES:.c=.o) -else -glapi_CPPFLAGS += -DMAPI_MODE_UTIL -glapi_SOURCES := $(GLAPI_SOURCES) $(addprefix $(MAPI)/, $(MAPI_UTIL_SOURCES)) - -glapi_GLAPI_OBJECTS := $(GLAPI_SOURCES:.c=.o) -glapi_ASM_OBJECTS := $(GLAPI_ASM_SOURCES:.S=.o) -glapi_MAPI_OBJECTS := $(MAPI_UTIL_SOURCES:.c=.o) -endif # SHARED_GLAPI - -glapi_OBJECTS := \ - $(glapi_GLAPI_OBJECTS) \ - $(glapi_ASM_OBJECTS) \ - $(glapi_MAPI_OBJECTS) - -default: depend lib$(TARGET).a - -lib$(TARGET).a: $(glapi_OBJECTS) - @$(MKLIB) -o $(TARGET) -static $(glapi_OBJECTS) - -$(glapi_GLAPI_OBJECTS): %.o: %.c - $(CC) -c $(glapi_CPPFLAGS) $(CFLAGS) $< -o $@ - -$(glapi_ASM_OBJECTS): %.o: %.S - $(CC) -c $(glapi_CPPFLAGS) $(CFLAGS) $< -o $@ - -$(glapi_MAPI_OBJECTS): %.o: $(MAPI)/%.c - $(CC) -c $(glapi_CPPFLAGS) $(CFLAGS) $< -o $@ - -install: - -clean: - -rm -f $(glapi_OBJECTS) - -rm -f lib$(TARGET).a - -rm -f depend depend.bak - -ifeq ($(SHARED_GLAPI),1) -# workaround a bug in makedepend -makedepend_CPPFLAGS := \ - $(filter-out -DMAPI_ABI_HEADER=%, $(glapi_CPPFLAGS)) -$(glapi_OBJECTS): glapi_mapi_tmp.h -else -makedepend_CPPFLAGS := $(glapi_CPPFLAGS) -endif - -depend: $(glapi_SOURCES) - @ echo "running $(MKDEP)" - @ touch depend - @$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(makedepend_CPPFLAGS) \ - $(glapi_SOURCES) 2>/dev/null | sed -e 's,^$(MAPI)/,,' > depend - --include depend diff --git a/dll/opengl/mesa/src/mapi/glapi/SConscript b/dll/opengl/mesa/src/mapi/glapi/SConscript deleted file mode 100644 index dad7d597299..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/SConscript +++ /dev/null @@ -1,84 +0,0 @@ -####################################################################### -# SConscript for glapi - - -Import('*') - -env = env.Clone() - -env.Append(CPPDEFINES = [ - 'MAPI_MODE_UTIL', -]) - -if env['platform'] == 'windows': - env.Append(CPPDEFINES = [ - '_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers - 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers - ]) - if env['gles']: - env.Append(CPPDEFINES = ['_GLAPI_DLL_EXPORTS']) - else: - # prevent _glapi_* from being declared __declspec(dllimport) - env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS']) - -env.Append(CPPPATH = [ - '#/src/mapi', - '#/src/mesa', -]) - -glapi_sources = [ - 'glapi_dispatch.c', - 'glapi_entrypoint.c', - 'glapi_getproc.c', - 'glapi_nop.c', - 'glthread.c', - 'glapi.c', -] - -mapi_sources = [ - 'u_current.c', - 'u_execmem.c', - 'u_thread.c', -] -for s in mapi_sources: - o = env.SharedObject(s[:-2], '../mapi/' + s) - glapi_sources.append(o) - -# -# Assembly sources -# -if env['gcc'] and env['platform'] != 'windows': - if env['machine'] == 'x86': - env.Append(CPPDEFINES = [ - 'USE_X86_ASM', - ]) - glapi_sources += [ - 'glapi_x86.S', - ] - elif env['machine'] == 'x86_64': - env.Append(CPPDEFINES = [ - 'USE_X86_64_ASM', - ]) - glapi_sources += [ - 'glapi_x86-64.S' - ] - elif env['machine'] == 'sparc': - env.Append(CPPDEFINES = [ - 'USE_SPARC_ASM', - ]) - glapi_sources += [ - 'glapi_sparc.S' - ] - else: - pass - -if env['toolchain'] == 'crossmingw': - # compile these files without -gstabs option - glapi_sources = env.compile_without_gstabs(glapi_sources, "glapi_dispatch.c") - glapi_sources = env.compile_without_gstabs(glapi_sources, "glapi_getproc.c") - -glapi = env.ConvenienceLibrary( - target = 'glapi', - source = glapi_sources, -) -Export('glapi') diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/AMD_draw_buffers_blend.xml b/dll/opengl/mesa/src/mapi/glapi/gen/AMD_draw_buffers_blend.xml deleted file mode 100644 index 2ed0e0b189e..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/AMD_draw_buffers_blend.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/APPLE_object_purgeable.xml b/dll/opengl/mesa/src/mapi/glapi/gen/APPLE_object_purgeable.xml deleted file mode 100644 index 62fa64ad212..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/APPLE_object_purgeable.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/APPLE_vertex_array_object.xml b/dll/opengl/mesa/src/mapi/glapi/gen/APPLE_vertex_array_object.xml deleted file mode 100644 index bd8427eaf62..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/APPLE_vertex_array_object.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_ES2_compatibility.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_ES2_compatibility.xml deleted file mode 100644 index d52a88c6036..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_ES2_compatibility.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_color_buffer_float.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_color_buffer_float.xml deleted file mode 100644 index 7acf271558e..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_color_buffer_float.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_copy_buffer.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_copy_buffer.xml deleted file mode 100644 index 719816d817e..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_copy_buffer.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_depth_clamp.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_depth_clamp.xml deleted file mode 100644 index 157c9a86b12..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_depth_clamp.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_draw_buffers.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_draw_buffers.xml deleted file mode 100644 index f8ecc11eef7..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_draw_buffers.xml +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_draw_buffers_blend.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_draw_buffers_blend.xml deleted file mode 100644 index 0b6947cc5f3..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_draw_buffers_blend.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml deleted file mode 100644 index a697ea509c2..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_draw_instanced.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_draw_instanced.xml deleted file mode 100644 index 57bb776ac2e..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_draw_instanced.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_framebuffer_object.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_framebuffer_object.xml deleted file mode 100644 index e6bdcd6e509..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_framebuffer_object.xml +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_geometry_shader4.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_geometry_shader4.xml deleted file mode 100644 index d9e540fc94d..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_geometry_shader4.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_get_program_binary.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_get_program_binary.xml deleted file mode 100644 index a3665e54021..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_get_program_binary.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_instanced_arrays.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_instanced_arrays.xml deleted file mode 100644 index 822f5437494..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_instanced_arrays.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_map_buffer_range.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_map_buffer_range.xml deleted file mode 100644 index afcb9b6ba6d..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_map_buffer_range.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_robustness.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_robustness.xml deleted file mode 100644 index b347ef35c55..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_robustness.xml +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_sampler_objects.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_sampler_objects.xml deleted file mode 100644 index 0d39db4d33f..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_sampler_objects.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_seamless_cube_map.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_seamless_cube_map.xml deleted file mode 100644 index 8dc827c5a89..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_seamless_cube_map.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_sync.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_sync.xml deleted file mode 100644 index 4e4eebac32a..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_sync.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_texture_buffer_object.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_texture_buffer_object.xml deleted file mode 100644 index 57680f5535e..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_texture_buffer_object.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_texture_rgb10_a2ui.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_texture_rgb10_a2ui.xml deleted file mode 100644 index b61d97f588c..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_texture_rgb10_a2ui.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_texture_storage.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_texture_storage.xml deleted file mode 100644 index 945467939ce..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_texture_storage.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_vertex_array_object.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_vertex_array_object.xml deleted file mode 100644 index 3b4ab64f557..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_vertex_array_object.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_vertex_type_2_10_10_10_rev.xml b/dll/opengl/mesa/src/mapi/glapi/gen/ARB_vertex_type_2_10_10_10_rev.xml deleted file mode 100644 index 7d12d977494..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/ARB_vertex_type_2_10_10_10_rev.xml +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/EXT_draw_buffers2.xml b/dll/opengl/mesa/src/mapi/glapi/gen/EXT_draw_buffers2.xml deleted file mode 100644 index efbe61f74ed..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/EXT_draw_buffers2.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/EXT_framebuffer_object.xml b/dll/opengl/mesa/src/mapi/glapi/gen/EXT_framebuffer_object.xml deleted file mode 100644 index 4f418f7b64c..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/EXT_framebuffer_object.xml +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/EXT_gpu_shader4.xml b/dll/opengl/mesa/src/mapi/glapi/gen/EXT_gpu_shader4.xml deleted file mode 100644 index bf2f6a3ed21..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/EXT_gpu_shader4.xml +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/EXT_packed_depth_stencil.xml b/dll/opengl/mesa/src/mapi/glapi/gen/EXT_packed_depth_stencil.xml deleted file mode 100644 index 5be810302f3..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/EXT_packed_depth_stencil.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/EXT_provoking_vertex.xml b/dll/opengl/mesa/src/mapi/glapi/gen/EXT_provoking_vertex.xml deleted file mode 100644 index 71d2c729091..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/EXT_provoking_vertex.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/EXT_separate_shader_objects.xml b/dll/opengl/mesa/src/mapi/glapi/gen/EXT_separate_shader_objects.xml deleted file mode 100644 index 6ec56157c07..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/EXT_separate_shader_objects.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/EXT_texture_array.xml b/dll/opengl/mesa/src/mapi/glapi/gen/EXT_texture_array.xml deleted file mode 100644 index b5b8bd406f7..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/EXT_texture_array.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/EXT_texture_integer.xml b/dll/opengl/mesa/src/mapi/glapi/gen/EXT_texture_integer.xml deleted file mode 100644 index 7e5a8cbebe1..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/EXT_texture_integer.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/EXT_transform_feedback.xml b/dll/opengl/mesa/src/mapi/glapi/gen/EXT_transform_feedback.xml deleted file mode 100644 index 051f1e0cc92..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/EXT_transform_feedback.xml +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/GL3x.xml b/dll/opengl/mesa/src/mapi/glapi/gen/GL3x.xml deleted file mode 100644 index cec9c916eff..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/GL3x.xml +++ /dev/null @@ -1,589 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/Makefile b/dll/opengl/mesa/src/mapi/glapi/gen/Makefile deleted file mode 100644 index c409285dd0f..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/Makefile +++ /dev/null @@ -1,234 +0,0 @@ -# This file isn't used during a normal compilation since we don't want to -# require Python in order to compile Mesa. -# Instead, when the Mesa developers update/change the API interface it's -# up to him/her to re-run this makefile and check in the newly generated files. - - -TOP = ../../../.. -include $(TOP)/configs/current - -MESA_DIR = $(TOP)/src/mesa -MESA_GLAPI_DIR = $(TOP)/src/mapi/glapi -MESA_MAPI_DIR = $(TOP)/src/mapi/mapi -MESA_GLX_DIR = $(TOP)/src/glx - -MESA_GLAPI_OUTPUTS = \ - $(MESA_GLAPI_DIR)/glapi_mapi_tmp.h \ - $(MESA_GLAPI_DIR)/glprocs.h \ - $(MESA_GLAPI_DIR)/glapitemp.h \ - $(MESA_GLAPI_DIR)/glapitable.h \ - $(MESA_GLAPI_DIR)/glapi_gentable.c - -MESA_GLAPI_ASM_OUTPUTS = \ - $(MESA_GLAPI_DIR)/glapi_x86.S \ - $(MESA_GLAPI_DIR)/glapi_x86-64.S \ - $(MESA_GLAPI_DIR)/glapi_sparc.S - -MESA_OUTPUTS = \ - $(MESA_GLAPI_OUTPUTS) \ - $(MESA_GLAPI_ASM_OUTPUTS) \ - $(MESA_DIR)/main/enums.c \ - $(MESA_DIR)/main/dispatch.h \ - $(MESA_DIR)/main/remap_helper.h \ - $(MESA_GLX_DIR)/indirect.c \ - $(MESA_GLX_DIR)/indirect.h \ - $(MESA_GLX_DIR)/indirect_init.c \ - $(MESA_GLX_DIR)/indirect_size.h \ - $(MESA_GLX_DIR)/indirect_size.c - -###################################################################### - -XORG_GLX_DIR = $(XORG_BASE)/glx -XORG_GLAPI_DIR = $(XORG_BASE)/glx - -XORG_GLAPI_OUTPUTS = \ - $(XORG_GLAPI_DIR)/glprocs.h \ - $(XORG_GLAPI_DIR)/glapitable.h \ - $(XORG_GLAPI_DIR)/dispatch.h \ - $(XORG_GLAPI_DIR)/glapi_gentable.c - -XORG_OUTPUTS = \ - $(XORG_GLAPI_OUTPUTS) \ - $(XORG_GLX_DIR)/indirect_dispatch.c \ - $(XORG_GLX_DIR)/indirect_dispatch_swap.c \ - $(XORG_GLX_DIR)/indirect_dispatch.h \ - $(XORG_GLX_DIR)/indirect_reqsize.c \ - $(XORG_GLX_DIR)/indirect_reqsize.h \ - $(XORG_GLX_DIR)/indirect_size.h \ - $(XORG_GLX_DIR)/indirect_size_get.c \ - $(XORG_GLX_DIR)/indirect_size_get.h \ - $(XORG_GLX_DIR)/indirect_table.c - -###################################################################### - -API_XML = \ - gl_API.xml \ - ARB_color_buffer_float.xml \ - ARB_copy_buffer.xml \ - ARB_depth_clamp.xml \ - ARB_draw_buffers_blend.xml \ - ARB_draw_elements_base_vertex.xml \ - ARB_draw_instanced.xml \ - ARB_ES2_compatibility.xml \ - ARB_framebuffer_object.xml \ - ARB_geometry_shader4.xml \ - ARB_instanced_arrays.xml \ - ARB_map_buffer_range.xml \ - ARB_robustness.xml \ - ARB_sampler_objects.xml \ - ARB_seamless_cube_map.xml \ - ARB_sync.xml \ - ARB_texture_buffer_object.xml \ - ARB_texture_storage.xml \ - ARB_vertex_array_object.xml \ - AMD_draw_buffers_blend.xml \ - ARB_vertex_type_2_10_10_10_rev.xml \ - APPLE_object_purgeable.xml \ - APPLE_vertex_array_object.xml \ - EXT_draw_buffers2.xml \ - EXT_framebuffer_object.xml \ - EXT_gpu_shader4.xml \ - EXT_packed_depth_stencil.xml \ - EXT_provoking_vertex.xml \ - EXT_separate_shader_objects.xml \ - EXT_texture_array.xml \ - EXT_texture_integer.xml \ - EXT_transform_feedback.xml \ - NV_conditional_render.xml \ - NV_primitive_restart.xml \ - NV_texture_barrier.xml \ - OES_EGL_image.xml \ - GL3x.xml - - -COMMON = $(API_XML) gl_XML.py glX_XML.py license.py typeexpr.py - -COMMON_ES = \ - $(COMMON) \ - gl_and_es_API.xml \ - es_EXT.xml \ - ARB_ES2_compatibility.xml \ - ARB_get_program_binary.xml \ - OES_fixed_point.xml \ - OES_single_precision.xml - -COMMON_GLX = $(COMMON) glX_API.xml glX_XML.py glX_proto_common.py - -###################################################################### - -all: mesa xorg - -mesa: $(MESA_OUTPUTS) - -xorg: check-xorg-source $(XORG_OUTPUTS) - -check-xorg-source: - @if ! test -d $(XORG_GLX_DIR); then \ - echo "ERROR: Must specify path to xserver/ checkout. Set XORG_BASE env var."; \ - if test x$(XORG_BASE) != x; then \ - echo "'$(XORG_GLX_DIR)' does not exist."; \ - fi; \ - exit 1; \ - fi - -clean: - -rm -f *~ *.pyo - -rm -f $(MESA_OUTPUTS) - -###################################################################### - -$(XORG_GLAPI_DIR)/%.c: $(MESA_GLAPI_DIR)/%.c - cp $< $@ - -$(XORG_GLAPI_DIR)/dispatch.h: $(MESA_DIR)/main/dispatch.h - cp $< $@ - -$(XORG_GLAPI_DIR)/%.h: $(MESA_GLAPI_DIR)/%.h - cp $< $@ - -###################################################################### - -$(MESA_GLAPI_DIR)/glapi_mapi_tmp.h: $(MESA_MAPI_DIR)/mapi_abi.py $(COMMON_ES) - $(PYTHON2) $(PYTHON_FLAGS) $< \ - --printer glapi --mode lib gl_and_es_API.xml > $@ - -$(MESA_GLAPI_DIR)/glprocs.h: gl_procs.py $(COMMON) - $(PYTHON2) $(PYTHON_FLAGS) $< > $@ - -$(MESA_GLAPI_DIR)/glapitemp.h: gl_apitemp.py $(COMMON) - $(PYTHON2) $(PYTHON_FLAGS) $< > $@ - -$(MESA_GLAPI_DIR)/glapitable.h: gl_table.py $(COMMON) - $(PYTHON2) $(PYTHON_FLAGS) $< > $@ - -$(MESA_GLAPI_DIR)/glapi_gentable.c: gl_gentable.py $(COMMON) - $(PYTHON2) $(PYTHON_FLAGS) $< > $@ - -###################################################################### - -$(MESA_GLAPI_DIR)/glapi_x86.S: gl_x86_asm.py $(COMMON) - $(PYTHON2) $(PYTHON_FLAGS) $< > $@ - -$(MESA_GLAPI_DIR)/glapi_x86-64.S: gl_x86-64_asm.py $(COMMON) - $(PYTHON2) $(PYTHON_FLAGS) $< > $@ - -$(MESA_GLAPI_DIR)/glapi_sparc.S: gl_SPARC_asm.py $(COMMON) - $(PYTHON2) $(PYTHON_FLAGS) $< > $@ - -###################################################################### - -$(MESA_DIR)/main/enums.c: gl_enums.py $(COMMON_ES) - $(PYTHON2) $(PYTHON_FLAGS) $< -f gl_and_es_API.xml > $@ - -$(MESA_DIR)/main/dispatch.h: gl_table.py $(COMMON) - $(PYTHON2) $(PYTHON_FLAGS) $< -m remap_table > $@ - -$(MESA_DIR)/main/remap_helper.h: remap_helper.py $(COMMON) - $(PYTHON2) $(PYTHON_FLAGS) $< > $@ - -###################################################################### - -$(MESA_GLX_DIR)/indirect.c: glX_proto_send.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m proto | $(INDENT) $(INDENT_FLAGS) > $@ - -$(MESA_GLX_DIR)/indirect.h: glX_proto_send.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m init_h > $@ - -$(MESA_GLX_DIR)/indirect_init.c: glX_proto_send.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m init_c > $@ - -$(MESA_GLX_DIR)/indirect_size.h $(XORG_GLX_DIR)/indirect_size.h: glX_proto_size.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m size_h --only-set -h _INDIRECT_SIZE_H_ \ - | $(INDENT) $(INDENT_FLAGS) > $@ - -$(MESA_GLX_DIR)/indirect_size.c: glX_proto_size.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m size_c --only-set \ - | $(INDENT) $(INDENT_FLAGS) > $@ - -###################################################################### - -$(XORG_GLX_DIR)/indirect_dispatch.c: glX_proto_recv.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_c > $@ - -$(XORG_GLX_DIR)/indirect_dispatch_swap.c: glX_proto_recv.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_c -s > $@ - -$(XORG_GLX_DIR)/indirect_dispatch.h: glX_proto_recv.py gl_and_glX_API.xml $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m dispatch_h -f gl_and_glX_API.xml -s > $@ - -$(XORG_GLX_DIR)/indirect_size_get.h: glX_proto_size.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m size_h --only-get -h '_INDIRECT_SIZE_GET_H_' \ - | $(INDENT) $(INDENT_FLAGS) > $@ - -$(XORG_GLX_DIR)/indirect_size_get.c: glX_proto_size.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m size_c | $(INDENT) $(INDENT_FLAGS) > $@ - -$(XORG_GLX_DIR)/indirect_reqsize.h: glX_proto_size.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m reqsize_h --only-get -h '_INDIRECT_SIZE_GET_H_' \ - | $(INDENT) $(INDENT_FLAGS) -l200 > $@ - -$(XORG_GLX_DIR)/indirect_reqsize.c: glX_proto_size.py $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -m reqsize_c | $(INDENT) $(INDENT_FLAGS) > $@ - -$(XORG_GLX_DIR)/indirect_table.c: glX_server_table.py gl_and_glX_API.xml $(COMMON_GLX) - $(PYTHON2) $(PYTHON_FLAGS) $< -f gl_and_glX_API.xml > $@ diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/NV_conditional_render.xml b/dll/opengl/mesa/src/mapi/glapi/gen/NV_conditional_render.xml deleted file mode 100644 index 8bb31dd1fc9..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/NV_conditional_render.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/NV_primitive_restart.xml b/dll/opengl/mesa/src/mapi/glapi/gen/NV_primitive_restart.xml deleted file mode 100644 index abe7dda0076..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/NV_primitive_restart.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/NV_texture_barrier.xml b/dll/opengl/mesa/src/mapi/glapi/gen/NV_texture_barrier.xml deleted file mode 100644 index 52b1a3c08da..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/NV_texture_barrier.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/OES_EGL_image.xml b/dll/opengl/mesa/src/mapi/glapi/gen/OES_EGL_image.xml deleted file mode 100644 index 1cb43d49a41..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/OES_EGL_image.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/OES_fixed_point.xml b/dll/opengl/mesa/src/mapi/glapi/gen/OES_fixed_point.xml deleted file mode 100644 index ee408f4f1a3..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/OES_fixed_point.xml +++ /dev/null @@ -1,259 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/OES_single_precision.xml b/dll/opengl/mesa/src/mapi/glapi/gen/OES_single_precision.xml deleted file mode 100644 index df8efc8f809..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/OES_single_precision.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/es_EXT.xml b/dll/opengl/mesa/src/mapi/glapi/gen/es_EXT.xml deleted file mode 100644 index c7e7d07e3cc..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/es_EXT.xml +++ /dev/null @@ -1,630 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/extension_helper.py b/dll/opengl/mesa/src/mapi/glapi/gen/extension_helper.py deleted file mode 100644 index 2c83b4e0d10..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/extension_helper.py +++ /dev/null @@ -1,324 +0,0 @@ -#!/usr/bin/env python - -# (C) Copyright IBM Corporation 2005 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Ian Romanick - -import gl_XML -import license -import sys, getopt, string - -vtxfmt = [ - "ArrayElement", \ - "Color3f", \ - "Color3fv", \ - "Color4f", \ - "Color4fv", \ - "EdgeFlag", \ - "EdgeFlagv", \ - "EvalCoord1f", \ - "EvalCoord1fv", \ - "EvalCoord2f", \ - "EvalCoord2fv", \ - "EvalPoint1", \ - "EvalPoint2", \ - "FogCoordfEXT", \ - "FogCoordfvEXT", \ - "Indexf", \ - "Indexfv", \ - "Materialfv", \ - "MultiTexCoord1fARB", \ - "MultiTexCoord1fvARB", \ - "MultiTexCoord2fARB", \ - "MultiTexCoord2fvARB", \ - "MultiTexCoord3fARB", \ - "MultiTexCoord3fvARB", \ - "MultiTexCoord4fARB", \ - "MultiTexCoord4fvARB", \ - "Normal3f", \ - "Normal3fv", \ - "SecondaryColor3fEXT", \ - "SecondaryColor3fvEXT", \ - "TexCoord1f", \ - "TexCoord1fv", \ - "TexCoord2f", \ - "TexCoord2fv", \ - "TexCoord3f", \ - "TexCoord3fv", \ - "TexCoord4f", \ - "TexCoord4fv", \ - "Vertex2f", \ - "Vertex2fv", \ - "Vertex3f", \ - "Vertex3fv", \ - "Vertex4f", \ - "Vertex4fv", \ - "CallList", \ - "CallLists", \ - "Begin", \ - "End", \ - "VertexAttrib1fNV", \ - "VertexAttrib1fvNV", \ - "VertexAttrib2fNV", \ - "VertexAttrib2fvNV", \ - "VertexAttrib3fNV", \ - "VertexAttrib3fvNV", \ - "VertexAttrib4fNV", \ - "VertexAttrib4fvNV", \ - "VertexAttrib1fARB", \ - "VertexAttrib1fvARB", \ - "VertexAttrib2fARB", \ - "VertexAttrib2fvARB", \ - "VertexAttrib3fARB", \ - "VertexAttrib3fvARB", \ - "VertexAttrib4fARB", \ - "VertexAttrib4fvARB", \ - "Rectf", \ - "DrawArrays", \ - "DrawElements", \ - "DrawRangeElements", \ - "EvalMesh1", \ - "EvalMesh2", \ -] - -def all_entrypoints_in_abi(f, abi, api): - for n in f.entry_points: - [category, num] = api.get_category_for_name( n ) - if category not in abi: - return 0 - - return 1 - - -def any_entrypoints_in_abi(f, abi, api): - for n in f.entry_points: - [category, num] = api.get_category_for_name( n ) - if category in abi: - return 1 - - return 0 - - -def condition_for_function(f, abi, all_not_in_ABI): - """Create a C-preprocessor condition for the function. - - There are two modes of operation. If all_not_in_ABI is set, a - condition is only created is all of the entry-point names for f are - not in the selected ABI. If all_not_in_ABI is not set, a condition - is created if any entryp-point name is not in the selected ABI. - """ - - condition = [] - for n in f.entry_points: - [category, num] = api.get_category_for_name( n ) - if category not in abi: - condition.append( 'defined(need_%s)' % (gl_XML.real_category_name( category )) ) - elif all_not_in_ABI: - return [] - - return condition - - -class PrintGlExtensionGlue(gl_XML.gl_print_base): - def __init__(self): - gl_XML.gl_print_base.__init__(self) - - self.name = "extension_helper.py (from Mesa)" - self.license = license.bsd_license_template % ("(C) Copyright IBM Corporation 2005", "IBM") - return - - - def printRealHeader(self): - print '#include "utils.h"' - print '#include "main/dispatch.h"' - print '' - return - - - def printBody(self, api): - abi = [ "1.0", "1.1", "1.2", "GL_ARB_multitexture" ] - - category_list = {} - - print '#ifndef NULL' - print '# define NULL 0' - print '#endif' - print '' - - for f in api.functionIterateAll(): - condition = condition_for_function(f, abi, 0) - if len(condition): - print '#if %s' % (string.join(condition, " || ")) - print 'static const char %s_names[] =' % (f.name) - - parameter_signature = '' - for p in f.parameterIterator(): - if p.is_padding: - continue - - # FIXME: This is a *really* ugly hack. :( - - tn = p.type_expr.get_base_type_node() - if p.is_pointer(): - parameter_signature += 'p' - elif tn.integer: - parameter_signature += 'i' - elif tn.size == 4: - parameter_signature += 'f' - else: - parameter_signature += 'd' - - print ' "%s\\0" /* Parameter signature */' % (parameter_signature) - - for n in f.entry_points: - print ' "gl%s\\0"' % (n) - - [category, num] = api.get_category_for_name( n ) - if category not in abi: - c = gl_XML.real_category_name(category) - if not category_list.has_key(c): - category_list[ c ] = [] - - category_list[ c ].append( f ) - - print ' "";' - print '#endif' - print '' - - keys = category_list.keys() - keys.sort() - - for category in keys: - print '#if defined(need_%s)' % (category) - print 'static const struct dri_extension_function %s_functions[] = {' % (category) - - for f in category_list[ category ]: - # A function either has an offset that is - # assigned by the ABI, or it has a remap - # index. - if any_entrypoints_in_abi(f, abi, api): - index_name = "-1" - offset = f.offset - else: - index_name = "%s_remap_index" % (f.name) - offset = -1 - - print ' { %s_names, %s, %d },' % (f.name, index_name, offset) - - - print ' { NULL, 0, 0 }' - print '};' - print '#endif' - print '' - - return - - -class PrintInitDispatch(gl_XML.gl_print_base): - def __init__(self): - gl_XML.gl_print_base.__init__(self) - - self.name = "extension_helper.py (from Mesa)" - self.license = license.bsd_license_template % ("(C) Copyright IBM Corporation 2005", "IBM") - return - - - def do_function_body(self, api, abi, vtxfmt_only): - last_condition_string = None - for f in api.functionIterateByOffset(): - if (f.name in vtxfmt) and not vtxfmt_only: - continue - - if (f.name not in vtxfmt) and vtxfmt_only: - continue - - condition = condition_for_function(f, abi, 1) - condition_string = string.join(condition, " || ") - - if condition_string != last_condition_string: - if last_condition_string: - print '#endif /* %s */' % (last_condition_string) - - if condition_string: - print '#if %s' % (condition_string) - - if vtxfmt_only: - print ' disp->%s = vfmt->%s;' % (f.name, f.name) - else: - print ' disp->%s = _mesa_%s;' % (f.name, f.name) - - last_condition_string = condition_string - - if last_condition_string: - print '#endif /* %s */' % (last_condition_string) - - - - def printBody(self, api): - abi = [ "1.0", "1.1", "1.2", "GL_ARB_multitexture" ] - - print 'void driver_init_exec_table(struct _glapi_table *disp)' - print '{' - self.do_function_body(api, abi, 0) - print '}' - print '' - print 'void driver_install_vtxfmt(struct _glapi_table *disp, const GLvertexformat *vfmt)' - print '{' - self.do_function_body(api, abi, 1) - print '}' - - return - - -def show_usage(): - print "Usage: %s [-f input_file_name] [-m output_mode]" % sys.argv[0] - print " -m output_mode Output mode can be one of 'extensions' or 'exec_init'." - sys.exit(1) - -if __name__ == '__main__': - file_name = "gl_API.xml" - - try: - (args, trail) = getopt.getopt(sys.argv[1:], "f:m:") - except Exception,e: - show_usage() - - mode = "extensions" - for (arg,val) in args: - if arg == "-f": - file_name = val - if arg == '-m': - mode = val - - - api = gl_XML.parse_GL_API( file_name ) - - if mode == "extensions": - printer = PrintGlExtensionGlue() - elif mode == "exec_init": - printer = PrintInitDispatch() - else: - show_usage() - - printer.Print( api ) diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/glX_API.xml b/dll/opengl/mesa/src/mapi/glapi/gen/glX_API.xml deleted file mode 100644 index b7f4a777081..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/glX_API.xml +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/glX_XML.py b/dll/opengl/mesa/src/mapi/glapi/gen/glX_XML.py deleted file mode 100644 index 4c2e0f95bf4..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/glX_XML.py +++ /dev/null @@ -1,570 +0,0 @@ -#!/usr/bin/env python - -# (C) Copyright IBM Corporation 2004, 2005 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Ian Romanick - -import gl_XML -import license -import sys, getopt, string - - -class glx_item_factory(gl_XML.gl_item_factory): - """Factory to create GLX protocol oriented objects derived from gl_item.""" - - def create_item(self, name, element, context): - if name == "function": - return glx_function(element, context) - elif name == "enum": - return glx_enum(element, context) - elif name == "api": - return glx_api(self) - else: - return gl_XML.gl_item_factory.create_item(self, name, element, context) - - -class glx_enum(gl_XML.gl_enum): - def __init__(self, element, context): - gl_XML.gl_enum.__init__(self, element, context) - - self.functions = {} - - child = element.children - while child: - if child.type == "element" and child.name == "size": - n = child.nsProp( "name", None ) - c = child.nsProp( "count", None ) - m = child.nsProp( "mode", None ) - - if not c: - c = self.default_count - else: - c = int(c) - - if m == "get": - mode = 0 - else: - mode = 1 - - if not self.functions.has_key(n): - self.functions[ n ] = [c, mode] - - child = child.next - - return - - -class glx_function(gl_XML.gl_function): - def __init__(self, element, context): - self.glx_rop = 0 - self.glx_sop = 0 - self.glx_vendorpriv = 0 - - self.glx_vendorpriv_names = [] - - # If this is set to true, it means that GLdouble parameters should be - # written to the GLX protocol packet in the order they appear in the - # prototype. This is different from the "classic" ordering. In the - # classic ordering GLdoubles are written to the protocol packet first, - # followed by non-doubles. NV_vertex_program was the first extension - # to break with this tradition. - - self.glx_doubles_in_order = 0 - - self.vectorequiv = None - self.output = None - self.can_be_large = 0 - self.reply_always_array = 0 - self.dimensions_in_reply = 0 - self.img_reset = None - - self.server_handcode = 0 - self.client_handcode = 0 - self.ignore = 0 - - self.count_parameter_list = [] - self.counter_list = [] - self.parameters_by_name = {} - self.offsets_calculated = 0 - - gl_XML.gl_function.__init__(self, element, context) - return - - - def process_element(self, element): - gl_XML.gl_function.process_element(self, element) - - # If the function already has a vector equivalent set, don't - # set it again. This can happen if an alias to a function - # appears after the function that it aliases. - - if not self.vectorequiv: - self.vectorequiv = element.nsProp("vectorequiv", None) - - - name = element.nsProp("name", None) - if name == self.name: - for param in self.parameters: - self.parameters_by_name[ param.name ] = param - - if len(param.count_parameter_list): - self.count_parameter_list.extend( param.count_parameter_list ) - - if param.counter and param.counter not in self.counter_list: - self.counter_list.append(param.counter) - - - child = element.children - while child: - if child.type == "element" and child.name == "glx": - rop = child.nsProp( 'rop', None ) - sop = child.nsProp( 'sop', None ) - vop = child.nsProp( 'vendorpriv', None ) - - if rop: - self.glx_rop = int(rop) - - if sop: - self.glx_sop = int(sop) - - if vop: - self.glx_vendorpriv = int(vop) - self.glx_vendorpriv_names.append(name) - - self.img_reset = child.nsProp( 'img_reset', None ) - - # The 'handcode' attribute can be one of 'true', - # 'false', 'client', or 'server'. - - handcode = child.nsProp( 'handcode', None ) - if handcode == "false": - self.server_handcode = 0 - self.client_handcode = 0 - elif handcode == "true": - self.server_handcode = 1 - self.client_handcode = 1 - elif handcode == "client": - self.server_handcode = 0 - self.client_handcode = 1 - elif handcode == "server": - self.server_handcode = 1 - self.client_handcode = 0 - else: - raise RuntimeError('Invalid handcode mode "%s" in function "%s".' % (handcode, self.name)) - - self.ignore = gl_XML.is_attr_true( child, 'ignore' ) - self.can_be_large = gl_XML.is_attr_true( child, 'large' ) - self.glx_doubles_in_order = gl_XML.is_attr_true( child, 'doubles_in_order' ) - self.reply_always_array = gl_XML.is_attr_true( child, 'always_array' ) - self.dimensions_in_reply = gl_XML.is_attr_true( child, 'dimensions_in_reply' ) - - child = child.next - - - # Do some validation of the GLX protocol information. As - # new tests are discovered, they should be added here. - - for param in self.parameters: - if param.is_output and self.glx_rop != 0: - raise RuntimeError("Render / RenderLarge commands cannot have outputs (%s)." % (self.name)) - - return - - - def has_variable_size_request(self): - """Determine if the GLX request packet is variable sized. - - The GLX request packet is variable sized in several common - situations. - - 1. The function has a non-output parameter that is counted - by another parameter (e.g., the 'textures' parameter of - glDeleteTextures). - - 2. The function has a non-output parameter whose count is - determined by another parameter that is an enum (e.g., the - 'params' parameter of glLightfv). - - 3. The function has a non-output parameter that is an - image. - - 4. The function must be hand-coded on the server. - """ - - if self.glx_rop == 0: - return 0 - - if self.server_handcode or self.images: - return 1 - - for param in self.parameters: - if not param.is_output: - if param.counter or len(param.count_parameter_list): - return 1 - - return 0 - - - def variable_length_parameter(self): - for param in self.parameters: - if not param.is_output: - if param.counter or len(param.count_parameter_list): - return param - - return None - - - def calculate_offsets(self): - if not self.offsets_calculated: - # Calculate the offset of the first function parameter - # in the GLX command packet. This byte offset is - # measured from the end of the Render / RenderLarge - # header. The offset for all non-pixel commends is - # zero. The offset for pixel commands depends on the - # number of dimensions of the pixel data. - - if len(self.images) and not self.images[0].is_output: - [dim, junk, junk, junk, junk] = self.images[0].get_dimensions() - - # The base size is the size of the pixel pack info - # header used by images with the specified number - # of dimensions. - - if dim <= 2: - offset = 20 - elif dim <= 4: - offset = 36 - else: - raise RuntimeError('Invalid number of dimensions %u for parameter "%s" in function "%s".' % (dim, self.image.name, self.name)) - else: - offset = 0 - - for param in self.parameterIterateGlxSend(): - if param.img_null_flag: - offset += 4 - - if param.name != self.img_reset: - param.offset = offset - if not param.is_variable_length() and not param.is_client_only: - offset += param.size() - - if self.pad_after( param ): - offset += 4 - - - self.offsets_calculated = 1 - return - - - def offset_of(self, param_name): - self.calculate_offsets() - return self.parameters_by_name[ param_name ].offset - - - def parameterIterateGlxSend(self, include_variable_parameters = 1): - """Create an iterator for parameters in GLX request order.""" - - # The parameter lists are usually quite short, so it's easier - # (i.e., less code) to just generate a new list with the - # required elements than it is to create a new iterator class. - - temp = [ [], [], [] ] - for param in self.parameters: - if param.is_output: continue - - if param.is_variable_length(): - temp[2].append( param ) - elif not self.glx_doubles_in_order and param.is_64_bit(): - temp[0].append( param ) - else: - temp[1].append( param ) - - parameters = temp[0] - parameters.extend( temp[1] ) - if include_variable_parameters: - parameters.extend( temp[2] ) - return parameters.__iter__() - - - def parameterIterateCounters(self): - temp = [] - for name in self.counter_list: - temp.append( self.parameters_by_name[ name ] ) - - return temp.__iter__() - - - def parameterIterateOutputs(self): - temp = [] - for p in self.parameters: - if p.is_output: - temp.append( p ) - - return temp - - - def command_fixed_length(self): - """Return the length, in bytes as an integer, of the - fixed-size portion of the command.""" - - if len(self.parameters) == 0: - return 0 - - self.calculate_offsets() - - size = 0 - for param in self.parameterIterateGlxSend(0): - if param.name != self.img_reset and not param.is_client_only: - if size == 0: - size = param.offset + param.size() - else: - size += param.size() - - if self.pad_after( param ): - size += 4 - - for param in self.images: - if param.img_null_flag or param.is_output: - size += 4 - - return size - - - def command_variable_length(self): - """Return the length, as a string, of the variable-sized - portion of the command.""" - - size_string = "" - for p in self.parameterIterateGlxSend(): - if (not p.is_output) and (p.is_variable_length() or p.is_image()): - # FIXME Replace the 1 in the size_string call - # FIXME w/0 to eliminate some un-needed parnes - # FIXME This would already be done, but it - # FIXME adds some extra diffs to the generated - # FIXME code. - - size_string = size_string + " + __GLX_PAD(%s)" % (p.size_string(1)) - - return size_string - - - def command_length(self): - size = self.command_fixed_length() - - if self.glx_rop != 0: - size += 4 - - size = ((size + 3) & ~3) - return "%u%s" % (size, self.command_variable_length()) - - - def opcode_real_value(self): - """Get the true numeric value of the GLX opcode - - Behaves similarly to opcode_value, except for - X_GLXVendorPrivate and X_GLXVendorPrivateWithReply commands. - In these cases the value for the GLX opcode field (i.e., - 16 for X_GLXVendorPrivate or 17 for - X_GLXVendorPrivateWithReply) is returned. For other 'single' - commands, the opcode for the command (e.g., 101 for - X_GLsop_NewList) is returned.""" - - if self.glx_vendorpriv != 0: - if self.needs_reply(): - return 17 - else: - return 16 - else: - return self.opcode_value() - - - def opcode_value(self): - """Get the unique protocol opcode for the glXFunction""" - - if (self.glx_rop == 0) and self.vectorequiv: - equiv = self.context.functions_by_name[ self.vectorequiv ] - self.glx_rop = equiv.glx_rop - - - if self.glx_rop != 0: - return self.glx_rop - elif self.glx_sop != 0: - return self.glx_sop - elif self.glx_vendorpriv != 0: - return self.glx_vendorpriv - else: - return -1 - - - def opcode_rop_basename(self): - """Return either the name to be used for GLX protocol enum. - - Returns either the name of the function or the name of the - name of the equivalent vector (e.g., glVertex3fv for - glVertex3f) function.""" - - if self.vectorequiv == None: - return self.name - else: - return self.vectorequiv - - - def opcode_name(self): - """Get the unique protocol enum name for the glXFunction""" - - if (self.glx_rop == 0) and self.vectorequiv: - equiv = self.context.functions_by_name[ self.vectorequiv ] - self.glx_rop = equiv.glx_rop - self.glx_doubles_in_order = equiv.glx_doubles_in_order - - - if self.glx_rop != 0: - return "X_GLrop_%s" % (self.opcode_rop_basename()) - elif self.glx_sop != 0: - return "X_GLsop_%s" % (self.name) - elif self.glx_vendorpriv != 0: - return "X_GLvop_%s" % (self.name) - else: - raise RuntimeError('Function "%s" has no opcode.' % (self.name)) - - - def opcode_vendor_name(self, name): - if name in self.glx_vendorpriv_names: - return "X_GLvop_%s" % (name) - else: - raise RuntimeError('Function "%s" has no VendorPrivate opcode.' % (name)) - - - def opcode_real_name(self): - """Get the true protocol enum name for the GLX opcode - - Behaves similarly to opcode_name, except for - X_GLXVendorPrivate and X_GLXVendorPrivateWithReply commands. - In these cases the string 'X_GLXVendorPrivate' or - 'X_GLXVendorPrivateWithReply' is returned. For other - single or render commands 'X_GLsop' or 'X_GLrop' plus the - name of the function returned.""" - - if self.glx_vendorpriv != 0: - if self.needs_reply(): - return "X_GLXVendorPrivateWithReply" - else: - return "X_GLXVendorPrivate" - else: - return self.opcode_name() - - - def needs_reply(self): - try: - x = self._needs_reply - except Exception, e: - x = 0 - if self.return_type != 'void': - x = 1 - - for param in self.parameters: - if param.is_output: - x = 1 - break - - self._needs_reply = x - - return x - - - def pad_after(self, p): - """Returns the name of the field inserted after the - specified field to pad out the command header.""" - - for image in self.images: - if image.img_pad_dimensions: - if not image.height: - if p.name == image.width: - return "height" - elif p.name == image.img_xoff: - return "yoffset" - elif not image.extent: - if p.name == image.depth: - # Should this be "size4d"? - return "extent" - elif p.name == image.img_zoff: - return "woffset" - - return None - - - def has_different_protocol(self, name): - """Returns true if the named version of the function uses different protocol from the other versions. - - Some functions, such as glDeleteTextures and - glDeleteTexturesEXT are functionally identical, but have - different protocol. This function returns true if the - named function is an alias name and that named version uses - different protocol from the function that is aliased. - """ - - return (name in self.glx_vendorpriv_names) and self.glx_sop - - - def static_glx_name(self, name): - if self.has_different_protocol(name): - for n in self.glx_vendorpriv_names: - if n in self.static_entry_points: - return n - - return self.static_name(name) - - - def client_supported_for_indirect(self): - """Returns true if the function is supported on the client - side for indirect rendering.""" - - return not self.ignore and (self.offset != -1) and (self.glx_rop or self.glx_sop or self.glx_vendorpriv or self.vectorequiv or self.client_handcode) - - -class glx_function_iterator: - """Class to iterate over a list of glXFunctions""" - - def __init__(self, context): - self.iterator = context.functionIterateByOffset() - return - - - def __iter__(self): - return self - - - def next(self): - f = self.iterator.next() - - if f.client_supported_for_indirect(): - return f - else: - return self.next() - - -class glx_api(gl_XML.gl_api): - def functionIterateGlx(self): - return glx_function_iterator(self) - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/glX_doc.py b/dll/opengl/mesa/src/mapi/glapi/gen/glX_doc.py deleted file mode 100644 index e9fbbe6f169..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/glX_doc.py +++ /dev/null @@ -1,280 +0,0 @@ -#!/usr/bin/env python - -# (C) Copyright IBM Corporation 2004, 2005 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Ian Romanick - -import gl_XML, glX_XML, glX_proto_common, license -import sys, getopt - - -class glx_doc_item_factory(glX_proto_common.glx_proto_item_factory): - """Factory to create GLX protocol documentation oriented objects derived from glItem.""" - - def create_item(self, name, element, context): - if name == "parameter": - return glx_doc_parameter(element, context) - else: - return glX_proto_common.glx_proto_item_factory.create_item(self, name, element, context) - - -class glx_doc_parameter(gl_XML.gl_parameter): - def packet_type(self, type_dict): - """Get the type string for the packet header - - GLX protocol documentation uses type names like CARD32, - FLOAT64, LISTofCARD8, and ENUM. This function converts the - type of the parameter to one of these names.""" - - list_of = "" - if self.is_array(): - list_of = "LISTof" - - t_name = self.get_base_type_string() - if not type_dict.has_key( t_name ): - type_name = "CARD8" - else: - type_name = type_dict[ t_name ] - - return "%s%s" % (list_of, type_name) - - - def packet_size(self): - p = None - s = self.size() - if s == 0: - a_prod = "n" - b_prod = self.p_type.size - - if not self.count_parameter_list and self.counter: - a_prod = self.counter - elif self.count_parameter_list and not self.counter or self.is_output: - pass - elif self.count_parameter_list and self.counter: - b_prod = self.counter - else: - raise RuntimeError("Parameter '%s' to function '%s' has size 0." % (self.name, self.context.name)) - - ss = "%s*%s" % (a_prod, b_prod) - - return [ss, p] - else: - if s % 4 != 0: - p = "p" - - return [str(s), p] - -class PrintGlxProtoText(gl_XML.gl_print_base): - def __init__(self): - gl_XML.gl_print_base.__init__(self) - self.license = "" - - - def printHeader(self): - return - - - def body_size(self, f): - # At some point, refactor this function and - # glXFunction::command_payload_length. - - size = 0; - size_str = "" - pad_str = "" - plus = "" - for p in f.parameterIterateGlxSend(): - [s, pad] = p.packet_size() - try: - size += int(s) - except Exception,e: - size_str += "%s%s" % (plus, s) - plus = "+" - - if pad != None: - pad_str = pad - - return [size, size_str, pad_str] - - - def print_render_header(self, f): - [size, size_str, pad_str] = self.body_size(f) - size += 4; - - if size_str == "": - s = "%u" % ((size + 3) & ~3) - elif pad_str != "": - s = "%u+%s+%s" % (size, size_str, pad_str) - else: - s = "%u+%s" % (size, size_str) - - print ' 2 %-15s rendering command length' % (s) - print ' 2 %-4u rendering command opcode' % (f.glx_rop) - return - - - def print_single_header(self, f): - [size, size_str, pad_str] = self.body_size(f) - size = ((size + 3) / 4) + 2; - - if f.glx_vendorpriv != 0: - size += 1 - - print ' 1 CARD8 opcode (X assigned)' - print ' 1 %-4u GLX opcode (%s)' % (f.opcode_real_value(), f.opcode_real_name()) - - if size_str == "": - s = "%u" % (size) - elif pad_str != "": - s = "%u+((%s+%s)/4)" % (size, size_str, pad_str) - else: - s = "%u+((%s)/4)" % (size, size_str) - - print ' 2 %-15s request length' % (s) - - if f.glx_vendorpriv != 0: - print ' 4 %-4u vendor specific opcode' % (f.opcode_value()) - - print ' 4 GLX_CONTEXT_TAG context tag' - - return - - - def print_reply(self, f): - print ' =>' - print ' 1 1 reply' - print ' 1 unused' - print ' 2 CARD16 sequence number' - - if f.output == None: - print ' 4 0 reply length' - elif f.reply_always_array: - print ' 4 m reply length' - else: - print ' 4 m reply length, m = (n == 1 ? 0 : n)' - - - output = None - for x in f.parameterIterateOutputs(): - output = x - break - - - unused = 24 - if f.return_type != 'void': - print ' 4 %-15s return value' % (f.return_type) - unused -= 4 - elif output != None: - print ' 4 unused' - unused -= 4 - - if output != None: - print ' 4 CARD32 n' - unused -= 4 - - if output != None: - if not f.reply_always_array: - print '' - print ' if (n = 1) this follows:' - print '' - print ' 4 CARD32 %s' % (output.name) - print ' %-2u unused' % (unused - 4) - print '' - print ' otherwise this follows:' - print '' - - print ' %-2u unused' % (unused) - - [s, pad] = output.packet_size() - print ' %-8s %-15s %s' % (s, output.packet_type( self.type_map ), output.name) - if pad != None: - try: - bytes = int(s) - bytes = 4 - (bytes & 3) - print ' %-8u %-15s unused' % (bytes, "") - except Exception,e: - print ' %-8s %-15s unused, %s=pad(%s)' % (pad, "", pad, s) - else: - print ' %-2u unused' % (unused) - - - def print_body(self, f): - for p in f.parameterIterateGlxSend(): - [s, pad] = p.packet_size() - print ' %-8s %-15s %s' % (s, p.packet_type( self.type_map ), p.name) - if pad != None: - try: - bytes = int(s) - bytes = 4 - (bytes & 3) - print ' %-8u %-15s unused' % (bytes, "") - except Exception,e: - print ' %-8s %-15s unused, %s=pad(%s)' % (pad, "", pad, s) - - def printBody(self, api): - self.type_map = {} - for t in api.typeIterate(): - self.type_map[ "GL" + t.name ] = t.glx_name - - - # At some point this should be expanded to support pixel - # functions, but I'm not going to lose any sleep over it now. - - for f in api.functionIterateByOffset(): - if f.client_handcode or f.server_handcode or f.vectorequiv or len(f.get_images()): - continue - - - if f.glx_rop: - print ' %s' % (f.name) - self.print_render_header(f) - elif f.glx_sop or f.glx_vendorpriv: - print ' %s' % (f.name) - self.print_single_header(f) - else: - continue - - self.print_body(f) - - if f.needs_reply(): - self.print_reply(f) - - print '' - return - - -if __name__ == '__main__': - file_name = "gl_API.xml" - - try: - (args, trail) = getopt.getopt(sys.argv[1:], "f:") - except Exception,e: - show_usage() - - for (arg,val) in args: - if arg == "-f": - file_name = val - - api = gl_XML.parse_GL_API( file_name, glx_doc_item_factory() ) - - printer = PrintGlxProtoText() - printer.Print( api ) diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/glX_proto_common.py b/dll/opengl/mesa/src/mapi/glapi/gen/glX_proto_common.py deleted file mode 100644 index 6f094e22b31..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/glX_proto_common.py +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env python - -# (C) Copyright IBM Corporation 2004, 2005 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Ian Romanick - -import gl_XML, glX_XML -import string - - -class glx_proto_item_factory(glX_XML.glx_item_factory): - """Factory to create GLX protocol oriented objects derived from gl_item.""" - - def create_item(self, name, element, context): - if name == "type": - return glx_proto_type(element, context) - else: - return glX_XML.glx_item_factory.create_item(self, name, element, context) - - -class glx_proto_type(gl_XML.gl_type): - def __init__(self, element, context): - gl_XML.gl_type.__init__(self, element, context) - - self.glx_name = element.nsProp( "glx_name", None ) - return - - -class glx_print_proto(gl_XML.gl_print_base): - def size_call(self, func, outputs_also = 0): - """Create C code to calculate 'compsize'. - - Creates code to calculate 'compsize'. If the function does - not need 'compsize' to be calculated, None will be - returned.""" - - compsize = None - - for param in func.parameterIterator(): - if outputs_also or not param.is_output: - if param.is_image(): - [dim, w, h, d, junk] = param.get_dimensions() - - compsize = '__glImageSize(%s, %s, %s, %s, %s, %s)' % (w, h, d, param.img_format, param.img_type, param.img_target) - if not param.img_send_null: - compsize = '(%s != NULL) ? %s : 0' % (param.name, compsize) - - return compsize - - elif len(param.count_parameter_list): - parameters = string.join( param.count_parameter_list, "," ) - compsize = "__gl%s_size(%s)" % (func.name, parameters) - - return compsize - - return None - - - def emit_packet_size_calculation(self, f, bias): - # compsize is only used in the command size calculation if - # the function has a non-output parameter that has a non-empty - # counter_parameter_list. - - compsize = self.size_call(f) - if compsize: - print ' const GLuint compsize = %s;' % (compsize) - - if bias: - print ' const GLuint cmdlen = %s - %u;' % (f.command_length(), bias) - else: - print ' const GLuint cmdlen = %s;' % (f.command_length()) - - #print '' - return compsize diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/glX_proto_recv.py b/dll/opengl/mesa/src/mapi/glapi/gen/glX_proto_recv.py deleted file mode 100644 index b577bb6bd63..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/glX_proto_recv.py +++ /dev/null @@ -1,555 +0,0 @@ -#!/usr/bin/env python - -# (C) Copyright IBM Corporation 2005 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Ian Romanick - -import gl_XML, glX_XML, glX_proto_common, license -import sys, getopt, string - - -class PrintGlxDispatch_h(gl_XML.gl_print_base): - def __init__(self): - gl_XML.gl_print_base.__init__(self) - - self.name = "glX_proto_recv.py (from Mesa)" - self.license = license.bsd_license_template % ( "(C) Copyright IBM Corporation 2005", "IBM") - - self.header_tag = "_INDIRECT_DISPATCH_H_" - return - - - def printRealHeader(self): - print '# include ' - print '' - print 'struct __GLXclientStateRec;' - print '' - return - - - def printBody(self, api): - for func in api.functionIterateAll(): - if not func.ignore and not func.vectorequiv: - if func.glx_rop: - print 'extern _X_HIDDEN void __glXDisp_%s(GLbyte * pc);' % (func.name) - print 'extern _X_HIDDEN void __glXDispSwap_%s(GLbyte * pc);' % (func.name) - elif func.glx_sop or func.glx_vendorpriv: - print 'extern _X_HIDDEN int __glXDisp_%s(struct __GLXclientStateRec *, GLbyte *);' % (func.name) - print 'extern _X_HIDDEN int __glXDispSwap_%s(struct __GLXclientStateRec *, GLbyte *);' % (func.name) - - if func.glx_sop and func.glx_vendorpriv: - n = func.glx_vendorpriv_names[0] - print 'extern _X_HIDDEN int __glXDisp_%s(struct __GLXclientStateRec *, GLbyte *);' % (n) - print 'extern _X_HIDDEN int __glXDispSwap_%s(struct __GLXclientStateRec *, GLbyte *);' % (n) - - return - - -class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto): - def __init__(self, do_swap): - gl_XML.gl_print_base.__init__(self) - self.name = "glX_proto_recv.py (from Mesa)" - self.license = license.bsd_license_template % ( "(C) Copyright IBM Corporation 2005", "IBM") - - self.real_types = [ '', '', 'uint16_t', '', 'uint32_t', '', '', '', 'uint64_t' ] - self.do_swap = do_swap - return - - - def printRealHeader(self): - print '#include ' - print '#include ' - print '#include ' - - print '#include ' - print '#include "indirect_size.h"' - print '#include "indirect_size_get.h"' - print '#include "indirect_dispatch.h"' - print '#include "glxserver.h"' - print '#include "glxbyteorder.h"' - print '#include "indirect_util.h"' - print '#include "singlesize.h"' - print '#include "glapi.h"' - print '#include "glapitable.h"' - print '#include "glthread.h"' - print '#include "dispatch.h"' - print '' - print '#define __GLX_PAD(x) (((x) + 3) & ~3)' - print '' - print 'typedef struct {' - print ' __GLX_PIXEL_3D_HDR;' - print '} __GLXpixel3DHeader;' - print '' - print 'extern GLboolean __glXErrorOccured( void );' - print 'extern void __glXClearErrorOccured( void );' - print '' - print 'static const unsigned dummy_answer[2] = {0, 0};' - print '' - return - - - def printBody(self, api): - if self.do_swap: - self.emit_swap_wrappers(api) - - - for func in api.functionIterateByOffset(): - if not func.ignore and not func.server_handcode and not func.vectorequiv and (func.glx_rop or func.glx_sop or func.glx_vendorpriv): - self.printFunction(func, func.name) - if func.glx_sop and func.glx_vendorpriv: - self.printFunction(func, func.glx_vendorpriv_names[0]) - - - return - - - def printFunction(self, f, name): - if (f.glx_sop or f.glx_vendorpriv) and (len(f.get_images()) != 0): - return - - if not self.do_swap: - base = '__glXDisp' - else: - base = '__glXDispSwap' - - if f.glx_rop: - print 'void %s_%s(GLbyte * pc)' % (base, name) - else: - print 'int %s_%s(__GLXclientState *cl, GLbyte *pc)' % (base, name) - - print '{' - - if f.glx_rop or f.vectorequiv: - self.printRenderFunction(f) - elif f.glx_sop or f.glx_vendorpriv: - if len(f.get_images()) == 0: - self.printSingleFunction(f, name) - else: - print "/* Missing GLX protocol for %s. */" % (name) - - print '}' - print '' - return - - - def swap_name(self, bytes): - return 'bswap_%u_array' % (8 * bytes) - - - def emit_swap_wrappers(self, api): - self.type_map = {} - already_done = [ ] - - for t in api.typeIterate(): - te = t.get_type_expression() - t_size = te.get_element_size() - - if t_size > 1 and t.glx_name: - - t_name = "GL" + t.name - self.type_map[ t_name ] = t.glx_name - - if t.glx_name not in already_done: - real_name = self.real_types[t_size] - - print 'static %s' % (t_name) - print 'bswap_%s( const void * src )' % (t.glx_name) - print '{' - print ' union { %s dst; %s ret; } x;' % (real_name, t_name) - print ' x.dst = bswap_%u( *(%s *) src );' % (t_size * 8, real_name) - print ' return x.ret;' - print '}' - print '' - already_done.append( t.glx_name ) - - for bits in [16, 32, 64]: - print 'static void *' - print 'bswap_%u_array( uint%u_t * src, unsigned count )' % (bits, bits) - print '{' - print ' unsigned i;' - print '' - print ' for ( i = 0 ; i < count ; i++ ) {' - print ' uint%u_t temp = bswap_%u( src[i] );' % (bits, bits) - print ' src[i] = temp;' - print ' }' - print '' - print ' return src;' - print '}' - print '' - - - def fetch_param(self, param): - t = param.type_string() - o = param.offset - element_size = param.size() / param.get_element_count() - - if self.do_swap and (element_size != 1): - if param.is_array(): - real_name = self.real_types[ element_size ] - - swap_func = self.swap_name( element_size ) - return ' (%-8s)%s( (%s *) (pc + %2s), %s )' % (t, swap_func, real_name, o, param.count) - else: - t_name = param.get_base_type_string() - return ' (%-8s)bswap_%-7s( pc + %2s )' % (t, self.type_map[ t_name ], o) - else: - if param.is_array(): - return ' (%-8s)(pc + %2u)' % (t, o) - else: - return '*(%-8s *)(pc + %2u)' % (t, o) - - return None - - - def emit_function_call(self, f, retval_assign, indent): - list = [] - - for param in f.parameterIterator(): - if param.is_padding: - continue - - if param.is_counter or param.is_image() or param.is_output or param.name in f.count_parameter_list or len(param.count_parameter_list): - location = param.name - else: - location = self.fetch_param(param) - - list.append( '%s %s' % (indent, location) ) - - - if len( list ): - print '%s %sCALL_%s( GET_DISPATCH(), (' % (indent, retval_assign, f.name) - print string.join( list, ",\n" ) - print '%s ) );' % (indent) - else: - print '%s %sCALL_%s( GET_DISPATCH(), () );' % (indent, retval_assign, f.name) - return - - - def common_func_print_just_start(self, f, indent): - align64 = 0 - need_blank = 0 - - - f.calculate_offsets() - for param in f.parameterIterateGlxSend(): - # If any parameter has a 64-bit base type, then we - # have to do alignment magic for the while thing. - - if param.is_64_bit(): - align64 = 1 - - - # FIXME img_null_flag is over-loaded. In addition to - # FIXME being used for images, it is used to signify - # FIXME NULL data pointers for vertex buffer object - # FIXME related functions. Re-name it to null_data - # FIXME or something similar. - - if param.img_null_flag: - print '%s const CARD32 ptr_is_null = *(CARD32 *)(pc + %s);' % (indent, param.offset - 4) - cond = '(ptr_is_null != 0) ? NULL : ' - else: - cond = "" - - - type_string = param.type_string() - - if param.is_image(): - offset = f.offset_of( param.name ) - - print '%s %s const %s = (%s) (%s(pc + %s));' % (indent, type_string, param.name, type_string, cond, offset) - - if param.depth: - print '%s __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc);' % (indent) - else: - print '%s __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);' % (indent) - - need_blank = 1 - elif param.is_counter or param.name in f.count_parameter_list: - location = self.fetch_param(param) - print '%s const %s %s = %s;' % (indent, type_string, param.name, location) - need_blank = 1 - elif len(param.count_parameter_list): - if param.size() == 1 and not self.do_swap: - location = self.fetch_param(param) - print '%s %s %s = %s%s;' % (indent, type_string, param.name, cond, location) - else: - print '%s %s %s;' % (indent, type_string, param.name) - need_blank = 1 - - - - if need_blank: - print '' - - if align64: - print '#ifdef __GLX_ALIGN64' - - if f.has_variable_size_request(): - self.emit_packet_size_calculation(f, 4) - s = "cmdlen" - else: - s = str((f.command_fixed_length() + 3) & ~3) - - print ' if ((unsigned long)(pc) & 7) {' - print ' (void) memmove(pc-4, pc, %s);' % (s) - print ' pc -= 4;' - print ' }' - print '#endif' - print '' - - - need_blank = 0 - if self.do_swap: - for param in f.parameterIterateGlxSend(): - if param.count_parameter_list: - o = param.offset - count = param.get_element_count() - type_size = param.size() / count - - if param.counter: - count_name = param.counter - else: - count_name = str(count) - - # This is basically an ugly special- - # case for glCallLists. - - if type_size == 1: - x = [] - x.append( [1, ['BYTE', 'UNSIGNED_BYTE', '2_BYTES', '3_BYTES', '4_BYTES']] ) - x.append( [2, ['SHORT', 'UNSIGNED_SHORT']] ) - x.append( [4, ['INT', 'UNSIGNED_INT', 'FLOAT']] ) - - print ' switch(%s) {' % (param.count_parameter_list[0]) - for sub in x: - for t_name in sub[1]: - print ' case GL_%s:' % (t_name) - - if sub[0] == 1: - print ' %s = (%s) (pc + %s); break;' % (param.name, param.type_string(), o) - else: - swap_func = self.swap_name(sub[0]) - print ' %s = (%s) %s( (%s *) (pc + %s), %s ); break;' % (param.name, param.type_string(), swap_func, self.real_types[sub[0]], o, count_name) - print ' default:' - print ' return;' - print ' }' - else: - swap_func = self.swap_name(type_size) - compsize = self.size_call(f, 1) - print ' %s = (%s) %s( (%s *) (pc + %s), %s );' % (param.name, param.type_string(), swap_func, self.real_types[type_size], o, compsize) - - need_blank = 1 - - else: - for param in f.parameterIterateGlxSend(): - if param.count_parameter_list: - print '%s %s = (%s) (pc + %s);' % (indent, param.name, param.type_string(), param.offset) - need_blank = 1 - - - if need_blank: - print '' - - - return - - - def printSingleFunction(self, f, name): - if name not in f.glx_vendorpriv_names: - print ' xGLXSingleReq * const req = (xGLXSingleReq *) pc;' - else: - print ' xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;' - - print ' int error;' - - if self.do_swap: - print ' __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);' - else: - print ' __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);' - - print '' - if name not in f.glx_vendorpriv_names: - print ' pc += __GLX_SINGLE_HDR_SIZE;' - else: - print ' pc += __GLX_VENDPRIV_HDR_SIZE;' - - print ' if ( cx != NULL ) {' - self.common_func_print_just_start(f, " ") - - - if f.return_type != 'void': - print ' %s retval;' % (f.return_type) - retval_string = "retval" - retval_assign = "retval = " - else: - retval_string = "0" - retval_assign = "" - - - type_size = 0 - answer_string = "dummy_answer" - answer_count = "0" - is_array_string = "GL_FALSE" - - for param in f.parameterIterateOutputs(): - answer_type = param.get_base_type_string() - if answer_type == "GLvoid": - answer_type = "GLubyte" - - - c = param.get_element_count() - type_size = (param.size() / c) - if type_size == 1: - size_scale = "" - else: - size_scale = " * %u" % (type_size) - - - if param.count_parameter_list: - print ' const GLuint compsize = %s;' % (self.size_call(f, 1)) - print ' %s answerBuffer[200];' % (answer_type) - print ' %s %s = __glXGetAnswerBuffer(cl, compsize%s, answerBuffer, sizeof(answerBuffer), %u);' % (param.type_string(), param.name, size_scale, type_size ) - answer_string = param.name - answer_count = "compsize" - - print '' - print ' if (%s == NULL) return BadAlloc;' % (param.name) - print ' __glXClearErrorOccured();' - print '' - elif param.counter: - print ' %s answerBuffer[200];' % (answer_type) - print ' %s %s = __glXGetAnswerBuffer(cl, %s%s, answerBuffer, sizeof(answerBuffer), %u);' % (param.type_string(), param.name, param.counter, size_scale, type_size) - answer_string = param.name - answer_count = param.counter - elif c >= 1: - print ' %s %s[%u];' % (answer_type, param.name, c) - answer_string = param.name - answer_count = "%u" % (c) - - if f.reply_always_array: - is_array_string = "GL_TRUE" - - - self.emit_function_call(f, retval_assign, " ") - - - if f.needs_reply(): - if self.do_swap: - for param in f.parameterIterateOutputs(): - c = param.get_element_count() - type_size = (param.size() / c) - - if type_size > 1: - swap_name = self.swap_name( type_size ) - print ' (void) %s( (uint%u_t *) %s, %s );' % (swap_name, 8 * type_size, param.name, answer_count) - - - reply_func = '__glXSendReplySwap' - else: - reply_func = '__glXSendReply' - - print ' %s(cl->client, %s, %s, %u, %s, %s);' % (reply_func, answer_string, answer_count, type_size, is_array_string, retval_string) - #elif f.note_unflushed: - # print ' cx->hasUnflushedCommands = GL_TRUE;' - - print ' error = Success;' - print ' }' - print '' - print ' return error;' - return - - - def printRenderFunction(self, f): - # There are 4 distinct phases in a rendering dispatch function. - # In the first phase we compute the sizes and offsets of each - # element in the command. In the second phase we (optionally) - # re-align 64-bit data elements. In the third phase we - # (optionally) byte-swap array data. Finally, in the fourth - # phase we actually dispatch the function. - - self.common_func_print_just_start(f, "") - - images = f.get_images() - if len(images): - if self.do_swap: - pre = "bswap_CARD32( & " - post = " )" - else: - pre = "" - post = "" - - img = images[0] - - # swapBytes and lsbFirst are single byte fields, so - # the must NEVER be byte-swapped. - - if not (img.img_type == "GL_BITMAP" and img.img_format == "GL_COLOR_INDEX"): - print ' CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );' - - print ' CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );' - - print ' CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) %shdr->rowLength%s) );' % (pre, post) - if img.depth: - print ' CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) %shdr->imageHeight%s) );' % (pre, post) - print ' CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) %shdr->skipRows%s) );' % (pre, post) - if img.depth: - print ' CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) %shdr->skipImages%s) );' % (pre, post) - print ' CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) %shdr->skipPixels%s) );' % (pre, post) - print ' CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) %shdr->alignment%s) );' % (pre, post) - print '' - - - self.emit_function_call(f, "", "") - return - - -if __name__ == '__main__': - file_name = "gl_API.xml" - - try: - (args, trail) = getopt.getopt(sys.argv[1:], "f:m:s") - except Exception,e: - show_usage() - - mode = "dispatch_c" - do_swap = 0 - for (arg,val) in args: - if arg == "-f": - file_name = val - elif arg == "-m": - mode = val - elif arg == "-s": - do_swap = 1 - - if mode == "dispatch_c": - printer = PrintGlxDispatchFunctions(do_swap) - elif mode == "dispatch_h": - printer = PrintGlxDispatch_h() - else: - show_usage() - - api = gl_XML.parse_GL_API( file_name, glX_proto_common.glx_proto_item_factory() ) - - printer.Print( api ) diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/glX_proto_send.py b/dll/opengl/mesa/src/mapi/glapi/gen/glX_proto_send.py deleted file mode 100644 index bec0222188f..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/glX_proto_send.py +++ /dev/null @@ -1,1097 +0,0 @@ -#!/usr/bin/env python - -# (C) Copyright IBM Corporation 2004, 2005 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Ian Romanick -# Jeremy Kolb - -import gl_XML, glX_XML, glX_proto_common, license -import sys, getopt, copy, string - -def convertStringForXCB(str): - tmp = "" - special = [ "ARB" ] - i = 0 - while i < len(str): - if str[i:i+3] in special: - tmp = '%s_%s' % (tmp, string.lower(str[i:i+3])) - i = i + 2; - elif str[i].isupper(): - tmp = '%s_%s' % (tmp, string.lower(str[i])) - else: - tmp = '%s%s' % (tmp, str[i]) - i += 1 - return tmp - -def hash_pixel_function(func): - """Generate a 'unique' key for a pixel function. The key is based on - the parameters written in the command packet. This includes any - padding that might be added for the original function and the 'NULL - image' flag.""" - - - h = "" - hash_pre = "" - hash_suf = "" - for param in func.parameterIterateGlxSend(): - if param.is_image(): - [dim, junk, junk, junk, junk] = param.get_dimensions() - - d = (dim + 1) & ~1 - hash_pre = "%uD%uD_" % (d - 1, d) - - if param.img_null_flag: - hash_suf = "_NF" - - h += "%u" % (param.size()) - - if func.pad_after(param): - h += "4" - - - n = func.name.replace("%uD" % (dim), "") - n = "__glx_%s_%uD%uD" % (n, d - 1, d) - - h = hash_pre + h + hash_suf - return [h, n] - - -class glx_pixel_function_stub(glX_XML.glx_function): - """Dummy class used to generate pixel "utility" functions that are - shared by multiple dimension image functions. For example, these - objects are used to generate shared functions used to send GLX - protocol for TexImage1D and TexImage2D, TexSubImage1D and - TexSubImage2D, etc.""" - - def __init__(self, func, name): - # The parameters to the utility function are the same as the - # parameters to the real function except for the added "pad" - # parameters. - - self.name = name - self.images = [] - self.parameters = [] - self.parameters_by_name = {} - for _p in func.parameterIterator(): - p = copy.copy(_p) - self.parameters.append(p) - self.parameters_by_name[ p.name ] = p - - - if p.is_image(): - self.images.append(p) - p.height = "height" - - if p.img_yoff == None: - p.img_yoff = "yoffset" - - if p.depth: - if p.extent == None: - p.extent = "extent" - - if p.img_woff == None: - p.img_woff = "woffset" - - - pad_name = func.pad_after(p) - if pad_name: - pad = copy.copy(p) - pad.name = pad_name - self.parameters.append(pad) - self.parameters_by_name[ pad.name ] = pad - - - self.return_type = func.return_type - - self.glx_rop = ~0 - self.glx_sop = 0 - self.glx_vendorpriv = 0 - - self.glx_doubles_in_order = func.glx_doubles_in_order - - self.vectorequiv = None - self.output = None - self.can_be_large = func.can_be_large - self.reply_always_array = func.reply_always_array - self.dimensions_in_reply = func.dimensions_in_reply - self.img_reset = None - - self.server_handcode = 0 - self.client_handcode = 0 - self.ignore = 0 - - self.count_parameter_list = func.count_parameter_list - self.counter_list = func.counter_list - self.offsets_calculated = 0 - return - - -class PrintGlxProtoStubs(glX_proto_common.glx_print_proto): - def __init__(self): - glX_proto_common.glx_print_proto.__init__(self) - self.name = "glX_proto_send.py (from Mesa)" - self.license = license.bsd_license_template % ( "(C) Copyright IBM Corporation 2004, 2005", "IBM") - - - self.last_category = "" - self.generic_sizes = [3, 4, 6, 8, 12, 16, 24, 32] - self.pixel_stubs = {} - self.debug = 0 - return - - def printRealHeader(self): - print '' - print '#include ' - print '#include "indirect.h"' - print '#include "glxclient.h"' - print '#include "indirect_size.h"' - print '#include "glapi.h"' - print '#include "glthread.h"' - print '#include ' - print '#ifdef USE_XCB' - print '#include ' - print '#include ' - print '#include ' - print '#endif /* USE_XCB */' - - print '' - print '#define __GLX_PAD(n) (((n) + 3) & ~3)' - print '' - self.printFastcall() - self.printNoinline() - print '' - print '#ifndef __GNUC__' - print '# define __builtin_expect(x, y) x' - print '#endif' - print '' - print '/* If the size and opcode values are known at compile-time, this will, on' - print ' * x86 at least, emit them with a single instruction.' - print ' */' - print '#define emit_header(dest, op, size) \\' - print ' do { union { short s[2]; int i; } temp; \\' - print ' temp.s[0] = (size); temp.s[1] = (op); \\' - print ' *((int *)(dest)) = temp.i; } while(0)' - print '' - print """NOINLINE CARD32 -__glXReadReply( Display *dpy, size_t size, void * dest, GLboolean reply_is_always_array ) -{ - xGLXSingleReply reply; - - (void) _XReply(dpy, (xReply *) & reply, 0, False); - if (size != 0) { - if ((reply.length > 0) || reply_is_always_array) { - const GLint bytes = (reply_is_always_array) - ? (4 * reply.length) : (reply.size * size); - const GLint extra = 4 - (bytes & 3); - - _XRead(dpy, dest, bytes); - if ( extra < 4 ) { - _XEatData(dpy, extra); - } - } - else { - (void) memcpy( dest, &(reply.pad3), size); - } - } - - return reply.retval; -} - -NOINLINE void -__glXReadPixelReply( Display *dpy, struct glx_context * gc, unsigned max_dim, - GLint width, GLint height, GLint depth, GLenum format, GLenum type, - void * dest, GLboolean dimensions_in_reply ) -{ - xGLXSingleReply reply; - GLint size; - - (void) _XReply(dpy, (xReply *) & reply, 0, False); - - if ( dimensions_in_reply ) { - width = reply.pad3; - height = reply.pad4; - depth = reply.pad5; - - if ((height == 0) || (max_dim < 2)) { height = 1; } - if ((depth == 0) || (max_dim < 3)) { depth = 1; } - } - - size = reply.length * 4; - if (size != 0) { - void * buf = Xmalloc( size ); - - if ( buf == NULL ) { - _XEatData(dpy, size); - __glXSetError(gc, GL_OUT_OF_MEMORY); - } - else { - const GLint extra = 4 - (size & 3); - - _XRead(dpy, buf, size); - if ( extra < 4 ) { - _XEatData(dpy, extra); - } - - __glEmptyImage(gc, 3, width, height, depth, format, type, - buf, dest); - Xfree(buf); - } - } -} - -#define X_GLXSingle 0 - -NOINLINE FASTCALL GLubyte * -__glXSetupSingleRequest( struct glx_context * gc, GLint sop, GLint cmdlen ) -{ - xGLXSingleReq * req; - Display * const dpy = gc->currentDpy; - - (void) __glXFlushRenderBuffer(gc, gc->pc); - LockDisplay(dpy); - GetReqExtra(GLXSingle, cmdlen, req); - req->reqType = gc->majorOpcode; - req->contextTag = gc->currentContextTag; - req->glxCode = sop; - return (GLubyte *)(req) + sz_xGLXSingleReq; -} - -NOINLINE FASTCALL GLubyte * -__glXSetupVendorRequest( struct glx_context * gc, GLint code, GLint vop, GLint cmdlen ) -{ - xGLXVendorPrivateReq * req; - Display * const dpy = gc->currentDpy; - - (void) __glXFlushRenderBuffer(gc, gc->pc); - LockDisplay(dpy); - GetReqExtra(GLXVendorPrivate, cmdlen, req); - req->reqType = gc->majorOpcode; - req->glxCode = code; - req->vendorCode = vop; - req->contextTag = gc->currentContextTag; - return (GLubyte *)(req) + sz_xGLXVendorPrivateReq; -} - -const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 }; - -#define zero (__glXDefaultPixelStore+0) -#define one (__glXDefaultPixelStore+8) -#define default_pixel_store_1D (__glXDefaultPixelStore+4) -#define default_pixel_store_1D_size 20 -#define default_pixel_store_2D (__glXDefaultPixelStore+4) -#define default_pixel_store_2D_size 20 -#define default_pixel_store_3D (__glXDefaultPixelStore+0) -#define default_pixel_store_3D_size 36 -#define default_pixel_store_4D (__glXDefaultPixelStore+0) -#define default_pixel_store_4D_size 36 -""" - - for size in self.generic_sizes: - self.print_generic_function(size) - return - - - def printBody(self, api): - - self.pixel_stubs = {} - generated_stubs = [] - - for func in api.functionIterateGlx(): - if func.client_handcode: continue - - # If the function is a pixel function with a certain - # GLX protocol signature, create a fake stub function - # for it. For example, create a single stub function - # that is used to implement both glTexImage1D and - # glTexImage2D. - - if func.glx_rop != 0: - do_it = 0 - for image in func.get_images(): - if image.img_pad_dimensions: - do_it = 1 - break - - - if do_it: - [h, n] = hash_pixel_function(func) - - - self.pixel_stubs[ func.name ] = n - if h not in generated_stubs: - generated_stubs.append(h) - - fake_func = glx_pixel_function_stub( func, n ) - self.printFunction(fake_func, fake_func.name) - - - self.printFunction(func, func.name) - if func.glx_sop and func.glx_vendorpriv: - self.printFunction(func, func.glx_vendorpriv_names[0]) - - self.printGetProcAddress(api) - return - - def printGetProcAddress(self, api): - procs = {} - for func in api.functionIterateGlx(): - for n in func.entry_points: - if func.has_different_protocol(n): - procs[n] = func.static_glx_name(n) - - print """ -#ifdef GLX_SHARED_GLAPI - -static const struct proc_pair -{ - const char *name; - _glapi_proc proc; -} proc_pairs[%d] = {""" % len(procs) - names = procs.keys() - names.sort() - for i in xrange(len(names)): - comma = ',' if i < len(names) - 1 else '' - print ' { "%s", (_glapi_proc) gl%s }%s' % (names[i], procs[names[i]], comma) - print """}; - -static int -__indirect_get_proc_compare(const void *key, const void *memb) -{ - const struct proc_pair *pair = (const struct proc_pair *) memb; - return strcmp((const char *) key, pair->name); -} - -_glapi_proc -__indirect_get_proc_address(const char *name) -{ - const struct proc_pair *pair; - - /* skip "gl" */ - name += 2; - - pair = (const struct proc_pair *) bsearch((const void *) name, - (const void *) proc_pairs, ARRAY_SIZE(proc_pairs), sizeof(proc_pairs[0]), - __indirect_get_proc_compare); - - return (pair) ? pair->proc : NULL; -} - -#endif /* GLX_SHARED_GLAPI */ -""" - return - - - def printFunction(self, func, name): - footer = '}\n' - if func.glx_rop == ~0: - print 'static %s' % (func.return_type) - print '%s( unsigned opcode, unsigned dim, %s )' % (func.name, func.get_parameter_string()) - print '{' - else: - if func.has_different_protocol(name): - if func.return_type == "void": - ret_string = '' - else: - ret_string = "return " - - func_name = func.static_glx_name(name) - print '#define %s %d' % (func.opcode_vendor_name(name), func.glx_vendorpriv) - print '%s gl%s(%s)' % (func.return_type, func_name, func.get_parameter_string()) - print '{' - print ' struct glx_context * const gc = __glXGetCurrentContext();' - print '' - print '#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)' - print ' if (gc->isDirect) {' - print ' %sGET_DISPATCH()->%s(%s);' % (ret_string, func.name, func.get_called_parameter_string()) - print ' } else' - print '#endif' - print ' {' - - footer = '}\n}\n' - else: - print '#define %s %d' % (func.opcode_name(), func.opcode_value()) - - print '%s __indirect_gl%s(%s)' % (func.return_type, name, func.get_parameter_string()) - print '{' - - - if func.glx_rop != 0 or func.vectorequiv != None: - if len(func.images): - self.printPixelFunction(func) - else: - self.printRenderFunction(func) - elif func.glx_sop != 0 or func.glx_vendorpriv != 0: - self.printSingleFunction(func, name) - pass - else: - print "/* Missing GLX protocol for %s. */" % (name) - - print footer - return - - - def print_generic_function(self, n): - size = (n + 3) & ~3 - print """static FASTCALL NOINLINE void -generic_%u_byte( GLint rop, const void * ptr ) -{ - struct glx_context * const gc = __glXGetCurrentContext(); - const GLuint cmdlen = %u; - - emit_header(gc->pc, rop, cmdlen); - (void) memcpy((void *)(gc->pc + 4), ptr, %u); - gc->pc += cmdlen; - if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } -} -""" % (n, size + 4, size) - return - - - def common_emit_one_arg(self, p, pc, adjust, extra_offset): - if p.is_array(): - src_ptr = p.name - else: - src_ptr = "&" + p.name - - if p.is_padding: - print '(void) memset((void *)(%s + %u), 0, %s);' \ - % (pc, p.offset + adjust, p.size_string() ) - elif not extra_offset: - print '(void) memcpy((void *)(%s + %u), (void *)(%s), %s);' \ - % (pc, p.offset + adjust, src_ptr, p.size_string() ) - else: - print '(void) memcpy((void *)(%s + %u + %s), (void *)(%s), %s);' \ - % (pc, p.offset + adjust, extra_offset, src_ptr, p.size_string() ) - - def common_emit_args(self, f, pc, adjust, skip_vla): - extra_offset = None - - for p in f.parameterIterateGlxSend( not skip_vla ): - if p.name != f.img_reset: - self.common_emit_one_arg(p, pc, adjust, extra_offset) - - if p.is_variable_length(): - temp = p.size_string() - if extra_offset: - extra_offset += " + %s" % (temp) - else: - extra_offset = temp - - return - - - def pixel_emit_args(self, f, pc, large): - """Emit the arguments for a pixel function. This differs from - common_emit_args in that pixel functions may require padding - be inserted (i.e., for the missing width field for - TexImage1D), and they may also require a 'NULL image' flag - be inserted before the image data.""" - - if large: - adjust = 8 - else: - adjust = 4 - - for param in f.parameterIterateGlxSend(): - if not param.is_image(): - self.common_emit_one_arg(param, pc, adjust, None) - - if f.pad_after(param): - print '(void) memcpy((void *)(%s + %u), zero, 4);' % (pc, (param.offset + param.size()) + adjust) - - else: - [dim, width, height, depth, extent] = param.get_dimensions() - if f.glx_rop == ~0: - dim_str = "dim" - else: - dim_str = str(dim) - - if param.is_padding: - print '(void) memset((void *)(%s + %u), 0, %s);' \ - % (pc, (param.offset - 4) + adjust, param.size_string() ) - - if param.img_null_flag: - if large: - print '(void) memcpy((void *)(%s + %u), zero, 4);' % (pc, (param.offset - 4) + adjust) - else: - print '(void) memcpy((void *)(%s + %u), (void *)((%s == NULL) ? one : zero), 4);' % (pc, (param.offset - 4) + adjust, param.name) - - - pixHeaderPtr = "%s + %u" % (pc, adjust) - pcPtr = "%s + %u" % (pc, param.offset + adjust) - - if not large: - if param.img_send_null: - condition = '(compsize > 0) && (%s != NULL)' % (param.name) - else: - condition = 'compsize > 0' - - print 'if (%s) {' % (condition) - print ' (*gc->fillImage)(gc, %s, %s, %s, %s, %s, %s, %s, %s, %s);' % (dim_str, width, height, depth, param.img_format, param.img_type, param.name, pcPtr, pixHeaderPtr) - print '} else {' - print ' (void) memcpy( %s, default_pixel_store_%uD, default_pixel_store_%uD_size );' % (pixHeaderPtr, dim, dim) - print '}' - else: - print '__glXSendLargeImage(gc, compsize, %s, %s, %s, %s, %s, %s, %s, %s, %s);' % (dim_str, width, height, depth, param.img_format, param.img_type, param.name, pcPtr, pixHeaderPtr) - - return - - - def large_emit_begin(self, f, op_name = None): - if not op_name: - op_name = f.opcode_real_name() - - print 'const GLint op = %s;' % (op_name) - print 'const GLuint cmdlenLarge = cmdlen + 4;' - print 'GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc);' - print '(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4);' - print '(void) memcpy((void *)(pc + 4), (void *)(&op), 4);' - return - - - def common_func_print_just_start(self, f, name): - print ' struct glx_context * const gc = __glXGetCurrentContext();' - - # The only reason that single and vendor private commands need - # a variable called 'dpy' is becuase they use the SyncHandle - # macro. For whatever brain-dead reason, that macro is hard- - # coded to use a variable called 'dpy' instead of taking a - # parameter. - - # FIXME Simplify the logic related to skip_condition and - # FIXME condition_list in this function. Basically, remove - # FIXME skip_condition, and just append the "dpy != NULL" type - # FIXME condition to condition_list from the start. The only - # FIXME reason it's done in this confusing way now is to - # FIXME minimize the diffs in the generated code. - - if not f.glx_rop: - for p in f.parameterIterateOutputs(): - if p.is_image() and (p.img_format != "GL_COLOR_INDEX" or p.img_type != "GL_BITMAP"): - print ' const __GLXattribute * const state = gc->client_state_private;' - break - - print ' Display * const dpy = gc->currentDpy;' - skip_condition = "dpy != NULL" - elif f.can_be_large: - skip_condition = "gc->currentDpy != NULL" - else: - skip_condition = None - - - if f.return_type != 'void': - print ' %s retval = (%s) 0;' % (f.return_type, f.return_type) - - - if name != None and name not in f.glx_vendorpriv_names: - print '#ifndef USE_XCB' - self.emit_packet_size_calculation(f, 0) - if name != None and name not in f.glx_vendorpriv_names: - print '#endif' - - condition_list = [] - for p in f.parameterIterateCounters(): - condition_list.append( "%s >= 0" % (p.name) ) - # 'counter' parameters cannot be negative - print " if (%s < 0) {" % p.name - print " __glXSetError(gc, GL_INVALID_VALUE);" - if f.return_type != 'void': - print " return 0;" - else: - print " return;" - print " }" - - if skip_condition: - condition_list.append( skip_condition ) - - if len( condition_list ) > 0: - if len( condition_list ) > 1: - skip_condition = "(%s)" % (string.join( condition_list, ") && (" )) - else: - skip_condition = "%s" % (condition_list.pop(0)) - - print ' if (__builtin_expect(%s, 1)) {' % (skip_condition) - return 1 - else: - return 0 - - - def printSingleFunction(self, f, name): - self.common_func_print_just_start(f, name) - - if self.debug: - print ' printf( "Enter %%s...\\n", "gl%s" );' % (f.name) - - if name not in f.glx_vendorpriv_names: - - # XCB specific: - print '#ifdef USE_XCB' - if self.debug: - print ' printf("\\tUsing XCB.\\n");' - print ' xcb_connection_t *c = XGetXCBConnection(dpy);' - print ' (void) __glXFlushRenderBuffer(gc, gc->pc);' - xcb_name = 'xcb_glx%s' % convertStringForXCB(name) - - iparams=[] - extra_iparams = [] - output = None - for p in f.parameterIterator(): - if p.is_output: - output = p - - if p.is_image(): - if p.img_format != "GL_COLOR_INDEX" or p.img_type != "GL_BITMAP": - extra_iparams.append("state->storePack.swapEndian") - else: - extra_iparams.append("0") - - # Hardcode this in. lsb_first param (apparently always GL_FALSE) - # also present in GetPolygonStipple, but taken care of above. - if xcb_name == "xcb_glx_read_pixels": - extra_iparams.append("0") - else: - iparams.append(p.name) - - - xcb_request = '%s(%s)' % (xcb_name, ", ".join(["c", "gc->currentContextTag"] + iparams + extra_iparams)) - - if f.needs_reply(): - print ' %s_reply_t *reply = %s_reply(c, %s, NULL);' % (xcb_name, xcb_name, xcb_request) - if output and f.reply_always_array: - print ' (void)memcpy(%s, %s_data(reply), %s_data_length(reply) * sizeof(%s));' % (output.name, xcb_name, xcb_name, output.get_base_type_string()) - - elif output and not f.reply_always_array: - if not output.is_image(): - print ' if (%s_data_length(reply) == 0)' % (xcb_name) - print ' (void)memcpy(%s, &reply->datum, sizeof(reply->datum));' % (output.name) - print ' else' - print ' (void)memcpy(%s, %s_data(reply), %s_data_length(reply) * sizeof(%s));' % (output.name, xcb_name, xcb_name, output.get_base_type_string()) - - - if f.return_type != 'void': - print ' retval = reply->ret_val;' - print ' free(reply);' - else: - print ' ' + xcb_request + ';' - print '#else' - # End of XCB specific. - - - if f.parameters != []: - pc_decl = "GLubyte const * pc =" - else: - pc_decl = "(void)" - - if name in f.glx_vendorpriv_names: - print ' %s __glXSetupVendorRequest(gc, %s, %s, cmdlen);' % (pc_decl, f.opcode_real_name(), f.opcode_vendor_name(name)) - else: - print ' %s __glXSetupSingleRequest(gc, %s, cmdlen);' % (pc_decl, f.opcode_name()) - - self.common_emit_args(f, "pc", 0, 0) - - images = f.get_images() - - for img in images: - if img.is_output: - o = f.command_fixed_length() - 4 - print ' *(int32_t *)(pc + %u) = 0;' % (o) - if img.img_format != "GL_COLOR_INDEX" or img.img_type != "GL_BITMAP": - print ' * (int8_t *)(pc + %u) = state->storePack.swapEndian;' % (o) - - if f.img_reset: - print ' * (int8_t *)(pc + %u) = %s;' % (o + 1, f.img_reset) - - - return_name = '' - if f.needs_reply(): - if f.return_type != 'void': - return_name = " retval" - return_str = " retval = (%s)" % (f.return_type) - else: - return_str = " (void)" - - got_reply = 0 - - for p in f.parameterIterateOutputs(): - if p.is_image(): - [dim, w, h, d, junk] = p.get_dimensions() - if f.dimensions_in_reply: - print " __glXReadPixelReply(dpy, gc, %u, 0, 0, 0, %s, %s, %s, GL_TRUE);" % (dim, p.img_format, p.img_type, p.name) - else: - print " __glXReadPixelReply(dpy, gc, %u, %s, %s, %s, %s, %s, %s, GL_FALSE);" % (dim, w, h, d, p.img_format, p.img_type, p.name) - - got_reply = 1 - else: - if f.reply_always_array: - aa = "GL_TRUE" - else: - aa = "GL_FALSE" - - # gl_parameter.size() returns the size - # of the entire data item. If the - # item is a fixed-size array, this is - # the size of the whole array. This - # is not what __glXReadReply wants. It - # wants the size of a single data - # element in the reply packet. - # Dividing by the array size (1 for - # non-arrays) gives us this. - - s = p.size() / p.get_element_count() - print " %s __glXReadReply(dpy, %s, %s, %s);" % (return_str, s, p.name, aa) - got_reply = 1 - - - # If a reply wasn't read to fill an output parameter, - # read a NULL reply to get the return value. - - if not got_reply: - print " %s __glXReadReply(dpy, 0, NULL, GL_FALSE);" % (return_str) - - - elif self.debug: - # Only emit the extra glFinish call for functions - # that don't already require a reply from the server. - print ' __indirect_glFinish();' - - if self.debug: - print ' printf( "Exit %%s.\\n", "gl%s" );' % (name) - - - print ' UnlockDisplay(dpy); SyncHandle();' - - if name not in f.glx_vendorpriv_names: - print '#endif /* USE_XCB */' - - print ' }' - print ' return%s;' % (return_name) - return - - - def printPixelFunction(self, f): - if self.pixel_stubs.has_key( f.name ): - # Normally gl_function::get_parameter_string could be - # used. However, this call needs to have the missing - # dimensions (e.g., a fake height value for - # glTexImage1D) added in. - - p_string = "" - for param in f.parameterIterateGlxSend(): - if param.is_padding: - continue - - p_string += ", " + param.name - - if param.is_image(): - [dim, junk, junk, junk, junk] = param.get_dimensions() - - if f.pad_after(param): - p_string += ", 1" - - print ' %s(%s, %u%s );' % (self.pixel_stubs[f.name] , f.opcode_name(), dim, p_string) - return - - - if self.common_func_print_just_start(f, None): - trailer = " }" - else: - trailer = None - - - if f.can_be_large: - print 'if (cmdlen <= gc->maxSmallRenderCommandSize) {' - print ' if ( (gc->pc + cmdlen) > gc->bufEnd ) {' - print ' (void) __glXFlushRenderBuffer(gc, gc->pc);' - print ' }' - - if f.glx_rop == ~0: - opcode = "opcode" - else: - opcode = f.opcode_real_name() - - print 'emit_header(gc->pc, %s, cmdlen);' % (opcode) - - self.pixel_emit_args( f, "gc->pc", 0 ) - print 'gc->pc += cmdlen;' - print 'if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); }' - - if f.can_be_large: - print '}' - print 'else {' - - self.large_emit_begin(f, opcode) - self.pixel_emit_args(f, "pc", 1) - - print '}' - - if trailer: print trailer - return - - - def printRenderFunction(self, f): - # There is a class of GL functions that take a single pointer - # as a parameter. This pointer points to a fixed-size chunk - # of data, and the protocol for this functions is very - # regular. Since they are so regular and there are so many - # of them, special case them with generic functions. On - # x86, this saves about 26KB in the libGL.so binary. - - if f.variable_length_parameter() == None and len(f.parameters) == 1: - p = f.parameters[0] - if p.is_pointer(): - cmdlen = f.command_fixed_length() - if cmdlen in self.generic_sizes: - print ' generic_%u_byte( %s, %s );' % (cmdlen, f.opcode_real_name(), p.name) - return - - if self.common_func_print_just_start(f, None): - trailer = " }" - else: - trailer = None - - if self.debug: - print 'printf( "Enter %%s...\\n", "gl%s" );' % (f.name) - - if f.can_be_large: - print 'if (cmdlen <= gc->maxSmallRenderCommandSize) {' - print ' if ( (gc->pc + cmdlen) > gc->bufEnd ) {' - print ' (void) __glXFlushRenderBuffer(gc, gc->pc);' - print ' }' - - print 'emit_header(gc->pc, %s, cmdlen);' % (f.opcode_real_name()) - - self.common_emit_args(f, "gc->pc", 4, 0) - print 'gc->pc += cmdlen;' - print 'if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); }' - - if f.can_be_large: - print '}' - print 'else {' - - self.large_emit_begin(f) - self.common_emit_args(f, "pc", 8, 1) - - p = f.variable_length_parameter() - print ' __glXSendLargeCommand(gc, pc, %u, %s, %s);' % (p.offset + 8, p.name, p.size_string()) - print '}' - - if self.debug: - print '__indirect_glFinish();' - print 'printf( "Exit %%s.\\n", "gl%s" );' % (f.name) - - if trailer: print trailer - return - - -class PrintGlxProtoInit_c(gl_XML.gl_print_base): - def __init__(self): - gl_XML.gl_print_base.__init__(self) - - self.name = "glX_proto_send.py (from Mesa)" - self.license = license.bsd_license_template % ( \ -"""Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -(C) Copyright IBM Corporation 2004""", "PRECISION INSIGHT, IBM") - return - - - def printRealHeader(self): - print """/** - * \\file indirect_init.c - * Initialize indirect rendering dispatch table. - * - * \\author Kevin E. Martin - * \\author Brian Paul - * \\author Ian Romanick - */ - -#include "indirect_init.h" -#include "indirect.h" -#include "glapi.h" - - -/** - * No-op function used to initialize functions that have no GLX protocol - * support. - */ -static int NoOp(void) -{ - return 0; -} - -/** - * Create and initialize a new GL dispatch table. The table is initialized - * with GLX indirect rendering protocol functions. - */ -struct _glapi_table * __glXNewIndirectAPI( void ) -{ - struct _glapi_table *glAPI; - GLuint entries; - - entries = _glapi_get_dispatch_table_size(); - glAPI = (struct _glapi_table *) Xmalloc(entries * sizeof(void *)); - - /* first, set all entries to point to no-op functions */ - { - int i; - void **dispatch = (void **) glAPI; - for (i = 0; i < entries; i++) { - dispatch[i] = (void *) NoOp; - } - } - - /* now, initialize the entries we understand */""" - - def printRealFooter(self): - print """ - return glAPI; -} -""" - return - - - def printBody(self, api): - for [name, number] in api.categoryIterate(): - if number != None: - preamble = '\n /* %3u. %s */\n\n' % (int(number), name) - else: - preamble = '\n /* %s */\n\n' % (name) - - for func in api.functionIterateByCategory(name): - if func.client_supported_for_indirect(): - print '%s glAPI->%s = __indirect_gl%s;' % (preamble, func.name, func.name) - preamble = '' - - return - - -class PrintGlxProtoInit_h(gl_XML.gl_print_base): - def __init__(self): - gl_XML.gl_print_base.__init__(self) - - self.name = "glX_proto_send.py (from Mesa)" - self.license = license.bsd_license_template % ( \ -"""Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. -(C) Copyright IBM Corporation 2004""", "PRECISION INSIGHT, IBM") - self.header_tag = "_INDIRECT_H_" - - self.last_category = "" - return - - - def printRealHeader(self): - print """/** - * \\file - * Prototypes for indirect rendering functions. - * - * \\author Kevin E. Martin - * \\author Ian Romanick - */ -""" - self.printFastcall() - self.printNoinline() - - print """ -#include -#include "glxclient.h" - -extern _X_HIDDEN NOINLINE CARD32 __glXReadReply( Display *dpy, size_t size, - void * dest, GLboolean reply_is_always_array ); - -extern _X_HIDDEN NOINLINE void __glXReadPixelReply( Display *dpy, - struct glx_context * gc, unsigned max_dim, GLint width, GLint height, - GLint depth, GLenum format, GLenum type, void * dest, - GLboolean dimensions_in_reply ); - -extern _X_HIDDEN NOINLINE FASTCALL GLubyte * __glXSetupSingleRequest( - struct glx_context * gc, GLint sop, GLint cmdlen ); - -extern _X_HIDDEN NOINLINE FASTCALL GLubyte * __glXSetupVendorRequest( - struct glx_context * gc, GLint code, GLint vop, GLint cmdlen ); -""" - - - def printBody(self, api): - for func in api.functionIterateGlx(): - params = func.get_parameter_string() - - print 'extern _X_HIDDEN %s __indirect_gl%s(%s);' % (func.return_type, func.name, params) - - for n in func.entry_points: - if func.has_different_protocol(n): - asdf = func.static_glx_name(n) - if asdf not in func.static_entry_points: - print 'extern _X_HIDDEN %s gl%s(%s);' % (func.return_type, asdf, params) - # give it a easy-to-remember name - if func.client_handcode: - print '#define gl_dispatch_stub_%s gl%s' % (n, asdf) - else: - print 'GLAPI %s GLAPIENTRY gl%s(%s);' % (func.return_type, asdf, params) - - break - - print '' - print '#ifdef GLX_SHARED_GLAPI' - print 'extern _X_HIDDEN void (*__indirect_get_proc_address(const char *name))(void);' - print '#endif' - - -def show_usage(): - print "Usage: %s [-f input_file_name] [-m output_mode] [-d]" % sys.argv[0] - print " -m output_mode Output mode can be one of 'proto', 'init_c' or 'init_h'." - print " -d Enable extra debug information in the generated code." - sys.exit(1) - - -if __name__ == '__main__': - file_name = "gl_API.xml" - - try: - (args, trail) = getopt.getopt(sys.argv[1:], "f:m:d") - except Exception,e: - show_usage() - - debug = 0 - mode = "proto" - for (arg,val) in args: - if arg == "-f": - file_name = val - elif arg == "-m": - mode = val - elif arg == "-d": - debug = 1 - - if mode == "proto": - printer = PrintGlxProtoStubs() - elif mode == "init_c": - printer = PrintGlxProtoInit_c() - elif mode == "init_h": - printer = PrintGlxProtoInit_h() - else: - show_usage() - - - printer.debug = debug - api = gl_XML.parse_GL_API( file_name, glX_XML.glx_item_factory() ) - - printer.Print( api ) diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/glX_proto_size.py b/dll/opengl/mesa/src/mapi/glapi/gen/glX_proto_size.py deleted file mode 100644 index b31d1c65050..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/glX_proto_size.py +++ /dev/null @@ -1,703 +0,0 @@ -#!/usr/bin/env python - -# (C) Copyright IBM Corporation 2004, 2005 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Ian Romanick - -import gl_XML, glX_XML -import license -import sys, getopt, copy, string - - -class glx_enum_function: - def __init__(self, func_name, enum_dict): - self.name = func_name - self.mode = 1 - self.sig = None - - # "enums" is a set of lists. The element in the set is the - # value of the enum. The list is the list of names for that - # value. For example, [0x8126] = {"POINT_SIZE_MIN", - # "POINT_SIZE_MIN_ARB", "POINT_SIZE_MIN_EXT", - # "POINT_SIZE_MIN_SGIS"}. - - self.enums = {} - - # "count" is indexed by count values. Each element of count - # is a list of index to "enums" that have that number of - # associated data elements. For example, [4] = - # {GL_AMBIENT, GL_DIFFUSE, GL_SPECULAR, GL_EMISSION, - # GL_AMBIENT_AND_DIFFUSE} (the enum names are used here, - # but the actual hexadecimal values would be in the array). - - self.count = {} - - - # Fill self.count and self.enums using the dictionary of enums - # that was passed in. The generic Get functions (e.g., - # GetBooleanv and friends) are handled specially here. In - # the data the generic Get functions are refered to as "Get". - - if func_name in ["GetIntegerv", "GetBooleanv", "GetFloatv", "GetDoublev"]: - match_name = "Get" - else: - match_name = func_name - - mode_set = 0 - for enum_name in enum_dict: - e = enum_dict[ enum_name ] - - if e.functions.has_key( match_name ): - [count, mode] = e.functions[ match_name ] - - if mode_set and mode != self.mode: - raise RuntimeError("Not all enums for %s have the same mode." % (func_name)) - - self.mode = mode - - if self.enums.has_key( e.value ): - if e.name not in self.enums[ e.value ]: - self.enums[ e.value ].append( e ) - else: - if not self.count.has_key( count ): - self.count[ count ] = [] - - self.enums[ e.value ] = [ e ] - self.count[ count ].append( e.value ) - - - return - - - def signature( self ): - if self.sig == None: - self.sig = "" - for i in self.count: - if i == None: - raise RuntimeError("i is None. WTF?") - - self.count[i].sort() - for e in self.count[i]: - self.sig += "%04x,%d," % (e, i) - - return self.sig - - - def is_set( self ): - return self.mode - - - def PrintUsingTable(self): - """Emit the body of the __gl*_size function using a pair - of look-up tables and a mask. The mask is calculated such - that (e & mask) is unique for all the valid values of e for - this function. The result of (e & mask) is used as an index - into the first look-up table. If it matches e, then the - same entry of the second table is returned. Otherwise zero - is returned. - - It seems like this should cause better code to be generated. - However, on x86 at least, the resulting .o file is about 20% - larger then the switch-statment version. I am leaving this - code in because the results may be different on other - platforms (e.g., PowerPC or x86-64).""" - - return 0 - count = 0 - for a in self.enums: - count += 1 - - if self.count.has_key(-1): - return 0 - - # Determine if there is some mask M, such that M = (2^N) - 1, - # that will generate unique values for all of the enums. - - mask = 0 - for i in [1, 2, 3, 4, 5, 6, 7, 8]: - mask = (1 << i) - 1 - - fail = 0; - for a in self.enums: - for b in self.enums: - if a != b: - if (a & mask) == (b & mask): - fail = 1; - - if not fail: - break; - else: - mask = 0 - - if (mask != 0) and (mask < (2 * count)): - masked_enums = {} - masked_count = {} - - for i in range(0, mask + 1): - masked_enums[i] = "0"; - masked_count[i] = 0; - - for c in self.count: - for e in self.count[c]: - i = e & mask - enum_obj = self.enums[e][0] - masked_enums[i] = '0x%04x /* %s */' % (e, enum_obj.name ) - masked_count[i] = c - - - print ' static const GLushort a[%u] = {' % (mask + 1) - for e in masked_enums: - print ' %s, ' % (masked_enums[e]) - print ' };' - - print ' static const GLubyte b[%u] = {' % (mask + 1) - for c in masked_count: - print ' %u, ' % (masked_count[c]) - print ' };' - - print ' const unsigned idx = (e & 0x%02xU);' % (mask) - print '' - print ' return (e == a[idx]) ? (GLint) b[idx] : 0;' - return 1; - else: - return 0; - - - def PrintUsingSwitch(self, name): - """Emit the body of the __gl*_size function using a - switch-statement.""" - - print ' switch( e ) {' - - for c in self.count: - for e in self.count[c]: - first = 1 - - # There may be multiple enums with the same - # value. This happens has extensions are - # promoted from vendor-specific or EXT to - # ARB and to the core. Emit the first one as - # a case label, and emit the others as - # commented-out case labels. - - list = {} - for enum_obj in self.enums[e]: - list[ enum_obj.priority() ] = enum_obj.name - - keys = list.keys() - keys.sort() - for k in keys: - j = list[k] - if first: - print ' case GL_%s:' % (j) - first = 0 - else: - print '/* case GL_%s:*/' % (j) - - if c == -1: - print ' return __gl%s_variable_size( e );' % (name) - else: - print ' return %u;' % (c) - - print ' default: return 0;' - print ' }' - - - def Print(self, name): - print '_X_INTERNAL PURE FASTCALL GLint' - print '__gl%s_size( GLenum e )' % (name) - print '{' - - if not self.PrintUsingTable(): - self.PrintUsingSwitch(name) - - print '}' - print '' - - -class glx_server_enum_function(glx_enum_function): - def __init__(self, func, enum_dict): - glx_enum_function.__init__(self, func.name, enum_dict) - - self.function = func - return - - - def signature( self ): - if self.sig == None: - sig = glx_enum_function.signature(self) - - p = self.function.variable_length_parameter() - if p: - sig += "%u" % (p.size()) - - self.sig = sig - - return self.sig; - - - def Print(self, name, printer): - f = self.function - printer.common_func_print_just_header( f ) - - fixup = [] - - foo = {} - for param_name in f.count_parameter_list: - o = f.offset_of( param_name ) - foo[o] = param_name - - for param_name in f.counter_list: - o = f.offset_of( param_name ) - foo[o] = param_name - - keys = foo.keys() - keys.sort() - for o in keys: - p = f.parameters_by_name[ foo[o] ] - - printer.common_emit_one_arg(p, "pc", 0) - fixup.append( p.name ) - - - print ' GLsizei compsize;' - print '' - - printer.common_emit_fixups(fixup) - - print '' - print ' compsize = __gl%s_size(%s);' % (f.name, string.join(f.count_parameter_list, ",")) - p = f.variable_length_parameter() - print ' return __GLX_PAD(%s);' % (p.size_string()) - - print '}' - print '' - - -class PrintGlxSizeStubs_common(gl_XML.gl_print_base): - do_get = (1 << 0) - do_set = (1 << 1) - - def __init__(self, which_functions): - gl_XML.gl_print_base.__init__(self) - - self.name = "glX_proto_size.py (from Mesa)" - self.license = license.bsd_license_template % ( "(C) Copyright IBM Corporation 2004", "IBM") - - self.emit_set = ((which_functions & PrintGlxSizeStubs_common.do_set) != 0) - self.emit_get = ((which_functions & PrintGlxSizeStubs_common.do_get) != 0) - return - - -class PrintGlxSizeStubs_c(PrintGlxSizeStubs_common): - def printRealHeader(self): - print '' - print '#include ' - print '#include ' - if self.emit_get: - print '#include "indirect_size_get.h"' - print '#include "glxserver.h"' - print '#include "indirect_util.h"' - - print '#include "indirect_size.h"' - - print '' - self.printPure() - print '' - self.printFastcall() - print '' - print '' - print '#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(GLX_USE_APPLEGL)' - print '# undef HAVE_ALIAS' - print '#endif' - print '#ifdef HAVE_ALIAS' - print '# define ALIAS2(from,to) \\' - print ' _X_INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \\' - print ' __attribute__ ((alias( # to )));' - print '# define ALIAS(from,to) ALIAS2( from, __gl ## to ## _size )' - print '#else' - print '# define ALIAS(from,to) \\' - print ' _X_INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \\' - print ' { return __gl ## to ## _size( e ); }' - print '#endif' - print '' - print '' - - - def printBody(self, api): - enum_sigs = {} - aliases = [] - - for func in api.functionIterateGlx(): - ef = glx_enum_function( func.name, api.enums_by_name ) - if len(ef.enums) == 0: - continue - - if (ef.is_set() and self.emit_set) or (not ef.is_set() and self.emit_get): - sig = ef.signature() - if enum_sigs.has_key( sig ): - aliases.append( [func.name, enum_sigs[ sig ]] ) - else: - enum_sigs[ sig ] = func.name - ef.Print( func.name ) - - - for [alias_name, real_name] in aliases: - print 'ALIAS( %s, %s )' % (alias_name, real_name) - - - -class PrintGlxSizeStubs_h(PrintGlxSizeStubs_common): - def printRealHeader(self): - print """/** - * \\file - * Prototypes for functions used to determine the number of data elements in - * various GLX protocol messages. - * - * \\author Ian Romanick - */ -""" - print '#include ' - print '' - self.printPure(); - print '' - self.printFastcall(); - print '' - - - def printBody(self, api): - for func in api.functionIterateGlx(): - ef = glx_enum_function( func.name, api.enums_by_name ) - if len(ef.enums) == 0: - continue - - if (ef.is_set() and self.emit_set) or (not ef.is_set() and self.emit_get): - print 'extern _X_INTERNAL PURE FASTCALL GLint __gl%s_size(GLenum);' % (func.name) - - -class PrintGlxReqSize_common(gl_XML.gl_print_base): - """Common base class for PrintGlxSizeReq_h and PrintGlxSizeReq_h. - - The main purpose of this common base class is to provide the infrastructure - for the derrived classes to iterate over the same set of functions. - """ - - def __init__(self): - gl_XML.gl_print_base.__init__(self) - - self.name = "glX_proto_size.py (from Mesa)" - self.license = license.bsd_license_template % ( "(C) Copyright IBM Corporation 2005", "IBM") - - -class PrintGlxReqSize_h(PrintGlxReqSize_common): - def __init__(self): - PrintGlxReqSize_common.__init__(self) - self.header_tag = "_INDIRECT_REQSIZE_H_" - - - def printRealHeader(self): - print '#include ' - print '' - self.printPure() - print '' - - - def printBody(self, api): - for func in api.functionIterateGlx(): - if not func.ignore and func.has_variable_size_request(): - print 'extern PURE _X_HIDDEN int __glX%sReqSize(const GLbyte *pc, Bool swap);' % (func.name) - - -class PrintGlxReqSize_c(PrintGlxReqSize_common): - """Create the server-side 'request size' functions. - - Create the server-side functions that are used to determine what the - size of a varible length command should be. The server then uses - this value to determine if the incoming command packed it malformed. - """ - - def __init__(self): - PrintGlxReqSize_common.__init__(self) - self.counter_sigs = {} - - - def printRealHeader(self): - print '' - print '#include ' - print '#include "glxserver.h"' - print '#include "glxbyteorder.h"' - print '#include "indirect_size.h"' - print '#include "indirect_reqsize.h"' - print '' - print '#define __GLX_PAD(x) (((x) + 3) & ~3)' - print '' - print '#if defined(__CYGWIN__) || defined(__MINGW32__)' - print '# undef HAVE_ALIAS' - print '#endif' - print '#ifdef HAVE_ALIAS' - print '# define ALIAS2(from,to) \\' - print ' GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \\' - print ' __attribute__ ((alias( # to )));' - print '# define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize )' - print '#else' - print '# define ALIAS(from,to) \\' - print ' GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \\' - print ' { return __glX ## to ## ReqSize( pc, swap ); }' - print '#endif' - print '' - print '' - - - def printBody(self, api): - aliases = [] - enum_functions = {} - enum_sigs = {} - - for func in api.functionIterateGlx(): - if not func.has_variable_size_request(): continue - - ef = glx_server_enum_function( func, api.enums_by_name ) - if len(ef.enums) == 0: continue - - sig = ef.signature() - - if not enum_functions.has_key(func.name): - enum_functions[ func.name ] = sig - - if not enum_sigs.has_key( sig ): - enum_sigs[ sig ] = ef - - - - for func in api.functionIterateGlx(): - # Even though server-handcode fuctions are on "the - # list", and prototypes are generated for them, there - # isn't enough information to generate a size - # function. If there was enough information, they - # probably wouldn't need to be handcoded in the first - # place! - - if func.server_handcode: continue - if not func.has_variable_size_request(): continue - - if enum_functions.has_key(func.name): - sig = enum_functions[func.name] - ef = enum_sigs[ sig ] - - if ef.name != func.name: - aliases.append( [func.name, ef.name] ) - else: - ef.Print( func.name, self ) - - elif func.images: - self.printPixelFunction(func) - elif func.has_variable_size_request(): - a = self.printCountedFunction(func) - if a: aliases.append(a) - - - for [alias_name, real_name] in aliases: - print 'ALIAS( %s, %s )' % (alias_name, real_name) - - return - - - def common_emit_fixups(self, fixup): - """Utility function to emit conditional byte-swaps.""" - - if fixup: - print ' if (swap) {' - for name in fixup: - print ' %s = bswap_32(%s);' % (name, name) - print ' }' - - return - - - def common_emit_one_arg(self, p, pc, adjust): - offset = p.offset - dst = p.string() - src = '(%s *)' % (p.type_string()) - print '%-18s = *%11s(%s + %u);' % (dst, src, pc, offset + adjust); - return - - - def common_func_print_just_header(self, f): - print 'int' - print '__glX%sReqSize( const GLbyte * pc, Bool swap )' % (f.name) - print '{' - - - def printPixelFunction(self, f): - self.common_func_print_just_header(f) - - f.offset_of( f.parameters[0].name ) - [dim, w, h, d, junk] = f.get_images()[0].get_dimensions() - - print ' GLint row_length = * (GLint *)(pc + 4);' - - if dim < 3: - fixup = ['row_length', 'skip_rows', 'alignment'] - print ' GLint image_height = 0;' - print ' GLint skip_images = 0;' - print ' GLint skip_rows = * (GLint *)(pc + 8);' - print ' GLint alignment = * (GLint *)(pc + 16);' - else: - fixup = ['row_length', 'image_height', 'skip_rows', 'skip_images', 'alignment'] - print ' GLint image_height = * (GLint *)(pc + 8);' - print ' GLint skip_rows = * (GLint *)(pc + 16);' - print ' GLint skip_images = * (GLint *)(pc + 20);' - print ' GLint alignment = * (GLint *)(pc + 32);' - - img = f.images[0] - for p in f.parameterIterateGlxSend(): - if p.name in [w, h, d, img.img_format, img.img_type, img.img_target]: - self.common_emit_one_arg(p, "pc", 0) - fixup.append( p.name ) - - print '' - - self.common_emit_fixups(fixup) - - if img.img_null_flag: - print '' - print ' if (*(CARD32 *) (pc + %s))' % (img.offset - 4) - print ' return 0;' - - print '' - print ' return __glXImageSize(%s, %s, %s, %s, %s, %s,' % (img.img_format, img.img_type, img.img_target, w, h, d ) - print ' image_height, row_length, skip_images,' - print ' skip_rows, alignment);' - print '}' - print '' - return - - - def printCountedFunction(self, f): - - sig = "" - offset = 0 - fixup = [] - params = [] - plus = '' - size = '' - param_offsets = {} - - # Calculate the offset of each counter parameter and the - # size string for the variable length parameter(s). While - # that is being done, calculate a unique signature for this - # function. - - for p in f.parameterIterateGlxSend(): - if p.is_counter: - fixup.append( p.name ) - params.append( p ) - elif p.counter: - s = p.size() - if s == 0: s = 1 - - sig += "(%u,%u)" % (f.offset_of(p.counter), s) - size += '%s%s' % (plus, p.size_string()) - plus = ' + ' - - - # If the calculated signature matches a function that has - # already be emitted, don't emit this function. Instead, add - # it to the list of function aliases. - - if self.counter_sigs.has_key(sig): - n = self.counter_sigs[sig]; - alias = [f.name, n] - else: - alias = None - self.counter_sigs[sig] = f.name - - self.common_func_print_just_header(f) - - for p in params: - self.common_emit_one_arg(p, "pc", 0) - - - print '' - self.common_emit_fixups(fixup) - print '' - - print ' return __GLX_PAD(%s);' % (size) - print '}' - print '' - - return alias - - -def show_usage(): - print "Usage: %s [-f input_file_name] -m output_mode [--only-get | --only-set] [--get-alias-set]" % sys.argv[0] - print " -m output_mode Output mode can be one of 'size_c' or 'size_h'." - print " --only-get Only emit 'get'-type functions." - print " --only-set Only emit 'set'-type functions." - print "" - print "By default, both 'get' and 'set'-type functions are emitted." - sys.exit(1) - - -if __name__ == '__main__': - file_name = "gl_API.xml" - - try: - (args, trail) = getopt.getopt(sys.argv[1:], "f:m:h:", ["only-get", "only-set", "header-tag"]) - except Exception,e: - show_usage() - - mode = None - header_tag = None - which_functions = PrintGlxSizeStubs_common.do_get | PrintGlxSizeStubs_common.do_set - - for (arg,val) in args: - if arg == "-f": - file_name = val - elif arg == "-m": - mode = val - elif arg == "--only-get": - which_functions = PrintGlxSizeStubs_common.do_get - elif arg == "--only-set": - which_functions = PrintGlxSizeStubs_common.do_set - elif (arg == '-h') or (arg == "--header-tag"): - header_tag = val - - if mode == "size_c": - printer = PrintGlxSizeStubs_c( which_functions ) - elif mode == "size_h": - printer = PrintGlxSizeStubs_h( which_functions ) - if header_tag: - printer.header_tag = header_tag - elif mode == "reqsize_c": - printer = PrintGlxReqSize_c() - elif mode == "reqsize_h": - printer = PrintGlxReqSize_h() - else: - show_usage() - - api = gl_XML.parse_GL_API( file_name, glX_XML.glx_item_factory() ) - - - printer.Print( api ) diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/glX_server_table.py b/dll/opengl/mesa/src/mapi/glapi/gen/glX_server_table.py deleted file mode 100644 index 15397533f75..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/glX_server_table.py +++ /dev/null @@ -1,410 +0,0 @@ -#!/bin/env python - -# (C) Copyright IBM Corporation 2005, 2006 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Ian Romanick - -import gl_XML, glX_XML, glX_proto_common, license -import sys, getopt - - -def log2(value): - for i in range(0, 30): - p = 1 << i - if p >= value: - return i - - return -1 - - -def round_down_to_power_of_two(n): - """Returns the nearest power-of-two less than or equal to n.""" - - for i in range(30, 0, -1): - p = 1 << i - if p <= n: - return p - - return -1 - - -class function_table: - def __init__(self, name, do_size_check): - self.name_base = name - self.do_size_check = do_size_check - - - self.max_bits = 1 - self.next_opcode_threshold = (1 << self.max_bits) - self.max_opcode = 0 - - self.functions = {} - self.lookup_table = [] - - # Minimum number of opcodes in a leaf node. - self.min_op_bits = 3 - self.min_op_count = (1 << self.min_op_bits) - return - - - def append(self, opcode, func): - self.functions[opcode] = func - - if opcode > self.max_opcode: - self.max_opcode = opcode - - if opcode > self.next_opcode_threshold: - bits = log2(opcode) - if (1 << bits) <= opcode: - bits += 1 - - self.max_bits = bits - self.next_opcode_threshold = 1 << bits - return - - - def divide_group(self, min_opcode, total): - """Divide the group starting min_opcode into subgroups. - Returns a tuple containing the number of bits consumed by - the node, the list of the children's tuple, and the number - of entries in the final array used by this node and its - children, and the depth of the subtree rooted at the node.""" - - remaining_bits = self.max_bits - total - next_opcode = min_opcode + (1 << remaining_bits) - empty_children = 0 - - for M in range(0, remaining_bits): - op_count = 1 << (remaining_bits - M); - child_count = 1 << M; - - empty_children = 0 - full_children = 0 - for i in range(min_opcode, next_opcode, op_count): - used = 0 - empty = 0 - - for j in range(i, i + op_count): - if self.functions.has_key(j): - used += 1; - else: - empty += 1; - - - if empty == op_count: - empty_children += 1 - - if used == op_count: - full_children += 1 - - if (empty_children > 0) or (full_children == child_count) or (op_count <= self.min_op_count): - break - - - # If all the remaining bits are used by this node, as is the - # case when M is 0 or remaining_bits, the node is a leaf. - - if (M == 0) or (M == remaining_bits): - return [remaining_bits, [], 0, 0] - else: - children = [] - count = 1 - depth = 1 - all_children_are_nonempty_leaf_nodes = 1 - for i in range(min_opcode, next_opcode, op_count): - n = self.divide_group(i, total + M) - - if not (n[1] == [] and not self.is_empty_leaf(i, n[0])): - all_children_are_nonempty_leaf_nodes = 0 - - children.append(n) - count += n[2] + 1 - - if n[3] >= depth: - depth = n[3] + 1 - - # If all of the child nodes are non-empty leaf nodes, pull - # them up and make this node a leaf. - - if all_children_are_nonempty_leaf_nodes: - return [remaining_bits, [], 0, 0] - else: - return [M, children, count, depth] - - - def is_empty_leaf(self, base_opcode, M): - for op in range(base_opcode, base_opcode + (1 << M)): - if self.functions.has_key(op): - return 0 - break - - return 1 - - - def dump_tree(self, node, base_opcode, remaining_bits, base_entry, depth): - M = node[0] - children = node[1] - child_M = remaining_bits - M - - - # This actually an error condition. - if children == []: - return - - print ' /* [%u] -> opcode range [%u, %u], node depth %u */' % (base_entry, base_opcode, base_opcode + (1 << remaining_bits), depth) - print ' %u,' % (M) - - base_entry += (1 << M) + 1 - - child_index = base_entry - child_base_opcode = base_opcode - for child in children: - if child[1] == []: - if self.is_empty_leaf(child_base_opcode, child_M): - print ' EMPTY_LEAF,' - else: - # Emit the index of the next dispatch - # function. Then add all the - # dispatch functions for this leaf - # node to the dispatch function - # lookup table. - - print ' LEAF(%u),' % (len(self.lookup_table)) - - for op in range(child_base_opcode, child_base_opcode + (1 << child_M)): - if self.functions.has_key(op): - func = self.functions[op] - size = func.command_fixed_length() - - if func.glx_rop != 0: - size += 4 - - size = ((size + 3) & ~3) - - if func.has_variable_size_request(): - size_name = "__glX%sReqSize" % (func.name) - else: - size_name = "" - - if func.glx_vendorpriv == op: - func_name = func.glx_vendorpriv_names[0] - else: - func_name = func.name - - temp = [op, "__glXDisp_%s" % (func_name), "__glXDispSwap_%s" % (func_name), size, size_name] - else: - temp = [op, "NULL", "NULL", 0, ""] - - self.lookup_table.append(temp) - else: - print ' %u,' % (child_index) - child_index += child[2] - - child_base_opcode += 1 << child_M - - print '' - - child_index = base_entry - for child in children: - if child[1] != []: - self.dump_tree(child, base_opcode, remaining_bits - M, child_index, depth + 1) - child_index += child[2] - - base_opcode += 1 << (remaining_bits - M) - - - def Print(self): - # Each dispatch table consists of two data structures. - # - # The first structure is an N-way tree where the opcode for - # the function is the key. Each node switches on a range of - # bits from the opcode. M bits are extracted from the opcde - # and are used as an index to select one of the N, where - # N = 2^M, children. - # - # The tree is stored as a flat array. The first value is the - # number of bits, M, used by the node. For inner nodes, the - # following 2^M values are indexes into the array for the - # child nodes. For leaf nodes, the followign 2^M values are - # indexes into the second data structure. - # - # If an inner node's child index is 0, the child is an empty - # leaf node. That is, none of the opcodes selectable from - # that child exist. Since most of the possible opcode space - # is unused, this allows compact data storage. - # - # The second data structure is an array of pairs of function - # pointers. Each function contains a pointer to a protocol - # decode function and a pointer to a byte-swapped protocol - # decode function. Elements in this array are selected by the - # leaf nodes of the first data structure. - # - # As the tree is traversed, an accumulator is kept. This - # accumulator counts the bits of the opcode consumed by the - # traversal. When accumulator + M = B, where B is the - # maximum number of bits in an opcode, the traversal has - # reached a leaf node. The traversal starts with the most - # significant bits and works down to the least significant - # bits. - # - # Creation of the tree is the most complicated part. At - # each node the elements are divided into groups of 2^M - # elements. The value of M selected is the smallest possible - # value where all of the groups are either empty or full, or - # the groups are a preset minimum size. If all the children - # of a node are non-empty leaf nodes, the children are merged - # to create a single leaf node that replaces the parent. - - tree = self.divide_group(0, 0) - - print '/*****************************************************************/' - print '/* tree depth = %u */' % (tree[3]) - print 'static const int_fast16_t %s_dispatch_tree[%u] = {' % (self.name_base, tree[2]) - self.dump_tree(tree, 0, self.max_bits, 0, 1) - print '};\n' - - # After dumping the tree, dump the function lookup table. - - print 'static const void *%s_function_table[%u][2] = {' % (self.name_base, len(self.lookup_table)) - index = 0 - for func in self.lookup_table: - opcode = func[0] - name = func[1] - name_swap = func[2] - - print ' /* [% 3u] = %5u */ {%s, %s},' % (index, opcode, name, name_swap) - - index += 1 - - print '};\n' - - if self.do_size_check: - var_table = [] - - print 'static const int_fast16_t %s_size_table[%u][2] = {' % (self.name_base, len(self.lookup_table)) - index = 0 - var_table = [] - for func in self.lookup_table: - opcode = func[0] - fixed = func[3] - var = func[4] - - if var != "": - var_offset = "%2u" % (len(var_table)) - var_table.append(var) - else: - var_offset = "~0" - - print ' /* [%3u] = %5u */ {%3u, %s},' % (index, opcode, fixed, var_offset) - index += 1 - - - print '};\n' - - - print 'static const gl_proto_size_func %s_size_func_table[%u] = {' % (self.name_base, len(var_table)) - for func in var_table: - print ' %s,' % (func) - - print '};\n' - - - print 'const struct __glXDispatchInfo %s_dispatch_info = {' % (self.name_base) - print ' %u,' % (self.max_bits) - print ' %s_dispatch_tree,' % (self.name_base) - print ' %s_function_table,' % (self.name_base) - if self.do_size_check: - print ' %s_size_table,' % (self.name_base) - print ' %s_size_func_table' % (self.name_base) - else: - print ' NULL,' - print ' NULL' - print '};\n' - return - - -class PrintGlxDispatchTables(glX_proto_common.glx_print_proto): - def __init__(self): - gl_XML.gl_print_base.__init__(self) - self.name = "glX_server_table.py (from Mesa)" - self.license = license.bsd_license_template % ( "(C) Copyright IBM Corporation 2005, 2006", "IBM") - - self.rop_functions = function_table("Render", 1) - self.sop_functions = function_table("Single", 0) - self.vop_functions = function_table("VendorPriv", 0) - return - - - def printRealHeader(self): - print '#include ' - print '#include "glxserver.h"' - print '#include "glxext.h"' - print '#include "indirect_dispatch.h"' - print '#include "indirect_reqsize.h"' - print '#include "indirect_table.h"' - print '' - return - - - def printBody(self, api): - for f in api.functionIterateAll(): - if not f.ignore and f.vectorequiv == None: - if f.glx_rop != 0: - self.rop_functions.append(f.glx_rop, f) - if f.glx_sop != 0: - self.sop_functions.append(f.glx_sop, f) - if f.glx_vendorpriv != 0: - self.vop_functions.append(f.glx_vendorpriv, f) - - self.sop_functions.Print() - self.rop_functions.Print() - self.vop_functions.Print() - return - - -if __name__ == '__main__': - file_name = "gl_API.xml" - - try: - (args, trail) = getopt.getopt(sys.argv[1:], "f:m") - except Exception,e: - show_usage() - - mode = "table_c" - for (arg,val) in args: - if arg == "-f": - file_name = val - elif arg == "-m": - mode = val - - if mode == "table_c": - printer = PrintGlxDispatchTables() - else: - show_usage() - - - api = gl_XML.parse_GL_API( file_name, glX_XML.glx_item_factory() ) - - - printer.Print( api ) diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/gl_API.dtd b/dll/opengl/mesa/src/mapi/glapi/gen/gl_API.dtd deleted file mode 100644 index 30c646c9244..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/gl_API.dtd +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/gl_API.xml b/dll/opengl/mesa/src/mapi/glapi/gen/gl_API.xml deleted file mode 100644 index 24539c0f41c..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/gl_API.xml +++ /dev/null @@ -1,12429 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/gl_SPARC_asm.py b/dll/opengl/mesa/src/mapi/glapi/gen/gl_SPARC_asm.py deleted file mode 100644 index 400e684da02..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/gl_SPARC_asm.py +++ /dev/null @@ -1,273 +0,0 @@ -#!/usr/bin/env python - -# (C) Copyright IBM Corporation 2004 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Ian Romanick - -import license -import gl_XML, glX_XML -import sys, getopt - -class PrintGenericStubs(gl_XML.gl_print_base): - def __init__(self): - gl_XML.gl_print_base.__init__(self) - self.name = "gl_SPARC_asm.py (from Mesa)" - self.license = license.bsd_license_template % ( \ -"""Copyright (C) 1999-2003 Brian Paul All Rights Reserved. -(C) Copyright IBM Corporation 2004""", "BRIAN PAUL, IBM") - - - def printRealHeader(self): - print '#ifdef __arch64__' - print '#define GL_OFF(N)\t((N) * 8)' - print '#define GL_LL\t\tldx' - print '#define GL_TIE_LD(SYM)\t%tie_ldx(SYM)' - print '#define GL_STACK_SIZE\t128' - print '#else' - print '#define GL_OFF(N)\t((N) * 4)' - print '#define GL_LL\t\tld' - print '#define GL_TIE_LD(SYM)\t%tie_ld(SYM)' - print '#define GL_STACK_SIZE\t64' - print '#endif' - print '' - print '#define GLOBL_FN(x) .globl x ; .type x, @function' - print '#define HIDDEN(x) .hidden x' - print '' - print '\t.register %g2, #scratch' - print '\t.register %g3, #scratch' - print '' - print '\t.text' - print '' - print '\tGLOBL_FN(__glapi_sparc_icache_flush)' - print '\tHIDDEN(__glapi_sparc_icache_flush)' - print '\t.type\t__glapi_sparc_icache_flush, @function' - print '__glapi_sparc_icache_flush: /* %o0 = insn_addr */' - print '\tflush\t%o0' - print '\tretl' - print '\t nop' - print '' - print '\t.align\t32' - print '' - print '\t.type\t__glapi_sparc_get_pc, @function' - print '__glapi_sparc_get_pc:' - print '\tretl' - print '\t add\t%o7, %g2, %g2' - print '\t.size\t__glapi_sparc_get_pc, .-__glapi_sparc_get_pc' - print '' - print '#ifdef GLX_USE_TLS' - print '' - print '\tGLOBL_FN(__glapi_sparc_get_dispatch)' - print '\tHIDDEN(__glapi_sparc_get_dispatch)' - print '__glapi_sparc_get_dispatch:' - print '\tmov\t%o7, %g1' - print '\tsethi\t%hi(_GLOBAL_OFFSET_TABLE_-4), %g2' - print '\tcall\t__glapi_sparc_get_pc' - print '\tadd\t%g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2' - print '\tmov\t%g1, %o7' - print '\tsethi\t%tie_hi22(_glapi_tls_Dispatch), %g1' - print '\tadd\t%g1, %tie_lo10(_glapi_tls_Dispatch), %g1' - print '\tGL_LL\t[%g2 + %g1], %g2, GL_TIE_LD(_glapi_tls_Dispatch)' - print '\tretl' - print '\t mov\t%g2, %o0' - print '' - print '\t.data' - print '\t.align\t32' - print '' - print '\t/* --> sethi %hi(_glapi_tls_Dispatch), %g1 */' - print '\t/* --> or %g1, %lo(_glapi_tls_Dispatch), %g1 */' - print '\tGLOBL_FN(__glapi_sparc_tls_stub)' - print '\tHIDDEN(__glapi_sparc_tls_stub)' - print '__glapi_sparc_tls_stub: /* Call offset in %g3 */' - print '\tmov\t%o7, %g1' - print '\tsethi\t%hi(_GLOBAL_OFFSET_TABLE_-4), %g2' - print '\tcall\t__glapi_sparc_get_pc' - print '\tadd\t%g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2' - print '\tmov\t%g1, %o7' - print '\tsrl\t%g3, 10, %g3' - print '\tsethi\t%tie_hi22(_glapi_tls_Dispatch), %g1' - print '\tadd\t%g1, %tie_lo10(_glapi_tls_Dispatch), %g1' - print '\tGL_LL\t[%g2 + %g1], %g2, GL_TIE_LD(_glapi_tls_Dispatch)' - print '\tGL_LL\t[%g7+%g2], %g1' - print '\tGL_LL\t[%g1 + %g3], %g1' - print '\tjmp\t%g1' - print '\t nop' - print '\t.size\t__glapi_sparc_tls_stub, .-__glapi_sparc_tls_stub' - print '' - print '#define GL_STUB(fn, off)\t\t\t\t\\' - print '\tGLOBL_FN(fn);\t\t\t\t\t\\' - print 'fn:\tba\t__glapi_sparc_tls_stub;\t\t\t\\' - print '\t sethi\tGL_OFF(off), %g3;\t\t\t\\' - print '\t.size\tfn,.-fn;' - print '' - print '#elif defined(PTHREADS)' - print '' - print '\t/* 64-bit 0x00 --> sethi %hh(_glapi_Dispatch), %g1 */' - print '\t/* 64-bit 0x04 --> sethi %lm(_glapi_Dispatch), %g2 */' - print '\t/* 64-bit 0x08 --> or %g1, %hm(_glapi_Dispatch), %g1 */' - print '\t/* 64-bit 0x0c --> sllx %g1, 32, %g1 */' - print '\t/* 64-bit 0x10 --> add %g1, %g2, %g1 */' - print '\t/* 64-bit 0x14 --> ldx [%g1 + %lo(_glapi_Dispatch)], %g1 */' - print '' - print '\t/* 32-bit 0x00 --> sethi %hi(_glapi_Dispatch), %g1 */' - print '\t/* 32-bit 0x04 --> ld [%g1 + %lo(_glapi_Dispatch)], %g1 */' - print '' - print '\t.data' - print '\t.align\t32' - print '' - print '\tGLOBL_FN(__glapi_sparc_pthread_stub)' - print '\tHIDDEN(__glapi_sparc_pthread_stub)' - print '__glapi_sparc_pthread_stub: /* Call offset in %g3 */' - print '\tmov\t%o7, %g1' - print '\tsethi\t%hi(_GLOBAL_OFFSET_TABLE_-4), %g2' - print '\tcall\t__glapi_sparc_get_pc' - print '\t add\t%g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2' - print '\tmov\t%g1, %o7' - print '\tsethi\t%hi(_glapi_Dispatch), %g1' - print '\tor\t%g1, %lo(_glapi_Dispatch), %g1' - print '\tsrl\t%g3, 10, %g3' - print '\tGL_LL\t[%g2+%g1], %g2' - print '\tGL_LL\t[%g2], %g1' - print '\tcmp\t%g1, 0' - print '\tbe\t2f' - print '\t nop' - print '1:\tGL_LL\t[%g1 + %g3], %g1' - print '\tjmp\t%g1' - print '\t nop' - print '2:\tsave\t%sp, GL_STACK_SIZE, %sp' - print '\tmov\t%g3, %l0' - print '\tcall\t_glapi_get_dispatch' - print '\t nop' - print '\tmov\t%o0, %g1' - print '\tmov\t%l0, %g3' - print '\tba\t1b' - print '\t restore %g0, %g0, %g0' - print '\t.size\t__glapi_sparc_pthread_stub, .-__glapi_sparc_pthread_stub' - print '' - print '#define GL_STUB(fn, off)\t\t\t\\' - print '\tGLOBL_FN(fn);\t\t\t\t\\' - print 'fn:\tba\t__glapi_sparc_pthread_stub;\t\\' - print '\t sethi\tGL_OFF(off), %g3;\t\t\\' - print '\t.size\tfn,.-fn;' - print '' - print '#else /* Non-threaded version. */' - print '' - print '\t.type __glapi_sparc_nothread_stub, @function' - print '__glapi_sparc_nothread_stub: /* Call offset in %g3 */' - print '\tmov\t%o7, %g1' - print '\tsethi\t%hi(_GLOBAL_OFFSET_TABLE_-4), %g2' - print '\tcall\t__glapi_sparc_get_pc' - print '\t add\t%g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2' - print '\tmov\t%g1, %o7' - print '\tsrl\t%g3, 10, %g3' - print '\tsethi\t%hi(_glapi_Dispatch), %g1' - print '\tor\t%g1, %lo(_glapi_Dispatch), %g1' - print '\tGL_LL\t[%g2+%g1], %g2' - print '\tGL_LL\t[%g2], %g1' - print '\tGL_LL\t[%g1 + %g3], %g1' - print '\tjmp\t%g1' - print '\t nop' - print '\t.size\t__glapi_sparc_nothread_stub, .-__glapi_sparc_nothread_stub' - print '' - print '#define GL_STUB(fn, off)\t\t\t\\' - print '\tGLOBL_FN(fn);\t\t\t\t\\' - print 'fn:\tba\t__glapi_sparc_nothread_stub;\t\\' - print '\t sethi\tGL_OFF(off), %g3;\t\t\\' - print '\t.size\tfn,.-fn;' - print '' - print '#endif' - print '' - print '#define GL_STUB_ALIAS(fn, alias) \\' - print ' .globl fn; \\' - print ' .set fn, alias' - print '' - print '\t.text' - print '\t.align\t32' - print '' - print '\t.globl\tgl_dispatch_functions_start' - print '\tHIDDEN(gl_dispatch_functions_start)' - print 'gl_dispatch_functions_start:' - print '' - return - - def printRealFooter(self): - print '' - print '\t.globl\tgl_dispatch_functions_end' - print '\tHIDDEN(gl_dispatch_functions_end)' - print 'gl_dispatch_functions_end:' - return - - def printBody(self, api): - for f in api.functionIterateByOffset(): - name = f.dispatch_name() - - print '\tGL_STUB(gl%s, %d)' % (name, f.offset) - - if not f.is_static_entry_point(f.name): - print '\tHIDDEN(gl%s)' % (name) - - for f in api.functionIterateByOffset(): - name = f.dispatch_name() - - if f.is_static_entry_point(f.name): - for n in f.entry_points: - if n != f.name: - text = '\tGL_STUB_ALIAS(gl%s, gl%s)' % (n, f.name) - - if f.has_different_protocol(n): - print '#ifndef GLX_INDIRECT_RENDERING' - print text - print '#endif' - else: - print text - - return - - -def show_usage(): - print "Usage: %s [-f input_file_name] [-m output_mode]" % sys.argv[0] - sys.exit(1) - -if __name__ == '__main__': - file_name = "gl_API.xml" - mode = "generic" - - try: - (args, trail) = getopt.getopt(sys.argv[1:], "m:f:") - except Exception,e: - show_usage() - - for (arg,val) in args: - if arg == '-m': - mode = val - elif arg == "-f": - file_name = val - - if mode == "generic": - printer = PrintGenericStubs() - else: - print "ERROR: Invalid mode \"%s\" specified." % mode - show_usage() - - api = gl_XML.parse_GL_API(file_name, glX_XML.glx_item_factory()) - printer.Print(api) diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/gl_XML.py b/dll/opengl/mesa/src/mapi/glapi/gen/gl_XML.py deleted file mode 100644 index 4dc2e8fa7fb..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/gl_XML.py +++ /dev/null @@ -1,999 +0,0 @@ -#!/usr/bin/env python - -# (C) Copyright IBM Corporation 2004, 2005 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Ian Romanick - -import libxml2 -import re, sys, string -import typeexpr - - -def parse_GL_API( file_name, factory = None ): - doc = libxml2.readFile( file_name, None, libxml2.XML_PARSE_XINCLUDE + libxml2.XML_PARSE_NOBLANKS + libxml2.XML_PARSE_DTDVALID + libxml2.XML_PARSE_DTDATTR + libxml2.XML_PARSE_DTDLOAD + libxml2.XML_PARSE_NOENT ) - ret = doc.xincludeProcess() - - if not factory: - factory = gl_item_factory() - - api = factory.create_item( "api", None, None ) - api.process_element( doc ) - - # After the XML has been processed, we need to go back and assign - # dispatch offsets to the functions that request that their offsets - # be assigned by the scripts. Typically this means all functions - # that are not part of the ABI. - - for func in api.functionIterateByCategory(): - if func.assign_offset: - func.offset = api.next_offset; - api.next_offset += 1 - - doc.freeDoc() - - return api - - -def is_attr_true( element, name ): - """Read a name value from an element's attributes. - - The value read from the attribute list must be either 'true' or - 'false'. If the value is 'false', zero will be returned. If the - value is 'true', non-zero will be returned. An exception will be - raised for any other value.""" - - value = element.nsProp( name, None ) - if value == "true": - return 1 - elif value == "false": - return 0 - else: - raise RuntimeError('Invalid value "%s" for boolean "%s".' % (value, name)) - - -class gl_print_base: - """Base class of all API pretty-printers. - - In the model-view-controller pattern, this is the view. Any derived - class will want to over-ride the printBody, printRealHader, and - printRealFooter methods. Some derived classes may want to over-ride - printHeader and printFooter, or even Print (though this is unlikely). - """ - - def __init__(self): - # Name of the script that is generating the output file. - # Every derived class should set this to the name of its - # source file. - - self.name = "a" - - - # License on the *generated* source file. This may differ - # from the license on the script that is generating the file. - # Every derived class should set this to some reasonable - # value. - # - # See license.py for an example of a reasonable value. - - self.license = "The license for this file is unspecified." - - - # The header_tag is the name of the C preprocessor define - # used to prevent multiple inclusion. Typically only - # generated C header files need this to be set. Setting it - # causes code to be generated automatically in printHeader - # and printFooter. - - self.header_tag = None - - - # List of file-private defines that must be undefined at the - # end of the file. This can be used in header files to define - # names for use in the file, then undefine them at the end of - # the header file. - - self.undef_list = [] - return - - - def Print(self, api): - self.printHeader() - self.printBody(api) - self.printFooter() - return - - - def printHeader(self): - """Print the header associated with all files and call the printRealHeader method.""" - - print '/* DO NOT EDIT - This file generated automatically by %s script */' \ - % (self.name) - print '' - print '/*' - print ' * ' + self.license.replace('\n', '\n * ') - print ' */' - print '' - if self.header_tag: - print '#if !defined( %s )' % (self.header_tag) - print '# define %s' % (self.header_tag) - print '' - self.printRealHeader(); - return - - - def printFooter(self): - """Print the header associated with all files and call the printRealFooter method.""" - - self.printRealFooter() - - if self.undef_list: - print '' - for u in self.undef_list: - print "# undef %s" % (u) - - if self.header_tag: - print '' - print '#endif /* !defined( %s ) */' % (self.header_tag) - - - def printRealHeader(self): - """Print the "real" header for the created file. - - In the base class, this function is empty. All derived - classes should over-ride this function.""" - return - - - def printRealFooter(self): - """Print the "real" footer for the created file. - - In the base class, this function is empty. All derived - classes should over-ride this function.""" - return - - - def printPure(self): - """Conditionally define `PURE' function attribute. - - Conditionally defines a preprocessor macro `PURE' that wraps - GCC's `pure' function attribute. The conditional code can be - easilly adapted to other compilers that support a similar - feature. - - The name is also added to the file's undef_list. - """ - self.undef_list.append("PURE") - print """# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) -# define PURE __attribute__((pure)) -# else -# define PURE -# endif""" - return - - - def printFastcall(self): - """Conditionally define `FASTCALL' function attribute. - - Conditionally defines a preprocessor macro `FASTCALL' that - wraps GCC's `fastcall' function attribute. The conditional - code can be easilly adapted to other compilers that support a - similar feature. - - The name is also added to the file's undef_list. - """ - - self.undef_list.append("FASTCALL") - print """# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) -# define FASTCALL __attribute__((fastcall)) -# else -# define FASTCALL -# endif""" - return - - - def printVisibility(self, S, s): - """Conditionally define visibility function attribute. - - Conditionally defines a preprocessor macro name S that wraps - GCC's visibility function attribute. The visibility used is - the parameter s. The conditional code can be easilly adapted - to other compilers that support a similar feature. - - The name is also added to the file's undef_list. - """ - - self.undef_list.append(S) - print """# if (defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) && defined(__ELF__)) -# define %s __attribute__((visibility("%s"))) -# else -# define %s -# endif""" % (S, s, S) - return - - - def printNoinline(self): - """Conditionally define `NOINLINE' function attribute. - - Conditionally defines a preprocessor macro `NOINLINE' that - wraps GCC's `noinline' function attribute. The conditional - code can be easilly adapted to other compilers that support a - similar feature. - - The name is also added to the file's undef_list. - """ - - self.undef_list.append("NOINLINE") - print """# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) -# define NOINLINE __attribute__((noinline)) -# else -# define NOINLINE -# endif""" - return - - -def real_function_name(element): - name = element.nsProp( "name", None ) - alias = element.nsProp( "alias", None ) - - if alias: - return alias - else: - return name - - -def real_category_name(c): - if re.compile("[1-9][0-9]*[.][0-9]+").match(c): - return "GL_VERSION_" + c.replace(".", "_") - else: - return c - - -def classify_category(name, number): - """Based on the category name and number, select a numerical class for it. - - Categories are divided into four classes numbered 0 through 3. The - classes are: - - 0. Core GL versions, sorted by version number. - 1. ARB extensions, sorted by extension number. - 2. Non-ARB extensions, sorted by extension number. - 3. Un-numbered extensions, sorted by extension name. - """ - - try: - core_version = float(name) - except Exception,e: - core_version = 0.0 - - if core_version > 0.0: - cat_type = 0 - key = name - elif name.startswith("GL_ARB_") or name.startswith("GLX_ARB_") or name.startswith("WGL_ARB_"): - cat_type = 1 - key = int(number) - else: - if number != None: - cat_type = 2 - key = int(number) - else: - cat_type = 3 - key = name - - - return [cat_type, key] - - -def create_parameter_string(parameters, include_names): - """Create a parameter string from a list of gl_parameters.""" - - list = [] - for p in parameters: - if p.is_padding: - continue - - if include_names: - list.append( p.string() ) - else: - list.append( p.type_string() ) - - if len(list) == 0: list = ["void"] - - return string.join(list, ", ") - - -class gl_item: - def __init__(self, element, context): - self.context = context - self.name = element.nsProp( "name", None ) - self.category = real_category_name( element.parent.nsProp( "name", None ) ) - return - - -class gl_type( gl_item ): - def __init__(self, element, context): - gl_item.__init__(self, element, context) - self.size = int( element.nsProp( "size", None ), 0 ) - - te = typeexpr.type_expression( None ) - tn = typeexpr.type_node() - tn.size = int( element.nsProp( "size", None ), 0 ) - tn.integer = not is_attr_true( element, "float" ) - tn.unsigned = is_attr_true( element, "unsigned" ) - tn.name = "GL" + self.name - te.set_base_type_node( tn ) - - self.type_expr = te - return - - - def get_type_expression(self): - return self.type_expr - - -class gl_enum( gl_item ): - def __init__(self, element, context): - gl_item.__init__(self, element, context) - self.value = int( element.nsProp( "value", None ), 0 ) - - temp = element.nsProp( "count", None ) - if not temp or temp == "?": - self.default_count = -1 - else: - try: - c = int(temp) - except Exception,e: - raise RuntimeError('Invalid count value "%s" for enum "%s" in function "%s" when an integer was expected.' % (temp, self.name, n)) - - self.default_count = c - - return - - - def priority(self): - """Calculate a 'priority' for this enum name. - - When an enum is looked up by number, there may be many - possible names, but only one is the 'prefered' name. The - priority is used to select which name is the 'best'. - - Highest precedence is given to core GL name. ARB extension - names have the next highest, followed by EXT extension names. - Vendor extension names are the lowest. - """ - - if self.name.endswith( "_BIT" ): - bias = 1 - else: - bias = 0 - - if self.category.startswith( "GL_VERSION_" ): - priority = 0 - elif self.category.startswith( "GL_ARB_" ): - priority = 2 - elif self.category.startswith( "GL_EXT_" ): - priority = 4 - else: - priority = 6 - - return priority + bias - - - -class gl_parameter: - def __init__(self, element, context): - self.name = element.nsProp( "name", None ) - - ts = element.nsProp( "type", None ) - self.type_expr = typeexpr.type_expression( ts, context ) - - temp = element.nsProp( "variable_param", None ) - if temp: - self.count_parameter_list = temp.split( ' ' ) - else: - self.count_parameter_list = [] - - # The count tag can be either a numeric string or the name of - # a variable. If it is the name of a variable, the int(c) - # statement will throw an exception, and the except block will - # take over. - - c = element.nsProp( "count", None ) - try: - count = int(c) - self.count = count - self.counter = None - except Exception,e: - count = 1 - self.count = 0 - self.counter = c - - self.count_scale = int(element.nsProp( "count_scale", None )) - - elements = (count * self.count_scale) - if elements == 1: - elements = 0 - - #if ts == "GLdouble": - # print '/* stack size -> %s = %u (before)*/' % (self.name, self.type_expr.get_stack_size()) - # print '/* # elements = %u */' % (elements) - self.type_expr.set_elements( elements ) - #if ts == "GLdouble": - # print '/* stack size -> %s = %u (after) */' % (self.name, self.type_expr.get_stack_size()) - - self.is_client_only = is_attr_true( element, 'client_only' ) - self.is_counter = is_attr_true( element, 'counter' ) - self.is_output = is_attr_true( element, 'output' ) - - - # Pixel data has special parameters. - - self.width = element.nsProp('img_width', None) - self.height = element.nsProp('img_height', None) - self.depth = element.nsProp('img_depth', None) - self.extent = element.nsProp('img_extent', None) - - self.img_xoff = element.nsProp('img_xoff', None) - self.img_yoff = element.nsProp('img_yoff', None) - self.img_zoff = element.nsProp('img_zoff', None) - self.img_woff = element.nsProp('img_woff', None) - - self.img_format = element.nsProp('img_format', None) - self.img_type = element.nsProp('img_type', None) - self.img_target = element.nsProp('img_target', None) - - self.img_pad_dimensions = is_attr_true( element, 'img_pad_dimensions' ) - self.img_null_flag = is_attr_true( element, 'img_null_flag' ) - self.img_send_null = is_attr_true( element, 'img_send_null' ) - - self.is_padding = is_attr_true( element, 'padding' ) - return - - - def compatible(self, other): - return 1 - - - def is_array(self): - return self.is_pointer() - - - def is_pointer(self): - return self.type_expr.is_pointer() - - - def is_image(self): - if self.width: - return 1 - else: - return 0 - - - def is_variable_length(self): - return len(self.count_parameter_list) or self.counter - - - def is_64_bit(self): - count = self.type_expr.get_element_count() - if count: - if (self.size() / count) == 8: - return 1 - else: - if self.size() == 8: - return 1 - - return 0 - - - def string(self): - return self.type_expr.original_string + " " + self.name - - - def type_string(self): - return self.type_expr.original_string - - - def get_base_type_string(self): - return self.type_expr.get_base_name() - - - def get_dimensions(self): - if not self.width: - return [ 0, "0", "0", "0", "0" ] - - dim = 1 - w = self.width - h = "1" - d = "1" - e = "1" - - if self.height: - dim = 2 - h = self.height - - if self.depth: - dim = 3 - d = self.depth - - if self.extent: - dim = 4 - e = self.extent - - return [ dim, w, h, d, e ] - - - def get_stack_size(self): - return self.type_expr.get_stack_size() - - - def size(self): - if self.is_image(): - return 0 - else: - return self.type_expr.get_element_size() - - - def get_element_count(self): - c = self.type_expr.get_element_count() - if c == 0: - return 1 - - return c - - - def size_string(self, use_parens = 1): - s = self.size() - if self.counter or self.count_parameter_list: - list = [ "compsize" ] - - if self.counter and self.count_parameter_list: - list.append( self.counter ) - elif self.counter: - list = [ self.counter ] - - if s > 1: - list.append( str(s) ) - - if len(list) > 1 and use_parens : - return "(%s)" % (string.join(list, " * ")) - else: - return string.join(list, " * ") - - elif self.is_image(): - return "compsize" - else: - return str(s) - - - def format_string(self): - if self.type_expr.original_string == "GLenum": - return "0x%x" - else: - return self.type_expr.format_string() - - - -class gl_function( gl_item ): - def __init__(self, element, context): - self.context = context - self.name = None - - self.entry_points = [] - self.return_type = "void" - self.parameters = [] - self.offset = -1 - self.initialized = 0 - self.images = [] - - self.assign_offset = 0 - - self.static_entry_points = [] - - # Track the parameter string (for the function prototype) - # for each entry-point. This is done because some functions - # change their prototype slightly when promoted from extension - # to ARB extension to core. glTexImage3DEXT and glTexImage3D - # are good examples of this. Scripts that need to generate - # code for these differing aliases need to real prototype - # for each entry-point. Otherwise, they may generate code - # that won't compile. - - self.entry_point_parameters = {} - - self.process_element( element ) - - return - - - def process_element(self, element): - name = element.nsProp( "name", None ) - alias = element.nsProp( "alias", None ) - - if is_attr_true(element, "static_dispatch"): - self.static_entry_points.append(name) - - self.entry_points.append( name ) - if alias: - true_name = alias - else: - true_name = name - - # Only try to set the offset when a non-alias - # entry-point is being processes. - - offset = element.nsProp( "offset", None ) - if offset: - try: - o = int( offset ) - self.offset = o - except Exception, e: - self.offset = -1 - if offset == "assign": - self.assign_offset = 1 - - - if not self.name: - self.name = true_name - elif self.name != true_name: - raise RuntimeError("Function true name redefined. Was %s, now %s." % (self.name, true_name)) - - - # There are two possible cases. The first time an entry-point - # with data is seen, self.initialized will be 0. On that - # pass, we just fill in the data. The next time an - # entry-point with data is seen, self.initialized will be 1. - # On that pass we have to make that the new values match the - # valuse from the previous entry-point. - - parameters = [] - return_type = "void" - child = element.children - while child: - if child.type == "element": - if child.name == "return": - return_type = child.nsProp( "type", None ) - elif child.name == "param": - param = self.context.factory.create_item( "parameter", child, self.context) - parameters.append( param ) - - child = child.next - - - if self.initialized: - if self.return_type != return_type: - raise RuntimeError( "Return type changed in %s. Was %s, now %s." % (name, self.return_type, return_type)) - - if len(parameters) != len(self.parameters): - raise RuntimeError( "Parameter count mismatch in %s. Was %d, now %d." % (name, len(self.parameters), len(parameters))) - - for j in range(0, len(parameters)): - p1 = parameters[j] - p2 = self.parameters[j] - if not p1.compatible( p2 ): - raise RuntimeError( 'Parameter type mismatch in %s. "%s" was "%s", now "%s".' % (name, p2.name, p2.type_expr.original_string, p1.type_expr.original_string)) - - - if true_name == name or not self.initialized: - self.return_type = return_type - self.parameters = parameters - - for param in self.parameters: - if param.is_image(): - self.images.append( param ) - - if element.children: - self.initialized = 1 - self.entry_point_parameters[name] = parameters - else: - self.entry_point_parameters[name] = [] - - return - - def filter_entry_points(self, entry_point_list): - """Filter out entry points not in entry_point_list.""" - if not self.initialized: - raise RuntimeError('%s is not initialized yet' % self.name) - - entry_points = [] - for ent in self.entry_points: - if ent not in entry_point_list: - if ent in self.static_entry_points: - self.static_entry_points.remove(ent) - self.entry_point_parameters.pop(ent) - else: - entry_points.append(ent) - - if not entry_points: - raise RuntimeError('%s has no entry point after filtering' % self.name) - - self.entry_points = entry_points - if self.name not in entry_points: - # use the first remaining entry point - self.name = entry_points[0] - self.parameters = self.entry_point_parameters[entry_points[0]] - - def get_images(self): - """Return potentially empty list of input images.""" - return self.images - - - def parameterIterator(self): - return self.parameters.__iter__(); - - - def get_parameter_string(self, entrypoint = None): - if entrypoint: - params = self.entry_point_parameters[ entrypoint ] - else: - params = self.parameters - - return create_parameter_string( params, 1 ) - - def get_called_parameter_string(self): - p_string = "" - comma = "" - - for p in self.parameterIterator(): - p_string = p_string + comma + p.name - comma = ", " - - return p_string - - - def is_abi(self): - return (self.offset >= 0 and not self.assign_offset) - - def is_static_entry_point(self, name): - return name in self.static_entry_points - - def dispatch_name(self): - if self.name in self.static_entry_points: - return self.name - else: - return "_dispatch_stub_%u" % (self.offset) - - def static_name(self, name): - if name in self.static_entry_points: - return name - else: - return "_dispatch_stub_%u" % (self.offset) - - -class gl_item_factory: - """Factory to create objects derived from gl_item.""" - - def create_item(self, item_name, element, context): - if item_name == "function": - return gl_function(element, context) - if item_name == "type": - return gl_type(element, context) - elif item_name == "enum": - return gl_enum(element, context) - elif item_name == "parameter": - return gl_parameter(element, context) - elif item_name == "api": - return gl_api(self) - else: - return None - - -class gl_api: - def __init__(self, factory): - self.functions_by_name = {} - self.enums_by_name = {} - self.types_by_name = {} - - self.category_dict = {} - self.categories = [{}, {}, {}, {}] - - self.factory = factory - - self.next_offset = 0 - - typeexpr.create_initial_types() - return - - def filter_functions(self, entry_point_list): - """Filter out entry points not in entry_point_list.""" - functions_by_name = {} - for func in self.functions_by_name.itervalues(): - entry_points = [ent for ent in func.entry_points if ent in entry_point_list] - if entry_points: - func.filter_entry_points(entry_points) - functions_by_name[func.name] = func - - self.functions_by_name = functions_by_name - - def process_element(self, doc): - element = doc.children - while element.type != "element" or element.name != "OpenGLAPI": - element = element.next - - if element: - self.process_OpenGLAPI(element) - return - - - def process_OpenGLAPI(self, element): - child = element.children - while child: - if child.type == "element": - if child.name == "category": - self.process_category( child ) - elif child.name == "OpenGLAPI": - self.process_OpenGLAPI( child ) - - child = child.next - - return - - - def process_category(self, cat): - cat_name = cat.nsProp( "name", None ) - cat_number = cat.nsProp( "number", None ) - - [cat_type, key] = classify_category(cat_name, cat_number) - self.categories[cat_type][key] = [cat_name, cat_number] - - child = cat.children - while child: - if child.type == "element": - if child.name == "function": - func_name = real_function_name( child ) - - temp_name = child.nsProp( "name", None ) - self.category_dict[ temp_name ] = [cat_name, cat_number] - - if self.functions_by_name.has_key( func_name ): - func = self.functions_by_name[ func_name ] - func.process_element( child ) - else: - func = self.factory.create_item( "function", child, self ) - self.functions_by_name[ func_name ] = func - - if func.offset >= self.next_offset: - self.next_offset = func.offset + 1 - - - elif child.name == "enum": - enum = self.factory.create_item( "enum", child, self ) - self.enums_by_name[ enum.name ] = enum - elif child.name == "type": - t = self.factory.create_item( "type", child, self ) - self.types_by_name[ "GL" + t.name ] = t - - - child = child.next - - return - - - def functionIterateByCategory(self, cat = None): - """Iterate over functions by category. - - If cat is None, all known functions are iterated in category - order. See classify_category for details of the ordering. - Within a category, functions are sorted by name. If cat is - not None, then only functions in that category are iterated. - """ - lists = [{}, {}, {}, {}] - - for func in self.functionIterateAll(): - [cat_name, cat_number] = self.category_dict[func.name] - - if (cat == None) or (cat == cat_name): - [func_cat_type, key] = classify_category(cat_name, cat_number) - - if not lists[func_cat_type].has_key(key): - lists[func_cat_type][key] = {} - - lists[func_cat_type][key][func.name] = func - - - functions = [] - for func_cat_type in range(0,4): - keys = lists[func_cat_type].keys() - keys.sort() - - for key in keys: - names = lists[func_cat_type][key].keys() - names.sort() - - for name in names: - functions.append(lists[func_cat_type][key][name]) - - return functions.__iter__() - - - def functionIterateByOffset(self): - max_offset = -1 - for func in self.functions_by_name.itervalues(): - if func.offset > max_offset: - max_offset = func.offset - - - temp = [None for i in range(0, max_offset + 1)] - for func in self.functions_by_name.itervalues(): - if func.offset != -1: - temp[ func.offset ] = func - - - list = [] - for i in range(0, max_offset + 1): - if temp[i]: - list.append(temp[i]) - - return list.__iter__(); - - - def functionIterateAll(self): - return self.functions_by_name.itervalues() - - - def enumIterateByName(self): - keys = self.enums_by_name.keys() - keys.sort() - - list = [] - for enum in keys: - list.append( self.enums_by_name[ enum ] ) - - return list.__iter__() - - - def categoryIterate(self): - """Iterate over categories. - - Iterate over all known categories in the order specified by - classify_category. Each iterated value is a tuple of the - name and number (which may be None) of the category. - """ - - list = [] - for cat_type in range(0,4): - keys = self.categories[cat_type].keys() - keys.sort() - - for key in keys: - list.append(self.categories[cat_type][key]) - - return list.__iter__() - - - def get_category_for_name( self, name ): - if self.category_dict.has_key(name): - return self.category_dict[name] - else: - return ["", None] - - - def typeIterate(self): - return self.types_by_name.itervalues() - - - def find_type( self, type_name ): - if type_name in self.types_by_name: - return self.types_by_name[ type_name ].type_expr - else: - print "Unable to find base type matching \"%s\"." % (type_name) - return None diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/gl_and_es_API.xml b/dll/opengl/mesa/src/mapi/glapi/gen/gl_and_es_API.xml deleted file mode 100644 index 1313da0f5d6..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/gl_and_es_API.xml +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/gl_and_glX_API.xml b/dll/opengl/mesa/src/mapi/glapi/gen/gl_and_glX_API.xml deleted file mode 100644 index 34c977e9c0c..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/gl_and_glX_API.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/gl_apitemp.py b/dll/opengl/mesa/src/mapi/glapi/gen/gl_apitemp.py deleted file mode 100644 index 72c2e46c37e..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/gl_apitemp.py +++ /dev/null @@ -1,327 +0,0 @@ -#!/usr/bin/env python - -# (C) Copyright IBM Corporation 2004, 2005 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Ian Romanick - -import gl_XML, glX_XML -import license -import sys, getopt - -class PrintGlOffsets(gl_XML.gl_print_base): - def __init__(self, es=False): - gl_XML.gl_print_base.__init__(self) - - self.name = "gl_apitemp.py (from Mesa)" - self.license = license.bsd_license_template % ( \ -"""Copyright (C) 1999-2001 Brian Paul All Rights Reserved. -(C) Copyright IBM Corporation 2004""", "BRIAN PAUL, IBM") - - self.es = es - - self.undef_list.append( "KEYWORD1" ) - self.undef_list.append( "KEYWORD1_ALT" ) - self.undef_list.append( "KEYWORD2" ) - self.undef_list.append( "NAME" ) - self.undef_list.append( "DISPATCH" ) - self.undef_list.append( "RETURN_DISPATCH" ) - self.undef_list.append( "DISPATCH_TABLE_NAME" ) - self.undef_list.append( "UNUSED_TABLE_NAME" ) - self.undef_list.append( "TABLE_ENTRY" ) - - - def printFunction(self, f, name): - p_string = "" - o_string = "" - t_string = "" - comma = "" - - if f.is_static_entry_point(name): - keyword = "KEYWORD1" - else: - keyword = "KEYWORD1_ALT" - - n = f.static_name(name) - - silence = '' - space = '' - for p in f.parameterIterator(): - if p.is_padding: - continue - - if p.is_pointer(): - cast = "(const void *) " - else: - cast = "" - - t_string = t_string + comma + p.format_string() - p_string = p_string + comma + p.name - o_string = o_string + comma + cast + p.name - comma = ", " - - silence += "%s(void) %s;" % (space, p.name); - space = ' ' - - - if f.return_type != 'void': - dispatch = "RETURN_DISPATCH" - else: - dispatch = "DISPATCH" - - need_proto = False - if not f.is_static_entry_point(name): - need_proto = True - elif self.es: - cat, num = api.get_category_for_name(name) - if (cat.startswith("es") or cat.startswith("GL_OES")): - need_proto = True - if need_proto: - print '%s %s KEYWORD2 NAME(%s)(%s);' % (keyword, f.return_type, n, f.get_parameter_string(name)) - print '' - - print '%s %s KEYWORD2 NAME(%s)(%s)' % (keyword, f.return_type, n, f.get_parameter_string(name)) - print '{' - if silence: - print ' %s' % (silence) - if p_string == "": - print ' %s(%s, (), (F, "gl%s();\\n"));' \ - % (dispatch, f.name, name) - else: - print ' %s(%s, (%s), (F, "gl%s(%s);\\n", %s));' \ - % (dispatch, f.name, p_string, name, t_string, o_string) - print '}' - print '' - return - - def printRealHeader(self): - print '' - self.printVisibility( "HIDDEN", "hidden" ) - print """ -/* - * This file is a template which generates the OpenGL API entry point - * functions. It should be included by a .c file which first defines - * the following macros: - * KEYWORD1 - usually nothing, but might be __declspec(dllexport) on Win32 - * KEYWORD2 - usually nothing, but might be __stdcall on Win32 - * NAME(n) - builds the final function name (usually add "gl" prefix) - * DISPATCH(func, args, msg) - code to do dispatch of named function. - * msg is a printf-style debug message. - * RETURN_DISPATCH(func, args, msg) - code to do dispatch with a return value - * - * Here is an example which generates the usual OpenGL functions: - * #define KEYWORD1 - * #define KEYWORD2 - * #define NAME(func) gl##func - * #define DISPATCH(func, args, msg) \\ - * struct _glapi_table *dispatch = CurrentDispatch; \\ - * (*dispatch->func) args - * #define RETURN DISPATCH(func, args, msg) \\ - * struct _glapi_table *dispatch = CurrentDispatch; \\ - * return (*dispatch->func) args - * - */ - - -#if defined( NAME ) -#ifndef KEYWORD1 -#define KEYWORD1 -#endif - -#ifndef KEYWORD1_ALT -#define KEYWORD1_ALT HIDDEN -#endif - -#ifndef KEYWORD2 -#define KEYWORD2 -#endif - -#ifndef DISPATCH -#error DISPATCH must be defined -#endif - -#ifndef RETURN_DISPATCH -#error RETURN_DISPATCH must be defined -#endif - -""" - return - - - - def printInitDispatch(self, api): - print """ -#endif /* defined( NAME ) */ - -/* - * This is how a dispatch table can be initialized with all the functions - * we generated above. - */ -#ifdef DISPATCH_TABLE_NAME - -#ifndef TABLE_ENTRY -#error TABLE_ENTRY must be defined -#endif - -#ifdef _GLAPI_SKIP_NORMAL_ENTRY_POINTS -#error _GLAPI_SKIP_NORMAL_ENTRY_POINTS must not be defined -#endif - -_glapi_proc DISPATCH_TABLE_NAME[] = {""" - for f in api.functionIterateByOffset(): - print ' TABLE_ENTRY(%s),' % (f.dispatch_name()) - - print ' /* A whole bunch of no-op functions. These might be called' - print ' * when someone tries to call a dynamically-registered' - print ' * extension function without a current rendering context.' - print ' */' - for i in range(1, 100): - print ' TABLE_ENTRY(Unused),' - - print '};' - print '#endif /* DISPATCH_TABLE_NAME */' - print '' - return - - - def printAliasedTable(self, api): - print """ -/* - * This is just used to silence compiler warnings. - * We list the functions which are not otherwise used. - */ -#ifdef UNUSED_TABLE_NAME -_glapi_proc UNUSED_TABLE_NAME[] = {""" - - normal_entries = [] - proto_entries = [] - for f in api.functionIterateByOffset(): - normal_ents, proto_ents = self.classifyEntryPoints(f) - - # exclude f.name - if f.name in normal_ents: - normal_ents.remove(f.name) - elif f.name in proto_ents: - proto_ents.remove(f.name) - - normal_ents = [f.static_name(ent) for ent in normal_ents] - proto_ents = [f.static_name(ent) for ent in proto_ents] - - normal_entries.extend(normal_ents) - proto_entries.extend(proto_ents) - - print '#ifndef _GLAPI_SKIP_NORMAL_ENTRY_POINTS' - for ent in normal_entries: - print ' TABLE_ENTRY(%s),' % (ent) - print '#endif /* _GLAPI_SKIP_NORMAL_ENTRY_POINTS */' - print '#ifndef _GLAPI_SKIP_PROTO_ENTRY_POINTS' - for ent in proto_entries: - print ' TABLE_ENTRY(%s),' % (ent) - print '#endif /* _GLAPI_SKIP_PROTO_ENTRY_POINTS */' - - print '};' - print '#endif /*UNUSED_TABLE_NAME*/' - print '' - return - - - def classifyEntryPoints(self, func): - normal_names = [] - normal_stubs = [] - proto_names = [] - proto_stubs = [] - # classify the entry points - for name in func.entry_points: - if func.has_different_protocol(name): - if func.is_static_entry_point(name): - proto_names.append(name) - else: - proto_stubs.append(name) - else: - if func.is_static_entry_point(name): - normal_names.append(name) - else: - normal_stubs.append(name) - # there can be at most one stub for a function - if normal_stubs: - normal_names.append(normal_stubs[0]) - elif proto_stubs: - proto_names.append(proto_stubs[0]) - - return (normal_names, proto_names) - - def printBody(self, api): - normal_entry_points = [] - proto_entry_points = [] - for func in api.functionIterateByOffset(): - normal_ents, proto_ents = self.classifyEntryPoints(func) - normal_entry_points.append((func, normal_ents)) - proto_entry_points.append((func, proto_ents)) - - print '#ifndef _GLAPI_SKIP_NORMAL_ENTRY_POINTS' - print '' - for func, ents in normal_entry_points: - for ent in ents: - self.printFunction(func, ent) - print '' - print '#endif /* _GLAPI_SKIP_NORMAL_ENTRY_POINTS */' - print '' - print '/* these entry points might require different protocols */' - print '#ifndef _GLAPI_SKIP_PROTO_ENTRY_POINTS' - print '' - for func, ents in proto_entry_points: - for ent in ents: - self.printFunction(func, ent) - print '' - print '#endif /* _GLAPI_SKIP_PROTO_ENTRY_POINTS */' - print '' - - self.printInitDispatch(api) - self.printAliasedTable(api) - return - - -def show_usage(): - print "Usage: %s [-f input_file_name] [-c]" % sys.argv[0] - print "-c Enable compatibility with OpenGL ES." - sys.exit(1) - -if __name__ == '__main__': - file_name = "gl_API.xml" - - try: - (args, trail) = getopt.getopt(sys.argv[1:], "f:c") - except Exception,e: - show_usage() - - es = False - for (arg,val) in args: - if arg == "-f": - file_name = val - elif arg == "-c": - es = True - - api = gl_XML.parse_GL_API(file_name, glX_XML.glx_item_factory()) - - printer = PrintGlOffsets(es) - printer.Print(api) diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/gl_enums.py b/dll/opengl/mesa/src/mapi/glapi/gen/gl_enums.py deleted file mode 100644 index d51b74a4a7c..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/gl_enums.py +++ /dev/null @@ -1,259 +0,0 @@ -#!/usr/bin/python2 -# -*- Mode: Python; py-indent-offset: 8 -*- - -# (C) Copyright Zack Rusin 2005 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Zack Rusin - -import license -import gl_XML -import sys, getopt - -class PrintGlEnums(gl_XML.gl_print_base): - - def __init__(self): - gl_XML.gl_print_base.__init__(self) - - self.name = "gl_enums.py (from Mesa)" - self.license = license.bsd_license_template % ( \ -"""Copyright (C) 1999-2005 Brian Paul All Rights Reserved.""", "BRIAN PAUL") - self.enum_table = {} - - - def printRealHeader(self): - print '#include "main/glheader.h"' - print '#include "main/mfeatures.h"' - print '#include "main/enums.h"' - print '#include "main/imports.h"' - print '#include "main/mtypes.h"' - print '' - print 'typedef struct {' - print ' size_t offset;' - print ' int n;' - print '} enum_elt;' - print '' - return - - def print_code(self): - print """ -typedef int (*cfunc)(const void *, const void *); - -/** - * Compare a key name to an element in the \c all_enums array. - * - * \c bsearch always passes the key as the first parameter and the pointer - * to the array element as the second parameter. We can elimiate some - * extra work by taking advantage of that fact. - * - * \param a Pointer to the desired enum name. - * \param b Pointer to an element of the \c all_enums array. - */ -static int compar_name( const char *a, const enum_elt *b ) -{ - return strcmp( a, & enum_string_table[ b->offset ] ); -} - -/** - * Compare a key enum value to an element in the \c all_enums array. - * - * \c bsearch always passes the key as the first parameter and the pointer - * to the array element as the second parameter. We can elimiate some - * extra work by taking advantage of that fact. - * - * \param a Pointer to the desired enum name. - * \param b Pointer to an index into the \c all_enums array. - */ -static int compar_nr( const int *a, const unsigned *b ) -{ - return a[0] - all_enums[*b].n; -} - - -static char token_tmp[20]; - -const char *_mesa_lookup_enum_by_nr( int nr ) -{ - unsigned * i; - - i = (unsigned *) _mesa_bsearch(& nr, reduced_enums, - Elements(reduced_enums), - sizeof(reduced_enums[0]), - (cfunc) compar_nr); - - if ( i != NULL ) { - return & enum_string_table[ all_enums[ *i ].offset ]; - } - else { - /* this is not re-entrant safe, no big deal here */ - _mesa_snprintf(token_tmp, sizeof(token_tmp) - 1, "0x%x", nr); - token_tmp[sizeof(token_tmp) - 1] = '\\0'; - return token_tmp; - } -} - -/** - * Primitive names - */ -static const char *prim_names[PRIM_UNKNOWN + 1] = { - "GL_POINTS", - "GL_LINES", - "GL_LINE_LOOP", - "GL_LINE_STRIP", - "GL_TRIANGLES", - "GL_TRIANGLE_STRIP", - "GL_TRIANGLE_FAN", - "GL_QUADS", - "GL_QUAD_STRIP", - "GL_POLYGON", - "outside begin/end", - "inside unknown primitive", - "unknown state" -}; - - -/* Get the name of an enum given that it is a primitive type. Avoids - * GL_FALSE/GL_POINTS ambiguity and others. - */ -const char * -_mesa_lookup_prim_by_nr(GLuint nr) -{ - if (nr < Elements(prim_names)) - return prim_names[nr]; - else - return "invalid mode"; -} - - -int _mesa_lookup_enum_by_name( const char *symbol ) -{ - enum_elt * f = NULL; - - if ( symbol != NULL ) { - f = (enum_elt *) _mesa_bsearch(symbol, all_enums, - Elements(all_enums), - sizeof( enum_elt ), - (cfunc) compar_name); - } - - return (f != NULL) ? f->n : -1; -} - -""" - return - - - def printBody(self, api_list): - self.enum_table = {} - for api in api_list: - self.process_enums( api ) - - keys = self.enum_table.keys() - keys.sort() - - name_table = [] - enum_table = {} - - for enum in keys: - low_pri = 9 - for [name, pri] in self.enum_table[ enum ]: - name_table.append( [name, enum] ) - - if pri < low_pri: - low_pri = pri - enum_table[enum] = name - - - name_table.sort() - - string_offsets = {} - i = 0; - print 'LONGSTRING static const char enum_string_table[] = ' - for [name, enum] in name_table: - print ' "%s\\0"' % (name) - string_offsets[ name ] = i - i += len(name) + 1 - - print ' ;' - print '' - - - print 'static const enum_elt all_enums[%u] =' % (len(name_table)) - print '{' - for [name, enum] in name_table: - print ' { %5u, 0x%08X }, /* %s */' % (string_offsets[name], enum, name) - print '};' - print '' - - print 'static const unsigned reduced_enums[%u] =' % (len(keys)) - print '{' - for enum in keys: - name = enum_table[ enum ] - if [name, enum] not in name_table: - print ' /* Error! %s, 0x%04x */ 0,' % (name, enum) - else: - i = name_table.index( [name, enum] ) - - print ' %4u, /* %s */' % (i, name) - print '};' - - - self.print_code() - return - - - def process_enums(self, api): - for obj in api.enumIterateByName(): - if obj.value not in self.enum_table: - self.enum_table[ obj.value ] = [] - - - enum = self.enum_table[ obj.value ] - name = "GL_" + obj.name - priority = obj.priority() - already_in = False; - for n, p in enum: - if n == name: - already_in = True - if not already_in: - enum.append( [name, priority] ) - - -def show_usage(): - print "Usage: %s [-f input_file_name]" % sys.argv[0] - sys.exit(1) - -if __name__ == '__main__': - try: - (args, trail) = getopt.getopt(sys.argv[1:], "f:") - except Exception,e: - show_usage() - - api_list = [] - for (arg,val) in args: - if arg == "-f": - api = gl_XML.parse_GL_API( val ) - api_list.append(api); - - printer = PrintGlEnums() - printer.Print( api_list ) diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/gl_gentable.py b/dll/opengl/mesa/src/mapi/glapi/gen/gl_gentable.py deleted file mode 100644 index 5657e327743..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/gl_gentable.py +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env python - -# (C) Copyright IBM Corporation 2004, 2005 -# (C) Copyright Apple Inc. 2011 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Jeremy Huddleston -# -# Based on code ogiginally by: -# Ian Romanick - -import license -import gl_XML, glX_XML -import sys, getopt - -header = """/* GLXEXT is the define used in the xserver when the GLX extension is being - * built. Hijack this to determine whether this file is being built for the - * server or the client. - */ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\ - || (!defined(GLXEXT) && defined(DEBUG) && !defined(_WIN32_WCE)) -#define USE_BACKTRACE -#endif - -#ifdef USE_BACKTRACE -#include -#endif - -#include -#include -#include - -#include - -#include "glapi.h" -#include "glapitable.h" - -#ifdef GLXEXT -#include "os.h" -#endif - -static void -__glapi_gentable_NoOp(void) { - const char *fstr = "Unknown"; - - /* Silence potential GCC warning for some #ifdef paths. - */ - (void) fstr; -#if defined(USE_BACKTRACE) -#if !defined(GLXEXT) - if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) -#endif - { - void *frames[2]; - - if(backtrace(frames, 2) == 2) { - Dl_info info; - dladdr(frames[1], &info); - if(info.dli_sname) - fstr = info.dli_sname; - } - -#if !defined(GLXEXT) - fprintf(stderr, "Call to unimplemented API: %s\\n", fstr); -#endif - } -#endif -#if defined(GLXEXT) - LogMessage(X_ERROR, "GLX: Call to unimplemented API: %s\\n", fstr); -#endif -} - -static void -__glapi_gentable_set_remaining_noop(struct _glapi_table *disp) { - GLuint entries = _glapi_get_dispatch_table_size(); - void **dispatch = (void **) disp; - int i; - - /* ISO C is annoying sometimes */ - union {_glapi_proc p; void *v;} p; - p.p = __glapi_gentable_NoOp; - - for(i=0; i < entries; i++) - if(dispatch[i] == NULL) - dispatch[i] = p.v; -} - -struct _glapi_table * -_glapi_create_table_from_handle(void *handle, const char *symbol_prefix) { - struct _glapi_table *disp = calloc(1, sizeof(struct _glapi_table)); - char symboln[512]; - - if(!disp) - return NULL; - - if(symbol_prefix == NULL) - symbol_prefix = ""; -""" - -footer = """ - __glapi_gentable_set_remaining_noop(disp); - - return disp; -} -""" - -body_template = """ - if(!disp->%(name)s) { - void ** procp = (void **) &disp->%(name)s; - snprintf(symboln, sizeof(symboln), "%%s%(entry_point)s", symbol_prefix); - *procp = dlsym(handle, symboln); - } -""" - -class PrintCode(gl_XML.gl_print_base): - - def __init__(self): - gl_XML.gl_print_base.__init__(self) - - self.name = "gl_gen_table.py (from Mesa)" - self.license = license.bsd_license_template % ( \ -"""Copyright (C) 1999-2001 Brian Paul All Rights Reserved. -(C) Copyright IBM Corporation 2004, 2005 -(C) Copyright Apple Inc 2011""", "BRIAN PAUL, IBM") - - return - - - def get_stack_size(self, f): - size = 0 - for p in f.parameterIterator(): - if p.is_padding: - continue - - size += p.get_stack_size() - - return size - - - def printRealHeader(self): - print header - return - - - def printRealFooter(self): - print footer - return - - - def printBody(self, api): - for f in api.functionIterateByOffset(): - for entry_point in f.entry_points: - vars = { 'entry_point' : entry_point, - 'name' : f.name } - - print body_template % vars - return - -def show_usage(): - print "Usage: %s [-f input_file_name]" % sys.argv[0] - sys.exit(1) - -if __name__ == '__main__': - file_name = "gl_API.xml" - - try: - (args, trail) = getopt.getopt(sys.argv[1:], "m:f:") - except Exception,e: - show_usage() - - for (arg,val) in args: - if arg == "-f": - file_name = val - - printer = PrintCode() - - api = gl_XML.parse_GL_API(file_name, glX_XML.glx_item_factory()) - printer.Print(api) diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/gl_offsets.py b/dll/opengl/mesa/src/mapi/glapi/gen/gl_offsets.py deleted file mode 100644 index 54867b34634..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/gl_offsets.py +++ /dev/null @@ -1,120 +0,0 @@ -#!/usr/bin/env python - -# (C) Copyright IBM Corporation 2004, 2005 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Ian Romanick - -import gl_XML -import license -import sys, getopt - -class PrintGlOffsets(gl_XML.gl_print_base): - def __init__(self, es=False): - gl_XML.gl_print_base.__init__(self) - - self.es = es - self.name = "gl_offsets.py (from Mesa)" - self.header_tag = '_GLAPI_OFFSETS_H_' - self.license = license.bsd_license_template % ( \ -"""Copyright (C) 1999-2001 Brian Paul All Rights Reserved. -(C) Copyright IBM Corporation 2004""", "BRIAN PAUL, IBM") - return - - def printBody(self, api): - print '/* this file should not be included directly in mesa */' - print '' - - functions = [] - abi_functions = [] - alias_functions = [] - count = 0 - for f in api.functionIterateByOffset(): - if not f.is_abi(): - functions.append( [f, count] ) - count += 1 - else: - abi_functions.append( f ) - - if self.es: - # remember functions with aliases - if len(f.entry_points) > 1: - alias_functions.append(f) - - for f in abi_functions: - print '#define _gloffset_%s %d' % (f.name, f.offset) - last_static = f.offset - - print '' - print '#if !defined(_GLAPI_USE_REMAP_TABLE)' - print '' - - for [f, index] in functions: - print '#define _gloffset_%s %d' % (f.name, f.offset) - - print '#define _gloffset_FIRST_DYNAMIC %d' % (api.next_offset) - - print '' - print '#else' - print '' - - for [f, index] in functions: - print '#define _gloffset_%s driDispatchRemapTable[%s_remap_index]' % (f.name, f.name) - - print '' - print '#endif /* !defined(_GLAPI_USE_REMAP_TABLE) */' - - if alias_functions: - print '' - print '/* define aliases for compatibility */' - for f in alias_functions: - for name in f.entry_points: - if name != f.name: - print '#define _gloffset_%s _gloffset_%s' % (name, f.name) - return - - -def show_usage(): - print "Usage: %s [-f input_file_name] [-c]" % sys.argv[0] - print " -c Enable compatibility with OpenGL ES." - sys.exit(1) - -if __name__ == '__main__': - file_name = "gl_API.xml" - - try: - (args, trail) = getopt.getopt(sys.argv[1:], "f:c") - except Exception,e: - show_usage() - - es = False - for (arg,val) in args: - if arg == "-f": - file_name = val - elif arg == "-c": - es = True - - api = gl_XML.parse_GL_API( file_name ) - - printer = PrintGlOffsets(es) - printer.Print( api ) diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/gl_procs.py b/dll/opengl/mesa/src/mapi/glapi/gen/gl_procs.py deleted file mode 100644 index a9ba48297a1..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/gl_procs.py +++ /dev/null @@ -1,215 +0,0 @@ -#!/usr/bin/env python - -# (C) Copyright IBM Corporation 2004, 2005 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Ian Romanick - -import license -import gl_XML, glX_XML -import sys, getopt - -class PrintGlProcs(gl_XML.gl_print_base): - def __init__(self, long_strings, es=False): - gl_XML.gl_print_base.__init__(self) - - self.es = es - self.long_strings = long_strings - self.name = "gl_procs.py (from Mesa)" - self.license = license.bsd_license_template % ( \ -"""Copyright (C) 1999-2001 Brian Paul All Rights Reserved. -(C) Copyright IBM Corporation 2004, 2006""", "BRIAN PAUL, IBM") - - - def printRealHeader(self): - print """ -/* This file is only included by glapi.c and is used for - * the GetProcAddress() function - */ - -typedef struct { - GLint Name_offset; -#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) - _glapi_proc Address; -#endif - GLuint Offset; -} glprocs_table_t; - -#if !defined(NEED_FUNCTION_POINTER) && !defined(GLX_INDIRECT_RENDERING) -# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , o } -#elif defined(NEED_FUNCTION_POINTER) && !defined(GLX_INDIRECT_RENDERING) -# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f1 , o } -#elif defined(NEED_FUNCTION_POINTER) && defined(GLX_INDIRECT_RENDERING) -# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f2 , o } -#elif !defined(NEED_FUNCTION_POINTER) && defined(GLX_INDIRECT_RENDERING) -# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f3 , o } -#endif - -""" - return - - def printRealFooter(self): - print '' - print '#undef NAME_FUNC_OFFSET' - return - - def printFunctionString(self, name): - if self.long_strings: - print ' "gl%s\\0"' % (name) - else: - print " 'g','l',", - for c in name: - print "'%s'," % (c), - - print "'\\0'," - - - def printBody(self, api): - print '' - if self.long_strings: - print 'static const char gl_string_table[] =' - else: - print 'static const char gl_string_table[] = {' - - base_offset = 0 - table = [] - for func in api.functionIterateByOffset(): - name = func.dispatch_name() - self.printFunctionString(func.name) - table.append((base_offset, "gl" + name, "gl" + name, "NULL", func.offset)) - - # The length of the function's name, plus 2 for "gl", - # plus 1 for the NUL. - - base_offset += len(func.name) + 3 - - - for func in api.functionIterateByOffset(): - for n in func.entry_points: - if n != func.name: - name = func.dispatch_name() - self.printFunctionString( n ) - - if func.has_different_protocol(n): - alt_name = "gl" + func.static_glx_name(n) - table.append((base_offset, "gl" + name, alt_name, alt_name, func.offset)) - else: - table.append((base_offset, "gl" + name, "gl" + name, "NULL", func.offset)) - - base_offset += len(n) + 3 - - - if self.long_strings: - print ' ;' - else: - print '};' - - print '' - print '' - print "#ifdef USE_MGL_NAMESPACE" - for func in api.functionIterateByOffset(): - for n in func.entry_points: - if (not func.is_static_entry_point(func.name)) or (func.has_different_protocol(n) and not func.is_static_entry_point(n)): - print '#define gl_dispatch_stub_%u mgl_dispatch_stub_%u' % (func.offset, func.offset) - break - print "#endif /* USE_MGL_NAMESPACE */" - print '' - print '' - print '#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING)' - for func in api.functionIterateByOffset(): - for n in func.entry_points: - if (not func.is_static_entry_point(func.name)) or (func.has_different_protocol(n) and not func.is_static_entry_point(n)): - print '%s GLAPIENTRY gl_dispatch_stub_%u(%s);' % (func.return_type, func.offset, func.get_parameter_string()) - break - - if self.es: - categories = {} - for func in api.functionIterateByOffset(): - for n in func.entry_points: - cat, num = api.get_category_for_name(n) - if (cat.startswith("es") or cat.startswith("GL_OES")): - if not categories.has_key(cat): - categories[cat] = [] - proto = 'GLAPI %s GLAPIENTRY %s(%s);' \ - % (func.return_type, "gl" + n, func.get_parameter_string(n)) - categories[cat].append(proto) - if categories: - print '' - print '/* OpenGL ES specific prototypes */' - print '' - keys = categories.keys() - keys.sort() - for key in keys: - print '/* category %s */' % key - print "\n".join(categories[key]) - print '' - - print '#endif /* defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) */' - - print '' - print 'static const glprocs_table_t static_functions[] = {' - - for info in table: - print ' NAME_FUNC_OFFSET(%5u, %s, %s, %s, %d),' % info - - print ' NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0)' - print '};' - return - - -def show_usage(): - print "Usage: %s [-f input_file_name] [-m mode] [-c]" % sys.argv[0] - print "-c Enable compatibility with OpenGL ES." - print "-m mode mode can be one of:" - print " long - Create code for compilers that can handle very" - print " long string constants. (default)" - print " short - Create code for compilers that can only handle" - print " ANSI C89 string constants." - sys.exit(1) - -if __name__ == '__main__': - file_name = "gl_API.xml" - - try: - (args, trail) = getopt.getopt(sys.argv[1:], "f:m:c") - except Exception,e: - show_usage() - - long_string = 1 - es = False - for (arg,val) in args: - if arg == "-f": - file_name = val - elif arg == "-m": - if val == "short": - long_string = 0 - elif val == "long": - long_string = 1 - else: - show_usage() - elif arg == "-c": - es = True - - api = gl_XML.parse_GL_API(file_name, glX_XML.glx_item_factory()) - printer = PrintGlProcs(long_string, es) - printer.Print(api) diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/gl_table.py b/dll/opengl/mesa/src/mapi/glapi/gen/gl_table.py deleted file mode 100644 index 7f3b91513fe..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/gl_table.py +++ /dev/null @@ -1,260 +0,0 @@ -#!/usr/bin/python2 - -# (C) Copyright IBM Corporation 2004 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Ian Romanick - -import gl_XML -import license -import sys, getopt - -class PrintGlTable(gl_XML.gl_print_base): - def __init__(self, es=False): - gl_XML.gl_print_base.__init__(self) - - self.es = es - self.header_tag = '_GLAPI_TABLE_H_' - self.name = "gl_table.py (from Mesa)" - self.license = license.bsd_license_template % ( \ -"""Copyright (C) 1999-2003 Brian Paul All Rights Reserved. -(C) Copyright IBM Corporation 2004""", "BRIAN PAUL, IBM") - return - - - def printBody(self, api): - for f in api.functionIterateByOffset(): - arg_string = f.get_parameter_string() - print ' %s (GLAPIENTRYP %s)(%s); /* %d */' % (f.return_type, f.name, arg_string, f.offset) - - - def printRealHeader(self): - print '#ifndef GLAPIENTRYP' - print '# ifndef GLAPIENTRY' - print '# define GLAPIENTRY' - print '# endif' - print '' - print '# define GLAPIENTRYP GLAPIENTRY *' - print '#endif' - print '' - print '' - print 'struct _glapi_table' - print '{' - return - - - def printRealFooter(self): - print '};' - return - - -class PrintRemapTable(gl_XML.gl_print_base): - def __init__(self, es=False): - gl_XML.gl_print_base.__init__(self) - - self.es = es - self.header_tag = '_DISPATCH_H_' - self.name = "gl_table.py (from Mesa)" - self.license = license.bsd_license_template % ("(C) Copyright IBM Corporation 2005", "IBM") - return - - - def printRealHeader(self): - print """ -/** - * \\file main/dispatch.h - * Macros for handling GL dispatch tables. - * - * For each known GL function, there are 3 macros in this file. The first - * macro is named CALL_FuncName and is used to call that GL function using - * the specified dispatch table. The other 2 macros, called GET_FuncName - * can SET_FuncName, are used to get and set the dispatch pointer for the - * named function in the specified dispatch table. - */ - -/* GLXEXT is defined when building the GLX extension in the xserver. - */ -#if !defined(GLXEXT) -#include "main/mfeatures.h" -#endif -""" - return - - def printBody(self, api): - print '#define CALL_by_offset(disp, cast, offset, parameters) \\' - print ' (*(cast (GET_by_offset(disp, offset)))) parameters' - print '#define GET_by_offset(disp, offset) \\' - print ' (offset >= 0) ? (((_glapi_proc *)(disp))[offset]) : NULL' - print '#define SET_by_offset(disp, offset, fn) \\' - print ' do { \\' - print ' if ( (offset) < 0 ) { \\' - print ' /* fprintf( stderr, "[%s:%u] SET_by_offset(%p, %d, %s)!\\n", */ \\' - print ' /* __func__, __LINE__, disp, offset, # fn); */ \\' - print ' /* abort(); */ \\' - print ' } \\' - print ' else { \\' - print ' ( (_glapi_proc *) (disp) )[offset] = (_glapi_proc) fn; \\' - print ' } \\' - print ' } while(0)' - print '' - - functions = [] - abi_functions = [] - alias_functions = [] - count = 0 - for f in api.functionIterateByOffset(): - if not f.is_abi(): - functions.append( [f, count] ) - count += 1 - else: - abi_functions.append( [f, -1] ) - - if self.es: - # remember functions with aliases - if len(f.entry_points) > 1: - alias_functions.append(f) - - print '/* total number of offsets below */' - print '#define _gloffset_COUNT %d' % (len(abi_functions + functions)) - print '' - - for f, index in abi_functions: - print '#define _gloffset_%s %d' % (f.name, f.offset) - - print '' - print '#if !FEATURE_remap_table' - print '' - - for f, index in functions: - print '#define _gloffset_%s %d' % (f.name, f.offset) - - print '' - print '#else /* !FEATURE_remap_table */' - print '' - - if self.es: - remap_table = "esLocalRemapTable" - - print '#define %s_size %u' % (remap_table, count) - print 'static int %s[ %s_size ];' % (remap_table, remap_table) - print '' - else: - remap_table = "driDispatchRemapTable" - - print '#define %s_size %u' % (remap_table, count) - print 'extern int %s[ %s_size ];' % (remap_table, remap_table) - print '' - - for f, index in functions: - print '#define %s_remap_index %u' % (f.name, index) - - print '' - - for f, index in functions: - print '#define _gloffset_%s %s[%s_remap_index]' % (f.name, remap_table, f.name) - - print '' - print '#endif /* !FEATURE_remap_table */' - print '' - - for f, index in abi_functions + functions: - arg_string = gl_XML.create_parameter_string( f.parameters, 0 ) - - print 'typedef %s (GLAPIENTRYP _glptr_%s)(%s);' % (f.return_type, f.name, arg_string) - print '#define CALL_%s(disp, parameters) \\' % (f.name) - print ' (* GET_%s(disp)) parameters' % (f.name) - print 'static inline _glptr_%s GET_%s(struct _glapi_table *disp) {' % (f.name, f.name) - print ' return (_glptr_%s) (GET_by_offset(disp, _gloffset_%s));' % (f.name, f.name) - print '}' - print - print 'static inline void SET_%s(struct _glapi_table *disp, %s (GLAPIENTRYP fn)(%s)) {' % (f.name, f.return_type, arg_string) - print ' SET_by_offset(disp, _gloffset_%s, fn);' % (f.name) - print '}' - print - - if alias_functions: - print '' - print '/* define aliases for compatibility */' - for f in alias_functions: - for name in f.entry_points: - if name != f.name: - print '#define CALL_%s(disp, parameters) CALL_%s(disp, parameters)' % (name, f.name) - print '#define GET_%s(disp) GET_%s(disp)' % (name, f.name) - print '#define SET_%s(disp, fn) SET_%s(disp, fn)' % (name, f.name) - print '' - - print '#if FEATURE_remap_table' - for f in alias_functions: - for name in f.entry_points: - if name != f.name: - print '#define %s_remap_index %s_remap_index' % (name, f.name) - print '#endif /* FEATURE_remap_table */' - print '' - - return - - -def show_usage(): - print "Usage: %s [-f input_file_name] [-m mode] [-c ver]" % sys.argv[0] - print " -m mode Mode can be 'table' or 'remap_table'." - print " -c ver Version can be 'es1' or 'es2'." - sys.exit(1) - -if __name__ == '__main__': - file_name = "gl_API.xml" - - try: - (args, trail) = getopt.getopt(sys.argv[1:], "f:m:c:") - except Exception,e: - show_usage() - - mode = "table" - es = None - for (arg,val) in args: - if arg == "-f": - file_name = val - elif arg == "-m": - mode = val - elif arg == "-c": - es = val - - if mode == "table": - printer = PrintGlTable(es) - elif mode == "remap_table": - printer = PrintRemapTable(es) - else: - show_usage() - - api = gl_XML.parse_GL_API( file_name ) - - if es is not None: - import gles_api - - api_map = { - 'es1': gles_api.es1_api, - 'es2': gles_api.es2_api, - } - - api.filter_functions(api_map[es]) - - printer.Print( api ) diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/gl_x86-64_asm.py b/dll/opengl/mesa/src/mapi/glapi/gen/gl_x86-64_asm.py deleted file mode 100644 index ef759bf7bf3..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/gl_x86-64_asm.py +++ /dev/null @@ -1,335 +0,0 @@ -#!/usr/bin/env python - -# (C) Copyright IBM Corporation 2005 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Ian Romanick - -import license -import gl_XML, glX_XML -import sys, getopt, copy - -def should_use_push(registers): - for [reg, offset] in registers: - if reg[1:4] == "xmm": - return 0 - - N = len(registers) - return (N & 1) != 0 - - -def local_size(registers): - # The x86-64 ABI says "the value (%rsp - 8) is always a multiple of - # 16 when control is transfered to the function entry point." This - # means that the local stack usage must be (16*N)+8 for some value - # of N. (16*N)+8 = (8*(2N))+8 = 8*(2N+1). As long as N is odd, we - # meet this requirement. - - N = (len(registers) | 1) - return 8*N - - -def save_all_regs(registers): - adjust_stack = 0 - if not should_use_push(registers): - adjust_stack = local_size(registers) - print '\tsubq\t$%u, %%rsp' % (adjust_stack) - - for [reg, stack_offset] in registers: - save_reg( reg, stack_offset, adjust_stack ) - return - - -def restore_all_regs(registers): - adjust_stack = 0 - if not should_use_push(registers): - adjust_stack = local_size(registers) - - temp = copy.deepcopy(registers) - while len(temp): - [reg, stack_offset] = temp.pop() - restore_reg(reg, stack_offset, adjust_stack) - - if adjust_stack: - print '\taddq\t$%u, %%rsp' % (adjust_stack) - return - - -def save_reg(reg, offset, use_move): - if use_move: - if offset == 0: - print '\tmovq\t%s, (%%rsp)' % (reg) - else: - print '\tmovq\t%s, %u(%%rsp)' % (reg, offset) - else: - print '\tpushq\t%s' % (reg) - - return - - -def restore_reg(reg, offset, use_move): - if use_move: - if offset == 0: - print '\tmovq\t(%%rsp), %s' % (reg) - else: - print '\tmovq\t%u(%%rsp), %s' % (offset, reg) - else: - print '\tpopq\t%s' % (reg) - - return - - -class PrintGenericStubs(gl_XML.gl_print_base): - - def __init__(self): - gl_XML.gl_print_base.__init__(self) - - self.name = "gl_x86-64_asm.py (from Mesa)" - self.license = license.bsd_license_template % ("(C) Copyright IBM Corporation 2005", "IBM") - return - - - def get_stack_size(self, f): - size = 0 - for p in f.parameterIterator(): - size += p.get_stack_size() - - return size - - - def printRealHeader(self): - print "/* If we build with gcc's -fvisibility=hidden flag, we'll need to change" - print " * the symbol visibility mode to 'default'." - print ' */' - print '' - print '#include "x86/assyntax.h"' - print '' - print '#ifdef __GNUC__' - print '# pragma GCC visibility push(default)' - print '# define HIDDEN(x) .hidden x' - print '#else' - print '# define HIDDEN(x)' - print '#endif' - print '' - print '# if defined(USE_MGL_NAMESPACE)' - print '# define GL_PREFIX(n) GLNAME(CONCAT(mgl,n))' - print '# define _glapi_Dispatch _mglapi_Dispatch' - print '# else' - print '# define GL_PREFIX(n) GLNAME(CONCAT(gl,n))' - print '# endif' - print '' - print '#if defined(PTHREADS) || defined(WIN32)' - print '# define THREADS' - print '#endif' - print '' - print '\t.text' - print '' - print '#ifdef GLX_USE_TLS' - print '' - print '\t.globl _x86_64_get_get_dispatch; HIDDEN(_x86_64_get_get_dispatch)' - print '_x86_64_get_get_dispatch:' - print '\tlea\t_x86_64_get_dispatch(%rip), %rax' - print '\tret' - print '' - print '\t.p2align\t4,,15' - print '_x86_64_get_dispatch:' - print '\tmovq\t_glapi_tls_Dispatch@GOTTPOFF(%rip), %rax' - print '\tmovq\t%fs:(%rax), %rax' - print '\tret' - print '\t.size\t_x86_64_get_dispatch, .-_x86_64_get_dispatch' - print '' - print '#elif defined(PTHREADS)' - print '' - print '\t.extern\t_glapi_Dispatch' - print '\t.extern\t_gl_DispatchTSD' - print '\t.extern\tpthread_getspecific' - print '' - print '\t.p2align\t4,,15' - print '_x86_64_get_dispatch:' - print '\tmovq\t_gl_DispatchTSD@GOTPCREL(%rip), %rax' - print '\tmovl\t(%rax), %edi' - print '\tjmp\tpthread_getspecific@PLT' - print '' - print '#elif defined(THREADS)' - print '' - print '\t.extern\t_glapi_get_dispatch' - print '' - print '#endif' - print '' - return - - - def printRealFooter(self): - print '' - print '#if defined(GLX_USE_TLS) && defined(__linux__)' - print ' .section ".note.ABI-tag", "a"' - print ' .p2align 2' - print ' .long 1f - 0f /* name length */' - print ' .long 3f - 2f /* data length */' - print ' .long 1 /* note length */' - print '0: .asciz "GNU" /* vendor name */' - print '1: .p2align 2' - print '2: .long 0 /* note data: the ABI tag */' - print ' .long 2,4,20 /* Minimum kernel version w/TLS */' - print '3: .p2align 2 /* pad out section */' - print '#endif /* GLX_USE_TLS */' - print '' - print '#if defined (__ELF__) && defined (__linux__)' - print ' .section .note.GNU-stack,"",%progbits' - print '#endif' - return - - - def printFunction(self, f): - - # The x86-64 ABI divides function parameters into a couple - # classes. For the OpenGL interface, the only ones that are - # relevent are INTEGER and SSE. Basically, the first 8 - # GLfloat or GLdouble parameters are placed in %xmm0 - %xmm7, - # the first 6 non-GLfloat / non-GLdouble parameters are placed - # in registers listed in int_parameters. - # - # If more parameters than that are required, they are passed - # on the stack. Therefore, we just have to make sure that - # %esp hasn't changed when we jump to the actual function. - # Since we're jumping to the function (and not calling it), we - # have to make sure of that anyway! - - int_parameters = ["%rdi", "%rsi", "%rdx", "%rcx", "%r8", "%r9"] - - int_class = 0 - sse_class = 0 - stack_offset = 0 - registers = [] - for p in f.parameterIterator(): - type_name = p.get_base_type_string() - - if p.is_pointer() or (type_name != "GLfloat" and type_name != "GLdouble"): - if int_class < 6: - registers.append( [int_parameters[int_class], stack_offset] ) - int_class += 1 - stack_offset += 8 - else: - if sse_class < 8: - registers.append( ["%%xmm%u" % (sse_class), stack_offset] ) - sse_class += 1 - stack_offset += 8 - - if ((int_class & 1) == 0) and (sse_class == 0): - registers.append( ["%rbp", 0] ) - - - name = f.dispatch_name() - - print '\t.p2align\t4,,15' - print '\t.globl\tGL_PREFIX(%s)' % (name) - print '\t.type\tGL_PREFIX(%s), @function' % (name) - if not f.is_static_entry_point(f.name): - print '\tHIDDEN(GL_PREFIX(%s))' % (name) - print 'GL_PREFIX(%s):' % (name) - print '#if defined(GLX_USE_TLS)' - print '\tcall\t_x86_64_get_dispatch@PLT' - print '\tmovq\t%u(%%rax), %%r11' % (f.offset * 8) - print '\tjmp\t*%r11' - print '#elif defined(PTHREADS)' - - save_all_regs(registers) - print '\tcall\t_x86_64_get_dispatch@PLT' - restore_all_regs(registers) - - if f.offset == 0: - print '\tmovq\t(%rax), %r11' - else: - print '\tmovq\t%u(%%rax), %%r11' % (f.offset * 8) - - print '\tjmp\t*%r11' - - print '#else' - print '\tmovq\t_glapi_Dispatch(%rip), %rax' - print '\ttestq\t%rax, %rax' - print '\tje\t1f' - print '\tmovq\t%u(%%rax), %%r11' % (f.offset * 8) - print '\tjmp\t*%r11' - print '1:' - - save_all_regs(registers) - print '\tcall\t_glapi_get_dispatch' - restore_all_regs(registers) - - print '\tmovq\t%u(%%rax), %%r11' % (f.offset * 8) - print '\tjmp\t*%r11' - print '#endif /* defined(GLX_USE_TLS) */' - - print '\t.size\tGL_PREFIX(%s), .-GL_PREFIX(%s)' % (name, name) - print '' - return - - - def printBody(self, api): - for f in api.functionIterateByOffset(): - self.printFunction(f) - - - for f in api.functionIterateByOffset(): - dispatch = f.dispatch_name() - for n in f.entry_points: - if n != f.name: - if f.is_static_entry_point(n): - text = '\t.globl GL_PREFIX(%s) ; .set GL_PREFIX(%s), GL_PREFIX(%s)' % (n, n, dispatch) - - if f.has_different_protocol(n): - print '#ifndef GLX_INDIRECT_RENDERING' - print text - print '#endif' - else: - print text - - return - -def show_usage(): - print "Usage: %s [-f input_file_name] [-m output_mode]" % sys.argv[0] - sys.exit(1) - -if __name__ == '__main__': - file_name = "gl_API.xml" - mode = "generic" - - try: - (args, trail) = getopt.getopt(sys.argv[1:], "m:f:") - except Exception,e: - show_usage() - - for (arg,val) in args: - if arg == '-m': - mode = val - elif arg == "-f": - file_name = val - - if mode == "generic": - printer = PrintGenericStubs() - else: - print "ERROR: Invalid mode \"%s\" specified." % mode - show_usage() - - api = gl_XML.parse_GL_API(file_name, glX_XML.glx_item_factory()) - printer.Print(api) diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/gl_x86_asm.py b/dll/opengl/mesa/src/mapi/glapi/gen/gl_x86_asm.py deleted file mode 100644 index b43b65dd829..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/gl_x86_asm.py +++ /dev/null @@ -1,269 +0,0 @@ -#!/usr/bin/env python - -# (C) Copyright IBM Corporation 2004, 2005 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Ian Romanick - -import license -import gl_XML, glX_XML -import sys, getopt - -class PrintGenericStubs(gl_XML.gl_print_base): - - def __init__(self): - gl_XML.gl_print_base.__init__(self) - - self.name = "gl_x86_asm.py (from Mesa)" - self.license = license.bsd_license_template % ( \ -"""Copyright (C) 1999-2001 Brian Paul All Rights Reserved. -(C) Copyright IBM Corporation 2004, 2005""", "BRIAN PAUL, IBM") - return - - - def get_stack_size(self, f): - size = 0 - for p in f.parameterIterator(): - if p.is_padding: - continue - - size += p.get_stack_size() - - return size - - - def printRealHeader(self): - print '#include "x86/assyntax.h"' - print '' - print '#if defined(STDCALL_API)' - print '# if defined(USE_MGL_NAMESPACE)' - print '# define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n2))' - print '# else' - print '# define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n2))' - print '# endif' - print '#else' - print '# if defined(USE_MGL_NAMESPACE)' - print '# define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n))' - print '# define _glapi_Dispatch _mglapi_Dispatch' - print '# else' - print '# define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n))' - print '# endif' - print '#endif' - print '' - print '#define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX))' - print '' - print '#if defined(GNU_ASSEMBLER) && !defined(__DJGPP__) && !defined(__MINGW32__) && !defined(__APPLE__)' - print '#define GLOBL_FN(x) GLOBL x ; .type x, @function' - print '#else' - print '#define GLOBL_FN(x) GLOBL x' - print '#endif' - print '' - print '#if defined(PTHREADS) || defined(WIN32)' - print '# define THREADS' - print '#endif' - print '' - print '#ifdef GLX_USE_TLS' - print '' - print '#ifdef GLX_X86_READONLY_TEXT' - print '# define CTX_INSNS MOV_L(GS:(EAX), EAX)' - print '#else' - print '# define CTX_INSNS NOP /* Pad for init_glapi_relocs() */' - print '#endif' - print '' - print '# define GL_STUB(fn,off,fn_alt)\t\t\t\\' - print 'ALIGNTEXT16;\t\t\t\t\t\t\\' - print 'GLOBL_FN(GL_PREFIX(fn, fn_alt));\t\t\t\\' - print 'GL_PREFIX(fn, fn_alt):\t\t\t\t\t\\' - print '\tCALL(_x86_get_dispatch) ;\t\t\t\\' - print '\tCTX_INSNS ; \\' - print '\tJMP(GL_OFFSET(off))' - print '' - print '#elif defined(PTHREADS)' - print '# define GL_STUB(fn,off,fn_alt)\t\t\t\\' - print 'ALIGNTEXT16;\t\t\t\t\t\t\\' - print 'GLOBL_FN(GL_PREFIX(fn, fn_alt));\t\t\t\\' - print 'GL_PREFIX(fn, fn_alt):\t\t\t\t\t\\' - print '\tMOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) ;\t\\' - print '\tTEST_L(EAX, EAX) ;\t\t\t\t\\' - print '\tJE(1f) ;\t\t\t\t\t\\' - print '\tJMP(GL_OFFSET(off)) ;\t\t\t\t\\' - print '1:\tCALL(_x86_get_dispatch) ;\t\t\t\\' - print '\tJMP(GL_OFFSET(off))' - print '#elif defined(THREADS)' - print '# define GL_STUB(fn,off,fn_alt)\t\t\t\\' - print 'ALIGNTEXT16;\t\t\t\t\t\t\\' - print 'GLOBL_FN(GL_PREFIX(fn, fn_alt));\t\t\t\\' - print 'GL_PREFIX(fn, fn_alt):\t\t\t\t\t\\' - print '\tMOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) ;\t\\' - print '\tTEST_L(EAX, EAX) ;\t\t\t\t\\' - print '\tJE(1f) ;\t\t\t\t\t\\' - print '\tJMP(GL_OFFSET(off)) ;\t\t\t\t\\' - print '1:\tCALL(_glapi_get_dispatch) ;\t\t\t\\' - print '\tJMP(GL_OFFSET(off))' - print '#else /* Non-threaded version. */' - print '# define GL_STUB(fn,off,fn_alt)\t\t\t\\' - print 'ALIGNTEXT16;\t\t\t\t\t\t\\' - print 'GLOBL_FN(GL_PREFIX(fn, fn_alt));\t\t\t\\' - print 'GL_PREFIX(fn, fn_alt):\t\t\t\t\t\\' - print '\tMOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) ;\t\\' - print '\tJMP(GL_OFFSET(off))' - print '#endif' - print '' - print '#ifdef HAVE_ALIAS' - print '# define GL_STUB_ALIAS(fn,off,fn_alt,alias,alias_alt)\t\\' - print '\t.globl\tGL_PREFIX(fn, fn_alt) ;\t\t\t\\' - print '\t.set\tGL_PREFIX(fn, fn_alt), GL_PREFIX(alias, alias_alt)' - print '#else' - print '# define GL_STUB_ALIAS(fn,off,fn_alt,alias,alias_alt)\t\\' - print ' GL_STUB(fn, off, fn_alt)' - print '#endif' - print '' - print 'SEG_TEXT' - print '' - print '#ifdef GLX_USE_TLS' - print '' - print '\tGLOBL\tGLNAME(_x86_get_dispatch)' - print '\tHIDDEN(GLNAME(_x86_get_dispatch))' - print 'ALIGNTEXT16' - print 'GLNAME(_x86_get_dispatch):' - print '\tcall 1f' - print '1:\tpopl %eax' - print '\taddl $_GLOBAL_OFFSET_TABLE_+[.-1b], %eax' - print '\tmovl _glapi_tls_Dispatch@GOTNTPOFF(%eax), %eax' - print '\tret' - print '' - print '#elif defined(PTHREADS)' - print 'EXTERN GLNAME(_glapi_Dispatch)' - print 'EXTERN GLNAME(_gl_DispatchTSD)' - print 'EXTERN GLNAME(pthread_getspecific)' - print '' - print 'ALIGNTEXT16' - print 'GLNAME(_x86_get_dispatch):' - print '\tSUB_L(CONST(24), ESP)' - print '\tPUSH_L(GLNAME(_gl_DispatchTSD))' - print '\tCALL(GLNAME(pthread_getspecific))' - print '\tADD_L(CONST(28), ESP)' - print '\tRET' - print '#elif defined(THREADS)' - print 'EXTERN GLNAME(_glapi_get_dispatch)' - print '#endif' - print '' - - print '#if defined( GLX_USE_TLS ) && !defined( GLX_X86_READONLY_TEXT )' - print '\t\t.section\twtext, "awx", @progbits' - print '#endif /* defined( GLX_USE_TLS ) */' - - print '' - print '\t\tALIGNTEXT16' - print '\t\tGLOBL GLNAME(gl_dispatch_functions_start)' - print '\t\tHIDDEN(GLNAME(gl_dispatch_functions_start))' - print 'GLNAME(gl_dispatch_functions_start):' - print '' - return - - - def printRealFooter(self): - print '' - print '\t\tGLOBL\tGLNAME(gl_dispatch_functions_end)' - print '\t\tHIDDEN(GLNAME(gl_dispatch_functions_end))' - print '\t\tALIGNTEXT16' - print 'GLNAME(gl_dispatch_functions_end):' - print '' - print '#if defined(GLX_USE_TLS) && defined(__linux__)' - print ' .section ".note.ABI-tag", "a"' - print ' .p2align 2' - print ' .long 1f - 0f /* name length */' - print ' .long 3f - 2f /* data length */' - print ' .long 1 /* note length */' - print '0: .asciz "GNU" /* vendor name */' - print '1: .p2align 2' - print '2: .long 0 /* note data: the ABI tag */' - print ' .long 2,4,20 /* Minimum kernel version w/TLS */' - print '3: .p2align 2 /* pad out section */' - print '#endif /* GLX_USE_TLS */' - print '' - print '#if defined (__ELF__) && defined (__linux__)' - print ' .section .note.GNU-stack,"",%progbits' - print '#endif' - return - - - def printBody(self, api): - for f in api.functionIterateByOffset(): - name = f.dispatch_name() - stack = self.get_stack_size(f) - alt = "%s@%u" % (name, stack) - - print '\tGL_STUB(%s, %d, %s)' % (name, f.offset, alt) - - if not f.is_static_entry_point(f.name): - print '\tHIDDEN(GL_PREFIX(%s, %s))' % (name, alt) - - - for f in api.functionIterateByOffset(): - name = f.dispatch_name() - stack = self.get_stack_size(f) - alt = "%s@%u" % (name, stack) - - for n in f.entry_points: - if f.is_static_entry_point(n): - if n != f.name: - alt2 = "%s@%u" % (n, stack) - text = '\tGL_STUB_ALIAS(%s, %d, %s, %s, %s)' % (n, f.offset, alt2, name, alt) - - if f.has_different_protocol(n): - print '#ifndef GLX_INDIRECT_RENDERING' - print text - print '#endif' - else: - print text - - return - -def show_usage(): - print "Usage: %s [-f input_file_name] [-m output_mode]" % sys.argv[0] - sys.exit(1) - -if __name__ == '__main__': - file_name = "gl_API.xml" - mode = "generic" - - try: - (args, trail) = getopt.getopt(sys.argv[1:], "m:f:") - except Exception,e: - show_usage() - - for (arg,val) in args: - if arg == '-m': - mode = val - elif arg == "-f": - file_name = val - - if mode == "generic": - printer = PrintGenericStubs() - else: - print "ERROR: Invalid mode \"%s\" specified." % mode - show_usage() - - api = gl_XML.parse_GL_API(file_name, glX_XML.glx_item_factory()) - printer.Print(api) diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/glapi_gen.mk b/dll/opengl/mesa/src/mapi/glapi/gen/glapi_gen.mk deleted file mode 100644 index c7fa7c0153d..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/glapi_gen.mk +++ /dev/null @@ -1,44 +0,0 @@ -# Helpers for glapi header generation - -ifndef TOP -$(error TOP must be defined.) -endif - -glapi_gen_common_deps := \ - $(wildcard $(TOP)/src/mapi/glapi/gen/*.xml) \ - $(wildcard $(TOP)/src/mapi/glapi/gen/*.py) - -glapi_gen_mapi_script := $(TOP)/src/mapi/mapi/mapi_abi.py -glapi_gen_mapi_deps := \ - $(glapi_gen_mapi_script) \ - $(glapi_gen_common_deps) - -# $(1): path to an XML file -# $(2): name of the printer -define glapi_gen_mapi -@mkdir -p $(dir $@) -$(PYTHON2) $(PYTHON_FLAGS) $(glapi_gen_mapi_script) \ - --mode lib --printer $(2) $(1) > $@ -endef - -glapi_gen_dispatch_script := $(TOP)/src/mapi/glapi/gen/gl_table.py -glapi_gen_dispatch_deps := $(glapi_gen_common_deps) - -# $(1): path to an XML file -# $(2): empty, es1, or es2 for entry point filtering -define glapi_gen_dispatch -@mkdir -p $(dir $@) -$(PYTHON2) $(PYTHON_FLAGS) $(glapi_gen_dispatch_script) \ - -f $(1) -m remap_table $(if $(2),-c $(2),) > $@ -endef - -glapi_gen_remap_script := $(TOP)/src/mapi/glapi/gen/remap_helper.py -glapi_gen_remap_deps := $(glapi_gen_common_deps) - -# $(1): path to an XML file -# $(2): empty, es1, or es2 for entry point filtering -define glapi_gen_remap -@mkdir -p $(dir $@) -$(PYTHON2) $(PYTHON_FLAGS) $(glapi_gen_remap_script) \ - -f $(1) $(if $(2),-c $(2),) > $@ -endef diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/gles_api.py b/dll/opengl/mesa/src/mapi/glapi/gen/gles_api.py deleted file mode 100644 index 0116ba47406..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/gles_api.py +++ /dev/null @@ -1,454 +0,0 @@ -#!/usr/bin/env python - -# Mesa 3-D graphics library -# Version: 7.12 -# -# Copyright (C) 2011 LunarG Inc. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. -# -# Authors: -# Chia-I Wu - -# These info should be part of GLAPI XML. Until that is possible, scripts have -# to use tables here to filter gl_api. - -es1_core = ( - # OpenGL ES 1.1 - 'ActiveTexture', - 'AlphaFunc', - 'AlphaFuncx', - 'BindBuffer', - 'BindTexture', - 'BlendFunc', - 'BufferData', - 'BufferSubData', - 'Clear', - 'ClearColor', - 'ClearColorx', - 'ClearDepthf', - 'ClearDepthx', - 'ClearStencil', - 'ClientActiveTexture', - 'ClipPlanef', - 'ClipPlanex', - 'Color4f', - 'Color4ub', - 'Color4x', - 'ColorMask', - 'ColorPointer', - 'CompressedTexImage2D', - 'CompressedTexSubImage2D', - 'CopyTexImage2D', - 'CopyTexSubImage2D', - 'CullFace', - 'DeleteBuffers', - 'DeleteTextures', - 'DepthFunc', - 'DepthMask', - 'DepthRangef', - 'DepthRangex', - 'Disable', - 'DisableClientState', - 'DrawArrays', - 'DrawElements', - 'Enable', - 'EnableClientState', - 'Finish', - 'Flush', - 'Fogf', - 'Fogfv', - 'Fogx', - 'Fogxv', - 'FrontFace', - 'Frustumf', - 'Frustumx', - 'GenBuffers', - 'GenTextures', - 'GetBooleanv', - 'GetBufferParameteriv', - 'GetClipPlanef', - 'GetClipPlanex', - 'GetError', - 'GetFixedv', - 'GetFloatv', - 'GetIntegerv', - 'GetLightfv', - 'GetLightxv', - 'GetMaterialfv', - 'GetMaterialxv', - 'GetPointerv', - 'GetString', - 'GetTexEnvfv', - 'GetTexEnviv', - 'GetTexEnvxv', - 'GetTexParameterfv', - 'GetTexParameteriv', - 'GetTexParameterxv', - 'Hint', - 'IsBuffer', - 'IsEnabled', - 'IsTexture', - 'Lightf', - 'Lightfv', - 'LightModelf', - 'LightModelfv', - 'LightModelx', - 'LightModelxv', - 'Lightx', - 'Lightxv', - 'LineWidth', - 'LineWidthx', - 'LoadIdentity', - 'LoadMatrixf', - 'LoadMatrixx', - 'LogicOp', - 'Materialf', - 'Materialfv', - 'Materialx', - 'Materialxv', - 'MatrixMode', - 'MultiTexCoord4f', - 'MultiTexCoord4x', - 'MultMatrixf', - 'MultMatrixx', - 'Normal3f', - 'Normal3x', - 'NormalPointer', - 'Orthof', - 'Orthox', - 'PixelStorei', - 'PointParameterf', - 'PointParameterfv', - 'PointParameterx', - 'PointParameterxv', - 'PointSize', - 'PointSizex', - 'PolygonOffset', - 'PolygonOffsetx', - 'PopMatrix', - 'PushMatrix', - 'ReadPixels', - 'Rotatef', - 'Rotatex', - 'SampleCoverage', - 'SampleCoveragex', - 'Scalef', - 'Scalex', - 'Scissor', - 'ShadeModel', - 'StencilFunc', - 'StencilMask', - 'StencilOp', - 'TexCoordPointer', - 'TexEnvf', - 'TexEnvfv', - 'TexEnvi', - 'TexEnviv', - 'TexEnvx', - 'TexEnvxv', - 'TexImage2D', - 'TexParameterf', - 'TexParameterfv', - 'TexParameteri', - 'TexParameteriv', - 'TexParameterx', - 'TexParameterxv', - 'TexSubImage2D', - 'Translatef', - 'Translatex', - 'VertexPointer', - 'Viewport', -) - -es1_api = es1_core + ( - # GL_OES_EGL_image - 'EGLImageTargetTexture2DOES', - 'EGLImageTargetRenderbufferStorageOES', - # GL_OES_mapbuffer - 'GetBufferPointervOES', - 'MapBufferOES', - 'UnmapBufferOES', - # GL_EXT_multi_draw_arrays - 'MultiDrawArraysEXT', - 'MultiDrawElementsEXT', - # GL_OES_blend_equation_separate - 'BlendEquationSeparateOES', - # GL_OES_blend_func_separate - 'BlendFuncSeparateOES', - # GL_OES_blend_subtract - 'BlendEquationOES', - # GL_OES_draw_texture - 'DrawTexiOES', - 'DrawTexivOES', - 'DrawTexfOES', - 'DrawTexfvOES', - 'DrawTexsOES', - 'DrawTexsvOES', - 'DrawTexxOES', - 'DrawTexxvOES', - # GL_OES_fixed_point - 'AlphaFuncxOES', - 'ClearColorxOES', - 'ClearDepthxOES', - 'Color4xOES', - 'DepthRangexOES', - 'FogxOES', - 'FogxvOES', - 'FrustumxOES', - 'LightModelxOES', - 'LightModelxvOES', - 'LightxOES', - 'LightxvOES', - 'LineWidthxOES', - 'LoadMatrixxOES', - 'MaterialxOES', - 'MaterialxvOES', - 'MultiTexCoord4xOES', - 'MultMatrixxOES', - 'Normal3xOES', - 'OrthoxOES', - 'PointSizexOES', - 'PolygonOffsetxOES', - 'RotatexOES', - 'SampleCoveragexOES', - 'ScalexOES', - 'TexEnvxOES', - 'TexEnvxvOES', - 'TexParameterxOES', - 'TranslatexOES', - 'ClipPlanexOES', - 'GetClipPlanexOES', - 'GetFixedvOES', - 'GetLightxvOES', - 'GetMaterialxvOES', - 'GetTexEnvxvOES', - 'GetTexParameterxvOES', - 'PointParameterxOES', - 'PointParameterxvOES', - 'TexParameterxvOES', - # GL_OES_framebuffer_object - 'BindFramebufferOES', - 'BindRenderbufferOES', - 'CheckFramebufferStatusOES', - 'DeleteFramebuffersOES', - 'DeleteRenderbuffersOES', - 'FramebufferRenderbufferOES', - 'FramebufferTexture2DOES', - 'GenerateMipmapOES', - 'GenFramebuffersOES', - 'GenRenderbuffersOES', - 'GetFramebufferAttachmentParameterivOES', - 'GetRenderbufferParameterivOES', - 'IsFramebufferOES', - 'IsRenderbufferOES', - 'RenderbufferStorageOES', - # GL_OES_point_size_array - 'PointSizePointerOES', - # GL_OES_query_matrix - 'QueryMatrixxOES', - # GL_OES_single_precision - 'ClearDepthfOES', - 'DepthRangefOES', - 'FrustumfOES', - 'OrthofOES', - 'ClipPlanefOES', - 'GetClipPlanefOES', - # GL_OES_texture_cube_map - 'GetTexGenfvOES', - 'GetTexGenivOES', - 'GetTexGenxvOES', - 'TexGenfOES', - 'TexGenfvOES', - 'TexGeniOES', - 'TexGenivOES', - 'TexGenxOES', - 'TexGenxvOES', -) - -es2_core = ( - # OpenGL ES 2.0 - "ActiveTexture", - "AttachShader", - "BindAttribLocation", - "BindBuffer", - "BindFramebuffer", - "BindRenderbuffer", - "BindTexture", - "BlendColor", - "BlendEquation", - "BlendEquationSeparate", - "BlendFunc", - "BlendFuncSeparate", - "BufferData", - "BufferSubData", - "CheckFramebufferStatus", - "Clear", - "ClearColor", - "ClearDepthf", - "ClearStencil", - "ColorMask", - "CompileShader", - "CompressedTexImage2D", - "CompressedTexSubImage2D", - "CopyTexImage2D", - "CopyTexSubImage2D", - "CreateProgram", - "CreateShader", - "CullFace", - "DeleteBuffers", - "DeleteFramebuffers", - "DeleteProgram", - "DeleteRenderbuffers", - "DeleteShader", - "DeleteTextures", - "DepthFunc", - "DepthMask", - "DepthRangef", - "DetachShader", - "Disable", - "DisableVertexAttribArray", - "DrawArrays", - "DrawElements", - "Enable", - "EnableVertexAttribArray", - "Finish", - "Flush", - "FramebufferRenderbuffer", - "FramebufferTexture2D", - "FrontFace", - "GenBuffers", - "GenerateMipmap", - "GenFramebuffers", - "GenRenderbuffers", - "GenTextures", - "GetActiveAttrib", - "GetActiveUniform", - "GetAttachedShaders", - "GetAttribLocation", - "GetBooleanv", - "GetBufferParameteriv", - "GetError", - "GetFloatv", - "GetFramebufferAttachmentParameteriv", - "GetIntegerv", - "GetProgramInfoLog", - "GetProgramiv", - "GetRenderbufferParameteriv", - "GetShaderInfoLog", - "GetShaderiv", - "GetShaderPrecisionFormat", - "GetShaderSource", - "GetString", - "GetTexParameterfv", - "GetTexParameteriv", - "GetUniformfv", - "GetUniformiv", - "GetUniformLocation", - "GetVertexAttribfv", - "GetVertexAttribiv", - "GetVertexAttribPointerv", - "Hint", - "IsBuffer", - "IsEnabled", - "IsFramebuffer", - "IsProgram", - "IsRenderbuffer", - "IsShader", - "IsTexture", - "LineWidth", - "LinkProgram", - "PixelStorei", - "PolygonOffset", - "ReadPixels", - "ReleaseShaderCompiler", - "RenderbufferStorage", - "SampleCoverage", - "Scissor", - "ShaderBinary", - "ShaderSource", - "StencilFunc", - "StencilFuncSeparate", - "StencilMask", - "StencilMaskSeparate", - "StencilOp", - "StencilOpSeparate", - "TexImage2D", - "TexParameterf", - "TexParameterfv", - "TexParameteri", - "TexParameteriv", - "TexSubImage2D", - "Uniform1f", - "Uniform1fv", - "Uniform1i", - "Uniform1iv", - "Uniform2f", - "Uniform2fv", - "Uniform2i", - "Uniform2iv", - "Uniform3f", - "Uniform3fv", - "Uniform3i", - "Uniform3iv", - "Uniform4f", - "Uniform4fv", - "Uniform4i", - "Uniform4iv", - "UniformMatrix2fv", - "UniformMatrix3fv", - "UniformMatrix4fv", - "UseProgram", - "ValidateProgram", - "VertexAttrib1f", - "VertexAttrib1fv", - "VertexAttrib2f", - "VertexAttrib2fv", - "VertexAttrib3f", - "VertexAttrib3fv", - "VertexAttrib4f", - "VertexAttrib4fv", - "VertexAttribPointer", - "Viewport", -) - -es2_api = es2_core + ( - # GL_OES_EGL_image - 'EGLImageTargetTexture2DOES', - 'EGLImageTargetRenderbufferStorageOES', - # GL_OES_mapbuffer - 'GetBufferPointervOES', - 'MapBufferOES', - 'UnmapBufferOES', - # GL_EXT_multi_draw_arrays - 'MultiDrawArraysEXT', - 'MultiDrawElementsEXT', - # GL_OES_texture_3D - 'CompressedTexImage3DOES', - 'CompressedTexSubImage3DOES', - 'CopyTexSubImage3DOES', - 'FramebufferTexture3DOES', - 'TexImage3DOES', - 'TexSubImage3DOES', - # GL_OES_get_program_binary - 'GetProgramBinaryOES', - 'ProgramBinaryOES', - # GL_NV_draw_buffers - 'DrawBuffersNV', -) diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/license.py b/dll/opengl/mesa/src/mapi/glapi/gen/license.py deleted file mode 100644 index 02181648e4b..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/license.py +++ /dev/null @@ -1,47 +0,0 @@ -# (C) Copyright IBM Corporation 2004 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Ian Romanick - -bsd_license_template = """%s -All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sub license, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice (including the next -paragraph) shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -%s, -AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.""" diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/mesadef.py b/dll/opengl/mesa/src/mapi/glapi/gen/mesadef.py deleted file mode 100644 index 38b0246ba5b..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/mesadef.py +++ /dev/null @@ -1,216 +0,0 @@ -#!/usr/bin/env python - - -# Mesa 3-D graphics library -# Version: 4.1 -# -# Copyright (C) 1999-2001 Brian Paul All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -# Generate the mesa.def file for Windows. -# -# Usage: -# mesadef.py >mesa.def -# Then copy to src/mesa/drivers/windows/gdi -# -# Dependencies: -# The apispec file must be in the current directory. - - - -import apiparser -import string - - -def PrintHead(): - print '; DO NOT EDIT - This file generated automatically by mesadef.py script' - print 'DESCRIPTION \'Mesa (OpenGL work-alike) for Win32\'' - print 'VERSION 6.0' - print ';' - print '; Module definition file for Mesa (OPENGL32.DLL)' - print ';' - print '; Note: The OpenGL functions use the STDCALL' - print '; function calling convention. Microsoft\'s' - print '; OPENGL32 uses this convention and so must the' - print '; Mesa OPENGL32 so that the Mesa DLL can be used' - print '; as a drop-in replacement.' - print ';' - print '; The linker exports STDCALL entry points with' - print '; \'decorated\' names; e.g., _glBegin@0, where the' - print '; trailing number is the number of bytes of ' - print '; parameter data pushed onto the stack. The' - print '; callee is responsible for popping this data' - print '; off the stack, usually via a RETF n instruction.' - print ';' - print '; However, the Microsoft OPENGL32.DLL does not export' - print '; the decorated names, even though the calling convention' - print '; is STDCALL. So, this module definition file is' - print '; needed to force the Mesa OPENGL32.DLL to export the' - print '; symbols in the same manner as the Microsoft DLL.' - print '; Were it not for this problem, this file would not' - print '; be needed (for the gl* functions) since the entry' - print '; points are compiled with dllexport declspec.' - print ';' - print '; However, this file is still needed to export "internal"' - print '; Mesa symbols for the benefit of the OSMESA32.DLL.' - print ';' - print 'EXPORTS' - return -#enddef - - -def PrintTail(): - print ';' - print '; WGL API' - print '\twglChoosePixelFormat' - print '\twglCopyContext' - print '\twglCreateContext' - print '\twglCreateLayerContext' - print '\twglDeleteContext' - print '\twglDescribeLayerPlane' - print '\twglDescribePixelFormat' - print '\twglGetCurrentContext' - print '\twglGetCurrentDC' - print '\twglGetExtensionsStringARB' - print '\twglGetLayerPaletteEntries' - print '\twglGetPixelFormat' - print '\twglGetProcAddress' - print '\twglMakeCurrent' - print '\twglRealizeLayerPalette' - print '\twglSetLayerPaletteEntries' - print '\twglSetPixelFormat' - print '\twglShareLists' - print '\twglSwapBuffers' - print '\twglSwapLayerBuffers' - print '\twglUseFontBitmapsA' - print '\twglUseFontBitmapsW' - print '\twglUseFontOutlinesA' - print '\twglUseFontOutlinesW' - print ';' - print '; Mesa internals - mostly for OSMESA' - print '\t_ac_CreateContext' - print '\t_ac_DestroyContext' - print '\t_ac_InvalidateState' - print '\t_glapi_get_context' - print '\t_glapi_get_proc_address' - print '\t_mesa_buffer_data' - print '\t_mesa_buffer_map' - print '\t_mesa_buffer_subdata' - print '\t_mesa_choose_tex_format' - print '\t_mesa_compressed_texture_size' - print '\t_mesa_create_framebuffer' - print '\t_mesa_create_visual' - print '\t_mesa_delete_buffer_object' - print '\t_mesa_delete_texture_object' - print '\t_mesa_destroy_framebuffer' - print '\t_mesa_destroy_visual' - print '\t_mesa_enable_1_3_extensions' - print '\t_mesa_enable_1_4_extensions' - print '\t_mesa_enable_1_5_extensions' - print '\t_mesa_enable_sw_extensions' - print '\t_mesa_error' - print '\t_mesa_free_context_data' - print '\t_mesa_get_current_context' - print '\t_mesa_init_default_imports' - print '\t_mesa_initialize_context' - print '\t_mesa_make_current' - print '\t_mesa_new_buffer_object' - print '\t_mesa_new_texture_object' - print '\t_mesa_problem' - print '\t_mesa_ResizeBuffersMESA' - print '\t_mesa_store_compressed_teximage1d' - print '\t_mesa_store_compressed_teximage2d' - print '\t_mesa_store_compressed_teximage3d' - print '\t_mesa_store_compressed_texsubimage1d' - print '\t_mesa_store_compressed_texsubimage2d' - print '\t_mesa_store_compressed_texsubimage3d' - print '\t_mesa_store_teximage1d' - print '\t_mesa_store_teximage2d' - print '\t_mesa_store_teximage3d' - print '\t_mesa_store_texsubimage1d' - print '\t_mesa_store_texsubimage2d' - print '\t_mesa_store_texsubimage3d' - print '\t_mesa_test_proxy_teximage' - print '\t_mesa_Viewport' - print '\t_mesa_meta_CopyColorSubTable' - print '\t_mesa_meta_CopyColorTable' - print '\t_mesa_meta_CopyConvolutionFilter1D' - print '\t_mesa_meta_CopyConvolutionFilter2D' - print '\t_mesa_meta_CopyTexImage1D' - print '\t_mesa_meta_CopyTexImage2D' - print '\t_mesa_meta_CopyTexSubImage1D' - print '\t_mesa_meta_CopyTexSubImage2D' - print '\t_mesa_meta_CopyTexSubImage3D' - print '\t_swrast_Accum' - print '\t_swrast_alloc_buffers' - print '\t_swrast_Bitmap' - print '\t_swrast_CopyPixels' - print '\t_swrast_DrawPixels' - print '\t_swrast_GetDeviceDriverReference' - print '\t_swrast_Clear' - print '\t_swrast_choose_line' - print '\t_swrast_choose_triangle' - print '\t_swrast_CreateContext' - print '\t_swrast_DestroyContext' - print '\t_swrast_InvalidateState' - print '\t_swrast_ReadPixels' - print '\t_swrast_zbuffer_address' - print '\t_swsetup_Wakeup' - print '\t_swsetup_CreateContext' - print '\t_swsetup_DestroyContext' - print '\t_swsetup_InvalidateState' - print '\t_tnl_CreateContext' - print '\t_tnl_DestroyContext' - print '\t_tnl_InvalidateState' - print '\t_tnl_MakeCurrent' - print '\t_tnl_run_pipeline' -#enddef - - -records = [] - -def FindOffset(funcName): - for (name, alias, offset) in records: - if name == funcName: - return offset - #endif - #endfor - return -1 -#enddef - - -def EmitEntry(name, returnType, argTypeList, argNameList, alias, offset): - if alias == '': - dispatchName = name - else: - dispatchName = alias - if offset < 0: - offset = FindOffset(dispatchName) - if offset >= 0 and string.find(name, "unused") == -1: - print '\tgl%s' % (name) - # save this info in case we need to look up an alias later - records.append((name, dispatchName, offset)) - -#enddef - - -PrintHead() -apiparser.ProcessSpecFile("APIspec", EmitEntry) -PrintTail() diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/next_available_offset.sh b/dll/opengl/mesa/src/mapi/glapi/gen/next_available_offset.sh deleted file mode 100644 index e7d6c2f4afa..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/next_available_offset.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash -# -# (C) Copyright IBM Corporation 2004 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Ian Romanick - -# Trivial shell script to search the API definition file and print out the -# next numerically available API entry-point offset. This could probably -# be made smarter, but it would be better to use the existin Python -# framework to do that. This is just a quick-and-dirty hack. - -num=$(grep 'offset="' gl_API.xml |\ - sed 's/.\+ offset="//g;s/".*$//g' |\ - grep -v '?' |\ - sort -rn |\ - head -1) - -echo $((num + 1)) diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/remap_helper.py b/dll/opengl/mesa/src/mapi/glapi/gen/remap_helper.py deleted file mode 100644 index 0008634ff2e..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/remap_helper.py +++ /dev/null @@ -1,199 +0,0 @@ -#!/usr/bin/env python - -# Copyright (C) 2009 Chia-I Wu -# All Rights Reserved. -# -# This is based on extension_helper.py by Ian Romanick. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. - -import gl_XML -import license -import sys, getopt, string - -def get_function_spec(func): - sig = "" - # derive parameter signature - for p in func.parameterIterator(): - if p.is_padding: - continue - # FIXME: This is a *really* ugly hack. :( - tn = p.type_expr.get_base_type_node() - if p.is_pointer(): - sig += 'p' - elif tn.integer: - sig += 'i' - elif tn.size == 4: - sig += 'f' - else: - sig += 'd' - - spec = [sig] - for ent in func.entry_points: - spec.append("gl" + ent) - - # spec is terminated by an empty string - spec.append('') - - return spec - -class PrintGlRemap(gl_XML.gl_print_base): - def __init__(self): - gl_XML.gl_print_base.__init__(self) - - self.name = "remap_helper.py (from Mesa)" - self.license = license.bsd_license_template % ("Copyright (C) 2009 Chia-I Wu ", "Chia-I Wu") - return - - - def printRealHeader(self): - print '#include "main/dispatch.h"' - print '#include "main/remap.h"' - print '' - return - - - def printBody(self, api): - pool_indices = {} - - print '/* this is internal to remap.c */' - print '#ifndef need_MESA_remap_table' - print '#error Only remap.c should include this file!' - print '#endif /* need_MESA_remap_table */' - print '' - - print '' - print 'static const char _mesa_function_pool[] =' - - # output string pool - index = 0; - for f in api.functionIterateAll(): - pool_indices[f] = index - - spec = get_function_spec(f) - - # a function has either assigned offset, fixed offset, - # or no offset - if f.assign_offset: - comments = "will be remapped" - elif f.offset > 0: - comments = "offset %d" % f.offset - else: - comments = "dynamic" - - print ' /* _mesa_function_pool[%d]: %s (%s) */' \ - % (index, f.name, comments) - for line in spec: - print ' "%s\\0"' % line - index += len(line) + 1 - print ' ;' - print '' - - print '/* these functions need to be remapped */' - print 'static const struct gl_function_pool_remap MESA_remap_table_functions[] = {' - # output all functions that need to be remapped - # iterate by offsets so that they are sorted by remap indices - for f in api.functionIterateByOffset(): - if not f.assign_offset: - continue - print ' { %5d, %s_remap_index },' \ - % (pool_indices[f], f.name) - print ' { -1, -1 }' - print '};' - print '' - - # collect functions by versions/extensions - extension_functions = {} - abi_extensions = [] - for f in api.functionIterateAll(): - for n in f.entry_points: - category, num = api.get_category_for_name(n) - # consider only GL_VERSION_X_Y or extensions - c = gl_XML.real_category_name(category) - if c.startswith("GL_"): - if not extension_functions.has_key(c): - extension_functions[c] = [] - extension_functions[c].append(f) - # remember the ext names of the ABI - if (f.is_abi() and n == f.name and - c not in abi_extensions): - abi_extensions.append(c) - # ignore the ABI itself - for ext in abi_extensions: - extension_functions.pop(ext) - - extensions = extension_functions.keys() - extensions.sort() - - # output ABI functions that have alternative names (with ext suffix) - print '/* these functions are in the ABI, but have alternative names */' - print 'static const struct gl_function_remap MESA_alt_functions[] = {' - for ext in extensions: - funcs = [] - for f in extension_functions[ext]: - # test if the function is in the ABI and has alt names - if f.is_abi() and len(f.entry_points) > 1: - funcs.append(f) - if not funcs: - continue - print ' /* from %s */' % ext - for f in funcs: - print ' { %5d, _gloffset_%s },' \ - % (pool_indices[f], f.name) - print ' { -1, -1 }' - print '};' - print '' - return - - -def show_usage(): - print "Usage: %s [-f input_file_name] [-c ver]" % sys.argv[0] - print " -c ver Version can be 'es1' or 'es2'." - sys.exit(1) - -if __name__ == '__main__': - file_name = "gl_API.xml" - - try: - (args, trail) = getopt.getopt(sys.argv[1:], "f:c:") - except Exception,e: - show_usage() - - es = None - for (arg,val) in args: - if arg == "-f": - file_name = val - elif arg == "-c": - es = val - - api = gl_XML.parse_GL_API( file_name ) - - if es is not None: - import gles_api - - api_map = { - 'es1': gles_api.es1_api, - 'es2': gles_api.es2_api, - } - - api.filter_functions(api_map[es]) - - printer = PrintGlRemap() - printer.Print( api ) diff --git a/dll/opengl/mesa/src/mapi/glapi/gen/typeexpr.py b/dll/opengl/mesa/src/mapi/glapi/gen/typeexpr.py deleted file mode 100644 index 8ba7de48627..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/gen/typeexpr.py +++ /dev/null @@ -1,292 +0,0 @@ -#!/usr/bin/env python - -# (C) Copyright IBM Corporation 2005 -# All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# Authors: -# Ian Romanick - -import string, copy - -class type_node: - def __init__(self): - self.pointer = 0 # bool - self.const = 0 # bool - self.signed = 1 # bool - self.integer = 1 # bool - - # If elements is set to non-zero, then field is an array. - self.elements = 0 - - self.name = None - self.size = 0 # type's size in bytes - return - - - def string(self): - """Return string representation of this type_node.""" - s = "" - - if self.pointer: - s = "* " - - if self.const: - s += "const " - - if not self.pointer: - if self.integer: - if self.signed: - s += "signed " - else: - s += "unsigned " - - if self.name: - s += "%s " % (self.name) - - return s - - -class type_table: - def __init__(self): - self.types_by_name = {} - return - - - def add_type(self, type_expr): - self.types_by_name[ type_expr.get_base_name() ] = type_expr - return - - - def find_type(self, name): - if name in self.types_by_name: - return self.types_by_name[ name ] - else: - return None - - -def create_initial_types(): - tt = type_table() - - basic_types = [ - ("char", 1, 1), - ("short", 2, 1), - ("int", 4, 1), - ("long", 4, 1), - ("float", 4, 0), - ("double", 8, 0), - ("enum", 4, 1) - ] - - for (type_name, type_size, integer) in basic_types: - te = type_expression(None) - tn = type_node() - tn.name = type_name - tn.size = type_size - tn.integer = integer - te.expr.append(tn) - tt.add_type( te ) - - type_expression.built_in_types = tt - return - - -class type_expression: - built_in_types = None - - def __init__(self, type_string, extra_types = None): - self.expr = [] - - if not type_string: - return - - self.original_string = type_string - - if not type_expression.built_in_types: - raise RuntimeError("create_initial_types must be called before creating type_expression objects.") - - # Replace '*' with ' * ' in type_string. Then, split the string - # into tokens, separated by spaces. - tokens = string.split( string.replace( type_string, "*", " * " ) ) - - const = 0 - t = None - signed = 0 - unsigned = 0 - - for i in tokens: - if i == "const": - if t and t.pointer: - t.const = 1 - else: - const = 1 - elif i == "signed": - signed = 1 - elif i == "unsigned": - unsigned = 1 - elif i == "*": - # This is a quirky special-case because of the - # way the C works for types. If 'unsigned' is - # specified all by itself, it is treated the - # same as "unsigned int". - - if unsigned: - self.set_base_type( "int", signed, unsigned, const, extra_types ) - const = 0 - signed = 0 - unsigned = 0 - - if not self.expr: - raise RuntimeError("Invalid type expression (dangling pointer)") - - if signed: - raise RuntimeError("Invalid type expression (signed / unsigned applied to pointer)") - - t = type_node() - t.pointer = 1 - self.expr.append( t ) - else: - if self.expr: - raise RuntimeError('Invalid type expression (garbage after pointer qualifier -> "%s")' % (self.original_string)) - - self.set_base_type( i, signed, unsigned, const, extra_types ) - const = 0 - signed = 0 - unsigned = 0 - - if signed and unsigned: - raise RuntimeError("Invalid type expression (both signed and unsigned specified)") - - - if const: - raise RuntimeError("Invalid type expression (dangling const)") - - if unsigned: - raise RuntimeError("Invalid type expression (dangling signed)") - - if signed: - raise RuntimeError("Invalid type expression (dangling unsigned)") - - return - - - def set_base_type(self, type_name, signed, unsigned, const, extra_types): - te = type_expression.built_in_types.find_type( type_name ) - if not te: - te = extra_types.find_type( type_name ) - - if not te: - raise RuntimeError('Unknown base type "%s".' % (type_name)) - - self.expr = copy.deepcopy(te.expr) - - t = self.expr[ len(self.expr) - 1 ] - t.const = const - if signed: - t.signed = 1 - elif unsigned: - t.signed = 0 - - - def set_base_type_node(self, tn): - self.expr = [tn] - return - - - def set_elements(self, count): - tn = self.expr[0] - - tn.elements = count - return - - - def string(self): - s = "" - for t in self.expr: - s += t.string() - - return s - - - def get_base_type_node(self): - return self.expr[0] - - - def get_base_name(self): - if len(self.expr): - return self.expr[0].name - else: - return None - - - def get_element_size(self): - tn = self.expr[0] - - if tn.elements: - return tn.elements * tn.size - else: - return tn.size - - - def get_element_count(self): - tn = self.expr[0] - return tn.elements - - - def get_stack_size(self): - tn = self.expr[ len(self.expr) - 1 ] - - if tn.elements or tn.pointer: - return 4 - elif not tn.integer: - return tn.size - else: - return 4 - - - def is_pointer(self): - tn = self.expr[ len(self.expr) - 1 ] - return tn.pointer - - - def format_string(self): - tn = self.expr[ len(self.expr) - 1 ] - if tn.pointer: - return "%p" - elif not tn.integer: - return "%f" - else: - return "%d" - - - -if __name__ == '__main__': - - types_to_try = [ "int", "int *", "const int *", "int * const", "const int * const", \ - "unsigned * const *", \ - "float", "const double", "double * const"] - - create_initial_types() - - for t in types_to_try: - print 'Trying "%s"...' % (t) - te = type_expression( t ) - print 'Got "%s" (%u, %u).' % (te.string(), te.get_stack_size(), te.get_element_size()) diff --git a/dll/opengl/mesa/src/mapi/glapi/glapi.c b/dll/opengl/mesa/src/mapi/glapi/glapi.c deleted file mode 100644 index f7655c558c4..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/glapi.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Chia-I Wu - */ - -#include "glapi/glapi.h" -#include "mapi/u_current.h" - -/* - * Global variables, _glapi_get_context, and _glapi_get_dispatch are defined in - * u_current.c. - */ - -#ifdef GLX_USE_TLS -/* not used, but defined for compatibility */ -const struct _glapi_table *_glapi_Dispatch; -const void *_glapi_Context; -#endif /* GLX_USE_TLS */ - -void -_glapi_destroy_multithread(void) -{ - u_current_destroy(); -} - -void -_glapi_check_multithread(void) -{ - u_current_init(); -} - -void -_glapi_set_context(void *context) -{ - u_current_set_user((const void *) context); -} - -void -_glapi_set_dispatch(struct _glapi_table *dispatch) -{ - u_current_set((const struct mapi_table *) dispatch); -} diff --git a/dll/opengl/mesa/src/mapi/glapi/glapi.h b/dll/opengl/mesa/src/mapi/glapi/glapi.h deleted file mode 100644 index f6854754bbf..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/glapi.h +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.1 - * - * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/** - * \mainpage Mesa GL API Module - * - * \section GLAPIIntroduction Introduction - * - * The Mesa GL API module is responsible for dispatching all the - * gl*() functions. All GL functions are dispatched by jumping through - * the current dispatch table (basically a struct full of function - * pointers.) - * - * A per-thread current dispatch table and per-thread current context - * pointer are managed by this module too. - * - * This module is intended to be non-Mesa-specific so it can be used - * with the X/DRI libGL also. - */ - - -#ifndef _GLAPI_H -#define _GLAPI_H - -#include "glapi/glthread.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -#ifdef _GLAPI_NO_EXPORTS -# define _GLAPI_EXPORT -#else /* _GLAPI_NO_EXPORTS */ -# ifdef _WIN32 -# ifdef _GLAPI_DLL_EXPORTS -# define _GLAPI_EXPORT __declspec(dllexport) -# else -# define _GLAPI_EXPORT __declspec(dllimport) -# endif -# elif defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) -# define _GLAPI_EXPORT __attribute__((visibility("default"))) -# else -# define _GLAPI_EXPORT -# endif -#endif /* _GLAPI_NO_EXPORTS */ - - -/* Is this needed? It is incomplete anyway. */ -#ifdef USE_MGL_NAMESPACE -#define _glapi_set_dispatch _mglapi_set_dispatch -#define _glapi_get_dispatch _mglapi_get_dispatch -#define _glapi_set_context _mglapi_set_context -#define _glapi_get_context _mglapi_get_context -#define _glapi_Dispatch _mglapi_Dispatch -#define _glapi_Context _mglapi_Context -#endif - -typedef void (*_glapi_proc)(void); -struct _glapi_table; - - -#if defined (GLX_USE_TLS) - -_GLAPI_EXPORT extern __thread struct _glapi_table * _glapi_tls_Dispatch - __attribute__((tls_model("initial-exec"))); - -_GLAPI_EXPORT extern __thread void * _glapi_tls_Context - __attribute__((tls_model("initial-exec"))); - -_GLAPI_EXPORT extern const struct _glapi_table *_glapi_Dispatch; -_GLAPI_EXPORT extern const void *_glapi_Context; - -# define GET_DISPATCH() _glapi_tls_Dispatch -# define GET_CURRENT_CONTEXT(C) struct gl_context *C = (struct gl_context *) _glapi_tls_Context - -#else - -_GLAPI_EXPORT extern struct _glapi_table *_glapi_Dispatch; -_GLAPI_EXPORT extern void *_glapi_Context; - -# ifdef THREADS - -# define GET_DISPATCH() \ - (likely(_glapi_Dispatch) ? _glapi_Dispatch : _glapi_get_dispatch()) - -# define GET_CURRENT_CONTEXT(C) struct gl_context *C = (struct gl_context *) \ - (likely(_glapi_Context) ? _glapi_Context : _glapi_get_context()) - -# else - -# define GET_DISPATCH() _glapi_Dispatch -# define GET_CURRENT_CONTEXT(C) struct gl_context *C = (struct gl_context *) _glapi_Context - -# endif - -#endif /* defined (GLX_USE_TLS) */ - - -void -_glapi_destroy_multithread(void); - - -_GLAPI_EXPORT void -_glapi_check_multithread(void); - - -_GLAPI_EXPORT void -_glapi_set_context(void *context); - - -_GLAPI_EXPORT void * -_glapi_get_context(void); - - -_GLAPI_EXPORT void -_glapi_set_dispatch(struct _glapi_table *dispatch); - - -_GLAPI_EXPORT struct _glapi_table * -_glapi_get_dispatch(void); - - -_GLAPI_EXPORT unsigned int -_glapi_get_dispatch_table_size(void); - - -_GLAPI_EXPORT int -_glapi_add_dispatch( const char * const * function_names, - const char * parameter_signature ); - -_GLAPI_EXPORT int -_glapi_get_proc_offset(const char *funcName); - - -_GLAPI_EXPORT _glapi_proc -_glapi_get_proc_address(const char *funcName); - - -_GLAPI_EXPORT const char * -_glapi_get_proc_name(unsigned int offset); - - -_GLAPI_EXPORT struct _glapi_table * -_glapi_create_table_from_handle(void *handle, const char *symbol_prefix); - - -_GLAPI_EXPORT unsigned long -_glthread_GetID(void); - - -/* - * These stubs are kept so that the old DRI drivers still load. - */ -_GLAPI_EXPORT void -_glapi_noop_enable_warnings(unsigned char enable); - - -_GLAPI_EXPORT void -_glapi_set_warning_func(_glapi_proc func); - - -#ifdef __cplusplus -} -#endif - -#endif /* _GLAPI_H */ diff --git a/dll/opengl/mesa/src/mapi/glapi/glapi_dispatch.c b/dll/opengl/mesa/src/mapi/glapi/glapi_dispatch.c deleted file mode 100644 index 989f4a3fc30..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/glapi_dispatch.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.3 - * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/** - * \file glapi_dispatch.c - * - * This file generates all the gl* function entrypoints. This code is not - * used if optimized assembly stubs are available (e.g., using - * glapi/glapi_x86.S on IA32 or glapi/glapi_sparc.S on SPARC). - * - * \note - * This file is also used to build the client-side libGL that loads DRI-based - * device drivers. At build-time it is symlinked to src/glx. - * - * \author Brian Paul - */ - -#include "glapi/glapi_priv.h" -#include "glapi/glapitable.h" - - -#if !(defined(USE_X86_ASM) || defined(USE_X86_64_ASM) || defined(USE_SPARC_ASM)) - -#if defined(WIN32) -#define KEYWORD1 GLAPI -#else -#define KEYWORD1 PUBLIC -#endif - -#define KEYWORD2 GLAPIENTRY - -#if defined(USE_MGL_NAMESPACE) -#define NAME(func) mgl##func -#else -#define NAME(func) gl##func -#endif - -#if 0 /* Use this to log GL calls to stdout (for DEBUG only!) */ - -#define F stdout -#define DISPATCH(FUNC, ARGS, MESSAGE) \ - fprintf MESSAGE; \ - GET_DISPATCH()->FUNC ARGS - -#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \ - fprintf MESSAGE; \ - return GET_DISPATCH()->FUNC ARGS - -#else - -#define DISPATCH(FUNC, ARGS, MESSAGE) \ - GET_DISPATCH()->FUNC ARGS - -#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \ - return GET_DISPATCH()->FUNC ARGS - -#endif /* logging */ - - -#ifndef GLAPIENTRY -#define GLAPIENTRY -#endif - -#ifdef GLX_INDIRECT_RENDERING -/* those link to libglapi.a should provide the entry points */ -#define _GLAPI_SKIP_PROTO_ENTRY_POINTS -#endif -#include "glapi/glapitemp.h" - -#endif /* USE_X86_ASM */ diff --git a/dll/opengl/mesa/src/mapi/glapi/glapi_entrypoint.c b/dll/opengl/mesa/src/mapi/glapi/glapi_entrypoint.c deleted file mode 100644 index 993ccb94c24..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/glapi_entrypoint.c +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.1 - * - * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file glapi_entrypoint.c - * - * Arch-specific code for manipulating GL API entrypoints (dispatch stubs). - */ - - -#include "glapi/glapi_priv.h" -#include "mapi/u_execmem.h" - - -#ifdef USE_X86_ASM - -#if defined( GLX_USE_TLS ) -extern GLubyte gl_dispatch_functions_start[]; -extern GLubyte gl_dispatch_functions_end[]; -#else -extern const GLubyte gl_dispatch_functions_start[]; -#endif - -#endif /* USE_X86_ASM */ - - -#if defined(DISPATCH_FUNCTION_SIZE) - -_glapi_proc -get_entrypoint_address(unsigned int functionOffset) -{ - return (_glapi_proc) (gl_dispatch_functions_start - + (DISPATCH_FUNCTION_SIZE * functionOffset)); -} - -#endif - - -#if defined(USE_X86_ASM) - -/** - * Perform platform-specific GL API entry-point fixups. - */ -static void -init_glapi_relocs( void ) -{ -#if defined(GLX_USE_TLS) && !defined(GLX_X86_READONLY_TEXT) - extern unsigned long _x86_get_dispatch(void); - char run_time_patch[] = { - 0x65, 0xa1, 0, 0, 0, 0 /* movl %gs:0,%eax */ - }; - GLuint *offset = (GLuint *) &run_time_patch[2]; /* 32-bits for x86/32 */ - const GLubyte * const get_disp = (const GLubyte *) run_time_patch; - GLubyte * curr_func = (GLubyte *) gl_dispatch_functions_start; - - *offset = _x86_get_dispatch(); - while ( curr_func != (GLubyte *) gl_dispatch_functions_end ) { - (void) memcpy( curr_func, get_disp, sizeof(run_time_patch)); - curr_func += DISPATCH_FUNCTION_SIZE; - } -#endif -} - - -/** - * Generate a dispatch function (entrypoint) which jumps through - * the given slot number (offset) in the current dispatch table. - * We need assembly language in order to accomplish this. - */ -_glapi_proc -generate_entrypoint(unsigned int functionOffset) -{ - /* 32 is chosen as something of a magic offset. For x86, the dispatch - * at offset 32 is the first one where the offset in the - * "jmp OFFSET*4(%eax)" can't be encoded in a single byte. - */ - const GLubyte * const template_func = gl_dispatch_functions_start - + (DISPATCH_FUNCTION_SIZE * 32); - GLubyte * const code = (GLubyte *) u_execmem_alloc(DISPATCH_FUNCTION_SIZE); - - - if ( code != NULL ) { - (void) memcpy(code, template_func, DISPATCH_FUNCTION_SIZE); - fill_in_entrypoint_offset( (_glapi_proc) code, functionOffset ); - } - - return (_glapi_proc) code; -} - - -/** - * This function inserts a new dispatch offset into the assembly language - * stub that was generated with the preceeding function. - */ -void -fill_in_entrypoint_offset(_glapi_proc entrypoint, unsigned int offset) -{ - GLubyte * const code = (GLubyte *) entrypoint; - -#if defined(GLX_USE_TLS) - *((unsigned int *)(code + 8)) = 4 * offset; -#elif defined(THREADS) - *((unsigned int *)(code + 11)) = 4 * offset; - *((unsigned int *)(code + 22)) = 4 * offset; -#else - *((unsigned int *)(code + 7)) = 4 * offset; -#endif -} - - -#elif defined(USE_SPARC_ASM) - -extern void __glapi_sparc_icache_flush(unsigned int *); - -static void -init_glapi_relocs( void ) -{ -#if defined(PTHREADS) || defined(GLX_USE_TLS) - static const unsigned int template[] = { -#ifdef GLX_USE_TLS - 0x05000000, /* sethi %hi(_glapi_tls_Dispatch), %g2 */ - 0x8730e00a, /* srl %g3, 10, %g3 */ - 0x8410a000, /* or %g2, %lo(_glapi_tls_Dispatch), %g2 */ -#ifdef __arch64__ - 0xc259c002, /* ldx [%g7 + %g2], %g1 */ - 0xc2584003, /* ldx [%g1 + %g3], %g1 */ -#else - 0xc201c002, /* ld [%g7 + %g2], %g1 */ - 0xc2004003, /* ld [%g1 + %g3], %g1 */ -#endif - 0x81c04000, /* jmp %g1 */ - 0x01000000, /* nop */ -#else -#ifdef __arch64__ - 0x03000000, /* 64-bit 0x00 --> sethi %hh(_glapi_Dispatch), %g1 */ - 0x05000000, /* 64-bit 0x04 --> sethi %lm(_glapi_Dispatch), %g2 */ - 0x82106000, /* 64-bit 0x08 --> or %g1, %hm(_glapi_Dispatch), %g1 */ - 0x8730e00a, /* 64-bit 0x0c --> srl %g3, 10, %g3 */ - 0x83287020, /* 64-bit 0x10 --> sllx %g1, 32, %g1 */ - 0x82004002, /* 64-bit 0x14 --> add %g1, %g2, %g1 */ - 0xc2586000, /* 64-bit 0x18 --> ldx [%g1 + %lo(_glapi_Dispatch)], %g1 */ -#else - 0x03000000, /* 32-bit 0x00 --> sethi %hi(_glapi_Dispatch), %g1 */ - 0x8730e00a, /* 32-bit 0x04 --> srl %g3, 10, %g3 */ - 0xc2006000, /* 32-bit 0x08 --> ld [%g1 + %lo(_glapi_Dispatch)], %g1 */ -#endif - 0x80a06000, /* --> cmp %g1, 0 */ - 0x02800005, /* --> be +4*5 */ - 0x01000000, /* --> nop */ -#ifdef __arch64__ - 0xc2584003, /* 64-bit --> ldx [%g1 + %g3], %g1 */ -#else - 0xc2004003, /* 32-bit --> ld [%g1 + %g3], %g1 */ -#endif - 0x81c04000, /* --> jmp %g1 */ - 0x01000000, /* --> nop */ -#ifdef __arch64__ - 0x9de3bf80, /* 64-bit --> save %sp, -128, %sp */ -#else - 0x9de3bfc0, /* 32-bit --> save %sp, -64, %sp */ -#endif - 0xa0100003, /* --> mov %g3, %l0 */ - 0x40000000, /* --> call _glapi_get_dispatch */ - 0x01000000, /* --> nop */ - 0x82100008, /* --> mov %o0, %g1 */ - 0x86100010, /* --> mov %l0, %g3 */ - 0x10bffff7, /* --> ba -4*9 */ - 0x81e80000, /* --> restore */ -#endif - }; -#ifdef GLX_USE_TLS - extern unsigned int __glapi_sparc_tls_stub; - extern unsigned long __glapi_sparc_get_dispatch(void); - unsigned int *code = &__glapi_sparc_tls_stub; - unsigned long dispatch = __glapi_sparc_get_dispatch(); -#else - extern unsigned int __glapi_sparc_pthread_stub; - unsigned int *code = &__glapi_sparc_pthread_stub; - unsigned long dispatch = (unsigned long) &_glapi_Dispatch; - unsigned long call_dest = (unsigned long ) &_glapi_get_dispatch; - int idx; -#endif - -#ifdef GLX_USE_TLS - code[0] = template[0] | (dispatch >> 10); - code[1] = template[1]; - __glapi_sparc_icache_flush(&code[0]); - code[2] = template[2] | (dispatch & 0x3ff); - code[3] = template[3]; - __glapi_sparc_icache_flush(&code[2]); - code[4] = template[4]; - code[5] = template[5]; - __glapi_sparc_icache_flush(&code[4]); - code[6] = template[6]; - __glapi_sparc_icache_flush(&code[6]); -#else -#if defined(__arch64__) - code[0] = template[0] | (dispatch >> (32 + 10)); - code[1] = template[1] | ((dispatch & 0xffffffff) >> 10); - __glapi_sparc_icache_flush(&code[0]); - code[2] = template[2] | ((dispatch >> 32) & 0x3ff); - code[3] = template[3]; - __glapi_sparc_icache_flush(&code[2]); - code[4] = template[4]; - code[5] = template[5]; - __glapi_sparc_icache_flush(&code[4]); - code[6] = template[6] | (dispatch & 0x3ff); - idx = 7; -#else - code[0] = template[0] | (dispatch >> 10); - code[1] = template[1]; - __glapi_sparc_icache_flush(&code[0]); - code[2] = template[2] | (dispatch & 0x3ff); - idx = 3; -#endif - code[idx + 0] = template[idx + 0]; - __glapi_sparc_icache_flush(&code[idx - 1]); - code[idx + 1] = template[idx + 1]; - code[idx + 2] = template[idx + 2]; - __glapi_sparc_icache_flush(&code[idx + 1]); - code[idx + 3] = template[idx + 3]; - code[idx + 4] = template[idx + 4]; - __glapi_sparc_icache_flush(&code[idx + 3]); - code[idx + 5] = template[idx + 5]; - code[idx + 6] = template[idx + 6]; - __glapi_sparc_icache_flush(&code[idx + 5]); - code[idx + 7] = template[idx + 7]; - code[idx + 8] = template[idx + 8] | - (((call_dest - ((unsigned long) &code[idx + 8])) - >> 2) & 0x3fffffff); - __glapi_sparc_icache_flush(&code[idx + 7]); - code[idx + 9] = template[idx + 9]; - code[idx + 10] = template[idx + 10]; - __glapi_sparc_icache_flush(&code[idx + 9]); - code[idx + 11] = template[idx + 11]; - code[idx + 12] = template[idx + 12]; - __glapi_sparc_icache_flush(&code[idx + 11]); - code[idx + 13] = template[idx + 13]; - __glapi_sparc_icache_flush(&code[idx + 13]); -#endif -#endif -} - - -_glapi_proc -generate_entrypoint(GLuint functionOffset) -{ -#if defined(PTHREADS) || defined(GLX_USE_TLS) - static const unsigned int template[] = { - 0x07000000, /* sethi %hi(0), %g3 */ - 0x8210000f, /* mov %o7, %g1 */ - 0x40000000, /* call */ - 0x9e100001, /* mov %g1, %o7 */ - }; -#ifdef GLX_USE_TLS - extern unsigned int __glapi_sparc_tls_stub; - unsigned long call_dest = (unsigned long ) &__glapi_sparc_tls_stub; -#else - extern unsigned int __glapi_sparc_pthread_stub; - unsigned long call_dest = (unsigned long ) &__glapi_sparc_pthread_stub; -#endif - unsigned int *code = (unsigned int *) u_execmem_alloc(sizeof(template)); - if (code) { - code[0] = template[0] | (functionOffset & 0x3fffff); - code[1] = template[1]; - __glapi_sparc_icache_flush(&code[0]); - code[2] = template[2] | - (((call_dest - ((unsigned long) &code[2])) - >> 2) & 0x3fffffff); - code[3] = template[3]; - __glapi_sparc_icache_flush(&code[2]); - } - return (_glapi_proc) code; -#endif -} - - -void -fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset) -{ - unsigned int *code = (unsigned int *) entrypoint; - - code[0] &= ~0x3fffff; - code[0] |= (offset * sizeof(void *)) & 0x3fffff; - __glapi_sparc_icache_flush(&code[0]); -} - - -#else /* USE_*_ASM */ - -static void -init_glapi_relocs( void ) -{ -} - - -_glapi_proc -generate_entrypoint(GLuint functionOffset) -{ - (void) functionOffset; - return NULL; -} - - -void -fill_in_entrypoint_offset(_glapi_proc entrypoint, GLuint offset) -{ - /* an unimplemented architecture */ - (void) entrypoint; - (void) offset; -} - -#endif /* USE_*_ASM */ - - -void -init_glapi_relocs_once( void ) -{ -#if defined(PTHREADS) || defined(GLX_USE_TLS) - static pthread_once_t once_control = PTHREAD_ONCE_INIT; - pthread_once( & once_control, init_glapi_relocs ); -#endif -} diff --git a/dll/opengl/mesa/src/mapi/glapi/glapi_gentable.c b/dll/opengl/mesa/src/mapi/glapi/glapi_gentable.c deleted file mode 100644 index 640c4958de6..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/glapi_gentable.c +++ /dev/null @@ -1,9488 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by gl_gen_table.py (from Mesa) script */ - -/* - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * (C) Copyright IBM Corporation 2004, 2005 - * (C) Copyright Apple Inc 2011 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL, IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* GLXEXT is the define used in the xserver when the GLX extension is being - * built. Hijack this to determine whether this file is being built for the - * server or the client. - */ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \ - || (!defined(GLXEXT) && defined(DEBUG) && !defined(_WIN32_WCE)) -#define USE_BACKTRACE -#endif - -#ifdef USE_BACKTRACE -#include -#endif - -#include -#include -#include - -#include - -#include "glapi.h" -#include "glapitable.h" - -#ifdef GLXEXT -#include "os.h" -#endif - -static void -__glapi_gentable_NoOp(void) { - const char *fstr = "Unknown"; - - /* Silence potential GCC warning for some #ifdef paths. - */ - (void) fstr; -#if defined(USE_BACKTRACE) -#if !defined(GLXEXT) - if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) -#endif - { - void *frames[2]; - - if(backtrace(frames, 2) == 2) { - Dl_info info; - dladdr(frames[1], &info); - if(info.dli_sname) - fstr = info.dli_sname; - } - -#if !defined(GLXEXT) - fprintf(stderr, "Call to unimplemented API: %s\n", fstr); -#endif - } -#endif -#if defined(GLXEXT) - LogMessage(X_ERROR, "GLX: Call to unimplemented API: %s\n", fstr); -#endif -} - -static void -__glapi_gentable_set_remaining_noop(struct _glapi_table *disp) { - GLuint entries = _glapi_get_dispatch_table_size(); - void **dispatch = (void **) disp; - int i; - - /* ISO C is annoying sometimes */ - union {_glapi_proc p; void *v;} p; - p.p = __glapi_gentable_NoOp; - - for(i=0; i < entries; i++) - if(dispatch[i] == NULL) - dispatch[i] = p.v; -} - -struct _glapi_table * -_glapi_create_table_from_handle(void *handle, const char *symbol_prefix) { - struct _glapi_table *disp = calloc(_glapi_get_dispatch_table_size(), sizeof(void *)); - char symboln[512]; - - if(!disp) - return NULL; - - if(symbol_prefix == NULL) - symbol_prefix = ""; - - - if(!disp->NewList) { - void ** procp = (void **) &disp->NewList; - snprintf(symboln, sizeof(symboln), "%sNewList", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EndList) { - void ** procp = (void **) &disp->EndList; - snprintf(symboln, sizeof(symboln), "%sEndList", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CallList) { - void ** procp = (void **) &disp->CallList; - snprintf(symboln, sizeof(symboln), "%sCallList", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CallLists) { - void ** procp = (void **) &disp->CallLists; - snprintf(symboln, sizeof(symboln), "%sCallLists", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteLists) { - void ** procp = (void **) &disp->DeleteLists; - snprintf(symboln, sizeof(symboln), "%sDeleteLists", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenLists) { - void ** procp = (void **) &disp->GenLists; - snprintf(symboln, sizeof(symboln), "%sGenLists", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ListBase) { - void ** procp = (void **) &disp->ListBase; - snprintf(symboln, sizeof(symboln), "%sListBase", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Begin) { - void ** procp = (void **) &disp->Begin; - snprintf(symboln, sizeof(symboln), "%sBegin", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Bitmap) { - void ** procp = (void **) &disp->Bitmap; - snprintf(symboln, sizeof(symboln), "%sBitmap", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color3b) { - void ** procp = (void **) &disp->Color3b; - snprintf(symboln, sizeof(symboln), "%sColor3b", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color3bv) { - void ** procp = (void **) &disp->Color3bv; - snprintf(symboln, sizeof(symboln), "%sColor3bv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color3d) { - void ** procp = (void **) &disp->Color3d; - snprintf(symboln, sizeof(symboln), "%sColor3d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color3dv) { - void ** procp = (void **) &disp->Color3dv; - snprintf(symboln, sizeof(symboln), "%sColor3dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color3f) { - void ** procp = (void **) &disp->Color3f; - snprintf(symboln, sizeof(symboln), "%sColor3f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color3fv) { - void ** procp = (void **) &disp->Color3fv; - snprintf(symboln, sizeof(symboln), "%sColor3fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color3i) { - void ** procp = (void **) &disp->Color3i; - snprintf(symboln, sizeof(symboln), "%sColor3i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color3iv) { - void ** procp = (void **) &disp->Color3iv; - snprintf(symboln, sizeof(symboln), "%sColor3iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color3s) { - void ** procp = (void **) &disp->Color3s; - snprintf(symboln, sizeof(symboln), "%sColor3s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color3sv) { - void ** procp = (void **) &disp->Color3sv; - snprintf(symboln, sizeof(symboln), "%sColor3sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color3ub) { - void ** procp = (void **) &disp->Color3ub; - snprintf(symboln, sizeof(symboln), "%sColor3ub", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color3ubv) { - void ** procp = (void **) &disp->Color3ubv; - snprintf(symboln, sizeof(symboln), "%sColor3ubv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color3ui) { - void ** procp = (void **) &disp->Color3ui; - snprintf(symboln, sizeof(symboln), "%sColor3ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color3uiv) { - void ** procp = (void **) &disp->Color3uiv; - snprintf(symboln, sizeof(symboln), "%sColor3uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color3us) { - void ** procp = (void **) &disp->Color3us; - snprintf(symboln, sizeof(symboln), "%sColor3us", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color3usv) { - void ** procp = (void **) &disp->Color3usv; - snprintf(symboln, sizeof(symboln), "%sColor3usv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color4b) { - void ** procp = (void **) &disp->Color4b; - snprintf(symboln, sizeof(symboln), "%sColor4b", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color4bv) { - void ** procp = (void **) &disp->Color4bv; - snprintf(symboln, sizeof(symboln), "%sColor4bv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color4d) { - void ** procp = (void **) &disp->Color4d; - snprintf(symboln, sizeof(symboln), "%sColor4d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color4dv) { - void ** procp = (void **) &disp->Color4dv; - snprintf(symboln, sizeof(symboln), "%sColor4dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color4f) { - void ** procp = (void **) &disp->Color4f; - snprintf(symboln, sizeof(symboln), "%sColor4f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color4fv) { - void ** procp = (void **) &disp->Color4fv; - snprintf(symboln, sizeof(symboln), "%sColor4fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color4i) { - void ** procp = (void **) &disp->Color4i; - snprintf(symboln, sizeof(symboln), "%sColor4i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color4iv) { - void ** procp = (void **) &disp->Color4iv; - snprintf(symboln, sizeof(symboln), "%sColor4iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color4s) { - void ** procp = (void **) &disp->Color4s; - snprintf(symboln, sizeof(symboln), "%sColor4s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color4sv) { - void ** procp = (void **) &disp->Color4sv; - snprintf(symboln, sizeof(symboln), "%sColor4sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color4ub) { - void ** procp = (void **) &disp->Color4ub; - snprintf(symboln, sizeof(symboln), "%sColor4ub", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color4ubv) { - void ** procp = (void **) &disp->Color4ubv; - snprintf(symboln, sizeof(symboln), "%sColor4ubv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color4ui) { - void ** procp = (void **) &disp->Color4ui; - snprintf(symboln, sizeof(symboln), "%sColor4ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color4uiv) { - void ** procp = (void **) &disp->Color4uiv; - snprintf(symboln, sizeof(symboln), "%sColor4uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color4us) { - void ** procp = (void **) &disp->Color4us; - snprintf(symboln, sizeof(symboln), "%sColor4us", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Color4usv) { - void ** procp = (void **) &disp->Color4usv; - snprintf(symboln, sizeof(symboln), "%sColor4usv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EdgeFlag) { - void ** procp = (void **) &disp->EdgeFlag; - snprintf(symboln, sizeof(symboln), "%sEdgeFlag", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EdgeFlagv) { - void ** procp = (void **) &disp->EdgeFlagv; - snprintf(symboln, sizeof(symboln), "%sEdgeFlagv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->End) { - void ** procp = (void **) &disp->End; - snprintf(symboln, sizeof(symboln), "%sEnd", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Indexd) { - void ** procp = (void **) &disp->Indexd; - snprintf(symboln, sizeof(symboln), "%sIndexd", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Indexdv) { - void ** procp = (void **) &disp->Indexdv; - snprintf(symboln, sizeof(symboln), "%sIndexdv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Indexf) { - void ** procp = (void **) &disp->Indexf; - snprintf(symboln, sizeof(symboln), "%sIndexf", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Indexfv) { - void ** procp = (void **) &disp->Indexfv; - snprintf(symboln, sizeof(symboln), "%sIndexfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Indexi) { - void ** procp = (void **) &disp->Indexi; - snprintf(symboln, sizeof(symboln), "%sIndexi", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Indexiv) { - void ** procp = (void **) &disp->Indexiv; - snprintf(symboln, sizeof(symboln), "%sIndexiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Indexs) { - void ** procp = (void **) &disp->Indexs; - snprintf(symboln, sizeof(symboln), "%sIndexs", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Indexsv) { - void ** procp = (void **) &disp->Indexsv; - snprintf(symboln, sizeof(symboln), "%sIndexsv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Normal3b) { - void ** procp = (void **) &disp->Normal3b; - snprintf(symboln, sizeof(symboln), "%sNormal3b", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Normal3bv) { - void ** procp = (void **) &disp->Normal3bv; - snprintf(symboln, sizeof(symboln), "%sNormal3bv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Normal3d) { - void ** procp = (void **) &disp->Normal3d; - snprintf(symboln, sizeof(symboln), "%sNormal3d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Normal3dv) { - void ** procp = (void **) &disp->Normal3dv; - snprintf(symboln, sizeof(symboln), "%sNormal3dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Normal3f) { - void ** procp = (void **) &disp->Normal3f; - snprintf(symboln, sizeof(symboln), "%sNormal3f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Normal3fv) { - void ** procp = (void **) &disp->Normal3fv; - snprintf(symboln, sizeof(symboln), "%sNormal3fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Normal3i) { - void ** procp = (void **) &disp->Normal3i; - snprintf(symboln, sizeof(symboln), "%sNormal3i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Normal3iv) { - void ** procp = (void **) &disp->Normal3iv; - snprintf(symboln, sizeof(symboln), "%sNormal3iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Normal3s) { - void ** procp = (void **) &disp->Normal3s; - snprintf(symboln, sizeof(symboln), "%sNormal3s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Normal3sv) { - void ** procp = (void **) &disp->Normal3sv; - snprintf(symboln, sizeof(symboln), "%sNormal3sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos2d) { - void ** procp = (void **) &disp->RasterPos2d; - snprintf(symboln, sizeof(symboln), "%sRasterPos2d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos2dv) { - void ** procp = (void **) &disp->RasterPos2dv; - snprintf(symboln, sizeof(symboln), "%sRasterPos2dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos2f) { - void ** procp = (void **) &disp->RasterPos2f; - snprintf(symboln, sizeof(symboln), "%sRasterPos2f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos2fv) { - void ** procp = (void **) &disp->RasterPos2fv; - snprintf(symboln, sizeof(symboln), "%sRasterPos2fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos2i) { - void ** procp = (void **) &disp->RasterPos2i; - snprintf(symboln, sizeof(symboln), "%sRasterPos2i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos2iv) { - void ** procp = (void **) &disp->RasterPos2iv; - snprintf(symboln, sizeof(symboln), "%sRasterPos2iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos2s) { - void ** procp = (void **) &disp->RasterPos2s; - snprintf(symboln, sizeof(symboln), "%sRasterPos2s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos2sv) { - void ** procp = (void **) &disp->RasterPos2sv; - snprintf(symboln, sizeof(symboln), "%sRasterPos2sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos3d) { - void ** procp = (void **) &disp->RasterPos3d; - snprintf(symboln, sizeof(symboln), "%sRasterPos3d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos3dv) { - void ** procp = (void **) &disp->RasterPos3dv; - snprintf(symboln, sizeof(symboln), "%sRasterPos3dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos3f) { - void ** procp = (void **) &disp->RasterPos3f; - snprintf(symboln, sizeof(symboln), "%sRasterPos3f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos3fv) { - void ** procp = (void **) &disp->RasterPos3fv; - snprintf(symboln, sizeof(symboln), "%sRasterPos3fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos3i) { - void ** procp = (void **) &disp->RasterPos3i; - snprintf(symboln, sizeof(symboln), "%sRasterPos3i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos3iv) { - void ** procp = (void **) &disp->RasterPos3iv; - snprintf(symboln, sizeof(symboln), "%sRasterPos3iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos3s) { - void ** procp = (void **) &disp->RasterPos3s; - snprintf(symboln, sizeof(symboln), "%sRasterPos3s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos3sv) { - void ** procp = (void **) &disp->RasterPos3sv; - snprintf(symboln, sizeof(symboln), "%sRasterPos3sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos4d) { - void ** procp = (void **) &disp->RasterPos4d; - snprintf(symboln, sizeof(symboln), "%sRasterPos4d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos4dv) { - void ** procp = (void **) &disp->RasterPos4dv; - snprintf(symboln, sizeof(symboln), "%sRasterPos4dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos4f) { - void ** procp = (void **) &disp->RasterPos4f; - snprintf(symboln, sizeof(symboln), "%sRasterPos4f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos4fv) { - void ** procp = (void **) &disp->RasterPos4fv; - snprintf(symboln, sizeof(symboln), "%sRasterPos4fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos4i) { - void ** procp = (void **) &disp->RasterPos4i; - snprintf(symboln, sizeof(symboln), "%sRasterPos4i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos4iv) { - void ** procp = (void **) &disp->RasterPos4iv; - snprintf(symboln, sizeof(symboln), "%sRasterPos4iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos4s) { - void ** procp = (void **) &disp->RasterPos4s; - snprintf(symboln, sizeof(symboln), "%sRasterPos4s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RasterPos4sv) { - void ** procp = (void **) &disp->RasterPos4sv; - snprintf(symboln, sizeof(symboln), "%sRasterPos4sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Rectd) { - void ** procp = (void **) &disp->Rectd; - snprintf(symboln, sizeof(symboln), "%sRectd", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Rectdv) { - void ** procp = (void **) &disp->Rectdv; - snprintf(symboln, sizeof(symboln), "%sRectdv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Rectf) { - void ** procp = (void **) &disp->Rectf; - snprintf(symboln, sizeof(symboln), "%sRectf", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Rectfv) { - void ** procp = (void **) &disp->Rectfv; - snprintf(symboln, sizeof(symboln), "%sRectfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Recti) { - void ** procp = (void **) &disp->Recti; - snprintf(symboln, sizeof(symboln), "%sRecti", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Rectiv) { - void ** procp = (void **) &disp->Rectiv; - snprintf(symboln, sizeof(symboln), "%sRectiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Rects) { - void ** procp = (void **) &disp->Rects; - snprintf(symboln, sizeof(symboln), "%sRects", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Rectsv) { - void ** procp = (void **) &disp->Rectsv; - snprintf(symboln, sizeof(symboln), "%sRectsv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord1d) { - void ** procp = (void **) &disp->TexCoord1d; - snprintf(symboln, sizeof(symboln), "%sTexCoord1d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord1dv) { - void ** procp = (void **) &disp->TexCoord1dv; - snprintf(symboln, sizeof(symboln), "%sTexCoord1dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord1f) { - void ** procp = (void **) &disp->TexCoord1f; - snprintf(symboln, sizeof(symboln), "%sTexCoord1f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord1fv) { - void ** procp = (void **) &disp->TexCoord1fv; - snprintf(symboln, sizeof(symboln), "%sTexCoord1fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord1i) { - void ** procp = (void **) &disp->TexCoord1i; - snprintf(symboln, sizeof(symboln), "%sTexCoord1i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord1iv) { - void ** procp = (void **) &disp->TexCoord1iv; - snprintf(symboln, sizeof(symboln), "%sTexCoord1iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord1s) { - void ** procp = (void **) &disp->TexCoord1s; - snprintf(symboln, sizeof(symboln), "%sTexCoord1s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord1sv) { - void ** procp = (void **) &disp->TexCoord1sv; - snprintf(symboln, sizeof(symboln), "%sTexCoord1sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord2d) { - void ** procp = (void **) &disp->TexCoord2d; - snprintf(symboln, sizeof(symboln), "%sTexCoord2d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord2dv) { - void ** procp = (void **) &disp->TexCoord2dv; - snprintf(symboln, sizeof(symboln), "%sTexCoord2dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord2f) { - void ** procp = (void **) &disp->TexCoord2f; - snprintf(symboln, sizeof(symboln), "%sTexCoord2f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord2fv) { - void ** procp = (void **) &disp->TexCoord2fv; - snprintf(symboln, sizeof(symboln), "%sTexCoord2fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord2i) { - void ** procp = (void **) &disp->TexCoord2i; - snprintf(symboln, sizeof(symboln), "%sTexCoord2i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord2iv) { - void ** procp = (void **) &disp->TexCoord2iv; - snprintf(symboln, sizeof(symboln), "%sTexCoord2iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord2s) { - void ** procp = (void **) &disp->TexCoord2s; - snprintf(symboln, sizeof(symboln), "%sTexCoord2s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord2sv) { - void ** procp = (void **) &disp->TexCoord2sv; - snprintf(symboln, sizeof(symboln), "%sTexCoord2sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord3d) { - void ** procp = (void **) &disp->TexCoord3d; - snprintf(symboln, sizeof(symboln), "%sTexCoord3d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord3dv) { - void ** procp = (void **) &disp->TexCoord3dv; - snprintf(symboln, sizeof(symboln), "%sTexCoord3dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord3f) { - void ** procp = (void **) &disp->TexCoord3f; - snprintf(symboln, sizeof(symboln), "%sTexCoord3f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord3fv) { - void ** procp = (void **) &disp->TexCoord3fv; - snprintf(symboln, sizeof(symboln), "%sTexCoord3fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord3i) { - void ** procp = (void **) &disp->TexCoord3i; - snprintf(symboln, sizeof(symboln), "%sTexCoord3i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord3iv) { - void ** procp = (void **) &disp->TexCoord3iv; - snprintf(symboln, sizeof(symboln), "%sTexCoord3iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord3s) { - void ** procp = (void **) &disp->TexCoord3s; - snprintf(symboln, sizeof(symboln), "%sTexCoord3s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord3sv) { - void ** procp = (void **) &disp->TexCoord3sv; - snprintf(symboln, sizeof(symboln), "%sTexCoord3sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord4d) { - void ** procp = (void **) &disp->TexCoord4d; - snprintf(symboln, sizeof(symboln), "%sTexCoord4d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord4dv) { - void ** procp = (void **) &disp->TexCoord4dv; - snprintf(symboln, sizeof(symboln), "%sTexCoord4dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord4f) { - void ** procp = (void **) &disp->TexCoord4f; - snprintf(symboln, sizeof(symboln), "%sTexCoord4f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord4fv) { - void ** procp = (void **) &disp->TexCoord4fv; - snprintf(symboln, sizeof(symboln), "%sTexCoord4fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord4i) { - void ** procp = (void **) &disp->TexCoord4i; - snprintf(symboln, sizeof(symboln), "%sTexCoord4i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord4iv) { - void ** procp = (void **) &disp->TexCoord4iv; - snprintf(symboln, sizeof(symboln), "%sTexCoord4iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord4s) { - void ** procp = (void **) &disp->TexCoord4s; - snprintf(symboln, sizeof(symboln), "%sTexCoord4s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoord4sv) { - void ** procp = (void **) &disp->TexCoord4sv; - snprintf(symboln, sizeof(symboln), "%sTexCoord4sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex2d) { - void ** procp = (void **) &disp->Vertex2d; - snprintf(symboln, sizeof(symboln), "%sVertex2d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex2dv) { - void ** procp = (void **) &disp->Vertex2dv; - snprintf(symboln, sizeof(symboln), "%sVertex2dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex2f) { - void ** procp = (void **) &disp->Vertex2f; - snprintf(symboln, sizeof(symboln), "%sVertex2f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex2fv) { - void ** procp = (void **) &disp->Vertex2fv; - snprintf(symboln, sizeof(symboln), "%sVertex2fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex2i) { - void ** procp = (void **) &disp->Vertex2i; - snprintf(symboln, sizeof(symboln), "%sVertex2i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex2iv) { - void ** procp = (void **) &disp->Vertex2iv; - snprintf(symboln, sizeof(symboln), "%sVertex2iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex2s) { - void ** procp = (void **) &disp->Vertex2s; - snprintf(symboln, sizeof(symboln), "%sVertex2s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex2sv) { - void ** procp = (void **) &disp->Vertex2sv; - snprintf(symboln, sizeof(symboln), "%sVertex2sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex3d) { - void ** procp = (void **) &disp->Vertex3d; - snprintf(symboln, sizeof(symboln), "%sVertex3d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex3dv) { - void ** procp = (void **) &disp->Vertex3dv; - snprintf(symboln, sizeof(symboln), "%sVertex3dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex3f) { - void ** procp = (void **) &disp->Vertex3f; - snprintf(symboln, sizeof(symboln), "%sVertex3f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex3fv) { - void ** procp = (void **) &disp->Vertex3fv; - snprintf(symboln, sizeof(symboln), "%sVertex3fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex3i) { - void ** procp = (void **) &disp->Vertex3i; - snprintf(symboln, sizeof(symboln), "%sVertex3i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex3iv) { - void ** procp = (void **) &disp->Vertex3iv; - snprintf(symboln, sizeof(symboln), "%sVertex3iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex3s) { - void ** procp = (void **) &disp->Vertex3s; - snprintf(symboln, sizeof(symboln), "%sVertex3s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex3sv) { - void ** procp = (void **) &disp->Vertex3sv; - snprintf(symboln, sizeof(symboln), "%sVertex3sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex4d) { - void ** procp = (void **) &disp->Vertex4d; - snprintf(symboln, sizeof(symboln), "%sVertex4d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex4dv) { - void ** procp = (void **) &disp->Vertex4dv; - snprintf(symboln, sizeof(symboln), "%sVertex4dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex4f) { - void ** procp = (void **) &disp->Vertex4f; - snprintf(symboln, sizeof(symboln), "%sVertex4f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex4fv) { - void ** procp = (void **) &disp->Vertex4fv; - snprintf(symboln, sizeof(symboln), "%sVertex4fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex4i) { - void ** procp = (void **) &disp->Vertex4i; - snprintf(symboln, sizeof(symboln), "%sVertex4i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex4iv) { - void ** procp = (void **) &disp->Vertex4iv; - snprintf(symboln, sizeof(symboln), "%sVertex4iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex4s) { - void ** procp = (void **) &disp->Vertex4s; - snprintf(symboln, sizeof(symboln), "%sVertex4s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Vertex4sv) { - void ** procp = (void **) &disp->Vertex4sv; - snprintf(symboln, sizeof(symboln), "%sVertex4sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ClipPlane) { - void ** procp = (void **) &disp->ClipPlane; - snprintf(symboln, sizeof(symboln), "%sClipPlane", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorMaterial) { - void ** procp = (void **) &disp->ColorMaterial; - snprintf(symboln, sizeof(symboln), "%sColorMaterial", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CullFace) { - void ** procp = (void **) &disp->CullFace; - snprintf(symboln, sizeof(symboln), "%sCullFace", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Fogf) { - void ** procp = (void **) &disp->Fogf; - snprintf(symboln, sizeof(symboln), "%sFogf", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Fogfv) { - void ** procp = (void **) &disp->Fogfv; - snprintf(symboln, sizeof(symboln), "%sFogfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Fogi) { - void ** procp = (void **) &disp->Fogi; - snprintf(symboln, sizeof(symboln), "%sFogi", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Fogiv) { - void ** procp = (void **) &disp->Fogiv; - snprintf(symboln, sizeof(symboln), "%sFogiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FrontFace) { - void ** procp = (void **) &disp->FrontFace; - snprintf(symboln, sizeof(symboln), "%sFrontFace", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Hint) { - void ** procp = (void **) &disp->Hint; - snprintf(symboln, sizeof(symboln), "%sHint", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Lightf) { - void ** procp = (void **) &disp->Lightf; - snprintf(symboln, sizeof(symboln), "%sLightf", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Lightfv) { - void ** procp = (void **) &disp->Lightfv; - snprintf(symboln, sizeof(symboln), "%sLightfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Lighti) { - void ** procp = (void **) &disp->Lighti; - snprintf(symboln, sizeof(symboln), "%sLighti", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Lightiv) { - void ** procp = (void **) &disp->Lightiv; - snprintf(symboln, sizeof(symboln), "%sLightiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->LightModelf) { - void ** procp = (void **) &disp->LightModelf; - snprintf(symboln, sizeof(symboln), "%sLightModelf", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->LightModelfv) { - void ** procp = (void **) &disp->LightModelfv; - snprintf(symboln, sizeof(symboln), "%sLightModelfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->LightModeli) { - void ** procp = (void **) &disp->LightModeli; - snprintf(symboln, sizeof(symboln), "%sLightModeli", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->LightModeliv) { - void ** procp = (void **) &disp->LightModeliv; - snprintf(symboln, sizeof(symboln), "%sLightModeliv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->LineStipple) { - void ** procp = (void **) &disp->LineStipple; - snprintf(symboln, sizeof(symboln), "%sLineStipple", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->LineWidth) { - void ** procp = (void **) &disp->LineWidth; - snprintf(symboln, sizeof(symboln), "%sLineWidth", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Materialf) { - void ** procp = (void **) &disp->Materialf; - snprintf(symboln, sizeof(symboln), "%sMaterialf", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Materialfv) { - void ** procp = (void **) &disp->Materialfv; - snprintf(symboln, sizeof(symboln), "%sMaterialfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Materiali) { - void ** procp = (void **) &disp->Materiali; - snprintf(symboln, sizeof(symboln), "%sMateriali", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Materialiv) { - void ** procp = (void **) &disp->Materialiv; - snprintf(symboln, sizeof(symboln), "%sMaterialiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PointSize) { - void ** procp = (void **) &disp->PointSize; - snprintf(symboln, sizeof(symboln), "%sPointSize", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PolygonMode) { - void ** procp = (void **) &disp->PolygonMode; - snprintf(symboln, sizeof(symboln), "%sPolygonMode", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PolygonStipple) { - void ** procp = (void **) &disp->PolygonStipple; - snprintf(symboln, sizeof(symboln), "%sPolygonStipple", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Scissor) { - void ** procp = (void **) &disp->Scissor; - snprintf(symboln, sizeof(symboln), "%sScissor", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ShadeModel) { - void ** procp = (void **) &disp->ShadeModel; - snprintf(symboln, sizeof(symboln), "%sShadeModel", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexParameterf) { - void ** procp = (void **) &disp->TexParameterf; - snprintf(symboln, sizeof(symboln), "%sTexParameterf", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexParameterfv) { - void ** procp = (void **) &disp->TexParameterfv; - snprintf(symboln, sizeof(symboln), "%sTexParameterfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexParameteri) { - void ** procp = (void **) &disp->TexParameteri; - snprintf(symboln, sizeof(symboln), "%sTexParameteri", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexParameteriv) { - void ** procp = (void **) &disp->TexParameteriv; - snprintf(symboln, sizeof(symboln), "%sTexParameteriv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexImage1D) { - void ** procp = (void **) &disp->TexImage1D; - snprintf(symboln, sizeof(symboln), "%sTexImage1D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexImage2D) { - void ** procp = (void **) &disp->TexImage2D; - snprintf(symboln, sizeof(symboln), "%sTexImage2D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexEnvf) { - void ** procp = (void **) &disp->TexEnvf; - snprintf(symboln, sizeof(symboln), "%sTexEnvf", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexEnvfv) { - void ** procp = (void **) &disp->TexEnvfv; - snprintf(symboln, sizeof(symboln), "%sTexEnvfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexEnvi) { - void ** procp = (void **) &disp->TexEnvi; - snprintf(symboln, sizeof(symboln), "%sTexEnvi", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexEnviv) { - void ** procp = (void **) &disp->TexEnviv; - snprintf(symboln, sizeof(symboln), "%sTexEnviv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexGend) { - void ** procp = (void **) &disp->TexGend; - snprintf(symboln, sizeof(symboln), "%sTexGend", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexGendv) { - void ** procp = (void **) &disp->TexGendv; - snprintf(symboln, sizeof(symboln), "%sTexGendv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexGenf) { - void ** procp = (void **) &disp->TexGenf; - snprintf(symboln, sizeof(symboln), "%sTexGenf", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexGenfv) { - void ** procp = (void **) &disp->TexGenfv; - snprintf(symboln, sizeof(symboln), "%sTexGenfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexGeni) { - void ** procp = (void **) &disp->TexGeni; - snprintf(symboln, sizeof(symboln), "%sTexGeni", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexGeniv) { - void ** procp = (void **) &disp->TexGeniv; - snprintf(symboln, sizeof(symboln), "%sTexGeniv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FeedbackBuffer) { - void ** procp = (void **) &disp->FeedbackBuffer; - snprintf(symboln, sizeof(symboln), "%sFeedbackBuffer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SelectBuffer) { - void ** procp = (void **) &disp->SelectBuffer; - snprintf(symboln, sizeof(symboln), "%sSelectBuffer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RenderMode) { - void ** procp = (void **) &disp->RenderMode; - snprintf(symboln, sizeof(symboln), "%sRenderMode", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->InitNames) { - void ** procp = (void **) &disp->InitNames; - snprintf(symboln, sizeof(symboln), "%sInitNames", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->LoadName) { - void ** procp = (void **) &disp->LoadName; - snprintf(symboln, sizeof(symboln), "%sLoadName", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PassThrough) { - void ** procp = (void **) &disp->PassThrough; - snprintf(symboln, sizeof(symboln), "%sPassThrough", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PopName) { - void ** procp = (void **) &disp->PopName; - snprintf(symboln, sizeof(symboln), "%sPopName", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PushName) { - void ** procp = (void **) &disp->PushName; - snprintf(symboln, sizeof(symboln), "%sPushName", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawBuffer) { - void ** procp = (void **) &disp->DrawBuffer; - snprintf(symboln, sizeof(symboln), "%sDrawBuffer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Clear) { - void ** procp = (void **) &disp->Clear; - snprintf(symboln, sizeof(symboln), "%sClear", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ClearAccum) { - void ** procp = (void **) &disp->ClearAccum; - snprintf(symboln, sizeof(symboln), "%sClearAccum", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ClearIndex) { - void ** procp = (void **) &disp->ClearIndex; - snprintf(symboln, sizeof(symboln), "%sClearIndex", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ClearColor) { - void ** procp = (void **) &disp->ClearColor; - snprintf(symboln, sizeof(symboln), "%sClearColor", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ClearStencil) { - void ** procp = (void **) &disp->ClearStencil; - snprintf(symboln, sizeof(symboln), "%sClearStencil", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ClearDepth) { - void ** procp = (void **) &disp->ClearDepth; - snprintf(symboln, sizeof(symboln), "%sClearDepth", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->StencilMask) { - void ** procp = (void **) &disp->StencilMask; - snprintf(symboln, sizeof(symboln), "%sStencilMask", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorMask) { - void ** procp = (void **) &disp->ColorMask; - snprintf(symboln, sizeof(symboln), "%sColorMask", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DepthMask) { - void ** procp = (void **) &disp->DepthMask; - snprintf(symboln, sizeof(symboln), "%sDepthMask", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IndexMask) { - void ** procp = (void **) &disp->IndexMask; - snprintf(symboln, sizeof(symboln), "%sIndexMask", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Accum) { - void ** procp = (void **) &disp->Accum; - snprintf(symboln, sizeof(symboln), "%sAccum", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Disable) { - void ** procp = (void **) &disp->Disable; - snprintf(symboln, sizeof(symboln), "%sDisable", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Enable) { - void ** procp = (void **) &disp->Enable; - snprintf(symboln, sizeof(symboln), "%sEnable", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Finish) { - void ** procp = (void **) &disp->Finish; - snprintf(symboln, sizeof(symboln), "%sFinish", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Flush) { - void ** procp = (void **) &disp->Flush; - snprintf(symboln, sizeof(symboln), "%sFlush", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PopAttrib) { - void ** procp = (void **) &disp->PopAttrib; - snprintf(symboln, sizeof(symboln), "%sPopAttrib", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PushAttrib) { - void ** procp = (void **) &disp->PushAttrib; - snprintf(symboln, sizeof(symboln), "%sPushAttrib", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Map1d) { - void ** procp = (void **) &disp->Map1d; - snprintf(symboln, sizeof(symboln), "%sMap1d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Map1f) { - void ** procp = (void **) &disp->Map1f; - snprintf(symboln, sizeof(symboln), "%sMap1f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Map2d) { - void ** procp = (void **) &disp->Map2d; - snprintf(symboln, sizeof(symboln), "%sMap2d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Map2f) { - void ** procp = (void **) &disp->Map2f; - snprintf(symboln, sizeof(symboln), "%sMap2f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MapGrid1d) { - void ** procp = (void **) &disp->MapGrid1d; - snprintf(symboln, sizeof(symboln), "%sMapGrid1d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MapGrid1f) { - void ** procp = (void **) &disp->MapGrid1f; - snprintf(symboln, sizeof(symboln), "%sMapGrid1f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MapGrid2d) { - void ** procp = (void **) &disp->MapGrid2d; - snprintf(symboln, sizeof(symboln), "%sMapGrid2d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MapGrid2f) { - void ** procp = (void **) &disp->MapGrid2f; - snprintf(symboln, sizeof(symboln), "%sMapGrid2f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EvalCoord1d) { - void ** procp = (void **) &disp->EvalCoord1d; - snprintf(symboln, sizeof(symboln), "%sEvalCoord1d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EvalCoord1dv) { - void ** procp = (void **) &disp->EvalCoord1dv; - snprintf(symboln, sizeof(symboln), "%sEvalCoord1dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EvalCoord1f) { - void ** procp = (void **) &disp->EvalCoord1f; - snprintf(symboln, sizeof(symboln), "%sEvalCoord1f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EvalCoord1fv) { - void ** procp = (void **) &disp->EvalCoord1fv; - snprintf(symboln, sizeof(symboln), "%sEvalCoord1fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EvalCoord2d) { - void ** procp = (void **) &disp->EvalCoord2d; - snprintf(symboln, sizeof(symboln), "%sEvalCoord2d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EvalCoord2dv) { - void ** procp = (void **) &disp->EvalCoord2dv; - snprintf(symboln, sizeof(symboln), "%sEvalCoord2dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EvalCoord2f) { - void ** procp = (void **) &disp->EvalCoord2f; - snprintf(symboln, sizeof(symboln), "%sEvalCoord2f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EvalCoord2fv) { - void ** procp = (void **) &disp->EvalCoord2fv; - snprintf(symboln, sizeof(symboln), "%sEvalCoord2fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EvalMesh1) { - void ** procp = (void **) &disp->EvalMesh1; - snprintf(symboln, sizeof(symboln), "%sEvalMesh1", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EvalPoint1) { - void ** procp = (void **) &disp->EvalPoint1; - snprintf(symboln, sizeof(symboln), "%sEvalPoint1", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EvalMesh2) { - void ** procp = (void **) &disp->EvalMesh2; - snprintf(symboln, sizeof(symboln), "%sEvalMesh2", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EvalPoint2) { - void ** procp = (void **) &disp->EvalPoint2; - snprintf(symboln, sizeof(symboln), "%sEvalPoint2", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->AlphaFunc) { - void ** procp = (void **) &disp->AlphaFunc; - snprintf(symboln, sizeof(symboln), "%sAlphaFunc", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlendFunc) { - void ** procp = (void **) &disp->BlendFunc; - snprintf(symboln, sizeof(symboln), "%sBlendFunc", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->LogicOp) { - void ** procp = (void **) &disp->LogicOp; - snprintf(symboln, sizeof(symboln), "%sLogicOp", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->StencilFunc) { - void ** procp = (void **) &disp->StencilFunc; - snprintf(symboln, sizeof(symboln), "%sStencilFunc", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->StencilOp) { - void ** procp = (void **) &disp->StencilOp; - snprintf(symboln, sizeof(symboln), "%sStencilOp", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DepthFunc) { - void ** procp = (void **) &disp->DepthFunc; - snprintf(symboln, sizeof(symboln), "%sDepthFunc", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PixelZoom) { - void ** procp = (void **) &disp->PixelZoom; - snprintf(symboln, sizeof(symboln), "%sPixelZoom", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PixelTransferf) { - void ** procp = (void **) &disp->PixelTransferf; - snprintf(symboln, sizeof(symboln), "%sPixelTransferf", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PixelTransferi) { - void ** procp = (void **) &disp->PixelTransferi; - snprintf(symboln, sizeof(symboln), "%sPixelTransferi", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PixelStoref) { - void ** procp = (void **) &disp->PixelStoref; - snprintf(symboln, sizeof(symboln), "%sPixelStoref", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PixelStorei) { - void ** procp = (void **) &disp->PixelStorei; - snprintf(symboln, sizeof(symboln), "%sPixelStorei", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PixelMapfv) { - void ** procp = (void **) &disp->PixelMapfv; - snprintf(symboln, sizeof(symboln), "%sPixelMapfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PixelMapuiv) { - void ** procp = (void **) &disp->PixelMapuiv; - snprintf(symboln, sizeof(symboln), "%sPixelMapuiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PixelMapusv) { - void ** procp = (void **) &disp->PixelMapusv; - snprintf(symboln, sizeof(symboln), "%sPixelMapusv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ReadBuffer) { - void ** procp = (void **) &disp->ReadBuffer; - snprintf(symboln, sizeof(symboln), "%sReadBuffer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CopyPixels) { - void ** procp = (void **) &disp->CopyPixels; - snprintf(symboln, sizeof(symboln), "%sCopyPixels", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ReadPixels) { - void ** procp = (void **) &disp->ReadPixels; - snprintf(symboln, sizeof(symboln), "%sReadPixels", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawPixels) { - void ** procp = (void **) &disp->DrawPixels; - snprintf(symboln, sizeof(symboln), "%sDrawPixels", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetBooleanv) { - void ** procp = (void **) &disp->GetBooleanv; - snprintf(symboln, sizeof(symboln), "%sGetBooleanv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetClipPlane) { - void ** procp = (void **) &disp->GetClipPlane; - snprintf(symboln, sizeof(symboln), "%sGetClipPlane", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetDoublev) { - void ** procp = (void **) &disp->GetDoublev; - snprintf(symboln, sizeof(symboln), "%sGetDoublev", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetError) { - void ** procp = (void **) &disp->GetError; - snprintf(symboln, sizeof(symboln), "%sGetError", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetFloatv) { - void ** procp = (void **) &disp->GetFloatv; - snprintf(symboln, sizeof(symboln), "%sGetFloatv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetIntegerv) { - void ** procp = (void **) &disp->GetIntegerv; - snprintf(symboln, sizeof(symboln), "%sGetIntegerv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetLightfv) { - void ** procp = (void **) &disp->GetLightfv; - snprintf(symboln, sizeof(symboln), "%sGetLightfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetLightiv) { - void ** procp = (void **) &disp->GetLightiv; - snprintf(symboln, sizeof(symboln), "%sGetLightiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetMapdv) { - void ** procp = (void **) &disp->GetMapdv; - snprintf(symboln, sizeof(symboln), "%sGetMapdv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetMapfv) { - void ** procp = (void **) &disp->GetMapfv; - snprintf(symboln, sizeof(symboln), "%sGetMapfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetMapiv) { - void ** procp = (void **) &disp->GetMapiv; - snprintf(symboln, sizeof(symboln), "%sGetMapiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetMaterialfv) { - void ** procp = (void **) &disp->GetMaterialfv; - snprintf(symboln, sizeof(symboln), "%sGetMaterialfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetMaterialiv) { - void ** procp = (void **) &disp->GetMaterialiv; - snprintf(symboln, sizeof(symboln), "%sGetMaterialiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetPixelMapfv) { - void ** procp = (void **) &disp->GetPixelMapfv; - snprintf(symboln, sizeof(symboln), "%sGetPixelMapfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetPixelMapuiv) { - void ** procp = (void **) &disp->GetPixelMapuiv; - snprintf(symboln, sizeof(symboln), "%sGetPixelMapuiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetPixelMapusv) { - void ** procp = (void **) &disp->GetPixelMapusv; - snprintf(symboln, sizeof(symboln), "%sGetPixelMapusv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetPolygonStipple) { - void ** procp = (void **) &disp->GetPolygonStipple; - snprintf(symboln, sizeof(symboln), "%sGetPolygonStipple", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetString) { - void ** procp = (void **) &disp->GetString; - snprintf(symboln, sizeof(symboln), "%sGetString", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetTexEnvfv) { - void ** procp = (void **) &disp->GetTexEnvfv; - snprintf(symboln, sizeof(symboln), "%sGetTexEnvfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetTexEnviv) { - void ** procp = (void **) &disp->GetTexEnviv; - snprintf(symboln, sizeof(symboln), "%sGetTexEnviv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetTexGendv) { - void ** procp = (void **) &disp->GetTexGendv; - snprintf(symboln, sizeof(symboln), "%sGetTexGendv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetTexGenfv) { - void ** procp = (void **) &disp->GetTexGenfv; - snprintf(symboln, sizeof(symboln), "%sGetTexGenfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetTexGeniv) { - void ** procp = (void **) &disp->GetTexGeniv; - snprintf(symboln, sizeof(symboln), "%sGetTexGeniv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetTexImage) { - void ** procp = (void **) &disp->GetTexImage; - snprintf(symboln, sizeof(symboln), "%sGetTexImage", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetTexParameterfv) { - void ** procp = (void **) &disp->GetTexParameterfv; - snprintf(symboln, sizeof(symboln), "%sGetTexParameterfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetTexParameteriv) { - void ** procp = (void **) &disp->GetTexParameteriv; - snprintf(symboln, sizeof(symboln), "%sGetTexParameteriv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetTexLevelParameterfv) { - void ** procp = (void **) &disp->GetTexLevelParameterfv; - snprintf(symboln, sizeof(symboln), "%sGetTexLevelParameterfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetTexLevelParameteriv) { - void ** procp = (void **) &disp->GetTexLevelParameteriv; - snprintf(symboln, sizeof(symboln), "%sGetTexLevelParameteriv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsEnabled) { - void ** procp = (void **) &disp->IsEnabled; - snprintf(symboln, sizeof(symboln), "%sIsEnabled", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsList) { - void ** procp = (void **) &disp->IsList; - snprintf(symboln, sizeof(symboln), "%sIsList", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DepthRange) { - void ** procp = (void **) &disp->DepthRange; - snprintf(symboln, sizeof(symboln), "%sDepthRange", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Frustum) { - void ** procp = (void **) &disp->Frustum; - snprintf(symboln, sizeof(symboln), "%sFrustum", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->LoadIdentity) { - void ** procp = (void **) &disp->LoadIdentity; - snprintf(symboln, sizeof(symboln), "%sLoadIdentity", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->LoadMatrixf) { - void ** procp = (void **) &disp->LoadMatrixf; - snprintf(symboln, sizeof(symboln), "%sLoadMatrixf", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->LoadMatrixd) { - void ** procp = (void **) &disp->LoadMatrixd; - snprintf(symboln, sizeof(symboln), "%sLoadMatrixd", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MatrixMode) { - void ** procp = (void **) &disp->MatrixMode; - snprintf(symboln, sizeof(symboln), "%sMatrixMode", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultMatrixf) { - void ** procp = (void **) &disp->MultMatrixf; - snprintf(symboln, sizeof(symboln), "%sMultMatrixf", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultMatrixd) { - void ** procp = (void **) &disp->MultMatrixd; - snprintf(symboln, sizeof(symboln), "%sMultMatrixd", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Ortho) { - void ** procp = (void **) &disp->Ortho; - snprintf(symboln, sizeof(symboln), "%sOrtho", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PopMatrix) { - void ** procp = (void **) &disp->PopMatrix; - snprintf(symboln, sizeof(symboln), "%sPopMatrix", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PushMatrix) { - void ** procp = (void **) &disp->PushMatrix; - snprintf(symboln, sizeof(symboln), "%sPushMatrix", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Rotated) { - void ** procp = (void **) &disp->Rotated; - snprintf(symboln, sizeof(symboln), "%sRotated", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Rotatef) { - void ** procp = (void **) &disp->Rotatef; - snprintf(symboln, sizeof(symboln), "%sRotatef", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Scaled) { - void ** procp = (void **) &disp->Scaled; - snprintf(symboln, sizeof(symboln), "%sScaled", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Scalef) { - void ** procp = (void **) &disp->Scalef; - snprintf(symboln, sizeof(symboln), "%sScalef", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Translated) { - void ** procp = (void **) &disp->Translated; - snprintf(symboln, sizeof(symboln), "%sTranslated", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Translatef) { - void ** procp = (void **) &disp->Translatef; - snprintf(symboln, sizeof(symboln), "%sTranslatef", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Viewport) { - void ** procp = (void **) &disp->Viewport; - snprintf(symboln, sizeof(symboln), "%sViewport", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ArrayElement) { - void ** procp = (void **) &disp->ArrayElement; - snprintf(symboln, sizeof(symboln), "%sArrayElement", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ArrayElement) { - void ** procp = (void **) &disp->ArrayElement; - snprintf(symboln, sizeof(symboln), "%sArrayElementEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindTexture) { - void ** procp = (void **) &disp->BindTexture; - snprintf(symboln, sizeof(symboln), "%sBindTexture", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindTexture) { - void ** procp = (void **) &disp->BindTexture; - snprintf(symboln, sizeof(symboln), "%sBindTextureEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorPointer) { - void ** procp = (void **) &disp->ColorPointer; - snprintf(symboln, sizeof(symboln), "%sColorPointer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DisableClientState) { - void ** procp = (void **) &disp->DisableClientState; - snprintf(symboln, sizeof(symboln), "%sDisableClientState", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawArrays) { - void ** procp = (void **) &disp->DrawArrays; - snprintf(symboln, sizeof(symboln), "%sDrawArrays", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawArrays) { - void ** procp = (void **) &disp->DrawArrays; - snprintf(symboln, sizeof(symboln), "%sDrawArraysEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawElements) { - void ** procp = (void **) &disp->DrawElements; - snprintf(symboln, sizeof(symboln), "%sDrawElements", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EdgeFlagPointer) { - void ** procp = (void **) &disp->EdgeFlagPointer; - snprintf(symboln, sizeof(symboln), "%sEdgeFlagPointer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EnableClientState) { - void ** procp = (void **) &disp->EnableClientState; - snprintf(symboln, sizeof(symboln), "%sEnableClientState", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IndexPointer) { - void ** procp = (void **) &disp->IndexPointer; - snprintf(symboln, sizeof(symboln), "%sIndexPointer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Indexub) { - void ** procp = (void **) &disp->Indexub; - snprintf(symboln, sizeof(symboln), "%sIndexub", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Indexubv) { - void ** procp = (void **) &disp->Indexubv; - snprintf(symboln, sizeof(symboln), "%sIndexubv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->InterleavedArrays) { - void ** procp = (void **) &disp->InterleavedArrays; - snprintf(symboln, sizeof(symboln), "%sInterleavedArrays", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->NormalPointer) { - void ** procp = (void **) &disp->NormalPointer; - snprintf(symboln, sizeof(symboln), "%sNormalPointer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PolygonOffset) { - void ** procp = (void **) &disp->PolygonOffset; - snprintf(symboln, sizeof(symboln), "%sPolygonOffset", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoordPointer) { - void ** procp = (void **) &disp->TexCoordPointer; - snprintf(symboln, sizeof(symboln), "%sTexCoordPointer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexPointer) { - void ** procp = (void **) &disp->VertexPointer; - snprintf(symboln, sizeof(symboln), "%sVertexPointer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->AreTexturesResident) { - void ** procp = (void **) &disp->AreTexturesResident; - snprintf(symboln, sizeof(symboln), "%sAreTexturesResident", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->AreTexturesResident) { - void ** procp = (void **) &disp->AreTexturesResident; - snprintf(symboln, sizeof(symboln), "%sAreTexturesResidentEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CopyTexImage1D) { - void ** procp = (void **) &disp->CopyTexImage1D; - snprintf(symboln, sizeof(symboln), "%sCopyTexImage1D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CopyTexImage1D) { - void ** procp = (void **) &disp->CopyTexImage1D; - snprintf(symboln, sizeof(symboln), "%sCopyTexImage1DEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CopyTexImage2D) { - void ** procp = (void **) &disp->CopyTexImage2D; - snprintf(symboln, sizeof(symboln), "%sCopyTexImage2D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CopyTexImage2D) { - void ** procp = (void **) &disp->CopyTexImage2D; - snprintf(symboln, sizeof(symboln), "%sCopyTexImage2DEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CopyTexSubImage1D) { - void ** procp = (void **) &disp->CopyTexSubImage1D; - snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage1D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CopyTexSubImage1D) { - void ** procp = (void **) &disp->CopyTexSubImage1D; - snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage1DEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CopyTexSubImage2D) { - void ** procp = (void **) &disp->CopyTexSubImage2D; - snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage2D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CopyTexSubImage2D) { - void ** procp = (void **) &disp->CopyTexSubImage2D; - snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage2DEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteTextures) { - void ** procp = (void **) &disp->DeleteTextures; - snprintf(symboln, sizeof(symboln), "%sDeleteTextures", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteTextures) { - void ** procp = (void **) &disp->DeleteTextures; - snprintf(symboln, sizeof(symboln), "%sDeleteTexturesEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenTextures) { - void ** procp = (void **) &disp->GenTextures; - snprintf(symboln, sizeof(symboln), "%sGenTextures", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenTextures) { - void ** procp = (void **) &disp->GenTextures; - snprintf(symboln, sizeof(symboln), "%sGenTexturesEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetPointerv) { - void ** procp = (void **) &disp->GetPointerv; - snprintf(symboln, sizeof(symboln), "%sGetPointerv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetPointerv) { - void ** procp = (void **) &disp->GetPointerv; - snprintf(symboln, sizeof(symboln), "%sGetPointervEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsTexture) { - void ** procp = (void **) &disp->IsTexture; - snprintf(symboln, sizeof(symboln), "%sIsTexture", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsTexture) { - void ** procp = (void **) &disp->IsTexture; - snprintf(symboln, sizeof(symboln), "%sIsTextureEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PrioritizeTextures) { - void ** procp = (void **) &disp->PrioritizeTextures; - snprintf(symboln, sizeof(symboln), "%sPrioritizeTextures", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PrioritizeTextures) { - void ** procp = (void **) &disp->PrioritizeTextures; - snprintf(symboln, sizeof(symboln), "%sPrioritizeTexturesEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexSubImage1D) { - void ** procp = (void **) &disp->TexSubImage1D; - snprintf(symboln, sizeof(symboln), "%sTexSubImage1D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexSubImage1D) { - void ** procp = (void **) &disp->TexSubImage1D; - snprintf(symboln, sizeof(symboln), "%sTexSubImage1DEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexSubImage2D) { - void ** procp = (void **) &disp->TexSubImage2D; - snprintf(symboln, sizeof(symboln), "%sTexSubImage2D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexSubImage2D) { - void ** procp = (void **) &disp->TexSubImage2D; - snprintf(symboln, sizeof(symboln), "%sTexSubImage2DEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PopClientAttrib) { - void ** procp = (void **) &disp->PopClientAttrib; - snprintf(symboln, sizeof(symboln), "%sPopClientAttrib", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PushClientAttrib) { - void ** procp = (void **) &disp->PushClientAttrib; - snprintf(symboln, sizeof(symboln), "%sPushClientAttrib", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlendColor) { - void ** procp = (void **) &disp->BlendColor; - snprintf(symboln, sizeof(symboln), "%sBlendColor", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlendColor) { - void ** procp = (void **) &disp->BlendColor; - snprintf(symboln, sizeof(symboln), "%sBlendColorEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlendEquation) { - void ** procp = (void **) &disp->BlendEquation; - snprintf(symboln, sizeof(symboln), "%sBlendEquation", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlendEquation) { - void ** procp = (void **) &disp->BlendEquation; - snprintf(symboln, sizeof(symboln), "%sBlendEquationEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawRangeElements) { - void ** procp = (void **) &disp->DrawRangeElements; - snprintf(symboln, sizeof(symboln), "%sDrawRangeElements", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawRangeElements) { - void ** procp = (void **) &disp->DrawRangeElements; - snprintf(symboln, sizeof(symboln), "%sDrawRangeElementsEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorTable) { - void ** procp = (void **) &disp->ColorTable; - snprintf(symboln, sizeof(symboln), "%sColorTable", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorTable) { - void ** procp = (void **) &disp->ColorTable; - snprintf(symboln, sizeof(symboln), "%sColorTableSGI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorTable) { - void ** procp = (void **) &disp->ColorTable; - snprintf(symboln, sizeof(symboln), "%sColorTableEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorTableParameterfv) { - void ** procp = (void **) &disp->ColorTableParameterfv; - snprintf(symboln, sizeof(symboln), "%sColorTableParameterfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorTableParameterfv) { - void ** procp = (void **) &disp->ColorTableParameterfv; - snprintf(symboln, sizeof(symboln), "%sColorTableParameterfvSGI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorTableParameteriv) { - void ** procp = (void **) &disp->ColorTableParameteriv; - snprintf(symboln, sizeof(symboln), "%sColorTableParameteriv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorTableParameteriv) { - void ** procp = (void **) &disp->ColorTableParameteriv; - snprintf(symboln, sizeof(symboln), "%sColorTableParameterivSGI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CopyColorTable) { - void ** procp = (void **) &disp->CopyColorTable; - snprintf(symboln, sizeof(symboln), "%sCopyColorTable", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CopyColorTable) { - void ** procp = (void **) &disp->CopyColorTable; - snprintf(symboln, sizeof(symboln), "%sCopyColorTableSGI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetColorTable) { - void ** procp = (void **) &disp->GetColorTable; - snprintf(symboln, sizeof(symboln), "%sGetColorTable", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetColorTable) { - void ** procp = (void **) &disp->GetColorTable; - snprintf(symboln, sizeof(symboln), "%sGetColorTableSGI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetColorTable) { - void ** procp = (void **) &disp->GetColorTable; - snprintf(symboln, sizeof(symboln), "%sGetColorTableEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetColorTableParameterfv) { - void ** procp = (void **) &disp->GetColorTableParameterfv; - snprintf(symboln, sizeof(symboln), "%sGetColorTableParameterfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetColorTableParameterfv) { - void ** procp = (void **) &disp->GetColorTableParameterfv; - snprintf(symboln, sizeof(symboln), "%sGetColorTableParameterfvSGI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetColorTableParameterfv) { - void ** procp = (void **) &disp->GetColorTableParameterfv; - snprintf(symboln, sizeof(symboln), "%sGetColorTableParameterfvEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetColorTableParameteriv) { - void ** procp = (void **) &disp->GetColorTableParameteriv; - snprintf(symboln, sizeof(symboln), "%sGetColorTableParameteriv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetColorTableParameteriv) { - void ** procp = (void **) &disp->GetColorTableParameteriv; - snprintf(symboln, sizeof(symboln), "%sGetColorTableParameterivSGI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetColorTableParameteriv) { - void ** procp = (void **) &disp->GetColorTableParameteriv; - snprintf(symboln, sizeof(symboln), "%sGetColorTableParameterivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorSubTable) { - void ** procp = (void **) &disp->ColorSubTable; - snprintf(symboln, sizeof(symboln), "%sColorSubTable", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorSubTable) { - void ** procp = (void **) &disp->ColorSubTable; - snprintf(symboln, sizeof(symboln), "%sColorSubTableEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CopyColorSubTable) { - void ** procp = (void **) &disp->CopyColorSubTable; - snprintf(symboln, sizeof(symboln), "%sCopyColorSubTable", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CopyColorSubTable) { - void ** procp = (void **) &disp->CopyColorSubTable; - snprintf(symboln, sizeof(symboln), "%sCopyColorSubTableEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ConvolutionFilter1D) { - void ** procp = (void **) &disp->ConvolutionFilter1D; - snprintf(symboln, sizeof(symboln), "%sConvolutionFilter1D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ConvolutionFilter1D) { - void ** procp = (void **) &disp->ConvolutionFilter1D; - snprintf(symboln, sizeof(symboln), "%sConvolutionFilter1DEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ConvolutionFilter2D) { - void ** procp = (void **) &disp->ConvolutionFilter2D; - snprintf(symboln, sizeof(symboln), "%sConvolutionFilter2D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ConvolutionFilter2D) { - void ** procp = (void **) &disp->ConvolutionFilter2D; - snprintf(symboln, sizeof(symboln), "%sConvolutionFilter2DEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ConvolutionParameterf) { - void ** procp = (void **) &disp->ConvolutionParameterf; - snprintf(symboln, sizeof(symboln), "%sConvolutionParameterf", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ConvolutionParameterf) { - void ** procp = (void **) &disp->ConvolutionParameterf; - snprintf(symboln, sizeof(symboln), "%sConvolutionParameterfEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ConvolutionParameterfv) { - void ** procp = (void **) &disp->ConvolutionParameterfv; - snprintf(symboln, sizeof(symboln), "%sConvolutionParameterfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ConvolutionParameterfv) { - void ** procp = (void **) &disp->ConvolutionParameterfv; - snprintf(symboln, sizeof(symboln), "%sConvolutionParameterfvEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ConvolutionParameteri) { - void ** procp = (void **) &disp->ConvolutionParameteri; - snprintf(symboln, sizeof(symboln), "%sConvolutionParameteri", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ConvolutionParameteri) { - void ** procp = (void **) &disp->ConvolutionParameteri; - snprintf(symboln, sizeof(symboln), "%sConvolutionParameteriEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ConvolutionParameteriv) { - void ** procp = (void **) &disp->ConvolutionParameteriv; - snprintf(symboln, sizeof(symboln), "%sConvolutionParameteriv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ConvolutionParameteriv) { - void ** procp = (void **) &disp->ConvolutionParameteriv; - snprintf(symboln, sizeof(symboln), "%sConvolutionParameterivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CopyConvolutionFilter1D) { - void ** procp = (void **) &disp->CopyConvolutionFilter1D; - snprintf(symboln, sizeof(symboln), "%sCopyConvolutionFilter1D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CopyConvolutionFilter1D) { - void ** procp = (void **) &disp->CopyConvolutionFilter1D; - snprintf(symboln, sizeof(symboln), "%sCopyConvolutionFilter1DEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CopyConvolutionFilter2D) { - void ** procp = (void **) &disp->CopyConvolutionFilter2D; - snprintf(symboln, sizeof(symboln), "%sCopyConvolutionFilter2D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CopyConvolutionFilter2D) { - void ** procp = (void **) &disp->CopyConvolutionFilter2D; - snprintf(symboln, sizeof(symboln), "%sCopyConvolutionFilter2DEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetConvolutionFilter) { - void ** procp = (void **) &disp->GetConvolutionFilter; - snprintf(symboln, sizeof(symboln), "%sGetConvolutionFilter", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetConvolutionFilter) { - void ** procp = (void **) &disp->GetConvolutionFilter; - snprintf(symboln, sizeof(symboln), "%sGetConvolutionFilterEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetConvolutionParameterfv) { - void ** procp = (void **) &disp->GetConvolutionParameterfv; - snprintf(symboln, sizeof(symboln), "%sGetConvolutionParameterfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetConvolutionParameterfv) { - void ** procp = (void **) &disp->GetConvolutionParameterfv; - snprintf(symboln, sizeof(symboln), "%sGetConvolutionParameterfvEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetConvolutionParameteriv) { - void ** procp = (void **) &disp->GetConvolutionParameteriv; - snprintf(symboln, sizeof(symboln), "%sGetConvolutionParameteriv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetConvolutionParameteriv) { - void ** procp = (void **) &disp->GetConvolutionParameteriv; - snprintf(symboln, sizeof(symboln), "%sGetConvolutionParameterivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetSeparableFilter) { - void ** procp = (void **) &disp->GetSeparableFilter; - snprintf(symboln, sizeof(symboln), "%sGetSeparableFilter", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetSeparableFilter) { - void ** procp = (void **) &disp->GetSeparableFilter; - snprintf(symboln, sizeof(symboln), "%sGetSeparableFilterEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SeparableFilter2D) { - void ** procp = (void **) &disp->SeparableFilter2D; - snprintf(symboln, sizeof(symboln), "%sSeparableFilter2D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SeparableFilter2D) { - void ** procp = (void **) &disp->SeparableFilter2D; - snprintf(symboln, sizeof(symboln), "%sSeparableFilter2DEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetHistogram) { - void ** procp = (void **) &disp->GetHistogram; - snprintf(symboln, sizeof(symboln), "%sGetHistogram", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetHistogram) { - void ** procp = (void **) &disp->GetHistogram; - snprintf(symboln, sizeof(symboln), "%sGetHistogramEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetHistogramParameterfv) { - void ** procp = (void **) &disp->GetHistogramParameterfv; - snprintf(symboln, sizeof(symboln), "%sGetHistogramParameterfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetHistogramParameterfv) { - void ** procp = (void **) &disp->GetHistogramParameterfv; - snprintf(symboln, sizeof(symboln), "%sGetHistogramParameterfvEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetHistogramParameteriv) { - void ** procp = (void **) &disp->GetHistogramParameteriv; - snprintf(symboln, sizeof(symboln), "%sGetHistogramParameteriv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetHistogramParameteriv) { - void ** procp = (void **) &disp->GetHistogramParameteriv; - snprintf(symboln, sizeof(symboln), "%sGetHistogramParameterivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetMinmax) { - void ** procp = (void **) &disp->GetMinmax; - snprintf(symboln, sizeof(symboln), "%sGetMinmax", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetMinmax) { - void ** procp = (void **) &disp->GetMinmax; - snprintf(symboln, sizeof(symboln), "%sGetMinmaxEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetMinmaxParameterfv) { - void ** procp = (void **) &disp->GetMinmaxParameterfv; - snprintf(symboln, sizeof(symboln), "%sGetMinmaxParameterfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetMinmaxParameterfv) { - void ** procp = (void **) &disp->GetMinmaxParameterfv; - snprintf(symboln, sizeof(symboln), "%sGetMinmaxParameterfvEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetMinmaxParameteriv) { - void ** procp = (void **) &disp->GetMinmaxParameteriv; - snprintf(symboln, sizeof(symboln), "%sGetMinmaxParameteriv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetMinmaxParameteriv) { - void ** procp = (void **) &disp->GetMinmaxParameteriv; - snprintf(symboln, sizeof(symboln), "%sGetMinmaxParameterivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Histogram) { - void ** procp = (void **) &disp->Histogram; - snprintf(symboln, sizeof(symboln), "%sHistogram", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Histogram) { - void ** procp = (void **) &disp->Histogram; - snprintf(symboln, sizeof(symboln), "%sHistogramEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Minmax) { - void ** procp = (void **) &disp->Minmax; - snprintf(symboln, sizeof(symboln), "%sMinmax", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Minmax) { - void ** procp = (void **) &disp->Minmax; - snprintf(symboln, sizeof(symboln), "%sMinmaxEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ResetHistogram) { - void ** procp = (void **) &disp->ResetHistogram; - snprintf(symboln, sizeof(symboln), "%sResetHistogram", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ResetHistogram) { - void ** procp = (void **) &disp->ResetHistogram; - snprintf(symboln, sizeof(symboln), "%sResetHistogramEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ResetMinmax) { - void ** procp = (void **) &disp->ResetMinmax; - snprintf(symboln, sizeof(symboln), "%sResetMinmax", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ResetMinmax) { - void ** procp = (void **) &disp->ResetMinmax; - snprintf(symboln, sizeof(symboln), "%sResetMinmaxEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexImage3D) { - void ** procp = (void **) &disp->TexImage3D; - snprintf(symboln, sizeof(symboln), "%sTexImage3D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexImage3D) { - void ** procp = (void **) &disp->TexImage3D; - snprintf(symboln, sizeof(symboln), "%sTexImage3DEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexSubImage3D) { - void ** procp = (void **) &disp->TexSubImage3D; - snprintf(symboln, sizeof(symboln), "%sTexSubImage3D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexSubImage3D) { - void ** procp = (void **) &disp->TexSubImage3D; - snprintf(symboln, sizeof(symboln), "%sTexSubImage3DEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CopyTexSubImage3D) { - void ** procp = (void **) &disp->CopyTexSubImage3D; - snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage3D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CopyTexSubImage3D) { - void ** procp = (void **) &disp->CopyTexSubImage3D; - snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage3DEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ActiveTextureARB) { - void ** procp = (void **) &disp->ActiveTextureARB; - snprintf(symboln, sizeof(symboln), "%sActiveTexture", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ActiveTextureARB) { - void ** procp = (void **) &disp->ActiveTextureARB; - snprintf(symboln, sizeof(symboln), "%sActiveTextureARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ClientActiveTextureARB) { - void ** procp = (void **) &disp->ClientActiveTextureARB; - snprintf(symboln, sizeof(symboln), "%sClientActiveTexture", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ClientActiveTextureARB) { - void ** procp = (void **) &disp->ClientActiveTextureARB; - snprintf(symboln, sizeof(symboln), "%sClientActiveTextureARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord1dARB) { - void ** procp = (void **) &disp->MultiTexCoord1dARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord1dARB) { - void ** procp = (void **) &disp->MultiTexCoord1dARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1dARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord1dvARB) { - void ** procp = (void **) &disp->MultiTexCoord1dvARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord1dvARB) { - void ** procp = (void **) &disp->MultiTexCoord1dvARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1dvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord1fARB) { - void ** procp = (void **) &disp->MultiTexCoord1fARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord1fARB) { - void ** procp = (void **) &disp->MultiTexCoord1fARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1fARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord1fvARB) { - void ** procp = (void **) &disp->MultiTexCoord1fvARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord1fvARB) { - void ** procp = (void **) &disp->MultiTexCoord1fvARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1fvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord1iARB) { - void ** procp = (void **) &disp->MultiTexCoord1iARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord1iARB) { - void ** procp = (void **) &disp->MultiTexCoord1iARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1iARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord1ivARB) { - void ** procp = (void **) &disp->MultiTexCoord1ivARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord1ivARB) { - void ** procp = (void **) &disp->MultiTexCoord1ivARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1ivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord1sARB) { - void ** procp = (void **) &disp->MultiTexCoord1sARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord1sARB) { - void ** procp = (void **) &disp->MultiTexCoord1sARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1sARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord1svARB) { - void ** procp = (void **) &disp->MultiTexCoord1svARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord1svARB) { - void ** procp = (void **) &disp->MultiTexCoord1svARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1svARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord2dARB) { - void ** procp = (void **) &disp->MultiTexCoord2dARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord2dARB) { - void ** procp = (void **) &disp->MultiTexCoord2dARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2dARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord2dvARB) { - void ** procp = (void **) &disp->MultiTexCoord2dvARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord2dvARB) { - void ** procp = (void **) &disp->MultiTexCoord2dvARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2dvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord2fARB) { - void ** procp = (void **) &disp->MultiTexCoord2fARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord2fARB) { - void ** procp = (void **) &disp->MultiTexCoord2fARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2fARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord2fvARB) { - void ** procp = (void **) &disp->MultiTexCoord2fvARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord2fvARB) { - void ** procp = (void **) &disp->MultiTexCoord2fvARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2fvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord2iARB) { - void ** procp = (void **) &disp->MultiTexCoord2iARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord2iARB) { - void ** procp = (void **) &disp->MultiTexCoord2iARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2iARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord2ivARB) { - void ** procp = (void **) &disp->MultiTexCoord2ivARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord2ivARB) { - void ** procp = (void **) &disp->MultiTexCoord2ivARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2ivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord2sARB) { - void ** procp = (void **) &disp->MultiTexCoord2sARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord2sARB) { - void ** procp = (void **) &disp->MultiTexCoord2sARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2sARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord2svARB) { - void ** procp = (void **) &disp->MultiTexCoord2svARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord2svARB) { - void ** procp = (void **) &disp->MultiTexCoord2svARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2svARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord3dARB) { - void ** procp = (void **) &disp->MultiTexCoord3dARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord3dARB) { - void ** procp = (void **) &disp->MultiTexCoord3dARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3dARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord3dvARB) { - void ** procp = (void **) &disp->MultiTexCoord3dvARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord3dvARB) { - void ** procp = (void **) &disp->MultiTexCoord3dvARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3dvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord3fARB) { - void ** procp = (void **) &disp->MultiTexCoord3fARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord3fARB) { - void ** procp = (void **) &disp->MultiTexCoord3fARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3fARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord3fvARB) { - void ** procp = (void **) &disp->MultiTexCoord3fvARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord3fvARB) { - void ** procp = (void **) &disp->MultiTexCoord3fvARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3fvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord3iARB) { - void ** procp = (void **) &disp->MultiTexCoord3iARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord3iARB) { - void ** procp = (void **) &disp->MultiTexCoord3iARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3iARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord3ivARB) { - void ** procp = (void **) &disp->MultiTexCoord3ivARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord3ivARB) { - void ** procp = (void **) &disp->MultiTexCoord3ivARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3ivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord3sARB) { - void ** procp = (void **) &disp->MultiTexCoord3sARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord3sARB) { - void ** procp = (void **) &disp->MultiTexCoord3sARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3sARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord3svARB) { - void ** procp = (void **) &disp->MultiTexCoord3svARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord3svARB) { - void ** procp = (void **) &disp->MultiTexCoord3svARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3svARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord4dARB) { - void ** procp = (void **) &disp->MultiTexCoord4dARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord4dARB) { - void ** procp = (void **) &disp->MultiTexCoord4dARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4dARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord4dvARB) { - void ** procp = (void **) &disp->MultiTexCoord4dvARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord4dvARB) { - void ** procp = (void **) &disp->MultiTexCoord4dvARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4dvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord4fARB) { - void ** procp = (void **) &disp->MultiTexCoord4fARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord4fARB) { - void ** procp = (void **) &disp->MultiTexCoord4fARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4fARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord4fvARB) { - void ** procp = (void **) &disp->MultiTexCoord4fvARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord4fvARB) { - void ** procp = (void **) &disp->MultiTexCoord4fvARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4fvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord4iARB) { - void ** procp = (void **) &disp->MultiTexCoord4iARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord4iARB) { - void ** procp = (void **) &disp->MultiTexCoord4iARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4iARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord4ivARB) { - void ** procp = (void **) &disp->MultiTexCoord4ivARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord4ivARB) { - void ** procp = (void **) &disp->MultiTexCoord4ivARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4ivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord4sARB) { - void ** procp = (void **) &disp->MultiTexCoord4sARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord4sARB) { - void ** procp = (void **) &disp->MultiTexCoord4sARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4sARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord4svARB) { - void ** procp = (void **) &disp->MultiTexCoord4svARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoord4svARB) { - void ** procp = (void **) &disp->MultiTexCoord4svARB; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4svARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->AttachShader) { - void ** procp = (void **) &disp->AttachShader; - snprintf(symboln, sizeof(symboln), "%sAttachShader", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CreateProgram) { - void ** procp = (void **) &disp->CreateProgram; - snprintf(symboln, sizeof(symboln), "%sCreateProgram", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CreateShader) { - void ** procp = (void **) &disp->CreateShader; - snprintf(symboln, sizeof(symboln), "%sCreateShader", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteProgram) { - void ** procp = (void **) &disp->DeleteProgram; - snprintf(symboln, sizeof(symboln), "%sDeleteProgram", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteShader) { - void ** procp = (void **) &disp->DeleteShader; - snprintf(symboln, sizeof(symboln), "%sDeleteShader", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DetachShader) { - void ** procp = (void **) &disp->DetachShader; - snprintf(symboln, sizeof(symboln), "%sDetachShader", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetAttachedShaders) { - void ** procp = (void **) &disp->GetAttachedShaders; - snprintf(symboln, sizeof(symboln), "%sGetAttachedShaders", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetProgramInfoLog) { - void ** procp = (void **) &disp->GetProgramInfoLog; - snprintf(symboln, sizeof(symboln), "%sGetProgramInfoLog", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetProgramiv) { - void ** procp = (void **) &disp->GetProgramiv; - snprintf(symboln, sizeof(symboln), "%sGetProgramiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetShaderInfoLog) { - void ** procp = (void **) &disp->GetShaderInfoLog; - snprintf(symboln, sizeof(symboln), "%sGetShaderInfoLog", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetShaderiv) { - void ** procp = (void **) &disp->GetShaderiv; - snprintf(symboln, sizeof(symboln), "%sGetShaderiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsProgram) { - void ** procp = (void **) &disp->IsProgram; - snprintf(symboln, sizeof(symboln), "%sIsProgram", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsShader) { - void ** procp = (void **) &disp->IsShader; - snprintf(symboln, sizeof(symboln), "%sIsShader", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->StencilFuncSeparate) { - void ** procp = (void **) &disp->StencilFuncSeparate; - snprintf(symboln, sizeof(symboln), "%sStencilFuncSeparate", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->StencilMaskSeparate) { - void ** procp = (void **) &disp->StencilMaskSeparate; - snprintf(symboln, sizeof(symboln), "%sStencilMaskSeparate", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->StencilOpSeparate) { - void ** procp = (void **) &disp->StencilOpSeparate; - snprintf(symboln, sizeof(symboln), "%sStencilOpSeparate", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->StencilOpSeparate) { - void ** procp = (void **) &disp->StencilOpSeparate; - snprintf(symboln, sizeof(symboln), "%sStencilOpSeparateATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->UniformMatrix2x3fv) { - void ** procp = (void **) &disp->UniformMatrix2x3fv; - snprintf(symboln, sizeof(symboln), "%sUniformMatrix2x3fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->UniformMatrix2x4fv) { - void ** procp = (void **) &disp->UniformMatrix2x4fv; - snprintf(symboln, sizeof(symboln), "%sUniformMatrix2x4fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->UniformMatrix3x2fv) { - void ** procp = (void **) &disp->UniformMatrix3x2fv; - snprintf(symboln, sizeof(symboln), "%sUniformMatrix3x2fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->UniformMatrix3x4fv) { - void ** procp = (void **) &disp->UniformMatrix3x4fv; - snprintf(symboln, sizeof(symboln), "%sUniformMatrix3x4fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->UniformMatrix4x2fv) { - void ** procp = (void **) &disp->UniformMatrix4x2fv; - snprintf(symboln, sizeof(symboln), "%sUniformMatrix4x2fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->UniformMatrix4x3fv) { - void ** procp = (void **) &disp->UniformMatrix4x3fv; - snprintf(symboln, sizeof(symboln), "%sUniformMatrix4x3fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ClampColor) { - void ** procp = (void **) &disp->ClampColor; - snprintf(symboln, sizeof(symboln), "%sClampColor", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ClearBufferfi) { - void ** procp = (void **) &disp->ClearBufferfi; - snprintf(symboln, sizeof(symboln), "%sClearBufferfi", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ClearBufferfv) { - void ** procp = (void **) &disp->ClearBufferfv; - snprintf(symboln, sizeof(symboln), "%sClearBufferfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ClearBufferiv) { - void ** procp = (void **) &disp->ClearBufferiv; - snprintf(symboln, sizeof(symboln), "%sClearBufferiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ClearBufferuiv) { - void ** procp = (void **) &disp->ClearBufferuiv; - snprintf(symboln, sizeof(symboln), "%sClearBufferuiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetStringi) { - void ** procp = (void **) &disp->GetStringi; - snprintf(symboln, sizeof(symboln), "%sGetStringi", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexBuffer) { - void ** procp = (void **) &disp->TexBuffer; - snprintf(symboln, sizeof(symboln), "%sTexBuffer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FramebufferTexture) { - void ** procp = (void **) &disp->FramebufferTexture; - snprintf(symboln, sizeof(symboln), "%sFramebufferTexture", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetBufferParameteri64v) { - void ** procp = (void **) &disp->GetBufferParameteri64v; - snprintf(symboln, sizeof(symboln), "%sGetBufferParameteri64v", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetInteger64i_v) { - void ** procp = (void **) &disp->GetInteger64i_v; - snprintf(symboln, sizeof(symboln), "%sGetInteger64i_v", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribDivisor) { - void ** procp = (void **) &disp->VertexAttribDivisor; - snprintf(symboln, sizeof(symboln), "%sVertexAttribDivisor", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->LoadTransposeMatrixdARB) { - void ** procp = (void **) &disp->LoadTransposeMatrixdARB; - snprintf(symboln, sizeof(symboln), "%sLoadTransposeMatrixd", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->LoadTransposeMatrixdARB) { - void ** procp = (void **) &disp->LoadTransposeMatrixdARB; - snprintf(symboln, sizeof(symboln), "%sLoadTransposeMatrixdARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->LoadTransposeMatrixfARB) { - void ** procp = (void **) &disp->LoadTransposeMatrixfARB; - snprintf(symboln, sizeof(symboln), "%sLoadTransposeMatrixf", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->LoadTransposeMatrixfARB) { - void ** procp = (void **) &disp->LoadTransposeMatrixfARB; - snprintf(symboln, sizeof(symboln), "%sLoadTransposeMatrixfARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultTransposeMatrixdARB) { - void ** procp = (void **) &disp->MultTransposeMatrixdARB; - snprintf(symboln, sizeof(symboln), "%sMultTransposeMatrixd", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultTransposeMatrixdARB) { - void ** procp = (void **) &disp->MultTransposeMatrixdARB; - snprintf(symboln, sizeof(symboln), "%sMultTransposeMatrixdARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultTransposeMatrixfARB) { - void ** procp = (void **) &disp->MultTransposeMatrixfARB; - snprintf(symboln, sizeof(symboln), "%sMultTransposeMatrixf", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultTransposeMatrixfARB) { - void ** procp = (void **) &disp->MultTransposeMatrixfARB; - snprintf(symboln, sizeof(symboln), "%sMultTransposeMatrixfARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SampleCoverageARB) { - void ** procp = (void **) &disp->SampleCoverageARB; - snprintf(symboln, sizeof(symboln), "%sSampleCoverage", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SampleCoverageARB) { - void ** procp = (void **) &disp->SampleCoverageARB; - snprintf(symboln, sizeof(symboln), "%sSampleCoverageARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CompressedTexImage1DARB) { - void ** procp = (void **) &disp->CompressedTexImage1DARB; - snprintf(symboln, sizeof(symboln), "%sCompressedTexImage1D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CompressedTexImage1DARB) { - void ** procp = (void **) &disp->CompressedTexImage1DARB; - snprintf(symboln, sizeof(symboln), "%sCompressedTexImage1DARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CompressedTexImage2DARB) { - void ** procp = (void **) &disp->CompressedTexImage2DARB; - snprintf(symboln, sizeof(symboln), "%sCompressedTexImage2D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CompressedTexImage2DARB) { - void ** procp = (void **) &disp->CompressedTexImage2DARB; - snprintf(symboln, sizeof(symboln), "%sCompressedTexImage2DARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CompressedTexImage3DARB) { - void ** procp = (void **) &disp->CompressedTexImage3DARB; - snprintf(symboln, sizeof(symboln), "%sCompressedTexImage3D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CompressedTexImage3DARB) { - void ** procp = (void **) &disp->CompressedTexImage3DARB; - snprintf(symboln, sizeof(symboln), "%sCompressedTexImage3DARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CompressedTexSubImage1DARB) { - void ** procp = (void **) &disp->CompressedTexSubImage1DARB; - snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage1D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CompressedTexSubImage1DARB) { - void ** procp = (void **) &disp->CompressedTexSubImage1DARB; - snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage1DARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CompressedTexSubImage2DARB) { - void ** procp = (void **) &disp->CompressedTexSubImage2DARB; - snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage2D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CompressedTexSubImage2DARB) { - void ** procp = (void **) &disp->CompressedTexSubImage2DARB; - snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage2DARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CompressedTexSubImage3DARB) { - void ** procp = (void **) &disp->CompressedTexSubImage3DARB; - snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage3D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CompressedTexSubImage3DARB) { - void ** procp = (void **) &disp->CompressedTexSubImage3DARB; - snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage3DARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetCompressedTexImageARB) { - void ** procp = (void **) &disp->GetCompressedTexImageARB; - snprintf(symboln, sizeof(symboln), "%sGetCompressedTexImage", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetCompressedTexImageARB) { - void ** procp = (void **) &disp->GetCompressedTexImageARB; - snprintf(symboln, sizeof(symboln), "%sGetCompressedTexImageARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DisableVertexAttribArrayARB) { - void ** procp = (void **) &disp->DisableVertexAttribArrayARB; - snprintf(symboln, sizeof(symboln), "%sDisableVertexAttribArray", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DisableVertexAttribArrayARB) { - void ** procp = (void **) &disp->DisableVertexAttribArrayARB; - snprintf(symboln, sizeof(symboln), "%sDisableVertexAttribArrayARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EnableVertexAttribArrayARB) { - void ** procp = (void **) &disp->EnableVertexAttribArrayARB; - snprintf(symboln, sizeof(symboln), "%sEnableVertexAttribArray", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EnableVertexAttribArrayARB) { - void ** procp = (void **) &disp->EnableVertexAttribArrayARB; - snprintf(symboln, sizeof(symboln), "%sEnableVertexAttribArrayARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetProgramEnvParameterdvARB) { - void ** procp = (void **) &disp->GetProgramEnvParameterdvARB; - snprintf(symboln, sizeof(symboln), "%sGetProgramEnvParameterdvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetProgramEnvParameterfvARB) { - void ** procp = (void **) &disp->GetProgramEnvParameterfvARB; - snprintf(symboln, sizeof(symboln), "%sGetProgramEnvParameterfvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetProgramLocalParameterdvARB) { - void ** procp = (void **) &disp->GetProgramLocalParameterdvARB; - snprintf(symboln, sizeof(symboln), "%sGetProgramLocalParameterdvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetProgramLocalParameterfvARB) { - void ** procp = (void **) &disp->GetProgramLocalParameterfvARB; - snprintf(symboln, sizeof(symboln), "%sGetProgramLocalParameterfvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetProgramStringARB) { - void ** procp = (void **) &disp->GetProgramStringARB; - snprintf(symboln, sizeof(symboln), "%sGetProgramStringARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetProgramivARB) { - void ** procp = (void **) &disp->GetProgramivARB; - snprintf(symboln, sizeof(symboln), "%sGetProgramivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetVertexAttribdvARB) { - void ** procp = (void **) &disp->GetVertexAttribdvARB; - snprintf(symboln, sizeof(symboln), "%sGetVertexAttribdv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetVertexAttribdvARB) { - void ** procp = (void **) &disp->GetVertexAttribdvARB; - snprintf(symboln, sizeof(symboln), "%sGetVertexAttribdvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetVertexAttribfvARB) { - void ** procp = (void **) &disp->GetVertexAttribfvARB; - snprintf(symboln, sizeof(symboln), "%sGetVertexAttribfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetVertexAttribfvARB) { - void ** procp = (void **) &disp->GetVertexAttribfvARB; - snprintf(symboln, sizeof(symboln), "%sGetVertexAttribfvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetVertexAttribivARB) { - void ** procp = (void **) &disp->GetVertexAttribivARB; - snprintf(symboln, sizeof(symboln), "%sGetVertexAttribiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetVertexAttribivARB) { - void ** procp = (void **) &disp->GetVertexAttribivARB; - snprintf(symboln, sizeof(symboln), "%sGetVertexAttribivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramEnvParameter4dARB) { - void ** procp = (void **) &disp->ProgramEnvParameter4dARB; - snprintf(symboln, sizeof(symboln), "%sProgramEnvParameter4dARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramEnvParameter4dARB) { - void ** procp = (void **) &disp->ProgramEnvParameter4dARB; - snprintf(symboln, sizeof(symboln), "%sProgramParameter4dNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramEnvParameter4dvARB) { - void ** procp = (void **) &disp->ProgramEnvParameter4dvARB; - snprintf(symboln, sizeof(symboln), "%sProgramEnvParameter4dvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramEnvParameter4dvARB) { - void ** procp = (void **) &disp->ProgramEnvParameter4dvARB; - snprintf(symboln, sizeof(symboln), "%sProgramParameter4dvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramEnvParameter4fARB) { - void ** procp = (void **) &disp->ProgramEnvParameter4fARB; - snprintf(symboln, sizeof(symboln), "%sProgramEnvParameter4fARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramEnvParameter4fARB) { - void ** procp = (void **) &disp->ProgramEnvParameter4fARB; - snprintf(symboln, sizeof(symboln), "%sProgramParameter4fNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramEnvParameter4fvARB) { - void ** procp = (void **) &disp->ProgramEnvParameter4fvARB; - snprintf(symboln, sizeof(symboln), "%sProgramEnvParameter4fvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramEnvParameter4fvARB) { - void ** procp = (void **) &disp->ProgramEnvParameter4fvARB; - snprintf(symboln, sizeof(symboln), "%sProgramParameter4fvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramLocalParameter4dARB) { - void ** procp = (void **) &disp->ProgramLocalParameter4dARB; - snprintf(symboln, sizeof(symboln), "%sProgramLocalParameter4dARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramLocalParameter4dvARB) { - void ** procp = (void **) &disp->ProgramLocalParameter4dvARB; - snprintf(symboln, sizeof(symboln), "%sProgramLocalParameter4dvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramLocalParameter4fARB) { - void ** procp = (void **) &disp->ProgramLocalParameter4fARB; - snprintf(symboln, sizeof(symboln), "%sProgramLocalParameter4fARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramLocalParameter4fvARB) { - void ** procp = (void **) &disp->ProgramLocalParameter4fvARB; - snprintf(symboln, sizeof(symboln), "%sProgramLocalParameter4fvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramStringARB) { - void ** procp = (void **) &disp->ProgramStringARB; - snprintf(symboln, sizeof(symboln), "%sProgramStringARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib1dARB) { - void ** procp = (void **) &disp->VertexAttrib1dARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib1d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib1dARB) { - void ** procp = (void **) &disp->VertexAttrib1dARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib1dARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib1dvARB) { - void ** procp = (void **) &disp->VertexAttrib1dvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib1dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib1dvARB) { - void ** procp = (void **) &disp->VertexAttrib1dvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib1dvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib1fARB) { - void ** procp = (void **) &disp->VertexAttrib1fARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib1f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib1fARB) { - void ** procp = (void **) &disp->VertexAttrib1fARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib1fARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib1fvARB) { - void ** procp = (void **) &disp->VertexAttrib1fvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib1fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib1fvARB) { - void ** procp = (void **) &disp->VertexAttrib1fvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib1fvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib1sARB) { - void ** procp = (void **) &disp->VertexAttrib1sARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib1s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib1sARB) { - void ** procp = (void **) &disp->VertexAttrib1sARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib1sARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib1svARB) { - void ** procp = (void **) &disp->VertexAttrib1svARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib1sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib1svARB) { - void ** procp = (void **) &disp->VertexAttrib1svARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib1svARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib2dARB) { - void ** procp = (void **) &disp->VertexAttrib2dARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib2d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib2dARB) { - void ** procp = (void **) &disp->VertexAttrib2dARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib2dARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib2dvARB) { - void ** procp = (void **) &disp->VertexAttrib2dvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib2dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib2dvARB) { - void ** procp = (void **) &disp->VertexAttrib2dvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib2dvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib2fARB) { - void ** procp = (void **) &disp->VertexAttrib2fARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib2f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib2fARB) { - void ** procp = (void **) &disp->VertexAttrib2fARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib2fARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib2fvARB) { - void ** procp = (void **) &disp->VertexAttrib2fvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib2fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib2fvARB) { - void ** procp = (void **) &disp->VertexAttrib2fvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib2fvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib2sARB) { - void ** procp = (void **) &disp->VertexAttrib2sARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib2s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib2sARB) { - void ** procp = (void **) &disp->VertexAttrib2sARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib2sARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib2svARB) { - void ** procp = (void **) &disp->VertexAttrib2svARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib2sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib2svARB) { - void ** procp = (void **) &disp->VertexAttrib2svARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib2svARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib3dARB) { - void ** procp = (void **) &disp->VertexAttrib3dARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib3d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib3dARB) { - void ** procp = (void **) &disp->VertexAttrib3dARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib3dARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib3dvARB) { - void ** procp = (void **) &disp->VertexAttrib3dvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib3dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib3dvARB) { - void ** procp = (void **) &disp->VertexAttrib3dvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib3dvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib3fARB) { - void ** procp = (void **) &disp->VertexAttrib3fARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib3f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib3fARB) { - void ** procp = (void **) &disp->VertexAttrib3fARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib3fARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib3fvARB) { - void ** procp = (void **) &disp->VertexAttrib3fvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib3fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib3fvARB) { - void ** procp = (void **) &disp->VertexAttrib3fvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib3fvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib3sARB) { - void ** procp = (void **) &disp->VertexAttrib3sARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib3s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib3sARB) { - void ** procp = (void **) &disp->VertexAttrib3sARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib3sARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib3svARB) { - void ** procp = (void **) &disp->VertexAttrib3svARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib3sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib3svARB) { - void ** procp = (void **) &disp->VertexAttrib3svARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib3svARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4NbvARB) { - void ** procp = (void **) &disp->VertexAttrib4NbvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nbv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4NbvARB) { - void ** procp = (void **) &disp->VertexAttrib4NbvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NbvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4NivARB) { - void ** procp = (void **) &disp->VertexAttrib4NivARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Niv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4NivARB) { - void ** procp = (void **) &disp->VertexAttrib4NivARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4NsvARB) { - void ** procp = (void **) &disp->VertexAttrib4NsvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nsv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4NsvARB) { - void ** procp = (void **) &disp->VertexAttrib4NsvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NsvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4NubARB) { - void ** procp = (void **) &disp->VertexAttrib4NubARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nub", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4NubARB) { - void ** procp = (void **) &disp->VertexAttrib4NubARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NubARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4NubvARB) { - void ** procp = (void **) &disp->VertexAttrib4NubvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nubv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4NubvARB) { - void ** procp = (void **) &disp->VertexAttrib4NubvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NubvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4NuivARB) { - void ** procp = (void **) &disp->VertexAttrib4NuivARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nuiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4NuivARB) { - void ** procp = (void **) &disp->VertexAttrib4NuivARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NuivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4NusvARB) { - void ** procp = (void **) &disp->VertexAttrib4NusvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nusv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4NusvARB) { - void ** procp = (void **) &disp->VertexAttrib4NusvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NusvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4bvARB) { - void ** procp = (void **) &disp->VertexAttrib4bvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4bv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4bvARB) { - void ** procp = (void **) &disp->VertexAttrib4bvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4bvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4dARB) { - void ** procp = (void **) &disp->VertexAttrib4dARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4dARB) { - void ** procp = (void **) &disp->VertexAttrib4dARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4dARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4dvARB) { - void ** procp = (void **) &disp->VertexAttrib4dvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4dvARB) { - void ** procp = (void **) &disp->VertexAttrib4dvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4dvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4fARB) { - void ** procp = (void **) &disp->VertexAttrib4fARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4fARB) { - void ** procp = (void **) &disp->VertexAttrib4fARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4fARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4fvARB) { - void ** procp = (void **) &disp->VertexAttrib4fvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4fvARB) { - void ** procp = (void **) &disp->VertexAttrib4fvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4fvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4ivARB) { - void ** procp = (void **) &disp->VertexAttrib4ivARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4ivARB) { - void ** procp = (void **) &disp->VertexAttrib4ivARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4ivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4sARB) { - void ** procp = (void **) &disp->VertexAttrib4sARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4sARB) { - void ** procp = (void **) &disp->VertexAttrib4sARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4sARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4svARB) { - void ** procp = (void **) &disp->VertexAttrib4svARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4svARB) { - void ** procp = (void **) &disp->VertexAttrib4svARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4svARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4ubvARB) { - void ** procp = (void **) &disp->VertexAttrib4ubvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4ubv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4ubvARB) { - void ** procp = (void **) &disp->VertexAttrib4ubvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4ubvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4uivARB) { - void ** procp = (void **) &disp->VertexAttrib4uivARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4uivARB) { - void ** procp = (void **) &disp->VertexAttrib4uivARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4uivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4usvARB) { - void ** procp = (void **) &disp->VertexAttrib4usvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4usv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4usvARB) { - void ** procp = (void **) &disp->VertexAttrib4usvARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4usvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribPointerARB) { - void ** procp = (void **) &disp->VertexAttribPointerARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttribPointer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribPointerARB) { - void ** procp = (void **) &disp->VertexAttribPointerARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttribPointerARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindBufferARB) { - void ** procp = (void **) &disp->BindBufferARB; - snprintf(symboln, sizeof(symboln), "%sBindBuffer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindBufferARB) { - void ** procp = (void **) &disp->BindBufferARB; - snprintf(symboln, sizeof(symboln), "%sBindBufferARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BufferDataARB) { - void ** procp = (void **) &disp->BufferDataARB; - snprintf(symboln, sizeof(symboln), "%sBufferData", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BufferDataARB) { - void ** procp = (void **) &disp->BufferDataARB; - snprintf(symboln, sizeof(symboln), "%sBufferDataARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BufferSubDataARB) { - void ** procp = (void **) &disp->BufferSubDataARB; - snprintf(symboln, sizeof(symboln), "%sBufferSubData", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BufferSubDataARB) { - void ** procp = (void **) &disp->BufferSubDataARB; - snprintf(symboln, sizeof(symboln), "%sBufferSubDataARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteBuffersARB) { - void ** procp = (void **) &disp->DeleteBuffersARB; - snprintf(symboln, sizeof(symboln), "%sDeleteBuffers", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteBuffersARB) { - void ** procp = (void **) &disp->DeleteBuffersARB; - snprintf(symboln, sizeof(symboln), "%sDeleteBuffersARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenBuffersARB) { - void ** procp = (void **) &disp->GenBuffersARB; - snprintf(symboln, sizeof(symboln), "%sGenBuffers", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenBuffersARB) { - void ** procp = (void **) &disp->GenBuffersARB; - snprintf(symboln, sizeof(symboln), "%sGenBuffersARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetBufferParameterivARB) { - void ** procp = (void **) &disp->GetBufferParameterivARB; - snprintf(symboln, sizeof(symboln), "%sGetBufferParameteriv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetBufferParameterivARB) { - void ** procp = (void **) &disp->GetBufferParameterivARB; - snprintf(symboln, sizeof(symboln), "%sGetBufferParameterivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetBufferPointervARB) { - void ** procp = (void **) &disp->GetBufferPointervARB; - snprintf(symboln, sizeof(symboln), "%sGetBufferPointerv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetBufferPointervARB) { - void ** procp = (void **) &disp->GetBufferPointervARB; - snprintf(symboln, sizeof(symboln), "%sGetBufferPointervARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetBufferSubDataARB) { - void ** procp = (void **) &disp->GetBufferSubDataARB; - snprintf(symboln, sizeof(symboln), "%sGetBufferSubData", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetBufferSubDataARB) { - void ** procp = (void **) &disp->GetBufferSubDataARB; - snprintf(symboln, sizeof(symboln), "%sGetBufferSubDataARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsBufferARB) { - void ** procp = (void **) &disp->IsBufferARB; - snprintf(symboln, sizeof(symboln), "%sIsBuffer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsBufferARB) { - void ** procp = (void **) &disp->IsBufferARB; - snprintf(symboln, sizeof(symboln), "%sIsBufferARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MapBufferARB) { - void ** procp = (void **) &disp->MapBufferARB; - snprintf(symboln, sizeof(symboln), "%sMapBuffer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MapBufferARB) { - void ** procp = (void **) &disp->MapBufferARB; - snprintf(symboln, sizeof(symboln), "%sMapBufferARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->UnmapBufferARB) { - void ** procp = (void **) &disp->UnmapBufferARB; - snprintf(symboln, sizeof(symboln), "%sUnmapBuffer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->UnmapBufferARB) { - void ** procp = (void **) &disp->UnmapBufferARB; - snprintf(symboln, sizeof(symboln), "%sUnmapBufferARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BeginQueryARB) { - void ** procp = (void **) &disp->BeginQueryARB; - snprintf(symboln, sizeof(symboln), "%sBeginQuery", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BeginQueryARB) { - void ** procp = (void **) &disp->BeginQueryARB; - snprintf(symboln, sizeof(symboln), "%sBeginQueryARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteQueriesARB) { - void ** procp = (void **) &disp->DeleteQueriesARB; - snprintf(symboln, sizeof(symboln), "%sDeleteQueries", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteQueriesARB) { - void ** procp = (void **) &disp->DeleteQueriesARB; - snprintf(symboln, sizeof(symboln), "%sDeleteQueriesARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EndQueryARB) { - void ** procp = (void **) &disp->EndQueryARB; - snprintf(symboln, sizeof(symboln), "%sEndQuery", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EndQueryARB) { - void ** procp = (void **) &disp->EndQueryARB; - snprintf(symboln, sizeof(symboln), "%sEndQueryARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenQueriesARB) { - void ** procp = (void **) &disp->GenQueriesARB; - snprintf(symboln, sizeof(symboln), "%sGenQueries", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenQueriesARB) { - void ** procp = (void **) &disp->GenQueriesARB; - snprintf(symboln, sizeof(symboln), "%sGenQueriesARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetQueryObjectivARB) { - void ** procp = (void **) &disp->GetQueryObjectivARB; - snprintf(symboln, sizeof(symboln), "%sGetQueryObjectiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetQueryObjectivARB) { - void ** procp = (void **) &disp->GetQueryObjectivARB; - snprintf(symboln, sizeof(symboln), "%sGetQueryObjectivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetQueryObjectuivARB) { - void ** procp = (void **) &disp->GetQueryObjectuivARB; - snprintf(symboln, sizeof(symboln), "%sGetQueryObjectuiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetQueryObjectuivARB) { - void ** procp = (void **) &disp->GetQueryObjectuivARB; - snprintf(symboln, sizeof(symboln), "%sGetQueryObjectuivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetQueryivARB) { - void ** procp = (void **) &disp->GetQueryivARB; - snprintf(symboln, sizeof(symboln), "%sGetQueryiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetQueryivARB) { - void ** procp = (void **) &disp->GetQueryivARB; - snprintf(symboln, sizeof(symboln), "%sGetQueryivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsQueryARB) { - void ** procp = (void **) &disp->IsQueryARB; - snprintf(symboln, sizeof(symboln), "%sIsQuery", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsQueryARB) { - void ** procp = (void **) &disp->IsQueryARB; - snprintf(symboln, sizeof(symboln), "%sIsQueryARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->AttachObjectARB) { - void ** procp = (void **) &disp->AttachObjectARB; - snprintf(symboln, sizeof(symboln), "%sAttachObjectARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CompileShaderARB) { - void ** procp = (void **) &disp->CompileShaderARB; - snprintf(symboln, sizeof(symboln), "%sCompileShader", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CompileShaderARB) { - void ** procp = (void **) &disp->CompileShaderARB; - snprintf(symboln, sizeof(symboln), "%sCompileShaderARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CreateProgramObjectARB) { - void ** procp = (void **) &disp->CreateProgramObjectARB; - snprintf(symboln, sizeof(symboln), "%sCreateProgramObjectARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CreateShaderObjectARB) { - void ** procp = (void **) &disp->CreateShaderObjectARB; - snprintf(symboln, sizeof(symboln), "%sCreateShaderObjectARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteObjectARB) { - void ** procp = (void **) &disp->DeleteObjectARB; - snprintf(symboln, sizeof(symboln), "%sDeleteObjectARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DetachObjectARB) { - void ** procp = (void **) &disp->DetachObjectARB; - snprintf(symboln, sizeof(symboln), "%sDetachObjectARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetActiveUniformARB) { - void ** procp = (void **) &disp->GetActiveUniformARB; - snprintf(symboln, sizeof(symboln), "%sGetActiveUniform", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetActiveUniformARB) { - void ** procp = (void **) &disp->GetActiveUniformARB; - snprintf(symboln, sizeof(symboln), "%sGetActiveUniformARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetAttachedObjectsARB) { - void ** procp = (void **) &disp->GetAttachedObjectsARB; - snprintf(symboln, sizeof(symboln), "%sGetAttachedObjectsARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetHandleARB) { - void ** procp = (void **) &disp->GetHandleARB; - snprintf(symboln, sizeof(symboln), "%sGetHandleARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetInfoLogARB) { - void ** procp = (void **) &disp->GetInfoLogARB; - snprintf(symboln, sizeof(symboln), "%sGetInfoLogARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetObjectParameterfvARB) { - void ** procp = (void **) &disp->GetObjectParameterfvARB; - snprintf(symboln, sizeof(symboln), "%sGetObjectParameterfvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetObjectParameterivARB) { - void ** procp = (void **) &disp->GetObjectParameterivARB; - snprintf(symboln, sizeof(symboln), "%sGetObjectParameterivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetShaderSourceARB) { - void ** procp = (void **) &disp->GetShaderSourceARB; - snprintf(symboln, sizeof(symboln), "%sGetShaderSource", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetShaderSourceARB) { - void ** procp = (void **) &disp->GetShaderSourceARB; - snprintf(symboln, sizeof(symboln), "%sGetShaderSourceARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetUniformLocationARB) { - void ** procp = (void **) &disp->GetUniformLocationARB; - snprintf(symboln, sizeof(symboln), "%sGetUniformLocation", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetUniformLocationARB) { - void ** procp = (void **) &disp->GetUniformLocationARB; - snprintf(symboln, sizeof(symboln), "%sGetUniformLocationARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetUniformfvARB) { - void ** procp = (void **) &disp->GetUniformfvARB; - snprintf(symboln, sizeof(symboln), "%sGetUniformfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetUniformfvARB) { - void ** procp = (void **) &disp->GetUniformfvARB; - snprintf(symboln, sizeof(symboln), "%sGetUniformfvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetUniformivARB) { - void ** procp = (void **) &disp->GetUniformivARB; - snprintf(symboln, sizeof(symboln), "%sGetUniformiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetUniformivARB) { - void ** procp = (void **) &disp->GetUniformivARB; - snprintf(symboln, sizeof(symboln), "%sGetUniformivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->LinkProgramARB) { - void ** procp = (void **) &disp->LinkProgramARB; - snprintf(symboln, sizeof(symboln), "%sLinkProgram", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->LinkProgramARB) { - void ** procp = (void **) &disp->LinkProgramARB; - snprintf(symboln, sizeof(symboln), "%sLinkProgramARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ShaderSourceARB) { - void ** procp = (void **) &disp->ShaderSourceARB; - snprintf(symboln, sizeof(symboln), "%sShaderSource", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ShaderSourceARB) { - void ** procp = (void **) &disp->ShaderSourceARB; - snprintf(symboln, sizeof(symboln), "%sShaderSourceARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform1fARB) { - void ** procp = (void **) &disp->Uniform1fARB; - snprintf(symboln, sizeof(symboln), "%sUniform1f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform1fARB) { - void ** procp = (void **) &disp->Uniform1fARB; - snprintf(symboln, sizeof(symboln), "%sUniform1fARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform1fvARB) { - void ** procp = (void **) &disp->Uniform1fvARB; - snprintf(symboln, sizeof(symboln), "%sUniform1fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform1fvARB) { - void ** procp = (void **) &disp->Uniform1fvARB; - snprintf(symboln, sizeof(symboln), "%sUniform1fvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform1iARB) { - void ** procp = (void **) &disp->Uniform1iARB; - snprintf(symboln, sizeof(symboln), "%sUniform1i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform1iARB) { - void ** procp = (void **) &disp->Uniform1iARB; - snprintf(symboln, sizeof(symboln), "%sUniform1iARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform1ivARB) { - void ** procp = (void **) &disp->Uniform1ivARB; - snprintf(symboln, sizeof(symboln), "%sUniform1iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform1ivARB) { - void ** procp = (void **) &disp->Uniform1ivARB; - snprintf(symboln, sizeof(symboln), "%sUniform1ivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform2fARB) { - void ** procp = (void **) &disp->Uniform2fARB; - snprintf(symboln, sizeof(symboln), "%sUniform2f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform2fARB) { - void ** procp = (void **) &disp->Uniform2fARB; - snprintf(symboln, sizeof(symboln), "%sUniform2fARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform2fvARB) { - void ** procp = (void **) &disp->Uniform2fvARB; - snprintf(symboln, sizeof(symboln), "%sUniform2fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform2fvARB) { - void ** procp = (void **) &disp->Uniform2fvARB; - snprintf(symboln, sizeof(symboln), "%sUniform2fvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform2iARB) { - void ** procp = (void **) &disp->Uniform2iARB; - snprintf(symboln, sizeof(symboln), "%sUniform2i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform2iARB) { - void ** procp = (void **) &disp->Uniform2iARB; - snprintf(symboln, sizeof(symboln), "%sUniform2iARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform2ivARB) { - void ** procp = (void **) &disp->Uniform2ivARB; - snprintf(symboln, sizeof(symboln), "%sUniform2iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform2ivARB) { - void ** procp = (void **) &disp->Uniform2ivARB; - snprintf(symboln, sizeof(symboln), "%sUniform2ivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform3fARB) { - void ** procp = (void **) &disp->Uniform3fARB; - snprintf(symboln, sizeof(symboln), "%sUniform3f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform3fARB) { - void ** procp = (void **) &disp->Uniform3fARB; - snprintf(symboln, sizeof(symboln), "%sUniform3fARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform3fvARB) { - void ** procp = (void **) &disp->Uniform3fvARB; - snprintf(symboln, sizeof(symboln), "%sUniform3fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform3fvARB) { - void ** procp = (void **) &disp->Uniform3fvARB; - snprintf(symboln, sizeof(symboln), "%sUniform3fvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform3iARB) { - void ** procp = (void **) &disp->Uniform3iARB; - snprintf(symboln, sizeof(symboln), "%sUniform3i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform3iARB) { - void ** procp = (void **) &disp->Uniform3iARB; - snprintf(symboln, sizeof(symboln), "%sUniform3iARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform3ivARB) { - void ** procp = (void **) &disp->Uniform3ivARB; - snprintf(symboln, sizeof(symboln), "%sUniform3iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform3ivARB) { - void ** procp = (void **) &disp->Uniform3ivARB; - snprintf(symboln, sizeof(symboln), "%sUniform3ivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform4fARB) { - void ** procp = (void **) &disp->Uniform4fARB; - snprintf(symboln, sizeof(symboln), "%sUniform4f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform4fARB) { - void ** procp = (void **) &disp->Uniform4fARB; - snprintf(symboln, sizeof(symboln), "%sUniform4fARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform4fvARB) { - void ** procp = (void **) &disp->Uniform4fvARB; - snprintf(symboln, sizeof(symboln), "%sUniform4fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform4fvARB) { - void ** procp = (void **) &disp->Uniform4fvARB; - snprintf(symboln, sizeof(symboln), "%sUniform4fvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform4iARB) { - void ** procp = (void **) &disp->Uniform4iARB; - snprintf(symboln, sizeof(symboln), "%sUniform4i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform4iARB) { - void ** procp = (void **) &disp->Uniform4iARB; - snprintf(symboln, sizeof(symboln), "%sUniform4iARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform4ivARB) { - void ** procp = (void **) &disp->Uniform4ivARB; - snprintf(symboln, sizeof(symboln), "%sUniform4iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform4ivARB) { - void ** procp = (void **) &disp->Uniform4ivARB; - snprintf(symboln, sizeof(symboln), "%sUniform4ivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->UniformMatrix2fvARB) { - void ** procp = (void **) &disp->UniformMatrix2fvARB; - snprintf(symboln, sizeof(symboln), "%sUniformMatrix2fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->UniformMatrix2fvARB) { - void ** procp = (void **) &disp->UniformMatrix2fvARB; - snprintf(symboln, sizeof(symboln), "%sUniformMatrix2fvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->UniformMatrix3fvARB) { - void ** procp = (void **) &disp->UniformMatrix3fvARB; - snprintf(symboln, sizeof(symboln), "%sUniformMatrix3fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->UniformMatrix3fvARB) { - void ** procp = (void **) &disp->UniformMatrix3fvARB; - snprintf(symboln, sizeof(symboln), "%sUniformMatrix3fvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->UniformMatrix4fvARB) { - void ** procp = (void **) &disp->UniformMatrix4fvARB; - snprintf(symboln, sizeof(symboln), "%sUniformMatrix4fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->UniformMatrix4fvARB) { - void ** procp = (void **) &disp->UniformMatrix4fvARB; - snprintf(symboln, sizeof(symboln), "%sUniformMatrix4fvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->UseProgramObjectARB) { - void ** procp = (void **) &disp->UseProgramObjectARB; - snprintf(symboln, sizeof(symboln), "%sUseProgram", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->UseProgramObjectARB) { - void ** procp = (void **) &disp->UseProgramObjectARB; - snprintf(symboln, sizeof(symboln), "%sUseProgramObjectARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ValidateProgramARB) { - void ** procp = (void **) &disp->ValidateProgramARB; - snprintf(symboln, sizeof(symboln), "%sValidateProgram", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ValidateProgramARB) { - void ** procp = (void **) &disp->ValidateProgramARB; - snprintf(symboln, sizeof(symboln), "%sValidateProgramARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindAttribLocationARB) { - void ** procp = (void **) &disp->BindAttribLocationARB; - snprintf(symboln, sizeof(symboln), "%sBindAttribLocation", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindAttribLocationARB) { - void ** procp = (void **) &disp->BindAttribLocationARB; - snprintf(symboln, sizeof(symboln), "%sBindAttribLocationARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetActiveAttribARB) { - void ** procp = (void **) &disp->GetActiveAttribARB; - snprintf(symboln, sizeof(symboln), "%sGetActiveAttrib", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetActiveAttribARB) { - void ** procp = (void **) &disp->GetActiveAttribARB; - snprintf(symboln, sizeof(symboln), "%sGetActiveAttribARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetAttribLocationARB) { - void ** procp = (void **) &disp->GetAttribLocationARB; - snprintf(symboln, sizeof(symboln), "%sGetAttribLocation", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetAttribLocationARB) { - void ** procp = (void **) &disp->GetAttribLocationARB; - snprintf(symboln, sizeof(symboln), "%sGetAttribLocationARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawBuffersARB) { - void ** procp = (void **) &disp->DrawBuffersARB; - snprintf(symboln, sizeof(symboln), "%sDrawBuffers", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawBuffersARB) { - void ** procp = (void **) &disp->DrawBuffersARB; - snprintf(symboln, sizeof(symboln), "%sDrawBuffersARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawBuffersARB) { - void ** procp = (void **) &disp->DrawBuffersARB; - snprintf(symboln, sizeof(symboln), "%sDrawBuffersATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawBuffersARB) { - void ** procp = (void **) &disp->DrawBuffersARB; - snprintf(symboln, sizeof(symboln), "%sDrawBuffersNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ClampColorARB) { - void ** procp = (void **) &disp->ClampColorARB; - snprintf(symboln, sizeof(symboln), "%sClampColorARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawArraysInstancedARB) { - void ** procp = (void **) &disp->DrawArraysInstancedARB; - snprintf(symboln, sizeof(symboln), "%sDrawArraysInstancedARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawArraysInstancedARB) { - void ** procp = (void **) &disp->DrawArraysInstancedARB; - snprintf(symboln, sizeof(symboln), "%sDrawArraysInstancedEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawArraysInstancedARB) { - void ** procp = (void **) &disp->DrawArraysInstancedARB; - snprintf(symboln, sizeof(symboln), "%sDrawArraysInstanced", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawElementsInstancedARB) { - void ** procp = (void **) &disp->DrawElementsInstancedARB; - snprintf(symboln, sizeof(symboln), "%sDrawElementsInstancedARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawElementsInstancedARB) { - void ** procp = (void **) &disp->DrawElementsInstancedARB; - snprintf(symboln, sizeof(symboln), "%sDrawElementsInstancedEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawElementsInstancedARB) { - void ** procp = (void **) &disp->DrawElementsInstancedARB; - snprintf(symboln, sizeof(symboln), "%sDrawElementsInstanced", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RenderbufferStorageMultisample) { - void ** procp = (void **) &disp->RenderbufferStorageMultisample; - snprintf(symboln, sizeof(symboln), "%sRenderbufferStorageMultisample", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RenderbufferStorageMultisample) { - void ** procp = (void **) &disp->RenderbufferStorageMultisample; - snprintf(symboln, sizeof(symboln), "%sRenderbufferStorageMultisampleEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FramebufferTextureARB) { - void ** procp = (void **) &disp->FramebufferTextureARB; - snprintf(symboln, sizeof(symboln), "%sFramebufferTextureARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FramebufferTextureFaceARB) { - void ** procp = (void **) &disp->FramebufferTextureFaceARB; - snprintf(symboln, sizeof(symboln), "%sFramebufferTextureFaceARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramParameteriARB) { - void ** procp = (void **) &disp->ProgramParameteriARB; - snprintf(symboln, sizeof(symboln), "%sProgramParameteriARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribDivisorARB) { - void ** procp = (void **) &disp->VertexAttribDivisorARB; - snprintf(symboln, sizeof(symboln), "%sVertexAttribDivisorARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FlushMappedBufferRange) { - void ** procp = (void **) &disp->FlushMappedBufferRange; - snprintf(symboln, sizeof(symboln), "%sFlushMappedBufferRange", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MapBufferRange) { - void ** procp = (void **) &disp->MapBufferRange; - snprintf(symboln, sizeof(symboln), "%sMapBufferRange", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexBufferARB) { - void ** procp = (void **) &disp->TexBufferARB; - snprintf(symboln, sizeof(symboln), "%sTexBufferARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindVertexArray) { - void ** procp = (void **) &disp->BindVertexArray; - snprintf(symboln, sizeof(symboln), "%sBindVertexArray", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenVertexArrays) { - void ** procp = (void **) &disp->GenVertexArrays; - snprintf(symboln, sizeof(symboln), "%sGenVertexArrays", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CopyBufferSubData) { - void ** procp = (void **) &disp->CopyBufferSubData; - snprintf(symboln, sizeof(symboln), "%sCopyBufferSubData", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ClientWaitSync) { - void ** procp = (void **) &disp->ClientWaitSync; - snprintf(symboln, sizeof(symboln), "%sClientWaitSync", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteSync) { - void ** procp = (void **) &disp->DeleteSync; - snprintf(symboln, sizeof(symboln), "%sDeleteSync", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FenceSync) { - void ** procp = (void **) &disp->FenceSync; - snprintf(symboln, sizeof(symboln), "%sFenceSync", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetInteger64v) { - void ** procp = (void **) &disp->GetInteger64v; - snprintf(symboln, sizeof(symboln), "%sGetInteger64v", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetSynciv) { - void ** procp = (void **) &disp->GetSynciv; - snprintf(symboln, sizeof(symboln), "%sGetSynciv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsSync) { - void ** procp = (void **) &disp->IsSync; - snprintf(symboln, sizeof(symboln), "%sIsSync", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WaitSync) { - void ** procp = (void **) &disp->WaitSync; - snprintf(symboln, sizeof(symboln), "%sWaitSync", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawElementsBaseVertex) { - void ** procp = (void **) &disp->DrawElementsBaseVertex; - snprintf(symboln, sizeof(symboln), "%sDrawElementsBaseVertex", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawElementsInstancedBaseVertex) { - void ** procp = (void **) &disp->DrawElementsInstancedBaseVertex; - snprintf(symboln, sizeof(symboln), "%sDrawElementsInstancedBaseVertex", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawRangeElementsBaseVertex) { - void ** procp = (void **) &disp->DrawRangeElementsBaseVertex; - snprintf(symboln, sizeof(symboln), "%sDrawRangeElementsBaseVertex", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiDrawElementsBaseVertex) { - void ** procp = (void **) &disp->MultiDrawElementsBaseVertex; - snprintf(symboln, sizeof(symboln), "%sMultiDrawElementsBaseVertex", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlendEquationSeparateiARB) { - void ** procp = (void **) &disp->BlendEquationSeparateiARB; - snprintf(symboln, sizeof(symboln), "%sBlendEquationSeparateiARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlendEquationSeparateiARB) { - void ** procp = (void **) &disp->BlendEquationSeparateiARB; - snprintf(symboln, sizeof(symboln), "%sBlendEquationSeparateIndexedAMD", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlendEquationiARB) { - void ** procp = (void **) &disp->BlendEquationiARB; - snprintf(symboln, sizeof(symboln), "%sBlendEquationiARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlendEquationiARB) { - void ** procp = (void **) &disp->BlendEquationiARB; - snprintf(symboln, sizeof(symboln), "%sBlendEquationIndexedAMD", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlendFuncSeparateiARB) { - void ** procp = (void **) &disp->BlendFuncSeparateiARB; - snprintf(symboln, sizeof(symboln), "%sBlendFuncSeparateiARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlendFuncSeparateiARB) { - void ** procp = (void **) &disp->BlendFuncSeparateiARB; - snprintf(symboln, sizeof(symboln), "%sBlendFuncSeparateIndexedAMD", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlendFunciARB) { - void ** procp = (void **) &disp->BlendFunciARB; - snprintf(symboln, sizeof(symboln), "%sBlendFunciARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlendFunciARB) { - void ** procp = (void **) &disp->BlendFunciARB; - snprintf(symboln, sizeof(symboln), "%sBlendFuncIndexedAMD", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindSampler) { - void ** procp = (void **) &disp->BindSampler; - snprintf(symboln, sizeof(symboln), "%sBindSampler", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteSamplers) { - void ** procp = (void **) &disp->DeleteSamplers; - snprintf(symboln, sizeof(symboln), "%sDeleteSamplers", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenSamplers) { - void ** procp = (void **) &disp->GenSamplers; - snprintf(symboln, sizeof(symboln), "%sGenSamplers", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetSamplerParameterIiv) { - void ** procp = (void **) &disp->GetSamplerParameterIiv; - snprintf(symboln, sizeof(symboln), "%sGetSamplerParameterIiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetSamplerParameterIuiv) { - void ** procp = (void **) &disp->GetSamplerParameterIuiv; - snprintf(symboln, sizeof(symboln), "%sGetSamplerParameterIuiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetSamplerParameterfv) { - void ** procp = (void **) &disp->GetSamplerParameterfv; - snprintf(symboln, sizeof(symboln), "%sGetSamplerParameterfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetSamplerParameteriv) { - void ** procp = (void **) &disp->GetSamplerParameteriv; - snprintf(symboln, sizeof(symboln), "%sGetSamplerParameteriv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsSampler) { - void ** procp = (void **) &disp->IsSampler; - snprintf(symboln, sizeof(symboln), "%sIsSampler", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SamplerParameterIiv) { - void ** procp = (void **) &disp->SamplerParameterIiv; - snprintf(symboln, sizeof(symboln), "%sSamplerParameterIiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SamplerParameterIuiv) { - void ** procp = (void **) &disp->SamplerParameterIuiv; - snprintf(symboln, sizeof(symboln), "%sSamplerParameterIuiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SamplerParameterf) { - void ** procp = (void **) &disp->SamplerParameterf; - snprintf(symboln, sizeof(symboln), "%sSamplerParameterf", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SamplerParameterfv) { - void ** procp = (void **) &disp->SamplerParameterfv; - snprintf(symboln, sizeof(symboln), "%sSamplerParameterfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SamplerParameteri) { - void ** procp = (void **) &disp->SamplerParameteri; - snprintf(symboln, sizeof(symboln), "%sSamplerParameteri", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SamplerParameteriv) { - void ** procp = (void **) &disp->SamplerParameteriv; - snprintf(symboln, sizeof(symboln), "%sSamplerParameteriv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorP3ui) { - void ** procp = (void **) &disp->ColorP3ui; - snprintf(symboln, sizeof(symboln), "%sColorP3ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorP3uiv) { - void ** procp = (void **) &disp->ColorP3uiv; - snprintf(symboln, sizeof(symboln), "%sColorP3uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorP4ui) { - void ** procp = (void **) &disp->ColorP4ui; - snprintf(symboln, sizeof(symboln), "%sColorP4ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorP4uiv) { - void ** procp = (void **) &disp->ColorP4uiv; - snprintf(symboln, sizeof(symboln), "%sColorP4uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoordP1ui) { - void ** procp = (void **) &disp->MultiTexCoordP1ui; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoordP1ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoordP1uiv) { - void ** procp = (void **) &disp->MultiTexCoordP1uiv; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoordP1uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoordP2ui) { - void ** procp = (void **) &disp->MultiTexCoordP2ui; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoordP2ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoordP2uiv) { - void ** procp = (void **) &disp->MultiTexCoordP2uiv; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoordP2uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoordP3ui) { - void ** procp = (void **) &disp->MultiTexCoordP3ui; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoordP3ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoordP3uiv) { - void ** procp = (void **) &disp->MultiTexCoordP3uiv; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoordP3uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoordP4ui) { - void ** procp = (void **) &disp->MultiTexCoordP4ui; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoordP4ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiTexCoordP4uiv) { - void ** procp = (void **) &disp->MultiTexCoordP4uiv; - snprintf(symboln, sizeof(symboln), "%sMultiTexCoordP4uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->NormalP3ui) { - void ** procp = (void **) &disp->NormalP3ui; - snprintf(symboln, sizeof(symboln), "%sNormalP3ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->NormalP3uiv) { - void ** procp = (void **) &disp->NormalP3uiv; - snprintf(symboln, sizeof(symboln), "%sNormalP3uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColorP3ui) { - void ** procp = (void **) &disp->SecondaryColorP3ui; - snprintf(symboln, sizeof(symboln), "%sSecondaryColorP3ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColorP3uiv) { - void ** procp = (void **) &disp->SecondaryColorP3uiv; - snprintf(symboln, sizeof(symboln), "%sSecondaryColorP3uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoordP1ui) { - void ** procp = (void **) &disp->TexCoordP1ui; - snprintf(symboln, sizeof(symboln), "%sTexCoordP1ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoordP1uiv) { - void ** procp = (void **) &disp->TexCoordP1uiv; - snprintf(symboln, sizeof(symboln), "%sTexCoordP1uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoordP2ui) { - void ** procp = (void **) &disp->TexCoordP2ui; - snprintf(symboln, sizeof(symboln), "%sTexCoordP2ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoordP2uiv) { - void ** procp = (void **) &disp->TexCoordP2uiv; - snprintf(symboln, sizeof(symboln), "%sTexCoordP2uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoordP3ui) { - void ** procp = (void **) &disp->TexCoordP3ui; - snprintf(symboln, sizeof(symboln), "%sTexCoordP3ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoordP3uiv) { - void ** procp = (void **) &disp->TexCoordP3uiv; - snprintf(symboln, sizeof(symboln), "%sTexCoordP3uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoordP4ui) { - void ** procp = (void **) &disp->TexCoordP4ui; - snprintf(symboln, sizeof(symboln), "%sTexCoordP4ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoordP4uiv) { - void ** procp = (void **) &disp->TexCoordP4uiv; - snprintf(symboln, sizeof(symboln), "%sTexCoordP4uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribP1ui) { - void ** procp = (void **) &disp->VertexAttribP1ui; - snprintf(symboln, sizeof(symboln), "%sVertexAttribP1ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribP1uiv) { - void ** procp = (void **) &disp->VertexAttribP1uiv; - snprintf(symboln, sizeof(symboln), "%sVertexAttribP1uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribP2ui) { - void ** procp = (void **) &disp->VertexAttribP2ui; - snprintf(symboln, sizeof(symboln), "%sVertexAttribP2ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribP2uiv) { - void ** procp = (void **) &disp->VertexAttribP2uiv; - snprintf(symboln, sizeof(symboln), "%sVertexAttribP2uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribP3ui) { - void ** procp = (void **) &disp->VertexAttribP3ui; - snprintf(symboln, sizeof(symboln), "%sVertexAttribP3ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribP3uiv) { - void ** procp = (void **) &disp->VertexAttribP3uiv; - snprintf(symboln, sizeof(symboln), "%sVertexAttribP3uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribP4ui) { - void ** procp = (void **) &disp->VertexAttribP4ui; - snprintf(symboln, sizeof(symboln), "%sVertexAttribP4ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribP4uiv) { - void ** procp = (void **) &disp->VertexAttribP4uiv; - snprintf(symboln, sizeof(symboln), "%sVertexAttribP4uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexP2ui) { - void ** procp = (void **) &disp->VertexP2ui; - snprintf(symboln, sizeof(symboln), "%sVertexP2ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexP2uiv) { - void ** procp = (void **) &disp->VertexP2uiv; - snprintf(symboln, sizeof(symboln), "%sVertexP2uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexP3ui) { - void ** procp = (void **) &disp->VertexP3ui; - snprintf(symboln, sizeof(symboln), "%sVertexP3ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexP3uiv) { - void ** procp = (void **) &disp->VertexP3uiv; - snprintf(symboln, sizeof(symboln), "%sVertexP3uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexP4ui) { - void ** procp = (void **) &disp->VertexP4ui; - snprintf(symboln, sizeof(symboln), "%sVertexP4ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexP4uiv) { - void ** procp = (void **) &disp->VertexP4uiv; - snprintf(symboln, sizeof(symboln), "%sVertexP4uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindTransformFeedback) { - void ** procp = (void **) &disp->BindTransformFeedback; - snprintf(symboln, sizeof(symboln), "%sBindTransformFeedback", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteTransformFeedbacks) { - void ** procp = (void **) &disp->DeleteTransformFeedbacks; - snprintf(symboln, sizeof(symboln), "%sDeleteTransformFeedbacks", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DrawTransformFeedback) { - void ** procp = (void **) &disp->DrawTransformFeedback; - snprintf(symboln, sizeof(symboln), "%sDrawTransformFeedback", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenTransformFeedbacks) { - void ** procp = (void **) &disp->GenTransformFeedbacks; - snprintf(symboln, sizeof(symboln), "%sGenTransformFeedbacks", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsTransformFeedback) { - void ** procp = (void **) &disp->IsTransformFeedback; - snprintf(symboln, sizeof(symboln), "%sIsTransformFeedback", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PauseTransformFeedback) { - void ** procp = (void **) &disp->PauseTransformFeedback; - snprintf(symboln, sizeof(symboln), "%sPauseTransformFeedback", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ResumeTransformFeedback) { - void ** procp = (void **) &disp->ResumeTransformFeedback; - snprintf(symboln, sizeof(symboln), "%sResumeTransformFeedback", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ClearDepthf) { - void ** procp = (void **) &disp->ClearDepthf; - snprintf(symboln, sizeof(symboln), "%sClearDepthf", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DepthRangef) { - void ** procp = (void **) &disp->DepthRangef; - snprintf(symboln, sizeof(symboln), "%sDepthRangef", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetShaderPrecisionFormat) { - void ** procp = (void **) &disp->GetShaderPrecisionFormat; - snprintf(symboln, sizeof(symboln), "%sGetShaderPrecisionFormat", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ReleaseShaderCompiler) { - void ** procp = (void **) &disp->ReleaseShaderCompiler; - snprintf(symboln, sizeof(symboln), "%sReleaseShaderCompiler", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ShaderBinary) { - void ** procp = (void **) &disp->ShaderBinary; - snprintf(symboln, sizeof(symboln), "%sShaderBinary", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetGraphicsResetStatusARB) { - void ** procp = (void **) &disp->GetGraphicsResetStatusARB; - snprintf(symboln, sizeof(symboln), "%sGetGraphicsResetStatusARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetnColorTableARB) { - void ** procp = (void **) &disp->GetnColorTableARB; - snprintf(symboln, sizeof(symboln), "%sGetnColorTableARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetnCompressedTexImageARB) { - void ** procp = (void **) &disp->GetnCompressedTexImageARB; - snprintf(symboln, sizeof(symboln), "%sGetnCompressedTexImageARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetnConvolutionFilterARB) { - void ** procp = (void **) &disp->GetnConvolutionFilterARB; - snprintf(symboln, sizeof(symboln), "%sGetnConvolutionFilterARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetnHistogramARB) { - void ** procp = (void **) &disp->GetnHistogramARB; - snprintf(symboln, sizeof(symboln), "%sGetnHistogramARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetnMapdvARB) { - void ** procp = (void **) &disp->GetnMapdvARB; - snprintf(symboln, sizeof(symboln), "%sGetnMapdvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetnMapfvARB) { - void ** procp = (void **) &disp->GetnMapfvARB; - snprintf(symboln, sizeof(symboln), "%sGetnMapfvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetnMapivARB) { - void ** procp = (void **) &disp->GetnMapivARB; - snprintf(symboln, sizeof(symboln), "%sGetnMapivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetnMinmaxARB) { - void ** procp = (void **) &disp->GetnMinmaxARB; - snprintf(symboln, sizeof(symboln), "%sGetnMinmaxARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetnPixelMapfvARB) { - void ** procp = (void **) &disp->GetnPixelMapfvARB; - snprintf(symboln, sizeof(symboln), "%sGetnPixelMapfvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetnPixelMapuivARB) { - void ** procp = (void **) &disp->GetnPixelMapuivARB; - snprintf(symboln, sizeof(symboln), "%sGetnPixelMapuivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetnPixelMapusvARB) { - void ** procp = (void **) &disp->GetnPixelMapusvARB; - snprintf(symboln, sizeof(symboln), "%sGetnPixelMapusvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetnPolygonStippleARB) { - void ** procp = (void **) &disp->GetnPolygonStippleARB; - snprintf(symboln, sizeof(symboln), "%sGetnPolygonStippleARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetnSeparableFilterARB) { - void ** procp = (void **) &disp->GetnSeparableFilterARB; - snprintf(symboln, sizeof(symboln), "%sGetnSeparableFilterARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetnTexImageARB) { - void ** procp = (void **) &disp->GetnTexImageARB; - snprintf(symboln, sizeof(symboln), "%sGetnTexImageARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetnUniformdvARB) { - void ** procp = (void **) &disp->GetnUniformdvARB; - snprintf(symboln, sizeof(symboln), "%sGetnUniformdvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetnUniformfvARB) { - void ** procp = (void **) &disp->GetnUniformfvARB; - snprintf(symboln, sizeof(symboln), "%sGetnUniformfvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetnUniformivARB) { - void ** procp = (void **) &disp->GetnUniformivARB; - snprintf(symboln, sizeof(symboln), "%sGetnUniformivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetnUniformuivARB) { - void ** procp = (void **) &disp->GetnUniformuivARB; - snprintf(symboln, sizeof(symboln), "%sGetnUniformuivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ReadnPixelsARB) { - void ** procp = (void **) &disp->ReadnPixelsARB; - snprintf(symboln, sizeof(symboln), "%sReadnPixelsARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexStorage1D) { - void ** procp = (void **) &disp->TexStorage1D; - snprintf(symboln, sizeof(symboln), "%sTexStorage1D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexStorage2D) { - void ** procp = (void **) &disp->TexStorage2D; - snprintf(symboln, sizeof(symboln), "%sTexStorage2D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexStorage3D) { - void ** procp = (void **) &disp->TexStorage3D; - snprintf(symboln, sizeof(symboln), "%sTexStorage3D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TextureStorage1DEXT) { - void ** procp = (void **) &disp->TextureStorage1DEXT; - snprintf(symboln, sizeof(symboln), "%sTextureStorage1DEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TextureStorage2DEXT) { - void ** procp = (void **) &disp->TextureStorage2DEXT; - snprintf(symboln, sizeof(symboln), "%sTextureStorage2DEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TextureStorage3DEXT) { - void ** procp = (void **) &disp->TextureStorage3DEXT; - snprintf(symboln, sizeof(symboln), "%sTextureStorage3DEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PolygonOffsetEXT) { - void ** procp = (void **) &disp->PolygonOffsetEXT; - snprintf(symboln, sizeof(symboln), "%sPolygonOffsetEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetPixelTexGenParameterfvSGIS) { - void ** procp = (void **) &disp->GetPixelTexGenParameterfvSGIS; - snprintf(symboln, sizeof(symboln), "%sGetPixelTexGenParameterfvSGIS", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetPixelTexGenParameterivSGIS) { - void ** procp = (void **) &disp->GetPixelTexGenParameterivSGIS; - snprintf(symboln, sizeof(symboln), "%sGetPixelTexGenParameterivSGIS", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PixelTexGenParameterfSGIS) { - void ** procp = (void **) &disp->PixelTexGenParameterfSGIS; - snprintf(symboln, sizeof(symboln), "%sPixelTexGenParameterfSGIS", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PixelTexGenParameterfvSGIS) { - void ** procp = (void **) &disp->PixelTexGenParameterfvSGIS; - snprintf(symboln, sizeof(symboln), "%sPixelTexGenParameterfvSGIS", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PixelTexGenParameteriSGIS) { - void ** procp = (void **) &disp->PixelTexGenParameteriSGIS; - snprintf(symboln, sizeof(symboln), "%sPixelTexGenParameteriSGIS", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PixelTexGenParameterivSGIS) { - void ** procp = (void **) &disp->PixelTexGenParameterivSGIS; - snprintf(symboln, sizeof(symboln), "%sPixelTexGenParameterivSGIS", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SampleMaskSGIS) { - void ** procp = (void **) &disp->SampleMaskSGIS; - snprintf(symboln, sizeof(symboln), "%sSampleMaskSGIS", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SampleMaskSGIS) { - void ** procp = (void **) &disp->SampleMaskSGIS; - snprintf(symboln, sizeof(symboln), "%sSampleMaskEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SamplePatternSGIS) { - void ** procp = (void **) &disp->SamplePatternSGIS; - snprintf(symboln, sizeof(symboln), "%sSamplePatternSGIS", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SamplePatternSGIS) { - void ** procp = (void **) &disp->SamplePatternSGIS; - snprintf(symboln, sizeof(symboln), "%sSamplePatternEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorPointerEXT) { - void ** procp = (void **) &disp->ColorPointerEXT; - snprintf(symboln, sizeof(symboln), "%sColorPointerEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EdgeFlagPointerEXT) { - void ** procp = (void **) &disp->EdgeFlagPointerEXT; - snprintf(symboln, sizeof(symboln), "%sEdgeFlagPointerEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IndexPointerEXT) { - void ** procp = (void **) &disp->IndexPointerEXT; - snprintf(symboln, sizeof(symboln), "%sIndexPointerEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->NormalPointerEXT) { - void ** procp = (void **) &disp->NormalPointerEXT; - snprintf(symboln, sizeof(symboln), "%sNormalPointerEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexCoordPointerEXT) { - void ** procp = (void **) &disp->TexCoordPointerEXT; - snprintf(symboln, sizeof(symboln), "%sTexCoordPointerEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexPointerEXT) { - void ** procp = (void **) &disp->VertexPointerEXT; - snprintf(symboln, sizeof(symboln), "%sVertexPointerEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PointParameterfEXT) { - void ** procp = (void **) &disp->PointParameterfEXT; - snprintf(symboln, sizeof(symboln), "%sPointParameterf", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PointParameterfEXT) { - void ** procp = (void **) &disp->PointParameterfEXT; - snprintf(symboln, sizeof(symboln), "%sPointParameterfARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PointParameterfEXT) { - void ** procp = (void **) &disp->PointParameterfEXT; - snprintf(symboln, sizeof(symboln), "%sPointParameterfEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PointParameterfEXT) { - void ** procp = (void **) &disp->PointParameterfEXT; - snprintf(symboln, sizeof(symboln), "%sPointParameterfSGIS", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PointParameterfvEXT) { - void ** procp = (void **) &disp->PointParameterfvEXT; - snprintf(symboln, sizeof(symboln), "%sPointParameterfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PointParameterfvEXT) { - void ** procp = (void **) &disp->PointParameterfvEXT; - snprintf(symboln, sizeof(symboln), "%sPointParameterfvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PointParameterfvEXT) { - void ** procp = (void **) &disp->PointParameterfvEXT; - snprintf(symboln, sizeof(symboln), "%sPointParameterfvEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PointParameterfvEXT) { - void ** procp = (void **) &disp->PointParameterfvEXT; - snprintf(symboln, sizeof(symboln), "%sPointParameterfvSGIS", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->LockArraysEXT) { - void ** procp = (void **) &disp->LockArraysEXT; - snprintf(symboln, sizeof(symboln), "%sLockArraysEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->UnlockArraysEXT) { - void ** procp = (void **) &disp->UnlockArraysEXT; - snprintf(symboln, sizeof(symboln), "%sUnlockArraysEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3bEXT) { - void ** procp = (void **) &disp->SecondaryColor3bEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3b", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3bEXT) { - void ** procp = (void **) &disp->SecondaryColor3bEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3bEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3bvEXT) { - void ** procp = (void **) &disp->SecondaryColor3bvEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3bv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3bvEXT) { - void ** procp = (void **) &disp->SecondaryColor3bvEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3bvEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3dEXT) { - void ** procp = (void **) &disp->SecondaryColor3dEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3dEXT) { - void ** procp = (void **) &disp->SecondaryColor3dEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3dEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3dvEXT) { - void ** procp = (void **) &disp->SecondaryColor3dvEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3dvEXT) { - void ** procp = (void **) &disp->SecondaryColor3dvEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3dvEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3fEXT) { - void ** procp = (void **) &disp->SecondaryColor3fEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3fEXT) { - void ** procp = (void **) &disp->SecondaryColor3fEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3fEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3fvEXT) { - void ** procp = (void **) &disp->SecondaryColor3fvEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3fvEXT) { - void ** procp = (void **) &disp->SecondaryColor3fvEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3fvEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3iEXT) { - void ** procp = (void **) &disp->SecondaryColor3iEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3iEXT) { - void ** procp = (void **) &disp->SecondaryColor3iEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3iEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3ivEXT) { - void ** procp = (void **) &disp->SecondaryColor3ivEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3ivEXT) { - void ** procp = (void **) &disp->SecondaryColor3ivEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3sEXT) { - void ** procp = (void **) &disp->SecondaryColor3sEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3sEXT) { - void ** procp = (void **) &disp->SecondaryColor3sEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3sEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3svEXT) { - void ** procp = (void **) &disp->SecondaryColor3svEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3svEXT) { - void ** procp = (void **) &disp->SecondaryColor3svEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3svEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3ubEXT) { - void ** procp = (void **) &disp->SecondaryColor3ubEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ub", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3ubEXT) { - void ** procp = (void **) &disp->SecondaryColor3ubEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ubEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3ubvEXT) { - void ** procp = (void **) &disp->SecondaryColor3ubvEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ubv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3ubvEXT) { - void ** procp = (void **) &disp->SecondaryColor3ubvEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ubvEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3uiEXT) { - void ** procp = (void **) &disp->SecondaryColor3uiEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3uiEXT) { - void ** procp = (void **) &disp->SecondaryColor3uiEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3uiEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3uivEXT) { - void ** procp = (void **) &disp->SecondaryColor3uivEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3uivEXT) { - void ** procp = (void **) &disp->SecondaryColor3uivEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3uivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3usEXT) { - void ** procp = (void **) &disp->SecondaryColor3usEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3us", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3usEXT) { - void ** procp = (void **) &disp->SecondaryColor3usEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3usEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3usvEXT) { - void ** procp = (void **) &disp->SecondaryColor3usvEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3usv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColor3usvEXT) { - void ** procp = (void **) &disp->SecondaryColor3usvEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColor3usvEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColorPointerEXT) { - void ** procp = (void **) &disp->SecondaryColorPointerEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColorPointer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SecondaryColorPointerEXT) { - void ** procp = (void **) &disp->SecondaryColorPointerEXT; - snprintf(symboln, sizeof(symboln), "%sSecondaryColorPointerEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiDrawArraysEXT) { - void ** procp = (void **) &disp->MultiDrawArraysEXT; - snprintf(symboln, sizeof(symboln), "%sMultiDrawArrays", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiDrawArraysEXT) { - void ** procp = (void **) &disp->MultiDrawArraysEXT; - snprintf(symboln, sizeof(symboln), "%sMultiDrawArraysEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiDrawElementsEXT) { - void ** procp = (void **) &disp->MultiDrawElementsEXT; - snprintf(symboln, sizeof(symboln), "%sMultiDrawElements", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiDrawElementsEXT) { - void ** procp = (void **) &disp->MultiDrawElementsEXT; - snprintf(symboln, sizeof(symboln), "%sMultiDrawElementsEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FogCoordPointerEXT) { - void ** procp = (void **) &disp->FogCoordPointerEXT; - snprintf(symboln, sizeof(symboln), "%sFogCoordPointer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FogCoordPointerEXT) { - void ** procp = (void **) &disp->FogCoordPointerEXT; - snprintf(symboln, sizeof(symboln), "%sFogCoordPointerEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FogCoorddEXT) { - void ** procp = (void **) &disp->FogCoorddEXT; - snprintf(symboln, sizeof(symboln), "%sFogCoordd", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FogCoorddEXT) { - void ** procp = (void **) &disp->FogCoorddEXT; - snprintf(symboln, sizeof(symboln), "%sFogCoorddEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FogCoorddvEXT) { - void ** procp = (void **) &disp->FogCoorddvEXT; - snprintf(symboln, sizeof(symboln), "%sFogCoorddv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FogCoorddvEXT) { - void ** procp = (void **) &disp->FogCoorddvEXT; - snprintf(symboln, sizeof(symboln), "%sFogCoorddvEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FogCoordfEXT) { - void ** procp = (void **) &disp->FogCoordfEXT; - snprintf(symboln, sizeof(symboln), "%sFogCoordf", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FogCoordfEXT) { - void ** procp = (void **) &disp->FogCoordfEXT; - snprintf(symboln, sizeof(symboln), "%sFogCoordfEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FogCoordfvEXT) { - void ** procp = (void **) &disp->FogCoordfvEXT; - snprintf(symboln, sizeof(symboln), "%sFogCoordfv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FogCoordfvEXT) { - void ** procp = (void **) &disp->FogCoordfvEXT; - snprintf(symboln, sizeof(symboln), "%sFogCoordfvEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PixelTexGenSGIX) { - void ** procp = (void **) &disp->PixelTexGenSGIX; - snprintf(symboln, sizeof(symboln), "%sPixelTexGenSGIX", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlendFuncSeparateEXT) { - void ** procp = (void **) &disp->BlendFuncSeparateEXT; - snprintf(symboln, sizeof(symboln), "%sBlendFuncSeparate", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlendFuncSeparateEXT) { - void ** procp = (void **) &disp->BlendFuncSeparateEXT; - snprintf(symboln, sizeof(symboln), "%sBlendFuncSeparateEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlendFuncSeparateEXT) { - void ** procp = (void **) &disp->BlendFuncSeparateEXT; - snprintf(symboln, sizeof(symboln), "%sBlendFuncSeparateINGR", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FlushVertexArrayRangeNV) { - void ** procp = (void **) &disp->FlushVertexArrayRangeNV; - snprintf(symboln, sizeof(symboln), "%sFlushVertexArrayRangeNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexArrayRangeNV) { - void ** procp = (void **) &disp->VertexArrayRangeNV; - snprintf(symboln, sizeof(symboln), "%sVertexArrayRangeNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CombinerInputNV) { - void ** procp = (void **) &disp->CombinerInputNV; - snprintf(symboln, sizeof(symboln), "%sCombinerInputNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CombinerOutputNV) { - void ** procp = (void **) &disp->CombinerOutputNV; - snprintf(symboln, sizeof(symboln), "%sCombinerOutputNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CombinerParameterfNV) { - void ** procp = (void **) &disp->CombinerParameterfNV; - snprintf(symboln, sizeof(symboln), "%sCombinerParameterfNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CombinerParameterfvNV) { - void ** procp = (void **) &disp->CombinerParameterfvNV; - snprintf(symboln, sizeof(symboln), "%sCombinerParameterfvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CombinerParameteriNV) { - void ** procp = (void **) &disp->CombinerParameteriNV; - snprintf(symboln, sizeof(symboln), "%sCombinerParameteriNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CombinerParameterivNV) { - void ** procp = (void **) &disp->CombinerParameterivNV; - snprintf(symboln, sizeof(symboln), "%sCombinerParameterivNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FinalCombinerInputNV) { - void ** procp = (void **) &disp->FinalCombinerInputNV; - snprintf(symboln, sizeof(symboln), "%sFinalCombinerInputNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetCombinerInputParameterfvNV) { - void ** procp = (void **) &disp->GetCombinerInputParameterfvNV; - snprintf(symboln, sizeof(symboln), "%sGetCombinerInputParameterfvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetCombinerInputParameterivNV) { - void ** procp = (void **) &disp->GetCombinerInputParameterivNV; - snprintf(symboln, sizeof(symboln), "%sGetCombinerInputParameterivNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetCombinerOutputParameterfvNV) { - void ** procp = (void **) &disp->GetCombinerOutputParameterfvNV; - snprintf(symboln, sizeof(symboln), "%sGetCombinerOutputParameterfvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetCombinerOutputParameterivNV) { - void ** procp = (void **) &disp->GetCombinerOutputParameterivNV; - snprintf(symboln, sizeof(symboln), "%sGetCombinerOutputParameterivNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetFinalCombinerInputParameterfvNV) { - void ** procp = (void **) &disp->GetFinalCombinerInputParameterfvNV; - snprintf(symboln, sizeof(symboln), "%sGetFinalCombinerInputParameterfvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetFinalCombinerInputParameterivNV) { - void ** procp = (void **) &disp->GetFinalCombinerInputParameterivNV; - snprintf(symboln, sizeof(symboln), "%sGetFinalCombinerInputParameterivNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ResizeBuffersMESA) { - void ** procp = (void **) &disp->ResizeBuffersMESA; - snprintf(symboln, sizeof(symboln), "%sResizeBuffersMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2dMESA) { - void ** procp = (void **) &disp->WindowPos2dMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2dMESA) { - void ** procp = (void **) &disp->WindowPos2dMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2dARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2dMESA) { - void ** procp = (void **) &disp->WindowPos2dMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2dMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2dvMESA) { - void ** procp = (void **) &disp->WindowPos2dvMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2dvMESA) { - void ** procp = (void **) &disp->WindowPos2dvMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2dvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2dvMESA) { - void ** procp = (void **) &disp->WindowPos2dvMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2dvMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2fMESA) { - void ** procp = (void **) &disp->WindowPos2fMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2fMESA) { - void ** procp = (void **) &disp->WindowPos2fMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2fARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2fMESA) { - void ** procp = (void **) &disp->WindowPos2fMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2fMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2fvMESA) { - void ** procp = (void **) &disp->WindowPos2fvMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2fvMESA) { - void ** procp = (void **) &disp->WindowPos2fvMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2fvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2fvMESA) { - void ** procp = (void **) &disp->WindowPos2fvMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2fvMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2iMESA) { - void ** procp = (void **) &disp->WindowPos2iMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2iMESA) { - void ** procp = (void **) &disp->WindowPos2iMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2iARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2iMESA) { - void ** procp = (void **) &disp->WindowPos2iMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2iMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2ivMESA) { - void ** procp = (void **) &disp->WindowPos2ivMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2ivMESA) { - void ** procp = (void **) &disp->WindowPos2ivMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2ivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2ivMESA) { - void ** procp = (void **) &disp->WindowPos2ivMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2ivMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2sMESA) { - void ** procp = (void **) &disp->WindowPos2sMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2sMESA) { - void ** procp = (void **) &disp->WindowPos2sMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2sARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2sMESA) { - void ** procp = (void **) &disp->WindowPos2sMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2sMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2svMESA) { - void ** procp = (void **) &disp->WindowPos2svMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2svMESA) { - void ** procp = (void **) &disp->WindowPos2svMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2svARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos2svMESA) { - void ** procp = (void **) &disp->WindowPos2svMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos2svMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3dMESA) { - void ** procp = (void **) &disp->WindowPos3dMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3d", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3dMESA) { - void ** procp = (void **) &disp->WindowPos3dMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3dARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3dMESA) { - void ** procp = (void **) &disp->WindowPos3dMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3dMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3dvMESA) { - void ** procp = (void **) &disp->WindowPos3dvMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3dv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3dvMESA) { - void ** procp = (void **) &disp->WindowPos3dvMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3dvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3dvMESA) { - void ** procp = (void **) &disp->WindowPos3dvMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3dvMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3fMESA) { - void ** procp = (void **) &disp->WindowPos3fMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3f", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3fMESA) { - void ** procp = (void **) &disp->WindowPos3fMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3fARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3fMESA) { - void ** procp = (void **) &disp->WindowPos3fMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3fMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3fvMESA) { - void ** procp = (void **) &disp->WindowPos3fvMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3fv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3fvMESA) { - void ** procp = (void **) &disp->WindowPos3fvMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3fvARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3fvMESA) { - void ** procp = (void **) &disp->WindowPos3fvMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3fvMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3iMESA) { - void ** procp = (void **) &disp->WindowPos3iMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3iMESA) { - void ** procp = (void **) &disp->WindowPos3iMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3iARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3iMESA) { - void ** procp = (void **) &disp->WindowPos3iMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3iMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3ivMESA) { - void ** procp = (void **) &disp->WindowPos3ivMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3ivMESA) { - void ** procp = (void **) &disp->WindowPos3ivMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3ivARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3ivMESA) { - void ** procp = (void **) &disp->WindowPos3ivMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3ivMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3sMESA) { - void ** procp = (void **) &disp->WindowPos3sMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3s", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3sMESA) { - void ** procp = (void **) &disp->WindowPos3sMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3sARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3sMESA) { - void ** procp = (void **) &disp->WindowPos3sMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3sMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3svMESA) { - void ** procp = (void **) &disp->WindowPos3svMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3svMESA) { - void ** procp = (void **) &disp->WindowPos3svMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3svARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos3svMESA) { - void ** procp = (void **) &disp->WindowPos3svMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos3svMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos4dMESA) { - void ** procp = (void **) &disp->WindowPos4dMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos4dMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos4dvMESA) { - void ** procp = (void **) &disp->WindowPos4dvMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos4dvMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos4fMESA) { - void ** procp = (void **) &disp->WindowPos4fMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos4fMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos4fvMESA) { - void ** procp = (void **) &disp->WindowPos4fvMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos4fvMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos4iMESA) { - void ** procp = (void **) &disp->WindowPos4iMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos4iMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos4ivMESA) { - void ** procp = (void **) &disp->WindowPos4ivMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos4ivMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos4sMESA) { - void ** procp = (void **) &disp->WindowPos4sMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos4sMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->WindowPos4svMESA) { - void ** procp = (void **) &disp->WindowPos4svMESA; - snprintf(symboln, sizeof(symboln), "%sWindowPos4svMESA", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiModeDrawArraysIBM) { - void ** procp = (void **) &disp->MultiModeDrawArraysIBM; - snprintf(symboln, sizeof(symboln), "%sMultiModeDrawArraysIBM", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->MultiModeDrawElementsIBM) { - void ** procp = (void **) &disp->MultiModeDrawElementsIBM; - snprintf(symboln, sizeof(symboln), "%sMultiModeDrawElementsIBM", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteFencesNV) { - void ** procp = (void **) &disp->DeleteFencesNV; - snprintf(symboln, sizeof(symboln), "%sDeleteFencesNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FinishFenceNV) { - void ** procp = (void **) &disp->FinishFenceNV; - snprintf(symboln, sizeof(symboln), "%sFinishFenceNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenFencesNV) { - void ** procp = (void **) &disp->GenFencesNV; - snprintf(symboln, sizeof(symboln), "%sGenFencesNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetFenceivNV) { - void ** procp = (void **) &disp->GetFenceivNV; - snprintf(symboln, sizeof(symboln), "%sGetFenceivNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsFenceNV) { - void ** procp = (void **) &disp->IsFenceNV; - snprintf(symboln, sizeof(symboln), "%sIsFenceNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SetFenceNV) { - void ** procp = (void **) &disp->SetFenceNV; - snprintf(symboln, sizeof(symboln), "%sSetFenceNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TestFenceNV) { - void ** procp = (void **) &disp->TestFenceNV; - snprintf(symboln, sizeof(symboln), "%sTestFenceNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->AreProgramsResidentNV) { - void ** procp = (void **) &disp->AreProgramsResidentNV; - snprintf(symboln, sizeof(symboln), "%sAreProgramsResidentNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindProgramNV) { - void ** procp = (void **) &disp->BindProgramNV; - snprintf(symboln, sizeof(symboln), "%sBindProgramARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindProgramNV) { - void ** procp = (void **) &disp->BindProgramNV; - snprintf(symboln, sizeof(symboln), "%sBindProgramNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteProgramsNV) { - void ** procp = (void **) &disp->DeleteProgramsNV; - snprintf(symboln, sizeof(symboln), "%sDeleteProgramsARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteProgramsNV) { - void ** procp = (void **) &disp->DeleteProgramsNV; - snprintf(symboln, sizeof(symboln), "%sDeleteProgramsNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ExecuteProgramNV) { - void ** procp = (void **) &disp->ExecuteProgramNV; - snprintf(symboln, sizeof(symboln), "%sExecuteProgramNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenProgramsNV) { - void ** procp = (void **) &disp->GenProgramsNV; - snprintf(symboln, sizeof(symboln), "%sGenProgramsARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenProgramsNV) { - void ** procp = (void **) &disp->GenProgramsNV; - snprintf(symboln, sizeof(symboln), "%sGenProgramsNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetProgramParameterdvNV) { - void ** procp = (void **) &disp->GetProgramParameterdvNV; - snprintf(symboln, sizeof(symboln), "%sGetProgramParameterdvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetProgramParameterfvNV) { - void ** procp = (void **) &disp->GetProgramParameterfvNV; - snprintf(symboln, sizeof(symboln), "%sGetProgramParameterfvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetProgramStringNV) { - void ** procp = (void **) &disp->GetProgramStringNV; - snprintf(symboln, sizeof(symboln), "%sGetProgramStringNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetProgramivNV) { - void ** procp = (void **) &disp->GetProgramivNV; - snprintf(symboln, sizeof(symboln), "%sGetProgramivNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetTrackMatrixivNV) { - void ** procp = (void **) &disp->GetTrackMatrixivNV; - snprintf(symboln, sizeof(symboln), "%sGetTrackMatrixivNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetVertexAttribPointervNV) { - void ** procp = (void **) &disp->GetVertexAttribPointervNV; - snprintf(symboln, sizeof(symboln), "%sGetVertexAttribPointerv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetVertexAttribPointervNV) { - void ** procp = (void **) &disp->GetVertexAttribPointervNV; - snprintf(symboln, sizeof(symboln), "%sGetVertexAttribPointervARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetVertexAttribPointervNV) { - void ** procp = (void **) &disp->GetVertexAttribPointervNV; - snprintf(symboln, sizeof(symboln), "%sGetVertexAttribPointervNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetVertexAttribdvNV) { - void ** procp = (void **) &disp->GetVertexAttribdvNV; - snprintf(symboln, sizeof(symboln), "%sGetVertexAttribdvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetVertexAttribfvNV) { - void ** procp = (void **) &disp->GetVertexAttribfvNV; - snprintf(symboln, sizeof(symboln), "%sGetVertexAttribfvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetVertexAttribivNV) { - void ** procp = (void **) &disp->GetVertexAttribivNV; - snprintf(symboln, sizeof(symboln), "%sGetVertexAttribivNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsProgramNV) { - void ** procp = (void **) &disp->IsProgramNV; - snprintf(symboln, sizeof(symboln), "%sIsProgramARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsProgramNV) { - void ** procp = (void **) &disp->IsProgramNV; - snprintf(symboln, sizeof(symboln), "%sIsProgramNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->LoadProgramNV) { - void ** procp = (void **) &disp->LoadProgramNV; - snprintf(symboln, sizeof(symboln), "%sLoadProgramNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramParameters4dvNV) { - void ** procp = (void **) &disp->ProgramParameters4dvNV; - snprintf(symboln, sizeof(symboln), "%sProgramParameters4dvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramParameters4fvNV) { - void ** procp = (void **) &disp->ProgramParameters4fvNV; - snprintf(symboln, sizeof(symboln), "%sProgramParameters4fvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RequestResidentProgramsNV) { - void ** procp = (void **) &disp->RequestResidentProgramsNV; - snprintf(symboln, sizeof(symboln), "%sRequestResidentProgramsNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TrackMatrixNV) { - void ** procp = (void **) &disp->TrackMatrixNV; - snprintf(symboln, sizeof(symboln), "%sTrackMatrixNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib1dNV) { - void ** procp = (void **) &disp->VertexAttrib1dNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib1dNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib1dvNV) { - void ** procp = (void **) &disp->VertexAttrib1dvNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib1dvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib1fNV) { - void ** procp = (void **) &disp->VertexAttrib1fNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib1fNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib1fvNV) { - void ** procp = (void **) &disp->VertexAttrib1fvNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib1fvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib1sNV) { - void ** procp = (void **) &disp->VertexAttrib1sNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib1sNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib1svNV) { - void ** procp = (void **) &disp->VertexAttrib1svNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib1svNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib2dNV) { - void ** procp = (void **) &disp->VertexAttrib2dNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib2dNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib2dvNV) { - void ** procp = (void **) &disp->VertexAttrib2dvNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib2dvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib2fNV) { - void ** procp = (void **) &disp->VertexAttrib2fNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib2fNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib2fvNV) { - void ** procp = (void **) &disp->VertexAttrib2fvNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib2fvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib2sNV) { - void ** procp = (void **) &disp->VertexAttrib2sNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib2sNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib2svNV) { - void ** procp = (void **) &disp->VertexAttrib2svNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib2svNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib3dNV) { - void ** procp = (void **) &disp->VertexAttrib3dNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib3dNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib3dvNV) { - void ** procp = (void **) &disp->VertexAttrib3dvNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib3dvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib3fNV) { - void ** procp = (void **) &disp->VertexAttrib3fNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib3fNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib3fvNV) { - void ** procp = (void **) &disp->VertexAttrib3fvNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib3fvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib3sNV) { - void ** procp = (void **) &disp->VertexAttrib3sNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib3sNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib3svNV) { - void ** procp = (void **) &disp->VertexAttrib3svNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib3svNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4dNV) { - void ** procp = (void **) &disp->VertexAttrib4dNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4dNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4dvNV) { - void ** procp = (void **) &disp->VertexAttrib4dvNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4dvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4fNV) { - void ** procp = (void **) &disp->VertexAttrib4fNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4fNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4fvNV) { - void ** procp = (void **) &disp->VertexAttrib4fvNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4fvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4sNV) { - void ** procp = (void **) &disp->VertexAttrib4sNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4sNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4svNV) { - void ** procp = (void **) &disp->VertexAttrib4svNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4svNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4ubNV) { - void ** procp = (void **) &disp->VertexAttrib4ubNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4ubNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttrib4ubvNV) { - void ** procp = (void **) &disp->VertexAttrib4ubvNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttrib4ubvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribPointerNV) { - void ** procp = (void **) &disp->VertexAttribPointerNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttribPointerNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribs1dvNV) { - void ** procp = (void **) &disp->VertexAttribs1dvNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttribs1dvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribs1fvNV) { - void ** procp = (void **) &disp->VertexAttribs1fvNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttribs1fvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribs1svNV) { - void ** procp = (void **) &disp->VertexAttribs1svNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttribs1svNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribs2dvNV) { - void ** procp = (void **) &disp->VertexAttribs2dvNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttribs2dvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribs2fvNV) { - void ** procp = (void **) &disp->VertexAttribs2fvNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttribs2fvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribs2svNV) { - void ** procp = (void **) &disp->VertexAttribs2svNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttribs2svNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribs3dvNV) { - void ** procp = (void **) &disp->VertexAttribs3dvNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttribs3dvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribs3fvNV) { - void ** procp = (void **) &disp->VertexAttribs3fvNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttribs3fvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribs3svNV) { - void ** procp = (void **) &disp->VertexAttribs3svNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttribs3svNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribs4dvNV) { - void ** procp = (void **) &disp->VertexAttribs4dvNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttribs4dvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribs4fvNV) { - void ** procp = (void **) &disp->VertexAttribs4fvNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttribs4fvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribs4svNV) { - void ** procp = (void **) &disp->VertexAttribs4svNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttribs4svNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribs4ubvNV) { - void ** procp = (void **) &disp->VertexAttribs4ubvNV; - snprintf(symboln, sizeof(symboln), "%sVertexAttribs4ubvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetTexBumpParameterfvATI) { - void ** procp = (void **) &disp->GetTexBumpParameterfvATI; - snprintf(symboln, sizeof(symboln), "%sGetTexBumpParameterfvATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetTexBumpParameterivATI) { - void ** procp = (void **) &disp->GetTexBumpParameterivATI; - snprintf(symboln, sizeof(symboln), "%sGetTexBumpParameterivATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexBumpParameterfvATI) { - void ** procp = (void **) &disp->TexBumpParameterfvATI; - snprintf(symboln, sizeof(symboln), "%sTexBumpParameterfvATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexBumpParameterivATI) { - void ** procp = (void **) &disp->TexBumpParameterivATI; - snprintf(symboln, sizeof(symboln), "%sTexBumpParameterivATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->AlphaFragmentOp1ATI) { - void ** procp = (void **) &disp->AlphaFragmentOp1ATI; - snprintf(symboln, sizeof(symboln), "%sAlphaFragmentOp1ATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->AlphaFragmentOp2ATI) { - void ** procp = (void **) &disp->AlphaFragmentOp2ATI; - snprintf(symboln, sizeof(symboln), "%sAlphaFragmentOp2ATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->AlphaFragmentOp3ATI) { - void ** procp = (void **) &disp->AlphaFragmentOp3ATI; - snprintf(symboln, sizeof(symboln), "%sAlphaFragmentOp3ATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BeginFragmentShaderATI) { - void ** procp = (void **) &disp->BeginFragmentShaderATI; - snprintf(symboln, sizeof(symboln), "%sBeginFragmentShaderATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindFragmentShaderATI) { - void ** procp = (void **) &disp->BindFragmentShaderATI; - snprintf(symboln, sizeof(symboln), "%sBindFragmentShaderATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorFragmentOp1ATI) { - void ** procp = (void **) &disp->ColorFragmentOp1ATI; - snprintf(symboln, sizeof(symboln), "%sColorFragmentOp1ATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorFragmentOp2ATI) { - void ** procp = (void **) &disp->ColorFragmentOp2ATI; - snprintf(symboln, sizeof(symboln), "%sColorFragmentOp2ATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorFragmentOp3ATI) { - void ** procp = (void **) &disp->ColorFragmentOp3ATI; - snprintf(symboln, sizeof(symboln), "%sColorFragmentOp3ATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteFragmentShaderATI) { - void ** procp = (void **) &disp->DeleteFragmentShaderATI; - snprintf(symboln, sizeof(symboln), "%sDeleteFragmentShaderATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EndFragmentShaderATI) { - void ** procp = (void **) &disp->EndFragmentShaderATI; - snprintf(symboln, sizeof(symboln), "%sEndFragmentShaderATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenFragmentShadersATI) { - void ** procp = (void **) &disp->GenFragmentShadersATI; - snprintf(symboln, sizeof(symboln), "%sGenFragmentShadersATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PassTexCoordATI) { - void ** procp = (void **) &disp->PassTexCoordATI; - snprintf(symboln, sizeof(symboln), "%sPassTexCoordATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SampleMapATI) { - void ** procp = (void **) &disp->SampleMapATI; - snprintf(symboln, sizeof(symboln), "%sSampleMapATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->SetFragmentShaderConstantATI) { - void ** procp = (void **) &disp->SetFragmentShaderConstantATI; - snprintf(symboln, sizeof(symboln), "%sSetFragmentShaderConstantATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PointParameteriNV) { - void ** procp = (void **) &disp->PointParameteriNV; - snprintf(symboln, sizeof(symboln), "%sPointParameteri", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PointParameteriNV) { - void ** procp = (void **) &disp->PointParameteriNV; - snprintf(symboln, sizeof(symboln), "%sPointParameteriNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PointParameterivNV) { - void ** procp = (void **) &disp->PointParameterivNV; - snprintf(symboln, sizeof(symboln), "%sPointParameteriv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PointParameterivNV) { - void ** procp = (void **) &disp->PointParameterivNV; - snprintf(symboln, sizeof(symboln), "%sPointParameterivNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ActiveStencilFaceEXT) { - void ** procp = (void **) &disp->ActiveStencilFaceEXT; - snprintf(symboln, sizeof(symboln), "%sActiveStencilFaceEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindVertexArrayAPPLE) { - void ** procp = (void **) &disp->BindVertexArrayAPPLE; - snprintf(symboln, sizeof(symboln), "%sBindVertexArrayAPPLE", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteVertexArraysAPPLE) { - void ** procp = (void **) &disp->DeleteVertexArraysAPPLE; - snprintf(symboln, sizeof(symboln), "%sDeleteVertexArrays", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteVertexArraysAPPLE) { - void ** procp = (void **) &disp->DeleteVertexArraysAPPLE; - snprintf(symboln, sizeof(symboln), "%sDeleteVertexArraysAPPLE", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenVertexArraysAPPLE) { - void ** procp = (void **) &disp->GenVertexArraysAPPLE; - snprintf(symboln, sizeof(symboln), "%sGenVertexArraysAPPLE", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsVertexArrayAPPLE) { - void ** procp = (void **) &disp->IsVertexArrayAPPLE; - snprintf(symboln, sizeof(symboln), "%sIsVertexArray", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsVertexArrayAPPLE) { - void ** procp = (void **) &disp->IsVertexArrayAPPLE; - snprintf(symboln, sizeof(symboln), "%sIsVertexArrayAPPLE", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetProgramNamedParameterdvNV) { - void ** procp = (void **) &disp->GetProgramNamedParameterdvNV; - snprintf(symboln, sizeof(symboln), "%sGetProgramNamedParameterdvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetProgramNamedParameterfvNV) { - void ** procp = (void **) &disp->GetProgramNamedParameterfvNV; - snprintf(symboln, sizeof(symboln), "%sGetProgramNamedParameterfvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramNamedParameter4dNV) { - void ** procp = (void **) &disp->ProgramNamedParameter4dNV; - snprintf(symboln, sizeof(symboln), "%sProgramNamedParameter4dNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramNamedParameter4dvNV) { - void ** procp = (void **) &disp->ProgramNamedParameter4dvNV; - snprintf(symboln, sizeof(symboln), "%sProgramNamedParameter4dvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramNamedParameter4fNV) { - void ** procp = (void **) &disp->ProgramNamedParameter4fNV; - snprintf(symboln, sizeof(symboln), "%sProgramNamedParameter4fNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramNamedParameter4fvNV) { - void ** procp = (void **) &disp->ProgramNamedParameter4fvNV; - snprintf(symboln, sizeof(symboln), "%sProgramNamedParameter4fvNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PrimitiveRestartIndexNV) { - void ** procp = (void **) &disp->PrimitiveRestartIndexNV; - snprintf(symboln, sizeof(symboln), "%sPrimitiveRestartIndexNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PrimitiveRestartIndexNV) { - void ** procp = (void **) &disp->PrimitiveRestartIndexNV; - snprintf(symboln, sizeof(symboln), "%sPrimitiveRestartIndex", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->PrimitiveRestartNV) { - void ** procp = (void **) &disp->PrimitiveRestartNV; - snprintf(symboln, sizeof(symboln), "%sPrimitiveRestartNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DepthBoundsEXT) { - void ** procp = (void **) &disp->DepthBoundsEXT; - snprintf(symboln, sizeof(symboln), "%sDepthBoundsEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlendEquationSeparateEXT) { - void ** procp = (void **) &disp->BlendEquationSeparateEXT; - snprintf(symboln, sizeof(symboln), "%sBlendEquationSeparate", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlendEquationSeparateEXT) { - void ** procp = (void **) &disp->BlendEquationSeparateEXT; - snprintf(symboln, sizeof(symboln), "%sBlendEquationSeparateEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlendEquationSeparateEXT) { - void ** procp = (void **) &disp->BlendEquationSeparateEXT; - snprintf(symboln, sizeof(symboln), "%sBlendEquationSeparateATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindFramebufferEXT) { - void ** procp = (void **) &disp->BindFramebufferEXT; - snprintf(symboln, sizeof(symboln), "%sBindFramebuffer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindFramebufferEXT) { - void ** procp = (void **) &disp->BindFramebufferEXT; - snprintf(symboln, sizeof(symboln), "%sBindFramebufferEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindRenderbufferEXT) { - void ** procp = (void **) &disp->BindRenderbufferEXT; - snprintf(symboln, sizeof(symboln), "%sBindRenderbuffer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindRenderbufferEXT) { - void ** procp = (void **) &disp->BindRenderbufferEXT; - snprintf(symboln, sizeof(symboln), "%sBindRenderbufferEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CheckFramebufferStatusEXT) { - void ** procp = (void **) &disp->CheckFramebufferStatusEXT; - snprintf(symboln, sizeof(symboln), "%sCheckFramebufferStatus", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CheckFramebufferStatusEXT) { - void ** procp = (void **) &disp->CheckFramebufferStatusEXT; - snprintf(symboln, sizeof(symboln), "%sCheckFramebufferStatusEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteFramebuffersEXT) { - void ** procp = (void **) &disp->DeleteFramebuffersEXT; - snprintf(symboln, sizeof(symboln), "%sDeleteFramebuffers", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteFramebuffersEXT) { - void ** procp = (void **) &disp->DeleteFramebuffersEXT; - snprintf(symboln, sizeof(symboln), "%sDeleteFramebuffersEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteRenderbuffersEXT) { - void ** procp = (void **) &disp->DeleteRenderbuffersEXT; - snprintf(symboln, sizeof(symboln), "%sDeleteRenderbuffers", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DeleteRenderbuffersEXT) { - void ** procp = (void **) &disp->DeleteRenderbuffersEXT; - snprintf(symboln, sizeof(symboln), "%sDeleteRenderbuffersEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FramebufferRenderbufferEXT) { - void ** procp = (void **) &disp->FramebufferRenderbufferEXT; - snprintf(symboln, sizeof(symboln), "%sFramebufferRenderbuffer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FramebufferRenderbufferEXT) { - void ** procp = (void **) &disp->FramebufferRenderbufferEXT; - snprintf(symboln, sizeof(symboln), "%sFramebufferRenderbufferEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FramebufferTexture1DEXT) { - void ** procp = (void **) &disp->FramebufferTexture1DEXT; - snprintf(symboln, sizeof(symboln), "%sFramebufferTexture1D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FramebufferTexture1DEXT) { - void ** procp = (void **) &disp->FramebufferTexture1DEXT; - snprintf(symboln, sizeof(symboln), "%sFramebufferTexture1DEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FramebufferTexture2DEXT) { - void ** procp = (void **) &disp->FramebufferTexture2DEXT; - snprintf(symboln, sizeof(symboln), "%sFramebufferTexture2D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FramebufferTexture2DEXT) { - void ** procp = (void **) &disp->FramebufferTexture2DEXT; - snprintf(symboln, sizeof(symboln), "%sFramebufferTexture2DEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FramebufferTexture3DEXT) { - void ** procp = (void **) &disp->FramebufferTexture3DEXT; - snprintf(symboln, sizeof(symboln), "%sFramebufferTexture3D", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FramebufferTexture3DEXT) { - void ** procp = (void **) &disp->FramebufferTexture3DEXT; - snprintf(symboln, sizeof(symboln), "%sFramebufferTexture3DEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenFramebuffersEXT) { - void ** procp = (void **) &disp->GenFramebuffersEXT; - snprintf(symboln, sizeof(symboln), "%sGenFramebuffers", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenFramebuffersEXT) { - void ** procp = (void **) &disp->GenFramebuffersEXT; - snprintf(symboln, sizeof(symboln), "%sGenFramebuffersEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenRenderbuffersEXT) { - void ** procp = (void **) &disp->GenRenderbuffersEXT; - snprintf(symboln, sizeof(symboln), "%sGenRenderbuffers", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenRenderbuffersEXT) { - void ** procp = (void **) &disp->GenRenderbuffersEXT; - snprintf(symboln, sizeof(symboln), "%sGenRenderbuffersEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenerateMipmapEXT) { - void ** procp = (void **) &disp->GenerateMipmapEXT; - snprintf(symboln, sizeof(symboln), "%sGenerateMipmap", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GenerateMipmapEXT) { - void ** procp = (void **) &disp->GenerateMipmapEXT; - snprintf(symboln, sizeof(symboln), "%sGenerateMipmapEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetFramebufferAttachmentParameterivEXT) { - void ** procp = (void **) &disp->GetFramebufferAttachmentParameterivEXT; - snprintf(symboln, sizeof(symboln), "%sGetFramebufferAttachmentParameteriv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetFramebufferAttachmentParameterivEXT) { - void ** procp = (void **) &disp->GetFramebufferAttachmentParameterivEXT; - snprintf(symboln, sizeof(symboln), "%sGetFramebufferAttachmentParameterivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetRenderbufferParameterivEXT) { - void ** procp = (void **) &disp->GetRenderbufferParameterivEXT; - snprintf(symboln, sizeof(symboln), "%sGetRenderbufferParameteriv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetRenderbufferParameterivEXT) { - void ** procp = (void **) &disp->GetRenderbufferParameterivEXT; - snprintf(symboln, sizeof(symboln), "%sGetRenderbufferParameterivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsFramebufferEXT) { - void ** procp = (void **) &disp->IsFramebufferEXT; - snprintf(symboln, sizeof(symboln), "%sIsFramebuffer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsFramebufferEXT) { - void ** procp = (void **) &disp->IsFramebufferEXT; - snprintf(symboln, sizeof(symboln), "%sIsFramebufferEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsRenderbufferEXT) { - void ** procp = (void **) &disp->IsRenderbufferEXT; - snprintf(symboln, sizeof(symboln), "%sIsRenderbuffer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsRenderbufferEXT) { - void ** procp = (void **) &disp->IsRenderbufferEXT; - snprintf(symboln, sizeof(symboln), "%sIsRenderbufferEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RenderbufferStorageEXT) { - void ** procp = (void **) &disp->RenderbufferStorageEXT; - snprintf(symboln, sizeof(symboln), "%sRenderbufferStorage", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->RenderbufferStorageEXT) { - void ** procp = (void **) &disp->RenderbufferStorageEXT; - snprintf(symboln, sizeof(symboln), "%sRenderbufferStorageEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlitFramebufferEXT) { - void ** procp = (void **) &disp->BlitFramebufferEXT; - snprintf(symboln, sizeof(symboln), "%sBlitFramebuffer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BlitFramebufferEXT) { - void ** procp = (void **) &disp->BlitFramebufferEXT; - snprintf(symboln, sizeof(symboln), "%sBlitFramebufferEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BufferParameteriAPPLE) { - void ** procp = (void **) &disp->BufferParameteriAPPLE; - snprintf(symboln, sizeof(symboln), "%sBufferParameteriAPPLE", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FlushMappedBufferRangeAPPLE) { - void ** procp = (void **) &disp->FlushMappedBufferRangeAPPLE; - snprintf(symboln, sizeof(symboln), "%sFlushMappedBufferRangeAPPLE", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindFragDataLocationEXT) { - void ** procp = (void **) &disp->BindFragDataLocationEXT; - snprintf(symboln, sizeof(symboln), "%sBindFragDataLocationEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindFragDataLocationEXT) { - void ** procp = (void **) &disp->BindFragDataLocationEXT; - snprintf(symboln, sizeof(symboln), "%sBindFragDataLocation", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetFragDataLocationEXT) { - void ** procp = (void **) &disp->GetFragDataLocationEXT; - snprintf(symboln, sizeof(symboln), "%sGetFragDataLocationEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetFragDataLocationEXT) { - void ** procp = (void **) &disp->GetFragDataLocationEXT; - snprintf(symboln, sizeof(symboln), "%sGetFragDataLocation", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetUniformuivEXT) { - void ** procp = (void **) &disp->GetUniformuivEXT; - snprintf(symboln, sizeof(symboln), "%sGetUniformuivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetUniformuivEXT) { - void ** procp = (void **) &disp->GetUniformuivEXT; - snprintf(symboln, sizeof(symboln), "%sGetUniformuiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetVertexAttribIivEXT) { - void ** procp = (void **) &disp->GetVertexAttribIivEXT; - snprintf(symboln, sizeof(symboln), "%sGetVertexAttribIivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetVertexAttribIivEXT) { - void ** procp = (void **) &disp->GetVertexAttribIivEXT; - snprintf(symboln, sizeof(symboln), "%sGetVertexAttribIiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetVertexAttribIuivEXT) { - void ** procp = (void **) &disp->GetVertexAttribIuivEXT; - snprintf(symboln, sizeof(symboln), "%sGetVertexAttribIuivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetVertexAttribIuivEXT) { - void ** procp = (void **) &disp->GetVertexAttribIuivEXT; - snprintf(symboln, sizeof(symboln), "%sGetVertexAttribIuiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform1uiEXT) { - void ** procp = (void **) &disp->Uniform1uiEXT; - snprintf(symboln, sizeof(symboln), "%sUniform1uiEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform1uiEXT) { - void ** procp = (void **) &disp->Uniform1uiEXT; - snprintf(symboln, sizeof(symboln), "%sUniform1ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform1uivEXT) { - void ** procp = (void **) &disp->Uniform1uivEXT; - snprintf(symboln, sizeof(symboln), "%sUniform1uivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform1uivEXT) { - void ** procp = (void **) &disp->Uniform1uivEXT; - snprintf(symboln, sizeof(symboln), "%sUniform1uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform2uiEXT) { - void ** procp = (void **) &disp->Uniform2uiEXT; - snprintf(symboln, sizeof(symboln), "%sUniform2uiEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform2uiEXT) { - void ** procp = (void **) &disp->Uniform2uiEXT; - snprintf(symboln, sizeof(symboln), "%sUniform2ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform2uivEXT) { - void ** procp = (void **) &disp->Uniform2uivEXT; - snprintf(symboln, sizeof(symboln), "%sUniform2uivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform2uivEXT) { - void ** procp = (void **) &disp->Uniform2uivEXT; - snprintf(symboln, sizeof(symboln), "%sUniform2uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform3uiEXT) { - void ** procp = (void **) &disp->Uniform3uiEXT; - snprintf(symboln, sizeof(symboln), "%sUniform3uiEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform3uiEXT) { - void ** procp = (void **) &disp->Uniform3uiEXT; - snprintf(symboln, sizeof(symboln), "%sUniform3ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform3uivEXT) { - void ** procp = (void **) &disp->Uniform3uivEXT; - snprintf(symboln, sizeof(symboln), "%sUniform3uivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform3uivEXT) { - void ** procp = (void **) &disp->Uniform3uivEXT; - snprintf(symboln, sizeof(symboln), "%sUniform3uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform4uiEXT) { - void ** procp = (void **) &disp->Uniform4uiEXT; - snprintf(symboln, sizeof(symboln), "%sUniform4uiEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform4uiEXT) { - void ** procp = (void **) &disp->Uniform4uiEXT; - snprintf(symboln, sizeof(symboln), "%sUniform4ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform4uivEXT) { - void ** procp = (void **) &disp->Uniform4uivEXT; - snprintf(symboln, sizeof(symboln), "%sUniform4uivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->Uniform4uivEXT) { - void ** procp = (void **) &disp->Uniform4uivEXT; - snprintf(symboln, sizeof(symboln), "%sUniform4uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI1iEXT) { - void ** procp = (void **) &disp->VertexAttribI1iEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI1iEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI1iEXT) { - void ** procp = (void **) &disp->VertexAttribI1iEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI1i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI1ivEXT) { - void ** procp = (void **) &disp->VertexAttribI1ivEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI1ivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI1ivEXT) { - void ** procp = (void **) &disp->VertexAttribI1ivEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI1iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI1uiEXT) { - void ** procp = (void **) &disp->VertexAttribI1uiEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI1uiEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI1uiEXT) { - void ** procp = (void **) &disp->VertexAttribI1uiEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI1ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI1uivEXT) { - void ** procp = (void **) &disp->VertexAttribI1uivEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI1uivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI1uivEXT) { - void ** procp = (void **) &disp->VertexAttribI1uivEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI1uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI2iEXT) { - void ** procp = (void **) &disp->VertexAttribI2iEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI2iEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI2iEXT) { - void ** procp = (void **) &disp->VertexAttribI2iEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI2i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI2ivEXT) { - void ** procp = (void **) &disp->VertexAttribI2ivEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI2ivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI2ivEXT) { - void ** procp = (void **) &disp->VertexAttribI2ivEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI2iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI2uiEXT) { - void ** procp = (void **) &disp->VertexAttribI2uiEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI2uiEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI2uiEXT) { - void ** procp = (void **) &disp->VertexAttribI2uiEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI2ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI2uivEXT) { - void ** procp = (void **) &disp->VertexAttribI2uivEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI2uivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI2uivEXT) { - void ** procp = (void **) &disp->VertexAttribI2uivEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI2uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI3iEXT) { - void ** procp = (void **) &disp->VertexAttribI3iEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI3iEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI3iEXT) { - void ** procp = (void **) &disp->VertexAttribI3iEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI3i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI3ivEXT) { - void ** procp = (void **) &disp->VertexAttribI3ivEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI3ivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI3ivEXT) { - void ** procp = (void **) &disp->VertexAttribI3ivEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI3iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI3uiEXT) { - void ** procp = (void **) &disp->VertexAttribI3uiEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI3uiEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI3uiEXT) { - void ** procp = (void **) &disp->VertexAttribI3uiEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI3ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI3uivEXT) { - void ** procp = (void **) &disp->VertexAttribI3uivEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI3uivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI3uivEXT) { - void ** procp = (void **) &disp->VertexAttribI3uivEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI3uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI4bvEXT) { - void ** procp = (void **) &disp->VertexAttribI4bvEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI4bvEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI4bvEXT) { - void ** procp = (void **) &disp->VertexAttribI4bvEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI4bv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI4iEXT) { - void ** procp = (void **) &disp->VertexAttribI4iEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI4iEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI4iEXT) { - void ** procp = (void **) &disp->VertexAttribI4iEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI4i", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI4ivEXT) { - void ** procp = (void **) &disp->VertexAttribI4ivEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI4ivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI4ivEXT) { - void ** procp = (void **) &disp->VertexAttribI4ivEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI4iv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI4svEXT) { - void ** procp = (void **) &disp->VertexAttribI4svEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI4svEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI4svEXT) { - void ** procp = (void **) &disp->VertexAttribI4svEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI4sv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI4ubvEXT) { - void ** procp = (void **) &disp->VertexAttribI4ubvEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI4ubvEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI4ubvEXT) { - void ** procp = (void **) &disp->VertexAttribI4ubvEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI4ubv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI4uiEXT) { - void ** procp = (void **) &disp->VertexAttribI4uiEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI4uiEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI4uiEXT) { - void ** procp = (void **) &disp->VertexAttribI4uiEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI4ui", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI4uivEXT) { - void ** procp = (void **) &disp->VertexAttribI4uivEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI4uivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI4uivEXT) { - void ** procp = (void **) &disp->VertexAttribI4uivEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI4uiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI4usvEXT) { - void ** procp = (void **) &disp->VertexAttribI4usvEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI4usvEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribI4usvEXT) { - void ** procp = (void **) &disp->VertexAttribI4usvEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribI4usv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribIPointerEXT) { - void ** procp = (void **) &disp->VertexAttribIPointerEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribIPointerEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->VertexAttribIPointerEXT) { - void ** procp = (void **) &disp->VertexAttribIPointerEXT; - snprintf(symboln, sizeof(symboln), "%sVertexAttribIPointer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FramebufferTextureLayerEXT) { - void ** procp = (void **) &disp->FramebufferTextureLayerEXT; - snprintf(symboln, sizeof(symboln), "%sFramebufferTextureLayer", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FramebufferTextureLayerEXT) { - void ** procp = (void **) &disp->FramebufferTextureLayerEXT; - snprintf(symboln, sizeof(symboln), "%sFramebufferTextureLayerARB", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->FramebufferTextureLayerEXT) { - void ** procp = (void **) &disp->FramebufferTextureLayerEXT; - snprintf(symboln, sizeof(symboln), "%sFramebufferTextureLayerEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorMaskIndexedEXT) { - void ** procp = (void **) &disp->ColorMaskIndexedEXT; - snprintf(symboln, sizeof(symboln), "%sColorMaskIndexedEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ColorMaskIndexedEXT) { - void ** procp = (void **) &disp->ColorMaskIndexedEXT; - snprintf(symboln, sizeof(symboln), "%sColorMaski", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DisableIndexedEXT) { - void ** procp = (void **) &disp->DisableIndexedEXT; - snprintf(symboln, sizeof(symboln), "%sDisableIndexedEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->DisableIndexedEXT) { - void ** procp = (void **) &disp->DisableIndexedEXT; - snprintf(symboln, sizeof(symboln), "%sDisablei", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EnableIndexedEXT) { - void ** procp = (void **) &disp->EnableIndexedEXT; - snprintf(symboln, sizeof(symboln), "%sEnableIndexedEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EnableIndexedEXT) { - void ** procp = (void **) &disp->EnableIndexedEXT; - snprintf(symboln, sizeof(symboln), "%sEnablei", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetBooleanIndexedvEXT) { - void ** procp = (void **) &disp->GetBooleanIndexedvEXT; - snprintf(symboln, sizeof(symboln), "%sGetBooleanIndexedvEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetBooleanIndexedvEXT) { - void ** procp = (void **) &disp->GetBooleanIndexedvEXT; - snprintf(symboln, sizeof(symboln), "%sGetBooleani_v", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetIntegerIndexedvEXT) { - void ** procp = (void **) &disp->GetIntegerIndexedvEXT; - snprintf(symboln, sizeof(symboln), "%sGetIntegerIndexedvEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetIntegerIndexedvEXT) { - void ** procp = (void **) &disp->GetIntegerIndexedvEXT; - snprintf(symboln, sizeof(symboln), "%sGetIntegeri_v", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsEnabledIndexedEXT) { - void ** procp = (void **) &disp->IsEnabledIndexedEXT; - snprintf(symboln, sizeof(symboln), "%sIsEnabledIndexedEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->IsEnabledIndexedEXT) { - void ** procp = (void **) &disp->IsEnabledIndexedEXT; - snprintf(symboln, sizeof(symboln), "%sIsEnabledi", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ClearColorIiEXT) { - void ** procp = (void **) &disp->ClearColorIiEXT; - snprintf(symboln, sizeof(symboln), "%sClearColorIiEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ClearColorIuiEXT) { - void ** procp = (void **) &disp->ClearColorIuiEXT; - snprintf(symboln, sizeof(symboln), "%sClearColorIuiEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetTexParameterIivEXT) { - void ** procp = (void **) &disp->GetTexParameterIivEXT; - snprintf(symboln, sizeof(symboln), "%sGetTexParameterIivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetTexParameterIivEXT) { - void ** procp = (void **) &disp->GetTexParameterIivEXT; - snprintf(symboln, sizeof(symboln), "%sGetTexParameterIiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetTexParameterIuivEXT) { - void ** procp = (void **) &disp->GetTexParameterIuivEXT; - snprintf(symboln, sizeof(symboln), "%sGetTexParameterIuivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetTexParameterIuivEXT) { - void ** procp = (void **) &disp->GetTexParameterIuivEXT; - snprintf(symboln, sizeof(symboln), "%sGetTexParameterIuiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexParameterIivEXT) { - void ** procp = (void **) &disp->TexParameterIivEXT; - snprintf(symboln, sizeof(symboln), "%sTexParameterIivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexParameterIivEXT) { - void ** procp = (void **) &disp->TexParameterIivEXT; - snprintf(symboln, sizeof(symboln), "%sTexParameterIiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexParameterIuivEXT) { - void ** procp = (void **) &disp->TexParameterIuivEXT; - snprintf(symboln, sizeof(symboln), "%sTexParameterIuivEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TexParameterIuivEXT) { - void ** procp = (void **) &disp->TexParameterIuivEXT; - snprintf(symboln, sizeof(symboln), "%sTexParameterIuiv", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BeginConditionalRenderNV) { - void ** procp = (void **) &disp->BeginConditionalRenderNV; - snprintf(symboln, sizeof(symboln), "%sBeginConditionalRenderNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BeginConditionalRenderNV) { - void ** procp = (void **) &disp->BeginConditionalRenderNV; - snprintf(symboln, sizeof(symboln), "%sBeginConditionalRender", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EndConditionalRenderNV) { - void ** procp = (void **) &disp->EndConditionalRenderNV; - snprintf(symboln, sizeof(symboln), "%sEndConditionalRenderNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EndConditionalRenderNV) { - void ** procp = (void **) &disp->EndConditionalRenderNV; - snprintf(symboln, sizeof(symboln), "%sEndConditionalRender", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BeginTransformFeedbackEXT) { - void ** procp = (void **) &disp->BeginTransformFeedbackEXT; - snprintf(symboln, sizeof(symboln), "%sBeginTransformFeedbackEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BeginTransformFeedbackEXT) { - void ** procp = (void **) &disp->BeginTransformFeedbackEXT; - snprintf(symboln, sizeof(symboln), "%sBeginTransformFeedback", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindBufferBaseEXT) { - void ** procp = (void **) &disp->BindBufferBaseEXT; - snprintf(symboln, sizeof(symboln), "%sBindBufferBaseEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindBufferBaseEXT) { - void ** procp = (void **) &disp->BindBufferBaseEXT; - snprintf(symboln, sizeof(symboln), "%sBindBufferBase", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindBufferOffsetEXT) { - void ** procp = (void **) &disp->BindBufferOffsetEXT; - snprintf(symboln, sizeof(symboln), "%sBindBufferOffsetEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindBufferRangeEXT) { - void ** procp = (void **) &disp->BindBufferRangeEXT; - snprintf(symboln, sizeof(symboln), "%sBindBufferRangeEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->BindBufferRangeEXT) { - void ** procp = (void **) &disp->BindBufferRangeEXT; - snprintf(symboln, sizeof(symboln), "%sBindBufferRange", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EndTransformFeedbackEXT) { - void ** procp = (void **) &disp->EndTransformFeedbackEXT; - snprintf(symboln, sizeof(symboln), "%sEndTransformFeedbackEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EndTransformFeedbackEXT) { - void ** procp = (void **) &disp->EndTransformFeedbackEXT; - snprintf(symboln, sizeof(symboln), "%sEndTransformFeedback", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetTransformFeedbackVaryingEXT) { - void ** procp = (void **) &disp->GetTransformFeedbackVaryingEXT; - snprintf(symboln, sizeof(symboln), "%sGetTransformFeedbackVaryingEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetTransformFeedbackVaryingEXT) { - void ** procp = (void **) &disp->GetTransformFeedbackVaryingEXT; - snprintf(symboln, sizeof(symboln), "%sGetTransformFeedbackVarying", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TransformFeedbackVaryingsEXT) { - void ** procp = (void **) &disp->TransformFeedbackVaryingsEXT; - snprintf(symboln, sizeof(symboln), "%sTransformFeedbackVaryingsEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TransformFeedbackVaryingsEXT) { - void ** procp = (void **) &disp->TransformFeedbackVaryingsEXT; - snprintf(symboln, sizeof(symboln), "%sTransformFeedbackVaryings", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProvokingVertexEXT) { - void ** procp = (void **) &disp->ProvokingVertexEXT; - snprintf(symboln, sizeof(symboln), "%sProvokingVertexEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProvokingVertexEXT) { - void ** procp = (void **) &disp->ProvokingVertexEXT; - snprintf(symboln, sizeof(symboln), "%sProvokingVertex", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetTexParameterPointervAPPLE) { - void ** procp = (void **) &disp->GetTexParameterPointervAPPLE; - snprintf(symboln, sizeof(symboln), "%sGetTexParameterPointervAPPLE", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TextureRangeAPPLE) { - void ** procp = (void **) &disp->TextureRangeAPPLE; - snprintf(symboln, sizeof(symboln), "%sTextureRangeAPPLE", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetObjectParameterivAPPLE) { - void ** procp = (void **) &disp->GetObjectParameterivAPPLE; - snprintf(symboln, sizeof(symboln), "%sGetObjectParameterivAPPLE", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ObjectPurgeableAPPLE) { - void ** procp = (void **) &disp->ObjectPurgeableAPPLE; - snprintf(symboln, sizeof(symboln), "%sObjectPurgeableAPPLE", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ObjectUnpurgeableAPPLE) { - void ** procp = (void **) &disp->ObjectUnpurgeableAPPLE; - snprintf(symboln, sizeof(symboln), "%sObjectUnpurgeableAPPLE", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ActiveProgramEXT) { - void ** procp = (void **) &disp->ActiveProgramEXT; - snprintf(symboln, sizeof(symboln), "%sActiveProgramEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->CreateShaderProgramEXT) { - void ** procp = (void **) &disp->CreateShaderProgramEXT; - snprintf(symboln, sizeof(symboln), "%sCreateShaderProgramEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->UseShaderProgramEXT) { - void ** procp = (void **) &disp->UseShaderProgramEXT; - snprintf(symboln, sizeof(symboln), "%sUseShaderProgramEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->TextureBarrierNV) { - void ** procp = (void **) &disp->TextureBarrierNV; - snprintf(symboln, sizeof(symboln), "%sTextureBarrierNV", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->StencilFuncSeparateATI) { - void ** procp = (void **) &disp->StencilFuncSeparateATI; - snprintf(symboln, sizeof(symboln), "%sStencilFuncSeparateATI", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramEnvParameters4fvEXT) { - void ** procp = (void **) &disp->ProgramEnvParameters4fvEXT; - snprintf(symboln, sizeof(symboln), "%sProgramEnvParameters4fvEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->ProgramLocalParameters4fvEXT) { - void ** procp = (void **) &disp->ProgramLocalParameters4fvEXT; - snprintf(symboln, sizeof(symboln), "%sProgramLocalParameters4fvEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetQueryObjecti64vEXT) { - void ** procp = (void **) &disp->GetQueryObjecti64vEXT; - snprintf(symboln, sizeof(symboln), "%sGetQueryObjecti64vEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->GetQueryObjectui64vEXT) { - void ** procp = (void **) &disp->GetQueryObjectui64vEXT; - snprintf(symboln, sizeof(symboln), "%sGetQueryObjectui64vEXT", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EGLImageTargetRenderbufferStorageOES) { - void ** procp = (void **) &disp->EGLImageTargetRenderbufferStorageOES; - snprintf(symboln, sizeof(symboln), "%sEGLImageTargetRenderbufferStorageOES", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - if(!disp->EGLImageTargetTexture2DOES) { - void ** procp = (void **) &disp->EGLImageTargetTexture2DOES; - snprintf(symboln, sizeof(symboln), "%sEGLImageTargetTexture2DOES", symbol_prefix); - *procp = dlsym(handle, symboln); - } - - - __glapi_gentable_set_remaining_noop(disp); - - return disp; -} - diff --git a/dll/opengl/mesa/src/mapi/glapi/glapi_getproc.c b/dll/opengl/mesa/src/mapi/glapi/glapi_getproc.c deleted file mode 100644 index 0a6ff7795fb..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/glapi_getproc.c +++ /dev/null @@ -1,666 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.1 - * - * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * \file glapi_getproc.c - * - * Code for implementing glXGetProcAddress(), etc. - * This was originally in glapi.c but refactored out. - */ - - -#include "glapi/glapi_priv.h" -#include "glapi/glapitable.h" - - -#define FIRST_DYNAMIC_OFFSET (sizeof(struct _glapi_table) / sizeof(void *)) - - -/********************************************************************** - * Static function management. - */ - - -#if !defined(DISPATCH_FUNCTION_SIZE) -# define NEED_FUNCTION_POINTER -#endif -#include "glapi/glprocs.h" - - -/** - * Search the table of static entrypoint functions for the named function - * and return the corresponding glprocs_table_t entry. - */ -static const glprocs_table_t * -get_static_proc( const char * n ) -{ - GLuint i; - for (i = 0; static_functions[i].Name_offset >= 0; i++) { - const char *testName = gl_string_table + static_functions[i].Name_offset; -#ifdef MANGLE - /* skip the prefix on the name */ - if (strcmp(testName, n + 1) == 0) -#else - if (strcmp(testName, n) == 0) -#endif - { - return &static_functions[i]; - } - } - return NULL; -} - - -/** - * Return dispatch table offset of the named static (built-in) function. - * Return -1 if function not found. - */ -static GLint -get_static_proc_offset(const char *funcName) -{ - const glprocs_table_t * const f = get_static_proc( funcName ); - if (f == NULL) { - return -1; - } - - return f->Offset; -} - - - -/** - * Return dispatch function address for the named static (built-in) function. - * Return NULL if function not found. - */ -static _glapi_proc -get_static_proc_address(const char *funcName) -{ - const glprocs_table_t * const f = get_static_proc( funcName ); - if (f == NULL) { - return NULL; - } - -#if defined(DISPATCH_FUNCTION_SIZE) && defined(GLX_INDIRECT_RENDERING) - return (f->Address == NULL) - ? get_entrypoint_address(f->Offset) - : f->Address; -#elif defined(DISPATCH_FUNCTION_SIZE) - return get_entrypoint_address(f->Offset); -#else - return f->Address; -#endif -} - - - -/** - * Return the name of the function at the given offset in the dispatch - * table. For debugging only. - */ -static const char * -get_static_proc_name( GLuint offset ) -{ - GLuint i; - for (i = 0; static_functions[i].Name_offset >= 0; i++) { - if (static_functions[i].Offset == offset) { - return gl_string_table + static_functions[i].Name_offset; - } - } - return NULL; -} - - - -/********************************************************************** - * Extension function management. - */ - - -/** - * Track information about a function added to the GL API. - */ -struct _glapi_function { - /** - * Name of the function. - */ - const char * name; - - - /** - * Text string that describes the types of the parameters passed to the - * named function. Parameter types are converted to characters using the - * following rules: - * - 'i' for \c GLint, \c GLuint, and \c GLenum - * - 'p' for any pointer type - * - 'f' for \c GLfloat and \c GLclampf - * - 'd' for \c GLdouble and \c GLclampd - */ - const char * parameter_signature; - - - /** - * Offset in the dispatch table where the pointer to the real function is - * located. If the driver has not requested that the named function be - * added to the dispatch table, this will have the value ~0. - */ - unsigned dispatch_offset; - - - /** - * Pointer to the dispatch stub for the named function. - * - * \todo - * The semantic of this field should be changed slightly. Currently, it - * is always expected to be non-\c NULL. However, it would be better to - * only allocate the entry-point stub when the application requests the - * function via \c glXGetProcAddress. This would save memory for all the - * functions that the driver exports but that the application never wants - * to call. - */ - _glapi_proc dispatch_stub; -}; - - -static struct _glapi_function ExtEntryTable[MAX_EXTENSION_FUNCS]; -static GLuint NumExtEntryPoints = 0; - - -static struct _glapi_function * -get_extension_proc(const char *funcName) -{ - GLuint i; - for (i = 0; i < NumExtEntryPoints; i++) { - if (strcmp(ExtEntryTable[i].name, funcName) == 0) { - return & ExtEntryTable[i]; - } - } - return NULL; -} - - -static GLint -get_extension_proc_offset(const char *funcName) -{ - const struct _glapi_function * const f = get_extension_proc( funcName ); - if (f == NULL) { - return -1; - } - - return f->dispatch_offset; -} - - -static _glapi_proc -get_extension_proc_address(const char *funcName) -{ - const struct _glapi_function * const f = get_extension_proc( funcName ); - if (f == NULL) { - return NULL; - } - - return f->dispatch_stub; -} - - -static const char * -get_extension_proc_name(GLuint offset) -{ - GLuint i; - for (i = 0; i < NumExtEntryPoints; i++) { - if (ExtEntryTable[i].dispatch_offset == offset) { - return ExtEntryTable[i].name; - } - } - return NULL; -} - - -/** - * strdup() is actually not a standard ANSI C or POSIX routine. - * Irix will not define it if ANSI mode is in effect. - */ -static char * -str_dup(const char *str) -{ - char *copy; - copy = (char*) malloc(strlen(str) + 1); - if (!copy) - return NULL; - strcpy(copy, str); - return copy; -} - - -/** - * Generate new entrypoint - * - * Use a temporary dispatch offset of ~0 (i.e. -1). Later, when the driver - * calls \c _glapi_add_dispatch we'll put in the proper offset. If that - * never happens, and the user calls this function, he'll segfault. That's - * what you get when you try calling a GL function that doesn't really exist. - * - * \param funcName Name of the function to create an entry-point for. - * - * \sa _glapi_add_entrypoint - */ - -static struct _glapi_function * -add_function_name( const char * funcName ) -{ - struct _glapi_function * entry = NULL; - _glapi_proc entrypoint = NULL; - char * name_dup = NULL; - - if (NumExtEntryPoints >= MAX_EXTENSION_FUNCS) - return NULL; - - if (funcName == NULL) - return NULL; - - name_dup = str_dup(funcName); - if (name_dup == NULL) - return NULL; - - entrypoint = generate_entrypoint(~0); - - if (entrypoint == NULL) { - free(name_dup); - return NULL; - } - - entry = & ExtEntryTable[NumExtEntryPoints]; - NumExtEntryPoints++; - - entry->name = name_dup; - entry->parameter_signature = NULL; - entry->dispatch_offset = ~0; - entry->dispatch_stub = entrypoint; - - return entry; -} - - -static struct _glapi_function * -set_entry_info( struct _glapi_function * entry, const char * signature, unsigned offset ) -{ - char * sig_dup = NULL; - - if (signature == NULL) - return NULL; - - sig_dup = str_dup(signature); - if (sig_dup == NULL) - return NULL; - - fill_in_entrypoint_offset(entry->dispatch_stub, offset); - - entry->parameter_signature = sig_dup; - entry->dispatch_offset = offset; - - return entry; -} - - -/** - * Fill-in the dispatch stub for the named function. - * - * This function is intended to be called by a hardware driver. When called, - * a dispatch stub may be created created for the function. A pointer to this - * dispatch function will be returned by glXGetProcAddress. - * - * \param function_names Array of pointers to function names that should - * share a common dispatch offset. - * \param parameter_signature String representing the types of the parameters - * passed to the named function. Parameter types - * are converted to characters using the following - * rules: - * - 'i' for \c GLint, \c GLuint, and \c GLenum - * - 'p' for any pointer type - * - 'f' for \c GLfloat and \c GLclampf - * - 'd' for \c GLdouble and \c GLclampd - * - * \returns - * The offset in the dispatch table of the named function. A pointer to the - * driver's implementation of the named function should be stored at - * \c dispatch_table[\c offset]. Return -1 if error/problem. - * - * \sa glXGetProcAddress - * - * \warning - * This function can only handle up to 8 names at a time. As far as I know, - * the maximum number of names ever associated with an existing GL function is - * 4 (\c glPointParameterfSGIS, \c glPointParameterfEXT, - * \c glPointParameterfARB, and \c glPointParameterf), so this should not be - * too painful of a limitation. - * - * \todo - * Determine whether or not \c parameter_signature should be allowed to be - * \c NULL. It doesn't seem like much of a hardship for drivers to have to - * pass in an empty string. - * - * \todo - * Determine if code should be added to reject function names that start with - * 'glX'. - * - * \bug - * Add code to compare \c parameter_signature with the parameter signature of - * a static function. In order to do that, we need to find a way to \b get - * the parameter signature of a static function. - */ - -int -_glapi_add_dispatch( const char * const * function_names, - const char * parameter_signature ) -{ - static int next_dynamic_offset = FIRST_DYNAMIC_OFFSET; - const char * const real_sig = (parameter_signature != NULL) - ? parameter_signature : ""; - struct _glapi_function * entry[8]; - GLboolean is_static[8]; - unsigned i; - int offset = ~0; - - init_glapi_relocs_once(); - - (void) memset( is_static, 0, sizeof( is_static ) ); - (void) memset( entry, 0, sizeof( entry ) ); - - /* Find the _single_ dispatch offset for all function names that already - * exist (and have a dispatch offset). - */ - - for ( i = 0 ; function_names[i] != NULL ; i++ ) { - const char * funcName = function_names[i]; - int static_offset; - int extension_offset; - - if (funcName[0] != 'g' || funcName[1] != 'l') - return -1; - - /* search built-in functions */ - static_offset = get_static_proc_offset(funcName); - - if (static_offset >= 0) { - - is_static[i] = GL_TRUE; - - /* FIXME: Make sure the parameter signatures match! How do we get - * FIXME: the parameter signature for static functions? - */ - - if ( (offset != ~0) && (static_offset != offset) ) { - return -1; - } - - offset = static_offset; - - continue; - } - - /* search added extension functions */ - entry[i] = get_extension_proc(funcName); - - if (entry[i] != NULL) { - extension_offset = entry[i]->dispatch_offset; - - /* The offset may be ~0 if the function name was added by - * glXGetProcAddress but never filled in by the driver. - */ - - if (extension_offset == ~0) { - continue; - } - - if (strcmp(real_sig, entry[i]->parameter_signature) != 0) { - return -1; - } - - if ( (offset != ~0) && (extension_offset != offset) ) { - return -1; - } - - offset = extension_offset; - } - } - - /* If all function names are either new (or with no dispatch offset), - * allocate a new dispatch offset. - */ - - if (offset == ~0) { - offset = next_dynamic_offset; - next_dynamic_offset++; - } - - /* Fill in the dispatch offset for the new function names (and those with - * no dispatch offset). - */ - - for ( i = 0 ; function_names[i] != NULL ; i++ ) { - if (is_static[i]) { - continue; - } - - /* generate entrypoints for new function names */ - if (entry[i] == NULL) { - entry[i] = add_function_name( function_names[i] ); - if (entry[i] == NULL) { - /* FIXME: Possible memory leak here. */ - return -1; - } - } - - if (entry[i]->dispatch_offset == ~0) { - set_entry_info( entry[i], real_sig, offset ); - } - } - - return offset; -} - - -/** - * Return offset of entrypoint for named function within dispatch table. - */ -GLint -_glapi_get_proc_offset(const char *funcName) -{ - GLint offset; - - /* search extension functions first */ - offset = get_extension_proc_offset(funcName); - if (offset >= 0) - return offset; - - /* search static functions */ - return get_static_proc_offset(funcName); -} - - - -/** - * Return pointer to the named function. If the function name isn't found - * in the name of static functions, try generating a new API entrypoint on - * the fly with assembly language. - */ -_glapi_proc -_glapi_get_proc_address(const char *funcName) -{ - _glapi_proc func; - struct _glapi_function * entry; - - init_glapi_relocs_once(); - -#ifdef MANGLE - /* skip the prefix on the name */ - if (funcName[1] != 'g' || funcName[2] != 'l') - return NULL; -#else - if (funcName[0] != 'g' || funcName[1] != 'l') - return NULL; -#endif - - /* search extension functions first */ - func = get_extension_proc_address(funcName); - if (func) - return func; - - /* search static functions */ - func = get_static_proc_address(funcName); - if (func) - return func; - - /* generate entrypoint, dispatch offset must be filled in by the driver */ - entry = add_function_name(funcName); - if (entry == NULL) - return NULL; - - return entry->dispatch_stub; -} - - - -/** - * Return the name of the function at the given dispatch offset. - * This is only intended for debugging. - */ -const char * -_glapi_get_proc_name(GLuint offset) -{ - const char * n; - - /* search built-in functions */ - n = get_static_proc_name(offset); - if ( n != NULL ) { - return n; - } - - /* search added extension functions */ - return get_extension_proc_name(offset); -} - - - -/********************************************************************** - * GL API table functions. - */ - - -/** - * Return size of dispatch table struct as number of functions (or - * slots). - */ -GLuint -_glapi_get_dispatch_table_size(void) -{ - /* - * The dispatch table size (number of entries) is the size of the - * _glapi_table struct plus the number of dynamic entries we can add. - * The extra slots can be filled in by DRI drivers that register new - * extension functions. - */ - return FIRST_DYNAMIC_OFFSET + MAX_EXTENSION_FUNCS; -} - - -/** - * Make sure there are no NULL pointers in the given dispatch table. - * Intended for debugging purposes. - */ -void -_glapi_check_table_not_null(const struct _glapi_table *table) -{ -#ifdef EXTRA_DEBUG /* set to DEBUG for extra DEBUG */ - const GLuint entries = _glapi_get_dispatch_table_size(); - const void **tab = (const void **) table; - GLuint i; - for (i = 1; i < entries; i++) { - assert(tab[i]); - } -#else - (void) table; -#endif -} - - -/** - * Do some spot checks to be sure that the dispatch table - * slots are assigned correctly. For debugging only. - */ -void -_glapi_check_table(const struct _glapi_table *table) -{ -#ifdef EXTRA_DEBUG /* set to DEBUG for extra DEBUG */ - { - GLuint BeginOffset = _glapi_get_proc_offset("glBegin"); - char *BeginFunc = (char*) &table->Begin; - GLuint offset = (BeginFunc - (char *) table) / sizeof(void *); - assert(BeginOffset == offset); - } - { - GLuint viewportOffset = _glapi_get_proc_offset("glViewport"); - char *viewportFunc = (char*) &table->Viewport; - GLuint offset = (viewportFunc - (char *) table) / sizeof(void *); - assert(viewportOffset == offset); - } - { - GLuint VertexPointerOffset = _glapi_get_proc_offset("glVertexPointer"); - char *VertexPointerFunc = (char*) &table->VertexPointer; - GLuint offset = (VertexPointerFunc - (char *) table) / sizeof(void *); - assert(VertexPointerOffset == offset); - } - { - GLuint ResetMinMaxOffset = _glapi_get_proc_offset("glResetMinmax"); - char *ResetMinMaxFunc = (char*) &table->ResetMinmax; - GLuint offset = (ResetMinMaxFunc - (char *) table) / sizeof(void *); - assert(ResetMinMaxOffset == offset); - } - { - GLuint blendColorOffset = _glapi_get_proc_offset("glBlendColor"); - char *blendColorFunc = (char*) &table->BlendColor; - GLuint offset = (blendColorFunc - (char *) table) / sizeof(void *); - assert(blendColorOffset == offset); - } - { - GLuint secondaryColor3fOffset = _glapi_get_proc_offset("glSecondaryColor3fEXT"); - char *secondaryColor3fFunc = (char*) &table->SecondaryColor3fEXT; - GLuint offset = (secondaryColor3fFunc - (char *) table) / sizeof(void *); - assert(secondaryColor3fOffset == offset); - } - { - GLuint pointParameterivOffset = _glapi_get_proc_offset("glPointParameterivNV"); - char *pointParameterivFunc = (char*) &table->PointParameterivNV; - GLuint offset = (pointParameterivFunc - (char *) table) / sizeof(void *); - assert(pointParameterivOffset == offset); - } - { - GLuint setFenceOffset = _glapi_get_proc_offset("glSetFenceNV"); - char *setFenceFunc = (char*) &table->SetFenceNV; - GLuint offset = (setFenceFunc - (char *) table) / sizeof(void *); - assert(setFenceOffset == offset); - } -#else - (void) table; -#endif -} diff --git a/dll/opengl/mesa/src/mapi/glapi/glapi_mapi_tmp.h b/dll/opengl/mesa/src/mapi/glapi/glapi_mapi_tmp.h deleted file mode 100644 index 11a824a8407..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/glapi_mapi_tmp.h +++ /dev/null @@ -1,14073 +0,0 @@ -/* This file is automatically generated by mapi_abi.py. Do not modify. */ - -#ifndef _GLAPI_TMP_H_ -#define _GLAPI_TMP_H_ -#ifdef USE_MGL_NAMESPACE -#define GLAPI_PREFIX(func) mgl##func -#define GLAPI_PREFIX_STR(func) "mgl"#func -#else -#define GLAPI_PREFIX(func) gl##func -#define GLAPI_PREFIX_STR(func) "gl"#func -#endif /* USE_MGL_NAMESPACE */ - -typedef int GLfixed; -typedef int GLclampx; -#endif /* _GLAPI_TMP_H_ */ - -#ifdef MAPI_TMP_DEFINES -#define GL_GLEXT_PROTOTYPES -#include "GL/gl.h" -#include "GL/glext.h" - -GLAPI void APIENTRY GLAPI_PREFIX(NewList)(GLuint list, GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(EndList)(void); -GLAPI void APIENTRY GLAPI_PREFIX(CallList)(GLuint list); -GLAPI void APIENTRY GLAPI_PREFIX(CallLists)(GLsizei n, GLenum type, const GLvoid *lists); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteLists)(GLuint list, GLsizei range); -GLAPI GLuint APIENTRY GLAPI_PREFIX(GenLists)(GLsizei range); -GLAPI void APIENTRY GLAPI_PREFIX(ListBase)(GLuint base); -GLAPI void APIENTRY GLAPI_PREFIX(Begin)(GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(Bitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap); -GLAPI void APIENTRY GLAPI_PREFIX(Color3b)(GLbyte red, GLbyte green, GLbyte blue); -GLAPI void APIENTRY GLAPI_PREFIX(Color3bv)(const GLbyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(Color3d)(GLdouble red, GLdouble green, GLdouble blue); -GLAPI void APIENTRY GLAPI_PREFIX(Color3dv)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(Color3f)(GLfloat red, GLfloat green, GLfloat blue); -GLAPI void APIENTRY GLAPI_PREFIX(Color3fv)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(Color3i)(GLint red, GLint green, GLint blue); -GLAPI void APIENTRY GLAPI_PREFIX(Color3iv)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(Color3s)(GLshort red, GLshort green, GLshort blue); -GLAPI void APIENTRY GLAPI_PREFIX(Color3sv)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(Color3ub)(GLubyte red, GLubyte green, GLubyte blue); -GLAPI void APIENTRY GLAPI_PREFIX(Color3ubv)(const GLubyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(Color3ui)(GLuint red, GLuint green, GLuint blue); -GLAPI void APIENTRY GLAPI_PREFIX(Color3uiv)(const GLuint *v); -GLAPI void APIENTRY GLAPI_PREFIX(Color3us)(GLushort red, GLushort green, GLushort blue); -GLAPI void APIENTRY GLAPI_PREFIX(Color3usv)(const GLushort *v); -GLAPI void APIENTRY GLAPI_PREFIX(Color4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); -GLAPI void APIENTRY GLAPI_PREFIX(Color4bv)(const GLbyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(Color4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); -GLAPI void APIENTRY GLAPI_PREFIX(Color4dv)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(Color4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GLAPI void APIENTRY GLAPI_PREFIX(Color4fv)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(Color4i)(GLint red, GLint green, GLint blue, GLint alpha); -GLAPI void APIENTRY GLAPI_PREFIX(Color4iv)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(Color4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha); -GLAPI void APIENTRY GLAPI_PREFIX(Color4sv)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(Color4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); -GLAPI void APIENTRY GLAPI_PREFIX(Color4ubv)(const GLubyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(Color4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha); -GLAPI void APIENTRY GLAPI_PREFIX(Color4uiv)(const GLuint *v); -GLAPI void APIENTRY GLAPI_PREFIX(Color4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha); -GLAPI void APIENTRY GLAPI_PREFIX(Color4usv)(const GLushort *v); -GLAPI void APIENTRY GLAPI_PREFIX(EdgeFlag)(GLboolean flag); -GLAPI void APIENTRY GLAPI_PREFIX(EdgeFlagv)(const GLboolean *flag); -GLAPI void APIENTRY GLAPI_PREFIX(End)(void); -GLAPI void APIENTRY GLAPI_PREFIX(Indexd)(GLdouble c); -GLAPI void APIENTRY GLAPI_PREFIX(Indexdv)(const GLdouble *c); -GLAPI void APIENTRY GLAPI_PREFIX(Indexf)(GLfloat c); -GLAPI void APIENTRY GLAPI_PREFIX(Indexfv)(const GLfloat *c); -GLAPI void APIENTRY GLAPI_PREFIX(Indexi)(GLint c); -GLAPI void APIENTRY GLAPI_PREFIX(Indexiv)(const GLint *c); -GLAPI void APIENTRY GLAPI_PREFIX(Indexs)(GLshort c); -GLAPI void APIENTRY GLAPI_PREFIX(Indexsv)(const GLshort *c); -GLAPI void APIENTRY GLAPI_PREFIX(Normal3b)(GLbyte nx, GLbyte ny, GLbyte nz); -GLAPI void APIENTRY GLAPI_PREFIX(Normal3bv)(const GLbyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(Normal3d)(GLdouble nx, GLdouble ny, GLdouble nz); -GLAPI void APIENTRY GLAPI_PREFIX(Normal3dv)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(Normal3f)(GLfloat nx, GLfloat ny, GLfloat nz); -GLAPI void APIENTRY GLAPI_PREFIX(Normal3fv)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(Normal3i)(GLint nx, GLint ny, GLint nz); -GLAPI void APIENTRY GLAPI_PREFIX(Normal3iv)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(Normal3s)(GLshort nx, GLshort ny, GLshort nz); -GLAPI void APIENTRY GLAPI_PREFIX(Normal3sv)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2d)(GLdouble x, GLdouble y); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2dv)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2f)(GLfloat x, GLfloat y); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2fv)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2i)(GLint x, GLint y); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2iv)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2s)(GLshort x, GLshort y); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2sv)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3d)(GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3dv)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3f)(GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3fv)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3i)(GLint x, GLint y, GLint z); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3iv)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3s)(GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3sv)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4dv)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4fv)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4i)(GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4iv)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4sv)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(Rectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); -GLAPI void APIENTRY GLAPI_PREFIX(Rectdv)(const GLdouble *v1, const GLdouble *v2); -GLAPI void APIENTRY GLAPI_PREFIX(Rectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); -GLAPI void APIENTRY GLAPI_PREFIX(Rectfv)(const GLfloat *v1, const GLfloat *v2); -GLAPI void APIENTRY GLAPI_PREFIX(Recti)(GLint x1, GLint y1, GLint x2, GLint y2); -GLAPI void APIENTRY GLAPI_PREFIX(Rectiv)(const GLint *v1, const GLint *v2); -GLAPI void APIENTRY GLAPI_PREFIX(Rects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2); -GLAPI void APIENTRY GLAPI_PREFIX(Rectsv)(const GLshort *v1, const GLshort *v2); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1d)(GLdouble s); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1dv)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1f)(GLfloat s); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1fv)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1i)(GLint s); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1iv)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1s)(GLshort s); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1sv)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2d)(GLdouble s, GLdouble t); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2dv)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2f)(GLfloat s, GLfloat t); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2fv)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2i)(GLint s, GLint t); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2iv)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2s)(GLshort s, GLshort t); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2sv)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3d)(GLdouble s, GLdouble t, GLdouble r); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3dv)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3f)(GLfloat s, GLfloat t, GLfloat r); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3fv)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3i)(GLint s, GLint t, GLint r); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3iv)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3s)(GLshort s, GLshort t, GLshort r); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3sv)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4dv)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4fv)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4i)(GLint s, GLint t, GLint r, GLint q); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4iv)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4sv)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex2d)(GLdouble x, GLdouble y); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex2dv)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex2f)(GLfloat x, GLfloat y); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex2fv)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex2i)(GLint x, GLint y); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex2iv)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex2s)(GLshort x, GLshort y); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex2sv)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex3d)(GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex3dv)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex3f)(GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex3fv)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex3i)(GLint x, GLint y, GLint z); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex3iv)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex3s)(GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex3sv)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex4dv)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex4fv)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex4i)(GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex4iv)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex4s)(GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY GLAPI_PREFIX(Vertex4sv)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(ClipPlane)(GLenum plane, const GLdouble *equation); -GLAPI void APIENTRY GLAPI_PREFIX(ColorMaterial)(GLenum face, GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(CullFace)(GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(Fogf)(GLenum pname, GLfloat param); -GLAPI void APIENTRY GLAPI_PREFIX(Fogfv)(GLenum pname, const GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(Fogi)(GLenum pname, GLint param); -GLAPI void APIENTRY GLAPI_PREFIX(Fogiv)(GLenum pname, const GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(FrontFace)(GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(Hint)(GLenum target, GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(Lightf)(GLenum light, GLenum pname, GLfloat param); -GLAPI void APIENTRY GLAPI_PREFIX(Lightfv)(GLenum light, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(Lighti)(GLenum light, GLenum pname, GLint param); -GLAPI void APIENTRY GLAPI_PREFIX(Lightiv)(GLenum light, GLenum pname, const GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(LightModelf)(GLenum pname, GLfloat param); -GLAPI void APIENTRY GLAPI_PREFIX(LightModelfv)(GLenum pname, const GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(LightModeli)(GLenum pname, GLint param); -GLAPI void APIENTRY GLAPI_PREFIX(LightModeliv)(GLenum pname, const GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(LineStipple)(GLint factor, GLushort pattern); -GLAPI void APIENTRY GLAPI_PREFIX(LineWidth)(GLfloat width); -GLAPI void APIENTRY GLAPI_PREFIX(Materialf)(GLenum face, GLenum pname, GLfloat param); -GLAPI void APIENTRY GLAPI_PREFIX(Materialfv)(GLenum face, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(Materiali)(GLenum face, GLenum pname, GLint param); -GLAPI void APIENTRY GLAPI_PREFIX(Materialiv)(GLenum face, GLenum pname, const GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(PointSize)(GLfloat size); -GLAPI void APIENTRY GLAPI_PREFIX(PolygonMode)(GLenum face, GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(PolygonStipple)(const GLubyte *mask); -GLAPI void APIENTRY GLAPI_PREFIX(Scissor)(GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY GLAPI_PREFIX(ShadeModel)(GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(TexParameterf)(GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY GLAPI_PREFIX(TexParameterfv)(GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(TexParameteri)(GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY GLAPI_PREFIX(TexParameteriv)(GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(TexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY GLAPI_PREFIX(TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY GLAPI_PREFIX(TexEnvf)(GLenum target, GLenum pname, GLfloat param); -GLAPI void APIENTRY GLAPI_PREFIX(TexEnvfv)(GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(TexEnvi)(GLenum target, GLenum pname, GLint param); -GLAPI void APIENTRY GLAPI_PREFIX(TexEnviv)(GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(TexGend)(GLenum coord, GLenum pname, GLdouble param); -GLAPI void APIENTRY GLAPI_PREFIX(TexGendv)(GLenum coord, GLenum pname, const GLdouble *params); -GLAPI void APIENTRY GLAPI_PREFIX(TexGenf)(GLenum coord, GLenum pname, GLfloat param); -GLAPI void APIENTRY GLAPI_PREFIX(TexGenfv)(GLenum coord, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(TexGeni)(GLenum coord, GLenum pname, GLint param); -GLAPI void APIENTRY GLAPI_PREFIX(TexGeniv)(GLenum coord, GLenum pname, const GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(FeedbackBuffer)(GLsizei size, GLenum type, GLfloat *buffer); -GLAPI void APIENTRY GLAPI_PREFIX(SelectBuffer)(GLsizei size, GLuint *buffer); -GLAPI GLint APIENTRY GLAPI_PREFIX(RenderMode)(GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(InitNames)(void); -GLAPI void APIENTRY GLAPI_PREFIX(LoadName)(GLuint name); -GLAPI void APIENTRY GLAPI_PREFIX(PassThrough)(GLfloat token); -GLAPI void APIENTRY GLAPI_PREFIX(PopName)(void); -GLAPI void APIENTRY GLAPI_PREFIX(PushName)(GLuint name); -GLAPI void APIENTRY GLAPI_PREFIX(DrawBuffer)(GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(Clear)(GLbitfield mask); -GLAPI void APIENTRY GLAPI_PREFIX(ClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GLAPI void APIENTRY GLAPI_PREFIX(ClearIndex)(GLfloat c); -GLAPI void APIENTRY GLAPI_PREFIX(ClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -GLAPI void APIENTRY GLAPI_PREFIX(ClearStencil)(GLint s); -GLAPI void APIENTRY GLAPI_PREFIX(ClearDepth)(GLclampd depth); -GLAPI void APIENTRY GLAPI_PREFIX(StencilMask)(GLuint mask); -GLAPI void APIENTRY GLAPI_PREFIX(ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -GLAPI void APIENTRY GLAPI_PREFIX(DepthMask)(GLboolean flag); -GLAPI void APIENTRY GLAPI_PREFIX(IndexMask)(GLuint mask); -GLAPI void APIENTRY GLAPI_PREFIX(Accum)(GLenum op, GLfloat value); -GLAPI void APIENTRY GLAPI_PREFIX(Disable)(GLenum cap); -GLAPI void APIENTRY GLAPI_PREFIX(Enable)(GLenum cap); -GLAPI void APIENTRY GLAPI_PREFIX(Finish)(void); -GLAPI void APIENTRY GLAPI_PREFIX(Flush)(void); -GLAPI void APIENTRY GLAPI_PREFIX(PopAttrib)(void); -GLAPI void APIENTRY GLAPI_PREFIX(PushAttrib)(GLbitfield mask); -GLAPI void APIENTRY GLAPI_PREFIX(Map1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); -GLAPI void APIENTRY GLAPI_PREFIX(Map1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); -GLAPI void APIENTRY GLAPI_PREFIX(Map2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); -GLAPI void APIENTRY GLAPI_PREFIX(Map2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); -GLAPI void APIENTRY GLAPI_PREFIX(MapGrid1d)(GLint un, GLdouble u1, GLdouble u2); -GLAPI void APIENTRY GLAPI_PREFIX(MapGrid1f)(GLint un, GLfloat u1, GLfloat u2); -GLAPI void APIENTRY GLAPI_PREFIX(MapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); -GLAPI void APIENTRY GLAPI_PREFIX(MapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord1d)(GLdouble u); -GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord1dv)(const GLdouble *u); -GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord1f)(GLfloat u); -GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord1fv)(const GLfloat *u); -GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord2d)(GLdouble u, GLdouble v); -GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord2dv)(const GLdouble *u); -GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord2f)(GLfloat u, GLfloat v); -GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord2fv)(const GLfloat *u); -GLAPI void APIENTRY GLAPI_PREFIX(EvalMesh1)(GLenum mode, GLint i1, GLint i2); -GLAPI void APIENTRY GLAPI_PREFIX(EvalPoint1)(GLint i); -GLAPI void APIENTRY GLAPI_PREFIX(EvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); -GLAPI void APIENTRY GLAPI_PREFIX(EvalPoint2)(GLint i, GLint j); -GLAPI void APIENTRY GLAPI_PREFIX(AlphaFunc)(GLenum func, GLclampf ref); -GLAPI void APIENTRY GLAPI_PREFIX(BlendFunc)(GLenum sfactor, GLenum dfactor); -GLAPI void APIENTRY GLAPI_PREFIX(LogicOp)(GLenum opcode); -GLAPI void APIENTRY GLAPI_PREFIX(StencilFunc)(GLenum func, GLint ref, GLuint mask); -GLAPI void APIENTRY GLAPI_PREFIX(StencilOp)(GLenum fail, GLenum zfail, GLenum zpass); -GLAPI void APIENTRY GLAPI_PREFIX(DepthFunc)(GLenum func); -GLAPI void APIENTRY GLAPI_PREFIX(PixelZoom)(GLfloat xfactor, GLfloat yfactor); -GLAPI void APIENTRY GLAPI_PREFIX(PixelTransferf)(GLenum pname, GLfloat param); -GLAPI void APIENTRY GLAPI_PREFIX(PixelTransferi)(GLenum pname, GLint param); -GLAPI void APIENTRY GLAPI_PREFIX(PixelStoref)(GLenum pname, GLfloat param); -GLAPI void APIENTRY GLAPI_PREFIX(PixelStorei)(GLenum pname, GLint param); -GLAPI void APIENTRY GLAPI_PREFIX(PixelMapfv)(GLenum map, GLsizei mapsize, const GLfloat *values); -GLAPI void APIENTRY GLAPI_PREFIX(PixelMapuiv)(GLenum map, GLsizei mapsize, const GLuint *values); -GLAPI void APIENTRY GLAPI_PREFIX(PixelMapusv)(GLenum map, GLsizei mapsize, const GLushort *values); -GLAPI void APIENTRY GLAPI_PREFIX(ReadBuffer)(GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(CopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); -GLAPI void APIENTRY GLAPI_PREFIX(ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); -GLAPI void APIENTRY GLAPI_PREFIX(DrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY GLAPI_PREFIX(GetBooleanv)(GLenum pname, GLboolean *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetClipPlane)(GLenum plane, GLdouble *equation); -GLAPI void APIENTRY GLAPI_PREFIX(GetDoublev)(GLenum pname, GLdouble *params); -GLAPI GLenum APIENTRY GLAPI_PREFIX(GetError)(void); -GLAPI void APIENTRY GLAPI_PREFIX(GetFloatv)(GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetIntegerv)(GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetLightfv)(GLenum light, GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetLightiv)(GLenum light, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetMapdv)(GLenum target, GLenum query, GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(GetMapfv)(GLenum target, GLenum query, GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(GetMapiv)(GLenum target, GLenum query, GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(GetMaterialfv)(GLenum face, GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetMaterialiv)(GLenum face, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetPixelMapfv)(GLenum map, GLfloat *values); -GLAPI void APIENTRY GLAPI_PREFIX(GetPixelMapuiv)(GLenum map, GLuint *values); -GLAPI void APIENTRY GLAPI_PREFIX(GetPixelMapusv)(GLenum map, GLushort *values); -GLAPI void APIENTRY GLAPI_PREFIX(GetPolygonStipple)(GLubyte *mask); -GLAPI const GLubyte * APIENTRY GLAPI_PREFIX(GetString)(GLenum name); -GLAPI void APIENTRY GLAPI_PREFIX(GetTexEnvfv)(GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetTexEnviv)(GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetTexGendv)(GLenum coord, GLenum pname, GLdouble *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetTexGenfv)(GLenum coord, GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetTexGeniv)(GLenum coord, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); -GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameterfv)(GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameteriv)(GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint *params); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsEnabled)(GLenum cap); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsList)(GLuint list); -GLAPI void APIENTRY GLAPI_PREFIX(DepthRange)(GLclampd zNear, GLclampd zFar); -GLAPI void APIENTRY GLAPI_PREFIX(Frustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -GLAPI void APIENTRY GLAPI_PREFIX(LoadIdentity)(void); -GLAPI void APIENTRY GLAPI_PREFIX(LoadMatrixf)(const GLfloat *m); -GLAPI void APIENTRY GLAPI_PREFIX(LoadMatrixd)(const GLdouble *m); -GLAPI void APIENTRY GLAPI_PREFIX(MatrixMode)(GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(MultMatrixf)(const GLfloat *m); -GLAPI void APIENTRY GLAPI_PREFIX(MultMatrixd)(const GLdouble *m); -GLAPI void APIENTRY GLAPI_PREFIX(Ortho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); -GLAPI void APIENTRY GLAPI_PREFIX(PopMatrix)(void); -GLAPI void APIENTRY GLAPI_PREFIX(PushMatrix)(void); -GLAPI void APIENTRY GLAPI_PREFIX(Rotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY GLAPI_PREFIX(Rotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY GLAPI_PREFIX(Scaled)(GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY GLAPI_PREFIX(Scalef)(GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY GLAPI_PREFIX(Translated)(GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY GLAPI_PREFIX(Translatef)(GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY GLAPI_PREFIX(Viewport)(GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY GLAPI_PREFIX(ArrayElement)(GLint i); -GLAPI void APIENTRY GLAPI_PREFIX(ArrayElementEXT)(GLint i); -GLAPI void APIENTRY GLAPI_PREFIX(BindTexture)(GLenum target, GLuint texture); -GLAPI void APIENTRY GLAPI_PREFIX(BindTextureEXT)(GLenum target, GLuint texture); -GLAPI void APIENTRY GLAPI_PREFIX(ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(DisableClientState)(GLenum array); -GLAPI void APIENTRY GLAPI_PREFIX(DrawArrays)(GLenum mode, GLint first, GLsizei count); -GLAPI void APIENTRY GLAPI_PREFIX(DrawArraysEXT)(GLenum mode, GLint first, GLsizei count); -GLAPI void APIENTRY GLAPI_PREFIX(DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); -GLAPI void APIENTRY GLAPI_PREFIX(EdgeFlagPointer)(GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(EnableClientState)(GLenum array); -GLAPI void APIENTRY GLAPI_PREFIX(IndexPointer)(GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(Indexub)(GLubyte c); -GLAPI void APIENTRY GLAPI_PREFIX(Indexubv)(const GLubyte *c); -GLAPI void APIENTRY GLAPI_PREFIX(InterleavedArrays)(GLenum format, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(NormalPointer)(GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(PolygonOffset)(GLfloat factor, GLfloat units); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(VertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(AreTexturesResident)(GLsizei n, const GLuint *textures, GLboolean *residences); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(AreTexturesResidentEXT)(GLsizei n, const GLuint *textures, GLboolean *residences); -GLAPI void APIENTRY GLAPI_PREFIX(CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -GLAPI void APIENTRY GLAPI_PREFIX(CopyTexImage1DEXT)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); -GLAPI void APIENTRY GLAPI_PREFIX(CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GLAPI void APIENTRY GLAPI_PREFIX(CopyTexImage2DEXT)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage1DEXT)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage2DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteTextures)(GLsizei n, const GLuint *textures); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteTexturesEXT)(GLsizei n, const GLuint *textures); -GLAPI void APIENTRY GLAPI_PREFIX(GenTextures)(GLsizei n, GLuint *textures); -GLAPI void APIENTRY GLAPI_PREFIX(GenTexturesEXT)(GLsizei n, GLuint *textures); -GLAPI void APIENTRY GLAPI_PREFIX(GetPointerv)(GLenum pname, GLvoid **params); -GLAPI void APIENTRY GLAPI_PREFIX(GetPointervEXT)(GLenum pname, GLvoid **params); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsTexture)(GLuint texture); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsTextureEXT)(GLuint texture); -GLAPI void APIENTRY GLAPI_PREFIX(PrioritizeTextures)(GLsizei n, const GLuint *textures, const GLclampf *priorities); -GLAPI void APIENTRY GLAPI_PREFIX(PrioritizeTexturesEXT)(GLsizei n, const GLuint *textures, const GLclampf *priorities); -GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage1DEXT)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage2DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY GLAPI_PREFIX(PopClientAttrib)(void); -GLAPI void APIENTRY GLAPI_PREFIX(PushClientAttrib)(GLbitfield mask); -GLAPI void APIENTRY GLAPI_PREFIX(BlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -GLAPI void APIENTRY GLAPI_PREFIX(BlendColorEXT)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -GLAPI void APIENTRY GLAPI_PREFIX(BlendEquation)(GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(BlendEquationEXT)(GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(DrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -GLAPI void APIENTRY GLAPI_PREFIX(DrawRangeElementsEXT)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); -GLAPI void APIENTRY GLAPI_PREFIX(ColorTable)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -GLAPI void APIENTRY GLAPI_PREFIX(ColorTableEXT)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); -GLAPI void APIENTRY GLAPI_PREFIX(ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(ColorTableParameteriv)(GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(CopyColorTable)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY GLAPI_PREFIX(GetColorTable)(GLenum target, GLenum format, GLenum type, GLvoid *table); -GLAPI void APIENTRY GLAPI_PREFIX(GetColorTableEXT)(GLenum target, GLenum format, GLenum type, GLvoid *table); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_343)(GLenum target, GLenum format, GLenum type, GLvoid *table); -GLAPI void APIENTRY GLAPI_PREFIX(GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetColorTableParameterfvEXT)(GLenum target, GLenum pname, GLfloat *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_344)(GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetColorTableParameteriv)(GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetColorTableParameterivEXT)(GLenum target, GLenum pname, GLint *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_345)(GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); -GLAPI void APIENTRY GLAPI_PREFIX(CopyColorSubTable)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionFilter1D)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); -GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); -GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionParameterf)(GLenum target, GLenum pname, GLfloat params); -GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionParameterfv)(GLenum target, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionParameteri)(GLenum target, GLenum pname, GLint params); -GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionParameteriv)(GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(CopyConvolutionFilter1D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); -GLAPI void APIENTRY GLAPI_PREFIX(CopyConvolutionFilter2D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY GLAPI_PREFIX(GetConvolutionFilter)(GLenum target, GLenum format, GLenum type, GLvoid *image); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_356)(GLenum target, GLenum format, GLenum type, GLvoid *image); -GLAPI void APIENTRY GLAPI_PREFIX(GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_357)(GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_358)(GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_359)(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); -GLAPI void APIENTRY GLAPI_PREFIX(SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); -GLAPI void APIENTRY GLAPI_PREFIX(GetHistogram)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_361)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -GLAPI void APIENTRY GLAPI_PREFIX(GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_362)(GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetHistogramParameteriv)(GLenum target, GLenum pname, GLint *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_363)(GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_364)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); -GLAPI void APIENTRY GLAPI_PREFIX(GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_365)(GLenum target, GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_366)(GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); -GLAPI void APIENTRY GLAPI_PREFIX(Minmax)(GLenum target, GLenum internalformat, GLboolean sink); -GLAPI void APIENTRY GLAPI_PREFIX(ResetHistogram)(GLenum target); -GLAPI void APIENTRY GLAPI_PREFIX(ResetMinmax)(GLenum target); -GLAPI void APIENTRY GLAPI_PREFIX(TexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY GLAPI_PREFIX(TexImage3DEXT)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage3DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); -GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage3DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GLAPI void APIENTRY GLAPI_PREFIX(ActiveTextureARB)(GLenum texture); -GLAPI void APIENTRY GLAPI_PREFIX(ActiveTexture)(GLenum texture); -GLAPI void APIENTRY GLAPI_PREFIX(ClientActiveTextureARB)(GLenum texture); -GLAPI void APIENTRY GLAPI_PREFIX(ClientActiveTexture)(GLenum texture); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1dARB)(GLenum target, GLdouble s); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1d)(GLenum target, GLdouble s); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1dvARB)(GLenum target, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1dv)(GLenum target, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1fARB)(GLenum target, GLfloat s); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1f)(GLenum target, GLfloat s); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1fvARB)(GLenum target, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1fv)(GLenum target, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1iARB)(GLenum target, GLint s); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1i)(GLenum target, GLint s); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1ivARB)(GLenum target, const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1iv)(GLenum target, const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1sARB)(GLenum target, GLshort s); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1s)(GLenum target, GLshort s); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1svARB)(GLenum target, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1sv)(GLenum target, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2dARB)(GLenum target, GLdouble s, GLdouble t); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2d)(GLenum target, GLdouble s, GLdouble t); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2dvARB)(GLenum target, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2dv)(GLenum target, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2fARB)(GLenum target, GLfloat s, GLfloat t); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2f)(GLenum target, GLfloat s, GLfloat t); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2fvARB)(GLenum target, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2fv)(GLenum target, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2iARB)(GLenum target, GLint s, GLint t); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2i)(GLenum target, GLint s, GLint t); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2ivARB)(GLenum target, const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2iv)(GLenum target, const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2sARB)(GLenum target, GLshort s, GLshort t); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2s)(GLenum target, GLshort s, GLshort t); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2svARB)(GLenum target, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2sv)(GLenum target, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3d)(GLenum target, GLdouble s, GLdouble t, GLdouble r); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3dvARB)(GLenum target, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3dv)(GLenum target, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3f)(GLenum target, GLfloat s, GLfloat t, GLfloat r); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3fvARB)(GLenum target, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3fv)(GLenum target, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3iARB)(GLenum target, GLint s, GLint t, GLint r); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3i)(GLenum target, GLint s, GLint t, GLint r); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3ivARB)(GLenum target, const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3iv)(GLenum target, const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3sARB)(GLenum target, GLshort s, GLshort t, GLshort r); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3s)(GLenum target, GLshort s, GLshort t, GLshort r); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3svARB)(GLenum target, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3sv)(GLenum target, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4d)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4dvARB)(GLenum target, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4dv)(GLenum target, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4f)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4fvARB)(GLenum target, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4fv)(GLenum target, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4iARB)(GLenum target, GLint s, GLint t, GLint r, GLint q); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4i)(GLenum target, GLint s, GLint t, GLint r, GLint q); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4ivARB)(GLenum target, const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4iv)(GLenum target, const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4sARB)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4s)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4svARB)(GLenum target, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4sv)(GLenum target, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(AttachShader)(GLuint program, GLuint shader); -GLAPI GLuint APIENTRY GLAPI_PREFIX(CreateProgram)(void); -GLAPI GLuint APIENTRY GLAPI_PREFIX(CreateShader)(GLenum type); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteProgram)(GLuint program); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteShader)(GLuint program); -GLAPI void APIENTRY GLAPI_PREFIX(DetachShader)(GLuint program, GLuint shader); -GLAPI void APIENTRY GLAPI_PREFIX(GetAttachedShaders)(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramInfoLog)(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramiv)(GLuint program, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetShaderInfoLog)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); -GLAPI void APIENTRY GLAPI_PREFIX(GetShaderiv)(GLuint shader, GLenum pname, GLint *params); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsProgram)(GLuint program); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsShader)(GLuint shader); -GLAPI void APIENTRY GLAPI_PREFIX(StencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask); -GLAPI void APIENTRY GLAPI_PREFIX(StencilMaskSeparate)(GLenum face, GLuint mask); -GLAPI void APIENTRY GLAPI_PREFIX(StencilOpSeparate)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass); -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix2x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix2x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix3x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix3x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix4x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix4x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(ClampColor)(GLenum target, GLenum clamp); -GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferfi)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); -GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferfv)(GLenum buffer, GLint drawbuffer, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferiv)(GLenum buffer, GLint drawbuffer, const GLint *value); -GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferuiv)(GLenum buffer, GLint drawbuffer, const GLuint *value); -GLAPI const GLubyte * APIENTRY GLAPI_PREFIX(GetStringi)(GLenum name, GLuint index); -GLAPI void APIENTRY GLAPI_PREFIX(TexBuffer)(GLenum target, GLenum internalFormat, GLuint buffer); -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture)(GLenum target, GLenum attachment, GLuint texture, GLint level); -GLAPI void APIENTRY GLAPI_PREFIX(GetBufferParameteri64v)(GLenum target, GLenum pname, GLint64 *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetInteger64i_v)(GLenum cap, GLuint index, GLint64 *data); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribDivisor)(GLuint index, GLuint divisor); -GLAPI void APIENTRY GLAPI_PREFIX(LoadTransposeMatrixdARB)(const GLdouble *m); -GLAPI void APIENTRY GLAPI_PREFIX(LoadTransposeMatrixd)(const GLdouble *m); -GLAPI void APIENTRY GLAPI_PREFIX(LoadTransposeMatrixfARB)(const GLfloat *m); -GLAPI void APIENTRY GLAPI_PREFIX(LoadTransposeMatrixf)(const GLfloat *m); -GLAPI void APIENTRY GLAPI_PREFIX(MultTransposeMatrixdARB)(const GLdouble *m); -GLAPI void APIENTRY GLAPI_PREFIX(MultTransposeMatrixd)(const GLdouble *m); -GLAPI void APIENTRY GLAPI_PREFIX(MultTransposeMatrixfARB)(const GLfloat *m); -GLAPI void APIENTRY GLAPI_PREFIX(MultTransposeMatrixf)(const GLfloat *m); -GLAPI void APIENTRY GLAPI_PREFIX(SampleCoverageARB)(GLclampf value, GLboolean invert); -GLAPI void APIENTRY GLAPI_PREFIX(SampleCoverage)(GLclampf value, GLboolean invert); -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage3D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); -GLAPI void APIENTRY GLAPI_PREFIX(GetCompressedTexImageARB)(GLenum target, GLint level, GLvoid *img); -GLAPI void APIENTRY GLAPI_PREFIX(GetCompressedTexImage)(GLenum target, GLint level, GLvoid *img); -GLAPI void APIENTRY GLAPI_PREFIX(DisableVertexAttribArrayARB)(GLuint index); -GLAPI void APIENTRY GLAPI_PREFIX(DisableVertexAttribArray)(GLuint index); -GLAPI void APIENTRY GLAPI_PREFIX(EnableVertexAttribArrayARB)(GLuint index); -GLAPI void APIENTRY GLAPI_PREFIX(EnableVertexAttribArray)(GLuint index); -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramEnvParameterdvARB)(GLenum target, GLuint index, GLdouble *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramEnvParameterfvARB)(GLenum target, GLuint index, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramLocalParameterdvARB)(GLenum target, GLuint index, GLdouble *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramLocalParameterfvARB)(GLenum target, GLuint index, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramStringARB)(GLenum target, GLenum pname, GLvoid *string); -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramivARB)(GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribdvARB)(GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribdv)(GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribfvARB)(GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribfv)(GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribivARB)(GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribiv)(GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(ProgramEnvParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameter4dNV)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY GLAPI_PREFIX(ProgramEnvParameter4dvARB)(GLenum target, GLuint index, const GLdouble *params); -GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameter4dvNV)(GLenum target, GLuint index, const GLdouble *params); -GLAPI void APIENTRY GLAPI_PREFIX(ProgramEnvParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameter4fNV)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY GLAPI_PREFIX(ProgramEnvParameter4fvARB)(GLenum target, GLuint index, const GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameter4fvNV)(GLenum target, GLuint index, const GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(ProgramLocalParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY GLAPI_PREFIX(ProgramLocalParameter4dvARB)(GLenum target, GLuint index, const GLdouble *params); -GLAPI void APIENTRY GLAPI_PREFIX(ProgramLocalParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY GLAPI_PREFIX(ProgramLocalParameter4fvARB)(GLenum target, GLuint index, const GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(ProgramStringARB)(GLenum target, GLenum format, GLsizei len, const GLvoid *string); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1dARB)(GLuint index, GLdouble x); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1d)(GLuint index, GLdouble x); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1dvARB)(GLuint index, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1dv)(GLuint index, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1fARB)(GLuint index, GLfloat x); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1f)(GLuint index, GLfloat x); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1fvARB)(GLuint index, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1fv)(GLuint index, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1sARB)(GLuint index, GLshort x); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1s)(GLuint index, GLshort x); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1svARB)(GLuint index, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1sv)(GLuint index, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2dARB)(GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2d)(GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2dvARB)(GLuint index, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2dv)(GLuint index, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2fARB)(GLuint index, GLfloat x, GLfloat y); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2f)(GLuint index, GLfloat x, GLfloat y); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2fvARB)(GLuint index, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2fv)(GLuint index, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2sARB)(GLuint index, GLshort x, GLshort y); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2s)(GLuint index, GLshort x, GLshort y); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2svARB)(GLuint index, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2sv)(GLuint index, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3d)(GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3dvARB)(GLuint index, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3dv)(GLuint index, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3f)(GLuint index, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3fvARB)(GLuint index, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3fv)(GLuint index, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3sARB)(GLuint index, GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3s)(GLuint index, GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3svARB)(GLuint index, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3sv)(GLuint index, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NbvARB)(GLuint index, const GLbyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nbv)(GLuint index, const GLbyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NivARB)(GLuint index, const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Niv)(GLuint index, const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NsvARB)(GLuint index, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nsv)(GLuint index, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NubARB)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nub)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NubvARB)(GLuint index, const GLubyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nubv)(GLuint index, const GLubyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NuivARB)(GLuint index, const GLuint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nuiv)(GLuint index, const GLuint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NusvARB)(GLuint index, const GLushort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nusv)(GLuint index, const GLushort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4bvARB)(GLuint index, const GLbyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4bv)(GLuint index, const GLbyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4d)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4dvARB)(GLuint index, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4dv)(GLuint index, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4f)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4fvARB)(GLuint index, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4fv)(GLuint index, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4ivARB)(GLuint index, const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4iv)(GLuint index, const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4sARB)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4s)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4svARB)(GLuint index, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4sv)(GLuint index, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4ubvARB)(GLuint index, const GLubyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4ubv)(GLuint index, const GLubyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4uivARB)(GLuint index, const GLuint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4uiv)(GLuint index, const GLuint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4usvARB)(GLuint index, const GLushort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4usv)(GLuint index, const GLushort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribPointerARB)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribPointer)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(BindBufferARB)(GLenum target, GLuint buffer); -GLAPI void APIENTRY GLAPI_PREFIX(BindBuffer)(GLenum target, GLuint buffer); -GLAPI void APIENTRY GLAPI_PREFIX(BufferDataARB)(GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); -GLAPI void APIENTRY GLAPI_PREFIX(BufferData)(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); -GLAPI void APIENTRY GLAPI_PREFIX(BufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); -GLAPI void APIENTRY GLAPI_PREFIX(BufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteBuffersARB)(GLsizei n, const GLuint *buffer); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteBuffers)(GLsizei n, const GLuint *buffer); -GLAPI void APIENTRY GLAPI_PREFIX(GenBuffersARB)(GLsizei n, GLuint *buffer); -GLAPI void APIENTRY GLAPI_PREFIX(GenBuffers)(GLsizei n, GLuint *buffer); -GLAPI void APIENTRY GLAPI_PREFIX(GetBufferParameterivARB)(GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetBufferParameteriv)(GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetBufferPointervARB)(GLenum target, GLenum pname, GLvoid **params); -GLAPI void APIENTRY GLAPI_PREFIX(GetBufferPointerv)(GLenum target, GLenum pname, GLvoid **params); -GLAPI void APIENTRY GLAPI_PREFIX(GetBufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); -GLAPI void APIENTRY GLAPI_PREFIX(GetBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsBufferARB)(GLuint buffer); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsBuffer)(GLuint buffer); -GLAPI GLvoid * APIENTRY GLAPI_PREFIX(MapBufferARB)(GLenum target, GLenum access); -GLAPI GLvoid * APIENTRY GLAPI_PREFIX(MapBuffer)(GLenum target, GLenum access); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(UnmapBufferARB)(GLenum target); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(UnmapBuffer)(GLenum target); -GLAPI void APIENTRY GLAPI_PREFIX(BeginQueryARB)(GLenum target, GLuint id); -GLAPI void APIENTRY GLAPI_PREFIX(BeginQuery)(GLenum target, GLuint id); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteQueriesARB)(GLsizei n, const GLuint *ids); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteQueries)(GLsizei n, const GLuint *ids); -GLAPI void APIENTRY GLAPI_PREFIX(EndQueryARB)(GLenum target); -GLAPI void APIENTRY GLAPI_PREFIX(EndQuery)(GLenum target); -GLAPI void APIENTRY GLAPI_PREFIX(GenQueriesARB)(GLsizei n, GLuint *ids); -GLAPI void APIENTRY GLAPI_PREFIX(GenQueries)(GLsizei n, GLuint *ids); -GLAPI void APIENTRY GLAPI_PREFIX(GetQueryObjectivARB)(GLuint id, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetQueryObjectiv)(GLuint id, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetQueryObjectuivARB)(GLuint id, GLenum pname, GLuint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetQueryObjectuiv)(GLuint id, GLenum pname, GLuint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetQueryivARB)(GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetQueryiv)(GLenum target, GLenum pname, GLint *params); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsQueryARB)(GLuint id); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsQuery)(GLuint id); -GLAPI void APIENTRY GLAPI_PREFIX(AttachObjectARB)(GLhandleARB containerObj, GLhandleARB obj); -GLAPI void APIENTRY GLAPI_PREFIX(CompileShaderARB)(GLhandleARB shader); -GLAPI void APIENTRY GLAPI_PREFIX(CompileShader)(GLuint shader); -GLAPI GLhandleARB APIENTRY GLAPI_PREFIX(CreateProgramObjectARB)(void); -GLAPI GLhandleARB APIENTRY GLAPI_PREFIX(CreateShaderObjectARB)(GLenum shaderType); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteObjectARB)(GLhandleARB obj); -GLAPI void APIENTRY GLAPI_PREFIX(DetachObjectARB)(GLhandleARB containerObj, GLhandleARB attachedObj); -GLAPI void APIENTRY GLAPI_PREFIX(GetActiveUniformARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -GLAPI void APIENTRY GLAPI_PREFIX(GetActiveUniform)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY GLAPI_PREFIX(GetAttachedObjectsARB)(GLhandleARB containerObj, GLsizei maxLength, GLsizei *length, GLhandleARB *infoLog); -GLAPI GLhandleARB APIENTRY GLAPI_PREFIX(GetHandleARB)(GLenum pname); -GLAPI void APIENTRY GLAPI_PREFIX(GetInfoLogARB)(GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); -GLAPI void APIENTRY GLAPI_PREFIX(GetObjectParameterfvARB)(GLhandleARB obj, GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetObjectParameterivARB)(GLhandleARB obj, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetShaderSourceARB)(GLhandleARB shader, GLsizei bufSize, GLsizei *length, GLcharARB *source); -GLAPI void APIENTRY GLAPI_PREFIX(GetShaderSource)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); -GLAPI GLint APIENTRY GLAPI_PREFIX(GetUniformLocationARB)(GLhandleARB program, const GLcharARB *name); -GLAPI GLint APIENTRY GLAPI_PREFIX(GetUniformLocation)(GLuint program, const GLchar *name); -GLAPI void APIENTRY GLAPI_PREFIX(GetUniformfvARB)(GLhandleARB program, GLint location, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetUniformfv)(GLuint program, GLint location, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetUniformivARB)(GLhandleARB program, GLint location, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetUniformiv)(GLuint program, GLint location, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(LinkProgramARB)(GLhandleARB program); -GLAPI void APIENTRY GLAPI_PREFIX(LinkProgram)(GLuint program); -GLAPI void APIENTRY GLAPI_PREFIX(ShaderSourceARB)(GLhandleARB shader, GLsizei count, const GLcharARB **string, const GLint *length); -GLAPI void APIENTRY GLAPI_PREFIX(ShaderSource)(GLuint shader, GLsizei count, const GLchar **string, const GLint *length); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1fARB)(GLint location, GLfloat v0); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1f)(GLint location, GLfloat v0); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1fvARB)(GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1fv)(GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1iARB)(GLint location, GLint v0); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1i)(GLint location, GLint v0); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1ivARB)(GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1iv)(GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2fARB)(GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2f)(GLint location, GLfloat v0, GLfloat v1); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2fvARB)(GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2fv)(GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2iARB)(GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2i)(GLint location, GLint v0, GLint v1); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2ivARB)(GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2iv)(GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3fvARB)(GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3fv)(GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3iARB)(GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3i)(GLint location, GLint v0, GLint v1, GLint v2); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3ivARB)(GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3iv)(GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4fvARB)(GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4fv)(GLint location, GLsizei count, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4iARB)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4i)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4ivARB)(GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4iv)(GLint location, GLsizei count, const GLint *value); -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix2fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix3fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix4fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(UseProgramObjectARB)(GLhandleARB program); -GLAPI void APIENTRY GLAPI_PREFIX(UseProgram)(GLuint program); -GLAPI void APIENTRY GLAPI_PREFIX(ValidateProgramARB)(GLhandleARB program); -GLAPI void APIENTRY GLAPI_PREFIX(ValidateProgram)(GLuint program); -GLAPI void APIENTRY GLAPI_PREFIX(BindAttribLocationARB)(GLhandleARB program, GLuint index, const GLcharARB *name); -GLAPI void APIENTRY GLAPI_PREFIX(BindAttribLocation)(GLuint program, GLuint index, const GLchar *name); -GLAPI void APIENTRY GLAPI_PREFIX(GetActiveAttribARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); -GLAPI void APIENTRY GLAPI_PREFIX(GetActiveAttrib)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); -GLAPI GLint APIENTRY GLAPI_PREFIX(GetAttribLocationARB)(GLhandleARB program, const GLcharARB *name); -GLAPI GLint APIENTRY GLAPI_PREFIX(GetAttribLocation)(GLuint program, const GLchar *name); -GLAPI void APIENTRY GLAPI_PREFIX(DrawBuffersARB)(GLsizei n, const GLenum *bufs); -GLAPI void APIENTRY GLAPI_PREFIX(DrawBuffers)(GLsizei n, const GLenum *bufs); -GLAPI void APIENTRY GLAPI_PREFIX(DrawBuffersATI)(GLsizei n, const GLenum *bufs); -GLAPI void APIENTRY GLAPI_PREFIX(DrawBuffersNV)(GLsizei n, const GLenum *bufs); -GLAPI void APIENTRY GLAPI_PREFIX(ClampColorARB)(GLenum target, GLenum clamp); -GLAPI void APIENTRY GLAPI_PREFIX(DrawArraysInstancedARB)(GLenum mode, GLint first, GLsizei count, GLsizei primcount); -GLAPI void APIENTRY GLAPI_PREFIX(DrawArraysInstanced)(GLenum mode, GLint first, GLsizei count, GLsizei primcount); -GLAPI void APIENTRY GLAPI_PREFIX(DrawArraysInstancedEXT)(GLenum mode, GLint first, GLsizei count, GLsizei primcount); -GLAPI void APIENTRY GLAPI_PREFIX(DrawElementsInstancedARB)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -GLAPI void APIENTRY GLAPI_PREFIX(DrawElementsInstanced)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -GLAPI void APIENTRY GLAPI_PREFIX(DrawElementsInstancedEXT)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); -GLAPI void APIENTRY GLAPI_PREFIX(RenderbufferStorageMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY GLAPI_PREFIX(RenderbufferStorageMultisampleEXT)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTextureARB)(GLenum target, GLenum attachment, GLuint texture, GLint level); -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTextureFaceARB)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); -GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameteriARB)(GLuint program, GLenum pname, GLint value); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribDivisorARB)(GLuint index, GLuint divisor); -GLAPI void APIENTRY GLAPI_PREFIX(FlushMappedBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length); -GLAPI GLvoid * APIENTRY GLAPI_PREFIX(MapBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); -GLAPI void APIENTRY GLAPI_PREFIX(TexBufferARB)(GLenum target, GLenum internalFormat, GLuint buffer); -GLAPI void APIENTRY GLAPI_PREFIX(BindVertexArray)(GLuint array); -GLAPI void APIENTRY GLAPI_PREFIX(GenVertexArrays)(GLsizei n, GLuint *arrays); -GLAPI void APIENTRY GLAPI_PREFIX(CopyBufferSubData)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); -GLAPI GLenum APIENTRY GLAPI_PREFIX(ClientWaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteSync)(GLsync sync); -GLAPI GLsync APIENTRY GLAPI_PREFIX(FenceSync)(GLenum condition, GLbitfield flags); -GLAPI void APIENTRY GLAPI_PREFIX(GetInteger64v)(GLenum pname, GLint64 *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetSynciv)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsSync)(GLsync sync); -GLAPI void APIENTRY GLAPI_PREFIX(WaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout); -GLAPI void APIENTRY GLAPI_PREFIX(DrawElementsBaseVertex)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); -GLAPI void APIENTRY GLAPI_PREFIX(DrawElementsInstancedBaseVertex)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex); -GLAPI void APIENTRY GLAPI_PREFIX(DrawRangeElementsBaseVertex)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); -GLAPI void APIENTRY GLAPI_PREFIX(MultiDrawElementsBaseVertex)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount, const GLint *basevertex); -GLAPI void APIENTRY GLAPI_PREFIX(BlendEquationSeparateiARB)(GLuint buf, GLenum modeRGB, GLenum modeA); -GLAPI void APIENTRY GLAPI_PREFIX(BlendEquationSeparateIndexedAMD)(GLuint buf, GLenum modeRGB, GLenum modeA); -GLAPI void APIENTRY GLAPI_PREFIX(BlendEquationiARB)(GLuint buf, GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(BlendEquationIndexedAMD)(GLuint buf, GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(BlendFuncSeparateiARB)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA); -GLAPI void APIENTRY GLAPI_PREFIX(BlendFuncSeparateIndexedAMD)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA); -GLAPI void APIENTRY GLAPI_PREFIX(BlendFunciARB)(GLuint buf, GLenum src, GLenum dst); -GLAPI void APIENTRY GLAPI_PREFIX(BlendFuncIndexedAMD)(GLuint buf, GLenum src, GLenum dst); -GLAPI void APIENTRY GLAPI_PREFIX(BindSampler)(GLuint unit, GLuint sampler); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteSamplers)(GLsizei count, const GLuint *samplers); -GLAPI void APIENTRY GLAPI_PREFIX(GenSamplers)(GLsizei count, GLuint *samplers); -GLAPI void APIENTRY GLAPI_PREFIX(GetSamplerParameterIiv)(GLuint sampler, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetSamplerParameterIuiv)(GLuint sampler, GLenum pname, GLuint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetSamplerParameterfv)(GLuint sampler, GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetSamplerParameteriv)(GLuint sampler, GLenum pname, GLint *params); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsSampler)(GLuint sampler); -GLAPI void APIENTRY GLAPI_PREFIX(SamplerParameterIiv)(GLuint sampler, GLenum pname, const GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(SamplerParameterIuiv)(GLuint sampler, GLenum pname, const GLuint *params); -GLAPI void APIENTRY GLAPI_PREFIX(SamplerParameterf)(GLuint sampler, GLenum pname, GLfloat param); -GLAPI void APIENTRY GLAPI_PREFIX(SamplerParameterfv)(GLuint sampler, GLenum pname, const GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(SamplerParameteri)(GLuint sampler, GLenum pname, GLint param); -GLAPI void APIENTRY GLAPI_PREFIX(SamplerParameteriv)(GLuint sampler, GLenum pname, const GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(ColorP3ui)(GLenum type, GLuint color); -GLAPI void APIENTRY GLAPI_PREFIX(ColorP3uiv)(GLenum type, const GLuint *color); -GLAPI void APIENTRY GLAPI_PREFIX(ColorP4ui)(GLenum type, GLuint color); -GLAPI void APIENTRY GLAPI_PREFIX(ColorP4uiv)(GLenum type, const GLuint *color); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoordP1ui)(GLenum texture, GLenum type, GLuint coords); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoordP1uiv)(GLenum texture, GLenum type, const GLuint *coords); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoordP2ui)(GLenum texture, GLenum type, GLuint coords); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoordP2uiv)(GLenum texture, GLenum type, const GLuint *coords); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoordP3ui)(GLenum texture, GLenum type, GLuint coords); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoordP3uiv)(GLenum texture, GLenum type, const GLuint *coords); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoordP4ui)(GLenum texture, GLenum type, GLuint coords); -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoordP4uiv)(GLenum texture, GLenum type, const GLuint *coords); -GLAPI void APIENTRY GLAPI_PREFIX(NormalP3ui)(GLenum type, GLuint coords); -GLAPI void APIENTRY GLAPI_PREFIX(NormalP3uiv)(GLenum type, const GLuint *coords); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColorP3ui)(GLenum type, GLuint color); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColorP3uiv)(GLenum type, const GLuint *color); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoordP1ui)(GLenum type, GLuint coords); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoordP1uiv)(GLenum type, const GLuint *coords); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoordP2ui)(GLenum type, GLuint coords); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoordP2uiv)(GLenum type, const GLuint *coords); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoordP3ui)(GLenum type, GLuint coords); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoordP3uiv)(GLenum type, const GLuint *coords); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoordP4ui)(GLenum type, GLuint coords); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoordP4uiv)(GLenum type, const GLuint *coords); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribP1ui)(GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribP1uiv)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribP2ui)(GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribP2uiv)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribP3ui)(GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribP3uiv)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribP4ui)(GLuint index, GLenum type, GLboolean normalized, GLuint value); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribP4uiv)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value); -GLAPI void APIENTRY GLAPI_PREFIX(VertexP2ui)(GLenum type, GLuint value); -GLAPI void APIENTRY GLAPI_PREFIX(VertexP2uiv)(GLenum type, const GLuint *value); -GLAPI void APIENTRY GLAPI_PREFIX(VertexP3ui)(GLenum type, GLuint value); -GLAPI void APIENTRY GLAPI_PREFIX(VertexP3uiv)(GLenum type, const GLuint *value); -GLAPI void APIENTRY GLAPI_PREFIX(VertexP4ui)(GLenum type, GLuint value); -GLAPI void APIENTRY GLAPI_PREFIX(VertexP4uiv)(GLenum type, const GLuint *value); -GLAPI void APIENTRY GLAPI_PREFIX(BindTransformFeedback)(GLenum target, GLuint id); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteTransformFeedbacks)(GLsizei n, const GLuint *ids); -GLAPI void APIENTRY GLAPI_PREFIX(DrawTransformFeedback)(GLenum mode, GLuint id); -GLAPI void APIENTRY GLAPI_PREFIX(GenTransformFeedbacks)(GLsizei n, GLuint *ids); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsTransformFeedback)(GLuint id); -GLAPI void APIENTRY GLAPI_PREFIX(PauseTransformFeedback)(void); -GLAPI void APIENTRY GLAPI_PREFIX(ResumeTransformFeedback)(void); -GLAPI void APIENTRY GLAPI_PREFIX(ClearDepthf)(GLclampf depth); -GLAPI void APIENTRY GLAPI_PREFIX(DepthRangef)(GLclampf zNear, GLclampf zFar); -GLAPI void APIENTRY GLAPI_PREFIX(GetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); -GLAPI void APIENTRY GLAPI_PREFIX(ReleaseShaderCompiler)(void); -GLAPI void APIENTRY GLAPI_PREFIX(ShaderBinary)(GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_665)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_666)(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_667)(GLuint program, GLenum pname, GLint value); -GLAPI GLenum APIENTRY GLAPI_PREFIX(GetGraphicsResetStatusARB)(void); -GLAPI void APIENTRY GLAPI_PREFIX(GetnColorTableARB)(GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table); -GLAPI void APIENTRY GLAPI_PREFIX(GetnCompressedTexImageARB)(GLenum target, GLint lod, GLsizei bufSize, GLvoid *img); -GLAPI void APIENTRY GLAPI_PREFIX(GetnConvolutionFilterARB)(GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image); -GLAPI void APIENTRY GLAPI_PREFIX(GetnHistogramARB)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); -GLAPI void APIENTRY GLAPI_PREFIX(GetnMapdvARB)(GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(GetnMapfvARB)(GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(GetnMapivARB)(GLenum target, GLenum query, GLsizei bufSize, GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(GetnMinmaxARB)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); -GLAPI void APIENTRY GLAPI_PREFIX(GetnPixelMapfvARB)(GLenum map, GLsizei bufSize, GLfloat *values); -GLAPI void APIENTRY GLAPI_PREFIX(GetnPixelMapuivARB)(GLenum map, GLsizei bufSize, GLuint *values); -GLAPI void APIENTRY GLAPI_PREFIX(GetnPixelMapusvARB)(GLenum map, GLsizei bufSize, GLushort *values); -GLAPI void APIENTRY GLAPI_PREFIX(GetnPolygonStippleARB)(GLsizei bufSize, GLubyte *pattern); -GLAPI void APIENTRY GLAPI_PREFIX(GetnSeparableFilterARB)(GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span); -GLAPI void APIENTRY GLAPI_PREFIX(GetnTexImageARB)(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img); -GLAPI void APIENTRY GLAPI_PREFIX(GetnUniformdvARB)(GLhandleARB program, GLint location, GLsizei bufSize, GLdouble *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetnUniformfvARB)(GLhandleARB program, GLint location, GLsizei bufSize, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetnUniformivARB)(GLhandleARB program, GLint location, GLsizei bufSize, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetnUniformuivARB)(GLhandleARB program, GLint location, GLsizei bufSize, GLuint *params); -GLAPI void APIENTRY GLAPI_PREFIX(ReadnPixelsARB)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); -GLAPI void APIENTRY GLAPI_PREFIX(TexStorage1D)(GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width); -GLAPI void APIENTRY GLAPI_PREFIX(TexStorage2D)(GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height); -GLAPI void APIENTRY GLAPI_PREFIX(TexStorage3D)(GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth); -GLAPI void APIENTRY GLAPI_PREFIX(TextureStorage1DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width); -GLAPI void APIENTRY GLAPI_PREFIX(TextureStorage2DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height); -GLAPI void APIENTRY GLAPI_PREFIX(TextureStorage3DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth); -GLAPI void APIENTRY GLAPI_PREFIX(PolygonOffsetEXT)(GLfloat factor, GLfloat bias); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_695)(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_696)(const GLfloat *coords); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_697)(GLint x, GLint y, GLint z, GLint width, GLint height); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_698)(const GLint *coords); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_699)(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_700)(const GLshort *coords); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_701)(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_702)(const GLfixed *coords); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_703)(GLenum type, GLsizei stride, const GLvoid *pointer); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_704)(GLenum pname, GLfloat *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_705)(GLenum pname, GLint *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_706)(GLenum pname, GLfloat param); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_707)(GLenum pname, const GLfloat *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_708)(GLenum pname, GLint param); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_709)(GLenum pname, const GLint *params); -GLbitfield APIENTRY GLAPI_PREFIX(_dispatch_stub_710)(GLfixed *mantissa, GLint *exponent); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_711)(GLclampf value, GLboolean invert); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_712)(GLenum pattern); -GLAPI void APIENTRY GLAPI_PREFIX(ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(PointParameterfEXT)(GLenum pname, GLfloat param); -GLAPI void APIENTRY GLAPI_PREFIX(PointParameterf)(GLenum pname, GLfloat param); -GLAPI void APIENTRY GLAPI_PREFIX(PointParameterfARB)(GLenum pname, GLfloat param); -GLAPI void APIENTRY GLAPI_PREFIX(PointParameterfvEXT)(GLenum pname, const GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(PointParameterfv)(GLenum pname, const GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(PointParameterfvARB)(GLenum pname, const GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(LockArraysEXT)(GLint first, GLsizei count); -GLAPI void APIENTRY GLAPI_PREFIX(UnlockArraysEXT)(void); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3b)(GLbyte red, GLbyte green, GLbyte blue); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3bvEXT)(const GLbyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3bv)(const GLbyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3d)(GLdouble red, GLdouble green, GLdouble blue); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3dvEXT)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3dv)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3f)(GLfloat red, GLfloat green, GLfloat blue); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3fvEXT)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3fv)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3iEXT)(GLint red, GLint green, GLint blue); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3i)(GLint red, GLint green, GLint blue); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ivEXT)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3iv)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3s)(GLshort red, GLshort green, GLshort blue); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3svEXT)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3sv)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ub)(GLubyte red, GLubyte green, GLubyte blue); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ubvEXT)(const GLubyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ubv)(const GLubyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ui)(GLuint red, GLuint green, GLuint blue); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3uivEXT)(const GLuint *v); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3uiv)(const GLuint *v); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3us)(GLushort red, GLushort green, GLushort blue); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3usvEXT)(const GLushort *v); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3usv)(const GLushort *v); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(MultiDrawArraysEXT)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -GLAPI void APIENTRY GLAPI_PREFIX(MultiDrawArrays)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); -GLAPI void APIENTRY GLAPI_PREFIX(MultiDrawElementsEXT)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount); -GLAPI void APIENTRY GLAPI_PREFIX(MultiDrawElements)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount); -GLAPI void APIENTRY GLAPI_PREFIX(FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(FogCoordPointer)(GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(FogCoorddEXT)(GLdouble coord); -GLAPI void APIENTRY GLAPI_PREFIX(FogCoordd)(GLdouble coord); -GLAPI void APIENTRY GLAPI_PREFIX(FogCoorddvEXT)(const GLdouble *coord); -GLAPI void APIENTRY GLAPI_PREFIX(FogCoorddv)(const GLdouble *coord); -GLAPI void APIENTRY GLAPI_PREFIX(FogCoordfEXT)(GLfloat coord); -GLAPI void APIENTRY GLAPI_PREFIX(FogCoordf)(GLfloat coord); -GLAPI void APIENTRY GLAPI_PREFIX(FogCoordfvEXT)(const GLfloat *coord); -GLAPI void APIENTRY GLAPI_PREFIX(FogCoordfv)(const GLfloat *coord); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_747)(GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -GLAPI void APIENTRY GLAPI_PREFIX(BlendFuncSeparate)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); -GLAPI void APIENTRY GLAPI_PREFIX(FlushVertexArrayRangeNV)(void); -GLAPI void APIENTRY GLAPI_PREFIX(VertexArrayRangeNV)(GLsizei length, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -GLAPI void APIENTRY GLAPI_PREFIX(CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); -GLAPI void APIENTRY GLAPI_PREFIX(CombinerParameterfNV)(GLenum pname, GLfloat param); -GLAPI void APIENTRY GLAPI_PREFIX(CombinerParameterfvNV)(GLenum pname, const GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(CombinerParameteriNV)(GLenum pname, GLint param); -GLAPI void APIENTRY GLAPI_PREFIX(CombinerParameterivNV)(GLenum pname, const GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); -GLAPI void APIENTRY GLAPI_PREFIX(GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(ResizeBuffersMESA)(void); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2dMESA)(GLdouble x, GLdouble y); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2d)(GLdouble x, GLdouble y); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2dARB)(GLdouble x, GLdouble y); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2dvMESA)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2dv)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2dvARB)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2fMESA)(GLfloat x, GLfloat y); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2f)(GLfloat x, GLfloat y); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2fARB)(GLfloat x, GLfloat y); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2fvMESA)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2fv)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2fvARB)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2iMESA)(GLint x, GLint y); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2i)(GLint x, GLint y); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2iARB)(GLint x, GLint y); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2ivMESA)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2iv)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2ivARB)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2sMESA)(GLshort x, GLshort y); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2s)(GLshort x, GLshort y); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2sARB)(GLshort x, GLshort y); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2svMESA)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2sv)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2svARB)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3d)(GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3dARB)(GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3dvMESA)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3dv)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3dvARB)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3f)(GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3fARB)(GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3fvMESA)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3fv)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3fvARB)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3iMESA)(GLint x, GLint y, GLint z); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3i)(GLint x, GLint y, GLint z); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3iARB)(GLint x, GLint y, GLint z); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3ivMESA)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3iv)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3ivARB)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3sMESA)(GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3s)(GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3sARB)(GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3svMESA)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3sv)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3svARB)(const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4dvMESA)(const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4fvMESA)(const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4ivMESA)(const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4svMESA)(const GLshort *v); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_789)(const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_790)(const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid * const *indices, GLsizei primcount, GLint modestride); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_791)(GLsizei n, const GLuint *fences); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_792)(GLuint fence); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_793)(GLsizei n, GLuint *fences); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_794)(GLuint fence, GLenum pname, GLint *params); -GLboolean APIENTRY GLAPI_PREFIX(_dispatch_stub_795)(GLuint fence); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_796)(GLuint fence, GLenum condition); -GLboolean APIENTRY GLAPI_PREFIX(_dispatch_stub_797)(GLuint fence); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(AreProgramsResidentNV)(GLsizei n, const GLuint *ids, GLboolean *residences); -GLAPI void APIENTRY GLAPI_PREFIX(BindProgramNV)(GLenum target, GLuint program); -GLAPI void APIENTRY GLAPI_PREFIX(BindProgramARB)(GLenum target, GLuint program); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteProgramsNV)(GLsizei n, const GLuint *programs); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteProgramsARB)(GLsizei n, const GLuint *programs); -GLAPI void APIENTRY GLAPI_PREFIX(ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GenProgramsNV)(GLsizei n, GLuint *programs); -GLAPI void APIENTRY GLAPI_PREFIX(GenProgramsARB)(GLsizei n, GLuint *programs); -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramStringNV)(GLuint id, GLenum pname, GLubyte *program); -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramivNV)(GLuint id, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid **pointer); -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid **pointer); -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribPointervARB)(GLuint index, GLenum pname, GLvoid **pointer); -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribivNV)(GLuint index, GLenum pname, GLint *params); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsProgramNV)(GLuint program); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsProgramARB)(GLuint program); -GLAPI void APIENTRY GLAPI_PREFIX(LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte *program); -GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameters4dvNV)(GLenum target, GLuint index, GLsizei num, const GLdouble *params); -GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameters4fvNV)(GLenum target, GLuint index, GLsizei num, const GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(RequestResidentProgramsNV)(GLsizei n, const GLuint *ids); -GLAPI void APIENTRY GLAPI_PREFIX(TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1dNV)(GLuint index, GLdouble x); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1dvNV)(GLuint index, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1fNV)(GLuint index, GLfloat x); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1fvNV)(GLuint index, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1sNV)(GLuint index, GLshort x); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1svNV)(GLuint index, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2dvNV)(GLuint index, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2fvNV)(GLuint index, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2svNV)(GLuint index, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3dvNV)(GLuint index, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3fvNV)(GLuint index, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3svNV)(GLuint index, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4dvNV)(GLuint index, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4fvNV)(GLuint index, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4svNV)(GLuint index, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4ubvNV)(GLuint index, const GLubyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(GetTexBumpParameterfvATI)(GLenum pname, GLfloat *param); -GLAPI void APIENTRY GLAPI_PREFIX(GetTexBumpParameterivATI)(GLenum pname, GLint *param); -GLAPI void APIENTRY GLAPI_PREFIX(TexBumpParameterfvATI)(GLenum pname, const GLfloat *param); -GLAPI void APIENTRY GLAPI_PREFIX(TexBumpParameterivATI)(GLenum pname, const GLint *param); -GLAPI void APIENTRY GLAPI_PREFIX(AlphaFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -GLAPI void APIENTRY GLAPI_PREFIX(AlphaFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -GLAPI void APIENTRY GLAPI_PREFIX(AlphaFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -GLAPI void APIENTRY GLAPI_PREFIX(BeginFragmentShaderATI)(void); -GLAPI void APIENTRY GLAPI_PREFIX(BindFragmentShaderATI)(GLuint id); -GLAPI void APIENTRY GLAPI_PREFIX(ColorFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); -GLAPI void APIENTRY GLAPI_PREFIX(ColorFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); -GLAPI void APIENTRY GLAPI_PREFIX(ColorFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteFragmentShaderATI)(GLuint id); -GLAPI void APIENTRY GLAPI_PREFIX(EndFragmentShaderATI)(void); -GLAPI GLuint APIENTRY GLAPI_PREFIX(GenFragmentShadersATI)(GLuint range); -GLAPI void APIENTRY GLAPI_PREFIX(PassTexCoordATI)(GLuint dst, GLuint coord, GLenum swizzle); -GLAPI void APIENTRY GLAPI_PREFIX(SampleMapATI)(GLuint dst, GLuint interp, GLenum swizzle); -GLAPI void APIENTRY GLAPI_PREFIX(SetFragmentShaderConstantATI)(GLuint dst, const GLfloat *value); -GLAPI void APIENTRY GLAPI_PREFIX(PointParameteriNV)(GLenum pname, GLint param); -GLAPI void APIENTRY GLAPI_PREFIX(PointParameteri)(GLenum pname, GLint param); -GLAPI void APIENTRY GLAPI_PREFIX(PointParameterivNV)(GLenum pname, const GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(PointParameteriv)(GLenum pname, const GLint *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_878)(GLenum face); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_879)(GLuint array); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_880)(GLsizei n, const GLuint *arrays); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteVertexArrays)(GLsizei n, const GLuint *arrays); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_881)(GLsizei n, GLuint *arrays); -GLboolean APIENTRY GLAPI_PREFIX(_dispatch_stub_882)(GLuint array); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsVertexArray)(GLuint array); -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); -GLAPI void APIENTRY GLAPI_PREFIX(ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); -GLAPI void APIENTRY GLAPI_PREFIX(ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); -GLAPI void APIENTRY GLAPI_PREFIX(ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GLAPI void APIENTRY GLAPI_PREFIX(ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); -GLAPI void APIENTRY GLAPI_PREFIX(PrimitiveRestartIndexNV)(GLuint index); -GLAPI void APIENTRY GLAPI_PREFIX(PrimitiveRestartIndex)(GLuint index); -GLAPI void APIENTRY GLAPI_PREFIX(PrimitiveRestartNV)(void); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_891)(GLenum func, GLclampx ref); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_892)(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_893)(GLclampx depth); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_894)(GLenum plane, const GLfixed *equation); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_895)(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_896)(GLclampx zNear, GLclampx zFar); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_897)(GLenum pname, GLfixed param); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_898)(GLenum pname, const GLfixed *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_899)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_900)(GLenum plane, GLfixed *equation); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_901)(GLenum pname, GLfixed *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_902)(GLenum light, GLenum pname, GLfixed *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_903)(GLenum face, GLenum pname, GLfixed *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_904)(GLenum target, GLenum pname, GLfixed *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_905)(GLenum coord, GLenum pname, GLfixed *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_906)(GLenum target, GLenum pname, GLfixed *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_907)(GLenum pname, GLfixed param); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_908)(GLenum pname, const GLfixed *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_909)(GLenum light, GLenum pname, GLfixed param); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_910)(GLenum light, GLenum pname, const GLfixed *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_911)(GLfixed width); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_912)(const GLfixed *m); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_913)(GLenum face, GLenum pname, GLfixed param); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_914)(GLenum face, GLenum pname, const GLfixed *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_915)(const GLfixed *m); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_916)(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_917)(GLfixed nx, GLfixed ny, GLfixed nz); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_918)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_919)(GLenum pname, GLfixed param); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_920)(GLenum pname, const GLfixed *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_921)(GLfixed size); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_922)(GLfixed factor, GLfixed units); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_923)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_924)(GLclampx value, GLboolean invert); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_925)(GLfixed x, GLfixed y, GLfixed z); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_926)(GLenum target, GLenum pname, GLfixed param); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_927)(GLenum target, GLenum pname, const GLfixed *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_928)(GLenum coord, GLenum pname, GLint param); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_929)(GLenum coord, GLenum pname, const GLfixed *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_930)(GLenum target, GLenum pname, GLfixed param); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_931)(GLenum target, GLenum pname, const GLfixed *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_932)(GLfixed x, GLfixed y, GLfixed z); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_933)(GLenum plane, const GLfloat *equation); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_934)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_935)(GLenum plane, GLfloat *equation); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_936)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_937)(GLclampd zmin, GLclampd zmax); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_938)(GLenum modeRGB, GLenum modeA); -GLAPI void APIENTRY GLAPI_PREFIX(BlendEquationSeparate)(GLenum modeRGB, GLenum modeA); -GLAPI void APIENTRY GLAPI_PREFIX(BindFramebufferEXT)(GLenum target, GLuint framebuffer); -GLAPI void APIENTRY GLAPI_PREFIX(BindFramebuffer)(GLenum target, GLuint framebuffer); -GLAPI void APIENTRY GLAPI_PREFIX(BindRenderbufferEXT)(GLenum target, GLuint renderbuffer); -GLAPI void APIENTRY GLAPI_PREFIX(BindRenderbuffer)(GLenum target, GLuint renderbuffer); -GLAPI GLenum APIENTRY GLAPI_PREFIX(CheckFramebufferStatusEXT)(GLenum target); -GLAPI GLenum APIENTRY GLAPI_PREFIX(CheckFramebufferStatus)(GLenum target); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteFramebuffersEXT)(GLsizei n, const GLuint *framebuffers); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteFramebuffers)(GLsizei n, const GLuint *framebuffers); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteRenderbuffersEXT)(GLsizei n, const GLuint *renderbuffers); -GLAPI void APIENTRY GLAPI_PREFIX(DeleteRenderbuffers)(GLsizei n, const GLuint *renderbuffers); -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture1D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture3D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -GLAPI void APIENTRY GLAPI_PREFIX(GenFramebuffersEXT)(GLsizei n, GLuint *framebuffers); -GLAPI void APIENTRY GLAPI_PREFIX(GenFramebuffers)(GLsizei n, GLuint *framebuffers); -GLAPI void APIENTRY GLAPI_PREFIX(GenRenderbuffersEXT)(GLsizei n, GLuint *renderbuffers); -GLAPI void APIENTRY GLAPI_PREFIX(GenRenderbuffers)(GLsizei n, GLuint *renderbuffers); -GLAPI void APIENTRY GLAPI_PREFIX(GenerateMipmapEXT)(GLenum target); -GLAPI void APIENTRY GLAPI_PREFIX(GenerateMipmap)(GLenum target); -GLAPI void APIENTRY GLAPI_PREFIX(GetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint *params); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsFramebufferEXT)(GLuint framebuffer); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsFramebuffer)(GLuint framebuffer); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsRenderbufferEXT)(GLuint renderbuffer); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsRenderbuffer)(GLuint renderbuffer); -GLAPI void APIENTRY GLAPI_PREFIX(RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GLAPI void APIENTRY GLAPI_PREFIX(RenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_956)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -GLAPI void APIENTRY GLAPI_PREFIX(BlitFramebuffer)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_957)(GLenum target, GLenum pname, GLint param); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_958)(GLenum target, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY GLAPI_PREFIX(BindFragDataLocationEXT)(GLuint program, GLuint colorNumber, const GLchar *name); -GLAPI void APIENTRY GLAPI_PREFIX(BindFragDataLocation)(GLuint program, GLuint colorNumber, const GLchar *name); -GLAPI GLint APIENTRY GLAPI_PREFIX(GetFragDataLocationEXT)(GLuint program, const GLchar *name); -GLAPI GLint APIENTRY GLAPI_PREFIX(GetFragDataLocation)(GLuint program, const GLchar *name); -GLAPI void APIENTRY GLAPI_PREFIX(GetUniformuivEXT)(GLuint program, GLint location, GLuint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetUniformuiv)(GLuint program, GLint location, GLuint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribIivEXT)(GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribIiv)(GLuint index, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribIuivEXT)(GLuint index, GLenum pname, GLuint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribIuiv)(GLuint index, GLenum pname, GLuint *params); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1uiEXT)(GLint location, GLuint x); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1ui)(GLint location, GLuint x); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1uivEXT)(GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1uiv)(GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2uiEXT)(GLint location, GLuint x, GLuint y); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2ui)(GLint location, GLuint x, GLuint y); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2uivEXT)(GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2uiv)(GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3uiEXT)(GLint location, GLuint x, GLuint y, GLuint z); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3ui)(GLint location, GLuint x, GLuint y, GLuint z); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3uivEXT)(GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3uiv)(GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4uiEXT)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4ui)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4uivEXT)(GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4uiv)(GLint location, GLsizei count, const GLuint *value); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1iEXT)(GLuint index, GLint x); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1i)(GLuint index, GLint x); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1ivEXT)(GLuint index, const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1iv)(GLuint index, const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1uiEXT)(GLuint index, GLuint x); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1ui)(GLuint index, GLuint x); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1uivEXT)(GLuint index, const GLuint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1uiv)(GLuint index, const GLuint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2iEXT)(GLuint index, GLint x, GLint y); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2i)(GLuint index, GLint x, GLint y); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2ivEXT)(GLuint index, const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2iv)(GLuint index, const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2uiEXT)(GLuint index, GLuint x, GLuint y); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2ui)(GLuint index, GLuint x, GLuint y); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2uivEXT)(GLuint index, const GLuint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2uiv)(GLuint index, const GLuint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3iEXT)(GLuint index, GLint x, GLint y, GLint z); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3i)(GLuint index, GLint x, GLint y, GLint z); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3ivEXT)(GLuint index, const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3iv)(GLuint index, const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3uiEXT)(GLuint index, GLuint x, GLuint y, GLuint z); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3ui)(GLuint index, GLuint x, GLuint y, GLuint z); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3uivEXT)(GLuint index, const GLuint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3uiv)(GLuint index, const GLuint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4bvEXT)(GLuint index, const GLbyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4bv)(GLuint index, const GLbyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4iEXT)(GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4i)(GLuint index, GLint x, GLint y, GLint z, GLint w); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4ivEXT)(GLuint index, const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4iv)(GLuint index, const GLint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4svEXT)(GLuint index, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4sv)(GLuint index, const GLshort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4ubvEXT)(GLuint index, const GLubyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4ubv)(GLuint index, const GLubyte *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4uiEXT)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4ui)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4uivEXT)(GLuint index, const GLuint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4uiv)(GLuint index, const GLuint *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4usvEXT)(GLuint index, const GLushort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4usv)(GLuint index, const GLushort *v); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribIPointerEXT)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribIPointer)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTextureLayerEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTextureLayer)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTextureLayerARB)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); -GLAPI void APIENTRY GLAPI_PREFIX(ColorMaskIndexedEXT)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -GLAPI void APIENTRY GLAPI_PREFIX(ColorMaski)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a); -GLAPI void APIENTRY GLAPI_PREFIX(DisableIndexedEXT)(GLenum target, GLuint index); -GLAPI void APIENTRY GLAPI_PREFIX(Disablei)(GLenum target, GLuint index); -GLAPI void APIENTRY GLAPI_PREFIX(EnableIndexedEXT)(GLenum target, GLuint index); -GLAPI void APIENTRY GLAPI_PREFIX(Enablei)(GLenum target, GLuint index); -GLAPI void APIENTRY GLAPI_PREFIX(GetBooleanIndexedvEXT)(GLenum value, GLuint index, GLboolean *data); -GLAPI void APIENTRY GLAPI_PREFIX(GetBooleani_v)(GLenum value, GLuint index, GLboolean *data); -GLAPI void APIENTRY GLAPI_PREFIX(GetIntegerIndexedvEXT)(GLenum value, GLuint index, GLint *data); -GLAPI void APIENTRY GLAPI_PREFIX(GetIntegeri_v)(GLenum value, GLuint index, GLint *data); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsEnabledIndexedEXT)(GLenum target, GLuint index); -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsEnabledi)(GLenum target, GLuint index); -GLAPI void APIENTRY GLAPI_PREFIX(ClearColorIiEXT)(GLint r, GLint g, GLint b, GLint a); -GLAPI void APIENTRY GLAPI_PREFIX(ClearColorIuiEXT)(GLuint r, GLuint g, GLuint b, GLuint a); -GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameterIivEXT)(GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameterIiv)(GLenum target, GLenum pname, GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameterIuivEXT)(GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameterIuiv)(GLenum target, GLenum pname, GLuint *params); -GLAPI void APIENTRY GLAPI_PREFIX(TexParameterIivEXT)(GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(TexParameterIiv)(GLenum target, GLenum pname, const GLint *params); -GLAPI void APIENTRY GLAPI_PREFIX(TexParameterIuivEXT)(GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY GLAPI_PREFIX(TexParameterIuiv)(GLenum target, GLenum pname, const GLuint *params); -GLAPI void APIENTRY GLAPI_PREFIX(BeginConditionalRenderNV)(GLuint query, GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(BeginConditionalRender)(GLuint query, GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(EndConditionalRenderNV)(void); -GLAPI void APIENTRY GLAPI_PREFIX(EndConditionalRender)(void); -GLAPI void APIENTRY GLAPI_PREFIX(BeginTransformFeedbackEXT)(GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(BeginTransformFeedback)(GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(BindBufferBaseEXT)(GLenum target, GLuint index, GLuint buffer); -GLAPI void APIENTRY GLAPI_PREFIX(BindBufferBase)(GLenum target, GLuint index, GLuint buffer); -GLAPI void APIENTRY GLAPI_PREFIX(BindBufferOffsetEXT)(GLenum target, GLuint index, GLuint buffer, GLintptr offset); -GLAPI void APIENTRY GLAPI_PREFIX(BindBufferRangeEXT)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY GLAPI_PREFIX(BindBufferRange)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); -GLAPI void APIENTRY GLAPI_PREFIX(EndTransformFeedbackEXT)(void); -GLAPI void APIENTRY GLAPI_PREFIX(EndTransformFeedback)(void); -GLAPI void APIENTRY GLAPI_PREFIX(GetTransformFeedbackVaryingEXT)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY GLAPI_PREFIX(GetTransformFeedbackVarying)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); -GLAPI void APIENTRY GLAPI_PREFIX(TransformFeedbackVaryingsEXT)(GLuint program, GLsizei count, const char **varyings, GLenum bufferMode); -GLAPI void APIENTRY GLAPI_PREFIX(TransformFeedbackVaryings)(GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); -GLAPI void APIENTRY GLAPI_PREFIX(ProvokingVertexEXT)(GLenum mode); -GLAPI void APIENTRY GLAPI_PREFIX(ProvokingVertex)(GLenum mode); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_1016)(GLenum target, GLenum pname, GLvoid **params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_1017)(GLenum target, GLsizei length, GLvoid *pointer); -GLAPI void APIENTRY GLAPI_PREFIX(GetObjectParameterivAPPLE)(GLenum objectType, GLuint name, GLenum pname, GLint *value); -GLAPI GLenum APIENTRY GLAPI_PREFIX(ObjectPurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option); -GLAPI GLenum APIENTRY GLAPI_PREFIX(ObjectUnpurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option); -GLAPI void APIENTRY GLAPI_PREFIX(ActiveProgramEXT)(GLuint program); -GLAPI GLuint APIENTRY GLAPI_PREFIX(CreateShaderProgramEXT)(GLenum type, const GLchar *string); -GLAPI void APIENTRY GLAPI_PREFIX(UseShaderProgramEXT)(GLenum type, GLuint program); -GLAPI void APIENTRY GLAPI_PREFIX(TextureBarrierNV)(void); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_1025)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_1026)(GLenum target, GLuint index, GLsizei count, const GLfloat *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_1027)(GLenum target, GLuint index, GLsizei count, const GLfloat *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_1028)(GLuint id, GLenum pname, GLint64EXT *params); -void APIENTRY GLAPI_PREFIX(_dispatch_stub_1029)(GLuint id, GLenum pname, GLuint64EXT *params); -GLAPI void APIENTRY GLAPI_PREFIX(EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid *writeOffset); -GLAPI void APIENTRY GLAPI_PREFIX(EGLImageTargetTexture2DOES)(GLenum target, GLvoid *writeOffset); -#undef MAPI_TMP_DEFINES -#endif /* MAPI_TMP_DEFINES */ - -#ifdef MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN -GLAPI void APIENTRY GLAPI_PREFIX(NewList)(GLuint list, GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[0]; - ((void (APIENTRY *)(GLuint list, GLenum mode)) _func)(list, mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EndList)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CallList)(GLuint list) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[2]; - ((void (APIENTRY *)(GLuint list)) _func)(list); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CallLists)(GLsizei n, GLenum type, const GLvoid *lists) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[3]; - ((void (APIENTRY *)(GLsizei n, GLenum type, const GLvoid *lists)) _func)(n, type, lists); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DeleteLists)(GLuint list, GLsizei range) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[4]; - ((void (APIENTRY *)(GLuint list, GLsizei range)) _func)(list, range); -} - -GLAPI GLuint APIENTRY GLAPI_PREFIX(GenLists)(GLsizei range) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[5]; - return ((GLuint (APIENTRY *)(GLsizei range)) _func)(range); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ListBase)(GLuint base) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[6]; - ((void (APIENTRY *)(GLuint base)) _func)(base); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Begin)(GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[7]; - ((void (APIENTRY *)(GLenum mode)) _func)(mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Bitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[8]; - ((void (APIENTRY *)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)) _func)(width, height, xorig, yorig, xmove, ymove, bitmap); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color3b)(GLbyte red, GLbyte green, GLbyte blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[9]; - ((void (APIENTRY *)(GLbyte red, GLbyte green, GLbyte blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color3bv)(const GLbyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[10]; - ((void (APIENTRY *)(const GLbyte *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color3d)(GLdouble red, GLdouble green, GLdouble blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[11]; - ((void (APIENTRY *)(GLdouble red, GLdouble green, GLdouble blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color3dv)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[12]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color3f)(GLfloat red, GLfloat green, GLfloat blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[13]; - ((void (APIENTRY *)(GLfloat red, GLfloat green, GLfloat blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color3fv)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[14]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color3i)(GLint red, GLint green, GLint blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[15]; - ((void (APIENTRY *)(GLint red, GLint green, GLint blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color3iv)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[16]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color3s)(GLshort red, GLshort green, GLshort blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[17]; - ((void (APIENTRY *)(GLshort red, GLshort green, GLshort blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color3sv)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[18]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color3ub)(GLubyte red, GLubyte green, GLubyte blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[19]; - ((void (APIENTRY *)(GLubyte red, GLubyte green, GLubyte blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color3ubv)(const GLubyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[20]; - ((void (APIENTRY *)(const GLubyte *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color3ui)(GLuint red, GLuint green, GLuint blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[21]; - ((void (APIENTRY *)(GLuint red, GLuint green, GLuint blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color3uiv)(const GLuint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[22]; - ((void (APIENTRY *)(const GLuint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color3us)(GLushort red, GLushort green, GLushort blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[23]; - ((void (APIENTRY *)(GLushort red, GLushort green, GLushort blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color3usv)(const GLushort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[24]; - ((void (APIENTRY *)(const GLushort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[25]; - ((void (APIENTRY *)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)) _func)(red, green, blue, alpha); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color4bv)(const GLbyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[26]; - ((void (APIENTRY *)(const GLbyte *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[27]; - ((void (APIENTRY *)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)) _func)(red, green, blue, alpha); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color4dv)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[28]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[29]; - ((void (APIENTRY *)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)) _func)(red, green, blue, alpha); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color4fv)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[30]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color4i)(GLint red, GLint green, GLint blue, GLint alpha) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[31]; - ((void (APIENTRY *)(GLint red, GLint green, GLint blue, GLint alpha)) _func)(red, green, blue, alpha); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color4iv)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[32]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[33]; - ((void (APIENTRY *)(GLshort red, GLshort green, GLshort blue, GLshort alpha)) _func)(red, green, blue, alpha); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color4sv)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[34]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[35]; - ((void (APIENTRY *)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)) _func)(red, green, blue, alpha); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color4ubv)(const GLubyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[36]; - ((void (APIENTRY *)(const GLubyte *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[37]; - ((void (APIENTRY *)(GLuint red, GLuint green, GLuint blue, GLuint alpha)) _func)(red, green, blue, alpha); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color4uiv)(const GLuint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[38]; - ((void (APIENTRY *)(const GLuint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[39]; - ((void (APIENTRY *)(GLushort red, GLushort green, GLushort blue, GLushort alpha)) _func)(red, green, blue, alpha); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Color4usv)(const GLushort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[40]; - ((void (APIENTRY *)(const GLushort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EdgeFlag)(GLboolean flag) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[41]; - ((void (APIENTRY *)(GLboolean flag)) _func)(flag); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EdgeFlagv)(const GLboolean *flag) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[42]; - ((void (APIENTRY *)(const GLboolean *flag)) _func)(flag); -} - -GLAPI void APIENTRY GLAPI_PREFIX(End)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[43]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Indexd)(GLdouble c) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[44]; - ((void (APIENTRY *)(GLdouble c)) _func)(c); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Indexdv)(const GLdouble *c) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[45]; - ((void (APIENTRY *)(const GLdouble *c)) _func)(c); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Indexf)(GLfloat c) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[46]; - ((void (APIENTRY *)(GLfloat c)) _func)(c); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Indexfv)(const GLfloat *c) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[47]; - ((void (APIENTRY *)(const GLfloat *c)) _func)(c); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Indexi)(GLint c) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[48]; - ((void (APIENTRY *)(GLint c)) _func)(c); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Indexiv)(const GLint *c) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[49]; - ((void (APIENTRY *)(const GLint *c)) _func)(c); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Indexs)(GLshort c) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[50]; - ((void (APIENTRY *)(GLshort c)) _func)(c); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Indexsv)(const GLshort *c) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[51]; - ((void (APIENTRY *)(const GLshort *c)) _func)(c); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Normal3b)(GLbyte nx, GLbyte ny, GLbyte nz) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[52]; - ((void (APIENTRY *)(GLbyte nx, GLbyte ny, GLbyte nz)) _func)(nx, ny, nz); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Normal3bv)(const GLbyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[53]; - ((void (APIENTRY *)(const GLbyte *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Normal3d)(GLdouble nx, GLdouble ny, GLdouble nz) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[54]; - ((void (APIENTRY *)(GLdouble nx, GLdouble ny, GLdouble nz)) _func)(nx, ny, nz); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Normal3dv)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[55]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Normal3f)(GLfloat nx, GLfloat ny, GLfloat nz) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[56]; - ((void (APIENTRY *)(GLfloat nx, GLfloat ny, GLfloat nz)) _func)(nx, ny, nz); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Normal3fv)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[57]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Normal3i)(GLint nx, GLint ny, GLint nz) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[58]; - ((void (APIENTRY *)(GLint nx, GLint ny, GLint nz)) _func)(nx, ny, nz); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Normal3iv)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[59]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Normal3s)(GLshort nx, GLshort ny, GLshort nz) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[60]; - ((void (APIENTRY *)(GLshort nx, GLshort ny, GLshort nz)) _func)(nx, ny, nz); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Normal3sv)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[61]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2d)(GLdouble x, GLdouble y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[62]; - ((void (APIENTRY *)(GLdouble x, GLdouble y)) _func)(x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2dv)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[63]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2f)(GLfloat x, GLfloat y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[64]; - ((void (APIENTRY *)(GLfloat x, GLfloat y)) _func)(x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2fv)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[65]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2i)(GLint x, GLint y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[66]; - ((void (APIENTRY *)(GLint x, GLint y)) _func)(x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2iv)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[67]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2s)(GLshort x, GLshort y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[68]; - ((void (APIENTRY *)(GLshort x, GLshort y)) _func)(x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos2sv)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[69]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3d)(GLdouble x, GLdouble y, GLdouble z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[70]; - ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3dv)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[71]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3f)(GLfloat x, GLfloat y, GLfloat z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[72]; - ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3fv)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[73]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3i)(GLint x, GLint y, GLint z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[74]; - ((void (APIENTRY *)(GLint x, GLint y, GLint z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3iv)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[75]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3s)(GLshort x, GLshort y, GLshort z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[76]; - ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos3sv)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[77]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[78]; - ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4dv)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[79]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[80]; - ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4fv)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[81]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4i)(GLint x, GLint y, GLint z, GLint w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[82]; - ((void (APIENTRY *)(GLint x, GLint y, GLint z, GLint w)) _func)(x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4iv)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[83]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[84]; - ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z, GLshort w)) _func)(x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RasterPos4sv)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[85]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Rectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[86]; - ((void (APIENTRY *)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)) _func)(x1, y1, x2, y2); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Rectdv)(const GLdouble *v1, const GLdouble *v2) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[87]; - ((void (APIENTRY *)(const GLdouble *v1, const GLdouble *v2)) _func)(v1, v2); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Rectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[88]; - ((void (APIENTRY *)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)) _func)(x1, y1, x2, y2); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Rectfv)(const GLfloat *v1, const GLfloat *v2) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[89]; - ((void (APIENTRY *)(const GLfloat *v1, const GLfloat *v2)) _func)(v1, v2); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Recti)(GLint x1, GLint y1, GLint x2, GLint y2) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[90]; - ((void (APIENTRY *)(GLint x1, GLint y1, GLint x2, GLint y2)) _func)(x1, y1, x2, y2); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Rectiv)(const GLint *v1, const GLint *v2) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[91]; - ((void (APIENTRY *)(const GLint *v1, const GLint *v2)) _func)(v1, v2); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Rects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[92]; - ((void (APIENTRY *)(GLshort x1, GLshort y1, GLshort x2, GLshort y2)) _func)(x1, y1, x2, y2); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Rectsv)(const GLshort *v1, const GLshort *v2) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[93]; - ((void (APIENTRY *)(const GLshort *v1, const GLshort *v2)) _func)(v1, v2); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1d)(GLdouble s) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[94]; - ((void (APIENTRY *)(GLdouble s)) _func)(s); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1dv)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[95]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1f)(GLfloat s) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[96]; - ((void (APIENTRY *)(GLfloat s)) _func)(s); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1fv)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[97]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1i)(GLint s) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[98]; - ((void (APIENTRY *)(GLint s)) _func)(s); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1iv)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[99]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1s)(GLshort s) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[100]; - ((void (APIENTRY *)(GLshort s)) _func)(s); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord1sv)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[101]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2d)(GLdouble s, GLdouble t) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[102]; - ((void (APIENTRY *)(GLdouble s, GLdouble t)) _func)(s, t); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2dv)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[103]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2f)(GLfloat s, GLfloat t) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[104]; - ((void (APIENTRY *)(GLfloat s, GLfloat t)) _func)(s, t); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2fv)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[105]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2i)(GLint s, GLint t) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[106]; - ((void (APIENTRY *)(GLint s, GLint t)) _func)(s, t); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2iv)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[107]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2s)(GLshort s, GLshort t) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[108]; - ((void (APIENTRY *)(GLshort s, GLshort t)) _func)(s, t); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord2sv)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[109]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3d)(GLdouble s, GLdouble t, GLdouble r) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[110]; - ((void (APIENTRY *)(GLdouble s, GLdouble t, GLdouble r)) _func)(s, t, r); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3dv)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[111]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3f)(GLfloat s, GLfloat t, GLfloat r) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[112]; - ((void (APIENTRY *)(GLfloat s, GLfloat t, GLfloat r)) _func)(s, t, r); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3fv)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[113]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3i)(GLint s, GLint t, GLint r) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[114]; - ((void (APIENTRY *)(GLint s, GLint t, GLint r)) _func)(s, t, r); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3iv)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[115]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3s)(GLshort s, GLshort t, GLshort r) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[116]; - ((void (APIENTRY *)(GLshort s, GLshort t, GLshort r)) _func)(s, t, r); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord3sv)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[117]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[118]; - ((void (APIENTRY *)(GLdouble s, GLdouble t, GLdouble r, GLdouble q)) _func)(s, t, r, q); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4dv)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[119]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[120]; - ((void (APIENTRY *)(GLfloat s, GLfloat t, GLfloat r, GLfloat q)) _func)(s, t, r, q); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4fv)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[121]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4i)(GLint s, GLint t, GLint r, GLint q) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[122]; - ((void (APIENTRY *)(GLint s, GLint t, GLint r, GLint q)) _func)(s, t, r, q); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4iv)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[123]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[124]; - ((void (APIENTRY *)(GLshort s, GLshort t, GLshort r, GLshort q)) _func)(s, t, r, q); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoord4sv)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[125]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex2d)(GLdouble x, GLdouble y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[126]; - ((void (APIENTRY *)(GLdouble x, GLdouble y)) _func)(x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex2dv)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[127]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex2f)(GLfloat x, GLfloat y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[128]; - ((void (APIENTRY *)(GLfloat x, GLfloat y)) _func)(x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex2fv)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[129]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex2i)(GLint x, GLint y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[130]; - ((void (APIENTRY *)(GLint x, GLint y)) _func)(x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex2iv)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[131]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex2s)(GLshort x, GLshort y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[132]; - ((void (APIENTRY *)(GLshort x, GLshort y)) _func)(x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex2sv)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[133]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex3d)(GLdouble x, GLdouble y, GLdouble z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[134]; - ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex3dv)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[135]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex3f)(GLfloat x, GLfloat y, GLfloat z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[136]; - ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex3fv)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[137]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex3i)(GLint x, GLint y, GLint z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[138]; - ((void (APIENTRY *)(GLint x, GLint y, GLint z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex3iv)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[139]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex3s)(GLshort x, GLshort y, GLshort z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[140]; - ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex3sv)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[141]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[142]; - ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex4dv)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[143]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[144]; - ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex4fv)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[145]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex4i)(GLint x, GLint y, GLint z, GLint w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[146]; - ((void (APIENTRY *)(GLint x, GLint y, GLint z, GLint w)) _func)(x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex4iv)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[147]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex4s)(GLshort x, GLshort y, GLshort z, GLshort w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[148]; - ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z, GLshort w)) _func)(x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Vertex4sv)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[149]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ClipPlane)(GLenum plane, const GLdouble *equation) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[150]; - ((void (APIENTRY *)(GLenum plane, const GLdouble *equation)) _func)(plane, equation); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ColorMaterial)(GLenum face, GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[151]; - ((void (APIENTRY *)(GLenum face, GLenum mode)) _func)(face, mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CullFace)(GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[152]; - ((void (APIENTRY *)(GLenum mode)) _func)(mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Fogf)(GLenum pname, GLfloat param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[153]; - ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Fogfv)(GLenum pname, const GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[154]; - ((void (APIENTRY *)(GLenum pname, const GLfloat *params)) _func)(pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Fogi)(GLenum pname, GLint param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[155]; - ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Fogiv)(GLenum pname, const GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[156]; - ((void (APIENTRY *)(GLenum pname, const GLint *params)) _func)(pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FrontFace)(GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[157]; - ((void (APIENTRY *)(GLenum mode)) _func)(mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Hint)(GLenum target, GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[158]; - ((void (APIENTRY *)(GLenum target, GLenum mode)) _func)(target, mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Lightf)(GLenum light, GLenum pname, GLfloat param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[159]; - ((void (APIENTRY *)(GLenum light, GLenum pname, GLfloat param)) _func)(light, pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Lightfv)(GLenum light, GLenum pname, const GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[160]; - ((void (APIENTRY *)(GLenum light, GLenum pname, const GLfloat *params)) _func)(light, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Lighti)(GLenum light, GLenum pname, GLint param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[161]; - ((void (APIENTRY *)(GLenum light, GLenum pname, GLint param)) _func)(light, pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Lightiv)(GLenum light, GLenum pname, const GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[162]; - ((void (APIENTRY *)(GLenum light, GLenum pname, const GLint *params)) _func)(light, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(LightModelf)(GLenum pname, GLfloat param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[163]; - ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(LightModelfv)(GLenum pname, const GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[164]; - ((void (APIENTRY *)(GLenum pname, const GLfloat *params)) _func)(pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(LightModeli)(GLenum pname, GLint param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[165]; - ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(LightModeliv)(GLenum pname, const GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[166]; - ((void (APIENTRY *)(GLenum pname, const GLint *params)) _func)(pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(LineStipple)(GLint factor, GLushort pattern) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[167]; - ((void (APIENTRY *)(GLint factor, GLushort pattern)) _func)(factor, pattern); -} - -GLAPI void APIENTRY GLAPI_PREFIX(LineWidth)(GLfloat width) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[168]; - ((void (APIENTRY *)(GLfloat width)) _func)(width); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Materialf)(GLenum face, GLenum pname, GLfloat param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[169]; - ((void (APIENTRY *)(GLenum face, GLenum pname, GLfloat param)) _func)(face, pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Materialfv)(GLenum face, GLenum pname, const GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[170]; - ((void (APIENTRY *)(GLenum face, GLenum pname, const GLfloat *params)) _func)(face, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Materiali)(GLenum face, GLenum pname, GLint param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[171]; - ((void (APIENTRY *)(GLenum face, GLenum pname, GLint param)) _func)(face, pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Materialiv)(GLenum face, GLenum pname, const GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[172]; - ((void (APIENTRY *)(GLenum face, GLenum pname, const GLint *params)) _func)(face, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PointSize)(GLfloat size) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[173]; - ((void (APIENTRY *)(GLfloat size)) _func)(size); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PolygonMode)(GLenum face, GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[174]; - ((void (APIENTRY *)(GLenum face, GLenum mode)) _func)(face, mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PolygonStipple)(const GLubyte *mask) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[175]; - ((void (APIENTRY *)(const GLubyte *mask)) _func)(mask); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Scissor)(GLint x, GLint y, GLsizei width, GLsizei height) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[176]; - ((void (APIENTRY *)(GLint x, GLint y, GLsizei width, GLsizei height)) _func)(x, y, width, height); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ShadeModel)(GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[177]; - ((void (APIENTRY *)(GLenum mode)) _func)(mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexParameterf)(GLenum target, GLenum pname, GLfloat param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[178]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat param)) _func)(target, pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexParameterfv)(GLenum target, GLenum pname, const GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[179]; - ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfloat *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexParameteri)(GLenum target, GLenum pname, GLint param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[180]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLint param)) _func)(target, pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexParameteriv)(GLenum target, GLenum pname, const GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[181]; - ((void (APIENTRY *)(GLenum target, GLenum pname, const GLint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[182]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, internalformat, width, border, format, type, pixels); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[183]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, internalformat, width, height, border, format, type, pixels); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexEnvf)(GLenum target, GLenum pname, GLfloat param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[184]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat param)) _func)(target, pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexEnvfv)(GLenum target, GLenum pname, const GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[185]; - ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfloat *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexEnvi)(GLenum target, GLenum pname, GLint param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[186]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLint param)) _func)(target, pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexEnviv)(GLenum target, GLenum pname, const GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[187]; - ((void (APIENTRY *)(GLenum target, GLenum pname, const GLint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexGend)(GLenum coord, GLenum pname, GLdouble param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[188]; - ((void (APIENTRY *)(GLenum coord, GLenum pname, GLdouble param)) _func)(coord, pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexGendv)(GLenum coord, GLenum pname, const GLdouble *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[189]; - ((void (APIENTRY *)(GLenum coord, GLenum pname, const GLdouble *params)) _func)(coord, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexGenf)(GLenum coord, GLenum pname, GLfloat param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[190]; - ((void (APIENTRY *)(GLenum coord, GLenum pname, GLfloat param)) _func)(coord, pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexGenfv)(GLenum coord, GLenum pname, const GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[191]; - ((void (APIENTRY *)(GLenum coord, GLenum pname, const GLfloat *params)) _func)(coord, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexGeni)(GLenum coord, GLenum pname, GLint param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[192]; - ((void (APIENTRY *)(GLenum coord, GLenum pname, GLint param)) _func)(coord, pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexGeniv)(GLenum coord, GLenum pname, const GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[193]; - ((void (APIENTRY *)(GLenum coord, GLenum pname, const GLint *params)) _func)(coord, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FeedbackBuffer)(GLsizei size, GLenum type, GLfloat *buffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[194]; - ((void (APIENTRY *)(GLsizei size, GLenum type, GLfloat *buffer)) _func)(size, type, buffer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SelectBuffer)(GLsizei size, GLuint *buffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[195]; - ((void (APIENTRY *)(GLsizei size, GLuint *buffer)) _func)(size, buffer); -} - -GLAPI GLint APIENTRY GLAPI_PREFIX(RenderMode)(GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[196]; - return ((GLint (APIENTRY *)(GLenum mode)) _func)(mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(InitNames)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[197]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(LoadName)(GLuint name) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[198]; - ((void (APIENTRY *)(GLuint name)) _func)(name); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PassThrough)(GLfloat token) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[199]; - ((void (APIENTRY *)(GLfloat token)) _func)(token); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PopName)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[200]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PushName)(GLuint name) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[201]; - ((void (APIENTRY *)(GLuint name)) _func)(name); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawBuffer)(GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[202]; - ((void (APIENTRY *)(GLenum mode)) _func)(mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Clear)(GLbitfield mask) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[203]; - ((void (APIENTRY *)(GLbitfield mask)) _func)(mask); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[204]; - ((void (APIENTRY *)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)) _func)(red, green, blue, alpha); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ClearIndex)(GLfloat c) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[205]; - ((void (APIENTRY *)(GLfloat c)) _func)(c); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[206]; - ((void (APIENTRY *)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)) _func)(red, green, blue, alpha); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ClearStencil)(GLint s) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[207]; - ((void (APIENTRY *)(GLint s)) _func)(s); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ClearDepth)(GLclampd depth) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[208]; - ((void (APIENTRY *)(GLclampd depth)) _func)(depth); -} - -GLAPI void APIENTRY GLAPI_PREFIX(StencilMask)(GLuint mask) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[209]; - ((void (APIENTRY *)(GLuint mask)) _func)(mask); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[210]; - ((void (APIENTRY *)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)) _func)(red, green, blue, alpha); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DepthMask)(GLboolean flag) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[211]; - ((void (APIENTRY *)(GLboolean flag)) _func)(flag); -} - -GLAPI void APIENTRY GLAPI_PREFIX(IndexMask)(GLuint mask) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[212]; - ((void (APIENTRY *)(GLuint mask)) _func)(mask); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Accum)(GLenum op, GLfloat value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[213]; - ((void (APIENTRY *)(GLenum op, GLfloat value)) _func)(op, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Disable)(GLenum cap) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[214]; - ((void (APIENTRY *)(GLenum cap)) _func)(cap); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Enable)(GLenum cap) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[215]; - ((void (APIENTRY *)(GLenum cap)) _func)(cap); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Finish)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[216]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Flush)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[217]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PopAttrib)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[218]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PushAttrib)(GLbitfield mask) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[219]; - ((void (APIENTRY *)(GLbitfield mask)) _func)(mask); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Map1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[220]; - ((void (APIENTRY *)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)) _func)(target, u1, u2, stride, order, points); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Map1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[221]; - ((void (APIENTRY *)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)) _func)(target, u1, u2, stride, order, points); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Map2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[222]; - ((void (APIENTRY *)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points)) _func)(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Map2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[223]; - ((void (APIENTRY *)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)) _func)(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MapGrid1d)(GLint un, GLdouble u1, GLdouble u2) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[224]; - ((void (APIENTRY *)(GLint un, GLdouble u1, GLdouble u2)) _func)(un, u1, u2); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MapGrid1f)(GLint un, GLfloat u1, GLfloat u2) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[225]; - ((void (APIENTRY *)(GLint un, GLfloat u1, GLfloat u2)) _func)(un, u1, u2); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[226]; - ((void (APIENTRY *)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)) _func)(un, u1, u2, vn, v1, v2); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[227]; - ((void (APIENTRY *)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)) _func)(un, u1, u2, vn, v1, v2); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord1d)(GLdouble u) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[228]; - ((void (APIENTRY *)(GLdouble u)) _func)(u); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord1dv)(const GLdouble *u) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[229]; - ((void (APIENTRY *)(const GLdouble *u)) _func)(u); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord1f)(GLfloat u) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[230]; - ((void (APIENTRY *)(GLfloat u)) _func)(u); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord1fv)(const GLfloat *u) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[231]; - ((void (APIENTRY *)(const GLfloat *u)) _func)(u); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord2d)(GLdouble u, GLdouble v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[232]; - ((void (APIENTRY *)(GLdouble u, GLdouble v)) _func)(u, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord2dv)(const GLdouble *u) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[233]; - ((void (APIENTRY *)(const GLdouble *u)) _func)(u); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord2f)(GLfloat u, GLfloat v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[234]; - ((void (APIENTRY *)(GLfloat u, GLfloat v)) _func)(u, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EvalCoord2fv)(const GLfloat *u) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[235]; - ((void (APIENTRY *)(const GLfloat *u)) _func)(u); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EvalMesh1)(GLenum mode, GLint i1, GLint i2) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[236]; - ((void (APIENTRY *)(GLenum mode, GLint i1, GLint i2)) _func)(mode, i1, i2); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EvalPoint1)(GLint i) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[237]; - ((void (APIENTRY *)(GLint i)) _func)(i); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[238]; - ((void (APIENTRY *)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)) _func)(mode, i1, i2, j1, j2); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EvalPoint2)(GLint i, GLint j) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[239]; - ((void (APIENTRY *)(GLint i, GLint j)) _func)(i, j); -} - -GLAPI void APIENTRY GLAPI_PREFIX(AlphaFunc)(GLenum func, GLclampf ref) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[240]; - ((void (APIENTRY *)(GLenum func, GLclampf ref)) _func)(func, ref); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BlendFunc)(GLenum sfactor, GLenum dfactor) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[241]; - ((void (APIENTRY *)(GLenum sfactor, GLenum dfactor)) _func)(sfactor, dfactor); -} - -GLAPI void APIENTRY GLAPI_PREFIX(LogicOp)(GLenum opcode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[242]; - ((void (APIENTRY *)(GLenum opcode)) _func)(opcode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(StencilFunc)(GLenum func, GLint ref, GLuint mask) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[243]; - ((void (APIENTRY *)(GLenum func, GLint ref, GLuint mask)) _func)(func, ref, mask); -} - -GLAPI void APIENTRY GLAPI_PREFIX(StencilOp)(GLenum fail, GLenum zfail, GLenum zpass) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[244]; - ((void (APIENTRY *)(GLenum fail, GLenum zfail, GLenum zpass)) _func)(fail, zfail, zpass); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DepthFunc)(GLenum func) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[245]; - ((void (APIENTRY *)(GLenum func)) _func)(func); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PixelZoom)(GLfloat xfactor, GLfloat yfactor) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[246]; - ((void (APIENTRY *)(GLfloat xfactor, GLfloat yfactor)) _func)(xfactor, yfactor); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PixelTransferf)(GLenum pname, GLfloat param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[247]; - ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PixelTransferi)(GLenum pname, GLint param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[248]; - ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PixelStoref)(GLenum pname, GLfloat param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[249]; - ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PixelStorei)(GLenum pname, GLint param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[250]; - ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PixelMapfv)(GLenum map, GLsizei mapsize, const GLfloat *values) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[251]; - ((void (APIENTRY *)(GLenum map, GLsizei mapsize, const GLfloat *values)) _func)(map, mapsize, values); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PixelMapuiv)(GLenum map, GLsizei mapsize, const GLuint *values) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[252]; - ((void (APIENTRY *)(GLenum map, GLsizei mapsize, const GLuint *values)) _func)(map, mapsize, values); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PixelMapusv)(GLenum map, GLsizei mapsize, const GLushort *values) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[253]; - ((void (APIENTRY *)(GLenum map, GLsizei mapsize, const GLushort *values)) _func)(map, mapsize, values); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ReadBuffer)(GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[254]; - ((void (APIENTRY *)(GLenum mode)) _func)(mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[255]; - ((void (APIENTRY *)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)) _func)(x, y, width, height, type); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[256]; - ((void (APIENTRY *)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)) _func)(x, y, width, height, format, type, pixels); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[257]; - ((void (APIENTRY *)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)) _func)(width, height, format, type, pixels); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetBooleanv)(GLenum pname, GLboolean *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[258]; - ((void (APIENTRY *)(GLenum pname, GLboolean *params)) _func)(pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetClipPlane)(GLenum plane, GLdouble *equation) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[259]; - ((void (APIENTRY *)(GLenum plane, GLdouble *equation)) _func)(plane, equation); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetDoublev)(GLenum pname, GLdouble *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[260]; - ((void (APIENTRY *)(GLenum pname, GLdouble *params)) _func)(pname, params); -} - -GLAPI GLenum APIENTRY GLAPI_PREFIX(GetError)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[261]; - return ((GLenum (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetFloatv)(GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[262]; - ((void (APIENTRY *)(GLenum pname, GLfloat *params)) _func)(pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetIntegerv)(GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[263]; - ((void (APIENTRY *)(GLenum pname, GLint *params)) _func)(pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetLightfv)(GLenum light, GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[264]; - ((void (APIENTRY *)(GLenum light, GLenum pname, GLfloat *params)) _func)(light, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetLightiv)(GLenum light, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[265]; - ((void (APIENTRY *)(GLenum light, GLenum pname, GLint *params)) _func)(light, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetMapdv)(GLenum target, GLenum query, GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[266]; - ((void (APIENTRY *)(GLenum target, GLenum query, GLdouble *v)) _func)(target, query, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetMapfv)(GLenum target, GLenum query, GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[267]; - ((void (APIENTRY *)(GLenum target, GLenum query, GLfloat *v)) _func)(target, query, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetMapiv)(GLenum target, GLenum query, GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[268]; - ((void (APIENTRY *)(GLenum target, GLenum query, GLint *v)) _func)(target, query, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetMaterialfv)(GLenum face, GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[269]; - ((void (APIENTRY *)(GLenum face, GLenum pname, GLfloat *params)) _func)(face, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetMaterialiv)(GLenum face, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[270]; - ((void (APIENTRY *)(GLenum face, GLenum pname, GLint *params)) _func)(face, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetPixelMapfv)(GLenum map, GLfloat *values) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[271]; - ((void (APIENTRY *)(GLenum map, GLfloat *values)) _func)(map, values); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetPixelMapuiv)(GLenum map, GLuint *values) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[272]; - ((void (APIENTRY *)(GLenum map, GLuint *values)) _func)(map, values); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetPixelMapusv)(GLenum map, GLushort *values) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[273]; - ((void (APIENTRY *)(GLenum map, GLushort *values)) _func)(map, values); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetPolygonStipple)(GLubyte *mask) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[274]; - ((void (APIENTRY *)(GLubyte *mask)) _func)(mask); -} - -GLAPI const GLubyte * APIENTRY GLAPI_PREFIX(GetString)(GLenum name) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[275]; - return ((const GLubyte * (APIENTRY *)(GLenum name)) _func)(name); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetTexEnvfv)(GLenum target, GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[276]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetTexEnviv)(GLenum target, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[277]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetTexGendv)(GLenum coord, GLenum pname, GLdouble *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[278]; - ((void (APIENTRY *)(GLenum coord, GLenum pname, GLdouble *params)) _func)(coord, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetTexGenfv)(GLenum coord, GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[279]; - ((void (APIENTRY *)(GLenum coord, GLenum pname, GLfloat *params)) _func)(coord, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetTexGeniv)(GLenum coord, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[280]; - ((void (APIENTRY *)(GLenum coord, GLenum pname, GLint *params)) _func)(coord, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[281]; - ((void (APIENTRY *)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels)) _func)(target, level, format, type, pixels); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameterfv)(GLenum target, GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[282]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameteriv)(GLenum target, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[283]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[284]; - ((void (APIENTRY *)(GLenum target, GLint level, GLenum pname, GLfloat *params)) _func)(target, level, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[285]; - ((void (APIENTRY *)(GLenum target, GLint level, GLenum pname, GLint *params)) _func)(target, level, pname, params); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsEnabled)(GLenum cap) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[286]; - return ((GLboolean (APIENTRY *)(GLenum cap)) _func)(cap); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsList)(GLuint list) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[287]; - return ((GLboolean (APIENTRY *)(GLuint list)) _func)(list); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DepthRange)(GLclampd zNear, GLclampd zFar) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[288]; - ((void (APIENTRY *)(GLclampd zNear, GLclampd zFar)) _func)(zNear, zFar); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Frustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[289]; - ((void (APIENTRY *)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)) _func)(left, right, bottom, top, zNear, zFar); -} - -GLAPI void APIENTRY GLAPI_PREFIX(LoadIdentity)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[290]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(LoadMatrixf)(const GLfloat *m) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[291]; - ((void (APIENTRY *)(const GLfloat *m)) _func)(m); -} - -GLAPI void APIENTRY GLAPI_PREFIX(LoadMatrixd)(const GLdouble *m) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[292]; - ((void (APIENTRY *)(const GLdouble *m)) _func)(m); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MatrixMode)(GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[293]; - ((void (APIENTRY *)(GLenum mode)) _func)(mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultMatrixf)(const GLfloat *m) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[294]; - ((void (APIENTRY *)(const GLfloat *m)) _func)(m); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultMatrixd)(const GLdouble *m) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[295]; - ((void (APIENTRY *)(const GLdouble *m)) _func)(m); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Ortho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[296]; - ((void (APIENTRY *)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)) _func)(left, right, bottom, top, zNear, zFar); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PopMatrix)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[297]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PushMatrix)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[298]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Rotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[299]; - ((void (APIENTRY *)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)) _func)(angle, x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Rotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[300]; - ((void (APIENTRY *)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)) _func)(angle, x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Scaled)(GLdouble x, GLdouble y, GLdouble z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[301]; - ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Scalef)(GLfloat x, GLfloat y, GLfloat z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[302]; - ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Translated)(GLdouble x, GLdouble y, GLdouble z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[303]; - ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Translatef)(GLfloat x, GLfloat y, GLfloat z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[304]; - ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Viewport)(GLint x, GLint y, GLsizei width, GLsizei height) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[305]; - ((void (APIENTRY *)(GLint x, GLint y, GLsizei width, GLsizei height)) _func)(x, y, width, height); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ArrayElement)(GLint i) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[306]; - ((void (APIENTRY *)(GLint i)) _func)(i); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ArrayElementEXT)(GLint i) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[306]; - ((void (APIENTRY *)(GLint i)) _func)(i); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindTexture)(GLenum target, GLuint texture) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[307]; - ((void (APIENTRY *)(GLenum target, GLuint texture)) _func)(target, texture); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindTextureEXT)(GLenum target, GLuint texture) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[307]; - ((void (APIENTRY *)(GLenum target, GLuint texture)) _func)(target, texture); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[308]; - ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(size, type, stride, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DisableClientState)(GLenum array) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[309]; - ((void (APIENTRY *)(GLenum array)) _func)(array); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawArrays)(GLenum mode, GLint first, GLsizei count) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[310]; - ((void (APIENTRY *)(GLenum mode, GLint first, GLsizei count)) _func)(mode, first, count); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawArraysEXT)(GLenum mode, GLint first, GLsizei count) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[310]; - ((void (APIENTRY *)(GLenum mode, GLint first, GLsizei count)) _func)(mode, first, count); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[311]; - ((void (APIENTRY *)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)) _func)(mode, count, type, indices); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EdgeFlagPointer)(GLsizei stride, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[312]; - ((void (APIENTRY *)(GLsizei stride, const GLvoid *pointer)) _func)(stride, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EnableClientState)(GLenum array) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[313]; - ((void (APIENTRY *)(GLenum array)) _func)(array); -} - -GLAPI void APIENTRY GLAPI_PREFIX(IndexPointer)(GLenum type, GLsizei stride, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[314]; - ((void (APIENTRY *)(GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(type, stride, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Indexub)(GLubyte c) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[315]; - ((void (APIENTRY *)(GLubyte c)) _func)(c); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Indexubv)(const GLubyte *c) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[316]; - ((void (APIENTRY *)(const GLubyte *c)) _func)(c); -} - -GLAPI void APIENTRY GLAPI_PREFIX(InterleavedArrays)(GLenum format, GLsizei stride, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[317]; - ((void (APIENTRY *)(GLenum format, GLsizei stride, const GLvoid *pointer)) _func)(format, stride, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(NormalPointer)(GLenum type, GLsizei stride, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[318]; - ((void (APIENTRY *)(GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(type, stride, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PolygonOffset)(GLfloat factor, GLfloat units) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[319]; - ((void (APIENTRY *)(GLfloat factor, GLfloat units)) _func)(factor, units); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[320]; - ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(size, type, stride, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[321]; - ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(size, type, stride, pointer); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(AreTexturesResident)(GLsizei n, const GLuint *textures, GLboolean *residences) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[322]; - return ((GLboolean (APIENTRY *)(GLsizei n, const GLuint *textures, GLboolean *residences)) _func)(n, textures, residences); -} - -#if 0 -GLAPI GLboolean APIENTRY GLAPI_PREFIX(AreTexturesResidentEXT)(GLsizei n, const GLuint *textures, GLboolean *residences) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[322]; - return ((GLboolean (APIENTRY *)(GLsizei n, const GLuint *textures, GLboolean *residences)) _func)(n, textures, residences); -} -#endif - -GLAPI void APIENTRY GLAPI_PREFIX(CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[323]; - ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)) _func)(target, level, internalformat, x, y, width, border); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CopyTexImage1DEXT)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[323]; - ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)) _func)(target, level, internalformat, x, y, width, border); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[324]; - ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)) _func)(target, level, internalformat, x, y, width, height, border); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CopyTexImage2DEXT)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[324]; - ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)) _func)(target, level, internalformat, x, y, width, height, border); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[325]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)) _func)(target, level, xoffset, x, y, width); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage1DEXT)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[325]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)) _func)(target, level, xoffset, x, y, width); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[326]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)) _func)(target, level, xoffset, yoffset, x, y, width, height); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage2DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[326]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)) _func)(target, level, xoffset, yoffset, x, y, width, height); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DeleteTextures)(GLsizei n, const GLuint *textures) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[327]; - ((void (APIENTRY *)(GLsizei n, const GLuint *textures)) _func)(n, textures); -} - -#if 0 -GLAPI void APIENTRY GLAPI_PREFIX(DeleteTexturesEXT)(GLsizei n, const GLuint *textures) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[327]; - ((void (APIENTRY *)(GLsizei n, const GLuint *textures)) _func)(n, textures); -} -#endif - -GLAPI void APIENTRY GLAPI_PREFIX(GenTextures)(GLsizei n, GLuint *textures) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[328]; - ((void (APIENTRY *)(GLsizei n, GLuint *textures)) _func)(n, textures); -} - -#if 0 -GLAPI void APIENTRY GLAPI_PREFIX(GenTexturesEXT)(GLsizei n, GLuint *textures) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[328]; - ((void (APIENTRY *)(GLsizei n, GLuint *textures)) _func)(n, textures); -} -#endif - -GLAPI void APIENTRY GLAPI_PREFIX(GetPointerv)(GLenum pname, GLvoid **params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[329]; - ((void (APIENTRY *)(GLenum pname, GLvoid **params)) _func)(pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetPointervEXT)(GLenum pname, GLvoid **params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[329]; - ((void (APIENTRY *)(GLenum pname, GLvoid **params)) _func)(pname, params); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsTexture)(GLuint texture) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[330]; - return ((GLboolean (APIENTRY *)(GLuint texture)) _func)(texture); -} - -#if 0 -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsTextureEXT)(GLuint texture) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[330]; - return ((GLboolean (APIENTRY *)(GLuint texture)) _func)(texture); -} -#endif - -GLAPI void APIENTRY GLAPI_PREFIX(PrioritizeTextures)(GLsizei n, const GLuint *textures, const GLclampf *priorities) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[331]; - ((void (APIENTRY *)(GLsizei n, const GLuint *textures, const GLclampf *priorities)) _func)(n, textures, priorities); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PrioritizeTexturesEXT)(GLsizei n, const GLuint *textures, const GLclampf *priorities) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[331]; - ((void (APIENTRY *)(GLsizei n, const GLuint *textures, const GLclampf *priorities)) _func)(n, textures, priorities); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[332]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, xoffset, width, format, type, pixels); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage1DEXT)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[332]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, xoffset, width, format, type, pixels); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[333]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, xoffset, yoffset, width, height, format, type, pixels); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage2DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[333]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, xoffset, yoffset, width, height, format, type, pixels); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PopClientAttrib)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[334]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PushClientAttrib)(GLbitfield mask) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[335]; - ((void (APIENTRY *)(GLbitfield mask)) _func)(mask); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[336]; - ((void (APIENTRY *)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)) _func)(red, green, blue, alpha); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BlendColorEXT)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[336]; - ((void (APIENTRY *)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)) _func)(red, green, blue, alpha); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BlendEquation)(GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[337]; - ((void (APIENTRY *)(GLenum mode)) _func)(mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BlendEquationEXT)(GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[337]; - ((void (APIENTRY *)(GLenum mode)) _func)(mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[338]; - ((void (APIENTRY *)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)) _func)(mode, start, end, count, type, indices); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawRangeElementsEXT)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[338]; - ((void (APIENTRY *)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)) _func)(mode, start, end, count, type, indices); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ColorTable)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[339]; - ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table)) _func)(target, internalformat, width, format, type, table); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ColorTableEXT)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[339]; - ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table)) _func)(target, internalformat, width, format, type, table); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[340]; - ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfloat *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ColorTableParameteriv)(GLenum target, GLenum pname, const GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[341]; - ((void (APIENTRY *)(GLenum target, GLenum pname, const GLint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CopyColorTable)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[342]; - ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)) _func)(target, internalformat, x, y, width); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetColorTable)(GLenum target, GLenum format, GLenum type, GLvoid *table) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[343]; - ((void (APIENTRY *)(GLenum target, GLenum format, GLenum type, GLvoid *table)) _func)(target, format, type, table); -} - -#if 0 -GLAPI void APIENTRY GLAPI_PREFIX(GetColorTableEXT)(GLenum target, GLenum format, GLenum type, GLvoid *table) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[343]; - ((void (APIENTRY *)(GLenum target, GLenum format, GLenum type, GLvoid *table)) _func)(target, format, type, table); -} -#endif - -GLAPI void APIENTRY GLAPI_PREFIX(GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[344]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params); -} - -#if 0 -GLAPI void APIENTRY GLAPI_PREFIX(GetColorTableParameterfvEXT)(GLenum target, GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[344]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params); -} -#endif - -GLAPI void APIENTRY GLAPI_PREFIX(GetColorTableParameteriv)(GLenum target, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[345]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params); -} - -#if 0 -GLAPI void APIENTRY GLAPI_PREFIX(GetColorTableParameterivEXT)(GLenum target, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[345]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params); -} -#endif - -GLAPI void APIENTRY GLAPI_PREFIX(ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[346]; - ((void (APIENTRY *)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data)) _func)(target, start, count, format, type, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CopyColorSubTable)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[347]; - ((void (APIENTRY *)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)) _func)(target, start, x, y, width); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionFilter1D)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[348]; - ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image)) _func)(target, internalformat, width, format, type, image); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[349]; - ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image)) _func)(target, internalformat, width, height, format, type, image); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionParameterf)(GLenum target, GLenum pname, GLfloat params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[350]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionParameterfv)(GLenum target, GLenum pname, const GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[351]; - ((void (APIENTRY *)(GLenum target, GLenum pname, const GLfloat *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionParameteri)(GLenum target, GLenum pname, GLint params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[352]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLint params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ConvolutionParameteriv)(GLenum target, GLenum pname, const GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[353]; - ((void (APIENTRY *)(GLenum target, GLenum pname, const GLint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CopyConvolutionFilter1D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[354]; - ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)) _func)(target, internalformat, x, y, width); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CopyConvolutionFilter2D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[355]; - ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)) _func)(target, internalformat, x, y, width, height); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetConvolutionFilter)(GLenum target, GLenum format, GLenum type, GLvoid *image) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[356]; - ((void (APIENTRY *)(GLenum target, GLenum format, GLenum type, GLvoid *image)) _func)(target, format, type, image); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[357]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[358]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[359]; - ((void (APIENTRY *)(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span)) _func)(target, format, type, row, column, span); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[360]; - ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column)) _func)(target, internalformat, width, height, format, type, row, column); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetHistogram)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[361]; - ((void (APIENTRY *)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)) _func)(target, reset, format, type, values); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[362]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetHistogramParameteriv)(GLenum target, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[363]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[364]; - ((void (APIENTRY *)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)) _func)(target, reset, format, type, values); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[365]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLfloat *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[366]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[367]; - ((void (APIENTRY *)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)) _func)(target, width, internalformat, sink); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Minmax)(GLenum target, GLenum internalformat, GLboolean sink) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[368]; - ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLboolean sink)) _func)(target, internalformat, sink); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ResetHistogram)(GLenum target) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[369]; - ((void (APIENTRY *)(GLenum target)) _func)(target); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ResetMinmax)(GLenum target) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[370]; - ((void (APIENTRY *)(GLenum target)) _func)(target); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[371]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, internalformat, width, height, depth, border, format, type, pixels); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexImage3DEXT)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[371]; - ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, internalformat, width, height, depth, border, format, type, pixels); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[372]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexSubImage3DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[372]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)) _func)(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[373]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)) _func)(target, level, xoffset, yoffset, zoffset, x, y, width, height); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CopyTexSubImage3DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[373]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)) _func)(target, level, xoffset, yoffset, zoffset, x, y, width, height); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ActiveTextureARB)(GLenum texture) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[374]; - ((void (APIENTRY *)(GLenum texture)) _func)(texture); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ActiveTexture)(GLenum texture) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[374]; - ((void (APIENTRY *)(GLenum texture)) _func)(texture); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ClientActiveTextureARB)(GLenum texture) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[375]; - ((void (APIENTRY *)(GLenum texture)) _func)(texture); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ClientActiveTexture)(GLenum texture) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[375]; - ((void (APIENTRY *)(GLenum texture)) _func)(texture); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1dARB)(GLenum target, GLdouble s) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[376]; - ((void (APIENTRY *)(GLenum target, GLdouble s)) _func)(target, s); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1d)(GLenum target, GLdouble s) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[376]; - ((void (APIENTRY *)(GLenum target, GLdouble s)) _func)(target, s); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1dvARB)(GLenum target, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[377]; - ((void (APIENTRY *)(GLenum target, const GLdouble *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1dv)(GLenum target, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[377]; - ((void (APIENTRY *)(GLenum target, const GLdouble *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1fARB)(GLenum target, GLfloat s) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[378]; - ((void (APIENTRY *)(GLenum target, GLfloat s)) _func)(target, s); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1f)(GLenum target, GLfloat s) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[378]; - ((void (APIENTRY *)(GLenum target, GLfloat s)) _func)(target, s); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1fvARB)(GLenum target, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[379]; - ((void (APIENTRY *)(GLenum target, const GLfloat *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1fv)(GLenum target, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[379]; - ((void (APIENTRY *)(GLenum target, const GLfloat *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1iARB)(GLenum target, GLint s) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[380]; - ((void (APIENTRY *)(GLenum target, GLint s)) _func)(target, s); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1i)(GLenum target, GLint s) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[380]; - ((void (APIENTRY *)(GLenum target, GLint s)) _func)(target, s); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1ivARB)(GLenum target, const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[381]; - ((void (APIENTRY *)(GLenum target, const GLint *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1iv)(GLenum target, const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[381]; - ((void (APIENTRY *)(GLenum target, const GLint *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1sARB)(GLenum target, GLshort s) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[382]; - ((void (APIENTRY *)(GLenum target, GLshort s)) _func)(target, s); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1s)(GLenum target, GLshort s) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[382]; - ((void (APIENTRY *)(GLenum target, GLshort s)) _func)(target, s); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1svARB)(GLenum target, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[383]; - ((void (APIENTRY *)(GLenum target, const GLshort *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord1sv)(GLenum target, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[383]; - ((void (APIENTRY *)(GLenum target, const GLshort *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2dARB)(GLenum target, GLdouble s, GLdouble t) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[384]; - ((void (APIENTRY *)(GLenum target, GLdouble s, GLdouble t)) _func)(target, s, t); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2d)(GLenum target, GLdouble s, GLdouble t) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[384]; - ((void (APIENTRY *)(GLenum target, GLdouble s, GLdouble t)) _func)(target, s, t); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2dvARB)(GLenum target, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[385]; - ((void (APIENTRY *)(GLenum target, const GLdouble *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2dv)(GLenum target, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[385]; - ((void (APIENTRY *)(GLenum target, const GLdouble *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2fARB)(GLenum target, GLfloat s, GLfloat t) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[386]; - ((void (APIENTRY *)(GLenum target, GLfloat s, GLfloat t)) _func)(target, s, t); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2f)(GLenum target, GLfloat s, GLfloat t) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[386]; - ((void (APIENTRY *)(GLenum target, GLfloat s, GLfloat t)) _func)(target, s, t); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2fvARB)(GLenum target, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[387]; - ((void (APIENTRY *)(GLenum target, const GLfloat *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2fv)(GLenum target, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[387]; - ((void (APIENTRY *)(GLenum target, const GLfloat *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2iARB)(GLenum target, GLint s, GLint t) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[388]; - ((void (APIENTRY *)(GLenum target, GLint s, GLint t)) _func)(target, s, t); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2i)(GLenum target, GLint s, GLint t) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[388]; - ((void (APIENTRY *)(GLenum target, GLint s, GLint t)) _func)(target, s, t); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2ivARB)(GLenum target, const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[389]; - ((void (APIENTRY *)(GLenum target, const GLint *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2iv)(GLenum target, const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[389]; - ((void (APIENTRY *)(GLenum target, const GLint *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2sARB)(GLenum target, GLshort s, GLshort t) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[390]; - ((void (APIENTRY *)(GLenum target, GLshort s, GLshort t)) _func)(target, s, t); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2s)(GLenum target, GLshort s, GLshort t) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[390]; - ((void (APIENTRY *)(GLenum target, GLshort s, GLshort t)) _func)(target, s, t); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2svARB)(GLenum target, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[391]; - ((void (APIENTRY *)(GLenum target, const GLshort *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord2sv)(GLenum target, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[391]; - ((void (APIENTRY *)(GLenum target, const GLshort *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[392]; - ((void (APIENTRY *)(GLenum target, GLdouble s, GLdouble t, GLdouble r)) _func)(target, s, t, r); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3d)(GLenum target, GLdouble s, GLdouble t, GLdouble r) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[392]; - ((void (APIENTRY *)(GLenum target, GLdouble s, GLdouble t, GLdouble r)) _func)(target, s, t, r); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3dvARB)(GLenum target, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[393]; - ((void (APIENTRY *)(GLenum target, const GLdouble *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3dv)(GLenum target, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[393]; - ((void (APIENTRY *)(GLenum target, const GLdouble *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[394]; - ((void (APIENTRY *)(GLenum target, GLfloat s, GLfloat t, GLfloat r)) _func)(target, s, t, r); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3f)(GLenum target, GLfloat s, GLfloat t, GLfloat r) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[394]; - ((void (APIENTRY *)(GLenum target, GLfloat s, GLfloat t, GLfloat r)) _func)(target, s, t, r); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3fvARB)(GLenum target, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[395]; - ((void (APIENTRY *)(GLenum target, const GLfloat *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3fv)(GLenum target, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[395]; - ((void (APIENTRY *)(GLenum target, const GLfloat *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3iARB)(GLenum target, GLint s, GLint t, GLint r) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[396]; - ((void (APIENTRY *)(GLenum target, GLint s, GLint t, GLint r)) _func)(target, s, t, r); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3i)(GLenum target, GLint s, GLint t, GLint r) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[396]; - ((void (APIENTRY *)(GLenum target, GLint s, GLint t, GLint r)) _func)(target, s, t, r); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3ivARB)(GLenum target, const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[397]; - ((void (APIENTRY *)(GLenum target, const GLint *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3iv)(GLenum target, const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[397]; - ((void (APIENTRY *)(GLenum target, const GLint *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3sARB)(GLenum target, GLshort s, GLshort t, GLshort r) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[398]; - ((void (APIENTRY *)(GLenum target, GLshort s, GLshort t, GLshort r)) _func)(target, s, t, r); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3s)(GLenum target, GLshort s, GLshort t, GLshort r) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[398]; - ((void (APIENTRY *)(GLenum target, GLshort s, GLshort t, GLshort r)) _func)(target, s, t, r); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3svARB)(GLenum target, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[399]; - ((void (APIENTRY *)(GLenum target, const GLshort *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord3sv)(GLenum target, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[399]; - ((void (APIENTRY *)(GLenum target, const GLshort *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[400]; - ((void (APIENTRY *)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)) _func)(target, s, t, r, q); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4d)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[400]; - ((void (APIENTRY *)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)) _func)(target, s, t, r, q); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4dvARB)(GLenum target, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[401]; - ((void (APIENTRY *)(GLenum target, const GLdouble *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4dv)(GLenum target, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[401]; - ((void (APIENTRY *)(GLenum target, const GLdouble *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[402]; - ((void (APIENTRY *)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)) _func)(target, s, t, r, q); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4f)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[402]; - ((void (APIENTRY *)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)) _func)(target, s, t, r, q); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4fvARB)(GLenum target, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[403]; - ((void (APIENTRY *)(GLenum target, const GLfloat *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4fv)(GLenum target, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[403]; - ((void (APIENTRY *)(GLenum target, const GLfloat *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4iARB)(GLenum target, GLint s, GLint t, GLint r, GLint q) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[404]; - ((void (APIENTRY *)(GLenum target, GLint s, GLint t, GLint r, GLint q)) _func)(target, s, t, r, q); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4i)(GLenum target, GLint s, GLint t, GLint r, GLint q) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[404]; - ((void (APIENTRY *)(GLenum target, GLint s, GLint t, GLint r, GLint q)) _func)(target, s, t, r, q); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4ivARB)(GLenum target, const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[405]; - ((void (APIENTRY *)(GLenum target, const GLint *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4iv)(GLenum target, const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[405]; - ((void (APIENTRY *)(GLenum target, const GLint *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4sARB)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[406]; - ((void (APIENTRY *)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)) _func)(target, s, t, r, q); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4s)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[406]; - ((void (APIENTRY *)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)) _func)(target, s, t, r, q); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4svARB)(GLenum target, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[407]; - ((void (APIENTRY *)(GLenum target, const GLshort *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoord4sv)(GLenum target, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[407]; - ((void (APIENTRY *)(GLenum target, const GLshort *v)) _func)(target, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(AttachShader)(GLuint program, GLuint shader) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[408]; - ((void (APIENTRY *)(GLuint program, GLuint shader)) _func)(program, shader); -} - -GLAPI GLuint APIENTRY GLAPI_PREFIX(CreateProgram)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[409]; - return ((GLuint (APIENTRY *)(void)) _func)(); -} - -GLAPI GLuint APIENTRY GLAPI_PREFIX(CreateShader)(GLenum type) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[410]; - return ((GLuint (APIENTRY *)(GLenum type)) _func)(type); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DeleteProgram)(GLuint program) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[411]; - ((void (APIENTRY *)(GLuint program)) _func)(program); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DeleteShader)(GLuint program) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[412]; - ((void (APIENTRY *)(GLuint program)) _func)(program); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DetachShader)(GLuint program, GLuint shader) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[413]; - ((void (APIENTRY *)(GLuint program, GLuint shader)) _func)(program, shader); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetAttachedShaders)(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[414]; - ((void (APIENTRY *)(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj)) _func)(program, maxCount, count, obj); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramInfoLog)(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[415]; - ((void (APIENTRY *)(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)) _func)(program, bufSize, length, infoLog); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramiv)(GLuint program, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[416]; - ((void (APIENTRY *)(GLuint program, GLenum pname, GLint *params)) _func)(program, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetShaderInfoLog)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[417]; - ((void (APIENTRY *)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)) _func)(shader, bufSize, length, infoLog); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetShaderiv)(GLuint shader, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[418]; - ((void (APIENTRY *)(GLuint shader, GLenum pname, GLint *params)) _func)(shader, pname, params); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsProgram)(GLuint program) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[419]; - return ((GLboolean (APIENTRY *)(GLuint program)) _func)(program); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsShader)(GLuint shader) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[420]; - return ((GLboolean (APIENTRY *)(GLuint shader)) _func)(shader); -} - -GLAPI void APIENTRY GLAPI_PREFIX(StencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[421]; - ((void (APIENTRY *)(GLenum face, GLenum func, GLint ref, GLuint mask)) _func)(face, func, ref, mask); -} - -GLAPI void APIENTRY GLAPI_PREFIX(StencilMaskSeparate)(GLenum face, GLuint mask) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[422]; - ((void (APIENTRY *)(GLenum face, GLuint mask)) _func)(face, mask); -} - -GLAPI void APIENTRY GLAPI_PREFIX(StencilOpSeparate)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[423]; - ((void (APIENTRY *)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass)) _func)(face, sfail, zfail, zpass); -} - -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix2x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[424]; - ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix2x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[425]; - ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix3x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[426]; - ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix3x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[427]; - ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix4x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[428]; - ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix4x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[429]; - ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ClampColor)(GLenum target, GLenum clamp) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[430]; - ((void (APIENTRY *)(GLenum target, GLenum clamp)) _func)(target, clamp); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferfi)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[431]; - ((void (APIENTRY *)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)) _func)(buffer, drawbuffer, depth, stencil); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferfv)(GLenum buffer, GLint drawbuffer, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[432]; - ((void (APIENTRY *)(GLenum buffer, GLint drawbuffer, const GLfloat *value)) _func)(buffer, drawbuffer, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferiv)(GLenum buffer, GLint drawbuffer, const GLint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[433]; - ((void (APIENTRY *)(GLenum buffer, GLint drawbuffer, const GLint *value)) _func)(buffer, drawbuffer, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ClearBufferuiv)(GLenum buffer, GLint drawbuffer, const GLuint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[434]; - ((void (APIENTRY *)(GLenum buffer, GLint drawbuffer, const GLuint *value)) _func)(buffer, drawbuffer, value); -} - -GLAPI const GLubyte * APIENTRY GLAPI_PREFIX(GetStringi)(GLenum name, GLuint index) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[435]; - return ((const GLubyte * (APIENTRY *)(GLenum name, GLuint index)) _func)(name, index); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexBuffer)(GLenum target, GLenum internalFormat, GLuint buffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[436]; - ((void (APIENTRY *)(GLenum target, GLenum internalFormat, GLuint buffer)) _func)(target, internalFormat, buffer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture)(GLenum target, GLenum attachment, GLuint texture, GLint level) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[437]; - ((void (APIENTRY *)(GLenum target, GLenum attachment, GLuint texture, GLint level)) _func)(target, attachment, texture, level); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetBufferParameteri64v)(GLenum target, GLenum pname, GLint64 *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[438]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLint64 *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetInteger64i_v)(GLenum cap, GLuint index, GLint64 *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[439]; - ((void (APIENTRY *)(GLenum cap, GLuint index, GLint64 *data)) _func)(cap, index, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribDivisor)(GLuint index, GLuint divisor) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[440]; - ((void (APIENTRY *)(GLuint index, GLuint divisor)) _func)(index, divisor); -} - -GLAPI void APIENTRY GLAPI_PREFIX(LoadTransposeMatrixdARB)(const GLdouble *m) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[441]; - ((void (APIENTRY *)(const GLdouble *m)) _func)(m); -} - -GLAPI void APIENTRY GLAPI_PREFIX(LoadTransposeMatrixd)(const GLdouble *m) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[441]; - ((void (APIENTRY *)(const GLdouble *m)) _func)(m); -} - -GLAPI void APIENTRY GLAPI_PREFIX(LoadTransposeMatrixfARB)(const GLfloat *m) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[442]; - ((void (APIENTRY *)(const GLfloat *m)) _func)(m); -} - -GLAPI void APIENTRY GLAPI_PREFIX(LoadTransposeMatrixf)(const GLfloat *m) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[442]; - ((void (APIENTRY *)(const GLfloat *m)) _func)(m); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultTransposeMatrixdARB)(const GLdouble *m) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[443]; - ((void (APIENTRY *)(const GLdouble *m)) _func)(m); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultTransposeMatrixd)(const GLdouble *m) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[443]; - ((void (APIENTRY *)(const GLdouble *m)) _func)(m); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultTransposeMatrixfARB)(const GLfloat *m) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[444]; - ((void (APIENTRY *)(const GLfloat *m)) _func)(m); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultTransposeMatrixf)(const GLfloat *m) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[444]; - ((void (APIENTRY *)(const GLfloat *m)) _func)(m); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SampleCoverageARB)(GLclampf value, GLboolean invert) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[445]; - ((void (APIENTRY *)(GLclampf value, GLboolean invert)) _func)(value, invert); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SampleCoverage)(GLclampf value, GLboolean invert) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[445]; - ((void (APIENTRY *)(GLclampf value, GLboolean invert)) _func)(value, invert); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[446]; - ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data)) _func)(target, level, internalformat, width, border, imageSize, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[446]; - ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data)) _func)(target, level, internalformat, width, border, imageSize, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[447]; - ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)) _func)(target, level, internalformat, width, height, border, imageSize, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[447]; - ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)) _func)(target, level, internalformat, width, height, border, imageSize, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[448]; - ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)) _func)(target, level, internalformat, width, height, depth, border, imageSize, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexImage3D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[448]; - ((void (APIENTRY *)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)) _func)(target, level, internalformat, width, height, depth, border, imageSize, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[449]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data)) _func)(target, level, xoffset, width, format, imageSize, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[449]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data)) _func)(target, level, xoffset, width, format, imageSize, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[450]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)) _func)(target, level, xoffset, yoffset, width, height, format, imageSize, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[450]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)) _func)(target, level, xoffset, yoffset, width, height, format, imageSize, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[451]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)) _func)(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CompressedTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[451]; - ((void (APIENTRY *)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)) _func)(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetCompressedTexImageARB)(GLenum target, GLint level, GLvoid *img) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[452]; - ((void (APIENTRY *)(GLenum target, GLint level, GLvoid *img)) _func)(target, level, img); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetCompressedTexImage)(GLenum target, GLint level, GLvoid *img) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[452]; - ((void (APIENTRY *)(GLenum target, GLint level, GLvoid *img)) _func)(target, level, img); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DisableVertexAttribArrayARB)(GLuint index) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[453]; - ((void (APIENTRY *)(GLuint index)) _func)(index); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DisableVertexAttribArray)(GLuint index) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[453]; - ((void (APIENTRY *)(GLuint index)) _func)(index); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EnableVertexAttribArrayARB)(GLuint index) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[454]; - ((void (APIENTRY *)(GLuint index)) _func)(index); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EnableVertexAttribArray)(GLuint index) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[454]; - ((void (APIENTRY *)(GLuint index)) _func)(index); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramEnvParameterdvARB)(GLenum target, GLuint index, GLdouble *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[455]; - ((void (APIENTRY *)(GLenum target, GLuint index, GLdouble *params)) _func)(target, index, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramEnvParameterfvARB)(GLenum target, GLuint index, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[456]; - ((void (APIENTRY *)(GLenum target, GLuint index, GLfloat *params)) _func)(target, index, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramLocalParameterdvARB)(GLenum target, GLuint index, GLdouble *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[457]; - ((void (APIENTRY *)(GLenum target, GLuint index, GLdouble *params)) _func)(target, index, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramLocalParameterfvARB)(GLenum target, GLuint index, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[458]; - ((void (APIENTRY *)(GLenum target, GLuint index, GLfloat *params)) _func)(target, index, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramStringARB)(GLenum target, GLenum pname, GLvoid *string) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[459]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLvoid *string)) _func)(target, pname, string); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramivARB)(GLenum target, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[460]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribdvARB)(GLuint index, GLenum pname, GLdouble *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[461]; - ((void (APIENTRY *)(GLuint index, GLenum pname, GLdouble *params)) _func)(index, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribdv)(GLuint index, GLenum pname, GLdouble *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[461]; - ((void (APIENTRY *)(GLuint index, GLenum pname, GLdouble *params)) _func)(index, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribfvARB)(GLuint index, GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[462]; - ((void (APIENTRY *)(GLuint index, GLenum pname, GLfloat *params)) _func)(index, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribfv)(GLuint index, GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[462]; - ((void (APIENTRY *)(GLuint index, GLenum pname, GLfloat *params)) _func)(index, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribivARB)(GLuint index, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[463]; - ((void (APIENTRY *)(GLuint index, GLenum pname, GLint *params)) _func)(index, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribiv)(GLuint index, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[463]; - ((void (APIENTRY *)(GLuint index, GLenum pname, GLint *params)) _func)(index, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProgramEnvParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[464]; - ((void (APIENTRY *)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(target, index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameter4dNV)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[464]; - ((void (APIENTRY *)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(target, index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProgramEnvParameter4dvARB)(GLenum target, GLuint index, const GLdouble *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[465]; - ((void (APIENTRY *)(GLenum target, GLuint index, const GLdouble *params)) _func)(target, index, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameter4dvNV)(GLenum target, GLuint index, const GLdouble *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[465]; - ((void (APIENTRY *)(GLenum target, GLuint index, const GLdouble *params)) _func)(target, index, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProgramEnvParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[466]; - ((void (APIENTRY *)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(target, index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameter4fNV)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[466]; - ((void (APIENTRY *)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(target, index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProgramEnvParameter4fvARB)(GLenum target, GLuint index, const GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[467]; - ((void (APIENTRY *)(GLenum target, GLuint index, const GLfloat *params)) _func)(target, index, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameter4fvNV)(GLenum target, GLuint index, const GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[467]; - ((void (APIENTRY *)(GLenum target, GLuint index, const GLfloat *params)) _func)(target, index, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProgramLocalParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[468]; - ((void (APIENTRY *)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(target, index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProgramLocalParameter4dvARB)(GLenum target, GLuint index, const GLdouble *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[469]; - ((void (APIENTRY *)(GLenum target, GLuint index, const GLdouble *params)) _func)(target, index, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProgramLocalParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[470]; - ((void (APIENTRY *)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(target, index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProgramLocalParameter4fvARB)(GLenum target, GLuint index, const GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[471]; - ((void (APIENTRY *)(GLenum target, GLuint index, const GLfloat *params)) _func)(target, index, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProgramStringARB)(GLenum target, GLenum format, GLsizei len, const GLvoid *string) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[472]; - ((void (APIENTRY *)(GLenum target, GLenum format, GLsizei len, const GLvoid *string)) _func)(target, format, len, string); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1dARB)(GLuint index, GLdouble x) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[473]; - ((void (APIENTRY *)(GLuint index, GLdouble x)) _func)(index, x); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1d)(GLuint index, GLdouble x) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[473]; - ((void (APIENTRY *)(GLuint index, GLdouble x)) _func)(index, x); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1dvARB)(GLuint index, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[474]; - ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1dv)(GLuint index, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[474]; - ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1fARB)(GLuint index, GLfloat x) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[475]; - ((void (APIENTRY *)(GLuint index, GLfloat x)) _func)(index, x); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1f)(GLuint index, GLfloat x) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[475]; - ((void (APIENTRY *)(GLuint index, GLfloat x)) _func)(index, x); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1fvARB)(GLuint index, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[476]; - ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1fv)(GLuint index, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[476]; - ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1sARB)(GLuint index, GLshort x) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[477]; - ((void (APIENTRY *)(GLuint index, GLshort x)) _func)(index, x); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1s)(GLuint index, GLshort x) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[477]; - ((void (APIENTRY *)(GLuint index, GLshort x)) _func)(index, x); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1svARB)(GLuint index, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[478]; - ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1sv)(GLuint index, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[478]; - ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2dARB)(GLuint index, GLdouble x, GLdouble y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[479]; - ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y)) _func)(index, x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2d)(GLuint index, GLdouble x, GLdouble y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[479]; - ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y)) _func)(index, x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2dvARB)(GLuint index, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[480]; - ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2dv)(GLuint index, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[480]; - ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2fARB)(GLuint index, GLfloat x, GLfloat y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[481]; - ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y)) _func)(index, x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2f)(GLuint index, GLfloat x, GLfloat y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[481]; - ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y)) _func)(index, x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2fvARB)(GLuint index, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[482]; - ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2fv)(GLuint index, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[482]; - ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2sARB)(GLuint index, GLshort x, GLshort y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[483]; - ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y)) _func)(index, x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2s)(GLuint index, GLshort x, GLshort y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[483]; - ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y)) _func)(index, x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2svARB)(GLuint index, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[484]; - ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2sv)(GLuint index, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[484]; - ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[485]; - ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y, GLdouble z)) _func)(index, x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3d)(GLuint index, GLdouble x, GLdouble y, GLdouble z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[485]; - ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y, GLdouble z)) _func)(index, x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3dvARB)(GLuint index, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[486]; - ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3dv)(GLuint index, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[486]; - ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[487]; - ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y, GLfloat z)) _func)(index, x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3f)(GLuint index, GLfloat x, GLfloat y, GLfloat z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[487]; - ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y, GLfloat z)) _func)(index, x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3fvARB)(GLuint index, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[488]; - ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3fv)(GLuint index, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[488]; - ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3sARB)(GLuint index, GLshort x, GLshort y, GLshort z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[489]; - ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y, GLshort z)) _func)(index, x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3s)(GLuint index, GLshort x, GLshort y, GLshort z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[489]; - ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y, GLshort z)) _func)(index, x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3svARB)(GLuint index, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[490]; - ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3sv)(GLuint index, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[490]; - ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NbvARB)(GLuint index, const GLbyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[491]; - ((void (APIENTRY *)(GLuint index, const GLbyte *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nbv)(GLuint index, const GLbyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[491]; - ((void (APIENTRY *)(GLuint index, const GLbyte *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NivARB)(GLuint index, const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[492]; - ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Niv)(GLuint index, const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[492]; - ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NsvARB)(GLuint index, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[493]; - ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nsv)(GLuint index, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[493]; - ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NubARB)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[494]; - ((void (APIENTRY *)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)) _func)(index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nub)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[494]; - ((void (APIENTRY *)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)) _func)(index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NubvARB)(GLuint index, const GLubyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[495]; - ((void (APIENTRY *)(GLuint index, const GLubyte *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nubv)(GLuint index, const GLubyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[495]; - ((void (APIENTRY *)(GLuint index, const GLubyte *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NuivARB)(GLuint index, const GLuint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[496]; - ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nuiv)(GLuint index, const GLuint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[496]; - ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4NusvARB)(GLuint index, const GLushort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[497]; - ((void (APIENTRY *)(GLuint index, const GLushort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4Nusv)(GLuint index, const GLushort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[497]; - ((void (APIENTRY *)(GLuint index, const GLushort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4bvARB)(GLuint index, const GLbyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[498]; - ((void (APIENTRY *)(GLuint index, const GLbyte *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4bv)(GLuint index, const GLbyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[498]; - ((void (APIENTRY *)(GLuint index, const GLbyte *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[499]; - ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4d)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[499]; - ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4dvARB)(GLuint index, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[500]; - ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4dv)(GLuint index, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[500]; - ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[501]; - ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4f)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[501]; - ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4fvARB)(GLuint index, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[502]; - ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4fv)(GLuint index, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[502]; - ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4ivARB)(GLuint index, const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[503]; - ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4iv)(GLuint index, const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[503]; - ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4sARB)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[504]; - ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)) _func)(index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4s)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[504]; - ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)) _func)(index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4svARB)(GLuint index, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[505]; - ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4sv)(GLuint index, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[505]; - ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4ubvARB)(GLuint index, const GLubyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[506]; - ((void (APIENTRY *)(GLuint index, const GLubyte *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4ubv)(GLuint index, const GLubyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[506]; - ((void (APIENTRY *)(GLuint index, const GLubyte *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4uivARB)(GLuint index, const GLuint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[507]; - ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4uiv)(GLuint index, const GLuint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[507]; - ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4usvARB)(GLuint index, const GLushort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[508]; - ((void (APIENTRY *)(GLuint index, const GLushort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4usv)(GLuint index, const GLushort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[508]; - ((void (APIENTRY *)(GLuint index, const GLushort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribPointerARB)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[509]; - ((void (APIENTRY *)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer)) _func)(index, size, type, normalized, stride, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribPointer)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[509]; - ((void (APIENTRY *)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer)) _func)(index, size, type, normalized, stride, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindBufferARB)(GLenum target, GLuint buffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[510]; - ((void (APIENTRY *)(GLenum target, GLuint buffer)) _func)(target, buffer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindBuffer)(GLenum target, GLuint buffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[510]; - ((void (APIENTRY *)(GLenum target, GLuint buffer)) _func)(target, buffer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BufferDataARB)(GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[511]; - ((void (APIENTRY *)(GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage)) _func)(target, size, data, usage); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BufferData)(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[511]; - ((void (APIENTRY *)(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)) _func)(target, size, data, usage); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[512]; - ((void (APIENTRY *)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data)) _func)(target, offset, size, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[512]; - ((void (APIENTRY *)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data)) _func)(target, offset, size, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DeleteBuffersARB)(GLsizei n, const GLuint *buffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[513]; - ((void (APIENTRY *)(GLsizei n, const GLuint *buffer)) _func)(n, buffer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DeleteBuffers)(GLsizei n, const GLuint *buffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[513]; - ((void (APIENTRY *)(GLsizei n, const GLuint *buffer)) _func)(n, buffer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GenBuffersARB)(GLsizei n, GLuint *buffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[514]; - ((void (APIENTRY *)(GLsizei n, GLuint *buffer)) _func)(n, buffer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GenBuffers)(GLsizei n, GLuint *buffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[514]; - ((void (APIENTRY *)(GLsizei n, GLuint *buffer)) _func)(n, buffer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetBufferParameterivARB)(GLenum target, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[515]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetBufferParameteriv)(GLenum target, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[515]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetBufferPointervARB)(GLenum target, GLenum pname, GLvoid **params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[516]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLvoid **params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetBufferPointerv)(GLenum target, GLenum pname, GLvoid **params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[516]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLvoid **params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetBufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[517]; - ((void (APIENTRY *)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data)) _func)(target, offset, size, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[517]; - ((void (APIENTRY *)(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data)) _func)(target, offset, size, data); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsBufferARB)(GLuint buffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[518]; - return ((GLboolean (APIENTRY *)(GLuint buffer)) _func)(buffer); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsBuffer)(GLuint buffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[518]; - return ((GLboolean (APIENTRY *)(GLuint buffer)) _func)(buffer); -} - -GLAPI GLvoid * APIENTRY GLAPI_PREFIX(MapBufferARB)(GLenum target, GLenum access) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[519]; - return ((GLvoid * (APIENTRY *)(GLenum target, GLenum access)) _func)(target, access); -} - -GLAPI GLvoid * APIENTRY GLAPI_PREFIX(MapBuffer)(GLenum target, GLenum access) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[519]; - return ((GLvoid * (APIENTRY *)(GLenum target, GLenum access)) _func)(target, access); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(UnmapBufferARB)(GLenum target) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[520]; - return ((GLboolean (APIENTRY *)(GLenum target)) _func)(target); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(UnmapBuffer)(GLenum target) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[520]; - return ((GLboolean (APIENTRY *)(GLenum target)) _func)(target); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BeginQueryARB)(GLenum target, GLuint id) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[521]; - ((void (APIENTRY *)(GLenum target, GLuint id)) _func)(target, id); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BeginQuery)(GLenum target, GLuint id) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[521]; - ((void (APIENTRY *)(GLenum target, GLuint id)) _func)(target, id); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DeleteQueriesARB)(GLsizei n, const GLuint *ids) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[522]; - ((void (APIENTRY *)(GLsizei n, const GLuint *ids)) _func)(n, ids); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DeleteQueries)(GLsizei n, const GLuint *ids) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[522]; - ((void (APIENTRY *)(GLsizei n, const GLuint *ids)) _func)(n, ids); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EndQueryARB)(GLenum target) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[523]; - ((void (APIENTRY *)(GLenum target)) _func)(target); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EndQuery)(GLenum target) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[523]; - ((void (APIENTRY *)(GLenum target)) _func)(target); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GenQueriesARB)(GLsizei n, GLuint *ids) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[524]; - ((void (APIENTRY *)(GLsizei n, GLuint *ids)) _func)(n, ids); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GenQueries)(GLsizei n, GLuint *ids) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[524]; - ((void (APIENTRY *)(GLsizei n, GLuint *ids)) _func)(n, ids); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetQueryObjectivARB)(GLuint id, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[525]; - ((void (APIENTRY *)(GLuint id, GLenum pname, GLint *params)) _func)(id, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetQueryObjectiv)(GLuint id, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[525]; - ((void (APIENTRY *)(GLuint id, GLenum pname, GLint *params)) _func)(id, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetQueryObjectuivARB)(GLuint id, GLenum pname, GLuint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[526]; - ((void (APIENTRY *)(GLuint id, GLenum pname, GLuint *params)) _func)(id, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetQueryObjectuiv)(GLuint id, GLenum pname, GLuint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[526]; - ((void (APIENTRY *)(GLuint id, GLenum pname, GLuint *params)) _func)(id, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetQueryivARB)(GLenum target, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[527]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetQueryiv)(GLenum target, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[527]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsQueryARB)(GLuint id) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[528]; - return ((GLboolean (APIENTRY *)(GLuint id)) _func)(id); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsQuery)(GLuint id) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[528]; - return ((GLboolean (APIENTRY *)(GLuint id)) _func)(id); -} - -GLAPI void APIENTRY GLAPI_PREFIX(AttachObjectARB)(GLhandleARB containerObj, GLhandleARB obj) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[529]; - ((void (APIENTRY *)(GLhandleARB containerObj, GLhandleARB obj)) _func)(containerObj, obj); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CompileShaderARB)(GLhandleARB shader) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[530]; - ((void (APIENTRY *)(GLhandleARB shader)) _func)(shader); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CompileShader)(GLuint shader) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[530]; - ((void (APIENTRY *)(GLuint shader)) _func)(shader); -} - -GLAPI GLhandleARB APIENTRY GLAPI_PREFIX(CreateProgramObjectARB)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[531]; - return ((GLhandleARB (APIENTRY *)(void)) _func)(); -} - -GLAPI GLhandleARB APIENTRY GLAPI_PREFIX(CreateShaderObjectARB)(GLenum shaderType) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[532]; - return ((GLhandleARB (APIENTRY *)(GLenum shaderType)) _func)(shaderType); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DeleteObjectARB)(GLhandleARB obj) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[533]; - ((void (APIENTRY *)(GLhandleARB obj)) _func)(obj); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DetachObjectARB)(GLhandleARB containerObj, GLhandleARB attachedObj) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[534]; - ((void (APIENTRY *)(GLhandleARB containerObj, GLhandleARB attachedObj)) _func)(containerObj, attachedObj); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetActiveUniformARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[535]; - ((void (APIENTRY *)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name)) _func)(program, index, bufSize, length, size, type, name); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetActiveUniform)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[535]; - ((void (APIENTRY *)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)) _func)(program, index, bufSize, length, size, type, name); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetAttachedObjectsARB)(GLhandleARB containerObj, GLsizei maxLength, GLsizei *length, GLhandleARB *infoLog) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[536]; - ((void (APIENTRY *)(GLhandleARB containerObj, GLsizei maxLength, GLsizei *length, GLhandleARB *infoLog)) _func)(containerObj, maxLength, length, infoLog); -} - -GLAPI GLhandleARB APIENTRY GLAPI_PREFIX(GetHandleARB)(GLenum pname) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[537]; - return ((GLhandleARB (APIENTRY *)(GLenum pname)) _func)(pname); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetInfoLogARB)(GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[538]; - ((void (APIENTRY *)(GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog)) _func)(obj, maxLength, length, infoLog); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetObjectParameterfvARB)(GLhandleARB obj, GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[539]; - ((void (APIENTRY *)(GLhandleARB obj, GLenum pname, GLfloat *params)) _func)(obj, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetObjectParameterivARB)(GLhandleARB obj, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[540]; - ((void (APIENTRY *)(GLhandleARB obj, GLenum pname, GLint *params)) _func)(obj, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetShaderSourceARB)(GLhandleARB shader, GLsizei bufSize, GLsizei *length, GLcharARB *source) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[541]; - ((void (APIENTRY *)(GLhandleARB shader, GLsizei bufSize, GLsizei *length, GLcharARB *source)) _func)(shader, bufSize, length, source); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetShaderSource)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[541]; - ((void (APIENTRY *)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source)) _func)(shader, bufSize, length, source); -} - -GLAPI GLint APIENTRY GLAPI_PREFIX(GetUniformLocationARB)(GLhandleARB program, const GLcharARB *name) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[542]; - return ((GLint (APIENTRY *)(GLhandleARB program, const GLcharARB *name)) _func)(program, name); -} - -GLAPI GLint APIENTRY GLAPI_PREFIX(GetUniformLocation)(GLuint program, const GLchar *name) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[542]; - return ((GLint (APIENTRY *)(GLuint program, const GLchar *name)) _func)(program, name); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetUniformfvARB)(GLhandleARB program, GLint location, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[543]; - ((void (APIENTRY *)(GLhandleARB program, GLint location, GLfloat *params)) _func)(program, location, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetUniformfv)(GLuint program, GLint location, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[543]; - ((void (APIENTRY *)(GLuint program, GLint location, GLfloat *params)) _func)(program, location, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetUniformivARB)(GLhandleARB program, GLint location, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[544]; - ((void (APIENTRY *)(GLhandleARB program, GLint location, GLint *params)) _func)(program, location, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetUniformiv)(GLuint program, GLint location, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[544]; - ((void (APIENTRY *)(GLuint program, GLint location, GLint *params)) _func)(program, location, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(LinkProgramARB)(GLhandleARB program) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[545]; - ((void (APIENTRY *)(GLhandleARB program)) _func)(program); -} - -GLAPI void APIENTRY GLAPI_PREFIX(LinkProgram)(GLuint program) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[545]; - ((void (APIENTRY *)(GLuint program)) _func)(program); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ShaderSourceARB)(GLhandleARB shader, GLsizei count, const GLcharARB **string, const GLint *length) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[546]; - ((void (APIENTRY *)(GLhandleARB shader, GLsizei count, const GLcharARB **string, const GLint *length)) _func)(shader, count, string, length); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ShaderSource)(GLuint shader, GLsizei count, const GLchar **string, const GLint *length) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[546]; - ((void (APIENTRY *)(GLuint shader, GLsizei count, const GLchar **string, const GLint *length)) _func)(shader, count, string, length); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1fARB)(GLint location, GLfloat v0) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[547]; - ((void (APIENTRY *)(GLint location, GLfloat v0)) _func)(location, v0); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1f)(GLint location, GLfloat v0) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[547]; - ((void (APIENTRY *)(GLint location, GLfloat v0)) _func)(location, v0); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1fvARB)(GLint location, GLsizei count, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[548]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1fv)(GLint location, GLsizei count, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[548]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1iARB)(GLint location, GLint v0) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[549]; - ((void (APIENTRY *)(GLint location, GLint v0)) _func)(location, v0); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1i)(GLint location, GLint v0) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[549]; - ((void (APIENTRY *)(GLint location, GLint v0)) _func)(location, v0); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1ivARB)(GLint location, GLsizei count, const GLint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[550]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1iv)(GLint location, GLsizei count, const GLint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[550]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2fARB)(GLint location, GLfloat v0, GLfloat v1) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[551]; - ((void (APIENTRY *)(GLint location, GLfloat v0, GLfloat v1)) _func)(location, v0, v1); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2f)(GLint location, GLfloat v0, GLfloat v1) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[551]; - ((void (APIENTRY *)(GLint location, GLfloat v0, GLfloat v1)) _func)(location, v0, v1); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2fvARB)(GLint location, GLsizei count, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[552]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2fv)(GLint location, GLsizei count, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[552]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2iARB)(GLint location, GLint v0, GLint v1) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[553]; - ((void (APIENTRY *)(GLint location, GLint v0, GLint v1)) _func)(location, v0, v1); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2i)(GLint location, GLint v0, GLint v1) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[553]; - ((void (APIENTRY *)(GLint location, GLint v0, GLint v1)) _func)(location, v0, v1); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2ivARB)(GLint location, GLsizei count, const GLint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[554]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2iv)(GLint location, GLsizei count, const GLint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[554]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[555]; - ((void (APIENTRY *)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)) _func)(location, v0, v1, v2); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[555]; - ((void (APIENTRY *)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)) _func)(location, v0, v1, v2); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3fvARB)(GLint location, GLsizei count, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[556]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3fv)(GLint location, GLsizei count, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[556]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3iARB)(GLint location, GLint v0, GLint v1, GLint v2) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[557]; - ((void (APIENTRY *)(GLint location, GLint v0, GLint v1, GLint v2)) _func)(location, v0, v1, v2); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3i)(GLint location, GLint v0, GLint v1, GLint v2) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[557]; - ((void (APIENTRY *)(GLint location, GLint v0, GLint v1, GLint v2)) _func)(location, v0, v1, v2); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3ivARB)(GLint location, GLsizei count, const GLint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[558]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3iv)(GLint location, GLsizei count, const GLint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[558]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[559]; - ((void (APIENTRY *)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)) _func)(location, v0, v1, v2, v3); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[559]; - ((void (APIENTRY *)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)) _func)(location, v0, v1, v2, v3); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4fvARB)(GLint location, GLsizei count, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[560]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4fv)(GLint location, GLsizei count, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[560]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLfloat *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4iARB)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[561]; - ((void (APIENTRY *)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)) _func)(location, v0, v1, v2, v3); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4i)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[561]; - ((void (APIENTRY *)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)) _func)(location, v0, v1, v2, v3); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4ivARB)(GLint location, GLsizei count, const GLint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[562]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4iv)(GLint location, GLsizei count, const GLint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[562]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLint *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix2fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[563]; - ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[563]; - ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix3fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[564]; - ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[564]; - ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix4fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[565]; - ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(UniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[565]; - ((void (APIENTRY *)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) _func)(location, count, transpose, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(UseProgramObjectARB)(GLhandleARB program) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[566]; - ((void (APIENTRY *)(GLhandleARB program)) _func)(program); -} - -GLAPI void APIENTRY GLAPI_PREFIX(UseProgram)(GLuint program) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[566]; - ((void (APIENTRY *)(GLuint program)) _func)(program); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ValidateProgramARB)(GLhandleARB program) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[567]; - ((void (APIENTRY *)(GLhandleARB program)) _func)(program); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ValidateProgram)(GLuint program) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[567]; - ((void (APIENTRY *)(GLuint program)) _func)(program); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindAttribLocationARB)(GLhandleARB program, GLuint index, const GLcharARB *name) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[568]; - ((void (APIENTRY *)(GLhandleARB program, GLuint index, const GLcharARB *name)) _func)(program, index, name); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindAttribLocation)(GLuint program, GLuint index, const GLchar *name) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[568]; - ((void (APIENTRY *)(GLuint program, GLuint index, const GLchar *name)) _func)(program, index, name); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetActiveAttribARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[569]; - ((void (APIENTRY *)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name)) _func)(program, index, bufSize, length, size, type, name); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetActiveAttrib)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[569]; - ((void (APIENTRY *)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)) _func)(program, index, bufSize, length, size, type, name); -} - -GLAPI GLint APIENTRY GLAPI_PREFIX(GetAttribLocationARB)(GLhandleARB program, const GLcharARB *name) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[570]; - return ((GLint (APIENTRY *)(GLhandleARB program, const GLcharARB *name)) _func)(program, name); -} - -GLAPI GLint APIENTRY GLAPI_PREFIX(GetAttribLocation)(GLuint program, const GLchar *name) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[570]; - return ((GLint (APIENTRY *)(GLuint program, const GLchar *name)) _func)(program, name); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawBuffersARB)(GLsizei n, const GLenum *bufs) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[571]; - ((void (APIENTRY *)(GLsizei n, const GLenum *bufs)) _func)(n, bufs); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawBuffers)(GLsizei n, const GLenum *bufs) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[571]; - ((void (APIENTRY *)(GLsizei n, const GLenum *bufs)) _func)(n, bufs); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawBuffersATI)(GLsizei n, const GLenum *bufs) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[571]; - ((void (APIENTRY *)(GLsizei n, const GLenum *bufs)) _func)(n, bufs); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawBuffersNV)(GLsizei n, const GLenum *bufs) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[571]; - ((void (APIENTRY *)(GLsizei n, const GLenum *bufs)) _func)(n, bufs); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ClampColorARB)(GLenum target, GLenum clamp) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[572]; - ((void (APIENTRY *)(GLenum target, GLenum clamp)) _func)(target, clamp); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawArraysInstancedARB)(GLenum mode, GLint first, GLsizei count, GLsizei primcount) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[573]; - ((void (APIENTRY *)(GLenum mode, GLint first, GLsizei count, GLsizei primcount)) _func)(mode, first, count, primcount); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawArraysInstanced)(GLenum mode, GLint first, GLsizei count, GLsizei primcount) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[573]; - ((void (APIENTRY *)(GLenum mode, GLint first, GLsizei count, GLsizei primcount)) _func)(mode, first, count, primcount); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawArraysInstancedEXT)(GLenum mode, GLint first, GLsizei count, GLsizei primcount) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[573]; - ((void (APIENTRY *)(GLenum mode, GLint first, GLsizei count, GLsizei primcount)) _func)(mode, first, count, primcount); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawElementsInstancedARB)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[574]; - ((void (APIENTRY *)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)) _func)(mode, count, type, indices, primcount); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawElementsInstanced)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[574]; - ((void (APIENTRY *)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)) _func)(mode, count, type, indices, primcount); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawElementsInstancedEXT)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[574]; - ((void (APIENTRY *)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)) _func)(mode, count, type, indices, primcount); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RenderbufferStorageMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[575]; - ((void (APIENTRY *)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)) _func)(target, samples, internalformat, width, height); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RenderbufferStorageMultisampleEXT)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[575]; - ((void (APIENTRY *)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)) _func)(target, samples, internalformat, width, height); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTextureARB)(GLenum target, GLenum attachment, GLuint texture, GLint level) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[576]; - ((void (APIENTRY *)(GLenum target, GLenum attachment, GLuint texture, GLint level)) _func)(target, attachment, texture, level); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTextureFaceARB)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[577]; - ((void (APIENTRY *)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face)) _func)(target, attachment, texture, level, face); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameteriARB)(GLuint program, GLenum pname, GLint value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[578]; - ((void (APIENTRY *)(GLuint program, GLenum pname, GLint value)) _func)(program, pname, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribDivisorARB)(GLuint index, GLuint divisor) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[579]; - ((void (APIENTRY *)(GLuint index, GLuint divisor)) _func)(index, divisor); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FlushMappedBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[580]; - ((void (APIENTRY *)(GLenum target, GLintptr offset, GLsizeiptr length)) _func)(target, offset, length); -} - -GLAPI GLvoid * APIENTRY GLAPI_PREFIX(MapBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[581]; - return ((GLvoid * (APIENTRY *)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)) _func)(target, offset, length, access); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexBufferARB)(GLenum target, GLenum internalFormat, GLuint buffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[582]; - ((void (APIENTRY *)(GLenum target, GLenum internalFormat, GLuint buffer)) _func)(target, internalFormat, buffer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindVertexArray)(GLuint array) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[583]; - ((void (APIENTRY *)(GLuint array)) _func)(array); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GenVertexArrays)(GLsizei n, GLuint *arrays) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[584]; - ((void (APIENTRY *)(GLsizei n, GLuint *arrays)) _func)(n, arrays); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CopyBufferSubData)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[585]; - ((void (APIENTRY *)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)) _func)(readTarget, writeTarget, readOffset, writeOffset, size); -} - -GLAPI GLenum APIENTRY GLAPI_PREFIX(ClientWaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[586]; - return ((GLenum (APIENTRY *)(GLsync sync, GLbitfield flags, GLuint64 timeout)) _func)(sync, flags, timeout); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DeleteSync)(GLsync sync) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[587]; - ((void (APIENTRY *)(GLsync sync)) _func)(sync); -} - -GLAPI GLsync APIENTRY GLAPI_PREFIX(FenceSync)(GLenum condition, GLbitfield flags) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[588]; - return ((GLsync (APIENTRY *)(GLenum condition, GLbitfield flags)) _func)(condition, flags); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetInteger64v)(GLenum pname, GLint64 *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[589]; - ((void (APIENTRY *)(GLenum pname, GLint64 *params)) _func)(pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetSynciv)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[590]; - ((void (APIENTRY *)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)) _func)(sync, pname, bufSize, length, values); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsSync)(GLsync sync) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[591]; - return ((GLboolean (APIENTRY *)(GLsync sync)) _func)(sync); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[592]; - ((void (APIENTRY *)(GLsync sync, GLbitfield flags, GLuint64 timeout)) _func)(sync, flags, timeout); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawElementsBaseVertex)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[593]; - ((void (APIENTRY *)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)) _func)(mode, count, type, indices, basevertex); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawElementsInstancedBaseVertex)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[594]; - ((void (APIENTRY *)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex)) _func)(mode, count, type, indices, primcount, basevertex); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawRangeElementsBaseVertex)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[595]; - ((void (APIENTRY *)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)) _func)(mode, start, end, count, type, indices, basevertex); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiDrawElementsBaseVertex)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount, const GLint *basevertex) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[596]; - ((void (APIENTRY *)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount, const GLint *basevertex)) _func)(mode, count, type, indices, primcount, basevertex); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BlendEquationSeparateiARB)(GLuint buf, GLenum modeRGB, GLenum modeA) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[597]; - ((void (APIENTRY *)(GLuint buf, GLenum modeRGB, GLenum modeA)) _func)(buf, modeRGB, modeA); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BlendEquationSeparateIndexedAMD)(GLuint buf, GLenum modeRGB, GLenum modeA) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[597]; - ((void (APIENTRY *)(GLuint buf, GLenum modeRGB, GLenum modeA)) _func)(buf, modeRGB, modeA); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BlendEquationiARB)(GLuint buf, GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[598]; - ((void (APIENTRY *)(GLuint buf, GLenum mode)) _func)(buf, mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BlendEquationIndexedAMD)(GLuint buf, GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[598]; - ((void (APIENTRY *)(GLuint buf, GLenum mode)) _func)(buf, mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BlendFuncSeparateiARB)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[599]; - ((void (APIENTRY *)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA)) _func)(buf, srcRGB, dstRGB, srcA, dstA); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BlendFuncSeparateIndexedAMD)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[599]; - ((void (APIENTRY *)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA)) _func)(buf, srcRGB, dstRGB, srcA, dstA); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BlendFunciARB)(GLuint buf, GLenum src, GLenum dst) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[600]; - ((void (APIENTRY *)(GLuint buf, GLenum src, GLenum dst)) _func)(buf, src, dst); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BlendFuncIndexedAMD)(GLuint buf, GLenum src, GLenum dst) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[600]; - ((void (APIENTRY *)(GLuint buf, GLenum src, GLenum dst)) _func)(buf, src, dst); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindSampler)(GLuint unit, GLuint sampler) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[601]; - ((void (APIENTRY *)(GLuint unit, GLuint sampler)) _func)(unit, sampler); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DeleteSamplers)(GLsizei count, const GLuint *samplers) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[602]; - ((void (APIENTRY *)(GLsizei count, const GLuint *samplers)) _func)(count, samplers); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GenSamplers)(GLsizei count, GLuint *samplers) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[603]; - ((void (APIENTRY *)(GLsizei count, GLuint *samplers)) _func)(count, samplers); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetSamplerParameterIiv)(GLuint sampler, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[604]; - ((void (APIENTRY *)(GLuint sampler, GLenum pname, GLint *params)) _func)(sampler, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetSamplerParameterIuiv)(GLuint sampler, GLenum pname, GLuint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[605]; - ((void (APIENTRY *)(GLuint sampler, GLenum pname, GLuint *params)) _func)(sampler, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetSamplerParameterfv)(GLuint sampler, GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[606]; - ((void (APIENTRY *)(GLuint sampler, GLenum pname, GLfloat *params)) _func)(sampler, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetSamplerParameteriv)(GLuint sampler, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[607]; - ((void (APIENTRY *)(GLuint sampler, GLenum pname, GLint *params)) _func)(sampler, pname, params); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsSampler)(GLuint sampler) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[608]; - return ((GLboolean (APIENTRY *)(GLuint sampler)) _func)(sampler); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SamplerParameterIiv)(GLuint sampler, GLenum pname, const GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[609]; - ((void (APIENTRY *)(GLuint sampler, GLenum pname, const GLint *params)) _func)(sampler, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SamplerParameterIuiv)(GLuint sampler, GLenum pname, const GLuint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[610]; - ((void (APIENTRY *)(GLuint sampler, GLenum pname, const GLuint *params)) _func)(sampler, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SamplerParameterf)(GLuint sampler, GLenum pname, GLfloat param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[611]; - ((void (APIENTRY *)(GLuint sampler, GLenum pname, GLfloat param)) _func)(sampler, pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SamplerParameterfv)(GLuint sampler, GLenum pname, const GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[612]; - ((void (APIENTRY *)(GLuint sampler, GLenum pname, const GLfloat *params)) _func)(sampler, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SamplerParameteri)(GLuint sampler, GLenum pname, GLint param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[613]; - ((void (APIENTRY *)(GLuint sampler, GLenum pname, GLint param)) _func)(sampler, pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SamplerParameteriv)(GLuint sampler, GLenum pname, const GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[614]; - ((void (APIENTRY *)(GLuint sampler, GLenum pname, const GLint *params)) _func)(sampler, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ColorP3ui)(GLenum type, GLuint color) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[615]; - ((void (APIENTRY *)(GLenum type, GLuint color)) _func)(type, color); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ColorP3uiv)(GLenum type, const GLuint *color) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[616]; - ((void (APIENTRY *)(GLenum type, const GLuint *color)) _func)(type, color); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ColorP4ui)(GLenum type, GLuint color) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[617]; - ((void (APIENTRY *)(GLenum type, GLuint color)) _func)(type, color); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ColorP4uiv)(GLenum type, const GLuint *color) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[618]; - ((void (APIENTRY *)(GLenum type, const GLuint *color)) _func)(type, color); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoordP1ui)(GLenum texture, GLenum type, GLuint coords) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[619]; - ((void (APIENTRY *)(GLenum texture, GLenum type, GLuint coords)) _func)(texture, type, coords); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoordP1uiv)(GLenum texture, GLenum type, const GLuint *coords) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[620]; - ((void (APIENTRY *)(GLenum texture, GLenum type, const GLuint *coords)) _func)(texture, type, coords); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoordP2ui)(GLenum texture, GLenum type, GLuint coords) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[621]; - ((void (APIENTRY *)(GLenum texture, GLenum type, GLuint coords)) _func)(texture, type, coords); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoordP2uiv)(GLenum texture, GLenum type, const GLuint *coords) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[622]; - ((void (APIENTRY *)(GLenum texture, GLenum type, const GLuint *coords)) _func)(texture, type, coords); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoordP3ui)(GLenum texture, GLenum type, GLuint coords) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[623]; - ((void (APIENTRY *)(GLenum texture, GLenum type, GLuint coords)) _func)(texture, type, coords); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoordP3uiv)(GLenum texture, GLenum type, const GLuint *coords) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[624]; - ((void (APIENTRY *)(GLenum texture, GLenum type, const GLuint *coords)) _func)(texture, type, coords); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoordP4ui)(GLenum texture, GLenum type, GLuint coords) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[625]; - ((void (APIENTRY *)(GLenum texture, GLenum type, GLuint coords)) _func)(texture, type, coords); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiTexCoordP4uiv)(GLenum texture, GLenum type, const GLuint *coords) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[626]; - ((void (APIENTRY *)(GLenum texture, GLenum type, const GLuint *coords)) _func)(texture, type, coords); -} - -GLAPI void APIENTRY GLAPI_PREFIX(NormalP3ui)(GLenum type, GLuint coords) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[627]; - ((void (APIENTRY *)(GLenum type, GLuint coords)) _func)(type, coords); -} - -GLAPI void APIENTRY GLAPI_PREFIX(NormalP3uiv)(GLenum type, const GLuint *coords) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[628]; - ((void (APIENTRY *)(GLenum type, const GLuint *coords)) _func)(type, coords); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColorP3ui)(GLenum type, GLuint color) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[629]; - ((void (APIENTRY *)(GLenum type, GLuint color)) _func)(type, color); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColorP3uiv)(GLenum type, const GLuint *color) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[630]; - ((void (APIENTRY *)(GLenum type, const GLuint *color)) _func)(type, color); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoordP1ui)(GLenum type, GLuint coords) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[631]; - ((void (APIENTRY *)(GLenum type, GLuint coords)) _func)(type, coords); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoordP1uiv)(GLenum type, const GLuint *coords) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[632]; - ((void (APIENTRY *)(GLenum type, const GLuint *coords)) _func)(type, coords); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoordP2ui)(GLenum type, GLuint coords) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[633]; - ((void (APIENTRY *)(GLenum type, GLuint coords)) _func)(type, coords); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoordP2uiv)(GLenum type, const GLuint *coords) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[634]; - ((void (APIENTRY *)(GLenum type, const GLuint *coords)) _func)(type, coords); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoordP3ui)(GLenum type, GLuint coords) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[635]; - ((void (APIENTRY *)(GLenum type, GLuint coords)) _func)(type, coords); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoordP3uiv)(GLenum type, const GLuint *coords) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[636]; - ((void (APIENTRY *)(GLenum type, const GLuint *coords)) _func)(type, coords); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoordP4ui)(GLenum type, GLuint coords) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[637]; - ((void (APIENTRY *)(GLenum type, GLuint coords)) _func)(type, coords); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoordP4uiv)(GLenum type, const GLuint *coords) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[638]; - ((void (APIENTRY *)(GLenum type, const GLuint *coords)) _func)(type, coords); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribP1ui)(GLuint index, GLenum type, GLboolean normalized, GLuint value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[639]; - ((void (APIENTRY *)(GLuint index, GLenum type, GLboolean normalized, GLuint value)) _func)(index, type, normalized, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribP1uiv)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[640]; - ((void (APIENTRY *)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value)) _func)(index, type, normalized, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribP2ui)(GLuint index, GLenum type, GLboolean normalized, GLuint value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[641]; - ((void (APIENTRY *)(GLuint index, GLenum type, GLboolean normalized, GLuint value)) _func)(index, type, normalized, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribP2uiv)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[642]; - ((void (APIENTRY *)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value)) _func)(index, type, normalized, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribP3ui)(GLuint index, GLenum type, GLboolean normalized, GLuint value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[643]; - ((void (APIENTRY *)(GLuint index, GLenum type, GLboolean normalized, GLuint value)) _func)(index, type, normalized, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribP3uiv)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[644]; - ((void (APIENTRY *)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value)) _func)(index, type, normalized, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribP4ui)(GLuint index, GLenum type, GLboolean normalized, GLuint value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[645]; - ((void (APIENTRY *)(GLuint index, GLenum type, GLboolean normalized, GLuint value)) _func)(index, type, normalized, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribP4uiv)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[646]; - ((void (APIENTRY *)(GLuint index, GLenum type, GLboolean normalized, const GLuint *value)) _func)(index, type, normalized, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexP2ui)(GLenum type, GLuint value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[647]; - ((void (APIENTRY *)(GLenum type, GLuint value)) _func)(type, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexP2uiv)(GLenum type, const GLuint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[648]; - ((void (APIENTRY *)(GLenum type, const GLuint *value)) _func)(type, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexP3ui)(GLenum type, GLuint value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[649]; - ((void (APIENTRY *)(GLenum type, GLuint value)) _func)(type, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexP3uiv)(GLenum type, const GLuint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[650]; - ((void (APIENTRY *)(GLenum type, const GLuint *value)) _func)(type, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexP4ui)(GLenum type, GLuint value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[651]; - ((void (APIENTRY *)(GLenum type, GLuint value)) _func)(type, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexP4uiv)(GLenum type, const GLuint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[652]; - ((void (APIENTRY *)(GLenum type, const GLuint *value)) _func)(type, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindTransformFeedback)(GLenum target, GLuint id) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[653]; - ((void (APIENTRY *)(GLenum target, GLuint id)) _func)(target, id); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DeleteTransformFeedbacks)(GLsizei n, const GLuint *ids) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[654]; - ((void (APIENTRY *)(GLsizei n, const GLuint *ids)) _func)(n, ids); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DrawTransformFeedback)(GLenum mode, GLuint id) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[655]; - ((void (APIENTRY *)(GLenum mode, GLuint id)) _func)(mode, id); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GenTransformFeedbacks)(GLsizei n, GLuint *ids) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[656]; - ((void (APIENTRY *)(GLsizei n, GLuint *ids)) _func)(n, ids); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsTransformFeedback)(GLuint id) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[657]; - return ((GLboolean (APIENTRY *)(GLuint id)) _func)(id); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PauseTransformFeedback)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[658]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ResumeTransformFeedback)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[659]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ClearDepthf)(GLclampf depth) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[660]; - ((void (APIENTRY *)(GLclampf depth)) _func)(depth); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DepthRangef)(GLclampf zNear, GLclampf zFar) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[661]; - ((void (APIENTRY *)(GLclampf zNear, GLclampf zFar)) _func)(zNear, zFar); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[662]; - ((void (APIENTRY *)(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)) _func)(shadertype, precisiontype, range, precision); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ReleaseShaderCompiler)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[663]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ShaderBinary)(GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[664]; - ((void (APIENTRY *)(GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length)) _func)(n, shaders, binaryformat, binary, length); -} - -GLAPI GLenum APIENTRY GLAPI_PREFIX(GetGraphicsResetStatusARB)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[668]; - return ((GLenum (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetnColorTableARB)(GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[669]; - ((void (APIENTRY *)(GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table)) _func)(target, format, type, bufSize, table); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetnCompressedTexImageARB)(GLenum target, GLint lod, GLsizei bufSize, GLvoid *img) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[670]; - ((void (APIENTRY *)(GLenum target, GLint lod, GLsizei bufSize, GLvoid *img)) _func)(target, lod, bufSize, img); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetnConvolutionFilterARB)(GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[671]; - ((void (APIENTRY *)(GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image)) _func)(target, format, type, bufSize, image); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetnHistogramARB)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[672]; - ((void (APIENTRY *)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values)) _func)(target, reset, format, type, bufSize, values); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetnMapdvARB)(GLenum target, GLenum query, GLsizei bufSize, GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[673]; - ((void (APIENTRY *)(GLenum target, GLenum query, GLsizei bufSize, GLdouble *v)) _func)(target, query, bufSize, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetnMapfvARB)(GLenum target, GLenum query, GLsizei bufSize, GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[674]; - ((void (APIENTRY *)(GLenum target, GLenum query, GLsizei bufSize, GLfloat *v)) _func)(target, query, bufSize, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetnMapivARB)(GLenum target, GLenum query, GLsizei bufSize, GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[675]; - ((void (APIENTRY *)(GLenum target, GLenum query, GLsizei bufSize, GLint *v)) _func)(target, query, bufSize, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetnMinmaxARB)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[676]; - ((void (APIENTRY *)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values)) _func)(target, reset, format, type, bufSize, values); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetnPixelMapfvARB)(GLenum map, GLsizei bufSize, GLfloat *values) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[677]; - ((void (APIENTRY *)(GLenum map, GLsizei bufSize, GLfloat *values)) _func)(map, bufSize, values); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetnPixelMapuivARB)(GLenum map, GLsizei bufSize, GLuint *values) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[678]; - ((void (APIENTRY *)(GLenum map, GLsizei bufSize, GLuint *values)) _func)(map, bufSize, values); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetnPixelMapusvARB)(GLenum map, GLsizei bufSize, GLushort *values) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[679]; - ((void (APIENTRY *)(GLenum map, GLsizei bufSize, GLushort *values)) _func)(map, bufSize, values); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetnPolygonStippleARB)(GLsizei bufSize, GLubyte *pattern) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[680]; - ((void (APIENTRY *)(GLsizei bufSize, GLubyte *pattern)) _func)(bufSize, pattern); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetnSeparableFilterARB)(GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[681]; - ((void (APIENTRY *)(GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span)) _func)(target, format, type, rowBufSize, row, columnBufSize, column, span); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetnTexImageARB)(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[682]; - ((void (APIENTRY *)(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img)) _func)(target, level, format, type, bufSize, img); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetnUniformdvARB)(GLhandleARB program, GLint location, GLsizei bufSize, GLdouble *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[683]; - ((void (APIENTRY *)(GLhandleARB program, GLint location, GLsizei bufSize, GLdouble *params)) _func)(program, location, bufSize, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetnUniformfvARB)(GLhandleARB program, GLint location, GLsizei bufSize, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[684]; - ((void (APIENTRY *)(GLhandleARB program, GLint location, GLsizei bufSize, GLfloat *params)) _func)(program, location, bufSize, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetnUniformivARB)(GLhandleARB program, GLint location, GLsizei bufSize, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[685]; - ((void (APIENTRY *)(GLhandleARB program, GLint location, GLsizei bufSize, GLint *params)) _func)(program, location, bufSize, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetnUniformuivARB)(GLhandleARB program, GLint location, GLsizei bufSize, GLuint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[686]; - ((void (APIENTRY *)(GLhandleARB program, GLint location, GLsizei bufSize, GLuint *params)) _func)(program, location, bufSize, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ReadnPixelsARB)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[687]; - ((void (APIENTRY *)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data)) _func)(x, y, width, height, format, type, bufSize, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexStorage1D)(GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[688]; - ((void (APIENTRY *)(GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width)) _func)(target, levels, internalFormat, width); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexStorage2D)(GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[689]; - ((void (APIENTRY *)(GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height)) _func)(target, levels, internalFormat, width, height); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexStorage3D)(GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[690]; - ((void (APIENTRY *)(GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth)) _func)(target, levels, internalFormat, width, height, depth); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TextureStorage1DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[691]; - ((void (APIENTRY *)(GLuint texture, GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width)) _func)(texture, target, levels, internalFormat, width); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TextureStorage2DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[692]; - ((void (APIENTRY *)(GLuint texture, GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height)) _func)(texture, target, levels, internalFormat, width, height); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TextureStorage3DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[693]; - ((void (APIENTRY *)(GLuint texture, GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth)) _func)(texture, target, levels, internalFormat, width, height, depth); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PolygonOffsetEXT)(GLfloat factor, GLfloat bias) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[694]; - ((void (APIENTRY *)(GLfloat factor, GLfloat bias)) _func)(factor, bias); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[713]; - ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)) _func)(size, type, stride, count, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[714]; - ((void (APIENTRY *)(GLsizei stride, GLsizei count, const GLboolean *pointer)) _func)(stride, count, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[715]; - ((void (APIENTRY *)(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)) _func)(type, stride, count, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[716]; - ((void (APIENTRY *)(GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)) _func)(type, stride, count, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[717]; - ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)) _func)(size, type, stride, count, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[718]; - ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer)) _func)(size, type, stride, count, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PointParameterfEXT)(GLenum pname, GLfloat param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[719]; - ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PointParameterf)(GLenum pname, GLfloat param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[719]; - ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PointParameterfARB)(GLenum pname, GLfloat param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[719]; - ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PointParameterfvEXT)(GLenum pname, const GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[720]; - ((void (APIENTRY *)(GLenum pname, const GLfloat *params)) _func)(pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PointParameterfv)(GLenum pname, const GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[720]; - ((void (APIENTRY *)(GLenum pname, const GLfloat *params)) _func)(pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PointParameterfvARB)(GLenum pname, const GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[720]; - ((void (APIENTRY *)(GLenum pname, const GLfloat *params)) _func)(pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(LockArraysEXT)(GLint first, GLsizei count) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[721]; - ((void (APIENTRY *)(GLint first, GLsizei count)) _func)(first, count); -} - -GLAPI void APIENTRY GLAPI_PREFIX(UnlockArraysEXT)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[722]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[723]; - ((void (APIENTRY *)(GLbyte red, GLbyte green, GLbyte blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3b)(GLbyte red, GLbyte green, GLbyte blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[723]; - ((void (APIENTRY *)(GLbyte red, GLbyte green, GLbyte blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3bvEXT)(const GLbyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[724]; - ((void (APIENTRY *)(const GLbyte *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3bv)(const GLbyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[724]; - ((void (APIENTRY *)(const GLbyte *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[725]; - ((void (APIENTRY *)(GLdouble red, GLdouble green, GLdouble blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3d)(GLdouble red, GLdouble green, GLdouble blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[725]; - ((void (APIENTRY *)(GLdouble red, GLdouble green, GLdouble blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3dvEXT)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[726]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3dv)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[726]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[727]; - ((void (APIENTRY *)(GLfloat red, GLfloat green, GLfloat blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3f)(GLfloat red, GLfloat green, GLfloat blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[727]; - ((void (APIENTRY *)(GLfloat red, GLfloat green, GLfloat blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3fvEXT)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[728]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3fv)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[728]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3iEXT)(GLint red, GLint green, GLint blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[729]; - ((void (APIENTRY *)(GLint red, GLint green, GLint blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3i)(GLint red, GLint green, GLint blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[729]; - ((void (APIENTRY *)(GLint red, GLint green, GLint blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ivEXT)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[730]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3iv)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[730]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[731]; - ((void (APIENTRY *)(GLshort red, GLshort green, GLshort blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3s)(GLshort red, GLshort green, GLshort blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[731]; - ((void (APIENTRY *)(GLshort red, GLshort green, GLshort blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3svEXT)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[732]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3sv)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[732]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[733]; - ((void (APIENTRY *)(GLubyte red, GLubyte green, GLubyte blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ub)(GLubyte red, GLubyte green, GLubyte blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[733]; - ((void (APIENTRY *)(GLubyte red, GLubyte green, GLubyte blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ubvEXT)(const GLubyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[734]; - ((void (APIENTRY *)(const GLubyte *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ubv)(const GLubyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[734]; - ((void (APIENTRY *)(const GLubyte *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[735]; - ((void (APIENTRY *)(GLuint red, GLuint green, GLuint blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3ui)(GLuint red, GLuint green, GLuint blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[735]; - ((void (APIENTRY *)(GLuint red, GLuint green, GLuint blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3uivEXT)(const GLuint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[736]; - ((void (APIENTRY *)(const GLuint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3uiv)(const GLuint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[736]; - ((void (APIENTRY *)(const GLuint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[737]; - ((void (APIENTRY *)(GLushort red, GLushort green, GLushort blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3us)(GLushort red, GLushort green, GLushort blue) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[737]; - ((void (APIENTRY *)(GLushort red, GLushort green, GLushort blue)) _func)(red, green, blue); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3usvEXT)(const GLushort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[738]; - ((void (APIENTRY *)(const GLushort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColor3usv)(const GLushort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[738]; - ((void (APIENTRY *)(const GLushort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[739]; - ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(size, type, stride, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SecondaryColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[739]; - ((void (APIENTRY *)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(size, type, stride, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiDrawArraysEXT)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[740]; - ((void (APIENTRY *)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount)) _func)(mode, first, count, primcount); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiDrawArrays)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[740]; - ((void (APIENTRY *)(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount)) _func)(mode, first, count, primcount); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiDrawElementsEXT)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[741]; - ((void (APIENTRY *)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount)) _func)(mode, count, type, indices, primcount); -} - -GLAPI void APIENTRY GLAPI_PREFIX(MultiDrawElements)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[741]; - ((void (APIENTRY *)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount)) _func)(mode, count, type, indices, primcount); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[742]; - ((void (APIENTRY *)(GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(type, stride, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FogCoordPointer)(GLenum type, GLsizei stride, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[742]; - ((void (APIENTRY *)(GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(type, stride, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FogCoorddEXT)(GLdouble coord) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[743]; - ((void (APIENTRY *)(GLdouble coord)) _func)(coord); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FogCoordd)(GLdouble coord) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[743]; - ((void (APIENTRY *)(GLdouble coord)) _func)(coord); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FogCoorddvEXT)(const GLdouble *coord) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[744]; - ((void (APIENTRY *)(const GLdouble *coord)) _func)(coord); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FogCoorddv)(const GLdouble *coord) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[744]; - ((void (APIENTRY *)(const GLdouble *coord)) _func)(coord); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FogCoordfEXT)(GLfloat coord) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[745]; - ((void (APIENTRY *)(GLfloat coord)) _func)(coord); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FogCoordf)(GLfloat coord) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[745]; - ((void (APIENTRY *)(GLfloat coord)) _func)(coord); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FogCoordfvEXT)(const GLfloat *coord) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[746]; - ((void (APIENTRY *)(const GLfloat *coord)) _func)(coord); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FogCoordfv)(const GLfloat *coord) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[746]; - ((void (APIENTRY *)(const GLfloat *coord)) _func)(coord); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[748]; - ((void (APIENTRY *)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)) _func)(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BlendFuncSeparate)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[748]; - ((void (APIENTRY *)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)) _func)(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FlushVertexArrayRangeNV)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[749]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexArrayRangeNV)(GLsizei length, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[750]; - ((void (APIENTRY *)(GLsizei length, const GLvoid *pointer)) _func)(length, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[751]; - ((void (APIENTRY *)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage)) _func)(stage, portion, variable, input, mapping, componentUsage); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[752]; - ((void (APIENTRY *)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum)) _func)(stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CombinerParameterfNV)(GLenum pname, GLfloat param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[753]; - ((void (APIENTRY *)(GLenum pname, GLfloat param)) _func)(pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CombinerParameterfvNV)(GLenum pname, const GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[754]; - ((void (APIENTRY *)(GLenum pname, const GLfloat *params)) _func)(pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CombinerParameteriNV)(GLenum pname, GLint param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[755]; - ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(CombinerParameterivNV)(GLenum pname, const GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[756]; - ((void (APIENTRY *)(GLenum pname, const GLint *params)) _func)(pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[757]; - ((void (APIENTRY *)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage)) _func)(variable, input, mapping, componentUsage); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[758]; - ((void (APIENTRY *)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params)) _func)(stage, portion, variable, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[759]; - ((void (APIENTRY *)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params)) _func)(stage, portion, variable, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[760]; - ((void (APIENTRY *)(GLenum stage, GLenum portion, GLenum pname, GLfloat *params)) _func)(stage, portion, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[761]; - ((void (APIENTRY *)(GLenum stage, GLenum portion, GLenum pname, GLint *params)) _func)(stage, portion, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[762]; - ((void (APIENTRY *)(GLenum variable, GLenum pname, GLfloat *params)) _func)(variable, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[763]; - ((void (APIENTRY *)(GLenum variable, GLenum pname, GLint *params)) _func)(variable, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ResizeBuffersMESA)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[764]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2dMESA)(GLdouble x, GLdouble y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[765]; - ((void (APIENTRY *)(GLdouble x, GLdouble y)) _func)(x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2d)(GLdouble x, GLdouble y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[765]; - ((void (APIENTRY *)(GLdouble x, GLdouble y)) _func)(x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2dARB)(GLdouble x, GLdouble y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[765]; - ((void (APIENTRY *)(GLdouble x, GLdouble y)) _func)(x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2dvMESA)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[766]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2dv)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[766]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2dvARB)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[766]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2fMESA)(GLfloat x, GLfloat y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[767]; - ((void (APIENTRY *)(GLfloat x, GLfloat y)) _func)(x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2f)(GLfloat x, GLfloat y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[767]; - ((void (APIENTRY *)(GLfloat x, GLfloat y)) _func)(x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2fARB)(GLfloat x, GLfloat y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[767]; - ((void (APIENTRY *)(GLfloat x, GLfloat y)) _func)(x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2fvMESA)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[768]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2fv)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[768]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2fvARB)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[768]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2iMESA)(GLint x, GLint y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[769]; - ((void (APIENTRY *)(GLint x, GLint y)) _func)(x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2i)(GLint x, GLint y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[769]; - ((void (APIENTRY *)(GLint x, GLint y)) _func)(x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2iARB)(GLint x, GLint y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[769]; - ((void (APIENTRY *)(GLint x, GLint y)) _func)(x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2ivMESA)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[770]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2iv)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[770]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2ivARB)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[770]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2sMESA)(GLshort x, GLshort y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[771]; - ((void (APIENTRY *)(GLshort x, GLshort y)) _func)(x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2s)(GLshort x, GLshort y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[771]; - ((void (APIENTRY *)(GLshort x, GLshort y)) _func)(x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2sARB)(GLshort x, GLshort y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[771]; - ((void (APIENTRY *)(GLshort x, GLshort y)) _func)(x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2svMESA)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[772]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2sv)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[772]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos2svARB)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[772]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[773]; - ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3d)(GLdouble x, GLdouble y, GLdouble z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[773]; - ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3dARB)(GLdouble x, GLdouble y, GLdouble z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[773]; - ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3dvMESA)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[774]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3dv)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[774]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3dvARB)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[774]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[775]; - ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3f)(GLfloat x, GLfloat y, GLfloat z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[775]; - ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3fARB)(GLfloat x, GLfloat y, GLfloat z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[775]; - ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3fvMESA)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[776]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3fv)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[776]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3fvARB)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[776]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3iMESA)(GLint x, GLint y, GLint z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[777]; - ((void (APIENTRY *)(GLint x, GLint y, GLint z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3i)(GLint x, GLint y, GLint z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[777]; - ((void (APIENTRY *)(GLint x, GLint y, GLint z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3iARB)(GLint x, GLint y, GLint z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[777]; - ((void (APIENTRY *)(GLint x, GLint y, GLint z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3ivMESA)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[778]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3iv)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[778]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3ivARB)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[778]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3sMESA)(GLshort x, GLshort y, GLshort z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[779]; - ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3s)(GLshort x, GLshort y, GLshort z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[779]; - ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3sARB)(GLshort x, GLshort y, GLshort z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[779]; - ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z)) _func)(x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3svMESA)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[780]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3sv)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[780]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos3svARB)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[780]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[781]; - ((void (APIENTRY *)(GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4dvMESA)(const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[782]; - ((void (APIENTRY *)(const GLdouble *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[783]; - ((void (APIENTRY *)(GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4fvMESA)(const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[784]; - ((void (APIENTRY *)(const GLfloat *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[785]; - ((void (APIENTRY *)(GLint x, GLint y, GLint z, GLint w)) _func)(x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4ivMESA)(const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[786]; - ((void (APIENTRY *)(const GLint *v)) _func)(v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[787]; - ((void (APIENTRY *)(GLshort x, GLshort y, GLshort z, GLshort w)) _func)(x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(WindowPos4svMESA)(const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[788]; - ((void (APIENTRY *)(const GLshort *v)) _func)(v); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(AreProgramsResidentNV)(GLsizei n, const GLuint *ids, GLboolean *residences) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[798]; - return ((GLboolean (APIENTRY *)(GLsizei n, const GLuint *ids, GLboolean *residences)) _func)(n, ids, residences); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindProgramNV)(GLenum target, GLuint program) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[799]; - ((void (APIENTRY *)(GLenum target, GLuint program)) _func)(target, program); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindProgramARB)(GLenum target, GLuint program) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[799]; - ((void (APIENTRY *)(GLenum target, GLuint program)) _func)(target, program); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DeleteProgramsNV)(GLsizei n, const GLuint *programs) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[800]; - ((void (APIENTRY *)(GLsizei n, const GLuint *programs)) _func)(n, programs); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DeleteProgramsARB)(GLsizei n, const GLuint *programs) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[800]; - ((void (APIENTRY *)(GLsizei n, const GLuint *programs)) _func)(n, programs); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[801]; - ((void (APIENTRY *)(GLenum target, GLuint id, const GLfloat *params)) _func)(target, id, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GenProgramsNV)(GLsizei n, GLuint *programs) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[802]; - ((void (APIENTRY *)(GLsizei n, GLuint *programs)) _func)(n, programs); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GenProgramsARB)(GLsizei n, GLuint *programs) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[802]; - ((void (APIENTRY *)(GLsizei n, GLuint *programs)) _func)(n, programs); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[803]; - ((void (APIENTRY *)(GLenum target, GLuint index, GLenum pname, GLdouble *params)) _func)(target, index, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[804]; - ((void (APIENTRY *)(GLenum target, GLuint index, GLenum pname, GLfloat *params)) _func)(target, index, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramStringNV)(GLuint id, GLenum pname, GLubyte *program) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[805]; - ((void (APIENTRY *)(GLuint id, GLenum pname, GLubyte *program)) _func)(id, pname, program); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramivNV)(GLuint id, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[806]; - ((void (APIENTRY *)(GLuint id, GLenum pname, GLint *params)) _func)(id, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[807]; - ((void (APIENTRY *)(GLenum target, GLuint address, GLenum pname, GLint *params)) _func)(target, address, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid **pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[808]; - ((void (APIENTRY *)(GLuint index, GLenum pname, GLvoid **pointer)) _func)(index, pname, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid **pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[808]; - ((void (APIENTRY *)(GLuint index, GLenum pname, GLvoid **pointer)) _func)(index, pname, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribPointervARB)(GLuint index, GLenum pname, GLvoid **pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[808]; - ((void (APIENTRY *)(GLuint index, GLenum pname, GLvoid **pointer)) _func)(index, pname, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[809]; - ((void (APIENTRY *)(GLuint index, GLenum pname, GLdouble *params)) _func)(index, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[810]; - ((void (APIENTRY *)(GLuint index, GLenum pname, GLfloat *params)) _func)(index, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribivNV)(GLuint index, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[811]; - ((void (APIENTRY *)(GLuint index, GLenum pname, GLint *params)) _func)(index, pname, params); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsProgramNV)(GLuint program) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[812]; - return ((GLboolean (APIENTRY *)(GLuint program)) _func)(program); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsProgramARB)(GLuint program) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[812]; - return ((GLboolean (APIENTRY *)(GLuint program)) _func)(program); -} - -GLAPI void APIENTRY GLAPI_PREFIX(LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte *program) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[813]; - ((void (APIENTRY *)(GLenum target, GLuint id, GLsizei len, const GLubyte *program)) _func)(target, id, len, program); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameters4dvNV)(GLenum target, GLuint index, GLsizei num, const GLdouble *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[814]; - ((void (APIENTRY *)(GLenum target, GLuint index, GLsizei num, const GLdouble *params)) _func)(target, index, num, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProgramParameters4fvNV)(GLenum target, GLuint index, GLsizei num, const GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[815]; - ((void (APIENTRY *)(GLenum target, GLuint index, GLsizei num, const GLfloat *params)) _func)(target, index, num, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RequestResidentProgramsNV)(GLsizei n, const GLuint *ids) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[816]; - ((void (APIENTRY *)(GLsizei n, const GLuint *ids)) _func)(n, ids); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[817]; - ((void (APIENTRY *)(GLenum target, GLuint address, GLenum matrix, GLenum transform)) _func)(target, address, matrix, transform); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1dNV)(GLuint index, GLdouble x) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[818]; - ((void (APIENTRY *)(GLuint index, GLdouble x)) _func)(index, x); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1dvNV)(GLuint index, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[819]; - ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1fNV)(GLuint index, GLfloat x) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[820]; - ((void (APIENTRY *)(GLuint index, GLfloat x)) _func)(index, x); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1fvNV)(GLuint index, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[821]; - ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1sNV)(GLuint index, GLshort x) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[822]; - ((void (APIENTRY *)(GLuint index, GLshort x)) _func)(index, x); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib1svNV)(GLuint index, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[823]; - ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[824]; - ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y)) _func)(index, x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2dvNV)(GLuint index, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[825]; - ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[826]; - ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y)) _func)(index, x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2fvNV)(GLuint index, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[827]; - ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[828]; - ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y)) _func)(index, x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib2svNV)(GLuint index, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[829]; - ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[830]; - ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y, GLdouble z)) _func)(index, x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3dvNV)(GLuint index, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[831]; - ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[832]; - ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y, GLfloat z)) _func)(index, x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3fvNV)(GLuint index, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[833]; - ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[834]; - ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y, GLshort z)) _func)(index, x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib3svNV)(GLuint index, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[835]; - ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[836]; - ((void (APIENTRY *)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4dvNV)(GLuint index, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[837]; - ((void (APIENTRY *)(GLuint index, const GLdouble *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[838]; - ((void (APIENTRY *)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4fvNV)(GLuint index, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[839]; - ((void (APIENTRY *)(GLuint index, const GLfloat *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[840]; - ((void (APIENTRY *)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)) _func)(index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4svNV)(GLuint index, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[841]; - ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[842]; - ((void (APIENTRY *)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)) _func)(index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttrib4ubvNV)(GLuint index, const GLubyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[843]; - ((void (APIENTRY *)(GLuint index, const GLubyte *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[844]; - ((void (APIENTRY *)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(index, size, type, stride, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[845]; - ((void (APIENTRY *)(GLuint index, GLsizei n, const GLdouble *v)) _func)(index, n, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[846]; - ((void (APIENTRY *)(GLuint index, GLsizei n, const GLfloat *v)) _func)(index, n, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[847]; - ((void (APIENTRY *)(GLuint index, GLsizei n, const GLshort *v)) _func)(index, n, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[848]; - ((void (APIENTRY *)(GLuint index, GLsizei n, const GLdouble *v)) _func)(index, n, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[849]; - ((void (APIENTRY *)(GLuint index, GLsizei n, const GLfloat *v)) _func)(index, n, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[850]; - ((void (APIENTRY *)(GLuint index, GLsizei n, const GLshort *v)) _func)(index, n, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[851]; - ((void (APIENTRY *)(GLuint index, GLsizei n, const GLdouble *v)) _func)(index, n, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[852]; - ((void (APIENTRY *)(GLuint index, GLsizei n, const GLfloat *v)) _func)(index, n, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[853]; - ((void (APIENTRY *)(GLuint index, GLsizei n, const GLshort *v)) _func)(index, n, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[854]; - ((void (APIENTRY *)(GLuint index, GLsizei n, const GLdouble *v)) _func)(index, n, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[855]; - ((void (APIENTRY *)(GLuint index, GLsizei n, const GLfloat *v)) _func)(index, n, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[856]; - ((void (APIENTRY *)(GLuint index, GLsizei n, const GLshort *v)) _func)(index, n, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[857]; - ((void (APIENTRY *)(GLuint index, GLsizei n, const GLubyte *v)) _func)(index, n, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetTexBumpParameterfvATI)(GLenum pname, GLfloat *param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[858]; - ((void (APIENTRY *)(GLenum pname, GLfloat *param)) _func)(pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetTexBumpParameterivATI)(GLenum pname, GLint *param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[859]; - ((void (APIENTRY *)(GLenum pname, GLint *param)) _func)(pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexBumpParameterfvATI)(GLenum pname, const GLfloat *param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[860]; - ((void (APIENTRY *)(GLenum pname, const GLfloat *param)) _func)(pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexBumpParameterivATI)(GLenum pname, const GLint *param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[861]; - ((void (APIENTRY *)(GLenum pname, const GLint *param)) _func)(pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(AlphaFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[862]; - ((void (APIENTRY *)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod)) _func)(op, dst, dstMod, arg1, arg1Rep, arg1Mod); -} - -GLAPI void APIENTRY GLAPI_PREFIX(AlphaFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[863]; - ((void (APIENTRY *)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod)) _func)(op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod); -} - -GLAPI void APIENTRY GLAPI_PREFIX(AlphaFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[864]; - ((void (APIENTRY *)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod)) _func)(op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BeginFragmentShaderATI)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[865]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindFragmentShaderATI)(GLuint id) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[866]; - ((void (APIENTRY *)(GLuint id)) _func)(id); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ColorFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[867]; - ((void (APIENTRY *)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod)) _func)(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ColorFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[868]; - ((void (APIENTRY *)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod)) _func)(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ColorFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[869]; - ((void (APIENTRY *)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod)) _func)(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DeleteFragmentShaderATI)(GLuint id) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[870]; - ((void (APIENTRY *)(GLuint id)) _func)(id); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EndFragmentShaderATI)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[871]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI GLuint APIENTRY GLAPI_PREFIX(GenFragmentShadersATI)(GLuint range) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[872]; - return ((GLuint (APIENTRY *)(GLuint range)) _func)(range); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PassTexCoordATI)(GLuint dst, GLuint coord, GLenum swizzle) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[873]; - ((void (APIENTRY *)(GLuint dst, GLuint coord, GLenum swizzle)) _func)(dst, coord, swizzle); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SampleMapATI)(GLuint dst, GLuint interp, GLenum swizzle) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[874]; - ((void (APIENTRY *)(GLuint dst, GLuint interp, GLenum swizzle)) _func)(dst, interp, swizzle); -} - -GLAPI void APIENTRY GLAPI_PREFIX(SetFragmentShaderConstantATI)(GLuint dst, const GLfloat *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[875]; - ((void (APIENTRY *)(GLuint dst, const GLfloat *value)) _func)(dst, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PointParameteriNV)(GLenum pname, GLint param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[876]; - ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PointParameteri)(GLenum pname, GLint param) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[876]; - ((void (APIENTRY *)(GLenum pname, GLint param)) _func)(pname, param); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PointParameterivNV)(GLenum pname, const GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[877]; - ((void (APIENTRY *)(GLenum pname, const GLint *params)) _func)(pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PointParameteriv)(GLenum pname, const GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[877]; - ((void (APIENTRY *)(GLenum pname, const GLint *params)) _func)(pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DeleteVertexArrays)(GLsizei n, const GLuint *arrays) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[880]; - ((void (APIENTRY *)(GLsizei n, const GLuint *arrays)) _func)(n, arrays); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsVertexArray)(GLuint array) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[882]; - return ((GLboolean (APIENTRY *)(GLuint array)) _func)(array); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte *name, GLdouble *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[883]; - ((void (APIENTRY *)(GLuint id, GLsizei len, const GLubyte *name, GLdouble *params)) _func)(id, len, name, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte *name, GLfloat *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[884]; - ((void (APIENTRY *)(GLuint id, GLsizei len, const GLubyte *name, GLfloat *params)) _func)(id, len, name, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[885]; - ((void (APIENTRY *)(GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) _func)(id, len, name, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[886]; - ((void (APIENTRY *)(GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v)) _func)(id, len, name, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[887]; - ((void (APIENTRY *)(GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) _func)(id, len, name, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[888]; - ((void (APIENTRY *)(GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v)) _func)(id, len, name, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PrimitiveRestartIndexNV)(GLuint index) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[889]; - ((void (APIENTRY *)(GLuint index)) _func)(index); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PrimitiveRestartIndex)(GLuint index) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[889]; - ((void (APIENTRY *)(GLuint index)) _func)(index); -} - -GLAPI void APIENTRY GLAPI_PREFIX(PrimitiveRestartNV)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[890]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BlendEquationSeparate)(GLenum modeRGB, GLenum modeA) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[938]; - ((void (APIENTRY *)(GLenum modeRGB, GLenum modeA)) _func)(modeRGB, modeA); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindFramebufferEXT)(GLenum target, GLuint framebuffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[939]; - ((void (APIENTRY *)(GLenum target, GLuint framebuffer)) _func)(target, framebuffer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindFramebuffer)(GLenum target, GLuint framebuffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[939]; - ((void (APIENTRY *)(GLenum target, GLuint framebuffer)) _func)(target, framebuffer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindRenderbufferEXT)(GLenum target, GLuint renderbuffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[940]; - ((void (APIENTRY *)(GLenum target, GLuint renderbuffer)) _func)(target, renderbuffer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindRenderbuffer)(GLenum target, GLuint renderbuffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[940]; - ((void (APIENTRY *)(GLenum target, GLuint renderbuffer)) _func)(target, renderbuffer); -} - -GLAPI GLenum APIENTRY GLAPI_PREFIX(CheckFramebufferStatusEXT)(GLenum target) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[941]; - return ((GLenum (APIENTRY *)(GLenum target)) _func)(target); -} - -GLAPI GLenum APIENTRY GLAPI_PREFIX(CheckFramebufferStatus)(GLenum target) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[941]; - return ((GLenum (APIENTRY *)(GLenum target)) _func)(target); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DeleteFramebuffersEXT)(GLsizei n, const GLuint *framebuffers) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[942]; - ((void (APIENTRY *)(GLsizei n, const GLuint *framebuffers)) _func)(n, framebuffers); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DeleteFramebuffers)(GLsizei n, const GLuint *framebuffers) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[942]; - ((void (APIENTRY *)(GLsizei n, const GLuint *framebuffers)) _func)(n, framebuffers); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DeleteRenderbuffersEXT)(GLsizei n, const GLuint *renderbuffers) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[943]; - ((void (APIENTRY *)(GLsizei n, const GLuint *renderbuffers)) _func)(n, renderbuffers); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DeleteRenderbuffers)(GLsizei n, const GLuint *renderbuffers) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[943]; - ((void (APIENTRY *)(GLsizei n, const GLuint *renderbuffers)) _func)(n, renderbuffers); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[944]; - ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)) _func)(target, attachment, renderbuffertarget, renderbuffer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[944]; - ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)) _func)(target, attachment, renderbuffertarget, renderbuffer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[945]; - ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)) _func)(target, attachment, textarget, texture, level); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture1D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[945]; - ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)) _func)(target, attachment, textarget, texture, level); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[946]; - ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)) _func)(target, attachment, textarget, texture, level); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[946]; - ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)) _func)(target, attachment, textarget, texture, level); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[947]; - ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)) _func)(target, attachment, textarget, texture, level, zoffset); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTexture3D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[947]; - ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)) _func)(target, attachment, textarget, texture, level, zoffset); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GenFramebuffersEXT)(GLsizei n, GLuint *framebuffers) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[948]; - ((void (APIENTRY *)(GLsizei n, GLuint *framebuffers)) _func)(n, framebuffers); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GenFramebuffers)(GLsizei n, GLuint *framebuffers) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[948]; - ((void (APIENTRY *)(GLsizei n, GLuint *framebuffers)) _func)(n, framebuffers); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GenRenderbuffersEXT)(GLsizei n, GLuint *renderbuffers) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[949]; - ((void (APIENTRY *)(GLsizei n, GLuint *renderbuffers)) _func)(n, renderbuffers); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GenRenderbuffers)(GLsizei n, GLuint *renderbuffers) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[949]; - ((void (APIENTRY *)(GLsizei n, GLuint *renderbuffers)) _func)(n, renderbuffers); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GenerateMipmapEXT)(GLenum target) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[950]; - ((void (APIENTRY *)(GLenum target)) _func)(target); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GenerateMipmap)(GLenum target) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[950]; - ((void (APIENTRY *)(GLenum target)) _func)(target); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[951]; - ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum pname, GLint *params)) _func)(target, attachment, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[951]; - ((void (APIENTRY *)(GLenum target, GLenum attachment, GLenum pname, GLint *params)) _func)(target, attachment, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[952]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[952]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsFramebufferEXT)(GLuint framebuffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[953]; - return ((GLboolean (APIENTRY *)(GLuint framebuffer)) _func)(framebuffer); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsFramebuffer)(GLuint framebuffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[953]; - return ((GLboolean (APIENTRY *)(GLuint framebuffer)) _func)(framebuffer); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsRenderbufferEXT)(GLuint renderbuffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[954]; - return ((GLboolean (APIENTRY *)(GLuint renderbuffer)) _func)(renderbuffer); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsRenderbuffer)(GLuint renderbuffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[954]; - return ((GLboolean (APIENTRY *)(GLuint renderbuffer)) _func)(renderbuffer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[955]; - ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)) _func)(target, internalformat, width, height); -} - -GLAPI void APIENTRY GLAPI_PREFIX(RenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[955]; - ((void (APIENTRY *)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)) _func)(target, internalformat, width, height); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BlitFramebuffer)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[956]; - ((void (APIENTRY *)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)) _func)(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindFragDataLocationEXT)(GLuint program, GLuint colorNumber, const GLchar *name) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[959]; - ((void (APIENTRY *)(GLuint program, GLuint colorNumber, const GLchar *name)) _func)(program, colorNumber, name); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindFragDataLocation)(GLuint program, GLuint colorNumber, const GLchar *name) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[959]; - ((void (APIENTRY *)(GLuint program, GLuint colorNumber, const GLchar *name)) _func)(program, colorNumber, name); -} - -GLAPI GLint APIENTRY GLAPI_PREFIX(GetFragDataLocationEXT)(GLuint program, const GLchar *name) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[960]; - return ((GLint (APIENTRY *)(GLuint program, const GLchar *name)) _func)(program, name); -} - -GLAPI GLint APIENTRY GLAPI_PREFIX(GetFragDataLocation)(GLuint program, const GLchar *name) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[960]; - return ((GLint (APIENTRY *)(GLuint program, const GLchar *name)) _func)(program, name); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetUniformuivEXT)(GLuint program, GLint location, GLuint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[961]; - ((void (APIENTRY *)(GLuint program, GLint location, GLuint *params)) _func)(program, location, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetUniformuiv)(GLuint program, GLint location, GLuint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[961]; - ((void (APIENTRY *)(GLuint program, GLint location, GLuint *params)) _func)(program, location, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribIivEXT)(GLuint index, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[962]; - ((void (APIENTRY *)(GLuint index, GLenum pname, GLint *params)) _func)(index, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribIiv)(GLuint index, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[962]; - ((void (APIENTRY *)(GLuint index, GLenum pname, GLint *params)) _func)(index, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribIuivEXT)(GLuint index, GLenum pname, GLuint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[963]; - ((void (APIENTRY *)(GLuint index, GLenum pname, GLuint *params)) _func)(index, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetVertexAttribIuiv)(GLuint index, GLenum pname, GLuint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[963]; - ((void (APIENTRY *)(GLuint index, GLenum pname, GLuint *params)) _func)(index, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1uiEXT)(GLint location, GLuint x) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[964]; - ((void (APIENTRY *)(GLint location, GLuint x)) _func)(location, x); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1ui)(GLint location, GLuint x) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[964]; - ((void (APIENTRY *)(GLint location, GLuint x)) _func)(location, x); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1uivEXT)(GLint location, GLsizei count, const GLuint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[965]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLuint *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform1uiv)(GLint location, GLsizei count, const GLuint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[965]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLuint *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2uiEXT)(GLint location, GLuint x, GLuint y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[966]; - ((void (APIENTRY *)(GLint location, GLuint x, GLuint y)) _func)(location, x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2ui)(GLint location, GLuint x, GLuint y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[966]; - ((void (APIENTRY *)(GLint location, GLuint x, GLuint y)) _func)(location, x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2uivEXT)(GLint location, GLsizei count, const GLuint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[967]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLuint *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform2uiv)(GLint location, GLsizei count, const GLuint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[967]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLuint *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3uiEXT)(GLint location, GLuint x, GLuint y, GLuint z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[968]; - ((void (APIENTRY *)(GLint location, GLuint x, GLuint y, GLuint z)) _func)(location, x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3ui)(GLint location, GLuint x, GLuint y, GLuint z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[968]; - ((void (APIENTRY *)(GLint location, GLuint x, GLuint y, GLuint z)) _func)(location, x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3uivEXT)(GLint location, GLsizei count, const GLuint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[969]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLuint *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform3uiv)(GLint location, GLsizei count, const GLuint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[969]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLuint *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4uiEXT)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[970]; - ((void (APIENTRY *)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w)) _func)(location, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4ui)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[970]; - ((void (APIENTRY *)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w)) _func)(location, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4uivEXT)(GLint location, GLsizei count, const GLuint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[971]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLuint *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Uniform4uiv)(GLint location, GLsizei count, const GLuint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[971]; - ((void (APIENTRY *)(GLint location, GLsizei count, const GLuint *value)) _func)(location, count, value); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1iEXT)(GLuint index, GLint x) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[972]; - ((void (APIENTRY *)(GLuint index, GLint x)) _func)(index, x); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1i)(GLuint index, GLint x) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[972]; - ((void (APIENTRY *)(GLuint index, GLint x)) _func)(index, x); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1ivEXT)(GLuint index, const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[973]; - ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1iv)(GLuint index, const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[973]; - ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1uiEXT)(GLuint index, GLuint x) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[974]; - ((void (APIENTRY *)(GLuint index, GLuint x)) _func)(index, x); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1ui)(GLuint index, GLuint x) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[974]; - ((void (APIENTRY *)(GLuint index, GLuint x)) _func)(index, x); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1uivEXT)(GLuint index, const GLuint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[975]; - ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI1uiv)(GLuint index, const GLuint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[975]; - ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2iEXT)(GLuint index, GLint x, GLint y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[976]; - ((void (APIENTRY *)(GLuint index, GLint x, GLint y)) _func)(index, x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2i)(GLuint index, GLint x, GLint y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[976]; - ((void (APIENTRY *)(GLuint index, GLint x, GLint y)) _func)(index, x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2ivEXT)(GLuint index, const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[977]; - ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2iv)(GLuint index, const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[977]; - ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2uiEXT)(GLuint index, GLuint x, GLuint y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[978]; - ((void (APIENTRY *)(GLuint index, GLuint x, GLuint y)) _func)(index, x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2ui)(GLuint index, GLuint x, GLuint y) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[978]; - ((void (APIENTRY *)(GLuint index, GLuint x, GLuint y)) _func)(index, x, y); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2uivEXT)(GLuint index, const GLuint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[979]; - ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI2uiv)(GLuint index, const GLuint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[979]; - ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3iEXT)(GLuint index, GLint x, GLint y, GLint z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[980]; - ((void (APIENTRY *)(GLuint index, GLint x, GLint y, GLint z)) _func)(index, x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3i)(GLuint index, GLint x, GLint y, GLint z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[980]; - ((void (APIENTRY *)(GLuint index, GLint x, GLint y, GLint z)) _func)(index, x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3ivEXT)(GLuint index, const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[981]; - ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3iv)(GLuint index, const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[981]; - ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3uiEXT)(GLuint index, GLuint x, GLuint y, GLuint z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[982]; - ((void (APIENTRY *)(GLuint index, GLuint x, GLuint y, GLuint z)) _func)(index, x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3ui)(GLuint index, GLuint x, GLuint y, GLuint z) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[982]; - ((void (APIENTRY *)(GLuint index, GLuint x, GLuint y, GLuint z)) _func)(index, x, y, z); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3uivEXT)(GLuint index, const GLuint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[983]; - ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI3uiv)(GLuint index, const GLuint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[983]; - ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4bvEXT)(GLuint index, const GLbyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[984]; - ((void (APIENTRY *)(GLuint index, const GLbyte *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4bv)(GLuint index, const GLbyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[984]; - ((void (APIENTRY *)(GLuint index, const GLbyte *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4iEXT)(GLuint index, GLint x, GLint y, GLint z, GLint w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[985]; - ((void (APIENTRY *)(GLuint index, GLint x, GLint y, GLint z, GLint w)) _func)(index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4i)(GLuint index, GLint x, GLint y, GLint z, GLint w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[985]; - ((void (APIENTRY *)(GLuint index, GLint x, GLint y, GLint z, GLint w)) _func)(index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4ivEXT)(GLuint index, const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[986]; - ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4iv)(GLuint index, const GLint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[986]; - ((void (APIENTRY *)(GLuint index, const GLint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4svEXT)(GLuint index, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[987]; - ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4sv)(GLuint index, const GLshort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[987]; - ((void (APIENTRY *)(GLuint index, const GLshort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4ubvEXT)(GLuint index, const GLubyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[988]; - ((void (APIENTRY *)(GLuint index, const GLubyte *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4ubv)(GLuint index, const GLubyte *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[988]; - ((void (APIENTRY *)(GLuint index, const GLubyte *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4uiEXT)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[989]; - ((void (APIENTRY *)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)) _func)(index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4ui)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[989]; - ((void (APIENTRY *)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)) _func)(index, x, y, z, w); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4uivEXT)(GLuint index, const GLuint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[990]; - ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4uiv)(GLuint index, const GLuint *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[990]; - ((void (APIENTRY *)(GLuint index, const GLuint *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4usvEXT)(GLuint index, const GLushort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[991]; - ((void (APIENTRY *)(GLuint index, const GLushort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribI4usv)(GLuint index, const GLushort *v) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[991]; - ((void (APIENTRY *)(GLuint index, const GLushort *v)) _func)(index, v); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribIPointerEXT)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[992]; - ((void (APIENTRY *)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(index, size, type, stride, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(VertexAttribIPointer)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[992]; - ((void (APIENTRY *)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) _func)(index, size, type, stride, pointer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTextureLayerEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[993]; - ((void (APIENTRY *)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)) _func)(target, attachment, texture, level, layer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTextureLayer)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[993]; - ((void (APIENTRY *)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)) _func)(target, attachment, texture, level, layer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(FramebufferTextureLayerARB)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[993]; - ((void (APIENTRY *)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)) _func)(target, attachment, texture, level, layer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ColorMaskIndexedEXT)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[994]; - ((void (APIENTRY *)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a)) _func)(buf, r, g, b, a); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ColorMaski)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[994]; - ((void (APIENTRY *)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a)) _func)(buf, r, g, b, a); -} - -GLAPI void APIENTRY GLAPI_PREFIX(DisableIndexedEXT)(GLenum target, GLuint index) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[995]; - ((void (APIENTRY *)(GLenum target, GLuint index)) _func)(target, index); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Disablei)(GLenum target, GLuint index) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[995]; - ((void (APIENTRY *)(GLenum target, GLuint index)) _func)(target, index); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EnableIndexedEXT)(GLenum target, GLuint index) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[996]; - ((void (APIENTRY *)(GLenum target, GLuint index)) _func)(target, index); -} - -GLAPI void APIENTRY GLAPI_PREFIX(Enablei)(GLenum target, GLuint index) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[996]; - ((void (APIENTRY *)(GLenum target, GLuint index)) _func)(target, index); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetBooleanIndexedvEXT)(GLenum value, GLuint index, GLboolean *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[997]; - ((void (APIENTRY *)(GLenum value, GLuint index, GLboolean *data)) _func)(value, index, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetBooleani_v)(GLenum value, GLuint index, GLboolean *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[997]; - ((void (APIENTRY *)(GLenum value, GLuint index, GLboolean *data)) _func)(value, index, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetIntegerIndexedvEXT)(GLenum value, GLuint index, GLint *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[998]; - ((void (APIENTRY *)(GLenum value, GLuint index, GLint *data)) _func)(value, index, data); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetIntegeri_v)(GLenum value, GLuint index, GLint *data) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[998]; - ((void (APIENTRY *)(GLenum value, GLuint index, GLint *data)) _func)(value, index, data); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsEnabledIndexedEXT)(GLenum target, GLuint index) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[999]; - return ((GLboolean (APIENTRY *)(GLenum target, GLuint index)) _func)(target, index); -} - -GLAPI GLboolean APIENTRY GLAPI_PREFIX(IsEnabledi)(GLenum target, GLuint index) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[999]; - return ((GLboolean (APIENTRY *)(GLenum target, GLuint index)) _func)(target, index); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ClearColorIiEXT)(GLint r, GLint g, GLint b, GLint a) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1000]; - ((void (APIENTRY *)(GLint r, GLint g, GLint b, GLint a)) _func)(r, g, b, a); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ClearColorIuiEXT)(GLuint r, GLuint g, GLuint b, GLuint a) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1001]; - ((void (APIENTRY *)(GLuint r, GLuint g, GLuint b, GLuint a)) _func)(r, g, b, a); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameterIivEXT)(GLenum target, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1002]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameterIiv)(GLenum target, GLenum pname, GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1002]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameterIuivEXT)(GLenum target, GLenum pname, GLuint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1003]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLuint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetTexParameterIuiv)(GLenum target, GLenum pname, GLuint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1003]; - ((void (APIENTRY *)(GLenum target, GLenum pname, GLuint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexParameterIivEXT)(GLenum target, GLenum pname, const GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1004]; - ((void (APIENTRY *)(GLenum target, GLenum pname, const GLint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexParameterIiv)(GLenum target, GLenum pname, const GLint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1004]; - ((void (APIENTRY *)(GLenum target, GLenum pname, const GLint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexParameterIuivEXT)(GLenum target, GLenum pname, const GLuint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1005]; - ((void (APIENTRY *)(GLenum target, GLenum pname, const GLuint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TexParameterIuiv)(GLenum target, GLenum pname, const GLuint *params) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1005]; - ((void (APIENTRY *)(GLenum target, GLenum pname, const GLuint *params)) _func)(target, pname, params); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BeginConditionalRenderNV)(GLuint query, GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1006]; - ((void (APIENTRY *)(GLuint query, GLenum mode)) _func)(query, mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BeginConditionalRender)(GLuint query, GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1006]; - ((void (APIENTRY *)(GLuint query, GLenum mode)) _func)(query, mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EndConditionalRenderNV)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1007]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EndConditionalRender)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1007]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BeginTransformFeedbackEXT)(GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1008]; - ((void (APIENTRY *)(GLenum mode)) _func)(mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BeginTransformFeedback)(GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1008]; - ((void (APIENTRY *)(GLenum mode)) _func)(mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindBufferBaseEXT)(GLenum target, GLuint index, GLuint buffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1009]; - ((void (APIENTRY *)(GLenum target, GLuint index, GLuint buffer)) _func)(target, index, buffer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindBufferBase)(GLenum target, GLuint index, GLuint buffer) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1009]; - ((void (APIENTRY *)(GLenum target, GLuint index, GLuint buffer)) _func)(target, index, buffer); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindBufferOffsetEXT)(GLenum target, GLuint index, GLuint buffer, GLintptr offset) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1010]; - ((void (APIENTRY *)(GLenum target, GLuint index, GLuint buffer, GLintptr offset)) _func)(target, index, buffer, offset); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindBufferRangeEXT)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1011]; - ((void (APIENTRY *)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)) _func)(target, index, buffer, offset, size); -} - -GLAPI void APIENTRY GLAPI_PREFIX(BindBufferRange)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1011]; - ((void (APIENTRY *)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)) _func)(target, index, buffer, offset, size); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EndTransformFeedbackEXT)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1012]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EndTransformFeedback)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1012]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetTransformFeedbackVaryingEXT)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1013]; - ((void (APIENTRY *)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)) _func)(program, index, bufSize, length, size, type, name); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetTransformFeedbackVarying)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1013]; - ((void (APIENTRY *)(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)) _func)(program, index, bufSize, length, size, type, name); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TransformFeedbackVaryingsEXT)(GLuint program, GLsizei count, const char **varyings, GLenum bufferMode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1014]; - ((void (APIENTRY *)(GLuint program, GLsizei count, const char **varyings, GLenum bufferMode)) _func)(program, count, varyings, bufferMode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TransformFeedbackVaryings)(GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1014]; - ((void (APIENTRY *)(GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode)) _func)(program, count, varyings, bufferMode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProvokingVertexEXT)(GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1015]; - ((void (APIENTRY *)(GLenum mode)) _func)(mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ProvokingVertex)(GLenum mode) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1015]; - ((void (APIENTRY *)(GLenum mode)) _func)(mode); -} - -GLAPI void APIENTRY GLAPI_PREFIX(GetObjectParameterivAPPLE)(GLenum objectType, GLuint name, GLenum pname, GLint *value) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1018]; - ((void (APIENTRY *)(GLenum objectType, GLuint name, GLenum pname, GLint *value)) _func)(objectType, name, pname, value); -} - -GLAPI GLenum APIENTRY GLAPI_PREFIX(ObjectPurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1019]; - return ((GLenum (APIENTRY *)(GLenum objectType, GLuint name, GLenum option)) _func)(objectType, name, option); -} - -GLAPI GLenum APIENTRY GLAPI_PREFIX(ObjectUnpurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1020]; - return ((GLenum (APIENTRY *)(GLenum objectType, GLuint name, GLenum option)) _func)(objectType, name, option); -} - -GLAPI void APIENTRY GLAPI_PREFIX(ActiveProgramEXT)(GLuint program) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1021]; - ((void (APIENTRY *)(GLuint program)) _func)(program); -} - -GLAPI GLuint APIENTRY GLAPI_PREFIX(CreateShaderProgramEXT)(GLenum type, const GLchar *string) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1022]; - return ((GLuint (APIENTRY *)(GLenum type, const GLchar *string)) _func)(type, string); -} - -GLAPI void APIENTRY GLAPI_PREFIX(UseShaderProgramEXT)(GLenum type, GLuint program) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1023]; - ((void (APIENTRY *)(GLenum type, GLuint program)) _func)(type, program); -} - -GLAPI void APIENTRY GLAPI_PREFIX(TextureBarrierNV)(void) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1024]; - ((void (APIENTRY *)(void)) _func)(); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid *writeOffset) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1030]; - ((void (APIENTRY *)(GLenum target, GLvoid *writeOffset)) _func)(target, writeOffset); -} - -GLAPI void APIENTRY GLAPI_PREFIX(EGLImageTargetTexture2DOES)(GLenum target, GLvoid *writeOffset) -{ - const struct mapi_table *_tbl = entry_current_get(); - mapi_func _func = ((const mapi_func *) _tbl)[1031]; - ((void (APIENTRY *)(GLenum target, GLvoid *writeOffset)) _func)(target, writeOffset); -} - -/* does not need public_entries */ -#undef MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN -#endif /* MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN */ - -#ifdef MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN -__asm__( -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(NewList))"\n" -"\t"STUB_ASM_CODE("0")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EndList))"\n" -"\t"STUB_ASM_CODE("1")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CallList))"\n" -"\t"STUB_ASM_CODE("2")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CallLists))"\n" -"\t"STUB_ASM_CODE("3")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteLists))"\n" -"\t"STUB_ASM_CODE("4")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenLists))"\n" -"\t"STUB_ASM_CODE("5")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ListBase))"\n" -"\t"STUB_ASM_CODE("6")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Begin))"\n" -"\t"STUB_ASM_CODE("7")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Bitmap))"\n" -"\t"STUB_ASM_CODE("8")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3b))"\n" -"\t"STUB_ASM_CODE("9")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3bv))"\n" -"\t"STUB_ASM_CODE("10")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3d))"\n" -"\t"STUB_ASM_CODE("11")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3dv))"\n" -"\t"STUB_ASM_CODE("12")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3f))"\n" -"\t"STUB_ASM_CODE("13")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3fv))"\n" -"\t"STUB_ASM_CODE("14")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3i))"\n" -"\t"STUB_ASM_CODE("15")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3iv))"\n" -"\t"STUB_ASM_CODE("16")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3s))"\n" -"\t"STUB_ASM_CODE("17")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3sv))"\n" -"\t"STUB_ASM_CODE("18")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3ub))"\n" -"\t"STUB_ASM_CODE("19")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3ubv))"\n" -"\t"STUB_ASM_CODE("20")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3ui))"\n" -"\t"STUB_ASM_CODE("21")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3uiv))"\n" -"\t"STUB_ASM_CODE("22")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3us))"\n" -"\t"STUB_ASM_CODE("23")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color3usv))"\n" -"\t"STUB_ASM_CODE("24")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4b))"\n" -"\t"STUB_ASM_CODE("25")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4bv))"\n" -"\t"STUB_ASM_CODE("26")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4d))"\n" -"\t"STUB_ASM_CODE("27")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4dv))"\n" -"\t"STUB_ASM_CODE("28")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4f))"\n" -"\t"STUB_ASM_CODE("29")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4fv))"\n" -"\t"STUB_ASM_CODE("30")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4i))"\n" -"\t"STUB_ASM_CODE("31")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4iv))"\n" -"\t"STUB_ASM_CODE("32")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4s))"\n" -"\t"STUB_ASM_CODE("33")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4sv))"\n" -"\t"STUB_ASM_CODE("34")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4ub))"\n" -"\t"STUB_ASM_CODE("35")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4ubv))"\n" -"\t"STUB_ASM_CODE("36")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4ui))"\n" -"\t"STUB_ASM_CODE("37")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4uiv))"\n" -"\t"STUB_ASM_CODE("38")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4us))"\n" -"\t"STUB_ASM_CODE("39")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Color4usv))"\n" -"\t"STUB_ASM_CODE("40")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EdgeFlag))"\n" -"\t"STUB_ASM_CODE("41")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EdgeFlagv))"\n" -"\t"STUB_ASM_CODE("42")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(End))"\n" -"\t"STUB_ASM_CODE("43")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Indexd))"\n" -"\t"STUB_ASM_CODE("44")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Indexdv))"\n" -"\t"STUB_ASM_CODE("45")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Indexf))"\n" -"\t"STUB_ASM_CODE("46")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Indexfv))"\n" -"\t"STUB_ASM_CODE("47")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Indexi))"\n" -"\t"STUB_ASM_CODE("48")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Indexiv))"\n" -"\t"STUB_ASM_CODE("49")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Indexs))"\n" -"\t"STUB_ASM_CODE("50")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Indexsv))"\n" -"\t"STUB_ASM_CODE("51")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Normal3b))"\n" -"\t"STUB_ASM_CODE("52")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Normal3bv))"\n" -"\t"STUB_ASM_CODE("53")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Normal3d))"\n" -"\t"STUB_ASM_CODE("54")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Normal3dv))"\n" -"\t"STUB_ASM_CODE("55")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Normal3f))"\n" -"\t"STUB_ASM_CODE("56")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Normal3fv))"\n" -"\t"STUB_ASM_CODE("57")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Normal3i))"\n" -"\t"STUB_ASM_CODE("58")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Normal3iv))"\n" -"\t"STUB_ASM_CODE("59")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Normal3s))"\n" -"\t"STUB_ASM_CODE("60")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Normal3sv))"\n" -"\t"STUB_ASM_CODE("61")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos2d))"\n" -"\t"STUB_ASM_CODE("62")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos2dv))"\n" -"\t"STUB_ASM_CODE("63")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos2f))"\n" -"\t"STUB_ASM_CODE("64")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos2fv))"\n" -"\t"STUB_ASM_CODE("65")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos2i))"\n" -"\t"STUB_ASM_CODE("66")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos2iv))"\n" -"\t"STUB_ASM_CODE("67")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos2s))"\n" -"\t"STUB_ASM_CODE("68")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos2sv))"\n" -"\t"STUB_ASM_CODE("69")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos3d))"\n" -"\t"STUB_ASM_CODE("70")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos3dv))"\n" -"\t"STUB_ASM_CODE("71")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos3f))"\n" -"\t"STUB_ASM_CODE("72")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos3fv))"\n" -"\t"STUB_ASM_CODE("73")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos3i))"\n" -"\t"STUB_ASM_CODE("74")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos3iv))"\n" -"\t"STUB_ASM_CODE("75")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos3s))"\n" -"\t"STUB_ASM_CODE("76")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos3sv))"\n" -"\t"STUB_ASM_CODE("77")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos4d))"\n" -"\t"STUB_ASM_CODE("78")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos4dv))"\n" -"\t"STUB_ASM_CODE("79")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos4f))"\n" -"\t"STUB_ASM_CODE("80")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos4fv))"\n" -"\t"STUB_ASM_CODE("81")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos4i))"\n" -"\t"STUB_ASM_CODE("82")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos4iv))"\n" -"\t"STUB_ASM_CODE("83")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos4s))"\n" -"\t"STUB_ASM_CODE("84")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RasterPos4sv))"\n" -"\t"STUB_ASM_CODE("85")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Rectd))"\n" -"\t"STUB_ASM_CODE("86")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Rectdv))"\n" -"\t"STUB_ASM_CODE("87")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Rectf))"\n" -"\t"STUB_ASM_CODE("88")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Rectfv))"\n" -"\t"STUB_ASM_CODE("89")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Recti))"\n" -"\t"STUB_ASM_CODE("90")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Rectiv))"\n" -"\t"STUB_ASM_CODE("91")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Rects))"\n" -"\t"STUB_ASM_CODE("92")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Rectsv))"\n" -"\t"STUB_ASM_CODE("93")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord1d))"\n" -"\t"STUB_ASM_CODE("94")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord1dv))"\n" -"\t"STUB_ASM_CODE("95")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord1f))"\n" -"\t"STUB_ASM_CODE("96")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord1fv))"\n" -"\t"STUB_ASM_CODE("97")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord1i))"\n" -"\t"STUB_ASM_CODE("98")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord1iv))"\n" -"\t"STUB_ASM_CODE("99")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord1s))"\n" -"\t"STUB_ASM_CODE("100")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord1sv))"\n" -"\t"STUB_ASM_CODE("101")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord2d))"\n" -"\t"STUB_ASM_CODE("102")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord2dv))"\n" -"\t"STUB_ASM_CODE("103")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord2f))"\n" -"\t"STUB_ASM_CODE("104")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord2fv))"\n" -"\t"STUB_ASM_CODE("105")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord2i))"\n" -"\t"STUB_ASM_CODE("106")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord2iv))"\n" -"\t"STUB_ASM_CODE("107")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord2s))"\n" -"\t"STUB_ASM_CODE("108")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord2sv))"\n" -"\t"STUB_ASM_CODE("109")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord3d))"\n" -"\t"STUB_ASM_CODE("110")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord3dv))"\n" -"\t"STUB_ASM_CODE("111")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord3f))"\n" -"\t"STUB_ASM_CODE("112")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord3fv))"\n" -"\t"STUB_ASM_CODE("113")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord3i))"\n" -"\t"STUB_ASM_CODE("114")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord3iv))"\n" -"\t"STUB_ASM_CODE("115")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord3s))"\n" -"\t"STUB_ASM_CODE("116")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord3sv))"\n" -"\t"STUB_ASM_CODE("117")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord4d))"\n" -"\t"STUB_ASM_CODE("118")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord4dv))"\n" -"\t"STUB_ASM_CODE("119")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord4f))"\n" -"\t"STUB_ASM_CODE("120")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord4fv))"\n" -"\t"STUB_ASM_CODE("121")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord4i))"\n" -"\t"STUB_ASM_CODE("122")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord4iv))"\n" -"\t"STUB_ASM_CODE("123")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord4s))"\n" -"\t"STUB_ASM_CODE("124")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoord4sv))"\n" -"\t"STUB_ASM_CODE("125")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex2d))"\n" -"\t"STUB_ASM_CODE("126")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex2dv))"\n" -"\t"STUB_ASM_CODE("127")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex2f))"\n" -"\t"STUB_ASM_CODE("128")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex2fv))"\n" -"\t"STUB_ASM_CODE("129")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex2i))"\n" -"\t"STUB_ASM_CODE("130")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex2iv))"\n" -"\t"STUB_ASM_CODE("131")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex2s))"\n" -"\t"STUB_ASM_CODE("132")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex2sv))"\n" -"\t"STUB_ASM_CODE("133")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex3d))"\n" -"\t"STUB_ASM_CODE("134")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex3dv))"\n" -"\t"STUB_ASM_CODE("135")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex3f))"\n" -"\t"STUB_ASM_CODE("136")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex3fv))"\n" -"\t"STUB_ASM_CODE("137")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex3i))"\n" -"\t"STUB_ASM_CODE("138")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex3iv))"\n" -"\t"STUB_ASM_CODE("139")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex3s))"\n" -"\t"STUB_ASM_CODE("140")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex3sv))"\n" -"\t"STUB_ASM_CODE("141")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex4d))"\n" -"\t"STUB_ASM_CODE("142")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex4dv))"\n" -"\t"STUB_ASM_CODE("143")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex4f))"\n" -"\t"STUB_ASM_CODE("144")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex4fv))"\n" -"\t"STUB_ASM_CODE("145")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex4i))"\n" -"\t"STUB_ASM_CODE("146")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex4iv))"\n" -"\t"STUB_ASM_CODE("147")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex4s))"\n" -"\t"STUB_ASM_CODE("148")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Vertex4sv))"\n" -"\t"STUB_ASM_CODE("149")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClipPlane))"\n" -"\t"STUB_ASM_CODE("150")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorMaterial))"\n" -"\t"STUB_ASM_CODE("151")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CullFace))"\n" -"\t"STUB_ASM_CODE("152")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Fogf))"\n" -"\t"STUB_ASM_CODE("153")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Fogfv))"\n" -"\t"STUB_ASM_CODE("154")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Fogi))"\n" -"\t"STUB_ASM_CODE("155")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Fogiv))"\n" -"\t"STUB_ASM_CODE("156")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FrontFace))"\n" -"\t"STUB_ASM_CODE("157")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Hint))"\n" -"\t"STUB_ASM_CODE("158")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Lightf))"\n" -"\t"STUB_ASM_CODE("159")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Lightfv))"\n" -"\t"STUB_ASM_CODE("160")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Lighti))"\n" -"\t"STUB_ASM_CODE("161")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Lightiv))"\n" -"\t"STUB_ASM_CODE("162")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LightModelf))"\n" -"\t"STUB_ASM_CODE("163")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LightModelfv))"\n" -"\t"STUB_ASM_CODE("164")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LightModeli))"\n" -"\t"STUB_ASM_CODE("165")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LightModeliv))"\n" -"\t"STUB_ASM_CODE("166")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LineStipple))"\n" -"\t"STUB_ASM_CODE("167")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LineWidth))"\n" -"\t"STUB_ASM_CODE("168")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Materialf))"\n" -"\t"STUB_ASM_CODE("169")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Materialfv))"\n" -"\t"STUB_ASM_CODE("170")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Materiali))"\n" -"\t"STUB_ASM_CODE("171")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Materialiv))"\n" -"\t"STUB_ASM_CODE("172")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PointSize))"\n" -"\t"STUB_ASM_CODE("173")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PolygonMode))"\n" -"\t"STUB_ASM_CODE("174")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PolygonStipple))"\n" -"\t"STUB_ASM_CODE("175")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Scissor))"\n" -"\t"STUB_ASM_CODE("176")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ShadeModel))"\n" -"\t"STUB_ASM_CODE("177")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexParameterf))"\n" -"\t"STUB_ASM_CODE("178")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexParameterfv))"\n" -"\t"STUB_ASM_CODE("179")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexParameteri))"\n" -"\t"STUB_ASM_CODE("180")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexParameteriv))"\n" -"\t"STUB_ASM_CODE("181")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexImage1D))"\n" -"\t"STUB_ASM_CODE("182")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexImage2D))"\n" -"\t"STUB_ASM_CODE("183")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexEnvf))"\n" -"\t"STUB_ASM_CODE("184")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexEnvfv))"\n" -"\t"STUB_ASM_CODE("185")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexEnvi))"\n" -"\t"STUB_ASM_CODE("186")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexEnviv))"\n" -"\t"STUB_ASM_CODE("187")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexGend))"\n" -"\t"STUB_ASM_CODE("188")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexGendv))"\n" -"\t"STUB_ASM_CODE("189")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexGenf))"\n" -"\t"STUB_ASM_CODE("190")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexGenfv))"\n" -"\t"STUB_ASM_CODE("191")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexGeni))"\n" -"\t"STUB_ASM_CODE("192")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexGeniv))"\n" -"\t"STUB_ASM_CODE("193")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FeedbackBuffer))"\n" -"\t"STUB_ASM_CODE("194")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SelectBuffer))"\n" -"\t"STUB_ASM_CODE("195")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RenderMode))"\n" -"\t"STUB_ASM_CODE("196")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(InitNames))"\n" -"\t"STUB_ASM_CODE("197")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LoadName))"\n" -"\t"STUB_ASM_CODE("198")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PassThrough))"\n" -"\t"STUB_ASM_CODE("199")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PopName))"\n" -"\t"STUB_ASM_CODE("200")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PushName))"\n" -"\t"STUB_ASM_CODE("201")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawBuffer))"\n" -"\t"STUB_ASM_CODE("202")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Clear))"\n" -"\t"STUB_ASM_CODE("203")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearAccum))"\n" -"\t"STUB_ASM_CODE("204")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearIndex))"\n" -"\t"STUB_ASM_CODE("205")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearColor))"\n" -"\t"STUB_ASM_CODE("206")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearStencil))"\n" -"\t"STUB_ASM_CODE("207")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearDepth))"\n" -"\t"STUB_ASM_CODE("208")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(StencilMask))"\n" -"\t"STUB_ASM_CODE("209")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorMask))"\n" -"\t"STUB_ASM_CODE("210")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DepthMask))"\n" -"\t"STUB_ASM_CODE("211")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IndexMask))"\n" -"\t"STUB_ASM_CODE("212")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Accum))"\n" -"\t"STUB_ASM_CODE("213")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Disable))"\n" -"\t"STUB_ASM_CODE("214")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Enable))"\n" -"\t"STUB_ASM_CODE("215")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Finish))"\n" -"\t"STUB_ASM_CODE("216")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Flush))"\n" -"\t"STUB_ASM_CODE("217")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PopAttrib))"\n" -"\t"STUB_ASM_CODE("218")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PushAttrib))"\n" -"\t"STUB_ASM_CODE("219")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Map1d))"\n" -"\t"STUB_ASM_CODE("220")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Map1f))"\n" -"\t"STUB_ASM_CODE("221")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Map2d))"\n" -"\t"STUB_ASM_CODE("222")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Map2f))"\n" -"\t"STUB_ASM_CODE("223")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MapGrid1d))"\n" -"\t"STUB_ASM_CODE("224")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MapGrid1f))"\n" -"\t"STUB_ASM_CODE("225")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MapGrid2d))"\n" -"\t"STUB_ASM_CODE("226")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MapGrid2f))"\n" -"\t"STUB_ASM_CODE("227")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalCoord1d))"\n" -"\t"STUB_ASM_CODE("228")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalCoord1dv))"\n" -"\t"STUB_ASM_CODE("229")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalCoord1f))"\n" -"\t"STUB_ASM_CODE("230")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalCoord1fv))"\n" -"\t"STUB_ASM_CODE("231")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalCoord2d))"\n" -"\t"STUB_ASM_CODE("232")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalCoord2dv))"\n" -"\t"STUB_ASM_CODE("233")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalCoord2f))"\n" -"\t"STUB_ASM_CODE("234")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalCoord2fv))"\n" -"\t"STUB_ASM_CODE("235")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalMesh1))"\n" -"\t"STUB_ASM_CODE("236")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalPoint1))"\n" -"\t"STUB_ASM_CODE("237")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalMesh2))"\n" -"\t"STUB_ASM_CODE("238")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EvalPoint2))"\n" -"\t"STUB_ASM_CODE("239")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(AlphaFunc))"\n" -"\t"STUB_ASM_CODE("240")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BlendFunc))"\n" -"\t"STUB_ASM_CODE("241")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LogicOp))"\n" -"\t"STUB_ASM_CODE("242")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(StencilFunc))"\n" -"\t"STUB_ASM_CODE("243")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(StencilOp))"\n" -"\t"STUB_ASM_CODE("244")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DepthFunc))"\n" -"\t"STUB_ASM_CODE("245")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PixelZoom))"\n" -"\t"STUB_ASM_CODE("246")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PixelTransferf))"\n" -"\t"STUB_ASM_CODE("247")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PixelTransferi))"\n" -"\t"STUB_ASM_CODE("248")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PixelStoref))"\n" -"\t"STUB_ASM_CODE("249")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PixelStorei))"\n" -"\t"STUB_ASM_CODE("250")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PixelMapfv))"\n" -"\t"STUB_ASM_CODE("251")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PixelMapuiv))"\n" -"\t"STUB_ASM_CODE("252")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PixelMapusv))"\n" -"\t"STUB_ASM_CODE("253")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ReadBuffer))"\n" -"\t"STUB_ASM_CODE("254")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyPixels))"\n" -"\t"STUB_ASM_CODE("255")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ReadPixels))"\n" -"\t"STUB_ASM_CODE("256")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawPixels))"\n" -"\t"STUB_ASM_CODE("257")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetBooleanv))"\n" -"\t"STUB_ASM_CODE("258")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetClipPlane))"\n" -"\t"STUB_ASM_CODE("259")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetDoublev))"\n" -"\t"STUB_ASM_CODE("260")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetError))"\n" -"\t"STUB_ASM_CODE("261")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetFloatv))"\n" -"\t"STUB_ASM_CODE("262")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetIntegerv))"\n" -"\t"STUB_ASM_CODE("263")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetLightfv))"\n" -"\t"STUB_ASM_CODE("264")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetLightiv))"\n" -"\t"STUB_ASM_CODE("265")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetMapdv))"\n" -"\t"STUB_ASM_CODE("266")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetMapfv))"\n" -"\t"STUB_ASM_CODE("267")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetMapiv))"\n" -"\t"STUB_ASM_CODE("268")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetMaterialfv))"\n" -"\t"STUB_ASM_CODE("269")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetMaterialiv))"\n" -"\t"STUB_ASM_CODE("270")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetPixelMapfv))"\n" -"\t"STUB_ASM_CODE("271")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetPixelMapuiv))"\n" -"\t"STUB_ASM_CODE("272")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetPixelMapusv))"\n" -"\t"STUB_ASM_CODE("273")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetPolygonStipple))"\n" -"\t"STUB_ASM_CODE("274")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetString))"\n" -"\t"STUB_ASM_CODE("275")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexEnvfv))"\n" -"\t"STUB_ASM_CODE("276")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexEnviv))"\n" -"\t"STUB_ASM_CODE("277")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexGendv))"\n" -"\t"STUB_ASM_CODE("278")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexGenfv))"\n" -"\t"STUB_ASM_CODE("279")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexGeniv))"\n" -"\t"STUB_ASM_CODE("280")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexImage))"\n" -"\t"STUB_ASM_CODE("281")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexParameterfv))"\n" -"\t"STUB_ASM_CODE("282")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexParameteriv))"\n" -"\t"STUB_ASM_CODE("283")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexLevelParameterfv))"\n" -"\t"STUB_ASM_CODE("284")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexLevelParameteriv))"\n" -"\t"STUB_ASM_CODE("285")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsEnabled))"\n" -"\t"STUB_ASM_CODE("286")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsList))"\n" -"\t"STUB_ASM_CODE("287")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DepthRange))"\n" -"\t"STUB_ASM_CODE("288")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Frustum))"\n" -"\t"STUB_ASM_CODE("289")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LoadIdentity))"\n" -"\t"STUB_ASM_CODE("290")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LoadMatrixf))"\n" -"\t"STUB_ASM_CODE("291")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LoadMatrixd))"\n" -"\t"STUB_ASM_CODE("292")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MatrixMode))"\n" -"\t"STUB_ASM_CODE("293")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultMatrixf))"\n" -"\t"STUB_ASM_CODE("294")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultMatrixd))"\n" -"\t"STUB_ASM_CODE("295")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Ortho))"\n" -"\t"STUB_ASM_CODE("296")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PopMatrix))"\n" -"\t"STUB_ASM_CODE("297")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PushMatrix))"\n" -"\t"STUB_ASM_CODE("298")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Rotated))"\n" -"\t"STUB_ASM_CODE("299")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Rotatef))"\n" -"\t"STUB_ASM_CODE("300")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Scaled))"\n" -"\t"STUB_ASM_CODE("301")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Scalef))"\n" -"\t"STUB_ASM_CODE("302")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Translated))"\n" -"\t"STUB_ASM_CODE("303")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Translatef))"\n" -"\t"STUB_ASM_CODE("304")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Viewport))"\n" -"\t"STUB_ASM_CODE("305")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ArrayElement))"\n" -"\t"STUB_ASM_CODE("306")"\n" - -".globl "GLAPI_PREFIX_STR(ArrayElementEXT)"\n" -".set "GLAPI_PREFIX_STR(ArrayElementEXT)", "GLAPI_PREFIX_STR(ArrayElement)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindTexture))"\n" -"\t"STUB_ASM_CODE("307")"\n" - -".globl "GLAPI_PREFIX_STR(BindTextureEXT)"\n" -".set "GLAPI_PREFIX_STR(BindTextureEXT)", "GLAPI_PREFIX_STR(BindTexture)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorPointer))"\n" -"\t"STUB_ASM_CODE("308")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DisableClientState))"\n" -"\t"STUB_ASM_CODE("309")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawArrays))"\n" -"\t"STUB_ASM_CODE("310")"\n" - -".globl "GLAPI_PREFIX_STR(DrawArraysEXT)"\n" -".set "GLAPI_PREFIX_STR(DrawArraysEXT)", "GLAPI_PREFIX_STR(DrawArrays)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawElements))"\n" -"\t"STUB_ASM_CODE("311")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EdgeFlagPointer))"\n" -"\t"STUB_ASM_CODE("312")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EnableClientState))"\n" -"\t"STUB_ASM_CODE("313")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IndexPointer))"\n" -"\t"STUB_ASM_CODE("314")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Indexub))"\n" -"\t"STUB_ASM_CODE("315")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Indexubv))"\n" -"\t"STUB_ASM_CODE("316")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(InterleavedArrays))"\n" -"\t"STUB_ASM_CODE("317")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(NormalPointer))"\n" -"\t"STUB_ASM_CODE("318")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PolygonOffset))"\n" -"\t"STUB_ASM_CODE("319")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoordPointer))"\n" -"\t"STUB_ASM_CODE("320")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexPointer))"\n" -"\t"STUB_ASM_CODE("321")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(AreTexturesResident))"\n" -"\t"STUB_ASM_CODE("322")"\n" - -#if 0 -".globl "GLAPI_PREFIX_STR(AreTexturesResidentEXT)"\n" -".set "GLAPI_PREFIX_STR(AreTexturesResidentEXT)", "GLAPI_PREFIX_STR(AreTexturesResident)"\n" -#endif - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyTexImage1D))"\n" -"\t"STUB_ASM_CODE("323")"\n" - -".globl "GLAPI_PREFIX_STR(CopyTexImage1DEXT)"\n" -".set "GLAPI_PREFIX_STR(CopyTexImage1DEXT)", "GLAPI_PREFIX_STR(CopyTexImage1D)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyTexImage2D))"\n" -"\t"STUB_ASM_CODE("324")"\n" - -".globl "GLAPI_PREFIX_STR(CopyTexImage2DEXT)"\n" -".set "GLAPI_PREFIX_STR(CopyTexImage2DEXT)", "GLAPI_PREFIX_STR(CopyTexImage2D)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyTexSubImage1D))"\n" -"\t"STUB_ASM_CODE("325")"\n" - -".globl "GLAPI_PREFIX_STR(CopyTexSubImage1DEXT)"\n" -".set "GLAPI_PREFIX_STR(CopyTexSubImage1DEXT)", "GLAPI_PREFIX_STR(CopyTexSubImage1D)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyTexSubImage2D))"\n" -"\t"STUB_ASM_CODE("326")"\n" - -".globl "GLAPI_PREFIX_STR(CopyTexSubImage2DEXT)"\n" -".set "GLAPI_PREFIX_STR(CopyTexSubImage2DEXT)", "GLAPI_PREFIX_STR(CopyTexSubImage2D)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteTextures))"\n" -"\t"STUB_ASM_CODE("327")"\n" - -#if 0 -".globl "GLAPI_PREFIX_STR(DeleteTexturesEXT)"\n" -".set "GLAPI_PREFIX_STR(DeleteTexturesEXT)", "GLAPI_PREFIX_STR(DeleteTextures)"\n" -#endif - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenTextures))"\n" -"\t"STUB_ASM_CODE("328")"\n" - -#if 0 -".globl "GLAPI_PREFIX_STR(GenTexturesEXT)"\n" -".set "GLAPI_PREFIX_STR(GenTexturesEXT)", "GLAPI_PREFIX_STR(GenTextures)"\n" -#endif - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetPointerv))"\n" -"\t"STUB_ASM_CODE("329")"\n" - -".globl "GLAPI_PREFIX_STR(GetPointervEXT)"\n" -".set "GLAPI_PREFIX_STR(GetPointervEXT)", "GLAPI_PREFIX_STR(GetPointerv)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsTexture))"\n" -"\t"STUB_ASM_CODE("330")"\n" - -#if 0 -".globl "GLAPI_PREFIX_STR(IsTextureEXT)"\n" -".set "GLAPI_PREFIX_STR(IsTextureEXT)", "GLAPI_PREFIX_STR(IsTexture)"\n" -#endif - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PrioritizeTextures))"\n" -"\t"STUB_ASM_CODE("331")"\n" - -".globl "GLAPI_PREFIX_STR(PrioritizeTexturesEXT)"\n" -".set "GLAPI_PREFIX_STR(PrioritizeTexturesEXT)", "GLAPI_PREFIX_STR(PrioritizeTextures)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexSubImage1D))"\n" -"\t"STUB_ASM_CODE("332")"\n" - -".globl "GLAPI_PREFIX_STR(TexSubImage1DEXT)"\n" -".set "GLAPI_PREFIX_STR(TexSubImage1DEXT)", "GLAPI_PREFIX_STR(TexSubImage1D)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexSubImage2D))"\n" -"\t"STUB_ASM_CODE("333")"\n" - -".globl "GLAPI_PREFIX_STR(TexSubImage2DEXT)"\n" -".set "GLAPI_PREFIX_STR(TexSubImage2DEXT)", "GLAPI_PREFIX_STR(TexSubImage2D)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PopClientAttrib))"\n" -"\t"STUB_ASM_CODE("334")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PushClientAttrib))"\n" -"\t"STUB_ASM_CODE("335")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BlendColor))"\n" -"\t"STUB_ASM_CODE("336")"\n" - -".globl "GLAPI_PREFIX_STR(BlendColorEXT)"\n" -".set "GLAPI_PREFIX_STR(BlendColorEXT)", "GLAPI_PREFIX_STR(BlendColor)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BlendEquation))"\n" -"\t"STUB_ASM_CODE("337")"\n" - -".globl "GLAPI_PREFIX_STR(BlendEquationEXT)"\n" -".set "GLAPI_PREFIX_STR(BlendEquationEXT)", "GLAPI_PREFIX_STR(BlendEquation)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawRangeElements))"\n" -"\t"STUB_ASM_CODE("338")"\n" - -".globl "GLAPI_PREFIX_STR(DrawRangeElementsEXT)"\n" -".set "GLAPI_PREFIX_STR(DrawRangeElementsEXT)", "GLAPI_PREFIX_STR(DrawRangeElements)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorTable))"\n" -"\t"STUB_ASM_CODE("339")"\n" - -".globl "GLAPI_PREFIX_STR(ColorTableEXT)"\n" -".set "GLAPI_PREFIX_STR(ColorTableEXT)", "GLAPI_PREFIX_STR(ColorTable)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorTableParameterfv))"\n" -"\t"STUB_ASM_CODE("340")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorTableParameteriv))"\n" -"\t"STUB_ASM_CODE("341")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyColorTable))"\n" -"\t"STUB_ASM_CODE("342")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetColorTable))"\n" -"\t"STUB_ASM_CODE("343")"\n" - -#if 0 -".globl "GLAPI_PREFIX_STR(GetColorTableEXT)"\n" -".set "GLAPI_PREFIX_STR(GetColorTableEXT)", "GLAPI_PREFIX_STR(GetColorTable)"\n" -#endif - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetColorTableParameterfv))"\n" -"\t"STUB_ASM_CODE("344")"\n" - -#if 0 -".globl "GLAPI_PREFIX_STR(GetColorTableParameterfvEXT)"\n" -".set "GLAPI_PREFIX_STR(GetColorTableParameterfvEXT)", "GLAPI_PREFIX_STR(GetColorTableParameterfv)"\n" -#endif - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetColorTableParameteriv))"\n" -"\t"STUB_ASM_CODE("345")"\n" - -#if 0 -".globl "GLAPI_PREFIX_STR(GetColorTableParameterivEXT)"\n" -".set "GLAPI_PREFIX_STR(GetColorTableParameterivEXT)", "GLAPI_PREFIX_STR(GetColorTableParameteriv)"\n" -#endif - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorSubTable))"\n" -"\t"STUB_ASM_CODE("346")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyColorSubTable))"\n" -"\t"STUB_ASM_CODE("347")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ConvolutionFilter1D))"\n" -"\t"STUB_ASM_CODE("348")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ConvolutionFilter2D))"\n" -"\t"STUB_ASM_CODE("349")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ConvolutionParameterf))"\n" -"\t"STUB_ASM_CODE("350")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ConvolutionParameterfv))"\n" -"\t"STUB_ASM_CODE("351")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ConvolutionParameteri))"\n" -"\t"STUB_ASM_CODE("352")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ConvolutionParameteriv))"\n" -"\t"STUB_ASM_CODE("353")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyConvolutionFilter1D))"\n" -"\t"STUB_ASM_CODE("354")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyConvolutionFilter2D))"\n" -"\t"STUB_ASM_CODE("355")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetConvolutionFilter))"\n" -"\t"STUB_ASM_CODE("356")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetConvolutionParameterfv))"\n" -"\t"STUB_ASM_CODE("357")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetConvolutionParameteriv))"\n" -"\t"STUB_ASM_CODE("358")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetSeparableFilter))"\n" -"\t"STUB_ASM_CODE("359")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SeparableFilter2D))"\n" -"\t"STUB_ASM_CODE("360")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetHistogram))"\n" -"\t"STUB_ASM_CODE("361")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetHistogramParameterfv))"\n" -"\t"STUB_ASM_CODE("362")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetHistogramParameteriv))"\n" -"\t"STUB_ASM_CODE("363")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetMinmax))"\n" -"\t"STUB_ASM_CODE("364")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetMinmaxParameterfv))"\n" -"\t"STUB_ASM_CODE("365")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetMinmaxParameteriv))"\n" -"\t"STUB_ASM_CODE("366")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Histogram))"\n" -"\t"STUB_ASM_CODE("367")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Minmax))"\n" -"\t"STUB_ASM_CODE("368")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ResetHistogram))"\n" -"\t"STUB_ASM_CODE("369")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ResetMinmax))"\n" -"\t"STUB_ASM_CODE("370")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexImage3D))"\n" -"\t"STUB_ASM_CODE("371")"\n" - -".globl "GLAPI_PREFIX_STR(TexImage3DEXT)"\n" -".set "GLAPI_PREFIX_STR(TexImage3DEXT)", "GLAPI_PREFIX_STR(TexImage3D)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexSubImage3D))"\n" -"\t"STUB_ASM_CODE("372")"\n" - -".globl "GLAPI_PREFIX_STR(TexSubImage3DEXT)"\n" -".set "GLAPI_PREFIX_STR(TexSubImage3DEXT)", "GLAPI_PREFIX_STR(TexSubImage3D)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyTexSubImage3D))"\n" -"\t"STUB_ASM_CODE("373")"\n" - -".globl "GLAPI_PREFIX_STR(CopyTexSubImage3DEXT)"\n" -".set "GLAPI_PREFIX_STR(CopyTexSubImage3DEXT)", "GLAPI_PREFIX_STR(CopyTexSubImage3D)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ActiveTextureARB))"\n" -"\t"STUB_ASM_CODE("374")"\n" - -".globl "GLAPI_PREFIX_STR(ActiveTexture)"\n" -".set "GLAPI_PREFIX_STR(ActiveTexture)", "GLAPI_PREFIX_STR(ActiveTextureARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClientActiveTextureARB))"\n" -"\t"STUB_ASM_CODE("375")"\n" - -".globl "GLAPI_PREFIX_STR(ClientActiveTexture)"\n" -".set "GLAPI_PREFIX_STR(ClientActiveTexture)", "GLAPI_PREFIX_STR(ClientActiveTextureARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord1dARB))"\n" -"\t"STUB_ASM_CODE("376")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord1d)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord1d)", "GLAPI_PREFIX_STR(MultiTexCoord1dARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord1dvARB))"\n" -"\t"STUB_ASM_CODE("377")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord1dv)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord1dv)", "GLAPI_PREFIX_STR(MultiTexCoord1dvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord1fARB))"\n" -"\t"STUB_ASM_CODE("378")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord1f)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord1f)", "GLAPI_PREFIX_STR(MultiTexCoord1fARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord1fvARB))"\n" -"\t"STUB_ASM_CODE("379")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord1fv)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord1fv)", "GLAPI_PREFIX_STR(MultiTexCoord1fvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord1iARB))"\n" -"\t"STUB_ASM_CODE("380")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord1i)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord1i)", "GLAPI_PREFIX_STR(MultiTexCoord1iARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord1ivARB))"\n" -"\t"STUB_ASM_CODE("381")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord1iv)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord1iv)", "GLAPI_PREFIX_STR(MultiTexCoord1ivARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord1sARB))"\n" -"\t"STUB_ASM_CODE("382")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord1s)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord1s)", "GLAPI_PREFIX_STR(MultiTexCoord1sARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord1svARB))"\n" -"\t"STUB_ASM_CODE("383")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord1sv)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord1sv)", "GLAPI_PREFIX_STR(MultiTexCoord1svARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord2dARB))"\n" -"\t"STUB_ASM_CODE("384")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord2d)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord2d)", "GLAPI_PREFIX_STR(MultiTexCoord2dARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord2dvARB))"\n" -"\t"STUB_ASM_CODE("385")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord2dv)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord2dv)", "GLAPI_PREFIX_STR(MultiTexCoord2dvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord2fARB))"\n" -"\t"STUB_ASM_CODE("386")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord2f)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord2f)", "GLAPI_PREFIX_STR(MultiTexCoord2fARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord2fvARB))"\n" -"\t"STUB_ASM_CODE("387")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord2fv)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord2fv)", "GLAPI_PREFIX_STR(MultiTexCoord2fvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord2iARB))"\n" -"\t"STUB_ASM_CODE("388")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord2i)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord2i)", "GLAPI_PREFIX_STR(MultiTexCoord2iARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord2ivARB))"\n" -"\t"STUB_ASM_CODE("389")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord2iv)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord2iv)", "GLAPI_PREFIX_STR(MultiTexCoord2ivARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord2sARB))"\n" -"\t"STUB_ASM_CODE("390")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord2s)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord2s)", "GLAPI_PREFIX_STR(MultiTexCoord2sARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord2svARB))"\n" -"\t"STUB_ASM_CODE("391")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord2sv)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord2sv)", "GLAPI_PREFIX_STR(MultiTexCoord2svARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord3dARB))"\n" -"\t"STUB_ASM_CODE("392")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord3d)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord3d)", "GLAPI_PREFIX_STR(MultiTexCoord3dARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord3dvARB))"\n" -"\t"STUB_ASM_CODE("393")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord3dv)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord3dv)", "GLAPI_PREFIX_STR(MultiTexCoord3dvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord3fARB))"\n" -"\t"STUB_ASM_CODE("394")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord3f)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord3f)", "GLAPI_PREFIX_STR(MultiTexCoord3fARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord3fvARB))"\n" -"\t"STUB_ASM_CODE("395")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord3fv)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord3fv)", "GLAPI_PREFIX_STR(MultiTexCoord3fvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord3iARB))"\n" -"\t"STUB_ASM_CODE("396")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord3i)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord3i)", "GLAPI_PREFIX_STR(MultiTexCoord3iARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord3ivARB))"\n" -"\t"STUB_ASM_CODE("397")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord3iv)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord3iv)", "GLAPI_PREFIX_STR(MultiTexCoord3ivARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord3sARB))"\n" -"\t"STUB_ASM_CODE("398")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord3s)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord3s)", "GLAPI_PREFIX_STR(MultiTexCoord3sARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord3svARB))"\n" -"\t"STUB_ASM_CODE("399")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord3sv)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord3sv)", "GLAPI_PREFIX_STR(MultiTexCoord3svARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord4dARB))"\n" -"\t"STUB_ASM_CODE("400")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord4d)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord4d)", "GLAPI_PREFIX_STR(MultiTexCoord4dARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord4dvARB))"\n" -"\t"STUB_ASM_CODE("401")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord4dv)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord4dv)", "GLAPI_PREFIX_STR(MultiTexCoord4dvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord4fARB))"\n" -"\t"STUB_ASM_CODE("402")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord4f)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord4f)", "GLAPI_PREFIX_STR(MultiTexCoord4fARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord4fvARB))"\n" -"\t"STUB_ASM_CODE("403")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord4fv)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord4fv)", "GLAPI_PREFIX_STR(MultiTexCoord4fvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord4iARB))"\n" -"\t"STUB_ASM_CODE("404")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord4i)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord4i)", "GLAPI_PREFIX_STR(MultiTexCoord4iARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord4ivARB))"\n" -"\t"STUB_ASM_CODE("405")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord4iv)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord4iv)", "GLAPI_PREFIX_STR(MultiTexCoord4ivARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord4sARB))"\n" -"\t"STUB_ASM_CODE("406")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord4s)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord4s)", "GLAPI_PREFIX_STR(MultiTexCoord4sARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoord4svARB))"\n" -"\t"STUB_ASM_CODE("407")"\n" - -".globl "GLAPI_PREFIX_STR(MultiTexCoord4sv)"\n" -".set "GLAPI_PREFIX_STR(MultiTexCoord4sv)", "GLAPI_PREFIX_STR(MultiTexCoord4svARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(AttachShader))"\n" -"\t"STUB_ASM_CODE("408")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CreateProgram))"\n" -"\t"STUB_ASM_CODE("409")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CreateShader))"\n" -"\t"STUB_ASM_CODE("410")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteProgram))"\n" -"\t"STUB_ASM_CODE("411")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteShader))"\n" -"\t"STUB_ASM_CODE("412")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DetachShader))"\n" -"\t"STUB_ASM_CODE("413")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetAttachedShaders))"\n" -"\t"STUB_ASM_CODE("414")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramInfoLog))"\n" -"\t"STUB_ASM_CODE("415")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramiv))"\n" -"\t"STUB_ASM_CODE("416")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetShaderInfoLog))"\n" -"\t"STUB_ASM_CODE("417")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetShaderiv))"\n" -"\t"STUB_ASM_CODE("418")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsProgram))"\n" -"\t"STUB_ASM_CODE("419")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsShader))"\n" -"\t"STUB_ASM_CODE("420")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(StencilFuncSeparate))"\n" -"\t"STUB_ASM_CODE("421")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(StencilMaskSeparate))"\n" -"\t"STUB_ASM_CODE("422")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(StencilOpSeparate))"\n" -"\t"STUB_ASM_CODE("423")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UniformMatrix2x3fv))"\n" -"\t"STUB_ASM_CODE("424")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UniformMatrix2x4fv))"\n" -"\t"STUB_ASM_CODE("425")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UniformMatrix3x2fv))"\n" -"\t"STUB_ASM_CODE("426")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UniformMatrix3x4fv))"\n" -"\t"STUB_ASM_CODE("427")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UniformMatrix4x2fv))"\n" -"\t"STUB_ASM_CODE("428")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UniformMatrix4x3fv))"\n" -"\t"STUB_ASM_CODE("429")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClampColor))"\n" -"\t"STUB_ASM_CODE("430")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearBufferfi))"\n" -"\t"STUB_ASM_CODE("431")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearBufferfv))"\n" -"\t"STUB_ASM_CODE("432")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearBufferiv))"\n" -"\t"STUB_ASM_CODE("433")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearBufferuiv))"\n" -"\t"STUB_ASM_CODE("434")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetStringi))"\n" -"\t"STUB_ASM_CODE("435")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexBuffer))"\n" -"\t"STUB_ASM_CODE("436")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FramebufferTexture))"\n" -"\t"STUB_ASM_CODE("437")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetBufferParameteri64v))"\n" -"\t"STUB_ASM_CODE("438")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetInteger64i_v))"\n" -"\t"STUB_ASM_CODE("439")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribDivisor))"\n" -"\t"STUB_ASM_CODE("440")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LoadTransposeMatrixdARB))"\n" -"\t"STUB_ASM_CODE("441")"\n" - -".globl "GLAPI_PREFIX_STR(LoadTransposeMatrixd)"\n" -".set "GLAPI_PREFIX_STR(LoadTransposeMatrixd)", "GLAPI_PREFIX_STR(LoadTransposeMatrixdARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LoadTransposeMatrixfARB))"\n" -"\t"STUB_ASM_CODE("442")"\n" - -".globl "GLAPI_PREFIX_STR(LoadTransposeMatrixf)"\n" -".set "GLAPI_PREFIX_STR(LoadTransposeMatrixf)", "GLAPI_PREFIX_STR(LoadTransposeMatrixfARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultTransposeMatrixdARB))"\n" -"\t"STUB_ASM_CODE("443")"\n" - -".globl "GLAPI_PREFIX_STR(MultTransposeMatrixd)"\n" -".set "GLAPI_PREFIX_STR(MultTransposeMatrixd)", "GLAPI_PREFIX_STR(MultTransposeMatrixdARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultTransposeMatrixfARB))"\n" -"\t"STUB_ASM_CODE("444")"\n" - -".globl "GLAPI_PREFIX_STR(MultTransposeMatrixf)"\n" -".set "GLAPI_PREFIX_STR(MultTransposeMatrixf)", "GLAPI_PREFIX_STR(MultTransposeMatrixfARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SampleCoverageARB))"\n" -"\t"STUB_ASM_CODE("445")"\n" - -".globl "GLAPI_PREFIX_STR(SampleCoverage)"\n" -".set "GLAPI_PREFIX_STR(SampleCoverage)", "GLAPI_PREFIX_STR(SampleCoverageARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CompressedTexImage1DARB))"\n" -"\t"STUB_ASM_CODE("446")"\n" - -".globl "GLAPI_PREFIX_STR(CompressedTexImage1D)"\n" -".set "GLAPI_PREFIX_STR(CompressedTexImage1D)", "GLAPI_PREFIX_STR(CompressedTexImage1DARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CompressedTexImage2DARB))"\n" -"\t"STUB_ASM_CODE("447")"\n" - -".globl "GLAPI_PREFIX_STR(CompressedTexImage2D)"\n" -".set "GLAPI_PREFIX_STR(CompressedTexImage2D)", "GLAPI_PREFIX_STR(CompressedTexImage2DARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CompressedTexImage3DARB))"\n" -"\t"STUB_ASM_CODE("448")"\n" - -".globl "GLAPI_PREFIX_STR(CompressedTexImage3D)"\n" -".set "GLAPI_PREFIX_STR(CompressedTexImage3D)", "GLAPI_PREFIX_STR(CompressedTexImage3DARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CompressedTexSubImage1DARB))"\n" -"\t"STUB_ASM_CODE("449")"\n" - -".globl "GLAPI_PREFIX_STR(CompressedTexSubImage1D)"\n" -".set "GLAPI_PREFIX_STR(CompressedTexSubImage1D)", "GLAPI_PREFIX_STR(CompressedTexSubImage1DARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CompressedTexSubImage2DARB))"\n" -"\t"STUB_ASM_CODE("450")"\n" - -".globl "GLAPI_PREFIX_STR(CompressedTexSubImage2D)"\n" -".set "GLAPI_PREFIX_STR(CompressedTexSubImage2D)", "GLAPI_PREFIX_STR(CompressedTexSubImage2DARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CompressedTexSubImage3DARB))"\n" -"\t"STUB_ASM_CODE("451")"\n" - -".globl "GLAPI_PREFIX_STR(CompressedTexSubImage3D)"\n" -".set "GLAPI_PREFIX_STR(CompressedTexSubImage3D)", "GLAPI_PREFIX_STR(CompressedTexSubImage3DARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetCompressedTexImageARB))"\n" -"\t"STUB_ASM_CODE("452")"\n" - -".globl "GLAPI_PREFIX_STR(GetCompressedTexImage)"\n" -".set "GLAPI_PREFIX_STR(GetCompressedTexImage)", "GLAPI_PREFIX_STR(GetCompressedTexImageARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DisableVertexAttribArrayARB))"\n" -"\t"STUB_ASM_CODE("453")"\n" - -".globl "GLAPI_PREFIX_STR(DisableVertexAttribArray)"\n" -".set "GLAPI_PREFIX_STR(DisableVertexAttribArray)", "GLAPI_PREFIX_STR(DisableVertexAttribArrayARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EnableVertexAttribArrayARB))"\n" -"\t"STUB_ASM_CODE("454")"\n" - -".globl "GLAPI_PREFIX_STR(EnableVertexAttribArray)"\n" -".set "GLAPI_PREFIX_STR(EnableVertexAttribArray)", "GLAPI_PREFIX_STR(EnableVertexAttribArrayARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramEnvParameterdvARB))"\n" -"\t"STUB_ASM_CODE("455")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramEnvParameterfvARB))"\n" -"\t"STUB_ASM_CODE("456")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramLocalParameterdvARB))"\n" -"\t"STUB_ASM_CODE("457")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramLocalParameterfvARB))"\n" -"\t"STUB_ASM_CODE("458")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramStringARB))"\n" -"\t"STUB_ASM_CODE("459")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramivARB))"\n" -"\t"STUB_ASM_CODE("460")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetVertexAttribdvARB))"\n" -"\t"STUB_ASM_CODE("461")"\n" - -".globl "GLAPI_PREFIX_STR(GetVertexAttribdv)"\n" -".set "GLAPI_PREFIX_STR(GetVertexAttribdv)", "GLAPI_PREFIX_STR(GetVertexAttribdvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetVertexAttribfvARB))"\n" -"\t"STUB_ASM_CODE("462")"\n" - -".globl "GLAPI_PREFIX_STR(GetVertexAttribfv)"\n" -".set "GLAPI_PREFIX_STR(GetVertexAttribfv)", "GLAPI_PREFIX_STR(GetVertexAttribfvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetVertexAttribivARB))"\n" -"\t"STUB_ASM_CODE("463")"\n" - -".globl "GLAPI_PREFIX_STR(GetVertexAttribiv)"\n" -".set "GLAPI_PREFIX_STR(GetVertexAttribiv)", "GLAPI_PREFIX_STR(GetVertexAttribivARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramEnvParameter4dARB))"\n" -"\t"STUB_ASM_CODE("464")"\n" - -".globl "GLAPI_PREFIX_STR(ProgramParameter4dNV)"\n" -".set "GLAPI_PREFIX_STR(ProgramParameter4dNV)", "GLAPI_PREFIX_STR(ProgramEnvParameter4dARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramEnvParameter4dvARB))"\n" -"\t"STUB_ASM_CODE("465")"\n" - -".globl "GLAPI_PREFIX_STR(ProgramParameter4dvNV)"\n" -".set "GLAPI_PREFIX_STR(ProgramParameter4dvNV)", "GLAPI_PREFIX_STR(ProgramEnvParameter4dvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramEnvParameter4fARB))"\n" -"\t"STUB_ASM_CODE("466")"\n" - -".globl "GLAPI_PREFIX_STR(ProgramParameter4fNV)"\n" -".set "GLAPI_PREFIX_STR(ProgramParameter4fNV)", "GLAPI_PREFIX_STR(ProgramEnvParameter4fARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramEnvParameter4fvARB))"\n" -"\t"STUB_ASM_CODE("467")"\n" - -".globl "GLAPI_PREFIX_STR(ProgramParameter4fvNV)"\n" -".set "GLAPI_PREFIX_STR(ProgramParameter4fvNV)", "GLAPI_PREFIX_STR(ProgramEnvParameter4fvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramLocalParameter4dARB))"\n" -"\t"STUB_ASM_CODE("468")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramLocalParameter4dvARB))"\n" -"\t"STUB_ASM_CODE("469")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramLocalParameter4fARB))"\n" -"\t"STUB_ASM_CODE("470")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramLocalParameter4fvARB))"\n" -"\t"STUB_ASM_CODE("471")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramStringARB))"\n" -"\t"STUB_ASM_CODE("472")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1dARB))"\n" -"\t"STUB_ASM_CODE("473")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib1d)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib1d)", "GLAPI_PREFIX_STR(VertexAttrib1dARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1dvARB))"\n" -"\t"STUB_ASM_CODE("474")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib1dv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib1dv)", "GLAPI_PREFIX_STR(VertexAttrib1dvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1fARB))"\n" -"\t"STUB_ASM_CODE("475")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib1f)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib1f)", "GLAPI_PREFIX_STR(VertexAttrib1fARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1fvARB))"\n" -"\t"STUB_ASM_CODE("476")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib1fv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib1fv)", "GLAPI_PREFIX_STR(VertexAttrib1fvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1sARB))"\n" -"\t"STUB_ASM_CODE("477")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib1s)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib1s)", "GLAPI_PREFIX_STR(VertexAttrib1sARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1svARB))"\n" -"\t"STUB_ASM_CODE("478")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib1sv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib1sv)", "GLAPI_PREFIX_STR(VertexAttrib1svARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2dARB))"\n" -"\t"STUB_ASM_CODE("479")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib2d)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib2d)", "GLAPI_PREFIX_STR(VertexAttrib2dARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2dvARB))"\n" -"\t"STUB_ASM_CODE("480")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib2dv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib2dv)", "GLAPI_PREFIX_STR(VertexAttrib2dvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2fARB))"\n" -"\t"STUB_ASM_CODE("481")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib2f)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib2f)", "GLAPI_PREFIX_STR(VertexAttrib2fARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2fvARB))"\n" -"\t"STUB_ASM_CODE("482")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib2fv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib2fv)", "GLAPI_PREFIX_STR(VertexAttrib2fvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2sARB))"\n" -"\t"STUB_ASM_CODE("483")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib2s)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib2s)", "GLAPI_PREFIX_STR(VertexAttrib2sARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2svARB))"\n" -"\t"STUB_ASM_CODE("484")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib2sv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib2sv)", "GLAPI_PREFIX_STR(VertexAttrib2svARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3dARB))"\n" -"\t"STUB_ASM_CODE("485")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib3d)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib3d)", "GLAPI_PREFIX_STR(VertexAttrib3dARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3dvARB))"\n" -"\t"STUB_ASM_CODE("486")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib3dv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib3dv)", "GLAPI_PREFIX_STR(VertexAttrib3dvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3fARB))"\n" -"\t"STUB_ASM_CODE("487")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib3f)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib3f)", "GLAPI_PREFIX_STR(VertexAttrib3fARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3fvARB))"\n" -"\t"STUB_ASM_CODE("488")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib3fv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib3fv)", "GLAPI_PREFIX_STR(VertexAttrib3fvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3sARB))"\n" -"\t"STUB_ASM_CODE("489")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib3s)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib3s)", "GLAPI_PREFIX_STR(VertexAttrib3sARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3svARB))"\n" -"\t"STUB_ASM_CODE("490")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib3sv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib3sv)", "GLAPI_PREFIX_STR(VertexAttrib3svARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4NbvARB))"\n" -"\t"STUB_ASM_CODE("491")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib4Nbv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib4Nbv)", "GLAPI_PREFIX_STR(VertexAttrib4NbvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4NivARB))"\n" -"\t"STUB_ASM_CODE("492")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib4Niv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib4Niv)", "GLAPI_PREFIX_STR(VertexAttrib4NivARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4NsvARB))"\n" -"\t"STUB_ASM_CODE("493")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib4Nsv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib4Nsv)", "GLAPI_PREFIX_STR(VertexAttrib4NsvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4NubARB))"\n" -"\t"STUB_ASM_CODE("494")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib4Nub)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib4Nub)", "GLAPI_PREFIX_STR(VertexAttrib4NubARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4NubvARB))"\n" -"\t"STUB_ASM_CODE("495")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib4Nubv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib4Nubv)", "GLAPI_PREFIX_STR(VertexAttrib4NubvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4NuivARB))"\n" -"\t"STUB_ASM_CODE("496")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib4Nuiv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib4Nuiv)", "GLAPI_PREFIX_STR(VertexAttrib4NuivARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4NusvARB))"\n" -"\t"STUB_ASM_CODE("497")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib4Nusv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib4Nusv)", "GLAPI_PREFIX_STR(VertexAttrib4NusvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4bvARB))"\n" -"\t"STUB_ASM_CODE("498")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib4bv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib4bv)", "GLAPI_PREFIX_STR(VertexAttrib4bvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4dARB))"\n" -"\t"STUB_ASM_CODE("499")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib4d)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib4d)", "GLAPI_PREFIX_STR(VertexAttrib4dARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4dvARB))"\n" -"\t"STUB_ASM_CODE("500")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib4dv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib4dv)", "GLAPI_PREFIX_STR(VertexAttrib4dvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4fARB))"\n" -"\t"STUB_ASM_CODE("501")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib4f)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib4f)", "GLAPI_PREFIX_STR(VertexAttrib4fARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4fvARB))"\n" -"\t"STUB_ASM_CODE("502")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib4fv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib4fv)", "GLAPI_PREFIX_STR(VertexAttrib4fvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4ivARB))"\n" -"\t"STUB_ASM_CODE("503")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib4iv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib4iv)", "GLAPI_PREFIX_STR(VertexAttrib4ivARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4sARB))"\n" -"\t"STUB_ASM_CODE("504")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib4s)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib4s)", "GLAPI_PREFIX_STR(VertexAttrib4sARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4svARB))"\n" -"\t"STUB_ASM_CODE("505")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib4sv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib4sv)", "GLAPI_PREFIX_STR(VertexAttrib4svARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4ubvARB))"\n" -"\t"STUB_ASM_CODE("506")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib4ubv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib4ubv)", "GLAPI_PREFIX_STR(VertexAttrib4ubvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4uivARB))"\n" -"\t"STUB_ASM_CODE("507")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib4uiv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib4uiv)", "GLAPI_PREFIX_STR(VertexAttrib4uivARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4usvARB))"\n" -"\t"STUB_ASM_CODE("508")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttrib4usv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttrib4usv)", "GLAPI_PREFIX_STR(VertexAttrib4usvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribPointerARB))"\n" -"\t"STUB_ASM_CODE("509")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribPointer)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribPointer)", "GLAPI_PREFIX_STR(VertexAttribPointerARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindBufferARB))"\n" -"\t"STUB_ASM_CODE("510")"\n" - -".globl "GLAPI_PREFIX_STR(BindBuffer)"\n" -".set "GLAPI_PREFIX_STR(BindBuffer)", "GLAPI_PREFIX_STR(BindBufferARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BufferDataARB))"\n" -"\t"STUB_ASM_CODE("511")"\n" - -".globl "GLAPI_PREFIX_STR(BufferData)"\n" -".set "GLAPI_PREFIX_STR(BufferData)", "GLAPI_PREFIX_STR(BufferDataARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BufferSubDataARB))"\n" -"\t"STUB_ASM_CODE("512")"\n" - -".globl "GLAPI_PREFIX_STR(BufferSubData)"\n" -".set "GLAPI_PREFIX_STR(BufferSubData)", "GLAPI_PREFIX_STR(BufferSubDataARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteBuffersARB))"\n" -"\t"STUB_ASM_CODE("513")"\n" - -".globl "GLAPI_PREFIX_STR(DeleteBuffers)"\n" -".set "GLAPI_PREFIX_STR(DeleteBuffers)", "GLAPI_PREFIX_STR(DeleteBuffersARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenBuffersARB))"\n" -"\t"STUB_ASM_CODE("514")"\n" - -".globl "GLAPI_PREFIX_STR(GenBuffers)"\n" -".set "GLAPI_PREFIX_STR(GenBuffers)", "GLAPI_PREFIX_STR(GenBuffersARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetBufferParameterivARB))"\n" -"\t"STUB_ASM_CODE("515")"\n" - -".globl "GLAPI_PREFIX_STR(GetBufferParameteriv)"\n" -".set "GLAPI_PREFIX_STR(GetBufferParameteriv)", "GLAPI_PREFIX_STR(GetBufferParameterivARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetBufferPointervARB))"\n" -"\t"STUB_ASM_CODE("516")"\n" - -".globl "GLAPI_PREFIX_STR(GetBufferPointerv)"\n" -".set "GLAPI_PREFIX_STR(GetBufferPointerv)", "GLAPI_PREFIX_STR(GetBufferPointervARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetBufferSubDataARB))"\n" -"\t"STUB_ASM_CODE("517")"\n" - -".globl "GLAPI_PREFIX_STR(GetBufferSubData)"\n" -".set "GLAPI_PREFIX_STR(GetBufferSubData)", "GLAPI_PREFIX_STR(GetBufferSubDataARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsBufferARB))"\n" -"\t"STUB_ASM_CODE("518")"\n" - -".globl "GLAPI_PREFIX_STR(IsBuffer)"\n" -".set "GLAPI_PREFIX_STR(IsBuffer)", "GLAPI_PREFIX_STR(IsBufferARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MapBufferARB))"\n" -"\t"STUB_ASM_CODE("519")"\n" - -".globl "GLAPI_PREFIX_STR(MapBuffer)"\n" -".set "GLAPI_PREFIX_STR(MapBuffer)", "GLAPI_PREFIX_STR(MapBufferARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UnmapBufferARB))"\n" -"\t"STUB_ASM_CODE("520")"\n" - -".globl "GLAPI_PREFIX_STR(UnmapBuffer)"\n" -".set "GLAPI_PREFIX_STR(UnmapBuffer)", "GLAPI_PREFIX_STR(UnmapBufferARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BeginQueryARB))"\n" -"\t"STUB_ASM_CODE("521")"\n" - -".globl "GLAPI_PREFIX_STR(BeginQuery)"\n" -".set "GLAPI_PREFIX_STR(BeginQuery)", "GLAPI_PREFIX_STR(BeginQueryARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteQueriesARB))"\n" -"\t"STUB_ASM_CODE("522")"\n" - -".globl "GLAPI_PREFIX_STR(DeleteQueries)"\n" -".set "GLAPI_PREFIX_STR(DeleteQueries)", "GLAPI_PREFIX_STR(DeleteQueriesARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EndQueryARB))"\n" -"\t"STUB_ASM_CODE("523")"\n" - -".globl "GLAPI_PREFIX_STR(EndQuery)"\n" -".set "GLAPI_PREFIX_STR(EndQuery)", "GLAPI_PREFIX_STR(EndQueryARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenQueriesARB))"\n" -"\t"STUB_ASM_CODE("524")"\n" - -".globl "GLAPI_PREFIX_STR(GenQueries)"\n" -".set "GLAPI_PREFIX_STR(GenQueries)", "GLAPI_PREFIX_STR(GenQueriesARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetQueryObjectivARB))"\n" -"\t"STUB_ASM_CODE("525")"\n" - -".globl "GLAPI_PREFIX_STR(GetQueryObjectiv)"\n" -".set "GLAPI_PREFIX_STR(GetQueryObjectiv)", "GLAPI_PREFIX_STR(GetQueryObjectivARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetQueryObjectuivARB))"\n" -"\t"STUB_ASM_CODE("526")"\n" - -".globl "GLAPI_PREFIX_STR(GetQueryObjectuiv)"\n" -".set "GLAPI_PREFIX_STR(GetQueryObjectuiv)", "GLAPI_PREFIX_STR(GetQueryObjectuivARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetQueryivARB))"\n" -"\t"STUB_ASM_CODE("527")"\n" - -".globl "GLAPI_PREFIX_STR(GetQueryiv)"\n" -".set "GLAPI_PREFIX_STR(GetQueryiv)", "GLAPI_PREFIX_STR(GetQueryivARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsQueryARB))"\n" -"\t"STUB_ASM_CODE("528")"\n" - -".globl "GLAPI_PREFIX_STR(IsQuery)"\n" -".set "GLAPI_PREFIX_STR(IsQuery)", "GLAPI_PREFIX_STR(IsQueryARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(AttachObjectARB))"\n" -"\t"STUB_ASM_CODE("529")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CompileShaderARB))"\n" -"\t"STUB_ASM_CODE("530")"\n" - -".globl "GLAPI_PREFIX_STR(CompileShader)"\n" -".set "GLAPI_PREFIX_STR(CompileShader)", "GLAPI_PREFIX_STR(CompileShaderARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CreateProgramObjectARB))"\n" -"\t"STUB_ASM_CODE("531")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CreateShaderObjectARB))"\n" -"\t"STUB_ASM_CODE("532")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteObjectARB))"\n" -"\t"STUB_ASM_CODE("533")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DetachObjectARB))"\n" -"\t"STUB_ASM_CODE("534")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetActiveUniformARB))"\n" -"\t"STUB_ASM_CODE("535")"\n" - -".globl "GLAPI_PREFIX_STR(GetActiveUniform)"\n" -".set "GLAPI_PREFIX_STR(GetActiveUniform)", "GLAPI_PREFIX_STR(GetActiveUniformARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetAttachedObjectsARB))"\n" -"\t"STUB_ASM_CODE("536")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetHandleARB))"\n" -"\t"STUB_ASM_CODE("537")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetInfoLogARB))"\n" -"\t"STUB_ASM_CODE("538")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetObjectParameterfvARB))"\n" -"\t"STUB_ASM_CODE("539")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetObjectParameterivARB))"\n" -"\t"STUB_ASM_CODE("540")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetShaderSourceARB))"\n" -"\t"STUB_ASM_CODE("541")"\n" - -".globl "GLAPI_PREFIX_STR(GetShaderSource)"\n" -".set "GLAPI_PREFIX_STR(GetShaderSource)", "GLAPI_PREFIX_STR(GetShaderSourceARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetUniformLocationARB))"\n" -"\t"STUB_ASM_CODE("542")"\n" - -".globl "GLAPI_PREFIX_STR(GetUniformLocation)"\n" -".set "GLAPI_PREFIX_STR(GetUniformLocation)", "GLAPI_PREFIX_STR(GetUniformLocationARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetUniformfvARB))"\n" -"\t"STUB_ASM_CODE("543")"\n" - -".globl "GLAPI_PREFIX_STR(GetUniformfv)"\n" -".set "GLAPI_PREFIX_STR(GetUniformfv)", "GLAPI_PREFIX_STR(GetUniformfvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetUniformivARB))"\n" -"\t"STUB_ASM_CODE("544")"\n" - -".globl "GLAPI_PREFIX_STR(GetUniformiv)"\n" -".set "GLAPI_PREFIX_STR(GetUniformiv)", "GLAPI_PREFIX_STR(GetUniformivARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LinkProgramARB))"\n" -"\t"STUB_ASM_CODE("545")"\n" - -".globl "GLAPI_PREFIX_STR(LinkProgram)"\n" -".set "GLAPI_PREFIX_STR(LinkProgram)", "GLAPI_PREFIX_STR(LinkProgramARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ShaderSourceARB))"\n" -"\t"STUB_ASM_CODE("546")"\n" - -".globl "GLAPI_PREFIX_STR(ShaderSource)"\n" -".set "GLAPI_PREFIX_STR(ShaderSource)", "GLAPI_PREFIX_STR(ShaderSourceARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform1fARB))"\n" -"\t"STUB_ASM_CODE("547")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform1f)"\n" -".set "GLAPI_PREFIX_STR(Uniform1f)", "GLAPI_PREFIX_STR(Uniform1fARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform1fvARB))"\n" -"\t"STUB_ASM_CODE("548")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform1fv)"\n" -".set "GLAPI_PREFIX_STR(Uniform1fv)", "GLAPI_PREFIX_STR(Uniform1fvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform1iARB))"\n" -"\t"STUB_ASM_CODE("549")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform1i)"\n" -".set "GLAPI_PREFIX_STR(Uniform1i)", "GLAPI_PREFIX_STR(Uniform1iARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform1ivARB))"\n" -"\t"STUB_ASM_CODE("550")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform1iv)"\n" -".set "GLAPI_PREFIX_STR(Uniform1iv)", "GLAPI_PREFIX_STR(Uniform1ivARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform2fARB))"\n" -"\t"STUB_ASM_CODE("551")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform2f)"\n" -".set "GLAPI_PREFIX_STR(Uniform2f)", "GLAPI_PREFIX_STR(Uniform2fARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform2fvARB))"\n" -"\t"STUB_ASM_CODE("552")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform2fv)"\n" -".set "GLAPI_PREFIX_STR(Uniform2fv)", "GLAPI_PREFIX_STR(Uniform2fvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform2iARB))"\n" -"\t"STUB_ASM_CODE("553")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform2i)"\n" -".set "GLAPI_PREFIX_STR(Uniform2i)", "GLAPI_PREFIX_STR(Uniform2iARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform2ivARB))"\n" -"\t"STUB_ASM_CODE("554")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform2iv)"\n" -".set "GLAPI_PREFIX_STR(Uniform2iv)", "GLAPI_PREFIX_STR(Uniform2ivARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform3fARB))"\n" -"\t"STUB_ASM_CODE("555")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform3f)"\n" -".set "GLAPI_PREFIX_STR(Uniform3f)", "GLAPI_PREFIX_STR(Uniform3fARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform3fvARB))"\n" -"\t"STUB_ASM_CODE("556")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform3fv)"\n" -".set "GLAPI_PREFIX_STR(Uniform3fv)", "GLAPI_PREFIX_STR(Uniform3fvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform3iARB))"\n" -"\t"STUB_ASM_CODE("557")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform3i)"\n" -".set "GLAPI_PREFIX_STR(Uniform3i)", "GLAPI_PREFIX_STR(Uniform3iARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform3ivARB))"\n" -"\t"STUB_ASM_CODE("558")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform3iv)"\n" -".set "GLAPI_PREFIX_STR(Uniform3iv)", "GLAPI_PREFIX_STR(Uniform3ivARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform4fARB))"\n" -"\t"STUB_ASM_CODE("559")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform4f)"\n" -".set "GLAPI_PREFIX_STR(Uniform4f)", "GLAPI_PREFIX_STR(Uniform4fARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform4fvARB))"\n" -"\t"STUB_ASM_CODE("560")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform4fv)"\n" -".set "GLAPI_PREFIX_STR(Uniform4fv)", "GLAPI_PREFIX_STR(Uniform4fvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform4iARB))"\n" -"\t"STUB_ASM_CODE("561")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform4i)"\n" -".set "GLAPI_PREFIX_STR(Uniform4i)", "GLAPI_PREFIX_STR(Uniform4iARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform4ivARB))"\n" -"\t"STUB_ASM_CODE("562")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform4iv)"\n" -".set "GLAPI_PREFIX_STR(Uniform4iv)", "GLAPI_PREFIX_STR(Uniform4ivARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UniformMatrix2fvARB))"\n" -"\t"STUB_ASM_CODE("563")"\n" - -".globl "GLAPI_PREFIX_STR(UniformMatrix2fv)"\n" -".set "GLAPI_PREFIX_STR(UniformMatrix2fv)", "GLAPI_PREFIX_STR(UniformMatrix2fvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UniformMatrix3fvARB))"\n" -"\t"STUB_ASM_CODE("564")"\n" - -".globl "GLAPI_PREFIX_STR(UniformMatrix3fv)"\n" -".set "GLAPI_PREFIX_STR(UniformMatrix3fv)", "GLAPI_PREFIX_STR(UniformMatrix3fvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UniformMatrix4fvARB))"\n" -"\t"STUB_ASM_CODE("565")"\n" - -".globl "GLAPI_PREFIX_STR(UniformMatrix4fv)"\n" -".set "GLAPI_PREFIX_STR(UniformMatrix4fv)", "GLAPI_PREFIX_STR(UniformMatrix4fvARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UseProgramObjectARB))"\n" -"\t"STUB_ASM_CODE("566")"\n" - -".globl "GLAPI_PREFIX_STR(UseProgram)"\n" -".set "GLAPI_PREFIX_STR(UseProgram)", "GLAPI_PREFIX_STR(UseProgramObjectARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ValidateProgramARB))"\n" -"\t"STUB_ASM_CODE("567")"\n" - -".globl "GLAPI_PREFIX_STR(ValidateProgram)"\n" -".set "GLAPI_PREFIX_STR(ValidateProgram)", "GLAPI_PREFIX_STR(ValidateProgramARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindAttribLocationARB))"\n" -"\t"STUB_ASM_CODE("568")"\n" - -".globl "GLAPI_PREFIX_STR(BindAttribLocation)"\n" -".set "GLAPI_PREFIX_STR(BindAttribLocation)", "GLAPI_PREFIX_STR(BindAttribLocationARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetActiveAttribARB))"\n" -"\t"STUB_ASM_CODE("569")"\n" - -".globl "GLAPI_PREFIX_STR(GetActiveAttrib)"\n" -".set "GLAPI_PREFIX_STR(GetActiveAttrib)", "GLAPI_PREFIX_STR(GetActiveAttribARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetAttribLocationARB))"\n" -"\t"STUB_ASM_CODE("570")"\n" - -".globl "GLAPI_PREFIX_STR(GetAttribLocation)"\n" -".set "GLAPI_PREFIX_STR(GetAttribLocation)", "GLAPI_PREFIX_STR(GetAttribLocationARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawBuffersARB))"\n" -"\t"STUB_ASM_CODE("571")"\n" - -".globl "GLAPI_PREFIX_STR(DrawBuffers)"\n" -".set "GLAPI_PREFIX_STR(DrawBuffers)", "GLAPI_PREFIX_STR(DrawBuffersARB)"\n" - -".globl "GLAPI_PREFIX_STR(DrawBuffersATI)"\n" -".set "GLAPI_PREFIX_STR(DrawBuffersATI)", "GLAPI_PREFIX_STR(DrawBuffersARB)"\n" - -".globl "GLAPI_PREFIX_STR(DrawBuffersNV)"\n" -".set "GLAPI_PREFIX_STR(DrawBuffersNV)", "GLAPI_PREFIX_STR(DrawBuffersARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClampColorARB))"\n" -"\t"STUB_ASM_CODE("572")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawArraysInstancedARB))"\n" -"\t"STUB_ASM_CODE("573")"\n" - -".globl "GLAPI_PREFIX_STR(DrawArraysInstanced)"\n" -".set "GLAPI_PREFIX_STR(DrawArraysInstanced)", "GLAPI_PREFIX_STR(DrawArraysInstancedARB)"\n" - -".globl "GLAPI_PREFIX_STR(DrawArraysInstancedEXT)"\n" -".set "GLAPI_PREFIX_STR(DrawArraysInstancedEXT)", "GLAPI_PREFIX_STR(DrawArraysInstancedARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawElementsInstancedARB))"\n" -"\t"STUB_ASM_CODE("574")"\n" - -".globl "GLAPI_PREFIX_STR(DrawElementsInstanced)"\n" -".set "GLAPI_PREFIX_STR(DrawElementsInstanced)", "GLAPI_PREFIX_STR(DrawElementsInstancedARB)"\n" - -".globl "GLAPI_PREFIX_STR(DrawElementsInstancedEXT)"\n" -".set "GLAPI_PREFIX_STR(DrawElementsInstancedEXT)", "GLAPI_PREFIX_STR(DrawElementsInstancedARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RenderbufferStorageMultisample))"\n" -"\t"STUB_ASM_CODE("575")"\n" - -".globl "GLAPI_PREFIX_STR(RenderbufferStorageMultisampleEXT)"\n" -".set "GLAPI_PREFIX_STR(RenderbufferStorageMultisampleEXT)", "GLAPI_PREFIX_STR(RenderbufferStorageMultisample)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FramebufferTextureARB))"\n" -"\t"STUB_ASM_CODE("576")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FramebufferTextureFaceARB))"\n" -"\t"STUB_ASM_CODE("577")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramParameteriARB))"\n" -"\t"STUB_ASM_CODE("578")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribDivisorARB))"\n" -"\t"STUB_ASM_CODE("579")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FlushMappedBufferRange))"\n" -"\t"STUB_ASM_CODE("580")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MapBufferRange))"\n" -"\t"STUB_ASM_CODE("581")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexBufferARB))"\n" -"\t"STUB_ASM_CODE("582")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindVertexArray))"\n" -"\t"STUB_ASM_CODE("583")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenVertexArrays))"\n" -"\t"STUB_ASM_CODE("584")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CopyBufferSubData))"\n" -"\t"STUB_ASM_CODE("585")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClientWaitSync))"\n" -"\t"STUB_ASM_CODE("586")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteSync))"\n" -"\t"STUB_ASM_CODE("587")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FenceSync))"\n" -"\t"STUB_ASM_CODE("588")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetInteger64v))"\n" -"\t"STUB_ASM_CODE("589")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetSynciv))"\n" -"\t"STUB_ASM_CODE("590")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsSync))"\n" -"\t"STUB_ASM_CODE("591")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WaitSync))"\n" -"\t"STUB_ASM_CODE("592")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawElementsBaseVertex))"\n" -"\t"STUB_ASM_CODE("593")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawElementsInstancedBaseVertex))"\n" -"\t"STUB_ASM_CODE("594")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawRangeElementsBaseVertex))"\n" -"\t"STUB_ASM_CODE("595")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiDrawElementsBaseVertex))"\n" -"\t"STUB_ASM_CODE("596")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BlendEquationSeparateiARB))"\n" -"\t"STUB_ASM_CODE("597")"\n" - -".globl "GLAPI_PREFIX_STR(BlendEquationSeparateIndexedAMD)"\n" -".set "GLAPI_PREFIX_STR(BlendEquationSeparateIndexedAMD)", "GLAPI_PREFIX_STR(BlendEquationSeparateiARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BlendEquationiARB))"\n" -"\t"STUB_ASM_CODE("598")"\n" - -".globl "GLAPI_PREFIX_STR(BlendEquationIndexedAMD)"\n" -".set "GLAPI_PREFIX_STR(BlendEquationIndexedAMD)", "GLAPI_PREFIX_STR(BlendEquationiARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BlendFuncSeparateiARB))"\n" -"\t"STUB_ASM_CODE("599")"\n" - -".globl "GLAPI_PREFIX_STR(BlendFuncSeparateIndexedAMD)"\n" -".set "GLAPI_PREFIX_STR(BlendFuncSeparateIndexedAMD)", "GLAPI_PREFIX_STR(BlendFuncSeparateiARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BlendFunciARB))"\n" -"\t"STUB_ASM_CODE("600")"\n" - -".globl "GLAPI_PREFIX_STR(BlendFuncIndexedAMD)"\n" -".set "GLAPI_PREFIX_STR(BlendFuncIndexedAMD)", "GLAPI_PREFIX_STR(BlendFunciARB)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindSampler))"\n" -"\t"STUB_ASM_CODE("601")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteSamplers))"\n" -"\t"STUB_ASM_CODE("602")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenSamplers))"\n" -"\t"STUB_ASM_CODE("603")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetSamplerParameterIiv))"\n" -"\t"STUB_ASM_CODE("604")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetSamplerParameterIuiv))"\n" -"\t"STUB_ASM_CODE("605")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetSamplerParameterfv))"\n" -"\t"STUB_ASM_CODE("606")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetSamplerParameteriv))"\n" -"\t"STUB_ASM_CODE("607")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsSampler))"\n" -"\t"STUB_ASM_CODE("608")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SamplerParameterIiv))"\n" -"\t"STUB_ASM_CODE("609")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SamplerParameterIuiv))"\n" -"\t"STUB_ASM_CODE("610")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SamplerParameterf))"\n" -"\t"STUB_ASM_CODE("611")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SamplerParameterfv))"\n" -"\t"STUB_ASM_CODE("612")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SamplerParameteri))"\n" -"\t"STUB_ASM_CODE("613")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SamplerParameteriv))"\n" -"\t"STUB_ASM_CODE("614")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorP3ui))"\n" -"\t"STUB_ASM_CODE("615")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorP3uiv))"\n" -"\t"STUB_ASM_CODE("616")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorP4ui))"\n" -"\t"STUB_ASM_CODE("617")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorP4uiv))"\n" -"\t"STUB_ASM_CODE("618")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoordP1ui))"\n" -"\t"STUB_ASM_CODE("619")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoordP1uiv))"\n" -"\t"STUB_ASM_CODE("620")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoordP2ui))"\n" -"\t"STUB_ASM_CODE("621")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoordP2uiv))"\n" -"\t"STUB_ASM_CODE("622")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoordP3ui))"\n" -"\t"STUB_ASM_CODE("623")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoordP3uiv))"\n" -"\t"STUB_ASM_CODE("624")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoordP4ui))"\n" -"\t"STUB_ASM_CODE("625")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiTexCoordP4uiv))"\n" -"\t"STUB_ASM_CODE("626")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(NormalP3ui))"\n" -"\t"STUB_ASM_CODE("627")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(NormalP3uiv))"\n" -"\t"STUB_ASM_CODE("628")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColorP3ui))"\n" -"\t"STUB_ASM_CODE("629")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColorP3uiv))"\n" -"\t"STUB_ASM_CODE("630")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoordP1ui))"\n" -"\t"STUB_ASM_CODE("631")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoordP1uiv))"\n" -"\t"STUB_ASM_CODE("632")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoordP2ui))"\n" -"\t"STUB_ASM_CODE("633")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoordP2uiv))"\n" -"\t"STUB_ASM_CODE("634")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoordP3ui))"\n" -"\t"STUB_ASM_CODE("635")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoordP3uiv))"\n" -"\t"STUB_ASM_CODE("636")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoordP4ui))"\n" -"\t"STUB_ASM_CODE("637")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoordP4uiv))"\n" -"\t"STUB_ASM_CODE("638")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribP1ui))"\n" -"\t"STUB_ASM_CODE("639")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribP1uiv))"\n" -"\t"STUB_ASM_CODE("640")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribP2ui))"\n" -"\t"STUB_ASM_CODE("641")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribP2uiv))"\n" -"\t"STUB_ASM_CODE("642")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribP3ui))"\n" -"\t"STUB_ASM_CODE("643")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribP3uiv))"\n" -"\t"STUB_ASM_CODE("644")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribP4ui))"\n" -"\t"STUB_ASM_CODE("645")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribP4uiv))"\n" -"\t"STUB_ASM_CODE("646")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexP2ui))"\n" -"\t"STUB_ASM_CODE("647")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexP2uiv))"\n" -"\t"STUB_ASM_CODE("648")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexP3ui))"\n" -"\t"STUB_ASM_CODE("649")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexP3uiv))"\n" -"\t"STUB_ASM_CODE("650")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexP4ui))"\n" -"\t"STUB_ASM_CODE("651")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexP4uiv))"\n" -"\t"STUB_ASM_CODE("652")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindTransformFeedback))"\n" -"\t"STUB_ASM_CODE("653")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteTransformFeedbacks))"\n" -"\t"STUB_ASM_CODE("654")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DrawTransformFeedback))"\n" -"\t"STUB_ASM_CODE("655")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenTransformFeedbacks))"\n" -"\t"STUB_ASM_CODE("656")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsTransformFeedback))"\n" -"\t"STUB_ASM_CODE("657")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PauseTransformFeedback))"\n" -"\t"STUB_ASM_CODE("658")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ResumeTransformFeedback))"\n" -"\t"STUB_ASM_CODE("659")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearDepthf))"\n" -"\t"STUB_ASM_CODE("660")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DepthRangef))"\n" -"\t"STUB_ASM_CODE("661")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetShaderPrecisionFormat))"\n" -"\t"STUB_ASM_CODE("662")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ReleaseShaderCompiler))"\n" -"\t"STUB_ASM_CODE("663")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ShaderBinary))"\n" -"\t"STUB_ASM_CODE("664")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetGraphicsResetStatusARB))"\n" -"\t"STUB_ASM_CODE("668")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetnColorTableARB))"\n" -"\t"STUB_ASM_CODE("669")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetnCompressedTexImageARB))"\n" -"\t"STUB_ASM_CODE("670")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetnConvolutionFilterARB))"\n" -"\t"STUB_ASM_CODE("671")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetnHistogramARB))"\n" -"\t"STUB_ASM_CODE("672")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetnMapdvARB))"\n" -"\t"STUB_ASM_CODE("673")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetnMapfvARB))"\n" -"\t"STUB_ASM_CODE("674")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetnMapivARB))"\n" -"\t"STUB_ASM_CODE("675")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetnMinmaxARB))"\n" -"\t"STUB_ASM_CODE("676")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetnPixelMapfvARB))"\n" -"\t"STUB_ASM_CODE("677")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetnPixelMapuivARB))"\n" -"\t"STUB_ASM_CODE("678")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetnPixelMapusvARB))"\n" -"\t"STUB_ASM_CODE("679")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetnPolygonStippleARB))"\n" -"\t"STUB_ASM_CODE("680")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetnSeparableFilterARB))"\n" -"\t"STUB_ASM_CODE("681")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetnTexImageARB))"\n" -"\t"STUB_ASM_CODE("682")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetnUniformdvARB))"\n" -"\t"STUB_ASM_CODE("683")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetnUniformfvARB))"\n" -"\t"STUB_ASM_CODE("684")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetnUniformivARB))"\n" -"\t"STUB_ASM_CODE("685")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetnUniformuivARB))"\n" -"\t"STUB_ASM_CODE("686")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ReadnPixelsARB))"\n" -"\t"STUB_ASM_CODE("687")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexStorage1D))"\n" -"\t"STUB_ASM_CODE("688")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexStorage2D))"\n" -"\t"STUB_ASM_CODE("689")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexStorage3D))"\n" -"\t"STUB_ASM_CODE("690")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TextureStorage1DEXT))"\n" -"\t"STUB_ASM_CODE("691")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TextureStorage2DEXT))"\n" -"\t"STUB_ASM_CODE("692")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TextureStorage3DEXT))"\n" -"\t"STUB_ASM_CODE("693")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PolygonOffsetEXT))"\n" -"\t"STUB_ASM_CODE("694")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorPointerEXT))"\n" -"\t"STUB_ASM_CODE("713")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EdgeFlagPointerEXT))"\n" -"\t"STUB_ASM_CODE("714")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IndexPointerEXT))"\n" -"\t"STUB_ASM_CODE("715")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(NormalPointerEXT))"\n" -"\t"STUB_ASM_CODE("716")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexCoordPointerEXT))"\n" -"\t"STUB_ASM_CODE("717")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexPointerEXT))"\n" -"\t"STUB_ASM_CODE("718")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PointParameterfEXT))"\n" -"\t"STUB_ASM_CODE("719")"\n" - -".globl "GLAPI_PREFIX_STR(PointParameterf)"\n" -".set "GLAPI_PREFIX_STR(PointParameterf)", "GLAPI_PREFIX_STR(PointParameterfEXT)"\n" - -".globl "GLAPI_PREFIX_STR(PointParameterfARB)"\n" -".set "GLAPI_PREFIX_STR(PointParameterfARB)", "GLAPI_PREFIX_STR(PointParameterfEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PointParameterfvEXT))"\n" -"\t"STUB_ASM_CODE("720")"\n" - -".globl "GLAPI_PREFIX_STR(PointParameterfv)"\n" -".set "GLAPI_PREFIX_STR(PointParameterfv)", "GLAPI_PREFIX_STR(PointParameterfvEXT)"\n" - -".globl "GLAPI_PREFIX_STR(PointParameterfvARB)"\n" -".set "GLAPI_PREFIX_STR(PointParameterfvARB)", "GLAPI_PREFIX_STR(PointParameterfvEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LockArraysEXT))"\n" -"\t"STUB_ASM_CODE("721")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UnlockArraysEXT))"\n" -"\t"STUB_ASM_CODE("722")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3bEXT))"\n" -"\t"STUB_ASM_CODE("723")"\n" - -".globl "GLAPI_PREFIX_STR(SecondaryColor3b)"\n" -".set "GLAPI_PREFIX_STR(SecondaryColor3b)", "GLAPI_PREFIX_STR(SecondaryColor3bEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3bvEXT))"\n" -"\t"STUB_ASM_CODE("724")"\n" - -".globl "GLAPI_PREFIX_STR(SecondaryColor3bv)"\n" -".set "GLAPI_PREFIX_STR(SecondaryColor3bv)", "GLAPI_PREFIX_STR(SecondaryColor3bvEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3dEXT))"\n" -"\t"STUB_ASM_CODE("725")"\n" - -".globl "GLAPI_PREFIX_STR(SecondaryColor3d)"\n" -".set "GLAPI_PREFIX_STR(SecondaryColor3d)", "GLAPI_PREFIX_STR(SecondaryColor3dEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3dvEXT))"\n" -"\t"STUB_ASM_CODE("726")"\n" - -".globl "GLAPI_PREFIX_STR(SecondaryColor3dv)"\n" -".set "GLAPI_PREFIX_STR(SecondaryColor3dv)", "GLAPI_PREFIX_STR(SecondaryColor3dvEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3fEXT))"\n" -"\t"STUB_ASM_CODE("727")"\n" - -".globl "GLAPI_PREFIX_STR(SecondaryColor3f)"\n" -".set "GLAPI_PREFIX_STR(SecondaryColor3f)", "GLAPI_PREFIX_STR(SecondaryColor3fEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3fvEXT))"\n" -"\t"STUB_ASM_CODE("728")"\n" - -".globl "GLAPI_PREFIX_STR(SecondaryColor3fv)"\n" -".set "GLAPI_PREFIX_STR(SecondaryColor3fv)", "GLAPI_PREFIX_STR(SecondaryColor3fvEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3iEXT))"\n" -"\t"STUB_ASM_CODE("729")"\n" - -".globl "GLAPI_PREFIX_STR(SecondaryColor3i)"\n" -".set "GLAPI_PREFIX_STR(SecondaryColor3i)", "GLAPI_PREFIX_STR(SecondaryColor3iEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3ivEXT))"\n" -"\t"STUB_ASM_CODE("730")"\n" - -".globl "GLAPI_PREFIX_STR(SecondaryColor3iv)"\n" -".set "GLAPI_PREFIX_STR(SecondaryColor3iv)", "GLAPI_PREFIX_STR(SecondaryColor3ivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3sEXT))"\n" -"\t"STUB_ASM_CODE("731")"\n" - -".globl "GLAPI_PREFIX_STR(SecondaryColor3s)"\n" -".set "GLAPI_PREFIX_STR(SecondaryColor3s)", "GLAPI_PREFIX_STR(SecondaryColor3sEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3svEXT))"\n" -"\t"STUB_ASM_CODE("732")"\n" - -".globl "GLAPI_PREFIX_STR(SecondaryColor3sv)"\n" -".set "GLAPI_PREFIX_STR(SecondaryColor3sv)", "GLAPI_PREFIX_STR(SecondaryColor3svEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3ubEXT))"\n" -"\t"STUB_ASM_CODE("733")"\n" - -".globl "GLAPI_PREFIX_STR(SecondaryColor3ub)"\n" -".set "GLAPI_PREFIX_STR(SecondaryColor3ub)", "GLAPI_PREFIX_STR(SecondaryColor3ubEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3ubvEXT))"\n" -"\t"STUB_ASM_CODE("734")"\n" - -".globl "GLAPI_PREFIX_STR(SecondaryColor3ubv)"\n" -".set "GLAPI_PREFIX_STR(SecondaryColor3ubv)", "GLAPI_PREFIX_STR(SecondaryColor3ubvEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3uiEXT))"\n" -"\t"STUB_ASM_CODE("735")"\n" - -".globl "GLAPI_PREFIX_STR(SecondaryColor3ui)"\n" -".set "GLAPI_PREFIX_STR(SecondaryColor3ui)", "GLAPI_PREFIX_STR(SecondaryColor3uiEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3uivEXT))"\n" -"\t"STUB_ASM_CODE("736")"\n" - -".globl "GLAPI_PREFIX_STR(SecondaryColor3uiv)"\n" -".set "GLAPI_PREFIX_STR(SecondaryColor3uiv)", "GLAPI_PREFIX_STR(SecondaryColor3uivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3usEXT))"\n" -"\t"STUB_ASM_CODE("737")"\n" - -".globl "GLAPI_PREFIX_STR(SecondaryColor3us)"\n" -".set "GLAPI_PREFIX_STR(SecondaryColor3us)", "GLAPI_PREFIX_STR(SecondaryColor3usEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColor3usvEXT))"\n" -"\t"STUB_ASM_CODE("738")"\n" - -".globl "GLAPI_PREFIX_STR(SecondaryColor3usv)"\n" -".set "GLAPI_PREFIX_STR(SecondaryColor3usv)", "GLAPI_PREFIX_STR(SecondaryColor3usvEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SecondaryColorPointerEXT))"\n" -"\t"STUB_ASM_CODE("739")"\n" - -".globl "GLAPI_PREFIX_STR(SecondaryColorPointer)"\n" -".set "GLAPI_PREFIX_STR(SecondaryColorPointer)", "GLAPI_PREFIX_STR(SecondaryColorPointerEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiDrawArraysEXT))"\n" -"\t"STUB_ASM_CODE("740")"\n" - -".globl "GLAPI_PREFIX_STR(MultiDrawArrays)"\n" -".set "GLAPI_PREFIX_STR(MultiDrawArrays)", "GLAPI_PREFIX_STR(MultiDrawArraysEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(MultiDrawElementsEXT))"\n" -"\t"STUB_ASM_CODE("741")"\n" - -".globl "GLAPI_PREFIX_STR(MultiDrawElements)"\n" -".set "GLAPI_PREFIX_STR(MultiDrawElements)", "GLAPI_PREFIX_STR(MultiDrawElementsEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FogCoordPointerEXT))"\n" -"\t"STUB_ASM_CODE("742")"\n" - -".globl "GLAPI_PREFIX_STR(FogCoordPointer)"\n" -".set "GLAPI_PREFIX_STR(FogCoordPointer)", "GLAPI_PREFIX_STR(FogCoordPointerEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FogCoorddEXT))"\n" -"\t"STUB_ASM_CODE("743")"\n" - -".globl "GLAPI_PREFIX_STR(FogCoordd)"\n" -".set "GLAPI_PREFIX_STR(FogCoordd)", "GLAPI_PREFIX_STR(FogCoorddEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FogCoorddvEXT))"\n" -"\t"STUB_ASM_CODE("744")"\n" - -".globl "GLAPI_PREFIX_STR(FogCoorddv)"\n" -".set "GLAPI_PREFIX_STR(FogCoorddv)", "GLAPI_PREFIX_STR(FogCoorddvEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FogCoordfEXT))"\n" -"\t"STUB_ASM_CODE("745")"\n" - -".globl "GLAPI_PREFIX_STR(FogCoordf)"\n" -".set "GLAPI_PREFIX_STR(FogCoordf)", "GLAPI_PREFIX_STR(FogCoordfEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FogCoordfvEXT))"\n" -"\t"STUB_ASM_CODE("746")"\n" - -".globl "GLAPI_PREFIX_STR(FogCoordfv)"\n" -".set "GLAPI_PREFIX_STR(FogCoordfv)", "GLAPI_PREFIX_STR(FogCoordfvEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BlendFuncSeparateEXT))"\n" -"\t"STUB_ASM_CODE("748")"\n" - -".globl "GLAPI_PREFIX_STR(BlendFuncSeparate)"\n" -".set "GLAPI_PREFIX_STR(BlendFuncSeparate)", "GLAPI_PREFIX_STR(BlendFuncSeparateEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FlushVertexArrayRangeNV))"\n" -"\t"STUB_ASM_CODE("749")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexArrayRangeNV))"\n" -"\t"STUB_ASM_CODE("750")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CombinerInputNV))"\n" -"\t"STUB_ASM_CODE("751")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CombinerOutputNV))"\n" -"\t"STUB_ASM_CODE("752")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CombinerParameterfNV))"\n" -"\t"STUB_ASM_CODE("753")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CombinerParameterfvNV))"\n" -"\t"STUB_ASM_CODE("754")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CombinerParameteriNV))"\n" -"\t"STUB_ASM_CODE("755")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CombinerParameterivNV))"\n" -"\t"STUB_ASM_CODE("756")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FinalCombinerInputNV))"\n" -"\t"STUB_ASM_CODE("757")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetCombinerInputParameterfvNV))"\n" -"\t"STUB_ASM_CODE("758")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetCombinerInputParameterivNV))"\n" -"\t"STUB_ASM_CODE("759")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetCombinerOutputParameterfvNV))"\n" -"\t"STUB_ASM_CODE("760")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetCombinerOutputParameterivNV))"\n" -"\t"STUB_ASM_CODE("761")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetFinalCombinerInputParameterfvNV))"\n" -"\t"STUB_ASM_CODE("762")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetFinalCombinerInputParameterivNV))"\n" -"\t"STUB_ASM_CODE("763")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ResizeBuffersMESA))"\n" -"\t"STUB_ASM_CODE("764")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos2dMESA))"\n" -"\t"STUB_ASM_CODE("765")"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos2d)"\n" -".set "GLAPI_PREFIX_STR(WindowPos2d)", "GLAPI_PREFIX_STR(WindowPos2dMESA)"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos2dARB)"\n" -".set "GLAPI_PREFIX_STR(WindowPos2dARB)", "GLAPI_PREFIX_STR(WindowPos2dMESA)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos2dvMESA))"\n" -"\t"STUB_ASM_CODE("766")"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos2dv)"\n" -".set "GLAPI_PREFIX_STR(WindowPos2dv)", "GLAPI_PREFIX_STR(WindowPos2dvMESA)"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos2dvARB)"\n" -".set "GLAPI_PREFIX_STR(WindowPos2dvARB)", "GLAPI_PREFIX_STR(WindowPos2dvMESA)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos2fMESA))"\n" -"\t"STUB_ASM_CODE("767")"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos2f)"\n" -".set "GLAPI_PREFIX_STR(WindowPos2f)", "GLAPI_PREFIX_STR(WindowPos2fMESA)"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos2fARB)"\n" -".set "GLAPI_PREFIX_STR(WindowPos2fARB)", "GLAPI_PREFIX_STR(WindowPos2fMESA)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos2fvMESA))"\n" -"\t"STUB_ASM_CODE("768")"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos2fv)"\n" -".set "GLAPI_PREFIX_STR(WindowPos2fv)", "GLAPI_PREFIX_STR(WindowPos2fvMESA)"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos2fvARB)"\n" -".set "GLAPI_PREFIX_STR(WindowPos2fvARB)", "GLAPI_PREFIX_STR(WindowPos2fvMESA)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos2iMESA))"\n" -"\t"STUB_ASM_CODE("769")"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos2i)"\n" -".set "GLAPI_PREFIX_STR(WindowPos2i)", "GLAPI_PREFIX_STR(WindowPos2iMESA)"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos2iARB)"\n" -".set "GLAPI_PREFIX_STR(WindowPos2iARB)", "GLAPI_PREFIX_STR(WindowPos2iMESA)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos2ivMESA))"\n" -"\t"STUB_ASM_CODE("770")"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos2iv)"\n" -".set "GLAPI_PREFIX_STR(WindowPos2iv)", "GLAPI_PREFIX_STR(WindowPos2ivMESA)"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos2ivARB)"\n" -".set "GLAPI_PREFIX_STR(WindowPos2ivARB)", "GLAPI_PREFIX_STR(WindowPos2ivMESA)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos2sMESA))"\n" -"\t"STUB_ASM_CODE("771")"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos2s)"\n" -".set "GLAPI_PREFIX_STR(WindowPos2s)", "GLAPI_PREFIX_STR(WindowPos2sMESA)"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos2sARB)"\n" -".set "GLAPI_PREFIX_STR(WindowPos2sARB)", "GLAPI_PREFIX_STR(WindowPos2sMESA)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos2svMESA))"\n" -"\t"STUB_ASM_CODE("772")"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos2sv)"\n" -".set "GLAPI_PREFIX_STR(WindowPos2sv)", "GLAPI_PREFIX_STR(WindowPos2svMESA)"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos2svARB)"\n" -".set "GLAPI_PREFIX_STR(WindowPos2svARB)", "GLAPI_PREFIX_STR(WindowPos2svMESA)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos3dMESA))"\n" -"\t"STUB_ASM_CODE("773")"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos3d)"\n" -".set "GLAPI_PREFIX_STR(WindowPos3d)", "GLAPI_PREFIX_STR(WindowPos3dMESA)"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos3dARB)"\n" -".set "GLAPI_PREFIX_STR(WindowPos3dARB)", "GLAPI_PREFIX_STR(WindowPos3dMESA)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos3dvMESA))"\n" -"\t"STUB_ASM_CODE("774")"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos3dv)"\n" -".set "GLAPI_PREFIX_STR(WindowPos3dv)", "GLAPI_PREFIX_STR(WindowPos3dvMESA)"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos3dvARB)"\n" -".set "GLAPI_PREFIX_STR(WindowPos3dvARB)", "GLAPI_PREFIX_STR(WindowPos3dvMESA)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos3fMESA))"\n" -"\t"STUB_ASM_CODE("775")"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos3f)"\n" -".set "GLAPI_PREFIX_STR(WindowPos3f)", "GLAPI_PREFIX_STR(WindowPos3fMESA)"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos3fARB)"\n" -".set "GLAPI_PREFIX_STR(WindowPos3fARB)", "GLAPI_PREFIX_STR(WindowPos3fMESA)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos3fvMESA))"\n" -"\t"STUB_ASM_CODE("776")"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos3fv)"\n" -".set "GLAPI_PREFIX_STR(WindowPos3fv)", "GLAPI_PREFIX_STR(WindowPos3fvMESA)"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos3fvARB)"\n" -".set "GLAPI_PREFIX_STR(WindowPos3fvARB)", "GLAPI_PREFIX_STR(WindowPos3fvMESA)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos3iMESA))"\n" -"\t"STUB_ASM_CODE("777")"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos3i)"\n" -".set "GLAPI_PREFIX_STR(WindowPos3i)", "GLAPI_PREFIX_STR(WindowPos3iMESA)"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos3iARB)"\n" -".set "GLAPI_PREFIX_STR(WindowPos3iARB)", "GLAPI_PREFIX_STR(WindowPos3iMESA)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos3ivMESA))"\n" -"\t"STUB_ASM_CODE("778")"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos3iv)"\n" -".set "GLAPI_PREFIX_STR(WindowPos3iv)", "GLAPI_PREFIX_STR(WindowPos3ivMESA)"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos3ivARB)"\n" -".set "GLAPI_PREFIX_STR(WindowPos3ivARB)", "GLAPI_PREFIX_STR(WindowPos3ivMESA)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos3sMESA))"\n" -"\t"STUB_ASM_CODE("779")"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos3s)"\n" -".set "GLAPI_PREFIX_STR(WindowPos3s)", "GLAPI_PREFIX_STR(WindowPos3sMESA)"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos3sARB)"\n" -".set "GLAPI_PREFIX_STR(WindowPos3sARB)", "GLAPI_PREFIX_STR(WindowPos3sMESA)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos3svMESA))"\n" -"\t"STUB_ASM_CODE("780")"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos3sv)"\n" -".set "GLAPI_PREFIX_STR(WindowPos3sv)", "GLAPI_PREFIX_STR(WindowPos3svMESA)"\n" - -".globl "GLAPI_PREFIX_STR(WindowPos3svARB)"\n" -".set "GLAPI_PREFIX_STR(WindowPos3svARB)", "GLAPI_PREFIX_STR(WindowPos3svMESA)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos4dMESA))"\n" -"\t"STUB_ASM_CODE("781")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos4dvMESA))"\n" -"\t"STUB_ASM_CODE("782")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos4fMESA))"\n" -"\t"STUB_ASM_CODE("783")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos4fvMESA))"\n" -"\t"STUB_ASM_CODE("784")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos4iMESA))"\n" -"\t"STUB_ASM_CODE("785")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos4ivMESA))"\n" -"\t"STUB_ASM_CODE("786")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos4sMESA))"\n" -"\t"STUB_ASM_CODE("787")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(WindowPos4svMESA))"\n" -"\t"STUB_ASM_CODE("788")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(AreProgramsResidentNV))"\n" -"\t"STUB_ASM_CODE("798")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindProgramNV))"\n" -"\t"STUB_ASM_CODE("799")"\n" - -".globl "GLAPI_PREFIX_STR(BindProgramARB)"\n" -".set "GLAPI_PREFIX_STR(BindProgramARB)", "GLAPI_PREFIX_STR(BindProgramNV)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteProgramsNV))"\n" -"\t"STUB_ASM_CODE("800")"\n" - -".globl "GLAPI_PREFIX_STR(DeleteProgramsARB)"\n" -".set "GLAPI_PREFIX_STR(DeleteProgramsARB)", "GLAPI_PREFIX_STR(DeleteProgramsNV)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ExecuteProgramNV))"\n" -"\t"STUB_ASM_CODE("801")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenProgramsNV))"\n" -"\t"STUB_ASM_CODE("802")"\n" - -".globl "GLAPI_PREFIX_STR(GenProgramsARB)"\n" -".set "GLAPI_PREFIX_STR(GenProgramsARB)", "GLAPI_PREFIX_STR(GenProgramsNV)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramParameterdvNV))"\n" -"\t"STUB_ASM_CODE("803")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramParameterfvNV))"\n" -"\t"STUB_ASM_CODE("804")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramStringNV))"\n" -"\t"STUB_ASM_CODE("805")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramivNV))"\n" -"\t"STUB_ASM_CODE("806")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTrackMatrixivNV))"\n" -"\t"STUB_ASM_CODE("807")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetVertexAttribPointervNV))"\n" -"\t"STUB_ASM_CODE("808")"\n" - -".globl "GLAPI_PREFIX_STR(GetVertexAttribPointerv)"\n" -".set "GLAPI_PREFIX_STR(GetVertexAttribPointerv)", "GLAPI_PREFIX_STR(GetVertexAttribPointervNV)"\n" - -".globl "GLAPI_PREFIX_STR(GetVertexAttribPointervARB)"\n" -".set "GLAPI_PREFIX_STR(GetVertexAttribPointervARB)", "GLAPI_PREFIX_STR(GetVertexAttribPointervNV)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetVertexAttribdvNV))"\n" -"\t"STUB_ASM_CODE("809")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetVertexAttribfvNV))"\n" -"\t"STUB_ASM_CODE("810")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetVertexAttribivNV))"\n" -"\t"STUB_ASM_CODE("811")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsProgramNV))"\n" -"\t"STUB_ASM_CODE("812")"\n" - -".globl "GLAPI_PREFIX_STR(IsProgramARB)"\n" -".set "GLAPI_PREFIX_STR(IsProgramARB)", "GLAPI_PREFIX_STR(IsProgramNV)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(LoadProgramNV))"\n" -"\t"STUB_ASM_CODE("813")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramParameters4dvNV))"\n" -"\t"STUB_ASM_CODE("814")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramParameters4fvNV))"\n" -"\t"STUB_ASM_CODE("815")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RequestResidentProgramsNV))"\n" -"\t"STUB_ASM_CODE("816")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TrackMatrixNV))"\n" -"\t"STUB_ASM_CODE("817")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1dNV))"\n" -"\t"STUB_ASM_CODE("818")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1dvNV))"\n" -"\t"STUB_ASM_CODE("819")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1fNV))"\n" -"\t"STUB_ASM_CODE("820")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1fvNV))"\n" -"\t"STUB_ASM_CODE("821")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1sNV))"\n" -"\t"STUB_ASM_CODE("822")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib1svNV))"\n" -"\t"STUB_ASM_CODE("823")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2dNV))"\n" -"\t"STUB_ASM_CODE("824")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2dvNV))"\n" -"\t"STUB_ASM_CODE("825")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2fNV))"\n" -"\t"STUB_ASM_CODE("826")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2fvNV))"\n" -"\t"STUB_ASM_CODE("827")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2sNV))"\n" -"\t"STUB_ASM_CODE("828")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib2svNV))"\n" -"\t"STUB_ASM_CODE("829")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3dNV))"\n" -"\t"STUB_ASM_CODE("830")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3dvNV))"\n" -"\t"STUB_ASM_CODE("831")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3fNV))"\n" -"\t"STUB_ASM_CODE("832")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3fvNV))"\n" -"\t"STUB_ASM_CODE("833")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3sNV))"\n" -"\t"STUB_ASM_CODE("834")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib3svNV))"\n" -"\t"STUB_ASM_CODE("835")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4dNV))"\n" -"\t"STUB_ASM_CODE("836")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4dvNV))"\n" -"\t"STUB_ASM_CODE("837")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4fNV))"\n" -"\t"STUB_ASM_CODE("838")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4fvNV))"\n" -"\t"STUB_ASM_CODE("839")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4sNV))"\n" -"\t"STUB_ASM_CODE("840")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4svNV))"\n" -"\t"STUB_ASM_CODE("841")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4ubNV))"\n" -"\t"STUB_ASM_CODE("842")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttrib4ubvNV))"\n" -"\t"STUB_ASM_CODE("843")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribPointerNV))"\n" -"\t"STUB_ASM_CODE("844")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs1dvNV))"\n" -"\t"STUB_ASM_CODE("845")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs1fvNV))"\n" -"\t"STUB_ASM_CODE("846")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs1svNV))"\n" -"\t"STUB_ASM_CODE("847")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs2dvNV))"\n" -"\t"STUB_ASM_CODE("848")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs2fvNV))"\n" -"\t"STUB_ASM_CODE("849")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs2svNV))"\n" -"\t"STUB_ASM_CODE("850")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs3dvNV))"\n" -"\t"STUB_ASM_CODE("851")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs3fvNV))"\n" -"\t"STUB_ASM_CODE("852")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs3svNV))"\n" -"\t"STUB_ASM_CODE("853")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs4dvNV))"\n" -"\t"STUB_ASM_CODE("854")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs4fvNV))"\n" -"\t"STUB_ASM_CODE("855")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs4svNV))"\n" -"\t"STUB_ASM_CODE("856")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribs4ubvNV))"\n" -"\t"STUB_ASM_CODE("857")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexBumpParameterfvATI))"\n" -"\t"STUB_ASM_CODE("858")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexBumpParameterivATI))"\n" -"\t"STUB_ASM_CODE("859")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexBumpParameterfvATI))"\n" -"\t"STUB_ASM_CODE("860")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexBumpParameterivATI))"\n" -"\t"STUB_ASM_CODE("861")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(AlphaFragmentOp1ATI))"\n" -"\t"STUB_ASM_CODE("862")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(AlphaFragmentOp2ATI))"\n" -"\t"STUB_ASM_CODE("863")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(AlphaFragmentOp3ATI))"\n" -"\t"STUB_ASM_CODE("864")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BeginFragmentShaderATI))"\n" -"\t"STUB_ASM_CODE("865")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindFragmentShaderATI))"\n" -"\t"STUB_ASM_CODE("866")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorFragmentOp1ATI))"\n" -"\t"STUB_ASM_CODE("867")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorFragmentOp2ATI))"\n" -"\t"STUB_ASM_CODE("868")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorFragmentOp3ATI))"\n" -"\t"STUB_ASM_CODE("869")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteFragmentShaderATI))"\n" -"\t"STUB_ASM_CODE("870")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EndFragmentShaderATI))"\n" -"\t"STUB_ASM_CODE("871")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenFragmentShadersATI))"\n" -"\t"STUB_ASM_CODE("872")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PassTexCoordATI))"\n" -"\t"STUB_ASM_CODE("873")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SampleMapATI))"\n" -"\t"STUB_ASM_CODE("874")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(SetFragmentShaderConstantATI))"\n" -"\t"STUB_ASM_CODE("875")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PointParameteriNV))"\n" -"\t"STUB_ASM_CODE("876")"\n" - -".globl "GLAPI_PREFIX_STR(PointParameteri)"\n" -".set "GLAPI_PREFIX_STR(PointParameteri)", "GLAPI_PREFIX_STR(PointParameteriNV)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PointParameterivNV))"\n" -"\t"STUB_ASM_CODE("877")"\n" - -".globl "GLAPI_PREFIX_STR(PointParameteriv)"\n" -".set "GLAPI_PREFIX_STR(PointParameteriv)", "GLAPI_PREFIX_STR(PointParameterivNV)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteVertexArrays))"\n" -"\t"STUB_ASM_CODE("880")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsVertexArray))"\n" -"\t"STUB_ASM_CODE("882")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramNamedParameterdvNV))"\n" -"\t"STUB_ASM_CODE("883")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetProgramNamedParameterfvNV))"\n" -"\t"STUB_ASM_CODE("884")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramNamedParameter4dNV))"\n" -"\t"STUB_ASM_CODE("885")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramNamedParameter4dvNV))"\n" -"\t"STUB_ASM_CODE("886")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramNamedParameter4fNV))"\n" -"\t"STUB_ASM_CODE("887")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProgramNamedParameter4fvNV))"\n" -"\t"STUB_ASM_CODE("888")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PrimitiveRestartIndexNV))"\n" -"\t"STUB_ASM_CODE("889")"\n" - -".globl "GLAPI_PREFIX_STR(PrimitiveRestartIndex)"\n" -".set "GLAPI_PREFIX_STR(PrimitiveRestartIndex)", "GLAPI_PREFIX_STR(PrimitiveRestartIndexNV)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(PrimitiveRestartNV))"\n" -"\t"STUB_ASM_CODE("890")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BlendEquationSeparate))"\n" -"\t"STUB_ASM_CODE("938")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindFramebufferEXT))"\n" -"\t"STUB_ASM_CODE("939")"\n" - -".globl "GLAPI_PREFIX_STR(BindFramebuffer)"\n" -".set "GLAPI_PREFIX_STR(BindFramebuffer)", "GLAPI_PREFIX_STR(BindFramebufferEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindRenderbufferEXT))"\n" -"\t"STUB_ASM_CODE("940")"\n" - -".globl "GLAPI_PREFIX_STR(BindRenderbuffer)"\n" -".set "GLAPI_PREFIX_STR(BindRenderbuffer)", "GLAPI_PREFIX_STR(BindRenderbufferEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CheckFramebufferStatusEXT))"\n" -"\t"STUB_ASM_CODE("941")"\n" - -".globl "GLAPI_PREFIX_STR(CheckFramebufferStatus)"\n" -".set "GLAPI_PREFIX_STR(CheckFramebufferStatus)", "GLAPI_PREFIX_STR(CheckFramebufferStatusEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteFramebuffersEXT))"\n" -"\t"STUB_ASM_CODE("942")"\n" - -".globl "GLAPI_PREFIX_STR(DeleteFramebuffers)"\n" -".set "GLAPI_PREFIX_STR(DeleteFramebuffers)", "GLAPI_PREFIX_STR(DeleteFramebuffersEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DeleteRenderbuffersEXT))"\n" -"\t"STUB_ASM_CODE("943")"\n" - -".globl "GLAPI_PREFIX_STR(DeleteRenderbuffers)"\n" -".set "GLAPI_PREFIX_STR(DeleteRenderbuffers)", "GLAPI_PREFIX_STR(DeleteRenderbuffersEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FramebufferRenderbufferEXT))"\n" -"\t"STUB_ASM_CODE("944")"\n" - -".globl "GLAPI_PREFIX_STR(FramebufferRenderbuffer)"\n" -".set "GLAPI_PREFIX_STR(FramebufferRenderbuffer)", "GLAPI_PREFIX_STR(FramebufferRenderbufferEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FramebufferTexture1DEXT))"\n" -"\t"STUB_ASM_CODE("945")"\n" - -".globl "GLAPI_PREFIX_STR(FramebufferTexture1D)"\n" -".set "GLAPI_PREFIX_STR(FramebufferTexture1D)", "GLAPI_PREFIX_STR(FramebufferTexture1DEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FramebufferTexture2DEXT))"\n" -"\t"STUB_ASM_CODE("946")"\n" - -".globl "GLAPI_PREFIX_STR(FramebufferTexture2D)"\n" -".set "GLAPI_PREFIX_STR(FramebufferTexture2D)", "GLAPI_PREFIX_STR(FramebufferTexture2DEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FramebufferTexture3DEXT))"\n" -"\t"STUB_ASM_CODE("947")"\n" - -".globl "GLAPI_PREFIX_STR(FramebufferTexture3D)"\n" -".set "GLAPI_PREFIX_STR(FramebufferTexture3D)", "GLAPI_PREFIX_STR(FramebufferTexture3DEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenFramebuffersEXT))"\n" -"\t"STUB_ASM_CODE("948")"\n" - -".globl "GLAPI_PREFIX_STR(GenFramebuffers)"\n" -".set "GLAPI_PREFIX_STR(GenFramebuffers)", "GLAPI_PREFIX_STR(GenFramebuffersEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenRenderbuffersEXT))"\n" -"\t"STUB_ASM_CODE("949")"\n" - -".globl "GLAPI_PREFIX_STR(GenRenderbuffers)"\n" -".set "GLAPI_PREFIX_STR(GenRenderbuffers)", "GLAPI_PREFIX_STR(GenRenderbuffersEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GenerateMipmapEXT))"\n" -"\t"STUB_ASM_CODE("950")"\n" - -".globl "GLAPI_PREFIX_STR(GenerateMipmap)"\n" -".set "GLAPI_PREFIX_STR(GenerateMipmap)", "GLAPI_PREFIX_STR(GenerateMipmapEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetFramebufferAttachmentParameterivEXT))"\n" -"\t"STUB_ASM_CODE("951")"\n" - -".globl "GLAPI_PREFIX_STR(GetFramebufferAttachmentParameteriv)"\n" -".set "GLAPI_PREFIX_STR(GetFramebufferAttachmentParameteriv)", "GLAPI_PREFIX_STR(GetFramebufferAttachmentParameterivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetRenderbufferParameterivEXT))"\n" -"\t"STUB_ASM_CODE("952")"\n" - -".globl "GLAPI_PREFIX_STR(GetRenderbufferParameteriv)"\n" -".set "GLAPI_PREFIX_STR(GetRenderbufferParameteriv)", "GLAPI_PREFIX_STR(GetRenderbufferParameterivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsFramebufferEXT))"\n" -"\t"STUB_ASM_CODE("953")"\n" - -".globl "GLAPI_PREFIX_STR(IsFramebuffer)"\n" -".set "GLAPI_PREFIX_STR(IsFramebuffer)", "GLAPI_PREFIX_STR(IsFramebufferEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsRenderbufferEXT))"\n" -"\t"STUB_ASM_CODE("954")"\n" - -".globl "GLAPI_PREFIX_STR(IsRenderbuffer)"\n" -".set "GLAPI_PREFIX_STR(IsRenderbuffer)", "GLAPI_PREFIX_STR(IsRenderbufferEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(RenderbufferStorageEXT))"\n" -"\t"STUB_ASM_CODE("955")"\n" - -".globl "GLAPI_PREFIX_STR(RenderbufferStorage)"\n" -".set "GLAPI_PREFIX_STR(RenderbufferStorage)", "GLAPI_PREFIX_STR(RenderbufferStorageEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BlitFramebuffer))"\n" -"\t"STUB_ASM_CODE("956")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindFragDataLocationEXT))"\n" -"\t"STUB_ASM_CODE("959")"\n" - -".globl "GLAPI_PREFIX_STR(BindFragDataLocation)"\n" -".set "GLAPI_PREFIX_STR(BindFragDataLocation)", "GLAPI_PREFIX_STR(BindFragDataLocationEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetFragDataLocationEXT))"\n" -"\t"STUB_ASM_CODE("960")"\n" - -".globl "GLAPI_PREFIX_STR(GetFragDataLocation)"\n" -".set "GLAPI_PREFIX_STR(GetFragDataLocation)", "GLAPI_PREFIX_STR(GetFragDataLocationEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetUniformuivEXT))"\n" -"\t"STUB_ASM_CODE("961")"\n" - -".globl "GLAPI_PREFIX_STR(GetUniformuiv)"\n" -".set "GLAPI_PREFIX_STR(GetUniformuiv)", "GLAPI_PREFIX_STR(GetUniformuivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetVertexAttribIivEXT))"\n" -"\t"STUB_ASM_CODE("962")"\n" - -".globl "GLAPI_PREFIX_STR(GetVertexAttribIiv)"\n" -".set "GLAPI_PREFIX_STR(GetVertexAttribIiv)", "GLAPI_PREFIX_STR(GetVertexAttribIivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetVertexAttribIuivEXT))"\n" -"\t"STUB_ASM_CODE("963")"\n" - -".globl "GLAPI_PREFIX_STR(GetVertexAttribIuiv)"\n" -".set "GLAPI_PREFIX_STR(GetVertexAttribIuiv)", "GLAPI_PREFIX_STR(GetVertexAttribIuivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform1uiEXT))"\n" -"\t"STUB_ASM_CODE("964")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform1ui)"\n" -".set "GLAPI_PREFIX_STR(Uniform1ui)", "GLAPI_PREFIX_STR(Uniform1uiEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform1uivEXT))"\n" -"\t"STUB_ASM_CODE("965")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform1uiv)"\n" -".set "GLAPI_PREFIX_STR(Uniform1uiv)", "GLAPI_PREFIX_STR(Uniform1uivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform2uiEXT))"\n" -"\t"STUB_ASM_CODE("966")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform2ui)"\n" -".set "GLAPI_PREFIX_STR(Uniform2ui)", "GLAPI_PREFIX_STR(Uniform2uiEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform2uivEXT))"\n" -"\t"STUB_ASM_CODE("967")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform2uiv)"\n" -".set "GLAPI_PREFIX_STR(Uniform2uiv)", "GLAPI_PREFIX_STR(Uniform2uivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform3uiEXT))"\n" -"\t"STUB_ASM_CODE("968")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform3ui)"\n" -".set "GLAPI_PREFIX_STR(Uniform3ui)", "GLAPI_PREFIX_STR(Uniform3uiEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform3uivEXT))"\n" -"\t"STUB_ASM_CODE("969")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform3uiv)"\n" -".set "GLAPI_PREFIX_STR(Uniform3uiv)", "GLAPI_PREFIX_STR(Uniform3uivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform4uiEXT))"\n" -"\t"STUB_ASM_CODE("970")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform4ui)"\n" -".set "GLAPI_PREFIX_STR(Uniform4ui)", "GLAPI_PREFIX_STR(Uniform4uiEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(Uniform4uivEXT))"\n" -"\t"STUB_ASM_CODE("971")"\n" - -".globl "GLAPI_PREFIX_STR(Uniform4uiv)"\n" -".set "GLAPI_PREFIX_STR(Uniform4uiv)", "GLAPI_PREFIX_STR(Uniform4uivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI1iEXT))"\n" -"\t"STUB_ASM_CODE("972")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribI1i)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribI1i)", "GLAPI_PREFIX_STR(VertexAttribI1iEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI1ivEXT))"\n" -"\t"STUB_ASM_CODE("973")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribI1iv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribI1iv)", "GLAPI_PREFIX_STR(VertexAttribI1ivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI1uiEXT))"\n" -"\t"STUB_ASM_CODE("974")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribI1ui)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribI1ui)", "GLAPI_PREFIX_STR(VertexAttribI1uiEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI1uivEXT))"\n" -"\t"STUB_ASM_CODE("975")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribI1uiv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribI1uiv)", "GLAPI_PREFIX_STR(VertexAttribI1uivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI2iEXT))"\n" -"\t"STUB_ASM_CODE("976")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribI2i)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribI2i)", "GLAPI_PREFIX_STR(VertexAttribI2iEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI2ivEXT))"\n" -"\t"STUB_ASM_CODE("977")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribI2iv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribI2iv)", "GLAPI_PREFIX_STR(VertexAttribI2ivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI2uiEXT))"\n" -"\t"STUB_ASM_CODE("978")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribI2ui)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribI2ui)", "GLAPI_PREFIX_STR(VertexAttribI2uiEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI2uivEXT))"\n" -"\t"STUB_ASM_CODE("979")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribI2uiv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribI2uiv)", "GLAPI_PREFIX_STR(VertexAttribI2uivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI3iEXT))"\n" -"\t"STUB_ASM_CODE("980")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribI3i)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribI3i)", "GLAPI_PREFIX_STR(VertexAttribI3iEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI3ivEXT))"\n" -"\t"STUB_ASM_CODE("981")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribI3iv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribI3iv)", "GLAPI_PREFIX_STR(VertexAttribI3ivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI3uiEXT))"\n" -"\t"STUB_ASM_CODE("982")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribI3ui)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribI3ui)", "GLAPI_PREFIX_STR(VertexAttribI3uiEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI3uivEXT))"\n" -"\t"STUB_ASM_CODE("983")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribI3uiv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribI3uiv)", "GLAPI_PREFIX_STR(VertexAttribI3uivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI4bvEXT))"\n" -"\t"STUB_ASM_CODE("984")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribI4bv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribI4bv)", "GLAPI_PREFIX_STR(VertexAttribI4bvEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI4iEXT))"\n" -"\t"STUB_ASM_CODE("985")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribI4i)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribI4i)", "GLAPI_PREFIX_STR(VertexAttribI4iEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI4ivEXT))"\n" -"\t"STUB_ASM_CODE("986")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribI4iv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribI4iv)", "GLAPI_PREFIX_STR(VertexAttribI4ivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI4svEXT))"\n" -"\t"STUB_ASM_CODE("987")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribI4sv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribI4sv)", "GLAPI_PREFIX_STR(VertexAttribI4svEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI4ubvEXT))"\n" -"\t"STUB_ASM_CODE("988")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribI4ubv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribI4ubv)", "GLAPI_PREFIX_STR(VertexAttribI4ubvEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI4uiEXT))"\n" -"\t"STUB_ASM_CODE("989")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribI4ui)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribI4ui)", "GLAPI_PREFIX_STR(VertexAttribI4uiEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI4uivEXT))"\n" -"\t"STUB_ASM_CODE("990")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribI4uiv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribI4uiv)", "GLAPI_PREFIX_STR(VertexAttribI4uivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribI4usvEXT))"\n" -"\t"STUB_ASM_CODE("991")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribI4usv)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribI4usv)", "GLAPI_PREFIX_STR(VertexAttribI4usvEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(VertexAttribIPointerEXT))"\n" -"\t"STUB_ASM_CODE("992")"\n" - -".globl "GLAPI_PREFIX_STR(VertexAttribIPointer)"\n" -".set "GLAPI_PREFIX_STR(VertexAttribIPointer)", "GLAPI_PREFIX_STR(VertexAttribIPointerEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(FramebufferTextureLayerEXT))"\n" -"\t"STUB_ASM_CODE("993")"\n" - -".globl "GLAPI_PREFIX_STR(FramebufferTextureLayer)"\n" -".set "GLAPI_PREFIX_STR(FramebufferTextureLayer)", "GLAPI_PREFIX_STR(FramebufferTextureLayerEXT)"\n" - -".globl "GLAPI_PREFIX_STR(FramebufferTextureLayerARB)"\n" -".set "GLAPI_PREFIX_STR(FramebufferTextureLayerARB)", "GLAPI_PREFIX_STR(FramebufferTextureLayerEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ColorMaskIndexedEXT))"\n" -"\t"STUB_ASM_CODE("994")"\n" - -".globl "GLAPI_PREFIX_STR(ColorMaski)"\n" -".set "GLAPI_PREFIX_STR(ColorMaski)", "GLAPI_PREFIX_STR(ColorMaskIndexedEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(DisableIndexedEXT))"\n" -"\t"STUB_ASM_CODE("995")"\n" - -".globl "GLAPI_PREFIX_STR(Disablei)"\n" -".set "GLAPI_PREFIX_STR(Disablei)", "GLAPI_PREFIX_STR(DisableIndexedEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EnableIndexedEXT))"\n" -"\t"STUB_ASM_CODE("996")"\n" - -".globl "GLAPI_PREFIX_STR(Enablei)"\n" -".set "GLAPI_PREFIX_STR(Enablei)", "GLAPI_PREFIX_STR(EnableIndexedEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetBooleanIndexedvEXT))"\n" -"\t"STUB_ASM_CODE("997")"\n" - -".globl "GLAPI_PREFIX_STR(GetBooleani_v)"\n" -".set "GLAPI_PREFIX_STR(GetBooleani_v)", "GLAPI_PREFIX_STR(GetBooleanIndexedvEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetIntegerIndexedvEXT))"\n" -"\t"STUB_ASM_CODE("998")"\n" - -".globl "GLAPI_PREFIX_STR(GetIntegeri_v)"\n" -".set "GLAPI_PREFIX_STR(GetIntegeri_v)", "GLAPI_PREFIX_STR(GetIntegerIndexedvEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(IsEnabledIndexedEXT))"\n" -"\t"STUB_ASM_CODE("999")"\n" - -".globl "GLAPI_PREFIX_STR(IsEnabledi)"\n" -".set "GLAPI_PREFIX_STR(IsEnabledi)", "GLAPI_PREFIX_STR(IsEnabledIndexedEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearColorIiEXT))"\n" -"\t"STUB_ASM_CODE("1000")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ClearColorIuiEXT))"\n" -"\t"STUB_ASM_CODE("1001")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexParameterIivEXT))"\n" -"\t"STUB_ASM_CODE("1002")"\n" - -".globl "GLAPI_PREFIX_STR(GetTexParameterIiv)"\n" -".set "GLAPI_PREFIX_STR(GetTexParameterIiv)", "GLAPI_PREFIX_STR(GetTexParameterIivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTexParameterIuivEXT))"\n" -"\t"STUB_ASM_CODE("1003")"\n" - -".globl "GLAPI_PREFIX_STR(GetTexParameterIuiv)"\n" -".set "GLAPI_PREFIX_STR(GetTexParameterIuiv)", "GLAPI_PREFIX_STR(GetTexParameterIuivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexParameterIivEXT))"\n" -"\t"STUB_ASM_CODE("1004")"\n" - -".globl "GLAPI_PREFIX_STR(TexParameterIiv)"\n" -".set "GLAPI_PREFIX_STR(TexParameterIiv)", "GLAPI_PREFIX_STR(TexParameterIivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TexParameterIuivEXT))"\n" -"\t"STUB_ASM_CODE("1005")"\n" - -".globl "GLAPI_PREFIX_STR(TexParameterIuiv)"\n" -".set "GLAPI_PREFIX_STR(TexParameterIuiv)", "GLAPI_PREFIX_STR(TexParameterIuivEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BeginConditionalRenderNV))"\n" -"\t"STUB_ASM_CODE("1006")"\n" - -".globl "GLAPI_PREFIX_STR(BeginConditionalRender)"\n" -".set "GLAPI_PREFIX_STR(BeginConditionalRender)", "GLAPI_PREFIX_STR(BeginConditionalRenderNV)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EndConditionalRenderNV))"\n" -"\t"STUB_ASM_CODE("1007")"\n" - -".globl "GLAPI_PREFIX_STR(EndConditionalRender)"\n" -".set "GLAPI_PREFIX_STR(EndConditionalRender)", "GLAPI_PREFIX_STR(EndConditionalRenderNV)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BeginTransformFeedbackEXT))"\n" -"\t"STUB_ASM_CODE("1008")"\n" - -".globl "GLAPI_PREFIX_STR(BeginTransformFeedback)"\n" -".set "GLAPI_PREFIX_STR(BeginTransformFeedback)", "GLAPI_PREFIX_STR(BeginTransformFeedbackEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindBufferBaseEXT))"\n" -"\t"STUB_ASM_CODE("1009")"\n" - -".globl "GLAPI_PREFIX_STR(BindBufferBase)"\n" -".set "GLAPI_PREFIX_STR(BindBufferBase)", "GLAPI_PREFIX_STR(BindBufferBaseEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindBufferOffsetEXT))"\n" -"\t"STUB_ASM_CODE("1010")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(BindBufferRangeEXT))"\n" -"\t"STUB_ASM_CODE("1011")"\n" - -".globl "GLAPI_PREFIX_STR(BindBufferRange)"\n" -".set "GLAPI_PREFIX_STR(BindBufferRange)", "GLAPI_PREFIX_STR(BindBufferRangeEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EndTransformFeedbackEXT))"\n" -"\t"STUB_ASM_CODE("1012")"\n" - -".globl "GLAPI_PREFIX_STR(EndTransformFeedback)"\n" -".set "GLAPI_PREFIX_STR(EndTransformFeedback)", "GLAPI_PREFIX_STR(EndTransformFeedbackEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetTransformFeedbackVaryingEXT))"\n" -"\t"STUB_ASM_CODE("1013")"\n" - -".globl "GLAPI_PREFIX_STR(GetTransformFeedbackVarying)"\n" -".set "GLAPI_PREFIX_STR(GetTransformFeedbackVarying)", "GLAPI_PREFIX_STR(GetTransformFeedbackVaryingEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TransformFeedbackVaryingsEXT))"\n" -"\t"STUB_ASM_CODE("1014")"\n" - -".globl "GLAPI_PREFIX_STR(TransformFeedbackVaryings)"\n" -".set "GLAPI_PREFIX_STR(TransformFeedbackVaryings)", "GLAPI_PREFIX_STR(TransformFeedbackVaryingsEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ProvokingVertexEXT))"\n" -"\t"STUB_ASM_CODE("1015")"\n" - -".globl "GLAPI_PREFIX_STR(ProvokingVertex)"\n" -".set "GLAPI_PREFIX_STR(ProvokingVertex)", "GLAPI_PREFIX_STR(ProvokingVertexEXT)"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(GetObjectParameterivAPPLE))"\n" -"\t"STUB_ASM_CODE("1018")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ObjectPurgeableAPPLE))"\n" -"\t"STUB_ASM_CODE("1019")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ObjectUnpurgeableAPPLE))"\n" -"\t"STUB_ASM_CODE("1020")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(ActiveProgramEXT))"\n" -"\t"STUB_ASM_CODE("1021")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(CreateShaderProgramEXT))"\n" -"\t"STUB_ASM_CODE("1022")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(UseShaderProgramEXT))"\n" -"\t"STUB_ASM_CODE("1023")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(TextureBarrierNV))"\n" -"\t"STUB_ASM_CODE("1024")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EGLImageTargetRenderbufferStorageOES))"\n" -"\t"STUB_ASM_CODE("1030")"\n" - -STUB_ASM_ENTRY(GLAPI_PREFIX_STR(EGLImageTargetTexture2DOES))"\n" -"\t"STUB_ASM_CODE("1031")"\n" - -); -#undef MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN -#endif /* MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN */ diff --git a/dll/opengl/mesa/src/mapi/glapi/glapi_nop.c b/dll/opengl/mesa/src/mapi/glapi/glapi_nop.c deleted file mode 100644 index 69b1ae6dd79..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/glapi_nop.c +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.8 - * - * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. - * Copyright (C) 2010 VMware, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/** - * No-op dispatch table. - * - * This file defines a special dispatch table which is loaded with no-op - * functions. - * - * When there's no current rendering context, calling a GL function like - * glBegin() is a no-op. Apps should never normally do this. So as a - * debugging aid, each of the no-op functions will emit a warning to - * stderr if the MESA_DEBUG or LIBGL_DEBUG env var is set. - */ - - - -#include "glapi/glapi_priv.h" - - -void -_glapi_noop_enable_warnings(unsigned char enable) -{ -} - -void -_glapi_set_warning_func(_glapi_proc func) -{ -} - -/* - * When GLAPIENTRY is __stdcall (i.e. Windows), the stack is popped by the - * callee making the number/type of arguments significant. - */ -#if defined(_WIN32) || defined(DEBUG) - -/** - * Called by each of the no-op GL entrypoints. - */ -static int -Warn(const char *func) -{ -#if defined(DEBUG) && !defined(_WIN32_WCE) - if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) { - fprintf(stderr, "GL User Error: gl%s called without a rendering context\n", - func); - } -#endif - return 0; -} - - -/** - * This is called if the user somehow calls an unassigned GL dispatch function. - */ -static GLint -NoOpUnused(void) -{ - return Warn(" function"); -} - -/* - * Defines for the glapitemp.h functions. - */ -#define KEYWORD1 static -#define KEYWORD1_ALT static -#define KEYWORD2 GLAPIENTRY -#define NAME(func) NoOp##func -#define DISPATCH(func, args, msg) Warn(#func); -#define RETURN_DISPATCH(func, args, msg) Warn(#func); return 0 - - -/* - * Defines for the table of no-op entry points. - */ -#define TABLE_ENTRY(name) (_glapi_proc) NoOp##name - -#else - -static int -NoOpGeneric(void) -{ -#if !defined(_WIN32_WCE) - if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) { - fprintf(stderr, "GL User Error: calling GL function without a rendering context\n"); - } -#endif - return 0; -} - -#define TABLE_ENTRY(name) (_glapi_proc) NoOpGeneric - -#endif - -#define DISPATCH_TABLE_NAME __glapi_noop_table -#define UNUSED_TABLE_NAME __unused_noop_functions - -#include "glapi/glapitemp.h" diff --git a/dll/opengl/mesa/src/mapi/glapi/glapi_priv.h b/dll/opengl/mesa/src/mapi/glapi/glapi_priv.h deleted file mode 100644 index b6600c5fc9a..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/glapi_priv.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.1 - * - * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#ifndef _GLAPI_PRIV_H -#define _GLAPI_PRIV_H - -#include -#include -#include - -#ifdef HAVE_DIX_CONFIG_H -#include -#include "glapi/mesa.h" -#else /* HAVE_DIX_CONFIG_H */ -#define GL_GLEXT_PROTOTYPES -#include "GL/gl.h" -#include "GL/glext.h" - -/* The define of GL_COVERAGE_SAMPLES_NV in gl2ext.h is guarded by a different - * extension (GL_NV_coverage_sample) than in glext.h - * (GL_NV_multisample_coverage). Just undefine it to avoid spurious compiler - * warnings. - */ -#undef GL_COVERAGE_SAMPLES_NV - -#include "GLES2/gl2platform.h" -#include "GLES2/gl2ext.h" - -#ifndef GL_OES_fixed_point -typedef int GLfixed; -typedef int GLclampx; -#endif - -#ifndef GL_OES_EGL_image -typedef void *GLeglImageOES; -#endif - -#endif /* HAVE_DIX_CONFIG_H */ - -#include "glapi/glapi.h" - - -/* getproc */ - -extern void -_glapi_check_table_not_null(const struct _glapi_table *table); - - -extern void -_glapi_check_table(const struct _glapi_table *table); - - -/* entrypoint */ - -extern void -init_glapi_relocs_once(void); - - -extern _glapi_proc -generate_entrypoint(unsigned int functionOffset); - - -extern void -fill_in_entrypoint_offset(_glapi_proc entrypoint, unsigned int offset); - - -extern _glapi_proc -get_entrypoint_address(unsigned int functionOffset); - - -/** - * Size (in bytes) of dispatch function (entrypoint). - */ -#if defined(USE_X86_ASM) -# if defined(GLX_USE_TLS) -# define DISPATCH_FUNCTION_SIZE 16 -# elif defined(THREADS) -# define DISPATCH_FUNCTION_SIZE 32 -# else -# define DISPATCH_FUNCTION_SIZE 16 -# endif -#endif - -#if defined(USE_X64_64_ASM) -# if defined(GLX_USE_TLS) -# define DISPATCH_FUNCTION_SIZE 16 -# endif -#endif - - -/** - * Number of extension functions which we can dynamically add at runtime. - * - * Number of extension functions is also subject to the size of backing exec - * mem we allocate. For the common case of dispatch stubs with size 16 bytes, - * the two limits will be hit simultaneously. For larger dispatch function - * sizes, MAX_EXTENSION_FUNCS is effectively reduced. - */ -#define MAX_EXTENSION_FUNCS 256 - - -#endif diff --git a/dll/opengl/mesa/src/mapi/glapi/glapi_sparc.S b/dll/opengl/mesa/src/mapi/glapi/glapi_sparc.S deleted file mode 100644 index 004ea9f223e..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/glapi_sparc.S +++ /dev/null @@ -1,1607 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by gl_SPARC_asm.py (from Mesa) script */ - -/* - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL, IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifdef __arch64__ -#define GL_OFF(N) ((N) * 8) -#define GL_LL ldx -#define GL_TIE_LD(SYM) %tie_ldx(SYM) -#define GL_STACK_SIZE 128 -#else -#define GL_OFF(N) ((N) * 4) -#define GL_LL ld -#define GL_TIE_LD(SYM) %tie_ld(SYM) -#define GL_STACK_SIZE 64 -#endif - -#define GLOBL_FN(x) .globl x ; .type x, @function -#define HIDDEN(x) .hidden x - - .register %g2, #scratch - .register %g3, #scratch - - .text - - GLOBL_FN(__glapi_sparc_icache_flush) - HIDDEN(__glapi_sparc_icache_flush) - .type __glapi_sparc_icache_flush, @function -__glapi_sparc_icache_flush: /* %o0 = insn_addr */ - flush %o0 - retl - nop - - .align 32 - - .type __glapi_sparc_get_pc, @function -__glapi_sparc_get_pc: - retl - add %o7, %g2, %g2 - .size __glapi_sparc_get_pc, .-__glapi_sparc_get_pc - -#ifdef GLX_USE_TLS - - GLOBL_FN(__glapi_sparc_get_dispatch) - HIDDEN(__glapi_sparc_get_dispatch) -__glapi_sparc_get_dispatch: - mov %o7, %g1 - sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %g2 - call __glapi_sparc_get_pc - add %g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2 - mov %g1, %o7 - sethi %tie_hi22(_glapi_tls_Dispatch), %g1 - add %g1, %tie_lo10(_glapi_tls_Dispatch), %g1 - GL_LL [%g2 + %g1], %g2, GL_TIE_LD(_glapi_tls_Dispatch) - retl - mov %g2, %o0 - - .data - .align 32 - - /* --> sethi %hi(_glapi_tls_Dispatch), %g1 */ - /* --> or %g1, %lo(_glapi_tls_Dispatch), %g1 */ - GLOBL_FN(__glapi_sparc_tls_stub) - HIDDEN(__glapi_sparc_tls_stub) -__glapi_sparc_tls_stub: /* Call offset in %g3 */ - mov %o7, %g1 - sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %g2 - call __glapi_sparc_get_pc - add %g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2 - mov %g1, %o7 - srl %g3, 10, %g3 - sethi %tie_hi22(_glapi_tls_Dispatch), %g1 - add %g1, %tie_lo10(_glapi_tls_Dispatch), %g1 - GL_LL [%g2 + %g1], %g2, GL_TIE_LD(_glapi_tls_Dispatch) - GL_LL [%g7+%g2], %g1 - GL_LL [%g1 + %g3], %g1 - jmp %g1 - nop - .size __glapi_sparc_tls_stub, .-__glapi_sparc_tls_stub - -#define GL_STUB(fn, off) \ - GLOBL_FN(fn); \ -fn: ba __glapi_sparc_tls_stub; \ - sethi GL_OFF(off), %g3; \ - .size fn,.-fn; - -#elif defined(PTHREADS) - - /* 64-bit 0x00 --> sethi %hh(_glapi_Dispatch), %g1 */ - /* 64-bit 0x04 --> sethi %lm(_glapi_Dispatch), %g2 */ - /* 64-bit 0x08 --> or %g1, %hm(_glapi_Dispatch), %g1 */ - /* 64-bit 0x0c --> sllx %g1, 32, %g1 */ - /* 64-bit 0x10 --> add %g1, %g2, %g1 */ - /* 64-bit 0x14 --> ldx [%g1 + %lo(_glapi_Dispatch)], %g1 */ - - /* 32-bit 0x00 --> sethi %hi(_glapi_Dispatch), %g1 */ - /* 32-bit 0x04 --> ld [%g1 + %lo(_glapi_Dispatch)], %g1 */ - - .data - .align 32 - - GLOBL_FN(__glapi_sparc_pthread_stub) - HIDDEN(__glapi_sparc_pthread_stub) -__glapi_sparc_pthread_stub: /* Call offset in %g3 */ - mov %o7, %g1 - sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %g2 - call __glapi_sparc_get_pc - add %g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2 - mov %g1, %o7 - sethi %hi(_glapi_Dispatch), %g1 - or %g1, %lo(_glapi_Dispatch), %g1 - srl %g3, 10, %g3 - GL_LL [%g2+%g1], %g2 - GL_LL [%g2], %g1 - cmp %g1, 0 - be 2f - nop -1: GL_LL [%g1 + %g3], %g1 - jmp %g1 - nop -2: save %sp, GL_STACK_SIZE, %sp - mov %g3, %l0 - call _glapi_get_dispatch - nop - mov %o0, %g1 - mov %l0, %g3 - ba 1b - restore %g0, %g0, %g0 - .size __glapi_sparc_pthread_stub, .-__glapi_sparc_pthread_stub - -#define GL_STUB(fn, off) \ - GLOBL_FN(fn); \ -fn: ba __glapi_sparc_pthread_stub; \ - sethi GL_OFF(off), %g3; \ - .size fn,.-fn; - -#else /* Non-threaded version. */ - - .type __glapi_sparc_nothread_stub, @function -__glapi_sparc_nothread_stub: /* Call offset in %g3 */ - mov %o7, %g1 - sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %g2 - call __glapi_sparc_get_pc - add %g2, %lo(_GLOBAL_OFFSET_TABLE_+4), %g2 - mov %g1, %o7 - srl %g3, 10, %g3 - sethi %hi(_glapi_Dispatch), %g1 - or %g1, %lo(_glapi_Dispatch), %g1 - GL_LL [%g2+%g1], %g2 - GL_LL [%g2], %g1 - GL_LL [%g1 + %g3], %g1 - jmp %g1 - nop - .size __glapi_sparc_nothread_stub, .-__glapi_sparc_nothread_stub - -#define GL_STUB(fn, off) \ - GLOBL_FN(fn); \ -fn: ba __glapi_sparc_nothread_stub; \ - sethi GL_OFF(off), %g3; \ - .size fn,.-fn; - -#endif - -#define GL_STUB_ALIAS(fn, alias) \ - .globl fn; \ - .set fn, alias - - .text - .align 32 - - .globl gl_dispatch_functions_start - HIDDEN(gl_dispatch_functions_start) -gl_dispatch_functions_start: - - GL_STUB(glNewList, 0) - GL_STUB(glEndList, 1) - GL_STUB(glCallList, 2) - GL_STUB(glCallLists, 3) - GL_STUB(glDeleteLists, 4) - GL_STUB(glGenLists, 5) - GL_STUB(glListBase, 6) - GL_STUB(glBegin, 7) - GL_STUB(glBitmap, 8) - GL_STUB(glColor3b, 9) - GL_STUB(glColor3bv, 10) - GL_STUB(glColor3d, 11) - GL_STUB(glColor3dv, 12) - GL_STUB(glColor3f, 13) - GL_STUB(glColor3fv, 14) - GL_STUB(glColor3i, 15) - GL_STUB(glColor3iv, 16) - GL_STUB(glColor3s, 17) - GL_STUB(glColor3sv, 18) - GL_STUB(glColor3ub, 19) - GL_STUB(glColor3ubv, 20) - GL_STUB(glColor3ui, 21) - GL_STUB(glColor3uiv, 22) - GL_STUB(glColor3us, 23) - GL_STUB(glColor3usv, 24) - GL_STUB(glColor4b, 25) - GL_STUB(glColor4bv, 26) - GL_STUB(glColor4d, 27) - GL_STUB(glColor4dv, 28) - GL_STUB(glColor4f, 29) - GL_STUB(glColor4fv, 30) - GL_STUB(glColor4i, 31) - GL_STUB(glColor4iv, 32) - GL_STUB(glColor4s, 33) - GL_STUB(glColor4sv, 34) - GL_STUB(glColor4ub, 35) - GL_STUB(glColor4ubv, 36) - GL_STUB(glColor4ui, 37) - GL_STUB(glColor4uiv, 38) - GL_STUB(glColor4us, 39) - GL_STUB(glColor4usv, 40) - GL_STUB(glEdgeFlag, 41) - GL_STUB(glEdgeFlagv, 42) - GL_STUB(glEnd, 43) - GL_STUB(glIndexd, 44) - GL_STUB(glIndexdv, 45) - GL_STUB(glIndexf, 46) - GL_STUB(glIndexfv, 47) - GL_STUB(glIndexi, 48) - GL_STUB(glIndexiv, 49) - GL_STUB(glIndexs, 50) - GL_STUB(glIndexsv, 51) - GL_STUB(glNormal3b, 52) - GL_STUB(glNormal3bv, 53) - GL_STUB(glNormal3d, 54) - GL_STUB(glNormal3dv, 55) - GL_STUB(glNormal3f, 56) - GL_STUB(glNormal3fv, 57) - GL_STUB(glNormal3i, 58) - GL_STUB(glNormal3iv, 59) - GL_STUB(glNormal3s, 60) - GL_STUB(glNormal3sv, 61) - GL_STUB(glRasterPos2d, 62) - GL_STUB(glRasterPos2dv, 63) - GL_STUB(glRasterPos2f, 64) - GL_STUB(glRasterPos2fv, 65) - GL_STUB(glRasterPos2i, 66) - GL_STUB(glRasterPos2iv, 67) - GL_STUB(glRasterPos2s, 68) - GL_STUB(glRasterPos2sv, 69) - GL_STUB(glRasterPos3d, 70) - GL_STUB(glRasterPos3dv, 71) - GL_STUB(glRasterPos3f, 72) - GL_STUB(glRasterPos3fv, 73) - GL_STUB(glRasterPos3i, 74) - GL_STUB(glRasterPos3iv, 75) - GL_STUB(glRasterPos3s, 76) - GL_STUB(glRasterPos3sv, 77) - GL_STUB(glRasterPos4d, 78) - GL_STUB(glRasterPos4dv, 79) - GL_STUB(glRasterPos4f, 80) - GL_STUB(glRasterPos4fv, 81) - GL_STUB(glRasterPos4i, 82) - GL_STUB(glRasterPos4iv, 83) - GL_STUB(glRasterPos4s, 84) - GL_STUB(glRasterPos4sv, 85) - GL_STUB(glRectd, 86) - GL_STUB(glRectdv, 87) - GL_STUB(glRectf, 88) - GL_STUB(glRectfv, 89) - GL_STUB(glRecti, 90) - GL_STUB(glRectiv, 91) - GL_STUB(glRects, 92) - GL_STUB(glRectsv, 93) - GL_STUB(glTexCoord1d, 94) - GL_STUB(glTexCoord1dv, 95) - GL_STUB(glTexCoord1f, 96) - GL_STUB(glTexCoord1fv, 97) - GL_STUB(glTexCoord1i, 98) - GL_STUB(glTexCoord1iv, 99) - GL_STUB(glTexCoord1s, 100) - GL_STUB(glTexCoord1sv, 101) - GL_STUB(glTexCoord2d, 102) - GL_STUB(glTexCoord2dv, 103) - GL_STUB(glTexCoord2f, 104) - GL_STUB(glTexCoord2fv, 105) - GL_STUB(glTexCoord2i, 106) - GL_STUB(glTexCoord2iv, 107) - GL_STUB(glTexCoord2s, 108) - GL_STUB(glTexCoord2sv, 109) - GL_STUB(glTexCoord3d, 110) - GL_STUB(glTexCoord3dv, 111) - GL_STUB(glTexCoord3f, 112) - GL_STUB(glTexCoord3fv, 113) - GL_STUB(glTexCoord3i, 114) - GL_STUB(glTexCoord3iv, 115) - GL_STUB(glTexCoord3s, 116) - GL_STUB(glTexCoord3sv, 117) - GL_STUB(glTexCoord4d, 118) - GL_STUB(glTexCoord4dv, 119) - GL_STUB(glTexCoord4f, 120) - GL_STUB(glTexCoord4fv, 121) - GL_STUB(glTexCoord4i, 122) - GL_STUB(glTexCoord4iv, 123) - GL_STUB(glTexCoord4s, 124) - GL_STUB(glTexCoord4sv, 125) - GL_STUB(glVertex2d, 126) - GL_STUB(glVertex2dv, 127) - GL_STUB(glVertex2f, 128) - GL_STUB(glVertex2fv, 129) - GL_STUB(glVertex2i, 130) - GL_STUB(glVertex2iv, 131) - GL_STUB(glVertex2s, 132) - GL_STUB(glVertex2sv, 133) - GL_STUB(glVertex3d, 134) - GL_STUB(glVertex3dv, 135) - GL_STUB(glVertex3f, 136) - GL_STUB(glVertex3fv, 137) - GL_STUB(glVertex3i, 138) - GL_STUB(glVertex3iv, 139) - GL_STUB(glVertex3s, 140) - GL_STUB(glVertex3sv, 141) - GL_STUB(glVertex4d, 142) - GL_STUB(glVertex4dv, 143) - GL_STUB(glVertex4f, 144) - GL_STUB(glVertex4fv, 145) - GL_STUB(glVertex4i, 146) - GL_STUB(glVertex4iv, 147) - GL_STUB(glVertex4s, 148) - GL_STUB(glVertex4sv, 149) - GL_STUB(glClipPlane, 150) - GL_STUB(glColorMaterial, 151) - GL_STUB(glCullFace, 152) - GL_STUB(glFogf, 153) - GL_STUB(glFogfv, 154) - GL_STUB(glFogi, 155) - GL_STUB(glFogiv, 156) - GL_STUB(glFrontFace, 157) - GL_STUB(glHint, 158) - GL_STUB(glLightf, 159) - GL_STUB(glLightfv, 160) - GL_STUB(glLighti, 161) - GL_STUB(glLightiv, 162) - GL_STUB(glLightModelf, 163) - GL_STUB(glLightModelfv, 164) - GL_STUB(glLightModeli, 165) - GL_STUB(glLightModeliv, 166) - GL_STUB(glLineStipple, 167) - GL_STUB(glLineWidth, 168) - GL_STUB(glMaterialf, 169) - GL_STUB(glMaterialfv, 170) - GL_STUB(glMateriali, 171) - GL_STUB(glMaterialiv, 172) - GL_STUB(glPointSize, 173) - GL_STUB(glPolygonMode, 174) - GL_STUB(glPolygonStipple, 175) - GL_STUB(glScissor, 176) - GL_STUB(glShadeModel, 177) - GL_STUB(glTexParameterf, 178) - GL_STUB(glTexParameterfv, 179) - GL_STUB(glTexParameteri, 180) - GL_STUB(glTexParameteriv, 181) - GL_STUB(glTexImage1D, 182) - GL_STUB(glTexImage2D, 183) - GL_STUB(glTexEnvf, 184) - GL_STUB(glTexEnvfv, 185) - GL_STUB(glTexEnvi, 186) - GL_STUB(glTexEnviv, 187) - GL_STUB(glTexGend, 188) - GL_STUB(glTexGendv, 189) - GL_STUB(glTexGenf, 190) - GL_STUB(glTexGenfv, 191) - GL_STUB(glTexGeni, 192) - GL_STUB(glTexGeniv, 193) - GL_STUB(glFeedbackBuffer, 194) - GL_STUB(glSelectBuffer, 195) - GL_STUB(glRenderMode, 196) - GL_STUB(glInitNames, 197) - GL_STUB(glLoadName, 198) - GL_STUB(glPassThrough, 199) - GL_STUB(glPopName, 200) - GL_STUB(glPushName, 201) - GL_STUB(glDrawBuffer, 202) - GL_STUB(glClear, 203) - GL_STUB(glClearAccum, 204) - GL_STUB(glClearIndex, 205) - GL_STUB(glClearColor, 206) - GL_STUB(glClearStencil, 207) - GL_STUB(glClearDepth, 208) - GL_STUB(glStencilMask, 209) - GL_STUB(glColorMask, 210) - GL_STUB(glDepthMask, 211) - GL_STUB(glIndexMask, 212) - GL_STUB(glAccum, 213) - GL_STUB(glDisable, 214) - GL_STUB(glEnable, 215) - GL_STUB(glFinish, 216) - GL_STUB(glFlush, 217) - GL_STUB(glPopAttrib, 218) - GL_STUB(glPushAttrib, 219) - GL_STUB(glMap1d, 220) - GL_STUB(glMap1f, 221) - GL_STUB(glMap2d, 222) - GL_STUB(glMap2f, 223) - GL_STUB(glMapGrid1d, 224) - GL_STUB(glMapGrid1f, 225) - GL_STUB(glMapGrid2d, 226) - GL_STUB(glMapGrid2f, 227) - GL_STUB(glEvalCoord1d, 228) - GL_STUB(glEvalCoord1dv, 229) - GL_STUB(glEvalCoord1f, 230) - GL_STUB(glEvalCoord1fv, 231) - GL_STUB(glEvalCoord2d, 232) - GL_STUB(glEvalCoord2dv, 233) - GL_STUB(glEvalCoord2f, 234) - GL_STUB(glEvalCoord2fv, 235) - GL_STUB(glEvalMesh1, 236) - GL_STUB(glEvalPoint1, 237) - GL_STUB(glEvalMesh2, 238) - GL_STUB(glEvalPoint2, 239) - GL_STUB(glAlphaFunc, 240) - GL_STUB(glBlendFunc, 241) - GL_STUB(glLogicOp, 242) - GL_STUB(glStencilFunc, 243) - GL_STUB(glStencilOp, 244) - GL_STUB(glDepthFunc, 245) - GL_STUB(glPixelZoom, 246) - GL_STUB(glPixelTransferf, 247) - GL_STUB(glPixelTransferi, 248) - GL_STUB(glPixelStoref, 249) - GL_STUB(glPixelStorei, 250) - GL_STUB(glPixelMapfv, 251) - GL_STUB(glPixelMapuiv, 252) - GL_STUB(glPixelMapusv, 253) - GL_STUB(glReadBuffer, 254) - GL_STUB(glCopyPixels, 255) - GL_STUB(glReadPixels, 256) - GL_STUB(glDrawPixels, 257) - GL_STUB(glGetBooleanv, 258) - GL_STUB(glGetClipPlane, 259) - GL_STUB(glGetDoublev, 260) - GL_STUB(glGetError, 261) - GL_STUB(glGetFloatv, 262) - GL_STUB(glGetIntegerv, 263) - GL_STUB(glGetLightfv, 264) - GL_STUB(glGetLightiv, 265) - GL_STUB(glGetMapdv, 266) - GL_STUB(glGetMapfv, 267) - GL_STUB(glGetMapiv, 268) - GL_STUB(glGetMaterialfv, 269) - GL_STUB(glGetMaterialiv, 270) - GL_STUB(glGetPixelMapfv, 271) - GL_STUB(glGetPixelMapuiv, 272) - GL_STUB(glGetPixelMapusv, 273) - GL_STUB(glGetPolygonStipple, 274) - GL_STUB(glGetString, 275) - GL_STUB(glGetTexEnvfv, 276) - GL_STUB(glGetTexEnviv, 277) - GL_STUB(glGetTexGendv, 278) - GL_STUB(glGetTexGenfv, 279) - GL_STUB(glGetTexGeniv, 280) - GL_STUB(glGetTexImage, 281) - GL_STUB(glGetTexParameterfv, 282) - GL_STUB(glGetTexParameteriv, 283) - GL_STUB(glGetTexLevelParameterfv, 284) - GL_STUB(glGetTexLevelParameteriv, 285) - GL_STUB(glIsEnabled, 286) - GL_STUB(glIsList, 287) - GL_STUB(glDepthRange, 288) - GL_STUB(glFrustum, 289) - GL_STUB(glLoadIdentity, 290) - GL_STUB(glLoadMatrixf, 291) - GL_STUB(glLoadMatrixd, 292) - GL_STUB(glMatrixMode, 293) - GL_STUB(glMultMatrixf, 294) - GL_STUB(glMultMatrixd, 295) - GL_STUB(glOrtho, 296) - GL_STUB(glPopMatrix, 297) - GL_STUB(glPushMatrix, 298) - GL_STUB(glRotated, 299) - GL_STUB(glRotatef, 300) - GL_STUB(glScaled, 301) - GL_STUB(glScalef, 302) - GL_STUB(glTranslated, 303) - GL_STUB(glTranslatef, 304) - GL_STUB(glViewport, 305) - GL_STUB(glArrayElement, 306) - GL_STUB(glBindTexture, 307) - GL_STUB(glColorPointer, 308) - GL_STUB(glDisableClientState, 309) - GL_STUB(glDrawArrays, 310) - GL_STUB(glDrawElements, 311) - GL_STUB(glEdgeFlagPointer, 312) - GL_STUB(glEnableClientState, 313) - GL_STUB(glIndexPointer, 314) - GL_STUB(glIndexub, 315) - GL_STUB(glIndexubv, 316) - GL_STUB(glInterleavedArrays, 317) - GL_STUB(glNormalPointer, 318) - GL_STUB(glPolygonOffset, 319) - GL_STUB(glTexCoordPointer, 320) - GL_STUB(glVertexPointer, 321) - GL_STUB(glAreTexturesResident, 322) - GL_STUB(glCopyTexImage1D, 323) - GL_STUB(glCopyTexImage2D, 324) - GL_STUB(glCopyTexSubImage1D, 325) - GL_STUB(glCopyTexSubImage2D, 326) - GL_STUB(glDeleteTextures, 327) - GL_STUB(glGenTextures, 328) - GL_STUB(glGetPointerv, 329) - GL_STUB(glIsTexture, 330) - GL_STUB(glPrioritizeTextures, 331) - GL_STUB(glTexSubImage1D, 332) - GL_STUB(glTexSubImage2D, 333) - GL_STUB(glPopClientAttrib, 334) - GL_STUB(glPushClientAttrib, 335) - GL_STUB(glBlendColor, 336) - GL_STUB(glBlendEquation, 337) - GL_STUB(glDrawRangeElements, 338) - GL_STUB(glColorTable, 339) - GL_STUB(glColorTableParameterfv, 340) - GL_STUB(glColorTableParameteriv, 341) - GL_STUB(glCopyColorTable, 342) - GL_STUB(glGetColorTable, 343) - GL_STUB(glGetColorTableParameterfv, 344) - GL_STUB(glGetColorTableParameteriv, 345) - GL_STUB(glColorSubTable, 346) - GL_STUB(glCopyColorSubTable, 347) - GL_STUB(glConvolutionFilter1D, 348) - GL_STUB(glConvolutionFilter2D, 349) - GL_STUB(glConvolutionParameterf, 350) - GL_STUB(glConvolutionParameterfv, 351) - GL_STUB(glConvolutionParameteri, 352) - GL_STUB(glConvolutionParameteriv, 353) - GL_STUB(glCopyConvolutionFilter1D, 354) - GL_STUB(glCopyConvolutionFilter2D, 355) - GL_STUB(glGetConvolutionFilter, 356) - GL_STUB(glGetConvolutionParameterfv, 357) - GL_STUB(glGetConvolutionParameteriv, 358) - GL_STUB(glGetSeparableFilter, 359) - GL_STUB(glSeparableFilter2D, 360) - GL_STUB(glGetHistogram, 361) - GL_STUB(glGetHistogramParameterfv, 362) - GL_STUB(glGetHistogramParameteriv, 363) - GL_STUB(glGetMinmax, 364) - GL_STUB(glGetMinmaxParameterfv, 365) - GL_STUB(glGetMinmaxParameteriv, 366) - GL_STUB(glHistogram, 367) - GL_STUB(glMinmax, 368) - GL_STUB(glResetHistogram, 369) - GL_STUB(glResetMinmax, 370) - GL_STUB(glTexImage3D, 371) - GL_STUB(glTexSubImage3D, 372) - GL_STUB(glCopyTexSubImage3D, 373) - GL_STUB(glActiveTextureARB, 374) - GL_STUB(glClientActiveTextureARB, 375) - GL_STUB(glMultiTexCoord1dARB, 376) - GL_STUB(glMultiTexCoord1dvARB, 377) - GL_STUB(glMultiTexCoord1fARB, 378) - GL_STUB(glMultiTexCoord1fvARB, 379) - GL_STUB(glMultiTexCoord1iARB, 380) - GL_STUB(glMultiTexCoord1ivARB, 381) - GL_STUB(glMultiTexCoord1sARB, 382) - GL_STUB(glMultiTexCoord1svARB, 383) - GL_STUB(glMultiTexCoord2dARB, 384) - GL_STUB(glMultiTexCoord2dvARB, 385) - GL_STUB(glMultiTexCoord2fARB, 386) - GL_STUB(glMultiTexCoord2fvARB, 387) - GL_STUB(glMultiTexCoord2iARB, 388) - GL_STUB(glMultiTexCoord2ivARB, 389) - GL_STUB(glMultiTexCoord2sARB, 390) - GL_STUB(glMultiTexCoord2svARB, 391) - GL_STUB(glMultiTexCoord3dARB, 392) - GL_STUB(glMultiTexCoord3dvARB, 393) - GL_STUB(glMultiTexCoord3fARB, 394) - GL_STUB(glMultiTexCoord3fvARB, 395) - GL_STUB(glMultiTexCoord3iARB, 396) - GL_STUB(glMultiTexCoord3ivARB, 397) - GL_STUB(glMultiTexCoord3sARB, 398) - GL_STUB(glMultiTexCoord3svARB, 399) - GL_STUB(glMultiTexCoord4dARB, 400) - GL_STUB(glMultiTexCoord4dvARB, 401) - GL_STUB(glMultiTexCoord4fARB, 402) - GL_STUB(glMultiTexCoord4fvARB, 403) - GL_STUB(glMultiTexCoord4iARB, 404) - GL_STUB(glMultiTexCoord4ivARB, 405) - GL_STUB(glMultiTexCoord4sARB, 406) - GL_STUB(glMultiTexCoord4svARB, 407) - GL_STUB(glAttachShader, 408) - GL_STUB(glCreateProgram, 409) - GL_STUB(glCreateShader, 410) - GL_STUB(glDeleteProgram, 411) - GL_STUB(glDeleteShader, 412) - GL_STUB(glDetachShader, 413) - GL_STUB(glGetAttachedShaders, 414) - GL_STUB(glGetProgramInfoLog, 415) - GL_STUB(glGetProgramiv, 416) - GL_STUB(glGetShaderInfoLog, 417) - GL_STUB(glGetShaderiv, 418) - GL_STUB(glIsProgram, 419) - GL_STUB(glIsShader, 420) - GL_STUB(glStencilFuncSeparate, 421) - GL_STUB(glStencilMaskSeparate, 422) - GL_STUB(glStencilOpSeparate, 423) - GL_STUB(glUniformMatrix2x3fv, 424) - GL_STUB(glUniformMatrix2x4fv, 425) - GL_STUB(glUniformMatrix3x2fv, 426) - GL_STUB(glUniformMatrix3x4fv, 427) - GL_STUB(glUniformMatrix4x2fv, 428) - GL_STUB(glUniformMatrix4x3fv, 429) - GL_STUB(glClampColor, 430) - GL_STUB(glClearBufferfi, 431) - GL_STUB(glClearBufferfv, 432) - GL_STUB(glClearBufferiv, 433) - GL_STUB(glClearBufferuiv, 434) - GL_STUB(glGetStringi, 435) - GL_STUB(glTexBuffer, 436) - GL_STUB(glFramebufferTexture, 437) - GL_STUB(glGetBufferParameteri64v, 438) - GL_STUB(glGetInteger64i_v, 439) - GL_STUB(glVertexAttribDivisor, 440) - GL_STUB(glLoadTransposeMatrixdARB, 441) - GL_STUB(glLoadTransposeMatrixfARB, 442) - GL_STUB(glMultTransposeMatrixdARB, 443) - GL_STUB(glMultTransposeMatrixfARB, 444) - GL_STUB(glSampleCoverageARB, 445) - GL_STUB(glCompressedTexImage1DARB, 446) - GL_STUB(glCompressedTexImage2DARB, 447) - GL_STUB(glCompressedTexImage3DARB, 448) - GL_STUB(glCompressedTexSubImage1DARB, 449) - GL_STUB(glCompressedTexSubImage2DARB, 450) - GL_STUB(glCompressedTexSubImage3DARB, 451) - GL_STUB(glGetCompressedTexImageARB, 452) - GL_STUB(glDisableVertexAttribArrayARB, 453) - GL_STUB(glEnableVertexAttribArrayARB, 454) - GL_STUB(glGetProgramEnvParameterdvARB, 455) - GL_STUB(glGetProgramEnvParameterfvARB, 456) - GL_STUB(glGetProgramLocalParameterdvARB, 457) - GL_STUB(glGetProgramLocalParameterfvARB, 458) - GL_STUB(glGetProgramStringARB, 459) - GL_STUB(glGetProgramivARB, 460) - GL_STUB(glGetVertexAttribdvARB, 461) - GL_STUB(glGetVertexAttribfvARB, 462) - GL_STUB(glGetVertexAttribivARB, 463) - GL_STUB(glProgramEnvParameter4dARB, 464) - GL_STUB(glProgramEnvParameter4dvARB, 465) - GL_STUB(glProgramEnvParameter4fARB, 466) - GL_STUB(glProgramEnvParameter4fvARB, 467) - GL_STUB(glProgramLocalParameter4dARB, 468) - GL_STUB(glProgramLocalParameter4dvARB, 469) - GL_STUB(glProgramLocalParameter4fARB, 470) - GL_STUB(glProgramLocalParameter4fvARB, 471) - GL_STUB(glProgramStringARB, 472) - GL_STUB(glVertexAttrib1dARB, 473) - GL_STUB(glVertexAttrib1dvARB, 474) - GL_STUB(glVertexAttrib1fARB, 475) - GL_STUB(glVertexAttrib1fvARB, 476) - GL_STUB(glVertexAttrib1sARB, 477) - GL_STUB(glVertexAttrib1svARB, 478) - GL_STUB(glVertexAttrib2dARB, 479) - GL_STUB(glVertexAttrib2dvARB, 480) - GL_STUB(glVertexAttrib2fARB, 481) - GL_STUB(glVertexAttrib2fvARB, 482) - GL_STUB(glVertexAttrib2sARB, 483) - GL_STUB(glVertexAttrib2svARB, 484) - GL_STUB(glVertexAttrib3dARB, 485) - GL_STUB(glVertexAttrib3dvARB, 486) - GL_STUB(glVertexAttrib3fARB, 487) - GL_STUB(glVertexAttrib3fvARB, 488) - GL_STUB(glVertexAttrib3sARB, 489) - GL_STUB(glVertexAttrib3svARB, 490) - GL_STUB(glVertexAttrib4NbvARB, 491) - GL_STUB(glVertexAttrib4NivARB, 492) - GL_STUB(glVertexAttrib4NsvARB, 493) - GL_STUB(glVertexAttrib4NubARB, 494) - GL_STUB(glVertexAttrib4NubvARB, 495) - GL_STUB(glVertexAttrib4NuivARB, 496) - GL_STUB(glVertexAttrib4NusvARB, 497) - GL_STUB(glVertexAttrib4bvARB, 498) - GL_STUB(glVertexAttrib4dARB, 499) - GL_STUB(glVertexAttrib4dvARB, 500) - GL_STUB(glVertexAttrib4fARB, 501) - GL_STUB(glVertexAttrib4fvARB, 502) - GL_STUB(glVertexAttrib4ivARB, 503) - GL_STUB(glVertexAttrib4sARB, 504) - GL_STUB(glVertexAttrib4svARB, 505) - GL_STUB(glVertexAttrib4ubvARB, 506) - GL_STUB(glVertexAttrib4uivARB, 507) - GL_STUB(glVertexAttrib4usvARB, 508) - GL_STUB(glVertexAttribPointerARB, 509) - GL_STUB(glBindBufferARB, 510) - GL_STUB(glBufferDataARB, 511) - GL_STUB(glBufferSubDataARB, 512) - GL_STUB(glDeleteBuffersARB, 513) - GL_STUB(glGenBuffersARB, 514) - GL_STUB(glGetBufferParameterivARB, 515) - GL_STUB(glGetBufferPointervARB, 516) - GL_STUB(glGetBufferSubDataARB, 517) - GL_STUB(glIsBufferARB, 518) - GL_STUB(glMapBufferARB, 519) - GL_STUB(glUnmapBufferARB, 520) - GL_STUB(glBeginQueryARB, 521) - GL_STUB(glDeleteQueriesARB, 522) - GL_STUB(glEndQueryARB, 523) - GL_STUB(glGenQueriesARB, 524) - GL_STUB(glGetQueryObjectivARB, 525) - GL_STUB(glGetQueryObjectuivARB, 526) - GL_STUB(glGetQueryivARB, 527) - GL_STUB(glIsQueryARB, 528) - GL_STUB(glAttachObjectARB, 529) - GL_STUB(glCompileShaderARB, 530) - GL_STUB(glCreateProgramObjectARB, 531) - GL_STUB(glCreateShaderObjectARB, 532) - GL_STUB(glDeleteObjectARB, 533) - GL_STUB(glDetachObjectARB, 534) - GL_STUB(glGetActiveUniformARB, 535) - GL_STUB(glGetAttachedObjectsARB, 536) - GL_STUB(glGetHandleARB, 537) - GL_STUB(glGetInfoLogARB, 538) - GL_STUB(glGetObjectParameterfvARB, 539) - GL_STUB(glGetObjectParameterivARB, 540) - GL_STUB(glGetShaderSourceARB, 541) - GL_STUB(glGetUniformLocationARB, 542) - GL_STUB(glGetUniformfvARB, 543) - GL_STUB(glGetUniformivARB, 544) - GL_STUB(glLinkProgramARB, 545) - GL_STUB(glShaderSourceARB, 546) - GL_STUB(glUniform1fARB, 547) - GL_STUB(glUniform1fvARB, 548) - GL_STUB(glUniform1iARB, 549) - GL_STUB(glUniform1ivARB, 550) - GL_STUB(glUniform2fARB, 551) - GL_STUB(glUniform2fvARB, 552) - GL_STUB(glUniform2iARB, 553) - GL_STUB(glUniform2ivARB, 554) - GL_STUB(glUniform3fARB, 555) - GL_STUB(glUniform3fvARB, 556) - GL_STUB(glUniform3iARB, 557) - GL_STUB(glUniform3ivARB, 558) - GL_STUB(glUniform4fARB, 559) - GL_STUB(glUniform4fvARB, 560) - GL_STUB(glUniform4iARB, 561) - GL_STUB(glUniform4ivARB, 562) - GL_STUB(glUniformMatrix2fvARB, 563) - GL_STUB(glUniformMatrix3fvARB, 564) - GL_STUB(glUniformMatrix4fvARB, 565) - GL_STUB(glUseProgramObjectARB, 566) - GL_STUB(glValidateProgramARB, 567) - GL_STUB(glBindAttribLocationARB, 568) - GL_STUB(glGetActiveAttribARB, 569) - GL_STUB(glGetAttribLocationARB, 570) - GL_STUB(glDrawBuffersARB, 571) - GL_STUB(glClampColorARB, 572) - GL_STUB(glDrawArraysInstancedARB, 573) - GL_STUB(glDrawElementsInstancedARB, 574) - GL_STUB(glRenderbufferStorageMultisample, 575) - GL_STUB(glFramebufferTextureARB, 576) - GL_STUB(glFramebufferTextureFaceARB, 577) - GL_STUB(glProgramParameteriARB, 578) - GL_STUB(glVertexAttribDivisorARB, 579) - GL_STUB(glFlushMappedBufferRange, 580) - GL_STUB(glMapBufferRange, 581) - GL_STUB(glTexBufferARB, 582) - GL_STUB(glBindVertexArray, 583) - GL_STUB(glGenVertexArrays, 584) - GL_STUB(glCopyBufferSubData, 585) - GL_STUB(glClientWaitSync, 586) - GL_STUB(glDeleteSync, 587) - GL_STUB(glFenceSync, 588) - GL_STUB(glGetInteger64v, 589) - GL_STUB(glGetSynciv, 590) - GL_STUB(glIsSync, 591) - GL_STUB(glWaitSync, 592) - GL_STUB(glDrawElementsBaseVertex, 593) - GL_STUB(glDrawElementsInstancedBaseVertex, 594) - GL_STUB(glDrawRangeElementsBaseVertex, 595) - GL_STUB(glMultiDrawElementsBaseVertex, 596) - GL_STUB(glBlendEquationSeparateiARB, 597) - GL_STUB(glBlendEquationiARB, 598) - GL_STUB(glBlendFuncSeparateiARB, 599) - GL_STUB(glBlendFunciARB, 600) - GL_STUB(glBindSampler, 601) - GL_STUB(glDeleteSamplers, 602) - GL_STUB(glGenSamplers, 603) - GL_STUB(glGetSamplerParameterIiv, 604) - GL_STUB(glGetSamplerParameterIuiv, 605) - GL_STUB(glGetSamplerParameterfv, 606) - GL_STUB(glGetSamplerParameteriv, 607) - GL_STUB(glIsSampler, 608) - GL_STUB(glSamplerParameterIiv, 609) - GL_STUB(glSamplerParameterIuiv, 610) - GL_STUB(glSamplerParameterf, 611) - GL_STUB(glSamplerParameterfv, 612) - GL_STUB(glSamplerParameteri, 613) - GL_STUB(glSamplerParameteriv, 614) - GL_STUB(glColorP3ui, 615) - GL_STUB(glColorP3uiv, 616) - GL_STUB(glColorP4ui, 617) - GL_STUB(glColorP4uiv, 618) - GL_STUB(glMultiTexCoordP1ui, 619) - GL_STUB(glMultiTexCoordP1uiv, 620) - GL_STUB(glMultiTexCoordP2ui, 621) - GL_STUB(glMultiTexCoordP2uiv, 622) - GL_STUB(glMultiTexCoordP3ui, 623) - GL_STUB(glMultiTexCoordP3uiv, 624) - GL_STUB(glMultiTexCoordP4ui, 625) - GL_STUB(glMultiTexCoordP4uiv, 626) - GL_STUB(glNormalP3ui, 627) - GL_STUB(glNormalP3uiv, 628) - GL_STUB(glSecondaryColorP3ui, 629) - GL_STUB(glSecondaryColorP3uiv, 630) - GL_STUB(glTexCoordP1ui, 631) - GL_STUB(glTexCoordP1uiv, 632) - GL_STUB(glTexCoordP2ui, 633) - GL_STUB(glTexCoordP2uiv, 634) - GL_STUB(glTexCoordP3ui, 635) - GL_STUB(glTexCoordP3uiv, 636) - GL_STUB(glTexCoordP4ui, 637) - GL_STUB(glTexCoordP4uiv, 638) - GL_STUB(glVertexAttribP1ui, 639) - GL_STUB(glVertexAttribP1uiv, 640) - GL_STUB(glVertexAttribP2ui, 641) - GL_STUB(glVertexAttribP2uiv, 642) - GL_STUB(glVertexAttribP3ui, 643) - GL_STUB(glVertexAttribP3uiv, 644) - GL_STUB(glVertexAttribP4ui, 645) - GL_STUB(glVertexAttribP4uiv, 646) - GL_STUB(glVertexP2ui, 647) - GL_STUB(glVertexP2uiv, 648) - GL_STUB(glVertexP3ui, 649) - GL_STUB(glVertexP3uiv, 650) - GL_STUB(glVertexP4ui, 651) - GL_STUB(glVertexP4uiv, 652) - GL_STUB(glBindTransformFeedback, 653) - GL_STUB(glDeleteTransformFeedbacks, 654) - GL_STUB(glDrawTransformFeedback, 655) - GL_STUB(glGenTransformFeedbacks, 656) - GL_STUB(glIsTransformFeedback, 657) - GL_STUB(glPauseTransformFeedback, 658) - GL_STUB(glResumeTransformFeedback, 659) - GL_STUB(glClearDepthf, 660) - GL_STUB(glDepthRangef, 661) - GL_STUB(glGetShaderPrecisionFormat, 662) - GL_STUB(glReleaseShaderCompiler, 663) - GL_STUB(glShaderBinary, 664) - GL_STUB(glGetGraphicsResetStatusARB, 665) - GL_STUB(glGetnColorTableARB, 666) - GL_STUB(glGetnCompressedTexImageARB, 667) - GL_STUB(glGetnConvolutionFilterARB, 668) - GL_STUB(glGetnHistogramARB, 669) - GL_STUB(glGetnMapdvARB, 670) - GL_STUB(glGetnMapfvARB, 671) - GL_STUB(glGetnMapivARB, 672) - GL_STUB(glGetnMinmaxARB, 673) - GL_STUB(glGetnPixelMapfvARB, 674) - GL_STUB(glGetnPixelMapuivARB, 675) - GL_STUB(glGetnPixelMapusvARB, 676) - GL_STUB(glGetnPolygonStippleARB, 677) - GL_STUB(glGetnSeparableFilterARB, 678) - GL_STUB(glGetnTexImageARB, 679) - GL_STUB(glGetnUniformdvARB, 680) - GL_STUB(glGetnUniformfvARB, 681) - GL_STUB(glGetnUniformivARB, 682) - GL_STUB(glGetnUniformuivARB, 683) - GL_STUB(glReadnPixelsARB, 684) - GL_STUB(glTexStorage1D, 685) - GL_STUB(glTexStorage2D, 686) - GL_STUB(glTexStorage3D, 687) - GL_STUB(glTextureStorage1DEXT, 688) - GL_STUB(glTextureStorage2DEXT, 689) - GL_STUB(glTextureStorage3DEXT, 690) - GL_STUB(glPolygonOffsetEXT, 691) - GL_STUB(gl_dispatch_stub_692, 692) - HIDDEN(gl_dispatch_stub_692) - GL_STUB(gl_dispatch_stub_693, 693) - HIDDEN(gl_dispatch_stub_693) - GL_STUB(gl_dispatch_stub_694, 694) - HIDDEN(gl_dispatch_stub_694) - GL_STUB(gl_dispatch_stub_695, 695) - HIDDEN(gl_dispatch_stub_695) - GL_STUB(gl_dispatch_stub_696, 696) - HIDDEN(gl_dispatch_stub_696) - GL_STUB(gl_dispatch_stub_697, 697) - HIDDEN(gl_dispatch_stub_697) - GL_STUB(gl_dispatch_stub_698, 698) - HIDDEN(gl_dispatch_stub_698) - GL_STUB(gl_dispatch_stub_699, 699) - HIDDEN(gl_dispatch_stub_699) - GL_STUB(glColorPointerEXT, 700) - GL_STUB(glEdgeFlagPointerEXT, 701) - GL_STUB(glIndexPointerEXT, 702) - GL_STUB(glNormalPointerEXT, 703) - GL_STUB(glTexCoordPointerEXT, 704) - GL_STUB(glVertexPointerEXT, 705) - GL_STUB(glPointParameterfEXT, 706) - GL_STUB(glPointParameterfvEXT, 707) - GL_STUB(glLockArraysEXT, 708) - GL_STUB(glUnlockArraysEXT, 709) - GL_STUB(glSecondaryColor3bEXT, 710) - GL_STUB(glSecondaryColor3bvEXT, 711) - GL_STUB(glSecondaryColor3dEXT, 712) - GL_STUB(glSecondaryColor3dvEXT, 713) - GL_STUB(glSecondaryColor3fEXT, 714) - GL_STUB(glSecondaryColor3fvEXT, 715) - GL_STUB(glSecondaryColor3iEXT, 716) - GL_STUB(glSecondaryColor3ivEXT, 717) - GL_STUB(glSecondaryColor3sEXT, 718) - GL_STUB(glSecondaryColor3svEXT, 719) - GL_STUB(glSecondaryColor3ubEXT, 720) - GL_STUB(glSecondaryColor3ubvEXT, 721) - GL_STUB(glSecondaryColor3uiEXT, 722) - GL_STUB(glSecondaryColor3uivEXT, 723) - GL_STUB(glSecondaryColor3usEXT, 724) - GL_STUB(glSecondaryColor3usvEXT, 725) - GL_STUB(glSecondaryColorPointerEXT, 726) - GL_STUB(glMultiDrawArraysEXT, 727) - GL_STUB(glMultiDrawElementsEXT, 728) - GL_STUB(glFogCoordPointerEXT, 729) - GL_STUB(glFogCoorddEXT, 730) - GL_STUB(glFogCoorddvEXT, 731) - GL_STUB(glFogCoordfEXT, 732) - GL_STUB(glFogCoordfvEXT, 733) - GL_STUB(gl_dispatch_stub_734, 734) - HIDDEN(gl_dispatch_stub_734) - GL_STUB(glBlendFuncSeparateEXT, 735) - GL_STUB(glFlushVertexArrayRangeNV, 736) - GL_STUB(glVertexArrayRangeNV, 737) - GL_STUB(glCombinerInputNV, 738) - GL_STUB(glCombinerOutputNV, 739) - GL_STUB(glCombinerParameterfNV, 740) - GL_STUB(glCombinerParameterfvNV, 741) - GL_STUB(glCombinerParameteriNV, 742) - GL_STUB(glCombinerParameterivNV, 743) - GL_STUB(glFinalCombinerInputNV, 744) - GL_STUB(glGetCombinerInputParameterfvNV, 745) - GL_STUB(glGetCombinerInputParameterivNV, 746) - GL_STUB(glGetCombinerOutputParameterfvNV, 747) - GL_STUB(glGetCombinerOutputParameterivNV, 748) - GL_STUB(glGetFinalCombinerInputParameterfvNV, 749) - GL_STUB(glGetFinalCombinerInputParameterivNV, 750) - GL_STUB(glResizeBuffersMESA, 751) - GL_STUB(glWindowPos2dMESA, 752) - GL_STUB(glWindowPos2dvMESA, 753) - GL_STUB(glWindowPos2fMESA, 754) - GL_STUB(glWindowPos2fvMESA, 755) - GL_STUB(glWindowPos2iMESA, 756) - GL_STUB(glWindowPos2ivMESA, 757) - GL_STUB(glWindowPos2sMESA, 758) - GL_STUB(glWindowPos2svMESA, 759) - GL_STUB(glWindowPos3dMESA, 760) - GL_STUB(glWindowPos3dvMESA, 761) - GL_STUB(glWindowPos3fMESA, 762) - GL_STUB(glWindowPos3fvMESA, 763) - GL_STUB(glWindowPos3iMESA, 764) - GL_STUB(glWindowPos3ivMESA, 765) - GL_STUB(glWindowPos3sMESA, 766) - GL_STUB(glWindowPos3svMESA, 767) - GL_STUB(glWindowPos4dMESA, 768) - GL_STUB(glWindowPos4dvMESA, 769) - GL_STUB(glWindowPos4fMESA, 770) - GL_STUB(glWindowPos4fvMESA, 771) - GL_STUB(glWindowPos4iMESA, 772) - GL_STUB(glWindowPos4ivMESA, 773) - GL_STUB(glWindowPos4sMESA, 774) - GL_STUB(glWindowPos4svMESA, 775) - GL_STUB(gl_dispatch_stub_776, 776) - HIDDEN(gl_dispatch_stub_776) - GL_STUB(gl_dispatch_stub_777, 777) - HIDDEN(gl_dispatch_stub_777) - GL_STUB(gl_dispatch_stub_778, 778) - HIDDEN(gl_dispatch_stub_778) - GL_STUB(gl_dispatch_stub_779, 779) - HIDDEN(gl_dispatch_stub_779) - GL_STUB(gl_dispatch_stub_780, 780) - HIDDEN(gl_dispatch_stub_780) - GL_STUB(gl_dispatch_stub_781, 781) - HIDDEN(gl_dispatch_stub_781) - GL_STUB(gl_dispatch_stub_782, 782) - HIDDEN(gl_dispatch_stub_782) - GL_STUB(gl_dispatch_stub_783, 783) - HIDDEN(gl_dispatch_stub_783) - GL_STUB(gl_dispatch_stub_784, 784) - HIDDEN(gl_dispatch_stub_784) - GL_STUB(glAreProgramsResidentNV, 785) - GL_STUB(glBindProgramNV, 786) - GL_STUB(glDeleteProgramsNV, 787) - GL_STUB(glExecuteProgramNV, 788) - GL_STUB(glGenProgramsNV, 789) - GL_STUB(glGetProgramParameterdvNV, 790) - GL_STUB(glGetProgramParameterfvNV, 791) - GL_STUB(glGetProgramStringNV, 792) - GL_STUB(glGetProgramivNV, 793) - GL_STUB(glGetTrackMatrixivNV, 794) - GL_STUB(glGetVertexAttribPointervNV, 795) - GL_STUB(glGetVertexAttribdvNV, 796) - GL_STUB(glGetVertexAttribfvNV, 797) - GL_STUB(glGetVertexAttribivNV, 798) - GL_STUB(glIsProgramNV, 799) - GL_STUB(glLoadProgramNV, 800) - GL_STUB(glProgramParameters4dvNV, 801) - GL_STUB(glProgramParameters4fvNV, 802) - GL_STUB(glRequestResidentProgramsNV, 803) - GL_STUB(glTrackMatrixNV, 804) - GL_STUB(glVertexAttrib1dNV, 805) - GL_STUB(glVertexAttrib1dvNV, 806) - GL_STUB(glVertexAttrib1fNV, 807) - GL_STUB(glVertexAttrib1fvNV, 808) - GL_STUB(glVertexAttrib1sNV, 809) - GL_STUB(glVertexAttrib1svNV, 810) - GL_STUB(glVertexAttrib2dNV, 811) - GL_STUB(glVertexAttrib2dvNV, 812) - GL_STUB(glVertexAttrib2fNV, 813) - GL_STUB(glVertexAttrib2fvNV, 814) - GL_STUB(glVertexAttrib2sNV, 815) - GL_STUB(glVertexAttrib2svNV, 816) - GL_STUB(glVertexAttrib3dNV, 817) - GL_STUB(glVertexAttrib3dvNV, 818) - GL_STUB(glVertexAttrib3fNV, 819) - GL_STUB(glVertexAttrib3fvNV, 820) - GL_STUB(glVertexAttrib3sNV, 821) - GL_STUB(glVertexAttrib3svNV, 822) - GL_STUB(glVertexAttrib4dNV, 823) - GL_STUB(glVertexAttrib4dvNV, 824) - GL_STUB(glVertexAttrib4fNV, 825) - GL_STUB(glVertexAttrib4fvNV, 826) - GL_STUB(glVertexAttrib4sNV, 827) - GL_STUB(glVertexAttrib4svNV, 828) - GL_STUB(glVertexAttrib4ubNV, 829) - GL_STUB(glVertexAttrib4ubvNV, 830) - GL_STUB(glVertexAttribPointerNV, 831) - GL_STUB(glVertexAttribs1dvNV, 832) - GL_STUB(glVertexAttribs1fvNV, 833) - GL_STUB(glVertexAttribs1svNV, 834) - GL_STUB(glVertexAttribs2dvNV, 835) - GL_STUB(glVertexAttribs2fvNV, 836) - GL_STUB(glVertexAttribs2svNV, 837) - GL_STUB(glVertexAttribs3dvNV, 838) - GL_STUB(glVertexAttribs3fvNV, 839) - GL_STUB(glVertexAttribs3svNV, 840) - GL_STUB(glVertexAttribs4dvNV, 841) - GL_STUB(glVertexAttribs4fvNV, 842) - GL_STUB(glVertexAttribs4svNV, 843) - GL_STUB(glVertexAttribs4ubvNV, 844) - GL_STUB(glGetTexBumpParameterfvATI, 845) - GL_STUB(glGetTexBumpParameterivATI, 846) - GL_STUB(glTexBumpParameterfvATI, 847) - GL_STUB(glTexBumpParameterivATI, 848) - GL_STUB(glAlphaFragmentOp1ATI, 849) - GL_STUB(glAlphaFragmentOp2ATI, 850) - GL_STUB(glAlphaFragmentOp3ATI, 851) - GL_STUB(glBeginFragmentShaderATI, 852) - GL_STUB(glBindFragmentShaderATI, 853) - GL_STUB(glColorFragmentOp1ATI, 854) - GL_STUB(glColorFragmentOp2ATI, 855) - GL_STUB(glColorFragmentOp3ATI, 856) - GL_STUB(glDeleteFragmentShaderATI, 857) - GL_STUB(glEndFragmentShaderATI, 858) - GL_STUB(glGenFragmentShadersATI, 859) - GL_STUB(glPassTexCoordATI, 860) - GL_STUB(glSampleMapATI, 861) - GL_STUB(glSetFragmentShaderConstantATI, 862) - GL_STUB(glPointParameteriNV, 863) - GL_STUB(glPointParameterivNV, 864) - GL_STUB(gl_dispatch_stub_865, 865) - HIDDEN(gl_dispatch_stub_865) - GL_STUB(gl_dispatch_stub_866, 866) - HIDDEN(gl_dispatch_stub_866) - GL_STUB(gl_dispatch_stub_867, 867) - HIDDEN(gl_dispatch_stub_867) - GL_STUB(gl_dispatch_stub_868, 868) - HIDDEN(gl_dispatch_stub_868) - GL_STUB(gl_dispatch_stub_869, 869) - HIDDEN(gl_dispatch_stub_869) - GL_STUB(glGetProgramNamedParameterdvNV, 870) - GL_STUB(glGetProgramNamedParameterfvNV, 871) - GL_STUB(glProgramNamedParameter4dNV, 872) - GL_STUB(glProgramNamedParameter4dvNV, 873) - GL_STUB(glProgramNamedParameter4fNV, 874) - GL_STUB(glProgramNamedParameter4fvNV, 875) - GL_STUB(glPrimitiveRestartIndexNV, 876) - GL_STUB(glPrimitiveRestartNV, 877) - GL_STUB(gl_dispatch_stub_878, 878) - HIDDEN(gl_dispatch_stub_878) - GL_STUB(gl_dispatch_stub_879, 879) - HIDDEN(gl_dispatch_stub_879) - GL_STUB(glBindFramebufferEXT, 880) - GL_STUB(glBindRenderbufferEXT, 881) - GL_STUB(glCheckFramebufferStatusEXT, 882) - GL_STUB(glDeleteFramebuffersEXT, 883) - GL_STUB(glDeleteRenderbuffersEXT, 884) - GL_STUB(glFramebufferRenderbufferEXT, 885) - GL_STUB(glFramebufferTexture1DEXT, 886) - GL_STUB(glFramebufferTexture2DEXT, 887) - GL_STUB(glFramebufferTexture3DEXT, 888) - GL_STUB(glGenFramebuffersEXT, 889) - GL_STUB(glGenRenderbuffersEXT, 890) - GL_STUB(glGenerateMipmapEXT, 891) - GL_STUB(glGetFramebufferAttachmentParameterivEXT, 892) - GL_STUB(glGetRenderbufferParameterivEXT, 893) - GL_STUB(glIsFramebufferEXT, 894) - GL_STUB(glIsRenderbufferEXT, 895) - GL_STUB(glRenderbufferStorageEXT, 896) - GL_STUB(gl_dispatch_stub_897, 897) - HIDDEN(gl_dispatch_stub_897) - GL_STUB(gl_dispatch_stub_898, 898) - HIDDEN(gl_dispatch_stub_898) - GL_STUB(gl_dispatch_stub_899, 899) - HIDDEN(gl_dispatch_stub_899) - GL_STUB(glBindFragDataLocationEXT, 900) - GL_STUB(glGetFragDataLocationEXT, 901) - GL_STUB(glGetUniformuivEXT, 902) - GL_STUB(glGetVertexAttribIivEXT, 903) - GL_STUB(glGetVertexAttribIuivEXT, 904) - GL_STUB(glUniform1uiEXT, 905) - GL_STUB(glUniform1uivEXT, 906) - GL_STUB(glUniform2uiEXT, 907) - GL_STUB(glUniform2uivEXT, 908) - GL_STUB(glUniform3uiEXT, 909) - GL_STUB(glUniform3uivEXT, 910) - GL_STUB(glUniform4uiEXT, 911) - GL_STUB(glUniform4uivEXT, 912) - GL_STUB(glVertexAttribI1iEXT, 913) - GL_STUB(glVertexAttribI1ivEXT, 914) - GL_STUB(glVertexAttribI1uiEXT, 915) - GL_STUB(glVertexAttribI1uivEXT, 916) - GL_STUB(glVertexAttribI2iEXT, 917) - GL_STUB(glVertexAttribI2ivEXT, 918) - GL_STUB(glVertexAttribI2uiEXT, 919) - GL_STUB(glVertexAttribI2uivEXT, 920) - GL_STUB(glVertexAttribI3iEXT, 921) - GL_STUB(glVertexAttribI3ivEXT, 922) - GL_STUB(glVertexAttribI3uiEXT, 923) - GL_STUB(glVertexAttribI3uivEXT, 924) - GL_STUB(glVertexAttribI4bvEXT, 925) - GL_STUB(glVertexAttribI4iEXT, 926) - GL_STUB(glVertexAttribI4ivEXT, 927) - GL_STUB(glVertexAttribI4svEXT, 928) - GL_STUB(glVertexAttribI4ubvEXT, 929) - GL_STUB(glVertexAttribI4uiEXT, 930) - GL_STUB(glVertexAttribI4uivEXT, 931) - GL_STUB(glVertexAttribI4usvEXT, 932) - GL_STUB(glVertexAttribIPointerEXT, 933) - GL_STUB(glFramebufferTextureLayerEXT, 934) - GL_STUB(glColorMaskIndexedEXT, 935) - GL_STUB(glDisableIndexedEXT, 936) - GL_STUB(glEnableIndexedEXT, 937) - GL_STUB(glGetBooleanIndexedvEXT, 938) - GL_STUB(glGetIntegerIndexedvEXT, 939) - GL_STUB(glIsEnabledIndexedEXT, 940) - GL_STUB(glClearColorIiEXT, 941) - GL_STUB(glClearColorIuiEXT, 942) - GL_STUB(glGetTexParameterIivEXT, 943) - GL_STUB(glGetTexParameterIuivEXT, 944) - GL_STUB(glTexParameterIivEXT, 945) - GL_STUB(glTexParameterIuivEXT, 946) - GL_STUB(glBeginConditionalRenderNV, 947) - GL_STUB(glEndConditionalRenderNV, 948) - GL_STUB(glBeginTransformFeedbackEXT, 949) - GL_STUB(glBindBufferBaseEXT, 950) - GL_STUB(glBindBufferOffsetEXT, 951) - GL_STUB(glBindBufferRangeEXT, 952) - GL_STUB(glEndTransformFeedbackEXT, 953) - GL_STUB(glGetTransformFeedbackVaryingEXT, 954) - GL_STUB(glTransformFeedbackVaryingsEXT, 955) - GL_STUB(glProvokingVertexEXT, 956) - GL_STUB(gl_dispatch_stub_957, 957) - HIDDEN(gl_dispatch_stub_957) - GL_STUB(gl_dispatch_stub_958, 958) - HIDDEN(gl_dispatch_stub_958) - GL_STUB(glGetObjectParameterivAPPLE, 959) - GL_STUB(glObjectPurgeableAPPLE, 960) - GL_STUB(glObjectUnpurgeableAPPLE, 961) - GL_STUB(glActiveProgramEXT, 962) - GL_STUB(glCreateShaderProgramEXT, 963) - GL_STUB(glUseShaderProgramEXT, 964) - GL_STUB(glTextureBarrierNV, 965) - GL_STUB(gl_dispatch_stub_966, 966) - HIDDEN(gl_dispatch_stub_966) - GL_STUB(gl_dispatch_stub_967, 967) - HIDDEN(gl_dispatch_stub_967) - GL_STUB(gl_dispatch_stub_968, 968) - HIDDEN(gl_dispatch_stub_968) - GL_STUB(gl_dispatch_stub_969, 969) - HIDDEN(gl_dispatch_stub_969) - GL_STUB(gl_dispatch_stub_970, 970) - HIDDEN(gl_dispatch_stub_970) - GL_STUB(glEGLImageTargetRenderbufferStorageOES, 971) - GL_STUB(glEGLImageTargetTexture2DOES, 972) - GL_STUB_ALIAS(glArrayElementEXT, glArrayElement) - GL_STUB_ALIAS(glBindTextureEXT, glBindTexture) - GL_STUB_ALIAS(glDrawArraysEXT, glDrawArrays) -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(glAreTexturesResidentEXT, glAreTexturesResident) -#endif - GL_STUB_ALIAS(glCopyTexImage1DEXT, glCopyTexImage1D) - GL_STUB_ALIAS(glCopyTexImage2DEXT, glCopyTexImage2D) - GL_STUB_ALIAS(glCopyTexSubImage1DEXT, glCopyTexSubImage1D) - GL_STUB_ALIAS(glCopyTexSubImage2DEXT, glCopyTexSubImage2D) -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(glDeleteTexturesEXT, glDeleteTextures) -#endif -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(glGenTexturesEXT, glGenTextures) -#endif - GL_STUB_ALIAS(glGetPointervEXT, glGetPointerv) -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(glIsTextureEXT, glIsTexture) -#endif - GL_STUB_ALIAS(glPrioritizeTexturesEXT, glPrioritizeTextures) - GL_STUB_ALIAS(glTexSubImage1DEXT, glTexSubImage1D) - GL_STUB_ALIAS(glTexSubImage2DEXT, glTexSubImage2D) - GL_STUB_ALIAS(glBlendColorEXT, glBlendColor) - GL_STUB_ALIAS(glBlendEquationEXT, glBlendEquation) - GL_STUB_ALIAS(glDrawRangeElementsEXT, glDrawRangeElements) - GL_STUB_ALIAS(glColorTableSGI, glColorTable) - GL_STUB_ALIAS(glColorTableEXT, glColorTable) - GL_STUB_ALIAS(glColorTableParameterfvSGI, glColorTableParameterfv) - GL_STUB_ALIAS(glColorTableParameterivSGI, glColorTableParameteriv) - GL_STUB_ALIAS(glCopyColorTableSGI, glCopyColorTable) -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(glGetColorTableSGI, glGetColorTable) -#endif -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(glGetColorTableEXT, glGetColorTable) -#endif -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(glGetColorTableParameterfvSGI, glGetColorTableParameterfv) -#endif -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(glGetColorTableParameterfvEXT, glGetColorTableParameterfv) -#endif -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(glGetColorTableParameterivSGI, glGetColorTableParameteriv) -#endif -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(glGetColorTableParameterivEXT, glGetColorTableParameteriv) -#endif - GL_STUB_ALIAS(glColorSubTableEXT, glColorSubTable) - GL_STUB_ALIAS(glCopyColorSubTableEXT, glCopyColorSubTable) - GL_STUB_ALIAS(glConvolutionFilter1DEXT, glConvolutionFilter1D) - GL_STUB_ALIAS(glConvolutionFilter2DEXT, glConvolutionFilter2D) - GL_STUB_ALIAS(glConvolutionParameterfEXT, glConvolutionParameterf) - GL_STUB_ALIAS(glConvolutionParameterfvEXT, glConvolutionParameterfv) - GL_STUB_ALIAS(glConvolutionParameteriEXT, glConvolutionParameteri) - GL_STUB_ALIAS(glConvolutionParameterivEXT, glConvolutionParameteriv) - GL_STUB_ALIAS(glCopyConvolutionFilter1DEXT, glCopyConvolutionFilter1D) - GL_STUB_ALIAS(glCopyConvolutionFilter2DEXT, glCopyConvolutionFilter2D) -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(glGetConvolutionFilterEXT, glGetConvolutionFilter) -#endif -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(glGetConvolutionParameterfvEXT, glGetConvolutionParameterfv) -#endif -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(glGetConvolutionParameterivEXT, glGetConvolutionParameteriv) -#endif -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(glGetSeparableFilterEXT, glGetSeparableFilter) -#endif - GL_STUB_ALIAS(glSeparableFilter2DEXT, glSeparableFilter2D) -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(glGetHistogramEXT, glGetHistogram) -#endif -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(glGetHistogramParameterfvEXT, glGetHistogramParameterfv) -#endif -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(glGetHistogramParameterivEXT, glGetHistogramParameteriv) -#endif -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(glGetMinmaxEXT, glGetMinmax) -#endif -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(glGetMinmaxParameterfvEXT, glGetMinmaxParameterfv) -#endif -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(glGetMinmaxParameterivEXT, glGetMinmaxParameteriv) -#endif - GL_STUB_ALIAS(glHistogramEXT, glHistogram) - GL_STUB_ALIAS(glMinmaxEXT, glMinmax) - GL_STUB_ALIAS(glResetHistogramEXT, glResetHistogram) - GL_STUB_ALIAS(glResetMinmaxEXT, glResetMinmax) - GL_STUB_ALIAS(glTexImage3DEXT, glTexImage3D) - GL_STUB_ALIAS(glTexSubImage3DEXT, glTexSubImage3D) - GL_STUB_ALIAS(glCopyTexSubImage3DEXT, glCopyTexSubImage3D) - GL_STUB_ALIAS(glActiveTexture, glActiveTextureARB) - GL_STUB_ALIAS(glClientActiveTexture, glClientActiveTextureARB) - GL_STUB_ALIAS(glMultiTexCoord1d, glMultiTexCoord1dARB) - GL_STUB_ALIAS(glMultiTexCoord1dv, glMultiTexCoord1dvARB) - GL_STUB_ALIAS(glMultiTexCoord1f, glMultiTexCoord1fARB) - GL_STUB_ALIAS(glMultiTexCoord1fv, glMultiTexCoord1fvARB) - GL_STUB_ALIAS(glMultiTexCoord1i, glMultiTexCoord1iARB) - GL_STUB_ALIAS(glMultiTexCoord1iv, glMultiTexCoord1ivARB) - GL_STUB_ALIAS(glMultiTexCoord1s, glMultiTexCoord1sARB) - GL_STUB_ALIAS(glMultiTexCoord1sv, glMultiTexCoord1svARB) - GL_STUB_ALIAS(glMultiTexCoord2d, glMultiTexCoord2dARB) - GL_STUB_ALIAS(glMultiTexCoord2dv, glMultiTexCoord2dvARB) - GL_STUB_ALIAS(glMultiTexCoord2f, glMultiTexCoord2fARB) - GL_STUB_ALIAS(glMultiTexCoord2fv, glMultiTexCoord2fvARB) - GL_STUB_ALIAS(glMultiTexCoord2i, glMultiTexCoord2iARB) - GL_STUB_ALIAS(glMultiTexCoord2iv, glMultiTexCoord2ivARB) - GL_STUB_ALIAS(glMultiTexCoord2s, glMultiTexCoord2sARB) - GL_STUB_ALIAS(glMultiTexCoord2sv, glMultiTexCoord2svARB) - GL_STUB_ALIAS(glMultiTexCoord3d, glMultiTexCoord3dARB) - GL_STUB_ALIAS(glMultiTexCoord3dv, glMultiTexCoord3dvARB) - GL_STUB_ALIAS(glMultiTexCoord3f, glMultiTexCoord3fARB) - GL_STUB_ALIAS(glMultiTexCoord3fv, glMultiTexCoord3fvARB) - GL_STUB_ALIAS(glMultiTexCoord3i, glMultiTexCoord3iARB) - GL_STUB_ALIAS(glMultiTexCoord3iv, glMultiTexCoord3ivARB) - GL_STUB_ALIAS(glMultiTexCoord3s, glMultiTexCoord3sARB) - GL_STUB_ALIAS(glMultiTexCoord3sv, glMultiTexCoord3svARB) - GL_STUB_ALIAS(glMultiTexCoord4d, glMultiTexCoord4dARB) - GL_STUB_ALIAS(glMultiTexCoord4dv, glMultiTexCoord4dvARB) - GL_STUB_ALIAS(glMultiTexCoord4f, glMultiTexCoord4fARB) - GL_STUB_ALIAS(glMultiTexCoord4fv, glMultiTexCoord4fvARB) - GL_STUB_ALIAS(glMultiTexCoord4i, glMultiTexCoord4iARB) - GL_STUB_ALIAS(glMultiTexCoord4iv, glMultiTexCoord4ivARB) - GL_STUB_ALIAS(glMultiTexCoord4s, glMultiTexCoord4sARB) - GL_STUB_ALIAS(glMultiTexCoord4sv, glMultiTexCoord4svARB) - GL_STUB_ALIAS(glStencilOpSeparateATI, glStencilOpSeparate) - GL_STUB_ALIAS(glLoadTransposeMatrixd, glLoadTransposeMatrixdARB) - GL_STUB_ALIAS(glLoadTransposeMatrixf, glLoadTransposeMatrixfARB) - GL_STUB_ALIAS(glMultTransposeMatrixd, glMultTransposeMatrixdARB) - GL_STUB_ALIAS(glMultTransposeMatrixf, glMultTransposeMatrixfARB) - GL_STUB_ALIAS(glSampleCoverage, glSampleCoverageARB) - GL_STUB_ALIAS(glCompressedTexImage1D, glCompressedTexImage1DARB) - GL_STUB_ALIAS(glCompressedTexImage2D, glCompressedTexImage2DARB) - GL_STUB_ALIAS(glCompressedTexImage3D, glCompressedTexImage3DARB) - GL_STUB_ALIAS(glCompressedTexSubImage1D, glCompressedTexSubImage1DARB) - GL_STUB_ALIAS(glCompressedTexSubImage2D, glCompressedTexSubImage2DARB) - GL_STUB_ALIAS(glCompressedTexSubImage3D, glCompressedTexSubImage3DARB) - GL_STUB_ALIAS(glGetCompressedTexImage, glGetCompressedTexImageARB) - GL_STUB_ALIAS(glDisableVertexAttribArray, glDisableVertexAttribArrayARB) - GL_STUB_ALIAS(glEnableVertexAttribArray, glEnableVertexAttribArrayARB) - GL_STUB_ALIAS(glGetVertexAttribdv, glGetVertexAttribdvARB) - GL_STUB_ALIAS(glGetVertexAttribfv, glGetVertexAttribfvARB) - GL_STUB_ALIAS(glGetVertexAttribiv, glGetVertexAttribivARB) - GL_STUB_ALIAS(glProgramParameter4dNV, glProgramEnvParameter4dARB) - GL_STUB_ALIAS(glProgramParameter4dvNV, glProgramEnvParameter4dvARB) - GL_STUB_ALIAS(glProgramParameter4fNV, glProgramEnvParameter4fARB) - GL_STUB_ALIAS(glProgramParameter4fvNV, glProgramEnvParameter4fvARB) - GL_STUB_ALIAS(glVertexAttrib1d, glVertexAttrib1dARB) - GL_STUB_ALIAS(glVertexAttrib1dv, glVertexAttrib1dvARB) - GL_STUB_ALIAS(glVertexAttrib1f, glVertexAttrib1fARB) - GL_STUB_ALIAS(glVertexAttrib1fv, glVertexAttrib1fvARB) - GL_STUB_ALIAS(glVertexAttrib1s, glVertexAttrib1sARB) - GL_STUB_ALIAS(glVertexAttrib1sv, glVertexAttrib1svARB) - GL_STUB_ALIAS(glVertexAttrib2d, glVertexAttrib2dARB) - GL_STUB_ALIAS(glVertexAttrib2dv, glVertexAttrib2dvARB) - GL_STUB_ALIAS(glVertexAttrib2f, glVertexAttrib2fARB) - GL_STUB_ALIAS(glVertexAttrib2fv, glVertexAttrib2fvARB) - GL_STUB_ALIAS(glVertexAttrib2s, glVertexAttrib2sARB) - GL_STUB_ALIAS(glVertexAttrib2sv, glVertexAttrib2svARB) - GL_STUB_ALIAS(glVertexAttrib3d, glVertexAttrib3dARB) - GL_STUB_ALIAS(glVertexAttrib3dv, glVertexAttrib3dvARB) - GL_STUB_ALIAS(glVertexAttrib3f, glVertexAttrib3fARB) - GL_STUB_ALIAS(glVertexAttrib3fv, glVertexAttrib3fvARB) - GL_STUB_ALIAS(glVertexAttrib3s, glVertexAttrib3sARB) - GL_STUB_ALIAS(glVertexAttrib3sv, glVertexAttrib3svARB) - GL_STUB_ALIAS(glVertexAttrib4Nbv, glVertexAttrib4NbvARB) - GL_STUB_ALIAS(glVertexAttrib4Niv, glVertexAttrib4NivARB) - GL_STUB_ALIAS(glVertexAttrib4Nsv, glVertexAttrib4NsvARB) - GL_STUB_ALIAS(glVertexAttrib4Nub, glVertexAttrib4NubARB) - GL_STUB_ALIAS(glVertexAttrib4Nubv, glVertexAttrib4NubvARB) - GL_STUB_ALIAS(glVertexAttrib4Nuiv, glVertexAttrib4NuivARB) - GL_STUB_ALIAS(glVertexAttrib4Nusv, glVertexAttrib4NusvARB) - GL_STUB_ALIAS(glVertexAttrib4bv, glVertexAttrib4bvARB) - GL_STUB_ALIAS(glVertexAttrib4d, glVertexAttrib4dARB) - GL_STUB_ALIAS(glVertexAttrib4dv, glVertexAttrib4dvARB) - GL_STUB_ALIAS(glVertexAttrib4f, glVertexAttrib4fARB) - GL_STUB_ALIAS(glVertexAttrib4fv, glVertexAttrib4fvARB) - GL_STUB_ALIAS(glVertexAttrib4iv, glVertexAttrib4ivARB) - GL_STUB_ALIAS(glVertexAttrib4s, glVertexAttrib4sARB) - GL_STUB_ALIAS(glVertexAttrib4sv, glVertexAttrib4svARB) - GL_STUB_ALIAS(glVertexAttrib4ubv, glVertexAttrib4ubvARB) - GL_STUB_ALIAS(glVertexAttrib4uiv, glVertexAttrib4uivARB) - GL_STUB_ALIAS(glVertexAttrib4usv, glVertexAttrib4usvARB) - GL_STUB_ALIAS(glVertexAttribPointer, glVertexAttribPointerARB) - GL_STUB_ALIAS(glBindBuffer, glBindBufferARB) - GL_STUB_ALIAS(glBufferData, glBufferDataARB) - GL_STUB_ALIAS(glBufferSubData, glBufferSubDataARB) - GL_STUB_ALIAS(glDeleteBuffers, glDeleteBuffersARB) - GL_STUB_ALIAS(glGenBuffers, glGenBuffersARB) - GL_STUB_ALIAS(glGetBufferParameteriv, glGetBufferParameterivARB) - GL_STUB_ALIAS(glGetBufferPointerv, glGetBufferPointervARB) - GL_STUB_ALIAS(glGetBufferSubData, glGetBufferSubDataARB) - GL_STUB_ALIAS(glIsBuffer, glIsBufferARB) - GL_STUB_ALIAS(glMapBuffer, glMapBufferARB) - GL_STUB_ALIAS(glUnmapBuffer, glUnmapBufferARB) - GL_STUB_ALIAS(glBeginQuery, glBeginQueryARB) - GL_STUB_ALIAS(glDeleteQueries, glDeleteQueriesARB) - GL_STUB_ALIAS(glEndQuery, glEndQueryARB) - GL_STUB_ALIAS(glGenQueries, glGenQueriesARB) - GL_STUB_ALIAS(glGetQueryObjectiv, glGetQueryObjectivARB) - GL_STUB_ALIAS(glGetQueryObjectuiv, glGetQueryObjectuivARB) - GL_STUB_ALIAS(glGetQueryiv, glGetQueryivARB) - GL_STUB_ALIAS(glIsQuery, glIsQueryARB) - GL_STUB_ALIAS(glCompileShader, glCompileShaderARB) - GL_STUB_ALIAS(glGetActiveUniform, glGetActiveUniformARB) - GL_STUB_ALIAS(glGetShaderSource, glGetShaderSourceARB) - GL_STUB_ALIAS(glGetUniformLocation, glGetUniformLocationARB) - GL_STUB_ALIAS(glGetUniformfv, glGetUniformfvARB) - GL_STUB_ALIAS(glGetUniformiv, glGetUniformivARB) - GL_STUB_ALIAS(glLinkProgram, glLinkProgramARB) - GL_STUB_ALIAS(glShaderSource, glShaderSourceARB) - GL_STUB_ALIAS(glUniform1f, glUniform1fARB) - GL_STUB_ALIAS(glUniform1fv, glUniform1fvARB) - GL_STUB_ALIAS(glUniform1i, glUniform1iARB) - GL_STUB_ALIAS(glUniform1iv, glUniform1ivARB) - GL_STUB_ALIAS(glUniform2f, glUniform2fARB) - GL_STUB_ALIAS(glUniform2fv, glUniform2fvARB) - GL_STUB_ALIAS(glUniform2i, glUniform2iARB) - GL_STUB_ALIAS(glUniform2iv, glUniform2ivARB) - GL_STUB_ALIAS(glUniform3f, glUniform3fARB) - GL_STUB_ALIAS(glUniform3fv, glUniform3fvARB) - GL_STUB_ALIAS(glUniform3i, glUniform3iARB) - GL_STUB_ALIAS(glUniform3iv, glUniform3ivARB) - GL_STUB_ALIAS(glUniform4f, glUniform4fARB) - GL_STUB_ALIAS(glUniform4fv, glUniform4fvARB) - GL_STUB_ALIAS(glUniform4i, glUniform4iARB) - GL_STUB_ALIAS(glUniform4iv, glUniform4ivARB) - GL_STUB_ALIAS(glUniformMatrix2fv, glUniformMatrix2fvARB) - GL_STUB_ALIAS(glUniformMatrix3fv, glUniformMatrix3fvARB) - GL_STUB_ALIAS(glUniformMatrix4fv, glUniformMatrix4fvARB) - GL_STUB_ALIAS(glUseProgram, glUseProgramObjectARB) - GL_STUB_ALIAS(glValidateProgram, glValidateProgramARB) - GL_STUB_ALIAS(glBindAttribLocation, glBindAttribLocationARB) - GL_STUB_ALIAS(glGetActiveAttrib, glGetActiveAttribARB) - GL_STUB_ALIAS(glGetAttribLocation, glGetAttribLocationARB) - GL_STUB_ALIAS(glDrawBuffers, glDrawBuffersARB) - GL_STUB_ALIAS(glDrawBuffersATI, glDrawBuffersARB) - GL_STUB_ALIAS(glDrawBuffersNV, glDrawBuffersARB) - GL_STUB_ALIAS(glDrawArraysInstancedEXT, glDrawArraysInstancedARB) - GL_STUB_ALIAS(glDrawArraysInstanced, glDrawArraysInstancedARB) - GL_STUB_ALIAS(glDrawElementsInstancedEXT, glDrawElementsInstancedARB) - GL_STUB_ALIAS(glDrawElementsInstanced, glDrawElementsInstancedARB) - GL_STUB_ALIAS(glRenderbufferStorageMultisampleEXT, glRenderbufferStorageMultisample) - GL_STUB_ALIAS(glBlendEquationSeparateIndexedAMD, glBlendEquationSeparateiARB) - GL_STUB_ALIAS(glBlendEquationIndexedAMD, glBlendEquationiARB) - GL_STUB_ALIAS(glBlendFuncSeparateIndexedAMD, glBlendFuncSeparateiARB) - GL_STUB_ALIAS(glBlendFuncIndexedAMD, glBlendFunciARB) - GL_STUB_ALIAS(glPointParameterf, glPointParameterfEXT) - GL_STUB_ALIAS(glPointParameterfARB, glPointParameterfEXT) - GL_STUB_ALIAS(glPointParameterfSGIS, glPointParameterfEXT) - GL_STUB_ALIAS(glPointParameterfv, glPointParameterfvEXT) - GL_STUB_ALIAS(glPointParameterfvARB, glPointParameterfvEXT) - GL_STUB_ALIAS(glPointParameterfvSGIS, glPointParameterfvEXT) - GL_STUB_ALIAS(glSecondaryColor3b, glSecondaryColor3bEXT) - GL_STUB_ALIAS(glSecondaryColor3bv, glSecondaryColor3bvEXT) - GL_STUB_ALIAS(glSecondaryColor3d, glSecondaryColor3dEXT) - GL_STUB_ALIAS(glSecondaryColor3dv, glSecondaryColor3dvEXT) - GL_STUB_ALIAS(glSecondaryColor3f, glSecondaryColor3fEXT) - GL_STUB_ALIAS(glSecondaryColor3fv, glSecondaryColor3fvEXT) - GL_STUB_ALIAS(glSecondaryColor3i, glSecondaryColor3iEXT) - GL_STUB_ALIAS(glSecondaryColor3iv, glSecondaryColor3ivEXT) - GL_STUB_ALIAS(glSecondaryColor3s, glSecondaryColor3sEXT) - GL_STUB_ALIAS(glSecondaryColor3sv, glSecondaryColor3svEXT) - GL_STUB_ALIAS(glSecondaryColor3ub, glSecondaryColor3ubEXT) - GL_STUB_ALIAS(glSecondaryColor3ubv, glSecondaryColor3ubvEXT) - GL_STUB_ALIAS(glSecondaryColor3ui, glSecondaryColor3uiEXT) - GL_STUB_ALIAS(glSecondaryColor3uiv, glSecondaryColor3uivEXT) - GL_STUB_ALIAS(glSecondaryColor3us, glSecondaryColor3usEXT) - GL_STUB_ALIAS(glSecondaryColor3usv, glSecondaryColor3usvEXT) - GL_STUB_ALIAS(glSecondaryColorPointer, glSecondaryColorPointerEXT) - GL_STUB_ALIAS(glMultiDrawArrays, glMultiDrawArraysEXT) - GL_STUB_ALIAS(glMultiDrawElements, glMultiDrawElementsEXT) - GL_STUB_ALIAS(glFogCoordPointer, glFogCoordPointerEXT) - GL_STUB_ALIAS(glFogCoordd, glFogCoorddEXT) - GL_STUB_ALIAS(glFogCoorddv, glFogCoorddvEXT) - GL_STUB_ALIAS(glFogCoordf, glFogCoordfEXT) - GL_STUB_ALIAS(glFogCoordfv, glFogCoordfvEXT) - GL_STUB_ALIAS(glBlendFuncSeparate, glBlendFuncSeparateEXT) - GL_STUB_ALIAS(glBlendFuncSeparateINGR, glBlendFuncSeparateEXT) - GL_STUB_ALIAS(glWindowPos2d, glWindowPos2dMESA) - GL_STUB_ALIAS(glWindowPos2dARB, glWindowPos2dMESA) - GL_STUB_ALIAS(glWindowPos2dv, glWindowPos2dvMESA) - GL_STUB_ALIAS(glWindowPos2dvARB, glWindowPos2dvMESA) - GL_STUB_ALIAS(glWindowPos2f, glWindowPos2fMESA) - GL_STUB_ALIAS(glWindowPos2fARB, glWindowPos2fMESA) - GL_STUB_ALIAS(glWindowPos2fv, glWindowPos2fvMESA) - GL_STUB_ALIAS(glWindowPos2fvARB, glWindowPos2fvMESA) - GL_STUB_ALIAS(glWindowPos2i, glWindowPos2iMESA) - GL_STUB_ALIAS(glWindowPos2iARB, glWindowPos2iMESA) - GL_STUB_ALIAS(glWindowPos2iv, glWindowPos2ivMESA) - GL_STUB_ALIAS(glWindowPos2ivARB, glWindowPos2ivMESA) - GL_STUB_ALIAS(glWindowPos2s, glWindowPos2sMESA) - GL_STUB_ALIAS(glWindowPos2sARB, glWindowPos2sMESA) - GL_STUB_ALIAS(glWindowPos2sv, glWindowPos2svMESA) - GL_STUB_ALIAS(glWindowPos2svARB, glWindowPos2svMESA) - GL_STUB_ALIAS(glWindowPos3d, glWindowPos3dMESA) - GL_STUB_ALIAS(glWindowPos3dARB, glWindowPos3dMESA) - GL_STUB_ALIAS(glWindowPos3dv, glWindowPos3dvMESA) - GL_STUB_ALIAS(glWindowPos3dvARB, glWindowPos3dvMESA) - GL_STUB_ALIAS(glWindowPos3f, glWindowPos3fMESA) - GL_STUB_ALIAS(glWindowPos3fARB, glWindowPos3fMESA) - GL_STUB_ALIAS(glWindowPos3fv, glWindowPos3fvMESA) - GL_STUB_ALIAS(glWindowPos3fvARB, glWindowPos3fvMESA) - GL_STUB_ALIAS(glWindowPos3i, glWindowPos3iMESA) - GL_STUB_ALIAS(glWindowPos3iARB, glWindowPos3iMESA) - GL_STUB_ALIAS(glWindowPos3iv, glWindowPos3ivMESA) - GL_STUB_ALIAS(glWindowPos3ivARB, glWindowPos3ivMESA) - GL_STUB_ALIAS(glWindowPos3s, glWindowPos3sMESA) - GL_STUB_ALIAS(glWindowPos3sARB, glWindowPos3sMESA) - GL_STUB_ALIAS(glWindowPos3sv, glWindowPos3svMESA) - GL_STUB_ALIAS(glWindowPos3svARB, glWindowPos3svMESA) - GL_STUB_ALIAS(glBindProgramARB, glBindProgramNV) - GL_STUB_ALIAS(glDeleteProgramsARB, glDeleteProgramsNV) - GL_STUB_ALIAS(glGenProgramsARB, glGenProgramsNV) - GL_STUB_ALIAS(glGetVertexAttribPointerv, glGetVertexAttribPointervNV) - GL_STUB_ALIAS(glGetVertexAttribPointervARB, glGetVertexAttribPointervNV) - GL_STUB_ALIAS(glIsProgramARB, glIsProgramNV) - GL_STUB_ALIAS(glPointParameteri, glPointParameteriNV) - GL_STUB_ALIAS(glPointParameteriv, glPointParameterivNV) - GL_STUB_ALIAS(glPrimitiveRestartIndex, glPrimitiveRestartIndexNV) - GL_STUB_ALIAS(glBindFramebuffer, glBindFramebufferEXT) - GL_STUB_ALIAS(glBindRenderbuffer, glBindRenderbufferEXT) - GL_STUB_ALIAS(glCheckFramebufferStatus, glCheckFramebufferStatusEXT) - GL_STUB_ALIAS(glDeleteFramebuffers, glDeleteFramebuffersEXT) - GL_STUB_ALIAS(glDeleteRenderbuffers, glDeleteRenderbuffersEXT) - GL_STUB_ALIAS(glFramebufferRenderbuffer, glFramebufferRenderbufferEXT) - GL_STUB_ALIAS(glFramebufferTexture1D, glFramebufferTexture1DEXT) - GL_STUB_ALIAS(glFramebufferTexture2D, glFramebufferTexture2DEXT) - GL_STUB_ALIAS(glFramebufferTexture3D, glFramebufferTexture3DEXT) - GL_STUB_ALIAS(glGenFramebuffers, glGenFramebuffersEXT) - GL_STUB_ALIAS(glGenRenderbuffers, glGenRenderbuffersEXT) - GL_STUB_ALIAS(glGenerateMipmap, glGenerateMipmapEXT) - GL_STUB_ALIAS(glGetFramebufferAttachmentParameteriv, glGetFramebufferAttachmentParameterivEXT) - GL_STUB_ALIAS(glGetRenderbufferParameteriv, glGetRenderbufferParameterivEXT) - GL_STUB_ALIAS(glIsFramebuffer, glIsFramebufferEXT) - GL_STUB_ALIAS(glIsRenderbuffer, glIsRenderbufferEXT) - GL_STUB_ALIAS(glRenderbufferStorage, glRenderbufferStorageEXT) - GL_STUB_ALIAS(glBindFragDataLocation, glBindFragDataLocationEXT) - GL_STUB_ALIAS(glGetFragDataLocation, glGetFragDataLocationEXT) - GL_STUB_ALIAS(glGetUniformuiv, glGetUniformuivEXT) - GL_STUB_ALIAS(glGetVertexAttribIiv, glGetVertexAttribIivEXT) - GL_STUB_ALIAS(glGetVertexAttribIuiv, glGetVertexAttribIuivEXT) - GL_STUB_ALIAS(glUniform1ui, glUniform1uiEXT) - GL_STUB_ALIAS(glUniform1uiv, glUniform1uivEXT) - GL_STUB_ALIAS(glUniform2ui, glUniform2uiEXT) - GL_STUB_ALIAS(glUniform2uiv, glUniform2uivEXT) - GL_STUB_ALIAS(glUniform3ui, glUniform3uiEXT) - GL_STUB_ALIAS(glUniform3uiv, glUniform3uivEXT) - GL_STUB_ALIAS(glUniform4ui, glUniform4uiEXT) - GL_STUB_ALIAS(glUniform4uiv, glUniform4uivEXT) - GL_STUB_ALIAS(glVertexAttribI1i, glVertexAttribI1iEXT) - GL_STUB_ALIAS(glVertexAttribI1iv, glVertexAttribI1ivEXT) - GL_STUB_ALIAS(glVertexAttribI1ui, glVertexAttribI1uiEXT) - GL_STUB_ALIAS(glVertexAttribI1uiv, glVertexAttribI1uivEXT) - GL_STUB_ALIAS(glVertexAttribI2i, glVertexAttribI2iEXT) - GL_STUB_ALIAS(glVertexAttribI2iv, glVertexAttribI2ivEXT) - GL_STUB_ALIAS(glVertexAttribI2ui, glVertexAttribI2uiEXT) - GL_STUB_ALIAS(glVertexAttribI2uiv, glVertexAttribI2uivEXT) - GL_STUB_ALIAS(glVertexAttribI3i, glVertexAttribI3iEXT) - GL_STUB_ALIAS(glVertexAttribI3iv, glVertexAttribI3ivEXT) - GL_STUB_ALIAS(glVertexAttribI3ui, glVertexAttribI3uiEXT) - GL_STUB_ALIAS(glVertexAttribI3uiv, glVertexAttribI3uivEXT) - GL_STUB_ALIAS(glVertexAttribI4bv, glVertexAttribI4bvEXT) - GL_STUB_ALIAS(glVertexAttribI4i, glVertexAttribI4iEXT) - GL_STUB_ALIAS(glVertexAttribI4iv, glVertexAttribI4ivEXT) - GL_STUB_ALIAS(glVertexAttribI4sv, glVertexAttribI4svEXT) - GL_STUB_ALIAS(glVertexAttribI4ubv, glVertexAttribI4ubvEXT) - GL_STUB_ALIAS(glVertexAttribI4ui, glVertexAttribI4uiEXT) - GL_STUB_ALIAS(glVertexAttribI4uiv, glVertexAttribI4uivEXT) - GL_STUB_ALIAS(glVertexAttribI4usv, glVertexAttribI4usvEXT) - GL_STUB_ALIAS(glVertexAttribIPointer, glVertexAttribIPointerEXT) - GL_STUB_ALIAS(glFramebufferTextureLayer, glFramebufferTextureLayerEXT) - GL_STUB_ALIAS(glFramebufferTextureLayerARB, glFramebufferTextureLayerEXT) - GL_STUB_ALIAS(glColorMaski, glColorMaskIndexedEXT) - GL_STUB_ALIAS(glDisablei, glDisableIndexedEXT) - GL_STUB_ALIAS(glEnablei, glEnableIndexedEXT) - GL_STUB_ALIAS(glGetBooleani_v, glGetBooleanIndexedvEXT) - GL_STUB_ALIAS(glGetIntegeri_v, glGetIntegerIndexedvEXT) - GL_STUB_ALIAS(glIsEnabledi, glIsEnabledIndexedEXT) - GL_STUB_ALIAS(glGetTexParameterIiv, glGetTexParameterIivEXT) - GL_STUB_ALIAS(glGetTexParameterIuiv, glGetTexParameterIuivEXT) - GL_STUB_ALIAS(glTexParameterIiv, glTexParameterIivEXT) - GL_STUB_ALIAS(glTexParameterIuiv, glTexParameterIuivEXT) - GL_STUB_ALIAS(glBeginConditionalRender, glBeginConditionalRenderNV) - GL_STUB_ALIAS(glEndConditionalRender, glEndConditionalRenderNV) - GL_STUB_ALIAS(glBeginTransformFeedback, glBeginTransformFeedbackEXT) - GL_STUB_ALIAS(glBindBufferBase, glBindBufferBaseEXT) - GL_STUB_ALIAS(glBindBufferRange, glBindBufferRangeEXT) - GL_STUB_ALIAS(glEndTransformFeedback, glEndTransformFeedbackEXT) - GL_STUB_ALIAS(glGetTransformFeedbackVarying, glGetTransformFeedbackVaryingEXT) - GL_STUB_ALIAS(glTransformFeedbackVaryings, glTransformFeedbackVaryingsEXT) - GL_STUB_ALIAS(glProvokingVertex, glProvokingVertexEXT) - - .globl gl_dispatch_functions_end - HIDDEN(gl_dispatch_functions_end) -gl_dispatch_functions_end: diff --git a/dll/opengl/mesa/src/mapi/glapi/glapi_x86-64.S b/dll/opengl/mesa/src/mapi/glapi/glapi_x86-64.S deleted file mode 100644 index 5c3d15af6fb..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/glapi_x86-64.S +++ /dev/null @@ -1,37466 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by gl_x86-64_asm.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2005 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* If we build with gcc's -fvisibility=hidden flag, we'll need to change - * the symbol visibility mode to 'default'. - */ - -#include "x86/assyntax.h" - -#ifdef __GNUC__ -# pragma GCC visibility push(default) -# define HIDDEN(x) .hidden x -#else -# define HIDDEN(x) -#endif - -# if defined(USE_MGL_NAMESPACE) -# define GL_PREFIX(n) GLNAME(CONCAT(mgl,n)) -# define _glapi_Dispatch _mglapi_Dispatch -# else -# define GL_PREFIX(n) GLNAME(CONCAT(gl,n)) -# endif - -#if defined(PTHREADS) || defined(WIN32) -# define THREADS -#endif - - .text - -#ifdef GLX_USE_TLS - - .globl _x86_64_get_get_dispatch; HIDDEN(_x86_64_get_get_dispatch) -_x86_64_get_get_dispatch: - lea _x86_64_get_dispatch(%rip), %rax - ret - - .p2align 4,,15 -_x86_64_get_dispatch: - movq _glapi_tls_Dispatch@GOTTPOFF(%rip), %rax - movq %fs:(%rax), %rax - ret - .size _x86_64_get_dispatch, .-_x86_64_get_dispatch - -#elif defined(PTHREADS) - - .extern _glapi_Dispatch - .extern _gl_DispatchTSD - .extern pthread_getspecific - - .p2align 4,,15 -_x86_64_get_dispatch: - movq _gl_DispatchTSD@GOTPCREL(%rip), %rax - movl (%rax), %edi - jmp pthread_getspecific@PLT - -#elif defined(THREADS) - - .extern _glapi_get_dispatch - -#endif - - .p2align 4,,15 - .globl GL_PREFIX(NewList) - .type GL_PREFIX(NewList), @function -GL_PREFIX(NewList): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 0(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq (%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 0(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 0(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(NewList), .-GL_PREFIX(NewList) - - .p2align 4,,15 - .globl GL_PREFIX(EndList) - .type GL_PREFIX(EndList), @function -GL_PREFIX(EndList): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 8(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 8(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 8(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 8(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EndList), .-GL_PREFIX(EndList) - - .p2align 4,,15 - .globl GL_PREFIX(CallList) - .type GL_PREFIX(CallList), @function -GL_PREFIX(CallList): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 16(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 16(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 16(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 16(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CallList), .-GL_PREFIX(CallList) - - .p2align 4,,15 - .globl GL_PREFIX(CallLists) - .type GL_PREFIX(CallLists), @function -GL_PREFIX(CallLists): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 24(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 24(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 24(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 24(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CallLists), .-GL_PREFIX(CallLists) - - .p2align 4,,15 - .globl GL_PREFIX(DeleteLists) - .type GL_PREFIX(DeleteLists), @function -GL_PREFIX(DeleteLists): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 32(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 32(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 32(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 32(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DeleteLists), .-GL_PREFIX(DeleteLists) - - .p2align 4,,15 - .globl GL_PREFIX(GenLists) - .type GL_PREFIX(GenLists), @function -GL_PREFIX(GenLists): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 40(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 40(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 40(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 40(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GenLists), .-GL_PREFIX(GenLists) - - .p2align 4,,15 - .globl GL_PREFIX(ListBase) - .type GL_PREFIX(ListBase), @function -GL_PREFIX(ListBase): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 48(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 48(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 48(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 48(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ListBase), .-GL_PREFIX(ListBase) - - .p2align 4,,15 - .globl GL_PREFIX(Begin) - .type GL_PREFIX(Begin), @function -GL_PREFIX(Begin): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 56(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 56(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 56(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 56(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Begin), .-GL_PREFIX(Begin) - - .p2align 4,,15 - .globl GL_PREFIX(Bitmap) - .type GL_PREFIX(Bitmap), @function -GL_PREFIX(Bitmap): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 64(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $56, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - movq %xmm1, 24(%rsp) - movq %xmm2, 32(%rsp) - movq %xmm3, 40(%rsp) - movq %rdx, 48(%rsp) - call _x86_64_get_dispatch@PLT - movq 48(%rsp), %rdx - movq 40(%rsp), %xmm3 - movq 32(%rsp), %xmm2 - movq 24(%rsp), %xmm1 - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $56, %rsp - movq 64(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 64(%rax), %r11 - jmp *%r11 -1: - subq $56, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - movq %xmm1, 24(%rsp) - movq %xmm2, 32(%rsp) - movq %xmm3, 40(%rsp) - movq %rdx, 48(%rsp) - call _glapi_get_dispatch - movq 48(%rsp), %rdx - movq 40(%rsp), %xmm3 - movq 32(%rsp), %xmm2 - movq 24(%rsp), %xmm1 - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $56, %rsp - movq 64(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Bitmap), .-GL_PREFIX(Bitmap) - - .p2align 4,,15 - .globl GL_PREFIX(Color3b) - .type GL_PREFIX(Color3b), @function -GL_PREFIX(Color3b): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 72(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 72(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 72(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 72(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color3b), .-GL_PREFIX(Color3b) - - .p2align 4,,15 - .globl GL_PREFIX(Color3bv) - .type GL_PREFIX(Color3bv), @function -GL_PREFIX(Color3bv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 80(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 80(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 80(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 80(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color3bv), .-GL_PREFIX(Color3bv) - - .p2align 4,,15 - .globl GL_PREFIX(Color3d) - .type GL_PREFIX(Color3d), @function -GL_PREFIX(Color3d): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 88(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 88(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 88(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 88(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color3d), .-GL_PREFIX(Color3d) - - .p2align 4,,15 - .globl GL_PREFIX(Color3dv) - .type GL_PREFIX(Color3dv), @function -GL_PREFIX(Color3dv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 96(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 96(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 96(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 96(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color3dv), .-GL_PREFIX(Color3dv) - - .p2align 4,,15 - .globl GL_PREFIX(Color3f) - .type GL_PREFIX(Color3f), @function -GL_PREFIX(Color3f): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 104(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 104(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 104(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 104(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color3f), .-GL_PREFIX(Color3f) - - .p2align 4,,15 - .globl GL_PREFIX(Color3fv) - .type GL_PREFIX(Color3fv), @function -GL_PREFIX(Color3fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 112(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 112(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 112(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 112(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color3fv), .-GL_PREFIX(Color3fv) - - .p2align 4,,15 - .globl GL_PREFIX(Color3i) - .type GL_PREFIX(Color3i), @function -GL_PREFIX(Color3i): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 120(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 120(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 120(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 120(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color3i), .-GL_PREFIX(Color3i) - - .p2align 4,,15 - .globl GL_PREFIX(Color3iv) - .type GL_PREFIX(Color3iv), @function -GL_PREFIX(Color3iv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 128(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 128(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 128(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 128(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color3iv), .-GL_PREFIX(Color3iv) - - .p2align 4,,15 - .globl GL_PREFIX(Color3s) - .type GL_PREFIX(Color3s), @function -GL_PREFIX(Color3s): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 136(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 136(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 136(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 136(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color3s), .-GL_PREFIX(Color3s) - - .p2align 4,,15 - .globl GL_PREFIX(Color3sv) - .type GL_PREFIX(Color3sv), @function -GL_PREFIX(Color3sv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 144(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 144(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 144(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 144(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color3sv), .-GL_PREFIX(Color3sv) - - .p2align 4,,15 - .globl GL_PREFIX(Color3ub) - .type GL_PREFIX(Color3ub), @function -GL_PREFIX(Color3ub): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 152(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 152(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 152(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 152(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color3ub), .-GL_PREFIX(Color3ub) - - .p2align 4,,15 - .globl GL_PREFIX(Color3ubv) - .type GL_PREFIX(Color3ubv), @function -GL_PREFIX(Color3ubv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 160(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 160(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 160(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 160(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color3ubv), .-GL_PREFIX(Color3ubv) - - .p2align 4,,15 - .globl GL_PREFIX(Color3ui) - .type GL_PREFIX(Color3ui), @function -GL_PREFIX(Color3ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 168(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 168(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 168(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 168(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color3ui), .-GL_PREFIX(Color3ui) - - .p2align 4,,15 - .globl GL_PREFIX(Color3uiv) - .type GL_PREFIX(Color3uiv), @function -GL_PREFIX(Color3uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 176(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 176(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 176(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 176(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color3uiv), .-GL_PREFIX(Color3uiv) - - .p2align 4,,15 - .globl GL_PREFIX(Color3us) - .type GL_PREFIX(Color3us), @function -GL_PREFIX(Color3us): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 184(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 184(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 184(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 184(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color3us), .-GL_PREFIX(Color3us) - - .p2align 4,,15 - .globl GL_PREFIX(Color3usv) - .type GL_PREFIX(Color3usv), @function -GL_PREFIX(Color3usv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 192(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 192(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 192(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 192(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color3usv), .-GL_PREFIX(Color3usv) - - .p2align 4,,15 - .globl GL_PREFIX(Color4b) - .type GL_PREFIX(Color4b), @function -GL_PREFIX(Color4b): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 200(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 200(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 200(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 200(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color4b), .-GL_PREFIX(Color4b) - - .p2align 4,,15 - .globl GL_PREFIX(Color4bv) - .type GL_PREFIX(Color4bv), @function -GL_PREFIX(Color4bv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 208(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 208(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 208(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 208(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color4bv), .-GL_PREFIX(Color4bv) - - .p2align 4,,15 - .globl GL_PREFIX(Color4d) - .type GL_PREFIX(Color4d), @function -GL_PREFIX(Color4d): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 216(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 216(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 216(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 216(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color4d), .-GL_PREFIX(Color4d) - - .p2align 4,,15 - .globl GL_PREFIX(Color4dv) - .type GL_PREFIX(Color4dv), @function -GL_PREFIX(Color4dv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 224(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 224(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 224(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 224(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color4dv), .-GL_PREFIX(Color4dv) - - .p2align 4,,15 - .globl GL_PREFIX(Color4f) - .type GL_PREFIX(Color4f), @function -GL_PREFIX(Color4f): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 232(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 232(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 232(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 232(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color4f), .-GL_PREFIX(Color4f) - - .p2align 4,,15 - .globl GL_PREFIX(Color4fv) - .type GL_PREFIX(Color4fv), @function -GL_PREFIX(Color4fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 240(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 240(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 240(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 240(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color4fv), .-GL_PREFIX(Color4fv) - - .p2align 4,,15 - .globl GL_PREFIX(Color4i) - .type GL_PREFIX(Color4i), @function -GL_PREFIX(Color4i): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 248(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 248(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 248(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 248(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color4i), .-GL_PREFIX(Color4i) - - .p2align 4,,15 - .globl GL_PREFIX(Color4iv) - .type GL_PREFIX(Color4iv), @function -GL_PREFIX(Color4iv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 256(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 256(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 256(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 256(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color4iv), .-GL_PREFIX(Color4iv) - - .p2align 4,,15 - .globl GL_PREFIX(Color4s) - .type GL_PREFIX(Color4s), @function -GL_PREFIX(Color4s): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 264(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 264(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 264(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 264(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color4s), .-GL_PREFIX(Color4s) - - .p2align 4,,15 - .globl GL_PREFIX(Color4sv) - .type GL_PREFIX(Color4sv), @function -GL_PREFIX(Color4sv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 272(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 272(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 272(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 272(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color4sv), .-GL_PREFIX(Color4sv) - - .p2align 4,,15 - .globl GL_PREFIX(Color4ub) - .type GL_PREFIX(Color4ub), @function -GL_PREFIX(Color4ub): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 280(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 280(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 280(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 280(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color4ub), .-GL_PREFIX(Color4ub) - - .p2align 4,,15 - .globl GL_PREFIX(Color4ubv) - .type GL_PREFIX(Color4ubv), @function -GL_PREFIX(Color4ubv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 288(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 288(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 288(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 288(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color4ubv), .-GL_PREFIX(Color4ubv) - - .p2align 4,,15 - .globl GL_PREFIX(Color4ui) - .type GL_PREFIX(Color4ui), @function -GL_PREFIX(Color4ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 296(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 296(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 296(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 296(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color4ui), .-GL_PREFIX(Color4ui) - - .p2align 4,,15 - .globl GL_PREFIX(Color4uiv) - .type GL_PREFIX(Color4uiv), @function -GL_PREFIX(Color4uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 304(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 304(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 304(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 304(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color4uiv), .-GL_PREFIX(Color4uiv) - - .p2align 4,,15 - .globl GL_PREFIX(Color4us) - .type GL_PREFIX(Color4us), @function -GL_PREFIX(Color4us): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 312(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 312(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 312(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 312(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color4us), .-GL_PREFIX(Color4us) - - .p2align 4,,15 - .globl GL_PREFIX(Color4usv) - .type GL_PREFIX(Color4usv), @function -GL_PREFIX(Color4usv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 320(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 320(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 320(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 320(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Color4usv), .-GL_PREFIX(Color4usv) - - .p2align 4,,15 - .globl GL_PREFIX(EdgeFlag) - .type GL_PREFIX(EdgeFlag), @function -GL_PREFIX(EdgeFlag): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 328(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 328(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 328(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 328(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EdgeFlag), .-GL_PREFIX(EdgeFlag) - - .p2align 4,,15 - .globl GL_PREFIX(EdgeFlagv) - .type GL_PREFIX(EdgeFlagv), @function -GL_PREFIX(EdgeFlagv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 336(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 336(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 336(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 336(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EdgeFlagv), .-GL_PREFIX(EdgeFlagv) - - .p2align 4,,15 - .globl GL_PREFIX(End) - .type GL_PREFIX(End), @function -GL_PREFIX(End): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 344(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 344(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 344(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 344(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(End), .-GL_PREFIX(End) - - .p2align 4,,15 - .globl GL_PREFIX(Indexd) - .type GL_PREFIX(Indexd), @function -GL_PREFIX(Indexd): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 352(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $8, %rsp - movq %xmm0, (%rsp) - call _x86_64_get_dispatch@PLT - movq (%rsp), %xmm0 - addq $8, %rsp - movq 352(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 352(%rax), %r11 - jmp *%r11 -1: - subq $8, %rsp - movq %xmm0, (%rsp) - call _glapi_get_dispatch - movq (%rsp), %xmm0 - addq $8, %rsp - movq 352(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Indexd), .-GL_PREFIX(Indexd) - - .p2align 4,,15 - .globl GL_PREFIX(Indexdv) - .type GL_PREFIX(Indexdv), @function -GL_PREFIX(Indexdv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 360(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 360(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 360(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 360(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Indexdv), .-GL_PREFIX(Indexdv) - - .p2align 4,,15 - .globl GL_PREFIX(Indexf) - .type GL_PREFIX(Indexf), @function -GL_PREFIX(Indexf): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 368(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $8, %rsp - movq %xmm0, (%rsp) - call _x86_64_get_dispatch@PLT - movq (%rsp), %xmm0 - addq $8, %rsp - movq 368(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 368(%rax), %r11 - jmp *%r11 -1: - subq $8, %rsp - movq %xmm0, (%rsp) - call _glapi_get_dispatch - movq (%rsp), %xmm0 - addq $8, %rsp - movq 368(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Indexf), .-GL_PREFIX(Indexf) - - .p2align 4,,15 - .globl GL_PREFIX(Indexfv) - .type GL_PREFIX(Indexfv), @function -GL_PREFIX(Indexfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 376(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 376(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 376(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 376(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Indexfv), .-GL_PREFIX(Indexfv) - - .p2align 4,,15 - .globl GL_PREFIX(Indexi) - .type GL_PREFIX(Indexi), @function -GL_PREFIX(Indexi): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 384(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 384(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 384(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 384(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Indexi), .-GL_PREFIX(Indexi) - - .p2align 4,,15 - .globl GL_PREFIX(Indexiv) - .type GL_PREFIX(Indexiv), @function -GL_PREFIX(Indexiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 392(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 392(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 392(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 392(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Indexiv), .-GL_PREFIX(Indexiv) - - .p2align 4,,15 - .globl GL_PREFIX(Indexs) - .type GL_PREFIX(Indexs), @function -GL_PREFIX(Indexs): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 400(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 400(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 400(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 400(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Indexs), .-GL_PREFIX(Indexs) - - .p2align 4,,15 - .globl GL_PREFIX(Indexsv) - .type GL_PREFIX(Indexsv), @function -GL_PREFIX(Indexsv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 408(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 408(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 408(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 408(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Indexsv), .-GL_PREFIX(Indexsv) - - .p2align 4,,15 - .globl GL_PREFIX(Normal3b) - .type GL_PREFIX(Normal3b), @function -GL_PREFIX(Normal3b): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 416(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 416(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 416(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 416(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Normal3b), .-GL_PREFIX(Normal3b) - - .p2align 4,,15 - .globl GL_PREFIX(Normal3bv) - .type GL_PREFIX(Normal3bv), @function -GL_PREFIX(Normal3bv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 424(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 424(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 424(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 424(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Normal3bv), .-GL_PREFIX(Normal3bv) - - .p2align 4,,15 - .globl GL_PREFIX(Normal3d) - .type GL_PREFIX(Normal3d), @function -GL_PREFIX(Normal3d): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 432(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 432(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 432(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 432(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Normal3d), .-GL_PREFIX(Normal3d) - - .p2align 4,,15 - .globl GL_PREFIX(Normal3dv) - .type GL_PREFIX(Normal3dv), @function -GL_PREFIX(Normal3dv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 440(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 440(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 440(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 440(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Normal3dv), .-GL_PREFIX(Normal3dv) - - .p2align 4,,15 - .globl GL_PREFIX(Normal3f) - .type GL_PREFIX(Normal3f), @function -GL_PREFIX(Normal3f): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 448(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 448(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 448(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 448(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Normal3f), .-GL_PREFIX(Normal3f) - - .p2align 4,,15 - .globl GL_PREFIX(Normal3fv) - .type GL_PREFIX(Normal3fv), @function -GL_PREFIX(Normal3fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 456(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 456(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 456(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 456(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Normal3fv), .-GL_PREFIX(Normal3fv) - - .p2align 4,,15 - .globl GL_PREFIX(Normal3i) - .type GL_PREFIX(Normal3i), @function -GL_PREFIX(Normal3i): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 464(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 464(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 464(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 464(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Normal3i), .-GL_PREFIX(Normal3i) - - .p2align 4,,15 - .globl GL_PREFIX(Normal3iv) - .type GL_PREFIX(Normal3iv), @function -GL_PREFIX(Normal3iv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 472(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 472(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 472(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 472(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Normal3iv), .-GL_PREFIX(Normal3iv) - - .p2align 4,,15 - .globl GL_PREFIX(Normal3s) - .type GL_PREFIX(Normal3s), @function -GL_PREFIX(Normal3s): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 480(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 480(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 480(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 480(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Normal3s), .-GL_PREFIX(Normal3s) - - .p2align 4,,15 - .globl GL_PREFIX(Normal3sv) - .type GL_PREFIX(Normal3sv), @function -GL_PREFIX(Normal3sv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 488(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 488(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 488(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 488(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Normal3sv), .-GL_PREFIX(Normal3sv) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos2d) - .type GL_PREFIX(RasterPos2d), @function -GL_PREFIX(RasterPos2d): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 496(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 496(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 496(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 496(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos2d), .-GL_PREFIX(RasterPos2d) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos2dv) - .type GL_PREFIX(RasterPos2dv), @function -GL_PREFIX(RasterPos2dv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 504(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 504(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 504(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 504(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos2dv), .-GL_PREFIX(RasterPos2dv) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos2f) - .type GL_PREFIX(RasterPos2f), @function -GL_PREFIX(RasterPos2f): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 512(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 512(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 512(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 512(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos2f), .-GL_PREFIX(RasterPos2f) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos2fv) - .type GL_PREFIX(RasterPos2fv), @function -GL_PREFIX(RasterPos2fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 520(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 520(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 520(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 520(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos2fv), .-GL_PREFIX(RasterPos2fv) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos2i) - .type GL_PREFIX(RasterPos2i), @function -GL_PREFIX(RasterPos2i): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 528(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 528(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 528(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 528(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos2i), .-GL_PREFIX(RasterPos2i) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos2iv) - .type GL_PREFIX(RasterPos2iv), @function -GL_PREFIX(RasterPos2iv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 536(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 536(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 536(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 536(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos2iv), .-GL_PREFIX(RasterPos2iv) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos2s) - .type GL_PREFIX(RasterPos2s), @function -GL_PREFIX(RasterPos2s): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 544(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 544(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 544(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 544(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos2s), .-GL_PREFIX(RasterPos2s) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos2sv) - .type GL_PREFIX(RasterPos2sv), @function -GL_PREFIX(RasterPos2sv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 552(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 552(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 552(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 552(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos2sv), .-GL_PREFIX(RasterPos2sv) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos3d) - .type GL_PREFIX(RasterPos3d), @function -GL_PREFIX(RasterPos3d): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 560(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 560(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 560(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 560(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos3d), .-GL_PREFIX(RasterPos3d) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos3dv) - .type GL_PREFIX(RasterPos3dv), @function -GL_PREFIX(RasterPos3dv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 568(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 568(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 568(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 568(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos3dv), .-GL_PREFIX(RasterPos3dv) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos3f) - .type GL_PREFIX(RasterPos3f), @function -GL_PREFIX(RasterPos3f): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 576(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 576(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 576(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 576(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos3f), .-GL_PREFIX(RasterPos3f) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos3fv) - .type GL_PREFIX(RasterPos3fv), @function -GL_PREFIX(RasterPos3fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 584(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 584(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 584(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 584(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos3fv), .-GL_PREFIX(RasterPos3fv) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos3i) - .type GL_PREFIX(RasterPos3i), @function -GL_PREFIX(RasterPos3i): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 592(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 592(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 592(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 592(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos3i), .-GL_PREFIX(RasterPos3i) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos3iv) - .type GL_PREFIX(RasterPos3iv), @function -GL_PREFIX(RasterPos3iv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 600(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 600(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 600(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 600(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos3iv), .-GL_PREFIX(RasterPos3iv) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos3s) - .type GL_PREFIX(RasterPos3s), @function -GL_PREFIX(RasterPos3s): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 608(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 608(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 608(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 608(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos3s), .-GL_PREFIX(RasterPos3s) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos3sv) - .type GL_PREFIX(RasterPos3sv), @function -GL_PREFIX(RasterPos3sv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 616(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 616(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 616(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 616(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos3sv), .-GL_PREFIX(RasterPos3sv) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos4d) - .type GL_PREFIX(RasterPos4d), @function -GL_PREFIX(RasterPos4d): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 624(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 624(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 624(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 624(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos4d), .-GL_PREFIX(RasterPos4d) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos4dv) - .type GL_PREFIX(RasterPos4dv), @function -GL_PREFIX(RasterPos4dv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 632(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 632(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 632(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 632(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos4dv), .-GL_PREFIX(RasterPos4dv) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos4f) - .type GL_PREFIX(RasterPos4f), @function -GL_PREFIX(RasterPos4f): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 640(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 640(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 640(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 640(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos4f), .-GL_PREFIX(RasterPos4f) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos4fv) - .type GL_PREFIX(RasterPos4fv), @function -GL_PREFIX(RasterPos4fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 648(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 648(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 648(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 648(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos4fv), .-GL_PREFIX(RasterPos4fv) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos4i) - .type GL_PREFIX(RasterPos4i), @function -GL_PREFIX(RasterPos4i): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 656(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 656(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 656(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 656(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos4i), .-GL_PREFIX(RasterPos4i) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos4iv) - .type GL_PREFIX(RasterPos4iv), @function -GL_PREFIX(RasterPos4iv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 664(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 664(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 664(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 664(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos4iv), .-GL_PREFIX(RasterPos4iv) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos4s) - .type GL_PREFIX(RasterPos4s), @function -GL_PREFIX(RasterPos4s): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 672(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 672(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 672(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 672(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos4s), .-GL_PREFIX(RasterPos4s) - - .p2align 4,,15 - .globl GL_PREFIX(RasterPos4sv) - .type GL_PREFIX(RasterPos4sv), @function -GL_PREFIX(RasterPos4sv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 680(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 680(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 680(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 680(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RasterPos4sv), .-GL_PREFIX(RasterPos4sv) - - .p2align 4,,15 - .globl GL_PREFIX(Rectd) - .type GL_PREFIX(Rectd), @function -GL_PREFIX(Rectd): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 688(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 688(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 688(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 688(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Rectd), .-GL_PREFIX(Rectd) - - .p2align 4,,15 - .globl GL_PREFIX(Rectdv) - .type GL_PREFIX(Rectdv), @function -GL_PREFIX(Rectdv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 696(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 696(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 696(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 696(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Rectdv), .-GL_PREFIX(Rectdv) - - .p2align 4,,15 - .globl GL_PREFIX(Rectf) - .type GL_PREFIX(Rectf), @function -GL_PREFIX(Rectf): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 704(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 704(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 704(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 704(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Rectf), .-GL_PREFIX(Rectf) - - .p2align 4,,15 - .globl GL_PREFIX(Rectfv) - .type GL_PREFIX(Rectfv), @function -GL_PREFIX(Rectfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 712(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 712(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 712(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 712(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Rectfv), .-GL_PREFIX(Rectfv) - - .p2align 4,,15 - .globl GL_PREFIX(Recti) - .type GL_PREFIX(Recti), @function -GL_PREFIX(Recti): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 720(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 720(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 720(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 720(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Recti), .-GL_PREFIX(Recti) - - .p2align 4,,15 - .globl GL_PREFIX(Rectiv) - .type GL_PREFIX(Rectiv), @function -GL_PREFIX(Rectiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 728(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 728(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 728(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 728(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Rectiv), .-GL_PREFIX(Rectiv) - - .p2align 4,,15 - .globl GL_PREFIX(Rects) - .type GL_PREFIX(Rects), @function -GL_PREFIX(Rects): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 736(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 736(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 736(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 736(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Rects), .-GL_PREFIX(Rects) - - .p2align 4,,15 - .globl GL_PREFIX(Rectsv) - .type GL_PREFIX(Rectsv), @function -GL_PREFIX(Rectsv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 744(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 744(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 744(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 744(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Rectsv), .-GL_PREFIX(Rectsv) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord1d) - .type GL_PREFIX(TexCoord1d), @function -GL_PREFIX(TexCoord1d): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 752(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $8, %rsp - movq %xmm0, (%rsp) - call _x86_64_get_dispatch@PLT - movq (%rsp), %xmm0 - addq $8, %rsp - movq 752(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 752(%rax), %r11 - jmp *%r11 -1: - subq $8, %rsp - movq %xmm0, (%rsp) - call _glapi_get_dispatch - movq (%rsp), %xmm0 - addq $8, %rsp - movq 752(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord1d), .-GL_PREFIX(TexCoord1d) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord1dv) - .type GL_PREFIX(TexCoord1dv), @function -GL_PREFIX(TexCoord1dv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 760(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 760(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 760(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 760(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord1dv), .-GL_PREFIX(TexCoord1dv) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord1f) - .type GL_PREFIX(TexCoord1f), @function -GL_PREFIX(TexCoord1f): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 768(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $8, %rsp - movq %xmm0, (%rsp) - call _x86_64_get_dispatch@PLT - movq (%rsp), %xmm0 - addq $8, %rsp - movq 768(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 768(%rax), %r11 - jmp *%r11 -1: - subq $8, %rsp - movq %xmm0, (%rsp) - call _glapi_get_dispatch - movq (%rsp), %xmm0 - addq $8, %rsp - movq 768(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord1f), .-GL_PREFIX(TexCoord1f) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord1fv) - .type GL_PREFIX(TexCoord1fv), @function -GL_PREFIX(TexCoord1fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 776(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 776(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 776(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 776(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord1fv), .-GL_PREFIX(TexCoord1fv) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord1i) - .type GL_PREFIX(TexCoord1i), @function -GL_PREFIX(TexCoord1i): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 784(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 784(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 784(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 784(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord1i), .-GL_PREFIX(TexCoord1i) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord1iv) - .type GL_PREFIX(TexCoord1iv), @function -GL_PREFIX(TexCoord1iv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 792(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 792(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 792(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 792(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord1iv), .-GL_PREFIX(TexCoord1iv) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord1s) - .type GL_PREFIX(TexCoord1s), @function -GL_PREFIX(TexCoord1s): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 800(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 800(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 800(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 800(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord1s), .-GL_PREFIX(TexCoord1s) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord1sv) - .type GL_PREFIX(TexCoord1sv), @function -GL_PREFIX(TexCoord1sv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 808(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 808(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 808(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 808(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord1sv), .-GL_PREFIX(TexCoord1sv) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord2d) - .type GL_PREFIX(TexCoord2d), @function -GL_PREFIX(TexCoord2d): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 816(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 816(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 816(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 816(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord2d), .-GL_PREFIX(TexCoord2d) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord2dv) - .type GL_PREFIX(TexCoord2dv), @function -GL_PREFIX(TexCoord2dv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 824(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 824(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 824(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 824(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord2dv), .-GL_PREFIX(TexCoord2dv) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord2f) - .type GL_PREFIX(TexCoord2f), @function -GL_PREFIX(TexCoord2f): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 832(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 832(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 832(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 832(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord2f), .-GL_PREFIX(TexCoord2f) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord2fv) - .type GL_PREFIX(TexCoord2fv), @function -GL_PREFIX(TexCoord2fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 840(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 840(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 840(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 840(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord2fv), .-GL_PREFIX(TexCoord2fv) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord2i) - .type GL_PREFIX(TexCoord2i), @function -GL_PREFIX(TexCoord2i): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 848(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 848(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 848(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 848(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord2i), .-GL_PREFIX(TexCoord2i) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord2iv) - .type GL_PREFIX(TexCoord2iv), @function -GL_PREFIX(TexCoord2iv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 856(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 856(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 856(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 856(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord2iv), .-GL_PREFIX(TexCoord2iv) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord2s) - .type GL_PREFIX(TexCoord2s), @function -GL_PREFIX(TexCoord2s): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 864(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 864(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 864(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 864(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord2s), .-GL_PREFIX(TexCoord2s) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord2sv) - .type GL_PREFIX(TexCoord2sv), @function -GL_PREFIX(TexCoord2sv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 872(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 872(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 872(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 872(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord2sv), .-GL_PREFIX(TexCoord2sv) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord3d) - .type GL_PREFIX(TexCoord3d), @function -GL_PREFIX(TexCoord3d): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 880(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 880(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 880(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 880(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord3d), .-GL_PREFIX(TexCoord3d) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord3dv) - .type GL_PREFIX(TexCoord3dv), @function -GL_PREFIX(TexCoord3dv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 888(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 888(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 888(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 888(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord3dv), .-GL_PREFIX(TexCoord3dv) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord3f) - .type GL_PREFIX(TexCoord3f), @function -GL_PREFIX(TexCoord3f): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 896(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 896(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 896(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 896(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord3f), .-GL_PREFIX(TexCoord3f) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord3fv) - .type GL_PREFIX(TexCoord3fv), @function -GL_PREFIX(TexCoord3fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 904(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 904(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 904(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 904(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord3fv), .-GL_PREFIX(TexCoord3fv) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord3i) - .type GL_PREFIX(TexCoord3i), @function -GL_PREFIX(TexCoord3i): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 912(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 912(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 912(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 912(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord3i), .-GL_PREFIX(TexCoord3i) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord3iv) - .type GL_PREFIX(TexCoord3iv), @function -GL_PREFIX(TexCoord3iv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 920(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 920(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 920(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 920(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord3iv), .-GL_PREFIX(TexCoord3iv) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord3s) - .type GL_PREFIX(TexCoord3s), @function -GL_PREFIX(TexCoord3s): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 928(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 928(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 928(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 928(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord3s), .-GL_PREFIX(TexCoord3s) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord3sv) - .type GL_PREFIX(TexCoord3sv), @function -GL_PREFIX(TexCoord3sv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 936(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 936(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 936(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 936(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord3sv), .-GL_PREFIX(TexCoord3sv) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord4d) - .type GL_PREFIX(TexCoord4d), @function -GL_PREFIX(TexCoord4d): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 944(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 944(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 944(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 944(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord4d), .-GL_PREFIX(TexCoord4d) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord4dv) - .type GL_PREFIX(TexCoord4dv), @function -GL_PREFIX(TexCoord4dv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 952(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 952(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 952(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 952(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord4dv), .-GL_PREFIX(TexCoord4dv) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord4f) - .type GL_PREFIX(TexCoord4f), @function -GL_PREFIX(TexCoord4f): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 960(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 960(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 960(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 960(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord4f), .-GL_PREFIX(TexCoord4f) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord4fv) - .type GL_PREFIX(TexCoord4fv), @function -GL_PREFIX(TexCoord4fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 968(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 968(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 968(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 968(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord4fv), .-GL_PREFIX(TexCoord4fv) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord4i) - .type GL_PREFIX(TexCoord4i), @function -GL_PREFIX(TexCoord4i): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 976(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 976(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 976(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 976(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord4i), .-GL_PREFIX(TexCoord4i) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord4iv) - .type GL_PREFIX(TexCoord4iv), @function -GL_PREFIX(TexCoord4iv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 984(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 984(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 984(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 984(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord4iv), .-GL_PREFIX(TexCoord4iv) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord4s) - .type GL_PREFIX(TexCoord4s), @function -GL_PREFIX(TexCoord4s): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 992(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 992(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 992(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 992(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord4s), .-GL_PREFIX(TexCoord4s) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoord4sv) - .type GL_PREFIX(TexCoord4sv), @function -GL_PREFIX(TexCoord4sv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1000(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1000(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1000(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1000(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoord4sv), .-GL_PREFIX(TexCoord4sv) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex2d) - .type GL_PREFIX(Vertex2d), @function -GL_PREFIX(Vertex2d): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1008(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 1008(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1008(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 1008(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex2d), .-GL_PREFIX(Vertex2d) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex2dv) - .type GL_PREFIX(Vertex2dv), @function -GL_PREFIX(Vertex2dv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1016(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1016(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1016(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1016(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex2dv), .-GL_PREFIX(Vertex2dv) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex2f) - .type GL_PREFIX(Vertex2f), @function -GL_PREFIX(Vertex2f): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1024(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 1024(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1024(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 1024(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex2f), .-GL_PREFIX(Vertex2f) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex2fv) - .type GL_PREFIX(Vertex2fv), @function -GL_PREFIX(Vertex2fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1032(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1032(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1032(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1032(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex2fv), .-GL_PREFIX(Vertex2fv) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex2i) - .type GL_PREFIX(Vertex2i), @function -GL_PREFIX(Vertex2i): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1040(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 1040(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1040(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 1040(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex2i), .-GL_PREFIX(Vertex2i) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex2iv) - .type GL_PREFIX(Vertex2iv), @function -GL_PREFIX(Vertex2iv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1048(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1048(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1048(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1048(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex2iv), .-GL_PREFIX(Vertex2iv) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex2s) - .type GL_PREFIX(Vertex2s), @function -GL_PREFIX(Vertex2s): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1056(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 1056(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1056(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 1056(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex2s), .-GL_PREFIX(Vertex2s) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex2sv) - .type GL_PREFIX(Vertex2sv), @function -GL_PREFIX(Vertex2sv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1064(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1064(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1064(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1064(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex2sv), .-GL_PREFIX(Vertex2sv) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex3d) - .type GL_PREFIX(Vertex3d), @function -GL_PREFIX(Vertex3d): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1072(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 1072(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1072(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 1072(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex3d), .-GL_PREFIX(Vertex3d) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex3dv) - .type GL_PREFIX(Vertex3dv), @function -GL_PREFIX(Vertex3dv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1080(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1080(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1080(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1080(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex3dv), .-GL_PREFIX(Vertex3dv) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex3f) - .type GL_PREFIX(Vertex3f), @function -GL_PREFIX(Vertex3f): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1088(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 1088(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1088(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 1088(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex3f), .-GL_PREFIX(Vertex3f) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex3fv) - .type GL_PREFIX(Vertex3fv), @function -GL_PREFIX(Vertex3fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1096(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1096(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1096(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1096(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex3fv), .-GL_PREFIX(Vertex3fv) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex3i) - .type GL_PREFIX(Vertex3i), @function -GL_PREFIX(Vertex3i): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1104(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1104(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1104(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1104(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex3i), .-GL_PREFIX(Vertex3i) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex3iv) - .type GL_PREFIX(Vertex3iv), @function -GL_PREFIX(Vertex3iv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1112(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1112(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1112(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1112(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex3iv), .-GL_PREFIX(Vertex3iv) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex3s) - .type GL_PREFIX(Vertex3s), @function -GL_PREFIX(Vertex3s): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1120(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1120(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1120(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1120(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex3s), .-GL_PREFIX(Vertex3s) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex3sv) - .type GL_PREFIX(Vertex3sv), @function -GL_PREFIX(Vertex3sv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1128(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1128(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1128(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1128(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex3sv), .-GL_PREFIX(Vertex3sv) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex4d) - .type GL_PREFIX(Vertex4d), @function -GL_PREFIX(Vertex4d): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1136(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 1136(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1136(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 1136(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex4d), .-GL_PREFIX(Vertex4d) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex4dv) - .type GL_PREFIX(Vertex4dv), @function -GL_PREFIX(Vertex4dv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1144(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1144(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1144(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1144(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex4dv), .-GL_PREFIX(Vertex4dv) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex4f) - .type GL_PREFIX(Vertex4f), @function -GL_PREFIX(Vertex4f): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1152(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 1152(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1152(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 1152(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex4f), .-GL_PREFIX(Vertex4f) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex4fv) - .type GL_PREFIX(Vertex4fv), @function -GL_PREFIX(Vertex4fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1160(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1160(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1160(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1160(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex4fv), .-GL_PREFIX(Vertex4fv) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex4i) - .type GL_PREFIX(Vertex4i), @function -GL_PREFIX(Vertex4i): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1168(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 1168(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1168(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 1168(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex4i), .-GL_PREFIX(Vertex4i) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex4iv) - .type GL_PREFIX(Vertex4iv), @function -GL_PREFIX(Vertex4iv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1176(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1176(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1176(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1176(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex4iv), .-GL_PREFIX(Vertex4iv) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex4s) - .type GL_PREFIX(Vertex4s), @function -GL_PREFIX(Vertex4s): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1184(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 1184(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1184(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 1184(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex4s), .-GL_PREFIX(Vertex4s) - - .p2align 4,,15 - .globl GL_PREFIX(Vertex4sv) - .type GL_PREFIX(Vertex4sv), @function -GL_PREFIX(Vertex4sv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1192(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1192(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1192(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1192(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Vertex4sv), .-GL_PREFIX(Vertex4sv) - - .p2align 4,,15 - .globl GL_PREFIX(ClipPlane) - .type GL_PREFIX(ClipPlane), @function -GL_PREFIX(ClipPlane): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1200(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 1200(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1200(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 1200(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ClipPlane), .-GL_PREFIX(ClipPlane) - - .p2align 4,,15 - .globl GL_PREFIX(ColorMaterial) - .type GL_PREFIX(ColorMaterial), @function -GL_PREFIX(ColorMaterial): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1208(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 1208(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1208(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 1208(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ColorMaterial), .-GL_PREFIX(ColorMaterial) - - .p2align 4,,15 - .globl GL_PREFIX(CullFace) - .type GL_PREFIX(CullFace), @function -GL_PREFIX(CullFace): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1216(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1216(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1216(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1216(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CullFace), .-GL_PREFIX(CullFace) - - .p2align 4,,15 - .globl GL_PREFIX(Fogf) - .type GL_PREFIX(Fogf), @function -GL_PREFIX(Fogf): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1224(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 1224(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1224(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 1224(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Fogf), .-GL_PREFIX(Fogf) - - .p2align 4,,15 - .globl GL_PREFIX(Fogfv) - .type GL_PREFIX(Fogfv), @function -GL_PREFIX(Fogfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1232(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 1232(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1232(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 1232(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Fogfv), .-GL_PREFIX(Fogfv) - - .p2align 4,,15 - .globl GL_PREFIX(Fogi) - .type GL_PREFIX(Fogi), @function -GL_PREFIX(Fogi): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1240(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 1240(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1240(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 1240(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Fogi), .-GL_PREFIX(Fogi) - - .p2align 4,,15 - .globl GL_PREFIX(Fogiv) - .type GL_PREFIX(Fogiv), @function -GL_PREFIX(Fogiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1248(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 1248(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1248(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 1248(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Fogiv), .-GL_PREFIX(Fogiv) - - .p2align 4,,15 - .globl GL_PREFIX(FrontFace) - .type GL_PREFIX(FrontFace), @function -GL_PREFIX(FrontFace): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1256(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1256(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1256(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1256(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(FrontFace), .-GL_PREFIX(FrontFace) - - .p2align 4,,15 - .globl GL_PREFIX(Hint) - .type GL_PREFIX(Hint), @function -GL_PREFIX(Hint): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1264(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 1264(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1264(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 1264(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Hint), .-GL_PREFIX(Hint) - - .p2align 4,,15 - .globl GL_PREFIX(Lightf) - .type GL_PREFIX(Lightf), @function -GL_PREFIX(Lightf): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1272(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $24, %rsp - movq 1272(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1272(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $24, %rsp - movq 1272(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Lightf), .-GL_PREFIX(Lightf) - - .p2align 4,,15 - .globl GL_PREFIX(Lightfv) - .type GL_PREFIX(Lightfv), @function -GL_PREFIX(Lightfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1280(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1280(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1280(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1280(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Lightfv), .-GL_PREFIX(Lightfv) - - .p2align 4,,15 - .globl GL_PREFIX(Lighti) - .type GL_PREFIX(Lighti), @function -GL_PREFIX(Lighti): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1288(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1288(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1288(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1288(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Lighti), .-GL_PREFIX(Lighti) - - .p2align 4,,15 - .globl GL_PREFIX(Lightiv) - .type GL_PREFIX(Lightiv), @function -GL_PREFIX(Lightiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1296(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1296(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1296(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1296(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Lightiv), .-GL_PREFIX(Lightiv) - - .p2align 4,,15 - .globl GL_PREFIX(LightModelf) - .type GL_PREFIX(LightModelf), @function -GL_PREFIX(LightModelf): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1304(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 1304(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1304(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 1304(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(LightModelf), .-GL_PREFIX(LightModelf) - - .p2align 4,,15 - .globl GL_PREFIX(LightModelfv) - .type GL_PREFIX(LightModelfv), @function -GL_PREFIX(LightModelfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1312(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 1312(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1312(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 1312(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(LightModelfv), .-GL_PREFIX(LightModelfv) - - .p2align 4,,15 - .globl GL_PREFIX(LightModeli) - .type GL_PREFIX(LightModeli), @function -GL_PREFIX(LightModeli): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1320(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 1320(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1320(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 1320(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(LightModeli), .-GL_PREFIX(LightModeli) - - .p2align 4,,15 - .globl GL_PREFIX(LightModeliv) - .type GL_PREFIX(LightModeliv), @function -GL_PREFIX(LightModeliv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1328(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 1328(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1328(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 1328(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(LightModeliv), .-GL_PREFIX(LightModeliv) - - .p2align 4,,15 - .globl GL_PREFIX(LineStipple) - .type GL_PREFIX(LineStipple), @function -GL_PREFIX(LineStipple): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1336(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 1336(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1336(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 1336(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(LineStipple), .-GL_PREFIX(LineStipple) - - .p2align 4,,15 - .globl GL_PREFIX(LineWidth) - .type GL_PREFIX(LineWidth), @function -GL_PREFIX(LineWidth): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1344(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $8, %rsp - movq %xmm0, (%rsp) - call _x86_64_get_dispatch@PLT - movq (%rsp), %xmm0 - addq $8, %rsp - movq 1344(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1344(%rax), %r11 - jmp *%r11 -1: - subq $8, %rsp - movq %xmm0, (%rsp) - call _glapi_get_dispatch - movq (%rsp), %xmm0 - addq $8, %rsp - movq 1344(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(LineWidth), .-GL_PREFIX(LineWidth) - - .p2align 4,,15 - .globl GL_PREFIX(Materialf) - .type GL_PREFIX(Materialf), @function -GL_PREFIX(Materialf): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1352(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $24, %rsp - movq 1352(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1352(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $24, %rsp - movq 1352(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Materialf), .-GL_PREFIX(Materialf) - - .p2align 4,,15 - .globl GL_PREFIX(Materialfv) - .type GL_PREFIX(Materialfv), @function -GL_PREFIX(Materialfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1360(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1360(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1360(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1360(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Materialfv), .-GL_PREFIX(Materialfv) - - .p2align 4,,15 - .globl GL_PREFIX(Materiali) - .type GL_PREFIX(Materiali), @function -GL_PREFIX(Materiali): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1368(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1368(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1368(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1368(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Materiali), .-GL_PREFIX(Materiali) - - .p2align 4,,15 - .globl GL_PREFIX(Materialiv) - .type GL_PREFIX(Materialiv), @function -GL_PREFIX(Materialiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1376(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1376(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1376(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1376(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Materialiv), .-GL_PREFIX(Materialiv) - - .p2align 4,,15 - .globl GL_PREFIX(PointSize) - .type GL_PREFIX(PointSize), @function -GL_PREFIX(PointSize): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1384(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $8, %rsp - movq %xmm0, (%rsp) - call _x86_64_get_dispatch@PLT - movq (%rsp), %xmm0 - addq $8, %rsp - movq 1384(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1384(%rax), %r11 - jmp *%r11 -1: - subq $8, %rsp - movq %xmm0, (%rsp) - call _glapi_get_dispatch - movq (%rsp), %xmm0 - addq $8, %rsp - movq 1384(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PointSize), .-GL_PREFIX(PointSize) - - .p2align 4,,15 - .globl GL_PREFIX(PolygonMode) - .type GL_PREFIX(PolygonMode), @function -GL_PREFIX(PolygonMode): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1392(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 1392(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1392(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 1392(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PolygonMode), .-GL_PREFIX(PolygonMode) - - .p2align 4,,15 - .globl GL_PREFIX(PolygonStipple) - .type GL_PREFIX(PolygonStipple), @function -GL_PREFIX(PolygonStipple): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1400(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1400(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1400(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1400(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PolygonStipple), .-GL_PREFIX(PolygonStipple) - - .p2align 4,,15 - .globl GL_PREFIX(Scissor) - .type GL_PREFIX(Scissor), @function -GL_PREFIX(Scissor): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1408(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 1408(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1408(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 1408(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Scissor), .-GL_PREFIX(Scissor) - - .p2align 4,,15 - .globl GL_PREFIX(ShadeModel) - .type GL_PREFIX(ShadeModel), @function -GL_PREFIX(ShadeModel): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1416(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1416(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1416(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1416(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ShadeModel), .-GL_PREFIX(ShadeModel) - - .p2align 4,,15 - .globl GL_PREFIX(TexParameterf) - .type GL_PREFIX(TexParameterf), @function -GL_PREFIX(TexParameterf): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1424(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $24, %rsp - movq 1424(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1424(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $24, %rsp - movq 1424(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexParameterf), .-GL_PREFIX(TexParameterf) - - .p2align 4,,15 - .globl GL_PREFIX(TexParameterfv) - .type GL_PREFIX(TexParameterfv), @function -GL_PREFIX(TexParameterfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1432(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1432(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1432(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1432(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexParameterfv), .-GL_PREFIX(TexParameterfv) - - .p2align 4,,15 - .globl GL_PREFIX(TexParameteri) - .type GL_PREFIX(TexParameteri), @function -GL_PREFIX(TexParameteri): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1440(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1440(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1440(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1440(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexParameteri), .-GL_PREFIX(TexParameteri) - - .p2align 4,,15 - .globl GL_PREFIX(TexParameteriv) - .type GL_PREFIX(TexParameteriv), @function -GL_PREFIX(TexParameteriv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1448(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1448(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1448(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1448(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexParameteriv), .-GL_PREFIX(TexParameteriv) - - .p2align 4,,15 - .globl GL_PREFIX(TexImage1D) - .type GL_PREFIX(TexImage1D), @function -GL_PREFIX(TexImage1D): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1456(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 1456(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1456(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 1456(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexImage1D), .-GL_PREFIX(TexImage1D) - - .p2align 4,,15 - .globl GL_PREFIX(TexImage2D) - .type GL_PREFIX(TexImage2D), @function -GL_PREFIX(TexImage2D): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1464(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 1464(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1464(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 1464(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexImage2D), .-GL_PREFIX(TexImage2D) - - .p2align 4,,15 - .globl GL_PREFIX(TexEnvf) - .type GL_PREFIX(TexEnvf), @function -GL_PREFIX(TexEnvf): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1472(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $24, %rsp - movq 1472(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1472(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $24, %rsp - movq 1472(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexEnvf), .-GL_PREFIX(TexEnvf) - - .p2align 4,,15 - .globl GL_PREFIX(TexEnvfv) - .type GL_PREFIX(TexEnvfv), @function -GL_PREFIX(TexEnvfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1480(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1480(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1480(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1480(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexEnvfv), .-GL_PREFIX(TexEnvfv) - - .p2align 4,,15 - .globl GL_PREFIX(TexEnvi) - .type GL_PREFIX(TexEnvi), @function -GL_PREFIX(TexEnvi): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1488(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1488(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1488(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1488(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexEnvi), .-GL_PREFIX(TexEnvi) - - .p2align 4,,15 - .globl GL_PREFIX(TexEnviv) - .type GL_PREFIX(TexEnviv), @function -GL_PREFIX(TexEnviv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1496(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1496(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1496(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1496(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexEnviv), .-GL_PREFIX(TexEnviv) - - .p2align 4,,15 - .globl GL_PREFIX(TexGend) - .type GL_PREFIX(TexGend), @function -GL_PREFIX(TexGend): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1504(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $24, %rsp - movq 1504(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1504(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $24, %rsp - movq 1504(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexGend), .-GL_PREFIX(TexGend) - - .p2align 4,,15 - .globl GL_PREFIX(TexGendv) - .type GL_PREFIX(TexGendv), @function -GL_PREFIX(TexGendv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1512(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1512(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1512(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1512(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexGendv), .-GL_PREFIX(TexGendv) - - .p2align 4,,15 - .globl GL_PREFIX(TexGenf) - .type GL_PREFIX(TexGenf), @function -GL_PREFIX(TexGenf): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1520(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $24, %rsp - movq 1520(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1520(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $24, %rsp - movq 1520(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexGenf), .-GL_PREFIX(TexGenf) - - .p2align 4,,15 - .globl GL_PREFIX(TexGenfv) - .type GL_PREFIX(TexGenfv), @function -GL_PREFIX(TexGenfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1528(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1528(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1528(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1528(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexGenfv), .-GL_PREFIX(TexGenfv) - - .p2align 4,,15 - .globl GL_PREFIX(TexGeni) - .type GL_PREFIX(TexGeni), @function -GL_PREFIX(TexGeni): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1536(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1536(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1536(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1536(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexGeni), .-GL_PREFIX(TexGeni) - - .p2align 4,,15 - .globl GL_PREFIX(TexGeniv) - .type GL_PREFIX(TexGeniv), @function -GL_PREFIX(TexGeniv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1544(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1544(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1544(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1544(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexGeniv), .-GL_PREFIX(TexGeniv) - - .p2align 4,,15 - .globl GL_PREFIX(FeedbackBuffer) - .type GL_PREFIX(FeedbackBuffer), @function -GL_PREFIX(FeedbackBuffer): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1552(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1552(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1552(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1552(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(FeedbackBuffer), .-GL_PREFIX(FeedbackBuffer) - - .p2align 4,,15 - .globl GL_PREFIX(SelectBuffer) - .type GL_PREFIX(SelectBuffer), @function -GL_PREFIX(SelectBuffer): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1560(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 1560(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1560(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 1560(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SelectBuffer), .-GL_PREFIX(SelectBuffer) - - .p2align 4,,15 - .globl GL_PREFIX(RenderMode) - .type GL_PREFIX(RenderMode), @function -GL_PREFIX(RenderMode): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1568(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1568(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1568(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1568(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RenderMode), .-GL_PREFIX(RenderMode) - - .p2align 4,,15 - .globl GL_PREFIX(InitNames) - .type GL_PREFIX(InitNames), @function -GL_PREFIX(InitNames): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1576(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 1576(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1576(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 1576(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(InitNames), .-GL_PREFIX(InitNames) - - .p2align 4,,15 - .globl GL_PREFIX(LoadName) - .type GL_PREFIX(LoadName), @function -GL_PREFIX(LoadName): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1584(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1584(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1584(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1584(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(LoadName), .-GL_PREFIX(LoadName) - - .p2align 4,,15 - .globl GL_PREFIX(PassThrough) - .type GL_PREFIX(PassThrough), @function -GL_PREFIX(PassThrough): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1592(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $8, %rsp - movq %xmm0, (%rsp) - call _x86_64_get_dispatch@PLT - movq (%rsp), %xmm0 - addq $8, %rsp - movq 1592(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1592(%rax), %r11 - jmp *%r11 -1: - subq $8, %rsp - movq %xmm0, (%rsp) - call _glapi_get_dispatch - movq (%rsp), %xmm0 - addq $8, %rsp - movq 1592(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PassThrough), .-GL_PREFIX(PassThrough) - - .p2align 4,,15 - .globl GL_PREFIX(PopName) - .type GL_PREFIX(PopName), @function -GL_PREFIX(PopName): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1600(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 1600(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1600(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 1600(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PopName), .-GL_PREFIX(PopName) - - .p2align 4,,15 - .globl GL_PREFIX(PushName) - .type GL_PREFIX(PushName), @function -GL_PREFIX(PushName): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1608(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1608(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1608(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1608(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PushName), .-GL_PREFIX(PushName) - - .p2align 4,,15 - .globl GL_PREFIX(DrawBuffer) - .type GL_PREFIX(DrawBuffer), @function -GL_PREFIX(DrawBuffer): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1616(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1616(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1616(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1616(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DrawBuffer), .-GL_PREFIX(DrawBuffer) - - .p2align 4,,15 - .globl GL_PREFIX(Clear) - .type GL_PREFIX(Clear), @function -GL_PREFIX(Clear): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1624(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1624(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1624(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1624(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Clear), .-GL_PREFIX(Clear) - - .p2align 4,,15 - .globl GL_PREFIX(ClearAccum) - .type GL_PREFIX(ClearAccum), @function -GL_PREFIX(ClearAccum): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1632(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 1632(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1632(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 1632(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ClearAccum), .-GL_PREFIX(ClearAccum) - - .p2align 4,,15 - .globl GL_PREFIX(ClearIndex) - .type GL_PREFIX(ClearIndex), @function -GL_PREFIX(ClearIndex): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1640(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $8, %rsp - movq %xmm0, (%rsp) - call _x86_64_get_dispatch@PLT - movq (%rsp), %xmm0 - addq $8, %rsp - movq 1640(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1640(%rax), %r11 - jmp *%r11 -1: - subq $8, %rsp - movq %xmm0, (%rsp) - call _glapi_get_dispatch - movq (%rsp), %xmm0 - addq $8, %rsp - movq 1640(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ClearIndex), .-GL_PREFIX(ClearIndex) - - .p2align 4,,15 - .globl GL_PREFIX(ClearColor) - .type GL_PREFIX(ClearColor), @function -GL_PREFIX(ClearColor): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1648(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 1648(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1648(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 1648(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ClearColor), .-GL_PREFIX(ClearColor) - - .p2align 4,,15 - .globl GL_PREFIX(ClearStencil) - .type GL_PREFIX(ClearStencil), @function -GL_PREFIX(ClearStencil): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1656(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1656(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1656(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1656(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ClearStencil), .-GL_PREFIX(ClearStencil) - - .p2align 4,,15 - .globl GL_PREFIX(ClearDepth) - .type GL_PREFIX(ClearDepth), @function -GL_PREFIX(ClearDepth): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1664(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1664(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1664(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1664(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ClearDepth), .-GL_PREFIX(ClearDepth) - - .p2align 4,,15 - .globl GL_PREFIX(StencilMask) - .type GL_PREFIX(StencilMask), @function -GL_PREFIX(StencilMask): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1672(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1672(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1672(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1672(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(StencilMask), .-GL_PREFIX(StencilMask) - - .p2align 4,,15 - .globl GL_PREFIX(ColorMask) - .type GL_PREFIX(ColorMask), @function -GL_PREFIX(ColorMask): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1680(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 1680(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1680(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 1680(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ColorMask), .-GL_PREFIX(ColorMask) - - .p2align 4,,15 - .globl GL_PREFIX(DepthMask) - .type GL_PREFIX(DepthMask), @function -GL_PREFIX(DepthMask): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1688(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1688(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1688(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1688(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DepthMask), .-GL_PREFIX(DepthMask) - - .p2align 4,,15 - .globl GL_PREFIX(IndexMask) - .type GL_PREFIX(IndexMask), @function -GL_PREFIX(IndexMask): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1696(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1696(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1696(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1696(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(IndexMask), .-GL_PREFIX(IndexMask) - - .p2align 4,,15 - .globl GL_PREFIX(Accum) - .type GL_PREFIX(Accum), @function -GL_PREFIX(Accum): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1704(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 1704(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1704(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 1704(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Accum), .-GL_PREFIX(Accum) - - .p2align 4,,15 - .globl GL_PREFIX(Disable) - .type GL_PREFIX(Disable), @function -GL_PREFIX(Disable): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1712(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1712(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1712(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1712(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Disable), .-GL_PREFIX(Disable) - - .p2align 4,,15 - .globl GL_PREFIX(Enable) - .type GL_PREFIX(Enable), @function -GL_PREFIX(Enable): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1720(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1720(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1720(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1720(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Enable), .-GL_PREFIX(Enable) - - .p2align 4,,15 - .globl GL_PREFIX(Finish) - .type GL_PREFIX(Finish), @function -GL_PREFIX(Finish): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1728(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 1728(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1728(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 1728(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Finish), .-GL_PREFIX(Finish) - - .p2align 4,,15 - .globl GL_PREFIX(Flush) - .type GL_PREFIX(Flush), @function -GL_PREFIX(Flush): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1736(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 1736(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1736(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 1736(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Flush), .-GL_PREFIX(Flush) - - .p2align 4,,15 - .globl GL_PREFIX(PopAttrib) - .type GL_PREFIX(PopAttrib), @function -GL_PREFIX(PopAttrib): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1744(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 1744(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1744(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 1744(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PopAttrib), .-GL_PREFIX(PopAttrib) - - .p2align 4,,15 - .globl GL_PREFIX(PushAttrib) - .type GL_PREFIX(PushAttrib), @function -GL_PREFIX(PushAttrib): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1752(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1752(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1752(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1752(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PushAttrib), .-GL_PREFIX(PushAttrib) - - .p2align 4,,15 - .globl GL_PREFIX(Map1d) - .type GL_PREFIX(Map1d), @function -GL_PREFIX(Map1d): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1760(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $56, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %rsi, 24(%rsp) - movq %rdx, 32(%rsp) - movq %rcx, 40(%rsp) - call _x86_64_get_dispatch@PLT - movq 40(%rsp), %rcx - movq 32(%rsp), %rdx - movq 24(%rsp), %rsi - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $56, %rsp - movq 1760(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1760(%rax), %r11 - jmp *%r11 -1: - subq $56, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %rsi, 24(%rsp) - movq %rdx, 32(%rsp) - movq %rcx, 40(%rsp) - call _glapi_get_dispatch - movq 40(%rsp), %rcx - movq 32(%rsp), %rdx - movq 24(%rsp), %rsi - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $56, %rsp - movq 1760(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Map1d), .-GL_PREFIX(Map1d) - - .p2align 4,,15 - .globl GL_PREFIX(Map1f) - .type GL_PREFIX(Map1f), @function -GL_PREFIX(Map1f): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1768(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $56, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %rsi, 24(%rsp) - movq %rdx, 32(%rsp) - movq %rcx, 40(%rsp) - call _x86_64_get_dispatch@PLT - movq 40(%rsp), %rcx - movq 32(%rsp), %rdx - movq 24(%rsp), %rsi - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $56, %rsp - movq 1768(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1768(%rax), %r11 - jmp *%r11 -1: - subq $56, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %rsi, 24(%rsp) - movq %rdx, 32(%rsp) - movq %rcx, 40(%rsp) - call _glapi_get_dispatch - movq 40(%rsp), %rcx - movq 32(%rsp), %rdx - movq 24(%rsp), %rsi - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $56, %rsp - movq 1768(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Map1f), .-GL_PREFIX(Map1f) - - .p2align 4,,15 - .globl GL_PREFIX(Map2d) - .type GL_PREFIX(Map2d), @function -GL_PREFIX(Map2d): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1776(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $88, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %rsi, 24(%rsp) - movq %rdx, 32(%rsp) - movq %xmm2, 40(%rsp) - movq %xmm3, 48(%rsp) - movq %rcx, 56(%rsp) - movq %r8, 64(%rsp) - movq %r9, 72(%rsp) - call _x86_64_get_dispatch@PLT - movq 72(%rsp), %r9 - movq 64(%rsp), %r8 - movq 56(%rsp), %rcx - movq 48(%rsp), %xmm3 - movq 40(%rsp), %xmm2 - movq 32(%rsp), %rdx - movq 24(%rsp), %rsi - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $88, %rsp - movq 1776(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1776(%rax), %r11 - jmp *%r11 -1: - subq $88, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %rsi, 24(%rsp) - movq %rdx, 32(%rsp) - movq %xmm2, 40(%rsp) - movq %xmm3, 48(%rsp) - movq %rcx, 56(%rsp) - movq %r8, 64(%rsp) - movq %r9, 72(%rsp) - call _glapi_get_dispatch - movq 72(%rsp), %r9 - movq 64(%rsp), %r8 - movq 56(%rsp), %rcx - movq 48(%rsp), %xmm3 - movq 40(%rsp), %xmm2 - movq 32(%rsp), %rdx - movq 24(%rsp), %rsi - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $88, %rsp - movq 1776(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Map2d), .-GL_PREFIX(Map2d) - - .p2align 4,,15 - .globl GL_PREFIX(Map2f) - .type GL_PREFIX(Map2f), @function -GL_PREFIX(Map2f): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1784(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $88, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %rsi, 24(%rsp) - movq %rdx, 32(%rsp) - movq %xmm2, 40(%rsp) - movq %xmm3, 48(%rsp) - movq %rcx, 56(%rsp) - movq %r8, 64(%rsp) - movq %r9, 72(%rsp) - call _x86_64_get_dispatch@PLT - movq 72(%rsp), %r9 - movq 64(%rsp), %r8 - movq 56(%rsp), %rcx - movq 48(%rsp), %xmm3 - movq 40(%rsp), %xmm2 - movq 32(%rsp), %rdx - movq 24(%rsp), %rsi - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $88, %rsp - movq 1784(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1784(%rax), %r11 - jmp *%r11 -1: - subq $88, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %rsi, 24(%rsp) - movq %rdx, 32(%rsp) - movq %xmm2, 40(%rsp) - movq %xmm3, 48(%rsp) - movq %rcx, 56(%rsp) - movq %r8, 64(%rsp) - movq %r9, 72(%rsp) - call _glapi_get_dispatch - movq 72(%rsp), %r9 - movq 64(%rsp), %r8 - movq 56(%rsp), %rcx - movq 48(%rsp), %xmm3 - movq 40(%rsp), %xmm2 - movq 32(%rsp), %rdx - movq 24(%rsp), %rsi - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $88, %rsp - movq 1784(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Map2f), .-GL_PREFIX(Map2f) - - .p2align 4,,15 - .globl GL_PREFIX(MapGrid1d) - .type GL_PREFIX(MapGrid1d), @function -GL_PREFIX(MapGrid1d): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1792(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 1792(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1792(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 1792(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MapGrid1d), .-GL_PREFIX(MapGrid1d) - - .p2align 4,,15 - .globl GL_PREFIX(MapGrid1f) - .type GL_PREFIX(MapGrid1f), @function -GL_PREFIX(MapGrid1f): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1800(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 1800(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1800(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 1800(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MapGrid1f), .-GL_PREFIX(MapGrid1f) - - .p2align 4,,15 - .globl GL_PREFIX(MapGrid2d) - .type GL_PREFIX(MapGrid2d), @function -GL_PREFIX(MapGrid2d): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1808(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $56, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %rsi, 24(%rsp) - movq %xmm2, 32(%rsp) - movq %xmm3, 40(%rsp) - call _x86_64_get_dispatch@PLT - movq 40(%rsp), %xmm3 - movq 32(%rsp), %xmm2 - movq 24(%rsp), %rsi - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $56, %rsp - movq 1808(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1808(%rax), %r11 - jmp *%r11 -1: - subq $56, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %rsi, 24(%rsp) - movq %xmm2, 32(%rsp) - movq %xmm3, 40(%rsp) - call _glapi_get_dispatch - movq 40(%rsp), %xmm3 - movq 32(%rsp), %xmm2 - movq 24(%rsp), %rsi - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $56, %rsp - movq 1808(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MapGrid2d), .-GL_PREFIX(MapGrid2d) - - .p2align 4,,15 - .globl GL_PREFIX(MapGrid2f) - .type GL_PREFIX(MapGrid2f), @function -GL_PREFIX(MapGrid2f): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1816(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $56, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %rsi, 24(%rsp) - movq %xmm2, 32(%rsp) - movq %xmm3, 40(%rsp) - call _x86_64_get_dispatch@PLT - movq 40(%rsp), %xmm3 - movq 32(%rsp), %xmm2 - movq 24(%rsp), %rsi - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $56, %rsp - movq 1816(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1816(%rax), %r11 - jmp *%r11 -1: - subq $56, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %rsi, 24(%rsp) - movq %xmm2, 32(%rsp) - movq %xmm3, 40(%rsp) - call _glapi_get_dispatch - movq 40(%rsp), %xmm3 - movq 32(%rsp), %xmm2 - movq 24(%rsp), %rsi - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $56, %rsp - movq 1816(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MapGrid2f), .-GL_PREFIX(MapGrid2f) - - .p2align 4,,15 - .globl GL_PREFIX(EvalCoord1d) - .type GL_PREFIX(EvalCoord1d), @function -GL_PREFIX(EvalCoord1d): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1824(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $8, %rsp - movq %xmm0, (%rsp) - call _x86_64_get_dispatch@PLT - movq (%rsp), %xmm0 - addq $8, %rsp - movq 1824(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1824(%rax), %r11 - jmp *%r11 -1: - subq $8, %rsp - movq %xmm0, (%rsp) - call _glapi_get_dispatch - movq (%rsp), %xmm0 - addq $8, %rsp - movq 1824(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EvalCoord1d), .-GL_PREFIX(EvalCoord1d) - - .p2align 4,,15 - .globl GL_PREFIX(EvalCoord1dv) - .type GL_PREFIX(EvalCoord1dv), @function -GL_PREFIX(EvalCoord1dv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1832(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1832(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1832(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1832(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EvalCoord1dv), .-GL_PREFIX(EvalCoord1dv) - - .p2align 4,,15 - .globl GL_PREFIX(EvalCoord1f) - .type GL_PREFIX(EvalCoord1f), @function -GL_PREFIX(EvalCoord1f): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1840(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $8, %rsp - movq %xmm0, (%rsp) - call _x86_64_get_dispatch@PLT - movq (%rsp), %xmm0 - addq $8, %rsp - movq 1840(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1840(%rax), %r11 - jmp *%r11 -1: - subq $8, %rsp - movq %xmm0, (%rsp) - call _glapi_get_dispatch - movq (%rsp), %xmm0 - addq $8, %rsp - movq 1840(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EvalCoord1f), .-GL_PREFIX(EvalCoord1f) - - .p2align 4,,15 - .globl GL_PREFIX(EvalCoord1fv) - .type GL_PREFIX(EvalCoord1fv), @function -GL_PREFIX(EvalCoord1fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1848(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1848(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1848(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1848(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EvalCoord1fv), .-GL_PREFIX(EvalCoord1fv) - - .p2align 4,,15 - .globl GL_PREFIX(EvalCoord2d) - .type GL_PREFIX(EvalCoord2d), @function -GL_PREFIX(EvalCoord2d): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1856(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 1856(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1856(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 1856(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EvalCoord2d), .-GL_PREFIX(EvalCoord2d) - - .p2align 4,,15 - .globl GL_PREFIX(EvalCoord2dv) - .type GL_PREFIX(EvalCoord2dv), @function -GL_PREFIX(EvalCoord2dv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1864(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1864(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1864(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1864(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EvalCoord2dv), .-GL_PREFIX(EvalCoord2dv) - - .p2align 4,,15 - .globl GL_PREFIX(EvalCoord2f) - .type GL_PREFIX(EvalCoord2f), @function -GL_PREFIX(EvalCoord2f): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1872(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 1872(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1872(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 1872(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EvalCoord2f), .-GL_PREFIX(EvalCoord2f) - - .p2align 4,,15 - .globl GL_PREFIX(EvalCoord2fv) - .type GL_PREFIX(EvalCoord2fv), @function -GL_PREFIX(EvalCoord2fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1880(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1880(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1880(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1880(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EvalCoord2fv), .-GL_PREFIX(EvalCoord2fv) - - .p2align 4,,15 - .globl GL_PREFIX(EvalMesh1) - .type GL_PREFIX(EvalMesh1), @function -GL_PREFIX(EvalMesh1): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1888(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1888(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1888(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1888(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EvalMesh1), .-GL_PREFIX(EvalMesh1) - - .p2align 4,,15 - .globl GL_PREFIX(EvalPoint1) - .type GL_PREFIX(EvalPoint1), @function -GL_PREFIX(EvalPoint1): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1896(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1896(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1896(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1896(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EvalPoint1), .-GL_PREFIX(EvalPoint1) - - .p2align 4,,15 - .globl GL_PREFIX(EvalMesh2) - .type GL_PREFIX(EvalMesh2), @function -GL_PREFIX(EvalMesh2): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1904(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 1904(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1904(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 1904(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EvalMesh2), .-GL_PREFIX(EvalMesh2) - - .p2align 4,,15 - .globl GL_PREFIX(EvalPoint2) - .type GL_PREFIX(EvalPoint2), @function -GL_PREFIX(EvalPoint2): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1912(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 1912(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1912(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 1912(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EvalPoint2), .-GL_PREFIX(EvalPoint2) - - .p2align 4,,15 - .globl GL_PREFIX(AlphaFunc) - .type GL_PREFIX(AlphaFunc), @function -GL_PREFIX(AlphaFunc): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1920(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 1920(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1920(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 1920(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(AlphaFunc), .-GL_PREFIX(AlphaFunc) - - .p2align 4,,15 - .globl GL_PREFIX(BlendFunc) - .type GL_PREFIX(BlendFunc), @function -GL_PREFIX(BlendFunc): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1928(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 1928(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1928(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 1928(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BlendFunc), .-GL_PREFIX(BlendFunc) - - .p2align 4,,15 - .globl GL_PREFIX(LogicOp) - .type GL_PREFIX(LogicOp), @function -GL_PREFIX(LogicOp): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1936(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1936(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1936(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1936(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(LogicOp), .-GL_PREFIX(LogicOp) - - .p2align 4,,15 - .globl GL_PREFIX(StencilFunc) - .type GL_PREFIX(StencilFunc), @function -GL_PREFIX(StencilFunc): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1944(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1944(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1944(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1944(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(StencilFunc), .-GL_PREFIX(StencilFunc) - - .p2align 4,,15 - .globl GL_PREFIX(StencilOp) - .type GL_PREFIX(StencilOp), @function -GL_PREFIX(StencilOp): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1952(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 1952(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1952(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 1952(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(StencilOp), .-GL_PREFIX(StencilOp) - - .p2align 4,,15 - .globl GL_PREFIX(DepthFunc) - .type GL_PREFIX(DepthFunc), @function -GL_PREFIX(DepthFunc): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1960(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 1960(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1960(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 1960(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DepthFunc), .-GL_PREFIX(DepthFunc) - - .p2align 4,,15 - .globl GL_PREFIX(PixelZoom) - .type GL_PREFIX(PixelZoom), @function -GL_PREFIX(PixelZoom): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1968(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 1968(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1968(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 1968(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PixelZoom), .-GL_PREFIX(PixelZoom) - - .p2align 4,,15 - .globl GL_PREFIX(PixelTransferf) - .type GL_PREFIX(PixelTransferf), @function -GL_PREFIX(PixelTransferf): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1976(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 1976(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1976(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 1976(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PixelTransferf), .-GL_PREFIX(PixelTransferf) - - .p2align 4,,15 - .globl GL_PREFIX(PixelTransferi) - .type GL_PREFIX(PixelTransferi), @function -GL_PREFIX(PixelTransferi): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1984(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 1984(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1984(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 1984(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PixelTransferi), .-GL_PREFIX(PixelTransferi) - - .p2align 4,,15 - .globl GL_PREFIX(PixelStoref) - .type GL_PREFIX(PixelStoref), @function -GL_PREFIX(PixelStoref): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 1992(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 1992(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 1992(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 1992(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PixelStoref), .-GL_PREFIX(PixelStoref) - - .p2align 4,,15 - .globl GL_PREFIX(PixelStorei) - .type GL_PREFIX(PixelStorei), @function -GL_PREFIX(PixelStorei): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2000(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 2000(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2000(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 2000(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PixelStorei), .-GL_PREFIX(PixelStorei) - - .p2align 4,,15 - .globl GL_PREFIX(PixelMapfv) - .type GL_PREFIX(PixelMapfv), @function -GL_PREFIX(PixelMapfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2008(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2008(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2008(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2008(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PixelMapfv), .-GL_PREFIX(PixelMapfv) - - .p2align 4,,15 - .globl GL_PREFIX(PixelMapuiv) - .type GL_PREFIX(PixelMapuiv), @function -GL_PREFIX(PixelMapuiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2016(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2016(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2016(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2016(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PixelMapuiv), .-GL_PREFIX(PixelMapuiv) - - .p2align 4,,15 - .globl GL_PREFIX(PixelMapusv) - .type GL_PREFIX(PixelMapusv), @function -GL_PREFIX(PixelMapusv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2024(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2024(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2024(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2024(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PixelMapusv), .-GL_PREFIX(PixelMapusv) - - .p2align 4,,15 - .globl GL_PREFIX(ReadBuffer) - .type GL_PREFIX(ReadBuffer), @function -GL_PREFIX(ReadBuffer): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2032(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2032(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2032(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2032(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ReadBuffer), .-GL_PREFIX(ReadBuffer) - - .p2align 4,,15 - .globl GL_PREFIX(CopyPixels) - .type GL_PREFIX(CopyPixels), @function -GL_PREFIX(CopyPixels): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2040(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2040(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2040(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2040(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CopyPixels), .-GL_PREFIX(CopyPixels) - - .p2align 4,,15 - .globl GL_PREFIX(ReadPixels) - .type GL_PREFIX(ReadPixels), @function -GL_PREFIX(ReadPixels): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2048(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2048(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2048(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2048(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ReadPixels), .-GL_PREFIX(ReadPixels) - - .p2align 4,,15 - .globl GL_PREFIX(DrawPixels) - .type GL_PREFIX(DrawPixels), @function -GL_PREFIX(DrawPixels): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2056(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2056(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2056(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2056(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DrawPixels), .-GL_PREFIX(DrawPixels) - - .p2align 4,,15 - .globl GL_PREFIX(GetBooleanv) - .type GL_PREFIX(GetBooleanv), @function -GL_PREFIX(GetBooleanv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2064(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 2064(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2064(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 2064(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetBooleanv), .-GL_PREFIX(GetBooleanv) - - .p2align 4,,15 - .globl GL_PREFIX(GetClipPlane) - .type GL_PREFIX(GetClipPlane), @function -GL_PREFIX(GetClipPlane): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2072(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 2072(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2072(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 2072(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetClipPlane), .-GL_PREFIX(GetClipPlane) - - .p2align 4,,15 - .globl GL_PREFIX(GetDoublev) - .type GL_PREFIX(GetDoublev), @function -GL_PREFIX(GetDoublev): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2080(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 2080(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2080(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 2080(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetDoublev), .-GL_PREFIX(GetDoublev) - - .p2align 4,,15 - .globl GL_PREFIX(GetError) - .type GL_PREFIX(GetError), @function -GL_PREFIX(GetError): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2088(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 2088(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2088(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 2088(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetError), .-GL_PREFIX(GetError) - - .p2align 4,,15 - .globl GL_PREFIX(GetFloatv) - .type GL_PREFIX(GetFloatv), @function -GL_PREFIX(GetFloatv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2096(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 2096(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2096(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 2096(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetFloatv), .-GL_PREFIX(GetFloatv) - - .p2align 4,,15 - .globl GL_PREFIX(GetIntegerv) - .type GL_PREFIX(GetIntegerv), @function -GL_PREFIX(GetIntegerv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2104(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 2104(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2104(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 2104(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetIntegerv), .-GL_PREFIX(GetIntegerv) - - .p2align 4,,15 - .globl GL_PREFIX(GetLightfv) - .type GL_PREFIX(GetLightfv), @function -GL_PREFIX(GetLightfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2112(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2112(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2112(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2112(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetLightfv), .-GL_PREFIX(GetLightfv) - - .p2align 4,,15 - .globl GL_PREFIX(GetLightiv) - .type GL_PREFIX(GetLightiv), @function -GL_PREFIX(GetLightiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2120(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2120(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2120(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2120(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetLightiv), .-GL_PREFIX(GetLightiv) - - .p2align 4,,15 - .globl GL_PREFIX(GetMapdv) - .type GL_PREFIX(GetMapdv), @function -GL_PREFIX(GetMapdv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2128(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2128(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2128(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2128(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetMapdv), .-GL_PREFIX(GetMapdv) - - .p2align 4,,15 - .globl GL_PREFIX(GetMapfv) - .type GL_PREFIX(GetMapfv), @function -GL_PREFIX(GetMapfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2136(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2136(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2136(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2136(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetMapfv), .-GL_PREFIX(GetMapfv) - - .p2align 4,,15 - .globl GL_PREFIX(GetMapiv) - .type GL_PREFIX(GetMapiv), @function -GL_PREFIX(GetMapiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2144(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2144(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2144(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2144(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetMapiv), .-GL_PREFIX(GetMapiv) - - .p2align 4,,15 - .globl GL_PREFIX(GetMaterialfv) - .type GL_PREFIX(GetMaterialfv), @function -GL_PREFIX(GetMaterialfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2152(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2152(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2152(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2152(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetMaterialfv), .-GL_PREFIX(GetMaterialfv) - - .p2align 4,,15 - .globl GL_PREFIX(GetMaterialiv) - .type GL_PREFIX(GetMaterialiv), @function -GL_PREFIX(GetMaterialiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2160(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2160(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2160(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2160(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetMaterialiv), .-GL_PREFIX(GetMaterialiv) - - .p2align 4,,15 - .globl GL_PREFIX(GetPixelMapfv) - .type GL_PREFIX(GetPixelMapfv), @function -GL_PREFIX(GetPixelMapfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2168(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 2168(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2168(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 2168(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetPixelMapfv), .-GL_PREFIX(GetPixelMapfv) - - .p2align 4,,15 - .globl GL_PREFIX(GetPixelMapuiv) - .type GL_PREFIX(GetPixelMapuiv), @function -GL_PREFIX(GetPixelMapuiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2176(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 2176(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2176(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 2176(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetPixelMapuiv), .-GL_PREFIX(GetPixelMapuiv) - - .p2align 4,,15 - .globl GL_PREFIX(GetPixelMapusv) - .type GL_PREFIX(GetPixelMapusv), @function -GL_PREFIX(GetPixelMapusv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2184(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 2184(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2184(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 2184(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetPixelMapusv), .-GL_PREFIX(GetPixelMapusv) - - .p2align 4,,15 - .globl GL_PREFIX(GetPolygonStipple) - .type GL_PREFIX(GetPolygonStipple), @function -GL_PREFIX(GetPolygonStipple): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2192(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2192(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2192(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2192(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetPolygonStipple), .-GL_PREFIX(GetPolygonStipple) - - .p2align 4,,15 - .globl GL_PREFIX(GetString) - .type GL_PREFIX(GetString), @function -GL_PREFIX(GetString): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2200(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2200(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2200(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2200(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetString), .-GL_PREFIX(GetString) - - .p2align 4,,15 - .globl GL_PREFIX(GetTexEnvfv) - .type GL_PREFIX(GetTexEnvfv), @function -GL_PREFIX(GetTexEnvfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2208(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2208(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2208(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2208(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetTexEnvfv), .-GL_PREFIX(GetTexEnvfv) - - .p2align 4,,15 - .globl GL_PREFIX(GetTexEnviv) - .type GL_PREFIX(GetTexEnviv), @function -GL_PREFIX(GetTexEnviv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2216(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2216(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2216(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2216(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetTexEnviv), .-GL_PREFIX(GetTexEnviv) - - .p2align 4,,15 - .globl GL_PREFIX(GetTexGendv) - .type GL_PREFIX(GetTexGendv), @function -GL_PREFIX(GetTexGendv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2224(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2224(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2224(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2224(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetTexGendv), .-GL_PREFIX(GetTexGendv) - - .p2align 4,,15 - .globl GL_PREFIX(GetTexGenfv) - .type GL_PREFIX(GetTexGenfv), @function -GL_PREFIX(GetTexGenfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2232(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2232(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2232(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2232(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetTexGenfv), .-GL_PREFIX(GetTexGenfv) - - .p2align 4,,15 - .globl GL_PREFIX(GetTexGeniv) - .type GL_PREFIX(GetTexGeniv), @function -GL_PREFIX(GetTexGeniv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2240(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2240(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2240(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2240(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetTexGeniv), .-GL_PREFIX(GetTexGeniv) - - .p2align 4,,15 - .globl GL_PREFIX(GetTexImage) - .type GL_PREFIX(GetTexImage), @function -GL_PREFIX(GetTexImage): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2248(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2248(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2248(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2248(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetTexImage), .-GL_PREFIX(GetTexImage) - - .p2align 4,,15 - .globl GL_PREFIX(GetTexParameterfv) - .type GL_PREFIX(GetTexParameterfv), @function -GL_PREFIX(GetTexParameterfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2256(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2256(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2256(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2256(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetTexParameterfv), .-GL_PREFIX(GetTexParameterfv) - - .p2align 4,,15 - .globl GL_PREFIX(GetTexParameteriv) - .type GL_PREFIX(GetTexParameteriv), @function -GL_PREFIX(GetTexParameteriv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2264(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2264(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2264(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2264(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetTexParameteriv), .-GL_PREFIX(GetTexParameteriv) - - .p2align 4,,15 - .globl GL_PREFIX(GetTexLevelParameterfv) - .type GL_PREFIX(GetTexLevelParameterfv), @function -GL_PREFIX(GetTexLevelParameterfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2272(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2272(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2272(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2272(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetTexLevelParameterfv), .-GL_PREFIX(GetTexLevelParameterfv) - - .p2align 4,,15 - .globl GL_PREFIX(GetTexLevelParameteriv) - .type GL_PREFIX(GetTexLevelParameteriv), @function -GL_PREFIX(GetTexLevelParameteriv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2280(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2280(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2280(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2280(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetTexLevelParameteriv), .-GL_PREFIX(GetTexLevelParameteriv) - - .p2align 4,,15 - .globl GL_PREFIX(IsEnabled) - .type GL_PREFIX(IsEnabled), @function -GL_PREFIX(IsEnabled): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2288(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2288(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2288(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2288(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(IsEnabled), .-GL_PREFIX(IsEnabled) - - .p2align 4,,15 - .globl GL_PREFIX(IsList) - .type GL_PREFIX(IsList), @function -GL_PREFIX(IsList): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2296(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2296(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2296(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2296(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(IsList), .-GL_PREFIX(IsList) - - .p2align 4,,15 - .globl GL_PREFIX(DepthRange) - .type GL_PREFIX(DepthRange), @function -GL_PREFIX(DepthRange): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2304(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 2304(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2304(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 2304(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DepthRange), .-GL_PREFIX(DepthRange) - - .p2align 4,,15 - .globl GL_PREFIX(Frustum) - .type GL_PREFIX(Frustum), @function -GL_PREFIX(Frustum): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2312(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $56, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - movq %xmm4, 32(%rsp) - movq %xmm5, 40(%rsp) - call _x86_64_get_dispatch@PLT - movq 40(%rsp), %xmm5 - movq 32(%rsp), %xmm4 - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $56, %rsp - movq 2312(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2312(%rax), %r11 - jmp *%r11 -1: - subq $56, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - movq %xmm4, 32(%rsp) - movq %xmm5, 40(%rsp) - call _glapi_get_dispatch - movq 40(%rsp), %xmm5 - movq 32(%rsp), %xmm4 - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $56, %rsp - movq 2312(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Frustum), .-GL_PREFIX(Frustum) - - .p2align 4,,15 - .globl GL_PREFIX(LoadIdentity) - .type GL_PREFIX(LoadIdentity), @function -GL_PREFIX(LoadIdentity): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2320(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 2320(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2320(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 2320(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(LoadIdentity), .-GL_PREFIX(LoadIdentity) - - .p2align 4,,15 - .globl GL_PREFIX(LoadMatrixf) - .type GL_PREFIX(LoadMatrixf), @function -GL_PREFIX(LoadMatrixf): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2328(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2328(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2328(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2328(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(LoadMatrixf), .-GL_PREFIX(LoadMatrixf) - - .p2align 4,,15 - .globl GL_PREFIX(LoadMatrixd) - .type GL_PREFIX(LoadMatrixd), @function -GL_PREFIX(LoadMatrixd): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2336(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2336(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2336(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2336(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(LoadMatrixd), .-GL_PREFIX(LoadMatrixd) - - .p2align 4,,15 - .globl GL_PREFIX(MatrixMode) - .type GL_PREFIX(MatrixMode), @function -GL_PREFIX(MatrixMode): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2344(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2344(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2344(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2344(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MatrixMode), .-GL_PREFIX(MatrixMode) - - .p2align 4,,15 - .globl GL_PREFIX(MultMatrixf) - .type GL_PREFIX(MultMatrixf), @function -GL_PREFIX(MultMatrixf): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2352(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2352(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2352(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2352(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultMatrixf), .-GL_PREFIX(MultMatrixf) - - .p2align 4,,15 - .globl GL_PREFIX(MultMatrixd) - .type GL_PREFIX(MultMatrixd), @function -GL_PREFIX(MultMatrixd): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2360(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2360(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2360(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2360(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultMatrixd), .-GL_PREFIX(MultMatrixd) - - .p2align 4,,15 - .globl GL_PREFIX(Ortho) - .type GL_PREFIX(Ortho), @function -GL_PREFIX(Ortho): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2368(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $56, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - movq %xmm4, 32(%rsp) - movq %xmm5, 40(%rsp) - call _x86_64_get_dispatch@PLT - movq 40(%rsp), %xmm5 - movq 32(%rsp), %xmm4 - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $56, %rsp - movq 2368(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2368(%rax), %r11 - jmp *%r11 -1: - subq $56, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - movq %xmm4, 32(%rsp) - movq %xmm5, 40(%rsp) - call _glapi_get_dispatch - movq 40(%rsp), %xmm5 - movq 32(%rsp), %xmm4 - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $56, %rsp - movq 2368(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Ortho), .-GL_PREFIX(Ortho) - - .p2align 4,,15 - .globl GL_PREFIX(PopMatrix) - .type GL_PREFIX(PopMatrix), @function -GL_PREFIX(PopMatrix): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2376(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 2376(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2376(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 2376(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PopMatrix), .-GL_PREFIX(PopMatrix) - - .p2align 4,,15 - .globl GL_PREFIX(PushMatrix) - .type GL_PREFIX(PushMatrix), @function -GL_PREFIX(PushMatrix): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2384(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 2384(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2384(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 2384(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PushMatrix), .-GL_PREFIX(PushMatrix) - - .p2align 4,,15 - .globl GL_PREFIX(Rotated) - .type GL_PREFIX(Rotated), @function -GL_PREFIX(Rotated): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2392(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 2392(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2392(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 2392(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Rotated), .-GL_PREFIX(Rotated) - - .p2align 4,,15 - .globl GL_PREFIX(Rotatef) - .type GL_PREFIX(Rotatef), @function -GL_PREFIX(Rotatef): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2400(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 2400(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2400(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 2400(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Rotatef), .-GL_PREFIX(Rotatef) - - .p2align 4,,15 - .globl GL_PREFIX(Scaled) - .type GL_PREFIX(Scaled), @function -GL_PREFIX(Scaled): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2408(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 2408(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2408(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 2408(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Scaled), .-GL_PREFIX(Scaled) - - .p2align 4,,15 - .globl GL_PREFIX(Scalef) - .type GL_PREFIX(Scalef), @function -GL_PREFIX(Scalef): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2416(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 2416(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2416(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 2416(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Scalef), .-GL_PREFIX(Scalef) - - .p2align 4,,15 - .globl GL_PREFIX(Translated) - .type GL_PREFIX(Translated), @function -GL_PREFIX(Translated): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2424(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 2424(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2424(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 2424(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Translated), .-GL_PREFIX(Translated) - - .p2align 4,,15 - .globl GL_PREFIX(Translatef) - .type GL_PREFIX(Translatef), @function -GL_PREFIX(Translatef): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2432(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 2432(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2432(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 2432(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Translatef), .-GL_PREFIX(Translatef) - - .p2align 4,,15 - .globl GL_PREFIX(Viewport) - .type GL_PREFIX(Viewport), @function -GL_PREFIX(Viewport): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2440(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2440(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2440(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2440(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Viewport), .-GL_PREFIX(Viewport) - - .p2align 4,,15 - .globl GL_PREFIX(ArrayElement) - .type GL_PREFIX(ArrayElement), @function -GL_PREFIX(ArrayElement): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2448(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2448(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2448(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2448(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ArrayElement), .-GL_PREFIX(ArrayElement) - - .p2align 4,,15 - .globl GL_PREFIX(BindTexture) - .type GL_PREFIX(BindTexture), @function -GL_PREFIX(BindTexture): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2456(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 2456(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2456(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 2456(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BindTexture), .-GL_PREFIX(BindTexture) - - .p2align 4,,15 - .globl GL_PREFIX(ColorPointer) - .type GL_PREFIX(ColorPointer), @function -GL_PREFIX(ColorPointer): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2464(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2464(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2464(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2464(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ColorPointer), .-GL_PREFIX(ColorPointer) - - .p2align 4,,15 - .globl GL_PREFIX(DisableClientState) - .type GL_PREFIX(DisableClientState), @function -GL_PREFIX(DisableClientState): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2472(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2472(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2472(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2472(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DisableClientState), .-GL_PREFIX(DisableClientState) - - .p2align 4,,15 - .globl GL_PREFIX(DrawArrays) - .type GL_PREFIX(DrawArrays), @function -GL_PREFIX(DrawArrays): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2480(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2480(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2480(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2480(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DrawArrays), .-GL_PREFIX(DrawArrays) - - .p2align 4,,15 - .globl GL_PREFIX(DrawElements) - .type GL_PREFIX(DrawElements), @function -GL_PREFIX(DrawElements): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2488(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2488(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2488(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2488(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DrawElements), .-GL_PREFIX(DrawElements) - - .p2align 4,,15 - .globl GL_PREFIX(EdgeFlagPointer) - .type GL_PREFIX(EdgeFlagPointer), @function -GL_PREFIX(EdgeFlagPointer): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2496(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 2496(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2496(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 2496(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EdgeFlagPointer), .-GL_PREFIX(EdgeFlagPointer) - - .p2align 4,,15 - .globl GL_PREFIX(EnableClientState) - .type GL_PREFIX(EnableClientState), @function -GL_PREFIX(EnableClientState): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2504(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2504(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2504(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2504(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EnableClientState), .-GL_PREFIX(EnableClientState) - - .p2align 4,,15 - .globl GL_PREFIX(IndexPointer) - .type GL_PREFIX(IndexPointer), @function -GL_PREFIX(IndexPointer): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2512(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2512(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2512(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2512(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(IndexPointer), .-GL_PREFIX(IndexPointer) - - .p2align 4,,15 - .globl GL_PREFIX(Indexub) - .type GL_PREFIX(Indexub), @function -GL_PREFIX(Indexub): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2520(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2520(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2520(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2520(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Indexub), .-GL_PREFIX(Indexub) - - .p2align 4,,15 - .globl GL_PREFIX(Indexubv) - .type GL_PREFIX(Indexubv), @function -GL_PREFIX(Indexubv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2528(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2528(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2528(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2528(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Indexubv), .-GL_PREFIX(Indexubv) - - .p2align 4,,15 - .globl GL_PREFIX(InterleavedArrays) - .type GL_PREFIX(InterleavedArrays), @function -GL_PREFIX(InterleavedArrays): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2536(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2536(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2536(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2536(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(InterleavedArrays), .-GL_PREFIX(InterleavedArrays) - - .p2align 4,,15 - .globl GL_PREFIX(NormalPointer) - .type GL_PREFIX(NormalPointer), @function -GL_PREFIX(NormalPointer): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2544(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2544(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2544(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2544(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(NormalPointer), .-GL_PREFIX(NormalPointer) - - .p2align 4,,15 - .globl GL_PREFIX(PolygonOffset) - .type GL_PREFIX(PolygonOffset), @function -GL_PREFIX(PolygonOffset): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2552(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 2552(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2552(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 2552(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PolygonOffset), .-GL_PREFIX(PolygonOffset) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoordPointer) - .type GL_PREFIX(TexCoordPointer), @function -GL_PREFIX(TexCoordPointer): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2560(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2560(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2560(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2560(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoordPointer), .-GL_PREFIX(TexCoordPointer) - - .p2align 4,,15 - .globl GL_PREFIX(VertexPointer) - .type GL_PREFIX(VertexPointer), @function -GL_PREFIX(VertexPointer): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2568(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2568(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2568(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2568(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexPointer), .-GL_PREFIX(VertexPointer) - - .p2align 4,,15 - .globl GL_PREFIX(AreTexturesResident) - .type GL_PREFIX(AreTexturesResident), @function -GL_PREFIX(AreTexturesResident): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2576(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2576(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2576(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2576(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(AreTexturesResident), .-GL_PREFIX(AreTexturesResident) - - .p2align 4,,15 - .globl GL_PREFIX(CopyTexImage1D) - .type GL_PREFIX(CopyTexImage1D), @function -GL_PREFIX(CopyTexImage1D): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2584(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2584(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2584(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2584(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CopyTexImage1D), .-GL_PREFIX(CopyTexImage1D) - - .p2align 4,,15 - .globl GL_PREFIX(CopyTexImage2D) - .type GL_PREFIX(CopyTexImage2D), @function -GL_PREFIX(CopyTexImage2D): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2592(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2592(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2592(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2592(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CopyTexImage2D), .-GL_PREFIX(CopyTexImage2D) - - .p2align 4,,15 - .globl GL_PREFIX(CopyTexSubImage1D) - .type GL_PREFIX(CopyTexSubImage1D), @function -GL_PREFIX(CopyTexSubImage1D): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2600(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2600(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2600(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2600(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CopyTexSubImage1D), .-GL_PREFIX(CopyTexSubImage1D) - - .p2align 4,,15 - .globl GL_PREFIX(CopyTexSubImage2D) - .type GL_PREFIX(CopyTexSubImage2D), @function -GL_PREFIX(CopyTexSubImage2D): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2608(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2608(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2608(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2608(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CopyTexSubImage2D), .-GL_PREFIX(CopyTexSubImage2D) - - .p2align 4,,15 - .globl GL_PREFIX(DeleteTextures) - .type GL_PREFIX(DeleteTextures), @function -GL_PREFIX(DeleteTextures): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2616(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 2616(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2616(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 2616(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DeleteTextures), .-GL_PREFIX(DeleteTextures) - - .p2align 4,,15 - .globl GL_PREFIX(GenTextures) - .type GL_PREFIX(GenTextures), @function -GL_PREFIX(GenTextures): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2624(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 2624(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2624(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 2624(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GenTextures), .-GL_PREFIX(GenTextures) - - .p2align 4,,15 - .globl GL_PREFIX(GetPointerv) - .type GL_PREFIX(GetPointerv), @function -GL_PREFIX(GetPointerv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2632(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 2632(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2632(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 2632(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetPointerv), .-GL_PREFIX(GetPointerv) - - .p2align 4,,15 - .globl GL_PREFIX(IsTexture) - .type GL_PREFIX(IsTexture), @function -GL_PREFIX(IsTexture): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2640(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2640(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2640(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2640(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(IsTexture), .-GL_PREFIX(IsTexture) - - .p2align 4,,15 - .globl GL_PREFIX(PrioritizeTextures) - .type GL_PREFIX(PrioritizeTextures), @function -GL_PREFIX(PrioritizeTextures): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2648(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2648(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2648(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2648(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PrioritizeTextures), .-GL_PREFIX(PrioritizeTextures) - - .p2align 4,,15 - .globl GL_PREFIX(TexSubImage1D) - .type GL_PREFIX(TexSubImage1D), @function -GL_PREFIX(TexSubImage1D): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2656(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2656(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2656(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2656(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexSubImage1D), .-GL_PREFIX(TexSubImage1D) - - .p2align 4,,15 - .globl GL_PREFIX(TexSubImage2D) - .type GL_PREFIX(TexSubImage2D), @function -GL_PREFIX(TexSubImage2D): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2664(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2664(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2664(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2664(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexSubImage2D), .-GL_PREFIX(TexSubImage2D) - - .p2align 4,,15 - .globl GL_PREFIX(PopClientAttrib) - .type GL_PREFIX(PopClientAttrib), @function -GL_PREFIX(PopClientAttrib): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2672(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 2672(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2672(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 2672(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PopClientAttrib), .-GL_PREFIX(PopClientAttrib) - - .p2align 4,,15 - .globl GL_PREFIX(PushClientAttrib) - .type GL_PREFIX(PushClientAttrib), @function -GL_PREFIX(PushClientAttrib): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2680(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2680(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2680(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2680(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PushClientAttrib), .-GL_PREFIX(PushClientAttrib) - - .p2align 4,,15 - .globl GL_PREFIX(BlendColor) - .type GL_PREFIX(BlendColor), @function -GL_PREFIX(BlendColor): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2688(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2688(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2688(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2688(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BlendColor), .-GL_PREFIX(BlendColor) - - .p2align 4,,15 - .globl GL_PREFIX(BlendEquation) - .type GL_PREFIX(BlendEquation), @function -GL_PREFIX(BlendEquation): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2696(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2696(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2696(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2696(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BlendEquation), .-GL_PREFIX(BlendEquation) - - .p2align 4,,15 - .globl GL_PREFIX(DrawRangeElements) - .type GL_PREFIX(DrawRangeElements), @function -GL_PREFIX(DrawRangeElements): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2704(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2704(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2704(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2704(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DrawRangeElements), .-GL_PREFIX(DrawRangeElements) - - .p2align 4,,15 - .globl GL_PREFIX(ColorTable) - .type GL_PREFIX(ColorTable), @function -GL_PREFIX(ColorTable): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2712(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2712(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2712(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2712(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ColorTable), .-GL_PREFIX(ColorTable) - - .p2align 4,,15 - .globl GL_PREFIX(ColorTableParameterfv) - .type GL_PREFIX(ColorTableParameterfv), @function -GL_PREFIX(ColorTableParameterfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2720(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2720(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2720(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2720(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ColorTableParameterfv), .-GL_PREFIX(ColorTableParameterfv) - - .p2align 4,,15 - .globl GL_PREFIX(ColorTableParameteriv) - .type GL_PREFIX(ColorTableParameteriv), @function -GL_PREFIX(ColorTableParameteriv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2728(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2728(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2728(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2728(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ColorTableParameteriv), .-GL_PREFIX(ColorTableParameteriv) - - .p2align 4,,15 - .globl GL_PREFIX(CopyColorTable) - .type GL_PREFIX(CopyColorTable), @function -GL_PREFIX(CopyColorTable): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2736(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2736(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2736(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2736(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CopyColorTable), .-GL_PREFIX(CopyColorTable) - - .p2align 4,,15 - .globl GL_PREFIX(GetColorTable) - .type GL_PREFIX(GetColorTable), @function -GL_PREFIX(GetColorTable): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2744(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2744(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2744(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2744(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetColorTable), .-GL_PREFIX(GetColorTable) - - .p2align 4,,15 - .globl GL_PREFIX(GetColorTableParameterfv) - .type GL_PREFIX(GetColorTableParameterfv), @function -GL_PREFIX(GetColorTableParameterfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2752(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2752(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2752(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2752(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetColorTableParameterfv), .-GL_PREFIX(GetColorTableParameterfv) - - .p2align 4,,15 - .globl GL_PREFIX(GetColorTableParameteriv) - .type GL_PREFIX(GetColorTableParameteriv), @function -GL_PREFIX(GetColorTableParameteriv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2760(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2760(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2760(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2760(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetColorTableParameteriv), .-GL_PREFIX(GetColorTableParameteriv) - - .p2align 4,,15 - .globl GL_PREFIX(ColorSubTable) - .type GL_PREFIX(ColorSubTable), @function -GL_PREFIX(ColorSubTable): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2768(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2768(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2768(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2768(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ColorSubTable), .-GL_PREFIX(ColorSubTable) - - .p2align 4,,15 - .globl GL_PREFIX(CopyColorSubTable) - .type GL_PREFIX(CopyColorSubTable), @function -GL_PREFIX(CopyColorSubTable): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2776(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2776(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2776(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2776(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CopyColorSubTable), .-GL_PREFIX(CopyColorSubTable) - - .p2align 4,,15 - .globl GL_PREFIX(ConvolutionFilter1D) - .type GL_PREFIX(ConvolutionFilter1D), @function -GL_PREFIX(ConvolutionFilter1D): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2784(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2784(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2784(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2784(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ConvolutionFilter1D), .-GL_PREFIX(ConvolutionFilter1D) - - .p2align 4,,15 - .globl GL_PREFIX(ConvolutionFilter2D) - .type GL_PREFIX(ConvolutionFilter2D), @function -GL_PREFIX(ConvolutionFilter2D): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2792(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2792(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2792(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2792(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ConvolutionFilter2D), .-GL_PREFIX(ConvolutionFilter2D) - - .p2align 4,,15 - .globl GL_PREFIX(ConvolutionParameterf) - .type GL_PREFIX(ConvolutionParameterf), @function -GL_PREFIX(ConvolutionParameterf): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2800(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $24, %rsp - movq 2800(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2800(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $24, %rsp - movq 2800(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ConvolutionParameterf), .-GL_PREFIX(ConvolutionParameterf) - - .p2align 4,,15 - .globl GL_PREFIX(ConvolutionParameterfv) - .type GL_PREFIX(ConvolutionParameterfv), @function -GL_PREFIX(ConvolutionParameterfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2808(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2808(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2808(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2808(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ConvolutionParameterfv), .-GL_PREFIX(ConvolutionParameterfv) - - .p2align 4,,15 - .globl GL_PREFIX(ConvolutionParameteri) - .type GL_PREFIX(ConvolutionParameteri), @function -GL_PREFIX(ConvolutionParameteri): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2816(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2816(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2816(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2816(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ConvolutionParameteri), .-GL_PREFIX(ConvolutionParameteri) - - .p2align 4,,15 - .globl GL_PREFIX(ConvolutionParameteriv) - .type GL_PREFIX(ConvolutionParameteriv), @function -GL_PREFIX(ConvolutionParameteriv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2824(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2824(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2824(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2824(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ConvolutionParameteriv), .-GL_PREFIX(ConvolutionParameteriv) - - .p2align 4,,15 - .globl GL_PREFIX(CopyConvolutionFilter1D) - .type GL_PREFIX(CopyConvolutionFilter1D), @function -GL_PREFIX(CopyConvolutionFilter1D): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2832(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2832(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2832(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2832(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CopyConvolutionFilter1D), .-GL_PREFIX(CopyConvolutionFilter1D) - - .p2align 4,,15 - .globl GL_PREFIX(CopyConvolutionFilter2D) - .type GL_PREFIX(CopyConvolutionFilter2D), @function -GL_PREFIX(CopyConvolutionFilter2D): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2840(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2840(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2840(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2840(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CopyConvolutionFilter2D), .-GL_PREFIX(CopyConvolutionFilter2D) - - .p2align 4,,15 - .globl GL_PREFIX(GetConvolutionFilter) - .type GL_PREFIX(GetConvolutionFilter), @function -GL_PREFIX(GetConvolutionFilter): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2848(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2848(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2848(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2848(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetConvolutionFilter), .-GL_PREFIX(GetConvolutionFilter) - - .p2align 4,,15 - .globl GL_PREFIX(GetConvolutionParameterfv) - .type GL_PREFIX(GetConvolutionParameterfv), @function -GL_PREFIX(GetConvolutionParameterfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2856(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2856(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2856(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2856(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetConvolutionParameterfv), .-GL_PREFIX(GetConvolutionParameterfv) - - .p2align 4,,15 - .globl GL_PREFIX(GetConvolutionParameteriv) - .type GL_PREFIX(GetConvolutionParameteriv), @function -GL_PREFIX(GetConvolutionParameteriv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2864(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2864(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2864(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2864(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetConvolutionParameteriv), .-GL_PREFIX(GetConvolutionParameteriv) - - .p2align 4,,15 - .globl GL_PREFIX(GetSeparableFilter) - .type GL_PREFIX(GetSeparableFilter), @function -GL_PREFIX(GetSeparableFilter): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2872(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2872(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2872(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2872(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetSeparableFilter), .-GL_PREFIX(GetSeparableFilter) - - .p2align 4,,15 - .globl GL_PREFIX(SeparableFilter2D) - .type GL_PREFIX(SeparableFilter2D), @function -GL_PREFIX(SeparableFilter2D): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2880(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2880(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2880(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2880(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SeparableFilter2D), .-GL_PREFIX(SeparableFilter2D) - - .p2align 4,,15 - .globl GL_PREFIX(GetHistogram) - .type GL_PREFIX(GetHistogram), @function -GL_PREFIX(GetHistogram): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2888(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2888(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2888(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2888(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetHistogram), .-GL_PREFIX(GetHistogram) - - .p2align 4,,15 - .globl GL_PREFIX(GetHistogramParameterfv) - .type GL_PREFIX(GetHistogramParameterfv), @function -GL_PREFIX(GetHistogramParameterfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2896(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2896(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2896(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2896(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetHistogramParameterfv), .-GL_PREFIX(GetHistogramParameterfv) - - .p2align 4,,15 - .globl GL_PREFIX(GetHistogramParameteriv) - .type GL_PREFIX(GetHistogramParameteriv), @function -GL_PREFIX(GetHistogramParameteriv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2904(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2904(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2904(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2904(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetHistogramParameteriv), .-GL_PREFIX(GetHistogramParameteriv) - - .p2align 4,,15 - .globl GL_PREFIX(GetMinmax) - .type GL_PREFIX(GetMinmax), @function -GL_PREFIX(GetMinmax): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2912(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2912(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2912(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2912(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetMinmax), .-GL_PREFIX(GetMinmax) - - .p2align 4,,15 - .globl GL_PREFIX(GetMinmaxParameterfv) - .type GL_PREFIX(GetMinmaxParameterfv), @function -GL_PREFIX(GetMinmaxParameterfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2920(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2920(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2920(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2920(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetMinmaxParameterfv), .-GL_PREFIX(GetMinmaxParameterfv) - - .p2align 4,,15 - .globl GL_PREFIX(GetMinmaxParameteriv) - .type GL_PREFIX(GetMinmaxParameteriv), @function -GL_PREFIX(GetMinmaxParameteriv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2928(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2928(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2928(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2928(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetMinmaxParameteriv), .-GL_PREFIX(GetMinmaxParameteriv) - - .p2align 4,,15 - .globl GL_PREFIX(Histogram) - .type GL_PREFIX(Histogram), @function -GL_PREFIX(Histogram): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2936(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2936(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2936(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2936(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Histogram), .-GL_PREFIX(Histogram) - - .p2align 4,,15 - .globl GL_PREFIX(Minmax) - .type GL_PREFIX(Minmax), @function -GL_PREFIX(Minmax): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2944(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 2944(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2944(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 2944(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Minmax), .-GL_PREFIX(Minmax) - - .p2align 4,,15 - .globl GL_PREFIX(ResetHistogram) - .type GL_PREFIX(ResetHistogram), @function -GL_PREFIX(ResetHistogram): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2952(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2952(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2952(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2952(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ResetHistogram), .-GL_PREFIX(ResetHistogram) - - .p2align 4,,15 - .globl GL_PREFIX(ResetMinmax) - .type GL_PREFIX(ResetMinmax), @function -GL_PREFIX(ResetMinmax): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2960(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2960(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2960(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2960(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ResetMinmax), .-GL_PREFIX(ResetMinmax) - - .p2align 4,,15 - .globl GL_PREFIX(TexImage3D) - .type GL_PREFIX(TexImage3D), @function -GL_PREFIX(TexImage3D): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2968(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2968(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2968(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2968(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexImage3D), .-GL_PREFIX(TexImage3D) - - .p2align 4,,15 - .globl GL_PREFIX(TexSubImage3D) - .type GL_PREFIX(TexSubImage3D), @function -GL_PREFIX(TexSubImage3D): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2976(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2976(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2976(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2976(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexSubImage3D), .-GL_PREFIX(TexSubImage3D) - - .p2align 4,,15 - .globl GL_PREFIX(CopyTexSubImage3D) - .type GL_PREFIX(CopyTexSubImage3D), @function -GL_PREFIX(CopyTexSubImage3D): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2984(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2984(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2984(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 2984(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CopyTexSubImage3D), .-GL_PREFIX(CopyTexSubImage3D) - - .p2align 4,,15 - .globl GL_PREFIX(ActiveTextureARB) - .type GL_PREFIX(ActiveTextureARB), @function -GL_PREFIX(ActiveTextureARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 2992(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 2992(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 2992(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 2992(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ActiveTextureARB), .-GL_PREFIX(ActiveTextureARB) - - .p2align 4,,15 - .globl GL_PREFIX(ClientActiveTextureARB) - .type GL_PREFIX(ClientActiveTextureARB), @function -GL_PREFIX(ClientActiveTextureARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3000(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 3000(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3000(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 3000(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ClientActiveTextureARB), .-GL_PREFIX(ClientActiveTextureARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord1dARB) - .type GL_PREFIX(MultiTexCoord1dARB), @function -GL_PREFIX(MultiTexCoord1dARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3008(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 3008(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3008(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 3008(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord1dARB), .-GL_PREFIX(MultiTexCoord1dARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord1dvARB) - .type GL_PREFIX(MultiTexCoord1dvARB), @function -GL_PREFIX(MultiTexCoord1dvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3016(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3016(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3016(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3016(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord1dvARB), .-GL_PREFIX(MultiTexCoord1dvARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord1fARB) - .type GL_PREFIX(MultiTexCoord1fARB), @function -GL_PREFIX(MultiTexCoord1fARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3024(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 3024(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3024(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 3024(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord1fARB), .-GL_PREFIX(MultiTexCoord1fARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord1fvARB) - .type GL_PREFIX(MultiTexCoord1fvARB), @function -GL_PREFIX(MultiTexCoord1fvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3032(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3032(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3032(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3032(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord1fvARB), .-GL_PREFIX(MultiTexCoord1fvARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord1iARB) - .type GL_PREFIX(MultiTexCoord1iARB), @function -GL_PREFIX(MultiTexCoord1iARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3040(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3040(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3040(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3040(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord1iARB), .-GL_PREFIX(MultiTexCoord1iARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord1ivARB) - .type GL_PREFIX(MultiTexCoord1ivARB), @function -GL_PREFIX(MultiTexCoord1ivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3048(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3048(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3048(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3048(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord1ivARB), .-GL_PREFIX(MultiTexCoord1ivARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord1sARB) - .type GL_PREFIX(MultiTexCoord1sARB), @function -GL_PREFIX(MultiTexCoord1sARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3056(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3056(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3056(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3056(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord1sARB), .-GL_PREFIX(MultiTexCoord1sARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord1svARB) - .type GL_PREFIX(MultiTexCoord1svARB), @function -GL_PREFIX(MultiTexCoord1svARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3064(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3064(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3064(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3064(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord1svARB), .-GL_PREFIX(MultiTexCoord1svARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord2dARB) - .type GL_PREFIX(MultiTexCoord2dARB), @function -GL_PREFIX(MultiTexCoord2dARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3072(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 3072(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3072(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 3072(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord2dARB), .-GL_PREFIX(MultiTexCoord2dARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord2dvARB) - .type GL_PREFIX(MultiTexCoord2dvARB), @function -GL_PREFIX(MultiTexCoord2dvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3080(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3080(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3080(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3080(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord2dvARB), .-GL_PREFIX(MultiTexCoord2dvARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord2fARB) - .type GL_PREFIX(MultiTexCoord2fARB), @function -GL_PREFIX(MultiTexCoord2fARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3088(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 3088(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3088(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 3088(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord2fARB), .-GL_PREFIX(MultiTexCoord2fARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord2fvARB) - .type GL_PREFIX(MultiTexCoord2fvARB), @function -GL_PREFIX(MultiTexCoord2fvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3096(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3096(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3096(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3096(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord2fvARB), .-GL_PREFIX(MultiTexCoord2fvARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord2iARB) - .type GL_PREFIX(MultiTexCoord2iARB), @function -GL_PREFIX(MultiTexCoord2iARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3104(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3104(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3104(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3104(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord2iARB), .-GL_PREFIX(MultiTexCoord2iARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord2ivARB) - .type GL_PREFIX(MultiTexCoord2ivARB), @function -GL_PREFIX(MultiTexCoord2ivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3112(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3112(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3112(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3112(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord2ivARB), .-GL_PREFIX(MultiTexCoord2ivARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord2sARB) - .type GL_PREFIX(MultiTexCoord2sARB), @function -GL_PREFIX(MultiTexCoord2sARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3120(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3120(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3120(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3120(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord2sARB), .-GL_PREFIX(MultiTexCoord2sARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord2svARB) - .type GL_PREFIX(MultiTexCoord2svARB), @function -GL_PREFIX(MultiTexCoord2svARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3128(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3128(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3128(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3128(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord2svARB), .-GL_PREFIX(MultiTexCoord2svARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord3dARB) - .type GL_PREFIX(MultiTexCoord3dARB), @function -GL_PREFIX(MultiTexCoord3dARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3136(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 3136(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3136(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 3136(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord3dARB), .-GL_PREFIX(MultiTexCoord3dARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord3dvARB) - .type GL_PREFIX(MultiTexCoord3dvARB), @function -GL_PREFIX(MultiTexCoord3dvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3144(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3144(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3144(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3144(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord3dvARB), .-GL_PREFIX(MultiTexCoord3dvARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord3fARB) - .type GL_PREFIX(MultiTexCoord3fARB), @function -GL_PREFIX(MultiTexCoord3fARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3152(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 3152(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3152(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 3152(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord3fARB), .-GL_PREFIX(MultiTexCoord3fARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord3fvARB) - .type GL_PREFIX(MultiTexCoord3fvARB), @function -GL_PREFIX(MultiTexCoord3fvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3160(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3160(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3160(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3160(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord3fvARB), .-GL_PREFIX(MultiTexCoord3fvARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord3iARB) - .type GL_PREFIX(MultiTexCoord3iARB), @function -GL_PREFIX(MultiTexCoord3iARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3168(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3168(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3168(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3168(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord3iARB), .-GL_PREFIX(MultiTexCoord3iARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord3ivARB) - .type GL_PREFIX(MultiTexCoord3ivARB), @function -GL_PREFIX(MultiTexCoord3ivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3176(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3176(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3176(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3176(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord3ivARB), .-GL_PREFIX(MultiTexCoord3ivARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord3sARB) - .type GL_PREFIX(MultiTexCoord3sARB), @function -GL_PREFIX(MultiTexCoord3sARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3184(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3184(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3184(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3184(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord3sARB), .-GL_PREFIX(MultiTexCoord3sARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord3svARB) - .type GL_PREFIX(MultiTexCoord3svARB), @function -GL_PREFIX(MultiTexCoord3svARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3192(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3192(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3192(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3192(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord3svARB), .-GL_PREFIX(MultiTexCoord3svARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord4dARB) - .type GL_PREFIX(MultiTexCoord4dARB), @function -GL_PREFIX(MultiTexCoord4dARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3200(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - movq %xmm3, 32(%rsp) - call _x86_64_get_dispatch@PLT - movq 32(%rsp), %xmm3 - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 3200(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3200(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - movq %xmm3, 32(%rsp) - call _glapi_get_dispatch - movq 32(%rsp), %xmm3 - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 3200(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord4dARB), .-GL_PREFIX(MultiTexCoord4dARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord4dvARB) - .type GL_PREFIX(MultiTexCoord4dvARB), @function -GL_PREFIX(MultiTexCoord4dvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3208(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3208(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3208(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3208(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord4dvARB), .-GL_PREFIX(MultiTexCoord4dvARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord4fARB) - .type GL_PREFIX(MultiTexCoord4fARB), @function -GL_PREFIX(MultiTexCoord4fARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3216(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - movq %xmm3, 32(%rsp) - call _x86_64_get_dispatch@PLT - movq 32(%rsp), %xmm3 - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 3216(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3216(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - movq %xmm3, 32(%rsp) - call _glapi_get_dispatch - movq 32(%rsp), %xmm3 - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 3216(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord4fARB), .-GL_PREFIX(MultiTexCoord4fARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord4fvARB) - .type GL_PREFIX(MultiTexCoord4fvARB), @function -GL_PREFIX(MultiTexCoord4fvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3224(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3224(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3224(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3224(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord4fvARB), .-GL_PREFIX(MultiTexCoord4fvARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord4iARB) - .type GL_PREFIX(MultiTexCoord4iARB), @function -GL_PREFIX(MultiTexCoord4iARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3232(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3232(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3232(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3232(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord4iARB), .-GL_PREFIX(MultiTexCoord4iARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord4ivARB) - .type GL_PREFIX(MultiTexCoord4ivARB), @function -GL_PREFIX(MultiTexCoord4ivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3240(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3240(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3240(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3240(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord4ivARB), .-GL_PREFIX(MultiTexCoord4ivARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord4sARB) - .type GL_PREFIX(MultiTexCoord4sARB), @function -GL_PREFIX(MultiTexCoord4sARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3248(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3248(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3248(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3248(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord4sARB), .-GL_PREFIX(MultiTexCoord4sARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoord4svARB) - .type GL_PREFIX(MultiTexCoord4svARB), @function -GL_PREFIX(MultiTexCoord4svARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3256(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3256(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3256(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3256(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoord4svARB), .-GL_PREFIX(MultiTexCoord4svARB) - - .p2align 4,,15 - .globl GL_PREFIX(AttachShader) - .type GL_PREFIX(AttachShader), @function -GL_PREFIX(AttachShader): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3264(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3264(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3264(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3264(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(AttachShader), .-GL_PREFIX(AttachShader) - - .p2align 4,,15 - .globl GL_PREFIX(CreateProgram) - .type GL_PREFIX(CreateProgram), @function -GL_PREFIX(CreateProgram): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3272(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 3272(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3272(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 3272(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CreateProgram), .-GL_PREFIX(CreateProgram) - - .p2align 4,,15 - .globl GL_PREFIX(CreateShader) - .type GL_PREFIX(CreateShader), @function -GL_PREFIX(CreateShader): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3280(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 3280(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3280(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 3280(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CreateShader), .-GL_PREFIX(CreateShader) - - .p2align 4,,15 - .globl GL_PREFIX(DeleteProgram) - .type GL_PREFIX(DeleteProgram), @function -GL_PREFIX(DeleteProgram): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3288(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 3288(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3288(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 3288(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DeleteProgram), .-GL_PREFIX(DeleteProgram) - - .p2align 4,,15 - .globl GL_PREFIX(DeleteShader) - .type GL_PREFIX(DeleteShader), @function -GL_PREFIX(DeleteShader): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3296(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 3296(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3296(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 3296(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DeleteShader), .-GL_PREFIX(DeleteShader) - - .p2align 4,,15 - .globl GL_PREFIX(DetachShader) - .type GL_PREFIX(DetachShader), @function -GL_PREFIX(DetachShader): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3304(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3304(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3304(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3304(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DetachShader), .-GL_PREFIX(DetachShader) - - .p2align 4,,15 - .globl GL_PREFIX(GetAttachedShaders) - .type GL_PREFIX(GetAttachedShaders), @function -GL_PREFIX(GetAttachedShaders): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3312(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3312(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3312(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3312(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetAttachedShaders), .-GL_PREFIX(GetAttachedShaders) - - .p2align 4,,15 - .globl GL_PREFIX(GetProgramInfoLog) - .type GL_PREFIX(GetProgramInfoLog), @function -GL_PREFIX(GetProgramInfoLog): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3320(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3320(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3320(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3320(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetProgramInfoLog), .-GL_PREFIX(GetProgramInfoLog) - - .p2align 4,,15 - .globl GL_PREFIX(GetProgramiv) - .type GL_PREFIX(GetProgramiv), @function -GL_PREFIX(GetProgramiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3328(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3328(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3328(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3328(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetProgramiv), .-GL_PREFIX(GetProgramiv) - - .p2align 4,,15 - .globl GL_PREFIX(GetShaderInfoLog) - .type GL_PREFIX(GetShaderInfoLog), @function -GL_PREFIX(GetShaderInfoLog): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3336(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3336(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3336(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3336(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetShaderInfoLog), .-GL_PREFIX(GetShaderInfoLog) - - .p2align 4,,15 - .globl GL_PREFIX(GetShaderiv) - .type GL_PREFIX(GetShaderiv), @function -GL_PREFIX(GetShaderiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3344(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3344(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3344(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3344(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetShaderiv), .-GL_PREFIX(GetShaderiv) - - .p2align 4,,15 - .globl GL_PREFIX(IsProgram) - .type GL_PREFIX(IsProgram), @function -GL_PREFIX(IsProgram): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3352(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 3352(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3352(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 3352(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(IsProgram), .-GL_PREFIX(IsProgram) - - .p2align 4,,15 - .globl GL_PREFIX(IsShader) - .type GL_PREFIX(IsShader), @function -GL_PREFIX(IsShader): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3360(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 3360(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3360(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 3360(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(IsShader), .-GL_PREFIX(IsShader) - - .p2align 4,,15 - .globl GL_PREFIX(StencilFuncSeparate) - .type GL_PREFIX(StencilFuncSeparate), @function -GL_PREFIX(StencilFuncSeparate): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3368(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3368(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3368(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3368(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(StencilFuncSeparate), .-GL_PREFIX(StencilFuncSeparate) - - .p2align 4,,15 - .globl GL_PREFIX(StencilMaskSeparate) - .type GL_PREFIX(StencilMaskSeparate), @function -GL_PREFIX(StencilMaskSeparate): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3376(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3376(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3376(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3376(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(StencilMaskSeparate), .-GL_PREFIX(StencilMaskSeparate) - - .p2align 4,,15 - .globl GL_PREFIX(StencilOpSeparate) - .type GL_PREFIX(StencilOpSeparate), @function -GL_PREFIX(StencilOpSeparate): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3384(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3384(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3384(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3384(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(StencilOpSeparate), .-GL_PREFIX(StencilOpSeparate) - - .p2align 4,,15 - .globl GL_PREFIX(UniformMatrix2x3fv) - .type GL_PREFIX(UniformMatrix2x3fv), @function -GL_PREFIX(UniformMatrix2x3fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3392(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3392(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3392(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3392(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(UniformMatrix2x3fv), .-GL_PREFIX(UniformMatrix2x3fv) - - .p2align 4,,15 - .globl GL_PREFIX(UniformMatrix2x4fv) - .type GL_PREFIX(UniformMatrix2x4fv), @function -GL_PREFIX(UniformMatrix2x4fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3400(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3400(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3400(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3400(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(UniformMatrix2x4fv), .-GL_PREFIX(UniformMatrix2x4fv) - - .p2align 4,,15 - .globl GL_PREFIX(UniformMatrix3x2fv) - .type GL_PREFIX(UniformMatrix3x2fv), @function -GL_PREFIX(UniformMatrix3x2fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3408(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3408(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3408(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3408(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(UniformMatrix3x2fv), .-GL_PREFIX(UniformMatrix3x2fv) - - .p2align 4,,15 - .globl GL_PREFIX(UniformMatrix3x4fv) - .type GL_PREFIX(UniformMatrix3x4fv), @function -GL_PREFIX(UniformMatrix3x4fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3416(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3416(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3416(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3416(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(UniformMatrix3x4fv), .-GL_PREFIX(UniformMatrix3x4fv) - - .p2align 4,,15 - .globl GL_PREFIX(UniformMatrix4x2fv) - .type GL_PREFIX(UniformMatrix4x2fv), @function -GL_PREFIX(UniformMatrix4x2fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3424(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3424(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3424(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3424(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(UniformMatrix4x2fv), .-GL_PREFIX(UniformMatrix4x2fv) - - .p2align 4,,15 - .globl GL_PREFIX(UniformMatrix4x3fv) - .type GL_PREFIX(UniformMatrix4x3fv), @function -GL_PREFIX(UniformMatrix4x3fv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3432(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3432(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3432(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3432(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(UniformMatrix4x3fv), .-GL_PREFIX(UniformMatrix4x3fv) - - .p2align 4,,15 - .globl GL_PREFIX(ClampColor) - .type GL_PREFIX(ClampColor), @function -GL_PREFIX(ClampColor): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3440(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3440(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3440(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3440(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ClampColor), .-GL_PREFIX(ClampColor) - - .p2align 4,,15 - .globl GL_PREFIX(ClearBufferfi) - .type GL_PREFIX(ClearBufferfi), @function -GL_PREFIX(ClearBufferfi): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3448(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - movq %rdx, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %rdx - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $40, %rsp - movq 3448(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3448(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - movq %rdx, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %rdx - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $40, %rsp - movq 3448(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ClearBufferfi), .-GL_PREFIX(ClearBufferfi) - - .p2align 4,,15 - .globl GL_PREFIX(ClearBufferfv) - .type GL_PREFIX(ClearBufferfv), @function -GL_PREFIX(ClearBufferfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3456(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3456(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3456(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3456(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ClearBufferfv), .-GL_PREFIX(ClearBufferfv) - - .p2align 4,,15 - .globl GL_PREFIX(ClearBufferiv) - .type GL_PREFIX(ClearBufferiv), @function -GL_PREFIX(ClearBufferiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3464(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3464(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3464(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3464(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ClearBufferiv), .-GL_PREFIX(ClearBufferiv) - - .p2align 4,,15 - .globl GL_PREFIX(ClearBufferuiv) - .type GL_PREFIX(ClearBufferuiv), @function -GL_PREFIX(ClearBufferuiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3472(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3472(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3472(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3472(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ClearBufferuiv), .-GL_PREFIX(ClearBufferuiv) - - .p2align 4,,15 - .globl GL_PREFIX(GetStringi) - .type GL_PREFIX(GetStringi), @function -GL_PREFIX(GetStringi): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3480(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3480(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3480(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3480(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetStringi), .-GL_PREFIX(GetStringi) - - .p2align 4,,15 - .globl GL_PREFIX(TexBuffer) - .type GL_PREFIX(TexBuffer), @function -GL_PREFIX(TexBuffer): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3488(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3488(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3488(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3488(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexBuffer), .-GL_PREFIX(TexBuffer) - - .p2align 4,,15 - .globl GL_PREFIX(FramebufferTexture) - .type GL_PREFIX(FramebufferTexture), @function -GL_PREFIX(FramebufferTexture): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3496(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3496(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3496(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3496(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(FramebufferTexture), .-GL_PREFIX(FramebufferTexture) - - .p2align 4,,15 - .globl GL_PREFIX(GetBufferParameteri64v) - .type GL_PREFIX(GetBufferParameteri64v), @function -GL_PREFIX(GetBufferParameteri64v): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3504(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3504(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3504(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3504(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetBufferParameteri64v), .-GL_PREFIX(GetBufferParameteri64v) - - .p2align 4,,15 - .globl GL_PREFIX(GetInteger64i_v) - .type GL_PREFIX(GetInteger64i_v), @function -GL_PREFIX(GetInteger64i_v): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3512(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3512(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3512(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3512(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetInteger64i_v), .-GL_PREFIX(GetInteger64i_v) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribDivisor) - .type GL_PREFIX(VertexAttribDivisor), @function -GL_PREFIX(VertexAttribDivisor): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3520(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3520(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3520(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3520(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribDivisor), .-GL_PREFIX(VertexAttribDivisor) - - .p2align 4,,15 - .globl GL_PREFIX(LoadTransposeMatrixdARB) - .type GL_PREFIX(LoadTransposeMatrixdARB), @function -GL_PREFIX(LoadTransposeMatrixdARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3528(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 3528(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3528(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 3528(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(LoadTransposeMatrixdARB), .-GL_PREFIX(LoadTransposeMatrixdARB) - - .p2align 4,,15 - .globl GL_PREFIX(LoadTransposeMatrixfARB) - .type GL_PREFIX(LoadTransposeMatrixfARB), @function -GL_PREFIX(LoadTransposeMatrixfARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3536(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 3536(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3536(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 3536(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(LoadTransposeMatrixfARB), .-GL_PREFIX(LoadTransposeMatrixfARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultTransposeMatrixdARB) - .type GL_PREFIX(MultTransposeMatrixdARB), @function -GL_PREFIX(MultTransposeMatrixdARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3544(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 3544(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3544(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 3544(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultTransposeMatrixdARB), .-GL_PREFIX(MultTransposeMatrixdARB) - - .p2align 4,,15 - .globl GL_PREFIX(MultTransposeMatrixfARB) - .type GL_PREFIX(MultTransposeMatrixfARB), @function -GL_PREFIX(MultTransposeMatrixfARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3552(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 3552(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3552(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 3552(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultTransposeMatrixfARB), .-GL_PREFIX(MultTransposeMatrixfARB) - - .p2align 4,,15 - .globl GL_PREFIX(SampleCoverageARB) - .type GL_PREFIX(SampleCoverageARB), @function -GL_PREFIX(SampleCoverageARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3560(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3560(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3560(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3560(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SampleCoverageARB), .-GL_PREFIX(SampleCoverageARB) - - .p2align 4,,15 - .globl GL_PREFIX(CompressedTexImage1DARB) - .type GL_PREFIX(CompressedTexImage1DARB), @function -GL_PREFIX(CompressedTexImage1DARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3568(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3568(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3568(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3568(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CompressedTexImage1DARB), .-GL_PREFIX(CompressedTexImage1DARB) - - .p2align 4,,15 - .globl GL_PREFIX(CompressedTexImage2DARB) - .type GL_PREFIX(CompressedTexImage2DARB), @function -GL_PREFIX(CompressedTexImage2DARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3576(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3576(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3576(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3576(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CompressedTexImage2DARB), .-GL_PREFIX(CompressedTexImage2DARB) - - .p2align 4,,15 - .globl GL_PREFIX(CompressedTexImage3DARB) - .type GL_PREFIX(CompressedTexImage3DARB), @function -GL_PREFIX(CompressedTexImage3DARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3584(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3584(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3584(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3584(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CompressedTexImage3DARB), .-GL_PREFIX(CompressedTexImage3DARB) - - .p2align 4,,15 - .globl GL_PREFIX(CompressedTexSubImage1DARB) - .type GL_PREFIX(CompressedTexSubImage1DARB), @function -GL_PREFIX(CompressedTexSubImage1DARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3592(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3592(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3592(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3592(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CompressedTexSubImage1DARB), .-GL_PREFIX(CompressedTexSubImage1DARB) - - .p2align 4,,15 - .globl GL_PREFIX(CompressedTexSubImage2DARB) - .type GL_PREFIX(CompressedTexSubImage2DARB), @function -GL_PREFIX(CompressedTexSubImage2DARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3600(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3600(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3600(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3600(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CompressedTexSubImage2DARB), .-GL_PREFIX(CompressedTexSubImage2DARB) - - .p2align 4,,15 - .globl GL_PREFIX(CompressedTexSubImage3DARB) - .type GL_PREFIX(CompressedTexSubImage3DARB), @function -GL_PREFIX(CompressedTexSubImage3DARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3608(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3608(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3608(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3608(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CompressedTexSubImage3DARB), .-GL_PREFIX(CompressedTexSubImage3DARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetCompressedTexImageARB) - .type GL_PREFIX(GetCompressedTexImageARB), @function -GL_PREFIX(GetCompressedTexImageARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3616(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3616(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3616(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3616(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetCompressedTexImageARB), .-GL_PREFIX(GetCompressedTexImageARB) - - .p2align 4,,15 - .globl GL_PREFIX(DisableVertexAttribArrayARB) - .type GL_PREFIX(DisableVertexAttribArrayARB), @function -GL_PREFIX(DisableVertexAttribArrayARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3624(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 3624(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3624(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 3624(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DisableVertexAttribArrayARB), .-GL_PREFIX(DisableVertexAttribArrayARB) - - .p2align 4,,15 - .globl GL_PREFIX(EnableVertexAttribArrayARB) - .type GL_PREFIX(EnableVertexAttribArrayARB), @function -GL_PREFIX(EnableVertexAttribArrayARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3632(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 3632(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3632(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 3632(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EnableVertexAttribArrayARB), .-GL_PREFIX(EnableVertexAttribArrayARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetProgramEnvParameterdvARB) - .type GL_PREFIX(GetProgramEnvParameterdvARB), @function -GL_PREFIX(GetProgramEnvParameterdvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3640(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3640(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3640(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3640(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetProgramEnvParameterdvARB), .-GL_PREFIX(GetProgramEnvParameterdvARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetProgramEnvParameterfvARB) - .type GL_PREFIX(GetProgramEnvParameterfvARB), @function -GL_PREFIX(GetProgramEnvParameterfvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3648(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3648(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3648(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3648(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetProgramEnvParameterfvARB), .-GL_PREFIX(GetProgramEnvParameterfvARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetProgramLocalParameterdvARB) - .type GL_PREFIX(GetProgramLocalParameterdvARB), @function -GL_PREFIX(GetProgramLocalParameterdvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3656(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3656(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3656(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3656(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetProgramLocalParameterdvARB), .-GL_PREFIX(GetProgramLocalParameterdvARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetProgramLocalParameterfvARB) - .type GL_PREFIX(GetProgramLocalParameterfvARB), @function -GL_PREFIX(GetProgramLocalParameterfvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3664(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3664(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3664(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3664(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetProgramLocalParameterfvARB), .-GL_PREFIX(GetProgramLocalParameterfvARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetProgramStringARB) - .type GL_PREFIX(GetProgramStringARB), @function -GL_PREFIX(GetProgramStringARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3672(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3672(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3672(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3672(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetProgramStringARB), .-GL_PREFIX(GetProgramStringARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetProgramivARB) - .type GL_PREFIX(GetProgramivARB), @function -GL_PREFIX(GetProgramivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3680(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3680(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3680(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3680(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetProgramivARB), .-GL_PREFIX(GetProgramivARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetVertexAttribdvARB) - .type GL_PREFIX(GetVertexAttribdvARB), @function -GL_PREFIX(GetVertexAttribdvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3688(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3688(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3688(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3688(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetVertexAttribdvARB), .-GL_PREFIX(GetVertexAttribdvARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetVertexAttribfvARB) - .type GL_PREFIX(GetVertexAttribfvARB), @function -GL_PREFIX(GetVertexAttribfvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3696(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3696(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3696(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3696(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetVertexAttribfvARB), .-GL_PREFIX(GetVertexAttribfvARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetVertexAttribivARB) - .type GL_PREFIX(GetVertexAttribivARB), @function -GL_PREFIX(GetVertexAttribivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3704(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3704(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3704(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3704(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetVertexAttribivARB), .-GL_PREFIX(GetVertexAttribivARB) - - .p2align 4,,15 - .globl GL_PREFIX(ProgramEnvParameter4dARB) - .type GL_PREFIX(ProgramEnvParameter4dARB), @function -GL_PREFIX(ProgramEnvParameter4dARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3712(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $56, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - movq %xmm1, 24(%rsp) - movq %xmm2, 32(%rsp) - movq %xmm3, 40(%rsp) - call _x86_64_get_dispatch@PLT - movq 40(%rsp), %xmm3 - movq 32(%rsp), %xmm2 - movq 24(%rsp), %xmm1 - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $56, %rsp - movq 3712(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3712(%rax), %r11 - jmp *%r11 -1: - subq $56, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - movq %xmm1, 24(%rsp) - movq %xmm2, 32(%rsp) - movq %xmm3, 40(%rsp) - call _glapi_get_dispatch - movq 40(%rsp), %xmm3 - movq 32(%rsp), %xmm2 - movq 24(%rsp), %xmm1 - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $56, %rsp - movq 3712(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ProgramEnvParameter4dARB), .-GL_PREFIX(ProgramEnvParameter4dARB) - - .p2align 4,,15 - .globl GL_PREFIX(ProgramEnvParameter4dvARB) - .type GL_PREFIX(ProgramEnvParameter4dvARB), @function -GL_PREFIX(ProgramEnvParameter4dvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3720(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3720(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3720(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3720(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ProgramEnvParameter4dvARB), .-GL_PREFIX(ProgramEnvParameter4dvARB) - - .p2align 4,,15 - .globl GL_PREFIX(ProgramEnvParameter4fARB) - .type GL_PREFIX(ProgramEnvParameter4fARB), @function -GL_PREFIX(ProgramEnvParameter4fARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3728(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $56, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - movq %xmm1, 24(%rsp) - movq %xmm2, 32(%rsp) - movq %xmm3, 40(%rsp) - call _x86_64_get_dispatch@PLT - movq 40(%rsp), %xmm3 - movq 32(%rsp), %xmm2 - movq 24(%rsp), %xmm1 - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $56, %rsp - movq 3728(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3728(%rax), %r11 - jmp *%r11 -1: - subq $56, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - movq %xmm1, 24(%rsp) - movq %xmm2, 32(%rsp) - movq %xmm3, 40(%rsp) - call _glapi_get_dispatch - movq 40(%rsp), %xmm3 - movq 32(%rsp), %xmm2 - movq 24(%rsp), %xmm1 - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $56, %rsp - movq 3728(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ProgramEnvParameter4fARB), .-GL_PREFIX(ProgramEnvParameter4fARB) - - .p2align 4,,15 - .globl GL_PREFIX(ProgramEnvParameter4fvARB) - .type GL_PREFIX(ProgramEnvParameter4fvARB), @function -GL_PREFIX(ProgramEnvParameter4fvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3736(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3736(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3736(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3736(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ProgramEnvParameter4fvARB), .-GL_PREFIX(ProgramEnvParameter4fvARB) - - .p2align 4,,15 - .globl GL_PREFIX(ProgramLocalParameter4dARB) - .type GL_PREFIX(ProgramLocalParameter4dARB), @function -GL_PREFIX(ProgramLocalParameter4dARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3744(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $56, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - movq %xmm1, 24(%rsp) - movq %xmm2, 32(%rsp) - movq %xmm3, 40(%rsp) - call _x86_64_get_dispatch@PLT - movq 40(%rsp), %xmm3 - movq 32(%rsp), %xmm2 - movq 24(%rsp), %xmm1 - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $56, %rsp - movq 3744(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3744(%rax), %r11 - jmp *%r11 -1: - subq $56, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - movq %xmm1, 24(%rsp) - movq %xmm2, 32(%rsp) - movq %xmm3, 40(%rsp) - call _glapi_get_dispatch - movq 40(%rsp), %xmm3 - movq 32(%rsp), %xmm2 - movq 24(%rsp), %xmm1 - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $56, %rsp - movq 3744(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ProgramLocalParameter4dARB), .-GL_PREFIX(ProgramLocalParameter4dARB) - - .p2align 4,,15 - .globl GL_PREFIX(ProgramLocalParameter4dvARB) - .type GL_PREFIX(ProgramLocalParameter4dvARB), @function -GL_PREFIX(ProgramLocalParameter4dvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3752(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3752(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3752(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3752(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ProgramLocalParameter4dvARB), .-GL_PREFIX(ProgramLocalParameter4dvARB) - - .p2align 4,,15 - .globl GL_PREFIX(ProgramLocalParameter4fARB) - .type GL_PREFIX(ProgramLocalParameter4fARB), @function -GL_PREFIX(ProgramLocalParameter4fARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3760(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $56, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - movq %xmm1, 24(%rsp) - movq %xmm2, 32(%rsp) - movq %xmm3, 40(%rsp) - call _x86_64_get_dispatch@PLT - movq 40(%rsp), %xmm3 - movq 32(%rsp), %xmm2 - movq 24(%rsp), %xmm1 - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $56, %rsp - movq 3760(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3760(%rax), %r11 - jmp *%r11 -1: - subq $56, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - movq %xmm1, 24(%rsp) - movq %xmm2, 32(%rsp) - movq %xmm3, 40(%rsp) - call _glapi_get_dispatch - movq 40(%rsp), %xmm3 - movq 32(%rsp), %xmm2 - movq 24(%rsp), %xmm1 - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $56, %rsp - movq 3760(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ProgramLocalParameter4fARB), .-GL_PREFIX(ProgramLocalParameter4fARB) - - .p2align 4,,15 - .globl GL_PREFIX(ProgramLocalParameter4fvARB) - .type GL_PREFIX(ProgramLocalParameter4fvARB), @function -GL_PREFIX(ProgramLocalParameter4fvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3768(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3768(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3768(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3768(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ProgramLocalParameter4fvARB), .-GL_PREFIX(ProgramLocalParameter4fvARB) - - .p2align 4,,15 - .globl GL_PREFIX(ProgramStringARB) - .type GL_PREFIX(ProgramStringARB), @function -GL_PREFIX(ProgramStringARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3776(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3776(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3776(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3776(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ProgramStringARB), .-GL_PREFIX(ProgramStringARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib1dARB) - .type GL_PREFIX(VertexAttrib1dARB), @function -GL_PREFIX(VertexAttrib1dARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3784(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 3784(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3784(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 3784(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib1dARB), .-GL_PREFIX(VertexAttrib1dARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib1dvARB) - .type GL_PREFIX(VertexAttrib1dvARB), @function -GL_PREFIX(VertexAttrib1dvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3792(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3792(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3792(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3792(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib1dvARB), .-GL_PREFIX(VertexAttrib1dvARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib1fARB) - .type GL_PREFIX(VertexAttrib1fARB), @function -GL_PREFIX(VertexAttrib1fARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3800(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 3800(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3800(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 3800(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib1fARB), .-GL_PREFIX(VertexAttrib1fARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib1fvARB) - .type GL_PREFIX(VertexAttrib1fvARB), @function -GL_PREFIX(VertexAttrib1fvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3808(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3808(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3808(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3808(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib1fvARB), .-GL_PREFIX(VertexAttrib1fvARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib1sARB) - .type GL_PREFIX(VertexAttrib1sARB), @function -GL_PREFIX(VertexAttrib1sARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3816(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3816(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3816(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3816(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib1sARB), .-GL_PREFIX(VertexAttrib1sARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib1svARB) - .type GL_PREFIX(VertexAttrib1svARB), @function -GL_PREFIX(VertexAttrib1svARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3824(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3824(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3824(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3824(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib1svARB), .-GL_PREFIX(VertexAttrib1svARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib2dARB) - .type GL_PREFIX(VertexAttrib2dARB), @function -GL_PREFIX(VertexAttrib2dARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3832(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 3832(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3832(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 3832(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib2dARB), .-GL_PREFIX(VertexAttrib2dARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib2dvARB) - .type GL_PREFIX(VertexAttrib2dvARB), @function -GL_PREFIX(VertexAttrib2dvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3840(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3840(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3840(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3840(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib2dvARB), .-GL_PREFIX(VertexAttrib2dvARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib2fARB) - .type GL_PREFIX(VertexAttrib2fARB), @function -GL_PREFIX(VertexAttrib2fARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3848(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 3848(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3848(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 3848(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib2fARB), .-GL_PREFIX(VertexAttrib2fARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib2fvARB) - .type GL_PREFIX(VertexAttrib2fvARB), @function -GL_PREFIX(VertexAttrib2fvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3856(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3856(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3856(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3856(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib2fvARB), .-GL_PREFIX(VertexAttrib2fvARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib2sARB) - .type GL_PREFIX(VertexAttrib2sARB), @function -GL_PREFIX(VertexAttrib2sARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3864(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 3864(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3864(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 3864(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib2sARB), .-GL_PREFIX(VertexAttrib2sARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib2svARB) - .type GL_PREFIX(VertexAttrib2svARB), @function -GL_PREFIX(VertexAttrib2svARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3872(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3872(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3872(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3872(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib2svARB), .-GL_PREFIX(VertexAttrib2svARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib3dARB) - .type GL_PREFIX(VertexAttrib3dARB), @function -GL_PREFIX(VertexAttrib3dARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3880(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 3880(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3880(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 3880(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib3dARB), .-GL_PREFIX(VertexAttrib3dARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib3dvARB) - .type GL_PREFIX(VertexAttrib3dvARB), @function -GL_PREFIX(VertexAttrib3dvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3888(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3888(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3888(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3888(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib3dvARB), .-GL_PREFIX(VertexAttrib3dvARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib3fARB) - .type GL_PREFIX(VertexAttrib3fARB), @function -GL_PREFIX(VertexAttrib3fARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3896(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 3896(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3896(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 3896(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib3fARB), .-GL_PREFIX(VertexAttrib3fARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib3fvARB) - .type GL_PREFIX(VertexAttrib3fvARB), @function -GL_PREFIX(VertexAttrib3fvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3904(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3904(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3904(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3904(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib3fvARB), .-GL_PREFIX(VertexAttrib3fvARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib3sARB) - .type GL_PREFIX(VertexAttrib3sARB), @function -GL_PREFIX(VertexAttrib3sARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3912(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3912(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3912(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3912(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib3sARB), .-GL_PREFIX(VertexAttrib3sARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib3svARB) - .type GL_PREFIX(VertexAttrib3svARB), @function -GL_PREFIX(VertexAttrib3svARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3920(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3920(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3920(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3920(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib3svARB), .-GL_PREFIX(VertexAttrib3svARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4NbvARB) - .type GL_PREFIX(VertexAttrib4NbvARB), @function -GL_PREFIX(VertexAttrib4NbvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3928(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3928(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3928(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3928(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4NbvARB), .-GL_PREFIX(VertexAttrib4NbvARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4NivARB) - .type GL_PREFIX(VertexAttrib4NivARB), @function -GL_PREFIX(VertexAttrib4NivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3936(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3936(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3936(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3936(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4NivARB), .-GL_PREFIX(VertexAttrib4NivARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4NsvARB) - .type GL_PREFIX(VertexAttrib4NsvARB), @function -GL_PREFIX(VertexAttrib4NsvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3944(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3944(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3944(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3944(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4NsvARB), .-GL_PREFIX(VertexAttrib4NsvARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4NubARB) - .type GL_PREFIX(VertexAttrib4NubARB), @function -GL_PREFIX(VertexAttrib4NubARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3952(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3952(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3952(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 3952(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4NubARB), .-GL_PREFIX(VertexAttrib4NubARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4NubvARB) - .type GL_PREFIX(VertexAttrib4NubvARB), @function -GL_PREFIX(VertexAttrib4NubvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3960(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3960(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3960(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3960(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4NubvARB), .-GL_PREFIX(VertexAttrib4NubvARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4NuivARB) - .type GL_PREFIX(VertexAttrib4NuivARB), @function -GL_PREFIX(VertexAttrib4NuivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3968(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3968(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3968(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3968(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4NuivARB), .-GL_PREFIX(VertexAttrib4NuivARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4NusvARB) - .type GL_PREFIX(VertexAttrib4NusvARB), @function -GL_PREFIX(VertexAttrib4NusvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3976(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3976(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3976(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3976(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4NusvARB), .-GL_PREFIX(VertexAttrib4NusvARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4bvARB) - .type GL_PREFIX(VertexAttrib4bvARB), @function -GL_PREFIX(VertexAttrib4bvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3984(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 3984(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3984(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 3984(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4bvARB), .-GL_PREFIX(VertexAttrib4bvARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4dARB) - .type GL_PREFIX(VertexAttrib4dARB), @function -GL_PREFIX(VertexAttrib4dARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 3992(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - movq %xmm3, 32(%rsp) - call _x86_64_get_dispatch@PLT - movq 32(%rsp), %xmm3 - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 3992(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 3992(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - movq %xmm3, 32(%rsp) - call _glapi_get_dispatch - movq 32(%rsp), %xmm3 - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 3992(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4dARB), .-GL_PREFIX(VertexAttrib4dARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4dvARB) - .type GL_PREFIX(VertexAttrib4dvARB), @function -GL_PREFIX(VertexAttrib4dvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4000(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4000(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4000(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4000(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4dvARB), .-GL_PREFIX(VertexAttrib4dvARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4fARB) - .type GL_PREFIX(VertexAttrib4fARB), @function -GL_PREFIX(VertexAttrib4fARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4008(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - movq %xmm3, 32(%rsp) - call _x86_64_get_dispatch@PLT - movq 32(%rsp), %xmm3 - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 4008(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4008(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - movq %xmm3, 32(%rsp) - call _glapi_get_dispatch - movq 32(%rsp), %xmm3 - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 4008(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4fARB), .-GL_PREFIX(VertexAttrib4fARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4fvARB) - .type GL_PREFIX(VertexAttrib4fvARB), @function -GL_PREFIX(VertexAttrib4fvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4016(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4016(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4016(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4016(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4fvARB), .-GL_PREFIX(VertexAttrib4fvARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4ivARB) - .type GL_PREFIX(VertexAttrib4ivARB), @function -GL_PREFIX(VertexAttrib4ivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4024(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4024(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4024(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4024(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4ivARB), .-GL_PREFIX(VertexAttrib4ivARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4sARB) - .type GL_PREFIX(VertexAttrib4sARB), @function -GL_PREFIX(VertexAttrib4sARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4032(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4032(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4032(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4032(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4sARB), .-GL_PREFIX(VertexAttrib4sARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4svARB) - .type GL_PREFIX(VertexAttrib4svARB), @function -GL_PREFIX(VertexAttrib4svARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4040(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4040(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4040(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4040(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4svARB), .-GL_PREFIX(VertexAttrib4svARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4ubvARB) - .type GL_PREFIX(VertexAttrib4ubvARB), @function -GL_PREFIX(VertexAttrib4ubvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4048(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4048(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4048(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4048(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4ubvARB), .-GL_PREFIX(VertexAttrib4ubvARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4uivARB) - .type GL_PREFIX(VertexAttrib4uivARB), @function -GL_PREFIX(VertexAttrib4uivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4056(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4056(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4056(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4056(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4uivARB), .-GL_PREFIX(VertexAttrib4uivARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4usvARB) - .type GL_PREFIX(VertexAttrib4usvARB), @function -GL_PREFIX(VertexAttrib4usvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4064(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4064(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4064(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4064(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4usvARB), .-GL_PREFIX(VertexAttrib4usvARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribPointerARB) - .type GL_PREFIX(VertexAttribPointerARB), @function -GL_PREFIX(VertexAttribPointerARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4072(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4072(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4072(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4072(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribPointerARB), .-GL_PREFIX(VertexAttribPointerARB) - - .p2align 4,,15 - .globl GL_PREFIX(BindBufferARB) - .type GL_PREFIX(BindBufferARB), @function -GL_PREFIX(BindBufferARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4080(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4080(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4080(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4080(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BindBufferARB), .-GL_PREFIX(BindBufferARB) - - .p2align 4,,15 - .globl GL_PREFIX(BufferDataARB) - .type GL_PREFIX(BufferDataARB), @function -GL_PREFIX(BufferDataARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4088(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4088(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4088(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4088(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BufferDataARB), .-GL_PREFIX(BufferDataARB) - - .p2align 4,,15 - .globl GL_PREFIX(BufferSubDataARB) - .type GL_PREFIX(BufferSubDataARB), @function -GL_PREFIX(BufferSubDataARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4096(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4096(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4096(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4096(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BufferSubDataARB), .-GL_PREFIX(BufferSubDataARB) - - .p2align 4,,15 - .globl GL_PREFIX(DeleteBuffersARB) - .type GL_PREFIX(DeleteBuffersARB), @function -GL_PREFIX(DeleteBuffersARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4104(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4104(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4104(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4104(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DeleteBuffersARB), .-GL_PREFIX(DeleteBuffersARB) - - .p2align 4,,15 - .globl GL_PREFIX(GenBuffersARB) - .type GL_PREFIX(GenBuffersARB), @function -GL_PREFIX(GenBuffersARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4112(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4112(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4112(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4112(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GenBuffersARB), .-GL_PREFIX(GenBuffersARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetBufferParameterivARB) - .type GL_PREFIX(GetBufferParameterivARB), @function -GL_PREFIX(GetBufferParameterivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4120(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4120(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4120(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4120(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetBufferParameterivARB), .-GL_PREFIX(GetBufferParameterivARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetBufferPointervARB) - .type GL_PREFIX(GetBufferPointervARB), @function -GL_PREFIX(GetBufferPointervARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4128(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4128(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4128(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4128(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetBufferPointervARB), .-GL_PREFIX(GetBufferPointervARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetBufferSubDataARB) - .type GL_PREFIX(GetBufferSubDataARB), @function -GL_PREFIX(GetBufferSubDataARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4136(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4136(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4136(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4136(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetBufferSubDataARB), .-GL_PREFIX(GetBufferSubDataARB) - - .p2align 4,,15 - .globl GL_PREFIX(IsBufferARB) - .type GL_PREFIX(IsBufferARB), @function -GL_PREFIX(IsBufferARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4144(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 4144(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4144(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 4144(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(IsBufferARB), .-GL_PREFIX(IsBufferARB) - - .p2align 4,,15 - .globl GL_PREFIX(MapBufferARB) - .type GL_PREFIX(MapBufferARB), @function -GL_PREFIX(MapBufferARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4152(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4152(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4152(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4152(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MapBufferARB), .-GL_PREFIX(MapBufferARB) - - .p2align 4,,15 - .globl GL_PREFIX(UnmapBufferARB) - .type GL_PREFIX(UnmapBufferARB), @function -GL_PREFIX(UnmapBufferARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4160(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 4160(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4160(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 4160(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(UnmapBufferARB), .-GL_PREFIX(UnmapBufferARB) - - .p2align 4,,15 - .globl GL_PREFIX(BeginQueryARB) - .type GL_PREFIX(BeginQueryARB), @function -GL_PREFIX(BeginQueryARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4168(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4168(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4168(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4168(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BeginQueryARB), .-GL_PREFIX(BeginQueryARB) - - .p2align 4,,15 - .globl GL_PREFIX(DeleteQueriesARB) - .type GL_PREFIX(DeleteQueriesARB), @function -GL_PREFIX(DeleteQueriesARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4176(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4176(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4176(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4176(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DeleteQueriesARB), .-GL_PREFIX(DeleteQueriesARB) - - .p2align 4,,15 - .globl GL_PREFIX(EndQueryARB) - .type GL_PREFIX(EndQueryARB), @function -GL_PREFIX(EndQueryARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4184(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 4184(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4184(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 4184(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EndQueryARB), .-GL_PREFIX(EndQueryARB) - - .p2align 4,,15 - .globl GL_PREFIX(GenQueriesARB) - .type GL_PREFIX(GenQueriesARB), @function -GL_PREFIX(GenQueriesARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4192(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4192(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4192(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4192(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GenQueriesARB), .-GL_PREFIX(GenQueriesARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetQueryObjectivARB) - .type GL_PREFIX(GetQueryObjectivARB), @function -GL_PREFIX(GetQueryObjectivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4200(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4200(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4200(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4200(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetQueryObjectivARB), .-GL_PREFIX(GetQueryObjectivARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetQueryObjectuivARB) - .type GL_PREFIX(GetQueryObjectuivARB), @function -GL_PREFIX(GetQueryObjectuivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4208(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4208(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4208(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4208(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetQueryObjectuivARB), .-GL_PREFIX(GetQueryObjectuivARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetQueryivARB) - .type GL_PREFIX(GetQueryivARB), @function -GL_PREFIX(GetQueryivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4216(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4216(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4216(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4216(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetQueryivARB), .-GL_PREFIX(GetQueryivARB) - - .p2align 4,,15 - .globl GL_PREFIX(IsQueryARB) - .type GL_PREFIX(IsQueryARB), @function -GL_PREFIX(IsQueryARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4224(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 4224(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4224(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 4224(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(IsQueryARB), .-GL_PREFIX(IsQueryARB) - - .p2align 4,,15 - .globl GL_PREFIX(AttachObjectARB) - .type GL_PREFIX(AttachObjectARB), @function -GL_PREFIX(AttachObjectARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4232(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4232(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4232(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4232(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(AttachObjectARB), .-GL_PREFIX(AttachObjectARB) - - .p2align 4,,15 - .globl GL_PREFIX(CompileShaderARB) - .type GL_PREFIX(CompileShaderARB), @function -GL_PREFIX(CompileShaderARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4240(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 4240(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4240(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 4240(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CompileShaderARB), .-GL_PREFIX(CompileShaderARB) - - .p2align 4,,15 - .globl GL_PREFIX(CreateProgramObjectARB) - .type GL_PREFIX(CreateProgramObjectARB), @function -GL_PREFIX(CreateProgramObjectARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4248(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 4248(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4248(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 4248(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CreateProgramObjectARB), .-GL_PREFIX(CreateProgramObjectARB) - - .p2align 4,,15 - .globl GL_PREFIX(CreateShaderObjectARB) - .type GL_PREFIX(CreateShaderObjectARB), @function -GL_PREFIX(CreateShaderObjectARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4256(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 4256(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4256(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 4256(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CreateShaderObjectARB), .-GL_PREFIX(CreateShaderObjectARB) - - .p2align 4,,15 - .globl GL_PREFIX(DeleteObjectARB) - .type GL_PREFIX(DeleteObjectARB), @function -GL_PREFIX(DeleteObjectARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4264(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 4264(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4264(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 4264(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DeleteObjectARB), .-GL_PREFIX(DeleteObjectARB) - - .p2align 4,,15 - .globl GL_PREFIX(DetachObjectARB) - .type GL_PREFIX(DetachObjectARB), @function -GL_PREFIX(DetachObjectARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4272(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4272(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4272(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4272(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DetachObjectARB), .-GL_PREFIX(DetachObjectARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetActiveUniformARB) - .type GL_PREFIX(GetActiveUniformARB), @function -GL_PREFIX(GetActiveUniformARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4280(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4280(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4280(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4280(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetActiveUniformARB), .-GL_PREFIX(GetActiveUniformARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetAttachedObjectsARB) - .type GL_PREFIX(GetAttachedObjectsARB), @function -GL_PREFIX(GetAttachedObjectsARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4288(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4288(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4288(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4288(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetAttachedObjectsARB), .-GL_PREFIX(GetAttachedObjectsARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetHandleARB) - .type GL_PREFIX(GetHandleARB), @function -GL_PREFIX(GetHandleARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4296(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 4296(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4296(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 4296(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetHandleARB), .-GL_PREFIX(GetHandleARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetInfoLogARB) - .type GL_PREFIX(GetInfoLogARB), @function -GL_PREFIX(GetInfoLogARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4304(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4304(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4304(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4304(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetInfoLogARB), .-GL_PREFIX(GetInfoLogARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetObjectParameterfvARB) - .type GL_PREFIX(GetObjectParameterfvARB), @function -GL_PREFIX(GetObjectParameterfvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4312(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4312(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4312(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4312(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetObjectParameterfvARB), .-GL_PREFIX(GetObjectParameterfvARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetObjectParameterivARB) - .type GL_PREFIX(GetObjectParameterivARB), @function -GL_PREFIX(GetObjectParameterivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4320(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4320(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4320(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4320(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetObjectParameterivARB), .-GL_PREFIX(GetObjectParameterivARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetShaderSourceARB) - .type GL_PREFIX(GetShaderSourceARB), @function -GL_PREFIX(GetShaderSourceARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4328(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4328(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4328(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4328(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetShaderSourceARB), .-GL_PREFIX(GetShaderSourceARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetUniformLocationARB) - .type GL_PREFIX(GetUniformLocationARB), @function -GL_PREFIX(GetUniformLocationARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4336(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4336(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4336(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4336(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetUniformLocationARB), .-GL_PREFIX(GetUniformLocationARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetUniformfvARB) - .type GL_PREFIX(GetUniformfvARB), @function -GL_PREFIX(GetUniformfvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4344(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4344(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4344(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4344(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetUniformfvARB), .-GL_PREFIX(GetUniformfvARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetUniformivARB) - .type GL_PREFIX(GetUniformivARB), @function -GL_PREFIX(GetUniformivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4352(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4352(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4352(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4352(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetUniformivARB), .-GL_PREFIX(GetUniformivARB) - - .p2align 4,,15 - .globl GL_PREFIX(LinkProgramARB) - .type GL_PREFIX(LinkProgramARB), @function -GL_PREFIX(LinkProgramARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4360(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 4360(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4360(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 4360(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(LinkProgramARB), .-GL_PREFIX(LinkProgramARB) - - .p2align 4,,15 - .globl GL_PREFIX(ShaderSourceARB) - .type GL_PREFIX(ShaderSourceARB), @function -GL_PREFIX(ShaderSourceARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4368(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4368(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4368(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4368(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ShaderSourceARB), .-GL_PREFIX(ShaderSourceARB) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform1fARB) - .type GL_PREFIX(Uniform1fARB), @function -GL_PREFIX(Uniform1fARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4376(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 4376(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4376(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 4376(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform1fARB), .-GL_PREFIX(Uniform1fARB) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform1fvARB) - .type GL_PREFIX(Uniform1fvARB), @function -GL_PREFIX(Uniform1fvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4384(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4384(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4384(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4384(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform1fvARB), .-GL_PREFIX(Uniform1fvARB) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform1iARB) - .type GL_PREFIX(Uniform1iARB), @function -GL_PREFIX(Uniform1iARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4392(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4392(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4392(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4392(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform1iARB), .-GL_PREFIX(Uniform1iARB) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform1ivARB) - .type GL_PREFIX(Uniform1ivARB), @function -GL_PREFIX(Uniform1ivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4400(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4400(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4400(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4400(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform1ivARB), .-GL_PREFIX(Uniform1ivARB) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform2fARB) - .type GL_PREFIX(Uniform2fARB), @function -GL_PREFIX(Uniform2fARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4408(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 4408(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4408(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 4408(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform2fARB), .-GL_PREFIX(Uniform2fARB) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform2fvARB) - .type GL_PREFIX(Uniform2fvARB), @function -GL_PREFIX(Uniform2fvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4416(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4416(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4416(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4416(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform2fvARB), .-GL_PREFIX(Uniform2fvARB) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform2iARB) - .type GL_PREFIX(Uniform2iARB), @function -GL_PREFIX(Uniform2iARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4424(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4424(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4424(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4424(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform2iARB), .-GL_PREFIX(Uniform2iARB) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform2ivARB) - .type GL_PREFIX(Uniform2ivARB), @function -GL_PREFIX(Uniform2ivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4432(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4432(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4432(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4432(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform2ivARB), .-GL_PREFIX(Uniform2ivARB) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform3fARB) - .type GL_PREFIX(Uniform3fARB), @function -GL_PREFIX(Uniform3fARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4440(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 4440(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4440(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 4440(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform3fARB), .-GL_PREFIX(Uniform3fARB) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform3fvARB) - .type GL_PREFIX(Uniform3fvARB), @function -GL_PREFIX(Uniform3fvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4448(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4448(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4448(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4448(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform3fvARB), .-GL_PREFIX(Uniform3fvARB) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform3iARB) - .type GL_PREFIX(Uniform3iARB), @function -GL_PREFIX(Uniform3iARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4456(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4456(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4456(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4456(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform3iARB), .-GL_PREFIX(Uniform3iARB) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform3ivARB) - .type GL_PREFIX(Uniform3ivARB), @function -GL_PREFIX(Uniform3ivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4464(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4464(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4464(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4464(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform3ivARB), .-GL_PREFIX(Uniform3ivARB) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform4fARB) - .type GL_PREFIX(Uniform4fARB), @function -GL_PREFIX(Uniform4fARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4472(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - movq %xmm3, 32(%rsp) - call _x86_64_get_dispatch@PLT - movq 32(%rsp), %xmm3 - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 4472(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4472(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - movq %xmm3, 32(%rsp) - call _glapi_get_dispatch - movq 32(%rsp), %xmm3 - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 4472(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform4fARB), .-GL_PREFIX(Uniform4fARB) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform4fvARB) - .type GL_PREFIX(Uniform4fvARB), @function -GL_PREFIX(Uniform4fvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4480(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4480(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4480(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4480(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform4fvARB), .-GL_PREFIX(Uniform4fvARB) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform4iARB) - .type GL_PREFIX(Uniform4iARB), @function -GL_PREFIX(Uniform4iARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4488(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4488(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4488(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4488(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform4iARB), .-GL_PREFIX(Uniform4iARB) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform4ivARB) - .type GL_PREFIX(Uniform4ivARB), @function -GL_PREFIX(Uniform4ivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4496(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4496(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4496(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4496(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform4ivARB), .-GL_PREFIX(Uniform4ivARB) - - .p2align 4,,15 - .globl GL_PREFIX(UniformMatrix2fvARB) - .type GL_PREFIX(UniformMatrix2fvARB), @function -GL_PREFIX(UniformMatrix2fvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4504(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4504(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4504(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4504(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(UniformMatrix2fvARB), .-GL_PREFIX(UniformMatrix2fvARB) - - .p2align 4,,15 - .globl GL_PREFIX(UniformMatrix3fvARB) - .type GL_PREFIX(UniformMatrix3fvARB), @function -GL_PREFIX(UniformMatrix3fvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4512(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4512(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4512(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4512(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(UniformMatrix3fvARB), .-GL_PREFIX(UniformMatrix3fvARB) - - .p2align 4,,15 - .globl GL_PREFIX(UniformMatrix4fvARB) - .type GL_PREFIX(UniformMatrix4fvARB), @function -GL_PREFIX(UniformMatrix4fvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4520(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4520(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4520(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4520(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(UniformMatrix4fvARB), .-GL_PREFIX(UniformMatrix4fvARB) - - .p2align 4,,15 - .globl GL_PREFIX(UseProgramObjectARB) - .type GL_PREFIX(UseProgramObjectARB), @function -GL_PREFIX(UseProgramObjectARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4528(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 4528(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4528(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 4528(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(UseProgramObjectARB), .-GL_PREFIX(UseProgramObjectARB) - - .p2align 4,,15 - .globl GL_PREFIX(ValidateProgramARB) - .type GL_PREFIX(ValidateProgramARB), @function -GL_PREFIX(ValidateProgramARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4536(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 4536(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4536(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 4536(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ValidateProgramARB), .-GL_PREFIX(ValidateProgramARB) - - .p2align 4,,15 - .globl GL_PREFIX(BindAttribLocationARB) - .type GL_PREFIX(BindAttribLocationARB), @function -GL_PREFIX(BindAttribLocationARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4544(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4544(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4544(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4544(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BindAttribLocationARB), .-GL_PREFIX(BindAttribLocationARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetActiveAttribARB) - .type GL_PREFIX(GetActiveAttribARB), @function -GL_PREFIX(GetActiveAttribARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4552(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4552(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4552(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4552(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetActiveAttribARB), .-GL_PREFIX(GetActiveAttribARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetAttribLocationARB) - .type GL_PREFIX(GetAttribLocationARB), @function -GL_PREFIX(GetAttribLocationARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4560(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4560(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4560(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4560(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetAttribLocationARB), .-GL_PREFIX(GetAttribLocationARB) - - .p2align 4,,15 - .globl GL_PREFIX(DrawBuffersARB) - .type GL_PREFIX(DrawBuffersARB), @function -GL_PREFIX(DrawBuffersARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4568(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4568(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4568(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4568(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DrawBuffersARB), .-GL_PREFIX(DrawBuffersARB) - - .p2align 4,,15 - .globl GL_PREFIX(ClampColorARB) - .type GL_PREFIX(ClampColorARB), @function -GL_PREFIX(ClampColorARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4576(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4576(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4576(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4576(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ClampColorARB), .-GL_PREFIX(ClampColorARB) - - .p2align 4,,15 - .globl GL_PREFIX(DrawArraysInstancedARB) - .type GL_PREFIX(DrawArraysInstancedARB), @function -GL_PREFIX(DrawArraysInstancedARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4584(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4584(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4584(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4584(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DrawArraysInstancedARB), .-GL_PREFIX(DrawArraysInstancedARB) - - .p2align 4,,15 - .globl GL_PREFIX(DrawElementsInstancedARB) - .type GL_PREFIX(DrawElementsInstancedARB), @function -GL_PREFIX(DrawElementsInstancedARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4592(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4592(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4592(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4592(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DrawElementsInstancedARB), .-GL_PREFIX(DrawElementsInstancedARB) - - .p2align 4,,15 - .globl GL_PREFIX(RenderbufferStorageMultisample) - .type GL_PREFIX(RenderbufferStorageMultisample), @function -GL_PREFIX(RenderbufferStorageMultisample): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4600(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4600(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4600(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4600(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RenderbufferStorageMultisample), .-GL_PREFIX(RenderbufferStorageMultisample) - - .p2align 4,,15 - .globl GL_PREFIX(FramebufferTextureARB) - .type GL_PREFIX(FramebufferTextureARB), @function -GL_PREFIX(FramebufferTextureARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4608(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4608(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4608(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4608(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(FramebufferTextureARB), .-GL_PREFIX(FramebufferTextureARB) - - .p2align 4,,15 - .globl GL_PREFIX(FramebufferTextureFaceARB) - .type GL_PREFIX(FramebufferTextureFaceARB), @function -GL_PREFIX(FramebufferTextureFaceARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4616(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4616(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4616(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4616(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(FramebufferTextureFaceARB), .-GL_PREFIX(FramebufferTextureFaceARB) - - .p2align 4,,15 - .globl GL_PREFIX(ProgramParameteriARB) - .type GL_PREFIX(ProgramParameteriARB), @function -GL_PREFIX(ProgramParameteriARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4624(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4624(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4624(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4624(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ProgramParameteriARB), .-GL_PREFIX(ProgramParameteriARB) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribDivisorARB) - .type GL_PREFIX(VertexAttribDivisorARB), @function -GL_PREFIX(VertexAttribDivisorARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4632(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4632(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4632(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4632(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribDivisorARB), .-GL_PREFIX(VertexAttribDivisorARB) - - .p2align 4,,15 - .globl GL_PREFIX(FlushMappedBufferRange) - .type GL_PREFIX(FlushMappedBufferRange), @function -GL_PREFIX(FlushMappedBufferRange): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4640(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4640(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4640(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4640(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(FlushMappedBufferRange), .-GL_PREFIX(FlushMappedBufferRange) - - .p2align 4,,15 - .globl GL_PREFIX(MapBufferRange) - .type GL_PREFIX(MapBufferRange), @function -GL_PREFIX(MapBufferRange): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4648(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4648(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4648(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4648(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MapBufferRange), .-GL_PREFIX(MapBufferRange) - - .p2align 4,,15 - .globl GL_PREFIX(TexBufferARB) - .type GL_PREFIX(TexBufferARB), @function -GL_PREFIX(TexBufferARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4656(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4656(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4656(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4656(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexBufferARB), .-GL_PREFIX(TexBufferARB) - - .p2align 4,,15 - .globl GL_PREFIX(BindVertexArray) - .type GL_PREFIX(BindVertexArray), @function -GL_PREFIX(BindVertexArray): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4664(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 4664(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4664(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 4664(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BindVertexArray), .-GL_PREFIX(BindVertexArray) - - .p2align 4,,15 - .globl GL_PREFIX(GenVertexArrays) - .type GL_PREFIX(GenVertexArrays), @function -GL_PREFIX(GenVertexArrays): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4672(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4672(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4672(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4672(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GenVertexArrays), .-GL_PREFIX(GenVertexArrays) - - .p2align 4,,15 - .globl GL_PREFIX(CopyBufferSubData) - .type GL_PREFIX(CopyBufferSubData), @function -GL_PREFIX(CopyBufferSubData): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4680(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4680(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4680(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4680(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CopyBufferSubData), .-GL_PREFIX(CopyBufferSubData) - - .p2align 4,,15 - .globl GL_PREFIX(ClientWaitSync) - .type GL_PREFIX(ClientWaitSync), @function -GL_PREFIX(ClientWaitSync): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4688(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4688(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4688(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4688(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ClientWaitSync), .-GL_PREFIX(ClientWaitSync) - - .p2align 4,,15 - .globl GL_PREFIX(DeleteSync) - .type GL_PREFIX(DeleteSync), @function -GL_PREFIX(DeleteSync): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4696(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 4696(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4696(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 4696(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DeleteSync), .-GL_PREFIX(DeleteSync) - - .p2align 4,,15 - .globl GL_PREFIX(FenceSync) - .type GL_PREFIX(FenceSync), @function -GL_PREFIX(FenceSync): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4704(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4704(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4704(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4704(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(FenceSync), .-GL_PREFIX(FenceSync) - - .p2align 4,,15 - .globl GL_PREFIX(GetInteger64v) - .type GL_PREFIX(GetInteger64v), @function -GL_PREFIX(GetInteger64v): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4712(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4712(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4712(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4712(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetInteger64v), .-GL_PREFIX(GetInteger64v) - - .p2align 4,,15 - .globl GL_PREFIX(GetSynciv) - .type GL_PREFIX(GetSynciv), @function -GL_PREFIX(GetSynciv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4720(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4720(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4720(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4720(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetSynciv), .-GL_PREFIX(GetSynciv) - - .p2align 4,,15 - .globl GL_PREFIX(IsSync) - .type GL_PREFIX(IsSync), @function -GL_PREFIX(IsSync): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4728(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 4728(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4728(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 4728(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(IsSync), .-GL_PREFIX(IsSync) - - .p2align 4,,15 - .globl GL_PREFIX(WaitSync) - .type GL_PREFIX(WaitSync), @function -GL_PREFIX(WaitSync): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4736(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4736(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4736(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4736(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WaitSync), .-GL_PREFIX(WaitSync) - - .p2align 4,,15 - .globl GL_PREFIX(DrawElementsBaseVertex) - .type GL_PREFIX(DrawElementsBaseVertex), @function -GL_PREFIX(DrawElementsBaseVertex): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4744(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4744(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4744(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4744(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DrawElementsBaseVertex), .-GL_PREFIX(DrawElementsBaseVertex) - - .p2align 4,,15 - .globl GL_PREFIX(DrawElementsInstancedBaseVertex) - .type GL_PREFIX(DrawElementsInstancedBaseVertex), @function -GL_PREFIX(DrawElementsInstancedBaseVertex): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4752(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4752(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4752(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4752(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DrawElementsInstancedBaseVertex), .-GL_PREFIX(DrawElementsInstancedBaseVertex) - - .p2align 4,,15 - .globl GL_PREFIX(DrawRangeElementsBaseVertex) - .type GL_PREFIX(DrawRangeElementsBaseVertex), @function -GL_PREFIX(DrawRangeElementsBaseVertex): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4760(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4760(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4760(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4760(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DrawRangeElementsBaseVertex), .-GL_PREFIX(DrawRangeElementsBaseVertex) - - .p2align 4,,15 - .globl GL_PREFIX(MultiDrawElementsBaseVertex) - .type GL_PREFIX(MultiDrawElementsBaseVertex), @function -GL_PREFIX(MultiDrawElementsBaseVertex): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4768(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4768(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4768(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4768(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiDrawElementsBaseVertex), .-GL_PREFIX(MultiDrawElementsBaseVertex) - - .p2align 4,,15 - .globl GL_PREFIX(BlendEquationSeparateiARB) - .type GL_PREFIX(BlendEquationSeparateiARB), @function -GL_PREFIX(BlendEquationSeparateiARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4776(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4776(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4776(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4776(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BlendEquationSeparateiARB), .-GL_PREFIX(BlendEquationSeparateiARB) - - .p2align 4,,15 - .globl GL_PREFIX(BlendEquationiARB) - .type GL_PREFIX(BlendEquationiARB), @function -GL_PREFIX(BlendEquationiARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4784(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4784(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4784(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4784(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BlendEquationiARB), .-GL_PREFIX(BlendEquationiARB) - - .p2align 4,,15 - .globl GL_PREFIX(BlendFuncSeparateiARB) - .type GL_PREFIX(BlendFuncSeparateiARB), @function -GL_PREFIX(BlendFuncSeparateiARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4792(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4792(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4792(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 4792(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BlendFuncSeparateiARB), .-GL_PREFIX(BlendFuncSeparateiARB) - - .p2align 4,,15 - .globl GL_PREFIX(BlendFunciARB) - .type GL_PREFIX(BlendFunciARB), @function -GL_PREFIX(BlendFunciARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4800(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4800(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4800(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4800(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BlendFunciARB), .-GL_PREFIX(BlendFunciARB) - - .p2align 4,,15 - .globl GL_PREFIX(BindSampler) - .type GL_PREFIX(BindSampler), @function -GL_PREFIX(BindSampler): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4808(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4808(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4808(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4808(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BindSampler), .-GL_PREFIX(BindSampler) - - .p2align 4,,15 - .globl GL_PREFIX(DeleteSamplers) - .type GL_PREFIX(DeleteSamplers), @function -GL_PREFIX(DeleteSamplers): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4816(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4816(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4816(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4816(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DeleteSamplers), .-GL_PREFIX(DeleteSamplers) - - .p2align 4,,15 - .globl GL_PREFIX(GenSamplers) - .type GL_PREFIX(GenSamplers), @function -GL_PREFIX(GenSamplers): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4824(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4824(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4824(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4824(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GenSamplers), .-GL_PREFIX(GenSamplers) - - .p2align 4,,15 - .globl GL_PREFIX(GetSamplerParameterIiv) - .type GL_PREFIX(GetSamplerParameterIiv), @function -GL_PREFIX(GetSamplerParameterIiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4832(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4832(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4832(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4832(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetSamplerParameterIiv), .-GL_PREFIX(GetSamplerParameterIiv) - - .p2align 4,,15 - .globl GL_PREFIX(GetSamplerParameterIuiv) - .type GL_PREFIX(GetSamplerParameterIuiv), @function -GL_PREFIX(GetSamplerParameterIuiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4840(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4840(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4840(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4840(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetSamplerParameterIuiv), .-GL_PREFIX(GetSamplerParameterIuiv) - - .p2align 4,,15 - .globl GL_PREFIX(GetSamplerParameterfv) - .type GL_PREFIX(GetSamplerParameterfv), @function -GL_PREFIX(GetSamplerParameterfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4848(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4848(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4848(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4848(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetSamplerParameterfv), .-GL_PREFIX(GetSamplerParameterfv) - - .p2align 4,,15 - .globl GL_PREFIX(GetSamplerParameteriv) - .type GL_PREFIX(GetSamplerParameteriv), @function -GL_PREFIX(GetSamplerParameteriv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4856(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4856(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4856(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4856(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetSamplerParameteriv), .-GL_PREFIX(GetSamplerParameteriv) - - .p2align 4,,15 - .globl GL_PREFIX(IsSampler) - .type GL_PREFIX(IsSampler), @function -GL_PREFIX(IsSampler): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4864(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 4864(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4864(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 4864(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(IsSampler), .-GL_PREFIX(IsSampler) - - .p2align 4,,15 - .globl GL_PREFIX(SamplerParameterIiv) - .type GL_PREFIX(SamplerParameterIiv), @function -GL_PREFIX(SamplerParameterIiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4872(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4872(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4872(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4872(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SamplerParameterIiv), .-GL_PREFIX(SamplerParameterIiv) - - .p2align 4,,15 - .globl GL_PREFIX(SamplerParameterIuiv) - .type GL_PREFIX(SamplerParameterIuiv), @function -GL_PREFIX(SamplerParameterIuiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4880(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4880(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4880(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4880(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SamplerParameterIuiv), .-GL_PREFIX(SamplerParameterIuiv) - - .p2align 4,,15 - .globl GL_PREFIX(SamplerParameterf) - .type GL_PREFIX(SamplerParameterf), @function -GL_PREFIX(SamplerParameterf): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4888(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $24, %rsp - movq 4888(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4888(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %xmm0, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm0 - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $24, %rsp - movq 4888(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SamplerParameterf), .-GL_PREFIX(SamplerParameterf) - - .p2align 4,,15 - .globl GL_PREFIX(SamplerParameterfv) - .type GL_PREFIX(SamplerParameterfv), @function -GL_PREFIX(SamplerParameterfv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4896(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4896(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4896(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4896(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SamplerParameterfv), .-GL_PREFIX(SamplerParameterfv) - - .p2align 4,,15 - .globl GL_PREFIX(SamplerParameteri) - .type GL_PREFIX(SamplerParameteri), @function -GL_PREFIX(SamplerParameteri): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4904(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4904(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4904(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4904(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SamplerParameteri), .-GL_PREFIX(SamplerParameteri) - - .p2align 4,,15 - .globl GL_PREFIX(SamplerParameteriv) - .type GL_PREFIX(SamplerParameteriv), @function -GL_PREFIX(SamplerParameteriv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4912(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4912(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4912(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4912(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SamplerParameteriv), .-GL_PREFIX(SamplerParameteriv) - - .p2align 4,,15 - .globl GL_PREFIX(ColorP3ui) - .type GL_PREFIX(ColorP3ui), @function -GL_PREFIX(ColorP3ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4920(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4920(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4920(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4920(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ColorP3ui), .-GL_PREFIX(ColorP3ui) - - .p2align 4,,15 - .globl GL_PREFIX(ColorP3uiv) - .type GL_PREFIX(ColorP3uiv), @function -GL_PREFIX(ColorP3uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4928(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4928(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4928(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4928(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ColorP3uiv), .-GL_PREFIX(ColorP3uiv) - - .p2align 4,,15 - .globl GL_PREFIX(ColorP4ui) - .type GL_PREFIX(ColorP4ui), @function -GL_PREFIX(ColorP4ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4936(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4936(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4936(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4936(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ColorP4ui), .-GL_PREFIX(ColorP4ui) - - .p2align 4,,15 - .globl GL_PREFIX(ColorP4uiv) - .type GL_PREFIX(ColorP4uiv), @function -GL_PREFIX(ColorP4uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4944(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 4944(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4944(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 4944(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ColorP4uiv), .-GL_PREFIX(ColorP4uiv) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoordP1ui) - .type GL_PREFIX(MultiTexCoordP1ui), @function -GL_PREFIX(MultiTexCoordP1ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4952(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4952(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4952(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4952(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoordP1ui), .-GL_PREFIX(MultiTexCoordP1ui) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoordP1uiv) - .type GL_PREFIX(MultiTexCoordP1uiv), @function -GL_PREFIX(MultiTexCoordP1uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4960(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4960(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4960(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4960(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoordP1uiv), .-GL_PREFIX(MultiTexCoordP1uiv) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoordP2ui) - .type GL_PREFIX(MultiTexCoordP2ui), @function -GL_PREFIX(MultiTexCoordP2ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4968(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4968(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4968(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4968(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoordP2ui), .-GL_PREFIX(MultiTexCoordP2ui) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoordP2uiv) - .type GL_PREFIX(MultiTexCoordP2uiv), @function -GL_PREFIX(MultiTexCoordP2uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4976(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4976(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4976(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4976(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoordP2uiv), .-GL_PREFIX(MultiTexCoordP2uiv) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoordP3ui) - .type GL_PREFIX(MultiTexCoordP3ui), @function -GL_PREFIX(MultiTexCoordP3ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4984(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4984(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4984(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4984(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoordP3ui), .-GL_PREFIX(MultiTexCoordP3ui) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoordP3uiv) - .type GL_PREFIX(MultiTexCoordP3uiv), @function -GL_PREFIX(MultiTexCoordP3uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 4992(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 4992(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 4992(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 4992(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoordP3uiv), .-GL_PREFIX(MultiTexCoordP3uiv) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoordP4ui) - .type GL_PREFIX(MultiTexCoordP4ui), @function -GL_PREFIX(MultiTexCoordP4ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5000(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 5000(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5000(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 5000(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoordP4ui), .-GL_PREFIX(MultiTexCoordP4ui) - - .p2align 4,,15 - .globl GL_PREFIX(MultiTexCoordP4uiv) - .type GL_PREFIX(MultiTexCoordP4uiv), @function -GL_PREFIX(MultiTexCoordP4uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5008(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 5008(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5008(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 5008(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiTexCoordP4uiv), .-GL_PREFIX(MultiTexCoordP4uiv) - - .p2align 4,,15 - .globl GL_PREFIX(NormalP3ui) - .type GL_PREFIX(NormalP3ui), @function -GL_PREFIX(NormalP3ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5016(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5016(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5016(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5016(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(NormalP3ui), .-GL_PREFIX(NormalP3ui) - - .p2align 4,,15 - .globl GL_PREFIX(NormalP3uiv) - .type GL_PREFIX(NormalP3uiv), @function -GL_PREFIX(NormalP3uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5024(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5024(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5024(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5024(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(NormalP3uiv), .-GL_PREFIX(NormalP3uiv) - - .p2align 4,,15 - .globl GL_PREFIX(SecondaryColorP3ui) - .type GL_PREFIX(SecondaryColorP3ui), @function -GL_PREFIX(SecondaryColorP3ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5032(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5032(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5032(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5032(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SecondaryColorP3ui), .-GL_PREFIX(SecondaryColorP3ui) - - .p2align 4,,15 - .globl GL_PREFIX(SecondaryColorP3uiv) - .type GL_PREFIX(SecondaryColorP3uiv), @function -GL_PREFIX(SecondaryColorP3uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5040(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5040(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5040(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5040(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SecondaryColorP3uiv), .-GL_PREFIX(SecondaryColorP3uiv) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoordP1ui) - .type GL_PREFIX(TexCoordP1ui), @function -GL_PREFIX(TexCoordP1ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5048(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5048(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5048(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5048(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoordP1ui), .-GL_PREFIX(TexCoordP1ui) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoordP1uiv) - .type GL_PREFIX(TexCoordP1uiv), @function -GL_PREFIX(TexCoordP1uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5056(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5056(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5056(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5056(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoordP1uiv), .-GL_PREFIX(TexCoordP1uiv) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoordP2ui) - .type GL_PREFIX(TexCoordP2ui), @function -GL_PREFIX(TexCoordP2ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5064(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5064(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5064(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5064(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoordP2ui), .-GL_PREFIX(TexCoordP2ui) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoordP2uiv) - .type GL_PREFIX(TexCoordP2uiv), @function -GL_PREFIX(TexCoordP2uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5072(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5072(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5072(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5072(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoordP2uiv), .-GL_PREFIX(TexCoordP2uiv) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoordP3ui) - .type GL_PREFIX(TexCoordP3ui), @function -GL_PREFIX(TexCoordP3ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5080(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5080(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5080(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5080(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoordP3ui), .-GL_PREFIX(TexCoordP3ui) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoordP3uiv) - .type GL_PREFIX(TexCoordP3uiv), @function -GL_PREFIX(TexCoordP3uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5088(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5088(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5088(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5088(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoordP3uiv), .-GL_PREFIX(TexCoordP3uiv) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoordP4ui) - .type GL_PREFIX(TexCoordP4ui), @function -GL_PREFIX(TexCoordP4ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5096(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5096(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5096(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5096(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoordP4ui), .-GL_PREFIX(TexCoordP4ui) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoordP4uiv) - .type GL_PREFIX(TexCoordP4uiv), @function -GL_PREFIX(TexCoordP4uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5104(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5104(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5104(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5104(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoordP4uiv), .-GL_PREFIX(TexCoordP4uiv) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribP1ui) - .type GL_PREFIX(VertexAttribP1ui), @function -GL_PREFIX(VertexAttribP1ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5112(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5112(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5112(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5112(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribP1ui), .-GL_PREFIX(VertexAttribP1ui) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribP1uiv) - .type GL_PREFIX(VertexAttribP1uiv), @function -GL_PREFIX(VertexAttribP1uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5120(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5120(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5120(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5120(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribP1uiv), .-GL_PREFIX(VertexAttribP1uiv) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribP2ui) - .type GL_PREFIX(VertexAttribP2ui), @function -GL_PREFIX(VertexAttribP2ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5128(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5128(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5128(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5128(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribP2ui), .-GL_PREFIX(VertexAttribP2ui) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribP2uiv) - .type GL_PREFIX(VertexAttribP2uiv), @function -GL_PREFIX(VertexAttribP2uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5136(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5136(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5136(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5136(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribP2uiv), .-GL_PREFIX(VertexAttribP2uiv) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribP3ui) - .type GL_PREFIX(VertexAttribP3ui), @function -GL_PREFIX(VertexAttribP3ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5144(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5144(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5144(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5144(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribP3ui), .-GL_PREFIX(VertexAttribP3ui) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribP3uiv) - .type GL_PREFIX(VertexAttribP3uiv), @function -GL_PREFIX(VertexAttribP3uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5152(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5152(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5152(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5152(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribP3uiv), .-GL_PREFIX(VertexAttribP3uiv) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribP4ui) - .type GL_PREFIX(VertexAttribP4ui), @function -GL_PREFIX(VertexAttribP4ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5160(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5160(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5160(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5160(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribP4ui), .-GL_PREFIX(VertexAttribP4ui) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribP4uiv) - .type GL_PREFIX(VertexAttribP4uiv), @function -GL_PREFIX(VertexAttribP4uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5168(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5168(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5168(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5168(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribP4uiv), .-GL_PREFIX(VertexAttribP4uiv) - - .p2align 4,,15 - .globl GL_PREFIX(VertexP2ui) - .type GL_PREFIX(VertexP2ui), @function -GL_PREFIX(VertexP2ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5176(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5176(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5176(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5176(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexP2ui), .-GL_PREFIX(VertexP2ui) - - .p2align 4,,15 - .globl GL_PREFIX(VertexP2uiv) - .type GL_PREFIX(VertexP2uiv), @function -GL_PREFIX(VertexP2uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5184(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5184(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5184(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5184(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexP2uiv), .-GL_PREFIX(VertexP2uiv) - - .p2align 4,,15 - .globl GL_PREFIX(VertexP3ui) - .type GL_PREFIX(VertexP3ui), @function -GL_PREFIX(VertexP3ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5192(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5192(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5192(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5192(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexP3ui), .-GL_PREFIX(VertexP3ui) - - .p2align 4,,15 - .globl GL_PREFIX(VertexP3uiv) - .type GL_PREFIX(VertexP3uiv), @function -GL_PREFIX(VertexP3uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5200(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5200(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5200(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5200(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexP3uiv), .-GL_PREFIX(VertexP3uiv) - - .p2align 4,,15 - .globl GL_PREFIX(VertexP4ui) - .type GL_PREFIX(VertexP4ui), @function -GL_PREFIX(VertexP4ui): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5208(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5208(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5208(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5208(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexP4ui), .-GL_PREFIX(VertexP4ui) - - .p2align 4,,15 - .globl GL_PREFIX(VertexP4uiv) - .type GL_PREFIX(VertexP4uiv), @function -GL_PREFIX(VertexP4uiv): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5216(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5216(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5216(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5216(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexP4uiv), .-GL_PREFIX(VertexP4uiv) - - .p2align 4,,15 - .globl GL_PREFIX(BindTransformFeedback) - .type GL_PREFIX(BindTransformFeedback), @function -GL_PREFIX(BindTransformFeedback): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5224(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5224(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5224(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5224(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BindTransformFeedback), .-GL_PREFIX(BindTransformFeedback) - - .p2align 4,,15 - .globl GL_PREFIX(DeleteTransformFeedbacks) - .type GL_PREFIX(DeleteTransformFeedbacks), @function -GL_PREFIX(DeleteTransformFeedbacks): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5232(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5232(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5232(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5232(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DeleteTransformFeedbacks), .-GL_PREFIX(DeleteTransformFeedbacks) - - .p2align 4,,15 - .globl GL_PREFIX(DrawTransformFeedback) - .type GL_PREFIX(DrawTransformFeedback), @function -GL_PREFIX(DrawTransformFeedback): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5240(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5240(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5240(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5240(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DrawTransformFeedback), .-GL_PREFIX(DrawTransformFeedback) - - .p2align 4,,15 - .globl GL_PREFIX(GenTransformFeedbacks) - .type GL_PREFIX(GenTransformFeedbacks), @function -GL_PREFIX(GenTransformFeedbacks): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5248(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5248(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5248(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5248(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GenTransformFeedbacks), .-GL_PREFIX(GenTransformFeedbacks) - - .p2align 4,,15 - .globl GL_PREFIX(IsTransformFeedback) - .type GL_PREFIX(IsTransformFeedback), @function -GL_PREFIX(IsTransformFeedback): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5256(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 5256(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5256(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 5256(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(IsTransformFeedback), .-GL_PREFIX(IsTransformFeedback) - - .p2align 4,,15 - .globl GL_PREFIX(PauseTransformFeedback) - .type GL_PREFIX(PauseTransformFeedback), @function -GL_PREFIX(PauseTransformFeedback): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5264(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 5264(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5264(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 5264(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PauseTransformFeedback), .-GL_PREFIX(PauseTransformFeedback) - - .p2align 4,,15 - .globl GL_PREFIX(ResumeTransformFeedback) - .type GL_PREFIX(ResumeTransformFeedback), @function -GL_PREFIX(ResumeTransformFeedback): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5272(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 5272(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5272(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 5272(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ResumeTransformFeedback), .-GL_PREFIX(ResumeTransformFeedback) - - .p2align 4,,15 - .globl GL_PREFIX(ClearDepthf) - .type GL_PREFIX(ClearDepthf), @function -GL_PREFIX(ClearDepthf): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5280(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 5280(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5280(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 5280(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ClearDepthf), .-GL_PREFIX(ClearDepthf) - - .p2align 4,,15 - .globl GL_PREFIX(DepthRangef) - .type GL_PREFIX(DepthRangef), @function -GL_PREFIX(DepthRangef): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5288(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5288(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5288(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5288(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DepthRangef), .-GL_PREFIX(DepthRangef) - - .p2align 4,,15 - .globl GL_PREFIX(GetShaderPrecisionFormat) - .type GL_PREFIX(GetShaderPrecisionFormat), @function -GL_PREFIX(GetShaderPrecisionFormat): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5296(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5296(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5296(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5296(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetShaderPrecisionFormat), .-GL_PREFIX(GetShaderPrecisionFormat) - - .p2align 4,,15 - .globl GL_PREFIX(ReleaseShaderCompiler) - .type GL_PREFIX(ReleaseShaderCompiler), @function -GL_PREFIX(ReleaseShaderCompiler): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5304(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 5304(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5304(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 5304(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ReleaseShaderCompiler), .-GL_PREFIX(ReleaseShaderCompiler) - - .p2align 4,,15 - .globl GL_PREFIX(ShaderBinary) - .type GL_PREFIX(ShaderBinary), @function -GL_PREFIX(ShaderBinary): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5312(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5312(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5312(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5312(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ShaderBinary), .-GL_PREFIX(ShaderBinary) - - .p2align 4,,15 - .globl GL_PREFIX(GetGraphicsResetStatusARB) - .type GL_PREFIX(GetGraphicsResetStatusARB), @function -GL_PREFIX(GetGraphicsResetStatusARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5320(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 5320(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5320(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 5320(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetGraphicsResetStatusARB), .-GL_PREFIX(GetGraphicsResetStatusARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetnColorTableARB) - .type GL_PREFIX(GetnColorTableARB), @function -GL_PREFIX(GetnColorTableARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5328(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5328(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5328(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5328(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetnColorTableARB), .-GL_PREFIX(GetnColorTableARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetnCompressedTexImageARB) - .type GL_PREFIX(GetnCompressedTexImageARB), @function -GL_PREFIX(GetnCompressedTexImageARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5336(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5336(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5336(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5336(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetnCompressedTexImageARB), .-GL_PREFIX(GetnCompressedTexImageARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetnConvolutionFilterARB) - .type GL_PREFIX(GetnConvolutionFilterARB), @function -GL_PREFIX(GetnConvolutionFilterARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5344(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5344(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5344(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5344(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetnConvolutionFilterARB), .-GL_PREFIX(GetnConvolutionFilterARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetnHistogramARB) - .type GL_PREFIX(GetnHistogramARB), @function -GL_PREFIX(GetnHistogramARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5352(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5352(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5352(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5352(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetnHistogramARB), .-GL_PREFIX(GetnHistogramARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetnMapdvARB) - .type GL_PREFIX(GetnMapdvARB), @function -GL_PREFIX(GetnMapdvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5360(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5360(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5360(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5360(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetnMapdvARB), .-GL_PREFIX(GetnMapdvARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetnMapfvARB) - .type GL_PREFIX(GetnMapfvARB), @function -GL_PREFIX(GetnMapfvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5368(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5368(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5368(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5368(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetnMapfvARB), .-GL_PREFIX(GetnMapfvARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetnMapivARB) - .type GL_PREFIX(GetnMapivARB), @function -GL_PREFIX(GetnMapivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5376(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5376(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5376(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5376(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetnMapivARB), .-GL_PREFIX(GetnMapivARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetnMinmaxARB) - .type GL_PREFIX(GetnMinmaxARB), @function -GL_PREFIX(GetnMinmaxARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5384(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5384(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5384(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5384(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetnMinmaxARB), .-GL_PREFIX(GetnMinmaxARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetnPixelMapfvARB) - .type GL_PREFIX(GetnPixelMapfvARB), @function -GL_PREFIX(GetnPixelMapfvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5392(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 5392(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5392(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 5392(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetnPixelMapfvARB), .-GL_PREFIX(GetnPixelMapfvARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetnPixelMapuivARB) - .type GL_PREFIX(GetnPixelMapuivARB), @function -GL_PREFIX(GetnPixelMapuivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5400(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 5400(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5400(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 5400(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetnPixelMapuivARB), .-GL_PREFIX(GetnPixelMapuivARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetnPixelMapusvARB) - .type GL_PREFIX(GetnPixelMapusvARB), @function -GL_PREFIX(GetnPixelMapusvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5408(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 5408(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5408(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 5408(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetnPixelMapusvARB), .-GL_PREFIX(GetnPixelMapusvARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetnPolygonStippleARB) - .type GL_PREFIX(GetnPolygonStippleARB), @function -GL_PREFIX(GetnPolygonStippleARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5416(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5416(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5416(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5416(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetnPolygonStippleARB), .-GL_PREFIX(GetnPolygonStippleARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetnSeparableFilterARB) - .type GL_PREFIX(GetnSeparableFilterARB), @function -GL_PREFIX(GetnSeparableFilterARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5424(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5424(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5424(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5424(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetnSeparableFilterARB), .-GL_PREFIX(GetnSeparableFilterARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetnTexImageARB) - .type GL_PREFIX(GetnTexImageARB), @function -GL_PREFIX(GetnTexImageARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5432(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5432(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5432(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5432(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetnTexImageARB), .-GL_PREFIX(GetnTexImageARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetnUniformdvARB) - .type GL_PREFIX(GetnUniformdvARB), @function -GL_PREFIX(GetnUniformdvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5440(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5440(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5440(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5440(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetnUniformdvARB), .-GL_PREFIX(GetnUniformdvARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetnUniformfvARB) - .type GL_PREFIX(GetnUniformfvARB), @function -GL_PREFIX(GetnUniformfvARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5448(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5448(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5448(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5448(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetnUniformfvARB), .-GL_PREFIX(GetnUniformfvARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetnUniformivARB) - .type GL_PREFIX(GetnUniformivARB), @function -GL_PREFIX(GetnUniformivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5456(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5456(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5456(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5456(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetnUniformivARB), .-GL_PREFIX(GetnUniformivARB) - - .p2align 4,,15 - .globl GL_PREFIX(GetnUniformuivARB) - .type GL_PREFIX(GetnUniformuivARB), @function -GL_PREFIX(GetnUniformuivARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5464(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5464(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5464(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5464(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetnUniformuivARB), .-GL_PREFIX(GetnUniformuivARB) - - .p2align 4,,15 - .globl GL_PREFIX(ReadnPixelsARB) - .type GL_PREFIX(ReadnPixelsARB), @function -GL_PREFIX(ReadnPixelsARB): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5472(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5472(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5472(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5472(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ReadnPixelsARB), .-GL_PREFIX(ReadnPixelsARB) - - .p2align 4,,15 - .globl GL_PREFIX(TexStorage1D) - .type GL_PREFIX(TexStorage1D), @function -GL_PREFIX(TexStorage1D): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5480(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5480(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5480(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5480(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexStorage1D), .-GL_PREFIX(TexStorage1D) - - .p2align 4,,15 - .globl GL_PREFIX(TexStorage2D) - .type GL_PREFIX(TexStorage2D), @function -GL_PREFIX(TexStorage2D): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5488(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5488(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5488(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5488(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexStorage2D), .-GL_PREFIX(TexStorage2D) - - .p2align 4,,15 - .globl GL_PREFIX(TexStorage3D) - .type GL_PREFIX(TexStorage3D), @function -GL_PREFIX(TexStorage3D): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5496(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5496(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5496(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5496(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexStorage3D), .-GL_PREFIX(TexStorage3D) - - .p2align 4,,15 - .globl GL_PREFIX(TextureStorage1DEXT) - .type GL_PREFIX(TextureStorage1DEXT), @function -GL_PREFIX(TextureStorage1DEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5504(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5504(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5504(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5504(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TextureStorage1DEXT), .-GL_PREFIX(TextureStorage1DEXT) - - .p2align 4,,15 - .globl GL_PREFIX(TextureStorage2DEXT) - .type GL_PREFIX(TextureStorage2DEXT), @function -GL_PREFIX(TextureStorage2DEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5512(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5512(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5512(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5512(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TextureStorage2DEXT), .-GL_PREFIX(TextureStorage2DEXT) - - .p2align 4,,15 - .globl GL_PREFIX(TextureStorage3DEXT) - .type GL_PREFIX(TextureStorage3DEXT), @function -GL_PREFIX(TextureStorage3DEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5520(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5520(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5520(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5520(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TextureStorage3DEXT), .-GL_PREFIX(TextureStorage3DEXT) - - .p2align 4,,15 - .globl GL_PREFIX(PolygonOffsetEXT) - .type GL_PREFIX(PolygonOffsetEXT), @function -GL_PREFIX(PolygonOffsetEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5528(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 5528(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5528(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 5528(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PolygonOffsetEXT), .-GL_PREFIX(PolygonOffsetEXT) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_692) - .type GL_PREFIX(_dispatch_stub_692), @function - HIDDEN(GL_PREFIX(_dispatch_stub_692)) -GL_PREFIX(_dispatch_stub_692): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5536(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5536(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5536(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5536(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_692), .-GL_PREFIX(_dispatch_stub_692) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_693) - .type GL_PREFIX(_dispatch_stub_693), @function - HIDDEN(GL_PREFIX(_dispatch_stub_693)) -GL_PREFIX(_dispatch_stub_693): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5544(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5544(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5544(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5544(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_693), .-GL_PREFIX(_dispatch_stub_693) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_694) - .type GL_PREFIX(_dispatch_stub_694), @function - HIDDEN(GL_PREFIX(_dispatch_stub_694)) -GL_PREFIX(_dispatch_stub_694): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5552(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 5552(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5552(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 5552(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_694), .-GL_PREFIX(_dispatch_stub_694) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_695) - .type GL_PREFIX(_dispatch_stub_695), @function - HIDDEN(GL_PREFIX(_dispatch_stub_695)) -GL_PREFIX(_dispatch_stub_695): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5560(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5560(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5560(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5560(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_695), .-GL_PREFIX(_dispatch_stub_695) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_696) - .type GL_PREFIX(_dispatch_stub_696), @function - HIDDEN(GL_PREFIX(_dispatch_stub_696)) -GL_PREFIX(_dispatch_stub_696): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5568(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5568(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5568(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5568(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_696), .-GL_PREFIX(_dispatch_stub_696) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_697) - .type GL_PREFIX(_dispatch_stub_697), @function - HIDDEN(GL_PREFIX(_dispatch_stub_697)) -GL_PREFIX(_dispatch_stub_697): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5576(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5576(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5576(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5576(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_697), .-GL_PREFIX(_dispatch_stub_697) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_698) - .type GL_PREFIX(_dispatch_stub_698), @function - HIDDEN(GL_PREFIX(_dispatch_stub_698)) -GL_PREFIX(_dispatch_stub_698): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5584(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5584(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5584(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5584(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_698), .-GL_PREFIX(_dispatch_stub_698) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_699) - .type GL_PREFIX(_dispatch_stub_699), @function - HIDDEN(GL_PREFIX(_dispatch_stub_699)) -GL_PREFIX(_dispatch_stub_699): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5592(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 5592(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5592(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 5592(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_699), .-GL_PREFIX(_dispatch_stub_699) - - .p2align 4,,15 - .globl GL_PREFIX(ColorPointerEXT) - .type GL_PREFIX(ColorPointerEXT), @function -GL_PREFIX(ColorPointerEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5600(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5600(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5600(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5600(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ColorPointerEXT), .-GL_PREFIX(ColorPointerEXT) - - .p2align 4,,15 - .globl GL_PREFIX(EdgeFlagPointerEXT) - .type GL_PREFIX(EdgeFlagPointerEXT), @function -GL_PREFIX(EdgeFlagPointerEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5608(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 5608(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5608(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 5608(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EdgeFlagPointerEXT), .-GL_PREFIX(EdgeFlagPointerEXT) - - .p2align 4,,15 - .globl GL_PREFIX(IndexPointerEXT) - .type GL_PREFIX(IndexPointerEXT), @function -GL_PREFIX(IndexPointerEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5616(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5616(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5616(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5616(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(IndexPointerEXT), .-GL_PREFIX(IndexPointerEXT) - - .p2align 4,,15 - .globl GL_PREFIX(NormalPointerEXT) - .type GL_PREFIX(NormalPointerEXT), @function -GL_PREFIX(NormalPointerEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5624(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5624(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5624(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5624(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(NormalPointerEXT), .-GL_PREFIX(NormalPointerEXT) - - .p2align 4,,15 - .globl GL_PREFIX(TexCoordPointerEXT) - .type GL_PREFIX(TexCoordPointerEXT), @function -GL_PREFIX(TexCoordPointerEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5632(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5632(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5632(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5632(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexCoordPointerEXT), .-GL_PREFIX(TexCoordPointerEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexPointerEXT) - .type GL_PREFIX(VertexPointerEXT), @function -GL_PREFIX(VertexPointerEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5640(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5640(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5640(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5640(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexPointerEXT), .-GL_PREFIX(VertexPointerEXT) - - .p2align 4,,15 - .globl GL_PREFIX(PointParameterfEXT) - .type GL_PREFIX(PointParameterfEXT), @function -GL_PREFIX(PointParameterfEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5648(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 5648(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5648(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 5648(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PointParameterfEXT), .-GL_PREFIX(PointParameterfEXT) - - .p2align 4,,15 - .globl GL_PREFIX(PointParameterfvEXT) - .type GL_PREFIX(PointParameterfvEXT), @function -GL_PREFIX(PointParameterfvEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5656(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5656(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5656(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5656(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PointParameterfvEXT), .-GL_PREFIX(PointParameterfvEXT) - - .p2align 4,,15 - .globl GL_PREFIX(LockArraysEXT) - .type GL_PREFIX(LockArraysEXT), @function -GL_PREFIX(LockArraysEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5664(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5664(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5664(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5664(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(LockArraysEXT), .-GL_PREFIX(LockArraysEXT) - - .p2align 4,,15 - .globl GL_PREFIX(UnlockArraysEXT) - .type GL_PREFIX(UnlockArraysEXT), @function -GL_PREFIX(UnlockArraysEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5672(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 5672(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5672(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 5672(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(UnlockArraysEXT), .-GL_PREFIX(UnlockArraysEXT) - - .p2align 4,,15 - .globl GL_PREFIX(SecondaryColor3bEXT) - .type GL_PREFIX(SecondaryColor3bEXT), @function -GL_PREFIX(SecondaryColor3bEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5680(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 5680(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5680(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 5680(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SecondaryColor3bEXT), .-GL_PREFIX(SecondaryColor3bEXT) - - .p2align 4,,15 - .globl GL_PREFIX(SecondaryColor3bvEXT) - .type GL_PREFIX(SecondaryColor3bvEXT), @function -GL_PREFIX(SecondaryColor3bvEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5688(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 5688(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5688(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 5688(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SecondaryColor3bvEXT), .-GL_PREFIX(SecondaryColor3bvEXT) - - .p2align 4,,15 - .globl GL_PREFIX(SecondaryColor3dEXT) - .type GL_PREFIX(SecondaryColor3dEXT), @function -GL_PREFIX(SecondaryColor3dEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5696(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 5696(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5696(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 5696(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SecondaryColor3dEXT), .-GL_PREFIX(SecondaryColor3dEXT) - - .p2align 4,,15 - .globl GL_PREFIX(SecondaryColor3dvEXT) - .type GL_PREFIX(SecondaryColor3dvEXT), @function -GL_PREFIX(SecondaryColor3dvEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5704(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 5704(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5704(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 5704(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SecondaryColor3dvEXT), .-GL_PREFIX(SecondaryColor3dvEXT) - - .p2align 4,,15 - .globl GL_PREFIX(SecondaryColor3fEXT) - .type GL_PREFIX(SecondaryColor3fEXT), @function -GL_PREFIX(SecondaryColor3fEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5712(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 5712(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5712(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 5712(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SecondaryColor3fEXT), .-GL_PREFIX(SecondaryColor3fEXT) - - .p2align 4,,15 - .globl GL_PREFIX(SecondaryColor3fvEXT) - .type GL_PREFIX(SecondaryColor3fvEXT), @function -GL_PREFIX(SecondaryColor3fvEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5720(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 5720(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5720(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 5720(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SecondaryColor3fvEXT), .-GL_PREFIX(SecondaryColor3fvEXT) - - .p2align 4,,15 - .globl GL_PREFIX(SecondaryColor3iEXT) - .type GL_PREFIX(SecondaryColor3iEXT), @function -GL_PREFIX(SecondaryColor3iEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5728(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 5728(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5728(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 5728(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SecondaryColor3iEXT), .-GL_PREFIX(SecondaryColor3iEXT) - - .p2align 4,,15 - .globl GL_PREFIX(SecondaryColor3ivEXT) - .type GL_PREFIX(SecondaryColor3ivEXT), @function -GL_PREFIX(SecondaryColor3ivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5736(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 5736(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5736(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 5736(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SecondaryColor3ivEXT), .-GL_PREFIX(SecondaryColor3ivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(SecondaryColor3sEXT) - .type GL_PREFIX(SecondaryColor3sEXT), @function -GL_PREFIX(SecondaryColor3sEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5744(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 5744(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5744(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 5744(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SecondaryColor3sEXT), .-GL_PREFIX(SecondaryColor3sEXT) - - .p2align 4,,15 - .globl GL_PREFIX(SecondaryColor3svEXT) - .type GL_PREFIX(SecondaryColor3svEXT), @function -GL_PREFIX(SecondaryColor3svEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5752(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 5752(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5752(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 5752(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SecondaryColor3svEXT), .-GL_PREFIX(SecondaryColor3svEXT) - - .p2align 4,,15 - .globl GL_PREFIX(SecondaryColor3ubEXT) - .type GL_PREFIX(SecondaryColor3ubEXT), @function -GL_PREFIX(SecondaryColor3ubEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5760(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 5760(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5760(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 5760(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SecondaryColor3ubEXT), .-GL_PREFIX(SecondaryColor3ubEXT) - - .p2align 4,,15 - .globl GL_PREFIX(SecondaryColor3ubvEXT) - .type GL_PREFIX(SecondaryColor3ubvEXT), @function -GL_PREFIX(SecondaryColor3ubvEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5768(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 5768(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5768(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 5768(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SecondaryColor3ubvEXT), .-GL_PREFIX(SecondaryColor3ubvEXT) - - .p2align 4,,15 - .globl GL_PREFIX(SecondaryColor3uiEXT) - .type GL_PREFIX(SecondaryColor3uiEXT), @function -GL_PREFIX(SecondaryColor3uiEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5776(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 5776(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5776(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 5776(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SecondaryColor3uiEXT), .-GL_PREFIX(SecondaryColor3uiEXT) - - .p2align 4,,15 - .globl GL_PREFIX(SecondaryColor3uivEXT) - .type GL_PREFIX(SecondaryColor3uivEXT), @function -GL_PREFIX(SecondaryColor3uivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5784(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 5784(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5784(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 5784(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SecondaryColor3uivEXT), .-GL_PREFIX(SecondaryColor3uivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(SecondaryColor3usEXT) - .type GL_PREFIX(SecondaryColor3usEXT), @function -GL_PREFIX(SecondaryColor3usEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5792(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 5792(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5792(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 5792(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SecondaryColor3usEXT), .-GL_PREFIX(SecondaryColor3usEXT) - - .p2align 4,,15 - .globl GL_PREFIX(SecondaryColor3usvEXT) - .type GL_PREFIX(SecondaryColor3usvEXT), @function -GL_PREFIX(SecondaryColor3usvEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5800(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 5800(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5800(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 5800(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SecondaryColor3usvEXT), .-GL_PREFIX(SecondaryColor3usvEXT) - - .p2align 4,,15 - .globl GL_PREFIX(SecondaryColorPointerEXT) - .type GL_PREFIX(SecondaryColorPointerEXT), @function -GL_PREFIX(SecondaryColorPointerEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5808(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5808(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5808(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5808(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SecondaryColorPointerEXT), .-GL_PREFIX(SecondaryColorPointerEXT) - - .p2align 4,,15 - .globl GL_PREFIX(MultiDrawArraysEXT) - .type GL_PREFIX(MultiDrawArraysEXT), @function -GL_PREFIX(MultiDrawArraysEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5816(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5816(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5816(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5816(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiDrawArraysEXT), .-GL_PREFIX(MultiDrawArraysEXT) - - .p2align 4,,15 - .globl GL_PREFIX(MultiDrawElementsEXT) - .type GL_PREFIX(MultiDrawElementsEXT), @function -GL_PREFIX(MultiDrawElementsEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5824(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5824(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5824(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5824(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(MultiDrawElementsEXT), .-GL_PREFIX(MultiDrawElementsEXT) - - .p2align 4,,15 - .globl GL_PREFIX(FogCoordPointerEXT) - .type GL_PREFIX(FogCoordPointerEXT), @function -GL_PREFIX(FogCoordPointerEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5832(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 5832(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5832(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 5832(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(FogCoordPointerEXT), .-GL_PREFIX(FogCoordPointerEXT) - - .p2align 4,,15 - .globl GL_PREFIX(FogCoorddEXT) - .type GL_PREFIX(FogCoorddEXT), @function -GL_PREFIX(FogCoorddEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5840(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $8, %rsp - movq %xmm0, (%rsp) - call _x86_64_get_dispatch@PLT - movq (%rsp), %xmm0 - addq $8, %rsp - movq 5840(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5840(%rax), %r11 - jmp *%r11 -1: - subq $8, %rsp - movq %xmm0, (%rsp) - call _glapi_get_dispatch - movq (%rsp), %xmm0 - addq $8, %rsp - movq 5840(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(FogCoorddEXT), .-GL_PREFIX(FogCoorddEXT) - - .p2align 4,,15 - .globl GL_PREFIX(FogCoorddvEXT) - .type GL_PREFIX(FogCoorddvEXT), @function -GL_PREFIX(FogCoorddvEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5848(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 5848(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5848(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 5848(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(FogCoorddvEXT), .-GL_PREFIX(FogCoorddvEXT) - - .p2align 4,,15 - .globl GL_PREFIX(FogCoordfEXT) - .type GL_PREFIX(FogCoordfEXT), @function -GL_PREFIX(FogCoordfEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5856(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $8, %rsp - movq %xmm0, (%rsp) - call _x86_64_get_dispatch@PLT - movq (%rsp), %xmm0 - addq $8, %rsp - movq 5856(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5856(%rax), %r11 - jmp *%r11 -1: - subq $8, %rsp - movq %xmm0, (%rsp) - call _glapi_get_dispatch - movq (%rsp), %xmm0 - addq $8, %rsp - movq 5856(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(FogCoordfEXT), .-GL_PREFIX(FogCoordfEXT) - - .p2align 4,,15 - .globl GL_PREFIX(FogCoordfvEXT) - .type GL_PREFIX(FogCoordfvEXT), @function -GL_PREFIX(FogCoordfvEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5864(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 5864(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5864(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 5864(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(FogCoordfvEXT), .-GL_PREFIX(FogCoordfvEXT) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_734) - .type GL_PREFIX(_dispatch_stub_734), @function - HIDDEN(GL_PREFIX(_dispatch_stub_734)) -GL_PREFIX(_dispatch_stub_734): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5872(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 5872(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5872(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 5872(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_734), .-GL_PREFIX(_dispatch_stub_734) - - .p2align 4,,15 - .globl GL_PREFIX(BlendFuncSeparateEXT) - .type GL_PREFIX(BlendFuncSeparateEXT), @function -GL_PREFIX(BlendFuncSeparateEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5880(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5880(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5880(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5880(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BlendFuncSeparateEXT), .-GL_PREFIX(BlendFuncSeparateEXT) - - .p2align 4,,15 - .globl GL_PREFIX(FlushVertexArrayRangeNV) - .type GL_PREFIX(FlushVertexArrayRangeNV), @function -GL_PREFIX(FlushVertexArrayRangeNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5888(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 5888(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5888(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 5888(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(FlushVertexArrayRangeNV), .-GL_PREFIX(FlushVertexArrayRangeNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexArrayRangeNV) - .type GL_PREFIX(VertexArrayRangeNV), @function -GL_PREFIX(VertexArrayRangeNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5896(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5896(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5896(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5896(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexArrayRangeNV), .-GL_PREFIX(VertexArrayRangeNV) - - .p2align 4,,15 - .globl GL_PREFIX(CombinerInputNV) - .type GL_PREFIX(CombinerInputNV), @function -GL_PREFIX(CombinerInputNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5904(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5904(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5904(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5904(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CombinerInputNV), .-GL_PREFIX(CombinerInputNV) - - .p2align 4,,15 - .globl GL_PREFIX(CombinerOutputNV) - .type GL_PREFIX(CombinerOutputNV), @function -GL_PREFIX(CombinerOutputNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5912(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5912(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5912(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5912(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CombinerOutputNV), .-GL_PREFIX(CombinerOutputNV) - - .p2align 4,,15 - .globl GL_PREFIX(CombinerParameterfNV) - .type GL_PREFIX(CombinerParameterfNV), @function -GL_PREFIX(CombinerParameterfNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5920(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 5920(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5920(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 5920(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CombinerParameterfNV), .-GL_PREFIX(CombinerParameterfNV) - - .p2align 4,,15 - .globl GL_PREFIX(CombinerParameterfvNV) - .type GL_PREFIX(CombinerParameterfvNV), @function -GL_PREFIX(CombinerParameterfvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5928(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5928(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5928(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5928(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CombinerParameterfvNV), .-GL_PREFIX(CombinerParameterfvNV) - - .p2align 4,,15 - .globl GL_PREFIX(CombinerParameteriNV) - .type GL_PREFIX(CombinerParameteriNV), @function -GL_PREFIX(CombinerParameteriNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5936(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5936(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5936(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5936(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CombinerParameteriNV), .-GL_PREFIX(CombinerParameteriNV) - - .p2align 4,,15 - .globl GL_PREFIX(CombinerParameterivNV) - .type GL_PREFIX(CombinerParameterivNV), @function -GL_PREFIX(CombinerParameterivNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5944(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 5944(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5944(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 5944(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CombinerParameterivNV), .-GL_PREFIX(CombinerParameterivNV) - - .p2align 4,,15 - .globl GL_PREFIX(FinalCombinerInputNV) - .type GL_PREFIX(FinalCombinerInputNV), @function -GL_PREFIX(FinalCombinerInputNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5952(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5952(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5952(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5952(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(FinalCombinerInputNV), .-GL_PREFIX(FinalCombinerInputNV) - - .p2align 4,,15 - .globl GL_PREFIX(GetCombinerInputParameterfvNV) - .type GL_PREFIX(GetCombinerInputParameterfvNV), @function -GL_PREFIX(GetCombinerInputParameterfvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5960(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5960(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5960(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5960(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetCombinerInputParameterfvNV), .-GL_PREFIX(GetCombinerInputParameterfvNV) - - .p2align 4,,15 - .globl GL_PREFIX(GetCombinerInputParameterivNV) - .type GL_PREFIX(GetCombinerInputParameterivNV), @function -GL_PREFIX(GetCombinerInputParameterivNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5968(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5968(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5968(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5968(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetCombinerInputParameterivNV), .-GL_PREFIX(GetCombinerInputParameterivNV) - - .p2align 4,,15 - .globl GL_PREFIX(GetCombinerOutputParameterfvNV) - .type GL_PREFIX(GetCombinerOutputParameterfvNV), @function -GL_PREFIX(GetCombinerOutputParameterfvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5976(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5976(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5976(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5976(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetCombinerOutputParameterfvNV), .-GL_PREFIX(GetCombinerOutputParameterfvNV) - - .p2align 4,,15 - .globl GL_PREFIX(GetCombinerOutputParameterivNV) - .type GL_PREFIX(GetCombinerOutputParameterivNV), @function -GL_PREFIX(GetCombinerOutputParameterivNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5984(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5984(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5984(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 5984(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetCombinerOutputParameterivNV), .-GL_PREFIX(GetCombinerOutputParameterivNV) - - .p2align 4,,15 - .globl GL_PREFIX(GetFinalCombinerInputParameterfvNV) - .type GL_PREFIX(GetFinalCombinerInputParameterfvNV), @function -GL_PREFIX(GetFinalCombinerInputParameterfvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 5992(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 5992(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 5992(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 5992(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetFinalCombinerInputParameterfvNV), .-GL_PREFIX(GetFinalCombinerInputParameterfvNV) - - .p2align 4,,15 - .globl GL_PREFIX(GetFinalCombinerInputParameterivNV) - .type GL_PREFIX(GetFinalCombinerInputParameterivNV), @function -GL_PREFIX(GetFinalCombinerInputParameterivNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6000(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6000(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6000(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6000(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetFinalCombinerInputParameterivNV), .-GL_PREFIX(GetFinalCombinerInputParameterivNV) - - .p2align 4,,15 - .globl GL_PREFIX(ResizeBuffersMESA) - .type GL_PREFIX(ResizeBuffersMESA), @function -GL_PREFIX(ResizeBuffersMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6008(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 6008(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6008(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 6008(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ResizeBuffersMESA), .-GL_PREFIX(ResizeBuffersMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos2dMESA) - .type GL_PREFIX(WindowPos2dMESA), @function -GL_PREFIX(WindowPos2dMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6016(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 6016(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6016(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 6016(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos2dMESA), .-GL_PREFIX(WindowPos2dMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos2dvMESA) - .type GL_PREFIX(WindowPos2dvMESA), @function -GL_PREFIX(WindowPos2dvMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6024(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6024(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6024(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6024(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos2dvMESA), .-GL_PREFIX(WindowPos2dvMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos2fMESA) - .type GL_PREFIX(WindowPos2fMESA), @function -GL_PREFIX(WindowPos2fMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6032(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 6032(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6032(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 6032(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos2fMESA), .-GL_PREFIX(WindowPos2fMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos2fvMESA) - .type GL_PREFIX(WindowPos2fvMESA), @function -GL_PREFIX(WindowPos2fvMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6040(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6040(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6040(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6040(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos2fvMESA), .-GL_PREFIX(WindowPos2fvMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos2iMESA) - .type GL_PREFIX(WindowPos2iMESA), @function -GL_PREFIX(WindowPos2iMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6048(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6048(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6048(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6048(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos2iMESA), .-GL_PREFIX(WindowPos2iMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos2ivMESA) - .type GL_PREFIX(WindowPos2ivMESA), @function -GL_PREFIX(WindowPos2ivMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6056(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6056(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6056(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6056(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos2ivMESA), .-GL_PREFIX(WindowPos2ivMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos2sMESA) - .type GL_PREFIX(WindowPos2sMESA), @function -GL_PREFIX(WindowPos2sMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6064(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6064(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6064(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6064(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos2sMESA), .-GL_PREFIX(WindowPos2sMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos2svMESA) - .type GL_PREFIX(WindowPos2svMESA), @function -GL_PREFIX(WindowPos2svMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6072(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6072(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6072(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6072(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos2svMESA), .-GL_PREFIX(WindowPos2svMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos3dMESA) - .type GL_PREFIX(WindowPos3dMESA), @function -GL_PREFIX(WindowPos3dMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6080(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 6080(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6080(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 6080(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos3dMESA), .-GL_PREFIX(WindowPos3dMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos3dvMESA) - .type GL_PREFIX(WindowPos3dvMESA), @function -GL_PREFIX(WindowPos3dvMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6088(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6088(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6088(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6088(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos3dvMESA), .-GL_PREFIX(WindowPos3dvMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos3fMESA) - .type GL_PREFIX(WindowPos3fMESA), @function -GL_PREFIX(WindowPos3fMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6096(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 6096(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6096(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $24, %rsp - movq 6096(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos3fMESA), .-GL_PREFIX(WindowPos3fMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos3fvMESA) - .type GL_PREFIX(WindowPos3fvMESA), @function -GL_PREFIX(WindowPos3fvMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6104(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6104(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6104(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6104(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos3fvMESA), .-GL_PREFIX(WindowPos3fvMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos3iMESA) - .type GL_PREFIX(WindowPos3iMESA), @function -GL_PREFIX(WindowPos3iMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6112(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6112(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6112(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6112(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos3iMESA), .-GL_PREFIX(WindowPos3iMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos3ivMESA) - .type GL_PREFIX(WindowPos3ivMESA), @function -GL_PREFIX(WindowPos3ivMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6120(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6120(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6120(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6120(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos3ivMESA), .-GL_PREFIX(WindowPos3ivMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos3sMESA) - .type GL_PREFIX(WindowPos3sMESA), @function -GL_PREFIX(WindowPos3sMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6128(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6128(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6128(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6128(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos3sMESA), .-GL_PREFIX(WindowPos3sMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos3svMESA) - .type GL_PREFIX(WindowPos3svMESA), @function -GL_PREFIX(WindowPos3svMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6136(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6136(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6136(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6136(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos3svMESA), .-GL_PREFIX(WindowPos3svMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos4dMESA) - .type GL_PREFIX(WindowPos4dMESA), @function -GL_PREFIX(WindowPos4dMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6144(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 6144(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6144(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 6144(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos4dMESA), .-GL_PREFIX(WindowPos4dMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos4dvMESA) - .type GL_PREFIX(WindowPos4dvMESA), @function -GL_PREFIX(WindowPos4dvMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6152(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6152(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6152(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6152(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos4dvMESA), .-GL_PREFIX(WindowPos4dvMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos4fMESA) - .type GL_PREFIX(WindowPos4fMESA), @function -GL_PREFIX(WindowPos4fMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6160(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 6160(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6160(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %xmm0, (%rsp) - movq %xmm1, 8(%rsp) - movq %xmm2, 16(%rsp) - movq %xmm3, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm3 - movq 16(%rsp), %xmm2 - movq 8(%rsp), %xmm1 - movq (%rsp), %xmm0 - addq $40, %rsp - movq 6160(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos4fMESA), .-GL_PREFIX(WindowPos4fMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos4fvMESA) - .type GL_PREFIX(WindowPos4fvMESA), @function -GL_PREFIX(WindowPos4fvMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6168(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6168(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6168(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6168(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos4fvMESA), .-GL_PREFIX(WindowPos4fvMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos4iMESA) - .type GL_PREFIX(WindowPos4iMESA), @function -GL_PREFIX(WindowPos4iMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6176(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6176(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6176(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6176(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos4iMESA), .-GL_PREFIX(WindowPos4iMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos4ivMESA) - .type GL_PREFIX(WindowPos4ivMESA), @function -GL_PREFIX(WindowPos4ivMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6184(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6184(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6184(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6184(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos4ivMESA), .-GL_PREFIX(WindowPos4ivMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos4sMESA) - .type GL_PREFIX(WindowPos4sMESA), @function -GL_PREFIX(WindowPos4sMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6192(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6192(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6192(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6192(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos4sMESA), .-GL_PREFIX(WindowPos4sMESA) - - .p2align 4,,15 - .globl GL_PREFIX(WindowPos4svMESA) - .type GL_PREFIX(WindowPos4svMESA), @function -GL_PREFIX(WindowPos4svMESA): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6200(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6200(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6200(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6200(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(WindowPos4svMESA), .-GL_PREFIX(WindowPos4svMESA) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_776) - .type GL_PREFIX(_dispatch_stub_776), @function - HIDDEN(GL_PREFIX(_dispatch_stub_776)) -GL_PREFIX(_dispatch_stub_776): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6208(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6208(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6208(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6208(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_776), .-GL_PREFIX(_dispatch_stub_776) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_777) - .type GL_PREFIX(_dispatch_stub_777), @function - HIDDEN(GL_PREFIX(_dispatch_stub_777)) -GL_PREFIX(_dispatch_stub_777): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6216(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6216(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6216(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6216(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_777), .-GL_PREFIX(_dispatch_stub_777) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_778) - .type GL_PREFIX(_dispatch_stub_778), @function - HIDDEN(GL_PREFIX(_dispatch_stub_778)) -GL_PREFIX(_dispatch_stub_778): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6224(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6224(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6224(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6224(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_778), .-GL_PREFIX(_dispatch_stub_778) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_779) - .type GL_PREFIX(_dispatch_stub_779), @function - HIDDEN(GL_PREFIX(_dispatch_stub_779)) -GL_PREFIX(_dispatch_stub_779): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6232(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6232(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6232(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6232(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_779), .-GL_PREFIX(_dispatch_stub_779) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_780) - .type GL_PREFIX(_dispatch_stub_780), @function - HIDDEN(GL_PREFIX(_dispatch_stub_780)) -GL_PREFIX(_dispatch_stub_780): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6240(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6240(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6240(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6240(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_780), .-GL_PREFIX(_dispatch_stub_780) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_781) - .type GL_PREFIX(_dispatch_stub_781), @function - HIDDEN(GL_PREFIX(_dispatch_stub_781)) -GL_PREFIX(_dispatch_stub_781): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6248(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6248(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6248(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6248(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_781), .-GL_PREFIX(_dispatch_stub_781) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_782) - .type GL_PREFIX(_dispatch_stub_782), @function - HIDDEN(GL_PREFIX(_dispatch_stub_782)) -GL_PREFIX(_dispatch_stub_782): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6256(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6256(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6256(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6256(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_782), .-GL_PREFIX(_dispatch_stub_782) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_783) - .type GL_PREFIX(_dispatch_stub_783), @function - HIDDEN(GL_PREFIX(_dispatch_stub_783)) -GL_PREFIX(_dispatch_stub_783): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6264(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6264(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6264(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6264(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_783), .-GL_PREFIX(_dispatch_stub_783) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_784) - .type GL_PREFIX(_dispatch_stub_784), @function - HIDDEN(GL_PREFIX(_dispatch_stub_784)) -GL_PREFIX(_dispatch_stub_784): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6272(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6272(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6272(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6272(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_784), .-GL_PREFIX(_dispatch_stub_784) - - .p2align 4,,15 - .globl GL_PREFIX(AreProgramsResidentNV) - .type GL_PREFIX(AreProgramsResidentNV), @function -GL_PREFIX(AreProgramsResidentNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6280(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6280(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6280(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6280(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(AreProgramsResidentNV), .-GL_PREFIX(AreProgramsResidentNV) - - .p2align 4,,15 - .globl GL_PREFIX(BindProgramNV) - .type GL_PREFIX(BindProgramNV), @function -GL_PREFIX(BindProgramNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6288(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6288(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6288(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6288(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BindProgramNV), .-GL_PREFIX(BindProgramNV) - - .p2align 4,,15 - .globl GL_PREFIX(DeleteProgramsNV) - .type GL_PREFIX(DeleteProgramsNV), @function -GL_PREFIX(DeleteProgramsNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6296(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6296(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6296(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6296(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DeleteProgramsNV), .-GL_PREFIX(DeleteProgramsNV) - - .p2align 4,,15 - .globl GL_PREFIX(ExecuteProgramNV) - .type GL_PREFIX(ExecuteProgramNV), @function -GL_PREFIX(ExecuteProgramNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6304(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6304(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6304(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6304(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ExecuteProgramNV), .-GL_PREFIX(ExecuteProgramNV) - - .p2align 4,,15 - .globl GL_PREFIX(GenProgramsNV) - .type GL_PREFIX(GenProgramsNV), @function -GL_PREFIX(GenProgramsNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6312(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6312(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6312(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6312(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GenProgramsNV), .-GL_PREFIX(GenProgramsNV) - - .p2align 4,,15 - .globl GL_PREFIX(GetProgramParameterdvNV) - .type GL_PREFIX(GetProgramParameterdvNV), @function -GL_PREFIX(GetProgramParameterdvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6320(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6320(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6320(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6320(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetProgramParameterdvNV), .-GL_PREFIX(GetProgramParameterdvNV) - - .p2align 4,,15 - .globl GL_PREFIX(GetProgramParameterfvNV) - .type GL_PREFIX(GetProgramParameterfvNV), @function -GL_PREFIX(GetProgramParameterfvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6328(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6328(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6328(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6328(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetProgramParameterfvNV), .-GL_PREFIX(GetProgramParameterfvNV) - - .p2align 4,,15 - .globl GL_PREFIX(GetProgramStringNV) - .type GL_PREFIX(GetProgramStringNV), @function -GL_PREFIX(GetProgramStringNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6336(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6336(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6336(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6336(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetProgramStringNV), .-GL_PREFIX(GetProgramStringNV) - - .p2align 4,,15 - .globl GL_PREFIX(GetProgramivNV) - .type GL_PREFIX(GetProgramivNV), @function -GL_PREFIX(GetProgramivNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6344(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6344(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6344(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6344(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetProgramivNV), .-GL_PREFIX(GetProgramivNV) - - .p2align 4,,15 - .globl GL_PREFIX(GetTrackMatrixivNV) - .type GL_PREFIX(GetTrackMatrixivNV), @function -GL_PREFIX(GetTrackMatrixivNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6352(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6352(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6352(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6352(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetTrackMatrixivNV), .-GL_PREFIX(GetTrackMatrixivNV) - - .p2align 4,,15 - .globl GL_PREFIX(GetVertexAttribPointervNV) - .type GL_PREFIX(GetVertexAttribPointervNV), @function -GL_PREFIX(GetVertexAttribPointervNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6360(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6360(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6360(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6360(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetVertexAttribPointervNV), .-GL_PREFIX(GetVertexAttribPointervNV) - - .p2align 4,,15 - .globl GL_PREFIX(GetVertexAttribdvNV) - .type GL_PREFIX(GetVertexAttribdvNV), @function -GL_PREFIX(GetVertexAttribdvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6368(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6368(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6368(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6368(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetVertexAttribdvNV), .-GL_PREFIX(GetVertexAttribdvNV) - - .p2align 4,,15 - .globl GL_PREFIX(GetVertexAttribfvNV) - .type GL_PREFIX(GetVertexAttribfvNV), @function -GL_PREFIX(GetVertexAttribfvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6376(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6376(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6376(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6376(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetVertexAttribfvNV), .-GL_PREFIX(GetVertexAttribfvNV) - - .p2align 4,,15 - .globl GL_PREFIX(GetVertexAttribivNV) - .type GL_PREFIX(GetVertexAttribivNV), @function -GL_PREFIX(GetVertexAttribivNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6384(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6384(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6384(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6384(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetVertexAttribivNV), .-GL_PREFIX(GetVertexAttribivNV) - - .p2align 4,,15 - .globl GL_PREFIX(IsProgramNV) - .type GL_PREFIX(IsProgramNV), @function -GL_PREFIX(IsProgramNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6392(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6392(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6392(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6392(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(IsProgramNV), .-GL_PREFIX(IsProgramNV) - - .p2align 4,,15 - .globl GL_PREFIX(LoadProgramNV) - .type GL_PREFIX(LoadProgramNV), @function -GL_PREFIX(LoadProgramNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6400(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6400(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6400(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6400(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(LoadProgramNV), .-GL_PREFIX(LoadProgramNV) - - .p2align 4,,15 - .globl GL_PREFIX(ProgramParameters4dvNV) - .type GL_PREFIX(ProgramParameters4dvNV), @function -GL_PREFIX(ProgramParameters4dvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6408(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6408(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6408(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6408(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ProgramParameters4dvNV), .-GL_PREFIX(ProgramParameters4dvNV) - - .p2align 4,,15 - .globl GL_PREFIX(ProgramParameters4fvNV) - .type GL_PREFIX(ProgramParameters4fvNV), @function -GL_PREFIX(ProgramParameters4fvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6416(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6416(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6416(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6416(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ProgramParameters4fvNV), .-GL_PREFIX(ProgramParameters4fvNV) - - .p2align 4,,15 - .globl GL_PREFIX(RequestResidentProgramsNV) - .type GL_PREFIX(RequestResidentProgramsNV), @function -GL_PREFIX(RequestResidentProgramsNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6424(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6424(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6424(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6424(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RequestResidentProgramsNV), .-GL_PREFIX(RequestResidentProgramsNV) - - .p2align 4,,15 - .globl GL_PREFIX(TrackMatrixNV) - .type GL_PREFIX(TrackMatrixNV), @function -GL_PREFIX(TrackMatrixNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6432(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6432(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6432(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6432(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TrackMatrixNV), .-GL_PREFIX(TrackMatrixNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib1dNV) - .type GL_PREFIX(VertexAttrib1dNV), @function -GL_PREFIX(VertexAttrib1dNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6440(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 6440(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6440(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 6440(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib1dNV), .-GL_PREFIX(VertexAttrib1dNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib1dvNV) - .type GL_PREFIX(VertexAttrib1dvNV), @function -GL_PREFIX(VertexAttrib1dvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6448(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6448(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6448(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6448(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib1dvNV), .-GL_PREFIX(VertexAttrib1dvNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib1fNV) - .type GL_PREFIX(VertexAttrib1fNV), @function -GL_PREFIX(VertexAttrib1fNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6456(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _x86_64_get_dispatch@PLT - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 6456(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6456(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - call _glapi_get_dispatch - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 6456(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib1fNV), .-GL_PREFIX(VertexAttrib1fNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib1fvNV) - .type GL_PREFIX(VertexAttrib1fvNV), @function -GL_PREFIX(VertexAttrib1fvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6464(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6464(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6464(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6464(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib1fvNV), .-GL_PREFIX(VertexAttrib1fvNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib1sNV) - .type GL_PREFIX(VertexAttrib1sNV), @function -GL_PREFIX(VertexAttrib1sNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6472(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6472(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6472(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6472(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib1sNV), .-GL_PREFIX(VertexAttrib1sNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib1svNV) - .type GL_PREFIX(VertexAttrib1svNV), @function -GL_PREFIX(VertexAttrib1svNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6480(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6480(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6480(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6480(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib1svNV), .-GL_PREFIX(VertexAttrib1svNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib2dNV) - .type GL_PREFIX(VertexAttrib2dNV), @function -GL_PREFIX(VertexAttrib2dNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6488(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 6488(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6488(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 6488(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib2dNV), .-GL_PREFIX(VertexAttrib2dNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib2dvNV) - .type GL_PREFIX(VertexAttrib2dvNV), @function -GL_PREFIX(VertexAttrib2dvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6496(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6496(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6496(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6496(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib2dvNV), .-GL_PREFIX(VertexAttrib2dvNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib2fNV) - .type GL_PREFIX(VertexAttrib2fNV), @function -GL_PREFIX(VertexAttrib2fNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6504(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - call _x86_64_get_dispatch@PLT - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 6504(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6504(%rax), %r11 - jmp *%r11 -1: - subq $24, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - call _glapi_get_dispatch - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $24, %rsp - movq 6504(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib2fNV), .-GL_PREFIX(VertexAttrib2fNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib2fvNV) - .type GL_PREFIX(VertexAttrib2fvNV), @function -GL_PREFIX(VertexAttrib2fvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6512(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6512(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6512(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6512(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib2fvNV), .-GL_PREFIX(VertexAttrib2fvNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib2sNV) - .type GL_PREFIX(VertexAttrib2sNV), @function -GL_PREFIX(VertexAttrib2sNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6520(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6520(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6520(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6520(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib2sNV), .-GL_PREFIX(VertexAttrib2sNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib2svNV) - .type GL_PREFIX(VertexAttrib2svNV), @function -GL_PREFIX(VertexAttrib2svNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6528(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6528(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6528(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6528(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib2svNV), .-GL_PREFIX(VertexAttrib2svNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib3dNV) - .type GL_PREFIX(VertexAttrib3dNV), @function -GL_PREFIX(VertexAttrib3dNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6536(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 6536(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6536(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 6536(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib3dNV), .-GL_PREFIX(VertexAttrib3dNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib3dvNV) - .type GL_PREFIX(VertexAttrib3dvNV), @function -GL_PREFIX(VertexAttrib3dvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6544(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6544(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6544(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6544(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib3dvNV), .-GL_PREFIX(VertexAttrib3dvNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib3fNV) - .type GL_PREFIX(VertexAttrib3fNV), @function -GL_PREFIX(VertexAttrib3fNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6552(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - call _x86_64_get_dispatch@PLT - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 6552(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6552(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - call _glapi_get_dispatch - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 6552(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib3fNV), .-GL_PREFIX(VertexAttrib3fNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib3fvNV) - .type GL_PREFIX(VertexAttrib3fvNV), @function -GL_PREFIX(VertexAttrib3fvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6560(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6560(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6560(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6560(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib3fvNV), .-GL_PREFIX(VertexAttrib3fvNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib3sNV) - .type GL_PREFIX(VertexAttrib3sNV), @function -GL_PREFIX(VertexAttrib3sNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6568(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6568(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6568(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6568(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib3sNV), .-GL_PREFIX(VertexAttrib3sNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib3svNV) - .type GL_PREFIX(VertexAttrib3svNV), @function -GL_PREFIX(VertexAttrib3svNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6576(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6576(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6576(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6576(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib3svNV), .-GL_PREFIX(VertexAttrib3svNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4dNV) - .type GL_PREFIX(VertexAttrib4dNV), @function -GL_PREFIX(VertexAttrib4dNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6584(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - movq %xmm3, 32(%rsp) - call _x86_64_get_dispatch@PLT - movq 32(%rsp), %xmm3 - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 6584(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6584(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - movq %xmm3, 32(%rsp) - call _glapi_get_dispatch - movq 32(%rsp), %xmm3 - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 6584(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4dNV), .-GL_PREFIX(VertexAttrib4dNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4dvNV) - .type GL_PREFIX(VertexAttrib4dvNV), @function -GL_PREFIX(VertexAttrib4dvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6592(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6592(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6592(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6592(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4dvNV), .-GL_PREFIX(VertexAttrib4dvNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4fNV) - .type GL_PREFIX(VertexAttrib4fNV), @function -GL_PREFIX(VertexAttrib4fNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6600(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - movq %xmm3, 32(%rsp) - call _x86_64_get_dispatch@PLT - movq 32(%rsp), %xmm3 - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 6600(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6600(%rax), %r11 - jmp *%r11 -1: - subq $40, %rsp - movq %rdi, (%rsp) - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - movq %xmm2, 24(%rsp) - movq %xmm3, 32(%rsp) - call _glapi_get_dispatch - movq 32(%rsp), %xmm3 - movq 24(%rsp), %xmm2 - movq 16(%rsp), %xmm1 - movq 8(%rsp), %xmm0 - movq (%rsp), %rdi - addq $40, %rsp - movq 6600(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4fNV), .-GL_PREFIX(VertexAttrib4fNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4fvNV) - .type GL_PREFIX(VertexAttrib4fvNV), @function -GL_PREFIX(VertexAttrib4fvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6608(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6608(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6608(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6608(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4fvNV), .-GL_PREFIX(VertexAttrib4fvNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4sNV) - .type GL_PREFIX(VertexAttrib4sNV), @function -GL_PREFIX(VertexAttrib4sNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6616(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6616(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6616(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6616(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4sNV), .-GL_PREFIX(VertexAttrib4sNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4svNV) - .type GL_PREFIX(VertexAttrib4svNV), @function -GL_PREFIX(VertexAttrib4svNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6624(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6624(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6624(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6624(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4svNV), .-GL_PREFIX(VertexAttrib4svNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4ubNV) - .type GL_PREFIX(VertexAttrib4ubNV), @function -GL_PREFIX(VertexAttrib4ubNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6632(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6632(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6632(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6632(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4ubNV), .-GL_PREFIX(VertexAttrib4ubNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttrib4ubvNV) - .type GL_PREFIX(VertexAttrib4ubvNV), @function -GL_PREFIX(VertexAttrib4ubvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6640(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6640(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6640(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6640(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttrib4ubvNV), .-GL_PREFIX(VertexAttrib4ubvNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribPointerNV) - .type GL_PREFIX(VertexAttribPointerNV), @function -GL_PREFIX(VertexAttribPointerNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6648(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6648(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6648(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6648(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribPointerNV), .-GL_PREFIX(VertexAttribPointerNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribs1dvNV) - .type GL_PREFIX(VertexAttribs1dvNV), @function -GL_PREFIX(VertexAttribs1dvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6656(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6656(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6656(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6656(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribs1dvNV), .-GL_PREFIX(VertexAttribs1dvNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribs1fvNV) - .type GL_PREFIX(VertexAttribs1fvNV), @function -GL_PREFIX(VertexAttribs1fvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6664(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6664(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6664(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6664(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribs1fvNV), .-GL_PREFIX(VertexAttribs1fvNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribs1svNV) - .type GL_PREFIX(VertexAttribs1svNV), @function -GL_PREFIX(VertexAttribs1svNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6672(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6672(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6672(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6672(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribs1svNV), .-GL_PREFIX(VertexAttribs1svNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribs2dvNV) - .type GL_PREFIX(VertexAttribs2dvNV), @function -GL_PREFIX(VertexAttribs2dvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6680(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6680(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6680(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6680(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribs2dvNV), .-GL_PREFIX(VertexAttribs2dvNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribs2fvNV) - .type GL_PREFIX(VertexAttribs2fvNV), @function -GL_PREFIX(VertexAttribs2fvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6688(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6688(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6688(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6688(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribs2fvNV), .-GL_PREFIX(VertexAttribs2fvNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribs2svNV) - .type GL_PREFIX(VertexAttribs2svNV), @function -GL_PREFIX(VertexAttribs2svNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6696(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6696(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6696(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6696(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribs2svNV), .-GL_PREFIX(VertexAttribs2svNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribs3dvNV) - .type GL_PREFIX(VertexAttribs3dvNV), @function -GL_PREFIX(VertexAttribs3dvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6704(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6704(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6704(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6704(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribs3dvNV), .-GL_PREFIX(VertexAttribs3dvNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribs3fvNV) - .type GL_PREFIX(VertexAttribs3fvNV), @function -GL_PREFIX(VertexAttribs3fvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6712(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6712(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6712(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6712(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribs3fvNV), .-GL_PREFIX(VertexAttribs3fvNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribs3svNV) - .type GL_PREFIX(VertexAttribs3svNV), @function -GL_PREFIX(VertexAttribs3svNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6720(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6720(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6720(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6720(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribs3svNV), .-GL_PREFIX(VertexAttribs3svNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribs4dvNV) - .type GL_PREFIX(VertexAttribs4dvNV), @function -GL_PREFIX(VertexAttribs4dvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6728(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6728(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6728(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6728(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribs4dvNV), .-GL_PREFIX(VertexAttribs4dvNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribs4fvNV) - .type GL_PREFIX(VertexAttribs4fvNV), @function -GL_PREFIX(VertexAttribs4fvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6736(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6736(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6736(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6736(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribs4fvNV), .-GL_PREFIX(VertexAttribs4fvNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribs4svNV) - .type GL_PREFIX(VertexAttribs4svNV), @function -GL_PREFIX(VertexAttribs4svNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6744(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6744(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6744(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6744(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribs4svNV), .-GL_PREFIX(VertexAttribs4svNV) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribs4ubvNV) - .type GL_PREFIX(VertexAttribs4ubvNV), @function -GL_PREFIX(VertexAttribs4ubvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6752(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6752(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6752(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6752(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribs4ubvNV), .-GL_PREFIX(VertexAttribs4ubvNV) - - .p2align 4,,15 - .globl GL_PREFIX(GetTexBumpParameterfvATI) - .type GL_PREFIX(GetTexBumpParameterfvATI), @function -GL_PREFIX(GetTexBumpParameterfvATI): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6760(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6760(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6760(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6760(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetTexBumpParameterfvATI), .-GL_PREFIX(GetTexBumpParameterfvATI) - - .p2align 4,,15 - .globl GL_PREFIX(GetTexBumpParameterivATI) - .type GL_PREFIX(GetTexBumpParameterivATI), @function -GL_PREFIX(GetTexBumpParameterivATI): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6768(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6768(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6768(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6768(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetTexBumpParameterivATI), .-GL_PREFIX(GetTexBumpParameterivATI) - - .p2align 4,,15 - .globl GL_PREFIX(TexBumpParameterfvATI) - .type GL_PREFIX(TexBumpParameterfvATI), @function -GL_PREFIX(TexBumpParameterfvATI): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6776(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6776(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6776(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6776(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexBumpParameterfvATI), .-GL_PREFIX(TexBumpParameterfvATI) - - .p2align 4,,15 - .globl GL_PREFIX(TexBumpParameterivATI) - .type GL_PREFIX(TexBumpParameterivATI), @function -GL_PREFIX(TexBumpParameterivATI): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6784(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6784(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6784(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6784(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexBumpParameterivATI), .-GL_PREFIX(TexBumpParameterivATI) - - .p2align 4,,15 - .globl GL_PREFIX(AlphaFragmentOp1ATI) - .type GL_PREFIX(AlphaFragmentOp1ATI), @function -GL_PREFIX(AlphaFragmentOp1ATI): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6792(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6792(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6792(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6792(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(AlphaFragmentOp1ATI), .-GL_PREFIX(AlphaFragmentOp1ATI) - - .p2align 4,,15 - .globl GL_PREFIX(AlphaFragmentOp2ATI) - .type GL_PREFIX(AlphaFragmentOp2ATI), @function -GL_PREFIX(AlphaFragmentOp2ATI): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6800(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6800(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6800(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6800(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(AlphaFragmentOp2ATI), .-GL_PREFIX(AlphaFragmentOp2ATI) - - .p2align 4,,15 - .globl GL_PREFIX(AlphaFragmentOp3ATI) - .type GL_PREFIX(AlphaFragmentOp3ATI), @function -GL_PREFIX(AlphaFragmentOp3ATI): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6808(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6808(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6808(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6808(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(AlphaFragmentOp3ATI), .-GL_PREFIX(AlphaFragmentOp3ATI) - - .p2align 4,,15 - .globl GL_PREFIX(BeginFragmentShaderATI) - .type GL_PREFIX(BeginFragmentShaderATI), @function -GL_PREFIX(BeginFragmentShaderATI): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6816(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 6816(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6816(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 6816(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BeginFragmentShaderATI), .-GL_PREFIX(BeginFragmentShaderATI) - - .p2align 4,,15 - .globl GL_PREFIX(BindFragmentShaderATI) - .type GL_PREFIX(BindFragmentShaderATI), @function -GL_PREFIX(BindFragmentShaderATI): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6824(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6824(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6824(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6824(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BindFragmentShaderATI), .-GL_PREFIX(BindFragmentShaderATI) - - .p2align 4,,15 - .globl GL_PREFIX(ColorFragmentOp1ATI) - .type GL_PREFIX(ColorFragmentOp1ATI), @function -GL_PREFIX(ColorFragmentOp1ATI): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6832(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6832(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6832(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6832(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ColorFragmentOp1ATI), .-GL_PREFIX(ColorFragmentOp1ATI) - - .p2align 4,,15 - .globl GL_PREFIX(ColorFragmentOp2ATI) - .type GL_PREFIX(ColorFragmentOp2ATI), @function -GL_PREFIX(ColorFragmentOp2ATI): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6840(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6840(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6840(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6840(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ColorFragmentOp2ATI), .-GL_PREFIX(ColorFragmentOp2ATI) - - .p2align 4,,15 - .globl GL_PREFIX(ColorFragmentOp3ATI) - .type GL_PREFIX(ColorFragmentOp3ATI), @function -GL_PREFIX(ColorFragmentOp3ATI): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6848(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6848(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6848(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6848(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ColorFragmentOp3ATI), .-GL_PREFIX(ColorFragmentOp3ATI) - - .p2align 4,,15 - .globl GL_PREFIX(DeleteFragmentShaderATI) - .type GL_PREFIX(DeleteFragmentShaderATI), @function -GL_PREFIX(DeleteFragmentShaderATI): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6856(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6856(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6856(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6856(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DeleteFragmentShaderATI), .-GL_PREFIX(DeleteFragmentShaderATI) - - .p2align 4,,15 - .globl GL_PREFIX(EndFragmentShaderATI) - .type GL_PREFIX(EndFragmentShaderATI), @function -GL_PREFIX(EndFragmentShaderATI): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6864(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 6864(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6864(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 6864(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EndFragmentShaderATI), .-GL_PREFIX(EndFragmentShaderATI) - - .p2align 4,,15 - .globl GL_PREFIX(GenFragmentShadersATI) - .type GL_PREFIX(GenFragmentShadersATI), @function -GL_PREFIX(GenFragmentShadersATI): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6872(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6872(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6872(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6872(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GenFragmentShadersATI), .-GL_PREFIX(GenFragmentShadersATI) - - .p2align 4,,15 - .globl GL_PREFIX(PassTexCoordATI) - .type GL_PREFIX(PassTexCoordATI), @function -GL_PREFIX(PassTexCoordATI): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6880(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6880(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6880(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6880(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PassTexCoordATI), .-GL_PREFIX(PassTexCoordATI) - - .p2align 4,,15 - .globl GL_PREFIX(SampleMapATI) - .type GL_PREFIX(SampleMapATI), @function -GL_PREFIX(SampleMapATI): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6888(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 6888(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6888(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 6888(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SampleMapATI), .-GL_PREFIX(SampleMapATI) - - .p2align 4,,15 - .globl GL_PREFIX(SetFragmentShaderConstantATI) - .type GL_PREFIX(SetFragmentShaderConstantATI), @function -GL_PREFIX(SetFragmentShaderConstantATI): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6896(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6896(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6896(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6896(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(SetFragmentShaderConstantATI), .-GL_PREFIX(SetFragmentShaderConstantATI) - - .p2align 4,,15 - .globl GL_PREFIX(PointParameteriNV) - .type GL_PREFIX(PointParameteriNV), @function -GL_PREFIX(PointParameteriNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6904(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6904(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6904(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6904(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PointParameteriNV), .-GL_PREFIX(PointParameteriNV) - - .p2align 4,,15 - .globl GL_PREFIX(PointParameterivNV) - .type GL_PREFIX(PointParameterivNV), @function -GL_PREFIX(PointParameterivNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6912(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6912(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6912(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6912(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PointParameterivNV), .-GL_PREFIX(PointParameterivNV) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_865) - .type GL_PREFIX(_dispatch_stub_865), @function - HIDDEN(GL_PREFIX(_dispatch_stub_865)) -GL_PREFIX(_dispatch_stub_865): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6920(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6920(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6920(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6920(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_865), .-GL_PREFIX(_dispatch_stub_865) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_866) - .type GL_PREFIX(_dispatch_stub_866), @function - HIDDEN(GL_PREFIX(_dispatch_stub_866)) -GL_PREFIX(_dispatch_stub_866): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6928(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6928(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6928(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6928(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_866), .-GL_PREFIX(_dispatch_stub_866) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_867) - .type GL_PREFIX(_dispatch_stub_867), @function - HIDDEN(GL_PREFIX(_dispatch_stub_867)) -GL_PREFIX(_dispatch_stub_867): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6936(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6936(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6936(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6936(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_867), .-GL_PREFIX(_dispatch_stub_867) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_868) - .type GL_PREFIX(_dispatch_stub_868), @function - HIDDEN(GL_PREFIX(_dispatch_stub_868)) -GL_PREFIX(_dispatch_stub_868): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6944(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 6944(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6944(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 6944(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_868), .-GL_PREFIX(_dispatch_stub_868) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_869) - .type GL_PREFIX(_dispatch_stub_869), @function - HIDDEN(GL_PREFIX(_dispatch_stub_869)) -GL_PREFIX(_dispatch_stub_869): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6952(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 6952(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6952(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 6952(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_869), .-GL_PREFIX(_dispatch_stub_869) - - .p2align 4,,15 - .globl GL_PREFIX(GetProgramNamedParameterdvNV) - .type GL_PREFIX(GetProgramNamedParameterdvNV), @function -GL_PREFIX(GetProgramNamedParameterdvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6960(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6960(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6960(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6960(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetProgramNamedParameterdvNV), .-GL_PREFIX(GetProgramNamedParameterdvNV) - - .p2align 4,,15 - .globl GL_PREFIX(GetProgramNamedParameterfvNV) - .type GL_PREFIX(GetProgramNamedParameterfvNV), @function -GL_PREFIX(GetProgramNamedParameterfvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6968(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6968(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6968(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6968(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetProgramNamedParameterfvNV), .-GL_PREFIX(GetProgramNamedParameterfvNV) - - .p2align 4,,15 - .globl GL_PREFIX(ProgramNamedParameter4dNV) - .type GL_PREFIX(ProgramNamedParameter4dNV), @function -GL_PREFIX(ProgramNamedParameter4dNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6976(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $56, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %rdx, 16(%rsp) - movq %xmm0, 24(%rsp) - movq %xmm1, 32(%rsp) - movq %xmm2, 40(%rsp) - movq %xmm3, 48(%rsp) - call _x86_64_get_dispatch@PLT - movq 48(%rsp), %xmm3 - movq 40(%rsp), %xmm2 - movq 32(%rsp), %xmm1 - movq 24(%rsp), %xmm0 - movq 16(%rsp), %rdx - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $56, %rsp - movq 6976(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6976(%rax), %r11 - jmp *%r11 -1: - subq $56, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %rdx, 16(%rsp) - movq %xmm0, 24(%rsp) - movq %xmm1, 32(%rsp) - movq %xmm2, 40(%rsp) - movq %xmm3, 48(%rsp) - call _glapi_get_dispatch - movq 48(%rsp), %xmm3 - movq 40(%rsp), %xmm2 - movq 32(%rsp), %xmm1 - movq 24(%rsp), %xmm0 - movq 16(%rsp), %rdx - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $56, %rsp - movq 6976(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ProgramNamedParameter4dNV), .-GL_PREFIX(ProgramNamedParameter4dNV) - - .p2align 4,,15 - .globl GL_PREFIX(ProgramNamedParameter4dvNV) - .type GL_PREFIX(ProgramNamedParameter4dvNV), @function -GL_PREFIX(ProgramNamedParameter4dvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6984(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6984(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6984(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 6984(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ProgramNamedParameter4dvNV), .-GL_PREFIX(ProgramNamedParameter4dvNV) - - .p2align 4,,15 - .globl GL_PREFIX(ProgramNamedParameter4fNV) - .type GL_PREFIX(ProgramNamedParameter4fNV), @function -GL_PREFIX(ProgramNamedParameter4fNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 6992(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - subq $56, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %rdx, 16(%rsp) - movq %xmm0, 24(%rsp) - movq %xmm1, 32(%rsp) - movq %xmm2, 40(%rsp) - movq %xmm3, 48(%rsp) - call _x86_64_get_dispatch@PLT - movq 48(%rsp), %xmm3 - movq 40(%rsp), %xmm2 - movq 32(%rsp), %xmm1 - movq 24(%rsp), %xmm0 - movq 16(%rsp), %rdx - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $56, %rsp - movq 6992(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 6992(%rax), %r11 - jmp *%r11 -1: - subq $56, %rsp - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) - movq %rdx, 16(%rsp) - movq %xmm0, 24(%rsp) - movq %xmm1, 32(%rsp) - movq %xmm2, 40(%rsp) - movq %xmm3, 48(%rsp) - call _glapi_get_dispatch - movq 48(%rsp), %xmm3 - movq 40(%rsp), %xmm2 - movq 32(%rsp), %xmm1 - movq 24(%rsp), %xmm0 - movq 16(%rsp), %rdx - movq 8(%rsp), %rsi - movq (%rsp), %rdi - addq $56, %rsp - movq 6992(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ProgramNamedParameter4fNV), .-GL_PREFIX(ProgramNamedParameter4fNV) - - .p2align 4,,15 - .globl GL_PREFIX(ProgramNamedParameter4fvNV) - .type GL_PREFIX(ProgramNamedParameter4fvNV), @function -GL_PREFIX(ProgramNamedParameter4fvNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7000(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7000(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7000(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7000(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ProgramNamedParameter4fvNV), .-GL_PREFIX(ProgramNamedParameter4fvNV) - - .p2align 4,,15 - .globl GL_PREFIX(PrimitiveRestartIndexNV) - .type GL_PREFIX(PrimitiveRestartIndexNV), @function -GL_PREFIX(PrimitiveRestartIndexNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7008(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 7008(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7008(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 7008(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PrimitiveRestartIndexNV), .-GL_PREFIX(PrimitiveRestartIndexNV) - - .p2align 4,,15 - .globl GL_PREFIX(PrimitiveRestartNV) - .type GL_PREFIX(PrimitiveRestartNV), @function -GL_PREFIX(PrimitiveRestartNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7016(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 7016(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7016(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 7016(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(PrimitiveRestartNV), .-GL_PREFIX(PrimitiveRestartNV) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_878) - .type GL_PREFIX(_dispatch_stub_878), @function - HIDDEN(GL_PREFIX(_dispatch_stub_878)) -GL_PREFIX(_dispatch_stub_878): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7024(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7024(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7024(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7024(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_878), .-GL_PREFIX(_dispatch_stub_878) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_879) - .type GL_PREFIX(_dispatch_stub_879), @function - HIDDEN(GL_PREFIX(_dispatch_stub_879)) -GL_PREFIX(_dispatch_stub_879): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7032(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7032(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7032(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7032(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_879), .-GL_PREFIX(_dispatch_stub_879) - - .p2align 4,,15 - .globl GL_PREFIX(BindFramebufferEXT) - .type GL_PREFIX(BindFramebufferEXT), @function -GL_PREFIX(BindFramebufferEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7040(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7040(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7040(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7040(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BindFramebufferEXT), .-GL_PREFIX(BindFramebufferEXT) - - .p2align 4,,15 - .globl GL_PREFIX(BindRenderbufferEXT) - .type GL_PREFIX(BindRenderbufferEXT), @function -GL_PREFIX(BindRenderbufferEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7048(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7048(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7048(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7048(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BindRenderbufferEXT), .-GL_PREFIX(BindRenderbufferEXT) - - .p2align 4,,15 - .globl GL_PREFIX(CheckFramebufferStatusEXT) - .type GL_PREFIX(CheckFramebufferStatusEXT), @function -GL_PREFIX(CheckFramebufferStatusEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7056(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 7056(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7056(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 7056(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CheckFramebufferStatusEXT), .-GL_PREFIX(CheckFramebufferStatusEXT) - - .p2align 4,,15 - .globl GL_PREFIX(DeleteFramebuffersEXT) - .type GL_PREFIX(DeleteFramebuffersEXT), @function -GL_PREFIX(DeleteFramebuffersEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7064(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7064(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7064(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7064(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DeleteFramebuffersEXT), .-GL_PREFIX(DeleteFramebuffersEXT) - - .p2align 4,,15 - .globl GL_PREFIX(DeleteRenderbuffersEXT) - .type GL_PREFIX(DeleteRenderbuffersEXT), @function -GL_PREFIX(DeleteRenderbuffersEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7072(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7072(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7072(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7072(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DeleteRenderbuffersEXT), .-GL_PREFIX(DeleteRenderbuffersEXT) - - .p2align 4,,15 - .globl GL_PREFIX(FramebufferRenderbufferEXT) - .type GL_PREFIX(FramebufferRenderbufferEXT), @function -GL_PREFIX(FramebufferRenderbufferEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7080(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7080(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7080(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7080(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(FramebufferRenderbufferEXT), .-GL_PREFIX(FramebufferRenderbufferEXT) - - .p2align 4,,15 - .globl GL_PREFIX(FramebufferTexture1DEXT) - .type GL_PREFIX(FramebufferTexture1DEXT), @function -GL_PREFIX(FramebufferTexture1DEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7088(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7088(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7088(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7088(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(FramebufferTexture1DEXT), .-GL_PREFIX(FramebufferTexture1DEXT) - - .p2align 4,,15 - .globl GL_PREFIX(FramebufferTexture2DEXT) - .type GL_PREFIX(FramebufferTexture2DEXT), @function -GL_PREFIX(FramebufferTexture2DEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7096(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7096(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7096(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7096(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(FramebufferTexture2DEXT), .-GL_PREFIX(FramebufferTexture2DEXT) - - .p2align 4,,15 - .globl GL_PREFIX(FramebufferTexture3DEXT) - .type GL_PREFIX(FramebufferTexture3DEXT), @function -GL_PREFIX(FramebufferTexture3DEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7104(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7104(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7104(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7104(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(FramebufferTexture3DEXT), .-GL_PREFIX(FramebufferTexture3DEXT) - - .p2align 4,,15 - .globl GL_PREFIX(GenFramebuffersEXT) - .type GL_PREFIX(GenFramebuffersEXT), @function -GL_PREFIX(GenFramebuffersEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7112(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7112(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7112(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7112(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GenFramebuffersEXT), .-GL_PREFIX(GenFramebuffersEXT) - - .p2align 4,,15 - .globl GL_PREFIX(GenRenderbuffersEXT) - .type GL_PREFIX(GenRenderbuffersEXT), @function -GL_PREFIX(GenRenderbuffersEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7120(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7120(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7120(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7120(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GenRenderbuffersEXT), .-GL_PREFIX(GenRenderbuffersEXT) - - .p2align 4,,15 - .globl GL_PREFIX(GenerateMipmapEXT) - .type GL_PREFIX(GenerateMipmapEXT), @function -GL_PREFIX(GenerateMipmapEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7128(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 7128(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7128(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 7128(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GenerateMipmapEXT), .-GL_PREFIX(GenerateMipmapEXT) - - .p2align 4,,15 - .globl GL_PREFIX(GetFramebufferAttachmentParameterivEXT) - .type GL_PREFIX(GetFramebufferAttachmentParameterivEXT), @function -GL_PREFIX(GetFramebufferAttachmentParameterivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7136(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7136(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7136(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7136(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetFramebufferAttachmentParameterivEXT), .-GL_PREFIX(GetFramebufferAttachmentParameterivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(GetRenderbufferParameterivEXT) - .type GL_PREFIX(GetRenderbufferParameterivEXT), @function -GL_PREFIX(GetRenderbufferParameterivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7144(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7144(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7144(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7144(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetRenderbufferParameterivEXT), .-GL_PREFIX(GetRenderbufferParameterivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(IsFramebufferEXT) - .type GL_PREFIX(IsFramebufferEXT), @function -GL_PREFIX(IsFramebufferEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7152(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 7152(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7152(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 7152(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(IsFramebufferEXT), .-GL_PREFIX(IsFramebufferEXT) - - .p2align 4,,15 - .globl GL_PREFIX(IsRenderbufferEXT) - .type GL_PREFIX(IsRenderbufferEXT), @function -GL_PREFIX(IsRenderbufferEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7160(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 7160(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7160(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 7160(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(IsRenderbufferEXT), .-GL_PREFIX(IsRenderbufferEXT) - - .p2align 4,,15 - .globl GL_PREFIX(RenderbufferStorageEXT) - .type GL_PREFIX(RenderbufferStorageEXT), @function -GL_PREFIX(RenderbufferStorageEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7168(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7168(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7168(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7168(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(RenderbufferStorageEXT), .-GL_PREFIX(RenderbufferStorageEXT) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_897) - .type GL_PREFIX(_dispatch_stub_897), @function - HIDDEN(GL_PREFIX(_dispatch_stub_897)) -GL_PREFIX(_dispatch_stub_897): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7176(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7176(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7176(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7176(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_897), .-GL_PREFIX(_dispatch_stub_897) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_898) - .type GL_PREFIX(_dispatch_stub_898), @function - HIDDEN(GL_PREFIX(_dispatch_stub_898)) -GL_PREFIX(_dispatch_stub_898): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7184(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7184(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7184(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7184(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_898), .-GL_PREFIX(_dispatch_stub_898) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_899) - .type GL_PREFIX(_dispatch_stub_899), @function - HIDDEN(GL_PREFIX(_dispatch_stub_899)) -GL_PREFIX(_dispatch_stub_899): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7192(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7192(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7192(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7192(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_899), .-GL_PREFIX(_dispatch_stub_899) - - .p2align 4,,15 - .globl GL_PREFIX(BindFragDataLocationEXT) - .type GL_PREFIX(BindFragDataLocationEXT), @function -GL_PREFIX(BindFragDataLocationEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7200(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7200(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7200(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7200(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BindFragDataLocationEXT), .-GL_PREFIX(BindFragDataLocationEXT) - - .p2align 4,,15 - .globl GL_PREFIX(GetFragDataLocationEXT) - .type GL_PREFIX(GetFragDataLocationEXT), @function -GL_PREFIX(GetFragDataLocationEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7208(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7208(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7208(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7208(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetFragDataLocationEXT), .-GL_PREFIX(GetFragDataLocationEXT) - - .p2align 4,,15 - .globl GL_PREFIX(GetUniformuivEXT) - .type GL_PREFIX(GetUniformuivEXT), @function -GL_PREFIX(GetUniformuivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7216(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7216(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7216(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7216(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetUniformuivEXT), .-GL_PREFIX(GetUniformuivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(GetVertexAttribIivEXT) - .type GL_PREFIX(GetVertexAttribIivEXT), @function -GL_PREFIX(GetVertexAttribIivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7224(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7224(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7224(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7224(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetVertexAttribIivEXT), .-GL_PREFIX(GetVertexAttribIivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(GetVertexAttribIuivEXT) - .type GL_PREFIX(GetVertexAttribIuivEXT), @function -GL_PREFIX(GetVertexAttribIuivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7232(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7232(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7232(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7232(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetVertexAttribIuivEXT), .-GL_PREFIX(GetVertexAttribIuivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform1uiEXT) - .type GL_PREFIX(Uniform1uiEXT), @function -GL_PREFIX(Uniform1uiEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7240(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7240(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7240(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7240(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform1uiEXT), .-GL_PREFIX(Uniform1uiEXT) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform1uivEXT) - .type GL_PREFIX(Uniform1uivEXT), @function -GL_PREFIX(Uniform1uivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7248(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7248(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7248(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7248(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform1uivEXT), .-GL_PREFIX(Uniform1uivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform2uiEXT) - .type GL_PREFIX(Uniform2uiEXT), @function -GL_PREFIX(Uniform2uiEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7256(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7256(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7256(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7256(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform2uiEXT), .-GL_PREFIX(Uniform2uiEXT) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform2uivEXT) - .type GL_PREFIX(Uniform2uivEXT), @function -GL_PREFIX(Uniform2uivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7264(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7264(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7264(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7264(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform2uivEXT), .-GL_PREFIX(Uniform2uivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform3uiEXT) - .type GL_PREFIX(Uniform3uiEXT), @function -GL_PREFIX(Uniform3uiEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7272(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7272(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7272(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7272(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform3uiEXT), .-GL_PREFIX(Uniform3uiEXT) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform3uivEXT) - .type GL_PREFIX(Uniform3uivEXT), @function -GL_PREFIX(Uniform3uivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7280(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7280(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7280(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7280(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform3uivEXT), .-GL_PREFIX(Uniform3uivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform4uiEXT) - .type GL_PREFIX(Uniform4uiEXT), @function -GL_PREFIX(Uniform4uiEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7288(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7288(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7288(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7288(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform4uiEXT), .-GL_PREFIX(Uniform4uiEXT) - - .p2align 4,,15 - .globl GL_PREFIX(Uniform4uivEXT) - .type GL_PREFIX(Uniform4uivEXT), @function -GL_PREFIX(Uniform4uivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7296(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7296(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7296(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7296(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(Uniform4uivEXT), .-GL_PREFIX(Uniform4uivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribI1iEXT) - .type GL_PREFIX(VertexAttribI1iEXT), @function -GL_PREFIX(VertexAttribI1iEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7304(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7304(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7304(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7304(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribI1iEXT), .-GL_PREFIX(VertexAttribI1iEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribI1ivEXT) - .type GL_PREFIX(VertexAttribI1ivEXT), @function -GL_PREFIX(VertexAttribI1ivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7312(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7312(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7312(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7312(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribI1ivEXT), .-GL_PREFIX(VertexAttribI1ivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribI1uiEXT) - .type GL_PREFIX(VertexAttribI1uiEXT), @function -GL_PREFIX(VertexAttribI1uiEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7320(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7320(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7320(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7320(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribI1uiEXT), .-GL_PREFIX(VertexAttribI1uiEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribI1uivEXT) - .type GL_PREFIX(VertexAttribI1uivEXT), @function -GL_PREFIX(VertexAttribI1uivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7328(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7328(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7328(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7328(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribI1uivEXT), .-GL_PREFIX(VertexAttribI1uivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribI2iEXT) - .type GL_PREFIX(VertexAttribI2iEXT), @function -GL_PREFIX(VertexAttribI2iEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7336(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7336(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7336(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7336(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribI2iEXT), .-GL_PREFIX(VertexAttribI2iEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribI2ivEXT) - .type GL_PREFIX(VertexAttribI2ivEXT), @function -GL_PREFIX(VertexAttribI2ivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7344(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7344(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7344(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7344(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribI2ivEXT), .-GL_PREFIX(VertexAttribI2ivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribI2uiEXT) - .type GL_PREFIX(VertexAttribI2uiEXT), @function -GL_PREFIX(VertexAttribI2uiEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7352(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7352(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7352(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7352(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribI2uiEXT), .-GL_PREFIX(VertexAttribI2uiEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribI2uivEXT) - .type GL_PREFIX(VertexAttribI2uivEXT), @function -GL_PREFIX(VertexAttribI2uivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7360(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7360(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7360(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7360(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribI2uivEXT), .-GL_PREFIX(VertexAttribI2uivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribI3iEXT) - .type GL_PREFIX(VertexAttribI3iEXT), @function -GL_PREFIX(VertexAttribI3iEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7368(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7368(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7368(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7368(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribI3iEXT), .-GL_PREFIX(VertexAttribI3iEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribI3ivEXT) - .type GL_PREFIX(VertexAttribI3ivEXT), @function -GL_PREFIX(VertexAttribI3ivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7376(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7376(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7376(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7376(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribI3ivEXT), .-GL_PREFIX(VertexAttribI3ivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribI3uiEXT) - .type GL_PREFIX(VertexAttribI3uiEXT), @function -GL_PREFIX(VertexAttribI3uiEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7384(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7384(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7384(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7384(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribI3uiEXT), .-GL_PREFIX(VertexAttribI3uiEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribI3uivEXT) - .type GL_PREFIX(VertexAttribI3uivEXT), @function -GL_PREFIX(VertexAttribI3uivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7392(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7392(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7392(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7392(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribI3uivEXT), .-GL_PREFIX(VertexAttribI3uivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribI4bvEXT) - .type GL_PREFIX(VertexAttribI4bvEXT), @function -GL_PREFIX(VertexAttribI4bvEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7400(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7400(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7400(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7400(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribI4bvEXT), .-GL_PREFIX(VertexAttribI4bvEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribI4iEXT) - .type GL_PREFIX(VertexAttribI4iEXT), @function -GL_PREFIX(VertexAttribI4iEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7408(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7408(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7408(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7408(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribI4iEXT), .-GL_PREFIX(VertexAttribI4iEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribI4ivEXT) - .type GL_PREFIX(VertexAttribI4ivEXT), @function -GL_PREFIX(VertexAttribI4ivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7416(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7416(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7416(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7416(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribI4ivEXT), .-GL_PREFIX(VertexAttribI4ivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribI4svEXT) - .type GL_PREFIX(VertexAttribI4svEXT), @function -GL_PREFIX(VertexAttribI4svEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7424(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7424(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7424(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7424(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribI4svEXT), .-GL_PREFIX(VertexAttribI4svEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribI4ubvEXT) - .type GL_PREFIX(VertexAttribI4ubvEXT), @function -GL_PREFIX(VertexAttribI4ubvEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7432(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7432(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7432(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7432(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribI4ubvEXT), .-GL_PREFIX(VertexAttribI4ubvEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribI4uiEXT) - .type GL_PREFIX(VertexAttribI4uiEXT), @function -GL_PREFIX(VertexAttribI4uiEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7440(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7440(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7440(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7440(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribI4uiEXT), .-GL_PREFIX(VertexAttribI4uiEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribI4uivEXT) - .type GL_PREFIX(VertexAttribI4uivEXT), @function -GL_PREFIX(VertexAttribI4uivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7448(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7448(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7448(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7448(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribI4uivEXT), .-GL_PREFIX(VertexAttribI4uivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribI4usvEXT) - .type GL_PREFIX(VertexAttribI4usvEXT), @function -GL_PREFIX(VertexAttribI4usvEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7456(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7456(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7456(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7456(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribI4usvEXT), .-GL_PREFIX(VertexAttribI4usvEXT) - - .p2align 4,,15 - .globl GL_PREFIX(VertexAttribIPointerEXT) - .type GL_PREFIX(VertexAttribIPointerEXT), @function -GL_PREFIX(VertexAttribIPointerEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7464(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7464(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7464(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7464(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(VertexAttribIPointerEXT), .-GL_PREFIX(VertexAttribIPointerEXT) - - .p2align 4,,15 - .globl GL_PREFIX(FramebufferTextureLayerEXT) - .type GL_PREFIX(FramebufferTextureLayerEXT), @function -GL_PREFIX(FramebufferTextureLayerEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7472(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7472(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7472(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7472(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(FramebufferTextureLayerEXT), .-GL_PREFIX(FramebufferTextureLayerEXT) - - .p2align 4,,15 - .globl GL_PREFIX(ColorMaskIndexedEXT) - .type GL_PREFIX(ColorMaskIndexedEXT), @function -GL_PREFIX(ColorMaskIndexedEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7480(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7480(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7480(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7480(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ColorMaskIndexedEXT), .-GL_PREFIX(ColorMaskIndexedEXT) - - .p2align 4,,15 - .globl GL_PREFIX(DisableIndexedEXT) - .type GL_PREFIX(DisableIndexedEXT), @function -GL_PREFIX(DisableIndexedEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7488(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7488(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7488(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7488(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(DisableIndexedEXT), .-GL_PREFIX(DisableIndexedEXT) - - .p2align 4,,15 - .globl GL_PREFIX(EnableIndexedEXT) - .type GL_PREFIX(EnableIndexedEXT), @function -GL_PREFIX(EnableIndexedEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7496(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7496(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7496(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7496(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EnableIndexedEXT), .-GL_PREFIX(EnableIndexedEXT) - - .p2align 4,,15 - .globl GL_PREFIX(GetBooleanIndexedvEXT) - .type GL_PREFIX(GetBooleanIndexedvEXT), @function -GL_PREFIX(GetBooleanIndexedvEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7504(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7504(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7504(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7504(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetBooleanIndexedvEXT), .-GL_PREFIX(GetBooleanIndexedvEXT) - - .p2align 4,,15 - .globl GL_PREFIX(GetIntegerIndexedvEXT) - .type GL_PREFIX(GetIntegerIndexedvEXT), @function -GL_PREFIX(GetIntegerIndexedvEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7512(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7512(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7512(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7512(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetIntegerIndexedvEXT), .-GL_PREFIX(GetIntegerIndexedvEXT) - - .p2align 4,,15 - .globl GL_PREFIX(IsEnabledIndexedEXT) - .type GL_PREFIX(IsEnabledIndexedEXT), @function -GL_PREFIX(IsEnabledIndexedEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7520(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7520(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7520(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7520(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(IsEnabledIndexedEXT), .-GL_PREFIX(IsEnabledIndexedEXT) - - .p2align 4,,15 - .globl GL_PREFIX(ClearColorIiEXT) - .type GL_PREFIX(ClearColorIiEXT), @function -GL_PREFIX(ClearColorIiEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7528(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7528(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7528(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7528(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ClearColorIiEXT), .-GL_PREFIX(ClearColorIiEXT) - - .p2align 4,,15 - .globl GL_PREFIX(ClearColorIuiEXT) - .type GL_PREFIX(ClearColorIuiEXT), @function -GL_PREFIX(ClearColorIuiEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7536(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7536(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7536(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7536(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ClearColorIuiEXT), .-GL_PREFIX(ClearColorIuiEXT) - - .p2align 4,,15 - .globl GL_PREFIX(GetTexParameterIivEXT) - .type GL_PREFIX(GetTexParameterIivEXT), @function -GL_PREFIX(GetTexParameterIivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7544(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7544(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7544(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7544(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetTexParameterIivEXT), .-GL_PREFIX(GetTexParameterIivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(GetTexParameterIuivEXT) - .type GL_PREFIX(GetTexParameterIuivEXT), @function -GL_PREFIX(GetTexParameterIuivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7552(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7552(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7552(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7552(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetTexParameterIuivEXT), .-GL_PREFIX(GetTexParameterIuivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(TexParameterIivEXT) - .type GL_PREFIX(TexParameterIivEXT), @function -GL_PREFIX(TexParameterIivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7560(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7560(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7560(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7560(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexParameterIivEXT), .-GL_PREFIX(TexParameterIivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(TexParameterIuivEXT) - .type GL_PREFIX(TexParameterIuivEXT), @function -GL_PREFIX(TexParameterIuivEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7568(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7568(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7568(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7568(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TexParameterIuivEXT), .-GL_PREFIX(TexParameterIuivEXT) - - .p2align 4,,15 - .globl GL_PREFIX(BeginConditionalRenderNV) - .type GL_PREFIX(BeginConditionalRenderNV), @function -GL_PREFIX(BeginConditionalRenderNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7576(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7576(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7576(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7576(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BeginConditionalRenderNV), .-GL_PREFIX(BeginConditionalRenderNV) - - .p2align 4,,15 - .globl GL_PREFIX(EndConditionalRenderNV) - .type GL_PREFIX(EndConditionalRenderNV), @function -GL_PREFIX(EndConditionalRenderNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7584(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 7584(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7584(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 7584(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EndConditionalRenderNV), .-GL_PREFIX(EndConditionalRenderNV) - - .p2align 4,,15 - .globl GL_PREFIX(BeginTransformFeedbackEXT) - .type GL_PREFIX(BeginTransformFeedbackEXT), @function -GL_PREFIX(BeginTransformFeedbackEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7592(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 7592(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7592(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 7592(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BeginTransformFeedbackEXT), .-GL_PREFIX(BeginTransformFeedbackEXT) - - .p2align 4,,15 - .globl GL_PREFIX(BindBufferBaseEXT) - .type GL_PREFIX(BindBufferBaseEXT), @function -GL_PREFIX(BindBufferBaseEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7600(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7600(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7600(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7600(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BindBufferBaseEXT), .-GL_PREFIX(BindBufferBaseEXT) - - .p2align 4,,15 - .globl GL_PREFIX(BindBufferOffsetEXT) - .type GL_PREFIX(BindBufferOffsetEXT), @function -GL_PREFIX(BindBufferOffsetEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7608(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7608(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7608(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7608(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BindBufferOffsetEXT), .-GL_PREFIX(BindBufferOffsetEXT) - - .p2align 4,,15 - .globl GL_PREFIX(BindBufferRangeEXT) - .type GL_PREFIX(BindBufferRangeEXT), @function -GL_PREFIX(BindBufferRangeEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7616(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _x86_64_get_dispatch@PLT - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7616(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7616(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - call _glapi_get_dispatch - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7616(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(BindBufferRangeEXT), .-GL_PREFIX(BindBufferRangeEXT) - - .p2align 4,,15 - .globl GL_PREFIX(EndTransformFeedbackEXT) - .type GL_PREFIX(EndTransformFeedbackEXT), @function -GL_PREFIX(EndTransformFeedbackEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7624(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 7624(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7624(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 7624(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EndTransformFeedbackEXT), .-GL_PREFIX(EndTransformFeedbackEXT) - - .p2align 4,,15 - .globl GL_PREFIX(GetTransformFeedbackVaryingEXT) - .type GL_PREFIX(GetTransformFeedbackVaryingEXT), @function -GL_PREFIX(GetTransformFeedbackVaryingEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7632(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7632(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7632(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %r8 - pushq %r9 - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %r9 - popq %r8 - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7632(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetTransformFeedbackVaryingEXT), .-GL_PREFIX(GetTransformFeedbackVaryingEXT) - - .p2align 4,,15 - .globl GL_PREFIX(TransformFeedbackVaryingsEXT) - .type GL_PREFIX(TransformFeedbackVaryingsEXT), @function -GL_PREFIX(TransformFeedbackVaryingsEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7640(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7640(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7640(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7640(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TransformFeedbackVaryingsEXT), .-GL_PREFIX(TransformFeedbackVaryingsEXT) - - .p2align 4,,15 - .globl GL_PREFIX(ProvokingVertexEXT) - .type GL_PREFIX(ProvokingVertexEXT), @function -GL_PREFIX(ProvokingVertexEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7648(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 7648(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7648(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 7648(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ProvokingVertexEXT), .-GL_PREFIX(ProvokingVertexEXT) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_957) - .type GL_PREFIX(_dispatch_stub_957), @function - HIDDEN(GL_PREFIX(_dispatch_stub_957)) -GL_PREFIX(_dispatch_stub_957): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7656(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7656(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7656(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7656(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_957), .-GL_PREFIX(_dispatch_stub_957) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_958) - .type GL_PREFIX(_dispatch_stub_958), @function - HIDDEN(GL_PREFIX(_dispatch_stub_958)) -GL_PREFIX(_dispatch_stub_958): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7664(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7664(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7664(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7664(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_958), .-GL_PREFIX(_dispatch_stub_958) - - .p2align 4,,15 - .globl GL_PREFIX(GetObjectParameterivAPPLE) - .type GL_PREFIX(GetObjectParameterivAPPLE), @function -GL_PREFIX(GetObjectParameterivAPPLE): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7672(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7672(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7672(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7672(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(GetObjectParameterivAPPLE), .-GL_PREFIX(GetObjectParameterivAPPLE) - - .p2align 4,,15 - .globl GL_PREFIX(ObjectPurgeableAPPLE) - .type GL_PREFIX(ObjectPurgeableAPPLE), @function -GL_PREFIX(ObjectPurgeableAPPLE): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7680(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7680(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7680(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7680(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ObjectPurgeableAPPLE), .-GL_PREFIX(ObjectPurgeableAPPLE) - - .p2align 4,,15 - .globl GL_PREFIX(ObjectUnpurgeableAPPLE) - .type GL_PREFIX(ObjectUnpurgeableAPPLE), @function -GL_PREFIX(ObjectUnpurgeableAPPLE): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7688(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7688(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7688(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7688(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ObjectUnpurgeableAPPLE), .-GL_PREFIX(ObjectUnpurgeableAPPLE) - - .p2align 4,,15 - .globl GL_PREFIX(ActiveProgramEXT) - .type GL_PREFIX(ActiveProgramEXT), @function -GL_PREFIX(ActiveProgramEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7696(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - call _x86_64_get_dispatch@PLT - popq %rdi - movq 7696(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7696(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - call _glapi_get_dispatch - popq %rdi - movq 7696(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(ActiveProgramEXT), .-GL_PREFIX(ActiveProgramEXT) - - .p2align 4,,15 - .globl GL_PREFIX(CreateShaderProgramEXT) - .type GL_PREFIX(CreateShaderProgramEXT), @function -GL_PREFIX(CreateShaderProgramEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7704(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7704(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7704(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7704(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(CreateShaderProgramEXT), .-GL_PREFIX(CreateShaderProgramEXT) - - .p2align 4,,15 - .globl GL_PREFIX(UseShaderProgramEXT) - .type GL_PREFIX(UseShaderProgramEXT), @function -GL_PREFIX(UseShaderProgramEXT): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7712(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7712(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7712(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7712(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(UseShaderProgramEXT), .-GL_PREFIX(UseShaderProgramEXT) - - .p2align 4,,15 - .globl GL_PREFIX(TextureBarrierNV) - .type GL_PREFIX(TextureBarrierNV), @function -GL_PREFIX(TextureBarrierNV): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7720(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - movq 7720(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7720(%rax), %r11 - jmp *%r11 -1: - pushq %rbp - call _glapi_get_dispatch - popq %rbp - movq 7720(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(TextureBarrierNV), .-GL_PREFIX(TextureBarrierNV) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_966) - .type GL_PREFIX(_dispatch_stub_966), @function - HIDDEN(GL_PREFIX(_dispatch_stub_966)) -GL_PREFIX(_dispatch_stub_966): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7728(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7728(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7728(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7728(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_966), .-GL_PREFIX(_dispatch_stub_966) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_967) - .type GL_PREFIX(_dispatch_stub_967), @function - HIDDEN(GL_PREFIX(_dispatch_stub_967)) -GL_PREFIX(_dispatch_stub_967): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7736(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7736(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7736(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7736(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_967), .-GL_PREFIX(_dispatch_stub_967) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_968) - .type GL_PREFIX(_dispatch_stub_968), @function - HIDDEN(GL_PREFIX(_dispatch_stub_968)) -GL_PREFIX(_dispatch_stub_968): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7744(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7744(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7744(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - pushq %rcx - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rcx - popq %rdx - popq %rsi - popq %rdi - movq 7744(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_968), .-GL_PREFIX(_dispatch_stub_968) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_969) - .type GL_PREFIX(_dispatch_stub_969), @function - HIDDEN(GL_PREFIX(_dispatch_stub_969)) -GL_PREFIX(_dispatch_stub_969): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7752(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7752(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7752(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7752(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_969), .-GL_PREFIX(_dispatch_stub_969) - - .p2align 4,,15 - .globl GL_PREFIX(_dispatch_stub_970) - .type GL_PREFIX(_dispatch_stub_970), @function - HIDDEN(GL_PREFIX(_dispatch_stub_970)) -GL_PREFIX(_dispatch_stub_970): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7760(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rdx - call _x86_64_get_dispatch@PLT - popq %rdx - popq %rsi - popq %rdi - movq 7760(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7760(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rdx - call _glapi_get_dispatch - popq %rdx - popq %rsi - popq %rdi - movq 7760(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(_dispatch_stub_970), .-GL_PREFIX(_dispatch_stub_970) - - .p2align 4,,15 - .globl GL_PREFIX(EGLImageTargetRenderbufferStorageOES) - .type GL_PREFIX(EGLImageTargetRenderbufferStorageOES), @function -GL_PREFIX(EGLImageTargetRenderbufferStorageOES): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7768(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7768(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7768(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7768(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EGLImageTargetRenderbufferStorageOES), .-GL_PREFIX(EGLImageTargetRenderbufferStorageOES) - - .p2align 4,,15 - .globl GL_PREFIX(EGLImageTargetTexture2DOES) - .type GL_PREFIX(EGLImageTargetTexture2DOES), @function -GL_PREFIX(EGLImageTargetTexture2DOES): -#if defined(GLX_USE_TLS) - call _x86_64_get_dispatch@PLT - movq 7776(%rax), %r11 - jmp *%r11 -#elif defined(PTHREADS) - pushq %rdi - pushq %rsi - pushq %rbp - call _x86_64_get_dispatch@PLT - popq %rbp - popq %rsi - popq %rdi - movq 7776(%rax), %r11 - jmp *%r11 -#else - movq _glapi_Dispatch(%rip), %rax - testq %rax, %rax - je 1f - movq 7776(%rax), %r11 - jmp *%r11 -1: - pushq %rdi - pushq %rsi - pushq %rbp - call _glapi_get_dispatch - popq %rbp - popq %rsi - popq %rdi - movq 7776(%rax), %r11 - jmp *%r11 -#endif /* defined(GLX_USE_TLS) */ - .size GL_PREFIX(EGLImageTargetTexture2DOES), .-GL_PREFIX(EGLImageTargetTexture2DOES) - - .globl GL_PREFIX(ArrayElementEXT) ; .set GL_PREFIX(ArrayElementEXT), GL_PREFIX(ArrayElement) - .globl GL_PREFIX(BindTextureEXT) ; .set GL_PREFIX(BindTextureEXT), GL_PREFIX(BindTexture) - .globl GL_PREFIX(DrawArraysEXT) ; .set GL_PREFIX(DrawArraysEXT), GL_PREFIX(DrawArrays) -#ifndef GLX_INDIRECT_RENDERING - .globl GL_PREFIX(AreTexturesResidentEXT) ; .set GL_PREFIX(AreTexturesResidentEXT), GL_PREFIX(AreTexturesResident) -#endif - .globl GL_PREFIX(CopyTexImage1DEXT) ; .set GL_PREFIX(CopyTexImage1DEXT), GL_PREFIX(CopyTexImage1D) - .globl GL_PREFIX(CopyTexImage2DEXT) ; .set GL_PREFIX(CopyTexImage2DEXT), GL_PREFIX(CopyTexImage2D) - .globl GL_PREFIX(CopyTexSubImage1DEXT) ; .set GL_PREFIX(CopyTexSubImage1DEXT), GL_PREFIX(CopyTexSubImage1D) - .globl GL_PREFIX(CopyTexSubImage2DEXT) ; .set GL_PREFIX(CopyTexSubImage2DEXT), GL_PREFIX(CopyTexSubImage2D) -#ifndef GLX_INDIRECT_RENDERING - .globl GL_PREFIX(DeleteTexturesEXT) ; .set GL_PREFIX(DeleteTexturesEXT), GL_PREFIX(DeleteTextures) -#endif -#ifndef GLX_INDIRECT_RENDERING - .globl GL_PREFIX(GenTexturesEXT) ; .set GL_PREFIX(GenTexturesEXT), GL_PREFIX(GenTextures) -#endif - .globl GL_PREFIX(GetPointervEXT) ; .set GL_PREFIX(GetPointervEXT), GL_PREFIX(GetPointerv) -#ifndef GLX_INDIRECT_RENDERING - .globl GL_PREFIX(IsTextureEXT) ; .set GL_PREFIX(IsTextureEXT), GL_PREFIX(IsTexture) -#endif - .globl GL_PREFIX(PrioritizeTexturesEXT) ; .set GL_PREFIX(PrioritizeTexturesEXT), GL_PREFIX(PrioritizeTextures) - .globl GL_PREFIX(TexSubImage1DEXT) ; .set GL_PREFIX(TexSubImage1DEXT), GL_PREFIX(TexSubImage1D) - .globl GL_PREFIX(TexSubImage2DEXT) ; .set GL_PREFIX(TexSubImage2DEXT), GL_PREFIX(TexSubImage2D) - .globl GL_PREFIX(BlendColorEXT) ; .set GL_PREFIX(BlendColorEXT), GL_PREFIX(BlendColor) - .globl GL_PREFIX(BlendEquationEXT) ; .set GL_PREFIX(BlendEquationEXT), GL_PREFIX(BlendEquation) - .globl GL_PREFIX(DrawRangeElementsEXT) ; .set GL_PREFIX(DrawRangeElementsEXT), GL_PREFIX(DrawRangeElements) - .globl GL_PREFIX(ColorTableEXT) ; .set GL_PREFIX(ColorTableEXT), GL_PREFIX(ColorTable) -#ifndef GLX_INDIRECT_RENDERING - .globl GL_PREFIX(GetColorTableEXT) ; .set GL_PREFIX(GetColorTableEXT), GL_PREFIX(GetColorTable) -#endif -#ifndef GLX_INDIRECT_RENDERING - .globl GL_PREFIX(GetColorTableParameterfvEXT) ; .set GL_PREFIX(GetColorTableParameterfvEXT), GL_PREFIX(GetColorTableParameterfv) -#endif -#ifndef GLX_INDIRECT_RENDERING - .globl GL_PREFIX(GetColorTableParameterivEXT) ; .set GL_PREFIX(GetColorTableParameterivEXT), GL_PREFIX(GetColorTableParameteriv) -#endif - .globl GL_PREFIX(TexImage3DEXT) ; .set GL_PREFIX(TexImage3DEXT), GL_PREFIX(TexImage3D) - .globl GL_PREFIX(TexSubImage3DEXT) ; .set GL_PREFIX(TexSubImage3DEXT), GL_PREFIX(TexSubImage3D) - .globl GL_PREFIX(CopyTexSubImage3DEXT) ; .set GL_PREFIX(CopyTexSubImage3DEXT), GL_PREFIX(CopyTexSubImage3D) - .globl GL_PREFIX(ActiveTexture) ; .set GL_PREFIX(ActiveTexture), GL_PREFIX(ActiveTextureARB) - .globl GL_PREFIX(ClientActiveTexture) ; .set GL_PREFIX(ClientActiveTexture), GL_PREFIX(ClientActiveTextureARB) - .globl GL_PREFIX(MultiTexCoord1d) ; .set GL_PREFIX(MultiTexCoord1d), GL_PREFIX(MultiTexCoord1dARB) - .globl GL_PREFIX(MultiTexCoord1dv) ; .set GL_PREFIX(MultiTexCoord1dv), GL_PREFIX(MultiTexCoord1dvARB) - .globl GL_PREFIX(MultiTexCoord1f) ; .set GL_PREFIX(MultiTexCoord1f), GL_PREFIX(MultiTexCoord1fARB) - .globl GL_PREFIX(MultiTexCoord1fv) ; .set GL_PREFIX(MultiTexCoord1fv), GL_PREFIX(MultiTexCoord1fvARB) - .globl GL_PREFIX(MultiTexCoord1i) ; .set GL_PREFIX(MultiTexCoord1i), GL_PREFIX(MultiTexCoord1iARB) - .globl GL_PREFIX(MultiTexCoord1iv) ; .set GL_PREFIX(MultiTexCoord1iv), GL_PREFIX(MultiTexCoord1ivARB) - .globl GL_PREFIX(MultiTexCoord1s) ; .set GL_PREFIX(MultiTexCoord1s), GL_PREFIX(MultiTexCoord1sARB) - .globl GL_PREFIX(MultiTexCoord1sv) ; .set GL_PREFIX(MultiTexCoord1sv), GL_PREFIX(MultiTexCoord1svARB) - .globl GL_PREFIX(MultiTexCoord2d) ; .set GL_PREFIX(MultiTexCoord2d), GL_PREFIX(MultiTexCoord2dARB) - .globl GL_PREFIX(MultiTexCoord2dv) ; .set GL_PREFIX(MultiTexCoord2dv), GL_PREFIX(MultiTexCoord2dvARB) - .globl GL_PREFIX(MultiTexCoord2f) ; .set GL_PREFIX(MultiTexCoord2f), GL_PREFIX(MultiTexCoord2fARB) - .globl GL_PREFIX(MultiTexCoord2fv) ; .set GL_PREFIX(MultiTexCoord2fv), GL_PREFIX(MultiTexCoord2fvARB) - .globl GL_PREFIX(MultiTexCoord2i) ; .set GL_PREFIX(MultiTexCoord2i), GL_PREFIX(MultiTexCoord2iARB) - .globl GL_PREFIX(MultiTexCoord2iv) ; .set GL_PREFIX(MultiTexCoord2iv), GL_PREFIX(MultiTexCoord2ivARB) - .globl GL_PREFIX(MultiTexCoord2s) ; .set GL_PREFIX(MultiTexCoord2s), GL_PREFIX(MultiTexCoord2sARB) - .globl GL_PREFIX(MultiTexCoord2sv) ; .set GL_PREFIX(MultiTexCoord2sv), GL_PREFIX(MultiTexCoord2svARB) - .globl GL_PREFIX(MultiTexCoord3d) ; .set GL_PREFIX(MultiTexCoord3d), GL_PREFIX(MultiTexCoord3dARB) - .globl GL_PREFIX(MultiTexCoord3dv) ; .set GL_PREFIX(MultiTexCoord3dv), GL_PREFIX(MultiTexCoord3dvARB) - .globl GL_PREFIX(MultiTexCoord3f) ; .set GL_PREFIX(MultiTexCoord3f), GL_PREFIX(MultiTexCoord3fARB) - .globl GL_PREFIX(MultiTexCoord3fv) ; .set GL_PREFIX(MultiTexCoord3fv), GL_PREFIX(MultiTexCoord3fvARB) - .globl GL_PREFIX(MultiTexCoord3i) ; .set GL_PREFIX(MultiTexCoord3i), GL_PREFIX(MultiTexCoord3iARB) - .globl GL_PREFIX(MultiTexCoord3iv) ; .set GL_PREFIX(MultiTexCoord3iv), GL_PREFIX(MultiTexCoord3ivARB) - .globl GL_PREFIX(MultiTexCoord3s) ; .set GL_PREFIX(MultiTexCoord3s), GL_PREFIX(MultiTexCoord3sARB) - .globl GL_PREFIX(MultiTexCoord3sv) ; .set GL_PREFIX(MultiTexCoord3sv), GL_PREFIX(MultiTexCoord3svARB) - .globl GL_PREFIX(MultiTexCoord4d) ; .set GL_PREFIX(MultiTexCoord4d), GL_PREFIX(MultiTexCoord4dARB) - .globl GL_PREFIX(MultiTexCoord4dv) ; .set GL_PREFIX(MultiTexCoord4dv), GL_PREFIX(MultiTexCoord4dvARB) - .globl GL_PREFIX(MultiTexCoord4f) ; .set GL_PREFIX(MultiTexCoord4f), GL_PREFIX(MultiTexCoord4fARB) - .globl GL_PREFIX(MultiTexCoord4fv) ; .set GL_PREFIX(MultiTexCoord4fv), GL_PREFIX(MultiTexCoord4fvARB) - .globl GL_PREFIX(MultiTexCoord4i) ; .set GL_PREFIX(MultiTexCoord4i), GL_PREFIX(MultiTexCoord4iARB) - .globl GL_PREFIX(MultiTexCoord4iv) ; .set GL_PREFIX(MultiTexCoord4iv), GL_PREFIX(MultiTexCoord4ivARB) - .globl GL_PREFIX(MultiTexCoord4s) ; .set GL_PREFIX(MultiTexCoord4s), GL_PREFIX(MultiTexCoord4sARB) - .globl GL_PREFIX(MultiTexCoord4sv) ; .set GL_PREFIX(MultiTexCoord4sv), GL_PREFIX(MultiTexCoord4svARB) - .globl GL_PREFIX(LoadTransposeMatrixd) ; .set GL_PREFIX(LoadTransposeMatrixd), GL_PREFIX(LoadTransposeMatrixdARB) - .globl GL_PREFIX(LoadTransposeMatrixf) ; .set GL_PREFIX(LoadTransposeMatrixf), GL_PREFIX(LoadTransposeMatrixfARB) - .globl GL_PREFIX(MultTransposeMatrixd) ; .set GL_PREFIX(MultTransposeMatrixd), GL_PREFIX(MultTransposeMatrixdARB) - .globl GL_PREFIX(MultTransposeMatrixf) ; .set GL_PREFIX(MultTransposeMatrixf), GL_PREFIX(MultTransposeMatrixfARB) - .globl GL_PREFIX(SampleCoverage) ; .set GL_PREFIX(SampleCoverage), GL_PREFIX(SampleCoverageARB) - .globl GL_PREFIX(CompressedTexImage1D) ; .set GL_PREFIX(CompressedTexImage1D), GL_PREFIX(CompressedTexImage1DARB) - .globl GL_PREFIX(CompressedTexImage2D) ; .set GL_PREFIX(CompressedTexImage2D), GL_PREFIX(CompressedTexImage2DARB) - .globl GL_PREFIX(CompressedTexImage3D) ; .set GL_PREFIX(CompressedTexImage3D), GL_PREFIX(CompressedTexImage3DARB) - .globl GL_PREFIX(CompressedTexSubImage1D) ; .set GL_PREFIX(CompressedTexSubImage1D), GL_PREFIX(CompressedTexSubImage1DARB) - .globl GL_PREFIX(CompressedTexSubImage2D) ; .set GL_PREFIX(CompressedTexSubImage2D), GL_PREFIX(CompressedTexSubImage2DARB) - .globl GL_PREFIX(CompressedTexSubImage3D) ; .set GL_PREFIX(CompressedTexSubImage3D), GL_PREFIX(CompressedTexSubImage3DARB) - .globl GL_PREFIX(GetCompressedTexImage) ; .set GL_PREFIX(GetCompressedTexImage), GL_PREFIX(GetCompressedTexImageARB) - .globl GL_PREFIX(DisableVertexAttribArray) ; .set GL_PREFIX(DisableVertexAttribArray), GL_PREFIX(DisableVertexAttribArrayARB) - .globl GL_PREFIX(EnableVertexAttribArray) ; .set GL_PREFIX(EnableVertexAttribArray), GL_PREFIX(EnableVertexAttribArrayARB) - .globl GL_PREFIX(GetVertexAttribdv) ; .set GL_PREFIX(GetVertexAttribdv), GL_PREFIX(GetVertexAttribdvARB) - .globl GL_PREFIX(GetVertexAttribfv) ; .set GL_PREFIX(GetVertexAttribfv), GL_PREFIX(GetVertexAttribfvARB) - .globl GL_PREFIX(GetVertexAttribiv) ; .set GL_PREFIX(GetVertexAttribiv), GL_PREFIX(GetVertexAttribivARB) - .globl GL_PREFIX(ProgramParameter4dNV) ; .set GL_PREFIX(ProgramParameter4dNV), GL_PREFIX(ProgramEnvParameter4dARB) - .globl GL_PREFIX(ProgramParameter4dvNV) ; .set GL_PREFIX(ProgramParameter4dvNV), GL_PREFIX(ProgramEnvParameter4dvARB) - .globl GL_PREFIX(ProgramParameter4fNV) ; .set GL_PREFIX(ProgramParameter4fNV), GL_PREFIX(ProgramEnvParameter4fARB) - .globl GL_PREFIX(ProgramParameter4fvNV) ; .set GL_PREFIX(ProgramParameter4fvNV), GL_PREFIX(ProgramEnvParameter4fvARB) - .globl GL_PREFIX(VertexAttrib1d) ; .set GL_PREFIX(VertexAttrib1d), GL_PREFIX(VertexAttrib1dARB) - .globl GL_PREFIX(VertexAttrib1dv) ; .set GL_PREFIX(VertexAttrib1dv), GL_PREFIX(VertexAttrib1dvARB) - .globl GL_PREFIX(VertexAttrib1f) ; .set GL_PREFIX(VertexAttrib1f), GL_PREFIX(VertexAttrib1fARB) - .globl GL_PREFIX(VertexAttrib1fv) ; .set GL_PREFIX(VertexAttrib1fv), GL_PREFIX(VertexAttrib1fvARB) - .globl GL_PREFIX(VertexAttrib1s) ; .set GL_PREFIX(VertexAttrib1s), GL_PREFIX(VertexAttrib1sARB) - .globl GL_PREFIX(VertexAttrib1sv) ; .set GL_PREFIX(VertexAttrib1sv), GL_PREFIX(VertexAttrib1svARB) - .globl GL_PREFIX(VertexAttrib2d) ; .set GL_PREFIX(VertexAttrib2d), GL_PREFIX(VertexAttrib2dARB) - .globl GL_PREFIX(VertexAttrib2dv) ; .set GL_PREFIX(VertexAttrib2dv), GL_PREFIX(VertexAttrib2dvARB) - .globl GL_PREFIX(VertexAttrib2f) ; .set GL_PREFIX(VertexAttrib2f), GL_PREFIX(VertexAttrib2fARB) - .globl GL_PREFIX(VertexAttrib2fv) ; .set GL_PREFIX(VertexAttrib2fv), GL_PREFIX(VertexAttrib2fvARB) - .globl GL_PREFIX(VertexAttrib2s) ; .set GL_PREFIX(VertexAttrib2s), GL_PREFIX(VertexAttrib2sARB) - .globl GL_PREFIX(VertexAttrib2sv) ; .set GL_PREFIX(VertexAttrib2sv), GL_PREFIX(VertexAttrib2svARB) - .globl GL_PREFIX(VertexAttrib3d) ; .set GL_PREFIX(VertexAttrib3d), GL_PREFIX(VertexAttrib3dARB) - .globl GL_PREFIX(VertexAttrib3dv) ; .set GL_PREFIX(VertexAttrib3dv), GL_PREFIX(VertexAttrib3dvARB) - .globl GL_PREFIX(VertexAttrib3f) ; .set GL_PREFIX(VertexAttrib3f), GL_PREFIX(VertexAttrib3fARB) - .globl GL_PREFIX(VertexAttrib3fv) ; .set GL_PREFIX(VertexAttrib3fv), GL_PREFIX(VertexAttrib3fvARB) - .globl GL_PREFIX(VertexAttrib3s) ; .set GL_PREFIX(VertexAttrib3s), GL_PREFIX(VertexAttrib3sARB) - .globl GL_PREFIX(VertexAttrib3sv) ; .set GL_PREFIX(VertexAttrib3sv), GL_PREFIX(VertexAttrib3svARB) - .globl GL_PREFIX(VertexAttrib4Nbv) ; .set GL_PREFIX(VertexAttrib4Nbv), GL_PREFIX(VertexAttrib4NbvARB) - .globl GL_PREFIX(VertexAttrib4Niv) ; .set GL_PREFIX(VertexAttrib4Niv), GL_PREFIX(VertexAttrib4NivARB) - .globl GL_PREFIX(VertexAttrib4Nsv) ; .set GL_PREFIX(VertexAttrib4Nsv), GL_PREFIX(VertexAttrib4NsvARB) - .globl GL_PREFIX(VertexAttrib4Nub) ; .set GL_PREFIX(VertexAttrib4Nub), GL_PREFIX(VertexAttrib4NubARB) - .globl GL_PREFIX(VertexAttrib4Nubv) ; .set GL_PREFIX(VertexAttrib4Nubv), GL_PREFIX(VertexAttrib4NubvARB) - .globl GL_PREFIX(VertexAttrib4Nuiv) ; .set GL_PREFIX(VertexAttrib4Nuiv), GL_PREFIX(VertexAttrib4NuivARB) - .globl GL_PREFIX(VertexAttrib4Nusv) ; .set GL_PREFIX(VertexAttrib4Nusv), GL_PREFIX(VertexAttrib4NusvARB) - .globl GL_PREFIX(VertexAttrib4bv) ; .set GL_PREFIX(VertexAttrib4bv), GL_PREFIX(VertexAttrib4bvARB) - .globl GL_PREFIX(VertexAttrib4d) ; .set GL_PREFIX(VertexAttrib4d), GL_PREFIX(VertexAttrib4dARB) - .globl GL_PREFIX(VertexAttrib4dv) ; .set GL_PREFIX(VertexAttrib4dv), GL_PREFIX(VertexAttrib4dvARB) - .globl GL_PREFIX(VertexAttrib4f) ; .set GL_PREFIX(VertexAttrib4f), GL_PREFIX(VertexAttrib4fARB) - .globl GL_PREFIX(VertexAttrib4fv) ; .set GL_PREFIX(VertexAttrib4fv), GL_PREFIX(VertexAttrib4fvARB) - .globl GL_PREFIX(VertexAttrib4iv) ; .set GL_PREFIX(VertexAttrib4iv), GL_PREFIX(VertexAttrib4ivARB) - .globl GL_PREFIX(VertexAttrib4s) ; .set GL_PREFIX(VertexAttrib4s), GL_PREFIX(VertexAttrib4sARB) - .globl GL_PREFIX(VertexAttrib4sv) ; .set GL_PREFIX(VertexAttrib4sv), GL_PREFIX(VertexAttrib4svARB) - .globl GL_PREFIX(VertexAttrib4ubv) ; .set GL_PREFIX(VertexAttrib4ubv), GL_PREFIX(VertexAttrib4ubvARB) - .globl GL_PREFIX(VertexAttrib4uiv) ; .set GL_PREFIX(VertexAttrib4uiv), GL_PREFIX(VertexAttrib4uivARB) - .globl GL_PREFIX(VertexAttrib4usv) ; .set GL_PREFIX(VertexAttrib4usv), GL_PREFIX(VertexAttrib4usvARB) - .globl GL_PREFIX(VertexAttribPointer) ; .set GL_PREFIX(VertexAttribPointer), GL_PREFIX(VertexAttribPointerARB) - .globl GL_PREFIX(BindBuffer) ; .set GL_PREFIX(BindBuffer), GL_PREFIX(BindBufferARB) - .globl GL_PREFIX(BufferData) ; .set GL_PREFIX(BufferData), GL_PREFIX(BufferDataARB) - .globl GL_PREFIX(BufferSubData) ; .set GL_PREFIX(BufferSubData), GL_PREFIX(BufferSubDataARB) - .globl GL_PREFIX(DeleteBuffers) ; .set GL_PREFIX(DeleteBuffers), GL_PREFIX(DeleteBuffersARB) - .globl GL_PREFIX(GenBuffers) ; .set GL_PREFIX(GenBuffers), GL_PREFIX(GenBuffersARB) - .globl GL_PREFIX(GetBufferParameteriv) ; .set GL_PREFIX(GetBufferParameteriv), GL_PREFIX(GetBufferParameterivARB) - .globl GL_PREFIX(GetBufferPointerv) ; .set GL_PREFIX(GetBufferPointerv), GL_PREFIX(GetBufferPointervARB) - .globl GL_PREFIX(GetBufferSubData) ; .set GL_PREFIX(GetBufferSubData), GL_PREFIX(GetBufferSubDataARB) - .globl GL_PREFIX(IsBuffer) ; .set GL_PREFIX(IsBuffer), GL_PREFIX(IsBufferARB) - .globl GL_PREFIX(MapBuffer) ; .set GL_PREFIX(MapBuffer), GL_PREFIX(MapBufferARB) - .globl GL_PREFIX(UnmapBuffer) ; .set GL_PREFIX(UnmapBuffer), GL_PREFIX(UnmapBufferARB) - .globl GL_PREFIX(BeginQuery) ; .set GL_PREFIX(BeginQuery), GL_PREFIX(BeginQueryARB) - .globl GL_PREFIX(DeleteQueries) ; .set GL_PREFIX(DeleteQueries), GL_PREFIX(DeleteQueriesARB) - .globl GL_PREFIX(EndQuery) ; .set GL_PREFIX(EndQuery), GL_PREFIX(EndQueryARB) - .globl GL_PREFIX(GenQueries) ; .set GL_PREFIX(GenQueries), GL_PREFIX(GenQueriesARB) - .globl GL_PREFIX(GetQueryObjectiv) ; .set GL_PREFIX(GetQueryObjectiv), GL_PREFIX(GetQueryObjectivARB) - .globl GL_PREFIX(GetQueryObjectuiv) ; .set GL_PREFIX(GetQueryObjectuiv), GL_PREFIX(GetQueryObjectuivARB) - .globl GL_PREFIX(GetQueryiv) ; .set GL_PREFIX(GetQueryiv), GL_PREFIX(GetQueryivARB) - .globl GL_PREFIX(IsQuery) ; .set GL_PREFIX(IsQuery), GL_PREFIX(IsQueryARB) - .globl GL_PREFIX(CompileShader) ; .set GL_PREFIX(CompileShader), GL_PREFIX(CompileShaderARB) - .globl GL_PREFIX(GetActiveUniform) ; .set GL_PREFIX(GetActiveUniform), GL_PREFIX(GetActiveUniformARB) - .globl GL_PREFIX(GetShaderSource) ; .set GL_PREFIX(GetShaderSource), GL_PREFIX(GetShaderSourceARB) - .globl GL_PREFIX(GetUniformLocation) ; .set GL_PREFIX(GetUniformLocation), GL_PREFIX(GetUniformLocationARB) - .globl GL_PREFIX(GetUniformfv) ; .set GL_PREFIX(GetUniformfv), GL_PREFIX(GetUniformfvARB) - .globl GL_PREFIX(GetUniformiv) ; .set GL_PREFIX(GetUniformiv), GL_PREFIX(GetUniformivARB) - .globl GL_PREFIX(LinkProgram) ; .set GL_PREFIX(LinkProgram), GL_PREFIX(LinkProgramARB) - .globl GL_PREFIX(ShaderSource) ; .set GL_PREFIX(ShaderSource), GL_PREFIX(ShaderSourceARB) - .globl GL_PREFIX(Uniform1f) ; .set GL_PREFIX(Uniform1f), GL_PREFIX(Uniform1fARB) - .globl GL_PREFIX(Uniform1fv) ; .set GL_PREFIX(Uniform1fv), GL_PREFIX(Uniform1fvARB) - .globl GL_PREFIX(Uniform1i) ; .set GL_PREFIX(Uniform1i), GL_PREFIX(Uniform1iARB) - .globl GL_PREFIX(Uniform1iv) ; .set GL_PREFIX(Uniform1iv), GL_PREFIX(Uniform1ivARB) - .globl GL_PREFIX(Uniform2f) ; .set GL_PREFIX(Uniform2f), GL_PREFIX(Uniform2fARB) - .globl GL_PREFIX(Uniform2fv) ; .set GL_PREFIX(Uniform2fv), GL_PREFIX(Uniform2fvARB) - .globl GL_PREFIX(Uniform2i) ; .set GL_PREFIX(Uniform2i), GL_PREFIX(Uniform2iARB) - .globl GL_PREFIX(Uniform2iv) ; .set GL_PREFIX(Uniform2iv), GL_PREFIX(Uniform2ivARB) - .globl GL_PREFIX(Uniform3f) ; .set GL_PREFIX(Uniform3f), GL_PREFIX(Uniform3fARB) - .globl GL_PREFIX(Uniform3fv) ; .set GL_PREFIX(Uniform3fv), GL_PREFIX(Uniform3fvARB) - .globl GL_PREFIX(Uniform3i) ; .set GL_PREFIX(Uniform3i), GL_PREFIX(Uniform3iARB) - .globl GL_PREFIX(Uniform3iv) ; .set GL_PREFIX(Uniform3iv), GL_PREFIX(Uniform3ivARB) - .globl GL_PREFIX(Uniform4f) ; .set GL_PREFIX(Uniform4f), GL_PREFIX(Uniform4fARB) - .globl GL_PREFIX(Uniform4fv) ; .set GL_PREFIX(Uniform4fv), GL_PREFIX(Uniform4fvARB) - .globl GL_PREFIX(Uniform4i) ; .set GL_PREFIX(Uniform4i), GL_PREFIX(Uniform4iARB) - .globl GL_PREFIX(Uniform4iv) ; .set GL_PREFIX(Uniform4iv), GL_PREFIX(Uniform4ivARB) - .globl GL_PREFIX(UniformMatrix2fv) ; .set GL_PREFIX(UniformMatrix2fv), GL_PREFIX(UniformMatrix2fvARB) - .globl GL_PREFIX(UniformMatrix3fv) ; .set GL_PREFIX(UniformMatrix3fv), GL_PREFIX(UniformMatrix3fvARB) - .globl GL_PREFIX(UniformMatrix4fv) ; .set GL_PREFIX(UniformMatrix4fv), GL_PREFIX(UniformMatrix4fvARB) - .globl GL_PREFIX(UseProgram) ; .set GL_PREFIX(UseProgram), GL_PREFIX(UseProgramObjectARB) - .globl GL_PREFIX(ValidateProgram) ; .set GL_PREFIX(ValidateProgram), GL_PREFIX(ValidateProgramARB) - .globl GL_PREFIX(BindAttribLocation) ; .set GL_PREFIX(BindAttribLocation), GL_PREFIX(BindAttribLocationARB) - .globl GL_PREFIX(GetActiveAttrib) ; .set GL_PREFIX(GetActiveAttrib), GL_PREFIX(GetActiveAttribARB) - .globl GL_PREFIX(GetAttribLocation) ; .set GL_PREFIX(GetAttribLocation), GL_PREFIX(GetAttribLocationARB) - .globl GL_PREFIX(DrawBuffers) ; .set GL_PREFIX(DrawBuffers), GL_PREFIX(DrawBuffersARB) - .globl GL_PREFIX(DrawBuffersATI) ; .set GL_PREFIX(DrawBuffersATI), GL_PREFIX(DrawBuffersARB) - .globl GL_PREFIX(DrawBuffersNV) ; .set GL_PREFIX(DrawBuffersNV), GL_PREFIX(DrawBuffersARB) - .globl GL_PREFIX(DrawArraysInstancedEXT) ; .set GL_PREFIX(DrawArraysInstancedEXT), GL_PREFIX(DrawArraysInstancedARB) - .globl GL_PREFIX(DrawArraysInstanced) ; .set GL_PREFIX(DrawArraysInstanced), GL_PREFIX(DrawArraysInstancedARB) - .globl GL_PREFIX(DrawElementsInstancedEXT) ; .set GL_PREFIX(DrawElementsInstancedEXT), GL_PREFIX(DrawElementsInstancedARB) - .globl GL_PREFIX(DrawElementsInstanced) ; .set GL_PREFIX(DrawElementsInstanced), GL_PREFIX(DrawElementsInstancedARB) - .globl GL_PREFIX(RenderbufferStorageMultisampleEXT) ; .set GL_PREFIX(RenderbufferStorageMultisampleEXT), GL_PREFIX(RenderbufferStorageMultisample) - .globl GL_PREFIX(BlendEquationSeparateIndexedAMD) ; .set GL_PREFIX(BlendEquationSeparateIndexedAMD), GL_PREFIX(BlendEquationSeparateiARB) - .globl GL_PREFIX(BlendEquationIndexedAMD) ; .set GL_PREFIX(BlendEquationIndexedAMD), GL_PREFIX(BlendEquationiARB) - .globl GL_PREFIX(BlendFuncSeparateIndexedAMD) ; .set GL_PREFIX(BlendFuncSeparateIndexedAMD), GL_PREFIX(BlendFuncSeparateiARB) - .globl GL_PREFIX(BlendFuncIndexedAMD) ; .set GL_PREFIX(BlendFuncIndexedAMD), GL_PREFIX(BlendFunciARB) - .globl GL_PREFIX(PointParameterf) ; .set GL_PREFIX(PointParameterf), GL_PREFIX(PointParameterfEXT) - .globl GL_PREFIX(PointParameterfARB) ; .set GL_PREFIX(PointParameterfARB), GL_PREFIX(PointParameterfEXT) - .globl GL_PREFIX(PointParameterfv) ; .set GL_PREFIX(PointParameterfv), GL_PREFIX(PointParameterfvEXT) - .globl GL_PREFIX(PointParameterfvARB) ; .set GL_PREFIX(PointParameterfvARB), GL_PREFIX(PointParameterfvEXT) - .globl GL_PREFIX(SecondaryColor3b) ; .set GL_PREFIX(SecondaryColor3b), GL_PREFIX(SecondaryColor3bEXT) - .globl GL_PREFIX(SecondaryColor3bv) ; .set GL_PREFIX(SecondaryColor3bv), GL_PREFIX(SecondaryColor3bvEXT) - .globl GL_PREFIX(SecondaryColor3d) ; .set GL_PREFIX(SecondaryColor3d), GL_PREFIX(SecondaryColor3dEXT) - .globl GL_PREFIX(SecondaryColor3dv) ; .set GL_PREFIX(SecondaryColor3dv), GL_PREFIX(SecondaryColor3dvEXT) - .globl GL_PREFIX(SecondaryColor3f) ; .set GL_PREFIX(SecondaryColor3f), GL_PREFIX(SecondaryColor3fEXT) - .globl GL_PREFIX(SecondaryColor3fv) ; .set GL_PREFIX(SecondaryColor3fv), GL_PREFIX(SecondaryColor3fvEXT) - .globl GL_PREFIX(SecondaryColor3i) ; .set GL_PREFIX(SecondaryColor3i), GL_PREFIX(SecondaryColor3iEXT) - .globl GL_PREFIX(SecondaryColor3iv) ; .set GL_PREFIX(SecondaryColor3iv), GL_PREFIX(SecondaryColor3ivEXT) - .globl GL_PREFIX(SecondaryColor3s) ; .set GL_PREFIX(SecondaryColor3s), GL_PREFIX(SecondaryColor3sEXT) - .globl GL_PREFIX(SecondaryColor3sv) ; .set GL_PREFIX(SecondaryColor3sv), GL_PREFIX(SecondaryColor3svEXT) - .globl GL_PREFIX(SecondaryColor3ub) ; .set GL_PREFIX(SecondaryColor3ub), GL_PREFIX(SecondaryColor3ubEXT) - .globl GL_PREFIX(SecondaryColor3ubv) ; .set GL_PREFIX(SecondaryColor3ubv), GL_PREFIX(SecondaryColor3ubvEXT) - .globl GL_PREFIX(SecondaryColor3ui) ; .set GL_PREFIX(SecondaryColor3ui), GL_PREFIX(SecondaryColor3uiEXT) - .globl GL_PREFIX(SecondaryColor3uiv) ; .set GL_PREFIX(SecondaryColor3uiv), GL_PREFIX(SecondaryColor3uivEXT) - .globl GL_PREFIX(SecondaryColor3us) ; .set GL_PREFIX(SecondaryColor3us), GL_PREFIX(SecondaryColor3usEXT) - .globl GL_PREFIX(SecondaryColor3usv) ; .set GL_PREFIX(SecondaryColor3usv), GL_PREFIX(SecondaryColor3usvEXT) - .globl GL_PREFIX(SecondaryColorPointer) ; .set GL_PREFIX(SecondaryColorPointer), GL_PREFIX(SecondaryColorPointerEXT) - .globl GL_PREFIX(MultiDrawArrays) ; .set GL_PREFIX(MultiDrawArrays), GL_PREFIX(MultiDrawArraysEXT) - .globl GL_PREFIX(MultiDrawElements) ; .set GL_PREFIX(MultiDrawElements), GL_PREFIX(MultiDrawElementsEXT) - .globl GL_PREFIX(FogCoordPointer) ; .set GL_PREFIX(FogCoordPointer), GL_PREFIX(FogCoordPointerEXT) - .globl GL_PREFIX(FogCoordd) ; .set GL_PREFIX(FogCoordd), GL_PREFIX(FogCoorddEXT) - .globl GL_PREFIX(FogCoorddv) ; .set GL_PREFIX(FogCoorddv), GL_PREFIX(FogCoorddvEXT) - .globl GL_PREFIX(FogCoordf) ; .set GL_PREFIX(FogCoordf), GL_PREFIX(FogCoordfEXT) - .globl GL_PREFIX(FogCoordfv) ; .set GL_PREFIX(FogCoordfv), GL_PREFIX(FogCoordfvEXT) - .globl GL_PREFIX(BlendFuncSeparate) ; .set GL_PREFIX(BlendFuncSeparate), GL_PREFIX(BlendFuncSeparateEXT) - .globl GL_PREFIX(WindowPos2d) ; .set GL_PREFIX(WindowPos2d), GL_PREFIX(WindowPos2dMESA) - .globl GL_PREFIX(WindowPos2dARB) ; .set GL_PREFIX(WindowPos2dARB), GL_PREFIX(WindowPos2dMESA) - .globl GL_PREFIX(WindowPos2dv) ; .set GL_PREFIX(WindowPos2dv), GL_PREFIX(WindowPos2dvMESA) - .globl GL_PREFIX(WindowPos2dvARB) ; .set GL_PREFIX(WindowPos2dvARB), GL_PREFIX(WindowPos2dvMESA) - .globl GL_PREFIX(WindowPos2f) ; .set GL_PREFIX(WindowPos2f), GL_PREFIX(WindowPos2fMESA) - .globl GL_PREFIX(WindowPos2fARB) ; .set GL_PREFIX(WindowPos2fARB), GL_PREFIX(WindowPos2fMESA) - .globl GL_PREFIX(WindowPos2fv) ; .set GL_PREFIX(WindowPos2fv), GL_PREFIX(WindowPos2fvMESA) - .globl GL_PREFIX(WindowPos2fvARB) ; .set GL_PREFIX(WindowPos2fvARB), GL_PREFIX(WindowPos2fvMESA) - .globl GL_PREFIX(WindowPos2i) ; .set GL_PREFIX(WindowPos2i), GL_PREFIX(WindowPos2iMESA) - .globl GL_PREFIX(WindowPos2iARB) ; .set GL_PREFIX(WindowPos2iARB), GL_PREFIX(WindowPos2iMESA) - .globl GL_PREFIX(WindowPos2iv) ; .set GL_PREFIX(WindowPos2iv), GL_PREFIX(WindowPos2ivMESA) - .globl GL_PREFIX(WindowPos2ivARB) ; .set GL_PREFIX(WindowPos2ivARB), GL_PREFIX(WindowPos2ivMESA) - .globl GL_PREFIX(WindowPos2s) ; .set GL_PREFIX(WindowPos2s), GL_PREFIX(WindowPos2sMESA) - .globl GL_PREFIX(WindowPos2sARB) ; .set GL_PREFIX(WindowPos2sARB), GL_PREFIX(WindowPos2sMESA) - .globl GL_PREFIX(WindowPos2sv) ; .set GL_PREFIX(WindowPos2sv), GL_PREFIX(WindowPos2svMESA) - .globl GL_PREFIX(WindowPos2svARB) ; .set GL_PREFIX(WindowPos2svARB), GL_PREFIX(WindowPos2svMESA) - .globl GL_PREFIX(WindowPos3d) ; .set GL_PREFIX(WindowPos3d), GL_PREFIX(WindowPos3dMESA) - .globl GL_PREFIX(WindowPos3dARB) ; .set GL_PREFIX(WindowPos3dARB), GL_PREFIX(WindowPos3dMESA) - .globl GL_PREFIX(WindowPos3dv) ; .set GL_PREFIX(WindowPos3dv), GL_PREFIX(WindowPos3dvMESA) - .globl GL_PREFIX(WindowPos3dvARB) ; .set GL_PREFIX(WindowPos3dvARB), GL_PREFIX(WindowPos3dvMESA) - .globl GL_PREFIX(WindowPos3f) ; .set GL_PREFIX(WindowPos3f), GL_PREFIX(WindowPos3fMESA) - .globl GL_PREFIX(WindowPos3fARB) ; .set GL_PREFIX(WindowPos3fARB), GL_PREFIX(WindowPos3fMESA) - .globl GL_PREFIX(WindowPos3fv) ; .set GL_PREFIX(WindowPos3fv), GL_PREFIX(WindowPos3fvMESA) - .globl GL_PREFIX(WindowPos3fvARB) ; .set GL_PREFIX(WindowPos3fvARB), GL_PREFIX(WindowPos3fvMESA) - .globl GL_PREFIX(WindowPos3i) ; .set GL_PREFIX(WindowPos3i), GL_PREFIX(WindowPos3iMESA) - .globl GL_PREFIX(WindowPos3iARB) ; .set GL_PREFIX(WindowPos3iARB), GL_PREFIX(WindowPos3iMESA) - .globl GL_PREFIX(WindowPos3iv) ; .set GL_PREFIX(WindowPos3iv), GL_PREFIX(WindowPos3ivMESA) - .globl GL_PREFIX(WindowPos3ivARB) ; .set GL_PREFIX(WindowPos3ivARB), GL_PREFIX(WindowPos3ivMESA) - .globl GL_PREFIX(WindowPos3s) ; .set GL_PREFIX(WindowPos3s), GL_PREFIX(WindowPos3sMESA) - .globl GL_PREFIX(WindowPos3sARB) ; .set GL_PREFIX(WindowPos3sARB), GL_PREFIX(WindowPos3sMESA) - .globl GL_PREFIX(WindowPos3sv) ; .set GL_PREFIX(WindowPos3sv), GL_PREFIX(WindowPos3svMESA) - .globl GL_PREFIX(WindowPos3svARB) ; .set GL_PREFIX(WindowPos3svARB), GL_PREFIX(WindowPos3svMESA) - .globl GL_PREFIX(BindProgramARB) ; .set GL_PREFIX(BindProgramARB), GL_PREFIX(BindProgramNV) - .globl GL_PREFIX(DeleteProgramsARB) ; .set GL_PREFIX(DeleteProgramsARB), GL_PREFIX(DeleteProgramsNV) - .globl GL_PREFIX(GenProgramsARB) ; .set GL_PREFIX(GenProgramsARB), GL_PREFIX(GenProgramsNV) - .globl GL_PREFIX(GetVertexAttribPointerv) ; .set GL_PREFIX(GetVertexAttribPointerv), GL_PREFIX(GetVertexAttribPointervNV) - .globl GL_PREFIX(GetVertexAttribPointervARB) ; .set GL_PREFIX(GetVertexAttribPointervARB), GL_PREFIX(GetVertexAttribPointervNV) - .globl GL_PREFIX(IsProgramARB) ; .set GL_PREFIX(IsProgramARB), GL_PREFIX(IsProgramNV) - .globl GL_PREFIX(PointParameteri) ; .set GL_PREFIX(PointParameteri), GL_PREFIX(PointParameteriNV) - .globl GL_PREFIX(PointParameteriv) ; .set GL_PREFIX(PointParameteriv), GL_PREFIX(PointParameterivNV) - .globl GL_PREFIX(DeleteVertexArrays) ; .set GL_PREFIX(DeleteVertexArrays), GL_PREFIX(_dispatch_stub_867) - .globl GL_PREFIX(IsVertexArray) ; .set GL_PREFIX(IsVertexArray), GL_PREFIX(_dispatch_stub_869) - .globl GL_PREFIX(PrimitiveRestartIndex) ; .set GL_PREFIX(PrimitiveRestartIndex), GL_PREFIX(PrimitiveRestartIndexNV) - .globl GL_PREFIX(BlendEquationSeparate) ; .set GL_PREFIX(BlendEquationSeparate), GL_PREFIX(_dispatch_stub_879) - .globl GL_PREFIX(BindFramebuffer) ; .set GL_PREFIX(BindFramebuffer), GL_PREFIX(BindFramebufferEXT) - .globl GL_PREFIX(BindRenderbuffer) ; .set GL_PREFIX(BindRenderbuffer), GL_PREFIX(BindRenderbufferEXT) - .globl GL_PREFIX(CheckFramebufferStatus) ; .set GL_PREFIX(CheckFramebufferStatus), GL_PREFIX(CheckFramebufferStatusEXT) - .globl GL_PREFIX(DeleteFramebuffers) ; .set GL_PREFIX(DeleteFramebuffers), GL_PREFIX(DeleteFramebuffersEXT) - .globl GL_PREFIX(DeleteRenderbuffers) ; .set GL_PREFIX(DeleteRenderbuffers), GL_PREFIX(DeleteRenderbuffersEXT) - .globl GL_PREFIX(FramebufferRenderbuffer) ; .set GL_PREFIX(FramebufferRenderbuffer), GL_PREFIX(FramebufferRenderbufferEXT) - .globl GL_PREFIX(FramebufferTexture1D) ; .set GL_PREFIX(FramebufferTexture1D), GL_PREFIX(FramebufferTexture1DEXT) - .globl GL_PREFIX(FramebufferTexture2D) ; .set GL_PREFIX(FramebufferTexture2D), GL_PREFIX(FramebufferTexture2DEXT) - .globl GL_PREFIX(FramebufferTexture3D) ; .set GL_PREFIX(FramebufferTexture3D), GL_PREFIX(FramebufferTexture3DEXT) - .globl GL_PREFIX(GenFramebuffers) ; .set GL_PREFIX(GenFramebuffers), GL_PREFIX(GenFramebuffersEXT) - .globl GL_PREFIX(GenRenderbuffers) ; .set GL_PREFIX(GenRenderbuffers), GL_PREFIX(GenRenderbuffersEXT) - .globl GL_PREFIX(GenerateMipmap) ; .set GL_PREFIX(GenerateMipmap), GL_PREFIX(GenerateMipmapEXT) - .globl GL_PREFIX(GetFramebufferAttachmentParameteriv) ; .set GL_PREFIX(GetFramebufferAttachmentParameteriv), GL_PREFIX(GetFramebufferAttachmentParameterivEXT) - .globl GL_PREFIX(GetRenderbufferParameteriv) ; .set GL_PREFIX(GetRenderbufferParameteriv), GL_PREFIX(GetRenderbufferParameterivEXT) - .globl GL_PREFIX(IsFramebuffer) ; .set GL_PREFIX(IsFramebuffer), GL_PREFIX(IsFramebufferEXT) - .globl GL_PREFIX(IsRenderbuffer) ; .set GL_PREFIX(IsRenderbuffer), GL_PREFIX(IsRenderbufferEXT) - .globl GL_PREFIX(RenderbufferStorage) ; .set GL_PREFIX(RenderbufferStorage), GL_PREFIX(RenderbufferStorageEXT) - .globl GL_PREFIX(BlitFramebuffer) ; .set GL_PREFIX(BlitFramebuffer), GL_PREFIX(_dispatch_stub_897) - .globl GL_PREFIX(BindFragDataLocation) ; .set GL_PREFIX(BindFragDataLocation), GL_PREFIX(BindFragDataLocationEXT) - .globl GL_PREFIX(GetFragDataLocation) ; .set GL_PREFIX(GetFragDataLocation), GL_PREFIX(GetFragDataLocationEXT) - .globl GL_PREFIX(GetUniformuiv) ; .set GL_PREFIX(GetUniformuiv), GL_PREFIX(GetUniformuivEXT) - .globl GL_PREFIX(GetVertexAttribIiv) ; .set GL_PREFIX(GetVertexAttribIiv), GL_PREFIX(GetVertexAttribIivEXT) - .globl GL_PREFIX(GetVertexAttribIuiv) ; .set GL_PREFIX(GetVertexAttribIuiv), GL_PREFIX(GetVertexAttribIuivEXT) - .globl GL_PREFIX(Uniform1ui) ; .set GL_PREFIX(Uniform1ui), GL_PREFIX(Uniform1uiEXT) - .globl GL_PREFIX(Uniform1uiv) ; .set GL_PREFIX(Uniform1uiv), GL_PREFIX(Uniform1uivEXT) - .globl GL_PREFIX(Uniform2ui) ; .set GL_PREFIX(Uniform2ui), GL_PREFIX(Uniform2uiEXT) - .globl GL_PREFIX(Uniform2uiv) ; .set GL_PREFIX(Uniform2uiv), GL_PREFIX(Uniform2uivEXT) - .globl GL_PREFIX(Uniform3ui) ; .set GL_PREFIX(Uniform3ui), GL_PREFIX(Uniform3uiEXT) - .globl GL_PREFIX(Uniform3uiv) ; .set GL_PREFIX(Uniform3uiv), GL_PREFIX(Uniform3uivEXT) - .globl GL_PREFIX(Uniform4ui) ; .set GL_PREFIX(Uniform4ui), GL_PREFIX(Uniform4uiEXT) - .globl GL_PREFIX(Uniform4uiv) ; .set GL_PREFIX(Uniform4uiv), GL_PREFIX(Uniform4uivEXT) - .globl GL_PREFIX(VertexAttribI1i) ; .set GL_PREFIX(VertexAttribI1i), GL_PREFIX(VertexAttribI1iEXT) - .globl GL_PREFIX(VertexAttribI1iv) ; .set GL_PREFIX(VertexAttribI1iv), GL_PREFIX(VertexAttribI1ivEXT) - .globl GL_PREFIX(VertexAttribI1ui) ; .set GL_PREFIX(VertexAttribI1ui), GL_PREFIX(VertexAttribI1uiEXT) - .globl GL_PREFIX(VertexAttribI1uiv) ; .set GL_PREFIX(VertexAttribI1uiv), GL_PREFIX(VertexAttribI1uivEXT) - .globl GL_PREFIX(VertexAttribI2i) ; .set GL_PREFIX(VertexAttribI2i), GL_PREFIX(VertexAttribI2iEXT) - .globl GL_PREFIX(VertexAttribI2iv) ; .set GL_PREFIX(VertexAttribI2iv), GL_PREFIX(VertexAttribI2ivEXT) - .globl GL_PREFIX(VertexAttribI2ui) ; .set GL_PREFIX(VertexAttribI2ui), GL_PREFIX(VertexAttribI2uiEXT) - .globl GL_PREFIX(VertexAttribI2uiv) ; .set GL_PREFIX(VertexAttribI2uiv), GL_PREFIX(VertexAttribI2uivEXT) - .globl GL_PREFIX(VertexAttribI3i) ; .set GL_PREFIX(VertexAttribI3i), GL_PREFIX(VertexAttribI3iEXT) - .globl GL_PREFIX(VertexAttribI3iv) ; .set GL_PREFIX(VertexAttribI3iv), GL_PREFIX(VertexAttribI3ivEXT) - .globl GL_PREFIX(VertexAttribI3ui) ; .set GL_PREFIX(VertexAttribI3ui), GL_PREFIX(VertexAttribI3uiEXT) - .globl GL_PREFIX(VertexAttribI3uiv) ; .set GL_PREFIX(VertexAttribI3uiv), GL_PREFIX(VertexAttribI3uivEXT) - .globl GL_PREFIX(VertexAttribI4bv) ; .set GL_PREFIX(VertexAttribI4bv), GL_PREFIX(VertexAttribI4bvEXT) - .globl GL_PREFIX(VertexAttribI4i) ; .set GL_PREFIX(VertexAttribI4i), GL_PREFIX(VertexAttribI4iEXT) - .globl GL_PREFIX(VertexAttribI4iv) ; .set GL_PREFIX(VertexAttribI4iv), GL_PREFIX(VertexAttribI4ivEXT) - .globl GL_PREFIX(VertexAttribI4sv) ; .set GL_PREFIX(VertexAttribI4sv), GL_PREFIX(VertexAttribI4svEXT) - .globl GL_PREFIX(VertexAttribI4ubv) ; .set GL_PREFIX(VertexAttribI4ubv), GL_PREFIX(VertexAttribI4ubvEXT) - .globl GL_PREFIX(VertexAttribI4ui) ; .set GL_PREFIX(VertexAttribI4ui), GL_PREFIX(VertexAttribI4uiEXT) - .globl GL_PREFIX(VertexAttribI4uiv) ; .set GL_PREFIX(VertexAttribI4uiv), GL_PREFIX(VertexAttribI4uivEXT) - .globl GL_PREFIX(VertexAttribI4usv) ; .set GL_PREFIX(VertexAttribI4usv), GL_PREFIX(VertexAttribI4usvEXT) - .globl GL_PREFIX(VertexAttribIPointer) ; .set GL_PREFIX(VertexAttribIPointer), GL_PREFIX(VertexAttribIPointerEXT) - .globl GL_PREFIX(FramebufferTextureLayer) ; .set GL_PREFIX(FramebufferTextureLayer), GL_PREFIX(FramebufferTextureLayerEXT) - .globl GL_PREFIX(FramebufferTextureLayerARB) ; .set GL_PREFIX(FramebufferTextureLayerARB), GL_PREFIX(FramebufferTextureLayerEXT) - .globl GL_PREFIX(ColorMaski) ; .set GL_PREFIX(ColorMaski), GL_PREFIX(ColorMaskIndexedEXT) - .globl GL_PREFIX(Disablei) ; .set GL_PREFIX(Disablei), GL_PREFIX(DisableIndexedEXT) - .globl GL_PREFIX(Enablei) ; .set GL_PREFIX(Enablei), GL_PREFIX(EnableIndexedEXT) - .globl GL_PREFIX(GetBooleani_v) ; .set GL_PREFIX(GetBooleani_v), GL_PREFIX(GetBooleanIndexedvEXT) - .globl GL_PREFIX(GetIntegeri_v) ; .set GL_PREFIX(GetIntegeri_v), GL_PREFIX(GetIntegerIndexedvEXT) - .globl GL_PREFIX(IsEnabledi) ; .set GL_PREFIX(IsEnabledi), GL_PREFIX(IsEnabledIndexedEXT) - .globl GL_PREFIX(GetTexParameterIiv) ; .set GL_PREFIX(GetTexParameterIiv), GL_PREFIX(GetTexParameterIivEXT) - .globl GL_PREFIX(GetTexParameterIuiv) ; .set GL_PREFIX(GetTexParameterIuiv), GL_PREFIX(GetTexParameterIuivEXT) - .globl GL_PREFIX(TexParameterIiv) ; .set GL_PREFIX(TexParameterIiv), GL_PREFIX(TexParameterIivEXT) - .globl GL_PREFIX(TexParameterIuiv) ; .set GL_PREFIX(TexParameterIuiv), GL_PREFIX(TexParameterIuivEXT) - .globl GL_PREFIX(BeginConditionalRender) ; .set GL_PREFIX(BeginConditionalRender), GL_PREFIX(BeginConditionalRenderNV) - .globl GL_PREFIX(EndConditionalRender) ; .set GL_PREFIX(EndConditionalRender), GL_PREFIX(EndConditionalRenderNV) - .globl GL_PREFIX(BeginTransformFeedback) ; .set GL_PREFIX(BeginTransformFeedback), GL_PREFIX(BeginTransformFeedbackEXT) - .globl GL_PREFIX(BindBufferBase) ; .set GL_PREFIX(BindBufferBase), GL_PREFIX(BindBufferBaseEXT) - .globl GL_PREFIX(BindBufferRange) ; .set GL_PREFIX(BindBufferRange), GL_PREFIX(BindBufferRangeEXT) - .globl GL_PREFIX(EndTransformFeedback) ; .set GL_PREFIX(EndTransformFeedback), GL_PREFIX(EndTransformFeedbackEXT) - .globl GL_PREFIX(GetTransformFeedbackVarying) ; .set GL_PREFIX(GetTransformFeedbackVarying), GL_PREFIX(GetTransformFeedbackVaryingEXT) - .globl GL_PREFIX(TransformFeedbackVaryings) ; .set GL_PREFIX(TransformFeedbackVaryings), GL_PREFIX(TransformFeedbackVaryingsEXT) - .globl GL_PREFIX(ProvokingVertex) ; .set GL_PREFIX(ProvokingVertex), GL_PREFIX(ProvokingVertexEXT) - -#if defined(GLX_USE_TLS) && defined(__linux__) - .section ".note.ABI-tag", "a" - .p2align 2 - .long 1f - 0f /* name length */ - .long 3f - 2f /* data length */ - .long 1 /* note length */ -0: .asciz "GNU" /* vendor name */ -1: .p2align 2 -2: .long 0 /* note data: the ABI tag */ - .long 2,4,20 /* Minimum kernel version w/TLS */ -3: .p2align 2 /* pad out section */ -#endif /* GLX_USE_TLS */ - -#if defined (__ELF__) && defined (__linux__) - .section .note.GNU-stack,"",%progbits -#endif diff --git a/dll/opengl/mesa/src/mapi/glapi/glapi_x86.S b/dll/opengl/mesa/src/mapi/glapi/glapi_x86.S deleted file mode 100644 index ce285a710bb..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/glapi_x86.S +++ /dev/null @@ -1,1522 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by gl_x86_asm.py (from Mesa) script */ - -/* - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * (C) Copyright IBM Corporation 2004, 2005 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL, IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include "x86/assyntax.h" - -#if defined(STDCALL_API) -# if defined(USE_MGL_NAMESPACE) -# define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n2)) -# else -# define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n2)) -# endif -#else -# if defined(USE_MGL_NAMESPACE) -# define GL_PREFIX(n,n2) GLNAME(CONCAT(mgl,n)) -# define _glapi_Dispatch _mglapi_Dispatch -# else -# define GL_PREFIX(n,n2) GLNAME(CONCAT(gl,n)) -# endif -#endif - -#define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX)) - -#if defined(GNU_ASSEMBLER) && !defined(__DJGPP__) && !defined(__MINGW32__) && !defined(__APPLE__) -#define GLOBL_FN(x) GLOBL x ; .type x, @function -#else -#define GLOBL_FN(x) GLOBL x -#endif - -#if defined(PTHREADS) || defined(WIN32) -# define THREADS -#endif - -#ifdef GLX_USE_TLS - -#ifdef GLX_X86_READONLY_TEXT -# define CTX_INSNS MOV_L(GS:(EAX), EAX) -#else -# define CTX_INSNS NOP /* Pad for init_glapi_relocs() */ -#endif - -# define GL_STUB(fn,off,fn_alt) \ -ALIGNTEXT16; \ -GLOBL_FN(GL_PREFIX(fn, fn_alt)); \ -GL_PREFIX(fn, fn_alt): \ - CALL(_x86_get_dispatch) ; \ - CTX_INSNS ; \ - JMP(GL_OFFSET(off)) - -#elif defined(PTHREADS) -# define GL_STUB(fn,off,fn_alt) \ -ALIGNTEXT16; \ -GLOBL_FN(GL_PREFIX(fn, fn_alt)); \ -GL_PREFIX(fn, fn_alt): \ - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) ; \ - TEST_L(EAX, EAX) ; \ - JE(1f) ; \ - JMP(GL_OFFSET(off)) ; \ -1: CALL(_x86_get_dispatch) ; \ - JMP(GL_OFFSET(off)) -#elif defined(THREADS) -# define GL_STUB(fn,off,fn_alt) \ -ALIGNTEXT16; \ -GLOBL_FN(GL_PREFIX(fn, fn_alt)); \ -GL_PREFIX(fn, fn_alt): \ - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) ; \ - TEST_L(EAX, EAX) ; \ - JE(1f) ; \ - JMP(GL_OFFSET(off)) ; \ -1: CALL(GLNAME(_glapi_get_dispatch)) ; \ - JMP(GL_OFFSET(off)) -#else /* Non-threaded version. */ -# define GL_STUB(fn,off,fn_alt) \ -ALIGNTEXT16; \ -GLOBL_FN(GL_PREFIX(fn, fn_alt)); \ -GL_PREFIX(fn, fn_alt): \ - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) ; \ - JMP(GL_OFFSET(off)) -#endif - -#ifdef HAVE_ALIAS -# define GL_STUB_ALIAS(fn,off,fn_alt,alias,alias_alt) \ - .globl GL_PREFIX(fn, fn_alt) ; \ - .set GL_PREFIX(fn, fn_alt), GL_PREFIX(alias, alias_alt) -#else -# define GL_STUB_ALIAS(fn,off,fn_alt,alias,alias_alt) \ - GL_STUB(fn, off, fn_alt) -#endif - -SEG_TEXT - -#ifdef GLX_USE_TLS - - GLOBL GLNAME(_x86_get_dispatch) - HIDDEN(GLNAME(_x86_get_dispatch)) -ALIGNTEXT16 -GLNAME(_x86_get_dispatch): - call 1f -1: popl %eax - addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %eax - movl _glapi_tls_Dispatch@GOTNTPOFF(%eax), %eax - ret - -#elif defined(PTHREADS) -EXTERN GLNAME(_glapi_Dispatch) -EXTERN GLNAME(_gl_DispatchTSD) -EXTERN GLNAME(pthread_getspecific) - -ALIGNTEXT16 -GLNAME(_x86_get_dispatch): - SUB_L(CONST(24), ESP) - PUSH_L(GLNAME(_gl_DispatchTSD)) - CALL(GLNAME(pthread_getspecific)) - ADD_L(CONST(28), ESP) - RET -#elif defined(THREADS) -EXTERN GLNAME(_glapi_get_dispatch) -#endif - -#if defined( GLX_USE_TLS ) && !defined( GLX_X86_READONLY_TEXT ) - .section wtext, "awx", @progbits -#endif /* defined( GLX_USE_TLS ) */ - - ALIGNTEXT16 - GLOBL GLNAME(gl_dispatch_functions_start) - HIDDEN(GLNAME(gl_dispatch_functions_start)) -GLNAME(gl_dispatch_functions_start): - - GL_STUB(NewList, 0, NewList@8) - GL_STUB(EndList, 1, EndList@0) - GL_STUB(CallList, 2, CallList@4) - GL_STUB(CallLists, 3, CallLists@12) - GL_STUB(DeleteLists, 4, DeleteLists@8) - GL_STUB(GenLists, 5, GenLists@4) - GL_STUB(ListBase, 6, ListBase@4) - GL_STUB(Begin, 7, Begin@4) - GL_STUB(Bitmap, 8, Bitmap@28) - GL_STUB(Color3b, 9, Color3b@12) - GL_STUB(Color3bv, 10, Color3bv@4) - GL_STUB(Color3d, 11, Color3d@24) - GL_STUB(Color3dv, 12, Color3dv@4) - GL_STUB(Color3f, 13, Color3f@12) - GL_STUB(Color3fv, 14, Color3fv@4) - GL_STUB(Color3i, 15, Color3i@12) - GL_STUB(Color3iv, 16, Color3iv@4) - GL_STUB(Color3s, 17, Color3s@12) - GL_STUB(Color3sv, 18, Color3sv@4) - GL_STUB(Color3ub, 19, Color3ub@12) - GL_STUB(Color3ubv, 20, Color3ubv@4) - GL_STUB(Color3ui, 21, Color3ui@12) - GL_STUB(Color3uiv, 22, Color3uiv@4) - GL_STUB(Color3us, 23, Color3us@12) - GL_STUB(Color3usv, 24, Color3usv@4) - GL_STUB(Color4b, 25, Color4b@16) - GL_STUB(Color4bv, 26, Color4bv@4) - GL_STUB(Color4d, 27, Color4d@32) - GL_STUB(Color4dv, 28, Color4dv@4) - GL_STUB(Color4f, 29, Color4f@16) - GL_STUB(Color4fv, 30, Color4fv@4) - GL_STUB(Color4i, 31, Color4i@16) - GL_STUB(Color4iv, 32, Color4iv@4) - GL_STUB(Color4s, 33, Color4s@16) - GL_STUB(Color4sv, 34, Color4sv@4) - GL_STUB(Color4ub, 35, Color4ub@16) - GL_STUB(Color4ubv, 36, Color4ubv@4) - GL_STUB(Color4ui, 37, Color4ui@16) - GL_STUB(Color4uiv, 38, Color4uiv@4) - GL_STUB(Color4us, 39, Color4us@16) - GL_STUB(Color4usv, 40, Color4usv@4) - GL_STUB(EdgeFlag, 41, EdgeFlag@4) - GL_STUB(EdgeFlagv, 42, EdgeFlagv@4) - GL_STUB(End, 43, End@0) - GL_STUB(Indexd, 44, Indexd@8) - GL_STUB(Indexdv, 45, Indexdv@4) - GL_STUB(Indexf, 46, Indexf@4) - GL_STUB(Indexfv, 47, Indexfv@4) - GL_STUB(Indexi, 48, Indexi@4) - GL_STUB(Indexiv, 49, Indexiv@4) - GL_STUB(Indexs, 50, Indexs@4) - GL_STUB(Indexsv, 51, Indexsv@4) - GL_STUB(Normal3b, 52, Normal3b@12) - GL_STUB(Normal3bv, 53, Normal3bv@4) - GL_STUB(Normal3d, 54, Normal3d@24) - GL_STUB(Normal3dv, 55, Normal3dv@4) - GL_STUB(Normal3f, 56, Normal3f@12) - GL_STUB(Normal3fv, 57, Normal3fv@4) - GL_STUB(Normal3i, 58, Normal3i@12) - GL_STUB(Normal3iv, 59, Normal3iv@4) - GL_STUB(Normal3s, 60, Normal3s@12) - GL_STUB(Normal3sv, 61, Normal3sv@4) - GL_STUB(RasterPos2d, 62, RasterPos2d@16) - GL_STUB(RasterPos2dv, 63, RasterPos2dv@4) - GL_STUB(RasterPos2f, 64, RasterPos2f@8) - GL_STUB(RasterPos2fv, 65, RasterPos2fv@4) - GL_STUB(RasterPos2i, 66, RasterPos2i@8) - GL_STUB(RasterPos2iv, 67, RasterPos2iv@4) - GL_STUB(RasterPos2s, 68, RasterPos2s@8) - GL_STUB(RasterPos2sv, 69, RasterPos2sv@4) - GL_STUB(RasterPos3d, 70, RasterPos3d@24) - GL_STUB(RasterPos3dv, 71, RasterPos3dv@4) - GL_STUB(RasterPos3f, 72, RasterPos3f@12) - GL_STUB(RasterPos3fv, 73, RasterPos3fv@4) - GL_STUB(RasterPos3i, 74, RasterPos3i@12) - GL_STUB(RasterPos3iv, 75, RasterPos3iv@4) - GL_STUB(RasterPos3s, 76, RasterPos3s@12) - GL_STUB(RasterPos3sv, 77, RasterPos3sv@4) - GL_STUB(RasterPos4d, 78, RasterPos4d@32) - GL_STUB(RasterPos4dv, 79, RasterPos4dv@4) - GL_STUB(RasterPos4f, 80, RasterPos4f@16) - GL_STUB(RasterPos4fv, 81, RasterPos4fv@4) - GL_STUB(RasterPos4i, 82, RasterPos4i@16) - GL_STUB(RasterPos4iv, 83, RasterPos4iv@4) - GL_STUB(RasterPos4s, 84, RasterPos4s@16) - GL_STUB(RasterPos4sv, 85, RasterPos4sv@4) - GL_STUB(Rectd, 86, Rectd@32) - GL_STUB(Rectdv, 87, Rectdv@8) - GL_STUB(Rectf, 88, Rectf@16) - GL_STUB(Rectfv, 89, Rectfv@8) - GL_STUB(Recti, 90, Recti@16) - GL_STUB(Rectiv, 91, Rectiv@8) - GL_STUB(Rects, 92, Rects@16) - GL_STUB(Rectsv, 93, Rectsv@8) - GL_STUB(TexCoord1d, 94, TexCoord1d@8) - GL_STUB(TexCoord1dv, 95, TexCoord1dv@4) - GL_STUB(TexCoord1f, 96, TexCoord1f@4) - GL_STUB(TexCoord1fv, 97, TexCoord1fv@4) - GL_STUB(TexCoord1i, 98, TexCoord1i@4) - GL_STUB(TexCoord1iv, 99, TexCoord1iv@4) - GL_STUB(TexCoord1s, 100, TexCoord1s@4) - GL_STUB(TexCoord1sv, 101, TexCoord1sv@4) - GL_STUB(TexCoord2d, 102, TexCoord2d@16) - GL_STUB(TexCoord2dv, 103, TexCoord2dv@4) - GL_STUB(TexCoord2f, 104, TexCoord2f@8) - GL_STUB(TexCoord2fv, 105, TexCoord2fv@4) - GL_STUB(TexCoord2i, 106, TexCoord2i@8) - GL_STUB(TexCoord2iv, 107, TexCoord2iv@4) - GL_STUB(TexCoord2s, 108, TexCoord2s@8) - GL_STUB(TexCoord2sv, 109, TexCoord2sv@4) - GL_STUB(TexCoord3d, 110, TexCoord3d@24) - GL_STUB(TexCoord3dv, 111, TexCoord3dv@4) - GL_STUB(TexCoord3f, 112, TexCoord3f@12) - GL_STUB(TexCoord3fv, 113, TexCoord3fv@4) - GL_STUB(TexCoord3i, 114, TexCoord3i@12) - GL_STUB(TexCoord3iv, 115, TexCoord3iv@4) - GL_STUB(TexCoord3s, 116, TexCoord3s@12) - GL_STUB(TexCoord3sv, 117, TexCoord3sv@4) - GL_STUB(TexCoord4d, 118, TexCoord4d@32) - GL_STUB(TexCoord4dv, 119, TexCoord4dv@4) - GL_STUB(TexCoord4f, 120, TexCoord4f@16) - GL_STUB(TexCoord4fv, 121, TexCoord4fv@4) - GL_STUB(TexCoord4i, 122, TexCoord4i@16) - GL_STUB(TexCoord4iv, 123, TexCoord4iv@4) - GL_STUB(TexCoord4s, 124, TexCoord4s@16) - GL_STUB(TexCoord4sv, 125, TexCoord4sv@4) - GL_STUB(Vertex2d, 126, Vertex2d@16) - GL_STUB(Vertex2dv, 127, Vertex2dv@4) - GL_STUB(Vertex2f, 128, Vertex2f@8) - GL_STUB(Vertex2fv, 129, Vertex2fv@4) - GL_STUB(Vertex2i, 130, Vertex2i@8) - GL_STUB(Vertex2iv, 131, Vertex2iv@4) - GL_STUB(Vertex2s, 132, Vertex2s@8) - GL_STUB(Vertex2sv, 133, Vertex2sv@4) - GL_STUB(Vertex3d, 134, Vertex3d@24) - GL_STUB(Vertex3dv, 135, Vertex3dv@4) - GL_STUB(Vertex3f, 136, Vertex3f@12) - GL_STUB(Vertex3fv, 137, Vertex3fv@4) - GL_STUB(Vertex3i, 138, Vertex3i@12) - GL_STUB(Vertex3iv, 139, Vertex3iv@4) - GL_STUB(Vertex3s, 140, Vertex3s@12) - GL_STUB(Vertex3sv, 141, Vertex3sv@4) - GL_STUB(Vertex4d, 142, Vertex4d@32) - GL_STUB(Vertex4dv, 143, Vertex4dv@4) - GL_STUB(Vertex4f, 144, Vertex4f@16) - GL_STUB(Vertex4fv, 145, Vertex4fv@4) - GL_STUB(Vertex4i, 146, Vertex4i@16) - GL_STUB(Vertex4iv, 147, Vertex4iv@4) - GL_STUB(Vertex4s, 148, Vertex4s@16) - GL_STUB(Vertex4sv, 149, Vertex4sv@4) - GL_STUB(ClipPlane, 150, ClipPlane@8) - GL_STUB(ColorMaterial, 151, ColorMaterial@8) - GL_STUB(CullFace, 152, CullFace@4) - GL_STUB(Fogf, 153, Fogf@8) - GL_STUB(Fogfv, 154, Fogfv@8) - GL_STUB(Fogi, 155, Fogi@8) - GL_STUB(Fogiv, 156, Fogiv@8) - GL_STUB(FrontFace, 157, FrontFace@4) - GL_STUB(Hint, 158, Hint@8) - GL_STUB(Lightf, 159, Lightf@12) - GL_STUB(Lightfv, 160, Lightfv@12) - GL_STUB(Lighti, 161, Lighti@12) - GL_STUB(Lightiv, 162, Lightiv@12) - GL_STUB(LightModelf, 163, LightModelf@8) - GL_STUB(LightModelfv, 164, LightModelfv@8) - GL_STUB(LightModeli, 165, LightModeli@8) - GL_STUB(LightModeliv, 166, LightModeliv@8) - GL_STUB(LineStipple, 167, LineStipple@8) - GL_STUB(LineWidth, 168, LineWidth@4) - GL_STUB(Materialf, 169, Materialf@12) - GL_STUB(Materialfv, 170, Materialfv@12) - GL_STUB(Materiali, 171, Materiali@12) - GL_STUB(Materialiv, 172, Materialiv@12) - GL_STUB(PointSize, 173, PointSize@4) - GL_STUB(PolygonMode, 174, PolygonMode@8) - GL_STUB(PolygonStipple, 175, PolygonStipple@4) - GL_STUB(Scissor, 176, Scissor@16) - GL_STUB(ShadeModel, 177, ShadeModel@4) - GL_STUB(TexParameterf, 178, TexParameterf@12) - GL_STUB(TexParameterfv, 179, TexParameterfv@12) - GL_STUB(TexParameteri, 180, TexParameteri@12) - GL_STUB(TexParameteriv, 181, TexParameteriv@12) - GL_STUB(TexImage1D, 182, TexImage1D@32) - GL_STUB(TexImage2D, 183, TexImage2D@36) - GL_STUB(TexEnvf, 184, TexEnvf@12) - GL_STUB(TexEnvfv, 185, TexEnvfv@12) - GL_STUB(TexEnvi, 186, TexEnvi@12) - GL_STUB(TexEnviv, 187, TexEnviv@12) - GL_STUB(TexGend, 188, TexGend@16) - GL_STUB(TexGendv, 189, TexGendv@12) - GL_STUB(TexGenf, 190, TexGenf@12) - GL_STUB(TexGenfv, 191, TexGenfv@12) - GL_STUB(TexGeni, 192, TexGeni@12) - GL_STUB(TexGeniv, 193, TexGeniv@12) - GL_STUB(FeedbackBuffer, 194, FeedbackBuffer@12) - GL_STUB(SelectBuffer, 195, SelectBuffer@8) - GL_STUB(RenderMode, 196, RenderMode@4) - GL_STUB(InitNames, 197, InitNames@0) - GL_STUB(LoadName, 198, LoadName@4) - GL_STUB(PassThrough, 199, PassThrough@4) - GL_STUB(PopName, 200, PopName@0) - GL_STUB(PushName, 201, PushName@4) - GL_STUB(DrawBuffer, 202, DrawBuffer@4) - GL_STUB(Clear, 203, Clear@4) - GL_STUB(ClearAccum, 204, ClearAccum@16) - GL_STUB(ClearIndex, 205, ClearIndex@4) - GL_STUB(ClearColor, 206, ClearColor@16) - GL_STUB(ClearStencil, 207, ClearStencil@4) - GL_STUB(ClearDepth, 208, ClearDepth@8) - GL_STUB(StencilMask, 209, StencilMask@4) - GL_STUB(ColorMask, 210, ColorMask@16) - GL_STUB(DepthMask, 211, DepthMask@4) - GL_STUB(IndexMask, 212, IndexMask@4) - GL_STUB(Accum, 213, Accum@8) - GL_STUB(Disable, 214, Disable@4) - GL_STUB(Enable, 215, Enable@4) - GL_STUB(Finish, 216, Finish@0) - GL_STUB(Flush, 217, Flush@0) - GL_STUB(PopAttrib, 218, PopAttrib@0) - GL_STUB(PushAttrib, 219, PushAttrib@4) - GL_STUB(Map1d, 220, Map1d@32) - GL_STUB(Map1f, 221, Map1f@24) - GL_STUB(Map2d, 222, Map2d@56) - GL_STUB(Map2f, 223, Map2f@40) - GL_STUB(MapGrid1d, 224, MapGrid1d@20) - GL_STUB(MapGrid1f, 225, MapGrid1f@12) - GL_STUB(MapGrid2d, 226, MapGrid2d@40) - GL_STUB(MapGrid2f, 227, MapGrid2f@24) - GL_STUB(EvalCoord1d, 228, EvalCoord1d@8) - GL_STUB(EvalCoord1dv, 229, EvalCoord1dv@4) - GL_STUB(EvalCoord1f, 230, EvalCoord1f@4) - GL_STUB(EvalCoord1fv, 231, EvalCoord1fv@4) - GL_STUB(EvalCoord2d, 232, EvalCoord2d@16) - GL_STUB(EvalCoord2dv, 233, EvalCoord2dv@4) - GL_STUB(EvalCoord2f, 234, EvalCoord2f@8) - GL_STUB(EvalCoord2fv, 235, EvalCoord2fv@4) - GL_STUB(EvalMesh1, 236, EvalMesh1@12) - GL_STUB(EvalPoint1, 237, EvalPoint1@4) - GL_STUB(EvalMesh2, 238, EvalMesh2@20) - GL_STUB(EvalPoint2, 239, EvalPoint2@8) - GL_STUB(AlphaFunc, 240, AlphaFunc@8) - GL_STUB(BlendFunc, 241, BlendFunc@8) - GL_STUB(LogicOp, 242, LogicOp@4) - GL_STUB(StencilFunc, 243, StencilFunc@12) - GL_STUB(StencilOp, 244, StencilOp@12) - GL_STUB(DepthFunc, 245, DepthFunc@4) - GL_STUB(PixelZoom, 246, PixelZoom@8) - GL_STUB(PixelTransferf, 247, PixelTransferf@8) - GL_STUB(PixelTransferi, 248, PixelTransferi@8) - GL_STUB(PixelStoref, 249, PixelStoref@8) - GL_STUB(PixelStorei, 250, PixelStorei@8) - GL_STUB(PixelMapfv, 251, PixelMapfv@12) - GL_STUB(PixelMapuiv, 252, PixelMapuiv@12) - GL_STUB(PixelMapusv, 253, PixelMapusv@12) - GL_STUB(ReadBuffer, 254, ReadBuffer@4) - GL_STUB(CopyPixels, 255, CopyPixels@20) - GL_STUB(ReadPixels, 256, ReadPixels@28) - GL_STUB(DrawPixels, 257, DrawPixels@20) - GL_STUB(GetBooleanv, 258, GetBooleanv@8) - GL_STUB(GetClipPlane, 259, GetClipPlane@8) - GL_STUB(GetDoublev, 260, GetDoublev@8) - GL_STUB(GetError, 261, GetError@0) - GL_STUB(GetFloatv, 262, GetFloatv@8) - GL_STUB(GetIntegerv, 263, GetIntegerv@8) - GL_STUB(GetLightfv, 264, GetLightfv@12) - GL_STUB(GetLightiv, 265, GetLightiv@12) - GL_STUB(GetMapdv, 266, GetMapdv@12) - GL_STUB(GetMapfv, 267, GetMapfv@12) - GL_STUB(GetMapiv, 268, GetMapiv@12) - GL_STUB(GetMaterialfv, 269, GetMaterialfv@12) - GL_STUB(GetMaterialiv, 270, GetMaterialiv@12) - GL_STUB(GetPixelMapfv, 271, GetPixelMapfv@8) - GL_STUB(GetPixelMapuiv, 272, GetPixelMapuiv@8) - GL_STUB(GetPixelMapusv, 273, GetPixelMapusv@8) - GL_STUB(GetPolygonStipple, 274, GetPolygonStipple@4) - GL_STUB(GetString, 275, GetString@4) - GL_STUB(GetTexEnvfv, 276, GetTexEnvfv@12) - GL_STUB(GetTexEnviv, 277, GetTexEnviv@12) - GL_STUB(GetTexGendv, 278, GetTexGendv@12) - GL_STUB(GetTexGenfv, 279, GetTexGenfv@12) - GL_STUB(GetTexGeniv, 280, GetTexGeniv@12) - GL_STUB(GetTexImage, 281, GetTexImage@20) - GL_STUB(GetTexParameterfv, 282, GetTexParameterfv@12) - GL_STUB(GetTexParameteriv, 283, GetTexParameteriv@12) - GL_STUB(GetTexLevelParameterfv, 284, GetTexLevelParameterfv@16) - GL_STUB(GetTexLevelParameteriv, 285, GetTexLevelParameteriv@16) - GL_STUB(IsEnabled, 286, IsEnabled@4) - GL_STUB(IsList, 287, IsList@4) - GL_STUB(DepthRange, 288, DepthRange@16) - GL_STUB(Frustum, 289, Frustum@48) - GL_STUB(LoadIdentity, 290, LoadIdentity@0) - GL_STUB(LoadMatrixf, 291, LoadMatrixf@4) - GL_STUB(LoadMatrixd, 292, LoadMatrixd@4) - GL_STUB(MatrixMode, 293, MatrixMode@4) - GL_STUB(MultMatrixf, 294, MultMatrixf@4) - GL_STUB(MultMatrixd, 295, MultMatrixd@4) - GL_STUB(Ortho, 296, Ortho@48) - GL_STUB(PopMatrix, 297, PopMatrix@0) - GL_STUB(PushMatrix, 298, PushMatrix@0) - GL_STUB(Rotated, 299, Rotated@32) - GL_STUB(Rotatef, 300, Rotatef@16) - GL_STUB(Scaled, 301, Scaled@24) - GL_STUB(Scalef, 302, Scalef@12) - GL_STUB(Translated, 303, Translated@24) - GL_STUB(Translatef, 304, Translatef@12) - GL_STUB(Viewport, 305, Viewport@16) - GL_STUB(ArrayElement, 306, ArrayElement@4) - GL_STUB(BindTexture, 307, BindTexture@8) - GL_STUB(ColorPointer, 308, ColorPointer@16) - GL_STUB(DisableClientState, 309, DisableClientState@4) - GL_STUB(DrawArrays, 310, DrawArrays@12) - GL_STUB(DrawElements, 311, DrawElements@16) - GL_STUB(EdgeFlagPointer, 312, EdgeFlagPointer@8) - GL_STUB(EnableClientState, 313, EnableClientState@4) - GL_STUB(IndexPointer, 314, IndexPointer@12) - GL_STUB(Indexub, 315, Indexub@4) - GL_STUB(Indexubv, 316, Indexubv@4) - GL_STUB(InterleavedArrays, 317, InterleavedArrays@12) - GL_STUB(NormalPointer, 318, NormalPointer@12) - GL_STUB(PolygonOffset, 319, PolygonOffset@8) - GL_STUB(TexCoordPointer, 320, TexCoordPointer@16) - GL_STUB(VertexPointer, 321, VertexPointer@16) - GL_STUB(AreTexturesResident, 322, AreTexturesResident@12) - GL_STUB(CopyTexImage1D, 323, CopyTexImage1D@28) - GL_STUB(CopyTexImage2D, 324, CopyTexImage2D@32) - GL_STUB(CopyTexSubImage1D, 325, CopyTexSubImage1D@24) - GL_STUB(CopyTexSubImage2D, 326, CopyTexSubImage2D@32) - GL_STUB(DeleteTextures, 327, DeleteTextures@8) - GL_STUB(GenTextures, 328, GenTextures@8) - GL_STUB(GetPointerv, 329, GetPointerv@8) - GL_STUB(IsTexture, 330, IsTexture@4) - GL_STUB(PrioritizeTextures, 331, PrioritizeTextures@12) - GL_STUB(TexSubImage1D, 332, TexSubImage1D@28) - GL_STUB(TexSubImage2D, 333, TexSubImage2D@36) - GL_STUB(PopClientAttrib, 334, PopClientAttrib@0) - GL_STUB(PushClientAttrib, 335, PushClientAttrib@4) - GL_STUB(BlendColor, 336, BlendColor@16) - GL_STUB(BlendEquation, 337, BlendEquation@4) - GL_STUB(DrawRangeElements, 338, DrawRangeElements@24) - GL_STUB(ColorTable, 339, ColorTable@24) - GL_STUB(ColorTableParameterfv, 340, ColorTableParameterfv@12) - GL_STUB(ColorTableParameteriv, 341, ColorTableParameteriv@12) - GL_STUB(CopyColorTable, 342, CopyColorTable@20) - GL_STUB(GetColorTable, 343, GetColorTable@16) - GL_STUB(GetColorTableParameterfv, 344, GetColorTableParameterfv@12) - GL_STUB(GetColorTableParameteriv, 345, GetColorTableParameteriv@12) - GL_STUB(ColorSubTable, 346, ColorSubTable@24) - GL_STUB(CopyColorSubTable, 347, CopyColorSubTable@20) - GL_STUB(ConvolutionFilter1D, 348, ConvolutionFilter1D@24) - GL_STUB(ConvolutionFilter2D, 349, ConvolutionFilter2D@28) - GL_STUB(ConvolutionParameterf, 350, ConvolutionParameterf@12) - GL_STUB(ConvolutionParameterfv, 351, ConvolutionParameterfv@12) - GL_STUB(ConvolutionParameteri, 352, ConvolutionParameteri@12) - GL_STUB(ConvolutionParameteriv, 353, ConvolutionParameteriv@12) - GL_STUB(CopyConvolutionFilter1D, 354, CopyConvolutionFilter1D@20) - GL_STUB(CopyConvolutionFilter2D, 355, CopyConvolutionFilter2D@24) - GL_STUB(GetConvolutionFilter, 356, GetConvolutionFilter@16) - GL_STUB(GetConvolutionParameterfv, 357, GetConvolutionParameterfv@12) - GL_STUB(GetConvolutionParameteriv, 358, GetConvolutionParameteriv@12) - GL_STUB(GetSeparableFilter, 359, GetSeparableFilter@24) - GL_STUB(SeparableFilter2D, 360, SeparableFilter2D@32) - GL_STUB(GetHistogram, 361, GetHistogram@20) - GL_STUB(GetHistogramParameterfv, 362, GetHistogramParameterfv@12) - GL_STUB(GetHistogramParameteriv, 363, GetHistogramParameteriv@12) - GL_STUB(GetMinmax, 364, GetMinmax@20) - GL_STUB(GetMinmaxParameterfv, 365, GetMinmaxParameterfv@12) - GL_STUB(GetMinmaxParameteriv, 366, GetMinmaxParameteriv@12) - GL_STUB(Histogram, 367, Histogram@16) - GL_STUB(Minmax, 368, Minmax@12) - GL_STUB(ResetHistogram, 369, ResetHistogram@4) - GL_STUB(ResetMinmax, 370, ResetMinmax@4) - GL_STUB(TexImage3D, 371, TexImage3D@40) - GL_STUB(TexSubImage3D, 372, TexSubImage3D@44) - GL_STUB(CopyTexSubImage3D, 373, CopyTexSubImage3D@36) - GL_STUB(ActiveTextureARB, 374, ActiveTextureARB@4) - GL_STUB(ClientActiveTextureARB, 375, ClientActiveTextureARB@4) - GL_STUB(MultiTexCoord1dARB, 376, MultiTexCoord1dARB@12) - GL_STUB(MultiTexCoord1dvARB, 377, MultiTexCoord1dvARB@8) - GL_STUB(MultiTexCoord1fARB, 378, MultiTexCoord1fARB@8) - GL_STUB(MultiTexCoord1fvARB, 379, MultiTexCoord1fvARB@8) - GL_STUB(MultiTexCoord1iARB, 380, MultiTexCoord1iARB@8) - GL_STUB(MultiTexCoord1ivARB, 381, MultiTexCoord1ivARB@8) - GL_STUB(MultiTexCoord1sARB, 382, MultiTexCoord1sARB@8) - GL_STUB(MultiTexCoord1svARB, 383, MultiTexCoord1svARB@8) - GL_STUB(MultiTexCoord2dARB, 384, MultiTexCoord2dARB@20) - GL_STUB(MultiTexCoord2dvARB, 385, MultiTexCoord2dvARB@8) - GL_STUB(MultiTexCoord2fARB, 386, MultiTexCoord2fARB@12) - GL_STUB(MultiTexCoord2fvARB, 387, MultiTexCoord2fvARB@8) - GL_STUB(MultiTexCoord2iARB, 388, MultiTexCoord2iARB@12) - GL_STUB(MultiTexCoord2ivARB, 389, MultiTexCoord2ivARB@8) - GL_STUB(MultiTexCoord2sARB, 390, MultiTexCoord2sARB@12) - GL_STUB(MultiTexCoord2svARB, 391, MultiTexCoord2svARB@8) - GL_STUB(MultiTexCoord3dARB, 392, MultiTexCoord3dARB@28) - GL_STUB(MultiTexCoord3dvARB, 393, MultiTexCoord3dvARB@8) - GL_STUB(MultiTexCoord3fARB, 394, MultiTexCoord3fARB@16) - GL_STUB(MultiTexCoord3fvARB, 395, MultiTexCoord3fvARB@8) - GL_STUB(MultiTexCoord3iARB, 396, MultiTexCoord3iARB@16) - GL_STUB(MultiTexCoord3ivARB, 397, MultiTexCoord3ivARB@8) - GL_STUB(MultiTexCoord3sARB, 398, MultiTexCoord3sARB@16) - GL_STUB(MultiTexCoord3svARB, 399, MultiTexCoord3svARB@8) - GL_STUB(MultiTexCoord4dARB, 400, MultiTexCoord4dARB@36) - GL_STUB(MultiTexCoord4dvARB, 401, MultiTexCoord4dvARB@8) - GL_STUB(MultiTexCoord4fARB, 402, MultiTexCoord4fARB@20) - GL_STUB(MultiTexCoord4fvARB, 403, MultiTexCoord4fvARB@8) - GL_STUB(MultiTexCoord4iARB, 404, MultiTexCoord4iARB@20) - GL_STUB(MultiTexCoord4ivARB, 405, MultiTexCoord4ivARB@8) - GL_STUB(MultiTexCoord4sARB, 406, MultiTexCoord4sARB@20) - GL_STUB(MultiTexCoord4svARB, 407, MultiTexCoord4svARB@8) - GL_STUB(AttachShader, 408, AttachShader@8) - GL_STUB(CreateProgram, 409, CreateProgram@0) - GL_STUB(CreateShader, 410, CreateShader@4) - GL_STUB(DeleteProgram, 411, DeleteProgram@4) - GL_STUB(DeleteShader, 412, DeleteShader@4) - GL_STUB(DetachShader, 413, DetachShader@8) - GL_STUB(GetAttachedShaders, 414, GetAttachedShaders@16) - GL_STUB(GetProgramInfoLog, 415, GetProgramInfoLog@16) - GL_STUB(GetProgramiv, 416, GetProgramiv@12) - GL_STUB(GetShaderInfoLog, 417, GetShaderInfoLog@16) - GL_STUB(GetShaderiv, 418, GetShaderiv@12) - GL_STUB(IsProgram, 419, IsProgram@4) - GL_STUB(IsShader, 420, IsShader@4) - GL_STUB(StencilFuncSeparate, 421, StencilFuncSeparate@16) - GL_STUB(StencilMaskSeparate, 422, StencilMaskSeparate@8) - GL_STUB(StencilOpSeparate, 423, StencilOpSeparate@16) - GL_STUB(UniformMatrix2x3fv, 424, UniformMatrix2x3fv@16) - GL_STUB(UniformMatrix2x4fv, 425, UniformMatrix2x4fv@16) - GL_STUB(UniformMatrix3x2fv, 426, UniformMatrix3x2fv@16) - GL_STUB(UniformMatrix3x4fv, 427, UniformMatrix3x4fv@16) - GL_STUB(UniformMatrix4x2fv, 428, UniformMatrix4x2fv@16) - GL_STUB(UniformMatrix4x3fv, 429, UniformMatrix4x3fv@16) - GL_STUB(ClampColor, 430, ClampColor@8) - GL_STUB(ClearBufferfi, 431, ClearBufferfi@16) - GL_STUB(ClearBufferfv, 432, ClearBufferfv@12) - GL_STUB(ClearBufferiv, 433, ClearBufferiv@12) - GL_STUB(ClearBufferuiv, 434, ClearBufferuiv@12) - GL_STUB(GetStringi, 435, GetStringi@8) - GL_STUB(TexBuffer, 436, TexBuffer@12) - GL_STUB(FramebufferTexture, 437, FramebufferTexture@16) - GL_STUB(GetBufferParameteri64v, 438, GetBufferParameteri64v@12) - GL_STUB(GetInteger64i_v, 439, GetInteger64i_v@12) - GL_STUB(VertexAttribDivisor, 440, VertexAttribDivisor@8) - GL_STUB(LoadTransposeMatrixdARB, 441, LoadTransposeMatrixdARB@4) - GL_STUB(LoadTransposeMatrixfARB, 442, LoadTransposeMatrixfARB@4) - GL_STUB(MultTransposeMatrixdARB, 443, MultTransposeMatrixdARB@4) - GL_STUB(MultTransposeMatrixfARB, 444, MultTransposeMatrixfARB@4) - GL_STUB(SampleCoverageARB, 445, SampleCoverageARB@8) - GL_STUB(CompressedTexImage1DARB, 446, CompressedTexImage1DARB@28) - GL_STUB(CompressedTexImage2DARB, 447, CompressedTexImage2DARB@32) - GL_STUB(CompressedTexImage3DARB, 448, CompressedTexImage3DARB@36) - GL_STUB(CompressedTexSubImage1DARB, 449, CompressedTexSubImage1DARB@28) - GL_STUB(CompressedTexSubImage2DARB, 450, CompressedTexSubImage2DARB@36) - GL_STUB(CompressedTexSubImage3DARB, 451, CompressedTexSubImage3DARB@44) - GL_STUB(GetCompressedTexImageARB, 452, GetCompressedTexImageARB@12) - GL_STUB(DisableVertexAttribArrayARB, 453, DisableVertexAttribArrayARB@4) - GL_STUB(EnableVertexAttribArrayARB, 454, EnableVertexAttribArrayARB@4) - GL_STUB(GetProgramEnvParameterdvARB, 455, GetProgramEnvParameterdvARB@12) - GL_STUB(GetProgramEnvParameterfvARB, 456, GetProgramEnvParameterfvARB@12) - GL_STUB(GetProgramLocalParameterdvARB, 457, GetProgramLocalParameterdvARB@12) - GL_STUB(GetProgramLocalParameterfvARB, 458, GetProgramLocalParameterfvARB@12) - GL_STUB(GetProgramStringARB, 459, GetProgramStringARB@12) - GL_STUB(GetProgramivARB, 460, GetProgramivARB@12) - GL_STUB(GetVertexAttribdvARB, 461, GetVertexAttribdvARB@12) - GL_STUB(GetVertexAttribfvARB, 462, GetVertexAttribfvARB@12) - GL_STUB(GetVertexAttribivARB, 463, GetVertexAttribivARB@12) - GL_STUB(ProgramEnvParameter4dARB, 464, ProgramEnvParameter4dARB@40) - GL_STUB(ProgramEnvParameter4dvARB, 465, ProgramEnvParameter4dvARB@12) - GL_STUB(ProgramEnvParameter4fARB, 466, ProgramEnvParameter4fARB@24) - GL_STUB(ProgramEnvParameter4fvARB, 467, ProgramEnvParameter4fvARB@12) - GL_STUB(ProgramLocalParameter4dARB, 468, ProgramLocalParameter4dARB@40) - GL_STUB(ProgramLocalParameter4dvARB, 469, ProgramLocalParameter4dvARB@12) - GL_STUB(ProgramLocalParameter4fARB, 470, ProgramLocalParameter4fARB@24) - GL_STUB(ProgramLocalParameter4fvARB, 471, ProgramLocalParameter4fvARB@12) - GL_STUB(ProgramStringARB, 472, ProgramStringARB@16) - GL_STUB(VertexAttrib1dARB, 473, VertexAttrib1dARB@12) - GL_STUB(VertexAttrib1dvARB, 474, VertexAttrib1dvARB@8) - GL_STUB(VertexAttrib1fARB, 475, VertexAttrib1fARB@8) - GL_STUB(VertexAttrib1fvARB, 476, VertexAttrib1fvARB@8) - GL_STUB(VertexAttrib1sARB, 477, VertexAttrib1sARB@8) - GL_STUB(VertexAttrib1svARB, 478, VertexAttrib1svARB@8) - GL_STUB(VertexAttrib2dARB, 479, VertexAttrib2dARB@20) - GL_STUB(VertexAttrib2dvARB, 480, VertexAttrib2dvARB@8) - GL_STUB(VertexAttrib2fARB, 481, VertexAttrib2fARB@12) - GL_STUB(VertexAttrib2fvARB, 482, VertexAttrib2fvARB@8) - GL_STUB(VertexAttrib2sARB, 483, VertexAttrib2sARB@12) - GL_STUB(VertexAttrib2svARB, 484, VertexAttrib2svARB@8) - GL_STUB(VertexAttrib3dARB, 485, VertexAttrib3dARB@28) - GL_STUB(VertexAttrib3dvARB, 486, VertexAttrib3dvARB@8) - GL_STUB(VertexAttrib3fARB, 487, VertexAttrib3fARB@16) - GL_STUB(VertexAttrib3fvARB, 488, VertexAttrib3fvARB@8) - GL_STUB(VertexAttrib3sARB, 489, VertexAttrib3sARB@16) - GL_STUB(VertexAttrib3svARB, 490, VertexAttrib3svARB@8) - GL_STUB(VertexAttrib4NbvARB, 491, VertexAttrib4NbvARB@8) - GL_STUB(VertexAttrib4NivARB, 492, VertexAttrib4NivARB@8) - GL_STUB(VertexAttrib4NsvARB, 493, VertexAttrib4NsvARB@8) - GL_STUB(VertexAttrib4NubARB, 494, VertexAttrib4NubARB@20) - GL_STUB(VertexAttrib4NubvARB, 495, VertexAttrib4NubvARB@8) - GL_STUB(VertexAttrib4NuivARB, 496, VertexAttrib4NuivARB@8) - GL_STUB(VertexAttrib4NusvARB, 497, VertexAttrib4NusvARB@8) - GL_STUB(VertexAttrib4bvARB, 498, VertexAttrib4bvARB@8) - GL_STUB(VertexAttrib4dARB, 499, VertexAttrib4dARB@36) - GL_STUB(VertexAttrib4dvARB, 500, VertexAttrib4dvARB@8) - GL_STUB(VertexAttrib4fARB, 501, VertexAttrib4fARB@20) - GL_STUB(VertexAttrib4fvARB, 502, VertexAttrib4fvARB@8) - GL_STUB(VertexAttrib4ivARB, 503, VertexAttrib4ivARB@8) - GL_STUB(VertexAttrib4sARB, 504, VertexAttrib4sARB@20) - GL_STUB(VertexAttrib4svARB, 505, VertexAttrib4svARB@8) - GL_STUB(VertexAttrib4ubvARB, 506, VertexAttrib4ubvARB@8) - GL_STUB(VertexAttrib4uivARB, 507, VertexAttrib4uivARB@8) - GL_STUB(VertexAttrib4usvARB, 508, VertexAttrib4usvARB@8) - GL_STUB(VertexAttribPointerARB, 509, VertexAttribPointerARB@24) - GL_STUB(BindBufferARB, 510, BindBufferARB@8) - GL_STUB(BufferDataARB, 511, BufferDataARB@16) - GL_STUB(BufferSubDataARB, 512, BufferSubDataARB@16) - GL_STUB(DeleteBuffersARB, 513, DeleteBuffersARB@8) - GL_STUB(GenBuffersARB, 514, GenBuffersARB@8) - GL_STUB(GetBufferParameterivARB, 515, GetBufferParameterivARB@12) - GL_STUB(GetBufferPointervARB, 516, GetBufferPointervARB@12) - GL_STUB(GetBufferSubDataARB, 517, GetBufferSubDataARB@16) - GL_STUB(IsBufferARB, 518, IsBufferARB@4) - GL_STUB(MapBufferARB, 519, MapBufferARB@8) - GL_STUB(UnmapBufferARB, 520, UnmapBufferARB@4) - GL_STUB(BeginQueryARB, 521, BeginQueryARB@8) - GL_STUB(DeleteQueriesARB, 522, DeleteQueriesARB@8) - GL_STUB(EndQueryARB, 523, EndQueryARB@4) - GL_STUB(GenQueriesARB, 524, GenQueriesARB@8) - GL_STUB(GetQueryObjectivARB, 525, GetQueryObjectivARB@12) - GL_STUB(GetQueryObjectuivARB, 526, GetQueryObjectuivARB@12) - GL_STUB(GetQueryivARB, 527, GetQueryivARB@12) - GL_STUB(IsQueryARB, 528, IsQueryARB@4) - GL_STUB(AttachObjectARB, 529, AttachObjectARB@8) - GL_STUB(CompileShaderARB, 530, CompileShaderARB@4) - GL_STUB(CreateProgramObjectARB, 531, CreateProgramObjectARB@0) - GL_STUB(CreateShaderObjectARB, 532, CreateShaderObjectARB@4) - GL_STUB(DeleteObjectARB, 533, DeleteObjectARB@4) - GL_STUB(DetachObjectARB, 534, DetachObjectARB@8) - GL_STUB(GetActiveUniformARB, 535, GetActiveUniformARB@28) - GL_STUB(GetAttachedObjectsARB, 536, GetAttachedObjectsARB@16) - GL_STUB(GetHandleARB, 537, GetHandleARB@4) - GL_STUB(GetInfoLogARB, 538, GetInfoLogARB@16) - GL_STUB(GetObjectParameterfvARB, 539, GetObjectParameterfvARB@12) - GL_STUB(GetObjectParameterivARB, 540, GetObjectParameterivARB@12) - GL_STUB(GetShaderSourceARB, 541, GetShaderSourceARB@16) - GL_STUB(GetUniformLocationARB, 542, GetUniformLocationARB@8) - GL_STUB(GetUniformfvARB, 543, GetUniformfvARB@12) - GL_STUB(GetUniformivARB, 544, GetUniformivARB@12) - GL_STUB(LinkProgramARB, 545, LinkProgramARB@4) - GL_STUB(ShaderSourceARB, 546, ShaderSourceARB@16) - GL_STUB(Uniform1fARB, 547, Uniform1fARB@8) - GL_STUB(Uniform1fvARB, 548, Uniform1fvARB@12) - GL_STUB(Uniform1iARB, 549, Uniform1iARB@8) - GL_STUB(Uniform1ivARB, 550, Uniform1ivARB@12) - GL_STUB(Uniform2fARB, 551, Uniform2fARB@12) - GL_STUB(Uniform2fvARB, 552, Uniform2fvARB@12) - GL_STUB(Uniform2iARB, 553, Uniform2iARB@12) - GL_STUB(Uniform2ivARB, 554, Uniform2ivARB@12) - GL_STUB(Uniform3fARB, 555, Uniform3fARB@16) - GL_STUB(Uniform3fvARB, 556, Uniform3fvARB@12) - GL_STUB(Uniform3iARB, 557, Uniform3iARB@16) - GL_STUB(Uniform3ivARB, 558, Uniform3ivARB@12) - GL_STUB(Uniform4fARB, 559, Uniform4fARB@20) - GL_STUB(Uniform4fvARB, 560, Uniform4fvARB@12) - GL_STUB(Uniform4iARB, 561, Uniform4iARB@20) - GL_STUB(Uniform4ivARB, 562, Uniform4ivARB@12) - GL_STUB(UniformMatrix2fvARB, 563, UniformMatrix2fvARB@16) - GL_STUB(UniformMatrix3fvARB, 564, UniformMatrix3fvARB@16) - GL_STUB(UniformMatrix4fvARB, 565, UniformMatrix4fvARB@16) - GL_STUB(UseProgramObjectARB, 566, UseProgramObjectARB@4) - GL_STUB(ValidateProgramARB, 567, ValidateProgramARB@4) - GL_STUB(BindAttribLocationARB, 568, BindAttribLocationARB@12) - GL_STUB(GetActiveAttribARB, 569, GetActiveAttribARB@28) - GL_STUB(GetAttribLocationARB, 570, GetAttribLocationARB@8) - GL_STUB(DrawBuffersARB, 571, DrawBuffersARB@8) - GL_STUB(ClampColorARB, 572, ClampColorARB@8) - GL_STUB(DrawArraysInstancedARB, 573, DrawArraysInstancedARB@16) - GL_STUB(DrawElementsInstancedARB, 574, DrawElementsInstancedARB@20) - GL_STUB(RenderbufferStorageMultisample, 575, RenderbufferStorageMultisample@20) - GL_STUB(FramebufferTextureARB, 576, FramebufferTextureARB@16) - GL_STUB(FramebufferTextureFaceARB, 577, FramebufferTextureFaceARB@20) - GL_STUB(ProgramParameteriARB, 578, ProgramParameteriARB@12) - GL_STUB(VertexAttribDivisorARB, 579, VertexAttribDivisorARB@8) - GL_STUB(FlushMappedBufferRange, 580, FlushMappedBufferRange@12) - GL_STUB(MapBufferRange, 581, MapBufferRange@16) - GL_STUB(TexBufferARB, 582, TexBufferARB@12) - GL_STUB(BindVertexArray, 583, BindVertexArray@4) - GL_STUB(GenVertexArrays, 584, GenVertexArrays@8) - GL_STUB(CopyBufferSubData, 585, CopyBufferSubData@20) - GL_STUB(ClientWaitSync, 586, ClientWaitSync@12) - GL_STUB(DeleteSync, 587, DeleteSync@4) - GL_STUB(FenceSync, 588, FenceSync@8) - GL_STUB(GetInteger64v, 589, GetInteger64v@8) - GL_STUB(GetSynciv, 590, GetSynciv@20) - GL_STUB(IsSync, 591, IsSync@4) - GL_STUB(WaitSync, 592, WaitSync@12) - GL_STUB(DrawElementsBaseVertex, 593, DrawElementsBaseVertex@20) - GL_STUB(DrawElementsInstancedBaseVertex, 594, DrawElementsInstancedBaseVertex@24) - GL_STUB(DrawRangeElementsBaseVertex, 595, DrawRangeElementsBaseVertex@28) - GL_STUB(MultiDrawElementsBaseVertex, 596, MultiDrawElementsBaseVertex@24) - GL_STUB(BlendEquationSeparateiARB, 597, BlendEquationSeparateiARB@12) - GL_STUB(BlendEquationiARB, 598, BlendEquationiARB@8) - GL_STUB(BlendFuncSeparateiARB, 599, BlendFuncSeparateiARB@20) - GL_STUB(BlendFunciARB, 600, BlendFunciARB@12) - GL_STUB(BindSampler, 601, BindSampler@8) - GL_STUB(DeleteSamplers, 602, DeleteSamplers@8) - GL_STUB(GenSamplers, 603, GenSamplers@8) - GL_STUB(GetSamplerParameterIiv, 604, GetSamplerParameterIiv@12) - GL_STUB(GetSamplerParameterIuiv, 605, GetSamplerParameterIuiv@12) - GL_STUB(GetSamplerParameterfv, 606, GetSamplerParameterfv@12) - GL_STUB(GetSamplerParameteriv, 607, GetSamplerParameteriv@12) - GL_STUB(IsSampler, 608, IsSampler@4) - GL_STUB(SamplerParameterIiv, 609, SamplerParameterIiv@12) - GL_STUB(SamplerParameterIuiv, 610, SamplerParameterIuiv@12) - GL_STUB(SamplerParameterf, 611, SamplerParameterf@12) - GL_STUB(SamplerParameterfv, 612, SamplerParameterfv@12) - GL_STUB(SamplerParameteri, 613, SamplerParameteri@12) - GL_STUB(SamplerParameteriv, 614, SamplerParameteriv@12) - GL_STUB(ColorP3ui, 615, ColorP3ui@8) - GL_STUB(ColorP3uiv, 616, ColorP3uiv@8) - GL_STUB(ColorP4ui, 617, ColorP4ui@8) - GL_STUB(ColorP4uiv, 618, ColorP4uiv@8) - GL_STUB(MultiTexCoordP1ui, 619, MultiTexCoordP1ui@12) - GL_STUB(MultiTexCoordP1uiv, 620, MultiTexCoordP1uiv@12) - GL_STUB(MultiTexCoordP2ui, 621, MultiTexCoordP2ui@12) - GL_STUB(MultiTexCoordP2uiv, 622, MultiTexCoordP2uiv@12) - GL_STUB(MultiTexCoordP3ui, 623, MultiTexCoordP3ui@12) - GL_STUB(MultiTexCoordP3uiv, 624, MultiTexCoordP3uiv@12) - GL_STUB(MultiTexCoordP4ui, 625, MultiTexCoordP4ui@12) - GL_STUB(MultiTexCoordP4uiv, 626, MultiTexCoordP4uiv@12) - GL_STUB(NormalP3ui, 627, NormalP3ui@8) - GL_STUB(NormalP3uiv, 628, NormalP3uiv@8) - GL_STUB(SecondaryColorP3ui, 629, SecondaryColorP3ui@8) - GL_STUB(SecondaryColorP3uiv, 630, SecondaryColorP3uiv@8) - GL_STUB(TexCoordP1ui, 631, TexCoordP1ui@8) - GL_STUB(TexCoordP1uiv, 632, TexCoordP1uiv@8) - GL_STUB(TexCoordP2ui, 633, TexCoordP2ui@8) - GL_STUB(TexCoordP2uiv, 634, TexCoordP2uiv@8) - GL_STUB(TexCoordP3ui, 635, TexCoordP3ui@8) - GL_STUB(TexCoordP3uiv, 636, TexCoordP3uiv@8) - GL_STUB(TexCoordP4ui, 637, TexCoordP4ui@8) - GL_STUB(TexCoordP4uiv, 638, TexCoordP4uiv@8) - GL_STUB(VertexAttribP1ui, 639, VertexAttribP1ui@16) - GL_STUB(VertexAttribP1uiv, 640, VertexAttribP1uiv@16) - GL_STUB(VertexAttribP2ui, 641, VertexAttribP2ui@16) - GL_STUB(VertexAttribP2uiv, 642, VertexAttribP2uiv@16) - GL_STUB(VertexAttribP3ui, 643, VertexAttribP3ui@16) - GL_STUB(VertexAttribP3uiv, 644, VertexAttribP3uiv@16) - GL_STUB(VertexAttribP4ui, 645, VertexAttribP4ui@16) - GL_STUB(VertexAttribP4uiv, 646, VertexAttribP4uiv@16) - GL_STUB(VertexP2ui, 647, VertexP2ui@8) - GL_STUB(VertexP2uiv, 648, VertexP2uiv@8) - GL_STUB(VertexP3ui, 649, VertexP3ui@8) - GL_STUB(VertexP3uiv, 650, VertexP3uiv@8) - GL_STUB(VertexP4ui, 651, VertexP4ui@8) - GL_STUB(VertexP4uiv, 652, VertexP4uiv@8) - GL_STUB(BindTransformFeedback, 653, BindTransformFeedback@8) - GL_STUB(DeleteTransformFeedbacks, 654, DeleteTransformFeedbacks@8) - GL_STUB(DrawTransformFeedback, 655, DrawTransformFeedback@8) - GL_STUB(GenTransformFeedbacks, 656, GenTransformFeedbacks@8) - GL_STUB(IsTransformFeedback, 657, IsTransformFeedback@4) - GL_STUB(PauseTransformFeedback, 658, PauseTransformFeedback@0) - GL_STUB(ResumeTransformFeedback, 659, ResumeTransformFeedback@0) - GL_STUB(ClearDepthf, 660, ClearDepthf@4) - GL_STUB(DepthRangef, 661, DepthRangef@8) - GL_STUB(GetShaderPrecisionFormat, 662, GetShaderPrecisionFormat@16) - GL_STUB(ReleaseShaderCompiler, 663, ReleaseShaderCompiler@0) - GL_STUB(ShaderBinary, 664, ShaderBinary@20) - GL_STUB(GetGraphicsResetStatusARB, 665, GetGraphicsResetStatusARB@0) - GL_STUB(GetnColorTableARB, 666, GetnColorTableARB@20) - GL_STUB(GetnCompressedTexImageARB, 667, GetnCompressedTexImageARB@16) - GL_STUB(GetnConvolutionFilterARB, 668, GetnConvolutionFilterARB@20) - GL_STUB(GetnHistogramARB, 669, GetnHistogramARB@24) - GL_STUB(GetnMapdvARB, 670, GetnMapdvARB@16) - GL_STUB(GetnMapfvARB, 671, GetnMapfvARB@16) - GL_STUB(GetnMapivARB, 672, GetnMapivARB@16) - GL_STUB(GetnMinmaxARB, 673, GetnMinmaxARB@24) - GL_STUB(GetnPixelMapfvARB, 674, GetnPixelMapfvARB@12) - GL_STUB(GetnPixelMapuivARB, 675, GetnPixelMapuivARB@12) - GL_STUB(GetnPixelMapusvARB, 676, GetnPixelMapusvARB@12) - GL_STUB(GetnPolygonStippleARB, 677, GetnPolygonStippleARB@8) - GL_STUB(GetnSeparableFilterARB, 678, GetnSeparableFilterARB@32) - GL_STUB(GetnTexImageARB, 679, GetnTexImageARB@24) - GL_STUB(GetnUniformdvARB, 680, GetnUniformdvARB@16) - GL_STUB(GetnUniformfvARB, 681, GetnUniformfvARB@16) - GL_STUB(GetnUniformivARB, 682, GetnUniformivARB@16) - GL_STUB(GetnUniformuivARB, 683, GetnUniformuivARB@16) - GL_STUB(ReadnPixelsARB, 684, ReadnPixelsARB@32) - GL_STUB(TexStorage1D, 685, TexStorage1D@16) - GL_STUB(TexStorage2D, 686, TexStorage2D@20) - GL_STUB(TexStorage3D, 687, TexStorage3D@24) - GL_STUB(TextureStorage1DEXT, 688, TextureStorage1DEXT@20) - GL_STUB(TextureStorage2DEXT, 689, TextureStorage2DEXT@24) - GL_STUB(TextureStorage3DEXT, 690, TextureStorage3DEXT@28) - GL_STUB(PolygonOffsetEXT, 691, PolygonOffsetEXT@8) - GL_STUB(_dispatch_stub_692, 692, _dispatch_stub_692@8) - HIDDEN(GL_PREFIX(_dispatch_stub_692, _dispatch_stub_692@8)) - GL_STUB(_dispatch_stub_693, 693, _dispatch_stub_693@8) - HIDDEN(GL_PREFIX(_dispatch_stub_693, _dispatch_stub_693@8)) - GL_STUB(_dispatch_stub_694, 694, _dispatch_stub_694@8) - HIDDEN(GL_PREFIX(_dispatch_stub_694, _dispatch_stub_694@8)) - GL_STUB(_dispatch_stub_695, 695, _dispatch_stub_695@8) - HIDDEN(GL_PREFIX(_dispatch_stub_695, _dispatch_stub_695@8)) - GL_STUB(_dispatch_stub_696, 696, _dispatch_stub_696@8) - HIDDEN(GL_PREFIX(_dispatch_stub_696, _dispatch_stub_696@8)) - GL_STUB(_dispatch_stub_697, 697, _dispatch_stub_697@8) - HIDDEN(GL_PREFIX(_dispatch_stub_697, _dispatch_stub_697@8)) - GL_STUB(_dispatch_stub_698, 698, _dispatch_stub_698@8) - HIDDEN(GL_PREFIX(_dispatch_stub_698, _dispatch_stub_698@8)) - GL_STUB(_dispatch_stub_699, 699, _dispatch_stub_699@4) - HIDDEN(GL_PREFIX(_dispatch_stub_699, _dispatch_stub_699@4)) - GL_STUB(ColorPointerEXT, 700, ColorPointerEXT@20) - GL_STUB(EdgeFlagPointerEXT, 701, EdgeFlagPointerEXT@12) - GL_STUB(IndexPointerEXT, 702, IndexPointerEXT@16) - GL_STUB(NormalPointerEXT, 703, NormalPointerEXT@16) - GL_STUB(TexCoordPointerEXT, 704, TexCoordPointerEXT@20) - GL_STUB(VertexPointerEXT, 705, VertexPointerEXT@20) - GL_STUB(PointParameterfEXT, 706, PointParameterfEXT@8) - GL_STUB(PointParameterfvEXT, 707, PointParameterfvEXT@8) - GL_STUB(LockArraysEXT, 708, LockArraysEXT@8) - GL_STUB(UnlockArraysEXT, 709, UnlockArraysEXT@0) - GL_STUB(SecondaryColor3bEXT, 710, SecondaryColor3bEXT@12) - GL_STUB(SecondaryColor3bvEXT, 711, SecondaryColor3bvEXT@4) - GL_STUB(SecondaryColor3dEXT, 712, SecondaryColor3dEXT@24) - GL_STUB(SecondaryColor3dvEXT, 713, SecondaryColor3dvEXT@4) - GL_STUB(SecondaryColor3fEXT, 714, SecondaryColor3fEXT@12) - GL_STUB(SecondaryColor3fvEXT, 715, SecondaryColor3fvEXT@4) - GL_STUB(SecondaryColor3iEXT, 716, SecondaryColor3iEXT@12) - GL_STUB(SecondaryColor3ivEXT, 717, SecondaryColor3ivEXT@4) - GL_STUB(SecondaryColor3sEXT, 718, SecondaryColor3sEXT@12) - GL_STUB(SecondaryColor3svEXT, 719, SecondaryColor3svEXT@4) - GL_STUB(SecondaryColor3ubEXT, 720, SecondaryColor3ubEXT@12) - GL_STUB(SecondaryColor3ubvEXT, 721, SecondaryColor3ubvEXT@4) - GL_STUB(SecondaryColor3uiEXT, 722, SecondaryColor3uiEXT@12) - GL_STUB(SecondaryColor3uivEXT, 723, SecondaryColor3uivEXT@4) - GL_STUB(SecondaryColor3usEXT, 724, SecondaryColor3usEXT@12) - GL_STUB(SecondaryColor3usvEXT, 725, SecondaryColor3usvEXT@4) - GL_STUB(SecondaryColorPointerEXT, 726, SecondaryColorPointerEXT@16) - GL_STUB(MultiDrawArraysEXT, 727, MultiDrawArraysEXT@16) - GL_STUB(MultiDrawElementsEXT, 728, MultiDrawElementsEXT@20) - GL_STUB(FogCoordPointerEXT, 729, FogCoordPointerEXT@12) - GL_STUB(FogCoorddEXT, 730, FogCoorddEXT@8) - GL_STUB(FogCoorddvEXT, 731, FogCoorddvEXT@4) - GL_STUB(FogCoordfEXT, 732, FogCoordfEXT@4) - GL_STUB(FogCoordfvEXT, 733, FogCoordfvEXT@4) - GL_STUB(_dispatch_stub_734, 734, _dispatch_stub_734@4) - HIDDEN(GL_PREFIX(_dispatch_stub_734, _dispatch_stub_734@4)) - GL_STUB(BlendFuncSeparateEXT, 735, BlendFuncSeparateEXT@16) - GL_STUB(FlushVertexArrayRangeNV, 736, FlushVertexArrayRangeNV@0) - GL_STUB(VertexArrayRangeNV, 737, VertexArrayRangeNV@8) - GL_STUB(CombinerInputNV, 738, CombinerInputNV@24) - GL_STUB(CombinerOutputNV, 739, CombinerOutputNV@40) - GL_STUB(CombinerParameterfNV, 740, CombinerParameterfNV@8) - GL_STUB(CombinerParameterfvNV, 741, CombinerParameterfvNV@8) - GL_STUB(CombinerParameteriNV, 742, CombinerParameteriNV@8) - GL_STUB(CombinerParameterivNV, 743, CombinerParameterivNV@8) - GL_STUB(FinalCombinerInputNV, 744, FinalCombinerInputNV@16) - GL_STUB(GetCombinerInputParameterfvNV, 745, GetCombinerInputParameterfvNV@20) - GL_STUB(GetCombinerInputParameterivNV, 746, GetCombinerInputParameterivNV@20) - GL_STUB(GetCombinerOutputParameterfvNV, 747, GetCombinerOutputParameterfvNV@16) - GL_STUB(GetCombinerOutputParameterivNV, 748, GetCombinerOutputParameterivNV@16) - GL_STUB(GetFinalCombinerInputParameterfvNV, 749, GetFinalCombinerInputParameterfvNV@12) - GL_STUB(GetFinalCombinerInputParameterivNV, 750, GetFinalCombinerInputParameterivNV@12) - GL_STUB(ResizeBuffersMESA, 751, ResizeBuffersMESA@0) - GL_STUB(WindowPos2dMESA, 752, WindowPos2dMESA@16) - GL_STUB(WindowPos2dvMESA, 753, WindowPos2dvMESA@4) - GL_STUB(WindowPos2fMESA, 754, WindowPos2fMESA@8) - GL_STUB(WindowPos2fvMESA, 755, WindowPos2fvMESA@4) - GL_STUB(WindowPos2iMESA, 756, WindowPos2iMESA@8) - GL_STUB(WindowPos2ivMESA, 757, WindowPos2ivMESA@4) - GL_STUB(WindowPos2sMESA, 758, WindowPos2sMESA@8) - GL_STUB(WindowPos2svMESA, 759, WindowPos2svMESA@4) - GL_STUB(WindowPos3dMESA, 760, WindowPos3dMESA@24) - GL_STUB(WindowPos3dvMESA, 761, WindowPos3dvMESA@4) - GL_STUB(WindowPos3fMESA, 762, WindowPos3fMESA@12) - GL_STUB(WindowPos3fvMESA, 763, WindowPos3fvMESA@4) - GL_STUB(WindowPos3iMESA, 764, WindowPos3iMESA@12) - GL_STUB(WindowPos3ivMESA, 765, WindowPos3ivMESA@4) - GL_STUB(WindowPos3sMESA, 766, WindowPos3sMESA@12) - GL_STUB(WindowPos3svMESA, 767, WindowPos3svMESA@4) - GL_STUB(WindowPos4dMESA, 768, WindowPos4dMESA@32) - GL_STUB(WindowPos4dvMESA, 769, WindowPos4dvMESA@4) - GL_STUB(WindowPos4fMESA, 770, WindowPos4fMESA@16) - GL_STUB(WindowPos4fvMESA, 771, WindowPos4fvMESA@4) - GL_STUB(WindowPos4iMESA, 772, WindowPos4iMESA@16) - GL_STUB(WindowPos4ivMESA, 773, WindowPos4ivMESA@4) - GL_STUB(WindowPos4sMESA, 774, WindowPos4sMESA@16) - GL_STUB(WindowPos4svMESA, 775, WindowPos4svMESA@4) - GL_STUB(_dispatch_stub_776, 776, _dispatch_stub_776@20) - HIDDEN(GL_PREFIX(_dispatch_stub_776, _dispatch_stub_776@20)) - GL_STUB(_dispatch_stub_777, 777, _dispatch_stub_777@24) - HIDDEN(GL_PREFIX(_dispatch_stub_777, _dispatch_stub_777@24)) - GL_STUB(_dispatch_stub_778, 778, _dispatch_stub_778@8) - HIDDEN(GL_PREFIX(_dispatch_stub_778, _dispatch_stub_778@8)) - GL_STUB(_dispatch_stub_779, 779, _dispatch_stub_779@4) - HIDDEN(GL_PREFIX(_dispatch_stub_779, _dispatch_stub_779@4)) - GL_STUB(_dispatch_stub_780, 780, _dispatch_stub_780@8) - HIDDEN(GL_PREFIX(_dispatch_stub_780, _dispatch_stub_780@8)) - GL_STUB(_dispatch_stub_781, 781, _dispatch_stub_781@12) - HIDDEN(GL_PREFIX(_dispatch_stub_781, _dispatch_stub_781@12)) - GL_STUB(_dispatch_stub_782, 782, _dispatch_stub_782@4) - HIDDEN(GL_PREFIX(_dispatch_stub_782, _dispatch_stub_782@4)) - GL_STUB(_dispatch_stub_783, 783, _dispatch_stub_783@8) - HIDDEN(GL_PREFIX(_dispatch_stub_783, _dispatch_stub_783@8)) - GL_STUB(_dispatch_stub_784, 784, _dispatch_stub_784@4) - HIDDEN(GL_PREFIX(_dispatch_stub_784, _dispatch_stub_784@4)) - GL_STUB(AreProgramsResidentNV, 785, AreProgramsResidentNV@12) - GL_STUB(BindProgramNV, 786, BindProgramNV@8) - GL_STUB(DeleteProgramsNV, 787, DeleteProgramsNV@8) - GL_STUB(ExecuteProgramNV, 788, ExecuteProgramNV@12) - GL_STUB(GenProgramsNV, 789, GenProgramsNV@8) - GL_STUB(GetProgramParameterdvNV, 790, GetProgramParameterdvNV@16) - GL_STUB(GetProgramParameterfvNV, 791, GetProgramParameterfvNV@16) - GL_STUB(GetProgramStringNV, 792, GetProgramStringNV@12) - GL_STUB(GetProgramivNV, 793, GetProgramivNV@12) - GL_STUB(GetTrackMatrixivNV, 794, GetTrackMatrixivNV@16) - GL_STUB(GetVertexAttribPointervNV, 795, GetVertexAttribPointervNV@12) - GL_STUB(GetVertexAttribdvNV, 796, GetVertexAttribdvNV@12) - GL_STUB(GetVertexAttribfvNV, 797, GetVertexAttribfvNV@12) - GL_STUB(GetVertexAttribivNV, 798, GetVertexAttribivNV@12) - GL_STUB(IsProgramNV, 799, IsProgramNV@4) - GL_STUB(LoadProgramNV, 800, LoadProgramNV@16) - GL_STUB(ProgramParameters4dvNV, 801, ProgramParameters4dvNV@16) - GL_STUB(ProgramParameters4fvNV, 802, ProgramParameters4fvNV@16) - GL_STUB(RequestResidentProgramsNV, 803, RequestResidentProgramsNV@8) - GL_STUB(TrackMatrixNV, 804, TrackMatrixNV@16) - GL_STUB(VertexAttrib1dNV, 805, VertexAttrib1dNV@12) - GL_STUB(VertexAttrib1dvNV, 806, VertexAttrib1dvNV@8) - GL_STUB(VertexAttrib1fNV, 807, VertexAttrib1fNV@8) - GL_STUB(VertexAttrib1fvNV, 808, VertexAttrib1fvNV@8) - GL_STUB(VertexAttrib1sNV, 809, VertexAttrib1sNV@8) - GL_STUB(VertexAttrib1svNV, 810, VertexAttrib1svNV@8) - GL_STUB(VertexAttrib2dNV, 811, VertexAttrib2dNV@20) - GL_STUB(VertexAttrib2dvNV, 812, VertexAttrib2dvNV@8) - GL_STUB(VertexAttrib2fNV, 813, VertexAttrib2fNV@12) - GL_STUB(VertexAttrib2fvNV, 814, VertexAttrib2fvNV@8) - GL_STUB(VertexAttrib2sNV, 815, VertexAttrib2sNV@12) - GL_STUB(VertexAttrib2svNV, 816, VertexAttrib2svNV@8) - GL_STUB(VertexAttrib3dNV, 817, VertexAttrib3dNV@28) - GL_STUB(VertexAttrib3dvNV, 818, VertexAttrib3dvNV@8) - GL_STUB(VertexAttrib3fNV, 819, VertexAttrib3fNV@16) - GL_STUB(VertexAttrib3fvNV, 820, VertexAttrib3fvNV@8) - GL_STUB(VertexAttrib3sNV, 821, VertexAttrib3sNV@16) - GL_STUB(VertexAttrib3svNV, 822, VertexAttrib3svNV@8) - GL_STUB(VertexAttrib4dNV, 823, VertexAttrib4dNV@36) - GL_STUB(VertexAttrib4dvNV, 824, VertexAttrib4dvNV@8) - GL_STUB(VertexAttrib4fNV, 825, VertexAttrib4fNV@20) - GL_STUB(VertexAttrib4fvNV, 826, VertexAttrib4fvNV@8) - GL_STUB(VertexAttrib4sNV, 827, VertexAttrib4sNV@20) - GL_STUB(VertexAttrib4svNV, 828, VertexAttrib4svNV@8) - GL_STUB(VertexAttrib4ubNV, 829, VertexAttrib4ubNV@20) - GL_STUB(VertexAttrib4ubvNV, 830, VertexAttrib4ubvNV@8) - GL_STUB(VertexAttribPointerNV, 831, VertexAttribPointerNV@20) - GL_STUB(VertexAttribs1dvNV, 832, VertexAttribs1dvNV@12) - GL_STUB(VertexAttribs1fvNV, 833, VertexAttribs1fvNV@12) - GL_STUB(VertexAttribs1svNV, 834, VertexAttribs1svNV@12) - GL_STUB(VertexAttribs2dvNV, 835, VertexAttribs2dvNV@12) - GL_STUB(VertexAttribs2fvNV, 836, VertexAttribs2fvNV@12) - GL_STUB(VertexAttribs2svNV, 837, VertexAttribs2svNV@12) - GL_STUB(VertexAttribs3dvNV, 838, VertexAttribs3dvNV@12) - GL_STUB(VertexAttribs3fvNV, 839, VertexAttribs3fvNV@12) - GL_STUB(VertexAttribs3svNV, 840, VertexAttribs3svNV@12) - GL_STUB(VertexAttribs4dvNV, 841, VertexAttribs4dvNV@12) - GL_STUB(VertexAttribs4fvNV, 842, VertexAttribs4fvNV@12) - GL_STUB(VertexAttribs4svNV, 843, VertexAttribs4svNV@12) - GL_STUB(VertexAttribs4ubvNV, 844, VertexAttribs4ubvNV@12) - GL_STUB(GetTexBumpParameterfvATI, 845, GetTexBumpParameterfvATI@8) - GL_STUB(GetTexBumpParameterivATI, 846, GetTexBumpParameterivATI@8) - GL_STUB(TexBumpParameterfvATI, 847, TexBumpParameterfvATI@8) - GL_STUB(TexBumpParameterivATI, 848, TexBumpParameterivATI@8) - GL_STUB(AlphaFragmentOp1ATI, 849, AlphaFragmentOp1ATI@24) - GL_STUB(AlphaFragmentOp2ATI, 850, AlphaFragmentOp2ATI@36) - GL_STUB(AlphaFragmentOp3ATI, 851, AlphaFragmentOp3ATI@48) - GL_STUB(BeginFragmentShaderATI, 852, BeginFragmentShaderATI@0) - GL_STUB(BindFragmentShaderATI, 853, BindFragmentShaderATI@4) - GL_STUB(ColorFragmentOp1ATI, 854, ColorFragmentOp1ATI@28) - GL_STUB(ColorFragmentOp2ATI, 855, ColorFragmentOp2ATI@40) - GL_STUB(ColorFragmentOp3ATI, 856, ColorFragmentOp3ATI@52) - GL_STUB(DeleteFragmentShaderATI, 857, DeleteFragmentShaderATI@4) - GL_STUB(EndFragmentShaderATI, 858, EndFragmentShaderATI@0) - GL_STUB(GenFragmentShadersATI, 859, GenFragmentShadersATI@4) - GL_STUB(PassTexCoordATI, 860, PassTexCoordATI@12) - GL_STUB(SampleMapATI, 861, SampleMapATI@12) - GL_STUB(SetFragmentShaderConstantATI, 862, SetFragmentShaderConstantATI@8) - GL_STUB(PointParameteriNV, 863, PointParameteriNV@8) - GL_STUB(PointParameterivNV, 864, PointParameterivNV@8) - GL_STUB(_dispatch_stub_865, 865, _dispatch_stub_865@4) - HIDDEN(GL_PREFIX(_dispatch_stub_865, _dispatch_stub_865@4)) - GL_STUB(_dispatch_stub_866, 866, _dispatch_stub_866@4) - HIDDEN(GL_PREFIX(_dispatch_stub_866, _dispatch_stub_866@4)) - GL_STUB(_dispatch_stub_867, 867, _dispatch_stub_867@8) - HIDDEN(GL_PREFIX(_dispatch_stub_867, _dispatch_stub_867@8)) - GL_STUB(_dispatch_stub_868, 868, _dispatch_stub_868@8) - HIDDEN(GL_PREFIX(_dispatch_stub_868, _dispatch_stub_868@8)) - GL_STUB(_dispatch_stub_869, 869, _dispatch_stub_869@4) - HIDDEN(GL_PREFIX(_dispatch_stub_869, _dispatch_stub_869@4)) - GL_STUB(GetProgramNamedParameterdvNV, 870, GetProgramNamedParameterdvNV@16) - GL_STUB(GetProgramNamedParameterfvNV, 871, GetProgramNamedParameterfvNV@16) - GL_STUB(ProgramNamedParameter4dNV, 872, ProgramNamedParameter4dNV@44) - GL_STUB(ProgramNamedParameter4dvNV, 873, ProgramNamedParameter4dvNV@16) - GL_STUB(ProgramNamedParameter4fNV, 874, ProgramNamedParameter4fNV@28) - GL_STUB(ProgramNamedParameter4fvNV, 875, ProgramNamedParameter4fvNV@16) - GL_STUB(PrimitiveRestartIndexNV, 876, PrimitiveRestartIndexNV@4) - GL_STUB(PrimitiveRestartNV, 877, PrimitiveRestartNV@0) - GL_STUB(_dispatch_stub_878, 878, _dispatch_stub_878@16) - HIDDEN(GL_PREFIX(_dispatch_stub_878, _dispatch_stub_878@16)) - GL_STUB(_dispatch_stub_879, 879, _dispatch_stub_879@8) - HIDDEN(GL_PREFIX(_dispatch_stub_879, _dispatch_stub_879@8)) - GL_STUB(BindFramebufferEXT, 880, BindFramebufferEXT@8) - GL_STUB(BindRenderbufferEXT, 881, BindRenderbufferEXT@8) - GL_STUB(CheckFramebufferStatusEXT, 882, CheckFramebufferStatusEXT@4) - GL_STUB(DeleteFramebuffersEXT, 883, DeleteFramebuffersEXT@8) - GL_STUB(DeleteRenderbuffersEXT, 884, DeleteRenderbuffersEXT@8) - GL_STUB(FramebufferRenderbufferEXT, 885, FramebufferRenderbufferEXT@16) - GL_STUB(FramebufferTexture1DEXT, 886, FramebufferTexture1DEXT@20) - GL_STUB(FramebufferTexture2DEXT, 887, FramebufferTexture2DEXT@20) - GL_STUB(FramebufferTexture3DEXT, 888, FramebufferTexture3DEXT@24) - GL_STUB(GenFramebuffersEXT, 889, GenFramebuffersEXT@8) - GL_STUB(GenRenderbuffersEXT, 890, GenRenderbuffersEXT@8) - GL_STUB(GenerateMipmapEXT, 891, GenerateMipmapEXT@4) - GL_STUB(GetFramebufferAttachmentParameterivEXT, 892, GetFramebufferAttachmentParameterivEXT@16) - GL_STUB(GetRenderbufferParameterivEXT, 893, GetRenderbufferParameterivEXT@12) - GL_STUB(IsFramebufferEXT, 894, IsFramebufferEXT@4) - GL_STUB(IsRenderbufferEXT, 895, IsRenderbufferEXT@4) - GL_STUB(RenderbufferStorageEXT, 896, RenderbufferStorageEXT@16) - GL_STUB(_dispatch_stub_897, 897, _dispatch_stub_897@40) - HIDDEN(GL_PREFIX(_dispatch_stub_897, _dispatch_stub_897@40)) - GL_STUB(_dispatch_stub_898, 898, _dispatch_stub_898@12) - HIDDEN(GL_PREFIX(_dispatch_stub_898, _dispatch_stub_898@12)) - GL_STUB(_dispatch_stub_899, 899, _dispatch_stub_899@12) - HIDDEN(GL_PREFIX(_dispatch_stub_899, _dispatch_stub_899@12)) - GL_STUB(BindFragDataLocationEXT, 900, BindFragDataLocationEXT@12) - GL_STUB(GetFragDataLocationEXT, 901, GetFragDataLocationEXT@8) - GL_STUB(GetUniformuivEXT, 902, GetUniformuivEXT@12) - GL_STUB(GetVertexAttribIivEXT, 903, GetVertexAttribIivEXT@12) - GL_STUB(GetVertexAttribIuivEXT, 904, GetVertexAttribIuivEXT@12) - GL_STUB(Uniform1uiEXT, 905, Uniform1uiEXT@8) - GL_STUB(Uniform1uivEXT, 906, Uniform1uivEXT@12) - GL_STUB(Uniform2uiEXT, 907, Uniform2uiEXT@12) - GL_STUB(Uniform2uivEXT, 908, Uniform2uivEXT@12) - GL_STUB(Uniform3uiEXT, 909, Uniform3uiEXT@16) - GL_STUB(Uniform3uivEXT, 910, Uniform3uivEXT@12) - GL_STUB(Uniform4uiEXT, 911, Uniform4uiEXT@20) - GL_STUB(Uniform4uivEXT, 912, Uniform4uivEXT@12) - GL_STUB(VertexAttribI1iEXT, 913, VertexAttribI1iEXT@8) - GL_STUB(VertexAttribI1ivEXT, 914, VertexAttribI1ivEXT@8) - GL_STUB(VertexAttribI1uiEXT, 915, VertexAttribI1uiEXT@8) - GL_STUB(VertexAttribI1uivEXT, 916, VertexAttribI1uivEXT@8) - GL_STUB(VertexAttribI2iEXT, 917, VertexAttribI2iEXT@12) - GL_STUB(VertexAttribI2ivEXT, 918, VertexAttribI2ivEXT@8) - GL_STUB(VertexAttribI2uiEXT, 919, VertexAttribI2uiEXT@12) - GL_STUB(VertexAttribI2uivEXT, 920, VertexAttribI2uivEXT@8) - GL_STUB(VertexAttribI3iEXT, 921, VertexAttribI3iEXT@16) - GL_STUB(VertexAttribI3ivEXT, 922, VertexAttribI3ivEXT@8) - GL_STUB(VertexAttribI3uiEXT, 923, VertexAttribI3uiEXT@16) - GL_STUB(VertexAttribI3uivEXT, 924, VertexAttribI3uivEXT@8) - GL_STUB(VertexAttribI4bvEXT, 925, VertexAttribI4bvEXT@8) - GL_STUB(VertexAttribI4iEXT, 926, VertexAttribI4iEXT@20) - GL_STUB(VertexAttribI4ivEXT, 927, VertexAttribI4ivEXT@8) - GL_STUB(VertexAttribI4svEXT, 928, VertexAttribI4svEXT@8) - GL_STUB(VertexAttribI4ubvEXT, 929, VertexAttribI4ubvEXT@8) - GL_STUB(VertexAttribI4uiEXT, 930, VertexAttribI4uiEXT@20) - GL_STUB(VertexAttribI4uivEXT, 931, VertexAttribI4uivEXT@8) - GL_STUB(VertexAttribI4usvEXT, 932, VertexAttribI4usvEXT@8) - GL_STUB(VertexAttribIPointerEXT, 933, VertexAttribIPointerEXT@20) - GL_STUB(FramebufferTextureLayerEXT, 934, FramebufferTextureLayerEXT@20) - GL_STUB(ColorMaskIndexedEXT, 935, ColorMaskIndexedEXT@20) - GL_STUB(DisableIndexedEXT, 936, DisableIndexedEXT@8) - GL_STUB(EnableIndexedEXT, 937, EnableIndexedEXT@8) - GL_STUB(GetBooleanIndexedvEXT, 938, GetBooleanIndexedvEXT@12) - GL_STUB(GetIntegerIndexedvEXT, 939, GetIntegerIndexedvEXT@12) - GL_STUB(IsEnabledIndexedEXT, 940, IsEnabledIndexedEXT@8) - GL_STUB(ClearColorIiEXT, 941, ClearColorIiEXT@16) - GL_STUB(ClearColorIuiEXT, 942, ClearColorIuiEXT@16) - GL_STUB(GetTexParameterIivEXT, 943, GetTexParameterIivEXT@12) - GL_STUB(GetTexParameterIuivEXT, 944, GetTexParameterIuivEXT@12) - GL_STUB(TexParameterIivEXT, 945, TexParameterIivEXT@12) - GL_STUB(TexParameterIuivEXT, 946, TexParameterIuivEXT@12) - GL_STUB(BeginConditionalRenderNV, 947, BeginConditionalRenderNV@8) - GL_STUB(EndConditionalRenderNV, 948, EndConditionalRenderNV@0) - GL_STUB(BeginTransformFeedbackEXT, 949, BeginTransformFeedbackEXT@4) - GL_STUB(BindBufferBaseEXT, 950, BindBufferBaseEXT@12) - GL_STUB(BindBufferOffsetEXT, 951, BindBufferOffsetEXT@16) - GL_STUB(BindBufferRangeEXT, 952, BindBufferRangeEXT@20) - GL_STUB(EndTransformFeedbackEXT, 953, EndTransformFeedbackEXT@0) - GL_STUB(GetTransformFeedbackVaryingEXT, 954, GetTransformFeedbackVaryingEXT@28) - GL_STUB(TransformFeedbackVaryingsEXT, 955, TransformFeedbackVaryingsEXT@16) - GL_STUB(ProvokingVertexEXT, 956, ProvokingVertexEXT@4) - GL_STUB(_dispatch_stub_957, 957, _dispatch_stub_957@12) - HIDDEN(GL_PREFIX(_dispatch_stub_957, _dispatch_stub_957@12)) - GL_STUB(_dispatch_stub_958, 958, _dispatch_stub_958@12) - HIDDEN(GL_PREFIX(_dispatch_stub_958, _dispatch_stub_958@12)) - GL_STUB(GetObjectParameterivAPPLE, 959, GetObjectParameterivAPPLE@16) - GL_STUB(ObjectPurgeableAPPLE, 960, ObjectPurgeableAPPLE@12) - GL_STUB(ObjectUnpurgeableAPPLE, 961, ObjectUnpurgeableAPPLE@12) - GL_STUB(ActiveProgramEXT, 962, ActiveProgramEXT@4) - GL_STUB(CreateShaderProgramEXT, 963, CreateShaderProgramEXT@8) - GL_STUB(UseShaderProgramEXT, 964, UseShaderProgramEXT@8) - GL_STUB(TextureBarrierNV, 965, TextureBarrierNV@0) - GL_STUB(_dispatch_stub_966, 966, _dispatch_stub_966@16) - HIDDEN(GL_PREFIX(_dispatch_stub_966, _dispatch_stub_966@16)) - GL_STUB(_dispatch_stub_967, 967, _dispatch_stub_967@16) - HIDDEN(GL_PREFIX(_dispatch_stub_967, _dispatch_stub_967@16)) - GL_STUB(_dispatch_stub_968, 968, _dispatch_stub_968@16) - HIDDEN(GL_PREFIX(_dispatch_stub_968, _dispatch_stub_968@16)) - GL_STUB(_dispatch_stub_969, 969, _dispatch_stub_969@12) - HIDDEN(GL_PREFIX(_dispatch_stub_969, _dispatch_stub_969@12)) - GL_STUB(_dispatch_stub_970, 970, _dispatch_stub_970@12) - HIDDEN(GL_PREFIX(_dispatch_stub_970, _dispatch_stub_970@12)) - GL_STUB(EGLImageTargetRenderbufferStorageOES, 971, EGLImageTargetRenderbufferStorageOES@8) - GL_STUB(EGLImageTargetTexture2DOES, 972, EGLImageTargetTexture2DOES@8) - GL_STUB_ALIAS(ArrayElementEXT, 306, ArrayElementEXT@4, ArrayElement, ArrayElement@4) - GL_STUB_ALIAS(BindTextureEXT, 307, BindTextureEXT@8, BindTexture, BindTexture@8) - GL_STUB_ALIAS(DrawArraysEXT, 310, DrawArraysEXT@12, DrawArrays, DrawArrays@12) -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(AreTexturesResidentEXT, 322, AreTexturesResidentEXT@12, AreTexturesResident, AreTexturesResident@12) -#endif - GL_STUB_ALIAS(CopyTexImage1DEXT, 323, CopyTexImage1DEXT@28, CopyTexImage1D, CopyTexImage1D@28) - GL_STUB_ALIAS(CopyTexImage2DEXT, 324, CopyTexImage2DEXT@32, CopyTexImage2D, CopyTexImage2D@32) - GL_STUB_ALIAS(CopyTexSubImage1DEXT, 325, CopyTexSubImage1DEXT@24, CopyTexSubImage1D, CopyTexSubImage1D@24) - GL_STUB_ALIAS(CopyTexSubImage2DEXT, 326, CopyTexSubImage2DEXT@32, CopyTexSubImage2D, CopyTexSubImage2D@32) -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(DeleteTexturesEXT, 327, DeleteTexturesEXT@8, DeleteTextures, DeleteTextures@8) -#endif -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(GenTexturesEXT, 328, GenTexturesEXT@8, GenTextures, GenTextures@8) -#endif - GL_STUB_ALIAS(GetPointervEXT, 329, GetPointervEXT@8, GetPointerv, GetPointerv@8) -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(IsTextureEXT, 330, IsTextureEXT@4, IsTexture, IsTexture@4) -#endif - GL_STUB_ALIAS(PrioritizeTexturesEXT, 331, PrioritizeTexturesEXT@12, PrioritizeTextures, PrioritizeTextures@12) - GL_STUB_ALIAS(TexSubImage1DEXT, 332, TexSubImage1DEXT@28, TexSubImage1D, TexSubImage1D@28) - GL_STUB_ALIAS(TexSubImage2DEXT, 333, TexSubImage2DEXT@36, TexSubImage2D, TexSubImage2D@36) - GL_STUB_ALIAS(BlendColorEXT, 336, BlendColorEXT@16, BlendColor, BlendColor@16) - GL_STUB_ALIAS(BlendEquationEXT, 337, BlendEquationEXT@4, BlendEquation, BlendEquation@4) - GL_STUB_ALIAS(DrawRangeElementsEXT, 338, DrawRangeElementsEXT@24, DrawRangeElements, DrawRangeElements@24) - GL_STUB_ALIAS(ColorTableEXT, 339, ColorTableEXT@24, ColorTable, ColorTable@24) -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(GetColorTableEXT, 343, GetColorTableEXT@16, GetColorTable, GetColorTable@16) -#endif -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(GetColorTableParameterfvEXT, 344, GetColorTableParameterfvEXT@12, GetColorTableParameterfv, GetColorTableParameterfv@12) -#endif -#ifndef GLX_INDIRECT_RENDERING - GL_STUB_ALIAS(GetColorTableParameterivEXT, 345, GetColorTableParameterivEXT@12, GetColorTableParameteriv, GetColorTableParameteriv@12) -#endif - GL_STUB_ALIAS(TexImage3DEXT, 371, TexImage3DEXT@40, TexImage3D, TexImage3D@40) - GL_STUB_ALIAS(TexSubImage3DEXT, 372, TexSubImage3DEXT@44, TexSubImage3D, TexSubImage3D@44) - GL_STUB_ALIAS(CopyTexSubImage3DEXT, 373, CopyTexSubImage3DEXT@36, CopyTexSubImage3D, CopyTexSubImage3D@36) - GL_STUB_ALIAS(ActiveTexture, 374, ActiveTexture@4, ActiveTextureARB, ActiveTextureARB@4) - GL_STUB_ALIAS(ClientActiveTexture, 375, ClientActiveTexture@4, ClientActiveTextureARB, ClientActiveTextureARB@4) - GL_STUB_ALIAS(MultiTexCoord1d, 376, MultiTexCoord1d@12, MultiTexCoord1dARB, MultiTexCoord1dARB@12) - GL_STUB_ALIAS(MultiTexCoord1dv, 377, MultiTexCoord1dv@8, MultiTexCoord1dvARB, MultiTexCoord1dvARB@8) - GL_STUB_ALIAS(MultiTexCoord1f, 378, MultiTexCoord1f@8, MultiTexCoord1fARB, MultiTexCoord1fARB@8) - GL_STUB_ALIAS(MultiTexCoord1fv, 379, MultiTexCoord1fv@8, MultiTexCoord1fvARB, MultiTexCoord1fvARB@8) - GL_STUB_ALIAS(MultiTexCoord1i, 380, MultiTexCoord1i@8, MultiTexCoord1iARB, MultiTexCoord1iARB@8) - GL_STUB_ALIAS(MultiTexCoord1iv, 381, MultiTexCoord1iv@8, MultiTexCoord1ivARB, MultiTexCoord1ivARB@8) - GL_STUB_ALIAS(MultiTexCoord1s, 382, MultiTexCoord1s@8, MultiTexCoord1sARB, MultiTexCoord1sARB@8) - GL_STUB_ALIAS(MultiTexCoord1sv, 383, MultiTexCoord1sv@8, MultiTexCoord1svARB, MultiTexCoord1svARB@8) - GL_STUB_ALIAS(MultiTexCoord2d, 384, MultiTexCoord2d@20, MultiTexCoord2dARB, MultiTexCoord2dARB@20) - GL_STUB_ALIAS(MultiTexCoord2dv, 385, MultiTexCoord2dv@8, MultiTexCoord2dvARB, MultiTexCoord2dvARB@8) - GL_STUB_ALIAS(MultiTexCoord2f, 386, MultiTexCoord2f@12, MultiTexCoord2fARB, MultiTexCoord2fARB@12) - GL_STUB_ALIAS(MultiTexCoord2fv, 387, MultiTexCoord2fv@8, MultiTexCoord2fvARB, MultiTexCoord2fvARB@8) - GL_STUB_ALIAS(MultiTexCoord2i, 388, MultiTexCoord2i@12, MultiTexCoord2iARB, MultiTexCoord2iARB@12) - GL_STUB_ALIAS(MultiTexCoord2iv, 389, MultiTexCoord2iv@8, MultiTexCoord2ivARB, MultiTexCoord2ivARB@8) - GL_STUB_ALIAS(MultiTexCoord2s, 390, MultiTexCoord2s@12, MultiTexCoord2sARB, MultiTexCoord2sARB@12) - GL_STUB_ALIAS(MultiTexCoord2sv, 391, MultiTexCoord2sv@8, MultiTexCoord2svARB, MultiTexCoord2svARB@8) - GL_STUB_ALIAS(MultiTexCoord3d, 392, MultiTexCoord3d@28, MultiTexCoord3dARB, MultiTexCoord3dARB@28) - GL_STUB_ALIAS(MultiTexCoord3dv, 393, MultiTexCoord3dv@8, MultiTexCoord3dvARB, MultiTexCoord3dvARB@8) - GL_STUB_ALIAS(MultiTexCoord3f, 394, MultiTexCoord3f@16, MultiTexCoord3fARB, MultiTexCoord3fARB@16) - GL_STUB_ALIAS(MultiTexCoord3fv, 395, MultiTexCoord3fv@8, MultiTexCoord3fvARB, MultiTexCoord3fvARB@8) - GL_STUB_ALIAS(MultiTexCoord3i, 396, MultiTexCoord3i@16, MultiTexCoord3iARB, MultiTexCoord3iARB@16) - GL_STUB_ALIAS(MultiTexCoord3iv, 397, MultiTexCoord3iv@8, MultiTexCoord3ivARB, MultiTexCoord3ivARB@8) - GL_STUB_ALIAS(MultiTexCoord3s, 398, MultiTexCoord3s@16, MultiTexCoord3sARB, MultiTexCoord3sARB@16) - GL_STUB_ALIAS(MultiTexCoord3sv, 399, MultiTexCoord3sv@8, MultiTexCoord3svARB, MultiTexCoord3svARB@8) - GL_STUB_ALIAS(MultiTexCoord4d, 400, MultiTexCoord4d@36, MultiTexCoord4dARB, MultiTexCoord4dARB@36) - GL_STUB_ALIAS(MultiTexCoord4dv, 401, MultiTexCoord4dv@8, MultiTexCoord4dvARB, MultiTexCoord4dvARB@8) - GL_STUB_ALIAS(MultiTexCoord4f, 402, MultiTexCoord4f@20, MultiTexCoord4fARB, MultiTexCoord4fARB@20) - GL_STUB_ALIAS(MultiTexCoord4fv, 403, MultiTexCoord4fv@8, MultiTexCoord4fvARB, MultiTexCoord4fvARB@8) - GL_STUB_ALIAS(MultiTexCoord4i, 404, MultiTexCoord4i@20, MultiTexCoord4iARB, MultiTexCoord4iARB@20) - GL_STUB_ALIAS(MultiTexCoord4iv, 405, MultiTexCoord4iv@8, MultiTexCoord4ivARB, MultiTexCoord4ivARB@8) - GL_STUB_ALIAS(MultiTexCoord4s, 406, MultiTexCoord4s@20, MultiTexCoord4sARB, MultiTexCoord4sARB@20) - GL_STUB_ALIAS(MultiTexCoord4sv, 407, MultiTexCoord4sv@8, MultiTexCoord4svARB, MultiTexCoord4svARB@8) - GL_STUB_ALIAS(LoadTransposeMatrixd, 441, LoadTransposeMatrixd@4, LoadTransposeMatrixdARB, LoadTransposeMatrixdARB@4) - GL_STUB_ALIAS(LoadTransposeMatrixf, 442, LoadTransposeMatrixf@4, LoadTransposeMatrixfARB, LoadTransposeMatrixfARB@4) - GL_STUB_ALIAS(MultTransposeMatrixd, 443, MultTransposeMatrixd@4, MultTransposeMatrixdARB, MultTransposeMatrixdARB@4) - GL_STUB_ALIAS(MultTransposeMatrixf, 444, MultTransposeMatrixf@4, MultTransposeMatrixfARB, MultTransposeMatrixfARB@4) - GL_STUB_ALIAS(SampleCoverage, 445, SampleCoverage@8, SampleCoverageARB, SampleCoverageARB@8) - GL_STUB_ALIAS(CompressedTexImage1D, 446, CompressedTexImage1D@28, CompressedTexImage1DARB, CompressedTexImage1DARB@28) - GL_STUB_ALIAS(CompressedTexImage2D, 447, CompressedTexImage2D@32, CompressedTexImage2DARB, CompressedTexImage2DARB@32) - GL_STUB_ALIAS(CompressedTexImage3D, 448, CompressedTexImage3D@36, CompressedTexImage3DARB, CompressedTexImage3DARB@36) - GL_STUB_ALIAS(CompressedTexSubImage1D, 449, CompressedTexSubImage1D@28, CompressedTexSubImage1DARB, CompressedTexSubImage1DARB@28) - GL_STUB_ALIAS(CompressedTexSubImage2D, 450, CompressedTexSubImage2D@36, CompressedTexSubImage2DARB, CompressedTexSubImage2DARB@36) - GL_STUB_ALIAS(CompressedTexSubImage3D, 451, CompressedTexSubImage3D@44, CompressedTexSubImage3DARB, CompressedTexSubImage3DARB@44) - GL_STUB_ALIAS(GetCompressedTexImage, 452, GetCompressedTexImage@12, GetCompressedTexImageARB, GetCompressedTexImageARB@12) - GL_STUB_ALIAS(DisableVertexAttribArray, 453, DisableVertexAttribArray@4, DisableVertexAttribArrayARB, DisableVertexAttribArrayARB@4) - GL_STUB_ALIAS(EnableVertexAttribArray, 454, EnableVertexAttribArray@4, EnableVertexAttribArrayARB, EnableVertexAttribArrayARB@4) - GL_STUB_ALIAS(GetVertexAttribdv, 461, GetVertexAttribdv@12, GetVertexAttribdvARB, GetVertexAttribdvARB@12) - GL_STUB_ALIAS(GetVertexAttribfv, 462, GetVertexAttribfv@12, GetVertexAttribfvARB, GetVertexAttribfvARB@12) - GL_STUB_ALIAS(GetVertexAttribiv, 463, GetVertexAttribiv@12, GetVertexAttribivARB, GetVertexAttribivARB@12) - GL_STUB_ALIAS(ProgramParameter4dNV, 464, ProgramParameter4dNV@40, ProgramEnvParameter4dARB, ProgramEnvParameter4dARB@40) - GL_STUB_ALIAS(ProgramParameter4dvNV, 465, ProgramParameter4dvNV@12, ProgramEnvParameter4dvARB, ProgramEnvParameter4dvARB@12) - GL_STUB_ALIAS(ProgramParameter4fNV, 466, ProgramParameter4fNV@24, ProgramEnvParameter4fARB, ProgramEnvParameter4fARB@24) - GL_STUB_ALIAS(ProgramParameter4fvNV, 467, ProgramParameter4fvNV@12, ProgramEnvParameter4fvARB, ProgramEnvParameter4fvARB@12) - GL_STUB_ALIAS(VertexAttrib1d, 473, VertexAttrib1d@12, VertexAttrib1dARB, VertexAttrib1dARB@12) - GL_STUB_ALIAS(VertexAttrib1dv, 474, VertexAttrib1dv@8, VertexAttrib1dvARB, VertexAttrib1dvARB@8) - GL_STUB_ALIAS(VertexAttrib1f, 475, VertexAttrib1f@8, VertexAttrib1fARB, VertexAttrib1fARB@8) - GL_STUB_ALIAS(VertexAttrib1fv, 476, VertexAttrib1fv@8, VertexAttrib1fvARB, VertexAttrib1fvARB@8) - GL_STUB_ALIAS(VertexAttrib1s, 477, VertexAttrib1s@8, VertexAttrib1sARB, VertexAttrib1sARB@8) - GL_STUB_ALIAS(VertexAttrib1sv, 478, VertexAttrib1sv@8, VertexAttrib1svARB, VertexAttrib1svARB@8) - GL_STUB_ALIAS(VertexAttrib2d, 479, VertexAttrib2d@20, VertexAttrib2dARB, VertexAttrib2dARB@20) - GL_STUB_ALIAS(VertexAttrib2dv, 480, VertexAttrib2dv@8, VertexAttrib2dvARB, VertexAttrib2dvARB@8) - GL_STUB_ALIAS(VertexAttrib2f, 481, VertexAttrib2f@12, VertexAttrib2fARB, VertexAttrib2fARB@12) - GL_STUB_ALIAS(VertexAttrib2fv, 482, VertexAttrib2fv@8, VertexAttrib2fvARB, VertexAttrib2fvARB@8) - GL_STUB_ALIAS(VertexAttrib2s, 483, VertexAttrib2s@12, VertexAttrib2sARB, VertexAttrib2sARB@12) - GL_STUB_ALIAS(VertexAttrib2sv, 484, VertexAttrib2sv@8, VertexAttrib2svARB, VertexAttrib2svARB@8) - GL_STUB_ALIAS(VertexAttrib3d, 485, VertexAttrib3d@28, VertexAttrib3dARB, VertexAttrib3dARB@28) - GL_STUB_ALIAS(VertexAttrib3dv, 486, VertexAttrib3dv@8, VertexAttrib3dvARB, VertexAttrib3dvARB@8) - GL_STUB_ALIAS(VertexAttrib3f, 487, VertexAttrib3f@16, VertexAttrib3fARB, VertexAttrib3fARB@16) - GL_STUB_ALIAS(VertexAttrib3fv, 488, VertexAttrib3fv@8, VertexAttrib3fvARB, VertexAttrib3fvARB@8) - GL_STUB_ALIAS(VertexAttrib3s, 489, VertexAttrib3s@16, VertexAttrib3sARB, VertexAttrib3sARB@16) - GL_STUB_ALIAS(VertexAttrib3sv, 490, VertexAttrib3sv@8, VertexAttrib3svARB, VertexAttrib3svARB@8) - GL_STUB_ALIAS(VertexAttrib4Nbv, 491, VertexAttrib4Nbv@8, VertexAttrib4NbvARB, VertexAttrib4NbvARB@8) - GL_STUB_ALIAS(VertexAttrib4Niv, 492, VertexAttrib4Niv@8, VertexAttrib4NivARB, VertexAttrib4NivARB@8) - GL_STUB_ALIAS(VertexAttrib4Nsv, 493, VertexAttrib4Nsv@8, VertexAttrib4NsvARB, VertexAttrib4NsvARB@8) - GL_STUB_ALIAS(VertexAttrib4Nub, 494, VertexAttrib4Nub@20, VertexAttrib4NubARB, VertexAttrib4NubARB@20) - GL_STUB_ALIAS(VertexAttrib4Nubv, 495, VertexAttrib4Nubv@8, VertexAttrib4NubvARB, VertexAttrib4NubvARB@8) - GL_STUB_ALIAS(VertexAttrib4Nuiv, 496, VertexAttrib4Nuiv@8, VertexAttrib4NuivARB, VertexAttrib4NuivARB@8) - GL_STUB_ALIAS(VertexAttrib4Nusv, 497, VertexAttrib4Nusv@8, VertexAttrib4NusvARB, VertexAttrib4NusvARB@8) - GL_STUB_ALIAS(VertexAttrib4bv, 498, VertexAttrib4bv@8, VertexAttrib4bvARB, VertexAttrib4bvARB@8) - GL_STUB_ALIAS(VertexAttrib4d, 499, VertexAttrib4d@36, VertexAttrib4dARB, VertexAttrib4dARB@36) - GL_STUB_ALIAS(VertexAttrib4dv, 500, VertexAttrib4dv@8, VertexAttrib4dvARB, VertexAttrib4dvARB@8) - GL_STUB_ALIAS(VertexAttrib4f, 501, VertexAttrib4f@20, VertexAttrib4fARB, VertexAttrib4fARB@20) - GL_STUB_ALIAS(VertexAttrib4fv, 502, VertexAttrib4fv@8, VertexAttrib4fvARB, VertexAttrib4fvARB@8) - GL_STUB_ALIAS(VertexAttrib4iv, 503, VertexAttrib4iv@8, VertexAttrib4ivARB, VertexAttrib4ivARB@8) - GL_STUB_ALIAS(VertexAttrib4s, 504, VertexAttrib4s@20, VertexAttrib4sARB, VertexAttrib4sARB@20) - GL_STUB_ALIAS(VertexAttrib4sv, 505, VertexAttrib4sv@8, VertexAttrib4svARB, VertexAttrib4svARB@8) - GL_STUB_ALIAS(VertexAttrib4ubv, 506, VertexAttrib4ubv@8, VertexAttrib4ubvARB, VertexAttrib4ubvARB@8) - GL_STUB_ALIAS(VertexAttrib4uiv, 507, VertexAttrib4uiv@8, VertexAttrib4uivARB, VertexAttrib4uivARB@8) - GL_STUB_ALIAS(VertexAttrib4usv, 508, VertexAttrib4usv@8, VertexAttrib4usvARB, VertexAttrib4usvARB@8) - GL_STUB_ALIAS(VertexAttribPointer, 509, VertexAttribPointer@24, VertexAttribPointerARB, VertexAttribPointerARB@24) - GL_STUB_ALIAS(BindBuffer, 510, BindBuffer@8, BindBufferARB, BindBufferARB@8) - GL_STUB_ALIAS(BufferData, 511, BufferData@16, BufferDataARB, BufferDataARB@16) - GL_STUB_ALIAS(BufferSubData, 512, BufferSubData@16, BufferSubDataARB, BufferSubDataARB@16) - GL_STUB_ALIAS(DeleteBuffers, 513, DeleteBuffers@8, DeleteBuffersARB, DeleteBuffersARB@8) - GL_STUB_ALIAS(GenBuffers, 514, GenBuffers@8, GenBuffersARB, GenBuffersARB@8) - GL_STUB_ALIAS(GetBufferParameteriv, 515, GetBufferParameteriv@12, GetBufferParameterivARB, GetBufferParameterivARB@12) - GL_STUB_ALIAS(GetBufferPointerv, 516, GetBufferPointerv@12, GetBufferPointervARB, GetBufferPointervARB@12) - GL_STUB_ALIAS(GetBufferSubData, 517, GetBufferSubData@16, GetBufferSubDataARB, GetBufferSubDataARB@16) - GL_STUB_ALIAS(IsBuffer, 518, IsBuffer@4, IsBufferARB, IsBufferARB@4) - GL_STUB_ALIAS(MapBuffer, 519, MapBuffer@8, MapBufferARB, MapBufferARB@8) - GL_STUB_ALIAS(UnmapBuffer, 520, UnmapBuffer@4, UnmapBufferARB, UnmapBufferARB@4) - GL_STUB_ALIAS(BeginQuery, 521, BeginQuery@8, BeginQueryARB, BeginQueryARB@8) - GL_STUB_ALIAS(DeleteQueries, 522, DeleteQueries@8, DeleteQueriesARB, DeleteQueriesARB@8) - GL_STUB_ALIAS(EndQuery, 523, EndQuery@4, EndQueryARB, EndQueryARB@4) - GL_STUB_ALIAS(GenQueries, 524, GenQueries@8, GenQueriesARB, GenQueriesARB@8) - GL_STUB_ALIAS(GetQueryObjectiv, 525, GetQueryObjectiv@12, GetQueryObjectivARB, GetQueryObjectivARB@12) - GL_STUB_ALIAS(GetQueryObjectuiv, 526, GetQueryObjectuiv@12, GetQueryObjectuivARB, GetQueryObjectuivARB@12) - GL_STUB_ALIAS(GetQueryiv, 527, GetQueryiv@12, GetQueryivARB, GetQueryivARB@12) - GL_STUB_ALIAS(IsQuery, 528, IsQuery@4, IsQueryARB, IsQueryARB@4) - GL_STUB_ALIAS(CompileShader, 530, CompileShader@4, CompileShaderARB, CompileShaderARB@4) - GL_STUB_ALIAS(GetActiveUniform, 535, GetActiveUniform@28, GetActiveUniformARB, GetActiveUniformARB@28) - GL_STUB_ALIAS(GetShaderSource, 541, GetShaderSource@16, GetShaderSourceARB, GetShaderSourceARB@16) - GL_STUB_ALIAS(GetUniformLocation, 542, GetUniformLocation@8, GetUniformLocationARB, GetUniformLocationARB@8) - GL_STUB_ALIAS(GetUniformfv, 543, GetUniformfv@12, GetUniformfvARB, GetUniformfvARB@12) - GL_STUB_ALIAS(GetUniformiv, 544, GetUniformiv@12, GetUniformivARB, GetUniformivARB@12) - GL_STUB_ALIAS(LinkProgram, 545, LinkProgram@4, LinkProgramARB, LinkProgramARB@4) - GL_STUB_ALIAS(ShaderSource, 546, ShaderSource@16, ShaderSourceARB, ShaderSourceARB@16) - GL_STUB_ALIAS(Uniform1f, 547, Uniform1f@8, Uniform1fARB, Uniform1fARB@8) - GL_STUB_ALIAS(Uniform1fv, 548, Uniform1fv@12, Uniform1fvARB, Uniform1fvARB@12) - GL_STUB_ALIAS(Uniform1i, 549, Uniform1i@8, Uniform1iARB, Uniform1iARB@8) - GL_STUB_ALIAS(Uniform1iv, 550, Uniform1iv@12, Uniform1ivARB, Uniform1ivARB@12) - GL_STUB_ALIAS(Uniform2f, 551, Uniform2f@12, Uniform2fARB, Uniform2fARB@12) - GL_STUB_ALIAS(Uniform2fv, 552, Uniform2fv@12, Uniform2fvARB, Uniform2fvARB@12) - GL_STUB_ALIAS(Uniform2i, 553, Uniform2i@12, Uniform2iARB, Uniform2iARB@12) - GL_STUB_ALIAS(Uniform2iv, 554, Uniform2iv@12, Uniform2ivARB, Uniform2ivARB@12) - GL_STUB_ALIAS(Uniform3f, 555, Uniform3f@16, Uniform3fARB, Uniform3fARB@16) - GL_STUB_ALIAS(Uniform3fv, 556, Uniform3fv@12, Uniform3fvARB, Uniform3fvARB@12) - GL_STUB_ALIAS(Uniform3i, 557, Uniform3i@16, Uniform3iARB, Uniform3iARB@16) - GL_STUB_ALIAS(Uniform3iv, 558, Uniform3iv@12, Uniform3ivARB, Uniform3ivARB@12) - GL_STUB_ALIAS(Uniform4f, 559, Uniform4f@20, Uniform4fARB, Uniform4fARB@20) - GL_STUB_ALIAS(Uniform4fv, 560, Uniform4fv@12, Uniform4fvARB, Uniform4fvARB@12) - GL_STUB_ALIAS(Uniform4i, 561, Uniform4i@20, Uniform4iARB, Uniform4iARB@20) - GL_STUB_ALIAS(Uniform4iv, 562, Uniform4iv@12, Uniform4ivARB, Uniform4ivARB@12) - GL_STUB_ALIAS(UniformMatrix2fv, 563, UniformMatrix2fv@16, UniformMatrix2fvARB, UniformMatrix2fvARB@16) - GL_STUB_ALIAS(UniformMatrix3fv, 564, UniformMatrix3fv@16, UniformMatrix3fvARB, UniformMatrix3fvARB@16) - GL_STUB_ALIAS(UniformMatrix4fv, 565, UniformMatrix4fv@16, UniformMatrix4fvARB, UniformMatrix4fvARB@16) - GL_STUB_ALIAS(UseProgram, 566, UseProgram@4, UseProgramObjectARB, UseProgramObjectARB@4) - GL_STUB_ALIAS(ValidateProgram, 567, ValidateProgram@4, ValidateProgramARB, ValidateProgramARB@4) - GL_STUB_ALIAS(BindAttribLocation, 568, BindAttribLocation@12, BindAttribLocationARB, BindAttribLocationARB@12) - GL_STUB_ALIAS(GetActiveAttrib, 569, GetActiveAttrib@28, GetActiveAttribARB, GetActiveAttribARB@28) - GL_STUB_ALIAS(GetAttribLocation, 570, GetAttribLocation@8, GetAttribLocationARB, GetAttribLocationARB@8) - GL_STUB_ALIAS(DrawBuffers, 571, DrawBuffers@8, DrawBuffersARB, DrawBuffersARB@8) - GL_STUB_ALIAS(DrawBuffersATI, 571, DrawBuffersATI@8, DrawBuffersARB, DrawBuffersARB@8) - GL_STUB_ALIAS(DrawBuffersNV, 571, DrawBuffersNV@8, DrawBuffersARB, DrawBuffersARB@8) - GL_STUB_ALIAS(DrawArraysInstancedEXT, 573, DrawArraysInstancedEXT@16, DrawArraysInstancedARB, DrawArraysInstancedARB@16) - GL_STUB_ALIAS(DrawArraysInstanced, 573, DrawArraysInstanced@16, DrawArraysInstancedARB, DrawArraysInstancedARB@16) - GL_STUB_ALIAS(DrawElementsInstancedEXT, 574, DrawElementsInstancedEXT@20, DrawElementsInstancedARB, DrawElementsInstancedARB@20) - GL_STUB_ALIAS(DrawElementsInstanced, 574, DrawElementsInstanced@20, DrawElementsInstancedARB, DrawElementsInstancedARB@20) - GL_STUB_ALIAS(RenderbufferStorageMultisampleEXT, 575, RenderbufferStorageMultisampleEXT@20, RenderbufferStorageMultisample, RenderbufferStorageMultisample@20) - GL_STUB_ALIAS(BlendEquationSeparateIndexedAMD, 597, BlendEquationSeparateIndexedAMD@12, BlendEquationSeparateiARB, BlendEquationSeparateiARB@12) - GL_STUB_ALIAS(BlendEquationIndexedAMD, 598, BlendEquationIndexedAMD@8, BlendEquationiARB, BlendEquationiARB@8) - GL_STUB_ALIAS(BlendFuncSeparateIndexedAMD, 599, BlendFuncSeparateIndexedAMD@20, BlendFuncSeparateiARB, BlendFuncSeparateiARB@20) - GL_STUB_ALIAS(BlendFuncIndexedAMD, 600, BlendFuncIndexedAMD@12, BlendFunciARB, BlendFunciARB@12) - GL_STUB_ALIAS(PointParameterf, 706, PointParameterf@8, PointParameterfEXT, PointParameterfEXT@8) - GL_STUB_ALIAS(PointParameterfARB, 706, PointParameterfARB@8, PointParameterfEXT, PointParameterfEXT@8) - GL_STUB_ALIAS(PointParameterfv, 707, PointParameterfv@8, PointParameterfvEXT, PointParameterfvEXT@8) - GL_STUB_ALIAS(PointParameterfvARB, 707, PointParameterfvARB@8, PointParameterfvEXT, PointParameterfvEXT@8) - GL_STUB_ALIAS(SecondaryColor3b, 710, SecondaryColor3b@12, SecondaryColor3bEXT, SecondaryColor3bEXT@12) - GL_STUB_ALIAS(SecondaryColor3bv, 711, SecondaryColor3bv@4, SecondaryColor3bvEXT, SecondaryColor3bvEXT@4) - GL_STUB_ALIAS(SecondaryColor3d, 712, SecondaryColor3d@24, SecondaryColor3dEXT, SecondaryColor3dEXT@24) - GL_STUB_ALIAS(SecondaryColor3dv, 713, SecondaryColor3dv@4, SecondaryColor3dvEXT, SecondaryColor3dvEXT@4) - GL_STUB_ALIAS(SecondaryColor3f, 714, SecondaryColor3f@12, SecondaryColor3fEXT, SecondaryColor3fEXT@12) - GL_STUB_ALIAS(SecondaryColor3fv, 715, SecondaryColor3fv@4, SecondaryColor3fvEXT, SecondaryColor3fvEXT@4) - GL_STUB_ALIAS(SecondaryColor3i, 716, SecondaryColor3i@12, SecondaryColor3iEXT, SecondaryColor3iEXT@12) - GL_STUB_ALIAS(SecondaryColor3iv, 717, SecondaryColor3iv@4, SecondaryColor3ivEXT, SecondaryColor3ivEXT@4) - GL_STUB_ALIAS(SecondaryColor3s, 718, SecondaryColor3s@12, SecondaryColor3sEXT, SecondaryColor3sEXT@12) - GL_STUB_ALIAS(SecondaryColor3sv, 719, SecondaryColor3sv@4, SecondaryColor3svEXT, SecondaryColor3svEXT@4) - GL_STUB_ALIAS(SecondaryColor3ub, 720, SecondaryColor3ub@12, SecondaryColor3ubEXT, SecondaryColor3ubEXT@12) - GL_STUB_ALIAS(SecondaryColor3ubv, 721, SecondaryColor3ubv@4, SecondaryColor3ubvEXT, SecondaryColor3ubvEXT@4) - GL_STUB_ALIAS(SecondaryColor3ui, 722, SecondaryColor3ui@12, SecondaryColor3uiEXT, SecondaryColor3uiEXT@12) - GL_STUB_ALIAS(SecondaryColor3uiv, 723, SecondaryColor3uiv@4, SecondaryColor3uivEXT, SecondaryColor3uivEXT@4) - GL_STUB_ALIAS(SecondaryColor3us, 724, SecondaryColor3us@12, SecondaryColor3usEXT, SecondaryColor3usEXT@12) - GL_STUB_ALIAS(SecondaryColor3usv, 725, SecondaryColor3usv@4, SecondaryColor3usvEXT, SecondaryColor3usvEXT@4) - GL_STUB_ALIAS(SecondaryColorPointer, 726, SecondaryColorPointer@16, SecondaryColorPointerEXT, SecondaryColorPointerEXT@16) - GL_STUB_ALIAS(MultiDrawArrays, 727, MultiDrawArrays@16, MultiDrawArraysEXT, MultiDrawArraysEXT@16) - GL_STUB_ALIAS(MultiDrawElements, 728, MultiDrawElements@20, MultiDrawElementsEXT, MultiDrawElementsEXT@20) - GL_STUB_ALIAS(FogCoordPointer, 729, FogCoordPointer@12, FogCoordPointerEXT, FogCoordPointerEXT@12) - GL_STUB_ALIAS(FogCoordd, 730, FogCoordd@8, FogCoorddEXT, FogCoorddEXT@8) - GL_STUB_ALIAS(FogCoorddv, 731, FogCoorddv@4, FogCoorddvEXT, FogCoorddvEXT@4) - GL_STUB_ALIAS(FogCoordf, 732, FogCoordf@4, FogCoordfEXT, FogCoordfEXT@4) - GL_STUB_ALIAS(FogCoordfv, 733, FogCoordfv@4, FogCoordfvEXT, FogCoordfvEXT@4) - GL_STUB_ALIAS(BlendFuncSeparate, 735, BlendFuncSeparate@16, BlendFuncSeparateEXT, BlendFuncSeparateEXT@16) - GL_STUB_ALIAS(WindowPos2d, 752, WindowPos2d@16, WindowPos2dMESA, WindowPos2dMESA@16) - GL_STUB_ALIAS(WindowPos2dARB, 752, WindowPos2dARB@16, WindowPos2dMESA, WindowPos2dMESA@16) - GL_STUB_ALIAS(WindowPos2dv, 753, WindowPos2dv@4, WindowPos2dvMESA, WindowPos2dvMESA@4) - GL_STUB_ALIAS(WindowPos2dvARB, 753, WindowPos2dvARB@4, WindowPos2dvMESA, WindowPos2dvMESA@4) - GL_STUB_ALIAS(WindowPos2f, 754, WindowPos2f@8, WindowPos2fMESA, WindowPos2fMESA@8) - GL_STUB_ALIAS(WindowPos2fARB, 754, WindowPos2fARB@8, WindowPos2fMESA, WindowPos2fMESA@8) - GL_STUB_ALIAS(WindowPos2fv, 755, WindowPos2fv@4, WindowPos2fvMESA, WindowPos2fvMESA@4) - GL_STUB_ALIAS(WindowPos2fvARB, 755, WindowPos2fvARB@4, WindowPos2fvMESA, WindowPos2fvMESA@4) - GL_STUB_ALIAS(WindowPos2i, 756, WindowPos2i@8, WindowPos2iMESA, WindowPos2iMESA@8) - GL_STUB_ALIAS(WindowPos2iARB, 756, WindowPos2iARB@8, WindowPos2iMESA, WindowPos2iMESA@8) - GL_STUB_ALIAS(WindowPos2iv, 757, WindowPos2iv@4, WindowPos2ivMESA, WindowPos2ivMESA@4) - GL_STUB_ALIAS(WindowPos2ivARB, 757, WindowPos2ivARB@4, WindowPos2ivMESA, WindowPos2ivMESA@4) - GL_STUB_ALIAS(WindowPos2s, 758, WindowPos2s@8, WindowPos2sMESA, WindowPos2sMESA@8) - GL_STUB_ALIAS(WindowPos2sARB, 758, WindowPos2sARB@8, WindowPos2sMESA, WindowPos2sMESA@8) - GL_STUB_ALIAS(WindowPos2sv, 759, WindowPos2sv@4, WindowPos2svMESA, WindowPos2svMESA@4) - GL_STUB_ALIAS(WindowPos2svARB, 759, WindowPos2svARB@4, WindowPos2svMESA, WindowPos2svMESA@4) - GL_STUB_ALIAS(WindowPos3d, 760, WindowPos3d@24, WindowPos3dMESA, WindowPos3dMESA@24) - GL_STUB_ALIAS(WindowPos3dARB, 760, WindowPos3dARB@24, WindowPos3dMESA, WindowPos3dMESA@24) - GL_STUB_ALIAS(WindowPos3dv, 761, WindowPos3dv@4, WindowPos3dvMESA, WindowPos3dvMESA@4) - GL_STUB_ALIAS(WindowPos3dvARB, 761, WindowPos3dvARB@4, WindowPos3dvMESA, WindowPos3dvMESA@4) - GL_STUB_ALIAS(WindowPos3f, 762, WindowPos3f@12, WindowPos3fMESA, WindowPos3fMESA@12) - GL_STUB_ALIAS(WindowPos3fARB, 762, WindowPos3fARB@12, WindowPos3fMESA, WindowPos3fMESA@12) - GL_STUB_ALIAS(WindowPos3fv, 763, WindowPos3fv@4, WindowPos3fvMESA, WindowPos3fvMESA@4) - GL_STUB_ALIAS(WindowPos3fvARB, 763, WindowPos3fvARB@4, WindowPos3fvMESA, WindowPos3fvMESA@4) - GL_STUB_ALIAS(WindowPos3i, 764, WindowPos3i@12, WindowPos3iMESA, WindowPos3iMESA@12) - GL_STUB_ALIAS(WindowPos3iARB, 764, WindowPos3iARB@12, WindowPos3iMESA, WindowPos3iMESA@12) - GL_STUB_ALIAS(WindowPos3iv, 765, WindowPos3iv@4, WindowPos3ivMESA, WindowPos3ivMESA@4) - GL_STUB_ALIAS(WindowPos3ivARB, 765, WindowPos3ivARB@4, WindowPos3ivMESA, WindowPos3ivMESA@4) - GL_STUB_ALIAS(WindowPos3s, 766, WindowPos3s@12, WindowPos3sMESA, WindowPos3sMESA@12) - GL_STUB_ALIAS(WindowPos3sARB, 766, WindowPos3sARB@12, WindowPos3sMESA, WindowPos3sMESA@12) - GL_STUB_ALIAS(WindowPos3sv, 767, WindowPos3sv@4, WindowPos3svMESA, WindowPos3svMESA@4) - GL_STUB_ALIAS(WindowPos3svARB, 767, WindowPos3svARB@4, WindowPos3svMESA, WindowPos3svMESA@4) - GL_STUB_ALIAS(BindProgramARB, 786, BindProgramARB@8, BindProgramNV, BindProgramNV@8) - GL_STUB_ALIAS(DeleteProgramsARB, 787, DeleteProgramsARB@8, DeleteProgramsNV, DeleteProgramsNV@8) - GL_STUB_ALIAS(GenProgramsARB, 789, GenProgramsARB@8, GenProgramsNV, GenProgramsNV@8) - GL_STUB_ALIAS(GetVertexAttribPointerv, 795, GetVertexAttribPointerv@12, GetVertexAttribPointervNV, GetVertexAttribPointervNV@12) - GL_STUB_ALIAS(GetVertexAttribPointervARB, 795, GetVertexAttribPointervARB@12, GetVertexAttribPointervNV, GetVertexAttribPointervNV@12) - GL_STUB_ALIAS(IsProgramARB, 799, IsProgramARB@4, IsProgramNV, IsProgramNV@4) - GL_STUB_ALIAS(PointParameteri, 863, PointParameteri@8, PointParameteriNV, PointParameteriNV@8) - GL_STUB_ALIAS(PointParameteriv, 864, PointParameteriv@8, PointParameterivNV, PointParameterivNV@8) - GL_STUB_ALIAS(DeleteVertexArrays, 867, DeleteVertexArrays@8, _dispatch_stub_867, _dispatch_stub_867@8) - GL_STUB_ALIAS(IsVertexArray, 869, IsVertexArray@4, _dispatch_stub_869, _dispatch_stub_869@4) - GL_STUB_ALIAS(PrimitiveRestartIndex, 876, PrimitiveRestartIndex@4, PrimitiveRestartIndexNV, PrimitiveRestartIndexNV@4) - GL_STUB_ALIAS(BlendEquationSeparate, 879, BlendEquationSeparate@8, _dispatch_stub_879, _dispatch_stub_879@8) - GL_STUB_ALIAS(BindFramebuffer, 880, BindFramebuffer@8, BindFramebufferEXT, BindFramebufferEXT@8) - GL_STUB_ALIAS(BindRenderbuffer, 881, BindRenderbuffer@8, BindRenderbufferEXT, BindRenderbufferEXT@8) - GL_STUB_ALIAS(CheckFramebufferStatus, 882, CheckFramebufferStatus@4, CheckFramebufferStatusEXT, CheckFramebufferStatusEXT@4) - GL_STUB_ALIAS(DeleteFramebuffers, 883, DeleteFramebuffers@8, DeleteFramebuffersEXT, DeleteFramebuffersEXT@8) - GL_STUB_ALIAS(DeleteRenderbuffers, 884, DeleteRenderbuffers@8, DeleteRenderbuffersEXT, DeleteRenderbuffersEXT@8) - GL_STUB_ALIAS(FramebufferRenderbuffer, 885, FramebufferRenderbuffer@16, FramebufferRenderbufferEXT, FramebufferRenderbufferEXT@16) - GL_STUB_ALIAS(FramebufferTexture1D, 886, FramebufferTexture1D@20, FramebufferTexture1DEXT, FramebufferTexture1DEXT@20) - GL_STUB_ALIAS(FramebufferTexture2D, 887, FramebufferTexture2D@20, FramebufferTexture2DEXT, FramebufferTexture2DEXT@20) - GL_STUB_ALIAS(FramebufferTexture3D, 888, FramebufferTexture3D@24, FramebufferTexture3DEXT, FramebufferTexture3DEXT@24) - GL_STUB_ALIAS(GenFramebuffers, 889, GenFramebuffers@8, GenFramebuffersEXT, GenFramebuffersEXT@8) - GL_STUB_ALIAS(GenRenderbuffers, 890, GenRenderbuffers@8, GenRenderbuffersEXT, GenRenderbuffersEXT@8) - GL_STUB_ALIAS(GenerateMipmap, 891, GenerateMipmap@4, GenerateMipmapEXT, GenerateMipmapEXT@4) - GL_STUB_ALIAS(GetFramebufferAttachmentParameteriv, 892, GetFramebufferAttachmentParameteriv@16, GetFramebufferAttachmentParameterivEXT, GetFramebufferAttachmentParameterivEXT@16) - GL_STUB_ALIAS(GetRenderbufferParameteriv, 893, GetRenderbufferParameteriv@12, GetRenderbufferParameterivEXT, GetRenderbufferParameterivEXT@12) - GL_STUB_ALIAS(IsFramebuffer, 894, IsFramebuffer@4, IsFramebufferEXT, IsFramebufferEXT@4) - GL_STUB_ALIAS(IsRenderbuffer, 895, IsRenderbuffer@4, IsRenderbufferEXT, IsRenderbufferEXT@4) - GL_STUB_ALIAS(RenderbufferStorage, 896, RenderbufferStorage@16, RenderbufferStorageEXT, RenderbufferStorageEXT@16) - GL_STUB_ALIAS(BlitFramebuffer, 897, BlitFramebuffer@40, _dispatch_stub_897, _dispatch_stub_897@40) - GL_STUB_ALIAS(BindFragDataLocation, 900, BindFragDataLocation@12, BindFragDataLocationEXT, BindFragDataLocationEXT@12) - GL_STUB_ALIAS(GetFragDataLocation, 901, GetFragDataLocation@8, GetFragDataLocationEXT, GetFragDataLocationEXT@8) - GL_STUB_ALIAS(GetUniformuiv, 902, GetUniformuiv@12, GetUniformuivEXT, GetUniformuivEXT@12) - GL_STUB_ALIAS(GetVertexAttribIiv, 903, GetVertexAttribIiv@12, GetVertexAttribIivEXT, GetVertexAttribIivEXT@12) - GL_STUB_ALIAS(GetVertexAttribIuiv, 904, GetVertexAttribIuiv@12, GetVertexAttribIuivEXT, GetVertexAttribIuivEXT@12) - GL_STUB_ALIAS(Uniform1ui, 905, Uniform1ui@8, Uniform1uiEXT, Uniform1uiEXT@8) - GL_STUB_ALIAS(Uniform1uiv, 906, Uniform1uiv@12, Uniform1uivEXT, Uniform1uivEXT@12) - GL_STUB_ALIAS(Uniform2ui, 907, Uniform2ui@12, Uniform2uiEXT, Uniform2uiEXT@12) - GL_STUB_ALIAS(Uniform2uiv, 908, Uniform2uiv@12, Uniform2uivEXT, Uniform2uivEXT@12) - GL_STUB_ALIAS(Uniform3ui, 909, Uniform3ui@16, Uniform3uiEXT, Uniform3uiEXT@16) - GL_STUB_ALIAS(Uniform3uiv, 910, Uniform3uiv@12, Uniform3uivEXT, Uniform3uivEXT@12) - GL_STUB_ALIAS(Uniform4ui, 911, Uniform4ui@20, Uniform4uiEXT, Uniform4uiEXT@20) - GL_STUB_ALIAS(Uniform4uiv, 912, Uniform4uiv@12, Uniform4uivEXT, Uniform4uivEXT@12) - GL_STUB_ALIAS(VertexAttribI1i, 913, VertexAttribI1i@8, VertexAttribI1iEXT, VertexAttribI1iEXT@8) - GL_STUB_ALIAS(VertexAttribI1iv, 914, VertexAttribI1iv@8, VertexAttribI1ivEXT, VertexAttribI1ivEXT@8) - GL_STUB_ALIAS(VertexAttribI1ui, 915, VertexAttribI1ui@8, VertexAttribI1uiEXT, VertexAttribI1uiEXT@8) - GL_STUB_ALIAS(VertexAttribI1uiv, 916, VertexAttribI1uiv@8, VertexAttribI1uivEXT, VertexAttribI1uivEXT@8) - GL_STUB_ALIAS(VertexAttribI2i, 917, VertexAttribI2i@12, VertexAttribI2iEXT, VertexAttribI2iEXT@12) - GL_STUB_ALIAS(VertexAttribI2iv, 918, VertexAttribI2iv@8, VertexAttribI2ivEXT, VertexAttribI2ivEXT@8) - GL_STUB_ALIAS(VertexAttribI2ui, 919, VertexAttribI2ui@12, VertexAttribI2uiEXT, VertexAttribI2uiEXT@12) - GL_STUB_ALIAS(VertexAttribI2uiv, 920, VertexAttribI2uiv@8, VertexAttribI2uivEXT, VertexAttribI2uivEXT@8) - GL_STUB_ALIAS(VertexAttribI3i, 921, VertexAttribI3i@16, VertexAttribI3iEXT, VertexAttribI3iEXT@16) - GL_STUB_ALIAS(VertexAttribI3iv, 922, VertexAttribI3iv@8, VertexAttribI3ivEXT, VertexAttribI3ivEXT@8) - GL_STUB_ALIAS(VertexAttribI3ui, 923, VertexAttribI3ui@16, VertexAttribI3uiEXT, VertexAttribI3uiEXT@16) - GL_STUB_ALIAS(VertexAttribI3uiv, 924, VertexAttribI3uiv@8, VertexAttribI3uivEXT, VertexAttribI3uivEXT@8) - GL_STUB_ALIAS(VertexAttribI4bv, 925, VertexAttribI4bv@8, VertexAttribI4bvEXT, VertexAttribI4bvEXT@8) - GL_STUB_ALIAS(VertexAttribI4i, 926, VertexAttribI4i@20, VertexAttribI4iEXT, VertexAttribI4iEXT@20) - GL_STUB_ALIAS(VertexAttribI4iv, 927, VertexAttribI4iv@8, VertexAttribI4ivEXT, VertexAttribI4ivEXT@8) - GL_STUB_ALIAS(VertexAttribI4sv, 928, VertexAttribI4sv@8, VertexAttribI4svEXT, VertexAttribI4svEXT@8) - GL_STUB_ALIAS(VertexAttribI4ubv, 929, VertexAttribI4ubv@8, VertexAttribI4ubvEXT, VertexAttribI4ubvEXT@8) - GL_STUB_ALIAS(VertexAttribI4ui, 930, VertexAttribI4ui@20, VertexAttribI4uiEXT, VertexAttribI4uiEXT@20) - GL_STUB_ALIAS(VertexAttribI4uiv, 931, VertexAttribI4uiv@8, VertexAttribI4uivEXT, VertexAttribI4uivEXT@8) - GL_STUB_ALIAS(VertexAttribI4usv, 932, VertexAttribI4usv@8, VertexAttribI4usvEXT, VertexAttribI4usvEXT@8) - GL_STUB_ALIAS(VertexAttribIPointer, 933, VertexAttribIPointer@20, VertexAttribIPointerEXT, VertexAttribIPointerEXT@20) - GL_STUB_ALIAS(FramebufferTextureLayer, 934, FramebufferTextureLayer@20, FramebufferTextureLayerEXT, FramebufferTextureLayerEXT@20) - GL_STUB_ALIAS(FramebufferTextureLayerARB, 934, FramebufferTextureLayerARB@20, FramebufferTextureLayerEXT, FramebufferTextureLayerEXT@20) - GL_STUB_ALIAS(ColorMaski, 935, ColorMaski@20, ColorMaskIndexedEXT, ColorMaskIndexedEXT@20) - GL_STUB_ALIAS(Disablei, 936, Disablei@8, DisableIndexedEXT, DisableIndexedEXT@8) - GL_STUB_ALIAS(Enablei, 937, Enablei@8, EnableIndexedEXT, EnableIndexedEXT@8) - GL_STUB_ALIAS(GetBooleani_v, 938, GetBooleani_v@12, GetBooleanIndexedvEXT, GetBooleanIndexedvEXT@12) - GL_STUB_ALIAS(GetIntegeri_v, 939, GetIntegeri_v@12, GetIntegerIndexedvEXT, GetIntegerIndexedvEXT@12) - GL_STUB_ALIAS(IsEnabledi, 940, IsEnabledi@8, IsEnabledIndexedEXT, IsEnabledIndexedEXT@8) - GL_STUB_ALIAS(GetTexParameterIiv, 943, GetTexParameterIiv@12, GetTexParameterIivEXT, GetTexParameterIivEXT@12) - GL_STUB_ALIAS(GetTexParameterIuiv, 944, GetTexParameterIuiv@12, GetTexParameterIuivEXT, GetTexParameterIuivEXT@12) - GL_STUB_ALIAS(TexParameterIiv, 945, TexParameterIiv@12, TexParameterIivEXT, TexParameterIivEXT@12) - GL_STUB_ALIAS(TexParameterIuiv, 946, TexParameterIuiv@12, TexParameterIuivEXT, TexParameterIuivEXT@12) - GL_STUB_ALIAS(BeginConditionalRender, 947, BeginConditionalRender@8, BeginConditionalRenderNV, BeginConditionalRenderNV@8) - GL_STUB_ALIAS(EndConditionalRender, 948, EndConditionalRender@0, EndConditionalRenderNV, EndConditionalRenderNV@0) - GL_STUB_ALIAS(BeginTransformFeedback, 949, BeginTransformFeedback@4, BeginTransformFeedbackEXT, BeginTransformFeedbackEXT@4) - GL_STUB_ALIAS(BindBufferBase, 950, BindBufferBase@12, BindBufferBaseEXT, BindBufferBaseEXT@12) - GL_STUB_ALIAS(BindBufferRange, 952, BindBufferRange@20, BindBufferRangeEXT, BindBufferRangeEXT@20) - GL_STUB_ALIAS(EndTransformFeedback, 953, EndTransformFeedback@0, EndTransformFeedbackEXT, EndTransformFeedbackEXT@0) - GL_STUB_ALIAS(GetTransformFeedbackVarying, 954, GetTransformFeedbackVarying@28, GetTransformFeedbackVaryingEXT, GetTransformFeedbackVaryingEXT@28) - GL_STUB_ALIAS(TransformFeedbackVaryings, 955, TransformFeedbackVaryings@16, TransformFeedbackVaryingsEXT, TransformFeedbackVaryingsEXT@16) - GL_STUB_ALIAS(ProvokingVertex, 956, ProvokingVertex@4, ProvokingVertexEXT, ProvokingVertexEXT@4) - - GLOBL GLNAME(gl_dispatch_functions_end) - HIDDEN(GLNAME(gl_dispatch_functions_end)) - ALIGNTEXT16 -GLNAME(gl_dispatch_functions_end): - -#if defined(GLX_USE_TLS) && defined(__linux__) - .section ".note.ABI-tag", "a" - .p2align 2 - .long 1f - 0f /* name length */ - .long 3f - 2f /* data length */ - .long 1 /* note length */ -0: .asciz "GNU" /* vendor name */ -1: .p2align 2 -2: .long 0 /* note data: the ABI tag */ - .long 2,4,20 /* Minimum kernel version w/TLS */ -3: .p2align 2 /* pad out section */ -#endif /* GLX_USE_TLS */ - -#if defined (__ELF__) && defined (__linux__) - .section .note.GNU-stack,"",%progbits -#endif diff --git a/dll/opengl/mesa/src/mapi/glapi/glapitable.h b/dll/opengl/mesa/src/mapi/glapi/glapitable.h deleted file mode 100644 index e5c5449a9a7..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/glapitable.h +++ /dev/null @@ -1,1018 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by gl_table.py (from Mesa) script */ - -/* - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL, IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#if !defined( _GLAPI_TABLE_H_ ) -# define _GLAPI_TABLE_H_ - -#ifndef GLAPIENTRYP -# ifndef GLAPIENTRY -# define GLAPIENTRY -# endif - -# define GLAPIENTRYP GLAPIENTRY * -#endif - - -struct _glapi_table -{ - void (GLAPIENTRYP NewList)(GLuint list, GLenum mode); /* 0 */ - void (GLAPIENTRYP EndList)(void); /* 1 */ - void (GLAPIENTRYP CallList)(GLuint list); /* 2 */ - void (GLAPIENTRYP CallLists)(GLsizei n, GLenum type, const GLvoid * lists); /* 3 */ - void (GLAPIENTRYP DeleteLists)(GLuint list, GLsizei range); /* 4 */ - GLuint (GLAPIENTRYP GenLists)(GLsizei range); /* 5 */ - void (GLAPIENTRYP ListBase)(GLuint base); /* 6 */ - void (GLAPIENTRYP Begin)(GLenum mode); /* 7 */ - void (GLAPIENTRYP Bitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap); /* 8 */ - void (GLAPIENTRYP Color3b)(GLbyte red, GLbyte green, GLbyte blue); /* 9 */ - void (GLAPIENTRYP Color3bv)(const GLbyte * v); /* 10 */ - void (GLAPIENTRYP Color3d)(GLdouble red, GLdouble green, GLdouble blue); /* 11 */ - void (GLAPIENTRYP Color3dv)(const GLdouble * v); /* 12 */ - void (GLAPIENTRYP Color3f)(GLfloat red, GLfloat green, GLfloat blue); /* 13 */ - void (GLAPIENTRYP Color3fv)(const GLfloat * v); /* 14 */ - void (GLAPIENTRYP Color3i)(GLint red, GLint green, GLint blue); /* 15 */ - void (GLAPIENTRYP Color3iv)(const GLint * v); /* 16 */ - void (GLAPIENTRYP Color3s)(GLshort red, GLshort green, GLshort blue); /* 17 */ - void (GLAPIENTRYP Color3sv)(const GLshort * v); /* 18 */ - void (GLAPIENTRYP Color3ub)(GLubyte red, GLubyte green, GLubyte blue); /* 19 */ - void (GLAPIENTRYP Color3ubv)(const GLubyte * v); /* 20 */ - void (GLAPIENTRYP Color3ui)(GLuint red, GLuint green, GLuint blue); /* 21 */ - void (GLAPIENTRYP Color3uiv)(const GLuint * v); /* 22 */ - void (GLAPIENTRYP Color3us)(GLushort red, GLushort green, GLushort blue); /* 23 */ - void (GLAPIENTRYP Color3usv)(const GLushort * v); /* 24 */ - void (GLAPIENTRYP Color4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); /* 25 */ - void (GLAPIENTRYP Color4bv)(const GLbyte * v); /* 26 */ - void (GLAPIENTRYP Color4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); /* 27 */ - void (GLAPIENTRYP Color4dv)(const GLdouble * v); /* 28 */ - void (GLAPIENTRYP Color4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); /* 29 */ - void (GLAPIENTRYP Color4fv)(const GLfloat * v); /* 30 */ - void (GLAPIENTRYP Color4i)(GLint red, GLint green, GLint blue, GLint alpha); /* 31 */ - void (GLAPIENTRYP Color4iv)(const GLint * v); /* 32 */ - void (GLAPIENTRYP Color4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha); /* 33 */ - void (GLAPIENTRYP Color4sv)(const GLshort * v); /* 34 */ - void (GLAPIENTRYP Color4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); /* 35 */ - void (GLAPIENTRYP Color4ubv)(const GLubyte * v); /* 36 */ - void (GLAPIENTRYP Color4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha); /* 37 */ - void (GLAPIENTRYP Color4uiv)(const GLuint * v); /* 38 */ - void (GLAPIENTRYP Color4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha); /* 39 */ - void (GLAPIENTRYP Color4usv)(const GLushort * v); /* 40 */ - void (GLAPIENTRYP EdgeFlag)(GLboolean flag); /* 41 */ - void (GLAPIENTRYP EdgeFlagv)(const GLboolean * flag); /* 42 */ - void (GLAPIENTRYP End)(void); /* 43 */ - void (GLAPIENTRYP Indexd)(GLdouble c); /* 44 */ - void (GLAPIENTRYP Indexdv)(const GLdouble * c); /* 45 */ - void (GLAPIENTRYP Indexf)(GLfloat c); /* 46 */ - void (GLAPIENTRYP Indexfv)(const GLfloat * c); /* 47 */ - void (GLAPIENTRYP Indexi)(GLint c); /* 48 */ - void (GLAPIENTRYP Indexiv)(const GLint * c); /* 49 */ - void (GLAPIENTRYP Indexs)(GLshort c); /* 50 */ - void (GLAPIENTRYP Indexsv)(const GLshort * c); /* 51 */ - void (GLAPIENTRYP Normal3b)(GLbyte nx, GLbyte ny, GLbyte nz); /* 52 */ - void (GLAPIENTRYP Normal3bv)(const GLbyte * v); /* 53 */ - void (GLAPIENTRYP Normal3d)(GLdouble nx, GLdouble ny, GLdouble nz); /* 54 */ - void (GLAPIENTRYP Normal3dv)(const GLdouble * v); /* 55 */ - void (GLAPIENTRYP Normal3f)(GLfloat nx, GLfloat ny, GLfloat nz); /* 56 */ - void (GLAPIENTRYP Normal3fv)(const GLfloat * v); /* 57 */ - void (GLAPIENTRYP Normal3i)(GLint nx, GLint ny, GLint nz); /* 58 */ - void (GLAPIENTRYP Normal3iv)(const GLint * v); /* 59 */ - void (GLAPIENTRYP Normal3s)(GLshort nx, GLshort ny, GLshort nz); /* 60 */ - void (GLAPIENTRYP Normal3sv)(const GLshort * v); /* 61 */ - void (GLAPIENTRYP RasterPos2d)(GLdouble x, GLdouble y); /* 62 */ - void (GLAPIENTRYP RasterPos2dv)(const GLdouble * v); /* 63 */ - void (GLAPIENTRYP RasterPos2f)(GLfloat x, GLfloat y); /* 64 */ - void (GLAPIENTRYP RasterPos2fv)(const GLfloat * v); /* 65 */ - void (GLAPIENTRYP RasterPos2i)(GLint x, GLint y); /* 66 */ - void (GLAPIENTRYP RasterPos2iv)(const GLint * v); /* 67 */ - void (GLAPIENTRYP RasterPos2s)(GLshort x, GLshort y); /* 68 */ - void (GLAPIENTRYP RasterPos2sv)(const GLshort * v); /* 69 */ - void (GLAPIENTRYP RasterPos3d)(GLdouble x, GLdouble y, GLdouble z); /* 70 */ - void (GLAPIENTRYP RasterPos3dv)(const GLdouble * v); /* 71 */ - void (GLAPIENTRYP RasterPos3f)(GLfloat x, GLfloat y, GLfloat z); /* 72 */ - void (GLAPIENTRYP RasterPos3fv)(const GLfloat * v); /* 73 */ - void (GLAPIENTRYP RasterPos3i)(GLint x, GLint y, GLint z); /* 74 */ - void (GLAPIENTRYP RasterPos3iv)(const GLint * v); /* 75 */ - void (GLAPIENTRYP RasterPos3s)(GLshort x, GLshort y, GLshort z); /* 76 */ - void (GLAPIENTRYP RasterPos3sv)(const GLshort * v); /* 77 */ - void (GLAPIENTRYP RasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 78 */ - void (GLAPIENTRYP RasterPos4dv)(const GLdouble * v); /* 79 */ - void (GLAPIENTRYP RasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 80 */ - void (GLAPIENTRYP RasterPos4fv)(const GLfloat * v); /* 81 */ - void (GLAPIENTRYP RasterPos4i)(GLint x, GLint y, GLint z, GLint w); /* 82 */ - void (GLAPIENTRYP RasterPos4iv)(const GLint * v); /* 83 */ - void (GLAPIENTRYP RasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w); /* 84 */ - void (GLAPIENTRYP RasterPos4sv)(const GLshort * v); /* 85 */ - void (GLAPIENTRYP Rectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); /* 86 */ - void (GLAPIENTRYP Rectdv)(const GLdouble * v1, const GLdouble * v2); /* 87 */ - void (GLAPIENTRYP Rectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); /* 88 */ - void (GLAPIENTRYP Rectfv)(const GLfloat * v1, const GLfloat * v2); /* 89 */ - void (GLAPIENTRYP Recti)(GLint x1, GLint y1, GLint x2, GLint y2); /* 90 */ - void (GLAPIENTRYP Rectiv)(const GLint * v1, const GLint * v2); /* 91 */ - void (GLAPIENTRYP Rects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2); /* 92 */ - void (GLAPIENTRYP Rectsv)(const GLshort * v1, const GLshort * v2); /* 93 */ - void (GLAPIENTRYP TexCoord1d)(GLdouble s); /* 94 */ - void (GLAPIENTRYP TexCoord1dv)(const GLdouble * v); /* 95 */ - void (GLAPIENTRYP TexCoord1f)(GLfloat s); /* 96 */ - void (GLAPIENTRYP TexCoord1fv)(const GLfloat * v); /* 97 */ - void (GLAPIENTRYP TexCoord1i)(GLint s); /* 98 */ - void (GLAPIENTRYP TexCoord1iv)(const GLint * v); /* 99 */ - void (GLAPIENTRYP TexCoord1s)(GLshort s); /* 100 */ - void (GLAPIENTRYP TexCoord1sv)(const GLshort * v); /* 101 */ - void (GLAPIENTRYP TexCoord2d)(GLdouble s, GLdouble t); /* 102 */ - void (GLAPIENTRYP TexCoord2dv)(const GLdouble * v); /* 103 */ - void (GLAPIENTRYP TexCoord2f)(GLfloat s, GLfloat t); /* 104 */ - void (GLAPIENTRYP TexCoord2fv)(const GLfloat * v); /* 105 */ - void (GLAPIENTRYP TexCoord2i)(GLint s, GLint t); /* 106 */ - void (GLAPIENTRYP TexCoord2iv)(const GLint * v); /* 107 */ - void (GLAPIENTRYP TexCoord2s)(GLshort s, GLshort t); /* 108 */ - void (GLAPIENTRYP TexCoord2sv)(const GLshort * v); /* 109 */ - void (GLAPIENTRYP TexCoord3d)(GLdouble s, GLdouble t, GLdouble r); /* 110 */ - void (GLAPIENTRYP TexCoord3dv)(const GLdouble * v); /* 111 */ - void (GLAPIENTRYP TexCoord3f)(GLfloat s, GLfloat t, GLfloat r); /* 112 */ - void (GLAPIENTRYP TexCoord3fv)(const GLfloat * v); /* 113 */ - void (GLAPIENTRYP TexCoord3i)(GLint s, GLint t, GLint r); /* 114 */ - void (GLAPIENTRYP TexCoord3iv)(const GLint * v); /* 115 */ - void (GLAPIENTRYP TexCoord3s)(GLshort s, GLshort t, GLshort r); /* 116 */ - void (GLAPIENTRYP TexCoord3sv)(const GLshort * v); /* 117 */ - void (GLAPIENTRYP TexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q); /* 118 */ - void (GLAPIENTRYP TexCoord4dv)(const GLdouble * v); /* 119 */ - void (GLAPIENTRYP TexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q); /* 120 */ - void (GLAPIENTRYP TexCoord4fv)(const GLfloat * v); /* 121 */ - void (GLAPIENTRYP TexCoord4i)(GLint s, GLint t, GLint r, GLint q); /* 122 */ - void (GLAPIENTRYP TexCoord4iv)(const GLint * v); /* 123 */ - void (GLAPIENTRYP TexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q); /* 124 */ - void (GLAPIENTRYP TexCoord4sv)(const GLshort * v); /* 125 */ - void (GLAPIENTRYP Vertex2d)(GLdouble x, GLdouble y); /* 126 */ - void (GLAPIENTRYP Vertex2dv)(const GLdouble * v); /* 127 */ - void (GLAPIENTRYP Vertex2f)(GLfloat x, GLfloat y); /* 128 */ - void (GLAPIENTRYP Vertex2fv)(const GLfloat * v); /* 129 */ - void (GLAPIENTRYP Vertex2i)(GLint x, GLint y); /* 130 */ - void (GLAPIENTRYP Vertex2iv)(const GLint * v); /* 131 */ - void (GLAPIENTRYP Vertex2s)(GLshort x, GLshort y); /* 132 */ - void (GLAPIENTRYP Vertex2sv)(const GLshort * v); /* 133 */ - void (GLAPIENTRYP Vertex3d)(GLdouble x, GLdouble y, GLdouble z); /* 134 */ - void (GLAPIENTRYP Vertex3dv)(const GLdouble * v); /* 135 */ - void (GLAPIENTRYP Vertex3f)(GLfloat x, GLfloat y, GLfloat z); /* 136 */ - void (GLAPIENTRYP Vertex3fv)(const GLfloat * v); /* 137 */ - void (GLAPIENTRYP Vertex3i)(GLint x, GLint y, GLint z); /* 138 */ - void (GLAPIENTRYP Vertex3iv)(const GLint * v); /* 139 */ - void (GLAPIENTRYP Vertex3s)(GLshort x, GLshort y, GLshort z); /* 140 */ - void (GLAPIENTRYP Vertex3sv)(const GLshort * v); /* 141 */ - void (GLAPIENTRYP Vertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 142 */ - void (GLAPIENTRYP Vertex4dv)(const GLdouble * v); /* 143 */ - void (GLAPIENTRYP Vertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 144 */ - void (GLAPIENTRYP Vertex4fv)(const GLfloat * v); /* 145 */ - void (GLAPIENTRYP Vertex4i)(GLint x, GLint y, GLint z, GLint w); /* 146 */ - void (GLAPIENTRYP Vertex4iv)(const GLint * v); /* 147 */ - void (GLAPIENTRYP Vertex4s)(GLshort x, GLshort y, GLshort z, GLshort w); /* 148 */ - void (GLAPIENTRYP Vertex4sv)(const GLshort * v); /* 149 */ - void (GLAPIENTRYP ClipPlane)(GLenum plane, const GLdouble * equation); /* 150 */ - void (GLAPIENTRYP ColorMaterial)(GLenum face, GLenum mode); /* 151 */ - void (GLAPIENTRYP CullFace)(GLenum mode); /* 152 */ - void (GLAPIENTRYP Fogf)(GLenum pname, GLfloat param); /* 153 */ - void (GLAPIENTRYP Fogfv)(GLenum pname, const GLfloat * params); /* 154 */ - void (GLAPIENTRYP Fogi)(GLenum pname, GLint param); /* 155 */ - void (GLAPIENTRYP Fogiv)(GLenum pname, const GLint * params); /* 156 */ - void (GLAPIENTRYP FrontFace)(GLenum mode); /* 157 */ - void (GLAPIENTRYP Hint)(GLenum target, GLenum mode); /* 158 */ - void (GLAPIENTRYP Lightf)(GLenum light, GLenum pname, GLfloat param); /* 159 */ - void (GLAPIENTRYP Lightfv)(GLenum light, GLenum pname, const GLfloat * params); /* 160 */ - void (GLAPIENTRYP Lighti)(GLenum light, GLenum pname, GLint param); /* 161 */ - void (GLAPIENTRYP Lightiv)(GLenum light, GLenum pname, const GLint * params); /* 162 */ - void (GLAPIENTRYP LightModelf)(GLenum pname, GLfloat param); /* 163 */ - void (GLAPIENTRYP LightModelfv)(GLenum pname, const GLfloat * params); /* 164 */ - void (GLAPIENTRYP LightModeli)(GLenum pname, GLint param); /* 165 */ - void (GLAPIENTRYP LightModeliv)(GLenum pname, const GLint * params); /* 166 */ - void (GLAPIENTRYP LineStipple)(GLint factor, GLushort pattern); /* 167 */ - void (GLAPIENTRYP LineWidth)(GLfloat width); /* 168 */ - void (GLAPIENTRYP Materialf)(GLenum face, GLenum pname, GLfloat param); /* 169 */ - void (GLAPIENTRYP Materialfv)(GLenum face, GLenum pname, const GLfloat * params); /* 170 */ - void (GLAPIENTRYP Materiali)(GLenum face, GLenum pname, GLint param); /* 171 */ - void (GLAPIENTRYP Materialiv)(GLenum face, GLenum pname, const GLint * params); /* 172 */ - void (GLAPIENTRYP PointSize)(GLfloat size); /* 173 */ - void (GLAPIENTRYP PolygonMode)(GLenum face, GLenum mode); /* 174 */ - void (GLAPIENTRYP PolygonStipple)(const GLubyte * mask); /* 175 */ - void (GLAPIENTRYP Scissor)(GLint x, GLint y, GLsizei width, GLsizei height); /* 176 */ - void (GLAPIENTRYP ShadeModel)(GLenum mode); /* 177 */ - void (GLAPIENTRYP TexParameterf)(GLenum target, GLenum pname, GLfloat param); /* 178 */ - void (GLAPIENTRYP TexParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 179 */ - void (GLAPIENTRYP TexParameteri)(GLenum target, GLenum pname, GLint param); /* 180 */ - void (GLAPIENTRYP TexParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 181 */ - void (GLAPIENTRYP TexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 182 */ - void (GLAPIENTRYP TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 183 */ - void (GLAPIENTRYP TexEnvf)(GLenum target, GLenum pname, GLfloat param); /* 184 */ - void (GLAPIENTRYP TexEnvfv)(GLenum target, GLenum pname, const GLfloat * params); /* 185 */ - void (GLAPIENTRYP TexEnvi)(GLenum target, GLenum pname, GLint param); /* 186 */ - void (GLAPIENTRYP TexEnviv)(GLenum target, GLenum pname, const GLint * params); /* 187 */ - void (GLAPIENTRYP TexGend)(GLenum coord, GLenum pname, GLdouble param); /* 188 */ - void (GLAPIENTRYP TexGendv)(GLenum coord, GLenum pname, const GLdouble * params); /* 189 */ - void (GLAPIENTRYP TexGenf)(GLenum coord, GLenum pname, GLfloat param); /* 190 */ - void (GLAPIENTRYP TexGenfv)(GLenum coord, GLenum pname, const GLfloat * params); /* 191 */ - void (GLAPIENTRYP TexGeni)(GLenum coord, GLenum pname, GLint param); /* 192 */ - void (GLAPIENTRYP TexGeniv)(GLenum coord, GLenum pname, const GLint * params); /* 193 */ - void (GLAPIENTRYP FeedbackBuffer)(GLsizei size, GLenum type, GLfloat * buffer); /* 194 */ - void (GLAPIENTRYP SelectBuffer)(GLsizei size, GLuint * buffer); /* 195 */ - GLint (GLAPIENTRYP RenderMode)(GLenum mode); /* 196 */ - void (GLAPIENTRYP InitNames)(void); /* 197 */ - void (GLAPIENTRYP LoadName)(GLuint name); /* 198 */ - void (GLAPIENTRYP PassThrough)(GLfloat token); /* 199 */ - void (GLAPIENTRYP PopName)(void); /* 200 */ - void (GLAPIENTRYP PushName)(GLuint name); /* 201 */ - void (GLAPIENTRYP DrawBuffer)(GLenum mode); /* 202 */ - void (GLAPIENTRYP Clear)(GLbitfield mask); /* 203 */ - void (GLAPIENTRYP ClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); /* 204 */ - void (GLAPIENTRYP ClearIndex)(GLfloat c); /* 205 */ - void (GLAPIENTRYP ClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); /* 206 */ - void (GLAPIENTRYP ClearStencil)(GLint s); /* 207 */ - void (GLAPIENTRYP ClearDepth)(GLclampd depth); /* 208 */ - void (GLAPIENTRYP StencilMask)(GLuint mask); /* 209 */ - void (GLAPIENTRYP ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); /* 210 */ - void (GLAPIENTRYP DepthMask)(GLboolean flag); /* 211 */ - void (GLAPIENTRYP IndexMask)(GLuint mask); /* 212 */ - void (GLAPIENTRYP Accum)(GLenum op, GLfloat value); /* 213 */ - void (GLAPIENTRYP Disable)(GLenum cap); /* 214 */ - void (GLAPIENTRYP Enable)(GLenum cap); /* 215 */ - void (GLAPIENTRYP Finish)(void); /* 216 */ - void (GLAPIENTRYP Flush)(void); /* 217 */ - void (GLAPIENTRYP PopAttrib)(void); /* 218 */ - void (GLAPIENTRYP PushAttrib)(GLbitfield mask); /* 219 */ - void (GLAPIENTRYP Map1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points); /* 220 */ - void (GLAPIENTRYP Map1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points); /* 221 */ - void (GLAPIENTRYP Map2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points); /* 222 */ - void (GLAPIENTRYP Map2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points); /* 223 */ - void (GLAPIENTRYP MapGrid1d)(GLint un, GLdouble u1, GLdouble u2); /* 224 */ - void (GLAPIENTRYP MapGrid1f)(GLint un, GLfloat u1, GLfloat u2); /* 225 */ - void (GLAPIENTRYP MapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); /* 226 */ - void (GLAPIENTRYP MapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); /* 227 */ - void (GLAPIENTRYP EvalCoord1d)(GLdouble u); /* 228 */ - void (GLAPIENTRYP EvalCoord1dv)(const GLdouble * u); /* 229 */ - void (GLAPIENTRYP EvalCoord1f)(GLfloat u); /* 230 */ - void (GLAPIENTRYP EvalCoord1fv)(const GLfloat * u); /* 231 */ - void (GLAPIENTRYP EvalCoord2d)(GLdouble u, GLdouble v); /* 232 */ - void (GLAPIENTRYP EvalCoord2dv)(const GLdouble * u); /* 233 */ - void (GLAPIENTRYP EvalCoord2f)(GLfloat u, GLfloat v); /* 234 */ - void (GLAPIENTRYP EvalCoord2fv)(const GLfloat * u); /* 235 */ - void (GLAPIENTRYP EvalMesh1)(GLenum mode, GLint i1, GLint i2); /* 236 */ - void (GLAPIENTRYP EvalPoint1)(GLint i); /* 237 */ - void (GLAPIENTRYP EvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); /* 238 */ - void (GLAPIENTRYP EvalPoint2)(GLint i, GLint j); /* 239 */ - void (GLAPIENTRYP AlphaFunc)(GLenum func, GLclampf ref); /* 240 */ - void (GLAPIENTRYP BlendFunc)(GLenum sfactor, GLenum dfactor); /* 241 */ - void (GLAPIENTRYP LogicOp)(GLenum opcode); /* 242 */ - void (GLAPIENTRYP StencilFunc)(GLenum func, GLint ref, GLuint mask); /* 243 */ - void (GLAPIENTRYP StencilOp)(GLenum fail, GLenum zfail, GLenum zpass); /* 244 */ - void (GLAPIENTRYP DepthFunc)(GLenum func); /* 245 */ - void (GLAPIENTRYP PixelZoom)(GLfloat xfactor, GLfloat yfactor); /* 246 */ - void (GLAPIENTRYP PixelTransferf)(GLenum pname, GLfloat param); /* 247 */ - void (GLAPIENTRYP PixelTransferi)(GLenum pname, GLint param); /* 248 */ - void (GLAPIENTRYP PixelStoref)(GLenum pname, GLfloat param); /* 249 */ - void (GLAPIENTRYP PixelStorei)(GLenum pname, GLint param); /* 250 */ - void (GLAPIENTRYP PixelMapfv)(GLenum map, GLsizei mapsize, const GLfloat * values); /* 251 */ - void (GLAPIENTRYP PixelMapuiv)(GLenum map, GLsizei mapsize, const GLuint * values); /* 252 */ - void (GLAPIENTRYP PixelMapusv)(GLenum map, GLsizei mapsize, const GLushort * values); /* 253 */ - void (GLAPIENTRYP ReadBuffer)(GLenum mode); /* 254 */ - void (GLAPIENTRYP CopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); /* 255 */ - void (GLAPIENTRYP ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels); /* 256 */ - void (GLAPIENTRYP DrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); /* 257 */ - void (GLAPIENTRYP GetBooleanv)(GLenum pname, GLboolean * params); /* 258 */ - void (GLAPIENTRYP GetClipPlane)(GLenum plane, GLdouble * equation); /* 259 */ - void (GLAPIENTRYP GetDoublev)(GLenum pname, GLdouble * params); /* 260 */ - GLenum (GLAPIENTRYP GetError)(void); /* 261 */ - void (GLAPIENTRYP GetFloatv)(GLenum pname, GLfloat * params); /* 262 */ - void (GLAPIENTRYP GetIntegerv)(GLenum pname, GLint * params); /* 263 */ - void (GLAPIENTRYP GetLightfv)(GLenum light, GLenum pname, GLfloat * params); /* 264 */ - void (GLAPIENTRYP GetLightiv)(GLenum light, GLenum pname, GLint * params); /* 265 */ - void (GLAPIENTRYP GetMapdv)(GLenum target, GLenum query, GLdouble * v); /* 266 */ - void (GLAPIENTRYP GetMapfv)(GLenum target, GLenum query, GLfloat * v); /* 267 */ - void (GLAPIENTRYP GetMapiv)(GLenum target, GLenum query, GLint * v); /* 268 */ - void (GLAPIENTRYP GetMaterialfv)(GLenum face, GLenum pname, GLfloat * params); /* 269 */ - void (GLAPIENTRYP GetMaterialiv)(GLenum face, GLenum pname, GLint * params); /* 270 */ - void (GLAPIENTRYP GetPixelMapfv)(GLenum map, GLfloat * values); /* 271 */ - void (GLAPIENTRYP GetPixelMapuiv)(GLenum map, GLuint * values); /* 272 */ - void (GLAPIENTRYP GetPixelMapusv)(GLenum map, GLushort * values); /* 273 */ - void (GLAPIENTRYP GetPolygonStipple)(GLubyte * mask); /* 274 */ - const GLubyte * (GLAPIENTRYP GetString)(GLenum name); /* 275 */ - void (GLAPIENTRYP GetTexEnvfv)(GLenum target, GLenum pname, GLfloat * params); /* 276 */ - void (GLAPIENTRYP GetTexEnviv)(GLenum target, GLenum pname, GLint * params); /* 277 */ - void (GLAPIENTRYP GetTexGendv)(GLenum coord, GLenum pname, GLdouble * params); /* 278 */ - void (GLAPIENTRYP GetTexGenfv)(GLenum coord, GLenum pname, GLfloat * params); /* 279 */ - void (GLAPIENTRYP GetTexGeniv)(GLenum coord, GLenum pname, GLint * params); /* 280 */ - void (GLAPIENTRYP GetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels); /* 281 */ - void (GLAPIENTRYP GetTexParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 282 */ - void (GLAPIENTRYP GetTexParameteriv)(GLenum target, GLenum pname, GLint * params); /* 283 */ - void (GLAPIENTRYP GetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat * params); /* 284 */ - void (GLAPIENTRYP GetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint * params); /* 285 */ - GLboolean (GLAPIENTRYP IsEnabled)(GLenum cap); /* 286 */ - GLboolean (GLAPIENTRYP IsList)(GLuint list); /* 287 */ - void (GLAPIENTRYP DepthRange)(GLclampd zNear, GLclampd zFar); /* 288 */ - void (GLAPIENTRYP Frustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); /* 289 */ - void (GLAPIENTRYP LoadIdentity)(void); /* 290 */ - void (GLAPIENTRYP LoadMatrixf)(const GLfloat * m); /* 291 */ - void (GLAPIENTRYP LoadMatrixd)(const GLdouble * m); /* 292 */ - void (GLAPIENTRYP MatrixMode)(GLenum mode); /* 293 */ - void (GLAPIENTRYP MultMatrixf)(const GLfloat * m); /* 294 */ - void (GLAPIENTRYP MultMatrixd)(const GLdouble * m); /* 295 */ - void (GLAPIENTRYP Ortho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); /* 296 */ - void (GLAPIENTRYP PopMatrix)(void); /* 297 */ - void (GLAPIENTRYP PushMatrix)(void); /* 298 */ - void (GLAPIENTRYP Rotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); /* 299 */ - void (GLAPIENTRYP Rotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); /* 300 */ - void (GLAPIENTRYP Scaled)(GLdouble x, GLdouble y, GLdouble z); /* 301 */ - void (GLAPIENTRYP Scalef)(GLfloat x, GLfloat y, GLfloat z); /* 302 */ - void (GLAPIENTRYP Translated)(GLdouble x, GLdouble y, GLdouble z); /* 303 */ - void (GLAPIENTRYP Translatef)(GLfloat x, GLfloat y, GLfloat z); /* 304 */ - void (GLAPIENTRYP Viewport)(GLint x, GLint y, GLsizei width, GLsizei height); /* 305 */ - void (GLAPIENTRYP ArrayElement)(GLint i); /* 306 */ - void (GLAPIENTRYP BindTexture)(GLenum target, GLuint texture); /* 307 */ - void (GLAPIENTRYP ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 308 */ - void (GLAPIENTRYP DisableClientState)(GLenum array); /* 309 */ - void (GLAPIENTRYP DrawArrays)(GLenum mode, GLint first, GLsizei count); /* 310 */ - void (GLAPIENTRYP DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices); /* 311 */ - void (GLAPIENTRYP EdgeFlagPointer)(GLsizei stride, const GLvoid * pointer); /* 312 */ - void (GLAPIENTRYP EnableClientState)(GLenum array); /* 313 */ - void (GLAPIENTRYP IndexPointer)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 314 */ - void (GLAPIENTRYP Indexub)(GLubyte c); /* 315 */ - void (GLAPIENTRYP Indexubv)(const GLubyte * c); /* 316 */ - void (GLAPIENTRYP InterleavedArrays)(GLenum format, GLsizei stride, const GLvoid * pointer); /* 317 */ - void (GLAPIENTRYP NormalPointer)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 318 */ - void (GLAPIENTRYP PolygonOffset)(GLfloat factor, GLfloat units); /* 319 */ - void (GLAPIENTRYP TexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 320 */ - void (GLAPIENTRYP VertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 321 */ - GLboolean (GLAPIENTRYP AreTexturesResident)(GLsizei n, const GLuint * textures, GLboolean * residences); /* 322 */ - void (GLAPIENTRYP CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); /* 323 */ - void (GLAPIENTRYP CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); /* 324 */ - void (GLAPIENTRYP CopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); /* 325 */ - void (GLAPIENTRYP CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); /* 326 */ - void (GLAPIENTRYP DeleteTextures)(GLsizei n, const GLuint * textures); /* 327 */ - void (GLAPIENTRYP GenTextures)(GLsizei n, GLuint * textures); /* 328 */ - void (GLAPIENTRYP GetPointerv)(GLenum pname, GLvoid ** params); /* 329 */ - GLboolean (GLAPIENTRYP IsTexture)(GLuint texture); /* 330 */ - void (GLAPIENTRYP PrioritizeTextures)(GLsizei n, const GLuint * textures, const GLclampf * priorities); /* 331 */ - void (GLAPIENTRYP TexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels); /* 332 */ - void (GLAPIENTRYP TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); /* 333 */ - void (GLAPIENTRYP PopClientAttrib)(void); /* 334 */ - void (GLAPIENTRYP PushClientAttrib)(GLbitfield mask); /* 335 */ - void (GLAPIENTRYP BlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); /* 336 */ - void (GLAPIENTRYP BlendEquation)(GLenum mode); /* 337 */ - void (GLAPIENTRYP DrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices); /* 338 */ - void (GLAPIENTRYP ColorTable)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table); /* 339 */ - void (GLAPIENTRYP ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 340 */ - void (GLAPIENTRYP ColorTableParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 341 */ - void (GLAPIENTRYP CopyColorTable)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); /* 342 */ - void (GLAPIENTRYP GetColorTable)(GLenum target, GLenum format, GLenum type, GLvoid * table); /* 343 */ - void (GLAPIENTRYP GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 344 */ - void (GLAPIENTRYP GetColorTableParameteriv)(GLenum target, GLenum pname, GLint * params); /* 345 */ - void (GLAPIENTRYP ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data); /* 346 */ - void (GLAPIENTRYP CopyColorSubTable)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); /* 347 */ - void (GLAPIENTRYP ConvolutionFilter1D)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image); /* 348 */ - void (GLAPIENTRYP ConvolutionFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image); /* 349 */ - void (GLAPIENTRYP ConvolutionParameterf)(GLenum target, GLenum pname, GLfloat params); /* 350 */ - void (GLAPIENTRYP ConvolutionParameterfv)(GLenum target, GLenum pname, const GLfloat * params); /* 351 */ - void (GLAPIENTRYP ConvolutionParameteri)(GLenum target, GLenum pname, GLint params); /* 352 */ - void (GLAPIENTRYP ConvolutionParameteriv)(GLenum target, GLenum pname, const GLint * params); /* 353 */ - void (GLAPIENTRYP CopyConvolutionFilter1D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); /* 354 */ - void (GLAPIENTRYP CopyConvolutionFilter2D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); /* 355 */ - void (GLAPIENTRYP GetConvolutionFilter)(GLenum target, GLenum format, GLenum type, GLvoid * image); /* 356 */ - void (GLAPIENTRYP GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 357 */ - void (GLAPIENTRYP GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint * params); /* 358 */ - void (GLAPIENTRYP GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); /* 359 */ - void (GLAPIENTRYP SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column); /* 360 */ - void (GLAPIENTRYP GetHistogram)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); /* 361 */ - void (GLAPIENTRYP GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 362 */ - void (GLAPIENTRYP GetHistogramParameteriv)(GLenum target, GLenum pname, GLint * params); /* 363 */ - void (GLAPIENTRYP GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); /* 364 */ - void (GLAPIENTRYP GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat * params); /* 365 */ - void (GLAPIENTRYP GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint * params); /* 366 */ - void (GLAPIENTRYP Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); /* 367 */ - void (GLAPIENTRYP Minmax)(GLenum target, GLenum internalformat, GLboolean sink); /* 368 */ - void (GLAPIENTRYP ResetHistogram)(GLenum target); /* 369 */ - void (GLAPIENTRYP ResetMinmax)(GLenum target); /* 370 */ - void (GLAPIENTRYP TexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 371 */ - void (GLAPIENTRYP TexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels); /* 372 */ - void (GLAPIENTRYP CopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); /* 373 */ - void (GLAPIENTRYP ActiveTextureARB)(GLenum texture); /* 374 */ - void (GLAPIENTRYP ClientActiveTextureARB)(GLenum texture); /* 375 */ - void (GLAPIENTRYP MultiTexCoord1dARB)(GLenum target, GLdouble s); /* 376 */ - void (GLAPIENTRYP MultiTexCoord1dvARB)(GLenum target, const GLdouble * v); /* 377 */ - void (GLAPIENTRYP MultiTexCoord1fARB)(GLenum target, GLfloat s); /* 378 */ - void (GLAPIENTRYP MultiTexCoord1fvARB)(GLenum target, const GLfloat * v); /* 379 */ - void (GLAPIENTRYP MultiTexCoord1iARB)(GLenum target, GLint s); /* 380 */ - void (GLAPIENTRYP MultiTexCoord1ivARB)(GLenum target, const GLint * v); /* 381 */ - void (GLAPIENTRYP MultiTexCoord1sARB)(GLenum target, GLshort s); /* 382 */ - void (GLAPIENTRYP MultiTexCoord1svARB)(GLenum target, const GLshort * v); /* 383 */ - void (GLAPIENTRYP MultiTexCoord2dARB)(GLenum target, GLdouble s, GLdouble t); /* 384 */ - void (GLAPIENTRYP MultiTexCoord2dvARB)(GLenum target, const GLdouble * v); /* 385 */ - void (GLAPIENTRYP MultiTexCoord2fARB)(GLenum target, GLfloat s, GLfloat t); /* 386 */ - void (GLAPIENTRYP MultiTexCoord2fvARB)(GLenum target, const GLfloat * v); /* 387 */ - void (GLAPIENTRYP MultiTexCoord2iARB)(GLenum target, GLint s, GLint t); /* 388 */ - void (GLAPIENTRYP MultiTexCoord2ivARB)(GLenum target, const GLint * v); /* 389 */ - void (GLAPIENTRYP MultiTexCoord2sARB)(GLenum target, GLshort s, GLshort t); /* 390 */ - void (GLAPIENTRYP MultiTexCoord2svARB)(GLenum target, const GLshort * v); /* 391 */ - void (GLAPIENTRYP MultiTexCoord3dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r); /* 392 */ - void (GLAPIENTRYP MultiTexCoord3dvARB)(GLenum target, const GLdouble * v); /* 393 */ - void (GLAPIENTRYP MultiTexCoord3fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r); /* 394 */ - void (GLAPIENTRYP MultiTexCoord3fvARB)(GLenum target, const GLfloat * v); /* 395 */ - void (GLAPIENTRYP MultiTexCoord3iARB)(GLenum target, GLint s, GLint t, GLint r); /* 396 */ - void (GLAPIENTRYP MultiTexCoord3ivARB)(GLenum target, const GLint * v); /* 397 */ - void (GLAPIENTRYP MultiTexCoord3sARB)(GLenum target, GLshort s, GLshort t, GLshort r); /* 398 */ - void (GLAPIENTRYP MultiTexCoord3svARB)(GLenum target, const GLshort * v); /* 399 */ - void (GLAPIENTRYP MultiTexCoord4dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); /* 400 */ - void (GLAPIENTRYP MultiTexCoord4dvARB)(GLenum target, const GLdouble * v); /* 401 */ - void (GLAPIENTRYP MultiTexCoord4fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); /* 402 */ - void (GLAPIENTRYP MultiTexCoord4fvARB)(GLenum target, const GLfloat * v); /* 403 */ - void (GLAPIENTRYP MultiTexCoord4iARB)(GLenum target, GLint s, GLint t, GLint r, GLint q); /* 404 */ - void (GLAPIENTRYP MultiTexCoord4ivARB)(GLenum target, const GLint * v); /* 405 */ - void (GLAPIENTRYP MultiTexCoord4sARB)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); /* 406 */ - void (GLAPIENTRYP MultiTexCoord4svARB)(GLenum target, const GLshort * v); /* 407 */ - void (GLAPIENTRYP AttachShader)(GLuint program, GLuint shader); /* 408 */ - GLuint (GLAPIENTRYP CreateProgram)(void); /* 409 */ - GLuint (GLAPIENTRYP CreateShader)(GLenum type); /* 410 */ - void (GLAPIENTRYP DeleteProgram)(GLuint program); /* 411 */ - void (GLAPIENTRYP DeleteShader)(GLuint program); /* 412 */ - void (GLAPIENTRYP DetachShader)(GLuint program, GLuint shader); /* 413 */ - void (GLAPIENTRYP GetAttachedShaders)(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * obj); /* 414 */ - void (GLAPIENTRYP GetProgramInfoLog)(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog); /* 415 */ - void (GLAPIENTRYP GetProgramiv)(GLuint program, GLenum pname, GLint * params); /* 416 */ - void (GLAPIENTRYP GetShaderInfoLog)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog); /* 417 */ - void (GLAPIENTRYP GetShaderiv)(GLuint shader, GLenum pname, GLint * params); /* 418 */ - GLboolean (GLAPIENTRYP IsProgram)(GLuint program); /* 419 */ - GLboolean (GLAPIENTRYP IsShader)(GLuint shader); /* 420 */ - void (GLAPIENTRYP StencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask); /* 421 */ - void (GLAPIENTRYP StencilMaskSeparate)(GLenum face, GLuint mask); /* 422 */ - void (GLAPIENTRYP StencilOpSeparate)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass); /* 423 */ - void (GLAPIENTRYP UniformMatrix2x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 424 */ - void (GLAPIENTRYP UniformMatrix2x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 425 */ - void (GLAPIENTRYP UniformMatrix3x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 426 */ - void (GLAPIENTRYP UniformMatrix3x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 427 */ - void (GLAPIENTRYP UniformMatrix4x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 428 */ - void (GLAPIENTRYP UniformMatrix4x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 429 */ - void (GLAPIENTRYP ClampColor)(GLenum target, GLenum clamp); /* 430 */ - void (GLAPIENTRYP ClearBufferfi)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); /* 431 */ - void (GLAPIENTRYP ClearBufferfv)(GLenum buffer, GLint drawbuffer, const GLfloat * value); /* 432 */ - void (GLAPIENTRYP ClearBufferiv)(GLenum buffer, GLint drawbuffer, const GLint * value); /* 433 */ - void (GLAPIENTRYP ClearBufferuiv)(GLenum buffer, GLint drawbuffer, const GLuint * value); /* 434 */ - const GLubyte * (GLAPIENTRYP GetStringi)(GLenum name, GLuint index); /* 435 */ - void (GLAPIENTRYP TexBuffer)(GLenum target, GLenum internalFormat, GLuint buffer); /* 436 */ - void (GLAPIENTRYP FramebufferTexture)(GLenum target, GLenum attachment, GLuint texture, GLint level); /* 437 */ - void (GLAPIENTRYP GetBufferParameteri64v)(GLenum target, GLenum pname, GLint64 * params); /* 438 */ - void (GLAPIENTRYP GetInteger64i_v)(GLenum cap, GLuint index, GLint64 * data); /* 439 */ - void (GLAPIENTRYP VertexAttribDivisor)(GLuint index, GLuint divisor); /* 440 */ - void (GLAPIENTRYP LoadTransposeMatrixdARB)(const GLdouble * m); /* 441 */ - void (GLAPIENTRYP LoadTransposeMatrixfARB)(const GLfloat * m); /* 442 */ - void (GLAPIENTRYP MultTransposeMatrixdARB)(const GLdouble * m); /* 443 */ - void (GLAPIENTRYP MultTransposeMatrixfARB)(const GLfloat * m); /* 444 */ - void (GLAPIENTRYP SampleCoverageARB)(GLclampf value, GLboolean invert); /* 445 */ - void (GLAPIENTRYP CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data); /* 446 */ - void (GLAPIENTRYP CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); /* 447 */ - void (GLAPIENTRYP CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); /* 448 */ - void (GLAPIENTRYP CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data); /* 449 */ - void (GLAPIENTRYP CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); /* 450 */ - void (GLAPIENTRYP CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); /* 451 */ - void (GLAPIENTRYP GetCompressedTexImageARB)(GLenum target, GLint level, GLvoid * img); /* 452 */ - void (GLAPIENTRYP DisableVertexAttribArrayARB)(GLuint index); /* 453 */ - void (GLAPIENTRYP EnableVertexAttribArrayARB)(GLuint index); /* 454 */ - void (GLAPIENTRYP GetProgramEnvParameterdvARB)(GLenum target, GLuint index, GLdouble * params); /* 455 */ - void (GLAPIENTRYP GetProgramEnvParameterfvARB)(GLenum target, GLuint index, GLfloat * params); /* 456 */ - void (GLAPIENTRYP GetProgramLocalParameterdvARB)(GLenum target, GLuint index, GLdouble * params); /* 457 */ - void (GLAPIENTRYP GetProgramLocalParameterfvARB)(GLenum target, GLuint index, GLfloat * params); /* 458 */ - void (GLAPIENTRYP GetProgramStringARB)(GLenum target, GLenum pname, GLvoid * string); /* 459 */ - void (GLAPIENTRYP GetProgramivARB)(GLenum target, GLenum pname, GLint * params); /* 460 */ - void (GLAPIENTRYP GetVertexAttribdvARB)(GLuint index, GLenum pname, GLdouble * params); /* 461 */ - void (GLAPIENTRYP GetVertexAttribfvARB)(GLuint index, GLenum pname, GLfloat * params); /* 462 */ - void (GLAPIENTRYP GetVertexAttribivARB)(GLuint index, GLenum pname, GLint * params); /* 463 */ - void (GLAPIENTRYP ProgramEnvParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 464 */ - void (GLAPIENTRYP ProgramEnvParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params); /* 465 */ - void (GLAPIENTRYP ProgramEnvParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 466 */ - void (GLAPIENTRYP ProgramEnvParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params); /* 467 */ - void (GLAPIENTRYP ProgramLocalParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 468 */ - void (GLAPIENTRYP ProgramLocalParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params); /* 469 */ - void (GLAPIENTRYP ProgramLocalParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 470 */ - void (GLAPIENTRYP ProgramLocalParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params); /* 471 */ - void (GLAPIENTRYP ProgramStringARB)(GLenum target, GLenum format, GLsizei len, const GLvoid * string); /* 472 */ - void (GLAPIENTRYP VertexAttrib1dARB)(GLuint index, GLdouble x); /* 473 */ - void (GLAPIENTRYP VertexAttrib1dvARB)(GLuint index, const GLdouble * v); /* 474 */ - void (GLAPIENTRYP VertexAttrib1fARB)(GLuint index, GLfloat x); /* 475 */ - void (GLAPIENTRYP VertexAttrib1fvARB)(GLuint index, const GLfloat * v); /* 476 */ - void (GLAPIENTRYP VertexAttrib1sARB)(GLuint index, GLshort x); /* 477 */ - void (GLAPIENTRYP VertexAttrib1svARB)(GLuint index, const GLshort * v); /* 478 */ - void (GLAPIENTRYP VertexAttrib2dARB)(GLuint index, GLdouble x, GLdouble y); /* 479 */ - void (GLAPIENTRYP VertexAttrib2dvARB)(GLuint index, const GLdouble * v); /* 480 */ - void (GLAPIENTRYP VertexAttrib2fARB)(GLuint index, GLfloat x, GLfloat y); /* 481 */ - void (GLAPIENTRYP VertexAttrib2fvARB)(GLuint index, const GLfloat * v); /* 482 */ - void (GLAPIENTRYP VertexAttrib2sARB)(GLuint index, GLshort x, GLshort y); /* 483 */ - void (GLAPIENTRYP VertexAttrib2svARB)(GLuint index, const GLshort * v); /* 484 */ - void (GLAPIENTRYP VertexAttrib3dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 485 */ - void (GLAPIENTRYP VertexAttrib3dvARB)(GLuint index, const GLdouble * v); /* 486 */ - void (GLAPIENTRYP VertexAttrib3fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 487 */ - void (GLAPIENTRYP VertexAttrib3fvARB)(GLuint index, const GLfloat * v); /* 488 */ - void (GLAPIENTRYP VertexAttrib3sARB)(GLuint index, GLshort x, GLshort y, GLshort z); /* 489 */ - void (GLAPIENTRYP VertexAttrib3svARB)(GLuint index, const GLshort * v); /* 490 */ - void (GLAPIENTRYP VertexAttrib4NbvARB)(GLuint index, const GLbyte * v); /* 491 */ - void (GLAPIENTRYP VertexAttrib4NivARB)(GLuint index, const GLint * v); /* 492 */ - void (GLAPIENTRYP VertexAttrib4NsvARB)(GLuint index, const GLshort * v); /* 493 */ - void (GLAPIENTRYP VertexAttrib4NubARB)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 494 */ - void (GLAPIENTRYP VertexAttrib4NubvARB)(GLuint index, const GLubyte * v); /* 495 */ - void (GLAPIENTRYP VertexAttrib4NuivARB)(GLuint index, const GLuint * v); /* 496 */ - void (GLAPIENTRYP VertexAttrib4NusvARB)(GLuint index, const GLushort * v); /* 497 */ - void (GLAPIENTRYP VertexAttrib4bvARB)(GLuint index, const GLbyte * v); /* 498 */ - void (GLAPIENTRYP VertexAttrib4dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 499 */ - void (GLAPIENTRYP VertexAttrib4dvARB)(GLuint index, const GLdouble * v); /* 500 */ - void (GLAPIENTRYP VertexAttrib4fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 501 */ - void (GLAPIENTRYP VertexAttrib4fvARB)(GLuint index, const GLfloat * v); /* 502 */ - void (GLAPIENTRYP VertexAttrib4ivARB)(GLuint index, const GLint * v); /* 503 */ - void (GLAPIENTRYP VertexAttrib4sARB)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 504 */ - void (GLAPIENTRYP VertexAttrib4svARB)(GLuint index, const GLshort * v); /* 505 */ - void (GLAPIENTRYP VertexAttrib4ubvARB)(GLuint index, const GLubyte * v); /* 506 */ - void (GLAPIENTRYP VertexAttrib4uivARB)(GLuint index, const GLuint * v); /* 507 */ - void (GLAPIENTRYP VertexAttrib4usvARB)(GLuint index, const GLushort * v); /* 508 */ - void (GLAPIENTRYP VertexAttribPointerARB)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer); /* 509 */ - void (GLAPIENTRYP BindBufferARB)(GLenum target, GLuint buffer); /* 510 */ - void (GLAPIENTRYP BufferDataARB)(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage); /* 511 */ - void (GLAPIENTRYP BufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data); /* 512 */ - void (GLAPIENTRYP DeleteBuffersARB)(GLsizei n, const GLuint * buffer); /* 513 */ - void (GLAPIENTRYP GenBuffersARB)(GLsizei n, GLuint * buffer); /* 514 */ - void (GLAPIENTRYP GetBufferParameterivARB)(GLenum target, GLenum pname, GLint * params); /* 515 */ - void (GLAPIENTRYP GetBufferPointervARB)(GLenum target, GLenum pname, GLvoid ** params); /* 516 */ - void (GLAPIENTRYP GetBufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data); /* 517 */ - GLboolean (GLAPIENTRYP IsBufferARB)(GLuint buffer); /* 518 */ - GLvoid * (GLAPIENTRYP MapBufferARB)(GLenum target, GLenum access); /* 519 */ - GLboolean (GLAPIENTRYP UnmapBufferARB)(GLenum target); /* 520 */ - void (GLAPIENTRYP BeginQueryARB)(GLenum target, GLuint id); /* 521 */ - void (GLAPIENTRYP DeleteQueriesARB)(GLsizei n, const GLuint * ids); /* 522 */ - void (GLAPIENTRYP EndQueryARB)(GLenum target); /* 523 */ - void (GLAPIENTRYP GenQueriesARB)(GLsizei n, GLuint * ids); /* 524 */ - void (GLAPIENTRYP GetQueryObjectivARB)(GLuint id, GLenum pname, GLint * params); /* 525 */ - void (GLAPIENTRYP GetQueryObjectuivARB)(GLuint id, GLenum pname, GLuint * params); /* 526 */ - void (GLAPIENTRYP GetQueryivARB)(GLenum target, GLenum pname, GLint * params); /* 527 */ - GLboolean (GLAPIENTRYP IsQueryARB)(GLuint id); /* 528 */ - void (GLAPIENTRYP AttachObjectARB)(GLhandleARB containerObj, GLhandleARB obj); /* 529 */ - void (GLAPIENTRYP CompileShaderARB)(GLhandleARB shader); /* 530 */ - GLhandleARB (GLAPIENTRYP CreateProgramObjectARB)(void); /* 531 */ - GLhandleARB (GLAPIENTRYP CreateShaderObjectARB)(GLenum shaderType); /* 532 */ - void (GLAPIENTRYP DeleteObjectARB)(GLhandleARB obj); /* 533 */ - void (GLAPIENTRYP DetachObjectARB)(GLhandleARB containerObj, GLhandleARB attachedObj); /* 534 */ - void (GLAPIENTRYP GetActiveUniformARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); /* 535 */ - void (GLAPIENTRYP GetAttachedObjectsARB)(GLhandleARB containerObj, GLsizei maxLength, GLsizei * length, GLhandleARB * infoLog); /* 536 */ - GLhandleARB (GLAPIENTRYP GetHandleARB)(GLenum pname); /* 537 */ - void (GLAPIENTRYP GetInfoLogARB)(GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog); /* 538 */ - void (GLAPIENTRYP GetObjectParameterfvARB)(GLhandleARB obj, GLenum pname, GLfloat * params); /* 539 */ - void (GLAPIENTRYP GetObjectParameterivARB)(GLhandleARB obj, GLenum pname, GLint * params); /* 540 */ - void (GLAPIENTRYP GetShaderSourceARB)(GLhandleARB shader, GLsizei bufSize, GLsizei * length, GLcharARB * source); /* 541 */ - GLint (GLAPIENTRYP GetUniformLocationARB)(GLhandleARB program, const GLcharARB * name); /* 542 */ - void (GLAPIENTRYP GetUniformfvARB)(GLhandleARB program, GLint location, GLfloat * params); /* 543 */ - void (GLAPIENTRYP GetUniformivARB)(GLhandleARB program, GLint location, GLint * params); /* 544 */ - void (GLAPIENTRYP LinkProgramARB)(GLhandleARB program); /* 545 */ - void (GLAPIENTRYP ShaderSourceARB)(GLhandleARB shader, GLsizei count, const GLcharARB ** string, const GLint * length); /* 546 */ - void (GLAPIENTRYP Uniform1fARB)(GLint location, GLfloat v0); /* 547 */ - void (GLAPIENTRYP Uniform1fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 548 */ - void (GLAPIENTRYP Uniform1iARB)(GLint location, GLint v0); /* 549 */ - void (GLAPIENTRYP Uniform1ivARB)(GLint location, GLsizei count, const GLint * value); /* 550 */ - void (GLAPIENTRYP Uniform2fARB)(GLint location, GLfloat v0, GLfloat v1); /* 551 */ - void (GLAPIENTRYP Uniform2fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 552 */ - void (GLAPIENTRYP Uniform2iARB)(GLint location, GLint v0, GLint v1); /* 553 */ - void (GLAPIENTRYP Uniform2ivARB)(GLint location, GLsizei count, const GLint * value); /* 554 */ - void (GLAPIENTRYP Uniform3fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); /* 555 */ - void (GLAPIENTRYP Uniform3fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 556 */ - void (GLAPIENTRYP Uniform3iARB)(GLint location, GLint v0, GLint v1, GLint v2); /* 557 */ - void (GLAPIENTRYP Uniform3ivARB)(GLint location, GLsizei count, const GLint * value); /* 558 */ - void (GLAPIENTRYP Uniform4fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); /* 559 */ - void (GLAPIENTRYP Uniform4fvARB)(GLint location, GLsizei count, const GLfloat * value); /* 560 */ - void (GLAPIENTRYP Uniform4iARB)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); /* 561 */ - void (GLAPIENTRYP Uniform4ivARB)(GLint location, GLsizei count, const GLint * value); /* 562 */ - void (GLAPIENTRYP UniformMatrix2fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 563 */ - void (GLAPIENTRYP UniformMatrix3fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 564 */ - void (GLAPIENTRYP UniformMatrix4fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); /* 565 */ - void (GLAPIENTRYP UseProgramObjectARB)(GLhandleARB program); /* 566 */ - void (GLAPIENTRYP ValidateProgramARB)(GLhandleARB program); /* 567 */ - void (GLAPIENTRYP BindAttribLocationARB)(GLhandleARB program, GLuint index, const GLcharARB * name); /* 568 */ - void (GLAPIENTRYP GetActiveAttribARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); /* 569 */ - GLint (GLAPIENTRYP GetAttribLocationARB)(GLhandleARB program, const GLcharARB * name); /* 570 */ - void (GLAPIENTRYP DrawBuffersARB)(GLsizei n, const GLenum * bufs); /* 571 */ - void (GLAPIENTRYP ClampColorARB)(GLenum target, GLenum clamp); /* 572 */ - void (GLAPIENTRYP DrawArraysInstancedARB)(GLenum mode, GLint first, GLsizei count, GLsizei primcount); /* 573 */ - void (GLAPIENTRYP DrawElementsInstancedARB)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei primcount); /* 574 */ - void (GLAPIENTRYP RenderbufferStorageMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); /* 575 */ - void (GLAPIENTRYP FramebufferTextureARB)(GLenum target, GLenum attachment, GLuint texture, GLint level); /* 576 */ - void (GLAPIENTRYP FramebufferTextureFaceARB)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); /* 577 */ - void (GLAPIENTRYP ProgramParameteriARB)(GLuint program, GLenum pname, GLint value); /* 578 */ - void (GLAPIENTRYP VertexAttribDivisorARB)(GLuint index, GLuint divisor); /* 579 */ - void (GLAPIENTRYP FlushMappedBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length); /* 580 */ - GLvoid * (GLAPIENTRYP MapBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); /* 581 */ - void (GLAPIENTRYP TexBufferARB)(GLenum target, GLenum internalFormat, GLuint buffer); /* 582 */ - void (GLAPIENTRYP BindVertexArray)(GLuint array); /* 583 */ - void (GLAPIENTRYP GenVertexArrays)(GLsizei n, GLuint * arrays); /* 584 */ - void (GLAPIENTRYP CopyBufferSubData)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); /* 585 */ - GLenum (GLAPIENTRYP ClientWaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout); /* 586 */ - void (GLAPIENTRYP DeleteSync)(GLsync sync); /* 587 */ - GLsync (GLAPIENTRYP FenceSync)(GLenum condition, GLbitfield flags); /* 588 */ - void (GLAPIENTRYP GetInteger64v)(GLenum pname, GLint64 * params); /* 589 */ - void (GLAPIENTRYP GetSynciv)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values); /* 590 */ - GLboolean (GLAPIENTRYP IsSync)(GLsync sync); /* 591 */ - void (GLAPIENTRYP WaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout); /* 592 */ - void (GLAPIENTRYP DrawElementsBaseVertex)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLint basevertex); /* 593 */ - void (GLAPIENTRYP DrawElementsInstancedBaseVertex)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei primcount, GLint basevertex); /* 594 */ - void (GLAPIENTRYP DrawRangeElementsBaseVertex)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices, GLint basevertex); /* 595 */ - void (GLAPIENTRYP MultiDrawElementsBaseVertex)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount, const GLint * basevertex); /* 596 */ - void (GLAPIENTRYP BlendEquationSeparateiARB)(GLuint buf, GLenum modeRGB, GLenum modeA); /* 597 */ - void (GLAPIENTRYP BlendEquationiARB)(GLuint buf, GLenum mode); /* 598 */ - void (GLAPIENTRYP BlendFuncSeparateiARB)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA); /* 599 */ - void (GLAPIENTRYP BlendFunciARB)(GLuint buf, GLenum src, GLenum dst); /* 600 */ - void (GLAPIENTRYP BindSampler)(GLuint unit, GLuint sampler); /* 601 */ - void (GLAPIENTRYP DeleteSamplers)(GLsizei count, const GLuint * samplers); /* 602 */ - void (GLAPIENTRYP GenSamplers)(GLsizei count, GLuint * samplers); /* 603 */ - void (GLAPIENTRYP GetSamplerParameterIiv)(GLuint sampler, GLenum pname, GLint * params); /* 604 */ - void (GLAPIENTRYP GetSamplerParameterIuiv)(GLuint sampler, GLenum pname, GLuint * params); /* 605 */ - void (GLAPIENTRYP GetSamplerParameterfv)(GLuint sampler, GLenum pname, GLfloat * params); /* 606 */ - void (GLAPIENTRYP GetSamplerParameteriv)(GLuint sampler, GLenum pname, GLint * params); /* 607 */ - GLboolean (GLAPIENTRYP IsSampler)(GLuint sampler); /* 608 */ - void (GLAPIENTRYP SamplerParameterIiv)(GLuint sampler, GLenum pname, const GLint * params); /* 609 */ - void (GLAPIENTRYP SamplerParameterIuiv)(GLuint sampler, GLenum pname, const GLuint * params); /* 610 */ - void (GLAPIENTRYP SamplerParameterf)(GLuint sampler, GLenum pname, GLfloat param); /* 611 */ - void (GLAPIENTRYP SamplerParameterfv)(GLuint sampler, GLenum pname, const GLfloat * params); /* 612 */ - void (GLAPIENTRYP SamplerParameteri)(GLuint sampler, GLenum pname, GLint param); /* 613 */ - void (GLAPIENTRYP SamplerParameteriv)(GLuint sampler, GLenum pname, const GLint * params); /* 614 */ - void (GLAPIENTRYP ColorP3ui)(GLenum type, GLuint color); /* 615 */ - void (GLAPIENTRYP ColorP3uiv)(GLenum type, const GLuint * color); /* 616 */ - void (GLAPIENTRYP ColorP4ui)(GLenum type, GLuint color); /* 617 */ - void (GLAPIENTRYP ColorP4uiv)(GLenum type, const GLuint * color); /* 618 */ - void (GLAPIENTRYP MultiTexCoordP1ui)(GLenum texture, GLenum type, GLuint coords); /* 619 */ - void (GLAPIENTRYP MultiTexCoordP1uiv)(GLenum texture, GLenum type, const GLuint * coords); /* 620 */ - void (GLAPIENTRYP MultiTexCoordP2ui)(GLenum texture, GLenum type, GLuint coords); /* 621 */ - void (GLAPIENTRYP MultiTexCoordP2uiv)(GLenum texture, GLenum type, const GLuint * coords); /* 622 */ - void (GLAPIENTRYP MultiTexCoordP3ui)(GLenum texture, GLenum type, GLuint coords); /* 623 */ - void (GLAPIENTRYP MultiTexCoordP3uiv)(GLenum texture, GLenum type, const GLuint * coords); /* 624 */ - void (GLAPIENTRYP MultiTexCoordP4ui)(GLenum texture, GLenum type, GLuint coords); /* 625 */ - void (GLAPIENTRYP MultiTexCoordP4uiv)(GLenum texture, GLenum type, const GLuint * coords); /* 626 */ - void (GLAPIENTRYP NormalP3ui)(GLenum type, GLuint coords); /* 627 */ - void (GLAPIENTRYP NormalP3uiv)(GLenum type, const GLuint * coords); /* 628 */ - void (GLAPIENTRYP SecondaryColorP3ui)(GLenum type, GLuint color); /* 629 */ - void (GLAPIENTRYP SecondaryColorP3uiv)(GLenum type, const GLuint * color); /* 630 */ - void (GLAPIENTRYP TexCoordP1ui)(GLenum type, GLuint coords); /* 631 */ - void (GLAPIENTRYP TexCoordP1uiv)(GLenum type, const GLuint * coords); /* 632 */ - void (GLAPIENTRYP TexCoordP2ui)(GLenum type, GLuint coords); /* 633 */ - void (GLAPIENTRYP TexCoordP2uiv)(GLenum type, const GLuint * coords); /* 634 */ - void (GLAPIENTRYP TexCoordP3ui)(GLenum type, GLuint coords); /* 635 */ - void (GLAPIENTRYP TexCoordP3uiv)(GLenum type, const GLuint * coords); /* 636 */ - void (GLAPIENTRYP TexCoordP4ui)(GLenum type, GLuint coords); /* 637 */ - void (GLAPIENTRYP TexCoordP4uiv)(GLenum type, const GLuint * coords); /* 638 */ - void (GLAPIENTRYP VertexAttribP1ui)(GLuint index, GLenum type, GLboolean normalized, GLuint value); /* 639 */ - void (GLAPIENTRYP VertexAttribP1uiv)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value); /* 640 */ - void (GLAPIENTRYP VertexAttribP2ui)(GLuint index, GLenum type, GLboolean normalized, GLuint value); /* 641 */ - void (GLAPIENTRYP VertexAttribP2uiv)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value); /* 642 */ - void (GLAPIENTRYP VertexAttribP3ui)(GLuint index, GLenum type, GLboolean normalized, GLuint value); /* 643 */ - void (GLAPIENTRYP VertexAttribP3uiv)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value); /* 644 */ - void (GLAPIENTRYP VertexAttribP4ui)(GLuint index, GLenum type, GLboolean normalized, GLuint value); /* 645 */ - void (GLAPIENTRYP VertexAttribP4uiv)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value); /* 646 */ - void (GLAPIENTRYP VertexP2ui)(GLenum type, GLuint value); /* 647 */ - void (GLAPIENTRYP VertexP2uiv)(GLenum type, const GLuint * value); /* 648 */ - void (GLAPIENTRYP VertexP3ui)(GLenum type, GLuint value); /* 649 */ - void (GLAPIENTRYP VertexP3uiv)(GLenum type, const GLuint * value); /* 650 */ - void (GLAPIENTRYP VertexP4ui)(GLenum type, GLuint value); /* 651 */ - void (GLAPIENTRYP VertexP4uiv)(GLenum type, const GLuint * value); /* 652 */ - void (GLAPIENTRYP BindTransformFeedback)(GLenum target, GLuint id); /* 653 */ - void (GLAPIENTRYP DeleteTransformFeedbacks)(GLsizei n, const GLuint * ids); /* 654 */ - void (GLAPIENTRYP DrawTransformFeedback)(GLenum mode, GLuint id); /* 655 */ - void (GLAPIENTRYP GenTransformFeedbacks)(GLsizei n, GLuint * ids); /* 656 */ - GLboolean (GLAPIENTRYP IsTransformFeedback)(GLuint id); /* 657 */ - void (GLAPIENTRYP PauseTransformFeedback)(void); /* 658 */ - void (GLAPIENTRYP ResumeTransformFeedback)(void); /* 659 */ - void (GLAPIENTRYP ClearDepthf)(GLclampf depth); /* 660 */ - void (GLAPIENTRYP DepthRangef)(GLclampf zNear, GLclampf zFar); /* 661 */ - void (GLAPIENTRYP GetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision); /* 662 */ - void (GLAPIENTRYP ReleaseShaderCompiler)(void); /* 663 */ - void (GLAPIENTRYP ShaderBinary)(GLsizei n, const GLuint * shaders, GLenum binaryformat, const GLvoid * binary, GLsizei length); /* 664 */ - GLenum (GLAPIENTRYP GetGraphicsResetStatusARB)(void); /* 665 */ - void (GLAPIENTRYP GetnColorTableARB)(GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid * table); /* 666 */ - void (GLAPIENTRYP GetnCompressedTexImageARB)(GLenum target, GLint lod, GLsizei bufSize, GLvoid * img); /* 667 */ - void (GLAPIENTRYP GetnConvolutionFilterARB)(GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid * image); /* 668 */ - void (GLAPIENTRYP GetnHistogramARB)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid * values); /* 669 */ - void (GLAPIENTRYP GetnMapdvARB)(GLenum target, GLenum query, GLsizei bufSize, GLdouble * v); /* 670 */ - void (GLAPIENTRYP GetnMapfvARB)(GLenum target, GLenum query, GLsizei bufSize, GLfloat * v); /* 671 */ - void (GLAPIENTRYP GetnMapivARB)(GLenum target, GLenum query, GLsizei bufSize, GLint * v); /* 672 */ - void (GLAPIENTRYP GetnMinmaxARB)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid * values); /* 673 */ - void (GLAPIENTRYP GetnPixelMapfvARB)(GLenum map, GLsizei bufSize, GLfloat * values); /* 674 */ - void (GLAPIENTRYP GetnPixelMapuivARB)(GLenum map, GLsizei bufSize, GLuint * values); /* 675 */ - void (GLAPIENTRYP GetnPixelMapusvARB)(GLenum map, GLsizei bufSize, GLushort * values); /* 676 */ - void (GLAPIENTRYP GetnPolygonStippleARB)(GLsizei bufSize, GLubyte * pattern); /* 677 */ - void (GLAPIENTRYP GetnSeparableFilterARB)(GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid * row, GLsizei columnBufSize, GLvoid * column, GLvoid * span); /* 678 */ - void (GLAPIENTRYP GetnTexImageARB)(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid * img); /* 679 */ - void (GLAPIENTRYP GetnUniformdvARB)(GLhandleARB program, GLint location, GLsizei bufSize, GLdouble * params); /* 680 */ - void (GLAPIENTRYP GetnUniformfvARB)(GLhandleARB program, GLint location, GLsizei bufSize, GLfloat * params); /* 681 */ - void (GLAPIENTRYP GetnUniformivARB)(GLhandleARB program, GLint location, GLsizei bufSize, GLint * params); /* 682 */ - void (GLAPIENTRYP GetnUniformuivARB)(GLhandleARB program, GLint location, GLsizei bufSize, GLuint * params); /* 683 */ - void (GLAPIENTRYP ReadnPixelsARB)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid * data); /* 684 */ - void (GLAPIENTRYP TexStorage1D)(GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width); /* 685 */ - void (GLAPIENTRYP TexStorage2D)(GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height); /* 686 */ - void (GLAPIENTRYP TexStorage3D)(GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth); /* 687 */ - void (GLAPIENTRYP TextureStorage1DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width); /* 688 */ - void (GLAPIENTRYP TextureStorage2DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height); /* 689 */ - void (GLAPIENTRYP TextureStorage3DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth); /* 690 */ - void (GLAPIENTRYP PolygonOffsetEXT)(GLfloat factor, GLfloat bias); /* 691 */ - void (GLAPIENTRYP GetPixelTexGenParameterfvSGIS)(GLenum pname, GLfloat * params); /* 692 */ - void (GLAPIENTRYP GetPixelTexGenParameterivSGIS)(GLenum pname, GLint * params); /* 693 */ - void (GLAPIENTRYP PixelTexGenParameterfSGIS)(GLenum pname, GLfloat param); /* 694 */ - void (GLAPIENTRYP PixelTexGenParameterfvSGIS)(GLenum pname, const GLfloat * params); /* 695 */ - void (GLAPIENTRYP PixelTexGenParameteriSGIS)(GLenum pname, GLint param); /* 696 */ - void (GLAPIENTRYP PixelTexGenParameterivSGIS)(GLenum pname, const GLint * params); /* 697 */ - void (GLAPIENTRYP SampleMaskSGIS)(GLclampf value, GLboolean invert); /* 698 */ - void (GLAPIENTRYP SamplePatternSGIS)(GLenum pattern); /* 699 */ - void (GLAPIENTRYP ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 700 */ - void (GLAPIENTRYP EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean * pointer); /* 701 */ - void (GLAPIENTRYP IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 702 */ - void (GLAPIENTRYP NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 703 */ - void (GLAPIENTRYP TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 704 */ - void (GLAPIENTRYP VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); /* 705 */ - void (GLAPIENTRYP PointParameterfEXT)(GLenum pname, GLfloat param); /* 706 */ - void (GLAPIENTRYP PointParameterfvEXT)(GLenum pname, const GLfloat * params); /* 707 */ - void (GLAPIENTRYP LockArraysEXT)(GLint first, GLsizei count); /* 708 */ - void (GLAPIENTRYP UnlockArraysEXT)(void); /* 709 */ - void (GLAPIENTRYP SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue); /* 710 */ - void (GLAPIENTRYP SecondaryColor3bvEXT)(const GLbyte * v); /* 711 */ - void (GLAPIENTRYP SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue); /* 712 */ - void (GLAPIENTRYP SecondaryColor3dvEXT)(const GLdouble * v); /* 713 */ - void (GLAPIENTRYP SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue); /* 714 */ - void (GLAPIENTRYP SecondaryColor3fvEXT)(const GLfloat * v); /* 715 */ - void (GLAPIENTRYP SecondaryColor3iEXT)(GLint red, GLint green, GLint blue); /* 716 */ - void (GLAPIENTRYP SecondaryColor3ivEXT)(const GLint * v); /* 717 */ - void (GLAPIENTRYP SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue); /* 718 */ - void (GLAPIENTRYP SecondaryColor3svEXT)(const GLshort * v); /* 719 */ - void (GLAPIENTRYP SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue); /* 720 */ - void (GLAPIENTRYP SecondaryColor3ubvEXT)(const GLubyte * v); /* 721 */ - void (GLAPIENTRYP SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue); /* 722 */ - void (GLAPIENTRYP SecondaryColor3uivEXT)(const GLuint * v); /* 723 */ - void (GLAPIENTRYP SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue); /* 724 */ - void (GLAPIENTRYP SecondaryColor3usvEXT)(const GLushort * v); /* 725 */ - void (GLAPIENTRYP SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 726 */ - void (GLAPIENTRYP MultiDrawArraysEXT)(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount); /* 727 */ - void (GLAPIENTRYP MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount); /* 728 */ - void (GLAPIENTRYP FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid * pointer); /* 729 */ - void (GLAPIENTRYP FogCoorddEXT)(GLdouble coord); /* 730 */ - void (GLAPIENTRYP FogCoorddvEXT)(const GLdouble * coord); /* 731 */ - void (GLAPIENTRYP FogCoordfEXT)(GLfloat coord); /* 732 */ - void (GLAPIENTRYP FogCoordfvEXT)(const GLfloat * coord); /* 733 */ - void (GLAPIENTRYP PixelTexGenSGIX)(GLenum mode); /* 734 */ - void (GLAPIENTRYP BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); /* 735 */ - void (GLAPIENTRYP FlushVertexArrayRangeNV)(void); /* 736 */ - void (GLAPIENTRYP VertexArrayRangeNV)(GLsizei length, const GLvoid * pointer); /* 737 */ - void (GLAPIENTRYP CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 738 */ - void (GLAPIENTRYP CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); /* 739 */ - void (GLAPIENTRYP CombinerParameterfNV)(GLenum pname, GLfloat param); /* 740 */ - void (GLAPIENTRYP CombinerParameterfvNV)(GLenum pname, const GLfloat * params); /* 741 */ - void (GLAPIENTRYP CombinerParameteriNV)(GLenum pname, GLint param); /* 742 */ - void (GLAPIENTRYP CombinerParameterivNV)(GLenum pname, const GLint * params); /* 743 */ - void (GLAPIENTRYP FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); /* 744 */ - void (GLAPIENTRYP GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params); /* 745 */ - void (GLAPIENTRYP GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params); /* 746 */ - void (GLAPIENTRYP GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat * params); /* 747 */ - void (GLAPIENTRYP GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint * params); /* 748 */ - void (GLAPIENTRYP GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat * params); /* 749 */ - void (GLAPIENTRYP GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint * params); /* 750 */ - void (GLAPIENTRYP ResizeBuffersMESA)(void); /* 751 */ - void (GLAPIENTRYP WindowPos2dMESA)(GLdouble x, GLdouble y); /* 752 */ - void (GLAPIENTRYP WindowPos2dvMESA)(const GLdouble * v); /* 753 */ - void (GLAPIENTRYP WindowPos2fMESA)(GLfloat x, GLfloat y); /* 754 */ - void (GLAPIENTRYP WindowPos2fvMESA)(const GLfloat * v); /* 755 */ - void (GLAPIENTRYP WindowPos2iMESA)(GLint x, GLint y); /* 756 */ - void (GLAPIENTRYP WindowPos2ivMESA)(const GLint * v); /* 757 */ - void (GLAPIENTRYP WindowPos2sMESA)(GLshort x, GLshort y); /* 758 */ - void (GLAPIENTRYP WindowPos2svMESA)(const GLshort * v); /* 759 */ - void (GLAPIENTRYP WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z); /* 760 */ - void (GLAPIENTRYP WindowPos3dvMESA)(const GLdouble * v); /* 761 */ - void (GLAPIENTRYP WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z); /* 762 */ - void (GLAPIENTRYP WindowPos3fvMESA)(const GLfloat * v); /* 763 */ - void (GLAPIENTRYP WindowPos3iMESA)(GLint x, GLint y, GLint z); /* 764 */ - void (GLAPIENTRYP WindowPos3ivMESA)(const GLint * v); /* 765 */ - void (GLAPIENTRYP WindowPos3sMESA)(GLshort x, GLshort y, GLshort z); /* 766 */ - void (GLAPIENTRYP WindowPos3svMESA)(const GLshort * v); /* 767 */ - void (GLAPIENTRYP WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 768 */ - void (GLAPIENTRYP WindowPos4dvMESA)(const GLdouble * v); /* 769 */ - void (GLAPIENTRYP WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 770 */ - void (GLAPIENTRYP WindowPos4fvMESA)(const GLfloat * v); /* 771 */ - void (GLAPIENTRYP WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w); /* 772 */ - void (GLAPIENTRYP WindowPos4ivMESA)(const GLint * v); /* 773 */ - void (GLAPIENTRYP WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w); /* 774 */ - void (GLAPIENTRYP WindowPos4svMESA)(const GLshort * v); /* 775 */ - void (GLAPIENTRYP MultiModeDrawArraysIBM)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); /* 776 */ - void (GLAPIENTRYP MultiModeDrawElementsIBM)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); /* 777 */ - void (GLAPIENTRYP DeleteFencesNV)(GLsizei n, const GLuint * fences); /* 778 */ - void (GLAPIENTRYP FinishFenceNV)(GLuint fence); /* 779 */ - void (GLAPIENTRYP GenFencesNV)(GLsizei n, GLuint * fences); /* 780 */ - void (GLAPIENTRYP GetFenceivNV)(GLuint fence, GLenum pname, GLint * params); /* 781 */ - GLboolean (GLAPIENTRYP IsFenceNV)(GLuint fence); /* 782 */ - void (GLAPIENTRYP SetFenceNV)(GLuint fence, GLenum condition); /* 783 */ - GLboolean (GLAPIENTRYP TestFenceNV)(GLuint fence); /* 784 */ - GLboolean (GLAPIENTRYP AreProgramsResidentNV)(GLsizei n, const GLuint * ids, GLboolean * residences); /* 785 */ - void (GLAPIENTRYP BindProgramNV)(GLenum target, GLuint program); /* 786 */ - void (GLAPIENTRYP DeleteProgramsNV)(GLsizei n, const GLuint * programs); /* 787 */ - void (GLAPIENTRYP ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat * params); /* 788 */ - void (GLAPIENTRYP GenProgramsNV)(GLsizei n, GLuint * programs); /* 789 */ - void (GLAPIENTRYP GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble * params); /* 790 */ - void (GLAPIENTRYP GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat * params); /* 791 */ - void (GLAPIENTRYP GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program); /* 792 */ - void (GLAPIENTRYP GetProgramivNV)(GLuint id, GLenum pname, GLint * params); /* 793 */ - void (GLAPIENTRYP GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params); /* 794 */ - void (GLAPIENTRYP GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** pointer); /* 795 */ - void (GLAPIENTRYP GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params); /* 796 */ - void (GLAPIENTRYP GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params); /* 797 */ - void (GLAPIENTRYP GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params); /* 798 */ - GLboolean (GLAPIENTRYP IsProgramNV)(GLuint program); /* 799 */ - void (GLAPIENTRYP LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte * program); /* 800 */ - void (GLAPIENTRYP ProgramParameters4dvNV)(GLenum target, GLuint index, GLsizei num, const GLdouble * params); /* 801 */ - void (GLAPIENTRYP ProgramParameters4fvNV)(GLenum target, GLuint index, GLsizei num, const GLfloat * params); /* 802 */ - void (GLAPIENTRYP RequestResidentProgramsNV)(GLsizei n, const GLuint * ids); /* 803 */ - void (GLAPIENTRYP TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform); /* 804 */ - void (GLAPIENTRYP VertexAttrib1dNV)(GLuint index, GLdouble x); /* 805 */ - void (GLAPIENTRYP VertexAttrib1dvNV)(GLuint index, const GLdouble * v); /* 806 */ - void (GLAPIENTRYP VertexAttrib1fNV)(GLuint index, GLfloat x); /* 807 */ - void (GLAPIENTRYP VertexAttrib1fvNV)(GLuint index, const GLfloat * v); /* 808 */ - void (GLAPIENTRYP VertexAttrib1sNV)(GLuint index, GLshort x); /* 809 */ - void (GLAPIENTRYP VertexAttrib1svNV)(GLuint index, const GLshort * v); /* 810 */ - void (GLAPIENTRYP VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y); /* 811 */ - void (GLAPIENTRYP VertexAttrib2dvNV)(GLuint index, const GLdouble * v); /* 812 */ - void (GLAPIENTRYP VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y); /* 813 */ - void (GLAPIENTRYP VertexAttrib2fvNV)(GLuint index, const GLfloat * v); /* 814 */ - void (GLAPIENTRYP VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y); /* 815 */ - void (GLAPIENTRYP VertexAttrib2svNV)(GLuint index, const GLshort * v); /* 816 */ - void (GLAPIENTRYP VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z); /* 817 */ - void (GLAPIENTRYP VertexAttrib3dvNV)(GLuint index, const GLdouble * v); /* 818 */ - void (GLAPIENTRYP VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z); /* 819 */ - void (GLAPIENTRYP VertexAttrib3fvNV)(GLuint index, const GLfloat * v); /* 820 */ - void (GLAPIENTRYP VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z); /* 821 */ - void (GLAPIENTRYP VertexAttrib3svNV)(GLuint index, const GLshort * v); /* 822 */ - void (GLAPIENTRYP VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 823 */ - void (GLAPIENTRYP VertexAttrib4dvNV)(GLuint index, const GLdouble * v); /* 824 */ - void (GLAPIENTRYP VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 825 */ - void (GLAPIENTRYP VertexAttrib4fvNV)(GLuint index, const GLfloat * v); /* 826 */ - void (GLAPIENTRYP VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); /* 827 */ - void (GLAPIENTRYP VertexAttrib4svNV)(GLuint index, const GLshort * v); /* 828 */ - void (GLAPIENTRYP VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); /* 829 */ - void (GLAPIENTRYP VertexAttrib4ubvNV)(GLuint index, const GLubyte * v); /* 830 */ - void (GLAPIENTRYP VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 831 */ - void (GLAPIENTRYP VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 832 */ - void (GLAPIENTRYP VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 833 */ - void (GLAPIENTRYP VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort * v); /* 834 */ - void (GLAPIENTRYP VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 835 */ - void (GLAPIENTRYP VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 836 */ - void (GLAPIENTRYP VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort * v); /* 837 */ - void (GLAPIENTRYP VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 838 */ - void (GLAPIENTRYP VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 839 */ - void (GLAPIENTRYP VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort * v); /* 840 */ - void (GLAPIENTRYP VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble * v); /* 841 */ - void (GLAPIENTRYP VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat * v); /* 842 */ - void (GLAPIENTRYP VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort * v); /* 843 */ - void (GLAPIENTRYP VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v); /* 844 */ - void (GLAPIENTRYP GetTexBumpParameterfvATI)(GLenum pname, GLfloat * param); /* 845 */ - void (GLAPIENTRYP GetTexBumpParameterivATI)(GLenum pname, GLint * param); /* 846 */ - void (GLAPIENTRYP TexBumpParameterfvATI)(GLenum pname, const GLfloat * param); /* 847 */ - void (GLAPIENTRYP TexBumpParameterivATI)(GLenum pname, const GLint * param); /* 848 */ - void (GLAPIENTRYP AlphaFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 849 */ - void (GLAPIENTRYP AlphaFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 850 */ - void (GLAPIENTRYP AlphaFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 851 */ - void (GLAPIENTRYP BeginFragmentShaderATI)(void); /* 852 */ - void (GLAPIENTRYP BindFragmentShaderATI)(GLuint id); /* 853 */ - void (GLAPIENTRYP ColorFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); /* 854 */ - void (GLAPIENTRYP ColorFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); /* 855 */ - void (GLAPIENTRYP ColorFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); /* 856 */ - void (GLAPIENTRYP DeleteFragmentShaderATI)(GLuint id); /* 857 */ - void (GLAPIENTRYP EndFragmentShaderATI)(void); /* 858 */ - GLuint (GLAPIENTRYP GenFragmentShadersATI)(GLuint range); /* 859 */ - void (GLAPIENTRYP PassTexCoordATI)(GLuint dst, GLuint coord, GLenum swizzle); /* 860 */ - void (GLAPIENTRYP SampleMapATI)(GLuint dst, GLuint interp, GLenum swizzle); /* 861 */ - void (GLAPIENTRYP SetFragmentShaderConstantATI)(GLuint dst, const GLfloat * value); /* 862 */ - void (GLAPIENTRYP PointParameteriNV)(GLenum pname, GLint param); /* 863 */ - void (GLAPIENTRYP PointParameterivNV)(GLenum pname, const GLint * params); /* 864 */ - void (GLAPIENTRYP ActiveStencilFaceEXT)(GLenum face); /* 865 */ - void (GLAPIENTRYP BindVertexArrayAPPLE)(GLuint array); /* 866 */ - void (GLAPIENTRYP DeleteVertexArraysAPPLE)(GLsizei n, const GLuint * arrays); /* 867 */ - void (GLAPIENTRYP GenVertexArraysAPPLE)(GLsizei n, GLuint * arrays); /* 868 */ - GLboolean (GLAPIENTRYP IsVertexArrayAPPLE)(GLuint array); /* 869 */ - void (GLAPIENTRYP GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params); /* 870 */ - void (GLAPIENTRYP GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params); /* 871 */ - void (GLAPIENTRYP ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); /* 872 */ - void (GLAPIENTRYP ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v); /* 873 */ - void (GLAPIENTRYP ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); /* 874 */ - void (GLAPIENTRYP ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v); /* 875 */ - void (GLAPIENTRYP PrimitiveRestartIndexNV)(GLuint index); /* 876 */ - void (GLAPIENTRYP PrimitiveRestartNV)(void); /* 877 */ - void (GLAPIENTRYP DepthBoundsEXT)(GLclampd zmin, GLclampd zmax); /* 878 */ - void (GLAPIENTRYP BlendEquationSeparateEXT)(GLenum modeRGB, GLenum modeA); /* 879 */ - void (GLAPIENTRYP BindFramebufferEXT)(GLenum target, GLuint framebuffer); /* 880 */ - void (GLAPIENTRYP BindRenderbufferEXT)(GLenum target, GLuint renderbuffer); /* 881 */ - GLenum (GLAPIENTRYP CheckFramebufferStatusEXT)(GLenum target); /* 882 */ - void (GLAPIENTRYP DeleteFramebuffersEXT)(GLsizei n, const GLuint * framebuffers); /* 883 */ - void (GLAPIENTRYP DeleteRenderbuffersEXT)(GLsizei n, const GLuint * renderbuffers); /* 884 */ - void (GLAPIENTRYP FramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); /* 885 */ - void (GLAPIENTRYP FramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 886 */ - void (GLAPIENTRYP FramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); /* 887 */ - void (GLAPIENTRYP FramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); /* 888 */ - void (GLAPIENTRYP GenFramebuffersEXT)(GLsizei n, GLuint * framebuffers); /* 889 */ - void (GLAPIENTRYP GenRenderbuffersEXT)(GLsizei n, GLuint * renderbuffers); /* 890 */ - void (GLAPIENTRYP GenerateMipmapEXT)(GLenum target); /* 891 */ - void (GLAPIENTRYP GetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint * params); /* 892 */ - void (GLAPIENTRYP GetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 893 */ - GLboolean (GLAPIENTRYP IsFramebufferEXT)(GLuint framebuffer); /* 894 */ - GLboolean (GLAPIENTRYP IsRenderbufferEXT)(GLuint renderbuffer); /* 895 */ - void (GLAPIENTRYP RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); /* 896 */ - void (GLAPIENTRYP BlitFramebufferEXT)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); /* 897 */ - void (GLAPIENTRYP BufferParameteriAPPLE)(GLenum target, GLenum pname, GLint param); /* 898 */ - void (GLAPIENTRYP FlushMappedBufferRangeAPPLE)(GLenum target, GLintptr offset, GLsizeiptr size); /* 899 */ - void (GLAPIENTRYP BindFragDataLocationEXT)(GLuint program, GLuint colorNumber, const GLchar * name); /* 900 */ - GLint (GLAPIENTRYP GetFragDataLocationEXT)(GLuint program, const GLchar * name); /* 901 */ - void (GLAPIENTRYP GetUniformuivEXT)(GLuint program, GLint location, GLuint * params); /* 902 */ - void (GLAPIENTRYP GetVertexAttribIivEXT)(GLuint index, GLenum pname, GLint * params); /* 903 */ - void (GLAPIENTRYP GetVertexAttribIuivEXT)(GLuint index, GLenum pname, GLuint * params); /* 904 */ - void (GLAPIENTRYP Uniform1uiEXT)(GLint location, GLuint x); /* 905 */ - void (GLAPIENTRYP Uniform1uivEXT)(GLint location, GLsizei count, const GLuint * value); /* 906 */ - void (GLAPIENTRYP Uniform2uiEXT)(GLint location, GLuint x, GLuint y); /* 907 */ - void (GLAPIENTRYP Uniform2uivEXT)(GLint location, GLsizei count, const GLuint * value); /* 908 */ - void (GLAPIENTRYP Uniform3uiEXT)(GLint location, GLuint x, GLuint y, GLuint z); /* 909 */ - void (GLAPIENTRYP Uniform3uivEXT)(GLint location, GLsizei count, const GLuint * value); /* 910 */ - void (GLAPIENTRYP Uniform4uiEXT)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w); /* 911 */ - void (GLAPIENTRYP Uniform4uivEXT)(GLint location, GLsizei count, const GLuint * value); /* 912 */ - void (GLAPIENTRYP VertexAttribI1iEXT)(GLuint index, GLint x); /* 913 */ - void (GLAPIENTRYP VertexAttribI1ivEXT)(GLuint index, const GLint * v); /* 914 */ - void (GLAPIENTRYP VertexAttribI1uiEXT)(GLuint index, GLuint x); /* 915 */ - void (GLAPIENTRYP VertexAttribI1uivEXT)(GLuint index, const GLuint * v); /* 916 */ - void (GLAPIENTRYP VertexAttribI2iEXT)(GLuint index, GLint x, GLint y); /* 917 */ - void (GLAPIENTRYP VertexAttribI2ivEXT)(GLuint index, const GLint * v); /* 918 */ - void (GLAPIENTRYP VertexAttribI2uiEXT)(GLuint index, GLuint x, GLuint y); /* 919 */ - void (GLAPIENTRYP VertexAttribI2uivEXT)(GLuint index, const GLuint * v); /* 920 */ - void (GLAPIENTRYP VertexAttribI3iEXT)(GLuint index, GLint x, GLint y, GLint z); /* 921 */ - void (GLAPIENTRYP VertexAttribI3ivEXT)(GLuint index, const GLint * v); /* 922 */ - void (GLAPIENTRYP VertexAttribI3uiEXT)(GLuint index, GLuint x, GLuint y, GLuint z); /* 923 */ - void (GLAPIENTRYP VertexAttribI3uivEXT)(GLuint index, const GLuint * v); /* 924 */ - void (GLAPIENTRYP VertexAttribI4bvEXT)(GLuint index, const GLbyte * v); /* 925 */ - void (GLAPIENTRYP VertexAttribI4iEXT)(GLuint index, GLint x, GLint y, GLint z, GLint w); /* 926 */ - void (GLAPIENTRYP VertexAttribI4ivEXT)(GLuint index, const GLint * v); /* 927 */ - void (GLAPIENTRYP VertexAttribI4svEXT)(GLuint index, const GLshort * v); /* 928 */ - void (GLAPIENTRYP VertexAttribI4ubvEXT)(GLuint index, const GLubyte * v); /* 929 */ - void (GLAPIENTRYP VertexAttribI4uiEXT)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); /* 930 */ - void (GLAPIENTRYP VertexAttribI4uivEXT)(GLuint index, const GLuint * v); /* 931 */ - void (GLAPIENTRYP VertexAttribI4usvEXT)(GLuint index, const GLushort * v); /* 932 */ - void (GLAPIENTRYP VertexAttribIPointerEXT)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); /* 933 */ - void (GLAPIENTRYP FramebufferTextureLayerEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); /* 934 */ - void (GLAPIENTRYP ColorMaskIndexedEXT)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a); /* 935 */ - void (GLAPIENTRYP DisableIndexedEXT)(GLenum target, GLuint index); /* 936 */ - void (GLAPIENTRYP EnableIndexedEXT)(GLenum target, GLuint index); /* 937 */ - void (GLAPIENTRYP GetBooleanIndexedvEXT)(GLenum value, GLuint index, GLboolean * data); /* 938 */ - void (GLAPIENTRYP GetIntegerIndexedvEXT)(GLenum value, GLuint index, GLint * data); /* 939 */ - GLboolean (GLAPIENTRYP IsEnabledIndexedEXT)(GLenum target, GLuint index); /* 940 */ - void (GLAPIENTRYP ClearColorIiEXT)(GLint r, GLint g, GLint b, GLint a); /* 941 */ - void (GLAPIENTRYP ClearColorIuiEXT)(GLuint r, GLuint g, GLuint b, GLuint a); /* 942 */ - void (GLAPIENTRYP GetTexParameterIivEXT)(GLenum target, GLenum pname, GLint * params); /* 943 */ - void (GLAPIENTRYP GetTexParameterIuivEXT)(GLenum target, GLenum pname, GLuint * params); /* 944 */ - void (GLAPIENTRYP TexParameterIivEXT)(GLenum target, GLenum pname, const GLint * params); /* 945 */ - void (GLAPIENTRYP TexParameterIuivEXT)(GLenum target, GLenum pname, const GLuint * params); /* 946 */ - void (GLAPIENTRYP BeginConditionalRenderNV)(GLuint query, GLenum mode); /* 947 */ - void (GLAPIENTRYP EndConditionalRenderNV)(void); /* 948 */ - void (GLAPIENTRYP BeginTransformFeedbackEXT)(GLenum mode); /* 949 */ - void (GLAPIENTRYP BindBufferBaseEXT)(GLenum target, GLuint index, GLuint buffer); /* 950 */ - void (GLAPIENTRYP BindBufferOffsetEXT)(GLenum target, GLuint index, GLuint buffer, GLintptr offset); /* 951 */ - void (GLAPIENTRYP BindBufferRangeEXT)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); /* 952 */ - void (GLAPIENTRYP EndTransformFeedbackEXT)(void); /* 953 */ - void (GLAPIENTRYP GetTransformFeedbackVaryingEXT)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name); /* 954 */ - void (GLAPIENTRYP TransformFeedbackVaryingsEXT)(GLuint program, GLsizei count, const char ** varyings, GLenum bufferMode); /* 955 */ - void (GLAPIENTRYP ProvokingVertexEXT)(GLenum mode); /* 956 */ - void (GLAPIENTRYP GetTexParameterPointervAPPLE)(GLenum target, GLenum pname, GLvoid ** params); /* 957 */ - void (GLAPIENTRYP TextureRangeAPPLE)(GLenum target, GLsizei length, GLvoid * pointer); /* 958 */ - void (GLAPIENTRYP GetObjectParameterivAPPLE)(GLenum objectType, GLuint name, GLenum pname, GLint * value); /* 959 */ - GLenum (GLAPIENTRYP ObjectPurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option); /* 960 */ - GLenum (GLAPIENTRYP ObjectUnpurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option); /* 961 */ - void (GLAPIENTRYP ActiveProgramEXT)(GLuint program); /* 962 */ - GLuint (GLAPIENTRYP CreateShaderProgramEXT)(GLenum type, const GLchar * string); /* 963 */ - void (GLAPIENTRYP UseShaderProgramEXT)(GLenum type, GLuint program); /* 964 */ - void (GLAPIENTRYP TextureBarrierNV)(void); /* 965 */ - void (GLAPIENTRYP StencilFuncSeparateATI)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); /* 966 */ - void (GLAPIENTRYP ProgramEnvParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 967 */ - void (GLAPIENTRYP ProgramLocalParameters4fvEXT)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); /* 968 */ - void (GLAPIENTRYP GetQueryObjecti64vEXT)(GLuint id, GLenum pname, GLint64EXT * params); /* 969 */ - void (GLAPIENTRYP GetQueryObjectui64vEXT)(GLuint id, GLenum pname, GLuint64EXT * params); /* 970 */ - void (GLAPIENTRYP EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid * writeOffset); /* 971 */ - void (GLAPIENTRYP EGLImageTargetTexture2DOES)(GLenum target, GLvoid * writeOffset); /* 972 */ -}; - -#endif /* !defined( _GLAPI_TABLE_H_ ) */ diff --git a/dll/opengl/mesa/src/mapi/glapi/glapitemp.h b/dll/opengl/mesa/src/mapi/glapi/glapitemp.h deleted file mode 100644 index a421d72c911..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/glapitemp.h +++ /dev/null @@ -1,9700 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by gl_apitemp.py (from Mesa) script */ - -/* - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * (C) Copyright IBM Corporation 2004 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL, IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - - -# if (defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) && defined(__ELF__)) -# define HIDDEN __attribute__((visibility("hidden"))) -# else -# define HIDDEN -# endif - -/* - * This file is a template which generates the OpenGL API entry point - * functions. It should be included by a .c file which first defines - * the following macros: - * KEYWORD1 - usually nothing, but might be __declspec(dllexport) on Win32 - * KEYWORD2 - usually nothing, but might be __stdcall on Win32 - * NAME(n) - builds the final function name (usually add "gl" prefix) - * DISPATCH(func, args, msg) - code to do dispatch of named function. - * msg is a printf-style debug message. - * RETURN_DISPATCH(func, args, msg) - code to do dispatch with a return value - * - * Here is an example which generates the usual OpenGL functions: - * #define KEYWORD1 - * #define KEYWORD2 - * #define NAME(func) gl##func - * #define DISPATCH(func, args, msg) \ - * struct _glapi_table *dispatch = CurrentDispatch; \ - * (*dispatch->func) args - * #define RETURN DISPATCH(func, args, msg) \ - * struct _glapi_table *dispatch = CurrentDispatch; \ - * return (*dispatch->func) args - * - */ - - -#if defined( NAME ) -#ifndef KEYWORD1 -#define KEYWORD1 -#endif - -#ifndef KEYWORD1_ALT -#define KEYWORD1_ALT HIDDEN -#endif - -#ifndef KEYWORD2 -#define KEYWORD2 -#endif - -#ifndef DISPATCH -#error DISPATCH must be defined -#endif - -#ifndef RETURN_DISPATCH -#error RETURN_DISPATCH must be defined -#endif - - -#ifndef _GLAPI_SKIP_NORMAL_ENTRY_POINTS - -KEYWORD1 void KEYWORD2 NAME(NewList)(GLuint list, GLenum mode) -{ - (void) list; (void) mode; - DISPATCH(NewList, (list, mode), (F, "glNewList(%d, 0x%x);\n", list, mode)); -} - -KEYWORD1 void KEYWORD2 NAME(EndList)(void) -{ - DISPATCH(EndList, (), (F, "glEndList();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(CallList)(GLuint list) -{ - (void) list; - DISPATCH(CallList, (list), (F, "glCallList(%d);\n", list)); -} - -KEYWORD1 void KEYWORD2 NAME(CallLists)(GLsizei n, GLenum type, const GLvoid * lists) -{ - (void) n; (void) type; (void) lists; - DISPATCH(CallLists, (n, type, lists), (F, "glCallLists(%d, 0x%x, %p);\n", n, type, (const void *) lists)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteLists)(GLuint list, GLsizei range) -{ - (void) list; (void) range; - DISPATCH(DeleteLists, (list, range), (F, "glDeleteLists(%d, %d);\n", list, range)); -} - -KEYWORD1 GLuint KEYWORD2 NAME(GenLists)(GLsizei range) -{ - (void) range; - RETURN_DISPATCH(GenLists, (range), (F, "glGenLists(%d);\n", range)); -} - -KEYWORD1 void KEYWORD2 NAME(ListBase)(GLuint base) -{ - (void) base; - DISPATCH(ListBase, (base), (F, "glListBase(%d);\n", base)); -} - -KEYWORD1 void KEYWORD2 NAME(Begin)(GLenum mode) -{ - (void) mode; - DISPATCH(Begin, (mode), (F, "glBegin(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(Bitmap)(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap) -{ - (void) width; (void) height; (void) xorig; (void) yorig; (void) xmove; (void) ymove; (void) bitmap; - DISPATCH(Bitmap, (width, height, xorig, yorig, xmove, ymove, bitmap), (F, "glBitmap(%d, %d, %f, %f, %f, %f, %p);\n", width, height, xorig, yorig, xmove, ymove, (const void *) bitmap)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3b)(GLbyte red, GLbyte green, GLbyte blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(Color3b, (red, green, blue), (F, "glColor3b(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3bv)(const GLbyte * v) -{ - (void) v; - DISPATCH(Color3bv, (v), (F, "glColor3bv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3d)(GLdouble red, GLdouble green, GLdouble blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(Color3d, (red, green, blue), (F, "glColor3d(%f, %f, %f);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3dv)(const GLdouble * v) -{ - (void) v; - DISPATCH(Color3dv, (v), (F, "glColor3dv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3f)(GLfloat red, GLfloat green, GLfloat blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(Color3f, (red, green, blue), (F, "glColor3f(%f, %f, %f);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3fv)(const GLfloat * v) -{ - (void) v; - DISPATCH(Color3fv, (v), (F, "glColor3fv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3i)(GLint red, GLint green, GLint blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(Color3i, (red, green, blue), (F, "glColor3i(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3iv)(const GLint * v) -{ - (void) v; - DISPATCH(Color3iv, (v), (F, "glColor3iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3s)(GLshort red, GLshort green, GLshort blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(Color3s, (red, green, blue), (F, "glColor3s(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3sv)(const GLshort * v) -{ - (void) v; - DISPATCH(Color3sv, (v), (F, "glColor3sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3ub)(GLubyte red, GLubyte green, GLubyte blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(Color3ub, (red, green, blue), (F, "glColor3ub(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3ubv)(const GLubyte * v) -{ - (void) v; - DISPATCH(Color3ubv, (v), (F, "glColor3ubv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3ui)(GLuint red, GLuint green, GLuint blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(Color3ui, (red, green, blue), (F, "glColor3ui(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3uiv)(const GLuint * v) -{ - (void) v; - DISPATCH(Color3uiv, (v), (F, "glColor3uiv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3us)(GLushort red, GLushort green, GLushort blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(Color3us, (red, green, blue), (F, "glColor3us(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(Color3usv)(const GLushort * v) -{ - (void) v; - DISPATCH(Color3usv, (v), (F, "glColor3usv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha) -{ - (void) red; (void) green; (void) blue; (void) alpha; - DISPATCH(Color4b, (red, green, blue, alpha), (F, "glColor4b(%d, %d, %d, %d);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4bv)(const GLbyte * v) -{ - (void) v; - DISPATCH(Color4bv, (v), (F, "glColor4bv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha) -{ - (void) red; (void) green; (void) blue; (void) alpha; - DISPATCH(Color4d, (red, green, blue, alpha), (F, "glColor4d(%f, %f, %f, %f);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4dv)(const GLdouble * v) -{ - (void) v; - DISPATCH(Color4dv, (v), (F, "glColor4dv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -{ - (void) red; (void) green; (void) blue; (void) alpha; - DISPATCH(Color4f, (red, green, blue, alpha), (F, "glColor4f(%f, %f, %f, %f);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4fv)(const GLfloat * v) -{ - (void) v; - DISPATCH(Color4fv, (v), (F, "glColor4fv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4i)(GLint red, GLint green, GLint blue, GLint alpha) -{ - (void) red; (void) green; (void) blue; (void) alpha; - DISPATCH(Color4i, (red, green, blue, alpha), (F, "glColor4i(%d, %d, %d, %d);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4iv)(const GLint * v) -{ - (void) v; - DISPATCH(Color4iv, (v), (F, "glColor4iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha) -{ - (void) red; (void) green; (void) blue; (void) alpha; - DISPATCH(Color4s, (red, green, blue, alpha), (F, "glColor4s(%d, %d, %d, %d);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4sv)(const GLshort * v) -{ - (void) v; - DISPATCH(Color4sv, (v), (F, "glColor4sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) -{ - (void) red; (void) green; (void) blue; (void) alpha; - DISPATCH(Color4ub, (red, green, blue, alpha), (F, "glColor4ub(%d, %d, %d, %d);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4ubv)(const GLubyte * v) -{ - (void) v; - DISPATCH(Color4ubv, (v), (F, "glColor4ubv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha) -{ - (void) red; (void) green; (void) blue; (void) alpha; - DISPATCH(Color4ui, (red, green, blue, alpha), (F, "glColor4ui(%d, %d, %d, %d);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4uiv)(const GLuint * v) -{ - (void) v; - DISPATCH(Color4uiv, (v), (F, "glColor4uiv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha) -{ - (void) red; (void) green; (void) blue; (void) alpha; - DISPATCH(Color4us, (red, green, blue, alpha), (F, "glColor4us(%d, %d, %d, %d);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(Color4usv)(const GLushort * v) -{ - (void) v; - DISPATCH(Color4usv, (v), (F, "glColor4usv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(EdgeFlag)(GLboolean flag) -{ - (void) flag; - DISPATCH(EdgeFlag, (flag), (F, "glEdgeFlag(%d);\n", flag)); -} - -KEYWORD1 void KEYWORD2 NAME(EdgeFlagv)(const GLboolean * flag) -{ - (void) flag; - DISPATCH(EdgeFlagv, (flag), (F, "glEdgeFlagv(%p);\n", (const void *) flag)); -} - -KEYWORD1 void KEYWORD2 NAME(End)(void) -{ - DISPATCH(End, (), (F, "glEnd();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(Indexd)(GLdouble c) -{ - (void) c; - DISPATCH(Indexd, (c), (F, "glIndexd(%f);\n", c)); -} - -KEYWORD1 void KEYWORD2 NAME(Indexdv)(const GLdouble * c) -{ - (void) c; - DISPATCH(Indexdv, (c), (F, "glIndexdv(%p);\n", (const void *) c)); -} - -KEYWORD1 void KEYWORD2 NAME(Indexf)(GLfloat c) -{ - (void) c; - DISPATCH(Indexf, (c), (F, "glIndexf(%f);\n", c)); -} - -KEYWORD1 void KEYWORD2 NAME(Indexfv)(const GLfloat * c) -{ - (void) c; - DISPATCH(Indexfv, (c), (F, "glIndexfv(%p);\n", (const void *) c)); -} - -KEYWORD1 void KEYWORD2 NAME(Indexi)(GLint c) -{ - (void) c; - DISPATCH(Indexi, (c), (F, "glIndexi(%d);\n", c)); -} - -KEYWORD1 void KEYWORD2 NAME(Indexiv)(const GLint * c) -{ - (void) c; - DISPATCH(Indexiv, (c), (F, "glIndexiv(%p);\n", (const void *) c)); -} - -KEYWORD1 void KEYWORD2 NAME(Indexs)(GLshort c) -{ - (void) c; - DISPATCH(Indexs, (c), (F, "glIndexs(%d);\n", c)); -} - -KEYWORD1 void KEYWORD2 NAME(Indexsv)(const GLshort * c) -{ - (void) c; - DISPATCH(Indexsv, (c), (F, "glIndexsv(%p);\n", (const void *) c)); -} - -KEYWORD1 void KEYWORD2 NAME(Normal3b)(GLbyte nx, GLbyte ny, GLbyte nz) -{ - (void) nx; (void) ny; (void) nz; - DISPATCH(Normal3b, (nx, ny, nz), (F, "glNormal3b(%d, %d, %d);\n", nx, ny, nz)); -} - -KEYWORD1 void KEYWORD2 NAME(Normal3bv)(const GLbyte * v) -{ - (void) v; - DISPATCH(Normal3bv, (v), (F, "glNormal3bv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Normal3d)(GLdouble nx, GLdouble ny, GLdouble nz) -{ - (void) nx; (void) ny; (void) nz; - DISPATCH(Normal3d, (nx, ny, nz), (F, "glNormal3d(%f, %f, %f);\n", nx, ny, nz)); -} - -KEYWORD1 void KEYWORD2 NAME(Normal3dv)(const GLdouble * v) -{ - (void) v; - DISPATCH(Normal3dv, (v), (F, "glNormal3dv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Normal3f)(GLfloat nx, GLfloat ny, GLfloat nz) -{ - (void) nx; (void) ny; (void) nz; - DISPATCH(Normal3f, (nx, ny, nz), (F, "glNormal3f(%f, %f, %f);\n", nx, ny, nz)); -} - -KEYWORD1 void KEYWORD2 NAME(Normal3fv)(const GLfloat * v) -{ - (void) v; - DISPATCH(Normal3fv, (v), (F, "glNormal3fv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Normal3i)(GLint nx, GLint ny, GLint nz) -{ - (void) nx; (void) ny; (void) nz; - DISPATCH(Normal3i, (nx, ny, nz), (F, "glNormal3i(%d, %d, %d);\n", nx, ny, nz)); -} - -KEYWORD1 void KEYWORD2 NAME(Normal3iv)(const GLint * v) -{ - (void) v; - DISPATCH(Normal3iv, (v), (F, "glNormal3iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Normal3s)(GLshort nx, GLshort ny, GLshort nz) -{ - (void) nx; (void) ny; (void) nz; - DISPATCH(Normal3s, (nx, ny, nz), (F, "glNormal3s(%d, %d, %d);\n", nx, ny, nz)); -} - -KEYWORD1 void KEYWORD2 NAME(Normal3sv)(const GLshort * v) -{ - (void) v; - DISPATCH(Normal3sv, (v), (F, "glNormal3sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos2d)(GLdouble x, GLdouble y) -{ - (void) x; (void) y; - DISPATCH(RasterPos2d, (x, y), (F, "glRasterPos2d(%f, %f);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos2dv)(const GLdouble * v) -{ - (void) v; - DISPATCH(RasterPos2dv, (v), (F, "glRasterPos2dv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos2f)(GLfloat x, GLfloat y) -{ - (void) x; (void) y; - DISPATCH(RasterPos2f, (x, y), (F, "glRasterPos2f(%f, %f);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos2fv)(const GLfloat * v) -{ - (void) v; - DISPATCH(RasterPos2fv, (v), (F, "glRasterPos2fv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos2i)(GLint x, GLint y) -{ - (void) x; (void) y; - DISPATCH(RasterPos2i, (x, y), (F, "glRasterPos2i(%d, %d);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos2iv)(const GLint * v) -{ - (void) v; - DISPATCH(RasterPos2iv, (v), (F, "glRasterPos2iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos2s)(GLshort x, GLshort y) -{ - (void) x; (void) y; - DISPATCH(RasterPos2s, (x, y), (F, "glRasterPos2s(%d, %d);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos2sv)(const GLshort * v) -{ - (void) v; - DISPATCH(RasterPos2sv, (v), (F, "glRasterPos2sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos3d)(GLdouble x, GLdouble y, GLdouble z) -{ - (void) x; (void) y; (void) z; - DISPATCH(RasterPos3d, (x, y, z), (F, "glRasterPos3d(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos3dv)(const GLdouble * v) -{ - (void) v; - DISPATCH(RasterPos3dv, (v), (F, "glRasterPos3dv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos3f)(GLfloat x, GLfloat y, GLfloat z) -{ - (void) x; (void) y; (void) z; - DISPATCH(RasterPos3f, (x, y, z), (F, "glRasterPos3f(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos3fv)(const GLfloat * v) -{ - (void) v; - DISPATCH(RasterPos3fv, (v), (F, "glRasterPos3fv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos3i)(GLint x, GLint y, GLint z) -{ - (void) x; (void) y; (void) z; - DISPATCH(RasterPos3i, (x, y, z), (F, "glRasterPos3i(%d, %d, %d);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos3iv)(const GLint * v) -{ - (void) v; - DISPATCH(RasterPos3iv, (v), (F, "glRasterPos3iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos3s)(GLshort x, GLshort y, GLshort z) -{ - (void) x; (void) y; (void) z; - DISPATCH(RasterPos3s, (x, y, z), (F, "glRasterPos3s(%d, %d, %d);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos3sv)(const GLshort * v) -{ - (void) v; - DISPATCH(RasterPos3sv, (v), (F, "glRasterPos3sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - (void) x; (void) y; (void) z; (void) w; - DISPATCH(RasterPos4d, (x, y, z, w), (F, "glRasterPos4d(%f, %f, %f, %f);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos4dv)(const GLdouble * v) -{ - (void) v; - DISPATCH(RasterPos4dv, (v), (F, "glRasterPos4dv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - (void) x; (void) y; (void) z; (void) w; - DISPATCH(RasterPos4f, (x, y, z, w), (F, "glRasterPos4f(%f, %f, %f, %f);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos4fv)(const GLfloat * v) -{ - (void) v; - DISPATCH(RasterPos4fv, (v), (F, "glRasterPos4fv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos4i)(GLint x, GLint y, GLint z, GLint w) -{ - (void) x; (void) y; (void) z; (void) w; - DISPATCH(RasterPos4i, (x, y, z, w), (F, "glRasterPos4i(%d, %d, %d, %d);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos4iv)(const GLint * v) -{ - (void) v; - DISPATCH(RasterPos4iv, (v), (F, "glRasterPos4iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w) -{ - (void) x; (void) y; (void) z; (void) w; - DISPATCH(RasterPos4s, (x, y, z, w), (F, "glRasterPos4s(%d, %d, %d, %d);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(RasterPos4sv)(const GLshort * v) -{ - (void) v; - DISPATCH(RasterPos4sv, (v), (F, "glRasterPos4sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Rectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2) -{ - (void) x1; (void) y1; (void) x2; (void) y2; - DISPATCH(Rectd, (x1, y1, x2, y2), (F, "glRectd(%f, %f, %f, %f);\n", x1, y1, x2, y2)); -} - -KEYWORD1 void KEYWORD2 NAME(Rectdv)(const GLdouble * v1, const GLdouble * v2) -{ - (void) v1; (void) v2; - DISPATCH(Rectdv, (v1, v2), (F, "glRectdv(%p, %p);\n", (const void *) v1, (const void *) v2)); -} - -KEYWORD1 void KEYWORD2 NAME(Rectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) -{ - (void) x1; (void) y1; (void) x2; (void) y2; - DISPATCH(Rectf, (x1, y1, x2, y2), (F, "glRectf(%f, %f, %f, %f);\n", x1, y1, x2, y2)); -} - -KEYWORD1 void KEYWORD2 NAME(Rectfv)(const GLfloat * v1, const GLfloat * v2) -{ - (void) v1; (void) v2; - DISPATCH(Rectfv, (v1, v2), (F, "glRectfv(%p, %p);\n", (const void *) v1, (const void *) v2)); -} - -KEYWORD1 void KEYWORD2 NAME(Recti)(GLint x1, GLint y1, GLint x2, GLint y2) -{ - (void) x1; (void) y1; (void) x2; (void) y2; - DISPATCH(Recti, (x1, y1, x2, y2), (F, "glRecti(%d, %d, %d, %d);\n", x1, y1, x2, y2)); -} - -KEYWORD1 void KEYWORD2 NAME(Rectiv)(const GLint * v1, const GLint * v2) -{ - (void) v1; (void) v2; - DISPATCH(Rectiv, (v1, v2), (F, "glRectiv(%p, %p);\n", (const void *) v1, (const void *) v2)); -} - -KEYWORD1 void KEYWORD2 NAME(Rects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2) -{ - (void) x1; (void) y1; (void) x2; (void) y2; - DISPATCH(Rects, (x1, y1, x2, y2), (F, "glRects(%d, %d, %d, %d);\n", x1, y1, x2, y2)); -} - -KEYWORD1 void KEYWORD2 NAME(Rectsv)(const GLshort * v1, const GLshort * v2) -{ - (void) v1; (void) v2; - DISPATCH(Rectsv, (v1, v2), (F, "glRectsv(%p, %p);\n", (const void *) v1, (const void *) v2)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord1d)(GLdouble s) -{ - (void) s; - DISPATCH(TexCoord1d, (s), (F, "glTexCoord1d(%f);\n", s)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord1dv)(const GLdouble * v) -{ - (void) v; - DISPATCH(TexCoord1dv, (v), (F, "glTexCoord1dv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord1f)(GLfloat s) -{ - (void) s; - DISPATCH(TexCoord1f, (s), (F, "glTexCoord1f(%f);\n", s)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord1fv)(const GLfloat * v) -{ - (void) v; - DISPATCH(TexCoord1fv, (v), (F, "glTexCoord1fv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord1i)(GLint s) -{ - (void) s; - DISPATCH(TexCoord1i, (s), (F, "glTexCoord1i(%d);\n", s)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord1iv)(const GLint * v) -{ - (void) v; - DISPATCH(TexCoord1iv, (v), (F, "glTexCoord1iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord1s)(GLshort s) -{ - (void) s; - DISPATCH(TexCoord1s, (s), (F, "glTexCoord1s(%d);\n", s)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord1sv)(const GLshort * v) -{ - (void) v; - DISPATCH(TexCoord1sv, (v), (F, "glTexCoord1sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord2d)(GLdouble s, GLdouble t) -{ - (void) s; (void) t; - DISPATCH(TexCoord2d, (s, t), (F, "glTexCoord2d(%f, %f);\n", s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord2dv)(const GLdouble * v) -{ - (void) v; - DISPATCH(TexCoord2dv, (v), (F, "glTexCoord2dv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord2f)(GLfloat s, GLfloat t) -{ - (void) s; (void) t; - DISPATCH(TexCoord2f, (s, t), (F, "glTexCoord2f(%f, %f);\n", s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord2fv)(const GLfloat * v) -{ - (void) v; - DISPATCH(TexCoord2fv, (v), (F, "glTexCoord2fv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord2i)(GLint s, GLint t) -{ - (void) s; (void) t; - DISPATCH(TexCoord2i, (s, t), (F, "glTexCoord2i(%d, %d);\n", s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord2iv)(const GLint * v) -{ - (void) v; - DISPATCH(TexCoord2iv, (v), (F, "glTexCoord2iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord2s)(GLshort s, GLshort t) -{ - (void) s; (void) t; - DISPATCH(TexCoord2s, (s, t), (F, "glTexCoord2s(%d, %d);\n", s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord2sv)(const GLshort * v) -{ - (void) v; - DISPATCH(TexCoord2sv, (v), (F, "glTexCoord2sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord3d)(GLdouble s, GLdouble t, GLdouble r) -{ - (void) s; (void) t; (void) r; - DISPATCH(TexCoord3d, (s, t, r), (F, "glTexCoord3d(%f, %f, %f);\n", s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord3dv)(const GLdouble * v) -{ - (void) v; - DISPATCH(TexCoord3dv, (v), (F, "glTexCoord3dv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord3f)(GLfloat s, GLfloat t, GLfloat r) -{ - (void) s; (void) t; (void) r; - DISPATCH(TexCoord3f, (s, t, r), (F, "glTexCoord3f(%f, %f, %f);\n", s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord3fv)(const GLfloat * v) -{ - (void) v; - DISPATCH(TexCoord3fv, (v), (F, "glTexCoord3fv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord3i)(GLint s, GLint t, GLint r) -{ - (void) s; (void) t; (void) r; - DISPATCH(TexCoord3i, (s, t, r), (F, "glTexCoord3i(%d, %d, %d);\n", s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord3iv)(const GLint * v) -{ - (void) v; - DISPATCH(TexCoord3iv, (v), (F, "glTexCoord3iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord3s)(GLshort s, GLshort t, GLshort r) -{ - (void) s; (void) t; (void) r; - DISPATCH(TexCoord3s, (s, t, r), (F, "glTexCoord3s(%d, %d, %d);\n", s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord3sv)(const GLshort * v) -{ - (void) v; - DISPATCH(TexCoord3sv, (v), (F, "glTexCoord3sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q) -{ - (void) s; (void) t; (void) r; (void) q; - DISPATCH(TexCoord4d, (s, t, r, q), (F, "glTexCoord4d(%f, %f, %f, %f);\n", s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord4dv)(const GLdouble * v) -{ - (void) v; - DISPATCH(TexCoord4dv, (v), (F, "glTexCoord4dv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q) -{ - (void) s; (void) t; (void) r; (void) q; - DISPATCH(TexCoord4f, (s, t, r, q), (F, "glTexCoord4f(%f, %f, %f, %f);\n", s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord4fv)(const GLfloat * v) -{ - (void) v; - DISPATCH(TexCoord4fv, (v), (F, "glTexCoord4fv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord4i)(GLint s, GLint t, GLint r, GLint q) -{ - (void) s; (void) t; (void) r; (void) q; - DISPATCH(TexCoord4i, (s, t, r, q), (F, "glTexCoord4i(%d, %d, %d, %d);\n", s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord4iv)(const GLint * v) -{ - (void) v; - DISPATCH(TexCoord4iv, (v), (F, "glTexCoord4iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q) -{ - (void) s; (void) t; (void) r; (void) q; - DISPATCH(TexCoord4s, (s, t, r, q), (F, "glTexCoord4s(%d, %d, %d, %d);\n", s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoord4sv)(const GLshort * v) -{ - (void) v; - DISPATCH(TexCoord4sv, (v), (F, "glTexCoord4sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex2d)(GLdouble x, GLdouble y) -{ - (void) x; (void) y; - DISPATCH(Vertex2d, (x, y), (F, "glVertex2d(%f, %f);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex2dv)(const GLdouble * v) -{ - (void) v; - DISPATCH(Vertex2dv, (v), (F, "glVertex2dv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex2f)(GLfloat x, GLfloat y) -{ - (void) x; (void) y; - DISPATCH(Vertex2f, (x, y), (F, "glVertex2f(%f, %f);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex2fv)(const GLfloat * v) -{ - (void) v; - DISPATCH(Vertex2fv, (v), (F, "glVertex2fv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex2i)(GLint x, GLint y) -{ - (void) x; (void) y; - DISPATCH(Vertex2i, (x, y), (F, "glVertex2i(%d, %d);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex2iv)(const GLint * v) -{ - (void) v; - DISPATCH(Vertex2iv, (v), (F, "glVertex2iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex2s)(GLshort x, GLshort y) -{ - (void) x; (void) y; - DISPATCH(Vertex2s, (x, y), (F, "glVertex2s(%d, %d);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex2sv)(const GLshort * v) -{ - (void) v; - DISPATCH(Vertex2sv, (v), (F, "glVertex2sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex3d)(GLdouble x, GLdouble y, GLdouble z) -{ - (void) x; (void) y; (void) z; - DISPATCH(Vertex3d, (x, y, z), (F, "glVertex3d(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex3dv)(const GLdouble * v) -{ - (void) v; - DISPATCH(Vertex3dv, (v), (F, "glVertex3dv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex3f)(GLfloat x, GLfloat y, GLfloat z) -{ - (void) x; (void) y; (void) z; - DISPATCH(Vertex3f, (x, y, z), (F, "glVertex3f(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex3fv)(const GLfloat * v) -{ - (void) v; - DISPATCH(Vertex3fv, (v), (F, "glVertex3fv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex3i)(GLint x, GLint y, GLint z) -{ - (void) x; (void) y; (void) z; - DISPATCH(Vertex3i, (x, y, z), (F, "glVertex3i(%d, %d, %d);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex3iv)(const GLint * v) -{ - (void) v; - DISPATCH(Vertex3iv, (v), (F, "glVertex3iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex3s)(GLshort x, GLshort y, GLshort z) -{ - (void) x; (void) y; (void) z; - DISPATCH(Vertex3s, (x, y, z), (F, "glVertex3s(%d, %d, %d);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex3sv)(const GLshort * v) -{ - (void) v; - DISPATCH(Vertex3sv, (v), (F, "glVertex3sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - (void) x; (void) y; (void) z; (void) w; - DISPATCH(Vertex4d, (x, y, z, w), (F, "glVertex4d(%f, %f, %f, %f);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex4dv)(const GLdouble * v) -{ - (void) v; - DISPATCH(Vertex4dv, (v), (F, "glVertex4dv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - (void) x; (void) y; (void) z; (void) w; - DISPATCH(Vertex4f, (x, y, z, w), (F, "glVertex4f(%f, %f, %f, %f);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex4fv)(const GLfloat * v) -{ - (void) v; - DISPATCH(Vertex4fv, (v), (F, "glVertex4fv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex4i)(GLint x, GLint y, GLint z, GLint w) -{ - (void) x; (void) y; (void) z; (void) w; - DISPATCH(Vertex4i, (x, y, z, w), (F, "glVertex4i(%d, %d, %d, %d);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex4iv)(const GLint * v) -{ - (void) v; - DISPATCH(Vertex4iv, (v), (F, "glVertex4iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex4s)(GLshort x, GLshort y, GLshort z, GLshort w) -{ - (void) x; (void) y; (void) z; (void) w; - DISPATCH(Vertex4s, (x, y, z, w), (F, "glVertex4s(%d, %d, %d, %d);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(Vertex4sv)(const GLshort * v) -{ - (void) v; - DISPATCH(Vertex4sv, (v), (F, "glVertex4sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(ClipPlane)(GLenum plane, const GLdouble * equation) -{ - (void) plane; (void) equation; - DISPATCH(ClipPlane, (plane, equation), (F, "glClipPlane(0x%x, %p);\n", plane, (const void *) equation)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorMaterial)(GLenum face, GLenum mode) -{ - (void) face; (void) mode; - DISPATCH(ColorMaterial, (face, mode), (F, "glColorMaterial(0x%x, 0x%x);\n", face, mode)); -} - -KEYWORD1 void KEYWORD2 NAME(CullFace)(GLenum mode) -{ - (void) mode; - DISPATCH(CullFace, (mode), (F, "glCullFace(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(Fogf)(GLenum pname, GLfloat param) -{ - (void) pname; (void) param; - DISPATCH(Fogf, (pname, param), (F, "glFogf(0x%x, %f);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(Fogfv)(GLenum pname, const GLfloat * params) -{ - (void) pname; (void) params; - DISPATCH(Fogfv, (pname, params), (F, "glFogfv(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(Fogi)(GLenum pname, GLint param) -{ - (void) pname; (void) param; - DISPATCH(Fogi, (pname, param), (F, "glFogi(0x%x, %d);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(Fogiv)(GLenum pname, const GLint * params) -{ - (void) pname; (void) params; - DISPATCH(Fogiv, (pname, params), (F, "glFogiv(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(FrontFace)(GLenum mode) -{ - (void) mode; - DISPATCH(FrontFace, (mode), (F, "glFrontFace(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(Hint)(GLenum target, GLenum mode) -{ - (void) target; (void) mode; - DISPATCH(Hint, (target, mode), (F, "glHint(0x%x, 0x%x);\n", target, mode)); -} - -KEYWORD1 void KEYWORD2 NAME(Lightf)(GLenum light, GLenum pname, GLfloat param) -{ - (void) light; (void) pname; (void) param; - DISPATCH(Lightf, (light, pname, param), (F, "glLightf(0x%x, 0x%x, %f);\n", light, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(Lightfv)(GLenum light, GLenum pname, const GLfloat * params) -{ - (void) light; (void) pname; (void) params; - DISPATCH(Lightfv, (light, pname, params), (F, "glLightfv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(Lighti)(GLenum light, GLenum pname, GLint param) -{ - (void) light; (void) pname; (void) param; - DISPATCH(Lighti, (light, pname, param), (F, "glLighti(0x%x, 0x%x, %d);\n", light, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(Lightiv)(GLenum light, GLenum pname, const GLint * params) -{ - (void) light; (void) pname; (void) params; - DISPATCH(Lightiv, (light, pname, params), (F, "glLightiv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(LightModelf)(GLenum pname, GLfloat param) -{ - (void) pname; (void) param; - DISPATCH(LightModelf, (pname, param), (F, "glLightModelf(0x%x, %f);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(LightModelfv)(GLenum pname, const GLfloat * params) -{ - (void) pname; (void) params; - DISPATCH(LightModelfv, (pname, params), (F, "glLightModelfv(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(LightModeli)(GLenum pname, GLint param) -{ - (void) pname; (void) param; - DISPATCH(LightModeli, (pname, param), (F, "glLightModeli(0x%x, %d);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(LightModeliv)(GLenum pname, const GLint * params) -{ - (void) pname; (void) params; - DISPATCH(LightModeliv, (pname, params), (F, "glLightModeliv(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(LineStipple)(GLint factor, GLushort pattern) -{ - (void) factor; (void) pattern; - DISPATCH(LineStipple, (factor, pattern), (F, "glLineStipple(%d, %d);\n", factor, pattern)); -} - -KEYWORD1 void KEYWORD2 NAME(LineWidth)(GLfloat width) -{ - (void) width; - DISPATCH(LineWidth, (width), (F, "glLineWidth(%f);\n", width)); -} - -KEYWORD1 void KEYWORD2 NAME(Materialf)(GLenum face, GLenum pname, GLfloat param) -{ - (void) face; (void) pname; (void) param; - DISPATCH(Materialf, (face, pname, param), (F, "glMaterialf(0x%x, 0x%x, %f);\n", face, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(Materialfv)(GLenum face, GLenum pname, const GLfloat * params) -{ - (void) face; (void) pname; (void) params; - DISPATCH(Materialfv, (face, pname, params), (F, "glMaterialfv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(Materiali)(GLenum face, GLenum pname, GLint param) -{ - (void) face; (void) pname; (void) param; - DISPATCH(Materiali, (face, pname, param), (F, "glMateriali(0x%x, 0x%x, %d);\n", face, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(Materialiv)(GLenum face, GLenum pname, const GLint * params) -{ - (void) face; (void) pname; (void) params; - DISPATCH(Materialiv, (face, pname, params), (F, "glMaterialiv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(PointSize)(GLfloat size) -{ - (void) size; - DISPATCH(PointSize, (size), (F, "glPointSize(%f);\n", size)); -} - -KEYWORD1 void KEYWORD2 NAME(PolygonMode)(GLenum face, GLenum mode) -{ - (void) face; (void) mode; - DISPATCH(PolygonMode, (face, mode), (F, "glPolygonMode(0x%x, 0x%x);\n", face, mode)); -} - -KEYWORD1 void KEYWORD2 NAME(PolygonStipple)(const GLubyte * mask) -{ - (void) mask; - DISPATCH(PolygonStipple, (mask), (F, "glPolygonStipple(%p);\n", (const void *) mask)); -} - -KEYWORD1 void KEYWORD2 NAME(Scissor)(GLint x, GLint y, GLsizei width, GLsizei height) -{ - (void) x; (void) y; (void) width; (void) height; - DISPATCH(Scissor, (x, y, width, height), (F, "glScissor(%d, %d, %d, %d);\n", x, y, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(ShadeModel)(GLenum mode) -{ - (void) mode; - DISPATCH(ShadeModel, (mode), (F, "glShadeModel(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(TexParameterf)(GLenum target, GLenum pname, GLfloat param) -{ - (void) target; (void) pname; (void) param; - DISPATCH(TexParameterf, (target, pname, param), (F, "glTexParameterf(0x%x, 0x%x, %f);\n", target, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(TexParameterfv)(GLenum target, GLenum pname, const GLfloat * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(TexParameterfv, (target, pname, params), (F, "glTexParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(TexParameteri)(GLenum target, GLenum pname, GLint param) -{ - (void) target; (void) pname; (void) param; - DISPATCH(TexParameteri, (target, pname, param), (F, "glTexParameteri(0x%x, 0x%x, %d);\n", target, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(TexParameteriv)(GLenum target, GLenum pname, const GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(TexParameteriv, (target, pname, params), (F, "glTexParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(TexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels) -{ - (void) target; (void) level; (void) internalformat; (void) width; (void) border; (void) format; (void) type; (void) pixels; - DISPATCH(TexImage1D, (target, level, internalformat, width, border, format, type, pixels), (F, "glTexImage1D(0x%x, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, border, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(TexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels) -{ - (void) target; (void) level; (void) internalformat; (void) width; (void) height; (void) border; (void) format; (void) type; (void) pixels; - DISPATCH(TexImage2D, (target, level, internalformat, width, height, border, format, type, pixels), (F, "glTexImage2D(0x%x, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, height, border, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(TexEnvf)(GLenum target, GLenum pname, GLfloat param) -{ - (void) target; (void) pname; (void) param; - DISPATCH(TexEnvf, (target, pname, param), (F, "glTexEnvf(0x%x, 0x%x, %f);\n", target, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(TexEnvfv)(GLenum target, GLenum pname, const GLfloat * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(TexEnvfv, (target, pname, params), (F, "glTexEnvfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(TexEnvi)(GLenum target, GLenum pname, GLint param) -{ - (void) target; (void) pname; (void) param; - DISPATCH(TexEnvi, (target, pname, param), (F, "glTexEnvi(0x%x, 0x%x, %d);\n", target, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(TexEnviv)(GLenum target, GLenum pname, const GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(TexEnviv, (target, pname, params), (F, "glTexEnviv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(TexGend)(GLenum coord, GLenum pname, GLdouble param) -{ - (void) coord; (void) pname; (void) param; - DISPATCH(TexGend, (coord, pname, param), (F, "glTexGend(0x%x, 0x%x, %f);\n", coord, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(TexGendv)(GLenum coord, GLenum pname, const GLdouble * params) -{ - (void) coord; (void) pname; (void) params; - DISPATCH(TexGendv, (coord, pname, params), (F, "glTexGendv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(TexGenf)(GLenum coord, GLenum pname, GLfloat param) -{ - (void) coord; (void) pname; (void) param; - DISPATCH(TexGenf, (coord, pname, param), (F, "glTexGenf(0x%x, 0x%x, %f);\n", coord, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(TexGenfv)(GLenum coord, GLenum pname, const GLfloat * params) -{ - (void) coord; (void) pname; (void) params; - DISPATCH(TexGenfv, (coord, pname, params), (F, "glTexGenfv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(TexGeni)(GLenum coord, GLenum pname, GLint param) -{ - (void) coord; (void) pname; (void) param; - DISPATCH(TexGeni, (coord, pname, param), (F, "glTexGeni(0x%x, 0x%x, %d);\n", coord, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(TexGeniv)(GLenum coord, GLenum pname, const GLint * params) -{ - (void) coord; (void) pname; (void) params; - DISPATCH(TexGeniv, (coord, pname, params), (F, "glTexGeniv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(FeedbackBuffer)(GLsizei size, GLenum type, GLfloat * buffer) -{ - (void) size; (void) type; (void) buffer; - DISPATCH(FeedbackBuffer, (size, type, buffer), (F, "glFeedbackBuffer(%d, 0x%x, %p);\n", size, type, (const void *) buffer)); -} - -KEYWORD1 void KEYWORD2 NAME(SelectBuffer)(GLsizei size, GLuint * buffer) -{ - (void) size; (void) buffer; - DISPATCH(SelectBuffer, (size, buffer), (F, "glSelectBuffer(%d, %p);\n", size, (const void *) buffer)); -} - -KEYWORD1 GLint KEYWORD2 NAME(RenderMode)(GLenum mode) -{ - (void) mode; - RETURN_DISPATCH(RenderMode, (mode), (F, "glRenderMode(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(InitNames)(void) -{ - DISPATCH(InitNames, (), (F, "glInitNames();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(LoadName)(GLuint name) -{ - (void) name; - DISPATCH(LoadName, (name), (F, "glLoadName(%d);\n", name)); -} - -KEYWORD1 void KEYWORD2 NAME(PassThrough)(GLfloat token) -{ - (void) token; - DISPATCH(PassThrough, (token), (F, "glPassThrough(%f);\n", token)); -} - -KEYWORD1 void KEYWORD2 NAME(PopName)(void) -{ - DISPATCH(PopName, (), (F, "glPopName();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(PushName)(GLuint name) -{ - (void) name; - DISPATCH(PushName, (name), (F, "glPushName(%d);\n", name)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawBuffer)(GLenum mode) -{ - (void) mode; - DISPATCH(DrawBuffer, (mode), (F, "glDrawBuffer(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(Clear)(GLbitfield mask) -{ - (void) mask; - DISPATCH(Clear, (mask), (F, "glClear(%d);\n", mask)); -} - -KEYWORD1 void KEYWORD2 NAME(ClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -{ - (void) red; (void) green; (void) blue; (void) alpha; - DISPATCH(ClearAccum, (red, green, blue, alpha), (F, "glClearAccum(%f, %f, %f, %f);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(ClearIndex)(GLfloat c) -{ - (void) c; - DISPATCH(ClearIndex, (c), (F, "glClearIndex(%f);\n", c)); -} - -KEYWORD1 void KEYWORD2 NAME(ClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -{ - (void) red; (void) green; (void) blue; (void) alpha; - DISPATCH(ClearColor, (red, green, blue, alpha), (F, "glClearColor(%f, %f, %f, %f);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(ClearStencil)(GLint s) -{ - (void) s; - DISPATCH(ClearStencil, (s), (F, "glClearStencil(%d);\n", s)); -} - -KEYWORD1 void KEYWORD2 NAME(ClearDepth)(GLclampd depth) -{ - (void) depth; - DISPATCH(ClearDepth, (depth), (F, "glClearDepth(%f);\n", depth)); -} - -KEYWORD1 void KEYWORD2 NAME(StencilMask)(GLuint mask) -{ - (void) mask; - DISPATCH(StencilMask, (mask), (F, "glStencilMask(%d);\n", mask)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) -{ - (void) red; (void) green; (void) blue; (void) alpha; - DISPATCH(ColorMask, (red, green, blue, alpha), (F, "glColorMask(%d, %d, %d, %d);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(DepthMask)(GLboolean flag) -{ - (void) flag; - DISPATCH(DepthMask, (flag), (F, "glDepthMask(%d);\n", flag)); -} - -KEYWORD1 void KEYWORD2 NAME(IndexMask)(GLuint mask) -{ - (void) mask; - DISPATCH(IndexMask, (mask), (F, "glIndexMask(%d);\n", mask)); -} - -KEYWORD1 void KEYWORD2 NAME(Accum)(GLenum op, GLfloat value) -{ - (void) op; (void) value; - DISPATCH(Accum, (op, value), (F, "glAccum(0x%x, %f);\n", op, value)); -} - -KEYWORD1 void KEYWORD2 NAME(Disable)(GLenum cap) -{ - (void) cap; - DISPATCH(Disable, (cap), (F, "glDisable(0x%x);\n", cap)); -} - -KEYWORD1 void KEYWORD2 NAME(Enable)(GLenum cap) -{ - (void) cap; - DISPATCH(Enable, (cap), (F, "glEnable(0x%x);\n", cap)); -} - -KEYWORD1 void KEYWORD2 NAME(Finish)(void) -{ - DISPATCH(Finish, (), (F, "glFinish();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(Flush)(void) -{ - DISPATCH(Flush, (), (F, "glFlush();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(PopAttrib)(void) -{ - DISPATCH(PopAttrib, (), (F, "glPopAttrib();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(PushAttrib)(GLbitfield mask) -{ - (void) mask; - DISPATCH(PushAttrib, (mask), (F, "glPushAttrib(%d);\n", mask)); -} - -KEYWORD1 void KEYWORD2 NAME(Map1d)(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points) -{ - (void) target; (void) u1; (void) u2; (void) stride; (void) order; (void) points; - DISPATCH(Map1d, (target, u1, u2, stride, order, points), (F, "glMap1d(0x%x, %f, %f, %d, %d, %p);\n", target, u1, u2, stride, order, (const void *) points)); -} - -KEYWORD1 void KEYWORD2 NAME(Map1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points) -{ - (void) target; (void) u1; (void) u2; (void) stride; (void) order; (void) points; - DISPATCH(Map1f, (target, u1, u2, stride, order, points), (F, "glMap1f(0x%x, %f, %f, %d, %d, %p);\n", target, u1, u2, stride, order, (const void *) points)); -} - -KEYWORD1 void KEYWORD2 NAME(Map2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points) -{ - (void) target; (void) u1; (void) u2; (void) ustride; (void) uorder; (void) v1; (void) v2; (void) vstride; (void) vorder; (void) points; - DISPATCH(Map2d, (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points), (F, "glMap2d(0x%x, %f, %f, %d, %d, %f, %f, %d, %d, %p);\n", target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, (const void *) points)); -} - -KEYWORD1 void KEYWORD2 NAME(Map2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points) -{ - (void) target; (void) u1; (void) u2; (void) ustride; (void) uorder; (void) v1; (void) v2; (void) vstride; (void) vorder; (void) points; - DISPATCH(Map2f, (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points), (F, "glMap2f(0x%x, %f, %f, %d, %d, %f, %f, %d, %d, %p);\n", target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, (const void *) points)); -} - -KEYWORD1 void KEYWORD2 NAME(MapGrid1d)(GLint un, GLdouble u1, GLdouble u2) -{ - (void) un; (void) u1; (void) u2; - DISPATCH(MapGrid1d, (un, u1, u2), (F, "glMapGrid1d(%d, %f, %f);\n", un, u1, u2)); -} - -KEYWORD1 void KEYWORD2 NAME(MapGrid1f)(GLint un, GLfloat u1, GLfloat u2) -{ - (void) un; (void) u1; (void) u2; - DISPATCH(MapGrid1f, (un, u1, u2), (F, "glMapGrid1f(%d, %f, %f);\n", un, u1, u2)); -} - -KEYWORD1 void KEYWORD2 NAME(MapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2) -{ - (void) un; (void) u1; (void) u2; (void) vn; (void) v1; (void) v2; - DISPATCH(MapGrid2d, (un, u1, u2, vn, v1, v2), (F, "glMapGrid2d(%d, %f, %f, %d, %f, %f);\n", un, u1, u2, vn, v1, v2)); -} - -KEYWORD1 void KEYWORD2 NAME(MapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2) -{ - (void) un; (void) u1; (void) u2; (void) vn; (void) v1; (void) v2; - DISPATCH(MapGrid2f, (un, u1, u2, vn, v1, v2), (F, "glMapGrid2f(%d, %f, %f, %d, %f, %f);\n", un, u1, u2, vn, v1, v2)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalCoord1d)(GLdouble u) -{ - (void) u; - DISPATCH(EvalCoord1d, (u), (F, "glEvalCoord1d(%f);\n", u)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalCoord1dv)(const GLdouble * u) -{ - (void) u; - DISPATCH(EvalCoord1dv, (u), (F, "glEvalCoord1dv(%p);\n", (const void *) u)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalCoord1f)(GLfloat u) -{ - (void) u; - DISPATCH(EvalCoord1f, (u), (F, "glEvalCoord1f(%f);\n", u)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalCoord1fv)(const GLfloat * u) -{ - (void) u; - DISPATCH(EvalCoord1fv, (u), (F, "glEvalCoord1fv(%p);\n", (const void *) u)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalCoord2d)(GLdouble u, GLdouble v) -{ - (void) u; (void) v; - DISPATCH(EvalCoord2d, (u, v), (F, "glEvalCoord2d(%f, %f);\n", u, v)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalCoord2dv)(const GLdouble * u) -{ - (void) u; - DISPATCH(EvalCoord2dv, (u), (F, "glEvalCoord2dv(%p);\n", (const void *) u)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalCoord2f)(GLfloat u, GLfloat v) -{ - (void) u; (void) v; - DISPATCH(EvalCoord2f, (u, v), (F, "glEvalCoord2f(%f, %f);\n", u, v)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalCoord2fv)(const GLfloat * u) -{ - (void) u; - DISPATCH(EvalCoord2fv, (u), (F, "glEvalCoord2fv(%p);\n", (const void *) u)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalMesh1)(GLenum mode, GLint i1, GLint i2) -{ - (void) mode; (void) i1; (void) i2; - DISPATCH(EvalMesh1, (mode, i1, i2), (F, "glEvalMesh1(0x%x, %d, %d);\n", mode, i1, i2)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalPoint1)(GLint i) -{ - (void) i; - DISPATCH(EvalPoint1, (i), (F, "glEvalPoint1(%d);\n", i)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) -{ - (void) mode; (void) i1; (void) i2; (void) j1; (void) j2; - DISPATCH(EvalMesh2, (mode, i1, i2, j1, j2), (F, "glEvalMesh2(0x%x, %d, %d, %d, %d);\n", mode, i1, i2, j1, j2)); -} - -KEYWORD1 void KEYWORD2 NAME(EvalPoint2)(GLint i, GLint j) -{ - (void) i; (void) j; - DISPATCH(EvalPoint2, (i, j), (F, "glEvalPoint2(%d, %d);\n", i, j)); -} - -KEYWORD1 void KEYWORD2 NAME(AlphaFunc)(GLenum func, GLclampf ref) -{ - (void) func; (void) ref; - DISPATCH(AlphaFunc, (func, ref), (F, "glAlphaFunc(0x%x, %f);\n", func, ref)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendFunc)(GLenum sfactor, GLenum dfactor) -{ - (void) sfactor; (void) dfactor; - DISPATCH(BlendFunc, (sfactor, dfactor), (F, "glBlendFunc(0x%x, 0x%x);\n", sfactor, dfactor)); -} - -KEYWORD1 void KEYWORD2 NAME(LogicOp)(GLenum opcode) -{ - (void) opcode; - DISPATCH(LogicOp, (opcode), (F, "glLogicOp(0x%x);\n", opcode)); -} - -KEYWORD1 void KEYWORD2 NAME(StencilFunc)(GLenum func, GLint ref, GLuint mask) -{ - (void) func; (void) ref; (void) mask; - DISPATCH(StencilFunc, (func, ref, mask), (F, "glStencilFunc(0x%x, %d, %d);\n", func, ref, mask)); -} - -KEYWORD1 void KEYWORD2 NAME(StencilOp)(GLenum fail, GLenum zfail, GLenum zpass) -{ - (void) fail; (void) zfail; (void) zpass; - DISPATCH(StencilOp, (fail, zfail, zpass), (F, "glStencilOp(0x%x, 0x%x, 0x%x);\n", fail, zfail, zpass)); -} - -KEYWORD1 void KEYWORD2 NAME(DepthFunc)(GLenum func) -{ - (void) func; - DISPATCH(DepthFunc, (func), (F, "glDepthFunc(0x%x);\n", func)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelZoom)(GLfloat xfactor, GLfloat yfactor) -{ - (void) xfactor; (void) yfactor; - DISPATCH(PixelZoom, (xfactor, yfactor), (F, "glPixelZoom(%f, %f);\n", xfactor, yfactor)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelTransferf)(GLenum pname, GLfloat param) -{ - (void) pname; (void) param; - DISPATCH(PixelTransferf, (pname, param), (F, "glPixelTransferf(0x%x, %f);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelTransferi)(GLenum pname, GLint param) -{ - (void) pname; (void) param; - DISPATCH(PixelTransferi, (pname, param), (F, "glPixelTransferi(0x%x, %d);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelStoref)(GLenum pname, GLfloat param) -{ - (void) pname; (void) param; - DISPATCH(PixelStoref, (pname, param), (F, "glPixelStoref(0x%x, %f);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelStorei)(GLenum pname, GLint param) -{ - (void) pname; (void) param; - DISPATCH(PixelStorei, (pname, param), (F, "glPixelStorei(0x%x, %d);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelMapfv)(GLenum map, GLsizei mapsize, const GLfloat * values) -{ - (void) map; (void) mapsize; (void) values; - DISPATCH(PixelMapfv, (map, mapsize, values), (F, "glPixelMapfv(0x%x, %d, %p);\n", map, mapsize, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelMapuiv)(GLenum map, GLsizei mapsize, const GLuint * values) -{ - (void) map; (void) mapsize; (void) values; - DISPATCH(PixelMapuiv, (map, mapsize, values), (F, "glPixelMapuiv(0x%x, %d, %p);\n", map, mapsize, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(PixelMapusv)(GLenum map, GLsizei mapsize, const GLushort * values) -{ - (void) map; (void) mapsize; (void) values; - DISPATCH(PixelMapusv, (map, mapsize, values), (F, "glPixelMapusv(0x%x, %d, %p);\n", map, mapsize, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(ReadBuffer)(GLenum mode) -{ - (void) mode; - DISPATCH(ReadBuffer, (mode), (F, "glReadBuffer(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type) -{ - (void) x; (void) y; (void) width; (void) height; (void) type; - DISPATCH(CopyPixels, (x, y, width, height, type), (F, "glCopyPixels(%d, %d, %d, %d, 0x%x);\n", x, y, width, height, type)); -} - -KEYWORD1 void KEYWORD2 NAME(ReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels) -{ - (void) x; (void) y; (void) width; (void) height; (void) format; (void) type; (void) pixels; - DISPATCH(ReadPixels, (x, y, width, height, format, type, pixels), (F, "glReadPixels(%d, %d, %d, %d, 0x%x, 0x%x, %p);\n", x, y, width, height, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawPixels)(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels) -{ - (void) width; (void) height; (void) format; (void) type; (void) pixels; - DISPATCH(DrawPixels, (width, height, format, type, pixels), (F, "glDrawPixels(%d, %d, 0x%x, 0x%x, %p);\n", width, height, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(GetBooleanv)(GLenum pname, GLboolean * params) -{ - (void) pname; (void) params; - DISPATCH(GetBooleanv, (pname, params), (F, "glGetBooleanv(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetClipPlane)(GLenum plane, GLdouble * equation) -{ - (void) plane; (void) equation; - DISPATCH(GetClipPlane, (plane, equation), (F, "glGetClipPlane(0x%x, %p);\n", plane, (const void *) equation)); -} - -KEYWORD1 void KEYWORD2 NAME(GetDoublev)(GLenum pname, GLdouble * params) -{ - (void) pname; (void) params; - DISPATCH(GetDoublev, (pname, params), (F, "glGetDoublev(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 GLenum KEYWORD2 NAME(GetError)(void) -{ - RETURN_DISPATCH(GetError, (), (F, "glGetError();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(GetFloatv)(GLenum pname, GLfloat * params) -{ - (void) pname; (void) params; - DISPATCH(GetFloatv, (pname, params), (F, "glGetFloatv(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetIntegerv)(GLenum pname, GLint * params) -{ - (void) pname; (void) params; - DISPATCH(GetIntegerv, (pname, params), (F, "glGetIntegerv(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetLightfv)(GLenum light, GLenum pname, GLfloat * params) -{ - (void) light; (void) pname; (void) params; - DISPATCH(GetLightfv, (light, pname, params), (F, "glGetLightfv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetLightiv)(GLenum light, GLenum pname, GLint * params) -{ - (void) light; (void) pname; (void) params; - DISPATCH(GetLightiv, (light, pname, params), (F, "glGetLightiv(0x%x, 0x%x, %p);\n", light, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetMapdv)(GLenum target, GLenum query, GLdouble * v) -{ - (void) target; (void) query; (void) v; - DISPATCH(GetMapdv, (target, query, v), (F, "glGetMapdv(0x%x, 0x%x, %p);\n", target, query, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(GetMapfv)(GLenum target, GLenum query, GLfloat * v) -{ - (void) target; (void) query; (void) v; - DISPATCH(GetMapfv, (target, query, v), (F, "glGetMapfv(0x%x, 0x%x, %p);\n", target, query, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(GetMapiv)(GLenum target, GLenum query, GLint * v) -{ - (void) target; (void) query; (void) v; - DISPATCH(GetMapiv, (target, query, v), (F, "glGetMapiv(0x%x, 0x%x, %p);\n", target, query, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(GetMaterialfv)(GLenum face, GLenum pname, GLfloat * params) -{ - (void) face; (void) pname; (void) params; - DISPATCH(GetMaterialfv, (face, pname, params), (F, "glGetMaterialfv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetMaterialiv)(GLenum face, GLenum pname, GLint * params) -{ - (void) face; (void) pname; (void) params; - DISPATCH(GetMaterialiv, (face, pname, params), (F, "glGetMaterialiv(0x%x, 0x%x, %p);\n", face, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetPixelMapfv)(GLenum map, GLfloat * values) -{ - (void) map; (void) values; - DISPATCH(GetPixelMapfv, (map, values), (F, "glGetPixelMapfv(0x%x, %p);\n", map, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(GetPixelMapuiv)(GLenum map, GLuint * values) -{ - (void) map; (void) values; - DISPATCH(GetPixelMapuiv, (map, values), (F, "glGetPixelMapuiv(0x%x, %p);\n", map, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(GetPixelMapusv)(GLenum map, GLushort * values) -{ - (void) map; (void) values; - DISPATCH(GetPixelMapusv, (map, values), (F, "glGetPixelMapusv(0x%x, %p);\n", map, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(GetPolygonStipple)(GLubyte * mask) -{ - (void) mask; - DISPATCH(GetPolygonStipple, (mask), (F, "glGetPolygonStipple(%p);\n", (const void *) mask)); -} - -KEYWORD1 const GLubyte * KEYWORD2 NAME(GetString)(GLenum name) -{ - (void) name; - RETURN_DISPATCH(GetString, (name), (F, "glGetString(0x%x);\n", name)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexEnvfv)(GLenum target, GLenum pname, GLfloat * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetTexEnvfv, (target, pname, params), (F, "glGetTexEnvfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexEnviv)(GLenum target, GLenum pname, GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetTexEnviv, (target, pname, params), (F, "glGetTexEnviv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexGendv)(GLenum coord, GLenum pname, GLdouble * params) -{ - (void) coord; (void) pname; (void) params; - DISPATCH(GetTexGendv, (coord, pname, params), (F, "glGetTexGendv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexGenfv)(GLenum coord, GLenum pname, GLfloat * params) -{ - (void) coord; (void) pname; (void) params; - DISPATCH(GetTexGenfv, (coord, pname, params), (F, "glGetTexGenfv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexGeniv)(GLenum coord, GLenum pname, GLint * params) -{ - (void) coord; (void) pname; (void) params; - DISPATCH(GetTexGeniv, (coord, pname, params), (F, "glGetTexGeniv(0x%x, 0x%x, %p);\n", coord, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexImage)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels) -{ - (void) target; (void) level; (void) format; (void) type; (void) pixels; - DISPATCH(GetTexImage, (target, level, format, type, pixels), (F, "glGetTexImage(0x%x, %d, 0x%x, 0x%x, %p);\n", target, level, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexParameterfv)(GLenum target, GLenum pname, GLfloat * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetTexParameterfv, (target, pname, params), (F, "glGetTexParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexParameteriv)(GLenum target, GLenum pname, GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetTexParameteriv, (target, pname, params), (F, "glGetTexParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat * params) -{ - (void) target; (void) level; (void) pname; (void) params; - DISPATCH(GetTexLevelParameterfv, (target, level, pname, params), (F, "glGetTexLevelParameterfv(0x%x, %d, 0x%x, %p);\n", target, level, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint * params) -{ - (void) target; (void) level; (void) pname; (void) params; - DISPATCH(GetTexLevelParameteriv, (target, level, pname, params), (F, "glGetTexLevelParameteriv(0x%x, %d, 0x%x, %p);\n", target, level, pname, (const void *) params)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsEnabled)(GLenum cap) -{ - (void) cap; - RETURN_DISPATCH(IsEnabled, (cap), (F, "glIsEnabled(0x%x);\n", cap)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsList)(GLuint list) -{ - (void) list; - RETURN_DISPATCH(IsList, (list), (F, "glIsList(%d);\n", list)); -} - -KEYWORD1 void KEYWORD2 NAME(DepthRange)(GLclampd zNear, GLclampd zFar) -{ - (void) zNear; (void) zFar; - DISPATCH(DepthRange, (zNear, zFar), (F, "glDepthRange(%f, %f);\n", zNear, zFar)); -} - -KEYWORD1 void KEYWORD2 NAME(Frustum)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) -{ - (void) left; (void) right; (void) bottom; (void) top; (void) zNear; (void) zFar; - DISPATCH(Frustum, (left, right, bottom, top, zNear, zFar), (F, "glFrustum(%f, %f, %f, %f, %f, %f);\n", left, right, bottom, top, zNear, zFar)); -} - -KEYWORD1 void KEYWORD2 NAME(LoadIdentity)(void) -{ - DISPATCH(LoadIdentity, (), (F, "glLoadIdentity();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(LoadMatrixf)(const GLfloat * m) -{ - (void) m; - DISPATCH(LoadMatrixf, (m), (F, "glLoadMatrixf(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(LoadMatrixd)(const GLdouble * m) -{ - (void) m; - DISPATCH(LoadMatrixd, (m), (F, "glLoadMatrixd(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(MatrixMode)(GLenum mode) -{ - (void) mode; - DISPATCH(MatrixMode, (mode), (F, "glMatrixMode(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(MultMatrixf)(const GLfloat * m) -{ - (void) m; - DISPATCH(MultMatrixf, (m), (F, "glMultMatrixf(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(MultMatrixd)(const GLdouble * m) -{ - (void) m; - DISPATCH(MultMatrixd, (m), (F, "glMultMatrixd(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(Ortho)(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) -{ - (void) left; (void) right; (void) bottom; (void) top; (void) zNear; (void) zFar; - DISPATCH(Ortho, (left, right, bottom, top, zNear, zFar), (F, "glOrtho(%f, %f, %f, %f, %f, %f);\n", left, right, bottom, top, zNear, zFar)); -} - -KEYWORD1 void KEYWORD2 NAME(PopMatrix)(void) -{ - DISPATCH(PopMatrix, (), (F, "glPopMatrix();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(PushMatrix)(void) -{ - DISPATCH(PushMatrix, (), (F, "glPushMatrix();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(Rotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z) -{ - (void) angle; (void) x; (void) y; (void) z; - DISPATCH(Rotated, (angle, x, y, z), (F, "glRotated(%f, %f, %f, %f);\n", angle, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Rotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) -{ - (void) angle; (void) x; (void) y; (void) z; - DISPATCH(Rotatef, (angle, x, y, z), (F, "glRotatef(%f, %f, %f, %f);\n", angle, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Scaled)(GLdouble x, GLdouble y, GLdouble z) -{ - (void) x; (void) y; (void) z; - DISPATCH(Scaled, (x, y, z), (F, "glScaled(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Scalef)(GLfloat x, GLfloat y, GLfloat z) -{ - (void) x; (void) y; (void) z; - DISPATCH(Scalef, (x, y, z), (F, "glScalef(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Translated)(GLdouble x, GLdouble y, GLdouble z) -{ - (void) x; (void) y; (void) z; - DISPATCH(Translated, (x, y, z), (F, "glTranslated(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Translatef)(GLfloat x, GLfloat y, GLfloat z) -{ - (void) x; (void) y; (void) z; - DISPATCH(Translatef, (x, y, z), (F, "glTranslatef(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Viewport)(GLint x, GLint y, GLsizei width, GLsizei height) -{ - (void) x; (void) y; (void) width; (void) height; - DISPATCH(Viewport, (x, y, width, height), (F, "glViewport(%d, %d, %d, %d);\n", x, y, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(ArrayElement)(GLint i) -{ - (void) i; - DISPATCH(ArrayElement, (i), (F, "glArrayElement(%d);\n", i)); -} - -KEYWORD1 void KEYWORD2 NAME(ArrayElementEXT)(GLint i) -{ - (void) i; - DISPATCH(ArrayElement, (i), (F, "glArrayElementEXT(%d);\n", i)); -} - -KEYWORD1 void KEYWORD2 NAME(BindTexture)(GLenum target, GLuint texture) -{ - (void) target; (void) texture; - DISPATCH(BindTexture, (target, texture), (F, "glBindTexture(0x%x, %d);\n", target, texture)); -} - -KEYWORD1 void KEYWORD2 NAME(BindTextureEXT)(GLenum target, GLuint texture) -{ - (void) target; (void) texture; - DISPATCH(BindTexture, (target, texture), (F, "glBindTextureEXT(0x%x, %d);\n", target, texture)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) -{ - (void) size; (void) type; (void) stride; (void) pointer; - DISPATCH(ColorPointer, (size, type, stride, pointer), (F, "glColorPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(DisableClientState)(GLenum array) -{ - (void) array; - DISPATCH(DisableClientState, (array), (F, "glDisableClientState(0x%x);\n", array)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawArrays)(GLenum mode, GLint first, GLsizei count) -{ - (void) mode; (void) first; (void) count; - DISPATCH(DrawArrays, (mode, first, count), (F, "glDrawArrays(0x%x, %d, %d);\n", mode, first, count)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawArraysEXT)(GLenum mode, GLint first, GLsizei count) -{ - (void) mode; (void) first; (void) count; - DISPATCH(DrawArrays, (mode, first, count), (F, "glDrawArraysEXT(0x%x, %d, %d);\n", mode, first, count)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices) -{ - (void) mode; (void) count; (void) type; (void) indices; - DISPATCH(DrawElements, (mode, count, type, indices), (F, "glDrawElements(0x%x, %d, 0x%x, %p);\n", mode, count, type, (const void *) indices)); -} - -KEYWORD1 void KEYWORD2 NAME(EdgeFlagPointer)(GLsizei stride, const GLvoid * pointer) -{ - (void) stride; (void) pointer; - DISPATCH(EdgeFlagPointer, (stride, pointer), (F, "glEdgeFlagPointer(%d, %p);\n", stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(EnableClientState)(GLenum array) -{ - (void) array; - DISPATCH(EnableClientState, (array), (F, "glEnableClientState(0x%x);\n", array)); -} - -KEYWORD1 void KEYWORD2 NAME(IndexPointer)(GLenum type, GLsizei stride, const GLvoid * pointer) -{ - (void) type; (void) stride; (void) pointer; - DISPATCH(IndexPointer, (type, stride, pointer), (F, "glIndexPointer(0x%x, %d, %p);\n", type, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(Indexub)(GLubyte c) -{ - (void) c; - DISPATCH(Indexub, (c), (F, "glIndexub(%d);\n", c)); -} - -KEYWORD1 void KEYWORD2 NAME(Indexubv)(const GLubyte * c) -{ - (void) c; - DISPATCH(Indexubv, (c), (F, "glIndexubv(%p);\n", (const void *) c)); -} - -KEYWORD1 void KEYWORD2 NAME(InterleavedArrays)(GLenum format, GLsizei stride, const GLvoid * pointer) -{ - (void) format; (void) stride; (void) pointer; - DISPATCH(InterleavedArrays, (format, stride, pointer), (F, "glInterleavedArrays(0x%x, %d, %p);\n", format, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(NormalPointer)(GLenum type, GLsizei stride, const GLvoid * pointer) -{ - (void) type; (void) stride; (void) pointer; - DISPATCH(NormalPointer, (type, stride, pointer), (F, "glNormalPointer(0x%x, %d, %p);\n", type, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(PolygonOffset)(GLfloat factor, GLfloat units) -{ - (void) factor; (void) units; - DISPATCH(PolygonOffset, (factor, units), (F, "glPolygonOffset(%f, %f);\n", factor, units)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) -{ - (void) size; (void) type; (void) stride; (void) pointer; - DISPATCH(TexCoordPointer, (size, type, stride, pointer), (F, "glTexCoordPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) -{ - (void) size; (void) type; (void) stride; (void) pointer; - DISPATCH(VertexPointer, (size, type, stride, pointer), (F, "glVertexPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(AreTexturesResident)(GLsizei n, const GLuint * textures, GLboolean * residences) -{ - (void) n; (void) textures; (void) residences; - RETURN_DISPATCH(AreTexturesResident, (n, textures, residences), (F, "glAreTexturesResident(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) -{ - (void) target; (void) level; (void) internalformat; (void) x; (void) y; (void) width; (void) border; - DISPATCH(CopyTexImage1D, (target, level, internalformat, x, y, width, border), (F, "glCopyTexImage1D(0x%x, %d, 0x%x, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, border)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyTexImage1DEXT)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) -{ - (void) target; (void) level; (void) internalformat; (void) x; (void) y; (void) width; (void) border; - DISPATCH(CopyTexImage1D, (target, level, internalformat, x, y, width, border), (F, "glCopyTexImage1DEXT(0x%x, %d, 0x%x, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, border)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) -{ - (void) target; (void) level; (void) internalformat; (void) x; (void) y; (void) width; (void) height; (void) border; - DISPATCH(CopyTexImage2D, (target, level, internalformat, x, y, width, height, border), (F, "glCopyTexImage2D(0x%x, %d, 0x%x, %d, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, height, border)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyTexImage2DEXT)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) -{ - (void) target; (void) level; (void) internalformat; (void) x; (void) y; (void) width; (void) height; (void) border; - DISPATCH(CopyTexImage2D, (target, level, internalformat, x, y, width, height, border), (F, "glCopyTexImage2DEXT(0x%x, %d, 0x%x, %d, %d, %d, %d, %d);\n", target, level, internalformat, x, y, width, height, border)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) -{ - (void) target; (void) level; (void) xoffset; (void) x; (void) y; (void) width; - DISPATCH(CopyTexSubImage1D, (target, level, xoffset, x, y, width), (F, "glCopyTexSubImage1D(0x%x, %d, %d, %d, %d, %d);\n", target, level, xoffset, x, y, width)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage1DEXT)(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) -{ - (void) target; (void) level; (void) xoffset; (void) x; (void) y; (void) width; - DISPATCH(CopyTexSubImage1D, (target, level, xoffset, x, y, width), (F, "glCopyTexSubImage1DEXT(0x%x, %d, %d, %d, %d, %d);\n", target, level, xoffset, x, y, width)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - (void) target; (void) level; (void) xoffset; (void) yoffset; (void) x; (void) y; (void) width; (void) height; - DISPATCH(CopyTexSubImage2D, (target, level, xoffset, yoffset, x, y, width, height), (F, "glCopyTexSubImage2D(0x%x, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, x, y, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage2DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - (void) target; (void) level; (void) xoffset; (void) yoffset; (void) x; (void) y; (void) width; (void) height; - DISPATCH(CopyTexSubImage2D, (target, level, xoffset, yoffset, x, y, width, height), (F, "glCopyTexSubImage2DEXT(0x%x, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, x, y, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteTextures)(GLsizei n, const GLuint * textures) -{ - (void) n; (void) textures; - DISPATCH(DeleteTextures, (n, textures), (F, "glDeleteTextures(%d, %p);\n", n, (const void *) textures)); -} - -KEYWORD1 void KEYWORD2 NAME(GenTextures)(GLsizei n, GLuint * textures) -{ - (void) n; (void) textures; - DISPATCH(GenTextures, (n, textures), (F, "glGenTextures(%d, %p);\n", n, (const void *) textures)); -} - -KEYWORD1 void KEYWORD2 NAME(GetPointerv)(GLenum pname, GLvoid ** params) -{ - (void) pname; (void) params; - DISPATCH(GetPointerv, (pname, params), (F, "glGetPointerv(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetPointervEXT)(GLenum pname, GLvoid ** params) -{ - (void) pname; (void) params; - DISPATCH(GetPointerv, (pname, params), (F, "glGetPointervEXT(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsTexture)(GLuint texture) -{ - (void) texture; - RETURN_DISPATCH(IsTexture, (texture), (F, "glIsTexture(%d);\n", texture)); -} - -KEYWORD1 void KEYWORD2 NAME(PrioritizeTextures)(GLsizei n, const GLuint * textures, const GLclampf * priorities) -{ - (void) n; (void) textures; (void) priorities; - DISPATCH(PrioritizeTextures, (n, textures, priorities), (F, "glPrioritizeTextures(%d, %p, %p);\n", n, (const void *) textures, (const void *) priorities)); -} - -KEYWORD1 void KEYWORD2 NAME(PrioritizeTexturesEXT)(GLsizei n, const GLuint * textures, const GLclampf * priorities) -{ - (void) n; (void) textures; (void) priorities; - DISPATCH(PrioritizeTextures, (n, textures, priorities), (F, "glPrioritizeTexturesEXT(%d, %p, %p);\n", n, (const void *) textures, (const void *) priorities)); -} - -KEYWORD1 void KEYWORD2 NAME(TexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels) -{ - (void) target; (void) level; (void) xoffset; (void) width; (void) format; (void) type; (void) pixels; - DISPATCH(TexSubImage1D, (target, level, xoffset, width, format, type, pixels), (F, "glTexSubImage1D(0x%x, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, width, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(TexSubImage1DEXT)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels) -{ - (void) target; (void) level; (void) xoffset; (void) width; (void) format; (void) type; (void) pixels; - DISPATCH(TexSubImage1D, (target, level, xoffset, width, format, type, pixels), (F, "glTexSubImage1DEXT(0x%x, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, width, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(TexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels) -{ - (void) target; (void) level; (void) xoffset; (void) yoffset; (void) width; (void) height; (void) format; (void) type; (void) pixels; - DISPATCH(TexSubImage2D, (target, level, xoffset, yoffset, width, height, format, type, pixels), (F, "glTexSubImage2D(0x%x, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, width, height, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(TexSubImage2DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels) -{ - (void) target; (void) level; (void) xoffset; (void) yoffset; (void) width; (void) height; (void) format; (void) type; (void) pixels; - DISPATCH(TexSubImage2D, (target, level, xoffset, yoffset, width, height, format, type, pixels), (F, "glTexSubImage2DEXT(0x%x, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, width, height, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(PopClientAttrib)(void) -{ - DISPATCH(PopClientAttrib, (), (F, "glPopClientAttrib();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(PushClientAttrib)(GLbitfield mask) -{ - (void) mask; - DISPATCH(PushClientAttrib, (mask), (F, "glPushClientAttrib(%d);\n", mask)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -{ - (void) red; (void) green; (void) blue; (void) alpha; - DISPATCH(BlendColor, (red, green, blue, alpha), (F, "glBlendColor(%f, %f, %f, %f);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendColorEXT)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -{ - (void) red; (void) green; (void) blue; (void) alpha; - DISPATCH(BlendColor, (red, green, blue, alpha), (F, "glBlendColorEXT(%f, %f, %f, %f);\n", red, green, blue, alpha)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendEquation)(GLenum mode) -{ - (void) mode; - DISPATCH(BlendEquation, (mode), (F, "glBlendEquation(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendEquationEXT)(GLenum mode) -{ - (void) mode; - DISPATCH(BlendEquation, (mode), (F, "glBlendEquationEXT(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices) -{ - (void) mode; (void) start; (void) end; (void) count; (void) type; (void) indices; - DISPATCH(DrawRangeElements, (mode, start, end, count, type, indices), (F, "glDrawRangeElements(0x%x, %d, %d, %d, 0x%x, %p);\n", mode, start, end, count, type, (const void *) indices)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawRangeElementsEXT)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices) -{ - (void) mode; (void) start; (void) end; (void) count; (void) type; (void) indices; - DISPATCH(DrawRangeElements, (mode, start, end, count, type, indices), (F, "glDrawRangeElementsEXT(0x%x, %d, %d, %d, 0x%x, %p);\n", mode, start, end, count, type, (const void *) indices)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorTable)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table) -{ - (void) target; (void) internalformat; (void) width; (void) format; (void) type; (void) table; - DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTable(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorTableEXT)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table) -{ - (void) target; (void) internalformat; (void) width; (void) format; (void) type; (void) table; - DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTableEXT(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_339)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_339)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table) -{ - (void) target; (void) internalformat; (void) width; (void) format; (void) type; (void) table; - DISPATCH(ColorTable, (target, internalformat, width, format, type, table), (F, "glColorTableSGI(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) table)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorTableParameterfv)(GLenum target, GLenum pname, const GLfloat * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(ColorTableParameterfv, (target, pname, params), (F, "glColorTableParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_340)(GLenum target, GLenum pname, const GLfloat * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_340)(GLenum target, GLenum pname, const GLfloat * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(ColorTableParameterfv, (target, pname, params), (F, "glColorTableParameterfvSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorTableParameteriv)(GLenum target, GLenum pname, const GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(ColorTableParameteriv, (target, pname, params), (F, "glColorTableParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_341)(GLenum target, GLenum pname, const GLint * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_341)(GLenum target, GLenum pname, const GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(ColorTableParameteriv, (target, pname, params), (F, "glColorTableParameterivSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyColorTable)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) -{ - (void) target; (void) internalformat; (void) x; (void) y; (void) width; - DISPATCH(CopyColorTable, (target, internalformat, x, y, width), (F, "glCopyColorTable(0x%x, 0x%x, %d, %d, %d);\n", target, internalformat, x, y, width)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_342)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_342)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) -{ - (void) target; (void) internalformat; (void) x; (void) y; (void) width; - DISPATCH(CopyColorTable, (target, internalformat, x, y, width), (F, "glCopyColorTableSGI(0x%x, 0x%x, %d, %d, %d);\n", target, internalformat, x, y, width)); -} - -KEYWORD1 void KEYWORD2 NAME(GetColorTable)(GLenum target, GLenum format, GLenum type, GLvoid * table) -{ - (void) target; (void) format; (void) type; (void) table; - DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTable(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table)); -} - -KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterfv)(GLenum target, GLenum pname, GLfloat * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetColorTableParameteriv)(GLenum target, GLenum pname, GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorSubTable)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data) -{ - (void) target; (void) start; (void) count; (void) format; (void) type; (void) data; - DISPATCH(ColorSubTable, (target, start, count, format, type, data), (F, "glColorSubTable(0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, start, count, format, type, (const void *) data)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_346)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_346)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data) -{ - (void) target; (void) start; (void) count; (void) format; (void) type; (void) data; - DISPATCH(ColorSubTable, (target, start, count, format, type, data), (F, "glColorSubTableEXT(0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, start, count, format, type, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyColorSubTable)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width) -{ - (void) target; (void) start; (void) x; (void) y; (void) width; - DISPATCH(CopyColorSubTable, (target, start, x, y, width), (F, "glCopyColorSubTable(0x%x, %d, %d, %d, %d);\n", target, start, x, y, width)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_347)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_347)(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width) -{ - (void) target; (void) start; (void) x; (void) y; (void) width; - DISPATCH(CopyColorSubTable, (target, start, x, y, width), (F, "glCopyColorSubTableEXT(0x%x, %d, %d, %d, %d);\n", target, start, x, y, width)); -} - -KEYWORD1 void KEYWORD2 NAME(ConvolutionFilter1D)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image) -{ - (void) target; (void) internalformat; (void) width; (void) format; (void) type; (void) image; - DISPATCH(ConvolutionFilter1D, (target, internalformat, width, format, type, image), (F, "glConvolutionFilter1D(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) image)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_348)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_348)(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image) -{ - (void) target; (void) internalformat; (void) width; (void) format; (void) type; (void) image; - DISPATCH(ConvolutionFilter1D, (target, internalformat, width, format, type, image), (F, "glConvolutionFilter1DEXT(0x%x, 0x%x, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, format, type, (const void *) image)); -} - -KEYWORD1 void KEYWORD2 NAME(ConvolutionFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image) -{ - (void) target; (void) internalformat; (void) width; (void) height; (void) format; (void) type; (void) image; - DISPATCH(ConvolutionFilter2D, (target, internalformat, width, height, format, type, image), (F, "glConvolutionFilter2D(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, height, format, type, (const void *) image)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_349)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_349)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image) -{ - (void) target; (void) internalformat; (void) width; (void) height; (void) format; (void) type; (void) image; - DISPATCH(ConvolutionFilter2D, (target, internalformat, width, height, format, type, image), (F, "glConvolutionFilter2DEXT(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p);\n", target, internalformat, width, height, format, type, (const void *) image)); -} - -KEYWORD1 void KEYWORD2 NAME(ConvolutionParameterf)(GLenum target, GLenum pname, GLfloat params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(ConvolutionParameterf, (target, pname, params), (F, "glConvolutionParameterf(0x%x, 0x%x, %f);\n", target, pname, params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_350)(GLenum target, GLenum pname, GLfloat params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_350)(GLenum target, GLenum pname, GLfloat params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(ConvolutionParameterf, (target, pname, params), (F, "glConvolutionParameterfEXT(0x%x, 0x%x, %f);\n", target, pname, params)); -} - -KEYWORD1 void KEYWORD2 NAME(ConvolutionParameterfv)(GLenum target, GLenum pname, const GLfloat * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(ConvolutionParameterfv, (target, pname, params), (F, "glConvolutionParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_351)(GLenum target, GLenum pname, const GLfloat * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_351)(GLenum target, GLenum pname, const GLfloat * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(ConvolutionParameterfv, (target, pname, params), (F, "glConvolutionParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ConvolutionParameteri)(GLenum target, GLenum pname, GLint params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(ConvolutionParameteri, (target, pname, params), (F, "glConvolutionParameteri(0x%x, 0x%x, %d);\n", target, pname, params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_352)(GLenum target, GLenum pname, GLint params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_352)(GLenum target, GLenum pname, GLint params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(ConvolutionParameteri, (target, pname, params), (F, "glConvolutionParameteriEXT(0x%x, 0x%x, %d);\n", target, pname, params)); -} - -KEYWORD1 void KEYWORD2 NAME(ConvolutionParameteriv)(GLenum target, GLenum pname, const GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(ConvolutionParameteriv, (target, pname, params), (F, "glConvolutionParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_353)(GLenum target, GLenum pname, const GLint * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_353)(GLenum target, GLenum pname, const GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(ConvolutionParameteriv, (target, pname, params), (F, "glConvolutionParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyConvolutionFilter1D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) -{ - (void) target; (void) internalformat; (void) x; (void) y; (void) width; - DISPATCH(CopyConvolutionFilter1D, (target, internalformat, x, y, width), (F, "glCopyConvolutionFilter1D(0x%x, 0x%x, %d, %d, %d);\n", target, internalformat, x, y, width)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_354)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_354)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) -{ - (void) target; (void) internalformat; (void) x; (void) y; (void) width; - DISPATCH(CopyConvolutionFilter1D, (target, internalformat, x, y, width), (F, "glCopyConvolutionFilter1DEXT(0x%x, 0x%x, %d, %d, %d);\n", target, internalformat, x, y, width)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyConvolutionFilter2D)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height) -{ - (void) target; (void) internalformat; (void) x; (void) y; (void) width; (void) height; - DISPATCH(CopyConvolutionFilter2D, (target, internalformat, x, y, width, height), (F, "glCopyConvolutionFilter2D(0x%x, 0x%x, %d, %d, %d, %d);\n", target, internalformat, x, y, width, height)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_355)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_355)(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height) -{ - (void) target; (void) internalformat; (void) x; (void) y; (void) width; (void) height; - DISPATCH(CopyConvolutionFilter2D, (target, internalformat, x, y, width, height), (F, "glCopyConvolutionFilter2DEXT(0x%x, 0x%x, %d, %d, %d, %d);\n", target, internalformat, x, y, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(GetConvolutionFilter)(GLenum target, GLenum format, GLenum type, GLvoid * image) -{ - (void) target; (void) format; (void) type; (void) image; - DISPATCH(GetConvolutionFilter, (target, format, type, image), (F, "glGetConvolutionFilter(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) image)); -} - -KEYWORD1 void KEYWORD2 NAME(GetConvolutionParameterfv)(GLenum target, GLenum pname, GLfloat * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetConvolutionParameterfv, (target, pname, params), (F, "glGetConvolutionParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetConvolutionParameteriv)(GLenum target, GLenum pname, GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetConvolutionParameteriv, (target, pname, params), (F, "glGetConvolutionParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetSeparableFilter)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span) -{ - (void) target; (void) format; (void) type; (void) row; (void) column; (void) span; - DISPATCH(GetSeparableFilter, (target, format, type, row, column, span), (F, "glGetSeparableFilter(0x%x, 0x%x, 0x%x, %p, %p, %p);\n", target, format, type, (const void *) row, (const void *) column, (const void *) span)); -} - -KEYWORD1 void KEYWORD2 NAME(SeparableFilter2D)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column) -{ - (void) target; (void) internalformat; (void) width; (void) height; (void) format; (void) type; (void) row; (void) column; - DISPATCH(SeparableFilter2D, (target, internalformat, width, height, format, type, row, column), (F, "glSeparableFilter2D(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p, %p);\n", target, internalformat, width, height, format, type, (const void *) row, (const void *) column)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_360)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_360)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column) -{ - (void) target; (void) internalformat; (void) width; (void) height; (void) format; (void) type; (void) row; (void) column; - DISPATCH(SeparableFilter2D, (target, internalformat, width, height, format, type, row, column), (F, "glSeparableFilter2DEXT(0x%x, 0x%x, %d, %d, 0x%x, 0x%x, %p, %p);\n", target, internalformat, width, height, format, type, (const void *) row, (const void *) column)); -} - -KEYWORD1 void KEYWORD2 NAME(GetHistogram)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) -{ - (void) target; (void) reset; (void) format; (void) type; (void) values; - DISPATCH(GetHistogram, (target, reset, format, type, values), (F, "glGetHistogram(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(GetHistogramParameterfv)(GLenum target, GLenum pname, GLfloat * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetHistogramParameterfv, (target, pname, params), (F, "glGetHistogramParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetHistogramParameteriv)(GLenum target, GLenum pname, GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetHistogramParameteriv, (target, pname, params), (F, "glGetHistogramParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetMinmax)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) -{ - (void) target; (void) reset; (void) format; (void) type; (void) values; - DISPATCH(GetMinmax, (target, reset, format, type, values), (F, "glGetMinmax(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(GetMinmaxParameterfv)(GLenum target, GLenum pname, GLfloat * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetMinmaxParameterfv, (target, pname, params), (F, "glGetMinmaxParameterfv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetMinmaxParameteriv)(GLenum target, GLenum pname, GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetMinmaxParameteriv, (target, pname, params), (F, "glGetMinmaxParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(Histogram)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) -{ - (void) target; (void) width; (void) internalformat; (void) sink; - DISPATCH(Histogram, (target, width, internalformat, sink), (F, "glHistogram(0x%x, %d, 0x%x, %d);\n", target, width, internalformat, sink)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_367)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_367)(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) -{ - (void) target; (void) width; (void) internalformat; (void) sink; - DISPATCH(Histogram, (target, width, internalformat, sink), (F, "glHistogramEXT(0x%x, %d, 0x%x, %d);\n", target, width, internalformat, sink)); -} - -KEYWORD1 void KEYWORD2 NAME(Minmax)(GLenum target, GLenum internalformat, GLboolean sink) -{ - (void) target; (void) internalformat; (void) sink; - DISPATCH(Minmax, (target, internalformat, sink), (F, "glMinmax(0x%x, 0x%x, %d);\n", target, internalformat, sink)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_368)(GLenum target, GLenum internalformat, GLboolean sink); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_368)(GLenum target, GLenum internalformat, GLboolean sink) -{ - (void) target; (void) internalformat; (void) sink; - DISPATCH(Minmax, (target, internalformat, sink), (F, "glMinmaxEXT(0x%x, 0x%x, %d);\n", target, internalformat, sink)); -} - -KEYWORD1 void KEYWORD2 NAME(ResetHistogram)(GLenum target) -{ - (void) target; - DISPATCH(ResetHistogram, (target), (F, "glResetHistogram(0x%x);\n", target)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_369)(GLenum target); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_369)(GLenum target) -{ - (void) target; - DISPATCH(ResetHistogram, (target), (F, "glResetHistogramEXT(0x%x);\n", target)); -} - -KEYWORD1 void KEYWORD2 NAME(ResetMinmax)(GLenum target) -{ - (void) target; - DISPATCH(ResetMinmax, (target), (F, "glResetMinmax(0x%x);\n", target)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_370)(GLenum target); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_370)(GLenum target) -{ - (void) target; - DISPATCH(ResetMinmax, (target), (F, "glResetMinmaxEXT(0x%x);\n", target)); -} - -KEYWORD1 void KEYWORD2 NAME(TexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels) -{ - (void) target; (void) level; (void) internalformat; (void) width; (void) height; (void) depth; (void) border; (void) format; (void) type; (void) pixels; - DISPATCH(TexImage3D, (target, level, internalformat, width, height, depth, border, format, type, pixels), (F, "glTexImage3D(0x%x, %d, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, height, depth, border, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(TexImage3DEXT)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels) -{ - (void) target; (void) level; (void) internalformat; (void) width; (void) height; (void) depth; (void) border; (void) format; (void) type; (void) pixels; - DISPATCH(TexImage3D, (target, level, internalformat, width, height, depth, border, format, type, pixels), (F, "glTexImage3DEXT(0x%x, %d, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, internalformat, width, height, depth, border, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(TexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels) -{ - (void) target; (void) level; (void) xoffset; (void) yoffset; (void) zoffset; (void) width; (void) height; (void) depth; (void) format; (void) type; (void) pixels; - DISPATCH(TexSubImage3D, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), (F, "glTexSubImage3D(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(TexSubImage3DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels) -{ - (void) target; (void) level; (void) xoffset; (void) yoffset; (void) zoffset; (void) width; (void) height; (void) depth; (void) format; (void) type; (void) pixels; - DISPATCH(TexSubImage3D, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), (F, "glTexSubImage3DEXT(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, (const void *) pixels)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - (void) target; (void) level; (void) xoffset; (void) yoffset; (void) zoffset; (void) x; (void) y; (void) width; (void) height; - DISPATCH(CopyTexSubImage3D, (target, level, xoffset, yoffset, zoffset, x, y, width, height), (F, "glCopyTexSubImage3D(0x%x, %d, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, zoffset, x, y, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyTexSubImage3DEXT)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - (void) target; (void) level; (void) xoffset; (void) yoffset; (void) zoffset; (void) x; (void) y; (void) width; (void) height; - DISPATCH(CopyTexSubImage3D, (target, level, xoffset, yoffset, zoffset, x, y, width, height), (F, "glCopyTexSubImage3DEXT(0x%x, %d, %d, %d, %d, %d, %d, %d, %d);\n", target, level, xoffset, yoffset, zoffset, x, y, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(ActiveTexture)(GLenum texture) -{ - (void) texture; - DISPATCH(ActiveTextureARB, (texture), (F, "glActiveTexture(0x%x);\n", texture)); -} - -KEYWORD1 void KEYWORD2 NAME(ActiveTextureARB)(GLenum texture) -{ - (void) texture; - DISPATCH(ActiveTextureARB, (texture), (F, "glActiveTextureARB(0x%x);\n", texture)); -} - -KEYWORD1 void KEYWORD2 NAME(ClientActiveTexture)(GLenum texture) -{ - (void) texture; - DISPATCH(ClientActiveTextureARB, (texture), (F, "glClientActiveTexture(0x%x);\n", texture)); -} - -KEYWORD1 void KEYWORD2 NAME(ClientActiveTextureARB)(GLenum texture) -{ - (void) texture; - DISPATCH(ClientActiveTextureARB, (texture), (F, "glClientActiveTextureARB(0x%x);\n", texture)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1d)(GLenum target, GLdouble s) -{ - (void) target; (void) s; - DISPATCH(MultiTexCoord1dARB, (target, s), (F, "glMultiTexCoord1d(0x%x, %f);\n", target, s)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1dARB)(GLenum target, GLdouble s) -{ - (void) target; (void) s; - DISPATCH(MultiTexCoord1dARB, (target, s), (F, "glMultiTexCoord1dARB(0x%x, %f);\n", target, s)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1dv)(GLenum target, const GLdouble * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord1dvARB, (target, v), (F, "glMultiTexCoord1dv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1dvARB)(GLenum target, const GLdouble * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord1dvARB, (target, v), (F, "glMultiTexCoord1dvARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1f)(GLenum target, GLfloat s) -{ - (void) target; (void) s; - DISPATCH(MultiTexCoord1fARB, (target, s), (F, "glMultiTexCoord1f(0x%x, %f);\n", target, s)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1fARB)(GLenum target, GLfloat s) -{ - (void) target; (void) s; - DISPATCH(MultiTexCoord1fARB, (target, s), (F, "glMultiTexCoord1fARB(0x%x, %f);\n", target, s)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1fv)(GLenum target, const GLfloat * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord1fvARB, (target, v), (F, "glMultiTexCoord1fv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1fvARB)(GLenum target, const GLfloat * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord1fvARB, (target, v), (F, "glMultiTexCoord1fvARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1i)(GLenum target, GLint s) -{ - (void) target; (void) s; - DISPATCH(MultiTexCoord1iARB, (target, s), (F, "glMultiTexCoord1i(0x%x, %d);\n", target, s)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1iARB)(GLenum target, GLint s) -{ - (void) target; (void) s; - DISPATCH(MultiTexCoord1iARB, (target, s), (F, "glMultiTexCoord1iARB(0x%x, %d);\n", target, s)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1iv)(GLenum target, const GLint * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord1ivARB, (target, v), (F, "glMultiTexCoord1iv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1ivARB)(GLenum target, const GLint * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord1ivARB, (target, v), (F, "glMultiTexCoord1ivARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1s)(GLenum target, GLshort s) -{ - (void) target; (void) s; - DISPATCH(MultiTexCoord1sARB, (target, s), (F, "glMultiTexCoord1s(0x%x, %d);\n", target, s)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1sARB)(GLenum target, GLshort s) -{ - (void) target; (void) s; - DISPATCH(MultiTexCoord1sARB, (target, s), (F, "glMultiTexCoord1sARB(0x%x, %d);\n", target, s)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1sv)(GLenum target, const GLshort * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord1svARB, (target, v), (F, "glMultiTexCoord1sv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1svARB)(GLenum target, const GLshort * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord1svARB, (target, v), (F, "glMultiTexCoord1svARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2d)(GLenum target, GLdouble s, GLdouble t) -{ - (void) target; (void) s; (void) t; - DISPATCH(MultiTexCoord2dARB, (target, s, t), (F, "glMultiTexCoord2d(0x%x, %f, %f);\n", target, s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2dARB)(GLenum target, GLdouble s, GLdouble t) -{ - (void) target; (void) s; (void) t; - DISPATCH(MultiTexCoord2dARB, (target, s, t), (F, "glMultiTexCoord2dARB(0x%x, %f, %f);\n", target, s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2dv)(GLenum target, const GLdouble * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord2dvARB, (target, v), (F, "glMultiTexCoord2dv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2dvARB)(GLenum target, const GLdouble * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord2dvARB, (target, v), (F, "glMultiTexCoord2dvARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2f)(GLenum target, GLfloat s, GLfloat t) -{ - (void) target; (void) s; (void) t; - DISPATCH(MultiTexCoord2fARB, (target, s, t), (F, "glMultiTexCoord2f(0x%x, %f, %f);\n", target, s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2fARB)(GLenum target, GLfloat s, GLfloat t) -{ - (void) target; (void) s; (void) t; - DISPATCH(MultiTexCoord2fARB, (target, s, t), (F, "glMultiTexCoord2fARB(0x%x, %f, %f);\n", target, s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2fv)(GLenum target, const GLfloat * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord2fvARB, (target, v), (F, "glMultiTexCoord2fv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2fvARB)(GLenum target, const GLfloat * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord2fvARB, (target, v), (F, "glMultiTexCoord2fvARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2i)(GLenum target, GLint s, GLint t) -{ - (void) target; (void) s; (void) t; - DISPATCH(MultiTexCoord2iARB, (target, s, t), (F, "glMultiTexCoord2i(0x%x, %d, %d);\n", target, s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2iARB)(GLenum target, GLint s, GLint t) -{ - (void) target; (void) s; (void) t; - DISPATCH(MultiTexCoord2iARB, (target, s, t), (F, "glMultiTexCoord2iARB(0x%x, %d, %d);\n", target, s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2iv)(GLenum target, const GLint * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord2ivARB, (target, v), (F, "glMultiTexCoord2iv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2ivARB)(GLenum target, const GLint * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord2ivARB, (target, v), (F, "glMultiTexCoord2ivARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2s)(GLenum target, GLshort s, GLshort t) -{ - (void) target; (void) s; (void) t; - DISPATCH(MultiTexCoord2sARB, (target, s, t), (F, "glMultiTexCoord2s(0x%x, %d, %d);\n", target, s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2sARB)(GLenum target, GLshort s, GLshort t) -{ - (void) target; (void) s; (void) t; - DISPATCH(MultiTexCoord2sARB, (target, s, t), (F, "glMultiTexCoord2sARB(0x%x, %d, %d);\n", target, s, t)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2sv)(GLenum target, const GLshort * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord2svARB, (target, v), (F, "glMultiTexCoord2sv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2svARB)(GLenum target, const GLshort * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord2svARB, (target, v), (F, "glMultiTexCoord2svARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3d)(GLenum target, GLdouble s, GLdouble t, GLdouble r) -{ - (void) target; (void) s; (void) t; (void) r; - DISPATCH(MultiTexCoord3dARB, (target, s, t, r), (F, "glMultiTexCoord3d(0x%x, %f, %f, %f);\n", target, s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r) -{ - (void) target; (void) s; (void) t; (void) r; - DISPATCH(MultiTexCoord3dARB, (target, s, t, r), (F, "glMultiTexCoord3dARB(0x%x, %f, %f, %f);\n", target, s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3dv)(GLenum target, const GLdouble * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord3dvARB, (target, v), (F, "glMultiTexCoord3dv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3dvARB)(GLenum target, const GLdouble * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord3dvARB, (target, v), (F, "glMultiTexCoord3dvARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3f)(GLenum target, GLfloat s, GLfloat t, GLfloat r) -{ - (void) target; (void) s; (void) t; (void) r; - DISPATCH(MultiTexCoord3fARB, (target, s, t, r), (F, "glMultiTexCoord3f(0x%x, %f, %f, %f);\n", target, s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r) -{ - (void) target; (void) s; (void) t; (void) r; - DISPATCH(MultiTexCoord3fARB, (target, s, t, r), (F, "glMultiTexCoord3fARB(0x%x, %f, %f, %f);\n", target, s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3fv)(GLenum target, const GLfloat * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord3fvARB, (target, v), (F, "glMultiTexCoord3fv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3fvARB)(GLenum target, const GLfloat * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord3fvARB, (target, v), (F, "glMultiTexCoord3fvARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3i)(GLenum target, GLint s, GLint t, GLint r) -{ - (void) target; (void) s; (void) t; (void) r; - DISPATCH(MultiTexCoord3iARB, (target, s, t, r), (F, "glMultiTexCoord3i(0x%x, %d, %d, %d);\n", target, s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3iARB)(GLenum target, GLint s, GLint t, GLint r) -{ - (void) target; (void) s; (void) t; (void) r; - DISPATCH(MultiTexCoord3iARB, (target, s, t, r), (F, "glMultiTexCoord3iARB(0x%x, %d, %d, %d);\n", target, s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3iv)(GLenum target, const GLint * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord3ivARB, (target, v), (F, "glMultiTexCoord3iv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3ivARB)(GLenum target, const GLint * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord3ivARB, (target, v), (F, "glMultiTexCoord3ivARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3s)(GLenum target, GLshort s, GLshort t, GLshort r) -{ - (void) target; (void) s; (void) t; (void) r; - DISPATCH(MultiTexCoord3sARB, (target, s, t, r), (F, "glMultiTexCoord3s(0x%x, %d, %d, %d);\n", target, s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3sARB)(GLenum target, GLshort s, GLshort t, GLshort r) -{ - (void) target; (void) s; (void) t; (void) r; - DISPATCH(MultiTexCoord3sARB, (target, s, t, r), (F, "glMultiTexCoord3sARB(0x%x, %d, %d, %d);\n", target, s, t, r)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3sv)(GLenum target, const GLshort * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord3svARB, (target, v), (F, "glMultiTexCoord3sv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3svARB)(GLenum target, const GLshort * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord3svARB, (target, v), (F, "glMultiTexCoord3svARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4d)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) -{ - (void) target; (void) s; (void) t; (void) r; (void) q; - DISPATCH(MultiTexCoord4dARB, (target, s, t, r, q), (F, "glMultiTexCoord4d(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) -{ - (void) target; (void) s; (void) t; (void) r; (void) q; - DISPATCH(MultiTexCoord4dARB, (target, s, t, r, q), (F, "glMultiTexCoord4dARB(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4dv)(GLenum target, const GLdouble * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord4dvARB, (target, v), (F, "glMultiTexCoord4dv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4dvARB)(GLenum target, const GLdouble * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord4dvARB, (target, v), (F, "glMultiTexCoord4dvARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4f)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) -{ - (void) target; (void) s; (void) t; (void) r; (void) q; - DISPATCH(MultiTexCoord4fARB, (target, s, t, r, q), (F, "glMultiTexCoord4f(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) -{ - (void) target; (void) s; (void) t; (void) r; (void) q; - DISPATCH(MultiTexCoord4fARB, (target, s, t, r, q), (F, "glMultiTexCoord4fARB(0x%x, %f, %f, %f, %f);\n", target, s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4fv)(GLenum target, const GLfloat * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord4fvARB, (target, v), (F, "glMultiTexCoord4fv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4fvARB)(GLenum target, const GLfloat * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord4fvARB, (target, v), (F, "glMultiTexCoord4fvARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4i)(GLenum target, GLint s, GLint t, GLint r, GLint q) -{ - (void) target; (void) s; (void) t; (void) r; (void) q; - DISPATCH(MultiTexCoord4iARB, (target, s, t, r, q), (F, "glMultiTexCoord4i(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4iARB)(GLenum target, GLint s, GLint t, GLint r, GLint q) -{ - (void) target; (void) s; (void) t; (void) r; (void) q; - DISPATCH(MultiTexCoord4iARB, (target, s, t, r, q), (F, "glMultiTexCoord4iARB(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4iv)(GLenum target, const GLint * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord4ivARB, (target, v), (F, "glMultiTexCoord4iv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4ivARB)(GLenum target, const GLint * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord4ivARB, (target, v), (F, "glMultiTexCoord4ivARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4s)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) -{ - (void) target; (void) s; (void) t; (void) r; (void) q; - DISPATCH(MultiTexCoord4sARB, (target, s, t, r, q), (F, "glMultiTexCoord4s(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4sARB)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) -{ - (void) target; (void) s; (void) t; (void) r; (void) q; - DISPATCH(MultiTexCoord4sARB, (target, s, t, r, q), (F, "glMultiTexCoord4sARB(0x%x, %d, %d, %d, %d);\n", target, s, t, r, q)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4sv)(GLenum target, const GLshort * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord4svARB, (target, v), (F, "glMultiTexCoord4sv(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4svARB)(GLenum target, const GLshort * v) -{ - (void) target; (void) v; - DISPATCH(MultiTexCoord4svARB, (target, v), (F, "glMultiTexCoord4svARB(0x%x, %p);\n", target, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(AttachShader)(GLuint program, GLuint shader) -{ - (void) program; (void) shader; - DISPATCH(AttachShader, (program, shader), (F, "glAttachShader(%d, %d);\n", program, shader)); -} - -KEYWORD1 GLuint KEYWORD2 NAME(CreateProgram)(void) -{ - RETURN_DISPATCH(CreateProgram, (), (F, "glCreateProgram();\n")); -} - -KEYWORD1 GLuint KEYWORD2 NAME(CreateShader)(GLenum type) -{ - (void) type; - RETURN_DISPATCH(CreateShader, (type), (F, "glCreateShader(0x%x);\n", type)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteProgram)(GLuint program) -{ - (void) program; - DISPATCH(DeleteProgram, (program), (F, "glDeleteProgram(%d);\n", program)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteShader)(GLuint program) -{ - (void) program; - DISPATCH(DeleteShader, (program), (F, "glDeleteShader(%d);\n", program)); -} - -KEYWORD1 void KEYWORD2 NAME(DetachShader)(GLuint program, GLuint shader) -{ - (void) program; (void) shader; - DISPATCH(DetachShader, (program, shader), (F, "glDetachShader(%d, %d);\n", program, shader)); -} - -KEYWORD1 void KEYWORD2 NAME(GetAttachedShaders)(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * obj) -{ - (void) program; (void) maxCount; (void) count; (void) obj; - DISPATCH(GetAttachedShaders, (program, maxCount, count, obj), (F, "glGetAttachedShaders(%d, %d, %p, %p);\n", program, maxCount, (const void *) count, (const void *) obj)); -} - -KEYWORD1 void KEYWORD2 NAME(GetProgramInfoLog)(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog) -{ - (void) program; (void) bufSize; (void) length; (void) infoLog; - DISPATCH(GetProgramInfoLog, (program, bufSize, length, infoLog), (F, "glGetProgramInfoLog(%d, %d, %p, %p);\n", program, bufSize, (const void *) length, (const void *) infoLog)); -} - -KEYWORD1 void KEYWORD2 NAME(GetProgramiv)(GLuint program, GLenum pname, GLint * params) -{ - (void) program; (void) pname; (void) params; - DISPATCH(GetProgramiv, (program, pname, params), (F, "glGetProgramiv(%d, 0x%x, %p);\n", program, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetShaderInfoLog)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog) -{ - (void) shader; (void) bufSize; (void) length; (void) infoLog; - DISPATCH(GetShaderInfoLog, (shader, bufSize, length, infoLog), (F, "glGetShaderInfoLog(%d, %d, %p, %p);\n", shader, bufSize, (const void *) length, (const void *) infoLog)); -} - -KEYWORD1 void KEYWORD2 NAME(GetShaderiv)(GLuint shader, GLenum pname, GLint * params) -{ - (void) shader; (void) pname; (void) params; - DISPATCH(GetShaderiv, (shader, pname, params), (F, "glGetShaderiv(%d, 0x%x, %p);\n", shader, pname, (const void *) params)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsProgram)(GLuint program) -{ - (void) program; - RETURN_DISPATCH(IsProgram, (program), (F, "glIsProgram(%d);\n", program)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsShader)(GLuint shader) -{ - (void) shader; - RETURN_DISPATCH(IsShader, (shader), (F, "glIsShader(%d);\n", shader)); -} - -KEYWORD1 void KEYWORD2 NAME(StencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask) -{ - (void) face; (void) func; (void) ref; (void) mask; - DISPATCH(StencilFuncSeparate, (face, func, ref, mask), (F, "glStencilFuncSeparate(0x%x, 0x%x, %d, %d);\n", face, func, ref, mask)); -} - -KEYWORD1 void KEYWORD2 NAME(StencilMaskSeparate)(GLenum face, GLuint mask) -{ - (void) face; (void) mask; - DISPATCH(StencilMaskSeparate, (face, mask), (F, "glStencilMaskSeparate(0x%x, %d);\n", face, mask)); -} - -KEYWORD1 void KEYWORD2 NAME(StencilOpSeparate)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass) -{ - (void) face; (void) sfail; (void) zfail; (void) zpass; - DISPATCH(StencilOpSeparate, (face, sfail, zfail, zpass), (F, "glStencilOpSeparate(0x%x, 0x%x, 0x%x, 0x%x);\n", face, sfail, zfail, zpass)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_423)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_423)(GLenum face, GLenum sfail, GLenum zfail, GLenum zpass) -{ - (void) face; (void) sfail; (void) zfail; (void) zpass; - DISPATCH(StencilOpSeparate, (face, sfail, zfail, zpass), (F, "glStencilOpSeparateATI(0x%x, 0x%x, 0x%x, 0x%x);\n", face, sfail, zfail, zpass)); -} - -KEYWORD1 void KEYWORD2 NAME(UniformMatrix2x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) -{ - (void) location; (void) count; (void) transpose; (void) value; - DISPATCH(UniformMatrix2x3fv, (location, count, transpose, value), (F, "glUniformMatrix2x3fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(UniformMatrix2x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) -{ - (void) location; (void) count; (void) transpose; (void) value; - DISPATCH(UniformMatrix2x4fv, (location, count, transpose, value), (F, "glUniformMatrix2x4fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(UniformMatrix3x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) -{ - (void) location; (void) count; (void) transpose; (void) value; - DISPATCH(UniformMatrix3x2fv, (location, count, transpose, value), (F, "glUniformMatrix3x2fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(UniformMatrix3x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) -{ - (void) location; (void) count; (void) transpose; (void) value; - DISPATCH(UniformMatrix3x4fv, (location, count, transpose, value), (F, "glUniformMatrix3x4fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(UniformMatrix4x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) -{ - (void) location; (void) count; (void) transpose; (void) value; - DISPATCH(UniformMatrix4x2fv, (location, count, transpose, value), (F, "glUniformMatrix4x2fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(UniformMatrix4x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) -{ - (void) location; (void) count; (void) transpose; (void) value; - DISPATCH(UniformMatrix4x3fv, (location, count, transpose, value), (F, "glUniformMatrix4x3fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(ClampColor)(GLenum target, GLenum clamp) -{ - (void) target; (void) clamp; - DISPATCH(ClampColor, (target, clamp), (F, "glClampColor(0x%x, 0x%x);\n", target, clamp)); -} - -KEYWORD1 void KEYWORD2 NAME(ClearBufferfi)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) -{ - (void) buffer; (void) drawbuffer; (void) depth; (void) stencil; - DISPATCH(ClearBufferfi, (buffer, drawbuffer, depth, stencil), (F, "glClearBufferfi(0x%x, %d, %f, %d);\n", buffer, drawbuffer, depth, stencil)); -} - -KEYWORD1 void KEYWORD2 NAME(ClearBufferfv)(GLenum buffer, GLint drawbuffer, const GLfloat * value) -{ - (void) buffer; (void) drawbuffer; (void) value; - DISPATCH(ClearBufferfv, (buffer, drawbuffer, value), (F, "glClearBufferfv(0x%x, %d, %p);\n", buffer, drawbuffer, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(ClearBufferiv)(GLenum buffer, GLint drawbuffer, const GLint * value) -{ - (void) buffer; (void) drawbuffer; (void) value; - DISPATCH(ClearBufferiv, (buffer, drawbuffer, value), (F, "glClearBufferiv(0x%x, %d, %p);\n", buffer, drawbuffer, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(ClearBufferuiv)(GLenum buffer, GLint drawbuffer, const GLuint * value) -{ - (void) buffer; (void) drawbuffer; (void) value; - DISPATCH(ClearBufferuiv, (buffer, drawbuffer, value), (F, "glClearBufferuiv(0x%x, %d, %p);\n", buffer, drawbuffer, (const void *) value)); -} - -KEYWORD1 const GLubyte * KEYWORD2 NAME(GetStringi)(GLenum name, GLuint index) -{ - (void) name; (void) index; - RETURN_DISPATCH(GetStringi, (name, index), (F, "glGetStringi(0x%x, %d);\n", name, index)); -} - -KEYWORD1 void KEYWORD2 NAME(TexBuffer)(GLenum target, GLenum internalFormat, GLuint buffer) -{ - (void) target; (void) internalFormat; (void) buffer; - DISPATCH(TexBuffer, (target, internalFormat, buffer), (F, "glTexBuffer(0x%x, 0x%x, %d);\n", target, internalFormat, buffer)); -} - -KEYWORD1 void KEYWORD2 NAME(FramebufferTexture)(GLenum target, GLenum attachment, GLuint texture, GLint level) -{ - (void) target; (void) attachment; (void) texture; (void) level; - DISPATCH(FramebufferTexture, (target, attachment, texture, level), (F, "glFramebufferTexture(0x%x, 0x%x, %d, %d);\n", target, attachment, texture, level)); -} - -KEYWORD1 void KEYWORD2 NAME(GetBufferParameteri64v)(GLenum target, GLenum pname, GLint64 * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetBufferParameteri64v, (target, pname, params), (F, "glGetBufferParameteri64v(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetInteger64i_v)(GLenum cap, GLuint index, GLint64 * data) -{ - (void) cap; (void) index; (void) data; - DISPATCH(GetInteger64i_v, (cap, index, data), (F, "glGetInteger64i_v(0x%x, %d, %p);\n", cap, index, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribDivisor)(GLuint index, GLuint divisor) -{ - (void) index; (void) divisor; - DISPATCH(VertexAttribDivisor, (index, divisor), (F, "glVertexAttribDivisor(%d, %d);\n", index, divisor)); -} - -KEYWORD1 void KEYWORD2 NAME(LoadTransposeMatrixd)(const GLdouble * m) -{ - (void) m; - DISPATCH(LoadTransposeMatrixdARB, (m), (F, "glLoadTransposeMatrixd(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(LoadTransposeMatrixdARB)(const GLdouble * m) -{ - (void) m; - DISPATCH(LoadTransposeMatrixdARB, (m), (F, "glLoadTransposeMatrixdARB(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(LoadTransposeMatrixf)(const GLfloat * m) -{ - (void) m; - DISPATCH(LoadTransposeMatrixfARB, (m), (F, "glLoadTransposeMatrixf(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(LoadTransposeMatrixfARB)(const GLfloat * m) -{ - (void) m; - DISPATCH(LoadTransposeMatrixfARB, (m), (F, "glLoadTransposeMatrixfARB(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(MultTransposeMatrixd)(const GLdouble * m) -{ - (void) m; - DISPATCH(MultTransposeMatrixdARB, (m), (F, "glMultTransposeMatrixd(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(MultTransposeMatrixdARB)(const GLdouble * m) -{ - (void) m; - DISPATCH(MultTransposeMatrixdARB, (m), (F, "glMultTransposeMatrixdARB(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(MultTransposeMatrixf)(const GLfloat * m) -{ - (void) m; - DISPATCH(MultTransposeMatrixfARB, (m), (F, "glMultTransposeMatrixf(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(MultTransposeMatrixfARB)(const GLfloat * m) -{ - (void) m; - DISPATCH(MultTransposeMatrixfARB, (m), (F, "glMultTransposeMatrixfARB(%p);\n", (const void *) m)); -} - -KEYWORD1 void KEYWORD2 NAME(SampleCoverage)(GLclampf value, GLboolean invert) -{ - (void) value; (void) invert; - DISPATCH(SampleCoverageARB, (value, invert), (F, "glSampleCoverage(%f, %d);\n", value, invert)); -} - -KEYWORD1 void KEYWORD2 NAME(SampleCoverageARB)(GLclampf value, GLboolean invert) -{ - (void) value; (void) invert; - DISPATCH(SampleCoverageARB, (value, invert), (F, "glSampleCoverageARB(%f, %d);\n", value, invert)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexImage1D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data) -{ - (void) target; (void) level; (void) internalformat; (void) width; (void) border; (void) imageSize; (void) data; - DISPATCH(CompressedTexImage1DARB, (target, level, internalformat, width, border, imageSize, data), (F, "glCompressedTexImage1D(0x%x, %d, 0x%x, %d, %d, %d, %p);\n", target, level, internalformat, width, border, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data) -{ - (void) target; (void) level; (void) internalformat; (void) width; (void) border; (void) imageSize; (void) data; - DISPATCH(CompressedTexImage1DARB, (target, level, internalformat, width, border, imageSize, data), (F, "glCompressedTexImage1DARB(0x%x, %d, 0x%x, %d, %d, %d, %p);\n", target, level, internalformat, width, border, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data) -{ - (void) target; (void) level; (void) internalformat; (void) width; (void) height; (void) border; (void) imageSize; (void) data; - DISPATCH(CompressedTexImage2DARB, (target, level, internalformat, width, height, border, imageSize, data), (F, "glCompressedTexImage2D(0x%x, %d, 0x%x, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, border, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data) -{ - (void) target; (void) level; (void) internalformat; (void) width; (void) height; (void) border; (void) imageSize; (void) data; - DISPATCH(CompressedTexImage2DARB, (target, level, internalformat, width, height, border, imageSize, data), (F, "glCompressedTexImage2DARB(0x%x, %d, 0x%x, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, border, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexImage3D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data) -{ - (void) target; (void) level; (void) internalformat; (void) width; (void) height; (void) depth; (void) border; (void) imageSize; (void) data; - DISPATCH(CompressedTexImage3DARB, (target, level, internalformat, width, height, depth, border, imageSize, data), (F, "glCompressedTexImage3D(0x%x, %d, 0x%x, %d, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, depth, border, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data) -{ - (void) target; (void) level; (void) internalformat; (void) width; (void) height; (void) depth; (void) border; (void) imageSize; (void) data; - DISPATCH(CompressedTexImage3DARB, (target, level, internalformat, width, height, depth, border, imageSize, data), (F, "glCompressedTexImage3DARB(0x%x, %d, 0x%x, %d, %d, %d, %d, %d, %p);\n", target, level, internalformat, width, height, depth, border, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage1D)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data) -{ - (void) target; (void) level; (void) xoffset; (void) width; (void) format; (void) imageSize; (void) data; - DISPATCH(CompressedTexSubImage1DARB, (target, level, xoffset, width, format, imageSize, data), (F, "glCompressedTexSubImage1D(0x%x, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, width, format, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data) -{ - (void) target; (void) level; (void) xoffset; (void) width; (void) format; (void) imageSize; (void) data; - DISPATCH(CompressedTexSubImage1DARB, (target, level, xoffset, width, format, imageSize, data), (F, "glCompressedTexSubImage1DARB(0x%x, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, width, format, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data) -{ - (void) target; (void) level; (void) xoffset; (void) yoffset; (void) width; (void) height; (void) format; (void) imageSize; (void) data; - DISPATCH(CompressedTexSubImage2DARB, (target, level, xoffset, yoffset, width, height, format, imageSize, data), (F, "glCompressedTexSubImage2D(0x%x, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, width, height, format, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data) -{ - (void) target; (void) level; (void) xoffset; (void) yoffset; (void) width; (void) height; (void) format; (void) imageSize; (void) data; - DISPATCH(CompressedTexSubImage2DARB, (target, level, xoffset, yoffset, width, height, format, imageSize, data), (F, "glCompressedTexSubImage2DARB(0x%x, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, width, height, format, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data) -{ - (void) target; (void) level; (void) xoffset; (void) yoffset; (void) zoffset; (void) width; (void) height; (void) depth; (void) format; (void) imageSize; (void) data; - DISPATCH(CompressedTexSubImage3DARB, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), (F, "glCompressedTexSubImage3D(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data) -{ - (void) target; (void) level; (void) xoffset; (void) yoffset; (void) zoffset; (void) width; (void) height; (void) depth; (void) format; (void) imageSize; (void) data; - DISPATCH(CompressedTexSubImage3DARB, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), (F, "glCompressedTexSubImage3DARB(0x%x, %d, %d, %d, %d, %d, %d, %d, 0x%x, %d, %p);\n", target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(GetCompressedTexImage)(GLenum target, GLint level, GLvoid * img) -{ - (void) target; (void) level; (void) img; - DISPATCH(GetCompressedTexImageARB, (target, level, img), (F, "glGetCompressedTexImage(0x%x, %d, %p);\n", target, level, (const void *) img)); -} - -KEYWORD1 void KEYWORD2 NAME(GetCompressedTexImageARB)(GLenum target, GLint level, GLvoid * img) -{ - (void) target; (void) level; (void) img; - DISPATCH(GetCompressedTexImageARB, (target, level, img), (F, "glGetCompressedTexImageARB(0x%x, %d, %p);\n", target, level, (const void *) img)); -} - -KEYWORD1 void KEYWORD2 NAME(DisableVertexAttribArray)(GLuint index) -{ - (void) index; - DISPATCH(DisableVertexAttribArrayARB, (index), (F, "glDisableVertexAttribArray(%d);\n", index)); -} - -KEYWORD1 void KEYWORD2 NAME(DisableVertexAttribArrayARB)(GLuint index) -{ - (void) index; - DISPATCH(DisableVertexAttribArrayARB, (index), (F, "glDisableVertexAttribArrayARB(%d);\n", index)); -} - -KEYWORD1 void KEYWORD2 NAME(EnableVertexAttribArray)(GLuint index) -{ - (void) index; - DISPATCH(EnableVertexAttribArrayARB, (index), (F, "glEnableVertexAttribArray(%d);\n", index)); -} - -KEYWORD1 void KEYWORD2 NAME(EnableVertexAttribArrayARB)(GLuint index) -{ - (void) index; - DISPATCH(EnableVertexAttribArrayARB, (index), (F, "glEnableVertexAttribArrayARB(%d);\n", index)); -} - -KEYWORD1 void KEYWORD2 NAME(GetProgramEnvParameterdvARB)(GLenum target, GLuint index, GLdouble * params) -{ - (void) target; (void) index; (void) params; - DISPATCH(GetProgramEnvParameterdvARB, (target, index, params), (F, "glGetProgramEnvParameterdvARB(0x%x, %d, %p);\n", target, index, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetProgramEnvParameterfvARB)(GLenum target, GLuint index, GLfloat * params) -{ - (void) target; (void) index; (void) params; - DISPATCH(GetProgramEnvParameterfvARB, (target, index, params), (F, "glGetProgramEnvParameterfvARB(0x%x, %d, %p);\n", target, index, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetProgramLocalParameterdvARB)(GLenum target, GLuint index, GLdouble * params) -{ - (void) target; (void) index; (void) params; - DISPATCH(GetProgramLocalParameterdvARB, (target, index, params), (F, "glGetProgramLocalParameterdvARB(0x%x, %d, %p);\n", target, index, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetProgramLocalParameterfvARB)(GLenum target, GLuint index, GLfloat * params) -{ - (void) target; (void) index; (void) params; - DISPATCH(GetProgramLocalParameterfvARB, (target, index, params), (F, "glGetProgramLocalParameterfvARB(0x%x, %d, %p);\n", target, index, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetProgramStringARB)(GLenum target, GLenum pname, GLvoid * string) -{ - (void) target; (void) pname; (void) string; - DISPATCH(GetProgramStringARB, (target, pname, string), (F, "glGetProgramStringARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) string)); -} - -KEYWORD1 void KEYWORD2 NAME(GetProgramivARB)(GLenum target, GLenum pname, GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetProgramivARB, (target, pname, params), (F, "glGetProgramivARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribdv)(GLuint index, GLenum pname, GLdouble * params) -{ - (void) index; (void) pname; (void) params; - DISPATCH(GetVertexAttribdvARB, (index, pname, params), (F, "glGetVertexAttribdv(%d, 0x%x, %p);\n", index, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribdvARB)(GLuint index, GLenum pname, GLdouble * params) -{ - (void) index; (void) pname; (void) params; - DISPATCH(GetVertexAttribdvARB, (index, pname, params), (F, "glGetVertexAttribdvARB(%d, 0x%x, %p);\n", index, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribfv)(GLuint index, GLenum pname, GLfloat * params) -{ - (void) index; (void) pname; (void) params; - DISPATCH(GetVertexAttribfvARB, (index, pname, params), (F, "glGetVertexAttribfv(%d, 0x%x, %p);\n", index, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribfvARB)(GLuint index, GLenum pname, GLfloat * params) -{ - (void) index; (void) pname; (void) params; - DISPATCH(GetVertexAttribfvARB, (index, pname, params), (F, "glGetVertexAttribfvARB(%d, 0x%x, %p);\n", index, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribiv)(GLuint index, GLenum pname, GLint * params) -{ - (void) index; (void) pname; (void) params; - DISPATCH(GetVertexAttribivARB, (index, pname, params), (F, "glGetVertexAttribiv(%d, 0x%x, %p);\n", index, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribivARB)(GLuint index, GLenum pname, GLint * params) -{ - (void) index; (void) pname; (void) params; - DISPATCH(GetVertexAttribivARB, (index, pname, params), (F, "glGetVertexAttribivARB(%d, 0x%x, %p);\n", index, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramEnvParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - (void) target; (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(ProgramEnvParameter4dARB, (target, index, x, y, z, w), (F, "glProgramEnvParameter4dARB(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramParameter4dNV)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - (void) target; (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(ProgramEnvParameter4dARB, (target, index, x, y, z, w), (F, "glProgramParameter4dNV(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramEnvParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params) -{ - (void) target; (void) index; (void) params; - DISPATCH(ProgramEnvParameter4dvARB, (target, index, params), (F, "glProgramEnvParameter4dvARB(0x%x, %d, %p);\n", target, index, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramParameter4dvNV)(GLenum target, GLuint index, const GLdouble * params) -{ - (void) target; (void) index; (void) params; - DISPATCH(ProgramEnvParameter4dvARB, (target, index, params), (F, "glProgramParameter4dvNV(0x%x, %d, %p);\n", target, index, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramEnvParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - (void) target; (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(ProgramEnvParameter4fARB, (target, index, x, y, z, w), (F, "glProgramEnvParameter4fARB(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramParameter4fNV)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - (void) target; (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(ProgramEnvParameter4fARB, (target, index, x, y, z, w), (F, "glProgramParameter4fNV(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramEnvParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params) -{ - (void) target; (void) index; (void) params; - DISPATCH(ProgramEnvParameter4fvARB, (target, index, params), (F, "glProgramEnvParameter4fvARB(0x%x, %d, %p);\n", target, index, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramParameter4fvNV)(GLenum target, GLuint index, const GLfloat * params) -{ - (void) target; (void) index; (void) params; - DISPATCH(ProgramEnvParameter4fvARB, (target, index, params), (F, "glProgramParameter4fvNV(0x%x, %d, %p);\n", target, index, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramLocalParameter4dARB)(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - (void) target; (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(ProgramLocalParameter4dARB, (target, index, x, y, z, w), (F, "glProgramLocalParameter4dARB(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramLocalParameter4dvARB)(GLenum target, GLuint index, const GLdouble * params) -{ - (void) target; (void) index; (void) params; - DISPATCH(ProgramLocalParameter4dvARB, (target, index, params), (F, "glProgramLocalParameter4dvARB(0x%x, %d, %p);\n", target, index, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramLocalParameter4fARB)(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - (void) target; (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(ProgramLocalParameter4fARB, (target, index, x, y, z, w), (F, "glProgramLocalParameter4fARB(0x%x, %d, %f, %f, %f, %f);\n", target, index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramLocalParameter4fvARB)(GLenum target, GLuint index, const GLfloat * params) -{ - (void) target; (void) index; (void) params; - DISPATCH(ProgramLocalParameter4fvARB, (target, index, params), (F, "glProgramLocalParameter4fvARB(0x%x, %d, %p);\n", target, index, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramStringARB)(GLenum target, GLenum format, GLsizei len, const GLvoid * string) -{ - (void) target; (void) format; (void) len; (void) string; - DISPATCH(ProgramStringARB, (target, format, len, string), (F, "glProgramStringARB(0x%x, 0x%x, %d, %p);\n", target, format, len, (const void *) string)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1d)(GLuint index, GLdouble x) -{ - (void) index; (void) x; - DISPATCH(VertexAttrib1dARB, (index, x), (F, "glVertexAttrib1d(%d, %f);\n", index, x)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1dARB)(GLuint index, GLdouble x) -{ - (void) index; (void) x; - DISPATCH(VertexAttrib1dARB, (index, x), (F, "glVertexAttrib1dARB(%d, %f);\n", index, x)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1dv)(GLuint index, const GLdouble * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib1dvARB, (index, v), (F, "glVertexAttrib1dv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1dvARB)(GLuint index, const GLdouble * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib1dvARB, (index, v), (F, "glVertexAttrib1dvARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1f)(GLuint index, GLfloat x) -{ - (void) index; (void) x; - DISPATCH(VertexAttrib1fARB, (index, x), (F, "glVertexAttrib1f(%d, %f);\n", index, x)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1fARB)(GLuint index, GLfloat x) -{ - (void) index; (void) x; - DISPATCH(VertexAttrib1fARB, (index, x), (F, "glVertexAttrib1fARB(%d, %f);\n", index, x)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1fv)(GLuint index, const GLfloat * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib1fvARB, (index, v), (F, "glVertexAttrib1fv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1fvARB)(GLuint index, const GLfloat * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib1fvARB, (index, v), (F, "glVertexAttrib1fvARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1s)(GLuint index, GLshort x) -{ - (void) index; (void) x; - DISPATCH(VertexAttrib1sARB, (index, x), (F, "glVertexAttrib1s(%d, %d);\n", index, x)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1sARB)(GLuint index, GLshort x) -{ - (void) index; (void) x; - DISPATCH(VertexAttrib1sARB, (index, x), (F, "glVertexAttrib1sARB(%d, %d);\n", index, x)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1sv)(GLuint index, const GLshort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib1svARB, (index, v), (F, "glVertexAttrib1sv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1svARB)(GLuint index, const GLshort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib1svARB, (index, v), (F, "glVertexAttrib1svARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2d)(GLuint index, GLdouble x, GLdouble y) -{ - (void) index; (void) x; (void) y; - DISPATCH(VertexAttrib2dARB, (index, x, y), (F, "glVertexAttrib2d(%d, %f, %f);\n", index, x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2dARB)(GLuint index, GLdouble x, GLdouble y) -{ - (void) index; (void) x; (void) y; - DISPATCH(VertexAttrib2dARB, (index, x, y), (F, "glVertexAttrib2dARB(%d, %f, %f);\n", index, x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2dv)(GLuint index, const GLdouble * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib2dvARB, (index, v), (F, "glVertexAttrib2dv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2dvARB)(GLuint index, const GLdouble * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib2dvARB, (index, v), (F, "glVertexAttrib2dvARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2f)(GLuint index, GLfloat x, GLfloat y) -{ - (void) index; (void) x; (void) y; - DISPATCH(VertexAttrib2fARB, (index, x, y), (F, "glVertexAttrib2f(%d, %f, %f);\n", index, x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fARB)(GLuint index, GLfloat x, GLfloat y) -{ - (void) index; (void) x; (void) y; - DISPATCH(VertexAttrib2fARB, (index, x, y), (F, "glVertexAttrib2fARB(%d, %f, %f);\n", index, x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fv)(GLuint index, const GLfloat * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib2fvARB, (index, v), (F, "glVertexAttrib2fv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fvARB)(GLuint index, const GLfloat * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib2fvARB, (index, v), (F, "glVertexAttrib2fvARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2s)(GLuint index, GLshort x, GLshort y) -{ - (void) index; (void) x; (void) y; - DISPATCH(VertexAttrib2sARB, (index, x, y), (F, "glVertexAttrib2s(%d, %d, %d);\n", index, x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2sARB)(GLuint index, GLshort x, GLshort y) -{ - (void) index; (void) x; (void) y; - DISPATCH(VertexAttrib2sARB, (index, x, y), (F, "glVertexAttrib2sARB(%d, %d, %d);\n", index, x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2sv)(GLuint index, const GLshort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib2svARB, (index, v), (F, "glVertexAttrib2sv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2svARB)(GLuint index, const GLshort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib2svARB, (index, v), (F, "glVertexAttrib2svARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3d)(GLuint index, GLdouble x, GLdouble y, GLdouble z) -{ - (void) index; (void) x; (void) y; (void) z; - DISPATCH(VertexAttrib3dARB, (index, x, y, z), (F, "glVertexAttrib3d(%d, %f, %f, %f);\n", index, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z) -{ - (void) index; (void) x; (void) y; (void) z; - DISPATCH(VertexAttrib3dARB, (index, x, y, z), (F, "glVertexAttrib3dARB(%d, %f, %f, %f);\n", index, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3dv)(GLuint index, const GLdouble * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib3dvARB, (index, v), (F, "glVertexAttrib3dv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3dvARB)(GLuint index, const GLdouble * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib3dvARB, (index, v), (F, "glVertexAttrib3dvARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3f)(GLuint index, GLfloat x, GLfloat y, GLfloat z) -{ - (void) index; (void) x; (void) y; (void) z; - DISPATCH(VertexAttrib3fARB, (index, x, y, z), (F, "glVertexAttrib3f(%d, %f, %f, %f);\n", index, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z) -{ - (void) index; (void) x; (void) y; (void) z; - DISPATCH(VertexAttrib3fARB, (index, x, y, z), (F, "glVertexAttrib3fARB(%d, %f, %f, %f);\n", index, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fv)(GLuint index, const GLfloat * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib3fvARB, (index, v), (F, "glVertexAttrib3fv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fvARB)(GLuint index, const GLfloat * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib3fvARB, (index, v), (F, "glVertexAttrib3fvARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3s)(GLuint index, GLshort x, GLshort y, GLshort z) -{ - (void) index; (void) x; (void) y; (void) z; - DISPATCH(VertexAttrib3sARB, (index, x, y, z), (F, "glVertexAttrib3s(%d, %d, %d, %d);\n", index, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3sARB)(GLuint index, GLshort x, GLshort y, GLshort z) -{ - (void) index; (void) x; (void) y; (void) z; - DISPATCH(VertexAttrib3sARB, (index, x, y, z), (F, "glVertexAttrib3sARB(%d, %d, %d, %d);\n", index, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3sv)(GLuint index, const GLshort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib3svARB, (index, v), (F, "glVertexAttrib3sv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3svARB)(GLuint index, const GLshort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib3svARB, (index, v), (F, "glVertexAttrib3svARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Nbv)(GLuint index, const GLbyte * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4NbvARB, (index, v), (F, "glVertexAttrib4Nbv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NbvARB)(GLuint index, const GLbyte * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4NbvARB, (index, v), (F, "glVertexAttrib4NbvARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Niv)(GLuint index, const GLint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4NivARB, (index, v), (F, "glVertexAttrib4Niv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NivARB)(GLuint index, const GLint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4NivARB, (index, v), (F, "glVertexAttrib4NivARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Nsv)(GLuint index, const GLshort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4NsvARB, (index, v), (F, "glVertexAttrib4Nsv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NsvARB)(GLuint index, const GLshort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4NsvARB, (index, v), (F, "glVertexAttrib4NsvARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Nub)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) -{ - (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(VertexAttrib4NubARB, (index, x, y, z, w), (F, "glVertexAttrib4Nub(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NubARB)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) -{ - (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(VertexAttrib4NubARB, (index, x, y, z, w), (F, "glVertexAttrib4NubARB(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Nubv)(GLuint index, const GLubyte * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4NubvARB, (index, v), (F, "glVertexAttrib4Nubv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NubvARB)(GLuint index, const GLubyte * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4NubvARB, (index, v), (F, "glVertexAttrib4NubvARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Nuiv)(GLuint index, const GLuint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4NuivARB, (index, v), (F, "glVertexAttrib4Nuiv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NuivARB)(GLuint index, const GLuint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4NuivARB, (index, v), (F, "glVertexAttrib4NuivARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4Nusv)(GLuint index, const GLushort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4NusvARB, (index, v), (F, "glVertexAttrib4Nusv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NusvARB)(GLuint index, const GLushort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4NusvARB, (index, v), (F, "glVertexAttrib4NusvARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4bv)(GLuint index, const GLbyte * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4bvARB, (index, v), (F, "glVertexAttrib4bv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4bvARB)(GLuint index, const GLbyte * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4bvARB, (index, v), (F, "glVertexAttrib4bvARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4d)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(VertexAttrib4dARB, (index, x, y, z, w), (F, "glVertexAttrib4d(%d, %f, %f, %f, %f);\n", index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4dARB)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(VertexAttrib4dARB, (index, x, y, z, w), (F, "glVertexAttrib4dARB(%d, %f, %f, %f, %f);\n", index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4dv)(GLuint index, const GLdouble * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4dvARB, (index, v), (F, "glVertexAttrib4dv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4dvARB)(GLuint index, const GLdouble * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4dvARB, (index, v), (F, "glVertexAttrib4dvARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4f)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(VertexAttrib4fARB, (index, x, y, z, w), (F, "glVertexAttrib4f(%d, %f, %f, %f, %f);\n", index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fARB)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(VertexAttrib4fARB, (index, x, y, z, w), (F, "glVertexAttrib4fARB(%d, %f, %f, %f, %f);\n", index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fv)(GLuint index, const GLfloat * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4fvARB, (index, v), (F, "glVertexAttrib4fv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fvARB)(GLuint index, const GLfloat * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4fvARB, (index, v), (F, "glVertexAttrib4fvARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4iv)(GLuint index, const GLint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4ivARB, (index, v), (F, "glVertexAttrib4iv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ivARB)(GLuint index, const GLint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4ivARB, (index, v), (F, "glVertexAttrib4ivARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4s)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) -{ - (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(VertexAttrib4sARB, (index, x, y, z, w), (F, "glVertexAttrib4s(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4sARB)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) -{ - (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(VertexAttrib4sARB, (index, x, y, z, w), (F, "glVertexAttrib4sARB(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4sv)(GLuint index, const GLshort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4svARB, (index, v), (F, "glVertexAttrib4sv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4svARB)(GLuint index, const GLshort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4svARB, (index, v), (F, "glVertexAttrib4svARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ubv)(GLuint index, const GLubyte * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4ubvARB, (index, v), (F, "glVertexAttrib4ubv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ubvARB)(GLuint index, const GLubyte * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4ubvARB, (index, v), (F, "glVertexAttrib4ubvARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4uiv)(GLuint index, const GLuint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4uivARB, (index, v), (F, "glVertexAttrib4uiv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4uivARB)(GLuint index, const GLuint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4uivARB, (index, v), (F, "glVertexAttrib4uivARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4usv)(GLuint index, const GLushort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4usvARB, (index, v), (F, "glVertexAttrib4usv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4usvARB)(GLuint index, const GLushort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4usvARB, (index, v), (F, "glVertexAttrib4usvARB(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribPointer)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer) -{ - (void) index; (void) size; (void) type; (void) normalized; (void) stride; (void) pointer; - DISPATCH(VertexAttribPointerARB, (index, size, type, normalized, stride, pointer), (F, "glVertexAttribPointer(%d, %d, 0x%x, %d, %d, %p);\n", index, size, type, normalized, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribPointerARB)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer) -{ - (void) index; (void) size; (void) type; (void) normalized; (void) stride; (void) pointer; - DISPATCH(VertexAttribPointerARB, (index, size, type, normalized, stride, pointer), (F, "glVertexAttribPointerARB(%d, %d, 0x%x, %d, %d, %p);\n", index, size, type, normalized, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(BindBuffer)(GLenum target, GLuint buffer) -{ - (void) target; (void) buffer; - DISPATCH(BindBufferARB, (target, buffer), (F, "glBindBuffer(0x%x, %d);\n", target, buffer)); -} - -KEYWORD1 void KEYWORD2 NAME(BindBufferARB)(GLenum target, GLuint buffer) -{ - (void) target; (void) buffer; - DISPATCH(BindBufferARB, (target, buffer), (F, "glBindBufferARB(0x%x, %d);\n", target, buffer)); -} - -KEYWORD1 void KEYWORD2 NAME(BufferData)(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage) -{ - (void) target; (void) size; (void) data; (void) usage; - DISPATCH(BufferDataARB, (target, size, data, usage), (F, "glBufferData(0x%x, %d, %p, 0x%x);\n", target, size, (const void *) data, usage)); -} - -KEYWORD1 void KEYWORD2 NAME(BufferDataARB)(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage) -{ - (void) target; (void) size; (void) data; (void) usage; - DISPATCH(BufferDataARB, (target, size, data, usage), (F, "glBufferDataARB(0x%x, %d, %p, 0x%x);\n", target, size, (const void *) data, usage)); -} - -KEYWORD1 void KEYWORD2 NAME(BufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data) -{ - (void) target; (void) offset; (void) size; (void) data; - DISPATCH(BufferSubDataARB, (target, offset, size, data), (F, "glBufferSubData(0x%x, %d, %d, %p);\n", target, offset, size, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(BufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data) -{ - (void) target; (void) offset; (void) size; (void) data; - DISPATCH(BufferSubDataARB, (target, offset, size, data), (F, "glBufferSubDataARB(0x%x, %d, %d, %p);\n", target, offset, size, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteBuffers)(GLsizei n, const GLuint * buffer) -{ - (void) n; (void) buffer; - DISPATCH(DeleteBuffersARB, (n, buffer), (F, "glDeleteBuffers(%d, %p);\n", n, (const void *) buffer)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteBuffersARB)(GLsizei n, const GLuint * buffer) -{ - (void) n; (void) buffer; - DISPATCH(DeleteBuffersARB, (n, buffer), (F, "glDeleteBuffersARB(%d, %p);\n", n, (const void *) buffer)); -} - -KEYWORD1 void KEYWORD2 NAME(GenBuffers)(GLsizei n, GLuint * buffer) -{ - (void) n; (void) buffer; - DISPATCH(GenBuffersARB, (n, buffer), (F, "glGenBuffers(%d, %p);\n", n, (const void *) buffer)); -} - -KEYWORD1 void KEYWORD2 NAME(GenBuffersARB)(GLsizei n, GLuint * buffer) -{ - (void) n; (void) buffer; - DISPATCH(GenBuffersARB, (n, buffer), (F, "glGenBuffersARB(%d, %p);\n", n, (const void *) buffer)); -} - -KEYWORD1 void KEYWORD2 NAME(GetBufferParameteriv)(GLenum target, GLenum pname, GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetBufferParameterivARB, (target, pname, params), (F, "glGetBufferParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetBufferParameterivARB)(GLenum target, GLenum pname, GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetBufferParameterivARB, (target, pname, params), (F, "glGetBufferParameterivARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetBufferPointerv)(GLenum target, GLenum pname, GLvoid ** params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetBufferPointervARB, (target, pname, params), (F, "glGetBufferPointerv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetBufferPointervARB)(GLenum target, GLenum pname, GLvoid ** params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetBufferPointervARB, (target, pname, params), (F, "glGetBufferPointervARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid * data) -{ - (void) target; (void) offset; (void) size; (void) data; - DISPATCH(GetBufferSubDataARB, (target, offset, size, data), (F, "glGetBufferSubData(0x%x, %d, %d, %p);\n", target, offset, size, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(GetBufferSubDataARB)(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data) -{ - (void) target; (void) offset; (void) size; (void) data; - DISPATCH(GetBufferSubDataARB, (target, offset, size, data), (F, "glGetBufferSubDataARB(0x%x, %d, %d, %p);\n", target, offset, size, (const void *) data)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsBuffer)(GLuint buffer) -{ - (void) buffer; - RETURN_DISPATCH(IsBufferARB, (buffer), (F, "glIsBuffer(%d);\n", buffer)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsBufferARB)(GLuint buffer) -{ - (void) buffer; - RETURN_DISPATCH(IsBufferARB, (buffer), (F, "glIsBufferARB(%d);\n", buffer)); -} - -KEYWORD1 GLvoid * KEYWORD2 NAME(MapBuffer)(GLenum target, GLenum access) -{ - (void) target; (void) access; - RETURN_DISPATCH(MapBufferARB, (target, access), (F, "glMapBuffer(0x%x, 0x%x);\n", target, access)); -} - -KEYWORD1 GLvoid * KEYWORD2 NAME(MapBufferARB)(GLenum target, GLenum access) -{ - (void) target; (void) access; - RETURN_DISPATCH(MapBufferARB, (target, access), (F, "glMapBufferARB(0x%x, 0x%x);\n", target, access)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(UnmapBuffer)(GLenum target) -{ - (void) target; - RETURN_DISPATCH(UnmapBufferARB, (target), (F, "glUnmapBuffer(0x%x);\n", target)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(UnmapBufferARB)(GLenum target) -{ - (void) target; - RETURN_DISPATCH(UnmapBufferARB, (target), (F, "glUnmapBufferARB(0x%x);\n", target)); -} - -KEYWORD1 void KEYWORD2 NAME(BeginQuery)(GLenum target, GLuint id) -{ - (void) target; (void) id; - DISPATCH(BeginQueryARB, (target, id), (F, "glBeginQuery(0x%x, %d);\n", target, id)); -} - -KEYWORD1 void KEYWORD2 NAME(BeginQueryARB)(GLenum target, GLuint id) -{ - (void) target; (void) id; - DISPATCH(BeginQueryARB, (target, id), (F, "glBeginQueryARB(0x%x, %d);\n", target, id)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteQueries)(GLsizei n, const GLuint * ids) -{ - (void) n; (void) ids; - DISPATCH(DeleteQueriesARB, (n, ids), (F, "glDeleteQueries(%d, %p);\n", n, (const void *) ids)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteQueriesARB)(GLsizei n, const GLuint * ids) -{ - (void) n; (void) ids; - DISPATCH(DeleteQueriesARB, (n, ids), (F, "glDeleteQueriesARB(%d, %p);\n", n, (const void *) ids)); -} - -KEYWORD1 void KEYWORD2 NAME(EndQuery)(GLenum target) -{ - (void) target; - DISPATCH(EndQueryARB, (target), (F, "glEndQuery(0x%x);\n", target)); -} - -KEYWORD1 void KEYWORD2 NAME(EndQueryARB)(GLenum target) -{ - (void) target; - DISPATCH(EndQueryARB, (target), (F, "glEndQueryARB(0x%x);\n", target)); -} - -KEYWORD1 void KEYWORD2 NAME(GenQueries)(GLsizei n, GLuint * ids) -{ - (void) n; (void) ids; - DISPATCH(GenQueriesARB, (n, ids), (F, "glGenQueries(%d, %p);\n", n, (const void *) ids)); -} - -KEYWORD1 void KEYWORD2 NAME(GenQueriesARB)(GLsizei n, GLuint * ids) -{ - (void) n; (void) ids; - DISPATCH(GenQueriesARB, (n, ids), (F, "glGenQueriesARB(%d, %p);\n", n, (const void *) ids)); -} - -KEYWORD1 void KEYWORD2 NAME(GetQueryObjectiv)(GLuint id, GLenum pname, GLint * params) -{ - (void) id; (void) pname; (void) params; - DISPATCH(GetQueryObjectivARB, (id, pname, params), (F, "glGetQueryObjectiv(%d, 0x%x, %p);\n", id, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetQueryObjectivARB)(GLuint id, GLenum pname, GLint * params) -{ - (void) id; (void) pname; (void) params; - DISPATCH(GetQueryObjectivARB, (id, pname, params), (F, "glGetQueryObjectivARB(%d, 0x%x, %p);\n", id, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetQueryObjectuiv)(GLuint id, GLenum pname, GLuint * params) -{ - (void) id; (void) pname; (void) params; - DISPATCH(GetQueryObjectuivARB, (id, pname, params), (F, "glGetQueryObjectuiv(%d, 0x%x, %p);\n", id, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetQueryObjectuivARB)(GLuint id, GLenum pname, GLuint * params) -{ - (void) id; (void) pname; (void) params; - DISPATCH(GetQueryObjectuivARB, (id, pname, params), (F, "glGetQueryObjectuivARB(%d, 0x%x, %p);\n", id, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetQueryiv)(GLenum target, GLenum pname, GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetQueryivARB, (target, pname, params), (F, "glGetQueryiv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetQueryivARB)(GLenum target, GLenum pname, GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetQueryivARB, (target, pname, params), (F, "glGetQueryivARB(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsQuery)(GLuint id) -{ - (void) id; - RETURN_DISPATCH(IsQueryARB, (id), (F, "glIsQuery(%d);\n", id)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsQueryARB)(GLuint id) -{ - (void) id; - RETURN_DISPATCH(IsQueryARB, (id), (F, "glIsQueryARB(%d);\n", id)); -} - -KEYWORD1 void KEYWORD2 NAME(AttachObjectARB)(GLhandleARB containerObj, GLhandleARB obj) -{ - (void) containerObj; (void) obj; - DISPATCH(AttachObjectARB, (containerObj, obj), (F, "glAttachObjectARB(%d, %d);\n", containerObj, obj)); -} - -KEYWORD1 void KEYWORD2 NAME(CompileShader)(GLuint shader) -{ - (void) shader; - DISPATCH(CompileShaderARB, (shader), (F, "glCompileShader(%d);\n", shader)); -} - -KEYWORD1 void KEYWORD2 NAME(CompileShaderARB)(GLhandleARB shader) -{ - (void) shader; - DISPATCH(CompileShaderARB, (shader), (F, "glCompileShaderARB(%d);\n", shader)); -} - -KEYWORD1 GLhandleARB KEYWORD2 NAME(CreateProgramObjectARB)(void) -{ - RETURN_DISPATCH(CreateProgramObjectARB, (), (F, "glCreateProgramObjectARB();\n")); -} - -KEYWORD1 GLhandleARB KEYWORD2 NAME(CreateShaderObjectARB)(GLenum shaderType) -{ - (void) shaderType; - RETURN_DISPATCH(CreateShaderObjectARB, (shaderType), (F, "glCreateShaderObjectARB(0x%x);\n", shaderType)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteObjectARB)(GLhandleARB obj) -{ - (void) obj; - DISPATCH(DeleteObjectARB, (obj), (F, "glDeleteObjectARB(%d);\n", obj)); -} - -KEYWORD1 void KEYWORD2 NAME(DetachObjectARB)(GLhandleARB containerObj, GLhandleARB attachedObj) -{ - (void) containerObj; (void) attachedObj; - DISPATCH(DetachObjectARB, (containerObj, attachedObj), (F, "glDetachObjectARB(%d, %d);\n", containerObj, attachedObj)); -} - -KEYWORD1 void KEYWORD2 NAME(GetActiveUniform)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name) -{ - (void) program; (void) index; (void) bufSize; (void) length; (void) size; (void) type; (void) name; - DISPATCH(GetActiveUniformARB, (program, index, bufSize, length, size, type, name), (F, "glGetActiveUniform(%d, %d, %d, %p, %p, %p, %p);\n", program, index, bufSize, (const void *) length, (const void *) size, (const void *) type, (const void *) name)); -} - -KEYWORD1 void KEYWORD2 NAME(GetActiveUniformARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name) -{ - (void) program; (void) index; (void) bufSize; (void) length; (void) size; (void) type; (void) name; - DISPATCH(GetActiveUniformARB, (program, index, bufSize, length, size, type, name), (F, "glGetActiveUniformARB(%d, %d, %d, %p, %p, %p, %p);\n", program, index, bufSize, (const void *) length, (const void *) size, (const void *) type, (const void *) name)); -} - -KEYWORD1 void KEYWORD2 NAME(GetAttachedObjectsARB)(GLhandleARB containerObj, GLsizei maxLength, GLsizei * length, GLhandleARB * infoLog) -{ - (void) containerObj; (void) maxLength; (void) length; (void) infoLog; - DISPATCH(GetAttachedObjectsARB, (containerObj, maxLength, length, infoLog), (F, "glGetAttachedObjectsARB(%d, %d, %p, %p);\n", containerObj, maxLength, (const void *) length, (const void *) infoLog)); -} - -KEYWORD1 GLhandleARB KEYWORD2 NAME(GetHandleARB)(GLenum pname) -{ - (void) pname; - RETURN_DISPATCH(GetHandleARB, (pname), (F, "glGetHandleARB(0x%x);\n", pname)); -} - -KEYWORD1 void KEYWORD2 NAME(GetInfoLogARB)(GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog) -{ - (void) obj; (void) maxLength; (void) length; (void) infoLog; - DISPATCH(GetInfoLogARB, (obj, maxLength, length, infoLog), (F, "glGetInfoLogARB(%d, %d, %p, %p);\n", obj, maxLength, (const void *) length, (const void *) infoLog)); -} - -KEYWORD1 void KEYWORD2 NAME(GetObjectParameterfvARB)(GLhandleARB obj, GLenum pname, GLfloat * params) -{ - (void) obj; (void) pname; (void) params; - DISPATCH(GetObjectParameterfvARB, (obj, pname, params), (F, "glGetObjectParameterfvARB(%d, 0x%x, %p);\n", obj, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetObjectParameterivARB)(GLhandleARB obj, GLenum pname, GLint * params) -{ - (void) obj; (void) pname; (void) params; - DISPATCH(GetObjectParameterivARB, (obj, pname, params), (F, "glGetObjectParameterivARB(%d, 0x%x, %p);\n", obj, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetShaderSource)(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source) -{ - (void) shader; (void) bufSize; (void) length; (void) source; - DISPATCH(GetShaderSourceARB, (shader, bufSize, length, source), (F, "glGetShaderSource(%d, %d, %p, %p);\n", shader, bufSize, (const void *) length, (const void *) source)); -} - -KEYWORD1 void KEYWORD2 NAME(GetShaderSourceARB)(GLhandleARB shader, GLsizei bufSize, GLsizei * length, GLcharARB * source) -{ - (void) shader; (void) bufSize; (void) length; (void) source; - DISPATCH(GetShaderSourceARB, (shader, bufSize, length, source), (F, "glGetShaderSourceARB(%d, %d, %p, %p);\n", shader, bufSize, (const void *) length, (const void *) source)); -} - -KEYWORD1 GLint KEYWORD2 NAME(GetUniformLocation)(GLuint program, const GLchar * name) -{ - (void) program; (void) name; - RETURN_DISPATCH(GetUniformLocationARB, (program, name), (F, "glGetUniformLocation(%d, %p);\n", program, (const void *) name)); -} - -KEYWORD1 GLint KEYWORD2 NAME(GetUniformLocationARB)(GLhandleARB program, const GLcharARB * name) -{ - (void) program; (void) name; - RETURN_DISPATCH(GetUniformLocationARB, (program, name), (F, "glGetUniformLocationARB(%d, %p);\n", program, (const void *) name)); -} - -KEYWORD1 void KEYWORD2 NAME(GetUniformfv)(GLuint program, GLint location, GLfloat * params) -{ - (void) program; (void) location; (void) params; - DISPATCH(GetUniformfvARB, (program, location, params), (F, "glGetUniformfv(%d, %d, %p);\n", program, location, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetUniformfvARB)(GLhandleARB program, GLint location, GLfloat * params) -{ - (void) program; (void) location; (void) params; - DISPATCH(GetUniformfvARB, (program, location, params), (F, "glGetUniformfvARB(%d, %d, %p);\n", program, location, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetUniformiv)(GLuint program, GLint location, GLint * params) -{ - (void) program; (void) location; (void) params; - DISPATCH(GetUniformivARB, (program, location, params), (F, "glGetUniformiv(%d, %d, %p);\n", program, location, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetUniformivARB)(GLhandleARB program, GLint location, GLint * params) -{ - (void) program; (void) location; (void) params; - DISPATCH(GetUniformivARB, (program, location, params), (F, "glGetUniformivARB(%d, %d, %p);\n", program, location, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(LinkProgram)(GLuint program) -{ - (void) program; - DISPATCH(LinkProgramARB, (program), (F, "glLinkProgram(%d);\n", program)); -} - -KEYWORD1 void KEYWORD2 NAME(LinkProgramARB)(GLhandleARB program) -{ - (void) program; - DISPATCH(LinkProgramARB, (program), (F, "glLinkProgramARB(%d);\n", program)); -} - -KEYWORD1 void KEYWORD2 NAME(ShaderSource)(GLuint shader, GLsizei count, const GLchar ** string, const GLint * length) -{ - (void) shader; (void) count; (void) string; (void) length; - DISPATCH(ShaderSourceARB, (shader, count, string, length), (F, "glShaderSource(%d, %d, %p, %p);\n", shader, count, (const void *) string, (const void *) length)); -} - -KEYWORD1 void KEYWORD2 NAME(ShaderSourceARB)(GLhandleARB shader, GLsizei count, const GLcharARB ** string, const GLint * length) -{ - (void) shader; (void) count; (void) string; (void) length; - DISPATCH(ShaderSourceARB, (shader, count, string, length), (F, "glShaderSourceARB(%d, %d, %p, %p);\n", shader, count, (const void *) string, (const void *) length)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform1f)(GLint location, GLfloat v0) -{ - (void) location; (void) v0; - DISPATCH(Uniform1fARB, (location, v0), (F, "glUniform1f(%d, %f);\n", location, v0)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform1fARB)(GLint location, GLfloat v0) -{ - (void) location; (void) v0; - DISPATCH(Uniform1fARB, (location, v0), (F, "glUniform1fARB(%d, %f);\n", location, v0)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform1fv)(GLint location, GLsizei count, const GLfloat * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform1fvARB, (location, count, value), (F, "glUniform1fv(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform1fvARB)(GLint location, GLsizei count, const GLfloat * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform1fvARB, (location, count, value), (F, "glUniform1fvARB(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform1i)(GLint location, GLint v0) -{ - (void) location; (void) v0; - DISPATCH(Uniform1iARB, (location, v0), (F, "glUniform1i(%d, %d);\n", location, v0)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform1iARB)(GLint location, GLint v0) -{ - (void) location; (void) v0; - DISPATCH(Uniform1iARB, (location, v0), (F, "glUniform1iARB(%d, %d);\n", location, v0)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform1iv)(GLint location, GLsizei count, const GLint * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform1ivARB, (location, count, value), (F, "glUniform1iv(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform1ivARB)(GLint location, GLsizei count, const GLint * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform1ivARB, (location, count, value), (F, "glUniform1ivARB(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform2f)(GLint location, GLfloat v0, GLfloat v1) -{ - (void) location; (void) v0; (void) v1; - DISPATCH(Uniform2fARB, (location, v0, v1), (F, "glUniform2f(%d, %f, %f);\n", location, v0, v1)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform2fARB)(GLint location, GLfloat v0, GLfloat v1) -{ - (void) location; (void) v0; (void) v1; - DISPATCH(Uniform2fARB, (location, v0, v1), (F, "glUniform2fARB(%d, %f, %f);\n", location, v0, v1)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform2fv)(GLint location, GLsizei count, const GLfloat * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform2fvARB, (location, count, value), (F, "glUniform2fv(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform2fvARB)(GLint location, GLsizei count, const GLfloat * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform2fvARB, (location, count, value), (F, "glUniform2fvARB(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform2i)(GLint location, GLint v0, GLint v1) -{ - (void) location; (void) v0; (void) v1; - DISPATCH(Uniform2iARB, (location, v0, v1), (F, "glUniform2i(%d, %d, %d);\n", location, v0, v1)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform2iARB)(GLint location, GLint v0, GLint v1) -{ - (void) location; (void) v0; (void) v1; - DISPATCH(Uniform2iARB, (location, v0, v1), (F, "glUniform2iARB(%d, %d, %d);\n", location, v0, v1)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform2iv)(GLint location, GLsizei count, const GLint * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform2ivARB, (location, count, value), (F, "glUniform2iv(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform2ivARB)(GLint location, GLsizei count, const GLint * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform2ivARB, (location, count, value), (F, "glUniform2ivARB(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform3f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) -{ - (void) location; (void) v0; (void) v1; (void) v2; - DISPATCH(Uniform3fARB, (location, v0, v1, v2), (F, "glUniform3f(%d, %f, %f, %f);\n", location, v0, v1, v2)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform3fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) -{ - (void) location; (void) v0; (void) v1; (void) v2; - DISPATCH(Uniform3fARB, (location, v0, v1, v2), (F, "glUniform3fARB(%d, %f, %f, %f);\n", location, v0, v1, v2)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform3fv)(GLint location, GLsizei count, const GLfloat * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform3fvARB, (location, count, value), (F, "glUniform3fv(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform3fvARB)(GLint location, GLsizei count, const GLfloat * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform3fvARB, (location, count, value), (F, "glUniform3fvARB(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform3i)(GLint location, GLint v0, GLint v1, GLint v2) -{ - (void) location; (void) v0; (void) v1; (void) v2; - DISPATCH(Uniform3iARB, (location, v0, v1, v2), (F, "glUniform3i(%d, %d, %d, %d);\n", location, v0, v1, v2)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform3iARB)(GLint location, GLint v0, GLint v1, GLint v2) -{ - (void) location; (void) v0; (void) v1; (void) v2; - DISPATCH(Uniform3iARB, (location, v0, v1, v2), (F, "glUniform3iARB(%d, %d, %d, %d);\n", location, v0, v1, v2)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform3iv)(GLint location, GLsizei count, const GLint * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform3ivARB, (location, count, value), (F, "glUniform3iv(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform3ivARB)(GLint location, GLsizei count, const GLint * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform3ivARB, (location, count, value), (F, "glUniform3ivARB(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform4f)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) -{ - (void) location; (void) v0; (void) v1; (void) v2; (void) v3; - DISPATCH(Uniform4fARB, (location, v0, v1, v2, v3), (F, "glUniform4f(%d, %f, %f, %f, %f);\n", location, v0, v1, v2, v3)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform4fARB)(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) -{ - (void) location; (void) v0; (void) v1; (void) v2; (void) v3; - DISPATCH(Uniform4fARB, (location, v0, v1, v2, v3), (F, "glUniform4fARB(%d, %f, %f, %f, %f);\n", location, v0, v1, v2, v3)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform4fv)(GLint location, GLsizei count, const GLfloat * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform4fvARB, (location, count, value), (F, "glUniform4fv(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform4fvARB)(GLint location, GLsizei count, const GLfloat * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform4fvARB, (location, count, value), (F, "glUniform4fvARB(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform4i)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) -{ - (void) location; (void) v0; (void) v1; (void) v2; (void) v3; - DISPATCH(Uniform4iARB, (location, v0, v1, v2, v3), (F, "glUniform4i(%d, %d, %d, %d, %d);\n", location, v0, v1, v2, v3)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform4iARB)(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) -{ - (void) location; (void) v0; (void) v1; (void) v2; (void) v3; - DISPATCH(Uniform4iARB, (location, v0, v1, v2, v3), (F, "glUniform4iARB(%d, %d, %d, %d, %d);\n", location, v0, v1, v2, v3)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform4iv)(GLint location, GLsizei count, const GLint * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform4ivARB, (location, count, value), (F, "glUniform4iv(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform4ivARB)(GLint location, GLsizei count, const GLint * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform4ivARB, (location, count, value), (F, "glUniform4ivARB(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(UniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) -{ - (void) location; (void) count; (void) transpose; (void) value; - DISPATCH(UniformMatrix2fvARB, (location, count, transpose, value), (F, "glUniformMatrix2fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(UniformMatrix2fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) -{ - (void) location; (void) count; (void) transpose; (void) value; - DISPATCH(UniformMatrix2fvARB, (location, count, transpose, value), (F, "glUniformMatrix2fvARB(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(UniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) -{ - (void) location; (void) count; (void) transpose; (void) value; - DISPATCH(UniformMatrix3fvARB, (location, count, transpose, value), (F, "glUniformMatrix3fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(UniformMatrix3fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) -{ - (void) location; (void) count; (void) transpose; (void) value; - DISPATCH(UniformMatrix3fvARB, (location, count, transpose, value), (F, "glUniformMatrix3fvARB(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(UniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) -{ - (void) location; (void) count; (void) transpose; (void) value; - DISPATCH(UniformMatrix4fvARB, (location, count, transpose, value), (F, "glUniformMatrix4fv(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(UniformMatrix4fvARB)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) -{ - (void) location; (void) count; (void) transpose; (void) value; - DISPATCH(UniformMatrix4fvARB, (location, count, transpose, value), (F, "glUniformMatrix4fvARB(%d, %d, %d, %p);\n", location, count, transpose, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(UseProgram)(GLuint program) -{ - (void) program; - DISPATCH(UseProgramObjectARB, (program), (F, "glUseProgram(%d);\n", program)); -} - -KEYWORD1 void KEYWORD2 NAME(UseProgramObjectARB)(GLhandleARB program) -{ - (void) program; - DISPATCH(UseProgramObjectARB, (program), (F, "glUseProgramObjectARB(%d);\n", program)); -} - -KEYWORD1 void KEYWORD2 NAME(ValidateProgram)(GLuint program) -{ - (void) program; - DISPATCH(ValidateProgramARB, (program), (F, "glValidateProgram(%d);\n", program)); -} - -KEYWORD1 void KEYWORD2 NAME(ValidateProgramARB)(GLhandleARB program) -{ - (void) program; - DISPATCH(ValidateProgramARB, (program), (F, "glValidateProgramARB(%d);\n", program)); -} - -KEYWORD1 void KEYWORD2 NAME(BindAttribLocation)(GLuint program, GLuint index, const GLchar * name) -{ - (void) program; (void) index; (void) name; - DISPATCH(BindAttribLocationARB, (program, index, name), (F, "glBindAttribLocation(%d, %d, %p);\n", program, index, (const void *) name)); -} - -KEYWORD1 void KEYWORD2 NAME(BindAttribLocationARB)(GLhandleARB program, GLuint index, const GLcharARB * name) -{ - (void) program; (void) index; (void) name; - DISPATCH(BindAttribLocationARB, (program, index, name), (F, "glBindAttribLocationARB(%d, %d, %p);\n", program, index, (const void *) name)); -} - -KEYWORD1 void KEYWORD2 NAME(GetActiveAttrib)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name) -{ - (void) program; (void) index; (void) bufSize; (void) length; (void) size; (void) type; (void) name; - DISPATCH(GetActiveAttribARB, (program, index, bufSize, length, size, type, name), (F, "glGetActiveAttrib(%d, %d, %d, %p, %p, %p, %p);\n", program, index, bufSize, (const void *) length, (const void *) size, (const void *) type, (const void *) name)); -} - -KEYWORD1 void KEYWORD2 NAME(GetActiveAttribARB)(GLhandleARB program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name) -{ - (void) program; (void) index; (void) bufSize; (void) length; (void) size; (void) type; (void) name; - DISPATCH(GetActiveAttribARB, (program, index, bufSize, length, size, type, name), (F, "glGetActiveAttribARB(%d, %d, %d, %p, %p, %p, %p);\n", program, index, bufSize, (const void *) length, (const void *) size, (const void *) type, (const void *) name)); -} - -KEYWORD1 GLint KEYWORD2 NAME(GetAttribLocation)(GLuint program, const GLchar * name) -{ - (void) program; (void) name; - RETURN_DISPATCH(GetAttribLocationARB, (program, name), (F, "glGetAttribLocation(%d, %p);\n", program, (const void *) name)); -} - -KEYWORD1 GLint KEYWORD2 NAME(GetAttribLocationARB)(GLhandleARB program, const GLcharARB * name) -{ - (void) program; (void) name; - RETURN_DISPATCH(GetAttribLocationARB, (program, name), (F, "glGetAttribLocationARB(%d, %p);\n", program, (const void *) name)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawBuffers)(GLsizei n, const GLenum * bufs) -{ - (void) n; (void) bufs; - DISPATCH(DrawBuffersARB, (n, bufs), (F, "glDrawBuffers(%d, %p);\n", n, (const void *) bufs)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawBuffersARB)(GLsizei n, const GLenum * bufs) -{ - (void) n; (void) bufs; - DISPATCH(DrawBuffersARB, (n, bufs), (F, "glDrawBuffersARB(%d, %p);\n", n, (const void *) bufs)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawBuffersATI)(GLsizei n, const GLenum * bufs) -{ - (void) n; (void) bufs; - DISPATCH(DrawBuffersARB, (n, bufs), (F, "glDrawBuffersATI(%d, %p);\n", n, (const void *) bufs)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawBuffersNV)(GLsizei n, const GLenum * bufs) -{ - (void) n; (void) bufs; - DISPATCH(DrawBuffersARB, (n, bufs), (F, "glDrawBuffersNV(%d, %p);\n", n, (const void *) bufs)); -} - -KEYWORD1 void KEYWORD2 NAME(ClampColorARB)(GLenum target, GLenum clamp) -{ - (void) target; (void) clamp; - DISPATCH(ClampColorARB, (target, clamp), (F, "glClampColorARB(0x%x, 0x%x);\n", target, clamp)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawArraysInstancedARB)(GLenum mode, GLint first, GLsizei count, GLsizei primcount) -{ - (void) mode; (void) first; (void) count; (void) primcount; - DISPATCH(DrawArraysInstancedARB, (mode, first, count, primcount), (F, "glDrawArraysInstancedARB(0x%x, %d, %d, %d);\n", mode, first, count, primcount)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawArraysInstancedEXT)(GLenum mode, GLint first, GLsizei count, GLsizei primcount) -{ - (void) mode; (void) first; (void) count; (void) primcount; - DISPATCH(DrawArraysInstancedARB, (mode, first, count, primcount), (F, "glDrawArraysInstancedEXT(0x%x, %d, %d, %d);\n", mode, first, count, primcount)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawArraysInstanced)(GLenum mode, GLint first, GLsizei count, GLsizei primcount) -{ - (void) mode; (void) first; (void) count; (void) primcount; - DISPATCH(DrawArraysInstancedARB, (mode, first, count, primcount), (F, "glDrawArraysInstanced(0x%x, %d, %d, %d);\n", mode, first, count, primcount)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawElementsInstancedARB)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei primcount) -{ - (void) mode; (void) count; (void) type; (void) indices; (void) primcount; - DISPATCH(DrawElementsInstancedARB, (mode, count, type, indices, primcount), (F, "glDrawElementsInstancedARB(0x%x, %d, 0x%x, %p, %d);\n", mode, count, type, (const void *) indices, primcount)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawElementsInstancedEXT)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei primcount) -{ - (void) mode; (void) count; (void) type; (void) indices; (void) primcount; - DISPATCH(DrawElementsInstancedARB, (mode, count, type, indices, primcount), (F, "glDrawElementsInstancedEXT(0x%x, %d, 0x%x, %p, %d);\n", mode, count, type, (const void *) indices, primcount)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawElementsInstanced)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei primcount) -{ - (void) mode; (void) count; (void) type; (void) indices; (void) primcount; - DISPATCH(DrawElementsInstancedARB, (mode, count, type, indices, primcount), (F, "glDrawElementsInstanced(0x%x, %d, 0x%x, %p, %d);\n", mode, count, type, (const void *) indices, primcount)); -} - -KEYWORD1 void KEYWORD2 NAME(RenderbufferStorageMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) -{ - (void) target; (void) samples; (void) internalformat; (void) width; (void) height; - DISPATCH(RenderbufferStorageMultisample, (target, samples, internalformat, width, height), (F, "glRenderbufferStorageMultisample(0x%x, %d, 0x%x, %d, %d);\n", target, samples, internalformat, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(RenderbufferStorageMultisampleEXT)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) -{ - (void) target; (void) samples; (void) internalformat; (void) width; (void) height; - DISPATCH(RenderbufferStorageMultisample, (target, samples, internalformat, width, height), (F, "glRenderbufferStorageMultisampleEXT(0x%x, %d, 0x%x, %d, %d);\n", target, samples, internalformat, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(FramebufferTextureARB)(GLenum target, GLenum attachment, GLuint texture, GLint level) -{ - (void) target; (void) attachment; (void) texture; (void) level; - DISPATCH(FramebufferTextureARB, (target, attachment, texture, level), (F, "glFramebufferTextureARB(0x%x, 0x%x, %d, %d);\n", target, attachment, texture, level)); -} - -KEYWORD1 void KEYWORD2 NAME(FramebufferTextureFaceARB)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face) -{ - (void) target; (void) attachment; (void) texture; (void) level; (void) face; - DISPATCH(FramebufferTextureFaceARB, (target, attachment, texture, level, face), (F, "glFramebufferTextureFaceARB(0x%x, 0x%x, %d, %d, 0x%x);\n", target, attachment, texture, level, face)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramParameteriARB)(GLuint program, GLenum pname, GLint value) -{ - (void) program; (void) pname; (void) value; - DISPATCH(ProgramParameteriARB, (program, pname, value), (F, "glProgramParameteriARB(%d, 0x%x, %d);\n", program, pname, value)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribDivisorARB)(GLuint index, GLuint divisor) -{ - (void) index; (void) divisor; - DISPATCH(VertexAttribDivisorARB, (index, divisor), (F, "glVertexAttribDivisorARB(%d, %d);\n", index, divisor)); -} - -KEYWORD1 void KEYWORD2 NAME(FlushMappedBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length) -{ - (void) target; (void) offset; (void) length; - DISPATCH(FlushMappedBufferRange, (target, offset, length), (F, "glFlushMappedBufferRange(0x%x, %d, %d);\n", target, offset, length)); -} - -KEYWORD1 GLvoid * KEYWORD2 NAME(MapBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) -{ - (void) target; (void) offset; (void) length; (void) access; - RETURN_DISPATCH(MapBufferRange, (target, offset, length, access), (F, "glMapBufferRange(0x%x, %d, %d, %d);\n", target, offset, length, access)); -} - -KEYWORD1 void KEYWORD2 NAME(TexBufferARB)(GLenum target, GLenum internalFormat, GLuint buffer) -{ - (void) target; (void) internalFormat; (void) buffer; - DISPATCH(TexBufferARB, (target, internalFormat, buffer), (F, "glTexBufferARB(0x%x, 0x%x, %d);\n", target, internalFormat, buffer)); -} - -KEYWORD1 void KEYWORD2 NAME(BindVertexArray)(GLuint array) -{ - (void) array; - DISPATCH(BindVertexArray, (array), (F, "glBindVertexArray(%d);\n", array)); -} - -KEYWORD1 void KEYWORD2 NAME(GenVertexArrays)(GLsizei n, GLuint * arrays) -{ - (void) n; (void) arrays; - DISPATCH(GenVertexArrays, (n, arrays), (F, "glGenVertexArrays(%d, %p);\n", n, (const void *) arrays)); -} - -KEYWORD1 void KEYWORD2 NAME(CopyBufferSubData)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) -{ - (void) readTarget; (void) writeTarget; (void) readOffset; (void) writeOffset; (void) size; - DISPATCH(CopyBufferSubData, (readTarget, writeTarget, readOffset, writeOffset, size), (F, "glCopyBufferSubData(0x%x, 0x%x, %d, %d, %d);\n", readTarget, writeTarget, readOffset, writeOffset, size)); -} - -KEYWORD1 GLenum KEYWORD2 NAME(ClientWaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout) -{ - (void) sync; (void) flags; (void) timeout; - RETURN_DISPATCH(ClientWaitSync, (sync, flags, timeout), (F, "glClientWaitSync(%d, %d, %d);\n", sync, flags, timeout)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteSync)(GLsync sync) -{ - (void) sync; - DISPATCH(DeleteSync, (sync), (F, "glDeleteSync(%d);\n", sync)); -} - -KEYWORD1 GLsync KEYWORD2 NAME(FenceSync)(GLenum condition, GLbitfield flags) -{ - (void) condition; (void) flags; - RETURN_DISPATCH(FenceSync, (condition, flags), (F, "glFenceSync(0x%x, %d);\n", condition, flags)); -} - -KEYWORD1 void KEYWORD2 NAME(GetInteger64v)(GLenum pname, GLint64 * params) -{ - (void) pname; (void) params; - DISPATCH(GetInteger64v, (pname, params), (F, "glGetInteger64v(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetSynciv)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values) -{ - (void) sync; (void) pname; (void) bufSize; (void) length; (void) values; - DISPATCH(GetSynciv, (sync, pname, bufSize, length, values), (F, "glGetSynciv(%d, 0x%x, %d, %p, %p);\n", sync, pname, bufSize, (const void *) length, (const void *) values)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsSync)(GLsync sync) -{ - (void) sync; - RETURN_DISPATCH(IsSync, (sync), (F, "glIsSync(%d);\n", sync)); -} - -KEYWORD1 void KEYWORD2 NAME(WaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout) -{ - (void) sync; (void) flags; (void) timeout; - DISPATCH(WaitSync, (sync, flags, timeout), (F, "glWaitSync(%d, %d, %d);\n", sync, flags, timeout)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawElementsBaseVertex)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLint basevertex) -{ - (void) mode; (void) count; (void) type; (void) indices; (void) basevertex; - DISPATCH(DrawElementsBaseVertex, (mode, count, type, indices, basevertex), (F, "glDrawElementsBaseVertex(0x%x, %d, 0x%x, %p, %d);\n", mode, count, type, (const void *) indices, basevertex)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawElementsInstancedBaseVertex)(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei primcount, GLint basevertex) -{ - (void) mode; (void) count; (void) type; (void) indices; (void) primcount; (void) basevertex; - DISPATCH(DrawElementsInstancedBaseVertex, (mode, count, type, indices, primcount, basevertex), (F, "glDrawElementsInstancedBaseVertex(0x%x, %d, 0x%x, %p, %d, %d);\n", mode, count, type, (const void *) indices, primcount, basevertex)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawRangeElementsBaseVertex)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices, GLint basevertex) -{ - (void) mode; (void) start; (void) end; (void) count; (void) type; (void) indices; (void) basevertex; - DISPATCH(DrawRangeElementsBaseVertex, (mode, start, end, count, type, indices, basevertex), (F, "glDrawRangeElementsBaseVertex(0x%x, %d, %d, %d, 0x%x, %p, %d);\n", mode, start, end, count, type, (const void *) indices, basevertex)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiDrawElementsBaseVertex)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount, const GLint * basevertex) -{ - (void) mode; (void) count; (void) type; (void) indices; (void) primcount; (void) basevertex; - DISPATCH(MultiDrawElementsBaseVertex, (mode, count, type, indices, primcount, basevertex), (F, "glMultiDrawElementsBaseVertex(0x%x, %p, 0x%x, %p, %d, %p);\n", mode, (const void *) count, type, (const void *) indices, primcount, (const void *) basevertex)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendEquationSeparateiARB)(GLuint buf, GLenum modeRGB, GLenum modeA) -{ - (void) buf; (void) modeRGB; (void) modeA; - DISPATCH(BlendEquationSeparateiARB, (buf, modeRGB, modeA), (F, "glBlendEquationSeparateiARB(%d, 0x%x, 0x%x);\n", buf, modeRGB, modeA)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendEquationSeparateIndexedAMD)(GLuint buf, GLenum modeRGB, GLenum modeA) -{ - (void) buf; (void) modeRGB; (void) modeA; - DISPATCH(BlendEquationSeparateiARB, (buf, modeRGB, modeA), (F, "glBlendEquationSeparateIndexedAMD(%d, 0x%x, 0x%x);\n", buf, modeRGB, modeA)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendEquationiARB)(GLuint buf, GLenum mode) -{ - (void) buf; (void) mode; - DISPATCH(BlendEquationiARB, (buf, mode), (F, "glBlendEquationiARB(%d, 0x%x);\n", buf, mode)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendEquationIndexedAMD)(GLuint buf, GLenum mode) -{ - (void) buf; (void) mode; - DISPATCH(BlendEquationiARB, (buf, mode), (F, "glBlendEquationIndexedAMD(%d, 0x%x);\n", buf, mode)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparateiARB)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA) -{ - (void) buf; (void) srcRGB; (void) dstRGB; (void) srcA; (void) dstA; - DISPATCH(BlendFuncSeparateiARB, (buf, srcRGB, dstRGB, srcA, dstA), (F, "glBlendFuncSeparateiARB(%d, 0x%x, 0x%x, 0x%x, 0x%x);\n", buf, srcRGB, dstRGB, srcA, dstA)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparateIndexedAMD)(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcA, GLenum dstA) -{ - (void) buf; (void) srcRGB; (void) dstRGB; (void) srcA; (void) dstA; - DISPATCH(BlendFuncSeparateiARB, (buf, srcRGB, dstRGB, srcA, dstA), (F, "glBlendFuncSeparateIndexedAMD(%d, 0x%x, 0x%x, 0x%x, 0x%x);\n", buf, srcRGB, dstRGB, srcA, dstA)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendFunciARB)(GLuint buf, GLenum src, GLenum dst) -{ - (void) buf; (void) src; (void) dst; - DISPATCH(BlendFunciARB, (buf, src, dst), (F, "glBlendFunciARB(%d, 0x%x, 0x%x);\n", buf, src, dst)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendFuncIndexedAMD)(GLuint buf, GLenum src, GLenum dst) -{ - (void) buf; (void) src; (void) dst; - DISPATCH(BlendFunciARB, (buf, src, dst), (F, "glBlendFuncIndexedAMD(%d, 0x%x, 0x%x);\n", buf, src, dst)); -} - -KEYWORD1 void KEYWORD2 NAME(BindSampler)(GLuint unit, GLuint sampler) -{ - (void) unit; (void) sampler; - DISPATCH(BindSampler, (unit, sampler), (F, "glBindSampler(%d, %d);\n", unit, sampler)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteSamplers)(GLsizei count, const GLuint * samplers) -{ - (void) count; (void) samplers; - DISPATCH(DeleteSamplers, (count, samplers), (F, "glDeleteSamplers(%d, %p);\n", count, (const void *) samplers)); -} - -KEYWORD1 void KEYWORD2 NAME(GenSamplers)(GLsizei count, GLuint * samplers) -{ - (void) count; (void) samplers; - DISPATCH(GenSamplers, (count, samplers), (F, "glGenSamplers(%d, %p);\n", count, (const void *) samplers)); -} - -KEYWORD1 void KEYWORD2 NAME(GetSamplerParameterIiv)(GLuint sampler, GLenum pname, GLint * params) -{ - (void) sampler; (void) pname; (void) params; - DISPATCH(GetSamplerParameterIiv, (sampler, pname, params), (F, "glGetSamplerParameterIiv(%d, 0x%x, %p);\n", sampler, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetSamplerParameterIuiv)(GLuint sampler, GLenum pname, GLuint * params) -{ - (void) sampler; (void) pname; (void) params; - DISPATCH(GetSamplerParameterIuiv, (sampler, pname, params), (F, "glGetSamplerParameterIuiv(%d, 0x%x, %p);\n", sampler, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetSamplerParameterfv)(GLuint sampler, GLenum pname, GLfloat * params) -{ - (void) sampler; (void) pname; (void) params; - DISPATCH(GetSamplerParameterfv, (sampler, pname, params), (F, "glGetSamplerParameterfv(%d, 0x%x, %p);\n", sampler, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetSamplerParameteriv)(GLuint sampler, GLenum pname, GLint * params) -{ - (void) sampler; (void) pname; (void) params; - DISPATCH(GetSamplerParameteriv, (sampler, pname, params), (F, "glGetSamplerParameteriv(%d, 0x%x, %p);\n", sampler, pname, (const void *) params)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsSampler)(GLuint sampler) -{ - (void) sampler; - RETURN_DISPATCH(IsSampler, (sampler), (F, "glIsSampler(%d);\n", sampler)); -} - -KEYWORD1 void KEYWORD2 NAME(SamplerParameterIiv)(GLuint sampler, GLenum pname, const GLint * params) -{ - (void) sampler; (void) pname; (void) params; - DISPATCH(SamplerParameterIiv, (sampler, pname, params), (F, "glSamplerParameterIiv(%d, 0x%x, %p);\n", sampler, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(SamplerParameterIuiv)(GLuint sampler, GLenum pname, const GLuint * params) -{ - (void) sampler; (void) pname; (void) params; - DISPATCH(SamplerParameterIuiv, (sampler, pname, params), (F, "glSamplerParameterIuiv(%d, 0x%x, %p);\n", sampler, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(SamplerParameterf)(GLuint sampler, GLenum pname, GLfloat param) -{ - (void) sampler; (void) pname; (void) param; - DISPATCH(SamplerParameterf, (sampler, pname, param), (F, "glSamplerParameterf(%d, 0x%x, %f);\n", sampler, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(SamplerParameterfv)(GLuint sampler, GLenum pname, const GLfloat * params) -{ - (void) sampler; (void) pname; (void) params; - DISPATCH(SamplerParameterfv, (sampler, pname, params), (F, "glSamplerParameterfv(%d, 0x%x, %p);\n", sampler, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(SamplerParameteri)(GLuint sampler, GLenum pname, GLint param) -{ - (void) sampler; (void) pname; (void) param; - DISPATCH(SamplerParameteri, (sampler, pname, param), (F, "glSamplerParameteri(%d, 0x%x, %d);\n", sampler, pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(SamplerParameteriv)(GLuint sampler, GLenum pname, const GLint * params) -{ - (void) sampler; (void) pname; (void) params; - DISPATCH(SamplerParameteriv, (sampler, pname, params), (F, "glSamplerParameteriv(%d, 0x%x, %p);\n", sampler, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorP3ui)(GLenum type, GLuint color) -{ - (void) type; (void) color; - DISPATCH(ColorP3ui, (type, color), (F, "glColorP3ui(0x%x, %d);\n", type, color)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorP3uiv)(GLenum type, const GLuint * color) -{ - (void) type; (void) color; - DISPATCH(ColorP3uiv, (type, color), (F, "glColorP3uiv(0x%x, %p);\n", type, (const void *) color)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorP4ui)(GLenum type, GLuint color) -{ - (void) type; (void) color; - DISPATCH(ColorP4ui, (type, color), (F, "glColorP4ui(0x%x, %d);\n", type, color)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorP4uiv)(GLenum type, const GLuint * color) -{ - (void) type; (void) color; - DISPATCH(ColorP4uiv, (type, color), (F, "glColorP4uiv(0x%x, %p);\n", type, (const void *) color)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoordP1ui)(GLenum texture, GLenum type, GLuint coords) -{ - (void) texture; (void) type; (void) coords; - DISPATCH(MultiTexCoordP1ui, (texture, type, coords), (F, "glMultiTexCoordP1ui(0x%x, 0x%x, %d);\n", texture, type, coords)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoordP1uiv)(GLenum texture, GLenum type, const GLuint * coords) -{ - (void) texture; (void) type; (void) coords; - DISPATCH(MultiTexCoordP1uiv, (texture, type, coords), (F, "glMultiTexCoordP1uiv(0x%x, 0x%x, %p);\n", texture, type, (const void *) coords)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoordP2ui)(GLenum texture, GLenum type, GLuint coords) -{ - (void) texture; (void) type; (void) coords; - DISPATCH(MultiTexCoordP2ui, (texture, type, coords), (F, "glMultiTexCoordP2ui(0x%x, 0x%x, %d);\n", texture, type, coords)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoordP2uiv)(GLenum texture, GLenum type, const GLuint * coords) -{ - (void) texture; (void) type; (void) coords; - DISPATCH(MultiTexCoordP2uiv, (texture, type, coords), (F, "glMultiTexCoordP2uiv(0x%x, 0x%x, %p);\n", texture, type, (const void *) coords)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoordP3ui)(GLenum texture, GLenum type, GLuint coords) -{ - (void) texture; (void) type; (void) coords; - DISPATCH(MultiTexCoordP3ui, (texture, type, coords), (F, "glMultiTexCoordP3ui(0x%x, 0x%x, %d);\n", texture, type, coords)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoordP3uiv)(GLenum texture, GLenum type, const GLuint * coords) -{ - (void) texture; (void) type; (void) coords; - DISPATCH(MultiTexCoordP3uiv, (texture, type, coords), (F, "glMultiTexCoordP3uiv(0x%x, 0x%x, %p);\n", texture, type, (const void *) coords)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoordP4ui)(GLenum texture, GLenum type, GLuint coords) -{ - (void) texture; (void) type; (void) coords; - DISPATCH(MultiTexCoordP4ui, (texture, type, coords), (F, "glMultiTexCoordP4ui(0x%x, 0x%x, %d);\n", texture, type, coords)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiTexCoordP4uiv)(GLenum texture, GLenum type, const GLuint * coords) -{ - (void) texture; (void) type; (void) coords; - DISPATCH(MultiTexCoordP4uiv, (texture, type, coords), (F, "glMultiTexCoordP4uiv(0x%x, 0x%x, %p);\n", texture, type, (const void *) coords)); -} - -KEYWORD1 void KEYWORD2 NAME(NormalP3ui)(GLenum type, GLuint coords) -{ - (void) type; (void) coords; - DISPATCH(NormalP3ui, (type, coords), (F, "glNormalP3ui(0x%x, %d);\n", type, coords)); -} - -KEYWORD1 void KEYWORD2 NAME(NormalP3uiv)(GLenum type, const GLuint * coords) -{ - (void) type; (void) coords; - DISPATCH(NormalP3uiv, (type, coords), (F, "glNormalP3uiv(0x%x, %p);\n", type, (const void *) coords)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColorP3ui)(GLenum type, GLuint color) -{ - (void) type; (void) color; - DISPATCH(SecondaryColorP3ui, (type, color), (F, "glSecondaryColorP3ui(0x%x, %d);\n", type, color)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColorP3uiv)(GLenum type, const GLuint * color) -{ - (void) type; (void) color; - DISPATCH(SecondaryColorP3uiv, (type, color), (F, "glSecondaryColorP3uiv(0x%x, %p);\n", type, (const void *) color)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoordP1ui)(GLenum type, GLuint coords) -{ - (void) type; (void) coords; - DISPATCH(TexCoordP1ui, (type, coords), (F, "glTexCoordP1ui(0x%x, %d);\n", type, coords)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoordP1uiv)(GLenum type, const GLuint * coords) -{ - (void) type; (void) coords; - DISPATCH(TexCoordP1uiv, (type, coords), (F, "glTexCoordP1uiv(0x%x, %p);\n", type, (const void *) coords)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoordP2ui)(GLenum type, GLuint coords) -{ - (void) type; (void) coords; - DISPATCH(TexCoordP2ui, (type, coords), (F, "glTexCoordP2ui(0x%x, %d);\n", type, coords)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoordP2uiv)(GLenum type, const GLuint * coords) -{ - (void) type; (void) coords; - DISPATCH(TexCoordP2uiv, (type, coords), (F, "glTexCoordP2uiv(0x%x, %p);\n", type, (const void *) coords)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoordP3ui)(GLenum type, GLuint coords) -{ - (void) type; (void) coords; - DISPATCH(TexCoordP3ui, (type, coords), (F, "glTexCoordP3ui(0x%x, %d);\n", type, coords)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoordP3uiv)(GLenum type, const GLuint * coords) -{ - (void) type; (void) coords; - DISPATCH(TexCoordP3uiv, (type, coords), (F, "glTexCoordP3uiv(0x%x, %p);\n", type, (const void *) coords)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoordP4ui)(GLenum type, GLuint coords) -{ - (void) type; (void) coords; - DISPATCH(TexCoordP4ui, (type, coords), (F, "glTexCoordP4ui(0x%x, %d);\n", type, coords)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoordP4uiv)(GLenum type, const GLuint * coords) -{ - (void) type; (void) coords; - DISPATCH(TexCoordP4uiv, (type, coords), (F, "glTexCoordP4uiv(0x%x, %p);\n", type, (const void *) coords)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribP1ui)(GLuint index, GLenum type, GLboolean normalized, GLuint value) -{ - (void) index; (void) type; (void) normalized; (void) value; - DISPATCH(VertexAttribP1ui, (index, type, normalized, value), (F, "glVertexAttribP1ui(%d, 0x%x, %d, %d);\n", index, type, normalized, value)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribP1uiv)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value) -{ - (void) index; (void) type; (void) normalized; (void) value; - DISPATCH(VertexAttribP1uiv, (index, type, normalized, value), (F, "glVertexAttribP1uiv(%d, 0x%x, %d, %p);\n", index, type, normalized, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribP2ui)(GLuint index, GLenum type, GLboolean normalized, GLuint value) -{ - (void) index; (void) type; (void) normalized; (void) value; - DISPATCH(VertexAttribP2ui, (index, type, normalized, value), (F, "glVertexAttribP2ui(%d, 0x%x, %d, %d);\n", index, type, normalized, value)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribP2uiv)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value) -{ - (void) index; (void) type; (void) normalized; (void) value; - DISPATCH(VertexAttribP2uiv, (index, type, normalized, value), (F, "glVertexAttribP2uiv(%d, 0x%x, %d, %p);\n", index, type, normalized, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribP3ui)(GLuint index, GLenum type, GLboolean normalized, GLuint value) -{ - (void) index; (void) type; (void) normalized; (void) value; - DISPATCH(VertexAttribP3ui, (index, type, normalized, value), (F, "glVertexAttribP3ui(%d, 0x%x, %d, %d);\n", index, type, normalized, value)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribP3uiv)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value) -{ - (void) index; (void) type; (void) normalized; (void) value; - DISPATCH(VertexAttribP3uiv, (index, type, normalized, value), (F, "glVertexAttribP3uiv(%d, 0x%x, %d, %p);\n", index, type, normalized, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribP4ui)(GLuint index, GLenum type, GLboolean normalized, GLuint value) -{ - (void) index; (void) type; (void) normalized; (void) value; - DISPATCH(VertexAttribP4ui, (index, type, normalized, value), (F, "glVertexAttribP4ui(%d, 0x%x, %d, %d);\n", index, type, normalized, value)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribP4uiv)(GLuint index, GLenum type, GLboolean normalized, const GLuint * value) -{ - (void) index; (void) type; (void) normalized; (void) value; - DISPATCH(VertexAttribP4uiv, (index, type, normalized, value), (F, "glVertexAttribP4uiv(%d, 0x%x, %d, %p);\n", index, type, normalized, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexP2ui)(GLenum type, GLuint value) -{ - (void) type; (void) value; - DISPATCH(VertexP2ui, (type, value), (F, "glVertexP2ui(0x%x, %d);\n", type, value)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexP2uiv)(GLenum type, const GLuint * value) -{ - (void) type; (void) value; - DISPATCH(VertexP2uiv, (type, value), (F, "glVertexP2uiv(0x%x, %p);\n", type, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexP3ui)(GLenum type, GLuint value) -{ - (void) type; (void) value; - DISPATCH(VertexP3ui, (type, value), (F, "glVertexP3ui(0x%x, %d);\n", type, value)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexP3uiv)(GLenum type, const GLuint * value) -{ - (void) type; (void) value; - DISPATCH(VertexP3uiv, (type, value), (F, "glVertexP3uiv(0x%x, %p);\n", type, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexP4ui)(GLenum type, GLuint value) -{ - (void) type; (void) value; - DISPATCH(VertexP4ui, (type, value), (F, "glVertexP4ui(0x%x, %d);\n", type, value)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexP4uiv)(GLenum type, const GLuint * value) -{ - (void) type; (void) value; - DISPATCH(VertexP4uiv, (type, value), (F, "glVertexP4uiv(0x%x, %p);\n", type, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(BindTransformFeedback)(GLenum target, GLuint id) -{ - (void) target; (void) id; - DISPATCH(BindTransformFeedback, (target, id), (F, "glBindTransformFeedback(0x%x, %d);\n", target, id)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteTransformFeedbacks)(GLsizei n, const GLuint * ids) -{ - (void) n; (void) ids; - DISPATCH(DeleteTransformFeedbacks, (n, ids), (F, "glDeleteTransformFeedbacks(%d, %p);\n", n, (const void *) ids)); -} - -KEYWORD1 void KEYWORD2 NAME(DrawTransformFeedback)(GLenum mode, GLuint id) -{ - (void) mode; (void) id; - DISPATCH(DrawTransformFeedback, (mode, id), (F, "glDrawTransformFeedback(0x%x, %d);\n", mode, id)); -} - -KEYWORD1 void KEYWORD2 NAME(GenTransformFeedbacks)(GLsizei n, GLuint * ids) -{ - (void) n; (void) ids; - DISPATCH(GenTransformFeedbacks, (n, ids), (F, "glGenTransformFeedbacks(%d, %p);\n", n, (const void *) ids)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsTransformFeedback)(GLuint id) -{ - (void) id; - RETURN_DISPATCH(IsTransformFeedback, (id), (F, "glIsTransformFeedback(%d);\n", id)); -} - -KEYWORD1 void KEYWORD2 NAME(PauseTransformFeedback)(void) -{ - DISPATCH(PauseTransformFeedback, (), (F, "glPauseTransformFeedback();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(ResumeTransformFeedback)(void) -{ - DISPATCH(ResumeTransformFeedback, (), (F, "glResumeTransformFeedback();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(ClearDepthf)(GLclampf depth) -{ - (void) depth; - DISPATCH(ClearDepthf, (depth), (F, "glClearDepthf(%f);\n", depth)); -} - -KEYWORD1 void KEYWORD2 NAME(DepthRangef)(GLclampf zNear, GLclampf zFar) -{ - (void) zNear; (void) zFar; - DISPATCH(DepthRangef, (zNear, zFar), (F, "glDepthRangef(%f, %f);\n", zNear, zFar)); -} - -KEYWORD1 void KEYWORD2 NAME(GetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision) -{ - (void) shadertype; (void) precisiontype; (void) range; (void) precision; - DISPATCH(GetShaderPrecisionFormat, (shadertype, precisiontype, range, precision), (F, "glGetShaderPrecisionFormat(0x%x, 0x%x, %p, %p);\n", shadertype, precisiontype, (const void *) range, (const void *) precision)); -} - -KEYWORD1 void KEYWORD2 NAME(ReleaseShaderCompiler)(void) -{ - DISPATCH(ReleaseShaderCompiler, (), (F, "glReleaseShaderCompiler();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(ShaderBinary)(GLsizei n, const GLuint * shaders, GLenum binaryformat, const GLvoid * binary, GLsizei length) -{ - (void) n; (void) shaders; (void) binaryformat; (void) binary; (void) length; - DISPATCH(ShaderBinary, (n, shaders, binaryformat, binary, length), (F, "glShaderBinary(%d, %p, 0x%x, %p, %d);\n", n, (const void *) shaders, binaryformat, (const void *) binary, length)); -} - -KEYWORD1 GLenum KEYWORD2 NAME(GetGraphicsResetStatusARB)(void) -{ - RETURN_DISPATCH(GetGraphicsResetStatusARB, (), (F, "glGetGraphicsResetStatusARB();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(GetnColorTableARB)(GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid * table) -{ - (void) target; (void) format; (void) type; (void) bufSize; (void) table; - DISPATCH(GetnColorTableARB, (target, format, type, bufSize, table), (F, "glGetnColorTableARB(0x%x, 0x%x, 0x%x, %d, %p);\n", target, format, type, bufSize, (const void *) table)); -} - -KEYWORD1 void KEYWORD2 NAME(GetnCompressedTexImageARB)(GLenum target, GLint lod, GLsizei bufSize, GLvoid * img) -{ - (void) target; (void) lod; (void) bufSize; (void) img; - DISPATCH(GetnCompressedTexImageARB, (target, lod, bufSize, img), (F, "glGetnCompressedTexImageARB(0x%x, %d, %d, %p);\n", target, lod, bufSize, (const void *) img)); -} - -KEYWORD1 void KEYWORD2 NAME(GetnConvolutionFilterARB)(GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid * image) -{ - (void) target; (void) format; (void) type; (void) bufSize; (void) image; - DISPATCH(GetnConvolutionFilterARB, (target, format, type, bufSize, image), (F, "glGetnConvolutionFilterARB(0x%x, 0x%x, 0x%x, %d, %p);\n", target, format, type, bufSize, (const void *) image)); -} - -KEYWORD1 void KEYWORD2 NAME(GetnHistogramARB)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid * values) -{ - (void) target; (void) reset; (void) format; (void) type; (void) bufSize; (void) values; - DISPATCH(GetnHistogramARB, (target, reset, format, type, bufSize, values), (F, "glGetnHistogramARB(0x%x, %d, 0x%x, 0x%x, %d, %p);\n", target, reset, format, type, bufSize, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(GetnMapdvARB)(GLenum target, GLenum query, GLsizei bufSize, GLdouble * v) -{ - (void) target; (void) query; (void) bufSize; (void) v; - DISPATCH(GetnMapdvARB, (target, query, bufSize, v), (F, "glGetnMapdvARB(0x%x, 0x%x, %d, %p);\n", target, query, bufSize, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(GetnMapfvARB)(GLenum target, GLenum query, GLsizei bufSize, GLfloat * v) -{ - (void) target; (void) query; (void) bufSize; (void) v; - DISPATCH(GetnMapfvARB, (target, query, bufSize, v), (F, "glGetnMapfvARB(0x%x, 0x%x, %d, %p);\n", target, query, bufSize, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(GetnMapivARB)(GLenum target, GLenum query, GLsizei bufSize, GLint * v) -{ - (void) target; (void) query; (void) bufSize; (void) v; - DISPATCH(GetnMapivARB, (target, query, bufSize, v), (F, "glGetnMapivARB(0x%x, 0x%x, %d, %p);\n", target, query, bufSize, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(GetnMinmaxARB)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid * values) -{ - (void) target; (void) reset; (void) format; (void) type; (void) bufSize; (void) values; - DISPATCH(GetnMinmaxARB, (target, reset, format, type, bufSize, values), (F, "glGetnMinmaxARB(0x%x, %d, 0x%x, 0x%x, %d, %p);\n", target, reset, format, type, bufSize, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(GetnPixelMapfvARB)(GLenum map, GLsizei bufSize, GLfloat * values) -{ - (void) map; (void) bufSize; (void) values; - DISPATCH(GetnPixelMapfvARB, (map, bufSize, values), (F, "glGetnPixelMapfvARB(0x%x, %d, %p);\n", map, bufSize, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(GetnPixelMapuivARB)(GLenum map, GLsizei bufSize, GLuint * values) -{ - (void) map; (void) bufSize; (void) values; - DISPATCH(GetnPixelMapuivARB, (map, bufSize, values), (F, "glGetnPixelMapuivARB(0x%x, %d, %p);\n", map, bufSize, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(GetnPixelMapusvARB)(GLenum map, GLsizei bufSize, GLushort * values) -{ - (void) map; (void) bufSize; (void) values; - DISPATCH(GetnPixelMapusvARB, (map, bufSize, values), (F, "glGetnPixelMapusvARB(0x%x, %d, %p);\n", map, bufSize, (const void *) values)); -} - -KEYWORD1 void KEYWORD2 NAME(GetnPolygonStippleARB)(GLsizei bufSize, GLubyte * pattern) -{ - (void) bufSize; (void) pattern; - DISPATCH(GetnPolygonStippleARB, (bufSize, pattern), (F, "glGetnPolygonStippleARB(%d, %p);\n", bufSize, (const void *) pattern)); -} - -KEYWORD1 void KEYWORD2 NAME(GetnSeparableFilterARB)(GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid * row, GLsizei columnBufSize, GLvoid * column, GLvoid * span) -{ - (void) target; (void) format; (void) type; (void) rowBufSize; (void) row; (void) columnBufSize; (void) column; (void) span; - DISPATCH(GetnSeparableFilterARB, (target, format, type, rowBufSize, row, columnBufSize, column, span), (F, "glGetnSeparableFilterARB(0x%x, 0x%x, 0x%x, %d, %p, %d, %p, %p);\n", target, format, type, rowBufSize, (const void *) row, columnBufSize, (const void *) column, (const void *) span)); -} - -KEYWORD1 void KEYWORD2 NAME(GetnTexImageARB)(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid * img) -{ - (void) target; (void) level; (void) format; (void) type; (void) bufSize; (void) img; - DISPATCH(GetnTexImageARB, (target, level, format, type, bufSize, img), (F, "glGetnTexImageARB(0x%x, %d, 0x%x, 0x%x, %d, %p);\n", target, level, format, type, bufSize, (const void *) img)); -} - -KEYWORD1 void KEYWORD2 NAME(GetnUniformdvARB)(GLhandleARB program, GLint location, GLsizei bufSize, GLdouble * params) -{ - (void) program; (void) location; (void) bufSize; (void) params; - DISPATCH(GetnUniformdvARB, (program, location, bufSize, params), (F, "glGetnUniformdvARB(%d, %d, %d, %p);\n", program, location, bufSize, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetnUniformfvARB)(GLhandleARB program, GLint location, GLsizei bufSize, GLfloat * params) -{ - (void) program; (void) location; (void) bufSize; (void) params; - DISPATCH(GetnUniformfvARB, (program, location, bufSize, params), (F, "glGetnUniformfvARB(%d, %d, %d, %p);\n", program, location, bufSize, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetnUniformivARB)(GLhandleARB program, GLint location, GLsizei bufSize, GLint * params) -{ - (void) program; (void) location; (void) bufSize; (void) params; - DISPATCH(GetnUniformivARB, (program, location, bufSize, params), (F, "glGetnUniformivARB(%d, %d, %d, %p);\n", program, location, bufSize, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetnUniformuivARB)(GLhandleARB program, GLint location, GLsizei bufSize, GLuint * params) -{ - (void) program; (void) location; (void) bufSize; (void) params; - DISPATCH(GetnUniformuivARB, (program, location, bufSize, params), (F, "glGetnUniformuivARB(%d, %d, %d, %p);\n", program, location, bufSize, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ReadnPixelsARB)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid * data) -{ - (void) x; (void) y; (void) width; (void) height; (void) format; (void) type; (void) bufSize; (void) data; - DISPATCH(ReadnPixelsARB, (x, y, width, height, format, type, bufSize, data), (F, "glReadnPixelsARB(%d, %d, %d, %d, 0x%x, 0x%x, %d, %p);\n", x, y, width, height, format, type, bufSize, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(TexStorage1D)(GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width) -{ - (void) target; (void) levels; (void) internalFormat; (void) width; - DISPATCH(TexStorage1D, (target, levels, internalFormat, width), (F, "glTexStorage1D(0x%x, %d, 0x%x, %d);\n", target, levels, internalFormat, width)); -} - -KEYWORD1 void KEYWORD2 NAME(TexStorage2D)(GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height) -{ - (void) target; (void) levels; (void) internalFormat; (void) width; (void) height; - DISPATCH(TexStorage2D, (target, levels, internalFormat, width, height), (F, "glTexStorage2D(0x%x, %d, 0x%x, %d, %d);\n", target, levels, internalFormat, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(TexStorage3D)(GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth) -{ - (void) target; (void) levels; (void) internalFormat; (void) width; (void) height; (void) depth; - DISPATCH(TexStorage3D, (target, levels, internalFormat, width, height, depth), (F, "glTexStorage3D(0x%x, %d, 0x%x, %d, %d, %d);\n", target, levels, internalFormat, width, height, depth)); -} - -KEYWORD1 void KEYWORD2 NAME(TextureStorage1DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width) -{ - (void) texture; (void) target; (void) levels; (void) internalFormat; (void) width; - DISPATCH(TextureStorage1DEXT, (texture, target, levels, internalFormat, width), (F, "glTextureStorage1DEXT(%d, 0x%x, %d, 0x%x, %d);\n", texture, target, levels, internalFormat, width)); -} - -KEYWORD1 void KEYWORD2 NAME(TextureStorage2DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height) -{ - (void) texture; (void) target; (void) levels; (void) internalFormat; (void) width; (void) height; - DISPATCH(TextureStorage2DEXT, (texture, target, levels, internalFormat, width, height), (F, "glTextureStorage2DEXT(%d, 0x%x, %d, 0x%x, %d, %d);\n", texture, target, levels, internalFormat, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(TextureStorage3DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth) -{ - (void) texture; (void) target; (void) levels; (void) internalFormat; (void) width; (void) height; (void) depth; - DISPATCH(TextureStorage3DEXT, (texture, target, levels, internalFormat, width, height, depth), (F, "glTextureStorage3DEXT(%d, 0x%x, %d, 0x%x, %d, %d, %d);\n", texture, target, levels, internalFormat, width, height, depth)); -} - -KEYWORD1 void KEYWORD2 NAME(PolygonOffsetEXT)(GLfloat factor, GLfloat bias) -{ - (void) factor; (void) bias; - DISPATCH(PolygonOffsetEXT, (factor, bias), (F, "glPolygonOffsetEXT(%f, %f);\n", factor, bias)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_692)(GLenum pname, GLfloat * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_692)(GLenum pname, GLfloat * params) -{ - (void) pname; (void) params; - DISPATCH(GetPixelTexGenParameterfvSGIS, (pname, params), (F, "glGetPixelTexGenParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_693)(GLenum pname, GLint * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_693)(GLenum pname, GLint * params) -{ - (void) pname; (void) params; - DISPATCH(GetPixelTexGenParameterivSGIS, (pname, params), (F, "glGetPixelTexGenParameterivSGIS(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_694)(GLenum pname, GLfloat param); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_694)(GLenum pname, GLfloat param) -{ - (void) pname; (void) param; - DISPATCH(PixelTexGenParameterfSGIS, (pname, param), (F, "glPixelTexGenParameterfSGIS(0x%x, %f);\n", pname, param)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_695)(GLenum pname, const GLfloat * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_695)(GLenum pname, const GLfloat * params) -{ - (void) pname; (void) params; - DISPATCH(PixelTexGenParameterfvSGIS, (pname, params), (F, "glPixelTexGenParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_696)(GLenum pname, GLint param); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_696)(GLenum pname, GLint param) -{ - (void) pname; (void) param; - DISPATCH(PixelTexGenParameteriSGIS, (pname, param), (F, "glPixelTexGenParameteriSGIS(0x%x, %d);\n", pname, param)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_697)(GLenum pname, const GLint * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_697)(GLenum pname, const GLint * params) -{ - (void) pname; (void) params; - DISPATCH(PixelTexGenParameterivSGIS, (pname, params), (F, "glPixelTexGenParameterivSGIS(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_698)(GLclampf value, GLboolean invert); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_698)(GLclampf value, GLboolean invert) -{ - (void) value; (void) invert; - DISPATCH(SampleMaskSGIS, (value, invert), (F, "glSampleMaskSGIS(%f, %d);\n", value, invert)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_699)(GLenum pattern); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_699)(GLenum pattern) -{ - (void) pattern; - DISPATCH(SamplePatternSGIS, (pattern), (F, "glSamplePatternSGIS(0x%x);\n", pattern)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer) -{ - (void) size; (void) type; (void) stride; (void) count; (void) pointer; - DISPATCH(ColorPointerEXT, (size, type, stride, count, pointer), (F, "glColorPointerEXT(%d, 0x%x, %d, %d, %p);\n", size, type, stride, count, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(EdgeFlagPointerEXT)(GLsizei stride, GLsizei count, const GLboolean * pointer) -{ - (void) stride; (void) count; (void) pointer; - DISPATCH(EdgeFlagPointerEXT, (stride, count, pointer), (F, "glEdgeFlagPointerEXT(%d, %d, %p);\n", stride, count, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(IndexPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer) -{ - (void) type; (void) stride; (void) count; (void) pointer; - DISPATCH(IndexPointerEXT, (type, stride, count, pointer), (F, "glIndexPointerEXT(0x%x, %d, %d, %p);\n", type, stride, count, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(NormalPointerEXT)(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer) -{ - (void) type; (void) stride; (void) count; (void) pointer; - DISPATCH(NormalPointerEXT, (type, stride, count, pointer), (F, "glNormalPointerEXT(0x%x, %d, %d, %p);\n", type, stride, count, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(TexCoordPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer) -{ - (void) size; (void) type; (void) stride; (void) count; (void) pointer; - DISPATCH(TexCoordPointerEXT, (size, type, stride, count, pointer), (F, "glTexCoordPointerEXT(%d, 0x%x, %d, %d, %p);\n", size, type, stride, count, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexPointerEXT)(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer) -{ - (void) size; (void) type; (void) stride; (void) count; (void) pointer; - DISPATCH(VertexPointerEXT, (size, type, stride, count, pointer), (F, "glVertexPointerEXT(%d, 0x%x, %d, %d, %p);\n", size, type, stride, count, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameterf)(GLenum pname, GLfloat param) -{ - (void) pname; (void) param; - DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterf(0x%x, %f);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameterfARB)(GLenum pname, GLfloat param) -{ - (void) pname; (void) param; - DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfARB(0x%x, %f);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameterfEXT)(GLenum pname, GLfloat param) -{ - (void) pname; (void) param; - DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfEXT(0x%x, %f);\n", pname, param)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_706)(GLenum pname, GLfloat param); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_706)(GLenum pname, GLfloat param) -{ - (void) pname; (void) param; - DISPATCH(PointParameterfEXT, (pname, param), (F, "glPointParameterfSGIS(0x%x, %f);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameterfv)(GLenum pname, const GLfloat * params) -{ - (void) pname; (void) params; - DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfv(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameterfvARB)(GLenum pname, const GLfloat * params) -{ - (void) pname; (void) params; - DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvARB(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameterfvEXT)(GLenum pname, const GLfloat * params) -{ - (void) pname; (void) params; - DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvEXT(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_707)(GLenum pname, const GLfloat * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_707)(GLenum pname, const GLfloat * params) -{ - (void) pname; (void) params; - DISPATCH(PointParameterfvEXT, (pname, params), (F, "glPointParameterfvSGIS(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(LockArraysEXT)(GLint first, GLsizei count) -{ - (void) first; (void) count; - DISPATCH(LockArraysEXT, (first, count), (F, "glLockArraysEXT(%d, %d);\n", first, count)); -} - -KEYWORD1 void KEYWORD2 NAME(UnlockArraysEXT)(void) -{ - DISPATCH(UnlockArraysEXT, (), (F, "glUnlockArraysEXT();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3b)(GLbyte red, GLbyte green, GLbyte blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(SecondaryColor3bEXT, (red, green, blue), (F, "glSecondaryColor3b(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3bEXT)(GLbyte red, GLbyte green, GLbyte blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(SecondaryColor3bEXT, (red, green, blue), (F, "glSecondaryColor3bEXT(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3bv)(const GLbyte * v) -{ - (void) v; - DISPATCH(SecondaryColor3bvEXT, (v), (F, "glSecondaryColor3bv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3bvEXT)(const GLbyte * v) -{ - (void) v; - DISPATCH(SecondaryColor3bvEXT, (v), (F, "glSecondaryColor3bvEXT(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3d)(GLdouble red, GLdouble green, GLdouble blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(SecondaryColor3dEXT, (red, green, blue), (F, "glSecondaryColor3d(%f, %f, %f);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3dEXT)(GLdouble red, GLdouble green, GLdouble blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(SecondaryColor3dEXT, (red, green, blue), (F, "glSecondaryColor3dEXT(%f, %f, %f);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3dv)(const GLdouble * v) -{ - (void) v; - DISPATCH(SecondaryColor3dvEXT, (v), (F, "glSecondaryColor3dv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3dvEXT)(const GLdouble * v) -{ - (void) v; - DISPATCH(SecondaryColor3dvEXT, (v), (F, "glSecondaryColor3dvEXT(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3f)(GLfloat red, GLfloat green, GLfloat blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(SecondaryColor3fEXT, (red, green, blue), (F, "glSecondaryColor3f(%f, %f, %f);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3fEXT)(GLfloat red, GLfloat green, GLfloat blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(SecondaryColor3fEXT, (red, green, blue), (F, "glSecondaryColor3fEXT(%f, %f, %f);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3fv)(const GLfloat * v) -{ - (void) v; - DISPATCH(SecondaryColor3fvEXT, (v), (F, "glSecondaryColor3fv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3fvEXT)(const GLfloat * v) -{ - (void) v; - DISPATCH(SecondaryColor3fvEXT, (v), (F, "glSecondaryColor3fvEXT(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3i)(GLint red, GLint green, GLint blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(SecondaryColor3iEXT, (red, green, blue), (F, "glSecondaryColor3i(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3iEXT)(GLint red, GLint green, GLint blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(SecondaryColor3iEXT, (red, green, blue), (F, "glSecondaryColor3iEXT(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3iv)(const GLint * v) -{ - (void) v; - DISPATCH(SecondaryColor3ivEXT, (v), (F, "glSecondaryColor3iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ivEXT)(const GLint * v) -{ - (void) v; - DISPATCH(SecondaryColor3ivEXT, (v), (F, "glSecondaryColor3ivEXT(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3s)(GLshort red, GLshort green, GLshort blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(SecondaryColor3sEXT, (red, green, blue), (F, "glSecondaryColor3s(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3sEXT)(GLshort red, GLshort green, GLshort blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(SecondaryColor3sEXT, (red, green, blue), (F, "glSecondaryColor3sEXT(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3sv)(const GLshort * v) -{ - (void) v; - DISPATCH(SecondaryColor3svEXT, (v), (F, "glSecondaryColor3sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3svEXT)(const GLshort * v) -{ - (void) v; - DISPATCH(SecondaryColor3svEXT, (v), (F, "glSecondaryColor3svEXT(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ub)(GLubyte red, GLubyte green, GLubyte blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(SecondaryColor3ubEXT, (red, green, blue), (F, "glSecondaryColor3ub(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ubEXT)(GLubyte red, GLubyte green, GLubyte blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(SecondaryColor3ubEXT, (red, green, blue), (F, "glSecondaryColor3ubEXT(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ubv)(const GLubyte * v) -{ - (void) v; - DISPATCH(SecondaryColor3ubvEXT, (v), (F, "glSecondaryColor3ubv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ubvEXT)(const GLubyte * v) -{ - (void) v; - DISPATCH(SecondaryColor3ubvEXT, (v), (F, "glSecondaryColor3ubvEXT(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3ui)(GLuint red, GLuint green, GLuint blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(SecondaryColor3uiEXT, (red, green, blue), (F, "glSecondaryColor3ui(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3uiEXT)(GLuint red, GLuint green, GLuint blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(SecondaryColor3uiEXT, (red, green, blue), (F, "glSecondaryColor3uiEXT(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3uiv)(const GLuint * v) -{ - (void) v; - DISPATCH(SecondaryColor3uivEXT, (v), (F, "glSecondaryColor3uiv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3uivEXT)(const GLuint * v) -{ - (void) v; - DISPATCH(SecondaryColor3uivEXT, (v), (F, "glSecondaryColor3uivEXT(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3us)(GLushort red, GLushort green, GLushort blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(SecondaryColor3usEXT, (red, green, blue), (F, "glSecondaryColor3us(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3usEXT)(GLushort red, GLushort green, GLushort blue) -{ - (void) red; (void) green; (void) blue; - DISPATCH(SecondaryColor3usEXT, (red, green, blue), (F, "glSecondaryColor3usEXT(%d, %d, %d);\n", red, green, blue)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3usv)(const GLushort * v) -{ - (void) v; - DISPATCH(SecondaryColor3usvEXT, (v), (F, "glSecondaryColor3usv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColor3usvEXT)(const GLushort * v) -{ - (void) v; - DISPATCH(SecondaryColor3usvEXT, (v), (F, "glSecondaryColor3usvEXT(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) -{ - (void) size; (void) type; (void) stride; (void) pointer; - DISPATCH(SecondaryColorPointerEXT, (size, type, stride, pointer), (F, "glSecondaryColorPointer(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(SecondaryColorPointerEXT)(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) -{ - (void) size; (void) type; (void) stride; (void) pointer; - DISPATCH(SecondaryColorPointerEXT, (size, type, stride, pointer), (F, "glSecondaryColorPointerEXT(%d, 0x%x, %d, %p);\n", size, type, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiDrawArrays)(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount) -{ - (void) mode; (void) first; (void) count; (void) primcount; - DISPATCH(MultiDrawArraysEXT, (mode, first, count, primcount), (F, "glMultiDrawArrays(0x%x, %p, %p, %d);\n", mode, (const void *) first, (const void *) count, primcount)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiDrawArraysEXT)(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount) -{ - (void) mode; (void) first; (void) count; (void) primcount; - DISPATCH(MultiDrawArraysEXT, (mode, first, count, primcount), (F, "glMultiDrawArraysEXT(0x%x, %p, %p, %d);\n", mode, (const void *) first, (const void *) count, primcount)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiDrawElements)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount) -{ - (void) mode; (void) count; (void) type; (void) indices; (void) primcount; - DISPATCH(MultiDrawElementsEXT, (mode, count, type, indices, primcount), (F, "glMultiDrawElements(0x%x, %p, 0x%x, %p, %d);\n", mode, (const void *) count, type, (const void *) indices, primcount)); -} - -KEYWORD1 void KEYWORD2 NAME(MultiDrawElementsEXT)(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount) -{ - (void) mode; (void) count; (void) type; (void) indices; (void) primcount; - DISPATCH(MultiDrawElementsEXT, (mode, count, type, indices, primcount), (F, "glMultiDrawElementsEXT(0x%x, %p, 0x%x, %p, %d);\n", mode, (const void *) count, type, (const void *) indices, primcount)); -} - -KEYWORD1 void KEYWORD2 NAME(FogCoordPointer)(GLenum type, GLsizei stride, const GLvoid * pointer) -{ - (void) type; (void) stride; (void) pointer; - DISPATCH(FogCoordPointerEXT, (type, stride, pointer), (F, "glFogCoordPointer(0x%x, %d, %p);\n", type, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(FogCoordPointerEXT)(GLenum type, GLsizei stride, const GLvoid * pointer) -{ - (void) type; (void) stride; (void) pointer; - DISPATCH(FogCoordPointerEXT, (type, stride, pointer), (F, "glFogCoordPointerEXT(0x%x, %d, %p);\n", type, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(FogCoordd)(GLdouble coord) -{ - (void) coord; - DISPATCH(FogCoorddEXT, (coord), (F, "glFogCoordd(%f);\n", coord)); -} - -KEYWORD1 void KEYWORD2 NAME(FogCoorddEXT)(GLdouble coord) -{ - (void) coord; - DISPATCH(FogCoorddEXT, (coord), (F, "glFogCoorddEXT(%f);\n", coord)); -} - -KEYWORD1 void KEYWORD2 NAME(FogCoorddv)(const GLdouble * coord) -{ - (void) coord; - DISPATCH(FogCoorddvEXT, (coord), (F, "glFogCoorddv(%p);\n", (const void *) coord)); -} - -KEYWORD1 void KEYWORD2 NAME(FogCoorddvEXT)(const GLdouble * coord) -{ - (void) coord; - DISPATCH(FogCoorddvEXT, (coord), (F, "glFogCoorddvEXT(%p);\n", (const void *) coord)); -} - -KEYWORD1 void KEYWORD2 NAME(FogCoordf)(GLfloat coord) -{ - (void) coord; - DISPATCH(FogCoordfEXT, (coord), (F, "glFogCoordf(%f);\n", coord)); -} - -KEYWORD1 void KEYWORD2 NAME(FogCoordfEXT)(GLfloat coord) -{ - (void) coord; - DISPATCH(FogCoordfEXT, (coord), (F, "glFogCoordfEXT(%f);\n", coord)); -} - -KEYWORD1 void KEYWORD2 NAME(FogCoordfv)(const GLfloat * coord) -{ - (void) coord; - DISPATCH(FogCoordfvEXT, (coord), (F, "glFogCoordfv(%p);\n", (const void *) coord)); -} - -KEYWORD1 void KEYWORD2 NAME(FogCoordfvEXT)(const GLfloat * coord) -{ - (void) coord; - DISPATCH(FogCoordfvEXT, (coord), (F, "glFogCoordfvEXT(%p);\n", (const void *) coord)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_734)(GLenum mode); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_734)(GLenum mode) -{ - (void) mode; - DISPATCH(PixelTexGenSGIX, (mode), (F, "glPixelTexGenSGIX(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparate)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) -{ - (void) sfactorRGB; (void) dfactorRGB; (void) sfactorAlpha; (void) dfactorAlpha; - DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparate(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendFuncSeparateEXT)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) -{ - (void) sfactorRGB; (void) dfactorRGB; (void) sfactorAlpha; (void) dfactorAlpha; - DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparateEXT(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_735)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_735)(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) -{ - (void) sfactorRGB; (void) dfactorRGB; (void) sfactorAlpha; (void) dfactorAlpha; - DISPATCH(BlendFuncSeparateEXT, (sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha), (F, "glBlendFuncSeparateINGR(0x%x, 0x%x, 0x%x, 0x%x);\n", sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha)); -} - -KEYWORD1 void KEYWORD2 NAME(FlushVertexArrayRangeNV)(void) -{ - DISPATCH(FlushVertexArrayRangeNV, (), (F, "glFlushVertexArrayRangeNV();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(VertexArrayRangeNV)(GLsizei length, const GLvoid * pointer) -{ - (void) length; (void) pointer; - DISPATCH(VertexArrayRangeNV, (length, pointer), (F, "glVertexArrayRangeNV(%d, %p);\n", length, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(CombinerInputNV)(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage) -{ - (void) stage; (void) portion; (void) variable; (void) input; (void) mapping; (void) componentUsage; - DISPATCH(CombinerInputNV, (stage, portion, variable, input, mapping, componentUsage), (F, "glCombinerInputNV(0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x);\n", stage, portion, variable, input, mapping, componentUsage)); -} - -KEYWORD1 void KEYWORD2 NAME(CombinerOutputNV)(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum) -{ - (void) stage; (void) portion; (void) abOutput; (void) cdOutput; (void) sumOutput; (void) scale; (void) bias; (void) abDotProduct; (void) cdDotProduct; (void) muxSum; - DISPATCH(CombinerOutputNV, (stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum), (F, "glCombinerOutputNV(0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, %d, %d, %d);\n", stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum)); -} - -KEYWORD1 void KEYWORD2 NAME(CombinerParameterfNV)(GLenum pname, GLfloat param) -{ - (void) pname; (void) param; - DISPATCH(CombinerParameterfNV, (pname, param), (F, "glCombinerParameterfNV(0x%x, %f);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(CombinerParameterfvNV)(GLenum pname, const GLfloat * params) -{ - (void) pname; (void) params; - DISPATCH(CombinerParameterfvNV, (pname, params), (F, "glCombinerParameterfvNV(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(CombinerParameteriNV)(GLenum pname, GLint param) -{ - (void) pname; (void) param; - DISPATCH(CombinerParameteriNV, (pname, param), (F, "glCombinerParameteriNV(0x%x, %d);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(CombinerParameterivNV)(GLenum pname, const GLint * params) -{ - (void) pname; (void) params; - DISPATCH(CombinerParameterivNV, (pname, params), (F, "glCombinerParameterivNV(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(FinalCombinerInputNV)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage) -{ - (void) variable; (void) input; (void) mapping; (void) componentUsage; - DISPATCH(FinalCombinerInputNV, (variable, input, mapping, componentUsage), (F, "glFinalCombinerInputNV(0x%x, 0x%x, 0x%x, 0x%x);\n", variable, input, mapping, componentUsage)); -} - -KEYWORD1 void KEYWORD2 NAME(GetCombinerInputParameterfvNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params) -{ - (void) stage; (void) portion; (void) variable; (void) pname; (void) params; - DISPATCH(GetCombinerInputParameterfvNV, (stage, portion, variable, pname, params), (F, "glGetCombinerInputParameterfvNV(0x%x, 0x%x, 0x%x, 0x%x, %p);\n", stage, portion, variable, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetCombinerInputParameterivNV)(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params) -{ - (void) stage; (void) portion; (void) variable; (void) pname; (void) params; - DISPATCH(GetCombinerInputParameterivNV, (stage, portion, variable, pname, params), (F, "glGetCombinerInputParameterivNV(0x%x, 0x%x, 0x%x, 0x%x, %p);\n", stage, portion, variable, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetCombinerOutputParameterfvNV)(GLenum stage, GLenum portion, GLenum pname, GLfloat * params) -{ - (void) stage; (void) portion; (void) pname; (void) params; - DISPATCH(GetCombinerOutputParameterfvNV, (stage, portion, pname, params), (F, "glGetCombinerOutputParameterfvNV(0x%x, 0x%x, 0x%x, %p);\n", stage, portion, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetCombinerOutputParameterivNV)(GLenum stage, GLenum portion, GLenum pname, GLint * params) -{ - (void) stage; (void) portion; (void) pname; (void) params; - DISPATCH(GetCombinerOutputParameterivNV, (stage, portion, pname, params), (F, "glGetCombinerOutputParameterivNV(0x%x, 0x%x, 0x%x, %p);\n", stage, portion, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetFinalCombinerInputParameterfvNV)(GLenum variable, GLenum pname, GLfloat * params) -{ - (void) variable; (void) pname; (void) params; - DISPATCH(GetFinalCombinerInputParameterfvNV, (variable, pname, params), (F, "glGetFinalCombinerInputParameterfvNV(0x%x, 0x%x, %p);\n", variable, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetFinalCombinerInputParameterivNV)(GLenum variable, GLenum pname, GLint * params) -{ - (void) variable; (void) pname; (void) params; - DISPATCH(GetFinalCombinerInputParameterivNV, (variable, pname, params), (F, "glGetFinalCombinerInputParameterivNV(0x%x, 0x%x, %p);\n", variable, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ResizeBuffersMESA)(void) -{ - DISPATCH(ResizeBuffersMESA, (), (F, "glResizeBuffersMESA();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2d)(GLdouble x, GLdouble y) -{ - (void) x; (void) y; - DISPATCH(WindowPos2dMESA, (x, y), (F, "glWindowPos2d(%f, %f);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2dARB)(GLdouble x, GLdouble y) -{ - (void) x; (void) y; - DISPATCH(WindowPos2dMESA, (x, y), (F, "glWindowPos2dARB(%f, %f);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2dMESA)(GLdouble x, GLdouble y) -{ - (void) x; (void) y; - DISPATCH(WindowPos2dMESA, (x, y), (F, "glWindowPos2dMESA(%f, %f);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2dv)(const GLdouble * v) -{ - (void) v; - DISPATCH(WindowPos2dvMESA, (v), (F, "glWindowPos2dv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2dvARB)(const GLdouble * v) -{ - (void) v; - DISPATCH(WindowPos2dvMESA, (v), (F, "glWindowPos2dvARB(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2dvMESA)(const GLdouble * v) -{ - (void) v; - DISPATCH(WindowPos2dvMESA, (v), (F, "glWindowPos2dvMESA(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2f)(GLfloat x, GLfloat y) -{ - (void) x; (void) y; - DISPATCH(WindowPos2fMESA, (x, y), (F, "glWindowPos2f(%f, %f);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2fARB)(GLfloat x, GLfloat y) -{ - (void) x; (void) y; - DISPATCH(WindowPos2fMESA, (x, y), (F, "glWindowPos2fARB(%f, %f);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2fMESA)(GLfloat x, GLfloat y) -{ - (void) x; (void) y; - DISPATCH(WindowPos2fMESA, (x, y), (F, "glWindowPos2fMESA(%f, %f);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2fv)(const GLfloat * v) -{ - (void) v; - DISPATCH(WindowPos2fvMESA, (v), (F, "glWindowPos2fv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2fvARB)(const GLfloat * v) -{ - (void) v; - DISPATCH(WindowPos2fvMESA, (v), (F, "glWindowPos2fvARB(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2fvMESA)(const GLfloat * v) -{ - (void) v; - DISPATCH(WindowPos2fvMESA, (v), (F, "glWindowPos2fvMESA(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2i)(GLint x, GLint y) -{ - (void) x; (void) y; - DISPATCH(WindowPos2iMESA, (x, y), (F, "glWindowPos2i(%d, %d);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2iARB)(GLint x, GLint y) -{ - (void) x; (void) y; - DISPATCH(WindowPos2iMESA, (x, y), (F, "glWindowPos2iARB(%d, %d);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2iMESA)(GLint x, GLint y) -{ - (void) x; (void) y; - DISPATCH(WindowPos2iMESA, (x, y), (F, "glWindowPos2iMESA(%d, %d);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2iv)(const GLint * v) -{ - (void) v; - DISPATCH(WindowPos2ivMESA, (v), (F, "glWindowPos2iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2ivARB)(const GLint * v) -{ - (void) v; - DISPATCH(WindowPos2ivMESA, (v), (F, "glWindowPos2ivARB(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2ivMESA)(const GLint * v) -{ - (void) v; - DISPATCH(WindowPos2ivMESA, (v), (F, "glWindowPos2ivMESA(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2s)(GLshort x, GLshort y) -{ - (void) x; (void) y; - DISPATCH(WindowPos2sMESA, (x, y), (F, "glWindowPos2s(%d, %d);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2sARB)(GLshort x, GLshort y) -{ - (void) x; (void) y; - DISPATCH(WindowPos2sMESA, (x, y), (F, "glWindowPos2sARB(%d, %d);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2sMESA)(GLshort x, GLshort y) -{ - (void) x; (void) y; - DISPATCH(WindowPos2sMESA, (x, y), (F, "glWindowPos2sMESA(%d, %d);\n", x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2sv)(const GLshort * v) -{ - (void) v; - DISPATCH(WindowPos2svMESA, (v), (F, "glWindowPos2sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2svARB)(const GLshort * v) -{ - (void) v; - DISPATCH(WindowPos2svMESA, (v), (F, "glWindowPos2svARB(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos2svMESA)(const GLshort * v) -{ - (void) v; - DISPATCH(WindowPos2svMESA, (v), (F, "glWindowPos2svMESA(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3d)(GLdouble x, GLdouble y, GLdouble z) -{ - (void) x; (void) y; (void) z; - DISPATCH(WindowPos3dMESA, (x, y, z), (F, "glWindowPos3d(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3dARB)(GLdouble x, GLdouble y, GLdouble z) -{ - (void) x; (void) y; (void) z; - DISPATCH(WindowPos3dMESA, (x, y, z), (F, "glWindowPos3dARB(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3dMESA)(GLdouble x, GLdouble y, GLdouble z) -{ - (void) x; (void) y; (void) z; - DISPATCH(WindowPos3dMESA, (x, y, z), (F, "glWindowPos3dMESA(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3dv)(const GLdouble * v) -{ - (void) v; - DISPATCH(WindowPos3dvMESA, (v), (F, "glWindowPos3dv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3dvARB)(const GLdouble * v) -{ - (void) v; - DISPATCH(WindowPos3dvMESA, (v), (F, "glWindowPos3dvARB(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3dvMESA)(const GLdouble * v) -{ - (void) v; - DISPATCH(WindowPos3dvMESA, (v), (F, "glWindowPos3dvMESA(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3f)(GLfloat x, GLfloat y, GLfloat z) -{ - (void) x; (void) y; (void) z; - DISPATCH(WindowPos3fMESA, (x, y, z), (F, "glWindowPos3f(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3fARB)(GLfloat x, GLfloat y, GLfloat z) -{ - (void) x; (void) y; (void) z; - DISPATCH(WindowPos3fMESA, (x, y, z), (F, "glWindowPos3fARB(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3fMESA)(GLfloat x, GLfloat y, GLfloat z) -{ - (void) x; (void) y; (void) z; - DISPATCH(WindowPos3fMESA, (x, y, z), (F, "glWindowPos3fMESA(%f, %f, %f);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3fv)(const GLfloat * v) -{ - (void) v; - DISPATCH(WindowPos3fvMESA, (v), (F, "glWindowPos3fv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3fvARB)(const GLfloat * v) -{ - (void) v; - DISPATCH(WindowPos3fvMESA, (v), (F, "glWindowPos3fvARB(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3fvMESA)(const GLfloat * v) -{ - (void) v; - DISPATCH(WindowPos3fvMESA, (v), (F, "glWindowPos3fvMESA(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3i)(GLint x, GLint y, GLint z) -{ - (void) x; (void) y; (void) z; - DISPATCH(WindowPos3iMESA, (x, y, z), (F, "glWindowPos3i(%d, %d, %d);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3iARB)(GLint x, GLint y, GLint z) -{ - (void) x; (void) y; (void) z; - DISPATCH(WindowPos3iMESA, (x, y, z), (F, "glWindowPos3iARB(%d, %d, %d);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3iMESA)(GLint x, GLint y, GLint z) -{ - (void) x; (void) y; (void) z; - DISPATCH(WindowPos3iMESA, (x, y, z), (F, "glWindowPos3iMESA(%d, %d, %d);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3iv)(const GLint * v) -{ - (void) v; - DISPATCH(WindowPos3ivMESA, (v), (F, "glWindowPos3iv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3ivARB)(const GLint * v) -{ - (void) v; - DISPATCH(WindowPos3ivMESA, (v), (F, "glWindowPos3ivARB(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3ivMESA)(const GLint * v) -{ - (void) v; - DISPATCH(WindowPos3ivMESA, (v), (F, "glWindowPos3ivMESA(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3s)(GLshort x, GLshort y, GLshort z) -{ - (void) x; (void) y; (void) z; - DISPATCH(WindowPos3sMESA, (x, y, z), (F, "glWindowPos3s(%d, %d, %d);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3sARB)(GLshort x, GLshort y, GLshort z) -{ - (void) x; (void) y; (void) z; - DISPATCH(WindowPos3sMESA, (x, y, z), (F, "glWindowPos3sARB(%d, %d, %d);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3sMESA)(GLshort x, GLshort y, GLshort z) -{ - (void) x; (void) y; (void) z; - DISPATCH(WindowPos3sMESA, (x, y, z), (F, "glWindowPos3sMESA(%d, %d, %d);\n", x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3sv)(const GLshort * v) -{ - (void) v; - DISPATCH(WindowPos3svMESA, (v), (F, "glWindowPos3sv(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3svARB)(const GLshort * v) -{ - (void) v; - DISPATCH(WindowPos3svMESA, (v), (F, "glWindowPos3svARB(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos3svMESA)(const GLshort * v) -{ - (void) v; - DISPATCH(WindowPos3svMESA, (v), (F, "glWindowPos3svMESA(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos4dMESA)(GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - (void) x; (void) y; (void) z; (void) w; - DISPATCH(WindowPos4dMESA, (x, y, z, w), (F, "glWindowPos4dMESA(%f, %f, %f, %f);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos4dvMESA)(const GLdouble * v) -{ - (void) v; - DISPATCH(WindowPos4dvMESA, (v), (F, "glWindowPos4dvMESA(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos4fMESA)(GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - (void) x; (void) y; (void) z; (void) w; - DISPATCH(WindowPos4fMESA, (x, y, z, w), (F, "glWindowPos4fMESA(%f, %f, %f, %f);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos4fvMESA)(const GLfloat * v) -{ - (void) v; - DISPATCH(WindowPos4fvMESA, (v), (F, "glWindowPos4fvMESA(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos4iMESA)(GLint x, GLint y, GLint z, GLint w) -{ - (void) x; (void) y; (void) z; (void) w; - DISPATCH(WindowPos4iMESA, (x, y, z, w), (F, "glWindowPos4iMESA(%d, %d, %d, %d);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos4ivMESA)(const GLint * v) -{ - (void) v; - DISPATCH(WindowPos4ivMESA, (v), (F, "glWindowPos4ivMESA(%p);\n", (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos4sMESA)(GLshort x, GLshort y, GLshort z, GLshort w) -{ - (void) x; (void) y; (void) z; (void) w; - DISPATCH(WindowPos4sMESA, (x, y, z, w), (F, "glWindowPos4sMESA(%d, %d, %d, %d);\n", x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(WindowPos4svMESA)(const GLshort * v) -{ - (void) v; - DISPATCH(WindowPos4svMESA, (v), (F, "glWindowPos4svMESA(%p);\n", (const void *) v)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_776)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_776)(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride) -{ - (void) mode; (void) first; (void) count; (void) primcount; (void) modestride; - DISPATCH(MultiModeDrawArraysIBM, (mode, first, count, primcount, modestride), (F, "glMultiModeDrawArraysIBM(%p, %p, %p, %d, %d);\n", (const void *) mode, (const void *) first, (const void *) count, primcount, modestride)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_777)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_777)(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride) -{ - (void) mode; (void) count; (void) type; (void) indices; (void) primcount; (void) modestride; - DISPATCH(MultiModeDrawElementsIBM, (mode, count, type, indices, primcount, modestride), (F, "glMultiModeDrawElementsIBM(%p, %p, 0x%x, %p, %d, %d);\n", (const void *) mode, (const void *) count, type, (const void *) indices, primcount, modestride)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_778)(GLsizei n, const GLuint * fences); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_778)(GLsizei n, const GLuint * fences) -{ - (void) n; (void) fences; - DISPATCH(DeleteFencesNV, (n, fences), (F, "glDeleteFencesNV(%d, %p);\n", n, (const void *) fences)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_779)(GLuint fence); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_779)(GLuint fence) -{ - (void) fence; - DISPATCH(FinishFenceNV, (fence), (F, "glFinishFenceNV(%d);\n", fence)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_780)(GLsizei n, GLuint * fences); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_780)(GLsizei n, GLuint * fences) -{ - (void) n; (void) fences; - DISPATCH(GenFencesNV, (n, fences), (F, "glGenFencesNV(%d, %p);\n", n, (const void *) fences)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_781)(GLuint fence, GLenum pname, GLint * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_781)(GLuint fence, GLenum pname, GLint * params) -{ - (void) fence; (void) pname; (void) params; - DISPATCH(GetFenceivNV, (fence, pname, params), (F, "glGetFenceivNV(%d, 0x%x, %p);\n", fence, pname, (const void *) params)); -} - -KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_782)(GLuint fence); - -KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_782)(GLuint fence) -{ - (void) fence; - RETURN_DISPATCH(IsFenceNV, (fence), (F, "glIsFenceNV(%d);\n", fence)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_783)(GLuint fence, GLenum condition); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_783)(GLuint fence, GLenum condition) -{ - (void) fence; (void) condition; - DISPATCH(SetFenceNV, (fence, condition), (F, "glSetFenceNV(%d, 0x%x);\n", fence, condition)); -} - -KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_784)(GLuint fence); - -KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_784)(GLuint fence) -{ - (void) fence; - RETURN_DISPATCH(TestFenceNV, (fence), (F, "glTestFenceNV(%d);\n", fence)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(AreProgramsResidentNV)(GLsizei n, const GLuint * ids, GLboolean * residences) -{ - (void) n; (void) ids; (void) residences; - RETURN_DISPATCH(AreProgramsResidentNV, (n, ids, residences), (F, "glAreProgramsResidentNV(%d, %p, %p);\n", n, (const void *) ids, (const void *) residences)); -} - -KEYWORD1 void KEYWORD2 NAME(BindProgramARB)(GLenum target, GLuint program) -{ - (void) target; (void) program; - DISPATCH(BindProgramNV, (target, program), (F, "glBindProgramARB(0x%x, %d);\n", target, program)); -} - -KEYWORD1 void KEYWORD2 NAME(BindProgramNV)(GLenum target, GLuint program) -{ - (void) target; (void) program; - DISPATCH(BindProgramNV, (target, program), (F, "glBindProgramNV(0x%x, %d);\n", target, program)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteProgramsARB)(GLsizei n, const GLuint * programs) -{ - (void) n; (void) programs; - DISPATCH(DeleteProgramsNV, (n, programs), (F, "glDeleteProgramsARB(%d, %p);\n", n, (const void *) programs)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteProgramsNV)(GLsizei n, const GLuint * programs) -{ - (void) n; (void) programs; - DISPATCH(DeleteProgramsNV, (n, programs), (F, "glDeleteProgramsNV(%d, %p);\n", n, (const void *) programs)); -} - -KEYWORD1 void KEYWORD2 NAME(ExecuteProgramNV)(GLenum target, GLuint id, const GLfloat * params) -{ - (void) target; (void) id; (void) params; - DISPATCH(ExecuteProgramNV, (target, id, params), (F, "glExecuteProgramNV(0x%x, %d, %p);\n", target, id, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GenProgramsARB)(GLsizei n, GLuint * programs) -{ - (void) n; (void) programs; - DISPATCH(GenProgramsNV, (n, programs), (F, "glGenProgramsARB(%d, %p);\n", n, (const void *) programs)); -} - -KEYWORD1 void KEYWORD2 NAME(GenProgramsNV)(GLsizei n, GLuint * programs) -{ - (void) n; (void) programs; - DISPATCH(GenProgramsNV, (n, programs), (F, "glGenProgramsNV(%d, %p);\n", n, (const void *) programs)); -} - -KEYWORD1 void KEYWORD2 NAME(GetProgramParameterdvNV)(GLenum target, GLuint index, GLenum pname, GLdouble * params) -{ - (void) target; (void) index; (void) pname; (void) params; - DISPATCH(GetProgramParameterdvNV, (target, index, pname, params), (F, "glGetProgramParameterdvNV(0x%x, %d, 0x%x, %p);\n", target, index, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetProgramParameterfvNV)(GLenum target, GLuint index, GLenum pname, GLfloat * params) -{ - (void) target; (void) index; (void) pname; (void) params; - DISPATCH(GetProgramParameterfvNV, (target, index, pname, params), (F, "glGetProgramParameterfvNV(0x%x, %d, 0x%x, %p);\n", target, index, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program) -{ - (void) id; (void) pname; (void) program; - DISPATCH(GetProgramStringNV, (id, pname, program), (F, "glGetProgramStringNV(%d, 0x%x, %p);\n", id, pname, (const void *) program)); -} - -KEYWORD1 void KEYWORD2 NAME(GetProgramivNV)(GLuint id, GLenum pname, GLint * params) -{ - (void) id; (void) pname; (void) params; - DISPATCH(GetProgramivNV, (id, pname, params), (F, "glGetProgramivNV(%d, 0x%x, %p);\n", id, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params) -{ - (void) target; (void) address; (void) pname; (void) params; - DISPATCH(GetTrackMatrixivNV, (target, address, pname, params), (F, "glGetTrackMatrixivNV(0x%x, %d, 0x%x, %p);\n", target, address, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid ** pointer) -{ - (void) index; (void) pname; (void) pointer; - DISPATCH(GetVertexAttribPointervNV, (index, pname, pointer), (F, "glGetVertexAttribPointerv(%d, 0x%x, %p);\n", index, pname, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribPointervARB)(GLuint index, GLenum pname, GLvoid ** pointer) -{ - (void) index; (void) pname; (void) pointer; - DISPATCH(GetVertexAttribPointervNV, (index, pname, pointer), (F, "glGetVertexAttribPointervARB(%d, 0x%x, %p);\n", index, pname, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** pointer) -{ - (void) index; (void) pname; (void) pointer; - DISPATCH(GetVertexAttribPointervNV, (index, pname, pointer), (F, "glGetVertexAttribPointervNV(%d, 0x%x, %p);\n", index, pname, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params) -{ - (void) index; (void) pname; (void) params; - DISPATCH(GetVertexAttribdvNV, (index, pname, params), (F, "glGetVertexAttribdvNV(%d, 0x%x, %p);\n", index, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params) -{ - (void) index; (void) pname; (void) params; - DISPATCH(GetVertexAttribfvNV, (index, pname, params), (F, "glGetVertexAttribfvNV(%d, 0x%x, %p);\n", index, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params) -{ - (void) index; (void) pname; (void) params; - DISPATCH(GetVertexAttribivNV, (index, pname, params), (F, "glGetVertexAttribivNV(%d, 0x%x, %p);\n", index, pname, (const void *) params)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsProgramARB)(GLuint program) -{ - (void) program; - RETURN_DISPATCH(IsProgramNV, (program), (F, "glIsProgramARB(%d);\n", program)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsProgramNV)(GLuint program) -{ - (void) program; - RETURN_DISPATCH(IsProgramNV, (program), (F, "glIsProgramNV(%d);\n", program)); -} - -KEYWORD1 void KEYWORD2 NAME(LoadProgramNV)(GLenum target, GLuint id, GLsizei len, const GLubyte * program) -{ - (void) target; (void) id; (void) len; (void) program; - DISPATCH(LoadProgramNV, (target, id, len, program), (F, "glLoadProgramNV(0x%x, %d, %d, %p);\n", target, id, len, (const void *) program)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramParameters4dvNV)(GLenum target, GLuint index, GLsizei num, const GLdouble * params) -{ - (void) target; (void) index; (void) num; (void) params; - DISPATCH(ProgramParameters4dvNV, (target, index, num, params), (F, "glProgramParameters4dvNV(0x%x, %d, %d, %p);\n", target, index, num, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramParameters4fvNV)(GLenum target, GLuint index, GLsizei num, const GLfloat * params) -{ - (void) target; (void) index; (void) num; (void) params; - DISPATCH(ProgramParameters4fvNV, (target, index, num, params), (F, "glProgramParameters4fvNV(0x%x, %d, %d, %p);\n", target, index, num, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(RequestResidentProgramsNV)(GLsizei n, const GLuint * ids) -{ - (void) n; (void) ids; - DISPATCH(RequestResidentProgramsNV, (n, ids), (F, "glRequestResidentProgramsNV(%d, %p);\n", n, (const void *) ids)); -} - -KEYWORD1 void KEYWORD2 NAME(TrackMatrixNV)(GLenum target, GLuint address, GLenum matrix, GLenum transform) -{ - (void) target; (void) address; (void) matrix; (void) transform; - DISPATCH(TrackMatrixNV, (target, address, matrix, transform), (F, "glTrackMatrixNV(0x%x, %d, 0x%x, 0x%x);\n", target, address, matrix, transform)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1dNV)(GLuint index, GLdouble x) -{ - (void) index; (void) x; - DISPATCH(VertexAttrib1dNV, (index, x), (F, "glVertexAttrib1dNV(%d, %f);\n", index, x)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1dvNV)(GLuint index, const GLdouble * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib1dvNV, (index, v), (F, "glVertexAttrib1dvNV(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1fNV)(GLuint index, GLfloat x) -{ - (void) index; (void) x; - DISPATCH(VertexAttrib1fNV, (index, x), (F, "glVertexAttrib1fNV(%d, %f);\n", index, x)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1fvNV)(GLuint index, const GLfloat * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib1fvNV, (index, v), (F, "glVertexAttrib1fvNV(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1sNV)(GLuint index, GLshort x) -{ - (void) index; (void) x; - DISPATCH(VertexAttrib1sNV, (index, x), (F, "glVertexAttrib1sNV(%d, %d);\n", index, x)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib1svNV)(GLuint index, const GLshort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib1svNV, (index, v), (F, "glVertexAttrib1svNV(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2dNV)(GLuint index, GLdouble x, GLdouble y) -{ - (void) index; (void) x; (void) y; - DISPATCH(VertexAttrib2dNV, (index, x, y), (F, "glVertexAttrib2dNV(%d, %f, %f);\n", index, x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2dvNV)(GLuint index, const GLdouble * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib2dvNV, (index, v), (F, "glVertexAttrib2dvNV(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fNV)(GLuint index, GLfloat x, GLfloat y) -{ - (void) index; (void) x; (void) y; - DISPATCH(VertexAttrib2fNV, (index, x, y), (F, "glVertexAttrib2fNV(%d, %f, %f);\n", index, x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2fvNV)(GLuint index, const GLfloat * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib2fvNV, (index, v), (F, "glVertexAttrib2fvNV(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2sNV)(GLuint index, GLshort x, GLshort y) -{ - (void) index; (void) x; (void) y; - DISPATCH(VertexAttrib2sNV, (index, x, y), (F, "glVertexAttrib2sNV(%d, %d, %d);\n", index, x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib2svNV)(GLuint index, const GLshort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib2svNV, (index, v), (F, "glVertexAttrib2svNV(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z) -{ - (void) index; (void) x; (void) y; (void) z; - DISPATCH(VertexAttrib3dNV, (index, x, y, z), (F, "glVertexAttrib3dNV(%d, %f, %f, %f);\n", index, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3dvNV)(GLuint index, const GLdouble * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib3dvNV, (index, v), (F, "glVertexAttrib3dvNV(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z) -{ - (void) index; (void) x; (void) y; (void) z; - DISPATCH(VertexAttrib3fNV, (index, x, y, z), (F, "glVertexAttrib3fNV(%d, %f, %f, %f);\n", index, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3fvNV)(GLuint index, const GLfloat * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib3fvNV, (index, v), (F, "glVertexAttrib3fvNV(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3sNV)(GLuint index, GLshort x, GLshort y, GLshort z) -{ - (void) index; (void) x; (void) y; (void) z; - DISPATCH(VertexAttrib3sNV, (index, x, y, z), (F, "glVertexAttrib3sNV(%d, %d, %d, %d);\n", index, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib3svNV)(GLuint index, const GLshort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib3svNV, (index, v), (F, "glVertexAttrib3svNV(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4dNV)(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(VertexAttrib4dNV, (index, x, y, z, w), (F, "glVertexAttrib4dNV(%d, %f, %f, %f, %f);\n", index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4dvNV)(GLuint index, const GLdouble * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4dvNV, (index, v), (F, "glVertexAttrib4dvNV(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fNV)(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(VertexAttrib4fNV, (index, x, y, z, w), (F, "glVertexAttrib4fNV(%d, %f, %f, %f, %f);\n", index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fvNV)(GLuint index, const GLfloat * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4fvNV, (index, v), (F, "glVertexAttrib4fvNV(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4sNV)(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) -{ - (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(VertexAttrib4sNV, (index, x, y, z, w), (F, "glVertexAttrib4sNV(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4svNV)(GLuint index, const GLshort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4svNV, (index, v), (F, "glVertexAttrib4svNV(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ubNV)(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) -{ - (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(VertexAttrib4ubNV, (index, x, y, z, w), (F, "glVertexAttrib4ubNV(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ubvNV)(GLuint index, const GLubyte * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttrib4ubvNV, (index, v), (F, "glVertexAttrib4ubvNV(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribPointerNV)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) -{ - (void) index; (void) size; (void) type; (void) stride; (void) pointer; - DISPATCH(VertexAttribPointerNV, (index, size, type, stride, pointer), (F, "glVertexAttribPointerNV(%d, %d, 0x%x, %d, %p);\n", index, size, type, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs1dvNV)(GLuint index, GLsizei n, const GLdouble * v) -{ - (void) index; (void) n; (void) v; - DISPATCH(VertexAttribs1dvNV, (index, n, v), (F, "glVertexAttribs1dvNV(%d, %d, %p);\n", index, n, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs1fvNV)(GLuint index, GLsizei n, const GLfloat * v) -{ - (void) index; (void) n; (void) v; - DISPATCH(VertexAttribs1fvNV, (index, n, v), (F, "glVertexAttribs1fvNV(%d, %d, %p);\n", index, n, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs1svNV)(GLuint index, GLsizei n, const GLshort * v) -{ - (void) index; (void) n; (void) v; - DISPATCH(VertexAttribs1svNV, (index, n, v), (F, "glVertexAttribs1svNV(%d, %d, %p);\n", index, n, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs2dvNV)(GLuint index, GLsizei n, const GLdouble * v) -{ - (void) index; (void) n; (void) v; - DISPATCH(VertexAttribs2dvNV, (index, n, v), (F, "glVertexAttribs2dvNV(%d, %d, %p);\n", index, n, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs2fvNV)(GLuint index, GLsizei n, const GLfloat * v) -{ - (void) index; (void) n; (void) v; - DISPATCH(VertexAttribs2fvNV, (index, n, v), (F, "glVertexAttribs2fvNV(%d, %d, %p);\n", index, n, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs2svNV)(GLuint index, GLsizei n, const GLshort * v) -{ - (void) index; (void) n; (void) v; - DISPATCH(VertexAttribs2svNV, (index, n, v), (F, "glVertexAttribs2svNV(%d, %d, %p);\n", index, n, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs3dvNV)(GLuint index, GLsizei n, const GLdouble * v) -{ - (void) index; (void) n; (void) v; - DISPATCH(VertexAttribs3dvNV, (index, n, v), (F, "glVertexAttribs3dvNV(%d, %d, %p);\n", index, n, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs3fvNV)(GLuint index, GLsizei n, const GLfloat * v) -{ - (void) index; (void) n; (void) v; - DISPATCH(VertexAttribs3fvNV, (index, n, v), (F, "glVertexAttribs3fvNV(%d, %d, %p);\n", index, n, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs3svNV)(GLuint index, GLsizei n, const GLshort * v) -{ - (void) index; (void) n; (void) v; - DISPATCH(VertexAttribs3svNV, (index, n, v), (F, "glVertexAttribs3svNV(%d, %d, %p);\n", index, n, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs4dvNV)(GLuint index, GLsizei n, const GLdouble * v) -{ - (void) index; (void) n; (void) v; - DISPATCH(VertexAttribs4dvNV, (index, n, v), (F, "glVertexAttribs4dvNV(%d, %d, %p);\n", index, n, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs4fvNV)(GLuint index, GLsizei n, const GLfloat * v) -{ - (void) index; (void) n; (void) v; - DISPATCH(VertexAttribs4fvNV, (index, n, v), (F, "glVertexAttribs4fvNV(%d, %d, %p);\n", index, n, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs4svNV)(GLuint index, GLsizei n, const GLshort * v) -{ - (void) index; (void) n; (void) v; - DISPATCH(VertexAttribs4svNV, (index, n, v), (F, "glVertexAttribs4svNV(%d, %d, %p);\n", index, n, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribs4ubvNV)(GLuint index, GLsizei n, const GLubyte * v) -{ - (void) index; (void) n; (void) v; - DISPATCH(VertexAttribs4ubvNV, (index, n, v), (F, "glVertexAttribs4ubvNV(%d, %d, %p);\n", index, n, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexBumpParameterfvATI)(GLenum pname, GLfloat * param) -{ - (void) pname; (void) param; - DISPATCH(GetTexBumpParameterfvATI, (pname, param), (F, "glGetTexBumpParameterfvATI(0x%x, %p);\n", pname, (const void *) param)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexBumpParameterivATI)(GLenum pname, GLint * param) -{ - (void) pname; (void) param; - DISPATCH(GetTexBumpParameterivATI, (pname, param), (F, "glGetTexBumpParameterivATI(0x%x, %p);\n", pname, (const void *) param)); -} - -KEYWORD1 void KEYWORD2 NAME(TexBumpParameterfvATI)(GLenum pname, const GLfloat * param) -{ - (void) pname; (void) param; - DISPATCH(TexBumpParameterfvATI, (pname, param), (F, "glTexBumpParameterfvATI(0x%x, %p);\n", pname, (const void *) param)); -} - -KEYWORD1 void KEYWORD2 NAME(TexBumpParameterivATI)(GLenum pname, const GLint * param) -{ - (void) pname; (void) param; - DISPATCH(TexBumpParameterivATI, (pname, param), (F, "glTexBumpParameterivATI(0x%x, %p);\n", pname, (const void *) param)); -} - -KEYWORD1 void KEYWORD2 NAME(AlphaFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod) -{ - (void) op; (void) dst; (void) dstMod; (void) arg1; (void) arg1Rep; (void) arg1Mod; - DISPATCH(AlphaFragmentOp1ATI, (op, dst, dstMod, arg1, arg1Rep, arg1Mod), (F, "glAlphaFragmentOp1ATI(0x%x, %d, %d, %d, %d, %d);\n", op, dst, dstMod, arg1, arg1Rep, arg1Mod)); -} - -KEYWORD1 void KEYWORD2 NAME(AlphaFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod) -{ - (void) op; (void) dst; (void) dstMod; (void) arg1; (void) arg1Rep; (void) arg1Mod; (void) arg2; (void) arg2Rep; (void) arg2Mod; - DISPATCH(AlphaFragmentOp2ATI, (op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod), (F, "glAlphaFragmentOp2ATI(0x%x, %d, %d, %d, %d, %d, %d, %d, %d);\n", op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod)); -} - -KEYWORD1 void KEYWORD2 NAME(AlphaFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod) -{ - (void) op; (void) dst; (void) dstMod; (void) arg1; (void) arg1Rep; (void) arg1Mod; (void) arg2; (void) arg2Rep; (void) arg2Mod; (void) arg3; (void) arg3Rep; (void) arg3Mod; - DISPATCH(AlphaFragmentOp3ATI, (op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod), (F, "glAlphaFragmentOp3ATI(0x%x, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d);\n", op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod)); -} - -KEYWORD1 void KEYWORD2 NAME(BeginFragmentShaderATI)(void) -{ - DISPATCH(BeginFragmentShaderATI, (), (F, "glBeginFragmentShaderATI();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(BindFragmentShaderATI)(GLuint id) -{ - (void) id; - DISPATCH(BindFragmentShaderATI, (id), (F, "glBindFragmentShaderATI(%d);\n", id)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorFragmentOp1ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod) -{ - (void) op; (void) dst; (void) dstMask; (void) dstMod; (void) arg1; (void) arg1Rep; (void) arg1Mod; - DISPATCH(ColorFragmentOp1ATI, (op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod), (F, "glColorFragmentOp1ATI(0x%x, %d, %d, %d, %d, %d, %d);\n", op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorFragmentOp2ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod) -{ - (void) op; (void) dst; (void) dstMask; (void) dstMod; (void) arg1; (void) arg1Rep; (void) arg1Mod; (void) arg2; (void) arg2Rep; (void) arg2Mod; - DISPATCH(ColorFragmentOp2ATI, (op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod), (F, "glColorFragmentOp2ATI(0x%x, %d, %d, %d, %d, %d, %d, %d, %d, %d);\n", op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorFragmentOp3ATI)(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod) -{ - (void) op; (void) dst; (void) dstMask; (void) dstMod; (void) arg1; (void) arg1Rep; (void) arg1Mod; (void) arg2; (void) arg2Rep; (void) arg2Mod; (void) arg3; (void) arg3Rep; (void) arg3Mod; - DISPATCH(ColorFragmentOp3ATI, (op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod), (F, "glColorFragmentOp3ATI(0x%x, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d);\n", op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteFragmentShaderATI)(GLuint id) -{ - (void) id; - DISPATCH(DeleteFragmentShaderATI, (id), (F, "glDeleteFragmentShaderATI(%d);\n", id)); -} - -KEYWORD1 void KEYWORD2 NAME(EndFragmentShaderATI)(void) -{ - DISPATCH(EndFragmentShaderATI, (), (F, "glEndFragmentShaderATI();\n")); -} - -KEYWORD1 GLuint KEYWORD2 NAME(GenFragmentShadersATI)(GLuint range) -{ - (void) range; - RETURN_DISPATCH(GenFragmentShadersATI, (range), (F, "glGenFragmentShadersATI(%d);\n", range)); -} - -KEYWORD1 void KEYWORD2 NAME(PassTexCoordATI)(GLuint dst, GLuint coord, GLenum swizzle) -{ - (void) dst; (void) coord; (void) swizzle; - DISPATCH(PassTexCoordATI, (dst, coord, swizzle), (F, "glPassTexCoordATI(%d, %d, 0x%x);\n", dst, coord, swizzle)); -} - -KEYWORD1 void KEYWORD2 NAME(SampleMapATI)(GLuint dst, GLuint interp, GLenum swizzle) -{ - (void) dst; (void) interp; (void) swizzle; - DISPATCH(SampleMapATI, (dst, interp, swizzle), (F, "glSampleMapATI(%d, %d, 0x%x);\n", dst, interp, swizzle)); -} - -KEYWORD1 void KEYWORD2 NAME(SetFragmentShaderConstantATI)(GLuint dst, const GLfloat * value) -{ - (void) dst; (void) value; - DISPATCH(SetFragmentShaderConstantATI, (dst, value), (F, "glSetFragmentShaderConstantATI(%d, %p);\n", dst, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameteri)(GLenum pname, GLint param) -{ - (void) pname; (void) param; - DISPATCH(PointParameteriNV, (pname, param), (F, "glPointParameteri(0x%x, %d);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameteriNV)(GLenum pname, GLint param) -{ - (void) pname; (void) param; - DISPATCH(PointParameteriNV, (pname, param), (F, "glPointParameteriNV(0x%x, %d);\n", pname, param)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameteriv)(GLenum pname, const GLint * params) -{ - (void) pname; (void) params; - DISPATCH(PointParameterivNV, (pname, params), (F, "glPointParameteriv(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(PointParameterivNV)(GLenum pname, const GLint * params) -{ - (void) pname; (void) params; - DISPATCH(PointParameterivNV, (pname, params), (F, "glPointParameterivNV(0x%x, %p);\n", pname, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_865)(GLenum face); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_865)(GLenum face) -{ - (void) face; - DISPATCH(ActiveStencilFaceEXT, (face), (F, "glActiveStencilFaceEXT(0x%x);\n", face)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_866)(GLuint array); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_866)(GLuint array) -{ - (void) array; - DISPATCH(BindVertexArrayAPPLE, (array), (F, "glBindVertexArrayAPPLE(%d);\n", array)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteVertexArrays)(GLsizei n, const GLuint * arrays) -{ - (void) n; (void) arrays; - DISPATCH(DeleteVertexArraysAPPLE, (n, arrays), (F, "glDeleteVertexArrays(%d, %p);\n", n, (const void *) arrays)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_867)(GLsizei n, const GLuint * arrays); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_867)(GLsizei n, const GLuint * arrays) -{ - (void) n; (void) arrays; - DISPATCH(DeleteVertexArraysAPPLE, (n, arrays), (F, "glDeleteVertexArraysAPPLE(%d, %p);\n", n, (const void *) arrays)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_868)(GLsizei n, GLuint * arrays); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_868)(GLsizei n, GLuint * arrays) -{ - (void) n; (void) arrays; - DISPATCH(GenVertexArraysAPPLE, (n, arrays), (F, "glGenVertexArraysAPPLE(%d, %p);\n", n, (const void *) arrays)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsVertexArray)(GLuint array) -{ - (void) array; - RETURN_DISPATCH(IsVertexArrayAPPLE, (array), (F, "glIsVertexArray(%d);\n", array)); -} - -KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_869)(GLuint array); - -KEYWORD1_ALT GLboolean KEYWORD2 NAME(_dispatch_stub_869)(GLuint array) -{ - (void) array; - RETURN_DISPATCH(IsVertexArrayAPPLE, (array), (F, "glIsVertexArrayAPPLE(%d);\n", array)); -} - -KEYWORD1 void KEYWORD2 NAME(GetProgramNamedParameterdvNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params) -{ - (void) id; (void) len; (void) name; (void) params; - DISPATCH(GetProgramNamedParameterdvNV, (id, len, name, params), (F, "glGetProgramNamedParameterdvNV(%d, %d, %p, %p);\n", id, len, (const void *) name, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetProgramNamedParameterfvNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params) -{ - (void) id; (void) len; (void) name; (void) params; - DISPATCH(GetProgramNamedParameterfvNV, (id, len, name, params), (F, "glGetProgramNamedParameterfvNV(%d, %d, %p, %p);\n", id, len, (const void *) name, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramNamedParameter4dNV)(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - (void) id; (void) len; (void) name; (void) x; (void) y; (void) z; (void) w; - DISPATCH(ProgramNamedParameter4dNV, (id, len, name, x, y, z, w), (F, "glProgramNamedParameter4dNV(%d, %d, %p, %f, %f, %f, %f);\n", id, len, (const void *) name, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramNamedParameter4dvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v) -{ - (void) id; (void) len; (void) name; (void) v; - DISPATCH(ProgramNamedParameter4dvNV, (id, len, name, v), (F, "glProgramNamedParameter4dvNV(%d, %d, %p, %p);\n", id, len, (const void *) name, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramNamedParameter4fNV)(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - (void) id; (void) len; (void) name; (void) x; (void) y; (void) z; (void) w; - DISPATCH(ProgramNamedParameter4fNV, (id, len, name, x, y, z, w), (F, "glProgramNamedParameter4fNV(%d, %d, %p, %f, %f, %f, %f);\n", id, len, (const void *) name, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(ProgramNamedParameter4fvNV)(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v) -{ - (void) id; (void) len; (void) name; (void) v; - DISPATCH(ProgramNamedParameter4fvNV, (id, len, name, v), (F, "glProgramNamedParameter4fvNV(%d, %d, %p, %p);\n", id, len, (const void *) name, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(PrimitiveRestartIndexNV)(GLuint index) -{ - (void) index; - DISPATCH(PrimitiveRestartIndexNV, (index), (F, "glPrimitiveRestartIndexNV(%d);\n", index)); -} - -KEYWORD1 void KEYWORD2 NAME(PrimitiveRestartIndex)(GLuint index) -{ - (void) index; - DISPATCH(PrimitiveRestartIndexNV, (index), (F, "glPrimitiveRestartIndex(%d);\n", index)); -} - -KEYWORD1 void KEYWORD2 NAME(PrimitiveRestartNV)(void) -{ - DISPATCH(PrimitiveRestartNV, (), (F, "glPrimitiveRestartNV();\n")); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_878)(GLclampd zmin, GLclampd zmax); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_878)(GLclampd zmin, GLclampd zmax) -{ - (void) zmin; (void) zmax; - DISPATCH(DepthBoundsEXT, (zmin, zmax), (F, "glDepthBoundsEXT(%f, %f);\n", zmin, zmax)); -} - -KEYWORD1 void KEYWORD2 NAME(BlendEquationSeparate)(GLenum modeRGB, GLenum modeA) -{ - (void) modeRGB; (void) modeA; - DISPATCH(BlendEquationSeparateEXT, (modeRGB, modeA), (F, "glBlendEquationSeparate(0x%x, 0x%x);\n", modeRGB, modeA)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_879)(GLenum modeRGB, GLenum modeA); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_879)(GLenum modeRGB, GLenum modeA) -{ - (void) modeRGB; (void) modeA; - DISPATCH(BlendEquationSeparateEXT, (modeRGB, modeA), (F, "glBlendEquationSeparateEXT(0x%x, 0x%x);\n", modeRGB, modeA)); -} - -KEYWORD1 void KEYWORD2 NAME(BindFramebuffer)(GLenum target, GLuint framebuffer) -{ - (void) target; (void) framebuffer; - DISPATCH(BindFramebufferEXT, (target, framebuffer), (F, "glBindFramebuffer(0x%x, %d);\n", target, framebuffer)); -} - -KEYWORD1 void KEYWORD2 NAME(BindFramebufferEXT)(GLenum target, GLuint framebuffer) -{ - (void) target; (void) framebuffer; - DISPATCH(BindFramebufferEXT, (target, framebuffer), (F, "glBindFramebufferEXT(0x%x, %d);\n", target, framebuffer)); -} - -KEYWORD1 void KEYWORD2 NAME(BindRenderbuffer)(GLenum target, GLuint renderbuffer) -{ - (void) target; (void) renderbuffer; - DISPATCH(BindRenderbufferEXT, (target, renderbuffer), (F, "glBindRenderbuffer(0x%x, %d);\n", target, renderbuffer)); -} - -KEYWORD1 void KEYWORD2 NAME(BindRenderbufferEXT)(GLenum target, GLuint renderbuffer) -{ - (void) target; (void) renderbuffer; - DISPATCH(BindRenderbufferEXT, (target, renderbuffer), (F, "glBindRenderbufferEXT(0x%x, %d);\n", target, renderbuffer)); -} - -KEYWORD1 GLenum KEYWORD2 NAME(CheckFramebufferStatus)(GLenum target) -{ - (void) target; - RETURN_DISPATCH(CheckFramebufferStatusEXT, (target), (F, "glCheckFramebufferStatus(0x%x);\n", target)); -} - -KEYWORD1 GLenum KEYWORD2 NAME(CheckFramebufferStatusEXT)(GLenum target) -{ - (void) target; - RETURN_DISPATCH(CheckFramebufferStatusEXT, (target), (F, "glCheckFramebufferStatusEXT(0x%x);\n", target)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteFramebuffers)(GLsizei n, const GLuint * framebuffers) -{ - (void) n; (void) framebuffers; - DISPATCH(DeleteFramebuffersEXT, (n, framebuffers), (F, "glDeleteFramebuffers(%d, %p);\n", n, (const void *) framebuffers)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteFramebuffersEXT)(GLsizei n, const GLuint * framebuffers) -{ - (void) n; (void) framebuffers; - DISPATCH(DeleteFramebuffersEXT, (n, framebuffers), (F, "glDeleteFramebuffersEXT(%d, %p);\n", n, (const void *) framebuffers)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteRenderbuffers)(GLsizei n, const GLuint * renderbuffers) -{ - (void) n; (void) renderbuffers; - DISPATCH(DeleteRenderbuffersEXT, (n, renderbuffers), (F, "glDeleteRenderbuffers(%d, %p);\n", n, (const void *) renderbuffers)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteRenderbuffersEXT)(GLsizei n, const GLuint * renderbuffers) -{ - (void) n; (void) renderbuffers; - DISPATCH(DeleteRenderbuffersEXT, (n, renderbuffers), (F, "glDeleteRenderbuffersEXT(%d, %p);\n", n, (const void *) renderbuffers)); -} - -KEYWORD1 void KEYWORD2 NAME(FramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) -{ - (void) target; (void) attachment; (void) renderbuffertarget; (void) renderbuffer; - DISPATCH(FramebufferRenderbufferEXT, (target, attachment, renderbuffertarget, renderbuffer), (F, "glFramebufferRenderbuffer(0x%x, 0x%x, 0x%x, %d);\n", target, attachment, renderbuffertarget, renderbuffer)); -} - -KEYWORD1 void KEYWORD2 NAME(FramebufferRenderbufferEXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) -{ - (void) target; (void) attachment; (void) renderbuffertarget; (void) renderbuffer; - DISPATCH(FramebufferRenderbufferEXT, (target, attachment, renderbuffertarget, renderbuffer), (F, "glFramebufferRenderbufferEXT(0x%x, 0x%x, 0x%x, %d);\n", target, attachment, renderbuffertarget, renderbuffer)); -} - -KEYWORD1 void KEYWORD2 NAME(FramebufferTexture1D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) -{ - (void) target; (void) attachment; (void) textarget; (void) texture; (void) level; - DISPATCH(FramebufferTexture1DEXT, (target, attachment, textarget, texture, level), (F, "glFramebufferTexture1D(0x%x, 0x%x, 0x%x, %d, %d);\n", target, attachment, textarget, texture, level)); -} - -KEYWORD1 void KEYWORD2 NAME(FramebufferTexture1DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) -{ - (void) target; (void) attachment; (void) textarget; (void) texture; (void) level; - DISPATCH(FramebufferTexture1DEXT, (target, attachment, textarget, texture, level), (F, "glFramebufferTexture1DEXT(0x%x, 0x%x, 0x%x, %d, %d);\n", target, attachment, textarget, texture, level)); -} - -KEYWORD1 void KEYWORD2 NAME(FramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) -{ - (void) target; (void) attachment; (void) textarget; (void) texture; (void) level; - DISPATCH(FramebufferTexture2DEXT, (target, attachment, textarget, texture, level), (F, "glFramebufferTexture2D(0x%x, 0x%x, 0x%x, %d, %d);\n", target, attachment, textarget, texture, level)); -} - -KEYWORD1 void KEYWORD2 NAME(FramebufferTexture2DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) -{ - (void) target; (void) attachment; (void) textarget; (void) texture; (void) level; - DISPATCH(FramebufferTexture2DEXT, (target, attachment, textarget, texture, level), (F, "glFramebufferTexture2DEXT(0x%x, 0x%x, 0x%x, %d, %d);\n", target, attachment, textarget, texture, level)); -} - -KEYWORD1 void KEYWORD2 NAME(FramebufferTexture3D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) -{ - (void) target; (void) attachment; (void) textarget; (void) texture; (void) level; (void) zoffset; - DISPATCH(FramebufferTexture3DEXT, (target, attachment, textarget, texture, level, zoffset), (F, "glFramebufferTexture3D(0x%x, 0x%x, 0x%x, %d, %d, %d);\n", target, attachment, textarget, texture, level, zoffset)); -} - -KEYWORD1 void KEYWORD2 NAME(FramebufferTexture3DEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) -{ - (void) target; (void) attachment; (void) textarget; (void) texture; (void) level; (void) zoffset; - DISPATCH(FramebufferTexture3DEXT, (target, attachment, textarget, texture, level, zoffset), (F, "glFramebufferTexture3DEXT(0x%x, 0x%x, 0x%x, %d, %d, %d);\n", target, attachment, textarget, texture, level, zoffset)); -} - -KEYWORD1 void KEYWORD2 NAME(GenFramebuffers)(GLsizei n, GLuint * framebuffers) -{ - (void) n; (void) framebuffers; - DISPATCH(GenFramebuffersEXT, (n, framebuffers), (F, "glGenFramebuffers(%d, %p);\n", n, (const void *) framebuffers)); -} - -KEYWORD1 void KEYWORD2 NAME(GenFramebuffersEXT)(GLsizei n, GLuint * framebuffers) -{ - (void) n; (void) framebuffers; - DISPATCH(GenFramebuffersEXT, (n, framebuffers), (F, "glGenFramebuffersEXT(%d, %p);\n", n, (const void *) framebuffers)); -} - -KEYWORD1 void KEYWORD2 NAME(GenRenderbuffers)(GLsizei n, GLuint * renderbuffers) -{ - (void) n; (void) renderbuffers; - DISPATCH(GenRenderbuffersEXT, (n, renderbuffers), (F, "glGenRenderbuffers(%d, %p);\n", n, (const void *) renderbuffers)); -} - -KEYWORD1 void KEYWORD2 NAME(GenRenderbuffersEXT)(GLsizei n, GLuint * renderbuffers) -{ - (void) n; (void) renderbuffers; - DISPATCH(GenRenderbuffersEXT, (n, renderbuffers), (F, "glGenRenderbuffersEXT(%d, %p);\n", n, (const void *) renderbuffers)); -} - -KEYWORD1 void KEYWORD2 NAME(GenerateMipmap)(GLenum target) -{ - (void) target; - DISPATCH(GenerateMipmapEXT, (target), (F, "glGenerateMipmap(0x%x);\n", target)); -} - -KEYWORD1 void KEYWORD2 NAME(GenerateMipmapEXT)(GLenum target) -{ - (void) target; - DISPATCH(GenerateMipmapEXT, (target), (F, "glGenerateMipmapEXT(0x%x);\n", target)); -} - -KEYWORD1 void KEYWORD2 NAME(GetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint * params) -{ - (void) target; (void) attachment; (void) pname; (void) params; - DISPATCH(GetFramebufferAttachmentParameterivEXT, (target, attachment, pname, params), (F, "glGetFramebufferAttachmentParameteriv(0x%x, 0x%x, 0x%x, %p);\n", target, attachment, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetFramebufferAttachmentParameterivEXT)(GLenum target, GLenum attachment, GLenum pname, GLint * params) -{ - (void) target; (void) attachment; (void) pname; (void) params; - DISPATCH(GetFramebufferAttachmentParameterivEXT, (target, attachment, pname, params), (F, "glGetFramebufferAttachmentParameterivEXT(0x%x, 0x%x, 0x%x, %p);\n", target, attachment, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetRenderbufferParameterivEXT, (target, pname, params), (F, "glGetRenderbufferParameteriv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetRenderbufferParameterivEXT)(GLenum target, GLenum pname, GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetRenderbufferParameterivEXT, (target, pname, params), (F, "glGetRenderbufferParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsFramebuffer)(GLuint framebuffer) -{ - (void) framebuffer; - RETURN_DISPATCH(IsFramebufferEXT, (framebuffer), (F, "glIsFramebuffer(%d);\n", framebuffer)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsFramebufferEXT)(GLuint framebuffer) -{ - (void) framebuffer; - RETURN_DISPATCH(IsFramebufferEXT, (framebuffer), (F, "glIsFramebufferEXT(%d);\n", framebuffer)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsRenderbuffer)(GLuint renderbuffer) -{ - (void) renderbuffer; - RETURN_DISPATCH(IsRenderbufferEXT, (renderbuffer), (F, "glIsRenderbuffer(%d);\n", renderbuffer)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsRenderbufferEXT)(GLuint renderbuffer) -{ - (void) renderbuffer; - RETURN_DISPATCH(IsRenderbufferEXT, (renderbuffer), (F, "glIsRenderbufferEXT(%d);\n", renderbuffer)); -} - -KEYWORD1 void KEYWORD2 NAME(RenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) -{ - (void) target; (void) internalformat; (void) width; (void) height; - DISPATCH(RenderbufferStorageEXT, (target, internalformat, width, height), (F, "glRenderbufferStorage(0x%x, 0x%x, %d, %d);\n", target, internalformat, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(RenderbufferStorageEXT)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) -{ - (void) target; (void) internalformat; (void) width; (void) height; - DISPATCH(RenderbufferStorageEXT, (target, internalformat, width, height), (F, "glRenderbufferStorageEXT(0x%x, 0x%x, %d, %d);\n", target, internalformat, width, height)); -} - -KEYWORD1 void KEYWORD2 NAME(BlitFramebuffer)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) -{ - (void) srcX0; (void) srcY0; (void) srcX1; (void) srcY1; (void) dstX0; (void) dstY0; (void) dstX1; (void) dstY1; (void) mask; (void) filter; - DISPATCH(BlitFramebufferEXT, (srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter), (F, "glBlitFramebuffer(%d, %d, %d, %d, %d, %d, %d, %d, %d, 0x%x);\n", srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_897)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_897)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) -{ - (void) srcX0; (void) srcY0; (void) srcX1; (void) srcY1; (void) dstX0; (void) dstY0; (void) dstX1; (void) dstY1; (void) mask; (void) filter; - DISPATCH(BlitFramebufferEXT, (srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter), (F, "glBlitFramebufferEXT(%d, %d, %d, %d, %d, %d, %d, %d, %d, 0x%x);\n", srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_898)(GLenum target, GLenum pname, GLint param); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_898)(GLenum target, GLenum pname, GLint param) -{ - (void) target; (void) pname; (void) param; - DISPATCH(BufferParameteriAPPLE, (target, pname, param), (F, "glBufferParameteriAPPLE(0x%x, 0x%x, %d);\n", target, pname, param)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_899)(GLenum target, GLintptr offset, GLsizeiptr size); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_899)(GLenum target, GLintptr offset, GLsizeiptr size) -{ - (void) target; (void) offset; (void) size; - DISPATCH(FlushMappedBufferRangeAPPLE, (target, offset, size), (F, "glFlushMappedBufferRangeAPPLE(0x%x, %d, %d);\n", target, offset, size)); -} - -KEYWORD1 void KEYWORD2 NAME(BindFragDataLocationEXT)(GLuint program, GLuint colorNumber, const GLchar * name) -{ - (void) program; (void) colorNumber; (void) name; - DISPATCH(BindFragDataLocationEXT, (program, colorNumber, name), (F, "glBindFragDataLocationEXT(%d, %d, %p);\n", program, colorNumber, (const void *) name)); -} - -KEYWORD1 void KEYWORD2 NAME(BindFragDataLocation)(GLuint program, GLuint colorNumber, const GLchar * name) -{ - (void) program; (void) colorNumber; (void) name; - DISPATCH(BindFragDataLocationEXT, (program, colorNumber, name), (F, "glBindFragDataLocation(%d, %d, %p);\n", program, colorNumber, (const void *) name)); -} - -KEYWORD1 GLint KEYWORD2 NAME(GetFragDataLocationEXT)(GLuint program, const GLchar * name) -{ - (void) program; (void) name; - RETURN_DISPATCH(GetFragDataLocationEXT, (program, name), (F, "glGetFragDataLocationEXT(%d, %p);\n", program, (const void *) name)); -} - -KEYWORD1 GLint KEYWORD2 NAME(GetFragDataLocation)(GLuint program, const GLchar * name) -{ - (void) program; (void) name; - RETURN_DISPATCH(GetFragDataLocationEXT, (program, name), (F, "glGetFragDataLocation(%d, %p);\n", program, (const void *) name)); -} - -KEYWORD1 void KEYWORD2 NAME(GetUniformuivEXT)(GLuint program, GLint location, GLuint * params) -{ - (void) program; (void) location; (void) params; - DISPATCH(GetUniformuivEXT, (program, location, params), (F, "glGetUniformuivEXT(%d, %d, %p);\n", program, location, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetUniformuiv)(GLuint program, GLint location, GLuint * params) -{ - (void) program; (void) location; (void) params; - DISPATCH(GetUniformuivEXT, (program, location, params), (F, "glGetUniformuiv(%d, %d, %p);\n", program, location, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribIivEXT)(GLuint index, GLenum pname, GLint * params) -{ - (void) index; (void) pname; (void) params; - DISPATCH(GetVertexAttribIivEXT, (index, pname, params), (F, "glGetVertexAttribIivEXT(%d, 0x%x, %p);\n", index, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribIiv)(GLuint index, GLenum pname, GLint * params) -{ - (void) index; (void) pname; (void) params; - DISPATCH(GetVertexAttribIivEXT, (index, pname, params), (F, "glGetVertexAttribIiv(%d, 0x%x, %p);\n", index, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribIuivEXT)(GLuint index, GLenum pname, GLuint * params) -{ - (void) index; (void) pname; (void) params; - DISPATCH(GetVertexAttribIuivEXT, (index, pname, params), (F, "glGetVertexAttribIuivEXT(%d, 0x%x, %p);\n", index, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribIuiv)(GLuint index, GLenum pname, GLuint * params) -{ - (void) index; (void) pname; (void) params; - DISPATCH(GetVertexAttribIuivEXT, (index, pname, params), (F, "glGetVertexAttribIuiv(%d, 0x%x, %p);\n", index, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform1uiEXT)(GLint location, GLuint x) -{ - (void) location; (void) x; - DISPATCH(Uniform1uiEXT, (location, x), (F, "glUniform1uiEXT(%d, %d);\n", location, x)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform1ui)(GLint location, GLuint x) -{ - (void) location; (void) x; - DISPATCH(Uniform1uiEXT, (location, x), (F, "glUniform1ui(%d, %d);\n", location, x)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform1uivEXT)(GLint location, GLsizei count, const GLuint * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform1uivEXT, (location, count, value), (F, "glUniform1uivEXT(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform1uiv)(GLint location, GLsizei count, const GLuint * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform1uivEXT, (location, count, value), (F, "glUniform1uiv(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform2uiEXT)(GLint location, GLuint x, GLuint y) -{ - (void) location; (void) x; (void) y; - DISPATCH(Uniform2uiEXT, (location, x, y), (F, "glUniform2uiEXT(%d, %d, %d);\n", location, x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform2ui)(GLint location, GLuint x, GLuint y) -{ - (void) location; (void) x; (void) y; - DISPATCH(Uniform2uiEXT, (location, x, y), (F, "glUniform2ui(%d, %d, %d);\n", location, x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform2uivEXT)(GLint location, GLsizei count, const GLuint * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform2uivEXT, (location, count, value), (F, "glUniform2uivEXT(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform2uiv)(GLint location, GLsizei count, const GLuint * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform2uivEXT, (location, count, value), (F, "glUniform2uiv(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform3uiEXT)(GLint location, GLuint x, GLuint y, GLuint z) -{ - (void) location; (void) x; (void) y; (void) z; - DISPATCH(Uniform3uiEXT, (location, x, y, z), (F, "glUniform3uiEXT(%d, %d, %d, %d);\n", location, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform3ui)(GLint location, GLuint x, GLuint y, GLuint z) -{ - (void) location; (void) x; (void) y; (void) z; - DISPATCH(Uniform3uiEXT, (location, x, y, z), (F, "glUniform3ui(%d, %d, %d, %d);\n", location, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform3uivEXT)(GLint location, GLsizei count, const GLuint * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform3uivEXT, (location, count, value), (F, "glUniform3uivEXT(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform3uiv)(GLint location, GLsizei count, const GLuint * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform3uivEXT, (location, count, value), (F, "glUniform3uiv(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform4uiEXT)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w) -{ - (void) location; (void) x; (void) y; (void) z; (void) w; - DISPATCH(Uniform4uiEXT, (location, x, y, z, w), (F, "glUniform4uiEXT(%d, %d, %d, %d, %d);\n", location, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform4ui)(GLint location, GLuint x, GLuint y, GLuint z, GLuint w) -{ - (void) location; (void) x; (void) y; (void) z; (void) w; - DISPATCH(Uniform4uiEXT, (location, x, y, z, w), (F, "glUniform4ui(%d, %d, %d, %d, %d);\n", location, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform4uivEXT)(GLint location, GLsizei count, const GLuint * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform4uivEXT, (location, count, value), (F, "glUniform4uivEXT(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(Uniform4uiv)(GLint location, GLsizei count, const GLuint * value) -{ - (void) location; (void) count; (void) value; - DISPATCH(Uniform4uivEXT, (location, count, value), (F, "glUniform4uiv(%d, %d, %p);\n", location, count, (const void *) value)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI1iEXT)(GLuint index, GLint x) -{ - (void) index; (void) x; - DISPATCH(VertexAttribI1iEXT, (index, x), (F, "glVertexAttribI1iEXT(%d, %d);\n", index, x)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI1i)(GLuint index, GLint x) -{ - (void) index; (void) x; - DISPATCH(VertexAttribI1iEXT, (index, x), (F, "glVertexAttribI1i(%d, %d);\n", index, x)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI1ivEXT)(GLuint index, const GLint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI1ivEXT, (index, v), (F, "glVertexAttribI1ivEXT(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI1iv)(GLuint index, const GLint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI1ivEXT, (index, v), (F, "glVertexAttribI1iv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI1uiEXT)(GLuint index, GLuint x) -{ - (void) index; (void) x; - DISPATCH(VertexAttribI1uiEXT, (index, x), (F, "glVertexAttribI1uiEXT(%d, %d);\n", index, x)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI1ui)(GLuint index, GLuint x) -{ - (void) index; (void) x; - DISPATCH(VertexAttribI1uiEXT, (index, x), (F, "glVertexAttribI1ui(%d, %d);\n", index, x)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI1uivEXT)(GLuint index, const GLuint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI1uivEXT, (index, v), (F, "glVertexAttribI1uivEXT(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI1uiv)(GLuint index, const GLuint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI1uivEXT, (index, v), (F, "glVertexAttribI1uiv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI2iEXT)(GLuint index, GLint x, GLint y) -{ - (void) index; (void) x; (void) y; - DISPATCH(VertexAttribI2iEXT, (index, x, y), (F, "glVertexAttribI2iEXT(%d, %d, %d);\n", index, x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI2i)(GLuint index, GLint x, GLint y) -{ - (void) index; (void) x; (void) y; - DISPATCH(VertexAttribI2iEXT, (index, x, y), (F, "glVertexAttribI2i(%d, %d, %d);\n", index, x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI2ivEXT)(GLuint index, const GLint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI2ivEXT, (index, v), (F, "glVertexAttribI2ivEXT(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI2iv)(GLuint index, const GLint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI2ivEXT, (index, v), (F, "glVertexAttribI2iv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI2uiEXT)(GLuint index, GLuint x, GLuint y) -{ - (void) index; (void) x; (void) y; - DISPATCH(VertexAttribI2uiEXT, (index, x, y), (F, "glVertexAttribI2uiEXT(%d, %d, %d);\n", index, x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI2ui)(GLuint index, GLuint x, GLuint y) -{ - (void) index; (void) x; (void) y; - DISPATCH(VertexAttribI2uiEXT, (index, x, y), (F, "glVertexAttribI2ui(%d, %d, %d);\n", index, x, y)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI2uivEXT)(GLuint index, const GLuint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI2uivEXT, (index, v), (F, "glVertexAttribI2uivEXT(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI2uiv)(GLuint index, const GLuint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI2uivEXT, (index, v), (F, "glVertexAttribI2uiv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI3iEXT)(GLuint index, GLint x, GLint y, GLint z) -{ - (void) index; (void) x; (void) y; (void) z; - DISPATCH(VertexAttribI3iEXT, (index, x, y, z), (F, "glVertexAttribI3iEXT(%d, %d, %d, %d);\n", index, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI3i)(GLuint index, GLint x, GLint y, GLint z) -{ - (void) index; (void) x; (void) y; (void) z; - DISPATCH(VertexAttribI3iEXT, (index, x, y, z), (F, "glVertexAttribI3i(%d, %d, %d, %d);\n", index, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI3ivEXT)(GLuint index, const GLint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI3ivEXT, (index, v), (F, "glVertexAttribI3ivEXT(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI3iv)(GLuint index, const GLint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI3ivEXT, (index, v), (F, "glVertexAttribI3iv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI3uiEXT)(GLuint index, GLuint x, GLuint y, GLuint z) -{ - (void) index; (void) x; (void) y; (void) z; - DISPATCH(VertexAttribI3uiEXT, (index, x, y, z), (F, "glVertexAttribI3uiEXT(%d, %d, %d, %d);\n", index, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI3ui)(GLuint index, GLuint x, GLuint y, GLuint z) -{ - (void) index; (void) x; (void) y; (void) z; - DISPATCH(VertexAttribI3uiEXT, (index, x, y, z), (F, "glVertexAttribI3ui(%d, %d, %d, %d);\n", index, x, y, z)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI3uivEXT)(GLuint index, const GLuint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI3uivEXT, (index, v), (F, "glVertexAttribI3uivEXT(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI3uiv)(GLuint index, const GLuint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI3uivEXT, (index, v), (F, "glVertexAttribI3uiv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI4bvEXT)(GLuint index, const GLbyte * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI4bvEXT, (index, v), (F, "glVertexAttribI4bvEXT(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI4bv)(GLuint index, const GLbyte * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI4bvEXT, (index, v), (F, "glVertexAttribI4bv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI4iEXT)(GLuint index, GLint x, GLint y, GLint z, GLint w) -{ - (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(VertexAttribI4iEXT, (index, x, y, z, w), (F, "glVertexAttribI4iEXT(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI4i)(GLuint index, GLint x, GLint y, GLint z, GLint w) -{ - (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(VertexAttribI4iEXT, (index, x, y, z, w), (F, "glVertexAttribI4i(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI4ivEXT)(GLuint index, const GLint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI4ivEXT, (index, v), (F, "glVertexAttribI4ivEXT(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI4iv)(GLuint index, const GLint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI4ivEXT, (index, v), (F, "glVertexAttribI4iv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI4svEXT)(GLuint index, const GLshort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI4svEXT, (index, v), (F, "glVertexAttribI4svEXT(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI4sv)(GLuint index, const GLshort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI4svEXT, (index, v), (F, "glVertexAttribI4sv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI4ubvEXT)(GLuint index, const GLubyte * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI4ubvEXT, (index, v), (F, "glVertexAttribI4ubvEXT(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI4ubv)(GLuint index, const GLubyte * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI4ubvEXT, (index, v), (F, "glVertexAttribI4ubv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI4uiEXT)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) -{ - (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(VertexAttribI4uiEXT, (index, x, y, z, w), (F, "glVertexAttribI4uiEXT(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI4ui)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) -{ - (void) index; (void) x; (void) y; (void) z; (void) w; - DISPATCH(VertexAttribI4uiEXT, (index, x, y, z, w), (F, "glVertexAttribI4ui(%d, %d, %d, %d, %d);\n", index, x, y, z, w)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI4uivEXT)(GLuint index, const GLuint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI4uivEXT, (index, v), (F, "glVertexAttribI4uivEXT(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI4uiv)(GLuint index, const GLuint * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI4uivEXT, (index, v), (F, "glVertexAttribI4uiv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI4usvEXT)(GLuint index, const GLushort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI4usvEXT, (index, v), (F, "glVertexAttribI4usvEXT(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribI4usv)(GLuint index, const GLushort * v) -{ - (void) index; (void) v; - DISPATCH(VertexAttribI4usvEXT, (index, v), (F, "glVertexAttribI4usv(%d, %p);\n", index, (const void *) v)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribIPointerEXT)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) -{ - (void) index; (void) size; (void) type; (void) stride; (void) pointer; - DISPATCH(VertexAttribIPointerEXT, (index, size, type, stride, pointer), (F, "glVertexAttribIPointerEXT(%d, %d, 0x%x, %d, %p);\n", index, size, type, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(VertexAttribIPointer)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) -{ - (void) index; (void) size; (void) type; (void) stride; (void) pointer; - DISPATCH(VertexAttribIPointerEXT, (index, size, type, stride, pointer), (F, "glVertexAttribIPointer(%d, %d, 0x%x, %d, %p);\n", index, size, type, stride, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(FramebufferTextureLayer)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) -{ - (void) target; (void) attachment; (void) texture; (void) level; (void) layer; - DISPATCH(FramebufferTextureLayerEXT, (target, attachment, texture, level, layer), (F, "glFramebufferTextureLayer(0x%x, 0x%x, %d, %d, %d);\n", target, attachment, texture, level, layer)); -} - -KEYWORD1 void KEYWORD2 NAME(FramebufferTextureLayerARB)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) -{ - (void) target; (void) attachment; (void) texture; (void) level; (void) layer; - DISPATCH(FramebufferTextureLayerEXT, (target, attachment, texture, level, layer), (F, "glFramebufferTextureLayerARB(0x%x, 0x%x, %d, %d, %d);\n", target, attachment, texture, level, layer)); -} - -KEYWORD1 void KEYWORD2 NAME(FramebufferTextureLayerEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) -{ - (void) target; (void) attachment; (void) texture; (void) level; (void) layer; - DISPATCH(FramebufferTextureLayerEXT, (target, attachment, texture, level, layer), (F, "glFramebufferTextureLayerEXT(0x%x, 0x%x, %d, %d, %d);\n", target, attachment, texture, level, layer)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorMaskIndexedEXT)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a) -{ - (void) buf; (void) r; (void) g; (void) b; (void) a; - DISPATCH(ColorMaskIndexedEXT, (buf, r, g, b, a), (F, "glColorMaskIndexedEXT(%d, %d, %d, %d, %d);\n", buf, r, g, b, a)); -} - -KEYWORD1 void KEYWORD2 NAME(ColorMaski)(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a) -{ - (void) buf; (void) r; (void) g; (void) b; (void) a; - DISPATCH(ColorMaskIndexedEXT, (buf, r, g, b, a), (F, "glColorMaski(%d, %d, %d, %d, %d);\n", buf, r, g, b, a)); -} - -KEYWORD1 void KEYWORD2 NAME(DisableIndexedEXT)(GLenum target, GLuint index) -{ - (void) target; (void) index; - DISPATCH(DisableIndexedEXT, (target, index), (F, "glDisableIndexedEXT(0x%x, %d);\n", target, index)); -} - -KEYWORD1 void KEYWORD2 NAME(Disablei)(GLenum target, GLuint index) -{ - (void) target; (void) index; - DISPATCH(DisableIndexedEXT, (target, index), (F, "glDisablei(0x%x, %d);\n", target, index)); -} - -KEYWORD1 void KEYWORD2 NAME(EnableIndexedEXT)(GLenum target, GLuint index) -{ - (void) target; (void) index; - DISPATCH(EnableIndexedEXT, (target, index), (F, "glEnableIndexedEXT(0x%x, %d);\n", target, index)); -} - -KEYWORD1 void KEYWORD2 NAME(Enablei)(GLenum target, GLuint index) -{ - (void) target; (void) index; - DISPATCH(EnableIndexedEXT, (target, index), (F, "glEnablei(0x%x, %d);\n", target, index)); -} - -KEYWORD1 void KEYWORD2 NAME(GetBooleanIndexedvEXT)(GLenum value, GLuint index, GLboolean * data) -{ - (void) value; (void) index; (void) data; - DISPATCH(GetBooleanIndexedvEXT, (value, index, data), (F, "glGetBooleanIndexedvEXT(0x%x, %d, %p);\n", value, index, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(GetBooleani_v)(GLenum value, GLuint index, GLboolean * data) -{ - (void) value; (void) index; (void) data; - DISPATCH(GetBooleanIndexedvEXT, (value, index, data), (F, "glGetBooleani_v(0x%x, %d, %p);\n", value, index, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(GetIntegerIndexedvEXT)(GLenum value, GLuint index, GLint * data) -{ - (void) value; (void) index; (void) data; - DISPATCH(GetIntegerIndexedvEXT, (value, index, data), (F, "glGetIntegerIndexedvEXT(0x%x, %d, %p);\n", value, index, (const void *) data)); -} - -KEYWORD1 void KEYWORD2 NAME(GetIntegeri_v)(GLenum value, GLuint index, GLint * data) -{ - (void) value; (void) index; (void) data; - DISPATCH(GetIntegerIndexedvEXT, (value, index, data), (F, "glGetIntegeri_v(0x%x, %d, %p);\n", value, index, (const void *) data)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsEnabledIndexedEXT)(GLenum target, GLuint index) -{ - (void) target; (void) index; - RETURN_DISPATCH(IsEnabledIndexedEXT, (target, index), (F, "glIsEnabledIndexedEXT(0x%x, %d);\n", target, index)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsEnabledi)(GLenum target, GLuint index) -{ - (void) target; (void) index; - RETURN_DISPATCH(IsEnabledIndexedEXT, (target, index), (F, "glIsEnabledi(0x%x, %d);\n", target, index)); -} - -KEYWORD1 void KEYWORD2 NAME(ClearColorIiEXT)(GLint r, GLint g, GLint b, GLint a) -{ - (void) r; (void) g; (void) b; (void) a; - DISPATCH(ClearColorIiEXT, (r, g, b, a), (F, "glClearColorIiEXT(%d, %d, %d, %d);\n", r, g, b, a)); -} - -KEYWORD1 void KEYWORD2 NAME(ClearColorIuiEXT)(GLuint r, GLuint g, GLuint b, GLuint a) -{ - (void) r; (void) g; (void) b; (void) a; - DISPATCH(ClearColorIuiEXT, (r, g, b, a), (F, "glClearColorIuiEXT(%d, %d, %d, %d);\n", r, g, b, a)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexParameterIivEXT)(GLenum target, GLenum pname, GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetTexParameterIivEXT, (target, pname, params), (F, "glGetTexParameterIivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexParameterIiv)(GLenum target, GLenum pname, GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetTexParameterIivEXT, (target, pname, params), (F, "glGetTexParameterIiv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexParameterIuivEXT)(GLenum target, GLenum pname, GLuint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetTexParameterIuivEXT, (target, pname, params), (F, "glGetTexParameterIuivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTexParameterIuiv)(GLenum target, GLenum pname, GLuint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetTexParameterIuivEXT, (target, pname, params), (F, "glGetTexParameterIuiv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(TexParameterIivEXT)(GLenum target, GLenum pname, const GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(TexParameterIivEXT, (target, pname, params), (F, "glTexParameterIivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(TexParameterIiv)(GLenum target, GLenum pname, const GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(TexParameterIivEXT, (target, pname, params), (F, "glTexParameterIiv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(TexParameterIuivEXT)(GLenum target, GLenum pname, const GLuint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(TexParameterIuivEXT, (target, pname, params), (F, "glTexParameterIuivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(TexParameterIuiv)(GLenum target, GLenum pname, const GLuint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(TexParameterIuivEXT, (target, pname, params), (F, "glTexParameterIuiv(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(BeginConditionalRenderNV)(GLuint query, GLenum mode) -{ - (void) query; (void) mode; - DISPATCH(BeginConditionalRenderNV, (query, mode), (F, "glBeginConditionalRenderNV(%d, 0x%x);\n", query, mode)); -} - -KEYWORD1 void KEYWORD2 NAME(BeginConditionalRender)(GLuint query, GLenum mode) -{ - (void) query; (void) mode; - DISPATCH(BeginConditionalRenderNV, (query, mode), (F, "glBeginConditionalRender(%d, 0x%x);\n", query, mode)); -} - -KEYWORD1 void KEYWORD2 NAME(EndConditionalRenderNV)(void) -{ - DISPATCH(EndConditionalRenderNV, (), (F, "glEndConditionalRenderNV();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(EndConditionalRender)(void) -{ - DISPATCH(EndConditionalRenderNV, (), (F, "glEndConditionalRender();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(BeginTransformFeedbackEXT)(GLenum mode) -{ - (void) mode; - DISPATCH(BeginTransformFeedbackEXT, (mode), (F, "glBeginTransformFeedbackEXT(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(BeginTransformFeedback)(GLenum mode) -{ - (void) mode; - DISPATCH(BeginTransformFeedbackEXT, (mode), (F, "glBeginTransformFeedback(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(BindBufferBaseEXT)(GLenum target, GLuint index, GLuint buffer) -{ - (void) target; (void) index; (void) buffer; - DISPATCH(BindBufferBaseEXT, (target, index, buffer), (F, "glBindBufferBaseEXT(0x%x, %d, %d);\n", target, index, buffer)); -} - -KEYWORD1 void KEYWORD2 NAME(BindBufferBase)(GLenum target, GLuint index, GLuint buffer) -{ - (void) target; (void) index; (void) buffer; - DISPATCH(BindBufferBaseEXT, (target, index, buffer), (F, "glBindBufferBase(0x%x, %d, %d);\n", target, index, buffer)); -} - -KEYWORD1 void KEYWORD2 NAME(BindBufferOffsetEXT)(GLenum target, GLuint index, GLuint buffer, GLintptr offset) -{ - (void) target; (void) index; (void) buffer; (void) offset; - DISPATCH(BindBufferOffsetEXT, (target, index, buffer, offset), (F, "glBindBufferOffsetEXT(0x%x, %d, %d, %d);\n", target, index, buffer, offset)); -} - -KEYWORD1 void KEYWORD2 NAME(BindBufferRangeEXT)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) -{ - (void) target; (void) index; (void) buffer; (void) offset; (void) size; - DISPATCH(BindBufferRangeEXT, (target, index, buffer, offset, size), (F, "glBindBufferRangeEXT(0x%x, %d, %d, %d, %d);\n", target, index, buffer, offset, size)); -} - -KEYWORD1 void KEYWORD2 NAME(BindBufferRange)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) -{ - (void) target; (void) index; (void) buffer; (void) offset; (void) size; - DISPATCH(BindBufferRangeEXT, (target, index, buffer, offset, size), (F, "glBindBufferRange(0x%x, %d, %d, %d, %d);\n", target, index, buffer, offset, size)); -} - -KEYWORD1 void KEYWORD2 NAME(EndTransformFeedbackEXT)(void) -{ - DISPATCH(EndTransformFeedbackEXT, (), (F, "glEndTransformFeedbackEXT();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(EndTransformFeedback)(void) -{ - DISPATCH(EndTransformFeedbackEXT, (), (F, "glEndTransformFeedback();\n")); -} - -KEYWORD1 void KEYWORD2 NAME(GetTransformFeedbackVaryingEXT)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name) -{ - (void) program; (void) index; (void) bufSize; (void) length; (void) size; (void) type; (void) name; - DISPATCH(GetTransformFeedbackVaryingEXT, (program, index, bufSize, length, size, type, name), (F, "glGetTransformFeedbackVaryingEXT(%d, %d, %d, %p, %p, %p, %p);\n", program, index, bufSize, (const void *) length, (const void *) size, (const void *) type, (const void *) name)); -} - -KEYWORD1 void KEYWORD2 NAME(GetTransformFeedbackVarying)(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name) -{ - (void) program; (void) index; (void) bufSize; (void) length; (void) size; (void) type; (void) name; - DISPATCH(GetTransformFeedbackVaryingEXT, (program, index, bufSize, length, size, type, name), (F, "glGetTransformFeedbackVarying(%d, %d, %d, %p, %p, %p, %p);\n", program, index, bufSize, (const void *) length, (const void *) size, (const void *) type, (const void *) name)); -} - -KEYWORD1 void KEYWORD2 NAME(TransformFeedbackVaryingsEXT)(GLuint program, GLsizei count, const char ** varyings, GLenum bufferMode) -{ - (void) program; (void) count; (void) varyings; (void) bufferMode; - DISPATCH(TransformFeedbackVaryingsEXT, (program, count, varyings, bufferMode), (F, "glTransformFeedbackVaryingsEXT(%d, %d, %p, 0x%x);\n", program, count, (const void *) varyings, bufferMode)); -} - -KEYWORD1 void KEYWORD2 NAME(TransformFeedbackVaryings)(GLuint program, GLsizei count, const GLchar* * varyings, GLenum bufferMode) -{ - (void) program; (void) count; (void) varyings; (void) bufferMode; - DISPATCH(TransformFeedbackVaryingsEXT, (program, count, varyings, bufferMode), (F, "glTransformFeedbackVaryings(%d, %d, %p, 0x%x);\n", program, count, (const void *) varyings, bufferMode)); -} - -KEYWORD1 void KEYWORD2 NAME(ProvokingVertexEXT)(GLenum mode) -{ - (void) mode; - DISPATCH(ProvokingVertexEXT, (mode), (F, "glProvokingVertexEXT(0x%x);\n", mode)); -} - -KEYWORD1 void KEYWORD2 NAME(ProvokingVertex)(GLenum mode) -{ - (void) mode; - DISPATCH(ProvokingVertexEXT, (mode), (F, "glProvokingVertex(0x%x);\n", mode)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_957)(GLenum target, GLenum pname, GLvoid ** params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_957)(GLenum target, GLenum pname, GLvoid ** params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetTexParameterPointervAPPLE, (target, pname, params), (F, "glGetTexParameterPointervAPPLE(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_958)(GLenum target, GLsizei length, GLvoid * pointer); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_958)(GLenum target, GLsizei length, GLvoid * pointer) -{ - (void) target; (void) length; (void) pointer; - DISPATCH(TextureRangeAPPLE, (target, length, pointer), (F, "glTextureRangeAPPLE(0x%x, %d, %p);\n", target, length, (const void *) pointer)); -} - -KEYWORD1 void KEYWORD2 NAME(GetObjectParameterivAPPLE)(GLenum objectType, GLuint name, GLenum pname, GLint * value) -{ - (void) objectType; (void) name; (void) pname; (void) value; - DISPATCH(GetObjectParameterivAPPLE, (objectType, name, pname, value), (F, "glGetObjectParameterivAPPLE(0x%x, %d, 0x%x, %p);\n", objectType, name, pname, (const void *) value)); -} - -KEYWORD1 GLenum KEYWORD2 NAME(ObjectPurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option) -{ - (void) objectType; (void) name; (void) option; - RETURN_DISPATCH(ObjectPurgeableAPPLE, (objectType, name, option), (F, "glObjectPurgeableAPPLE(0x%x, %d, 0x%x);\n", objectType, name, option)); -} - -KEYWORD1 GLenum KEYWORD2 NAME(ObjectUnpurgeableAPPLE)(GLenum objectType, GLuint name, GLenum option) -{ - (void) objectType; (void) name; (void) option; - RETURN_DISPATCH(ObjectUnpurgeableAPPLE, (objectType, name, option), (F, "glObjectUnpurgeableAPPLE(0x%x, %d, 0x%x);\n", objectType, name, option)); -} - -KEYWORD1 void KEYWORD2 NAME(ActiveProgramEXT)(GLuint program) -{ - (void) program; - DISPATCH(ActiveProgramEXT, (program), (F, "glActiveProgramEXT(%d);\n", program)); -} - -KEYWORD1 GLuint KEYWORD2 NAME(CreateShaderProgramEXT)(GLenum type, const GLchar * string) -{ - (void) type; (void) string; - RETURN_DISPATCH(CreateShaderProgramEXT, (type, string), (F, "glCreateShaderProgramEXT(0x%x, %p);\n", type, (const void *) string)); -} - -KEYWORD1 void KEYWORD2 NAME(UseShaderProgramEXT)(GLenum type, GLuint program) -{ - (void) type; (void) program; - DISPATCH(UseShaderProgramEXT, (type, program), (F, "glUseShaderProgramEXT(0x%x, %d);\n", type, program)); -} - -KEYWORD1 void KEYWORD2 NAME(TextureBarrierNV)(void) -{ - DISPATCH(TextureBarrierNV, (), (F, "glTextureBarrierNV();\n")); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_966)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_966)(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask) -{ - (void) frontfunc; (void) backfunc; (void) ref; (void) mask; - DISPATCH(StencilFuncSeparateATI, (frontfunc, backfunc, ref, mask), (F, "glStencilFuncSeparateATI(0x%x, 0x%x, %d, %d);\n", frontfunc, backfunc, ref, mask)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_967)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_967)(GLenum target, GLuint index, GLsizei count, const GLfloat * params) -{ - (void) target; (void) index; (void) count; (void) params; - DISPATCH(ProgramEnvParameters4fvEXT, (target, index, count, params), (F, "glProgramEnvParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_968)(GLenum target, GLuint index, GLsizei count, const GLfloat * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_968)(GLenum target, GLuint index, GLsizei count, const GLfloat * params) -{ - (void) target; (void) index; (void) count; (void) params; - DISPATCH(ProgramLocalParameters4fvEXT, (target, index, count, params), (F, "glProgramLocalParameters4fvEXT(0x%x, %d, %d, %p);\n", target, index, count, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_969)(GLuint id, GLenum pname, GLint64EXT * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_969)(GLuint id, GLenum pname, GLint64EXT * params) -{ - (void) id; (void) pname; (void) params; - DISPATCH(GetQueryObjecti64vEXT, (id, pname, params), (F, "glGetQueryObjecti64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_970)(GLuint id, GLenum pname, GLuint64EXT * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_970)(GLuint id, GLenum pname, GLuint64EXT * params) -{ - (void) id; (void) pname; (void) params; - DISPATCH(GetQueryObjectui64vEXT, (id, pname, params), (F, "glGetQueryObjectui64vEXT(%d, 0x%x, %p);\n", id, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(EGLImageTargetRenderbufferStorageOES)(GLenum target, GLvoid * writeOffset) -{ - (void) target; (void) writeOffset; - DISPATCH(EGLImageTargetRenderbufferStorageOES, (target, writeOffset), (F, "glEGLImageTargetRenderbufferStorageOES(0x%x, %p);\n", target, (const void *) writeOffset)); -} - -KEYWORD1 void KEYWORD2 NAME(EGLImageTargetTexture2DOES)(GLenum target, GLvoid * writeOffset) -{ - (void) target; (void) writeOffset; - DISPATCH(EGLImageTargetTexture2DOES, (target, writeOffset), (F, "glEGLImageTargetTexture2DOES(0x%x, %p);\n", target, (const void *) writeOffset)); -} - - -#endif /* _GLAPI_SKIP_NORMAL_ENTRY_POINTS */ - -/* these entry points might require different protocols */ -#ifndef _GLAPI_SKIP_PROTO_ENTRY_POINTS - -KEYWORD1 GLboolean KEYWORD2 NAME(AreTexturesResidentEXT)(GLsizei n, const GLuint * textures, GLboolean * residences) -{ - (void) n; (void) textures; (void) residences; - RETURN_DISPATCH(AreTexturesResident, (n, textures, residences), (F, "glAreTexturesResidentEXT(%d, %p, %p);\n", n, (const void *) textures, (const void *) residences)); -} - -KEYWORD1 void KEYWORD2 NAME(DeleteTexturesEXT)(GLsizei n, const GLuint * textures) -{ - (void) n; (void) textures; - DISPATCH(DeleteTextures, (n, textures), (F, "glDeleteTexturesEXT(%d, %p);\n", n, (const void *) textures)); -} - -KEYWORD1 void KEYWORD2 NAME(GenTexturesEXT)(GLsizei n, GLuint * textures) -{ - (void) n; (void) textures; - DISPATCH(GenTextures, (n, textures), (F, "glGenTexturesEXT(%d, %p);\n", n, (const void *) textures)); -} - -KEYWORD1 GLboolean KEYWORD2 NAME(IsTextureEXT)(GLuint texture) -{ - (void) texture; - RETURN_DISPATCH(IsTexture, (texture), (F, "glIsTextureEXT(%d);\n", texture)); -} - -KEYWORD1 void KEYWORD2 NAME(GetColorTableEXT)(GLenum target, GLenum format, GLenum type, GLvoid * table) -{ - (void) target; (void) format; (void) type; (void) table; - DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTableEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_343)(GLenum target, GLenum format, GLenum type, GLvoid * table); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_343)(GLenum target, GLenum format, GLenum type, GLvoid * table) -{ - (void) target; (void) format; (void) type; (void) table; - DISPATCH(GetColorTable, (target, format, type, table), (F, "glGetColorTableSGI(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) table)); -} - -KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_344)(GLenum target, GLenum pname, GLfloat * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_344)(GLenum target, GLenum pname, GLfloat * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetColorTableParameterfv, (target, pname, params), (F, "glGetColorTableParameterfvSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1 void KEYWORD2 NAME(GetColorTableParameterivEXT)(GLenum target, GLenum pname, GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_345)(GLenum target, GLenum pname, GLint * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_345)(GLenum target, GLenum pname, GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetColorTableParameteriv, (target, pname, params), (F, "glGetColorTableParameterivSGI(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_356)(GLenum target, GLenum format, GLenum type, GLvoid * image); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_356)(GLenum target, GLenum format, GLenum type, GLvoid * image) -{ - (void) target; (void) format; (void) type; (void) image; - DISPATCH(GetConvolutionFilter, (target, format, type, image), (F, "glGetConvolutionFilterEXT(0x%x, 0x%x, 0x%x, %p);\n", target, format, type, (const void *) image)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_357)(GLenum target, GLenum pname, GLfloat * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_357)(GLenum target, GLenum pname, GLfloat * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetConvolutionParameterfv, (target, pname, params), (F, "glGetConvolutionParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_358)(GLenum target, GLenum pname, GLint * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_358)(GLenum target, GLenum pname, GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetConvolutionParameteriv, (target, pname, params), (F, "glGetConvolutionParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_359)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_359)(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span) -{ - (void) target; (void) format; (void) type; (void) row; (void) column; (void) span; - DISPATCH(GetSeparableFilter, (target, format, type, row, column, span), (F, "glGetSeparableFilterEXT(0x%x, 0x%x, 0x%x, %p, %p, %p);\n", target, format, type, (const void *) row, (const void *) column, (const void *) span)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_361)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_361)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) -{ - (void) target; (void) reset; (void) format; (void) type; (void) values; - DISPATCH(GetHistogram, (target, reset, format, type, values), (F, "glGetHistogramEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_362)(GLenum target, GLenum pname, GLfloat * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_362)(GLenum target, GLenum pname, GLfloat * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetHistogramParameterfv, (target, pname, params), (F, "glGetHistogramParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_363)(GLenum target, GLenum pname, GLint * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_363)(GLenum target, GLenum pname, GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetHistogramParameteriv, (target, pname, params), (F, "glGetHistogramParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_364)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_364)(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) -{ - (void) target; (void) reset; (void) format; (void) type; (void) values; - DISPATCH(GetMinmax, (target, reset, format, type, values), (F, "glGetMinmaxEXT(0x%x, %d, 0x%x, 0x%x, %p);\n", target, reset, format, type, (const void *) values)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_365)(GLenum target, GLenum pname, GLfloat * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_365)(GLenum target, GLenum pname, GLfloat * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetMinmaxParameterfv, (target, pname, params), (F, "glGetMinmaxParameterfvEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_366)(GLenum target, GLenum pname, GLint * params); - -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_366)(GLenum target, GLenum pname, GLint * params) -{ - (void) target; (void) pname; (void) params; - DISPATCH(GetMinmaxParameteriv, (target, pname, params), (F, "glGetMinmaxParameterivEXT(0x%x, 0x%x, %p);\n", target, pname, (const void *) params)); -} - - -#endif /* _GLAPI_SKIP_PROTO_ENTRY_POINTS */ - - -#endif /* defined( NAME ) */ - -/* - * This is how a dispatch table can be initialized with all the functions - * we generated above. - */ -#ifdef DISPATCH_TABLE_NAME - -#ifndef TABLE_ENTRY -#error TABLE_ENTRY must be defined -#endif - -#ifdef _GLAPI_SKIP_NORMAL_ENTRY_POINTS -#error _GLAPI_SKIP_NORMAL_ENTRY_POINTS must not be defined -#endif - -_glapi_proc DISPATCH_TABLE_NAME[] = { - TABLE_ENTRY(NewList), - TABLE_ENTRY(EndList), - TABLE_ENTRY(CallList), - TABLE_ENTRY(CallLists), - TABLE_ENTRY(DeleteLists), - TABLE_ENTRY(GenLists), - TABLE_ENTRY(ListBase), - TABLE_ENTRY(Begin), - TABLE_ENTRY(Bitmap), - TABLE_ENTRY(Color3b), - TABLE_ENTRY(Color3bv), - TABLE_ENTRY(Color3d), - TABLE_ENTRY(Color3dv), - TABLE_ENTRY(Color3f), - TABLE_ENTRY(Color3fv), - TABLE_ENTRY(Color3i), - TABLE_ENTRY(Color3iv), - TABLE_ENTRY(Color3s), - TABLE_ENTRY(Color3sv), - TABLE_ENTRY(Color3ub), - TABLE_ENTRY(Color3ubv), - TABLE_ENTRY(Color3ui), - TABLE_ENTRY(Color3uiv), - TABLE_ENTRY(Color3us), - TABLE_ENTRY(Color3usv), - TABLE_ENTRY(Color4b), - TABLE_ENTRY(Color4bv), - TABLE_ENTRY(Color4d), - TABLE_ENTRY(Color4dv), - TABLE_ENTRY(Color4f), - TABLE_ENTRY(Color4fv), - TABLE_ENTRY(Color4i), - TABLE_ENTRY(Color4iv), - TABLE_ENTRY(Color4s), - TABLE_ENTRY(Color4sv), - TABLE_ENTRY(Color4ub), - TABLE_ENTRY(Color4ubv), - TABLE_ENTRY(Color4ui), - TABLE_ENTRY(Color4uiv), - TABLE_ENTRY(Color4us), - TABLE_ENTRY(Color4usv), - TABLE_ENTRY(EdgeFlag), - TABLE_ENTRY(EdgeFlagv), - TABLE_ENTRY(End), - TABLE_ENTRY(Indexd), - TABLE_ENTRY(Indexdv), - TABLE_ENTRY(Indexf), - TABLE_ENTRY(Indexfv), - TABLE_ENTRY(Indexi), - TABLE_ENTRY(Indexiv), - TABLE_ENTRY(Indexs), - TABLE_ENTRY(Indexsv), - TABLE_ENTRY(Normal3b), - TABLE_ENTRY(Normal3bv), - TABLE_ENTRY(Normal3d), - TABLE_ENTRY(Normal3dv), - TABLE_ENTRY(Normal3f), - TABLE_ENTRY(Normal3fv), - TABLE_ENTRY(Normal3i), - TABLE_ENTRY(Normal3iv), - TABLE_ENTRY(Normal3s), - TABLE_ENTRY(Normal3sv), - TABLE_ENTRY(RasterPos2d), - TABLE_ENTRY(RasterPos2dv), - TABLE_ENTRY(RasterPos2f), - TABLE_ENTRY(RasterPos2fv), - TABLE_ENTRY(RasterPos2i), - TABLE_ENTRY(RasterPos2iv), - TABLE_ENTRY(RasterPos2s), - TABLE_ENTRY(RasterPos2sv), - TABLE_ENTRY(RasterPos3d), - TABLE_ENTRY(RasterPos3dv), - TABLE_ENTRY(RasterPos3f), - TABLE_ENTRY(RasterPos3fv), - TABLE_ENTRY(RasterPos3i), - TABLE_ENTRY(RasterPos3iv), - TABLE_ENTRY(RasterPos3s), - TABLE_ENTRY(RasterPos3sv), - TABLE_ENTRY(RasterPos4d), - TABLE_ENTRY(RasterPos4dv), - TABLE_ENTRY(RasterPos4f), - TABLE_ENTRY(RasterPos4fv), - TABLE_ENTRY(RasterPos4i), - TABLE_ENTRY(RasterPos4iv), - TABLE_ENTRY(RasterPos4s), - TABLE_ENTRY(RasterPos4sv), - TABLE_ENTRY(Rectd), - TABLE_ENTRY(Rectdv), - TABLE_ENTRY(Rectf), - TABLE_ENTRY(Rectfv), - TABLE_ENTRY(Recti), - TABLE_ENTRY(Rectiv), - TABLE_ENTRY(Rects), - TABLE_ENTRY(Rectsv), - TABLE_ENTRY(TexCoord1d), - TABLE_ENTRY(TexCoord1dv), - TABLE_ENTRY(TexCoord1f), - TABLE_ENTRY(TexCoord1fv), - TABLE_ENTRY(TexCoord1i), - TABLE_ENTRY(TexCoord1iv), - TABLE_ENTRY(TexCoord1s), - TABLE_ENTRY(TexCoord1sv), - TABLE_ENTRY(TexCoord2d), - TABLE_ENTRY(TexCoord2dv), - TABLE_ENTRY(TexCoord2f), - TABLE_ENTRY(TexCoord2fv), - TABLE_ENTRY(TexCoord2i), - TABLE_ENTRY(TexCoord2iv), - TABLE_ENTRY(TexCoord2s), - TABLE_ENTRY(TexCoord2sv), - TABLE_ENTRY(TexCoord3d), - TABLE_ENTRY(TexCoord3dv), - TABLE_ENTRY(TexCoord3f), - TABLE_ENTRY(TexCoord3fv), - TABLE_ENTRY(TexCoord3i), - TABLE_ENTRY(TexCoord3iv), - TABLE_ENTRY(TexCoord3s), - TABLE_ENTRY(TexCoord3sv), - TABLE_ENTRY(TexCoord4d), - TABLE_ENTRY(TexCoord4dv), - TABLE_ENTRY(TexCoord4f), - TABLE_ENTRY(TexCoord4fv), - TABLE_ENTRY(TexCoord4i), - TABLE_ENTRY(TexCoord4iv), - TABLE_ENTRY(TexCoord4s), - TABLE_ENTRY(TexCoord4sv), - TABLE_ENTRY(Vertex2d), - TABLE_ENTRY(Vertex2dv), - TABLE_ENTRY(Vertex2f), - TABLE_ENTRY(Vertex2fv), - TABLE_ENTRY(Vertex2i), - TABLE_ENTRY(Vertex2iv), - TABLE_ENTRY(Vertex2s), - TABLE_ENTRY(Vertex2sv), - TABLE_ENTRY(Vertex3d), - TABLE_ENTRY(Vertex3dv), - TABLE_ENTRY(Vertex3f), - TABLE_ENTRY(Vertex3fv), - TABLE_ENTRY(Vertex3i), - TABLE_ENTRY(Vertex3iv), - TABLE_ENTRY(Vertex3s), - TABLE_ENTRY(Vertex3sv), - TABLE_ENTRY(Vertex4d), - TABLE_ENTRY(Vertex4dv), - TABLE_ENTRY(Vertex4f), - TABLE_ENTRY(Vertex4fv), - TABLE_ENTRY(Vertex4i), - TABLE_ENTRY(Vertex4iv), - TABLE_ENTRY(Vertex4s), - TABLE_ENTRY(Vertex4sv), - TABLE_ENTRY(ClipPlane), - TABLE_ENTRY(ColorMaterial), - TABLE_ENTRY(CullFace), - TABLE_ENTRY(Fogf), - TABLE_ENTRY(Fogfv), - TABLE_ENTRY(Fogi), - TABLE_ENTRY(Fogiv), - TABLE_ENTRY(FrontFace), - TABLE_ENTRY(Hint), - TABLE_ENTRY(Lightf), - TABLE_ENTRY(Lightfv), - TABLE_ENTRY(Lighti), - TABLE_ENTRY(Lightiv), - TABLE_ENTRY(LightModelf), - TABLE_ENTRY(LightModelfv), - TABLE_ENTRY(LightModeli), - TABLE_ENTRY(LightModeliv), - TABLE_ENTRY(LineStipple), - TABLE_ENTRY(LineWidth), - TABLE_ENTRY(Materialf), - TABLE_ENTRY(Materialfv), - TABLE_ENTRY(Materiali), - TABLE_ENTRY(Materialiv), - TABLE_ENTRY(PointSize), - TABLE_ENTRY(PolygonMode), - TABLE_ENTRY(PolygonStipple), - TABLE_ENTRY(Scissor), - TABLE_ENTRY(ShadeModel), - TABLE_ENTRY(TexParameterf), - TABLE_ENTRY(TexParameterfv), - TABLE_ENTRY(TexParameteri), - TABLE_ENTRY(TexParameteriv), - TABLE_ENTRY(TexImage1D), - TABLE_ENTRY(TexImage2D), - TABLE_ENTRY(TexEnvf), - TABLE_ENTRY(TexEnvfv), - TABLE_ENTRY(TexEnvi), - TABLE_ENTRY(TexEnviv), - TABLE_ENTRY(TexGend), - TABLE_ENTRY(TexGendv), - TABLE_ENTRY(TexGenf), - TABLE_ENTRY(TexGenfv), - TABLE_ENTRY(TexGeni), - TABLE_ENTRY(TexGeniv), - TABLE_ENTRY(FeedbackBuffer), - TABLE_ENTRY(SelectBuffer), - TABLE_ENTRY(RenderMode), - TABLE_ENTRY(InitNames), - TABLE_ENTRY(LoadName), - TABLE_ENTRY(PassThrough), - TABLE_ENTRY(PopName), - TABLE_ENTRY(PushName), - TABLE_ENTRY(DrawBuffer), - TABLE_ENTRY(Clear), - TABLE_ENTRY(ClearAccum), - TABLE_ENTRY(ClearIndex), - TABLE_ENTRY(ClearColor), - TABLE_ENTRY(ClearStencil), - TABLE_ENTRY(ClearDepth), - TABLE_ENTRY(StencilMask), - TABLE_ENTRY(ColorMask), - TABLE_ENTRY(DepthMask), - TABLE_ENTRY(IndexMask), - TABLE_ENTRY(Accum), - TABLE_ENTRY(Disable), - TABLE_ENTRY(Enable), - TABLE_ENTRY(Finish), - TABLE_ENTRY(Flush), - TABLE_ENTRY(PopAttrib), - TABLE_ENTRY(PushAttrib), - TABLE_ENTRY(Map1d), - TABLE_ENTRY(Map1f), - TABLE_ENTRY(Map2d), - TABLE_ENTRY(Map2f), - TABLE_ENTRY(MapGrid1d), - TABLE_ENTRY(MapGrid1f), - TABLE_ENTRY(MapGrid2d), - TABLE_ENTRY(MapGrid2f), - TABLE_ENTRY(EvalCoord1d), - TABLE_ENTRY(EvalCoord1dv), - TABLE_ENTRY(EvalCoord1f), - TABLE_ENTRY(EvalCoord1fv), - TABLE_ENTRY(EvalCoord2d), - TABLE_ENTRY(EvalCoord2dv), - TABLE_ENTRY(EvalCoord2f), - TABLE_ENTRY(EvalCoord2fv), - TABLE_ENTRY(EvalMesh1), - TABLE_ENTRY(EvalPoint1), - TABLE_ENTRY(EvalMesh2), - TABLE_ENTRY(EvalPoint2), - TABLE_ENTRY(AlphaFunc), - TABLE_ENTRY(BlendFunc), - TABLE_ENTRY(LogicOp), - TABLE_ENTRY(StencilFunc), - TABLE_ENTRY(StencilOp), - TABLE_ENTRY(DepthFunc), - TABLE_ENTRY(PixelZoom), - TABLE_ENTRY(PixelTransferf), - TABLE_ENTRY(PixelTransferi), - TABLE_ENTRY(PixelStoref), - TABLE_ENTRY(PixelStorei), - TABLE_ENTRY(PixelMapfv), - TABLE_ENTRY(PixelMapuiv), - TABLE_ENTRY(PixelMapusv), - TABLE_ENTRY(ReadBuffer), - TABLE_ENTRY(CopyPixels), - TABLE_ENTRY(ReadPixels), - TABLE_ENTRY(DrawPixels), - TABLE_ENTRY(GetBooleanv), - TABLE_ENTRY(GetClipPlane), - TABLE_ENTRY(GetDoublev), - TABLE_ENTRY(GetError), - TABLE_ENTRY(GetFloatv), - TABLE_ENTRY(GetIntegerv), - TABLE_ENTRY(GetLightfv), - TABLE_ENTRY(GetLightiv), - TABLE_ENTRY(GetMapdv), - TABLE_ENTRY(GetMapfv), - TABLE_ENTRY(GetMapiv), - TABLE_ENTRY(GetMaterialfv), - TABLE_ENTRY(GetMaterialiv), - TABLE_ENTRY(GetPixelMapfv), - TABLE_ENTRY(GetPixelMapuiv), - TABLE_ENTRY(GetPixelMapusv), - TABLE_ENTRY(GetPolygonStipple), - TABLE_ENTRY(GetString), - TABLE_ENTRY(GetTexEnvfv), - TABLE_ENTRY(GetTexEnviv), - TABLE_ENTRY(GetTexGendv), - TABLE_ENTRY(GetTexGenfv), - TABLE_ENTRY(GetTexGeniv), - TABLE_ENTRY(GetTexImage), - TABLE_ENTRY(GetTexParameterfv), - TABLE_ENTRY(GetTexParameteriv), - TABLE_ENTRY(GetTexLevelParameterfv), - TABLE_ENTRY(GetTexLevelParameteriv), - TABLE_ENTRY(IsEnabled), - TABLE_ENTRY(IsList), - TABLE_ENTRY(DepthRange), - TABLE_ENTRY(Frustum), - TABLE_ENTRY(LoadIdentity), - TABLE_ENTRY(LoadMatrixf), - TABLE_ENTRY(LoadMatrixd), - TABLE_ENTRY(MatrixMode), - TABLE_ENTRY(MultMatrixf), - TABLE_ENTRY(MultMatrixd), - TABLE_ENTRY(Ortho), - TABLE_ENTRY(PopMatrix), - TABLE_ENTRY(PushMatrix), - TABLE_ENTRY(Rotated), - TABLE_ENTRY(Rotatef), - TABLE_ENTRY(Scaled), - TABLE_ENTRY(Scalef), - TABLE_ENTRY(Translated), - TABLE_ENTRY(Translatef), - TABLE_ENTRY(Viewport), - TABLE_ENTRY(ArrayElement), - TABLE_ENTRY(BindTexture), - TABLE_ENTRY(ColorPointer), - TABLE_ENTRY(DisableClientState), - TABLE_ENTRY(DrawArrays), - TABLE_ENTRY(DrawElements), - TABLE_ENTRY(EdgeFlagPointer), - TABLE_ENTRY(EnableClientState), - TABLE_ENTRY(IndexPointer), - TABLE_ENTRY(Indexub), - TABLE_ENTRY(Indexubv), - TABLE_ENTRY(InterleavedArrays), - TABLE_ENTRY(NormalPointer), - TABLE_ENTRY(PolygonOffset), - TABLE_ENTRY(TexCoordPointer), - TABLE_ENTRY(VertexPointer), - TABLE_ENTRY(AreTexturesResident), - TABLE_ENTRY(CopyTexImage1D), - TABLE_ENTRY(CopyTexImage2D), - TABLE_ENTRY(CopyTexSubImage1D), - TABLE_ENTRY(CopyTexSubImage2D), - TABLE_ENTRY(DeleteTextures), - TABLE_ENTRY(GenTextures), - TABLE_ENTRY(GetPointerv), - TABLE_ENTRY(IsTexture), - TABLE_ENTRY(PrioritizeTextures), - TABLE_ENTRY(TexSubImage1D), - TABLE_ENTRY(TexSubImage2D), - TABLE_ENTRY(PopClientAttrib), - TABLE_ENTRY(PushClientAttrib), - TABLE_ENTRY(BlendColor), - TABLE_ENTRY(BlendEquation), - TABLE_ENTRY(DrawRangeElements), - TABLE_ENTRY(ColorTable), - TABLE_ENTRY(ColorTableParameterfv), - TABLE_ENTRY(ColorTableParameteriv), - TABLE_ENTRY(CopyColorTable), - TABLE_ENTRY(GetColorTable), - TABLE_ENTRY(GetColorTableParameterfv), - TABLE_ENTRY(GetColorTableParameteriv), - TABLE_ENTRY(ColorSubTable), - TABLE_ENTRY(CopyColorSubTable), - TABLE_ENTRY(ConvolutionFilter1D), - TABLE_ENTRY(ConvolutionFilter2D), - TABLE_ENTRY(ConvolutionParameterf), - TABLE_ENTRY(ConvolutionParameterfv), - TABLE_ENTRY(ConvolutionParameteri), - TABLE_ENTRY(ConvolutionParameteriv), - TABLE_ENTRY(CopyConvolutionFilter1D), - TABLE_ENTRY(CopyConvolutionFilter2D), - TABLE_ENTRY(GetConvolutionFilter), - TABLE_ENTRY(GetConvolutionParameterfv), - TABLE_ENTRY(GetConvolutionParameteriv), - TABLE_ENTRY(GetSeparableFilter), - TABLE_ENTRY(SeparableFilter2D), - TABLE_ENTRY(GetHistogram), - TABLE_ENTRY(GetHistogramParameterfv), - TABLE_ENTRY(GetHistogramParameteriv), - TABLE_ENTRY(GetMinmax), - TABLE_ENTRY(GetMinmaxParameterfv), - TABLE_ENTRY(GetMinmaxParameteriv), - TABLE_ENTRY(Histogram), - TABLE_ENTRY(Minmax), - TABLE_ENTRY(ResetHistogram), - TABLE_ENTRY(ResetMinmax), - TABLE_ENTRY(TexImage3D), - TABLE_ENTRY(TexSubImage3D), - TABLE_ENTRY(CopyTexSubImage3D), - TABLE_ENTRY(ActiveTextureARB), - TABLE_ENTRY(ClientActiveTextureARB), - TABLE_ENTRY(MultiTexCoord1dARB), - TABLE_ENTRY(MultiTexCoord1dvARB), - TABLE_ENTRY(MultiTexCoord1fARB), - TABLE_ENTRY(MultiTexCoord1fvARB), - TABLE_ENTRY(MultiTexCoord1iARB), - TABLE_ENTRY(MultiTexCoord1ivARB), - TABLE_ENTRY(MultiTexCoord1sARB), - TABLE_ENTRY(MultiTexCoord1svARB), - TABLE_ENTRY(MultiTexCoord2dARB), - TABLE_ENTRY(MultiTexCoord2dvARB), - TABLE_ENTRY(MultiTexCoord2fARB), - TABLE_ENTRY(MultiTexCoord2fvARB), - TABLE_ENTRY(MultiTexCoord2iARB), - TABLE_ENTRY(MultiTexCoord2ivARB), - TABLE_ENTRY(MultiTexCoord2sARB), - TABLE_ENTRY(MultiTexCoord2svARB), - TABLE_ENTRY(MultiTexCoord3dARB), - TABLE_ENTRY(MultiTexCoord3dvARB), - TABLE_ENTRY(MultiTexCoord3fARB), - TABLE_ENTRY(MultiTexCoord3fvARB), - TABLE_ENTRY(MultiTexCoord3iARB), - TABLE_ENTRY(MultiTexCoord3ivARB), - TABLE_ENTRY(MultiTexCoord3sARB), - TABLE_ENTRY(MultiTexCoord3svARB), - TABLE_ENTRY(MultiTexCoord4dARB), - TABLE_ENTRY(MultiTexCoord4dvARB), - TABLE_ENTRY(MultiTexCoord4fARB), - TABLE_ENTRY(MultiTexCoord4fvARB), - TABLE_ENTRY(MultiTexCoord4iARB), - TABLE_ENTRY(MultiTexCoord4ivARB), - TABLE_ENTRY(MultiTexCoord4sARB), - TABLE_ENTRY(MultiTexCoord4svARB), - TABLE_ENTRY(AttachShader), - TABLE_ENTRY(CreateProgram), - TABLE_ENTRY(CreateShader), - TABLE_ENTRY(DeleteProgram), - TABLE_ENTRY(DeleteShader), - TABLE_ENTRY(DetachShader), - TABLE_ENTRY(GetAttachedShaders), - TABLE_ENTRY(GetProgramInfoLog), - TABLE_ENTRY(GetProgramiv), - TABLE_ENTRY(GetShaderInfoLog), - TABLE_ENTRY(GetShaderiv), - TABLE_ENTRY(IsProgram), - TABLE_ENTRY(IsShader), - TABLE_ENTRY(StencilFuncSeparate), - TABLE_ENTRY(StencilMaskSeparate), - TABLE_ENTRY(StencilOpSeparate), - TABLE_ENTRY(UniformMatrix2x3fv), - TABLE_ENTRY(UniformMatrix2x4fv), - TABLE_ENTRY(UniformMatrix3x2fv), - TABLE_ENTRY(UniformMatrix3x4fv), - TABLE_ENTRY(UniformMatrix4x2fv), - TABLE_ENTRY(UniformMatrix4x3fv), - TABLE_ENTRY(ClampColor), - TABLE_ENTRY(ClearBufferfi), - TABLE_ENTRY(ClearBufferfv), - TABLE_ENTRY(ClearBufferiv), - TABLE_ENTRY(ClearBufferuiv), - TABLE_ENTRY(GetStringi), - TABLE_ENTRY(TexBuffer), - TABLE_ENTRY(FramebufferTexture), - TABLE_ENTRY(GetBufferParameteri64v), - TABLE_ENTRY(GetInteger64i_v), - TABLE_ENTRY(VertexAttribDivisor), - TABLE_ENTRY(LoadTransposeMatrixdARB), - TABLE_ENTRY(LoadTransposeMatrixfARB), - TABLE_ENTRY(MultTransposeMatrixdARB), - TABLE_ENTRY(MultTransposeMatrixfARB), - TABLE_ENTRY(SampleCoverageARB), - TABLE_ENTRY(CompressedTexImage1DARB), - TABLE_ENTRY(CompressedTexImage2DARB), - TABLE_ENTRY(CompressedTexImage3DARB), - TABLE_ENTRY(CompressedTexSubImage1DARB), - TABLE_ENTRY(CompressedTexSubImage2DARB), - TABLE_ENTRY(CompressedTexSubImage3DARB), - TABLE_ENTRY(GetCompressedTexImageARB), - TABLE_ENTRY(DisableVertexAttribArrayARB), - TABLE_ENTRY(EnableVertexAttribArrayARB), - TABLE_ENTRY(GetProgramEnvParameterdvARB), - TABLE_ENTRY(GetProgramEnvParameterfvARB), - TABLE_ENTRY(GetProgramLocalParameterdvARB), - TABLE_ENTRY(GetProgramLocalParameterfvARB), - TABLE_ENTRY(GetProgramStringARB), - TABLE_ENTRY(GetProgramivARB), - TABLE_ENTRY(GetVertexAttribdvARB), - TABLE_ENTRY(GetVertexAttribfvARB), - TABLE_ENTRY(GetVertexAttribivARB), - TABLE_ENTRY(ProgramEnvParameter4dARB), - TABLE_ENTRY(ProgramEnvParameter4dvARB), - TABLE_ENTRY(ProgramEnvParameter4fARB), - TABLE_ENTRY(ProgramEnvParameter4fvARB), - TABLE_ENTRY(ProgramLocalParameter4dARB), - TABLE_ENTRY(ProgramLocalParameter4dvARB), - TABLE_ENTRY(ProgramLocalParameter4fARB), - TABLE_ENTRY(ProgramLocalParameter4fvARB), - TABLE_ENTRY(ProgramStringARB), - TABLE_ENTRY(VertexAttrib1dARB), - TABLE_ENTRY(VertexAttrib1dvARB), - TABLE_ENTRY(VertexAttrib1fARB), - TABLE_ENTRY(VertexAttrib1fvARB), - TABLE_ENTRY(VertexAttrib1sARB), - TABLE_ENTRY(VertexAttrib1svARB), - TABLE_ENTRY(VertexAttrib2dARB), - TABLE_ENTRY(VertexAttrib2dvARB), - TABLE_ENTRY(VertexAttrib2fARB), - TABLE_ENTRY(VertexAttrib2fvARB), - TABLE_ENTRY(VertexAttrib2sARB), - TABLE_ENTRY(VertexAttrib2svARB), - TABLE_ENTRY(VertexAttrib3dARB), - TABLE_ENTRY(VertexAttrib3dvARB), - TABLE_ENTRY(VertexAttrib3fARB), - TABLE_ENTRY(VertexAttrib3fvARB), - TABLE_ENTRY(VertexAttrib3sARB), - TABLE_ENTRY(VertexAttrib3svARB), - TABLE_ENTRY(VertexAttrib4NbvARB), - TABLE_ENTRY(VertexAttrib4NivARB), - TABLE_ENTRY(VertexAttrib4NsvARB), - TABLE_ENTRY(VertexAttrib4NubARB), - TABLE_ENTRY(VertexAttrib4NubvARB), - TABLE_ENTRY(VertexAttrib4NuivARB), - TABLE_ENTRY(VertexAttrib4NusvARB), - TABLE_ENTRY(VertexAttrib4bvARB), - TABLE_ENTRY(VertexAttrib4dARB), - TABLE_ENTRY(VertexAttrib4dvARB), - TABLE_ENTRY(VertexAttrib4fARB), - TABLE_ENTRY(VertexAttrib4fvARB), - TABLE_ENTRY(VertexAttrib4ivARB), - TABLE_ENTRY(VertexAttrib4sARB), - TABLE_ENTRY(VertexAttrib4svARB), - TABLE_ENTRY(VertexAttrib4ubvARB), - TABLE_ENTRY(VertexAttrib4uivARB), - TABLE_ENTRY(VertexAttrib4usvARB), - TABLE_ENTRY(VertexAttribPointerARB), - TABLE_ENTRY(BindBufferARB), - TABLE_ENTRY(BufferDataARB), - TABLE_ENTRY(BufferSubDataARB), - TABLE_ENTRY(DeleteBuffersARB), - TABLE_ENTRY(GenBuffersARB), - TABLE_ENTRY(GetBufferParameterivARB), - TABLE_ENTRY(GetBufferPointervARB), - TABLE_ENTRY(GetBufferSubDataARB), - TABLE_ENTRY(IsBufferARB), - TABLE_ENTRY(MapBufferARB), - TABLE_ENTRY(UnmapBufferARB), - TABLE_ENTRY(BeginQueryARB), - TABLE_ENTRY(DeleteQueriesARB), - TABLE_ENTRY(EndQueryARB), - TABLE_ENTRY(GenQueriesARB), - TABLE_ENTRY(GetQueryObjectivARB), - TABLE_ENTRY(GetQueryObjectuivARB), - TABLE_ENTRY(GetQueryivARB), - TABLE_ENTRY(IsQueryARB), - TABLE_ENTRY(AttachObjectARB), - TABLE_ENTRY(CompileShaderARB), - TABLE_ENTRY(CreateProgramObjectARB), - TABLE_ENTRY(CreateShaderObjectARB), - TABLE_ENTRY(DeleteObjectARB), - TABLE_ENTRY(DetachObjectARB), - TABLE_ENTRY(GetActiveUniformARB), - TABLE_ENTRY(GetAttachedObjectsARB), - TABLE_ENTRY(GetHandleARB), - TABLE_ENTRY(GetInfoLogARB), - TABLE_ENTRY(GetObjectParameterfvARB), - TABLE_ENTRY(GetObjectParameterivARB), - TABLE_ENTRY(GetShaderSourceARB), - TABLE_ENTRY(GetUniformLocationARB), - TABLE_ENTRY(GetUniformfvARB), - TABLE_ENTRY(GetUniformivARB), - TABLE_ENTRY(LinkProgramARB), - TABLE_ENTRY(ShaderSourceARB), - TABLE_ENTRY(Uniform1fARB), - TABLE_ENTRY(Uniform1fvARB), - TABLE_ENTRY(Uniform1iARB), - TABLE_ENTRY(Uniform1ivARB), - TABLE_ENTRY(Uniform2fARB), - TABLE_ENTRY(Uniform2fvARB), - TABLE_ENTRY(Uniform2iARB), - TABLE_ENTRY(Uniform2ivARB), - TABLE_ENTRY(Uniform3fARB), - TABLE_ENTRY(Uniform3fvARB), - TABLE_ENTRY(Uniform3iARB), - TABLE_ENTRY(Uniform3ivARB), - TABLE_ENTRY(Uniform4fARB), - TABLE_ENTRY(Uniform4fvARB), - TABLE_ENTRY(Uniform4iARB), - TABLE_ENTRY(Uniform4ivARB), - TABLE_ENTRY(UniformMatrix2fvARB), - TABLE_ENTRY(UniformMatrix3fvARB), - TABLE_ENTRY(UniformMatrix4fvARB), - TABLE_ENTRY(UseProgramObjectARB), - TABLE_ENTRY(ValidateProgramARB), - TABLE_ENTRY(BindAttribLocationARB), - TABLE_ENTRY(GetActiveAttribARB), - TABLE_ENTRY(GetAttribLocationARB), - TABLE_ENTRY(DrawBuffersARB), - TABLE_ENTRY(ClampColorARB), - TABLE_ENTRY(DrawArraysInstancedARB), - TABLE_ENTRY(DrawElementsInstancedARB), - TABLE_ENTRY(RenderbufferStorageMultisample), - TABLE_ENTRY(FramebufferTextureARB), - TABLE_ENTRY(FramebufferTextureFaceARB), - TABLE_ENTRY(ProgramParameteriARB), - TABLE_ENTRY(VertexAttribDivisorARB), - TABLE_ENTRY(FlushMappedBufferRange), - TABLE_ENTRY(MapBufferRange), - TABLE_ENTRY(TexBufferARB), - TABLE_ENTRY(BindVertexArray), - TABLE_ENTRY(GenVertexArrays), - TABLE_ENTRY(CopyBufferSubData), - TABLE_ENTRY(ClientWaitSync), - TABLE_ENTRY(DeleteSync), - TABLE_ENTRY(FenceSync), - TABLE_ENTRY(GetInteger64v), - TABLE_ENTRY(GetSynciv), - TABLE_ENTRY(IsSync), - TABLE_ENTRY(WaitSync), - TABLE_ENTRY(DrawElementsBaseVertex), - TABLE_ENTRY(DrawElementsInstancedBaseVertex), - TABLE_ENTRY(DrawRangeElementsBaseVertex), - TABLE_ENTRY(MultiDrawElementsBaseVertex), - TABLE_ENTRY(BlendEquationSeparateiARB), - TABLE_ENTRY(BlendEquationiARB), - TABLE_ENTRY(BlendFuncSeparateiARB), - TABLE_ENTRY(BlendFunciARB), - TABLE_ENTRY(BindSampler), - TABLE_ENTRY(DeleteSamplers), - TABLE_ENTRY(GenSamplers), - TABLE_ENTRY(GetSamplerParameterIiv), - TABLE_ENTRY(GetSamplerParameterIuiv), - TABLE_ENTRY(GetSamplerParameterfv), - TABLE_ENTRY(GetSamplerParameteriv), - TABLE_ENTRY(IsSampler), - TABLE_ENTRY(SamplerParameterIiv), - TABLE_ENTRY(SamplerParameterIuiv), - TABLE_ENTRY(SamplerParameterf), - TABLE_ENTRY(SamplerParameterfv), - TABLE_ENTRY(SamplerParameteri), - TABLE_ENTRY(SamplerParameteriv), - TABLE_ENTRY(ColorP3ui), - TABLE_ENTRY(ColorP3uiv), - TABLE_ENTRY(ColorP4ui), - TABLE_ENTRY(ColorP4uiv), - TABLE_ENTRY(MultiTexCoordP1ui), - TABLE_ENTRY(MultiTexCoordP1uiv), - TABLE_ENTRY(MultiTexCoordP2ui), - TABLE_ENTRY(MultiTexCoordP2uiv), - TABLE_ENTRY(MultiTexCoordP3ui), - TABLE_ENTRY(MultiTexCoordP3uiv), - TABLE_ENTRY(MultiTexCoordP4ui), - TABLE_ENTRY(MultiTexCoordP4uiv), - TABLE_ENTRY(NormalP3ui), - TABLE_ENTRY(NormalP3uiv), - TABLE_ENTRY(SecondaryColorP3ui), - TABLE_ENTRY(SecondaryColorP3uiv), - TABLE_ENTRY(TexCoordP1ui), - TABLE_ENTRY(TexCoordP1uiv), - TABLE_ENTRY(TexCoordP2ui), - TABLE_ENTRY(TexCoordP2uiv), - TABLE_ENTRY(TexCoordP3ui), - TABLE_ENTRY(TexCoordP3uiv), - TABLE_ENTRY(TexCoordP4ui), - TABLE_ENTRY(TexCoordP4uiv), - TABLE_ENTRY(VertexAttribP1ui), - TABLE_ENTRY(VertexAttribP1uiv), - TABLE_ENTRY(VertexAttribP2ui), - TABLE_ENTRY(VertexAttribP2uiv), - TABLE_ENTRY(VertexAttribP3ui), - TABLE_ENTRY(VertexAttribP3uiv), - TABLE_ENTRY(VertexAttribP4ui), - TABLE_ENTRY(VertexAttribP4uiv), - TABLE_ENTRY(VertexP2ui), - TABLE_ENTRY(VertexP2uiv), - TABLE_ENTRY(VertexP3ui), - TABLE_ENTRY(VertexP3uiv), - TABLE_ENTRY(VertexP4ui), - TABLE_ENTRY(VertexP4uiv), - TABLE_ENTRY(BindTransformFeedback), - TABLE_ENTRY(DeleteTransformFeedbacks), - TABLE_ENTRY(DrawTransformFeedback), - TABLE_ENTRY(GenTransformFeedbacks), - TABLE_ENTRY(IsTransformFeedback), - TABLE_ENTRY(PauseTransformFeedback), - TABLE_ENTRY(ResumeTransformFeedback), - TABLE_ENTRY(ClearDepthf), - TABLE_ENTRY(DepthRangef), - TABLE_ENTRY(GetShaderPrecisionFormat), - TABLE_ENTRY(ReleaseShaderCompiler), - TABLE_ENTRY(ShaderBinary), - TABLE_ENTRY(GetGraphicsResetStatusARB), - TABLE_ENTRY(GetnColorTableARB), - TABLE_ENTRY(GetnCompressedTexImageARB), - TABLE_ENTRY(GetnConvolutionFilterARB), - TABLE_ENTRY(GetnHistogramARB), - TABLE_ENTRY(GetnMapdvARB), - TABLE_ENTRY(GetnMapfvARB), - TABLE_ENTRY(GetnMapivARB), - TABLE_ENTRY(GetnMinmaxARB), - TABLE_ENTRY(GetnPixelMapfvARB), - TABLE_ENTRY(GetnPixelMapuivARB), - TABLE_ENTRY(GetnPixelMapusvARB), - TABLE_ENTRY(GetnPolygonStippleARB), - TABLE_ENTRY(GetnSeparableFilterARB), - TABLE_ENTRY(GetnTexImageARB), - TABLE_ENTRY(GetnUniformdvARB), - TABLE_ENTRY(GetnUniformfvARB), - TABLE_ENTRY(GetnUniformivARB), - TABLE_ENTRY(GetnUniformuivARB), - TABLE_ENTRY(ReadnPixelsARB), - TABLE_ENTRY(TexStorage1D), - TABLE_ENTRY(TexStorage2D), - TABLE_ENTRY(TexStorage3D), - TABLE_ENTRY(TextureStorage1DEXT), - TABLE_ENTRY(TextureStorage2DEXT), - TABLE_ENTRY(TextureStorage3DEXT), - TABLE_ENTRY(PolygonOffsetEXT), - TABLE_ENTRY(_dispatch_stub_692), - TABLE_ENTRY(_dispatch_stub_693), - TABLE_ENTRY(_dispatch_stub_694), - TABLE_ENTRY(_dispatch_stub_695), - TABLE_ENTRY(_dispatch_stub_696), - TABLE_ENTRY(_dispatch_stub_697), - TABLE_ENTRY(_dispatch_stub_698), - TABLE_ENTRY(_dispatch_stub_699), - TABLE_ENTRY(ColorPointerEXT), - TABLE_ENTRY(EdgeFlagPointerEXT), - TABLE_ENTRY(IndexPointerEXT), - TABLE_ENTRY(NormalPointerEXT), - TABLE_ENTRY(TexCoordPointerEXT), - TABLE_ENTRY(VertexPointerEXT), - TABLE_ENTRY(PointParameterfEXT), - TABLE_ENTRY(PointParameterfvEXT), - TABLE_ENTRY(LockArraysEXT), - TABLE_ENTRY(UnlockArraysEXT), - TABLE_ENTRY(SecondaryColor3bEXT), - TABLE_ENTRY(SecondaryColor3bvEXT), - TABLE_ENTRY(SecondaryColor3dEXT), - TABLE_ENTRY(SecondaryColor3dvEXT), - TABLE_ENTRY(SecondaryColor3fEXT), - TABLE_ENTRY(SecondaryColor3fvEXT), - TABLE_ENTRY(SecondaryColor3iEXT), - TABLE_ENTRY(SecondaryColor3ivEXT), - TABLE_ENTRY(SecondaryColor3sEXT), - TABLE_ENTRY(SecondaryColor3svEXT), - TABLE_ENTRY(SecondaryColor3ubEXT), - TABLE_ENTRY(SecondaryColor3ubvEXT), - TABLE_ENTRY(SecondaryColor3uiEXT), - TABLE_ENTRY(SecondaryColor3uivEXT), - TABLE_ENTRY(SecondaryColor3usEXT), - TABLE_ENTRY(SecondaryColor3usvEXT), - TABLE_ENTRY(SecondaryColorPointerEXT), - TABLE_ENTRY(MultiDrawArraysEXT), - TABLE_ENTRY(MultiDrawElementsEXT), - TABLE_ENTRY(FogCoordPointerEXT), - TABLE_ENTRY(FogCoorddEXT), - TABLE_ENTRY(FogCoorddvEXT), - TABLE_ENTRY(FogCoordfEXT), - TABLE_ENTRY(FogCoordfvEXT), - TABLE_ENTRY(_dispatch_stub_734), - TABLE_ENTRY(BlendFuncSeparateEXT), - TABLE_ENTRY(FlushVertexArrayRangeNV), - TABLE_ENTRY(VertexArrayRangeNV), - TABLE_ENTRY(CombinerInputNV), - TABLE_ENTRY(CombinerOutputNV), - TABLE_ENTRY(CombinerParameterfNV), - TABLE_ENTRY(CombinerParameterfvNV), - TABLE_ENTRY(CombinerParameteriNV), - TABLE_ENTRY(CombinerParameterivNV), - TABLE_ENTRY(FinalCombinerInputNV), - TABLE_ENTRY(GetCombinerInputParameterfvNV), - TABLE_ENTRY(GetCombinerInputParameterivNV), - TABLE_ENTRY(GetCombinerOutputParameterfvNV), - TABLE_ENTRY(GetCombinerOutputParameterivNV), - TABLE_ENTRY(GetFinalCombinerInputParameterfvNV), - TABLE_ENTRY(GetFinalCombinerInputParameterivNV), - TABLE_ENTRY(ResizeBuffersMESA), - TABLE_ENTRY(WindowPos2dMESA), - TABLE_ENTRY(WindowPos2dvMESA), - TABLE_ENTRY(WindowPos2fMESA), - TABLE_ENTRY(WindowPos2fvMESA), - TABLE_ENTRY(WindowPos2iMESA), - TABLE_ENTRY(WindowPos2ivMESA), - TABLE_ENTRY(WindowPos2sMESA), - TABLE_ENTRY(WindowPos2svMESA), - TABLE_ENTRY(WindowPos3dMESA), - TABLE_ENTRY(WindowPos3dvMESA), - TABLE_ENTRY(WindowPos3fMESA), - TABLE_ENTRY(WindowPos3fvMESA), - TABLE_ENTRY(WindowPos3iMESA), - TABLE_ENTRY(WindowPos3ivMESA), - TABLE_ENTRY(WindowPos3sMESA), - TABLE_ENTRY(WindowPos3svMESA), - TABLE_ENTRY(WindowPos4dMESA), - TABLE_ENTRY(WindowPos4dvMESA), - TABLE_ENTRY(WindowPos4fMESA), - TABLE_ENTRY(WindowPos4fvMESA), - TABLE_ENTRY(WindowPos4iMESA), - TABLE_ENTRY(WindowPos4ivMESA), - TABLE_ENTRY(WindowPos4sMESA), - TABLE_ENTRY(WindowPos4svMESA), - TABLE_ENTRY(_dispatch_stub_776), - TABLE_ENTRY(_dispatch_stub_777), - TABLE_ENTRY(_dispatch_stub_778), - TABLE_ENTRY(_dispatch_stub_779), - TABLE_ENTRY(_dispatch_stub_780), - TABLE_ENTRY(_dispatch_stub_781), - TABLE_ENTRY(_dispatch_stub_782), - TABLE_ENTRY(_dispatch_stub_783), - TABLE_ENTRY(_dispatch_stub_784), - TABLE_ENTRY(AreProgramsResidentNV), - TABLE_ENTRY(BindProgramNV), - TABLE_ENTRY(DeleteProgramsNV), - TABLE_ENTRY(ExecuteProgramNV), - TABLE_ENTRY(GenProgramsNV), - TABLE_ENTRY(GetProgramParameterdvNV), - TABLE_ENTRY(GetProgramParameterfvNV), - TABLE_ENTRY(GetProgramStringNV), - TABLE_ENTRY(GetProgramivNV), - TABLE_ENTRY(GetTrackMatrixivNV), - TABLE_ENTRY(GetVertexAttribPointervNV), - TABLE_ENTRY(GetVertexAttribdvNV), - TABLE_ENTRY(GetVertexAttribfvNV), - TABLE_ENTRY(GetVertexAttribivNV), - TABLE_ENTRY(IsProgramNV), - TABLE_ENTRY(LoadProgramNV), - TABLE_ENTRY(ProgramParameters4dvNV), - TABLE_ENTRY(ProgramParameters4fvNV), - TABLE_ENTRY(RequestResidentProgramsNV), - TABLE_ENTRY(TrackMatrixNV), - TABLE_ENTRY(VertexAttrib1dNV), - TABLE_ENTRY(VertexAttrib1dvNV), - TABLE_ENTRY(VertexAttrib1fNV), - TABLE_ENTRY(VertexAttrib1fvNV), - TABLE_ENTRY(VertexAttrib1sNV), - TABLE_ENTRY(VertexAttrib1svNV), - TABLE_ENTRY(VertexAttrib2dNV), - TABLE_ENTRY(VertexAttrib2dvNV), - TABLE_ENTRY(VertexAttrib2fNV), - TABLE_ENTRY(VertexAttrib2fvNV), - TABLE_ENTRY(VertexAttrib2sNV), - TABLE_ENTRY(VertexAttrib2svNV), - TABLE_ENTRY(VertexAttrib3dNV), - TABLE_ENTRY(VertexAttrib3dvNV), - TABLE_ENTRY(VertexAttrib3fNV), - TABLE_ENTRY(VertexAttrib3fvNV), - TABLE_ENTRY(VertexAttrib3sNV), - TABLE_ENTRY(VertexAttrib3svNV), - TABLE_ENTRY(VertexAttrib4dNV), - TABLE_ENTRY(VertexAttrib4dvNV), - TABLE_ENTRY(VertexAttrib4fNV), - TABLE_ENTRY(VertexAttrib4fvNV), - TABLE_ENTRY(VertexAttrib4sNV), - TABLE_ENTRY(VertexAttrib4svNV), - TABLE_ENTRY(VertexAttrib4ubNV), - TABLE_ENTRY(VertexAttrib4ubvNV), - TABLE_ENTRY(VertexAttribPointerNV), - TABLE_ENTRY(VertexAttribs1dvNV), - TABLE_ENTRY(VertexAttribs1fvNV), - TABLE_ENTRY(VertexAttribs1svNV), - TABLE_ENTRY(VertexAttribs2dvNV), - TABLE_ENTRY(VertexAttribs2fvNV), - TABLE_ENTRY(VertexAttribs2svNV), - TABLE_ENTRY(VertexAttribs3dvNV), - TABLE_ENTRY(VertexAttribs3fvNV), - TABLE_ENTRY(VertexAttribs3svNV), - TABLE_ENTRY(VertexAttribs4dvNV), - TABLE_ENTRY(VertexAttribs4fvNV), - TABLE_ENTRY(VertexAttribs4svNV), - TABLE_ENTRY(VertexAttribs4ubvNV), - TABLE_ENTRY(GetTexBumpParameterfvATI), - TABLE_ENTRY(GetTexBumpParameterivATI), - TABLE_ENTRY(TexBumpParameterfvATI), - TABLE_ENTRY(TexBumpParameterivATI), - TABLE_ENTRY(AlphaFragmentOp1ATI), - TABLE_ENTRY(AlphaFragmentOp2ATI), - TABLE_ENTRY(AlphaFragmentOp3ATI), - TABLE_ENTRY(BeginFragmentShaderATI), - TABLE_ENTRY(BindFragmentShaderATI), - TABLE_ENTRY(ColorFragmentOp1ATI), - TABLE_ENTRY(ColorFragmentOp2ATI), - TABLE_ENTRY(ColorFragmentOp3ATI), - TABLE_ENTRY(DeleteFragmentShaderATI), - TABLE_ENTRY(EndFragmentShaderATI), - TABLE_ENTRY(GenFragmentShadersATI), - TABLE_ENTRY(PassTexCoordATI), - TABLE_ENTRY(SampleMapATI), - TABLE_ENTRY(SetFragmentShaderConstantATI), - TABLE_ENTRY(PointParameteriNV), - TABLE_ENTRY(PointParameterivNV), - TABLE_ENTRY(_dispatch_stub_865), - TABLE_ENTRY(_dispatch_stub_866), - TABLE_ENTRY(_dispatch_stub_867), - TABLE_ENTRY(_dispatch_stub_868), - TABLE_ENTRY(_dispatch_stub_869), - TABLE_ENTRY(GetProgramNamedParameterdvNV), - TABLE_ENTRY(GetProgramNamedParameterfvNV), - TABLE_ENTRY(ProgramNamedParameter4dNV), - TABLE_ENTRY(ProgramNamedParameter4dvNV), - TABLE_ENTRY(ProgramNamedParameter4fNV), - TABLE_ENTRY(ProgramNamedParameter4fvNV), - TABLE_ENTRY(PrimitiveRestartIndexNV), - TABLE_ENTRY(PrimitiveRestartNV), - TABLE_ENTRY(_dispatch_stub_878), - TABLE_ENTRY(_dispatch_stub_879), - TABLE_ENTRY(BindFramebufferEXT), - TABLE_ENTRY(BindRenderbufferEXT), - TABLE_ENTRY(CheckFramebufferStatusEXT), - TABLE_ENTRY(DeleteFramebuffersEXT), - TABLE_ENTRY(DeleteRenderbuffersEXT), - TABLE_ENTRY(FramebufferRenderbufferEXT), - TABLE_ENTRY(FramebufferTexture1DEXT), - TABLE_ENTRY(FramebufferTexture2DEXT), - TABLE_ENTRY(FramebufferTexture3DEXT), - TABLE_ENTRY(GenFramebuffersEXT), - TABLE_ENTRY(GenRenderbuffersEXT), - TABLE_ENTRY(GenerateMipmapEXT), - TABLE_ENTRY(GetFramebufferAttachmentParameterivEXT), - TABLE_ENTRY(GetRenderbufferParameterivEXT), - TABLE_ENTRY(IsFramebufferEXT), - TABLE_ENTRY(IsRenderbufferEXT), - TABLE_ENTRY(RenderbufferStorageEXT), - TABLE_ENTRY(_dispatch_stub_897), - TABLE_ENTRY(_dispatch_stub_898), - TABLE_ENTRY(_dispatch_stub_899), - TABLE_ENTRY(BindFragDataLocationEXT), - TABLE_ENTRY(GetFragDataLocationEXT), - TABLE_ENTRY(GetUniformuivEXT), - TABLE_ENTRY(GetVertexAttribIivEXT), - TABLE_ENTRY(GetVertexAttribIuivEXT), - TABLE_ENTRY(Uniform1uiEXT), - TABLE_ENTRY(Uniform1uivEXT), - TABLE_ENTRY(Uniform2uiEXT), - TABLE_ENTRY(Uniform2uivEXT), - TABLE_ENTRY(Uniform3uiEXT), - TABLE_ENTRY(Uniform3uivEXT), - TABLE_ENTRY(Uniform4uiEXT), - TABLE_ENTRY(Uniform4uivEXT), - TABLE_ENTRY(VertexAttribI1iEXT), - TABLE_ENTRY(VertexAttribI1ivEXT), - TABLE_ENTRY(VertexAttribI1uiEXT), - TABLE_ENTRY(VertexAttribI1uivEXT), - TABLE_ENTRY(VertexAttribI2iEXT), - TABLE_ENTRY(VertexAttribI2ivEXT), - TABLE_ENTRY(VertexAttribI2uiEXT), - TABLE_ENTRY(VertexAttribI2uivEXT), - TABLE_ENTRY(VertexAttribI3iEXT), - TABLE_ENTRY(VertexAttribI3ivEXT), - TABLE_ENTRY(VertexAttribI3uiEXT), - TABLE_ENTRY(VertexAttribI3uivEXT), - TABLE_ENTRY(VertexAttribI4bvEXT), - TABLE_ENTRY(VertexAttribI4iEXT), - TABLE_ENTRY(VertexAttribI4ivEXT), - TABLE_ENTRY(VertexAttribI4svEXT), - TABLE_ENTRY(VertexAttribI4ubvEXT), - TABLE_ENTRY(VertexAttribI4uiEXT), - TABLE_ENTRY(VertexAttribI4uivEXT), - TABLE_ENTRY(VertexAttribI4usvEXT), - TABLE_ENTRY(VertexAttribIPointerEXT), - TABLE_ENTRY(FramebufferTextureLayerEXT), - TABLE_ENTRY(ColorMaskIndexedEXT), - TABLE_ENTRY(DisableIndexedEXT), - TABLE_ENTRY(EnableIndexedEXT), - TABLE_ENTRY(GetBooleanIndexedvEXT), - TABLE_ENTRY(GetIntegerIndexedvEXT), - TABLE_ENTRY(IsEnabledIndexedEXT), - TABLE_ENTRY(ClearColorIiEXT), - TABLE_ENTRY(ClearColorIuiEXT), - TABLE_ENTRY(GetTexParameterIivEXT), - TABLE_ENTRY(GetTexParameterIuivEXT), - TABLE_ENTRY(TexParameterIivEXT), - TABLE_ENTRY(TexParameterIuivEXT), - TABLE_ENTRY(BeginConditionalRenderNV), - TABLE_ENTRY(EndConditionalRenderNV), - TABLE_ENTRY(BeginTransformFeedbackEXT), - TABLE_ENTRY(BindBufferBaseEXT), - TABLE_ENTRY(BindBufferOffsetEXT), - TABLE_ENTRY(BindBufferRangeEXT), - TABLE_ENTRY(EndTransformFeedbackEXT), - TABLE_ENTRY(GetTransformFeedbackVaryingEXT), - TABLE_ENTRY(TransformFeedbackVaryingsEXT), - TABLE_ENTRY(ProvokingVertexEXT), - TABLE_ENTRY(_dispatch_stub_957), - TABLE_ENTRY(_dispatch_stub_958), - TABLE_ENTRY(GetObjectParameterivAPPLE), - TABLE_ENTRY(ObjectPurgeableAPPLE), - TABLE_ENTRY(ObjectUnpurgeableAPPLE), - TABLE_ENTRY(ActiveProgramEXT), - TABLE_ENTRY(CreateShaderProgramEXT), - TABLE_ENTRY(UseShaderProgramEXT), - TABLE_ENTRY(TextureBarrierNV), - TABLE_ENTRY(_dispatch_stub_966), - TABLE_ENTRY(_dispatch_stub_967), - TABLE_ENTRY(_dispatch_stub_968), - TABLE_ENTRY(_dispatch_stub_969), - TABLE_ENTRY(_dispatch_stub_970), - TABLE_ENTRY(EGLImageTargetRenderbufferStorageOES), - TABLE_ENTRY(EGLImageTargetTexture2DOES), - /* A whole bunch of no-op functions. These might be called - * when someone tries to call a dynamically-registered - * extension function without a current rendering context. - */ - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), - TABLE_ENTRY(Unused), -}; -#endif /* DISPATCH_TABLE_NAME */ - - -/* - * This is just used to silence compiler warnings. - * We list the functions which are not otherwise used. - */ -#ifdef UNUSED_TABLE_NAME -_glapi_proc UNUSED_TABLE_NAME[] = { -#ifndef _GLAPI_SKIP_NORMAL_ENTRY_POINTS - TABLE_ENTRY(ArrayElementEXT), - TABLE_ENTRY(BindTextureEXT), - TABLE_ENTRY(DrawArraysEXT), - TABLE_ENTRY(CopyTexImage1DEXT), - TABLE_ENTRY(CopyTexImage2DEXT), - TABLE_ENTRY(CopyTexSubImage1DEXT), - TABLE_ENTRY(CopyTexSubImage2DEXT), - TABLE_ENTRY(GetPointervEXT), - TABLE_ENTRY(PrioritizeTexturesEXT), - TABLE_ENTRY(TexSubImage1DEXT), - TABLE_ENTRY(TexSubImage2DEXT), - TABLE_ENTRY(BlendColorEXT), - TABLE_ENTRY(BlendEquationEXT), - TABLE_ENTRY(DrawRangeElementsEXT), - TABLE_ENTRY(ColorTableEXT), - TABLE_ENTRY(_dispatch_stub_339), - TABLE_ENTRY(_dispatch_stub_340), - TABLE_ENTRY(_dispatch_stub_341), - TABLE_ENTRY(_dispatch_stub_342), - TABLE_ENTRY(_dispatch_stub_346), - TABLE_ENTRY(_dispatch_stub_347), - TABLE_ENTRY(_dispatch_stub_348), - TABLE_ENTRY(_dispatch_stub_349), - TABLE_ENTRY(_dispatch_stub_350), - TABLE_ENTRY(_dispatch_stub_351), - TABLE_ENTRY(_dispatch_stub_352), - TABLE_ENTRY(_dispatch_stub_353), - TABLE_ENTRY(_dispatch_stub_354), - TABLE_ENTRY(_dispatch_stub_355), - TABLE_ENTRY(_dispatch_stub_360), - TABLE_ENTRY(_dispatch_stub_367), - TABLE_ENTRY(_dispatch_stub_368), - TABLE_ENTRY(_dispatch_stub_369), - TABLE_ENTRY(_dispatch_stub_370), - TABLE_ENTRY(TexImage3DEXT), - TABLE_ENTRY(TexSubImage3DEXT), - TABLE_ENTRY(CopyTexSubImage3DEXT), - TABLE_ENTRY(ActiveTexture), - TABLE_ENTRY(ClientActiveTexture), - TABLE_ENTRY(MultiTexCoord1d), - TABLE_ENTRY(MultiTexCoord1dv), - TABLE_ENTRY(MultiTexCoord1f), - TABLE_ENTRY(MultiTexCoord1fv), - TABLE_ENTRY(MultiTexCoord1i), - TABLE_ENTRY(MultiTexCoord1iv), - TABLE_ENTRY(MultiTexCoord1s), - TABLE_ENTRY(MultiTexCoord1sv), - TABLE_ENTRY(MultiTexCoord2d), - TABLE_ENTRY(MultiTexCoord2dv), - TABLE_ENTRY(MultiTexCoord2f), - TABLE_ENTRY(MultiTexCoord2fv), - TABLE_ENTRY(MultiTexCoord2i), - TABLE_ENTRY(MultiTexCoord2iv), - TABLE_ENTRY(MultiTexCoord2s), - TABLE_ENTRY(MultiTexCoord2sv), - TABLE_ENTRY(MultiTexCoord3d), - TABLE_ENTRY(MultiTexCoord3dv), - TABLE_ENTRY(MultiTexCoord3f), - TABLE_ENTRY(MultiTexCoord3fv), - TABLE_ENTRY(MultiTexCoord3i), - TABLE_ENTRY(MultiTexCoord3iv), - TABLE_ENTRY(MultiTexCoord3s), - TABLE_ENTRY(MultiTexCoord3sv), - TABLE_ENTRY(MultiTexCoord4d), - TABLE_ENTRY(MultiTexCoord4dv), - TABLE_ENTRY(MultiTexCoord4f), - TABLE_ENTRY(MultiTexCoord4fv), - TABLE_ENTRY(MultiTexCoord4i), - TABLE_ENTRY(MultiTexCoord4iv), - TABLE_ENTRY(MultiTexCoord4s), - TABLE_ENTRY(MultiTexCoord4sv), - TABLE_ENTRY(_dispatch_stub_423), - TABLE_ENTRY(LoadTransposeMatrixd), - TABLE_ENTRY(LoadTransposeMatrixf), - TABLE_ENTRY(MultTransposeMatrixd), - TABLE_ENTRY(MultTransposeMatrixf), - TABLE_ENTRY(SampleCoverage), - TABLE_ENTRY(CompressedTexImage1D), - TABLE_ENTRY(CompressedTexImage2D), - TABLE_ENTRY(CompressedTexImage3D), - TABLE_ENTRY(CompressedTexSubImage1D), - TABLE_ENTRY(CompressedTexSubImage2D), - TABLE_ENTRY(CompressedTexSubImage3D), - TABLE_ENTRY(GetCompressedTexImage), - TABLE_ENTRY(DisableVertexAttribArray), - TABLE_ENTRY(EnableVertexAttribArray), - TABLE_ENTRY(GetVertexAttribdv), - TABLE_ENTRY(GetVertexAttribfv), - TABLE_ENTRY(GetVertexAttribiv), - TABLE_ENTRY(ProgramParameter4dNV), - TABLE_ENTRY(ProgramParameter4dvNV), - TABLE_ENTRY(ProgramParameter4fNV), - TABLE_ENTRY(ProgramParameter4fvNV), - TABLE_ENTRY(VertexAttrib1d), - TABLE_ENTRY(VertexAttrib1dv), - TABLE_ENTRY(VertexAttrib1f), - TABLE_ENTRY(VertexAttrib1fv), - TABLE_ENTRY(VertexAttrib1s), - TABLE_ENTRY(VertexAttrib1sv), - TABLE_ENTRY(VertexAttrib2d), - TABLE_ENTRY(VertexAttrib2dv), - TABLE_ENTRY(VertexAttrib2f), - TABLE_ENTRY(VertexAttrib2fv), - TABLE_ENTRY(VertexAttrib2s), - TABLE_ENTRY(VertexAttrib2sv), - TABLE_ENTRY(VertexAttrib3d), - TABLE_ENTRY(VertexAttrib3dv), - TABLE_ENTRY(VertexAttrib3f), - TABLE_ENTRY(VertexAttrib3fv), - TABLE_ENTRY(VertexAttrib3s), - TABLE_ENTRY(VertexAttrib3sv), - TABLE_ENTRY(VertexAttrib4Nbv), - TABLE_ENTRY(VertexAttrib4Niv), - TABLE_ENTRY(VertexAttrib4Nsv), - TABLE_ENTRY(VertexAttrib4Nub), - TABLE_ENTRY(VertexAttrib4Nubv), - TABLE_ENTRY(VertexAttrib4Nuiv), - TABLE_ENTRY(VertexAttrib4Nusv), - TABLE_ENTRY(VertexAttrib4bv), - TABLE_ENTRY(VertexAttrib4d), - TABLE_ENTRY(VertexAttrib4dv), - TABLE_ENTRY(VertexAttrib4f), - TABLE_ENTRY(VertexAttrib4fv), - TABLE_ENTRY(VertexAttrib4iv), - TABLE_ENTRY(VertexAttrib4s), - TABLE_ENTRY(VertexAttrib4sv), - TABLE_ENTRY(VertexAttrib4ubv), - TABLE_ENTRY(VertexAttrib4uiv), - TABLE_ENTRY(VertexAttrib4usv), - TABLE_ENTRY(VertexAttribPointer), - TABLE_ENTRY(BindBuffer), - TABLE_ENTRY(BufferData), - TABLE_ENTRY(BufferSubData), - TABLE_ENTRY(DeleteBuffers), - TABLE_ENTRY(GenBuffers), - TABLE_ENTRY(GetBufferParameteriv), - TABLE_ENTRY(GetBufferPointerv), - TABLE_ENTRY(GetBufferSubData), - TABLE_ENTRY(IsBuffer), - TABLE_ENTRY(MapBuffer), - TABLE_ENTRY(UnmapBuffer), - TABLE_ENTRY(BeginQuery), - TABLE_ENTRY(DeleteQueries), - TABLE_ENTRY(EndQuery), - TABLE_ENTRY(GenQueries), - TABLE_ENTRY(GetQueryObjectiv), - TABLE_ENTRY(GetQueryObjectuiv), - TABLE_ENTRY(GetQueryiv), - TABLE_ENTRY(IsQuery), - TABLE_ENTRY(CompileShader), - TABLE_ENTRY(GetActiveUniform), - TABLE_ENTRY(GetShaderSource), - TABLE_ENTRY(GetUniformLocation), - TABLE_ENTRY(GetUniformfv), - TABLE_ENTRY(GetUniformiv), - TABLE_ENTRY(LinkProgram), - TABLE_ENTRY(ShaderSource), - TABLE_ENTRY(Uniform1f), - TABLE_ENTRY(Uniform1fv), - TABLE_ENTRY(Uniform1i), - TABLE_ENTRY(Uniform1iv), - TABLE_ENTRY(Uniform2f), - TABLE_ENTRY(Uniform2fv), - TABLE_ENTRY(Uniform2i), - TABLE_ENTRY(Uniform2iv), - TABLE_ENTRY(Uniform3f), - TABLE_ENTRY(Uniform3fv), - TABLE_ENTRY(Uniform3i), - TABLE_ENTRY(Uniform3iv), - TABLE_ENTRY(Uniform4f), - TABLE_ENTRY(Uniform4fv), - TABLE_ENTRY(Uniform4i), - TABLE_ENTRY(Uniform4iv), - TABLE_ENTRY(UniformMatrix2fv), - TABLE_ENTRY(UniformMatrix3fv), - TABLE_ENTRY(UniformMatrix4fv), - TABLE_ENTRY(UseProgram), - TABLE_ENTRY(ValidateProgram), - TABLE_ENTRY(BindAttribLocation), - TABLE_ENTRY(GetActiveAttrib), - TABLE_ENTRY(GetAttribLocation), - TABLE_ENTRY(DrawBuffers), - TABLE_ENTRY(DrawBuffersATI), - TABLE_ENTRY(DrawBuffersNV), - TABLE_ENTRY(DrawArraysInstancedEXT), - TABLE_ENTRY(DrawArraysInstanced), - TABLE_ENTRY(DrawElementsInstancedEXT), - TABLE_ENTRY(DrawElementsInstanced), - TABLE_ENTRY(RenderbufferStorageMultisampleEXT), - TABLE_ENTRY(BlendEquationSeparateIndexedAMD), - TABLE_ENTRY(BlendEquationIndexedAMD), - TABLE_ENTRY(BlendFuncSeparateIndexedAMD), - TABLE_ENTRY(BlendFuncIndexedAMD), - TABLE_ENTRY(PointParameterf), - TABLE_ENTRY(PointParameterfARB), - TABLE_ENTRY(_dispatch_stub_706), - TABLE_ENTRY(PointParameterfv), - TABLE_ENTRY(PointParameterfvARB), - TABLE_ENTRY(_dispatch_stub_707), - TABLE_ENTRY(SecondaryColor3b), - TABLE_ENTRY(SecondaryColor3bv), - TABLE_ENTRY(SecondaryColor3d), - TABLE_ENTRY(SecondaryColor3dv), - TABLE_ENTRY(SecondaryColor3f), - TABLE_ENTRY(SecondaryColor3fv), - TABLE_ENTRY(SecondaryColor3i), - TABLE_ENTRY(SecondaryColor3iv), - TABLE_ENTRY(SecondaryColor3s), - TABLE_ENTRY(SecondaryColor3sv), - TABLE_ENTRY(SecondaryColor3ub), - TABLE_ENTRY(SecondaryColor3ubv), - TABLE_ENTRY(SecondaryColor3ui), - TABLE_ENTRY(SecondaryColor3uiv), - TABLE_ENTRY(SecondaryColor3us), - TABLE_ENTRY(SecondaryColor3usv), - TABLE_ENTRY(SecondaryColorPointer), - TABLE_ENTRY(MultiDrawArrays), - TABLE_ENTRY(MultiDrawElements), - TABLE_ENTRY(FogCoordPointer), - TABLE_ENTRY(FogCoordd), - TABLE_ENTRY(FogCoorddv), - TABLE_ENTRY(FogCoordf), - TABLE_ENTRY(FogCoordfv), - TABLE_ENTRY(BlendFuncSeparate), - TABLE_ENTRY(_dispatch_stub_735), - TABLE_ENTRY(WindowPos2d), - TABLE_ENTRY(WindowPos2dARB), - TABLE_ENTRY(WindowPos2dv), - TABLE_ENTRY(WindowPos2dvARB), - TABLE_ENTRY(WindowPos2f), - TABLE_ENTRY(WindowPos2fARB), - TABLE_ENTRY(WindowPos2fv), - TABLE_ENTRY(WindowPos2fvARB), - TABLE_ENTRY(WindowPos2i), - TABLE_ENTRY(WindowPos2iARB), - TABLE_ENTRY(WindowPos2iv), - TABLE_ENTRY(WindowPos2ivARB), - TABLE_ENTRY(WindowPos2s), - TABLE_ENTRY(WindowPos2sARB), - TABLE_ENTRY(WindowPos2sv), - TABLE_ENTRY(WindowPos2svARB), - TABLE_ENTRY(WindowPos3d), - TABLE_ENTRY(WindowPos3dARB), - TABLE_ENTRY(WindowPos3dv), - TABLE_ENTRY(WindowPos3dvARB), - TABLE_ENTRY(WindowPos3f), - TABLE_ENTRY(WindowPos3fARB), - TABLE_ENTRY(WindowPos3fv), - TABLE_ENTRY(WindowPos3fvARB), - TABLE_ENTRY(WindowPos3i), - TABLE_ENTRY(WindowPos3iARB), - TABLE_ENTRY(WindowPos3iv), - TABLE_ENTRY(WindowPos3ivARB), - TABLE_ENTRY(WindowPos3s), - TABLE_ENTRY(WindowPos3sARB), - TABLE_ENTRY(WindowPos3sv), - TABLE_ENTRY(WindowPos3svARB), - TABLE_ENTRY(BindProgramARB), - TABLE_ENTRY(DeleteProgramsARB), - TABLE_ENTRY(GenProgramsARB), - TABLE_ENTRY(GetVertexAttribPointerv), - TABLE_ENTRY(GetVertexAttribPointervARB), - TABLE_ENTRY(IsProgramARB), - TABLE_ENTRY(PointParameteri), - TABLE_ENTRY(PointParameteriv), - TABLE_ENTRY(DeleteVertexArrays), - TABLE_ENTRY(IsVertexArray), - TABLE_ENTRY(PrimitiveRestartIndex), - TABLE_ENTRY(BlendEquationSeparate), - TABLE_ENTRY(BindFramebuffer), - TABLE_ENTRY(BindRenderbuffer), - TABLE_ENTRY(CheckFramebufferStatus), - TABLE_ENTRY(DeleteFramebuffers), - TABLE_ENTRY(DeleteRenderbuffers), - TABLE_ENTRY(FramebufferRenderbuffer), - TABLE_ENTRY(FramebufferTexture1D), - TABLE_ENTRY(FramebufferTexture2D), - TABLE_ENTRY(FramebufferTexture3D), - TABLE_ENTRY(GenFramebuffers), - TABLE_ENTRY(GenRenderbuffers), - TABLE_ENTRY(GenerateMipmap), - TABLE_ENTRY(GetFramebufferAttachmentParameteriv), - TABLE_ENTRY(GetRenderbufferParameteriv), - TABLE_ENTRY(IsFramebuffer), - TABLE_ENTRY(IsRenderbuffer), - TABLE_ENTRY(RenderbufferStorage), - TABLE_ENTRY(BlitFramebuffer), - TABLE_ENTRY(BindFragDataLocation), - TABLE_ENTRY(GetFragDataLocation), - TABLE_ENTRY(GetUniformuiv), - TABLE_ENTRY(GetVertexAttribIiv), - TABLE_ENTRY(GetVertexAttribIuiv), - TABLE_ENTRY(Uniform1ui), - TABLE_ENTRY(Uniform1uiv), - TABLE_ENTRY(Uniform2ui), - TABLE_ENTRY(Uniform2uiv), - TABLE_ENTRY(Uniform3ui), - TABLE_ENTRY(Uniform3uiv), - TABLE_ENTRY(Uniform4ui), - TABLE_ENTRY(Uniform4uiv), - TABLE_ENTRY(VertexAttribI1i), - TABLE_ENTRY(VertexAttribI1iv), - TABLE_ENTRY(VertexAttribI1ui), - TABLE_ENTRY(VertexAttribI1uiv), - TABLE_ENTRY(VertexAttribI2i), - TABLE_ENTRY(VertexAttribI2iv), - TABLE_ENTRY(VertexAttribI2ui), - TABLE_ENTRY(VertexAttribI2uiv), - TABLE_ENTRY(VertexAttribI3i), - TABLE_ENTRY(VertexAttribI3iv), - TABLE_ENTRY(VertexAttribI3ui), - TABLE_ENTRY(VertexAttribI3uiv), - TABLE_ENTRY(VertexAttribI4bv), - TABLE_ENTRY(VertexAttribI4i), - TABLE_ENTRY(VertexAttribI4iv), - TABLE_ENTRY(VertexAttribI4sv), - TABLE_ENTRY(VertexAttribI4ubv), - TABLE_ENTRY(VertexAttribI4ui), - TABLE_ENTRY(VertexAttribI4uiv), - TABLE_ENTRY(VertexAttribI4usv), - TABLE_ENTRY(VertexAttribIPointer), - TABLE_ENTRY(FramebufferTextureLayer), - TABLE_ENTRY(FramebufferTextureLayerARB), - TABLE_ENTRY(ColorMaski), - TABLE_ENTRY(Disablei), - TABLE_ENTRY(Enablei), - TABLE_ENTRY(GetBooleani_v), - TABLE_ENTRY(GetIntegeri_v), - TABLE_ENTRY(IsEnabledi), - TABLE_ENTRY(GetTexParameterIiv), - TABLE_ENTRY(GetTexParameterIuiv), - TABLE_ENTRY(TexParameterIiv), - TABLE_ENTRY(TexParameterIuiv), - TABLE_ENTRY(BeginConditionalRender), - TABLE_ENTRY(EndConditionalRender), - TABLE_ENTRY(BeginTransformFeedback), - TABLE_ENTRY(BindBufferBase), - TABLE_ENTRY(BindBufferRange), - TABLE_ENTRY(EndTransformFeedback), - TABLE_ENTRY(GetTransformFeedbackVarying), - TABLE_ENTRY(TransformFeedbackVaryings), - TABLE_ENTRY(ProvokingVertex), -#endif /* _GLAPI_SKIP_NORMAL_ENTRY_POINTS */ -#ifndef _GLAPI_SKIP_PROTO_ENTRY_POINTS - TABLE_ENTRY(AreTexturesResidentEXT), - TABLE_ENTRY(DeleteTexturesEXT), - TABLE_ENTRY(GenTexturesEXT), - TABLE_ENTRY(IsTextureEXT), - TABLE_ENTRY(GetColorTableEXT), - TABLE_ENTRY(_dispatch_stub_343), - TABLE_ENTRY(GetColorTableParameterfvEXT), - TABLE_ENTRY(_dispatch_stub_344), - TABLE_ENTRY(GetColorTableParameterivEXT), - TABLE_ENTRY(_dispatch_stub_345), - TABLE_ENTRY(_dispatch_stub_356), - TABLE_ENTRY(_dispatch_stub_357), - TABLE_ENTRY(_dispatch_stub_358), - TABLE_ENTRY(_dispatch_stub_359), - TABLE_ENTRY(_dispatch_stub_361), - TABLE_ENTRY(_dispatch_stub_362), - TABLE_ENTRY(_dispatch_stub_363), - TABLE_ENTRY(_dispatch_stub_364), - TABLE_ENTRY(_dispatch_stub_365), - TABLE_ENTRY(_dispatch_stub_366), -#endif /* _GLAPI_SKIP_PROTO_ENTRY_POINTS */ -}; -#endif /*UNUSED_TABLE_NAME*/ - - -# undef KEYWORD1 -# undef KEYWORD1_ALT -# undef KEYWORD2 -# undef NAME -# undef DISPATCH -# undef RETURN_DISPATCH -# undef DISPATCH_TABLE_NAME -# undef UNUSED_TABLE_NAME -# undef TABLE_ENTRY -# undef HIDDEN diff --git a/dll/opengl/mesa/src/mapi/glapi/glprocs.h b/dll/opengl/mesa/src/mapi/glapi/glprocs.h deleted file mode 100644 index 5227a0be8a9..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/glprocs.h +++ /dev/null @@ -1,2841 +0,0 @@ -/* DO NOT EDIT - This file generated automatically by gl_procs.py (from Mesa) script */ - -/* - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * (C) Copyright IBM Corporation 2004, 2006 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL, IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - - -/* This file is only included by glapi.c and is used for - * the GetProcAddress() function - */ - -typedef struct { - GLint Name_offset; -#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) - _glapi_proc Address; -#endif - GLuint Offset; -} glprocs_table_t; - -#if !defined(NEED_FUNCTION_POINTER) && !defined(GLX_INDIRECT_RENDERING) -# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , o } -#elif defined(NEED_FUNCTION_POINTER) && !defined(GLX_INDIRECT_RENDERING) -# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f1 , o } -#elif defined(NEED_FUNCTION_POINTER) && defined(GLX_INDIRECT_RENDERING) -# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f2 , o } -#elif !defined(NEED_FUNCTION_POINTER) && defined(GLX_INDIRECT_RENDERING) -# define NAME_FUNC_OFFSET(n,f1,f2,f3,o) { n , (_glapi_proc) f3 , o } -#endif - - - -static const char gl_string_table[] = - "glNewList\0" - "glEndList\0" - "glCallList\0" - "glCallLists\0" - "glDeleteLists\0" - "glGenLists\0" - "glListBase\0" - "glBegin\0" - "glBitmap\0" - "glColor3b\0" - "glColor3bv\0" - "glColor3d\0" - "glColor3dv\0" - "glColor3f\0" - "glColor3fv\0" - "glColor3i\0" - "glColor3iv\0" - "glColor3s\0" - "glColor3sv\0" - "glColor3ub\0" - "glColor3ubv\0" - "glColor3ui\0" - "glColor3uiv\0" - "glColor3us\0" - "glColor3usv\0" - "glColor4b\0" - "glColor4bv\0" - "glColor4d\0" - "glColor4dv\0" - "glColor4f\0" - "glColor4fv\0" - "glColor4i\0" - "glColor4iv\0" - "glColor4s\0" - "glColor4sv\0" - "glColor4ub\0" - "glColor4ubv\0" - "glColor4ui\0" - "glColor4uiv\0" - "glColor4us\0" - "glColor4usv\0" - "glEdgeFlag\0" - "glEdgeFlagv\0" - "glEnd\0" - "glIndexd\0" - "glIndexdv\0" - "glIndexf\0" - "glIndexfv\0" - "glIndexi\0" - "glIndexiv\0" - "glIndexs\0" - "glIndexsv\0" - "glNormal3b\0" - "glNormal3bv\0" - "glNormal3d\0" - "glNormal3dv\0" - "glNormal3f\0" - "glNormal3fv\0" - "glNormal3i\0" - "glNormal3iv\0" - "glNormal3s\0" - "glNormal3sv\0" - "glRasterPos2d\0" - "glRasterPos2dv\0" - "glRasterPos2f\0" - "glRasterPos2fv\0" - "glRasterPos2i\0" - "glRasterPos2iv\0" - "glRasterPos2s\0" - "glRasterPos2sv\0" - "glRasterPos3d\0" - "glRasterPos3dv\0" - "glRasterPos3f\0" - "glRasterPos3fv\0" - "glRasterPos3i\0" - "glRasterPos3iv\0" - "glRasterPos3s\0" - "glRasterPos3sv\0" - "glRasterPos4d\0" - "glRasterPos4dv\0" - "glRasterPos4f\0" - "glRasterPos4fv\0" - "glRasterPos4i\0" - "glRasterPos4iv\0" - "glRasterPos4s\0" - "glRasterPos4sv\0" - "glRectd\0" - "glRectdv\0" - "glRectf\0" - "glRectfv\0" - "glRecti\0" - "glRectiv\0" - "glRects\0" - "glRectsv\0" - "glTexCoord1d\0" - "glTexCoord1dv\0" - "glTexCoord1f\0" - "glTexCoord1fv\0" - "glTexCoord1i\0" - "glTexCoord1iv\0" - "glTexCoord1s\0" - "glTexCoord1sv\0" - "glTexCoord2d\0" - "glTexCoord2dv\0" - "glTexCoord2f\0" - "glTexCoord2fv\0" - "glTexCoord2i\0" - "glTexCoord2iv\0" - "glTexCoord2s\0" - "glTexCoord2sv\0" - "glTexCoord3d\0" - "glTexCoord3dv\0" - "glTexCoord3f\0" - "glTexCoord3fv\0" - "glTexCoord3i\0" - "glTexCoord3iv\0" - "glTexCoord3s\0" - "glTexCoord3sv\0" - "glTexCoord4d\0" - "glTexCoord4dv\0" - "glTexCoord4f\0" - "glTexCoord4fv\0" - "glTexCoord4i\0" - "glTexCoord4iv\0" - "glTexCoord4s\0" - "glTexCoord4sv\0" - "glVertex2d\0" - "glVertex2dv\0" - "glVertex2f\0" - "glVertex2fv\0" - "glVertex2i\0" - "glVertex2iv\0" - "glVertex2s\0" - "glVertex2sv\0" - "glVertex3d\0" - "glVertex3dv\0" - "glVertex3f\0" - "glVertex3fv\0" - "glVertex3i\0" - "glVertex3iv\0" - "glVertex3s\0" - "glVertex3sv\0" - "glVertex4d\0" - "glVertex4dv\0" - "glVertex4f\0" - "glVertex4fv\0" - "glVertex4i\0" - "glVertex4iv\0" - "glVertex4s\0" - "glVertex4sv\0" - "glClipPlane\0" - "glColorMaterial\0" - "glCullFace\0" - "glFogf\0" - "glFogfv\0" - "glFogi\0" - "glFogiv\0" - "glFrontFace\0" - "glHint\0" - "glLightf\0" - "glLightfv\0" - "glLighti\0" - "glLightiv\0" - "glLightModelf\0" - "glLightModelfv\0" - "glLightModeli\0" - "glLightModeliv\0" - "glLineStipple\0" - "glLineWidth\0" - "glMaterialf\0" - "glMaterialfv\0" - "glMateriali\0" - "glMaterialiv\0" - "glPointSize\0" - "glPolygonMode\0" - "glPolygonStipple\0" - "glScissor\0" - "glShadeModel\0" - "glTexParameterf\0" - "glTexParameterfv\0" - "glTexParameteri\0" - "glTexParameteriv\0" - "glTexImage1D\0" - "glTexImage2D\0" - "glTexEnvf\0" - "glTexEnvfv\0" - "glTexEnvi\0" - "glTexEnviv\0" - "glTexGend\0" - "glTexGendv\0" - "glTexGenf\0" - "glTexGenfv\0" - "glTexGeni\0" - "glTexGeniv\0" - "glFeedbackBuffer\0" - "glSelectBuffer\0" - "glRenderMode\0" - "glInitNames\0" - "glLoadName\0" - "glPassThrough\0" - "glPopName\0" - "glPushName\0" - "glDrawBuffer\0" - "glClear\0" - "glClearAccum\0" - "glClearIndex\0" - "glClearColor\0" - "glClearStencil\0" - "glClearDepth\0" - "glStencilMask\0" - "glColorMask\0" - "glDepthMask\0" - "glIndexMask\0" - "glAccum\0" - "glDisable\0" - "glEnable\0" - "glFinish\0" - "glFlush\0" - "glPopAttrib\0" - "glPushAttrib\0" - "glMap1d\0" - "glMap1f\0" - "glMap2d\0" - "glMap2f\0" - "glMapGrid1d\0" - "glMapGrid1f\0" - "glMapGrid2d\0" - "glMapGrid2f\0" - "glEvalCoord1d\0" - "glEvalCoord1dv\0" - "glEvalCoord1f\0" - "glEvalCoord1fv\0" - "glEvalCoord2d\0" - "glEvalCoord2dv\0" - "glEvalCoord2f\0" - "glEvalCoord2fv\0" - "glEvalMesh1\0" - "glEvalPoint1\0" - "glEvalMesh2\0" - "glEvalPoint2\0" - "glAlphaFunc\0" - "glBlendFunc\0" - "glLogicOp\0" - "glStencilFunc\0" - "glStencilOp\0" - "glDepthFunc\0" - "glPixelZoom\0" - "glPixelTransferf\0" - "glPixelTransferi\0" - "glPixelStoref\0" - "glPixelStorei\0" - "glPixelMapfv\0" - "glPixelMapuiv\0" - "glPixelMapusv\0" - "glReadBuffer\0" - "glCopyPixels\0" - "glReadPixels\0" - "glDrawPixels\0" - "glGetBooleanv\0" - "glGetClipPlane\0" - "glGetDoublev\0" - "glGetError\0" - "glGetFloatv\0" - "glGetIntegerv\0" - "glGetLightfv\0" - "glGetLightiv\0" - "glGetMapdv\0" - "glGetMapfv\0" - "glGetMapiv\0" - "glGetMaterialfv\0" - "glGetMaterialiv\0" - "glGetPixelMapfv\0" - "glGetPixelMapuiv\0" - "glGetPixelMapusv\0" - "glGetPolygonStipple\0" - "glGetString\0" - "glGetTexEnvfv\0" - "glGetTexEnviv\0" - "glGetTexGendv\0" - "glGetTexGenfv\0" - "glGetTexGeniv\0" - "glGetTexImage\0" - "glGetTexParameterfv\0" - "glGetTexParameteriv\0" - "glGetTexLevelParameterfv\0" - "glGetTexLevelParameteriv\0" - "glIsEnabled\0" - "glIsList\0" - "glDepthRange\0" - "glFrustum\0" - "glLoadIdentity\0" - "glLoadMatrixf\0" - "glLoadMatrixd\0" - "glMatrixMode\0" - "glMultMatrixf\0" - "glMultMatrixd\0" - "glOrtho\0" - "glPopMatrix\0" - "glPushMatrix\0" - "glRotated\0" - "glRotatef\0" - "glScaled\0" - "glScalef\0" - "glTranslated\0" - "glTranslatef\0" - "glViewport\0" - "glArrayElement\0" - "glBindTexture\0" - "glColorPointer\0" - "glDisableClientState\0" - "glDrawArrays\0" - "glDrawElements\0" - "glEdgeFlagPointer\0" - "glEnableClientState\0" - "glIndexPointer\0" - "glIndexub\0" - "glIndexubv\0" - "glInterleavedArrays\0" - "glNormalPointer\0" - "glPolygonOffset\0" - "glTexCoordPointer\0" - "glVertexPointer\0" - "glAreTexturesResident\0" - "glCopyTexImage1D\0" - "glCopyTexImage2D\0" - "glCopyTexSubImage1D\0" - "glCopyTexSubImage2D\0" - "glDeleteTextures\0" - "glGenTextures\0" - "glGetPointerv\0" - "glIsTexture\0" - "glPrioritizeTextures\0" - "glTexSubImage1D\0" - "glTexSubImage2D\0" - "glPopClientAttrib\0" - "glPushClientAttrib\0" - "glBlendColor\0" - "glBlendEquation\0" - "glDrawRangeElements\0" - "glColorTable\0" - "glColorTableParameterfv\0" - "glColorTableParameteriv\0" - "glCopyColorTable\0" - "glGetColorTable\0" - "glGetColorTableParameterfv\0" - "glGetColorTableParameteriv\0" - "glColorSubTable\0" - "glCopyColorSubTable\0" - "glConvolutionFilter1D\0" - "glConvolutionFilter2D\0" - "glConvolutionParameterf\0" - "glConvolutionParameterfv\0" - "glConvolutionParameteri\0" - "glConvolutionParameteriv\0" - "glCopyConvolutionFilter1D\0" - "glCopyConvolutionFilter2D\0" - "glGetConvolutionFilter\0" - "glGetConvolutionParameterfv\0" - "glGetConvolutionParameteriv\0" - "glGetSeparableFilter\0" - "glSeparableFilter2D\0" - "glGetHistogram\0" - "glGetHistogramParameterfv\0" - "glGetHistogramParameteriv\0" - "glGetMinmax\0" - "glGetMinmaxParameterfv\0" - "glGetMinmaxParameteriv\0" - "glHistogram\0" - "glMinmax\0" - "glResetHistogram\0" - "glResetMinmax\0" - "glTexImage3D\0" - "glTexSubImage3D\0" - "glCopyTexSubImage3D\0" - "glActiveTextureARB\0" - "glClientActiveTextureARB\0" - "glMultiTexCoord1dARB\0" - "glMultiTexCoord1dvARB\0" - "glMultiTexCoord1fARB\0" - "glMultiTexCoord1fvARB\0" - "glMultiTexCoord1iARB\0" - "glMultiTexCoord1ivARB\0" - "glMultiTexCoord1sARB\0" - "glMultiTexCoord1svARB\0" - "glMultiTexCoord2dARB\0" - "glMultiTexCoord2dvARB\0" - "glMultiTexCoord2fARB\0" - "glMultiTexCoord2fvARB\0" - "glMultiTexCoord2iARB\0" - "glMultiTexCoord2ivARB\0" - "glMultiTexCoord2sARB\0" - "glMultiTexCoord2svARB\0" - "glMultiTexCoord3dARB\0" - "glMultiTexCoord3dvARB\0" - "glMultiTexCoord3fARB\0" - "glMultiTexCoord3fvARB\0" - "glMultiTexCoord3iARB\0" - "glMultiTexCoord3ivARB\0" - "glMultiTexCoord3sARB\0" - "glMultiTexCoord3svARB\0" - "glMultiTexCoord4dARB\0" - "glMultiTexCoord4dvARB\0" - "glMultiTexCoord4fARB\0" - "glMultiTexCoord4fvARB\0" - "glMultiTexCoord4iARB\0" - "glMultiTexCoord4ivARB\0" - "glMultiTexCoord4sARB\0" - "glMultiTexCoord4svARB\0" - "glAttachShader\0" - "glCreateProgram\0" - "glCreateShader\0" - "glDeleteProgram\0" - "glDeleteShader\0" - "glDetachShader\0" - "glGetAttachedShaders\0" - "glGetProgramInfoLog\0" - "glGetProgramiv\0" - "glGetShaderInfoLog\0" - "glGetShaderiv\0" - "glIsProgram\0" - "glIsShader\0" - "glStencilFuncSeparate\0" - "glStencilMaskSeparate\0" - "glStencilOpSeparate\0" - "glUniformMatrix2x3fv\0" - "glUniformMatrix2x4fv\0" - "glUniformMatrix3x2fv\0" - "glUniformMatrix3x4fv\0" - "glUniformMatrix4x2fv\0" - "glUniformMatrix4x3fv\0" - "glClampColor\0" - "glClearBufferfi\0" - "glClearBufferfv\0" - "glClearBufferiv\0" - "glClearBufferuiv\0" - "glGetStringi\0" - "glTexBuffer\0" - "glFramebufferTexture\0" - "glGetBufferParameteri64v\0" - "glGetInteger64i_v\0" - "glVertexAttribDivisor\0" - "glLoadTransposeMatrixdARB\0" - "glLoadTransposeMatrixfARB\0" - "glMultTransposeMatrixdARB\0" - "glMultTransposeMatrixfARB\0" - "glSampleCoverageARB\0" - "glCompressedTexImage1DARB\0" - "glCompressedTexImage2DARB\0" - "glCompressedTexImage3DARB\0" - "glCompressedTexSubImage1DARB\0" - "glCompressedTexSubImage2DARB\0" - "glCompressedTexSubImage3DARB\0" - "glGetCompressedTexImageARB\0" - "glDisableVertexAttribArrayARB\0" - "glEnableVertexAttribArrayARB\0" - "glGetProgramEnvParameterdvARB\0" - "glGetProgramEnvParameterfvARB\0" - "glGetProgramLocalParameterdvARB\0" - "glGetProgramLocalParameterfvARB\0" - "glGetProgramStringARB\0" - "glGetProgramivARB\0" - "glGetVertexAttribdvARB\0" - "glGetVertexAttribfvARB\0" - "glGetVertexAttribivARB\0" - "glProgramEnvParameter4dARB\0" - "glProgramEnvParameter4dvARB\0" - "glProgramEnvParameter4fARB\0" - "glProgramEnvParameter4fvARB\0" - "glProgramLocalParameter4dARB\0" - "glProgramLocalParameter4dvARB\0" - "glProgramLocalParameter4fARB\0" - "glProgramLocalParameter4fvARB\0" - "glProgramStringARB\0" - "glVertexAttrib1dARB\0" - "glVertexAttrib1dvARB\0" - "glVertexAttrib1fARB\0" - "glVertexAttrib1fvARB\0" - "glVertexAttrib1sARB\0" - "glVertexAttrib1svARB\0" - "glVertexAttrib2dARB\0" - "glVertexAttrib2dvARB\0" - "glVertexAttrib2fARB\0" - "glVertexAttrib2fvARB\0" - "glVertexAttrib2sARB\0" - "glVertexAttrib2svARB\0" - "glVertexAttrib3dARB\0" - "glVertexAttrib3dvARB\0" - "glVertexAttrib3fARB\0" - "glVertexAttrib3fvARB\0" - "glVertexAttrib3sARB\0" - "glVertexAttrib3svARB\0" - "glVertexAttrib4NbvARB\0" - "glVertexAttrib4NivARB\0" - "glVertexAttrib4NsvARB\0" - "glVertexAttrib4NubARB\0" - "glVertexAttrib4NubvARB\0" - "glVertexAttrib4NuivARB\0" - "glVertexAttrib4NusvARB\0" - "glVertexAttrib4bvARB\0" - "glVertexAttrib4dARB\0" - "glVertexAttrib4dvARB\0" - "glVertexAttrib4fARB\0" - "glVertexAttrib4fvARB\0" - "glVertexAttrib4ivARB\0" - "glVertexAttrib4sARB\0" - "glVertexAttrib4svARB\0" - "glVertexAttrib4ubvARB\0" - "glVertexAttrib4uivARB\0" - "glVertexAttrib4usvARB\0" - "glVertexAttribPointerARB\0" - "glBindBufferARB\0" - "glBufferDataARB\0" - "glBufferSubDataARB\0" - "glDeleteBuffersARB\0" - "glGenBuffersARB\0" - "glGetBufferParameterivARB\0" - "glGetBufferPointervARB\0" - "glGetBufferSubDataARB\0" - "glIsBufferARB\0" - "glMapBufferARB\0" - "glUnmapBufferARB\0" - "glBeginQueryARB\0" - "glDeleteQueriesARB\0" - "glEndQueryARB\0" - "glGenQueriesARB\0" - "glGetQueryObjectivARB\0" - "glGetQueryObjectuivARB\0" - "glGetQueryivARB\0" - "glIsQueryARB\0" - "glAttachObjectARB\0" - "glCompileShaderARB\0" - "glCreateProgramObjectARB\0" - "glCreateShaderObjectARB\0" - "glDeleteObjectARB\0" - "glDetachObjectARB\0" - "glGetActiveUniformARB\0" - "glGetAttachedObjectsARB\0" - "glGetHandleARB\0" - "glGetInfoLogARB\0" - "glGetObjectParameterfvARB\0" - "glGetObjectParameterivARB\0" - "glGetShaderSourceARB\0" - "glGetUniformLocationARB\0" - "glGetUniformfvARB\0" - "glGetUniformivARB\0" - "glLinkProgramARB\0" - "glShaderSourceARB\0" - "glUniform1fARB\0" - "glUniform1fvARB\0" - "glUniform1iARB\0" - "glUniform1ivARB\0" - "glUniform2fARB\0" - "glUniform2fvARB\0" - "glUniform2iARB\0" - "glUniform2ivARB\0" - "glUniform3fARB\0" - "glUniform3fvARB\0" - "glUniform3iARB\0" - "glUniform3ivARB\0" - "glUniform4fARB\0" - "glUniform4fvARB\0" - "glUniform4iARB\0" - "glUniform4ivARB\0" - "glUniformMatrix2fvARB\0" - "glUniformMatrix3fvARB\0" - "glUniformMatrix4fvARB\0" - "glUseProgramObjectARB\0" - "glValidateProgramARB\0" - "glBindAttribLocationARB\0" - "glGetActiveAttribARB\0" - "glGetAttribLocationARB\0" - "glDrawBuffersARB\0" - "glClampColorARB\0" - "glDrawArraysInstancedARB\0" - "glDrawElementsInstancedARB\0" - "glRenderbufferStorageMultisample\0" - "glFramebufferTextureARB\0" - "glFramebufferTextureFaceARB\0" - "glProgramParameteriARB\0" - "glVertexAttribDivisorARB\0" - "glFlushMappedBufferRange\0" - "glMapBufferRange\0" - "glTexBufferARB\0" - "glBindVertexArray\0" - "glGenVertexArrays\0" - "glCopyBufferSubData\0" - "glClientWaitSync\0" - "glDeleteSync\0" - "glFenceSync\0" - "glGetInteger64v\0" - "glGetSynciv\0" - "glIsSync\0" - "glWaitSync\0" - "glDrawElementsBaseVertex\0" - "glDrawElementsInstancedBaseVertex\0" - "glDrawRangeElementsBaseVertex\0" - "glMultiDrawElementsBaseVertex\0" - "glBlendEquationSeparateiARB\0" - "glBlendEquationiARB\0" - "glBlendFuncSeparateiARB\0" - "glBlendFunciARB\0" - "glBindSampler\0" - "glDeleteSamplers\0" - "glGenSamplers\0" - "glGetSamplerParameterIiv\0" - "glGetSamplerParameterIuiv\0" - "glGetSamplerParameterfv\0" - "glGetSamplerParameteriv\0" - "glIsSampler\0" - "glSamplerParameterIiv\0" - "glSamplerParameterIuiv\0" - "glSamplerParameterf\0" - "glSamplerParameterfv\0" - "glSamplerParameteri\0" - "glSamplerParameteriv\0" - "glColorP3ui\0" - "glColorP3uiv\0" - "glColorP4ui\0" - "glColorP4uiv\0" - "glMultiTexCoordP1ui\0" - "glMultiTexCoordP1uiv\0" - "glMultiTexCoordP2ui\0" - "glMultiTexCoordP2uiv\0" - "glMultiTexCoordP3ui\0" - "glMultiTexCoordP3uiv\0" - "glMultiTexCoordP4ui\0" - "glMultiTexCoordP4uiv\0" - "glNormalP3ui\0" - "glNormalP3uiv\0" - "glSecondaryColorP3ui\0" - "glSecondaryColorP3uiv\0" - "glTexCoordP1ui\0" - "glTexCoordP1uiv\0" - "glTexCoordP2ui\0" - "glTexCoordP2uiv\0" - "glTexCoordP3ui\0" - "glTexCoordP3uiv\0" - "glTexCoordP4ui\0" - "glTexCoordP4uiv\0" - "glVertexAttribP1ui\0" - "glVertexAttribP1uiv\0" - "glVertexAttribP2ui\0" - "glVertexAttribP2uiv\0" - "glVertexAttribP3ui\0" - "glVertexAttribP3uiv\0" - "glVertexAttribP4ui\0" - "glVertexAttribP4uiv\0" - "glVertexP2ui\0" - "glVertexP2uiv\0" - "glVertexP3ui\0" - "glVertexP3uiv\0" - "glVertexP4ui\0" - "glVertexP4uiv\0" - "glBindTransformFeedback\0" - "glDeleteTransformFeedbacks\0" - "glDrawTransformFeedback\0" - "glGenTransformFeedbacks\0" - "glIsTransformFeedback\0" - "glPauseTransformFeedback\0" - "glResumeTransformFeedback\0" - "glClearDepthf\0" - "glDepthRangef\0" - "glGetShaderPrecisionFormat\0" - "glReleaseShaderCompiler\0" - "glShaderBinary\0" - "glGetGraphicsResetStatusARB\0" - "glGetnColorTableARB\0" - "glGetnCompressedTexImageARB\0" - "glGetnConvolutionFilterARB\0" - "glGetnHistogramARB\0" - "glGetnMapdvARB\0" - "glGetnMapfvARB\0" - "glGetnMapivARB\0" - "glGetnMinmaxARB\0" - "glGetnPixelMapfvARB\0" - "glGetnPixelMapuivARB\0" - "glGetnPixelMapusvARB\0" - "glGetnPolygonStippleARB\0" - "glGetnSeparableFilterARB\0" - "glGetnTexImageARB\0" - "glGetnUniformdvARB\0" - "glGetnUniformfvARB\0" - "glGetnUniformivARB\0" - "glGetnUniformuivARB\0" - "glReadnPixelsARB\0" - "glTexStorage1D\0" - "glTexStorage2D\0" - "glTexStorage3D\0" - "glTextureStorage1DEXT\0" - "glTextureStorage2DEXT\0" - "glTextureStorage3DEXT\0" - "glPolygonOffsetEXT\0" - "glGetPixelTexGenParameterfvSGIS\0" - "glGetPixelTexGenParameterivSGIS\0" - "glPixelTexGenParameterfSGIS\0" - "glPixelTexGenParameterfvSGIS\0" - "glPixelTexGenParameteriSGIS\0" - "glPixelTexGenParameterivSGIS\0" - "glSampleMaskSGIS\0" - "glSamplePatternSGIS\0" - "glColorPointerEXT\0" - "glEdgeFlagPointerEXT\0" - "glIndexPointerEXT\0" - "glNormalPointerEXT\0" - "glTexCoordPointerEXT\0" - "glVertexPointerEXT\0" - "glPointParameterfEXT\0" - "glPointParameterfvEXT\0" - "glLockArraysEXT\0" - "glUnlockArraysEXT\0" - "glSecondaryColor3bEXT\0" - "glSecondaryColor3bvEXT\0" - "glSecondaryColor3dEXT\0" - "glSecondaryColor3dvEXT\0" - "glSecondaryColor3fEXT\0" - "glSecondaryColor3fvEXT\0" - "glSecondaryColor3iEXT\0" - "glSecondaryColor3ivEXT\0" - "glSecondaryColor3sEXT\0" - "glSecondaryColor3svEXT\0" - "glSecondaryColor3ubEXT\0" - "glSecondaryColor3ubvEXT\0" - "glSecondaryColor3uiEXT\0" - "glSecondaryColor3uivEXT\0" - "glSecondaryColor3usEXT\0" - "glSecondaryColor3usvEXT\0" - "glSecondaryColorPointerEXT\0" - "glMultiDrawArraysEXT\0" - "glMultiDrawElementsEXT\0" - "glFogCoordPointerEXT\0" - "glFogCoorddEXT\0" - "glFogCoorddvEXT\0" - "glFogCoordfEXT\0" - "glFogCoordfvEXT\0" - "glPixelTexGenSGIX\0" - "glBlendFuncSeparateEXT\0" - "glFlushVertexArrayRangeNV\0" - "glVertexArrayRangeNV\0" - "glCombinerInputNV\0" - "glCombinerOutputNV\0" - "glCombinerParameterfNV\0" - "glCombinerParameterfvNV\0" - "glCombinerParameteriNV\0" - "glCombinerParameterivNV\0" - "glFinalCombinerInputNV\0" - "glGetCombinerInputParameterfvNV\0" - "glGetCombinerInputParameterivNV\0" - "glGetCombinerOutputParameterfvNV\0" - "glGetCombinerOutputParameterivNV\0" - "glGetFinalCombinerInputParameterfvNV\0" - "glGetFinalCombinerInputParameterivNV\0" - "glResizeBuffersMESA\0" - "glWindowPos2dMESA\0" - "glWindowPos2dvMESA\0" - "glWindowPos2fMESA\0" - "glWindowPos2fvMESA\0" - "glWindowPos2iMESA\0" - "glWindowPos2ivMESA\0" - "glWindowPos2sMESA\0" - "glWindowPos2svMESA\0" - "glWindowPos3dMESA\0" - "glWindowPos3dvMESA\0" - "glWindowPos3fMESA\0" - "glWindowPos3fvMESA\0" - "glWindowPos3iMESA\0" - "glWindowPos3ivMESA\0" - "glWindowPos3sMESA\0" - "glWindowPos3svMESA\0" - "glWindowPos4dMESA\0" - "glWindowPos4dvMESA\0" - "glWindowPos4fMESA\0" - "glWindowPos4fvMESA\0" - "glWindowPos4iMESA\0" - "glWindowPos4ivMESA\0" - "glWindowPos4sMESA\0" - "glWindowPos4svMESA\0" - "glMultiModeDrawArraysIBM\0" - "glMultiModeDrawElementsIBM\0" - "glDeleteFencesNV\0" - "glFinishFenceNV\0" - "glGenFencesNV\0" - "glGetFenceivNV\0" - "glIsFenceNV\0" - "glSetFenceNV\0" - "glTestFenceNV\0" - "glAreProgramsResidentNV\0" - "glBindProgramNV\0" - "glDeleteProgramsNV\0" - "glExecuteProgramNV\0" - "glGenProgramsNV\0" - "glGetProgramParameterdvNV\0" - "glGetProgramParameterfvNV\0" - "glGetProgramStringNV\0" - "glGetProgramivNV\0" - "glGetTrackMatrixivNV\0" - "glGetVertexAttribPointervNV\0" - "glGetVertexAttribdvNV\0" - "glGetVertexAttribfvNV\0" - "glGetVertexAttribivNV\0" - "glIsProgramNV\0" - "glLoadProgramNV\0" - "glProgramParameters4dvNV\0" - "glProgramParameters4fvNV\0" - "glRequestResidentProgramsNV\0" - "glTrackMatrixNV\0" - "glVertexAttrib1dNV\0" - "glVertexAttrib1dvNV\0" - "glVertexAttrib1fNV\0" - "glVertexAttrib1fvNV\0" - "glVertexAttrib1sNV\0" - "glVertexAttrib1svNV\0" - "glVertexAttrib2dNV\0" - "glVertexAttrib2dvNV\0" - "glVertexAttrib2fNV\0" - "glVertexAttrib2fvNV\0" - "glVertexAttrib2sNV\0" - "glVertexAttrib2svNV\0" - "glVertexAttrib3dNV\0" - "glVertexAttrib3dvNV\0" - "glVertexAttrib3fNV\0" - "glVertexAttrib3fvNV\0" - "glVertexAttrib3sNV\0" - "glVertexAttrib3svNV\0" - "glVertexAttrib4dNV\0" - "glVertexAttrib4dvNV\0" - "glVertexAttrib4fNV\0" - "glVertexAttrib4fvNV\0" - "glVertexAttrib4sNV\0" - "glVertexAttrib4svNV\0" - "glVertexAttrib4ubNV\0" - "glVertexAttrib4ubvNV\0" - "glVertexAttribPointerNV\0" - "glVertexAttribs1dvNV\0" - "glVertexAttribs1fvNV\0" - "glVertexAttribs1svNV\0" - "glVertexAttribs2dvNV\0" - "glVertexAttribs2fvNV\0" - "glVertexAttribs2svNV\0" - "glVertexAttribs3dvNV\0" - "glVertexAttribs3fvNV\0" - "glVertexAttribs3svNV\0" - "glVertexAttribs4dvNV\0" - "glVertexAttribs4fvNV\0" - "glVertexAttribs4svNV\0" - "glVertexAttribs4ubvNV\0" - "glGetTexBumpParameterfvATI\0" - "glGetTexBumpParameterivATI\0" - "glTexBumpParameterfvATI\0" - "glTexBumpParameterivATI\0" - "glAlphaFragmentOp1ATI\0" - "glAlphaFragmentOp2ATI\0" - "glAlphaFragmentOp3ATI\0" - "glBeginFragmentShaderATI\0" - "glBindFragmentShaderATI\0" - "glColorFragmentOp1ATI\0" - "glColorFragmentOp2ATI\0" - "glColorFragmentOp3ATI\0" - "glDeleteFragmentShaderATI\0" - "glEndFragmentShaderATI\0" - "glGenFragmentShadersATI\0" - "glPassTexCoordATI\0" - "glSampleMapATI\0" - "glSetFragmentShaderConstantATI\0" - "glPointParameteriNV\0" - "glPointParameterivNV\0" - "glActiveStencilFaceEXT\0" - "glBindVertexArrayAPPLE\0" - "glDeleteVertexArraysAPPLE\0" - "glGenVertexArraysAPPLE\0" - "glIsVertexArrayAPPLE\0" - "glGetProgramNamedParameterdvNV\0" - "glGetProgramNamedParameterfvNV\0" - "glProgramNamedParameter4dNV\0" - "glProgramNamedParameter4dvNV\0" - "glProgramNamedParameter4fNV\0" - "glProgramNamedParameter4fvNV\0" - "glPrimitiveRestartIndexNV\0" - "glPrimitiveRestartNV\0" - "glDepthBoundsEXT\0" - "glBlendEquationSeparateEXT\0" - "glBindFramebufferEXT\0" - "glBindRenderbufferEXT\0" - "glCheckFramebufferStatusEXT\0" - "glDeleteFramebuffersEXT\0" - "glDeleteRenderbuffersEXT\0" - "glFramebufferRenderbufferEXT\0" - "glFramebufferTexture1DEXT\0" - "glFramebufferTexture2DEXT\0" - "glFramebufferTexture3DEXT\0" - "glGenFramebuffersEXT\0" - "glGenRenderbuffersEXT\0" - "glGenerateMipmapEXT\0" - "glGetFramebufferAttachmentParameterivEXT\0" - "glGetRenderbufferParameterivEXT\0" - "glIsFramebufferEXT\0" - "glIsRenderbufferEXT\0" - "glRenderbufferStorageEXT\0" - "glBlitFramebufferEXT\0" - "glBufferParameteriAPPLE\0" - "glFlushMappedBufferRangeAPPLE\0" - "glBindFragDataLocationEXT\0" - "glGetFragDataLocationEXT\0" - "glGetUniformuivEXT\0" - "glGetVertexAttribIivEXT\0" - "glGetVertexAttribIuivEXT\0" - "glUniform1uiEXT\0" - "glUniform1uivEXT\0" - "glUniform2uiEXT\0" - "glUniform2uivEXT\0" - "glUniform3uiEXT\0" - "glUniform3uivEXT\0" - "glUniform4uiEXT\0" - "glUniform4uivEXT\0" - "glVertexAttribI1iEXT\0" - "glVertexAttribI1ivEXT\0" - "glVertexAttribI1uiEXT\0" - "glVertexAttribI1uivEXT\0" - "glVertexAttribI2iEXT\0" - "glVertexAttribI2ivEXT\0" - "glVertexAttribI2uiEXT\0" - "glVertexAttribI2uivEXT\0" - "glVertexAttribI3iEXT\0" - "glVertexAttribI3ivEXT\0" - "glVertexAttribI3uiEXT\0" - "glVertexAttribI3uivEXT\0" - "glVertexAttribI4bvEXT\0" - "glVertexAttribI4iEXT\0" - "glVertexAttribI4ivEXT\0" - "glVertexAttribI4svEXT\0" - "glVertexAttribI4ubvEXT\0" - "glVertexAttribI4uiEXT\0" - "glVertexAttribI4uivEXT\0" - "glVertexAttribI4usvEXT\0" - "glVertexAttribIPointerEXT\0" - "glFramebufferTextureLayerEXT\0" - "glColorMaskIndexedEXT\0" - "glDisableIndexedEXT\0" - "glEnableIndexedEXT\0" - "glGetBooleanIndexedvEXT\0" - "glGetIntegerIndexedvEXT\0" - "glIsEnabledIndexedEXT\0" - "glClearColorIiEXT\0" - "glClearColorIuiEXT\0" - "glGetTexParameterIivEXT\0" - "glGetTexParameterIuivEXT\0" - "glTexParameterIivEXT\0" - "glTexParameterIuivEXT\0" - "glBeginConditionalRenderNV\0" - "glEndConditionalRenderNV\0" - "glBeginTransformFeedbackEXT\0" - "glBindBufferBaseEXT\0" - "glBindBufferOffsetEXT\0" - "glBindBufferRangeEXT\0" - "glEndTransformFeedbackEXT\0" - "glGetTransformFeedbackVaryingEXT\0" - "glTransformFeedbackVaryingsEXT\0" - "glProvokingVertexEXT\0" - "glGetTexParameterPointervAPPLE\0" - "glTextureRangeAPPLE\0" - "glGetObjectParameterivAPPLE\0" - "glObjectPurgeableAPPLE\0" - "glObjectUnpurgeableAPPLE\0" - "glActiveProgramEXT\0" - "glCreateShaderProgramEXT\0" - "glUseShaderProgramEXT\0" - "glTextureBarrierNV\0" - "glStencilFuncSeparateATI\0" - "glProgramEnvParameters4fvEXT\0" - "glProgramLocalParameters4fvEXT\0" - "glGetQueryObjecti64vEXT\0" - "glGetQueryObjectui64vEXT\0" - "glEGLImageTargetRenderbufferStorageOES\0" - "glEGLImageTargetTexture2DOES\0" - "glArrayElementEXT\0" - "glBindTextureEXT\0" - "glDrawArraysEXT\0" - "glAreTexturesResidentEXT\0" - "glCopyTexImage1DEXT\0" - "glCopyTexImage2DEXT\0" - "glCopyTexSubImage1DEXT\0" - "glCopyTexSubImage2DEXT\0" - "glDeleteTexturesEXT\0" - "glGenTexturesEXT\0" - "glGetPointervEXT\0" - "glIsTextureEXT\0" - "glPrioritizeTexturesEXT\0" - "glTexSubImage1DEXT\0" - "glTexSubImage2DEXT\0" - "glBlendColorEXT\0" - "glBlendEquationEXT\0" - "glDrawRangeElementsEXT\0" - "glColorTableSGI\0" - "glColorTableEXT\0" - "glColorTableParameterfvSGI\0" - "glColorTableParameterivSGI\0" - "glCopyColorTableSGI\0" - "glGetColorTableSGI\0" - "glGetColorTableEXT\0" - "glGetColorTableParameterfvSGI\0" - "glGetColorTableParameterfvEXT\0" - "glGetColorTableParameterivSGI\0" - "glGetColorTableParameterivEXT\0" - "glColorSubTableEXT\0" - "glCopyColorSubTableEXT\0" - "glConvolutionFilter1DEXT\0" - "glConvolutionFilter2DEXT\0" - "glConvolutionParameterfEXT\0" - "glConvolutionParameterfvEXT\0" - "glConvolutionParameteriEXT\0" - "glConvolutionParameterivEXT\0" - "glCopyConvolutionFilter1DEXT\0" - "glCopyConvolutionFilter2DEXT\0" - "glGetConvolutionFilterEXT\0" - "glGetConvolutionParameterfvEXT\0" - "glGetConvolutionParameterivEXT\0" - "glGetSeparableFilterEXT\0" - "glSeparableFilter2DEXT\0" - "glGetHistogramEXT\0" - "glGetHistogramParameterfvEXT\0" - "glGetHistogramParameterivEXT\0" - "glGetMinmaxEXT\0" - "glGetMinmaxParameterfvEXT\0" - "glGetMinmaxParameterivEXT\0" - "glHistogramEXT\0" - "glMinmaxEXT\0" - "glResetHistogramEXT\0" - "glResetMinmaxEXT\0" - "glTexImage3DEXT\0" - "glTexSubImage3DEXT\0" - "glCopyTexSubImage3DEXT\0" - "glActiveTexture\0" - "glClientActiveTexture\0" - "glMultiTexCoord1d\0" - "glMultiTexCoord1dv\0" - "glMultiTexCoord1f\0" - "glMultiTexCoord1fv\0" - "glMultiTexCoord1i\0" - "glMultiTexCoord1iv\0" - "glMultiTexCoord1s\0" - "glMultiTexCoord1sv\0" - "glMultiTexCoord2d\0" - "glMultiTexCoord2dv\0" - "glMultiTexCoord2f\0" - "glMultiTexCoord2fv\0" - "glMultiTexCoord2i\0" - "glMultiTexCoord2iv\0" - "glMultiTexCoord2s\0" - "glMultiTexCoord2sv\0" - "glMultiTexCoord3d\0" - "glMultiTexCoord3dv\0" - "glMultiTexCoord3f\0" - "glMultiTexCoord3fv\0" - "glMultiTexCoord3i\0" - "glMultiTexCoord3iv\0" - "glMultiTexCoord3s\0" - "glMultiTexCoord3sv\0" - "glMultiTexCoord4d\0" - "glMultiTexCoord4dv\0" - "glMultiTexCoord4f\0" - "glMultiTexCoord4fv\0" - "glMultiTexCoord4i\0" - "glMultiTexCoord4iv\0" - "glMultiTexCoord4s\0" - "glMultiTexCoord4sv\0" - "glStencilOpSeparateATI\0" - "glLoadTransposeMatrixd\0" - "glLoadTransposeMatrixf\0" - "glMultTransposeMatrixd\0" - "glMultTransposeMatrixf\0" - "glSampleCoverage\0" - "glCompressedTexImage1D\0" - "glCompressedTexImage2D\0" - "glCompressedTexImage3D\0" - "glCompressedTexSubImage1D\0" - "glCompressedTexSubImage2D\0" - "glCompressedTexSubImage3D\0" - "glGetCompressedTexImage\0" - "glDisableVertexAttribArray\0" - "glEnableVertexAttribArray\0" - "glGetVertexAttribdv\0" - "glGetVertexAttribfv\0" - "glGetVertexAttribiv\0" - "glProgramParameter4dNV\0" - "glProgramParameter4dvNV\0" - "glProgramParameter4fNV\0" - "glProgramParameter4fvNV\0" - "glVertexAttrib1d\0" - "glVertexAttrib1dv\0" - "glVertexAttrib1f\0" - "glVertexAttrib1fv\0" - "glVertexAttrib1s\0" - "glVertexAttrib1sv\0" - "glVertexAttrib2d\0" - "glVertexAttrib2dv\0" - "glVertexAttrib2f\0" - "glVertexAttrib2fv\0" - "glVertexAttrib2s\0" - "glVertexAttrib2sv\0" - "glVertexAttrib3d\0" - "glVertexAttrib3dv\0" - "glVertexAttrib3f\0" - "glVertexAttrib3fv\0" - "glVertexAttrib3s\0" - "glVertexAttrib3sv\0" - "glVertexAttrib4Nbv\0" - "glVertexAttrib4Niv\0" - "glVertexAttrib4Nsv\0" - "glVertexAttrib4Nub\0" - "glVertexAttrib4Nubv\0" - "glVertexAttrib4Nuiv\0" - "glVertexAttrib4Nusv\0" - "glVertexAttrib4bv\0" - "glVertexAttrib4d\0" - "glVertexAttrib4dv\0" - "glVertexAttrib4f\0" - "glVertexAttrib4fv\0" - "glVertexAttrib4iv\0" - "glVertexAttrib4s\0" - "glVertexAttrib4sv\0" - "glVertexAttrib4ubv\0" - "glVertexAttrib4uiv\0" - "glVertexAttrib4usv\0" - "glVertexAttribPointer\0" - "glBindBuffer\0" - "glBufferData\0" - "glBufferSubData\0" - "glDeleteBuffers\0" - "glGenBuffers\0" - "glGetBufferParameteriv\0" - "glGetBufferPointerv\0" - "glGetBufferSubData\0" - "glIsBuffer\0" - "glMapBuffer\0" - "glUnmapBuffer\0" - "glBeginQuery\0" - "glDeleteQueries\0" - "glEndQuery\0" - "glGenQueries\0" - "glGetQueryObjectiv\0" - "glGetQueryObjectuiv\0" - "glGetQueryiv\0" - "glIsQuery\0" - "glCompileShader\0" - "glGetActiveUniform\0" - "glGetShaderSource\0" - "glGetUniformLocation\0" - "glGetUniformfv\0" - "glGetUniformiv\0" - "glLinkProgram\0" - "glShaderSource\0" - "glUniform1f\0" - "glUniform1fv\0" - "glUniform1i\0" - "glUniform1iv\0" - "glUniform2f\0" - "glUniform2fv\0" - "glUniform2i\0" - "glUniform2iv\0" - "glUniform3f\0" - "glUniform3fv\0" - "glUniform3i\0" - "glUniform3iv\0" - "glUniform4f\0" - "glUniform4fv\0" - "glUniform4i\0" - "glUniform4iv\0" - "glUniformMatrix2fv\0" - "glUniformMatrix3fv\0" - "glUniformMatrix4fv\0" - "glUseProgram\0" - "glValidateProgram\0" - "glBindAttribLocation\0" - "glGetActiveAttrib\0" - "glGetAttribLocation\0" - "glDrawBuffers\0" - "glDrawBuffersATI\0" - "glDrawBuffersNV\0" - "glDrawArraysInstancedEXT\0" - "glDrawArraysInstanced\0" - "glDrawElementsInstancedEXT\0" - "glDrawElementsInstanced\0" - "glRenderbufferStorageMultisampleEXT\0" - "glBlendEquationSeparateIndexedAMD\0" - "glBlendEquationIndexedAMD\0" - "glBlendFuncSeparateIndexedAMD\0" - "glBlendFuncIndexedAMD\0" - "glSampleMaskEXT\0" - "glSamplePatternEXT\0" - "glPointParameterf\0" - "glPointParameterfARB\0" - "glPointParameterfSGIS\0" - "glPointParameterfv\0" - "glPointParameterfvARB\0" - "glPointParameterfvSGIS\0" - "glSecondaryColor3b\0" - "glSecondaryColor3bv\0" - "glSecondaryColor3d\0" - "glSecondaryColor3dv\0" - "glSecondaryColor3f\0" - "glSecondaryColor3fv\0" - "glSecondaryColor3i\0" - "glSecondaryColor3iv\0" - "glSecondaryColor3s\0" - "glSecondaryColor3sv\0" - "glSecondaryColor3ub\0" - "glSecondaryColor3ubv\0" - "glSecondaryColor3ui\0" - "glSecondaryColor3uiv\0" - "glSecondaryColor3us\0" - "glSecondaryColor3usv\0" - "glSecondaryColorPointer\0" - "glMultiDrawArrays\0" - "glMultiDrawElements\0" - "glFogCoordPointer\0" - "glFogCoordd\0" - "glFogCoorddv\0" - "glFogCoordf\0" - "glFogCoordfv\0" - "glBlendFuncSeparate\0" - "glBlendFuncSeparateINGR\0" - "glWindowPos2d\0" - "glWindowPos2dARB\0" - "glWindowPos2dv\0" - "glWindowPos2dvARB\0" - "glWindowPos2f\0" - "glWindowPos2fARB\0" - "glWindowPos2fv\0" - "glWindowPos2fvARB\0" - "glWindowPos2i\0" - "glWindowPos2iARB\0" - "glWindowPos2iv\0" - "glWindowPos2ivARB\0" - "glWindowPos2s\0" - "glWindowPos2sARB\0" - "glWindowPos2sv\0" - "glWindowPos2svARB\0" - "glWindowPos3d\0" - "glWindowPos3dARB\0" - "glWindowPos3dv\0" - "glWindowPos3dvARB\0" - "glWindowPos3f\0" - "glWindowPos3fARB\0" - "glWindowPos3fv\0" - "glWindowPos3fvARB\0" - "glWindowPos3i\0" - "glWindowPos3iARB\0" - "glWindowPos3iv\0" - "glWindowPos3ivARB\0" - "glWindowPos3s\0" - "glWindowPos3sARB\0" - "glWindowPos3sv\0" - "glWindowPos3svARB\0" - "glBindProgramARB\0" - "glDeleteProgramsARB\0" - "glGenProgramsARB\0" - "glGetVertexAttribPointerv\0" - "glGetVertexAttribPointervARB\0" - "glIsProgramARB\0" - "glPointParameteri\0" - "glPointParameteriv\0" - "glDeleteVertexArrays\0" - "glIsVertexArray\0" - "glPrimitiveRestartIndex\0" - "glBlendEquationSeparate\0" - "glBlendEquationSeparateATI\0" - "glBindFramebuffer\0" - "glBindRenderbuffer\0" - "glCheckFramebufferStatus\0" - "glDeleteFramebuffers\0" - "glDeleteRenderbuffers\0" - "glFramebufferRenderbuffer\0" - "glFramebufferTexture1D\0" - "glFramebufferTexture2D\0" - "glFramebufferTexture3D\0" - "glGenFramebuffers\0" - "glGenRenderbuffers\0" - "glGenerateMipmap\0" - "glGetFramebufferAttachmentParameteriv\0" - "glGetRenderbufferParameteriv\0" - "glIsFramebuffer\0" - "glIsRenderbuffer\0" - "glRenderbufferStorage\0" - "glBlitFramebuffer\0" - "glBindFragDataLocation\0" - "glGetFragDataLocation\0" - "glGetUniformuiv\0" - "glGetVertexAttribIiv\0" - "glGetVertexAttribIuiv\0" - "glUniform1ui\0" - "glUniform1uiv\0" - "glUniform2ui\0" - "glUniform2uiv\0" - "glUniform3ui\0" - "glUniform3uiv\0" - "glUniform4ui\0" - "glUniform4uiv\0" - "glVertexAttribI1i\0" - "glVertexAttribI1iv\0" - "glVertexAttribI1ui\0" - "glVertexAttribI1uiv\0" - "glVertexAttribI2i\0" - "glVertexAttribI2iv\0" - "glVertexAttribI2ui\0" - "glVertexAttribI2uiv\0" - "glVertexAttribI3i\0" - "glVertexAttribI3iv\0" - "glVertexAttribI3ui\0" - "glVertexAttribI3uiv\0" - "glVertexAttribI4bv\0" - "glVertexAttribI4i\0" - "glVertexAttribI4iv\0" - "glVertexAttribI4sv\0" - "glVertexAttribI4ubv\0" - "glVertexAttribI4ui\0" - "glVertexAttribI4uiv\0" - "glVertexAttribI4usv\0" - "glVertexAttribIPointer\0" - "glFramebufferTextureLayer\0" - "glFramebufferTextureLayerARB\0" - "glColorMaski\0" - "glDisablei\0" - "glEnablei\0" - "glGetBooleani_v\0" - "glGetIntegeri_v\0" - "glIsEnabledi\0" - "glGetTexParameterIiv\0" - "glGetTexParameterIuiv\0" - "glTexParameterIiv\0" - "glTexParameterIuiv\0" - "glBeginConditionalRender\0" - "glEndConditionalRender\0" - "glBeginTransformFeedback\0" - "glBindBufferBase\0" - "glBindBufferRange\0" - "glEndTransformFeedback\0" - "glGetTransformFeedbackVarying\0" - "glTransformFeedbackVaryings\0" - "glProvokingVertex\0" - ; - - -#ifdef USE_MGL_NAMESPACE -#define gl_dispatch_stub_343 mgl_dispatch_stub_343 -#define gl_dispatch_stub_344 mgl_dispatch_stub_344 -#define gl_dispatch_stub_345 mgl_dispatch_stub_345 -#define gl_dispatch_stub_356 mgl_dispatch_stub_356 -#define gl_dispatch_stub_357 mgl_dispatch_stub_357 -#define gl_dispatch_stub_358 mgl_dispatch_stub_358 -#define gl_dispatch_stub_359 mgl_dispatch_stub_359 -#define gl_dispatch_stub_361 mgl_dispatch_stub_361 -#define gl_dispatch_stub_362 mgl_dispatch_stub_362 -#define gl_dispatch_stub_363 mgl_dispatch_stub_363 -#define gl_dispatch_stub_364 mgl_dispatch_stub_364 -#define gl_dispatch_stub_365 mgl_dispatch_stub_365 -#define gl_dispatch_stub_366 mgl_dispatch_stub_366 -#define gl_dispatch_stub_692 mgl_dispatch_stub_692 -#define gl_dispatch_stub_693 mgl_dispatch_stub_693 -#define gl_dispatch_stub_694 mgl_dispatch_stub_694 -#define gl_dispatch_stub_695 mgl_dispatch_stub_695 -#define gl_dispatch_stub_696 mgl_dispatch_stub_696 -#define gl_dispatch_stub_697 mgl_dispatch_stub_697 -#define gl_dispatch_stub_698 mgl_dispatch_stub_698 -#define gl_dispatch_stub_699 mgl_dispatch_stub_699 -#define gl_dispatch_stub_734 mgl_dispatch_stub_734 -#define gl_dispatch_stub_776 mgl_dispatch_stub_776 -#define gl_dispatch_stub_777 mgl_dispatch_stub_777 -#define gl_dispatch_stub_778 mgl_dispatch_stub_778 -#define gl_dispatch_stub_779 mgl_dispatch_stub_779 -#define gl_dispatch_stub_780 mgl_dispatch_stub_780 -#define gl_dispatch_stub_781 mgl_dispatch_stub_781 -#define gl_dispatch_stub_782 mgl_dispatch_stub_782 -#define gl_dispatch_stub_783 mgl_dispatch_stub_783 -#define gl_dispatch_stub_784 mgl_dispatch_stub_784 -#define gl_dispatch_stub_865 mgl_dispatch_stub_865 -#define gl_dispatch_stub_866 mgl_dispatch_stub_866 -#define gl_dispatch_stub_867 mgl_dispatch_stub_867 -#define gl_dispatch_stub_868 mgl_dispatch_stub_868 -#define gl_dispatch_stub_869 mgl_dispatch_stub_869 -#define gl_dispatch_stub_878 mgl_dispatch_stub_878 -#define gl_dispatch_stub_879 mgl_dispatch_stub_879 -#define gl_dispatch_stub_897 mgl_dispatch_stub_897 -#define gl_dispatch_stub_898 mgl_dispatch_stub_898 -#define gl_dispatch_stub_899 mgl_dispatch_stub_899 -#define gl_dispatch_stub_957 mgl_dispatch_stub_957 -#define gl_dispatch_stub_958 mgl_dispatch_stub_958 -#define gl_dispatch_stub_966 mgl_dispatch_stub_966 -#define gl_dispatch_stub_967 mgl_dispatch_stub_967 -#define gl_dispatch_stub_968 mgl_dispatch_stub_968 -#define gl_dispatch_stub_969 mgl_dispatch_stub_969 -#define gl_dispatch_stub_970 mgl_dispatch_stub_970 -#endif /* USE_MGL_NAMESPACE */ - - -#if defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) -void GLAPIENTRY gl_dispatch_stub_343(GLenum target, GLenum format, GLenum type, GLvoid * table); -void GLAPIENTRY gl_dispatch_stub_344(GLenum target, GLenum pname, GLfloat * params); -void GLAPIENTRY gl_dispatch_stub_345(GLenum target, GLenum pname, GLint * params); -void GLAPIENTRY gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type, GLvoid * image); -void GLAPIENTRY gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat * params); -void GLAPIENTRY gl_dispatch_stub_358(GLenum target, GLenum pname, GLint * params); -void GLAPIENTRY gl_dispatch_stub_359(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); -void GLAPIENTRY gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); -void GLAPIENTRY gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat * params); -void GLAPIENTRY gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params); -void GLAPIENTRY gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); -void GLAPIENTRY gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params); -void GLAPIENTRY gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params); -void GLAPIENTRY gl_dispatch_stub_692(GLenum pname, GLfloat * params); -void GLAPIENTRY gl_dispatch_stub_693(GLenum pname, GLint * params); -void GLAPIENTRY gl_dispatch_stub_694(GLenum pname, GLfloat param); -void GLAPIENTRY gl_dispatch_stub_695(GLenum pname, const GLfloat * params); -void GLAPIENTRY gl_dispatch_stub_696(GLenum pname, GLint param); -void GLAPIENTRY gl_dispatch_stub_697(GLenum pname, const GLint * params); -void GLAPIENTRY gl_dispatch_stub_698(GLclampf value, GLboolean invert); -void GLAPIENTRY gl_dispatch_stub_699(GLenum pattern); -void GLAPIENTRY gl_dispatch_stub_734(GLenum mode); -void GLAPIENTRY gl_dispatch_stub_776(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); -void GLAPIENTRY gl_dispatch_stub_777(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid * const * indices, GLsizei primcount, GLint modestride); -void GLAPIENTRY gl_dispatch_stub_778(GLsizei n, const GLuint * fences); -void GLAPIENTRY gl_dispatch_stub_779(GLuint fence); -void GLAPIENTRY gl_dispatch_stub_780(GLsizei n, GLuint * fences); -void GLAPIENTRY gl_dispatch_stub_781(GLuint fence, GLenum pname, GLint * params); -GLboolean GLAPIENTRY gl_dispatch_stub_782(GLuint fence); -void GLAPIENTRY gl_dispatch_stub_783(GLuint fence, GLenum condition); -GLboolean GLAPIENTRY gl_dispatch_stub_784(GLuint fence); -void GLAPIENTRY gl_dispatch_stub_865(GLenum face); -void GLAPIENTRY gl_dispatch_stub_866(GLuint array); -void GLAPIENTRY gl_dispatch_stub_867(GLsizei n, const GLuint * arrays); -void GLAPIENTRY gl_dispatch_stub_868(GLsizei n, GLuint * arrays); -GLboolean GLAPIENTRY gl_dispatch_stub_869(GLuint array); -void GLAPIENTRY gl_dispatch_stub_878(GLclampd zmin, GLclampd zmax); -void GLAPIENTRY gl_dispatch_stub_879(GLenum modeRGB, GLenum modeA); -void GLAPIENTRY gl_dispatch_stub_897(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -void GLAPIENTRY gl_dispatch_stub_898(GLenum target, GLenum pname, GLint param); -void GLAPIENTRY gl_dispatch_stub_899(GLenum target, GLintptr offset, GLsizeiptr size); -void GLAPIENTRY gl_dispatch_stub_957(GLenum target, GLenum pname, GLvoid ** params); -void GLAPIENTRY gl_dispatch_stub_958(GLenum target, GLsizei length, GLvoid * pointer); -void GLAPIENTRY gl_dispatch_stub_966(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); -void GLAPIENTRY gl_dispatch_stub_967(GLenum target, GLuint index, GLsizei count, const GLfloat * params); -void GLAPIENTRY gl_dispatch_stub_968(GLenum target, GLuint index, GLsizei count, const GLfloat * params); -void GLAPIENTRY gl_dispatch_stub_969(GLuint id, GLenum pname, GLint64EXT * params); -void GLAPIENTRY gl_dispatch_stub_970(GLuint id, GLenum pname, GLuint64EXT * params); -#endif /* defined(NEED_FUNCTION_POINTER) || defined(GLX_INDIRECT_RENDERING) */ - -static const glprocs_table_t static_functions[] = { - NAME_FUNC_OFFSET( 0, glNewList, glNewList, NULL, 0), - NAME_FUNC_OFFSET( 10, glEndList, glEndList, NULL, 1), - NAME_FUNC_OFFSET( 20, glCallList, glCallList, NULL, 2), - NAME_FUNC_OFFSET( 31, glCallLists, glCallLists, NULL, 3), - NAME_FUNC_OFFSET( 43, glDeleteLists, glDeleteLists, NULL, 4), - NAME_FUNC_OFFSET( 57, glGenLists, glGenLists, NULL, 5), - NAME_FUNC_OFFSET( 68, glListBase, glListBase, NULL, 6), - NAME_FUNC_OFFSET( 79, glBegin, glBegin, NULL, 7), - NAME_FUNC_OFFSET( 87, glBitmap, glBitmap, NULL, 8), - NAME_FUNC_OFFSET( 96, glColor3b, glColor3b, NULL, 9), - NAME_FUNC_OFFSET( 106, glColor3bv, glColor3bv, NULL, 10), - NAME_FUNC_OFFSET( 117, glColor3d, glColor3d, NULL, 11), - NAME_FUNC_OFFSET( 127, glColor3dv, glColor3dv, NULL, 12), - NAME_FUNC_OFFSET( 138, glColor3f, glColor3f, NULL, 13), - NAME_FUNC_OFFSET( 148, glColor3fv, glColor3fv, NULL, 14), - NAME_FUNC_OFFSET( 159, glColor3i, glColor3i, NULL, 15), - NAME_FUNC_OFFSET( 169, glColor3iv, glColor3iv, NULL, 16), - NAME_FUNC_OFFSET( 180, glColor3s, glColor3s, NULL, 17), - NAME_FUNC_OFFSET( 190, glColor3sv, glColor3sv, NULL, 18), - NAME_FUNC_OFFSET( 201, glColor3ub, glColor3ub, NULL, 19), - NAME_FUNC_OFFSET( 212, glColor3ubv, glColor3ubv, NULL, 20), - NAME_FUNC_OFFSET( 224, glColor3ui, glColor3ui, NULL, 21), - NAME_FUNC_OFFSET( 235, glColor3uiv, glColor3uiv, NULL, 22), - NAME_FUNC_OFFSET( 247, glColor3us, glColor3us, NULL, 23), - NAME_FUNC_OFFSET( 258, glColor3usv, glColor3usv, NULL, 24), - NAME_FUNC_OFFSET( 270, glColor4b, glColor4b, NULL, 25), - NAME_FUNC_OFFSET( 280, glColor4bv, glColor4bv, NULL, 26), - NAME_FUNC_OFFSET( 291, glColor4d, glColor4d, NULL, 27), - NAME_FUNC_OFFSET( 301, glColor4dv, glColor4dv, NULL, 28), - NAME_FUNC_OFFSET( 312, glColor4f, glColor4f, NULL, 29), - NAME_FUNC_OFFSET( 322, glColor4fv, glColor4fv, NULL, 30), - NAME_FUNC_OFFSET( 333, glColor4i, glColor4i, NULL, 31), - NAME_FUNC_OFFSET( 343, glColor4iv, glColor4iv, NULL, 32), - NAME_FUNC_OFFSET( 354, glColor4s, glColor4s, NULL, 33), - NAME_FUNC_OFFSET( 364, glColor4sv, glColor4sv, NULL, 34), - NAME_FUNC_OFFSET( 375, glColor4ub, glColor4ub, NULL, 35), - NAME_FUNC_OFFSET( 386, glColor4ubv, glColor4ubv, NULL, 36), - NAME_FUNC_OFFSET( 398, glColor4ui, glColor4ui, NULL, 37), - NAME_FUNC_OFFSET( 409, glColor4uiv, glColor4uiv, NULL, 38), - NAME_FUNC_OFFSET( 421, glColor4us, glColor4us, NULL, 39), - NAME_FUNC_OFFSET( 432, glColor4usv, glColor4usv, NULL, 40), - NAME_FUNC_OFFSET( 444, glEdgeFlag, glEdgeFlag, NULL, 41), - NAME_FUNC_OFFSET( 455, glEdgeFlagv, glEdgeFlagv, NULL, 42), - NAME_FUNC_OFFSET( 467, glEnd, glEnd, NULL, 43), - NAME_FUNC_OFFSET( 473, glIndexd, glIndexd, NULL, 44), - NAME_FUNC_OFFSET( 482, glIndexdv, glIndexdv, NULL, 45), - NAME_FUNC_OFFSET( 492, glIndexf, glIndexf, NULL, 46), - NAME_FUNC_OFFSET( 501, glIndexfv, glIndexfv, NULL, 47), - NAME_FUNC_OFFSET( 511, glIndexi, glIndexi, NULL, 48), - NAME_FUNC_OFFSET( 520, glIndexiv, glIndexiv, NULL, 49), - NAME_FUNC_OFFSET( 530, glIndexs, glIndexs, NULL, 50), - NAME_FUNC_OFFSET( 539, glIndexsv, glIndexsv, NULL, 51), - NAME_FUNC_OFFSET( 549, glNormal3b, glNormal3b, NULL, 52), - NAME_FUNC_OFFSET( 560, glNormal3bv, glNormal3bv, NULL, 53), - NAME_FUNC_OFFSET( 572, glNormal3d, glNormal3d, NULL, 54), - NAME_FUNC_OFFSET( 583, glNormal3dv, glNormal3dv, NULL, 55), - NAME_FUNC_OFFSET( 595, glNormal3f, glNormal3f, NULL, 56), - NAME_FUNC_OFFSET( 606, glNormal3fv, glNormal3fv, NULL, 57), - NAME_FUNC_OFFSET( 618, glNormal3i, glNormal3i, NULL, 58), - NAME_FUNC_OFFSET( 629, glNormal3iv, glNormal3iv, NULL, 59), - NAME_FUNC_OFFSET( 641, glNormal3s, glNormal3s, NULL, 60), - NAME_FUNC_OFFSET( 652, glNormal3sv, glNormal3sv, NULL, 61), - NAME_FUNC_OFFSET( 664, glRasterPos2d, glRasterPos2d, NULL, 62), - NAME_FUNC_OFFSET( 678, glRasterPos2dv, glRasterPos2dv, NULL, 63), - NAME_FUNC_OFFSET( 693, glRasterPos2f, glRasterPos2f, NULL, 64), - NAME_FUNC_OFFSET( 707, glRasterPos2fv, glRasterPos2fv, NULL, 65), - NAME_FUNC_OFFSET( 722, glRasterPos2i, glRasterPos2i, NULL, 66), - NAME_FUNC_OFFSET( 736, glRasterPos2iv, glRasterPos2iv, NULL, 67), - NAME_FUNC_OFFSET( 751, glRasterPos2s, glRasterPos2s, NULL, 68), - NAME_FUNC_OFFSET( 765, glRasterPos2sv, glRasterPos2sv, NULL, 69), - NAME_FUNC_OFFSET( 780, glRasterPos3d, glRasterPos3d, NULL, 70), - NAME_FUNC_OFFSET( 794, glRasterPos3dv, glRasterPos3dv, NULL, 71), - NAME_FUNC_OFFSET( 809, glRasterPos3f, glRasterPos3f, NULL, 72), - NAME_FUNC_OFFSET( 823, glRasterPos3fv, glRasterPos3fv, NULL, 73), - NAME_FUNC_OFFSET( 838, glRasterPos3i, glRasterPos3i, NULL, 74), - NAME_FUNC_OFFSET( 852, glRasterPos3iv, glRasterPos3iv, NULL, 75), - NAME_FUNC_OFFSET( 867, glRasterPos3s, glRasterPos3s, NULL, 76), - NAME_FUNC_OFFSET( 881, glRasterPos3sv, glRasterPos3sv, NULL, 77), - NAME_FUNC_OFFSET( 896, glRasterPos4d, glRasterPos4d, NULL, 78), - NAME_FUNC_OFFSET( 910, glRasterPos4dv, glRasterPos4dv, NULL, 79), - NAME_FUNC_OFFSET( 925, glRasterPos4f, glRasterPos4f, NULL, 80), - NAME_FUNC_OFFSET( 939, glRasterPos4fv, glRasterPos4fv, NULL, 81), - NAME_FUNC_OFFSET( 954, glRasterPos4i, glRasterPos4i, NULL, 82), - NAME_FUNC_OFFSET( 968, glRasterPos4iv, glRasterPos4iv, NULL, 83), - NAME_FUNC_OFFSET( 983, glRasterPos4s, glRasterPos4s, NULL, 84), - NAME_FUNC_OFFSET( 997, glRasterPos4sv, glRasterPos4sv, NULL, 85), - NAME_FUNC_OFFSET( 1012, glRectd, glRectd, NULL, 86), - NAME_FUNC_OFFSET( 1020, glRectdv, glRectdv, NULL, 87), - NAME_FUNC_OFFSET( 1029, glRectf, glRectf, NULL, 88), - NAME_FUNC_OFFSET( 1037, glRectfv, glRectfv, NULL, 89), - NAME_FUNC_OFFSET( 1046, glRecti, glRecti, NULL, 90), - NAME_FUNC_OFFSET( 1054, glRectiv, glRectiv, NULL, 91), - NAME_FUNC_OFFSET( 1063, glRects, glRects, NULL, 92), - NAME_FUNC_OFFSET( 1071, glRectsv, glRectsv, NULL, 93), - NAME_FUNC_OFFSET( 1080, glTexCoord1d, glTexCoord1d, NULL, 94), - NAME_FUNC_OFFSET( 1093, glTexCoord1dv, glTexCoord1dv, NULL, 95), - NAME_FUNC_OFFSET( 1107, glTexCoord1f, glTexCoord1f, NULL, 96), - NAME_FUNC_OFFSET( 1120, glTexCoord1fv, glTexCoord1fv, NULL, 97), - NAME_FUNC_OFFSET( 1134, glTexCoord1i, glTexCoord1i, NULL, 98), - NAME_FUNC_OFFSET( 1147, glTexCoord1iv, glTexCoord1iv, NULL, 99), - NAME_FUNC_OFFSET( 1161, glTexCoord1s, glTexCoord1s, NULL, 100), - NAME_FUNC_OFFSET( 1174, glTexCoord1sv, glTexCoord1sv, NULL, 101), - NAME_FUNC_OFFSET( 1188, glTexCoord2d, glTexCoord2d, NULL, 102), - NAME_FUNC_OFFSET( 1201, glTexCoord2dv, glTexCoord2dv, NULL, 103), - NAME_FUNC_OFFSET( 1215, glTexCoord2f, glTexCoord2f, NULL, 104), - NAME_FUNC_OFFSET( 1228, glTexCoord2fv, glTexCoord2fv, NULL, 105), - NAME_FUNC_OFFSET( 1242, glTexCoord2i, glTexCoord2i, NULL, 106), - NAME_FUNC_OFFSET( 1255, glTexCoord2iv, glTexCoord2iv, NULL, 107), - NAME_FUNC_OFFSET( 1269, glTexCoord2s, glTexCoord2s, NULL, 108), - NAME_FUNC_OFFSET( 1282, glTexCoord2sv, glTexCoord2sv, NULL, 109), - NAME_FUNC_OFFSET( 1296, glTexCoord3d, glTexCoord3d, NULL, 110), - NAME_FUNC_OFFSET( 1309, glTexCoord3dv, glTexCoord3dv, NULL, 111), - NAME_FUNC_OFFSET( 1323, glTexCoord3f, glTexCoord3f, NULL, 112), - NAME_FUNC_OFFSET( 1336, glTexCoord3fv, glTexCoord3fv, NULL, 113), - NAME_FUNC_OFFSET( 1350, glTexCoord3i, glTexCoord3i, NULL, 114), - NAME_FUNC_OFFSET( 1363, glTexCoord3iv, glTexCoord3iv, NULL, 115), - NAME_FUNC_OFFSET( 1377, glTexCoord3s, glTexCoord3s, NULL, 116), - NAME_FUNC_OFFSET( 1390, glTexCoord3sv, glTexCoord3sv, NULL, 117), - NAME_FUNC_OFFSET( 1404, glTexCoord4d, glTexCoord4d, NULL, 118), - NAME_FUNC_OFFSET( 1417, glTexCoord4dv, glTexCoord4dv, NULL, 119), - NAME_FUNC_OFFSET( 1431, glTexCoord4f, glTexCoord4f, NULL, 120), - NAME_FUNC_OFFSET( 1444, glTexCoord4fv, glTexCoord4fv, NULL, 121), - NAME_FUNC_OFFSET( 1458, glTexCoord4i, glTexCoord4i, NULL, 122), - NAME_FUNC_OFFSET( 1471, glTexCoord4iv, glTexCoord4iv, NULL, 123), - NAME_FUNC_OFFSET( 1485, glTexCoord4s, glTexCoord4s, NULL, 124), - NAME_FUNC_OFFSET( 1498, glTexCoord4sv, glTexCoord4sv, NULL, 125), - NAME_FUNC_OFFSET( 1512, glVertex2d, glVertex2d, NULL, 126), - NAME_FUNC_OFFSET( 1523, glVertex2dv, glVertex2dv, NULL, 127), - NAME_FUNC_OFFSET( 1535, glVertex2f, glVertex2f, NULL, 128), - NAME_FUNC_OFFSET( 1546, glVertex2fv, glVertex2fv, NULL, 129), - NAME_FUNC_OFFSET( 1558, glVertex2i, glVertex2i, NULL, 130), - NAME_FUNC_OFFSET( 1569, glVertex2iv, glVertex2iv, NULL, 131), - NAME_FUNC_OFFSET( 1581, glVertex2s, glVertex2s, NULL, 132), - NAME_FUNC_OFFSET( 1592, glVertex2sv, glVertex2sv, NULL, 133), - NAME_FUNC_OFFSET( 1604, glVertex3d, glVertex3d, NULL, 134), - NAME_FUNC_OFFSET( 1615, glVertex3dv, glVertex3dv, NULL, 135), - NAME_FUNC_OFFSET( 1627, glVertex3f, glVertex3f, NULL, 136), - NAME_FUNC_OFFSET( 1638, glVertex3fv, glVertex3fv, NULL, 137), - NAME_FUNC_OFFSET( 1650, glVertex3i, glVertex3i, NULL, 138), - NAME_FUNC_OFFSET( 1661, glVertex3iv, glVertex3iv, NULL, 139), - NAME_FUNC_OFFSET( 1673, glVertex3s, glVertex3s, NULL, 140), - NAME_FUNC_OFFSET( 1684, glVertex3sv, glVertex3sv, NULL, 141), - NAME_FUNC_OFFSET( 1696, glVertex4d, glVertex4d, NULL, 142), - NAME_FUNC_OFFSET( 1707, glVertex4dv, glVertex4dv, NULL, 143), - NAME_FUNC_OFFSET( 1719, glVertex4f, glVertex4f, NULL, 144), - NAME_FUNC_OFFSET( 1730, glVertex4fv, glVertex4fv, NULL, 145), - NAME_FUNC_OFFSET( 1742, glVertex4i, glVertex4i, NULL, 146), - NAME_FUNC_OFFSET( 1753, glVertex4iv, glVertex4iv, NULL, 147), - NAME_FUNC_OFFSET( 1765, glVertex4s, glVertex4s, NULL, 148), - NAME_FUNC_OFFSET( 1776, glVertex4sv, glVertex4sv, NULL, 149), - NAME_FUNC_OFFSET( 1788, glClipPlane, glClipPlane, NULL, 150), - NAME_FUNC_OFFSET( 1800, glColorMaterial, glColorMaterial, NULL, 151), - NAME_FUNC_OFFSET( 1816, glCullFace, glCullFace, NULL, 152), - NAME_FUNC_OFFSET( 1827, glFogf, glFogf, NULL, 153), - NAME_FUNC_OFFSET( 1834, glFogfv, glFogfv, NULL, 154), - NAME_FUNC_OFFSET( 1842, glFogi, glFogi, NULL, 155), - NAME_FUNC_OFFSET( 1849, glFogiv, glFogiv, NULL, 156), - NAME_FUNC_OFFSET( 1857, glFrontFace, glFrontFace, NULL, 157), - NAME_FUNC_OFFSET( 1869, glHint, glHint, NULL, 158), - NAME_FUNC_OFFSET( 1876, glLightf, glLightf, NULL, 159), - NAME_FUNC_OFFSET( 1885, glLightfv, glLightfv, NULL, 160), - NAME_FUNC_OFFSET( 1895, glLighti, glLighti, NULL, 161), - NAME_FUNC_OFFSET( 1904, glLightiv, glLightiv, NULL, 162), - NAME_FUNC_OFFSET( 1914, glLightModelf, glLightModelf, NULL, 163), - NAME_FUNC_OFFSET( 1928, glLightModelfv, glLightModelfv, NULL, 164), - NAME_FUNC_OFFSET( 1943, glLightModeli, glLightModeli, NULL, 165), - NAME_FUNC_OFFSET( 1957, glLightModeliv, glLightModeliv, NULL, 166), - NAME_FUNC_OFFSET( 1972, glLineStipple, glLineStipple, NULL, 167), - NAME_FUNC_OFFSET( 1986, glLineWidth, glLineWidth, NULL, 168), - NAME_FUNC_OFFSET( 1998, glMaterialf, glMaterialf, NULL, 169), - NAME_FUNC_OFFSET( 2010, glMaterialfv, glMaterialfv, NULL, 170), - NAME_FUNC_OFFSET( 2023, glMateriali, glMateriali, NULL, 171), - NAME_FUNC_OFFSET( 2035, glMaterialiv, glMaterialiv, NULL, 172), - NAME_FUNC_OFFSET( 2048, glPointSize, glPointSize, NULL, 173), - NAME_FUNC_OFFSET( 2060, glPolygonMode, glPolygonMode, NULL, 174), - NAME_FUNC_OFFSET( 2074, glPolygonStipple, glPolygonStipple, NULL, 175), - NAME_FUNC_OFFSET( 2091, glScissor, glScissor, NULL, 176), - NAME_FUNC_OFFSET( 2101, glShadeModel, glShadeModel, NULL, 177), - NAME_FUNC_OFFSET( 2114, glTexParameterf, glTexParameterf, NULL, 178), - NAME_FUNC_OFFSET( 2130, glTexParameterfv, glTexParameterfv, NULL, 179), - NAME_FUNC_OFFSET( 2147, glTexParameteri, glTexParameteri, NULL, 180), - NAME_FUNC_OFFSET( 2163, glTexParameteriv, glTexParameteriv, NULL, 181), - NAME_FUNC_OFFSET( 2180, glTexImage1D, glTexImage1D, NULL, 182), - NAME_FUNC_OFFSET( 2193, glTexImage2D, glTexImage2D, NULL, 183), - NAME_FUNC_OFFSET( 2206, glTexEnvf, glTexEnvf, NULL, 184), - NAME_FUNC_OFFSET( 2216, glTexEnvfv, glTexEnvfv, NULL, 185), - NAME_FUNC_OFFSET( 2227, glTexEnvi, glTexEnvi, NULL, 186), - NAME_FUNC_OFFSET( 2237, glTexEnviv, glTexEnviv, NULL, 187), - NAME_FUNC_OFFSET( 2248, glTexGend, glTexGend, NULL, 188), - NAME_FUNC_OFFSET( 2258, glTexGendv, glTexGendv, NULL, 189), - NAME_FUNC_OFFSET( 2269, glTexGenf, glTexGenf, NULL, 190), - NAME_FUNC_OFFSET( 2279, glTexGenfv, glTexGenfv, NULL, 191), - NAME_FUNC_OFFSET( 2290, glTexGeni, glTexGeni, NULL, 192), - NAME_FUNC_OFFSET( 2300, glTexGeniv, glTexGeniv, NULL, 193), - NAME_FUNC_OFFSET( 2311, glFeedbackBuffer, glFeedbackBuffer, NULL, 194), - NAME_FUNC_OFFSET( 2328, glSelectBuffer, glSelectBuffer, NULL, 195), - NAME_FUNC_OFFSET( 2343, glRenderMode, glRenderMode, NULL, 196), - NAME_FUNC_OFFSET( 2356, glInitNames, glInitNames, NULL, 197), - NAME_FUNC_OFFSET( 2368, glLoadName, glLoadName, NULL, 198), - NAME_FUNC_OFFSET( 2379, glPassThrough, glPassThrough, NULL, 199), - NAME_FUNC_OFFSET( 2393, glPopName, glPopName, NULL, 200), - NAME_FUNC_OFFSET( 2403, glPushName, glPushName, NULL, 201), - NAME_FUNC_OFFSET( 2414, glDrawBuffer, glDrawBuffer, NULL, 202), - NAME_FUNC_OFFSET( 2427, glClear, glClear, NULL, 203), - NAME_FUNC_OFFSET( 2435, glClearAccum, glClearAccum, NULL, 204), - NAME_FUNC_OFFSET( 2448, glClearIndex, glClearIndex, NULL, 205), - NAME_FUNC_OFFSET( 2461, glClearColor, glClearColor, NULL, 206), - NAME_FUNC_OFFSET( 2474, glClearStencil, glClearStencil, NULL, 207), - NAME_FUNC_OFFSET( 2489, glClearDepth, glClearDepth, NULL, 208), - NAME_FUNC_OFFSET( 2502, glStencilMask, glStencilMask, NULL, 209), - NAME_FUNC_OFFSET( 2516, glColorMask, glColorMask, NULL, 210), - NAME_FUNC_OFFSET( 2528, glDepthMask, glDepthMask, NULL, 211), - NAME_FUNC_OFFSET( 2540, glIndexMask, glIndexMask, NULL, 212), - NAME_FUNC_OFFSET( 2552, glAccum, glAccum, NULL, 213), - NAME_FUNC_OFFSET( 2560, glDisable, glDisable, NULL, 214), - NAME_FUNC_OFFSET( 2570, glEnable, glEnable, NULL, 215), - NAME_FUNC_OFFSET( 2579, glFinish, glFinish, NULL, 216), - NAME_FUNC_OFFSET( 2588, glFlush, glFlush, NULL, 217), - NAME_FUNC_OFFSET( 2596, glPopAttrib, glPopAttrib, NULL, 218), - NAME_FUNC_OFFSET( 2608, glPushAttrib, glPushAttrib, NULL, 219), - NAME_FUNC_OFFSET( 2621, glMap1d, glMap1d, NULL, 220), - NAME_FUNC_OFFSET( 2629, glMap1f, glMap1f, NULL, 221), - NAME_FUNC_OFFSET( 2637, glMap2d, glMap2d, NULL, 222), - NAME_FUNC_OFFSET( 2645, glMap2f, glMap2f, NULL, 223), - NAME_FUNC_OFFSET( 2653, glMapGrid1d, glMapGrid1d, NULL, 224), - NAME_FUNC_OFFSET( 2665, glMapGrid1f, glMapGrid1f, NULL, 225), - NAME_FUNC_OFFSET( 2677, glMapGrid2d, glMapGrid2d, NULL, 226), - NAME_FUNC_OFFSET( 2689, glMapGrid2f, glMapGrid2f, NULL, 227), - NAME_FUNC_OFFSET( 2701, glEvalCoord1d, glEvalCoord1d, NULL, 228), - NAME_FUNC_OFFSET( 2715, glEvalCoord1dv, glEvalCoord1dv, NULL, 229), - NAME_FUNC_OFFSET( 2730, glEvalCoord1f, glEvalCoord1f, NULL, 230), - NAME_FUNC_OFFSET( 2744, glEvalCoord1fv, glEvalCoord1fv, NULL, 231), - NAME_FUNC_OFFSET( 2759, glEvalCoord2d, glEvalCoord2d, NULL, 232), - NAME_FUNC_OFFSET( 2773, glEvalCoord2dv, glEvalCoord2dv, NULL, 233), - NAME_FUNC_OFFSET( 2788, glEvalCoord2f, glEvalCoord2f, NULL, 234), - NAME_FUNC_OFFSET( 2802, glEvalCoord2fv, glEvalCoord2fv, NULL, 235), - NAME_FUNC_OFFSET( 2817, glEvalMesh1, glEvalMesh1, NULL, 236), - NAME_FUNC_OFFSET( 2829, glEvalPoint1, glEvalPoint1, NULL, 237), - NAME_FUNC_OFFSET( 2842, glEvalMesh2, glEvalMesh2, NULL, 238), - NAME_FUNC_OFFSET( 2854, glEvalPoint2, glEvalPoint2, NULL, 239), - NAME_FUNC_OFFSET( 2867, glAlphaFunc, glAlphaFunc, NULL, 240), - NAME_FUNC_OFFSET( 2879, glBlendFunc, glBlendFunc, NULL, 241), - NAME_FUNC_OFFSET( 2891, glLogicOp, glLogicOp, NULL, 242), - NAME_FUNC_OFFSET( 2901, glStencilFunc, glStencilFunc, NULL, 243), - NAME_FUNC_OFFSET( 2915, glStencilOp, glStencilOp, NULL, 244), - NAME_FUNC_OFFSET( 2927, glDepthFunc, glDepthFunc, NULL, 245), - NAME_FUNC_OFFSET( 2939, glPixelZoom, glPixelZoom, NULL, 246), - NAME_FUNC_OFFSET( 2951, glPixelTransferf, glPixelTransferf, NULL, 247), - NAME_FUNC_OFFSET( 2968, glPixelTransferi, glPixelTransferi, NULL, 248), - NAME_FUNC_OFFSET( 2985, glPixelStoref, glPixelStoref, NULL, 249), - NAME_FUNC_OFFSET( 2999, glPixelStorei, glPixelStorei, NULL, 250), - NAME_FUNC_OFFSET( 3013, glPixelMapfv, glPixelMapfv, NULL, 251), - NAME_FUNC_OFFSET( 3026, glPixelMapuiv, glPixelMapuiv, NULL, 252), - NAME_FUNC_OFFSET( 3040, glPixelMapusv, glPixelMapusv, NULL, 253), - NAME_FUNC_OFFSET( 3054, glReadBuffer, glReadBuffer, NULL, 254), - NAME_FUNC_OFFSET( 3067, glCopyPixels, glCopyPixels, NULL, 255), - NAME_FUNC_OFFSET( 3080, glReadPixels, glReadPixels, NULL, 256), - NAME_FUNC_OFFSET( 3093, glDrawPixels, glDrawPixels, NULL, 257), - NAME_FUNC_OFFSET( 3106, glGetBooleanv, glGetBooleanv, NULL, 258), - NAME_FUNC_OFFSET( 3120, glGetClipPlane, glGetClipPlane, NULL, 259), - NAME_FUNC_OFFSET( 3135, glGetDoublev, glGetDoublev, NULL, 260), - NAME_FUNC_OFFSET( 3148, glGetError, glGetError, NULL, 261), - NAME_FUNC_OFFSET( 3159, glGetFloatv, glGetFloatv, NULL, 262), - NAME_FUNC_OFFSET( 3171, glGetIntegerv, glGetIntegerv, NULL, 263), - NAME_FUNC_OFFSET( 3185, glGetLightfv, glGetLightfv, NULL, 264), - NAME_FUNC_OFFSET( 3198, glGetLightiv, glGetLightiv, NULL, 265), - NAME_FUNC_OFFSET( 3211, glGetMapdv, glGetMapdv, NULL, 266), - NAME_FUNC_OFFSET( 3222, glGetMapfv, glGetMapfv, NULL, 267), - NAME_FUNC_OFFSET( 3233, glGetMapiv, glGetMapiv, NULL, 268), - NAME_FUNC_OFFSET( 3244, glGetMaterialfv, glGetMaterialfv, NULL, 269), - NAME_FUNC_OFFSET( 3260, glGetMaterialiv, glGetMaterialiv, NULL, 270), - NAME_FUNC_OFFSET( 3276, glGetPixelMapfv, glGetPixelMapfv, NULL, 271), - NAME_FUNC_OFFSET( 3292, glGetPixelMapuiv, glGetPixelMapuiv, NULL, 272), - NAME_FUNC_OFFSET( 3309, glGetPixelMapusv, glGetPixelMapusv, NULL, 273), - NAME_FUNC_OFFSET( 3326, glGetPolygonStipple, glGetPolygonStipple, NULL, 274), - NAME_FUNC_OFFSET( 3346, glGetString, glGetString, NULL, 275), - NAME_FUNC_OFFSET( 3358, glGetTexEnvfv, glGetTexEnvfv, NULL, 276), - NAME_FUNC_OFFSET( 3372, glGetTexEnviv, glGetTexEnviv, NULL, 277), - NAME_FUNC_OFFSET( 3386, glGetTexGendv, glGetTexGendv, NULL, 278), - NAME_FUNC_OFFSET( 3400, glGetTexGenfv, glGetTexGenfv, NULL, 279), - NAME_FUNC_OFFSET( 3414, glGetTexGeniv, glGetTexGeniv, NULL, 280), - NAME_FUNC_OFFSET( 3428, glGetTexImage, glGetTexImage, NULL, 281), - NAME_FUNC_OFFSET( 3442, glGetTexParameterfv, glGetTexParameterfv, NULL, 282), - NAME_FUNC_OFFSET( 3462, glGetTexParameteriv, glGetTexParameteriv, NULL, 283), - NAME_FUNC_OFFSET( 3482, glGetTexLevelParameterfv, glGetTexLevelParameterfv, NULL, 284), - NAME_FUNC_OFFSET( 3507, glGetTexLevelParameteriv, glGetTexLevelParameteriv, NULL, 285), - NAME_FUNC_OFFSET( 3532, glIsEnabled, glIsEnabled, NULL, 286), - NAME_FUNC_OFFSET( 3544, glIsList, glIsList, NULL, 287), - NAME_FUNC_OFFSET( 3553, glDepthRange, glDepthRange, NULL, 288), - NAME_FUNC_OFFSET( 3566, glFrustum, glFrustum, NULL, 289), - NAME_FUNC_OFFSET( 3576, glLoadIdentity, glLoadIdentity, NULL, 290), - NAME_FUNC_OFFSET( 3591, glLoadMatrixf, glLoadMatrixf, NULL, 291), - NAME_FUNC_OFFSET( 3605, glLoadMatrixd, glLoadMatrixd, NULL, 292), - NAME_FUNC_OFFSET( 3619, glMatrixMode, glMatrixMode, NULL, 293), - NAME_FUNC_OFFSET( 3632, glMultMatrixf, glMultMatrixf, NULL, 294), - NAME_FUNC_OFFSET( 3646, glMultMatrixd, glMultMatrixd, NULL, 295), - NAME_FUNC_OFFSET( 3660, glOrtho, glOrtho, NULL, 296), - NAME_FUNC_OFFSET( 3668, glPopMatrix, glPopMatrix, NULL, 297), - NAME_FUNC_OFFSET( 3680, glPushMatrix, glPushMatrix, NULL, 298), - NAME_FUNC_OFFSET( 3693, glRotated, glRotated, NULL, 299), - NAME_FUNC_OFFSET( 3703, glRotatef, glRotatef, NULL, 300), - NAME_FUNC_OFFSET( 3713, glScaled, glScaled, NULL, 301), - NAME_FUNC_OFFSET( 3722, glScalef, glScalef, NULL, 302), - NAME_FUNC_OFFSET( 3731, glTranslated, glTranslated, NULL, 303), - NAME_FUNC_OFFSET( 3744, glTranslatef, glTranslatef, NULL, 304), - NAME_FUNC_OFFSET( 3757, glViewport, glViewport, NULL, 305), - NAME_FUNC_OFFSET( 3768, glArrayElement, glArrayElement, NULL, 306), - NAME_FUNC_OFFSET( 3783, glBindTexture, glBindTexture, NULL, 307), - NAME_FUNC_OFFSET( 3797, glColorPointer, glColorPointer, NULL, 308), - NAME_FUNC_OFFSET( 3812, glDisableClientState, glDisableClientState, NULL, 309), - NAME_FUNC_OFFSET( 3833, glDrawArrays, glDrawArrays, NULL, 310), - NAME_FUNC_OFFSET( 3846, glDrawElements, glDrawElements, NULL, 311), - NAME_FUNC_OFFSET( 3861, glEdgeFlagPointer, glEdgeFlagPointer, NULL, 312), - NAME_FUNC_OFFSET( 3879, glEnableClientState, glEnableClientState, NULL, 313), - NAME_FUNC_OFFSET( 3899, glIndexPointer, glIndexPointer, NULL, 314), - NAME_FUNC_OFFSET( 3914, glIndexub, glIndexub, NULL, 315), - NAME_FUNC_OFFSET( 3924, glIndexubv, glIndexubv, NULL, 316), - NAME_FUNC_OFFSET( 3935, glInterleavedArrays, glInterleavedArrays, NULL, 317), - NAME_FUNC_OFFSET( 3955, glNormalPointer, glNormalPointer, NULL, 318), - NAME_FUNC_OFFSET( 3971, glPolygonOffset, glPolygonOffset, NULL, 319), - NAME_FUNC_OFFSET( 3987, glTexCoordPointer, glTexCoordPointer, NULL, 320), - NAME_FUNC_OFFSET( 4005, glVertexPointer, glVertexPointer, NULL, 321), - NAME_FUNC_OFFSET( 4021, glAreTexturesResident, glAreTexturesResident, NULL, 322), - NAME_FUNC_OFFSET( 4043, glCopyTexImage1D, glCopyTexImage1D, NULL, 323), - NAME_FUNC_OFFSET( 4060, glCopyTexImage2D, glCopyTexImage2D, NULL, 324), - NAME_FUNC_OFFSET( 4077, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, 325), - NAME_FUNC_OFFSET( 4097, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, 326), - NAME_FUNC_OFFSET( 4117, glDeleteTextures, glDeleteTextures, NULL, 327), - NAME_FUNC_OFFSET( 4134, glGenTextures, glGenTextures, NULL, 328), - NAME_FUNC_OFFSET( 4148, glGetPointerv, glGetPointerv, NULL, 329), - NAME_FUNC_OFFSET( 4162, glIsTexture, glIsTexture, NULL, 330), - NAME_FUNC_OFFSET( 4174, glPrioritizeTextures, glPrioritizeTextures, NULL, 331), - NAME_FUNC_OFFSET( 4195, glTexSubImage1D, glTexSubImage1D, NULL, 332), - NAME_FUNC_OFFSET( 4211, glTexSubImage2D, glTexSubImage2D, NULL, 333), - NAME_FUNC_OFFSET( 4227, glPopClientAttrib, glPopClientAttrib, NULL, 334), - NAME_FUNC_OFFSET( 4245, glPushClientAttrib, glPushClientAttrib, NULL, 335), - NAME_FUNC_OFFSET( 4264, glBlendColor, glBlendColor, NULL, 336), - NAME_FUNC_OFFSET( 4277, glBlendEquation, glBlendEquation, NULL, 337), - NAME_FUNC_OFFSET( 4293, glDrawRangeElements, glDrawRangeElements, NULL, 338), - NAME_FUNC_OFFSET( 4313, glColorTable, glColorTable, NULL, 339), - NAME_FUNC_OFFSET( 4326, glColorTableParameterfv, glColorTableParameterfv, NULL, 340), - NAME_FUNC_OFFSET( 4350, glColorTableParameteriv, glColorTableParameteriv, NULL, 341), - NAME_FUNC_OFFSET( 4374, glCopyColorTable, glCopyColorTable, NULL, 342), - NAME_FUNC_OFFSET( 4391, glGetColorTable, glGetColorTable, NULL, 343), - NAME_FUNC_OFFSET( 4407, glGetColorTableParameterfv, glGetColorTableParameterfv, NULL, 344), - NAME_FUNC_OFFSET( 4434, glGetColorTableParameteriv, glGetColorTableParameteriv, NULL, 345), - NAME_FUNC_OFFSET( 4461, glColorSubTable, glColorSubTable, NULL, 346), - NAME_FUNC_OFFSET( 4477, glCopyColorSubTable, glCopyColorSubTable, NULL, 347), - NAME_FUNC_OFFSET( 4497, glConvolutionFilter1D, glConvolutionFilter1D, NULL, 348), - NAME_FUNC_OFFSET( 4519, glConvolutionFilter2D, glConvolutionFilter2D, NULL, 349), - NAME_FUNC_OFFSET( 4541, glConvolutionParameterf, glConvolutionParameterf, NULL, 350), - NAME_FUNC_OFFSET( 4565, glConvolutionParameterfv, glConvolutionParameterfv, NULL, 351), - NAME_FUNC_OFFSET( 4590, glConvolutionParameteri, glConvolutionParameteri, NULL, 352), - NAME_FUNC_OFFSET( 4614, glConvolutionParameteriv, glConvolutionParameteriv, NULL, 353), - NAME_FUNC_OFFSET( 4639, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, 354), - NAME_FUNC_OFFSET( 4665, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, 355), - NAME_FUNC_OFFSET( 4691, glGetConvolutionFilter, glGetConvolutionFilter, NULL, 356), - NAME_FUNC_OFFSET( 4714, glGetConvolutionParameterfv, glGetConvolutionParameterfv, NULL, 357), - NAME_FUNC_OFFSET( 4742, glGetConvolutionParameteriv, glGetConvolutionParameteriv, NULL, 358), - NAME_FUNC_OFFSET( 4770, glGetSeparableFilter, glGetSeparableFilter, NULL, 359), - NAME_FUNC_OFFSET( 4791, glSeparableFilter2D, glSeparableFilter2D, NULL, 360), - NAME_FUNC_OFFSET( 4811, glGetHistogram, glGetHistogram, NULL, 361), - NAME_FUNC_OFFSET( 4826, glGetHistogramParameterfv, glGetHistogramParameterfv, NULL, 362), - NAME_FUNC_OFFSET( 4852, glGetHistogramParameteriv, glGetHistogramParameteriv, NULL, 363), - NAME_FUNC_OFFSET( 4878, glGetMinmax, glGetMinmax, NULL, 364), - NAME_FUNC_OFFSET( 4890, glGetMinmaxParameterfv, glGetMinmaxParameterfv, NULL, 365), - NAME_FUNC_OFFSET( 4913, glGetMinmaxParameteriv, glGetMinmaxParameteriv, NULL, 366), - NAME_FUNC_OFFSET( 4936, glHistogram, glHistogram, NULL, 367), - NAME_FUNC_OFFSET( 4948, glMinmax, glMinmax, NULL, 368), - NAME_FUNC_OFFSET( 4957, glResetHistogram, glResetHistogram, NULL, 369), - NAME_FUNC_OFFSET( 4974, glResetMinmax, glResetMinmax, NULL, 370), - NAME_FUNC_OFFSET( 4988, glTexImage3D, glTexImage3D, NULL, 371), - NAME_FUNC_OFFSET( 5001, glTexSubImage3D, glTexSubImage3D, NULL, 372), - NAME_FUNC_OFFSET( 5017, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, 373), - NAME_FUNC_OFFSET( 5037, glActiveTextureARB, glActiveTextureARB, NULL, 374), - NAME_FUNC_OFFSET( 5056, glClientActiveTextureARB, glClientActiveTextureARB, NULL, 375), - NAME_FUNC_OFFSET( 5081, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, 376), - NAME_FUNC_OFFSET( 5102, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, 377), - NAME_FUNC_OFFSET( 5124, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, 378), - NAME_FUNC_OFFSET( 5145, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, 379), - NAME_FUNC_OFFSET( 5167, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, 380), - NAME_FUNC_OFFSET( 5188, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, 381), - NAME_FUNC_OFFSET( 5210, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, 382), - NAME_FUNC_OFFSET( 5231, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, 383), - NAME_FUNC_OFFSET( 5253, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, 384), - NAME_FUNC_OFFSET( 5274, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, 385), - NAME_FUNC_OFFSET( 5296, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, 386), - NAME_FUNC_OFFSET( 5317, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, 387), - NAME_FUNC_OFFSET( 5339, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, 388), - NAME_FUNC_OFFSET( 5360, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, 389), - NAME_FUNC_OFFSET( 5382, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, 390), - NAME_FUNC_OFFSET( 5403, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, 391), - NAME_FUNC_OFFSET( 5425, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, 392), - NAME_FUNC_OFFSET( 5446, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, 393), - NAME_FUNC_OFFSET( 5468, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, 394), - NAME_FUNC_OFFSET( 5489, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, 395), - NAME_FUNC_OFFSET( 5511, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, 396), - NAME_FUNC_OFFSET( 5532, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, 397), - NAME_FUNC_OFFSET( 5554, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, 398), - NAME_FUNC_OFFSET( 5575, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, 399), - NAME_FUNC_OFFSET( 5597, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, 400), - NAME_FUNC_OFFSET( 5618, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, 401), - NAME_FUNC_OFFSET( 5640, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, 402), - NAME_FUNC_OFFSET( 5661, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, 403), - NAME_FUNC_OFFSET( 5683, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, 404), - NAME_FUNC_OFFSET( 5704, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, 405), - NAME_FUNC_OFFSET( 5726, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, 406), - NAME_FUNC_OFFSET( 5747, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, 407), - NAME_FUNC_OFFSET( 5769, glAttachShader, glAttachShader, NULL, 408), - NAME_FUNC_OFFSET( 5784, glCreateProgram, glCreateProgram, NULL, 409), - NAME_FUNC_OFFSET( 5800, glCreateShader, glCreateShader, NULL, 410), - NAME_FUNC_OFFSET( 5815, glDeleteProgram, glDeleteProgram, NULL, 411), - NAME_FUNC_OFFSET( 5831, glDeleteShader, glDeleteShader, NULL, 412), - NAME_FUNC_OFFSET( 5846, glDetachShader, glDetachShader, NULL, 413), - NAME_FUNC_OFFSET( 5861, glGetAttachedShaders, glGetAttachedShaders, NULL, 414), - NAME_FUNC_OFFSET( 5882, glGetProgramInfoLog, glGetProgramInfoLog, NULL, 415), - NAME_FUNC_OFFSET( 5902, glGetProgramiv, glGetProgramiv, NULL, 416), - NAME_FUNC_OFFSET( 5917, glGetShaderInfoLog, glGetShaderInfoLog, NULL, 417), - NAME_FUNC_OFFSET( 5936, glGetShaderiv, glGetShaderiv, NULL, 418), - NAME_FUNC_OFFSET( 5950, glIsProgram, glIsProgram, NULL, 419), - NAME_FUNC_OFFSET( 5962, glIsShader, glIsShader, NULL, 420), - NAME_FUNC_OFFSET( 5973, glStencilFuncSeparate, glStencilFuncSeparate, NULL, 421), - NAME_FUNC_OFFSET( 5995, glStencilMaskSeparate, glStencilMaskSeparate, NULL, 422), - NAME_FUNC_OFFSET( 6017, glStencilOpSeparate, glStencilOpSeparate, NULL, 423), - NAME_FUNC_OFFSET( 6037, glUniformMatrix2x3fv, glUniformMatrix2x3fv, NULL, 424), - NAME_FUNC_OFFSET( 6058, glUniformMatrix2x4fv, glUniformMatrix2x4fv, NULL, 425), - NAME_FUNC_OFFSET( 6079, glUniformMatrix3x2fv, glUniformMatrix3x2fv, NULL, 426), - NAME_FUNC_OFFSET( 6100, glUniformMatrix3x4fv, glUniformMatrix3x4fv, NULL, 427), - NAME_FUNC_OFFSET( 6121, glUniformMatrix4x2fv, glUniformMatrix4x2fv, NULL, 428), - NAME_FUNC_OFFSET( 6142, glUniformMatrix4x3fv, glUniformMatrix4x3fv, NULL, 429), - NAME_FUNC_OFFSET( 6163, glClampColor, glClampColor, NULL, 430), - NAME_FUNC_OFFSET( 6176, glClearBufferfi, glClearBufferfi, NULL, 431), - NAME_FUNC_OFFSET( 6192, glClearBufferfv, glClearBufferfv, NULL, 432), - NAME_FUNC_OFFSET( 6208, glClearBufferiv, glClearBufferiv, NULL, 433), - NAME_FUNC_OFFSET( 6224, glClearBufferuiv, glClearBufferuiv, NULL, 434), - NAME_FUNC_OFFSET( 6241, glGetStringi, glGetStringi, NULL, 435), - NAME_FUNC_OFFSET( 6254, glTexBuffer, glTexBuffer, NULL, 436), - NAME_FUNC_OFFSET( 6266, glFramebufferTexture, glFramebufferTexture, NULL, 437), - NAME_FUNC_OFFSET( 6287, glGetBufferParameteri64v, glGetBufferParameteri64v, NULL, 438), - NAME_FUNC_OFFSET( 6312, glGetInteger64i_v, glGetInteger64i_v, NULL, 439), - NAME_FUNC_OFFSET( 6330, glVertexAttribDivisor, glVertexAttribDivisor, NULL, 440), - NAME_FUNC_OFFSET( 6352, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, 441), - NAME_FUNC_OFFSET( 6378, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, 442), - NAME_FUNC_OFFSET( 6404, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, 443), - NAME_FUNC_OFFSET( 6430, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, 444), - NAME_FUNC_OFFSET( 6456, glSampleCoverageARB, glSampleCoverageARB, NULL, 445), - NAME_FUNC_OFFSET( 6476, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, 446), - NAME_FUNC_OFFSET( 6502, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, 447), - NAME_FUNC_OFFSET( 6528, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, 448), - NAME_FUNC_OFFSET( 6554, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, 449), - NAME_FUNC_OFFSET( 6583, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, 450), - NAME_FUNC_OFFSET( 6612, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, 451), - NAME_FUNC_OFFSET( 6641, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, 452), - NAME_FUNC_OFFSET( 6668, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, 453), - NAME_FUNC_OFFSET( 6698, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, 454), - NAME_FUNC_OFFSET( 6727, glGetProgramEnvParameterdvARB, glGetProgramEnvParameterdvARB, NULL, 455), - NAME_FUNC_OFFSET( 6757, glGetProgramEnvParameterfvARB, glGetProgramEnvParameterfvARB, NULL, 456), - NAME_FUNC_OFFSET( 6787, glGetProgramLocalParameterdvARB, glGetProgramLocalParameterdvARB, NULL, 457), - NAME_FUNC_OFFSET( 6819, glGetProgramLocalParameterfvARB, glGetProgramLocalParameterfvARB, NULL, 458), - NAME_FUNC_OFFSET( 6851, glGetProgramStringARB, glGetProgramStringARB, NULL, 459), - NAME_FUNC_OFFSET( 6873, glGetProgramivARB, glGetProgramivARB, NULL, 460), - NAME_FUNC_OFFSET( 6891, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, 461), - NAME_FUNC_OFFSET( 6914, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, 462), - NAME_FUNC_OFFSET( 6937, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, 463), - NAME_FUNC_OFFSET( 6960, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, 464), - NAME_FUNC_OFFSET( 6987, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, 465), - NAME_FUNC_OFFSET( 7015, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, 466), - NAME_FUNC_OFFSET( 7042, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, 467), - NAME_FUNC_OFFSET( 7070, glProgramLocalParameter4dARB, glProgramLocalParameter4dARB, NULL, 468), - NAME_FUNC_OFFSET( 7099, glProgramLocalParameter4dvARB, glProgramLocalParameter4dvARB, NULL, 469), - NAME_FUNC_OFFSET( 7129, glProgramLocalParameter4fARB, glProgramLocalParameter4fARB, NULL, 470), - NAME_FUNC_OFFSET( 7158, glProgramLocalParameter4fvARB, glProgramLocalParameter4fvARB, NULL, 471), - NAME_FUNC_OFFSET( 7188, glProgramStringARB, glProgramStringARB, NULL, 472), - NAME_FUNC_OFFSET( 7207, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, 473), - NAME_FUNC_OFFSET( 7227, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, 474), - NAME_FUNC_OFFSET( 7248, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, 475), - NAME_FUNC_OFFSET( 7268, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, 476), - NAME_FUNC_OFFSET( 7289, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, 477), - NAME_FUNC_OFFSET( 7309, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, 478), - NAME_FUNC_OFFSET( 7330, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, 479), - NAME_FUNC_OFFSET( 7350, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, 480), - NAME_FUNC_OFFSET( 7371, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, 481), - NAME_FUNC_OFFSET( 7391, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, 482), - NAME_FUNC_OFFSET( 7412, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, 483), - NAME_FUNC_OFFSET( 7432, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, 484), - NAME_FUNC_OFFSET( 7453, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, 485), - NAME_FUNC_OFFSET( 7473, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, 486), - NAME_FUNC_OFFSET( 7494, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, 487), - NAME_FUNC_OFFSET( 7514, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, 488), - NAME_FUNC_OFFSET( 7535, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, 489), - NAME_FUNC_OFFSET( 7555, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, 490), - NAME_FUNC_OFFSET( 7576, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, 491), - NAME_FUNC_OFFSET( 7598, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, 492), - NAME_FUNC_OFFSET( 7620, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, 493), - NAME_FUNC_OFFSET( 7642, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, 494), - NAME_FUNC_OFFSET( 7664, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, 495), - NAME_FUNC_OFFSET( 7687, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, 496), - NAME_FUNC_OFFSET( 7710, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, 497), - NAME_FUNC_OFFSET( 7733, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, 498), - NAME_FUNC_OFFSET( 7754, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, 499), - NAME_FUNC_OFFSET( 7774, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, 500), - NAME_FUNC_OFFSET( 7795, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, 501), - NAME_FUNC_OFFSET( 7815, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, 502), - NAME_FUNC_OFFSET( 7836, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, 503), - NAME_FUNC_OFFSET( 7857, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, 504), - NAME_FUNC_OFFSET( 7877, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, 505), - NAME_FUNC_OFFSET( 7898, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, 506), - NAME_FUNC_OFFSET( 7920, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, 507), - NAME_FUNC_OFFSET( 7942, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, 508), - NAME_FUNC_OFFSET( 7964, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, 509), - NAME_FUNC_OFFSET( 7989, glBindBufferARB, glBindBufferARB, NULL, 510), - NAME_FUNC_OFFSET( 8005, glBufferDataARB, glBufferDataARB, NULL, 511), - NAME_FUNC_OFFSET( 8021, glBufferSubDataARB, glBufferSubDataARB, NULL, 512), - NAME_FUNC_OFFSET( 8040, glDeleteBuffersARB, glDeleteBuffersARB, NULL, 513), - NAME_FUNC_OFFSET( 8059, glGenBuffersARB, glGenBuffersARB, NULL, 514), - NAME_FUNC_OFFSET( 8075, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, 515), - NAME_FUNC_OFFSET( 8101, glGetBufferPointervARB, glGetBufferPointervARB, NULL, 516), - NAME_FUNC_OFFSET( 8124, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, 517), - NAME_FUNC_OFFSET( 8146, glIsBufferARB, glIsBufferARB, NULL, 518), - NAME_FUNC_OFFSET( 8160, glMapBufferARB, glMapBufferARB, NULL, 519), - NAME_FUNC_OFFSET( 8175, glUnmapBufferARB, glUnmapBufferARB, NULL, 520), - NAME_FUNC_OFFSET( 8192, glBeginQueryARB, glBeginQueryARB, NULL, 521), - NAME_FUNC_OFFSET( 8208, glDeleteQueriesARB, glDeleteQueriesARB, NULL, 522), - NAME_FUNC_OFFSET( 8227, glEndQueryARB, glEndQueryARB, NULL, 523), - NAME_FUNC_OFFSET( 8241, glGenQueriesARB, glGenQueriesARB, NULL, 524), - NAME_FUNC_OFFSET( 8257, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, 525), - NAME_FUNC_OFFSET( 8279, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, 526), - NAME_FUNC_OFFSET( 8302, glGetQueryivARB, glGetQueryivARB, NULL, 527), - NAME_FUNC_OFFSET( 8318, glIsQueryARB, glIsQueryARB, NULL, 528), - NAME_FUNC_OFFSET( 8331, glAttachObjectARB, glAttachObjectARB, NULL, 529), - NAME_FUNC_OFFSET( 8349, glCompileShaderARB, glCompileShaderARB, NULL, 530), - NAME_FUNC_OFFSET( 8368, glCreateProgramObjectARB, glCreateProgramObjectARB, NULL, 531), - NAME_FUNC_OFFSET( 8393, glCreateShaderObjectARB, glCreateShaderObjectARB, NULL, 532), - NAME_FUNC_OFFSET( 8417, glDeleteObjectARB, glDeleteObjectARB, NULL, 533), - NAME_FUNC_OFFSET( 8435, glDetachObjectARB, glDetachObjectARB, NULL, 534), - NAME_FUNC_OFFSET( 8453, glGetActiveUniformARB, glGetActiveUniformARB, NULL, 535), - NAME_FUNC_OFFSET( 8475, glGetAttachedObjectsARB, glGetAttachedObjectsARB, NULL, 536), - NAME_FUNC_OFFSET( 8499, glGetHandleARB, glGetHandleARB, NULL, 537), - NAME_FUNC_OFFSET( 8514, glGetInfoLogARB, glGetInfoLogARB, NULL, 538), - NAME_FUNC_OFFSET( 8530, glGetObjectParameterfvARB, glGetObjectParameterfvARB, NULL, 539), - NAME_FUNC_OFFSET( 8556, glGetObjectParameterivARB, glGetObjectParameterivARB, NULL, 540), - NAME_FUNC_OFFSET( 8582, glGetShaderSourceARB, glGetShaderSourceARB, NULL, 541), - NAME_FUNC_OFFSET( 8603, glGetUniformLocationARB, glGetUniformLocationARB, NULL, 542), - NAME_FUNC_OFFSET( 8627, glGetUniformfvARB, glGetUniformfvARB, NULL, 543), - NAME_FUNC_OFFSET( 8645, glGetUniformivARB, glGetUniformivARB, NULL, 544), - NAME_FUNC_OFFSET( 8663, glLinkProgramARB, glLinkProgramARB, NULL, 545), - NAME_FUNC_OFFSET( 8680, glShaderSourceARB, glShaderSourceARB, NULL, 546), - NAME_FUNC_OFFSET( 8698, glUniform1fARB, glUniform1fARB, NULL, 547), - NAME_FUNC_OFFSET( 8713, glUniform1fvARB, glUniform1fvARB, NULL, 548), - NAME_FUNC_OFFSET( 8729, glUniform1iARB, glUniform1iARB, NULL, 549), - NAME_FUNC_OFFSET( 8744, glUniform1ivARB, glUniform1ivARB, NULL, 550), - NAME_FUNC_OFFSET( 8760, glUniform2fARB, glUniform2fARB, NULL, 551), - NAME_FUNC_OFFSET( 8775, glUniform2fvARB, glUniform2fvARB, NULL, 552), - NAME_FUNC_OFFSET( 8791, glUniform2iARB, glUniform2iARB, NULL, 553), - NAME_FUNC_OFFSET( 8806, glUniform2ivARB, glUniform2ivARB, NULL, 554), - NAME_FUNC_OFFSET( 8822, glUniform3fARB, glUniform3fARB, NULL, 555), - NAME_FUNC_OFFSET( 8837, glUniform3fvARB, glUniform3fvARB, NULL, 556), - NAME_FUNC_OFFSET( 8853, glUniform3iARB, glUniform3iARB, NULL, 557), - NAME_FUNC_OFFSET( 8868, glUniform3ivARB, glUniform3ivARB, NULL, 558), - NAME_FUNC_OFFSET( 8884, glUniform4fARB, glUniform4fARB, NULL, 559), - NAME_FUNC_OFFSET( 8899, glUniform4fvARB, glUniform4fvARB, NULL, 560), - NAME_FUNC_OFFSET( 8915, glUniform4iARB, glUniform4iARB, NULL, 561), - NAME_FUNC_OFFSET( 8930, glUniform4ivARB, glUniform4ivARB, NULL, 562), - NAME_FUNC_OFFSET( 8946, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, 563), - NAME_FUNC_OFFSET( 8968, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, 564), - NAME_FUNC_OFFSET( 8990, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, 565), - NAME_FUNC_OFFSET( 9012, glUseProgramObjectARB, glUseProgramObjectARB, NULL, 566), - NAME_FUNC_OFFSET( 9034, glValidateProgramARB, glValidateProgramARB, NULL, 567), - NAME_FUNC_OFFSET( 9055, glBindAttribLocationARB, glBindAttribLocationARB, NULL, 568), - NAME_FUNC_OFFSET( 9079, glGetActiveAttribARB, glGetActiveAttribARB, NULL, 569), - NAME_FUNC_OFFSET( 9100, glGetAttribLocationARB, glGetAttribLocationARB, NULL, 570), - NAME_FUNC_OFFSET( 9123, glDrawBuffersARB, glDrawBuffersARB, NULL, 571), - NAME_FUNC_OFFSET( 9140, glClampColorARB, glClampColorARB, NULL, 572), - NAME_FUNC_OFFSET( 9156, glDrawArraysInstancedARB, glDrawArraysInstancedARB, NULL, 573), - NAME_FUNC_OFFSET( 9181, glDrawElementsInstancedARB, glDrawElementsInstancedARB, NULL, 574), - NAME_FUNC_OFFSET( 9208, glRenderbufferStorageMultisample, glRenderbufferStorageMultisample, NULL, 575), - NAME_FUNC_OFFSET( 9241, glFramebufferTextureARB, glFramebufferTextureARB, NULL, 576), - NAME_FUNC_OFFSET( 9265, glFramebufferTextureFaceARB, glFramebufferTextureFaceARB, NULL, 577), - NAME_FUNC_OFFSET( 9293, glProgramParameteriARB, glProgramParameteriARB, NULL, 578), - NAME_FUNC_OFFSET( 9316, glVertexAttribDivisorARB, glVertexAttribDivisorARB, NULL, 579), - NAME_FUNC_OFFSET( 9341, glFlushMappedBufferRange, glFlushMappedBufferRange, NULL, 580), - NAME_FUNC_OFFSET( 9366, glMapBufferRange, glMapBufferRange, NULL, 581), - NAME_FUNC_OFFSET( 9383, glTexBufferARB, glTexBufferARB, NULL, 582), - NAME_FUNC_OFFSET( 9398, glBindVertexArray, glBindVertexArray, NULL, 583), - NAME_FUNC_OFFSET( 9416, glGenVertexArrays, glGenVertexArrays, NULL, 584), - NAME_FUNC_OFFSET( 9434, glCopyBufferSubData, glCopyBufferSubData, NULL, 585), - NAME_FUNC_OFFSET( 9454, glClientWaitSync, glClientWaitSync, NULL, 586), - NAME_FUNC_OFFSET( 9471, glDeleteSync, glDeleteSync, NULL, 587), - NAME_FUNC_OFFSET( 9484, glFenceSync, glFenceSync, NULL, 588), - NAME_FUNC_OFFSET( 9496, glGetInteger64v, glGetInteger64v, NULL, 589), - NAME_FUNC_OFFSET( 9512, glGetSynciv, glGetSynciv, NULL, 590), - NAME_FUNC_OFFSET( 9524, glIsSync, glIsSync, NULL, 591), - NAME_FUNC_OFFSET( 9533, glWaitSync, glWaitSync, NULL, 592), - NAME_FUNC_OFFSET( 9544, glDrawElementsBaseVertex, glDrawElementsBaseVertex, NULL, 593), - NAME_FUNC_OFFSET( 9569, glDrawElementsInstancedBaseVertex, glDrawElementsInstancedBaseVertex, NULL, 594), - NAME_FUNC_OFFSET( 9603, glDrawRangeElementsBaseVertex, glDrawRangeElementsBaseVertex, NULL, 595), - NAME_FUNC_OFFSET( 9633, glMultiDrawElementsBaseVertex, glMultiDrawElementsBaseVertex, NULL, 596), - NAME_FUNC_OFFSET( 9663, glBlendEquationSeparateiARB, glBlendEquationSeparateiARB, NULL, 597), - NAME_FUNC_OFFSET( 9691, glBlendEquationiARB, glBlendEquationiARB, NULL, 598), - NAME_FUNC_OFFSET( 9711, glBlendFuncSeparateiARB, glBlendFuncSeparateiARB, NULL, 599), - NAME_FUNC_OFFSET( 9735, glBlendFunciARB, glBlendFunciARB, NULL, 600), - NAME_FUNC_OFFSET( 9751, glBindSampler, glBindSampler, NULL, 601), - NAME_FUNC_OFFSET( 9765, glDeleteSamplers, glDeleteSamplers, NULL, 602), - NAME_FUNC_OFFSET( 9782, glGenSamplers, glGenSamplers, NULL, 603), - NAME_FUNC_OFFSET( 9796, glGetSamplerParameterIiv, glGetSamplerParameterIiv, NULL, 604), - NAME_FUNC_OFFSET( 9821, glGetSamplerParameterIuiv, glGetSamplerParameterIuiv, NULL, 605), - NAME_FUNC_OFFSET( 9847, glGetSamplerParameterfv, glGetSamplerParameterfv, NULL, 606), - NAME_FUNC_OFFSET( 9871, glGetSamplerParameteriv, glGetSamplerParameteriv, NULL, 607), - NAME_FUNC_OFFSET( 9895, glIsSampler, glIsSampler, NULL, 608), - NAME_FUNC_OFFSET( 9907, glSamplerParameterIiv, glSamplerParameterIiv, NULL, 609), - NAME_FUNC_OFFSET( 9929, glSamplerParameterIuiv, glSamplerParameterIuiv, NULL, 610), - NAME_FUNC_OFFSET( 9952, glSamplerParameterf, glSamplerParameterf, NULL, 611), - NAME_FUNC_OFFSET( 9972, glSamplerParameterfv, glSamplerParameterfv, NULL, 612), - NAME_FUNC_OFFSET( 9993, glSamplerParameteri, glSamplerParameteri, NULL, 613), - NAME_FUNC_OFFSET(10013, glSamplerParameteriv, glSamplerParameteriv, NULL, 614), - NAME_FUNC_OFFSET(10034, glColorP3ui, glColorP3ui, NULL, 615), - NAME_FUNC_OFFSET(10046, glColorP3uiv, glColorP3uiv, NULL, 616), - NAME_FUNC_OFFSET(10059, glColorP4ui, glColorP4ui, NULL, 617), - NAME_FUNC_OFFSET(10071, glColorP4uiv, glColorP4uiv, NULL, 618), - NAME_FUNC_OFFSET(10084, glMultiTexCoordP1ui, glMultiTexCoordP1ui, NULL, 619), - NAME_FUNC_OFFSET(10104, glMultiTexCoordP1uiv, glMultiTexCoordP1uiv, NULL, 620), - NAME_FUNC_OFFSET(10125, glMultiTexCoordP2ui, glMultiTexCoordP2ui, NULL, 621), - NAME_FUNC_OFFSET(10145, glMultiTexCoordP2uiv, glMultiTexCoordP2uiv, NULL, 622), - NAME_FUNC_OFFSET(10166, glMultiTexCoordP3ui, glMultiTexCoordP3ui, NULL, 623), - NAME_FUNC_OFFSET(10186, glMultiTexCoordP3uiv, glMultiTexCoordP3uiv, NULL, 624), - NAME_FUNC_OFFSET(10207, glMultiTexCoordP4ui, glMultiTexCoordP4ui, NULL, 625), - NAME_FUNC_OFFSET(10227, glMultiTexCoordP4uiv, glMultiTexCoordP4uiv, NULL, 626), - NAME_FUNC_OFFSET(10248, glNormalP3ui, glNormalP3ui, NULL, 627), - NAME_FUNC_OFFSET(10261, glNormalP3uiv, glNormalP3uiv, NULL, 628), - NAME_FUNC_OFFSET(10275, glSecondaryColorP3ui, glSecondaryColorP3ui, NULL, 629), - NAME_FUNC_OFFSET(10296, glSecondaryColorP3uiv, glSecondaryColorP3uiv, NULL, 630), - NAME_FUNC_OFFSET(10318, glTexCoordP1ui, glTexCoordP1ui, NULL, 631), - NAME_FUNC_OFFSET(10333, glTexCoordP1uiv, glTexCoordP1uiv, NULL, 632), - NAME_FUNC_OFFSET(10349, glTexCoordP2ui, glTexCoordP2ui, NULL, 633), - NAME_FUNC_OFFSET(10364, glTexCoordP2uiv, glTexCoordP2uiv, NULL, 634), - NAME_FUNC_OFFSET(10380, glTexCoordP3ui, glTexCoordP3ui, NULL, 635), - NAME_FUNC_OFFSET(10395, glTexCoordP3uiv, glTexCoordP3uiv, NULL, 636), - NAME_FUNC_OFFSET(10411, glTexCoordP4ui, glTexCoordP4ui, NULL, 637), - NAME_FUNC_OFFSET(10426, glTexCoordP4uiv, glTexCoordP4uiv, NULL, 638), - NAME_FUNC_OFFSET(10442, glVertexAttribP1ui, glVertexAttribP1ui, NULL, 639), - NAME_FUNC_OFFSET(10461, glVertexAttribP1uiv, glVertexAttribP1uiv, NULL, 640), - NAME_FUNC_OFFSET(10481, glVertexAttribP2ui, glVertexAttribP2ui, NULL, 641), - NAME_FUNC_OFFSET(10500, glVertexAttribP2uiv, glVertexAttribP2uiv, NULL, 642), - NAME_FUNC_OFFSET(10520, glVertexAttribP3ui, glVertexAttribP3ui, NULL, 643), - NAME_FUNC_OFFSET(10539, glVertexAttribP3uiv, glVertexAttribP3uiv, NULL, 644), - NAME_FUNC_OFFSET(10559, glVertexAttribP4ui, glVertexAttribP4ui, NULL, 645), - NAME_FUNC_OFFSET(10578, glVertexAttribP4uiv, glVertexAttribP4uiv, NULL, 646), - NAME_FUNC_OFFSET(10598, glVertexP2ui, glVertexP2ui, NULL, 647), - NAME_FUNC_OFFSET(10611, glVertexP2uiv, glVertexP2uiv, NULL, 648), - NAME_FUNC_OFFSET(10625, glVertexP3ui, glVertexP3ui, NULL, 649), - NAME_FUNC_OFFSET(10638, glVertexP3uiv, glVertexP3uiv, NULL, 650), - NAME_FUNC_OFFSET(10652, glVertexP4ui, glVertexP4ui, NULL, 651), - NAME_FUNC_OFFSET(10665, glVertexP4uiv, glVertexP4uiv, NULL, 652), - NAME_FUNC_OFFSET(10679, glBindTransformFeedback, glBindTransformFeedback, NULL, 653), - NAME_FUNC_OFFSET(10703, glDeleteTransformFeedbacks, glDeleteTransformFeedbacks, NULL, 654), - NAME_FUNC_OFFSET(10730, glDrawTransformFeedback, glDrawTransformFeedback, NULL, 655), - NAME_FUNC_OFFSET(10754, glGenTransformFeedbacks, glGenTransformFeedbacks, NULL, 656), - NAME_FUNC_OFFSET(10778, glIsTransformFeedback, glIsTransformFeedback, NULL, 657), - NAME_FUNC_OFFSET(10800, glPauseTransformFeedback, glPauseTransformFeedback, NULL, 658), - NAME_FUNC_OFFSET(10825, glResumeTransformFeedback, glResumeTransformFeedback, NULL, 659), - NAME_FUNC_OFFSET(10851, glClearDepthf, glClearDepthf, NULL, 660), - NAME_FUNC_OFFSET(10865, glDepthRangef, glDepthRangef, NULL, 661), - NAME_FUNC_OFFSET(10879, glGetShaderPrecisionFormat, glGetShaderPrecisionFormat, NULL, 662), - NAME_FUNC_OFFSET(10906, glReleaseShaderCompiler, glReleaseShaderCompiler, NULL, 663), - NAME_FUNC_OFFSET(10930, glShaderBinary, glShaderBinary, NULL, 664), - NAME_FUNC_OFFSET(10945, glGetGraphicsResetStatusARB, glGetGraphicsResetStatusARB, NULL, 665), - NAME_FUNC_OFFSET(10973, glGetnColorTableARB, glGetnColorTableARB, NULL, 666), - NAME_FUNC_OFFSET(10993, glGetnCompressedTexImageARB, glGetnCompressedTexImageARB, NULL, 667), - NAME_FUNC_OFFSET(11021, glGetnConvolutionFilterARB, glGetnConvolutionFilterARB, NULL, 668), - NAME_FUNC_OFFSET(11048, glGetnHistogramARB, glGetnHistogramARB, NULL, 669), - NAME_FUNC_OFFSET(11067, glGetnMapdvARB, glGetnMapdvARB, NULL, 670), - NAME_FUNC_OFFSET(11082, glGetnMapfvARB, glGetnMapfvARB, NULL, 671), - NAME_FUNC_OFFSET(11097, glGetnMapivARB, glGetnMapivARB, NULL, 672), - NAME_FUNC_OFFSET(11112, glGetnMinmaxARB, glGetnMinmaxARB, NULL, 673), - NAME_FUNC_OFFSET(11128, glGetnPixelMapfvARB, glGetnPixelMapfvARB, NULL, 674), - NAME_FUNC_OFFSET(11148, glGetnPixelMapuivARB, glGetnPixelMapuivARB, NULL, 675), - NAME_FUNC_OFFSET(11169, glGetnPixelMapusvARB, glGetnPixelMapusvARB, NULL, 676), - NAME_FUNC_OFFSET(11190, glGetnPolygonStippleARB, glGetnPolygonStippleARB, NULL, 677), - NAME_FUNC_OFFSET(11214, glGetnSeparableFilterARB, glGetnSeparableFilterARB, NULL, 678), - NAME_FUNC_OFFSET(11239, glGetnTexImageARB, glGetnTexImageARB, NULL, 679), - NAME_FUNC_OFFSET(11257, glGetnUniformdvARB, glGetnUniformdvARB, NULL, 680), - NAME_FUNC_OFFSET(11276, glGetnUniformfvARB, glGetnUniformfvARB, NULL, 681), - NAME_FUNC_OFFSET(11295, glGetnUniformivARB, glGetnUniformivARB, NULL, 682), - NAME_FUNC_OFFSET(11314, glGetnUniformuivARB, glGetnUniformuivARB, NULL, 683), - NAME_FUNC_OFFSET(11334, glReadnPixelsARB, glReadnPixelsARB, NULL, 684), - NAME_FUNC_OFFSET(11351, glTexStorage1D, glTexStorage1D, NULL, 685), - NAME_FUNC_OFFSET(11366, glTexStorage2D, glTexStorage2D, NULL, 686), - NAME_FUNC_OFFSET(11381, glTexStorage3D, glTexStorage3D, NULL, 687), - NAME_FUNC_OFFSET(11396, glTextureStorage1DEXT, glTextureStorage1DEXT, NULL, 688), - NAME_FUNC_OFFSET(11418, glTextureStorage2DEXT, glTextureStorage2DEXT, NULL, 689), - NAME_FUNC_OFFSET(11440, glTextureStorage3DEXT, glTextureStorage3DEXT, NULL, 690), - NAME_FUNC_OFFSET(11462, glPolygonOffsetEXT, glPolygonOffsetEXT, NULL, 691), - NAME_FUNC_OFFSET(11481, gl_dispatch_stub_692, gl_dispatch_stub_692, NULL, 692), - NAME_FUNC_OFFSET(11513, gl_dispatch_stub_693, gl_dispatch_stub_693, NULL, 693), - NAME_FUNC_OFFSET(11545, gl_dispatch_stub_694, gl_dispatch_stub_694, NULL, 694), - NAME_FUNC_OFFSET(11573, gl_dispatch_stub_695, gl_dispatch_stub_695, NULL, 695), - NAME_FUNC_OFFSET(11602, gl_dispatch_stub_696, gl_dispatch_stub_696, NULL, 696), - NAME_FUNC_OFFSET(11630, gl_dispatch_stub_697, gl_dispatch_stub_697, NULL, 697), - NAME_FUNC_OFFSET(11659, gl_dispatch_stub_698, gl_dispatch_stub_698, NULL, 698), - NAME_FUNC_OFFSET(11676, gl_dispatch_stub_699, gl_dispatch_stub_699, NULL, 699), - NAME_FUNC_OFFSET(11696, glColorPointerEXT, glColorPointerEXT, NULL, 700), - NAME_FUNC_OFFSET(11714, glEdgeFlagPointerEXT, glEdgeFlagPointerEXT, NULL, 701), - NAME_FUNC_OFFSET(11735, glIndexPointerEXT, glIndexPointerEXT, NULL, 702), - NAME_FUNC_OFFSET(11753, glNormalPointerEXT, glNormalPointerEXT, NULL, 703), - NAME_FUNC_OFFSET(11772, glTexCoordPointerEXT, glTexCoordPointerEXT, NULL, 704), - NAME_FUNC_OFFSET(11793, glVertexPointerEXT, glVertexPointerEXT, NULL, 705), - NAME_FUNC_OFFSET(11812, glPointParameterfEXT, glPointParameterfEXT, NULL, 706), - NAME_FUNC_OFFSET(11833, glPointParameterfvEXT, glPointParameterfvEXT, NULL, 707), - NAME_FUNC_OFFSET(11855, glLockArraysEXT, glLockArraysEXT, NULL, 708), - NAME_FUNC_OFFSET(11871, glUnlockArraysEXT, glUnlockArraysEXT, NULL, 709), - NAME_FUNC_OFFSET(11889, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, 710), - NAME_FUNC_OFFSET(11911, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, 711), - NAME_FUNC_OFFSET(11934, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, 712), - NAME_FUNC_OFFSET(11956, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, 713), - NAME_FUNC_OFFSET(11979, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, 714), - NAME_FUNC_OFFSET(12001, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, 715), - NAME_FUNC_OFFSET(12024, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, 716), - NAME_FUNC_OFFSET(12046, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, 717), - NAME_FUNC_OFFSET(12069, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, 718), - NAME_FUNC_OFFSET(12091, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, 719), - NAME_FUNC_OFFSET(12114, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, 720), - NAME_FUNC_OFFSET(12137, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, 721), - NAME_FUNC_OFFSET(12161, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, 722), - NAME_FUNC_OFFSET(12184, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, 723), - NAME_FUNC_OFFSET(12208, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, 724), - NAME_FUNC_OFFSET(12231, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, 725), - NAME_FUNC_OFFSET(12255, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, 726), - NAME_FUNC_OFFSET(12282, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, 727), - NAME_FUNC_OFFSET(12303, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, 728), - NAME_FUNC_OFFSET(12326, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, 729), - NAME_FUNC_OFFSET(12347, glFogCoorddEXT, glFogCoorddEXT, NULL, 730), - NAME_FUNC_OFFSET(12362, glFogCoorddvEXT, glFogCoorddvEXT, NULL, 731), - NAME_FUNC_OFFSET(12378, glFogCoordfEXT, glFogCoordfEXT, NULL, 732), - NAME_FUNC_OFFSET(12393, glFogCoordfvEXT, glFogCoordfvEXT, NULL, 733), - NAME_FUNC_OFFSET(12409, gl_dispatch_stub_734, gl_dispatch_stub_734, NULL, 734), - NAME_FUNC_OFFSET(12427, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, 735), - NAME_FUNC_OFFSET(12450, glFlushVertexArrayRangeNV, glFlushVertexArrayRangeNV, NULL, 736), - NAME_FUNC_OFFSET(12476, glVertexArrayRangeNV, glVertexArrayRangeNV, NULL, 737), - NAME_FUNC_OFFSET(12497, glCombinerInputNV, glCombinerInputNV, NULL, 738), - NAME_FUNC_OFFSET(12515, glCombinerOutputNV, glCombinerOutputNV, NULL, 739), - NAME_FUNC_OFFSET(12534, glCombinerParameterfNV, glCombinerParameterfNV, NULL, 740), - NAME_FUNC_OFFSET(12557, glCombinerParameterfvNV, glCombinerParameterfvNV, NULL, 741), - NAME_FUNC_OFFSET(12581, glCombinerParameteriNV, glCombinerParameteriNV, NULL, 742), - NAME_FUNC_OFFSET(12604, glCombinerParameterivNV, glCombinerParameterivNV, NULL, 743), - NAME_FUNC_OFFSET(12628, glFinalCombinerInputNV, glFinalCombinerInputNV, NULL, 744), - NAME_FUNC_OFFSET(12651, glGetCombinerInputParameterfvNV, glGetCombinerInputParameterfvNV, NULL, 745), - NAME_FUNC_OFFSET(12683, glGetCombinerInputParameterivNV, glGetCombinerInputParameterivNV, NULL, 746), - NAME_FUNC_OFFSET(12715, glGetCombinerOutputParameterfvNV, glGetCombinerOutputParameterfvNV, NULL, 747), - NAME_FUNC_OFFSET(12748, glGetCombinerOutputParameterivNV, glGetCombinerOutputParameterivNV, NULL, 748), - NAME_FUNC_OFFSET(12781, glGetFinalCombinerInputParameterfvNV, glGetFinalCombinerInputParameterfvNV, NULL, 749), - NAME_FUNC_OFFSET(12818, glGetFinalCombinerInputParameterivNV, glGetFinalCombinerInputParameterivNV, NULL, 750), - NAME_FUNC_OFFSET(12855, glResizeBuffersMESA, glResizeBuffersMESA, NULL, 751), - NAME_FUNC_OFFSET(12875, glWindowPos2dMESA, glWindowPos2dMESA, NULL, 752), - NAME_FUNC_OFFSET(12893, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, 753), - NAME_FUNC_OFFSET(12912, glWindowPos2fMESA, glWindowPos2fMESA, NULL, 754), - NAME_FUNC_OFFSET(12930, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, 755), - NAME_FUNC_OFFSET(12949, glWindowPos2iMESA, glWindowPos2iMESA, NULL, 756), - NAME_FUNC_OFFSET(12967, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, 757), - NAME_FUNC_OFFSET(12986, glWindowPos2sMESA, glWindowPos2sMESA, NULL, 758), - NAME_FUNC_OFFSET(13004, glWindowPos2svMESA, glWindowPos2svMESA, NULL, 759), - NAME_FUNC_OFFSET(13023, glWindowPos3dMESA, glWindowPos3dMESA, NULL, 760), - NAME_FUNC_OFFSET(13041, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, 761), - NAME_FUNC_OFFSET(13060, glWindowPos3fMESA, glWindowPos3fMESA, NULL, 762), - NAME_FUNC_OFFSET(13078, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, 763), - NAME_FUNC_OFFSET(13097, glWindowPos3iMESA, glWindowPos3iMESA, NULL, 764), - NAME_FUNC_OFFSET(13115, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, 765), - NAME_FUNC_OFFSET(13134, glWindowPos3sMESA, glWindowPos3sMESA, NULL, 766), - NAME_FUNC_OFFSET(13152, glWindowPos3svMESA, glWindowPos3svMESA, NULL, 767), - NAME_FUNC_OFFSET(13171, glWindowPos4dMESA, glWindowPos4dMESA, NULL, 768), - NAME_FUNC_OFFSET(13189, glWindowPos4dvMESA, glWindowPos4dvMESA, NULL, 769), - NAME_FUNC_OFFSET(13208, glWindowPos4fMESA, glWindowPos4fMESA, NULL, 770), - NAME_FUNC_OFFSET(13226, glWindowPos4fvMESA, glWindowPos4fvMESA, NULL, 771), - NAME_FUNC_OFFSET(13245, glWindowPos4iMESA, glWindowPos4iMESA, NULL, 772), - NAME_FUNC_OFFSET(13263, glWindowPos4ivMESA, glWindowPos4ivMESA, NULL, 773), - NAME_FUNC_OFFSET(13282, glWindowPos4sMESA, glWindowPos4sMESA, NULL, 774), - NAME_FUNC_OFFSET(13300, glWindowPos4svMESA, glWindowPos4svMESA, NULL, 775), - NAME_FUNC_OFFSET(13319, gl_dispatch_stub_776, gl_dispatch_stub_776, NULL, 776), - NAME_FUNC_OFFSET(13344, gl_dispatch_stub_777, gl_dispatch_stub_777, NULL, 777), - NAME_FUNC_OFFSET(13371, gl_dispatch_stub_778, gl_dispatch_stub_778, NULL, 778), - NAME_FUNC_OFFSET(13388, gl_dispatch_stub_779, gl_dispatch_stub_779, NULL, 779), - NAME_FUNC_OFFSET(13404, gl_dispatch_stub_780, gl_dispatch_stub_780, NULL, 780), - NAME_FUNC_OFFSET(13418, gl_dispatch_stub_781, gl_dispatch_stub_781, NULL, 781), - NAME_FUNC_OFFSET(13433, gl_dispatch_stub_782, gl_dispatch_stub_782, NULL, 782), - NAME_FUNC_OFFSET(13445, gl_dispatch_stub_783, gl_dispatch_stub_783, NULL, 783), - NAME_FUNC_OFFSET(13458, gl_dispatch_stub_784, gl_dispatch_stub_784, NULL, 784), - NAME_FUNC_OFFSET(13472, glAreProgramsResidentNV, glAreProgramsResidentNV, NULL, 785), - NAME_FUNC_OFFSET(13496, glBindProgramNV, glBindProgramNV, NULL, 786), - NAME_FUNC_OFFSET(13512, glDeleteProgramsNV, glDeleteProgramsNV, NULL, 787), - NAME_FUNC_OFFSET(13531, glExecuteProgramNV, glExecuteProgramNV, NULL, 788), - NAME_FUNC_OFFSET(13550, glGenProgramsNV, glGenProgramsNV, NULL, 789), - NAME_FUNC_OFFSET(13566, glGetProgramParameterdvNV, glGetProgramParameterdvNV, NULL, 790), - NAME_FUNC_OFFSET(13592, glGetProgramParameterfvNV, glGetProgramParameterfvNV, NULL, 791), - NAME_FUNC_OFFSET(13618, glGetProgramStringNV, glGetProgramStringNV, NULL, 792), - NAME_FUNC_OFFSET(13639, glGetProgramivNV, glGetProgramivNV, NULL, 793), - NAME_FUNC_OFFSET(13656, glGetTrackMatrixivNV, glGetTrackMatrixivNV, NULL, 794), - NAME_FUNC_OFFSET(13677, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, 795), - NAME_FUNC_OFFSET(13705, glGetVertexAttribdvNV, glGetVertexAttribdvNV, NULL, 796), - NAME_FUNC_OFFSET(13727, glGetVertexAttribfvNV, glGetVertexAttribfvNV, NULL, 797), - NAME_FUNC_OFFSET(13749, glGetVertexAttribivNV, glGetVertexAttribivNV, NULL, 798), - NAME_FUNC_OFFSET(13771, glIsProgramNV, glIsProgramNV, NULL, 799), - NAME_FUNC_OFFSET(13785, glLoadProgramNV, glLoadProgramNV, NULL, 800), - NAME_FUNC_OFFSET(13801, glProgramParameters4dvNV, glProgramParameters4dvNV, NULL, 801), - NAME_FUNC_OFFSET(13826, glProgramParameters4fvNV, glProgramParameters4fvNV, NULL, 802), - NAME_FUNC_OFFSET(13851, glRequestResidentProgramsNV, glRequestResidentProgramsNV, NULL, 803), - NAME_FUNC_OFFSET(13879, glTrackMatrixNV, glTrackMatrixNV, NULL, 804), - NAME_FUNC_OFFSET(13895, glVertexAttrib1dNV, glVertexAttrib1dNV, NULL, 805), - NAME_FUNC_OFFSET(13914, glVertexAttrib1dvNV, glVertexAttrib1dvNV, NULL, 806), - NAME_FUNC_OFFSET(13934, glVertexAttrib1fNV, glVertexAttrib1fNV, NULL, 807), - NAME_FUNC_OFFSET(13953, glVertexAttrib1fvNV, glVertexAttrib1fvNV, NULL, 808), - NAME_FUNC_OFFSET(13973, glVertexAttrib1sNV, glVertexAttrib1sNV, NULL, 809), - NAME_FUNC_OFFSET(13992, glVertexAttrib1svNV, glVertexAttrib1svNV, NULL, 810), - NAME_FUNC_OFFSET(14012, glVertexAttrib2dNV, glVertexAttrib2dNV, NULL, 811), - NAME_FUNC_OFFSET(14031, glVertexAttrib2dvNV, glVertexAttrib2dvNV, NULL, 812), - NAME_FUNC_OFFSET(14051, glVertexAttrib2fNV, glVertexAttrib2fNV, NULL, 813), - NAME_FUNC_OFFSET(14070, glVertexAttrib2fvNV, glVertexAttrib2fvNV, NULL, 814), - NAME_FUNC_OFFSET(14090, glVertexAttrib2sNV, glVertexAttrib2sNV, NULL, 815), - NAME_FUNC_OFFSET(14109, glVertexAttrib2svNV, glVertexAttrib2svNV, NULL, 816), - NAME_FUNC_OFFSET(14129, glVertexAttrib3dNV, glVertexAttrib3dNV, NULL, 817), - NAME_FUNC_OFFSET(14148, glVertexAttrib3dvNV, glVertexAttrib3dvNV, NULL, 818), - NAME_FUNC_OFFSET(14168, glVertexAttrib3fNV, glVertexAttrib3fNV, NULL, 819), - NAME_FUNC_OFFSET(14187, glVertexAttrib3fvNV, glVertexAttrib3fvNV, NULL, 820), - NAME_FUNC_OFFSET(14207, glVertexAttrib3sNV, glVertexAttrib3sNV, NULL, 821), - NAME_FUNC_OFFSET(14226, glVertexAttrib3svNV, glVertexAttrib3svNV, NULL, 822), - NAME_FUNC_OFFSET(14246, glVertexAttrib4dNV, glVertexAttrib4dNV, NULL, 823), - NAME_FUNC_OFFSET(14265, glVertexAttrib4dvNV, glVertexAttrib4dvNV, NULL, 824), - NAME_FUNC_OFFSET(14285, glVertexAttrib4fNV, glVertexAttrib4fNV, NULL, 825), - NAME_FUNC_OFFSET(14304, glVertexAttrib4fvNV, glVertexAttrib4fvNV, NULL, 826), - NAME_FUNC_OFFSET(14324, glVertexAttrib4sNV, glVertexAttrib4sNV, NULL, 827), - NAME_FUNC_OFFSET(14343, glVertexAttrib4svNV, glVertexAttrib4svNV, NULL, 828), - NAME_FUNC_OFFSET(14363, glVertexAttrib4ubNV, glVertexAttrib4ubNV, NULL, 829), - NAME_FUNC_OFFSET(14383, glVertexAttrib4ubvNV, glVertexAttrib4ubvNV, NULL, 830), - NAME_FUNC_OFFSET(14404, glVertexAttribPointerNV, glVertexAttribPointerNV, NULL, 831), - NAME_FUNC_OFFSET(14428, glVertexAttribs1dvNV, glVertexAttribs1dvNV, NULL, 832), - NAME_FUNC_OFFSET(14449, glVertexAttribs1fvNV, glVertexAttribs1fvNV, NULL, 833), - NAME_FUNC_OFFSET(14470, glVertexAttribs1svNV, glVertexAttribs1svNV, NULL, 834), - NAME_FUNC_OFFSET(14491, glVertexAttribs2dvNV, glVertexAttribs2dvNV, NULL, 835), - NAME_FUNC_OFFSET(14512, glVertexAttribs2fvNV, glVertexAttribs2fvNV, NULL, 836), - NAME_FUNC_OFFSET(14533, glVertexAttribs2svNV, glVertexAttribs2svNV, NULL, 837), - NAME_FUNC_OFFSET(14554, glVertexAttribs3dvNV, glVertexAttribs3dvNV, NULL, 838), - NAME_FUNC_OFFSET(14575, glVertexAttribs3fvNV, glVertexAttribs3fvNV, NULL, 839), - NAME_FUNC_OFFSET(14596, glVertexAttribs3svNV, glVertexAttribs3svNV, NULL, 840), - NAME_FUNC_OFFSET(14617, glVertexAttribs4dvNV, glVertexAttribs4dvNV, NULL, 841), - NAME_FUNC_OFFSET(14638, glVertexAttribs4fvNV, glVertexAttribs4fvNV, NULL, 842), - NAME_FUNC_OFFSET(14659, glVertexAttribs4svNV, glVertexAttribs4svNV, NULL, 843), - NAME_FUNC_OFFSET(14680, glVertexAttribs4ubvNV, glVertexAttribs4ubvNV, NULL, 844), - NAME_FUNC_OFFSET(14702, glGetTexBumpParameterfvATI, glGetTexBumpParameterfvATI, NULL, 845), - NAME_FUNC_OFFSET(14729, glGetTexBumpParameterivATI, glGetTexBumpParameterivATI, NULL, 846), - NAME_FUNC_OFFSET(14756, glTexBumpParameterfvATI, glTexBumpParameterfvATI, NULL, 847), - NAME_FUNC_OFFSET(14780, glTexBumpParameterivATI, glTexBumpParameterivATI, NULL, 848), - NAME_FUNC_OFFSET(14804, glAlphaFragmentOp1ATI, glAlphaFragmentOp1ATI, NULL, 849), - NAME_FUNC_OFFSET(14826, glAlphaFragmentOp2ATI, glAlphaFragmentOp2ATI, NULL, 850), - NAME_FUNC_OFFSET(14848, glAlphaFragmentOp3ATI, glAlphaFragmentOp3ATI, NULL, 851), - NAME_FUNC_OFFSET(14870, glBeginFragmentShaderATI, glBeginFragmentShaderATI, NULL, 852), - NAME_FUNC_OFFSET(14895, glBindFragmentShaderATI, glBindFragmentShaderATI, NULL, 853), - NAME_FUNC_OFFSET(14919, glColorFragmentOp1ATI, glColorFragmentOp1ATI, NULL, 854), - NAME_FUNC_OFFSET(14941, glColorFragmentOp2ATI, glColorFragmentOp2ATI, NULL, 855), - NAME_FUNC_OFFSET(14963, glColorFragmentOp3ATI, glColorFragmentOp3ATI, NULL, 856), - NAME_FUNC_OFFSET(14985, glDeleteFragmentShaderATI, glDeleteFragmentShaderATI, NULL, 857), - NAME_FUNC_OFFSET(15011, glEndFragmentShaderATI, glEndFragmentShaderATI, NULL, 858), - NAME_FUNC_OFFSET(15034, glGenFragmentShadersATI, glGenFragmentShadersATI, NULL, 859), - NAME_FUNC_OFFSET(15058, glPassTexCoordATI, glPassTexCoordATI, NULL, 860), - NAME_FUNC_OFFSET(15076, glSampleMapATI, glSampleMapATI, NULL, 861), - NAME_FUNC_OFFSET(15091, glSetFragmentShaderConstantATI, glSetFragmentShaderConstantATI, NULL, 862), - NAME_FUNC_OFFSET(15122, glPointParameteriNV, glPointParameteriNV, NULL, 863), - NAME_FUNC_OFFSET(15142, glPointParameterivNV, glPointParameterivNV, NULL, 864), - NAME_FUNC_OFFSET(15163, gl_dispatch_stub_865, gl_dispatch_stub_865, NULL, 865), - NAME_FUNC_OFFSET(15186, gl_dispatch_stub_866, gl_dispatch_stub_866, NULL, 866), - NAME_FUNC_OFFSET(15209, gl_dispatch_stub_867, gl_dispatch_stub_867, NULL, 867), - NAME_FUNC_OFFSET(15235, gl_dispatch_stub_868, gl_dispatch_stub_868, NULL, 868), - NAME_FUNC_OFFSET(15258, gl_dispatch_stub_869, gl_dispatch_stub_869, NULL, 869), - NAME_FUNC_OFFSET(15279, glGetProgramNamedParameterdvNV, glGetProgramNamedParameterdvNV, NULL, 870), - NAME_FUNC_OFFSET(15310, glGetProgramNamedParameterfvNV, glGetProgramNamedParameterfvNV, NULL, 871), - NAME_FUNC_OFFSET(15341, glProgramNamedParameter4dNV, glProgramNamedParameter4dNV, NULL, 872), - NAME_FUNC_OFFSET(15369, glProgramNamedParameter4dvNV, glProgramNamedParameter4dvNV, NULL, 873), - NAME_FUNC_OFFSET(15398, glProgramNamedParameter4fNV, glProgramNamedParameter4fNV, NULL, 874), - NAME_FUNC_OFFSET(15426, glProgramNamedParameter4fvNV, glProgramNamedParameter4fvNV, NULL, 875), - NAME_FUNC_OFFSET(15455, glPrimitiveRestartIndexNV, glPrimitiveRestartIndexNV, NULL, 876), - NAME_FUNC_OFFSET(15481, glPrimitiveRestartNV, glPrimitiveRestartNV, NULL, 877), - NAME_FUNC_OFFSET(15502, gl_dispatch_stub_878, gl_dispatch_stub_878, NULL, 878), - NAME_FUNC_OFFSET(15519, gl_dispatch_stub_879, gl_dispatch_stub_879, NULL, 879), - NAME_FUNC_OFFSET(15546, glBindFramebufferEXT, glBindFramebufferEXT, NULL, 880), - NAME_FUNC_OFFSET(15567, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, 881), - NAME_FUNC_OFFSET(15589, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, 882), - NAME_FUNC_OFFSET(15617, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, 883), - NAME_FUNC_OFFSET(15641, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, 884), - NAME_FUNC_OFFSET(15666, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, 885), - NAME_FUNC_OFFSET(15695, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, 886), - NAME_FUNC_OFFSET(15721, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, 887), - NAME_FUNC_OFFSET(15747, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, 888), - NAME_FUNC_OFFSET(15773, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, 889), - NAME_FUNC_OFFSET(15794, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, 890), - NAME_FUNC_OFFSET(15816, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, 891), - NAME_FUNC_OFFSET(15836, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, 892), - NAME_FUNC_OFFSET(15877, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, 893), - NAME_FUNC_OFFSET(15909, glIsFramebufferEXT, glIsFramebufferEXT, NULL, 894), - NAME_FUNC_OFFSET(15928, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, 895), - NAME_FUNC_OFFSET(15948, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, 896), - NAME_FUNC_OFFSET(15973, gl_dispatch_stub_897, gl_dispatch_stub_897, NULL, 897), - NAME_FUNC_OFFSET(15994, gl_dispatch_stub_898, gl_dispatch_stub_898, NULL, 898), - NAME_FUNC_OFFSET(16018, gl_dispatch_stub_899, gl_dispatch_stub_899, NULL, 899), - NAME_FUNC_OFFSET(16048, glBindFragDataLocationEXT, glBindFragDataLocationEXT, NULL, 900), - NAME_FUNC_OFFSET(16074, glGetFragDataLocationEXT, glGetFragDataLocationEXT, NULL, 901), - NAME_FUNC_OFFSET(16099, glGetUniformuivEXT, glGetUniformuivEXT, NULL, 902), - NAME_FUNC_OFFSET(16118, glGetVertexAttribIivEXT, glGetVertexAttribIivEXT, NULL, 903), - NAME_FUNC_OFFSET(16142, glGetVertexAttribIuivEXT, glGetVertexAttribIuivEXT, NULL, 904), - NAME_FUNC_OFFSET(16167, glUniform1uiEXT, glUniform1uiEXT, NULL, 905), - NAME_FUNC_OFFSET(16183, glUniform1uivEXT, glUniform1uivEXT, NULL, 906), - NAME_FUNC_OFFSET(16200, glUniform2uiEXT, glUniform2uiEXT, NULL, 907), - NAME_FUNC_OFFSET(16216, glUniform2uivEXT, glUniform2uivEXT, NULL, 908), - NAME_FUNC_OFFSET(16233, glUniform3uiEXT, glUniform3uiEXT, NULL, 909), - NAME_FUNC_OFFSET(16249, glUniform3uivEXT, glUniform3uivEXT, NULL, 910), - NAME_FUNC_OFFSET(16266, glUniform4uiEXT, glUniform4uiEXT, NULL, 911), - NAME_FUNC_OFFSET(16282, glUniform4uivEXT, glUniform4uivEXT, NULL, 912), - NAME_FUNC_OFFSET(16299, glVertexAttribI1iEXT, glVertexAttribI1iEXT, NULL, 913), - NAME_FUNC_OFFSET(16320, glVertexAttribI1ivEXT, glVertexAttribI1ivEXT, NULL, 914), - NAME_FUNC_OFFSET(16342, glVertexAttribI1uiEXT, glVertexAttribI1uiEXT, NULL, 915), - NAME_FUNC_OFFSET(16364, glVertexAttribI1uivEXT, glVertexAttribI1uivEXT, NULL, 916), - NAME_FUNC_OFFSET(16387, glVertexAttribI2iEXT, glVertexAttribI2iEXT, NULL, 917), - NAME_FUNC_OFFSET(16408, glVertexAttribI2ivEXT, glVertexAttribI2ivEXT, NULL, 918), - NAME_FUNC_OFFSET(16430, glVertexAttribI2uiEXT, glVertexAttribI2uiEXT, NULL, 919), - NAME_FUNC_OFFSET(16452, glVertexAttribI2uivEXT, glVertexAttribI2uivEXT, NULL, 920), - NAME_FUNC_OFFSET(16475, glVertexAttribI3iEXT, glVertexAttribI3iEXT, NULL, 921), - NAME_FUNC_OFFSET(16496, glVertexAttribI3ivEXT, glVertexAttribI3ivEXT, NULL, 922), - NAME_FUNC_OFFSET(16518, glVertexAttribI3uiEXT, glVertexAttribI3uiEXT, NULL, 923), - NAME_FUNC_OFFSET(16540, glVertexAttribI3uivEXT, glVertexAttribI3uivEXT, NULL, 924), - NAME_FUNC_OFFSET(16563, glVertexAttribI4bvEXT, glVertexAttribI4bvEXT, NULL, 925), - NAME_FUNC_OFFSET(16585, glVertexAttribI4iEXT, glVertexAttribI4iEXT, NULL, 926), - NAME_FUNC_OFFSET(16606, glVertexAttribI4ivEXT, glVertexAttribI4ivEXT, NULL, 927), - NAME_FUNC_OFFSET(16628, glVertexAttribI4svEXT, glVertexAttribI4svEXT, NULL, 928), - NAME_FUNC_OFFSET(16650, glVertexAttribI4ubvEXT, glVertexAttribI4ubvEXT, NULL, 929), - NAME_FUNC_OFFSET(16673, glVertexAttribI4uiEXT, glVertexAttribI4uiEXT, NULL, 930), - NAME_FUNC_OFFSET(16695, glVertexAttribI4uivEXT, glVertexAttribI4uivEXT, NULL, 931), - NAME_FUNC_OFFSET(16718, glVertexAttribI4usvEXT, glVertexAttribI4usvEXT, NULL, 932), - NAME_FUNC_OFFSET(16741, glVertexAttribIPointerEXT, glVertexAttribIPointerEXT, NULL, 933), - NAME_FUNC_OFFSET(16767, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, 934), - NAME_FUNC_OFFSET(16796, glColorMaskIndexedEXT, glColorMaskIndexedEXT, NULL, 935), - NAME_FUNC_OFFSET(16818, glDisableIndexedEXT, glDisableIndexedEXT, NULL, 936), - NAME_FUNC_OFFSET(16838, glEnableIndexedEXT, glEnableIndexedEXT, NULL, 937), - NAME_FUNC_OFFSET(16857, glGetBooleanIndexedvEXT, glGetBooleanIndexedvEXT, NULL, 938), - NAME_FUNC_OFFSET(16881, glGetIntegerIndexedvEXT, glGetIntegerIndexedvEXT, NULL, 939), - NAME_FUNC_OFFSET(16905, glIsEnabledIndexedEXT, glIsEnabledIndexedEXT, NULL, 940), - NAME_FUNC_OFFSET(16927, glClearColorIiEXT, glClearColorIiEXT, NULL, 941), - NAME_FUNC_OFFSET(16945, glClearColorIuiEXT, glClearColorIuiEXT, NULL, 942), - NAME_FUNC_OFFSET(16964, glGetTexParameterIivEXT, glGetTexParameterIivEXT, NULL, 943), - NAME_FUNC_OFFSET(16988, glGetTexParameterIuivEXT, glGetTexParameterIuivEXT, NULL, 944), - NAME_FUNC_OFFSET(17013, glTexParameterIivEXT, glTexParameterIivEXT, NULL, 945), - NAME_FUNC_OFFSET(17034, glTexParameterIuivEXT, glTexParameterIuivEXT, NULL, 946), - NAME_FUNC_OFFSET(17056, glBeginConditionalRenderNV, glBeginConditionalRenderNV, NULL, 947), - NAME_FUNC_OFFSET(17083, glEndConditionalRenderNV, glEndConditionalRenderNV, NULL, 948), - NAME_FUNC_OFFSET(17108, glBeginTransformFeedbackEXT, glBeginTransformFeedbackEXT, NULL, 949), - NAME_FUNC_OFFSET(17136, glBindBufferBaseEXT, glBindBufferBaseEXT, NULL, 950), - NAME_FUNC_OFFSET(17156, glBindBufferOffsetEXT, glBindBufferOffsetEXT, NULL, 951), - NAME_FUNC_OFFSET(17178, glBindBufferRangeEXT, glBindBufferRangeEXT, NULL, 952), - NAME_FUNC_OFFSET(17199, glEndTransformFeedbackEXT, glEndTransformFeedbackEXT, NULL, 953), - NAME_FUNC_OFFSET(17225, glGetTransformFeedbackVaryingEXT, glGetTransformFeedbackVaryingEXT, NULL, 954), - NAME_FUNC_OFFSET(17258, glTransformFeedbackVaryingsEXT, glTransformFeedbackVaryingsEXT, NULL, 955), - NAME_FUNC_OFFSET(17289, glProvokingVertexEXT, glProvokingVertexEXT, NULL, 956), - NAME_FUNC_OFFSET(17310, gl_dispatch_stub_957, gl_dispatch_stub_957, NULL, 957), - NAME_FUNC_OFFSET(17341, gl_dispatch_stub_958, gl_dispatch_stub_958, NULL, 958), - NAME_FUNC_OFFSET(17361, glGetObjectParameterivAPPLE, glGetObjectParameterivAPPLE, NULL, 959), - NAME_FUNC_OFFSET(17389, glObjectPurgeableAPPLE, glObjectPurgeableAPPLE, NULL, 960), - NAME_FUNC_OFFSET(17412, glObjectUnpurgeableAPPLE, glObjectUnpurgeableAPPLE, NULL, 961), - NAME_FUNC_OFFSET(17437, glActiveProgramEXT, glActiveProgramEXT, NULL, 962), - NAME_FUNC_OFFSET(17456, glCreateShaderProgramEXT, glCreateShaderProgramEXT, NULL, 963), - NAME_FUNC_OFFSET(17481, glUseShaderProgramEXT, glUseShaderProgramEXT, NULL, 964), - NAME_FUNC_OFFSET(17503, glTextureBarrierNV, glTextureBarrierNV, NULL, 965), - NAME_FUNC_OFFSET(17522, gl_dispatch_stub_966, gl_dispatch_stub_966, NULL, 966), - NAME_FUNC_OFFSET(17547, gl_dispatch_stub_967, gl_dispatch_stub_967, NULL, 967), - NAME_FUNC_OFFSET(17576, gl_dispatch_stub_968, gl_dispatch_stub_968, NULL, 968), - NAME_FUNC_OFFSET(17607, gl_dispatch_stub_969, gl_dispatch_stub_969, NULL, 969), - NAME_FUNC_OFFSET(17631, gl_dispatch_stub_970, gl_dispatch_stub_970, NULL, 970), - NAME_FUNC_OFFSET(17656, glEGLImageTargetRenderbufferStorageOES, glEGLImageTargetRenderbufferStorageOES, NULL, 971), - NAME_FUNC_OFFSET(17695, glEGLImageTargetTexture2DOES, glEGLImageTargetTexture2DOES, NULL, 972), - NAME_FUNC_OFFSET(17724, glArrayElement, glArrayElement, NULL, 306), - NAME_FUNC_OFFSET(17742, glBindTexture, glBindTexture, NULL, 307), - NAME_FUNC_OFFSET(17759, glDrawArrays, glDrawArrays, NULL, 310), - NAME_FUNC_OFFSET(17775, glAreTexturesResident, glAreTexturesResidentEXT, glAreTexturesResidentEXT, 322), - NAME_FUNC_OFFSET(17800, glCopyTexImage1D, glCopyTexImage1D, NULL, 323), - NAME_FUNC_OFFSET(17820, glCopyTexImage2D, glCopyTexImage2D, NULL, 324), - NAME_FUNC_OFFSET(17840, glCopyTexSubImage1D, glCopyTexSubImage1D, NULL, 325), - NAME_FUNC_OFFSET(17863, glCopyTexSubImage2D, glCopyTexSubImage2D, NULL, 326), - NAME_FUNC_OFFSET(17886, glDeleteTextures, glDeleteTexturesEXT, glDeleteTexturesEXT, 327), - NAME_FUNC_OFFSET(17906, glGenTextures, glGenTexturesEXT, glGenTexturesEXT, 328), - NAME_FUNC_OFFSET(17923, glGetPointerv, glGetPointerv, NULL, 329), - NAME_FUNC_OFFSET(17940, glIsTexture, glIsTextureEXT, glIsTextureEXT, 330), - NAME_FUNC_OFFSET(17955, glPrioritizeTextures, glPrioritizeTextures, NULL, 331), - NAME_FUNC_OFFSET(17979, glTexSubImage1D, glTexSubImage1D, NULL, 332), - NAME_FUNC_OFFSET(17998, glTexSubImage2D, glTexSubImage2D, NULL, 333), - NAME_FUNC_OFFSET(18017, glBlendColor, glBlendColor, NULL, 336), - NAME_FUNC_OFFSET(18033, glBlendEquation, glBlendEquation, NULL, 337), - NAME_FUNC_OFFSET(18052, glDrawRangeElements, glDrawRangeElements, NULL, 338), - NAME_FUNC_OFFSET(18075, glColorTable, glColorTable, NULL, 339), - NAME_FUNC_OFFSET(18091, glColorTable, glColorTable, NULL, 339), - NAME_FUNC_OFFSET(18107, glColorTableParameterfv, glColorTableParameterfv, NULL, 340), - NAME_FUNC_OFFSET(18134, glColorTableParameteriv, glColorTableParameteriv, NULL, 341), - NAME_FUNC_OFFSET(18161, glCopyColorTable, glCopyColorTable, NULL, 342), - NAME_FUNC_OFFSET(18181, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, 343), - NAME_FUNC_OFFSET(18200, glGetColorTable, glGetColorTableEXT, glGetColorTableEXT, 343), - NAME_FUNC_OFFSET(18219, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, 344), - NAME_FUNC_OFFSET(18249, glGetColorTableParameterfv, glGetColorTableParameterfvEXT, glGetColorTableParameterfvEXT, 344), - NAME_FUNC_OFFSET(18279, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, 345), - NAME_FUNC_OFFSET(18309, glGetColorTableParameteriv, glGetColorTableParameterivEXT, glGetColorTableParameterivEXT, 345), - NAME_FUNC_OFFSET(18339, glColorSubTable, glColorSubTable, NULL, 346), - NAME_FUNC_OFFSET(18358, glCopyColorSubTable, glCopyColorSubTable, NULL, 347), - NAME_FUNC_OFFSET(18381, glConvolutionFilter1D, glConvolutionFilter1D, NULL, 348), - NAME_FUNC_OFFSET(18406, glConvolutionFilter2D, glConvolutionFilter2D, NULL, 349), - NAME_FUNC_OFFSET(18431, glConvolutionParameterf, glConvolutionParameterf, NULL, 350), - NAME_FUNC_OFFSET(18458, glConvolutionParameterfv, glConvolutionParameterfv, NULL, 351), - NAME_FUNC_OFFSET(18486, glConvolutionParameteri, glConvolutionParameteri, NULL, 352), - NAME_FUNC_OFFSET(18513, glConvolutionParameteriv, glConvolutionParameteriv, NULL, 353), - NAME_FUNC_OFFSET(18541, glCopyConvolutionFilter1D, glCopyConvolutionFilter1D, NULL, 354), - NAME_FUNC_OFFSET(18570, glCopyConvolutionFilter2D, glCopyConvolutionFilter2D, NULL, 355), - NAME_FUNC_OFFSET(18599, glGetConvolutionFilter, gl_dispatch_stub_356, gl_dispatch_stub_356, 356), - NAME_FUNC_OFFSET(18625, glGetConvolutionParameterfv, gl_dispatch_stub_357, gl_dispatch_stub_357, 357), - NAME_FUNC_OFFSET(18656, glGetConvolutionParameteriv, gl_dispatch_stub_358, gl_dispatch_stub_358, 358), - NAME_FUNC_OFFSET(18687, glGetSeparableFilter, gl_dispatch_stub_359, gl_dispatch_stub_359, 359), - NAME_FUNC_OFFSET(18711, glSeparableFilter2D, glSeparableFilter2D, NULL, 360), - NAME_FUNC_OFFSET(18734, glGetHistogram, gl_dispatch_stub_361, gl_dispatch_stub_361, 361), - NAME_FUNC_OFFSET(18752, glGetHistogramParameterfv, gl_dispatch_stub_362, gl_dispatch_stub_362, 362), - NAME_FUNC_OFFSET(18781, glGetHistogramParameteriv, gl_dispatch_stub_363, gl_dispatch_stub_363, 363), - NAME_FUNC_OFFSET(18810, glGetMinmax, gl_dispatch_stub_364, gl_dispatch_stub_364, 364), - NAME_FUNC_OFFSET(18825, glGetMinmaxParameterfv, gl_dispatch_stub_365, gl_dispatch_stub_365, 365), - NAME_FUNC_OFFSET(18851, glGetMinmaxParameteriv, gl_dispatch_stub_366, gl_dispatch_stub_366, 366), - NAME_FUNC_OFFSET(18877, glHistogram, glHistogram, NULL, 367), - NAME_FUNC_OFFSET(18892, glMinmax, glMinmax, NULL, 368), - NAME_FUNC_OFFSET(18904, glResetHistogram, glResetHistogram, NULL, 369), - NAME_FUNC_OFFSET(18924, glResetMinmax, glResetMinmax, NULL, 370), - NAME_FUNC_OFFSET(18941, glTexImage3D, glTexImage3D, NULL, 371), - NAME_FUNC_OFFSET(18957, glTexSubImage3D, glTexSubImage3D, NULL, 372), - NAME_FUNC_OFFSET(18976, glCopyTexSubImage3D, glCopyTexSubImage3D, NULL, 373), - NAME_FUNC_OFFSET(18999, glActiveTextureARB, glActiveTextureARB, NULL, 374), - NAME_FUNC_OFFSET(19015, glClientActiveTextureARB, glClientActiveTextureARB, NULL, 375), - NAME_FUNC_OFFSET(19037, glMultiTexCoord1dARB, glMultiTexCoord1dARB, NULL, 376), - NAME_FUNC_OFFSET(19055, glMultiTexCoord1dvARB, glMultiTexCoord1dvARB, NULL, 377), - NAME_FUNC_OFFSET(19074, glMultiTexCoord1fARB, glMultiTexCoord1fARB, NULL, 378), - NAME_FUNC_OFFSET(19092, glMultiTexCoord1fvARB, glMultiTexCoord1fvARB, NULL, 379), - NAME_FUNC_OFFSET(19111, glMultiTexCoord1iARB, glMultiTexCoord1iARB, NULL, 380), - NAME_FUNC_OFFSET(19129, glMultiTexCoord1ivARB, glMultiTexCoord1ivARB, NULL, 381), - NAME_FUNC_OFFSET(19148, glMultiTexCoord1sARB, glMultiTexCoord1sARB, NULL, 382), - NAME_FUNC_OFFSET(19166, glMultiTexCoord1svARB, glMultiTexCoord1svARB, NULL, 383), - NAME_FUNC_OFFSET(19185, glMultiTexCoord2dARB, glMultiTexCoord2dARB, NULL, 384), - NAME_FUNC_OFFSET(19203, glMultiTexCoord2dvARB, glMultiTexCoord2dvARB, NULL, 385), - NAME_FUNC_OFFSET(19222, glMultiTexCoord2fARB, glMultiTexCoord2fARB, NULL, 386), - NAME_FUNC_OFFSET(19240, glMultiTexCoord2fvARB, glMultiTexCoord2fvARB, NULL, 387), - NAME_FUNC_OFFSET(19259, glMultiTexCoord2iARB, glMultiTexCoord2iARB, NULL, 388), - NAME_FUNC_OFFSET(19277, glMultiTexCoord2ivARB, glMultiTexCoord2ivARB, NULL, 389), - NAME_FUNC_OFFSET(19296, glMultiTexCoord2sARB, glMultiTexCoord2sARB, NULL, 390), - NAME_FUNC_OFFSET(19314, glMultiTexCoord2svARB, glMultiTexCoord2svARB, NULL, 391), - NAME_FUNC_OFFSET(19333, glMultiTexCoord3dARB, glMultiTexCoord3dARB, NULL, 392), - NAME_FUNC_OFFSET(19351, glMultiTexCoord3dvARB, glMultiTexCoord3dvARB, NULL, 393), - NAME_FUNC_OFFSET(19370, glMultiTexCoord3fARB, glMultiTexCoord3fARB, NULL, 394), - NAME_FUNC_OFFSET(19388, glMultiTexCoord3fvARB, glMultiTexCoord3fvARB, NULL, 395), - NAME_FUNC_OFFSET(19407, glMultiTexCoord3iARB, glMultiTexCoord3iARB, NULL, 396), - NAME_FUNC_OFFSET(19425, glMultiTexCoord3ivARB, glMultiTexCoord3ivARB, NULL, 397), - NAME_FUNC_OFFSET(19444, glMultiTexCoord3sARB, glMultiTexCoord3sARB, NULL, 398), - NAME_FUNC_OFFSET(19462, glMultiTexCoord3svARB, glMultiTexCoord3svARB, NULL, 399), - NAME_FUNC_OFFSET(19481, glMultiTexCoord4dARB, glMultiTexCoord4dARB, NULL, 400), - NAME_FUNC_OFFSET(19499, glMultiTexCoord4dvARB, glMultiTexCoord4dvARB, NULL, 401), - NAME_FUNC_OFFSET(19518, glMultiTexCoord4fARB, glMultiTexCoord4fARB, NULL, 402), - NAME_FUNC_OFFSET(19536, glMultiTexCoord4fvARB, glMultiTexCoord4fvARB, NULL, 403), - NAME_FUNC_OFFSET(19555, glMultiTexCoord4iARB, glMultiTexCoord4iARB, NULL, 404), - NAME_FUNC_OFFSET(19573, glMultiTexCoord4ivARB, glMultiTexCoord4ivARB, NULL, 405), - NAME_FUNC_OFFSET(19592, glMultiTexCoord4sARB, glMultiTexCoord4sARB, NULL, 406), - NAME_FUNC_OFFSET(19610, glMultiTexCoord4svARB, glMultiTexCoord4svARB, NULL, 407), - NAME_FUNC_OFFSET(19629, glStencilOpSeparate, glStencilOpSeparate, NULL, 423), - NAME_FUNC_OFFSET(19652, glLoadTransposeMatrixdARB, glLoadTransposeMatrixdARB, NULL, 441), - NAME_FUNC_OFFSET(19675, glLoadTransposeMatrixfARB, glLoadTransposeMatrixfARB, NULL, 442), - NAME_FUNC_OFFSET(19698, glMultTransposeMatrixdARB, glMultTransposeMatrixdARB, NULL, 443), - NAME_FUNC_OFFSET(19721, glMultTransposeMatrixfARB, glMultTransposeMatrixfARB, NULL, 444), - NAME_FUNC_OFFSET(19744, glSampleCoverageARB, glSampleCoverageARB, NULL, 445), - NAME_FUNC_OFFSET(19761, glCompressedTexImage1DARB, glCompressedTexImage1DARB, NULL, 446), - NAME_FUNC_OFFSET(19784, glCompressedTexImage2DARB, glCompressedTexImage2DARB, NULL, 447), - NAME_FUNC_OFFSET(19807, glCompressedTexImage3DARB, glCompressedTexImage3DARB, NULL, 448), - NAME_FUNC_OFFSET(19830, glCompressedTexSubImage1DARB, glCompressedTexSubImage1DARB, NULL, 449), - NAME_FUNC_OFFSET(19856, glCompressedTexSubImage2DARB, glCompressedTexSubImage2DARB, NULL, 450), - NAME_FUNC_OFFSET(19882, glCompressedTexSubImage3DARB, glCompressedTexSubImage3DARB, NULL, 451), - NAME_FUNC_OFFSET(19908, glGetCompressedTexImageARB, glGetCompressedTexImageARB, NULL, 452), - NAME_FUNC_OFFSET(19932, glDisableVertexAttribArrayARB, glDisableVertexAttribArrayARB, NULL, 453), - NAME_FUNC_OFFSET(19959, glEnableVertexAttribArrayARB, glEnableVertexAttribArrayARB, NULL, 454), - NAME_FUNC_OFFSET(19985, glGetVertexAttribdvARB, glGetVertexAttribdvARB, NULL, 461), - NAME_FUNC_OFFSET(20005, glGetVertexAttribfvARB, glGetVertexAttribfvARB, NULL, 462), - NAME_FUNC_OFFSET(20025, glGetVertexAttribivARB, glGetVertexAttribivARB, NULL, 463), - NAME_FUNC_OFFSET(20045, glProgramEnvParameter4dARB, glProgramEnvParameter4dARB, NULL, 464), - NAME_FUNC_OFFSET(20068, glProgramEnvParameter4dvARB, glProgramEnvParameter4dvARB, NULL, 465), - NAME_FUNC_OFFSET(20092, glProgramEnvParameter4fARB, glProgramEnvParameter4fARB, NULL, 466), - NAME_FUNC_OFFSET(20115, glProgramEnvParameter4fvARB, glProgramEnvParameter4fvARB, NULL, 467), - NAME_FUNC_OFFSET(20139, glVertexAttrib1dARB, glVertexAttrib1dARB, NULL, 473), - NAME_FUNC_OFFSET(20156, glVertexAttrib1dvARB, glVertexAttrib1dvARB, NULL, 474), - NAME_FUNC_OFFSET(20174, glVertexAttrib1fARB, glVertexAttrib1fARB, NULL, 475), - NAME_FUNC_OFFSET(20191, glVertexAttrib1fvARB, glVertexAttrib1fvARB, NULL, 476), - NAME_FUNC_OFFSET(20209, glVertexAttrib1sARB, glVertexAttrib1sARB, NULL, 477), - NAME_FUNC_OFFSET(20226, glVertexAttrib1svARB, glVertexAttrib1svARB, NULL, 478), - NAME_FUNC_OFFSET(20244, glVertexAttrib2dARB, glVertexAttrib2dARB, NULL, 479), - NAME_FUNC_OFFSET(20261, glVertexAttrib2dvARB, glVertexAttrib2dvARB, NULL, 480), - NAME_FUNC_OFFSET(20279, glVertexAttrib2fARB, glVertexAttrib2fARB, NULL, 481), - NAME_FUNC_OFFSET(20296, glVertexAttrib2fvARB, glVertexAttrib2fvARB, NULL, 482), - NAME_FUNC_OFFSET(20314, glVertexAttrib2sARB, glVertexAttrib2sARB, NULL, 483), - NAME_FUNC_OFFSET(20331, glVertexAttrib2svARB, glVertexAttrib2svARB, NULL, 484), - NAME_FUNC_OFFSET(20349, glVertexAttrib3dARB, glVertexAttrib3dARB, NULL, 485), - NAME_FUNC_OFFSET(20366, glVertexAttrib3dvARB, glVertexAttrib3dvARB, NULL, 486), - NAME_FUNC_OFFSET(20384, glVertexAttrib3fARB, glVertexAttrib3fARB, NULL, 487), - NAME_FUNC_OFFSET(20401, glVertexAttrib3fvARB, glVertexAttrib3fvARB, NULL, 488), - NAME_FUNC_OFFSET(20419, glVertexAttrib3sARB, glVertexAttrib3sARB, NULL, 489), - NAME_FUNC_OFFSET(20436, glVertexAttrib3svARB, glVertexAttrib3svARB, NULL, 490), - NAME_FUNC_OFFSET(20454, glVertexAttrib4NbvARB, glVertexAttrib4NbvARB, NULL, 491), - NAME_FUNC_OFFSET(20473, glVertexAttrib4NivARB, glVertexAttrib4NivARB, NULL, 492), - NAME_FUNC_OFFSET(20492, glVertexAttrib4NsvARB, glVertexAttrib4NsvARB, NULL, 493), - NAME_FUNC_OFFSET(20511, glVertexAttrib4NubARB, glVertexAttrib4NubARB, NULL, 494), - NAME_FUNC_OFFSET(20530, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, 495), - NAME_FUNC_OFFSET(20550, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, 496), - NAME_FUNC_OFFSET(20570, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, 497), - NAME_FUNC_OFFSET(20590, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, 498), - NAME_FUNC_OFFSET(20608, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, 499), - NAME_FUNC_OFFSET(20625, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, 500), - NAME_FUNC_OFFSET(20643, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, 501), - NAME_FUNC_OFFSET(20660, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, 502), - NAME_FUNC_OFFSET(20678, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, 503), - NAME_FUNC_OFFSET(20696, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, 504), - NAME_FUNC_OFFSET(20713, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, 505), - NAME_FUNC_OFFSET(20731, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, 506), - NAME_FUNC_OFFSET(20750, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, 507), - NAME_FUNC_OFFSET(20769, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, 508), - NAME_FUNC_OFFSET(20788, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, 509), - NAME_FUNC_OFFSET(20810, glBindBufferARB, glBindBufferARB, NULL, 510), - NAME_FUNC_OFFSET(20823, glBufferDataARB, glBufferDataARB, NULL, 511), - NAME_FUNC_OFFSET(20836, glBufferSubDataARB, glBufferSubDataARB, NULL, 512), - NAME_FUNC_OFFSET(20852, glDeleteBuffersARB, glDeleteBuffersARB, NULL, 513), - NAME_FUNC_OFFSET(20868, glGenBuffersARB, glGenBuffersARB, NULL, 514), - NAME_FUNC_OFFSET(20881, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, 515), - NAME_FUNC_OFFSET(20904, glGetBufferPointervARB, glGetBufferPointervARB, NULL, 516), - NAME_FUNC_OFFSET(20924, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, 517), - NAME_FUNC_OFFSET(20943, glIsBufferARB, glIsBufferARB, NULL, 518), - NAME_FUNC_OFFSET(20954, glMapBufferARB, glMapBufferARB, NULL, 519), - NAME_FUNC_OFFSET(20966, glUnmapBufferARB, glUnmapBufferARB, NULL, 520), - NAME_FUNC_OFFSET(20980, glBeginQueryARB, glBeginQueryARB, NULL, 521), - NAME_FUNC_OFFSET(20993, glDeleteQueriesARB, glDeleteQueriesARB, NULL, 522), - NAME_FUNC_OFFSET(21009, glEndQueryARB, glEndQueryARB, NULL, 523), - NAME_FUNC_OFFSET(21020, glGenQueriesARB, glGenQueriesARB, NULL, 524), - NAME_FUNC_OFFSET(21033, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, 525), - NAME_FUNC_OFFSET(21052, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, 526), - NAME_FUNC_OFFSET(21072, glGetQueryivARB, glGetQueryivARB, NULL, 527), - NAME_FUNC_OFFSET(21085, glIsQueryARB, glIsQueryARB, NULL, 528), - NAME_FUNC_OFFSET(21095, glCompileShaderARB, glCompileShaderARB, NULL, 530), - NAME_FUNC_OFFSET(21111, glGetActiveUniformARB, glGetActiveUniformARB, NULL, 535), - NAME_FUNC_OFFSET(21130, glGetShaderSourceARB, glGetShaderSourceARB, NULL, 541), - NAME_FUNC_OFFSET(21148, glGetUniformLocationARB, glGetUniformLocationARB, NULL, 542), - NAME_FUNC_OFFSET(21169, glGetUniformfvARB, glGetUniformfvARB, NULL, 543), - NAME_FUNC_OFFSET(21184, glGetUniformivARB, glGetUniformivARB, NULL, 544), - NAME_FUNC_OFFSET(21199, glLinkProgramARB, glLinkProgramARB, NULL, 545), - NAME_FUNC_OFFSET(21213, glShaderSourceARB, glShaderSourceARB, NULL, 546), - NAME_FUNC_OFFSET(21228, glUniform1fARB, glUniform1fARB, NULL, 547), - NAME_FUNC_OFFSET(21240, glUniform1fvARB, glUniform1fvARB, NULL, 548), - NAME_FUNC_OFFSET(21253, glUniform1iARB, glUniform1iARB, NULL, 549), - NAME_FUNC_OFFSET(21265, glUniform1ivARB, glUniform1ivARB, NULL, 550), - NAME_FUNC_OFFSET(21278, glUniform2fARB, glUniform2fARB, NULL, 551), - NAME_FUNC_OFFSET(21290, glUniform2fvARB, glUniform2fvARB, NULL, 552), - NAME_FUNC_OFFSET(21303, glUniform2iARB, glUniform2iARB, NULL, 553), - NAME_FUNC_OFFSET(21315, glUniform2ivARB, glUniform2ivARB, NULL, 554), - NAME_FUNC_OFFSET(21328, glUniform3fARB, glUniform3fARB, NULL, 555), - NAME_FUNC_OFFSET(21340, glUniform3fvARB, glUniform3fvARB, NULL, 556), - NAME_FUNC_OFFSET(21353, glUniform3iARB, glUniform3iARB, NULL, 557), - NAME_FUNC_OFFSET(21365, glUniform3ivARB, glUniform3ivARB, NULL, 558), - NAME_FUNC_OFFSET(21378, glUniform4fARB, glUniform4fARB, NULL, 559), - NAME_FUNC_OFFSET(21390, glUniform4fvARB, glUniform4fvARB, NULL, 560), - NAME_FUNC_OFFSET(21403, glUniform4iARB, glUniform4iARB, NULL, 561), - NAME_FUNC_OFFSET(21415, glUniform4ivARB, glUniform4ivARB, NULL, 562), - NAME_FUNC_OFFSET(21428, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, 563), - NAME_FUNC_OFFSET(21447, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, 564), - NAME_FUNC_OFFSET(21466, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, 565), - NAME_FUNC_OFFSET(21485, glUseProgramObjectARB, glUseProgramObjectARB, NULL, 566), - NAME_FUNC_OFFSET(21498, glValidateProgramARB, glValidateProgramARB, NULL, 567), - NAME_FUNC_OFFSET(21516, glBindAttribLocationARB, glBindAttribLocationARB, NULL, 568), - NAME_FUNC_OFFSET(21537, glGetActiveAttribARB, glGetActiveAttribARB, NULL, 569), - NAME_FUNC_OFFSET(21555, glGetAttribLocationARB, glGetAttribLocationARB, NULL, 570), - NAME_FUNC_OFFSET(21575, glDrawBuffersARB, glDrawBuffersARB, NULL, 571), - NAME_FUNC_OFFSET(21589, glDrawBuffersARB, glDrawBuffersARB, NULL, 571), - NAME_FUNC_OFFSET(21606, glDrawBuffersARB, glDrawBuffersARB, NULL, 571), - NAME_FUNC_OFFSET(21622, glDrawArraysInstancedARB, glDrawArraysInstancedARB, NULL, 573), - NAME_FUNC_OFFSET(21647, glDrawArraysInstancedARB, glDrawArraysInstancedARB, NULL, 573), - NAME_FUNC_OFFSET(21669, glDrawElementsInstancedARB, glDrawElementsInstancedARB, NULL, 574), - NAME_FUNC_OFFSET(21696, glDrawElementsInstancedARB, glDrawElementsInstancedARB, NULL, 574), - NAME_FUNC_OFFSET(21720, glRenderbufferStorageMultisample, glRenderbufferStorageMultisample, NULL, 575), - NAME_FUNC_OFFSET(21756, glBlendEquationSeparateiARB, glBlendEquationSeparateiARB, NULL, 597), - NAME_FUNC_OFFSET(21790, glBlendEquationiARB, glBlendEquationiARB, NULL, 598), - NAME_FUNC_OFFSET(21816, glBlendFuncSeparateiARB, glBlendFuncSeparateiARB, NULL, 599), - NAME_FUNC_OFFSET(21846, glBlendFunciARB, glBlendFunciARB, NULL, 600), - NAME_FUNC_OFFSET(21868, gl_dispatch_stub_698, gl_dispatch_stub_698, NULL, 698), - NAME_FUNC_OFFSET(21884, gl_dispatch_stub_699, gl_dispatch_stub_699, NULL, 699), - NAME_FUNC_OFFSET(21903, glPointParameterfEXT, glPointParameterfEXT, NULL, 706), - NAME_FUNC_OFFSET(21921, glPointParameterfEXT, glPointParameterfEXT, NULL, 706), - NAME_FUNC_OFFSET(21942, glPointParameterfEXT, glPointParameterfEXT, NULL, 706), - NAME_FUNC_OFFSET(21964, glPointParameterfvEXT, glPointParameterfvEXT, NULL, 707), - NAME_FUNC_OFFSET(21983, glPointParameterfvEXT, glPointParameterfvEXT, NULL, 707), - NAME_FUNC_OFFSET(22005, glPointParameterfvEXT, glPointParameterfvEXT, NULL, 707), - NAME_FUNC_OFFSET(22028, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, 710), - NAME_FUNC_OFFSET(22047, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, 711), - NAME_FUNC_OFFSET(22067, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, 712), - NAME_FUNC_OFFSET(22086, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, 713), - NAME_FUNC_OFFSET(22106, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, 714), - NAME_FUNC_OFFSET(22125, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, 715), - NAME_FUNC_OFFSET(22145, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, 716), - NAME_FUNC_OFFSET(22164, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, 717), - NAME_FUNC_OFFSET(22184, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, 718), - NAME_FUNC_OFFSET(22203, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, 719), - NAME_FUNC_OFFSET(22223, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, 720), - NAME_FUNC_OFFSET(22243, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, 721), - NAME_FUNC_OFFSET(22264, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, 722), - NAME_FUNC_OFFSET(22284, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, 723), - NAME_FUNC_OFFSET(22305, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, 724), - NAME_FUNC_OFFSET(22325, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, 725), - NAME_FUNC_OFFSET(22346, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, 726), - NAME_FUNC_OFFSET(22370, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, 727), - NAME_FUNC_OFFSET(22388, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, 728), - NAME_FUNC_OFFSET(22408, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, 729), - NAME_FUNC_OFFSET(22426, glFogCoorddEXT, glFogCoorddEXT, NULL, 730), - NAME_FUNC_OFFSET(22438, glFogCoorddvEXT, glFogCoorddvEXT, NULL, 731), - NAME_FUNC_OFFSET(22451, glFogCoordfEXT, glFogCoordfEXT, NULL, 732), - NAME_FUNC_OFFSET(22463, glFogCoordfvEXT, glFogCoordfvEXT, NULL, 733), - NAME_FUNC_OFFSET(22476, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, 735), - NAME_FUNC_OFFSET(22496, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, 735), - NAME_FUNC_OFFSET(22520, glWindowPos2dMESA, glWindowPos2dMESA, NULL, 752), - NAME_FUNC_OFFSET(22534, glWindowPos2dMESA, glWindowPos2dMESA, NULL, 752), - NAME_FUNC_OFFSET(22551, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, 753), - NAME_FUNC_OFFSET(22566, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, 753), - NAME_FUNC_OFFSET(22584, glWindowPos2fMESA, glWindowPos2fMESA, NULL, 754), - NAME_FUNC_OFFSET(22598, glWindowPos2fMESA, glWindowPos2fMESA, NULL, 754), - NAME_FUNC_OFFSET(22615, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, 755), - NAME_FUNC_OFFSET(22630, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, 755), - NAME_FUNC_OFFSET(22648, glWindowPos2iMESA, glWindowPos2iMESA, NULL, 756), - NAME_FUNC_OFFSET(22662, glWindowPos2iMESA, glWindowPos2iMESA, NULL, 756), - NAME_FUNC_OFFSET(22679, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, 757), - NAME_FUNC_OFFSET(22694, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, 757), - NAME_FUNC_OFFSET(22712, glWindowPos2sMESA, glWindowPos2sMESA, NULL, 758), - NAME_FUNC_OFFSET(22726, glWindowPos2sMESA, glWindowPos2sMESA, NULL, 758), - NAME_FUNC_OFFSET(22743, glWindowPos2svMESA, glWindowPos2svMESA, NULL, 759), - NAME_FUNC_OFFSET(22758, glWindowPos2svMESA, glWindowPos2svMESA, NULL, 759), - NAME_FUNC_OFFSET(22776, glWindowPos3dMESA, glWindowPos3dMESA, NULL, 760), - NAME_FUNC_OFFSET(22790, glWindowPos3dMESA, glWindowPos3dMESA, NULL, 760), - NAME_FUNC_OFFSET(22807, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, 761), - NAME_FUNC_OFFSET(22822, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, 761), - NAME_FUNC_OFFSET(22840, glWindowPos3fMESA, glWindowPos3fMESA, NULL, 762), - NAME_FUNC_OFFSET(22854, glWindowPos3fMESA, glWindowPos3fMESA, NULL, 762), - NAME_FUNC_OFFSET(22871, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, 763), - NAME_FUNC_OFFSET(22886, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, 763), - NAME_FUNC_OFFSET(22904, glWindowPos3iMESA, glWindowPos3iMESA, NULL, 764), - NAME_FUNC_OFFSET(22918, glWindowPos3iMESA, glWindowPos3iMESA, NULL, 764), - NAME_FUNC_OFFSET(22935, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, 765), - NAME_FUNC_OFFSET(22950, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, 765), - NAME_FUNC_OFFSET(22968, glWindowPos3sMESA, glWindowPos3sMESA, NULL, 766), - NAME_FUNC_OFFSET(22982, glWindowPos3sMESA, glWindowPos3sMESA, NULL, 766), - NAME_FUNC_OFFSET(22999, glWindowPos3svMESA, glWindowPos3svMESA, NULL, 767), - NAME_FUNC_OFFSET(23014, glWindowPos3svMESA, glWindowPos3svMESA, NULL, 767), - NAME_FUNC_OFFSET(23032, glBindProgramNV, glBindProgramNV, NULL, 786), - NAME_FUNC_OFFSET(23049, glDeleteProgramsNV, glDeleteProgramsNV, NULL, 787), - NAME_FUNC_OFFSET(23069, glGenProgramsNV, glGenProgramsNV, NULL, 789), - NAME_FUNC_OFFSET(23086, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, 795), - NAME_FUNC_OFFSET(23112, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, 795), - NAME_FUNC_OFFSET(23141, glIsProgramNV, glIsProgramNV, NULL, 799), - NAME_FUNC_OFFSET(23156, glPointParameteriNV, glPointParameteriNV, NULL, 863), - NAME_FUNC_OFFSET(23174, glPointParameterivNV, glPointParameterivNV, NULL, 864), - NAME_FUNC_OFFSET(23193, gl_dispatch_stub_867, gl_dispatch_stub_867, NULL, 867), - NAME_FUNC_OFFSET(23214, gl_dispatch_stub_869, gl_dispatch_stub_869, NULL, 869), - NAME_FUNC_OFFSET(23230, glPrimitiveRestartIndexNV, glPrimitiveRestartIndexNV, NULL, 876), - NAME_FUNC_OFFSET(23254, gl_dispatch_stub_879, gl_dispatch_stub_879, NULL, 879), - NAME_FUNC_OFFSET(23278, gl_dispatch_stub_879, gl_dispatch_stub_879, NULL, 879), - NAME_FUNC_OFFSET(23305, glBindFramebufferEXT, glBindFramebufferEXT, NULL, 880), - NAME_FUNC_OFFSET(23323, glBindRenderbufferEXT, glBindRenderbufferEXT, NULL, 881), - NAME_FUNC_OFFSET(23342, glCheckFramebufferStatusEXT, glCheckFramebufferStatusEXT, NULL, 882), - NAME_FUNC_OFFSET(23367, glDeleteFramebuffersEXT, glDeleteFramebuffersEXT, NULL, 883), - NAME_FUNC_OFFSET(23388, glDeleteRenderbuffersEXT, glDeleteRenderbuffersEXT, NULL, 884), - NAME_FUNC_OFFSET(23410, glFramebufferRenderbufferEXT, glFramebufferRenderbufferEXT, NULL, 885), - NAME_FUNC_OFFSET(23436, glFramebufferTexture1DEXT, glFramebufferTexture1DEXT, NULL, 886), - NAME_FUNC_OFFSET(23459, glFramebufferTexture2DEXT, glFramebufferTexture2DEXT, NULL, 887), - NAME_FUNC_OFFSET(23482, glFramebufferTexture3DEXT, glFramebufferTexture3DEXT, NULL, 888), - NAME_FUNC_OFFSET(23505, glGenFramebuffersEXT, glGenFramebuffersEXT, NULL, 889), - NAME_FUNC_OFFSET(23523, glGenRenderbuffersEXT, glGenRenderbuffersEXT, NULL, 890), - NAME_FUNC_OFFSET(23542, glGenerateMipmapEXT, glGenerateMipmapEXT, NULL, 891), - NAME_FUNC_OFFSET(23559, glGetFramebufferAttachmentParameterivEXT, glGetFramebufferAttachmentParameterivEXT, NULL, 892), - NAME_FUNC_OFFSET(23597, glGetRenderbufferParameterivEXT, glGetRenderbufferParameterivEXT, NULL, 893), - NAME_FUNC_OFFSET(23626, glIsFramebufferEXT, glIsFramebufferEXT, NULL, 894), - NAME_FUNC_OFFSET(23642, glIsRenderbufferEXT, glIsRenderbufferEXT, NULL, 895), - NAME_FUNC_OFFSET(23659, glRenderbufferStorageEXT, glRenderbufferStorageEXT, NULL, 896), - NAME_FUNC_OFFSET(23681, gl_dispatch_stub_897, gl_dispatch_stub_897, NULL, 897), - NAME_FUNC_OFFSET(23699, glBindFragDataLocationEXT, glBindFragDataLocationEXT, NULL, 900), - NAME_FUNC_OFFSET(23722, glGetFragDataLocationEXT, glGetFragDataLocationEXT, NULL, 901), - NAME_FUNC_OFFSET(23744, glGetUniformuivEXT, glGetUniformuivEXT, NULL, 902), - NAME_FUNC_OFFSET(23760, glGetVertexAttribIivEXT, glGetVertexAttribIivEXT, NULL, 903), - NAME_FUNC_OFFSET(23781, glGetVertexAttribIuivEXT, glGetVertexAttribIuivEXT, NULL, 904), - NAME_FUNC_OFFSET(23803, glUniform1uiEXT, glUniform1uiEXT, NULL, 905), - NAME_FUNC_OFFSET(23816, glUniform1uivEXT, glUniform1uivEXT, NULL, 906), - NAME_FUNC_OFFSET(23830, glUniform2uiEXT, glUniform2uiEXT, NULL, 907), - NAME_FUNC_OFFSET(23843, glUniform2uivEXT, glUniform2uivEXT, NULL, 908), - NAME_FUNC_OFFSET(23857, glUniform3uiEXT, glUniform3uiEXT, NULL, 909), - NAME_FUNC_OFFSET(23870, glUniform3uivEXT, glUniform3uivEXT, NULL, 910), - NAME_FUNC_OFFSET(23884, glUniform4uiEXT, glUniform4uiEXT, NULL, 911), - NAME_FUNC_OFFSET(23897, glUniform4uivEXT, glUniform4uivEXT, NULL, 912), - NAME_FUNC_OFFSET(23911, glVertexAttribI1iEXT, glVertexAttribI1iEXT, NULL, 913), - NAME_FUNC_OFFSET(23929, glVertexAttribI1ivEXT, glVertexAttribI1ivEXT, NULL, 914), - NAME_FUNC_OFFSET(23948, glVertexAttribI1uiEXT, glVertexAttribI1uiEXT, NULL, 915), - NAME_FUNC_OFFSET(23967, glVertexAttribI1uivEXT, glVertexAttribI1uivEXT, NULL, 916), - NAME_FUNC_OFFSET(23987, glVertexAttribI2iEXT, glVertexAttribI2iEXT, NULL, 917), - NAME_FUNC_OFFSET(24005, glVertexAttribI2ivEXT, glVertexAttribI2ivEXT, NULL, 918), - NAME_FUNC_OFFSET(24024, glVertexAttribI2uiEXT, glVertexAttribI2uiEXT, NULL, 919), - NAME_FUNC_OFFSET(24043, glVertexAttribI2uivEXT, glVertexAttribI2uivEXT, NULL, 920), - NAME_FUNC_OFFSET(24063, glVertexAttribI3iEXT, glVertexAttribI3iEXT, NULL, 921), - NAME_FUNC_OFFSET(24081, glVertexAttribI3ivEXT, glVertexAttribI3ivEXT, NULL, 922), - NAME_FUNC_OFFSET(24100, glVertexAttribI3uiEXT, glVertexAttribI3uiEXT, NULL, 923), - NAME_FUNC_OFFSET(24119, glVertexAttribI3uivEXT, glVertexAttribI3uivEXT, NULL, 924), - NAME_FUNC_OFFSET(24139, glVertexAttribI4bvEXT, glVertexAttribI4bvEXT, NULL, 925), - NAME_FUNC_OFFSET(24158, glVertexAttribI4iEXT, glVertexAttribI4iEXT, NULL, 926), - NAME_FUNC_OFFSET(24176, glVertexAttribI4ivEXT, glVertexAttribI4ivEXT, NULL, 927), - NAME_FUNC_OFFSET(24195, glVertexAttribI4svEXT, glVertexAttribI4svEXT, NULL, 928), - NAME_FUNC_OFFSET(24214, glVertexAttribI4ubvEXT, glVertexAttribI4ubvEXT, NULL, 929), - NAME_FUNC_OFFSET(24234, glVertexAttribI4uiEXT, glVertexAttribI4uiEXT, NULL, 930), - NAME_FUNC_OFFSET(24253, glVertexAttribI4uivEXT, glVertexAttribI4uivEXT, NULL, 931), - NAME_FUNC_OFFSET(24273, glVertexAttribI4usvEXT, glVertexAttribI4usvEXT, NULL, 932), - NAME_FUNC_OFFSET(24293, glVertexAttribIPointerEXT, glVertexAttribIPointerEXT, NULL, 933), - NAME_FUNC_OFFSET(24316, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, 934), - NAME_FUNC_OFFSET(24342, glFramebufferTextureLayerEXT, glFramebufferTextureLayerEXT, NULL, 934), - NAME_FUNC_OFFSET(24371, glColorMaskIndexedEXT, glColorMaskIndexedEXT, NULL, 935), - NAME_FUNC_OFFSET(24384, glDisableIndexedEXT, glDisableIndexedEXT, NULL, 936), - NAME_FUNC_OFFSET(24395, glEnableIndexedEXT, glEnableIndexedEXT, NULL, 937), - NAME_FUNC_OFFSET(24405, glGetBooleanIndexedvEXT, glGetBooleanIndexedvEXT, NULL, 938), - NAME_FUNC_OFFSET(24421, glGetIntegerIndexedvEXT, glGetIntegerIndexedvEXT, NULL, 939), - NAME_FUNC_OFFSET(24437, glIsEnabledIndexedEXT, glIsEnabledIndexedEXT, NULL, 940), - NAME_FUNC_OFFSET(24450, glGetTexParameterIivEXT, glGetTexParameterIivEXT, NULL, 943), - NAME_FUNC_OFFSET(24471, glGetTexParameterIuivEXT, glGetTexParameterIuivEXT, NULL, 944), - NAME_FUNC_OFFSET(24493, glTexParameterIivEXT, glTexParameterIivEXT, NULL, 945), - NAME_FUNC_OFFSET(24511, glTexParameterIuivEXT, glTexParameterIuivEXT, NULL, 946), - NAME_FUNC_OFFSET(24530, glBeginConditionalRenderNV, glBeginConditionalRenderNV, NULL, 947), - NAME_FUNC_OFFSET(24555, glEndConditionalRenderNV, glEndConditionalRenderNV, NULL, 948), - NAME_FUNC_OFFSET(24578, glBeginTransformFeedbackEXT, glBeginTransformFeedbackEXT, NULL, 949), - NAME_FUNC_OFFSET(24603, glBindBufferBaseEXT, glBindBufferBaseEXT, NULL, 950), - NAME_FUNC_OFFSET(24620, glBindBufferRangeEXT, glBindBufferRangeEXT, NULL, 952), - NAME_FUNC_OFFSET(24638, glEndTransformFeedbackEXT, glEndTransformFeedbackEXT, NULL, 953), - NAME_FUNC_OFFSET(24661, glGetTransformFeedbackVaryingEXT, glGetTransformFeedbackVaryingEXT, NULL, 954), - NAME_FUNC_OFFSET(24691, glTransformFeedbackVaryingsEXT, glTransformFeedbackVaryingsEXT, NULL, 955), - NAME_FUNC_OFFSET(24719, glProvokingVertexEXT, glProvokingVertexEXT, NULL, 956), - NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0) -}; - -#undef NAME_FUNC_OFFSET diff --git a/dll/opengl/mesa/src/mapi/glapi/glthread.c b/dll/opengl/mesa/src/mapi/glapi/glthread.c deleted file mode 100644 index 00915380f97..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/glthread.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "glapi/glapi.h" - -unsigned long -_glthread_GetID(void) -{ - return u_thread_self(); -} diff --git a/dll/opengl/mesa/src/mapi/glapi/glthread.h b/dll/opengl/mesa/src/mapi/glapi/glthread.h deleted file mode 100644 index 1c3f4e2bf76..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/glthread.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef GLTHREAD_H -#define GLTHREAD_H - -#include "mapi/u_thread.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define _glthread_DECLARE_STATIC_MUTEX(name) u_mutex_declare_static(name) -#define _glthread_INIT_MUTEX(name) u_mutex_init(name) -#define _glthread_DESTROY_MUTEX(name) u_mutex_destroy(name) -#define _glthread_LOCK_MUTEX(name) u_mutex_lock(name) -#define _glthread_UNLOCK_MUTEX(name) u_mutex_unlock(name) - -#define _glthread_InitTSD(tsd) u_tsd_init(tsd); -#define _glthread_DestroyTSD(tsd) u_tsd_destroy(tsd); -#define _glthread_GetTSD(tsd) u_tsd_get(tsd); -#define _glthread_SetTSD(tsd, ptr) u_tsd_set(tsd, ptr); - -typedef struct u_tsd _glthread_TSD; -typedef u_mutex _glthread_Mutex; - -#ifdef __cplusplus -} -#endif - -#endif /* GLTHREAD_H */ diff --git a/dll/opengl/mesa/src/mapi/glapi/sources.mak b/dll/opengl/mesa/src/mapi/glapi/sources.mak deleted file mode 100644 index dfc6cc6db22..00000000000 --- a/dll/opengl/mesa/src/mapi/glapi/sources.mak +++ /dev/null @@ -1,19 +0,0 @@ -# src/mapi/glapi/sources.mak - -GLAPI_SOURCES = \ - glapi_dispatch.c \ - glapi_entrypoint.c \ - glapi_gentable.c \ - glapi_getproc.c \ - glapi_nop.c \ - glthread.c \ - glapi.c - -X86_API = \ - glapi_x86.S - -X86-64_API = \ - glapi_x86-64.S - -SPARC_API = \ - glapi_sparc.S diff --git a/dll/opengl/mesa/src/mapi/mapi/entry.c b/dll/opengl/mesa/src/mapi/mapi/entry.c deleted file mode 100644 index 3d9168a7243..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/entry.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Chia-I Wu - */ - -#include "entry.h" -#include "u_current.h" -#include "u_macros.h" - -/* define macros for use by assembly dispatchers */ -#define ENTRY_CURRENT_TABLE U_STRINGIFY(u_current_table) - -/* in bridge mode, mapi is a user of glapi */ -#ifdef MAPI_MODE_BRIDGE -#define ENTRY_CURRENT_TABLE_GET "_glapi_get_dispatch" -#else -#define ENTRY_CURRENT_TABLE_GET U_STRINGIFY(u_current_get_internal) -#endif - -#if defined(USE_X86_ASM) && defined(__GNUC__) -# ifdef GLX_USE_TLS -# include "entry_x86_tls.h" -# else -# include "entry_x86_tsd.h" -# endif -#elif defined(USE_X86_64_ASM) && defined(__GNUC__) && defined(GLX_USE_TLS) -# include "entry_x86-64_tls.h" -#else - -#include - -static INLINE const struct mapi_table * -entry_current_get(void) -{ -#ifdef MAPI_MODE_BRIDGE - return GET_DISPATCH(); -#else - return u_current_get(); -#endif -} - -/* C version of the public entries */ -#define MAPI_TMP_DEFINES -#define MAPI_TMP_PUBLIC_DECLARES -#define MAPI_TMP_PUBLIC_ENTRIES -#include "mapi_tmp.h" - -#ifndef MAPI_MODE_BRIDGE - -void -entry_patch_public(void) -{ -} - -mapi_func -entry_get_public(int slot) -{ - /* pubic_entries are defined by MAPI_TMP_PUBLIC_ENTRIES */ - return public_entries[slot]; -} - -mapi_func -entry_generate(int slot) -{ - return NULL; -} - -void -entry_patch(mapi_func entry, int slot) -{ -} - -#endif /* MAPI_MODE_BRIDGE */ - -#endif /* asm */ diff --git a/dll/opengl/mesa/src/mapi/mapi/entry.h b/dll/opengl/mesa/src/mapi/mapi/entry.h deleted file mode 100644 index 9df81000470..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/entry.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Chia-I Wu - */ - -#ifndef _ENTRY_H_ -#define _ENTRY_H_ - -#include "u_compiler.h" - -typedef void (*mapi_func)(void); - -void -entry_patch_public(void); - -mapi_func -entry_get_public(int slot); - -mapi_func -entry_generate(int slot); - -void -entry_patch(mapi_func entry, int slot); - -#endif /* _ENTRY_H_ */ diff --git a/dll/opengl/mesa/src/mapi/mapi/entry_x86-64_tls.h b/dll/opengl/mesa/src/mapi/mapi/entry_x86-64_tls.h deleted file mode 100644 index 72d4125a694..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/entry_x86-64_tls.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Chia-I Wu - */ - -#include "u_macros.h" - -#ifdef __linux__ -__asm__(".section .note.ABI-tag, \"a\"\n\t" - ".p2align 2\n\t" - ".long 1f - 0f\n\t" /* name length */ - ".long 3f - 2f\n\t" /* data length */ - ".long 1\n\t" /* note length */ - "0: .asciz \"GNU\"\n\t" /* vendor name */ - "1: .p2align 2\n\t" - "2: .long 0\n\t" /* note data: the ABI tag */ - ".long 2,4,20\n\t" /* Minimum kernel version w/TLS */ - "3: .p2align 2\n\t"); /* pad out section */ -#endif /* __linux__ */ - -__asm__(".text\n" - ".balign 32\n" - "x86_64_entry_start:"); - -#define STUB_ASM_ENTRY(func) \ - ".globl " func "\n" \ - ".type " func ", @function\n" \ - ".balign 32\n" \ - func ":" - -#define STUB_ASM_CODE(slot) \ - "movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t" \ - "movq %fs:(%rax), %r11\n\t" \ - "jmp *(8 * " slot ")(%r11)" - -#define MAPI_TMP_STUB_ASM_GCC -#include "mapi_tmp.h" - -#ifndef MAPI_MODE_BRIDGE - -__asm__("x86_64_current_tls:\n\t" - "movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t" - "ret"); - -extern unsigned long -x86_64_current_tls(); - -#include -#include "u_execmem.h" - -void -entry_patch_public(void) -{ -} - -static char -x86_64_entry_start[]; - -mapi_func -entry_get_public(int slot) -{ - return (mapi_func) (x86_64_entry_start + slot * 32); -} - -void -entry_patch(mapi_func entry, int slot) -{ - char *code = (char *) entry; - *((unsigned int *) (code + 12)) = slot * sizeof(mapi_func); -} - -mapi_func -entry_generate(int slot) -{ - const char code_templ[16] = { - /* movq %fs:0, %r11 */ - 0x64, 0x4c, 0x8b, 0x1c, 0x25, 0x00, 0x00, 0x00, 0x00, - /* jmp *0x1234(%r11) */ - 0x41, 0xff, 0xa3, 0x34, 0x12, 0x00, 0x00, - }; - unsigned long addr; - void *code; - mapi_func entry; - - addr = x86_64_current_tls(); - if ((addr >> 32) != 0xffffffff) - return NULL; - addr &= 0xffffffff; - - code = u_execmem_alloc(sizeof(code_templ)); - if (!code) - return NULL; - - memcpy(code, code_templ, sizeof(code_templ)); - - *((unsigned int *) (code + 5)) = addr; - entry = (mapi_func) code; - entry_patch(entry, slot); - - return entry; -} - -#endif /* MAPI_MODE_BRIDGE */ diff --git a/dll/opengl/mesa/src/mapi/mapi/entry_x86_tls.h b/dll/opengl/mesa/src/mapi/mapi/entry_x86_tls.h deleted file mode 100644 index de918128eee..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/entry_x86_tls.h +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Chia-I Wu - */ - -#include -#include "u_macros.h" - -#ifdef __linux__ -__asm__(".section .note.ABI-tag, \"a\"\n\t" - ".p2align 2\n\t" - ".long 1f - 0f\n\t" /* name length */ - ".long 3f - 2f\n\t" /* data length */ - ".long 1\n\t" /* note length */ - "0: .asciz \"GNU\"\n\t" /* vendor name */ - "1: .p2align 2\n\t" - "2: .long 0\n\t" /* note data: the ABI tag */ - ".long 2,4,20\n\t" /* Minimum kernel version w/TLS */ - "3: .p2align 2\n\t"); /* pad out section */ -#endif /* __linux__ */ - -__asm__(".text"); - -__asm__("x86_current_tls:\n\t" - "call 1f\n" - "1:\n\t" - "popl %eax\n\t" - "addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %eax\n\t" - "movl " ENTRY_CURRENT_TABLE "@GOTNTPOFF(%eax), %eax\n\t" - "ret"); - -#ifndef GLX_X86_READONLY_TEXT -__asm__(".section wtext, \"awx\", @progbits"); -#endif /* GLX_X86_READONLY_TEXT */ - -__asm__(".balign 16\n" - "x86_entry_start:"); - -#define STUB_ASM_ENTRY(func) \ - ".globl " func "\n" \ - ".type " func ", @function\n" \ - ".balign 16\n" \ - func ":" - -#define STUB_ASM_CODE(slot) \ - "call x86_current_tls\n\t" \ - "movl %gs:(%eax), %eax\n\t" \ - "jmp *(4 * " slot ")(%eax)" - -#define MAPI_TMP_STUB_ASM_GCC -#include "mapi_tmp.h" - -#ifndef GLX_X86_READONLY_TEXT -__asm__(".balign 16\n" - "x86_entry_end:"); -__asm__(".text"); -#endif /* GLX_X86_READONLY_TEXT */ - -#ifndef MAPI_MODE_BRIDGE - -#include "u_execmem.h" - -extern unsigned long -x86_current_tls(); - -static char x86_entry_start[]; -static char x86_entry_end[]; - -void -entry_patch_public(void) -{ -#ifndef GLX_X86_READONLY_TEXT - char patch[8] = { - 0x65, 0xa1, 0x00, 0x00, 0x00, 0x00, /* movl %gs:0x0, %eax */ - 0x90, 0x90 /* nop's */ - }; - char *entry; - - *((unsigned long *) (patch + 2)) = x86_current_tls(); - - for (entry = x86_entry_start; entry < x86_entry_end; entry += 16) - memcpy(entry, patch, sizeof(patch)); -#endif -} - -mapi_func -entry_get_public(int slot) -{ - return (mapi_func) (x86_entry_start + slot * 16); -} - -void -entry_patch(mapi_func entry, int slot) -{ - char *code = (char *) entry; - *((unsigned long *) (code + 8)) = slot * sizeof(mapi_func); -} - -mapi_func -entry_generate(int slot) -{ - const char code_templ[16] = { - 0x65, 0xa1, 0x00, 0x00, 0x00, 0x00, /* movl %gs:0x0, %eax */ - 0xff, 0xa0, 0x34, 0x12, 0x00, 0x00, /* jmp *0x1234(%eax) */ - 0x90, 0x90, 0x90, 0x90 /* nop's */ - }; - void *code; - mapi_func entry; - - code = u_execmem_alloc(sizeof(code_templ)); - if (!code) - return NULL; - - memcpy(code, code_templ, sizeof(code_templ)); - - *((unsigned long *) (code + 2)) = x86_current_tls(); - entry = (mapi_func) code; - entry_patch(entry, slot); - - return entry; -} - -#endif /* MAPI_MODE_BRIDGE */ diff --git a/dll/opengl/mesa/src/mapi/mapi/entry_x86_tsd.h b/dll/opengl/mesa/src/mapi/mapi/entry_x86_tsd.h deleted file mode 100644 index c479c199e23..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/entry_x86_tsd.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Chia-I Wu - */ - -#include "u_macros.h" - -#define X86_ENTRY_SIZE 32 - -__asm__(".text\n" - ".balign 32\n" - "x86_entry_start:"); - -#define STUB_ASM_ENTRY(func) \ - ".globl " func "\n" \ - ".type " func ", @function\n" \ - ".balign 32\n" \ - func ":" - -#define STUB_ASM_CODE(slot) \ - "movl " ENTRY_CURRENT_TABLE ", %eax\n\t" \ - "testl %eax, %eax\n\t" \ - "je 1f\n\t" \ - "jmp *(4 * " slot ")(%eax)\n" \ - "1:\n\t" \ - "call " ENTRY_CURRENT_TABLE_GET "\n\t" \ - "jmp *(4 * " slot ")(%eax)" - -#define MAPI_TMP_STUB_ASM_GCC -#include "mapi_tmp.h" - -#ifndef MAPI_MODE_BRIDGE - -__asm__(".balign 32\n" - "x86_entry_end:"); - -#include -#include "u_execmem.h" - -static const char x86_entry_start[]; -static const char x86_entry_end[]; - -void -entry_patch_public(void) -{ -} - -mapi_func -entry_get_public(int slot) -{ - return (mapi_func) (x86_entry_start + slot * X86_ENTRY_SIZE); -} - -void -entry_patch(mapi_func entry, int slot) -{ - char *code = (char *) entry; - - *((unsigned long *) (code + 11)) = slot * sizeof(mapi_func); - *((unsigned long *) (code + 22)) = slot * sizeof(mapi_func); -} - -mapi_func -entry_generate(int slot) -{ - const char *code_templ = x86_entry_end - X86_ENTRY_SIZE; - void *code; - mapi_func entry; - - code = u_execmem_alloc(X86_ENTRY_SIZE); - if (!code) - return NULL; - - memcpy(code, code_templ, X86_ENTRY_SIZE); - entry = (mapi_func) code; - entry_patch(entry, slot); - - return entry; -} - -#endif /* MAPI_MODE_BRIDGE */ diff --git a/dll/opengl/mesa/src/mapi/mapi/mapi.c b/dll/opengl/mesa/src/mapi/mapi/mapi.c deleted file mode 100644 index b471c40b144..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/mapi.c +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Chia-I Wu - */ - -#include -#include - -#include "u_current.h" -#include "u_thread.h" -#include "mapi.h" -#include "stub.h" -#include "table.h" - -/* dynamic stubs will run out before this array */ -static const struct mapi_stub *mapi_stub_map[MAPI_TABLE_NUM_SLOTS]; -static int mapi_num_stubs; - -static const struct mapi_stub * -get_stub(const char *name, const struct mapi_stub *alias) -{ - const struct mapi_stub *stub; - - stub = stub_find_public(name); - if (!stub) { - struct mapi_stub *dyn = stub_find_dynamic(name, 1); - if (dyn) { - stub_fix_dynamic(dyn, alias); - stub = dyn; - } - } - - return stub; -} - -/** - * Initialize mapi. spec consists of NULL-separated strings. The first string - * denotes the version. It is followed by variable numbers of entries. Each - * entry can have multiple names. An empty name terminates an entry. An empty - * entry terminates the spec. A spec of two entries, Foo and Bar, is as - * follows - * - * "1\0" - * "Foo\0" - * "FooEXT\0" - * "\0" - * "Bar\0" - * "\0" - */ -void -mapi_init(const char *spec) -{ - u_mutex_declare_static(mutex); - const char *p; - int ver, count; - - u_mutex_lock(mutex); - - /* already initialized */ - if (mapi_num_stubs) { - u_mutex_unlock(mutex); - return; - } - - count = 0; - p = spec; - - /* parse version string */ - ver = atoi(p); - if (ver != 1) { - u_mutex_unlock(mutex); - return; - } - p += strlen(p) + 1; - - while (*p) { - const struct mapi_stub *stub; - - stub = get_stub(p, NULL); - /* out of dynamic entries */ - if (!stub) - break; - p += strlen(p) + 1; - - while (*p) { - get_stub(p, stub); - p += strlen(p) + 1; - } - - mapi_stub_map[count++] = stub; - p++; - } - - mapi_num_stubs = count; - - u_mutex_unlock(mutex); -} - -/** - * Return the address of an entry. Optionally generate the entry if it does - * not exist. - */ -mapi_proc -mapi_get_proc_address(const char *name) -{ - const struct mapi_stub *stub; - - stub = stub_find_public(name); - if (!stub) - stub = stub_find_dynamic(name, 0); - - return (stub) ? (mapi_proc) stub_get_addr(stub) : NULL; -} - -/** - * Create a dispatch table. - */ -struct mapi_table * -mapi_table_create(void) -{ - const struct mapi_table *noop = table_get_noop(); - struct mapi_table *tbl; - - tbl = malloc(MAPI_TABLE_SIZE); - if (tbl) - memcpy(tbl, noop, MAPI_TABLE_SIZE); - - return tbl; -} - -/** - * Destroy a dispatch table. - */ -void -mapi_table_destroy(struct mapi_table *tbl) -{ - free(tbl); -} - -/** - * Fill a dispatch table. The order of the procs is determined when mapi_init - * is called. - */ -void -mapi_table_fill(struct mapi_table *tbl, const mapi_proc *procs) -{ - const struct mapi_table *noop = table_get_noop(); - int i; - - for (i = 0; i < mapi_num_stubs; i++) { - const struct mapi_stub *stub = mapi_stub_map[i]; - int slot = stub_get_slot(stub); - mapi_func func = (mapi_func) procs[i]; - - if (!func) - func = table_get_func(noop, slot); - table_set_func(tbl, slot, func); - } -} - -/** - * Make a dispatch table current. - */ -void -mapi_table_make_current(const struct mapi_table *tbl) -{ - u_current_set(tbl); -} diff --git a/dll/opengl/mesa/src/mapi/mapi/mapi.h b/dll/opengl/mesa/src/mapi/mapi/mapi.h deleted file mode 100644 index c7e43e22e9f..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/mapi.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Chia-I Wu - */ - -#ifndef _MAPI_H_ -#define _MAPI_H_ - -#include "u_compiler.h" - -#ifdef _WIN32 -#ifdef MAPI_DLL_EXPORTS -#define MAPI_EXPORT __declspec(dllexport) -#else -#define MAPI_EXPORT __declspec(dllimport) -#endif -#else /* _WIN32 */ -#define MAPI_EXPORT PUBLIC -#endif - -typedef void (*mapi_proc)(void); - -struct mapi_table; - -MAPI_EXPORT void -mapi_init(const char *spec); - -MAPI_EXPORT mapi_proc -mapi_get_proc_address(const char *name); - -MAPI_EXPORT struct mapi_table * -mapi_table_create(void); - -MAPI_EXPORT void -mapi_table_destroy(struct mapi_table *tbl); - -MAPI_EXPORT void -mapi_table_fill(struct mapi_table *tbl, const mapi_proc *procs); - -MAPI_EXPORT void -mapi_table_make_current(const struct mapi_table *tbl); - -#endif /* _MAPI_H_ */ diff --git a/dll/opengl/mesa/src/mapi/mapi/mapi_abi.py b/dll/opengl/mesa/src/mapi/mapi/mapi_abi.py deleted file mode 100644 index c18dd82d6e5..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/mapi_abi.py +++ /dev/null @@ -1,880 +0,0 @@ -#!/usr/bin/env python - -# Mesa 3-D graphics library -# Version: 7.9 -# -# Copyright (C) 2010 LunarG Inc. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. -# -# Authors: -# Chia-I Wu - -import sys -# make it possible to import glapi -import os -GLAPI = "./%s/../glapi/gen" % (os.path.dirname(sys.argv[0])) -sys.path.append(GLAPI) - -import re -from optparse import OptionParser - -# number of dynamic entries -ABI_NUM_DYNAMIC_ENTRIES = 256 - -class ABIEntry(object): - """Represent an ABI entry.""" - - _match_c_param = re.compile( - '^(?P[\w\s*]+?)(?P\w+)(\[(?P\d+)\])?$') - - def __init__(self, cols, attrs): - self._parse(cols) - - self.slot = attrs['slot'] - self.hidden = attrs['hidden'] - self.alias = attrs['alias'] - self.handcode = attrs['handcode'] - - def c_prototype(self): - return '%s %s(%s)' % (self.c_return(), self.name, self.c_params()) - - def c_return(self): - ret = self.ret - if not ret: - ret = 'void' - - return ret - - def c_params(self): - """Return the parameter list used in the entry prototype.""" - c_params = [] - for t, n, a in self.params: - sep = '' if t.endswith('*') else ' ' - arr = '[%d]' % a if a else '' - c_params.append(t + sep + n + arr) - if not c_params: - c_params.append('void') - - return ", ".join(c_params) - - def c_args(self): - """Return the argument list used in the entry invocation.""" - c_args = [] - for t, n, a in self.params: - c_args.append(n) - - return ", ".join(c_args) - - def _parse(self, cols): - ret = cols.pop(0) - if ret == 'void': - ret = None - - name = cols.pop(0) - - params = [] - if not cols: - raise Exception(cols) - elif len(cols) == 1 and cols[0] == 'void': - pass - else: - for val in cols: - params.append(self._parse_param(val)) - - self.ret = ret - self.name = name - self.params = params - - def _parse_param(self, c_param): - m = self._match_c_param.match(c_param) - if not m: - raise Exception('unrecognized param ' + c_param) - - c_type = m.group('type').strip() - c_name = m.group('name') - c_array = m.group('array') - c_array = int(c_array) if c_array else 0 - - return (c_type, c_name, c_array) - - def __str__(self): - return self.c_prototype() - - def __cmp__(self, other): - # compare slot, alias, and then name - res = cmp(self.slot, other.slot) - if not res: - if not self.alias: - res = -1 - elif not other.alias: - res = 1 - - if not res: - res = cmp(self.name, other.name) - - return res - -def abi_parse_xml(xml): - """Parse a GLAPI XML file for ABI entries.""" - import gl_XML, glX_XML - - api = gl_XML.parse_GL_API(xml, glX_XML.glx_item_factory()) - - entry_dict = {} - for func in api.functionIterateByOffset(): - # make sure func.name appear first - entry_points = func.entry_points[:] - entry_points.remove(func.name) - entry_points.insert(0, func.name) - - for name in entry_points: - attrs = { - 'slot': func.offset, - 'hidden': not func.is_static_entry_point(name), - 'alias': None if name == func.name else func.name, - 'handcode': bool(func.has_different_protocol(name)), - } - - # post-process attrs - if attrs['alias']: - try: - alias = entry_dict[attrs['alias']] - except KeyError: - raise Exception('failed to alias %s' % attrs['alias']) - if alias.alias: - raise Exception('recursive alias %s' % ent.name) - attrs['alias'] = alias - if attrs['handcode']: - attrs['handcode'] = func.static_glx_name(name) - else: - attrs['handcode'] = None - - if entry_dict.has_key(name): - raise Exception('%s is duplicated' % (name)) - - cols = [] - cols.append(func.return_type) - cols.append(name) - params = func.get_parameter_string(name) - cols.extend([p.strip() for p in params.split(',')]) - - ent = ABIEntry(cols, attrs) - entry_dict[ent.name] = ent - - entries = entry_dict.values() - entries.sort() - - return entries - -def abi_parse_line(line): - cols = [col.strip() for col in line.split(',')] - - attrs = { - 'slot': -1, - 'hidden': False, - 'alias': None, - 'handcode': None, - } - - # extract attributes from the first column - vals = cols[0].split(':') - while len(vals) > 1: - val = vals.pop(0) - if val.startswith('slot='): - attrs['slot'] = int(val[5:]) - elif val == 'hidden': - attrs['hidden'] = True - elif val.startswith('alias='): - attrs['alias'] = val[6:] - elif val.startswith('handcode='): - attrs['handcode'] = val[9:] - elif not val: - pass - else: - raise Exception('unknown attribute %s' % val) - cols[0] = vals[0] - - return (attrs, cols) - -def abi_parse(filename): - """Parse a CSV file for ABI entries.""" - fp = open(filename) if filename != '-' else sys.stdin - lines = [line.strip() for line in fp.readlines() - if not line.startswith('#') and line.strip()] - - entry_dict = {} - next_slot = 0 - for line in lines: - attrs, cols = abi_parse_line(line) - - # post-process attributes - if attrs['alias']: - try: - alias = entry_dict[attrs['alias']] - except KeyError: - raise Exception('failed to alias %s' % attrs['alias']) - if alias.alias: - raise Exception('recursive alias %s' % ent.name) - slot = alias.slot - attrs['alias'] = alias - else: - slot = next_slot - next_slot += 1 - - if attrs['slot'] < 0: - attrs['slot'] = slot - elif attrs['slot'] != slot: - raise Exception('invalid slot in %s' % (line)) - - ent = ABIEntry(cols, attrs) - if entry_dict.has_key(ent.name): - raise Exception('%s is duplicated' % (ent.name)) - entry_dict[ent.name] = ent - - entries = entry_dict.values() - entries.sort() - - return entries - -def abi_sanity_check(entries): - if not entries: - return - - all_names = [] - last_slot = entries[-1].slot - i = 0 - for slot in xrange(last_slot + 1): - if entries[i].slot != slot: - raise Exception('entries are not ordered by slots') - if entries[i].alias: - raise Exception('first entry of slot %d aliases %s' - % (slot, entries[i].alias.name)) - handcode = None - while i < len(entries) and entries[i].slot == slot: - ent = entries[i] - if not handcode and ent.handcode: - handcode = ent.handcode - elif ent.handcode != handcode: - raise Exception('two aliases with handcode %s != %s', - ent.handcode, handcode) - - if ent.name in all_names: - raise Exception('%s is duplicated' % (ent.name)) - if ent.alias and ent.alias.name not in all_names: - raise Exception('failed to alias %s' % (ent.alias.name)) - all_names.append(ent.name) - i += 1 - if i < len(entries): - raise Exception('there are %d invalid entries' % (len(entries) - 1)) - -class ABIPrinter(object): - """MAPI Printer""" - - def __init__(self, entries): - self.entries = entries - - # sort entries by their names - self.entries_sorted_by_names = self.entries[:] - self.entries_sorted_by_names.sort(lambda x, y: cmp(x.name, y.name)) - - self.indent = ' ' * 3 - self.noop_warn = 'noop_warn' - self.noop_generic = 'noop_generic' - self.current_get = 'entry_current_get' - - self.api_defines = [] - self.api_headers = ['"KHR/khrplatform.h"'] - self.api_call = 'KHRONOS_APICALL' - self.api_entry = 'KHRONOS_APIENTRY' - self.api_attrs = 'KHRONOS_APIATTRIBUTES' - - self.c_header = '' - - self.lib_need_table_size = True - self.lib_need_noop_array = True - self.lib_need_stubs = True - self.lib_need_all_entries = True - self.lib_need_non_hidden_entries = False - - def c_notice(self): - return '/* This file is automatically generated by mapi_abi.py. Do not modify. */' - - def c_public_includes(self): - """Return includes of the client API headers.""" - defines = ['#define ' + d for d in self.api_defines] - includes = ['#include ' + h for h in self.api_headers] - return "\n".join(defines + includes) - - def need_entry_point(self, ent): - """Return True if an entry point is needed for the entry.""" - # non-handcode hidden aliases may share the entry they alias - use_alias = (ent.hidden and ent.alias and not ent.handcode) - return not use_alias - - def c_public_declarations(self, prefix): - """Return the declarations of public entry points.""" - decls = [] - for ent in self.entries: - if not self.need_entry_point(ent): - continue - export = self.api_call if not ent.hidden else '' - decls.append(self._c_decl(ent, prefix, True, export) + ';') - - return "\n".join(decls) - - def c_mapi_table(self): - """Return defines of the dispatch table size.""" - num_static_entries = self.entries[-1].slot + 1 - return ('#define MAPI_TABLE_NUM_STATIC %d\n' + \ - '#define MAPI_TABLE_NUM_DYNAMIC %d') % ( - num_static_entries, ABI_NUM_DYNAMIC_ENTRIES) - - def c_mapi_table_initializer(self, prefix): - """Return the array initializer for mapi_table_fill.""" - entries = [self._c_function(ent, prefix) - for ent in self.entries if not ent.alias] - pre = self.indent + '(mapi_proc) ' - return pre + (',\n' + pre).join(entries) - - def c_mapi_table_spec(self): - """Return the spec for mapi_init.""" - specv1 = [] - line = '"1' - for ent in self.entries: - if not ent.alias: - line += '\\0"\n' - specv1.append(line) - line = '"' - line += '%s\\0' % ent.name - line += '";' - specv1.append(line) - - return self.indent + self.indent.join(specv1) - - def _c_function(self, ent, prefix, mangle=False, stringify=False): - """Return the function name of an entry.""" - formats = { - True: { True: '%s_STR(%s)', False: '%s(%s)' }, - False: { True: '"%s%s"', False: '%s%s' }, - } - fmt = formats[prefix.isupper()][stringify] - name = ent.name - if mangle and ent.hidden: - name = '_dispatch_stub_' + str(ent.slot) - return fmt % (prefix, name) - - def _c_function_call(self, ent, prefix): - """Return the function name used for calling.""" - if ent.handcode: - # _c_function does not handle this case - formats = { True: '%s(%s)', False: '%s%s' } - fmt = formats[prefix.isupper()] - name = fmt % (prefix, ent.handcode) - elif self.need_entry_point(ent): - name = self._c_function(ent, prefix, True) - else: - name = self._c_function(ent.alias, prefix, True) - return name - - def _c_decl(self, ent, prefix, mangle=False, export=''): - """Return the C declaration for the entry.""" - decl = '%s %s %s(%s)' % (ent.c_return(), self.api_entry, - self._c_function(ent, prefix, mangle), ent.c_params()) - if export: - decl = export + ' ' + decl - if self.api_attrs: - decl += ' ' + self.api_attrs - - return decl - - def _c_cast(self, ent): - """Return the C cast for the entry.""" - cast = '%s (%s *)(%s)' % ( - ent.c_return(), self.api_entry, ent.c_params()) - - return cast - - def c_private_declarations(self, prefix): - """Return the declarations of private functions.""" - decls = [self._c_decl(ent, prefix) + ';' - for ent in self.entries if not ent.alias] - - return "\n".join(decls) - - def c_public_dispatches(self, prefix, no_hidden): - """Return the public dispatch functions.""" - dispatches = [] - for ent in self.entries: - if ent.hidden and no_hidden: - continue - - if not self.need_entry_point(ent): - continue - - export = self.api_call if not ent.hidden else '' - - proto = self._c_decl(ent, prefix, True, export) - cast = self._c_cast(ent) - - ret = '' - if ent.ret: - ret = 'return ' - stmt1 = self.indent - stmt1 += 'const struct mapi_table *_tbl = %s();' % ( - self.current_get) - stmt2 = self.indent - stmt2 += 'mapi_func _func = ((const mapi_func *) _tbl)[%d];' % ( - ent.slot) - stmt3 = self.indent - stmt3 += '%s((%s) _func)(%s);' % (ret, cast, ent.c_args()) - - disp = '%s\n{\n%s\n%s\n%s\n}' % (proto, stmt1, stmt2, stmt3) - - if ent.handcode: - disp = '#if 0\n' + disp + '\n#endif' - - dispatches.append(disp) - - return '\n\n'.join(dispatches) - - def c_public_initializer(self, prefix): - """Return the initializer for public dispatch functions.""" - names = [] - for ent in self.entries: - if ent.alias: - continue - - name = '%s(mapi_func) %s' % (self.indent, - self._c_function_call(ent, prefix)) - names.append(name) - - return ',\n'.join(names) - - def c_stub_string_pool(self): - """Return the string pool for use by stubs.""" - # sort entries by their names - sorted_entries = self.entries[:] - sorted_entries.sort(lambda x, y: cmp(x.name, y.name)) - - pool = [] - offsets = {} - count = 0 - for ent in sorted_entries: - offsets[ent] = count - pool.append('%s' % (ent.name)) - count += len(ent.name) + 1 - - pool_str = self.indent + '"' + \ - ('\\0"\n' + self.indent + '"').join(pool) + '";' - return (pool_str, offsets) - - def c_stub_initializer(self, prefix, pool_offsets): - """Return the initializer for struct mapi_stub array.""" - stubs = [] - for ent in self.entries_sorted_by_names: - stubs.append('%s{ (void *) %d, %d, NULL }' % ( - self.indent, pool_offsets[ent], ent.slot)) - - return ',\n'.join(stubs) - - def c_noop_functions(self, prefix, warn_prefix): - """Return the noop functions.""" - noops = [] - for ent in self.entries: - if ent.alias: - continue - - proto = self._c_decl(ent, prefix, False, 'static') - - stmt1 = self.indent; - space = '' - for t, n, a in ent.params: - stmt1 += "%s(void) %s;" % (space, n) - space = ' ' - - if ent.params: - stmt1 += '\n'; - - stmt1 += self.indent + '%s(%s);' % (self.noop_warn, - self._c_function(ent, warn_prefix, False, True)) - - if ent.ret: - stmt2 = self.indent + 'return (%s) 0;' % (ent.ret) - noop = '%s\n{\n%s\n%s\n}' % (proto, stmt1, stmt2) - else: - noop = '%s\n{\n%s\n}' % (proto, stmt1) - - noops.append(noop) - - return '\n\n'.join(noops) - - def c_noop_initializer(self, prefix, use_generic): - """Return an initializer for the noop dispatch table.""" - entries = [self._c_function(ent, prefix) - for ent in self.entries if not ent.alias] - if use_generic: - entries = [self.noop_generic] * len(entries) - - entries.extend([self.noop_generic] * ABI_NUM_DYNAMIC_ENTRIES) - - pre = self.indent + '(mapi_func) ' - return pre + (',\n' + pre).join(entries) - - def c_asm_gcc(self, prefix, no_hidden): - asm = [] - - for ent in self.entries: - if ent.hidden and no_hidden: - continue - - if not self.need_entry_point(ent): - continue - - name = self._c_function(ent, prefix, True, True) - - if ent.handcode: - asm.append('#if 0') - - if ent.hidden: - asm.append('".hidden "%s"\\n"' % (name)) - - if ent.alias and not (ent.alias.hidden and no_hidden): - asm.append('".globl "%s"\\n"' % (name)) - asm.append('".set "%s", "%s"\\n"' % (name, - self._c_function(ent.alias, prefix, True, True))) - else: - asm.append('STUB_ASM_ENTRY(%s)"\\n"' % (name)) - asm.append('"\\t"STUB_ASM_CODE("%d")"\\n"' % (ent.slot)) - - if ent.handcode: - asm.append('#endif') - asm.append('') - - return "\n".join(asm) - - def output_for_lib(self): - print self.c_notice() - - if self.c_header: - print - print self.c_header - - print - print '#ifdef MAPI_TMP_DEFINES' - print self.c_public_includes() - print - print self.c_public_declarations(self.prefix_lib) - print '#undef MAPI_TMP_DEFINES' - print '#endif /* MAPI_TMP_DEFINES */' - - if self.lib_need_table_size: - print - print '#ifdef MAPI_TMP_TABLE' - print self.c_mapi_table() - print '#undef MAPI_TMP_TABLE' - print '#endif /* MAPI_TMP_TABLE */' - - if self.lib_need_noop_array: - print - print '#ifdef MAPI_TMP_NOOP_ARRAY' - print '#ifdef DEBUG' - print - print self.c_noop_functions(self.prefix_noop, self.prefix_warn) - print - print 'const mapi_func table_%s_array[] = {' % (self.prefix_noop) - print self.c_noop_initializer(self.prefix_noop, False) - print '};' - print - print '#else /* DEBUG */' - print - print 'const mapi_func table_%s_array[] = {' % (self.prefix_noop) - print self.c_noop_initializer(self.prefix_noop, True) - print '};' - print - print '#endif /* DEBUG */' - print '#undef MAPI_TMP_NOOP_ARRAY' - print '#endif /* MAPI_TMP_NOOP_ARRAY */' - - if self.lib_need_stubs: - pool, pool_offsets = self.c_stub_string_pool() - print - print '#ifdef MAPI_TMP_PUBLIC_STUBS' - print 'static const char public_string_pool[] =' - print pool - print - print 'static const struct mapi_stub public_stubs[] = {' - print self.c_stub_initializer(self.prefix_lib, pool_offsets) - print '};' - print '#undef MAPI_TMP_PUBLIC_STUBS' - print '#endif /* MAPI_TMP_PUBLIC_STUBS */' - - if self.lib_need_all_entries: - print - print '#ifdef MAPI_TMP_PUBLIC_ENTRIES' - print self.c_public_dispatches(self.prefix_lib, False) - print - print 'static const mapi_func public_entries[] = {' - print self.c_public_initializer(self.prefix_lib) - print '};' - print '#undef MAPI_TMP_PUBLIC_ENTRIES' - print '#endif /* MAPI_TMP_PUBLIC_ENTRIES */' - - print - print '#ifdef MAPI_TMP_STUB_ASM_GCC' - print '__asm__(' - print self.c_asm_gcc(self.prefix_lib, False) - print ');' - print '#undef MAPI_TMP_STUB_ASM_GCC' - print '#endif /* MAPI_TMP_STUB_ASM_GCC */' - - if self.lib_need_non_hidden_entries: - all_hidden = True - for ent in self.entries: - if not ent.hidden: - all_hidden = False - break - if not all_hidden: - print - print '#ifdef MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN' - print self.c_public_dispatches(self.prefix_lib, True) - print - print '/* does not need public_entries */' - print '#undef MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN' - print '#endif /* MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN */' - - print - print '#ifdef MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN' - print '__asm__(' - print self.c_asm_gcc(self.prefix_lib, True) - print ');' - print '#undef MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN' - print '#endif /* MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN */' - - def output_for_app(self): - print self.c_notice() - print - print self.c_private_declarations(self.prefix_app) - print - print '#ifdef API_TMP_DEFINE_SPEC' - print - print 'static const char %s_spec[] =' % (self.prefix_app) - print self.c_mapi_table_spec() - print - print 'static const mapi_proc %s_procs[] = {' % (self.prefix_app) - print self.c_mapi_table_initializer(self.prefix_app) - print '};' - print - print '#endif /* API_TMP_DEFINE_SPEC */' - -class GLAPIPrinter(ABIPrinter): - """OpenGL API Printer""" - - def __init__(self, entries, api=None): - api_entries = self._get_api_entries(entries, api) - super(GLAPIPrinter, self).__init__(api_entries) - - self.api_defines = ['GL_GLEXT_PROTOTYPES'] - self.api_headers = ['"GL/gl.h"', '"GL/glext.h"'] - self.api_call = 'GLAPI' - self.api_entry = 'APIENTRY' - self.api_attrs = '' - - self.lib_need_table_size = False - self.lib_need_noop_array = False - self.lib_need_stubs = False - self.lib_need_all_entries = False - self.lib_need_non_hidden_entries = True - - self.prefix_lib = 'GLAPI_PREFIX' - self.prefix_app = '_mesa_' - self.prefix_noop = 'noop' - self.prefix_warn = self.prefix_lib - - self.c_header = self._get_c_header() - - def _get_api_entries(self, entries, api): - """Override the entry attributes according to API.""" - import copy - - # no override - if api is None: - return entries - - api_entries = {} - for ent in entries: - ent = copy.copy(ent) - - # override 'hidden' and 'handcode' - ent.hidden = ent.name not in api - ent.handcode = False - if ent.alias: - ent.alias = api_entries[ent.alias.name] - - api_entries[ent.name] = ent - - # sanity check - missed = [name for name in api if name not in api_entries] - if missed: - raise Exception('%s is missing' % str(missed)) - - entries = api_entries.values() - entries.sort() - - return entries - - def _get_c_header(self): - header = """#ifndef _GLAPI_TMP_H_ -#define _GLAPI_TMP_H_ -#ifdef USE_MGL_NAMESPACE -#define GLAPI_PREFIX(func) mgl##func -#define GLAPI_PREFIX_STR(func) "mgl"#func -#else -#define GLAPI_PREFIX(func) gl##func -#define GLAPI_PREFIX_STR(func) "gl"#func -#endif /* USE_MGL_NAMESPACE */ - -typedef int GLfixed; -typedef int GLclampx; -#endif /* _GLAPI_TMP_H_ */""" - - return header - -class ES1APIPrinter(GLAPIPrinter): - """OpenGL ES 1.x API Printer""" - - def __init__(self, entries): - from gles_api import es1_api - - super(ES1APIPrinter, self).__init__(entries, es1_api) - self.prefix_lib = 'gl' - self.prefix_warn = 'gl' - - def _get_c_header(self): - header = """#ifndef _GLAPI_TMP_H_ -#define _GLAPI_TMP_H_ -typedef int GLfixed; -typedef int GLclampx; -#endif /* _GLAPI_TMP_H_ */""" - - return header - -class ES2APIPrinter(GLAPIPrinter): - """OpenGL ES 2.x API Printer""" - - def __init__(self, entries): - from gles_api import es2_api - - super(ES2APIPrinter, self).__init__(entries, es2_api) - self.prefix_lib = 'gl' - self.prefix_warn = 'gl' - - def _get_c_header(self): - header = """#ifndef _GLAPI_TMP_H_ -#define _GLAPI_TMP_H_ -typedef int GLfixed; -typedef int GLclampx; -#endif /* _GLAPI_TMP_H_ */""" - - return header - -class SharedGLAPIPrinter(GLAPIPrinter): - """Shared GLAPI API Printer""" - - def __init__(self, entries): - super(SharedGLAPIPrinter, self).__init__(entries, []) - - self.lib_need_table_size = True - self.lib_need_noop_array = True - self.lib_need_stubs = True - self.lib_need_all_entries = True - self.lib_need_non_hidden_entries = False - - self.prefix_lib = 'shared' - self.prefix_warn = 'gl' - - def _get_c_header(self): - header = """#ifndef _GLAPI_TMP_H_ -#define _GLAPI_TMP_H_ -typedef int GLfixed; -typedef int GLclampx; -#endif /* _GLAPI_TMP_H_ */""" - - return header - -class VGAPIPrinter(ABIPrinter): - """OpenVG API Printer""" - - def __init__(self, entries): - super(VGAPIPrinter, self).__init__(entries) - - self.api_defines = ['VG_VGEXT_PROTOTYPES'] - self.api_headers = ['"VG/openvg.h"', '"VG/vgext.h"'] - self.api_call = 'VG_API_CALL' - self.api_entry = 'VG_API_ENTRY' - self.api_attrs = 'VG_API_EXIT' - - self.prefix_lib = 'vg' - self.prefix_app = 'vega' - self.prefix_noop = 'noop' - self.prefix_warn = 'vg' - -def parse_args(): - printers = ['vgapi', 'glapi', 'es1api', 'es2api', 'shared-glapi'] - modes = ['lib', 'app'] - - parser = OptionParser(usage='usage: %prog [options] ') - parser.add_option('-p', '--printer', dest='printer', - help='printer to use: %s' % (", ".join(printers))) - parser.add_option('-m', '--mode', dest='mode', - help='target user: %s' % (", ".join(modes))) - - options, args = parser.parse_args() - if not args or options.printer not in printers or \ - options.mode not in modes: - parser.print_help() - sys.exit(1) - - return (args[0], options) - -def main(): - printers = { - 'vgapi': VGAPIPrinter, - 'glapi': GLAPIPrinter, - 'es1api': ES1APIPrinter, - 'es2api': ES2APIPrinter, - 'shared-glapi': SharedGLAPIPrinter, - } - - filename, options = parse_args() - - if filename.endswith('.xml'): - entries = abi_parse_xml(filename) - else: - entries = abi_parse(filename) - abi_sanity_check(entries) - - printer = printers[options.printer](entries) - if options.mode == 'lib': - printer.output_for_lib() - else: - printer.output_for_app() - -if __name__ == '__main__': - main() diff --git a/dll/opengl/mesa/src/mapi/mapi/mapi_glapi.c b/dll/opengl/mesa/src/mapi/mapi/mapi_glapi.c deleted file mode 100644 index adfc0cbcc9f..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/mapi_glapi.c +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Chia-I Wu - */ - -#include -#include "glapi/glapi.h" -#include "mapi/u_current.h" -#include "mapi/table.h" /* for MAPI_TABLE_NUM_SLOTS */ -#include "mapi/stub.h" - -/* - * Global variables, _glapi_get_context, and _glapi_get_dispatch are defined in - * u_current.c. - */ - -#ifdef GLX_USE_TLS -/* not used, but defined for compatibility */ -const struct _glapi_table *_glapi_Dispatch; -const void *_glapi_Context; -#endif /* GLX_USE_TLS */ - -void -_glapi_destroy_multithread(void) -{ - u_current_destroy(); -} - -void -_glapi_check_multithread(void) -{ - u_current_init(); -} - -void -_glapi_set_context(void *context) -{ - u_current_set_user((const void *) context); -} - -void -_glapi_set_dispatch(struct _glapi_table *dispatch) -{ - u_current_set((const struct mapi_table *) dispatch); -} - -/** - * Return size of dispatch table struct as number of functions (or - * slots). - */ -unsigned int -_glapi_get_dispatch_table_size(void) -{ - return MAPI_TABLE_NUM_SLOTS; -} - -/** - * Fill-in the dispatch stub for the named function. - * - * This function is intended to be called by a hardware driver. When called, - * a dispatch stub may be created created for the function. A pointer to this - * dispatch function will be returned by glXGetProcAddress. - * - * \param function_names Array of pointers to function names that should - * share a common dispatch offset. - * \param parameter_signature String representing the types of the parameters - * passed to the named function. Parameter types - * are converted to characters using the following - * rules: - * - 'i' for \c GLint, \c GLuint, and \c GLenum - * - 'p' for any pointer type - * - 'f' for \c GLfloat and \c GLclampf - * - 'd' for \c GLdouble and \c GLclampd - * - * \returns - * The offset in the dispatch table of the named function. A pointer to the - * driver's implementation of the named function should be stored at - * \c dispatch_table[\c offset]. Return -1 if error/problem. - * - * \sa glXGetProcAddress - * - * \warning - * This function can only handle up to 8 names at a time. As far as I know, - * the maximum number of names ever associated with an existing GL function is - * 4 (\c glPointParameterfSGIS, \c glPointParameterfEXT, - * \c glPointParameterfARB, and \c glPointParameterf), so this should not be - * too painful of a limitation. - * - * \todo - * Check parameter_signature. - */ -int -_glapi_add_dispatch( const char * const * function_names, - const char * parameter_signature ) -{ - const struct mapi_stub *function_stubs[8]; - const struct mapi_stub *alias = NULL; - unsigned i; - - (void) memset(function_stubs, 0, sizeof(function_stubs)); - - /* find the missing stubs, and decide the alias */ - for (i = 0; function_names[i] != NULL && i < 8; i++) { - const char * funcName = function_names[i]; - const struct mapi_stub *stub; - int slot; - - if (!funcName || funcName[0] != 'g' || funcName[1] != 'l') - return -1; - funcName += 2; - - stub = stub_find_public(funcName); - if (!stub) - stub = stub_find_dynamic(funcName, 0); - - slot = (stub) ? stub_get_slot(stub) : -1; - if (slot >= 0) { - if (alias && stub_get_slot(alias) != slot) - return -1; - /* use the first existing stub as the alias */ - if (!alias) - alias = stub; - - function_stubs[i] = stub; - } - } - - /* generate missing stubs */ - for (i = 0; function_names[i] != NULL && i < 8; i++) { - const char * funcName = function_names[i] + 2; - struct mapi_stub *stub; - - if (function_stubs[i]) - continue; - - stub = stub_find_dynamic(funcName, 1); - if (!stub) - return -1; - - stub_fix_dynamic(stub, alias); - if (!alias) - alias = stub; - } - - return (alias) ? stub_get_slot(alias) : -1; -} - -static const struct mapi_stub * -_glapi_get_stub(const char *name, int generate) -{ - const struct mapi_stub *stub; - -#ifdef USE_MGL_NAMESPACE - if (name) - name++; -#endif - - if (!name || name[0] != 'g' || name[1] != 'l') - return NULL; - name += 2; - - stub = stub_find_public(name); - if (!stub) - stub = stub_find_dynamic(name, generate); - - return stub; -} - -/** - * Return offset of entrypoint for named function within dispatch table. - */ -int -_glapi_get_proc_offset(const char *funcName) -{ - const struct mapi_stub *stub = _glapi_get_stub(funcName, 0); - return (stub) ? stub_get_slot(stub) : -1; -} - -/** - * Return pointer to the named function. If the function name isn't found - * in the name of static functions, try generating a new API entrypoint on - * the fly with assembly language. - */ -_glapi_proc -_glapi_get_proc_address(const char *funcName) -{ - const struct mapi_stub *stub = _glapi_get_stub(funcName, 1); - return (stub) ? (_glapi_proc) stub_get_addr(stub) : NULL; -} - -/** - * Return the name of the function at the given dispatch offset. - * This is only intended for debugging. - */ -const char * -_glapi_get_proc_name(unsigned int offset) -{ - /* not implemented */ - return NULL; -} - -unsigned long -_glthread_GetID(void) -{ - return u_thread_self(); -} - -void -_glapi_noop_enable_warnings(unsigned char enable) -{ -} - -void -_glapi_set_warning_func(_glapi_proc func) -{ -} diff --git a/dll/opengl/mesa/src/mapi/mapi/mapi_tmp.h b/dll/opengl/mesa/src/mapi/mapi/mapi_tmp.h deleted file mode 100644 index f326b4a4e14..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/mapi_tmp.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Chia-I Wu - */ - -#ifndef MAPI_ABI_HEADER -#error "MAPI_ABI_HEADER must be defined" -#endif - -/* does not need hidden entries in bridge mode */ -#ifdef MAPI_MODE_BRIDGE - -#ifdef MAPI_TMP_PUBLIC_ENTRIES -#undef MAPI_TMP_PUBLIC_ENTRIES -#define MAPI_TMP_PUBLIC_ENTRIES_NO_HIDDEN -#endif - -#ifdef MAPI_TMP_STUB_ASM_GCC -#undef MAPI_TMP_STUB_ASM_GCC -#define MAPI_TMP_STUB_ASM_GCC_NO_HIDDEN -#endif - -#endif /* MAPI_MODE_BRIDGE */ - -#include MAPI_ABI_HEADER diff --git a/dll/opengl/mesa/src/mapi/mapi/sources.mak b/dll/opengl/mesa/src/mapi/mapi/sources.mak deleted file mode 100644 index c50234b5789..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/sources.mak +++ /dev/null @@ -1,37 +0,0 @@ -# src/mapi/mapi/sources.mak -# -# mapi may be used in several ways -# -# - In default mode, mapi implements the interface defined by mapi.h. To use -# this mode, compile MAPI_SOURCES. -# -# - In util mode, mapi provides utility functions for use with glapi. To use -# this mode, compile MAPI_UTIL_SOURCES with MAPI_MODE_UTIL defined. -# -# - In glapi mode, mapi implements the interface defined by glapi.h. To use -# this mode, compile MAPI_GLAPI_SOURCES with MAPI_MODE_GLAPI defined. -# -# - In bridge mode, mapi provides entry points calling into glapi. To use -# this mode, compile MAPI_BRIDGE_SOURCES with MAPI_MODE_BRIDGE defined. - -MAPI_UTIL_SOURCES = \ - u_current.c \ - u_execmem.c \ - u_thread.c - -MAPI_SOURCES = \ - entry.c \ - mapi.c \ - stub.c \ - table.c \ - $(MAPI_UTIL_SOURCES) - -MAPI_GLAPI_SOURCES = \ - entry.c \ - mapi_glapi.c \ - stub.c \ - table.c \ - $(MAPI_UTIL_SOURCES) - -MAPI_BRIDGE_SOURCES = \ - entry.c diff --git a/dll/opengl/mesa/src/mapi/mapi/stub.c b/dll/opengl/mesa/src/mapi/mapi/stub.c deleted file mode 100644 index 99b475a3b4b..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/stub.c +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Chia-I Wu - */ - -#include -#include -#include - -#include "u_current.h" -#include "u_thread.h" -#include "entry.h" -#include "stub.h" -#include "table.h" - -#define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0])) - -struct mapi_stub { - const void *name; - int slot; - mapi_func addr; -}; - -/* define public_string_pool and public_stubs */ -#define MAPI_TMP_PUBLIC_STUBS -#include "mapi_tmp.h" - -static struct mapi_stub dynamic_stubs[MAPI_TABLE_NUM_DYNAMIC]; -static int num_dynamic_stubs; -static int next_dynamic_slot = MAPI_TABLE_NUM_STATIC; - -void -stub_init_once(void) -{ -#ifdef PTHREADS - static pthread_once_t once = PTHREAD_ONCE_INIT; - pthread_once(&once, entry_patch_public); -#else - static int first = 1; - if (first) { - first = 0; - entry_patch_public(); - } -#endif -} - -static int -stub_compare(const void *key, const void *elem) -{ - const char *name = (const char *) key; - const struct mapi_stub *stub = (const struct mapi_stub *) elem; - const char *stub_name; - - stub_name = &public_string_pool[(unsigned long) stub->name]; - - return strcmp(name, stub_name); -} - -/** - * Return the public stub with the given name. - */ -const struct mapi_stub * -stub_find_public(const char *name) -{ - return (const struct mapi_stub *) bsearch(name, public_stubs, - ARRAY_SIZE(public_stubs), sizeof(public_stubs[0]), stub_compare); -} - -/** - * Add a dynamic stub. - */ -static struct mapi_stub * -stub_add_dynamic(const char *name) -{ - struct mapi_stub *stub; - int idx; - - idx = num_dynamic_stubs; - /* minus 1 to make sure we can never reach the last slot */ - if (idx >= MAPI_TABLE_NUM_DYNAMIC - 1) - return NULL; - - stub = &dynamic_stubs[idx]; - - /* dispatch to the last slot, which is reserved for no-op */ - stub->addr = entry_generate( - MAPI_TABLE_NUM_STATIC + MAPI_TABLE_NUM_DYNAMIC - 1); - if (!stub->addr) - return NULL; - - stub->name = (const void *) name; - /* to be fixed later */ - stub->slot = -1; - - num_dynamic_stubs = idx + 1; - - return stub; -} - -/** - * Return the dynamic stub with the given name. If no such stub exists and - * generate is true, a new stub is generated. - */ -struct mapi_stub * -stub_find_dynamic(const char *name, int generate) -{ - u_mutex_declare_static(dynamic_mutex); - struct mapi_stub *stub = NULL; - int count, i; - - u_mutex_lock(dynamic_mutex); - - if (generate) - assert(!stub_find_public(name)); - - count = num_dynamic_stubs; - for (i = 0; i < count; i++) { - if (strcmp(name, (const char *) dynamic_stubs[i].name) == 0) { - stub = &dynamic_stubs[i]; - break; - } - } - - /* generate a dynamic stub */ - if (generate && !stub) - stub = stub_add_dynamic(name); - - u_mutex_unlock(dynamic_mutex); - - return stub; -} - -void -stub_fix_dynamic(struct mapi_stub *stub, const struct mapi_stub *alias) -{ - int slot; - - if (stub->slot >= 0) - return; - - if (alias) - slot = alias->slot; - else - slot = next_dynamic_slot++; - - entry_patch(stub->addr, slot); - stub->slot = slot; -} - -/** - * Return the name of a stub. - */ -const char * -stub_get_name(const struct mapi_stub *stub) -{ - const char *name; - - if (stub >= public_stubs && - stub < public_stubs + ARRAY_SIZE(public_stubs)) - name = &public_string_pool[(unsigned long) stub->name]; - else - name = (const char *) stub->name; - - return name; -} - -/** - * Return the slot of a stub. - */ -int -stub_get_slot(const struct mapi_stub *stub) -{ - return stub->slot; -} - -/** - * Return the address of a stub. - */ -mapi_func -stub_get_addr(const struct mapi_stub *stub) -{ - assert(stub->addr || (unsigned int) stub->slot < MAPI_TABLE_NUM_STATIC); - return (stub->addr) ? stub->addr : entry_get_public(stub->slot); -} diff --git a/dll/opengl/mesa/src/mapi/mapi/stub.h b/dll/opengl/mesa/src/mapi/mapi/stub.h deleted file mode 100644 index b2b6f1839c6..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/stub.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Chia-I Wu - */ - -#ifndef _STUB_H_ -#define _STUB_H_ - -#include "entry.h" - -struct mapi_stub; - -void -stub_init_once(void); - -const struct mapi_stub * -stub_find_public(const char *name); - -struct mapi_stub * -stub_find_dynamic(const char *name, int generate); - -void -stub_fix_dynamic(struct mapi_stub *stub, const struct mapi_stub *alias); - -const char * -stub_get_name(const struct mapi_stub *stub); - -int -stub_get_slot(const struct mapi_stub *stub); - -mapi_func -stub_get_addr(const struct mapi_stub *stub); - -#endif /* _STUB_H_ */ diff --git a/dll/opengl/mesa/src/mapi/mapi/table.c b/dll/opengl/mesa/src/mapi/mapi/table.c deleted file mode 100644 index 9bb9f654a2a..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/table.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Chia-I Wu - */ - -#include -#include - -#include "table.h" - -static void -noop_warn(const char *name) -{ - static int debug = -1; - - if (debug < 0) - debug = (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")); - - if (debug) - fprintf(stderr, "%s is no-op\n", name); -} - -static int -noop_generic(void) -{ - noop_warn("function"); - return 0; -} - -/* define noop_array */ -#define MAPI_TMP_DEFINES -#define MAPI_TMP_NOOP_ARRAY -#include "mapi_tmp.h" diff --git a/dll/opengl/mesa/src/mapi/mapi/table.h b/dll/opengl/mesa/src/mapi/mapi/table.h deleted file mode 100644 index d84523f7777..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/table.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Chia-I Wu - */ - -#ifndef _TABLE_H_ -#define _TABLE_H_ - -#include "u_compiler.h" -#include "entry.h" - -#define MAPI_TMP_TABLE -#include "mapi_tmp.h" - -#define MAPI_TABLE_NUM_SLOTS (MAPI_TABLE_NUM_STATIC + MAPI_TABLE_NUM_DYNAMIC) -#define MAPI_TABLE_SIZE (MAPI_TABLE_NUM_SLOTS * sizeof(mapi_func)) - -extern const mapi_func table_noop_array[]; - -/** - * Get the no-op dispatch table. - */ -static INLINE const struct mapi_table * -table_get_noop(void) -{ - return (const struct mapi_table *) table_noop_array; -} - -/** - * Set the function of a slot. - */ -static INLINE void -table_set_func(struct mapi_table *tbl, int slot, mapi_func func) -{ - mapi_func *funcs = (mapi_func *) tbl; - funcs[slot] = func; -} - -/** - * Return the function of a slot. - */ -static INLINE mapi_func -table_get_func(const struct mapi_table *tbl, int slot) -{ - const mapi_func *funcs = (const mapi_func *) tbl; - return funcs[slot]; -} - -#endif /* _TABLE_H_ */ diff --git a/dll/opengl/mesa/src/mapi/mapi/u_compiler.h b/dll/opengl/mesa/src/mapi/mapi/u_compiler.h deleted file mode 100644 index 2b019ed15b0..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/u_compiler.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef _U_COMPILER_H_ -#define _U_COMPILER_H_ - -/* Function inlining */ -#ifndef inline -# ifdef __cplusplus - /* C++ supports inline keyword */ -# elif defined(__GNUC__) -# define inline __inline__ -# elif defined(_MSC_VER) -# define inline __inline -# elif defined(__ICL) -# define inline __inline -# elif defined(__INTEL_COMPILER) - /* Intel compiler supports inline keyword */ -# elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100) -# define inline __inline -# elif defined(__SUNPRO_C) && defined(__C99FEATURES__) - /* C99 supports inline keyword */ -# elif (__STDC_VERSION__ >= 199901L) - /* C99 supports inline keyword */ -# else -# define inline -# endif -#endif -#ifndef INLINE -# define INLINE inline -#endif - -/* Function visibility */ -#ifndef PUBLIC -# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) -# define PUBLIC __attribute__((visibility("default"))) -# elif defined(_MSC_VER) -# define PUBLIC __declspec(dllexport) -# else -# define PUBLIC -# endif -#endif - -#ifndef likely -# if defined(__GNUC__) -# define likely(x) __builtin_expect(!!(x), 1) -# define unlikely(x) __builtin_expect(!!(x), 0) -# else -# define likely(x) (x) -# define unlikely(x) (x) -# endif -#endif - -#endif /* _U_COMPILER_H_ */ diff --git a/dll/opengl/mesa/src/mapi/mapi/u_current.c b/dll/opengl/mesa/src/mapi/mapi/u_current.c deleted file mode 100644 index 21a07abbae5..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/u_current.c +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.1 - * - * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * This file manages the OpenGL API dispatch layer. - * The dispatch table (struct _glapi_table) is basically just a list - * of function pointers. - * There are functions to set/get the current dispatch table for the - * current thread and to manage registration/dispatch of dynamically - * added extension functions. - * - * It's intended that this file and the other glapi*.[ch] files are - * flexible enough to be reused in several places: XFree86, DRI- - * based libGL.so, and perhaps the SGI SI. - * - * NOTE: There are no dependencies on Mesa in this code. - * - * Versions (API changes): - * 2000/02/23 - original version for Mesa 3.3 and XFree86 4.0 - * 2001/01/16 - added dispatch override feature for Mesa 3.5 - * 2002/06/28 - added _glapi_set_warning_func(), Mesa 4.1. - * 2002/10/01 - _glapi_get_proc_address() will now generate new entrypoints - * itself (using offset ~0). _glapi_add_entrypoint() can be - * called afterward and it'll fill in the correct dispatch - * offset. This allows DRI libGL to avoid probing for DRI - * drivers! No changes to the public glapi interface. - */ - -#include "u_current.h" -#include "u_thread.h" - -#ifndef MAPI_MODE_UTIL - -#include "table.h" -#include "stub.h" - -#else - -extern void init_glapi_relocs_once(void); -extern void (*__glapi_noop_table[])(void); - -#define table_noop_array __glapi_noop_table -#define stub_init_once() init_glapi_relocs_once() - -#endif - -/** - * \name Current dispatch and current context control variables - * - * Depending on whether or not multithreading is support, and the type of - * support available, several variables are used to store the current context - * pointer and the current dispatch table pointer. In the non-threaded case, - * the variables \c _glapi_Dispatch and \c _glapi_Context are used for this - * purpose. - * - * In the "normal" threaded case, the variables \c _glapi_Dispatch and - * \c _glapi_Context will be \c NULL if an application is detected as being - * multithreaded. Single-threaded applications will use \c _glapi_Dispatch - * and \c _glapi_Context just like the case without any threading support. - * When \c _glapi_Dispatch and \c _glapi_Context are \c NULL, the thread state - * data \c _gl_DispatchTSD and \c ContextTSD are used. Drivers and the - * static dispatch functions access these variables via \c _glapi_get_dispatch - * and \c _glapi_get_context. - * - * There is a race condition in setting \c _glapi_Dispatch to \c NULL. It is - * possible for the original thread to be setting it at the same instant a new - * thread, perhaps running on a different processor, is clearing it. Because - * of that, \c ThreadSafe, which can only ever be changed to \c GL_TRUE, is - * used to determine whether or not the application is multithreaded. - * - * In the TLS case, the variables \c _glapi_Dispatch and \c _glapi_Context are - * hardcoded to \c NULL. Instead the TLS variables \c _glapi_tls_Dispatch and - * \c _glapi_tls_Context are used. Having \c _glapi_Dispatch and - * \c _glapi_Context be hardcoded to \c NULL maintains binary compatability - * between TLS enabled loaders and non-TLS DRI drivers. - */ -/*@{*/ -#if defined(GLX_USE_TLS) - -__thread struct mapi_table *u_current_table - __attribute__((tls_model("initial-exec"))) - = (struct mapi_table *) table_noop_array; - -__thread void *u_current_user - __attribute__((tls_model("initial-exec"))); - -#else - -struct mapi_table *u_current_table = - (struct mapi_table *) table_noop_array; -void *u_current_user; - -#ifdef THREADS -struct u_tsd u_current_table_tsd; -static struct u_tsd u_current_user_tsd; -static int ThreadSafe; -#endif /* THREADS */ - -#endif /* defined(GLX_USE_TLS) */ -/*@}*/ - - -void -u_current_destroy(void) -{ -#if defined(THREADS) && defined(WIN32) - u_tsd_destroy(&u_current_table_tsd); - u_tsd_destroy(&u_current_user_tsd); -#endif -} - - -#if defined(THREADS) && !defined(GLX_USE_TLS) - -static void -u_current_init_tsd(void) -{ - u_tsd_init(&u_current_table_tsd); - u_tsd_init(&u_current_user_tsd); -} - -/** - * Mutex for multithread check. - */ -u_mutex_declare_static(ThreadCheckMutex); - -/** - * We should call this periodically from a function such as glXMakeCurrent - * in order to test if multiple threads are being used. - */ -void -u_current_init(void) -{ - static unsigned long knownID; - static int firstCall = 1; - - if (ThreadSafe) - return; - - u_mutex_lock(ThreadCheckMutex); - if (firstCall) { - u_current_init_tsd(); - - knownID = u_thread_self(); - firstCall = 0; - } - else if (knownID != u_thread_self()) { - ThreadSafe = 1; - u_current_set(NULL); - u_current_set_user(NULL); - } - u_mutex_unlock(ThreadCheckMutex); -} - -#else - -void -u_current_init(void) -{ -} - -#endif - - - -/** - * Set the current context pointer for this thread. - * The context pointer is an opaque type which should be cast to - * void from the real context pointer type. - */ -void -u_current_set_user(const void *ptr) -{ - u_current_init(); - -#if defined(GLX_USE_TLS) - u_current_user = (void *) ptr; -#elif defined(THREADS) - u_tsd_set(&u_current_user_tsd, (void *) ptr); - u_current_user = (ThreadSafe) ? NULL : (void *) ptr; -#else - u_current_user = (void *) ptr; -#endif -} - -/** - * Get the current context pointer for this thread. - * The context pointer is an opaque type which should be cast from - * void to the real context pointer type. - */ -void * -u_current_get_user_internal(void) -{ -#if defined(GLX_USE_TLS) - return u_current_user; -#elif defined(THREADS) - return (ThreadSafe) - ? u_tsd_get(&u_current_user_tsd) - : u_current_user; -#else - return u_current_user; -#endif -} - -/** - * Set the global or per-thread dispatch table pointer. - * If the dispatch parameter is NULL we'll plug in the no-op dispatch - * table (__glapi_noop_table). - */ -void -u_current_set(const struct mapi_table *tbl) -{ - u_current_init(); - - stub_init_once(); - - if (!tbl) - tbl = (const struct mapi_table *) table_noop_array; - -#if defined(GLX_USE_TLS) - u_current_table = (struct mapi_table *) tbl; -#elif defined(THREADS) - u_tsd_set(&u_current_table_tsd, (void *) tbl); - u_current_table = (ThreadSafe) ? NULL : (void *) tbl; -#else - u_current_table = (struct mapi_table *) tbl; -#endif -} - -/** - * Return pointer to current dispatch table for calling thread. - */ -struct mapi_table * -u_current_get_internal(void) -{ -#if defined(GLX_USE_TLS) - return u_current_table; -#elif defined(THREADS) - return (struct mapi_table *) ((ThreadSafe) ? - u_tsd_get(&u_current_table_tsd) : (void *) u_current_table); -#else - return u_current_table; -#endif -} diff --git a/dll/opengl/mesa/src/mapi/mapi/u_current.h b/dll/opengl/mesa/src/mapi/mapi/u_current.h deleted file mode 100644 index f9cffd8c3d0..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/u_current.h +++ /dev/null @@ -1,87 +0,0 @@ -#ifndef _U_CURRENT_H_ -#define _U_CURRENT_H_ - -#if defined(MAPI_MODE_UTIL) || defined(MAPI_MODE_GLAPI) || \ - defined(MAPI_MODE_BRIDGE) - -#include "glapi/glapi.h" - -/* ugly renames to match glapi.h */ -#define mapi_table _glapi_table - -#ifdef GLX_USE_TLS -#define u_current_table _glapi_tls_Dispatch -#define u_current_user _glapi_tls_Context -#else -#define u_current_table _glapi_Dispatch -#define u_current_user _glapi_Context -#endif - -#define u_current_get_internal _glapi_get_dispatch -#define u_current_get_user_internal _glapi_get_context - -#define u_current_table_tsd _gl_DispatchTSD - -#else /* MAPI_MODE_UTIL || MAPI_MODE_GLAPI || MAPI_MODE_BRIDGE */ - -#include "u_compiler.h" - -struct mapi_table; - -#ifdef GLX_USE_TLS - -extern __thread struct mapi_table *u_current_table - __attribute__((tls_model("initial-exec"))); - -extern __thread void *u_current_user - __attribute__((tls_model("initial-exec"))); - -#else /* GLX_USE_TLS */ - -extern struct mapi_table *u_current_table; -extern void *u_current_user; - -#endif /* GLX_USE_TLS */ - -#endif /* MAPI_MODE_UTIL || MAPI_MODE_GLAPI || MAPI_MODE_BRIDGE */ - -void -u_current_init(void); - -void -u_current_destroy(void); - -void -u_current_set(const struct mapi_table *tbl); - -struct mapi_table * -u_current_get_internal(void); - -void -u_current_set_user(const void *ptr); - -void * -u_current_get_user_internal(void); - -static INLINE const struct mapi_table * -u_current_get(void) -{ -#ifdef GLX_USE_TLS - return u_current_table; -#else - return (likely(u_current_table) ? - u_current_table : u_current_get_internal()); -#endif -} - -static INLINE const void * -u_current_get_user(void) -{ -#ifdef GLX_USE_TLS - return u_current_user; -#else - return likely(u_current_user) ? u_current_user : u_current_get_user_internal(); -#endif -} - -#endif /* _U_CURRENT_H_ */ diff --git a/dll/opengl/mesa/src/mapi/mapi/u_execmem.c b/dll/opengl/mesa/src/mapi/mapi/u_execmem.c deleted file mode 100644 index 4c327444c5f..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/u_execmem.c +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/** - * \file glapi_execmem.c - * - * Function for allocating executable memory for dispatch stubs. - * - * Copied from main/execmem.c and simplified for dispatch stubs. - */ - - -#include "u_compiler.h" -#include "u_thread.h" -#include "u_execmem.h" - - -#define EXEC_MAP_SIZE (4*1024) - -u_mutex_declare_static(exec_mutex); - -static unsigned int head = 0; - -static unsigned char *exec_mem = (unsigned char *)0; - - -#if defined(__linux__) || defined(__OpenBSD__) || defined(_NetBSD__) || defined(__sun) - -#include -#include - -#ifdef MESA_SELINUX -#include -#endif - - -#ifndef MAP_ANONYMOUS -#define MAP_ANONYMOUS MAP_ANON -#endif - - -/* - * Dispatch stubs are of fixed size and never freed. Thus, we do not need to - * overlay a heap, we just mmap a page and manage through an index. - */ - -static int -init_map(void) -{ -#ifdef MESA_SELINUX - if (is_selinux_enabled()) { - if (!security_get_boolean_active("allow_execmem") || - !security_get_boolean_pending("allow_execmem")) - return 0; - } -#endif - - if (!exec_mem) - exec_mem = mmap(NULL, EXEC_MAP_SIZE, PROT_EXEC | PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - - return (exec_mem != MAP_FAILED); -} - - -#elif defined(_WIN32) - -//#include - -/* - * Avoid Data Execution Prevention. - */ - -static int -init_map(void) -{ - exec_mem = VirtualAlloc(NULL, EXEC_MAP_SIZE, MEM_COMMIT, PAGE_EXECUTE_READWRITE); - - return (exec_mem != NULL); -} - - -#else - -#include - -static int -init_map(void) -{ - exec_mem = malloc(EXEC_MAP_SIZE); - - return (exec_mem != NULL); -} - - -#endif - -void * -u_execmem_alloc(unsigned int size) -{ - void *addr = NULL; - - u_mutex_lock(exec_mutex); - - if (!init_map()) - goto bail; - - /* free space check, assumes no integer overflow */ - if (head + size > EXEC_MAP_SIZE) - goto bail; - - /* allocation, assumes proper addr and size alignement */ - addr = exec_mem + head; - head += size; - -bail: - u_mutex_unlock(exec_mutex); - - return addr; -} - - diff --git a/dll/opengl/mesa/src/mapi/mapi/u_execmem.h b/dll/opengl/mesa/src/mapi/mapi/u_execmem.h deleted file mode 100644 index 13fff8df225..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/u_execmem.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _U_EXECMEM_H_ -#define _U_EXECMEM_H_ - -void * -u_execmem_alloc(unsigned int size); - -#endif /* _U_EXECMEM_H_ */ diff --git a/dll/opengl/mesa/src/mapi/mapi/u_macros.h b/dll/opengl/mesa/src/mapi/mapi/u_macros.h deleted file mode 100644 index 72345b5f156..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/u_macros.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _U_MACROS_ -#define _U_MACROS_ - -#define _U_STRINGIFY(x) #x -#define _U_CONCAT(x, y) x ## y -#define _U_CONCAT_STR(x, y) #x#y - -#define U_STRINGIFY(x) _U_STRINGIFY(x) -#define U_CONCAT(x, y) _U_CONCAT(x, y) -#define U_CONCAT_STR(x, y) _U_CONCAT_STR(x, y) - -#endif /* _U_MACROS_ */ diff --git a/dll/opengl/mesa/src/mapi/mapi/u_thread.c b/dll/opengl/mesa/src/mapi/mapi/u_thread.c deleted file mode 100644 index 7b52ca99b3a..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/u_thread.c +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5.1 - * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include -#include -#include "u_compiler.h" -#include "u_thread.h" - - -/* - * This file should still compile even when THREADS is not defined. - * This is to make things easier to deal with on the makefile scene.. - */ -#ifdef THREADS -#include - -/* - * Error messages - */ -#define INIT_TSD_ERROR "_glthread_: failed to allocate key for thread specific data" -#define GET_TSD_ERROR "_glthread_: failed to get thread specific data" -#define SET_TSD_ERROR "_glthread_: thread failed to set thread specific data" - - -/* - * Magic number to determine if a TSD object has been initialized. - * Kind of a hack but there doesn't appear to be a better cross-platform - * solution. - */ -#define INIT_MAGIC 0xff8adc98 - - - -/* - * POSIX Threads -- The best way to go if your platform supports them. - * Solaris >= 2.5 have POSIX threads, IRIX >= 6.4 reportedly - * has them, and many of the free Unixes now have them. - * Be sure to use appropriate -mt or -D_REENTRANT type - * compile flags when building. - */ -#ifdef PTHREADS - -unsigned long -u_thread_self(void) -{ - return (unsigned long) pthread_self(); -} - - -void -u_tsd_init(struct u_tsd *tsd) -{ - if (pthread_key_create(&tsd->key, NULL/*free*/) != 0) { - perror(INIT_TSD_ERROR); - exit(-1); - } - tsd->initMagic = INIT_MAGIC; -} - - -void * -u_tsd_get(struct u_tsd *tsd) -{ - if (tsd->initMagic != (int) INIT_MAGIC) { - u_tsd_init(tsd); - } - return pthread_getspecific(tsd->key); -} - - -void -u_tsd_set(struct u_tsd *tsd, void *ptr) -{ - if (tsd->initMagic != (int) INIT_MAGIC) { - u_tsd_init(tsd); - } - if (pthread_setspecific(tsd->key, ptr) != 0) { - perror(SET_TSD_ERROR); - exit(-1); - } -} - -#endif /* PTHREADS */ - - - -/* - * Win32 Threads. The only available option for Windows 95/NT. - * Be sure that you compile using the Multithreaded runtime, otherwise - * bad things will happen. - */ -#ifdef WIN32 - -unsigned long -u_thread_self(void) -{ - return GetCurrentThreadId(); -} - - -void -u_tsd_init(struct u_tsd *tsd) -{ - tsd->key = TlsAlloc(); - if (tsd->key == TLS_OUT_OF_INDEXES) { - perror(INIT_TSD_ERROR); - exit(-1); - } - tsd->initMagic = INIT_MAGIC; -} - - -void -u_tsd_destroy(struct u_tsd *tsd) -{ - if (tsd->initMagic != INIT_MAGIC) { - return; - } - TlsFree(tsd->key); - tsd->initMagic = 0x0; -} - - -void * -u_tsd_get(struct u_tsd *tsd) -{ - if (tsd->initMagic != INIT_MAGIC) { - u_tsd_init(tsd); - } - return TlsGetValue(tsd->key); -} - - -void -u_tsd_set(struct u_tsd *tsd, void *ptr) -{ - /* the following code assumes that the struct u_tsd has been initialized - to zero at creation */ - if (tsd->initMagic != INIT_MAGIC) { - u_tsd_init(tsd); - } - if (TlsSetValue(tsd->key, ptr) == 0) { - perror(SET_TSD_ERROR); - exit(-1); - } -} - -#endif /* WIN32 */ - - -#else /* THREADS */ - - -/* - * no-op functions - */ - -unsigned long -u_thread_self(void) -{ - return 0; -} - - -void -u_tsd_init(struct u_tsd *tsd) -{ - (void) tsd; -} - - -void * -u_tsd_get(struct u_tsd *tsd) -{ - (void) tsd; - return NULL; -} - - -void -u_tsd_set(struct u_tsd *tsd, void *ptr) -{ - (void) tsd; - (void) ptr; -} - - -#endif /* THREADS */ diff --git a/dll/opengl/mesa/src/mapi/mapi/u_thread.h b/dll/opengl/mesa/src/mapi/mapi/u_thread.h deleted file mode 100644 index 3f3dd3b3e48..00000000000 --- a/dll/opengl/mesa/src/mapi/mapi/u_thread.h +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5.2 - * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * Thread support for gl dispatch. - * - * Initial version by John Stone (j.stone@acm.org) (johns@cs.umr.edu) - * and Christoph Poliwoda (poliwoda@volumegraphics.com) - * Revised by Keith Whitwell - * Adapted for new gl dispatcher by Brian Paul - * Modified for use in mapi by Chia-I Wu - */ - -/* - * If this file is accidentally included by a non-threaded build, - * it should not cause the build to fail, or otherwise cause problems. - * In general, it should only be included when needed however. - */ - -#ifndef _U_THREAD_H_ -#define _U_THREAD_H_ - -#include "u_compiler.h" - -#if defined(PTHREADS) -#include /* POSIX threads headers */ -#endif -#ifdef _WIN32 -//#include -#include -#include -#include -#endif - -#if defined(PTHREADS) || defined(_WIN32) -#ifndef THREADS -#define THREADS -#endif -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* - * POSIX threads. This should be your choice in the Unix world - * whenever possible. When building with POSIX threads, be sure - * to enable any compiler flags which will cause the MT-safe - * libc (if one exists) to be used when linking, as well as any - * header macros for MT-safe errno, etc. For Solaris, this is the -mt - * compiler flag. On Solaris with gcc, use -D_REENTRANT to enable - * proper compiling for MT-safe libc etc. - */ -#if defined(PTHREADS) - -struct u_tsd { - pthread_key_t key; - int initMagic; -}; - -typedef pthread_mutex_t u_mutex; - -#define u_mutex_declare_static(name) \ - static u_mutex name = PTHREAD_MUTEX_INITIALIZER - -#define u_mutex_init(name) pthread_mutex_init(&(name), NULL) -#define u_mutex_destroy(name) pthread_mutex_destroy(&(name)) -#define u_mutex_lock(name) (void) pthread_mutex_lock(&(name)) -#define u_mutex_unlock(name) (void) pthread_mutex_unlock(&(name)) - -#endif /* PTHREADS */ - - -/* - * Windows threads. Should work with Windows NT and 95. - * IMPORTANT: Link with multithreaded runtime library when THREADS are - * used! - */ -#ifdef WIN32 - -struct u_tsd { - DWORD key; - int initMagic; -}; - -typedef CRITICAL_SECTION u_mutex; - -/* http://locklessinc.com/articles/pthreads_on_windows/ */ -#define u_mutex_declare_static(name) \ - static u_mutex name = {(PCRITICAL_SECTION_DEBUG)-1, -1, 0, 0, 0, 0} - -#define u_mutex_init(name) InitializeCriticalSection(&name) -#define u_mutex_destroy(name) DeleteCriticalSection(&name) -#define u_mutex_lock(name) EnterCriticalSection(&name) -#define u_mutex_unlock(name) LeaveCriticalSection(&name) - -#endif /* WIN32 */ - - -/* - * THREADS not defined - */ -#ifndef THREADS - -struct u_tsd { - int initMagic; -}; - -typedef unsigned u_mutex; - -#define u_mutex_declare_static(name) static u_mutex name = 0 -#define u_mutex_init(name) (void) name -#define u_mutex_destroy(name) (void) name -#define u_mutex_lock(name) (void) name -#define u_mutex_unlock(name) (void) name - -#endif /* THREADS */ - - -unsigned long -u_thread_self(void); - -void -u_tsd_init(struct u_tsd *tsd); - -void -u_tsd_destroy(struct u_tsd *tsd); /* WIN32 only */ - -void * -u_tsd_get(struct u_tsd *tsd); - -void -u_tsd_set(struct u_tsd *tsd, void *ptr); - - -#ifdef __cplusplus -} -#endif - -#endif /* _U_THREAD_H_ */ diff --git a/dll/opengl/mesa/src/mesa/CMakeLists.txt b/dll/opengl/mesa/src/mesa/CMakeLists.txt deleted file mode 100644 index 42c3191c8ee..00000000000 --- a/dll/opengl/mesa/src/mesa/CMakeLists.txt +++ /dev/null @@ -1,303 +0,0 @@ - -set_cpp(WITH_STL) - -add_definitions( - -DFEATURE_GL=1 - -D_GDI32_ # prevent gl* being declared __declspec(dllimport) in MS headers - -DBUILD_GL32 # declare gl* as __declspec(dllexport) in Mesa headers - -D_GLAPI_NO_EXPORTS # prevent _glapi_* from being declared __declspec(dllimport) -) - -# From Sconscript -include_directories( - ../mapi - ../glsl - . - ../../generated/mesa) - -if((ARCH STREQUAL "i386") AND (NOT MSVC)) - list(APPEND SOURCE - x86/common_x86.c - # x86/x86_xform.c - # x86/3dnow.c - x86/sse.c - x86/common_x86_asm.S - x86/x86_xform2.S - x86/x86_xform3.S - x86/x86_xform4.S - x86/x86_cliptest.S - x86/mmx_blend.S - x86/3dnow_xform1.S - x86/3dnow_xform2.S - x86/3dnow_xform3.S - x86/3dnow_xform4.S - x86/3dnow_normal.S - x86/sse_xform1.S - x86/sse_xform2.S - x86/sse_xform3.S - x86/sse_xform4.S - x86/sse_normal.S - x86/read_rgba_span_x86.S) - add_definitions( - -DUSE_X86_ASM - -DUSE_MMX_ASM - -DUSE_3DNOW_ASM - -DUSE_SSE_ASM - ) -endif() - -list(APPEND SOURCE -# generated files - ../../generated/mesa/program/lex.yy.c - ../../generated/mesa/program/program_parse.tab.c -# regular files - main/api_arrayelt.c - main/api_exec.c - main/api_exec_es1.c - main/api_exec_es2.c - main/api_loopback.c - main/api_validate.c - main/accum.c - main/arbprogram.c - main/atifragshader.c - main/attrib.c - main/arrayobj.c - main/blend.c - main/bufferobj.c - main/buffers.c - main/clear.c - main/clip.c - main/colortab.c - main/condrender.c - main/context.c - main/convolve.c - main/cpuinfo.c - main/debug.c - main/depth.c - main/dlist.c - main/dlopen.c - main/drawpix.c - main/drawtex.c - main/enable.c - main/enums.c - main/eval.c - main/execmem.c - main/extensions.c - main/fbobject.c - main/feedback.c - main/ff_fragment_shader.cpp - main/ffvertex_prog.c - main/fog.c - main/formats.c - main/format_pack.c - main/format_unpack.c - main/framebuffer.c - main/get.c - main/getstring.c - main/hash.c - main/hint.c - main/histogram.c - main/image.c - main/imports.c - main/light.c - main/lines.c - main/matrix.c - main/mipmap.c - main/mm.c - main/multisample.c - main/nvprogram.c - main/pack.c - main/pbo.c - main/pixel.c - main/pixelstore.c - main/pixeltransfer.c - main/points.c - main/polygon.c - main/querymatrix.c - main/queryobj.c - main/rastpos.c - main/readpix.c - main/remap.c - main/renderbuffer.c - main/samplerobj.c - main/scissor.c - main/shaderapi.c - main/shaderobj.c - main/shader_query.cpp - main/shared.c - main/state.c - main/stencil.c - main/syncobj.c - main/texcompress.c - main/texcompress_rgtc.c - main/texcompress_s3tc.c - main/texcompress_fxt1.c - main/texcompress_etc.c - main/texenv.c - main/texformat.c - main/texgen.c - main/texgetimage.c - main/teximage.c - main/texobj.c - main/texpal.c - main/texparam.c - main/texstate.c - main/texstorage.c - main/texstore.c - main/texturebarrier.c - main/transformfeedback.c - main/uniform_query.cpp - main/uniforms.c - main/varray.c - main/version.c - main/viewport.c - main/vtxfmt.c - math/m_debug_clip.c - math/m_debug_norm.c - math/m_debug_xform.c - math/m_eval.c - math/m_matrix.c - math/m_translate.c - math/m_vector.c - # math/m_xform.c - # swrast/s_aaline.c - # swrast/s_aatriangle.c - # swrast/s_alpha.c - # swrast/s_atifragshader.c - # swrast/s_bitmap.c - # swrast/s_blend.c - # swrast/s_blit.c - # swrast/s_clear.c - # swrast/s_copypix.c - # swrast/s_context.c - # swrast/s_depth.c - # swrast/s_drawpix.c - # swrast/s_feedback.c - # swrast/s_fog.c - # swrast/s_fragprog.c - # swrast/s_lines.c - # swrast/s_logic.c - # swrast/s_masking.c - # swrast/s_points.c - # swrast/s_renderbuffer.c - # swrast/s_span.c - # swrast/s_stencil.c - # swrast/s_texcombine.c - # swrast/s_texfetch.c - # swrast/s_texfilter.c - # swrast/s_texrender.c - # swrast/s_texture.c - # swrast/s_triangle.c - # swrast/s_zoom.c - # swrast_setup/ss_context.c - # swrast_setup/ss_triangle.c - # tnl/t_context.c - # tnl/t_pipeline.c - # tnl/t_draw.c - # tnl/t_rasterpos.c - # tnl/t_vb_program.c - # tnl/t_vb_render.c - # tnl/t_vb_texgen.c - # tnl/t_vb_texmat.c - # tnl/t_vb_vertex.c - # tnl/t_vb_fog.c - # tnl/t_vb_light.c - # tnl/t_vb_normals.c - # tnl/t_vb_points.c - # tnl/t_vp_build.c - # tnl/t_vertex.c - # tnl/t_vertex_sse.c - # tnl/t_vertex_generic.c - vbo/vbo_context.c - vbo/vbo_exec.c - vbo/vbo_exec_api.c - vbo/vbo_exec_array.c - vbo/vbo_exec_draw.c - vbo/vbo_exec_eval.c - vbo/vbo_noop.c - vbo/vbo_rebase.c - vbo/vbo_split.c - vbo/vbo_split_copy.c - vbo/vbo_split_inplace.c - vbo/vbo_save.c - vbo/vbo_save_api.c - vbo/vbo_save_draw.c - vbo/vbo_save_loopback.c - state_tracker/st_atom.c - state_tracker/st_atom_blend.c - state_tracker/st_atom_clip.c - state_tracker/st_atom_constbuf.c - state_tracker/st_atom_depth.c - state_tracker/st_atom_framebuffer.c - state_tracker/st_atom_msaa.c - state_tracker/st_atom_pixeltransfer.c - state_tracker/st_atom_sampler.c - state_tracker/st_atom_scissor.c - state_tracker/st_atom_shader.c - state_tracker/st_atom_rasterizer.c - state_tracker/st_atom_stipple.c - state_tracker/st_atom_texture.c - state_tracker/st_atom_viewport.c - state_tracker/st_cb_bitmap.c - state_tracker/st_cb_blit.c - state_tracker/st_cb_bufferobjects.c - state_tracker/st_cb_clear.c - state_tracker/st_cb_condrender.c - state_tracker/st_cb_flush.c - state_tracker/st_cb_drawpixels.c - state_tracker/st_cb_drawtex.c - state_tracker/st_cb_eglimage.c - state_tracker/st_cb_fbo.c - state_tracker/st_cb_feedback.c - state_tracker/st_cb_program.c - state_tracker/st_cb_queryobj.c - state_tracker/st_cb_rasterpos.c - state_tracker/st_cb_readpixels.c - state_tracker/st_cb_syncobj.c - state_tracker/st_cb_strings.c - state_tracker/st_cb_texture.c - state_tracker/st_cb_texturebarrier.c - state_tracker/st_cb_viewport.c - state_tracker/st_cb_xformfb.c - state_tracker/st_context.c - state_tracker/st_debug.c - state_tracker/st_draw.c - state_tracker/st_draw_feedback.c - state_tracker/st_extensions.c - state_tracker/st_format.c - state_tracker/st_glsl_to_tgsi.cpp - state_tracker/st_gen_mipmap.c - state_tracker/st_manager.c - state_tracker/st_mesa_to_tgsi.c - state_tracker/st_program.c - state_tracker/st_texture.c - program/arbprogparse.c - program/hash_table.c - program/ir_to_mesa.cpp - program/nvfragparse.c - program/nvvertparse.c - program/program.c - program/program_parse_extra.c - program/prog_cache.c - program/prog_execute.c - program/prog_instruction.c - program/prog_noise.c - program/prog_optimize.c - program/prog_opt_constant_fold.c - program/prog_parameter.c - program/prog_parameter_layout.c - program/prog_print.c - program/prog_statevars.c - program/programopt.c - program/sampler.cpp - program/symbol_table.c - program/string_to_uint_map.cpp - # drivers/common/driverfuncs.c - # drivers/common/meta.c -) - -if(NOT MSVC) - add_compile_flags("-Wno-format") -endif() - -add_library(mesa_core STATIC EXCLUDE_FROM_ALL ${SOURCE}) diff --git a/dll/opengl/mesa/src/mesa/SConscript b/dll/opengl/mesa/src/mesa/SConscript deleted file mode 100644 index 4754fbfc8c0..00000000000 --- a/dll/opengl/mesa/src/mesa/SConscript +++ /dev/null @@ -1,513 +0,0 @@ -####################################################################### -# SConscript for Mesa - - -Import('*') -import filecmp -import os -import subprocess - -env = env.Clone() - -env.Append(CPPPATH = [ - '#/src/mapi', - '#/src/glsl', - '#/src/mesa', -]) - -env.Append(CPPDEFINES = [ - 'FEATURE_GL=1', -]) - -if env['platform'] == 'windows': - env.Append(CPPDEFINES = [ - '_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers - 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers - ]) - if not env['gles']: - # prevent _glapi_* from being declared __declspec(dllimport) - env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS']) -else: - env.Append(CPPDEFINES = [ - 'IN_DRI_DRIVER', # enable the remap table (for DRI drivers) - ]) - -# -# Source files -# - -main_sources = [ - 'main/api_arrayelt.c', - 'main/api_exec.c', - 'main/api_loopback.c', - 'main/api_validate.c', - 'main/accum.c', - 'main/arbprogram.c', - 'main/atifragshader.c', - 'main/attrib.c', - 'main/arrayobj.c', - 'main/blend.c', - 'main/bufferobj.c', - 'main/buffers.c', - 'main/clear.c', - 'main/clip.c', - 'main/colortab.c', - 'main/condrender.c', - 'main/context.c', - 'main/convolve.c', - 'main/cpuinfo.c', - 'main/debug.c', - 'main/depth.c', - 'main/dlist.c', - 'main/dlopen.c', - 'main/drawpix.c', - 'main/drawtex.c', - 'main/enable.c', - 'main/enums.c', - 'main/eval.c', - 'main/execmem.c', - 'main/extensions.c', - 'main/fbobject.c', - 'main/feedback.c', - 'main/ff_fragment_shader.cpp', - 'main/ffvertex_prog.c', - 'main/fog.c', - 'main/formats.c', - 'main/format_pack.c', - 'main/format_unpack.c', - 'main/framebuffer.c', - 'main/get.c', - 'main/getstring.c', - 'main/hash.c', - 'main/hint.c', - 'main/histogram.c', - 'main/image.c', - 'main/imports.c', - 'main/light.c', - 'main/lines.c', - 'main/matrix.c', - 'main/mipmap.c', - 'main/mm.c', - 'main/multisample.c', - 'main/nvprogram.c', - 'main/pack.c', - 'main/pbo.c', - 'main/pixel.c', - 'main/pixelstore.c', - 'main/pixeltransfer.c', - 'main/points.c', - 'main/polygon.c', - 'main/querymatrix.c', - 'main/queryobj.c', - 'main/rastpos.c', - 'main/readpix.c', - 'main/remap.c', - 'main/renderbuffer.c', - 'main/samplerobj.c', - 'main/scissor.c', - 'main/shaderapi.c', - 'main/shaderobj.c', - 'main/shader_query.cpp', - 'main/shared.c', - 'main/state.c', - 'main/stencil.c', - 'main/syncobj.c', - 'main/texcompress.c', - 'main/texcompress_rgtc.c', - 'main/texcompress_s3tc.c', - 'main/texcompress_fxt1.c', - 'main/texcompress_etc.c', - 'main/texenv.c', - 'main/texformat.c', - 'main/texgen.c', - 'main/texgetimage.c', - 'main/teximage.c', - 'main/texobj.c', - 'main/texpal.c', - 'main/texparam.c', - 'main/texstate.c', - 'main/texstorage.c', - 'main/texstore.c', - 'main/texturebarrier.c', - 'main/transformfeedback.c', - 'main/uniform_query.cpp', - 'main/uniforms.c', - 'main/varray.c', - 'main/version.c', - 'main/viewport.c', - 'main/vtxfmt.c', -] - -math_sources = [ - 'math/m_debug_clip.c', - 'math/m_debug_norm.c', - 'math/m_debug_xform.c', - 'math/m_eval.c', - 'math/m_matrix.c', - 'math/m_translate.c', - 'math/m_vector.c', - 'math/m_xform.c', -] - -swrast_sources = [ - 'swrast/s_aaline.c', - 'swrast/s_aatriangle.c', - 'swrast/s_alpha.c', - 'swrast/s_atifragshader.c', - 'swrast/s_bitmap.c', - 'swrast/s_blend.c', - 'swrast/s_blit.c', - 'swrast/s_clear.c', - 'swrast/s_copypix.c', - 'swrast/s_context.c', - 'swrast/s_depth.c', - 'swrast/s_drawpix.c', - 'swrast/s_feedback.c', - 'swrast/s_fog.c', - 'swrast/s_fragprog.c', - 'swrast/s_lines.c', - 'swrast/s_logic.c', - 'swrast/s_masking.c', - 'swrast/s_points.c', - 'swrast/s_renderbuffer.c', - 'swrast/s_span.c', - 'swrast/s_stencil.c', - 'swrast/s_texcombine.c', - 'swrast/s_texfetch.c', - 'swrast/s_texfilter.c', - 'swrast/s_texrender.c', - 'swrast/s_texture.c', - 'swrast/s_triangle.c', - 'swrast/s_zoom.c', -] - -swrast_setup_sources = [ - 'swrast_setup/ss_context.c', - 'swrast_setup/ss_triangle.c', -] - -tnl_sources = [ - 'tnl/t_context.c', - 'tnl/t_pipeline.c', - 'tnl/t_draw.c', - 'tnl/t_rasterpos.c', - 'tnl/t_vb_program.c', - 'tnl/t_vb_render.c', - 'tnl/t_vb_texgen.c', - 'tnl/t_vb_texmat.c', - 'tnl/t_vb_vertex.c', - 'tnl/t_vb_fog.c', - 'tnl/t_vb_light.c', - 'tnl/t_vb_normals.c', - 'tnl/t_vb_points.c', - 'tnl/t_vp_build.c', - 'tnl/t_vertex.c', - 'tnl/t_vertex_sse.c', - 'tnl/t_vertex_generic.c', -] - -vbo_sources = [ - 'vbo/vbo_context.c', - 'vbo/vbo_exec.c', - 'vbo/vbo_exec_api.c', - 'vbo/vbo_exec_array.c', - 'vbo/vbo_exec_draw.c', - 'vbo/vbo_exec_eval.c', - 'vbo/vbo_noop.c', - 'vbo/vbo_rebase.c', - 'vbo/vbo_split.c', - 'vbo/vbo_split_copy.c', - 'vbo/vbo_split_inplace.c', - 'vbo/vbo_save.c', - 'vbo/vbo_save_api.c', - 'vbo/vbo_save_draw.c', - 'vbo/vbo_save_loopback.c', -] - -statetracker_sources = [ - 'state_tracker/st_atom.c', - 'state_tracker/st_atom_blend.c', - 'state_tracker/st_atom_clip.c', - 'state_tracker/st_atom_constbuf.c', - 'state_tracker/st_atom_depth.c', - 'state_tracker/st_atom_framebuffer.c', - 'state_tracker/st_atom_msaa.c', - 'state_tracker/st_atom_pixeltransfer.c', - 'state_tracker/st_atom_sampler.c', - 'state_tracker/st_atom_scissor.c', - 'state_tracker/st_atom_shader.c', - 'state_tracker/st_atom_rasterizer.c', - 'state_tracker/st_atom_stipple.c', - 'state_tracker/st_atom_texture.c', - 'state_tracker/st_atom_viewport.c', - 'state_tracker/st_cb_bitmap.c', - 'state_tracker/st_cb_blit.c', - 'state_tracker/st_cb_bufferobjects.c', - 'state_tracker/st_cb_clear.c', - 'state_tracker/st_cb_condrender.c', - 'state_tracker/st_cb_flush.c', - 'state_tracker/st_cb_drawpixels.c', - 'state_tracker/st_cb_drawtex.c', - 'state_tracker/st_cb_eglimage.c', - 'state_tracker/st_cb_fbo.c', - 'state_tracker/st_cb_feedback.c', - 'state_tracker/st_cb_program.c', - 'state_tracker/st_cb_queryobj.c', - 'state_tracker/st_cb_rasterpos.c', - 'state_tracker/st_cb_readpixels.c', - 'state_tracker/st_cb_syncobj.c', - 'state_tracker/st_cb_strings.c', - 'state_tracker/st_cb_texture.c', - 'state_tracker/st_cb_texturebarrier.c', - 'state_tracker/st_cb_viewport.c', - 'state_tracker/st_cb_xformfb.c', - 'state_tracker/st_context.c', - 'state_tracker/st_debug.c', - 'state_tracker/st_draw.c', - 'state_tracker/st_draw_feedback.c', - 'state_tracker/st_extensions.c', - 'state_tracker/st_format.c', - 'state_tracker/st_glsl_to_tgsi.cpp', - 'state_tracker/st_gen_mipmap.c', - 'state_tracker/st_manager.c', - 'state_tracker/st_mesa_to_tgsi.c', - 'state_tracker/st_program.c', - 'state_tracker/st_texture.c', -] - -env.Append(YACCFLAGS = '-d') -program_lex = env.CFile('program/lex.yy.c', 'program/program_lexer.l') -program_parse = env.CFile('program/program_parse.tab.c', - 'program/program_parse.y') - -# Make program/program_parse.tab.h reacheable from the include path -env.Append(CPPPATH = [Dir('.').abspath]) - -program_sources = [ - 'program/arbprogparse.c', - 'program/hash_table.c', - 'program/ir_to_mesa.cpp', - 'program/nvfragparse.c', - 'program/nvvertparse.c', - 'program/program.c', - 'program/program_parse_extra.c', - 'program/prog_cache.c', - 'program/prog_execute.c', - 'program/prog_instruction.c', - 'program/prog_noise.c', - 'program/prog_optimize.c', - 'program/prog_opt_constant_fold.c', - 'program/prog_parameter.c', - 'program/prog_parameter_layout.c', - 'program/prog_print.c', - 'program/prog_statevars.c', - 'program/programopt.c', - 'program/sampler.cpp', - 'program/symbol_table.c', - 'program/string_to_uint_map.cpp', - program_lex, - program_parse[0], -] - -common_driver_sources = [ - 'drivers/common/driverfuncs.c', - 'drivers/common/meta.c', -] - -mesa_sources = ( - main_sources + - math_sources + - program_sources + - vbo_sources + - tnl_sources + - swrast_sources + - swrast_setup_sources + - common_driver_sources + - statetracker_sources -) - -if env['gles']: - from sys import executable as python_cmd - - env.Append(CPPDEFINES = ['FEATURE_ES1=1', 'FEATURE_ES2=1']) - - # generate GLES sources - gles_sources = [] - gles_sources += env.CodeGenerate( - target = 'main/api_exec_es1.c', - script = 'main/es_generator.py', - source = 'main/APIspec.xml', - command = python_cmd + ' $SCRIPT -S $SOURCE -V GLES1.1 > $TARGET' - ) - gles_sources += env.CodeGenerate( - target = 'main/api_exec_es2.c', - script = 'main/es_generator.py', - source = 'main/APIspec.xml', - command = python_cmd + ' $SCRIPT -S $SOURCE -V GLES2.0 > $TARGET' - ) - - # generate GLES headers - GLAPI = '#src/mapi/glapi/' - gles_headers = [] - gles_headers += env.CodeGenerate( - target = 'main/api_exec_es1_dispatch.h', - script = GLAPI + 'gen/gl_table.py', - source = GLAPI + 'gen/gl_and_es_API.xml', - command = python_cmd + ' $SCRIPT -c es1 -m remap_table -f $SOURCE > $TARGET', - ) - gles_headers += env.CodeGenerate( - target = 'main/api_exec_es1_remap_helper.h', - script = GLAPI + 'gen/remap_helper.py', - source = GLAPI + 'gen/gl_and_es_API.xml', - command = python_cmd + ' $SCRIPT -c es1 -f $SOURCE > $TARGET', - ) - gles_headers += env.CodeGenerate( - target = 'main/api_exec_es2_dispatch.h', - script = GLAPI + 'gen/gl_table.py', - source = GLAPI + 'gen/gl_and_es_API.xml', - command = python_cmd + ' $SCRIPT -c es2 -m remap_table -f $SOURCE > $TARGET', - ) - gles_headers += env.CodeGenerate( - target = 'main/api_exec_es2_remap_helper.h', - script = GLAPI + 'gen/remap_helper.py', - source = GLAPI + 'gen/gl_and_es_API.xml', - command = python_cmd + ' $SCRIPT -c es2 -f $SOURCE > $TARGET', - ) - - env.Depends(gles_sources, gles_headers) - - # gles_sources #include gles_headers with full path - env.Append(CPPPATH = [gles_headers[0].dir.up().up()]) - - mesa_sources += gles_sources - -# -# Assembly sources -# -if env['gcc'] and env['platform'] != 'windows': - if env['machine'] == 'x86': - env.Append(CPPDEFINES = [ - 'USE_X86_ASM', - 'USE_MMX_ASM', - 'USE_3DNOW_ASM', - 'USE_SSE_ASM', - ]) - mesa_sources += [ - 'x86/common_x86.c', - 'x86/x86_xform.c', - 'x86/3dnow.c', - 'x86/sse.c', - 'x86/common_x86_asm.S', - 'x86/x86_xform2.S', - 'x86/x86_xform3.S', - 'x86/x86_xform4.S', - 'x86/x86_cliptest.S', - 'x86/mmx_blend.S', - 'x86/3dnow_xform1.S', - 'x86/3dnow_xform2.S', - 'x86/3dnow_xform3.S', - 'x86/3dnow_xform4.S', - 'x86/3dnow_normal.S', - 'x86/sse_xform1.S', - 'x86/sse_xform2.S', - 'x86/sse_xform3.S', - 'x86/sse_xform4.S', - 'x86/sse_normal.S', - 'x86/read_rgba_span_x86.S', - ] - elif env['machine'] == 'x86_64': - env.Append(CPPDEFINES = [ - 'USE_X86_64_ASM', - ]) - mesa_sources += [ - 'x86-64/x86-64.c', - 'x86-64/xform4.S', - ] - elif env['machine'] == 'ppc': - env.Append(CPPDEFINES = [ - 'USE_PPC_ASM', - 'USE_VMX_ASM', - ]) - mesa_sources += [ - 'ppc/common_ppc.c', - ] - elif env['machine'] == 'sparc': - mesa_sources += [ - 'sparc/sparc.c', - 'sparc/clip.S', - 'sparc/norm.S', - 'sparc/xform.S', - ] - else: - pass - - # Generate matypes.h - if env['machine'] in ('x86', 'x86_64'): - # See http://www.scons.org/wiki/UsingCodeGenerators - gen_matypes = env.Program( - target = 'gen_matypes', - source = 'x86/gen_matypes.c', - ) - matypes = env.Command( - 'matypes.h', - gen_matypes, - gen_matypes[0].abspath + ' > $TARGET', - ) - # Add the dir containing the generated header (somewhere inside the - # build dir) to the include path - env.Append(CPPPATH = [matypes[0].dir]) - - - - -def write_git_sha1_h_file(filename): - """Mesa looks for a git_sha1.h file at compile time in order to display - the current git hash id in the GL_VERSION string. This function tries - to retrieve the git hashid and write the header file. An empty file - will be created if anything goes wrong.""" - - args = [ 'git', 'log', '-n', '1', '--oneline' ] - try: - (commit, foo) = subprocess.Popen(args, stdout=subprocess.PIPE).communicate() - except: - # git log command didn't work - if not os.path.exists(filename): - # create an empty file if none already exists - f = open(filename, "w") - f.close() - return - - commit = '#define MESA_GIT_SHA1 "git-%s"\n' % commit[0:7] - tempfile = "git_sha1.h.tmp" - f = open(tempfile, "w") - f.write(commit) - f.close() - if not os.path.exists(filename) or not filecmp.cmp(tempfile, filename): - # The filename does not exist or it's different from the new file, - # so replace old file with new. - if os.path.exists(filename): - os.remove(filename) - os.rename(tempfile, filename) - return - - -# Create the git_sha1.h header file -write_git_sha1_h_file("main/git_sha1.h") -# and update CPPPATH so the git_sha1.h header can be found -env.Append(CPPPATH = ["#" + env['build_dir'] + "/mesa/main"]) - - -# -# Libraries -# - -mesa = env.ConvenienceLibrary( - target = 'mesa', - source = mesa_sources, -) - -env.Alias('mesa', mesa) - -Export('mesa') - -SConscript('drivers/SConscript') diff --git a/dll/opengl/mesa/src/mesa/drivers/SConscript b/dll/opengl/mesa/src/mesa/drivers/SConscript deleted file mode 100644 index ab0f8943290..00000000000 --- a/dll/opengl/mesa/src/mesa/drivers/SConscript +++ /dev/null @@ -1,6 +0,0 @@ -Import('*') - -SConscript('osmesa/SConscript') - -if env['platform'] == 'windows': - SConscript('windows/gdi/SConscript') diff --git a/dll/opengl/mesa/src/mesa/drivers/common/descrip.mms b/dll/opengl/mesa/src/mesa/drivers/common/descrip.mms deleted file mode 100644 index d5bbc69dfd5..00000000000 --- a/dll/opengl/mesa/src/mesa/drivers/common/descrip.mms +++ /dev/null @@ -1,42 +0,0 @@ -# Makefile for core library for VMS -# contributed by Jouk Jansen joukj@hrem.nano.tudelft.nl -# Last revision : 29 September 2008 - -.first - define gl [----.include.gl] - define math [--.math] - define tnl [--.tnl] - define swrast [--.swrast] - define glapi [--.glapi] - define shader [--.shader] - define main [--.main] - -.include [----]mms-config. - -##### MACROS ##### - -VPATH = RCS - -INCDIR = [----.include],[--.main],[--.glapi],[--.shader] -LIBDIR = [----.lib] -CFLAGS = /include=($(INCDIR),[])/define=(PTHREADS=1)/name=(as_is,short)\ - /float=ieee/ieee=denorm/warn=disable=(PTRMISMATCH) - -SOURCES = driverfuncs.c - -OBJECTS =driverfuncs.obj - -##### RULES ##### - -VERSION=Mesa V3.4 - -##### TARGETS ##### -# Make the library -$(LIBDIR)$(GL_LIB) : $(OBJECTS) - @ library $(LIBDIR)$(GL_LIB) $(OBJECTS) - -clean : - purge - delete *.obj;* - -driverfuncs.obj : driverfuncs.c diff --git a/dll/opengl/mesa/src/mesa/drivers/common/driverfuncs.c b/dll/opengl/mesa/src/mesa/drivers/common/driverfuncs.c deleted file mode 100644 index 1df8381737f..00000000000 --- a/dll/opengl/mesa/src/mesa/drivers/common/driverfuncs.c +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.1 - * - * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "main/glheader.h" -#include "main/imports.h" -#include "main/accum.h" -#include "main/arrayobj.h" -#include "main/context.h" -#include "main/framebuffer.h" -#include "main/mipmap.h" -#include "main/queryobj.h" -#include "main/readpix.h" -#include "main/renderbuffer.h" -#include "main/shaderobj.h" -#include "main/texcompress.h" -#include "main/texformat.h" -#include "main/texgetimage.h" -#include "main/teximage.h" -#include "main/texobj.h" -#include "main/texstore.h" -#include "main/bufferobj.h" -#include "main/fbobject.h" -#include "main/samplerobj.h" -#include "main/syncobj.h" -#include "main/texturebarrier.h" -#include "main/transformfeedback.h" - -#include "program/program.h" -#include "tnl/tnl.h" -#include "swrast/swrast.h" -#include "swrast/s_renderbuffer.h" - -#include "driverfuncs.h" -#include "meta.h" - - - -/** - * Plug in default functions for all pointers in the dd_function_table - * structure. - * Device drivers should call this function and then plug in any - * functions which it wants to override. - * Some functions (pointers) MUST be implemented by all drivers (REQUIRED). - * - * \param table the dd_function_table to initialize - */ -void -_mesa_init_driver_functions(struct dd_function_table *driver) -{ - memset(driver, 0, sizeof(*driver)); - - driver->GetString = NULL; /* REQUIRED! */ - driver->UpdateState = NULL; /* REQUIRED! */ - driver->GetBufferSize = NULL; /* REQUIRED! */ - driver->ResizeBuffers = _mesa_resize_framebuffer; - driver->Error = NULL; - - driver->Finish = NULL; - driver->Flush = NULL; - - /* framebuffer/image functions */ - driver->Clear = _swrast_Clear; - driver->Accum = _mesa_accum; - driver->RasterPos = _tnl_RasterPos; - driver->DrawPixels = _swrast_DrawPixels; - driver->ReadPixels = _mesa_readpixels; - driver->CopyPixels = _swrast_CopyPixels; - driver->Bitmap = _swrast_Bitmap; - - /* Texture functions */ - driver->ChooseTextureFormat = _mesa_choose_tex_format; - driver->TexImage1D = _mesa_store_teximage1d; - driver->TexImage2D = _mesa_store_teximage2d; - driver->TexImage3D = _mesa_store_teximage3d; - driver->TexSubImage1D = _mesa_store_texsubimage1d; - driver->TexSubImage2D = _mesa_store_texsubimage2d; - driver->TexSubImage3D = _mesa_store_texsubimage3d; - driver->GetTexImage = _mesa_meta_GetTexImage; - driver->CopyTexSubImage1D = _mesa_meta_CopyTexSubImage1D; - driver->CopyTexSubImage2D = _mesa_meta_CopyTexSubImage2D; - driver->CopyTexSubImage3D = _mesa_meta_CopyTexSubImage3D; - driver->GenerateMipmap = _mesa_meta_GenerateMipmap; - driver->TestProxyTexImage = _mesa_test_proxy_teximage; - driver->CompressedTexImage1D = _mesa_store_compressed_teximage1d; - driver->CompressedTexImage2D = _mesa_store_compressed_teximage2d; - driver->CompressedTexImage3D = _mesa_store_compressed_teximage3d; - driver->CompressedTexSubImage1D = _mesa_store_compressed_texsubimage1d; - driver->CompressedTexSubImage2D = _mesa_store_compressed_texsubimage2d; - driver->CompressedTexSubImage3D = _mesa_store_compressed_texsubimage3d; - driver->GetCompressedTexImage = _mesa_get_compressed_teximage; - driver->BindTexture = NULL; - driver->NewTextureObject = _mesa_new_texture_object; - driver->DeleteTexture = _mesa_delete_texture_object; - driver->NewTextureImage = _swrast_new_texture_image; - driver->DeleteTextureImage = _swrast_delete_texture_image; - driver->AllocTextureImageBuffer = _swrast_alloc_texture_image_buffer; - driver->FreeTextureImageBuffer = _swrast_free_texture_image_buffer; - driver->MapTextureImage = _swrast_map_teximage; - driver->UnmapTextureImage = _swrast_unmap_teximage; - driver->DrawTex = _mesa_meta_DrawTex; - - /* Vertex/fragment programs */ - driver->BindProgram = NULL; - driver->NewProgram = _mesa_new_program; - driver->DeleteProgram = _mesa_delete_program; - - /* simple state commands */ - driver->AlphaFunc = NULL; - driver->BlendColor = NULL; - driver->BlendEquationSeparate = NULL; - driver->BlendFuncSeparate = NULL; - driver->ClearColor = NULL; - driver->ClearDepth = NULL; - driver->ClearStencil = NULL; - driver->ClipPlane = NULL; - driver->ColorMask = NULL; - driver->ColorMaterial = NULL; - driver->CullFace = NULL; - driver->DrawBuffer = NULL; - driver->DrawBuffers = NULL; - driver->FrontFace = NULL; - driver->DepthFunc = NULL; - driver->DepthMask = NULL; - driver->DepthRange = NULL; - driver->Enable = NULL; - driver->Fogfv = NULL; - driver->Hint = NULL; - driver->Lightfv = NULL; - driver->LightModelfv = NULL; - driver->LineStipple = NULL; - driver->LineWidth = NULL; - driver->LogicOpcode = NULL; - driver->PointParameterfv = NULL; - driver->PointSize = NULL; - driver->PolygonMode = NULL; - driver->PolygonOffset = NULL; - driver->PolygonStipple = NULL; - driver->ReadBuffer = NULL; - driver->RenderMode = NULL; - driver->Scissor = NULL; - driver->ShadeModel = NULL; - driver->StencilFuncSeparate = NULL; - driver->StencilOpSeparate = NULL; - driver->StencilMaskSeparate = NULL; - driver->TexGen = NULL; - driver->TexEnv = NULL; - driver->TexParameter = NULL; - driver->Viewport = NULL; - - /* buffer objects */ - _mesa_init_buffer_object_functions(driver); - - /* query objects */ - _mesa_init_query_object_functions(driver); - - _mesa_init_sync_object_functions(driver); - - driver->NewFramebuffer = _mesa_new_framebuffer; - driver->NewRenderbuffer = _swrast_new_soft_renderbuffer; - driver->MapRenderbuffer = _swrast_map_soft_renderbuffer; - driver->UnmapRenderbuffer = _swrast_unmap_soft_renderbuffer; - driver->RenderTexture = _swrast_render_texture; - driver->FinishRenderTexture = _swrast_finish_render_texture; - driver->FramebufferRenderbuffer = _mesa_framebuffer_renderbuffer; - driver->ValidateFramebuffer = _mesa_validate_framebuffer; - - driver->BlitFramebuffer = _swrast_BlitFramebuffer; - - _mesa_init_texture_barrier_functions(driver); - - /* APPLE_vertex_array_object */ - driver->NewArrayObject = _mesa_new_array_object; - driver->DeleteArrayObject = _mesa_delete_array_object; - driver->BindArrayObject = NULL; - - _mesa_init_shader_object_functions(driver); - - _mesa_init_transform_feedback_functions(driver); - - _mesa_init_sampler_object_functions(driver); - - /* T&L stuff */ - driver->CurrentExecPrimitive = 0; - driver->CurrentSavePrimitive = 0; - driver->NeedFlush = 0; - driver->SaveNeedFlush = 0; - - driver->ProgramStringNotify = _tnl_program_string; - driver->FlushVertices = NULL; - driver->SaveFlushVertices = NULL; - driver->PrepareExecBegin = NULL; - driver->NotifySaveBegin = NULL; - driver->LightingSpaceChange = NULL; - - /* display list */ - driver->NewList = NULL; - driver->EndList = NULL; - driver->BeginCallList = NULL; - driver->EndCallList = NULL; - - /* GL_ARB_texture_storage */ - driver->AllocTextureStorage = _swrast_AllocTextureStorage; -} - - -/** - * Call the ctx->Driver.* state functions with current values to initialize - * driver state. - * Only the Intel drivers use this so far. - */ -void -_mesa_init_driver_state(struct gl_context *ctx) -{ - ctx->Driver.AlphaFunc(ctx, ctx->Color.AlphaFunc, ctx->Color.AlphaRef); - - ctx->Driver.BlendColor(ctx, ctx->Color.BlendColor); - - ctx->Driver.BlendEquationSeparate(ctx, - ctx->Color.Blend[0].EquationRGB, - ctx->Color.Blend[0].EquationA); - - ctx->Driver.BlendFuncSeparate(ctx, - ctx->Color.Blend[0].SrcRGB, - ctx->Color.Blend[0].DstRGB, - ctx->Color.Blend[0].SrcA, - ctx->Color.Blend[0].DstA); - - if (ctx->Driver.ColorMaskIndexed) { - GLuint i; - for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { - ctx->Driver.ColorMaskIndexed(ctx, i, - ctx->Color.ColorMask[i][RCOMP], - ctx->Color.ColorMask[i][GCOMP], - ctx->Color.ColorMask[i][BCOMP], - ctx->Color.ColorMask[i][ACOMP]); - } - } - else { - ctx->Driver.ColorMask(ctx, - ctx->Color.ColorMask[0][RCOMP], - ctx->Color.ColorMask[0][GCOMP], - ctx->Color.ColorMask[0][BCOMP], - ctx->Color.ColorMask[0][ACOMP]); - } - - ctx->Driver.CullFace(ctx, ctx->Polygon.CullFaceMode); - ctx->Driver.DepthFunc(ctx, ctx->Depth.Func); - ctx->Driver.DepthMask(ctx, ctx->Depth.Mask); - - ctx->Driver.Enable(ctx, GL_ALPHA_TEST, ctx->Color.AlphaEnabled); - ctx->Driver.Enable(ctx, GL_BLEND, ctx->Color.BlendEnabled); - ctx->Driver.Enable(ctx, GL_COLOR_LOGIC_OP, ctx->Color.ColorLogicOpEnabled); - ctx->Driver.Enable(ctx, GL_COLOR_SUM, ctx->Fog.ColorSumEnabled); - ctx->Driver.Enable(ctx, GL_CULL_FACE, ctx->Polygon.CullFlag); - ctx->Driver.Enable(ctx, GL_DEPTH_TEST, ctx->Depth.Test); - ctx->Driver.Enable(ctx, GL_DITHER, ctx->Color.DitherFlag); - ctx->Driver.Enable(ctx, GL_FOG, ctx->Fog.Enabled); - ctx->Driver.Enable(ctx, GL_LIGHTING, ctx->Light.Enabled); - ctx->Driver.Enable(ctx, GL_LINE_SMOOTH, ctx->Line.SmoothFlag); - ctx->Driver.Enable(ctx, GL_POLYGON_STIPPLE, ctx->Polygon.StippleFlag); - ctx->Driver.Enable(ctx, GL_SCISSOR_TEST, ctx->Scissor.Enabled); - ctx->Driver.Enable(ctx, GL_STENCIL_TEST, ctx->Stencil._Enabled); - ctx->Driver.Enable(ctx, GL_TEXTURE_1D, GL_FALSE); - ctx->Driver.Enable(ctx, GL_TEXTURE_2D, GL_FALSE); - ctx->Driver.Enable(ctx, GL_TEXTURE_RECTANGLE_NV, GL_FALSE); - ctx->Driver.Enable(ctx, GL_TEXTURE_3D, GL_FALSE); - ctx->Driver.Enable(ctx, GL_TEXTURE_CUBE_MAP, GL_FALSE); - - ctx->Driver.Fogfv(ctx, GL_FOG_COLOR, ctx->Fog.Color); - { - GLfloat mode = (GLfloat) ctx->Fog.Mode; - ctx->Driver.Fogfv(ctx, GL_FOG_MODE, &mode); - } - ctx->Driver.Fogfv(ctx, GL_FOG_DENSITY, &ctx->Fog.Density); - ctx->Driver.Fogfv(ctx, GL_FOG_START, &ctx->Fog.Start); - ctx->Driver.Fogfv(ctx, GL_FOG_END, &ctx->Fog.End); - - ctx->Driver.FrontFace(ctx, ctx->Polygon.FrontFace); - - { - GLfloat f = (GLfloat) ctx->Light.Model.ColorControl; - ctx->Driver.LightModelfv(ctx, GL_LIGHT_MODEL_COLOR_CONTROL, &f); - } - - ctx->Driver.LineWidth(ctx, ctx->Line.Width); - ctx->Driver.LogicOpcode(ctx, ctx->Color.LogicOp); - ctx->Driver.PointSize(ctx, ctx->Point.Size); - ctx->Driver.PolygonStipple(ctx, (const GLubyte *) ctx->PolygonStipple); - ctx->Driver.Scissor(ctx, ctx->Scissor.X, ctx->Scissor.Y, - ctx->Scissor.Width, ctx->Scissor.Height); - ctx->Driver.ShadeModel(ctx, ctx->Light.ShadeModel); - ctx->Driver.StencilFuncSeparate(ctx, GL_FRONT, - ctx->Stencil.Function[0], - ctx->Stencil.Ref[0], - ctx->Stencil.ValueMask[0]); - ctx->Driver.StencilFuncSeparate(ctx, GL_BACK, - ctx->Stencil.Function[1], - ctx->Stencil.Ref[1], - ctx->Stencil.ValueMask[1]); - ctx->Driver.StencilMaskSeparate(ctx, GL_FRONT, ctx->Stencil.WriteMask[0]); - ctx->Driver.StencilMaskSeparate(ctx, GL_BACK, ctx->Stencil.WriteMask[1]); - ctx->Driver.StencilOpSeparate(ctx, GL_FRONT, - ctx->Stencil.FailFunc[0], - ctx->Stencil.ZFailFunc[0], - ctx->Stencil.ZPassFunc[0]); - ctx->Driver.StencilOpSeparate(ctx, GL_BACK, - ctx->Stencil.FailFunc[1], - ctx->Stencil.ZFailFunc[1], - ctx->Stencil.ZPassFunc[1]); - - - ctx->Driver.DrawBuffer(ctx, ctx->Color.DrawBuffer[0]); -} diff --git a/dll/opengl/mesa/src/mesa/drivers/common/meta.c b/dll/opengl/mesa/src/mesa/drivers/common/meta.c deleted file mode 100644 index 82bbbf36f03..00000000000 --- a/dll/opengl/mesa/src/mesa/drivers/common/meta.c +++ /dev/null @@ -1,3650 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.6 - * - * Copyright (C) 2009 VMware, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * Meta operations. Some GL operations can be expressed in terms of - * other GL operations. For example, glBlitFramebuffer() can be done - * with texture mapping and glClear() can be done with polygon rendering. - * - * \author Brian Paul - */ - - -#include "main/glheader.h" -#include "main/mtypes.h" -#include "main/imports.h" -#include "main/arbprogram.h" -#include "main/arrayobj.h" -#include "main/blend.h" -#include "main/bufferobj.h" -#include "main/buffers.h" -#include "main/colortab.h" -#include "main/condrender.h" -#include "main/depth.h" -#include "main/enable.h" -#include "main/fbobject.h" -#include "main/feedback.h" -#include "main/formats.h" -#include "main/image.h" -#include "main/macros.h" -#include "main/matrix.h" -#include "main/mipmap.h" -#include "main/pixel.h" -#include "main/pbo.h" -#include "main/polygon.h" -#include "main/readpix.h" -#include "main/scissor.h" -#include "main/shaderapi.h" -#include "main/shaderobj.h" -#include "main/state.h" -#include "main/stencil.h" -#include "main/texobj.h" -#include "main/texenv.h" -#include "main/texgetimage.h" -#include "main/teximage.h" -#include "main/texparam.h" -#include "main/texstate.h" -#include "main/transformfeedback.h" -#include "main/uniforms.h" -#include "main/varray.h" -#include "main/viewport.h" -#include "program/program.h" -#include "swrast/swrast.h" -#include "drivers/common/meta.h" - - -/** Return offset in bytes of the field within a vertex struct */ -#define OFFSET(FIELD) ((void *) offsetof(struct vertex, FIELD)) - -/** - * State which we may save/restore across meta ops. - * XXX this may be incomplete... - */ -struct save_state -{ - GLbitfield SavedState; /**< bitmask of MESA_META_* flags */ - - /** MESA_META_ALPHA_TEST */ - GLboolean AlphaEnabled; - GLenum AlphaFunc; - GLclampf AlphaRef; - - /** MESA_META_BLEND */ - GLbitfield BlendEnabled; - GLboolean ColorLogicOpEnabled; - - /** MESA_META_COLOR_MASK */ - GLubyte ColorMask[MAX_DRAW_BUFFERS][4]; - - /** MESA_META_DEPTH_TEST */ - struct gl_depthbuffer_attrib Depth; - - /** MESA_META_FOG */ - GLboolean Fog; - - /** MESA_META_PIXEL_STORE */ - struct gl_pixelstore_attrib Pack, Unpack; - - /** MESA_META_PIXEL_TRANSFER */ - GLfloat RedBias, RedScale; - GLfloat GreenBias, GreenScale; - GLfloat BlueBias, BlueScale; - GLfloat AlphaBias, AlphaScale; - GLfloat DepthBias, DepthScale; - GLboolean MapColorFlag; - - /** MESA_META_RASTERIZATION */ - GLenum FrontPolygonMode, BackPolygonMode; - GLboolean PolygonOffset; - GLboolean PolygonSmooth; - GLboolean PolygonStipple; - GLboolean PolygonCull; - - /** MESA_META_SCISSOR */ - struct gl_scissor_attrib Scissor; - - /** MESA_META_SHADER */ - GLboolean VertexProgramEnabled; - struct gl_vertex_program *VertexProgram; - GLboolean FragmentProgramEnabled; - struct gl_fragment_program *FragmentProgram; - struct gl_shader_program *VertexShader; - struct gl_shader_program *GeometryShader; - struct gl_shader_program *FragmentShader; - struct gl_shader_program *ActiveShader; - - /** MESA_META_STENCIL_TEST */ - struct gl_stencil_attrib Stencil; - - /** MESA_META_TRANSFORM */ - GLenum MatrixMode; - GLfloat ModelviewMatrix[16]; - GLfloat ProjectionMatrix[16]; - GLfloat TextureMatrix[16]; - - /** MESA_META_CLIP */ - GLbitfield ClipPlanesEnabled; - - /** MESA_META_TEXTURE */ - GLuint ActiveUnit; - GLuint ClientActiveUnit; - /** for unit[0] only */ - struct gl_texture_object *CurrentTexture[NUM_TEXTURE_TARGETS]; - /** mask of TEXTURE_2D_BIT, etc */ - GLbitfield TexEnabled[MAX_TEXTURE_UNITS]; - GLbitfield TexGenEnabled[MAX_TEXTURE_UNITS]; - GLuint EnvMode; /* unit[0] only */ - - /** MESA_META_VERTEX */ - struct gl_array_object *ArrayObj; - struct gl_buffer_object *ArrayBufferObj; - - /** MESA_META_VIEWPORT */ - GLint ViewportX, ViewportY, ViewportW, ViewportH; - GLclampd DepthNear, DepthFar; - - /** MESA_META_CLAMP_FRAGMENT_COLOR */ - GLenum ClampFragmentColor; - - /** MESA_META_CLAMP_VERTEX_COLOR */ - GLenum ClampVertexColor; - - /** MESA_META_CONDITIONAL_RENDER */ - struct gl_query_object *CondRenderQuery; - GLenum CondRenderMode; - - /** MESA_META_SELECT_FEEDBACK */ - GLenum RenderMode; - struct gl_selection Select; - struct gl_feedback Feedback; - - /** Miscellaneous (always disabled) */ - GLboolean Lighting; - GLboolean RasterDiscard; - GLboolean TransformFeedbackNeedsResume; -}; - -/** - * Temporary texture used for glBlitFramebuffer, glDrawPixels, etc. - * This is currently shared by all the meta ops. But we could create a - * separate one for each of glDrawPixel, glBlitFramebuffer, glCopyPixels, etc. - */ -struct temp_texture -{ - GLuint TexObj; - GLenum Target; /**< GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE */ - GLsizei MinSize; /**< Min texture size to allocate */ - GLsizei MaxSize; /**< Max possible texture size */ - GLboolean NPOT; /**< Non-power of two size OK? */ - GLsizei Width, Height; /**< Current texture size */ - GLenum IntFormat; - GLfloat Sright, Ttop; /**< right, top texcoords */ -}; - - -/** - * State for glBlitFramebufer() - */ -struct blit_state -{ - GLuint ArrayObj; - GLuint VBO; - GLuint DepthFP; -}; - - -/** - * State for glClear() - */ -struct clear_state -{ - GLuint ArrayObj; - GLuint VBO; - GLuint ShaderProg; - GLint ColorLocation; - - GLuint IntegerShaderProg; - GLint IntegerColorLocation; -}; - - -/** - * State for glCopyPixels() - */ -struct copypix_state -{ - GLuint ArrayObj; - GLuint VBO; -}; - - -/** - * State for glDrawPixels() - */ -struct drawpix_state -{ - GLuint ArrayObj; - - GLuint StencilFP; /**< Fragment program for drawing stencil images */ - GLuint DepthFP; /**< Fragment program for drawing depth images */ -}; - - -/** - * State for glBitmap() - */ -struct bitmap_state -{ - GLuint ArrayObj; - GLuint VBO; - struct temp_texture Tex; /**< separate texture from other meta ops */ -}; - - -/** - * State for _mesa_meta_generate_mipmap() - */ -struct gen_mipmap_state -{ - GLuint ArrayObj; - GLuint VBO; - GLuint FBO; -}; - - -/** - * State for texture decompression - */ -struct decompress_state -{ - GLuint ArrayObj; - GLuint VBO, FBO, RBO; - GLint Width, Height; -}; - -/** - * State for glDrawTex() - */ -struct drawtex_state -{ - GLuint ArrayObj; - GLuint VBO; -}; - -#define MAX_META_OPS_DEPTH 8 -/** - * All per-context meta state. - */ -struct gl_meta_state -{ - /** Stack of state saved during meta-ops */ - struct save_state Save[MAX_META_OPS_DEPTH]; - /** Save stack depth */ - GLuint SaveStackDepth; - - struct temp_texture TempTex; - - struct blit_state Blit; /**< For _mesa_meta_BlitFramebuffer() */ - struct clear_state Clear; /**< For _mesa_meta_Clear() */ - struct copypix_state CopyPix; /**< For _mesa_meta_CopyPixels() */ - struct drawpix_state DrawPix; /**< For _mesa_meta_DrawPixels() */ - struct bitmap_state Bitmap; /**< For _mesa_meta_Bitmap() */ - struct gen_mipmap_state Mipmap; /**< For _mesa_meta_GenerateMipmap() */ - struct decompress_state Decompress; /**< For texture decompression */ - struct drawtex_state DrawTex; /**< For _mesa_meta_DrawTex() */ -}; - -static void meta_glsl_blit_cleanup(struct gl_context *ctx, struct blit_state *blit); -static void cleanup_temp_texture(struct gl_context *ctx, struct temp_texture *tex); -static void meta_glsl_clear_cleanup(struct gl_context *ctx, struct clear_state *clear); - -static GLuint -compile_shader_with_debug(struct gl_context *ctx, GLenum target, const GLcharARB *source) -{ - GLuint shader; - GLint ok, size; - GLchar *info; - - shader = _mesa_CreateShaderObjectARB(target); - _mesa_ShaderSourceARB(shader, 1, &source, NULL); - _mesa_CompileShaderARB(shader); - - _mesa_GetShaderiv(shader, GL_COMPILE_STATUS, &ok); - if (ok) - return shader; - - _mesa_GetShaderiv(shader, GL_INFO_LOG_LENGTH, &size); - if (size == 0) { - _mesa_DeleteObjectARB(shader); - return 0; - } - - info = malloc(size); - if (!info) { - _mesa_DeleteObjectARB(shader); - return 0; - } - - _mesa_GetProgramInfoLog(shader, size, NULL, info); - _mesa_problem(ctx, - "meta program compile failed:\n%s\n" - "source:\n%s\n", - info, source); - - free(info); - _mesa_DeleteObjectARB(shader); - - return 0; -} - -static GLuint -link_program_with_debug(struct gl_context *ctx, GLuint program) -{ - GLint ok, size; - GLchar *info; - - _mesa_LinkProgramARB(program); - - _mesa_GetProgramiv(program, GL_LINK_STATUS, &ok); - if (ok) - return program; - - _mesa_GetProgramiv(program, GL_INFO_LOG_LENGTH, &size); - if (size == 0) - return 0; - - info = malloc(size); - if (!info) - return 0; - - _mesa_GetProgramInfoLog(program, size, NULL, info); - _mesa_problem(ctx, "meta program link failed:\n%s", info); - - free(info); - - return 0; -} - -/** - * Initialize meta-ops for a context. - * To be called once during context creation. - */ -void -_mesa_meta_init(struct gl_context *ctx) -{ - ASSERT(!ctx->Meta); - - ctx->Meta = CALLOC_STRUCT(gl_meta_state); -} - - -/** - * Free context meta-op state. - * To be called once during context destruction. - */ -void -_mesa_meta_free(struct gl_context *ctx) -{ - GET_CURRENT_CONTEXT(old_context); - _mesa_make_current(ctx, NULL, NULL); - meta_glsl_blit_cleanup(ctx, &ctx->Meta->Blit); - meta_glsl_clear_cleanup(ctx, &ctx->Meta->Clear); - cleanup_temp_texture(ctx, &ctx->Meta->TempTex); - if (old_context) - _mesa_make_current(old_context, old_context->WinSysDrawBuffer, old_context->WinSysReadBuffer); - else - _mesa_make_current(NULL, NULL, NULL); - free(ctx->Meta); - ctx->Meta = NULL; -} - - -/** - * Enter meta state. This is like a light-weight version of glPushAttrib - * but it also resets most GL state back to default values. - * - * \param state bitmask of MESA_META_* flags indicating which attribute groups - * to save and reset to their defaults - */ -void -_mesa_meta_begin(struct gl_context *ctx, GLbitfield state) -{ - struct save_state *save; - - /* hope MAX_META_OPS_DEPTH is large enough */ - assert(ctx->Meta->SaveStackDepth < MAX_META_OPS_DEPTH); - - save = &ctx->Meta->Save[ctx->Meta->SaveStackDepth++]; - memset(save, 0, sizeof(*save)); - save->SavedState = state; - - /* Pausing transform feedback needs to be done early, or else we won't be - * able to change other state. - */ - save->TransformFeedbackNeedsResume = - ctx->TransformFeedback.CurrentObject->Active && - !ctx->TransformFeedback.CurrentObject->Paused; - if (save->TransformFeedbackNeedsResume) - _mesa_PauseTransformFeedback(); - - if (state & MESA_META_ALPHA_TEST) { - save->AlphaEnabled = ctx->Color.AlphaEnabled; - save->AlphaFunc = ctx->Color.AlphaFunc; - save->AlphaRef = ctx->Color.AlphaRef; - if (ctx->Color.AlphaEnabled) - _mesa_set_enable(ctx, GL_ALPHA_TEST, GL_FALSE); - } - - if (state & MESA_META_BLEND) { - save->BlendEnabled = ctx->Color.BlendEnabled; - if (ctx->Color.BlendEnabled) { - if (ctx->Extensions.EXT_draw_buffers2) { - GLuint i; - for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { - _mesa_set_enablei(ctx, GL_BLEND, i, GL_FALSE); - } - } - else { - _mesa_set_enable(ctx, GL_BLEND, GL_FALSE); - } - } - save->ColorLogicOpEnabled = ctx->Color.ColorLogicOpEnabled; - if (ctx->Color.ColorLogicOpEnabled) - _mesa_set_enable(ctx, GL_COLOR_LOGIC_OP, GL_FALSE); - } - - if (state & MESA_META_COLOR_MASK) { - memcpy(save->ColorMask, ctx->Color.ColorMask, - sizeof(ctx->Color.ColorMask)); - if (!ctx->Color.ColorMask[0][0] || - !ctx->Color.ColorMask[0][1] || - !ctx->Color.ColorMask[0][2] || - !ctx->Color.ColorMask[0][3]) - _mesa_ColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); - } - - if (state & MESA_META_DEPTH_TEST) { - save->Depth = ctx->Depth; /* struct copy */ - if (ctx->Depth.Test) - _mesa_set_enable(ctx, GL_DEPTH_TEST, GL_FALSE); - } - - if (state & MESA_META_FOG) { - save->Fog = ctx->Fog.Enabled; - if (ctx->Fog.Enabled) - _mesa_set_enable(ctx, GL_FOG, GL_FALSE); - } - - if (state & MESA_META_PIXEL_STORE) { - save->Pack = ctx->Pack; - save->Unpack = ctx->Unpack; - ctx->Pack = ctx->DefaultPacking; - ctx->Unpack = ctx->DefaultPacking; - } - - if (state & MESA_META_PIXEL_TRANSFER) { - save->RedScale = ctx->Pixel.RedScale; - save->RedBias = ctx->Pixel.RedBias; - save->GreenScale = ctx->Pixel.GreenScale; - save->GreenBias = ctx->Pixel.GreenBias; - save->BlueScale = ctx->Pixel.BlueScale; - save->BlueBias = ctx->Pixel.BlueBias; - save->AlphaScale = ctx->Pixel.AlphaScale; - save->AlphaBias = ctx->Pixel.AlphaBias; - save->MapColorFlag = ctx->Pixel.MapColorFlag; - ctx->Pixel.RedScale = 1.0F; - ctx->Pixel.RedBias = 0.0F; - ctx->Pixel.GreenScale = 1.0F; - ctx->Pixel.GreenBias = 0.0F; - ctx->Pixel.BlueScale = 1.0F; - ctx->Pixel.BlueBias = 0.0F; - ctx->Pixel.AlphaScale = 1.0F; - ctx->Pixel.AlphaBias = 0.0F; - ctx->Pixel.MapColorFlag = GL_FALSE; - /* XXX more state */ - ctx->NewState |=_NEW_PIXEL; - } - - if (state & MESA_META_RASTERIZATION) { - save->FrontPolygonMode = ctx->Polygon.FrontMode; - save->BackPolygonMode = ctx->Polygon.BackMode; - save->PolygonOffset = ctx->Polygon.OffsetFill; - save->PolygonSmooth = ctx->Polygon.SmoothFlag; - save->PolygonStipple = ctx->Polygon.StippleFlag; - save->PolygonCull = ctx->Polygon.CullFlag; - _mesa_PolygonMode(GL_FRONT_AND_BACK, GL_FILL); - _mesa_set_enable(ctx, GL_POLYGON_OFFSET_FILL, GL_FALSE); - _mesa_set_enable(ctx, GL_POLYGON_SMOOTH, GL_FALSE); - _mesa_set_enable(ctx, GL_POLYGON_STIPPLE, GL_FALSE); - _mesa_set_enable(ctx, GL_CULL_FACE, GL_FALSE); - } - - if (state & MESA_META_SCISSOR) { - save->Scissor = ctx->Scissor; /* struct copy */ - _mesa_set_enable(ctx, GL_SCISSOR_TEST, GL_FALSE); - } - - if (state & MESA_META_SHADER) { - if (ctx->Extensions.ARB_vertex_program) { - save->VertexProgramEnabled = ctx->VertexProgram.Enabled; - _mesa_reference_vertprog(ctx, &save->VertexProgram, - ctx->VertexProgram.Current); - _mesa_set_enable(ctx, GL_VERTEX_PROGRAM_ARB, GL_FALSE); - } - - if (ctx->Extensions.ARB_fragment_program) { - save->FragmentProgramEnabled = ctx->FragmentProgram.Enabled; - _mesa_reference_fragprog(ctx, &save->FragmentProgram, - ctx->FragmentProgram.Current); - _mesa_set_enable(ctx, GL_FRAGMENT_PROGRAM_ARB, GL_FALSE); - } - - if (ctx->Extensions.ARB_shader_objects) { - _mesa_reference_shader_program(ctx, &save->VertexShader, - ctx->Shader.CurrentVertexProgram); - _mesa_reference_shader_program(ctx, &save->GeometryShader, - ctx->Shader.CurrentGeometryProgram); - _mesa_reference_shader_program(ctx, &save->FragmentShader, - ctx->Shader.CurrentFragmentProgram); - _mesa_reference_shader_program(ctx, &save->ActiveShader, - ctx->Shader.ActiveProgram); - - _mesa_UseProgramObjectARB(0); - } - } - - if (state & MESA_META_STENCIL_TEST) { - save->Stencil = ctx->Stencil; /* struct copy */ - if (ctx->Stencil.Enabled) - _mesa_set_enable(ctx, GL_STENCIL_TEST, GL_FALSE); - /* NOTE: other stencil state not reset */ - } - - if (state & MESA_META_TEXTURE) { - GLuint u, tgt; - - save->ActiveUnit = ctx->Texture.CurrentUnit; - save->ClientActiveUnit = ctx->Array.ActiveTexture; - save->EnvMode = ctx->Texture.Unit[0].EnvMode; - - /* Disable all texture units */ - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - save->TexEnabled[u] = ctx->Texture.Unit[u].Enabled; - save->TexGenEnabled[u] = ctx->Texture.Unit[u].TexGenEnabled; - if (ctx->Texture.Unit[u].Enabled || - ctx->Texture.Unit[u].TexGenEnabled) { - _mesa_ActiveTextureARB(GL_TEXTURE0 + u); - _mesa_set_enable(ctx, GL_TEXTURE_1D, GL_FALSE); - _mesa_set_enable(ctx, GL_TEXTURE_2D, GL_FALSE); - _mesa_set_enable(ctx, GL_TEXTURE_3D, GL_FALSE); - if (ctx->Extensions.ARB_texture_cube_map) - _mesa_set_enable(ctx, GL_TEXTURE_CUBE_MAP, GL_FALSE); - if (ctx->Extensions.NV_texture_rectangle) - _mesa_set_enable(ctx, GL_TEXTURE_RECTANGLE, GL_FALSE); - if (ctx->Extensions.OES_EGL_image_external) - _mesa_set_enable(ctx, GL_TEXTURE_EXTERNAL_OES, GL_FALSE); - _mesa_set_enable(ctx, GL_TEXTURE_GEN_S, GL_FALSE); - _mesa_set_enable(ctx, GL_TEXTURE_GEN_T, GL_FALSE); - _mesa_set_enable(ctx, GL_TEXTURE_GEN_R, GL_FALSE); - _mesa_set_enable(ctx, GL_TEXTURE_GEN_Q, GL_FALSE); - } - } - - /* save current texture objects for unit[0] only */ - for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) { - _mesa_reference_texobj(&save->CurrentTexture[tgt], - ctx->Texture.Unit[0].CurrentTex[tgt]); - } - - /* set defaults for unit[0] */ - _mesa_ActiveTextureARB(GL_TEXTURE0); - _mesa_ClientActiveTextureARB(GL_TEXTURE0); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - } - - if (state & MESA_META_TRANSFORM) { - GLuint activeTexture = ctx->Texture.CurrentUnit; - memcpy(save->ModelviewMatrix, ctx->ModelviewMatrixStack.Top->m, - 16 * sizeof(GLfloat)); - memcpy(save->ProjectionMatrix, ctx->ProjectionMatrixStack.Top->m, - 16 * sizeof(GLfloat)); - memcpy(save->TextureMatrix, ctx->TextureMatrixStack[0].Top->m, - 16 * sizeof(GLfloat)); - save->MatrixMode = ctx->Transform.MatrixMode; - /* set 1:1 vertex:pixel coordinate transform */ - _mesa_ActiveTextureARB(GL_TEXTURE0); - _mesa_MatrixMode(GL_TEXTURE); - _mesa_LoadIdentity(); - _mesa_ActiveTextureARB(GL_TEXTURE0 + activeTexture); - _mesa_MatrixMode(GL_MODELVIEW); - _mesa_LoadIdentity(); - _mesa_MatrixMode(GL_PROJECTION); - _mesa_LoadIdentity(); - _mesa_Ortho(0.0, ctx->DrawBuffer->Width, - 0.0, ctx->DrawBuffer->Height, - -1.0, 1.0); - } - - if (state & MESA_META_CLIP) { - save->ClipPlanesEnabled = ctx->Transform.ClipPlanesEnabled; - if (ctx->Transform.ClipPlanesEnabled) { - GLuint i; - for (i = 0; i < ctx->Const.MaxClipPlanes; i++) { - _mesa_set_enable(ctx, GL_CLIP_PLANE0 + i, GL_FALSE); - } - } - } - - if (state & MESA_META_VERTEX) { - /* save vertex array object state */ - _mesa_reference_array_object(ctx, &save->ArrayObj, - ctx->Array.ArrayObj); - _mesa_reference_buffer_object(ctx, &save->ArrayBufferObj, - ctx->Array.ArrayBufferObj); - /* set some default state? */ - } - - if (state & MESA_META_VIEWPORT) { - /* save viewport state */ - save->ViewportX = ctx->Viewport.X; - save->ViewportY = ctx->Viewport.Y; - save->ViewportW = ctx->Viewport.Width; - save->ViewportH = ctx->Viewport.Height; - /* set viewport to match window size */ - if (ctx->Viewport.X != 0 || - ctx->Viewport.Y != 0 || - ctx->Viewport.Width != ctx->DrawBuffer->Width || - ctx->Viewport.Height != ctx->DrawBuffer->Height) { - _mesa_set_viewport(ctx, 0, 0, - ctx->DrawBuffer->Width, ctx->DrawBuffer->Height); - } - /* save depth range state */ - save->DepthNear = ctx->Viewport.Near; - save->DepthFar = ctx->Viewport.Far; - /* set depth range to default */ - _mesa_DepthRange(0.0, 1.0); - } - - if (state & MESA_META_CLAMP_FRAGMENT_COLOR) { - save->ClampFragmentColor = ctx->Color.ClampFragmentColor; - - /* Generally in here we want to do clamping according to whether - * it's for the pixel path (ClampFragmentColor is GL_TRUE), - * regardless of the internal implementation of the metaops. - */ - if (ctx->Color.ClampFragmentColor != GL_TRUE) - _mesa_ClampColorARB(GL_CLAMP_FRAGMENT_COLOR, GL_FALSE); - } - - if (state & MESA_META_CLAMP_VERTEX_COLOR) { - save->ClampVertexColor = ctx->Light.ClampVertexColor; - - /* Generally in here we never want vertex color clamping -- - * result clamping is only dependent on fragment clamping. - */ - _mesa_ClampColorARB(GL_CLAMP_VERTEX_COLOR, GL_FALSE); - } - - if (state & MESA_META_CONDITIONAL_RENDER) { - save->CondRenderQuery = ctx->Query.CondRenderQuery; - save->CondRenderMode = ctx->Query.CondRenderMode; - - if (ctx->Query.CondRenderQuery) - _mesa_EndConditionalRender(); - } - - if (state & MESA_META_SELECT_FEEDBACK) { - save->RenderMode = ctx->RenderMode; - if (ctx->RenderMode == GL_SELECT) { - save->Select = ctx->Select; /* struct copy */ - _mesa_RenderMode(GL_RENDER); - } else if (ctx->RenderMode == GL_FEEDBACK) { - save->Feedback = ctx->Feedback; /* struct copy */ - _mesa_RenderMode(GL_RENDER); - } - } - - /* misc */ - { - save->Lighting = ctx->Light.Enabled; - if (ctx->Light.Enabled) - _mesa_set_enable(ctx, GL_LIGHTING, GL_FALSE); - save->RasterDiscard = ctx->RasterDiscard; - if (ctx->RasterDiscard) - _mesa_set_enable(ctx, GL_RASTERIZER_DISCARD, GL_FALSE); - } -} - - -/** - * Leave meta state. This is like a light-weight version of glPopAttrib(). - */ -void -_mesa_meta_end(struct gl_context *ctx) -{ - struct save_state *save = &ctx->Meta->Save[--ctx->Meta->SaveStackDepth]; - const GLbitfield state = save->SavedState; - - if (state & MESA_META_ALPHA_TEST) { - if (ctx->Color.AlphaEnabled != save->AlphaEnabled) - _mesa_set_enable(ctx, GL_ALPHA_TEST, save->AlphaEnabled); - _mesa_AlphaFunc(save->AlphaFunc, save->AlphaRef); - } - - if (state & MESA_META_BLEND) { - if (ctx->Color.BlendEnabled != save->BlendEnabled) { - if (ctx->Extensions.EXT_draw_buffers2) { - GLuint i; - for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { - _mesa_set_enablei(ctx, GL_BLEND, i, (save->BlendEnabled >> i) & 1); - } - } - else { - _mesa_set_enable(ctx, GL_BLEND, (save->BlendEnabled & 1)); - } - } - if (ctx->Color.ColorLogicOpEnabled != save->ColorLogicOpEnabled) - _mesa_set_enable(ctx, GL_COLOR_LOGIC_OP, save->ColorLogicOpEnabled); - } - - if (state & MESA_META_COLOR_MASK) { - GLuint i; - for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { - if (!TEST_EQ_4V(ctx->Color.ColorMask[i], save->ColorMask[i])) { - if (i == 0) { - _mesa_ColorMask(save->ColorMask[i][0], save->ColorMask[i][1], - save->ColorMask[i][2], save->ColorMask[i][3]); - } - else { - _mesa_ColorMaskIndexed(i, - save->ColorMask[i][0], - save->ColorMask[i][1], - save->ColorMask[i][2], - save->ColorMask[i][3]); - } - } - } - } - - if (state & MESA_META_DEPTH_TEST) { - if (ctx->Depth.Test != save->Depth.Test) - _mesa_set_enable(ctx, GL_DEPTH_TEST, save->Depth.Test); - _mesa_DepthFunc(save->Depth.Func); - _mesa_DepthMask(save->Depth.Mask); - } - - if (state & MESA_META_FOG) { - _mesa_set_enable(ctx, GL_FOG, save->Fog); - } - - if (state & MESA_META_PIXEL_STORE) { - ctx->Pack = save->Pack; - ctx->Unpack = save->Unpack; - } - - if (state & MESA_META_PIXEL_TRANSFER) { - ctx->Pixel.RedScale = save->RedScale; - ctx->Pixel.RedBias = save->RedBias; - ctx->Pixel.GreenScale = save->GreenScale; - ctx->Pixel.GreenBias = save->GreenBias; - ctx->Pixel.BlueScale = save->BlueScale; - ctx->Pixel.BlueBias = save->BlueBias; - ctx->Pixel.AlphaScale = save->AlphaScale; - ctx->Pixel.AlphaBias = save->AlphaBias; - ctx->Pixel.MapColorFlag = save->MapColorFlag; - /* XXX more state */ - ctx->NewState |=_NEW_PIXEL; - } - - if (state & MESA_META_RASTERIZATION) { - _mesa_PolygonMode(GL_FRONT, save->FrontPolygonMode); - _mesa_PolygonMode(GL_BACK, save->BackPolygonMode); - _mesa_set_enable(ctx, GL_POLYGON_STIPPLE, save->PolygonStipple); - _mesa_set_enable(ctx, GL_POLYGON_OFFSET_FILL, save->PolygonOffset); - _mesa_set_enable(ctx, GL_POLYGON_SMOOTH, save->PolygonSmooth); - _mesa_set_enable(ctx, GL_CULL_FACE, save->PolygonCull); - } - - if (state & MESA_META_SCISSOR) { - _mesa_set_enable(ctx, GL_SCISSOR_TEST, save->Scissor.Enabled); - _mesa_Scissor(save->Scissor.X, save->Scissor.Y, - save->Scissor.Width, save->Scissor.Height); - } - - if (state & MESA_META_SHADER) { - if (ctx->Extensions.ARB_vertex_program) { - _mesa_set_enable(ctx, GL_VERTEX_PROGRAM_ARB, - save->VertexProgramEnabled); - _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current, - save->VertexProgram); - _mesa_reference_vertprog(ctx, &save->VertexProgram, NULL); - } - - if (ctx->Extensions.ARB_fragment_program) { - _mesa_set_enable(ctx, GL_FRAGMENT_PROGRAM_ARB, - save->FragmentProgramEnabled); - _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, - save->FragmentProgram); - _mesa_reference_fragprog(ctx, &save->FragmentProgram, NULL); - } - - if (ctx->Extensions.ARB_vertex_shader) - _mesa_use_shader_program(ctx, GL_VERTEX_SHADER, save->VertexShader); - - if (ctx->Extensions.ARB_geometry_shader4) - _mesa_use_shader_program(ctx, GL_GEOMETRY_SHADER_ARB, - save->GeometryShader); - - if (ctx->Extensions.ARB_fragment_shader) - _mesa_use_shader_program(ctx, GL_FRAGMENT_SHADER, - save->FragmentShader); - - _mesa_reference_shader_program(ctx, &ctx->Shader.ActiveProgram, - save->ActiveShader); - - _mesa_reference_shader_program(ctx, &save->VertexShader, NULL); - _mesa_reference_shader_program(ctx, &save->GeometryShader, NULL); - _mesa_reference_shader_program(ctx, &save->FragmentShader, NULL); - _mesa_reference_shader_program(ctx, &save->ActiveShader, NULL); - } - - if (state & MESA_META_STENCIL_TEST) { - const struct gl_stencil_attrib *stencil = &save->Stencil; - - _mesa_set_enable(ctx, GL_STENCIL_TEST, stencil->Enabled); - _mesa_ClearStencil(stencil->Clear); - if (ctx->Extensions.EXT_stencil_two_side) { - _mesa_set_enable(ctx, GL_STENCIL_TEST_TWO_SIDE_EXT, - stencil->TestTwoSide); - _mesa_ActiveStencilFaceEXT(stencil->ActiveFace - ? GL_BACK : GL_FRONT); - } - /* front state */ - _mesa_StencilFuncSeparate(GL_FRONT, - stencil->Function[0], - stencil->Ref[0], - stencil->ValueMask[0]); - _mesa_StencilMaskSeparate(GL_FRONT, stencil->WriteMask[0]); - _mesa_StencilOpSeparate(GL_FRONT, stencil->FailFunc[0], - stencil->ZFailFunc[0], - stencil->ZPassFunc[0]); - /* back state */ - _mesa_StencilFuncSeparate(GL_BACK, - stencil->Function[1], - stencil->Ref[1], - stencil->ValueMask[1]); - _mesa_StencilMaskSeparate(GL_BACK, stencil->WriteMask[1]); - _mesa_StencilOpSeparate(GL_BACK, stencil->FailFunc[1], - stencil->ZFailFunc[1], - stencil->ZPassFunc[1]); - } - - if (state & MESA_META_TEXTURE) { - GLuint u, tgt; - - ASSERT(ctx->Texture.CurrentUnit == 0); - - /* restore texenv for unit[0] */ - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, save->EnvMode); - - /* restore texture objects for unit[0] only */ - for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) { - if (ctx->Texture.Unit[0].CurrentTex[tgt] != save->CurrentTexture[tgt]) { - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - _mesa_reference_texobj(&ctx->Texture.Unit[0].CurrentTex[tgt], - save->CurrentTexture[tgt]); - } - _mesa_reference_texobj(&save->CurrentTexture[tgt], NULL); - } - - /* Restore fixed function texture enables, texgen */ - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - if (ctx->Texture.Unit[u].Enabled != save->TexEnabled[u]) { - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - ctx->Texture.Unit[u].Enabled = save->TexEnabled[u]; - } - - if (ctx->Texture.Unit[u].TexGenEnabled != save->TexGenEnabled[u]) { - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - ctx->Texture.Unit[u].TexGenEnabled = save->TexGenEnabled[u]; - } - } - - /* restore current unit state */ - _mesa_ActiveTextureARB(GL_TEXTURE0 + save->ActiveUnit); - _mesa_ClientActiveTextureARB(GL_TEXTURE0 + save->ClientActiveUnit); - } - - if (state & MESA_META_TRANSFORM) { - GLuint activeTexture = ctx->Texture.CurrentUnit; - _mesa_ActiveTextureARB(GL_TEXTURE0); - _mesa_MatrixMode(GL_TEXTURE); - _mesa_LoadMatrixf(save->TextureMatrix); - _mesa_ActiveTextureARB(GL_TEXTURE0 + activeTexture); - - _mesa_MatrixMode(GL_MODELVIEW); - _mesa_LoadMatrixf(save->ModelviewMatrix); - - _mesa_MatrixMode(GL_PROJECTION); - _mesa_LoadMatrixf(save->ProjectionMatrix); - - _mesa_MatrixMode(save->MatrixMode); - } - - if (state & MESA_META_CLIP) { - if (save->ClipPlanesEnabled) { - GLuint i; - for (i = 0; i < ctx->Const.MaxClipPlanes; i++) { - if (save->ClipPlanesEnabled & (1 << i)) { - _mesa_set_enable(ctx, GL_CLIP_PLANE0 + i, GL_TRUE); - } - } - } - } - - if (state & MESA_META_VERTEX) { - /* restore vertex buffer object */ - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, save->ArrayBufferObj->Name); - _mesa_reference_buffer_object(ctx, &save->ArrayBufferObj, NULL); - - /* restore vertex array object */ - _mesa_BindVertexArray(save->ArrayObj->Name); - _mesa_reference_array_object(ctx, &save->ArrayObj, NULL); - } - - if (state & MESA_META_VIEWPORT) { - if (save->ViewportX != ctx->Viewport.X || - save->ViewportY != ctx->Viewport.Y || - save->ViewportW != ctx->Viewport.Width || - save->ViewportH != ctx->Viewport.Height) { - _mesa_set_viewport(ctx, save->ViewportX, save->ViewportY, - save->ViewportW, save->ViewportH); - } - _mesa_DepthRange(save->DepthNear, save->DepthFar); - } - - if (state & MESA_META_CLAMP_FRAGMENT_COLOR) { - _mesa_ClampColorARB(GL_CLAMP_FRAGMENT_COLOR, save->ClampFragmentColor); - } - - if (state & MESA_META_CLAMP_VERTEX_COLOR) { - _mesa_ClampColorARB(GL_CLAMP_VERTEX_COLOR, save->ClampVertexColor); - } - - if (state & MESA_META_CONDITIONAL_RENDER) { - if (save->CondRenderQuery) - _mesa_BeginConditionalRender(save->CondRenderQuery->Id, - save->CondRenderMode); - } - - if (state & MESA_META_SELECT_FEEDBACK) { - if (save->RenderMode == GL_SELECT) { - _mesa_RenderMode(GL_SELECT); - ctx->Select = save->Select; - } else if (save->RenderMode == GL_FEEDBACK) { - _mesa_RenderMode(GL_FEEDBACK); - ctx->Feedback = save->Feedback; - } - } - - /* misc */ - if (save->Lighting) { - _mesa_set_enable(ctx, GL_LIGHTING, GL_TRUE); - } - if (save->RasterDiscard) { - _mesa_set_enable(ctx, GL_RASTERIZER_DISCARD, GL_TRUE); - } - if (save->TransformFeedbackNeedsResume) - _mesa_ResumeTransformFeedback(); -} - - -/** - * Determine whether Mesa is currently in a meta state. - */ -GLboolean -_mesa_meta_in_progress(struct gl_context *ctx) -{ - return ctx->Meta->SaveStackDepth != 0; -} - - -/** - * Convert Z from a normalized value in the range [0, 1] to an object-space - * Z coordinate in [-1, +1] so that drawing at the new Z position with the - * default/identity ortho projection results in the original Z value. - * Used by the meta-Clear, Draw/CopyPixels and Bitmap functions where the Z - * value comes from the clear value or raster position. - */ -static INLINE GLfloat -invert_z(GLfloat normZ) -{ - GLfloat objZ = 1.0f - 2.0f * normZ; - return objZ; -} - - -/** - * One-time init for a temp_texture object. - * Choose tex target, compute max tex size, etc. - */ -static void -init_temp_texture(struct gl_context *ctx, struct temp_texture *tex) -{ - /* prefer texture rectangle */ - if (ctx->Extensions.NV_texture_rectangle) { - tex->Target = GL_TEXTURE_RECTANGLE; - tex->MaxSize = ctx->Const.MaxTextureRectSize; - tex->NPOT = GL_TRUE; - } - else { - /* use 2D texture, NPOT if possible */ - tex->Target = GL_TEXTURE_2D; - tex->MaxSize = 1 << (ctx->Const.MaxTextureLevels - 1); - tex->NPOT = ctx->Extensions.ARB_texture_non_power_of_two; - } - tex->MinSize = 16; /* 16 x 16 at least */ - assert(tex->MaxSize > 0); - - _mesa_GenTextures(1, &tex->TexObj); -} - -static void -cleanup_temp_texture(struct gl_context *ctx, struct temp_texture *tex) -{ - if (!tex->TexObj) - return; - _mesa_DeleteTextures(1, &tex->TexObj); - tex->TexObj = 0; -} - - -/** - * Return pointer to temp_texture info for non-bitmap ops. - * This does some one-time init if needed. - */ -static struct temp_texture * -get_temp_texture(struct gl_context *ctx) -{ - struct temp_texture *tex = &ctx->Meta->TempTex; - - if (!tex->TexObj) { - init_temp_texture(ctx, tex); - } - - return tex; -} - - -/** - * Return pointer to temp_texture info for _mesa_meta_bitmap(). - * We use a separate texture for bitmaps to reduce texture - * allocation/deallocation. - */ -static struct temp_texture * -get_bitmap_temp_texture(struct gl_context *ctx) -{ - struct temp_texture *tex = &ctx->Meta->Bitmap.Tex; - - if (!tex->TexObj) { - init_temp_texture(ctx, tex); - } - - return tex; -} - - -/** - * Compute the width/height of texture needed to draw an image of the - * given size. Return a flag indicating whether the current texture - * can be re-used (glTexSubImage2D) or if a new texture needs to be - * allocated (glTexImage2D). - * Also, compute s/t texcoords for drawing. - * - * \return GL_TRUE if new texture is needed, GL_FALSE otherwise - */ -static GLboolean -alloc_texture(struct temp_texture *tex, - GLsizei width, GLsizei height, GLenum intFormat) -{ - GLboolean newTex = GL_FALSE; - - ASSERT(width <= tex->MaxSize); - ASSERT(height <= tex->MaxSize); - - if (width > tex->Width || - height > tex->Height || - intFormat != tex->IntFormat) { - /* alloc new texture (larger or different format) */ - - if (tex->NPOT) { - /* use non-power of two size */ - tex->Width = MAX2(tex->MinSize, width); - tex->Height = MAX2(tex->MinSize, height); - } - else { - /* find power of two size */ - GLsizei w, h; - w = h = tex->MinSize; - while (w < width) - w *= 2; - while (h < height) - h *= 2; - tex->Width = w; - tex->Height = h; - } - - tex->IntFormat = intFormat; - - newTex = GL_TRUE; - } - - /* compute texcoords */ - if (tex->Target == GL_TEXTURE_RECTANGLE) { - tex->Sright = (GLfloat) width; - tex->Ttop = (GLfloat) height; - } - else { - tex->Sright = (GLfloat) width / tex->Width; - tex->Ttop = (GLfloat) height / tex->Height; - } - - return newTex; -} - - -/** - * Setup/load texture for glCopyPixels or glBlitFramebuffer. - */ -static void -setup_copypix_texture(struct temp_texture *tex, - GLboolean newTex, - GLint srcX, GLint srcY, - GLsizei width, GLsizei height, GLenum intFormat, - GLenum filter) -{ - _mesa_BindTexture(tex->Target, tex->TexObj); - _mesa_TexParameteri(tex->Target, GL_TEXTURE_MIN_FILTER, filter); - _mesa_TexParameteri(tex->Target, GL_TEXTURE_MAG_FILTER, filter); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - - /* copy framebuffer image to texture */ - if (newTex) { - /* create new tex image */ - if (tex->Width == width && tex->Height == height) { - /* create new tex with framebuffer data */ - _mesa_CopyTexImage2D(tex->Target, 0, tex->IntFormat, - srcX, srcY, width, height, 0); - } - else { - /* create empty texture */ - _mesa_TexImage2D(tex->Target, 0, tex->IntFormat, - tex->Width, tex->Height, 0, - intFormat, GL_UNSIGNED_BYTE, NULL); - /* load image */ - _mesa_CopyTexSubImage2D(tex->Target, 0, - 0, 0, srcX, srcY, width, height); - } - } - else { - /* replace existing tex image */ - _mesa_CopyTexSubImage2D(tex->Target, 0, - 0, 0, srcX, srcY, width, height); - } -} - - -/** - * Setup/load texture for glDrawPixels. - */ -static void -setup_drawpix_texture(struct gl_context *ctx, - struct temp_texture *tex, - GLboolean newTex, - GLenum texIntFormat, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const GLvoid *pixels) -{ - _mesa_BindTexture(tex->Target, tex->TexObj); - _mesa_TexParameteri(tex->Target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - _mesa_TexParameteri(tex->Target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - - /* copy pixel data to texture */ - if (newTex) { - /* create new tex image */ - if (tex->Width == width && tex->Height == height) { - /* create new tex and load image data */ - _mesa_TexImage2D(tex->Target, 0, tex->IntFormat, - tex->Width, tex->Height, 0, format, type, pixels); - } - else { - struct gl_buffer_object *save_unpack_obj = NULL; - - _mesa_reference_buffer_object(ctx, &save_unpack_obj, - ctx->Unpack.BufferObj); - _mesa_BindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0); - /* create empty texture */ - _mesa_TexImage2D(tex->Target, 0, tex->IntFormat, - tex->Width, tex->Height, 0, format, type, NULL); - if (save_unpack_obj != NULL) - _mesa_BindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, - save_unpack_obj->Name); - /* load image */ - _mesa_TexSubImage2D(tex->Target, 0, - 0, 0, width, height, format, type, pixels); - } - } - else { - /* replace existing tex image */ - _mesa_TexSubImage2D(tex->Target, 0, - 0, 0, width, height, format, type, pixels); - } -} - - - -/** - * One-time init for drawing depth pixels. - */ -static void -init_blit_depth_pixels(struct gl_context *ctx) -{ - static const char *program = - "!!ARBfp1.0\n" - "TEX result.depth, fragment.texcoord[0], texture[0], %s; \n" - "END \n"; - char program2[200]; - struct blit_state *blit = &ctx->Meta->Blit; - struct temp_texture *tex = get_temp_texture(ctx); - const char *texTarget; - - assert(blit->DepthFP == 0); - - /* replace %s with "RECT" or "2D" */ - assert(strlen(program) + 4 < sizeof(program2)); - if (tex->Target == GL_TEXTURE_RECTANGLE) - texTarget = "RECT"; - else - texTarget = "2D"; - _mesa_snprintf(program2, sizeof(program2), program, texTarget); - - _mesa_GenPrograms(1, &blit->DepthFP); - _mesa_BindProgram(GL_FRAGMENT_PROGRAM_ARB, blit->DepthFP); - _mesa_ProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, - strlen(program2), (const GLubyte *) program2); -} - - -/** - * Try to do a glBlitFramebuffer using no-copy texturing. - * We can do this when the src renderbuffer is actually a texture. - * But if the src buffer == dst buffer we cannot do this. - * - * \return new buffer mask indicating the buffers left to blit using the - * normal path. - */ -static GLbitfield -blitframebuffer_texture(struct gl_context *ctx, - GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, - GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, - GLbitfield mask, GLenum filter) -{ - if (mask & GL_COLOR_BUFFER_BIT) { - const struct gl_framebuffer *drawFb = ctx->DrawBuffer; - const struct gl_framebuffer *readFb = ctx->ReadBuffer; - const struct gl_renderbuffer_attachment *drawAtt = - &drawFb->Attachment[drawFb->_ColorDrawBufferIndexes[0]]; - const struct gl_renderbuffer_attachment *readAtt = - &readFb->Attachment[readFb->_ColorReadBufferIndex]; - - if (readAtt && readAtt->Texture) { - const struct gl_texture_object *texObj = readAtt->Texture; - const GLuint srcLevel = readAtt->TextureLevel; - const GLenum minFilterSave = texObj->Sampler.MinFilter; - const GLenum magFilterSave = texObj->Sampler.MagFilter; - const GLint baseLevelSave = texObj->BaseLevel; - const GLint maxLevelSave = texObj->MaxLevel; - const GLenum wrapSSave = texObj->Sampler.WrapS; - const GLenum wrapTSave = texObj->Sampler.WrapT; - const GLenum srgbSave = texObj->Sampler.sRGBDecode; - const GLenum fbo_srgb_save = ctx->Color.sRGBEnabled; - const GLenum target = texObj->Target; - - if (drawAtt->Texture == readAtt->Texture) { - /* Can't use same texture as both the source and dest. We need - * to handle overlapping blits and besides, some hw may not - * support this. - */ - return mask; - } - - if (target != GL_TEXTURE_2D && target != GL_TEXTURE_RECTANGLE_ARB) { - /* Can't handle other texture types at this time */ - return mask; - } - - /* - printf("Blit from texture!\n"); - printf(" srcAtt %p dstAtt %p\n", readAtt, drawAtt); - printf(" srcTex %p dstText %p\n", texObj, drawAtt->Texture); - */ - - /* Prepare src texture state */ - _mesa_BindTexture(target, texObj->Name); - _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, filter); - _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, filter); - if (target != GL_TEXTURE_RECTANGLE_ARB) { - _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, srcLevel); - _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, srcLevel); - } - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - - /* Always do our blits with no sRGB decode or encode.*/ - if (ctx->Extensions.EXT_texture_sRGB_decode) { - _mesa_TexParameteri(target, GL_TEXTURE_SRGB_DECODE_EXT, - GL_SKIP_DECODE_EXT); - } - if (ctx->Extensions.EXT_framebuffer_sRGB) { - _mesa_set_enable(ctx, GL_FRAMEBUFFER_SRGB_EXT, GL_FALSE); - } - - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - _mesa_set_enable(ctx, target, GL_TRUE); - - /* Prepare vertex data (the VBO was previously created and bound) */ - { - struct vertex { - GLfloat x, y, s, t; - }; - struct vertex verts[4]; - GLfloat s0, t0, s1, t1; - - if (target == GL_TEXTURE_2D) { - const struct gl_texture_image *texImage - = _mesa_select_tex_image(ctx, texObj, target, srcLevel); - s0 = srcX0 / (float) texImage->Width; - s1 = srcX1 / (float) texImage->Width; - t0 = srcY0 / (float) texImage->Height; - t1 = srcY1 / (float) texImage->Height; - } - else { - assert(target == GL_TEXTURE_RECTANGLE_ARB); - s0 = srcX0; - s1 = srcX1; - t0 = srcY0; - t1 = srcY1; - } - - verts[0].x = (GLfloat) dstX0; - verts[0].y = (GLfloat) dstY0; - verts[1].x = (GLfloat) dstX1; - verts[1].y = (GLfloat) dstY0; - verts[2].x = (GLfloat) dstX1; - verts[2].y = (GLfloat) dstY1; - verts[3].x = (GLfloat) dstX0; - verts[3].y = (GLfloat) dstY1; - - verts[0].s = s0; - verts[0].t = t0; - verts[1].s = s1; - verts[1].t = t0; - verts[2].s = s1; - verts[2].t = t1; - verts[3].s = s0; - verts[3].t = t1; - - _mesa_BufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts); - } - - _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); - - /* Restore texture object state, the texture binding will - * be restored by _mesa_meta_end(). - */ - _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, minFilterSave); - _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, magFilterSave); - if (target != GL_TEXTURE_RECTANGLE_ARB) { - _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, baseLevelSave); - _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, maxLevelSave); - } - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, wrapSSave); - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_T, wrapTSave); - if (ctx->Extensions.EXT_texture_sRGB_decode) { - _mesa_TexParameteri(target, GL_TEXTURE_SRGB_DECODE_EXT, srgbSave); - } - if (ctx->Extensions.EXT_framebuffer_sRGB && fbo_srgb_save) { - _mesa_set_enable(ctx, GL_FRAMEBUFFER_SRGB_EXT, GL_TRUE); - } - - /* Done with color buffer */ - mask &= ~GL_COLOR_BUFFER_BIT; - } - } - - return mask; -} - - -/** - * Meta implementation of ctx->Driver.BlitFramebuffer() in terms - * of texture mapping and polygon rendering. - */ -void -_mesa_meta_BlitFramebuffer(struct gl_context *ctx, - GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, - GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, - GLbitfield mask, GLenum filter) -{ - struct blit_state *blit = &ctx->Meta->Blit; - struct temp_texture *tex = get_temp_texture(ctx); - const GLsizei maxTexSize = tex->MaxSize; - const GLint srcX = MIN2(srcX0, srcX1); - const GLint srcY = MIN2(srcY0, srcY1); - const GLint srcW = abs(srcX1 - srcX0); - const GLint srcH = abs(srcY1 - srcY0); - const GLboolean srcFlipX = srcX1 < srcX0; - const GLboolean srcFlipY = srcY1 < srcY0; - struct vertex { - GLfloat x, y, s, t; - }; - struct vertex verts[4]; - GLboolean newTex; - - /* In addition to falling back if the blit size is larger than the maximum - * texture size, fallback if the source is multisampled. This fallback can - * be removed once Mesa gets support ARB_texture_multisample. - */ - if (srcW > maxTexSize || srcH > maxTexSize - || ctx->ReadBuffer->Visual.samples > 0) { - /* XXX avoid this fallback */ - _swrast_BlitFramebuffer(ctx, srcX0, srcY0, srcX1, srcY1, - dstX0, dstY0, dstX1, dstY1, mask, filter); - return; - } - - if (srcFlipX) { - GLint tmp = dstX0; - dstX0 = dstX1; - dstX1 = tmp; - } - - if (srcFlipY) { - GLint tmp = dstY0; - dstY0 = dstY1; - dstY1 = tmp; - } - - /* only scissor effects blit so save/clear all other relevant state */ - _mesa_meta_begin(ctx, ~MESA_META_SCISSOR); - - if (blit->ArrayObj == 0) { - /* one-time setup */ - - /* create vertex array object */ - _mesa_GenVertexArrays(1, &blit->ArrayObj); - _mesa_BindVertexArray(blit->ArrayObj); - - /* create vertex array buffer */ - _mesa_GenBuffersARB(1, &blit->VBO); - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, blit->VBO); - _mesa_BufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), - NULL, GL_DYNAMIC_DRAW_ARB); - - /* setup vertex arrays */ - _mesa_VertexPointer(2, GL_FLOAT, sizeof(struct vertex), OFFSET(x)); - _mesa_TexCoordPointer(2, GL_FLOAT, sizeof(struct vertex), OFFSET(s)); - _mesa_EnableClientState(GL_VERTEX_ARRAY); - _mesa_EnableClientState(GL_TEXTURE_COORD_ARRAY); - } - else { - _mesa_BindVertexArray(blit->ArrayObj); - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, blit->VBO); - } - - /* Try faster, direct texture approach first */ - mask = blitframebuffer_texture(ctx, srcX0, srcY0, srcX1, srcY1, - dstX0, dstY0, dstX1, dstY1, mask, filter); - if (mask == 0x0) { - _mesa_meta_end(ctx); - return; - } - - /* Continue with "normal" approach which involves copying the src rect - * into a temporary texture and is "blitted" by drawing a textured quad. - */ - - newTex = alloc_texture(tex, srcW, srcH, GL_RGBA); - - /* vertex positions/texcoords (after texture allocation!) */ - { - verts[0].x = (GLfloat) dstX0; - verts[0].y = (GLfloat) dstY0; - verts[1].x = (GLfloat) dstX1; - verts[1].y = (GLfloat) dstY0; - verts[2].x = (GLfloat) dstX1; - verts[2].y = (GLfloat) dstY1; - verts[3].x = (GLfloat) dstX0; - verts[3].y = (GLfloat) dstY1; - - verts[0].s = 0.0F; - verts[0].t = 0.0F; - verts[1].s = tex->Sright; - verts[1].t = 0.0F; - verts[2].s = tex->Sright; - verts[2].t = tex->Ttop; - verts[3].s = 0.0F; - verts[3].t = tex->Ttop; - - /* upload new vertex data */ - _mesa_BufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts); - } - - _mesa_set_enable(ctx, tex->Target, GL_TRUE); - - if (mask & GL_COLOR_BUFFER_BIT) { - setup_copypix_texture(tex, newTex, srcX, srcY, srcW, srcH, - GL_RGBA, filter); - _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); - mask &= ~GL_COLOR_BUFFER_BIT; - } - - if (mask & GL_DEPTH_BUFFER_BIT) { - GLuint *tmp = (GLuint *) malloc(srcW * srcH * sizeof(GLuint)); - if (tmp) { - if (!blit->DepthFP) - init_blit_depth_pixels(ctx); - - /* maybe change tex format here */ - newTex = alloc_texture(tex, srcW, srcH, GL_DEPTH_COMPONENT); - - _mesa_ReadPixels(srcX, srcY, srcW, srcH, - GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, tmp); - - setup_drawpix_texture(ctx, tex, newTex, GL_DEPTH_COMPONENT, srcW, srcH, - GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, tmp); - - _mesa_BindProgram(GL_FRAGMENT_PROGRAM_ARB, blit->DepthFP); - _mesa_set_enable(ctx, GL_FRAGMENT_PROGRAM_ARB, GL_TRUE); - _mesa_ColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); - _mesa_set_enable(ctx, GL_DEPTH_TEST, GL_TRUE); - _mesa_DepthFunc(GL_ALWAYS); - _mesa_DepthMask(GL_TRUE); - - _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); - mask &= ~GL_DEPTH_BUFFER_BIT; - - free(tmp); - } - } - - if (mask & GL_STENCIL_BUFFER_BIT) { - /* XXX can't easily do stencil */ - } - - _mesa_set_enable(ctx, tex->Target, GL_FALSE); - - _mesa_meta_end(ctx); - - if (mask) { - _swrast_BlitFramebuffer(ctx, srcX0, srcY0, srcX1, srcY1, - dstX0, dstY0, dstX1, dstY1, mask, filter); - } -} - -static void -meta_glsl_blit_cleanup(struct gl_context *ctx, struct blit_state *blit) -{ - if (blit->ArrayObj) { - _mesa_DeleteVertexArraysAPPLE(1, &blit->ArrayObj); - blit->ArrayObj = 0; - _mesa_DeleteBuffersARB(1, &blit->VBO); - blit->VBO = 0; - } - if (blit->DepthFP) { - _mesa_DeletePrograms(1, &blit->DepthFP); - blit->DepthFP = 0; - } -} - - -/** - * Meta implementation of ctx->Driver.Clear() in terms of polygon rendering. - */ -void -_mesa_meta_Clear(struct gl_context *ctx, GLbitfield buffers) -{ - struct clear_state *clear = &ctx->Meta->Clear; - struct vertex { - GLfloat x, y, z, r, g, b, a; - }; - struct vertex verts[4]; - /* save all state but scissor, pixel pack/unpack */ - GLbitfield metaSave = (MESA_META_ALL - - MESA_META_SCISSOR - - MESA_META_PIXEL_STORE - - MESA_META_CONDITIONAL_RENDER); - const GLuint stencilMax = (1 << ctx->DrawBuffer->Visual.stencilBits) - 1; - - if (buffers & BUFFER_BITS_COLOR) { - /* if clearing color buffers, don't save/restore colormask */ - metaSave -= MESA_META_COLOR_MASK; - } - - _mesa_meta_begin(ctx, metaSave); - - if (clear->ArrayObj == 0) { - /* one-time setup */ - - /* create vertex array object */ - _mesa_GenVertexArrays(1, &clear->ArrayObj); - _mesa_BindVertexArray(clear->ArrayObj); - - /* create vertex array buffer */ - _mesa_GenBuffersARB(1, &clear->VBO); - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, clear->VBO); - - /* setup vertex arrays */ - _mesa_VertexPointer(3, GL_FLOAT, sizeof(struct vertex), OFFSET(x)); - _mesa_ColorPointer(4, GL_FLOAT, sizeof(struct vertex), OFFSET(r)); - _mesa_EnableClientState(GL_VERTEX_ARRAY); - _mesa_EnableClientState(GL_COLOR_ARRAY); - } - else { - _mesa_BindVertexArray(clear->ArrayObj); - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, clear->VBO); - } - - /* GL_COLOR_BUFFER_BIT */ - if (buffers & BUFFER_BITS_COLOR) { - /* leave colormask, glDrawBuffer state as-is */ - - /* Clears never have the color clamped. */ - _mesa_ClampColorARB(GL_CLAMP_FRAGMENT_COLOR, GL_FALSE); - } - else { - ASSERT(metaSave & MESA_META_COLOR_MASK); - _mesa_ColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); - } - - /* GL_DEPTH_BUFFER_BIT */ - if (buffers & BUFFER_BIT_DEPTH) { - _mesa_set_enable(ctx, GL_DEPTH_TEST, GL_TRUE); - _mesa_DepthFunc(GL_ALWAYS); - _mesa_DepthMask(GL_TRUE); - } - else { - assert(!ctx->Depth.Test); - } - - /* GL_STENCIL_BUFFER_BIT */ - if (buffers & BUFFER_BIT_STENCIL) { - _mesa_set_enable(ctx, GL_STENCIL_TEST, GL_TRUE); - _mesa_StencilOpSeparate(GL_FRONT_AND_BACK, - GL_REPLACE, GL_REPLACE, GL_REPLACE); - _mesa_StencilFuncSeparate(GL_FRONT_AND_BACK, GL_ALWAYS, - ctx->Stencil.Clear & stencilMax, - ctx->Stencil.WriteMask[0]); - } - else { - assert(!ctx->Stencil.Enabled); - } - - /* vertex positions/colors */ - { - const GLfloat x0 = (GLfloat) ctx->DrawBuffer->_Xmin; - const GLfloat y0 = (GLfloat) ctx->DrawBuffer->_Ymin; - const GLfloat x1 = (GLfloat) ctx->DrawBuffer->_Xmax; - const GLfloat y1 = (GLfloat) ctx->DrawBuffer->_Ymax; - const GLfloat z = invert_z(ctx->Depth.Clear); - GLuint i; - - verts[0].x = x0; - verts[0].y = y0; - verts[0].z = z; - verts[1].x = x1; - verts[1].y = y0; - verts[1].z = z; - verts[2].x = x1; - verts[2].y = y1; - verts[2].z = z; - verts[3].x = x0; - verts[3].y = y1; - verts[3].z = z; - - /* vertex colors */ - for (i = 0; i < 4; i++) { - verts[i].r = ctx->Color.ClearColor.f[0]; - verts[i].g = ctx->Color.ClearColor.f[1]; - verts[i].b = ctx->Color.ClearColor.f[2]; - verts[i].a = ctx->Color.ClearColor.f[3]; - } - - /* upload new vertex data */ - _mesa_BufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), verts, - GL_DYNAMIC_DRAW_ARB); - } - - /* draw quad */ - _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); - - _mesa_meta_end(ctx); -} - -static void -meta_glsl_clear_init(struct gl_context *ctx, struct clear_state *clear) -{ - const char *vs_source = - "attribute vec4 position;\n" - "void main()\n" - "{\n" - " gl_Position = position;\n" - "}\n"; - const char *fs_source = - "uniform vec4 color;\n" - "void main()\n" - "{\n" - " gl_FragColor = color;\n" - "}\n"; - const char *vs_int_source = - "#version 130\n" - "attribute vec4 position;\n" - "void main()\n" - "{\n" - " gl_Position = position;\n" - "}\n"; - const char *fs_int_source = - "#version 130\n" - "uniform ivec4 color;\n" - "out ivec4 out_color;\n" - "\n" - "void main()\n" - "{\n" - " out_color = color;\n" - "}\n"; - GLuint vs, fs; - - if (clear->ArrayObj != 0) - return; - - /* create vertex array object */ - _mesa_GenVertexArrays(1, &clear->ArrayObj); - _mesa_BindVertexArray(clear->ArrayObj); - - /* create vertex array buffer */ - _mesa_GenBuffersARB(1, &clear->VBO); - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, clear->VBO); - - /* setup vertex arrays */ - _mesa_VertexAttribPointerARB(0, 3, GL_FLOAT, GL_FALSE, 0, (void *)0); - _mesa_EnableVertexAttribArrayARB(0); - - vs = _mesa_CreateShaderObjectARB(GL_VERTEX_SHADER); - _mesa_ShaderSourceARB(vs, 1, &vs_source, NULL); - _mesa_CompileShaderARB(vs); - - fs = _mesa_CreateShaderObjectARB(GL_FRAGMENT_SHADER); - _mesa_ShaderSourceARB(fs, 1, &fs_source, NULL); - _mesa_CompileShaderARB(fs); - - clear->ShaderProg = _mesa_CreateProgramObjectARB(); - _mesa_AttachShader(clear->ShaderProg, fs); - _mesa_DeleteObjectARB(fs); - _mesa_AttachShader(clear->ShaderProg, vs); - _mesa_DeleteObjectARB(vs); - _mesa_BindAttribLocationARB(clear->ShaderProg, 0, "position"); - _mesa_LinkProgramARB(clear->ShaderProg); - - clear->ColorLocation = _mesa_GetUniformLocationARB(clear->ShaderProg, - "color"); - - if (ctx->Const.GLSLVersion >= 130) { - vs = compile_shader_with_debug(ctx, GL_VERTEX_SHADER, vs_int_source); - fs = compile_shader_with_debug(ctx, GL_FRAGMENT_SHADER, fs_int_source); - - clear->IntegerShaderProg = _mesa_CreateProgramObjectARB(); - _mesa_AttachShader(clear->IntegerShaderProg, fs); - _mesa_DeleteObjectARB(fs); - _mesa_AttachShader(clear->IntegerShaderProg, vs); - _mesa_DeleteObjectARB(vs); - _mesa_BindAttribLocationARB(clear->IntegerShaderProg, 0, "position"); - - /* Note that user-defined out attributes get automatically assigned - * locations starting from 0, so we don't need to explicitly - * BindFragDataLocation to 0. - */ - - link_program_with_debug(ctx, clear->IntegerShaderProg); - - clear->IntegerColorLocation = - _mesa_GetUniformLocationARB(clear->IntegerShaderProg, "color"); - } -} - -static void -meta_glsl_clear_cleanup(struct gl_context *ctx, struct clear_state *clear) -{ - if (clear->ArrayObj == 0) - return; - _mesa_DeleteVertexArraysAPPLE(1, &clear->ArrayObj); - clear->ArrayObj = 0; - _mesa_DeleteBuffersARB(1, &clear->VBO); - clear->VBO = 0; - _mesa_DeleteObjectARB(clear->ShaderProg); - clear->ShaderProg = 0; - - if (clear->IntegerShaderProg) { - _mesa_DeleteObjectARB(clear->IntegerShaderProg); - clear->IntegerShaderProg = 0; - } -} - -/** - * Meta implementation of ctx->Driver.Clear() in terms of polygon rendering. - */ -void -_mesa_meta_glsl_Clear(struct gl_context *ctx, GLbitfield buffers) -{ - struct clear_state *clear = &ctx->Meta->Clear; - GLbitfield metaSave; - const GLuint stencilMax = (1 << ctx->DrawBuffer->Visual.stencilBits) - 1; - struct gl_framebuffer *fb = ctx->DrawBuffer; - const float x0 = ((float)fb->_Xmin / fb->Width) * 2.0f - 1.0f; - const float y0 = ((float)fb->_Ymin / fb->Height) * 2.0f - 1.0f; - const float x1 = ((float)fb->_Xmax / fb->Width) * 2.0f - 1.0f; - const float y1 = ((float)fb->_Ymax / fb->Height) * 2.0f - 1.0f; - const float z = -invert_z(ctx->Depth.Clear); - struct vertex { - GLfloat x, y, z; - } verts[4]; - - metaSave = (MESA_META_ALPHA_TEST | - MESA_META_BLEND | - MESA_META_DEPTH_TEST | - MESA_META_RASTERIZATION | - MESA_META_SHADER | - MESA_META_STENCIL_TEST | - MESA_META_VERTEX | - MESA_META_VIEWPORT | - MESA_META_CLIP | - MESA_META_CLAMP_FRAGMENT_COLOR); - - if (!(buffers & BUFFER_BITS_COLOR)) { - /* We'll use colormask to disable color writes. Otherwise, - * respect color mask - */ - metaSave |= MESA_META_COLOR_MASK; - } - - _mesa_meta_begin(ctx, metaSave); - - meta_glsl_clear_init(ctx, clear); - - if (fb->_IntegerColor) { - _mesa_UseProgramObjectARB(clear->IntegerShaderProg); - _mesa_Uniform4ivARB(clear->IntegerColorLocation, 1, - ctx->Color.ClearColor.i); - } else { - _mesa_UseProgramObjectARB(clear->ShaderProg); - _mesa_Uniform4fvARB(clear->ColorLocation, 1, - ctx->Color.ClearColor.f); - } - - _mesa_BindVertexArray(clear->ArrayObj); - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, clear->VBO); - - /* GL_COLOR_BUFFER_BIT */ - if (buffers & BUFFER_BITS_COLOR) { - /* leave colormask, glDrawBuffer state as-is */ - - /* Clears never have the color clamped. */ - _mesa_ClampColorARB(GL_CLAMP_FRAGMENT_COLOR, GL_FALSE); - } - else { - ASSERT(metaSave & MESA_META_COLOR_MASK); - _mesa_ColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); - } - - /* GL_DEPTH_BUFFER_BIT */ - if (buffers & BUFFER_BIT_DEPTH) { - _mesa_set_enable(ctx, GL_DEPTH_TEST, GL_TRUE); - _mesa_DepthFunc(GL_ALWAYS); - _mesa_DepthMask(GL_TRUE); - } - else { - assert(!ctx->Depth.Test); - } - - /* GL_STENCIL_BUFFER_BIT */ - if (buffers & BUFFER_BIT_STENCIL) { - _mesa_set_enable(ctx, GL_STENCIL_TEST, GL_TRUE); - _mesa_StencilOpSeparate(GL_FRONT_AND_BACK, - GL_REPLACE, GL_REPLACE, GL_REPLACE); - _mesa_StencilFuncSeparate(GL_FRONT_AND_BACK, GL_ALWAYS, - ctx->Stencil.Clear & stencilMax, - ctx->Stencil.WriteMask[0]); - } - else { - assert(!ctx->Stencil.Enabled); - } - - /* vertex positions */ - verts[0].x = x0; - verts[0].y = y0; - verts[0].z = z; - verts[1].x = x1; - verts[1].y = y0; - verts[1].z = z; - verts[2].x = x1; - verts[2].y = y1; - verts[2].z = z; - verts[3].x = x0; - verts[3].y = y1; - verts[3].z = z; - - /* upload new vertex data */ - _mesa_BufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), verts, - GL_DYNAMIC_DRAW_ARB); - - /* draw quad */ - _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); - - _mesa_meta_end(ctx); -} - -/** - * Meta implementation of ctx->Driver.CopyPixels() in terms - * of texture mapping and polygon rendering and GLSL shaders. - */ -void -_mesa_meta_CopyPixels(struct gl_context *ctx, GLint srcX, GLint srcY, - GLsizei width, GLsizei height, - GLint dstX, GLint dstY, GLenum type) -{ - struct copypix_state *copypix = &ctx->Meta->CopyPix; - struct temp_texture *tex = get_temp_texture(ctx); - struct vertex { - GLfloat x, y, z, s, t; - }; - struct vertex verts[4]; - GLboolean newTex; - GLenum intFormat = GL_RGBA; - - if (type != GL_COLOR || - ctx->_ImageTransferState || - ctx->Fog.Enabled || - width > tex->MaxSize || - height > tex->MaxSize) { - /* XXX avoid this fallback */ - _swrast_CopyPixels(ctx, srcX, srcY, width, height, dstX, dstY, type); - return; - } - - /* Most GL state applies to glCopyPixels, but a there's a few things - * we need to override: - */ - _mesa_meta_begin(ctx, (MESA_META_RASTERIZATION | - MESA_META_SHADER | - MESA_META_TEXTURE | - MESA_META_TRANSFORM | - MESA_META_CLIP | - MESA_META_VERTEX | - MESA_META_VIEWPORT)); - - if (copypix->ArrayObj == 0) { - /* one-time setup */ - - /* create vertex array object */ - _mesa_GenVertexArrays(1, ©pix->ArrayObj); - _mesa_BindVertexArray(copypix->ArrayObj); - - /* create vertex array buffer */ - _mesa_GenBuffersARB(1, ©pix->VBO); - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, copypix->VBO); - _mesa_BufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), - NULL, GL_DYNAMIC_DRAW_ARB); - - /* setup vertex arrays */ - _mesa_VertexPointer(3, GL_FLOAT, sizeof(struct vertex), OFFSET(x)); - _mesa_TexCoordPointer(2, GL_FLOAT, sizeof(struct vertex), OFFSET(s)); - _mesa_EnableClientState(GL_VERTEX_ARRAY); - _mesa_EnableClientState(GL_TEXTURE_COORD_ARRAY); - } - else { - _mesa_BindVertexArray(copypix->ArrayObj); - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, copypix->VBO); - } - - newTex = alloc_texture(tex, width, height, intFormat); - - /* vertex positions, texcoords (after texture allocation!) */ - { - const GLfloat dstX0 = (GLfloat) dstX; - const GLfloat dstY0 = (GLfloat) dstY; - const GLfloat dstX1 = dstX + width * ctx->Pixel.ZoomX; - const GLfloat dstY1 = dstY + height * ctx->Pixel.ZoomY; - const GLfloat z = invert_z(ctx->Current.RasterPos[2]); - - verts[0].x = dstX0; - verts[0].y = dstY0; - verts[0].z = z; - verts[0].s = 0.0F; - verts[0].t = 0.0F; - verts[1].x = dstX1; - verts[1].y = dstY0; - verts[1].z = z; - verts[1].s = tex->Sright; - verts[1].t = 0.0F; - verts[2].x = dstX1; - verts[2].y = dstY1; - verts[2].z = z; - verts[2].s = tex->Sright; - verts[2].t = tex->Ttop; - verts[3].x = dstX0; - verts[3].y = dstY1; - verts[3].z = z; - verts[3].s = 0.0F; - verts[3].t = tex->Ttop; - - /* upload new vertex data */ - _mesa_BufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts); - } - - /* Alloc/setup texture */ - setup_copypix_texture(tex, newTex, srcX, srcY, width, height, - GL_RGBA, GL_NEAREST); - - _mesa_set_enable(ctx, tex->Target, GL_TRUE); - - /* draw textured quad */ - _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); - - _mesa_set_enable(ctx, tex->Target, GL_FALSE); - - _mesa_meta_end(ctx); -} - - - -/** - * When the glDrawPixels() image size is greater than the max rectangle - * texture size we use this function to break the glDrawPixels() image - * into tiles which fit into the max texture size. - */ -static void -tiled_draw_pixels(struct gl_context *ctx, - GLint tileSize, - GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, - const struct gl_pixelstore_attrib *unpack, - const GLvoid *pixels) -{ - struct gl_pixelstore_attrib tileUnpack = *unpack; - GLint i, j; - - if (tileUnpack.RowLength == 0) - tileUnpack.RowLength = width; - - for (i = 0; i < width; i += tileSize) { - const GLint tileWidth = MIN2(tileSize, width - i); - const GLint tileX = (GLint) (x + i * ctx->Pixel.ZoomX); - - tileUnpack.SkipPixels = unpack->SkipPixels + i; - - for (j = 0; j < height; j += tileSize) { - const GLint tileHeight = MIN2(tileSize, height - j); - const GLint tileY = (GLint) (y + j * ctx->Pixel.ZoomY); - - tileUnpack.SkipRows = unpack->SkipRows + j; - - _mesa_meta_DrawPixels(ctx, tileX, tileY, tileWidth, tileHeight, - format, type, &tileUnpack, pixels); - } - } -} - - -/** - * One-time init for drawing stencil pixels. - */ -static void -init_draw_stencil_pixels(struct gl_context *ctx) -{ - /* This program is run eight times, once for each stencil bit. - * The stencil values to draw are found in an 8-bit alpha texture. - * We read the texture/stencil value and test if bit 'b' is set. - * If the bit is not set, use KIL to kill the fragment. - * Finally, we use the stencil test to update the stencil buffer. - * - * The basic algorithm for checking if a bit is set is: - * if (is_odd(value / (1 << bit))) - * result is one (or non-zero). - * else - * result is zero. - * The program parameter contains three values: - * parm.x = 255 / (1 << bit) - * parm.y = 0.5 - * parm.z = 0.0 - */ - static const char *program = - "!!ARBfp1.0\n" - "PARAM parm = program.local[0]; \n" - "TEMP t; \n" - "TEX t, fragment.texcoord[0], texture[0], %s; \n" /* NOTE %s here! */ - "# t = t * 255 / bit \n" - "MUL t.x, t.a, parm.x; \n" - "# t = (int) t \n" - "FRC t.y, t.x; \n" - "SUB t.x, t.x, t.y; \n" - "# t = t * 0.5 \n" - "MUL t.x, t.x, parm.y; \n" - "# t = fract(t.x) \n" - "FRC t.x, t.x; # if t.x != 0, then the bit is set \n" - "# t.x = (t.x == 0 ? 1 : 0) \n" - "SGE t.x, -t.x, parm.z; \n" - "KIL -t.x; \n" - "# for debug only \n" - "#MOV result.color, t.x; \n" - "END \n"; - char program2[1000]; - struct drawpix_state *drawpix = &ctx->Meta->DrawPix; - struct temp_texture *tex = get_temp_texture(ctx); - const char *texTarget; - - assert(drawpix->StencilFP == 0); - - /* replace %s with "RECT" or "2D" */ - assert(strlen(program) + 4 < sizeof(program2)); - if (tex->Target == GL_TEXTURE_RECTANGLE) - texTarget = "RECT"; - else - texTarget = "2D"; - _mesa_snprintf(program2, sizeof(program2), program, texTarget); - - _mesa_GenPrograms(1, &drawpix->StencilFP); - _mesa_BindProgram(GL_FRAGMENT_PROGRAM_ARB, drawpix->StencilFP); - _mesa_ProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, - strlen(program2), (const GLubyte *) program2); -} - - -/** - * One-time init for drawing depth pixels. - */ -static void -init_draw_depth_pixels(struct gl_context *ctx) -{ - static const char *program = - "!!ARBfp1.0\n" - "PARAM color = program.local[0]; \n" - "TEX result.depth, fragment.texcoord[0], texture[0], %s; \n" - "MOV result.color, color; \n" - "END \n"; - char program2[200]; - struct drawpix_state *drawpix = &ctx->Meta->DrawPix; - struct temp_texture *tex = get_temp_texture(ctx); - const char *texTarget; - - assert(drawpix->DepthFP == 0); - - /* replace %s with "RECT" or "2D" */ - assert(strlen(program) + 4 < sizeof(program2)); - if (tex->Target == GL_TEXTURE_RECTANGLE) - texTarget = "RECT"; - else - texTarget = "2D"; - _mesa_snprintf(program2, sizeof(program2), program, texTarget); - - _mesa_GenPrograms(1, &drawpix->DepthFP); - _mesa_BindProgram(GL_FRAGMENT_PROGRAM_ARB, drawpix->DepthFP); - _mesa_ProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, - strlen(program2), (const GLubyte *) program2); -} - - -/** - * Meta implementation of ctx->Driver.DrawPixels() in terms - * of texture mapping and polygon rendering. - */ -void -_mesa_meta_DrawPixels(struct gl_context *ctx, - GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, - const struct gl_pixelstore_attrib *unpack, - const GLvoid *pixels) -{ - struct drawpix_state *drawpix = &ctx->Meta->DrawPix; - struct temp_texture *tex = get_temp_texture(ctx); - const struct gl_pixelstore_attrib unpackSave = ctx->Unpack; - const GLuint origStencilMask = ctx->Stencil.WriteMask[0]; - struct vertex { - GLfloat x, y, z, s, t; - }; - struct vertex verts[4]; - GLenum texIntFormat; - GLboolean fallback, newTex; - GLbitfield metaExtraSave = 0x0; - GLuint vbo; - - /* - * Determine if we can do the glDrawPixels with texture mapping. - */ - fallback = GL_FALSE; - if (ctx->_ImageTransferState || - ctx->Fog.Enabled) { - fallback = GL_TRUE; - } - - if (_mesa_is_color_format(format)) { - /* use more compact format when possible */ - /* XXX disable special case for GL_LUMINANCE for now to work around - * apparent i965 driver bug (see bug #23670). - */ - if (/*format == GL_LUMINANCE ||*/ format == GL_LUMINANCE_ALPHA) - texIntFormat = format; - else - texIntFormat = GL_RGBA; - - /* If we're not supposed to clamp the resulting color, then just - * promote our texture to fully float. We could do better by - * just going for the matching set of channels, in floating - * point. - */ - if (ctx->Color.ClampFragmentColor != GL_TRUE && - ctx->Extensions.ARB_texture_float) - texIntFormat = GL_RGBA32F; - } - else if (_mesa_is_stencil_format(format)) { - if (ctx->Extensions.ARB_fragment_program && - ctx->Pixel.IndexShift == 0 && - ctx->Pixel.IndexOffset == 0 && - type == GL_UNSIGNED_BYTE) { - /* We'll store stencil as alpha. This only works for GLubyte - * image data because of how incoming values are mapped to alpha - * in [0,1]. - */ - texIntFormat = GL_ALPHA; - metaExtraSave = (MESA_META_COLOR_MASK | - MESA_META_DEPTH_TEST | - MESA_META_SHADER | - MESA_META_STENCIL_TEST); - } - else { - fallback = GL_TRUE; - } - } - else if (_mesa_is_depth_format(format)) { - if (ctx->Extensions.ARB_depth_texture && - ctx->Extensions.ARB_fragment_program) { - texIntFormat = GL_DEPTH_COMPONENT; - metaExtraSave = (MESA_META_SHADER); - } - else { - fallback = GL_TRUE; - } - } - else { - fallback = GL_TRUE; - } - - if (fallback) { - _swrast_DrawPixels(ctx, x, y, width, height, - format, type, unpack, pixels); - return; - } - - /* - * Check image size against max texture size, draw as tiles if needed. - */ - if (width > tex->MaxSize || height > tex->MaxSize) { - tiled_draw_pixels(ctx, tex->MaxSize, x, y, width, height, - format, type, unpack, pixels); - return; - } - - /* Most GL state applies to glDrawPixels (like blending, stencil, etc), - * but a there's a few things we need to override: - */ - _mesa_meta_begin(ctx, (MESA_META_RASTERIZATION | - MESA_META_SHADER | - MESA_META_TEXTURE | - MESA_META_TRANSFORM | - MESA_META_CLIP | - MESA_META_VERTEX | - MESA_META_VIEWPORT | - MESA_META_CLAMP_FRAGMENT_COLOR | - metaExtraSave)); - - newTex = alloc_texture(tex, width, height, texIntFormat); - - /* vertex positions, texcoords (after texture allocation!) */ - { - const GLfloat x0 = (GLfloat) x; - const GLfloat y0 = (GLfloat) y; - const GLfloat x1 = x + width * ctx->Pixel.ZoomX; - const GLfloat y1 = y + height * ctx->Pixel.ZoomY; - const GLfloat z = invert_z(ctx->Current.RasterPos[2]); - - verts[0].x = x0; - verts[0].y = y0; - verts[0].z = z; - verts[0].s = 0.0F; - verts[0].t = 0.0F; - verts[1].x = x1; - verts[1].y = y0; - verts[1].z = z; - verts[1].s = tex->Sright; - verts[1].t = 0.0F; - verts[2].x = x1; - verts[2].y = y1; - verts[2].z = z; - verts[2].s = tex->Sright; - verts[2].t = tex->Ttop; - verts[3].x = x0; - verts[3].y = y1; - verts[3].z = z; - verts[3].s = 0.0F; - verts[3].t = tex->Ttop; - } - - if (drawpix->ArrayObj == 0) { - /* one-time setup: create vertex array object */ - _mesa_GenVertexArrays(1, &drawpix->ArrayObj); - } - _mesa_BindVertexArray(drawpix->ArrayObj); - - /* create vertex array buffer */ - _mesa_GenBuffersARB(1, &vbo); - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, vbo); - _mesa_BufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), - verts, GL_DYNAMIC_DRAW_ARB); - - /* setup vertex arrays */ - _mesa_VertexPointer(3, GL_FLOAT, sizeof(struct vertex), OFFSET(x)); - _mesa_TexCoordPointer(2, GL_FLOAT, sizeof(struct vertex), OFFSET(s)); - _mesa_EnableClientState(GL_VERTEX_ARRAY); - _mesa_EnableClientState(GL_TEXTURE_COORD_ARRAY); - - /* set given unpack params */ - ctx->Unpack = *unpack; - - _mesa_set_enable(ctx, tex->Target, GL_TRUE); - - if (_mesa_is_stencil_format(format)) { - /* Drawing stencil */ - GLint bit; - - if (!drawpix->StencilFP) - init_draw_stencil_pixels(ctx); - - setup_drawpix_texture(ctx, tex, newTex, texIntFormat, width, height, - GL_ALPHA, type, pixels); - - _mesa_ColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); - - _mesa_set_enable(ctx, GL_STENCIL_TEST, GL_TRUE); - - /* set all stencil bits to 0 */ - _mesa_StencilOp(GL_REPLACE, GL_REPLACE, GL_REPLACE); - _mesa_StencilFunc(GL_ALWAYS, 0, 255); - _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); - - /* set stencil bits to 1 where needed */ - _mesa_StencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); - - _mesa_BindProgram(GL_FRAGMENT_PROGRAM_ARB, drawpix->StencilFP); - _mesa_set_enable(ctx, GL_FRAGMENT_PROGRAM_ARB, GL_TRUE); - - for (bit = 0; bit < ctx->DrawBuffer->Visual.stencilBits; bit++) { - const GLuint mask = 1 << bit; - if (mask & origStencilMask) { - _mesa_StencilFunc(GL_ALWAYS, mask, mask); - _mesa_StencilMask(mask); - - _mesa_ProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, 0, - 255.0 / mask, 0.5, 0.0, 0.0); - - _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); - } - } - } - else if (_mesa_is_depth_format(format)) { - /* Drawing depth */ - if (!drawpix->DepthFP) - init_draw_depth_pixels(ctx); - - _mesa_BindProgram(GL_FRAGMENT_PROGRAM_ARB, drawpix->DepthFP); - _mesa_set_enable(ctx, GL_FRAGMENT_PROGRAM_ARB, GL_TRUE); - - /* polygon color = current raster color */ - _mesa_ProgramLocalParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, 0, - ctx->Current.RasterColor); - - setup_drawpix_texture(ctx, tex, newTex, texIntFormat, width, height, - format, type, pixels); - - _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); - } - else { - /* Drawing RGBA */ - setup_drawpix_texture(ctx, tex, newTex, texIntFormat, width, height, - format, type, pixels); - _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); - } - - _mesa_set_enable(ctx, tex->Target, GL_FALSE); - - _mesa_DeleteBuffersARB(1, &vbo); - - /* restore unpack params */ - ctx->Unpack = unpackSave; - - _mesa_meta_end(ctx); -} - -static GLboolean -alpha_test_raster_color(struct gl_context *ctx) -{ - GLfloat alpha = ctx->Current.RasterColor[ACOMP]; - GLfloat ref = ctx->Color.AlphaRef; - - switch (ctx->Color.AlphaFunc) { - case GL_NEVER: - return GL_FALSE; - case GL_LESS: - return alpha < ref; - case GL_EQUAL: - return alpha == ref; - case GL_LEQUAL: - return alpha <= ref; - case GL_GREATER: - return alpha > ref; - case GL_NOTEQUAL: - return alpha != ref; - case GL_GEQUAL: - return alpha >= ref; - case GL_ALWAYS: - return GL_TRUE; - default: - assert(0); - return GL_FALSE; - } -} - -/** - * Do glBitmap with a alpha texture quad. Use the alpha test to cull - * the 'off' bits. A bitmap cache as in the gallium/mesa state - * tracker would improve performance a lot. - */ -void -_mesa_meta_Bitmap(struct gl_context *ctx, - GLint x, GLint y, GLsizei width, GLsizei height, - const struct gl_pixelstore_attrib *unpack, - const GLubyte *bitmap1) -{ - struct bitmap_state *bitmap = &ctx->Meta->Bitmap; - struct temp_texture *tex = get_bitmap_temp_texture(ctx); - const GLenum texIntFormat = GL_ALPHA; - const struct gl_pixelstore_attrib unpackSave = *unpack; - GLubyte fg, bg; - struct vertex { - GLfloat x, y, z, s, t, r, g, b, a; - }; - struct vertex verts[4]; - GLboolean newTex; - GLubyte *bitmap8; - - /* - * Check if swrast fallback is needed. - */ - if (ctx->_ImageTransferState || - ctx->FragmentProgram._Enabled || - ctx->Fog.Enabled || - ctx->Texture._EnabledUnits || - width > tex->MaxSize || - height > tex->MaxSize) { - _swrast_Bitmap(ctx, x, y, width, height, unpack, bitmap1); - return; - } - - if (ctx->Color.AlphaEnabled && !alpha_test_raster_color(ctx)) - return; - - /* Most GL state applies to glBitmap (like blending, stencil, etc), - * but a there's a few things we need to override: - */ - _mesa_meta_begin(ctx, (MESA_META_ALPHA_TEST | - MESA_META_PIXEL_STORE | - MESA_META_RASTERIZATION | - MESA_META_SHADER | - MESA_META_TEXTURE | - MESA_META_TRANSFORM | - MESA_META_CLIP | - MESA_META_VERTEX | - MESA_META_VIEWPORT)); - - if (bitmap->ArrayObj == 0) { - /* one-time setup */ - - /* create vertex array object */ - _mesa_GenVertexArraysAPPLE(1, &bitmap->ArrayObj); - _mesa_BindVertexArrayAPPLE(bitmap->ArrayObj); - - /* create vertex array buffer */ - _mesa_GenBuffersARB(1, &bitmap->VBO); - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, bitmap->VBO); - _mesa_BufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), - NULL, GL_DYNAMIC_DRAW_ARB); - - /* setup vertex arrays */ - _mesa_VertexPointer(3, GL_FLOAT, sizeof(struct vertex), OFFSET(x)); - _mesa_TexCoordPointer(2, GL_FLOAT, sizeof(struct vertex), OFFSET(s)); - _mesa_ColorPointer(4, GL_FLOAT, sizeof(struct vertex), OFFSET(r)); - _mesa_EnableClientState(GL_VERTEX_ARRAY); - _mesa_EnableClientState(GL_TEXTURE_COORD_ARRAY); - _mesa_EnableClientState(GL_COLOR_ARRAY); - } - else { - _mesa_BindVertexArray(bitmap->ArrayObj); - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, bitmap->VBO); - } - - newTex = alloc_texture(tex, width, height, texIntFormat); - - /* vertex positions, texcoords, colors (after texture allocation!) */ - { - const GLfloat x0 = (GLfloat) x; - const GLfloat y0 = (GLfloat) y; - const GLfloat x1 = (GLfloat) (x + width); - const GLfloat y1 = (GLfloat) (y + height); - const GLfloat z = invert_z(ctx->Current.RasterPos[2]); - GLuint i; - - verts[0].x = x0; - verts[0].y = y0; - verts[0].z = z; - verts[0].s = 0.0F; - verts[0].t = 0.0F; - verts[1].x = x1; - verts[1].y = y0; - verts[1].z = z; - verts[1].s = tex->Sright; - verts[1].t = 0.0F; - verts[2].x = x1; - verts[2].y = y1; - verts[2].z = z; - verts[2].s = tex->Sright; - verts[2].t = tex->Ttop; - verts[3].x = x0; - verts[3].y = y1; - verts[3].z = z; - verts[3].s = 0.0F; - verts[3].t = tex->Ttop; - - for (i = 0; i < 4; i++) { - verts[i].r = ctx->Current.RasterColor[0]; - verts[i].g = ctx->Current.RasterColor[1]; - verts[i].b = ctx->Current.RasterColor[2]; - verts[i].a = ctx->Current.RasterColor[3]; - } - - /* upload new vertex data */ - _mesa_BufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts); - } - - /* choose different foreground/background alpha values */ - CLAMPED_FLOAT_TO_UBYTE(fg, ctx->Current.RasterColor[ACOMP]); - bg = (fg > 127 ? 0 : 255); - - bitmap1 = _mesa_map_pbo_source(ctx, &unpackSave, bitmap1); - if (!bitmap1) { - _mesa_meta_end(ctx); - return; - } - - bitmap8 = (GLubyte *) malloc(width * height); - if (bitmap8) { - memset(bitmap8, bg, width * height); - _mesa_expand_bitmap(width, height, &unpackSave, bitmap1, - bitmap8, width, fg); - - _mesa_set_enable(ctx, tex->Target, GL_TRUE); - - _mesa_set_enable(ctx, GL_ALPHA_TEST, GL_TRUE); - _mesa_AlphaFunc(GL_NOTEQUAL, UBYTE_TO_FLOAT(bg)); - - setup_drawpix_texture(ctx, tex, newTex, texIntFormat, width, height, - GL_ALPHA, GL_UNSIGNED_BYTE, bitmap8); - - _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); - - _mesa_set_enable(ctx, tex->Target, GL_FALSE); - - free(bitmap8); - } - - _mesa_unmap_pbo_source(ctx, &unpackSave); - - _mesa_meta_end(ctx); -} - - -/** - * Check if the call to _mesa_meta_GenerateMipmap() will require a - * software fallback. The fallback path will require that the texture - * images are mapped. - * \return GL_TRUE if a fallback is needed, GL_FALSE otherwise - */ -GLboolean -_mesa_meta_check_generate_mipmap_fallback(struct gl_context *ctx, GLenum target, - struct gl_texture_object *texObj) -{ - const GLuint fboSave = ctx->DrawBuffer->Name; - struct gen_mipmap_state *mipmap = &ctx->Meta->Mipmap; - struct gl_texture_image *baseImage; - GLuint srcLevel; - GLenum status; - - /* check for fallbacks */ - if (!ctx->Extensions.EXT_framebuffer_object || - target == GL_TEXTURE_3D || - target == GL_TEXTURE_1D_ARRAY || - target == GL_TEXTURE_2D_ARRAY) { - return GL_TRUE; - } - - srcLevel = texObj->BaseLevel; - baseImage = _mesa_select_tex_image(ctx, texObj, target, srcLevel); - if (!baseImage || _mesa_is_format_compressed(baseImage->TexFormat)) { - return GL_TRUE; - } - - if (_mesa_get_format_color_encoding(baseImage->TexFormat) == GL_SRGB && - !ctx->Extensions.EXT_texture_sRGB_decode) { - /* The texture format is sRGB but we can't turn off sRGB->linear - * texture sample conversion. So we won't be able to generate the - * right colors when rendering. Need to use a fallback. - */ - return GL_TRUE; - } - - /* - * Test that we can actually render in the texture's format. - */ - if (!mipmap->FBO) - _mesa_GenFramebuffersEXT(1, &mipmap->FBO); - _mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, mipmap->FBO); - - if (target == GL_TEXTURE_1D) { - _mesa_FramebufferTexture1DEXT(GL_FRAMEBUFFER_EXT, - GL_COLOR_ATTACHMENT0_EXT, - target, texObj->Name, srcLevel); - } -#if 0 - /* other work is needed to enable 3D mipmap generation */ - else if (target == GL_TEXTURE_3D) { - GLint zoffset = 0; - _mesa_FramebufferTexture3DEXT(GL_FRAMEBUFFER_EXT, - GL_COLOR_ATTACHMENT0_EXT, - target, texObj->Name, srcLevel, zoffset); - } -#endif - else { - /* 2D / cube */ - _mesa_FramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, - GL_COLOR_ATTACHMENT0_EXT, - target, texObj->Name, srcLevel); - } - - status = _mesa_CheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); - - _mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboSave); - - if (status != GL_FRAMEBUFFER_COMPLETE_EXT) { - return GL_TRUE; - } - - return GL_FALSE; -} - - -/** - * Compute the texture coordinates for the four vertices of a quad for - * drawing a 2D texture image or slice of a cube/3D texture. - * \param faceTarget GL_TEXTURE_1D/2D/3D or cube face name - * \param slice slice of a 1D/2D array texture or 3D texture - * \param width width of the texture image - * \param height height of the texture image - * \param coords0/1/2/3 returns the computed texcoords - */ -static void -setup_texture_coords(GLenum faceTarget, - GLint slice, - GLint width, - GLint height, - GLfloat coords0[3], - GLfloat coords1[3], - GLfloat coords2[3], - GLfloat coords3[3]) -{ - static const GLfloat st[4][2] = { - {0.0f, 0.0f}, {1.0f, 0.0f}, {1.0f, 1.0f}, {0.0f, 1.0f} - }; - GLuint i; - GLfloat r; - - switch (faceTarget) { - case GL_TEXTURE_1D: - case GL_TEXTURE_2D: - case GL_TEXTURE_3D: - case GL_TEXTURE_2D_ARRAY: - if (faceTarget == GL_TEXTURE_3D) - r = 1.0F / slice; - else if (faceTarget == GL_TEXTURE_2D_ARRAY) - r = slice; - else - r = 0.0F; - coords0[0] = 0.0F; /* s */ - coords0[1] = 0.0F; /* t */ - coords0[2] = r; /* r */ - coords1[0] = 1.0F; - coords1[1] = 0.0F; - coords1[2] = r; - coords2[0] = 1.0F; - coords2[1] = 1.0F; - coords2[2] = r; - coords3[0] = 0.0F; - coords3[1] = 1.0F; - coords3[2] = r; - break; - case GL_TEXTURE_RECTANGLE_ARB: - coords0[0] = 0.0F; /* s */ - coords0[1] = 0.0F; /* t */ - coords0[2] = 0.0F; /* r */ - coords1[0] = width; - coords1[1] = 0.0F; - coords1[2] = 0.0F; - coords2[0] = width; - coords2[1] = height; - coords2[2] = 0.0F; - coords3[0] = 0.0F; - coords3[1] = height; - coords3[2] = 0.0F; - break; - case GL_TEXTURE_1D_ARRAY: - coords0[0] = 0.0F; /* s */ - coords0[1] = slice; /* t */ - coords0[2] = 0.0F; /* r */ - coords1[0] = 1.0f; - coords1[1] = slice; - coords1[2] = 0.0F; - coords2[0] = 1.0F; - coords2[1] = slice; - coords2[2] = 0.0F; - coords3[0] = 0.0F; - coords3[1] = slice; - coords3[2] = 0.0F; - break; - - case GL_TEXTURE_CUBE_MAP_POSITIVE_X: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: - /* loop over quad verts */ - for (i = 0; i < 4; i++) { - /* Compute sc = +/-scale and tc = +/-scale. - * Not +/-1 to avoid cube face selection ambiguity near the edges, - * though that can still sometimes happen with this scale factor... - */ - const GLfloat scale = 0.9999f; - const GLfloat sc = (2.0f * st[i][0] - 1.0f) * scale; - const GLfloat tc = (2.0f * st[i][1] - 1.0f) * scale; - GLfloat *coord; - - switch (i) { - case 0: - coord = coords0; - break; - case 1: - coord = coords1; - break; - case 2: - coord = coords2; - break; - case 3: - coord = coords3; - break; - default: - assert(0); - } - - switch (faceTarget) { - case GL_TEXTURE_CUBE_MAP_POSITIVE_X: - coord[0] = 1.0f; - coord[1] = -tc; - coord[2] = -sc; - break; - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: - coord[0] = -1.0f; - coord[1] = -tc; - coord[2] = sc; - break; - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: - coord[0] = sc; - coord[1] = 1.0f; - coord[2] = tc; - break; - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: - coord[0] = sc; - coord[1] = -1.0f; - coord[2] = -tc; - break; - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: - coord[0] = sc; - coord[1] = -tc; - coord[2] = 1.0f; - break; - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: - coord[0] = -sc; - coord[1] = -tc; - coord[2] = -1.0f; - break; - default: - assert(0); - } - } - break; - default: - assert(0 && "unexpected target in meta setup_texture_coords()"); - } -} - - -/** - * Called via ctx->Driver.GenerateMipmap() - * Note: We don't yet support 3D textures, 1D/2D array textures or texture - * borders. - */ -void -_mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target, - struct gl_texture_object *texObj) -{ - struct gen_mipmap_state *mipmap = &ctx->Meta->Mipmap; - struct vertex { - GLfloat x, y, tex[3]; - }; - struct vertex verts[4]; - const GLuint baseLevel = texObj->BaseLevel; - const GLuint maxLevel = texObj->MaxLevel; - const GLenum minFilterSave = texObj->Sampler.MinFilter; - const GLenum magFilterSave = texObj->Sampler.MagFilter; - const GLint maxLevelSave = texObj->MaxLevel; - const GLboolean genMipmapSave = texObj->GenerateMipmap; - const GLenum wrapSSave = texObj->Sampler.WrapS; - const GLenum wrapTSave = texObj->Sampler.WrapT; - const GLenum wrapRSave = texObj->Sampler.WrapR; - const GLenum srgbDecodeSave = texObj->Sampler.sRGBDecode; - const GLenum srgbBufferSave = ctx->Color.sRGBEnabled; - const GLuint fboSave = ctx->DrawBuffer->Name; - const GLuint original_active_unit = ctx->Texture.CurrentUnit; - GLenum faceTarget; - GLuint dstLevel; - const GLuint border = 0; - const GLint slice = 0; - - if (_mesa_meta_check_generate_mipmap_fallback(ctx, target, texObj)) { - _mesa_generate_mipmap(ctx, target, texObj); - return; - } - - if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X && - target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z) { - faceTarget = target; - target = GL_TEXTURE_CUBE_MAP; - } - else { - faceTarget = target; - } - - _mesa_meta_begin(ctx, MESA_META_ALL); - - if (original_active_unit != 0) - _mesa_BindTexture(target, texObj->Name); - - if (mipmap->ArrayObj == 0) { - /* one-time setup */ - - /* create vertex array object */ - _mesa_GenVertexArraysAPPLE(1, &mipmap->ArrayObj); - _mesa_BindVertexArrayAPPLE(mipmap->ArrayObj); - - /* create vertex array buffer */ - _mesa_GenBuffersARB(1, &mipmap->VBO); - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, mipmap->VBO); - _mesa_BufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), - NULL, GL_DYNAMIC_DRAW_ARB); - - /* setup vertex arrays */ - _mesa_VertexPointer(2, GL_FLOAT, sizeof(struct vertex), OFFSET(x)); - _mesa_TexCoordPointer(3, GL_FLOAT, sizeof(struct vertex), OFFSET(tex)); - _mesa_EnableClientState(GL_VERTEX_ARRAY); - _mesa_EnableClientState(GL_TEXTURE_COORD_ARRAY); - } - else { - _mesa_BindVertexArray(mipmap->ArrayObj); - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, mipmap->VBO); - } - - if (!mipmap->FBO) { - _mesa_GenFramebuffersEXT(1, &mipmap->FBO); - } - _mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, mipmap->FBO); - - _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); - _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - _mesa_TexParameteri(target, GL_GENERATE_MIPMAP, GL_FALSE); - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); - - /* We don't want to encode or decode sRGB values; treat them as linear */ - if (ctx->Extensions.EXT_texture_sRGB_decode) { - _mesa_TexParameteri(target, GL_TEXTURE_SRGB_DECODE_EXT, - GL_SKIP_DECODE_EXT); - } - if (ctx->Extensions.EXT_framebuffer_sRGB) { - _mesa_set_enable(ctx, GL_FRAMEBUFFER_SRGB_EXT, GL_FALSE); - } - - _mesa_set_enable(ctx, target, GL_TRUE); - - /* setup texcoords (XXX what about border?) */ - setup_texture_coords(faceTarget, - slice, - 0, 0, /* width, height never used here */ - verts[0].tex, - verts[1].tex, - verts[2].tex, - verts[3].tex); - - /* setup vertex positions */ - verts[0].x = 0.0F; - verts[0].y = 0.0F; - verts[1].x = 1.0F; - verts[1].y = 0.0F; - verts[2].x = 1.0F; - verts[2].y = 1.0F; - verts[3].x = 0.0F; - verts[3].y = 1.0F; - - /* upload new vertex data */ - _mesa_BufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts); - - /* setup projection matrix */ - _mesa_MatrixMode(GL_PROJECTION); - _mesa_LoadIdentity(); - _mesa_Ortho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0); - - /* texture is already locked, unlock now */ - _mesa_unlock_texture(ctx, texObj); - - for (dstLevel = baseLevel + 1; dstLevel <= maxLevel; dstLevel++) { - const struct gl_texture_image *srcImage; - const GLuint srcLevel = dstLevel - 1; - GLsizei srcWidth, srcHeight, srcDepth; - GLsizei dstWidth, dstHeight, dstDepth; - GLenum status; - - srcImage = _mesa_select_tex_image(ctx, texObj, faceTarget, srcLevel); - assert(srcImage->Border == 0); /* XXX we can fix this */ - - /* src size w/out border */ - srcWidth = srcImage->Width - 2 * border; - srcHeight = srcImage->Height - 2 * border; - srcDepth = srcImage->Depth - 2 * border; - - /* new dst size w/ border */ - dstWidth = MAX2(1, srcWidth / 2) + 2 * border; - dstHeight = MAX2(1, srcHeight / 2) + 2 * border; - dstDepth = MAX2(1, srcDepth / 2) + 2 * border; - - if (dstWidth == srcImage->Width && - dstHeight == srcImage->Height && - dstDepth == srcImage->Depth) { - /* all done */ - break; - } - - /* Allocate storage for the destination mipmap image(s) */ - - /* Set MaxLevel large enough to hold the new level when we allocate it */ - _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, dstLevel); - - if (!_mesa_prepare_mipmap_level(ctx, texObj, dstLevel, - dstWidth, dstHeight, dstDepth, - srcImage->Border, - srcImage->InternalFormat, - srcImage->TexFormat)) { - /* All done. We either ran out of memory or we would go beyond the - * last valid level of an immutable texture if we continued. - */ - break; - } - - /* limit minification to src level */ - _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, srcLevel); - - /* Set to draw into the current dstLevel */ - if (target == GL_TEXTURE_1D) { - _mesa_FramebufferTexture1DEXT(GL_FRAMEBUFFER_EXT, - GL_COLOR_ATTACHMENT0_EXT, - target, - texObj->Name, - dstLevel); - } - else if (target == GL_TEXTURE_3D) { - GLint zoffset = 0; /* XXX unfinished */ - _mesa_FramebufferTexture3DEXT(GL_FRAMEBUFFER_EXT, - GL_COLOR_ATTACHMENT0_EXT, - target, - texObj->Name, - dstLevel, zoffset); - } - else { - /* 2D / cube */ - _mesa_FramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, - GL_COLOR_ATTACHMENT0_EXT, - faceTarget, - texObj->Name, - dstLevel); - } - - _mesa_DrawBuffer(GL_COLOR_ATTACHMENT0_EXT); - - /* sanity check */ - status = _mesa_CheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); - if (status != GL_FRAMEBUFFER_COMPLETE_EXT) { - abort(); - break; - } - - assert(dstWidth == ctx->DrawBuffer->Width); - assert(dstHeight == ctx->DrawBuffer->Height); - - /* setup viewport */ - _mesa_set_viewport(ctx, 0, 0, dstWidth, dstHeight); - - _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); - } - - if (ctx->Extensions.EXT_texture_sRGB_decode) { - _mesa_TexParameteri(target, GL_TEXTURE_SRGB_DECODE_EXT, - srgbDecodeSave); - } - if (ctx->Extensions.EXT_framebuffer_sRGB && srgbBufferSave) { - _mesa_set_enable(ctx, GL_FRAMEBUFFER_SRGB_EXT, GL_TRUE); - } - - _mesa_lock_texture(ctx, texObj); /* relock */ - - _mesa_meta_end(ctx); - - _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, minFilterSave); - _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, magFilterSave); - _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, maxLevelSave); - _mesa_TexParameteri(target, GL_GENERATE_MIPMAP, genMipmapSave); - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, wrapSSave); - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_T, wrapTSave); - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_R, wrapRSave); - - _mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboSave); -} - - -/** - * Determine the GL data type to use for the temporary image read with - * ReadPixels() and passed to Tex[Sub]Image(). - */ -static GLenum -get_temp_image_type(struct gl_context *ctx, GLenum baseFormat) -{ - switch (baseFormat) { - case GL_RGBA: - case GL_RGB: - case GL_RG: - case GL_RED: - case GL_ALPHA: - case GL_LUMINANCE: - case GL_LUMINANCE_ALPHA: - case GL_INTENSITY: - if (ctx->DrawBuffer->Visual.redBits <= 8) - return GL_UNSIGNED_BYTE; - else if (ctx->DrawBuffer->Visual.redBits <= 16) - return GL_UNSIGNED_SHORT; - else - return GL_FLOAT; - case GL_DEPTH_COMPONENT: - return GL_UNSIGNED_INT; - case GL_DEPTH_STENCIL: - return GL_UNSIGNED_INT_24_8; - default: - _mesa_problem(ctx, "Unexpected format %d in get_temp_image_type()", - baseFormat); - return 0; - } -} - - -/** - * Helper for _mesa_meta_CopyTexSubImage1/2/3D() functions. - * Have to be careful with locking and meta state for pixel transfer. - */ -static void -copy_tex_sub_image(struct gl_context *ctx, - GLuint dims, - struct gl_texture_image *texImage, - GLint xoffset, GLint yoffset, GLint zoffset, - struct gl_renderbuffer *rb, - GLint x, GLint y, - GLsizei width, GLsizei height) -{ - struct gl_texture_object *texObj = texImage->TexObject; - const GLenum target = texObj->Target; - GLenum format, type; - GLint bpp; - void *buf; - - /* Choose format/type for temporary image buffer */ - format = _mesa_get_format_base_format(texImage->TexFormat); - if (format == GL_LUMINANCE || - format == GL_LUMINANCE_ALPHA || - format == GL_INTENSITY) { - /* We don't want to use GL_LUMINANCE, GL_INTENSITY, etc. for the - * temp image buffer because glReadPixels will do L=R+G+B which is - * not what we want (should be L=R). - */ - format = GL_RGBA; - } - - if (_mesa_is_format_integer_color(texImage->TexFormat)) { - _mesa_problem(ctx, "unsupported integer color copyteximage"); - return; - } - - type = get_temp_image_type(ctx, format); - bpp = _mesa_bytes_per_pixel(format, type); - if (bpp <= 0) { - _mesa_problem(ctx, "Bad bpp in meta copy_tex_sub_image()"); - return; - } - - /* - * Alloc image buffer (XXX could use a PBO) - */ - buf = malloc(width * height * bpp); - if (!buf) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexSubImage%uD", dims); - return; - } - - _mesa_unlock_texture(ctx, texObj); /* need to unlock first */ - - /* - * Read image from framebuffer (disable pixel transfer ops) - */ - _mesa_meta_begin(ctx, MESA_META_PIXEL_STORE | MESA_META_PIXEL_TRANSFER); - ctx->Driver.ReadPixels(ctx, x, y, width, height, - format, type, &ctx->Pack, buf); - _mesa_meta_end(ctx); - - _mesa_update_state(ctx); /* to update pixel transfer state */ - - /* - * Store texture data (with pixel transfer ops) - */ - _mesa_meta_begin(ctx, MESA_META_PIXEL_STORE); - if (target == GL_TEXTURE_1D) { - ctx->Driver.TexSubImage1D(ctx, texImage, - xoffset, width, - format, type, buf, &ctx->Unpack); - } - else if (target == GL_TEXTURE_3D) { - ctx->Driver.TexSubImage3D(ctx, texImage, - xoffset, yoffset, zoffset, width, height, 1, - format, type, buf, &ctx->Unpack); - } - else { - ctx->Driver.TexSubImage2D(ctx, texImage, - xoffset, yoffset, width, height, - format, type, buf, &ctx->Unpack); - } - _mesa_meta_end(ctx); - - _mesa_lock_texture(ctx, texObj); /* re-lock */ - - free(buf); -} - - -void -_mesa_meta_CopyTexSubImage1D(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLint xoffset, - struct gl_renderbuffer *rb, - GLint x, GLint y, GLsizei width) -{ - copy_tex_sub_image(ctx, 1, texImage, xoffset, 0, 0, - rb, x, y, width, 1); -} - - -void -_mesa_meta_CopyTexSubImage2D(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLint xoffset, GLint yoffset, - struct gl_renderbuffer *rb, - GLint x, GLint y, - GLsizei width, GLsizei height) -{ - copy_tex_sub_image(ctx, 2, texImage, xoffset, yoffset, 0, - rb, x, y, width, height); -} - - -void -_mesa_meta_CopyTexSubImage3D(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLint xoffset, GLint yoffset, GLint zoffset, - struct gl_renderbuffer *rb, - GLint x, GLint y, - GLsizei width, GLsizei height) -{ - copy_tex_sub_image(ctx, 3, texImage, xoffset, yoffset, zoffset, - rb, x, y, width, height); -} - - -/** - * Decompress a texture image by drawing a quad with the compressed - * texture and reading the pixels out of the color buffer. - * \param slice which slice of a 3D texture or layer of a 1D/2D texture - * \param destFormat format, ala glReadPixels - * \param destType type, ala glReadPixels - * \param dest destination buffer - * \param destRowLength dest image rowLength (ala GL_PACK_ROW_LENGTH) - */ -static void -decompress_texture_image(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLuint slice, - GLenum destFormat, GLenum destType, - GLvoid *dest) -{ - struct decompress_state *decompress = &ctx->Meta->Decompress; - struct gl_texture_object *texObj = texImage->TexObject; - const GLint width = texImage->Width; - const GLint height = texImage->Height; - const GLenum target = texObj->Target; - GLenum faceTarget; - struct vertex { - GLfloat x, y, tex[3]; - }; - struct vertex verts[4]; - GLuint fboDrawSave, fboReadSave; - GLuint rbSave; - - if (slice > 0) { - assert(target == GL_TEXTURE_3D || - target == GL_TEXTURE_2D_ARRAY); - } - - if (target == GL_TEXTURE_CUBE_MAP) { - faceTarget = GL_TEXTURE_CUBE_MAP_POSITIVE_X + texImage->Face; - } - else { - faceTarget = target; - } - - /* save fbo bindings (not saved by _mesa_meta_begin()) */ - fboDrawSave = ctx->DrawBuffer->Name; - fboReadSave = ctx->ReadBuffer->Name; - rbSave = ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0; - - _mesa_meta_begin(ctx, MESA_META_ALL & ~MESA_META_PIXEL_STORE); - - /* Create/bind FBO/renderbuffer */ - if (decompress->FBO == 0) { - _mesa_GenFramebuffersEXT(1, &decompress->FBO); - _mesa_GenRenderbuffersEXT(1, &decompress->RBO); - _mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, decompress->FBO); - _mesa_BindRenderbufferEXT(GL_RENDERBUFFER_EXT, decompress->RBO); - _mesa_FramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, - GL_COLOR_ATTACHMENT0_EXT, - GL_RENDERBUFFER_EXT, - decompress->RBO); - } - else { - _mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, decompress->FBO); - } - - /* alloc dest surface */ - if (width > decompress->Width || height > decompress->Height) { - _mesa_BindRenderbufferEXT(GL_RENDERBUFFER_EXT, decompress->RBO); - _mesa_RenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA, - width, height); - decompress->Width = width; - decompress->Height = height; - } - - /* setup VBO data */ - if (decompress->ArrayObj == 0) { - /* create vertex array object */ - _mesa_GenVertexArrays(1, &decompress->ArrayObj); - _mesa_BindVertexArray(decompress->ArrayObj); - - /* create vertex array buffer */ - _mesa_GenBuffersARB(1, &decompress->VBO); - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, decompress->VBO); - _mesa_BufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), - NULL, GL_DYNAMIC_DRAW_ARB); - - /* setup vertex arrays */ - _mesa_VertexPointer(2, GL_FLOAT, sizeof(struct vertex), OFFSET(x)); - _mesa_TexCoordPointer(3, GL_FLOAT, sizeof(struct vertex), OFFSET(tex)); - _mesa_EnableClientState(GL_VERTEX_ARRAY); - _mesa_EnableClientState(GL_TEXTURE_COORD_ARRAY); - } - else { - _mesa_BindVertexArray(decompress->ArrayObj); - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, decompress->VBO); - } - - setup_texture_coords(faceTarget, slice, width, height, - verts[0].tex, - verts[1].tex, - verts[2].tex, - verts[3].tex); - - /* setup vertex positions */ - verts[0].x = 0.0F; - verts[0].y = 0.0F; - verts[1].x = width; - verts[1].y = 0.0F; - verts[2].x = width; - verts[2].y = height; - verts[3].x = 0.0F; - verts[3].y = height; - - /* upload new vertex data */ - _mesa_BufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts); - - /* setup texture state */ - _mesa_BindTexture(target, texObj->Name); - _mesa_set_enable(ctx, target, GL_TRUE); - - { - /* save texture object state */ - const GLenum minFilterSave = texObj->Sampler.MinFilter; - const GLenum magFilterSave = texObj->Sampler.MagFilter; - const GLint baseLevelSave = texObj->BaseLevel; - const GLint maxLevelSave = texObj->MaxLevel; - const GLenum wrapSSave = texObj->Sampler.WrapS; - const GLenum wrapTSave = texObj->Sampler.WrapT; - const GLenum srgbSave = texObj->Sampler.sRGBDecode; - - /* restrict sampling to the texture level of interest */ - _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, texImage->Level); - _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, texImage->Level); - /* nearest filtering */ - _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - - /* No sRGB decode or encode.*/ - if (ctx->Extensions.EXT_texture_sRGB_decode) { - _mesa_TexParameteri(target, GL_TEXTURE_SRGB_DECODE_EXT, - GL_SKIP_DECODE_EXT); - } - if (ctx->Extensions.EXT_framebuffer_sRGB) { - _mesa_set_enable(ctx, GL_FRAMEBUFFER_SRGB_EXT, GL_FALSE); - } - - /* render quad w/ texture into renderbuffer */ - _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); - - /* Restore texture object state, the texture binding will - * be restored by _mesa_meta_end(). - */ - _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, minFilterSave); - _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, magFilterSave); - if (target != GL_TEXTURE_RECTANGLE_ARB) { - _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, baseLevelSave); - _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, maxLevelSave); - } - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, wrapSSave); - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_T, wrapTSave); - if (ctx->Extensions.EXT_texture_sRGB_decode) { - _mesa_TexParameteri(target, GL_TEXTURE_SRGB_DECODE_EXT, srgbSave); - } - } - - /* read pixels from renderbuffer */ - { - GLenum baseTexFormat = texImage->_BaseFormat; - - /* The pixel transfer state will be set to default values at this point - * (see MESA_META_PIXEL_TRANSFER) so pixel transfer ops are effectively - * turned off (as required by glGetTexImage) but we need to handle some - * special cases. In particular, single-channel texture values are - * returned as red and two-channel texture values are returned as - * red/alpha. - */ - if (baseTexFormat == GL_LUMINANCE || - baseTexFormat == GL_LUMINANCE_ALPHA || - baseTexFormat == GL_INTENSITY) { - /* Green and blue must be zero */ - _mesa_PixelTransferf(GL_GREEN_SCALE, 0.0f); - _mesa_PixelTransferf(GL_BLUE_SCALE, 0.0f); - } - - _mesa_ReadPixels(0, 0, width, height, destFormat, destType, dest); - } - - /* disable texture unit */ - _mesa_set_enable(ctx, target, GL_FALSE); - - _mesa_meta_end(ctx); - - /* restore fbo bindings */ - if (fboDrawSave == fboReadSave) { - _mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboDrawSave); - } - else { - _mesa_BindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, fboDrawSave); - _mesa_BindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, fboReadSave); - } - _mesa_BindRenderbufferEXT(GL_RENDERBUFFER_EXT, rbSave); -} - - -/** - * This is just a wrapper around _mesa_get_tex_image() and - * decompress_texture_image(). Meta functions should not be directly called - * from core Mesa. - */ -void -_mesa_meta_GetTexImage(struct gl_context *ctx, - GLenum format, GLenum type, GLvoid *pixels, - struct gl_texture_image *texImage) -{ - /* We can only use the decompress-with-blit method here if the texels are - * unsigned, normalized values. We could handle signed and unnormalized - * with floating point renderbuffers... - */ - if (_mesa_is_format_compressed(texImage->TexFormat) && - _mesa_get_format_datatype(texImage->TexFormat) - == GL_UNSIGNED_NORMALIZED) { - struct gl_texture_object *texObj = texImage->TexObject; - const GLuint slice = 0; /* only 2D compressed textures for now */ - /* Need to unlock the texture here to prevent deadlock... */ - _mesa_unlock_texture(ctx, texObj); - decompress_texture_image(ctx, texImage, slice, format, type, pixels); - /* ... and relock it */ - _mesa_lock_texture(ctx, texObj); - } - else { - _mesa_get_teximage(ctx, format, type, pixels, texImage); - } -} - - -/** - * Meta implementation of ctx->Driver.DrawTex() in terms - * of polygon rendering. - */ -void -_mesa_meta_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, - GLfloat width, GLfloat height) -{ -#if FEATURE_OES_draw_texture - struct drawtex_state *drawtex = &ctx->Meta->DrawTex; - struct vertex { - GLfloat x, y, z, st[MAX_TEXTURE_UNITS][2]; - }; - struct vertex verts[4]; - GLuint i; - - _mesa_meta_begin(ctx, (MESA_META_RASTERIZATION | - MESA_META_SHADER | - MESA_META_TRANSFORM | - MESA_META_VERTEX | - MESA_META_VIEWPORT)); - - if (drawtex->ArrayObj == 0) { - /* one-time setup */ - GLint active_texture; - - /* create vertex array object */ - _mesa_GenVertexArrays(1, &drawtex->ArrayObj); - _mesa_BindVertexArray(drawtex->ArrayObj); - - /* create vertex array buffer */ - _mesa_GenBuffersARB(1, &drawtex->VBO); - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, drawtex->VBO); - _mesa_BufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), - NULL, GL_DYNAMIC_DRAW_ARB); - - /* client active texture is not part of the array object */ - active_texture = ctx->Array.ActiveTexture; - - /* setup vertex arrays */ - _mesa_VertexPointer(3, GL_FLOAT, sizeof(struct vertex), OFFSET(x)); - _mesa_EnableClientState(GL_VERTEX_ARRAY); - for (i = 0; i < ctx->Const.MaxTextureUnits; i++) { - _mesa_ClientActiveTextureARB(GL_TEXTURE0 + i); - _mesa_TexCoordPointer(2, GL_FLOAT, sizeof(struct vertex), OFFSET(st[i])); - _mesa_EnableClientState(GL_TEXTURE_COORD_ARRAY); - } - - /* restore client active texture */ - _mesa_ClientActiveTextureARB(GL_TEXTURE0 + active_texture); - } - else { - _mesa_BindVertexArray(drawtex->ArrayObj); - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, drawtex->VBO); - } - - /* vertex positions, texcoords */ - { - const GLfloat x1 = x + width; - const GLfloat y1 = y + height; - - z = CLAMP(z, 0.0, 1.0); - z = invert_z(z); - - verts[0].x = x; - verts[0].y = y; - verts[0].z = z; - - verts[1].x = x1; - verts[1].y = y; - verts[1].z = z; - - verts[2].x = x1; - verts[2].y = y1; - verts[2].z = z; - - verts[3].x = x; - verts[3].y = y1; - verts[3].z = z; - - for (i = 0; i < ctx->Const.MaxTextureUnits; i++) { - const struct gl_texture_object *texObj; - const struct gl_texture_image *texImage; - GLfloat s, t, s1, t1; - GLuint tw, th; - - if (!ctx->Texture.Unit[i]._ReallyEnabled) { - GLuint j; - for (j = 0; j < 4; j++) { - verts[j].st[i][0] = 0.0f; - verts[j].st[i][1] = 0.0f; - } - continue; - } - - texObj = ctx->Texture.Unit[i]._Current; - texImage = texObj->Image[0][texObj->BaseLevel]; - tw = texImage->Width2; - th = texImage->Height2; - - s = (GLfloat) texObj->CropRect[0] / tw; - t = (GLfloat) texObj->CropRect[1] / th; - s1 = (GLfloat) (texObj->CropRect[0] + texObj->CropRect[2]) / tw; - t1 = (GLfloat) (texObj->CropRect[1] + texObj->CropRect[3]) / th; - - verts[0].st[i][0] = s; - verts[0].st[i][1] = t; - - verts[1].st[i][0] = s1; - verts[1].st[i][1] = t; - - verts[2].st[i][0] = s1; - verts[2].st[i][1] = t1; - - verts[3].st[i][0] = s; - verts[3].st[i][1] = t1; - } - - _mesa_BufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, sizeof(verts), verts); - } - - _mesa_DrawArrays(GL_TRIANGLE_FAN, 0, 4); - - _mesa_meta_end(ctx); -#endif /* FEATURE_OES_draw_texture */ -} diff --git a/dll/opengl/mesa/src/mesa/drivers/osmesa/SConscript b/dll/opengl/mesa/src/mesa/drivers/osmesa/SConscript deleted file mode 100644 index 5ccef5f130c..00000000000 --- a/dll/opengl/mesa/src/mesa/drivers/osmesa/SConscript +++ /dev/null @@ -1,36 +0,0 @@ -Import('*') - -env = env.Clone() - -env.Prepend(CPPPATH = [ - '#src/mapi', - '#src/mesa', -]) - -env.Prepend(LIBS = [ - glapi, - mesa, - glsl, -]) - -sources = [ - 'osmesa.c', -] - -if env['platform'] == 'windows': - env.AppendUnique(CPPDEFINES = [ - '_GDI32_', # prevent wgl* being declared __declspec(dllimport) - 'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers - ]) - if not env['gles']: - # prevent _glapi_* from being declared __declspec(dllimport) - env.Append(CPPDEFINES = ['_GLAPI_NO_EXPORTS']) - - sources += ['osmesa.def'] - -osmesa = env.SharedLibrary( - target ='osmesa', - source = sources, -) - -env.Alias('osmesa', osmesa) diff --git a/dll/opengl/mesa/src/mesa/drivers/osmesa/osmesa.c b/dll/opengl/mesa/src/mesa/drivers/osmesa/osmesa.c deleted file mode 100644 index b7672403335..00000000000 --- a/dll/opengl/mesa/src/mesa/drivers/osmesa/osmesa.c +++ /dev/null @@ -1,1155 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5.3 - * - * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/* - * Off-Screen Mesa rendering / Rendering into client memory space - * - * Note on thread safety: this driver is thread safe. All - * functions are reentrant. The notion of current context is - * managed by the core _mesa_make_current() and _mesa_get_current_context() - * functions. Those functions are thread-safe. - */ - - -#include "main/glheader.h" -#include "GL/osmesa.h" -#include "main/context.h" -#include "main/extensions.h" -#include "main/formats.h" -#include "main/framebuffer.h" -#include "main/imports.h" -#include "main/macros.h" -#include "main/mtypes.h" -#include "main/renderbuffer.h" -#include "swrast/swrast.h" -#include "swrast_setup/swrast_setup.h" -#include "swrast/s_context.h" -#include "swrast/s_lines.h" -#include "swrast/s_renderbuffer.h" -#include "swrast/s_triangle.h" -#include "tnl/tnl.h" -#include "tnl/t_context.h" -#include "tnl/t_pipeline.h" -#include "drivers/common/driverfuncs.h" -#include "drivers/common/meta.h" -#include "vbo/vbo.h" - - -#define OSMESA_RENDERBUFFER_CLASS 0x053 - - -/** - * OSMesa rendering context, derived from core Mesa struct gl_context. - */ -struct osmesa_context -{ - struct gl_context mesa; /*< Base class - this must be first */ - struct gl_config *gl_visual; /*< Describes the buffers */ - struct swrast_renderbuffer *srb; /*< The user's colorbuffer */ - struct gl_framebuffer *gl_buffer; /*< The framebuffer, containing user's rb */ - GLenum format; /*< User-specified context format */ - GLint userRowLength; /*< user-specified number of pixels per row */ - GLint rInd, gInd, bInd, aInd;/*< index offsets for RGBA formats */ - GLvoid *rowaddr[MAX_HEIGHT]; /*< address of first pixel in each image row */ - GLboolean yup; /*< TRUE -> Y increases upward */ - /*< FALSE -> Y increases downward */ - GLenum DataType; -}; - - -static INLINE OSMesaContext -OSMESA_CONTEXT(struct gl_context *ctx) -{ - /* Just cast, since we're using structure containment */ - return (OSMesaContext) ctx; -} - - -/**********************************************************************/ -/*** Private Device Driver Functions ***/ -/**********************************************************************/ - - -static const GLubyte * -get_string( struct gl_context *ctx, GLenum name ) -{ - (void) ctx; - switch (name) { - case GL_RENDERER: -#if CHAN_BITS == 32 - return (const GLubyte *) "Mesa OffScreen32"; -#elif CHAN_BITS == 16 - return (const GLubyte *) "Mesa OffScreen16"; -#else - return (const GLubyte *) "Mesa OffScreen"; -#endif - default: - return NULL; - } -} - - -static void -osmesa_update_state( struct gl_context *ctx, GLuint new_state ) -{ - /* easy - just propogate */ - _swrast_InvalidateState( ctx, new_state ); - _swsetup_InvalidateState( ctx, new_state ); - _tnl_InvalidateState( ctx, new_state ); - _vbo_InvalidateState( ctx, new_state ); -} - - - -/** - * Macros for optimized line/triangle rendering. - * Only for 8-bit channel, RGBA, BGRA, ARGB formats. - */ - -#define PACK_RGBA(DST, R, G, B, A) \ -do { \ - (DST)[osmesa->rInd] = R; \ - (DST)[osmesa->gInd] = G; \ - (DST)[osmesa->bInd] = B; \ - (DST)[osmesa->aInd] = A; \ -} while (0) - -#define PIXELADDR4(X,Y) ((GLchan *) osmesa->rowaddr[Y] + 4 * (X)) - - -/** - * Draw a flat-shaded, RGB line into an osmesa buffer. - */ -#define NAME flat_rgba_line -#define CLIP_HACK 1 -#define SETUP_CODE \ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); \ - const GLchan *color = vert1->color; - -#define PLOT(X, Y) \ -do { \ - GLchan *p = PIXELADDR4(X, Y); \ - PACK_RGBA(p, color[0], color[1], color[2], color[3]); \ -} while (0) - -#include "swrast/s_linetemp.h" - - - -/** - * Draw a flat-shaded, Z-less, RGB line into an osmesa buffer. - */ -#define NAME flat_rgba_z_line -#define CLIP_HACK 1 -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define SETUP_CODE \ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); \ - const GLchan *color = vert1->color; - -#define PLOT(X, Y) \ -do { \ - if (Z < *zPtr) { \ - GLchan *p = PIXELADDR4(X, Y); \ - PACK_RGBA(p, color[RCOMP], color[GCOMP], \ - color[BCOMP], color[ACOMP]); \ - *zPtr = Z; \ - } \ -} while (0) - -#include "swrast/s_linetemp.h" - - - -/** - * Analyze context state to see if we can provide a fast line drawing - * function. Otherwise, return NULL. - */ -static swrast_line_func -osmesa_choose_line_function( struct gl_context *ctx ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - const SWcontext *swrast = SWRAST_CONTEXT(ctx); - - if (ctx->RenderMode != GL_RENDER) return NULL; - if (ctx->Line.SmoothFlag) return NULL; - if (ctx->Texture._EnabledUnits) return NULL; - if (ctx->Light.ShadeModel != GL_FLAT) return NULL; - if (ctx->Line.Width != 1.0F) return NULL; - if (ctx->Line.StippleFlag) return NULL; - if (ctx->Line.SmoothFlag) return NULL; - if (osmesa->format != OSMESA_RGBA && - osmesa->format != OSMESA_BGRA && - osmesa->format != OSMESA_ARGB) return NULL; - - if (swrast->_RasterMask==DEPTH_BIT - && ctx->Depth.Func==GL_LESS - && ctx->Depth.Mask==GL_TRUE - && ctx->Visual.depthBits == DEFAULT_SOFTWARE_DEPTH_BITS) { - return (swrast_line_func) flat_rgba_z_line; - } - - if (swrast->_RasterMask == 0) { - return (swrast_line_func) flat_rgba_line; - } - - return (swrast_line_func) NULL; -} - - -/**********************************************************************/ -/***** Optimized triangle rendering *****/ -/**********************************************************************/ - - -/* - * Smooth-shaded, z-less triangle, RGBA color. - */ -#define NAME smooth_rgba_z_triangle -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define INTERP_RGB 1 -#define INTERP_ALPHA 1 -#define SETUP_CODE \ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); -#define RENDER_SPAN( span ) { \ - GLuint i; \ - GLchan *img = PIXELADDR4(span.x, span.y); \ - for (i = 0; i < span.end; i++, img += 4) { \ - const GLuint z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - PACK_RGBA(img, FixedToChan(span.red), \ - FixedToChan(span.green), FixedToChan(span.blue), \ - FixedToChan(span.alpha)); \ - zRow[i] = z; \ - } \ - span.red += span.redStep; \ - span.green += span.greenStep; \ - span.blue += span.blueStep; \ - span.alpha += span.alphaStep; \ - span.z += span.zStep; \ - } \ -} -#include "swrast/s_tritemp.h" - - - -/* - * Flat-shaded, z-less triangle, RGBA color. - */ -#define NAME flat_rgba_z_triangle -#define INTERP_Z 1 -#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE -#define SETUP_CODE \ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); \ - GLuint pixel; \ - PACK_RGBA((GLchan *) &pixel, v2->color[0], v2->color[1], \ - v2->color[2], v2->color[3]); - -#define RENDER_SPAN( span ) { \ - GLuint i; \ - GLuint *img = (GLuint *) PIXELADDR4(span.x, span.y); \ - for (i = 0; i < span.end; i++) { \ - const GLuint z = FixedToDepth(span.z); \ - if (z < zRow[i]) { \ - img[i] = pixel; \ - zRow[i] = z; \ - } \ - span.z += span.zStep; \ - } \ -} - -#include "swrast/s_tritemp.h" - - - -/** - * Return pointer to an optimized triangle function if possible. - */ -static swrast_tri_func -osmesa_choose_triangle_function( struct gl_context *ctx ) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - const SWcontext *swrast = SWRAST_CONTEXT(ctx); - - if (ctx->RenderMode != GL_RENDER) return (swrast_tri_func) NULL; - if (ctx->Polygon.SmoothFlag) return (swrast_tri_func) NULL; - if (ctx->Polygon.StippleFlag) return (swrast_tri_func) NULL; - if (ctx->Texture._EnabledUnits) return (swrast_tri_func) NULL; - if (osmesa->format != OSMESA_RGBA && - osmesa->format != OSMESA_BGRA && - osmesa->format != OSMESA_ARGB) return (swrast_tri_func) NULL; - if (ctx->Polygon.CullFlag && - ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK) - return (swrast_tri_func) NULL; - - if (swrast->_RasterMask == DEPTH_BIT && - ctx->Depth.Func == GL_LESS && - ctx->Depth.Mask == GL_TRUE && - ctx->Visual.depthBits == DEFAULT_SOFTWARE_DEPTH_BITS) { - if (ctx->Light.ShadeModel == GL_SMOOTH) { - return (swrast_tri_func) smooth_rgba_z_triangle; - } - else { - return (swrast_tri_func) flat_rgba_z_triangle; - } - } - return (swrast_tri_func) NULL; -} - - - -/* Override for the swrast triangle-selection function. Try to use one - * of our internal triangle functions, otherwise fall back to the - * standard swrast functions. - */ -static void -osmesa_choose_triangle( struct gl_context *ctx ) -{ - SWcontext *swrast = SWRAST_CONTEXT(ctx); - - swrast->Triangle = osmesa_choose_triangle_function( ctx ); - if (!swrast->Triangle) - _swrast_choose_triangle( ctx ); -} - -static void -osmesa_choose_line( struct gl_context *ctx ) -{ - SWcontext *swrast = SWRAST_CONTEXT(ctx); - - swrast->Line = osmesa_choose_line_function( ctx ); - if (!swrast->Line) - _swrast_choose_line( ctx ); -} - - - -/** - * Recompute the values of the context's rowaddr array. - */ -static void -compute_row_addresses( OSMesaContext osmesa ) -{ - GLint bytesPerRow, i; - GLubyte *origin = (GLubyte *) osmesa->srb->Buffer; - GLint rowlength; /* in pixels */ - GLint height = osmesa->srb->Base.Height; - - if (osmesa->userRowLength) - rowlength = osmesa->userRowLength; - else - rowlength = osmesa->srb->Base.Width; - - bytesPerRow = rowlength * _mesa_get_format_bytes(osmesa->srb->Base.Format); - - if (osmesa->yup) { - /* Y=0 is bottom line of window */ - for (i = 0; i < height; i++) { - osmesa->rowaddr[i] = (GLvoid *) ((GLubyte *) origin + i * bytesPerRow); - } - } - else { - /* Y=0 is top line of window */ - for (i = 0; i < height; i++) { - GLint j = height - i - 1; - osmesa->rowaddr[i] = (GLvoid *) ((GLubyte *) origin + j * bytesPerRow); - } - } -} - - - -/** - * Don't use _mesa_delete_renderbuffer since we can't free rb->Buffer. - */ -static void -osmesa_delete_renderbuffer(struct gl_renderbuffer *rb) -{ - free(rb); -} - - -/** - * Allocate renderbuffer storage. We don't actually allocate any storage - * since we're using a user-provided buffer. - * Just set up all the gl_renderbuffer methods. - */ -static GLboolean -osmesa_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *rb, - GLenum internalFormat, GLuint width, GLuint height) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - - /* Note: we can ignoring internalFormat for "window-system" renderbuffers */ - (void) internalFormat; - - /* Given the user-provided format and type, figure out which MESA_FORMAT_x - * to use. - * XXX There aren't Mesa formats for all the possible combinations here! - * XXX Specifically, there's only RGBA-order 16-bit/channel and float - * XXX formats. - * XXX The 8-bit/channel formats should all be OK. - */ - if (osmesa->format == OSMESA_RGBA) { - if (osmesa->DataType == GL_UNSIGNED_BYTE) { - if (_mesa_little_endian()) - rb->Format = MESA_FORMAT_RGBA8888_REV; - else - rb->Format = MESA_FORMAT_RGBA8888; - } - else if (osmesa->DataType == GL_UNSIGNED_SHORT) { - rb->Format = MESA_FORMAT_RGBA_16; - } - else { - rb->Format = MESA_FORMAT_RGBA_FLOAT32; - } - } - else if (osmesa->format == OSMESA_BGRA) { - if (osmesa->DataType == GL_UNSIGNED_BYTE) { - if (_mesa_little_endian()) - rb->Format = MESA_FORMAT_ARGB8888; - else - rb->Format = MESA_FORMAT_ARGB8888_REV; - } - else if (osmesa->DataType == GL_UNSIGNED_SHORT) { - _mesa_warning(ctx, "Unsupported OSMesa format BGRA/GLushort"); - rb->Format = MESA_FORMAT_RGBA_16; /* not exactly right */ - } - else { - _mesa_warning(ctx, "Unsupported OSMesa format BGRA/GLfloat"); - rb->Format = MESA_FORMAT_RGBA_FLOAT32; /* not exactly right */ - } - } - else if (osmesa->format == OSMESA_ARGB) { - if (osmesa->DataType == GL_UNSIGNED_BYTE) { - if (_mesa_little_endian()) - rb->Format = MESA_FORMAT_ARGB8888_REV; - else - rb->Format = MESA_FORMAT_ARGB8888; - } - else if (osmesa->DataType == GL_UNSIGNED_SHORT) { - _mesa_warning(ctx, "Unsupported OSMesa format ARGB/GLushort"); - rb->Format = MESA_FORMAT_RGBA_16; /* not exactly right */ - } - else { - _mesa_warning(ctx, "Unsupported OSMesa format ARGB/GLfloat"); - rb->Format = MESA_FORMAT_RGBA_FLOAT32; /* not exactly right */ - } - } - else if (osmesa->format == OSMESA_RGB) { - if (osmesa->DataType == GL_UNSIGNED_BYTE) { - rb->Format = MESA_FORMAT_RGB888; - } - else if (osmesa->DataType == GL_UNSIGNED_SHORT) { - _mesa_warning(ctx, "Unsupported OSMesa format RGB/GLushort"); - rb->Format = MESA_FORMAT_RGBA_16; /* not exactly right */ - } - else { - _mesa_warning(ctx, "Unsupported OSMesa format RGB/GLfloat"); - rb->Format = MESA_FORMAT_RGBA_FLOAT32; /* not exactly right */ - } - } - else if (osmesa->format == OSMESA_BGR) { - if (osmesa->DataType == GL_UNSIGNED_BYTE) { - rb->Format = MESA_FORMAT_BGR888; - } - else if (osmesa->DataType == GL_UNSIGNED_SHORT) { - _mesa_warning(ctx, "Unsupported OSMesa format BGR/GLushort"); - rb->Format = MESA_FORMAT_RGBA_16; /* not exactly right */ - } - else { - _mesa_warning(ctx, "Unsupported OSMesa format BGR/GLfloat"); - rb->Format = MESA_FORMAT_RGBA_FLOAT32; /* not exactly right */ - } - } - else if (osmesa->format == OSMESA_RGB_565) { - ASSERT(osmesa->DataType == GL_UNSIGNED_BYTE); - rb->Format = MESA_FORMAT_RGB565; - } - else { - _mesa_problem(ctx, "bad pixel format in osmesa renderbuffer_storage"); - } - - rb->Width = width; - rb->Height = height; - - compute_row_addresses( osmesa ); - - return GL_TRUE; -} - - -/** - * Allocate a new renderbuffer to describe the user-provided color buffer. - */ -static struct swrast_renderbuffer * -new_osmesa_renderbuffer(struct gl_context *ctx, GLenum format, GLenum type) -{ - const GLuint name = 0; - struct swrast_renderbuffer *srb = CALLOC_STRUCT(swrast_renderbuffer); - - if (srb) { - _mesa_init_renderbuffer(&srb->Base, name); - - srb->Base.ClassID = OSMESA_RENDERBUFFER_CLASS; - srb->Base.RefCount = 1; - srb->Base.Delete = osmesa_delete_renderbuffer; - srb->Base.AllocStorage = osmesa_renderbuffer_storage; - - srb->Base.InternalFormat = GL_RGBA; - srb->Base._BaseFormat = GL_RGBA; - - return srb; - } - return NULL; -} - - - -static void -osmesa_MapRenderbuffer(struct gl_context *ctx, - struct gl_renderbuffer *rb, - GLuint x, GLuint y, GLuint w, GLuint h, - GLbitfield mode, - GLubyte **mapOut, GLint *rowStrideOut) -{ - const OSMesaContext osmesa = OSMESA_CONTEXT(ctx); - - if (rb->ClassID == OSMESA_RENDERBUFFER_CLASS) { - /* this is an OSMesa renderbuffer which wraps user memory */ - struct swrast_renderbuffer *srb = swrast_renderbuffer(rb); - const GLuint bpp = _mesa_get_format_bytes(rb->Format); - GLint rowStride; /* in bytes */ - - if (osmesa->userRowLength) - rowStride = osmesa->userRowLength * bpp; - else - rowStride = rb->Width * bpp; - - if (!osmesa->yup) { - /* Y=0 is top line of window */ - y = rb->Height - y - 1; - *rowStrideOut = -rowStride; - } - else { - *rowStrideOut = rowStride; - } - - *mapOut = (GLubyte *) srb->Buffer + y * rowStride + x * bpp; - } - else { - _swrast_map_soft_renderbuffer(ctx, rb, x, y, w, h, mode, - mapOut, rowStrideOut); - } -} - - -static void -osmesa_UnmapRenderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb) -{ - if (rb->ClassID == OSMESA_RENDERBUFFER_CLASS) { - /* no-op */ - } - else { - _swrast_unmap_soft_renderbuffer(ctx, rb); - } -} - - -/**********************************************************************/ -/***** Public Functions *****/ -/**********************************************************************/ - - -/** - * Create an Off-Screen Mesa rendering context. The only attribute needed is - * an RGBA vs Color-Index mode flag. - * - * Input: format - Must be GL_RGBA - * sharelist - specifies another OSMesaContext with which to share - * display lists. NULL indicates no sharing. - * Return: an OSMesaContext or 0 if error - */ -GLAPI OSMesaContext GLAPIENTRY -OSMesaCreateContext( GLenum format, OSMesaContext sharelist ) -{ - return OSMesaCreateContextExt(format, DEFAULT_SOFTWARE_DEPTH_BITS, - 8, 0, sharelist); -} - - - -/** - * New in Mesa 3.5 - * - * Create context and specify size of ancillary buffers. - */ -GLAPI OSMesaContext GLAPIENTRY -OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits, - GLint accumBits, OSMesaContext sharelist ) -{ - OSMesaContext osmesa; - struct dd_function_table functions; - GLint rind, gind, bind, aind; - GLint redBits = 0, greenBits = 0, blueBits = 0, alphaBits =0; - - rind = gind = bind = aind = 0; - if (format==OSMESA_RGBA) { - redBits = CHAN_BITS; - greenBits = CHAN_BITS; - blueBits = CHAN_BITS; - alphaBits = CHAN_BITS; - rind = 0; - gind = 1; - bind = 2; - aind = 3; - } - else if (format==OSMESA_BGRA) { - redBits = CHAN_BITS; - greenBits = CHAN_BITS; - blueBits = CHAN_BITS; - alphaBits = CHAN_BITS; - bind = 0; - gind = 1; - rind = 2; - aind = 3; - } - else if (format==OSMESA_ARGB) { - redBits = CHAN_BITS; - greenBits = CHAN_BITS; - blueBits = CHAN_BITS; - alphaBits = CHAN_BITS; - aind = 0; - rind = 1; - gind = 2; - bind = 3; - } - else if (format==OSMESA_RGB) { - redBits = CHAN_BITS; - greenBits = CHAN_BITS; - blueBits = CHAN_BITS; - alphaBits = 0; - rind = 0; - gind = 1; - bind = 2; - } - else if (format==OSMESA_BGR) { - redBits = CHAN_BITS; - greenBits = CHAN_BITS; - blueBits = CHAN_BITS; - alphaBits = 0; - rind = 2; - gind = 1; - bind = 0; - } -#if CHAN_TYPE == GL_UNSIGNED_BYTE - else if (format==OSMESA_RGB_565) { - redBits = 5; - greenBits = 6; - blueBits = 5; - alphaBits = 0; - rind = 0; /* not used */ - gind = 0; - bind = 0; - } -#endif - else { - return NULL; - } - - osmesa = (OSMesaContext) CALLOC_STRUCT(osmesa_context); - if (osmesa) { - osmesa->gl_visual = _mesa_create_visual( GL_FALSE, /* double buffer */ - GL_FALSE, /* stereo */ - redBits, - greenBits, - blueBits, - alphaBits, - depthBits, - stencilBits, - accumBits, - accumBits, - accumBits, - alphaBits ? accumBits : 0, - 1 /* num samples */ - ); - if (!osmesa->gl_visual) { - free(osmesa); - return NULL; - } - - /* Initialize device driver function table */ - _mesa_init_driver_functions(&functions); - /* override with our functions */ - functions.GetString = get_string; - functions.UpdateState = osmesa_update_state; - functions.GetBufferSize = NULL; - - if (!_mesa_initialize_context(&osmesa->mesa, - API_OPENGL, - osmesa->gl_visual, - sharelist ? &sharelist->mesa - : (struct gl_context *) NULL, - &functions, (void *) osmesa)) { - _mesa_destroy_visual( osmesa->gl_visual ); - free(osmesa); - return NULL; - } - - _mesa_enable_sw_extensions(&(osmesa->mesa)); - _mesa_enable_1_3_extensions(&(osmesa->mesa)); - _mesa_enable_1_4_extensions(&(osmesa->mesa)); - _mesa_enable_1_5_extensions(&(osmesa->mesa)); - _mesa_enable_2_0_extensions(&(osmesa->mesa)); - _mesa_enable_2_1_extensions(&(osmesa->mesa)); - - osmesa->gl_buffer = _mesa_create_framebuffer(osmesa->gl_visual); - if (!osmesa->gl_buffer) { - _mesa_destroy_visual( osmesa->gl_visual ); - _mesa_free_context_data( &osmesa->mesa ); - free(osmesa); - return NULL; - } - - /* Create depth/stencil/accum buffers. We'll create the color - * buffer later in OSMesaMakeCurrent(). - */ - _swrast_add_soft_renderbuffers(osmesa->gl_buffer, - GL_FALSE, /* color */ - osmesa->gl_visual->haveDepthBuffer, - osmesa->gl_visual->haveStencilBuffer, - osmesa->gl_visual->haveAccumBuffer, - GL_FALSE, /* alpha */ - GL_FALSE /* aux */ ); - - osmesa->format = format; - osmesa->userRowLength = 0; - osmesa->yup = GL_TRUE; - osmesa->rInd = rind; - osmesa->gInd = gind; - osmesa->bInd = bind; - osmesa->aInd = aind; - - _mesa_meta_init(&osmesa->mesa); - - /* Initialize the software rasterizer and helper modules. */ - { - struct gl_context *ctx = &osmesa->mesa; - SWcontext *swrast; - TNLcontext *tnl; - - if (!_swrast_CreateContext( ctx ) || - !_vbo_CreateContext( ctx ) || - !_tnl_CreateContext( ctx ) || - !_swsetup_CreateContext( ctx )) { - _mesa_destroy_visual(osmesa->gl_visual); - _mesa_free_context_data(ctx); - free(osmesa); - return NULL; - } - - _swsetup_Wakeup( ctx ); - - /* use default TCL pipeline */ - tnl = TNL_CONTEXT(ctx); - tnl->Driver.RunPipeline = _tnl_run_pipeline; - - ctx->Driver.MapRenderbuffer = osmesa_MapRenderbuffer; - ctx->Driver.UnmapRenderbuffer = osmesa_UnmapRenderbuffer; - - /* Extend the software rasterizer with our optimized line and triangle - * drawing functions. - */ - swrast = SWRAST_CONTEXT( ctx ); - swrast->choose_line = osmesa_choose_line; - swrast->choose_triangle = osmesa_choose_triangle; - } - } - return osmesa; -} - - -/** - * Destroy an Off-Screen Mesa rendering context. - * - * \param osmesa the context to destroy - */ -GLAPI void GLAPIENTRY -OSMesaDestroyContext( OSMesaContext osmesa ) -{ - if (osmesa) { - if (osmesa->srb) - _mesa_reference_renderbuffer((struct gl_renderbuffer **) &osmesa->srb, NULL); - - _mesa_meta_free( &osmesa->mesa ); - - _swsetup_DestroyContext( &osmesa->mesa ); - _tnl_DestroyContext( &osmesa->mesa ); - _vbo_DestroyContext( &osmesa->mesa ); - _swrast_DestroyContext( &osmesa->mesa ); - - _mesa_destroy_visual( osmesa->gl_visual ); - _mesa_reference_framebuffer( &osmesa->gl_buffer, NULL ); - - _mesa_free_context_data( &osmesa->mesa ); - free( osmesa ); - } -} - - -/** - * Bind an OSMesaContext to an image buffer. The image buffer is just a - * block of memory which the client provides. Its size must be at least - * as large as width*height*sizeof(type). Its address should be a multiple - * of 4 if using RGBA mode. - * - * Image data is stored in the order of glDrawPixels: row-major order - * with the lower-left image pixel stored in the first array position - * (ie. bottom-to-top). - * - * If the context's viewport hasn't been initialized yet, it will now be - * initialized to (0,0,width,height). - * - * Input: osmesa - the rendering context - * buffer - the image buffer memory - * type - data type for pixel components - * Normally, only GL_UNSIGNED_BYTE and GL_UNSIGNED_SHORT_5_6_5 - * are supported. But if Mesa's been compiled with CHAN_BITS==16 - * then type may be GL_UNSIGNED_SHORT or GL_UNSIGNED_BYTE. And if - * Mesa's been build with CHAN_BITS==32 then type may be GL_FLOAT, - * GL_UNSIGNED_SHORT or GL_UNSIGNED_BYTE. - * width, height - size of image buffer in pixels, at least 1 - * Return: GL_TRUE if success, GL_FALSE if error because of invalid osmesa, - * invalid buffer address, invalid type, width<1, height<1, - * width>internal limit or height>internal limit. - */ -GLAPI GLboolean GLAPIENTRY -OSMesaMakeCurrent( OSMesaContext osmesa, void *buffer, GLenum type, - GLsizei width, GLsizei height ) -{ - if (!osmesa || !buffer || - width < 1 || height < 1 || - width > MAX_WIDTH || height > MAX_HEIGHT) { - return GL_FALSE; - } - - if (osmesa->format == OSMESA_RGB_565 && type != GL_UNSIGNED_SHORT_5_6_5) { - return GL_FALSE; - } - -#if 0 - if (!(type == GL_UNSIGNED_BYTE || - (type == GL_UNSIGNED_SHORT && CHAN_BITS >= 16) || - (type == GL_FLOAT && CHAN_BITS == 32))) { - /* i.e. is sizeof(type) * 8 > CHAN_BITS? */ - return GL_FALSE; - } -#endif - - osmesa_update_state( &osmesa->mesa, 0 ); - - /* Call this periodically to detect when the user has begun using - * GL rendering from multiple threads. - */ - _glapi_check_multithread(); - - - /* Create a front/left color buffer which wraps the user-provided buffer. - * There is no back color buffer. - * If the user tries to use a 8, 16 or 32-bit/channel buffer that - * doesn't match what Mesa was compiled for (CHAN_BITS) the - * _mesa_add_renderbuffer() function will create a "wrapper" renderbuffer - * that converts rendering from CHAN_BITS to the user-requested channel - * size. - */ - if (!osmesa->srb) { - osmesa->srb = new_osmesa_renderbuffer(&osmesa->mesa, osmesa->format, type); - _mesa_remove_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT); - _mesa_add_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT, - &osmesa->srb->Base); - assert(osmesa->srb->Base.RefCount == 2); - } - - osmesa->DataType = type; - - /* Set renderbuffer fields. Set width/height = 0 to force - * osmesa_renderbuffer_storage() being called by _mesa_resize_framebuffer() - */ - osmesa->srb->Buffer = buffer; - osmesa->srb->Base.Width = osmesa->srb->Base.Height = 0; - - /* Set the framebuffer's size. This causes the - * osmesa_renderbuffer_storage() function to get called. - */ - _mesa_resize_framebuffer(&osmesa->mesa, osmesa->gl_buffer, width, height); - osmesa->gl_buffer->Initialized = GL_TRUE; /* XXX TEMPORARY? */ - - _mesa_make_current( &osmesa->mesa, osmesa->gl_buffer, osmesa->gl_buffer ); - - /* Remove renderbuffer attachment, then re-add. This installs the - * renderbuffer adaptor/wrapper if needed (for bpp conversion). - */ - _mesa_remove_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT); - _mesa_add_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT, - &osmesa->srb->Base); - - - /* this updates the visual's red/green/blue/alphaBits fields */ - _mesa_update_framebuffer_visual(&osmesa->mesa, osmesa->gl_buffer); - - /* update the framebuffer size */ - _mesa_resize_framebuffer(&osmesa->mesa, osmesa->gl_buffer, width, height); - - return GL_TRUE; -} - - - -GLAPI OSMesaContext GLAPIENTRY -OSMesaGetCurrentContext( void ) -{ - struct gl_context *ctx = _mesa_get_current_context(); - if (ctx) - return (OSMesaContext) ctx; - else - return NULL; -} - - - -GLAPI void GLAPIENTRY -OSMesaPixelStore( GLint pname, GLint value ) -{ - OSMesaContext osmesa = OSMesaGetCurrentContext(); - - switch (pname) { - case OSMESA_ROW_LENGTH: - if (value<0) { - _mesa_error( &osmesa->mesa, GL_INVALID_VALUE, - "OSMesaPixelStore(value)" ); - return; - } - osmesa->userRowLength = value; - break; - case OSMESA_Y_UP: - osmesa->yup = value ? GL_TRUE : GL_FALSE; - break; - default: - _mesa_error( &osmesa->mesa, GL_INVALID_ENUM, "OSMesaPixelStore(pname)" ); - return; - } - - compute_row_addresses( osmesa ); -} - - -GLAPI void GLAPIENTRY -OSMesaGetIntegerv( GLint pname, GLint *value ) -{ - OSMesaContext osmesa = OSMesaGetCurrentContext(); - - switch (pname) { - case OSMESA_WIDTH: - if (osmesa->gl_buffer) - *value = osmesa->gl_buffer->Width; - else - *value = 0; - return; - case OSMESA_HEIGHT: - if (osmesa->gl_buffer) - *value = osmesa->gl_buffer->Height; - else - *value = 0; - return; - case OSMESA_FORMAT: - *value = osmesa->format; - return; - case OSMESA_TYPE: - /* current color buffer's data type */ - *value = osmesa->DataType; - return; - case OSMESA_ROW_LENGTH: - *value = osmesa->userRowLength; - return; - case OSMESA_Y_UP: - *value = osmesa->yup; - return; - case OSMESA_MAX_WIDTH: - *value = MAX_WIDTH; - return; - case OSMESA_MAX_HEIGHT: - *value = MAX_HEIGHT; - return; - default: - _mesa_error(&osmesa->mesa, GL_INVALID_ENUM, "OSMesaGetIntergerv(pname)"); - return; - } -} - - -/** - * Return the depth buffer associated with an OSMesa context. - * Input: c - the OSMesa context - * Output: width, height - size of buffer in pixels - * bytesPerValue - bytes per depth value (2 or 4) - * buffer - pointer to depth buffer values - * Return: GL_TRUE or GL_FALSE to indicate success or failure. - */ -GLAPI GLboolean GLAPIENTRY -OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height, - GLint *bytesPerValue, void **buffer ) -{ - struct swrast_renderbuffer *srb = NULL; - - if (c->gl_buffer) - srb = swrast_renderbuffer(c->gl_buffer-> - Attachment[BUFFER_DEPTH].Renderbuffer); - - if (!srb || !srb->Buffer) { - *width = 0; - *height = 0; - *bytesPerValue = 0; - *buffer = 0; - return GL_FALSE; - } - else { - *width = srb->Base.Width; - *height = srb->Base.Height; - if (c->gl_visual->depthBits <= 16) - *bytesPerValue = sizeof(GLushort); - else - *bytesPerValue = sizeof(GLuint); - *buffer = (void *) srb->Buffer; - return GL_TRUE; - } -} - - -/** - * Return the color buffer associated with an OSMesa context. - * Input: c - the OSMesa context - * Output: width, height - size of buffer in pixels - * format - the pixel format (OSMESA_FORMAT) - * buffer - pointer to color buffer values - * Return: GL_TRUE or GL_FALSE to indicate success or failure. - */ -GLAPI GLboolean GLAPIENTRY -OSMesaGetColorBuffer( OSMesaContext osmesa, GLint *width, - GLint *height, GLint *format, void **buffer ) -{ - if (osmesa->srb && osmesa->srb->Buffer) { - *width = osmesa->srb->Base.Width; - *height = osmesa->srb->Base.Height; - *format = osmesa->format; - *buffer = (void *) osmesa->srb->Buffer; - return GL_TRUE; - } - else { - *width = 0; - *height = 0; - *format = 0; - *buffer = 0; - return GL_FALSE; - } -} - - -struct name_function -{ - const char *Name; - OSMESAproc Function; -}; - -static struct name_function functions[] = { - { "OSMesaCreateContext", (OSMESAproc) OSMesaCreateContext }, - { "OSMesaCreateContextExt", (OSMESAproc) OSMesaCreateContextExt }, - { "OSMesaDestroyContext", (OSMESAproc) OSMesaDestroyContext }, - { "OSMesaMakeCurrent", (OSMESAproc) OSMesaMakeCurrent }, - { "OSMesaGetCurrentContext", (OSMESAproc) OSMesaGetCurrentContext }, - { "OSMesaPixelsStore", (OSMESAproc) OSMesaPixelStore }, - { "OSMesaGetIntegerv", (OSMESAproc) OSMesaGetIntegerv }, - { "OSMesaGetDepthBuffer", (OSMESAproc) OSMesaGetDepthBuffer }, - { "OSMesaGetColorBuffer", (OSMESAproc) OSMesaGetColorBuffer }, - { "OSMesaGetProcAddress", (OSMESAproc) OSMesaGetProcAddress }, - { "OSMesaColorClamp", (OSMESAproc) OSMesaColorClamp }, - { NULL, NULL } -}; - - -GLAPI OSMESAproc GLAPIENTRY -OSMesaGetProcAddress( const char *funcName ) -{ - int i; - for (i = 0; functions[i].Name; i++) { - if (strcmp(functions[i].Name, funcName) == 0) - return functions[i].Function; - } - return _glapi_get_proc_address(funcName); -} - - -GLAPI void GLAPIENTRY -OSMesaColorClamp(GLboolean enable) -{ - OSMesaContext osmesa = OSMesaGetCurrentContext(); - - if (enable == GL_TRUE) { - osmesa->mesa.Color.ClampFragmentColor = GL_TRUE; - } - else { - osmesa->mesa.Color.ClampFragmentColor = GL_FIXED_ONLY_ARB; - } -} - - -/** - * When GLX_INDIRECT_RENDERING is defined, some symbols are missing in - * libglapi.a. We need to define them here. - */ -#ifdef GLX_INDIRECT_RENDERING - -#define GL_GLEXT_PROTOTYPES -#include "GL/gl.h" -#include "glapi/glapi.h" -#include "glapi/glapitable.h" - -#if defined(USE_MGL_NAMESPACE) -#define NAME(func) mgl##func -#else -#define NAME(func) gl##func -#endif - -#define DISPATCH(FUNC, ARGS, MESSAGE) \ - GET_DISPATCH()->FUNC ARGS - -#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \ - return GET_DISPATCH()->FUNC ARGS - -/* skip normal ones */ -#define _GLAPI_SKIP_NORMAL_ENTRY_POINTS -#include "glapi/glapitemp.h" - -#endif /* GLX_INDIRECT_RENDERING */ diff --git a/dll/opengl/mesa/src/mesa/drivers/osmesa/osmesa.def b/dll/opengl/mesa/src/mesa/drivers/osmesa/osmesa.def deleted file mode 100644 index 06afab72b0a..00000000000 --- a/dll/opengl/mesa/src/mesa/drivers/osmesa/osmesa.def +++ /dev/null @@ -1,15 +0,0 @@ -;DESCRIPTION 'Mesa OSMesa lib for Win32' -VERSION 4.1 - -EXPORTS - OSMesaColorClamp - OSMesaCreateContext - OSMesaCreateContextExt - OSMesaDestroyContext - OSMesaMakeCurrent - OSMesaGetCurrentContext - OSMesaPixelStore - OSMesaGetIntegerv - OSMesaGetDepthBuffer - OSMesaGetColorBuffer - OSMesaGetProcAddress diff --git a/dll/opengl/mesa/src/mesa/main/APIspec.dtd b/dll/opengl/mesa/src/mesa/main/APIspec.dtd deleted file mode 100644 index efcfa31f10e..00000000000 --- a/dll/opengl/mesa/src/mesa/main/APIspec.dtd +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dll/opengl/mesa/src/mesa/main/APIspec.py b/dll/opengl/mesa/src/mesa/main/APIspec.py deleted file mode 100644 index 6947f7301cd..00000000000 --- a/dll/opengl/mesa/src/mesa/main/APIspec.py +++ /dev/null @@ -1,617 +0,0 @@ -#!/usr/bin/python -# -# Copyright (C) 2009 Chia-I Wu -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# on the rights to use, copy, modify, merge, publish, distribute, sub -# license, and/or sell copies of the Software, and to permit persons to whom -# the Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice (including the next -# paragraph) shall be included in all copies or substantial portions of the -# Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL -# IBM AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -""" -A parser for APIspec. -""" - -class SpecError(Exception): - """Error in the spec file.""" - - -class Spec(object): - """A Spec is an abstraction of the API spec.""" - - def __init__(self, doc): - self.doc = doc - - self.spec_node = doc.getRootElement() - self.tmpl_nodes = {} - self.api_nodes = {} - self.impl_node = None - - # parse - node = self.spec_node.children - while node: - if node.type == "element": - if node.name == "template": - self.tmpl_nodes[node.prop("name")] = node - elif node.name == "api": - self.api_nodes[node.prop("name")] = node - else: - raise SpecError("unexpected node %s in apispec" % - node.name) - node = node.next - - # find an implementation - for name, node in self.api_nodes.iteritems(): - if node.prop("implementation") == "true": - self.impl_node = node - break - if not self.impl_node: - raise SpecError("unable to find an implementation") - - def get_impl(self): - """Return the implementation.""" - return API(self, self.impl_node) - - def get_api(self, name): - """Return an API.""" - return API(self, self.api_nodes[name]) - - -class API(object): - """An API consists of categories and functions.""" - - def __init__(self, spec, api_node): - self.name = api_node.prop("name") - self.is_impl = (api_node.prop("implementation") == "true") - - self.categories = [] - self.functions = [] - - # parse - func_nodes = [] - node = api_node.children - while node: - if node.type == "element": - if node.name == "category": - cat = node.prop("name") - self.categories.append(cat) - elif node.name == "function": - func_nodes.append(node) - else: - raise SpecError("unexpected node %s in api" % node.name) - node = node.next - - # realize functions - for func_node in func_nodes: - tmpl_node = spec.tmpl_nodes[func_node.prop("template")] - try: - func = Function(tmpl_node, func_node, self.is_impl, - self.categories) - except SpecError, e: - func_name = func_node.prop("name") - raise SpecError("failed to parse %s: %s" % (func_name, e)) - self.functions.append(func) - - def match(self, func, conversions={}): - """Find a matching function in the API.""" - match = None - need_conv = False - for f in self.functions: - matched, conv = f.match(func, conversions) - if matched: - match = f - need_conv = conv - # exact match - if not need_conv: - break - return (match, need_conv) - - -class Function(object): - """Parse and realize a